From f253fccb6b1b6f6f2db14c90c19914532963f7a7 Mon Sep 17 00:00:00 2001 From: jow Date: Fri, 3 Feb 2012 15:53:15 +0000 Subject: [PATCH] add packages_10.03.2 in preparation for the 10.03.2 interim release git-svn-id: svn://svn.openwrt.org/openwrt/branches/packages_10.03.2@30016 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .gitignore | 2 + Xorg/app/dillo/Makefile | 68 + Xorg/app/dillo/files/dillo.desktop | 12 + Xorg/app/dillo/files/dillo.png | Bin 0 -> 5555 bytes .../dillo/patches/000-do-not-need-flt2-util.patch | 21 + Xorg/app/eterm/Makefile | 69 + .../eterm/patches/010-dont-add-host-paths.patch | 17 + Xorg/app/gtkperf/Makefile | 44 + .../gtkperf/patches/000-disable-autotools.patch | 19 + Xorg/app/gtkperf/patches/010-change-layout.patch | 77 + Xorg/app/matchbox-keyboard/Makefile | 60 + Xorg/app/packages | 9 + Xorg/app/pwrtray/Makefile | 107 + Xorg/app/pwrtray/files/etc/init.d/pwrtray-backend | 12 + Xorg/app/pwrtray/files/etc/pwrtray-backendrc | 16 + Xorg/app/qwo/Makefile | 48 + Xorg/app/rxvt/Makefile | 50 + Xorg/app/rxvt/files/icon.png | Bin 0 -> 8518 bytes Xorg/app/rxvt/files/rxvt.desktop | 13 + Xorg/app/template.mk | 46 + Xorg/app/xcalc/Makefile | 47 + Xorg/app/xclipboard/Makefile | 47 + Xorg/app/xdm/Makefile | 60 + Xorg/app/xeyes/Makefile | 42 + Xorg/app/xine-ui/Makefile | 80 + Xorg/app/xine-ui/patches/100-cflags.patch | 13 + Xorg/app/xine-ui/patches/110-xitk.patch | 16 + Xorg/app/xine-ui/patches/120-remove-delay.patch | 13 + Xorg/app/xinit/Makefile | 41 + Xorg/app/xmessage/Makefile | 47 + Xorg/app/xterm/Makefile | 51 + Xorg/app/xterm/files/terminal.png | Bin 0 -> 2624 bytes Xorg/app/xterm/files/xterm.desktop | 12 + Xorg/app/xterm/patches/010-no-transform.patch | 19 + Xorg/driver/xf86-input-tslib/Makefile | 50 + .../xf86-input-tslib/files/pointercal.om_gta02 | Bin 0 -> 46 bytes .../patches/100-ifdef-debug-output.patch | 58 + Xorg/driver/xf86-video-glamo/Makefile | 55 + .../patches/001-include-glamo-engine.patch | 12 + Xorg/font/dejavu-fonts-ttf/Makefile | 91 + Xorg/font/liberation-fonts-ttf/Makefile | 44 + Xorg/generate.sh | 30 + Xorg/lib/atk/Makefile | 46 + .../atk/patches/010-do-not-use-GTK_DOC-macro.patch | 11 + .../020-do-not-build-examples_docs_pos_tests.patch | 50 + Xorg/lib/cairo/Makefile | 66 + Xorg/lib/cairomm/Makefile | 63 + Xorg/lib/fltk2/Makefile | 65 + .../fltk2/patches/000-do-not-build-fltk-and-tests | 11 + Xorg/lib/fltk2/patches/001-be-verbose | 12 + Xorg/lib/fltk2/patches/002-honor-cppflags | 26 + Xorg/lib/fltk2/patches/100-compile-fixes.patch | 14 + Xorg/lib/gtk1/Makefile | 55 + Xorg/lib/gtk2/Makefile | 133 + Xorg/lib/gtk2/files/gdk-pixbuf-query-loaders.init | 12 + .../patches/010-do-not-use-GTK_DOC-macro.patch | 11 + .../patches/010-dont-build-demos-and-tests.patch | 28 + .../030-dont-build-demos_tests_pos_examples.patch | 207 + Xorg/lib/gtk2/patches/100-compile_fix.patch | 30 + Xorg/lib/gtkmm/Makefile | 65 + Xorg/lib/gtkmm/patches/001-automake-compat.patch | 29 + .../gtkmm/patches/100-disable-tools-tests.patch | 88 + Xorg/lib/hippo-canvas/Makefile | 98 + .../lib/hippo-canvas/patches/010-use-python-config | 17 + Xorg/lib/imlib2/Makefile | 82 + Xorg/lib/libast/Makefile | 70 + .../libast/patches/010-dont-add-host-paths.patch | 30 + Xorg/lib/libast/patches/100-configure.patch | 22 + Xorg/lib/libdrm/Makefile | 51 + Xorg/lib/libfakekey/Makefile | 59 + Xorg/lib/libmatchbox/Makefile | 65 + Xorg/lib/librsvg/Makefile | 86 + Xorg/lib/libxcb/Makefile | 102 + Xorg/lib/mesa/Makefile | 112 + .../lib/mesa/patches/010-fix-pkgconfig-files.patch | 90 + Xorg/lib/packages | 23 + Xorg/lib/pango/Makefile | 100 + Xorg/lib/pango/files/pango-querymodules.init | 12 + Xorg/lib/pangomm/Makefile | 70 + Xorg/lib/pixman/Makefile | 51 + Xorg/lib/qt4/Config.in | 21 + Xorg/lib/qt4/Makefile | 785 + Xorg/lib/qt4/files/qmake.mk | 60 + Xorg/lib/qt4/files/qws-qmake.conf | 45 + Xorg/lib/qt4/files/qws-qplatformdefs.h | 1 + Xorg/lib/qt4/files/x11-qmake.conf | 50 + Xorg/lib/qt4/files/x11-qplatformdefs.h | 1 + .../qt4/patches/100-do_not_use_res.defdname.patch | 35 + .../lib/qt4/patches/200-depend-on-decoration.patch | 15 + Xorg/lib/qt4/patches/300-compile-fixes.patch | 14 + Xorg/lib/qt4/patches/400-do-not-pack-structs.patch | 263 + .../qt4/patches/500-allow-device-grabbing.patch | 58 + Xorg/lib/template.mk | 47 + Xorg/lib/tslib/Makefile | 62 + Xorg/lib/tslib/files/pointercal_om_gta02 | Bin 0 -> 46 bytes Xorg/lib/tslib/files/ts.conf | 25 + Xorg/lib/tslib/patches/devfs.patch | 18 + Xorg/lib/tslib/patches/event1.patch | 80 + Xorg/lib/tslib/patches/fix_version.patch | 32 + .../patches/tslib-input_raw-grab_events.patch | 120 + Xorg/lib/vte/Makefile | 111 + Xorg/lib/vte/patches/100-compile-fixes.patch | 13 + Xorg/lib/wnck/Makefile | 57 + .../patches/100-optional_gdk_pixbuf_csource.patch | 65 + Xorg/lib/xcbproto/Makefile | 59 + Xorg/lib/xine-lib/Makefile | 66 + Xorg/lib/xine-lib/patches/100-compile_fix.patch | 13 + Xorg/wm/fluxbox/Makefile | 102 + Xorg/wm/fluxbox/files/init | 99 + Xorg/wm/fluxbox/files/menu | 31 + Xorg/wm/fluxbox/files/uci-defaults/x11 | 1 + Xorg/wm/fluxbox/patches/010-fix-includes.patch | 37 + Xorg/wm/fluxbox/patches/100-fbrun-compile.patch | 10 + .../wm/fluxbox/patches/120-fbsetroot-compile.patch | 8 + Xorg/wm/matchbox-window-manager/Makefile | 77 + .../matchbox-window-manager/files/uci-defaults/x11 | 1 + Xorg/xorg/app/font-util/Makefile | 45 + Xorg/xorg/app/fontconfig/Makefile | 69 + Xorg/xorg/app/iceauth/Makefile | 47 + Xorg/xorg/app/smproxy/Makefile | 40 + Xorg/xorg/app/x11perf/Makefile | 43 + Xorg/xorg/app/xauth/Makefile | 41 + Xorg/xorg/app/xkbcomp/Makefile | 45 + Xorg/xorg/app/xprop/Makefile | 43 + Xorg/xorg/app/xrandr/Makefile | 42 + .../patches/001-xrandr-1.2.2-clone-nameclash.patch | 35 + Xorg/xorg/app/xrdb/Makefile | 40 + Xorg/xorg/app/xset/Makefile | 45 + Xorg/xorg/app/xsetroot/Makefile | 42 + Xorg/xorg/app/xwd/Makefile | 42 + Xorg/xorg/data/xbitmaps/Makefile | 48 + Xorg/xorg/data/xkbdata/Makefile | 64 + Xorg/xorg/data/xkbdata/files/nokia_n810/rx-44 | 310 + Xorg/xorg/data/xkbdata/files/nokia_n810/su-8w | 482 + Xorg/xorg/data/xkeyboard-config/Makefile | 40 + Xorg/xorg/driver/xf86-input-evdev/Makefile | 43 + Xorg/xorg/driver/xf86-input-keyboard/Makefile | 42 + Xorg/xorg/driver/xf86-input-mouse/Makefile | 42 + Xorg/xorg/driver/xf86-video-ati/Makefile | 73 + Xorg/xorg/driver/xf86-video-fbdev/Makefile | 47 + Xorg/xorg/driver/xf86-video-geode/Makefile | 44 + Xorg/xorg/driver/xf86-video-intel/Makefile | 76 + Xorg/xorg/driver/xf86-video-nv/Makefile | 73 + Xorg/xorg/driver/xf86-video-omap/Makefile | 49 + .../xf86-video-omap/patches/001-misc-fixes.patch | 24 + Xorg/xorg/driver/xf86-video-vesa/Makefile | 42 + .../patches/010-dont-mess-up-include-paths.patch | 11 + Xorg/xorg/font/encodings/Makefile | 81 + Xorg/xorg/font/font-alias/Makefile | 81 + Xorg/xorg/font/font-bh-75dpi/Makefile | 81 + Xorg/xorg/font/font-cursor-misc/Makefile | 81 + Xorg/xorg/font/font-daewoo-misc/Makefile | 81 + Xorg/xorg/font/font-dec-misc/Makefile | 81 + Xorg/xorg/font/font-ibm-type1/Makefile | 81 + Xorg/xorg/font/font-isas-misc/Makefile | 81 + Xorg/xorg/font/font-jis-misc/Makefile | 81 + Xorg/xorg/font/font-micro-misc/Makefile | 81 + Xorg/xorg/font/font-misc-cyrillic/Makefile | 81 + Xorg/xorg/font/font-misc-misc/Makefile | 135 + .../font/font-misc-misc/files/fonts.dir.font-base | 9 + .../font-misc-misc/files/fonts.dir.font-misc-misc | 62 + Xorg/xorg/font/font-xfree86-type1/Makefile | 81 + Xorg/xorg/font/packages | 12 + Xorg/xorg/font/template.mk | 80 + Xorg/xorg/lib/libICE/Makefile | 53 + Xorg/xorg/lib/libSM/Makefile | 55 + Xorg/xorg/lib/libX11/Makefile | 87 + .../lib/libX11/patches/005-fix-include-path.patch | 143 + .../libX11/patches/010-ignore-groff-warnings.patch | 13 + Xorg/xorg/lib/libXau/Makefile | 56 + Xorg/xorg/lib/libXaw/Makefile | 64 + .../xorg/lib/libXaw/patches/001-fix-includes.patch | 13 + Xorg/xorg/lib/libXcomposite/Makefile | 54 + Xorg/xorg/lib/libXcursor/Makefile | 55 + Xorg/xorg/lib/libXdamage/Makefile | 55 + Xorg/xorg/lib/libXdmcp/Makefile | 54 + Xorg/xorg/lib/libXext/Makefile | 61 + Xorg/xorg/lib/libXfixes/Makefile | 56 + Xorg/xorg/lib/libXfont/Makefile | 60 + Xorg/xorg/lib/libXft/Makefile | 54 + Xorg/xorg/lib/libXi/Makefile | 61 + Xorg/xorg/lib/libXmu/Makefile | 72 + Xorg/xorg/lib/libXpm/Makefile | 56 + Xorg/xorg/lib/libXrandr/Makefile | 60 + Xorg/xorg/lib/libXrender/Makefile | 60 + Xorg/xorg/lib/libXt/Makefile | 72 + Xorg/xorg/lib/libXtst/Makefile | 56 + Xorg/xorg/lib/libXv/Makefile | 60 + Xorg/xorg/lib/libXvMC/Makefile | 60 + Xorg/xorg/lib/libXxf86vm/Makefile | 63 + Xorg/xorg/lib/libfontenc/Makefile | 55 + Xorg/xorg/lib/libpciaccess/Makefile | 69 + Xorg/xorg/lib/libxkbfile/Makefile | 55 + Xorg/xorg/lib/xtrans/Makefile | 47 + Xorg/xorg/proto/applewmproto/Makefile | 39 + Xorg/xorg/proto/bigreqsproto/Makefile | 39 + Xorg/xorg/proto/calibrateproto/Makefile | 38 + Xorg/xorg/proto/calibrateproto/src/ChangeLog | 5 + Xorg/xorg/proto/calibrateproto/src/Makefile | 527 + Xorg/xorg/proto/calibrateproto/src/Makefile.am | 29 + Xorg/xorg/proto/calibrateproto/src/Makefile.in | 527 + Xorg/xorg/proto/calibrateproto/src/aclocal.m4 | 548 + Xorg/xorg/proto/calibrateproto/src/autogen.sh | 12 + Xorg/xorg/proto/calibrateproto/src/config.log | 165 + Xorg/xorg/proto/calibrateproto/src/config.status | 786 + Xorg/xorg/proto/calibrateproto/src/configure | 3163 +++ Xorg/xorg/proto/calibrateproto/src/configure.ac | 6 + Xorg/xorg/proto/calibrateproto/src/install-sh | 507 + Xorg/xorg/proto/calibrateproto/src/missing | 367 + .../proto/calibrateproto/src/xcalibrateproto.h | 95 + .../proto/calibrateproto/src/xcalibrateproto.pc | 9 + .../proto/calibrateproto/src/xcalibrateproto.pc.in | 9 + .../xorg/proto/calibrateproto/src/xcalibratewire.h | 43 + Xorg/xorg/proto/compositeproto/Makefile | 39 + Xorg/xorg/proto/damageproto/Makefile | 39 + Xorg/xorg/proto/dmxproto/Makefile | 38 + Xorg/xorg/proto/dri2proto/Makefile | 37 + Xorg/xorg/proto/fixesproto/Makefile | 39 + Xorg/xorg/proto/fontcacheproto/Makefile | 39 + Xorg/xorg/proto/fontsproto/Makefile | 38 + Xorg/xorg/proto/glproto/Makefile | 38 + Xorg/xorg/proto/inputproto/Makefile | 39 + Xorg/xorg/proto/kbproto/Makefile | 39 + Xorg/xorg/proto/printproto/Makefile | 39 + Xorg/xorg/proto/randrproto/Makefile | 39 + Xorg/xorg/proto/recordproto/Makefile | 39 + Xorg/xorg/proto/renderproto/Makefile | 39 + Xorg/xorg/proto/resourceproto/Makefile | 36 + Xorg/xorg/proto/scrnsaverproto/Makefile | 39 + Xorg/xorg/proto/videoproto/Makefile | 39 + Xorg/xorg/proto/windowswmproto/Makefile | 39 + Xorg/xorg/proto/xcmiscproto/Makefile | 39 + Xorg/xorg/proto/xextproto/Makefile | 39 + Xorg/xorg/proto/xf86bigfontproto/Makefile | 39 + Xorg/xorg/proto/xf86dgaproto/Makefile | 39 + Xorg/xorg/proto/xf86driproto/Makefile | 39 + Xorg/xorg/proto/xf86vidmodeproto/Makefile | 39 + Xorg/xorg/proto/xineramaproto/Makefile | 39 + Xorg/xorg/proto/xproto/Makefile | 39 + Xorg/xorg/xserver/xorg-kdrive/Config.in | 28 + Xorg/xorg/xserver/xorg-kdrive/Makefile | 150 + .../xserver/xorg-kdrive/patches/001-tslib.patch | 46 + .../patches/002-add-portrait-modes.patch | 26 + Xorg/xorg/xserver/xorg-server/Config.in | 28 + Xorg/xorg/xserver/xorg-server/Makefile | 193 + .../xserver/xorg-server/files/config.uci/generic | 17 + .../xorg/xserver/xorg-server/files/config.uci/olpc | 14 + .../xserver/xorg-server/files/config.uci/om_gta02 | 14 + .../xserver/xorg-server/files/config.xorg/generic | 64 + .../xorg-server/files/config.xorg/nokia_n810 | 43 + .../xserver/xorg-server/files/config.xorg/olpc | 78 + .../xserver/xorg-server/files/config.xorg/om_gta02 | 34 + Xorg/xorg/xserver/xorg-server/files/tmp/x11.uci | 3 + Xorg/xorg/xserver/xorg-server/files/x.init | 56 + Xorg/xorg/xserver/xorg-server/files/xorg-driver.mk | 3 + Xorg/xserver/xglamo/Makefile | 135 + Xorg/xserver/xglamo/files/config/x11.om_gta02 | 7 + Xorg/xserver/xglamo/files/pointercal.om_gta02 | Bin 0 -> 46 bytes Xorg/xserver/xglamo/files/x.init | 39 + Xorg/xserver/xglamo/patches/001-fix-aclocal.patch | 14 + admin/debootstrap/Makefile | 54 + admin/debootstrap/files/pkgdetails.c | 286 + admin/debootstrap/patches/100-busybox_fix.patch | 13 + admin/gkrellmd/Makefile | 60 + admin/gkrellmd/files/gkrellmd.init | 16 + admin/gkrellmd/patches/100-conf.patch | 40 + admin/htop/Makefile | 48 + admin/htop/patches/001-uClibc-friendly.patch | 52 + admin/monit/Makefile | 86 + admin/monit/files/monit.init | 19 + admin/monit/patches/001-no_sslv2.patch | 18 + admin/monit/patches/002-uclibc_loadavg.patch | 48 + admin/muninlite/Makefile | 54 + admin/muninlite/files/etc/xinetd.d/munin | 10 + admin/muninlite/patches/001-no_disks.patch | 12 + admin/muninlite/patches/002-hostname.patch | 11 + admin/muninlite/patches/100-fix-no-ethtool.patch | 21 + admin/muninlite/patches/200-add-tap-dev.patch | 20 + admin/muninlite/patches/210-add-bridge-devs.patch | 22 + admin/nagios-plugins/Makefile | 51 + admin/nagios-plugins/patches/002-plugins.patch | 74 + .../patches/003-pgsl-header-fix.patch | 11 + admin/nagios/Makefile | 61 + admin/nrpe/Makefile | 91 + admin/nrpe/files/nrpe.cfg | 208 + admin/nrpe/files/nrpe.init | 12 + admin/nrpe/patches/100-openssl-dh.patch | 17 + admin/nsca/Makefile | 60 + admin/osiris/Makefile | 50 + admin/osiris/files/osirisd.init | 20 + admin/osiris/patches/001-configure-cross.patch | 22 + admin/osiris/patches/002-osirisd-pidfile.patch | 68 + admin/osiris/patches/003-openssl-0.9.8+.patch | 16 + admin/osiris/patches/004-no_openssl_ripe.patch | 59 + admin/osiris/patches/006-mod_nvram.patch | 213 + admin/osiris/patches/007-mod_uptime.patch | 243 + .../patches/010-dont-add-host-include-paths.patch | 16 + admin/pmacct/Makefile | 241 + admin/pmacct/files/nfacctd.conf | 29 + admin/pmacct/files/nfacctd.default | 1 + admin/pmacct/files/nfacctd.init | 18 + admin/pmacct/files/pmacctd.conf | 27 + admin/pmacct/files/pmacctd.default | 1 + admin/pmacct/files/pmacctd.init | 18 + admin/pmacct/files/uacctd.conf | 28 + admin/pmacct/files/uacctd.default | 1 + admin/pmacct/files/uacctd.init | 18 + admin/pmacct/patches/001-honor_cflags.patch | 20 + admin/sudo/Makefile | 76 + admin/sudo/files/sudo.init | 11 + admin/syslog-ng/Makefile | 63 + admin/syslog-ng/files/syslog-ng.conf | 16 + admin/syslog-ng/files/syslog-ng.init | 27 + admin/syslog-ng/patches/001-no_lfl.patch | 38 + admin/syslog-ng3/Makefile | 72 + admin/syslog-ng3/files/syslog-ng.conf | 37 + admin/syslog-ng3/files/syslog-ng.init | 27 + admin/zabbix/Makefile | 135 + admin/zabbix/files/zabbix_agentd.conf | 85 + admin/zabbix/files/zabbix_agentd.init | 21 + admin/zabbix/patches/001-cross_compile.patch | 13 + admin/zabbix/patches/002-uclibc_loadavg.patch | 49 + devel/binutils/Makefile | 111 + devel/boost-jam/Makefile | 41 + devel/build-essential/Makefile | 33 + devel/build-essential/files/usr/src/hello/hello.c | 8 + devel/cppunit/Makefile | 48 + devel/diffutils/Makefile | 56 + devel/dmalloc/Makefile | 77 + devel/dmalloc/patches/100-configure_pagesize.patch | 44 + devel/dmalloc/patches/110-configure_cxx.patch | 38 + devel/dmalloc/patches/120-makefile_shared.patch | 305 + devel/dmalloc/patches/130-makefile_destdir.patch | 97 + devel/dmalloc/patches/200-fix_return_address.patch | 45 + devel/dmalloc/patches/210-fix_threads.patch | 11 + .../dmalloc/patches/300-fix_summarize_script.patch | 8 + devel/gcc/Makefile | 90 + devel/ksymoops/Makefile | 57 + devel/make/Makefile | 36 + devel/oprofile/Makefile | 87 + .../100-use_insmod_instead_of_modprobe.patch | 22 + devel/oprofile/patches/101-remove_24_support.patch | 67 + .../oprofile/patches/200-rename-i386-to-x86.patch | 65 + devel/patch/Makefile | 43 + devel/patch/patches/100-install.patch | 18 + ipv6/6scripts/Makefile | 51 + ipv6/6scripts/files/6bridge.conf | 2 + ipv6/6scripts/files/6bridge.init | 53 + ipv6/6scripts/files/6tunnel.conf | 18 + ipv6/6scripts/files/6tunnel.init | 68 + ipv6/6scripts/files/he-tun.ppp | 24 + ipv6/6tunnel/Makefile | 41 + ipv6/ahcpd/Makefile | 55 + ipv6/ahcpd/files/ahcp.sh | 91 + ipv6/ahcpd/files/ahcpd.config | 50 + ipv6/ahcpd/files/ahcpd.init | 27 + ipv6/ahcpd/patches/001-autoconf-prefixes.patch | 14 + ipv6/aiccu/Makefile | 57 + ipv6/aiccu/files/aiccu.conf | 11 + ipv6/aiccu/files/aiccu.hotplug | 2 + ipv6/aiccu/files/aiccu.init | 52 + ipv6/aiccu/patches/100-cross_compile.patch | 101 + ipv6/aiccu/patches/200-add_dn_skipname.patch | 70 + ipv6/aiccu/patches/300-resolver-uclibc.patch | 29 + ipv6/dhcp6/Makefile | 80 + ipv6/dhcp6/patches/001-opt_flags.patch | 94 + ipv6/dhcp6/patches/002-gcc_lvalue.patch | 11 + ipv6/dhcp6/patches/003-debug.patch | 22 + ipv6/dibbler/Makefile | 141 + ipv6/dibbler/files/dibbler.init | 13 + ipv6/dibbler/patches/001-fix_avr32_compile | 20 + ipv6/dibbler/patches/001-uclibcxx.patch | 32 + ipv6/gw6c/Makefile | 75 + ipv6/gw6c/files/gw6c.config | 66 + ipv6/gw6c/files/gw6c.init | 111 + ipv6/gw6c/files/openwrt.sh | 181 + ipv6/ipv6calc/Makefile | 51 + ipv6/miredo/Makefile | 105 + ipv6/miredo/files/client-hook | 70 + ipv6/miredo/files/miredo-server.init | 13 + ipv6/miredo/files/miredo.init | 13 + ipv6/miredo/patches/100-uclibc.patch | 21 + ipv6/mrd6/Makefile | 75 + ipv6/mrd6/files/mrd6.conf | 14 + ipv6/mrd6/files/mrd6.init | 22 + ipv6/mrd6/patches/002-missing_netlink_defs.patch | 58 + ipv6/mrd6/patches/003-debian.patch | 71 + ipv6/mrd6/patches/004-ambiguous_call_fix.patch | 13 + ipv6/ndisc/Makefile | 99 + ipv6/ndisc/patches/100-favor_bsd.patch | 20 + ipv6/ndisc/patches/110-strverscmp.patch | 175 + ipv6/ndisc/patches/120-ppoll.patch | 47 + ipv6/ptrtd/Makefile | 43 + ipv6/ptrtd/files/ptrtd.init | 26 + ipv6/ptrtd/patches/100-ptrtd-0.5.2-openwrt.patch | 41 + ipv6/radvd/Makefile | 81 + ipv6/radvd/files/radvd.config | 32 + ipv6/radvd/files/radvd.hotplug | 5 + ipv6/radvd/files/radvd.init | 433 + ipv6/send/Makefile | 58 + .../patches/001-libnetfilter_queue_update.patch | 388 + ipv6/send/patches/002-handle_max_bits_conf.patch | 50 + .../send/patches/003-keysig_8bytes_alignment.patch | 20 + .../patches/004-always_link_with_ncurses.patch | 26 + ipv6/send/patches/005-use-bundled-libconfig.patch | 22 + ipv6/send/patches/006-openssl-1.0.0-compat.patch | 143 + ipv6/shorewall6-lite/Makefile | 66 + ipv6/shorewall6-lite/files/hostname | 2 + ipv6/shorewall6-lite/files/hotplug_iface | 12 + ipv6/shorewall6-lite/files/shorewall-lite.init | 20 + ipv6/shorewall6-lite/files/vardir | 2 + ipv6/shorewall6-lite/patches/100-hostname.patch | 11 + ipv6/shorewall6-lite/patches/110-MODULESDIR.patch | 20 + ipv6/shorewall6-lite/patches/120-LOGFILE.patch | 11 + ipv6/shorewall6-lite/patches/130-portability.patch | 20 + ipv6/thc-ipv6/Makefile | 70 + ipv6/thc-ipv6/patches/100-optional-openssl.patch | 93 + ipv6/totd/Makefile | 56 + ipv6/totd/files/totd.conf | 17 + ipv6/totd/files/totd.init | 23 + ipv6/totd/patches/001-no_warning_as_errors.patch | 12 + ipv6/tspc/Makefile | 48 + ipv6/tspc/patches/001-debian_patches.patch | 228 + ipv6/wide-dhcpv6/Makefile | 139 + ipv6/wide-dhcpv6/files/dhcp6c-dnsmasq.hotplug | 53 + ipv6/wide-dhcpv6/files/dhcp6c-radvd.hotplug | 3 + ipv6/wide-dhcpv6/files/dhcp6c-state | 18 + ipv6/wide-dhcpv6/files/dhcp6c.conf | 42 + ipv6/wide-dhcpv6/files/dhcp6c.hotplug | 20 + ipv6/wide-dhcpv6/files/dhcp6c.init | 190 + ipv6/wide-dhcpv6/files/dhcp6s.conf | 4 + ipv6/wide-dhcpv6/files/dhcp6s.hotplug | 20 + ipv6/wide-dhcpv6/files/dhcp6s.init | 50 + .../wide-dhcpv6/patches/000-cftoken-noyywrap.patch | 9 + .../wide-dhcpv6/patches/001-linux_old_compat.patch | 37 + .../patches/002-fix-dprintf-clash.patch | 56 + lang/cython/Makefile | 49 + lang/distribute/Makefile | 69 + lang/egenix-mx/Makefile | 94 + lang/eggdrop/Makefile | 57 + lang/eggdrop/patches/001-makefile_in.patch | 11 + lang/eggdrop/patches/002-eggdrop_h.patch | 12 + lang/eggdrop/patches/003-language_c.patch | 25 + lang/eggdrop/patches/004-main_c.patch | 14 + lang/erlang/Makefile | 335 + lang/erlang/patches/101-emulator_includes.patch | 11 + lang/erlang/patches/102-relative_symlinks.patch | 25 + lang/gst-python/Makefile | 71 + lang/ipython/Makefile | 58 + lang/jamvm/Makefile | 62 + lang/jsonpath/Makefile | 46 + lang/kid/Makefile | 50 + lang/kid/patches/000-setup.patch | 20 + lang/logilab-astng/Makefile | 46 + lang/logilab-common/Makefile | 46 + lang/lsqlite3/Makefile | 53 + lang/luaexpat/Makefile | 55 + lang/luaexpat/files/compat-5.1r5/compat-5.1.c | 97 + lang/luaexpat/files/compat-5.1r5/compat-5.1.h | 13 + lang/luaexpat/files/compat-5.1r5/compat-5.1.lua | 267 + lang/luaexpat/patches/001-compile-fix.patch | 10 + lang/luafilesystem/Makefile | 63 + lang/luaposix/Makefile | 52 + lang/luaposix/patches/100-eglibc-compat.patch | 26 + lang/luaprofiler/Makefile | 54 + lang/luaprofiler/patches/100-link.patch | 11 + lang/luasec/Makefile | 57 + lang/luasocket/Makefile | 59 + lang/luasql/Makefile | 121 + lang/mako/Makefile | 56 + lang/numpy/Makefile | 51 + lang/numpy/patches/100-compile.patch | 112 + lang/perl-compress-bzip2/Makefile | 39 + lang/perl-dbi/Makefile | 39 + lang/perl-html-parser/Makefile | 39 + lang/perl-html-tagset/Makefile | 39 + lang/perl-html-tree/Makefile | 39 + lang/perl-lockfile-simple/Makefile | 39 + lang/perl-uri/Makefile | 39 + lang/perl-www-curl/Makefile | 39 + ...00-perl-www-curl_disable_curl-config_hack.patch | 11 + lang/perl-www-mechanize/Makefile | 44 + lang/perl-www/Makefile | 39 + lang/perl/Makefile | 193 + lang/perl/files/Module/ScanDeps.pm | 1083 + lang/perl/files/config.sh-arm.in | 1068 + lang/perl/files/config.sh-armeb.in | 1068 + lang/perl/files/config.sh-avr32.in | 1070 + lang/perl/files/config.sh-i486.in | 1068 + lang/perl/files/config.sh-mips.in | 1068 + lang/perl/files/config.sh-mipsel.in | 1068 + lang/perl/files/config.sh-powerpc.in | 1068 + lang/perl/files/perlmod-deps.sh | 81 + lang/perl/files/scan-perlbase.sh | 177 + lang/perl/files/strippm.sh | 11 + lang/perl/patches/100-static_uudmap.patch | 50 + ...01-fix-cross-compile-endianness-detection.patch | 22 + ...00-host-libc-dir-moved-debian+derivatives.patch | 27 + lang/perl/perlbase.mk | 1641 ++ lang/perl/perlmod.mk | 53 + lang/php-pear-db/Makefile | 43 + .../patches/100-php5-deprecation-fixes.patch | 34 + lang/php-pear-xmlrpc/Makefile | 46 + lang/php-pear/Makefile | 44 + .../patches/000-remove_deprecation_messages.patch | 62 + lang/php4/Makefile | 369 + lang/php4/files/php.ini | 561 + lang/php4/files/php.init | 12 + lang/php4/patches/002-configure.patch | 83 + lang/php4/patches/003-dns_skipname.patch | 22 + lang/php4/patches/004-uts_domainname.patch | 11 + lang/php4/patches/100-compile_fix.patch | 18 + lang/php4/patches/110-openssl-1.0.0-compat.patch | 72 + lang/php5/Makefile | 516 + lang/php5/files/php.ini | 318 + lang/php5/files/php.init | 16 + lang/php5/patches/005-APC.patch | 22333 ++++++++++++++++ .../100-fix_membar_producer_link_error_gcc41.patch | 11 + .../101-fix_membar_producer_link_error_gcc3x.patch | 11 + .../php5/patches/900-prevent_buildconf_force.patch | 19104 ++++++++++++++ .../patches/950-Fix-dl-cross-compiling-issue.patch | 11 + lang/psycopg/Makefile | 57 + lang/pybluez/Makefile | 54 + lang/pycairo/Makefile | 57 + lang/pyevent/Makefile | 45 + .../patches/000-libenevt_path_from_env.patch | 20 + lang/pyevent/patches/001-event-pyx-python25.patch | 11 + lang/pygobject/Makefile | 113 + .../patches/010-binary-constants-module.patch | 386 + lang/pygtk/Makefile | 85 + lang/pygtk/patches/001-automake-compat.patch | 8 + lang/pymysql/Makefile | 51 + lang/pymysql/patches/000-setup.patch | 12 + lang/pymysql/patches/010-threadsafe.patch | 11 + lang/pyopenssl/Makefile | 48 + lang/pypcap/Makefile | 47 + lang/pypcap/patches/000-no_cpickle.patch | 142 + lang/pypcap/patches/001-python2_5.patch | 11 + lang/pyqt4/Makefile | 154 + lang/pyqt4/files/fixup.sh | 9 + lang/pyqt4/files/qt_versioning.sh | 32 + lang/pyqt4/patches/100-cross-compile.patch | 376 + lang/pyserial/Makefile | 49 + lang/pysqlite/Makefile | 58 + lang/pysqlite/files/setup.cfg.in | 5 + lang/python-cjson/Makefile | 48 + .../patches/001-unicode-buffer-overflow.patch | 79 + lang/python-crypto/Makefile | 46 + lang/python-curl/Makefile | 45 + lang/python-curl/patches/001-no_static.patch | 12 + lang/python-dbus/Makefile | 72 + lang/python-gnome-desktop2/Makefile | 88 + lang/python-ifconfig/Makefile | 48 + lang/python-ifconfig/patches/001-errorcheck.patch | 69 + .../patches/002-checkflags-up.patch | 39 + lang/python-json/Makefile | 48 + lang/python-sip/Makefile | 148 + lang/python-sip/files/python-sip-package.mk | 10 + lang/python-sip/files/sipconfig.macros.template | 87 + lang/python-sip/patches/100-cross-compile.patch | 208 + lang/python/Makefile | 445 + lang/python/files/python-package.mk | 77 + lang/python/patches/000-cross-compile.patch | 113 + .../patches/010-cannot-run-test-programm.patch | 89 + .../patches/020-dont-compile-python-files.patch | 29 + lang/python/patches/030-fixup-include-dirs.patch | 42 + .../040-dont-import-cross-compiled-modules.patch | 43 + .../patches/070-dont-clean-ipkg-install.patch | 21 + .../patches/080-distutils-dont_adjust_files.patch | 63 + lang/python/patches/090-fix-ctypes.patch | 16 + lang/python/patches/110-enable-zlib.patch | 15 + .../120-force-internal-modules-for-hashlib.patch | 30 + lang/python2-chardet/Makefile | 47 + lang/pyusb/Makefile | 46 + lang/pyxdg/Makefile | 47 + lang/pyyaml/Makefile | 47 + lang/ruby/Makefile | 486 + ...001-Add-option-which-enable-SSLv2-support.patch | 53 + lang/sigscheme/Makefile | 50 + lang/sqlite3-ruby/Makefile | 50 + lang/tcl/Makefile | 66 + .../100-disable_tzdata_and_msgs_install.patch | 22 + lang/tcl/patches/200-fix_mips_build.patch | 20 + lang/telepathy-python/Makefile | 49 + lang/twisted/Makefile | 248 + lang/twisted/patches/000-select_submodules.patch | 25 + lang/twisted/patches/001-dont_use_zope.patch | 162 + lang/urbi/Makefile | 66 + lang/urbi/patches/001-no_examples.patch | 31 + lang/urbi/patches/005-fix-gcc_4_3-compile.patch | 22 + lang/xapian-bindings/Makefile | 47 + lang/xapian-bindings/patches/010-build.patch | 67 + lang/yapsnmp/Makefile | 67 + lang/yapsnmp/patches/000-compile_fix.patch | 334 + lang/yapsnmp/patches/001-automake-compat.patch | 46 + libs/aalib/Makefile | 60 + libs/aalib/patches/001-destdir.patch | 91 + libs/alsa-lib/Makefile | 94 + libs/alsa-lib/patches/001-link_fix.patch | 26 + .../patches/003-mips-atomic-static-inline.patch | 40 + libs/apr-util/Makefile | 75 + libs/apr-util/patches/001-automake-compat.patch | 21 + libs/apr/Makefile | 77 + libs/apr/patches/001-autoconf-compat.patch | 22 + libs/apr/patches/101-fix_apr_time_now.patch | 13 + libs/argp-standalone/Makefile | 37 + .../patches/001-throw-in-funcdef.patch | 79 + libs/argtable/Makefile | 60 + libs/avahi/Makefile | 374 + libs/avahi/files/avahi-daemon.conf | 28 + libs/avahi/files/avahi-daemon.init | 23 + libs/avahi/files/service-http | 10 + libs/avahi/files/service-ssh | 9 + .../010-step_back_autotools-no-gettext.patch | 80 + libs/axtls/Makefile | 93 + libs/axtls/files/config | 121 + libs/axtls/patches/001-opt_flags.patch | 32 + libs/axtls/patches/002-axhttpd_install.patch | 15 + libs/bluez-libs/Makefile | 50 + .../patches/010-dont-override-libdir.patch | 15 + libs/boost/Makefile | 277 + libs/boost/patches/010-one-cpu.patch | 12 + libs/boost/patches/020-buildin-offsetof.patch | 11 + libs/c-ares/Makefile | 47 + libs/cgilib/Makefile | 53 + libs/cgilib/patches/200-cgitest_bugfix.patch | 11 + libs/cgilib/patches/300-cpp_bugfix.patch | 22 + libs/check/Makefile | 61 + libs/classpath/Makefile | 55 + libs/clearsilver/Config.in | 12 + libs/clearsilver/Makefile | 101 + .../clearsilver/patches/001-gcc-vs-dollar-cc.patch | 11 + .../patches/002-make-install-depends.patch | 99 + libs/clearsilver/patches/003-disable-tests.patch | 11 + libs/clearsilver/patches/100-remove_warnings.patch | 690 + .../patches/101-fix_content_type_ff3.patch | 11 + .../patches/102-add_x_requested_http_headers.patch | 11 + libs/clinkc/Makefile | 54 + libs/confuse/Makefile | 77 + libs/confuse/patches/001-no_werror.patch | 24 + libs/credis/Makefile | 51 + libs/credis/patches/200-Makefile.patch | 15 + libs/curl/Makefile | 116 + libs/curl/patches/100-cross-compile.patch | 119 + libs/curl/patches/200-no_docs_tests.patch | 22 + libs/curl/patches/510-no_sslv2.patch | 25 + libs/cyrus-sasl/Makefile | 108 + libs/cyrus-sasl/patches/001-automake-compat.patch | 125 + .../cyrus-sasl/patches/200-fix_avr32_compile.patch | 11 + libs/db47/Makefile | 98 + libs/db47/patches/001-sequence_lock.patch | 56 + libs/db47/patches/002-lock.patch | 43 + libs/db47/patches/003-dead_lock.patch | 212 + libs/dbus-glib/Makefile | 74 + libs/dbus-glib/patches/001-cross.patch | 96 + .../patches/003-disable-tests-docs-examples.patch | 29 + libs/elfutils/Makefile | 52 + .../patches/001-elfutils-portability.patch | 1243 + libs/elfutils/patches/002-no_tests.patch | 22 + .../patches/003-no_warnings_as_errors.patch | 99 + libs/elfutils/patches/004-memcpy_def.patch | 14 + libs/elfutils/patches/005-only_libdw_libelf.patch | 27 + libs/elfutils/patches/006-libdw_LIBS.patch | 24 + libs/eventlog/Makefile | 49 + libs/expat/Makefile | 66 + libs/ezxml/Makefile | 53 + libs/ezxml/patches/100-cross_compile.patch | 16 + libs/ezxml/patches/101-build_shared.patch | 26 + libs/ezxml/patches/200-ezxml_parse_str.patch | 36 + libs/ezxml/patches/201-ezxml_int.patch | 123 + libs/ezxml/patches/202-ezxml_child.patch | 20 + libs/ezxml/patches/203-ezxml_cut.patch | 23 + libs/faad2/Makefile | 96 + libs/fcgi/Makefile | 64 + libs/fcgi/patches/100-fcgio-int-type-fix.patch | 38 + libs/fcgi/patches/110-no_examples.patch | 24 + libs/fftw3/Makefile | 69 + libs/fftw3/patches/001-makefile.patch | 20 + libs/file/Makefile | 91 + libs/firewall-mod-save/Makefile | 51 + libs/firewall-mod-save/files/20_save.sh | 73 + libs/flac/Makefile | 72 + libs/flac/patches/001-no-docs-and-examples.patch | 73 + libs/flac/patches/002-no-utility.patch | 24 + libs/flac/patches/010-automake-compat.patch | 11 + libs/freetype/Makefile | 72 + libs/fribidi/Makefile | 46 + libs/gconf2/Makefile | 109 + .../patches/010-do-not-use-GTK_DOC-macro.patch | 11 + .../020-do-not-build-examples_docs_pos_tests.patch | 23 + libs/gconv-modules/Makefile | 44 + libs/gd/Makefile | 76 + libs/gd/patches/100-configure_fix.patch | 30 + libs/gd/patches/101-gdlib-config.patch | 20 + libs/gdbm/Makefile | 56 + .../gdbm/patches/100-fix-build-with-libtool2.patch | 29 + libs/gettext-full/Makefile | 63 + libs/gettext-full/patches/001-autotools.patch | 35 + .../patches/001-no_examples_and_tests.patch | 22 + .../patches/003-gettext-error_print_progname.patch | 11 + .../004-gnulib-uclibc-sched_param-def.patch | 17 + .../patches/005-uclibc-0.9.30-compat.patch | 22 + libs/gettext-full/patches/100-error_progname.patch | 10 + .../gettext-full/patches/120-uclibc-nolocale.patch | 11 + .../patches/150-disable_libxml_iconv.patch | 22 + libs/gettext/Makefile | 63 + libs/gettext/src/include/libintl.h | 53 + libs/gettext/src/m4/codeset.m4 | 21 + libs/gettext/src/m4/gettext.m4 | 383 + libs/gettext/src/m4/intl.m4 | 294 + libs/gettext/src/m4/intldir.m4 | 19 + libs/gettext/src/m4/intlmacosx.m4 | 51 + libs/gettext/src/m4/lcmessage.m4 | 31 + libs/gettext/src/m4/nls.m4 | 32 + libs/gettext/src/m4/po.m4 | 449 + libs/giflib/Makefile | 56 + libs/glib/Makefile | 85 + libs/glib/patches/001-automake-compat.patch | 286 + libs/glib/patches/002-glibconfig-sysdefs.h.patch | 9 + libs/glib/patches/003-gcc-3.4-compat.patch | 22 + libs/glib/patches/004-underquoted-glib.m4.patch | 11 + libs/glib2/Makefile | 100 + libs/glib2/patches/001-automake-compat.patch | 12 + .../patches/002-missing-gthread-include.patch | 10 + libs/glib2/patches/010-move-iconv-to-libs.patch | 10 + .../patches/020-no-docs-tests-translations.patch | 81 + libs/glibmm/Makefile | 65 + ...-disable-examples-tests-doc-tools-scripts.patch | 125 + libs/gmp/Makefile | 62 + libs/gnutls/Makefile | 186 + libs/gnutls/patches/001-no_doc_tests_po.patch | 65 + libs/gperf/Makefile | 39 + libs/gsl/Makefile | 52 + libs/gsm/Makefile | 93 + libs/gsm/patches/001-debian-libsgm-1.0.10-13.patch | 428 + libs/howl/Makefile | 148 + libs/howl/files/autoipd.init | 18 + libs/howl/files/mDNSResponder.conf | 2 + libs/howl/files/mDNSResponder.init | 17 + libs/howl/files/nifd.init | 17 + libs/howl/patches/001-config.patch | 14 + libs/howl/patches/002-debug_log.patch | 10 + libs/howl/patches/003-proto_fix.patch | 11 + libs/howl/patches/004-linux_types.patch | 11 + libs/id3lib/Makefile | 55 + libs/id3lib/patches/100-missing_include.patch | 11 + ...-fix-configure-remove-check-for-iomanip_h.patch | 24 + libs/id3lib/patches/130-fix-includes.patch | 25 + libs/id3lib/patches/140-dont-build-examples.patch | 15 + libs/iksemel/Makefile | 68 + libs/iksemel/patches/001-missing-macros.patch | 163 + libs/intltool/Makefile | 46 + libs/jpeg/Makefile | 98 + libs/jpeg/patches/001-allow-ccache.patch | 11 + libs/jpeg/patches/200-crop.patch | 1896 ++ libs/keynote/Makefile | 56 + libs/keynote/patches/001-build.patch | 345 + libs/keynote/patches/002-cross_compile.patch | 588 + libs/ldns/Makefile | 47 + libs/libIDL2/Makefile | 71 + libs/libaio/Makefile | 60 + .../001-arches_from_debian_package_0.3.106-8.patch | 770 + libs/libaio/patches/002-avr32_support.patch | 118 + libs/libamsel/Makefile | 56 + libs/libao/Makefile | 62 + libs/libart/Makefile | 74 + libs/libatomicops/Makefile | 57 + libs/libaudiofile/Makefile | 77 + .../patches/001-audiofile-config-libdirs.patch | 13 + libs/libcelt/Makefile | 57 + libs/libcli/Makefile | 56 + libs/libconfig/Makefile | 59 + libs/libcroco/Makefile | 59 + libs/libcroco/patches/001-automake-compat.patch | 11 + libs/libcrypto++/Makefile | 57 + .../patches/001-strict_gcc43_include.patch | 16 + .../patches/002-cryptest_data_files_location.patch | 500 + libs/libcrypto++/patches/003-autoconf_files.patch | 822 + libs/libcunit/Makefile | 71 + libs/libdaemon/Makefile | 70 + libs/libdbi/Makefile | 49 + libs/libdbi/patches/001-no_docs.patch | 24 + libs/libdirectfb/Makefile | 118 + libs/libdirectfb/patches/disable-asm.patch | 13 + libs/libdlna/Makefile | 78 + libs/libdlna/patches/100-configure_fix.patch | 120 + libs/libdlna/patches/200-parallel-build.patch | 17 + libs/libdmapsharing/Makefile | 66 + libs/libdnet/Makefile | 144 + libs/libdnet/patches/001-dnet_config.patch | 23 + libs/libdnet/patches/002-fix_avr32_compile.patch | 20 + libs/libdnet/patches/010-gcc4.patch | 20 + libs/libdvbpsi/Makefile | 56 + libs/libdvbpsi/patches/001-no_doc_examples.patch | 25 + libs/libdvdread/Makefile | 65 + libs/libelf/Makefile | 61 + libs/libevent/Makefile | 66 + libs/libevent2/Makefile | 154 + libs/libexif/Makefile | 59 + libs/libexif/patches/100-no_doc.patch | 11 + libs/libffi-sable/Makefile | 60 + libs/libffi/Makefile | 65 + libs/libftdi/Makefile | 48 + libs/libgcrypt/Makefile | 70 + libs/libgcrypt/patches/001-mips-h-constraint.patch | 70 + libs/libgcrypt/patches/002-no_docs_tests.patch | 26 + libs/libgpg-error/Makefile | 85 + libs/libgphoto2/Makefile | 102 + libs/libgphoto2/patches/001-automake-compat.patch | 53 + .../002-no-tests-docs-examples-translations.patch | 86 + libs/libgssapi/Makefile | 51 + libs/libiconv-full/Makefile | 86 + .../libiconv-full/patches/100-strip_charsets.patch | 3438 +++ libs/libiconv-full/patches/101-autotools.patch | 26014 +++++++++++++++++++ .../patches/103-configure_ac_fix.patch | 31 + .../patches/200-work-with-libtool2.patch | 17 + libs/libiconv/COPYING | 504 + libs/libiconv/COPYRIGHT | 20 + libs/libiconv/Makefile | 79 + libs/libiconv/src/iconv.c | 306 + libs/libiconv/src/include/charmaps.h | 80 + libs/libiconv/src/include/charmaps/iso-8859-10.h | 24 + libs/libiconv/src/include/charmaps/iso-8859-13.h | 24 + libs/libiconv/src/include/charmaps/iso-8859-14.h | 25 + libs/libiconv/src/include/charmaps/iso-8859-16.h | 24 + libs/libiconv/src/include/charmaps/iso-8859-2.h | 24 + libs/libiconv/src/include/charmaps/iso-8859-3.h | 24 + libs/libiconv/src/include/charmaps/iso-8859-4.h | 24 + libs/libiconv/src/include/charmaps/iso-8859-5.h | 24 + libs/libiconv/src/include/charmaps/iso-8859-6.h | 24 + libs/libiconv/src/include/charmaps/iso-8859-7.h | 24 + libs/libiconv/src/include/charmaps/iso-8859-8.h | 24 + libs/libiconv/src/include/charmaps/iso-8859-9.h | 24 + libs/libiconv/src/include/charmaps/koi8-r.h | 24 + libs/libiconv/src/include/charmaps/windows-1250.h | 24 + libs/libiconv/src/include/charmaps/windows-1251.h | 24 + libs/libiconv/src/include/charmaps/windows-1252.h | 25 + libs/libiconv/src/include/charmaps/windows-1253.h | 24 + libs/libiconv/src/include/charmaps/windows-1254.h | 24 + libs/libiconv/src/include/charmaps/windows-1255.h | 24 + libs/libiconv/src/include/charmaps/windows-1256.h | 24 + libs/libiconv/src/include/charmaps/windows-1257.h | 24 + libs/libiconv/src/include/charmaps/windows-1258.h | 24 + libs/libiconv/src/include/charmaps/windows-874.h | 24 + libs/libiconv/src/include/iconv.h | 32 + libs/libiconv/src/m4/iconv.m4 | 214 + libs/libid3tag/Makefile | 59 + libs/libidn/Makefile | 59 + libs/libidn/patches/001-remove-libtool.patch | 10 + .../patches/002-disable-po-docs-examples.patch | 22 + libs/libinklevel/Makefile | 58 + libs/libinklevel/patches/001-configure.patch | 275 + libs/libinklevel/patches/002-disable_parport.patch | 55 + .../patches/003-fix_usb_device_location.patch | 20 + libs/liblo/Makefile | 83 + libs/libmad/Makefile | 82 + .../patches/001-mips_removal_h_constraint.patch | 70 + libs/libmcrypt/Makefile | 60 + libs/libmicrohttpd/Makefile | 54 + libs/libmikmod/Makefile | 77 + libs/libmikmod/patches/001-disable-doc.patch | 21 + libs/libmikmod/patches/003-automake-compat.patch | 16 + libs/libmms/Makefile | 62 + libs/libmodbus/Makefile | 50 + libs/libmpcdec/Makefile | 55 + libs/libmpcdec/patches/001-automake-compat.patch | 10 + libs/libmpcdec/patches/100-fixed_point.patch | 11 + libs/libmpd/Makefile | 53 + libs/libmpdclient/Makefile | 67 + libs/libnatpmp/Makefile | 82 + libs/libnatpmp/patches/001-cross_compile.patch | 20 + libs/libnet-1.0.x/Makefile | 74 + .../patches/100-debian_subset.patch.gz | Bin 0 -> 208420 bytes libs/libnet-1.0.x/patches/150-portability.patch | 28 + libs/libnet-1.1.x/Makefile | 75 + libs/libnet-1.1.x/patches/100-debian-subset.patch | 107 + libs/libnet-1.1.x/patches/150-portability.patch | 14 + libs/libnet-1.1.x/patches/160-endian_cache.patch | 18 + libs/libnetfilter-conntrack/Makefile | 72 + libs/libnetfilter-log/Makefile | 72 + libs/libnetfilter-queue/Makefile | 72 + libs/libnfc/Makefile | 82 + libs/libnfnetlink/Makefile | 70 + libs/libnfsidmap/Makefile | 53 + libs/libnfsidmap/patches/000-no-getgrouplist.patch | 17 + libs/libnids/Makefile | 66 + libs/libnids/patches/001-no_asm_for_i386.patch | 12 + libs/libnids/patches/002-configure.patch | 62 + libs/libnids/patches/003-missing_else.patch | 11 + libs/libogg/Makefile | 55 + libs/liboil/Makefile | 64 + .../patches/001-no-tools-docs-examples.patch | 22 + libs/liboil/patches/002-pkgconfig.patch | 19 + libs/libol/Makefile | 69 + libs/liboping/Makefile | 83 + libs/liboping/patches/01-no-werror.patch | 9 + libs/libosip2/Makefile | 63 + libs/libosip2/patches/001-automake-compat.patch | 8 + libs/libowfat/Makefile | 59 + libs/libpam/Makefile | 71 + libs/libpam/patches/000-OE-pam-no-innetgr.patch | 85 + libs/libpam/patches/001-no_nis.patch | 68 + libs/libpam/patches/002-no_yywrap.patch | 26 + libs/libpam/patches/003-no_doc.patch | 36 + libs/libpam/patches/004-fix_lib64.patch | 16 + libs/libpar2/Makefile | 58 + libs/libpfm/Makefile | 63 + libs/libpng/Makefile | 64 + libs/libpng/patches/100-config_fix.patch | 10 + libs/libpthread-stubs/Makefile | 48 + libs/libptmalloc3/Makefile | 44 + libs/libptmalloc3/patches/100-nothreads.patch | 20 + libs/librpcsecgss/Makefile | 53 + libs/librsync/Makefile | 58 + libs/librsync/patches/001-4gb_files.patch | 31 + libs/libsamplerate/Makefile | 53 + libs/libsamplerate/patches/001-fix-m4-loop.patch | 18 + libs/libsdl/Makefile | 161 + libs/libsdl/patches/001-automake-compat.patch | 5 + libs/libsdl_mixer/Makefile | 77 + libs/libsdl_mixer/files/sdl-config | 3 + .../libsdl_mixer/patches/001-automake-compat.patch | 10 + libs/libsdl_mixer/patches/002-fix-linking.patch | 17 + libs/libsdl_sound/Makefile | 62 + libs/libshout/Makefile | 66 + libs/libshout/patches/100-ogg-c.patch | 13 + libs/libshout/patches/110-shout-ogg-c.patch | 13 + libs/libshout/patches/120-vorbis-c.patch | 13 + .../patches/140-no_example_doc_win32.patch | 21 + libs/libsigc++/Makefile | 61 + .../patches/001-no_doc_tests_examples.patch | 22 + libs/libsndfile/Makefile | 54 + libs/libsndfile/patches/001-automake-compat.patch | 10 + libs/libsoup/Makefile | 64 + libs/libsynce/Makefile | 65 + libs/libtasn1/Makefile | 63 + libs/libtheora/Makefile | 64 + libs/libtheora/patches/001-no_docs_tests.patch | 45 + libs/libtorrent/Makefile | 70 + .../libtorrent/patches/100-fix_cross_compile.patch | 35 + .../patches/120-fix-ipv6_socket_datagram.patch | 28 + libs/libtwin/Makefile | 69 + libs/libtwin/patches/100-compile_fix.patch | 11 + libs/libupnp/Makefile | 94 + libs/libusb-1.0/Makefile | 51 + libs/libusb-1.0/patches/001-timerfd.patch | 35 + libs/libusb/Makefile | 71 + libs/libusb/patches/000-debian_packed.patch | 52 + libs/libusb/patches/001-debian_ansi_types.patch | 194 + libs/libusb/patches/002-no_libusbpp.patch | 106 + libs/libusb/patches/003-automake-compat.patch | 10 + libs/libusb/patches/004-no_unused.patch | 11 + libs/libv4l/Makefile | 75 + libs/libv4l/patches/001-no-shm_open-fix.patch | 48 + libs/libvncserver/Makefile | 59 + .../libvncserver/patches/001-automake-compat.patch | 6426 +++++ libs/libvncserver/patches/100-noexamples.patch | 43 + libs/libvorbis/Makefile | 61 + libs/libvorbis/patches/001-automake-compat.patch | 10 + libs/libvorbisidec/Makefile | 52 + libs/libxapian/Makefile | 80 + libs/libxapian/patches/001-missing_includes.patch | 63 + .../patches/002-elif_else_replacement.patch | 12 + libs/libxapian/patches/003-no_docs_tests.patch | 22 + .../patches/004-xapian_config_no_ltlibs.patch | 51 + libs/libxml2/Makefile | 105 + libs/libxslt/Makefile | 146 + libs/libyaml/Makefile | 48 + libs/lzo/Makefile | 60 + libs/matrixssl/Makefile | 57 + libs/matrixssl/patches/100-matrixssl_1.2.4.patch | 1971 ++ libs/matrixssl/patches/200-compile-fixes.patch | 64 + libs/mxml/Makefile | 55 + libs/mxml/patches/001-targets.patch | 12 + libs/mysql/Makefile | 200 + libs/mysql/conf/my.cnf | 54 + libs/mysql/files/lex_hash.h | 6190 +++++ libs/mysql/files/mysqld.init | 29 + libs/mysql/patches/500-cross_compile.patch | 1444 + .../patches/501-disable-pthread-and-tests.patch | 117 + libs/mysql/patches/502-fix-hostname.patch | 11 + libs/nacl/Makefile | 47 + libs/nacl/do-openwrt | 206 + libs/neon/Makefile | 63 + libs/neon/patches/001-automake-compat.patch | 5 + libs/newt/Makefile | 74 + .../patches/100-compile-fix-broken-makefile.patch | 60 + .../patches/110-disable-snackmodule-python.patch | 45 + libs/nmeap/Makefile | 41 + libs/nmeap/patches/100-no_test.patch | 21 + libs/opal/Makefile | 68 + libs/opal/patches/010-fix-gcc_4_3-compile.patch | 25 + libs/opencdk/Makefile | 76 + libs/opencdk/patches/100-fix-tests-build | 22 + libs/opencdk/patches/200-verify-clearsigned.patch | 13 + libs/openh323/Makefile | 48 + libs/openh323/patches/001-configure.patch | 122 + libs/openldap/Makefile | 149 + libs/openldap/files/ldap.init | 14 + libs/openldap/patches/001-automake-compat.patch | 312 + libs/openldap/patches/020-autofs-schema.patch | 26 + libs/openldap/patches/750-no-strip.patch | 22 + libs/orbit2/Makefile | 103 + libs/orbit2/patches/001-remove-libtool.patch | 6648 +++++ .../orbit2/patches/010-dont-run-testprograms.patch | 38 + libs/ortp/Makefile | 75 + libs/ossp-js/Makefile | 119 + libs/pcre/Makefile | 86 + libs/pcre/patches/750-pcre_config_cross.patch | 26 + libs/phidget21/Makefile | 85 + libs/poco/Makefile | 58 + libs/poco/patches/100-sharedmemory.patch | 26 + libs/polarssl/Makefile | 82 + libs/polarssl/patches/100-shared.patch | 11 + libs/polarssl/patches/110-make.patch | 20 + libs/popt/Makefile | 59 + libs/popt/patches/002-no-intl.patch | 81 + libs/postgresql/Makefile | 243 + libs/postgresql/files/postgresql.config | 5 + libs/postgresql/files/postgresql.init | 93 + libs/postgresql/patches/200-ranlib.patch | 10 + .../patches/800-busybox-default-pager.patch | 13 + libs/protobuf/Makefile | 74 + libs/pthsem/Makefile | 58 + libs/ptlib/Makefile | 109 + libs/ptlib/patches/010-fix-gcc_4_3-compile.patch | 13 + libs/pwlib/Makefile | 90 + libs/pwlib/patches/002-lib_mak.patch | 11 + libs/radiusclient-ng/Makefile | 96 + .../patches/001-cross_compile.patch | 48 + libs/radlib/Makefile | 48 + libs/radlib/patches/001-cross_link_bug.patch | 44 + libs/rblibtorrent/Makefile | 77 + .../patches/enable-shared-linking.patch | 11 + libs/re/Makefile | 67 + libs/rrdtool-1.0.x/Makefile | 131 + .../patches/001-no_ordering_cd_joke.patch | 21 + libs/rrdtool-1.0.x/patches/002-no_timezone.patch | 24 + libs/sctp/Makefile | 61 + libs/serdisplib/Makefile | 57 + libs/slang2/Makefile | 97 + libs/slang2/files/ncurses5-config | 6 + libs/spandsp/Makefile | 47 + libs/spandsp/patches/100-compile-fixes.patch | 13 + libs/speex/Makefile | 104 + libs/sqlite2/Makefile | 101 + libs/sqlite3/Makefile | 101 + libs/st2205tool/Makefile | 59 + libs/st2205tool/patches/100-base-makefile.patch | 45 + libs/st2205tool/patches/110-libst-makefile.patch | 25 + libs/st2205tool/patches/120-setpic-makefile.patch | 18 + libs/sysfsutils/Makefile | 70 + libs/sysfsutils/patches/200-mnt_path_check.patch | 55 + libs/taglib/Makefile | 72 + libs/taglib/patches/100-uclibc++-compat.patch | 49 + libs/tcp_wrappers/Makefile | 61 + libs/tcp_wrappers/patches/001-debian_subset.patch | 936 + libs/tcp_wrappers/patches/002-opt_cflags.patch | 12 + .../tcp_wrappers/patches/003-scaffold_malloc.patch | 17 + libs/tcp_wrappers/patches/004-ipv4_prefix.patch | 72 + libs/tiff/Makefile | 109 + libs/tokyocabinet/Makefile | 62 + .../100-remove_extra_paths_from_configure.patch | 75 + libs/ucl/Makefile | 57 + libs/ucl/patches/001-autoconf-compat.patch | 11 + libs/uclibc++/Makefile | 87 + libs/uclibc++/files/config.default | 58 + libs/uclibc++/patches/001-path_to_make.patch | 30 + libs/uclibc++/patches/002-path_to_bash.patch | 12 + libs/uclibc++/patches/003-cp_command.patch | 19 + libs/uclibc++/patches/004-ccache_fixes.patch | 24 + libs/uclibc++/patches/005-wrapper.patch | 12 + libs/uclibc++/patches/006-eabi_fix.patch | 42 + libs/uclibc++/patches/007-numeric_limits.patch | 66 + libs/uclibc++/patches/008-integer_width.patch | 314 + libs/uclibc++/patches/009-compile_fixes.patch | 70 + .../uclibc++/patches/900-dependent_exception.patch | 68 + libs/ustl/Makefile | 63 + libs/ustl/files/Common.mk | 74 + libs/ustl/files/config.h | 286 + libs/ustl/patches/001-install-DESTDIR.patch | 56 + libs/ustl/patches/002-install_path.patch | 12 + .../patches/003-fix_stream_bounds_check_dep.patch | 54 + libs/vips/Makefile | 72 + libs/vips/patches/001-no_cpp.patch | 146 + libs/wxbase/Makefile | 133 + libs/xmlrpc-c/Makefile | 244 + libs/xmlrpc-c/patches/001-config.mk.in.patch | 11 + libs/xmlrpc-c/patches/002-automake-compat.patch | 13 + libs/xmpp4r/Makefile | 46 + libs/zaptel-1.4.x/Makefile | 172 + libs/zaptel-1.4.x/files/10-create-device-node | 9 + .../patches/002-upstream_hrtimer.patch | 52 + .../patches/100-no_hrtimer_on_x86_only.patch | 22 + libs/zaptel-1.4.x/patches/200-Makefile-pwd.patch | 14 + libs/zaptel-1.4.x/patches/330-uname_m.patch | 15 + libs/zaptel-1.4.x/patches/340-2.6.32.patch | 16 + libs/zaptel-1.4.x/patches/350-2.6.34.patch | 14 + libs/zaptel-1.4.x/patches/360-slab.patch | 38 + libs/zaptel-1.4.x/patches/370-2.6.36.patch | 39 + libs/zaptel/Makefile | 59 + .../patches/110-Makefile-tonezone_install.patch | 19 + mail/dovecot/Makefile | 114 + mail/dovecot/files/dovecot.init | 20 + mail/dovecot/patches/001-configure_in.patch | 31 + mail/dovecot/patches/002-example_conf.patch | 87 + mail/fetchmail/Makefile | 83 + mail/imapfilter/Makefile | 69 + mail/imapfilter/patches/010-pathnames.patch | 31 + mail/mini_sendmail/Makefile | 48 + mail/mini_sendmail/patches/200-fullname.patch | 36 + mail/mini_sendmail/patches/500-flags.patch | 17 + mail/msmtp/Makefile | 107 + mail/mutt/Makefile | 48 + mail/mutt/patches/001-no_po_and_docs.patch | 11 + mail/nullmailer/Makefile | 55 + mail/procmail/Makefile | 44 + mail/procmail/patches/001-procmail_openwrt.patch | 51 + mail/ssmtp/Makefile | 61 + mail/xmail/Makefile | 56 + mail/xmail/files/xmail.config | 111 + mail/xmail/files/xmail.init | 221 + mail/xmail/patches/010-Makefile.common.patch | 21 + mail/xmail/patches/020-Makefile.lnx.patch | 15 + mail/xmail/patches/030-sysmachine.patch | 28 + mail/xmail/patches/040-honour_opt_flags.patch | 15 + multimedia/crtmpserver/Makefile | 83 + .../patches/010-link-crypt-for-lua.patch | 11 + multimedia/crtmpserver/patches/020-add-rpath.patch | 15 + .../crtmpserver/patches/030-default-config.patch | 37 + .../crtmpserver/patches/040-use-select.patch | 11 + multimedia/ffmpeg/Config.in | 325 + multimedia/ffmpeg/Makefile | 300 + .../ffmpeg/patches/901-fix_libswscale_on_x86.patch | 35 + multimedia/fswebcam/Makefile | 45 + multimedia/ftpd-topfield/Makefile | 38 + multimedia/ftpd-topfield/files/ftpd-topfield.conf | 4 + multimedia/ftpd-topfield/files/ftpd-topfield.sh | 35 + .../patches/001-kernel_header_rename.patch | 14 + multimedia/gmediaserver/Makefile | 63 + multimedia/gmediaserver/files/gmediaserver.config | 3 + multimedia/gmediaserver/files/gmediaserver.init | 27 + .../gmediaserver/patches/010-compile-fixes.patch | 144 + multimedia/gphoto2/Makefile | 53 + .../gphoto2/patches/001-automake-compat.patch | 10 + .../patches/002-disable-docs-translations.patch | 45 + multimedia/gphoto2/patches/100-gpdebug.patch | 11 + multimedia/graphicsmagick/Makefile | 97 + multimedia/gst-ffmpeg/Config.in | 269 + multimedia/gst-ffmpeg/Makefile | 170 + multimedia/gst-plugins-bad/Makefile | 221 + .../gst-plugins-bad/patches/000-gettext.patch | 23 + multimedia/gst-plugins-base/Makefile | 213 + .../gst-plugins-base/patches/001-no_docs.patch | 34 + .../gst-plugins-base/patches/002-no_tests.patch | 36 + .../patches/003-no_translations.patch | 46 + multimedia/gst-plugins-good/Makefile | 174 + .../gst-plugins-good/patches/001-no_docs.patch | 20 + .../gst-plugins-good/patches/002-no_tests.patch | 20 + .../patches/003-no_translations.patch | 30 + multimedia/gst-plugins-ugly/Makefile | 125 + .../gst-plugins-ugly/patches/001-no_docs.patch | 22 + .../gst-plugins-ugly/patches/002-no_tests.patch | 22 + .../patches/003-no_translations.patch | 32 + multimedia/gstreamer/Makefile | 198 + multimedia/gstreamer/patches/001-no_docs.patch | 36 + multimedia/gstreamer/patches/002-no_tests.patch | 39 + .../gstreamer/patches/003-no_translations.patch | 45 + multimedia/hasciicam/Makefile | 42 + multimedia/icecast/Makefile | 87 + multimedia/icecast/libvorbisidec.mk | 41 + .../icecast/patches/001-icecast-2.3.0-tremor.patch | 159 + .../patches/010-fix_libcurl_test_crap.patch | 11 + multimedia/imagemagick/Makefile | 149 + multimedia/kissdx/Makefile | 55 + multimedia/kissdx/files/kissdx.config | 32 + multimedia/kissdx/files/kissdx.init | 106 + multimedia/kissdx/patches/001-cross_compile.patch | 15 + multimedia/linux-uvc/Makefile | 42 + multimedia/minidlna/Makefile | 55 + multimedia/minidlna/files/minidlna.init | 15 + .../minidlna/patches/010-genconfig-checks.patch | 41 + .../minidlna/patches/020-makefile-tweaks.patch | 46 + .../minidlna/patches/030-missing-include.patch | 10 + .../minidlna/patches/040-configuration-tweak.patch | 33 + multimedia/mjpg-streamer/Makefile | 51 + .../mjpg-streamer/files/mjpg-streamer.config | 6 + .../mjpg-streamer/files/mjpg-streamer.hotplug | 11 + multimedia/mjpg-streamer/files/mjpg-streamer.init | 23 + multimedia/mocp/Makefile | 52 + multimedia/motion/Makefile | 49 + multimedia/motion/patches/002-honor_cppflags.patch | 19 + multimedia/nw802-2.4/Makefile | 44 + .../nw802-2.4/patches/001-linux_2_6_cvs.patch | 2980 +++ multimedia/nw802-2.4/patches/100-compile_fix.patch | 134 + multimedia/ov51x-jpeg/Makefile | 75 + .../ov51x-jpeg/patches/100-compile_fix.patch | 20 + multimedia/palantir/Makefile | 62 + multimedia/palantir/patches/001-opt_flags.patch | 26 + multimedia/peercast/Makefile | 63 + multimedia/peercast/files/peercast.ini | 81 + multimedia/peercast/files/peercast.init | 14 + multimedia/puppy/Makefile | 36 + multimedia/qc-usb/Makefile | 91 + multimedia/qc-usb/patches/001-linux_2_6.patch | 44 + .../qc-usb/patches/002-qc_set_cross_compile.patch | 11 + multimedia/qc-usb/patches/003-linux_2_6_27.patch | 25 + multimedia/qc-usb/patches/004-linux_2_6_28.patch | 108 + multimedia/spca5xx-le/Makefile | 40 + .../spca5xx-le/patches/100-compile_pud_shift.patch | 21 + multimedia/spca5xx-le/patches/101-linux_2_6.patch | 13 + multimedia/spca5xx-view/Makefile | 50 + multimedia/spca5xx-view/files/servfox.config | 4 + multimedia/spca5xx-view/files/servfox.init | 31 + multimedia/spcaview/Makefile | 40 + multimedia/spcaview/patches/001-gcc.patch | 16 + multimedia/ushare/Makefile | 74 + multimedia/ushare/files/ushare.config | 9 + multimedia/ushare/files/ushare.init | 58 + .../ushare/patches/100-configure_grep_fix.patch | 12 + multimedia/ushare/patches/200-compile-fixes.patch | 202 + net/aircrack-ng/Makefile | 52 + .../100-add-ignore-channel-negative-1.patch | 52 + net/aircrack-ptw/Makefile | 45 + net/aircrack-ptw/patches/001-smaller.patch | 12 + net/airpwn/Makefile | 70 + net/amule/Makefile | 86 + net/amule/patches/001-no_backtrace.patch | 11 + net/amwall/Makefile | 52 + net/amwall/patches/010-compile_fix.patch | 21 + net/aodv-uu/Makefile | 104 + net/aodv-uu/files/aodv-uu.modules | 1 + net/aodv-uu/patches/001-normalize.patch | 64 + ...02-linux_2.6.19_ip_route_me_harder_change.patch | 49 + ...linux_2.6.19_security_netlink_recv_change.patch | 16 + .../patches/004-linux_2.6.19_includes.patch | 28 + net/aodv-uu/patches/005-linux_2.6.22_skbuff.patch | 164 + net/aoetools/Makefile | 47 + net/apache/Makefile | 164 + net/apache/patches/001-Makefile_in.patch | 14 + net/apache/patches/002-test_char_h.patch | 26 + net/apache/patches/003-logdir_fix.patch | 33 + net/apache/patches/004-pidfile_fix.patch | 11 + net/apache/patches/005-httpd_conf.patch | 60 + net/apcupsd/Makefile | 64 + net/apcupsd/files/apccontrol | 146 + net/apcupsd/files/apcupsd.conf | 322 + net/apcupsd/files/apcupsd.init | 12 + net/apcupsd/files/apcupsd_mail.conf | 7 + net/apcupsd/files/changeme | 17 + net/apcupsd/files/commfailure | 17 + net/apcupsd/files/commok | 17 + net/apcupsd/files/offbattery | 17 + net/apcupsd/files/onbattery | 17 + net/apcupsd/patches/010-fix-include-paths.patch | 13 + net/apf/Makefile | 41 + net/appweb/Makefile | 72 + net/aprx/Makefile | 48 + net/aprx/files/aprx.init | 23 + net/aprx/patches/100-Makefile_in.patch | 27 + net/arpd/Makefile | 54 + net/arpd/patches/001-configure_no_bpf.patch | 12 + net/arpd/patches/002-function_string.patch | 42 + net/arpd/patches/003-pcap_and_arg.patch | 76 + net/arpd/patches/004-no_dnet_config_check.patch | 12 + .../005-remove-dropped-libevent-features.patch | 29 + net/arpwatch/Makefile | 62 + net/arpwatch/files/arpwatch.init | 10 + net/asterisk-1.8.x/Makefile | 564 + net/asterisk-1.8.x/files/asterisk.default | 4 + net/asterisk-1.8.x/files/asterisk.init | 21 + .../patches/100-build_tools-iconv.patch | 11 + .../patches/200-addons-defaultenable.patch | 66 + .../patches/300-word_alignment_arm.patch | 20 + net/asterisk-1.8.x/patches/400-gtalk.patch | 12 + net/atftp/Makefile | 60 + net/atftp/patches/100-mconfig.patch | 21 + net/atftp/patches/110-services.patch | 79 + net/atftp/patches/120-retry_setting.patch | 121 + net/atftp/patches/130-missing_include.patch | 21 + net/autossh/Makefile | 46 + net/autossh/files/autossh.config | 4 + net/autossh/files/autossh.hotplug | 14 + net/autossh/files/autossh.init | 25 + net/axel/Makefile | 56 + net/babel/Makefile | 59 + net/babel/files/babeld.conf | 40 + net/babel/files/babeld.config | 70 + net/babel/files/babeld.init | 136 + net/babel/patches/001-fix-local_notify_route.patch | 18 + net/bahamut/Makefile | 58 + net/bahamut/patches/001-cross_compile.patch | 71 + net/bahamut/patches/002-glibc_fix.patch | 37 + net/bahamut/patches/010-dont-use-host-zlib.patch | 16 + net/baresip/Config.in | 66 + net/baresip/Makefile | 97 + net/baresip/files/baresip.init | 19 + net/batman-adv/Config.in | 13 + net/batman-adv/Makefile | 121 + net/batman-adv/files/etc/config/batman-adv | 13 + net/batman-adv/files/etc/init.d/batman-adv | 124 + net/batman/Makefile | 144 + net/batman/files/etc/config/batmand | 12 + net/batman/files/etc/config/vis | 3 + net/batman/files/etc/init.d/batmand | 66 + net/batman/files/etc/init.d/vis | 19 + net/batman/patches/100-2.6.36.patch | 47 + net/bind/Makefile | 176 + net/bind/files/bind/db.0 | 12 + net/bind/files/bind/db.127 | 13 + net/bind/files/bind/db.255 | 12 + net/bind/files/bind/db.local | 13 + net/bind/files/bind/db.root | 45 + net/bind/files/bind/named.conf.example | 45 + net/bind/files/named.init | 40 + net/bind/patches/001-automake-cross.patch | 186 + net/bind/patches/100-cross_compile.patch | 96 + net/bing/Makefile | 41 + net/bird/Makefile | 155 + net/bird/files/bird4.conf | 121 + net/bird/files/bird4.init | 22 + net/bird/files/bird4loop | 12 + net/bird/files/bird6.conf | 121 + net/bird/files/bird6.init | 22 + net/bird/files/bird6loop | 12 + net/bird/patches/0001-change_config_name.patch | 20 + net/bitchx/Makefile | 70 + net/bitchx/files/bitchxrc | 2 + net/bitchx/files/bitchxrc.init | 11 + net/bitchx/patches/001-fix_declarations.patch | 24 + net/bitchx/patches/002-tparm.patch | 10 + net/bitlbee/Makefile | 88 + net/bitlbee/files/bitlbee.init | 12 + .../patches/100-cross_compile_configure_fix | 98 + net/bmon/Makefile | 49 + net/bmon/patches/001-bugfixes.patch | 26 + net/bmx6/Makefile | 102 + net/bmx6/files/etc/config/bmx6 | 23 + net/bmx6/files/etc/init.d/bmx6 | 20 + net/bmxd/Makefile | 75 + net/bmxd/files/etc/config/bmxd | 9 + net/bmxd/files/etc/init.d/bmxd | 51 + net/btpd/Makefile | 58 + net/btpd/files/btpd.config | 7 + net/btpd/files/btpd.init | 67 + net/btpd/patches/000-sha1.diff | 731 + net/btpd/patches/001-gettime.patch | 11 + net/btpd/patches/002-config.h.patch | 13 + net/btpd/patches/100-clock.diff | 4 + net/bwm/Makefile | 38 + net/bwm/patches/001-debian.patch | 45 + net/bwping/Makefile | 41 + net/cbtt/Makefile | 83 + net/cbtt/patches/100-compile.patch | 35 + net/cdp/Makefile | 52 + net/cdp/patches/001-compile_fixes.patch | 13 + net/chaosvpn/Makefile | 47 + net/chaosvpn/files/chaosvpn.hotplug | 3 + net/chaosvpn/files/chaosvpn.init | 17 + net/chaosvpn/files/chaosvpn_config.sh | 14 + net/chaosvpn/patches/001-dist-makefile.patch | 30 + net/chillispot/Makefile | 57 + net/chillispot/files/chillispot.init | 19 + net/chillispot/patches/001-endian_fix.patch | 135 + .../patches/102-less_memory-footprint.patch | 12 + net/chillispot/patches/110-macallowed_fix.patch | 21 + .../patches/120-fix_bufferoverflow.patch | 11 + .../patches/150-chillispot-rmtctrl.patch | 1529 ++ net/chillispot/patches/200-gcc_fix.patch | 57 + net/chrony/Makefile | 71 + net/chrony/files/chrony.conf | 17 + net/chrony/files/chrony.keys | 1 + net/chrony/files/ntpd.config | 6 + net/chrony/files/ntpd.hotplug | 21 + net/chrony/files/ntpd.init | 65 + net/chrony/patches/001-crosscompile.patch | 25 + net/click/Makefile | 75 + net/click/files/roofnet.init | 15 + net/click/patches/100-compile_fix.patch | 22 + net/click/patches/110-multithread_fix.patch | 12 + net/cmdftp/Makefile | 46 + net/conntrack-tools/Makefile | 59 + net/coova-chilli/Makefile | 57 + net/corkscrew/Makefile | 37 + net/crowdcontrol/Makefile | 48 + net/ctorrent/Makefile | 85 + net/ctorrent/patches/100-CVE-2009-1759.patch | 364 + net/cups-bjnp/Makefile | 47 + net/cups/Makefile | 119 + net/cups/files/cupsd.init | 14 + net/cups/files/etc/cups/classes.conf | 7 + net/cups/files/etc/cups/client.conf | 9 + net/cups/files/etc/cups/cupsd.conf | 47 + net/cups/files/etc/cups/printers.conf | 23 + net/cups/patches/100-makefile-targets.patch | 13 + net/cups/patches/140-uname.patch | 11 + net/cups/patches/150-64bit_host_fix.patch | 64 + net/cups/patches/160-ppdc.patch | 16 + net/curlftpfs/Makefile | 49 + net/curlftpfs/patches/001-uclibc_mod.patch | 37 + net/cutter/Makefile | 42 + net/dansguardian/Makefile | 63 + net/dansguardian/patches/001-include_dir.patch | 29 + net/dante/Makefile | 108 + net/dante/patches/001-automake-compat.patch | 482 + net/dante/patches/100-do-not-use-defdname.patch | 42 + net/dante/patches/200-fix-RTLD_NEXT.patch | 36 + net/darkstat/Makefile | 61 + net/darkstat/files/darkstat.conf | 4 + net/darkstat/files/darkstat.init | 35 + net/ddns-scripts/Makefile | 42 + net/ddns-scripts/files/etc/config/ddns | 92 + net/ddns-scripts/files/etc/hotplug.d/iface/25-ddns | 9 + .../files/usr/lib/ddns/dynamic_dns_functions.sh | 136 + .../files/usr/lib/ddns/dynamic_dns_updater.sh | 324 + net/ddns-scripts/files/usr/lib/ddns/services | 42 + net/ddns-scripts/files/usr/lib/ddns/url_escape.sed | 25 + net/deluge/Makefile | 111 + net/deluge/files/deluge.config | 5 + net/deluge/files/deluge.init | 60 + net/dhcp-forwarder/Makefile | 53 + net/dhcp-forwarder/files/dhcp-fwd.init | 18 + net/dhcp/Makefile | 78 + net/dhcp/files/dhcpd.init | 101 + net/dhcp/patches/100-portability.patch | 22 + net/dhcp/patches/110-omit-docs.patch | 159 + net/dhcpcd/Makefile | 41 + net/dhcpcd/patches/001-run_dir.patch | 11 + net/dircproxy/Makefile | 37 + net/ditg/Makefile | 62 + net/ditg/patches/001-no_stropts.h | 11 + net/djbdns/Changelog | 43 + net/djbdns/Makefile | 204 + net/djbdns/README | 319 + net/djbdns/files/axfrdns.init | 74 + net/djbdns/files/axfrdns/tcp | 5 + net/djbdns/files/djbdns.conf | 41 + net/djbdns/files/dnscache.init | 123 + net/djbdns/files/dnscache/dnsroots.global | 0 net/djbdns/files/dnscache/ignoreip-update | 95 + net/djbdns/files/dnscache/servers/@ | 0 net/djbdns/files/dnsqrx | 9 + net/djbdns/files/dnsroots-update | 9 + net/djbdns/files/rbldns.init | 68 + net/djbdns/files/rbldns/data | 5 + net/djbdns/files/tinydns.init | 64 + net/djbdns/files/tinydns/add-alias | 2 + net/djbdns/files/tinydns/add-childns | 2 + net/djbdns/files/tinydns/add-host | 2 + net/djbdns/files/tinydns/add-mx | 2 + net/djbdns/files/tinydns/add-ns | 2 + net/djbdns/files/tinydns/data | 59 + net/djbdns/files/walldns.init | 62 + net/djbdns/patches/010-crosscompile.patch | 170 + net/djbdns/patches/020-dnsroots-update.patch | 19 + .../patches/030-srv-records-and-axfrget.patch | 135 + .../patches/040-dnscache-less-chatty-log.patch | 39 + net/djbdns/patches/050-tinydns-mmap-leak.patch | 22 + .../patches/060-dnscache-big-udp-packets.patch | 11 + .../patches/070-dnscache-dpos-tcp-servfail.patch | 10 + .../patches/080-dnscache-cache-negatives.patch | 41 + net/djbdns/patches/090-tinydns-one-second.patch | 40 + net/djbdns/patches/110-dnscache-cachestats.patch | 89 + .../patches/120-compiler-temporary-filename.patch | 93 + .../patches/140-dnsnamex-extra-command.patch | 156 + .../patches/200-dnscache-cname-handling.patch | 226 + .../patches/210-dnscache-strict-forwardonly.patch | 47 + .../patches/220-dnscacheip-space-separator.patch | 11 + .../patches/230-tinydns-data-semantic-error.patch | 194 + .../240-tinydns-alias-chain-truncation.patch | 87 + net/djbdns/patches/250-dnscache-slogging.patch | 122 + net/djbdns/patches/260-dnsfilter-replace.patch | 71 + net/djbdns/patches/270-dnscache-sigpipe-fix.patch | 16 + net/djbdns/patches/280-dnscache-ignoreip2.patch | 117 + .../300-bugfix-dnscache-dempsky-poison.patch | 11 + ...0-bugfix-dnscache-merge-outgoing-requests.patch | 328 + .../320-bugfix-dnscache-cache-soa-records.patch | 67 + net/dmapd/Makefile | 61 + net/dmapd/files/dmapd.init | 16 + net/dmapd/patches/001-dmapd_conf.patch | 10 + net/dsl-qos-queue/Makefile | 49 + net/dsl-qos-queue/patches/001-cross_compile.patch | 40 + net/dsl-qos-queue/patches/002-include.patch | 20 + net/dsl-qos-queue/patches/010-ports_fix.patch | 22 + .../patches/020-fix_shebang_line.patch | 8 + net/dsniff/Makefile | 62 + net/dsniff/patches/001-arpspoof_fix.patch | 53 + net/dsniff/patches/001-dns.patch | 704 + net/dsniff/patches/003-gdbm.patch | 206 + net/dsniff/patches/004-no_yp.patch | 45 + net/dsniff/patches/005-openssl_fix.patch | 11 + net/dsniff/patches/006-pcap_header.patch | 13 + net/dsniff/patches/007-time_h.patch | 22 + net/dsniff/patches/008-md5_include.patch | 13 + net/dsniff/patches/010-clk-tck-fix.patch | 15 + net/dudders/Makefile | 66 + net/dudders/files/dudders.conf | 7 + net/dudders/files/dudders.hotplug | 46 + net/e169-stats/Makefile | 37 + net/e169-stats/patches/01-make.patch | 11 + net/ekg/Makefile | 51 + net/ekg/patches/100-compile-fixes.patch | 62 + net/elinks/Makefile | 92 + net/elinks/patches/002-fix_avr32_compile | 20 + net/et131x/Makefile | 58 + net/etherpuppet/Makefile | 50 + net/etherwake/Makefile | 50 + net/etherwake/files/etherwake.config | 28 + net/etherwake/files/etherwake.init | 132 + net/etherwake/patches/100-no_ether_hostton.patch | 37 + net/ethtool/Makefile | 41 + net/ethtool/patches/110-ixp4xx.patch | 198 + net/ettercap/Makefile | 75 + net/ettercap/patches/001-cross_compiling.patch | 23 + .../patches/002-libnet_check_honor_ldflags.patch | 24 + net/ettercap/patches/003-automake-compat.patch | 34 + net/ez-ipupdate/Makefile | 44 + net/ez-ipupdate/files/ez-ipupdate.config | 14 + net/ez-ipupdate/files/ez-ipupdate.hotplug | 83 + net/ez-ipupdate/files/ez-ipupdate.init | 18 + net/ez-ipupdate/patches/001-debian_subset.patch | 568 + .../patches/002-ez_ipupdate_everydns.patch | 209 + net/ez-ipupdate/patches/003-dnsexit.patch | 263 + net/ez-ipupdate/patches/004-zoneedit.patch | 12 + net/faifa/Makefile | 58 + net/flow-tools/Makefile | 43 + .../patches/001-cross_compile_configure_fix.patch | 11 + net/flow-tools/patches/002-flex_lib.patch | 46 + .../patches/010-python_script_location_fix.patch | 30 + .../patches/020-invalid_lvalue_in_assignment.patch | 171 + .../patches/030-avoid_external_debug_var.patch | 13 + .../patches/050-fix-64bit_temp_time_t.patch | 41 + .../060-fix_uninitialized_var_in_flow_send.patch | 13 + .../patches/070-extra_ftpdu_verify_debugging.patch | 49 + .../080-fix_uninitialized_var_in_flow_export.patch | 13 + net/fping/Makefile | 61 + net/fping/patches/001-debian.patch | 165 + net/fprobe-ulog/Makefile | 50 + net/fprobe/Makefile | 47 + net/freepops/Makefile | 67 + net/freeradius/Makefile | 405 + net/freeradius/files/radiusd.init | 19 + net/freeradius/patches/001-automake-compat.patch | 633 + net/freeradius/patches/002-config.patch | 300 + net/freeradius/patches/004-ldap_configure.patch | 4152 +++ .../patches/005-create_libdir_at_install.patch | 10 + .../patches/007-no_openssl_engine_check.patch | 22 + net/freeradius/patches/008-honor_ccpflags.patch | 15 + net/freeradius/patches/009-no_pie.patch | 11 + net/freeradius2/Makefile | 577 + net/freeradius2/files/radiusd.init | 22 + net/freeradius2/patches/002-config.patch | 588 + net/freeradius2/patches/004-ldap_configure.patch | 4253 +++ net/freeradius2/patches/008-honor_ccpflags.patch | 15 + net/freeradius2/patches/009-sql_sqlite_c.patch | 14 + net/freeswitch/Makefile | 644 + .../etc.minimal/autoload_configs/acl.conf.xml | 32 + .../autoload_configs/callcenter.conf.xml | 38 + .../etc.minimal/autoload_configs/console.conf.xml | 56 + .../autoload_configs/event_socket.conf.xml | 9 + .../autoload_configs/local_stream.conf.xml | 49 + .../etc.minimal/autoload_configs/lua.conf.xml | 30 + .../etc.minimal/autoload_configs/modules.conf.xml | 126 + .../autoload_configs/post_load_modules.conf.xml | 4 + .../etc.minimal/autoload_configs/sofia.conf.xml | 18 + .../etc.minimal/autoload_configs/spandsp.conf.xml | 73 + .../etc.minimal/autoload_configs/switch.conf.xml | 123 + .../autoload_configs/timezones.conf.xml | 551 + .../files/etc.minimal/dialplan/default.xml | 162 + .../files/etc.minimal/dialplan/default/PLACEHOLDER | 0 .../files/etc.minimal/dialplan/public.xml | 68 + .../files/etc.minimal/dialplan/public/PLACEHOLDER | 0 .../files/etc.minimal/directory/default.xml | 43 + .../files/etc.minimal/directory/default/1000.xml | 18 + .../files/etc.minimal/directory/default/1001.xml | 18 + .../files/etc.minimal/directory/default/1002.xml | 18 + .../files/etc.minimal/directory/default/1003.xml | 18 + .../files/etc.minimal/directory/default/1004.xml | 18 + .../etc.minimal/directory/default/default.xml | 26 + net/freeswitch/files/etc.minimal/freeswitch.xml | 70 + net/freeswitch/files/etc.minimal/fur_elise.ttml | 83 + .../files/etc.minimal/jingle_profiles/client.xml | 32 + .../files/etc.minimal/jingle_profiles/server.xml | 21 + net/freeswitch/files/etc.minimal/mime.types | 983 + .../files/etc.minimal/sip_profiles/external.xml | 78 + .../etc.minimal/sip_profiles/external/example.xml | 38 + .../files/etc.minimal/sip_profiles/internal.xml | 296 + .../etc.minimal/sip_profiles/internal/example.xml | 36 + net/freeswitch/files/etc.minimal/tetris.ttml | 69 + net/freeswitch/files/etc.minimal/tones.conf | 63 + net/freeswitch/files/etc.minimal/vars.xml | 203 + .../cdr_csv/autoload_configs/cdr_csv.conf.xml | 22 + .../autoload_configs/cdr_pg_csv.conf.xml | 40 + .../logfile/autoload_configs/logfile.conf.xml | 26 + .../rtmp/autoload_configs/rtmp.conf.xml | 17 + .../files/etc.packages/say-de/lang/de/de.xml | 7 + .../etc.packages/say-de/lang/de/demo/demo.xml | 71 + .../files/etc.packages/say-de/lang/de/vm/tts.xml | 214 + .../etc.packages/say-en/lang/en/demo/demo-ivr.xml | 148 + .../etc.packages/say-en/lang/en/demo/demo.xml | 71 + .../etc.packages/say-en/lang/en/dir/sounds.xml | 121 + .../files/etc.packages/say-en/lang/en/dir/tts.xml | 96 + .../files/etc.packages/say-en/lang/en/en.xml | 8 + .../etc.packages/say-en/lang/en/vm/sounds.xml | 381 + .../files/etc.packages/say-en/lang/en/vm/tts.xml | 239 + .../etc.packages/say-fr/lang/fr/demo/demo.xml | 18 + .../etc.packages/say-fr/lang/fr/dir/sounds.xml | 121 + .../files/etc.packages/say-fr/lang/fr/dir/tts.xml | 101 + .../files/etc.packages/say-fr/lang/fr/fr.xml | 8 + .../etc.packages/say-fr/lang/fr/vm/sounds.xml | 246 + .../etc.packages/say-ru/lang/ru/demo/demo-ivr.xml | 145 + .../etc.packages/say-ru/lang/ru/demo/demo.xml | 100 + .../etc.packages/say-ru/lang/ru/dir/sounds.xml | 121 + .../files/etc.packages/say-ru/lang/ru/dir/tts.xml | 96 + .../files/etc.packages/say-ru/lang/ru/ru.xml | 9 + .../etc.packages/say-ru/lang/ru/vm/sounds.xml | 365 + .../files/etc.packages/say-ru/lang/ru/vm/tts.xml | 239 + .../syslog/autoload_configs/syslog.conf.xml | 18 + .../autoload_configs/tts_commandline.conf.xml | 15 + .../voicemail/autoload_configs/voicemail.conf.xml | 67 + .../xml-cdr/autoload_configs/xml_cdr.conf.xml | 71 + net/freeswitch/files/freeswitch.config | 11 + net/freeswitch/files/freeswitch.default | 11 + net/freeswitch/files/freeswitch.hotplug | 65 + net/freeswitch/files/freeswitch.init | 40 + net/freeswitch/patches/001-Makefile.am.patch | 20 + net/freeswitch/patches/002-libs-esl-Makefile.patch | 22 + ...mod-event_handlers-mod_event_zmq-Makefile.patch | 10 + .../patches/004-build-modules_conf_in.patch | 10 + ...c-mod-applications-mod_mp4-mp4_helper_hpp.patch | 13 + net/frickin/Makefile | 54 + net/frickin/files/frickin.default | 16 + net/frickin/files/frickin.init | 16 + net/gesftpserver/Makefile | 53 + net/git/Makefile | 70 + net/git/patches/110-convert_builtin.patch | 276 + net/gpsd/Makefile | 74 + net/gpsd/files/gpsd.config | 4 + net/gpsd/files/gpsd.hotplug | 16 + net/gpsd/files/gpsd.init | 30 + net/gpsd/patches/100-cross-compile.patch | 54 + net/haproxy/Makefile | 60 + net/haproxy/files/haproxy.cfg | 99 + net/haproxy/files/haproxy.hotplug | 8 + net/haproxy/files/haproxy.init | 31 + net/hiawatha/Makefile | 59 + net/horst/Makefile | 43 + net/horst/patches/001-endian_fixes.patch | 96 + net/horst/patches/100-compile-fixes.patch | 23 + net/hping3/Makefile | 43 + net/hping3/patches/100-makefile.patch | 48 + net/hping3/patches/101-endianness.patch | 52 + net/hping3/patches/102-lib_rename.patch | 11 + net/htpdate/Makefile | 56 + net/htpdate/files/htpdate.default | 1 + net/htpdate/files/htpdate.init | 19 + net/htpdate/patches/100-adjtimex.patch | 20 + net/httping/Makefile | 44 + net/httping/patches/001-extra_flags.patch | 20 + net/httping/patches/002-version.patch | 29 + net/httptunnel/Makefile | 44 + net/httptunnel/files/httptunnel.conf | 4 + net/httptunnel/files/httptunnel.init | 27 + net/icmptx/Makefile | 46 + net/icmptx/patches/001-cross_compile.patch | 24 + net/ifstat/Makefile | 53 + net/ifstat/patches/001-configure_cross.patch | 913 + net/iftop/Makefile | 40 + net/iftop/patches/001-debian_armeb.patch | 11 + net/iftop/patches/002-debian_frozen_order.patch | 10 + net/iftop/patches/003-debian_arm.patch | 15 + net/iftop/patches/004-debian_bar_display.patch | 11 + net/iftop/patches/005-debian_bar_bytes.patch | 11 + net/igmpproxy/Makefile | 54 + net/igmpproxy/files/igmpproxy.conf | 43 + net/igmpproxy/files/igmpproxy.init | 33 + net/imsnif/Makefile | 56 + net/imsnif/files/imsnif | 16 + net/imsnif/patches/001-openwrt_paths.patch | 62 + net/imspector/Makefile | 85 + net/imspector/files/imspector.config | 112 + net/imspector/files/imspector.init | 65 + .../patches/010-openssl-1.0.0-compat.patch | 14 + net/iodine/Makefile | 65 + net/iodine/files/iodined.config | 5 + net/iodine/files/iodined.init | 22 + net/iodine/patches/010-cross-compile.patch | 22 + net/ipcad/Makefile | 63 + net/ipcad/patches/001-honor_cppflags.patch | 10 + net/ipcad/patches/010-no-host-includes.patch | 16 + net/iperf/Makefile | 85 + ...et-report-next-time-in-single-thread-mode.patch | 14 + net/ipkungfu/Makefile | 80 + .../patches/001-replace-modprobe-with-insmod.patch | 22 + net/ipsec-tools/Makefile | 90 + net/ipsec-tools/patches/001-no_libfl.patch | 22 + .../003-linux_2.6.19_rtnetlink_changes.diff | 20 + net/ipsec-tools/patches/004-opennhrp.patch | 1659 ++ net/iptables-snmp/Makefile | 46 + net/iptables-snmp/patches/001-use_libiptc.patch | 25 + net/iptraf/Makefile | 63 + net/iptraf/patches/001-cross_compile.patch | 23 + net/iptraf/patches/002-ifaces.patch | 281 + net/iptraf/patches/003-exit_menu.patch | 11 + net/iptraf/patches/004-includes_fix.patch | 20 + net/iptraf/patches/005-atheros.patch | 40 + net/iptraf/patches/005-no_size_cmd.patch | 11 + net/ipupdate/Makefile | 66 + net/ipupdate/patches/100-name_conflict.patch | 115 + net/ipupdate/patches/200-byteorder.patch | 11 + net/iputils/Makefile | 179 + net/iputils/patches/001-iputils.patch | 14 + net/iputils/patches/002-fix-ipv6.patch | 14 + net/iputils/patches/003-fix-makefile.patch | 18 + net/iputils/patches/010-ping6_uclibc_resolv.patch | 200 + net/iputils/patches/011-ping6_use_gnu_source.patch | 11 + net/irssi-glib1/Makefile | 51 + .../patches/100-cross_compiling_fix.patch | 61 + net/irssi/Makefile | 92 + net/isakmpd/Makefile | 51 + net/isakmpd/patches/010-debian_3.patch | 1753 ++ net/isakmpd/patches/020-standardize.patch | 154 + net/isakmpd/patches/030-openssl_hashes.patch | 161 + net/isakmpd/patches/040-security_fix.patch | 18 + net/isakmpd/patches/050-ar_cross.patch | 13 + net/jtg/Makefile | 50 + net/kamailio/Makefile | 267 + net/kamailio/files/kamailio.default | 13 + net/kamailio/files/kamailio.init | 19 + net/kamailio/patches/005-config_h.patch | 20 + net/kamailio/patches/007-modules_build.patch | 137 + net/karma/Makefile | 60 + net/keepalived/Makefile | 69 + net/keepalived/files/keepalived.init | 13 + net/kismet/Makefile | 127 + net/kismet/files/ap_manuf | 240 + net/kismet/files/client_manuf | 455 + net/kismet/files/kismet.conf | 287 + net/kismet/files/kismet_drone.conf | 121 + net/kismet/files/kismet_ui.conf | 61 + .../patches/010-dont-add-host-include-paths.patch | 14 + net/knock/Makefile | 92 + net/krb5/Makefile | 127 + net/krb5/files/krb5kdc | 17 + net/krb5/patches/001-krb5kdc-dir-to-etc.patch | 51 + net/krb5/patches/002-MITKRB5-SA-2011-002.patch | 112 + net/l2tpd/Makefile | 61 + net/l2tpd/files/l2tpd.conf | 29 + net/l2tpd/files/l2tpd.init | 18 + net/l2tpd/files/options.l2tpd | 17 + net/l2tpd/patches/001-debian-2.patch | 3394 +++ net/l2tpd/patches/002-debian-2-pty-rev.patch | 21 + net/l2tpd/patches/003-jacco-pty.patch | 1194 + net/l2tpd/patches/004-gcc4.patch | 12 + net/l2tpd/patches/004-nonblock.patch | 26 + net/l2tpd/patches/005-df-disable.patch | 25 + net/l2tpns/Makefile | 61 + .../001-honor_includes_no_fifo_scheduler.patch | 51 + net/l7-protocols/Makefile | 77 + .../patches/100-testing_crosscompile.patch | 27 + net/l7-protocols/patches/101-testing-timeit.patch | 102 + .../patches/102-testing-doallspeeds.patch | 16 + net/leafnode/Makefile | 94 + net/leafnode/files/news | 2 + net/leafnode/files/nntp | 10 + net/lft/Makefile | 71 + net/lft/patches/001-no_strip.patch | 11 + net/lftp/Makefile | 63 + net/lftp/patches/001-libintl.patch | 18 + net/lighttpd/Makefile | 312 + net/lighttpd/files/lighttpd.conf | 231 + net/lighttpd/files/lighttpd.default | 1 + net/lighttpd/files/lighttpd.init | 21 + net/linuxigd/Makefile | 68 + net/linuxigd/files/upnpd.conf | 71 + net/linuxigd/files/upnpd.init | 29 + net/linuxigd/patches/001-iptables_defs.patch | 73 + .../patches/002-netfilter_nat_headers.patch | 16 + net/linuxigd/patches/003-Makefile-fix.patch | 13 + .../patches/004-iptables-1.4.3.2-compat.patch | 101 + net/linuxigd/patches/005-includes.patch | 30 + net/lldpd/Makefile | 59 + net/lldpd/files/lldpd.config | 8 + net/lldpd/files/lldpd.init | 35 + net/lldpd/patches/001-no-multiuser.patch | 41 + net/lsm/Makefile | 54 + net/lsm/files/lsm.conf | 43 + net/lsm/files/lsm.init | 44 + net/lsm/files/lsm_script | 66 + net/mac-to-devinfo/Makefile | 98 + net/mac-to-devinfo/files/clean-devinfo | 26 + net/mac-to-devinfo/files/devinfo-functions.sh | 122 + net/mac-to-devinfo/files/ip-to-devinfo | 80 + net/mac-to-devinfo/files/mac-to-devinfo | 197 + net/mac-to-devinfo/files/macdevdb | 8 + net/mac-to-devinfo/files/mactodevinfo | 2 + net/mac-to-devinfo/files/netdiscover-to-devinfo | 67 + net/mac-to-devinfo/files/netsmap-to-devinfo | 156 + net/mac-to-devinfo/files/prep-devinfo | 31 + net/mac-to-devinfo/files/smap-to-devinfo | 102 + net/madwimax/Makefile | 49 + net/madwimax/files/20-madwimax | 22 + net/madwimax/files/event.sh | 18 + net/madwimax/files/madwimax | 6 + net/madwimax/patches/001-fix_detection_on_be.patch | 33 + net/maradns/Makefile | 73 + net/maradns/files/maradns.init | 18 + net/maradns/files/mararc | 9 + net/maradns/patches/001-cross_compile_fix.patch | 11 + net/matrixtunnel/Makefile | 53 + net/mdk3/Makefile | 41 + net/mdk3/patches/001-radiotap_needs_types_h.patch | 11 + net/mdk3/patches/010-fix-dependencies.patch | 17 + net/mdnsresponder/Makefile | 99 + net/mdnsresponder/files/mDNSResponder.init | 14 + net/mdnsresponder/patches/001-cross_compile.patch | 125 + net/mdnsresponder/patches/002-uclibc.patch | 21 + net/memcached/Makefile | 56 + net/memcached/files/memcached.config | 6 + net/memcached/files/memcached.init | 24 + net/memcached/patches/100-fix_iov_max.patch | 23 + net/mercurial/Makefile | 50 + net/mercurial/patches/001-no_bzip2.patch | 183 + net/mgen/Makefile | 52 + net/mgen/patches/100-ipv6.patch | 24 + net/miau/Makefile | 57 + net/miau/files/miau.init | 28 + net/miax/Makefile | 51 + net/miax/patches/001-cross.patch | 24 + net/mii-tool/Makefile | 41 + .../patches/001-include_linux_sockios.patch | 12 + net/mini_httpd/Makefile | 189 + net/mini_httpd/files/matrixssl_helper.c | 455 + net/mini_httpd/files/matrixssl_helper.h | 39 + net/mini_httpd/files/mini_httpd-ssl.conf | 7 + net/mini_httpd/files/mini_httpd.conf | 5 + net/mini_httpd/files/mini_httpd.default | 1 + net/mini_httpd/files/mini_httpd.init | 18 + net/mini_httpd/files/mini_httpd.pem | 29 + net/mini_httpd/patches/001-cgi_path.patch | 16 + net/mini_httpd/patches/500-matrixssl.patch | 161 + net/mini_snmpd/Makefile | 64 + net/mini_snmpd/files/mini_snmpd.config | 8 + net/mini_snmpd/files/mini_snmpd.init | 41 + net/mini_snmpd/patches/100-dualstack.patch | 159 + net/mini_snmpd/patches/101-opt_flags.patch | 14 + .../patches/102-mib_fix_uninitialized_memory.patch | 34 + .../103-mib_encode_snmp_element_oid_fix.patch | 21 + net/miniupnpc/Makefile | 72 + net/miniupnpc/patches/100-no_minixml_test.patch | 13 + net/miniupnpc/patches/200-miniupnpc_desc.patch | 11 + net/miniupnpd/Makefile | 56 + net/miniupnpd/files/miniupnpd.firewall.hotplug | 50 + net/miniupnpd/files/miniupnpd.iface.hotplug | 8 + net/miniupnpd/files/miniupnpd.init | 191 + net/miniupnpd/files/upnpd.config | 24 + net/mtr/Makefile | 67 + net/mtr/patches/501-dns.patch | 510 + net/mtr/patches/502-fix-res_ninit.patch | 56 + net/mtr/patches/520-libresolv_fix.patch | 17 + net/mtr/patches/521-gtk_fix.patch | 29 + net/multiwan/Makefile | 42 + net/multiwan/files/etc/config/multiwan | 54 + net/multiwan/files/etc/init.d/multiwan | 20 + net/multiwan/files/usr/bin/multiwan | 1035 + net/mutella/Makefile | 54 + net/mutella/patches/001-no_backtrace.patch | 15 + net/mutella/patches/002-gcc4_fixes.patch | 12 + net/mutella/patches/003-gcc4_3_fixes.patch | 34 + net/mutella/patches/004-no-host-paths.patch | 58 + net/mvprelay/Makefile | 43 + net/n2n/Makefile | 51 + net/n2n/files/n2n.config | 7 + net/n2n/files/n2n.init | 37 + net/natpmp/Makefile | 50 + net/natpmp/files/natpmp.config | 4 + net/natpmp/files/natpmp.init | 63 + net/nbd/Makefile | 52 + net/nbtscan/Makefile | 50 + net/ncftp/Makefile | 68 + net/ndyndns/Makefile | 50 + net/ndyndns/files/ndyndns.conf.sample | 7 + net/ndyndns/files/ndyndns.default | 3 + net/ndyndns/files/ndyndns.init | 18 + .../patches/010-dont-add-host-includes.patch | 24 + net/ndyndns/patches/020-ndyndns.patch | 211 + net/net-snmp/Makefile | 262 + net/net-snmp/files/snmpd.conf | 82 + net/net-snmp/files/snmpd.default | 1 + net/net-snmp/files/snmpd.init | 135 + net/net-snmp/patches/100-debian-statistics.patch | 22 + net/net-snmp/patches/110-debian-makefiles.patch | 40 + net/net-snmp/patches/120-debian-searchdirs.patch | 14 + net/net-snmp/patches/130-debian-extramibs.patch | 6261 +++++ net/net-snmp/patches/140-debian-docfiles.patch | 95 + .../patches/150-debian-defaultconfig.patch | 142 + net/net-snmp/patches/160-no_ldconfig.patch | 12 + net/net-snmp/patches/170-ldflags.patch | 11 + net/net-snmp/patches/750-ieee802dot11.patch | 6156 +++++ net/net-tools/Makefile | 323 + net/net-tools/patches/001-config.patch | 209 + net/net-tools/patches/002-compile-fixes.patch | 74 + net/netatalk/Makefile | 75 + net/netatalk/files/AppleVolumes.default | 2 + net/netatalk/files/AppleVolumes.system | 326 + net/netatalk/files/afpd.conf | 1 + net/netatalk/files/afpd.init | 24 + net/netcat/Makefile | 57 + net/netcat/patches/001-netcat_flag_count.patch | 22 + net/netdiscover/Makefile | 41 + net/netdiscover/patches/00-add-machine-ouput.patch | 467 + net/netdiscover/patches/01-initfix+end-fix.patch | 34 + net/netperf/Makefile | 45 + net/netperf/files/netserver.init | 11 + net/netperf/patches/001-dccp.patch | 38 + net/netpipe/Makefile | 49 + net/netstat-nat/Makefile | 42 + net/nfs-kernel-server/Makefile | 140 + net/nfs-kernel-server/files/nfsd.exports | 1 + net/nfs-kernel-server/files/nfsd.init | 36 + .../patches/001-nfs_utils_uclibc.patch | 35 + .../patches/002-no_ttycom_h.patch | 26 + .../patches/003-no_malloc_h.patch | 10 + net/nfs-server/Makefile | 49 + net/nfs-server/files/nfsd.exports | 1 + net/nfs-server/files/nfsd.init | 16 + net/nfs-server/patches/001-build_config.patch | 67 + net/nfs-server/patches/002-cross_compile_fix.patch | 149 + net/nfs-server/patches/003-debian_subset.patch | 698 + net/nfs-server/patches/004-gcc34_fix.patch | 24 + net/nfs-server/patches/005-remove_warning.patch | 30 + net/nginx/Config.in | 39 + net/nginx/Makefile | 117 + net/nginx/files/nginx.init | 24 + net/nginx/patches/001-feature_test_fix | 136 + net/nginx/patches/002-sizeof_test_fix | 26 + net/ngircd/Makefile | 51 + net/ngrep/Makefile | 53 + net/ngrep/patches/001-makefile_in.patch | 20 + net/ngrep/patches/001-ngrep.patch | 12 + net/nmap/Makefile | 140 + net/nocatauth/Makefile | 65 + net/nocatauth/files/nocatauth-gateway | 14 + net/nocatauth/patches/001-ptp-local.patch | 56 + net/nocatauth/patches/002-openwrt.patch | 30 + net/nocatauth/patches/003-fix-module-loading | 31 + net/nocatauth/patches/004-fw_detect.patch | 55 + net/nocatsplash/Makefile | 58 + net/nocatsplash/patches/001-openwrt_firewall.patch | 19 + net/nodogsplash/Makefile | 75 + net/nodogsplash/files/nodogsplash.init | 176 + net/nprobe/Makefile | 75 + net/nprobe/patches/001-automake-compat.patch | 46 + net/nprobe/patches/002-path_to_pcap.patch | 13 + net/nprobe/patches/003-ipv6_fix.patch | 35 + net/nstx/Makefile | 64 + net/nstx/patches/001-debian_changes.patch | 382 + net/ntpclient/Makefile | 53 + net/ntpclient/files/ntpclient.config | 23 + net/ntpclient/files/ntpclient.hotplug | 78 + net/ntpclient/patches/100-daemon.patch | 24 + net/ntpd/Makefile | 161 + net/ntpd/files/ntp.conf | 27 + net/ntpd/files/ntpd.hotplug | 10 + net/ntpd/files/ntpd.init | 17 + net/ntpd/files/ntpdate.init | 13 + net/nufw/Makefile | 117 + net/nufw/patches/001-no_doc_tests.patch | 23 + net/nufw/patches/002-debian_fixes.patch | 22788 ++++++++++++++++ net/nzbget/Makefile | 72 + net/nzbget/patches/001-openssl-1.0.0-compat.patch | 32 + net/nzbgetweb/Makefile | 66 + net/nzbgetweb/files/httpd.conf | 1 + net/nzbgetweb/files/lib/xmlrpc.inc | 3776 +++ net/nzbgetweb/files/lib/xmlrpc_wrappers.inc | 955 + net/nzbgetweb/files/lib/xmlrpcs.inc | 1246 + net/oidentd/Makefile | 44 + net/oidentd/files/oidentd.init | 11 + net/olsrd/Makefile | 233 + net/olsrd/files/olsrd.config | 26 + net/olsrd/files/olsrd.init | 612 + net/olsrd/files/olsrd_secure_key | 1 + net/olsrd/patches/100-no_forwarding_override.patch | 29 + .../patches/200-txtinfo_gateways_formatting.patch | 20 + .../patches/900-force_copy_olsrd_conf_file.patch | 11 + net/openconnect/Makefile | 55 + .../patches/001-change-openssl-paths.patch | 11 + net/opendchub/Makefile | 44 + net/openl2tp/Makefile | 73 + net/openl2tp/patches/001-makefile.patch | 87 + net/openl2tp/patches/010-ppp_unix.patch | 11 + net/openl2tp/src/l2tp_rpc.h | 1475 ++ net/openl2tp/src/l2tp_rpc_client.c | 426 + net/openl2tp/src/l2tp_rpc_server.c | 665 + net/openl2tp/src/l2tp_rpc_xdr.c | 2957 +++ net/opennhrp/Makefile | 55 + net/opennhrp/files/opennhrp.init | 13 + net/opennhrp/patches/100-compile-fix.patch | 14 + net/openntpd/Makefile | 75 + net/openntpd/files/ntpd.conf | 6 + net/openntpd/files/ntpd.config | 3 + net/openntpd/files/ntpd.hotplug | 12 + net/openntpd/files/ntpd.init | 18 + net/openntpd/patches/001-adjtimex_linux.patch | 178 + net/openntpd/patches/002-save_freq_drift.patch | 92 + net/openntpd/patches/003-no_permission_check.patch | 11 + net/openrrcp/Makefile | 44 + net/openser/Makefile | 339 + net/openser/patches/001-openser_cfg.patch | 33 + net/openser/patches/002-sc.patch | 41 + net/openser/patches/003-makefile_defs.patch | 71 + net/openser/patches/004-cfg_lex.patch | 13 + net/openser/patches/005-config_h.patch | 33 + net/openser/patches/006-sc_dbtext.patch | 22 + net/openser/patches/007-modules_build.patch | 57 + net/opensips/Makefile | 272 + net/opensips/files/opensips.default | 13 + net/opensips/files/opensips.init | 19 + net/opensips/patches/001-no_rej.patch | 21 + net/opensips/patches/005-config_h.patch | 20 + net/opensips/patches/007-modules_build.patch | 102 + net/openslp/Makefile | 50 + net/openslp/files/etc/init.d/slpd | 14 + net/openslp/files/etc/slp.conf | 28 + net/openslp/files/etc/slp.reg | 2 + net/openslp/files/etc/slp.spi | 0 net/openssh/Makefile | 201 + net/openssh/files/sshd.init | 29 + net/openssh/patches/100-no_cast_fix.patch | 12 + net/openssh/patches/110-no_ripemd_fix.patch | 13 + .../patches/130-implicit_memset_decl_fix.patch | 12 + net/openssh/patches/200-dscp-qos.patch | 26 + net/openswan/Makefile | 104 + net/openswan/files/ipsec.init | 211 + net/openswan/patches/110-scripts.patch | 14 + net/openswan/patches/120-no_manpages.patch | 60 + net/openswan/patches/130-compat_net_dev_ops.patch | 19 + net/openswan/patches/140-generated_autoconf.patch | 367 + net/openvpn-devel/Makefile | 65 + net/openvpn-devel/files | 1 + net/openvpn/Makefile | 99 + net/openvpn/files/easy-rsa.index | 0 net/openvpn/files/easy-rsa.serial | 1 + net/openvpn/files/openvpn.config | 398 + net/openvpn/files/openvpn.init | 170 + net/openvpn/files/openvpn.upgrade | 1 + net/openvpn/patches/001-easy_rsa.patch | 192 + net/p910nd/Makefile | 55 + net/p910nd/files/p910nd.conf | 5 + net/p910nd/files/p910nd.init | 50 + net/parprouted/Makefile | 55 + net/parprouted/files/parprouted.default | 1 + net/parprouted/files/parprouted.init | 15 + net/parprouted/patches/001-parprouted.patch | 33 + net/pcapsipdump/Makefile | 48 + net/pcapsipdump/patches/001-cross_compile.patch | 16 + .../patches/002-elif_else_replacement.patch | 12 + net/peerguardian/Makefile | 65 + net/peerguardian/files/peerguardian.init | 12 + .../patches/001-no_host_includes.patch | 13 + net/peerguardian/patches/002-new_libipq.patch | 32 + .../patches/003-gcc_4_3-compile-fix.patch | 20 + net/pen/Makefile | 58 + net/pepperspot/Makefile | 63 + net/pepperspot/files/pepperspot.init | 20 + net/pepperspot/patches/101-cflags.patch | 22 + net/pepperspot/patches/102-no_warnings.patch | 134 + net/pepsal/Makefile | 44 + net/polipo/Makefile | 59 + net/polipo/files/polipo.config | 42 + net/polipo/files/polipo.init | 162 + net/portmap/Makefile | 48 + net/portmap/files/portmap.init | 18 + net/portmap/patches/101-no_pie.patch | 12 + net/portsentry/Makefile | 45 + net/portsentry/files/portsentry.init | 13 + net/portsentry/patches/100-conf_location.patch | 13 + net/portsentry/patches/101-postsentry_c.patch | 14 + net/pptpd/Makefile | 63 + net/pptpd/files/options.pptpd | 23 + net/pptpd/files/pptpd.conf | 5 + net/pptpd/files/pptpd.init | 21 + net/pptpd/patches/001-bad_pqueue_debug.patch | 18 + net/pptpd/patches/002-makefile_fix.patch | 11 + net/pptpd/patches/003-opt_flags.patch | 12 + net/privoxy/Makefile | 61 + net/privoxy/files/privoxy.config | 27 + net/privoxy/files/privoxy.init | 16 + net/proftpd/Makefile | 60 + net/proftpd/files/proftpd.init | 41 + net/proftpd/patches/001-automake-compat.patch | 145 + net/prosody/Makefile | 125 + net/prosody/files/prosody.init | 32 + net/prosody/patches/001-conf.patch | 37 + net/psybnc/Makefile | 68 + net/psybnc/patches/001-makefile.patch | 59 + net/psybnc/patches/002-conf.patch | 14 + net/psybnc/patches/003-psybnc.patch | 105 + net/psybnc/patches/004-start_script.patch | 16 + .../patches/005-fix_endianess_detection.patch | 31 + net/ptpd/Makefile | 44 + net/ptpd/files/ptpd.init | 11 + net/ptunnel/Makefile | 62 + net/ptunnel/files/ptunnel.conf | 2 + net/ptunnel/files/ptunnel.init | 40 + net/ptunnel/patches/001-prefix.patch | 13 + net/ptunnel/patches/002-no_selinux.patch | 20 + net/pure-ftpd/Makefile | 91 + net/pure-ftpd/files/pure-ftpd.config | 10 + net/pure-ftpd/files/pure-ftpd.init | 109 + .../patches/010-dont-add-host-paths.patch | 29 + net/qolyester/Makefile | 43 + net/quagga/Makefile | 276 + net/quagga/files/quagga | 335 + net/quagga/files/quagga.conf | 7 + net/quagga/files/quagga.init | 11 + net/quagga/patches-old/001-quagga_cross.patch | 84 + net/quagga/patches-old/001-quagga_readline.patch | 58 + net/quagga/patches-old/002-quagga_manet.patch | 855 + net/quagga/patches-old/100-confederation.patch | 18 + .../patches-old/120-confed_errorhandle.patch | 90 + .../patches-old/130-netlink_ignore_wireless.patch | 38 + net/quagga/patches-old/140-holdtimer-set.patch | 20 + net/quagga/patches-old/150-no-cross-fs-link.patch | 40 + .../patches-old/170-use-supported-pagers.patch | 29 + net/quagga/patches/010-fix-format-warnings.patch | 22 + .../patches/020-fix-ipv6-build-failure.patch | 31 + net/quagga/patches/030-fix-opaque-support.patch | 91 + net/quagga/patches/110-fix_ipctl_forwarding.patch | 25 + net/quagga/patches/120-quagga_manet.patch | 845 + net/quagga/patches/130-fix_cpp.patch | 11 + net/quagga/patches/140-holdtimer-set.patch | 22 + net/quagga/patches/150-no-cross-fs-link.patch | 40 + net/quagga/patches/160-pgbgp.patch | 3095 +++ net/quagga/patches/161-pgbgp-addon.patch | 318 + net/quagga/patches/170-use-supported-pagers.patch | 29 + net/quicktun/Makefile | 69 + net/quicktun/files/quicktun.config | 55 + net/quicktun/files/quicktun.init | 140 + net/raddump/Makefile | 44 + net/radsecproxy/Makefile | 48 + net/radsecproxy/files/radsecproxy.init | 16 + net/rarpd/Makefile | 57 + net/rarpd/files/rarpd.default | 4 + net/rarpd/files/rarpd.init | 14 + net/reaim/Makefile | 42 + net/reaim/files/reaim.init | 48 + net/reaim/patches/501-cross_compile-install.patch | 16 + net/redir/Makefile | 36 + net/redir/patches/00_honor_copts.patch | 12 + net/redir/patches/01_fix_max_bandwidth_docs.patch | 54 + net/redir/patches/02_use_ntohs.patch | 43 + net/redir/patches/03_fix_tcp_wrappers.patch | 25 + net/redir/patches/04_fix_timeouts.patch | 38 + net/redir/patches/06_fix_shaper_buffer.patch | 56 + net/remotefs/Makefile | 75 + net/remotefs/files/rfsd | 25 + net/restund/Makefile | 54 + net/restund/files/restund.init | 18 + net/rinetd/Makefile | 59 + net/rinetd/files/rinetd.config | 33 + net/rinetd/files/rinetd.init | 68 + net/rinetd/patches/001-crosscompile.patch | 12 + net/rp-l2tp/Makefile | 64 + net/rp-l2tp/files/rp-l2tpd.init | 17 + net/rp-l2tp/patches/001-cross.patch | 235 + net/rp-pppoe/Makefile | 130 + net/rp-pppoe/files/pppoe-client.init | 12 + net/rp-pppoe/files/pppoe-relay.default | 1 + net/rp-pppoe/files/pppoe-relay.init | 15 + net/rp-pppoe/files/pppoe-server.default | 1 + net/rp-pppoe/files/pppoe-server.init | 14 + net/rp-pppoe/patches/100-configure.patch | 11 + net/rrs/Makefile | 89 + net/rrs/patches/001-shell.patch | 13 + net/rrs/patches/002-no_sslv2.patch | 46 + net/rrs/patches/003-honour_copts.patch | 12 + net/rssh/Makefile | 62 + net/rssh/patches/001-destdir.patch | 22 + net/rsync/Makefile | 82 + net/rsync/files/rsyncd.conf | 15 + net/rsync/files/rsyncd.init | 15 + net/rtorrent/Makefile | 60 + net/rtorrent/patches/100-fix-cross_compile.patch | 22 + net/rtorrent/patches/120-fix-ncurses.patch | 13 + net/rtpproxy/Makefile | 38 + net/samba/Makefile | 209 + net/samba/files/samba.init | 36 + net/samba/files/smb.conf | 18 + net/samba/files/smbd.config | 3 + net/samba/patches/100-samba.patch | 489 + net/samba/patches/101-codepages.patch | 4764 ++++ net/samba/patches/102-cp1251.patch | 54 + net/samba/patches/103-cp775.patch | 40 + net/samba/patches/200-security.patch | 606 + net/samba/patches/250-writex.patch | 152 + net/samba/patches/300-shared_lib_ldflags_fix.patch | 25 + net/samba/patches/301-config_files_path.patch | 25 + net/samba/patches/400-enhanced_attributes.patch | 29 + net/samba3/Config.in | 4 + net/samba3/Makefile | 83 + net/samba3/files/config-lfs.h | 56 + net/samba3/files/samba.config | 14 + net/samba3/files/samba.init | 69 + net/samba3/files/smb.conf.template | 16 + net/samba3/patches/100-avm.patch | 7267 ++++++ net/samba3/patches/110-compile_fixes.patch | 105 + net/samba3/patches/120-owrt_paths.patch | 57 + net/samba3/patches/130-owrt_smbpasswd.patch | 216 + net/samba3/patches/140-no_mmap.patch | 27 + net/samba3/patches/150-fix_ls.patch | 15 + net/samba3/patches/160-fix_log.patch | 13 + net/samba3/patches/170-no_rpc.patch | 28 + net/samba3/patches/180-fix_duplicate_define.patch | 12 + net/scanlogd/Makefile | 63 + net/scanlogd/files/scanlogd.init | 12 + net/scdp/Makefile | 50 + net/seeks/Makefile | 115 + net/seeks/files/seeks.init | 21 + net/seeks/patches/050-better_icu_detection.patch | 39 + .../patches/100-no_tests-and-add-iconv-link.patch | 34 + .../patches/200-add_pcre_headers_to_plugins.patch | 32 + net/ser2net/Makefile | 50 + net/serialoverip/Makefile | 45 + net/serialoverip/patches/001-compile-fixes.patch | 76 + net/shat/Makefile | 45 + net/shfs/Makefile | 89 + net/shfs/patches/100-kmod_build.patch | 100 + net/shfs/patches/101-shfs_0.35_2.6.18_dentry.patch | 166 + .../patches/102-shfs_0.35_clean_inode_clear.patch | 22 + net/shfs/patches/103-shfs_0.35_gcc4.patch | 25 + net/shfs/patches/104-shfs_0.35_inode_and_fs.patch | 377 + net/shfs/patches/105-space_chars.patch | 70 + net/shfs/patches/106-uidgid32.patch | 38 + net/shfs/patches/107-df.patch | 38 + net/shfs/patches/108-no_update_mtab.patch | 28 + net/shfs/patches/109-linux_2.6.22.patch | 26 + net/shorewall-lite/Makefile | 66 + net/shorewall-lite/files/hostname | 2 + net/shorewall-lite/files/hotplug_iface | 12 + net/shorewall-lite/files/lsm_script | 33 + net/shorewall-lite/files/shorewall-lite.init | 20 + net/shorewall-lite/files/vardir | 2 + net/shorewall-lite/patches/110-MODULESDIR.patch | 20 + net/shorewall-lite/patches/120-LOGFILE.patch | 11 + net/sipp/Makefile | 59 + net/siproxd/Makefile | 54 + net/siproxd/files/siproxd.config | 3 + net/siproxd/files/siproxd.init | 132 + .../patches/010-fix-bogus-libltdl-dependency.patch | 24 + net/sipsak/Makefile | 43 + net/sipsak/patches/001-ssp.patch | 22 + net/slurm/Makefile | 59 + net/slurm/patches/001-no_host_curses.patch | 67 + net/smap/Makefile | 64 + net/smap/patches/00-fix-broadcast.patch | 62 + .../patches/01-add-tecom-supported-header.patch | 12 + .../patches/02-segfault-and-toofast-bugfixes.patch | 63 + net/smcroute/Makefile | 50 + net/smcroute/files/smcroute.init | 11 + net/smcroute/patches/001-socket_path.patch | 11 + net/smcroute/patches/002-optimize_size.patch | 12 + net/smtptrapd/Makefile | 52 + net/smtptrapd/files/smtptrapd.init | 144 + net/smtptrapd/patches/200-missing_opt.patch | 12 + net/snort-wireless/Makefile | 147 + net/snort-wireless/files/snort-wireless.default | 2 + net/snort-wireless/files/snort-wireless.init | 23 + .../patches/500-no-config-search.patch | 35 + .../patches/750-lightweight-config.patch | 178 + net/snort/Makefile | 170 + net/snort/files/snort.default | 2 + net/snort/files/snort.init | 23 + net/snort/patches/001-automake-compat.patch | 4 + net/snort/patches/002-automake-cross.patch | 214 + net/snort/patches/003-automake-no-hostpaths.patch | 86 + net/snort/patches/010-dont-add-host-paths.patch | 43 + net/snort/patches/100-cross-compile.patch | 72 + net/snort/patches/500-no-config-search.patch | 42 + net/snort/patches/750-lightweight-config.patch | 266 + net/socat/Makefile | 58 + net/socat/patches/501-honor_ldflags.patch | 12 + net/socat/patches/502-no_sslv2.patch | 48 + net/softflowd/Makefile | 48 + net/softflowd/files/softflowd.config | 13 + net/softflowd/files/softflowd.init | 66 + net/spawn-fcgi/Makefile | 39 + net/speedtouch-usb-firmware/Makefile | 75 + net/squid/Makefile | 188 + net/squid/patches/001-cross_compile.patch | 561 + net/squid/patches/002-no_sslv2.patch | 15 + net/squid/patches/003-configure.patch | 50 + net/squid/patches/004-include-autoconf.patch | 15 + net/squid/patches/005-lib-makefile.patch | 179 + net/srelay/Makefile | 49 + net/srelay/files/srelay.conf | 2 + net/srelay/files/srelay.init | 13 + net/sscep/Makefile | 52 + net/sscep/patches/001-certnanny.patch | 3009 +++ net/sshfs/Makefile | 59 + net/sshtunnel/Makefile | 45 + net/sshtunnel/files/initd_sshtunnel | 184 + net/sshtunnel/files/sshtunnel.sh | 21 + net/sshtunnel/files/uci_sshtunnel | 51 + net/sslcat/Makefile | 43 + net/sslh/Makefile | 44 + net/sslh/files/sslh.config | 20 + net/sslh/files/sslh.init | 143 + net/sslh/patches/001-no_strip.patch | 10 + net/sslsniff/Makefile | 51 + net/sslsniff/patches/01-cross-compile.patch | 24 + net/sslstrip/Makefile | 56 + net/ssltunnel/Makefile | 57 + net/strongswan/Makefile | 97 + net/strongswan/files/ipsec.button | 34 + net/strongswan/files/ipsec.conf | 34 + net/strongswan/files/ipsec.config | 21 + net/strongswan/files/ipsec.cron | 2 + net/strongswan/files/ipsec.iface | 8 + net/strongswan/files/ipsec.init | 101 + net/strongswan/patches/100-ar-fixes.patch | 81 + net/strongswan/patches/110-make-ipsec.patch | 11 + net/strongswan/patches/120-make-pluto.patch | 13 + net/strongswan/patches/130-make-starter.patch | 21 + net/strongswan/patches/200-wakeup-showstatus.patch | 234 + net/strongswan/patches/210-updown.patch | 662 + net/strongswan/patches/300-openwrt.patch | 26 + net/strongswan/patches/310-make-ipsec-alg.patch | 19 + net/strongswan/patches/320-no-modprobe.patch | 108 + net/strongswan/patches/350-make-programs.patch | 21 + net/strongswan/patches/400-pluto-fix_CIRCLEQ.patch | 149 + net/strongswan4/Config.in | 52 + net/strongswan4/Makefile | 496 + net/strongswan4/files/ipsec.secrets | 1 + net/strongswan4/patches/201-no-modprobe.patch | 28 + net/strongswan4/patches/203-uci.patch | 20 + net/strongswan4/patches/300-compile-fixes.patch | 11 + net/stun/Makefile | 82 + net/stun/files/stund.config | 5 + net/stun/files/stund.init | 28 + net/stun/patches/001-fix_non_i386.patch | 27 + net/stun/patches/002-linking_order.patch | 19 + net/stunnel/Makefile | 65 + net/stunnel/files/stunnel.init | 34 + net/stunnel/patches/001-remove-libtool.patch | 6661 +++++ net/stunnel/patches/100-cross-compile.patch | 126 + net/stunnel/patches/101-no-comp.patch | 28 + net/stunnel/patches/102-no-ssl2.patch | 13 + net/stunnel/patches/103-no-zlib-link.patch | 12 + net/stunnel/patches/104-fix-paths.patch | 42 + net/stunnel/patches/105-stunnel-conf.patch | 54 + .../patches/106-stunnel-xforwardedfor.patch | 248 + net/subversion/Makefile | 128 + net/subversion/files/subversion.config | 3 + net/subversion/files/subversion.init | 35 + net/synce-dccm/Makefile | 54 + net/tcpdump/Makefile | 79 + net/tcpdump/patches/001-remove_pcap_debug.patch | 23 + .../patches/002-remove_static_libpcap_check.patch | 72 + net/tcpdump/patches/004-fix_3g_iface.patch | 28 + net/tcpdump/patches/100-tcpdump_mini.patch | 770 + net/tcptraceroute/Makefile | 46 + .../patches/001-configure_cross_compile.patch | 62 + net/tctool/Makefile | 36 + net/tctool/patches/001_Makefile_fix.diff | 30 + net/tctool/patches/005-fix-gcc_4_3-compile.patch | 12 + net/tftp-hpa/Makefile | 62 + net/tftp-hpa/files/tftpd-hpa.init | 14 + net/tinc/Makefile | 50 + net/tinyproxy/Makefile | 50 + net/tinyproxy/files/tinyproxy.config | 251 + net/tinyproxy/files/tinyproxy.init | 135 + net/tinyproxy/patches/010-no-docs-and-tests.patch | 86 + .../patches/020-config_and_pid-path.patch | 13 + .../030-allow_bind_in_transparent_mode.patch | 22 + .../040-fix_url_filter_in_transparent_mode.patch | 110 + net/tinyproxy/patches/120-fix_INET6.patch | 38 + net/tmsnc/Makefile | 49 + net/tor-alpha/Makefile | 127 + net/tor-alpha/files/tor.init | 26 + net/tor-alpha/patches/001-torrc.patch | 22 + net/tor/Makefile | 114 + net/tor/files/tor.init | 26 + net/tor/patches/001-torrc.patch | 22 + net/transmission/Makefile | 121 + net/transmission/files/transmission.config | 65 + net/transmission/files/transmission.init | 102 + .../patches/010-opt_scrape_paused.patch | 131 + net/transocks/Makefile | 46 + net/tsocks/Makefile | 47 + net/ttcp/Makefile | 38 + net/ttcp/ttcp.c | 2374 ++ net/uanytun/Makefile | 207 + net/uanytun/files/uanytun-nocrypt.config | 88 + net/uanytun/files/uanytun.config | 116 + net/uanytun/files/uanytun.init | 104 + net/ucarp/Makefile | 49 + net/ucarp/files/ucarp.conf | 22 + net/ucarp/files/ucarp.init | 43 + .../patches/100-configure-cross-compilation.patch | 178 + net/ucspi-tcp/Makefile | 54 + net/ucspi-tcp/patches/100-cross_compile.patch | 196 + net/udp-broadcast-relay/Makefile | 48 + net/udpcast/Makefile | 41 + net/udpxy/Makefile | 51 + net/uhub/Makefile | 42 + net/uhub/patches/100-user_struct.patch | 1664 ++ net/ulogd/Makefile | 146 + net/ulogd/files/ulogd.default | 1 + net/ulogd/files/ulogd.init | 16 + net/ulogd/patches/001-pcap_flags.patch | 12 + net/ulogd/patches/002-inc.patch | 24 + net/ulogd/patches/003-fix-bad-rpath.patch | 33 + net/umurmur/Makefile | 95 + net/unbound/Makefile | 63 + net/unbound/files/named.cache | 87 + net/unbound/files/root.autokey | 1 + net/unbound/files/unbound.conf | 83 + net/unbound/files/unbound.init | 14 + net/unfs3/Makefile | 50 + net/unfs3/files/unfs3.exports | 1 + net/unfs3/files/unfs3.init | 17 + net/unfs3/patches/100-no_lfl.patch | 43 + net/uob-nomad/Makefile | 55 + net/uob-nomad/patches/001-inet_sr.patch | 11 + net/uob-nomad/patches/002-hostname.patch | 34 + net/uob-nomad/patches/003-conf.patch | 21 + net/uob-nomad/patches/004-linux26_header_fix.patch | 14 + net/updatedd/Makefile | 155 + net/updatedd/files/updatedd.config | 6 + net/updatedd/files/updatedd.hotplug | 15 + net/updatedd/files/updatedd.init | 37 + net/updatedd/patches/001-service_libname.patch | 84 + net/updatedd/patches/002-ovh-dyndnshost.patch | 12 + net/updatedd/patches/003-zoneedit-url-fix.patch | 11 + net/updatedd/patches/004-fix_liberty_dep.patch | 122 + net/usbip/Makefile | 149 + net/usbip/patches/000-upstream_svn_152.patch | 229 + net/uucp/Makefile | 45 + net/vblade/Makefile | 50 + net/vblade/files/vblade.config | 14 + net/vblade/files/vblade.init | 24 + net/veth/Makefile | 45 + net/veth/patches/100-veth-makefile-cflags.patch | 14 + net/veth/patches/200-drop-multicast.patch | 32 + net/vgp/Makefile | 44 + net/vnc-reflector/Makefile | 51 + .../patches/001-honor_include_lib_path.patch | 25 + net/vncrepeater/Makefile | 58 + net/vncrepeater/patches/001-uclibcxx_linking.patch | 32 + net/vnstat/Makefile | 108 + net/vnstat/files/vnstat-uci.conf | 5 + net/vnstat/files/vnstat.defaults | 12 + net/vnstat/files/vnstat.init | 77 + net/vnstat/patches/001-conf.patch | 19 + net/vnstat/patches/002-no_install_strip.patch | 35 + net/vnstat/patches/003-no_install_uname.patch | 15 + net/vnstat/patches/004-install_bsd_fix.patch | 21 + net/vpnc/Makefile | 63 + net/vpnc/patches/001-cross.patch | 29 + net/vpnc/patches/002-vpn_script.patch | 41 + net/vpnc/patches/003-no_makeman.patch | 11 + net/vpzone/Makefile | 47 + net/vpzone/files/vpzone.conf | 28 + net/vpzone/files/vpzone.init | 13 + net/vpzone/patches/001-no_werror.patch | 22 + net/vpzone/patches/002-ipv6_inc_fix.patch | 11 + net/vrrpd/Makefile | 57 + net/vrrpd/files/vrrpd.default | 4 + net/vrrpd/files/vrrpd.init | 18 + net/vsftpd/Makefile | 49 + net/vsftpd/files/vsftpd.conf | 17 + net/vsftpd/files/vsftpd.init | 14 + net/vsftpd/patches/001-destdir.patch | 47 + net/vsftpd/patches/002-find_libs.patch | 13 + net/vsftpd/patches/003-chroot.patch | 11 + net/vtun/Makefile | 55 + net/vtun/patches/100-lzo2.patch | 37 + net/wavemon/Makefile | 49 + net/wavemon/patches/000-upstream-config_menu.patch | 32 + net/wavemon/patches/000-upstream-negative.patch | 40 + net/wavemon/patches/000-upstream-terminate.patch | 90 + net/wavemon/patches/000-upstream-wrapper.patch | 397 + net/wccpd/Makefile | 42 + net/wdiag/Makefile | 44 + net/weechat/Makefile | 64 + net/wget/Makefile | 124 + net/wifidog/Makefile | 57 + net/wifidog/files/wifidog.conf | 193 + net/wifidog/files/wifidog.init | 17 + net/wing/Makefile | 94 + net/wing/files/etc/uci-defaults/wing | 26 + net/wing/files/lib/network/wing.sh | 146 + net/wing/patches/010-libc-compat.patch | 20 + net/wing/patches/011-perl-compat.patch | 23 + net/wiviz/Makefile | 49 + net/wiviz/files/www/cgi-bin/wiviz/get.cgi | 15 + net/wiviz/files/www/cgi-bin/wiviz/set.cgi | 3 + net/wiviz/files/www/wiviz/adhoc-idle.gif | Bin 0 -> 332 bytes net/wiviz/files/www/wiviz/adhoc-idle.png | Bin 0 -> 730 bytes net/wiviz/files/www/wiviz/adhoc.gif | Bin 0 -> 451 bytes net/wiviz/files/www/wiviz/adhoc.png | Bin 0 -> 714 bytes net/wiviz/files/www/wiviz/ap-idle.gif | Bin 0 -> 812 bytes net/wiviz/files/www/wiviz/ap-idle.png | Bin 0 -> 814 bytes net/wiviz/files/www/wiviz/ap-wep-idle.gif | Bin 0 -> 812 bytes net/wiviz/files/www/wiviz/ap-wep-idle.png | Bin 0 -> 814 bytes net/wiviz/files/www/wiviz/ap-wep.gif | Bin 0 -> 1455 bytes net/wiviz/files/www/wiviz/ap-wep.png | Bin 0 -> 1997 bytes net/wiviz/files/www/wiviz/ap.gif | Bin 0 -> 1468 bytes net/wiviz/files/www/wiviz/ap.png | Bin 0 -> 1825 bytes net/wiviz/files/www/wiviz/pip-idle.gif | Bin 0 -> 190 bytes net/wiviz/files/www/wiviz/pip-idle.png | Bin 0 -> 331 bytes net/wiviz/files/www/wiviz/pip.gif | Bin 0 -> 190 bytes net/wiviz/files/www/wiviz/pip.png | Bin 0 -> 323 bytes net/wiviz/files/www/wiviz/station-idle.gif | Bin 0 -> 754 bytes net/wiviz/files/www/wiviz/station-idle.png | Bin 0 -> 1778 bytes net/wiviz/files/www/wiviz/station.gif | Bin 0 -> 929 bytes net/wiviz/files/www/wiviz/station.png | Bin 0 -> 2476 bytes net/wiviz/files/www/wiviz/wiviz.css | 76 + net/wiviz/files/www/wiviz/wiviz.html | 81 + net/wiviz/files/www/wiviz/wiviz.js | 291 + net/wiviz/src/Makefile | 25 + net/wiviz/src/channelhopper.c | 48 + net/wiviz/src/channelhopper.h | 19 + net/wiviz/src/structs.h | 169 + net/wiviz/src/wiviz.c | 572 + net/wiviz/src/wl_access.c | 73 + net/wiviz/src/wl_access.h | 77 + net/wknock/Makefile | 48 + net/wol/Makefile | 50 + net/wol/files/wol.config | 3 + net/wol/files/wol.init | 30 + net/wput/Makefile | 44 + net/wput/patches/100-socketlib.diff | 22 + net/wput/patches/102-wput.diff | 48 + net/wrt-radauth/Makefile | 50 + net/wrt-radauth/patches/001-ldpath.patch | 12 + net/wshaper/Makefile | 50 + net/wshaper/files/wshaper.config | 4 + net/wshaper/files/wshaper.htb | 161 + net/wshaper/files/wshaper.init | 10 + net/xinetd/Makefile | 68 + net/xinetd/files/xinetd.conf | 6 + net/xinetd/files/xinetd.init | 18 + net/xinetd/patches/001-ar.patch | 66 + net/xinetd/patches/002-destdir.patch | 27 + net/xinetd/patches/003-rpc_fix.patch | 19 + net/xl2tpd/Makefile | 61 + net/xl2tpd/README | 23 + net/xl2tpd/files/options.xl2tpd | 13 + net/xl2tpd/files/xl2tp-secrets | 5 + net/xl2tpd/files/xl2tpd.conf | 23 + net/xl2tpd/files/xl2tpd.conf.sample | 73 + net/xl2tpd/files/xl2tpd.init | 18 + net/xl2tpd/patches/100-makefile_opt_flags.patch | 12 + .../patches/110-makefile_dont_build_pfc.patch | 43 + net/xsupplicant/Makefile | 70 + net/xsupplicant/patches/001-no-lfl.patch | 22 + .../patches/002-disable-procfs-check.patch | 22 + net/xsupplicant/patches/003-compile_fix.patch | 11 + .../005-no_private_linux_header_includes.patch | 48 + net/xsupplicant/patches/006-no_wireless_h.patch | 61 + net/xtables-addons/Makefile | 112 + net/xtables-addons/patches/001-no_depmod.patch | 24 + .../patches/002-fix-kernel-version-detection.patch | 22 + .../patches/003-redundant-bracket.patch | 11 + net/yaddns/Makefile | 45 + net/yaddns/files/etc/config/ddns | 67 + net/yaddns/files/etc/hotplug.d/iface/25-ddns | 117 + net/yaddns/files/usr/lib/ddns/services | 5 + net/yafc/Makefile | 45 + net/yate/Makefile | 276 + ...d_dn_skipname_missing_from_many_libresolv.patch | 111 + net/znc/Makefile | 282 + net/znc/files/znc.conf | 26 + net/znc/files/znc.init | 156 + .../patches/001-move_rootcheck_after_config.patch | 52 + net/znc/patches/002-Uclibcpp_build_fix.patch | 34 + net/znc/patches/003-Reduce_rebuild_time.patch | 32 + net/znc/patches/004-fix_memleak.patch | 14 + skels/Makefile.template | 76 + skels/files/package.conf | 4 + skels/files/package.init | 43 + sound/alsa/Makefile | 67 + sound/alsa/files/alsa.modules | 10 + sound/alsa/patches/100-compile_fix.patch | 19 + sound/alsa/patches/110-cp_command.patch | 13 + sound/alsa/patches/120-sndfops.patch | 13 + sound/cmus/Makefile | 96 + sound/cmus/patches/010-do_not_use_ACS_VLINE.patch | 11 + sound/empcd/Makefile | 51 + sound/flite/Makefile | 61 + sound/flite/patches/100-shared_libs | 182 + sound/ices/Makefile | 59 + sound/lame/Makefile | 78 + sound/lame/patches/001-automake-compat.patch | 33 + sound/madplay/Makefile | 60 + sound/mpc/Makefile | 55 + sound/mpc/files/pls-handler.sh | 5 + sound/mpd/Makefile | 104 + sound/mpd/files/mpd.init | 26 + sound/mpd/files/mpd.service | 9 + sound/mpd/patches/100-compile-fixes.patch | 27 + sound/mpdas/Makefile | 62 + sound/mpdas/files/mpdas.init | 11 + sound/mpdas/files/mpdasrc | 5 + sound/mpdas/patches/001-flags.patch | 13 + sound/mt-daapd/Makefile | 61 + sound/mt-daapd/files/mt-daapd.init | 19 + sound/pulseaudio/Makefile | 130 + sound/pulseaudio/files/pulseaudio.init | 12 + .../patches/001-no_default_64mb_alloc.patch | 13 + sound/scmpc/Makefile | 55 + sound/scmpc/files/scmpc.init | 12 + sound/scmpc/patches/100-Rules.patch | 11 + sound/shell-fm/Makefile | 61 + sound/shell-fm/files/shell-fm.init | 13 + sound/shell-fm/files/shell-fm.rc | 9 + sound/sox/Makefile | 74 + sound/sox/patches/001-cross_compile.patch | 30 + sound/sox/patches/010-dev-sound-dsp.patch | 26 + sound/streamripper/Makefile | 55 + utils/alsa-utils/Makefile | 72 + utils/alsa-utils/patches/100-uClibc-compat.patch | 25 + utils/anyremote/Makefile | 47 + utils/anyremote/files/anyremote.cfg | 66 + utils/anyremote/files/anyremote.init | 13 + .../patches/010-dont-add-host-includes.patch | 13 + utils/ap51-flash/Makefile | 53 + utils/ap51-flash/files/ap51-flash.conf | 6 + utils/ap51-flash/files/ap51-flash.init | 50 + utils/ap51-flash/files/ap51-flash.sh | 21 + utils/at/Makefile | 53 + utils/at/files/atd.init | 15 + utils/at/patches/100-cross-compile.patch | 11 + utils/at/patches/110-getloadavg.patch | 14 + utils/avrdude/Makefile | 59 + utils/avrusbboot/Makefile | 53 + utils/avrusbboot/patches/001-fix_makefile.patch | 18 + utils/avrusbboot/patches/002-fix_compilation.patch | 9 + utils/bandwidthd/Makefile | 56 + utils/bandwidthd/files/bandwidthd.config | 11 + utils/bandwidthd/files/bandwidthd.init | 87 + utils/bandwidthd/files/logo.gif | Bin 0 -> 7573 bytes .../patches/010-dont-add-host-paths.patch | 36 + .../patches/100-fix_config_file_location | 31 + utils/bash-completion/Makefile | 49 + utils/bash/Makefile | 65 + utils/bash/patches/001-compile-fix.patch | 17 + utils/bc/Makefile | 61 + utils/bc/patches/001-disable-doc.patch | 21 + utils/bemused/Makefile | 62 + utils/bemused/files/bemused-bookmarks | 8 + utils/bemused/files/bemused.conf | 43 + utils/bemused/files/bemused.init | 13 + utils/bemused/patches/110-missing_includes.patch | 11 + utils/bemused/patches/200-cxx-compile-fixes.patch | 71 + utils/bluez-hcidump/Makefile | 41 + utils/bluez-utils/Makefile | 77 + utils/bluez-utils/files/bluetooth.conf | 32 + utils/bluez-utils/files/bluetooth.dbus | 37 + utils/bluez-utils/files/bluez-utils.init | 129 + utils/bluez-utils/files/givepin | 14 + utils/bluez-utils/patches/001-include_limits.patch | 20 + .../bluez-utils/patches/002-hcid_pin_helper.patch | 20 + utils/bluez-utils/patches/100-enokey.patch | 22 + utils/bluez-utils/patches/200-uart-speed.patch | 40 + utils/broadcom-sdhc/Makefile | 63 + utils/btrfs-progs/Makefile | 55 + utils/btrfs-progs/files/btrfs-scan.init | 9 + utils/btrfs-progs/patches/001-Makefile-gcc-fix | 53 + utils/bzip2/Makefile | 53 + utils/calvaria/Makefile | 40 + utils/calvaria/files/src/Makefile | 32 + utils/calvaria/files/src/cal2p54.c | 940 + utils/calvaria/files/src/calvaria.c | 514 + utils/ccid/Makefile | 48 + utils/ccrypt/Makefile | 37 + utils/ccrypt/patches/001-no-intl.patch | 104 + utils/cdparanoia/Makefile | 52 + .../patches/002-fixbecrash-private-keyword.patch | 908 + utils/cdparanoia/patches/010-fix_configure.patch | 40 + utils/cifsmount/Makefile | 41 + utils/cifsmount/mount.cifs.c | 972 + utils/cksfv/Makefile | 36 + utils/cmdpad/Makefile | 53 + utils/cmdpad/files/cmdpad.init | 12 + utils/cmdpad/patches/100-Makefile.patch | 35 + utils/cmdpad/patches/120-kernel26-compat.patch | 15 + utils/cmdpad/patches/130-no_zombie.patch | 18 + utils/cmdpad/patches/140-compile_fix.patch | 11 + utils/collectd/Makefile | 311 + utils/collectd/files/collectd.conf | 90 + utils/collectd/files/collectd.init | 28 + .../patches/001-undefined-AM_PATH_LIBGCRYPT.patch | 4 + utils/collectd/patches/002-fix-ltdl-linking.patch | 22 + utils/collectd/patches/003-remove-werror.patch | 22 + .../patches/100-rrdtool-add-rrasingle-option.patch | 57 + utils/collectd/patches/110-net-device-stats.patch | 46 + utils/collectd/patches/120-fix_kernel_2.6.37.patch | 78 + .../patches/200-fix-git-describe-error.patch | 11 + utils/collectd/patches/300-fix-modbus.patch | 34 + utils/collectd/patches/900-add-iwinfo-plugin.patch | 274 + utils/coreutils/Makefile | 102 + .../coreutils/patches/001-no_docs_man_tests.patch | 22 + .../patches/002-fix_compile_with_uclibc.patch | 12 + utils/cpusage/Makefile | 47 + utils/cpusage/src/cpusage.c | 426 + utils/crypto-tools/Makefile | 37 + utils/cryptsetup/Makefile | 50 + utils/cwiid/Makefile | 108 + utils/cwiid/patches/100-dump_gtk_wmdemo.patch | 69 + utils/daemontools/Makefile | 51 + utils/daemontools/patches/crosscompile.patch | 205 + utils/daemontools/patches/svscanboot.patch | 16 + utils/dash/Makefile | 41 + utils/dbus-x/Makefile | 81 + utils/dbus/Makefile | 186 + utils/dbus/files/dbus-launch | 12 + utils/dbus/files/dbus.init | 27 + utils/dbus/patches/002-no_wno_pointer_sign.patch | 12 + utils/dbus/patches/01-dbus-nopie-fix.patch | 22 + utils/deco/Makefile | 48 + utils/deco/patches/100-tty.c.patch | 11 + utils/devio/Makefile | 38 + utils/devmem2/Makefile | 37 + utils/devmem2/src/Makefile | 13 + utils/devmem2/src/devmem2.c | 132 + utils/dfu-util/Makefile | 51 + utils/dialog/Makefile | 43 + utils/digitemp/Makefile | 83 + utils/dir300-flash/Makefile | 63 + utils/disktype/Makefile | 43 + utils/dmidecode/Makefile | 44 + utils/dosfstools/Makefile | 94 + .../dosfstools/patches/002-linux_26_headers.patch | 56 + utils/dt/Makefile | 52 + utils/dtach/Makefile | 48 + utils/empty/Makefile | 41 + utils/event_test/Makefile | 37 + utils/event_test/src/Makefile | 17 + utils/event_test/src/evtest.c | 309 + utils/fancontroled/Makefile | 54 + utils/fancontroled/files/fancontroled.init | 22 + utils/firmwarehotplug/Makefile | 65 + .../patches/001-no_documentation.patch | 12 + .../patches/100-compile-fixes.patch | 36 + utils/flashrom/Makefile | 45 + utils/flashrom/patches/001-msr_dev_path.patch | 21 + utils/fortune-mod/Makefile | 45 + utils/fortune-mod/patches/01-strfile-64bit-fix | 156 + utils/fowsr/Makefile | 45 + utils/foxboard-utils/Makefile | 47 + utils/fxload/Makefile | 42 + utils/fxload/patches/010-compile_fix.patch | 18 + utils/gadgetfs-test/Makefile | 112 + .../patches/001-linux_usb_org_2007_11_29.patch | 214 + utils/gnokii/Makefile | 64 + utils/gnupg/Makefile | 65 + utils/gnupg/patches/001-mips_gcc4.4.patch | 86 + utils/gnuplot/Makefile | 50 + utils/gnuplot/patches/010-Makefile.in.patch | 11 + utils/gpiotoggling/Makefile | 38 + utils/gzip/Makefile | 60 + utils/haserl/Makefile | 32 + utils/hd-idle/Makefile | 43 + utils/hd-idle/files/hd-idle.config | 6 + utils/hd-idle/files/hd-idle.init | 87 + utils/hdparm/Makefile | 38 + utils/heyu/Makefile | 58 + utils/heyu/files/x10.conf | 24 + utils/heyu/patches/001-avoid_configure.patch | 261 + utils/hplip/Makefile | 73 + utils/hplip/files/20-hplip | 20 + utils/huaweiaktbbo/Makefile | 41 + utils/huaweiaktbbo/src/huaweiAktBbo.c | 95 + utils/i2c-tools/Makefile | 90 + utils/i2c-tools/patches/100-linux_include.patch | 10 + utils/ink/Makefile | 33 + utils/input-utils/Makefile | 45 + utils/input-utils/patches/001-EVIOCGKEYCODE2.patch | 220 + utils/input-utils/patches/002-version-check.patch | 34 + utils/io/Makefile | 43 + utils/io/src/io.c | 425 + utils/ipmitool/Makefile | 49 + utils/ipmitool/patches/100-cubic_root.patch | 149 + utils/ipmitool/patches/101-cross_compile.patch | 44 + utils/joe/Makefile | 49 + utils/joe/patches/001-mathaway.patch | 58 + utils/kmemtrace-user/Makefile | 57 + utils/lcd4linux/Config.in | 548 + utils/lcd4linux/Makefile | 231 + utils/lcd4linux/files/lcd4linux.conf | 1224 + utils/lcd4linux/files/lcd4linux.init | 18 + utils/lcd4linux/patches/100-drv_RouterBoard.patch | 11 + .../patches/120-remove_parport_outb.patch | 31 + utils/lcd4linux/patches/140-no_repnop_T6963.patch | 22 + utils/lcd4linux/patches/150-addlibmpdclient.patch | 2624 ++ utils/lcd4linux/patches/160-uinput_defs.patch | 24 + utils/lcd4linux/patches/170-log2f.patch | 11 + utils/lcdproc/Makefile | 61 + utils/lcdproc/files/LCDd | 11 + utils/lcdproc/files/lcdexec | 11 + utils/lcdproc/files/lcdproc | 11 + utils/lcdproc/files/lcdvc | 11 + utils/less/Makefile | 37 + utils/lilo/Makefile | 53 + utils/lilo/files/README | 35 + utils/lilo/files/bdlilo.conf | 30 + utils/lilo/files/boot.msg | 7 + utils/lilo/files/lilo.conf | 26 + utils/lilo/files/mkbootable | 15 + utils/lirc/Makefile | 143 + utils/lm-sensors/Makefile | 112 + utils/lm-sensors/files/sensors.conf | 117 + utils/logrotate/Makefile | 62 + utils/logrotate/files/logrotate.conf | 30 + utils/logrotate/patches/002-datehack.patch | 11 + utils/logrotate/patches/003-ignore_hidden.patch | 14 + utils/logrotate/patches/006-weekly.patch | 18 + utils/loop-aes/Makefile | 52 + utils/loop-aes/patches/001-no_sync.patch | 13 + utils/lrzsz/Makefile | 50 + utils/lrzsz/patches/100-install_delete_fix.patch | 20 + utils/lsof/Makefile | 56 + utils/lsof/patches/001-lsof_makefile.patch | 14 + utils/lsof/patches/002-lsof_noportmap.patch | 18 + utils/lsof/patches/003-lsof_uclibc.patch | 12 + utils/lsof/patches/004-lsof_selinux.patch | 12 + utils/lsof/patches/005-lsof_ccv.patch | 12 + utils/lvm2/Makefile | 89 + utils/lvm2/files/lvm2.init | 12 + utils/lvm2/patches/100-cross_compile.patch | 11 + utils/macchanger/Makefile | 41 + utils/maemo-kexec/Config.in | 20 + utils/maemo-kexec/Makefile | 57 + utils/maemo-kexec/files/sbin/bootmaemo | 11 + utils/mc/Makefile | 74 + utils/mdadm/Makefile | 49 + utils/mdadm/patches/100-cross_compile.patch | 19 + utils/mdadm/patches/200-uclibc_0.9.30_compat.patch | 40 + utils/memtester/Makefile | 45 + utils/memtester/patches/100-quiet.diff | 331 + utils/mg/Makefile | 56 + utils/mgetty/Makefile | 131 + utils/mgetty/patches/001-mgetty.patch | 88 + utils/microcom/Makefile | 47 + utils/microcom/patches/001-cross_compile.patch | 29 + utils/minicom/Makefile | 37 + .../patches/010-resolve-getline-conflict.patch | 111 + utils/mksh/Makefile | 79 + utils/mksh/patches/100-dot_mkshrc | 37 + utils/mtd-utils/Makefile | 129 + utils/nano/Makefile | 52 + utils/ntfs-3g/Makefile | 235 + utils/ntfs-3g/patches-2011.4.12/001-options.patch | 20 + utils/ntfsprogs/Makefile | 60 + utils/ntfsprogs/patches/001-autoconf_fixes.patch | 52 + utils/nvramtool/Makefile | 56 + utils/open2300/Makefile | 58 + utils/open2300/patches/x1.patch | 68 + utils/open2300/patches/x2.patch | 168 + utils/owfs/Makefile | 253 + utils/pciutils/Makefile | 67 + .../patches/100-remove-no-timestamping.patch | 11 + utils/pciutils/patches/101-no-strip.patch | 11 + utils/pciutils/patches/102-compressed-ids.patch | 31 + utils/pciutils/patches/103-relative-path-ids.patch | 11 + utils/pciutils/patches/104-resolv.patch | 11 + utils/pcmciautils/Makefile | 48 + .../files/etc/hotplug.d/pcmcia/pcmcia.agent | 28 + .../hotplug.d/pcmcia_socket/pcmcia_socket.agent | 18 + utils/pcmciautils/files/etc/init.d/pcmcia | 25 + utils/pcmciautils/files/etc/init.d/pcmcia_socket | 19 + utils/pcsc-lite/Makefile | 102 + utils/pcsc-lite/files/pcscd.init | 11 + utils/picocom/Makefile | 54 + utils/pipacs/Makefile | 39 + utils/pipacs/src/Makefile | 14 + utils/pipacs/src/parser.c | 907 + utils/pipacs/src/parser.h | 60 + utils/pipacs/src/pipacs.c | 589 + utils/powertop/Makefile | 43 + utils/powertop/patches/100-no-wide-ncurses.patch | 11 + utils/powertop/patches/200-no-gettext.patch | 48 + utils/pps-tools/Makefile | 50 + utils/pps-tools/patches/001-source.patch | 480 + utils/procps/Makefile | 61 + utils/procps/patches/010-make_fix.patch | 11 + utils/procps/patches/020_hz_fix.patch | 41 + utils/psmisc/Makefile | 62 + utils/psplash/Makefile | 56 + utils/psplash/files/image_480x640.h | 9452 +++++++ utils/psplash/files/image_generic.h | 5475 ++++ utils/psplash/files/init | 11 + utils/psplash/patches/000-adjust-for-openwrt.patch | 42 + .../001-hide-msgfield-and-progressbar.patch | 25 + utils/pv/Makefile | 44 + utils/pwcrypt/Makefile | 36 + utils/pwgen/Makefile | 45 + utils/rcs/Makefile | 40 + utils/rcs/patches/000-debian.patch | 4879 ++++ utils/rcs/patches/100-cross_compile.patch | 413 + utils/rdiff-backup/Makefile | 57 + utils/rdiff-backup/patches/001-python_path.patch | 8 + utils/reiserfsprogs/Makefile | 43 + utils/restorefactory/Makefile | 38 + utils/restorefactory/files/hotplug_restorefactory | 31 + .../files/uci_defaults_restorefactory | 10 + utils/retutahvo/Makefile | 41 + utils/retutahvo/files/src/Makefile | 4 + utils/retutahvo/files/src/retutahvo.c | 270 + utils/retutahvo/files/src/user_retu_tahvo.h | 75 + utils/rrdcollect/Makefile | 96 + utils/rrdcollect/files/rrd.conf | 381 + utils/rrdcollect/files/rrd.sh | 288 + utils/rrdcollect/files/rrdcollect.conf | 33 + utils/rrdcollect/files/rrdcollect.init | 28 + utils/rrdtool/Makefile | 141 + .../patches/010-dont-add-host-include-paths.patch | 34 + utils/sane-backends/Makefile | 120 + .../patches/001-remove-unneeded.patch | 11 + .../patches/010-dont-add-host-include-path.patch | 14 + .../sane-backends/patches/020-non-i386-qcam.patch | 20 + utils/schedtools/Makefile | 38 + utils/scponly/Makefile | 54 + .../patches/001-elif_else_replacement.patch | 12 + utils/screen/Makefile | 48 + utils/screen/files/etc/screenrc | 1 + utils/screen/patches/100-cross_compile_fix.patch | 530 + utils/sdparm/Makefile | 41 + utils/sed/Makefile | 44 + utils/setpwc/Makefile | 41 + utils/setserial/Makefile | 50 + utils/setserial/files/serial.init | 7 + utils/setserial/patches/100-compile-fixes.patch | 70 + utils/sg3-utils/Makefile | 53 + utils/shadow/Makefile | 73 + utils/shadow/patches/001-cross-compile.patch | 131 + .../shadow/patches/002-fix-malloc-prototype.patch | 11 + utils/shadow/patches/003-disable-nis-lookup.patch | 41 + .../shadow/patches/004-disable-ruser-lookup.patch | 21 + utils/sierra-pcmcia/Makefile | 39 + utils/sispmctl/Makefile | 48 + utils/smartmontools/Makefile | 65 + utils/smartmontools/files/smartd.conf | 1 + utils/smartmontools/files/smartd.init | 28 + utils/ssldump/Makefile | 54 + utils/ssldump/patches/001-missing_headers.patch | 23 + utils/strace/Makefile | 60 + .../patches-4.5.16/001-arm_eabi_syscalls.patch | 64 + .../patches-4.5.16/002-arm_bad_syscall.patch | 20 + .../strace/patches-4.5.16/003-avr32_support.patch | 2080 ++ .../strace/patches-4.5.16/004-mips64_support.patch | 3342 +++ .../strace/patches-4.5.16/004-no_cacheflush.patch | 13 + utils/strace/patches-4.5.16/010-cris_support.patch | 345 + utils/stress/Makefile | 46 + utils/sysstat/Makefile | 59 + utils/sysstat/files/config | 4 + utils/sysstat/files/sysstat.init | 12 + utils/tar/Makefile | 60 + utils/tcpser/Makefile | 56 + utils/tcsh/Makefile | 52 + utils/tcsh/patches/001-gethost | 11 + utils/tcsh/patches/002-NLS | 9 + utils/testusb/Makefile | 43 + utils/testusb/src/testusb.c | 427 + utils/tmux/Makefile | 43 + utils/triggerhappy/Makefile | 52 + utils/triggerhappy/files/triggerhappy-example.conf | 14 + utils/triggerhappy/files/triggerhappy.hotplug | 15 + utils/triggerhappy/files/triggerhappy.init | 10 + .../patches/100-fix-LINUX_INPUT_H.patch | 11 + utils/ucmb-tools/Makefile | 41 + utils/ucmb-tools/tools/Makefile | 17 + utils/ucmb-tools/tools/ucmb.c | 120 + utils/ucmb/Makefile | 65 + utils/ucmb/driver/Makefile | 1 + utils/ucmb/driver/ucmb.c | 656 + utils/ucmb/driver/ucmb.h | 77 + .../microcontroller_examples/atmel_avr8/ucmb.c | 233 + .../microcontroller_examples/atmel_avr8/ucmb.h | 24 + .../atmel_avr8_optimized/ucmb.c | 530 + .../atmel_avr8_optimized/ucmb.h | 36 + utils/unrar/Makefile | 50 + utils/unzip/Makefile | 56 + utils/upx/Makefile | 51 + utils/upx/patches/100-disable_doc.patch | 11 + utils/usb-modeswitch-data/Makefile | 42 + utils/usb-modeswitch/Makefile | 47 + utils/usb-modeswitch/files/modeswitch.hotplug | 126 + utils/usbutils/Makefile | 46 + utils/usbutils/patches/100-ids-relative-path.patch | 11 + .../usbutils/patches/110-gzip-update-usbids.patch | 36 + utils/valgrind/Makefile | 73 + utils/valgrind/files/uclibc.supp | 212 + utils/valgrind/files/valgrind.sh | 10 + utils/valgrind/patches/001-uclibc_syscall.patch | 205 + .../002-fix_load_address_substitution.patch | 76 + utils/valgrind/patches/100-a_out_header.patch | 10 + utils/valgrind/src/abort.c | 3 + utils/vim/Makefile | 174 + utils/vim/files/vimrc | 13 + utils/vim/files/vimrc.full | 24 + utils/vim/patches/001-cross_compile.patch | 35 + utils/watchcat/Makefile | 43 + utils/watchcat/files/initd_watchcat | 108 + utils/watchcat/files/uci_defaults_watchcat | 10 + utils/watchcat/files/watchcat.sh | 69 + utils/wattsup/Makefile | 31 + utils/wattsup/src/Makefile | 8 + utils/wattsup/src/wattsup.c | 1877 ++ utils/wifitoggle/Makefile | 42 + utils/wifitoggle/files/hotplug_wifitoggle | 170 + utils/wifitoggle/files/uci_wifitoggle | 11 + utils/wx200d/Makefile | 51 + utils/zile/Makefile | 45 + utils/zip/Makefile | 56 + 3018 files changed, 438980 insertions(+) create mode 100644 .gitignore create mode 100644 Xorg/app/dillo/Makefile create mode 100644 Xorg/app/dillo/files/dillo.desktop create mode 100644 Xorg/app/dillo/files/dillo.png create mode 100644 Xorg/app/dillo/patches/000-do-not-need-flt2-util.patch create mode 100644 Xorg/app/eterm/Makefile create mode 100644 Xorg/app/eterm/patches/010-dont-add-host-paths.patch create mode 100644 Xorg/app/gtkperf/Makefile create mode 100644 Xorg/app/gtkperf/patches/000-disable-autotools.patch create mode 100644 Xorg/app/gtkperf/patches/010-change-layout.patch create mode 100644 Xorg/app/matchbox-keyboard/Makefile create mode 100644 Xorg/app/packages create mode 100644 Xorg/app/pwrtray/Makefile create mode 100755 Xorg/app/pwrtray/files/etc/init.d/pwrtray-backend create mode 100644 Xorg/app/pwrtray/files/etc/pwrtray-backendrc create mode 100644 Xorg/app/qwo/Makefile create mode 100644 Xorg/app/rxvt/Makefile create mode 100644 Xorg/app/rxvt/files/icon.png create mode 100644 Xorg/app/rxvt/files/rxvt.desktop create mode 100644 Xorg/app/template.mk create mode 100644 Xorg/app/xcalc/Makefile create mode 100644 Xorg/app/xclipboard/Makefile create mode 100644 Xorg/app/xdm/Makefile create mode 100644 Xorg/app/xeyes/Makefile create mode 100644 Xorg/app/xine-ui/Makefile create mode 100644 Xorg/app/xine-ui/patches/100-cflags.patch create mode 100644 Xorg/app/xine-ui/patches/110-xitk.patch create mode 100644 Xorg/app/xine-ui/patches/120-remove-delay.patch create mode 100644 Xorg/app/xinit/Makefile create mode 100644 Xorg/app/xmessage/Makefile create mode 100644 Xorg/app/xterm/Makefile create mode 100644 Xorg/app/xterm/files/terminal.png create mode 100644 Xorg/app/xterm/files/xterm.desktop create mode 100644 Xorg/app/xterm/patches/010-no-transform.patch create mode 100644 Xorg/driver/xf86-input-tslib/Makefile create mode 100644 Xorg/driver/xf86-input-tslib/files/pointercal.om_gta02 create mode 100644 Xorg/driver/xf86-input-tslib/patches/100-ifdef-debug-output.patch create mode 100644 Xorg/driver/xf86-video-glamo/Makefile create mode 100644 Xorg/driver/xf86-video-glamo/patches/001-include-glamo-engine.patch create mode 100644 Xorg/font/dejavu-fonts-ttf/Makefile create mode 100644 Xorg/font/liberation-fonts-ttf/Makefile create mode 100755 Xorg/generate.sh create mode 100644 Xorg/lib/atk/Makefile create mode 100644 Xorg/lib/atk/patches/010-do-not-use-GTK_DOC-macro.patch create mode 100644 Xorg/lib/atk/patches/020-do-not-build-examples_docs_pos_tests.patch create mode 100644 Xorg/lib/cairo/Makefile create mode 100644 Xorg/lib/cairomm/Makefile create mode 100644 Xorg/lib/fltk2/Makefile create mode 100644 Xorg/lib/fltk2/patches/000-do-not-build-fltk-and-tests create mode 100644 Xorg/lib/fltk2/patches/001-be-verbose create mode 100644 Xorg/lib/fltk2/patches/002-honor-cppflags create mode 100644 Xorg/lib/fltk2/patches/100-compile-fixes.patch create mode 100644 Xorg/lib/gtk1/Makefile create mode 100644 Xorg/lib/gtk2/Makefile create mode 100755 Xorg/lib/gtk2/files/gdk-pixbuf-query-loaders.init create mode 100644 Xorg/lib/gtk2/patches/010-do-not-use-GTK_DOC-macro.patch create mode 100644 Xorg/lib/gtk2/patches/010-dont-build-demos-and-tests.patch create mode 100644 Xorg/lib/gtk2/patches/030-dont-build-demos_tests_pos_examples.patch create mode 100644 Xorg/lib/gtk2/patches/100-compile_fix.patch create mode 100644 Xorg/lib/gtkmm/Makefile create mode 100644 Xorg/lib/gtkmm/patches/001-automake-compat.patch create mode 100644 Xorg/lib/gtkmm/patches/100-disable-tools-tests.patch create mode 100644 Xorg/lib/hippo-canvas/Makefile create mode 100644 Xorg/lib/hippo-canvas/patches/010-use-python-config create mode 100644 Xorg/lib/imlib2/Makefile create mode 100644 Xorg/lib/libast/Makefile create mode 100644 Xorg/lib/libast/patches/010-dont-add-host-paths.patch create mode 100644 Xorg/lib/libast/patches/100-configure.patch create mode 100644 Xorg/lib/libdrm/Makefile create mode 100644 Xorg/lib/libfakekey/Makefile create mode 100644 Xorg/lib/libmatchbox/Makefile create mode 100644 Xorg/lib/librsvg/Makefile create mode 100644 Xorg/lib/libxcb/Makefile create mode 100644 Xorg/lib/mesa/Makefile create mode 100644 Xorg/lib/mesa/patches/010-fix-pkgconfig-files.patch create mode 100644 Xorg/lib/packages create mode 100644 Xorg/lib/pango/Makefile create mode 100755 Xorg/lib/pango/files/pango-querymodules.init create mode 100644 Xorg/lib/pangomm/Makefile create mode 100644 Xorg/lib/pixman/Makefile create mode 100644 Xorg/lib/qt4/Config.in create mode 100644 Xorg/lib/qt4/Makefile create mode 100644 Xorg/lib/qt4/files/qmake.mk create mode 100644 Xorg/lib/qt4/files/qws-qmake.conf create mode 100644 Xorg/lib/qt4/files/qws-qplatformdefs.h create mode 100644 Xorg/lib/qt4/files/x11-qmake.conf create mode 100644 Xorg/lib/qt4/files/x11-qplatformdefs.h create mode 100644 Xorg/lib/qt4/patches/100-do_not_use_res.defdname.patch create mode 100644 Xorg/lib/qt4/patches/200-depend-on-decoration.patch create mode 100644 Xorg/lib/qt4/patches/300-compile-fixes.patch create mode 100644 Xorg/lib/qt4/patches/400-do-not-pack-structs.patch create mode 100644 Xorg/lib/qt4/patches/500-allow-device-grabbing.patch create mode 100644 Xorg/lib/template.mk create mode 100644 Xorg/lib/tslib/Makefile create mode 100644 Xorg/lib/tslib/files/pointercal_om_gta02 create mode 100644 Xorg/lib/tslib/files/ts.conf create mode 100644 Xorg/lib/tslib/patches/devfs.patch create mode 100644 Xorg/lib/tslib/patches/event1.patch create mode 100644 Xorg/lib/tslib/patches/fix_version.patch create mode 100644 Xorg/lib/tslib/patches/tslib-input_raw-grab_events.patch create mode 100644 Xorg/lib/vte/Makefile create mode 100644 Xorg/lib/vte/patches/100-compile-fixes.patch create mode 100644 Xorg/lib/wnck/Makefile create mode 100644 Xorg/lib/wnck/patches/100-optional_gdk_pixbuf_csource.patch create mode 100644 Xorg/lib/xcbproto/Makefile create mode 100644 Xorg/lib/xine-lib/Makefile create mode 100644 Xorg/lib/xine-lib/patches/100-compile_fix.patch create mode 100644 Xorg/wm/fluxbox/Makefile create mode 100644 Xorg/wm/fluxbox/files/init create mode 100644 Xorg/wm/fluxbox/files/menu create mode 100644 Xorg/wm/fluxbox/files/uci-defaults/x11 create mode 100644 Xorg/wm/fluxbox/patches/010-fix-includes.patch create mode 100644 Xorg/wm/fluxbox/patches/100-fbrun-compile.patch create mode 100644 Xorg/wm/fluxbox/patches/120-fbsetroot-compile.patch create mode 100644 Xorg/wm/matchbox-window-manager/Makefile create mode 100644 Xorg/wm/matchbox-window-manager/files/uci-defaults/x11 create mode 100644 Xorg/xorg/app/font-util/Makefile create mode 100644 Xorg/xorg/app/fontconfig/Makefile create mode 100644 Xorg/xorg/app/iceauth/Makefile create mode 100644 Xorg/xorg/app/smproxy/Makefile create mode 100644 Xorg/xorg/app/x11perf/Makefile create mode 100644 Xorg/xorg/app/xauth/Makefile create mode 100644 Xorg/xorg/app/xkbcomp/Makefile create mode 100644 Xorg/xorg/app/xprop/Makefile create mode 100644 Xorg/xorg/app/xrandr/Makefile create mode 100644 Xorg/xorg/app/xrandr/patches/001-xrandr-1.2.2-clone-nameclash.patch create mode 100644 Xorg/xorg/app/xrdb/Makefile create mode 100644 Xorg/xorg/app/xset/Makefile create mode 100644 Xorg/xorg/app/xsetroot/Makefile create mode 100644 Xorg/xorg/app/xwd/Makefile create mode 100644 Xorg/xorg/data/xbitmaps/Makefile create mode 100644 Xorg/xorg/data/xkbdata/Makefile create mode 100644 Xorg/xorg/data/xkbdata/files/nokia_n810/rx-44 create mode 100644 Xorg/xorg/data/xkbdata/files/nokia_n810/su-8w create mode 100644 Xorg/xorg/data/xkeyboard-config/Makefile create mode 100644 Xorg/xorg/driver/xf86-input-evdev/Makefile create mode 100644 Xorg/xorg/driver/xf86-input-keyboard/Makefile create mode 100644 Xorg/xorg/driver/xf86-input-mouse/Makefile create mode 100644 Xorg/xorg/driver/xf86-video-ati/Makefile create mode 100644 Xorg/xorg/driver/xf86-video-fbdev/Makefile create mode 100644 Xorg/xorg/driver/xf86-video-geode/Makefile create mode 100644 Xorg/xorg/driver/xf86-video-intel/Makefile create mode 100644 Xorg/xorg/driver/xf86-video-nv/Makefile create mode 100644 Xorg/xorg/driver/xf86-video-omap/Makefile create mode 100644 Xorg/xorg/driver/xf86-video-omap/patches/001-misc-fixes.patch create mode 100644 Xorg/xorg/driver/xf86-video-vesa/Makefile create mode 100644 Xorg/xorg/driver/xf86-video-vesa/patches/010-dont-mess-up-include-paths.patch create mode 100644 Xorg/xorg/font/encodings/Makefile create mode 100644 Xorg/xorg/font/font-alias/Makefile create mode 100644 Xorg/xorg/font/font-bh-75dpi/Makefile create mode 100644 Xorg/xorg/font/font-cursor-misc/Makefile create mode 100644 Xorg/xorg/font/font-daewoo-misc/Makefile create mode 100644 Xorg/xorg/font/font-dec-misc/Makefile create mode 100644 Xorg/xorg/font/font-ibm-type1/Makefile create mode 100644 Xorg/xorg/font/font-isas-misc/Makefile create mode 100644 Xorg/xorg/font/font-jis-misc/Makefile create mode 100644 Xorg/xorg/font/font-micro-misc/Makefile create mode 100644 Xorg/xorg/font/font-misc-cyrillic/Makefile create mode 100644 Xorg/xorg/font/font-misc-misc/Makefile create mode 100644 Xorg/xorg/font/font-misc-misc/files/fonts.dir.font-base create mode 100644 Xorg/xorg/font/font-misc-misc/files/fonts.dir.font-misc-misc create mode 100644 Xorg/xorg/font/font-xfree86-type1/Makefile create mode 100644 Xorg/xorg/font/packages create mode 100644 Xorg/xorg/font/template.mk create mode 100644 Xorg/xorg/lib/libICE/Makefile create mode 100644 Xorg/xorg/lib/libSM/Makefile create mode 100644 Xorg/xorg/lib/libX11/Makefile create mode 100644 Xorg/xorg/lib/libX11/patches/005-fix-include-path.patch create mode 100644 Xorg/xorg/lib/libX11/patches/010-ignore-groff-warnings.patch create mode 100644 Xorg/xorg/lib/libXau/Makefile create mode 100644 Xorg/xorg/lib/libXaw/Makefile create mode 100644 Xorg/xorg/lib/libXaw/patches/001-fix-includes.patch create mode 100644 Xorg/xorg/lib/libXcomposite/Makefile create mode 100644 Xorg/xorg/lib/libXcursor/Makefile create mode 100644 Xorg/xorg/lib/libXdamage/Makefile create mode 100644 Xorg/xorg/lib/libXdmcp/Makefile create mode 100644 Xorg/xorg/lib/libXext/Makefile create mode 100644 Xorg/xorg/lib/libXfixes/Makefile create mode 100644 Xorg/xorg/lib/libXfont/Makefile create mode 100644 Xorg/xorg/lib/libXft/Makefile create mode 100644 Xorg/xorg/lib/libXi/Makefile create mode 100644 Xorg/xorg/lib/libXmu/Makefile create mode 100644 Xorg/xorg/lib/libXpm/Makefile create mode 100644 Xorg/xorg/lib/libXrandr/Makefile create mode 100644 Xorg/xorg/lib/libXrender/Makefile create mode 100644 Xorg/xorg/lib/libXt/Makefile create mode 100644 Xorg/xorg/lib/libXtst/Makefile create mode 100644 Xorg/xorg/lib/libXv/Makefile create mode 100644 Xorg/xorg/lib/libXvMC/Makefile create mode 100644 Xorg/xorg/lib/libXxf86vm/Makefile create mode 100644 Xorg/xorg/lib/libfontenc/Makefile create mode 100644 Xorg/xorg/lib/libpciaccess/Makefile create mode 100644 Xorg/xorg/lib/libxkbfile/Makefile create mode 100644 Xorg/xorg/lib/xtrans/Makefile create mode 100644 Xorg/xorg/proto/applewmproto/Makefile create mode 100644 Xorg/xorg/proto/bigreqsproto/Makefile create mode 100644 Xorg/xorg/proto/calibrateproto/Makefile create mode 100644 Xorg/xorg/proto/calibrateproto/src/ChangeLog create mode 100644 Xorg/xorg/proto/calibrateproto/src/Makefile create mode 100644 Xorg/xorg/proto/calibrateproto/src/Makefile.am create mode 100644 Xorg/xorg/proto/calibrateproto/src/Makefile.in create mode 100644 Xorg/xorg/proto/calibrateproto/src/aclocal.m4 create mode 100755 Xorg/xorg/proto/calibrateproto/src/autogen.sh create mode 100644 Xorg/xorg/proto/calibrateproto/src/config.log create mode 100755 Xorg/xorg/proto/calibrateproto/src/config.status create mode 100755 Xorg/xorg/proto/calibrateproto/src/configure create mode 100644 Xorg/xorg/proto/calibrateproto/src/configure.ac create mode 100755 Xorg/xorg/proto/calibrateproto/src/install-sh create mode 100755 Xorg/xorg/proto/calibrateproto/src/missing create mode 100644 Xorg/xorg/proto/calibrateproto/src/xcalibrateproto.h create mode 100644 Xorg/xorg/proto/calibrateproto/src/xcalibrateproto.pc create mode 100644 Xorg/xorg/proto/calibrateproto/src/xcalibrateproto.pc.in create mode 100644 Xorg/xorg/proto/calibrateproto/src/xcalibratewire.h create mode 100644 Xorg/xorg/proto/compositeproto/Makefile create mode 100644 Xorg/xorg/proto/damageproto/Makefile create mode 100644 Xorg/xorg/proto/dmxproto/Makefile create mode 100644 Xorg/xorg/proto/dri2proto/Makefile create mode 100644 Xorg/xorg/proto/fixesproto/Makefile create mode 100644 Xorg/xorg/proto/fontcacheproto/Makefile create mode 100644 Xorg/xorg/proto/fontsproto/Makefile create mode 100644 Xorg/xorg/proto/glproto/Makefile create mode 100644 Xorg/xorg/proto/inputproto/Makefile create mode 100644 Xorg/xorg/proto/kbproto/Makefile create mode 100644 Xorg/xorg/proto/printproto/Makefile create mode 100644 Xorg/xorg/proto/randrproto/Makefile create mode 100644 Xorg/xorg/proto/recordproto/Makefile create mode 100644 Xorg/xorg/proto/renderproto/Makefile create mode 100644 Xorg/xorg/proto/resourceproto/Makefile create mode 100644 Xorg/xorg/proto/scrnsaverproto/Makefile create mode 100644 Xorg/xorg/proto/videoproto/Makefile create mode 100644 Xorg/xorg/proto/windowswmproto/Makefile create mode 100644 Xorg/xorg/proto/xcmiscproto/Makefile create mode 100644 Xorg/xorg/proto/xextproto/Makefile create mode 100644 Xorg/xorg/proto/xf86bigfontproto/Makefile create mode 100644 Xorg/xorg/proto/xf86dgaproto/Makefile create mode 100644 Xorg/xorg/proto/xf86driproto/Makefile create mode 100644 Xorg/xorg/proto/xf86vidmodeproto/Makefile create mode 100644 Xorg/xorg/proto/xineramaproto/Makefile create mode 100644 Xorg/xorg/proto/xproto/Makefile create mode 100644 Xorg/xorg/xserver/xorg-kdrive/Config.in create mode 100644 Xorg/xorg/xserver/xorg-kdrive/Makefile create mode 100644 Xorg/xorg/xserver/xorg-kdrive/patches/001-tslib.patch create mode 100644 Xorg/xorg/xserver/xorg-kdrive/patches/002-add-portrait-modes.patch create mode 100644 Xorg/xorg/xserver/xorg-server/Config.in create mode 100644 Xorg/xorg/xserver/xorg-server/Makefile create mode 100644 Xorg/xorg/xserver/xorg-server/files/config.uci/generic create mode 100644 Xorg/xorg/xserver/xorg-server/files/config.uci/olpc create mode 100644 Xorg/xorg/xserver/xorg-server/files/config.uci/om_gta02 create mode 100644 Xorg/xorg/xserver/xorg-server/files/config.xorg/generic create mode 100644 Xorg/xorg/xserver/xorg-server/files/config.xorg/nokia_n810 create mode 100644 Xorg/xorg/xserver/xorg-server/files/config.xorg/olpc create mode 100644 Xorg/xorg/xserver/xorg-server/files/config.xorg/om_gta02 create mode 100644 Xorg/xorg/xserver/xorg-server/files/tmp/x11.uci create mode 100755 Xorg/xorg/xserver/xorg-server/files/x.init create mode 100644 Xorg/xorg/xserver/xorg-server/files/xorg-driver.mk create mode 100644 Xorg/xserver/xglamo/Makefile create mode 100644 Xorg/xserver/xglamo/files/config/x11.om_gta02 create mode 100644 Xorg/xserver/xglamo/files/pointercal.om_gta02 create mode 100755 Xorg/xserver/xglamo/files/x.init create mode 100644 Xorg/xserver/xglamo/patches/001-fix-aclocal.patch create mode 100644 admin/debootstrap/Makefile create mode 100644 admin/debootstrap/files/pkgdetails.c create mode 100644 admin/debootstrap/patches/100-busybox_fix.patch create mode 100644 admin/gkrellmd/Makefile create mode 100644 admin/gkrellmd/files/gkrellmd.init create mode 100644 admin/gkrellmd/patches/100-conf.patch create mode 100644 admin/htop/Makefile create mode 100644 admin/htop/patches/001-uClibc-friendly.patch create mode 100644 admin/monit/Makefile create mode 100644 admin/monit/files/monit.init create mode 100644 admin/monit/patches/001-no_sslv2.patch create mode 100644 admin/monit/patches/002-uclibc_loadavg.patch create mode 100644 admin/muninlite/Makefile create mode 100644 admin/muninlite/files/etc/xinetd.d/munin create mode 100644 admin/muninlite/patches/001-no_disks.patch create mode 100644 admin/muninlite/patches/002-hostname.patch create mode 100644 admin/muninlite/patches/100-fix-no-ethtool.patch create mode 100644 admin/muninlite/patches/200-add-tap-dev.patch create mode 100644 admin/muninlite/patches/210-add-bridge-devs.patch create mode 100644 admin/nagios-plugins/Makefile create mode 100644 admin/nagios-plugins/patches/002-plugins.patch create mode 100644 admin/nagios-plugins/patches/003-pgsl-header-fix.patch create mode 100644 admin/nagios/Makefile create mode 100644 admin/nrpe/Makefile create mode 100644 admin/nrpe/files/nrpe.cfg create mode 100644 admin/nrpe/files/nrpe.init create mode 100644 admin/nrpe/patches/100-openssl-dh.patch create mode 100644 admin/nsca/Makefile create mode 100644 admin/osiris/Makefile create mode 100644 admin/osiris/files/osirisd.init create mode 100644 admin/osiris/patches/001-configure-cross.patch create mode 100644 admin/osiris/patches/002-osirisd-pidfile.patch create mode 100644 admin/osiris/patches/003-openssl-0.9.8+.patch create mode 100644 admin/osiris/patches/004-no_openssl_ripe.patch create mode 100644 admin/osiris/patches/006-mod_nvram.patch create mode 100644 admin/osiris/patches/007-mod_uptime.patch create mode 100644 admin/osiris/patches/010-dont-add-host-include-paths.patch create mode 100644 admin/pmacct/Makefile create mode 100644 admin/pmacct/files/nfacctd.conf create mode 100644 admin/pmacct/files/nfacctd.default create mode 100644 admin/pmacct/files/nfacctd.init create mode 100644 admin/pmacct/files/pmacctd.conf create mode 100644 admin/pmacct/files/pmacctd.default create mode 100644 admin/pmacct/files/pmacctd.init create mode 100644 admin/pmacct/files/uacctd.conf create mode 100644 admin/pmacct/files/uacctd.default create mode 100644 admin/pmacct/files/uacctd.init create mode 100644 admin/pmacct/patches/001-honor_cflags.patch create mode 100644 admin/sudo/Makefile create mode 100755 admin/sudo/files/sudo.init create mode 100644 admin/syslog-ng/Makefile create mode 100644 admin/syslog-ng/files/syslog-ng.conf create mode 100644 admin/syslog-ng/files/syslog-ng.init create mode 100644 admin/syslog-ng/patches/001-no_lfl.patch create mode 100644 admin/syslog-ng3/Makefile create mode 100644 admin/syslog-ng3/files/syslog-ng.conf create mode 100644 admin/syslog-ng3/files/syslog-ng.init create mode 100644 admin/zabbix/Makefile create mode 100644 admin/zabbix/files/zabbix_agentd.conf create mode 100644 admin/zabbix/files/zabbix_agentd.init create mode 100644 admin/zabbix/patches/001-cross_compile.patch create mode 100644 admin/zabbix/patches/002-uclibc_loadavg.patch create mode 100644 devel/binutils/Makefile create mode 100644 devel/boost-jam/Makefile create mode 100644 devel/build-essential/Makefile create mode 100644 devel/build-essential/files/usr/src/hello/hello.c create mode 100644 devel/cppunit/Makefile create mode 100644 devel/diffutils/Makefile create mode 100644 devel/dmalloc/Makefile create mode 100644 devel/dmalloc/patches/100-configure_pagesize.patch create mode 100644 devel/dmalloc/patches/110-configure_cxx.patch create mode 100644 devel/dmalloc/patches/120-makefile_shared.patch create mode 100644 devel/dmalloc/patches/130-makefile_destdir.patch create mode 100644 devel/dmalloc/patches/200-fix_return_address.patch create mode 100644 devel/dmalloc/patches/210-fix_threads.patch create mode 100644 devel/dmalloc/patches/300-fix_summarize_script.patch create mode 100644 devel/gcc/Makefile create mode 100644 devel/ksymoops/Makefile create mode 100644 devel/make/Makefile create mode 100644 devel/oprofile/Makefile create mode 100644 devel/oprofile/patches/100-use_insmod_instead_of_modprobe.patch create mode 100644 devel/oprofile/patches/101-remove_24_support.patch create mode 100644 devel/oprofile/patches/200-rename-i386-to-x86.patch create mode 100644 devel/patch/Makefile create mode 100644 devel/patch/patches/100-install.patch create mode 100644 ipv6/6scripts/Makefile create mode 100644 ipv6/6scripts/files/6bridge.conf create mode 100644 ipv6/6scripts/files/6bridge.init create mode 100644 ipv6/6scripts/files/6tunnel.conf create mode 100644 ipv6/6scripts/files/6tunnel.init create mode 100644 ipv6/6scripts/files/he-tun.ppp create mode 100644 ipv6/6tunnel/Makefile create mode 100644 ipv6/ahcpd/Makefile create mode 100644 ipv6/ahcpd/files/ahcp.sh create mode 100644 ipv6/ahcpd/files/ahcpd.config create mode 100644 ipv6/ahcpd/files/ahcpd.init create mode 100644 ipv6/ahcpd/patches/001-autoconf-prefixes.patch create mode 100644 ipv6/aiccu/Makefile create mode 100755 ipv6/aiccu/files/aiccu.conf create mode 100644 ipv6/aiccu/files/aiccu.hotplug create mode 100644 ipv6/aiccu/files/aiccu.init create mode 100644 ipv6/aiccu/patches/100-cross_compile.patch create mode 100644 ipv6/aiccu/patches/200-add_dn_skipname.patch create mode 100644 ipv6/aiccu/patches/300-resolver-uclibc.patch create mode 100644 ipv6/dhcp6/Makefile create mode 100644 ipv6/dhcp6/patches/001-opt_flags.patch create mode 100644 ipv6/dhcp6/patches/002-gcc_lvalue.patch create mode 100644 ipv6/dhcp6/patches/003-debug.patch create mode 100644 ipv6/dibbler/Makefile create mode 100644 ipv6/dibbler/files/dibbler.init create mode 100644 ipv6/dibbler/patches/001-fix_avr32_compile create mode 100644 ipv6/dibbler/patches/001-uclibcxx.patch create mode 100644 ipv6/gw6c/Makefile create mode 100644 ipv6/gw6c/files/gw6c.config create mode 100755 ipv6/gw6c/files/gw6c.init create mode 100755 ipv6/gw6c/files/openwrt.sh create mode 100644 ipv6/ipv6calc/Makefile create mode 100644 ipv6/miredo/Makefile create mode 100644 ipv6/miredo/files/client-hook create mode 100644 ipv6/miredo/files/miredo-server.init create mode 100644 ipv6/miredo/files/miredo.init create mode 100644 ipv6/miredo/patches/100-uclibc.patch create mode 100644 ipv6/mrd6/Makefile create mode 100644 ipv6/mrd6/files/mrd6.conf create mode 100644 ipv6/mrd6/files/mrd6.init create mode 100644 ipv6/mrd6/patches/002-missing_netlink_defs.patch create mode 100644 ipv6/mrd6/patches/003-debian.patch create mode 100644 ipv6/mrd6/patches/004-ambiguous_call_fix.patch create mode 100644 ipv6/ndisc/Makefile create mode 100644 ipv6/ndisc/patches/100-favor_bsd.patch create mode 100644 ipv6/ndisc/patches/110-strverscmp.patch create mode 100644 ipv6/ndisc/patches/120-ppoll.patch create mode 100644 ipv6/ptrtd/Makefile create mode 100644 ipv6/ptrtd/files/ptrtd.init create mode 100644 ipv6/ptrtd/patches/100-ptrtd-0.5.2-openwrt.patch create mode 100644 ipv6/radvd/Makefile create mode 100644 ipv6/radvd/files/radvd.config create mode 100644 ipv6/radvd/files/radvd.hotplug create mode 100644 ipv6/radvd/files/radvd.init create mode 100644 ipv6/send/Makefile create mode 100644 ipv6/send/patches/001-libnetfilter_queue_update.patch create mode 100644 ipv6/send/patches/002-handle_max_bits_conf.patch create mode 100644 ipv6/send/patches/003-keysig_8bytes_alignment.patch create mode 100644 ipv6/send/patches/004-always_link_with_ncurses.patch create mode 100644 ipv6/send/patches/005-use-bundled-libconfig.patch create mode 100644 ipv6/send/patches/006-openssl-1.0.0-compat.patch create mode 100644 ipv6/shorewall6-lite/Makefile create mode 100644 ipv6/shorewall6-lite/files/hostname create mode 100644 ipv6/shorewall6-lite/files/hotplug_iface create mode 100644 ipv6/shorewall6-lite/files/shorewall-lite.init create mode 100644 ipv6/shorewall6-lite/files/vardir create mode 100644 ipv6/shorewall6-lite/patches/100-hostname.patch create mode 100644 ipv6/shorewall6-lite/patches/110-MODULESDIR.patch create mode 100644 ipv6/shorewall6-lite/patches/120-LOGFILE.patch create mode 100644 ipv6/shorewall6-lite/patches/130-portability.patch create mode 100644 ipv6/thc-ipv6/Makefile create mode 100644 ipv6/thc-ipv6/patches/100-optional-openssl.patch create mode 100644 ipv6/totd/Makefile create mode 100644 ipv6/totd/files/totd.conf create mode 100644 ipv6/totd/files/totd.init create mode 100644 ipv6/totd/patches/001-no_warning_as_errors.patch create mode 100644 ipv6/tspc/Makefile create mode 100644 ipv6/tspc/patches/001-debian_patches.patch create mode 100644 ipv6/wide-dhcpv6/Makefile create mode 100644 ipv6/wide-dhcpv6/files/dhcp6c-dnsmasq.hotplug create mode 100644 ipv6/wide-dhcpv6/files/dhcp6c-radvd.hotplug create mode 100644 ipv6/wide-dhcpv6/files/dhcp6c-state create mode 100644 ipv6/wide-dhcpv6/files/dhcp6c.conf create mode 100644 ipv6/wide-dhcpv6/files/dhcp6c.hotplug create mode 100644 ipv6/wide-dhcpv6/files/dhcp6c.init create mode 100644 ipv6/wide-dhcpv6/files/dhcp6s.conf create mode 100644 ipv6/wide-dhcpv6/files/dhcp6s.hotplug create mode 100644 ipv6/wide-dhcpv6/files/dhcp6s.init create mode 100644 ipv6/wide-dhcpv6/patches/000-cftoken-noyywrap.patch create mode 100644 ipv6/wide-dhcpv6/patches/001-linux_old_compat.patch create mode 100644 ipv6/wide-dhcpv6/patches/002-fix-dprintf-clash.patch create mode 100644 lang/cython/Makefile create mode 100644 lang/distribute/Makefile create mode 100644 lang/egenix-mx/Makefile create mode 100644 lang/eggdrop/Makefile create mode 100644 lang/eggdrop/patches/001-makefile_in.patch create mode 100644 lang/eggdrop/patches/002-eggdrop_h.patch create mode 100644 lang/eggdrop/patches/003-language_c.patch create mode 100644 lang/eggdrop/patches/004-main_c.patch create mode 100644 lang/erlang/Makefile create mode 100644 lang/erlang/patches/101-emulator_includes.patch create mode 100644 lang/erlang/patches/102-relative_symlinks.patch create mode 100644 lang/gst-python/Makefile create mode 100644 lang/ipython/Makefile create mode 100644 lang/jamvm/Makefile create mode 100644 lang/jsonpath/Makefile create mode 100644 lang/kid/Makefile create mode 100644 lang/kid/patches/000-setup.patch create mode 100644 lang/logilab-astng/Makefile create mode 100644 lang/logilab-common/Makefile create mode 100644 lang/lsqlite3/Makefile create mode 100644 lang/luaexpat/Makefile create mode 100644 lang/luaexpat/files/compat-5.1r5/compat-5.1.c create mode 100644 lang/luaexpat/files/compat-5.1r5/compat-5.1.h create mode 100644 lang/luaexpat/files/compat-5.1r5/compat-5.1.lua create mode 100644 lang/luaexpat/patches/001-compile-fix.patch create mode 100644 lang/luafilesystem/Makefile create mode 100644 lang/luaposix/Makefile create mode 100644 lang/luaposix/patches/100-eglibc-compat.patch create mode 100644 lang/luaprofiler/Makefile create mode 100644 lang/luaprofiler/patches/100-link.patch create mode 100644 lang/luasec/Makefile create mode 100644 lang/luasocket/Makefile create mode 100644 lang/luasql/Makefile create mode 100644 lang/mako/Makefile create mode 100644 lang/numpy/Makefile create mode 100644 lang/numpy/patches/100-compile.patch create mode 100644 lang/perl-compress-bzip2/Makefile create mode 100644 lang/perl-dbi/Makefile create mode 100644 lang/perl-html-parser/Makefile create mode 100644 lang/perl-html-tagset/Makefile create mode 100644 lang/perl-html-tree/Makefile create mode 100644 lang/perl-lockfile-simple/Makefile create mode 100644 lang/perl-uri/Makefile create mode 100644 lang/perl-www-curl/Makefile create mode 100644 lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch create mode 100644 lang/perl-www-mechanize/Makefile create mode 100644 lang/perl-www/Makefile create mode 100644 lang/perl/Makefile create mode 100644 lang/perl/files/Module/ScanDeps.pm create mode 100644 lang/perl/files/config.sh-arm.in create mode 100644 lang/perl/files/config.sh-armeb.in create mode 100644 lang/perl/files/config.sh-avr32.in create mode 100644 lang/perl/files/config.sh-i486.in create mode 100644 lang/perl/files/config.sh-mips.in create mode 100644 lang/perl/files/config.sh-mipsel.in create mode 100644 lang/perl/files/config.sh-powerpc.in create mode 100644 lang/perl/files/perlmod-deps.sh create mode 100644 lang/perl/files/scan-perlbase.sh create mode 100644 lang/perl/files/strippm.sh create mode 100644 lang/perl/patches/100-static_uudmap.patch create mode 100644 lang/perl/patches/101-fix-cross-compile-endianness-detection.patch create mode 100644 lang/perl/patches/200-host-libc-dir-moved-debian+derivatives.patch create mode 100644 lang/perl/perlbase.mk create mode 100644 lang/perl/perlmod.mk create mode 100644 lang/php-pear-db/Makefile create mode 100644 lang/php-pear-db/patches/100-php5-deprecation-fixes.patch create mode 100644 lang/php-pear-xmlrpc/Makefile create mode 100644 lang/php-pear/Makefile create mode 100644 lang/php-pear/patches/000-remove_deprecation_messages.patch create mode 100644 lang/php4/Makefile create mode 100644 lang/php4/files/php.ini create mode 100644 lang/php4/files/php.init create mode 100644 lang/php4/patches/002-configure.patch create mode 100644 lang/php4/patches/003-dns_skipname.patch create mode 100644 lang/php4/patches/004-uts_domainname.patch create mode 100644 lang/php4/patches/100-compile_fix.patch create mode 100644 lang/php4/patches/110-openssl-1.0.0-compat.patch create mode 100644 lang/php5/Makefile create mode 100644 lang/php5/files/php.ini create mode 100644 lang/php5/files/php.init create mode 100644 lang/php5/patches/005-APC.patch create mode 100644 lang/php5/patches/100-fix_membar_producer_link_error_gcc41.patch create mode 100644 lang/php5/patches/101-fix_membar_producer_link_error_gcc3x.patch create mode 100644 lang/php5/patches/900-prevent_buildconf_force.patch create mode 100644 lang/php5/patches/950-Fix-dl-cross-compiling-issue.patch create mode 100644 lang/psycopg/Makefile create mode 100644 lang/pybluez/Makefile create mode 100644 lang/pycairo/Makefile create mode 100644 lang/pyevent/Makefile create mode 100644 lang/pyevent/patches/000-libenevt_path_from_env.patch create mode 100644 lang/pyevent/patches/001-event-pyx-python25.patch create mode 100644 lang/pygobject/Makefile create mode 100644 lang/pygobject/patches/010-binary-constants-module.patch create mode 100644 lang/pygtk/Makefile create mode 100644 lang/pygtk/patches/001-automake-compat.patch create mode 100644 lang/pymysql/Makefile create mode 100644 lang/pymysql/patches/000-setup.patch create mode 100644 lang/pymysql/patches/010-threadsafe.patch create mode 100644 lang/pyopenssl/Makefile create mode 100644 lang/pypcap/Makefile create mode 100644 lang/pypcap/patches/000-no_cpickle.patch create mode 100644 lang/pypcap/patches/001-python2_5.patch create mode 100644 lang/pyqt4/Makefile create mode 100755 lang/pyqt4/files/fixup.sh create mode 100755 lang/pyqt4/files/qt_versioning.sh create mode 100644 lang/pyqt4/patches/100-cross-compile.patch create mode 100644 lang/pyserial/Makefile create mode 100644 lang/pysqlite/Makefile create mode 100644 lang/pysqlite/files/setup.cfg.in create mode 100644 lang/python-cjson/Makefile create mode 100644 lang/python-cjson/patches/001-unicode-buffer-overflow.patch create mode 100644 lang/python-crypto/Makefile create mode 100644 lang/python-curl/Makefile create mode 100644 lang/python-curl/patches/001-no_static.patch create mode 100644 lang/python-dbus/Makefile create mode 100644 lang/python-gnome-desktop2/Makefile create mode 100644 lang/python-ifconfig/Makefile create mode 100644 lang/python-ifconfig/patches/001-errorcheck.patch create mode 100644 lang/python-ifconfig/patches/002-checkflags-up.patch create mode 100644 lang/python-json/Makefile create mode 100644 lang/python-sip/Makefile create mode 100644 lang/python-sip/files/python-sip-package.mk create mode 100644 lang/python-sip/files/sipconfig.macros.template create mode 100644 lang/python-sip/patches/100-cross-compile.patch create mode 100644 lang/python/Makefile create mode 100644 lang/python/files/python-package.mk create mode 100644 lang/python/patches/000-cross-compile.patch create mode 100644 lang/python/patches/010-cannot-run-test-programm.patch create mode 100644 lang/python/patches/020-dont-compile-python-files.patch create mode 100644 lang/python/patches/030-fixup-include-dirs.patch create mode 100644 lang/python/patches/040-dont-import-cross-compiled-modules.patch create mode 100644 lang/python/patches/070-dont-clean-ipkg-install.patch create mode 100644 lang/python/patches/080-distutils-dont_adjust_files.patch create mode 100644 lang/python/patches/090-fix-ctypes.patch create mode 100644 lang/python/patches/110-enable-zlib.patch create mode 100644 lang/python/patches/120-force-internal-modules-for-hashlib.patch create mode 100644 lang/python2-chardet/Makefile create mode 100644 lang/pyusb/Makefile create mode 100644 lang/pyxdg/Makefile create mode 100644 lang/pyyaml/Makefile create mode 100644 lang/ruby/Makefile create mode 100644 lang/ruby/patches/0001-Add-option-which-enable-SSLv2-support.patch create mode 100644 lang/sigscheme/Makefile create mode 100644 lang/sqlite3-ruby/Makefile create mode 100644 lang/tcl/Makefile create mode 100644 lang/tcl/patches/100-disable_tzdata_and_msgs_install.patch create mode 100644 lang/tcl/patches/200-fix_mips_build.patch create mode 100644 lang/telepathy-python/Makefile create mode 100644 lang/twisted/Makefile create mode 100644 lang/twisted/patches/000-select_submodules.patch create mode 100644 lang/twisted/patches/001-dont_use_zope.patch create mode 100644 lang/urbi/Makefile create mode 100644 lang/urbi/patches/001-no_examples.patch create mode 100644 lang/urbi/patches/005-fix-gcc_4_3-compile.patch create mode 100644 lang/xapian-bindings/Makefile create mode 100644 lang/xapian-bindings/patches/010-build.patch create mode 100644 lang/yapsnmp/Makefile create mode 100644 lang/yapsnmp/patches/000-compile_fix.patch create mode 100644 lang/yapsnmp/patches/001-automake-compat.patch create mode 100644 libs/aalib/Makefile create mode 100644 libs/aalib/patches/001-destdir.patch create mode 100644 libs/alsa-lib/Makefile create mode 100644 libs/alsa-lib/patches/001-link_fix.patch create mode 100644 libs/alsa-lib/patches/003-mips-atomic-static-inline.patch create mode 100644 libs/apr-util/Makefile create mode 100644 libs/apr-util/patches/001-automake-compat.patch create mode 100644 libs/apr/Makefile create mode 100644 libs/apr/patches/001-autoconf-compat.patch create mode 100644 libs/apr/patches/101-fix_apr_time_now.patch create mode 100644 libs/argp-standalone/Makefile create mode 100644 libs/argp-standalone/patches/001-throw-in-funcdef.patch create mode 100644 libs/argtable/Makefile create mode 100644 libs/avahi/Makefile create mode 100644 libs/avahi/files/avahi-daemon.conf create mode 100644 libs/avahi/files/avahi-daemon.init create mode 100644 libs/avahi/files/service-http create mode 100644 libs/avahi/files/service-ssh create mode 100644 libs/avahi/patches/010-step_back_autotools-no-gettext.patch create mode 100644 libs/axtls/Makefile create mode 100644 libs/axtls/files/config create mode 100644 libs/axtls/patches/001-opt_flags.patch create mode 100644 libs/axtls/patches/002-axhttpd_install.patch create mode 100644 libs/bluez-libs/Makefile create mode 100644 libs/bluez-libs/patches/010-dont-override-libdir.patch create mode 100644 libs/boost/Makefile create mode 100644 libs/boost/patches/010-one-cpu.patch create mode 100644 libs/boost/patches/020-buildin-offsetof.patch create mode 100644 libs/c-ares/Makefile create mode 100644 libs/cgilib/Makefile create mode 100644 libs/cgilib/patches/200-cgitest_bugfix.patch create mode 100644 libs/cgilib/patches/300-cpp_bugfix.patch create mode 100644 libs/check/Makefile create mode 100644 libs/classpath/Makefile create mode 100644 libs/clearsilver/Config.in create mode 100644 libs/clearsilver/Makefile create mode 100644 libs/clearsilver/patches/001-gcc-vs-dollar-cc.patch create mode 100644 libs/clearsilver/patches/002-make-install-depends.patch create mode 100644 libs/clearsilver/patches/003-disable-tests.patch create mode 100644 libs/clearsilver/patches/100-remove_warnings.patch create mode 100644 libs/clearsilver/patches/101-fix_content_type_ff3.patch create mode 100644 libs/clearsilver/patches/102-add_x_requested_http_headers.patch create mode 100644 libs/clinkc/Makefile create mode 100644 libs/confuse/Makefile create mode 100644 libs/confuse/patches/001-no_werror.patch create mode 100644 libs/credis/Makefile create mode 100644 libs/credis/patches/200-Makefile.patch create mode 100644 libs/curl/Makefile create mode 100644 libs/curl/patches/100-cross-compile.patch create mode 100644 libs/curl/patches/200-no_docs_tests.patch create mode 100644 libs/curl/patches/510-no_sslv2.patch create mode 100644 libs/cyrus-sasl/Makefile create mode 100644 libs/cyrus-sasl/patches/001-automake-compat.patch create mode 100644 libs/cyrus-sasl/patches/200-fix_avr32_compile.patch create mode 100644 libs/db47/Makefile create mode 100644 libs/db47/patches/001-sequence_lock.patch create mode 100644 libs/db47/patches/002-lock.patch create mode 100644 libs/db47/patches/003-dead_lock.patch create mode 100644 libs/dbus-glib/Makefile create mode 100644 libs/dbus-glib/patches/001-cross.patch create mode 100644 libs/dbus-glib/patches/003-disable-tests-docs-examples.patch create mode 100644 libs/elfutils/Makefile create mode 100644 libs/elfutils/patches/001-elfutils-portability.patch create mode 100644 libs/elfutils/patches/002-no_tests.patch create mode 100644 libs/elfutils/patches/003-no_warnings_as_errors.patch create mode 100644 libs/elfutils/patches/004-memcpy_def.patch create mode 100644 libs/elfutils/patches/005-only_libdw_libelf.patch create mode 100644 libs/elfutils/patches/006-libdw_LIBS.patch create mode 100644 libs/eventlog/Makefile create mode 100644 libs/expat/Makefile create mode 100644 libs/ezxml/Makefile create mode 100644 libs/ezxml/patches/100-cross_compile.patch create mode 100644 libs/ezxml/patches/101-build_shared.patch create mode 100644 libs/ezxml/patches/200-ezxml_parse_str.patch create mode 100644 libs/ezxml/patches/201-ezxml_int.patch create mode 100644 libs/ezxml/patches/202-ezxml_child.patch create mode 100644 libs/ezxml/patches/203-ezxml_cut.patch create mode 100644 libs/faad2/Makefile create mode 100644 libs/fcgi/Makefile create mode 100644 libs/fcgi/patches/100-fcgio-int-type-fix.patch create mode 100644 libs/fcgi/patches/110-no_examples.patch create mode 100644 libs/fftw3/Makefile create mode 100644 libs/fftw3/patches/001-makefile.patch create mode 100644 libs/file/Makefile create mode 100644 libs/firewall-mod-save/Makefile create mode 100644 libs/firewall-mod-save/files/20_save.sh create mode 100644 libs/flac/Makefile create mode 100644 libs/flac/patches/001-no-docs-and-examples.patch create mode 100644 libs/flac/patches/002-no-utility.patch create mode 100644 libs/flac/patches/010-automake-compat.patch create mode 100644 libs/freetype/Makefile create mode 100644 libs/fribidi/Makefile create mode 100644 libs/gconf2/Makefile create mode 100644 libs/gconf2/patches/010-do-not-use-GTK_DOC-macro.patch create mode 100644 libs/gconf2/patches/020-do-not-build-examples_docs_pos_tests.patch create mode 100644 libs/gconv-modules/Makefile create mode 100644 libs/gd/Makefile create mode 100644 libs/gd/patches/100-configure_fix.patch create mode 100644 libs/gd/patches/101-gdlib-config.patch create mode 100644 libs/gdbm/Makefile create mode 100644 libs/gdbm/patches/100-fix-build-with-libtool2.patch create mode 100644 libs/gettext-full/Makefile create mode 100644 libs/gettext-full/patches/001-autotools.patch create mode 100644 libs/gettext-full/patches/001-no_examples_and_tests.patch create mode 100644 libs/gettext-full/patches/003-gettext-error_print_progname.patch create mode 100644 libs/gettext-full/patches/004-gnulib-uclibc-sched_param-def.patch create mode 100644 libs/gettext-full/patches/005-uclibc-0.9.30-compat.patch create mode 100644 libs/gettext-full/patches/100-error_progname.patch create mode 100644 libs/gettext-full/patches/120-uclibc-nolocale.patch create mode 100644 libs/gettext-full/patches/150-disable_libxml_iconv.patch create mode 100644 libs/gettext/Makefile create mode 100644 libs/gettext/src/include/libintl.h create mode 100644 libs/gettext/src/m4/codeset.m4 create mode 100644 libs/gettext/src/m4/gettext.m4 create mode 100644 libs/gettext/src/m4/intl.m4 create mode 100644 libs/gettext/src/m4/intldir.m4 create mode 100644 libs/gettext/src/m4/intlmacosx.m4 create mode 100644 libs/gettext/src/m4/lcmessage.m4 create mode 100644 libs/gettext/src/m4/nls.m4 create mode 100644 libs/gettext/src/m4/po.m4 create mode 100644 libs/giflib/Makefile create mode 100644 libs/glib/Makefile create mode 100644 libs/glib/patches/001-automake-compat.patch create mode 100644 libs/glib/patches/002-glibconfig-sysdefs.h.patch create mode 100644 libs/glib/patches/003-gcc-3.4-compat.patch create mode 100644 libs/glib/patches/004-underquoted-glib.m4.patch create mode 100644 libs/glib2/Makefile create mode 100644 libs/glib2/patches/001-automake-compat.patch create mode 100644 libs/glib2/patches/002-missing-gthread-include.patch create mode 100644 libs/glib2/patches/010-move-iconv-to-libs.patch create mode 100644 libs/glib2/patches/020-no-docs-tests-translations.patch create mode 100644 libs/glibmm/Makefile create mode 100644 libs/glibmm/patches/100-disable-examples-tests-doc-tools-scripts.patch create mode 100644 libs/gmp/Makefile create mode 100644 libs/gnutls/Makefile create mode 100644 libs/gnutls/patches/001-no_doc_tests_po.patch create mode 100644 libs/gperf/Makefile create mode 100644 libs/gsl/Makefile create mode 100644 libs/gsm/Makefile create mode 100644 libs/gsm/patches/001-debian-libsgm-1.0.10-13.patch create mode 100644 libs/howl/Makefile create mode 100644 libs/howl/files/autoipd.init create mode 100644 libs/howl/files/mDNSResponder.conf create mode 100644 libs/howl/files/mDNSResponder.init create mode 100644 libs/howl/files/nifd.init create mode 100644 libs/howl/patches/001-config.patch create mode 100644 libs/howl/patches/002-debug_log.patch create mode 100644 libs/howl/patches/003-proto_fix.patch create mode 100644 libs/howl/patches/004-linux_types.patch create mode 100644 libs/id3lib/Makefile create mode 100644 libs/id3lib/patches/100-missing_include.patch create mode 100644 libs/id3lib/patches/120-fix-configure-remove-check-for-iomanip_h.patch create mode 100644 libs/id3lib/patches/130-fix-includes.patch create mode 100644 libs/id3lib/patches/140-dont-build-examples.patch create mode 100644 libs/iksemel/Makefile create mode 100644 libs/iksemel/patches/001-missing-macros.patch create mode 100644 libs/intltool/Makefile create mode 100644 libs/jpeg/Makefile create mode 100644 libs/jpeg/patches/001-allow-ccache.patch create mode 100644 libs/jpeg/patches/200-crop.patch create mode 100644 libs/keynote/Makefile create mode 100644 libs/keynote/patches/001-build.patch create mode 100644 libs/keynote/patches/002-cross_compile.patch create mode 100644 libs/ldns/Makefile create mode 100644 libs/libIDL2/Makefile create mode 100644 libs/libaio/Makefile create mode 100644 libs/libaio/patches/001-arches_from_debian_package_0.3.106-8.patch create mode 100644 libs/libaio/patches/002-avr32_support.patch create mode 100644 libs/libamsel/Makefile create mode 100644 libs/libao/Makefile create mode 100644 libs/libart/Makefile create mode 100644 libs/libatomicops/Makefile create mode 100644 libs/libaudiofile/Makefile create mode 100644 libs/libaudiofile/patches/001-audiofile-config-libdirs.patch create mode 100644 libs/libcelt/Makefile create mode 100644 libs/libcli/Makefile create mode 100644 libs/libconfig/Makefile create mode 100644 libs/libcroco/Makefile create mode 100644 libs/libcroco/patches/001-automake-compat.patch create mode 100644 libs/libcrypto++/Makefile create mode 100644 libs/libcrypto++/patches/001-strict_gcc43_include.patch create mode 100644 libs/libcrypto++/patches/002-cryptest_data_files_location.patch create mode 100644 libs/libcrypto++/patches/003-autoconf_files.patch create mode 100644 libs/libcunit/Makefile create mode 100644 libs/libdaemon/Makefile create mode 100644 libs/libdbi/Makefile create mode 100644 libs/libdbi/patches/001-no_docs.patch create mode 100644 libs/libdirectfb/Makefile create mode 100644 libs/libdirectfb/patches/disable-asm.patch create mode 100644 libs/libdlna/Makefile create mode 100644 libs/libdlna/patches/100-configure_fix.patch create mode 100644 libs/libdlna/patches/200-parallel-build.patch create mode 100644 libs/libdmapsharing/Makefile create mode 100644 libs/libdnet/Makefile create mode 100644 libs/libdnet/patches/001-dnet_config.patch create mode 100644 libs/libdnet/patches/002-fix_avr32_compile.patch create mode 100644 libs/libdnet/patches/010-gcc4.patch create mode 100644 libs/libdvbpsi/Makefile create mode 100644 libs/libdvbpsi/patches/001-no_doc_examples.patch create mode 100644 libs/libdvdread/Makefile create mode 100644 libs/libelf/Makefile create mode 100644 libs/libevent/Makefile create mode 100644 libs/libevent2/Makefile create mode 100644 libs/libexif/Makefile create mode 100644 libs/libexif/patches/100-no_doc.patch create mode 100644 libs/libffi-sable/Makefile create mode 100644 libs/libffi/Makefile create mode 100644 libs/libftdi/Makefile create mode 100644 libs/libgcrypt/Makefile create mode 100644 libs/libgcrypt/patches/001-mips-h-constraint.patch create mode 100644 libs/libgcrypt/patches/002-no_docs_tests.patch create mode 100644 libs/libgpg-error/Makefile create mode 100644 libs/libgphoto2/Makefile create mode 100644 libs/libgphoto2/patches/001-automake-compat.patch create mode 100644 libs/libgphoto2/patches/002-no-tests-docs-examples-translations.patch create mode 100644 libs/libgssapi/Makefile create mode 100644 libs/libiconv-full/Makefile create mode 100644 libs/libiconv-full/patches/100-strip_charsets.patch create mode 100644 libs/libiconv-full/patches/101-autotools.patch create mode 100644 libs/libiconv-full/patches/103-configure_ac_fix.patch create mode 100644 libs/libiconv-full/patches/200-work-with-libtool2.patch create mode 100644 libs/libiconv/COPYING create mode 100644 libs/libiconv/COPYRIGHT create mode 100644 libs/libiconv/Makefile create mode 100644 libs/libiconv/src/iconv.c create mode 100644 libs/libiconv/src/include/charmaps.h create mode 100644 libs/libiconv/src/include/charmaps/iso-8859-10.h create mode 100644 libs/libiconv/src/include/charmaps/iso-8859-13.h create mode 100644 libs/libiconv/src/include/charmaps/iso-8859-14.h create mode 100644 libs/libiconv/src/include/charmaps/iso-8859-16.h create mode 100644 libs/libiconv/src/include/charmaps/iso-8859-2.h create mode 100644 libs/libiconv/src/include/charmaps/iso-8859-3.h create mode 100644 libs/libiconv/src/include/charmaps/iso-8859-4.h create mode 100644 libs/libiconv/src/include/charmaps/iso-8859-5.h create mode 100644 libs/libiconv/src/include/charmaps/iso-8859-6.h create mode 100644 libs/libiconv/src/include/charmaps/iso-8859-7.h create mode 100644 libs/libiconv/src/include/charmaps/iso-8859-8.h create mode 100644 libs/libiconv/src/include/charmaps/iso-8859-9.h create mode 100644 libs/libiconv/src/include/charmaps/koi8-r.h create mode 100644 libs/libiconv/src/include/charmaps/windows-1250.h create mode 100644 libs/libiconv/src/include/charmaps/windows-1251.h create mode 100644 libs/libiconv/src/include/charmaps/windows-1252.h create mode 100644 libs/libiconv/src/include/charmaps/windows-1253.h create mode 100644 libs/libiconv/src/include/charmaps/windows-1254.h create mode 100644 libs/libiconv/src/include/charmaps/windows-1255.h create mode 100644 libs/libiconv/src/include/charmaps/windows-1256.h create mode 100644 libs/libiconv/src/include/charmaps/windows-1257.h create mode 100644 libs/libiconv/src/include/charmaps/windows-1258.h create mode 100644 libs/libiconv/src/include/charmaps/windows-874.h create mode 100644 libs/libiconv/src/include/iconv.h create mode 100644 libs/libiconv/src/m4/iconv.m4 create mode 100644 libs/libid3tag/Makefile create mode 100644 libs/libidn/Makefile create mode 100644 libs/libidn/patches/001-remove-libtool.patch create mode 100644 libs/libidn/patches/002-disable-po-docs-examples.patch create mode 100644 libs/libinklevel/Makefile create mode 100644 libs/libinklevel/patches/001-configure.patch create mode 100644 libs/libinklevel/patches/002-disable_parport.patch create mode 100644 libs/libinklevel/patches/003-fix_usb_device_location.patch create mode 100644 libs/liblo/Makefile create mode 100644 libs/libmad/Makefile create mode 100644 libs/libmad/patches/001-mips_removal_h_constraint.patch create mode 100644 libs/libmcrypt/Makefile create mode 100644 libs/libmicrohttpd/Makefile create mode 100644 libs/libmikmod/Makefile create mode 100644 libs/libmikmod/patches/001-disable-doc.patch create mode 100644 libs/libmikmod/patches/003-automake-compat.patch create mode 100644 libs/libmms/Makefile create mode 100644 libs/libmodbus/Makefile create mode 100644 libs/libmpcdec/Makefile create mode 100644 libs/libmpcdec/patches/001-automake-compat.patch create mode 100644 libs/libmpcdec/patches/100-fixed_point.patch create mode 100644 libs/libmpd/Makefile create mode 100644 libs/libmpdclient/Makefile create mode 100644 libs/libnatpmp/Makefile create mode 100644 libs/libnatpmp/patches/001-cross_compile.patch create mode 100644 libs/libnet-1.0.x/Makefile create mode 100644 libs/libnet-1.0.x/patches/100-debian_subset.patch.gz create mode 100644 libs/libnet-1.0.x/patches/150-portability.patch create mode 100644 libs/libnet-1.1.x/Makefile create mode 100644 libs/libnet-1.1.x/patches/100-debian-subset.patch create mode 100644 libs/libnet-1.1.x/patches/150-portability.patch create mode 100644 libs/libnet-1.1.x/patches/160-endian_cache.patch create mode 100644 libs/libnetfilter-conntrack/Makefile create mode 100644 libs/libnetfilter-log/Makefile create mode 100644 libs/libnetfilter-queue/Makefile create mode 100644 libs/libnfc/Makefile create mode 100644 libs/libnfnetlink/Makefile create mode 100644 libs/libnfsidmap/Makefile create mode 100644 libs/libnfsidmap/patches/000-no-getgrouplist.patch create mode 100644 libs/libnids/Makefile create mode 100644 libs/libnids/patches/001-no_asm_for_i386.patch create mode 100644 libs/libnids/patches/002-configure.patch create mode 100644 libs/libnids/patches/003-missing_else.patch create mode 100644 libs/libogg/Makefile create mode 100644 libs/liboil/Makefile create mode 100644 libs/liboil/patches/001-no-tools-docs-examples.patch create mode 100644 libs/liboil/patches/002-pkgconfig.patch create mode 100644 libs/libol/Makefile create mode 100644 libs/liboping/Makefile create mode 100644 libs/liboping/patches/01-no-werror.patch create mode 100644 libs/libosip2/Makefile create mode 100644 libs/libosip2/patches/001-automake-compat.patch create mode 100644 libs/libowfat/Makefile create mode 100644 libs/libpam/Makefile create mode 100644 libs/libpam/patches/000-OE-pam-no-innetgr.patch create mode 100644 libs/libpam/patches/001-no_nis.patch create mode 100644 libs/libpam/patches/002-no_yywrap.patch create mode 100644 libs/libpam/patches/003-no_doc.patch create mode 100644 libs/libpam/patches/004-fix_lib64.patch create mode 100644 libs/libpar2/Makefile create mode 100644 libs/libpfm/Makefile create mode 100644 libs/libpng/Makefile create mode 100644 libs/libpng/patches/100-config_fix.patch create mode 100644 libs/libpthread-stubs/Makefile create mode 100644 libs/libptmalloc3/Makefile create mode 100644 libs/libptmalloc3/patches/100-nothreads.patch create mode 100644 libs/librpcsecgss/Makefile create mode 100644 libs/librsync/Makefile create mode 100644 libs/librsync/patches/001-4gb_files.patch create mode 100644 libs/libsamplerate/Makefile create mode 100644 libs/libsamplerate/patches/001-fix-m4-loop.patch create mode 100644 libs/libsdl/Makefile create mode 100644 libs/libsdl/patches/001-automake-compat.patch create mode 100644 libs/libsdl_mixer/Makefile create mode 100755 libs/libsdl_mixer/files/sdl-config create mode 100644 libs/libsdl_mixer/patches/001-automake-compat.patch create mode 100644 libs/libsdl_mixer/patches/002-fix-linking.patch create mode 100644 libs/libsdl_sound/Makefile create mode 100644 libs/libshout/Makefile create mode 100644 libs/libshout/patches/100-ogg-c.patch create mode 100644 libs/libshout/patches/110-shout-ogg-c.patch create mode 100644 libs/libshout/patches/120-vorbis-c.patch create mode 100644 libs/libshout/patches/140-no_example_doc_win32.patch create mode 100644 libs/libsigc++/Makefile create mode 100644 libs/libsigc++/patches/001-no_doc_tests_examples.patch create mode 100644 libs/libsndfile/Makefile create mode 100644 libs/libsndfile/patches/001-automake-compat.patch create mode 100644 libs/libsoup/Makefile create mode 100644 libs/libsynce/Makefile create mode 100644 libs/libtasn1/Makefile create mode 100644 libs/libtheora/Makefile create mode 100644 libs/libtheora/patches/001-no_docs_tests.patch create mode 100644 libs/libtorrent/Makefile create mode 100644 libs/libtorrent/patches/100-fix_cross_compile.patch create mode 100644 libs/libtorrent/patches/120-fix-ipv6_socket_datagram.patch create mode 100644 libs/libtwin/Makefile create mode 100644 libs/libtwin/patches/100-compile_fix.patch create mode 100644 libs/libupnp/Makefile create mode 100644 libs/libusb-1.0/Makefile create mode 100644 libs/libusb-1.0/patches/001-timerfd.patch create mode 100644 libs/libusb/Makefile create mode 100644 libs/libusb/patches/000-debian_packed.patch create mode 100644 libs/libusb/patches/001-debian_ansi_types.patch create mode 100644 libs/libusb/patches/002-no_libusbpp.patch create mode 100644 libs/libusb/patches/003-automake-compat.patch create mode 100644 libs/libusb/patches/004-no_unused.patch create mode 100644 libs/libv4l/Makefile create mode 100644 libs/libv4l/patches/001-no-shm_open-fix.patch create mode 100644 libs/libvncserver/Makefile create mode 100644 libs/libvncserver/patches/001-automake-compat.patch create mode 100644 libs/libvncserver/patches/100-noexamples.patch create mode 100644 libs/libvorbis/Makefile create mode 100644 libs/libvorbis/patches/001-automake-compat.patch create mode 100644 libs/libvorbisidec/Makefile create mode 100644 libs/libxapian/Makefile create mode 100644 libs/libxapian/patches/001-missing_includes.patch create mode 100644 libs/libxapian/patches/002-elif_else_replacement.patch create mode 100644 libs/libxapian/patches/003-no_docs_tests.patch create mode 100644 libs/libxapian/patches/004-xapian_config_no_ltlibs.patch create mode 100644 libs/libxml2/Makefile create mode 100644 libs/libxslt/Makefile create mode 100644 libs/libyaml/Makefile create mode 100644 libs/lzo/Makefile create mode 100644 libs/matrixssl/Makefile create mode 100644 libs/matrixssl/patches/100-matrixssl_1.2.4.patch create mode 100644 libs/matrixssl/patches/200-compile-fixes.patch create mode 100644 libs/mxml/Makefile create mode 100644 libs/mxml/patches/001-targets.patch create mode 100644 libs/mysql/Makefile create mode 100644 libs/mysql/conf/my.cnf create mode 100644 libs/mysql/files/lex_hash.h create mode 100644 libs/mysql/files/mysqld.init create mode 100644 libs/mysql/patches/500-cross_compile.patch create mode 100644 libs/mysql/patches/501-disable-pthread-and-tests.patch create mode 100644 libs/mysql/patches/502-fix-hostname.patch create mode 100644 libs/nacl/Makefile create mode 100755 libs/nacl/do-openwrt create mode 100644 libs/neon/Makefile create mode 100644 libs/neon/patches/001-automake-compat.patch create mode 100644 libs/newt/Makefile create mode 100644 libs/newt/patches/100-compile-fix-broken-makefile.patch create mode 100644 libs/newt/patches/110-disable-snackmodule-python.patch create mode 100644 libs/nmeap/Makefile create mode 100644 libs/nmeap/patches/100-no_test.patch create mode 100644 libs/opal/Makefile create mode 100644 libs/opal/patches/010-fix-gcc_4_3-compile.patch create mode 100644 libs/opencdk/Makefile create mode 100644 libs/opencdk/patches/100-fix-tests-build create mode 100644 libs/opencdk/patches/200-verify-clearsigned.patch create mode 100644 libs/openh323/Makefile create mode 100644 libs/openh323/patches/001-configure.patch create mode 100644 libs/openldap/Makefile create mode 100644 libs/openldap/files/ldap.init create mode 100644 libs/openldap/patches/001-automake-compat.patch create mode 100644 libs/openldap/patches/020-autofs-schema.patch create mode 100644 libs/openldap/patches/750-no-strip.patch create mode 100644 libs/orbit2/Makefile create mode 100644 libs/orbit2/patches/001-remove-libtool.patch create mode 100644 libs/orbit2/patches/010-dont-run-testprograms.patch create mode 100644 libs/ortp/Makefile create mode 100644 libs/ossp-js/Makefile create mode 100644 libs/pcre/Makefile create mode 100644 libs/pcre/patches/750-pcre_config_cross.patch create mode 100644 libs/phidget21/Makefile create mode 100644 libs/poco/Makefile create mode 100644 libs/poco/patches/100-sharedmemory.patch create mode 100644 libs/polarssl/Makefile create mode 100644 libs/polarssl/patches/100-shared.patch create mode 100644 libs/polarssl/patches/110-make.patch create mode 100644 libs/popt/Makefile create mode 100644 libs/popt/patches/002-no-intl.patch create mode 100644 libs/postgresql/Makefile create mode 100644 libs/postgresql/files/postgresql.config create mode 100644 libs/postgresql/files/postgresql.init create mode 100644 libs/postgresql/patches/200-ranlib.patch create mode 100644 libs/postgresql/patches/800-busybox-default-pager.patch create mode 100644 libs/protobuf/Makefile create mode 100644 libs/pthsem/Makefile create mode 100644 libs/ptlib/Makefile create mode 100644 libs/ptlib/patches/010-fix-gcc_4_3-compile.patch create mode 100644 libs/pwlib/Makefile create mode 100644 libs/pwlib/patches/002-lib_mak.patch create mode 100644 libs/radiusclient-ng/Makefile create mode 100644 libs/radiusclient-ng/patches/001-cross_compile.patch create mode 100644 libs/radlib/Makefile create mode 100644 libs/radlib/patches/001-cross_link_bug.patch create mode 100644 libs/rblibtorrent/Makefile create mode 100644 libs/rblibtorrent/patches/enable-shared-linking.patch create mode 100644 libs/re/Makefile create mode 100644 libs/rrdtool-1.0.x/Makefile create mode 100644 libs/rrdtool-1.0.x/patches/001-no_ordering_cd_joke.patch create mode 100644 libs/rrdtool-1.0.x/patches/002-no_timezone.patch create mode 100644 libs/sctp/Makefile create mode 100644 libs/serdisplib/Makefile create mode 100644 libs/slang2/Makefile create mode 100755 libs/slang2/files/ncurses5-config create mode 100644 libs/spandsp/Makefile create mode 100644 libs/spandsp/patches/100-compile-fixes.patch create mode 100644 libs/speex/Makefile create mode 100644 libs/sqlite2/Makefile create mode 100644 libs/sqlite3/Makefile create mode 100644 libs/st2205tool/Makefile create mode 100644 libs/st2205tool/patches/100-base-makefile.patch create mode 100644 libs/st2205tool/patches/110-libst-makefile.patch create mode 100644 libs/st2205tool/patches/120-setpic-makefile.patch create mode 100644 libs/sysfsutils/Makefile create mode 100644 libs/sysfsutils/patches/200-mnt_path_check.patch create mode 100644 libs/taglib/Makefile create mode 100644 libs/taglib/patches/100-uclibc++-compat.patch create mode 100644 libs/tcp_wrappers/Makefile create mode 100644 libs/tcp_wrappers/patches/001-debian_subset.patch create mode 100644 libs/tcp_wrappers/patches/002-opt_cflags.patch create mode 100644 libs/tcp_wrappers/patches/003-scaffold_malloc.patch create mode 100644 libs/tcp_wrappers/patches/004-ipv4_prefix.patch create mode 100644 libs/tiff/Makefile create mode 100644 libs/tokyocabinet/Makefile create mode 100644 libs/tokyocabinet/patches/100-remove_extra_paths_from_configure.patch create mode 100644 libs/ucl/Makefile create mode 100644 libs/ucl/patches/001-autoconf-compat.patch create mode 100644 libs/uclibc++/Makefile create mode 100644 libs/uclibc++/files/config.default create mode 100644 libs/uclibc++/patches/001-path_to_make.patch create mode 100644 libs/uclibc++/patches/002-path_to_bash.patch create mode 100644 libs/uclibc++/patches/003-cp_command.patch create mode 100644 libs/uclibc++/patches/004-ccache_fixes.patch create mode 100644 libs/uclibc++/patches/005-wrapper.patch create mode 100644 libs/uclibc++/patches/006-eabi_fix.patch create mode 100644 libs/uclibc++/patches/007-numeric_limits.patch create mode 100644 libs/uclibc++/patches/008-integer_width.patch create mode 100644 libs/uclibc++/patches/009-compile_fixes.patch create mode 100644 libs/uclibc++/patches/900-dependent_exception.patch create mode 100644 libs/ustl/Makefile create mode 100644 libs/ustl/files/Common.mk create mode 100644 libs/ustl/files/config.h create mode 100644 libs/ustl/patches/001-install-DESTDIR.patch create mode 100644 libs/ustl/patches/002-install_path.patch create mode 100644 libs/ustl/patches/003-fix_stream_bounds_check_dep.patch create mode 100644 libs/vips/Makefile create mode 100644 libs/vips/patches/001-no_cpp.patch create mode 100644 libs/wxbase/Makefile create mode 100644 libs/xmlrpc-c/Makefile create mode 100644 libs/xmlrpc-c/patches/001-config.mk.in.patch create mode 100644 libs/xmlrpc-c/patches/002-automake-compat.patch create mode 100644 libs/xmpp4r/Makefile create mode 100644 libs/zaptel-1.4.x/Makefile create mode 100644 libs/zaptel-1.4.x/files/10-create-device-node create mode 100644 libs/zaptel-1.4.x/patches/002-upstream_hrtimer.patch create mode 100644 libs/zaptel-1.4.x/patches/100-no_hrtimer_on_x86_only.patch create mode 100644 libs/zaptel-1.4.x/patches/200-Makefile-pwd.patch create mode 100644 libs/zaptel-1.4.x/patches/330-uname_m.patch create mode 100644 libs/zaptel-1.4.x/patches/340-2.6.32.patch create mode 100644 libs/zaptel-1.4.x/patches/350-2.6.34.patch create mode 100644 libs/zaptel-1.4.x/patches/360-slab.patch create mode 100644 libs/zaptel-1.4.x/patches/370-2.6.36.patch create mode 100644 libs/zaptel/Makefile create mode 100644 libs/zaptel/patches/110-Makefile-tonezone_install.patch create mode 100644 mail/dovecot/Makefile create mode 100644 mail/dovecot/files/dovecot.init create mode 100644 mail/dovecot/patches/001-configure_in.patch create mode 100644 mail/dovecot/patches/002-example_conf.patch create mode 100644 mail/fetchmail/Makefile create mode 100644 mail/imapfilter/Makefile create mode 100644 mail/imapfilter/patches/010-pathnames.patch create mode 100644 mail/mini_sendmail/Makefile create mode 100644 mail/mini_sendmail/patches/200-fullname.patch create mode 100644 mail/mini_sendmail/patches/500-flags.patch create mode 100644 mail/msmtp/Makefile create mode 100644 mail/mutt/Makefile create mode 100644 mail/mutt/patches/001-no_po_and_docs.patch create mode 100644 mail/nullmailer/Makefile create mode 100644 mail/procmail/Makefile create mode 100644 mail/procmail/patches/001-procmail_openwrt.patch create mode 100644 mail/ssmtp/Makefile create mode 100644 mail/xmail/Makefile create mode 100644 mail/xmail/files/xmail.config create mode 100644 mail/xmail/files/xmail.init create mode 100644 mail/xmail/patches/010-Makefile.common.patch create mode 100644 mail/xmail/patches/020-Makefile.lnx.patch create mode 100644 mail/xmail/patches/030-sysmachine.patch create mode 100644 mail/xmail/patches/040-honour_opt_flags.patch create mode 100644 multimedia/crtmpserver/Makefile create mode 100644 multimedia/crtmpserver/patches/010-link-crypt-for-lua.patch create mode 100644 multimedia/crtmpserver/patches/020-add-rpath.patch create mode 100644 multimedia/crtmpserver/patches/030-default-config.patch create mode 100644 multimedia/crtmpserver/patches/040-use-select.patch create mode 100644 multimedia/ffmpeg/Config.in create mode 100644 multimedia/ffmpeg/Makefile create mode 100644 multimedia/ffmpeg/patches/901-fix_libswscale_on_x86.patch create mode 100644 multimedia/fswebcam/Makefile create mode 100644 multimedia/ftpd-topfield/Makefile create mode 100644 multimedia/ftpd-topfield/files/ftpd-topfield.conf create mode 100644 multimedia/ftpd-topfield/files/ftpd-topfield.sh create mode 100644 multimedia/ftpd-topfield/patches/001-kernel_header_rename.patch create mode 100644 multimedia/gmediaserver/Makefile create mode 100644 multimedia/gmediaserver/files/gmediaserver.config create mode 100644 multimedia/gmediaserver/files/gmediaserver.init create mode 100644 multimedia/gmediaserver/patches/010-compile-fixes.patch create mode 100644 multimedia/gphoto2/Makefile create mode 100644 multimedia/gphoto2/patches/001-automake-compat.patch create mode 100644 multimedia/gphoto2/patches/002-disable-docs-translations.patch create mode 100644 multimedia/gphoto2/patches/100-gpdebug.patch create mode 100644 multimedia/graphicsmagick/Makefile create mode 100644 multimedia/gst-ffmpeg/Config.in create mode 100644 multimedia/gst-ffmpeg/Makefile create mode 100644 multimedia/gst-plugins-bad/Makefile create mode 100644 multimedia/gst-plugins-bad/patches/000-gettext.patch create mode 100644 multimedia/gst-plugins-base/Makefile create mode 100644 multimedia/gst-plugins-base/patches/001-no_docs.patch create mode 100644 multimedia/gst-plugins-base/patches/002-no_tests.patch create mode 100644 multimedia/gst-plugins-base/patches/003-no_translations.patch create mode 100644 multimedia/gst-plugins-good/Makefile create mode 100644 multimedia/gst-plugins-good/patches/001-no_docs.patch create mode 100644 multimedia/gst-plugins-good/patches/002-no_tests.patch create mode 100644 multimedia/gst-plugins-good/patches/003-no_translations.patch create mode 100644 multimedia/gst-plugins-ugly/Makefile create mode 100644 multimedia/gst-plugins-ugly/patches/001-no_docs.patch create mode 100644 multimedia/gst-plugins-ugly/patches/002-no_tests.patch create mode 100644 multimedia/gst-plugins-ugly/patches/003-no_translations.patch create mode 100644 multimedia/gstreamer/Makefile create mode 100644 multimedia/gstreamer/patches/001-no_docs.patch create mode 100644 multimedia/gstreamer/patches/002-no_tests.patch create mode 100644 multimedia/gstreamer/patches/003-no_translations.patch create mode 100644 multimedia/hasciicam/Makefile create mode 100644 multimedia/icecast/Makefile create mode 100644 multimedia/icecast/libvorbisidec.mk create mode 100644 multimedia/icecast/patches/001-icecast-2.3.0-tremor.patch create mode 100644 multimedia/icecast/patches/010-fix_libcurl_test_crap.patch create mode 100644 multimedia/imagemagick/Makefile create mode 100644 multimedia/kissdx/Makefile create mode 100644 multimedia/kissdx/files/kissdx.config create mode 100755 multimedia/kissdx/files/kissdx.init create mode 100644 multimedia/kissdx/patches/001-cross_compile.patch create mode 100644 multimedia/linux-uvc/Makefile create mode 100644 multimedia/minidlna/Makefile create mode 100644 multimedia/minidlna/files/minidlna.init create mode 100644 multimedia/minidlna/patches/010-genconfig-checks.patch create mode 100644 multimedia/minidlna/patches/020-makefile-tweaks.patch create mode 100644 multimedia/minidlna/patches/030-missing-include.patch create mode 100644 multimedia/minidlna/patches/040-configuration-tweak.patch create mode 100644 multimedia/mjpg-streamer/Makefile create mode 100644 multimedia/mjpg-streamer/files/mjpg-streamer.config create mode 100644 multimedia/mjpg-streamer/files/mjpg-streamer.hotplug create mode 100644 multimedia/mjpg-streamer/files/mjpg-streamer.init create mode 100644 multimedia/mocp/Makefile create mode 100644 multimedia/motion/Makefile create mode 100644 multimedia/motion/patches/002-honor_cppflags.patch create mode 100644 multimedia/nw802-2.4/Makefile create mode 100644 multimedia/nw802-2.4/patches/001-linux_2_6_cvs.patch create mode 100644 multimedia/nw802-2.4/patches/100-compile_fix.patch create mode 100644 multimedia/ov51x-jpeg/Makefile create mode 100644 multimedia/ov51x-jpeg/patches/100-compile_fix.patch create mode 100644 multimedia/palantir/Makefile create mode 100644 multimedia/palantir/patches/001-opt_flags.patch create mode 100644 multimedia/peercast/Makefile create mode 100644 multimedia/peercast/files/peercast.ini create mode 100644 multimedia/peercast/files/peercast.init create mode 100644 multimedia/puppy/Makefile create mode 100644 multimedia/qc-usb/Makefile create mode 100644 multimedia/qc-usb/patches/001-linux_2_6.patch create mode 100644 multimedia/qc-usb/patches/002-qc_set_cross_compile.patch create mode 100644 multimedia/qc-usb/patches/003-linux_2_6_27.patch create mode 100644 multimedia/qc-usb/patches/004-linux_2_6_28.patch create mode 100644 multimedia/spca5xx-le/Makefile create mode 100644 multimedia/spca5xx-le/patches/100-compile_pud_shift.patch create mode 100644 multimedia/spca5xx-le/patches/101-linux_2_6.patch create mode 100644 multimedia/spca5xx-view/Makefile create mode 100644 multimedia/spca5xx-view/files/servfox.config create mode 100644 multimedia/spca5xx-view/files/servfox.init create mode 100644 multimedia/spcaview/Makefile create mode 100644 multimedia/spcaview/patches/001-gcc.patch create mode 100644 multimedia/ushare/Makefile create mode 100644 multimedia/ushare/files/ushare.config create mode 100644 multimedia/ushare/files/ushare.init create mode 100644 multimedia/ushare/patches/100-configure_grep_fix.patch create mode 100644 multimedia/ushare/patches/200-compile-fixes.patch create mode 100644 net/aircrack-ng/Makefile create mode 100644 net/aircrack-ng/patches/100-add-ignore-channel-negative-1.patch create mode 100644 net/aircrack-ptw/Makefile create mode 100644 net/aircrack-ptw/patches/001-smaller.patch create mode 100644 net/airpwn/Makefile create mode 100644 net/amule/Makefile create mode 100644 net/amule/patches/001-no_backtrace.patch create mode 100644 net/amwall/Makefile create mode 100644 net/amwall/patches/010-compile_fix.patch create mode 100644 net/aodv-uu/Makefile create mode 100644 net/aodv-uu/files/aodv-uu.modules create mode 100644 net/aodv-uu/patches/001-normalize.patch create mode 100644 net/aodv-uu/patches/002-linux_2.6.19_ip_route_me_harder_change.patch create mode 100644 net/aodv-uu/patches/003-linux_2.6.19_security_netlink_recv_change.patch create mode 100644 net/aodv-uu/patches/004-linux_2.6.19_includes.patch create mode 100644 net/aodv-uu/patches/005-linux_2.6.22_skbuff.patch create mode 100644 net/aoetools/Makefile create mode 100644 net/apache/Makefile create mode 100644 net/apache/patches/001-Makefile_in.patch create mode 100644 net/apache/patches/002-test_char_h.patch create mode 100644 net/apache/patches/003-logdir_fix.patch create mode 100644 net/apache/patches/004-pidfile_fix.patch create mode 100644 net/apache/patches/005-httpd_conf.patch create mode 100644 net/apcupsd/Makefile create mode 100644 net/apcupsd/files/apccontrol create mode 100644 net/apcupsd/files/apcupsd.conf create mode 100644 net/apcupsd/files/apcupsd.init create mode 100644 net/apcupsd/files/apcupsd_mail.conf create mode 100644 net/apcupsd/files/changeme create mode 100644 net/apcupsd/files/commfailure create mode 100644 net/apcupsd/files/commok create mode 100644 net/apcupsd/files/offbattery create mode 100644 net/apcupsd/files/onbattery create mode 100644 net/apcupsd/patches/010-fix-include-paths.patch create mode 100644 net/apf/Makefile create mode 100644 net/appweb/Makefile create mode 100644 net/aprx/Makefile create mode 100644 net/aprx/files/aprx.init create mode 100644 net/aprx/patches/100-Makefile_in.patch create mode 100644 net/arpd/Makefile create mode 100644 net/arpd/patches/001-configure_no_bpf.patch create mode 100644 net/arpd/patches/002-function_string.patch create mode 100644 net/arpd/patches/003-pcap_and_arg.patch create mode 100644 net/arpd/patches/004-no_dnet_config_check.patch create mode 100644 net/arpd/patches/005-remove-dropped-libevent-features.patch create mode 100644 net/arpwatch/Makefile create mode 100644 net/arpwatch/files/arpwatch.init create mode 100644 net/asterisk-1.8.x/Makefile create mode 100644 net/asterisk-1.8.x/files/asterisk.default create mode 100644 net/asterisk-1.8.x/files/asterisk.init create mode 100644 net/asterisk-1.8.x/patches/100-build_tools-iconv.patch create mode 100644 net/asterisk-1.8.x/patches/200-addons-defaultenable.patch create mode 100644 net/asterisk-1.8.x/patches/300-word_alignment_arm.patch create mode 100644 net/asterisk-1.8.x/patches/400-gtalk.patch create mode 100644 net/atftp/Makefile create mode 100644 net/atftp/patches/100-mconfig.patch create mode 100644 net/atftp/patches/110-services.patch create mode 100644 net/atftp/patches/120-retry_setting.patch create mode 100644 net/atftp/patches/130-missing_include.patch create mode 100644 net/autossh/Makefile create mode 100644 net/autossh/files/autossh.config create mode 100644 net/autossh/files/autossh.hotplug create mode 100644 net/autossh/files/autossh.init create mode 100644 net/axel/Makefile create mode 100644 net/babel/Makefile create mode 100644 net/babel/files/babeld.conf create mode 100644 net/babel/files/babeld.config create mode 100755 net/babel/files/babeld.init create mode 100644 net/babel/patches/001-fix-local_notify_route.patch create mode 100644 net/bahamut/Makefile create mode 100644 net/bahamut/patches/001-cross_compile.patch create mode 100644 net/bahamut/patches/002-glibc_fix.patch create mode 100644 net/bahamut/patches/010-dont-use-host-zlib.patch create mode 100644 net/baresip/Config.in create mode 100644 net/baresip/Makefile create mode 100644 net/baresip/files/baresip.init create mode 100644 net/batman-adv/Config.in create mode 100644 net/batman-adv/Makefile create mode 100644 net/batman-adv/files/etc/config/batman-adv create mode 100644 net/batman-adv/files/etc/init.d/batman-adv create mode 100644 net/batman/Makefile create mode 100644 net/batman/files/etc/config/batmand create mode 100644 net/batman/files/etc/config/vis create mode 100644 net/batman/files/etc/init.d/batmand create mode 100644 net/batman/files/etc/init.d/vis create mode 100644 net/batman/patches/100-2.6.36.patch create mode 100644 net/bind/Makefile create mode 100644 net/bind/files/bind/db.0 create mode 100644 net/bind/files/bind/db.127 create mode 100644 net/bind/files/bind/db.255 create mode 100644 net/bind/files/bind/db.local create mode 100644 net/bind/files/bind/db.root create mode 100644 net/bind/files/bind/named.conf.example create mode 100644 net/bind/files/named.init create mode 100644 net/bind/patches/001-automake-cross.patch create mode 100644 net/bind/patches/100-cross_compile.patch create mode 100644 net/bing/Makefile create mode 100644 net/bird/Makefile create mode 100644 net/bird/files/bird4.conf create mode 100644 net/bird/files/bird4.init create mode 100644 net/bird/files/bird4loop create mode 100644 net/bird/files/bird6.conf create mode 100644 net/bird/files/bird6.init create mode 100644 net/bird/files/bird6loop create mode 100644 net/bird/patches/0001-change_config_name.patch create mode 100644 net/bitchx/Makefile create mode 100644 net/bitchx/files/bitchxrc create mode 100644 net/bitchx/files/bitchxrc.init create mode 100644 net/bitchx/patches/001-fix_declarations.patch create mode 100644 net/bitchx/patches/002-tparm.patch create mode 100644 net/bitlbee/Makefile create mode 100644 net/bitlbee/files/bitlbee.init create mode 100644 net/bitlbee/patches/100-cross_compile_configure_fix create mode 100644 net/bmon/Makefile create mode 100644 net/bmon/patches/001-bugfixes.patch create mode 100644 net/bmx6/Makefile create mode 100644 net/bmx6/files/etc/config/bmx6 create mode 100644 net/bmx6/files/etc/init.d/bmx6 create mode 100644 net/bmxd/Makefile create mode 100644 net/bmxd/files/etc/config/bmxd create mode 100644 net/bmxd/files/etc/init.d/bmxd create mode 100644 net/btpd/Makefile create mode 100644 net/btpd/files/btpd.config create mode 100644 net/btpd/files/btpd.init create mode 100644 net/btpd/patches/000-sha1.diff create mode 100644 net/btpd/patches/001-gettime.patch create mode 100644 net/btpd/patches/002-config.h.patch create mode 100644 net/btpd/patches/100-clock.diff create mode 100644 net/bwm/Makefile create mode 100644 net/bwm/patches/001-debian.patch create mode 100644 net/bwping/Makefile create mode 100644 net/cbtt/Makefile create mode 100644 net/cbtt/patches/100-compile.patch create mode 100644 net/cdp/Makefile create mode 100644 net/cdp/patches/001-compile_fixes.patch create mode 100644 net/chaosvpn/Makefile create mode 100644 net/chaosvpn/files/chaosvpn.hotplug create mode 100644 net/chaosvpn/files/chaosvpn.init create mode 100644 net/chaosvpn/files/chaosvpn_config.sh create mode 100644 net/chaosvpn/patches/001-dist-makefile.patch create mode 100644 net/chillispot/Makefile create mode 100644 net/chillispot/files/chillispot.init create mode 100644 net/chillispot/patches/001-endian_fix.patch create mode 100644 net/chillispot/patches/102-less_memory-footprint.patch create mode 100644 net/chillispot/patches/110-macallowed_fix.patch create mode 100644 net/chillispot/patches/120-fix_bufferoverflow.patch create mode 100644 net/chillispot/patches/150-chillispot-rmtctrl.patch create mode 100644 net/chillispot/patches/200-gcc_fix.patch create mode 100644 net/chrony/Makefile create mode 100644 net/chrony/files/chrony.conf create mode 100644 net/chrony/files/chrony.keys create mode 100644 net/chrony/files/ntpd.config create mode 100644 net/chrony/files/ntpd.hotplug create mode 100644 net/chrony/files/ntpd.init create mode 100644 net/chrony/patches/001-crosscompile.patch create mode 100644 net/click/Makefile create mode 100644 net/click/files/roofnet.init create mode 100644 net/click/patches/100-compile_fix.patch create mode 100644 net/click/patches/110-multithread_fix.patch create mode 100644 net/cmdftp/Makefile create mode 100644 net/conntrack-tools/Makefile create mode 100644 net/coova-chilli/Makefile create mode 100644 net/corkscrew/Makefile create mode 100644 net/crowdcontrol/Makefile create mode 100644 net/ctorrent/Makefile create mode 100644 net/ctorrent/patches/100-CVE-2009-1759.patch create mode 100644 net/cups-bjnp/Makefile create mode 100644 net/cups/Makefile create mode 100644 net/cups/files/cupsd.init create mode 100644 net/cups/files/etc/cups/classes.conf create mode 100644 net/cups/files/etc/cups/client.conf create mode 100644 net/cups/files/etc/cups/cupsd.conf create mode 100644 net/cups/files/etc/cups/printers.conf create mode 100644 net/cups/patches/100-makefile-targets.patch create mode 100644 net/cups/patches/140-uname.patch create mode 100644 net/cups/patches/150-64bit_host_fix.patch create mode 100644 net/cups/patches/160-ppdc.patch create mode 100644 net/curlftpfs/Makefile create mode 100644 net/curlftpfs/patches/001-uclibc_mod.patch create mode 100644 net/cutter/Makefile create mode 100644 net/dansguardian/Makefile create mode 100644 net/dansguardian/patches/001-include_dir.patch create mode 100644 net/dante/Makefile create mode 100644 net/dante/patches/001-automake-compat.patch create mode 100644 net/dante/patches/100-do-not-use-defdname.patch create mode 100644 net/dante/patches/200-fix-RTLD_NEXT.patch create mode 100644 net/darkstat/Makefile create mode 100644 net/darkstat/files/darkstat.conf create mode 100644 net/darkstat/files/darkstat.init create mode 100644 net/ddns-scripts/Makefile create mode 100644 net/ddns-scripts/files/etc/config/ddns create mode 100644 net/ddns-scripts/files/etc/hotplug.d/iface/25-ddns create mode 100644 net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh create mode 100755 net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh create mode 100644 net/ddns-scripts/files/usr/lib/ddns/services create mode 100644 net/ddns-scripts/files/usr/lib/ddns/url_escape.sed create mode 100644 net/deluge/Makefile create mode 100644 net/deluge/files/deluge.config create mode 100644 net/deluge/files/deluge.init create mode 100644 net/dhcp-forwarder/Makefile create mode 100644 net/dhcp-forwarder/files/dhcp-fwd.init create mode 100644 net/dhcp/Makefile create mode 100644 net/dhcp/files/dhcpd.init create mode 100644 net/dhcp/patches/100-portability.patch create mode 100644 net/dhcp/patches/110-omit-docs.patch create mode 100644 net/dhcpcd/Makefile create mode 100644 net/dhcpcd/patches/001-run_dir.patch create mode 100644 net/dircproxy/Makefile create mode 100644 net/ditg/Makefile create mode 100644 net/ditg/patches/001-no_stropts.h create mode 100644 net/djbdns/Changelog create mode 100644 net/djbdns/Makefile create mode 100644 net/djbdns/README create mode 100644 net/djbdns/files/axfrdns.init create mode 100644 net/djbdns/files/axfrdns/tcp create mode 100644 net/djbdns/files/djbdns.conf create mode 100644 net/djbdns/files/dnscache.init create mode 100644 net/djbdns/files/dnscache/dnsroots.global create mode 100644 net/djbdns/files/dnscache/ignoreip-update create mode 100644 net/djbdns/files/dnscache/servers/@ create mode 100644 net/djbdns/files/dnsqrx create mode 100644 net/djbdns/files/dnsroots-update create mode 100644 net/djbdns/files/rbldns.init create mode 100644 net/djbdns/files/rbldns/data create mode 100644 net/djbdns/files/tinydns.init create mode 100644 net/djbdns/files/tinydns/add-alias create mode 100644 net/djbdns/files/tinydns/add-childns create mode 100644 net/djbdns/files/tinydns/add-host create mode 100644 net/djbdns/files/tinydns/add-mx create mode 100644 net/djbdns/files/tinydns/add-ns create mode 100644 net/djbdns/files/tinydns/data create mode 100644 net/djbdns/files/walldns.init create mode 100644 net/djbdns/patches/010-crosscompile.patch create mode 100644 net/djbdns/patches/020-dnsroots-update.patch create mode 100644 net/djbdns/patches/030-srv-records-and-axfrget.patch create mode 100644 net/djbdns/patches/040-dnscache-less-chatty-log.patch create mode 100644 net/djbdns/patches/050-tinydns-mmap-leak.patch create mode 100644 net/djbdns/patches/060-dnscache-big-udp-packets.patch create mode 100644 net/djbdns/patches/070-dnscache-dpos-tcp-servfail.patch create mode 100644 net/djbdns/patches/080-dnscache-cache-negatives.patch create mode 100644 net/djbdns/patches/090-tinydns-one-second.patch create mode 100644 net/djbdns/patches/110-dnscache-cachestats.patch create mode 100644 net/djbdns/patches/120-compiler-temporary-filename.patch create mode 100644 net/djbdns/patches/140-dnsnamex-extra-command.patch create mode 100644 net/djbdns/patches/200-dnscache-cname-handling.patch create mode 100644 net/djbdns/patches/210-dnscache-strict-forwardonly.patch create mode 100644 net/djbdns/patches/220-dnscacheip-space-separator.patch create mode 100644 net/djbdns/patches/230-tinydns-data-semantic-error.patch create mode 100644 net/djbdns/patches/240-tinydns-alias-chain-truncation.patch create mode 100644 net/djbdns/patches/250-dnscache-slogging.patch create mode 100644 net/djbdns/patches/260-dnsfilter-replace.patch create mode 100644 net/djbdns/patches/270-dnscache-sigpipe-fix.patch create mode 100644 net/djbdns/patches/280-dnscache-ignoreip2.patch create mode 100644 net/djbdns/patches/300-bugfix-dnscache-dempsky-poison.patch create mode 100644 net/djbdns/patches/310-bugfix-dnscache-merge-outgoing-requests.patch create mode 100644 net/djbdns/patches/320-bugfix-dnscache-cache-soa-records.patch create mode 100644 net/dmapd/Makefile create mode 100644 net/dmapd/files/dmapd.init create mode 100644 net/dmapd/patches/001-dmapd_conf.patch create mode 100644 net/dsl-qos-queue/Makefile create mode 100644 net/dsl-qos-queue/patches/001-cross_compile.patch create mode 100644 net/dsl-qos-queue/patches/002-include.patch create mode 100644 net/dsl-qos-queue/patches/010-ports_fix.patch create mode 100644 net/dsl-qos-queue/patches/020-fix_shebang_line.patch create mode 100644 net/dsniff/Makefile create mode 100644 net/dsniff/patches/001-arpspoof_fix.patch create mode 100644 net/dsniff/patches/001-dns.patch create mode 100644 net/dsniff/patches/003-gdbm.patch create mode 100644 net/dsniff/patches/004-no_yp.patch create mode 100644 net/dsniff/patches/005-openssl_fix.patch create mode 100644 net/dsniff/patches/006-pcap_header.patch create mode 100644 net/dsniff/patches/007-time_h.patch create mode 100644 net/dsniff/patches/008-md5_include.patch create mode 100644 net/dsniff/patches/010-clk-tck-fix.patch create mode 100644 net/dudders/Makefile create mode 100644 net/dudders/files/dudders.conf create mode 100644 net/dudders/files/dudders.hotplug create mode 100644 net/e169-stats/Makefile create mode 100644 net/e169-stats/patches/01-make.patch create mode 100644 net/ekg/Makefile create mode 100644 net/ekg/patches/100-compile-fixes.patch create mode 100644 net/elinks/Makefile create mode 100644 net/elinks/patches/002-fix_avr32_compile create mode 100644 net/et131x/Makefile create mode 100644 net/etherpuppet/Makefile create mode 100644 net/etherwake/Makefile create mode 100644 net/etherwake/files/etherwake.config create mode 100644 net/etherwake/files/etherwake.init create mode 100644 net/etherwake/patches/100-no_ether_hostton.patch create mode 100644 net/ethtool/Makefile create mode 100644 net/ethtool/patches/110-ixp4xx.patch create mode 100644 net/ettercap/Makefile create mode 100644 net/ettercap/patches/001-cross_compiling.patch create mode 100644 net/ettercap/patches/002-libnet_check_honor_ldflags.patch create mode 100644 net/ettercap/patches/003-automake-compat.patch create mode 100644 net/ez-ipupdate/Makefile create mode 100644 net/ez-ipupdate/files/ez-ipupdate.config create mode 100644 net/ez-ipupdate/files/ez-ipupdate.hotplug create mode 100644 net/ez-ipupdate/files/ez-ipupdate.init create mode 100644 net/ez-ipupdate/patches/001-debian_subset.patch create mode 100644 net/ez-ipupdate/patches/002-ez_ipupdate_everydns.patch create mode 100644 net/ez-ipupdate/patches/003-dnsexit.patch create mode 100644 net/ez-ipupdate/patches/004-zoneedit.patch create mode 100644 net/faifa/Makefile create mode 100644 net/flow-tools/Makefile create mode 100644 net/flow-tools/patches/001-cross_compile_configure_fix.patch create mode 100644 net/flow-tools/patches/002-flex_lib.patch create mode 100644 net/flow-tools/patches/010-python_script_location_fix.patch create mode 100644 net/flow-tools/patches/020-invalid_lvalue_in_assignment.patch create mode 100644 net/flow-tools/patches/030-avoid_external_debug_var.patch create mode 100644 net/flow-tools/patches/050-fix-64bit_temp_time_t.patch create mode 100644 net/flow-tools/patches/060-fix_uninitialized_var_in_flow_send.patch create mode 100644 net/flow-tools/patches/070-extra_ftpdu_verify_debugging.patch create mode 100644 net/flow-tools/patches/080-fix_uninitialized_var_in_flow_export.patch create mode 100644 net/fping/Makefile create mode 100644 net/fping/patches/001-debian.patch create mode 100644 net/fprobe-ulog/Makefile create mode 100644 net/fprobe/Makefile create mode 100644 net/freepops/Makefile create mode 100644 net/freeradius/Makefile create mode 100644 net/freeradius/files/radiusd.init create mode 100644 net/freeradius/patches/001-automake-compat.patch create mode 100644 net/freeradius/patches/002-config.patch create mode 100644 net/freeradius/patches/004-ldap_configure.patch create mode 100644 net/freeradius/patches/005-create_libdir_at_install.patch create mode 100644 net/freeradius/patches/007-no_openssl_engine_check.patch create mode 100644 net/freeradius/patches/008-honor_ccpflags.patch create mode 100644 net/freeradius/patches/009-no_pie.patch create mode 100644 net/freeradius2/Makefile create mode 100644 net/freeradius2/files/radiusd.init create mode 100644 net/freeradius2/patches/002-config.patch create mode 100644 net/freeradius2/patches/004-ldap_configure.patch create mode 100644 net/freeradius2/patches/008-honor_ccpflags.patch create mode 100644 net/freeradius2/patches/009-sql_sqlite_c.patch create mode 100644 net/freeswitch/Makefile create mode 100644 net/freeswitch/files/etc.minimal/autoload_configs/acl.conf.xml create mode 100644 net/freeswitch/files/etc.minimal/autoload_configs/callcenter.conf.xml create mode 100644 net/freeswitch/files/etc.minimal/autoload_configs/console.conf.xml create mode 100644 net/freeswitch/files/etc.minimal/autoload_configs/event_socket.conf.xml create mode 100644 net/freeswitch/files/etc.minimal/autoload_configs/local_stream.conf.xml create mode 100644 net/freeswitch/files/etc.minimal/autoload_configs/lua.conf.xml create mode 100644 net/freeswitch/files/etc.minimal/autoload_configs/modules.conf.xml create mode 100644 net/freeswitch/files/etc.minimal/autoload_configs/post_load_modules.conf.xml create mode 100644 net/freeswitch/files/etc.minimal/autoload_configs/sofia.conf.xml create mode 100644 net/freeswitch/files/etc.minimal/autoload_configs/spandsp.conf.xml create mode 100644 net/freeswitch/files/etc.minimal/autoload_configs/switch.conf.xml create mode 100644 net/freeswitch/files/etc.minimal/autoload_configs/timezones.conf.xml create mode 100644 net/freeswitch/files/etc.minimal/dialplan/default.xml create mode 100644 net/freeswitch/files/etc.minimal/dialplan/default/PLACEHOLDER create mode 100644 net/freeswitch/files/etc.minimal/dialplan/public.xml create mode 100644 net/freeswitch/files/etc.minimal/dialplan/public/PLACEHOLDER create mode 100644 net/freeswitch/files/etc.minimal/directory/default.xml create mode 100644 net/freeswitch/files/etc.minimal/directory/default/1000.xml create mode 100644 net/freeswitch/files/etc.minimal/directory/default/1001.xml create mode 100644 net/freeswitch/files/etc.minimal/directory/default/1002.xml create mode 100644 net/freeswitch/files/etc.minimal/directory/default/1003.xml create mode 100644 net/freeswitch/files/etc.minimal/directory/default/1004.xml create mode 100644 net/freeswitch/files/etc.minimal/directory/default/default.xml create mode 100644 net/freeswitch/files/etc.minimal/freeswitch.xml create mode 100644 net/freeswitch/files/etc.minimal/fur_elise.ttml create mode 100644 net/freeswitch/files/etc.minimal/jingle_profiles/client.xml create mode 100644 net/freeswitch/files/etc.minimal/jingle_profiles/server.xml create mode 100644 net/freeswitch/files/etc.minimal/mime.types create mode 100644 net/freeswitch/files/etc.minimal/sip_profiles/external.xml create mode 100644 net/freeswitch/files/etc.minimal/sip_profiles/external/example.xml create mode 100644 net/freeswitch/files/etc.minimal/sip_profiles/internal.xml create mode 100644 net/freeswitch/files/etc.minimal/sip_profiles/internal/example.xml create mode 100644 net/freeswitch/files/etc.minimal/tetris.ttml create mode 100644 net/freeswitch/files/etc.minimal/tones.conf create mode 100644 net/freeswitch/files/etc.minimal/vars.xml create mode 100644 net/freeswitch/files/etc.packages/cdr_csv/autoload_configs/cdr_csv.conf.xml create mode 100644 net/freeswitch/files/etc.packages/cdr_pg_csv/autoload_configs/cdr_pg_csv.conf.xml create mode 100644 net/freeswitch/files/etc.packages/logfile/autoload_configs/logfile.conf.xml create mode 100644 net/freeswitch/files/etc.packages/rtmp/autoload_configs/rtmp.conf.xml create mode 100644 net/freeswitch/files/etc.packages/say-de/lang/de/de.xml create mode 100644 net/freeswitch/files/etc.packages/say-de/lang/de/demo/demo.xml create mode 100644 net/freeswitch/files/etc.packages/say-de/lang/de/vm/tts.xml create mode 100644 net/freeswitch/files/etc.packages/say-en/lang/en/demo/demo-ivr.xml create mode 100644 net/freeswitch/files/etc.packages/say-en/lang/en/demo/demo.xml create mode 100644 net/freeswitch/files/etc.packages/say-en/lang/en/dir/sounds.xml create mode 100644 net/freeswitch/files/etc.packages/say-en/lang/en/dir/tts.xml create mode 100644 net/freeswitch/files/etc.packages/say-en/lang/en/en.xml create mode 100644 net/freeswitch/files/etc.packages/say-en/lang/en/vm/sounds.xml create mode 100644 net/freeswitch/files/etc.packages/say-en/lang/en/vm/tts.xml create mode 100644 net/freeswitch/files/etc.packages/say-fr/lang/fr/demo/demo.xml create mode 100644 net/freeswitch/files/etc.packages/say-fr/lang/fr/dir/sounds.xml create mode 100644 net/freeswitch/files/etc.packages/say-fr/lang/fr/dir/tts.xml create mode 100644 net/freeswitch/files/etc.packages/say-fr/lang/fr/fr.xml create mode 100644 net/freeswitch/files/etc.packages/say-fr/lang/fr/vm/sounds.xml create mode 100644 net/freeswitch/files/etc.packages/say-ru/lang/ru/demo/demo-ivr.xml create mode 100644 net/freeswitch/files/etc.packages/say-ru/lang/ru/demo/demo.xml create mode 100644 net/freeswitch/files/etc.packages/say-ru/lang/ru/dir/sounds.xml create mode 100644 net/freeswitch/files/etc.packages/say-ru/lang/ru/dir/tts.xml create mode 100644 net/freeswitch/files/etc.packages/say-ru/lang/ru/ru.xml create mode 100644 net/freeswitch/files/etc.packages/say-ru/lang/ru/vm/sounds.xml create mode 100644 net/freeswitch/files/etc.packages/say-ru/lang/ru/vm/tts.xml create mode 100644 net/freeswitch/files/etc.packages/syslog/autoload_configs/syslog.conf.xml create mode 100644 net/freeswitch/files/etc.packages/tts_commandline/autoload_configs/tts_commandline.conf.xml create mode 100644 net/freeswitch/files/etc.packages/voicemail/autoload_configs/voicemail.conf.xml create mode 100644 net/freeswitch/files/etc.packages/xml-cdr/autoload_configs/xml_cdr.conf.xml create mode 100644 net/freeswitch/files/freeswitch.config create mode 100644 net/freeswitch/files/freeswitch.default create mode 100644 net/freeswitch/files/freeswitch.hotplug create mode 100644 net/freeswitch/files/freeswitch.init create mode 100644 net/freeswitch/patches/001-Makefile.am.patch create mode 100644 net/freeswitch/patches/002-libs-esl-Makefile.patch create mode 100644 net/freeswitch/patches/003-src-mod-event_handlers-mod_event_zmq-Makefile.patch create mode 100644 net/freeswitch/patches/004-build-modules_conf_in.patch create mode 100644 net/freeswitch/patches/005-src-mod-applications-mod_mp4-mp4_helper_hpp.patch create mode 100644 net/frickin/Makefile create mode 100644 net/frickin/files/frickin.default create mode 100644 net/frickin/files/frickin.init create mode 100644 net/gesftpserver/Makefile create mode 100644 net/git/Makefile create mode 100644 net/git/patches/110-convert_builtin.patch create mode 100644 net/gpsd/Makefile create mode 100644 net/gpsd/files/gpsd.config create mode 100644 net/gpsd/files/gpsd.hotplug create mode 100644 net/gpsd/files/gpsd.init create mode 100644 net/gpsd/patches/100-cross-compile.patch create mode 100644 net/haproxy/Makefile create mode 100644 net/haproxy/files/haproxy.cfg create mode 100644 net/haproxy/files/haproxy.hotplug create mode 100644 net/haproxy/files/haproxy.init create mode 100644 net/hiawatha/Makefile create mode 100644 net/horst/Makefile create mode 100644 net/horst/patches/001-endian_fixes.patch create mode 100644 net/horst/patches/100-compile-fixes.patch create mode 100644 net/hping3/Makefile create mode 100644 net/hping3/patches/100-makefile.patch create mode 100644 net/hping3/patches/101-endianness.patch create mode 100644 net/hping3/patches/102-lib_rename.patch create mode 100644 net/htpdate/Makefile create mode 100644 net/htpdate/files/htpdate.default create mode 100644 net/htpdate/files/htpdate.init create mode 100644 net/htpdate/patches/100-adjtimex.patch create mode 100644 net/httping/Makefile create mode 100644 net/httping/patches/001-extra_flags.patch create mode 100644 net/httping/patches/002-version.patch create mode 100644 net/httptunnel/Makefile create mode 100644 net/httptunnel/files/httptunnel.conf create mode 100644 net/httptunnel/files/httptunnel.init create mode 100644 net/icmptx/Makefile create mode 100644 net/icmptx/patches/001-cross_compile.patch create mode 100644 net/ifstat/Makefile create mode 100644 net/ifstat/patches/001-configure_cross.patch create mode 100644 net/iftop/Makefile create mode 100644 net/iftop/patches/001-debian_armeb.patch create mode 100644 net/iftop/patches/002-debian_frozen_order.patch create mode 100644 net/iftop/patches/003-debian_arm.patch create mode 100644 net/iftop/patches/004-debian_bar_display.patch create mode 100644 net/iftop/patches/005-debian_bar_bytes.patch create mode 100644 net/igmpproxy/Makefile create mode 100644 net/igmpproxy/files/igmpproxy.conf create mode 100644 net/igmpproxy/files/igmpproxy.init create mode 100644 net/imsnif/Makefile create mode 100755 net/imsnif/files/imsnif create mode 100644 net/imsnif/patches/001-openwrt_paths.patch create mode 100644 net/imspector/Makefile create mode 100644 net/imspector/files/imspector.config create mode 100644 net/imspector/files/imspector.init create mode 100644 net/imspector/patches/010-openssl-1.0.0-compat.patch create mode 100644 net/iodine/Makefile create mode 100644 net/iodine/files/iodined.config create mode 100644 net/iodine/files/iodined.init create mode 100644 net/iodine/patches/010-cross-compile.patch create mode 100644 net/ipcad/Makefile create mode 100644 net/ipcad/patches/001-honor_cppflags.patch create mode 100644 net/ipcad/patches/010-no-host-includes.patch create mode 100644 net/iperf/Makefile create mode 100644 net/iperf/patches/001-set-report-next-time-in-single-thread-mode.patch create mode 100644 net/ipkungfu/Makefile create mode 100644 net/ipkungfu/patches/001-replace-modprobe-with-insmod.patch create mode 100644 net/ipsec-tools/Makefile create mode 100644 net/ipsec-tools/patches/001-no_libfl.patch create mode 100644 net/ipsec-tools/patches/003-linux_2.6.19_rtnetlink_changes.diff create mode 100644 net/ipsec-tools/patches/004-opennhrp.patch create mode 100644 net/iptables-snmp/Makefile create mode 100644 net/iptables-snmp/patches/001-use_libiptc.patch create mode 100644 net/iptraf/Makefile create mode 100644 net/iptraf/patches/001-cross_compile.patch create mode 100644 net/iptraf/patches/002-ifaces.patch create mode 100644 net/iptraf/patches/003-exit_menu.patch create mode 100644 net/iptraf/patches/004-includes_fix.patch create mode 100644 net/iptraf/patches/005-atheros.patch create mode 100644 net/iptraf/patches/005-no_size_cmd.patch create mode 100644 net/ipupdate/Makefile create mode 100644 net/ipupdate/patches/100-name_conflict.patch create mode 100644 net/ipupdate/patches/200-byteorder.patch create mode 100644 net/iputils/Makefile create mode 100644 net/iputils/patches/001-iputils.patch create mode 100644 net/iputils/patches/002-fix-ipv6.patch create mode 100644 net/iputils/patches/003-fix-makefile.patch create mode 100644 net/iputils/patches/010-ping6_uclibc_resolv.patch create mode 100644 net/iputils/patches/011-ping6_use_gnu_source.patch create mode 100644 net/irssi-glib1/Makefile create mode 100644 net/irssi-glib1/patches/100-cross_compiling_fix.patch create mode 100644 net/irssi/Makefile create mode 100644 net/isakmpd/Makefile create mode 100644 net/isakmpd/patches/010-debian_3.patch create mode 100644 net/isakmpd/patches/020-standardize.patch create mode 100644 net/isakmpd/patches/030-openssl_hashes.patch create mode 100644 net/isakmpd/patches/040-security_fix.patch create mode 100644 net/isakmpd/patches/050-ar_cross.patch create mode 100644 net/jtg/Makefile create mode 100644 net/kamailio/Makefile create mode 100644 net/kamailio/files/kamailio.default create mode 100755 net/kamailio/files/kamailio.init create mode 100644 net/kamailio/patches/005-config_h.patch create mode 100644 net/kamailio/patches/007-modules_build.patch create mode 100644 net/karma/Makefile create mode 100644 net/keepalived/Makefile create mode 100644 net/keepalived/files/keepalived.init create mode 100644 net/kismet/Makefile create mode 100644 net/kismet/files/ap_manuf create mode 100644 net/kismet/files/client_manuf create mode 100644 net/kismet/files/kismet.conf create mode 100644 net/kismet/files/kismet_drone.conf create mode 100644 net/kismet/files/kismet_ui.conf create mode 100644 net/kismet/patches/010-dont-add-host-include-paths.patch create mode 100644 net/knock/Makefile create mode 100644 net/krb5/Makefile create mode 100644 net/krb5/files/krb5kdc create mode 100644 net/krb5/patches/001-krb5kdc-dir-to-etc.patch create mode 100644 net/krb5/patches/002-MITKRB5-SA-2011-002.patch create mode 100644 net/l2tpd/Makefile create mode 100644 net/l2tpd/files/l2tpd.conf create mode 100644 net/l2tpd/files/l2tpd.init create mode 100644 net/l2tpd/files/options.l2tpd create mode 100644 net/l2tpd/patches/001-debian-2.patch create mode 100644 net/l2tpd/patches/002-debian-2-pty-rev.patch create mode 100644 net/l2tpd/patches/003-jacco-pty.patch create mode 100644 net/l2tpd/patches/004-gcc4.patch create mode 100644 net/l2tpd/patches/004-nonblock.patch create mode 100644 net/l2tpd/patches/005-df-disable.patch create mode 100644 net/l2tpns/Makefile create mode 100644 net/l2tpns/patches/001-honor_includes_no_fifo_scheduler.patch create mode 100644 net/l7-protocols/Makefile create mode 100644 net/l7-protocols/patches/100-testing_crosscompile.patch create mode 100644 net/l7-protocols/patches/101-testing-timeit.patch create mode 100644 net/l7-protocols/patches/102-testing-doallspeeds.patch create mode 100644 net/leafnode/Makefile create mode 100644 net/leafnode/files/news create mode 100644 net/leafnode/files/nntp create mode 100644 net/lft/Makefile create mode 100644 net/lft/patches/001-no_strip.patch create mode 100644 net/lftp/Makefile create mode 100644 net/lftp/patches/001-libintl.patch create mode 100644 net/lighttpd/Makefile create mode 100644 net/lighttpd/files/lighttpd.conf create mode 100644 net/lighttpd/files/lighttpd.default create mode 100644 net/lighttpd/files/lighttpd.init create mode 100644 net/linuxigd/Makefile create mode 100644 net/linuxigd/files/upnpd.conf create mode 100644 net/linuxigd/files/upnpd.init create mode 100644 net/linuxigd/patches/001-iptables_defs.patch create mode 100644 net/linuxigd/patches/002-netfilter_nat_headers.patch create mode 100644 net/linuxigd/patches/003-Makefile-fix.patch create mode 100644 net/linuxigd/patches/004-iptables-1.4.3.2-compat.patch create mode 100644 net/linuxigd/patches/005-includes.patch create mode 100644 net/lldpd/Makefile create mode 100644 net/lldpd/files/lldpd.config create mode 100644 net/lldpd/files/lldpd.init create mode 100644 net/lldpd/patches/001-no-multiuser.patch create mode 100644 net/lsm/Makefile create mode 100644 net/lsm/files/lsm.conf create mode 100644 net/lsm/files/lsm.init create mode 100644 net/lsm/files/lsm_script create mode 100644 net/mac-to-devinfo/Makefile create mode 100644 net/mac-to-devinfo/files/clean-devinfo create mode 100644 net/mac-to-devinfo/files/devinfo-functions.sh create mode 100644 net/mac-to-devinfo/files/ip-to-devinfo create mode 100644 net/mac-to-devinfo/files/mac-to-devinfo create mode 100644 net/mac-to-devinfo/files/macdevdb create mode 100644 net/mac-to-devinfo/files/mactodevinfo create mode 100644 net/mac-to-devinfo/files/netdiscover-to-devinfo create mode 100644 net/mac-to-devinfo/files/netsmap-to-devinfo create mode 100644 net/mac-to-devinfo/files/prep-devinfo create mode 100644 net/mac-to-devinfo/files/smap-to-devinfo create mode 100644 net/madwimax/Makefile create mode 100644 net/madwimax/files/20-madwimax create mode 100644 net/madwimax/files/event.sh create mode 100755 net/madwimax/files/madwimax create mode 100644 net/madwimax/patches/001-fix_detection_on_be.patch create mode 100644 net/maradns/Makefile create mode 100644 net/maradns/files/maradns.init create mode 100644 net/maradns/files/mararc create mode 100644 net/maradns/patches/001-cross_compile_fix.patch create mode 100644 net/matrixtunnel/Makefile create mode 100644 net/mdk3/Makefile create mode 100644 net/mdk3/patches/001-radiotap_needs_types_h.patch create mode 100644 net/mdk3/patches/010-fix-dependencies.patch create mode 100644 net/mdnsresponder/Makefile create mode 100644 net/mdnsresponder/files/mDNSResponder.init create mode 100644 net/mdnsresponder/patches/001-cross_compile.patch create mode 100644 net/mdnsresponder/patches/002-uclibc.patch create mode 100644 net/memcached/Makefile create mode 100644 net/memcached/files/memcached.config create mode 100644 net/memcached/files/memcached.init create mode 100644 net/memcached/patches/100-fix_iov_max.patch create mode 100644 net/mercurial/Makefile create mode 100644 net/mercurial/patches/001-no_bzip2.patch create mode 100644 net/mgen/Makefile create mode 100644 net/mgen/patches/100-ipv6.patch create mode 100644 net/miau/Makefile create mode 100644 net/miau/files/miau.init create mode 100644 net/miax/Makefile create mode 100644 net/miax/patches/001-cross.patch create mode 100644 net/mii-tool/Makefile create mode 100644 net/mii-tool/patches/001-include_linux_sockios.patch create mode 100644 net/mini_httpd/Makefile create mode 100644 net/mini_httpd/files/matrixssl_helper.c create mode 100644 net/mini_httpd/files/matrixssl_helper.h create mode 100644 net/mini_httpd/files/mini_httpd-ssl.conf create mode 100644 net/mini_httpd/files/mini_httpd.conf create mode 100644 net/mini_httpd/files/mini_httpd.default create mode 100644 net/mini_httpd/files/mini_httpd.init create mode 100644 net/mini_httpd/files/mini_httpd.pem create mode 100644 net/mini_httpd/patches/001-cgi_path.patch create mode 100644 net/mini_httpd/patches/500-matrixssl.patch create mode 100644 net/mini_snmpd/Makefile create mode 100644 net/mini_snmpd/files/mini_snmpd.config create mode 100644 net/mini_snmpd/files/mini_snmpd.init create mode 100644 net/mini_snmpd/patches/100-dualstack.patch create mode 100644 net/mini_snmpd/patches/101-opt_flags.patch create mode 100644 net/mini_snmpd/patches/102-mib_fix_uninitialized_memory.patch create mode 100644 net/mini_snmpd/patches/103-mib_encode_snmp_element_oid_fix.patch create mode 100644 net/miniupnpc/Makefile create mode 100644 net/miniupnpc/patches/100-no_minixml_test.patch create mode 100644 net/miniupnpc/patches/200-miniupnpc_desc.patch create mode 100644 net/miniupnpd/Makefile create mode 100644 net/miniupnpd/files/miniupnpd.firewall.hotplug create mode 100644 net/miniupnpd/files/miniupnpd.iface.hotplug create mode 100644 net/miniupnpd/files/miniupnpd.init create mode 100644 net/miniupnpd/files/upnpd.config create mode 100644 net/mtr/Makefile create mode 100644 net/mtr/patches/501-dns.patch create mode 100644 net/mtr/patches/502-fix-res_ninit.patch create mode 100644 net/mtr/patches/520-libresolv_fix.patch create mode 100644 net/mtr/patches/521-gtk_fix.patch create mode 100644 net/multiwan/Makefile create mode 100644 net/multiwan/files/etc/config/multiwan create mode 100755 net/multiwan/files/etc/init.d/multiwan create mode 100755 net/multiwan/files/usr/bin/multiwan create mode 100644 net/mutella/Makefile create mode 100644 net/mutella/patches/001-no_backtrace.patch create mode 100644 net/mutella/patches/002-gcc4_fixes.patch create mode 100644 net/mutella/patches/003-gcc4_3_fixes.patch create mode 100644 net/mutella/patches/004-no-host-paths.patch create mode 100644 net/mvprelay/Makefile create mode 100644 net/n2n/Makefile create mode 100644 net/n2n/files/n2n.config create mode 100644 net/n2n/files/n2n.init create mode 100644 net/natpmp/Makefile create mode 100644 net/natpmp/files/natpmp.config create mode 100644 net/natpmp/files/natpmp.init create mode 100644 net/nbd/Makefile create mode 100644 net/nbtscan/Makefile create mode 100644 net/ncftp/Makefile create mode 100644 net/ndyndns/Makefile create mode 100644 net/ndyndns/files/ndyndns.conf.sample create mode 100644 net/ndyndns/files/ndyndns.default create mode 100644 net/ndyndns/files/ndyndns.init create mode 100644 net/ndyndns/patches/010-dont-add-host-includes.patch create mode 100644 net/ndyndns/patches/020-ndyndns.patch create mode 100644 net/net-snmp/Makefile create mode 100644 net/net-snmp/files/snmpd.conf create mode 100644 net/net-snmp/files/snmpd.default create mode 100644 net/net-snmp/files/snmpd.init create mode 100644 net/net-snmp/patches/100-debian-statistics.patch create mode 100644 net/net-snmp/patches/110-debian-makefiles.patch create mode 100644 net/net-snmp/patches/120-debian-searchdirs.patch create mode 100644 net/net-snmp/patches/130-debian-extramibs.patch create mode 100644 net/net-snmp/patches/140-debian-docfiles.patch create mode 100644 net/net-snmp/patches/150-debian-defaultconfig.patch create mode 100644 net/net-snmp/patches/160-no_ldconfig.patch create mode 100644 net/net-snmp/patches/170-ldflags.patch create mode 100644 net/net-snmp/patches/750-ieee802dot11.patch create mode 100644 net/net-tools/Makefile create mode 100644 net/net-tools/patches/001-config.patch create mode 100644 net/net-tools/patches/002-compile-fixes.patch create mode 100644 net/netatalk/Makefile create mode 100644 net/netatalk/files/AppleVolumes.default create mode 100644 net/netatalk/files/AppleVolumes.system create mode 100644 net/netatalk/files/afpd.conf create mode 100644 net/netatalk/files/afpd.init create mode 100644 net/netcat/Makefile create mode 100644 net/netcat/patches/001-netcat_flag_count.patch create mode 100644 net/netdiscover/Makefile create mode 100644 net/netdiscover/patches/00-add-machine-ouput.patch create mode 100644 net/netdiscover/patches/01-initfix+end-fix.patch create mode 100644 net/netperf/Makefile create mode 100644 net/netperf/files/netserver.init create mode 100644 net/netperf/patches/001-dccp.patch create mode 100644 net/netpipe/Makefile create mode 100644 net/netstat-nat/Makefile create mode 100644 net/nfs-kernel-server/Makefile create mode 100644 net/nfs-kernel-server/files/nfsd.exports create mode 100644 net/nfs-kernel-server/files/nfsd.init create mode 100644 net/nfs-kernel-server/patches/001-nfs_utils_uclibc.patch create mode 100644 net/nfs-kernel-server/patches/002-no_ttycom_h.patch create mode 100644 net/nfs-kernel-server/patches/003-no_malloc_h.patch create mode 100644 net/nfs-server/Makefile create mode 100644 net/nfs-server/files/nfsd.exports create mode 100644 net/nfs-server/files/nfsd.init create mode 100644 net/nfs-server/patches/001-build_config.patch create mode 100644 net/nfs-server/patches/002-cross_compile_fix.patch create mode 100644 net/nfs-server/patches/003-debian_subset.patch create mode 100644 net/nfs-server/patches/004-gcc34_fix.patch create mode 100644 net/nfs-server/patches/005-remove_warning.patch create mode 100644 net/nginx/Config.in create mode 100644 net/nginx/Makefile create mode 100644 net/nginx/files/nginx.init create mode 100644 net/nginx/patches/001-feature_test_fix create mode 100644 net/nginx/patches/002-sizeof_test_fix create mode 100644 net/ngircd/Makefile create mode 100644 net/ngrep/Makefile create mode 100644 net/ngrep/patches/001-makefile_in.patch create mode 100644 net/ngrep/patches/001-ngrep.patch create mode 100644 net/nmap/Makefile create mode 100644 net/nocatauth/Makefile create mode 100755 net/nocatauth/files/nocatauth-gateway create mode 100644 net/nocatauth/patches/001-ptp-local.patch create mode 100644 net/nocatauth/patches/002-openwrt.patch create mode 100644 net/nocatauth/patches/003-fix-module-loading create mode 100644 net/nocatauth/patches/004-fw_detect.patch create mode 100644 net/nocatsplash/Makefile create mode 100644 net/nocatsplash/patches/001-openwrt_firewall.patch create mode 100644 net/nodogsplash/Makefile create mode 100644 net/nodogsplash/files/nodogsplash.init create mode 100644 net/nprobe/Makefile create mode 100644 net/nprobe/patches/001-automake-compat.patch create mode 100644 net/nprobe/patches/002-path_to_pcap.patch create mode 100644 net/nprobe/patches/003-ipv6_fix.patch create mode 100644 net/nstx/Makefile create mode 100644 net/nstx/patches/001-debian_changes.patch create mode 100644 net/ntpclient/Makefile create mode 100644 net/ntpclient/files/ntpclient.config create mode 100644 net/ntpclient/files/ntpclient.hotplug create mode 100644 net/ntpclient/patches/100-daemon.patch create mode 100644 net/ntpd/Makefile create mode 100644 net/ntpd/files/ntp.conf create mode 100644 net/ntpd/files/ntpd.hotplug create mode 100644 net/ntpd/files/ntpd.init create mode 100644 net/ntpd/files/ntpdate.init create mode 100644 net/nufw/Makefile create mode 100644 net/nufw/patches/001-no_doc_tests.patch create mode 100644 net/nufw/patches/002-debian_fixes.patch create mode 100644 net/nzbget/Makefile create mode 100644 net/nzbget/patches/001-openssl-1.0.0-compat.patch create mode 100644 net/nzbgetweb/Makefile create mode 100644 net/nzbgetweb/files/httpd.conf create mode 100644 net/nzbgetweb/files/lib/xmlrpc.inc create mode 100644 net/nzbgetweb/files/lib/xmlrpc_wrappers.inc create mode 100644 net/nzbgetweb/files/lib/xmlrpcs.inc create mode 100644 net/oidentd/Makefile create mode 100644 net/oidentd/files/oidentd.init create mode 100644 net/olsrd/Makefile create mode 100644 net/olsrd/files/olsrd.config create mode 100644 net/olsrd/files/olsrd.init create mode 100644 net/olsrd/files/olsrd_secure_key create mode 100644 net/olsrd/patches/100-no_forwarding_override.patch create mode 100644 net/olsrd/patches/200-txtinfo_gateways_formatting.patch create mode 100644 net/olsrd/patches/900-force_copy_olsrd_conf_file.patch create mode 100644 net/openconnect/Makefile create mode 100644 net/openconnect/patches/001-change-openssl-paths.patch create mode 100644 net/opendchub/Makefile create mode 100644 net/openl2tp/Makefile create mode 100644 net/openl2tp/patches/001-makefile.patch create mode 100644 net/openl2tp/patches/010-ppp_unix.patch create mode 100644 net/openl2tp/src/l2tp_rpc.h create mode 100644 net/openl2tp/src/l2tp_rpc_client.c create mode 100644 net/openl2tp/src/l2tp_rpc_server.c create mode 100644 net/openl2tp/src/l2tp_rpc_xdr.c create mode 100644 net/opennhrp/Makefile create mode 100755 net/opennhrp/files/opennhrp.init create mode 100644 net/opennhrp/patches/100-compile-fix.patch create mode 100644 net/openntpd/Makefile create mode 100644 net/openntpd/files/ntpd.conf create mode 100644 net/openntpd/files/ntpd.config create mode 100644 net/openntpd/files/ntpd.hotplug create mode 100644 net/openntpd/files/ntpd.init create mode 100644 net/openntpd/patches/001-adjtimex_linux.patch create mode 100644 net/openntpd/patches/002-save_freq_drift.patch create mode 100644 net/openntpd/patches/003-no_permission_check.patch create mode 100644 net/openrrcp/Makefile create mode 100644 net/openser/Makefile create mode 100644 net/openser/patches/001-openser_cfg.patch create mode 100644 net/openser/patches/002-sc.patch create mode 100644 net/openser/patches/003-makefile_defs.patch create mode 100644 net/openser/patches/004-cfg_lex.patch create mode 100644 net/openser/patches/005-config_h.patch create mode 100644 net/openser/patches/006-sc_dbtext.patch create mode 100644 net/openser/patches/007-modules_build.patch create mode 100644 net/opensips/Makefile create mode 100644 net/opensips/files/opensips.default create mode 100755 net/opensips/files/opensips.init create mode 100644 net/opensips/patches/001-no_rej.patch create mode 100644 net/opensips/patches/005-config_h.patch create mode 100644 net/opensips/patches/007-modules_build.patch create mode 100644 net/openslp/Makefile create mode 100644 net/openslp/files/etc/init.d/slpd create mode 100644 net/openslp/files/etc/slp.conf create mode 100644 net/openslp/files/etc/slp.reg create mode 100644 net/openslp/files/etc/slp.spi create mode 100644 net/openssh/Makefile create mode 100644 net/openssh/files/sshd.init create mode 100644 net/openssh/patches/100-no_cast_fix.patch create mode 100644 net/openssh/patches/110-no_ripemd_fix.patch create mode 100644 net/openssh/patches/130-implicit_memset_decl_fix.patch create mode 100644 net/openssh/patches/200-dscp-qos.patch create mode 100644 net/openswan/Makefile create mode 100755 net/openswan/files/ipsec.init create mode 100644 net/openswan/patches/110-scripts.patch create mode 100644 net/openswan/patches/120-no_manpages.patch create mode 100644 net/openswan/patches/130-compat_net_dev_ops.patch create mode 100644 net/openswan/patches/140-generated_autoconf.patch create mode 100644 net/openvpn-devel/Makefile create mode 120000 net/openvpn-devel/files create mode 100644 net/openvpn/Makefile create mode 100644 net/openvpn/files/easy-rsa.index create mode 100644 net/openvpn/files/easy-rsa.serial create mode 100644 net/openvpn/files/openvpn.config create mode 100644 net/openvpn/files/openvpn.init create mode 100644 net/openvpn/files/openvpn.upgrade create mode 100644 net/openvpn/patches/001-easy_rsa.patch create mode 100644 net/p910nd/Makefile create mode 100644 net/p910nd/files/p910nd.conf create mode 100644 net/p910nd/files/p910nd.init create mode 100644 net/parprouted/Makefile create mode 100755 net/parprouted/files/parprouted.default create mode 100644 net/parprouted/files/parprouted.init create mode 100644 net/parprouted/patches/001-parprouted.patch create mode 100644 net/pcapsipdump/Makefile create mode 100644 net/pcapsipdump/patches/001-cross_compile.patch create mode 100644 net/pcapsipdump/patches/002-elif_else_replacement.patch create mode 100644 net/peerguardian/Makefile create mode 100644 net/peerguardian/files/peerguardian.init create mode 100644 net/peerguardian/patches/001-no_host_includes.patch create mode 100644 net/peerguardian/patches/002-new_libipq.patch create mode 100644 net/peerguardian/patches/003-gcc_4_3-compile-fix.patch create mode 100644 net/pen/Makefile create mode 100644 net/pepperspot/Makefile create mode 100644 net/pepperspot/files/pepperspot.init create mode 100644 net/pepperspot/patches/101-cflags.patch create mode 100644 net/pepperspot/patches/102-no_warnings.patch create mode 100644 net/pepsal/Makefile create mode 100644 net/polipo/Makefile create mode 100644 net/polipo/files/polipo.config create mode 100644 net/polipo/files/polipo.init create mode 100644 net/portmap/Makefile create mode 100644 net/portmap/files/portmap.init create mode 100644 net/portmap/patches/101-no_pie.patch create mode 100644 net/portsentry/Makefile create mode 100644 net/portsentry/files/portsentry.init create mode 100644 net/portsentry/patches/100-conf_location.patch create mode 100644 net/portsentry/patches/101-postsentry_c.patch create mode 100644 net/pptpd/Makefile create mode 100644 net/pptpd/files/options.pptpd create mode 100644 net/pptpd/files/pptpd.conf create mode 100644 net/pptpd/files/pptpd.init create mode 100644 net/pptpd/patches/001-bad_pqueue_debug.patch create mode 100644 net/pptpd/patches/002-makefile_fix.patch create mode 100644 net/pptpd/patches/003-opt_flags.patch create mode 100644 net/privoxy/Makefile create mode 100644 net/privoxy/files/privoxy.config create mode 100644 net/privoxy/files/privoxy.init create mode 100644 net/proftpd/Makefile create mode 100644 net/proftpd/files/proftpd.init create mode 100644 net/proftpd/patches/001-automake-compat.patch create mode 100644 net/prosody/Makefile create mode 100644 net/prosody/files/prosody.init create mode 100644 net/prosody/patches/001-conf.patch create mode 100644 net/psybnc/Makefile create mode 100644 net/psybnc/patches/001-makefile.patch create mode 100644 net/psybnc/patches/002-conf.patch create mode 100644 net/psybnc/patches/003-psybnc.patch create mode 100644 net/psybnc/patches/004-start_script.patch create mode 100644 net/psybnc/patches/005-fix_endianess_detection.patch create mode 100644 net/ptpd/Makefile create mode 100644 net/ptpd/files/ptpd.init create mode 100644 net/ptunnel/Makefile create mode 100644 net/ptunnel/files/ptunnel.conf create mode 100644 net/ptunnel/files/ptunnel.init create mode 100644 net/ptunnel/patches/001-prefix.patch create mode 100644 net/ptunnel/patches/002-no_selinux.patch create mode 100644 net/pure-ftpd/Makefile create mode 100644 net/pure-ftpd/files/pure-ftpd.config create mode 100644 net/pure-ftpd/files/pure-ftpd.init create mode 100644 net/pure-ftpd/patches/010-dont-add-host-paths.patch create mode 100644 net/qolyester/Makefile create mode 100644 net/quagga/Makefile create mode 100644 net/quagga/files/quagga create mode 100644 net/quagga/files/quagga.conf create mode 100644 net/quagga/files/quagga.init create mode 100644 net/quagga/patches-old/001-quagga_cross.patch create mode 100644 net/quagga/patches-old/001-quagga_readline.patch create mode 100644 net/quagga/patches-old/002-quagga_manet.patch create mode 100644 net/quagga/patches-old/100-confederation.patch create mode 100644 net/quagga/patches-old/120-confed_errorhandle.patch create mode 100644 net/quagga/patches-old/130-netlink_ignore_wireless.patch create mode 100644 net/quagga/patches-old/140-holdtimer-set.patch create mode 100644 net/quagga/patches-old/150-no-cross-fs-link.patch create mode 100644 net/quagga/patches-old/170-use-supported-pagers.patch create mode 100644 net/quagga/patches/010-fix-format-warnings.patch create mode 100644 net/quagga/patches/020-fix-ipv6-build-failure.patch create mode 100644 net/quagga/patches/030-fix-opaque-support.patch create mode 100644 net/quagga/patches/110-fix_ipctl_forwarding.patch create mode 100644 net/quagga/patches/120-quagga_manet.patch create mode 100644 net/quagga/patches/130-fix_cpp.patch create mode 100644 net/quagga/patches/140-holdtimer-set.patch create mode 100644 net/quagga/patches/150-no-cross-fs-link.patch create mode 100644 net/quagga/patches/160-pgbgp.patch create mode 100644 net/quagga/patches/161-pgbgp-addon.patch create mode 100644 net/quagga/patches/170-use-supported-pagers.patch create mode 100644 net/quicktun/Makefile create mode 100644 net/quicktun/files/quicktun.config create mode 100644 net/quicktun/files/quicktun.init create mode 100644 net/raddump/Makefile create mode 100644 net/radsecproxy/Makefile create mode 100644 net/radsecproxy/files/radsecproxy.init create mode 100644 net/rarpd/Makefile create mode 100644 net/rarpd/files/rarpd.default create mode 100644 net/rarpd/files/rarpd.init create mode 100644 net/reaim/Makefile create mode 100644 net/reaim/files/reaim.init create mode 100644 net/reaim/patches/501-cross_compile-install.patch create mode 100644 net/redir/Makefile create mode 100644 net/redir/patches/00_honor_copts.patch create mode 100644 net/redir/patches/01_fix_max_bandwidth_docs.patch create mode 100644 net/redir/patches/02_use_ntohs.patch create mode 100644 net/redir/patches/03_fix_tcp_wrappers.patch create mode 100644 net/redir/patches/04_fix_timeouts.patch create mode 100644 net/redir/patches/06_fix_shaper_buffer.patch create mode 100644 net/remotefs/Makefile create mode 100755 net/remotefs/files/rfsd create mode 100644 net/restund/Makefile create mode 100644 net/restund/files/restund.init create mode 100755 net/rinetd/Makefile create mode 100644 net/rinetd/files/rinetd.config create mode 100755 net/rinetd/files/rinetd.init create mode 100644 net/rinetd/patches/001-crosscompile.patch create mode 100644 net/rp-l2tp/Makefile create mode 100644 net/rp-l2tp/files/rp-l2tpd.init create mode 100644 net/rp-l2tp/patches/001-cross.patch create mode 100644 net/rp-pppoe/Makefile create mode 100644 net/rp-pppoe/files/pppoe-client.init create mode 100644 net/rp-pppoe/files/pppoe-relay.default create mode 100644 net/rp-pppoe/files/pppoe-relay.init create mode 100644 net/rp-pppoe/files/pppoe-server.default create mode 100644 net/rp-pppoe/files/pppoe-server.init create mode 100644 net/rp-pppoe/patches/100-configure.patch create mode 100644 net/rrs/Makefile create mode 100644 net/rrs/patches/001-shell.patch create mode 100644 net/rrs/patches/002-no_sslv2.patch create mode 100644 net/rrs/patches/003-honour_copts.patch create mode 100644 net/rssh/Makefile create mode 100644 net/rssh/patches/001-destdir.patch create mode 100644 net/rsync/Makefile create mode 100644 net/rsync/files/rsyncd.conf create mode 100644 net/rsync/files/rsyncd.init create mode 100644 net/rtorrent/Makefile create mode 100644 net/rtorrent/patches/100-fix-cross_compile.patch create mode 100644 net/rtorrent/patches/120-fix-ncurses.patch create mode 100644 net/rtpproxy/Makefile create mode 100644 net/samba/Makefile create mode 100644 net/samba/files/samba.init create mode 100644 net/samba/files/smb.conf create mode 100644 net/samba/files/smbd.config create mode 100644 net/samba/patches/100-samba.patch create mode 100644 net/samba/patches/101-codepages.patch create mode 100644 net/samba/patches/102-cp1251.patch create mode 100644 net/samba/patches/103-cp775.patch create mode 100644 net/samba/patches/200-security.patch create mode 100644 net/samba/patches/250-writex.patch create mode 100644 net/samba/patches/300-shared_lib_ldflags_fix.patch create mode 100644 net/samba/patches/301-config_files_path.patch create mode 100644 net/samba/patches/400-enhanced_attributes.patch create mode 100644 net/samba3/Config.in create mode 100644 net/samba3/Makefile create mode 100644 net/samba3/files/config-lfs.h create mode 100644 net/samba3/files/samba.config create mode 100755 net/samba3/files/samba.init create mode 100644 net/samba3/files/smb.conf.template create mode 100644 net/samba3/patches/100-avm.patch create mode 100644 net/samba3/patches/110-compile_fixes.patch create mode 100644 net/samba3/patches/120-owrt_paths.patch create mode 100644 net/samba3/patches/130-owrt_smbpasswd.patch create mode 100644 net/samba3/patches/140-no_mmap.patch create mode 100644 net/samba3/patches/150-fix_ls.patch create mode 100644 net/samba3/patches/160-fix_log.patch create mode 100644 net/samba3/patches/170-no_rpc.patch create mode 100644 net/samba3/patches/180-fix_duplicate_define.patch create mode 100644 net/scanlogd/Makefile create mode 100644 net/scanlogd/files/scanlogd.init create mode 100644 net/scdp/Makefile create mode 100644 net/seeks/Makefile create mode 100644 net/seeks/files/seeks.init create mode 100644 net/seeks/patches/050-better_icu_detection.patch create mode 100644 net/seeks/patches/100-no_tests-and-add-iconv-link.patch create mode 100644 net/seeks/patches/200-add_pcre_headers_to_plugins.patch create mode 100644 net/ser2net/Makefile create mode 100644 net/serialoverip/Makefile create mode 100644 net/serialoverip/patches/001-compile-fixes.patch create mode 100644 net/shat/Makefile create mode 100644 net/shfs/Makefile create mode 100644 net/shfs/patches/100-kmod_build.patch create mode 100644 net/shfs/patches/101-shfs_0.35_2.6.18_dentry.patch create mode 100644 net/shfs/patches/102-shfs_0.35_clean_inode_clear.patch create mode 100644 net/shfs/patches/103-shfs_0.35_gcc4.patch create mode 100644 net/shfs/patches/104-shfs_0.35_inode_and_fs.patch create mode 100644 net/shfs/patches/105-space_chars.patch create mode 100644 net/shfs/patches/106-uidgid32.patch create mode 100644 net/shfs/patches/107-df.patch create mode 100644 net/shfs/patches/108-no_update_mtab.patch create mode 100644 net/shfs/patches/109-linux_2.6.22.patch create mode 100644 net/shorewall-lite/Makefile create mode 100644 net/shorewall-lite/files/hostname create mode 100644 net/shorewall-lite/files/hotplug_iface create mode 100644 net/shorewall-lite/files/lsm_script create mode 100644 net/shorewall-lite/files/shorewall-lite.init create mode 100644 net/shorewall-lite/files/vardir create mode 100644 net/shorewall-lite/patches/110-MODULESDIR.patch create mode 100644 net/shorewall-lite/patches/120-LOGFILE.patch create mode 100644 net/sipp/Makefile create mode 100644 net/siproxd/Makefile create mode 100644 net/siproxd/files/siproxd.config create mode 100644 net/siproxd/files/siproxd.init create mode 100644 net/siproxd/patches/010-fix-bogus-libltdl-dependency.patch create mode 100644 net/sipsak/Makefile create mode 100644 net/sipsak/patches/001-ssp.patch create mode 100644 net/slurm/Makefile create mode 100644 net/slurm/patches/001-no_host_curses.patch create mode 100644 net/smap/Makefile create mode 100644 net/smap/patches/00-fix-broadcast.patch create mode 100644 net/smap/patches/01-add-tecom-supported-header.patch create mode 100644 net/smap/patches/02-segfault-and-toofast-bugfixes.patch create mode 100644 net/smcroute/Makefile create mode 100644 net/smcroute/files/smcroute.init create mode 100644 net/smcroute/patches/001-socket_path.patch create mode 100644 net/smcroute/patches/002-optimize_size.patch create mode 100644 net/smtptrapd/Makefile create mode 100644 net/smtptrapd/files/smtptrapd.init create mode 100644 net/smtptrapd/patches/200-missing_opt.patch create mode 100644 net/snort-wireless/Makefile create mode 100644 net/snort-wireless/files/snort-wireless.default create mode 100644 net/snort-wireless/files/snort-wireless.init create mode 100644 net/snort-wireless/patches/500-no-config-search.patch create mode 100644 net/snort-wireless/patches/750-lightweight-config.patch create mode 100644 net/snort/Makefile create mode 100644 net/snort/files/snort.default create mode 100644 net/snort/files/snort.init create mode 100644 net/snort/patches/001-automake-compat.patch create mode 100644 net/snort/patches/002-automake-cross.patch create mode 100644 net/snort/patches/003-automake-no-hostpaths.patch create mode 100644 net/snort/patches/010-dont-add-host-paths.patch create mode 100644 net/snort/patches/100-cross-compile.patch create mode 100644 net/snort/patches/500-no-config-search.patch create mode 100644 net/snort/patches/750-lightweight-config.patch create mode 100644 net/socat/Makefile create mode 100644 net/socat/patches/501-honor_ldflags.patch create mode 100644 net/socat/patches/502-no_sslv2.patch create mode 100644 net/softflowd/Makefile create mode 100644 net/softflowd/files/softflowd.config create mode 100644 net/softflowd/files/softflowd.init create mode 100644 net/spawn-fcgi/Makefile create mode 100644 net/speedtouch-usb-firmware/Makefile create mode 100644 net/squid/Makefile create mode 100644 net/squid/patches/001-cross_compile.patch create mode 100644 net/squid/patches/002-no_sslv2.patch create mode 100644 net/squid/patches/003-configure.patch create mode 100644 net/squid/patches/004-include-autoconf.patch create mode 100644 net/squid/patches/005-lib-makefile.patch create mode 100644 net/srelay/Makefile create mode 100644 net/srelay/files/srelay.conf create mode 100644 net/srelay/files/srelay.init create mode 100644 net/sscep/Makefile create mode 100644 net/sscep/patches/001-certnanny.patch create mode 100644 net/sshfs/Makefile create mode 100644 net/sshtunnel/Makefile create mode 100644 net/sshtunnel/files/initd_sshtunnel create mode 100644 net/sshtunnel/files/sshtunnel.sh create mode 100644 net/sshtunnel/files/uci_sshtunnel create mode 100644 net/sslcat/Makefile create mode 100644 net/sslh/Makefile create mode 100644 net/sslh/files/sslh.config create mode 100644 net/sslh/files/sslh.init create mode 100644 net/sslh/patches/001-no_strip.patch create mode 100644 net/sslsniff/Makefile create mode 100644 net/sslsniff/patches/01-cross-compile.patch create mode 100644 net/sslstrip/Makefile create mode 100644 net/ssltunnel/Makefile create mode 100644 net/strongswan/Makefile create mode 100644 net/strongswan/files/ipsec.button create mode 100644 net/strongswan/files/ipsec.conf create mode 100644 net/strongswan/files/ipsec.config create mode 100644 net/strongswan/files/ipsec.cron create mode 100644 net/strongswan/files/ipsec.iface create mode 100644 net/strongswan/files/ipsec.init create mode 100644 net/strongswan/patches/100-ar-fixes.patch create mode 100644 net/strongswan/patches/110-make-ipsec.patch create mode 100644 net/strongswan/patches/120-make-pluto.patch create mode 100644 net/strongswan/patches/130-make-starter.patch create mode 100644 net/strongswan/patches/200-wakeup-showstatus.patch create mode 100644 net/strongswan/patches/210-updown.patch create mode 100644 net/strongswan/patches/300-openwrt.patch create mode 100644 net/strongswan/patches/310-make-ipsec-alg.patch create mode 100644 net/strongswan/patches/320-no-modprobe.patch create mode 100644 net/strongswan/patches/350-make-programs.patch create mode 100644 net/strongswan/patches/400-pluto-fix_CIRCLEQ.patch create mode 100644 net/strongswan4/Config.in create mode 100644 net/strongswan4/Makefile create mode 100644 net/strongswan4/files/ipsec.secrets create mode 100644 net/strongswan4/patches/201-no-modprobe.patch create mode 100644 net/strongswan4/patches/203-uci.patch create mode 100644 net/strongswan4/patches/300-compile-fixes.patch create mode 100644 net/stun/Makefile create mode 100644 net/stun/files/stund.config create mode 100644 net/stun/files/stund.init create mode 100644 net/stun/patches/001-fix_non_i386.patch create mode 100644 net/stun/patches/002-linking_order.patch create mode 100644 net/stunnel/Makefile create mode 100644 net/stunnel/files/stunnel.init create mode 100644 net/stunnel/patches/001-remove-libtool.patch create mode 100644 net/stunnel/patches/100-cross-compile.patch create mode 100644 net/stunnel/patches/101-no-comp.patch create mode 100644 net/stunnel/patches/102-no-ssl2.patch create mode 100644 net/stunnel/patches/103-no-zlib-link.patch create mode 100644 net/stunnel/patches/104-fix-paths.patch create mode 100644 net/stunnel/patches/105-stunnel-conf.patch create mode 100644 net/stunnel/patches/106-stunnel-xforwardedfor.patch create mode 100644 net/subversion/Makefile create mode 100644 net/subversion/files/subversion.config create mode 100644 net/subversion/files/subversion.init create mode 100644 net/synce-dccm/Makefile create mode 100644 net/tcpdump/Makefile create mode 100644 net/tcpdump/patches/001-remove_pcap_debug.patch create mode 100644 net/tcpdump/patches/002-remove_static_libpcap_check.patch create mode 100644 net/tcpdump/patches/004-fix_3g_iface.patch create mode 100644 net/tcpdump/patches/100-tcpdump_mini.patch create mode 100644 net/tcptraceroute/Makefile create mode 100644 net/tcptraceroute/patches/001-configure_cross_compile.patch create mode 100644 net/tctool/Makefile create mode 100644 net/tctool/patches/001_Makefile_fix.diff create mode 100644 net/tctool/patches/005-fix-gcc_4_3-compile.patch create mode 100644 net/tftp-hpa/Makefile create mode 100644 net/tftp-hpa/files/tftpd-hpa.init create mode 100644 net/tinc/Makefile create mode 100644 net/tinyproxy/Makefile create mode 100644 net/tinyproxy/files/tinyproxy.config create mode 100644 net/tinyproxy/files/tinyproxy.init create mode 100644 net/tinyproxy/patches/010-no-docs-and-tests.patch create mode 100644 net/tinyproxy/patches/020-config_and_pid-path.patch create mode 100644 net/tinyproxy/patches/030-allow_bind_in_transparent_mode.patch create mode 100644 net/tinyproxy/patches/040-fix_url_filter_in_transparent_mode.patch create mode 100644 net/tinyproxy/patches/120-fix_INET6.patch create mode 100644 net/tmsnc/Makefile create mode 100644 net/tor-alpha/Makefile create mode 100644 net/tor-alpha/files/tor.init create mode 100644 net/tor-alpha/patches/001-torrc.patch create mode 100644 net/tor/Makefile create mode 100644 net/tor/files/tor.init create mode 100644 net/tor/patches/001-torrc.patch create mode 100644 net/transmission/Makefile create mode 100644 net/transmission/files/transmission.config create mode 100644 net/transmission/files/transmission.init create mode 100644 net/transmission/patches/010-opt_scrape_paused.patch create mode 100644 net/transocks/Makefile create mode 100644 net/tsocks/Makefile create mode 100644 net/ttcp/Makefile create mode 100644 net/ttcp/ttcp.c create mode 100644 net/uanytun/Makefile create mode 100644 net/uanytun/files/uanytun-nocrypt.config create mode 100644 net/uanytun/files/uanytun.config create mode 100644 net/uanytun/files/uanytun.init create mode 100644 net/ucarp/Makefile create mode 100644 net/ucarp/files/ucarp.conf create mode 100644 net/ucarp/files/ucarp.init create mode 100644 net/ucarp/patches/100-configure-cross-compilation.patch create mode 100644 net/ucspi-tcp/Makefile create mode 100644 net/ucspi-tcp/patches/100-cross_compile.patch create mode 100644 net/udp-broadcast-relay/Makefile create mode 100644 net/udpcast/Makefile create mode 100644 net/udpxy/Makefile create mode 100644 net/uhub/Makefile create mode 100644 net/uhub/patches/100-user_struct.patch create mode 100644 net/ulogd/Makefile create mode 100644 net/ulogd/files/ulogd.default create mode 100644 net/ulogd/files/ulogd.init create mode 100644 net/ulogd/patches/001-pcap_flags.patch create mode 100644 net/ulogd/patches/002-inc.patch create mode 100644 net/ulogd/patches/003-fix-bad-rpath.patch create mode 100644 net/umurmur/Makefile create mode 100644 net/unbound/Makefile create mode 100644 net/unbound/files/named.cache create mode 100644 net/unbound/files/root.autokey create mode 100644 net/unbound/files/unbound.conf create mode 100755 net/unbound/files/unbound.init create mode 100644 net/unfs3/Makefile create mode 100644 net/unfs3/files/unfs3.exports create mode 100644 net/unfs3/files/unfs3.init create mode 100644 net/unfs3/patches/100-no_lfl.patch create mode 100644 net/uob-nomad/Makefile create mode 100644 net/uob-nomad/patches/001-inet_sr.patch create mode 100644 net/uob-nomad/patches/002-hostname.patch create mode 100644 net/uob-nomad/patches/003-conf.patch create mode 100644 net/uob-nomad/patches/004-linux26_header_fix.patch create mode 100644 net/updatedd/Makefile create mode 100644 net/updatedd/files/updatedd.config create mode 100644 net/updatedd/files/updatedd.hotplug create mode 100644 net/updatedd/files/updatedd.init create mode 100644 net/updatedd/patches/001-service_libname.patch create mode 100644 net/updatedd/patches/002-ovh-dyndnshost.patch create mode 100644 net/updatedd/patches/003-zoneedit-url-fix.patch create mode 100644 net/updatedd/patches/004-fix_liberty_dep.patch create mode 100644 net/usbip/Makefile create mode 100644 net/usbip/patches/000-upstream_svn_152.patch create mode 100644 net/uucp/Makefile create mode 100644 net/vblade/Makefile create mode 100644 net/vblade/files/vblade.config create mode 100644 net/vblade/files/vblade.init create mode 100644 net/veth/Makefile create mode 100644 net/veth/patches/100-veth-makefile-cflags.patch create mode 100644 net/veth/patches/200-drop-multicast.patch create mode 100644 net/vgp/Makefile create mode 100644 net/vnc-reflector/Makefile create mode 100644 net/vnc-reflector/patches/001-honor_include_lib_path.patch create mode 100644 net/vncrepeater/Makefile create mode 100644 net/vncrepeater/patches/001-uclibcxx_linking.patch create mode 100644 net/vnstat/Makefile create mode 100644 net/vnstat/files/vnstat-uci.conf create mode 100644 net/vnstat/files/vnstat.defaults create mode 100644 net/vnstat/files/vnstat.init create mode 100644 net/vnstat/patches/001-conf.patch create mode 100644 net/vnstat/patches/002-no_install_strip.patch create mode 100644 net/vnstat/patches/003-no_install_uname.patch create mode 100644 net/vnstat/patches/004-install_bsd_fix.patch create mode 100644 net/vpnc/Makefile create mode 100644 net/vpnc/patches/001-cross.patch create mode 100644 net/vpnc/patches/002-vpn_script.patch create mode 100644 net/vpnc/patches/003-no_makeman.patch create mode 100644 net/vpzone/Makefile create mode 100644 net/vpzone/files/vpzone.conf create mode 100644 net/vpzone/files/vpzone.init create mode 100644 net/vpzone/patches/001-no_werror.patch create mode 100644 net/vpzone/patches/002-ipv6_inc_fix.patch create mode 100644 net/vrrpd/Makefile create mode 100644 net/vrrpd/files/vrrpd.default create mode 100644 net/vrrpd/files/vrrpd.init create mode 100644 net/vsftpd/Makefile create mode 100644 net/vsftpd/files/vsftpd.conf create mode 100644 net/vsftpd/files/vsftpd.init create mode 100644 net/vsftpd/patches/001-destdir.patch create mode 100644 net/vsftpd/patches/002-find_libs.patch create mode 100644 net/vsftpd/patches/003-chroot.patch create mode 100644 net/vtun/Makefile create mode 100644 net/vtun/patches/100-lzo2.patch create mode 100644 net/wavemon/Makefile create mode 100644 net/wavemon/patches/000-upstream-config_menu.patch create mode 100644 net/wavemon/patches/000-upstream-negative.patch create mode 100644 net/wavemon/patches/000-upstream-terminate.patch create mode 100644 net/wavemon/patches/000-upstream-wrapper.patch create mode 100644 net/wccpd/Makefile create mode 100644 net/wdiag/Makefile create mode 100644 net/weechat/Makefile create mode 100644 net/wget/Makefile create mode 100644 net/wifidog/Makefile create mode 100644 net/wifidog/files/wifidog.conf create mode 100644 net/wifidog/files/wifidog.init create mode 100644 net/wing/Makefile create mode 100644 net/wing/files/etc/uci-defaults/wing create mode 100644 net/wing/files/lib/network/wing.sh create mode 100644 net/wing/patches/010-libc-compat.patch create mode 100644 net/wing/patches/011-perl-compat.patch create mode 100644 net/wiviz/Makefile create mode 100755 net/wiviz/files/www/cgi-bin/wiviz/get.cgi create mode 100755 net/wiviz/files/www/cgi-bin/wiviz/set.cgi create mode 100755 net/wiviz/files/www/wiviz/adhoc-idle.gif create mode 100755 net/wiviz/files/www/wiviz/adhoc-idle.png create mode 100755 net/wiviz/files/www/wiviz/adhoc.gif create mode 100755 net/wiviz/files/www/wiviz/adhoc.png create mode 100755 net/wiviz/files/www/wiviz/ap-idle.gif create mode 100755 net/wiviz/files/www/wiviz/ap-idle.png create mode 100755 net/wiviz/files/www/wiviz/ap-wep-idle.gif create mode 100755 net/wiviz/files/www/wiviz/ap-wep-idle.png create mode 100755 net/wiviz/files/www/wiviz/ap-wep.gif create mode 100755 net/wiviz/files/www/wiviz/ap-wep.png create mode 100755 net/wiviz/files/www/wiviz/ap.gif create mode 100755 net/wiviz/files/www/wiviz/ap.png create mode 100755 net/wiviz/files/www/wiviz/pip-idle.gif create mode 100755 net/wiviz/files/www/wiviz/pip-idle.png create mode 100755 net/wiviz/files/www/wiviz/pip.gif create mode 100755 net/wiviz/files/www/wiviz/pip.png create mode 100755 net/wiviz/files/www/wiviz/station-idle.gif create mode 100755 net/wiviz/files/www/wiviz/station-idle.png create mode 100755 net/wiviz/files/www/wiviz/station.gif create mode 100755 net/wiviz/files/www/wiviz/station.png create mode 100755 net/wiviz/files/www/wiviz/wiviz.css create mode 100755 net/wiviz/files/www/wiviz/wiviz.html create mode 100755 net/wiviz/files/www/wiviz/wiviz.js create mode 100644 net/wiviz/src/Makefile create mode 100644 net/wiviz/src/channelhopper.c create mode 100644 net/wiviz/src/channelhopper.h create mode 100644 net/wiviz/src/structs.h create mode 100644 net/wiviz/src/wiviz.c create mode 100644 net/wiviz/src/wl_access.c create mode 100644 net/wiviz/src/wl_access.h create mode 100644 net/wknock/Makefile create mode 100644 net/wol/Makefile create mode 100644 net/wol/files/wol.config create mode 100644 net/wol/files/wol.init create mode 100644 net/wput/Makefile create mode 100644 net/wput/patches/100-socketlib.diff create mode 100644 net/wput/patches/102-wput.diff create mode 100644 net/wrt-radauth/Makefile create mode 100644 net/wrt-radauth/patches/001-ldpath.patch create mode 100644 net/wshaper/Makefile create mode 100644 net/wshaper/files/wshaper.config create mode 100755 net/wshaper/files/wshaper.htb create mode 100644 net/wshaper/files/wshaper.init create mode 100644 net/xinetd/Makefile create mode 100644 net/xinetd/files/xinetd.conf create mode 100644 net/xinetd/files/xinetd.init create mode 100644 net/xinetd/patches/001-ar.patch create mode 100644 net/xinetd/patches/002-destdir.patch create mode 100644 net/xinetd/patches/003-rpc_fix.patch create mode 100644 net/xl2tpd/Makefile create mode 100644 net/xl2tpd/README create mode 100644 net/xl2tpd/files/options.xl2tpd create mode 100644 net/xl2tpd/files/xl2tp-secrets create mode 100644 net/xl2tpd/files/xl2tpd.conf create mode 100644 net/xl2tpd/files/xl2tpd.conf.sample create mode 100644 net/xl2tpd/files/xl2tpd.init create mode 100644 net/xl2tpd/patches/100-makefile_opt_flags.patch create mode 100644 net/xl2tpd/patches/110-makefile_dont_build_pfc.patch create mode 100644 net/xsupplicant/Makefile create mode 100644 net/xsupplicant/patches/001-no-lfl.patch create mode 100644 net/xsupplicant/patches/002-disable-procfs-check.patch create mode 100644 net/xsupplicant/patches/003-compile_fix.patch create mode 100644 net/xsupplicant/patches/005-no_private_linux_header_includes.patch create mode 100644 net/xsupplicant/patches/006-no_wireless_h.patch create mode 100644 net/xtables-addons/Makefile create mode 100644 net/xtables-addons/patches/001-no_depmod.patch create mode 100644 net/xtables-addons/patches/002-fix-kernel-version-detection.patch create mode 100644 net/xtables-addons/patches/003-redundant-bracket.patch create mode 100644 net/yaddns/Makefile create mode 100644 net/yaddns/files/etc/config/ddns create mode 100644 net/yaddns/files/etc/hotplug.d/iface/25-ddns create mode 100644 net/yaddns/files/usr/lib/ddns/services create mode 100644 net/yafc/Makefile create mode 100644 net/yate/Makefile create mode 100644 net/yate/patches/100-add_dn_skipname_missing_from_many_libresolv.patch create mode 100644 net/znc/Makefile create mode 100644 net/znc/files/znc.conf create mode 100644 net/znc/files/znc.init create mode 100644 net/znc/patches/001-move_rootcheck_after_config.patch create mode 100644 net/znc/patches/002-Uclibcpp_build_fix.patch create mode 100644 net/znc/patches/003-Reduce_rebuild_time.patch create mode 100644 net/znc/patches/004-fix_memleak.patch create mode 100644 skels/Makefile.template create mode 100644 skels/files/package.conf create mode 100755 skels/files/package.init create mode 100644 sound/alsa/Makefile create mode 100644 sound/alsa/files/alsa.modules create mode 100644 sound/alsa/patches/100-compile_fix.patch create mode 100644 sound/alsa/patches/110-cp_command.patch create mode 100644 sound/alsa/patches/120-sndfops.patch create mode 100644 sound/cmus/Makefile create mode 100644 sound/cmus/patches/010-do_not_use_ACS_VLINE.patch create mode 100644 sound/empcd/Makefile create mode 100644 sound/flite/Makefile create mode 100644 sound/flite/patches/100-shared_libs create mode 100644 sound/ices/Makefile create mode 100644 sound/lame/Makefile create mode 100644 sound/lame/patches/001-automake-compat.patch create mode 100644 sound/madplay/Makefile create mode 100644 sound/mpc/Makefile create mode 100644 sound/mpc/files/pls-handler.sh create mode 100644 sound/mpd/Makefile create mode 100644 sound/mpd/files/mpd.init create mode 100644 sound/mpd/files/mpd.service create mode 100644 sound/mpd/patches/100-compile-fixes.patch create mode 100644 sound/mpdas/Makefile create mode 100644 sound/mpdas/files/mpdas.init create mode 100644 sound/mpdas/files/mpdasrc create mode 100644 sound/mpdas/patches/001-flags.patch create mode 100644 sound/mt-daapd/Makefile create mode 100644 sound/mt-daapd/files/mt-daapd.init create mode 100644 sound/pulseaudio/Makefile create mode 100644 sound/pulseaudio/files/pulseaudio.init create mode 100644 sound/pulseaudio/patches/001-no_default_64mb_alloc.patch create mode 100644 sound/scmpc/Makefile create mode 100644 sound/scmpc/files/scmpc.init create mode 100644 sound/scmpc/patches/100-Rules.patch create mode 100644 sound/shell-fm/Makefile create mode 100644 sound/shell-fm/files/shell-fm.init create mode 100644 sound/shell-fm/files/shell-fm.rc create mode 100644 sound/sox/Makefile create mode 100644 sound/sox/patches/001-cross_compile.patch create mode 100644 sound/sox/patches/010-dev-sound-dsp.patch create mode 100644 sound/streamripper/Makefile create mode 100644 utils/alsa-utils/Makefile create mode 100644 utils/alsa-utils/patches/100-uClibc-compat.patch create mode 100644 utils/anyremote/Makefile create mode 100644 utils/anyremote/files/anyremote.cfg create mode 100644 utils/anyremote/files/anyremote.init create mode 100644 utils/anyremote/patches/010-dont-add-host-includes.patch create mode 100644 utils/ap51-flash/Makefile create mode 100644 utils/ap51-flash/files/ap51-flash.conf create mode 100644 utils/ap51-flash/files/ap51-flash.init create mode 100755 utils/ap51-flash/files/ap51-flash.sh create mode 100644 utils/at/Makefile create mode 100755 utils/at/files/atd.init create mode 100644 utils/at/patches/100-cross-compile.patch create mode 100644 utils/at/patches/110-getloadavg.patch create mode 100644 utils/avrdude/Makefile create mode 100644 utils/avrusbboot/Makefile create mode 100644 utils/avrusbboot/patches/001-fix_makefile.patch create mode 100644 utils/avrusbboot/patches/002-fix_compilation.patch create mode 100644 utils/bandwidthd/Makefile create mode 100644 utils/bandwidthd/files/bandwidthd.config create mode 100644 utils/bandwidthd/files/bandwidthd.init create mode 100644 utils/bandwidthd/files/logo.gif create mode 100644 utils/bandwidthd/patches/010-dont-add-host-paths.patch create mode 100644 utils/bandwidthd/patches/100-fix_config_file_location create mode 100644 utils/bash-completion/Makefile create mode 100644 utils/bash/Makefile create mode 100644 utils/bash/patches/001-compile-fix.patch create mode 100644 utils/bc/Makefile create mode 100644 utils/bc/patches/001-disable-doc.patch create mode 100644 utils/bemused/Makefile create mode 100644 utils/bemused/files/bemused-bookmarks create mode 100644 utils/bemused/files/bemused.conf create mode 100644 utils/bemused/files/bemused.init create mode 100644 utils/bemused/patches/110-missing_includes.patch create mode 100644 utils/bemused/patches/200-cxx-compile-fixes.patch create mode 100644 utils/bluez-hcidump/Makefile create mode 100644 utils/bluez-utils/Makefile create mode 100644 utils/bluez-utils/files/bluetooth.conf create mode 100644 utils/bluez-utils/files/bluetooth.dbus create mode 100644 utils/bluez-utils/files/bluez-utils.init create mode 100644 utils/bluez-utils/files/givepin create mode 100644 utils/bluez-utils/patches/001-include_limits.patch create mode 100644 utils/bluez-utils/patches/002-hcid_pin_helper.patch create mode 100644 utils/bluez-utils/patches/100-enokey.patch create mode 100644 utils/bluez-utils/patches/200-uart-speed.patch create mode 100644 utils/broadcom-sdhc/Makefile create mode 100644 utils/btrfs-progs/Makefile create mode 100644 utils/btrfs-progs/files/btrfs-scan.init create mode 100644 utils/btrfs-progs/patches/001-Makefile-gcc-fix create mode 100644 utils/bzip2/Makefile create mode 100644 utils/calvaria/Makefile create mode 100644 utils/calvaria/files/src/Makefile create mode 100644 utils/calvaria/files/src/cal2p54.c create mode 100644 utils/calvaria/files/src/calvaria.c create mode 100644 utils/ccid/Makefile create mode 100644 utils/ccrypt/Makefile create mode 100644 utils/ccrypt/patches/001-no-intl.patch create mode 100644 utils/cdparanoia/Makefile create mode 100644 utils/cdparanoia/patches/002-fixbecrash-private-keyword.patch create mode 100644 utils/cdparanoia/patches/010-fix_configure.patch create mode 100644 utils/cifsmount/Makefile create mode 100644 utils/cifsmount/mount.cifs.c create mode 100644 utils/cksfv/Makefile create mode 100644 utils/cmdpad/Makefile create mode 100644 utils/cmdpad/files/cmdpad.init create mode 100644 utils/cmdpad/patches/100-Makefile.patch create mode 100644 utils/cmdpad/patches/120-kernel26-compat.patch create mode 100644 utils/cmdpad/patches/130-no_zombie.patch create mode 100644 utils/cmdpad/patches/140-compile_fix.patch create mode 100644 utils/collectd/Makefile create mode 100644 utils/collectd/files/collectd.conf create mode 100644 utils/collectd/files/collectd.init create mode 100644 utils/collectd/patches/001-undefined-AM_PATH_LIBGCRYPT.patch create mode 100644 utils/collectd/patches/002-fix-ltdl-linking.patch create mode 100644 utils/collectd/patches/003-remove-werror.patch create mode 100644 utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch create mode 100644 utils/collectd/patches/110-net-device-stats.patch create mode 100644 utils/collectd/patches/120-fix_kernel_2.6.37.patch create mode 100644 utils/collectd/patches/200-fix-git-describe-error.patch create mode 100644 utils/collectd/patches/300-fix-modbus.patch create mode 100644 utils/collectd/patches/900-add-iwinfo-plugin.patch create mode 100644 utils/coreutils/Makefile create mode 100644 utils/coreutils/patches/001-no_docs_man_tests.patch create mode 100644 utils/coreutils/patches/002-fix_compile_with_uclibc.patch create mode 100644 utils/cpusage/Makefile create mode 100644 utils/cpusage/src/cpusage.c create mode 100644 utils/crypto-tools/Makefile create mode 100644 utils/cryptsetup/Makefile create mode 100644 utils/cwiid/Makefile create mode 100644 utils/cwiid/patches/100-dump_gtk_wmdemo.patch create mode 100644 utils/daemontools/Makefile create mode 100644 utils/daemontools/patches/crosscompile.patch create mode 100644 utils/daemontools/patches/svscanboot.patch create mode 100644 utils/dash/Makefile create mode 100644 utils/dbus-x/Makefile create mode 100644 utils/dbus/Makefile create mode 100644 utils/dbus/files/dbus-launch create mode 100644 utils/dbus/files/dbus.init create mode 100644 utils/dbus/patches/002-no_wno_pointer_sign.patch create mode 100644 utils/dbus/patches/01-dbus-nopie-fix.patch create mode 100644 utils/deco/Makefile create mode 100644 utils/deco/patches/100-tty.c.patch create mode 100644 utils/devio/Makefile create mode 100644 utils/devmem2/Makefile create mode 100644 utils/devmem2/src/Makefile create mode 100644 utils/devmem2/src/devmem2.c create mode 100644 utils/dfu-util/Makefile create mode 100644 utils/dialog/Makefile create mode 100644 utils/digitemp/Makefile create mode 100644 utils/dir300-flash/Makefile create mode 100644 utils/disktype/Makefile create mode 100644 utils/dmidecode/Makefile create mode 100644 utils/dosfstools/Makefile create mode 100644 utils/dosfstools/patches/002-linux_26_headers.patch create mode 100644 utils/dt/Makefile create mode 100644 utils/dtach/Makefile create mode 100644 utils/empty/Makefile create mode 100644 utils/event_test/Makefile create mode 100644 utils/event_test/src/Makefile create mode 100644 utils/event_test/src/evtest.c create mode 100644 utils/fancontroled/Makefile create mode 100644 utils/fancontroled/files/fancontroled.init create mode 100644 utils/firmwarehotplug/Makefile create mode 100644 utils/firmwarehotplug/patches/001-no_documentation.patch create mode 100644 utils/firmwarehotplug/patches/100-compile-fixes.patch create mode 100644 utils/flashrom/Makefile create mode 100644 utils/flashrom/patches/001-msr_dev_path.patch create mode 100644 utils/fortune-mod/Makefile create mode 100644 utils/fortune-mod/patches/01-strfile-64bit-fix create mode 100644 utils/fowsr/Makefile create mode 100644 utils/foxboard-utils/Makefile create mode 100644 utils/fxload/Makefile create mode 100644 utils/fxload/patches/010-compile_fix.patch create mode 100644 utils/gadgetfs-test/Makefile create mode 100644 utils/gadgetfs-test/patches/001-linux_usb_org_2007_11_29.patch create mode 100644 utils/gnokii/Makefile create mode 100644 utils/gnupg/Makefile create mode 100644 utils/gnupg/patches/001-mips_gcc4.4.patch create mode 100644 utils/gnuplot/Makefile create mode 100644 utils/gnuplot/patches/010-Makefile.in.patch create mode 100644 utils/gpiotoggling/Makefile create mode 100644 utils/gzip/Makefile create mode 100644 utils/haserl/Makefile create mode 100644 utils/hd-idle/Makefile create mode 100644 utils/hd-idle/files/hd-idle.config create mode 100644 utils/hd-idle/files/hd-idle.init create mode 100644 utils/hdparm/Makefile create mode 100644 utils/heyu/Makefile create mode 100644 utils/heyu/files/x10.conf create mode 100644 utils/heyu/patches/001-avoid_configure.patch create mode 100644 utils/hplip/Makefile create mode 100644 utils/hplip/files/20-hplip create mode 100644 utils/huaweiaktbbo/Makefile create mode 100644 utils/huaweiaktbbo/src/huaweiAktBbo.c create mode 100644 utils/i2c-tools/Makefile create mode 100644 utils/i2c-tools/patches/100-linux_include.patch create mode 100644 utils/ink/Makefile create mode 100644 utils/input-utils/Makefile create mode 100644 utils/input-utils/patches/001-EVIOCGKEYCODE2.patch create mode 100644 utils/input-utils/patches/002-version-check.patch create mode 100644 utils/io/Makefile create mode 100644 utils/io/src/io.c create mode 100644 utils/ipmitool/Makefile create mode 100644 utils/ipmitool/patches/100-cubic_root.patch create mode 100644 utils/ipmitool/patches/101-cross_compile.patch create mode 100644 utils/joe/Makefile create mode 100644 utils/joe/patches/001-mathaway.patch create mode 100644 utils/kmemtrace-user/Makefile create mode 100644 utils/lcd4linux/Config.in create mode 100644 utils/lcd4linux/Makefile create mode 100644 utils/lcd4linux/files/lcd4linux.conf create mode 100644 utils/lcd4linux/files/lcd4linux.init create mode 100644 utils/lcd4linux/patches/100-drv_RouterBoard.patch create mode 100644 utils/lcd4linux/patches/120-remove_parport_outb.patch create mode 100644 utils/lcd4linux/patches/140-no_repnop_T6963.patch create mode 100644 utils/lcd4linux/patches/150-addlibmpdclient.patch create mode 100644 utils/lcd4linux/patches/160-uinput_defs.patch create mode 100644 utils/lcd4linux/patches/170-log2f.patch create mode 100644 utils/lcdproc/Makefile create mode 100755 utils/lcdproc/files/LCDd create mode 100755 utils/lcdproc/files/lcdexec create mode 100755 utils/lcdproc/files/lcdproc create mode 100755 utils/lcdproc/files/lcdvc create mode 100644 utils/less/Makefile create mode 100644 utils/lilo/Makefile create mode 100644 utils/lilo/files/README create mode 100644 utils/lilo/files/bdlilo.conf create mode 100644 utils/lilo/files/boot.msg create mode 100644 utils/lilo/files/lilo.conf create mode 100755 utils/lilo/files/mkbootable create mode 100644 utils/lirc/Makefile create mode 100644 utils/lm-sensors/Makefile create mode 100644 utils/lm-sensors/files/sensors.conf create mode 100644 utils/logrotate/Makefile create mode 100644 utils/logrotate/files/logrotate.conf create mode 100644 utils/logrotate/patches/002-datehack.patch create mode 100644 utils/logrotate/patches/003-ignore_hidden.patch create mode 100644 utils/logrotate/patches/006-weekly.patch create mode 100644 utils/loop-aes/Makefile create mode 100644 utils/loop-aes/patches/001-no_sync.patch create mode 100644 utils/lrzsz/Makefile create mode 100644 utils/lrzsz/patches/100-install_delete_fix.patch create mode 100644 utils/lsof/Makefile create mode 100644 utils/lsof/patches/001-lsof_makefile.patch create mode 100644 utils/lsof/patches/002-lsof_noportmap.patch create mode 100644 utils/lsof/patches/003-lsof_uclibc.patch create mode 100644 utils/lsof/patches/004-lsof_selinux.patch create mode 100644 utils/lsof/patches/005-lsof_ccv.patch create mode 100644 utils/lvm2/Makefile create mode 100644 utils/lvm2/files/lvm2.init create mode 100644 utils/lvm2/patches/100-cross_compile.patch create mode 100644 utils/macchanger/Makefile create mode 100644 utils/maemo-kexec/Config.in create mode 100644 utils/maemo-kexec/Makefile create mode 100755 utils/maemo-kexec/files/sbin/bootmaemo create mode 100644 utils/mc/Makefile create mode 100644 utils/mdadm/Makefile create mode 100644 utils/mdadm/patches/100-cross_compile.patch create mode 100644 utils/mdadm/patches/200-uclibc_0.9.30_compat.patch create mode 100644 utils/memtester/Makefile create mode 100644 utils/memtester/patches/100-quiet.diff create mode 100644 utils/mg/Makefile create mode 100644 utils/mgetty/Makefile create mode 100644 utils/mgetty/patches/001-mgetty.patch create mode 100644 utils/microcom/Makefile create mode 100644 utils/microcom/patches/001-cross_compile.patch create mode 100644 utils/minicom/Makefile create mode 100644 utils/minicom/patches/010-resolve-getline-conflict.patch create mode 100644 utils/mksh/Makefile create mode 100644 utils/mksh/patches/100-dot_mkshrc create mode 100644 utils/mtd-utils/Makefile create mode 100644 utils/nano/Makefile create mode 100644 utils/ntfs-3g/Makefile create mode 100644 utils/ntfs-3g/patches-2011.4.12/001-options.patch create mode 100644 utils/ntfsprogs/Makefile create mode 100644 utils/ntfsprogs/patches/001-autoconf_fixes.patch create mode 100644 utils/nvramtool/Makefile create mode 100644 utils/open2300/Makefile create mode 100644 utils/open2300/patches/x1.patch create mode 100644 utils/open2300/patches/x2.patch create mode 100644 utils/owfs/Makefile create mode 100644 utils/pciutils/Makefile create mode 100644 utils/pciutils/patches/100-remove-no-timestamping.patch create mode 100644 utils/pciutils/patches/101-no-strip.patch create mode 100644 utils/pciutils/patches/102-compressed-ids.patch create mode 100644 utils/pciutils/patches/103-relative-path-ids.patch create mode 100644 utils/pciutils/patches/104-resolv.patch create mode 100644 utils/pcmciautils/Makefile create mode 100644 utils/pcmciautils/files/etc/hotplug.d/pcmcia/pcmcia.agent create mode 100644 utils/pcmciautils/files/etc/hotplug.d/pcmcia_socket/pcmcia_socket.agent create mode 100755 utils/pcmciautils/files/etc/init.d/pcmcia create mode 100755 utils/pcmciautils/files/etc/init.d/pcmcia_socket create mode 100644 utils/pcsc-lite/Makefile create mode 100644 utils/pcsc-lite/files/pcscd.init create mode 100644 utils/picocom/Makefile create mode 100644 utils/pipacs/Makefile create mode 100644 utils/pipacs/src/Makefile create mode 100644 utils/pipacs/src/parser.c create mode 100644 utils/pipacs/src/parser.h create mode 100644 utils/pipacs/src/pipacs.c create mode 100644 utils/powertop/Makefile create mode 100644 utils/powertop/patches/100-no-wide-ncurses.patch create mode 100644 utils/powertop/patches/200-no-gettext.patch create mode 100644 utils/pps-tools/Makefile create mode 100644 utils/pps-tools/patches/001-source.patch create mode 100644 utils/procps/Makefile create mode 100644 utils/procps/patches/010-make_fix.patch create mode 100644 utils/procps/patches/020_hz_fix.patch create mode 100644 utils/psmisc/Makefile create mode 100644 utils/psplash/Makefile create mode 100644 utils/psplash/files/image_480x640.h create mode 100644 utils/psplash/files/image_generic.h create mode 100755 utils/psplash/files/init create mode 100644 utils/psplash/patches/000-adjust-for-openwrt.patch create mode 100644 utils/psplash/patches/001-hide-msgfield-and-progressbar.patch create mode 100644 utils/pv/Makefile create mode 100644 utils/pwcrypt/Makefile create mode 100644 utils/pwgen/Makefile create mode 100644 utils/rcs/Makefile create mode 100644 utils/rcs/patches/000-debian.patch create mode 100644 utils/rcs/patches/100-cross_compile.patch create mode 100644 utils/rdiff-backup/Makefile create mode 100644 utils/rdiff-backup/patches/001-python_path.patch create mode 100644 utils/reiserfsprogs/Makefile create mode 100644 utils/restorefactory/Makefile create mode 100755 utils/restorefactory/files/hotplug_restorefactory create mode 100755 utils/restorefactory/files/uci_defaults_restorefactory create mode 100644 utils/retutahvo/Makefile create mode 100644 utils/retutahvo/files/src/Makefile create mode 100644 utils/retutahvo/files/src/retutahvo.c create mode 100644 utils/retutahvo/files/src/user_retu_tahvo.h create mode 100644 utils/rrdcollect/Makefile create mode 100644 utils/rrdcollect/files/rrd.conf create mode 100644 utils/rrdcollect/files/rrd.sh create mode 100644 utils/rrdcollect/files/rrdcollect.conf create mode 100644 utils/rrdcollect/files/rrdcollect.init create mode 100644 utils/rrdtool/Makefile create mode 100644 utils/rrdtool/patches/010-dont-add-host-include-paths.patch create mode 100644 utils/sane-backends/Makefile create mode 100644 utils/sane-backends/patches/001-remove-unneeded.patch create mode 100644 utils/sane-backends/patches/010-dont-add-host-include-path.patch create mode 100644 utils/sane-backends/patches/020-non-i386-qcam.patch create mode 100644 utils/schedtools/Makefile create mode 100644 utils/scponly/Makefile create mode 100644 utils/scponly/patches/001-elif_else_replacement.patch create mode 100644 utils/screen/Makefile create mode 100644 utils/screen/files/etc/screenrc create mode 100644 utils/screen/patches/100-cross_compile_fix.patch create mode 100644 utils/sdparm/Makefile create mode 100644 utils/sed/Makefile create mode 100644 utils/setpwc/Makefile create mode 100644 utils/setserial/Makefile create mode 100644 utils/setserial/files/serial.init create mode 100644 utils/setserial/patches/100-compile-fixes.patch create mode 100644 utils/sg3-utils/Makefile create mode 100644 utils/shadow/Makefile create mode 100644 utils/shadow/patches/001-cross-compile.patch create mode 100644 utils/shadow/patches/002-fix-malloc-prototype.patch create mode 100644 utils/shadow/patches/003-disable-nis-lookup.patch create mode 100644 utils/shadow/patches/004-disable-ruser-lookup.patch create mode 100644 utils/sierra-pcmcia/Makefile create mode 100644 utils/sispmctl/Makefile create mode 100644 utils/smartmontools/Makefile create mode 100644 utils/smartmontools/files/smartd.conf create mode 100644 utils/smartmontools/files/smartd.init create mode 100644 utils/ssldump/Makefile create mode 100644 utils/ssldump/patches/001-missing_headers.patch create mode 100644 utils/strace/Makefile create mode 100644 utils/strace/patches-4.5.16/001-arm_eabi_syscalls.patch create mode 100644 utils/strace/patches-4.5.16/002-arm_bad_syscall.patch create mode 100644 utils/strace/patches-4.5.16/003-avr32_support.patch create mode 100644 utils/strace/patches-4.5.16/004-mips64_support.patch create mode 100644 utils/strace/patches-4.5.16/004-no_cacheflush.patch create mode 100644 utils/strace/patches-4.5.16/010-cris_support.patch create mode 100644 utils/stress/Makefile create mode 100644 utils/sysstat/Makefile create mode 100644 utils/sysstat/files/config create mode 100755 utils/sysstat/files/sysstat.init create mode 100644 utils/tar/Makefile create mode 100644 utils/tcpser/Makefile create mode 100644 utils/tcsh/Makefile create mode 100644 utils/tcsh/patches/001-gethost create mode 100644 utils/tcsh/patches/002-NLS create mode 100644 utils/testusb/Makefile create mode 100644 utils/testusb/src/testusb.c create mode 100644 utils/tmux/Makefile create mode 100644 utils/triggerhappy/Makefile create mode 100644 utils/triggerhappy/files/triggerhappy-example.conf create mode 100644 utils/triggerhappy/files/triggerhappy.hotplug create mode 100644 utils/triggerhappy/files/triggerhappy.init create mode 100644 utils/triggerhappy/patches/100-fix-LINUX_INPUT_H.patch create mode 100644 utils/ucmb-tools/Makefile create mode 100644 utils/ucmb-tools/tools/Makefile create mode 100644 utils/ucmb-tools/tools/ucmb.c create mode 100644 utils/ucmb/Makefile create mode 100644 utils/ucmb/driver/Makefile create mode 100644 utils/ucmb/driver/ucmb.c create mode 100644 utils/ucmb/driver/ucmb.h create mode 100644 utils/ucmb/microcontroller_examples/atmel_avr8/ucmb.c create mode 100644 utils/ucmb/microcontroller_examples/atmel_avr8/ucmb.h create mode 100644 utils/ucmb/microcontroller_examples/atmel_avr8_optimized/ucmb.c create mode 100644 utils/ucmb/microcontroller_examples/atmel_avr8_optimized/ucmb.h create mode 100644 utils/unrar/Makefile create mode 100644 utils/unzip/Makefile create mode 100644 utils/upx/Makefile create mode 100644 utils/upx/patches/100-disable_doc.patch create mode 100644 utils/usb-modeswitch-data/Makefile create mode 100644 utils/usb-modeswitch/Makefile create mode 100644 utils/usb-modeswitch/files/modeswitch.hotplug create mode 100644 utils/usbutils/Makefile create mode 100644 utils/usbutils/patches/100-ids-relative-path.patch create mode 100644 utils/usbutils/patches/110-gzip-update-usbids.patch create mode 100644 utils/valgrind/Makefile create mode 100644 utils/valgrind/files/uclibc.supp create mode 100644 utils/valgrind/files/valgrind.sh create mode 100644 utils/valgrind/patches/001-uclibc_syscall.patch create mode 100644 utils/valgrind/patches/002-fix_load_address_substitution.patch create mode 100644 utils/valgrind/patches/100-a_out_header.patch create mode 100644 utils/valgrind/src/abort.c create mode 100644 utils/vim/Makefile create mode 100644 utils/vim/files/vimrc create mode 100644 utils/vim/files/vimrc.full create mode 100644 utils/vim/patches/001-cross_compile.patch create mode 100644 utils/watchcat/Makefile create mode 100644 utils/watchcat/files/initd_watchcat create mode 100644 utils/watchcat/files/uci_defaults_watchcat create mode 100644 utils/watchcat/files/watchcat.sh create mode 100644 utils/wattsup/Makefile create mode 100644 utils/wattsup/src/Makefile create mode 100644 utils/wattsup/src/wattsup.c create mode 100644 utils/wifitoggle/Makefile create mode 100755 utils/wifitoggle/files/hotplug_wifitoggle create mode 100755 utils/wifitoggle/files/uci_wifitoggle create mode 100644 utils/wx200d/Makefile create mode 100644 utils/zile/Makefile create mode 100644 utils/zip/Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6ffab9a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.orig +*.rej diff --git a/Xorg/app/dillo/Makefile b/Xorg/app/dillo/Makefile new file mode 100644 index 0000000..ad2f51f --- /dev/null +++ b/Xorg/app/dillo/Makefile @@ -0,0 +1,68 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dillo +PKG_REV:=cc974615ae39 +PKG_VERSION:=r$(PKG_REV) +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=hg +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://hg.dillo.org/dillo +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/$(PKG_NAME)-$(PKG_VERSION)/ + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/dillo + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + TITLE:=Dillo2 + URL:=http://fltk.org/ + DEPENDS:=+libXft +libstdcpp +libpthread +zlib +fltk2 +libjpeg +libpng $(ICONV_DEPENDS) +endef + +define Package/dillo/description + Dillo is a web browser project completely written in C. + Dillo aims to be a multi-platform browser alternative that + is small, stable, developer-friendly, usable, fast, and + extensible. + + Note: This is the fltk2 based dillo. +endef + +EXTRA_CPPFLAGS+=-I$(ICONV_PREFIX)/include +EXTRA_LDFLAGS+=-L$(ICONV_PREFIX)/lib -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Build/Configure + (cd $(PKG_BUILD_DIR); ./autogen.sh ); + $(call Build/Configure/Default) +endef + +define Build/Install + DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE) -C $(PKG_BUILD_DIR) install +endef + +define Package/dillo/install + $(INSTALL_DIR) $(1)/etc $(1)/usr/share/applications $(1)/usr/share/icons + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/* $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dillo $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dpid $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dpidc $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/dillo $(1)/usr/lib/ + $(CP) ./files/dillo.png $(1)/usr/share/icons/ + $(INSTALL_DATA) ./files/dillo.desktop $(1)/usr/share/applications/ +endef + +$(eval $(call BuildPackage,dillo)) diff --git a/Xorg/app/dillo/files/dillo.desktop b/Xorg/app/dillo/files/dillo.desktop new file mode 100644 index 0000000..ed31c1b --- /dev/null +++ b/Xorg/app/dillo/files/dillo.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +GenericName=Web Browser +GenericName[lt]=Web naršyklė +Name=Dillo +Comment=Lightweight browser +Comment[lt]=Labai paprasta naršyklė +MimeType=text/html;text/xml;application/xhtml+xml; +Exec=dillo +Terminal=false +Type=Application +Categories=Application;Network; +Icon=/usr/share/icons/dillo.png diff --git a/Xorg/app/dillo/files/dillo.png b/Xorg/app/dillo/files/dillo.png new file mode 100644 index 0000000000000000000000000000000000000000..bcb89a30ed755b21296280f4a798e653e95cd9c8 GIT binary patch literal 5555 zcmV;k6-?@hP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iOG? z4-X)><6pc002MPyL_t(&-o=`EjAYk!-hcPrx75~M)zw`+-80jio{h6`W=M*nLP-`y z5u_bTi5xkK6gdv!7=q;3iDCgx@|Teq0Tcs@0Yx?>I{_jDhOEU&Ajn8W$+k>O)IyQs z49QuWGt;y5^uAPA*Ye)G%gG9=2Iy5LZW(F#0p>-7nds5vWHDROJSzov{ zfAuQ8&NpRk{@a7j);!Sr{{p~7(PZo3iTAqJvG>XTlP997*+#l&KO?mY^;*KQR>a?$ z(HJT`esG3HDdPG@kH4H-<-dRX63?Bx*hyC|T#4>n_>=DZ`Oi9MZ~wmn&^&PF)CXoB zy6=Na6Zg-$(h2sp>KvYmXpAJ(s~Rg22OGk%QNy2K8{yu`GDpWsoSCek6>MjYFJ4*W zcb~q=wQDz#YiAdttAF-iw=X{b31H>NTF4*ui&30JwPx#Arr-LrpMLOH-}(!`_TD#+ zJ@JNvj5bENt6AdIEF7OLSnZb>D{FLQXpT7!j0RrZvi#2*ImdDdN;*jXPOj zW@ePX|LES)zu@%`*C)o_YkKP)ap8qv3;C%5C{=3{%_H~z{^?(O^tXQbgAX*`b>@^h z+}KMu3e-o1*Uv^ov7rbNNn|)QDa4UstzY4VtrBlJlJVd;d}~#h+xDDlrX*VN%yN(U z9butYWzSe$?KF?o&0U9oKFK#83_IqCr($7-2197360LCU-Z&0(Z|GYi@__3J-N6}`I6VnNY zCQ7vNbX8#68cI=2C5}j{q6|q{iSV&OX+t&9)S?8XHBP}|&v13UiYSdoqjccd}ic5#xOmm z`MF~;aimD%GFmGlWAIw&5$FXWP8>618G?{|MdlP|CLH@?!*r}@q{3YjJ<3twR>zPz z!Fd4@WH=$-QPF}{iZwmaoGEWSnl0XWs$`;O8bwp3C^~Fl!-n9Z*JPV0Hub65k7m>N zo!qx?nyKa}O2B%Uu3GSle!pNWDU&OW-Yu&0n?j|en5-E_B4MP|VPU7o+*%D~3N$GR z3I|LlLVvu^jkf2dop_L)u@?K!eT~*GZ3w`3;L=t2J)n4H2aGY3!HoVhTdAq3 zW}P5`!aF>gN;&Yvp%~*GNgNXlWJMqB03D?i!DA%Q4Hjo$(K;q-ip6fsK0N1EHD{VJ z9oyrR&rGnj6VZ2|LO_Y2B%p)ff=64AWPSYF9i+WZvAOmtTDv{mfwREQt6XS&V)ETP zlxIt6g^_ZKa~_AsiKkJ`*s+FkUr3WOJA)qORI}aNW~?zq31P|S^ktZd3IdhXa4_}c zS<1tcuxfL@u~=rauj$zD8&43l1PFo(f)Rx>3Em{wK^NxEGMOakqJUki7nSNF!{qTj z0Ey`M7fDhY)dc4Q);YXHIB{5UthIYICL*l2R7+*%S5`Q6u*tw@tlJ*jK4&|41_3Im zqZY-aCZZK-7Ba^-RyALEafHGvkTC2B0;mA)dmy|ZK`>E@9&Hh|az^t$O|8+pO~hg; zA-TKtGrV}G26Q!#Jw}|S2TfW&Av$8DQo=chbDqLG3TG(>p0pgZBSI;Oh*Thr6vile zE@#_i^jtwAV1m#oELm`rm10UIEZKsqYi07F(MqAT2BnbQPDcPAzz4wxa2P^bgKC4> zL65{*%x(za|##9HB;#o7XE3%vEbycBWvR>9?d zo1QJ$?su4(Y>_4v+IGOE&FK_5ed}24XT(a;)Dbf(rH4YF@97^kV)gBzW(B;dj-|Ia}Ws=w^LI`+k z2`GYST+leBSlSZYh~o|8Wk#b0aU9X}1&hTF%Xvn-@btVzYeVK7T?ssw@358&-?=%# z+;W{#wCf7H20JzEGlLI!HKY_?1POr<0_N6b4%q_jJpcn>y>%D8ohB--J;b-a{Ra{2 z>v46Wb#SXFhzU5G6I6^13MU313|4FAmw_arzrV-mND9WVk#|ud3<^)TaO7xeCSu15 zclrg!M4Y=l!PVs^C8N=L=t3fb^|A{_us%l$3mB9@@B%(Ca`PhlwSFZ7-82!!*c8RK zA*s}7$QI%VYvU*~lx}GbWTO{5wKCzdLV!-8mhvlAS zex*+CW2%*uTboTLM*}l0hsKaZhBVSdTA@++JfoO9h{-)-YR{rmj$J6AaT@*LZ%t9;pe{&IYZl>;Zqbxe6tERFlKFz6d9r;yom`WCIn9q0fAfV2}M-m>vt5> zqwCaa4H}`!AT#L5K&+8SL8MVeQBGjKUB|C3Gy6yXk@sJ_gr1vY#W_Az9pU`Xy$5sT z45mLoXBoZ1^3>`b+TZ+B{!M3tu^*s0*MUK01m!Fu0(w};G)kd#Jj?{H!1-M_Dl(kS z@y;UNAp~qtpkTS1QZA3;0ywQ8RuCyLifSb=UiX+pG1JJI3`^Ymng75C&p%Im`7#~n z_;1w_F1+J?nCThvrJLA|JB02wVl#Aof^#Py;(}5{KTv6}pird|g7+XE@qU2TL6aml zEtR(~|;dwWQv zc)43*^`jr>J!fAexp|Wi0$+(E^1t^Oje3Nv&f|Jphyqosq3h$Qu@-9f9yW}5CI9PE zi7TZt#4$kvA^}{nO&q(3YBkfw+y*)1t*0moFcwmWC_nrG0!q*ZP>RJtiGTO4h+jOd zdHi67#|~RY_Vg*IhN)4*vr9EHrOBUulHZ;?OKo8R34xoymk*yH*c#inmxuAyXrU&i zNg6E*Q-J`X+va3iB63}nF}P#LxG{g5pd+jV41&rB>y*nj;+}i_&WkTBD;Y|dHYZe35bn?H!R)G~WAOUWy_*w^#AIoQU8N z$*yzwaIR^!(rC2)jMf?vPmvGsw!k|}a264dh#*=GQ&^-3ktRe2l|4H4D6f5?3so}6RK50sl@Sx zIm${g`tZX{{Q9r++_`gPr7B*TA%_}t31ZK3=1hnvmB>q_a|!GyZ%4dyxWYnY5nDj8 z!=NDy*_6>JV^Fa{B7-CvlNcm1Jlikx-D`$D<-l7$_ay(I+Z~dyYL%PLu~e;*7ClDx zjC1tv7UjG5Q0%L7Xj*ZuZMnP{qp5O|U z&5R#&;z-C<;Ggj%)A zzUguLlM_rd>iqm@6B14AEXiobO8YGLzwUlasf4VoF#r7Xti~x)sz96)vH`y6JjvY; zFHtIqW^7ET*Hx!f`jaS*ZW?mLdwfwKMM3CiNG~Jg1A@!I6{uj5;DOz)>XmkTNHv?+ z=a?KHM>aQ+l@;vGn_TO3NKC|7eT2|zk~T-FS4tqB$iw-pN8fr{7v~voG?3+G+?_j| zzjTqTS!U+ArqL8+ZE=lO^|PdDhmU+jG~?rrB=O<#$M29PpK{qiw0Q82kY`BNBkc4E zTRlR*N67nxVt^F+Fvz__c|R;L-XkGUTUnx}6tc90EHBf$c8#t!Bx!;f8zr4+perTv zNV6k~wJfL8%UN7nXYchTY9h$e68^>wUfkHAI$33Ex=!8^@tX^O$lITIf#3NZ8TJG3 zfB*NE(C!>K@QLamdpx+on|+ib-h$1b-$mL9Dvk+pj7o+&unb)(u;Hai-AS8+W>Ud*0|s;^{Fvd zwrh0eZ!F2E{2`@M@rn@lDplz1Z(q}&|J;Xt-usSDs)!^6Yf)-|^mY&oN<}E8P#TmH z6af*B4kdK(M6t#yMZUQSseImc9zKnPU(eHuZS2L>XTtf0Typ`gv6 zpHcMsXXmYjP=2)e&E1d)$h!ZY3 zkG7V6uZw7*@PT5GWBYy57ccX#eZ;8u(C;H5uvFxzkvgj{&R>#>|ChYs!HmHG8jT-N zr_Y~Dw1`ra9#%m_z*#5?C_K`4NY6sIfILU?0Rf@% z((^p(9cfXZih{9fmH&|!6qDm*rG(5n2E9JT<|cceex8rsT<6WJtCYK4w6$n!S=5G4 zZ?ihE_MJTP#w&dFt4%}_S}n^HPY6#wiQ$PS6rcIbYb5sU;fJ@(+Uj?8-hGQ;CRCIn zIznkR6gYwhpCiR?t>_ofDUeQ%^el@zZQiuDzyUy8%ak!p)<$@tv%^NOhuzp@&$U~; z>+)^>{pvPfxqgic?QI?sL3@vKjy=sLy;`X|QPO))FD}04?>l`FXW?pugSe}V0vi@wYbO^mX`RpD)60C z2hjB@tFdBprOkK<#3Hmq;9|GS=QcL@-L0)VpZ5OaTeGvDBS{8W>*#j9;w^7coIWkD zih~~>M~-0HZKL|VU(zQ1Z8bV`7o!tO;uKNQkkl~*BT9WgR)R&k>y+2#Iow(2?%){# zwiH~6Bi5(JVgDGqRw60KbZ=~IcP=gbmzJ{+jE1n^!=SD8wXHOLDvXW&71in*QPiPU z8_;ZezVsy&QKUF}6lyj3zwX2<`ujfE+S(Iq{jVe*`KP9~r%81TsgzJeh#msLs38yy z*aB=H8SEha4!DBxI*g2!k%Cq(|0^mgzeAFdy=HVmOIpK}%Y-P}jTMDxjY5Xp zNi6j=XQr`DJImbG%GQ<6TIWl?6F$XQ^CGuz|HM}f)Q^3GWO8zthO_L5a_-IeaIezo z3F7oLq9=$dnxv#LhN0Y@4Rp%+TDf=A+H5Y{F23wle1Uqs&F$Mi@$D7$L-SAeN3|M+ zpz%J!`x+s{gz)Nn7{+*v>5--xNg`}){8X;o{2wV(WRG>m{p|n%002ovPDHLkV1h)J BuMz+N literal 0 HcmV?d00001 diff --git a/Xorg/app/dillo/patches/000-do-not-need-flt2-util.patch b/Xorg/app/dillo/patches/000-do-not-need-flt2-util.patch new file mode 100644 index 0000000..3dcf47e --- /dev/null +++ b/Xorg/app/dillo/patches/000-do-not-need-flt2-util.patch @@ -0,0 +1,21 @@ +--- dillo-rcc974615ae39.orig/configure.in 2009-03-09 15:40:08.000000000 +0100 ++++ dillo-rcc974615ae39/configure.in 2009-03-09 15:52:42.000000000 +0100 +@@ -145,14 +145,10 @@ + dnl + dnl For debugging and to be user friendly + AC_MSG_CHECKING([FLTK2]) +-if sh -c "fltk2-config --version" >/dev/null 2>&1 +-then AC_MSG_RESULT(yes) +- LIBFLTK_CXXFLAGS=`fltk2-config --cxxflags` +- LIBFLTK_CFLAGS=`fltk2-config --cflags` +- LIBFLTK_LIBS=`fltk2-config --use-images --ldflags` +-else AC_MSG_RESULT(no) +- AC_ERROR(FLTK2 must be installed!) +-fi ++AC_MSG_RESULT(yes) ++ LIBFLTK_CXXFLAGS="-I. -I/usr/include/freetype2 -Wno-non-virtual-dtor" ++ LIBFLTK_CFLAGS="-I." ++ LIBFLTK_LIBS="-L./lib -Wl,-rpath,/usr/local/lib -lfltk2_images -lfltk2_images -lfltk2 -lX11 -lXi -lXft -lpthread -lm -lXext -lsupc++" + + + dnl ---------------- diff --git a/Xorg/app/eterm/Makefile b/Xorg/app/eterm/Makefile new file mode 100644 index 0000000..b1f0b26 --- /dev/null +++ b/Xorg/app/eterm/Makefile @@ -0,0 +1,69 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=eterm +PKG_VERSION:=0.9.4 +PKG_RELEASE:=2 + +PKG_SOURCE:=Eterm-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.eterm.org/download/ +PKG_BUILD_DIR:=$(BUILD_DIR)/Eterm-$(PKG_VERSION) +PKG_MD5SUM:=b8869ee9c9b9516231af9eefa595cee3 + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/eterm/Default + SECTION:=xorg-extra + CATEGORY:=Xorg + SUBMENU:=terminals + +endef + +define Package/eterm +$(call Package/eterm/Default) + TITLE:=eterm + DEPENDS:=+libX11 +libXcursor +imlib2 +libast $(ICONV_DEPENDS) +endef + +define Package/esetroot +$(call Package/eterm/Default) + TITLE:=esetroot + DEPENDS:=eterm +endef + +CONFIGURE_ARGS += \ + --with-imlib=$(STAGING_DIR)/usr/ + +CONFIGURE_VARS += \ + LIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib" + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)\ + CPPFLAGS="$(TARGET_CPPFLAGS) -I$(ICONV_PREFIX)/include/" \ + LDFLAGS="$(TARGET_LDFLAGS) -L$(ICONV_PREFIX)/lib/" + $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install +endef + +define Package/eterm/install + $(INSTALL_DIR) $(1)/usr/{bin,lib} + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/Eterm $(1)/usr/bin +endef + +define Package/esetroot/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/Esetroot $(1)/usr/bin +endef + +$(eval $(call BuildPackage,esetroot)) +$(eval $(call BuildPackage,eterm)) diff --git a/Xorg/app/eterm/patches/010-dont-add-host-paths.patch b/Xorg/app/eterm/patches/010-dont-add-host-paths.patch new file mode 100644 index 0000000..a66efae --- /dev/null +++ b/Xorg/app/eterm/patches/010-dont-add-host-paths.patch @@ -0,0 +1,17 @@ +diff --git a/configure b/configure +index c2c0c91..321e0fb 100755 +--- a/configure ++++ b/configure +@@ -26704,10 +26704,10 @@ else + fi + + +-CPPFLAGS=`eval eval eval eval eval echo "-I$includedir -I$prefix/include $CPPFLAGS"` ++CPPFLAGS=`eval eval eval eval eval echo "$CPPFLAGS"` + CPPFLAGS=`echo $CPPFLAGS | tr ' ' '\n' | uniq | grep -v NONE | tr '\n' ' '` + CFLAGS=${CFLAGS--O} +-LDFLAGS=`eval eval eval eval eval echo "-L$libdir -L$prefix/lib ${LDFLAGS--O}"` ++LDFLAGS=`eval eval eval eval eval echo "${LDFLAGS--O}"` + LDFLAGS=`echo $LDFLAGS | tr ' ' '\n' | uniq | grep -v NONE | tr '\n' ' '` + LIBS="$GRLIBS $X_PRE_LIBS $LIBS $X_EXTRA_LIBS" + diff --git a/Xorg/app/gtkperf/Makefile b/Xorg/app/gtkperf/Makefile new file mode 100644 index 0000000..9a5ad56 --- /dev/null +++ b/Xorg/app/gtkperf/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gtkperf +PKG_VERSION:=0.40 +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=@SF/gtkperf +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/$(PKG_NAME) +PKG_MD5SUM:=4331dde4bb83865e15482885fcb0cc53 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +TARGET_LDFLAGS+=\ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ + +define Package/gtkperf + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+gtk2 + TITLE:=gtkperf + URL:=http://gtkperf.sourceforge.net +endef + +define Package/gtkperf/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin +endef + +$(eval $(call BuildPackage,gtkperf)) diff --git a/Xorg/app/gtkperf/patches/000-disable-autotools.patch b/Xorg/app/gtkperf/patches/000-disable-autotools.patch new file mode 100644 index 0000000..8e2cb80 --- /dev/null +++ b/Xorg/app/gtkperf/patches/000-disable-autotools.patch @@ -0,0 +1,19 @@ +diff -ruN gtkperf.orig/Makefile.in gtkperf/Makefile.in +--- gtkperf.orig/Makefile.in 2005-06-07 18:09:49.000000000 +0200 ++++ gtkperf/Makefile.in 2009-10-14 12:29:30.000000000 +0200 +@@ -40,10 +40,10 @@ + + top_builddir = . + +-ACLOCAL = @ACLOCAL@ +-AUTOCONF = @AUTOCONF@ +-AUTOMAKE = @AUTOMAKE@ +-AUTOHEADER = @AUTOHEADER@ ++ACLOCAL = /bin/true ++AUTOCONF = /bin/true ++AUTOMAKE = /bin/true ++AUTOHEADER = /bin/true + + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +Binary files gtkperf.orig/.Makefile.in.swp and gtkperf/.Makefile.in.swp differ diff --git a/Xorg/app/gtkperf/patches/010-change-layout.patch b/Xorg/app/gtkperf/patches/010-change-layout.patch new file mode 100644 index 0000000..ab90329 --- /dev/null +++ b/Xorg/app/gtkperf/patches/010-change-layout.patch @@ -0,0 +1,77 @@ +--- gtkperf/src/interface.c 2005-06-07 18:15:24.000000000 +0200 ++++ gtkperf.orig/src/interface.c 2009-10-15 12:17:43.000000000 +0200 +@@ -44,12 +44,13 @@ + GtkWidget *vbox_main; + GtkWidget *vbox_info; + GtkWidget *hbox1; ++ GtkWidget *hbox2; + GtkWidget *button_clear; + GtkWidget *label8; + GtkObject *spinbutton_count_adj; + GtkWidget *button_start; + GtkWidget *alignment1; +- GtkWidget *hbox2; ++ GtkWidget *hbox_start; + GtkWidget *image1; + GtkWidget *label6; + GtkWidget *scrolledwindow1; +@@ -91,8 +92,8 @@ + appdata->window_main = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (appdata->window_main), + _("GtkPerf")); +- gtk_window_set_default_size (GTK_WINDOW (appdata->window_main), 500, +- 300); ++ gtk_window_set_default_size (GTK_WINDOW (appdata->window_main), 320, ++ 240); + gtk_widget_show(appdata->window_main); + + #endif +@@ -115,6 +116,9 @@ + hbox1 = gtk_hbox_new (FALSE, 10); + gtk_widget_show (hbox1); + gtk_box_pack_start (GTK_BOX (vbox_info), hbox1, FALSE, TRUE, 4); ++ hbox2 = gtk_hbox_new (FALSE, 10); ++ gtk_widget_show (hbox2); ++ gtk_box_pack_start (GTK_BOX (vbox_info), hbox2, FALSE, TRUE, 4); + + button_clear = gtk_button_new_from_stock ("gtk-clear"); + gtk_widget_show (button_clear); +@@ -134,7 +138,7 @@ + gtk_widget_set_size_request (appdata->spinbutton_count, 100, -1); + appdata->combobox_testtype = gtk_combo_box_new_text (); + gtk_widget_show (appdata->combobox_testtype); +- gtk_box_pack_start (GTK_BOX (hbox1), appdata->combobox_testtype, TRUE, ++ gtk_box_pack_start (GTK_BOX (hbox2), appdata->combobox_testtype, TRUE, + TRUE, 0); + gtk_combo_box_append_text (GTK_COMBO_BOX (appdata->combobox_testtype), + _("Test All")); +@@ -169,23 +173,23 @@ + + button_start = gtk_button_new (); + gtk_widget_show (button_start); +- gtk_box_pack_start (GTK_BOX (hbox1), button_start, FALSE, FALSE, 0); ++ gtk_box_pack_start (GTK_BOX (hbox2), button_start, FALSE, FALSE, 0); + + alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment1); + gtk_container_add (GTK_CONTAINER (button_start), alignment1); + +- hbox2 = gtk_hbox_new (FALSE, 2); +- gtk_widget_show (hbox2); +- gtk_container_add (GTK_CONTAINER (alignment1), hbox2); ++ hbox_start = gtk_hbox_new (FALSE, 2); ++ gtk_widget_show (hbox_start); ++ gtk_container_add (GTK_CONTAINER (alignment1), hbox_start); + image1 = gtk_image_new_from_stock ("gtk-execute", + GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image1); +- gtk_box_pack_start (GTK_BOX (hbox2), image1, FALSE, FALSE, 0); ++ gtk_box_pack_start (GTK_BOX (hbox_start), image1, FALSE, FALSE, 0); + + label6 = gtk_label_new_with_mnemonic (_("Start")); + gtk_widget_show (label6); +- gtk_box_pack_start (GTK_BOX (hbox2), label6, FALSE, FALSE, 0); ++ gtk_box_pack_start (GTK_BOX (hbox_start), label6, FALSE, FALSE, 0); + + scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_show (scrolledwindow1); diff --git a/Xorg/app/matchbox-keyboard/Makefile b/Xorg/app/matchbox-keyboard/Makefile new file mode 100644 index 0000000..5ca8915 --- /dev/null +++ b/Xorg/app/matchbox-keyboard/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=matchbox-keyboard +PKG_REV:=2111 +PKG_VERSION:=svn$(PKG_REV) +PKG_RELEASE:=1 + +PKG_SOURCE:=matchbox-keyboard-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://svn.o-hand.com/repos/matchbox/trunk/matchbox-keyboard +PKG_SOURCE_PROTO:=svn +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/matchbox-keyboard + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + TITLE:=matchbox-keyboard + MAINTAINER:=Michael Buesch + URL:=http://matchbox-project.org/?p=1 + DEPENDS:=+libfakekey +cairo +gtk2 +libexpat +endef + +define Package/matchbox-keyboard/description + Virtual keyboard +endef + +EXTRA_LDFLAGS:=\ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/matchbox-keyboard/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share $(1)/usr/share/applications \ + $(1)/usr/share/matchbox-keyboard $(1)/usr/share/pixmaps + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/applications/inputmethods/matchbox-keyboard.desktop \ + $(1)/usr/share/applications/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/matchbox-keyboard/* \ + $(1)/usr/share/matchbox-keyboard/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/pixmaps/* \ + $(1)/usr/share/pixmaps/ +endef + +$(eval $(call BuildPackage,matchbox-keyboard)) diff --git a/Xorg/app/packages b/Xorg/app/packages new file mode 100644 index 0000000..f08db70 --- /dev/null +++ b/Xorg/app/packages @@ -0,0 +1,9 @@ +xcalc-1.0.2|+libX11+libXaw +xclipboard-1.0.1|+libX11 +xdm-1.1.6|+libX11 +xeyes-1.0.1|+libX11 +xinit-1.0.5|+libX11 +xlogo-1.0.1|+libX11 +xmessage-1.0.2|+libX11 +xset-1.0.3|+libX11 +xsetroot-1.0.2|+libX11 diff --git a/Xorg/app/pwrtray/Makefile b/Xorg/app/pwrtray/Makefile new file mode 100644 index 0000000..1e1c555 --- /dev/null +++ b/Xorg/app/pwrtray/Makefile @@ -0,0 +1,107 @@ +# +# Copyright (C) 2010-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +#LOCAL_SRC:=1 + +PKG_NAME:=pwrtray +PKG_REV:=7581cda95d1cbe10ef0665840801a3120004db79 +PKG_VERSION:=1 +PKG_RELEASE:=1 + +ifeq ($(LOCAL_SRC),) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=git://git.bu3sch.de/pwrtray.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) +endif + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +PKG_CONFIG_DEPENDS:= \ + CONFIG_PACKAGE_pwrtray-backend \ + CONFIG_PACKAGE_pwrtray + +include $(INCLUDE_DIR)/package.mk + +define Package/pwrtray-common + MAINTAINER:=Michael Buesch + URL:=http://bu3sch.de/gitweb?p=pwrtray.git;a=summary +endef + +define Package/pwrtray-backend + $(call Package/pwrtray-common) + SECTION:=utils + CATEGORY:=Utilities + TITLE:=System power control daemon + DEPENDS:=+FEATURE_drawing-backend_libX11:libX11 +endef + +define Package/pwrtray-backend/description + Tiny system power control daemon. +endef + +define Package/pwrtray + $(call Package/pwrtray-common) + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + TITLE:=Frontend to pwrtray-backend daemon + DEPENDS:=+pwrtray-backend +qt4 +qt4-gui +endef + +define Package/pwrtray/description + Small system-tray frontend to the power control daemon. +endef + +EXTRA_CFLAGS:= \ + -I$(PKG_BUILD_DIR)/tray/moc \ + -I$(STAGING_DIR)/usr/include/QtCore \ + -I$(STAGING_DIR)/usr/include/QtGui + +EXTRA_LDFLAGS:= \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ + -Wl,-rpath=/usr/lib/ + +MAKE_VARS+= \ + MOC="$(STAGING_DIR_HOST)/bin/moc" \ + STRIP="$(STRIP)" \ + $(if $(CONFIG_PACKAGE_libX11),FEATURE_XLOCK=y,FEATURE_XLOCK=n) \ + $(if $(CONFIG_PACKAGE_pwrtray),FEATURE_TRAY=y,FEATURE_TRAY=n) + +#MAKE_FLAGS+= \ +# V=1 + +define Build/Prepare + $(if $(LOCAL_SRC), \ + $(CP) ./files/src/* $(PKG_BUILD_DIR)/ \ + , \ + $(call Build/Prepare/Default) \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) clean + $(call Build/Compile/Default) +endef + +define Package/pwrtray-backend/install + $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/bin $(1)/usr/share + $(INSTALL_BIN) ./files/etc/init.d/* $(1)/etc/init.d/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pwrtray-backend $(1)/usr/bin/ + $(if $(CONFIG_PACKAGE_libX11),$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pwrtray-xlock $(1)/usr/bin/) + $(if $(CONFIG_PACKAGE_pwrtray),$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pwrtray $(1)/usr/bin/) + $(if $(CONFIG_PACKAGE_pwrtray),$(CP) $(PKG_INSTALL_DIR)/usr/share/pwrtray $(1)/usr/share/) + [ -e $(1)/etc/pwrtray-backendrc ] || \ + $(INSTALL_DATA) ./files/etc/pwrtray-backendrc $(1)/etc/ +endef + +$(eval $(call BuildPackage,pwrtray-backend)) +$(eval $(call BuildPackage,pwrtray)) diff --git a/Xorg/app/pwrtray/files/etc/init.d/pwrtray-backend b/Xorg/app/pwrtray/files/etc/init.d/pwrtray-backend new file mode 100755 index 0000000..e138939 --- /dev/null +++ b/Xorg/app/pwrtray/files/etc/init.d/pwrtray-backend @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2010 OpenWrt.org + +START=99 + +start() { + [ -x /usr/bin/pwrtray-backend ] && /usr/bin/pwrtray-backend -B -f +} + +stop() { + killall -q pwrtray-backend +} diff --git a/Xorg/app/pwrtray/files/etc/pwrtray-backendrc b/Xorg/app/pwrtray/files/etc/pwrtray-backendrc new file mode 100644 index 0000000..d03004a --- /dev/null +++ b/Xorg/app/pwrtray/files/etc/pwrtray-backendrc @@ -0,0 +1,16 @@ +# pwrtray-backend configuration + +[BACKLIGHT] +# List of auto-dimming steps. +# idle-seconds/brightness-percent idle-seconds/brightness-percent ... +# idle-seconds value must be growing. +autodim_steps=15/65 20/50 25/25 30/10 35/0 +# Default maximum brightness value for the autodimmer, in percent. +autodim_default_max=75 +# Enable auto-dimming by default? +autodim_default_on=1 + +[SCREEN] +# Framebuffer device for screen blanking +fbdev=/dev/fb0 + diff --git a/Xorg/app/qwo/Makefile b/Xorg/app/qwo/Makefile new file mode 100644 index 0000000..a01a1cc --- /dev/null +++ b/Xorg/app/qwo/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=qwo +PKG_VERSION:=0.3 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://mirrors.zerg.biz/nongnu/qwo/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=4a3cfc9ad505c60cdf0d896f0323aab2 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/qwo + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libX11 +libXext +libXau +libXtst +imlib2 + TITLE:=qwo + URL:=http://www.nongnu.org/qwo/ +endef + +define Package/qwo/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share/qwo $(1)/usr/share/applications + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/qwo/* \ + $(1)/usr/share/qwo/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/qwo/qwo.desktop \ + $(1)/usr/share/applications/ +endef + +$(eval $(call BuildPackage,qwo)) diff --git a/Xorg/app/rxvt/Makefile b/Xorg/app/rxvt/Makefile new file mode 100644 index 0000000..29504df --- /dev/null +++ b/Xorg/app/rxvt/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rxvt +PKG_RELEASE:=2 +PKG_VERSION:=2.7.10 + +PKG_SOURCE_URL:=@SF/rxvt +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=302c5c455e64047b02d1ef19ff749141 + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +PKG_INSTALL:=1 + +#TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/rxvt + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libX11 +libXext +libXau +libXtst +imlib2 + TITLE:=rxvt + URL:=http://rxvt.sourceforge.net +endef + +define Package/rxvt/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share/applications $(1)/usr/share/icons + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin/ + $(INSTALL_DATA) \ + ./files/rxvt.desktop \ + $(1)/usr/share/applications/rxvt.desktop + $(INSTALL_DATA) \ + ./files/icon.png \ + $(1)/usr/share/icons/rxvt.png +endef + +$(eval $(call BuildPackage,rxvt)) diff --git a/Xorg/app/rxvt/files/icon.png b/Xorg/app/rxvt/files/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..9206d2ff092b454523fd466ce644e92112cc7c0b GIT binary patch literal 8518 zcmaJ{byQqEu-}D6iY)G0+$pfYBBelaDN?k!OK~Z*KyhEJ$l??z6nA%Bpg6R+Ebi78 zEB5w#|G#(cBy(?0PLjEq`AsHCwB{Q{d>m>V004lmtR$z6;=cbSY)n)xW-T&A!Dfdfjn)00hP~N+cX-_Nr+xoLzr@y6eQ`s+{@%$+n58nt!gLnHfG_ zU^C4m{sP*9*Yiepm|Aw27R&(xV7t@y{2TLq&iL)T@^Y;+;l}Z4Vo6c5>wIm^Y+=4O z@7SmAPkX{feZugE6Ll`RCZ2sy1zV=N4C%Sj9c8KQq^pkld$jnty!Qw z)&x z^UkXFpS2yQBMiobvNF%6IatMHhc!juep^ew%3nQfk7cL=egk}!gY+94fhlO&{Doon z6ce{3cuGHYbd%E3Y$5yxL5GL$I5uANw03OWi|gLB+kd;mqgG;x_#Q`NJz<;)eu$E7)W?F-qR8@`wo{tbeex+`|VBXO0@$GU)!m z>H^b1zS9USXll9&-re0ze);lcKY(o;KqKx=Z{=hnNk6po>m+>^LR0ERoLL+^lh{gw zg^hI^61MuP64BdgQ%?C%>A*GP5Z|`s*udw|i@cm9iX9{$w5k;WumisFkVj@8!h;C4 z3myL5XJ$H%<*kF{^O4yy`9Cp5N#hx*V?(ta9lcC@Eg}|F0Nb91+rN0C7RPb&0hAo9 zCEbPO(Y~Z3IxU%8KO_M@fc<1Nr+>LbU>!wfA{JtI&Do_bw*LNUkmIR+-@*+`)%^yJ zjxKsB;YY+ft1TxU(+2F@F&1qSW|0h@WM z(nH7vwv4(7v%=8Zn`MSa?C)=KLW&*8NNsC`MJI=ZCM82pmQUsRvcfV)q5dAS(cvOJ zA1S35NX)rESqF?)7M_P-Ck$@x`yRaj(=H_FaD^N2*hV>;63xzXWj~YQgTD?8WU#EI z6mjjsQsKZ8&JyWuxVPb!mhA!JScNi#%9uyoVTT(%3Qh<>Ab1GMvhs5G$(PrRc zlp5@xp7MpsM6<8Hd`Yc=i51=P0+Bemmo&P=1<>%cg2~LIgHn#6;wtFJQ@tR@ln_E3 za6gYv=!95gvBMOk673vsA88qcOS=6+$G-O!xW_#5NghO>+;_2RNMbV24VWbC`HphPxx7ra3K*!H1QDwNrjn?OC=$uuWW$_va9Ja&YQLXRvdl8KpHU>bh0$D zHjN6@DJj3j1#pQkpwqt6Hdv26>%77b;|H7)@m=A2kyh~9)oh^}ze1BIElmSD8usg% zxliPmmGys45?0|vAP_JaKs2;bo=3Ptj~-;MLBtDxd@`uC-_&xq1P+T~S&eo1=;}KA z2*5|5=S{wzg=~9>-T93ck!Em$qqLpiztaE;e?zhA3u5IUN$E~cQSy+YpVO@{0h(cd zsRR_Mv4x_@m@m>vyq+)0Efx%JGBO zs?7T{f>KAfv9}>e?fdMoZM{fIa0r2rccoifRg=h0F7eVb0UzU$7?c(ug!s{hT&%Y% z?CM$*cmds`q@x>*GDK6cWh8J2b`;Rj)kTe$X3R_6IrL6G*pROXADtTz8v9@#NHAtu zP*!FmknS1pch*Tk@an$iwPf+E!~Jh~_dqZ@77A*=lWC$cYZV-c*R|3LvZa^m9OByT z>FhL62JRZWc>4j=XqkGQ_|aH^>qKtz=p|og?L>6>)qBh% z{yj@iDX*d6B9C?{srCV+&Lxf5@@L?v;@4E^Ys@?HP>q-^YOsR@2HmkZggqW7FsWCD z_>nxz%cQwdga4W(Z<09!g7eU~@j^B~@k~svX?MnfW!8b^EvNOY!?q6D7+R{fGz7WA z*oOaRaXs6QASNRWP8i+RP?J#rW(%ntWaVn1e#mCmx{lhe=rdwRp0OV2%PRH`T>2ey65G%5J{d z_->x@GusF0QlJ}m25(yrh_S(|WLh+9TZv8(*Xer&n5p2;tt4?Yi2ma?k^g16+2Bl( z>h!{b0mzMoxHkfyrpECXmvy}%OR_Q^KK{nf(zgrEt_*x;UB_;Zf68L4#p86uok3(3 z!Mp6AZIBCv>7&=)q5OA7S9cC*%ZEN0GEC87^wTjVWFkp$vCNU0axeVN75W^( z{(;BH%22~Un|D2Iteu%bNjz}&6L(2fIX__b){BfvGWff3f z784PHDS5r(xln6`)wfYoy{yBPxbA*TDRpuz#|9VjIvfWa4oOn^?f|Gs&jk|{Sv+g; zSxUYW(7u?mkWioL!uV?stV{yFHsEWh4M|h^j=4OiZyS3}{IV0C#?Uc?@RN#x36 zeaojyE@;v3sJEQBhP!C175h1FYMl=rzYKXsaK`n-4{p{`@(8st@_0%g(}vl|#~y=% z=H~Pu!otcA8)o;L6j0xDMwI<%W%h}AP2{6Z$v$VKMNAE2KVGjt(8cFLfhyQ8-?WRo ztFiftFonEUQMfep@?Xec)3SP<7E<&Ct6hYE`yJ>7d920N@nY1VrS^sY-+ir;vKURM z6CSbbS9Ij&$36>Gqi2)3!jJKC*;*yqTI>^AMsLw^%q{&_(j6(l6zzQR6;%9_Sh<`L ze!!D(<*67jKl5mL88HB2;^Xg<`qkk0Z-XbGBs)|KXO~{GAikzf#S}AfUQCe6X{C$K zsM)!HgoNGg_x695LnYC+(+e zlViU>>ex+sExfIk7czpc)O`G%Q z+?==uC62{p?n~&!2)pmYe7DF7&ve{xkHC(gloMA(9+jxV2USm@u7`2g%||+k^WKXs z-@B>jv|=70ltae2a0Q+;*{|wVea6!z6GQ{VHP_Gcz-yo-o1&9^)vA+(7!60_1#kH<&jI!&1O3;B3@%v8&38P@)tI@ zFYlYjj>`b}dYu-{S;D@S))FP0ti@GkiEI>B2hzFHOGb6Nc7|6~@wp*jN9m3|R%Kl^ zV-t)6WQKpId$UzFBrv$e(-{`m*ApJFz~-ZAyaqMq!KB+Zs17s&FDMoo+?gLINBOr- zUPmToroUJ?o>?_bt7GrUCv;I$W3)>v`!Vs#?#fBB!IS;ev>BZ6@*fA7UJ5q<`Oe6= z&3Bs6hkQy#x;=vIT2o;v32=Q4YjW z+~nME5D=MakhofM^AQR=LfN(7qohX$-tKrtXjxg=X6hxj3={p(W;kxG#mPJWkAG|- zlX(eA(a&ID{9uR7dw;?H$p@1}{p#yEL425n%UhD%m3l0-QQ5biyA>KCzLN3L*3@>B zCIj2n#QpuRDHIeHH30j;t=O^X$U(H8M(@V$s!PnCMK#P9e`)kiE572r9=?Xcd znS!0966z`V3mi_3d7ftAu&7k5tV7%JzMN6G)zDm}!R%W6^oTOv)g_e+oHFogi6xW~ zKAK-%j;okJ*Pm3VC?F^aYmJL5sjTG9WPRpY!<#NjKr>f0_^{k;g>p76QsOZ*d4b@n zvWcT~uCI0a&E;%p6-V}tj(xc={d#`l{q&#fx-yWAAF-y++2gacv_whJ&k8W@Sm;Hz zi&V&%nDEvu!c5MrUo3#q4+hCCI6y4K5q$XJFWk2<-(*YS>(0CH)!CpTm0WRSEz+Ok znc-xk@U1TAeKZKD4-YlX z%m`E*rqv?sAu+`Wg$koi>h`m4230uU;M4-83m(3VT?KMUouWsIFCTbrEP1<4zmFCw zgKc>MVoT=q%I%Db9izmOL=1AUtXfb zmW9$@VYM}p`&635dY9{Oskrk0^Ye?lcjXMSxl1pQ8lsF)RJ@ozm|gI@dBJDe1{m{8KtdFNVD2mQ5d8bq?2;6;oepOGMy z34%%kr6{ZZ>R9kOCViyFA?xvuozTSQM7Zq_6G=YgoFUhrcFZD zx6nq2S{`c-qrj0lQs{HVJEiQ({+)$Y`rx%@|Qt1radFG-vz|P4xBNxV|2OokkwCz)iq_6 z_&P9#QE_hbz2BPHj*yrQFY4~qZU&9O>-HOjPgm#z76DV%xJorEEe;iv#s_>E(dzeq zTR%vY8H9zWUnSAB{}l4u&IG#TCA9GjDGj*2m)kR@O+B5^C$*pEh!{egZ{S!T zjCs14QAPRPFE8)jq$#()AE)-eUS3x)VcIx0cmE6T=VG3J)@ghB>=wb518G^gIJD!=2ZmP3lim?}@iviR$GKoWh-9oK5ckay( z{hF@MPL2=+b;znXg46P!>Y{;~B>Xq=RQ-Xahi8y?2>y?;1L zA>Tc|kdAKu=xk_D)CFmj@QM%P<6MQ|Lg#x5DM@!Us>RladleHb2!0CTn1j8vkr563 zLM?j2nh(RNlk;WV1U?wNnXK_@u&dK=`r={;DN1s{B@B2e#T*6|u6BFM#u{TItMsy? zOD7H@yNm0J|2zdWkNzWvHvh@*LX^KV%&^{eqqI6;JU3!H{xC9DPFSv z%s?fR((@ntC2qOeCJpEyCAija3j-rGjG}-@vFSnf8-03iDYx>Gj)9Y zmg#xBl=GY5_itcET~1V89S$V)3vFb}XI(U&)YSe|%geK&*RSpgUFjsFeB$ZlQ5~9J zKsC+Ic;9sPWyr|62O0Zlsi(;+%lfPFbhp|22|&uvM31)Z)Nt{a}&=+ep)@I1GDdOM3`wnXInGsi;b zLe7<*`DNVAl~*nIK1u%*BkhaR!9nlupAqIdrV5*5vmz>zmP)`sIk`EV)v%hrzwPSz z;NxTUl;yhFlm8m}c(-n4@4rIW&r~CrmR9zSG#Psn=|-`Lr75iNH-?;ddV@VTz`F)W z=`*JICC0A0r#+*ltFQ`OR{UI8>=`{+0v9Q1N+!>lX>UtKf-1}!B{RCT9LlH^PdbMM z9<{|+O-l8zp<}t7ull$j9vkAZCr4I+9myJ#G%Alis|{(6yd)rGb{?$ zkRk73FA^&}le~Zkvxi;Lh3g3k==`tnB;$#wocXy=u|G1nmWjBf1M1W;Bu#*XoB9x% zo){6mbT&XL%Tyw>+)IarHKS@SlhABBqs-ziT@Rd z8?3p?^*d+C^8+8ThNHDrZJ{C-h3)dTrS7_ZZ)cc*G1LcK{dlPFd*{>LUv%oSGUff+ z+o0_>mg_sdj;8$^9U_&ol14me9$F}F;@hDgn_at|3#G7)Q5sRp9fk)Yjv|BUr5KDq zyBm3DYjLJo-B=w-9~wY{gXJ?28F8fEA2RM4S=T7b;$=)M2*Xi%1WbcoE=&|7rmlxPpTJ0z5lV(?_x$HFy_L|;MBHN zF@Pr`IVT62I{I9rl<2EldCCE3Hlb+Kr|#Nxodl?DS)%O6P1|AakSIv02AWg_0u>pS9o8b)i0DWyvH=pC>NZyahBQ_dFNdm51$6)Hb zE8>Gq9NdAcAi572ezoGbz#yLI7ngEGihzJv#yI)79 zuH^dsd?eiLBgU)GJ7jqFnMq&psJky`$9IDKg)E`_wY=O*&0kU|$afik%Dgu1O0rQ` z4okBB3PM)ww|3^b5I?{9yCQbqPGL3>p<8~w@S0#_EsjP2g;Tm0(1K|W%UXl!FX3}4 zJ`{YW1Ab@S3G2t}2^!VLGF@#;4#FB_#{7w{;q-j0#WuC}`qS;RKcDw)*9WK1b&xmIM{sYn(RNa3!ysRTs4(2>QzcJgqOJ$`P^B2IHdLbIN62b+3 zlRTNv8OcwSy*ln{j|YS+5f?393EQ36buE|;srj3;Ha2kLaZ@Vx(ty`$b8RD#U#zso zo6*kIVhHp=!C(oIh;GQ z6UIZ~$7zgu|I6Vjpsg4L^W6)1h(SndhlUYqj##^>ls>OBad%aTdZ2p_iUA!Lm`mbt zZ$#7mFgb2m#Puxx){5PNQS*>1Flip*Rm!qBqipF|qtj=mmn?5m|7twiE*m3GJ~nw$ zX=5WL1!tB_X6IR8wekwFf{^T#1T;#>Zel^Sngd6hgoKik7DS36rv-yTpCgzy*oFtt zmLmrXu;GVhr2OS)<`vjg&uaKOny->3n0N+_xgB@t@#?(AS>%0E-r4AQl#)v7a1wo& zGj>;Gi&3pzx;J74RWpc(ktilm*WZp=37IHP?sM3yVEW4?H3qawcGRaHqu(!w^XVNHUD`PI%I`(>sc zjL9^LgK!9>SCq>XZPM5y@ut1-&Qqd(>dn4Z{>q6L#PDTjk1Q#!?lgh(uikG z#TVk&R4B(Vaz@o((5czt{ao=ve9a=Lo}sK~)f&Nu8xi=~gy)NF zvqN#d#sElg?T=PqGD7pXTXS`|raa^%_dq5W%Z79k(iN6@^PL^R1txcke0%pabj}kj zH~?;dc*_x%IB1;INzArR9KloTTEhMripZTRJH z;%T-ia!)d#@gPXQenm8SWWe}M%zoSRw$-^tSmWuTN;8KKTzRpI$@}*A&V&<3U5@0J zhqPqAEEubGnjF&k;ysYts^&I_qaZe&2aOj^EeG@YGkckKDksBH@?^5!kmBN`qKxCl zGRf%14BUo8J^9jQGLOJr%vPle3Te(d0VrVN2kG=xw(w|pKA4U+S`K!7E15XrTfe}Y zrk)s8K$&AXv22qfOOf^-xm%odC!~`943CZP>YZ888gl2tr?^ZrqaCNpok zHitx+c_0FhO$gKR-NMx$Cb_)%ahFBgOa49V@Jc&9&EA;Z;;>zSQU=qKt{Q5**flPz z;$vA76#CUB=-Qkg6+I?j^{DA9U)J+W!k&y87WnUz-Fp2^F*fo1wErm>Tc&x&A09e7 zt#wc(*@JGq=729Y(q0m|DF^QT`GVuI+Oz`LZ;LruZrT_`fpKprR{oLN8`96^5;wLQ zO19>cSrXV*c)Yy4zE_KOMA{sJYTRmOJLi>yIFuusU`%w{RxcbDnTwyve&^e{uc{

o@@4m@XX*Gx6~?Q1(6%O`sifeb301K{y-YA> zsiF$I#VDJJ8G(O#2Yc~cplTq-7|&Whgx8BIUBVW!I6}?ARI_>Sa`QQTF=dj+0iN*& z@;?m~>oL$SlXJG>OYjTk8KU!z6qnV>K}wDs`q9#vVhnTHF%HuD-@P4wEx!#WkIFHZ zqn)2%)&$q4&nvvZG`d8iT}dh~1Nch-$6)?1wtDR-+HxR$cuQ|tLGN~jLb#o6flXWb z_iVNl9%vUJpD4VjoNmm!bl_; zf}tZv18>mT*x32`T^w#LP@CjLDirRBm|V9VzzEQCLuiOLKS+osss@s$=B+Ebhw-AT$^+eB@v;97I_$8puqNZ;;&OoJVq=X3ohf)gO + + #include +- +-#ifdef __linux__ +-#include +-#endif +- + #include + #include + #include diff --git a/Xorg/app/xine-ui/patches/120-remove-delay.patch b/Xorg/app/xine-ui/patches/120-remove-delay.patch new file mode 100644 index 0000000..5d3dcc6 --- /dev/null +++ b/Xorg/app/xine-ui/patches/120-remove-delay.patch @@ -0,0 +1,13 @@ +Index: xine-ui-0.99.4/configure +=================================================================== +--- xine-ui-0.99.4.orig/configure 2010-11-04 18:11:02.449000004 +0100 ++++ xine-ui-0.99.4/configure 2010-11-04 18:11:08.594998937 +0100 +@@ -31102,8 +31102,6 @@ + echo "your compiler to "\! + echo + echo "*********************************************************************" +- echo "(sleeping one minute so you can read this...)" +- sleep 60 + + CFLAGS="-O3 $CFLAGS" + DEBUG_CFLAGS="-O $DEBUG_CFLAGS" diff --git a/Xorg/app/xinit/Makefile b/Xorg/app/xinit/Makefile new file mode 100644 index 0000000..fc10243 --- /dev/null +++ b/Xorg/app/xinit/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xinit +PKG_VERSION:=1.0.5 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/app +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=9a2aad51042141a0e6ad066015397595 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/xinit + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libX11 + TITLE:=xinit + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xinit/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,xinit)) diff --git a/Xorg/app/xmessage/Makefile b/Xorg/app/xmessage/Makefile new file mode 100644 index 0000000..2f96e2e --- /dev/null +++ b/Xorg/app/xmessage/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xmessage +PKG_VERSION:=1.0.2 +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/app +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=b4b561ef11fd184989a6062962e86748 + +include $(INCLUDE_DIR)/package.mk + +define Package/xmessage + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libXaw + TITLE:=xmessage + URL:=http://xorg.freedesktop.org/ +endef + +CONFIGURE_ARGS+=LIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib" + +define Build/Compile + DESTDIR=$(PKG_INSTALL_DIR) make -C $(PKG_BUILD_DIR) install +endef + +define Package/xmessage/install + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ + rm -rf $(1)/usr/man/ +endef + +define Build/InstallDev + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +$(eval $(call BuildPackage,xmessage)) diff --git a/Xorg/app/xterm/Makefile b/Xorg/app/xterm/Makefile new file mode 100644 index 0000000..6888560 --- /dev/null +++ b/Xorg/app/xterm/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xterm +PKG_VERSION:=242 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://mirror1.openwrt.org/ +PKG_MD5SUM:=663fa3aac8e30e4c2d4bf07c0aee4dca + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/xterm + SECTION:=xorg-extra + CATEGORY:=Xorg + SUBMENU:=terminals + TITLE:=xterm + DEPENDS:=+libX11 +libncurses +libXaw +endef + +define Build/Configure +# sed -e "s%/usr/contrib/X11R6%${STAGING_DIR}/usr/lib%g" -i $(PKG_BUILD_DIR)/configure + cd $(PKG_BUILD_DIR)/; $(TARGET_CONFIGURE_OPTS) $(CONFIGURE_VARS) \ + $(CONFIGURE_CMD) \ + $(CONFIGURE_ARGS_XTRA) \ + $(CONFIGURE_ARGS) \ + --host=$(GNU_TARGET_NAME) \ + --x-includes=$(STAGING_DIR)/usr/include/ \ + --x-libraries=$(STAGING_DIR)/usr/lib/ \ + LIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib" +endef + +define Package/xterm/install + $(INSTALL_DIR) $(1)/usr/ $(1)/usr/share/applications $(1)/usr/share/icons + $(CP) $(PKG_INSTALL_DIR)/usr/bin $(1)/usr/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib $(1)/usr/ + $(CP) ./files/xterm.desktop $(1)/usr/share/applications/ + $(CP) ./files/terminal.png $(1)/usr/share/icons/ +endef + +$(eval $(call BuildPackage,xterm)) diff --git a/Xorg/app/xterm/files/terminal.png b/Xorg/app/xterm/files/terminal.png new file mode 100644 index 0000000000000000000000000000000000000000..309e04651f7edb1963278762847c4bf0d878e3ba GIT binary patch literal 2624 zcmV-G3cvMRhpc06?D5XHD1d%EvBp&ELK!TS_@C*6?4?OS|1zy`e5D8Q$Py!`fs|o>u zmOBzbIFO5TabkO?bH;n@+40Qo+89DxPcqusi+ATc=R21^^e>mi*w`36eE6`htE+1)7K{CO^ypF8zkh#T09930 zz_mWFzP^6N)TvXUy}ccJdg5T)w)TdM|KY!1V=Q~6|M~nKgRd#PF5nUT_YA75Bd~e% zm%x=<`{Kombq5a~{OR!F!_30~)HtU`O9IB}vCYCoGISU^~rI~&~Qz_GkA z=$L#Rf$;v8c_x_u9cX^*J@4JJoB#@cn;$2WqwwU(Q#f?!5JaQV$-8&&M%*cn0II92 zQ2>GoPo6x6SZpFpo;(>Ghj}MQfI-@4tYCsF_&jJZLP+35Pd0IK;sZ@^OkQGGp`+Mgcf@LlOe`QC-$T5HPO> zgMg{5Diluse#qL<(NPY3P-s1!PUX(|h4YBX^AdQ6ITHAA+Sb!JtZ@9ysnA?dyCWk> z0epCP*rRO%uA_di32@*jRlVJsZQSh9{cK-#m^wBvPgu+XAK~_$5L=w93Or1U_{C^h zi@{E<76wuALCIti`uhh2<@3PHyD*9P z**}?p9)w>OXAWUHnyXpj*x0CWZWznStAD7Kso4hz@Q&62hS#<}Jyo?$=lPPAQ+-hM zR4P>#8-Fho$TPq%W)~O2RBhunYv&`J?)^NO8OvSsG3pTk3}7LgTDTDA1@6t)F<1W> zbT63!rRL?P*q`_ANuhPj-SPN%RG`dZP}skti3CA;xoX>men4oQhqa+`(t2nU$fm;K z9G|)lFkOQ--q+VBiWK9e^&-L`xRV4?EEye5YOhnBnrVHGj;^n--{ax^7AoWF1hXI< z!Gu^W3cGf-2+iHNaRcJ=(Mi`PNu07M6p5$5eAv3wuTFp2M@a7 z@4x?o)2C0v%9SfQD>lO7#fxF-(xtFy(IVKkZ5y0Fe;!VrJSiAKFIV2z1gMj5P=!$n z8;V*D($==C#P;>;*Kq1oJEwmKcaX~jBbF~;4s+(rftHpQe*6;j_V(r+A5Kc1m^?0g zSrSeFI3^*;MUt>=@bv-tOprXgdh-5Y+O%nc_Gtgj&CNV2%n*}6;McBQg9{ffh&%ybxzPlRH35_M zbz9lQu*>D~63gP*OpwY@n9ZR_pFMlF$MH>>GDUd%SFc_P;1@4m6z}1%jz`*8C!k}1 z$__v6>%i-PI=Q-L31N`vPZFI!e?Dy5^o5{#Lqmh0Io9m%-Mc63AH(0vmoJ6n5j1KZ zy*~;Kv&fk8*?x2OxOdQYY!F`$5l<@8#$0)KDn{Rrl$)CA}HS zrnM<(Z$HKDyjz4iq&@;SftNw!!_S;KBQnS^$qAMbB+b}BGc>wdi`2GI35C&$T%x*awh zU=_6KIGvMMhNdOBtZkY8#Q-iz0Q8V-6v%@oHWc$fomt32P#IvNdJtGO2hgS6ayF_J z0NOPI#g6NJq#+hDGMTgx2E}vA?&Ps44x6MduMKoUP&+Y#Iz|B9)-=XEWyz8y;yXw= zdUynYiA(lfTtCA#K7K>@=FOV|jh17q(ph$Bre$xbWAVKc7x=Y)5lU2rYW3bL(|5*#v=e+zqhuw+A<||g~?Cl`{AHvFBWU%Oje2>Hc#2B zjvYHDq>%$Wefo4-L0LgkAMc)j&oC^;NN=i6(=j~%?%g|aT()^U-rL)25l&myEWfyq z_mmn|KDADfq^71uL@NY{U$x4|(BtFE6{}MeUeN@2@9XI3NNJs5cX#*W`uh4`Ic0WF zoH()iLr^!UKv7OJL)v38*JTdt>FIfqNF;v2cQsl896x@%f7Yy7-}8&kb1Bxj@zmzs z;=i}ttu2jp`vn~_xxi_k1Yt?FHs%8NYwDrMg??8{rZo1V?2Ep2D?NY%?PN(TTo*alb-Q_5Tb0000k-e3<5A`uiya(XrcQ5VcS<-WN1%w#i;F_+%Gw{#l?a0X literal 0 HcmV?d00001 diff --git a/Xorg/driver/xf86-input-tslib/patches/100-ifdef-debug-output.patch b/Xorg/driver/xf86-input-tslib/patches/100-ifdef-debug-output.patch new file mode 100644 index 0000000..c836359 --- /dev/null +++ b/Xorg/driver/xf86-input-tslib/patches/100-ifdef-debug-output.patch @@ -0,0 +1,58 @@ +commit 69fcc78ea931f8a84497f4ee9021f4493f45a778 +Author: Lars-Peter Clausen +Date: Sun Feb 1 16:44:24 2009 +0100 + + Put #ifdef DEBUG around debug output. + +Index: xf86-input-tslib-0.0.6/src/tslib.c +=================================================================== +--- xf86-input-tslib-0.0.6.orig/src/tslib.c 2009-10-19 17:07:18.000000000 +0200 ++++ xf86-input-tslib-0.0.6/src/tslib.c 2011-01-27 22:36:41.772784019 +0100 +@@ -89,21 +89,27 @@ + static void + BellProc(int percent, DeviceIntPtr pDev, pointer ctrl, int unused) + { ++#ifdef DEBUG + ErrorF("%s\n", __FUNCTION__); ++#endif + return; + } + + static void + KeyControlProc(DeviceIntPtr pDev, KeybdCtrl * ctrl) + { ++#ifdef DEBUG + ErrorF("%s\n", __FUNCTION__); ++#endif + return; + } + + static void + PointerControlProc(DeviceIntPtr dev, PtrCtrl * ctrl) + { ++#ifdef DEBUG + ErrorF("%s\n", __FUNCTION__); ++#endif + return; + } + +@@ -327,7 +333,9 @@ + int i, axiswidth, axisheight; + struct ts_priv *priv; + ++#ifdef DEBUG + ErrorF("%s\n", __FUNCTION__); ++#endif + pInfo = device->public.devicePrivate; + priv = pInfo->private; + +@@ -431,7 +439,9 @@ + xf86TslibUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + { + struct ts_priv *priv = (struct ts_priv *)(pInfo->private); ++#ifdef DEBUG + ErrorF("%s\n", __FUNCTION__); ++#endif + xf86TslibControlProc(pInfo->dev, DEVICE_OFF); + ts_close(priv->ts); + xfree(pInfo->private); diff --git a/Xorg/driver/xf86-video-glamo/Makefile b/Xorg/driver/xf86-video-glamo/Makefile new file mode 100644 index 0000000..f1b1bc7 --- /dev/null +++ b/Xorg/driver/xf86-video-glamo/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xf86-video-glamo +PKG_VERSION:=20091029 +PKG_REV:=15954340b4b7aaf6ab850c149c2f75c1555d9360 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=git://git.openmoko.org/git/xf86-video-glamo.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) + +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_BUILD_DEPENDS:=xproto fontsproto randrproto renderproto videoproto +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/xf86-video-glamo + TITLE:=xf86-video-glamo + SECTION:=xorg-driver + CATEGORY:=Xorg + SUBMENU:=driver + URL:=http://git.openmoko.org/?p=xf86-video-glamo.git + DEPENDS:=@DISPLAY_SUPPORT @arm||armeb @TARGET_s3c24xx +xserver-xorg +endef + +define Package/xf86-video-glamo/description + xorg video driver for the smedia glamo 3362 chip. +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR) && autoreconf --force --install) + $(call Build/Configure/Default, \ + --disable-jbt6k74-set-state \ + --enable-engine-ioctls \ + ) +endef + +define Package/xf86-video-glamo/install + $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/drivers + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/drivers/glamo_drv.so \ + $(1)/usr/lib/xorg/modules/drivers/ +endef + +$(eval $(call BuildPackage,xf86-video-glamo)) diff --git a/Xorg/driver/xf86-video-glamo/patches/001-include-glamo-engine.patch b/Xorg/driver/xf86-video-glamo/patches/001-include-glamo-engine.patch new file mode 100644 index 0000000..8e5c324 --- /dev/null +++ b/Xorg/driver/xf86-video-glamo/patches/001-include-glamo-engine.patch @@ -0,0 +1,12 @@ +diff --git a/src/glamo-engine.h b/src/glamo-engine.h +index 0664341..92a5ed5 100644 +--- a/src/glamo-engine.h ++++ b/src/glamo-engine.h +@@ -23,6 +23,7 @@ + + #ifdef HAVE_ENGINE_IOCTLS + #include ++#include + + #define GLAMOEngine glamo_engine + #define GLAMO_ENGINE_ALL __NUM_GLAMO_ENGINES diff --git a/Xorg/font/dejavu-fonts-ttf/Makefile b/Xorg/font/dejavu-fonts-ttf/Makefile new file mode 100644 index 0000000..e971baf --- /dev/null +++ b/Xorg/font/dejavu-fonts-ttf/Makefile @@ -0,0 +1,91 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=dejavu-fonts-ttf +PKG_VERSION:=2.23 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=@SF/dejavu +PKG_MD5SUM:=ff871dff0b3e8a11cd5c54478f11073f + +include $(INCLUDE_DIR)/package.mk + +FILES:= \ + DejaVuSans-BoldOblique \ + DejaVuSans-Bold \ + DejaVuSansCondensed-BoldOblique \ + DejaVuSansCondensed-Bold \ + DejaVuSansCondensed-Oblique \ + DejaVuSansCondensed \ + DejaVuSans-ExtraLight \ + DejaVuSansMono-BoldOblique \ + DejaVuSansMono-Bold \ + DejaVuSansMono-Oblique \ + DejaVuSansMono \ + DejaVuSans-Oblique \ + DejaVuSans \ + DejaVuSerif-BoldItalic \ + DejaVuSerif-Bold \ + DejaVuSerifCondensed-BoldItalic \ + DejaVuSerifCondensed-Bold \ + DejaVuSerifCondensed-Italic \ + DejaVuSerifCondensed \ + DejaVuSerif-Italic \ + DejaVuSerif + +define PartGen +define Package/dejavu-fonts-ttf-$(1) + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + TITLE:=$(1) + DEPENDS:=dejavu-fonts-ttf +endef +endef + +define Package/dejavu-fonts-ttf + TITLE:=dejavu-fonts-ttf + SECTION:=xorg-font + SUBMENU:=font + CATEGORY:=Xorg + URL:=http://dejavu.sourceforge.net/ + DEPENDS:=@DISPLAY_SUPPORT +endef + +define Package/dejavu-fonts-ttf/install + true +endef + +$(foreach file,$(FILES),$(eval $(call PartGen,$(file)))) + +define Build/Compile + true +endef + +define Build/Configure + true +endef + +define PartInstall +define Package/dejavu-fonts-ttf-$(1)/install + $(INSTALL_DIR) \ + $$(1)/usr/share/fonts/ttf-dejavu + + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/ttf/$(1).ttf \ + $$(1)/usr/share/fonts/ttf-dejavu/ +endef +endef + +$(foreach file,$(FILES),$(eval $(call PartInstall,$(file)))) + +$(eval $(call BuildPackage,dejavu-fonts-ttf)) +$(foreach file,$(FILES),$(eval $(call BuildPackage,dejavu-fonts-ttf-$(file)))) + diff --git a/Xorg/font/liberation-fonts-ttf/Makefile b/Xorg/font/liberation-fonts-ttf/Makefile new file mode 100644 index 0000000..99c0325 --- /dev/null +++ b/Xorg/font/liberation-fonts-ttf/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=liberation-fonts +PKG_RELEASE:=1 +PKG_VERSION:=1.04 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://fedorahosted.org/releases/l/i/liberation-fonts/ +PKG_MD5SUM:=4846797ef0fc70b0cbaede2514677c58 + +include $(INCLUDE_DIR)/package.mk + +define Package/liberation-fonts-ttf + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + TITLE:=liberation-fonts-ttf + URL:=https://fedorahosted.org/liberation-fonts/ +endef + +define Build/Compile + true +endef + +define Build/Configure + true +endef + +define Package/liberation-fonts-ttf/install + $(INSTALL_DIR) $(1)/usr/share/fonts/truetype/liberation + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/*.ttf \ + $(1)/usr/share/fonts/truetype/liberation/ +endef + +$(eval $(call BuildPackage,liberation-fonts-ttf)) + diff --git a/Xorg/generate.sh b/Xorg/generate.sh new file mode 100755 index 0000000..87359c8 --- /dev/null +++ b/Xorg/generate.sh @@ -0,0 +1,30 @@ +#!/bin/sh +for d in `find . -name packages | grep driver`; do + cd `dirname $d` + echo "Entering "`dirname $d` + for p in `cat packages`; do + _NAME=${p%%|*} + NAME=${_NAME%-*} + BASE_NAME=${NAME%%-*} + VER=${_NAME##*-} + DEP=`echo ${p##*|} | sed "s/+/ +/g"` + echo generating Makefile for ${NAME}-${VER} with deps : ${DEP} + rm -f ${NAME}/Makefile + if [ -e ${NAME}/patches ]; then + rm -f ${NAME}/patches/* + fi + if [ "$1" = "gen" ]; then + if [ ! -e ${NAME} ]; then + mkdir ${NAME} + fi + sed "s/@VER@/${VER}/g" template.mk | sed "s/@DEP@/${DEP}/g" | sed "s/@NAME@/${NAME}/g" | sed "s/@BASE_NAME@/${BASE_NAME}/g" > ${NAME}/Makefile + if [ -d `pwd`/patches/${NAME} ]; then + if [ ! -d ${NAME}/patches ]; then + mkdir ${NAME}/patches + fi + cp -r `pwd`/patches/${NAME}/* ${NAME}/patches/ + fi + fi + done + cd - > /dev/null +done diff --git a/Xorg/lib/atk/Makefile b/Xorg/lib/atk/Makefile new file mode 100644 index 0000000..c6be1fd --- /dev/null +++ b/Xorg/lib/atk/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=atk +PKG_VERSION:=1.22.0 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/1.22/ +PKG_MD5SUM:=06a2b39a22d5ca35c47435da6b9643ac + +PKG_FIXUP:=libtool + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/atk + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=Accesibility library for gtk+ apps + DEPENDS:=+glib2 +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib,include} + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ +endef + +define Package/atk/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,atk)) diff --git a/Xorg/lib/atk/patches/010-do-not-use-GTK_DOC-macro.patch b/Xorg/lib/atk/patches/010-do-not-use-GTK_DOC-macro.patch new file mode 100644 index 0000000..301bf39 --- /dev/null +++ b/Xorg/lib/atk/patches/010-do-not-use-GTK_DOC-macro.patch @@ -0,0 +1,11 @@ +--- atk-1.22.0.orig/configure.in 2008-03-10 08:27:08.000000000 +0100 ++++ atk-1.22.0/configure.in 2010-12-10 16:06:39.479379673 +0100 +@@ -178,7 +178,7 @@ + + AC_CHECK_FUNCS(bind_textdomain_codeset) + +-GTK_DOC_CHECK([1.0]) ++#GTK_DOC_CHECK([1.0]) + + # define a MAINT-like variable REBUILD which is set if Perl + # and awk are found, so autogenerated sources can be rebuilt diff --git a/Xorg/lib/atk/patches/020-do-not-build-examples_docs_pos_tests.patch b/Xorg/lib/atk/patches/020-do-not-build-examples_docs_pos_tests.patch new file mode 100644 index 0000000..d5c6675 --- /dev/null +++ b/Xorg/lib/atk/patches/020-do-not-build-examples_docs_pos_tests.patch @@ -0,0 +1,50 @@ +--- atk-1.22.0.orig/Makefile.in 2008-03-10 08:30:11.000000000 +0100 ++++ atk-1.22.0/Makefile.in 2010-12-10 16:10:24.239380634 +0100 +@@ -243,7 +243,7 @@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +-SUBDIRS = atk tests docs po ++SUBDIRS = atk + EXTRA_DIST = \ + MAINTAINERS \ + atk-uninstalled.pc.in \ +--- atk-1.22.0.orig/Makefile.am 2007-12-17 17:36:22.000000000 +0100 ++++ atk-1.22.0/Makefile.am 2010-12-10 16:17:15.255377279 +0100 +@@ -1,6 +1,6 @@ + # Process this file with automake to create Makefile.in. + +-SUBDIRS=atk tests docs po ++SUBDIRS=atk + + EXTRA_DIST = \ + MAINTAINERS \ +--- atk-1.22.0.orig/Makefile.in 2010-12-10 18:56:15.011379161 +0100 ++++ atk-1.22.0/Makefile.in 2010-12-10 18:57:34.439378866 +0100 +@@ -486,7 +486,7 @@ + distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) +- $(mkdir_p) $(distdir)/. $(distdir)/atk $(distdir)/docs $(distdir)/po ++ $(mkdir_p) $(distdir)/. $(distdir)/atk + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ +diff -ruN atk-1.22.0/configure.in atk-1.22.0.mod//configure.in +--- atk-1.22.0/configure.in 2010-12-10 19:11:38.335379754 +0100 ++++ atk-1.22.0.mod//configure.in 2010-12-10 19:08:56.155380379 +0100 +@@ -197,14 +197,10 @@ + + AC_CONFIG_FILES([ + Makefile +-po/Makefile.in + atk.pc + atk-uninstalled.pc + atk/Makefile + atk/atk.rc +-tests/Makefile +-docs/Makefile +-docs/version.xml + atk.spec + atk-zip.sh + ]) diff --git a/Xorg/lib/cairo/Makefile b/Xorg/lib/cairo/Makefile new file mode 100644 index 0000000..bd69561 --- /dev/null +++ b/Xorg/lib/cairo/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cairo +PKG_VERSION:=1.8.8 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://cairographics.org/releases/ +PKG_MD5SUM:=d3e1a1035ae563812d4dd44a74fb0dd0 +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +PKG_INSTALL:=1 + +define Package/cairo + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=Multi-platform 2D graphics library + DEPENDS:=+fontconfig +libpng +libexpat +pixman \ + +FEATURE_drawing-backend_DirectFB:directfb \ + +FEATURE_drawing-backend_libX11:libX11 + URL:=http://cairographics.org/ +endef + +define Package/cairo/description +Cairo is a 2D graphics library. The cairo API provides operations similar +to the drawing operators of PostScript and PDF. Operations in cairo +include stroking and filling cubic Bézier splines, transforming and +compositing translucent images, and antialiased text rendering. All +drawing operations can be transformed by any affine transformation +(scale, rotation, shear, etc.). +endef + +CONFIGURE_VARS+=FONTCONFIG_LIBS="-lfreetype -lfontconfig -lz -lexpat" + +CONFIGURE_ARGS+= \ + --enable-freetype=yes \ + --disable-win32 \ + --enable-xlib-xrender=no \ + $(if $(CONFIG_FEATURE_drawing-backend_DirectFB), --enable-directfb, --disable-directfb) \ + $(if $(CONFIG_FEATURE_drawing-backend_libX11), --enable-xlib --with-x, --disable-xlib --without-x) + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ + $(INSTALL_DIR) $(1)/usr/include/cairo/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/cairo/* $(1)/usr/include/cairo/ +endef + +define Package/cairo/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,cairo)) diff --git a/Xorg/lib/cairomm/Makefile b/Xorg/lib/cairomm/Makefile new file mode 100644 index 0000000..ced2c9a --- /dev/null +++ b/Xorg/lib/cairomm/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cairomm +PKG_VERSION:=1.8.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://cairographics.org/releases/ +PKG_MD5SUM:=559afbc47484ba3fad265e38a3dafe90 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/cairomm + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=Multi-platform 2D graphics library + DEPENDS:=+libsigcxx +cairo + URL:=http://cairographics.org/cairomm/ +endef + +define Package/cairomm/description +c++-bindings for cairo +endef + +define Build/InstallDev + $(INSTALL_DIR) \ + $(1)/usr/lib \ + $(1)/usr/lib/pkgconfig \ + $(1)/usr/include + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/* \ + $(1)/usr/lib/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/* \ + $(1)/usr/include/ +endef + +define Package/cairomm/install + $(INSTALL_DIR) \ + $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,cairomm)) diff --git a/Xorg/lib/fltk2/Makefile b/Xorg/lib/fltk2/Makefile new file mode 100644 index 0000000..85cbc67 --- /dev/null +++ b/Xorg/lib/fltk2/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2006-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=fltk2 +PKG_REV:=6671 +PKG_VERSION:=r$(PKG_REV) +PKG_RELEASE:=2 + +PKG_SOURCE_PROTO:=svn +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://svn.easysw.com/public/fltk/fltk/trunk +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_FIXUP:=libtool +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/fltk2 + SECTION:=xorg-framework + CATEGORY:=Xorg + SUBMENU:=framework + TITLE:=Fltk2 + URL:=http://fltk.org/ + DEPENDS:=+libXi +libstdcpp +libfreetype +endef + +define Package/fltk2/description + FLTK (pronounced ) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its built-in GLUT emulation. +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); autoconf ); + $(call Build/Configure/Default, --disable-jpeg --disable-zlib --disable-png --disable-gl --disable-xinerama --enable-shared --x-libraries=$(STAGING_DIR)/usr/lib --x-includes=$(STAGING_DIR)/usr/include) +endef + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) all +endef + +define Build/Install + DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE) -C $(PKG_BUILD_DIR) install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/bin $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/fltk $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/fltk2-config $(1)/usr/bin/ +endef + +define Package/fltk2/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,fltk2)) diff --git a/Xorg/lib/fltk2/patches/000-do-not-build-fltk-and-tests b/Xorg/lib/fltk2/patches/000-do-not-build-fltk-and-tests new file mode 100644 index 0000000..1bb8a3d --- /dev/null +++ b/Xorg/lib/fltk2/patches/000-do-not-build-fltk-and-tests @@ -0,0 +1,11 @@ +--- fltk2/Makefile 2009-01-02 01:41:31.000000000 +0100 ++++ fltk2/Makefile 2009-01-02 01:40:36.000000000 +0100 +@@ -25,7 +25,7 @@ + + include makeinclude + +-DIRS = src $(LOCALIMAGES) images OpenGL fluid glut test ++DIRS = src $(LOCALIMAGES) images + + all: makeinclude + for dir in $(DIRS); do\ diff --git a/Xorg/lib/fltk2/patches/001-be-verbose b/Xorg/lib/fltk2/patches/001-be-verbose new file mode 100644 index 0000000..2ca500a --- /dev/null +++ b/Xorg/lib/fltk2/patches/001-be-verbose @@ -0,0 +1,12 @@ +--- fltk2/makeinclude.in 2009-01-02 02:28:29.000000000 +0100 ++++ fltk2/makeinclude.in 2009-01-02 02:28:43.000000000 +0100 +@@ -114,9 +114,6 @@ + CAT1EXT = @CAT1EXT@ + CAT3EXT = @CAT3EXT@ + +-# Be quiet when building... +-.SILENT: +- + # Build commands and filename extensions... + .SUFFIXES: .0 .1 .3 .c .cxx .h .fl .man .o .z $(EXEEXT) + diff --git a/Xorg/lib/fltk2/patches/002-honor-cppflags b/Xorg/lib/fltk2/patches/002-honor-cppflags new file mode 100644 index 0000000..618d14a --- /dev/null +++ b/Xorg/lib/fltk2/patches/002-honor-cppflags @@ -0,0 +1,26 @@ +Index: fltk2-r6671/makeinclude.in +=================================================================== +--- fltk2-r6671.orig/makeinclude.in 2010-11-03 02:16:42.106000002 +0100 ++++ fltk2-r6671/makeinclude.in 2010-11-03 02:16:43.163002267 +0100 +@@ -54,6 +54,7 @@ + + # flags for C++ compiler: + OPTIM = @OPTIM@ ++CPPFLAGS = @CPPFLAGS@ + CFLAGS = $(OPTIM) @CFLAGS@ + CXXFLAGS = $(OPTIM) @CXXFLAGS@ + +@@ -124,11 +125,11 @@ + + .c.o: + echo Compiling $<... +- $(CC) -I.. -I../fltk/compat $(CFLAGS) -c $< ++ $(CC) $(CPPFLAGS) -I.. -I../fltk/compat $(CFLAGS) -c $< + + .cxx.o: + echo Compiling $<... +- $(CXX) -I.. -I../fltk/compat $(CXXFLAGS) -c $< ++ $(CXX) $(CPPFLAGS) -I.. -I../fltk/compat $(CXXFLAGS) -c $< + + .man.0 .man.1 .man.3: + echo Formatting $<... diff --git a/Xorg/lib/fltk2/patches/100-compile-fixes.patch b/Xorg/lib/fltk2/patches/100-compile-fixes.patch new file mode 100644 index 0000000..e52df79 --- /dev/null +++ b/Xorg/lib/fltk2/patches/100-compile-fixes.patch @@ -0,0 +1,14 @@ +Index: fltk2-r6671/src/filename_list.cxx +=================================================================== +--- fltk2-r6671.orig/src/filename_list.cxx 2010-11-03 02:17:17.243001500 +0100 ++++ fltk2-r6671/src/filename_list.cxx 2010-11-03 02:24:13.400999350 +0100 +@@ -62,6 +62,9 @@ + // This version is when we define our own scandir (WIN32 and perhaps + // some Unix systems): + int n = scandir(d, list, 0, sort); ++#elif defined(__UCLIBC_MAJOR__) && \ ++ __UCLIBC_MAJOR__ >= 0 && __UCLIBC_MINOR__ >= 9 && __UCLIBC_SUBLEVEL__ >= 31 ++ int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort); + #elif defined(__linux) || defined (__FreeBSD__) || defined (__NetBSD__) + int n = scandir(d, list, 0, (int(*)(const void*,const void*))sort); + #elif defined(__hpux) || defined(__CYGWIN__) diff --git a/Xorg/lib/gtk1/Makefile b/Xorg/lib/gtk1/Makefile new file mode 100644 index 0000000..70e3314 --- /dev/null +++ b/Xorg/lib/gtk1/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gtk1 +PKG_VERSION:=1.2.10 +PKG_RELEASE:=2 + +PKG_SOURCE:=gtk+-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@GNOME/gtk+/1.2/ +PKG_BUILD_DIR=$(BUILD_DIR)/gtk+-1.2.10 +PKG_MD5SUM:=4d5cb2fc7fb7830e4af9747a36bfce20 +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +PKG_INSTALL=1 + +CONFIGURE_ARGS_XTRA+=--x-includes=$(STAGING_DIR)/usr/include/ \ + --x-libraries=$(STAGING_DIR)/usr/lib \ + --with-glib-prefix=$(STAGING_DIR)/usr/ \ + --enable-static=yes \ + --enable-static=yes + +EXTRA_CFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib +TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/glib-1.2 -I$(STAGING_DIR)/usr/lib/glib/include +EXTRA_LDFLAGS+=-lglib -lgmodule + +define Package/gtk1 + SECTION:=xorg-framework + CATEGORY:=Xorg + SUBMENU:=framework + TITLE:=GTK+ 1.2.10 package + DEPENDS:=+glib1 +libX11 +libXt + URL:=http://www.gtk.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ + $(INSTALL_DIR) $(2)/bin + mv $(1)/usr/bin/gtk-config $(2)/bin/ + $(SED) "s,libdirs=-L.*,libdirs=,g" $(2)/bin/gtk-config + $(SED) \ + 's,^\(prefix\|exec_prefix\)=.*,\1="$(STAGING_DIR)/usr",g' \ + $(2)/bin/gtk-config +endef + +$(eval $(call BuildPackage,gtk1)) diff --git a/Xorg/lib/gtk2/Makefile b/Xorg/lib/gtk2/Makefile new file mode 100644 index 0000000..6da640e --- /dev/null +++ b/Xorg/lib/gtk2/Makefile @@ -0,0 +1,133 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gtk2 +PKG_VERSION:=2.17.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=gtk+-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNOME/gtk+/2.17 +PKG_BUILD_DIR=$(BUILD_DIR)/gtk+-$(PKG_VERSION) +PKG_MD5SUM:=a1a1f0b66a240c31cb2733643f9170ba + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +TARGET_LDFLAGS+=\ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_gtk2 CONFIG_PACKAGE_gtk2-cups) + +# We can _either_ compile gtk2 with directfb-support _or_ against libX11 (libX11 is preferred when both libs are selected) + +define Package/gtk2 + SECTION:=xorg-framework + CATEGORY:=Xorg + SUBMENU:=framework + TITLE:=GTK+-2.0 + DEPENDS:=@DISPLAY_SUPPORT +cairo +pango +libpng +libjpeg +atk +libtiff +glib2 \ + +FEATURE_drawing-backend_DirectFB:directfb \ + +FEATURE_drawing-backend_libX11:libX11 \ + +FEATURE_drawing-backend_libX11:libXext \ + +FEATURE_drawing-backend_libX11:libXrender \ + +FEATURE_drawing-backend_libX11:libXfixes \ + +FEATURE_drawing-backend_libX11:libXrandr \ + +FEATURE_drawing-backend_libX11:libXcursor \ + +FEATURE_drawing-backend_libX11:libXdamage \ + +FEATURE_drawing-backend_libX11:libXcomposite \ + +FEATURE_drawing-backend_libX11:libXi + URL:=http://www.gtk.org/ +endef + +define Package/gtk2-cups + SECTION:=xorg-framework + CATEGORY:=Xorg + SUBMENU:=framework + TITLE:=CUPS print backend for GTK+-2.0 + DEPENDS:=gtk2 +cups +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-shm \ + --disable-xkb \ + --disable-glibtest \ + --disable-gdiplus \ + --disable-xinerama \ + --without-libjasper \ + --without-xinput \ + $(if $(CONFIG_FEATURE_drawing-backend_DirectFB),--with-gdktarget=directfb,) \ + $(if $(CONFIG_FEATURE_drawing-backend_libX11),--with-x --with-gdktarget=x11,--without-x) \ + $(if $(CONFIG_PACKAGE_gtk2-cups),--enable-cups=auto,--disable-cups), \ + gio_can_sniff=no \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include} + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/include/* $(1)/usr/include/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,la} \ + $(1)/usr/lib/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ +endef + +define Package/gtk2/install + $(INSTALL_DIR) $(1)/etc/gtk-2.0 + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/etc/gtk-2.0/* \ + $(1)/etc/gtk-2.0/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ + + $(foreach d,engines immodules loaders, \ + $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/$(d); \ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/$(d)/*.so \ + $(1)/usr/lib/gtk-2.0/2.10.0/$(d)/;\ + ) + $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-{file,lpr}.so \ + $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/ + + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/{gdk-pixbuf-query-loaders,gtk-query-immodules-2.0,gtk-update-icon-cache} \ + $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/usr/share/themes/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/share/themes/* \ + $(1)/usr/share/themes/ + + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/gdk-pixbuf-query-loaders.init $(1)/etc/init.d/gdk-pixbuf-query-loaders +endef + +define Package/gtk2-cups/install + $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-cups.so \ + $(1)/usr/lib/gtk-2.0/2.10.0/printbackends/ +endef + +$(eval $(call BuildPackage,gtk2)) +$(eval $(call BuildPackage,gtk2-cups)) diff --git a/Xorg/lib/gtk2/files/gdk-pixbuf-query-loaders.init b/Xorg/lib/gtk2/files/gdk-pixbuf-query-loaders.init new file mode 100755 index 0000000..f4efb0c --- /dev/null +++ b/Xorg/lib/gtk2/files/gdk-pixbuf-query-loaders.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org + +START=99 +FILE=/etc/gtk-2.0/gdk-pixbuf.loaders + +start() { + if [ ! -e ${FILE} ]; then + mkdir -p $(dirname ${FILE}) + gdk-pixbuf-query-loaders > ${FILE} + fi +} diff --git a/Xorg/lib/gtk2/patches/010-do-not-use-GTK_DOC-macro.patch b/Xorg/lib/gtk2/patches/010-do-not-use-GTK_DOC-macro.patch new file mode 100644 index 0000000..04580d0 --- /dev/null +++ b/Xorg/lib/gtk2/patches/010-do-not-use-GTK_DOC-macro.patch @@ -0,0 +1,11 @@ +--- gtk+-2.17.0.orig/configure.in 2009-05-04 06:43:43.000000000 +0200 ++++ gtk+-2.17.0/configure.in 2010-12-10 16:28:28.359377713 +0100 +@@ -1929,7 +1929,7 @@ + # Checks for gtk-doc and docbook-tools + ################################################## + +-GTK_DOC_CHECK([1.11]) ++#GTK_DOC_CHECK([1.11]) + + AC_CHECK_PROG(DB2HTML, db2html, true, false) + AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML) diff --git a/Xorg/lib/gtk2/patches/010-dont-build-demos-and-tests.patch b/Xorg/lib/gtk2/patches/010-dont-build-demos-and-tests.patch new file mode 100644 index 0000000..3181882 --- /dev/null +++ b/Xorg/lib/gtk2/patches/010-dont-build-demos-and-tests.patch @@ -0,0 +1,28 @@ +diff -ruN gtk+-2.17.0.orig/Makefile.am gtk+-2.17.0/Makefile.am +--- gtk+-2.17.0.orig/Makefile.am 2009-05-03 18:39:14.000000000 +0200 ++++ gtk+-2.17.0/Makefile.am 2009-10-16 23:53:15.000000000 +0200 +@@ -1,8 +1,8 @@ + ## Makefile.am for GTK+ + include $(top_srcdir)/Makefile.decl + +-SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib +-SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros ++SRC_SUBDIRS = gdk-pixbuf gdk gtk modules contrib ++SUBDIRS = po po-properties $(SRC_SUBDIRS) m4macros + + # require automake 1.4 + AUTOMAKE_OPTIONS = 1.7 +diff -ruN gtk+-2.17.0.orig/Makefile.in gtk+-2.17.0/Makefile.in +--- gtk+-2.17.0.orig/Makefile.in 2009-05-04 06:45:42.000000000 +0200 ++++ gtk+-2.17.0/Makefile.in 2009-10-16 23:53:07.000000000 +0200 +@@ -523,8 +523,8 @@ + && DISPLAY=:$$XID && export DISPLAY + + +-SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib +-SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros ++SRC_SUBDIRS = gdk-pixbuf gdk gtk modules contrib ++SUBDIRS = po po-properties $(SRC_SUBDIRS) m4macros + + # require automake 1.4 + AUTOMAKE_OPTIONS = 1.7 diff --git a/Xorg/lib/gtk2/patches/030-dont-build-demos_tests_pos_examples.patch b/Xorg/lib/gtk2/patches/030-dont-build-demos_tests_pos_examples.patch new file mode 100644 index 0000000..7121948 --- /dev/null +++ b/Xorg/lib/gtk2/patches/030-dont-build-demos_tests_pos_examples.patch @@ -0,0 +1,207 @@ +--- gtk+-2.17.0.orig/Makefile.in 2010-12-09 01:26:16.995377995 +0100 ++++ gtk+-2.17.0/Makefile.in 2010-12-10 16:30:00.283378413 +0100 +@@ -407,95 +407,7 @@ + config.h.win32 \ + makefile.msc \ + gtk-zip.sh.in \ +- sanitize-la.sh \ +- po/README.translators \ +- po/po2tbl.sed.in \ +- examples/aspectframe/Makefile \ +- examples/aspectframe/aspectframe.c \ +- examples/Makefile \ +- examples/README.1ST \ +- examples/extract.awk \ +- examples/extract.sh \ +- examples/arrow/Makefile \ +- examples/arrow/arrow.c \ +- examples/base/Makefile \ +- examples/base/base.c \ +- examples/buttonbox/Makefile \ +- examples/buttonbox/buttonbox.c \ +- examples/buttons/Makefile \ +- examples/buttons/buttons.c \ +- examples/buttons/info.xpm \ +- examples/calendar/Makefile \ +- examples/calendar/calendar.c \ +- examples/clist/Makefile \ +- examples/clist/clist.c \ +- examples/entry/Makefile \ +- examples/entry/entry.c \ +- examples/eventbox/Makefile \ +- examples/eventbox/eventbox.c \ +- examples/filesel/Makefile \ +- examples/filesel/filesel.c \ +- examples/gtkdial/Makefile \ +- examples/gtkdial/dial_test.c \ +- examples/gtkdial/gtkdial.c \ +- examples/gtkdial/gtkdial.h \ +- examples/helloworld/Makefile \ +- examples/helloworld/helloworld.c \ +- examples/helloworld2/Makefile \ +- examples/helloworld2/helloworld2.c \ +- examples/label/Makefile \ +- examples/label/label.c \ +- examples/list/Makefile \ +- examples/list/list.c \ +- examples/menu/Makefile \ +- examples/menu/menu.c \ +- examples/menu/itemfactory.c \ +- examples/notebook/Makefile \ +- examples/notebook/notebook.c \ +- examples/packbox/Makefile \ +- examples/packbox/packbox.c \ +- examples/paned/Makefile \ +- examples/paned/paned.c \ +- examples/pixmap/Makefile \ +- examples/pixmap/pixmap.c \ +- examples/progressbar/Makefile \ +- examples/progressbar/progressbar.c \ +- examples/radiobuttons/Makefile \ +- examples/radiobuttons/radiobuttons.c \ +- examples/rangewidgets/Makefile \ +- examples/rangewidgets/rangewidgets.c \ +- examples/rulers/Makefile \ +- examples/rulers/rulers.c \ +- examples/scribble-simple/Makefile \ +- examples/scribble-simple/scribble-simple.c \ +- examples/scribble-xinput/Makefile \ +- examples/scribble-xinput/scribble-xinput.c \ +- examples/scrolledwin/Makefile \ +- examples/scrolledwin/scrolledwin.c \ +- examples/selection/Makefile \ +- examples/selection/gettargets.c \ +- examples/selection/setselection.c \ +- examples/statusbar/Makefile \ +- examples/statusbar/statusbar.c \ +- examples/table/Makefile \ +- examples/table/table.c \ +- examples/text/Makefile \ +- examples/text/text.c \ +- examples/tictactoe/Makefile \ +- examples/tictactoe/tictactoe.c \ +- examples/tictactoe/tictactoe.h \ +- examples/tictactoe/ttt_test.c \ +- examples/tree/Makefile \ +- examples/tree/tree.c \ +- examples/wheelbarrow/Makefile \ +- examples/wheelbarrow/wheelbarrow.c \ +- examples/fixed/fixed.c \ +- examples/fixed/Makefile \ +- examples/frame/frame.c \ +- examples/frame/Makefile \ +- examples/spinbutton/spinbutton.c \ +- examples/spinbutton/Makefile \ +- examples/find-examples.sh ++ sanitize-la.sh + + TEST_PROGS = + +@@ -803,7 +715,7 @@ + distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) +- $(mkinstalldirs) $(distdir)/. $(distdir)/contrib/gdk-pixbuf-xlib $(distdir)/demos/gtk-demo $(distdir)/docs/reference/gdk $(distdir)/docs/reference/gdk-pixbuf $(distdir)/docs/reference/gtk $(distdir)/examples $(distdir)/examples/arrow $(distdir)/examples/aspectframe $(distdir)/examples/base $(distdir)/examples/buttonbox $(distdir)/examples/buttons $(distdir)/examples/calendar $(distdir)/examples/clist $(distdir)/examples/entry $(distdir)/examples/eventbox $(distdir)/examples/filesel $(distdir)/examples/fixed $(distdir)/examples/frame $(distdir)/examples/gtkdial $(distdir)/examples/helloworld $(distdir)/examples/helloworld2 $(distdir)/examples/label $(distdir)/examples/list $(distdir)/examples/menu $(distdir)/examples/notebook $(distdir)/examples/packbox $(distdir)/examples/paned $(distdir)/examples/pixmap $(distdir)/examples/progressbar $(distdir)/examples/radiobuttons $(distdir)/examples/rangewidgets $(distdir)/examples/rulers $(distdir)/examples/scribble-simple $(distdir)/examples/scribble-xinput $(distdir)/examples/scrolledwin $(distdir)/examples/selection $(distdir)/examples/spinbutton $(distdir)/examples/statusbar $(distdir)/examples/table $(distdir)/examples/text $(distdir)/examples/tictactoe $(distdir)/examples/tree $(distdir)/examples/wheelbarrow $(distdir)/gdk-pixbuf $(distdir)/gdk/win32/rc $(distdir)/gtk $(distdir)/po $(distdir)/po-properties ++ $(mkinstalldirs) $(distdir)/. $(distdir)/contrib/gdk-pixbuf-xlib $(distdir)/gdk-pixbuf $(distdir)/gdk/win32/rc $(distdir)/gtk + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ +--- gtk+-2.17.0.orig/Makefile.am 2010-12-09 01:26:16.995377995 +0100 ++++ gtk+-2.17.0/Makefile.am 2010-12-10 16:30:30.555380813 +0100 +@@ -29,95 +29,7 @@ + config.h.win32 \ + makefile.msc \ + gtk-zip.sh.in \ +- sanitize-la.sh \ +- po/README.translators \ +- po/po2tbl.sed.in \ +- examples/aspectframe/Makefile \ +- examples/aspectframe/aspectframe.c \ +- examples/Makefile \ +- examples/README.1ST \ +- examples/extract.awk \ +- examples/extract.sh \ +- examples/arrow/Makefile \ +- examples/arrow/arrow.c \ +- examples/base/Makefile \ +- examples/base/base.c \ +- examples/buttonbox/Makefile \ +- examples/buttonbox/buttonbox.c \ +- examples/buttons/Makefile \ +- examples/buttons/buttons.c \ +- examples/buttons/info.xpm \ +- examples/calendar/Makefile \ +- examples/calendar/calendar.c \ +- examples/clist/Makefile \ +- examples/clist/clist.c \ +- examples/entry/Makefile \ +- examples/entry/entry.c \ +- examples/eventbox/Makefile \ +- examples/eventbox/eventbox.c \ +- examples/filesel/Makefile \ +- examples/filesel/filesel.c \ +- examples/gtkdial/Makefile \ +- examples/gtkdial/dial_test.c \ +- examples/gtkdial/gtkdial.c \ +- examples/gtkdial/gtkdial.h \ +- examples/helloworld/Makefile \ +- examples/helloworld/helloworld.c \ +- examples/helloworld2/Makefile \ +- examples/helloworld2/helloworld2.c \ +- examples/label/Makefile \ +- examples/label/label.c \ +- examples/list/Makefile \ +- examples/list/list.c \ +- examples/menu/Makefile \ +- examples/menu/menu.c \ +- examples/menu/itemfactory.c \ +- examples/notebook/Makefile \ +- examples/notebook/notebook.c \ +- examples/packbox/Makefile \ +- examples/packbox/packbox.c \ +- examples/paned/Makefile \ +- examples/paned/paned.c \ +- examples/pixmap/Makefile \ +- examples/pixmap/pixmap.c \ +- examples/progressbar/Makefile \ +- examples/progressbar/progressbar.c \ +- examples/radiobuttons/Makefile \ +- examples/radiobuttons/radiobuttons.c \ +- examples/rangewidgets/Makefile \ +- examples/rangewidgets/rangewidgets.c \ +- examples/rulers/Makefile \ +- examples/rulers/rulers.c \ +- examples/scribble-simple/Makefile \ +- examples/scribble-simple/scribble-simple.c \ +- examples/scribble-xinput/Makefile \ +- examples/scribble-xinput/scribble-xinput.c \ +- examples/scrolledwin/Makefile \ +- examples/scrolledwin/scrolledwin.c \ +- examples/selection/Makefile \ +- examples/selection/gettargets.c \ +- examples/selection/setselection.c \ +- examples/statusbar/Makefile \ +- examples/statusbar/statusbar.c \ +- examples/table/Makefile \ +- examples/table/table.c \ +- examples/text/Makefile \ +- examples/text/text.c \ +- examples/tictactoe/Makefile \ +- examples/tictactoe/tictactoe.c \ +- examples/tictactoe/tictactoe.h \ +- examples/tictactoe/ttt_test.c \ +- examples/tree/Makefile \ +- examples/tree/tree.c \ +- examples/wheelbarrow/Makefile \ +- examples/wheelbarrow/wheelbarrow.c \ +- examples/fixed/fixed.c \ +- examples/fixed/Makefile \ +- examples/frame/frame.c \ +- examples/frame/Makefile \ +- examples/spinbutton/spinbutton.c \ +- examples/spinbutton/Makefile \ +- examples/find-examples.sh ++ sanitize-la.sh + + GDKTARGET=@gdktarget@ + diff --git a/Xorg/lib/gtk2/patches/100-compile_fix.patch b/Xorg/lib/gtk2/patches/100-compile_fix.patch new file mode 100644 index 0000000..c855a9d --- /dev/null +++ b/Xorg/lib/gtk2/patches/100-compile_fix.patch @@ -0,0 +1,30 @@ +--- a/gtk/Makefile.am ++++ b/gtk/Makefile.am +@@ -1126,12 +1126,6 @@ + ./gtk-update-icon-cache + endif + +-gtkbuiltincache.h: @REBUILD@ stamp-icons +- $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT) +- $(gtk_update_icon_cache_program) --force --ignore-theme-index \ +- --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \ +- mv gtkbuiltincache.h.tmp gtkbuiltincache.h +- + EXTRA_DIST += \ + $(STOCK_ICONS) \ + $(GENERATED_ICONS) \ +--- a/gtk/Makefile.in ++++ b/gtk/Makefile.in +@@ -2970,12 +2970,6 @@ + done \ + && touch stamp-icons + +-gtkbuiltincache.h: @REBUILD@ stamp-icons +- $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT) +- $(gtk_update_icon_cache_program) --force --ignore-theme-index \ +- --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \ +- mv gtkbuiltincache.h.tmp gtkbuiltincache.h +- + install-data-local: + # 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/Xorg/lib/gtkmm/Makefile b/Xorg/lib/gtkmm/Makefile new file mode 100644 index 0000000..6c3febb --- /dev/null +++ b/Xorg/lib/gtkmm/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gtkmm +PKG_VERSION:=2.16.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.16 +PKG_MD5SUM:=a82e3b5b93008421ff67df16d1e51ec2 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +TARGET_LDFLAGS+=\ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/gtkmm + SECTION:=xorg-framework + CATEGORY:=Xorg + SUBMENU:=framework + TITLE:=GTK+-2.0 + DEPENDS:=+gtk2 +cairomm +pangomm +glibmm + URL:=http://www.gtkmm.org/ +endef + +CONFIGURE_ARGS+= --disable-docs --disable-demos + +define Build/InstallDev + $(INSTALL_DIR) \ + $(1)/usr/lib/pkgconfig \ + $(1)/usr/include + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/* \ + $(1)/usr/include/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/* \ + $(1)/usr/lib/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ +endef + +define Package/gtkmm/install + $(INSTALL_DIR) \ + $(1)/usr/lib + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,gtkmm)) diff --git a/Xorg/lib/gtkmm/patches/001-automake-compat.patch b/Xorg/lib/gtkmm/patches/001-automake-compat.patch new file mode 100644 index 0000000..61f9ef0 --- /dev/null +++ b/Xorg/lib/gtkmm/patches/001-automake-compat.patch @@ -0,0 +1,29 @@ +--- a/configure.in ++++ b/configure.in +@@ -119,15 +119,15 @@ AL_PROG_GNU_MAKE(AC_MSG_ERROR([dnl + SUN make does not work for building gtkmm. + Please install GNU make.])) + +-# This macro is installed by glibmm ++# This macro is installed by mm-macros + # Doxygen needs the path to the installed perl. +-GLIBMM_CHECK_PERL([5.6.0]) ++MM_CHECK_PERL([5.6.0]) + + ######################################################################### + # Function checks + ######################################################################### + +-AC_CHECK_FUNC(mkfifo, AC_DEFINE(HAVE_MKFIFO)) ++AC_CHECK_FUNC(mkfifo, AC_DEFINE([HAVE_MKFIFO], [], [Define if mkfifo is available])) + + # functions used in demos/gtk-demo. Undefined in config.h. + AC_LANG_PUSH(C++) +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,3 +1,5 @@ ++ACLOCAL_AMFLAGS = -I scripts ++ + if GTKMM_ATKMM_ENABLED + ATK_SUBDIR=atk + else diff --git a/Xorg/lib/gtkmm/patches/100-disable-tools-tests.patch b/Xorg/lib/gtkmm/patches/100-disable-tools-tests.patch new file mode 100644 index 0000000..0cddb4a --- /dev/null +++ b/Xorg/lib/gtkmm/patches/100-disable-tools-tests.patch @@ -0,0 +1,88 @@ +--- a/configure ++++ b/configure +@@ -22179,10 +22179,7 @@ fi + AUTOHEADER=':' + + +-ac_config_files="$ac_config_files Makefile gdk/Makefile gdk/gdkmm-2.4.pc gdk/src/Makefile gdk/gdkmm/Makefile gdk/gdkmm/private/Makefile gtk/Makefile gtk/gtkmm-2.4.pc gtk/src/Makefile gtk/gtkmm/Makefile gtk/gtkmm/private/Makefile tools/Makefile tools/m4/Makefile tools/extra_defs_gen/Makefile" +- +- +-ac_config_files="$ac_config_files tests/Makefile tests/child_widget/Makefile tests/child_widget2/Makefile tests/child_widget_managed/Makefile tests/refcount_dialog/Makefile tests/dialog/Makefile tests/dialog_deletethis/Makefile tests/delete_cpp_child/Makefile tests/main_with_options/Makefile tests/menu_destruction/Makefile tests/property_notification/Makefile tests/scrolledwindow/Makefile tests/wrap_existing/Makefile" ++ac_config_files="$ac_config_files Makefile gdk/Makefile gdk/gdkmm-2.4.pc gdk/src/Makefile gdk/gdkmm/Makefile gdk/gdkmm/private/Makefile gtk/Makefile gtk/gtkmm-2.4.pc gtk/src/Makefile gtk/gtkmm/Makefile gtk/gtkmm/private/Makefile" + + + ac_config_files="$ac_config_files scripts/Makefile" +@@ -22870,22 +22867,6 @@ do + "gtk/src/Makefile") CONFIG_FILES="$CONFIG_FILES gtk/src/Makefile" ;; + "gtk/gtkmm/Makefile") CONFIG_FILES="$CONFIG_FILES gtk/gtkmm/Makefile" ;; + "gtk/gtkmm/private/Makefile") CONFIG_FILES="$CONFIG_FILES gtk/gtkmm/private/Makefile" ;; +- "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; +- "tools/m4/Makefile") CONFIG_FILES="$CONFIG_FILES tools/m4/Makefile" ;; +- "tools/extra_defs_gen/Makefile") CONFIG_FILES="$CONFIG_FILES tools/extra_defs_gen/Makefile" ;; +- "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; +- "tests/child_widget/Makefile") CONFIG_FILES="$CONFIG_FILES tests/child_widget/Makefile" ;; +- "tests/child_widget2/Makefile") CONFIG_FILES="$CONFIG_FILES tests/child_widget2/Makefile" ;; +- "tests/child_widget_managed/Makefile") CONFIG_FILES="$CONFIG_FILES tests/child_widget_managed/Makefile" ;; +- "tests/refcount_dialog/Makefile") CONFIG_FILES="$CONFIG_FILES tests/refcount_dialog/Makefile" ;; +- "tests/dialog/Makefile") CONFIG_FILES="$CONFIG_FILES tests/dialog/Makefile" ;; +- "tests/dialog_deletethis/Makefile") CONFIG_FILES="$CONFIG_FILES tests/dialog_deletethis/Makefile" ;; +- "tests/delete_cpp_child/Makefile") CONFIG_FILES="$CONFIG_FILES tests/delete_cpp_child/Makefile" ;; +- "tests/main_with_options/Makefile") CONFIG_FILES="$CONFIG_FILES tests/main_with_options/Makefile" ;; +- "tests/menu_destruction/Makefile") CONFIG_FILES="$CONFIG_FILES tests/menu_destruction/Makefile" ;; +- "tests/property_notification/Makefile") CONFIG_FILES="$CONFIG_FILES tests/property_notification/Makefile" ;; +- "tests/scrolledwindow/Makefile") CONFIG_FILES="$CONFIG_FILES tests/scrolledwindow/Makefile" ;; +- "tests/wrap_existing/Makefile") CONFIG_FILES="$CONFIG_FILES tests/wrap_existing/Makefile" ;; + "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; + "MSVC_Net2005/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC_Net2005/Makefile" ;; + "MSVC_Net2005/gendef/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC_Net2005/gendef/Makefile" ;; +--- a/configure.in ++++ b/configure.in +@@ -405,26 +405,6 @@ AC_CONFIG_FILES([ + gtk/src/Makefile + gtk/gtkmm/Makefile + gtk/gtkmm/private/Makefile +- +- tools/Makefile +- tools/m4/Makefile +- tools/extra_defs_gen/Makefile +-]) +- +-AC_CONFIG_FILES([ +- tests/Makefile +- tests/child_widget/Makefile +- tests/child_widget2/Makefile +- tests/child_widget_managed/Makefile +- tests/refcount_dialog/Makefile +- tests/dialog/Makefile +- tests/dialog_deletethis/Makefile +- tests/delete_cpp_child/Makefile +- tests/main_with_options/Makefile +- tests/menu_destruction/Makefile +- tests/property_notification/Makefile +- tests/scrolledwindow/Makefile +- tests/wrap_existing/Makefile + ]) + + AC_CONFIG_FILES([ +--- a/Makefile.am ++++ b/Makefile.am +@@ -6,7 +6,7 @@ else + ATK_SUBDIR= + endif + +-SUBDIRS = tools $(ATK_SUBDIR) gdk gtk @DEMO_SUBDIR@ @DOCS_SUBDIR@ tests MSVC_Net2005 MSVC_Net2008 win32_installer ++SUBDIRS = $(ATK_SUBDIR) gdk gtk @DEMO_SUBDIR@ @DOCS_SUBDIR@ MSVC_Net2005 MSVC_Net2008 win32_installer + DIST_SUBDIRS = $(SUBDIRS) scripts + + EXTRA_DIST = build_shared/Makefile_build.am_fragment \ +--- a/Makefile.in ++++ b/Makefile.in +@@ -213,7 +213,7 @@ top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @GTKMM_ATKMM_ENABLED_FALSE@ATK_SUBDIR = + @GTKMM_ATKMM_ENABLED_TRUE@ATK_SUBDIR = atk +-SUBDIRS = tools $(ATK_SUBDIR) gdk gtk @DEMO_SUBDIR@ @DOCS_SUBDIR@ tests MSVC_Net2005 MSVC_Net2008 win32_installer ++SUBDIRS = $(ATK_SUBDIR) gdk gtk @DEMO_SUBDIR@ @DOCS_SUBDIR@ MSVC_Net2005 MSVC_Net2008 win32_installer + DIST_SUBDIRS = $(SUBDIRS) scripts + EXTRA_DIST = build_shared/Makefile_build.am_fragment \ + build_shared/Makefile_build_gensrc.am_fragment \ diff --git a/Xorg/lib/hippo-canvas/Makefile b/Xorg/lib/hippo-canvas/Makefile new file mode 100644 index 0000000..696cfee --- /dev/null +++ b/Xorg/lib/hippo-canvas/Makefile @@ -0,0 +1,98 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=hippo-canvas +PKG_VERSION:=0.3.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/0.3/ +PKG_MD5SUM:=9a0f64eb0258a3e8ba710eff9798a7d0 +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk) + +PKG_INSTALL:=1 + +EXTRA_CFLAGS += \ + -I$(INTL_PREFIX)/include \ + -I$(STAGING_DIR)/usr/include/libcroco-0.6 \ + +STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_hippo-canvas CONFIG_PACKAGE_python-hippo-canvas) + +define Package/hippo-canvas/Default + URL:=http://developer.mugshot.org/wiki/Hippo_Canvas + DEPENDS:=@FEATURE_drawing-backend_libX11 +endef + +define Package/hippo-canvas +$(call Package/hippo-canvas/Default) + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=Hippo Canvas + DEPENDS+=+librsvg +gtk2 +cairo +libcroco +pango +endef + +define Package/hippo-canvas/description +The Hippo Canvas is a Cairo/GObject/GTK+ based canvas, written in C with +support for flexible layout, CSS styling, and initial work on animations. +endef + +define Package/python-hippo-canvas +$(call Package/hippo-canvas/Default) + SECTION:=lang-python + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Python bindings for hippo canvas + DEPENDS+=+python-mini +PACKAGE_python-hippo-canvas:python-gtk +PACKAGE_python-hippo-canvas:pycairo +hippo-canvas +endef + +define Build/Configure + $(call Build/Configure/Default, \ + $(if $(CONFIG_PACKAGE_python-hippo-canvas), \ + --enable-python, \ + --disable-python \ + ) \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + + $(INSTALL_DIR) $(1)/usr/include/hippo-canvas-1/hippo/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/hippo-canvas-1/hippo/* \ + $(1)/usr/include/hippo-canvas-1/hippo/ +endef + +define Package/hippo-canvas/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ +endef + +define Package/python-hippo-canvas/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/*.so* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,hippo-canvas)) +$(eval $(call BuildPackage,python-hippo-canvas)) diff --git a/Xorg/lib/hippo-canvas/patches/010-use-python-config b/Xorg/lib/hippo-canvas/patches/010-use-python-config new file mode 100644 index 0000000..26ad36f --- /dev/null +++ b/Xorg/lib/hippo-canvas/patches/010-use-python-config @@ -0,0 +1,17 @@ +--- hippo-canvas-0.3.0.orig/configure 2008-09-30 22:18:23.000000000 +0200 ++++ hippo-canvas-0.3.0/configure 2008-09-30 22:41:16.000000000 +0200 +@@ -20486,10 +20486,14 @@ + echo $ECHO_N "checking for headers required to compile python extensions... $ECHO_C" >&6; } + py_prefix=`$PYTHON -c "import sys; print sys.prefix"` + py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` ++if test -x "$PYTHON-config"; then ++PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null` ++else + PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" + if test "$py_prefix" != "$py_exec_prefix"; then + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" + fi ++fi + + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" diff --git a/Xorg/lib/imlib2/Makefile b/Xorg/lib/imlib2/Makefile new file mode 100644 index 0000000..569567f --- /dev/null +++ b/Xorg/lib/imlib2/Makefile @@ -0,0 +1,82 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=imlib2 +PKG_VERSION:=1.4.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/enlightenment +PKG_MD5SUM:=20d59c7cda06742015baade6f5975415 + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +PKG_INSTALL=1 + +define Package/imlib2 + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=Image library + DEPENDS:=+libX11 +giflib +libtiff +libjpeg +gtk1 +libfreetype +libXext + URL:=http://docs.enlightenment.org/api/imlib2/html/ +endef + +TARGET_CFLAGS += "-Wl,-rpath-link=$(STAGING_DIR)/usr/lib" + +define Build/Configure + $(call Build/Configure/Default, \ + --x-includes="$(STAGING_DIR)/usr/include/X11" \ + --x-libraries="$(STAGING_DIR)/usr/lib/" \ + --disable-gtktest \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{include,lib/pkgconfig} + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/* \ + $(1)/usr/include/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{la,so*,a} \ + $(1)/usr/lib/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + + $(INSTALL_DIR) $(2)/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/imlib2-config \ + $(2)/bin/ + $(SED) \ + 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \ + $(2)/bin/imlib2-config +endef + +define Package/imlib2/install + $(INSTALL_DIR) $(1)/usr/lib/imlib2/{loaders,filters} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/imlib2/filters/*.so* \ + $(1)/usr/lib/imlib2/filters + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/imlib2/loaders/*.so* \ + $(1)/usr/lib/imlib2/loaders +endef + +$(eval $(call BuildPackage,imlib2)) diff --git a/Xorg/lib/libast/Makefile b/Xorg/lib/libast/Makefile new file mode 100644 index 0000000..08b64a6 --- /dev/null +++ b/Xorg/lib/libast/Makefile @@ -0,0 +1,70 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libast +PKG_VERSION:=0.7 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.eterm.org/download/ +PKG_MD5SUM:=a9ec3b2da317f35869316e6d9571d296 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libast + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=libast + DEPENDS:=+libpcre \ + +FEATURE_drawing-backend_libX11:libX11 \ + +FEATURE_drawing-backend_libX11:libXt +endef + +CONFIGURE_ARGS+= \ + --with-regexp="pcre" \ + --without-imlib \ + +ifneq ($(CONFIG_FEATURE_drawing-backend_libX11),) + CONFIGURE_ARGS+= \ + --with-x \ + --x-includes="$(STAGING_DIR)/usr/include" \ + --x-libraries="$(STAGING_DIR)/usr/lib" +else + CONFIGURE_ARGS+= \ + --without-x +endif + +CONFIGURE_VARS+= \ + dps_cv_snprintf_bug=0 \ + dps_cv_vsnprintf_bug=0 \ + dps_cv_symlink_open_bug=0 \ + +EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include $(2)/bin + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libast.{la,so*} $(1)/usr/lib/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(2)/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + $(SED) "s,-I/usr/include,,g" $(2)/bin/libast-config + $(SED) "s,-L/usr/lib,,g" $(2)/bin/libast-config + $(SED) "s,-L/usr/X11R6/lib,,g" $(2)/bin/libast-config +endef + +define Package/libast/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libast.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libast)) diff --git a/Xorg/lib/libast/patches/010-dont-add-host-paths.patch b/Xorg/lib/libast/patches/010-dont-add-host-paths.patch new file mode 100644 index 0000000..1d602a8 --- /dev/null +++ b/Xorg/lib/libast/patches/010-dont-add-host-paths.patch @@ -0,0 +1,30 @@ +--- a/configure ++++ b/configure +@@ -27152,10 +27152,10 @@ fi; + + + +- CPPFLAGS=`eval eval eval eval eval echo "-I$includedir -I$prefix/include $CPPFLAGS"` ++ CPPFLAGS=`eval eval eval eval eval echo "$CPPFLAGS"` + CPPFLAGS=`echo $CPPFLAGS | tr ' ' '\n' | uniq | grep -v NONE | tr '\n' ' '` + CFLAGS=${CFLAGS--O} +- LDFLAGS=`eval eval eval eval eval echo "-L$libdir -L$prefix/lib ${LDFLAGS--O}"` ++ LDFLAGS=`eval eval eval eval eval echo "${LDFLAGS--O}"` + LDFLAGS=`echo $LDFLAGS | tr ' ' '\n' | uniq | grep -v NONE | tr '\n' ' '` + LIBS="$GRLIBS $X_PRE_LIBS $LIBS $X_EXTRA_LIBS" + +--- a/libast.m4 ++++ b/libast.m4 +@@ -398,10 +398,10 @@ dnl# + dnl# LibAST macro for flag post-processing + dnl# + AC_DEFUN([AST_FLAGS], [ +- CPPFLAGS=`eval eval eval eval eval echo "-I$includedir -I$prefix/include $CPPFLAGS"` ++ CPPFLAGS=`eval eval eval eval eval echo "$CPPFLAGS"` + CPPFLAGS=`echo $CPPFLAGS | tr ' ' '\n' | uniq | grep -v NONE | tr '\n' ' '` + CFLAGS=${CFLAGS--O} +- LDFLAGS=`eval eval eval eval eval echo "-L$libdir -L$prefix/lib ${LDFLAGS--O}"` ++ LDFLAGS=`eval eval eval eval eval echo "${LDFLAGS--O}"` + LDFLAGS=`echo $LDFLAGS | tr ' ' '\n' | uniq | grep -v NONE | tr '\n' ' '` + LIBS="$GRLIBS $X_PRE_LIBS $LIBS $X_EXTRA_LIBS" + ]) diff --git a/Xorg/lib/libast/patches/100-configure.patch b/Xorg/lib/libast/patches/100-configure.patch new file mode 100644 index 0000000..6ca1be6 --- /dev/null +++ b/Xorg/lib/libast/patches/100-configure.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -23906,7 +23906,7 @@ else + + mkdir conftest.d + if test "$cross_compiling" = yes; then +- dps_cv_symlink_open_buf=3 ++ dps_cv_symlink_open_bug=3 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +--- a/libast.m4 ++++ b/libast.m4 +@@ -573,7 +573,7 @@ int main(void) + dps_cv_symlink_open_bug=1 + fi + ], +- dps_cv_symlink_open_buf=3) ++ dps_cv_symlink_open_bug=3) + rm -rf conftest.d + ]) + case "$dps_cv_symlink_open_bug" in diff --git a/Xorg/lib/libdrm/Makefile b/Xorg/lib/libdrm/Makefile new file mode 100644 index 0000000..87dd985 --- /dev/null +++ b/Xorg/lib/libdrm/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libdrm +PKG_VERSION:=2.3.1 +PKG_RELEASE:=3 + +PKG_SOURCE_URL:=http://dri.freedesktop.org/libdrm +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=620fe7dd02c3236c3e9881a3a238173d + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/libdrm + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:= + TITLE:=libdrm + URL:=http://dri.freedesktop.org/ +endef + +CONFIGURE_ARGS += --enable-malloc0returnsnull --without-xcb + +define Build/Compile + $(call $(PKG_NAME)/Compile) + make -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name *.la | xargs rm -rf +endef + +define Package/libdrm/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Build/InstallDev + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +$(eval $(call BuildPackage,libdrm)) diff --git a/Xorg/lib/libfakekey/Makefile b/Xorg/lib/libfakekey/Makefile new file mode 100644 index 0000000..f41e333 --- /dev/null +++ b/Xorg/lib/libfakekey/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libfakekey +PKG_REV:=2111 +PKG_VERSION:=svn$(PKG_REV) +PKG_RELEASE:=1 + +PKG_SOURCE:=libfakekey-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://svn.o-hand.com/repos/matchbox/trunk/libfakekey +PKG_SOURCE_PROTO:=svn +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/libfakekey + SECTION:=xorg-lib + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=libfakekey + MAINTAINER:=Michael Buesch + URL:=http://matchbox-project.org/?p=1 + DEPENDS:=+libX11 +libXtst +endef + +define Package/libfakekey/description + X11 keyboard faking library +endef + +EXTRA_LDFLAGS:=\ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/fakekey $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/fakekey/fakekey.h \ + $(1)/usr/include/fakekey/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/*{.so,.a}* $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libfakekey.pc \ + $(1)/usr/lib/pkgconfig/ +endef + +define Package/libfakekey/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libfakekey)) diff --git a/Xorg/lib/libmatchbox/Makefile b/Xorg/lib/libmatchbox/Makefile new file mode 100644 index 0000000..1c7d706 --- /dev/null +++ b/Xorg/lib/libmatchbox/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libmatchbox +PKG_RELEASE:=2 +PKG_VERSION:=1.9 +PKG_SOURCE_URL:=http://matchbox-project.org/sources/libmatchbox/$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=9f73e7515cc4679171a5db180dc1343b +PKG_FIXUP:=libtool + +EXTRA_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib/ + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +PKG_INSTALL:=1 + +define Package/libmatchbox + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 +libXft +libpng +libjpeg +libXext +pango +check + TITLE:=libmatchbox + URL:=http://matchbox-project.org +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-pango \ + --enable-jpeg \ + --enable-png \ + --enable-Xft \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/libmb + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/libmb/*.h \ + $(1)/usr/include/libmb/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libmb.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ +endef + +define Package/libmatchbox/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libmb.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libmatchbox)) diff --git a/Xorg/lib/librsvg/Makefile b/Xorg/lib/librsvg/Makefile new file mode 100644 index 0000000..be0291d --- /dev/null +++ b/Xorg/lib/librsvg/Makefile @@ -0,0 +1,86 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=librsvg +PKG_VERSION:=2.22.3 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.22 +PKG_MD5SUM:=c4ec4fdb2b1842e221ca39127e85682d +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +PKG_INSTALL=1 + +EXTRA_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ + -L$(ICONV_PREFIX)/lib/ \ + -L$(INTL_PREFIX)/lib/ + +STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_librsvg CONFIG_PACKAGE_librsvg-pixbuf-loader) + +define Package/librsvg + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=SVG rendering library + URL:=http://librsvg.sourceforge.net/ + DEPENDS:=+cairo +libxml2 +glib2 +libcroco +pango +gtk2 +endef + +define Package/librsvg-pixbuf-loader + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=SVG rendering library + URL:=http://librsvg.sourceforge.net/ + DEPENDS:=librsvg +endef + +define Package/librsvg/description +librsvg is a high performance SVG rendering library associated with the Gnome Project. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-gtk-theme \ + --disable-mozilla-plugin \ + --with-croco \ + $(if $(CONFIG_PACKAGE_librsvg-pixbuf-loader), \ + --enable-pixbuf-loader,\ + --disable-pixbuf-loader \ + ) \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ + $(INSTALL_DIR) $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ +endef + +define Package/librsvg/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ +endef + +define Package/librsvg-pixbuf-loader/install + $(INSTALL_DIR) $(1)/usr/lib/gtk-2.0/2.10.0/loaders + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/gtk-2.0/2.10.0/loaders/*.so* \ + $(1)/usr/lib/gtk-2.0/2.10.0/loaders +endef + +$(eval $(call BuildPackage,librsvg)) +$(eval $(call BuildPackage,librsvg-pixbuf-loader)) diff --git a/Xorg/lib/libxcb/Makefile b/Xorg/lib/libxcb/Makefile new file mode 100644 index 0000000..6698b7a --- /dev/null +++ b/Xorg/lib/libxcb/Makefile @@ -0,0 +1,102 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libxcb +PKG_VERSION:=1.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://xcb.freedesktop.org/dist/ +PKG_MD5SUM:=9310b02433273d75d42f10da3c7455aa +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xcbproto libpthread-stubs + +include $(INCLUDE_DIR)/package.mk + +PROTOS:=composite damage dpms glx randr record render res screensaver shape \ + shm sync xevie xf86dri xfixes xinerama xprint xtest xvmc xv + +define Package/libxcb + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=libxcb + DEPENDS:=+libXau +libXdmcp + URL:=http://xcb.freedesktop.org/ +endef + +define Package/libxcb/description +libxcb provides an interface to the X Window System protocol, which +replaces the current Xlib interface. +endef + +define Package/libxcb-xlib + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=libxcb-xlib + DEPENDS:=+libxcb +endef + +define Package/libxcb-proto/Default +define Package/libxcb-$(1) + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=libxcb-$(1) + DEPENDS:=+libxcb +endef +endef + +$(foreach proto,$(PROTOS),$(eval $(call Package/libxcb-proto/Default,$(proto)))) + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/xcb} + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/xcb/* \ + $(1)/usr/include/xcb/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ +endef + +define Package/libxcb/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libxcb.so* \ + $(1)/usr/lib/ +endef + +define Package/libxcb-xlib/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libxcb-xlib.so* \ + $(1)/usr/lib/ +endef + +define Package/libxcb-proto/install/Default +define Package/libxcb-$(1)/install + $(INSTALL_DIR) $$(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libxcb-$(1).so* \ + $$(1)/usr/lib/ +endef +endef + +$(foreach proto,$(PROTOS),$(eval $(call Package/libxcb-proto/install/Default,$(proto)))) + +$(eval $(call BuildPackage,libxcb)) +$(eval $(call BuildPackage,libxcb-xlib)) +$(foreach proto,$(PROTOS),$(eval $(call BuildPackage,libxcb-$(proto)))) diff --git a/Xorg/lib/mesa/Makefile b/Xorg/lib/mesa/Makefile new file mode 100644 index 0000000..57db41d --- /dev/null +++ b/Xorg/lib/mesa/Makefile @@ -0,0 +1,112 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=Mesa +PKG_RELEASE:=2 +PKG_VERSION:=7.2 + +PKG_SOURCE_URL:=@SF/mesa3d +PKG_SOURCE:=$(PKG_NAME)Lib-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=04d379292e023df0b0266825cb0dbde5 +PKG_FIXUP:=libtool +PKG_BUILD_DEPENDS:=glproto + +include $(INCLUDE_DIR)/package.mk + +PKG_INSTALL:=1 + +define Package/libgl-mesa + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 +libXext +libXfixes +libXdamage +libXxf86vm +libdrm +libexpat + TITLE:=Mesa OpenGL library + URL:=http://mesa3d.org +endef + +define Package/libglu-mesa + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libgl-mesa + TITLE:=Mesa OpenGL utility library + URL:=http://mesa3d.org +endef + +define Package/libgl-mesa-dri/Default +define Package/libgl-mesa-dri-$(1) + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=libgl-mesa @DISPLAY_SUPPORT $(if $(findstring swrast,$(1)),,@TARGET_x86) + TITLE:=mesa dri $(1) + URL:=http://mesa3d.org +endef +endef + +DRIDRIVERS:=i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \ + savage sis tdfx trident unichrome ffb swrast + +$(foreach dri,$(DRIDRIVERS),$(eval $(call Package/libgl-mesa-dri/Default,$(dri)))) + +STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_libgl-mesa \ + CONFIG_PACKAGE_libglu-mesa \ + $(foreach dri,$(DRIDRIVERS),CONFIG_PACKAGE_libgl-mesa-dri-$(dri))) + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-glw \ + --with-driver=dri \ + --with-dri-drivers="$(foreach dri,$(DRIDRIVERS),$(if $(CONFIG_PACKAGE_libgl-mesa-dri-$(dri)),$(dri)))" \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{include/GL,lib/pkgconfig} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/GL/* \ + $(1)/usr/include/GL + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig +endef + +define Package/libgl-mesa/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libGL.so* \ + $(1)/usr/lib/ +endef + +define Package/libglu-mesa/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libGLU.so* \ + $(1)/usr/lib/ +endef + +define Package/libgl-mesa-dri/install/Default +define Package/libgl-mesa-dri-$(1)/install + $(INSTALL_DIR) $$(1)/usr/lib/dri/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/dri/$(1)_dri.so* \ + $$(1)/usr/lib/dri +endef +endef + +$(foreach dri,$(DRIDRIVERS),$(eval $(call Package/libgl-mesa-dri/install/Default,$(dri)))) + +$(eval $(call BuildPackage,libgl-mesa)) +$(eval $(call BuildPackage,libglu-mesa)) +$(foreach dri,$(DRIDRIVERS),$(eval $(call BuildPackage,libgl-mesa-dri-$(dri)))) diff --git a/Xorg/lib/mesa/patches/010-fix-pkgconfig-files.patch b/Xorg/lib/mesa/patches/010-fix-pkgconfig-files.patch new file mode 100644 index 0000000..9fe4116 --- /dev/null +++ b/Xorg/lib/mesa/patches/010-fix-pkgconfig-files.patch @@ -0,0 +1,90 @@ +Index: Mesa-7.2/src/glu/glu.pc.in +=================================================================== +--- Mesa-7.2.orig/src/glu/glu.pc.in 2008-08-25 16:46:42.000000000 +0200 ++++ Mesa-7.2/src/glu/glu.pc.in 2011-01-27 19:29:13.220654415 +0100 +@@ -1,7 +1,7 @@ +-prefix=@INSTALL_DIR@ +-exec_prefix=${prefix} +-libdir=@INSTALL_LIB_DIR@ +-includedir=@INSTALL_INC_DIR@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ + + Name: glu + Description: Mesa OpenGL Utility library +Index: Mesa-7.2/src/glw/glw.pc.in +=================================================================== +--- Mesa-7.2.orig/src/glw/glw.pc.in 2008-08-25 16:46:42.000000000 +0200 ++++ Mesa-7.2/src/glw/glw.pc.in 2011-01-27 19:29:28.723225782 +0100 +@@ -1,7 +1,7 @@ +-prefix=@INSTALL_DIR@ +-exec_prefix=${prefix} +-libdir=@INSTALL_LIB_DIR@ +-includedir=@INSTALL_INC_DIR@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ + + Name: glw + Description: Mesa OpenGL widget library +Index: Mesa-7.2/src/mesa/drivers/dri/dri.pc.in +=================================================================== +--- Mesa-7.2.orig/src/mesa/drivers/dri/dri.pc.in 2008-08-25 16:46:43.000000000 +0200 ++++ Mesa-7.2/src/mesa/drivers/dri/dri.pc.in 2011-01-27 19:29:49.747288575 +0100 +@@ -1,8 +1,8 @@ +-prefix=@INSTALL_DIR@ +-exec_prefix=${prefix} +-libdir=@INSTALL_LIB_DIR@ +-includedir=@INSTALL_INC_DIR@ +-dridriverdir=@DRI_DRIVER_DIR@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++dridriverdir=@DRI_DRIVER_INSTALL_DIR@ + + Name: dri + Description: Direct Rendering Infrastructure +Index: Mesa-7.2/src/mesa/gl.pc.in +=================================================================== +--- Mesa-7.2.orig/src/mesa/gl.pc.in 2008-08-25 16:46:44.000000000 +0200 ++++ Mesa-7.2/src/mesa/gl.pc.in 2011-01-27 19:30:13.700079977 +0100 +@@ -1,7 +1,7 @@ +-prefix=@INSTALL_DIR@ +-exec_prefix=${prefix} +-libdir=@INSTALL_LIB_DIR@ +-includedir=@INSTALL_INC_DIR@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ + + Name: gl + Description: Mesa OpenGL library +Index: Mesa-7.2/configure +=================================================================== +--- Mesa-7.2.orig/configure 2008-09-13 22:45:59.000000000 +0200 ++++ Mesa-7.2/configure 2011-01-27 19:27:08.622125839 +0100 +@@ -8858,7 +8858,7 @@ + LDFLAGS="$_SAVE_LDFLAGS" + CPPFLAGS="$_SAVE_CPPFLAGS" + +-ac_config_files="$ac_config_files configs/autoconf" ++ac_config_files="$ac_config_files configs/autoconf src/glu/glu.pc src/glw/glw.pc src/mesa/drivers/dri/dri.pc src/mesa/gl.pc" + + + ac_config_commands="$ac_config_commands configs" +@@ -9435,6 +9435,10 @@ + for ac_config_target in $ac_config_targets + do + case $ac_config_target in ++ "src/glu/glu.pc") CONFIG_FILES="$CONFIG_FILES src/glu/glu.pc" ;; ++ "src/glw/glw.pc") CONFIG_FILES="$CONFIG_FILES src/glw/glw.pc" ;; ++ "src/mesa/drivers/dri/dri.pc") CONFIG_FILES="$CONFIG_FILES src/mesa/drivers/dri/dri.pc" ;; ++ "src/mesa/gl.pc") CONFIG_FILES="$CONFIG_FILES src/mesa/gl.pc" ;; + "configs/autoconf") CONFIG_FILES="$CONFIG_FILES configs/autoconf" ;; + "configs") CONFIG_COMMANDS="$CONFIG_COMMANDS configs" ;; + diff --git a/Xorg/lib/packages b/Xorg/lib/packages new file mode 100644 index 0000000..0310068 --- /dev/null +++ b/Xorg/lib/packages @@ -0,0 +1,23 @@ +libfontenc-1.0.4|+xproto+zlib +libICE-1.0.4|+xproto+xtrans +libSM-1.0.3|+xproto+xtrans+libICE +_libX11-1.1.5|+bigreqsproto+xproto+xextproto+xtrans+xcmiscproto+libXdmcp+xf86bigfontproto+kbproto+inputproto+libXau +libXau-1.0.4|+xproto +libXaw-1.0.4|+xproto+libX11+libXext+xextproto+libXt+libXmu+libXpm+printproto+libXau +libXcursor-1.1.9|+libXrender+libXfixes +libXdmcp-1.0.2|+xproto +libXext-1.0.4|+xproto+xextproto+libX11+libXau +libXfixes-4.0.3|+xproto+fixesproto+xextproto+libX11 +libXfont-1.3.3|+zlib+xproto+xtrans+libfontenc+fontcacheproto+fontsproto+libfreetype +libxkbfile-1.0.5|+libX11+kbproto +libXmu-1.0.4|+libXt+libXext+xextproto +libXpm-3.5.7|+xproto+libX11 +libXrandr-1.2.3|+libXext+libXrender+randrproto+renderproto+xextproto+libX11 +libXrender-0.9.4|+libX11+renderproto +libXt-1.0.5|+libSM+libX11+xproto+kbproto +libXtst-1.0.3|+libX11+libXext+recordproto+xextproto+inputproto +libXv-1.0.4|+libXext+videoproto +libXvMC-1.0.4|+libXext+videoproto+libXv +libXxf86misc-1.0.1|+xproto+libX11+xextproto+libXext+xf86miscproto +libXxf86vm-1.0.2|+xproto+libX11+xextproto+libXext+xf86vidmodeproto +xtrans-1.2.1| diff --git a/Xorg/lib/pango/Makefile b/Xorg/lib/pango/Makefile new file mode 100644 index 0000000..693b47e --- /dev/null +++ b/Xorg/lib/pango/Makefile @@ -0,0 +1,100 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pango +PKG_VERSION:=1.28.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/1.28/ +PKG_MD5SUM:=3f3989700f04e9117d30544a9078b3a0 + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=0 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +TARGET_LDFLAGS+= \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/pango + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=Text layout and rendering library + DEPENDS:=+cairo +glib2 +fontconfig +libfreetype \ + +FEATURE_drawing-backend_libX11:libX11 \ + +FEATURE_drawing-backend_libX11:libXft + URL:=http://www.pango.org/ +endef + +define Package/pango/description +Pango is a library for layout and rendering of text, with an emphasis +on internationalization. Pango can be used anywhere that text layout +is needed; however, most of the work on Pango so far has been done using +the GTK+ widget toolkit as a test platform. Pango forms the core of text +and font handling for GTK+-2.x. +endef + +CONFIGURE_ARGS += \ + $(if $(CONFIG_PACKAGE_libX11), --with-x, --without-x) + +CONFIGURE_VARS += \ + CXX="$(TARGET_CC)" + +define Build/InstallDev + $(INSTALL_DIR) \ + $(1)/usr/lib/pkgconfig \ + $(1)/usr/lib/pango/1.6.0/modules \ + $(1)/usr/include + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/pango/1.6.0/modules/*.so* \ + $(1)/usr/lib/pango/1.6.0/modules/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ + $(1)/usr/lib/pkgconfig + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/* \ + $(1)/usr/include/ +endef + +define Package/pango/install + $(INSTALL_DIR) \ + $(1)/usr/lib/pango/1.6.0/modules \ + $(1)/usr/bin \ + $(1)/etc/init.d + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/pango/1.6.0/modules/*.so* \ + $(1)/usr/lib/pango/1.6.0/modules/ + + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/pango-querymodules \ + $(1)/usr/bin/ + + $(INSTALL_BIN) \ + ./files/pango-querymodules.init \ + $(1)/etc/init.d/pango-querymodules +endef + +$(eval $(call BuildPackage,pango)) diff --git a/Xorg/lib/pango/files/pango-querymodules.init b/Xorg/lib/pango/files/pango-querymodules.init new file mode 100755 index 0000000..f7f56e5 --- /dev/null +++ b/Xorg/lib/pango/files/pango-querymodules.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org + +START=99 +FILE=/etc/pango/pango.modules + +start() { + if [ ! -e ${FILE} ]; then + mkdir -p $(dirname ${FILE}) + pango-querymodules > ${FILE} + fi +} diff --git a/Xorg/lib/pangomm/Makefile b/Xorg/lib/pangomm/Makefile new file mode 100644 index 0000000..40ed5d6 --- /dev/null +++ b/Xorg/lib/pangomm/Makefile @@ -0,0 +1,70 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pangomm +PKG_VERSION:=2.26.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.26/ +PKG_MD5SUM:=37f54dc8e6cb73ed923b22f313352156 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +TARGET_LDFLAGS+=\ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/pangomm + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=Text layout and rendering library + DEPENDS:=+glibmm +cairomm +pango + URL:=http://www.pango.org/ +endef + +CONFIGURE_ARGS+= --disable-documentation + +define Package/pangomm/description +c++-bindings for pango +endef + +define Build/InstallDev + $(INSTALL_DIR) \ + $(1)/usr/lib/pkgconfig \ + $(1)/usr/lib/pangomm/1.6.0/modules \ + $(1)/usr/include + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/* \ + $(1)/usr/lib/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/* \ + $(1)/usr/include/ +endef + +define Package/pangomm/install + $(INSTALL_DIR) \ + $(1)/usr/lib + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,pangomm)) diff --git a/Xorg/lib/pixman/Makefile b/Xorg/lib/pixman/Makefile new file mode 100644 index 0000000..c34e4e2 --- /dev/null +++ b/Xorg/lib/pixman/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pixman +PKG_RELEASE:=1 +PKG_VERSION:=0.16.2 + +PKG_SOURCE_URL:=http://cairographics.org/releases/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=02bd3669f53c404c19980d5efb6f86fb + +PKG_FIXUP:=libtool + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/pixman + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=pixman + URL:=http://cairographics.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-gtk \ + --disable-arm-simd \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1) +endef + +define Package/pixman/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,pixman)) diff --git a/Xorg/lib/qt4/Config.in b/Xorg/lib/qt4/Config.in new file mode 100644 index 0000000..d33e5d9 --- /dev/null +++ b/Xorg/lib/qt4/Config.in @@ -0,0 +1,21 @@ +if PACKAGE_qt4-gui + +choice + prompt "qt4 window system" + default QT4_WS_QWS + +config QT4_WS_QWS + bool "QWS window system" + depends on FEATURE_drawing-backend_DirectFB + help + Use QT4's internal QWS window system. + +config QT4_WS_X11 + bool "X11 window system" + depends on FEATURE_drawing-backend_libX11 + help + Use X11 + +endchoice + +endif diff --git a/Xorg/lib/qt4/Makefile b/Xorg/lib/qt4/Makefile new file mode 100644 index 0000000..cf9ca14 --- /dev/null +++ b/Xorg/lib/qt4/Makefile @@ -0,0 +1,785 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# TODO: +# - test/add xcb support +# - handle plugins in a granular way (find out which packages should provide which plugins) + +include $(TOPDIR)/rules.mk + +PKG_NAME:=qt4 +PKG_VERSION:=4.7.0 +PKG_RELEASE:=1 +PKG_MD5SUM:=3a2f25b9b115037277f4fb759194a7a5 + +PKG_SOURCE:=qt-everywhere-opensource-src-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.qt.nokia.com/qt/source +PKG_BUILD_DIR=$(BUILD_DIR)/qt-everywhere-opensource-src-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +PKG_CONFIG_DEPENDS:= \ + CONFIG_QT4_WS_QWS \ + CONFIG_QT4_WS_X11 \ + CONFIG_PACKAGE_directfb \ + CONFIG_PACKAGE_qt4-demos \ + CONFIG_PACKAGE_qt4-examples \ + CONFIG_PACKAGE_qt4-svg \ + CONFIG_PACKAGE_qt4-qt3support \ + CONFIG_PACKAGE_qt4-dbus \ + CONFIG_PACKAGE_qt4-phonon \ + CONFIG_PACKAGE_qt4-sqlite \ + CONFIG_PACKAGE_qt4-mysql \ + CONFIG_PACKAGE_qt4-webkit \ + CONFIG_PACKAGE_qt4-script \ + CONFIG_PACKAGE_qt4-scriptools \ + CONFIG_PACKAGE_qt4-openssl + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +-include $(if $(DUMP),,./files/qmake.mk) + +# this should be moved to a more generic place later, as other packages are configured different as well depending on available nptl support +ifeq ($(CONFIG_USE_GLIBC),y) + NPTL:=y +endif +ifeq ($(CONFIG_USE_EGLIBC),y) + NPTL:=y +endif +ifeq ($(CONFIG_UCLIBC_VERSION_0_9_32),y) + NPTL:=y +endif + +define Package/qt4/config + source "$(SOURCE)/Config.in" +endef + +define Package/qt4/Default + SECTION:=xorg-framework + CATEGORY:=Xorg + SUBMENU:=framework + TITLE:=qt4 + DEPENDS:=qt4 + DEFAULT:=m if PACKAGE_qt4-gui && ALL + URL:=http://qt.nokia.com/ +endef + +define Package/qt4 + $(call Package/qt4/Default) + DEPENDS:=+zlib +libstdcpp @!LINUX_2_4 +endef + +define Package/qt4-gui + $(call Package/qt4/Default) + DEFAULT:= + DEPENDS+=+libpng +libtiff +libjpeg +libfreetype +qt4-network \ + +FEATURE_drawing-backend_libX11:libX11 \ + +FEATURE_drawing-backend_libX11:libXext @DISPLAY_SUPPORT + TITLE+=(gui) +endef + +define Package/qt4-demos + $(call Package/qt4/Default) + TITLE+=(demos) + DEPENDS+=+qt4-gui +endef + +define Package/qt4-examples + $(call Package/qt4/Default) + TITLE+=(examples) + DEPENDS+=+qt4-gui +qt4-svg +endef + +define Package/qt4-network + $(call Package/qt4/Default) + TITLE+=(network) +endef + +define Package/qt4-sqlite + $(call Package/qt4/Default) + TITLE+=(sqlite) + DEPENDS+=+libsqlite3 +endef + +define Package/qt4-mysql + $(call Package/qt4/Default) + TITLE+=(mysql) + DEPENDS+=+libmysqlclient +endef + +define Package/qt4-openssl + $(call Package/qt4/Default) + TITLE+=(openssl) + DEPENDS+=+libopenssl +endef + +#define Package/qt4-multimedia +# $(call Package/qt4/Default) +# TITLE+=(multimedia) +#endef + +#define Package/qt4-audio-backend +# $(call Package/qt4/Default) +# TITLE+=(audio-backend) +#endef + +define Package/qt4-phonon + $(call Package/qt4/Default) + TITLE+=(phonon) + DEPENDS+=+qt4-gui +qt4-xml +qt4-dbus +qt4-network +endef + +#define Package/qt4-phonon-backend +# $(call Package/qt4/Default) +# TITLE+=(phonon-backend) +#endef + +define Package/qt4-svg + $(call Package/qt4/Default) + TITLE+=(svg) + DEPENDS+=+qt4-gui +qt4-network +endef + +define Package/qt4-webkit + $(call Package/qt4/Default) + TITLE+=(webkit) + DEPENDS+=@USE_GLIBC||@USE_EGLIBC||@UCLIBC_VERSION_0_9_32 +libsqlite3 +qt4-phonon +qt4-dbus +qt4-xml +qt4-gui +qt4-network # versions of uclibc prior 0.9.32 do not have nptl support +endef + +define Package/qt4-script + $(call Package/qt4/Default) + TITLE+=(script) + DEPENDS+=@USE_GLIBC||@USE_EGLIBC||@UCLIBC_VERSION_0_9_32 # versions of uclibc prior 0.9.32 do not have nptl support +endef + +define Package/qt4-scripttools + $(call Package/qt4/Default) + TITLE+=(scripttools) + DEPENDS+=+qt4-script +qt4-gui +qt4-network +endef + +#define Package/qt4-accessibility +# $(call Package/qt4/Default) +# TITLE+=(accessibility) +#endef + +#define Package/qt4-javascript-jit +# $(call Package/qt4/Default) +# TITLE+=(javascript-jit) +#endef + +#define Package/qt4-cups +# $(call Package/qt4/Default) +# TITLE+=(cups) +#endef + +define Package/qt4-dbus + $(call Package/qt4/Default) + TITLE+=(dbus) + DEPENDS+=+libdbus +qt4-xml +endef + +#define Package/qt4-gtkstyle +# $(call Package/qt4/Default) +# TITLE+=(gtkstyle) +#endef + +#define Package/qt4-glib +# $(call Package/qt4/Default) +# TITLE+=(glib) +#endef + +define Package/qt4-qt3support + $(call Package/qt4/Default) + TITLE+=(qt3support) + DEPENDS+=+qt4-gui +qt4-xml +endef + +define Package/qt4-declarative + $(call Package/qt4/Default) + TITLE+=(declarative) + DEPENDS+=+qt4-script +qt4-xml +qt4-gui +qt4-network +endef + +define Package/qt4-xml + $(call Package/qt4/Default) + TITLE+=(xml) +endef + +### +define Package/qt4-drivers-mouse/Default + $(call Package/qt4/Default) + TITLE+=mousedrivers + DEPENDS+=@QT4_WS_QWS +endef + +define Package/qt4-drivers-mouse-tpmousedriver + $(call Package/qt4-drivers-mouse/Default) + TITLE+=tpmousedriver +endef + +define Package/qt4-drivers-mouse-pcmousedriver + $(call Package/qt4-drivers-mouse/Default) + TITLE+=pcmousedriver +endef + +define Package/qt4-drivers-mouse-tslibmousedriver + $(call Package/qt4-drivers-mouse/Default) + TITLE+=tslibmousedriver + DEPENDS+=+tslib +endef + +### +define Package/qt4-drivers-gfx/Default + $(call Package/qt4/Default) + TITLE+=gfxdrivers + DEPENDS+=@QT4_WS_QWS +endef + +define Package/qt4-drivers-gfx-directfb + $(call Package/qt4-drivers-gfx/Default) + TITLE+=directfb + DEPENDS+=@FEATURE_drawing-backend_DirectFB +FEATURE_drawing-backend_DirectFB:directfb +endef + +define Package/qt4-drivers-gfx-linuxfb + $(call Package/qt4-drivers-gfx/Default) + TITLE+=linuxfb +endef + +define Package/qt4-drivers-gfx-vnc + $(call Package/qt4-drivers-gfx/Default) + TITLE+=VNC +endef + +### +define Package/qt4-drivers-kbd/Default + $(call Package/qt4/Default) + TITLE+=kbddrivers + DEPENDS+=@QT4_WS_QWS +endef + + +TARGET_INCDIRS+=$(STAGING_DIR)/include $(STAGING_DIR)/usr/include $(TOOLCHAIN_DIR)/include $(TOOLCHAIN_DIR)/usr/include +TARGET_LIBDIRS+=$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib $(TOOLCHAIN_DIR)/lib $(TOOLCHAIN_DIR)/usr/lib +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib,-rpath-link=$(PKG_BUILD_DIR)/lib +TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/freetype2 -I$(PKG_BUILD_DIR)/include + +ifeq ($(CONFIG_QT4_WS_QWS),y) + FILEPFX:=qws- +endif +ifeq ($(CONFIG_QT4_WS_X11),y) + FILEPFX:=x11- +endif +ifeq ($(CONFIG_PACKAGE_qt4-gui),) + # If GUI is disabled, we use the X11 prefix. That's good enough, for now. + # The X11 files also work for non-GUI. + FILEPFX:=x11- +endif + +define Build/Configure + # NOTES: + # demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt + # linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb + # do not use fontconfig as it doesn't work anyway for qte + # bindir: bindir is where the host tools (qmake, moc, rcc, uic) will get installed into - they are just used on the host and not goig to be packaged + mkdir -p $(PKG_BUILD_DIR)/mkspecs/$(QMAKE_PLATFORM_PREFIX)linux-openwrt-g++ + $(CP) ./files/$(FILEPFX)qmake.conf $(PKG_BUILD_DIR)/mkspecs/$(QMAKE_PLATFORM_PREFIX)linux-openwrt-g++/qmake.conf + $(CP) ./files/$(FILEPFX)qplatformdefs.h $(PKG_BUILD_DIR)/mkspecs/$(QMAKE_PLATFORM_PREFIX)linux-openwrt-g++/qplatformdefs.h + ( cd $(PKG_BUILD_DIR) ; \ + TARGET_CC="$(TARGET_CROSS)gcc" \ + TARGET_CXX="$(TARGET_CROSS)g++" \ + TARGET_AR="$(TARGET_CROSS)ar cqs" \ + TARGET_OBJCOPY="$(TARGET_CROSS)objcopy" \ + TARGET_RANLIB="$(TARGET_CROSS)ranlib" \ + TARGET_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \ + TARGET_INCDIRS="$(TARGET_INCDIRS)" \ + TARGET_LIBDIRS="$(TARGET_LIBDIRS)" \ + STAGING_DIR="$(STAGING_DIR)" \ + STAGING_DIR_HOST="$(STAGING_DIR)/../host" \ + ./configure \ + -arch $(ARCH) \ + -prefix $(CONFIGURE_PREFIX) \ + -bindir $(CONFIGURE_PREFIX)/bin \ + -libdir $(CONFIGURE_PREFIX)/lib \ + -datadir $(CONFIGURE_PREFIX)/share/Qt \ + -plugindir $(CONFIGURE_PREFIX)/lib/Qt/plugins \ + -demosdir $(CONFIGURE_PREFIX)/share/Qt/demos \ + -examplesdir $(CONFIGURE_PREFIX)/share/Qt/examples \ + -sysconfdir /etc/Qt \ + -no-rpath \ + -force-pkg-config \ + -nomake tools \ + $(if $(CONFIG_PACKAGE_qt4-demos),-make,-nomake) demos \ + $(if $(CONFIG_PACKAGE_qt4-examples),-make,-nomake) examples \ + -nomake docs \ + -nomake translations \ + -xplatform $(QMAKE_PLATFORM_PREFIX)linux-openwrt-g++ \ + -platform linux-g++ \ + $(if $(CONFIG_QT4_WS_X11),-x11,-embedded) \ + -release \ + -confirm-license \ + -opensource \ + -no-mmx \ + -no-3dnow \ + -no-sse \ + -no-sse2 \ + -system-zlib \ + -system-libtiff \ + -system-libpng \ + -system-libjpeg \ + -system-freetype \ + -system-sqlite \ + $(if $(CONFIG_PACKAGE_qt4-sqlite),-plugin-sql-sqlite) \ + $(if $(CONFIG_PACKAGE_qt4-mysql),-plugin-sql-mysql) \ + -no-decoration-styled \ + -no-decoration-windows \ + -no-decoration-default \ + -verbose \ + -no-multimedia \ + -no-audio-backend \ + $(if $(CONFIG_PACKAGE_qt4-phonon),-phonon,-no-phonon) \ + -no-phonon-backend \ + $(if $(CONFIG_PACKAGE_qt4-svg),-svg,-no-svg) \ + $(if $(CONFIG_PACKAGE_qt4-webkit),-webkit,-no-webkit) \ + -no-javascript-jit \ + $(if $(CONFIG_PACKAGE_qt4-script),-script,-no-script) \ + $(if $(CONFIG_PACKAGE_qt4-scripttools),-scripttools,-no-scripttools) \ + -no-accessibility \ + $(if $(CONFIG_PACKAGE_qt4-declarative),-declarative,-no-declarative) \ + $(if $(CONFIG_PACKAGE_qt4-openssl),-openssl -I $(STAGING_DIR)/usr/include,-no-openssl) \ + -no-nis \ + -no-cups \ + -iconv \ + $(if $(CONFIG_PACKAGE_qt4-dbus),-dbus,-no-dbus) \ + -no-gtkstyle \ + -no-nas-sound \ + -no-opengl \ + -no-openvg \ + -no-sm \ + -no-xshape \ + $(if $(CONFIG_QT4_WS_X11),-no-xsync,-xsync) \ + -no-xinerama \ + $(if $(CONFIG_QT4_WS_X11),-no-xcursor,-xcursor) \ + -no-xfixes \ + -no-xrandr \ + -no-xrender \ + -no-mitshm \ + $(if $(CONFIG_QT4_WS_X11),-no-fontconfig,-fontconfig) \ + $(if $(CONFIG_QT4_WS_X11),-no-xinput,-xinput) \ + $(if $(CONFIG_QT4_WS_X11),-no-xkb,-xkb) \ + -no-glib \ + $(if $(CONFIG_PACKAGE_qt4-qt3support),-qt3support,-no-qt3support) \ + -no-gfx-transformed \ + -no-gfx-qvfb \ + $(if $(CONFIG_PACKAGE_qt4-drivers-gfx-vnc),-plugin-gfx-vnc,-no-gfx-vnc) \ + -no-gfx-multiscreen \ + -no-gfx-qnx \ + $(if $(CONFIG_PACKAGE_directfb),-plugin-gfx-directfb) \ + -plugin-gfx-linuxfb \ + -no-mouse-qvfb \ + -no-mouse-qnx \ + -qt-mouse-linuxinput \ + -plugin-mouse-linuxtp \ + -plugin-mouse-pc \ + -plugin-mouse-tslib \ + -no-kbd-qvfb \ + -no-kbd-qnx \ + -qt-kbd-tty \ + -qt-kbd-linuxinput \ + ) +endef + +define Build/Compile + # just passing results in not building 3rdparty/webkit/JavaScriptCore + # unfortunately in this particular case, makes further calls, therewith + # uses the qmake.conf which needs get the cross-compiling vars passed once again + TARGET_CC="$(TARGET_CROSS)gcc" \ + TARGET_CXX="$(TARGET_CROSS)g++" \ + TARGET_AR="$(TARGET_CROSS)ar cqs" \ + TARGET_OBJCOPY="$(TARGET_CROSS)objcopy" \ + TARGET_RANLIB="$(TARGET_CROSS)ranlib" \ + TARGET_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \ + TARGET_INCDIRS="$(TARGET_INCDIRS)" \ + TARGET_LIBDIRS="$(TARGET_LIBDIRS)" \ + STAGING_DIR="$(STAGING_DIR)" \ + STAGING_DIR_HOST="$(STAGING_DIR)/../host" \ + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) + INSTALL_ROOT=$(PKG_INSTALL_DIR) \ + $(MAKE) -C $(PKG_BUILD_DIR) install +endef + +define Build/InstallDev + $(INSTALL_DIR) \ + $(STAGING_DIR_HOST)/bin + + # host tools (qmake, moc, rcc, uic) + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/{qmake,moc,rcc,uic} \ + $(STAGING_DIR_HOST)/bin/ + + $(INSTALL_DIR) \ + $(1)/mk \ + $(1)/usr/share/mkspecs \ + $(1)/usr/lib/pkgconfig \ + $(1)/usr/lib \ + $(1)/usr/include \ + $(1)/usr/lib/Qt/plugins + + $(CP) \ + ./files/qmake.mk \ + $(1)/mk/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/share/Qt/mkspecs/* \ + $(1)/usr/share/mkspecs/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/* \ + $(1)/usr/include/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ + + #$(CP) \ + # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \ + # $(1)/usr/lib/Qt/plugins/ +endef + +define Package/qt4/install + $(INSTALL_DIR) \ + $(1)/usr/lib \ + $(1)/usr/lib/Qt/plugins + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libQtCore.so* \ + $(1)/usr/lib/ + + #$(CP) \ + # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \ + # $(1)/usr/lib/Qt/plugins/codecs/ +endef + +define Package/qt4-gui/install + $(INSTALL_DIR) \ + $(1)/usr/lib \ + $(1)/usr/lib/Qt/plugins + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libQtGui.so* \ + $(1)/usr/lib/ + + #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default + ln -s \ + /usr/share/fonts/ttf-dejavu \ + $(1)/usr/lib/fonts + + # we use the dejavue font package instead + #$(INSTALL_DATA) \ + # $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \ + # $(1)/usr/lib/fonts/ + + #$(CP) \ + # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \ + # $(1)/usr/lib/Qt/plugins/ + + #$(CP) \ + # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \ + # $(1)/usr/lib/Qt/plugins/ + + #$(CP) \ + # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \ + # $(1)/usr/lib/Qt/plugins/ +endef + +define Package/qt4-demos/install + $(INSTALL_DIR) \ + $(1)/usr/share/Qt + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/share/Qt/demos \ + $(1)/usr/share/Qt/ + + $(FIND) \ + $(1) \ + -name "*.cpp" -o \ + -name "*.h" -o \ + -name "*.pro" \ + | $(XARGS) rm +endef + +define Package/qt4-examples/install + $(INSTALL_DIR) \ + $(1)/usr/share/Qt + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/share/Qt/examples \ + $(1)/usr/share/Qt/ + + $(FIND) \ + $(1) \ + -name "*.cpp" -o \ + -name "*.h" -o \ + -name "*.pro" \ + | $(XARGS) rm +endef + +define Package/qt4-network/install + $(INSTALL_DIR) \ + $(1)/usr/lib + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libQtNetwork.so* \ + $(1)/usr/lib/ +endef + +define Package/qt4-sqlite/install + $(INSTALL_DIR) \ + $(1)/usr/lib/Qt/plugins/sqldrivers + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libQtSql.so* \ + $(1)/usr/lib/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/sqldrivers/libqsqlite.so \ + $(1)/usr/lib/Qt/plugins/sqldrivers/ +endef + +define Package/qt4-mysql/install + $(INSTALL_DIR) \ + $(1)/usr/lib/Qt/plugins/sqldrivers + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libQtSql.so* \ + $(1)/usr/lib/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/sqldrivers/libqsqlmysql.so \ + $(1)/usr/lib/Qt/plugins/sqldrivers/ +endef + +#define Package/qt4-multimedia/install +# $(INSTALL_DIR) \ +# $(1)/usr/bin +# +# $(CP) \ +# $(PKG_INSTALL_DIR)/usr/bin/examples/* \ +# $(1)/usr/bin/ +#endef + +define Package/qt4-phonon/install + $(INSTALL_DIR) \ + $(1)/usr/lib + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libphonon.so* \ + $(1)/usr/lib/ +endef + +define Package/qt4-svg/install + $(INSTALL_DIR) \ + $(1)/usr/lib \ + $(1)/usr/lib/Qt/plugins + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libQtSvg.so* \ + $(1)/usr/lib/ + + #$(CP) \ + # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \ + # $(1)/usr/lib/Qt/plugins/ + + #$(CP) \ + # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \ + # $(1)/usr/lib/Qt/plugins/ +endef + +define Package/qt4-webkit/install + $(INSTALL_DIR) \ + $(1)/usr/lib \ + $(1)/usr/lib/Qt/plugins + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libQtWebKit.so* \ + $(1)/usr/lib/ + + #$(CP) \ + # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \ + # $(1)/usr/lib/Qt/plugins/ +endef + +define Package/qt4-script/install + $(INSTALL_DIR) \ + $(1)/usr/lib \ + $(1)/usr/lib/Qt/plugins + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libQtScript.so* \ + $(1)/usr/lib/ + + #$(CP) \ + # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \ + # $(1)/usr/lib/Qt/plugins/ +endef + +define Package/qt4-scripttools/install + $(INSTALL_DIR) \ + $(1)/usr/lib + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libQtScriptTools.so* \ + $(1)/usr/lib/ +endef + +define Package/qt4-dbus/install + $(INSTALL_DIR) \ + $(1)/usr/lib + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libQtDBus.so* \ + $(1)/usr/lib/ + + #$(CP) \ + # $(PKG_INSTALL_DIR)/usr/bin/qdbus \ + # $(1)/usr/bin/ +endef + +define Package/qt4-qt3-support/install + $(INSTALL_DIR) \ + $(1)/usr/lib \ + $(1)/usr/lib/Qt/plugins + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libQt3Support.so* \ + $(1)/usr/lib/ + + #$(CP) \ + # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \ + # $(1)/usr/lib/Qt/plugins/ +endef + +define Package/qt4-declarative/install + $(INSTALL_DIR) \ + $(1)/usr/lib + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libQtDeclarative.so* \ + $(1)/usr/lib/ +endef + +define Package/qt4-xml/install + $(INSTALL_DIR) \ + $(1)/usr/lib + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libQtXml.so* \ + $(1)/usr/lib/ +endef + +# plugins +# mouse drivers +define Package/qt4-drivers-mouse-tpmousedriver/install + $(INSTALL_DIR) \ + $(1)/usr/lib/Qt/plugins/mousedrivers + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/mousedrivers/libqlinuxtpmousedriver.so \ + $(1)/usr/lib/Qt/plugins/mousedrivers/ +endef + +define Package/qt4-drivers-mouse-pcmousedriver/install + $(INSTALL_DIR) \ + $(1)/usr/lib/Qt/plugins/mousedrivers + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/mousedrivers/libqpcmousedriver.so \ + $(1)/usr/lib/Qt/plugins/mousedrivers/ +endef + +define Package/qt4-drivers-mouse-tslibmousedriver/install + $(INSTALL_DIR) \ + $(1)/usr/lib/Qt/plugins/mousedrivers + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/mousedrivers/libqtslibmousedriver.so \ + $(1)/usr/lib/Qt/plugins/mousedrivers/ +endef + +# graphics drivers +define Package/qt4-drivers-gfx-directfb/install + $(INSTALL_DIR) \ + $(1)/usr/lib/Qt/plugins/gfxdrivers + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/gfxdrivers/libqdirectfbscreen.so \ + $(1)/usr/lib/Qt/plugins/gfxdrivers/ +endef + +define Package/qt4-drivers-gfx-linuxfb/install + $(INSTALL_DIR) \ + $(1)/usr/lib/Qt/plugins/gfxdrivers + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/gfxdrivers/libqscreenlinuxfb.so \ + $(1)/usr/lib/Qt/plugins/gfxdrivers/ +endef + +define Package/qt4-drivers-gfx-vnc/install + $(INSTALL_DIR) \ + $(1)/usr/lib/Qt/plugins/gfxdrivers + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/gfxdrivers/libqgfxvnc.so \ + $(1)/usr/lib/Qt/plugins/gfxdrivers/ +endef + +# keyboard drivers + + + +$(eval $(call BuildPackage,qt4)) +$(eval $(call BuildPackage,qt4-gui)) +$(eval $(call BuildPackage,qt4-demos)) +$(eval $(call BuildPackage,qt4-examples)) +$(eval $(call BuildPackage,qt4-network)) +$(eval $(call BuildPackage,qt4-sqlite)) +$(eval $(call BuildPackage,qt4-mysql)) +$(eval $(call BuildPackage,qt4-openssl)) +#$(eval $(call BuildPackage,qt4-multimedia)) +#$(eval $(call BuildPackage,qt4-audio-backend)) +$(eval $(call BuildPackage,qt4-phonon)) +#$(eval $(call BuildPackage,qt4-phonon-backend)) +$(eval $(call BuildPackage,qt4-svg)) +$(eval $(call BuildPackage,qt4-webkit)) +$(eval $(call BuildPackage,qt4-script)) +$(eval $(call BuildPackage,qt4-scripttools)) +#$(eval $(call BuildPackage,qt4-accessibility)) +#$(eval $(call BuildPackage,qt4-javascript-jit)) +#$(eval $(call BuildPackage,qt4-cups)) +$(eval $(call BuildPackage,qt4-dbus)) +#$(eval $(call BuildPackage,qt4-gtkstyle)) +#$(eval $(call BuildPackage,qt4-glib)) +$(eval $(call BuildPackage,qt4-qt3support)) +$(eval $(call BuildPackage,qt4-declarative)) +$(eval $(call BuildPackage,qt4-xml)) + +$(eval $(call BuildPackage,qt4-drivers-mouse-tpmousedriver)) +$(eval $(call BuildPackage,qt4-drivers-mouse-pcmousedriver)) +$(eval $(call BuildPackage,qt4-drivers-mouse-tslibmousedriver)) + +$(eval $(call BuildPackage,qt4-drivers-gfx-directfb)) +$(eval $(call BuildPackage,qt4-drivers-gfx-linuxfb)) +$(eval $(call BuildPackage,qt4-drivers-gfx-vnc)) diff --git a/Xorg/lib/qt4/files/qmake.mk b/Xorg/lib/qt4/files/qmake.mk new file mode 100644 index 0000000..3415008 --- /dev/null +++ b/Xorg/lib/qt4/files/qmake.mk @@ -0,0 +1,60 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +QMAKE_PLATFORM_PREFIX:=$(if $(CONFIG_QT4_WS_QWS),qws/) +QMAKE_SPECFILE:=$(STAGING_DIR)/usr/share/mkspecs/$(QMAKE_PLATFORM_PREFIX)linux-openwrt-g++ + +TARGET_INCDIRS +=\ + $(TOOLCHAIN_DIR)/include \ + $(STAGING_DIR)/include \ + $(TOOLCHAIN_DIR)/usr/include \ + $(STAGING_DIR)/usr/include + +TARGET_LIBDIRS += \ + $(TOOLCHAIN_DIR)/lib \ + $(STAGING_DIR)/lib \ + $(TOOLCHAIN_DIR)/usr/lib \ + $(STAGING_DIR)/usr/lib + +define Build/Configure/Qmake + TARGET_CC="$(TARGET_CROSS)gcc" \ + TARGET_CXX="$(TARGET_CROSS)g++" \ + TARGET_AR="$(TARGET_CROSS)ar cqs" \ + TARGET_OBJCOPY="$(TARGET_CROSS)objcopy" \ + TARGET_RANLIB="$(TARGET_CROSS)ranlib" \ + TARGET_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \ + TARGET_INCDIRS="$(TARGET_INCDIRS)" \ + TARGET_LIBDIRS="$(TARGET_LIBDIRS)" \ + TARGET_LIBS="$(TARGET_LIBS)" \ + STAGING_DIR_HOST="$(STAGING_DIR)/../host" \ + STAGING_DIR="$(STAGING_DIR)" \ + qmake \ + -spec $(QMAKE_SPECFILE) \ + -o $(PKG_BUILD_DIR)/$(2)/Makefile \ + $(PKG_BUILD_DIR)/$(2)/$(1).pro +endef + +# we need to pass everything to $(MAKE) as well, as Makefiles may invoke qmake once again for creating further Makefiles +define Build/Compile/Default + TARGET_CC="$(TARGET_CROSS)gcc" \ + TARGET_CXX="$(TARGET_CROSS)g++" \ + TARGET_AR="$(TARGET_CROSS)ar cqs" \ + TARGET_OBJCOPY="$(TARGET_CROSS)objcopy" \ + TARGET_RANLIB="$(TARGET_CROSS)ranlib" \ + TARGET_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \ + TARGET_INCDIRS="$(TARGET_INCDIRS)" \ + TARGET_LIBDIRS="$(TARGET_LIBDIRS)" \ + TARGET_LIBS="$(TARGET_LIBS)" \ + STAGING_DIR_HOST="$(STAGING_DIR)/../host" \ + STAGING_DIR="$(STAGING_DIR)" \ + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \ + $(1); +endef diff --git a/Xorg/lib/qt4/files/qws-qmake.conf b/Xorg/lib/qt4/files/qws-qmake.conf new file mode 100644 index 0000000..5e317dc --- /dev/null +++ b/Xorg/lib/qt4/files/qws-qmake.conf @@ -0,0 +1,45 @@ +include(../../common/g++.conf) +include(../../common/linux.conf) +include(../../common/qws.conf) + +# QMAKE_{INC,LIB}DIR_QT needs to be overridden, +# as they're set to $$[QT_INSTALL_{HEADERS,LIBS}] by default +# which are compiled into the qmake binary statically +QMAKE_INCDIR_QT = $$(TARGET_INCDIRS) +QMAKE_LIBDIR_QT = $$(TARGET_LIBDIRS) +QMAKE_INCDIR = $$(TARGET_INCDIRS) +QMAKE_LIBDIR = $$(TARGET_LIBDIRS) +QMAKE_MOC = $$(STAGING_DIR_HOST)/bin/moc +QMAKE_UIC = $$(STAGING_DIR_HOST)/bin/uic +QMAKE_RCC = $$(STAGING_DIR_HOST)/bin/rcc +QMAKE_CC = $$(TARGET_CC) +QMAKE_CXX = $$(TARGET_CXX) +QMAKE_AR = $$(TARGET_AR) +QMAKE_OBJCOPY = $$(TARGET_OBJCOPY) +QMAKE_RANLIB = $$(TARGET_RANLIB) +QMAKE_CFLAGS = $$(TARGET_CFLAGS) +QMAKE_CXXFLAGS = $$(TARGET_CFLAGS) +QMAKE_LINK = $$(TARGET_CXX) +QMAKE_LINK_C = $$(TARGET_CC) +QMAKE_LIBS = $$(TARGET_LIBS) +QMAKE_LFLAGS = $$(TARGET_LDFLAGS) # this will end up in redundant "-L"-strings, as they're already in $QMAKE_LIBDIR_QT, however TARGET_LDFLAGS may contain not only directories but special linker options + +#unset vars which would intefere with vars/flags passed over by OpenWrt +QMAKE_STRIP = # do not strip +QMAKE_STRIPFLAGS_LIB = # do not strip +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = +QMAKE_CFLAGS_RELEASE = +QMAKE_CFLAGS_DEBUG = +QMAKE_CFLAGS_PRECOMPILE = +QMAKE_CFLAGS_USE_PRECOMPILE = +QMAKE_CXXFLAGS_WARN_ON = +QMAKE_CXXFLAGS_WARN_OFF = +QMAKE_CXXFLAGS_RELEASE = +QMAKE_CXXFLAGS_DEBUG = +QMAKE_CXXFLAGS_PRECOMPILE = +QMAKE_CXXFLAGS_USE_PRECOMPILE = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_NOUNDEF = + +load(qt_config) diff --git a/Xorg/lib/qt4/files/qws-qplatformdefs.h b/Xorg/lib/qt4/files/qws-qplatformdefs.h new file mode 100644 index 0000000..99e9a27 --- /dev/null +++ b/Xorg/lib/qt4/files/qws-qplatformdefs.h @@ -0,0 +1 @@ +#include "../../linux-g++/qplatformdefs.h" diff --git a/Xorg/lib/qt4/files/x11-qmake.conf b/Xorg/lib/qt4/files/x11-qmake.conf new file mode 100644 index 0000000..b5a49c5 --- /dev/null +++ b/Xorg/lib/qt4/files/x11-qmake.conf @@ -0,0 +1,50 @@ +MAKEFILE_GENERATOR = UNIX +TARGET_PLATFORM = unix +CONFIG += qt warn_on release incremental link_prl +QT += core gui +QMAKE_INCREMENTAL_STYLE = sublib + +include(../common/g++.conf) +include(../common/linux.conf) + +# QMAKE_{INC,LIB}DIR_QT needs to be overridden, +# as they're set to $$[QT_INSTALL_{HEADERS,LIBS}] by default +# which are compiled into the qmake binary statically +QMAKE_INCDIR_QT = $$(TARGET_INCDIRS) +QMAKE_LIBDIR_QT = $$(TARGET_LIBDIRS) +QMAKE_INCDIR = $$(TARGET_INCDIRS) +QMAKE_LIBDIR = $$(TARGET_LIBDIRS) +QMAKE_MOC = $$(STAGING_DIR_HOST)/bin/moc +QMAKE_UIC = $$(STAGING_DIR_HOST)/bin/uic +QMAKE_RCC = $$(STAGING_DIR_HOST)/bin/rcc +QMAKE_CC = $$(TARGET_CC) +QMAKE_CXX = $$(TARGET_CXX) +QMAKE_AR = $$(TARGET_AR) +QMAKE_OBJCOPY = $$(TARGET_OBJCOPY) +QMAKE_RANLIB = $$(TARGET_RANLIB) +QMAKE_CFLAGS = $$(TARGET_CFLAGS) +QMAKE_CXXFLAGS = $$(TARGET_CFLAGS) +QMAKE_LINK = $$(TARGET_CXX) +QMAKE_LINK_C = $$(TARGET_CC) +QMAKE_LIBS = $$(TARGET_LIBS) +QMAKE_LFLAGS = $$(TARGET_LDFLAGS) # this will end up in redundant "-L"-strings, as they're already in $QMAKE_LIBDIR_QT, however TARGET_LDFLAGS may contain not only directories but special linker options + +#unset vars which would intefere with vars/flags passed over by OpenWrt +QMAKE_STRIP = # do not strip +QMAKE_STRIPFLAGS_LIB = # do not strip +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = +QMAKE_CFLAGS_RELEASE = +QMAKE_CFLAGS_DEBUG = +QMAKE_CFLAGS_PRECOMPILE = +QMAKE_CFLAGS_USE_PRECOMPILE = +QMAKE_CXXFLAGS_WARN_ON = +QMAKE_CXXFLAGS_WARN_OFF = +QMAKE_CXXFLAGS_RELEASE = +QMAKE_CXXFLAGS_DEBUG = +QMAKE_CXXFLAGS_PRECOMPILE = +QMAKE_CXXFLAGS_USE_PRECOMPILE = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_NOUNDEF = + +load(qt_config) diff --git a/Xorg/lib/qt4/files/x11-qplatformdefs.h b/Xorg/lib/qt4/files/x11-qplatformdefs.h new file mode 100644 index 0000000..5d22fb4 --- /dev/null +++ b/Xorg/lib/qt4/files/x11-qplatformdefs.h @@ -0,0 +1 @@ +#include "../linux-g++/qplatformdefs.h" diff --git a/Xorg/lib/qt4/patches/100-do_not_use_res.defdname.patch b/Xorg/lib/qt4/patches/100-do_not_use_res.defdname.patch new file mode 100644 index 0000000..0b2d0ef --- /dev/null +++ b/Xorg/lib/qt4/patches/100-do_not_use_res.defdname.patch @@ -0,0 +1,35 @@ +--- qt-everywhere-opensource-src-4.7.0-beta1/src/network/kernel/qhostinfo_unix.cpp 2010-05-04 02:43:25.000000000 +0200 ++++ qt-everywhere-opensource-src-4.7.0-beta1/src/network/kernel/qhostinfo_unix.cpp.new 2010-06-20 14:43:48.565315801 +0200 +@@ -326,7 +326,7 @@ + + QString QHostInfo::localDomainName() + { +-#if !defined(Q_OS_VXWORKS) ++#if 0 + resolveLibrary(); + if (local_res_ninit) { + // using thread-safe version +--- qt-everywhere-opensource-src-4.7.0-beta1/src/qt3support/network/q3dns.cpp 2010-05-04 02:43:25.000000000 +0200 ++++ qt-everywhere-opensource-src-4.7.0-beta1/src/qt3support/network/q3dns.cpp.new 2010-06-20 14:43:48.565315801 +0200 +@@ -2499,8 +2499,8 @@ + break; + } + # endif +- if ( *res.defdname ) +- theDomains->append( QString::fromLatin1( res.defdname ).lower().local8Bit() ); ++// if ( *res.defdname ) ++// theDomains->append( QString::fromLatin1( res.defdname ).lower().local8Bit() ); + #else + res_init(); + int i; +@@ -2515,8 +2515,8 @@ + break; + } + # endif +- if ( *_res.defdname ) +- theDomains->append( QString::fromLatin1( _res.defdname ).lower().local8Bit() ); ++// if ( *_res.defdname ) ++// theDomains->append( QString::fromLatin1( _res.defdname ).lower().local8Bit() ); + #endif + + // the code above adds "0.0.0.0" as a name server at the slightest diff --git a/Xorg/lib/qt4/patches/200-depend-on-decoration.patch b/Xorg/lib/qt4/patches/200-depend-on-decoration.patch new file mode 100644 index 0000000..8e37ca8 --- /dev/null +++ b/Xorg/lib/qt4/patches/200-depend-on-decoration.patch @@ -0,0 +1,15 @@ +--- qt/examples/qws/qws.pro 2010-02-11 16:55:17.000000000 +0100 ++++ qt/examples/qws/qws.pro.mod 2010-03-22 10:56:10.372868670 +0100 +@@ -1,7 +1,11 @@ + TEMPLATE = subdirs + # no /dev/fbX + !qnx:!vxworks:SUBDIRS = framebuffer +-SUBDIRS += mousecalibration simpledecoration ++SUBDIRS += mousecalibration ++ ++!isEmpty( decorations ) { ++ SUBDIRS += simpledecoration ++} + + # install + sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS README *.pro diff --git a/Xorg/lib/qt4/patches/300-compile-fixes.patch b/Xorg/lib/qt4/patches/300-compile-fixes.patch new file mode 100644 index 0000000..4282709 --- /dev/null +++ b/Xorg/lib/qt4/patches/300-compile-fixes.patch @@ -0,0 +1,14 @@ +--- + src/corelib/animation/qvariantanimation.h | 1 + + 1 file changed, 1 insertion(+) + +--- qt-everywhere-opensource-src-4.7.0-beta2.orig/src/corelib/animation/qvariantanimation.h ++++ qt-everywhere-opensource-src-4.7.0-beta2/src/corelib/animation/qvariantanimation.h +@@ -117,6 +117,7 @@ private: + }; + + template ++static inline __attribute__((__always_inline__)) + void qRegisterAnimationInterpolator(QVariant (*func)(const T &from, const T &to, qreal progress)) { + QVariantAnimation::registerInterpolator(reinterpret_cast(func), qMetaTypeId()); + } diff --git a/Xorg/lib/qt4/patches/400-do-not-pack-structs.patch b/Xorg/lib/qt4/patches/400-do-not-pack-structs.patch new file mode 100644 index 0000000..c94cd35 --- /dev/null +++ b/Xorg/lib/qt4/patches/400-do-not-pack-structs.patch @@ -0,0 +1,263 @@ +commit 57ad39ec62175eeea023ca802448ebb1605dca23 +Author: Andreas Kling +Date: Fri Nov 12 16:08:35 2010 +0100 + + Don't pack Harfbuzz structs, this causes unaligned access crashes. + + The memory-greediest structs have been reordered anyway, so the gain + from forcibly packing them is mostly negligible. + + Task-number: QTBUG-13395 + Reviewed-by: Thiago Macieira + +diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h b/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h +index 0d7c2c2..0d631b2 100644 +--- a/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h ++++ b/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h +@@ -32,10 +32,6 @@ + + HB_BEGIN_HEADER + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(push, 1) +-#endif +- + typedef struct HB_GlyphItemRec_ { + HB_UInt gindex; + HB_UInt properties; +@@ -93,10 +89,6 @@ hb_buffer_add_glyph( HB_Buffer buffer, + HB_UInt properties, + HB_UInt cluster ); + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(pop) +-#endif +- + HB_END_HEADER + + #endif /* HARFBUZZ_BUFFER_H */ +diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h +index 2a6d958..94e9b43 100644 +--- a/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h ++++ b/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h +@@ -33,11 +33,6 @@ + + HB_BEGIN_HEADER + +- +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(push, 1) +-#endif +- + /* Attachment related structures */ + + struct HB_AttachPoint_ +@@ -126,10 +121,6 @@ _HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( HB_GDEFHeader* gdef, + HB_Lookup* lo, + HB_UShort num_lookups ); + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(pop) +-#endif +- + HB_END_HEADER + + #endif /* HARFBUZZ_GDEF_PRIVATE_H */ +diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h +index f9a03dd..ccb6bf9 100644 +--- a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h ++++ b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h +@@ -31,10 +31,6 @@ + + HB_BEGIN_HEADER + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(push, 1) +-#endif +- + /* GDEF glyph properties. Note that HB_GDEF_COMPONENT has no corresponding + * flag in the LookupFlag field. */ + #define HB_GDEF_BASE_GLYPH 0x0002 +@@ -131,10 +127,6 @@ HB_Error HB_GDEF_Build_ClassDefinition( HB_GDEFHeader* gdef, + HB_UShort* glyph_array, + HB_UShort* class_array ); + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(pop) +-#endif +- + HB_END_HEADER + + #endif /* HARFBUZZ_GDEF_H */ +diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-global.h b/src/3rdparty/harfbuzz/src/harfbuzz-global.h +index bccd6a2..d4e6b46 100644 +--- a/src/3rdparty/harfbuzz/src/harfbuzz-global.h ++++ b/src/3rdparty/harfbuzz/src/harfbuzz-global.h +@@ -39,10 +39,6 @@ + #define HB_END_HEADER /* nothing */ + #endif + +-#if defined(__GNUC__) || defined(_MSC_VER) +-#define HB_USE_PACKED_STRUCTS +-#endif +- + HB_BEGIN_HEADER + + #ifndef FALSE +diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h +index 39f3159..63ba907 100644 +--- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h ++++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h +@@ -32,10 +32,6 @@ + + HB_BEGIN_HEADER + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(push, 1) +-#endif +- + /* shared tables */ + + #define VR_X_PLACEMENT_DEVICE 0 +@@ -720,10 +716,6 @@ HB_INTERNAL void + _HB_GPOS_Free_SubTable( HB_GPOS_SubTable* st, + HB_UShort lookup_type ); + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(pop) +-#endif +- + HB_END_HEADER + + #endif /* HARFBUZZ_GPOS_PRIVATE_H */ +diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h +index 7eb329e..df0c3f6 100644 +--- a/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h ++++ b/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h +@@ -32,10 +32,6 @@ + + HB_BEGIN_HEADER + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(push, 1) +-#endif +- + typedef union HB_GSUB_SubTable_ HB_GSUB_SubTable; + + /* LookupType 1 */ +@@ -474,10 +470,6 @@ HB_INTERNAL void + _HB_GSUB_Free_SubTable( HB_GSUB_SubTable* st, + HB_UShort lookup_type ); + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(pop) +-#endif +- + HB_END_HEADER + + #endif /* HARFBUZZ_GSUB_PRIVATE_H */ +diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h b/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h +index b00df44..6e452bd 100644 +--- a/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h ++++ b/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h +@@ -31,11 +31,6 @@ + + HB_BEGIN_HEADER + +- +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(push, 1) +-#endif +- + /* Lookup types for glyph substitution */ + + #define HB_GSUB_LOOKUP_SINGLE 1 +@@ -139,10 +134,6 @@ HB_Error HB_GSUB_Register_Alternate_Function( HB_GSUBHeader* gsub, + HB_Error HB_GSUB_Apply_String( HB_GSUBHeader* gsub, + HB_Buffer buffer ); + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(pop) +-#endif +- + HB_END_HEADER + + #endif /* HARFBUZZ_GSUB_H */ +diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-open.h b/src/3rdparty/harfbuzz/src/harfbuzz-open.h +index 4ba6cf5..9ad7c98 100644 +--- a/src/3rdparty/harfbuzz/src/harfbuzz-open.h ++++ b/src/3rdparty/harfbuzz/src/harfbuzz-open.h +@@ -30,10 +30,6 @@ + + HB_BEGIN_HEADER + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(push, 1) +-#endif +- + /* Use this if a feature applies to all glyphs */ + #define HB_ALL_GLYPHS 0xFFFF + +@@ -279,10 +275,6 @@ enum HB_Type_ + + typedef enum HB_Type_ HB_Type; + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(pop) +-#endif +- + HB_END_HEADER + + #endif /* HARFBUZZ_OPEN_H */ +diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h +index ab5c07a..470e27b 100644 +--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h ++++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h +@@ -34,10 +34,6 @@ + + HB_BEGIN_HEADER + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(push, 1) +-#endif +- + /* + using anything else than signed or unsigned for bitfields in C is non standard, + but accepted by almost all compilers. And it gives a significant reduction in +@@ -258,10 +254,6 @@ typedef struct HB_Font_ { + void *userData; + } HB_FontRec; + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(pop) +-#endif +- + typedef struct HB_ShaperItem_ HB_ShaperItem; + + struct HB_ShaperItem_ { +diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-stream.h b/src/3rdparty/harfbuzz/src/harfbuzz-stream.h +index a155cc2..cfbfb1c 100644 +--- a/src/3rdparty/harfbuzz/src/harfbuzz-stream.h ++++ b/src/3rdparty/harfbuzz/src/harfbuzz-stream.h +@@ -30,10 +30,6 @@ + + HB_BEGIN_HEADER + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(push, 1) +-#endif +- + typedef struct HB_StreamRec_ + { + HB_Byte* base; +@@ -42,10 +38,6 @@ typedef struct HB_StreamRec_ + HB_UInt pos; + } HB_StreamRec; + +-#ifdef HB_USE_PACKED_STRUCTS +-#pragma pack(pop) +-#endif +- + HB_END_HEADER + + #endif diff --git a/Xorg/lib/qt4/patches/500-allow-device-grabbing.patch b/Xorg/lib/qt4/patches/500-allow-device-grabbing.patch new file mode 100644 index 0000000..50d7aa0 --- /dev/null +++ b/Xorg/lib/qt4/patches/500-allow-device-grabbing.patch @@ -0,0 +1,58 @@ +--- qt-everywhere-opensource-src-4.7.0/src/gui/embedded/qkbdlinuxinput_qws.cpp 2010-09-10 11:05:24.000000000 +0200 ++++ qt-everywhere-opensource-src-4.7.0/src/gui/embedded/qkbdlinuxinput_qws.cpp.mod 2011-04-28 21:57:04.208449828 +0200 +@@ -103,6 +103,7 @@ + QString dev = QLatin1String("/dev/input/event1"); + int repeat_delay = -1; + int repeat_rate = -1; ++ int grab = 0; + + QStringList args = device.split(QLatin1Char(':')); + foreach (const QString &arg, args) { +@@ -110,12 +111,15 @@ + repeat_delay = arg.mid(13).toInt(); + else if (arg.startsWith(QLatin1String("repeat-rate="))) + repeat_rate = arg.mid(12).toInt(); ++ else if (arg.startsWith(QLatin1String("grab="))) ++ grab = arg.mid(5).toInt(); + else if (arg.startsWith(QLatin1String("/dev/"))) + dev = arg; + } + + m_fd = QT_OPEN(dev.toLocal8Bit().constData(), O_RDWR, 0); + if (m_fd >= 0) { ++ ::ioctl(m_fd, EVIOCGRAB, grab); + if (repeat_delay > 0 && repeat_rate > 0) { + int kbdrep[2] = { repeat_delay, repeat_rate }; + ::ioctl(m_fd, EVIOCSREP, kbdrep); +--- qt-everywhere-opensource-src-4.7.0/src/gui/embedded/qmouselinuxinput_qws.cpp 2010-09-10 11:05:24.000000000 +0200 ++++ qt-everywhere-opensource-src-4.7.0/src/gui/embedded/qmouselinuxinput_qws.cpp.mod 2011-04-28 21:57:13.358562410 +0200 +@@ -43,6 +43,7 @@ + + #include + #include ++#include + + #include + #include // overrides QT_OPEN +@@ -101,11 +102,19 @@ + setObjectName(QLatin1String("LinuxInputSubsystem Mouse Handler")); + + QString dev = QLatin1String("/dev/input/event0"); +- if (device.startsWith(QLatin1String("/dev/"))) +- dev = device; ++ int grab = 0; ++ ++ QStringList args = device.split(QLatin1Char(':')); ++ foreach (const QString &arg, args) { ++ if (arg.startsWith(QLatin1String("grab="))) ++ grab = arg.mid(5).toInt(); ++ else if (arg.startsWith(QLatin1String("/dev/"))) ++ dev = arg; ++ } + + m_fd = QT_OPEN(dev.toLocal8Bit().constData(), O_RDONLY | O_NDELAY, 0); + if (m_fd >= 0) { ++ ::ioctl(m_fd, EVIOCGRAB, grab); + m_notify = new QSocketNotifier(m_fd, QSocketNotifier::Read, this); + connect(m_notify, SIGNAL(activated(int)), this, SLOT(readMouseData())); + } else { diff --git a/Xorg/lib/template.mk b/Xorg/lib/template.mk new file mode 100644 index 0000000..e74a7e6 --- /dev/null +++ b/Xorg/lib/template.mk @@ -0,0 +1,47 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=@BASE_NAME@ +PKG_NAME:=@NAME@ +PKG_RELEASE:=2 +PKG_VERSION:=@VER@ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.4/src/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ + +include $(INCLUDE_DIR)/package.mk + +define Package/@NAME@ + SECTION:=xorg-lib + CATEGORY:=Xorg + SUBMENU:=lib + DEPENDS:=@DEP@ @DISPLAY_SUPPORT + TITLE:=@NAME@ + URL:=http://xorg.freedesktop.org/ +endef + +CONFIGURE_ARGS += --enable-malloc0returnsnull --without-xcb + +define Build/Compile + $(call $(PKG_NAME)/Compile) + make -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name *.la | xargs rm -rf +endef + +define Package/@NAME@/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Build/InstallDev + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +$(eval $(call BuildPackage,@NAME@)) diff --git a/Xorg/lib/tslib/Makefile b/Xorg/lib/tslib/Makefile new file mode 100644 index 0000000..6923182 --- /dev/null +++ b/Xorg/lib/tslib/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tslib +PKG_VERSION:=1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://download.berlios.de/tslib/ +PKG_MD5SUM:=92b2eb55b1e4ef7e2c0347069389390e + +PKG_INSTALL:=1 +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/tslib + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=Tslib is an abstraction layer for touchscreen panel events. + DEPENDS:=@!LINUX_2_4 + URL:=http://tslib.berlios.de/ +endef + +define Package/tslib/description + Tslib is an abstraction layer for touchscreen panel events, + as well as a filter stack for the manipulation of those events. + It was created by Russell King, of arm.linux.org.uk. + Examples of implemented filters include jitter smoothing and the calibration transform. +endef + +ifeq ($(CONFIG_TARGET_om_gta02),y) + TS_CALIBRATION:=pointercal_om_gta02 +endif + +define Build/Configure + (cd $(PKG_BUILD_DIR); ./autogen.sh ); + $(call Build/Configure/Default, --enable-malloc0returnsnull) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/tslib/install + $(INSTALL_DIR) $(1)/usr/lib/ts $(1)/usr/bin $(1)/etc + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ts/*.so* $(1)/usr/lib/ts/ + $(INSTALL_DATA) ./files/ts.conf $(1)/etc/ + $(if $(TS_CALIBRATION),$(CP) ./files/$(TS_CALIBRATION) $(1)/etc/pointercal ) +endef + +$(eval $(call BuildPackage,tslib)) diff --git a/Xorg/lib/tslib/files/pointercal_om_gta02 b/Xorg/lib/tslib/files/pointercal_om_gta02 new file mode 100644 index 0000000000000000000000000000000000000000..841ec7fab2e8e37afeb8c3afa1626a62d8fd1543 GIT binary patch literal 46 ucmV~$u>k-e3<5A`uiya(XrcQ5VcS<-WN1%w#i;F_+%Gw{#l?a0X literal 0 HcmV?d00001 diff --git a/Xorg/lib/tslib/files/ts.conf b/Xorg/lib/tslib/files/ts.conf new file mode 100644 index 0000000..82f712e --- /dev/null +++ b/Xorg/lib/tslib/files/ts.conf @@ -0,0 +1,25 @@ +# Uncomment if you wish to use the linux input layer event interface +module_raw input grab_events=1 + +# Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d +# module_raw collie + +# Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860 +# module_raw corgi + +# Uncomment if you're using a device with a UCB1200/1300/1400 TS interface +# module_raw ucb1x00 + +# Uncomment if you're using an HP iPaq h3600 or similar +# module_raw h3600 + +# Uncomment if you're using a Hitachi Webpad +# module_raw mk712 + +# Uncomment if you're using an IBM Arctic II +# module_raw arctic2 + +module pthres pmin=1 +module variance delta=30 +module dejitter delta=100 +module linear diff --git a/Xorg/lib/tslib/patches/devfs.patch b/Xorg/lib/tslib/patches/devfs.patch new file mode 100644 index 0000000..d7ef0a9 --- /dev/null +++ b/Xorg/lib/tslib/patches/devfs.patch @@ -0,0 +1,18 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- tslib/tests/fbutils.c~devfs.patch ++++ tslib/tests/fbutils.c +@@ -44,8 +44,8 @@ + static unsigned colormap [256]; + int xres, yres; + +-static char *defaultfbdevice = "/dev/fb0"; +-static char *defaultconsoledevice = "/dev/tty"; ++static char *defaultfbdevice = "/dev/fb/0"; ++static char *defaultconsoledevice = "/dev/vc/"; + static char *fbdevice = NULL; + static char *consoledevice = NULL; + diff --git a/Xorg/lib/tslib/patches/event1.patch b/Xorg/lib/tslib/patches/event1.patch new file mode 100644 index 0000000..88cc3f3 --- /dev/null +++ b/Xorg/lib/tslib/patches/event1.patch @@ -0,0 +1,80 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- tslib/tests/ts_calibrate.c~event1 ++++ tslib/tests/ts_calibrate.c +@@ -179,11 +179,7 @@ + if( (tsdevice = getenv("TSLIB_TSDEVICE")) != NULL ) { + ts = ts_open(tsdevice,0); + } else { +-#ifdef USE_INPUT_API +- ts = ts_open("/dev/input/event0", 0); +-#else +- ts = ts_open("/dev/touchscreen/ucb1x00", 0); +-#endif /* USE_INPUT_API */ ++ ts = ts_open("/dev/input/event1", 0); + } + + if (!ts) { +--- tslib/tests/ts_print.c~event1 ++++ tslib/tests/ts_print.c +@@ -28,11 +28,7 @@ + if( (tsdevice = getenv("TSLIB_TSDEVICE")) != NULL ) { + ts = ts_open(tsdevice,0); + } else { +-#ifdef USE_INPUT_API +- ts = ts_open("/dev/input/event0", 0); +-#else +- ts = ts_open("/dev/touchscreen/ucb1x00", 0); +-#endif /* USE_INPUT_API */ ++ ts = ts_open("/dev/input/event1", 0); + } + + if (!ts) { +--- tslib/tests/ts_test.c~event1 ++++ tslib/tests/ts_test.c +@@ -120,11 +120,7 @@ + signal(SIGTERM, sig); + + if ((tsdevice = getenv("TSLIB_TSDEVICE")) == NULL) { +-#ifdef USE_INPUT_API +- tsdevice = strdup ("/dev/input/event0"); +-#else +- tsdevice = strdup ("/dev/touchscreen/ucb1x00"); +-#endif /* USE_INPUT_API */ ++ tsdevice = strdup ("/dev/input/event1"); + } + + ts = ts_open (tsdevice, 0); +--- tslib/tests/ts_print_raw.c~event1 ++++ tslib/tests/ts_print_raw.c +@@ -28,11 +28,7 @@ + if( (tsdevice = getenv("TSLIB_TSDEVICE")) != NULL ) { + ts = ts_open(tsdevice,0); + } else { +-#ifdef USE_INPUT_API +- ts = ts_open("/dev/input/event0", 0); +-#else +- ts = ts_open("/dev/touchscreen/ucb1x00", 0); +-#endif /* USE_INPUT_API */ ++ ts = ts_open("/dev/input/event1", 0); + } + + if (!ts) { +--- tslib/tests/ts_harvest.c~event1 ++++ tslib/tests/ts_harvest.c +@@ -75,11 +75,7 @@ + signal(SIGTERM, sig); + + if ((tsdevice = getenv("TSLIB_TSDEVICE")) == NULL) { +-#ifdef USE_INPUT_API +- tsdevice = strdup ("/dev/input/event0"); +-#else +- tsdevice = strdup ("/dev/touchscreen/ucb1x00"); +-#endif /* USE_INPUT_API */ ++ tsdevice = strdup ("/dev/input/event1"); + } + + ts = ts_open (tsdevice, 0); diff --git a/Xorg/lib/tslib/patches/fix_version.patch b/Xorg/lib/tslib/patches/fix_version.patch new file mode 100644 index 0000000..d6a0ebd --- /dev/null +++ b/Xorg/lib/tslib/patches/fix_version.patch @@ -0,0 +1,32 @@ +--- + configure.ac | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +Index: tslib-1.0/configure.ac +=================================================================== +--- tslib-1.0.orig/configure.ac 2006-08-24 22:02:55.000000000 +0100 ++++ tslib-1.0/configure.ac 2007-07-09 21:04:38.000000000 +0100 +@@ -2,7 +2,7 @@ + # Process this file with autoconf to produce a configure script. + + AC_PREREQ(2.57) +-AC_INIT(tslib, 0.0.2, kergoth@handhelds.org) ++AC_INIT(tslib, 1.0.0, kergoth@handhelds.org) + # AC_CONFIG_AUX_DIR(config) + AM_INIT_AUTOMAKE(dist-bzip2) + AC_CONFIG_SRCDIR([src/ts_close.c]) +@@ -193,10 +193,10 @@ TS_CONF='${sysconfdir}/ts.conf' + AC_SUBST(TS_CONF) + + # Library versioning +-LT_RELEASE=0.0 +-LT_CURRENT=1 +-LT_REVISION=1 +-LT_AGE=1 ++LT_RELEASE=1.0 ++LT_CURRENT=0 ++LT_REVISION=0 ++LT_AGE=0 + AC_SUBST(LT_RELEASE) + AC_SUBST(LT_CURRENT) + AC_SUBST(LT_REVISION) diff --git a/Xorg/lib/tslib/patches/tslib-input_raw-grab_events.patch b/Xorg/lib/tslib/patches/tslib-input_raw-grab_events.patch new file mode 100644 index 0000000..4bd0a05 --- /dev/null +++ b/Xorg/lib/tslib/patches/tslib-input_raw-grab_events.patch @@ -0,0 +1,120 @@ +This patch adds support for "EVIOCGRAB" on the input device, which +tells the kernel _not_ to deliver events of the touchscreen to +/dev/input/mice. + +This is probably what most people want, since unprocessed raw touchscreen +events should not be converted to emulated PS/2 mouse movements. + +Signed-off-by: Harald Welte + +Index: a/plugins/input-raw.c +=================================================================== +--- a/plugins/input-raw.c (revision 49) ++++ b/plugins/input-raw.c (working copy) +@@ -18,6 +18,7 @@ + + #include + #include ++#include + + #include + #ifdef HAVE_UNISTD_H +@@ -33,6 +34,9 @@ + + #include "tslib-private.h" + ++#define GRAB_EVENTS_WANTED 1 ++#define GRAB_EVENTS_ACTIVE 2 ++ + struct tslib_input { + struct tslib_module_info module; + +@@ -42,6 +46,7 @@ + + int sane_fd; + int using_syn; ++ int grab_events; + }; + + static int check_fd(struct tslib_input *i) +@@ -64,6 +69,14 @@ + + if (bit & (1 << EV_SYN)) + i->using_syn = 1; ++ ++ if (i->grab_events == GRAB_EVENTS_WANTED) { ++ if (ioctl(ts->fd, EVIOCGRAB, (void *)1)) { ++ fprintf(stderr, "Unable to grab selected input device\n"); ++ return -1; ++ } ++ i->grab_events = GRAB_EVENTS_ACTIVE; ++ } + + return 0; + } +@@ -222,6 +235,15 @@ + + static int ts_input_fini(struct tslib_module_info *inf) + { ++ struct tslib_input *i = (struct tslib_input *)inf; ++ struct tsdev *ts = inf->dev; ++ ++ if (i->grab_events == GRAB_EVENTS_ACTIVE) { ++ if (ioctl(ts->fd, EVIOCGRAB, (void *)0)) { ++ fprintf(stderr, "Unable to un-grab selected input device\n"); ++ } ++ } ++ + free(inf); + return 0; + } +@@ -231,6 +253,36 @@ + .fini = ts_input_fini, + }; + ++static int parse_raw_grab(struct tslib_module_info *inf, char *str, void *data) ++{ ++ struct tslib_input *i = (struct tslib_input *)inf; ++ unsigned long v; ++ int err = errno; ++ ++ v = strtoul(str, NULL, 0); ++ ++ if (v == ULONG_MAX && errno == ERANGE) ++ return -1; ++ ++ errno = err; ++ switch ((int)data) { ++ case 1: ++ if (v) ++ i->grab_events = GRAB_EVENTS_WANTED; ++ break; ++ default: ++ return -1; ++ } ++ return 0; ++} ++ ++static const struct tslib_vars raw_vars[] = ++{ ++ { "grab_events", (void *)1, parse_raw_grab }, ++}; ++ ++#define NR_VARS (sizeof(raw_vars) / sizeof(raw_vars[0])) ++ + TSAPI struct tslib_module_info *mod_init(struct tsdev *dev, const char *params) + { + struct tslib_input *i; +@@ -245,5 +297,12 @@ + i->current_p = 0; + i->sane_fd = 0; + i->using_syn = 0; ++ i->grab_events = 0; ++ ++ if (tslib_parse_vars(&i->module, raw_vars, NR_VARS, params)) { ++ free(i); ++ return NULL; ++ } ++ + return &(i->module); + } diff --git a/Xorg/lib/vte/Makefile b/Xorg/lib/vte/Makefile new file mode 100644 index 0000000..dac0703 --- /dev/null +++ b/Xorg/lib/vte/Makefile @@ -0,0 +1,111 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vte +PKG_VERSION:=0.17.4 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/0.17 +PKG_MD5SUM:=ec6cb2668db7146eae7cfc48af98f3ed +PKG_FIXUP:=libtool + +PKG_BUILD_DEPENDS:=intltool/host + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +$(call include_mk, python-package.mk) + +PKG_INSTALL=1 + +EXTRA_CFLAGS+=-I$(INTL_PREFIX)/include + +EXTRA_LDFLAGS+= \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ + -L$(ICONV_PREFIX)/lib \ + -L$(INTL_PREFIX)/lib + +STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_vte CONFIG_PACKAGE_python-vte) + +define Package/vte + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=Virtual Terminal Widget + URL:=http://developer.gnome.org/arch/gnome/widgets/vte.html + DEPENDS:=+gtk2 +libncurses +libX11 +endef + +define Package/python-vte + SECTION:=lang-python + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Python bindings for vte + URL:=http://developer.gnome.org/arch/gnome/widgets/vte.html + DEPENDS:=+python-mini +PACKAGE_python-vte:python-gtk +vte +endef + +define Package/vte/description + VTE is a library (libvte) implementing a terminal emulator widget for GTK+, + and a minimal sample application (vte) using that. Vte is mainly used in + gnome-terminal, but can also be used to embed a console/terminal in games, + editors, IDEs, etc. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --without-xft2 \ + $(if $(CONFIG_PACKAGE_python-vte),--enable-python,--disable-python) \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/vte + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/vte/*.h \ + $(1)/usr/include/vte/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,la,a} \ + $(1)/usr/lib + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig +endef + +define Package/vte/install + $(INSTALL_DIR) $(1)/usr/share/vte/termcap + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/vte/termcap/* \ + $(1)/usr/share/vte/termcap + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib + + $(INSTALL_DIR) $(1)/usr/lib/vte + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/lib/vte/* \ + $(1)/usr/lib/vte +endef + +define Package/python-vte/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0 + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/*.so* \ + $(1)$(PYTHON_PKG_DIR)/gtk-2.0 +endef + +$(eval $(call BuildPackage,vte)) +$(eval $(call BuildPackage,python-vte)) + diff --git a/Xorg/lib/vte/patches/100-compile-fixes.patch b/Xorg/lib/vte/patches/100-compile-fixes.patch new file mode 100644 index 0000000..273aca0 --- /dev/null +++ b/Xorg/lib/vte/patches/100-compile-fixes.patch @@ -0,0 +1,13 @@ +Index: vte-0.17.4/termcaps/Makefile.am +=================================================================== +--- vte-0.17.4.orig/termcaps/Makefile.am 2011-01-27 18:14:40.165998453 +0100 ++++ vte-0.17.4/termcaps/Makefile.am 2011-01-27 18:14:51.964899492 +0100 +@@ -1,6 +1,6 @@ + EXTRA_DIST = xterm xterm.baseline + termcapdir = $(pkgdatadir)/termcap +-termcap_DATA = xterm $(VTE_DEFAULT_EMULATION) +-$(VTE_DEFAULT_EMULATION): xterm ++termcap_DATA = $(VTE_DEFAULT_EMULATION) ++$(VTE_DEFAULT_EMULATION): + sed -e s,^xterm:,$(VTE_DEFAULT_EMULATION):,g \ + -e s,^xterm\|,$(VTE_DEFAULT_EMULATION)\|,g $< > $@ diff --git a/Xorg/lib/wnck/Makefile b/Xorg/lib/wnck/Makefile new file mode 100644 index 0000000..975d0ad --- /dev/null +++ b/Xorg/lib/wnck/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libwnck +PKG_VERSION:=2.26.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.26/ +PKG_MD5SUM:=015b5d2e65d15448fa143513fce03541 +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +PKG_BUILD_DEPENDS:=intltool/host + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +TARGET_CFLAGS+=$(FPIC) +TARGET_LDFLAGS+= \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ + -Wl,-rpath=/usr/lib + +define Package/libwnck + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=Window Navigator Construction Kit + URL:=http://ftp.gnome.org/ + DEPENDS:=+libX11 +gtk2 +glib2 +libXext $(INTL_DEPENDS) +endef + +define Package/libwnck/description +Window Navigator Construction Kit +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/libwnck-1.0/libwnck/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libwnck-1.0/libwnck/* $(1)/usr/include/libwnck-1.0/libwnck/ + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ +endef + +define Package/libwnck/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libwnck)) diff --git a/Xorg/lib/wnck/patches/100-optional_gdk_pixbuf_csource.patch b/Xorg/lib/wnck/patches/100-optional_gdk_pixbuf_csource.patch new file mode 100644 index 0000000..9c19596 --- /dev/null +++ b/Xorg/lib/wnck/patches/100-optional_gdk_pixbuf_csource.patch @@ -0,0 +1,65 @@ +--- a/configure ++++ b/configure +@@ -26634,7 +26634,7 @@ + done + IFS=$as_save_IFS + +- test -z "$ac_cv_path_GDK_PIXBUF_CSOURCE" && ac_cv_path_GDK_PIXBUF_CSOURCE="no" ++ test -z "$ac_cv_path_GDK_PIXBUF_CSOURCE" && ac_cv_path_GDK_PIXBUF_CSOURCE="" + ;; + esac + fi +@@ -26649,14 +26649,6 @@ + + + +-if test x"$GDK_PIXBUF_CSOURCE" = xno; then +- { { $as_echo "$as_me:$LINENO: error: gdk-pixbuf-csource executable not found in your path - should be installed with GTK" >&5 +-$as_echo "$as_me: error: gdk-pixbuf-csource executable not found in your path - should be installed with GTK" >&2;} +- { (exit 1); exit 1; }; } +-fi +- +- +- + ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" + + ################################################## +--- a/configure.in ++++ b/configure.in +@@ -128,11 +128,7 @@ + GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` + AC_SUBST(GLIB_GENMARSHAL) + +-AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no) +- +-if test x"$GDK_PIXBUF_CSOURCE" = xno; then +- AC_MSG_ERROR([gdk-pixbuf-csource executable not found in your path - should be installed with GTK]) +-fi ++AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource) + + AC_SUBST(GDK_PIXBUF_CSOURCE) + +--- a/libwnck/Makefile.am ++++ b/libwnck/Makefile.am +@@ -163,7 +163,8 @@ + $(wnck_built_cfiles) + + inlinepixbufs.h: $(IMAGES) +- $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h ++ $(if $(GDK_PIXBUF_CSOURCE),$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h) ++ touch $@ + + $(OBJECTS): inlinepixbufs.h + +--- a/libwnck/Makefile.in ++++ b/libwnck/Makefile.in +@@ -826,7 +826,8 @@ + && rm -f new-wnck-enum-types.c + + inlinepixbufs.h: $(IMAGES) +- $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h ++ $(if $(GDK_PIXBUF_CSOURCE),$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h) ++ touch $@ + + $(OBJECTS): inlinepixbufs.h + # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/Xorg/lib/xcbproto/Makefile b/Xorg/lib/xcbproto/Makefile new file mode 100644 index 0000000..724e5b6 --- /dev/null +++ b/Xorg/lib/xcbproto/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xcb-proto +PKG_VERSION:=1.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://xcb.freedesktop.org/dist/ +PKG_MD5SUM:=d9275a714e83ab9c1f9b260c6eff1609 +PKG_INSTALL:=1 + +#PKG_BUILD_DEPENDS:=python-mini/host + +include $(INCLUDE_DIR)/package.mk +#$(call include_mk, python-package.mk) + +#STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,PACKAGE_python PACKAGE_python-mini) + +define Package/xcbproto + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + BUILDONLY:=1 + TITLE:=xcbproto + URL:=http://xcb.freedesktop.org/ +endef + +#define InstallPy +# $(INSTALL_DIR) $(1)/host/lib/$(PYTHON)/site-packages/xcbgen +# $(INSTALL_DATA) \ +# $(PKG_INSTALL_DIR)/usr/lib/$(PYTHON)/site-packages/xcbgen/*.py \ +# $(1)/host/lib/$(PYTHON)/site-packages/xcbgen/ +#endef + +define Build/InstallDev +# $(call InstallPy,$(1),$(2)) + $(INSTALL_DIR) \ + $(1)/usr/lib/pkgconfig \ + $(1)/host/share/xcb + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/xcb/* \ + $(1)/host/share/xcb/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + + $(SED) 's,datadir=/usr,datadir=$(STAGING_DIR)/host,g' $(1)/usr/lib/pkgconfig/xcb-proto.pc +endef + +$(eval $(call BuildPackage,xcbproto)) diff --git a/Xorg/lib/xine-lib/Makefile b/Xorg/lib/xine-lib/Makefile new file mode 100644 index 0000000..89e3714 --- /dev/null +++ b/Xorg/lib/xine-lib/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xine-lib +PKG_VERSION:=1.1.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/xine +PKG_MD5SUM:=b1f42602c776bb93e3cbf127e220cbfd + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +CONFIGURE_ARGS+=\ + --enable-static \ + --disable-vcd \ + --disable-imagemagick \ + --disable-flac + +XINE_LIB_FLAGS:=\ + LIBFLAC_CFLAGS="" \ + LIBFLAC_LIBS="" \ + X_CFLAGS="" \ + X_LIBS="" \ + XINE_ACFLAGS="" \ + CXXFLAGS="$(TARGET_CFLAGS)" + +CONFIGURE_VARS+=$(XINE_LIB_FLAGS) + +define Package/xine-lib + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=xine libraries + DEPENDS:=+libX11 +libXext +alsa-lib +zlib +libfreetype + URL:=http://www.xine-project.org/ +endef + +MAKE_FLAGS+=$(XINE_LIB_FLAGS) + +define Build/InstallDev + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ + $(SED) 's,-I$$$${prefix}/include,-I$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/xine-config + $(SED) 's,-L$$$${exec_prefix}/lib,-L$(STAGING_DIR)/usr/lib/,g' $(1)/usr/bin/xine-config + $(INSTALL_DIR) $(2)/bin + mv $(1)/usr/bin/xine-config $(2)/bin +endef + +define Package/xine-lib/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,xine-lib)) diff --git a/Xorg/lib/xine-lib/patches/100-compile_fix.patch b/Xorg/lib/xine-lib/patches/100-compile_fix.patch new file mode 100644 index 0000000..bbb6f0c --- /dev/null +++ b/Xorg/lib/xine-lib/patches/100-compile_fix.patch @@ -0,0 +1,13 @@ +Index: xine-lib-1.1.1/src/libw32dll/wine/Makefile.in +=================================================================== +--- xine-lib-1.1.1.orig/src/libw32dll/wine/Makefile.in 2008-01-14 21:28:08.000000000 +0100 ++++ xine-lib-1.1.1/src/libw32dll/wine/Makefile.in 2008-01-14 21:28:20.000000000 +0100 +@@ -74,7 +74,7 @@ + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles +-LTCCASCOMPILE = $(LIBTOOL) --mode=compile $(CCAS) $(AM_CCASFLAGS) \ ++LTCCASCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CCAS) $(AM_CCASFLAGS) \ + $(CCASFLAGS) + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) diff --git a/Xorg/wm/fluxbox/Makefile b/Xorg/wm/fluxbox/Makefile new file mode 100644 index 0000000..0adc97d --- /dev/null +++ b/Xorg/wm/fluxbox/Makefile @@ -0,0 +1,102 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=fluxbox +PKG_VERSION:=1.0.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/fluxbox +PKG_MD5SUM:=990e276ead0d04421dce4080f485caca + +EXTRA_LDFLAGS:="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib" + +include $(INCLUDE_DIR)/package.mk + +CONFIGURE_VARS+=LIBS="-nodefaultlibs -luClibc++ -Wl,-Bstatic,-lstdc++,-Bdynamic -lm $(LIBGCC_S)" \ + CXXLD="$(TARGET_CC)" + +CONFIGURE_ARGS+=--disable-xmb + +define Package/fluxbox/Default + SECTION:=xorg-wm + CATEGORY:=Xorg + SUBMENU:=window manager + URL:=http://fluxbox.org/ +endef + +define Package/fluxbox +$(call Package/fluxbox/Default) + DEPENDS:=+uclibcxx +libXt +libXpm + TITLE:=fluxbox window manager + MENU:=1 +endef + +define Package/fbrun +$(call Package/fluxbox/Default) + DEPENDS:=fluxbox + TITLE:=fluxbox tool to run applications +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \ + if [ -x $(CONFIGURE_CMD) ]; then \ + $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \ + $(CONFIGURE_VARS) \ + $(CONFIGURE_CMD) \ + $(CONFIGURE_ARGS_XTRA) \ + $(CONFIGURE_ARGS) ;\ + fi \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR) install +endef + +define Package/fluxbox/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/share/fluxbox/styles/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fluxbox $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/fluxbox/keys $(1)/usr/share/fluxbox/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/fluxbox/styles/* $(1)/usr/share/fluxbox/styles/ + $(CP) files/init $(1)/usr/share/fluxbox/ + $(CP) files/menu $(1)/usr/share/fluxbox/ + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_DATA) \ + ./files/uci-defaults/x11 \ + $(1)/etc/uci-defaults/ +endef + +define Package/fbsetbg/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbsetbg $(1)/usr/bin/ +endef + +define Package/fbsetroot/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbsetroot $(1)/usr/bin/ +endef + +define Package/fbrun/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbrun $(1)/usr/bin/ +endef + +define Package/fluxbox/postinst + #!/bin/sh + [ -n "$${IPKG_INSTROOT}" ] && exit + . /etc/functions.sh + uci_apply_defaults +endef + +$(eval $(call BuildPackage,fbrun)) +$(eval $(call BuildPackage,fluxbox)) diff --git a/Xorg/wm/fluxbox/files/init b/Xorg/wm/fluxbox/files/init new file mode 100644 index 0000000..74926d5 --- /dev/null +++ b/Xorg/wm/fluxbox/files/init @@ -0,0 +1,99 @@ +session.screen0.titlebar.left: Stick +session.screen0.titlebar.right: Minimize Maximize Close +session.screen0.tab.width: 64 +session.screen0.tab.alignment: Left +session.screen0.tab.rotatevertical: True +session.screen0.tab.placement: TopLeft +session.screen0.tab.height: 16 +session.screen0.menu.alpha: 158 +session.screen0.tabs.intitlebar: false +session.screen0.toolbar.onTop: False +session.screen0.toolbar.visible: true +session.screen0.toolbar.layer: Desktop +session.screen0.toolbar.height: 0 +session.screen0.toolbar.autoHide: false +session.screen0.toolbar.tools: workspacename, prevworkspace, nextworkspace, iconbar, systemtray, prevwindow, nextwindow, clock +session.screen0.toolbar.maxOver: false +session.screen0.toolbar.placement: TopCenter +session.screen0.toolbar.alpha: 255 +session.screen0.toolbar.widthPercent: 100 +session.screen0.toolbar.onhead: 0 +session.screen0.window.focus.alpha: 255 +session.screen0.window.unfocus.alpha: 34 +session.screen0.iconbar.iconTextPadding: 10l +session.screen0.iconbar.wheelMode: Screen +session.screen0.iconbar.alignment: Relative +session.screen0.iconbar.usePixmap: true +session.screen0.iconbar.deiconifyMode: Follow +session.screen0.iconbar.mode: Workspace +session.screen0.iconbar.iconWidth: 70 +session.screen0.slit.direction: Vertical +session.screen0.slit.autoHide: false +session.screen0.slit.onTop: False +session.screen0.slit.layer: Dock +session.screen0.slit.alpha: 255 +session.screen0.slit.maxOver: false +session.screen0.slit.placement: BottomRight +session.screen0.slit.onhead: 0 +session.screen0.overlay.lineWidth: 1 +session.screen0.overlay.lineStyle: LineSolid +session.screen0.overlay.joinStyle: JoinMiter +session.screen0.overlay.capStyle: CapNotLast +session.screen0.edgeSnapThreshold: 0 +session.screen0.workspaceNames: one,two,three, +session.screen0.windowPlacement: RowSmartPlacement +session.screen0.windowScrollAction: +session.screen0.focusModel: ClickFocus +session.screen0.focusLastWindow: true +session.screen0.clickRaises: true +session.screen0.menuMode: Delay +session.screen0.desktopwheeling: true +session.screen0.imageDither: false +session.screen0.colPlacementDirection: TopToBottom +session.screen0.rowPlacementDirection: LeftToRight +session.screen0.resizeMode: Bottom +session.screen0.windowMenu: +session.screen0.followModel: Ignore +session.screen0.decorateTransient: false +session.screen0.strftimeFormat: %a %d %H:%M +session.screen0.workspacewarping: true +session.screen0.menuDelay: 0 +session.screen0.windowScrollReverse: false +session.screen0.workspaces: 3 +session.screen0.autoRaise: false +session.screen0.sloppywindowgrouping: true +session.screen0.reversewheeling: false +session.screen0.rootCommand: ~/.xsession +session.screen0.menuDelayClose: 0 +session.screen0.fullMaximization: false +session.screen0.tabFocusModel: ClickToTabFocus +session.screen0.focusNewWindows: true +session.screen0.antialias: true +session.screen0.showwindowposition: true +session.screen0.opaqueMove: false +session.titlebar.left: Stick +session.titlebar.right: Minimize Maximize Close +session.cacheLife: 5l +session.ignoreBorder: false +session.tabs: true +session.doubleClickInterval: 250 +session.tabsAttachArea: Window +session.iconbar: true +session.imageDither: True +session.focusTabMinWidth: 0 +session.modKey: Mod1 +session.forcePseudoTransparency: false +session.autoRaiseDelay: 250 +session.styleFile: /usr/share/fluxbox/styles/BlueNight +session.cacheMax: 200l +session.useMod1: true +session.keyFile: ~/.fluxbox/keys +session.menuFile: ~/.fluxbox/menu +session.tabPadding: 0 +session.groupFile: ~/.fluxbox/groups +session.colorsPerChannel: 4 +session.appsFile: ~/.fluxbox/apps +session.slitlistFile: ~/.fluxbox/slitlist +session.numLayers: 13 +session.opaqueMove: False +session.styleOverlay: ~/.fluxbox/overlay diff --git a/Xorg/wm/fluxbox/files/menu b/Xorg/wm/fluxbox/files/menu new file mode 100644 index 0000000..3357552 --- /dev/null +++ b/Xorg/wm/fluxbox/files/menu @@ -0,0 +1,31 @@ +[begin] (Fluxbox-OpenWrt) + [exec] (xterm) {xterm} + [exec] (vi) {xterm -e vi} + [exec] (xmms) {xmms} + [exec] (alsamixer) {xterm -e alsamixer} + [exec] (vlc) {vlc} + [exec] (xclock) {xclock} + [exec] (xmag) {xmag} + [exec] (xclock) {xclock} + [exec] (xcalc) {xcalc} + [exec] (xpdf) {xpdf} + [exec] (top) {xterm -e top} +[submenu] (fluxbox menu) + [config] (Configure) +[submenu] (System Styles) {Choose a style...} + [stylesdir] (/usr/share/fluxbox/styles) +[end] + [workspaces] (Workspace List) +[submenu] (Tools) + [exec] (fluxconf) {fluxconf} + [exec] (fluxkeys) {fluxkeys} + [exec] (fluxmenu) {fluxmenu} +[end] + [commanddialog] (Fluxbox Command) + [reconfig] (Reload config) + [restart] (Restart) + [exec] (About) {(fluxbox -v; fluxbox -info | sed 1d) 2> /dev/null | xmessage -file - -center} + [separator] + [exit] (Exit) +[end] +[end] diff --git a/Xorg/wm/fluxbox/files/uci-defaults/x11 b/Xorg/wm/fluxbox/files/uci-defaults/x11 new file mode 100644 index 0000000..3d029c0 --- /dev/null +++ b/Xorg/wm/fluxbox/files/uci-defaults/x11 @@ -0,0 +1 @@ +uci set x11.@desktop[0].autostart=enlightenment_start \ No newline at end of file diff --git a/Xorg/wm/fluxbox/patches/010-fix-includes.patch b/Xorg/wm/fluxbox/patches/010-fix-includes.patch new file mode 100644 index 0000000..d07d47c --- /dev/null +++ b/Xorg/wm/fluxbox/patches/010-fix-includes.patch @@ -0,0 +1,37 @@ +diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc +index 21224cb..b641185 100644 +--- a/src/ClientPattern.cc ++++ b/src/ClientPattern.cc +@@ -45,6 +45,7 @@ + #endif + + // needed as well for index on some systems (e.g. solaris) ++#include + #include + + using std::string; +diff --git a/src/FbTk/Text.cc b/src/FbTk/Text.cc +index 8c836cc..9f4b3eb 100644 +--- a/src/FbTk/Text.cc ++++ b/src/FbTk/Text.cc +@@ -26,6 +26,7 @@ + #include "Font.hh" + #include "Theme.hh" + ++#include + #include + + namespace FbTk { +diff --git a/src/main.cc b/src/main.cc +index afbf43e..3c3d17c 100644 +--- a/src/main.cc ++++ b/src/main.cc +@@ -45,6 +45,8 @@ + #include + #endif + ++#include ++ + #include + #include + #include diff --git a/Xorg/wm/fluxbox/patches/100-fbrun-compile.patch b/Xorg/wm/fluxbox/patches/100-fbrun-compile.patch new file mode 100644 index 0000000..73b0e23 --- /dev/null +++ b/Xorg/wm/fluxbox/patches/100-fbrun-compile.patch @@ -0,0 +1,10 @@ +--- fluxbox-1.0rc3/util/fbrun/Makefile.in.orig 2007-09-17 19:52:52.000000000 +0200 ++++ fluxbox-1.0rc3/util/fbrun/Makefile.in 2007-09-17 19:53:09.000000000 +0200 +@@ -236,7 +236,7 @@ + fbrun$(EXEEXT): $(fbrun_OBJECTS) $(fbrun_DEPENDENCIES) + @rm -f fbrun$(EXEEXT) +- $(CXXLINK) $(fbrun_OBJECTS) $(fbrun_LDADD) $(LIBS) ++ $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) -o $@ $(fbrun_OBJECTS) $(fbrun_LDADD) $(LDFLAGS) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) diff --git a/Xorg/wm/fluxbox/patches/120-fbsetroot-compile.patch b/Xorg/wm/fluxbox/patches/120-fbsetroot-compile.patch new file mode 100644 index 0000000..0c291be --- /dev/null +++ b/Xorg/wm/fluxbox/patches/120-fbsetroot-compile.patch @@ -0,0 +1,8 @@ +diff -urN fluxbox-1.0rc3.orig/util/Makefile.in fluxbox-1.0rc3/util/Makefile.in +--- fluxbox-1.0rc3.orig/util/Makefile.in 2007-09-17 19:56:45.000000000 +0200 ++++ fluxbox-1.0rc3/util/Makefile.in 2007-09-17 19:58:11.000000000 +0200 +@@ -277,4 +277,4 @@ + fbsetroot$(EXEEXT): $(fbsetroot_OBJECTS) $(fbsetroot_DEPENDENCIES) + @rm -f fbsetroot$(EXEEXT) +- $(CXXLINK) $(fbsetroot_OBJECTS) $(fbsetroot_LDADD) $(LIBS) ++ $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) -o $@ $(fbsetroot_OBJECTS) $(fbsetroot_LDADD) $(LDFLAGS) $(LIBS) diff --git a/Xorg/wm/matchbox-window-manager/Makefile b/Xorg/wm/matchbox-window-manager/Makefile new file mode 100644 index 0000000..df23f97 --- /dev/null +++ b/Xorg/wm/matchbox-window-manager/Makefile @@ -0,0 +1,77 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=matchbox-window-manager +PKG_VERSION:=1.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://matchbox-project.org/sources/$(PKG_NAME)/$(PKG_VERSION) +PKG_MD5SUM:=3e158dcf57823b55c926d95b245500fb + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +TARGET_LDFLAGS+= \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ + +define Package/matchbox-window-manager + TITLE:=matchbox window manager + SECTION:=xorg-wm + CATEGORY:=Xorg + SUBMENU:=window manager + DEPENDS:=+libX11 +zlib +libfreetype +fontconfig +libmatchbox + URL:=http://matchbox-project.org/ +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR=$(PKG_INSTALL_DIR) \ + LIBMB_LIBS="$(TARGET_LDFLAGS) -lfontconfig -lXrender \ + -lz -lexpat -lfreetype -lXft -lmb -lX11 -lXext -lXau -lXdmcp \ + -lpng12" \ + all +endef + +define Package/matchbox-window-manager/install + $(INSTALL_DIR) $(1)/etc/matchbox + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/etc/matchbox/kbdconfig \ + $(1)/etc/matchbox/ + + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/usr/share/{matchbox,themes} + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/matchbox/* \ + $(1)/usr/share/matchbox/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/share/themes/* \ + $(1)/usr/share/themes/ + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_DATA) \ + ./files/uci-defaults/x11 \ + $(1)/etc/uci-defaults/ +endef + +define Package/matchbox-window-manager/postinst + #!/bin/sh + [ -n "$${IPKG_INSTROOT}" ] && exit + . /etc/functions.sh + uci_apply_defaults +endef + +$(eval $(call BuildPackage,matchbox-window-manager)) diff --git a/Xorg/wm/matchbox-window-manager/files/uci-defaults/x11 b/Xorg/wm/matchbox-window-manager/files/uci-defaults/x11 new file mode 100644 index 0000000..3d029c0 --- /dev/null +++ b/Xorg/wm/matchbox-window-manager/files/uci-defaults/x11 @@ -0,0 +1 @@ +uci set x11.@desktop[0].autostart=enlightenment_start \ No newline at end of file diff --git a/Xorg/xorg/app/font-util/Makefile b/Xorg/xorg/app/font-util/Makefile new file mode 100644 index 0000000..07e8dbb --- /dev/null +++ b/Xorg/xorg/app/font-util/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=font-util +PKG_VERSION:=1.0.1 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_MD5SUM:=b81535f78fe05732931f02841e5ca37b + +include $(INCLUDE_DIR)/package.mk + +define Package/font-util + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=app + TITLE:=misc tool to generate x fonts + DEPENDS:=+xserver + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Configure + cd $(PKG_BUILD_DIR)/; ./configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) install DESTDIR="$(PKG_INSTALL_DIR)" +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(1)/usr/lib/X11 $(2)/bin + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/local/lib/pkgconfig/fontutil.pc $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/X11/* $(1)/usr/lib/X11/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/* $(2)/bin/ +endef + +$(eval $(call BuildPackage,font-util)) diff --git a/Xorg/xorg/app/fontconfig/Makefile b/Xorg/xorg/app/fontconfig/Makefile new file mode 100644 index 0000000..5a5b369 --- /dev/null +++ b/Xorg/xorg/app/fontconfig/Makefile @@ -0,0 +1,69 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=fontconfig +PKG_VERSION:=2.6.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://fontconfig.org/release/ +PKG_MD5SUM:=ab54ec1d4ddd836313fdbc0cd5299d6d +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/fontconfig + SECTION:=xorg-util + CATEGORY:=Xorg + SUBMENU:=font-utils + TITLE:=fontconfig + DEPENDS:=+libexpat +libfreetype + URL:=http://fontconfig.org/ +endef + +CONFIGURE_ARGS+= \ + --disable-docs \ + --with-cache-dir=/usr/share/fontconfig/cache \ + --with-arch=$(ARCH) \ + +CONFIGURE_VARS+= \ + ac_cv_prog_HASDOCBOOK=no \ + +TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Build/Compile + $(foreach dir,fc-arch fc-case fc-lang fc-glyphname, \ + $(MAKE) -C $(PKG_BUILD_DIR)/$(dir) CFLAGS="$(HOST_CFLAGS)" \ + CPPFLAGS="" LDFLAGS="$(HOST_LDFLAGS)" || exit 1;) + $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" DOCSRC="" install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/fontconfig $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfontconfig.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fontconfig.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/fontconfig/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfontconfig.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/etc/fonts/conf.avail + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/fonts/conf.avail/*.conf $(1)/etc/fonts/conf.avail/ + $(INSTALL_DIR) $(1)/etc/fonts/conf.d + $(CP) $(PKG_INSTALL_DIR)/etc/fonts/conf.d/*.conf $(1)/etc/fonts/conf.d/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/fonts/fonts.{conf,dtd} $(1)/etc/fonts/ +endef + +$(eval $(call BuildPackage,fontconfig)) diff --git a/Xorg/xorg/app/iceauth/Makefile b/Xorg/xorg/app/iceauth/Makefile new file mode 100644 index 0000000..9ee07dd --- /dev/null +++ b/Xorg/xorg/app/iceauth/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=iceauth +PKG_RELEASE:=1 +PKG_VERSION:=1.0.3 +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.5/src/app + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_MD5SUM:=975ade3f238c1eb10705da0a91e6e8e7 +PKG_BUILD_DEPENDS:=xproto + +include $(INCLUDE_DIR)/package.mk + +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +PKG_INSTALL=1 + +define Package/iceauth + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libICE + TITLE:=iceauth + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR=$(1) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +define Package/iceauth/install + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1) + rm -rf $(1)/usr/man/ +endef + +$(eval $(call BuildPackage,iceauth)) diff --git a/Xorg/xorg/app/smproxy/Makefile b/Xorg/xorg/app/smproxy/Makefile new file mode 100644 index 0000000..c20c58b --- /dev/null +++ b/Xorg/xorg/app/smproxy/Makefile @@ -0,0 +1,40 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=smproxy +PKG_RELEASE:=1 +PKG_VERSION:=1.0.3 +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.5/src/app +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_MD5SUM:=ba7dbde81be24fc1bd4156b360e5f8cf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/smproxy + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libXt +libXmu + TITLE:=smproxy + URL:=http://xorg.freedesktop.org/ +endef + +define Package/smproxy/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,smproxy)) diff --git a/Xorg/xorg/app/x11perf/Makefile b/Xorg/xorg/app/x11perf/Makefile new file mode 100644 index 0000000..a1fa62e --- /dev/null +++ b/Xorg/xorg/app/x11perf/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2008-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=x11perf +PKG_RELEASE:=1 +PKG_VERSION:=1.5.1 +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.5/src/app +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_MD5SUM:=66e4aa4645f83809071eb69553ed0222 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/x11perf + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libX11 +libXmuu +libXrender +libXft +libXext + TITLE:=x11perf + URL:=http://xorg.freedesktop.org/ +endef + +CONFIGURE_ARGS+=LIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib" + +define Package/x11perf/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/X11/x11perfcomp + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/lib/X11/x11perfcomp/* \ + $(1)/usr/lib/X11/x11perfcomp/ +endef + +$(eval $(call BuildPackage,x11perf)) diff --git a/Xorg/xorg/app/xauth/Makefile b/Xorg/xorg/app/xauth/Makefile new file mode 100644 index 0000000..7b3910e --- /dev/null +++ b/Xorg/xorg/app/xauth/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xauth +PKG_RELEASE:=1 +PKG_VERSION:=1.0.4 +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.5/src/app +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_MD5SUM:=fa00078c414c4a57cab7a6d89a0c8734 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + + +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/xauth + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libX11 +libXau +libXext +libXmuu + TITLE:=xauth + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xauth/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,xauth)) diff --git a/Xorg/xorg/app/xkbcomp/Makefile b/Xorg/xorg/app/xkbcomp/Makefile new file mode 100644 index 0000000..b7c0a2d --- /dev/null +++ b/Xorg/xorg/app/xkbcomp/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xkbcomp +PKG_RELEASE:=2 +PKG_VERSION:=1.1.1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/app +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=38c387bacdc01038c8ac280588792bcf + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_LDFLAGS+= \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ + -Wl,-rpath=/usr/lib + +define Package/xkbcomp + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libX11 +libxkbfile + TITLE:=xkbcomp + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xkbcomp/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin + $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/share/xkbdata/compiled +endef + +$(eval $(call BuildPackage,xkbcomp)) diff --git a/Xorg/xorg/app/xprop/Makefile b/Xorg/xorg/app/xprop/Makefile new file mode 100644 index 0000000..33dc46c --- /dev/null +++ b/Xorg/xorg/app/xprop/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xprop +PKG_RELEASE:=1 +PKG_VERSION:=1.2.0 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/app/ +PKG_MD5SUM:=e6d0673a1e1e469f0a6220a6868fb94b + +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_BUILD_DEPENDS:=xproto +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/xprop + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libX11 + TITLE:=xprop + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xprop/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/xprop \ + $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,xprop)) diff --git a/Xorg/xorg/app/xrandr/Makefile b/Xorg/xorg/app/xrandr/Makefile new file mode 100644 index 0000000..5031750 --- /dev/null +++ b/Xorg/xorg/app/xrandr/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xrandr +PKG_RELEASE:=1 +PKG_VERSION:=1.3.2 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/app/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_MD5SUM:=2cb19bb1c19ccf77c40032b03dbe06f0 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + + +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/xrandr + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libX11 +libXrandr +libXrender +libX11 + TITLE:=xrandr + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xrandr/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,xrandr)) diff --git a/Xorg/xorg/app/xrandr/patches/001-xrandr-1.2.2-clone-nameclash.patch b/Xorg/xorg/app/xrandr/patches/001-xrandr-1.2.2-clone-nameclash.patch new file mode 100644 index 0000000..6a14192 --- /dev/null +++ b/Xorg/xorg/app/xrandr/patches/001-xrandr-1.2.2-clone-nameclash.patch @@ -0,0 +1,35 @@ +--- xrandr-1.2.3/xrandr.c.orig 2007-10-25 17:18:55.001346494 +0200 ++++ xrandr-1.2.3/xrandr.c 2007-10-25 17:21:07.222276308 +0200 +@@ -189,7 +189,7 @@ + + #if HAS_RANDR_1_2 + typedef enum _policy { +- clone, extend ++ p_clone, p_extend + } policy_t; + + typedef enum _relation { +@@ -1602,7 +1602,7 @@ + int ret = 0; + #if HAS_RANDR_1_2 + output_t *output = NULL; +- policy_t policy = clone; ++ policy_t policy = p_clone; + Bool setit_1_2 = False; + Bool query_1_2 = False; + Bool modeit = False; +@@ -1863,12 +1863,12 @@ + continue; + } + if (!strcmp ("--clone", argv[i])) { +- policy = clone; ++ policy = p_clone; + setit_1_2 = True; + continue; + } + if (!strcmp ("--extend", argv[i])) { +- policy = extend; ++ policy = p_extend; + setit_1_2 = True; + continue; + } diff --git a/Xorg/xorg/app/xrdb/Makefile b/Xorg/xorg/app/xrdb/Makefile new file mode 100644 index 0000000..20d53b4 --- /dev/null +++ b/Xorg/xorg/app/xrdb/Makefile @@ -0,0 +1,40 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xrdb +PKG_RELEASE:=1 +PKG_VERSION:=1.0.5 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.4/src/app +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=9c30b8e1709d5367beb7706146640c07 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/xrdb + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libX11 +libXmuu + TITLE:=xrdb + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xrdb/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/xrdb \ + $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,xrdb)) diff --git a/Xorg/xorg/app/xset/Makefile b/Xorg/xorg/app/xset/Makefile new file mode 100644 index 0000000..e6cca33 --- /dev/null +++ b/Xorg/xorg/app/xset/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xset +PKG_RELEASE:=1 +PKG_VERSION:=1.1.0 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.5/src/app +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_MD5SUM:=eeb0d02f69c76bd40470dede99b4bd49 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + + +TARGET_LDFLAGS+= \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ + -Wl,-rpath=/usr/lib + +define Package/xset + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libXmuu +libX11 +libXext + TITLE:=xset + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xset/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin +endef + +$(eval $(call BuildPackage,xset)) diff --git a/Xorg/xorg/app/xsetroot/Makefile b/Xorg/xorg/app/xsetroot/Makefile new file mode 100644 index 0000000..af27a18 --- /dev/null +++ b/Xorg/xorg/app/xsetroot/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xsetroot +PKG_RELEASE:=1 +PKG_VERSION:=1.0.3 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.5/src/app +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_MD5SUM:=cbda9b9b8da5af4614110883d5a276b8 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + + +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/xsetroot + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+xbitmaps +libXmuu +libX11 + TITLE:=xsetroot + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xsetroot/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin +endef + +$(eval $(call BuildPackage,xsetroot)) diff --git a/Xorg/xorg/app/xwd/Makefile b/Xorg/xorg/app/xwd/Makefile new file mode 100644 index 0000000..b88b010 --- /dev/null +++ b/Xorg/xorg/app/xwd/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xwd +PKG_RELEASE:=1 +PKG_VERSION:=1.0.3 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.5/src/app +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_MD5SUM:=007cea1f389abde5c93162dcd5541351 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/xwd + SECTION:=xorg-app + CATEGORY:=Xorg + SUBMENU:=app + DEPENDS:=+libX11 + TITLE:=xwd + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xwd/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin +endef + +$(eval $(call BuildPackage,xwd)) diff --git a/Xorg/xorg/data/xbitmaps/Makefile b/Xorg/xorg/data/xbitmaps/Makefile new file mode 100644 index 0000000..8ab212c --- /dev/null +++ b/Xorg/xorg/data/xbitmaps/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xbitmaps +PKG_RELEASE:=1 +PKG_VERSION:=1.1.0 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.5/src/data/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_MD5SUM:=f9ddd4e70a5375508b3acaf17be0d0ab +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/xbitmaps + SECTION:=xorg-data + CATEGORY:=Xorg + SUBMENU:=data + TITLE:=xbitmaps + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/bitmaps} + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/bitmaps/* \ + $(1)/usr/include/X11/bitmaps/ +endef + +define Package/xbitmaps/install + $(INSTALL_DIR) $(1)/usr/include/X11/bitmaps + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/bitmaps/* \ + $(1)/usr/include/X11/bitmaps +endef + +$(eval $(call BuildPackage,xbitmaps)) diff --git a/Xorg/xorg/data/xkbdata/Makefile b/Xorg/xorg/data/xkbdata/Makefile new file mode 100644 index 0000000..4157539 --- /dev/null +++ b/Xorg/xorg/data/xkbdata/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xkbdata +PKG_RELEASE:=2 +PKG_VERSION:=1.0.1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/data/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=9bf179be9a195953dc5f4c15e23ab7f0 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/xkbdata + SECTION:=xorg-data + CATEGORY:=Xorg + SUBMENU:=data + TITLE:=xkbdata + DEPENDS:=+xkbcomp + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xkbdata/install + $(INSTALL_DIR) $(1)/usr/share/X11/xkb/{rules,types,keycodes,geometry,compat,symbols} + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/X11/xkb/rules/xorg \ + $(1)/usr/share/X11/xkb/rules/base + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/X11/xkb/rules/xorg.lst \ + $(1)/usr/share/X11/xkb/rules/base.lst + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/X11/xkb/types/* \ + $(1)/usr/share/X11/xkb/types/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/X11/xkb/keycodes/{aliases,xfree86} \ + $(1)/usr/share/X11/xkb/keycodes/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/X11/xkb/geometry/pc \ + $(1)/usr/share/X11/xkb/geometry/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/X11/xkb/compat/* \ + $(1)/usr/share/X11/xkb/compat/ + + $(if $(filter y,$(CONFIG_TARGET_omap24xx_n810-gui)), \ + $(INSTALL_DIR) $(1)/usr/share/X11/xkb/symbols/nokia_vndr; \ + $(INSTALL_DATA) ./files/nokia_n810/rx-44 $(1)/usr/share/X11/xkb/symbols/nokia_vndr/; \ + $(INSTALL_DATA) ./files/nokia_n810/su-8w $(1)/usr/share/X11/xkb/symbols/nokia_vndr/; \ + ) +endef + +$(eval $(call BuildPackage,xkbdata)) diff --git a/Xorg/xorg/data/xkbdata/files/nokia_n810/rx-44 b/Xorg/xorg/data/xkbdata/files/nokia_n810/rx-44 new file mode 100644 index 0000000..3ee1118 --- /dev/null +++ b/Xorg/xorg/data/xkbdata/files/nokia_n810/rx-44 @@ -0,0 +1,310 @@ +partial alphanumeric_keys +xkb_symbols "us" { + name[Group1] = "U.S. English"; + + include "nokia_vndr/rx-44(base)" + + key { [ a, A, exclam, exclam ] }; + key { [ s, S, quotedbl, quotedbl ] }; + key { [ d, D, at, at ] }; + key { [ f, F, numbersign, numbersign ] }; + key { [ g, G, backslash, backslash ] }; + key { [ h, H, slash, slash ] }; + key { [ j, J, parenleft, parenleft ] }; + key { [ k, K, parenright, parenright ] }; + key { [ l, L, asterisk, asterisk ] }; + key { [ apostrophe, question, question, question ] }; + + key { [ z, Z, yen, yen ] }; + key { [ x, X, asciicircum, asciicircum ] }; + key { [ c, C, asciitilde, asciitilde ] }; + key { [ v, V, percent, percent ] }; + key { [ b, B, ampersand, ampersand ] }; + key { [ n, N, dollar, dollar ] }; + key { [ m, M, EuroSign, EuroSign ] }; + key { [ semicolon, colon, sterling, sterling ] }; + key { [ minus, underscore, underscore, underscore ] }; + key { [ plus, equal, equal, equal ] }; + + key { [ comma, less, comma, less ] }; + key { [ period, greater, period, greater ] }; +}; + + + +partial alphanumeric_keys +xkb_symbols "fisenoda" { + name[Group1] = "Finnish/Swedish/Norwegian/Danish"; + + include "nokia_vndr/rx-44(base)" + + key { [ a, A, exclam, exclam ] }; + key { [ s, S, quotedbl, quotedbl ] }; + key { [ d, D, at, at ] }; + key { [ f, F, numbersign, numbersign ] }; + key { [ g, G, asterisk, asterisk ] }; + key { [ h, H, backslash, backslash ] }; + key { [ j, J, slash, slash ] }; + key { [ k, K, parenleft, parenleft ] }; + key { [ l, L, parenright, parenright ] }; + key { [ aring, Aring, question, question ] }; + + key { [ z, Z, EuroSign, EuroSign ] }; + key { [ x, X, asciitilde, asciitilde ] }; + key { [ c, C, percent, percent ] }; + key { [ v, V, ampersand, ampersand ] }; + key { [ b, B, plus, plus ] }; + key { [ n, N, less, less ] }; + key { [ m, M, greater, greater ] }; + key { type="EIGHT_LEVEL", [ oslash, Oslash, equal, equal, odiaeresis, Odiaeresis, equal, equal ] }; + key { type="EIGHT_LEVEL", [ ae, AE, apostrophe, apostrophe, adiaeresis, Adiaeresis, apostrophe, apostrophe ] }; + key { [ minus, underscore, underscore, underscore ] }; + + key { [ comma, semicolon, comma, semicolon ] }; + key { [ period, colon, period, colon ] }; +}; + + + +partial alphanumeric_keys +xkb_symbols "ptes" { + name[Group1] = "Portuguese/Spanish"; + + include "nokia_vndr/rx-44(base)" + + key { [ a, A, exclam, exclam ] }; + key { [ s, S, quotedbl, quotedbl ] }; + key { [ d, D, at, at ] }; + key { [ f, F, numbersign, numbersign ] }; + key { [ g, G, asterisk, asterisk ] }; + key { [ h, H, backslash, backslash ] }; + key { [ j, J, slash, slash ] }; + key { [ k, K, parenleft, parenleft ] }; + key { [ l, L, parenright, parenright ] }; + key { [ dead_acute, dead_grave, dead_diaeresis, dead_diaeresis ] }; + + key { [ z, Z, EuroSign, EuroSign ] }; + key { [ x, X, percent, percent ] }; + key { [ c, C, ampersand, ampersand ] }; + key { [ v, V, exclamdown, exclamdown ] }; + key { [ b, B, apostrophe, apostrophe ] }; + key { [ n, N, plus, plus ] }; + key { [ m, M, equal, equal ] }; + key { [ ccedilla, Ccedilla, questiondown, questiondown ] }; + key { [ ntilde, Ntilde, question, question ] }; + key { [ dead_tilde, dead_circumflex, dead_circumflex, dead_circumflex ] }; + + key { [ comma, semicolon, minus, minus ] }; + key { [ period, colon, underscore, underscore ] }; +}; + + + +partial alphanumeric_keys +xkb_symbols "fr" { + name[Group1] = "French"; + + include "nokia_vndr/rx-44(base)" + + key { [ a, A, 1, 1 ] }; + key { [ z, Z, 2, 2 ] }; + + key { [ q, Q, at, at ] }; + key { [ s, S, percent, percent ] }; + key { [ d, D, ecircumflex, Ecircumflex ] }; + key { [ f, F, eacute, Eacute ] }; + key { [ g, G, egrave, Egrave ] }; + key { [ h, H, oe, OE ] }; + key { [ j, J, parenleft, parenleft ] }; + key { [ k, K, parenright, parenright ] }; + key { [ l, L, agrave, Agrave ] }; + key { [ m, M, ugrave, Ugrave ] }; + + key { [ w, w, EuroSign, EuroSign ] }; + key { [ x, X, numbersign, numbersign ] }; + key { [ c, C, ccedilla, Ccedilla ] }; + key { [ v, V, plus, plus ] }; + key { [ b, B, equal, equal ] }; + key { [ n, N, quotedbl, quotedbl ] }; + key { [ comma, question, backslash, backslash ] }; + key { [ semicolon, period, minus, minus ] }; + key { [ colon, slash, underscore, underscore ] }; + key { [ apostrophe, apostrophe, mu, mu ] }; + + key { [ less, greater, less, greater ] }; + key { [ exclam, section, asterisk, asterisk ] }; +}; + + + +partial alphanumeric_keys +xkb_symbols "de" { + name[Group1] = "German"; + + include "nokia_vndr/rx-44(base)" + + key { [ z, Z, 6, 6 ] }; + + key { [ a, A, exclam, exclam ] }; + key { [ s, S, quotedbl, quotedbl ] }; + key { [ d, D, at, at ] }; + key { [ f, F, numbersign, numbersign ] }; + key { [ g, G, percent, percent ] }; + key { [ h, H, backslash, backslash ] }; + key { [ j, J, slash, slash ] }; + key { [ k, K, parenleft, parenleft ] }; + key { [ l, L, parenright, parenright ] }; + key { [ udiaeresis, Udiaeresis, question, question ] }; + + key { [ y, Y, EuroSign, EuroSign ] }; + key { [ x, X, asciitilde, asciitilde ] }; + key { [ c, C, asterisk, asterisk ] }; + key { [ v, V, ampersand, ampersand ] }; + key { [ b, B, plus, plus ] }; + key { [ n, N, less, less ] }; + key { [ m, M, greater, greater ] }; + key { [ odiaeresis, Odiaeresis, equal, equal ] }; + key { [ adiaeresis, Adiaeresis, apostrophe, apostrophe ] }; + key { [ minus, underscore, ssharp, ssharp ] }; + + key { [ comma, semicolon, comma, semicolon ] }; + key { [ period, colon, period, colon ] }; +}; + + +// Levels 5-8 are Russian, levels 1-4 US English, for shortcut reasons. +partial alphanumeric_keys +xkb_symbols "ru" { + name[Group1] = "Russian"; + + include "nokia_vndr/rx-44(base)" + + key { type="EIGHT_LEVEL", [ q, Q, 1, 1, Cyrillic_shorti, Cyrillic_SHORTI, 1, 1 ] }; + key { type="EIGHT_LEVEL", [ w, W, 2, 2, Cyrillic_tse, Cyrillic_TSE, 2, 2 ] }; + key { type="EIGHT_LEVEL", [ e, E, 3, 3, Cyrillic_u, Cyrillic_U, 3, 3 ] }; + key { type="EIGHT_LEVEL", [ r, R, 4, 4, Cyrillic_ka, Cyrillic_KA, 4, 4 ] }; + key { type="EIGHT_LEVEL", [ t, T, 5, 5, Cyrillic_ie, Cyrillic_IE, 5, 5 ] }; + key { type="EIGHT_LEVEL", [ y, Y, 6, 6, Cyrillic_en, Cyrillic_EN, 6, 6 ] }; + key { type="EIGHT_LEVEL", [ u, U, 7, 7, Cyrillic_ghe, Cyrillic_GHE, 7, 7 ] }; + key { type="EIGHT_LEVEL", [ i, I, 8, 8, Cyrillic_sha, Cyrillic_SHA, 8, 8 ] }; + key { type="EIGHT_LEVEL", [ o, O, 9, 9, Cyrillic_shcha, Cyrillic_SHCHA, 9, 9 ] }; + key { type="EIGHT_LEVEL", [ p, P, 0, 0, Cyrillic_ze, Cyrillic_ZE, 0, 0 ] }; + + key { type="EIGHT_LEVEL", [ a, A, exclam, exclam, Cyrillic_ef, Cyrillic_EF, exclam, exclam ] }; + key { type="EIGHT_LEVEL", [ s, S, quotedbl, quotedbl, Cyrillic_yeru, Cyrillic_YERU, quotedbl, quotedbl ] }; + key { type="EIGHT_LEVEL", [ d, D, at, at, Cyrillic_ve, Cyrillic_VE, at, at ] }; + key { type="EIGHT_LEVEL", [ f, F, numbersign, numbersign, Cyrillic_a, Cyrillic_A, numbersign, numbersign ] }; + key { type="EIGHT_LEVEL", [ g, G, backslash, backslash, Cyrillic_pe, Cyrillic_PE, backslash, backslash ] }; + key { type="EIGHT_LEVEL", [ h, H, slash, slash, Cyrillic_er, Cyrillic_ER, slash, slash ] }; + key { type="EIGHT_LEVEL", [ j, J, parenleft, parenleft, Cyrillic_o, Cyrillic_O, parenleft, parenleft ] }; + key { type="EIGHT_LEVEL", [ k, K, parenright, parenright, Cyrillic_el, Cyrillic_EL, parenright, parenright ] }; + key { type="EIGHT_LEVEL", [ l, L, colon, colon, Cyrillic_de, Cyrillic_DE, colon, colon ] }; + key { type="EIGHT_LEVEL", [ Cyrillic_zhe, Cyrillic_ZHE, semicolon, semicolon, Cyrillic_zhe, Cyrillic_ZHE, semicolon, semicolon ] }; + key { type="EIGHT_LEVEL", [ Cyrillic_zhe, Cyrillic_ZHE, semicolon, semicolon, Cyrillic_zhe, Cyrillic_ZHE, semicolon, semicolon ] }; + + key { type="EIGHT_LEVEL", [ z, Z, underscore, underscore, Cyrillic_ya, Cyrillic_YA, minus, minus ] }; + key { type="EIGHT_LEVEL", [ x, X, percent, percent, Cyrillic_che, Cyrillic_CHE, percent, percent ] }; + key { type="EIGHT_LEVEL", [ c, C, 0x1002116, 0x1002116, Cyrillic_es, Cyrillic_ES, 0x1002116, 0x1002116 ] }; + key { type="EIGHT_LEVEL", [ v, V, equal, equal, Cyrillic_em, Cyrillic_EM, equal, equal ] }; + key { type="EIGHT_LEVEL", [ b, B, ampersand, ampersand, Cyrillic_i, Cyrillic_I, ampersand, ampersand ] }; + key { type="EIGHT_LEVEL", [ n, N, asterisk, asterisk, Cyrillic_te, Cyrillic_TE, asterisk, asterisk ] }; + key { type="EIGHT_LEVEL", [ m, M, apostrophe, apostrophe, Cyrillic_softsign, Cyrillic_SOFTSIGN, apostrophe, apostrophe ] }; + key { type="EIGHT_LEVEL", [ Cyrillic_be, Cyrillic_BE, minus, minus, Cyrillic_be, Cyrillic_BE, minus, minus ] }; + key { type="EIGHT_LEVEL", [ Cyrillic_be, Cyrillic_BE, minus, minus, Cyrillic_be, Cyrillic_BE, minus, minus ] }; + key { type="EIGHT_LEVEL", [ Cyrillic_yu, Cyrillic_YU, question, question, Cyrillic_yu, Cyrillic_YU, question, question ] }; + key { type="EIGHT_LEVEL", [ Cyrillic_yu, Cyrillic_YU, question, question, Cyrillic_yu, Cyrillic_YU, question, question ] }; + key { type="EIGHT_LEVEL", [ Cyrillic_ha, Cyrillic_HA, Cyrillic_hardsign, Cyrillic_HARDSIGN, Cyrillic_ha, Cyrillic_HA, Cyrillic_hardsign, Cyrillic_HARDSIGN ] }; + key { type="EIGHT_LEVEL", [ Cyrillic_ha, Cyrillic_HA, Cyrillic_hardsign, Cyrillic_HARDSIGN, Cyrillic_ha, Cyrillic_HA, Cyrillic_hardsign, Cyrillic_HARDSIGN ] }; + + key { type="EIGHT_LEVEL", [ period, comma, period, comma, period, comma, period, comma ] }; + key { type="EIGHT_LEVEL", [ period, comma, period, comma, period, comma, period, comma ] }; + key { type="EIGHT_LEVEL", [ Cyrillic_e, Cyrillic_E, Cyrillic_io, Cyrillic_IO, Cyrillic_e, Cyrillic_E, Cyrillic_io, Cyrillic_IO ] }; + key { type="EIGHT_LEVEL", [ Cyrillic_e, Cyrillic_E, Cyrillic_io, Cyrillic_IO, Cyrillic_e, Cyrillic_E, Cyrillic_io, Cyrillic_IO ] }; +}; + + + +partial alphanumeric_keys +xkb_symbols "it" { + name[Group1] = "Italian"; + + include "nokia_vndr/rx-44(base)" + + key { [ a, A, exclam, exclam ] }; + key { [ s, S, quotedbl, quotedbl ] }; + key { [ d, D, at, at ] }; + key { [ f, F, numbersign, numbersign ] }; + key { [ g, G, asterisk, asterisk ] }; + key { [ h, H, backslash, backslash ] }; + key { [ j, J, slash, slash ] }; + key { [ k, K, parenleft, parenleft ] }; + key { [ l, L, parenright, parenright ] }; + key { [ apostrophe, question, igrave, Igrave ] }; + + key { [ z, Z, EuroSign, EuroSign ] }; + key { [ x, X, asciitilde, asciitilde ] }; + key { [ c, C, ampersand, ampersand ] }; + key { [ v, V, equal, equal ] }; + key { [ b, B, less, less ] }; + key { [ n, N, greater, greater ] }; + key { [ m, M, plus, plus ] }; + key { [ eacute, Eacute, ograve, Ograve ] }; + key { [ egrave, Egrave, agrave, Agrave ] }; + key { [ minus, underscore, ugrave, Ugrave ] }; + + key { [ comma, semicolon, comma, semicolon ] }; + key { [ period, colon, period, colon ] }; +}; + +partial default alphanumeric_keys +xkb_symbols "base" { + key { [ q, Q, 1, 1 ] }; + key { [ w, W, 2, 2 ] }; + key { [ e, E, 3, 3 ] }; + key { [ r, R, 4, 4 ] }; + key { [ t, T, 5, 5 ] }; + key { [ y, Y, 6, 6 ] }; + key { [ u, U, 7, 7 ] }; + key { [ i, I, 8, 8 ] }; + key { [ o, O, 9, 9 ] }; + key { [ p, P, 0, 0 ] }; + key { [ BackSpace, BackSpace, BackSpace, BackSpace ] }; + + // broken UI spec. + key { [ KP_Enter, KP_Enter, KP_Enter, KP_Enter ] }; + + key { [ Multi_key, Multi_key, Multi_key, Multi_key ] }; + key { [ Shift_L, Shift_L, Shift_L, Shift_L ] }; +// key { [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Shift ] }; + key { [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Shift ] }; + key { [ space, space, space, space ] }; + key { [ Control_R, Control_R, Control_R, Control_R ] }; + key { [ Tab, Tab, Tab, Tab ] }; + + modifier_map Shift { Shift_L }; + modifier_map Mod5 { ISO_Level3_Shift }; + modifier_map Control { Control_R }; + + key { [ Return ] }; + key { [ Up ] }; + key { [ Down ] }; + key { [ Left ] }; + key { [ Right ] }; + + key { [ Escape ] }; + key { [ F1 ] }; + key { [ F2 ] }; + key { [ F3 ] }; + key { [ F4 ] }; + key { [ F5 ] }; + key { [ F6 ] }; + key { [ F7 ] }; + key { [ F8 ] }; + key { [ F9 ] }; + key { [ F10 ] }; + key { [ F11 ] }; + key { [ F12 ] }; + + // generated from the headset, must always be in the map. + key { [ XF86Phone ] }; +}; diff --git a/Xorg/xorg/data/xkbdata/files/nokia_n810/su-8w b/Xorg/xorg/data/xkbdata/files/nokia_n810/su-8w new file mode 100644 index 0000000..8292db1 --- /dev/null +++ b/Xorg/xorg/data/xkbdata/files/nokia_n810/su-8w @@ -0,0 +1,482 @@ +partial alphanumeric_keys default +xkb_symbols "no" { + name[Group1]= "Norwegian/Danish"; + + include "nokia_vndr/su-8w(base)" + + key { [ 1, exclam, dead_circumflex ] }; + key { [ 2, quotedbl, at ] }; + key { [ 3, numbersign, EuroSign ] }; + key { [ 4, currency, dollar ] }; + key { [ 5, percent, sterling ] }; + key { [ 6, ampersand ] }; + key { [ 7, slash, braceleft ] }; + key { [ 8, parenleft, bracketleft ] }; + key { [ 9, parenright, bracketright ] }; + key { [ 0, equal, braceright ] }; + key { [ plus, question ] }; + key { [ dead_acute, dead_grave, backslash ] }; + + key { [ q, Q, dead_circumflex ] }; + key { [ w, W, at ] }; + key { [ e, E, EuroSign ] }; + key { [ r, R, dollar ] }; + key { [ t, T, sterling ] }; + key { [ y, Y ] }; + key { [ u, U, braceleft ] }; + key { [ i, I, bracketleft ] }; + key { [ o, O, bracketright ] }; + key { [ p, P, braceright ] }; + key { [ aring, Aring ] }; + key { [ ssharp, ssharp, backslash ] }; + + key { [ a, A ] }; + key { [ s, S ] }; + key { [ d, D ] }; + key { [ f, F ] }; + key { [ g, G ] }; + key { [ h, H ] }; + key { [ j, J ] }; + key { [ k, K ] }; + key { [ l, L ] }; + key { [ oslash, Ooblique ] }; + key { [ ae, AE ] }; + + key { [ z, Z ] }; + key { [ x, X ] }; + key { [ c, C ] }; + key { [ v, V ] }; + key { [ b, B ] }; + key { [ n, N ] }; + key { [ m, M ] }; + key { [ comma, semicolon, less ] }; + key { [ period, colon, greater ] }; + key { [ minus, underscore, dead_diaeresis ] }; + + include "level3(ralt_switch)" +}; + +partial alphanumeric_keys +xkb_symbols "no_nodeadkeys" { + name[Group1] = "Norwegian/Danish (no dead keys)"; + + include "nokia_vndr/su-8w(no)" + + key { [ 1, exclam, asciicircum ] }; + key { [ acute, grave, backslash ] }; + key { [ q, Q, asciicircum ] }; +}; + +partial alphanumeric_keys default +xkb_symbols "dk" { + include "nokia_vndr/su-8w(no)" +}; + +partial alphanumeric_keys default +xkb_symbols "dk_nodeadkeys" { + include "nokia_vndr/su-8w(no_nodeadkeys)" +}; + + + +partial alphanumeric_keys default +xkb_symbols "de" { + name[Group1]= "German"; + include "nokia_vndr/su-8w(base)" + + key { [ 1, exclam, dead_circumflex ] }; + key { [ 2, quotedbl, at ] }; + key { [ 3, numbersign, EuroSign ] }; + key { [ 4, currency, dollar ] }; + key { [ 5, percent, sterling ] }; + key { [ 6, ampersand ] }; + key { [ 7, slash, braceleft ] }; + key { [ 8, parenleft, bracketleft ] }; + key { [ 9, parenright, bracketright ] }; + key { [ 0, equal, braceright ] }; + key { [ plus, question ] }; + key { [ dead_acute, dead_grave, backslash ] }; + + key { [ q, Q, dead_circumflex ] }; + key { [ w, W, at ] }; + key { [ e, E, EuroSign ] }; + key { [ r, R, dollar ] }; + key { [ t, T, sterling ] }; + key { [ z, Z ] }; + key { [ u, U, braceleft ] }; + key { [ i, I, bracketleft ] }; + key { [ o, O, bracketright ] }; + key { [ p, P, braceright ] }; + key { [ udiaeresis, Udiaeresis ] }; + key { [ ssharp, ssharp, backslash ] }; + + key { [ a, A ] }; + key { [ s, S ] }; + key { [ d, D ] }; + key { [ f, F ] }; + key { [ g, G ] }; + key { [ h, H ] }; + key { [ j, J ] }; + key { [ k, K ] }; + key { [ l, L ] }; + key { [ odiaeresis, Odiaeresis ] }; + key { [ adiaeresis, Adiaeresis ] }; + + key { [ y, Y ] }; + key { [ x, X ] }; + key { [ c, C ] }; + key { [ v, V ] }; + key { [ b, B ] }; + key { [ n, N ] }; + key { [ m, M ] }; + key { [ comma, semicolon, less ] }; + key { [ period, colon, greater ] }; + // XXX Inexplicably, the diaeresis is dead on other layouts, but not + // German. Go figure. + key { [ minus, underscore, diaeresis ] }; + + include "level3(ralt_switch)" +}; + +partial alphanumeric_keys +xkb_symbols "de_nodeadkeys" { + name[Group1] = "German (no dead keys)"; + + include "nokia_vndr/su-8w(de)" + + key { [ 1, exclam, asciicircum ] }; + key { [ acute, grave, backslash ] }; + key { [ q, Q, asciicircum ] }; +}; + + + +partial alphanumeric_keys default +xkb_symbols "se" { + name[Group1]= "Finnish/Swedish"; + + include "nokia_vndr/su-8w(base)" + + key { [ 1, exclam, dead_circumflex ] }; + key { [ 2, quotedbl, at ] }; + key { [ 3, numbersign, EuroSign ] }; + key { [ 4, currency, dollar ] }; + key { [ 5, percent, sterling ] }; + key { [ 6, ampersand ] }; + key { [ 7, slash, braceleft ] }; + key { [ 8, parenleft, bracketleft ] }; + key { [ 9, parenright, bracketright ] }; + key { [ 0, equal, braceright ] }; + key { [ plus, question ] }; + key { [ dead_acute, dead_grave, backslash ] }; + + key { [ q, Q, dead_circumflex ] }; + key { [ w, W, at ] }; + key { [ e, E, EuroSign ] }; + key { [ r, R, dollar ] }; + key { [ t, T, sterling ] }; + key { [ y, Y ] }; + key { [ u, U, braceleft ] }; + key { [ i, I, bracketleft ] }; + key { [ o, O, bracketright ] }; + key { [ p, P, braceright ] }; + key { [ aring, Aring ] }; + key { [ ssharp, ssharp, backslash ] }; + + key { [ a, A ] }; + key { [ s, S ] }; + key { [ d, D ] }; + key { [ f, F ] }; + key { [ g, G ] }; + key { [ h, H ] }; + key { [ j, J ] }; + key { [ k, K ] }; + key { [ l, L ] }; + key { [ odiaeresis, Odiaeresis ] }; + key { [ adiaeresis, Adiaeresis ] }; + + key { [ z, Z ] }; + key { [ x, X ] }; + key { [ c, C ] }; + key { [ v, V ] }; + key { [ b, B ] }; + key { [ n, N ] }; + key { [ m, M ] }; + key { [ comma, semicolon, less ] }; + key { [ period, colon, greater ] }; + key { [ minus, underscore, dead_diaeresis ] }; + + include "level3(ralt_switch)" +}; + +partial alphanumeric_keys +xkb_symbols "se_nodeadkeys" { + name[Group1] = "Finnish/Swedish (no dead keys)"; + + include "nokia_vndr/su-8w(se)" + + key { [ 1, exclam, asciicircum ] }; + key { [ acute, grave, backslash ] }; + key { [ q, Q, asciicircum ] }; + key { [ minus, underscore, diaeresis ] }; +}; + +partial alphanumeric_keys default +xkb_symbols "fi" { + include "nokia_vndr/su-8w(se)" +}; + +xkb_symbols "fi_nodeadkeys" { + include "nokia_vndr/su-8w(se_nodeadkeys)" +}; + + + +// Russian layout on first two levels, US layout on third and fourth. +partial alphanumeric_keys default +xkb_symbols "ru" { + name[Group1]= "Russian"; + + include "nokia_vndr/su-8w(base)" + + // XXX Would be nice if this actually generated a tilde. + key { [ Cyrillic_io, Cyrillic_IO, grave ] }; + key { [ 1, exclam, exclam, exclam ] }; + key { [ 2, at, quotedbl, at ] }; + key { [ 3, numbersign, numbersign, numbersign ] }; + key { [ 4, dollar, currency, dollar ] }; + key { [ 5, percent, percent, percent ] }; + key { [ 6, dead_circumflex, ampersand, asciicircum ] }; + key { [ 7, ampersand, slash, ampersand ] }; + key { [ 8, asterisk, parenleft, asterisk ] }; + key { [ 9, parenleft, parenright, parenleft ] }; + key { [ 0, parenright, equal, parenright ] }; + key { [ minus, underscore, plus, question ] }; + key { [ equal, plus, equal, plus ] }; + + key { [ Cyrillic_shorti, Cyrillic_SHORTI, q, Q ] }; + key { [ Cyrillic_tse, Cyrillic_TSE, w, W ] }; + key { [ Cyrillic_u, Cyrillic_U, e, E ] }; + key { [ Cyrillic_ka, Cyrillic_KA, r, R ] }; + key { [ Cyrillic_ie, Cyrillic_IE, t, T ] }; + key { [ Cyrillic_en, Cyrillic_EN, y, Y ] }; + key { [ Cyrillic_ghe, Cyrillic_GHE, u, U ] }; + key { [ Cyrillic_sha, Cyrillic_SHA, i, I ] }; + key { [ Cyrillic_shcha, Cyrillic_SHCHA, o, O ] }; + key { [ Cyrillic_ze, Cyrillic_ZE, p, P ] }; + key { [ Cyrillic_ha, Cyrillic_HA, bracketleft, braceleft ] }; + key { [ Cyrillic_hardsign, Cyrillic_HARDSIGN, bracketright, braceright ] }; + + key { [ Cyrillic_ef, Cyrillic_EF, a, A ] }; + key { [ Cyrillic_yeru, Cyrillic_YERU, s, S ] }; + key { [ Cyrillic_ve, Cyrillic_VE, d, D ] }; + key { [ Cyrillic_a, Cyrillic_A, f, F ] }; + key { [ Cyrillic_pe, Cyrillic_PE, g, G ] }; + key { [ Cyrillic_er, Cyrillic_ER, h, H ] }; + key { [ Cyrillic_o, Cyrillic_O, j, J ] }; + key { [ Cyrillic_el, Cyrillic_EL, k, K ] }; + key { [ Cyrillic_de, Cyrillic_DE, l, L ] }; + key { [ Cyrillic_zhe, Cyrillic_ZHE, semicolon, colon ] }; + key { [ Cyrillic_e, Cyrillic_E, apostrophe, quotedbl ] }; + + key { [ Cyrillic_ya, Cyrillic_YA, z, Z ] }; + key { [ Cyrillic_che, Cyrillic_CHE, x, X ] }; + key { [ Cyrillic_es, Cyrillic_ES, c, C ] }; + key { [ Cyrillic_em, Cyrillic_EM, v, V ] }; + key { [ Cyrillic_i, Cyrillic_I, b, B ] }; + key { [ Cyrillic_te, Cyrillic_TE, n, N ] }; + key { [ Cyrillic_softsign, Cyrillic_SOFTSIGN, m, M ] }; + key { [ Cyrillic_be, Cyrillic_BE, comma, less ] }; + key { [ Cyrillic_yu, Cyrillic_YU, period, greater ] }; + key { [ slash, question, slash, question ] }; + + include "level3(ralt_switch)" +}; + +partial alphanumeric_keys +xkb_symbols "ru_nodeadkeys" { + name[Group1] = "Russian - no dead keys"; + + include "nokia_vndr/su-8w(ru)" + + key { [ 6, asciicircum, ampersand, asciicircum ] }; +}; + + + +partial alphanumeric_keys default +xkb_symbols "us" { + name[Group1]= "U.S. English - International"; + + include "nokia_vndr/su-8w(base)" + + // I can't believe it's not us(intl). + key { [ 1, exclam, exclamdown ] }; + key { [ 2, at, twosuperior ] }; + key { [ 3, numbersign ] }; + key { [ 4, dollar, currency ] }; + key { [ 5, percent, EuroSign ] }; + key { [ 6, asciicircum, onequarter ] }; + key { [ 7, ampersand, onehalf ] }; + key { [ 8, asterisk, threequarters ] }; + key { [ 9, parenleft, leftsinglequotemark ] }; + key { [ 0, parenright, rightsinglequotemark ] }; + key { [ minus, underscore, yen ] }; + key { [ equal, plus, multiply ] }; + + key { [ q, Q, adiaeresis, Adiaeresis ] }; + key { [ w, W, aring, Aring ] }; + key { [ e, E, eacute, Eacute ] }; + key { [ r, R, registered ] }; + key { [ t, T, thorn, THORN ] }; + key { [ y, Y, udiaeresis, Udiaeresis ] }; + key { [ u, U, uacute, Uacute ] }; + key { [ i, I, iacute, Iacute ] }; + key { [ o, O, oacute, Oacute ] }; + key { [ p, P, odiaeresis, Odiaeresis ] }; + key { [ bracketleft, braceleft, guillemotleft ] }; + key { [ bracketright, braceright, guillemotright ] }; + + key { [ a, A, aacute, Aacute ] }; + key { [ s, S, ssharp, section ] }; + key { [ d, D, eth, ETH ] }; + key { [ f, F ] }; + key { [ g, G ] }; + key { [ h, H ] }; + key { [ j, J ] }; + key { [ k, K ] }; + key { [ l, L, oslash, Ooblique ] }; + key { [ semicolon, colon, paragraph, degree ] }; + // XXX Not entirely sure if fourth level is quotedbl or diaeresis. + // The former makes a lot more sense. + key { [ dead_acute, dead_diaeresis, apostrophe, quotedbl ] }; + + key { [ z, Z, ae, AE ] }; + key { [ x, X ] }; + key { [ c, C, copyright ] }; + key { [ v, V ] }; + key { [ b, B ] }; + key { [ n, N, ntilde, Ntilde ] }; + key { [ m, M, mu ] }; + key { [ comma, less, ccedilla, Ccedilla ] }; + key { [ period, greater ] }; + key { [ slash, question, questiondown ] }; + + include "level3(ralt_switch)" +}; + +partial alphanumeric_keys +xkb_symbols "us_nodeadkeys" { + name[Group1] = "U.S. English - no dead keys"; + + include "nokia_vndr/su-8w(us_intl)" + + // XXX Not entirely sure if second level is quotedbl or diaeresis. + // The former makes a lot more sense. + key { [ apostrophe, quotedbl, dead_acute, dead_diaeresis ] }; +}; + + + +partial default alphanumeric_keys +xkb_symbols "base" { + // forked from from pc(pc105); madness. + key { [ Escape ] }; + + // the extra key on most European keyboards + key { [ less, greater, bar, brokenbar ] }; + + // these keys are common to all layouts + key { [ backslash, bar ] }; + key { [ space ] }; + + key { [ BackSpace ] }; + + key { [ Tab, ISO_Left_Tab ] }; + key { [ Return ] }; + // we don't ever generate this key, but the VKB needs it always. + key { [ KP_Enter ] }; + // generated from the headset, must always be in the map. + key { [ XF86Phone ] }; + + key { [ Caps_Lock ] }; + + key { [ Num_Lock, Pointer_EnableKeys ] }; + + key { [ Shift_L ] }; + key { [ Control_L ] }; + key { [ Alt_L, Meta_L ] }; + key { [ Super_L ] }; + + key { [ Shift_R ] }; + key { [ Control_R ] }; + key { [ Alt_R, Meta_R ] }; + key { [ Super_R ] }; + + key

{ [ Menu ] }; + + key { [ F1 ] }; + key { [ F2 ] }; + key { [ F3 ] }; + key { [ F4 ] }; + key { [ F5 ] }; + key { [ F6 ] }; + key { [ F7 ] }; + key { [ F8 ] }; + key { [ F9 ] }; + key { [ F11 ] }; + key { [ F10 ] }; + key { [ F12 ] }; + + // begin modifier mappings + modifier_map Shift { Shift_L, Shift_R }; + modifier_map Lock { Caps_Lock, ISO_Lock }; + modifier_map Control{ Control_L, Control_R }; + modifier_map Mod2 { Num_Lock }; + + // Fake keys for virtual<->real modifiers mapping + key { [ ISO_Level3_Shift ] }; + key { [ Mode_switch ] }; + modifier_map Mod5 { , }; + + key { [ NoSymbol, Alt_L ] }; + modifier_map Mod1 { , }; + + key { [ NoSymbol, Meta_L ] }; + modifier_map Mod1 { }; + + key { [ NoSymbol, Super_L ] }; + modifier_map Mod4 { }; + + key { [ NoSymbol, Hyper_L ] }; + modifier_map Mod4 { }; + + key { [ Insert ] }; + key { [ Delete ] }; + key { [ End ] }; + key { [ Up ] }; + key { [ Left ] }; + key { [ Down ] }; + key { [ Right ] }; + + // True for all layouts (except for ru). + key { [ grave, asterisk, asciitilde ] }; + + // SU-8W uses 140 for Home, not the normal keycode. Very useful. + key { [ NoSymbol ] }; + // Ditto LWIN/RWIN and Page Up/Page Down. + key { [ none ] }; + key { [ NoSymbol ] }; + + // The LWIN & RWIN keys correspond to the 'select left' and + // 'select right' keys. + key { [ Prior ] }; + key { [ Next ] }; + + key { [ Home ] }; + key { [ Menu ] }; + key { [ XF86Mail ] }; + + // Power button. + key { [ Execute ] }; +}; diff --git a/Xorg/xorg/data/xkeyboard-config/Makefile b/Xorg/xorg/data/xkeyboard-config/Makefile new file mode 100644 index 0000000..dc6079c --- /dev/null +++ b/Xorg/xorg/data/xkeyboard-config/Makefile @@ -0,0 +1,40 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xkeyboard-config +PKG_VERSION:=1.7 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://xlibs.freedesktop.org/xkbdesc/ +PKG_MD5SUM:=d351c0109fac166edcedad32d1b0e38e + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/xkeyboard-config + SECTION:=xorg-data + CATEGORY:=Xorg + SUBMENU:=data + TITLE:=xkeyboard-config + DEPENDS:=+xkbcomp + URL:=http://freedesktop.org/wiki/Software/XKeyboardConfig +endef + +define Package/xkeyboard-config/install + $(INSTALL_DIR) $(1)/usr/share/X11 + $(CP) $(PKG_INSTALL_DIR)/usr/share/X11/xkb $(1)/usr/share/X11/ +endef + +$(eval $(call RequireCommand,intltool-update, \ + $(PKG_NAME) requires intltool installed on the host-system. \ +)) + +$(eval $(call BuildPackage,xkeyboard-config)) diff --git a/Xorg/xorg/driver/xf86-input-evdev/Makefile b/Xorg/xorg/driver/xf86-input-evdev/Makefile new file mode 100644 index 0000000..99cd18c --- /dev/null +++ b/Xorg/xorg/driver/xf86-input-evdev/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xf86-input-evdev +PKG_RELEASE:=2 +PKG_VERSION:=2.3.0 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/driver +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=21dac6461379d67ee3b333c77f63e7bf + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +PKG_BUILD_DEPENDS:=randrproto inputproto xproto + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, xorg-driver.mk) + +define Package/xf86-input-evdev + SECTION:=xorg-driver + CATEGORY:=Xorg + SUBMENU:=driver + DEPENDS:=+xserver-xorg + TITLE:=xf86-input-evdev + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xf86-input-evdev/install + $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/input + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/input/evdev_drv.so \ + $(1)/usr/lib/xorg/modules/input/ +endef + +$(eval $(call BuildPackage,xf86-input-evdev)) diff --git a/Xorg/xorg/driver/xf86-input-keyboard/Makefile b/Xorg/xorg/driver/xf86-input-keyboard/Makefile new file mode 100644 index 0000000..39110ff --- /dev/null +++ b/Xorg/xorg/driver/xf86-input-keyboard/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xf86-input-keyboard +PKG_VERSION:=1.4.0 +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/driver +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=fd17158ffeacecc8cc670604460cb98b + +PKG_BUILD_DEPENDS:=randrproto inputproto kbproto xproto +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, xorg-driver.mk) + +define Package/xf86-input-keyboard + SECTION:=xorg-driver + CATEGORY:=Xorg + SUBMENU:=driver + DEPENDS:=+xserver-xorg + TITLE:=xf86-input-keyboard + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xf86-input-keyboard/install + $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/input + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/input/kbd_drv.so \ + $(1)/usr/lib/xorg/modules/input/ +endef + +$(eval $(call BuildPackage,xf86-input-keyboard)) diff --git a/Xorg/xorg/driver/xf86-input-mouse/Makefile b/Xorg/xorg/driver/xf86-input-mouse/Makefile new file mode 100644 index 0000000..76b0110 --- /dev/null +++ b/Xorg/xorg/driver/xf86-input-mouse/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xf86-input-mouse +PKG_VERSION:=1.5.0 +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/driver +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=c58629fddf0782dad5c02da6aeb35521 + +PKG_BUILD_DEPENDS:=randrproto inputproto xproto +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, xorg-driver.mk) + +define Package/xf86-input-mouse + SECTION:=xorg-driver + CATEGORY:=Xorg + SUBMENU:=driver + DEPENDS:=+xserver-xorg + TITLE:=xf86-input-mouse + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xf86-input-mouse/install + $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/input + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/input/mouse_drv.so \ + $(1)/usr/lib/xorg/modules/input/ +endef + +$(eval $(call BuildPackage,xf86-input-mouse)) diff --git a/Xorg/xorg/driver/xf86-video-ati/Makefile b/Xorg/xorg/driver/xf86-video-ati/Makefile new file mode 100644 index 0000000..7b3f272 --- /dev/null +++ b/Xorg/xorg/driver/xf86-video-ati/Makefile @@ -0,0 +1,73 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=xf86 +PKG_NAME:=xf86-video-ati +PKG_RELEASE:=1 +PKG_VERSION:=6.12.4 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/driver +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/${PKG_NAME}-$(PKG_VERSION)/ +PKG_MD5SUM:=e662348f6f957fcedf52818d668ab9f5 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, xorg-driver.mk) + +define Package/xf86-video-ati + SECTION:=xorg-driver + CATEGORY:=Xorg + SUBMENU:=driver + DEPENDS:=+xserver-xorg @TARGET_x86 @BROKEN + TITLE:=xf86-video-ati + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +EXTRA_CPPFLAGS= -I$(STAGING_DIR)/usr/include/xorg \ + -I$(STAGING_DIR)/usr/include/X11/ \ + $(TARGET_CPPFLAGS) + +EXTRA_CFLAGS+= $(EXTRA_CPPFLAGS) + +acvar=$(subst -,_,$(subst .,_,$(subst /,_,$(1)))) + +CONFIGURE_VARS +=DRI_CFLAGS="-I$(STAGING_DIR)/usr/include/X11/dri/" ac_cv_file__usr_share_sgml_X11_defs_ent=yes \ + sdkdir=$(STAGING_DIR) + +define Build/Configure + (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \ + if [ -x $(CONFIGURE_CMD) ]; then \ + $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \ + $(foreach a,dri.h sarea.h dristruct.h exa.h damage.h,export ac_cv_file_$(call acvar,$(STAGING_DIR)/usr/include/xorg/$(a))=yes;) \ + sed -i "s|sdkdir=.*|sdkdir=$(STAGING_DIR)/usr/include/xorg|g" $(PKG_BUILD_DIR)/configure ;\ + $(CONFIGURE_VARS) \ + $(CONFIGURE_CMD) \ + $(CONFIGURE_ARGS_XTRA) \ + $(CONFIGURE_ARGS) \ + CPPFLAGS="$(EXTRA_CPPFLAGS)" ;\ + fi \ + ) +endef + +define Build/Compile + make -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name *a | xargs rm -rf +endef + +define Package/xf86-video-ati/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,xf86-video-ati)) diff --git a/Xorg/xorg/driver/xf86-video-fbdev/Makefile b/Xorg/xorg/driver/xf86-video-fbdev/Makefile new file mode 100644 index 0000000..3b68ad5 --- /dev/null +++ b/Xorg/xorg/driver/xf86-video-fbdev/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xf86-video-fbdev +PKG_VERSION:=0.4.1 +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/driver +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=79ce1eb9f9d2ed56de70d8e06cb767d9 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, xorg-driver.mk) + +define Package/xf86-video-fbdev + SECTION:=xorg-driver + CATEGORY:=Xorg + SUBMENU:=driver + DEPENDS:=+xserver-xorg +libpciaccess + TITLE:=xf86-video-fbdev + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-pciaccess \ + ) +endef + +define Package/xf86-video-fbdev/install + $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/drivers + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/drivers/*.so \ + $(1)/usr/lib/xorg/modules/drivers +endef + +$(eval $(call BuildPackage,xf86-video-fbdev)) diff --git a/Xorg/xorg/driver/xf86-video-geode/Makefile b/Xorg/xorg/driver/xf86-video-geode/Makefile new file mode 100644 index 0000000..b53ed85 --- /dev/null +++ b/Xorg/xorg/driver/xf86-video-geode/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xf86-video-geode +PKG_RELEASE:=1 +PKG_VERSION:=2.11.6 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/driver/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=3ff0dfb4b3bd8872c6efb70371cb6b98 + +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_BUILD_DEPENDS:=randrproto renderproto videoproto xextproto xf86dgaproto \ + xproto fontsproto +PKG_INSTALL:=1 + + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, xorg-driver.mk) + +define Package/xf86-video-geode + SECTION:=xorg-driver + CATEGORY:=Xorg + SUBMENU:=driver + DEPENDS:=+xserver-xorg +libpciaccess @TARGET_x86 + TITLE:=xf86-video-geode + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xf86-video-geode/install + $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/drivers + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/drivers/*.so \ + $(1)/usr/lib/xorg/modules/drivers/ +endef + +$(eval $(call BuildPackage,xf86-video-geode)) diff --git a/Xorg/xorg/driver/xf86-video-intel/Makefile b/Xorg/xorg/driver/xf86-video-intel/Makefile new file mode 100644 index 0000000..f1c7110 --- /dev/null +++ b/Xorg/xorg/driver/xf86-video-intel/Makefile @@ -0,0 +1,76 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=xf86 +PKG_NAME:=xf86-video-intel +PKG_RELEASE:=1 +PKG_VERSION:=2.9.1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/driver +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/${PKG_NAME}-$(PKG_VERSION)/ +PKG_BUILD_DEPENDS:=xf86driproto glproto + +PKG_MD5SUM:=8951d0366c16991badb7f9050556f4f3 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, xorg-driver.mk) + +define Package/xf86-video-intel + SECTION:=xorg-driver + CATEGORY:=Xorg + SUBMENU:=driver + DEPENDS:=+xserver-xorg @TARGET_x86 + TITLE:=xf86-video-intel + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +EXTRA_CPPFLAGS= -I$(STAGING_DIR)/usr/include/xorg \ + -I$(STAGING_DIR)/usr/include/X11/ \ + -I$(STAGING_DIR)/usr/include/drm \ + $(TARGET_CPPFLAGS) + +EXTRA_CFLAGS+= $(EXTRA_CPPFLAGS) + +acvar=$(subst -,_,$(subst .,_,$(subst /,_,$(1)))) + +CONFIGURE_VARS +=DRI_CFLAGS="-I$(STAGING_DIR)/usr/include/X11/dri/" ac_cv_file__usr_share_sgml_X11_defs_ent=yes \ + sdkdir=$(STAGING_DIR) + +define Build/Configure + (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \ + if [ -x $(CONFIGURE_CMD) ]; then \ + $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \ + $(foreach a,dri.h sarea.h dristruct.h exa.h damage.h,export ac_cv_file_$(call acvar,$(STAGING_DIR)/usr/include/xorg/$(a))=yes;) \ + sed -i "s|sdkdir=.*|sdkdir=$(STAGING_DIR)/usr/include/xorg|g" $(PKG_BUILD_DIR)/configure ;\ + $(CONFIGURE_VARS) \ + $(CONFIGURE_CMD) \ + $(CONFIGURE_ARGS_XTRA) \ + $(CONFIGURE_ARGS) \ + CPPFLAGS="$(EXTRA_CPPFLAGS)" ;\ + fi \ + ) +endef + +define Build/Compile + make -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name *a | xargs rm -rf +endef + +define Package/xf86-video-intel/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,xf86-video-intel)) diff --git a/Xorg/xorg/driver/xf86-video-nv/Makefile b/Xorg/xorg/driver/xf86-video-nv/Makefile new file mode 100644 index 0000000..11bff5f --- /dev/null +++ b/Xorg/xorg/driver/xf86-video-nv/Makefile @@ -0,0 +1,73 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=xf86 +PKG_NAME:=xf86-video-nv +PKG_RELEASE:=3 +PKG_VERSION:=2.1.15 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/driver +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/${PKG_NAME}-$(PKG_VERSION)/ +PKG_MD5SUM:=1b22188bd9012a148206940708b52ea6 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, xorg-driver.mk) + +define Package/xf86-video-nv + SECTION:=xorg-driver + CATEGORY:=Xorg + SUBMENU:=driver + DEPENDS:=+xserver-xorg @TARGET_x86 + TITLE:=xf86-video-nv + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +EXTRA_CPPFLAGS= -I$(STAGING_DIR)/usr/include/xorg \ + -I$(STAGING_DIR)/usr/include/X11/ \ + $(TARGET_CPPFLAGS) + +EXTRA_CFLAGS+= $(EXTRA_CPPFLAGS) + +acvar=$(subst -,_,$(subst .,_,$(subst /,_,$(1)))) + +CONFIGURE_VARS +=DRI_CFLAGS="-I$(STAGING_DIR)/usr/include/X11/dri/" ac_cv_file__usr_share_sgml_X11_defs_ent=yes \ + sdkdir=$(STAGING_DIR) + +define Build/Configure + (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \ + if [ -x $(CONFIGURE_CMD) ]; then \ + $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \ + $(foreach a,dri.h sarea.h dristruct.h exa.h damage.h,export ac_cv_file_$(call acvar,$(STAGING_DIR)/usr/include/xorg/$(a))=yes;) \ + sed -i "s|sdkdir=.*|sdkdir=$(STAGING_DIR)/usr/include/xorg|g" $(PKG_BUILD_DIR)/configure ;\ + $(CONFIGURE_VARS) \ + $(CONFIGURE_CMD) \ + $(CONFIGURE_ARGS_XTRA) \ + $(CONFIGURE_ARGS) \ + CPPFLAGS="$(EXTRA_CPPFLAGS)" ;\ + fi \ + ) +endef + +define Build/Compile + make -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name *a | xargs rm -rf +endef + +define Package/xf86-video-nv/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,xf86-video-nv)) diff --git a/Xorg/xorg/driver/xf86-video-omap/Makefile b/Xorg/xorg/driver/xf86-video-omap/Makefile new file mode 100644 index 0000000..9b80225 --- /dev/null +++ b/Xorg/xorg/driver/xf86-video-omap/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xf86-video-omapfb +PKG_VERSION:=20100810 +PKG_REV:=db636c8436265c3d86c5b8e00785e45d55825c80 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://git.pingu.fi/xf86-video-omapfb +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, xorg-driver.mk) + +define Package/xf86-video-omapfb + SECTION:=xorg-driver + CATEGORY:=Xorg + SUBMENU:=driver + DEPENDS:=+xserver-xorg + TITLE:=xf86-video-omapfb + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); ./autogen.sh) + $(call Build/Configure/Default) +endef + +define Package/xf86-video-omapfb/install + $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/drivers + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/drivers/*.so \ + $(1)/usr/lib/xorg/modules/drivers +endef + +$(eval $(call BuildPackage,xf86-video-omapfb)) diff --git a/Xorg/xorg/driver/xf86-video-omap/patches/001-misc-fixes.patch b/Xorg/xorg/driver/xf86-video-omap/patches/001-misc-fixes.patch new file mode 100644 index 0000000..007179f --- /dev/null +++ b/Xorg/xorg/driver/xf86-video-omap/patches/001-misc-fixes.patch @@ -0,0 +1,24 @@ +--- + src/omapfb-driver.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- xf86-video-omapfb-20100810.orig/src/omapfb-driver.c ++++ xf86-video-omapfb-20100810/src/omapfb-driver.c +@@ -182,7 +182,7 @@ OMAPFBProbe(DriverPtr drv, int flags) + return FALSE; + + /* FIXME: We don't really want to do it like this... */ +-#define DEFAULT_DEVICE "/dev/fb" ++#define DEFAULT_DEVICE "/dev/fb0" + + for (i = 0; i < numDevSections; i++) { + int fd; +@@ -831,7 +831,7 @@ static XF86ModuleVersionInfo OMAPFBVersR + MODINFOSTRING1, + MODINFOSTRING2, + XORG_VERSION_CURRENT, +- PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL, ++ 99, 99, 99, + ABI_CLASS_VIDEODRV, + ABI_VIDEODRV_VERSION, + NULL, diff --git a/Xorg/xorg/driver/xf86-video-vesa/Makefile b/Xorg/xorg/driver/xf86-video-vesa/Makefile new file mode 100644 index 0000000..d48860d --- /dev/null +++ b/Xorg/xorg/driver/xf86-video-vesa/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xf86-video-vesa +PKG_RELEASE:=1 +PKG_VERSION:=2.2.1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/driver +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +PKG_MD5SUM:=61a1dc9a22991bd04d0ff98f800775c1 +PKG_BUILD_DEPENDS:=xproto fontsproto randrproto renderproto xextproto +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, xorg-driver.mk) + + +define Package/xf86-video-vesa + SECTION:=xorg-driver + CATEGORY:=Xorg + SUBMENU:=driver + DEPENDS:=+xserver-xorg +libpciaccess @TARGET_x86 + TITLE:=xf86-video-vesa + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xf86-video-vesa/install + $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/drivers + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/drivers/vesa_drv.so \ + $(1)/usr/lib/xorg/modules/drivers/ +endef + +$(eval $(call BuildPackage,xf86-video-vesa)) diff --git a/Xorg/xorg/driver/xf86-video-vesa/patches/010-dont-mess-up-include-paths.patch b/Xorg/xorg/driver/xf86-video-vesa/patches/010-dont-mess-up-include-paths.patch new file mode 100644 index 0000000..0ae58f3 --- /dev/null +++ b/Xorg/xorg/driver/xf86-video-vesa/patches/010-dont-mess-up-include-paths.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -20787,7 +20787,7 @@ fi + + + CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src' +-INCLUDES="$XORG_INCS -I${sdkdir} "'-I$(top_srcdir)/src -I$(prefix)/include' ++INCLUDES="$XORG_INCS -I${sdkdir} "'-I$(top_srcdir)/src' + + + diff --git a/Xorg/xorg/font/encodings/Makefile b/Xorg/xorg/font/encodings/Makefile new file mode 100644 index 0000000..9ffc949 --- /dev/null +++ b/Xorg/xorg/font/encodings/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=encodings +PKG_NAME:=encodings +PKG_RELEASE:=2 +PKG_VERSION:=1.0.2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_MD5SUM:=11adda157b03d63fd61d95ad7ef00466 + +include $(INCLUDE_DIR)/package.mk + +define Package/encodings + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + DEPENDS:= +xserver +font-util @DISPLAY_SUPPORT + TITLE:=encodings + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + sed -i '1d' {} + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + mv {} {}.encodings +endef + +define Package/encodings/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/encodings/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.encodings` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +ifeq (encodings,font-util) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ +endef +endif + +$(eval $(call BuildPackage,encodings)) + diff --git a/Xorg/xorg/font/font-alias/Makefile b/Xorg/xorg/font/font-alias/Makefile new file mode 100644 index 0000000..57ec02f --- /dev/null +++ b/Xorg/xorg/font/font-alias/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=font +PKG_NAME:=font-alias +PKG_RELEASE:=2 +PKG_VERSION:=1.0.1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_MD5SUM:=c4776b6f0f2ecdb7670b6fe64b5d2a2d + +include $(INCLUDE_DIR)/package.mk + +define Package/font-alias + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + DEPENDS:= +xserver +font-util @DISPLAY_SUPPORT + TITLE:=font-alias + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + sed -i '1d' {} + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + mv {} {}.font-alias +endef + +define Package/font-alias/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/font-alias/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-alias` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +ifeq (font-alias,font-util) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ +endef +endif + +$(eval $(call BuildPackage,font-alias)) + diff --git a/Xorg/xorg/font/font-bh-75dpi/Makefile b/Xorg/xorg/font/font-bh-75dpi/Makefile new file mode 100644 index 0000000..e6a547a --- /dev/null +++ b/Xorg/xorg/font/font-bh-75dpi/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=font +PKG_NAME:=font-bh-75dpi +PKG_RELEASE:=2 +PKG_VERSION:=1.0.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_MD5SUM:=6e51cd02f4ce32e1393e34ab17a9b211 + +include $(INCLUDE_DIR)/package.mk + +define Package/font-bh-75dpi + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + DEPENDS:= +xserver +font-util @DISPLAY_SUPPORT + TITLE:=font-bh-75dpi + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + sed -i '1d' {} + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + mv {} {}.font-bh-75dpi +endef + +define Package/font-bh-75dpi/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/font-bh-75dpi/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-bh-75dpi` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +ifeq (font-bh-75dpi,font-util) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ +endef +endif + +$(eval $(call BuildPackage,font-bh-75dpi)) + diff --git a/Xorg/xorg/font/font-cursor-misc/Makefile b/Xorg/xorg/font/font-cursor-misc/Makefile new file mode 100644 index 0000000..1120f63 --- /dev/null +++ b/Xorg/xorg/font/font-cursor-misc/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=font +PKG_NAME:=font-cursor-misc +PKG_RELEASE:=2 +PKG_VERSION:=1.0.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_MD5SUM:=305fa22cdfefb8f80babd711051a534b + +include $(INCLUDE_DIR)/package.mk + +define Package/font-cursor-misc + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + DEPENDS:= +xserver +font-util @DISPLAY_SUPPORT + TITLE:=font-cursor-misc + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + sed -i '1d' {} + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + mv {} {}.font-cursor-misc +endef + +define Package/font-cursor-misc/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/font-cursor-misc/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-cursor-misc` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +ifeq (font-cursor-misc,font-util) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ +endef +endif + +$(eval $(call BuildPackage,font-cursor-misc)) + diff --git a/Xorg/xorg/font/font-daewoo-misc/Makefile b/Xorg/xorg/font/font-daewoo-misc/Makefile new file mode 100644 index 0000000..398563a --- /dev/null +++ b/Xorg/xorg/font/font-daewoo-misc/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=font +PKG_NAME:=font-daewoo-misc +PKG_RELEASE:=2 +PKG_VERSION:=1.0.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_MD5SUM:=61f9eab48c619af5494d3e384d8d7d79 + +include $(INCLUDE_DIR)/package.mk + +define Package/font-daewoo-misc + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + DEPENDS:= +xserver +font-util @DISPLAY_SUPPORT + TITLE:=font-daewoo-misc + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + sed -i '1d' {} + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + mv {} {}.font-daewoo-misc +endef + +define Package/font-daewoo-misc/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/font-daewoo-misc/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-daewoo-misc` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +ifeq (font-daewoo-misc,font-util) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ +endef +endif + +$(eval $(call BuildPackage,font-daewoo-misc)) + diff --git a/Xorg/xorg/font/font-dec-misc/Makefile b/Xorg/xorg/font/font-dec-misc/Makefile new file mode 100644 index 0000000..107e544 --- /dev/null +++ b/Xorg/xorg/font/font-dec-misc/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=font +PKG_NAME:=font-dec-misc +PKG_RELEASE:=2 +PKG_VERSION:=1.0.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_MD5SUM:=284e554db1c64fb7580a06df01444a2b + +include $(INCLUDE_DIR)/package.mk + +define Package/font-dec-misc + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + DEPENDS:= +xserver +font-util @DISPLAY_SUPPORT + TITLE:=font-dec-misc + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + sed -i '1d' {} + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + mv {} {}.font-dec-misc +endef + +define Package/font-dec-misc/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/font-dec-misc/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-dec-misc` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +ifeq (font-dec-misc,font-util) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ +endef +endif + +$(eval $(call BuildPackage,font-dec-misc)) + diff --git a/Xorg/xorg/font/font-ibm-type1/Makefile b/Xorg/xorg/font/font-ibm-type1/Makefile new file mode 100644 index 0000000..df6b658 --- /dev/null +++ b/Xorg/xorg/font/font-ibm-type1/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=font +PKG_NAME:=font-ibm-type1 +PKG_RELEASE:=2 +PKG_VERSION:=1.0.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_MD5SUM:=8e8733051371e2b51123376b49f5d3ea + +include $(INCLUDE_DIR)/package.mk + +define Package/font-ibm-type1 + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + DEPENDS:= +xserver +font-util @DISPLAY_SUPPORT + TITLE:=font-ibm-type1 + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + sed -i '1d' {} + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + mv {} {}.font-ibm-type1 +endef + +define Package/font-ibm-type1/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/font-ibm-type1/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-ibm-type1` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +ifeq (font-ibm-type1,font-util) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ +endef +endif + +$(eval $(call BuildPackage,font-ibm-type1)) + diff --git a/Xorg/xorg/font/font-isas-misc/Makefile b/Xorg/xorg/font/font-isas-misc/Makefile new file mode 100644 index 0000000..037bebf --- /dev/null +++ b/Xorg/xorg/font/font-isas-misc/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=font +PKG_NAME:=font-isas-misc +PKG_RELEASE:=2 +PKG_VERSION:=1.0.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_MD5SUM:=ec709a96b64b497a5cb5658c93bd38dc + +include $(INCLUDE_DIR)/package.mk + +define Package/font-isas-misc + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + DEPENDS:= +xserver +font-util @DISPLAY_SUPPORT + TITLE:=font-isas-misc + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + sed -i '1d' {} + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + mv {} {}.font-isas-misc +endef + +define Package/font-isas-misc/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/font-isas-misc/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-isas-misc` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +ifeq (font-isas-misc,font-util) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ +endef +endif + +$(eval $(call BuildPackage,font-isas-misc)) + diff --git a/Xorg/xorg/font/font-jis-misc/Makefile b/Xorg/xorg/font/font-jis-misc/Makefile new file mode 100644 index 0000000..b3073f3 --- /dev/null +++ b/Xorg/xorg/font/font-jis-misc/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=font +PKG_NAME:=font-jis-misc +PKG_RELEASE:=2 +PKG_VERSION:=1.0.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_MD5SUM:=61febb49a71065723a1fba17cbf23c67 + +include $(INCLUDE_DIR)/package.mk + +define Package/font-jis-misc + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + DEPENDS:= +xserver +font-util @DISPLAY_SUPPORT + TITLE:=font-jis-misc + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + sed -i '1d' {} + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + mv {} {}.font-jis-misc +endef + +define Package/font-jis-misc/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/font-jis-misc/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-jis-misc` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +ifeq (font-jis-misc,font-util) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ +endef +endif + +$(eval $(call BuildPackage,font-jis-misc)) + diff --git a/Xorg/xorg/font/font-micro-misc/Makefile b/Xorg/xorg/font/font-micro-misc/Makefile new file mode 100644 index 0000000..d8f84dc --- /dev/null +++ b/Xorg/xorg/font/font-micro-misc/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=font +PKG_NAME:=font-micro-misc +PKG_RELEASE:=2 +PKG_VERSION:=1.0.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_MD5SUM:=8c8bffd7540f05caa0dbb4e6e1d6c58e + +include $(INCLUDE_DIR)/package.mk + +define Package/font-micro-misc + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + DEPENDS:= +xserver +font-util @DISPLAY_SUPPORT + TITLE:=font-micro-misc + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + sed -i '1d' {} + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + mv {} {}.font-micro-misc +endef + +define Package/font-micro-misc/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/font-micro-misc/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-micro-misc` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +ifeq (font-micro-misc,font-util) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ +endef +endif + +$(eval $(call BuildPackage,font-micro-misc)) + diff --git a/Xorg/xorg/font/font-misc-cyrillic/Makefile b/Xorg/xorg/font/font-misc-cyrillic/Makefile new file mode 100644 index 0000000..2e1d38c --- /dev/null +++ b/Xorg/xorg/font/font-misc-cyrillic/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=font +PKG_NAME:=font-misc-cyrillic +PKG_RELEASE:=2 +PKG_VERSION:=1.0.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_MD5SUM:=3596907d7a2a99c81d8de99bc4552b6a + +include $(INCLUDE_DIR)/package.mk + +define Package/font-misc-cyrillic + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + DEPENDS:= +xserver +font-util @DISPLAY_SUPPORT + TITLE:=font-misc-cyrillic + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + sed -i '1d' {} + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + mv {} {}.font-misc-cyrillic +endef + +define Package/font-misc-cyrillic/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/font-misc-cyrillic/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-misc-cyrillic` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +ifeq (font-misc-cyrillic,font-util) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ +endef +endif + +$(eval $(call BuildPackage,font-misc-cyrillic)) + diff --git a/Xorg/xorg/font/font-misc-misc/Makefile b/Xorg/xorg/font/font-misc-misc/Makefile new file mode 100644 index 0000000..e6aa36b --- /dev/null +++ b/Xorg/xorg/font/font-misc-misc/Makefile @@ -0,0 +1,135 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=font-base +PKG_NAME:=font-misc-misc +PKG_RELEASE:=1 +PKG_VERSION:=1.0.0 +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=2a57f6188c41d4bc1b88ca3d08ad011d + +include $(INCLUDE_DIR)/package.mk + +define Package/font-misc-misc/Default + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font +endef + +define Package/font-base + $(call Package/font-misc-misc/Default) + DEPENDS:=+xserver +font-util @DISPLAY_SUPPORT + TITLE:=font-base + URL:=http://xorg.freedesktop.org/ +endef + +define Package/font-misc-misc + $(call Package/font-misc-misc/Default) + DEPENDS:=font-base + TITLE:=font-misc-misc + URL:=http://xorg.freedesktop.org/ +endef + + +CONFIGURE_ARGS_XTRA+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs rm +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \ + if [ -x $(CONFIGURE_CMD) ]; then \ + $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \ + $(CONFIGURE_VARS) \ + $(CONFIGURE_CMD) \ + $(CONFIGURE_ARGS_XTRA) \ + $(CONFIGURE_ARGS) ;\ + fi \ + ) +endef + +define Build/InstallDev + DESTDIR=$(1) $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Package/font-base/install + $(INSTALL_DIR) $(1)/usr/lib/X11/fonts/misc/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/X11/fonts/misc/6x13* $(1)/usr/lib/X11/fonts/misc/ + $(CP) files/fonts.dir.font-base $(1)/usr/lib/X11/fonts/misc/ +endef + +define Package/font-misc-misc/install + $(INSTALL_DIR) $(1)/usr/lib/X11/fonts/misc/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/X11/fonts/misc/* $(1)/usr/lib/X11/fonts/misc/ + rm $(1)/usr/lib/X11/fonts/misc/6x13* + $(CP) files/fonts.dir.font-misc-misc $(1)/usr/lib/X11/fonts/misc/ +endef + +define Package/font-base/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-base` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +define Package/font-misc-misc/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-misc-misc` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +# FIXME: replace with native versions +$(eval $(call RequireCommand,mkfontscale, \ + Please install mkfontscale (usually in xfonts-utils) \ +)) +$(eval $(call RequireCommand,mkfontdir, \ + Please install mkfontdir (usually in xfonts-utils) \ +)) + +$(eval $(call BuildPackage,font-misc-misc)) +$(eval $(call BuildPackage,font-base)) + + diff --git a/Xorg/xorg/font/font-misc-misc/files/fonts.dir.font-base b/Xorg/xorg/font/font-misc-misc/files/fonts.dir.font-base new file mode 100644 index 0000000..0158265 --- /dev/null +++ b/Xorg/xorg/font/font-misc-misc/files/fonts.dir.font-base @@ -0,0 +1,9 @@ +6x13-ISO8859-1.pcf.gz -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1 +6x13-ISO8859-15.pcf.gz -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-15 +6x13.pcf.gz -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1 +6x13B-ISO8859-1.pcf.gz -misc-fixed-bold-r-semicondensed--13-120-75-75-c-60-iso8859-1 +6x13B-ISO8859-15.pcf.gz -misc-fixed-bold-r-semicondensed--13-120-75-75-c-60-iso8859-15 +6x13B.pcf.gz -misc-fixed-bold-r-semicondensed--13-120-75-75-c-60-iso10646-1 +6x13O-ISO8859-1.pcf.gz -misc-fixed-medium-o-semicondensed--13-120-75-75-c-60-iso8859-1 +6x13O-ISO8859-15.pcf.gz -misc-fixed-medium-o-semicondensed--13-120-75-75-c-60-iso8859-15 +6x13O.pcf.gz -misc-fixed-medium-o-semicondensed--13-120-75-75-c-60-iso10646-1 diff --git a/Xorg/xorg/font/font-misc-misc/files/fonts.dir.font-misc-misc b/Xorg/xorg/font/font-misc-misc/files/fonts.dir.font-misc-misc new file mode 100644 index 0000000..1adf284 --- /dev/null +++ b/Xorg/xorg/font/font-misc-misc/files/fonts.dir.font-misc-misc @@ -0,0 +1,62 @@ +10x20-ISO8859-1.pcf.gz -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-1 +10x20-ISO8859-15.pcf.gz -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-15 +10x20.pcf.gz -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1 +12x13ja.pcf.gz -misc-fixed-medium-r-normal-ja-13-120-75-75-c-120-iso10646-1 +18x18ja.pcf.gz -misc-fixed-medium-r-normal-ja-18-120-100-100-c-180-iso10646-1 +18x18ko.pcf.gz -misc-fixed-medium-r-normal-ko-18-120-100-100-c-180-iso10646-1 +4x6-ISO8859-1.pcf.gz -misc-fixed-medium-r-normal--6-60-75-75-c-40-iso8859-1 +4x6-ISO8859-15.pcf.gz -misc-fixed-medium-r-normal--6-60-75-75-c-40-iso8859-15 +4x6.pcf.gz -misc-fixed-medium-r-normal--6-60-75-75-c-40-iso10646-1 +5x7-ISO8859-1.pcf.gz -misc-fixed-medium-r-normal--7-70-75-75-c-50-iso8859-1 +5x7-ISO8859-15.pcf.gz -misc-fixed-medium-r-normal--7-70-75-75-c-50-iso8859-15 +5x7.pcf.gz -misc-fixed-medium-r-normal--7-70-75-75-c-50-iso10646-1 +5x8-ISO8859-1.pcf.gz -misc-fixed-medium-r-normal--8-80-75-75-c-50-iso8859-1 +5x8-ISO8859-15.pcf.gz -misc-fixed-medium-r-normal--8-80-75-75-c-50-iso8859-15 +5x8.pcf.gz -misc-fixed-medium-r-normal--8-80-75-75-c-50-iso10646-1 +6x10-ISO8859-1.pcf.gz -misc-fixed-medium-r-normal--10-100-75-75-c-60-iso8859-1 +6x10-ISO8859-15.pcf.gz -misc-fixed-medium-r-normal--10-100-75-75-c-60-iso8859-15 +6x10.pcf.gz -misc-fixed-medium-r-normal--10-100-75-75-c-60-iso10646-1 +6x12-ISO8859-1.pcf.gz -misc-fixed-medium-r-semicondensed--12-110-75-75-c-60-iso8859-1 +6x12-ISO8859-15.pcf.gz -misc-fixed-medium-r-semicondensed--12-110-75-75-c-60-iso8859-15 +6x12.pcf.gz -misc-fixed-medium-r-semicondensed--12-110-75-75-c-60-iso10646-1 +6x9-ISO8859-1.pcf.gz -misc-fixed-medium-r-normal--9-90-75-75-c-60-iso8859-1 +6x9-ISO8859-15.pcf.gz -misc-fixed-medium-r-normal--9-90-75-75-c-60-iso8859-15 +6x9.pcf.gz -misc-fixed-medium-r-normal--9-90-75-75-c-60-iso10646-1 +7x13-ISO8859-1.pcf.gz -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso8859-1 +7x13-ISO8859-15.pcf.gz -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso8859-15 +7x13.pcf.gz -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso10646-1 +7x13B-ISO8859-1.pcf.gz -misc-fixed-bold-r-normal--13-120-75-75-c-70-iso8859-1 +7x13B-ISO8859-15.pcf.gz -misc-fixed-bold-r-normal--13-120-75-75-c-70-iso8859-15 +7x13B.pcf.gz -misc-fixed-bold-r-normal--13-120-75-75-c-70-iso10646-1 +7x13O-ISO8859-1.pcf.gz -misc-fixed-medium-o-normal--13-120-75-75-c-70-iso8859-1 +7x13O-ISO8859-15.pcf.gz -misc-fixed-medium-o-normal--13-120-75-75-c-70-iso8859-15 +7x13O.pcf.gz -misc-fixed-medium-o-normal--13-120-75-75-c-70-iso10646-1 +7x14-ISO8859-1.pcf.gz -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1 +7x14-ISO8859-15.pcf.gz -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-15 +7x14.pcf.gz -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1 +7x14B-ISO8859-1.pcf.gz -misc-fixed-bold-r-normal--14-130-75-75-c-70-iso8859-1 +7x14B-ISO8859-15.pcf.gz -misc-fixed-bold-r-normal--14-130-75-75-c-70-iso8859-15 +7x14B.pcf.gz -misc-fixed-bold-r-normal--14-130-75-75-c-70-iso10646-1 +8x13-ISO8859-1.pcf.gz -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-1 +8x13-ISO8859-15.pcf.gz -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-15 +8x13.pcf.gz -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso10646-1 +8x13B-ISO8859-1.pcf.gz -misc-fixed-bold-r-normal--13-120-75-75-c-80-iso8859-1 +8x13B-ISO8859-15.pcf.gz -misc-fixed-bold-r-normal--13-120-75-75-c-80-iso8859-15 +8x13B.pcf.gz -misc-fixed-bold-r-normal--13-120-75-75-c-80-iso10646-1 +8x13O-ISO8859-1.pcf.gz -misc-fixed-medium-o-normal--13-120-75-75-c-80-iso8859-1 +8x13O-ISO8859-15.pcf.gz -misc-fixed-medium-o-normal--13-120-75-75-c-80-iso8859-15 +8x13O.pcf.gz -misc-fixed-medium-o-normal--13-120-75-75-c-80-iso10646-1 +9x15-ISO8859-1.pcf.gz -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso8859-1 +9x15-ISO8859-15.pcf.gz -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso8859-15 +9x15.pcf.gz -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1 +9x15B-ISO8859-1.pcf.gz -misc-fixed-bold-r-normal--15-140-75-75-c-90-iso8859-1 +9x15B-ISO8859-15.pcf.gz -misc-fixed-bold-r-normal--15-140-75-75-c-90-iso8859-15 +9x15B.pcf.gz -misc-fixed-bold-r-normal--15-140-75-75-c-90-iso10646-1 +9x18-ISO8859-1.pcf.gz -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso8859-1 +9x18-ISO8859-15.pcf.gz -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso8859-15 +9x18.pcf.gz -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1 +9x18B-ISO8859-1.pcf.gz -misc-fixed-bold-r-normal--18-120-100-100-c-90-iso8859-1 +9x18B-ISO8859-15.pcf.gz -misc-fixed-bold-r-normal--18-120-100-100-c-90-iso8859-15 +9x18B.pcf.gz -misc-fixed-bold-r-normal--18-120-100-100-c-90-iso10646-1 +k14.pcf.gz -misc-fixed-medium-r-normal--14-130-75-75-c-140-jisx0208.1983-0 +nil2.pcf.gz -misc-nil-medium-r-normal--2-20-75-75-c-10-misc-fontspecific diff --git a/Xorg/xorg/font/font-xfree86-type1/Makefile b/Xorg/xorg/font/font-xfree86-type1/Makefile new file mode 100644 index 0000000..c4535a7 --- /dev/null +++ b/Xorg/xorg/font/font-xfree86-type1/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=font +PKG_NAME:=font-xfree86-type1 +PKG_RELEASE:=2 +PKG_VERSION:=1.0.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font +PKG_MD5SUM:=e66f36a6d68203cc4cf7b56ebbb192dd + +include $(INCLUDE_DIR)/package.mk + +define Package/font-xfree86-type1 + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + DEPENDS:= +xserver +font-util @DISPLAY_SUPPORT + TITLE:=font-xfree86-type1 + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + sed -i '1d' {} + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + mv {} {}.font-xfree86-type1 +endef + +define Package/font-xfree86-type1/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/font-xfree86-type1/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.font-xfree86-type1` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +ifeq (font-xfree86-type1,font-util) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ +endef +endif + +$(eval $(call BuildPackage,font-xfree86-type1)) + diff --git a/Xorg/xorg/font/packages b/Xorg/xorg/font/packages new file mode 100644 index 0000000..1766b9b --- /dev/null +++ b/Xorg/xorg/font/packages @@ -0,0 +1,12 @@ +encodings-1.0.2| +font-xfree86-type1-1.0.0| +font-cursor-misc-1.0.0| +font-daewoo-misc-1.0.0| +font-dec-misc-1.0.0| +font-ibm-type1-1.0.0| +font-isas-misc-1.0.0| +font-jis-misc-1.0.0| +font-micro-misc-1.0.0| +font-misc-cyrillic-1.0.0| +font-bh-75dpi-1.0.0| +font-alias-1.0.1| diff --git a/Xorg/xorg/font/template.mk b/Xorg/xorg/font/template.mk new file mode 100644 index 0000000..149f894 --- /dev/null +++ b/Xorg/xorg/font/template.mk @@ -0,0 +1,80 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=@BASE_NAME@ +PKG_NAME:=@NAME@ +PKG_RELEASE:=2 +PKG_VERSION:=@VER@ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/ +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/font + +include $(INCLUDE_DIR)/package.mk + +define Package/@NAME@ + SECTION:=xorg-font + CATEGORY:=Xorg + SUBMENU:=font + DEPENDS:=@DEP@ +xorg-server +font-util @DISPLAY_SUPPORT + TITLE:=@NAME@ + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install +endef + +CONFIGURE_ARGS+=--disable-iso8859-2 --disable-iso8859-3 --disable-iso8859-4 --disable-iso8859-5 --disable-iso8859-7 --disable-iso8859-8 --disable-iso8859-9 --disable-iso8859-10 --disable-iso8859-11 --disable-iso8859-13 --disable-iso8859-14 --disable-iso8859-16 --disable-koi8-r --disable-jisx0201 + +define Build/Compile + UTIL_DIR="$(STAGING_DIR)/usr/lib/X11/fonts/util/" make -e -C $(PKG_BUILD_DIR) + DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + sed -i '1d' {} + find $(PKG_INSTALL_DIR) -name fonts.dir | \ + xargs -i -t \ + mv {} {}.@NAME@ +endef + +define Package/@NAME@/install + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Package/@NAME@/postinst +#!/bin/sh + +FILE_NEW=`find $${IPKG_INSTROOT} -name fonts.dir.@NAME@` +FILE_OLD=`dirname $${FILE_NEW}`/fonts.dir + +echo found $${FILE} + +if [ ! -z $${FILE_NEW} ]; then + if [ -f $${FILE_OLD} ]; then + sed -i "1d" $${FILE_OLD} + cat $${FILE_NEW} >> $${FILE_OLD} + rm -rf $${FILE_NEW} + mv $${FILE_OLD} $${FILE_OLD}.tmp + else + mv $${FILE_NEW} $${FILE_OLD}.tmp + fi + (echo `wc -l $${FILE_OLD}.tmp | awk '{print($$1)}'`; cat $${FILE_OLD}.tmp) > $${FILE_OLD} + rm $${FILE_OLD}.tmp +fi +endef + +ifeq (@NAME@,font-util) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ +endef +endif + +$(eval $(call BuildPackage,@NAME@)) + diff --git a/Xorg/xorg/lib/libICE/Makefile b/Xorg/xorg/lib/libICE/Makefile new file mode 100644 index 0000000..bf74d5c --- /dev/null +++ b/Xorg/xorg/lib/libICE/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libICE +PKG_RELEASE:=1 +PKG_VERSION:=1.0.6 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=2d39bc924af24325dae589e9a849180c + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto xtrans + +include $(INCLUDE_DIR)/package.mk + +define Package/libICE + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=libICE + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/ICE} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/ICE/* \ + $(1)/usr/include/X11/ICE/ +endef + +define Package/libICE/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libICE)) diff --git a/Xorg/xorg/lib/libSM/Makefile b/Xorg/xorg/lib/libSM/Makefile new file mode 100644 index 0000000..08dbd64 --- /dev/null +++ b/Xorg/xorg/lib/libSM/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=libSM +PKG_NAME:=libSM +PKG_RELEASE:=2 +PKG_VERSION:=1.1.1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=6889a455496aaaa65b1fa05fc518d179 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto xtrans + +include $(INCLUDE_DIR)/package.mk + +define Package/libSM + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libICE +libuuid + TITLE:=libSM + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/SM} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/SM/* \ + $(1)/usr/include/X11/SM/ +endef + +define Package/libSM/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libSM)) diff --git a/Xorg/xorg/lib/libX11/Makefile b/Xorg/xorg/lib/libX11/Makefile new file mode 100644 index 0000000..6468b04 --- /dev/null +++ b/Xorg/xorg/lib/libX11/Makefile @@ -0,0 +1,87 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libX11 +PKG_RELEASE:=1 +PKG_VERSION:=1.3.2 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=001d780829f936e34851ef7cd37b4dfd + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto xextproto xf86bigfontproto kbproto inputproto \ + xtrans xcmiscproto bigreqsproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libX11 + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libXdmcp +libXau @FEATURE_drawing-backend_libX11 @DISPLAY_SUPPORT + TITLE:=libX11 + URL:=http://xorg.freedesktop.org/ +endef + +define Feature/libX11 + TARGET_NAME:=drawing-backend + TARGET_TITLE:=Drawing Backend + NAME:=libX11 +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-malloc0returnsnull \ + --enable-xf86bigfont \ + --without-xcb \ + --without-launchd \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/src/util \ + CC="$(HOSTCC)" \ + CFLAGS="$(HOST_CFLAGS)" \ + CPPFLAGS="$(HOST_CPPFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" + + $(call Build/Compile/Default) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,la,a} \ + $(1)/usr/lib/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/* \ + $(1)/usr/include/X11/ +endef + +define Package/libX11/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/share/X11 + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/share/X11/* \ + $(1)/usr/share/X11 +endef + +$(eval $(call Feature,libX11)) +$(eval $(call BuildPackage,libX11)) diff --git a/Xorg/xorg/lib/libX11/patches/005-fix-include-path.patch b/Xorg/xorg/lib/libX11/patches/005-fix-include-path.patch new file mode 100644 index 0000000..6d28221 --- /dev/null +++ b/Xorg/xorg/lib/libX11/patches/005-fix-include-path.patch @@ -0,0 +1,143 @@ +diff --git a/modules/im/ximcp/Makefile.in b/modules/im/ximcp/Makefile.in +index 905d526..6027e58 100644 +--- a/modules/im/ximcp/Makefile.in ++++ b/modules/im/ximcp/Makefile.in +@@ -96,7 +96,7 @@ ximcp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(ximcp_la_LDFLAGS) $(LDFLAGS) -o $@ + @XLIB_LOADABLE_I18N_TRUE@am_ximcp_la_rpath = -rpath $(commonlibdir) +-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include -I$(top_builddir)/include/X11 + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f +diff --git a/modules/lc/Utf8/Makefile.in b/modules/lc/Utf8/Makefile.in +index 4078c1c..e7e52fa 100644 +--- a/modules/lc/Utf8/Makefile.in ++++ b/modules/lc/Utf8/Makefile.in +@@ -88,7 +88,7 @@ xlcUTF8Load_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $@ + @XLIB_LOADABLE_I18N_TRUE@am_xlcUTF8Load_la_rpath = -rpath \ + @XLIB_LOADABLE_I18N_TRUE@ $(commonlibdir) +-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include -I$(top_builddir)/include/X11 + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f +diff --git a/modules/lc/def/Makefile.in b/modules/lc/def/Makefile.in +index b37cec6..89ce832 100644 +--- a/modules/lc/def/Makefile.in ++++ b/modules/lc/def/Makefile.in +@@ -86,7 +86,7 @@ xlcDef_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(xlcDef_la_LDFLAGS) $(LDFLAGS) -o $@ + @XLIB_LOADABLE_I18N_TRUE@am_xlcDef_la_rpath = -rpath $(commonlibdir) +-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include -I$(top_builddir)/include/X11 + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f +diff --git a/modules/lc/gen/Makefile.in b/modules/lc/gen/Makefile.in +index 6e2e522..e832723 100644 +--- a/modules/lc/gen/Makefile.in ++++ b/modules/lc/gen/Makefile.in +@@ -86,7 +86,7 @@ xlibi18n_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(xlibi18n_la_LDFLAGS) $(LDFLAGS) -o $@ + @XLIB_LOADABLE_I18N_TRUE@am_xlibi18n_la_rpath = -rpath $(commonlibdir) +-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include -I$(top_builddir)/include/X11 + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f +diff --git a/modules/lc/xlocale/Makefile.in b/modules/lc/xlocale/Makefile.in +index 7c947ee..b68b06e 100644 +--- a/modules/lc/xlocale/Makefile.in ++++ b/modules/lc/xlocale/Makefile.in +@@ -86,7 +86,7 @@ xlocale_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(xlocale_la_LDFLAGS) $(LDFLAGS) -o $@ + @XLIB_LOADABLE_I18N_TRUE@am_xlocale_la_rpath = -rpath $(commonlibdir) +-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include -I$(top_builddir)/include/X11 + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f +diff --git a/modules/om/generic/Makefile.in b/modules/om/generic/Makefile.in +index e39802b..0979207 100644 +--- a/modules/om/generic/Makefile.in ++++ b/modules/om/generic/Makefile.in +@@ -89,7 +89,7 @@ xomGeneric_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(xomGeneric_la_LDFLAGS) $(LDFLAGS) -o $@ + @XLIB_LOADABLE_I18N_TRUE@am_xomGeneric_la_rpath = -rpath \ + @XLIB_LOADABLE_I18N_TRUE@ $(commonlibdir) +-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include -I$(top_builddir)/include/X11 + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f +diff --git a/src/util/Makefile.in b/src/util/Makefile.in +index 65c181e..bfa7c05 100644 +--- a/src/util/Makefile.in ++++ b/src/util/Makefile.in +@@ -59,7 +59,7 @@ am__v_lt_0 = --silent + makekeys_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(makekeys_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include -I$(top_builddir)/include/X11 + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f +diff --git a/src/xcms/Makefile.in b/src/xcms/Makefile.in +index 6573196..a140221 100644 +--- a/src/xcms/Makefile.in ++++ b/src/xcms/Makefile.in +@@ -65,7 +65,7 @@ libxcms_la_OBJECTS = $(am_libxcms_la_OBJECTS) + AM_V_lt = $(am__v_lt_$(V)) + am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) + am__v_lt_0 = --silent +-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include -I$(top_builddir)/include/X11 + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f +diff --git a/src/xkb/Makefile.in b/src/xkb/Makefile.in +index 0e52692..43a9660 100644 +--- a/src/xkb/Makefile.in ++++ b/src/xkb/Makefile.in +@@ -57,7 +57,7 @@ libxkb_la_OBJECTS = $(am_libxkb_la_OBJECTS) + AM_V_lt = $(am__v_lt_$(V)) + am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) + am__v_lt_0 = --silent +-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include -I$(top_builddir)/include/X11 + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f +diff --git a/src/xlibi18n/Makefile.in b/src/xlibi18n/Makefile.in +index 50ac253..6c44c48 100644 +--- a/src/xlibi18n/Makefile.in ++++ b/src/xlibi18n/Makefile.in +@@ -85,7 +85,7 @@ libi18n_la_OBJECTS = $(am_libi18n_la_OBJECTS) + AM_V_lt = $(am__v_lt_$(V)) + am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) + am__v_lt_0 = --silent +-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include -I$(top_builddir)/include/X11 + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f +diff --git a/src/Makefile.in b/src/Makefile.in +index a79daa8..ca7f366 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -218,7 +218,7 @@ libX11_la_OBJECTS = $(am_libX11_la_OBJECTS) + libX11_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libX11_la_LDFLAGS) $(LDFLAGS) -o $@ +-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/X11 ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/ -I$(top_builddir)/include/X11 + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + am__mv = mv -f diff --git a/Xorg/xorg/lib/libX11/patches/010-ignore-groff-warnings.patch b/Xorg/xorg/lib/libX11/patches/010-ignore-groff-warnings.patch new file mode 100644 index 0000000..a83e761 --- /dev/null +++ b/Xorg/xorg/lib/libX11/patches/010-ignore-groff-warnings.patch @@ -0,0 +1,13 @@ +--- a/specs/troffrules.in 2010-01-15 01:11:36.000000000 +0000 ++++ b/specs/troffrules.in 2011-01-24 21:37:01.000000000 +0000 +@@ -49,7 +49,9 @@ + + .ms.ps: + -$(AM_V_GEN) $(GROFF) -Tps $(GROFF_FLAGS) $< 2> index.$@.raw > $@ +- @if grep '^[^1-9.]' index.$@.raw | grep -v warning; then exit 1; \ ++ @if grep '^[^1-9.]' index.$@.raw | grep -v warning | \ ++ grep -v 'table wider than line width'; \ ++ then exit 1; \ + else test $$? -le 1; fi + + .ms.txt: diff --git a/Xorg/xorg/lib/libXau/Makefile b/Xorg/xorg/lib/libXau/Makefile new file mode 100644 index 0000000..74a5908 --- /dev/null +++ b/Xorg/xorg/lib/libXau/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=libXau +PKG_NAME:=libXau +PKG_RELEASE:=1 +PKG_VERSION:=1.0.5 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=993b3185c629e4b89401fca072dcb663 + +PKG_FIXUP:=libtool + +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXau + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=libXau + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/* \ + $(1)/usr/include/X11/ +endef + +define Package/libXau/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXau)) diff --git a/Xorg/xorg/lib/libXaw/Makefile b/Xorg/xorg/lib/libXaw/Makefile new file mode 100644 index 0000000..5733b51 --- /dev/null +++ b/Xorg/xorg/lib/libXaw/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXaw +PKG_RELEASE:=1 +PKG_VERSION:=1.0.7 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=815e74de989ccda684e2baf8d12cf519 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto xextproto printproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXaw + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 +libXext +libXt +libXmu +libXpm +libXau + TITLE:=libXaw + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-xaw6 \ + --disable-xaw8 \ + --disable-docs \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/Xaw} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/Xaw/* \ + $(1)/usr/include/X11/Xaw/ + +endef + +define Package/libXaw/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXaw)) diff --git a/Xorg/xorg/lib/libXaw/patches/001-fix-includes.patch b/Xorg/xorg/lib/libXaw/patches/001-fix-includes.patch new file mode 100644 index 0000000..036523c --- /dev/null +++ b/Xorg/xorg/lib/libXaw/patches/001-fix-includes.patch @@ -0,0 +1,13 @@ +diff --git a/src/Makefile.in b/src/Makefile.in +index eff87e9..3a9834e 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -126,7 +126,7 @@ libXaw7_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libXaw7_la_CFLAGS) \ + $(CFLAGS) $(libXaw7_la_LDFLAGS) $(LDFLAGS) -o $@ + @BUILD_XAW7_TRUE@am_libXaw7_la_rpath = -rpath $(libdir) +-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) ++DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/include + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ diff --git a/Xorg/xorg/lib/libXcomposite/Makefile b/Xorg/xorg/lib/libXcomposite/Makefile new file mode 100644 index 0000000..10f970a --- /dev/null +++ b/Xorg/xorg/lib/libXcomposite/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXcomposite +PKG_RELEASE:=1 +PKG_VERSION:=0.4.1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=0f1367f57fdf5df17a8dd71d0fa68248 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=compositeproto fixesproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXcomposite + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 +libXfixes +libXext + TITLE:=libXcomposite + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/extensions} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/extensions/* \ + $(1)/usr/include/X11/extensions/ +endef + +define Package/libXcomposite/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXcomposite)) diff --git a/Xorg/xorg/lib/libXcursor/Makefile b/Xorg/xorg/lib/libXcursor/Makefile new file mode 100644 index 0000000..d83e5e3 --- /dev/null +++ b/Xorg/xorg/lib/libXcursor/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXcursor +PKG_RELEASE:=1 +PKG_VERSION:=1.1.10 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=7dcdad1c10daea872cb3355af414b2ca + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=fixesproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXcursor + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libXrender +libXfixes +libX11 + TITLE:=libXcursor + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/Xcursor} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/Xcursor/* \ + $(1)/usr/include/X11/Xcursor +endef + +define Package/libXcursor/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXcursor)) diff --git a/Xorg/xorg/lib/libXdamage/Makefile b/Xorg/xorg/lib/libXdamage/Makefile new file mode 100644 index 0000000..34f31b8 --- /dev/null +++ b/Xorg/xorg/lib/libXdamage/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXdamage +PKG_RELEASE:=1 +PKG_VERSION:=1.1.2 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=b42780bce703ec202a33e5693991c09d + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto xextproto fixesproto damageproto + +include $(INCLUDE_DIR)/package.mk + + +define Package/libXdamage + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 +libXfixes + TITLE:=libXdamage + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/extensions} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/extensions/* \ + $(1)/usr/include/X11/extensions/ +endef + +define Package/libXdamage/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXdamage)) diff --git a/Xorg/xorg/lib/libXdmcp/Makefile b/Xorg/xorg/lib/libXdmcp/Makefile new file mode 100644 index 0000000..a8da2c3 --- /dev/null +++ b/Xorg/xorg/lib/libXdmcp/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXdmcp +PKG_RELEASE:=1 +PKG_VERSION:=1.0.3 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=d60941d471800f41a3f19b24bea855a7 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXdmcp + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=libXdmcp + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/* \ + $(1)/usr/include/X11/ +endef + +define Package/libXdmcp/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXdmcp)) diff --git a/Xorg/xorg/lib/libXext/Makefile b/Xorg/xorg/lib/libXext/Makefile new file mode 100644 index 0000000..3bb31f0 --- /dev/null +++ b/Xorg/xorg/lib/libXext/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXext +PKG_RELEASE:=1 +PKG_VERSION:=1.1.1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=c417c0e8df39a067f90a2a2e7133637d + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto xextproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXext + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 +libXau + TITLE:=libXext + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-malloc0returnsnull \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DIR) $(1)/usr/include/X11/extensions + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/extensions/* \ + $(1)/usr/include/X11/extensions/ +endef + +define Package/libXext/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXext)) diff --git a/Xorg/xorg/lib/libXfixes/Makefile b/Xorg/xorg/lib/libXfixes/Makefile new file mode 100644 index 0000000..7bb353a --- /dev/null +++ b/Xorg/xorg/lib/libXfixes/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXfixes +PKG_RELEASE:=1 +PKG_VERSION:=4.0.4 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=7f2c40852eb337b237ad944ca5c30d49 + +PKG_FIXUP:=libtool + +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto fixesproto xextproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXfixes + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 + TITLE:=libXfixes + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/extensions} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/extensions/* \ + $(1)/usr/include/X11/extensions/ +endef + +define Package/libXfixes/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXfixes)) diff --git a/Xorg/xorg/lib/libXfont/Makefile b/Xorg/xorg/lib/libXfont/Makefile new file mode 100644 index 0000000..6971629 --- /dev/null +++ b/Xorg/xorg/lib/libXfont/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXfont +PKG_RELEASE:=1 +PKG_VERSION:=1.4.1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=4f2bed2a2be82e90a51a24bb3a22cdf0 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto fontcacheproto fontsproto xtrans + +include $(INCLUDE_DIR)/package.mk + +define Package/libXfont + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+zlib +libfontenc +libfreetype + TITLE:=libXfont + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-devel-docs \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/fonts} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/fonts/* \ + $(1)/usr/include/X11/fonts/ +endef + +define Package/libXfont/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXfont)) diff --git a/Xorg/xorg/lib/libXft/Makefile b/Xorg/xorg/lib/libXft/Makefile new file mode 100644 index 0000000..1b86589 --- /dev/null +++ b/Xorg/xorg/lib/libXft/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXft +PKG_RELEASE:=1 +PKG_VERSION:=2.1.14 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=254e62a233491e0e1251636536163e20 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libXft + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+fontconfig +libfreetype +libXrender + TITLE:=libXft + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/Xft} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/Xft/* \ + $(1)/usr/include/X11/Xft/ +endef + +define Package/libXft/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXft)) diff --git a/Xorg/xorg/lib/libXi/Makefile b/Xorg/xorg/lib/libXi/Makefile new file mode 100644 index 0000000..661450c --- /dev/null +++ b/Xorg/xorg/lib/libXi/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXi +PKG_RELEASE:=1 +PKG_VERSION:=1.3 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=8df4ece9bd1efb02c28acb2b6f485e09 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto xextproto inputproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXi + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 +libXext + TITLE:=libXi + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, --enable-malloc0returnsnull) +endef + +define Package/libXi/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libXi.so* \ + $(1)/usr/lib/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libXi.{so*,a,la} \ + $(1)/usr/lib/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + + $(INSTALL_DIR) $(1)/usr/include/X11/extensions + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/extensions/* \ + $(1)/usr/include/X11/extensions/ +endef + +$(eval $(call BuildPackage,libXi)) diff --git a/Xorg/xorg/lib/libXmu/Makefile b/Xorg/xorg/lib/libXmu/Makefile new file mode 100644 index 0000000..758b3ec --- /dev/null +++ b/Xorg/xorg/lib/libXmu/Makefile @@ -0,0 +1,72 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXmu +PKG_RELEASE:=1 +PKG_VERSION:=1.0.5 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=fc4d66be7a1a1eb474954728415e46d6 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=libXt libXext xextproto + +include $(INCLUDE_DIR)/package.mk + + +define Package/libXmu + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libXt +libXext + TITLE:=libXmu + URL:=http://xorg.freedesktop.org/ +endef + +define Package/libXmuu + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 + TITLE:=libXmuu + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/Xmu} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/Xmu/* \ + $(1)/usr/include/X11/Xmu/ +endef + +define Package/libXmu/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libXmu.so* \ + $(1)/usr/lib/ +endef + +define Package/libXmuu/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libXmuu.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXmu)) +$(eval $(call BuildPackage,libXmuu)) diff --git a/Xorg/xorg/lib/libXpm/Makefile b/Xorg/xorg/lib/libXpm/Makefile new file mode 100644 index 0000000..05186d1 --- /dev/null +++ b/Xorg/xorg/lib/libXpm/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXpm +PKG_RELEASE:=2 +PKG_VERSION:=3.5.8 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=38e58e72d476a74298a59052fde185a3 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUID_DEPENDS:=xproto xextproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXpm + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 +libXt +libXext +libSM + TITLE:=libXpm + URL:=http://xorg.freedesktop.org/ +endef + +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/* \ + $(1)/usr/include/X11/ +endef + +define Package/libXpm/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXpm)) diff --git a/Xorg/xorg/lib/libXrandr/Makefile b/Xorg/xorg/lib/libXrandr/Makefile new file mode 100644 index 0000000..3985817 --- /dev/null +++ b/Xorg/xorg/lib/libXrandr/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXrandr +PKG_RELEASE:=4 +PKG_VERSION:=1.3.0 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=68eb59c3b7524db6ffd78746ee893d1d + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=randrproto renderproto xextproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXrandr + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libXext +libXrender +libX11 + TITLE:=libXrandr + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-malloc0returnsnull \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/extensions} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/extensions/* \ + $(1)/usr/include/X11/extensions/ +endef + +define Package/libXrandr/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXrandr)) diff --git a/Xorg/xorg/lib/libXrender/Makefile b/Xorg/xorg/lib/libXrender/Makefile new file mode 100644 index 0000000..dfc541b --- /dev/null +++ b/Xorg/xorg/lib/libXrender/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXrender +PKG_RELEASE:=1 +PKG_VERSION:=0.9.5 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=276dd9e85daf0680616cd9f132b354c9 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=renderproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXrender + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 + TITLE:=libXrender + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-malloc0returnsnull \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/extensions} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/extensions/* \ + $(1)/usr/include/X11/extensions/ +endef + +define Package/libXrender/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXrender)) diff --git a/Xorg/xorg/lib/libXt/Makefile b/Xorg/xorg/lib/libXt/Makefile new file mode 100644 index 0000000..81cbad4 --- /dev/null +++ b/Xorg/xorg/lib/libXt/Makefile @@ -0,0 +1,72 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXt +PKG_RELEASE:=1 +PKG_VERSION:=1.0.7 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=96f3c93434a93186d178b60d4a262496 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto kbproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXt + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libSM +libX11 +libICE + TITLE:=libXt + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-malloc0returnsnull \ + --without-xcb \ + , \ + CC_FOR_BUILD="$(HOSTCC)" \ + CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \ + LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/util \ + CPPFLAGS="$(HOST_CPPFLAGS)" + + $(call Build/Compile/Default) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/* \ + $(1)/usr/include/X11/ +endef + +define Package/libXt/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXt)) diff --git a/Xorg/xorg/lib/libXtst/Makefile b/Xorg/xorg/lib/libXtst/Makefile new file mode 100644 index 0000000..60a37b1 --- /dev/null +++ b/Xorg/xorg/lib/libXtst/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXtst +PKG_RELEASE:=1 +PKG_VERSION:=1.1.0 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=dd6f3e20b87310187121539f9605d977 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=recordproto xextproto inputproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXtst + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 +libXext +libXi + TITLE:=libXtst + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{include,lib/pkgconfig} + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/* \ + $(1)/usr/include/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ +endef + +define Package/libXtst/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXtst)) diff --git a/Xorg/xorg/lib/libXv/Makefile b/Xorg/xorg/lib/libXv/Makefile new file mode 100644 index 0000000..95ca1cf --- /dev/null +++ b/Xorg/xorg/lib/libXv/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXv +PKG_RELEASE:= +PKG_VERSION:=1.0.5 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=1d97798b1d8bbf8d9085e1b223a0738f + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=videoproto xextproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXv + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 +libXext + TITLE:=libXv + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-malloc0returnsnull \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/extensions} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/extensions/* \ + $(1)/usr/include/X11/extensions/ +endef + +define Package/libXv/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXv)) diff --git a/Xorg/xorg/lib/libXvMC/Makefile b/Xorg/xorg/lib/libXvMC/Makefile new file mode 100644 index 0000000..82b421b --- /dev/null +++ b/Xorg/xorg/lib/libXvMC/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXvMC +PKG_RELEASE:=1 +PKG_VERSION:=1.0.5 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=16c3a11add14979beb7510e44623cac6 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=videoproto xextproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libXvMC + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libXext +libXv +libX11 + TITLE:=libXvMC + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-malloc0returnsnull \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/extensions} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/extensions/* \ + $(1)/usr/include/X11/extensions/ +endef + +define Package/libXvMC/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXvMC)) diff --git a/Xorg/xorg/lib/libXxf86vm/Makefile b/Xorg/xorg/lib/libXxf86vm/Makefile new file mode 100644 index 0000000..2a09cb8 --- /dev/null +++ b/Xorg/xorg/lib/libXxf86vm/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libXxf86vm +PKG_RELEASE:=1 +PKG_VERSION:=1.1.0 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=b431ad7084e1055fef99a9115237edd8 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto xextproto xf86vidmodeproto + +include $(INCLUDE_DIR)/package.mk + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-malloc0returnsnull \ + ) +endef + +define Package/libXxf86vm + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 +libXext + TITLE:=libXxf86vm + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/X11/extensions + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/extensions/* \ + $(1)/usr/include/X11/extensions/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ +endef + +define Package/libXxf86vm/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libXxf86vm)) diff --git a/Xorg/xorg/lib/libfontenc/Makefile b/Xorg/xorg/lib/libfontenc/Makefile new file mode 100644 index 0000000..99fdf86 --- /dev/null +++ b/Xorg/xorg/lib/libfontenc/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libfontenc +PKG_RELEASE:=1 +PKG_VERSION:=1.0.5 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=4f0d8191819be9f2bdf9dad49a65e43b + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=xproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libfontenc + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+zlib + TITLE:=libfontenc + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/fonts} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/fonts/* \ + $(1)/usr/include/X11/fonts/ +endef + +define Package/libfontenc/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libfontenc)) diff --git a/Xorg/xorg/lib/libpciaccess/Makefile b/Xorg/xorg/lib/libpciaccess/Makefile new file mode 100644 index 0000000..54ac26d --- /dev/null +++ b/Xorg/xorg/lib/libpciaccess/Makefile @@ -0,0 +1,69 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_BASE_NAME:=libpciaccess +PKG_NAME:=libpciaccess +PKG_RELEASE:=1 +PKG_VERSION:=0.10.9 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=685cb20e7a6165bc010972f1183addbd + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + + +define Package/libpciaccess + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+pciutils + TITLE:=libpciaccess + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --with-pciids-path=/usr/share/pci.ids \ + , \ + ac_cv_file__usr_include_asm_mtrr_h=$(shell \ + test -f "$(TOOLCHAIN_DIR)/include/asm/mtrr.h" \ + && echo "yes" \ + || echo "no") \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/*.h \ + $(1)/usr/include + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libpciaccess.{so*,a,la} \ + $(1)/usr/lib/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ +endef + +define Package/libpciaccess/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libpciaccess.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libpciaccess)) diff --git a/Xorg/xorg/lib/libxkbfile/Makefile b/Xorg/xorg/lib/libxkbfile/Makefile new file mode 100644 index 0000000..9cdfeab --- /dev/null +++ b/Xorg/xorg/lib/libxkbfile/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libxkbfile +PKG_RELEASE:=1 +PKG_VERSION:=1.0.6 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=b01156e263eca8177e6b7f10441951c4 + +PKG_FIXUP:=libtool + +PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=kbproto + +include $(INCLUDE_DIR)/package.mk + +define Package/libxkbfile + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + DEPENDS:=+libX11 + TITLE:=libxkbfile + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/extensions} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/extensions/* \ + $(1)/usr/include/X11/extensions/ +endef + +define Package/libxkbfile/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libxkbfile)) diff --git a/Xorg/xorg/lib/xtrans/Makefile b/Xorg/xorg/lib/xtrans/Makefile new file mode 100644 index 0000000..2b44bc9 --- /dev/null +++ b/Xorg/xorg/lib/xtrans/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xtrans +PKG_RELEASE:=1 +PKG_VERSION:=1.2.5 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/lib +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=2d1e57e82acc5f21797e92341415af2f + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/xtrans + SECTION:=xorg-libraries + CATEGORY:=Xorg + SUBMENU:=libraries + TITLE:=xtrans + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11/Xtrans} + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/X11/Xtrans/* \ + $(1)/usr/include/X11/Xtrans/ + + $(INSTALL_DIR) $(1)/usr/share/aclocal + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/aclocal/* \ + $(1)/usr/share/aclocal/ +endef + +$(eval $(call BuildPackage,xtrans)) diff --git a/Xorg/xorg/proto/applewmproto/Makefile b/Xorg/xorg/proto/applewmproto/Makefile new file mode 100644 index 0000000..921706b --- /dev/null +++ b/Xorg/xorg/proto/applewmproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=applewmproto +PKG_VERSION:=1.4.1 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=76ca1c6e1d8904d2d885f81f7332eba6 + +include $(INCLUDE_DIR)/package.mk + +define Package/applewmproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=applewmproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,applewmproto)) diff --git a/Xorg/xorg/proto/bigreqsproto/Makefile b/Xorg/xorg/proto/bigreqsproto/Makefile new file mode 100644 index 0000000..7103170 --- /dev/null +++ b/Xorg/xorg/proto/bigreqsproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bigreqsproto +PKG_VERSION:=1.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=d30c5dbf19ca6dffcd9788227ecff8c5 + +include $(INCLUDE_DIR)/package.mk + +define Package/bigreqsproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=bigreqsproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,bigreqsproto)) diff --git a/Xorg/xorg/proto/calibrateproto/Makefile b/Xorg/xorg/proto/calibrateproto/Makefile new file mode 100644 index 0000000..40d812e --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/Makefile @@ -0,0 +1,38 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=calibrateproto +PKG_RELEASE:=1 +PKG_VERSION:=git + +include $(INCLUDE_DIR)/package.mk + +define Package/calibrateproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=calibrateproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/Prepare +$(call Build/Prepare/Default) + $(CP) src/* $(PKG_BUILD_DIR) +endef + +define Build/InstallDev + DESTDIR=$(1) $(MAKE) -C $(PKG_BUILD_DIR)/$(SUBPACKAGE) $(MAKE_FLAGS) install +endef + +define Build/Compile + echo +endef + +$(eval $(call BuildPackage,calibrateproto)) diff --git a/Xorg/xorg/proto/calibrateproto/src/ChangeLog b/Xorg/xorg/proto/calibrateproto/src/ChangeLog new file mode 100644 index 0000000..b36632c --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/ChangeLog @@ -0,0 +1,5 @@ +2004-10-21 Daniel Stone + + * configure.ac: + * xcalibratewire.h: + Bump version to 0.1. diff --git a/Xorg/xorg/proto/calibrateproto/src/Makefile b/Xorg/xorg/proto/calibrateproto/src/Makefile new file mode 100644 index 0000000..35611b3 --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/Makefile @@ -0,0 +1,527 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Copyright © 2003 Philip Blundell +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Philip Blundell not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Philip Blundell makes no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. +# + + + +pkgdatadir = $(datadir)/xcalibrateproto +pkglibdir = $(libdir)/xcalibrateproto +pkgincludedir = $(includedir)/xcalibrateproto +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = . +DIST_COMMON = $(XCalibrateinclude_HEADERS) $(am__configure_deps) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/xcalibrateproto.pc.in $(top_srcdir)/configure \ + ChangeLog install-sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = xcalibrateproto.pc +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgconfigdir)" \ + "$(DESTDIR)$(XCalibrateincludedir)" +pkgconfigDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkgconfig_DATA) +XCalibrateincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(XCalibrateinclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = ${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run aclocal-1.10 +AMTAR = ${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run tar +AUTOCONF = ${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run autoconf +AUTOHEADER = ${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run autoheader +AUTOMAKE = ${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run automake-1.10 +AWK = gawk +CYGPATH_W = echo +DEFS = -DPACKAGE_NAME=\"xcalibrateproto\" -DPACKAGE_TARNAME=\"xcalibrateproto\" -DPACKAGE_VERSION=\"0.1.0\" -DPACKAGE_STRING=\"xcalibrateproto\ 0.1.0\" -DPACKAGE_BUGREPORT=\"pb@nexus.co.uk\" -DPACKAGE=\"xcalibrateproto\" -DVERSION=\"0.1.0\" +ECHO_C = +ECHO_N = -n +ECHO_T = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LIBOBJS = +LIBS = +LTLIBOBJS = +MAKEINFO = ${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +PACKAGE = xcalibrateproto +PACKAGE_BUGREPORT = pb@nexus.co.uk +PACKAGE_NAME = xcalibrateproto +PACKAGE_STRING = xcalibrateproto 0.1.0 +PACKAGE_TARNAME = xcalibrateproto +PACKAGE_VERSION = 0.1.0 +PATH_SEPARATOR = : +SET_MAKE = +SHELL = /bin/sh +STRIP = +VERSION = 0.1.0 +abs_builddir = /var/src/owrt-X/build_dir/i386/calibrateproto-git +abs_srcdir = /var/src/owrt-X/build_dir/i386/calibrateproto-git +abs_top_builddir = /var/src/owrt-X/build_dir/i386/calibrateproto-git +abs_top_srcdir = /var/src/owrt-X/build_dir/i386/calibrateproto-git +am__leading_dot = . +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build_alias = +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host_alias = +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /var/src/owrt-X/build_dir/i386/calibrateproto-git/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_builddir = . +top_srcdir = . +XCalibrateincludedir = $(includedir)/X11/extensions +XCalibrateinclude_HEADERS = xcalibrateproto.h xcalibratewire.h +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xcalibrateproto.pc +EXTRA_DIST = autogen.sh xcalibrateproto.pc.in +all: all-am + +.SUFFIXES: +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) +xcalibrateproto.pc: $(top_builddir)/config.status $(srcdir)/xcalibrateproto.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done +install-XCalibrateincludeHEADERS: $(XCalibrateinclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(XCalibrateincludedir)" || $(MKDIR_P) "$(DESTDIR)$(XCalibrateincludedir)" + @list='$(XCalibrateinclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(XCalibrateincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(XCalibrateincludedir)/$$f'"; \ + $(XCalibrateincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(XCalibrateincludedir)/$$f"; \ + done + +uninstall-XCalibrateincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(XCalibrateinclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(XCalibrateincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(XCalibrateincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(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; } \ + 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) \ + $$tags $$unique; \ + fi +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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-am +all-am: Makefile $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(XCalibrateincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-XCalibrateincludeHEADERS \ + install-pkgconfigDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-XCalibrateincludeHEADERS \ + uninstall-pkgconfigDATA + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic ctags dist dist-all dist-bzip2 dist-gzip \ + dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-XCalibrateincludeHEADERS install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-XCalibrateincludeHEADERS uninstall-am \ + uninstall-pkgconfigDATA + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Xorg/xorg/proto/calibrateproto/src/Makefile.am b/Xorg/xorg/proto/calibrateproto/src/Makefile.am new file mode 100644 index 0000000..87bcd58 --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/Makefile.am @@ -0,0 +1,29 @@ +# +# Copyright © 2003 Philip Blundell +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Philip Blundell not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Philip Blundell makes no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. +# + +XCalibrateincludedir = $(includedir)/X11/extensions +XCalibrateinclude_HEADERS = xcalibrateproto.h xcalibratewire.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xcalibrateproto.pc + +EXTRA_DIST = autogen.sh xcalibrateproto.pc.in diff --git a/Xorg/xorg/proto/calibrateproto/src/Makefile.in b/Xorg/xorg/proto/calibrateproto/src/Makefile.in new file mode 100644 index 0000000..73a01dc --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/Makefile.in @@ -0,0 +1,527 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Copyright © 2003 Philip Blundell +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Philip Blundell not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Philip Blundell makes no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. +# + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = . +DIST_COMMON = $(XCalibrateinclude_HEADERS) $(am__configure_deps) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/xcalibrateproto.pc.in $(top_srcdir)/configure \ + ChangeLog install-sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = xcalibrateproto.pc +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgconfigdir)" \ + "$(DESTDIR)$(XCalibrateincludedir)" +pkgconfigDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkgconfig_DATA) +XCalibrateincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(XCalibrateinclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +XCalibrateincludedir = $(includedir)/X11/extensions +XCalibrateinclude_HEADERS = xcalibrateproto.h xcalibratewire.h +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xcalibrateproto.pc +EXTRA_DIST = autogen.sh xcalibrateproto.pc.in +all: all-am + +.SUFFIXES: +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) +xcalibrateproto.pc: $(top_builddir)/config.status $(srcdir)/xcalibrateproto.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done +install-XCalibrateincludeHEADERS: $(XCalibrateinclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(XCalibrateincludedir)" || $(MKDIR_P) "$(DESTDIR)$(XCalibrateincludedir)" + @list='$(XCalibrateinclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(XCalibrateincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(XCalibrateincludedir)/$$f'"; \ + $(XCalibrateincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(XCalibrateincludedir)/$$f"; \ + done + +uninstall-XCalibrateincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(XCalibrateinclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(XCalibrateincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(XCalibrateincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(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; } \ + 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) \ + $$tags $$unique; \ + fi +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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-am +all-am: Makefile $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(XCalibrateincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-XCalibrateincludeHEADERS \ + install-pkgconfigDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-XCalibrateincludeHEADERS \ + uninstall-pkgconfigDATA + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic ctags dist dist-all dist-bzip2 dist-gzip \ + dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-XCalibrateincludeHEADERS install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-XCalibrateincludeHEADERS uninstall-am \ + uninstall-pkgconfigDATA + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Xorg/xorg/proto/calibrateproto/src/aclocal.m4 b/Xorg/xorg/proto/calibrateproto/src/aclocal.m4 new file mode 100644 index 0000000..2981344 --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/aclocal.m4 @@ -0,0 +1,548 @@ +# generated automatically by aclocal 1.10 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/Xorg/xorg/proto/calibrateproto/src/autogen.sh b/Xorg/xorg/proto/calibrateproto/src/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/Xorg/xorg/proto/calibrateproto/src/config.log b/Xorg/xorg/proto/calibrateproto/src/config.log new file mode 100644 index 0000000..3b696e2 --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/config.log @@ -0,0 +1,165 @@ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by xcalibrateproto configure 0.1.0, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ ./configure --enable-maintainer-mode + +## --------- ## +## Platform. ## +## --------- ## + +hostname = blap +uname -m = i686 +uname -r = 2.6.22.5 +uname -s = Linux +uname -v = #12 Fri Aug 31 21:30:17 CEST 2007 + +/usr/bin/uname -p = unknown +/bin/uname -X = unknown + +/bin/arch = i686 +/usr/bin/arch -k = unknown +/usr/convex/getsysinfo = unknown +/usr/bin/hostinfo = unknown +/bin/machine = unknown +/usr/bin/oslevel = unknown +/bin/universe = unknown + +PATH: /usr/local/bin +PATH: /usr/bin +PATH: /bin +PATH: /usr/bin/X11 +PATH: /usr/games + + +## ----------- ## +## Core tests. ## +## ----------- ## + +configure:1692: checking for a BSD-compatible install +configure:1748: result: /usr/bin/install -c +configure:1759: checking whether build environment is sane +configure:1802: result: yes +configure:1830: checking for a thread-safe mkdir -p +configure:1869: result: /bin/mkdir -p +configure:1882: checking for gawk +configure:1898: found /usr/bin/gawk +configure:1909: result: gawk +configure:1920: checking whether make sets $(MAKE) +configure:1941: result: yes +configure:2262: creating ./config.status + +## ---------------------- ## +## Running config.status. ## +## ---------------------- ## + +This file was extended by xcalibrateproto config.status 0.1.0, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = + CONFIG_HEADERS = + CONFIG_LINKS = + CONFIG_COMMANDS = + $ ./config.status + +on blap + +config.status:589: creating Makefile +config.status:589: creating xcalibrateproto.pc + +## ---------------- ## +## Cache variables. ## +## ---------------- ## + +ac_cv_env_build_alias_set= +ac_cv_env_build_alias_value= +ac_cv_env_host_alias_set= +ac_cv_env_host_alias_value= +ac_cv_env_target_alias_set= +ac_cv_env_target_alias_value= +ac_cv_path_install='/usr/bin/install -c' +ac_cv_path_mkdir=/bin/mkdir +ac_cv_prog_AWK=gawk +ac_cv_prog_make_make_set=yes + +## ----------------- ## +## Output variables. ## +## ----------------- ## + +ACLOCAL='${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run aclocal-1.10' +AMTAR='${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run tar' +AUTOCONF='${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run autoconf' +AUTOHEADER='${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run autoheader' +AUTOMAKE='${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run automake-1.10' +AWK='gawk' +CYGPATH_W='echo' +DEFS='-DPACKAGE_NAME=\"xcalibrateproto\" -DPACKAGE_TARNAME=\"xcalibrateproto\" -DPACKAGE_VERSION=\"0.1.0\" -DPACKAGE_STRING=\"xcalibrateproto\ 0.1.0\" -DPACKAGE_BUGREPORT=\"pb@nexus.co.uk\" -DPACKAGE=\"xcalibrateproto\" -DVERSION=\"0.1.0\"' +ECHO_C='' +ECHO_N='-n' +ECHO_T='' +INSTALL_DATA='${INSTALL} -m 644' +INSTALL_PROGRAM='${INSTALL}' +INSTALL_SCRIPT='${INSTALL}' +INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' +LIBOBJS='' +LIBS='' +LTLIBOBJS='' +MAKEINFO='${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run makeinfo' +PACKAGE='xcalibrateproto' +PACKAGE_BUGREPORT='pb@nexus.co.uk' +PACKAGE_NAME='xcalibrateproto' +PACKAGE_STRING='xcalibrateproto 0.1.0' +PACKAGE_TARNAME='xcalibrateproto' +PACKAGE_VERSION='0.1.0' +PATH_SEPARATOR=':' +SET_MAKE='' +SHELL='/bin/sh' +STRIP='' +VERSION='0.1.0' +am__isrc='' +am__leading_dot='.' +am__tar='${AMTAR} chof - "$$tardir"' +am__untar='${AMTAR} xf -' +bindir='${exec_prefix}/bin' +build_alias='' +datadir='${datarootdir}' +datarootdir='${prefix}/share' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +dvidir='${docdir}' +exec_prefix='${prefix}' +host_alias='' +htmldir='${docdir}' +includedir='${prefix}/include' +infodir='${datarootdir}/info' +install_sh='$(SHELL) /var/src/owrt-X/build_dir/i386/calibrateproto-git/install-sh' +libdir='${exec_prefix}/lib' +libexecdir='${exec_prefix}/libexec' +localedir='${datarootdir}/locale' +localstatedir='${prefix}/var' +mandir='${datarootdir}/man' +mkdir_p='/bin/mkdir -p' +oldincludedir='/usr/include' +pdfdir='${docdir}' +prefix='/usr/local' +program_transform_name='s,x,x,' +psdir='${docdir}' +sbindir='${exec_prefix}/sbin' +sharedstatedir='${prefix}/com' +sysconfdir='${prefix}/etc' +target_alias='' + +## ----------- ## +## confdefs.h. ## +## ----------- ## + +#define PACKAGE_NAME "xcalibrateproto" +#define PACKAGE_TARNAME "xcalibrateproto" +#define PACKAGE_VERSION "0.1.0" +#define PACKAGE_STRING "xcalibrateproto 0.1.0" +#define PACKAGE_BUGREPORT "pb@nexus.co.uk" +#define PACKAGE "xcalibrateproto" +#define VERSION "0.1.0" + +configure: exit 0 diff --git a/Xorg/xorg/proto/calibrateproto/src/config.status b/Xorg/xorg/proto/calibrateproto/src/config.status new file mode 100755 index 0000000..8d86324 --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/config.status @@ -0,0 +1,786 @@ +#! /bin/sh +# Generated by configure. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=${CONFIG_SHELL-/bin/sh} +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +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 || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by xcalibrateproto $as_me 0.1.0, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +# Files that config.status was made for. +config_files=" Makefile xcalibrateproto.pc" + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." + +ac_cs_version="\ +xcalibrateproto config.status 0.1.0 +configured by ./configure, generated by GNU Autoconf 2.61, + with options \"'--enable-maintainer-mode'\" + +Copyright (C) 2006 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='/var/src/owrt-X/build_dir/i386/calibrateproto-git' +srcdir='.' +INSTALL='/usr/bin/install -c' +MKDIR_P='/bin/mkdir -p' +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + 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 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +if $ac_cs_recheck; then + echo "running CONFIG_SHELL=/bin/sh /bin/sh ./configure " '--enable-maintainer-mode' $ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=/bin/sh + export CONFIG_SHELL + exec /bin/sh "./configure" '--enable-maintainer-mode' $ac_configure_extra_args --no-create --no-recursion +fi + +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "xcalibrateproto.pc") CONFIG_FILES="$CONFIG_FILES xcalibrateproto.pc" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$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 +if test -n "$CONFIG_FILES"; then + +cat >"$tmp/subs-1.sed" <<\CEOF +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +s,@SHELL@,|#_!!_#|/bin/sh,g +s,@PATH_SEPARATOR@,|#_!!_#|:,g +s,@PACKAGE_NAME@,|#_!!_#|xcalibrateproto,g +s,@PACKAGE_TARNAME@,|#_!!_#|xcalibrateproto,g +s,@PACKAGE_VERSION@,|#_!!_#|0.1.0,g +s,@PACKAGE_STRING@,|#_!!_#|xcalibrateproto 0.1.0,g +s,@PACKAGE_BUGREPORT@,|#_!!_#|pb@|#_!!_#|nexus.co.uk,g +s,@exec_prefix@,|#_!!_#|${prefix},g +s,@prefix@,|#_!!_#|/usr/local,g +s,@program_transform_name@,|#_!!_#|s\,x\,x\,,g +s,@bindir@,|#_!!_#|${exec_prefix}/bin,g +s,@sbindir@,|#_!!_#|${exec_prefix}/sbin,g +s,@libexecdir@,|#_!!_#|${exec_prefix}/libexec,g +s,@datarootdir@,|#_!!_#|${prefix}/share,g +s,@datadir@,|#_!!_#|${datarootdir},g +s,@sysconfdir@,|#_!!_#|${prefix}/etc,g +s,@sharedstatedir@,|#_!!_#|${prefix}/com,g +s,@localstatedir@,|#_!!_#|${prefix}/var,g +s,@includedir@,|#_!!_#|${prefix}/include,g +s,@oldincludedir@,|#_!!_#|/usr/include,g +s,@docdir@,|#_!!_#|${datarootdir}/doc/${PACKAGE_TARNAME},g +s,@infodir@,|#_!!_#|${datarootdir}/info,g +s,@htmldir@,|#_!!_#|${docdir},g +s,@dvidir@,|#_!!_#|${docdir},g +s,@pdfdir@,|#_!!_#|${docdir},g +s,@psdir@,|#_!!_#|${docdir},g +s,@libdir@,|#_!!_#|${exec_prefix}/lib,g +s,@localedir@,|#_!!_#|${datarootdir}/locale,g +s,@mandir@,|#_!!_#|${datarootdir}/man,g +s,@DEFS@,|#_!!_#|-DPACKAGE_NAME=\\"xcalibrateproto\\" -DPACKAGE_TARNAME=\\"xcalibrateproto\\" -DPACKAGE_VERSION=\\"0.1.0\\" -DPACKAGE_STRING=\\"xcalibrateproto\\ 0.1.0\\" -DPACKAGE_BUGREPORT=\\"pb@|#_!!_#|nexus.co.uk\\" -DPACKAGE=\\"xcalibrateproto\\" -DVERSION=\\"0.1.0\\",g +s,@ECHO_C@,|#_!!_#|,g +s,@ECHO_N@,|#_!!_#|-n,g +s,@ECHO_T@,|#_!!_#|,g +s,@LIBS@,|#_!!_#|,g +s,@build_alias@,|#_!!_#|,g +s,@host_alias@,|#_!!_#|,g +s,@target_alias@,|#_!!_#|,g +s,@INSTALL_PROGRAM@,|#_!!_#|${INSTALL},g +s,@INSTALL_SCRIPT@,|#_!!_#|${INSTALL},g +s,@INSTALL_DATA@,|#_!!_#|${INSTALL} -m 644,g +s,@am__isrc@,|#_!!_#|,g +s,@CYGPATH_W@,|#_!!_#|echo,g +s,@PACKAGE@,|#_!!_#|xcalibrateproto,g +s,@VERSION@,|#_!!_#|0.1.0,g +s,@ACLOCAL@,|#_!!_#|${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run aclocal-1.10,g +s,@AUTOCONF@,|#_!!_#|${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run autoconf,g +s,@AUTOMAKE@,|#_!!_#|${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run automake-1.10,g +s,@AUTOHEADER@,|#_!!_#|${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run autoheader,g +s,@MAKEINFO@,|#_!!_#|${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run makeinfo,g +s,@install_sh@,|#_!!_#|$(SHELL) /var/src/owrt-X/build_dir/i386/calibrateproto-git/install-sh,g +s,@STRIP@,|#_!!_#|,g +s,@INSTALL_STRIP_PROGRAM@,|#_!!_#|$(install_sh) -c -s,g +s,@mkdir_p@,|#_!!_#|/bin/mkdir -p,g +s,@AWK@,|#_!!_#|gawk,g +s,@SET_MAKE@,|#_!!_#|,g +s,@am__leading_dot@,|#_!!_#|.,g +s,@AMTAR@,|#_!!_#|${SHELL} /var/src/owrt-X/build_dir/i386/calibrateproto-git/missing --run tar,g +s,@am__tar@,|#_!!_#|${AMTAR} chof - "$$tardir",g +s,@am__untar@,|#_!!_#|${AMTAR} xf -,g +s,@LIBOBJS@,|#_!!_#|,g +s,@LTLIBOBJS@,|#_!!_#|,g +:end +s/|#_!!_#|//g +CEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES +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;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + 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." + 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;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +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,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +# 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/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $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;} + ac_datarootdir_hack=' + s&@datadir@&${datarootdir}&g + s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g + s&@infodir@&${datarootdir}/info&g + s&@localedir@&${datarootdir}/locale&g + s&@mandir@&${datarootdir}/man&g + s&\${datarootdir}&${prefix}/share&g' ;; +esac + sed "/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +} + +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out + +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' +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' +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 + ;; + + + + esac + +done # for ac_tag + + +{ (exit 0); exit 0; } diff --git a/Xorg/xorg/proto/calibrateproto/src/configure b/Xorg/xorg/proto/calibrateproto/src/configure new file mode 100755 index 0000000..d1f2c77 --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/configure @@ -0,0 +1,3163 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61 for xcalibrateproto 0.1.0. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_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 + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_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 + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + 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+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +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 +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +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 || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='xcalibrateproto' +PACKAGE_TARNAME='xcalibrateproto' +PACKAGE_VERSION='0.1.0' +PACKAGE_STRING='xcalibrateproto 0.1.0' +PACKAGE_BUGREPORT='pb@nexus.co.uk' + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +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 + 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 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +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 + { (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 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { 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 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures xcalibrateproto 0.1.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/xcalibrateproto] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of xcalibrateproto 0.1.0:";; + esac + cat <<\_ACEOF + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || 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,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +xcalibrateproto configure 0.1.0 +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by xcalibrateproto $as_me 0.1.0, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { 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;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +am__api_version='1.10' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { 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 +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { 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! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}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. +# 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 + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { 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;} +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 +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" + 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" + 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; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ 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'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +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;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='xcalibrateproto' + VERSION='0.1.0' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $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 +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ 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 +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 ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + +ac_config_files="$ac_config_files Makefile xcalibrateproto.pc" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { 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;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +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;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`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" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +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 || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by xcalibrateproto $as_me 0.1.0, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +xcalibrateproto config.status 0.1.0 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 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' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + 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 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +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 + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "xcalibrateproto.pc") CONFIG_FILES="$CONFIG_FILES xcalibrateproto.pc" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$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 +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 +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 61; 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` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_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 +_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 +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES +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;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + 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." + 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;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +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,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# 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/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $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;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out + +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' +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' +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 + ;; + + + + esac + +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + diff --git a/Xorg/xorg/proto/calibrateproto/src/configure.ac b/Xorg/xorg/proto/calibrateproto/src/configure.ac new file mode 100644 index 0000000..eb41072 --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/configure.ac @@ -0,0 +1,6 @@ +AC_PREREQ([2.59]) +AC_INIT([xcalibrateproto], [0.1.0], [pb@nexus.co.uk]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) + +AC_OUTPUT([Makefile + xcalibrateproto.pc]) diff --git a/Xorg/xorg/proto/calibrateproto/src/install-sh b/Xorg/xorg/proto/calibrateproto/src/install-sh new file mode 100755 index 0000000..4fbbae7 --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/install-sh @@ -0,0 +1,507 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-10-14.15 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +posix_glob= +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chmodcmd=$chmodprog +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-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 CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + shift + shift + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac +done + +if test $# -ne 0 && test -z "$dir_arg$dstarg"; 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 "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + 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 ;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $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=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix=/ ;; + -*) prefix=./ ;; + *) prefix= ;; + esac + + case $posix_glob in + '') + if (set -f) 2>/dev/null; then + posix_glob=true + else + posix_glob=false + fi ;; + esac + + oIFS=$IFS + IFS=/ + $posix_glob && set -f + set fnord $dstdir + shift + $posix_glob && set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dst"; then + $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 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + } || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/Xorg/xorg/proto/calibrateproto/src/missing b/Xorg/xorg/proto/calibrateproto/src/missing new file mode 100755 index 0000000..1c8ff70 --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/missing @@ -0,0 +1,367 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2006-05-10.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# 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 + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $1 in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/Xorg/xorg/proto/calibrateproto/src/xcalibrateproto.h b/Xorg/xorg/proto/calibrateproto/src/xcalibrateproto.h new file mode 100644 index 0000000..9a174a4 --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/xcalibrateproto.h @@ -0,0 +1,95 @@ +/* + * $Id: xcalibrateproto.h,v 1.1.1.1 2004/06/02 19:18:47 pb Exp $ + * + * Copyright © 2003 Philip Blundell + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Philip Blundell not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Philip Blundell makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef XCALIBRATEPROTO_H +#define XCALIBRATEPROTO_H + +/* + * requests and replies + */ +typedef struct { + CARD8 reqType; + CARD8 xCalibrateReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xXCalibrateQueryVersionReq; + +#define sz_xXCalibrateQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXCalibrateQueryVersionReply; + +#define sz_xXCalibrateQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xCalibrateReqType; + CARD16 length B16; + CARD16 on B16; + CARD16 pad B16; +} xXCalibrateRawModeReq; + +#define sz_xXCalibrateRawModeReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 status; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xXCalibrateRawModeReply; + +#define sz_xXCalibrateRawModeReply 32 + +/* Events */ + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD16 x; + CARD16 y; + CARD16 pressure; + CARD16 pad2; +} xXCalibrateRawTouchscreenEvent; + +#define sz_xXCalibrateRawTouchscreenEvent 12 + +#endif diff --git a/Xorg/xorg/proto/calibrateproto/src/xcalibrateproto.pc b/Xorg/xorg/proto/calibrateproto/src/xcalibrateproto.pc new file mode 100644 index 0000000..5dde3ef --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/xcalibrateproto.pc @@ -0,0 +1,9 @@ +prefix=/usr/local +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: XCalibrate +Description: XCalibrate extension headers +Version: 0.1.0 +Cflags: -I${includedir} diff --git a/Xorg/xorg/proto/calibrateproto/src/xcalibrateproto.pc.in b/Xorg/xorg/proto/calibrateproto/src/xcalibrateproto.pc.in new file mode 100644 index 0000000..f17f8d7 --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/xcalibrateproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: XCalibrate +Description: XCalibrate extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/Xorg/xorg/proto/calibrateproto/src/xcalibratewire.h b/Xorg/xorg/proto/calibrateproto/src/xcalibratewire.h new file mode 100644 index 0000000..a5b1aec --- /dev/null +++ b/Xorg/xorg/proto/calibrateproto/src/xcalibratewire.h @@ -0,0 +1,43 @@ +/* + * $Id: xcalibratewire.h,v 1.1.1.1 2004/06/02 19:18:47 pb Exp $ + * + * Copyright © 2003 Philip Blundell + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Philip Blundell not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Philip Blundell makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef XCALIBRATEWIRE_H +#define XCALIBRATEWIRE_H + +#define XCALIBRATE_MAJOR_VERSION 0 +#define XCALIBRATE_MINOR_VERSION 0 +#define XCALIBRATE_NAME "XCALIBRATE" + +#define X_XCalibrateQueryVersion 0 +#define X_XCalibrateRawMode 1 + +#define XCalibrateNumberRequests (X_XCalibrateSetRawMode + 1) + +#define X_XCalibrateRawTouchscreen 0 + +#define XCalibrateNumberEvents (X_XCalibrateRawTouchscreen + 1) + +#define XCalibrateNumberErrors 0 + +#endif diff --git a/Xorg/xorg/proto/compositeproto/Makefile b/Xorg/xorg/proto/compositeproto/Makefile new file mode 100644 index 0000000..b922b5b --- /dev/null +++ b/Xorg/xorg/proto/compositeproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=compositeproto +PKG_VERSION:=0.4.1 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=3692f3f8b2ea10dff3d2cede8dc65e79 + +include $(INCLUDE_DIR)/package.mk + +define Package/compositeproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=compositeproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,compositeproto)) diff --git a/Xorg/xorg/proto/damageproto/Makefile b/Xorg/xorg/proto/damageproto/Makefile new file mode 100644 index 0000000..d6cef04 --- /dev/null +++ b/Xorg/xorg/proto/damageproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=damageproto +PKG_VERSION:=1.2.0 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=434b931b02bd83ed9fc44951df81cdac + +include $(INCLUDE_DIR)/package.mk + +define Package/damageproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=damageproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,damageproto)) diff --git a/Xorg/xorg/proto/dmxproto/Makefile b/Xorg/xorg/proto/dmxproto/Makefile new file mode 100644 index 0000000..541e50c --- /dev/null +++ b/Xorg/xorg/proto/dmxproto/Makefile @@ -0,0 +1,38 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dmxproto +PKG_RELEASE:=1 +PKG_VERSION:=2.3 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=880a41720b2937e2660dcdc0d34a8791 + +include $(INCLUDE_DIR)/package.mk + +define Package/dmxproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=dmxproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,dmxproto)) diff --git a/Xorg/xorg/proto/dri2proto/Makefile b/Xorg/xorg/proto/dri2proto/Makefile new file mode 100644 index 0000000..e173ad7 --- /dev/null +++ b/Xorg/xorg/proto/dri2proto/Makefile @@ -0,0 +1,37 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dri2proto +PKG_VERSION:=2.1 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=5cb7987d29db068153bdc8f23c767c43 + +include $(INCLUDE_DIR)/package.mk + +define Package/dri2proto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + TITLE:=dri2proto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,dri2proto)) diff --git a/Xorg/xorg/proto/fixesproto/Makefile b/Xorg/xorg/proto/fixesproto/Makefile new file mode 100644 index 0000000..48c2164 --- /dev/null +++ b/Xorg/xorg/proto/fixesproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=fixesproto +PKG_VERSION:=4.1.1 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=4c1cb4f2ed9f34de59f2f04783ca9483 + +include $(INCLUDE_DIR)/package.mk + +define Package/fixesproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=fixesproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,fixesproto)) diff --git a/Xorg/xorg/proto/fontcacheproto/Makefile b/Xorg/xorg/proto/fontcacheproto/Makefile new file mode 100644 index 0000000..b2921f5 --- /dev/null +++ b/Xorg/xorg/proto/fontcacheproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=fontcacheproto +PKG_VERSION:=0.1.3 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=a8a50e5e995bfacb0359575faf7f6906 + +include $(INCLUDE_DIR)/package.mk + +define Package/fontcacheproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=fontcacheproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,fontcacheproto)) diff --git a/Xorg/xorg/proto/fontsproto/Makefile b/Xorg/xorg/proto/fontsproto/Makefile new file mode 100644 index 0000000..6592eec --- /dev/null +++ b/Xorg/xorg/proto/fontsproto/Makefile @@ -0,0 +1,38 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=fontsproto +PKG_RELEASE:=1 +PKG_VERSION:=2.1.0 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=f3a857deadca3144fba041af1dbf7603 + +include $(INCLUDE_DIR)/package.mk + +define Package/fontsproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=fontsproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,fontsproto)) diff --git a/Xorg/xorg/proto/glproto/Makefile b/Xorg/xorg/proto/glproto/Makefile new file mode 100644 index 0000000..8e40489 --- /dev/null +++ b/Xorg/xorg/proto/glproto/Makefile @@ -0,0 +1,38 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_NAME:=glproto +PKG_VERSION:=1.4.10 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=c9f8cebfba72bfab674bc0170551fb8d + +include $(INCLUDE_DIR)/package.mk + +define Package/glproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=glproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,glproto)) diff --git a/Xorg/xorg/proto/inputproto/Makefile b/Xorg/xorg/proto/inputproto/Makefile new file mode 100644 index 0000000..686c2c6 --- /dev/null +++ b/Xorg/xorg/proto/inputproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=inputproto +PKG_VERSION:=2.0 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=0f7acbc14a082f9ae03744396527d23d + +include $(INCLUDE_DIR)/package.mk + +define Package/inputproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=inputproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,inputproto)) diff --git a/Xorg/xorg/proto/kbproto/Makefile b/Xorg/xorg/proto/kbproto/Makefile new file mode 100644 index 0000000..54c71f8 --- /dev/null +++ b/Xorg/xorg/proto/kbproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=kbproto +PKG_VERSION:=1.0.4 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=7f439166a9b2bf81471a33951883019f + +include $(INCLUDE_DIR)/package.mk + +define Package/kbproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=kbproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,kbproto)) diff --git a/Xorg/xorg/proto/printproto/Makefile b/Xorg/xorg/proto/printproto/Makefile new file mode 100644 index 0000000..f6faa5e --- /dev/null +++ b/Xorg/xorg/proto/printproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=printproto +PKG_VERSION:=1.0.4 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=7321847a60748b4d2f1fa16db4b6ede8 + +include $(INCLUDE_DIR)/package.mk + +define Package/printproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=printproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,printproto)) diff --git a/Xorg/xorg/proto/randrproto/Makefile b/Xorg/xorg/proto/randrproto/Makefile new file mode 100644 index 0000000..a5a5763 --- /dev/null +++ b/Xorg/xorg/proto/randrproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=randrproto +PKG_VERSION:=1.3.1 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=a5c244c36382b0de39b2828cea4b651d + +include $(INCLUDE_DIR)/package.mk + +define Package/randrproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=randrproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,randrproto)) diff --git a/Xorg/xorg/proto/recordproto/Makefile b/Xorg/xorg/proto/recordproto/Makefile new file mode 100644 index 0000000..487e0a3 --- /dev/null +++ b/Xorg/xorg/proto/recordproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=recordproto +PKG_VERSION:=1.14 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=70f5998c673aa510e2acd6d8fb3799de + +include $(INCLUDE_DIR)/package.mk + +define Package/recordproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=recordproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,recordproto)) diff --git a/Xorg/xorg/proto/renderproto/Makefile b/Xorg/xorg/proto/renderproto/Makefile new file mode 100644 index 0000000..a7be89b --- /dev/null +++ b/Xorg/xorg/proto/renderproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=renderproto +PKG_VERSION:=0.11 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=b160a9733fe91b666e74fca284333148 + +include $(INCLUDE_DIR)/package.mk + +define Package/renderproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=renderproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,renderproto)) diff --git a/Xorg/xorg/proto/resourceproto/Makefile b/Xorg/xorg/proto/resourceproto/Makefile new file mode 100644 index 0000000..ec35485 --- /dev/null +++ b/Xorg/xorg/proto/resourceproto/Makefile @@ -0,0 +1,36 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org +include $(TOPDIR)/rules.mk + +PKG_NAME:=resourceproto +PKG_RELEASE:=1 +PKG_VERSION:=1.1.0 +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ + +include $(INCLUDE_DIR)/package.mk + +define Package/resourceproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=resourceproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,resourceproto)) diff --git a/Xorg/xorg/proto/scrnsaverproto/Makefile b/Xorg/xorg/proto/scrnsaverproto/Makefile new file mode 100644 index 0000000..545fda7 --- /dev/null +++ b/Xorg/xorg/proto/scrnsaverproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=scrnsaverproto +PKG_VERSION:=1.2.0 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=9040c991a56ee9b5976936f8c65d5c8a + +include $(INCLUDE_DIR)/package.mk + +define Package/scrnsaverproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=scrnsaverproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,scrnsaverproto)) diff --git a/Xorg/xorg/proto/videoproto/Makefile b/Xorg/xorg/proto/videoproto/Makefile new file mode 100644 index 0000000..f934c8c --- /dev/null +++ b/Xorg/xorg/proto/videoproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=videoproto +PKG_VERSION:=2.3.0 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=fb762146a18207a1e8bc9f299dfc7ac0 + +include $(INCLUDE_DIR)/package.mk + +define Package/videoproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=videoproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,videoproto)) diff --git a/Xorg/xorg/proto/windowswmproto/Makefile b/Xorg/xorg/proto/windowswmproto/Makefile new file mode 100644 index 0000000..b028be0 --- /dev/null +++ b/Xorg/xorg/proto/windowswmproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=windowswmproto +PKG_RELEASE:=1 +PKG_VERSION:=1.0.4 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=e74b2ff3172a6117f2a62b655ef99064 + +include $(INCLUDE_DIR)/package.mk + +define Package/windowswmproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=windowswmproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,windowswmproto)) diff --git a/Xorg/xorg/proto/xcmiscproto/Makefile b/Xorg/xorg/proto/xcmiscproto/Makefile new file mode 100644 index 0000000..92b66a6 --- /dev/null +++ b/Xorg/xorg/proto/xcmiscproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xcmiscproto +PKG_VERSION:=1.2.0 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=7b83e4a7e9f4edc9c6cfb0500f4a7196 + +include $(INCLUDE_DIR)/package.mk + +define Package/xcmiscproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=xcmiscproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,xcmiscproto)) diff --git a/Xorg/xorg/proto/xextproto/Makefile b/Xorg/xorg/proto/xextproto/Makefile new file mode 100644 index 0000000..e4e13f4 --- /dev/null +++ b/Xorg/xorg/proto/xextproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xextproto +PKG_RELEASE:=1 +PKG_VERSION:=7.1.1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=fb6ccaae76db7a35e49b12aea60ca6ff + +include $(INCLUDE_DIR)/package.mk + +define Package/xextproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=xextproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,xextproto)) diff --git a/Xorg/xorg/proto/xf86bigfontproto/Makefile b/Xorg/xorg/proto/xf86bigfontproto/Makefile new file mode 100644 index 0000000..0087404 --- /dev/null +++ b/Xorg/xorg/proto/xf86bigfontproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xf86bigfontproto +PKG_VERSION:=1.2.0 +PKG_RELEASE:=3 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=120e226ede5a4687b25dd357cc9b8efe + +include $(INCLUDE_DIR)/package.mk + +define Package/xf86bigfontproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=xf86bigfontproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,xf86bigfontproto)) diff --git a/Xorg/xorg/proto/xf86dgaproto/Makefile b/Xorg/xorg/proto/xf86dgaproto/Makefile new file mode 100644 index 0000000..4430253 --- /dev/null +++ b/Xorg/xorg/proto/xf86dgaproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xf86dgaproto +PKG_VERSION:=2.1 +PKG_RELEASE:=3 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=a036dc2fcbf052ec10621fd48b68dbb1 + +include $(INCLUDE_DIR)/package.mk + +define Package/xf86dgaproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=xf86dgaproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,xf86dgaproto)) diff --git a/Xorg/xorg/proto/xf86driproto/Makefile b/Xorg/xorg/proto/xf86driproto/Makefile new file mode 100644 index 0000000..3fd3f07 --- /dev/null +++ b/Xorg/xorg/proto/xf86driproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xf86driproto +PKG_VERSION:=2.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=309d552732666c3333d7dc63e80d042f + +include $(INCLUDE_DIR)/package.mk + +define Package/xf86driproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=xf86driproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,xf86driproto)) diff --git a/Xorg/xorg/proto/xf86vidmodeproto/Makefile b/Xorg/xorg/proto/xf86vidmodeproto/Makefile new file mode 100644 index 0000000..cdccb71 --- /dev/null +++ b/Xorg/xorg/proto/xf86vidmodeproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xf86vidmodeproto +PKG_VERSION:=2.3 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=4434894fc7d4eeb4a22e6b876d56fdaa + +include $(INCLUDE_DIR)/package.mk + +define Package/xf86vidmodeproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=xf86vidmodeproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,xf86vidmodeproto)) diff --git a/Xorg/xorg/proto/xineramaproto/Makefile b/Xorg/xorg/proto/xineramaproto/Makefile new file mode 100644 index 0000000..d37c6fa --- /dev/null +++ b/Xorg/xorg/proto/xineramaproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xineramaproto +PKG_VERSION:=1.2 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=a8aadcb281b9c11a91303e24cdea45f5 + +include $(INCLUDE_DIR)/package.mk + +define Package/xineramaproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=xineramaproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,xineramaproto)) diff --git a/Xorg/xorg/proto/xproto/Makefile b/Xorg/xorg/proto/xproto/Makefile new file mode 100644 index 0000000..fb97498 --- /dev/null +++ b/Xorg/xorg/proto/xproto/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xproto +PKG_VERSION:=7.0.16 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/proto/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=75c9edff1f3823e5ab6bb9e66821a901 + +include $(INCLUDE_DIR)/package.mk + +define Package/xproto + SECTION:=xorg-proto + CATEGORY:=Xorg + SUBMENU:=proto + DEPENDS:= + TITLE:=xproto + URL:=http://xorg.freedesktop.org/ +endef + +define Build/InstallDev + DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install +endef + +define Build/Compile + true +endef + +$(eval $(call BuildPackage,xproto)) diff --git a/Xorg/xorg/xserver/xorg-kdrive/Config.in b/Xorg/xorg/xserver/xorg-kdrive/Config.in new file mode 100644 index 0000000..1644e06 --- /dev/null +++ b/Xorg/xorg/xserver/xorg-kdrive/Config.in @@ -0,0 +1,28 @@ +menu "kdrive library support" +depends on PACKAGE_xserver-kdrive-xvesa || PACKAGE_xserver-kdrive-xfbdev || PACKAGE_xserver-kdrive-xglamo || PACKAGE_xserver-kdrive-xephyr + + config X_TSLIB + bool + prompt "enable support for tslib" + +# config X_XCALIBRATE +# bool +# prompt "enable support for xcalibrate" + +# config X_DRI +# bool +# prompt "enable support for DRI" + + config X_COMPOSITE + bool + prompt "enable support for composite" + + config X_XINERAMA + bool + prompt "enable support for xinerama" + +# config X_GLX +# bool +# prompt "enable support for GLX" + +endmenu diff --git a/Xorg/xorg/xserver/xorg-kdrive/Makefile b/Xorg/xorg/xserver/xorg-kdrive/Makefile new file mode 100644 index 0000000..2712d48 --- /dev/null +++ b/Xorg/xorg/xserver/xorg-kdrive/Makefile @@ -0,0 +1,150 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xserver-kdrive +PKG_VERSION:=1.7.1 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/xserver/ +PKG_SOURCE:=xorg-server-$(PKG_VERSION).tar.bz2 +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/xserver/$(PKG_NAME)/xorg-server-$(PKG_VERSION)/ +PKG_MD5SUM:=dda7842467cda6018fdc87e6002e4db1 + +PKG_BUILD_DEPENDS:=randrproto renderproto fixesproto damageproto xcmiscproto \ + xextproto xproto bigreqsproto resourceproto \ + fontsproto inputproto kbproto videoproto resourceproto \ + xf86dgaproto xtrans xf86driproto calibrateproto \ + compositeproto xineramaproto + +PKG_CONFIG_DEPENDS := \ + CONFIG_PACKAGE-xserver-kdrive-fbdev \ + CONFIG_PACKAGE_xserver-kdrive-xephyr \ + CONFIG_X_TSLIB CONFIG_X_COMPOSITE \ + CONFIG_X_XINERAMA CONFIG_X_XCALIBRATE + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +TARGET_LDFLAGS+= \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +include $(INCLUDE_DIR)/package.mk + +define Package/xserver-kdrive/Default + PROVIDES:=xserver + SECTION:=xorg-server + CATEGORY:=Xorg + SUBMENU:=server + URL:=http://xorg.freedesktop.org/ + DEPENDS:=@!avr32 \ + +xserver-common \ + +libpthread \ + +libxkbfile \ + +libXfont \ + +libXau \ + +libXv \ + +libfontenc \ + +pixman \ + +libopenssl \ + +libdrm \ + +xkbcomp \ + +xkbdata \ + @DISPLAY_SUPPORT \ + +X_TSLIB:tslib +endef + +define Package/xserver-kdrive-xfbdev +$(call Package/xserver-kdrive/Default) + TITLE:=Kdrive framebuffer xserver +endef + +define Package/xserver-kdrive-xephyr +$(call Package/xserver-kdrive/Default) + TITLE:=Kdrive ephyr xserver + DEPENDS += @BROKEN +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-kdrive \ + $(if $(CONFIG_PACKAGE_xserver-kdrive-xfbdev), \ + --enable-xfbdev, \ + --disable-xfbdev) \ + $(if $(CONFIG_PACKAGE_xserver-kdrive-xephyr), \ + --enable-xephyr, \ + --disable-xephyr) \ + $(if $(CONFIG_X_TSLIB),--enable-tslib,--disable-tslib) \ + $(if $(CONFIG_X_COMPOSITE),--enable-composite,--disable-composite) \ + $(if $(CONFIG_X_XINERAMA),--enable-xinerama,--disable-xinerama) \ + $(if $(CONFIG_X_XCALIBRATE),--enable-xcalibrate,--disable-xcalibrate) \ + --disable-dependency-tracking \ + --disable-debug \ + --disable-unit-tests \ + --disable-builddocs \ + --disable-glx-tls \ + --disable-shm \ + --disable-xres \ + --disable-record \ + --enable-xv \ + --enable-xvmc \ + --disable-dga \ + --disable-screensaver \ + --disable-xdmcp \ + --disable-xdm-auth-1 \ + --disable-glx \ + --enable-dri \ + --disable-dri2 \ + --disable-xf86vidmode \ + --disable-xace \ + --disable-xselinux \ + --disable-xsecurity \ + --disable-multibuffer \ + --disable-dbe \ + --disable-xf86bigfont \ + --enable-dpms \ + --disable-config-dbus \ + --disable-config-hal \ + --disable-xfree86-utils \ + --disable-xaa \ + --enable-vgahw \ + --disable-vbe \ + --enable-int10-module \ + --disable-xorg \ + --disable-dmx \ + --disable-xvfb \ + --disable-xnest \ + --disable-xquartz \ + --disable-standalone-xpbproxy \ + --disable-xwin \ + --disable-xfake \ + --disable-installsetuid \ + --disable-secure-rpc \ + --enable-silent-rules \ + --disable-shave \ + --disable-xsdl \ + ) +endef + +define Package/xserver-kdrive-xfbdev/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/Xfbdev \ + $(1)/usr/bin/ +endef + +define Package/xserver-kdrive-xephyr/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/Xephyr \ + $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,xserver-kdrive-xfbdev)) +$(eval $(call BuildPackage,xserver-kdrive-xephyr)) diff --git a/Xorg/xorg/xserver/xorg-kdrive/patches/001-tslib.patch b/Xorg/xorg/xserver/xorg-kdrive/patches/001-tslib.patch new file mode 100644 index 0000000..2441441 --- /dev/null +++ b/Xorg/xorg/xserver/xorg-kdrive/patches/001-tslib.patch @@ -0,0 +1,46 @@ +--- tslib-1.0/configure.orig 2008-10-05 14:13:43.000000000 +0200 ++++ tslib-1.0/configure 2008-10-05 14:14:35.000000000 +0200 +@@ -38587,12 +38587,12 @@ + pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-0.0\"") >&5 +- ($PKG_CONFIG --exists --print-errors "tslib-0.0") 2>&5 ++ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-1.0\"") >&5 ++ ($PKG_CONFIG --exists --print-errors "tslib-1.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then +- pkg_cv_TSLIB_CFLAGS=`$PKG_CONFIG --cflags "tslib-0.0" 2>/dev/null` ++ pkg_cv_TSLIB_CFLAGS=`$PKG_CONFIG --cflags "tslib-1.0" 2>/dev/null` + else + pkg_failed=yes + fi +@@ -38603,12 +38603,12 @@ + pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-0.0\"") >&5 +- ($PKG_CONFIG --exists --print-errors "tslib-0.0") 2>&5 ++ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-1.0\"") >&5 ++ ($PKG_CONFIG --exists --print-errors "tslib-1.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then +- pkg_cv_TSLIB_LIBS=`$PKG_CONFIG --libs "tslib-0.0" 2>/dev/null` ++ pkg_cv_TSLIB_LIBS=`$PKG_CONFIG --libs "tslib-1.0" 2>/dev/null` + else + pkg_failed=yes + fi +@@ -38626,9 +38626,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tslib-0.0" 2>&1` ++ TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tslib-1.0" 2>&1` + else +- TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "tslib-0.0" 2>&1` ++ TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "tslib-1.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$TSLIB_PKG_ERRORS" >&5 diff --git a/Xorg/xorg/xserver/xorg-kdrive/patches/002-add-portrait-modes.patch b/Xorg/xorg/xserver/xorg-kdrive/patches/002-add-portrait-modes.patch new file mode 100644 index 0000000..f7b3e02 --- /dev/null +++ b/Xorg/xorg/xserver/xorg-kdrive/patches/002-add-portrait-modes.patch @@ -0,0 +1,26 @@ +--- xorg-server-1.5.1/hw/kdrive/src/kmode.c.orig 2007-10-23 23:26:50.000000000 +0200 ++++ xorg-server-1.5.1/hw/kdrive/src/kmode.c 2008-10-05 14:55:24.000000000 +0200 +@@ -78,6 +78,12 @@ + 16, 48, 160, KdSyncNegative, /* 31.469 */ + 10, 33, 45, KdSyncNegative, /* 59.940 */ + }, ++ ++ /* 480x640 modes */ ++ { 480, 640, 60, 0, /* VESA */ ++ 0, 0, 0, KdSyncNegative, /* 31.469 */ ++ 0, 0, 0, KdSyncNegative, /* 59.940 */ ++ }, + + /* 800x600 modes */ + { 800, 600, 85, 56250, /* VESA */ +@@ -102,6 +108,10 @@ const KdMonitorTiming kdMonitorTimings[] = { + 24, 128, 224, KdSyncPositive, /* 35.156 */ + 1, 22, 25, KdSyncPositive, /* 56.250 */ + }, ++ { 600, 800, 56, 36000, /* VESA */ ++ 24, 128, 224, KdSyncPositive, /* 35.156 */ ++ 1, 22, 25, KdSyncPositive, /* 56.250 */ ++ }, + + /* 1024x768 modes */ + { 1024, 768, 85, 94500, /* VESA */ diff --git a/Xorg/xorg/xserver/xorg-server/Config.in b/Xorg/xorg/xserver/xorg-server/Config.in new file mode 100644 index 0000000..1644e06 --- /dev/null +++ b/Xorg/xorg/xserver/xorg-server/Config.in @@ -0,0 +1,28 @@ +menu "kdrive library support" +depends on PACKAGE_xserver-kdrive-xvesa || PACKAGE_xserver-kdrive-xfbdev || PACKAGE_xserver-kdrive-xglamo || PACKAGE_xserver-kdrive-xephyr + + config X_TSLIB + bool + prompt "enable support for tslib" + +# config X_XCALIBRATE +# bool +# prompt "enable support for xcalibrate" + +# config X_DRI +# bool +# prompt "enable support for DRI" + + config X_COMPOSITE + bool + prompt "enable support for composite" + + config X_XINERAMA + bool + prompt "enable support for xinerama" + +# config X_GLX +# bool +# prompt "enable support for GLX" + +endmenu diff --git a/Xorg/xorg/xserver/xorg-server/Makefile b/Xorg/xorg/xserver/xorg-server/Makefile new file mode 100644 index 0000000..4b57d0a --- /dev/null +++ b/Xorg/xorg/xserver/xorg-server/Makefile @@ -0,0 +1,193 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xorg-server +PKG_VERSION:=1.7.1 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/xserver/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=dda7842467cda6018fdc87e6002e4db1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/xserver/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_BUILD_DEPENDS:=randrproto renderproto fixesproto damageproto xcmiscproto \ + xextproto xproto scrnsaverproto bigreqsproto resourceproto \ + fontsproto inputproto kbproto videoproto resourceproto \ + compositeproto xf86dgaproto xtrans xf86driproto dri2proto + +PKG_INSTALL:=1 +PKG_FIXUP:=libtool +PKG_BUILD_PARALLEL:=1 + +PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_xserver-xorg CONFIG_PACKAGE_xserver-common + +include $(INCLUDE_DIR)/package.mk + +X_CONFIG=generic +ifeq ($(CONFIG_TARGET_olpc),y) + X_CONFIG=olpc +endif +ifeq ($(CONFIG_TARGET_s3c24xx),y) + X_CONFIG=om_gta02 +endif +ifeq ($(CONFIG_TARGET_omap24xx_n810-gui),y) + X_CONFIG=nokia_n810 +endif + +define Package/xorg/Default + SECTION:=xorg-server + CATEGORY:=Xorg + SUBMENU:=server + DEPENDS:=@!avr32 + URL:=http://xorg.freedesktop.org/ +endef + +define Package/xserver-xorg +$(call Package/xorg/Default) + PROVIDES:=xserver + TITLE:=Xorg xserver + DEPENDS:=+xserver-common \ + +libpthread \ + +xkbcomp \ + +libxkbfile \ + +libXfont \ + +libXau \ + +libXv \ + +libfontenc \ + +pixman \ + +libopenssl \ + +libpciaccess \ + +libdrm \ + +libgl-mesa \ + @DISPLAY_SUPPORT +endef + +define Package/xserver-common +$(call Package/xorg/Default) + TITLE:=meta-package +endef + +EXTRA_LDFLAGS:=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-dependency-tracking \ + --disable-debug \ + --disable-unit-tests \ + --disable-builddocs \ + --disable-glx-tls \ + --disable-composite \ + --disable-shm \ + --disable-xres \ + --disable-record \ + --enable-xv \ + --enable-xvmc \ + --disable-dga \ + --disable-screensaver \ + --disable-xdmcp \ + --disable-xdm-auth-1 \ + --disable-glx \ + --enable-dri \ + --enable-dri2 \ + --disable-xinerama \ + --disable-xf86vidmode \ + --disable-xace \ + --disable-xselinux \ + --disable-xsecurity \ + --disable-xcalibrate \ + --disable-tslib \ + --disable-multibuffer \ + --disable-dbe \ + --disable-xf86bigfont \ + --enable-dpms \ + --disable-config-dbus \ + --disable-config-hal \ + --disable-xfree86-utils \ + --disable-xaa \ + --enable-vgahw \ + --disable-vbe \ + --enable-int10-module \ + --enable-xorg \ + --disable-dmx \ + --disable-xvfb \ + --disable-xnest \ + --disable-xquartz \ + --disable-standalone-xpbproxy \ + --disable-xwin \ + --disable-kdrive \ + --disable-xfake \ + --disable-xfbdev \ + --disable-installsetuid \ + --disable-secure-rpc \ + --enable-silent-rules \ + --disable-shave \ + ) +endef + +define Package/xserver-common/install + $(INSTALL_DIR) $(1)/etc/{init.d,config,X11} + $(INSTALL_BIN) \ + ./files/x.init \ + $(1)/etc/init.d/x11 + $(INSTALL_DATA) ./files/tmp/x11.uci \ + $(1)/etc/config/x11 + test -f ./files/config.xorg/$(X_CONFIG) && \ + $(INSTALL_DATA) \ + ./files/config.xorg/$(X_CONFIG) \ + $(1)/etc/X11/xorg.conf +# test -f ./files/config.uci/$(X_CONFIG) && \ +# $(INSTALL_DATA) \ +# ./files/config.uci/$(X_CONFIG) \ +# $(1)/etc/config/x11 +endef + +define Package/xserver-xorg/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/Xorg \ + $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/{extensions,fonts,linux,multimedia} + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/*.so \ + $(1)/usr/lib/xorg/modules/ + + $(foreach d,extensions fonts linux multimedia, \ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/$(d)/*.so \ + $(1)/usr/lib/xorg/modules/$(d)/; \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/share/aclocal/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/aclocal/* \ + $(1)/usr/share/aclocal/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + + $(if $(CONFIG_PACKAGE_xserver-xorg), \ + $(INSTALL_DIR) $(1)/usr/include/xorg; \ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/xorg/*.h \ + $(1)/usr/include/xorg/; \ + ) + $(INSTALL_DIR) $(1)/mk + $(INSTALL_DATA) \ + ./files/xorg-driver.mk \ + $(1)/mk/ + $(SED) 's,@VERSION@,$(PKG_VERSION),' $(1)/mk/xorg-driver.mk +endef + +$(eval $(call BuildPackage,xserver-common)) +$(eval $(call BuildPackage,xserver-xorg)) diff --git a/Xorg/xorg/xserver/xorg-server/files/config.uci/generic b/Xorg/xorg/xserver/xorg-server/files/config.uci/generic new file mode 100644 index 0000000..da66f66 --- /dev/null +++ b/Xorg/xorg/xserver/xorg-server/files/config.uci/generic @@ -0,0 +1,17 @@ +# Copyright (C) 2006 OpenWrt.org + +config screen + option resolution 800x600 + option dpi 285 + +config graphic + option device /dev/fb0 + +config input mouse + option device /dev/psaux + option driver mouse + +config input keybd + option driver keyboard + +config 'desktop' diff --git a/Xorg/xorg/xserver/xorg-server/files/config.uci/olpc b/Xorg/xorg/xserver/xorg-server/files/config.uci/olpc new file mode 100644 index 0000000..49b7f2d --- /dev/null +++ b/Xorg/xorg/xserver/xorg-server/files/config.uci/olpc @@ -0,0 +1,14 @@ +# Copyright (C) 2006 OpenWrt.org + +config screen + option resolution 1200x900 + option dpi 285 + +config graphic + option device /dev/fb0 + +config input mouse + option device /dev/event1 + option driver tslib + +config 'desktop' diff --git a/Xorg/xorg/xserver/xorg-server/files/config.uci/om_gta02 b/Xorg/xorg/xserver/xorg-server/files/config.uci/om_gta02 new file mode 100644 index 0000000..296599f --- /dev/null +++ b/Xorg/xorg/xserver/xorg-server/files/config.uci/om_gta02 @@ -0,0 +1,14 @@ +# Copyright (C) 2006 OpenWrt.org + +config screen + option resolution 480x640 + option dpi 285 + +config graphic + option device /dev/fb0 + +config input mouse + option device /dev/event1 + option driver tslib + +config 'desktop' diff --git a/Xorg/xorg/xserver/xorg-server/files/config.xorg/generic b/Xorg/xorg/xserver/xorg-server/files/config.xorg/generic new file mode 100644 index 0000000..d9db82f --- /dev/null +++ b/Xorg/xorg/xserver/xorg-server/files/config.xorg/generic @@ -0,0 +1,64 @@ +# xorg configuration + +Section "ServerLayout" + Identifier "Default Layout" + Screen 0 "Screen0" 0 0 + InputDevice "Mouse0" "CorePointer" + InputDevice "Mouse1" "CorePointer" + InputDevice "Keyboard0" "CoreKeyboard" +EndSection + +Section "Module" + Load "dbe" + Load "extmod" + Load "fbdevhw" +# Load "glx" + Load "record" + Load "freetype" + Load "type1" +EndSection + +Section "InputDevice" + Identifier "Keyboard0" + Driver "keyboard" +EndSection + +Section "InputDevice" + Identifier "Mouse0" + Driver "mouse" + Option "Protocol" "PS/2" + Option "Device" "/dev/psaux" +EndSection + +Section "InputDevice" + Identifier "Mouse1" + Driver "mouse" + Option "Protocol" "IMPS/2" + Option "Device" "/dev/input/mice" +EndSection + +Section "Monitor" + Identifier "Monitor0" + VendorName "Monitor Vendor" + ModelName "OWRT" + Option "dpms" +EndSection + +Section "Device" + Identifier "Videocard0" + Driver "vesa" + VendorName "Videocard vendor" + BoardName "Vesa driver" +EndSection + +Section "Device" + Identifier "FBDev" + Driver "fbdev" +EndSection + +Section "Screen" + Identifier "Screen0" + Device "Videocard0" + Monitor "Monitor0" +EndSection + diff --git a/Xorg/xorg/xserver/xorg-server/files/config.xorg/nokia_n810 b/Xorg/xorg/xserver/xorg-server/files/config.xorg/nokia_n810 new file mode 100644 index 0000000..27f2430 --- /dev/null +++ b/Xorg/xorg/xserver/xorg-server/files/config.xorg/nokia_n810 @@ -0,0 +1,43 @@ +Section "InputDevice" + Identifier "SlideKeyboard" + Driver "kbd" + Option "XkbRules" "evdev" + Option "XkbModel" "pc105" + Option "XkbLayout" "nokia_vndr/rx-44" + Option "XkbVariant" "de" + Option "XkbOptions" "lv3:ralt_switch" +EndSection + +Section "InputDevice" + Identifier "Touchscreen" + Driver "tslib" + Option "CorePointer" "true" + Option "SendCoreEvents" "true" + Option "Device" "/dev/input/event1" + Option "Protocol" "Auto" + Option "Width" "800" + Option "Height" "480" +EndSection + +Section "Monitor" + Identifier "InternalLCD" +EndSection + +Section "Device" + Identifier "FramebufferDevice" + Driver "omapfb" + Option "fb" "/dev/fb0" +EndSection + +Section "Screen" + Identifier "InternalScreen" + Device "FramebufferDevice" + Monitor "InternalLCD" +EndSection + +Section "ServerLayout" + Identifier "DefaultLayout" + Screen "InternalScreen" + InputDevice "Touchscreen" "CorePointer" + InputDevice "SlideKeyboard" "CoreKeyboard" +EndSection diff --git a/Xorg/xorg/xserver/xorg-server/files/config.xorg/olpc b/Xorg/xorg/xserver/xorg-server/files/config.xorg/olpc new file mode 100644 index 0000000..0bbb1ae --- /dev/null +++ b/Xorg/xorg/xserver/xorg-server/files/config.xorg/olpc @@ -0,0 +1,78 @@ +# xorg configuration + +Section "ServerLayout" + Identifier "Default Layout" + Screen 0 "Screen0" 0 0 + InputDevice "Mouse0" "CorePointer" + InputDevice "Keyboard0" "CoreKeyboard" +EndSection + +Section "Files" + FontPath "/usr/lib/X11/fonts/misc" +EndSection + +Section "Module" + Load "dbe" + Load "extmod" + Load "fbdevhw" +# Load "glx" + Load "record" + Load "freetype" + Load "type1" +EndSection + +Section "InputDevice" + Identifier "Keyboard0" + Driver "keyboard" + Option "XkbModel" "pc105" + Option "XkbLayout" "us" +EndSection + +Section "InputDevice" + Identifier "Mouse0" + Driver "mouse" +# Option "Protocol" "PS/2" + Option "Protocol" "IMPS/2" +# Option "Device" "/dev/psaux" + Option "Device" "/dev/mice" +# Option "ZAxisMapping" "4 5" +# Option "Emulate3Buttons" "yes" +EndSection + +Section "Monitor" + Identifier "Monitor0" + HorizSync 30-67 + VertRefresh 48-52 + DisplaySize 152 114 + Mode "1200x900" + DotClock 57.275 + HTimings 1200 1208 1216 1240 + VTimings 900 905 908 912 + Flags "-HSync" "-VSync" + EndMode +EndSection + +Section "Device" + Identifier "Videocard0" + Driver "geode" + Option "PanelGeometry" "1200x900" +EndSection + +Section "Screen" + Identifier "Screen0" + Device "Videocard0" + Monitor "Monitor0" + DefaultDepth 16 + + SubSection "Display" + Depth 16 + Modes "1200x900" + EndSubsection + +EndSection + +Section "DRI" + Group 0 + Mode 0666 +EndSection + diff --git a/Xorg/xorg/xserver/xorg-server/files/config.xorg/om_gta02 b/Xorg/xorg/xserver/xorg-server/files/config.xorg/om_gta02 new file mode 100644 index 0000000..1e84135 --- /dev/null +++ b/Xorg/xorg/xserver/xorg-server/files/config.xorg/om_gta02 @@ -0,0 +1,34 @@ +# xorg configuration + +Section "ServerLayout" + Identifier "Default Layout" + Screen 0 "Screen0" 0 0 + InputDevice "Mouse0" "CorePointer" +EndSection + +Section "InputDevice" + Identifier "Mouse0" + Driver "tslib" + Option "Device" "/dev/event1" + Option "Width" "480" + Option "Height" "640" +EndSection + +Section "Monitor" + Identifier "Monitor0" + VendorName "Monitor Vendor" + ModelName "OWRT" + Option "dpms" +EndSection + +Section "Device" + Identifier "Videocard0" + Driver "glamo" +EndSection + +Section "Screen" + Identifier "Screen0" + Device "Videocard0" + Monitor "Monitor0" + DefaultDepth 16 +EndSection diff --git a/Xorg/xorg/xserver/xorg-server/files/tmp/x11.uci b/Xorg/xorg/xserver/xorg-server/files/tmp/x11.uci new file mode 100644 index 0000000..0fc9fa9 --- /dev/null +++ b/Xorg/xorg/xserver/xorg-server/files/tmp/x11.uci @@ -0,0 +1,3 @@ +# Copyright (C) 2006 OpenWrt.org + +config 'desktop' diff --git a/Xorg/xorg/xserver/xorg-server/files/x.init b/Xorg/xorg/xserver/xorg-server/files/x.init new file mode 100755 index 0000000..2685d04 --- /dev/null +++ b/Xorg/xorg/xserver/xorg-server/files/x.init @@ -0,0 +1,56 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=99 + +ARGS="-br" + +#screen() { +# local cfg="$1" +# config_get resolution $cfg resolution +# config_get dpi $cfg dpi +# [ -n "$resolution" ] && ARGS="$ARGS -screen $resolution" +# [ -n "$dpi" ] && ARGS="$ARGS -dpi $dpi" +#} +# +#graphic() { +# local cfg="$1" +# config_get device $cfg device +# [ -n "$device" ] && ARGS="$ARGS -fb $device" +#} +# +#input() { +# local cfg="$1" +# config_get device $cfg device +# config_get driver $cfg driver +# #[ -n "$device" ] || return 0 +# [ -n "$driver" ] || return 0 +# ARGS="$ARGS -$cfg $driver,,device=$device" +#} + +desktop() { + local cfg="$1" + config_get autostart $cfg autostart + [ -n "$autostart" ] && eval $autostart & + config_get fdo_compliance $cfg fdo_compliance + [ -n "`echo \"$fdo_compliance\" 2> /dev/null | grep autostart`" ] && exit # in case the environment provides its own functionality to do the autostart stuff exit here +} + +start() { + export DISPLAY=":0" + config_load x11 +# config_foreach screen screen +# config_foreach graphic graphic +# config_foreach input input + Xorg $ARGS & + sleep 1 # give the xserver some time get initialized + config_foreach desktop desktop + test -d /etc/xdg/autostart || exit + sleep 1 # give the first x11 application some time to get present - afterwards we'll start the x11 autostart applications + for elem in `ls /etc/xdg/autostart/`; do + if grep "^Hidden=true" "/etc/xdg/autostart/$elem" > /dev/null; then + continue + fi + exec=`grep "^Exec=" "/etc/xdg/autostart/$elem"` + eval ${exec#*=} & + done +} diff --git a/Xorg/xorg/xserver/xorg-server/files/xorg-driver.mk b/Xorg/xorg/xserver/xorg-server/files/xorg-driver.mk new file mode 100644 index 0000000..0b12519 --- /dev/null +++ b/Xorg/xorg/xserver/xorg-server/files/xorg-driver.mk @@ -0,0 +1,3 @@ +XORG_VERSION:=@VERSION@ + +STAMP_CONFIGURED:=$(STAMP_CONFIGURED)$(XORG_VERSION) diff --git a/Xorg/xserver/xglamo/Makefile b/Xorg/xserver/xglamo/Makefile new file mode 100644 index 0000000..d1c0ac5 --- /dev/null +++ b/Xorg/xserver/xglamo/Makefile @@ -0,0 +1,135 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xglamo +PKG_VERSION:=20081205 +PKG_REV:=3f113f5f4dbaf14dee439eac8d510313fff3aafc +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=git://git.openmoko.org/git/xglamo.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/xserver/$(PKG_NAME)-$(PKG_VERSION)/ + +include $(INCLUDE_DIR)/package.mk + +EXTRA_CFLAGS+= -I${STAGING_DIR}/usr/include/X11/GL -I${STAGING_DIR}/usr/include/X11/dri/ -I${STAGING_DIR}/usr/include/X11/ -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +CONFIGURE_ARGS += --disable-dga \ + --disable-xinerama \ + --disable-xf86misc \ + --disable-xf86vidmode \ + --disable-xf86bigfont \ + --disable-xorgcfg \ + --disable-xkb \ + --disable-xnest \ + --disable-xvfb \ + --disable-xevie \ + --disable-xprint \ + --disable-xtrap \ + --disable-dmx \ + --disable-w100 \ + --disable-glx \ + --disable-xv \ + --disable-record \ + --disable-xephyr \ + --disable-xorg \ + --enable-kdrive \ + --enable-tslib \ + --enable-dri \ + --enable-drm \ + --enable-builtin-fonts \ + --with-default-font-path=built-ins \ + +CONFIGURE_VARS+=ac_cv_file__usr_share_sgml_X11_defs_ent=yes + +ifeq ($(CONFIG_TARGET_s3c24xx),y) + X_CONFIG=om_gta02 + TS_POINTERCAL=om_gta02 +endif + +define Package/xglamo + # xineramaproto necessary even when xinerama is disabled due to buggy xglamo + TITLE:=xglamo + SECTION:=xorg-server + SUBMENU:=server + CATEGORY:=Xorg + URL:=http://git.openmoko.org/?p=xglamo.git + DEPENDS:=+tslib \ + +recordproto \ + +glproto \ + +libdrm \ + +xf86driproto \ + +xineramaproto \ + +calibrateproto \ + +compositeproto \ + +libpthread \ + +randrproto \ + +renderproto \ + +fixesproto \ + +damageproto \ + +xcmiscproto \ + +xextproto \ + +xproto \ + +scrnsaverproto \ + +bigreqsproto \ + +resourceproto \ + +fontsproto \ + +inputproto \ + +kbproto \ + +videoproto \ + +resourceproto \ + +xtrans \ + +libxkbfile \ + +libXfont \ + +libXau \ + +libfontenc \ + +pixman \ + +libopenssl \ + @DISPLAY_SUPPORT \ + @arm||armeb \ + @TARGET_s3c24xx +endef + +define Package/xglamo/description + kdrive server with acceleration support for the graphics chip by smedia +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR) && \ + $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \ + $(CONFIGURE_VARS) \ + ./autogen.sh \ + $(CONFIGURE_ARGS_XTRA) \ + $(CONFIGURE_ARGS) \ + ); +endef + +define Build/Compile + DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE) -C $(PKG_BUILD_DIR) install +endef + +define Package/xglamo/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/etc/init.d $(1)/etc/config $(1)/etc/uci-defaults + $(CP) $(PKG_INSTALL_DIR)/usr/bin/Xglamo $(1)/usr/bin/ + $(CP) ./files/x.init $(1)/etc/init.d/x11 + $(if $(TS_POINTERCAL),$(CP) ./files/pointercal.$(TS_POINTERCAL) $(1)/etc/pointercal) + $(if $(X_CONFIG),$(CP) ./files/config/x11.$(X_CONFIG) $(1)/etc/config/x11) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +$(eval $(call BuildPackage,xglamo)) diff --git a/Xorg/xserver/xglamo/files/config/x11.om_gta02 b/Xorg/xserver/xglamo/files/config/x11.om_gta02 new file mode 100644 index 0000000..705107c --- /dev/null +++ b/Xorg/xserver/xglamo/files/config/x11.om_gta02 @@ -0,0 +1,7 @@ +# Copyright (C) 2006 OpenWrt.org + +config 'screen' + option 'resolution' '480x640' + option 'dpi' '285' + +config 'desktop' diff --git a/Xorg/xserver/xglamo/files/pointercal.om_gta02 b/Xorg/xserver/xglamo/files/pointercal.om_gta02 new file mode 100644 index 0000000000000000000000000000000000000000..841ec7fab2e8e37afeb8c3afa1626a62d8fd1543 GIT binary patch literal 46 ucmV~$u>k-e3<5A`uiya(XrcQ5VcS<-WN1%w#i;F_+%Gw{#l?a0X literal 0 HcmV?d00001 diff --git a/Xorg/xserver/xglamo/files/x.init b/Xorg/xserver/xglamo/files/x.init new file mode 100755 index 0000000..ddefa12 --- /dev/null +++ b/Xorg/xserver/xglamo/files/x.init @@ -0,0 +1,39 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=99 + +ARGS="" + +screen() { + local cfg="$1" + config_get resolution $cfg resolution + config_get dpi $cfg dpi + [ -n "$resolution" ] && ARGS="$ARGS -screen $resolution" + [ -n "$dpi" ] && ARGS="$ARGS -dpi $dpi" +} + +desktop() { + local cfg="$1" + config_get autostart $cfg autostart + [ -n "$autostart" ] && eval $autostart & + config_get fdo_compliance $cfg fdo_compliance + [ -n "`echo \"$fdo_compliance\" 2> /dev/null | grep autostart`" ] && exit # in case the environment provides its own functionality to do the autostart stuff exit here +} + +start() { + export DISPLAY=":0" + config_load x11 + config_foreach screen screen + TSLIB_TSDEVICE="/dev/event1" Xglamo $ARGS & + sleep 1 # give the xserver some time get initialized + config_foreach desktop desktop + test -d /etc/xdg/autostart || exit + sleep 1 # give the first x11 application some time to get present - afterwars we'll start the x11 autostart applications + for elem in `ls /etc/xdg/autostart/`; do + if grep "^Hidden=true" "/etc/xdg/autostart/$elem" > /dev/null; then + continue + fi + exec=`grep "^Exec=" "/etc/xdg/autostart/$elem"` + eval ${exec#*=} & + done +} diff --git a/Xorg/xserver/xglamo/patches/001-fix-aclocal.patch b/Xorg/xserver/xglamo/patches/001-fix-aclocal.patch new file mode 100644 index 0000000..8af158f --- /dev/null +++ b/Xorg/xserver/xglamo/patches/001-fix-aclocal.patch @@ -0,0 +1,14 @@ +diff -ruN git/configure.ac xglamo/git/configure.ac +--- git.orig/configure.ac 2008-11-18 23:42:32.000000000 +0100 ++++ git/configure.ac 2008-11-18 23:51:31.000000000 +0100 +@@ -1688,7 +1688,9 @@ + DIX_CFLAGS="-DHAVE_DIX_CONFIG_H" + AC_SUBST([DIX_CFLAGS]) + +-AC_SUBST([libdir exec_prefix prefix]) ++AC_SUBST([libdir]) ++AC_SUBST([exec_prefix]) ++AC_SUBST([prefix]) + + # Man page sections - used in config utils & generating man pages + XORG_MANPAGE_SECTIONS diff --git a/admin/debootstrap/Makefile b/admin/debootstrap/Makefile new file mode 100644 index 0000000..bbf24a6 --- /dev/null +++ b/admin/debootstrap/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2010 Gianluigi Tiesi +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=debootstrap +PKG_VERSION:=1.0.30 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_VERSION)_all.udeb +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/d/debootstrap +PKG_MD5SUM:=d87b35670aa735ae5b7d3f8bf1b76245 + +UNPACK_CMD=ar -p "$(DL_DIR)/$(PKG_SOURCE)" data.tar.gz | ( cd $(1) && tar -xzf - ) + +include $(INCLUDE_DIR)/package.mk + +define Package/debootstrap + SECTION:=admin + CATEGORY:=Administration + TITLE:=Bootstrap a basic Debian system + URL:=http://wiki.debian.org/Debootstrap + DEPENDS:=+coreutils-chroot +coreutils-sha1sum + MAINTAINER:=Luka Perkov +endef + +define Package/debootstrap/description + debootstrap is used to create a Debian base system from scratch, without + requiring the availability of dpkg or apt. It does this by downloading .deb + files from a mirror site, and carefully unpacking them into a directory which + can eventually be chrooted into. +endef + +define Build/Compile +# file pkgdetails.c was imported from debian package base-installer version 1.119 + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) ./files/pkgdetails.c -o $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails +endef + +define Package/debootstrap/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin + $(INSTALL_DIR) $(1)/usr/share/debootstrap + $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails $(1)/usr/share/debootstrap + $(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/debootstrap/functions $(1)/usr/share/debootstrap + $(INSTALL_DIR) $(1)/usr/share/debootstrap/scripts + $(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/debootstrap/scripts/* $(1)/usr/share/debootstrap/scripts +endef + +$(eval $(call BuildPackage,debootstrap)) diff --git a/admin/debootstrap/files/pkgdetails.c b/admin/debootstrap/files/pkgdetails.c new file mode 100644 index 0000000..1154089 --- /dev/null +++ b/admin/debootstrap/files/pkgdetails.c @@ -0,0 +1,286 @@ +#include +#include +#include +#include + +#define MAX_LINE 1000 +#define MAX_PKGS 100 + +char *checksum_field=NULL; + +static char *fieldcpy(char *dst, char *fld) { + while (*fld && *fld != ':') + fld++; + if (!*(fld++)) + return NULL; + while (isspace(*fld)) fld++; + return strcpy(dst, fld); +} + +static void dogetdeps(char *pkgsfile, char **in_pkgs, int pkgc) { + char buf[MAX_LINE]; + char cur_pkg[MAX_LINE]; + char cur_deps[MAX_LINE]; + char *pkgs[MAX_PKGS]; + int i; + int skip; + FILE *f; + + cur_pkg[0] = cur_deps[0] = '\0'; + + for (i = 0; i < pkgc; i++) pkgs[i] = in_pkgs[i]; + + f = fopen(pkgsfile, "r"); + if (f == NULL) { + perror(pkgsfile); + exit(1); + } + + skip = 1; + while (fgets(buf, sizeof(buf), f)) { + if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0'; + if (strncasecmp(buf, "Package:", 8) == 0) { + int any = 0; + skip = 1; + fieldcpy(cur_pkg, buf); + for (i = 0; i < pkgc; i++) { + if (!pkgs[i]) continue; + any = 1; + if (strcmp(cur_pkg, pkgs[i]) == 0) { + skip = 0; + pkgs[i] = NULL; + break; + } + } + if (!any) break; + } else if (!skip && + (strncasecmp(buf, "Depends:", 8) == 0 || + strncasecmp(buf, "Pre-Depends:", 12) == 0)) + { + char *pch; + fieldcpy(cur_deps, buf); + pch = cur_deps; + while (1) { + while (isspace(*pch)) pch++; + if (!*pch) break; + + while (*pch && *pch != '(' && *pch != '|' && *pch != ',' + && !isspace(*pch)) + { + fputc(*pch++, stdout); + } + fputc('\n', stdout); + while (*pch && *pch++ != ',') (void)NULL; + } + } + } + fclose(f); +} + +static void dopkgmirrorpkgs(int uniq, char *mirror, char *pkgsfile, + char *fieldname, char **in_pkgs, int pkgc) +{ + char buf[MAX_LINE]; + char cur_field[MAX_LINE]; + char cur_pkg[MAX_LINE]; + char cur_ver[MAX_LINE]; + char cur_arch[MAX_LINE]; + char cur_size[MAX_LINE]; + char cur_checksum[MAX_LINE]; + char cur_filename[MAX_LINE]; + char *pkgs[MAX_PKGS]; + int i; + FILE *f; + + cur_pkg[0] = cur_ver[0] = cur_arch[0] = cur_filename[0] = '\0'; + + for (i = 0; i < pkgc; i++) pkgs[i] = in_pkgs[i]; + + f = fopen(pkgsfile, "r"); + if (f == NULL) { + perror(pkgsfile); + exit(1); + } + while (fgets(buf, sizeof(buf), f)) { + if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0'; + if (strncasecmp(buf, fieldname, strlen(fieldname)) == 0) { + fieldcpy(cur_field, buf); + } + if (strncasecmp(buf, "Package:", 8) == 0) { + fieldcpy(cur_pkg, buf); + } else if (strncasecmp(buf, "Version:", 8) == 0) { + fieldcpy(cur_ver, buf); + } else if (strncasecmp(buf, "Architecture:", 13) == 0) { + fieldcpy(cur_arch, buf); + } else if (strncasecmp(buf, "Size:", 5) == 0) { + fieldcpy(cur_size, buf); + } else if (strncasecmp(buf, checksum_field, strlen(checksum_field)) == 0 + && buf[strlen(checksum_field)] == ':') { + fieldcpy(cur_checksum, buf); + } else if (strncasecmp(buf, "Filename:", 9) == 0) { + fieldcpy(cur_filename, buf); + } else if (!*buf) { + int any = 0; + for (i = 0; i < pkgc; i++) { + if (!pkgs[i]) continue; + any = 1; + if (strcmp(cur_field, pkgs[i]) == 0) { + printf("%s %s %s %s %s %s %s\n", cur_pkg, cur_ver, cur_arch, mirror, cur_filename, cur_checksum, cur_size); + if (uniq) pkgs[i] = NULL; + break; + } + } + if (!any) break; + } + } + fclose(f); + + /* any that weren't found are returned as "pkg -" */ + if (uniq) { + for (i = 0; i < pkgc; i++) { + if (pkgs[i]) { + printf("%s -\n", pkgs[i]); + } + } + } +} + +static void oom_die(void) +{ + fprintf(stderr, "Out of memory!\n"); + exit(1); +} + +static void dopkgstanzas(char *pkgsfile, char **pkgs, int pkgc) +{ + char buf[MAX_LINE]; + char *accum; + size_t accum_size = 0, accum_alloc = MAX_LINE * 2; + char cur_pkg[MAX_LINE]; + FILE *f; + + accum = malloc(accum_alloc); + if (!accum) + oom_die(); + + f = fopen(pkgsfile, "r"); + if (f == NULL) { + perror(pkgsfile); + free(accum); + exit(1); + } + while (fgets(buf, sizeof(buf), f)) { + if (*buf) { + size_t len = strlen(buf); + if (accum_size + len + 1 > accum_alloc) { + accum_alloc = (accum_size + len + 1) * 2; + accum = realloc(accum, accum_alloc); + if (!accum) + oom_die(); + } + strcpy(accum + accum_size, buf); + accum_size += len; + } + if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0'; + if (strncasecmp(buf, "Package:", 8) == 0) { + fieldcpy(cur_pkg, buf); + } else if (!*buf) { + int i; + for (i = 0; i < pkgc; i++) { + if (!pkgs[i]) continue; + if (strcmp(cur_pkg, pkgs[i]) == 0) { + fputs(accum, stdout); + if (accum[accum_size - 1] != '\n') + fputs("\n\n", stdout); + else if (accum[accum_size - 2] != '\n') + fputc('\n', stdout); + break; + } + } + *accum = '\0'; + accum_size = 0; + } + } + fclose(f); + + free(accum); +} + +static int dotranslatewgetpercent(int low, int high, int end, char *str) { + int ch; + int val, lastval; + + /* print out anything that looks like a % on its own line, appropriately + * scaled */ + + lastval = val = 0; + while ( (ch = getchar()) != EOF ) { + if (isdigit(ch)) { + val *= 10; val += ch - '0'; + } else if (ch == '%') { + float f = (float) val / 100.0 * (high - low) + low; + if (str) { + printf("P: %d %d %s\n", (int) f, end, str); + } else { + printf("P: %d %d\n", (int) f, end); + } + lastval = val; + } else { + val = 0; + } + } + return lastval == 100; +} + +int main(int argc, char *argv[]) { + checksum_field=getenv("DEBOOTSTRAP_CHECKSUM_FIELD"); + if (checksum_field == NULL) { + checksum_field="MD5sum"; + } + + if ((argc == 6 || argc == 5) && strcmp(argv[1], "WGET%") == 0) { + if (dotranslatewgetpercent(atoi(argv[2]), atoi(argv[3]), + atoi(argv[4]), argc == 6 ? argv[5] : NULL)) + { + exit(0); + } else { + exit(1); + } + } else if (argc >= 4 && strcmp(argv[1], "GETDEPS") == 0) { + int i; + for (i = 3; argc - i > MAX_PKGS; i += MAX_PKGS) { + dogetdeps(argv[2], argv+i, MAX_PKGS); + } + dogetdeps(argv[2], argv+i, argc-i); + exit(0); + } else if (argc >= 5 && strcmp(argv[1], "PKGS") == 0) { + int i; + for (i = 4; argc - i > MAX_PKGS; i += MAX_PKGS) { + dopkgmirrorpkgs(1, argv[2], argv[3], "Package:", argv+i, MAX_PKGS); + } + dopkgmirrorpkgs(1, argv[2], argv[3], "Package:", argv+i, argc-i); + exit(0); + } else if (argc >= 6 && strcmp(argv[1], "FIELD") == 0) { + int i; + for (i = 5; argc - i > MAX_PKGS; i += MAX_PKGS) { + dopkgmirrorpkgs(0, argv[3], argv[4], argv[2], argv+i, MAX_PKGS); + } + dopkgmirrorpkgs(0, argv[3], argv[4], argv[2], argv+i, argc-i); + exit(0); + } else if (argc >= 4 && strcmp(argv[1], "STANZAS") == 0) { + int i; + for (i = 3; argc - i > MAX_PKGS; i += MAX_PKGS) { + dopkgstanzas(argv[2], argv+i, MAX_PKGS); + } + dopkgstanzas(argv[2], argv+i, argc-i); + exit(0); + } else { + fprintf(stderr, "usage: %s PKGS mirror packagesfile pkgs..\n", argv[0]); + fprintf(stderr, " or: %s FIELD field mirror packagesfile pkgs..\n", + argv[0]); + fprintf(stderr, " or: %s GETDEPS packagesfile pkgs..\n", argv[0]); + fprintf(stderr, " or: %s STANZAS packagesfile pkgs..\n", argv[0]); + fprintf(stderr, " or: %s WGET%% low high end reason\n", argv[0]); + exit(1); + } +} diff --git a/admin/debootstrap/patches/100-busybox_fix.patch b/admin/debootstrap/patches/100-busybox_fix.patch new file mode 100644 index 0000000..cf0e9af --- /dev/null +++ b/admin/debootstrap/patches/100-busybox_fix.patch @@ -0,0 +1,13 @@ +Index: debootstrap-1.0.30/usr/share/debootstrap/functions +=================================================================== +--- debootstrap-1.0.30.orig/usr/share/debootstrap/functions 2011-04-28 15:29:13.595340023 +0200 ++++ debootstrap-1.0.30/usr/share/debootstrap/functions 2011-04-28 15:29:23.658843887 +0200 +@@ -800,8 +800,6 @@ + + if [ -n "$EXTRACTOR_OVERRIDE" ]; then + extractor="$EXTRACTOR_OVERRIDE" +- elif type dpkg-deb >/dev/null 2>&1; then +- extractor="dpkg-deb" + else + extractor="ar" + fi diff --git a/admin/gkrellmd/Makefile b/admin/gkrellmd/Makefile new file mode 100644 index 0000000..d60bb1a --- /dev/null +++ b/admin/gkrellmd/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gkrellmd +PKG_VERSION:=2.3.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=gkrellm-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://members.dslextreme.com/users/billw/gkrellm/ +PKG_MD5SUM:=009d8dddd3ce5cc83a4bb4d559ee922d + +PKG_BUILD_DIR:=$(BUILD_DIR)/gkrellm-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/gkrellmd + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+glib1 + TITLE:=The GNU Krell Monitors Server + URL:=http://gkrellm.net/ +endef + +define Package/gkrellmd/description + Gkrellmd Listens for connections from gkrellm clients. When + a gkrellm client connects to a gkrellmd server all builtin + monitors collect their data from the server. +endef + +define Package/gkrellmd/conffiles +/etc/$(PKG_NAME).conf +endef + +define Build/Compile + CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS)" \ + LDFLAGS="$(EXTRA_LDFLAGS) " \ + $(MAKE) -C $(PKG_BUILD_DIR)/server \ + CC="$(TARGET_CC)" \ + glib12="yes" \ + without-libsensors="yes" \ + GLIB12_LIB="$(TARGET_LDFLAGS) -lglib -lgmodule" \ + GLIB12_INCLUDE="-I$(STAGING_DIR)/usr/include/glib-1.2 -I$(STAGING_DIR)/usr/lib/glib/include" +endef + +define Package/gkrellmd/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/$(PKG_NAME) $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/server/$(PKG_NAME).conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,gkrellmd)) diff --git a/admin/gkrellmd/files/gkrellmd.init b/admin/gkrellmd/files/gkrellmd.init new file mode 100644 index 0000000..5bd88a9 --- /dev/null +++ b/admin/gkrellmd/files/gkrellmd.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org + +START=60 +BIN=gkrellmd +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + mkdir -p $RUN_D + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} diff --git a/admin/gkrellmd/patches/100-conf.patch b/admin/gkrellmd/patches/100-conf.patch new file mode 100644 index 0000000..f90ca28 --- /dev/null +++ b/admin/gkrellmd/patches/100-conf.patch @@ -0,0 +1,40 @@ +Index: gkrellm-2.3.1/server/gkrellmd.conf +=================================================================== +--- gkrellm-2.3.1.orig/server/gkrellmd.conf 2008-03-09 10:19:26.000000000 +0100 ++++ gkrellm-2.3.1/server/gkrellmd.conf 2008-03-09 10:19:26.000000000 +0100 +@@ -4,7 +4,7 @@ + # the client update frequency. Values may be from 1 to 10 and should be + # smaller values to reduce network traffic. + # +-update-hz 3 ++update-hz 10 + + # Limit number of simultaneous clients allowed to connect. + # +@@ -13,7 +13,7 @@ + # Specify a specific network interface to listen on for connections. + # By default gkrellmd listens on all available network interfaces. + # +-address 127.0.0.1 ++#address 127.0.0.1 + + # Specify the port to listen on for connections. + # +@@ -29,14 +29,14 @@ + + # Drop privileges after startup (you must start gkrellmd as root to do it). + # +-#user nobody ++user nobody + #group proc + + # Create a PID file for the running gkrellmd. Default is no PID file. +-#pidfile /var/run/gkrellmd.pid ++pidfile /var/run/gkrellmd.pid + + # Run in background and detach from the controlling terminal +-#detach ++detach + + # Time interval between checks for various monitors. If nfs-interval + # is <= 0 then gkrellmd will not read data for nfs file system types. diff --git a/admin/htop/Makefile b/admin/htop/Makefile new file mode 100644 index 0000000..9a33d11 --- /dev/null +++ b/admin/htop/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=htop +PKG_VERSION:=0.9 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=7c5507f35f363f3f40183a2ba3c561f8 + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/htop + SECTION:=admin + CATEGORY:=Administration + TITLE:=Interactive processes viewer + DEPENDS:=+libncurses + URL:=http://htop.sourceforge.net/ +endef + +define Package/htop/description + Htop is an ncursed-based process viewer similar to top, but + it allows to scroll the list vertically and horizontally to + see all processes and their full command lines. +endef + +CONFIGURE_VARS += \ + ac_cv_file__proc_stat=yes \ + ac_cv_file__proc_meminfo=yes \ + ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_realloc_0_nonnull=yes + +define Package/htop/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,htop)) diff --git a/admin/htop/patches/001-uClibc-friendly.patch b/admin/htop/patches/001-uClibc-friendly.patch new file mode 100644 index 0000000..ff9b5b1 --- /dev/null +++ b/admin/htop/patches/001-uClibc-friendly.patch @@ -0,0 +1,52 @@ +--- a/CRT.c ++++ b/CRT.c +@@ -11,7 +11,9 @@ in the source distribution for its full + #include + #include + #include ++#ifdef HAVE_EXECINFO_H + #include ++#endif + + #include "String.h" + +@@ -125,12 +127,14 @@ static void CRT_handleSIGSEGV(int sgn) { + CRT_done(); + #if __linux + fprintf(stderr, "\n\nhtop " VERSION " aborting. Please report bug at http://htop.sf.net\n"); +- #else +- fprintf(stderr, "\n\nhtop " VERSION " aborting. Unsupported platform.\n"); +- #endif ++ #ifdef HAVE_EXECINFO_H + size_t size = backtrace(backtraceArray, sizeof(backtraceArray)); + fprintf(stderr, "Backtrace: \n"); + backtrace_symbols_fd(backtraceArray, size, 2); ++ #endif ++ #else ++ fprintf(stderr, "\n\nhtop " VERSION " aborting. Unsupported platform.\n"); ++ #endif + abort(); + } + +--- a/CRT.h ++++ b/CRT.h +@@ -14,7 +14,9 @@ in the source distribution for its full + #include + #include + #include ++#ifdef HAVE_EXECINFO_H + #include ++#endif + + #include "String.h" + +--- a/configure.ac ++++ b/configure.ac +@@ -25,6 +25,7 @@ AC_HEADER_STDC + AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h curses.h],[:],[ + missing_headers="$missing_headers $ac_header" + ]) ++AC_CHECK_HEADERS([execinfo.h],[:],[:]) + + # Checks for typedefs, structures, and compiler characteristics. + AC_HEADER_STDBOOL diff --git a/admin/monit/Makefile b/admin/monit/Makefile new file mode 100644 index 0000000..57d7ada --- /dev/null +++ b/admin/monit/Makefile @@ -0,0 +1,86 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=monit +PKG_VERSION:=5.2.5 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://mmonit.com/monit/dist +PKG_MD5SUM:=862fb7939ad6f73fc0cc82096c2309c7 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/monit/Default + SECTION:=admin + CATEGORY:=Administration + DEPENDS:= +libpthread + TITLE:=System services monitoring utility + URL:=http://mmonit.com/monit/ +endef + +define Package/monit/Default/description + An utility for monitoring services on a Unix system +endef + +define Package/monit +$(call Package/monit/Default) + DEPENDS+= +libopenssl + TITLE+= (with SSL support) + VARIANT:=ssl +endef + +define Package/monit/description +$(call Package/monit/Default/description) + This package is built with SSL support. +endef + +define Package/monit-nossl +$(call Package/monit/Default) + TITLE+= (without SSL support) + VARIANT:=nossl +endef + +define Package/monit-nossl/description +$(call Package/monit/Default/description) + This package is built without SSL support. +endef + +ifeq ($(BUILD_VARIANT),ssl) + CONFIGURE_ARGS += \ + --with-ssl \ + --with-ssl-dir="$(STAGING_DIR)/usr" +endif + +ifeq ($(BUILD_VARIANT),nossl) + CONFIGURE_ARGS += \ + --without-ssl +endif + +define Package/monit/conffiles +/etc/monitrc +endef + +define Package/monit/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/monit.init $(1)/etc/init.d/monit + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/monit $(1)/usr/bin/ +endef + +Package/monit-nossl/conffiles = $(Package/monit/conffiles) +Package/monit-nossl/install = $(Package/monit/install) + +$(eval $(call BuildPackage,monit)) +$(eval $(call BuildPackage,monit-nossl)) diff --git a/admin/monit/files/monit.init b/admin/monit/files/monit.init new file mode 100644 index 0000000..6a3e5c0 --- /dev/null +++ b/admin/monit/files/monit.init @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=60 +BIN=monit +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $RUN_D + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + diff --git a/admin/monit/patches/001-no_sslv2.patch b/admin/monit/patches/001-no_sslv2.patch new file mode 100644 index 0000000..997e313 --- /dev/null +++ b/admin/monit/patches/001-no_sslv2.patch @@ -0,0 +1,18 @@ +--- a/ssl.c ++++ b/ssl.c +@@ -635,6 +635,7 @@ ssl_connection *new_ssl_connection(char + #endif + break; + ++#ifndef OPENSSL_NO_SSLV2 + case SSL_VERSION_SSLV2: + #ifdef OPENSSL_FIPS + if (FIPS_mode()) { +@@ -647,6 +648,7 @@ ssl_connection *new_ssl_connection(char + } + #endif + break; ++#endif + + case SSL_VERSION_SSLV3: + #ifdef OPENSSL_FIPS diff --git a/admin/monit/patches/002-uclibc_loadavg.patch b/admin/monit/patches/002-uclibc_loadavg.patch new file mode 100644 index 0000000..017cf05 --- /dev/null +++ b/admin/monit/patches/002-uclibc_loadavg.patch @@ -0,0 +1,48 @@ +--- a/process/sysdep_LINUX.c ++++ b/process/sysdep_LINUX.c +@@ -144,6 +144,45 @@ static time_t get_starttime() { + + return time(NULL) - (time_t)up; + } ++ ++ ++/* uclibc and dietlibc do not have this junk -ReneR */ ++#if defined (__UCLIBC__) || defined (__dietlibc__) ++static int getloadavg (double loadavg[], int nelem) ++{ ++ int fd; ++ ++ fd = open ("/proc/loadavg", O_RDONLY); ++ if (fd < 0) ++ return -1; ++ else ++ { ++ char buf[65], *p; ++ ssize_t nread; ++ int i; ++ ++ nread = read (fd, buf, sizeof buf - 1); ++ close (fd); ++ if (nread <= 0) ++ return -1; ++ buf[nread - 1] = '\0'; ++ ++ if (nelem > 3) ++ nelem = 3; ++ p = buf; ++ for (i = 0; i < nelem; ++i) ++ { ++ char *endp; ++ loadavg[i] = strtod (p, &endp); ++ if (endp == p) ++ return -1; ++ p = endp; ++ } ++ ++ return i; ++ } ++} ++#endif + + + /* ------------------------------------------------------------------ Public */ diff --git a/admin/muninlite/Makefile b/admin/muninlite/Makefile new file mode 100644 index 0000000..1a27cd0 --- /dev/null +++ b/admin/muninlite/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=muninlite +PKG_VERSION:=1.0.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=a8cc86f0cc536a6c22dc298f4ed55339 + +include $(INCLUDE_DIR)/package.mk + +define Package/muninlite + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+xinetd + TITLE:=Munin node implemented in shell + URL:=http://sourceforge.net/projects/muninlite/ +endef + +define Package/muninlite/Default/description + Munin node implemented in shell. + Munin is a monitoring system for Unix networks. +endef + +define Package/muninlite/postinst +#!/bin/sh +grep -q '^munin[[:space:]]*4949/tcp' $${IPKG_INSTROOT}/etc/services 2>/dev/null +[ $$? -ne 0 ] && echo "munin 4949/tcp" >> $${IPKG_INSTROOT}/etc/services +exit 0 +endef + +define Package/muninlite/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/munin-node $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/xinetd.d + $(INSTALL_DATA) ./files/etc/xinetd.d/munin $(1)/etc/xinetd.d/ +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) +endef + +$(eval $(call BuildPackage,muninlite)) diff --git a/admin/muninlite/files/etc/xinetd.d/munin b/admin/muninlite/files/etc/xinetd.d/munin new file mode 100644 index 0000000..012d71b --- /dev/null +++ b/admin/muninlite/files/etc/xinetd.d/munin @@ -0,0 +1,10 @@ +service munin +{ + socket_type = stream + protocol = tcp + wait = no + user = root + group = root + server = /usr/sbin/munin-node + disable = no +} diff --git a/admin/muninlite/patches/001-no_disks.patch b/admin/muninlite/patches/001-no_disks.patch new file mode 100644 index 0000000..bf9b2b1 --- /dev/null +++ b/admin/muninlite/patches/001-no_disks.patch @@ -0,0 +1,12 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + + +-PLUGINS=df cpu if_ if_err_ load memory processes swap netstat uptime interrupts irqstats ntpdate plugindir_ +-#PLUGINS=cpu if_ if_err_ load memory processes netstat uptime interrupts irqstats ++#PLUGINS=df cpu if_ if_err_ load memory processes swap netstat uptime interrupts irqstats ntpdate plugindir_ ++PLUGINS=cpu if_ if_err_ load memory processes netstat uptime interrupts irqstats + + munin-node: plugins/* munin-node.conf + @VERSION=$$(cat VERSION); \ diff --git a/admin/muninlite/patches/002-hostname.patch b/admin/muninlite/patches/002-hostname.patch new file mode 100644 index 0000000..5d87168 --- /dev/null +++ b/admin/muninlite/patches/002-hostname.patch @@ -0,0 +1,11 @@ +--- a/munin-node.in ++++ b/munin-node.in +@@ -113,7 +113,7 @@ PLUGINS=$RES + + # ===== MAIN LOOP ===== + FUNCTIONS="list nodes config fetch version quit" +-HOSTNAME=$(hostname -f 2>/dev/null || hostname) ++HOSTNAME=$(/sbin/uci get "system.@system[0].hostname" 2>/dev/null || cat /proc/sys/kernel/hostname) + echo "# munin node at $HOSTNAME" + while read arg0 arg1 + do diff --git a/admin/muninlite/patches/100-fix-no-ethtool.patch b/admin/muninlite/patches/100-fix-no-ethtool.patch new file mode 100644 index 0000000..88f7e30 --- /dev/null +++ b/admin/muninlite/patches/100-fix-no-ethtool.patch @@ -0,0 +1,21 @@ +--- a/plugins/if_ ++++ b/plugins/if_ +@@ -15,10 +15,14 @@ config_if() { + echo "up.min 0" + echo "up.negative down" + echo "up.cdef up,8,*" +- if ethtool $1 | grep -q Speed; then +- MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000)) +- echo "up.max $MAX" +- echo "down.max $MAX" ++ if [ -n "$(which ethtool)" ]; then ++ if [ -x "$(which ethtool)" ]; then ++ if ethtool $1 | grep -q Speed; then ++ MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000)) ++ echo "up.max $MAX" ++ echo "down.max $MAX" ++ fi ++ fi + fi + } + fetch_if() { diff --git a/admin/muninlite/patches/200-add-tap-dev.patch b/admin/muninlite/patches/200-add-tap-dev.patch new file mode 100644 index 0000000..fa46ce6 --- /dev/null +++ b/admin/muninlite/patches/200-add-tap-dev.patch @@ -0,0 +1,20 @@ +--- a/munin-node.in ++++ b/munin-node.in +@@ -72,7 +72,7 @@ RES="" + for PLUG in $PLUGINS + do + if [ "$PLUG" = "if_" ]; then +- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); ++ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); + do + INTERRES=$(echo $INTER | sed 's/\./VLAN/') + RES="$RES if_$INTERRES" +@@ -80,7 +80,7 @@ do + eval "config_if_${INTERRES}() { config_if $INTER $@; };" + done + elif [ "$PLUG" = "if_err_" ]; then +- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); ++ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); + do + INTERRES=$(echo $INTER | sed 's/\./VLAN/') + RES="$RES if_err_$INTERRES" diff --git a/admin/muninlite/patches/210-add-bridge-devs.patch b/admin/muninlite/patches/210-add-bridge-devs.patch new file mode 100644 index 0000000..c5453d8 --- /dev/null +++ b/admin/muninlite/patches/210-add-bridge-devs.patch @@ -0,0 +1,22 @@ +--- a/munin-node.in ++++ b/munin-node.in +@@ -72,7 +72,8 @@ RES="" + for PLUG in $PLUGINS + do + if [ "$PLUG" = "if_" ]; then +- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); ++ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g ++s/\-/_/g'); + do + INTERRES=$(echo $INTER | sed 's/\./VLAN/') + RES="$RES if_$INTERRES" +@@ -80,7 +81,8 @@ do + eval "config_if_${INTERRES}() { config_if $INTER $@; };" + done + elif [ "$PLUG" = "if_err_" ]; then +- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); ++ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g ++s/\-/_/g'); + do + INTERRES=$(echo $INTER | sed 's/\./VLAN/') + RES="$RES if_err_$INTERRES" diff --git a/admin/nagios-plugins/Makefile b/admin/nagios-plugins/Makefile new file mode 100644 index 0000000..197624f --- /dev/null +++ b/admin/nagios-plugins/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nagios-plugins +PKG_VERSION:=1.4.14 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/nagiosplug +PKG_MD5SUM:=a1835a48a777863ed2583de3c82446a9 + +PKG_FIXUP:=libtool no-autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +comma:= , + +define Package/nagios-plugins + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+uclibcxx +libpq + TITLE:=plugins for Nagios checks + URL:=http://nagiosplug.sourceforge.net/ +endef + +CONFIGURE_ARGS += \ + --without-mysql \ + --with-openssl="$(STAGING_DIR)/usr" \ + --with-ping-command="/bin/ping -w %d -c %d %s" \ + --with-ping6-command="/bin/ping6 -w %d -c %d %s" \ + --with-ps-command="/bin/ps -Aopid" \ + --with-ps-cols="6" \ + --with-ps-format="%d %s %d %s %s %n" \ + --with-ps-varlist="&procuid$(comma)&procpid$(comma)&procvsz$(comma)procstat$(comma)procprog$(comma)&pos" \ + --with-uptime-command="/usr/bin/uptime" \ + --with-ssh-command="/usr/bin/ssh" \ + --with-nslookup-command="/usr/bin/nslookup" + +define Package/nagios-plugins/install + $(INSTALL_DIR) $(1)/usr/libexec/nagios + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/libexec/nagios/ +endef + +$(eval $(call BuildPackage,nagios-plugins)) diff --git a/admin/nagios-plugins/patches/002-plugins.patch b/admin/nagios-plugins/patches/002-plugins.patch new file mode 100644 index 0000000..402aaba --- /dev/null +++ b/admin/nagios-plugins/patches/002-plugins.patch @@ -0,0 +1,74 @@ +--- a/configure ++++ b/configure +@@ -28209,7 +28209,7 @@ fi + + if test "$ac_cv_have_decl_swapctl" = "yes"; + then +- EXTRAS="$EXTRAS check_swap" ++ EXTRAS="$EXTRAS" + { echo "$as_me:$LINENO: checking for 2-arg (SVR4) swapctl" >&5 + echo $ECHO_N "checking for 2-arg (SVR4) swapctl... $ECHO_C" >&6; } + if test "$ac_cv_type_swaptbl_t" = "yes" -a \ +@@ -28348,7 +28348,7 @@ cat >>confdefs.h <<\_ACEOF + #define HAVE_SWAP 1 + _ACEOF + +- EXTRAS="$EXTRAS check_swap" ++ EXTRAS="$EXTRAS" + fi + if test "x$ac_cv_swap_command" != "x" + then +@@ -28400,7 +28400,7 @@ cat >>confdefs.h <<_ACEOF + #define PROC_MEMINFO "$ac_cv_proc_meminfo" + _ACEOF + +- EXTRAS="$EXTRAS check_swap" ++ EXTRAS="$EXTRAS" + fi + + # Extract the first word of "dig", so it can be a program name with args. +--- a/plugins/Makefile.am ++++ b/plugins/Makefile.am +@@ -34,8 +34,8 @@ libexec_PROGRAMS = check_apt check_clust + check_tcp_programs = check_ftp check_imap check_nntp check_pop \ + check_udp check_clamd @check_tcp_ssl@ + +-EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \ +- check_swap check_fping check_ldap check_game check_dig \ ++EXTRA_PROGRAMS = check_mysql check_radius check_snmp check_hpjd \ ++ check_fping check_ldap check_game check_dig \ + check_nagios check_by_ssh check_dns check_nt check_ide_smart \ + check_procs check_mysql_query check_apt + +--- a/plugins/Makefile.in ++++ b/plugins/Makefile.in +@@ -32,7 +32,7 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + libexec_PROGRAMS = check_apt$(EXEEXT) check_cluster$(EXEEXT) \ +- check_disk$(EXEEXT) check_dummy$(EXEEXT) check_http$(EXEEXT) \ ++ check_dummy$(EXEEXT) check_http$(EXEEXT) \ + check_load$(EXEEXT) check_mrtg$(EXEEXT) \ + check_mrtgtraf$(EXEEXT) check_ntp$(EXEEXT) \ + check_ntp_peer$(EXEEXT) check_nwstat$(EXEEXT) \ +@@ -41,8 +41,8 @@ libexec_PROGRAMS = check_apt$(EXEEXT) ch + check_time$(EXEEXT) check_ntp_time$(EXEEXT) check_ups$(EXEEXT) \ + check_users$(EXEEXT) negate$(EXEEXT) urlize$(EXEEXT) @EXTRAS@ + EXTRA_PROGRAMS = check_mysql$(EXEEXT) check_radius$(EXEEXT) \ +- check_pgsql$(EXEEXT) check_snmp$(EXEEXT) check_hpjd$(EXEEXT) \ +- check_swap$(EXEEXT) check_fping$(EXEEXT) check_ldap$(EXEEXT) \ ++ check_snmp$(EXEEXT) check_hpjd$(EXEEXT) \ ++ check_fping$(EXEEXT) check_ldap$(EXEEXT) \ + check_game$(EXEEXT) check_dig$(EXEEXT) check_nagios$(EXEEXT) \ + check_by_ssh$(EXEEXT) check_dns$(EXEEXT) check_nt$(EXEEXT) \ + check_ide_smart$(EXEEXT) check_procs$(EXEEXT) \ +--- a/plugins/check_pgsql.c ++++ b/plugins/check_pgsql.c +@@ -39,6 +39,7 @@ const char *email = "nagiosplug-devel@li + #include + #include + ++#define NAMEDATALEN 64 + #define DEFAULT_DB "template1" + #define DEFAULT_HOST "127.0.0.1" + diff --git a/admin/nagios-plugins/patches/003-pgsl-header-fix.patch b/admin/nagios-plugins/patches/003-pgsl-header-fix.patch new file mode 100644 index 0000000..8496e80 --- /dev/null +++ b/admin/nagios-plugins/patches/003-pgsl-header-fix.patch @@ -0,0 +1,11 @@ +--- a/plugins/check_pgsql.c ++++ b/plugins/check_pgsql.c +@@ -37,7 +37,7 @@ const char *email = "nagiosplug-devel@li + + #include "netutils.h" + #include +-#include ++#include + + #define NAMEDATALEN 64 + #define DEFAULT_DB "template1" diff --git a/admin/nagios/Makefile b/admin/nagios/Makefile new file mode 100644 index 0000000..fc9cb87 --- /dev/null +++ b/admin/nagios/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2008-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nagios +PKG_VERSION:=2.10 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/nagios +PKG_MD5SUM:=8c3a29e138f2ff8c8abbd3dd8a40c4b6 + +include $(INCLUDE_DIR)/package.mk + +define Package/nagios + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+libpthread +microperl +libltdl + TITLE:=service and network monitoring program + URL:=http://www.nagios.org/ +endef + +define Package/nagios/description + service and network monitoring program +endef + +EXTRA_CFLAGS += $(TARGET_CPPFLAGS) + +CONFIGURE_ARGS += \ + --with-nagios-user="root" \ + --with-nagios-group="root" \ + --sysconfdir="/etc/nagios" \ + --without-gd-lib \ + --without-gd-inc \ + CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + INSTALL_OPTS="" \ + STRIP=: \ + all install install-config +endef + +define Package/nagios/install + $(INSTALL_DIR) $(1)/etc/nagios + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/nagios/* $(1)/etc/nagios/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{nagios,nagiostats} $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/share + $(CP) $(PKG_INSTALL_DIR)/usr/share/* $(1)/usr/share/ +endef + +$(eval $(call BuildPackage,nagios)) diff --git a/admin/nrpe/Makefile b/admin/nrpe/Makefile new file mode 100644 index 0000000..3835b14 --- /dev/null +++ b/admin/nrpe/Makefile @@ -0,0 +1,91 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nrpe +PKG_VERSION:=2.12 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/nagios +PKG_MD5SUM:=b2d75e2962f1e3151ef58794d60c9e97 + +include $(INCLUDE_DIR)/package.mk + +define Package/nrpe + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+libopenssl +libwrap + TITLE:=Daemon to execute Nagios check commands on remote hosts + URL:=http://www.nagios.org/download +endef + +define Package/nrpe/description + The NRPE addon is designed to allow you to execute Nagios plugins on + remote Linux/Unix machines. The main reason for doing this is to allow + Nagios to monitor "local" resources (like CPU load, memory usage, etc.) + on remote machines. Since these public resources are not usually + exposed to external machines, an agent like NRPE must be installed on + the remote Linux/Unix machines. +endef + +define Package/nrpe/postinst +#!/bin/sh + +id=50 +name=nagios +home=/var/run/nagios +shell=/bin/false + +# do not change below +# check if we are on real system +if [ -z "$${IPKG_INSTROOT}" ]; then + # create copies of passwd and group, if we use squashfs + rootfs=`mount |awk '/root/ { print $$5 }'` + if [ "$$rootfs" = "squashfs" ]; then + if [ -h /etc/group ]; then + rm /etc/group + cp -p /rom/etc/group /etc/group + fi + if [ -h /etc/passwd ]; then + rm /etc/passwd + cp -p /rom/etc/passwd /etc/passwd + fi + fi +fi + +echo "" +if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then + echo "adding group $$name to /etc/group" + echo "$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc/group +fi +if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then + echo "adding user $$name to /etc/passwd" + echo "$${name}:x:$${id}:$${id}:$${name}:$${home}:$${shell}" >> $${IPKG_INSTROOT}/etc/passwd +fi +endef + +CONFIGURE_ARGS += \ + --with-ssl="$(STAGING_DIR)/usr" \ + --with-ssl-lib="$(STAGING_DIR)/usr/lib" + +define Package/nrpe/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_DATA) ./files/nrpe.cfg $(1)/etc/nrpe.cfg + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/nrpe $(1)/usr/sbin + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) +endef + +$(eval $(call RequireCommand,openssl, \ + $(PKG_NAME) requires openssl installed on the host-system. \ +)) + +$(eval $(call BuildPackage,nrpe)) + diff --git a/admin/nrpe/files/nrpe.cfg b/admin/nrpe/files/nrpe.cfg new file mode 100644 index 0000000..e84bed7 --- /dev/null +++ b/admin/nrpe/files/nrpe.cfg @@ -0,0 +1,208 @@ +############################################################################# +# Sample NRPE Config File +# Written by: Ethan Galstad (nagios@nagios.org) +# +# Last Modified: 03-09-2007 +# +# NOTES: +# This is a sample configuration file for the NRPE daemon. It needs to be +# located on the remote host that is running the NRPE daemon, not the host +# from which the check_nrpe client is being executed. +############################################################################# + + +# PID FILE +# The name of the file in which the NRPE daemon should write it's process ID +# number. The file is only written if the NRPE daemon is started by the root +# user and is running in standalone mode. + +pid_file=/var/run/nrpe.pid + + + +# PORT NUMBER +# Port number we should wait for connections on. +# NOTE: This must be a non-priviledged port (i.e. > 1024). +# NOTE: This option is ignored if NRPE is running under either inetd or xinetd + +server_port=5666 + + + +# SERVER ADDRESS +# Address that nrpe should bind to in case there are more than one interface +# and you do not want nrpe to bind on all interfaces. +# NOTE: This option is ignored if NRPE is running under either inetd or xinetd + +server_address=192.168.1.1 + + +# NRPE USER +# This determines the effective user that the NRPE daemon should run as. +# You can either supply a username or a UID. +# +# NOTE: This option is ignored if NRPE is running under either inetd or xinetd + +nrpe_user=nagios + + + +# NRPE GROUP +# This determines the effective group that the NRPE daemon should run as. +# You can either supply a group name or a GID. +# +# NOTE: This option is ignored if NRPE is running under either inetd or xinetd + +nrpe_group=nagios + + + +# ALLOWED HOST ADDRESSES +# This is an optional comma-delimited list of IP address or hostnames +# that are allowed to talk to the NRPE daemon. +# +# Note: The daemon only does rudimentary checking of the client's IP +# address. I would highly recommend adding entries in your /etc/hosts.allow +# file to allow only the specified host to connect to the port +# you are running this daemon on. +# +# NOTE: This option is ignored if NRPE is running under either inetd or xinetd + +allowed_hosts=192.168.1.2 + + + +# COMMAND ARGUMENT PROCESSING +# This option determines whether or not the NRPE daemon will allow clients +# to specify arguments to commands that are executed. This option only works +# if the daemon was configured with the --enable-command-args configure script +# option. +# +# *** ENABLING THIS OPTION IS A SECURITY RISK! *** +# Read the SECURITY file for information on some of the security implications +# of enabling this variable. +# +# Values: 0=do not allow arguments, 1=allow command arguments + +dont_blame_nrpe=0 + + + +# COMMAND PREFIX +# This option allows you to prefix all commands with a user-defined string. +# A space is automatically added between the specified prefix string and the +# command line from the command definition. +# +# *** THIS EXAMPLE MAY POSE A POTENTIAL SECURITY RISK, SO USE WITH CAUTION! *** +# Usage scenario: +# Execute restricted commmands using sudo. For this to work, you need to add +# the nagios user to your /etc/sudoers. An example entry for alllowing +# execution of the plugins from might be: +# +# nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/ +# +# This lets the nagios user run all commands in that directory (and only them) +# without asking for a password. If you do this, make sure you don't give +# random users write access to that directory or its contents! + +# command_prefix=/usr/bin/sudo + + + +# DEBUGGING OPTION +# This option determines whether or not debugging messages are logged to the +# syslog facility. +# Values: 0=debugging off, 1=debugging on + +debug=0 + + + +# COMMAND TIMEOUT +# This specifies the maximum number of seconds that the NRPE daemon will +# allow plugins to finish executing before killing them off. + +command_timeout=60 + + + +# CONNECTION TIMEOUT +# This specifies the maximum number of seconds that the NRPE daemon will +# wait for a connection to be established before exiting. This is sometimes +# seen where a network problem stops the SSL being established even though +# all network sessions are connected. This causes the nrpe daemons to +# accumulate, eating system resources. Do not set this too low. + +connection_timeout=300 + + + +# WEEK RANDOM SEED OPTION +# This directive allows you to use SSL even if your system does not have +# a /dev/random or /dev/urandom (on purpose or because the necessary patches +# were not applied). The random number generator will be seeded from a file +# which is either a file pointed to by the environment valiable $RANDFILE +# or $HOME/.rnd. If neither exists, the pseudo random number generator will +# be initialized and a warning will be issued. +# Values: 0=only seed from /dev/[u]random, 1=also seed from weak randomness + +#allow_weak_random_seed=1 + + + +# INCLUDE CONFIG FILE +# This directive allows you to include definitions from an external config file. + +#include= + + + +# INCLUDE CONFIG DIRECTORY +# This directive allows you to include definitions from config files (with a +# .cfg extension) in one or more directories (with recursion). + +#include_dir= +#include_dir= + + + +# COMMAND DEFINITIONS +# Command definitions that this daemon will run. Definitions +# are in the following format: +# +# command[]= +# +# When the daemon receives a request to return the results of +# it will execute the command specified by the argument. +# +# Unlike Nagios, the command line cannot contain macros - it must be +# typed exactly as it should be executed. +# +# Note: Any plugins that are used in the command lines must reside +# on the machine that this daemon is running on! The examples below +# assume that you have plugins installed in a /usr/local/nagios/libexec +# directory. Also note that you will have to modify the definitions below +# to match the argument format the plugins expect. Remember, these are +# examples only! + + +# The following examples use hardcoded command arguments... + +command[check_users]=/usr/libexec/nagios/check_users -w 3 -c 5 +command[check_load]=/usr/libexec/nagios/check_load -w 7,4,2 -c 10,5,3 +command[check_tmp]=/usr/libexec/nagios/check_disk -w 50% -c 25% -p /tmp +command[check_zombie_procs]=/usr/libexec/nagios/check_procs -w 1 -c 3 -s Z +command[check_total_procs]=/usr/libexec/nagios/check_procs -w 25 -c 30 + + + +# The following examples allow user-supplied arguments and can +# only be used if the NRPE daemon was compiled with support for +# command arguments *AND* the dont_blame_nrpe directive in this +# config file is set to '1'. This poses a potential security risk, so +# make sure you read the SECURITY file before doing this. + +#command[check_users]=/usr/lib/check_users -w $ARG1$ -c $ARG2$ +#command[check_load]=/usr/lib/check_load -w $ARG1$ -c $ARG2$ +#command[check_disk]=/usr/lib/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ +#command[check_procs]=/usr/lib/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$ diff --git a/admin/nrpe/files/nrpe.init b/admin/nrpe/files/nrpe.init new file mode 100644 index 0000000..e1ccf8a --- /dev/null +++ b/admin/nrpe/files/nrpe.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org + +START=70 + +start() { + /usr/sbin/nrpe -c /etc/nrpe.cfg -d +} + +stop() { + killall nrpe +} diff --git a/admin/nrpe/patches/100-openssl-dh.patch b/admin/nrpe/patches/100-openssl-dh.patch new file mode 100644 index 0000000..0b7f8c9 --- /dev/null +++ b/admin/nrpe/patches/100-openssl-dh.patch @@ -0,0 +1,17 @@ +--- a/configure ++++ b/configure +@@ -6694,11 +6694,9 @@ + + echo "" + echo "*** Generating DH Parameters for SSL/TLS ***" +- if test -f "$ssldir/sbin/openssl"; then +- sslbin=$ssldir/sbin/openssl +- else +- sslbin=$ssldir/bin/openssl +- fi ++ # Use host openssl as it just generates some random stuff, ++ # nothing machine-specific ++ sslbin=/usr/bin/openssl + # awk to strip off meta data at bottom of dhparam output + $sslbin dhparam -C 512 | awk '/^-----/ {exit} {print}' > include/dh.h + fi diff --git a/admin/nsca/Makefile b/admin/nsca/Makefile new file mode 100644 index 0000000..56789c7 --- /dev/null +++ b/admin/nsca/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nsca +PKG_VERSION:=2.7.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/nagios +PKG_MD5SUM:=33a98e7975f633a9489d7a8938ed6131 + +include $(INCLUDE_DIR)/package.mk + +define Package/send-nsca + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+libmcrypt + TITLE:=Nagios Service Check Acceptor (NSCA) client + URL:=http://www.nagios.org/ +endef + +define Package/send-nsca/description + This is the client program that is used to send service check + information from a remote machine to the nsca daemon on the central + machine that runs Nagios. +endef + +define Package/send-nsca/conffiles +/etc/send_nsca.cfg +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --with-nsca-user="root" \ + --with-nsca-grp="root" \ + --with-libmcrypt-prefix="$(STAGING_DIR)/usr" \ + , \ + CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + send_nsca +endef + +define Package/send-nsca/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/sample-config/send_nsca.cfg $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/send_nsca $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,send-nsca)) diff --git a/admin/osiris/Makefile b/admin/osiris/Makefile new file mode 100644 index 0000000..e2c6165 --- /dev/null +++ b/admin/osiris/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=osiris +PKG_VERSION:=4.2.3 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://osiris.shmoo.com/data/ +PKG_MD5SUM:=1951c7dc0fe729af9ffaf58910340d12 + +PKG_FIXUP:=libtool +PKG_LIBTOOL_PATHS:=src/db-4.2.52/build_unix +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/osirisd + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+libopenssl +libpthread + TITLE:=Host integrity monitoring system (scanning agent) + URL:=http://osiris.shmoo.com/ +endef + +CONFIGURE_ARGS += \ + --with-osiris-user=root \ + --with-root-dir=/var/lib/osiris \ + --with-readline=no, \ + ac_cv_openssldir="$(STAGING_DIR)/usr" + +MAKE_FLAGS += \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + INTERACTIVE=0 + +define Package/osirisd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/osirisd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/osirisd.init $(1)/etc/init.d/osirisd +endef + +$(eval $(call BuildPackage,osirisd)) diff --git a/admin/osiris/files/osirisd.init b/admin/osiris/files/osirisd.init new file mode 100644 index 0000000..9916567 --- /dev/null +++ b/admin/osiris/files/osirisd.init @@ -0,0 +1,20 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=osirisd +DEFAULT=/etc/default/$BIN +LIB_D=/var/lib/osiris +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $LIB_D + mkdir -p $RUN_D + $BIN $OPTIONS +} +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + diff --git a/admin/osiris/patches/001-configure-cross.patch b/admin/osiris/patches/001-configure-cross.patch new file mode 100644 index 0000000..025a3f8 --- /dev/null +++ b/admin/osiris/patches/001-configure-cross.patch @@ -0,0 +1,22 @@ +--- osiris-4.1.8-orig/configure 2005-04-13 15:22:13.000000000 +0200 ++++ osiris-4.1.8-1/configure 2005-04-22 23:11:32.000000000 +0200 +@@ -3606,7 +3606,7 @@ + esac + + +-DB_CONFIG_ARGS="--enable-shared=no --enable-static=yes" ++DB_CONFIG_ARGS="--target=${target_alias} --host=${host_alias} --build=${build_alias} --enable-shared=no --enable-static=yes" + + case "${OS_NAME}" in + MINGW32*) +--- osiris-4.1.8-orig/configure.ac 2005-04-13 15:22:13.000000000 +0200 ++++ osiris-4.1.8-1/configure.ac 2005-04-22 23:11:32.000000000 +0200 +@@ -270,7 +270,7 @@ + + dnl configure local copy of Berkely DB: + +-DB_CONFIG_ARGS="--enable-shared=no --enable-static=yes" ++DB_CONFIG_ARGS="--target=${target_alias} --host=${host_alias} --build=${build_alias} --enable-shared=no --enable-static=yes" + + case "${OS_NAME}" in + MINGW32*) diff --git a/admin/osiris/patches/002-osirisd-pidfile.patch b/admin/osiris/patches/002-osirisd-pidfile.patch new file mode 100644 index 0000000..80c52db --- /dev/null +++ b/admin/osiris/patches/002-osirisd-pidfile.patch @@ -0,0 +1,68 @@ +--- osiris-4.1.8-orig/src/osirisd/osirisd.c 2005-04-14 01:00:55.000000000 +0200 ++++ osiris-4.1.8-1/src/osirisd/osirisd.c 2005-04-22 23:11:32.000000000 +0200 +@@ -218,6 +218,8 @@ + + #ifdef USE_PRIVSEP + rootpriv_setup_pidfile(); ++#else ++ setup_pidfile(); + #endif + + process(); +--- osiris-4.1.8-orig/src/osirisd/rootpriv.c 2005-04-14 00:55:59.000000000 +0200 ++++ osiris-4.1.8-1/src/osirisd/rootpriv.c 2005-04-22 23:25:10.000000000 +0200 +@@ -35,6 +35,10 @@ + #include "logging.h" + #include "rootpriv.h" + ++#ifndef WIN32 ++extern char pid_file[MAX_PATH_LENGTH]; ++#endif ++ + #ifdef USE_PRIVSEP + + /* this is defined in regex, and sometimes conflicts with stuff */ +@@ -80,10 +84,6 @@ + extern pid_t child_pid; + extern int rootpriv_pipe[2]; /* socketpair used for rootpriv comm. */ + +-#ifndef WIN32 +-extern char pid_file[MAX_PATH_LENGTH]; +-#endif +- + #define INCOMING_ROOT_REQUEST() ( FD_ISSET( rootpriv_pipe[1], &root_read_set ) ) + + +@@ -292,17 +292,6 @@ + #endif + } + +-void setup_pidfile() +-{ +- FILE *pidfile = fopen( pid_file, "wb" ); +- +- if( pidfile != NULL ) +- { +- fprintf( pidfile, "%ld\n", (long)getpid() ); +- fclose( pidfile ); +- } +-} +- + void handle_signals() + { + pid_t pid; +@@ -789,3 +778,14 @@ + + #endif /* USE_PRIVSEP */ + ++void setup_pidfile() ++{ ++ FILE *pidfile = fopen( pid_file, "wb" ); ++ ++ if( pidfile != NULL ) ++ { ++ fprintf( pidfile, "%ld\n", (long)getpid() ); ++ fclose( pidfile ); ++ } ++} ++ diff --git a/admin/osiris/patches/003-openssl-0.9.8+.patch b/admin/osiris/patches/003-openssl-0.9.8+.patch new file mode 100644 index 0000000..806cf3a --- /dev/null +++ b/admin/osiris/patches/003-openssl-0.9.8+.patch @@ -0,0 +1,16 @@ +diff -ruN osiris-4.1.9-old/src/osirismd/md_control.c osiris-4.1.9-new/src/osirismd/md_control.c +--- osiris-4.1.9-old/src/osirismd/md_control.c 2005-03-24 16:36:07.000000000 +0100 ++++ osiris-4.1.9-new/src/osirismd/md_control.c 2006-03-28 01:32:32.000000000 +0200 +@@ -3262,9 +3262,9 @@ + int index; + char checksum[41]; + +- SHA_Init( &context ); +- SHA_Update( &context, key, (unsigned long)keysize ); +- SHA_Final( &( digest[0] ), &context ); ++ SHA1_Init( &context ); ++ SHA1_Update( &context, key, (unsigned long)keysize ); ++ SHA1_Final( &( digest[0] ), &context ); + + for ( index = 0; index < SHA_DIGEST_LENGTH; index++ ) + { diff --git a/admin/osiris/patches/004-no_openssl_ripe.patch b/admin/osiris/patches/004-no_openssl_ripe.patch new file mode 100644 index 0000000..75a9e9d --- /dev/null +++ b/admin/osiris/patches/004-no_openssl_ripe.patch @@ -0,0 +1,59 @@ +diff -urN osiris-4.2.1/src/libosiris/filter_ripemd.c osiris-4.2.1.new/src/libosiris/filter_ripemd.c +--- osiris-4.2.1/src/libosiris/filter_ripemd.c 2006-07-28 03:22:37.000000000 +0200 ++++ osiris-4.2.1.new/src/libosiris/filter_ripemd.c 2006-11-29 12:16:00.000000000 +0100 +@@ -55,9 +55,9 @@ + { + context->filter_argument += 2; + } +- ++#ifndef OPENSSL_NO_RIPEMD + hash_file_ripemd( file_path, context->file_handle, hash, sizeof(hash) ); +- ++#endif + if( strcmp( hash, context->filter_argument ) == 0 ) + { + return TRUE; +diff -urN osiris-4.2.1/src/libosiris/ssl_utilities.c osiris-4.2.1.new/src/libosiris/ssl_utilities.c +--- osiris-4.2.1/src/libosiris/ssl_utilities.c 2006-07-28 03:22:37.000000000 +0200 ++++ osiris-4.2.1.new/src/libosiris/ssl_utilities.c 2006-11-29 12:17:33.000000000 +0100 +@@ -51,7 +51,9 @@ + #include + #include + #include ++#ifndef OPENSSL_NO_RIPEMD + #include ++#endif + + #ifdef WIN32 + #include +@@ -348,6 +350,7 @@ + int hash_file_ripemd( const char *file_path, FILE *file, + char *buffer, int buffer_size ) + { ++#ifndef OPENSSL_NO_RIPEMD + int fno; + FILE *file_to_hash = file; + RIPEMD160_CTX context; +@@ -430,7 +433,7 @@ + osi_strlcpy( buffer, file_hash, buffer_size ); + return 0; + } +- ++#endif + return -1; + } + +diff -urN osiris-4.2.1/src/libosiris/utilities.c osiris-4.2.1.new/src/libosiris/utilities.c +--- osiris-4.2.1/src/libosiris/utilities.c 2006-07-28 03:22:37.000000000 +0200 ++++ osiris-4.2.1.new/src/libosiris/utilities.c 2006-11-29 12:16:38.000000000 +0100 +@@ -60,8 +60,9 @@ + + #include + #include ++#ifndef OPENSSL_NO_RIPEMD + #include +- ++#endif + #include "utilities.h" + #include "error.h" + diff --git a/admin/osiris/patches/006-mod_nvram.patch b/admin/osiris/patches/006-mod_nvram.patch new file mode 100644 index 0000000..69b6cd6 --- /dev/null +++ b/admin/osiris/patches/006-mod_nvram.patch @@ -0,0 +1,213 @@ +Description: The mod_nvram module was developed specifically to monitor + configuration settings stored in nvram on Linksys devices. + In the future, this module could be used to monitor other + attributes of similar devices. +Version: 0.1 + +--- osiris-4.1.8-orig/src/osirisd/modules/mod_nvram/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ osiris-4.1.8-1/src/osirisd/modules/mod_nvram/Makefile 2005-04-22 23:11:32.000000000 +0200 +@@ -0,0 +1,16 @@ ++ ++include ../Makefile ++ ++SRCS=mod_nvram.c ++OBJS=$(SRCS:.c=.o) ++ ++module: ${SRCS} ${OBJS} ++ ++INCS=-I../.. -I../../../libosiris -I../../../libfileapi -I../../../.. ++ ++# meta-rule for compiling any "C" source file. ++$(OBJS): $(SRCS) ++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) ${INCLUDES} ${INCS} $(AM_CPPFLAGS) \ ++ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $(SRCS) ++ cp $@ .. ++ +--- osiris-4.1.8-orig/src/osirisd/modules/mod_nvram/README 1970-01-01 01:00:00.000000000 +0100 ++++ osiris-4.1.8-1/src/osirisd/modules/mod_nvram/README 2005-04-22 23:11:32.000000000 +0200 +@@ -0,0 +1,40 @@ ++ ++Module: mod_nvram ++Author: Brian Wotring (brian@shmoo.com) ++ ++ ++ ++DESCRIPTION: ++ ++The mod_nvram module reads the key=value pairs stored in nvram. This ++is primarily for Linksys routers, but could be modified to run on ++other systems if necessary. On the routers like the WRT54G, the ++nvram settings hold sensitive information that needs to be monitored. ++The format for the record structure is as follows: ++ ++ name:value ++ ++USE: ++ ++To use this module, all that is needed is to include it in the System ++block of a scan configuration, e.g.: ++ ++ ++ ... ++ Include mod_nvram ++ ... ++ ++ ++ ++PARAMETERS: ++ ++There are no parameters for this module. ++ ++PLATFORMS: ++ ++Currently, only for the Linksys WRT54G and WRT54GS devices. ++ ++NOTES: ++ ++ ++ +--- osiris-4.1.8-orig/src/osirisd/modules/mod_nvram/mod_nvram.c 1970-01-01 01:00:00.000000000 +0100 ++++ osiris-4.1.8-1/src/osirisd/modules/mod_nvram/mod_nvram.c 2005-04-22 23:11:32.000000000 +0200 +@@ -0,0 +1,142 @@ ++ ++/****************************************************************************** ++** ++** This program is free software; you can redistribute it and/or ++** modify it, however, you cannot sell it. ++** ++** 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. ++** ++** You should have received a copy of the license attached to the ++** use of this software. If not, visit www.shmoo.com/osiris for ++** details. ++** ++******************************************************************************/ ++ ++/***************************************************************************** ++** ++** File: mod_users.c ++** Date: January 1, 2004 ++** ++** Author: Brian Wotring ++** Purpose: platform specific methods for reading user file information. ++** ++******************************************************************************/ ++ ++#include "libosiris.h" ++#include "libfileapi.h" ++#include "rootpriv.h" ++#include "common.h" ++#include "version.h" ++ ++#include "scanner.h" ++#include "logging.h" ++ ++ ++#define NVRAM_PATH "/usr/sbin/nvram" ++#define NVRAM_ARG "show" ++ ++static const char *MODULE_NAME = "mod_nvram"; ++ ++ ++void mod_nvram( SCANNER *scanner ) ++{ ++ int pid; ++ int pc[2]; ++ int cp[2]; ++ char temp_line[4096]; ++ FILE *file; ++ SCAN_RECORD_TEXT_1 record; ++ ++ if( pipe(pc) < 0) ++ { ++ log_error( "mod_nvram: error creating pipe!" ); ++ return; ++ } ++ ++ if( pipe(cp) < 0) ++ { ++ log_error( "mod_nvram: error creating pipe!" ); ++ return; ++ } ++ ++ /* Create a child to run nvram command. */ ++ ++ switch( pid = fork() ) ++ { ++ case -1: ++ log_error( "nvram: fork error!" ); ++ return; ++ ++ case 0: ++ ++ /* child */ ++ ++ close(1); ++ dup( cp[1]); ++ close(0); ++ close( pc[1]); ++ close( cp[0]); ++ execl( NVRAM_PATH, NVRAM_PATH, NVRAM_ARG, NULL ); ++ exit(0); ++ ++ default: ++ ++ /* parent */ ++ ++ close(pc[1]); ++ close(cp[1]); ++ ++ file = fdopen( cp[0], "r" ); ++ ++ for(;;) ++ { ++ char *line; ++ char *key_end; ++ ++ line = fgets( temp_line, sizeof( temp_line ), file ); ++ ++ if( line == NULL) ++ { ++ break; ++ } ++ ++ line = trim_white_space( line ); ++ ++ /* skip commented and empty lines. */ ++ ++ if( ( line == NULL ) || ( line[0] == '#' ) ) ++ { ++ continue; ++ } ++ ++ /* locate the username, this is the first item in the colon list. */ ++ ++ if( ( key_end = strchr( line, '=' ) ) == NULL ) ++ { ++ continue; ++ } ++ ++ initialize_scan_record( (SCAN_RECORD *)&record, ++ SCAN_RECORD_TYPE_TEXT_1 ); ++ ++ osi_strlcpy( record.module_name, MODULE_NAME, ++ sizeof( record.module_name ) ); ++ ++ /* user the key as a key/path for this record. */ ++ ++ (*key_end) = '\0'; ++ key_end++; ++ osi_strlcpy( record.name, "nvram:", sizeof( record.name ) ); ++ osi_strlcat( record.name, line, sizeof( record.name ) ); ++ ++ /* now copy in the value into the data portion. */ ++ /* and send this record on its way. */ ++ ++ osi_strlcpy( record.data, key_end, sizeof( record.data ) ); ++ send_scan_data( scanner, (SCAN_RECORD *)&record ); ++ } ++ } ++} ++ diff --git a/admin/osiris/patches/007-mod_uptime.patch b/admin/osiris/patches/007-mod_uptime.patch new file mode 100644 index 0000000..2bfeec6 --- /dev/null +++ b/admin/osiris/patches/007-mod_uptime.patch @@ -0,0 +1,243 @@ +Description: The mod_uptime module obtains the system boot time value + for comparison with scans. +Version: 0.2 + +--- osiris-4.1.8-orig/src/osirisd/modules/mod_uptime/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ osiris-4.1.8-1/src/osirisd/modules/mod_uptime/Makefile 2005-04-22 23:11:32.000000000 +0200 +@@ -0,0 +1,16 @@ ++ ++include ../Makefile ++ ++SRCS=mod_uptime.c ++OBJS=$(SRCS:.c=.o) ++ ++module: ${SRCS} ${OBJS} ++ ++INCS=-I../.. -I../../../libosiris -I../../../libfileapi -I../../../.. ++ ++# meta-rule for compiling any "C" source file. ++$(OBJS): $(SRCS) ++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) ${INCLUDES} ${INCS} $(AM_CPPFLAGS) \ ++ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $(SRCS) ++ cp $@ .. ++ +--- osiris-4.1.8-orig/src/osirisd/modules/mod_uptime/README 1970-01-01 01:00:00.000000000 +0100 ++++ osiris-4.1.8-1/src/osirisd/modules/mod_uptime/README 2005-04-22 23:11:32.000000000 +0200 +@@ -0,0 +1,36 @@ ++ ++Module: mod_uptime ++Author: Brian Wotring (brian@shmoo.com) ++ ++ ++ ++DESCRIPTION: ++ ++The mod_uptime module obtains the system boot time value for comparison ++with scans. ++ ++USE: ++ ++To use this module, all that is needed is to include it in the System ++block of a scan configuration, e.g.: ++ ++ ++ ... ++ Include mod_uptime ++ ... ++ ++ ++ ++PARAMETERS: ++ ++There are no parameters for this module. ++ ++PLATFORMS: ++ ++Currently, this module is implemented for FreeBSD, OpenBSD, ++Linux, Solaris, and Mac OS X. ++ ++NOTES: ++ ++ ++ +--- osiris-4.1.8-orig/src/osirisd/modules/mod_uptime/mod_uptime.c 1970-01-01 01:00:00.000000000 +0100 ++++ osiris-4.1.8-1/src/osirisd/modules/mod_uptime/mod_uptime.c 2005-04-22 23:11:32.000000000 +0200 +@@ -0,0 +1,178 @@ ++ ++/****************************************************************************** ++** ++** This program is free software; you can redistribute it and/or ++** modify it, however, you cannot sell it. ++** ++** 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. ++** ++** You should have received a copy of the license attached to the ++** use of this software. If not, visit www.shmoo.com/osiris for ++** details. ++** ++******************************************************************************/ ++ ++/***************************************************************************** ++** ++** File: mod_uptime.c ++** Date: March 22, 2004 ++** ++** Author: Brian Wotring ++** Purpose: platform specific methods for obtaining the system boot time. ++** ++******************************************************************************/ ++ ++#include "libosiris.h" ++#include "libfileapi.h" ++#include "rootpriv.h" ++#include "common.h" ++#include "version.h" ++ ++#include "scanner.h" ++#include "logging.h" ++#include "config.h" ++ ++#ifdef HAVE_SYS_SYSCTL_H ++#include ++#endif ++ ++#ifdef SYSTEM_SUNOS ++#include ++#endif ++ ++#ifdef SYSTEM_LINUX ++#include ++#endif ++ ++#define PROC_FILE "/proc/uptime" ++#define OSI_WTMP_FILE "/var/log/wtmp" ++ ++static const char *MODULE_NAME = "mod_uptime"; ++ ++ ++void mod_uptime( SCANNER *scanner ) ++{ ++ SCAN_RECORD_TEXT_1 record; ++ char *time = NULL; ++ char *temp; ++ ++ initialize_scan_record( (SCAN_RECORD *)&record, ++ SCAN_RECORD_TYPE_TEXT_1 ); ++ ++ osi_strlcpy( record.module_name, MODULE_NAME, ++ sizeof( record.module_name ) ); ++ ++#if defined(SYSTEM_FREEBSD) || defined(SYSTEM_OPENBSD) || defined(SYSTEM_DARWIN) ++ { ++ time_t t; ++ struct timeval result; ++ ++ int request[2] = { CTL_KERN, KERN_BOOTTIME }; ++ size_t result_len = sizeof(result); ++ ++ if( sysctl( request, 2, &result, &result_len, NULL, 0 ) < 0) ++ { ++ log_error( "unable to obtain uptime value." ); ++ return; ++ } ++ ++ t = result.tv_sec; ++ time = ctime( &t ); ++ } ++ ++#elif defined(SYSTEM_SUNOS) ++ { ++ struct utmpx * ent; ++ time_t t; ++ ++ while( ( ent = getutxent() ) ) ++ { ++ if( !strcmp( "system boot", ent->ut_line ) ) ++ { ++ t = ent->ut_tv.tv_sec; ++ time = ctime( &t ); ++ } ++ } ++ } ++ ++#elif defined(SYSTEM_LINUX) ++ { ++ FILE *fp; ++ time_t t; ++ struct utmp ut; ++ ++ char buf[40]; ++ char buf2[10]; ++ int filecount = 0; ++ ++next_file: ++ ++ osi_strlcpy( buf, OSI_WTMP_FILE, sizeof( buf ) ); ++ ++ if( filecount > 0 ) ++ { ++ osi_snprintf( buf2, sizeof(buf2), "%d", filecount ); ++ osi_strlcat( buf, buf2, sizeof(buf) ); ++ } ++ ++ fp = osi_fopen( buf, "r", 0 ); ++ ++ if( fp == NULL ) ++ { ++ log_error( "unable to obtain uptime value." ); ++ return; ++ } ++ ++ while(1) ++ { ++ int rc = fread( &ut, 1, sizeof(ut), fp ); ++ ++ /* end of file, try next. */ ++ ++ if( rc == 0 ) ++ { ++ filecount++; ++ fclose( fp ); ++ ++ goto next_file; ++ } ++ ++ /* found restart event. */ ++ ++ if( ( strcmp( ut.ut_name, "reboot" ) == 0 ) || ++ ( strcmp( ut.ut_name, "shutdown" ) == 0 ) ) ++ { ++ ++ t = ut.ut_time; ++ time = ctime( &t ); ++ ++ break; ++ } ++ } ++ ++ fclose( fp ); ++ } ++#endif ++ ++ if( time == NULL ) ++ { ++ log_error( "unable to obtain uptime value." ); ++ return; ++ } ++ ++ /* remove any trailing newline from the ctime() calls. */ ++ ++ if( ( temp = strchr( time, '\n' ) ) ) ++ { ++ (*temp) = '\0'; ++ } ++ ++ osi_strlcpy( record.name, "uptime", sizeof( record.name ) ); ++ osi_strlcpy( record.data, time, sizeof( record.data ) ); ++ ++ send_scan_data( scanner, (SCAN_RECORD *)&record ); ++} ++ ++ diff --git a/admin/osiris/patches/010-dont-add-host-include-paths.patch b/admin/osiris/patches/010-dont-add-host-include-paths.patch new file mode 100644 index 0000000..84e4ab6 --- /dev/null +++ b/admin/osiris/patches/010-dont-add-host-include-paths.patch @@ -0,0 +1,16 @@ +diff --git a/configure b/configure +index f7f5ce9..322a49d 100755 +--- a/configure ++++ b/configure +@@ -4448,11 +4448,6 @@ cat >>confdefs.h <<_ACEOF + #define SYSTEM_LINUX 1 + _ACEOF + +- +- rc=`grep -c krb5 /usr/include/openssl/ssl.h` +- if test $rc -ne 0; then +- CPPFLAGS="-I/usr/kerberos/include/ ${CPPFLAGS}" +- fi + ;; + BSD*) + diff --git a/admin/pmacct/Makefile b/admin/pmacct/Makefile new file mode 100644 index 0000000..dcc64ee --- /dev/null +++ b/admin/pmacct/Makefile @@ -0,0 +1,241 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pmacct +PKG_VERSION:=0.12.5 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.pmacct.net/ +PKG_MD5SUM:=3d10f9301a17f034a0f221490a99a5d0 + +PKG_BUILD_DEPENDS:=libpcap + +include $(INCLUDE_DIR)/package.mk + +define Package/pmacct/Default + SECTION:=admin + CATEGORY:=Administration + SUBMENU:=Pmacct suite + URL:=http://www.pmacct.net/ +endef + +define Package/nfacctd/Default + $(call Package/pmacct/Default) + TITLE:=NetFlow accounting daemon +endef + +define Package/nfacctd + $(call Package/nfacctd/Default) +endef + +define Package/nfacctd-mysql + $(call Package/nfacctd/Default) + TITLE+= with MySQL support + DEPENDS+= +libmysqlclient +endef + +define Package/nfacctd-pgsql + $(call Package/nfacctd/Default) + TITLE+= with PostreSQL support + DEPENDS+= +libpq +endef + +define Package/nfacctd-sqlite + $(call Package/nfacctd/Default) + TITLE+= with SQLite support + DEPENDS+= +libsqlite3 +endef + +define Package/pmacctd/Default + $(call Package/pmacct/Default) + DEPENDS+= +libpcap + TITLE:=IP pcap-based accounting daemon +endef + +define Package/pmacctd + $(call Package/pmacctd/Default) +endef + +define Package/pmacctd-mysql + $(call Package/pmacctd/Default) + TITLE+= with MySQL support + DEPENDS+= +libmysqlclient +endef + +define Package/pmacctd-pgsql + $(call Package/pmacctd/Default) + TITLE+= with PostreSQL support + DEPENDS+= +libpq +endef + +define Package/pmacctd-sqlite + $(call Package/pmacctd/Default) + TITLE+= with SQLite support + DEPENDS+= +libsqlite3 +endef + +define Package/uacctd/Default + $(call Package/pmacct/Default) + DEPENDS+= +iptables-mod-ulog + TITLE:=ulog accounting daemon +endef + +define Package/uacctd + $(call Package/pmacctd/Default) +endef + +define Package/uacctd-mysql + $(call Package/pmacctd/Default) + TITLE+= with MySQL support + DEPENDS+= +libmysqlclient +endef + +define Package/uacctd-pgsql + $(call Package/pmacctd/Default) + TITLE+= with PostreSQL support + DEPENDS+= +libpq +endef + +define Package/uacctd-sqlite + $(call Package/pmacctd/Default) + TITLE+= with SQLite support + DEPENDS+= +libsqlite3 +endef + +define Package/pmacct-client + $(call Package/pmacct/Default) + TITLE:=Command-line client to gather data from the IMT plugin +endef + +define Compile/Template + +$(PKG_BUILD_DIR)/nfacctd$(1) $(PKG_BUILD_DIR)/pmacctd$(1) $(PKG_BUILD_DIR)/uacctd$(1): $(STAMP_CONFIGURED) + -$(MAKE) -C $(PKG_BUILD_DIR) distclean + $(call Build/Configure/Default, \ + --with-pcap-includes="$(STAGING_DIR)/usr/include" \ + --with-pcap-libs="$(STAGING_DIR)/usr/lib" \ + --enable-ulog \ + $(2) \ + ,\ + LIBS="-lz" \ + ,,\ + ); + $(MAKE) -C $(PKG_BUILD_DIR) \ + all + mv -f $(PKG_BUILD_DIR)/src/nfacctd $(PKG_BUILD_DIR)/nfacctd$(1) + mv -f $(PKG_BUILD_DIR)/src/pmacctd $(PKG_BUILD_DIR)/pmacctd$(1) + mv -f $(PKG_BUILD_DIR)/src/uacctd $(PKG_BUILD_DIR)/uacctd$(1) + +$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/nfacctd$(1) $(PKG_BUILD_DIR)/pmacctd$(1) $(PKG_BUILD_DIR)/uacctd$(1) + +endef + + +define Install/Template + +define Package/$(1)$(2)/conffiles +/etc/default/$(1) +/etc/$(1).conf +endef + +define Package/$(1)$(2)/install + $(INSTALL_DIR) $$(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(1)$(2) $$(1)/usr/sbin/$(1) + $(INSTALL_DIR) $$(1)/etc + $(INSTALL_DATA) ./files/$(1).conf $$(1)/etc/ + $(INSTALL_DIR) $$(1)/etc/default + $(INSTALL_DATA) ./files/$(1).default $$(1)/etc/default/$(1) + $(INSTALL_DIR) $$(1)/etc/init.d + $(INSTALL_BIN) ./files/$(1).init $$(1)/etc/init.d/$(1) +endef + +endef + +ifneq ($(SDK)$(CONFIG_PACKAGE_nfacctd)$(CONFIG_PACKAGE_pmacctd)$(CONFIG_PACKAGE_uacctd),) + define Compile/pmacct/basic + $(call Compile/Template,, \ + --disable-mysql \ + --disable-pgsql \ + --disable-sqlite3 \ + ) + $(call Install/Template,nfacctd,) + $(call Install/Template,pmacctd,) + $(call Install/Template,uacctd,) + endef +endif +$(eval $(Compile/pmacct/basic)) + +ifneq ($(SDK)$(CONFIG_PACKAGE_nfacctd-mysql)$(CONFIG_PACKAGE_pmacctd-mysql)$(CONFIG_PACKAGE_uacctd-mysql),) + define Compile/pmacct/mysql + $(call Compile/Template,-mysql, \ + --enable-mysql \ + --with-mysql-includes="$(STAGING_DIR)/usr/include" \ + --with-mysql-libs="$(STAGING_DIR)/usr/lib/mysql" \ + ) + $(call Install/Template,nfacctd,-mysql) + $(call Install/Template,pmacctd,-mysql) + $(call Install/Template,uacctd,-mysql) + endef +endif +$(eval $(Compile/pmacct/mysql)) + +ifneq ($(SDK)$(CONFIG_PACKAGE_nfacctd-pgsql)$(CONFIG_PACKAGE_pmacctd-pgsql)$(CONFIG_PACKAGE_uacctd-pgsql),) + define Compile/pmacct/pgsql + $(call Compile/Template,-pgsql, \ + --enable-pgsql \ + --with-pgsql-includes="$(STAGING_DIR)/usr/include" \ + --with-pgsql-libs="$(STAGING_DIR)/usr/lib" \ + ) + $(call Install/Template,nfacctd,-pgsql) + $(call Install/Template,pmacctd,-pgsql) + $(call Install/Template,uacctd,-pgsql) + endef +endif +$(eval $(Compile/pmacct/pgsql)) + +ifneq ($(SDK)$(CONFIG_PACKAGE_nfacctd-sqlite)$(CONFIG_PACKAGE_pmacctd-sqlite)$(CONFIG_PACKAGE_uacctd-sqlite),) + define Compile/pmacct/sqlite + $(call Compile/Template,-sqlite, \ + --enable-sqlite3 \ + --with-sqlite3-includes="$(STAGING_DIR)/usr/include" \ + --with-sqlite3-libs="$(STAGING_DIR)/usr/lib" \ + ) + $(call Install/Template,nfacctd,-sqlite) + $(call Install/Template,pmacctd,-sqlite) + $(call Install/Template,uacctd,-sqlite) + endef +endif +$(eval $(Compile/pmacct/sqlite)) + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/pmacct-client/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/src/pmacct $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,nfacctd)) +$(eval $(call BuildPackage,nfacctd-mysql)) +$(eval $(call BuildPackage,nfacctd-pgsql)) +$(eval $(call BuildPackage,nfacctd-sqlite)) +$(eval $(call BuildPackage,pmacctd)) +$(eval $(call BuildPackage,pmacctd-mysql)) +$(eval $(call BuildPackage,pmacctd-pgsql)) +$(eval $(call BuildPackage,pmacctd-sqlite)) +$(eval $(call BuildPackage,pmacct-client)) +$(eval $(call BuildPackage,uacctd)) +$(eval $(call BuildPackage,uacctd-mysql)) +$(eval $(call BuildPackage,uacctd-pgsql)) +$(eval $(call BuildPackage,uacctd-sqlite)) + diff --git a/admin/pmacct/files/nfacctd.conf b/admin/pmacct/files/nfacctd.conf new file mode 100644 index 0000000..27b8956 --- /dev/null +++ b/admin/pmacct/files/nfacctd.conf @@ -0,0 +1,29 @@ +! +! nfacctd configuration example +! +! debug: true +daemonize: true +pidfile: /var/run/nfacctd.pid +! aggregate_filter[dummy]: src net 192.168.0.0/16 +aggregate: src_host, dst_host +! plugin_buffer_size: 1024 +! nfacctd_port: 5678 +! nfacctd_time_secs: true +! nfacctd_time_new: true +plugins: memory +imt_buckets: 65537 +imt_mem_pools_size: 65536 +! imt_mem_pools_number: 0 +! plugins: mysql +! plugins: pgsql +! plugins: sqlite3 +! sql_db: pmacct +! sql_table: acct +! sql_table_version: 2 +! sql_passwd: arealsmartpwd +! sql_user: pmacct +! sql_refresh_time: 90 +! sql_optimize_clauses: true +! sql_history: 10m +! sql_history_roundoff: mh +! networks_file: ./networks.example diff --git a/admin/pmacct/files/nfacctd.default b/admin/pmacct/files/nfacctd.default new file mode 100644 index 0000000..9315b28 --- /dev/null +++ b/admin/pmacct/files/nfacctd.default @@ -0,0 +1 @@ +OPTIONS="-f /etc/nfacctd.conf" diff --git a/admin/pmacct/files/nfacctd.init b/admin/pmacct/files/nfacctd.init new file mode 100644 index 0000000..e111357 --- /dev/null +++ b/admin/pmacct/files/nfacctd.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=nfacctd +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $RUN_D + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill -INT $(cat $PID_F) +} diff --git a/admin/pmacct/files/pmacctd.conf b/admin/pmacct/files/pmacctd.conf new file mode 100644 index 0000000..e7e4892 --- /dev/null +++ b/admin/pmacct/files/pmacctd.conf @@ -0,0 +1,27 @@ +! +! pmacctd configuration example +! +! debug: true +interface: vlan1 +daemonize: true +pidfile: /var/run/pmacctd.pid +pmacctd_id: 1 +aggregate: src_host,dst_host +! aggregate: src_net,dst_net +plugins: memory +imt_buckets: 65537 +imt_mem_pools_size: 65536 +! imt_mem_pools_number: 0 +! plugins: mysql +! plugins: pgsql +! plugins: sqlite3 +! sql_db: pmacct +! sql_table: acct +! sql_table_version: 2 +! sql_passwd: arealsmartpwd +! sql_user: pmacct +! sql_refresh_time: 90 +! sql_optimize_clauses: true +! sql_history: 10m +! sql_history_roundoff: mh +! networks_file: ./networks.example diff --git a/admin/pmacct/files/pmacctd.default b/admin/pmacct/files/pmacctd.default new file mode 100644 index 0000000..3c06f08 --- /dev/null +++ b/admin/pmacct/files/pmacctd.default @@ -0,0 +1 @@ +OPTIONS="-f /etc/pmacctd.conf" diff --git a/admin/pmacct/files/pmacctd.init b/admin/pmacct/files/pmacctd.init new file mode 100644 index 0000000..a57c581 --- /dev/null +++ b/admin/pmacct/files/pmacctd.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=pmacctd +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $RUN_D + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill -INT $(cat $PID_F) +} diff --git a/admin/pmacct/files/uacctd.conf b/admin/pmacct/files/uacctd.conf new file mode 100644 index 0000000..c8cdd7d --- /dev/null +++ b/admin/pmacct/files/uacctd.conf @@ -0,0 +1,28 @@ +! +! uacctd configuration example +! +! debug: true + +uacctd_group : 1 + +daemonize: true +pidfile: /var/run/uacctd.pid +aggregate: src_host,dst_host +! aggregate: src_net,dst_net +plugins: memory +imt_buckets: 65537 +imt_mem_pools_size: 65536 +! imt_mem_pools_number: 0 +! plugins: mysql +! plugins: pgsql +! plugins: sqlite3 +! sql_db: uacct +! sql_table: acct +! sql_table_version: 2 +! sql_passwd: arealsmartpwd +! sql_user: uacct +! sql_refresh_time: 90 +! sql_optimize_clauses: true +! sql_history: 10m +! sql_history_roundoff: mh +! networks_file: ./networks.example diff --git a/admin/pmacct/files/uacctd.default b/admin/pmacct/files/uacctd.default new file mode 100644 index 0000000..7b2834e --- /dev/null +++ b/admin/pmacct/files/uacctd.default @@ -0,0 +1 @@ +OPTIONS="-f /etc/uacctd.conf" diff --git a/admin/pmacct/files/uacctd.init b/admin/pmacct/files/uacctd.init new file mode 100644 index 0000000..a4239ad --- /dev/null +++ b/admin/pmacct/files/uacctd.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=uacctd +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $RUN_D + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill -INT $(cat $PID_F) +} diff --git a/admin/pmacct/patches/001-honor_cflags.patch b/admin/pmacct/patches/001-honor_cflags.patch new file mode 100644 index 0000000..14d1711 --- /dev/null +++ b/admin/pmacct/patches/001-honor_cflags.patch @@ -0,0 +1,20 @@ +--- a/configure ++++ b/configure +@@ -1083,7 +1083,7 @@ fi + + + if test "x$ac_cv_prog_gcc" = xyes ; then +- CFLAGS="-O2" ++ CFLAGS="-O2 ${CFLAGS}" + case "$host_os" in + IRIX*) + CFLAGS="-mabi=n32 -fno-builtins ${CFLAGS}" +@@ -1097,7 +1097,7 @@ else + LDFLAGS="-n32 -L/usr/lib32 -L/usr/freeware/lib32 ${LDFLAGS}" + ;; + OSF*) +- CFLAGS="-O -assume noaligned_objects" ++ CFLAGS="-O -assume noaligned_objects ${CFLAGS}" + ;; + esac + fi diff --git a/admin/sudo/Makefile b/admin/sudo/Makefile new file mode 100644 index 0000000..9e9aa1a --- /dev/null +++ b/admin/sudo/Makefile @@ -0,0 +1,76 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sudo +PKG_VERSION:=1.7.8p1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.sudo.ws/sudo/dist +PKG_MD5SUM:=5552b9aabc43e34bbc8dc557c098a933 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/sudo + SECTION:=admin + CATEGORY:=Administration + TITLE:=Delegate authority to run commands + URL:=http://www.sudo.ws/ +endef + +define Package/sudo/description + Sudo (su "do") allows a system administrator to delegate authority to + give certain users (or groups of users) the ability to run some (or + all) commands as root or another user while providing an audit trail of + the commands and their arguments. +endef + +define Package/sudo/conffiles +/etc/sudoers +endef + +CONFIGURE_ARGS+= \ + --without-pam \ + --disable-pam-session \ + --with-editor=/bin/vi \ + --without-lecture \ + --disable-zlib + +CONFIGURE_VARS+= \ + sudo_cv_uid_t_len=10 \ + sudo_cv_func_unsetenv_void=no + +define Package/sudo/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/sudo $(1)/usr/bin/ + chmod 4755 $(1)/usr/bin/sudo + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/visudo $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(CP) $(PKG_INSTALL_DIR)/etc/sudoers $(1)/etc/ + chmod 0440 $(1)/etc/sudoers + $(INSTALL_DIR) $(1)/etc/sudoers.d + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/sudo_noexec.so $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/sudo.init $(1)/etc/init.d/sudo +endef + +define Package/sudo/postinst +#!/bin/sh + +[ -n "$$IPKG_INSTROOT" ] || { + /etc/init.d/sudo enable + /etc/init.d/sudo start +} +endef + +$(eval $(call BuildPackage,sudo)) diff --git a/admin/sudo/files/sudo.init b/admin/sudo/files/sudo.init new file mode 100755 index 0000000..9df2737 --- /dev/null +++ b/admin/sudo/files/sudo.init @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2011 OpenWrt.org + +START=99 + +start() { + [ -d /var/lib/sudo ] || { + mkdir -m 0755 -p /var/lib/sudo + chmod 0700 /var/lib/sudo + } +} diff --git a/admin/syslog-ng/Makefile b/admin/syslog-ng/Makefile new file mode 100644 index 0000000..6db882a --- /dev/null +++ b/admin/syslog-ng/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=syslog-ng +PKG_VERSION:=1.6.12 +PKG_RELEASE:=2 +PKG_MD5SUM:=a3cbfdb6e1e5beea181a7349749719f3 + +PKG_SOURCE_URL:= \ + http://www.balabit.com/downloads/files/syslog-ng/sources/1.6/src \ + http://www.balabit.com/downloads/files/syslog-ng/stable/src +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/syslog-ng + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+libol + TITLE:=A powerful syslog daemon + URL:=http://www.balabit.com/products/syslog_ng/ +endef + +define Package/syslog-ng/description + syslog-ng reads and logs messages to the system console, log + files, other machines and/or users as specified by its + configuration file. +endef + +define Package/syslog-ng/conffiles +/etc/syslog-ng/syslog-ng.conf +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-dependency-tracking \ + --disable-full-static \ + --enable-tcp-wrapper \ + --with-libol="$(STAGING_DIR)/host/bin" \ + , \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include/libol $(TARGET_CPPFLAGS)" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib/libol $(TARGET_LDFLAGS)" \ + ) +endef + +define Package/syslog-ng/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/syslog-ng $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng + $(INSTALL_DIR) $(1)/etc/syslog-ng + $(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc/syslog-ng/ +endef + +$(eval $(call BuildPackage,syslog-ng)) diff --git a/admin/syslog-ng/files/syslog-ng.conf b/admin/syslog-ng/files/syslog-ng.conf new file mode 100644 index 0000000..658abea --- /dev/null +++ b/admin/syslog-ng/files/syslog-ng.conf @@ -0,0 +1,16 @@ +options { + chain_hostnames(off); + sync(0); + + # The default action of syslog-ng 1.6.0 is to log a STATS line + # to the file every 10 minutes. That's pretty ugly after a while. + # Change it to every 12 hours so you get a nice daily update of + # how many messages syslog-ng missed (0). + stats(43200); +}; + +source src { unix-stream("/dev/log"); internal(); }; + +destination messages { file("/var/log/messages"); }; + +log { source(src); destination(messages); }; diff --git a/admin/syslog-ng/files/syslog-ng.init b/admin/syslog-ng/files/syslog-ng.init new file mode 100644 index 0000000..06672e8 --- /dev/null +++ b/admin/syslog-ng/files/syslog-ng.init @@ -0,0 +1,27 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start() { + [ -f /etc/syslog-ng/syslog-ng.conf ] || { + echo "/etc/syslog-ng/syslog-ng.conf does not exist !"; + exit 0; + }; + [ -d /var/run ] || mkdir -p /var/run + [ -x /usr/sbin/syslog-ng ] && /usr/sbin/syslog-ng +} + +stop() { + killall syslog-ng +} + +restart() { + stop + sleep 1 + start +} + +reload() { + kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null +} + diff --git a/admin/syslog-ng/patches/001-no_lfl.patch b/admin/syslog-ng/patches/001-no_lfl.patch new file mode 100644 index 0000000..ce33d95 --- /dev/null +++ b/admin/syslog-ng/patches/001-no_lfl.patch @@ -0,0 +1,38 @@ +diff -ubr /tmp/syslog-ng-1.6.12/configure syslog-ng-1.6.12/configure +--- /tmp/syslog-ng-1.6.12/configure 2007-02-02 02:58:41.000000000 -0600 ++++ syslog-ng-1.6.12/configure 2007-03-03 20:39:40.000000000 -0600 +@@ -3695,7 +3695,7 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lfl $LIBS" ++LIBS="$LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +diff -ubr /tmp/syslog-ng-1.6.12/Makefile.in syslog-ng-1.6.12/Makefile.in +--- /tmp/syslog-ng-1.6.12/Makefile.in 2007-02-02 02:58:41.000000000 -0600 ++++ syslog-ng-1.6.12/Makefile.in 2007-03-03 20:38:56.000000000 -0600 +@@ -65,7 +65,7 @@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ + LEX = @LEX@ +-LEXLIB = @LEXLIB@ ++LEXLIB = + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ + LIBOBJS = @LIBOBJS@ + LIBOL_DIR = @LIBOL_DIR@ +diff -ubr /tmp/syslog-ng-1.6.12/src/cfg-lex.c syslog-ng-1.6.12/src/cfg-lex.c +--- /tmp/syslog-ng-1.6.12/src/cfg-lex.c 2006-08-22 03:43:36.000000000 -0500 ++++ syslog-ng-1.6.12/src/cfg-lex.c 2007-03-03 20:36:52.000000000 -0600 +@@ -668,7 +668,9 @@ + #ifdef __cplusplus + extern "C" int yywrap (void ); + #else +-extern int yywrap (void ); ++int yywrap (void ) { ++ return 1; ++} + #endif + #endif + diff --git a/admin/syslog-ng3/Makefile b/admin/syslog-ng3/Makefile new file mode 100644 index 0000000..3372377 --- /dev/null +++ b/admin/syslog-ng3/Makefile @@ -0,0 +1,72 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=syslog-ng +PKG_VERSION:=3.0.5 +PKG_RELEASE:=3 + +PKG_SOURCE_URL:=http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/$(PKG_VERSION)/source/ +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz +PKG_MD5SUM:=28f0d9ff2243b330e8cd6311ef9b2f12 + +PKG_CONFIG_DEPENDS:= \ + CONFIG_IPV6 \ + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/syslog-ng3 + SECTION:=admin + CATEGORY:=Administration + DEPENDS:=+libpcre +glib2 +libeventlog +libopenssl +libwrap +libpthread +zlib + TITLE:=A powerful syslog daemon + URL:=http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/ +endef + +define Package/syslog-ng3/description + syslog-ng reads and logs messages to the system console, log + files, other machines and/or users as specified by its + configuration file. +endef + +define Package/syslog-ng3/conffiles +/etc/syslog-ng.conf +endef + +define Build/Configure + $(SED) 's,-I/usr/include,,' $(PKG_BUILD_DIR)/configure + $(Build/Configure/Default) +endef + +CONFIGURE_ARGS += \ + $(call autoconf_bool,CONFIG_IPV6,ipv6) \ + --disable-dependency-tracking \ + --enable-tcp-wrapper \ + --disable-glibtest \ + --disable-spoof-source \ + --disable-sql \ + --enable-prce \ + --disable-linux-caps \ + +TARGET_CPPFLAGS += \ + -I$(STAGING_DIR)/usr/include/eventlog + +CONFIGURE_VARS += \ + LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include" + +define Package/syslog-ng3/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/syslog-ng $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc +endef + +$(eval $(call BuildPackage,syslog-ng3)) diff --git a/admin/syslog-ng3/files/syslog-ng.conf b/admin/syslog-ng3/files/syslog-ng.conf new file mode 100644 index 0000000..972848c --- /dev/null +++ b/admin/syslog-ng3/files/syslog-ng.conf @@ -0,0 +1,37 @@ +@version:3.0 + +options { + chain_hostnames(no); + create_dirs(yes); + flush_lines(0); + keep_hostname(yes); + log_fifo_size(256); + log_msg_size(1024); + stats_freq(0); + flush_lines(0); + use_fqdn(no); +}; + +source src { + internal(); + unix-stream("/dev/log"); +}; + +source net { + udp(ip(0.0.0.0) port(514)); +}; + +source kernel { + file("/proc/kmsg" program_override("kernel")); +}; + +destination messages { + file("/var/log/messages"); +}; + +log { + source(src); + source(net); + source(kernel); + destination(messages); +}; diff --git a/admin/syslog-ng3/files/syslog-ng.init b/admin/syslog-ng3/files/syslog-ng.init new file mode 100644 index 0000000..4609f6f --- /dev/null +++ b/admin/syslog-ng3/files/syslog-ng.init @@ -0,0 +1,27 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start() { + [ -f /etc/syslog-ng.conf ] || { + echo "/etc/syslog-ng.conf does not exist !"; + exit 0; + }; + [ -d /var/run ] || mkdir -p /var/run + [ -x /usr/sbin/syslog-ng ] && /usr/sbin/syslog-ng +} + +stop() { + killall syslog-ng +} + +restart() { + stop + sleep 1 + start +} + +reload() { + kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null +} + diff --git a/admin/zabbix/Makefile b/admin/zabbix/Makefile new file mode 100644 index 0000000..7fd99a5 --- /dev/null +++ b/admin/zabbix/Makefile @@ -0,0 +1,135 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=zabbix +PKG_VERSION:=1.6 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/zabbix +PKG_MD5SUM:=39d4c871439b1b4f0429964b4abbfc45 + +PKG_BUILD_DEPENDS:=libsqlite3 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/zabbix/Default + SECTION:=admin + CATEGORY:=Administration + TITLE:=Zabbix + URL:=http://www.zabbix.com/ + SUBMENU:=zabbix + DEPENDS:=+libcurl +endef + +define Package/zabbix-agent + $(call Package/zabbix/Default) + TITLE+= agent +endef + +define Package/zabbix-sender + $(call Package/zabbix/Default) + TITLE+= sender +endef + +define Package/zabbix-server + $(call Package/zabbix/Default) + TITLE+= server + DEPENDS += +libsqlite3 +endef + + +ifneq ($(SDK),) +CONFIG_PACKAGE_zabbix-server:=m +endif + +CONFIGURE_ARGS+= \ + --bindir="/usr/sbin" \ + --enable-agent + +ifneq ($(CONFIG_PACKAGE_zabbix-server),) + CONFIGURE_ARGS+= \ + --enable-server \ + --with-sqlite3="$(STAGING_DIR)/usr" +endif + +MAKE_FLAGS += ARCH="linux" + +define Package/zabbix-agent/conffiles +/etc/zabbix/zabbix_agentd.conf +endef + +define Package/zabbix-agent/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zabbix_agentd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/zabbix + $(INSTALL_CONF) ./files/zabbix_agentd.conf $(1)/etc/zabbix/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/zabbix_agentd.init $(1)/etc/init.d/zabbix_agentd +endef + +define Package/zabbix-agent/postinst +#!/bin/sh + +name=zabbix +id=53 + +# do not change below +# check if we are on real system +if [ -z "$${IPKG_INSTROOT}" ]; then + # create copies of passwd and group, if we use squashfs + rootfs=`mount |awk '/root/ { print $$5 }'` + if [ "$$rootfs" = "squashfs" ]; then + if [ -h /etc/group ]; then + rm /etc/group + cp /rom/etc/group /etc/group + fi + if [ -h /etc/passwd ]; then + rm /etc/passwd + cp /rom/etc/passwd /etc/passwd + fi + fi + + echo "" + if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then + echo "adding group $$name to /etc/group" + echo "$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc/group + fi + + if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then + echo "adding user $$name to /etc/passwd" + echo "$${name}:x:$${id}:$${id}:$${name}:/tmp/.$${name}:/bin/false" >> $${IPKG_INSTROOT}/etc/passwd + fi + + chown $${name} $${IPKG_INSTROOT}/etc/zabbix/zabbix_agentd.conf +fi + +endef + +define Package/zabbix-sender/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zabbix_sender $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/zabbix +endef + +define Package/zabbix-server/conffiles +/etc/zabbix/zabbix_server.conf +endef + +define Package/zabbix-server/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zabbix_server $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/zabbix + $(INSTALL_CONF) $(PKG_BUILD_DIR)/misc/conf/zabbix_server.conf $(1)/etc/zabbix/ +endef + +$(eval $(call BuildPackage,zabbix-agent)) +$(eval $(call BuildPackage,zabbix-sender)) +$(eval $(call BuildPackage,zabbix-server)) diff --git a/admin/zabbix/files/zabbix_agentd.conf b/admin/zabbix/files/zabbix_agentd.conf new file mode 100644 index 0000000..2787cca --- /dev/null +++ b/admin/zabbix/files/zabbix_agentd.conf @@ -0,0 +1,85 @@ +# This is config file for zabbix_agentd +# To get more information about ZABBIX, go http://www.zabbix.com + +############ GENERAL PARAMETERS ################# + +# List of comma delimited IP addresses (or hostnames) of ZABBIX servers. +# No spaces allowed. First entry is used for sending active checks. +# Note that hostnames must resolve hostname->IP address and +# IP address->hostname. + +Server=127.0.0.1 + +# Server port for sending active checks + +#ServerPort=10051 + +# Unique hostname. Required for active checks. + +Hostname=localhost + +# Listen port. Default is 10050 + +#ListenPort=10050 + +# IP address to bind agent +# If missing, bind to all available IPs + +#ListenIP=127.0.0.1 + +# Number of pre-forked instances of zabbix_agentd. +# Default value is 5 +# This parameter must be between 1 and 16 + +StartAgents=5 + +# How often refresh list of active checks. 2 minutes by default. + +#RefreshActiveChecks=120 + +# Disable active checks. The agent will work in passive mode listening server. + +#DisableActive=1 + +# Enable remote commands for ZABBIX agent. By default remote commands disabled. + +#EnableRemoteCommands=1 + +# Specifies debug level +# 0 - debug is not created +# 1 - critical information +# 2 - error information +# 3 - warnings +# 4 - information (default) +# 5 - for debugging (produces lots of information) + +DebugLevel=3 + +# Name of PID file + +PidFile=/tmp/zabbix_agentd.pid + +# Name of log file. +# If not set, syslog will be used + +LogFile=/tmp/zabbix_agentd.log + +# Spend no more than Timeout seconds on processing +# Must be between 1 and 30 + +Timeout=3 + +####### USER-DEFINED MONITORED PARAMETERS ####### +# Format: UserParameter=, +# Note that shell command must not return empty string or EOL only +#UserParameter=system.test,who|wc -l +### Set of parameter for monitoring MySQL server (v3.23.42 and later) +### Change -u and add -p if required +#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l +#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T" +#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q" +#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S" +#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O" +#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":" +#UserParameter=mysql.version,mysql -V + diff --git a/admin/zabbix/files/zabbix_agentd.init b/admin/zabbix/files/zabbix_agentd.init new file mode 100644 index 0000000..a132a84 --- /dev/null +++ b/admin/zabbix/files/zabbix_agentd.init @@ -0,0 +1,21 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=60 + +start() { + [ -f /etc/zabbix/zabbix_agentd.conf ] || { + echo "/etc/zabbix/zabbix_agentd.conf does not exist !"; + exit 0; + }; + [ -x /usr/sbin/zabbix_agentd ] && /usr/sbin/zabbix_agentd +} + +stop() { + killall zabbix_agentd +} + +restart() { + stop + sleep 1 + start +} diff --git a/admin/zabbix/patches/001-cross_compile.patch b/admin/zabbix/patches/001-cross_compile.patch new file mode 100644 index 0000000..023c89c --- /dev/null +++ b/admin/zabbix/patches/001-cross_compile.patch @@ -0,0 +1,13 @@ +diff -urN zabbix-1.6/configure zabbix-1.6.new/configure +--- zabbix-1.6/configure 2008-09-18 22:15:39.000000000 +0200 ++++ zabbix-1.6.new/configure 2008-09-30 19:20:43.000000000 +0200 +@@ -4826,8 +4826,7 @@ + { { 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; }; } ++See \`config.log' for more details." >&2;} } + else + cat >conftest.$ac_ext <<_ACEOF + diff --git a/admin/zabbix/patches/002-uclibc_loadavg.patch b/admin/zabbix/patches/002-uclibc_loadavg.patch new file mode 100644 index 0000000..6439edf --- /dev/null +++ b/admin/zabbix/patches/002-uclibc_loadavg.patch @@ -0,0 +1,49 @@ +diff -urN zabbix-1.6/src/libs/zbxsysinfo/linux/cpu.c zabbix-1.6.new/src/libs/zbxsysinfo/linux/cpu.c +--- zabbix-1.6/src/libs/zbxsysinfo/linux/cpu.c 2008-09-18 22:15:26.000000000 +0200 ++++ zabbix-1.6.new/src/libs/zbxsysinfo/linux/cpu.c 2008-09-30 19:32:54.000000000 +0200 +@@ -22,6 +22,45 @@ + #include "sysinfo.h" + #include "stats.h" + ++ ++/* uclibc and dietlibc do not have this junk -ReneR */ ++#if defined (__UCLIBC__) || defined (__dietlibc__) ++static int getloadavg (double loadavg[], int nelem) ++{ ++ int fd; ++ ++ fd = open ("/proc/loadavg", O_RDONLY); ++ if (fd < 0) ++ return -1; ++ else ++ { ++ char buf[65], *p; ++ ssize_t nread; ++ int i; ++ ++ nread = read (fd, buf, sizeof buf - 1); ++ close (fd); ++ if (nread <= 0) ++ return -1; ++ buf[nread - 1] = '\0'; ++ ++ if (nelem > 3) ++ nelem = 3; ++ p = buf; ++ for (i = 0; i < nelem; ++i) ++ { ++ char *endp; ++ loadavg[i] = strtod (p, &endp); ++ if (endp == p) ++ return -1; ++ p = endp; ++ } ++ ++ return i; ++ } ++} ++#endif ++ + int SYSTEM_CPU_NUM(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result) + { + char mode[128]; diff --git a/devel/binutils/Makefile b/devel/binutils/Makefile new file mode 100644 index 0000000..5925fdd --- /dev/null +++ b/devel/binutils/Makefile @@ -0,0 +1,111 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=binutils +PKG_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION))) +#")) +PKG_RELEASE:=3 + +PKG_SOURCE_URL:=@GNU/binutils +PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:= + +PATCH_DIR:=$(TOPDIR)/toolchain/binutils/patches/$(PKG_VERSION) + +PKG_FIXUP:=autoreconf +PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl +PKG_REMOVE_FILES:=libtool.m4 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/binutils + SECTION:=devel + CATEGORY:=Development + TITLE:=binutils + DEPENDS:=+objdump +endef + +define Package/objdump + SECTION:=devel + CATEGORY:=Development + TITLE:=objdump + DEPENDS:=+zlib +endef + +define Package/binutils/description + The Binutils package contains a linker, an assembler, and other tools for handling object files +endef + +CONFIGURE_ARGS = \ + --target=$(REAL_GNU_TARGET_NAME) \ + --host=$(REAL_GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --with-sysroot=$(PKG_INSTALL_DIR) \ + --prefix=/usr \ + --disable-multilib \ + --disable-werror \ + --disable-nls \ + --enable-shared \ + $(SOFT_FLOAT_CONFIG_OPTION) \ + $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) + +TARGET_CFLAGS += $(FPIC) +TARGET_LDFLAGS := -L$(PKG_BUILD_DIR)/libiberty $(TARGET_LDFLAGS) + +define Build/Configure + $(call Build/Configure/Default) + $(call Build/Compile/Default, \ + configure-bfd \ + configure-binutils \ + configure-etc \ + configure-gas \ + configure-gprof \ + configure-intl \ + configure-ld \ + configure-libiberty \ + configure-opcodes \ + ) + $(MAKE) CFLAGS="$(TARGET_CFLAGS)"-C $(PKG_BUILD_DIR)/bfd/po Makefile +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/{lib,include} + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/* \ + $(1)/usr/lib/ + $(CP) \ + $(PKG_BUILD_DIR)/include/*.h \ + $(1)/usr/include/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/* \ + $(1)/usr/include/ + rm -f $(1)/usr/include/gdbm.h +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/bfd/doc/ CFLAGS="-I$(PKG_BUILD_DIR)/include" chew + $(call Build/Compile/Default) +endef + +define Package/objdump/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/bin/objdump $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopcodes*.so $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbfd*.so $(1)/usr/lib/ +endef + +define Package/binutils/install + $(INSTALL_DIR) $(1)/usr + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/ + rm -f $(1)/usr/bin/objdump +endef + +$(eval $(call BuildPackage,binutils)) +$(eval $(call BuildPackage,objdump)) diff --git a/devel/boost-jam/Makefile b/devel/boost-jam/Makefile new file mode 100644 index 0000000..1372508 --- /dev/null +++ b/devel/boost-jam/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=boost-jam +PKG_VERSION:=3.1.17 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=@SF/boost +PKG_MD5SUM:=f4afd896788f2327fd35c128ddc6e340 +PKG_HOST_ONLY:=1 + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Package/boost-jam + SECTION:=devel + CATEGORY:=Development + TITLE:=Boost JAM + BUILDONLY:=1 + URL:=http://www.boost.org +endef + +define Host/Compile + # bjam does not provide a configure-script nor a Makefile + ( cd $(HOST_BUILD_DIR) ; ./build.sh gcc ) +endef + +define Host/Install + $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin + $(CP) $(HOST_BUILD_DIR)/bin.*/bjam $(STAGING_DIR_HOST)/bin/ +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,boost-jam)) diff --git a/devel/build-essential/Makefile b/devel/build-essential/Makefile new file mode 100644 index 0000000..f22611d --- /dev/null +++ b/devel/build-essential/Makefile @@ -0,0 +1,33 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=build-essential +PKG_RELEASE:=1 +PKG_VERSION:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/build-essential + SECTION:=devel + CATEGORY:=Development + TITLE:=Build essentials + DEPENDS=+gcc +make +binutils +patch +diffutils @NO_STRIP + PKGARCH:=all +endef + +define Build/Compile + +endef + +define Package/build-essential/install + cp -r ./files/* $(1) +endef + +$(eval $(call BuildPackage,build-essential)) diff --git a/devel/build-essential/files/usr/src/hello/hello.c b/devel/build-essential/files/usr/src/hello/hello.c new file mode 100644 index 0000000..e693fd8 --- /dev/null +++ b/devel/build-essential/files/usr/src/hello/hello.c @@ -0,0 +1,8 @@ +#include + +int main(int argc, char **argv) +{ + printf("Hello OpenWrt\n"); + + return 0; +} diff --git a/devel/cppunit/Makefile b/devel/cppunit/Makefile new file mode 100644 index 0000000..594c350 --- /dev/null +++ b/devel/cppunit/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cppunit +PKG_VERSION:=1.12.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/cppunit +PKG_MD5SUM:=bd30e9cf5523cdfc019b94f5e1d7fd19 + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Package/cppunit + SECTION:=devel + CATEGORY:=Development + TITLE:=Unit Testing Library for C++ + URL:=http://cppunit.sourceforge.net/ +endef + +define Package/cppunit/description + Unit Testing Library for C++ +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/cppunit + $(CP) $(PKG_INSTALL_DIR)/usr/include/cppunit $(1)/usr/include + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcppunit*so* $(1)/usr/lib/ +endef + +define Package/cppunit/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcppunit*so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,cppunit)) diff --git a/devel/diffutils/Makefile b/devel/diffutils/Makefile new file mode 100644 index 0000000..202cc09 --- /dev/null +++ b/devel/diffutils/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=diffutils +PKG_VERSION:=3.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@GNU/diffutils +PKG_MD5SUM:=684aaba1baab743a2a90e52162ff07da + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/diffutils + SECTION:=devel + CATEGORY:=Development + TITLE:=diffutils + URL:=http://www.gnu.org/software/diffutils/ +endef + +define Package/diffutils/description + The Diffutils package contains programs that show the differences between + files or directories. +endef + +CONFIGURE_VARS += \ + ac_cv_func_mempcpy=n \ + +define Package/diffutils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3,diff,cmp} $(1)/usr/bin/ +endef + +define Package/diffutils/preinst +#!/bin/sh +if [ -e $${IPKG_INSTROOT}/usr/bin/diff ]; then + rm $${IPKG_INSTROOT}/usr/bin/diff; +fi +endef + +define Package/diffutils/postrm +#!/bin/sh +ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/diff +$${IPKG_INSTROOT}/usr/bin/diff 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/diff +exit 0 +endef + +$(eval $(call BuildPackage,diffutils)) diff --git a/devel/dmalloc/Makefile b/devel/dmalloc/Makefile new file mode 100644 index 0000000..d3680c1 --- /dev/null +++ b/devel/dmalloc/Makefile @@ -0,0 +1,77 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dmalloc +PKG_VERSION:=5.5.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://dmalloc.com/releases/ +PKG_MD5SUM:=f92e5606c23a8092f3d5694e8d1c932e + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/dmalloc/Default + SECTION:=devel + CATEGORY:=Development + TITLE:=Dmalloc + URL:=http://www.dmalloc.com/ +endef + +define Package/libdmalloc + $(call Package/dmalloc/Default) + TITLE+= (library) +endef + +define Package/dmalloc-utils + $(call Package/dmalloc/Default) + DEPENDS:=+libdmalloc + TITLE+= (utilities) +endef + +define Package/dmalloc/description +The debug memory allocation or dmalloc library has been designed as a drop in +replacement for the system's malloc, realloc, calloc, free and other memory +management routines while providing powerful debugging facilities configurable +at runtime. These facilities include such things as memory-leak tracking, +fence-post write detection, file/line number reporting, and general logging of +statistics. +endef + +CONFIGURE_ARGS += \ + --disable-cxx \ + --with-pagesize=12 + +TARGET_CFLAGS += $(FPIC) + +MAKE_INSTALL_FLAGS += installsl + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/dmalloc.h $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdmalloc.{a,so*} $(1)/usr/lib/ +endef + +define Package/libdmalloc/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdmalloc.so* $(1)/usr/lib/ +endef + +define Package/dmalloc-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dmalloc $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libdmalloc)) +$(eval $(call BuildPackage,dmalloc-utils)) diff --git a/devel/dmalloc/patches/100-configure_pagesize.patch b/devel/dmalloc/patches/100-configure_pagesize.patch new file mode 100644 index 0000000..0482d7a --- /dev/null +++ b/devel/dmalloc/patches/100-configure_pagesize.patch @@ -0,0 +1,44 @@ +--- a/configure ++++ b/configure +@@ -857,6 +857,11 @@ Optional Features: + --enable-threads build in thread support (disabled by default) + --enable-shlib build shared libraries (disabled by default) + ++Optional Packages: ++ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] ++ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ++ --with-pagesize=nbits log base 2 of machine page size ++ + Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags +@@ -5307,6 +5312,14 @@ done + echo "$as_me:$LINENO: checking basic-block size" >&5 + echo $ECHO_N "checking basic-block size... $ECHO_C" >&6 + ac_cv_page_size=0 ++ ++# Check whether --with-pagesize or --without-pagesize was given. ++if test "${with_pagesize+set}" = set; then ++ withval="$with_pagesize" ++ case "$withval" in ?|1?) ac_cv_page_size=$withval; esac ++else ++ : # default to probing, set above ++fi; + if test $ac_cv_page_size = 0; then + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +--- a/configure.ac ++++ b/configure.ac +@@ -349,6 +349,12 @@ AC_MSG_RESULT([$ac_cv_use_mmap]) + AC_CHECK_FUNCS(getpagesize) + AC_MSG_CHECKING([basic-block size]) + ac_cv_page_size=0 ++AC_ARG_WITH(pagesize, ++ [ AC_HELP_STRING([--with-pagesize=nbits], ++ [log base 2 of machine page size] ) ], ++ [ case "$withval" in ?|1?) ac_cv_page_size=$withval; esac ], ++ [ : # default to probing, set above ], ++) + if test $ac_cv_page_size = 0; then + AC_RUN_IFELSE([main() { if (getpagesize()<=2048) exit(0); else exit(1); }], + [ ac_cv_page_size=11 ] ) diff --git a/devel/dmalloc/patches/110-configure_cxx.patch b/devel/dmalloc/patches/110-configure_cxx.patch new file mode 100644 index 0000000..4a2e8d7 --- /dev/null +++ b/devel/dmalloc/patches/110-configure_cxx.patch @@ -0,0 +1,38 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -56,10 +56,11 @@ AC_PROG_CC + AC_PROG_CXX + + # see if we actually have a CXX program +-if test "$ac_cv_prog_CXX" = "" -o ! -x "$ac_cv_prog_CXX"; then +- AC_MSG_WARN(could not find C++ compiler $ac_cv_prog_CXX) +- enable_cxx=no +-fi ++# FIXME: always returns no ++#if test "$ac_cv_prog_CXX" = "" -o ! -x "$ac_cv_prog_CXX"; then ++# AC_MSG_WARN(could not find C++ compiler $ac_cv_prog_CXX) ++# enable_cxx=no ++#fi + + # hopefully we have a stdc c-compiler + if test "$ac_cv_prog_cc_stdc" = "no" ; then +--- a/configure ++++ b/configure +@@ -2648,11 +2648,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + # see if we actually have a CXX program +-if test "$ac_cv_prog_CXX" = "" -o ! -x "$ac_cv_prog_CXX"; then +- { echo "$as_me:$LINENO: WARNING: could not find C++ compiler $ac_cv_prog_CXX" >&5 +-echo "$as_me: WARNING: could not find C++ compiler $ac_cv_prog_CXX" >&2;} +- enable_cxx=no +-fi ++# FIXME: always returns no ++#if test "$ac_cv_prog_CXX" = "" -o ! -x "$ac_cv_prog_CXX"; then ++# { echo "$as_me:$LINENO: WARNING: could not find C++ compiler $ac_cv_prog_CXX" >&5 ++#echo "$as_me: WARNING: could not find C++ compiler $ac_cv_prog_CXX" >&2;} ++# enable_cxx=no ++#fi + + # hopefully we have a stdc c-compiler + if test "$ac_cv_prog_cc_stdc" = "no" ; then diff --git a/devel/dmalloc/patches/120-makefile_shared.patch b/devel/dmalloc/patches/120-makefile_shared.patch new file mode 100644 index 0000000..1fd6ae4 --- /dev/null +++ b/devel/dmalloc/patches/120-makefile_shared.patch @@ -0,0 +1,305 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -41,7 +41,7 @@ LIBRARY = lib$(MODULE).a + + # thread version of the library + LIB_TH = lib$(MODULE)th.a +-LIB_TH_SL = lib$(MODULE)th.@shlibext@ ++LIB_TH_SL = lib$(MODULE)th.@shlibext@.5.5.2 + @TH_ON@BUILD_ALL_1 = threads + @TH_ON@INSTALL_LIB_1 = installth + @SL_ON@BUILD_THREADS_1 = $(LIB_TH_SL) +@@ -50,8 +50,8 @@ LIB_TH_SL = lib$(MODULE)th.@shlibext@ + @TH_ON@@SL_ON@INSTALL_LIB_2 = installthsl + + # C++ version of the library +-LIB_CXX = lib$(MODULE)xx.a +-LIB_CXX_SL = lib$(MODULE)xx.@shlibext@ ++LIB_CXX = lib$(MODULE)cxx.a ++LIB_CXX_SL = lib$(MODULE)cxx.@shlibext@.5.5.2 + @CXX_ON@BUILD_ALL_3 = $(LIB_CXX) + @CXX_ON@INSTALL_LIB_3 = installcxx + @SL_ON@BUILD_CXX_3 = $(LIB_CXX_SL) +@@ -61,7 +61,7 @@ LIB_CXX_SL = lib$(MODULE)xx.@shlibext@ + + # threads + C++ + LIB_TH_CXX = lib$(MODULE)thcxx.a +-LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@ ++LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@.5.5.2 + @TH_ON@@CXX_ON@BUILD_ALL_5 = $(LIB_TH_CXX) + @TH_ON@@CXX_ON@INSTALL_LIB_5 = installthcxx + @TH_ON@BUILD_CXX_5 = $(LIB_TH_CXX) +@@ -76,7 +76,7 @@ LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlib + @CXX_ON@@SL_ON@INSTALL_THREADS_6 = installthcxxsl + + # shared versions of the libraries +-LIB_SL = lib$(MODULE).@shlibext@ ++LIB_SL = lib$(MODULE).@shlibext@.5.5.2 + @SL_ON@BUILD_ALL_7 = $(LIB_SL) + @SL_ON@INSTALL_LIB_7 = installsl + @SL_ON@BUILD_TH_CXX_7 = $(LIB_TH_CXX_SL) +@@ -145,9 +145,13 @@ SHELL = /bin/sh + + HFLS = dmalloc.h + OBJS = arg_check.o compat.o dmalloc_rand.o dmalloc_tab.o env.o heap.o ++OBJS_SL = arg_check_sl.o compat_sl.o dmalloc_rand_sl.o dmalloc_tab_sl.o env_sl.o heap_sl.o + NORMAL_OBJS = chunk.o error.o malloc.o ++NORMAL_OBJS_SL = chunk_sl.o error_sl.o malloc_sl.o + THREAD_OBJS = chunk_th.o error_th.o malloc_th.o ++THREAD_OBJS_SL = chunk_th_sl.o error_th_sl.o malloc_th_sl.o + CXX_OBJS = dmallocc.o ++CXX_OBJS_SL = dmallocc_sl.o + + CFLAGS = $(CCFLAGS) + TEST = $(MODULE)_t +@@ -160,9 +164,9 @@ all : $(BUILD_ALL) + + clean : + rm -f $(A_OUT) core *.o *.t +- rm -f $(LIBRARY) $(LIB_TH) $(LIB_CXX) $(LIB_TH_CXX) $(TEST) $(TEST_FC) +- rm -f $(LIB_TH_SL) $(LIB_CXX_SL) $(LIB_TH_CXX_SL) $(LIB_SL) ++ rm -f $(TEST) $(TEST_FC) + rm -f $(UTIL) dmalloc.h ++ rm -f lib$(MODULE)*.* + + realclean : clean + +@@ -181,43 +185,43 @@ installincs : $(HFLS) + $(INSTALL_DATA) $(HFLS) $(includedir) + + installthsl : $(LIB_TH_SL) +- $(srcdir)/mkinstalldirs $(libdir) +- $(INSTALL_PROGRAM) $(LIB_TH_SL) $(libdir) ++ $(srcdir)/mkinstalldirs $(shlibdir) ++ $(INSTALL) $(LIB_TH_SL) $(shlibdir) + + installth : $(INSTALL_THREADS) + $(srcdir)/mkinstalldirs $(libdir) +- $(INSTALL_PROGRAM) $(LIB_TH) $(libdir) ++ $(INSTALL) $(LIB_TH) $(libdir) + @CXX_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library" + @SL_OFF@ @echo "Enter 'make installthsl' to install the threaded shared-library" + + installthcxxsl : $(LIB_TH_CXX_SL) + $(srcdir)/mkinstalldirs $(shlibdir) +- $(INSTALL_PROGRAM) $(LIB_TH_CXX_SL) $(shlibdir) ++ $(INSTALL) $(LIB_TH_CXX_SL) $(shlibdir) + + installthcxx : $(INSTALL_TH_CXX) + $(srcdir)/mkinstalldirs $(libdir) +- $(INSTALL_PROGRAM) $(LIB_TH_CXX) $(libdir) ++ $(INSTALL) $(LIB_TH_CXX) $(libdir) + @SL_OFF@ @echo "Enter 'make installthcxxsl' to install the threaded C++ shared-library" + + installcxxsl : $(LIB_CXX_SL) +- $(srcdir)/mkinstalldirs $(libdir) +- $(INSTALL_PROGRAM) $(LIB_CXX_SL) $(libdir) ++ $(srcdir)/mkinstalldirs $(shlibdir) ++ $(INSTALL) $(LIB_CXX_SL) $(shlibdir) + + installcxx : $(INSTALL_CXX) + $(srcdir)/mkinstalldirs $(libdir) +- $(INSTALL_PROGRAM) $(LIB_CXX) $(libdir) ++ $(INSTALL) $(LIB_CXX) $(libdir) + @TH_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library" + @SL_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library" + + installsl : $(LIB_SL) + $(srcdir)/mkinstalldirs $(shlibdir) +- $(INSTALL_PROGRAM) $(LIB_SL) $(shlibdir) ++ $(INSTALL) $(LIB_SL) $(shlibdir) + @CXX_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library" + @TH_OFF@ @echo "Enter 'make installthsl' to install thread shared-library" + + installlib : $(INSTALL_LIB) + $(srcdir)/mkinstalldirs $(libdir) +- $(INSTALL_PROGRAM) $(LIBRARY) $(libdir) ++ $(INSTALL) $(LIBRARY) $(libdir) + @RANLIB@ $(libdir)/$(LIBRARY) + @SL_OFF@ @echo "Enter 'make installsl' to install $(LIB_SL) in $(shlibdir)" + @CXX_OFF@ @echo "Enter 'make installcxx' to install the C++ library" +@@ -255,10 +259,8 @@ shlib : $(BUILD_SL) + # NOTE: you may have to edit the configure.ac script to get this to + # work on your operating system. Please send feedback to the author + # via: http://256.com/gray/email.html +-$(LIB_SL) : $(LIBRARY) +- rm -f $@ $@.t +- @shlinkargs@ $(LIBRARY) $(OBJS) $(NORMAL_OBJS) +- mv $@.t $@ ++$(LIB_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL) ++ $(CC) -shared -Wl,-soname,libdmalloc.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) + + $(LIBRARY) : $(OBJS) $(NORMAL_OBJS) + ar cr $@ $? +@@ -268,32 +270,26 @@ $(LIB_TH) : $(OBJS) $(THREAD_OBJS) + ar cr $@ $? + @RANLIB@ $@ + +-$(LIB_TH_SL) : $(LIB_TH) +- rm -f $@ $@.t +- @shlinkargs@ $(LIB_TH) $(OBJS) $(THREAD_OBJS) +- mv $@.t $@ ++$(LIB_TH_SL) : $(OBJS_SL) $(THREAD_OBJS_SL) ++ $(CC) -shared -Wl,-soname,libdmallocth.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL) + + $(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS) + ar cr $@ $? + @RANLIB@ $@ + +-$(LIB_CXX_SL) : $(LIB_CXX) +- rm -f $@ $@.t +- @shlinkargs@ $(LIB_CXX) $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS) +- mv $@.t $@ ++$(LIB_CXX_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL) ++ $(CC) -shared -Wl,-soname,libdmalloccxx.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL) + + $(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $(CXX_OBJS) + ar cr $@ $? + @RANLIB@ $@ + +-$(LIB_TH_CXX_SL) : $(LIB_TH_CXX) +- rm -f $@ $@.t +- @shlinkargs@ $(LIB_TH_CXX) $(OBJS) $(THREAD_OBJS) $(CXX_OBJS) +- mv $@.t $@ ++$(LIB_TH_CXX_SL) : $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL) ++ $(CC) -shared -Wl,-soname,libdmallocthcxx.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL) + +-threadssl : $(LIB_TH_SL) ++threadssl : $(LIB_TH_SL)$(ver) + +-threadscxxsl : $(LIB_TH_CXX_SL) ++threadscxxsl : $(LIB_TH_CXX_SL)$(ver) + + threadscxx : $(BUILD_TH_CXX) + @SL_OFF@ @echo "Enter 'make threadscxxsl' to build the threaded C++ shared-library" +@@ -302,7 +298,7 @@ threads : $(BUILD_THREADS) + @CXX_OFF@ @echo "Enter 'make threadscxx' to build the threaded C++ library" + @SL_OFF@ @echo "Enter 'make threadssl' to build the threaded shared library" + +-cxxsl : $(LIB_CXX_SL) ++cxxsl : $(LIB_CXX_SL)$(ver) + + cxx : $(BUILD_CXX) + @SL_OFF@ @echo "Enter 'make cxxsl' to build the cxx shared library" +@@ -371,6 +367,11 @@ dmallocc.o : $(srcdir)/dmallocc.cc + $(CXX) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \ + -o ./$@ + ++dmallocc_sl.o : $(srcdir)/dmallocc.cc ++ rm -f $@ ++ $(CXX) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \ ++ -o ./$@ ++ + # + # auto configure settings - uncomment if you are doing configure + # development on the library +@@ -395,38 +396,109 @@ dmallocc.o : $(srcdir)/dmallocc.cc + + arg_check.o: arg_check.c conf.h settings.h dmalloc.h chunk.h debug_tok.h \ + dmalloc_loc.h error.h arg_check.h ++arg_check_sl.o: arg_check.c conf.h settings.h dmalloc.h chunk.h debug_tok.h \ ++ dmalloc_loc.h error.h arg_check.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + chunk.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \ + dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \ + error_val.h heap.h ++chunk_sl.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \ ++ dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \ ++ error_val.h heap.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + compat.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h ++compat_sl.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + dmalloc.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h compat.h \ + debug_tok.h dmalloc_loc.h env.h error_val.h version.h ++dmalloc_sl.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h compat.h \ ++ debug_tok.h dmalloc_loc.h env.h error_val.h version.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + dmalloc_argv.o: dmalloc_argv.c conf.h settings.h dmalloc_argv.h \ + dmalloc_argv_loc.h compat.h ++dmalloc_argv_sl.o: dmalloc_argv.c conf.h settings.h dmalloc_argv.h \ ++ dmalloc_argv_loc.h compat.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + dmalloc_fc_t.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \ + dmalloc_rand.h debug_tok.h dmalloc_loc.h error_val.h ++dmalloc_fc_t_sl.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \ ++ dmalloc_rand.h debug_tok.h dmalloc_loc.h error_val.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + dmalloc_rand.o: dmalloc_rand.c dmalloc_rand.h ++dmalloc_rand_sl.o: dmalloc_rand.c dmalloc_rand.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + dmalloc_t.o: dmalloc_t.c conf.h settings.h compat.h dmalloc.h \ + dmalloc_argv.h dmalloc_rand.h arg_check.h debug_tok.h dmalloc_loc.h \ + error_val.h heap.h ++dmalloc_t_sl.o: dmalloc_t.c conf.h settings.h compat.h dmalloc.h \ ++ dmalloc_argv.h dmalloc_rand.h arg_check.h debug_tok.h dmalloc_loc.h \ ++ error_val.h heap.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + dmalloc_tab.o: dmalloc_tab.c conf.h settings.h chunk.h compat.h dmalloc.h \ + dmalloc_loc.h error.h error_val.h dmalloc_tab.h dmalloc_tab_loc.h ++dmalloc_tab_sl.o: dmalloc_tab.c conf.h settings.h chunk.h compat.h dmalloc.h \ ++ dmalloc_loc.h error.h error_val.h dmalloc_tab.h dmalloc_tab_loc.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + env.o: env.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h \ + debug_tok.h env.h error.h ++env_sl.o: env.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h \ ++ debug_tok.h env.h error.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + error.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \ + dmalloc_loc.h env.h error.h error_val.h version.h ++error_sl.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \ ++ dmalloc_loc.h env.h error.h error_val.h version.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + heap.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \ + dmalloc_loc.h error.h error_val.h heap.h ++heap_sl.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \ ++ dmalloc_loc.h error.h error_val.h heap.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + malloc.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \ + debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \ + malloc_funcs.h return.h ++malloc_sl.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \ ++ debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \ ++ malloc_funcs.h return.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + protect.o: protect.c conf.h settings.h dmalloc.h dmalloc_loc.h error.h \ + heap.h protect.h ++protect_sl.o: protect.c conf.h settings.h dmalloc.h dmalloc_loc.h error.h \ ++ heap.h protect.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + chunk_th.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \ + dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \ + error_val.h heap.h ++chunk_th_sl.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \ ++ dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \ ++ error_val.h heap.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + error_th.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \ + dmalloc_loc.h env.h error.h error_val.h version.h ++error_th_sl.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \ ++ dmalloc_loc.h env.h error.h error_val.h version.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + malloc_th.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \ + debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \ + malloc_funcs.h return.h ++malloc_th_sl.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \ ++ debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \ ++ malloc_funcs.h return.h ++ rm -f $@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ diff --git a/devel/dmalloc/patches/130-makefile_destdir.patch b/devel/dmalloc/patches/130-makefile_destdir.patch new file mode 100644 index 0000000..88a2da9 --- /dev/null +++ b/devel/dmalloc/patches/130-makefile_destdir.patch @@ -0,0 +1,97 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -178,66 +178,66 @@ distclean : clean + # rm -f configure + + installdirs : +- $(srcdir)/mkinstalldirs $(includedir) $(libdir) $(bindir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(includedir) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) + + installincs : $(HFLS) +- $(srcdir)/mkinstalldirs $(includedir) +- $(INSTALL_DATA) $(HFLS) $(includedir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(includedir) ++ $(INSTALL_DATA) $(HFLS) $(DESTDIR)$(includedir) + + installthsl : $(LIB_TH_SL) +- $(srcdir)/mkinstalldirs $(shlibdir) +- $(INSTALL) $(LIB_TH_SL) $(shlibdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir) ++ $(INSTALL) $(LIB_TH_SL) $(DESTDIR)$(shlibdir) + + installth : $(INSTALL_THREADS) +- $(srcdir)/mkinstalldirs $(libdir) +- $(INSTALL) $(LIB_TH) $(libdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) ++ $(INSTALL) $(LIB_TH) $(DESTDIR)$(libdir) + @CXX_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library" + @SL_OFF@ @echo "Enter 'make installthsl' to install the threaded shared-library" + + installthcxxsl : $(LIB_TH_CXX_SL) +- $(srcdir)/mkinstalldirs $(shlibdir) +- $(INSTALL) $(LIB_TH_CXX_SL) $(shlibdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir) ++ $(INSTALL) $(LIB_TH_CXX_SL) $(DESTDIR)$(shlibdir) + + installthcxx : $(INSTALL_TH_CXX) +- $(srcdir)/mkinstalldirs $(libdir) +- $(INSTALL) $(LIB_TH_CXX) $(libdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) ++ $(INSTALL) $(LIB_TH_CXX) $(DESTDIR)$(libdir) + @SL_OFF@ @echo "Enter 'make installthcxxsl' to install the threaded C++ shared-library" + + installcxxsl : $(LIB_CXX_SL) +- $(srcdir)/mkinstalldirs $(shlibdir) +- $(INSTALL) $(LIB_CXX_SL) $(shlibdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir) ++ $(INSTALL) $(LIB_CXX_SL) $(DESTDIR)$(shlibdir) + + installcxx : $(INSTALL_CXX) +- $(srcdir)/mkinstalldirs $(libdir) +- $(INSTALL) $(LIB_CXX) $(libdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) ++ $(INSTALL) $(LIB_CXX) $(DESTDIR)$(libdir) + @TH_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library" + @SL_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library" + + installsl : $(LIB_SL) +- $(srcdir)/mkinstalldirs $(shlibdir) +- $(INSTALL) $(LIB_SL) $(shlibdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir) ++ $(INSTALL) $(LIB_SL) $(DESTDIR)$(shlibdir) + @CXX_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library" + @TH_OFF@ @echo "Enter 'make installthsl' to install thread shared-library" + + installlib : $(INSTALL_LIB) +- $(srcdir)/mkinstalldirs $(libdir) +- $(INSTALL) $(LIBRARY) $(libdir) +- @RANLIB@ $(libdir)/$(LIBRARY) +-@SL_OFF@ @echo "Enter 'make installsl' to install $(LIB_SL) in $(shlibdir)" ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) ++ $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir) ++ @RANLIB@ $(DESTDIR)$(libdir)/$(LIBRARY) ++@SL_OFF@ @echo "Enter 'make installsl' to install $(LIB_SL) in $(DESTDIR)$(shlibdir)" + @CXX_OFF@ @echo "Enter 'make installcxx' to install the C++ library" + @TH_OFF@ @echo "Enter 'make installth' to install thread library" + + installdocs : $(srcdir)/docs/$(HTMLFILE) $(srcdir)/docs/$(TEXIFILE) \ + $(srcdir)/docs/$(PDFFILE) +- $(srcdir)/mkinstalldirs $(docdir) +- $(INSTALL_DATA) $(srcdir)/docs/$(HTMLFILE) $(docdir) +- $(INSTALL_DATA) $(srcdir)/docs/$(TEXIFILE) $(docdir) +- $(INSTALL_DATA) $(srcdir)/docs/$(PDFFILE) $(docdir) ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(docdir) ++ $(INSTALL_DATA) $(srcdir)/docs/$(HTMLFILE) $(DESTDIR)$(docdir) ++ $(INSTALL_DATA) $(srcdir)/docs/$(TEXIFILE) $(DESTDIR)$(docdir) ++ $(INSTALL_DATA) $(srcdir)/docs/$(PDFFILE) $(DESTDIR)$(docdir) + + install : installincs installlib $(UTIL) +- $(srcdir)/mkinstalldirs $(bindir) +- $(INSTALL_PROGRAM) $(UTIL) $(bindir) +- @echo "Enter 'make installdocs' to install $(DOCFILES) in $(docdir)" ++ $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) ++ $(INSTALL_PROGRAM) $(UTIL) $(DESTDIR)$(bindir) ++ @echo "Enter 'make installdocs' to install $(DOCFILES) in $(DESTDIR)$(docdir)" + + dmalloc.h.2 : $(srcdir)/configure + $(SHELL) $(srcdir)/configure diff --git a/devel/dmalloc/patches/200-fix_return_address.patch b/devel/dmalloc/patches/200-fix_return_address.patch new file mode 100644 index 0000000..0fb35e4 --- /dev/null +++ b/devel/dmalloc/patches/200-fix_return_address.patch @@ -0,0 +1,45 @@ +--- a/configure ++++ b/configure +@@ -7120,7 +7120,7 @@ echo "$as_me:$LINENO: checking return.h + echo $ECHO_N "checking return.h macros work... $ECHO_C" >&6 + if test "$cross_compiling" = yes; then + cat >>confdefs.h <<\_ACEOF +-#define RETURN_MACROS_WORK 0 ++#define RETURN_MACROS_WORK 1 + _ACEOF + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 +--- a/return.h ++++ b/return.h +@@ -106,25 +106,19 @@ + /*************************************/ + + /* +- * For DEC Mips machines running Ultrix ++ * For Mips machines running Linux + */ + #if __mips + + /* +- * I have no idea how to get inline assembly with the default cc. +- * Anyone know how? +- */ +- +-#if 0 +- +-/* + * NOTE: we assume here that file is global. + * +- * $31 is the frame pointer. $2 looks to be the return address but maybe +- * not consistently. ++ * $31 is the return address. + */ +-#define GET_RET_ADDR(file) asm("sw $2, file") +- ++#if (_MIPS_SZLONG == 32) ++#define GET_RET_ADDR(file) asm("sw $31, %0" : "=m" (file)) ++#else ++#define GET_RET_ADDR(file) asm("sd $31, %0" : "=m" (file)) + #endif + + #endif /* __mips */ diff --git a/devel/dmalloc/patches/210-fix_threads.patch b/devel/dmalloc/patches/210-fix_threads.patch new file mode 100644 index 0000000..c3cbd90 --- /dev/null +++ b/devel/dmalloc/patches/210-fix_threads.patch @@ -0,0 +1,11 @@ +--- a/settings.dist ++++ b/settings.dist +@@ -409,7 +409,7 @@ + */ + + #ifndef LOCK_THREADS +-#define LOCK_THREADS 0 ++#define LOCK_THREADS 1 + #endif + + #if LOCK_THREADS diff --git a/devel/dmalloc/patches/300-fix_summarize_script.patch b/devel/dmalloc/patches/300-fix_summarize_script.patch new file mode 100644 index 0000000..d50106d --- /dev/null +++ b/devel/dmalloc/patches/300-fix_summarize_script.patch @@ -0,0 +1,8 @@ +--- a/contrib/dmalloc_summarize.pl ++++ b/contrib/dmalloc_summarize.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl5 -w ++#!/usr/bin/perl -w + # + # dmalloc_summarize -- summarizes dmalloc log files + # diff --git a/devel/gcc/Makefile b/devel/gcc/Makefile new file mode 100644 index 0000000..90ef1d9 --- /dev/null +++ b/devel/gcc/Makefile @@ -0,0 +1,90 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk +PKG_NAME:=gcc +PKG_VERSION:=$(strip $(subst ",, $(CONFIG_GCC_VERSION)))#")) +PKG_RELEASE:=1 +PATCH_DIR=$(TOPDIR)/toolchain/gcc/patches/$(PKG_VERSION) +PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(PKG_VERSION) \ + http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(PKG_VERSION) \ + ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(PKG_VERSION) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=354853e0b2da90c527e35aabb8d6f1e6 + +include $(INCLUDE_DIR)/package.mk + +SEP:=, +TARGET_LANGUAGES:="c$(if $(CONFIG_INSTALL_LIBSTDCPP),$(SEP)c++)$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)" +EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-biarch --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-uclibc) + +define Package/gcc + SECTION:=devel + CATEGORY:=Development + TITLE:=gcc + DEPENDS:=@TARGET_x86 @NO_STRIP +endef + +define Package/gcc/description + build a native toolchain for compiling on target +endef + +define Build/Prepare + $(call Build/Prepare/Default) + $(SED) 's,\(version_string.. = "[0-9\.]*\).*\(";\),\1 (OpenWrt-2.0)\2,' $(PKG_BUILD_DIR)/gcc/version.c + $(SED) 's,\(bug_report_url.. = "\).*\(";\),\1\2,' $(PKG_BUILD_DIR)/gcc/version.c + (cd $(PKG_BUILD_DIR)/libstdc++-v3; autoconf;); + $(SED) 's,gcc_no_link=yes,gcc_no_link=no,' $(PKG_BUILD_DIR)/libstdc++-v3/configure +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); rm -f config.cache; \ + SHELL="$(BASH)" \ + $(TARGET_CONFIGURE_OPTS) \ + $(PKG_BUILD_DIR)/configure \ + $(TARGET_CONFIGURE_ARGS) \ + --build=$(GNU_HOST_NAME) \ + --host=$(REAL_GNU_TARGET_NAME) \ + --target=$(REAL_GNU_TARGET_NAME) \ + --enable-languages=$(TARGET_LANGUAGES) \ + --enable-shared \ + --disable-__cxa_atexit \ + --enable-target-optspace \ + --with-gnu-ld \ + --disable-nls \ + --disable-libmudflap \ + --disable-multilib \ + $(EXTRA_TARGET) \ + $(SOFT_FLOAT_CONFIG_OPTION) \ + $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ + ); +endef + +define Build/Compile + export SHELL="$(BASH)"; $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE_ARGS) all install + # Set up the symlinks to enable lying about target name. + set -e; \ + (cd $(TOOLCHAIN_DIR); \ + ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \ + cd bin; \ + for app in $(REAL_GNU_TARGET_NAME)-* ; do \ + ln -sf $$$${app} \ + $(GNU_TARGET_NAME)$$$${app##$(REAL_GNU_TARGET_NAME)}; \ + done; \ + ); +endef + +define Package/gcc/install + $(INSTALL_DIR) $(1)/usr/lib/ + cp -r $(PKG_INSTALL_DIR)/* $(1) + cp -r $(TOOLCHAIN_DIR)/include $(1)/usr/ + cp $(TOOLCHAIN_DIR)/lib/crt* $(1)/usr/lib/ + cp $(TOOLCHAIN_DIR)/lib/libc.so $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,gcc)) diff --git a/devel/ksymoops/Makefile b/devel/ksymoops/Makefile new file mode 100644 index 0000000..446fbc2 --- /dev/null +++ b/devel/ksymoops/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=ksymoops +PKG_VERSION:=2.4.11 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/ksymoops/v2.4/ +PKG_MD5SUM:=4a8249e182a5dbc75e566d162e9f3314 + +PKG_BUILD_DEPENDS:=binutils + +include $(INCLUDE_DIR)/package.mk + +define Package/ksymoops + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@!LINUX_2_4 @mips||mipsel||m68k||i386 + TITLE:=Interpret oops of the kernel + URL:=http://www.kernel.org/pub/linux/utils/kernel/ksymoops/v2.4/ + MENU:=1 +endef + +define Package/kexec-tools/description +endef + +define Build/Configure +endef + +TARGET=$(strip $(shell echo $(TARGET_CFLAGS) | cut -d- -f4 | cut -d= -f2)) + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + BFD_PREFIX="$(STAGING_DIR)/usr" \ + DEF_TARGET='\"$(TARGET)\"' \ + DEF_ARCH='\"$(ARCH)\"' \ + DEF_MAP='\"$(LINUX_DIR)/System.map\"' \ + CROSS="$(TARGET_CROSS)" \ + INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Package/ksymoops/install + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/$(TARGET_CROSS)ksymoops $(1)/bin/ksymoops +endef + +$(eval $(call BuildPackage,ksymoops)) diff --git a/devel/make/Makefile b/devel/make/Makefile new file mode 100644 index 0000000..b93220f --- /dev/null +++ b/devel/make/Makefile @@ -0,0 +1,36 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=make +PKG_VERSION:=3.81 +PKG_RELEASE:=1 +PKG_SOURCE_URL:=@GNU/make +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=354853e0b2da90c527e35aabb8d6f1e6 +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/make + SECTION:=devel + CATEGORY:=Development + TITLE:=make + URL:=http://www.gnu.org/software/make/ +endef + +define Package/make/description + The Make package contains a program for compiling packages +endef + +define Package/make/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/make $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,make)) diff --git a/devel/oprofile/Makefile b/devel/oprofile/Makefile new file mode 100644 index 0000000..d8de542 --- /dev/null +++ b/devel/oprofile/Makefile @@ -0,0 +1,87 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=oprofile +PKG_VERSION:=0.9.4 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/oprofile/ +PKG_MD5SUM:=82b059379895cf125261d7d773465915 + +PKG_BUILD_DEPENDS:=binutils +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk + +define Package/oprofile + SECTION:=devel + CATEGORY:=Development + TITLE:=OProfile System Profiler + URL:=http://oprofile.sourceforge.net + DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump +endef + +define Package/oprofile/description + A transparent low-overhead system-wide profiler. +endef + +define Package/oprofile-utils + SECTION:=devel + CATEGORY:=Development + TITLE:=OProfile System Profiler (extra utilities) + URL:=http://oprofile.sourceforge.net + DEPENDS:=oprofile +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --with-kernel-support \ + --without-x \ + ) +endef + +TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS) + +define Package/oprofile-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/opannotate \ + $(PKG_INSTALL_DIR)/usr/bin/oparchive \ + $(PKG_INSTALL_DIR)/usr/bin/opgprof \ + $(1)/usr/bin +endef + +define Package/oprofile/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(1)/usr/bin + + rm -f \ + $(1)/usr/bin/opannotate \ + $(1)/usr/bin/oparchive \ + $(1)/usr/bin/opgprof + + $(INSTALL_DIR) $(1)/usr/lib/oprofile + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \ + $(1)/usr/lib/oprofile/ + + $(INSTALL_DIR) $(1)/usr/share/oprofile + $(CP) \ + $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \ + $(PKG_INSTALL_DIR)/usr/share/oprofile/$(LINUX_KARCH) \ + $(1)/usr/share/oprofile/ +endef + +$(eval $(call BuildPackage,oprofile)) +$(eval $(call BuildPackage,oprofile-utils)) diff --git a/devel/oprofile/patches/100-use_insmod_instead_of_modprobe.patch b/devel/oprofile/patches/100-use_insmod_instead_of_modprobe.patch new file mode 100644 index 0000000..c55dbce --- /dev/null +++ b/devel/oprofile/patches/100-use_insmod_instead_of_modprobe.patch @@ -0,0 +1,22 @@ +diff --git a/utils/opcontrol b/utils/opcontrol +index ce53010..60a7e64 100644 +--- a/utils/opcontrol ++++ b/utils/opcontrol +@@ -170,7 +170,7 @@ load_module_26() + { + grep oprofilefs /proc/filesystems >/dev/null + if test "$?" -ne 0; then +- modprobe oprofile ++ insmod oprofile + if test "$?" != "0"; then + # couldn't load the module + return +@@ -200,7 +200,7 @@ load_module_24() + { + grep oprof /proc/devices >/dev/null + if test "$?" -ne 0; then +- modprobe oprofile ++ insmod oprofile + if test "$?" != "0"; then + # couldn't load a module + return diff --git a/devel/oprofile/patches/101-remove_24_support.patch b/devel/oprofile/patches/101-remove_24_support.patch new file mode 100644 index 0000000..5867520 --- /dev/null +++ b/devel/oprofile/patches/101-remove_24_support.patch @@ -0,0 +1,67 @@ +diff -urN oprofile-0.9.4/daemon/Makefile.am oprofile-0.9.4.new/daemon/Makefile.am +--- oprofile-0.9.4/daemon/Makefile.am 2008-04-28 23:23:24.000000000 +0200 ++++ oprofile-0.9.4.new/daemon/Makefile.am 2009-07-26 15:23:23.000000000 +0200 +@@ -1,4 +1,4 @@ +-SUBDIRS = liblegacy . ++SUBDIRS = . + + oprofiled_SOURCES = \ + init.c \ +@@ -42,7 +42,6 @@ + bin_PROGRAMS = oprofiled + + oprofiled_LDADD = \ +- liblegacy/liblegacy.a \ + ../libabi/libabi.a \ + ../libdb/libodb.a \ + ../libop/libop.a \ +diff -urN oprofile-0.9.4/daemon/Makefile.in oprofile-0.9.4.new/daemon/Makefile.in +--- oprofile-0.9.4/daemon/Makefile.in 2008-07-18 01:14:44.000000000 +0200 ++++ oprofile-0.9.4.new/daemon/Makefile.in 2009-07-26 15:23:14.000000000 +0200 +@@ -68,7 +68,7 @@ + opd_events.$(OBJEXT) opd_mangling.$(OBJEXT) \ + opd_perfmon.$(OBJEXT) opd_anon.$(OBJEXT) opd_spu.$(OBJEXT) + oprofiled_OBJECTS = $(am_oprofiled_OBJECTS) +-oprofiled_DEPENDENCIES = liblegacy/liblegacy.a ../libabi/libabi.a \ ++oprofiled_DEPENDENCIES = ../libabi/libabi.a \ + ../libdb/libodb.a ../libop/libop.a ../libutil/libutil.a + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/depcomp +@@ -240,7 +240,7 @@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ + topdir = @topdir@ +-SUBDIRS = liblegacy . ++SUBDIRS = . + oprofiled_SOURCES = \ + init.c \ + oprofiled.c \ +@@ -279,7 +279,6 @@ + # -fno-omit-frame-pointer needed for daemon build: see ChangeLog-2004 02-23 + AM_CFLAGS = @OP_CFLAGS@ -fno-omit-frame-pointer + oprofiled_LDADD = \ +- liblegacy/liblegacy.a \ + ../libabi/libabi.a \ + ../libdb/libodb.a \ + ../libop/libop.a \ +diff -urN oprofile-0.9.4/daemon/oprofiled.c oprofile-0.9.4.new/daemon/oprofiled.c +--- oprofile-0.9.4/daemon/oprofiled.c 2008-04-28 23:23:23.000000000 +0200 ++++ oprofile-0.9.4.new/daemon/oprofiled.c 2009-07-26 15:25:25.000000000 +0200 +@@ -73,7 +73,6 @@ + static char * events; + static int showvers; + static struct oprofiled_ops * opd_ops; +-extern struct oprofiled_ops opd_24_ops; + extern struct oprofiled_ops opd_26_ops; + + #define OPD_IMAGE_FILTER_HASH_SIZE 32 +@@ -465,9 +464,6 @@ + static struct oprofiled_ops * get_ops(void) + { + switch (op_get_interface()) { +- case OP_INTERFACE_24: +- printf("Using 2.4 OProfile kernel interface.\n"); +- return &opd_24_ops; + case OP_INTERFACE_26: + printf("Using 2.6+ OProfile kernel interface.\n"); + return &opd_26_ops; diff --git a/devel/oprofile/patches/200-rename-i386-to-x86.patch b/devel/oprofile/patches/200-rename-i386-to-x86.patch new file mode 100644 index 0000000..f85133a --- /dev/null +++ b/devel/oprofile/patches/200-rename-i386-to-x86.patch @@ -0,0 +1,65 @@ +diff -ruN oprofile-0.9.4.bak/events//Makefile.am oprofile-0.9.4/events//Makefile.am +--- oprofile-0.9.4.bak/events//Makefile.am 2008-02-22 17:17:48.000000000 +0100 ++++ oprofile-0.9.4/events//Makefile.am 2011-02-22 18:04:40.058491002 +0100 +@@ -4,15 +4,15 @@ + alpha/ev67/events alpha/ev67/unit_masks \ + alpha/ev6/events alpha/ev6/unit_masks \ + alpha/pca56/events alpha/pca56/unit_masks \ +- i386/athlon/events i386/athlon/unit_masks \ +- i386/core_2/events i386/core_2/unit_masks \ +- i386/p4/events i386/p4-ht/events \ +- i386/p4-ht/unit_masks i386/p4/unit_masks \ +- i386/pii/events i386/pii/unit_masks \ +- i386/piii/events i386/piii/unit_masks \ +- i386/ppro/events i386/ppro/unit_masks \ +- i386/p6_mobile/events i386/p6_mobile/unit_masks \ +- i386/core/events i386/core/unit_masks \ ++ x86/athlon/events x86/athlon/unit_masks \ ++ x86/core_2/events x86/core_2/unit_masks \ ++ x86/p4/events x86/p4-ht/events \ ++ x86/p4-ht/unit_masks x86/p4/unit_masks \ ++ x86/pii/events x86/pii/unit_masks \ ++ x86/piii/events x86/piii/unit_masks \ ++ x86/ppro/events x86/ppro/unit_masks \ ++ x86/p6_mobile/events x86/p6_mobile/unit_masks \ ++ x86/core/events x86/core/unit_masks \ + ia64/ia64/events ia64/ia64/unit_masks \ + ia64/itanium2/events ia64/itanium2/unit_masks \ + ia64/itanium/events ia64/itanium/unit_masks \ +diff -ruN oprofile-0.9.4.bak/events//Makefile.in oprofile-0.9.4/events//Makefile.in +--- oprofile-0.9.4.bak/events//Makefile.in 2008-07-18 01:14:45.000000000 +0200 ++++ oprofile-0.9.4/events//Makefile.in 2011-02-22 18:04:32.208491002 +0100 +@@ -213,15 +213,15 @@ + alpha/ev67/events alpha/ev67/unit_masks \ + alpha/ev6/events alpha/ev6/unit_masks \ + alpha/pca56/events alpha/pca56/unit_masks \ +- i386/athlon/events i386/athlon/unit_masks \ +- i386/core_2/events i386/core_2/unit_masks \ +- i386/p4/events i386/p4-ht/events \ +- i386/p4-ht/unit_masks i386/p4/unit_masks \ +- i386/pii/events i386/pii/unit_masks \ +- i386/piii/events i386/piii/unit_masks \ +- i386/ppro/events i386/ppro/unit_masks \ +- i386/p6_mobile/events i386/p6_mobile/unit_masks \ +- i386/core/events i386/core/unit_masks \ ++ x86/athlon/events x86/athlon/unit_masks \ ++ x86/core_2/events x86/core_2/unit_masks \ ++ x86/p4/events x86/p4-ht/events \ ++ x86/p4-ht/unit_masks x86/p4/unit_masks \ ++ x86/pii/events x86/pii/unit_masks \ ++ x86/piii/events x86/piii/unit_masks \ ++ x86/ppro/events x86/ppro/unit_masks \ ++ x86/p6_mobile/events x86/p6_mobile/unit_masks \ ++ x86/core/events x86/core/unit_masks \ + ia64/ia64/events ia64/ia64/unit_masks \ + ia64/itanium2/events ia64/itanium2/unit_masks \ + ia64/itanium/events ia64/itanium/unit_masks \ +@@ -310,7 +310,7 @@ + + + distdir: $(DISTFILES) +- $(mkdir_p) $(distdir)/alpha/ev4 $(distdir)/alpha/ev5 $(distdir)/alpha/ev6 $(distdir)/alpha/ev67 $(distdir)/alpha/pca56 $(distdir)/arm/armv6 $(distdir)/arm/mpcore $(distdir)/arm/xscale1 $(distdir)/arm/xscale2 $(distdir)/avr32 $(distdir)/i386/athlon $(distdir)/i386/core $(distdir)/i386/core_2 $(distdir)/i386/p4 $(distdir)/i386/p4-ht $(distdir)/i386/p6_mobile $(distdir)/i386/pii $(distdir)/i386/piii $(distdir)/i386/ppro $(distdir)/ia64/ia64 $(distdir)/ia64/itanium $(distdir)/ia64/itanium2 $(distdir)/mips/20K $(distdir)/mips/24K $(distdir)/mips/25K $(distdir)/mips/34K $(distdir)/mips/5K $(distdir)/mips/r10000 $(distdir)/mips/r12000 $(distdir)/mips/rm7000 $(distdir)/mips/rm9000 $(distdir)/mips/sb1 $(distdir)/mips/vr5432 $(distdir)/mips/vr5500 $(distdir)/ppc/7450 $(distdir)/ppc/e300 $(distdir)/ppc/e500 $(distdir)/ppc/e500v2 $(distdir)/ppc64/970 $(distdir)/ppc64/970MP $(distdir)/ppc64/cell-be $(distdir)/ppc64/pa6t $(distdir)/ppc64/power4 $(distdir)/ppc64/power5 $(distdir)/ppc64/power5+ $(distdir)/ppc64/power5++ $(distdir)/ppc64/power6 $(distdir)/rtc $(distdir)/x86-64/family10 $(distdir)/x86-64/hammer ++ $(mkdir_p) $(distdir)/alpha/ev4 $(distdir)/alpha/ev5 $(distdir)/alpha/ev6 $(distdir)/alpha/ev67 $(distdir)/alpha/pca56 $(distdir)/arm/armv6 $(distdir)/arm/mpcore $(distdir)/arm/xscale1 $(distdir)/arm/xscale2 $(distdir)/avr32 $(distdir)/x86/athlon $(distdir)/x86/core $(distdir)/x86/core_2 $(distdir)/x86/p4 $(distdir)/x86/p4-ht $(distdir)/x86/p6_mobile $(distdir)/x86/pii $(distdir)/x86/piii $(distdir)/x86/ppro $(distdir)/ia64/ia64 $(distdir)/ia64/itanium $(distdir)/ia64/itanium2 $(distdir)/mips/20K $(distdir)/mips/24K $(distdir)/mips/25K $(distdir)/mips/34K $(distdir)/mips/5K $(distdir)/mips/r10000 $(distdir)/mips/r12000 $(distdir)/mips/rm7000 $(distdir)/mips/rm9000 $(distdir)/mips/sb1 $(distdir)/mips/vr5432 $(distdir)/mips/vr5500 $(distdir)/ppc/7450 $(distdir)/ppc/e300 $(distdir)/ppc/e500 $(distdir)/ppc/e500v2 $(distdir)/ppc64/970 $(distdir)/ppc64/970MP $(distdir)/ppc64/cell-be $(distdir)/ppc64/pa6t $(distdir)/ppc64/power4 $(distdir)/ppc64/power5 $(distdir)/ppc64/power5+ $(distdir)/ppc64/power5++ $(distdir)/ppc64/power6 $(distdir)/rtc $(distdir)/x86-64/family10 $(distdir)/x86-64/hammer + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ diff --git a/devel/patch/Makefile b/devel/patch/Makefile new file mode 100644 index 0000000..fa3f14a --- /dev/null +++ b/devel/patch/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2008-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=patch +PKG_VERSION:=2.5.9 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@GNU/patch +PKG_MD5SUM:=dacfb618082f8d3a2194601193cf8716 + +include $(INCLUDE_DIR)/package.mk + +define Package/patch + SECTION:=devel + CATEGORY:=Development + TITLE:=patch + URL:=http://www.gnu.org/ +endef + +define Package/patch/description + The Patch package contains a program for modifying or creating files + by applying a "patch" file typically created by the diff program. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + exec_prefix="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Package/patch/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/bin/patch $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,patch)) diff --git a/devel/patch/patches/100-install.patch b/devel/patch/patches/100-install.patch new file mode 100644 index 0000000..8d34ba6 --- /dev/null +++ b/devel/patch/patches/100-install.patch @@ -0,0 +1,18 @@ +diff -urN patch-2.5.4.orig/Makefile.in patch-2.5.4/Makefile.in +--- patch-2.5.4.orig/Makefile.in 2008-06-11 10:08:08.000000000 +0200 ++++ patch-2.5.4/Makefile.in 2008-06-11 10:08:26.000000000 +0200 +@@ -42,12 +42,12 @@ + VERSION = @VERSION@ + + prefix = @prefix@ +-exec_prefix = @exec_prefix@ ++exec_prefix += @exec_prefix@ + + bindir = $(exec_prefix)/bin + + # Where to put the manual pages. +-mandir = @mandir@ ++mandir = $(exec_prefix)/@mandir@ + man1dir = $(mandir)/man1 + # Extension (including `.') for the manual page filenames. + man1ext = .1 diff --git a/ipv6/6scripts/Makefile b/ipv6/6scripts/Makefile new file mode 100644 index 0000000..0ae95e6 --- /dev/null +++ b/ipv6/6scripts/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=6scripts +PKG_VERSION:=0.1 +PKG_RELEASE:=6 + +include $(INCLUDE_DIR)/package.mk + +define Package/6scripts + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+kmod-ipv6 + TITLE:=IPv6 scripts + PKGARCH:=all +endef + +define Package/6scripts/description +IPv6 scripts to setup ipv6 connectivy using 6to4 tunnels +or bridged ipv6 connectivity. +endef + +define Package/6scripts/conffiles +/etc/config/6tunnel +/etc/config/6bridge +endef + +define Build/Compile +endef + +define Build/Configure +endef + +define Package/6scripts/install + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/6tunnel.conf $(1)/etc/config/6tunnel + $(INSTALL_DATA) ./files/6bridge.conf $(1)/etc/config/6bridge + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/6tunnel.init $(1)/etc/init.d/6tunnel + $(INSTALL_BIN) ./files/6bridge.init $(1)/etc/init.d/6bridge + $(INSTALL_DIR) $(1)/etc/ppp/ip-up.d/ + $(INSTALL_DATA) ./files/he-tun.ppp $(1)/etc/ppp/ip-up.d/ +endef + +$(eval $(call BuildPackage,6scripts)) diff --git a/ipv6/6scripts/files/6bridge.conf b/ipv6/6scripts/files/6bridge.conf new file mode 100644 index 0000000..e2980ad --- /dev/null +++ b/ipv6/6scripts/files/6bridge.conf @@ -0,0 +1,2 @@ +config 6bridge + option bridge 'bripv6' diff --git a/ipv6/6scripts/files/6bridge.init b/ipv6/6scripts/files/6bridge.init new file mode 100644 index 0000000..ba98d66 --- /dev/null +++ b/ipv6/6scripts/files/6bridge.init @@ -0,0 +1,53 @@ +#!/bin/sh /etc/rc.common +START=46 +STOP=46 + +start_service() { + local section="$1" + + include /lib/network + scan_interfaces + config_load /var/state/network + + config_get LAN lan ifname + config_get WAN wan ifname + config_get bridge "$section" bridge + + brctl addbr $bridge + brctl addif $bridge $LAN + brctl addif $bridge $WAN + brctl setfd $bridge 0 + ebtables -t broute -A BROUTING -i $WAN -p ! ipv6 -j DROP + ifconfig $bridge up +} + +stop_service() { + local section="$1" + + include /lib/network + scan_interfaces + config_load /var/state/network + + config_get LAN lan ifname + config_get WAN wan ifname + config_get bridge "$section" bridge + + ifconfig $bridge down + ebtables -t broute -F + brctl delif $bridge $WAN + brctl delif $bridge $LAN + brctl delbr $bridge +} +start() { + if ! [ -f /proc/net/if_inet6 ]; then + echo "IPv6 not enabled, install kmod-ipv6"; + exit 1; + fi + config_load "6bridge" + config_foreach start_service 6bridge +} + +stop () { + config_load "6bridge" + config_foreach stop_service 6bridge +} diff --git a/ipv6/6scripts/files/6tunnel.conf b/ipv6/6scripts/files/6tunnel.conf new file mode 100644 index 0000000..f65691d --- /dev/null +++ b/ipv6/6scripts/files/6tunnel.conf @@ -0,0 +1,18 @@ +config 6tunnel + option tnlifname 'sixbone' + # provide your tunnel providers' ipv4 address + option remoteip4 '' + # provide your public ipv4 address + option localip4 '' + # provide your local ipv6 address including prefix, + # eg. 2001:610::2/64 + option localip6 '' + # provide your tunnel providers' ipv6 address excluding + # prefix, eg. 2001:610::1 + option remoteip6 '' + # this should provide an mtu for your tunnel interface + option mtu '1280' + # this should provide a ttl for your tunnel interface + option ttl '64' + # provide your tunnel provider's delegated block (/64 or /48) + option delegatedip6 '' diff --git a/ipv6/6scripts/files/6tunnel.init b/ipv6/6scripts/files/6tunnel.init new file mode 100644 index 0000000..0e955ee --- /dev/null +++ b/ipv6/6scripts/files/6tunnel.init @@ -0,0 +1,68 @@ +#!/bin/sh /etc/rc.common +START=46 +STOP=46 + +start_service() { + local section="$1" + + include /lib/network + scan_interfaces + config_load /var/state/network + + config_get LAN lan ifname + config_get tnlifname "$section" tnlifname + config_get remoteip4 "$section" remoteip4 + config_get localip4 "$section" localip4 + config_get localip6 "$section" localip6 + config_get remoteip6 "$section" remoteip6 + config_get ttl "$section" ttl + config_get mtu "$section" mtu + config_get delegatedip6 "$section" delegatedip6 + + ip tunnel add $tnlifname mode sit remote $remoteip4 local $localip4 ttl 255 + ifconfig $tnlifname up + ip link set mtu $mtu dev $tnlifname + ip tunnel change $tnlifname ttl $ttl + ip addr add $localip6 dev $tnlifname + ip -6 route add ::/0 dev $tnlifname + ip -6 route add 2000::/3 via $remoteip6 + ip -6 route add $delegatedip6 dev $LAN +} + +stop_service() { + local section="$1" + + include /lib/network + scan_interfaces + config_load /var/state/network + + config_get LAN lan ifname + config_get tnlifname "$section" tnlifname + config_get remoteip4 "$section" remoteip4 + config_get localip4 "$section" localip4 + config_get localip6 "$section" localip6 + config_get remoteip6 "$section" remoteip6 + config_get ttl "$section" ttl + config_get mtu "$section" mtu + config_get delegatedip6 "$section" delegatedip6 + + ip -6 ro del $delegatedip6 dev $LAN + ip -6 ro del 2000::/3 via $remoteip6 + ip -6 ro del ::/0 dev $tnlifname + ip addr del $localip6 dev $tnlifname + ifconfig $tnlifname down + ip tunnel del $tnlifname +} +start() { + if ! [ -x /usr/sbin/ip ]; then + echo "ip is required to setup the tunnel"; + exit 1; + fi + config_load "6tunnel" + config_foreach start_service 6tunnel +} + +stop () { + config_load "6tunnel" + config_foreach stop_service 6tunnel +} diff --git a/ipv6/6scripts/files/he-tun.ppp b/ipv6/6scripts/files/he-tun.ppp new file mode 100644 index 0000000..4cc7385 --- /dev/null +++ b/ipv6/6scripts/files/he-tun.ppp @@ -0,0 +1,24 @@ +#!/bin/sh + +. /etc/functions.sh + +ipaddr="$PPP_LOCAL" + +update_tun() { + local cfg="$1" + + config_get tunnelid "$cfg" tunnelid + config_get username "$cfg" username + config_get password "$cfg" password + config_get tunnel "$cfg" tunnel + + password=`echo -n $password | md5sum | cut -d ' ' -f 1` + wget -q -O /dev/null "http://ipv4.tunnelbroker.net/ipv4_end.php?ipv4b=$ipaddr&pass=$password&user_id=$username&tunnel_id=$tunnelid" + + uci set "6tunnel.@$tunnel[0].localip4=$ipaddr" + uci commit 6tunnel + /etc/init.d/6tunnel restart +} + +config_load "hetun" +config_foreach update_tun diff --git a/ipv6/6tunnel/Makefile b/ipv6/6tunnel/Makefile new file mode 100644 index 0000000..3ab60d6 --- /dev/null +++ b/ipv6/6tunnel/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=6tunnel +PKG_VERSION:=0.11rc2 +PKG_RELEASE:=2 +PKG_MD5SUM:=74e02d4f0704b3083a01feda66033449 + +PKG_SOURCE_URL:=http://toxygen.net/6tunnel/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz + +include $(INCLUDE_DIR)/package.mk + +define Package/6tunnel + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+libpcap +kmod-sit + TITLE:=IPv4 / IPv6 tunnel proxy + URL:=http://toxygen.net/6tunnel/ +endef + +define Package/6tunnel/description +IPv4 / IPv6 tunnel proxy +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME).c +endef + +define Package/6tunnel/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/6tunnel $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,6tunnel)) diff --git a/ipv6/ahcpd/Makefile b/ipv6/ahcpd/Makefile new file mode 100644 index 0000000..b417c60 --- /dev/null +++ b/ipv6/ahcpd/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ahcpd +PKG_VERSION:=0.51 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/ +PKG_MD5SUM:=86b70d278dfb5a1e33cd1a1ceae9e715 + + +include $(INCLUDE_DIR)/package.mk + +define Package/ahcpd + SECTION:=ipv6 + CATEGORY:=IPv6 + TITLE:=Ad-Hoc Configuration Protocol daemon + URL:=http://www.pps.jussieu.fr/~jch/software/ahcp/ + MAINTAINER:=Gabriel Kerneis + DEPENDS:=+kmod-ipv6 +ip +librt +endef + +define Package/ahcpd/description + Ahcpd is a daemon for configuring an IPv6 network using the Ad-Hoc + Configuration Protocol (AHCP). AHCP is designed for wireless mesh + networks, where IPv6 autoconfiguration and DHCPv6 do not work, but may + also be used on wired networks. +endef + +define Package/ahcpd/conffiles +/etc/config/ahcpd +endef + +define Package/ahcpd/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/etc/ahcp + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcp-config.sh $(1)/etc/ahcp/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcpd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/ahcpd.config $(1)/etc/config/ahcpd + $(INSTALL_DIR) $(1)/lib/network + $(INSTALL_BIN) ./files/ahcp.sh $(1)/lib/network/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/ahcpd.init $(1)/etc/init.d/ahcpd +endef + +$(eval $(call BuildPackage,ahcpd)) diff --git a/ipv6/ahcpd/files/ahcp.sh b/ipv6/ahcpd/files/ahcp.sh new file mode 100644 index 0000000..805013c --- /dev/null +++ b/ipv6/ahcpd/files/ahcp.sh @@ -0,0 +1,91 @@ +append_bool() { + local section="$1" + local option="$2" + local value="$3" + local _loctmp + config_get_bool _loctmp "$section" "$option" 0 + [ "$_loctmp" -gt 0 ] && append args "$value" +} + +append_parm() { + local section="$1" + local option="$2" + local switch="$3" + local _loctmp + config_get _loctmp "$section" "$option" + [ -z "$_loctmp" ] && return 0 + append args "$switch $_loctmp" +} + +append_stmt() { + local name="$1" + local switch="$2" + append args "-C '$switch $name'" +} + +append_opt_stmt() { + local section="$1" + local option="$2" + local switch="$3" + local _loctmp + config_get _loctmp "$section" "$option" + [ -z "$_loctmp" ] && return 0 + append args "-C '$switch $_loctmp'" +} + +ahcp_addif() { + local ifname=$(uci_get_state network "$1" ifname "$1") + append interfaces "$ifname" +} + +ahcp_server() { + local cfg="$1" + + append_opt_stmt "$cfg" 'mode' 'mode' + append_opt_stmt "$cfg" 'lease_dir' 'lease-dir' + config_list_foreach "$cfg" 'prefix' append_stmt 'prefix' + config_list_foreach "$cfg" 'name_server' append_stmt 'name-server' + config_list_foreach "$cfg" 'ntp_server' append_stmt 'ntp-server' + + append_parm "$cfg" 'id_file' '-i' + append_parm "$cfg" 'log_file' '-L' +} + +ahcp_config() { + local cfg="$1" + + config_list_foreach "$cfg" 'interface' ahcp_addif + + append_bool "$cfg" 'ipv4_only' '-4' + append_bool "$cfg" 'ipv6_only' '-6' + append_bool "$cfg" 'no_dns' '-N' + + append_parm "$cfg" 'multicast_address' '-m' + append_parm "$cfg" 'port' '-p' + append_parm "$cfg" 'lease_time' '-t' + append_parm "$cfg" 'debug' '-d' + append_parm "$cfg" 'conf_file' '-c' + append_parm "$cfg" 'script' '-s' +} + +setup_interface_ahcp() { + local interface="$1" + local config="$2" + local pid_file="/var/run/ahcpd-$interface.pid" + local id_file="/var/lib/ahcp-unique-id-$interface" + local log_file="/var/log/ahcpd-$interface.log" + unset args + + mkdir -p /var/lib + + ahcp_config "$config" + eval "/usr/sbin/ahcpd -D -I $pid_file -i $id_file -L $log_file $args $interface" +} + +stop_interface_ahcp() { + local cfg="$1" + local interface + config_get interface "$cfg" device + local pid_file="/var/run/ahcpd-$interface.pid" + [ -f "$pid_file" ] && kill $(cat "$pid_file") +} diff --git a/ipv6/ahcpd/files/ahcpd.config b/ipv6/ahcpd/files/ahcpd.config new file mode 100644 index 0000000..b2187f2 --- /dev/null +++ b/ipv6/ahcpd/files/ahcpd.config @@ -0,0 +1,50 @@ +package ahcpd + +# This configuration file is used to set up ahcpd in server or forwarder +# mode. To use ahcpd in client mode, use 'proto' 'ahcp' in +# /etc/config/network (see example below). + +config ahcpd + option 'mode' 'server' # or 'forwarder' but NOT 'client' + # Uncomment the following lines to enable ahcpd on the desired + # interfaces. + ## list 'interface' 'lan' + ## list 'interface' 'wlan' + + # The following only makes sense in 'server' mode. + # Tweak to suit your needs. + ## list 'prefix' 'fde6:20f5:c9ac:358::/64' + ## list 'prefix' '192.168.4.128/25' + ## list 'name_server' 'fde6:20f5:c9ac:358::1' + ## list 'name_server' '192.168.4.1' + ## list 'ntp_server' '192.168.4.2' + ## option 'lease_dir' '/var/lib/leases' + + # option 'id_file' '/var/lib/ahcp-unique-id' + # option 'log_file' '/var/log/ahcpd.log' + # The configuration file is not necessary since you can configure + # everything from this file. But still, you might prefer using it. + ## option 'conf_file' '/etc/ahcp/ahcp.conf' + + # option 'multicast_address' 'ff02::cca6:c0f9:e182:5359' + # option 'port' '5359' + # option 'ipv4_only' 'false' + # option 'ipv6_only' 'false' + # option 'lease_time' '3666' + # option 'debug' '1' + +# Sample client mode configuration +# THIS MUST BE COPIED IN /etc/config/network. Ahcpd will ignore it +# otherwise. +## config 'interface' 'wlan' +## option 'ifname' 'ath0' +## option 'proto' 'ahcp' +## # The following lines are optional +## option 'multicast_address' 'ff02::cca6:c0f9:e182:5359' +## option 'port' '5359' +## option 'ipv4_only' 'false' +## option 'ipv6_only' 'false' +## option 'no_dns' 'false' +## option 'lease_time' '3666' +## option 'debug' '1' +## option 'script' '/etc/ahcp/ahcp-config.sh' diff --git a/ipv6/ahcpd/files/ahcpd.init b/ipv6/ahcpd/files/ahcpd.init new file mode 100644 index 0000000..38b5208 --- /dev/null +++ b/ipv6/ahcpd/files/ahcpd.init @@ -0,0 +1,27 @@ +#!/bin/sh /etc/rc.common + +START=71 +PID_F="/var/run/ahcpd.pid" +EXTRA_COMMANDS="status" +EXTRA_HELP=" status Print ahcpd's status to the log file." + +. /lib/network/ahcp.sh + +start() { + mkdir -p /var/lib + config_load ahcpd + unset args + unset interfaces + config_foreach ahcp_config ahcpd + config_foreach ahcp_server ahcpd + [ -z "$interfaces" ] && return 0 + eval "/usr/sbin/ahcpd -D -I $PID_F $args $interfaces" +} + +stop() { + [ -f "$PID_F" ] && kill $(cat "$PID_F") +} + +status() { + [ -f $PID_F ] && kill -USR1 $(cat $PID_F) +} diff --git a/ipv6/ahcpd/patches/001-autoconf-prefixes.patch b/ipv6/ahcpd/patches/001-autoconf-prefixes.patch new file mode 100644 index 0000000..e29dcf1 --- /dev/null +++ b/ipv6/ahcpd/patches/001-autoconf-prefixes.patch @@ -0,0 +1,14 @@ +Tue Jul 20 00:25:27 CEST 2010 Juliusz Chroboczek + * Fix typo -- ignore autoconf prefixes for plen > 64. + Thanks to Gabriel Kerneis. +--- old-ahcpd/configure.c 2010-07-20 09:31:19.000000000 +0200 ++++ new-ahcpd/configure.c 2010-07-20 09:31:19.000000000 +0200 +@@ -505,7 +505,7 @@ + if(config->ipv6_address) { + config->our_ipv6_address = copy_prefix_list(config->ipv6_address); + } else if(config->ipv6_prefix && config->ipv6_prefix->n > 0 && +- config->ipv6_prefix->l[0].plen >= 64) { ++ config->ipv6_prefix->l[0].plen <= 64) { + unsigned char address[16]; + int have_address = 0; + diff --git a/ipv6/aiccu/Makefile b/ipv6/aiccu/Makefile new file mode 100644 index 0000000..496fce4 --- /dev/null +++ b/ipv6/aiccu/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=aiccu +PKG_VERSION:=20070115 +PKG_RELEASE:=6 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.sixxs.net/archive/sixxs/aiccu/unix +PKG_MD5SUM:=c9bcc83644ed788e22a7c3f3d4021350 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/aiccu + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+libpthread +ip +kmod-sit +kmod-tun + TITLE:=SixXS Automatic IPv6 Connectivity Client Utility + URL:=http://www.sixxs.net/tools/aiccu/ +endef + +define Build/Configure + $(SED) "s,strip,/bin/true," $(PKG_BUILD_DIR)/unix-console/Makefile +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" OS_NAME="Linux" OS_VERSION="$(LINUX_VERSION)" \ + EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + EXTRA_LDFLAGS="$(TARGET_LDFLAGS) -pthread" \ + DEBUG=0 +endef + +define Package/aiccu/conffiles +/etc/config/aiccu +endef + +define Package/aiccu/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/unix-console/$(PKG_NAME) $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/aiccu.conf $(1)/etc/config/aiccu + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/aiccu.init $(1)/etc/init.d/aiccu + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DATA) ./files/aiccu.hotplug $(1)/etc/hotplug.d/iface/30-aiccu +endef + +$(eval $(call BuildPackage,aiccu)) diff --git a/ipv6/aiccu/files/aiccu.conf b/ipv6/aiccu/files/aiccu.conf new file mode 100755 index 0000000..671fd16 --- /dev/null +++ b/ipv6/aiccu/files/aiccu.conf @@ -0,0 +1,11 @@ +config aiccu + option username '' + option password '' + option protocol '' + option server '' + option interface '' + option tunnel_id '' + option requiretls '' + option defaultroute '1' + option nat '1' + option heartbeat '1' diff --git a/ipv6/aiccu/files/aiccu.hotplug b/ipv6/aiccu/files/aiccu.hotplug new file mode 100644 index 0000000..b886976 --- /dev/null +++ b/ipv6/aiccu/files/aiccu.hotplug @@ -0,0 +1,2 @@ +#!/bin/sh +[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && /etc/init.d/aiccu enabled && /etc/init.d/aiccu start diff --git a/ipv6/aiccu/files/aiccu.init b/ipv6/aiccu/files/aiccu.init new file mode 100644 index 0000000..68bac20 --- /dev/null +++ b/ipv6/aiccu/files/aiccu.init @@ -0,0 +1,52 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=51 + +config_cb() { + local cfg_type="$1" + local cfg_name="$2" + + case "$cfg_type" in + aiccu) + append cfgs_sections "$cfg_name" "$N" + ;; + esac +} + +start() { + config_load aiccu + for cfgs_section in $cfgs_sections; do + config_get username $cfgs_section username + config_get password $cfgs_section password + config_get server $cfgs_section server + config_get protocol $cfgs_section protocol + config_get interface $cfgs_section interface + config_get tunnel_id $cfgs_section tunnel_id + config_get_bool requiretls $cfgs_section requiretls 0 + config_get_bool defaultroute $cfgs_section defaultroute 1 + config_get_bool nat $cfgs_section nat 1 + config_get_bool heartbeat $cfgs_section heartbeat 1 + mkdir -p /tmp/run + echo "username $username" > /tmp/run/aiccu-${cfgs_section}.conf + echo "password $password" >> /tmp/run/aiccu-${cfgs_section}.conf + [ -n "$server" ] && echo "server $server" >> /tmp/run/aiccu-${cfgs_section}.conf + [ -n "$protocol" ] && echo "protocol $protocol" >> /tmp/run/aiccu-${cfgs_section}.conf + [ -n "$interface" ] && echo "ipv6_interface $interface" >> /tmp/run/aiccu-${cfgs_section}.conf + [ -n "$tunnel_id" ] && echo "tunnel_id $tunnel_id" >> /tmp/run/aiccu-${cfgs_section}.conf + [ "$requiretls" = "1" ] && echo "requiretls true" >> /tmp/run/aiccu-${cfgs_section}.conf + [ "$defaultroute" != "1" ] && echo "defaultroute false" >> /tmp/run/aiccu-${cfgs_section}.conf + [ "$nat" = "1" ] && echo "behindnat true" >> /tmp/run/aiccu-${cfgs_section}.conf + [ "$heartbeat" != "1" ] && echo "makebeats false" >> /tmp/run/aiccu-${cfgs_section}.conf + echo 'daemonize true' >> /tmp/run/aiccu-${cfgs_section}.conf + echo "pidfile /var/run/aiccu-${cfgs_section}.pid" >> /tmp/run/aiccu-${cfgs_section}.conf + + aiccu start /tmp/run/aiccu-$cfgs_section.conf + done +} + +stop() { + config_load aiccu + for cfgs_section in $cfgs_sections; do + aiccu stop /tmp/run/aiccu-$cfgs_section.conf + done +} diff --git a/ipv6/aiccu/patches/100-cross_compile.patch b/ipv6/aiccu/patches/100-cross_compile.patch new file mode 100644 index 0000000..dbdc50a --- /dev/null +++ b/ipv6/aiccu/patches/100-cross_compile.patch @@ -0,0 +1,101 @@ +--- aiccu/unix-console/Makefile.orig 2007-09-02 23:19:39.000000000 +0200 ++++ aiccu/unix-console/Makefile 2007-09-02 23:20:11.000000000 +0200 +@@ -25,7 +25,8 @@ + # CWARNS += -Wpacked + + #CFLAGS += $(CWARNS) -D_GNU_SOURCE -D_DEBUG -g3 -O0 +-CFLAGS += $(CWARNS) -D_GNU_SOURCE ++CFLAGS += $(CWARNS) $(EXTRA_CFLAGS) -D_GNU_SOURCE ++LDFLAGS += $(EXTRA_LDFLAGS) + CC = @gcc + RM = rm + +@@ -40,25 +41,25 @@ + # GnuTLS Support ? + # Used by TIC to secure that communication + # Currently defaultly builds only on Linux, but other platforms might easily also support it +-ifeq ($(shell uname | grep -c "Linux"),1) ++ifneq ($(HAVE_GNUTLS),) + CFLAGS += -D AICCU_GNUTLS + LDFLAGS += -lgnutls + endif + + # Linux +-ifeq ($(shell uname | grep -c "Linux"),1) ++ifeq ($(OS_NAME),Linux) + CFLAGS += -D_LINUX -D HAS_IFHEAD -D AICCU_TYPE="\"linux\"" + SRCS += ../common/aiccu_linux.c + OBJS += ../common/aiccu_linux.o +-LDFLAGS += -lpthread -lresolv ++LDFLAGS += -pthread -lresolv + endif + + # FreeBSD +-ifeq ($(shell uname | grep -c "FreeBSD"),1) ++ifeq ($(OS_NAME),FreeBSD) + CFLAGS += -D_FREEBSD + + # FreeBSD 4.x +-ifeq ($(shell uname -r | cut -c 1),4) ++ifeq ($(shell echo $(OS_VERSION) | cut -c 1),4) + CFLAGS += -D AICCU_TYPE="\"freebsd4\"" + SRCS += ../common/aiccu_freebsd4.c + OBJS += ../common/aiccu_freebsd4.o +@@ -71,7 +72,7 @@ + endif + + # DragonFlyBSD +-ifeq ($(shell uname | grep -c "DragonFly"),1) ++ifeq ($(OS_NAME),DragonFly) + CFLAGS += -D_DFBSD -D NEED_IFHEAD -D AICCU_TYPE="\"dragonfly\"" + SRCS += ../common/aiccu_freebsd4.c + OBJS += ../common/aiccu_freebsd4.o +@@ -79,7 +80,7 @@ + endif + + # NetBSD +-ifeq ($(shell uname | grep -c "NetBSD"),1) ++ifeq ($(OS_NAME),NetBSD) + CFLAGS += -D_NETBSD -D AICCU_TYPE="\"kame\"" + + # Check if net/if_tun.h has TUNSIFHEAD and enable support for it +@@ -97,10 +98,10 @@ + endif + + # OpenBSD +-ifeq ($(shell uname | grep -c "OpenBSD"),1) ++ifeq ($(OS_NAME),OpenBSD) + CFLAGS += -D_OPENBSD -D HAS_IFHEAD + # 2.7-2.9 +-ifeq ($(shell uname -r | cut -c 1),2) ++ifeq ($(shell echo $(OS_VERSION) | cut -c 1),2) + CFLAGS += -D AICCU_TYPE="\"openbsd2\"" + SRCS += ../common/aiccu_openbsd2.c + OBJS += ../common/aiccu_openbsd2.o +@@ -114,7 +115,7 @@ + endif + + # Darwin +-ifeq ($(shell uname | grep -c "Darwin"),1) ++ifeq ($(OS_NAME),Darwin) + CFLAGS += -D_DARWIN -D NEED_IFHEAD -D AICCU_TYPE="\"darwin\"" + SRCS += ../common/aiccu_darwin.c + OBJS += ../common/aiccu_darwin.o +@@ -122,7 +123,7 @@ + endif + + # SunOS / Solaris +-ifeq ($(shell uname | grep -c "SunOS"),1) ++ifeq ($(OS_NAME),SunOS) + CFLAGS += -D_SUNOS -D AICCU_TYPE="\"sunos\"" + SRCS += ../common/aiccu_sunos.c + OBJS += ../common/aiccu_sunos.o +@@ -130,7 +131,7 @@ + endif + + # AIX +-ifeq ($(shell uname | grep -c "AIX"),1) ++ifeq ($(OS_NAME),AIX) + CC = @/usr/vac/bin/xlc_r + CFLAGS = -qthreaded -q64 -qlanglvl=stdc99 -bmaxdata:0xD0000000 -D_64BIT -g -qdbxextra -qfullpath -qheapdebug -qformat=all -qcheck=all + CFLAGS += -D AICCU_CONSOLE diff --git a/ipv6/aiccu/patches/200-add_dn_skipname.patch b/ipv6/aiccu/patches/200-add_dn_skipname.patch new file mode 100644 index 0000000..ca6afce --- /dev/null +++ b/ipv6/aiccu/patches/200-add_dn_skipname.patch @@ -0,0 +1,70 @@ +diff -Nru aiccu.old/common/dn_skipname.c aiccu/common/dn_skipname.c +--- aiccu.old/common/dn_skipname.c 1970-01-01 02:00:00.000000000 +0200 ++++ aiccu/common/dn_skipname.c 2006-11-04 00:50:23.000000000 +0200 +@@ -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 -Nru aiccu.old/unix-console/Makefile aiccu/unix-console/Makefile +--- aiccu.old/unix-console/Makefile 2006-11-04 00:51:20.000000000 +0200 ++++ aiccu/unix-console/Makefile 2006-11-04 00:48:51.000000000 +0200 +@@ -10,9 +10,9 @@ + # $Date: 2006-07-25 09:20:48 $ + # **********************************************************/ + +-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 diff --git a/ipv6/aiccu/patches/300-resolver-uclibc.patch b/ipv6/aiccu/patches/300-resolver-uclibc.patch new file mode 100644 index 0000000..fbd6a50 --- /dev/null +++ b/ipv6/aiccu/patches/300-resolver-uclibc.patch @@ -0,0 +1,29 @@ +--- aiccu/common/resolver.c.orig 2007-09-02 23:10:58.000000000 +0200 ++++ aiccu/common/resolver.c 2007-09-02 23:11:01.000000000 +0200 +@@ -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 @@ + 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 @@ + #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/ipv6/dhcp6/Makefile b/ipv6/dhcp6/Makefile new file mode 100644 index 0000000..056814a --- /dev/null +++ b/ipv6/dhcp6/Makefile @@ -0,0 +1,80 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dhcp6 +PKG_VERSION:=1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=dhcpv6-linux-$(PKG_VERSION).zip +PKG_SOURCE_URL:=@SF/dhcpv6-linux +PKG_MD5SUM:=86193dfa62137db3ea459543db4f1102 + +include $(INCLUDE_DIR)/package.mk + +PKG_UNPACK:=unzip -d $(PKG_BUILD_DIR)/ $(DL_DIR)/$(PKG_SOURCE) + +define Package/dhcp6/Default + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+libncurses + TITLE:=IPv6 DHCP + URL:=http://sourceforge.net/projects/dhcpv6-linux +endef + +define Package/dhcp6-client + $(call Package/dhcp6/Default) + TITLE+= client +endef + +define Package/dhcp6-client/conffiles +/etc/dhcp6/solicit.conf +endef + +define Package/dhcp6-server + $(call Package/dhcp6/Default) + TITLE+= server +endef + +define Package/dhcp6-server/conffiles +/etc/dhcpd6/dhcpd6.conf +/etc/dhcpd6/leases6.conf +/etc/dhcpd6/partial_leases6.conf +endef + +define Build/Prepare + $(call Build/Prepare/Default) + # prevent package from rebuilding + find $(PKG_BUILD_DIR) | xargs touch +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/client \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" + $(MAKE) -C $(PKG_BUILD_DIR)/server \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef + +define Package/dhcp6-client/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/dhcp6 + $(INSTALL_BIN) $(PKG_BUILD_DIR)/client/cli $(1)/usr/sbin/dhcp6client + $(INSTALL_BIN) $(PKG_BUILD_DIR)/client/solicit.conf $(1)/etc/dhcp6/ +endef + +define Package/dhcp6-server/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/dhcpd6 + $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/serv $(1)/usr/sbin/dhcpd6 + $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/*.conf $(1)/etc/dhcpd6/ +endef + +$(eval $(call BuildPackage,dhcp6-client)) +$(eval $(call BuildPackage,dhcp6-server)) diff --git a/ipv6/dhcp6/patches/001-opt_flags.patch b/ipv6/dhcp6/patches/001-opt_flags.patch new file mode 100644 index 0000000..326f210 --- /dev/null +++ b/ipv6/dhcp6/patches/001-opt_flags.patch @@ -0,0 +1,94 @@ +diff -urN orig/dhcp6-1.0/client/Makefile dhcp6-1.0/client/Makefile +--- orig/dhcp6-1.0/client/Makefile 2025-06-28 23:21:40.000000000 +0200 ++++ dhcp6-1.0/client/Makefile 2005-12-13 13:43:11.000000000 +0100 +@@ -3,40 +3,40 @@ + 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 +- ++CFLAGS = -g3 + + dhcpv6_client : dhcpv6_client.c cli +- $(CC) -g3 dhcpv6_client.c -o dhcpv6_client ++ $(CC) $(CFLAGS) $(LDFLAGS) dhcpv6_client.c -o dhcpv6_client + + cli : $(OBJECT_FILES) +- $(CC) -g3 $(OBJECT_FILES) -o cli -lncurses ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECT_FILES) -o cli -lncurses + + client.o : client.c $(STD_HEADERS) $(HEADER_FILES) +- $(CC) -g3 -c client.c -o client.o ++ $(CC) $(CFLAGS) -c client.c -o client.o + + release.o : release.c release.h clilib.h +- $(CC) -g3 -c release.c -o release.o ++ $(CC) $(CFLAGS) -c release.c -o release.o + + rebind.o : rebind.c rebind.h clilib.h +- $(CC) -g3 -c rebind.c -o rebind.o ++ $(CC) $(CFLAGS) -c rebind.c -o rebind.o + + renew.o : renew.c renew.h clilib.h +- $(CC) -g3 -c renew.c -o renew.o ++ $(CC) $(CFLAGS) -c renew.c -o renew.o + + request.o : request.c request.h clilib.h +- $(CC) -g3 -c request.c -o request.o ++ $(CC) $(CFLAGS) -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) $(CFLAGS) -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) $(CFLAGS) -c solicit.c -o solicit.o + + clilib.o : clilib.c clilib.h parse.h +- $(CC) -g3 -c clilib.c -o clilib.o ++ $(CC) $(CFLAGS) -c clilib.c -o clilib.o + + parse.o : parse.c parse.h clilib.h +- $(CC) -g3 -c parse.c -o parse.o ++ $(CC) $(CFLAGS) -c parse.c -o parse.o + + clean : + rm -f *.o cli dhcpv6_client +--- orig/dhcp6-1.0/server/Makefile 2002-06-28 14:50:04.000000000 +0200 ++++ dhcp6-1.0/server/Makefile 2005-12-13 11:35:53.000000000 +0100 +@@ -1,27 +1,28 @@ + 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 ++CFLAGS = -g3 + + serv: $(OBJECT_FILES) +- $(CC) -g3 $(OBJECT_FILES) -o serv ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECT_FILES) -o serv + + lib.o: lib.c lib.h $(STD_HEADERS) +- $(CC) -g3 -c lib.c -o lib.o ++ $(CC) $(CFLAGS) -c lib.c -o lib.o + + parse.o: parse.c parse.h $(STD_HEADERS) +- $(CC) -g3 -c parse.c -o parse.o ++ $(CC) $(CFLAGS) -c parse.c -o parse.o + + leases.o: leases.c leases.h $(STD_HEADERS) +- $(CC) -g3 -c leases.c -o leases.o ++ $(CC) $(CFLAGS) -c leases.c -o leases.o + + advertise.o: advertise.c advertise.h $(STD_HEADERS) +- $(CC) -g3 -c advertise.c -o advertise.o ++ $(CC) $(CFLAGS) -c advertise.c -o advertise.o + + reply.o: reply.c reply.h $(STD_HEADERS) +- $(CC) -g3 -c reply.c -o reply.o ++ $(CC) $(CFLAGS) -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) $(CFLAGS) -c server.c -o server.o + + clean: + rm -f *.o serv diff --git a/ipv6/dhcp6/patches/002-gcc_lvalue.patch b/ipv6/dhcp6/patches/002-gcc_lvalue.patch new file mode 100644 index 0000000..e5deda6 --- /dev/null +++ b/ipv6/dhcp6/patches/002-gcc_lvalue.patch @@ -0,0 +1,11 @@ +--- dhcp6-1.0/client/solicit.c 2025-06-28 23:21:40.000000000 -0700 ++++ dhcp6-1.0-patched/client/solicit.c 2006-04-27 15:32:52.000000000 -0700 +@@ -18,7 +18,7 @@ + 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/ipv6/dhcp6/patches/003-debug.patch b/ipv6/dhcp6/patches/003-debug.patch new file mode 100644 index 0000000..7968df2 --- /dev/null +++ b/ipv6/dhcp6/patches/003-debug.patch @@ -0,0 +1,22 @@ +diff -urN orig/dhcp6-1.0/client/clilib.c dhcp6-1.0/client/clilib.c +--- orig/dhcp6-1.0/client/clilib.c 2025-06-28 23:21:40.000000000 +0200 ++++ dhcp6-1.0/client/clilib.c 2005-12-13 13:42:43.000000000 +0100 +@@ -554,7 +554,7 @@ + + 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 @@ + break; + + default : +-#if DEBUG == 3 + printf ("Unrecognized DUID type\n"); +-#endif + } + + next_opt = (struct OPTIONS *) malloc (sizeof (struct OPTIONS)); diff --git a/ipv6/dibbler/Makefile b/ipv6/dibbler/Makefile new file mode 100644 index 0000000..6a2a443 --- /dev/null +++ b/ipv6/dibbler/Makefile @@ -0,0 +1,141 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dibbler +PKG_VERSION:=0.7.3 +PKG_RELEASE:=6 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz +PKG_SOURCE_URL:=http://klub.com.pl/dhcpv6/dibbler/ +PKG_MD5SUM:=39be72da38c2e6d33fd43a2811a276b1 + +PKG_FIXUP:=libtool +PKG_LIBTOOL_PATHS:=poslib + +include $(INCLUDE_DIR)/package.mk + +# add dependency on 2.6 since recent dibbler needs +define Package/dibbler/Default + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+libstdcpp @!LINUX_2_4 +libpthread + TITLE:=Dibbler, a portable DHCPv6 implementation + URL:=http://klub.com.pl/dhcpv6/ +endef + +define Package/dibbler/Default/description + Dibbler is a portable DHCPv6 implementation. It supports stateful (i.e. + IPv6 address granting) as well as stateless (i.e. option granting) + autoconfiguration for IPv6. +endef + +define Package/dibbler-poslib + $(call Package/dibbler/Default) + TITLE+= (helper lib) +endef + +define Package/dibbler-poslib/description + $(call Package/dibbler/Default/description) + This package contains the pos library. +endef + +define Package/dibbler-client + $(call Package/dibbler/Default) + TITLE+= (client) +endef + +define Package/dibbler-client/description + $(call Package/dibbler/Default/description) + This package contains the dibbler client. +endef + +define Package/dibbler-relay + $(call Package/dibbler/Default) + TITLE+= (relay) +endef + +define Package/dibbler-relay/description + $(call Package/dibbler/Default/description) + This package contains the dibbler relay. +endef + +define Package/dibbler-server + $(call Package/dibbler/Default) + DEPENDS += +dibbler-poslib + TITLE+= (server) +endef + +define Package/dibbler-server/description + $(call Package/dibbler/Default/description) + This package contains the dibbler server. +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR)/poslib; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --includedir=/usr/include \ + --infodir=/usr/share/info \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc \ + $(DISABLE_NLS) \ + ); +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + PORT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + PORT_LDFLAGS="$(TARGET_LDFLAGS)" \ + DEBUGINFO= \ + server client relay +endef + +define Package/dibbler-poslib/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/./poslib/poslib/.libs/libposlib.so* $(1)/usr/lib/ +endef + +define Package/dibbler-client/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-client $(1)/usr/sbin/ +endef + +define Package/dibbler-relay/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-relay $(1)/usr/sbin/ +endef + +define Package/dibbler-server/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-server $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/dibbler.init $(1)/etc/init.d/ +endef + +$(eval $(call BuildPackage,dibbler-poslib)) +$(eval $(call BuildPackage,dibbler-client)) +$(eval $(call BuildPackage,dibbler-relay)) +$(eval $(call BuildPackage,dibbler-server)) diff --git a/ipv6/dibbler/files/dibbler.init b/ipv6/dibbler/files/dibbler.init new file mode 100644 index 0000000..0a93c2a --- /dev/null +++ b/ipv6/dibbler/files/dibbler.init @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common + +START=90 +STOP=90 + +start() { + mkdir -p /var/lib/dibbler + dibbler-server start +} + +stop() { + dibbler-server stop +} diff --git a/ipv6/dibbler/patches/001-fix_avr32_compile b/ipv6/dibbler/patches/001-fix_avr32_compile new file mode 100644 index 0000000..4aa4294 --- /dev/null +++ b/ipv6/dibbler/patches/001-fix_avr32_compile @@ -0,0 +1,20 @@ +--- a/poslib/config.sub ++++ b/poslib/config.sub +@@ -230,7 +230,7 @@ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ ++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ +@@ -297,7 +297,7 @@ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ +- | avr-* \ ++ | avr-* | avr32-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | cydra-* \ diff --git a/ipv6/dibbler/patches/001-uclibcxx.patch b/ipv6/dibbler/patches/001-uclibcxx.patch new file mode 100644 index 0000000..e6cd006 --- /dev/null +++ b/ipv6/dibbler/patches/001-uclibcxx.patch @@ -0,0 +1,32 @@ +--- a/Makefile ++++ b/Makefile +@@ -61,7 +61,8 @@ + -L$(MESSAGES) -lMsg \ + -lClntOptions -lOptions -lLowLevel \ + -L$(MISC) -lMisc \ +- -L$(POSLIB) $(CLNTPOSLIB) ++ -L$(POSLIB) $(CLNTPOSLIB) \ ++ $(CLNT_LIBS) + + server: $(SERVERBIN) + +@@ -93,7 +94,8 @@ + -L$(MISC) -lMisc \ + -L$(LOWLEVEL) -lLowLevel \ + -L$(IFACEMGR) -lIfaceMgr \ +- -L$(POSLIB) $(SRVPOSLIB) ++ -L$(POSLIB) $(SRVPOSLIB) \ ++ $(SRV_LIBS) + + + relay: $(RELAYBIN) +@@ -113,7 +115,8 @@ + -L$(MESSAGES) -lMsg \ + -L$(MISC) -lMisc \ + -L$(OPTIONS) -lOptions \ +- -lMisc -lIfaceMgr -lLowLevel -lRelTransMgr -lRelCfgMgr -lRelMsg -lRelOptions -lOptions ++ -lMisc -lIfaceMgr -lLowLevel -lRelTransMgr -lRelCfgMgr -lRelMsg -lRelOptions -lOptions \ ++ $(SRV_LIBS) + + requestor: $(REQUESTORBIN) + $(REQUESTORBIN): includes commonlibs Requestor $(REQUESTORDIRS) diff --git a/ipv6/gw6c/Makefile b/ipv6/gw6c/Makefile new file mode 100644 index 0000000..cce8e61 --- /dev/null +++ b/ipv6/gw6c/Makefile @@ -0,0 +1,75 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gw6c +PKG_VERSION:=5.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://openwrt.linux-appliance.net/sources +PKG_MD5SUM:=eeac7292a622681651ec3bd9b2e5b061 +PKG_BUILD_DIR:=$(BUILD_DIR)/gw6-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/gw6c + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+libpthread +ip +kmod-tun +kmod-ipv6 +uclibcxx +radvd + TITLE:=IPv6 tunnel client software + URL:=http://www.go6.net +endef + +define Package/gw6c/description + Client to configure an IPv6 tunnel to + Hexago/freenet6/go6.net's migration broker. +endef + +GW6C_OPTS:= \ + C_COMPILER="$(TARGET_CC) -c -DNO_STDLIBCXX" \ + COMPILER="$(TARGET_CROSS)g++ -c -DNO_STDLIBCXX" \ + CPP_FLAGS="$(TARGET_CFLAGS) -fno-builtin -nostdinc++ -I. -Wall -DNDEBUG -I$(STAGING_DIR)/usr/include/uClibc++ $(TARGET_CPPFLAGS)" \ + RANLIB="$(TARGET_CROSS)ranlib" \ + ARCHIVER="$(TARGET_CROSS)ar" \ + C_LINKER="$(TARGET_CC)" \ + LINKER="$(TARGET_CROSS)g++" \ + exportdir=$(PKG_BUILD_DIR)/gw6c \ + export + +define Build/Configure + $(INSTALL_DIR) $(PKG_BUILD_DIR)/gw6c/include + $(INSTALL_DATA) $(PKG_BUILD_DIR)/gw6c-config/gw6cconfig/gw6c_c_wrapper.h \ + $(PKG_BUILD_DIR)/gw6c/include +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/gw6c-config \ + $(GW6C_OPTS) + $(MAKE) -C $(PKG_BUILD_DIR)/gw6c-messaging \ + $(GW6C_OPTS) + $(MAKE) -C $(PKG_BUILD_DIR)/tspc-advanced \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -fno-builtin -Wall -I$(PKG_BUILD_DIR)/tspc-advanced/include \ + -I$(PKG_BUILD_DIR)/tspc-advanced/platform/openwrt -I$(PKG_BUILD_DIR)/tspc-advanced" \ + LDFLAGS="-L$(PKG_BUILD_DIR)/tspc-advanced/gw6cconfig \ + -L$(PKG_BUILD_DIR)/tspc-advanced/gw6cmessaging \ + $(TARGET_LDFLAGS) -nodefaultlibs -luClibc++ $(LIBGCC_S)" \ + target="openwrt" \ + installdir="$(PKG_INSTALL_DIR)" +endef + +define Package/gw6c/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tspc-advanced/bin/$(PKG_NAME) $(1)/usr/sbin + $(INSTALL_DIR) $(1)/usr/share/gw6c/template + $(CP) ./files/openwrt.sh $(1)/usr/share/gw6c/template + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/gw6c.init $(1)/etc/init.d/gw6c + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/gw6c.config $(1)/etc/config/gw6c +endef + +$(eval $(call BuildPackage,gw6c)) diff --git a/ipv6/gw6c/files/gw6c.config b/ipv6/gw6c/files/gw6c.config new file mode 100644 index 0000000..e634c98 --- /dev/null +++ b/ipv6/gw6c/files/gw6c.config @@ -0,0 +1,66 @@ +config gw6c basic + #Comment out next line to enable gw6c + option disabled 1 + + #Leave empty if connecting anonymously + option userid + option passwd + + #For anonymous use anon.frenet6.net and + #account holders should use broker.freenet6.net + option server anon.freenet6.net + + #auth_method + #Use anonymous with anonymous access and + #any if you are account holder + option auth_method anonymous + +config gw6c routing + #host_type + option host_type host + option prefixlen 48 + option ifprefix br-lan + + #DNS server list to which the reverse prefix + #will be delegated. Separate servers with : + option dns_server + +config gw6c advanced + #Location where to store configuration file + option gw6c_conf /tmp/gw6c.conf + option gw6c_dir /usr/share/gw6c + option auto_retry yes + option retry_delay 30 + option keepalive yes + #keepalive interval + option interval 30 + #tunnel_mode + option if_tunnel_mode v6anyv4 + option if_v6v4 sit1 + option if_v6udpv4 tun + option if_v4v6 sit0 + option client_v4 auto + option client_v6 auto + option template openwrt + option proxy_client no + +config gw6c broker + option broker_list /tmp/gw6c-broker-list.txt + option last_server /tmp/gw6c-last-server.txt + # Always use last known working server? + option always_same_serv no + +config gw6c logging + option log_console 0 + option log_stderr 1 + option log_file 0 + option log_syslog 0 + + option log_filename /var/log/gw6c.log + option log_rotation yes + #Max size when using log file rotation + #possible values: 16|32|128|1024 + option log_maxsize 32 + + # + option syslog_facility USER diff --git a/ipv6/gw6c/files/gw6c.init b/ipv6/gw6c/files/gw6c.init new file mode 100755 index 0000000..abc5d72 --- /dev/null +++ b/ipv6/gw6c/files/gw6c.init @@ -0,0 +1,111 @@ +#!/bin/sh /etc/rc.common +#Copyright (C) 2007 RoadRunner.cx +START=52 + +genconf() { + + [ -f /etc/config/gw6c ] || { + echo "You are missing configuration file /etc/config/gw6c" + return 0 + } + + config_load "gw6c" + + config_get DISABLED basic disabled + + [ "$DISABLED" == "1" ] && { + echo "You haven't edited your configuration file. Gateway6 is disabled." + return 0 + } + + config_get USERID basic userid + config_get PASSWORD basic passwd + config_get SERVER basic server + config_get AUTH_METHOD basic auth_method + + config_get HOST_TYPE routing host_type + config_get PREFIX_LEN routing prefixlen + config_get IF_PREFIX routing ifprefix + config_get DNS_SERVER routing dns_server + + config_get GW6C_CONF advanced gw6c_conf + config_get GW6C_DIR advanced gw6c_dir + config_get AUTO_RETRY advanced auto_retry + config_get RETRY_DELAY advanced retry_delay + config_get KEEPALIVE advanced keepalive + config_get KEEPALIVE_INTERVAL advanced interval + config_get TUNNEL_MODE advanced if_tunnel_mode + config_get IF_V6V4 advanced if_v6v4 + config_get IF_V6UDPV4 advanced if_v6udpv4 + config_get IF_V4V6 advanced if_v4v6 + config_get CLIENT_V4 advanced client_v4 + config_get CLIENT_V6 advanced client_v6 + config_get TEMPLATE advanced template + config_get PROXY_CLIENT advanced proxy_client + + config_get BROKER_LIST broker broker_list + config_get LAST_SERVER broker last_server + config_get ALWAYS_SAMESERV broker always_same_serv + + config_get LOG_CONSOLE logging log_console + config_get LOG_STDERR logging log_stderr + config_get LOG_FILE logging log_file + config_get LOG_SYSLOG logging log_syslog + config_get LOG_FILENAME logging log_filename + config_get LOG_ROTATE logging log_rotation + config_get LOG_MAXSIZE logging log_maxsize + config_get SYSLOG_FACILITY logging syslog_facility + + cat >$GW6C_CONF < /proc/sys/net/ipv6/conf/all/forwarding + } +} diff --git a/ipv6/gw6c/files/openwrt.sh b/ipv6/gw6c/files/openwrt.sh new file mode 100755 index 0000000..75d418f --- /dev/null +++ b/ipv6/gw6c/files/openwrt.sh @@ -0,0 +1,181 @@ +#!/bin/sh +# +# openwrt.sh,v 1.1.4.1 2007/01/12 19:16:12 dgregoire Exp +# +# This source code copyright (c) Hexago Inc. 2002-2007. +# +# LICENSE NOTICE: You may use and modify this source code only if you +# have executed a valid license agreement with Hexago Inc. granting +# you the right to do so, the said license agreement governing such +# use and modifications. Copyright or other intellectual property +# notices are not to be removed from the source code. +# +# Note: IPV6 support and tun Support must be enabled before calling this script. +# + + +LANGUAGE=C + +if [ -z $TSP_VERBOSE ]; then + TSP_VERBOSE=0 +fi + +KillProcess() +{ + if [ ! -z $TSP_VERBOSE ]; then + if [ $TSP_VERBOSE -ge 2 ]; then + echo killing $* + fi + fi + PID=`ps axww | grep $1 | grep -v grep | awk '{ print $1;}'` + echo $PID + if [ ! -z $PID ]; then + kill $PID + fi +} + +Display() +{ + if [ -z $TSP_VERBOSE ]; then + return; + fi + if [ $TSP_VERBOSE -lt $1 ]; then + return; + fi + shift + echo "$*" +} + +Exec() +{ + if [ ! -z $TSP_VERBOSE ]; then + if [ $TSP_VERBOSE -ge 2 ]; then + echo $* + fi + fi + $* # Execute command + if [ $? -ne 0 ]; then + echo "Error while executing $1" + echo " Command: $*" + exit 1 + fi +} + +ExecNoCheck() +{ + if [ ! -z $TSP_VERBOSE ]; then + if [ $TSP_VERBOSE -ge 2 ]; then + echo $* + fi + fi + $* # Execute command +} + +# Program localization + +Display 1 "--- Start of configuration script. ---" +Display 1 "Script: " `basename $0` + +ifconfig=/sbin/ifconfig +route=/sbin/route +ipconfig=/usr/sbin/ip +rtadvd=/usr/sbin/radvd +rtadvd_pid=/var/run/radvd.pid +sysctl=/sbin/sysctl +rtadvdconfigfilename=gw6c-radvd.conf +rtadvdconfigfile=/tmp/$rtadvdconfigfilename + +if [ -z $TSP_HOME_DIR ]; then + echo "TSP_HOME_DIR variable not specified!;" + exit 1 +fi + +if [ ! -d $TSP_HOME_DIR ]; then + echo "Error : directory $TSP_HOME_DIR does not exist" + exit 1 +fi +# + +if [ -z $TSP_HOST_TYPE ]; then + echo Error: TSP_HOST_TYPE not defined. + exit 1 +fi + +if [ X"${TSP_HOST_TYPE}" = X"host" ] || [ X"${TSP_HOST_TYPE}" = X"router" ]; then + # + # Configured tunnel config (IPv6) + Display 1 "$TSP_TUNNEL_INTERFACE setup" + if [ X"${TSP_TUNNEL_MODE}" = X"v6v4" ]; then + Display 1 "Setting up link to $TSP_SERVER_ADDRESS_IPV4" + ExecNoCheck $ipconfig tunnel del $TSP_TUNNEL_INTERFACE + ExecNoCheck sleep 1 + Exec $ipconfig tunnel add $TSP_TUNNEL_INTERFACE mode sit ttl 64 remote $TSP_SERVER_ADDRESS_IPV4 + fi + + Exec $ifconfig $TSP_TUNNEL_INTERFACE up + + PREF=`echo $TSP_CLIENT_ADDRESS_IPV6 | sed "s/:0*/:/g" |cut -d : -f1-2` + OLDADDR=`$ifconfig $TSP_TUNNEL_INTERFACE | grep "inet6.* $PREF" | sed -e "s/^.*inet6 addr: //" -e "s/ Scope.*\$//"` + if [ ! -z $OLDADDR ]; then + Display 1 "Removing old IPv6 address $OLDADDR" + Exec $ifconfig $TSP_TUNNEL_INTERFACE inet6 del $OLDADDR + fi + Display 1 "This host is: $TSP_CLIENT_ADDRESS_IPV6/$TSP_TUNNEL_PREFIXLEN" + Exec $ifconfig $TSP_TUNNEL_INTERFACE add $TSP_CLIENT_ADDRESS_IPV6/$TSP_TUNNEL_PREFIXLEN + Exec $ifconfig $TSP_TUNNEL_INTERFACE mtu 1280 + # + # Default route + Display 1 "Adding default route" + ExecNoCheck $route -A inet6 del ::/0 2>/dev/null # delete old default route + ExecNoCheck $route -A inet6 del 2000::/3 2>/dev/null # delete old gw route + Exec $route -A inet6 add ::/0 dev $TSP_TUNNEL_INTERFACE + Exec $route -A inet6 add 2000::/3 dev $TSP_TUNNEL_INTERFACE +fi + +# Router configuration if required +if [ X"${TSP_HOST_TYPE}" = X"router" ]; then + Display 1 "Router configuration" + Display 1 "Kernel setup" + if [ X"${TSP_PREFIXLEN}" != X"64" ]; then + #Better way on linux to avoid loop with the remaining /48? + $route -A inet6 add $TSP_PREFIX::/$TSP_PREFIXLEN dev $TSP_HOME_INTERFACE 2>/dev/null + fi + Display 1 "Adding prefix to $TSP_HOME_INTERFACE" + OLDADDR=`$ifconfig $TSP_HOME_INTERFACE | grep "inet6.* $PREF" | sed -e "s/^.*inet6 addr: //" -e "s/ Scope.*\$//"` + if [ ! -z $OLDADDR ]; then + Display 1 "Removing old IPv6 address $OLDADDR" + Exec $ifconfig $TSP_HOME_INTERFACE del $OLDADDR + fi + Exec $ifconfig $TSP_HOME_INTERFACE add $TSP_PREFIX::1/64 + # Router advertisement configuration + Display 1 "Create new $rtadvdconfigfile" + echo "##### rtadvd.conf made by Gateway6 Client ####" > "$rtadvdconfigfile" + echo "interface $TSP_HOME_INTERFACE" >> "$rtadvdconfigfile" + echo "{" >> "$rtadvdconfigfile" + echo " AdvSendAdvert on;" >> "$rtadvdconfigfile" + echo " prefix $TSP_PREFIX::/64" >> "$rtadvdconfigfile" + echo " {" >> "$rtadvdconfigfile" + echo " AdvOnLink on;" >> "$rtadvdconfigfile" + echo " AdvAutonomous on;" >> "$rtadvdconfigfile" + echo " };" >> "$rtadvdconfigfile" + echo "};" >> "$rtadvdconfigfile" + echo "" >> "$rtadvdconfigfile" + /etc/init.d/radvd stop + # Then enable forwarding. Killing + # radvd disables forwarding and radvd + # does NOT start without forwarding enabled + Exec $sysctl -w net.ipv6.conf.all.forwarding=1 # ipv6_forwarding enabled + if [ -f $rtadvdconfigfile ]; then + Exec $rtadvd -p $rtadvd_pid -C $rtadvdconfigfile + Display 1 "Starting radvd: $rtadvd -p $rtadvd_pid -C $rtadvdconfigfile" + else + echo "Error : file $rtadvdconfigfile not found" + exit 1 + fi +fi + +Display 1 "--- End of configuration script. ---" + +exit 0 + +#--------------------------------------------------------------------- diff --git a/ipv6/ipv6calc/Makefile b/ipv6/ipv6calc/Makefile new file mode 100644 index 0000000..2ccd66c --- /dev/null +++ b/ipv6/ipv6calc/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ipv6calc +PKG_VERSION:=0.90.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc +PKG_MD5SUM:=c1a654214058fdac5f8c2ba6a196e2b8 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ipv6calc + SECTION:=ipv6 + CATEGORY:=IPv6 + TITLE:=IPv6 addresses calculations + URL:=http://www.deepspace6.net/projects/ipv6calc.html +endef + +define Package/ipv6calc/description + ipv6calc is a small utility written in programming languate C to manipulate + (not only) IPv6 addresses. Intentions were convering a given IPv6 address + into compressed format, convering a given IPv6 address into the same format + like shown in /proc/net/if_inet6 and (because it was not difficulty) + migrating the Perl program ip6_int into. Now only one utiltity is needed to + do a lot. +endef + +CONFIGURE_ARGS += \ + --enable-static \ + --enable-shared + +MAKE_FLAGS += \ + CC="$(TARGET_CC)" \ + COPTS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)" + +define Package/ipv6calc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ipv6* $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,ipv6calc)) diff --git a/ipv6/miredo/Makefile b/ipv6/miredo/Makefile new file mode 100644 index 0000000..6fa08cc --- /dev/null +++ b/ipv6/miredo/Makefile @@ -0,0 +1,105 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=miredo +PKG_VERSION:=1.2.3 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.remlab.net/files/miredo/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=6ba484ad5e331514a8a3452da2b144e7 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/miredo/Default + SECTION:=ipv6 + CATEGORY:=IPv6 + SUBMENU:=miredo: Teredo (IPv6 tunneling over UDP through NAT) + URL:=http://www.remlab.net/miredo/ +endef + +define Package/miredo-common +$(call Package/miredo/Default) + TITLE:=Teredo (IPv6 tunneling over UDP through NAT) shared libraries + DEPENDS+= +libpthread +uclibcxx +kmod-ipv6 +kmod-tun +endef + +define Package/miredo-server +$(call Package/miredo/Default) + TITLE:=Teredo (IPv6 tunneling over UDP through NAT) server daemon + DEPENDS+= +miredo-common +endef + +define Package/miredo-server/conffiles +/etc/miredo/miredo-server.conf +endef + +define Package/miredo-client +$(call Package/miredo/Default) + TITLE:=Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon + DEPENDS+= +miredo-common +endef + +define Package/miredo-client/conffiles +/etc/miredo/miredo.conf +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --with-gnu-ld \ + --disable-rpath \ + --disable-chroot \ + --enable-teredo-client \ + --enable-miredo-user=root \ + --without-Judy \ + +CONFIGURE_VARS += \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \ + CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \ + LIBS="-nodefaultlibs -luClibc++ -lm" \ + ac_cv_file__proc_self_maps=yes\ + +# XXX: override (:=), don't append (+=) +MAKE_FLAGS := \ + CXXLINK="\$$$$(LINK)" \ + +define Package/miredo-common/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib{teredo,tun6}.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/miredo + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/miredo/miredo-privproc $(1)/usr/lib/miredo +endef + +define Package/miredo-server/install + $(INSTALL_DIR) $(1)/etc/miredo + $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/miredo/examples/miredo-server.conf $(1)/etc/miredo/miredo-server.conf + $(INSTALL_BIN) ./files/client-hook $(1)/etc/miredo/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/miredo-server.init $(1)/etc/init.d/miredo-server + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo-server $(1)/usr/sbin/ +endef + +define Package/miredo-client/install + $(INSTALL_DIR) $(1)/etc/miredo + $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/miredo/examples/miredo.conf $(1)/etc/miredo/miredo.conf + $(INSTALL_BIN) ./files/client-hook $(1)/etc/miredo/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/miredo.init $(1)/etc/init.d/miredo + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,miredo-common)) +$(eval $(call BuildPackage,miredo-server)) +$(eval $(call BuildPackage,miredo-client)) diff --git a/ipv6/miredo/files/client-hook b/ipv6/miredo/files/client-hook new file mode 100644 index 0000000..b4c3ce8 --- /dev/null +++ b/ipv6/miredo/files/client-hook @@ -0,0 +1,70 @@ +#! /bin/sh +# +# Miredo client hook script for Linux/iproute2 +# Copyright © 2007 Rémi Denis-Courmont. +# Distributed under the terms of the GNU General Public License version 2. + +# Linux iproute2 path: +IP="/usr/sbin/ip" + +# Linux default route default metric is 1024 +# (we put 1029 so that Teredo is used as a last resort): +METRIC=1029 + +# Linux routing table ID +# (possible values: 1-252 from /etc/iproute/rt_tables): +TABLE="teredo" + +# Linux routing rule priority +# (possible values: 1-32765, lowest number is highest priority): +PRIO=32765 + +# MTU for the tunnel interface +# (default: specified by the Teredo server, or 1280) +#MTU=1400 + +if ! test -x "$IP"; then + echo "$0: iproute2 is required! Please install it." >&2 + exit 1 +fi + +# Nothing to do with destroy event +if test "$STATE" = "destroy"; then exit 0; fi + +# If the source routing table is not configured, ignore it. +if ! "$IP" route show table "$TABLE" >/dev/null 2>&1; then + unset TABLE +else + if test "$OLD_ADDRESS"; then + "$IP" -6 rule del from "$OLD_ADDRESS" \ + prio "$PRIO" table "$TABLE" 2>/dev/null + fi + "$IP" -6 route flush table "$TABLE" 2>/dev/null +fi + +"$IP" -6 route flush dev "$IFACE" 2>/dev/null +"$IP" -6 address flush dev "$IFACE" 2>/dev/null + +"$IP" -6 link set dev "$IFACE" "$STATE" +if test "$MTU"; then + "$IP" link set dev "$IFACE" mtu "$MTU" +fi + +case "$STATE" in + up) + "$IP" -6 address add "${LLADDRESS}/64" dev "$IFACE" + "$IP" -6 address add "${ADDRESS}/32" dev "$IFACE" + "$IP" -6 route add default dev "$IFACE" metric "$METRIC" + + if test "$TABLE"; then + "$IP" -6 route add default dev "$IFACE" table "$TABLE" + "$IP" -6 rule add from "$ADDRESS" \ + prio "$PRIO" table "$TABLE" + fi +esac + +# This should be required when changing policy routing rules, but it +# seems to confuse certain kernels into removing our default route! +#"$IP" -6 route flush cache 2>/dev/null + +exit 0 diff --git a/ipv6/miredo/files/miredo-server.init b/ipv6/miredo/files/miredo-server.init new file mode 100644 index 0000000..d18dc19 --- /dev/null +++ b/ipv6/miredo/files/miredo-server.init @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +PID_F=/var/run/miredo-server.pid + +start() { + miredo-server +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} diff --git a/ipv6/miredo/files/miredo.init b/ipv6/miredo/files/miredo.init new file mode 100644 index 0000000..c44e801 --- /dev/null +++ b/ipv6/miredo/files/miredo.init @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +PID_F=/var/run/miredo.pid + +start() { + miredo +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} diff --git a/ipv6/miredo/patches/100-uclibc.patch b/ipv6/miredo/patches/100-uclibc.patch new file mode 100644 index 0000000..8818402 --- /dev/null +++ b/ipv6/miredo/patches/100-uclibc.patch @@ -0,0 +1,21 @@ +--- a/libteredo/maintain.c ++++ b/libteredo/maintain.c +@@ -59,7 +59,7 @@ + + static inline void gettime (struct timespec *now) + { +-#if (_POSIX_CLOCK_SELECTION - 0 >= 0) && (_POSIX_MONOTONIC_CLOCK - 0 >= 0) ++#if (_POSIX_CLOCK_SELECTION - 0 >= 0) && (_POSIX_MONOTONIC_CLOCK - 0 >= 0) && !defined(__UCLIBC__) + if (clock_gettime (CLOCK_MONOTONIC, now) == 0) + return; + #else +--- a/libteredo/tunnel.h ++++ b/libteredo/tunnel.h +@@ -32,6 +32,7 @@ + # define LIBTEREDO_TUNNEL_H + + # include ++# include + + # ifdef __cplusplus + extern "C" { diff --git a/ipv6/mrd6/Makefile b/ipv6/mrd6/Makefile new file mode 100644 index 0000000..d71ed34 --- /dev/null +++ b/ipv6/mrd6/Makefile @@ -0,0 +1,75 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mrd6 +PKG_VERSION:=0.9.6 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz +PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/m/mrd6/ +PKG_MD5SUM:=a59d87857654ff92426062ad5664fcd6 + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/mrd6 + SECTION:=ipv6 + CATEGORY:=IPv6 + TITLE:=IPv6 multicast routing daemon + URL:=http://fivebits.net/proj/mrd6 + DEPENDS:=+libstdcpp +endef + +define Package/mrd6/description + Multicast is becoming a major component in next generation networks, used + in several scenarios, from video broadcasting to multimedia conferencing. + In order to be implemented, new technology needs supporting hardware and + software across a set of devices and systems. MRD6 is an implementation of + a modular IPv6 Multicast Routing Framework for the Linux operating system + and provides MLDv2 (as well as MLDv1), PIM-SM and MBGP support. +endef + +MRD6_MAKEFLAGS:= \ + $(TARGET_CONFIGURE_OPTS) \ + OPTIMIZE=yes \ + SPACE_OPTIMIZE=yes \ + FULL_STATIC=no \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DNO_INET6_OPTION -fno-builtin -fno-rtti" \ + LDFLAGS="$(TARGET_LDFLAGS) -ldl -lm" \ + MODULE_CXX="\$$$$(CC) -shared \$$$$(CXXFLAGS) \$$$$(LDFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + PREFIX="/usr" + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/src $(MRD6_MAKEFLAGS) all +endef + +define Build/Install + $(MAKE) -C $(PKG_BUILD_DIR)/src $(MRD6_MAKEFLAGS) install +endef + +define Package/mrd6/conffiles +/etc/mrd6.conf +endef + +define Package/mrd6/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_CONF) ./files/mrd6.conf $(1)/etc + $(INSTALL_BIN) ./files/mrd6.init $(1)/etc/init.d/mrd6 + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mrd $(1)/usr/sbin/mrd6 + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mrd6sh $(1)/usr/bin/mrd6sh + $(INSTALL_DIR) $(1)/usr/lib/mrd6 + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/mrd6/bgp.so $(1)/usr/lib/mrd6/bgp.so +endef + +$(eval $(call BuildPackage,mrd6)) diff --git a/ipv6/mrd6/files/mrd6.conf b/ipv6/mrd6/files/mrd6.conf new file mode 100644 index 0000000..283ebd4 --- /dev/null +++ b/ipv6/mrd6/files/mrd6.conf @@ -0,0 +1,14 @@ +log { + attach stderr normal; + attach default "/var/log/mrd6.log" message_err; +} + +interfaces disable br-lan; // Should be vlan0 + eth1 but Linux bridge seems broken for multicast +interfaces disable eth0; // Interface to internal bridge +handle-proper-bridge = true; // use ETH_P_ALL to see all packets on wrt54g + +// The default configured RP is m6bone's Renater RP. +// Change this according to your setup + +groups ff00::/8 pim rp = 2001:660:3007:300:1::; + diff --git a/ipv6/mrd6/files/mrd6.init b/ipv6/mrd6/files/mrd6.init new file mode 100644 index 0000000..70b88fb --- /dev/null +++ b/ipv6/mrd6/files/mrd6.init @@ -0,0 +1,22 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start() { + /sbin/lsmod | grep ipv6 > /dev/null + if [ "$?" != "0" ]; then + echo -n "IPv6 stack required by mrd6. Loading ipv6 module: " + /sbin/insmod ipv6 + echo "Done." + fi + echo -n "Starting IPv6 multicast router (mrd6): " + /usr/sbin/mrd6 -f /etc/mrd6.conf -D + echo "Done." +} + +stop() { + echo -n "Stopping IPv6 multicast router (mrd6): " + killall mrd6 + echo "Done." +} + diff --git a/ipv6/mrd6/patches/002-missing_netlink_defs.patch b/ipv6/mrd6/patches/002-missing_netlink_defs.patch new file mode 100644 index 0000000..28ab711 --- /dev/null +++ b/ipv6/mrd6/patches/002-missing_netlink_defs.patch @@ -0,0 +1,58 @@ +Index: mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h 2007-09-21 13:19:06.000000000 +0200 +@@ -0,0 +1,41 @@ ++#include ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) ++ ++#include ++#include ++#include ++ ++#ifndef IFA_RTA ++#define IFA_RTA(r) \ ++ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) ++#endif ++#ifndef IFA_PAYLOAD ++#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg)) ++#endif ++ ++#ifndef IFLA_RTA ++#define IFLA_RTA(r) \ ++ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)))) ++#endif ++#ifndef IFLA_PAYLOAD ++#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg)) ++#endif ++ ++#ifndef NDA_RTA ++#define NDA_RTA(r) \ ++ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg)))) ++#endif ++#ifndef NDA_PAYLOAD ++#define NDA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndmsg)) ++#endif ++ ++#ifndef NDTA_RTA ++#define NDTA_RTA(r) \ ++ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndtmsg)))) ++#endif ++#ifndef NDTA_PAYLOAD ++#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg)) ++#endif ++ ++#endif +Index: mrd6-0.9.5/src/linux/linux_unicast_route.cpp +=================================================================== +--- mrd6-0.9.5.orig/src/linux/linux_unicast_route.cpp 2007-09-21 13:19:05.000000000 +0200 ++++ mrd6-0.9.5/src/linux/linux_unicast_route.cpp 2007-09-21 13:19:06.000000000 +0200 +@@ -23,6 +23,7 @@ + */ + + #include ++#include + + #include + #include diff --git a/ipv6/mrd6/patches/003-debian.patch b/ipv6/mrd6/patches/003-debian.patch new file mode 100644 index 0000000..6b99958 --- /dev/null +++ b/ipv6/mrd6/patches/003-debian.patch @@ -0,0 +1,71 @@ +--- mrd6-0.9.6.orig/src/log.cpp ++++ mrd6-0.9.6/src/log.cpp +@@ -667,3 +667,12 @@ + os.nprintf(32, "%p", val); + } + ++#ifdef __s390__ ++const char *stream_type_format_parameter(size_t) { ++ return "u"; ++} ++ ++void stream_push_formated_type(base_stream &os, size_t val) { ++ os.nprintf(32, "%z", val); ++} ++#endif +--- mrd6-0.9.6.orig/src/mrd.cpp ++++ mrd6-0.9.6/src/mrd.cpp +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -2338,7 +2339,8 @@ + + out.xprintf("Uptime: %{duration}\n", time_duration((time(0) - m_startup) * 1000)); + out.xprintf("Performed tasks: %u (spent %llu ms)\n", m_tasks_stat, m_tasks_time_spent); +- out.xprintf("Registered sockets: %u reading, %u writing\n", m_read.size(), m_write.size()); ++ out.xprintf("Registered sockets: %u reading, %u writing\n", ++ (uint32_t)m_read.size(), (uint32_t)m_write.size()); + out.xprintf("MRIB prefix count: %u\n", mrib().registry_prefix_count()); + out.xprintf("Interface count: %u\n", m_intflist.size()); + out.xprintf("Group state count: %u\n", m_grplist.size()); +--- mrd6-0.9.6.orig/src/bgp/bgp.cpp ++++ mrd6-0.9.6/src/bgp/bgp.cpp +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + + #include + +--- mrd6-0.9.6.orig/src/linux/mrd_components.cpp ++++ mrd6-0.9.6/src/linux/mrd_components.cpp +@@ -92,8 +92,6 @@ + #if defined(__GLIBC__) + #if defined(__i386__) + return (void *)base->uc_mcontext.gregs[REG_EIP]; +-#elif defined(__mips__) +- return (void *)base->uc_mcontext.gpregs[CTX_EPC]; + #endif + #endif + return 0; +--- mrd6-0.9.6.orig/include/mrd/log.h ++++ mrd6-0.9.6/include/mrd/log.h +@@ -53,6 +53,12 @@ + void stream_push_formated_type(base_stream &, const char *val); + void stream_push_formated_type(base_stream &, const void *val); + ++ ++#ifdef __s390__ ++const char *stream_type_format_parameter(size_t); ++void stream_push_formated_type(base_stream &, size_t val); ++#endif ++ + /*! + * base log stream + */ diff --git a/ipv6/mrd6/patches/004-ambiguous_call_fix.patch b/ipv6/mrd6/patches/004-ambiguous_call_fix.patch new file mode 100644 index 0000000..a72eb24 --- /dev/null +++ b/ipv6/mrd6/patches/004-ambiguous_call_fix.patch @@ -0,0 +1,13 @@ +--- a/src/mrd.cpp ++++ b/src/mrd.cpp +@@ -2342,8 +2342,8 @@ bool mrd::show_info(base_stream &out, co + out.xprintf("Registered sockets: %u reading, %u writing\n", + (uint32_t)m_read.size(), (uint32_t)m_write.size()); + out.xprintf("MRIB prefix count: %u\n", mrib().registry_prefix_count()); +- out.xprintf("Interface count: %u\n", m_intflist.size()); +- out.xprintf("Group state count: %u\n", m_grplist.size()); ++ out.xprintf("Interface count: %u\n", (uint32_t)m_intflist.size()); ++ out.xprintf("Group state count: %u\n", (uint32_t)m_grplist.size()); + + return true; + } diff --git a/ipv6/ndisc/Makefile b/ipv6/ndisc/Makefile new file mode 100644 index 0000000..d9d20a8 --- /dev/null +++ b/ipv6/ndisc/Makefile @@ -0,0 +1,99 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ndisc6 +PKG_VERSION:=1.0.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.remlab.net/files/ndisc6 +PKG_MD5SUM:=d0b8233a60e29ad78d9aebb8cef0b3f2 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ndisc + SECTION:=ipv6 + CATEGORY:=IPv6 + SUBMENU:=IPv6 discovery tools + TITLE:=IPv6 discovery tools + URL:=http://www.remlab.net/ndisc6/ +endef + +define Package/ndisc/description +IPv6 discovery tools +endef + +define Package/ndisc6 + $(call Package/ndisc) + TITLE:=An ICMPv6 neighbour discovery tool + DEPENDS:=+libpthread +librt +endef + +define Package/ndisc6/description +An ICMPv6 neighbour discovery tools +endef + +define Package/rdisc6 + $(call Package/ndisc) + TITLE:=An ICMPv6 router discovery tool + DEPENDS:=+libpthread +librt +endef + +define Package/rdisc6/description +An ICMPv6 router discovery tool +endef + +define Package/tcptraceroute6 + $(call Package/ndisc) + TITLE:=A TCP/IPv6-based traceroute implementation +endef + +define Package/tcptraceroute6/description +A TCP/IPv6-based traceroute implementation +endef + +define Package/rdnssd + $(call Package/ndisc) + TITLE:=DNS server discovery daemon + DEPENDS:=+libpthread +librt +endef + +define Package/rdnssd/description +A recursive DNS server discovery daemon gathering +information through stateless IPv6 autoconfiguration (RFC5006) +endef + +TARGET_CFLAGS += -std=c99 + +define Package/ndisc6/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ndisc6 $(1)/usr/bin/ +endef + +define Package/rdisc6/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdisc6 $(1)/usr/bin/ +endef + +define Package/tcptraceroute6/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tcptraceroute6 $(1)/usr/bin/ +endef + +define Package/rdnssd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rdnssd $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,ndisc6)) +$(eval $(call BuildPackage,rdisc6)) +$(eval $(call BuildPackage,tcptraceroute6)) +$(eval $(call BuildPackage,rdnssd)) diff --git a/ipv6/ndisc/patches/100-favor_bsd.patch b/ipv6/ndisc/patches/100-favor_bsd.patch new file mode 100644 index 0000000..ed6090d --- /dev/null +++ b/ipv6/ndisc/patches/100-favor_bsd.patch @@ -0,0 +1,20 @@ +--- a/src/trace-tcp.c ++++ b/src/trace-tcp.c +@@ -24,6 +24,7 @@ + + #undef _GNU_SOURCE + #define _BSD_SOURCE 1 ++#define __FAVOR_BSD 1 + + #include + #include +--- a/src/trace-udp.c ++++ b/src/trace-udp.c +@@ -24,6 +24,7 @@ + + #undef _GNU_SOURCE + #define _BSD_SOURCE 1 ++#define __FAVOR_BSD 1 + + #include + #include diff --git a/ipv6/ndisc/patches/110-strverscmp.patch b/ipv6/ndisc/patches/110-strverscmp.patch new file mode 100644 index 0000000..345661f --- /dev/null +++ b/ipv6/ndisc/patches/110-strverscmp.patch @@ -0,0 +1,175 @@ +--- a/rdnssd/Makefile.am ++++ b/rdnssd/Makefile.am +@@ -30,7 +30,8 @@ conf_SCRIPTS = merge-hook + # rdnssd + rdnssd_SOURCES = rdnssd.c rdnssd.h \ + icmp.c \ +- netlink.c ++ netlink.c \ ++ strverscmp.c + rdnssd_LDADD = $(LIBRT) \ + @top_builddir@/compat/libcompat.a + +--- a/rdnssd/Makefile.in ++++ b/rdnssd/Makefile.in +@@ -60,7 +60,7 @@ CONFIG_CLEAN_FILES = + CONFIG_CLEAN_VPATH_FILES = + am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(confdir)" + PROGRAMS = $(sbin_PROGRAMS) +-am_rdnssd_OBJECTS = rdnssd.$(OBJEXT) icmp.$(OBJEXT) netlink.$(OBJEXT) ++am_rdnssd_OBJECTS = rdnssd.$(OBJEXT) icmp.$(OBJEXT) netlink.$(OBJEXT) strverscmp.$(OBJEXT) + rdnssd_OBJECTS = $(am_rdnssd_OBJECTS) + am__DEPENDENCIES_1 = + rdnssd_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@@ -251,7 +251,8 @@ conf_SCRIPTS = merge-hook + # rdnssd + rdnssd_SOURCES = rdnssd.c rdnssd.h \ + icmp.c \ +- netlink.c ++ netlink.c \ ++ strverscmp.c + + rdnssd_LDADD = $(LIBRT) \ + @top_builddir@/compat/libcompat.a +@@ -373,6 +374,7 @@ distclean-compile: + + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icmp.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strverscmp.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdnssd.Po@am__quote@ + + .c.o: +--- /dev/null ++++ b/rdnssd/strverscmp.c +@@ -0,0 +1,131 @@ ++/* Compare strings while treating digits characters numerically. ++ Copyright (C) 1997, 2000, 2002, 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by Jean-François Bignolles , 1997. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with this program; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#include ++#include ++ ++/* states: S_N: normal, S_I: comparing integral part, S_F: comparing ++ fractional parts, S_Z: idem but with leading Zeroes only */ ++#define S_N 0x0 ++#define S_I 0x4 ++#define S_F 0x8 ++#define S_Z 0xC ++ ++/* result_type: CMP: return diff; LEN: compare using len_diff/diff */ ++#define CMP 2 ++#define LEN 3 ++ ++ ++/* ISDIGIT differs from isdigit, as follows: ++ - Its arg may be any int or unsigned int; it need not be an unsigned char. ++ - It's guaranteed to evaluate its argument exactly once. ++ - It's typically faster. ++ POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to ++ ISDIGIT_LOCALE unless it's important to use the locale's definition ++ of `digit' even when the host does not conform to POSIX. */ ++#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) ++ ++#undef __strverscmp ++#undef strverscmp ++ ++#ifndef weak_alias ++# define __strverscmp strverscmp ++#endif ++ ++/* Compare S1 and S2 as strings holding indices/version numbers, ++ returning less than, equal to or greater than zero if S1 is less than, ++ equal to or greater than S2 (for more info, see the texinfo doc). ++*/ ++ ++int ++__strverscmp (const char *s1, const char *s2) ++{ ++ const unsigned char *p1 = (const unsigned char *) s1; ++ const unsigned char *p2 = (const unsigned char *) s2; ++ unsigned char c1, c2; ++ int state; ++ int diff; ++ ++ /* Symbol(s) 0 [1-9] others (padding) ++ Transition (10) 0 (01) d (00) x (11) - */ ++ static const unsigned int next_state[] = ++ { ++ /* state x d 0 - */ ++ /* S_N */ S_N, S_I, S_Z, S_N, ++ /* S_I */ S_N, S_I, S_I, S_I, ++ /* S_F */ S_N, S_F, S_F, S_F, ++ /* S_Z */ S_N, S_F, S_Z, S_Z ++ }; ++ ++ static const int result_type[] = ++ { ++ /* state x/x x/d x/0 x/- d/x d/d d/0 d/- ++ 0/x 0/d 0/0 0/- -/x -/d -/0 -/- */ ++ ++ /* S_N */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP, ++ CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, ++ /* S_I */ CMP, -1, -1, CMP, 1, LEN, LEN, CMP, ++ 1, LEN, LEN, CMP, CMP, CMP, CMP, CMP, ++ /* S_F */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP, ++ CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, ++ /* S_Z */ CMP, 1, 1, CMP, -1, CMP, CMP, CMP, ++ -1, CMP, CMP, CMP ++ }; ++ ++ if (p1 == p2) ++ return 0; ++ ++ c1 = *p1++; ++ c2 = *p2++; ++ /* Hint: '0' is a digit too. */ ++ state = S_N | ((c1 == '0') + (ISDIGIT (c1) != 0)); ++ ++ while ((diff = c1 - c2) == 0 && c1 != '\0') ++ { ++ state = next_state[state]; ++ c1 = *p1++; ++ c2 = *p2++; ++ state |= (c1 == '0') + (ISDIGIT (c1) != 0); ++ } ++ ++ state = result_type[state << 2 | ((c2 == '0') + (ISDIGIT (c2) != 0))]; ++ ++ switch (state) ++ { ++ case CMP: ++ return diff; ++ ++ case LEN: ++ while (ISDIGIT (*p1++)) ++ if (!ISDIGIT (*p2++)) ++ return 1; ++ ++ return ISDIGIT (*p2) ? -1 : diff; ++ ++ default: ++ return state; ++ } ++} ++#ifdef weak_alias ++weak_alias (__strverscmp, strverscmp) ++#endif diff --git a/ipv6/ndisc/patches/120-ppoll.patch b/ipv6/ndisc/patches/120-ppoll.patch new file mode 100644 index 0000000..07b1fca --- /dev/null +++ b/ipv6/ndisc/patches/120-ppoll.patch @@ -0,0 +1,47 @@ +--- a/compat/fixups.h ++++ b/compat/fixups.h +@@ -50,13 +50,25 @@ int inet6_rth_add (void *bp, const struc + # define IPV6_RTHDR_TYPE_0 0 + #endif + +-#ifndef HAVE_PPOLL ++#include ++ ++#ifdef HAVE_PPOLL ++static inline int ++compat_ppoll (struct pollfd *restrict fds, int n, ++ const struct timespec *restrict ts, ++ const sigset_t *restrict sigmask) ++{ ++ return ppoll(fds, n, ts, sigmask); ++} ++ ++#else + # include + struct pollfd; + struct timespec; + +-int ppoll (struct pollfd *restrict fds, int n, +- const struct timespec *restrict ts, +- const sigset_t *restrict sigmask); ++int compat_ppoll (struct pollfd *restrict fds, int n, ++ const struct timespec *restrict ts, ++ const sigset_t *restrict sigmask); + #endif + ++#define ppoll compat_ppoll +--- a/compat/ppoll.c ++++ b/compat/ppoll.c +@@ -32,9 +32,9 @@ + # include // sigprocmask is not thread-safe + #endif + +-int ppoll (struct pollfd *restrict fds, int n, +- const struct timespec *restrict ts, +- const sigset_t *restrict sigset) ++int compat_ppoll (struct pollfd *restrict fds, int n, ++ const struct timespec *restrict ts, ++ const sigset_t *restrict sigset) + { + sigset_t origset; + int val; diff --git a/ipv6/ptrtd/Makefile b/ipv6/ptrtd/Makefile new file mode 100644 index 0000000..d771207 --- /dev/null +++ b/ipv6/ptrtd/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ptrtd +PKG_VERSION:=0.5.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://v6web.litech.org/ptrtd/dist/ +PKG_MD5SUM:=bfe026445fdc4fe509a9c70ec4551744 + +include $(INCLUDE_DIR)/package.mk + +define Package/ptrtd + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+kmod-ipv6 +kmod-tun +ip + TITLE:=Portable Transport Relay Translator Daemon + URL:=http://v6web.litech.org/ptrtd/ +endef + +define Package/ptrtd/description + The Portable Transport Relay Translator Daemon (pTRTd) + is a method of allowing IPv6 hosts to communicate with IPv4 hosts. +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS)" + +define Package/ptrtd/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/ptrtd.init $(1)/etc/init.d/ptrtd +endef + +$(eval $(call BuildPackage,ptrtd)) diff --git a/ipv6/ptrtd/files/ptrtd.init b/ipv6/ptrtd/files/ptrtd.init new file mode 100644 index 0000000..8f4ae24 --- /dev/null +++ b/ipv6/ptrtd/files/ptrtd.init @@ -0,0 +1,26 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=60 +BIN=ptrtd +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +PREFIX="3ffe:abcd:1234:9876::" +LEN=64 + + +start() { + mkdir -p $RUN_D + $BIN -p $PREFIX -l $LEN +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + +restart() { + stop + sleep 1 + start +} diff --git a/ipv6/ptrtd/patches/100-ptrtd-0.5.2-openwrt.patch b/ipv6/ptrtd/patches/100-ptrtd-0.5.2-openwrt.patch new file mode 100644 index 0000000..3a9d003 --- /dev/null +++ b/ipv6/ptrtd/patches/100-ptrtd-0.5.2-openwrt.patch @@ -0,0 +1,41 @@ +--- ptrtd-0.5.2/ptrtd.old 2007-02-22 16:10:57.896689015 +0100 ++++ ptrtd-0.5.2/ptrtd.c 2007-02-22 16:11:39.194388792 +0100 +@@ -201,13 +201,13 @@ + if( do_config ) + { + printf( "Tunnel: %s\n", ifname ); +- sprintf( cmd, "/sbin/ip link set %s up", ifname ); ++ sprintf( cmd, "/usr/sbin/ip link set %s up", ifname ); + printf( "command: %s\n", cmd ); + system( cmd ); +- sprintf( cmd, "/sbin/ip addr add fe80::1/64 dev %s", ifname ); ++ sprintf( cmd, "/usr/sbin/ip addr add fe80::1/64 dev %s", ifname ); + printf( "command: %s\n", cmd ); + system( cmd ); +- sprintf( cmd, "/sbin/ip route add %s/%d dev %s via fe80::5", ++ sprintf( cmd, "/usr/sbin/ip route add %s/%d dev %s via fe80::5", + prefix, plen, ifname ); + printf( "command: %s\n", cmd ); + system( cmd ); +--- ptrtd-0.5.2/tap802ipd.old 2007-02-22 16:11:22.600920230 +0100 ++++ ptrtd-0.5.2/tap802ipd.c 2007-02-22 16:11:51.040581581 +0100 +@@ -125,16 +125,16 @@ + + tap_get_name( (struct iface *)tap_iface, ifname ); + printf( "Tunnel: %s\n", ifname ); +- sprintf( cmd, "/sbin/ip link set %s address %02x:%02x:%02x:%02x:%02x:%02x up\n", ifname, ++ sprintf( cmd, "/usr/sbin/ip link set %s address %02x:%02x:%02x:%02x:%02x:%02x up\n", ifname, + ip_iface->hwaddr[0], ip_iface->hwaddr[1], + ip_iface->hwaddr[2], ip_iface->hwaddr[3], + ip_iface->hwaddr[4], ip_iface->hwaddr[5] ); + printf( "command: %s\n", cmd ); + system( cmd ); +- //sprintf( cmd, "/sbin/ip addr add fe80::1/64 dev %s", ifname ); ++ //sprintf( cmd, "/usr/sbin/ip addr add fe80::1/64 dev %s", ifname ); + //printf( "command: %s\n", cmd ); + //system( cmd ); +- //sprintf( cmd, "/sbin/ip route add %s/%d dev %s via fe80::5", prefix, plen, ifname ); ++ //sprintf( cmd, "/usr/sbin/ip route add %s/%d dev %s via fe80::5", prefix, plen, ifname ); + //printf( "command: %s\n", cmd ); + //system( cmd ); + } diff --git a/ipv6/radvd/Makefile b/ipv6/radvd/Makefile new file mode 100644 index 0000000..bdd0a58 --- /dev/null +++ b/ipv6/radvd/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=radvd +PKG_VERSION:=1.8.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://v6web.litech.org/radvd/dist \ + http://download.sourcemage.org/mirror +PKG_MD5SUM:=73d533b7b20f5554c8d3e33643945442 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/radvd/Default + SECTION:=ipv6 + CATEGORY:=IPv6 + TITLE:=IPv6 Routing Advertisement + URL:=http://v6web.litech.org/radvd/ + DEPENDS:=+kmod-ipv6 +endef + +define Package/radvd + $(call Package/radvd/Default) + TITLE+= Daemon +endef + +define Package/radvd/description +radvd is the router advertisement daemon for IPv6. It listens to router +solicitations and sends router advertisements as described in "Neighbor +Discovery for IP Version 6 (IPv6)" (RFC 4861). With these advertisements hosts +can automatically configure their addresses and some other parameters. They also +can choose a default router based on these advertisements. +endef + +define Package/radvdump + $(call Package/radvd/Default) + TITLE+= Dumper +endef + +define Package/radvdump/description +radvdump prints out the contents of incoming router advertisements sent by radvd +or some other software implementing (parts of) "Neighbor Discovery for IP +Version 6 (IPv6)" (RFC 4861). +endef + +CONFIGURE_ARGS += \ + --with-configfile=/etc/radvd.conf \ + --with-logfile=/var/log/radvd.log \ + --with-pidfile=/var/run/radvd.pid + +define Package/radvd/conffiles +/etc/config/radvd +endef + +define Package/radvd/install + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/radvd.config $(1)/etc/config/radvd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/radvd.init $(1)/etc/init.d/radvd + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DATA) ./files/radvd.hotplug $(1)/etc/hotplug.d/iface/05-radvd + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radvd $(1)/usr/sbin/ +endef + +define Package/radvdump/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radvdump $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,radvd)) +$(eval $(call BuildPackage,radvdump)) diff --git a/ipv6/radvd/files/radvd.config b/ipv6/radvd/files/radvd.config new file mode 100644 index 0000000..1616c15 --- /dev/null +++ b/ipv6/radvd/files/radvd.config @@ -0,0 +1,32 @@ +config interface + option interface 'lan' + option AdvSendAdvert 1 + option AdvManagedFlag 0 + option AdvOtherConfigFlag 0 + list client '' + option ignore 1 + +config prefix + option interface 'lan' + # If not specified, a non-link-local prefix of the interface is used + list prefix '' + option AdvOnLink 1 + option AdvAutonomous 1 + option AdvRouterAddr 0 + option ignore 1 + +config route + option interface 'lan' + list prefix '' + option ignore 1 + +config rdnss + option interface 'lan' + # If not specified, the link-local address of the interface is used + list addr '' + option ignore 1 + +config dnssl + option interface 'lan' + list suffix '' + option ignore 1 diff --git a/ipv6/radvd/files/radvd.hotplug b/ipv6/radvd/files/radvd.hotplug new file mode 100644 index 0000000..10a7ca8 --- /dev/null +++ b/ipv6/radvd/files/radvd.hotplug @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ "$ACTION" = ifup ]; then + killall -HUP radvd 2>/dev/null +fi diff --git a/ipv6/radvd/files/radvd.init b/ipv6/radvd/files/radvd.init new file mode 100644 index 0000000..d513bba --- /dev/null +++ b/ipv6/radvd/files/radvd.init @@ -0,0 +1,433 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 Alina Friedrichsen +START=50 + +RADVD_INTERFACE_STRING_OPTIONS='MaxRtrAdvInterval MinRtrAdvInterval MinDelayBetweenRAs AdvLinkMTU AdvReachableTime AdvRetransTimer AdvCurHopLimit AdvDefaultLifetime AdvDefaultPreference HomeAgentLifetime HomeAgentPreference' +RADVD_INTERFACE_BOOLEAN_OPTIONS='IgnoreIfMissing AdvSendAdvert UnicastOnly AdvManagedFlag AdvOtherConfigFlag AdvSourceLLAddress AdvHomeAgentFlag AdvHomeAgentInfo AdvMobRtrSupportFlag AdvIntervalOpt' + +RADVD_PREFIX_STRING_OPTIONS='AdvValidLifetime AdvPreferredLifetime' +RADVD_PREFIX_BOOLEAN_OPTIONS='AdvOnLink AdvAutonomous AdvRouterAddr DeprecatePrefix DecrementLifetimes' + +RADVD_ROUTE_STRING_OPTIONS='AdvRouteLifetime AdvRoutePreference' +RADVD_ROUTE_BOOLEAN_OPTIONS='RemoveRoute' + +RADVD_RDNSS_STRING_OPTIONS='AdvRDNSSLifetime FlushRDNSS' + +RADVD_DNSSL_STRING_OPTIONS='AdvDNSSLLifetime FlushDNSSL' + +validate_varname() { + local varname=$1 + [ -z "$varname" -o "$varname" != "${varname%%[!A-Za-z0-9_]*}" ] && return 1 + return 0 +} + +validate_ifname() { + local ifname=$1 + [ -z "$ifname" -o "$ifname" != "${ifname%%[!A-Za-z0-9.:_-]*}" ] && return 1 + return 0 +} + +validate_ip6addr() { + local ip6addr=$1 + [ -z "$ip6addr" -o "$ip6addr" != "${ip6addr%%[!A-Fa-f0-9.:]*}" ] && return 1 + return 0 +} + +validate_ip6prefix() { + local ip6prefix=$1 + [ -z "$ip6prefix" -o "$ip6prefix" != "${ip6prefix%%[!A-Fa-f0-9./:]*}" ] && return 1 + return 0 +} + +validate_radvd_string() { + local radvd_string=$1 + [ -z "$radvd_string" -o "$radvd_string" != "${radvd_string%%[!a-z0-9.:_-]*}" ] && return 1 + return 0 +} + +get_ifname() { + local interface=$1 + validate_varname "$interface" || return 1 + local cfgt + local ifname + + scan_interfaces + config_get cfgt "$interface" TYPE + [ "$cfgt" != "interface" ] && return 1 + config_get ifname "$interface" ifname + validate_ifname "$ifname" || return 1 + printf '%s\n' "$ifname" + + return 0 +} + +get_ip6addr() { + local ifname=$1 + local scope=$2 + local iproute2_scope + local ifconfig_scope + local ip6addr + + case "$scope" in + host) iproute2_scope=host ifconfig_scope=Host;; + link) iproute2_scope=link ifconfig_scope=Link;; + site) iproute2_scope=site ifconfig_scope=Site;; + global) iproute2_scope=global ifconfig_scope=Global;; + "") get_ip6addr "$ifname" global || get_ip6addr "$ifname" site; return;; + *) return 1;; + esac + + ip6addr=$(LANG=C ip -f inet6 -- addr show dev "$ifname" 2> /dev/null | sed -n -e 's/^ *inet6 \([A-Fa-f0-9.:]*[/][0-9]*\) scope '"$iproute2_scope"' $/\1/p' | head -n 1) + if [ -z "$ip6addr" ]; then + ip6addr=$(LANG=C ifconfig "$ifname" 2> /dev/null | sed -n -e 's/^ *inet6 addr: \([A-Fa-f0-9.:]*[/][0-9]*\) Scope:'"$ifconfig_scope"'$/\1/p' | tail -n 1) + [ -z "$ip6addr" ] && return 1 + fi + + printf '%s\n' "$ip6addr" + + return 0 +} + +radvd_find_config_file() { + local cfg=$1 + validate_varname "$cfg" || return 0 + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + config_get RADVD_CONFIG_FILE "$cfg" config_file + + return 0 +} + +radvd_add_interface() { + local cfg=$1 + validate_varname "$cfg" || return 0 + local ignore + local interfaces + local interface + local list_interface + local exist + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + + config_get interfaces "$cfg" interface + for interface in $interfaces; do + validate_varname "$interface" || continue + exist=0 + for list_interface in $RADVD_INTERFACES; do + [ "$interface" = "$list_interface" ] && exist=1 + done + [ "$exist" -eq 0 ] && RADVD_INTERFACES="$RADVD_INTERFACES $interface" + done + + return 0 +} + +radvd_write_interface() { + local cfg=$1 + validate_varname "$cfg" || return 0 + local ignore + local interfaces + local interface + local name + local value + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + + config_get interfaces "$cfg" interface + exist=0 + for interface in $interfaces; do + [ "$INTERFACE" = "$interface" ] && exist=1 + done + [ "$exist" -eq 0 ] && return 0 + + for name in $RADVD_INTERFACE_STRING_OPTIONS; do + config_get value "$cfg" "$name" + validate_radvd_string "$value" || continue + printf '\t%s %s;\n' "$name" "$value" + done + + for name in $RADVD_INTERFACE_BOOLEAN_OPTIONS; do + config_get value "$cfg" "$name" + [ -z "$value" ] && continue + config_get_bool value "$cfg" "$name" 0 + if [ "$value" -ne 0 ]; then + printf '\t%s on;\n' "$name" + else + printf '\t%s off;\n' "$name" + fi + done + + config_get clients "$cfg" client + if [ -n "$clients" ]; then + printf '\n\tclients\n\t{\n' + + for client in $clients; do + validate_ip6addr "$client" || continue + printf '\t\t%s;\n' "$client" + done + + printf '\t};\n' + fi + + return 0 +} + +radvd_write_prefix() { + local cfg=$1 + validate_varname "$cfg" || return 0 + local ignore + local interfaces + local interface + local prefixes + local prefix + local name + local value + local cfgt + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + + config_get interfaces "$cfg" interface + exist=0 + for interface in $interfaces; do + [ "$INTERFACE" = "$interface" ] && exist=1 + done + [ "$exist" -eq 0 ] && return 0 + + config_get prefixes "$cfg" prefix + if [ -z "$prefixes" ]; then + prefixes=$(get_ip6addr "$IFNAME") || return 0 + fi + + for prefix in $prefixes; do + validate_ip6prefix "$prefix" || continue + printf '\n\tprefix %s\n\t{\n' "$prefix" + + for name in $RADVD_PREFIX_STRING_OPTIONS; do + config_get value "$cfg" "$name" + validate_radvd_string "$value" || continue + printf '\t\t%s %s;\n' "$name" "$value" + done + + for name in $RADVD_PREFIX_BOOLEAN_OPTIONS; do + config_get value "$cfg" "$name" + [ -z "$value" ] && continue + config_get_bool value "$cfg" "$name" 0 + if [ "$value" -ne 0 ]; then + printf '\t\t%s on;\n' "$name" + else + printf '\t\t%s off;\n' "$name" + fi + done + + config_get value "$cfg" Base6Interface + if [ -n "$value" ]; then + if ifname=$(get_ifname "$value"); then + printf '\t\t%s %s;\n' "Base6Interface" "$ifname" + fi + fi + + config_get value "$cfg" Base6to4Interface + if [ -n "$value" ]; then + if ifname=$(get_ifname "$value"); then + printf '\t\t%s %s;\n' "Base6to4Interface" "$ifname" + fi + fi + + printf '\t};\n' + done + + return 0 +} + +radvd_write_route() { + local cfg=$1 + validate_varname "$cfg" || return 0 + local ignore + local interfaces + local interface + local prefixes + local prefix + local name + local value + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + + config_get interfaces "$cfg" interface + exist=0 + for interface in $interfaces; do + [ "$INTERFACE" = "$interface" ] && exist=1 + done + [ "$exist" -eq 0 ] && return 0 + + config_get prefixes "$cfg" prefix + for prefix in $prefixes; do + validate_ip6prefix "$prefix" || continue + printf '\n\troute %s\n\t{\n' "$prefix" + + for name in $RADVD_ROUTE_STRING_OPTIONS; do + config_get value "$cfg" "$name" + validate_radvd_string "$value" || continue + printf '\t\t%s %s;\n' "$name" "$value" + done + + for name in $RADVD_ROUTE_BOOLEAN_OPTIONS; do + config_get value "$cfg" "$name" + [ -z "$value" ] && continue + config_get_bool value "$cfg" "$name" 0 + if [ "$value" -ne 0 ]; then + printf '\t\t%s on;\n' "$name" + else + printf '\t\t%s off;\n' "$name" + fi + done + + printf '\t};\n' + done + + return 0 +} + +radvd_write_rdnss() { + local cfg=$1 + validate_varname "$cfg" || return 0 + local ignore + local interfaces + local interface + local addrs + local addr + local addr_list + local name + local value + local i + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + + config_get interfaces "$cfg" interface + exist=0 + for interface in $interfaces; do + [ "$INTERFACE" = "$interface" ] && exist=1 + done + [ "$exist" -eq 0 ] && return 0 + + config_get addrs "$cfg" addr + i=0 + for addr in $addrs; do + [ "$i" -ge 3 ] && break + validate_ip6addr "$addr" || continue + addr_list="$addr_list $addr" + i=$(($i+1)) + done + + if [ -z "$addr_list" ]; then + addr=$(get_ip6addr "$IFNAME" link) || return 0 + addr_list=" ${addr%%[/]*}" + fi + + printf '\n\tRDNSS%s\n\t{\n' "$addr_list" + + for name in $RADVD_RDNSS_STRING_OPTIONS; do + config_get value "$cfg" "$name" + validate_radvd_string "$value" || continue + printf '\t\t%s %s;\n' "$name" "$value" + done + + printf '\t};\n' + + return 0 +} + +radvd_write_dnssl() { + local cfg=$1 + validate_varname "$cfg" || return 0 + local ignore + local interfaces + local interface + local suffixes + local suffix + local suffix_list + local name + local value + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + + config_get interfaces "$cfg" interface + exist=0 + for interface in $interfaces; do + [ "$INTERFACE" = "$interface" ] && exist=1 + done + [ "$exist" -eq 0 ] && return 0 + + config_get suffixes "$cfg" suffix + for suffix in $suffixes; do + validate_radvd_string "$suffix" || continue + suffix_list="$suffix_list $suffix" + done + + printf '\n\tDNSSL%s\n\t{\n' "$suffix_list" + + for name in $RADVD_DNSSL_STRING_OPTIONS; do + config_get value "$cfg" "$name" + validate_radvd_string "$value" || continue + printf '\t\t%s %s;\n' "$name" "$value" + done + + printf '\t};\n' + + return 0 +} + +radvd_write_config() { + include /lib/network + + RADVD_INTERFACES= + config_foreach radvd_add_interface interface + config_foreach radvd_add_interface prefix + config_foreach radvd_add_interface route + config_foreach radvd_add_interface RDNSS + config_foreach radvd_add_interface DNSSL + + for INTERFACE in $RADVD_INTERFACES; do + IFNAME=$(get_ifname "$INTERFACE") || continue + printf 'interface %s\n{\n' "$IFNAME" + config_foreach radvd_write_interface interface + config_foreach radvd_write_prefix prefix + config_foreach radvd_write_route route + config_foreach radvd_write_rdnss rdnss + config_foreach radvd_write_dnssl dnssl + printf '};\n\n' + done + + return 0 +} + +start() { + config_load radvd + + RADVD_CONFIG_FILE= + config_foreach radvd_find_config_file radvd + + if [ -z "$RADVD_CONFIG_FILE" ]; then + mkdir -p -- /var/etc/ + radvd_write_config > /var/etc/radvd.conf + if [ -s "/var/etc/radvd.conf" ]; then + RADVD_CONFIG_FILE=/var/etc/radvd.conf + fi + fi + + [ -z "$RADVD_CONFIG_FILE" ] && return 1 + + sysctl -w net.ipv6.conf.all.forwarding=1 > /dev/null 2> /dev/null + + radvd -C "$RADVD_CONFIG_FILE" -m stderr_syslog -p /var/run/radvd.pid +} + +stop() { + killall radvd +} diff --git a/ipv6/send/Makefile b/ipv6/send/Makefile new file mode 100644 index 0000000..b08a109 --- /dev/null +++ b/ipv6/send/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2008-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=send +PKG_VERSION:=0.2-5.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)d_$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://mobisend.org/debian-mobisend/pool/main/s/sendd/ +PKG_MD5SUM:=99c18e5d965e57d580f146d00145251a +PKG_BUILD_DIR:=$(BUILD_DIR)/sendd-0.2 + +PKG_BUILD_PARALLEL:=0 + +include $(INCLUDE_DIR)/package.mk + +define Package/send + SECTION:=ipv6 + CATEGORY:=IPv6 + TITLE:=Secure Neighbor Discovery implementation + URL:=http://mobisend.org/debian-mobisend.html + DEPENDS:=+kmod-ipv6 +ip6tables +libnetfilter-queue +libopenssl +libreadline +libncurses +endef + +define Package/send/description + DoCoMo's Open Source SEND project provides an implementation of RFC 3971 + Secure Neighbor Discovery (SEND). SEND cryptographically secures the + IPv6 neighbor discovery protocol, countering the threats discussed in + RFC 3756 (IPv6 Neighbor Discovery (ND) Trust Models and Threats). +endef + +define Package/send/conffiles +/etc/sendd/sendd.conf +/etc/sendd/params.conf +endef + +TARGET_CPPFLAGS+=-D_GNU_SOURCE + +MAKE_FLAGS += \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnetfilter_queue $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) -lnfnetlink" \ + +define Package/send/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sendd/sendd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/sendd/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/examples/sendd.conf $(1)/etc/sendd/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/examples/params.conf $(1)/etc/sendd/ +endef + +$(eval $(call BuildPackage,send)) diff --git a/ipv6/send/patches/001-libnetfilter_queue_update.patch b/ipv6/send/patches/001-libnetfilter_queue_update.patch new file mode 100644 index 0000000..f300d7c --- /dev/null +++ b/ipv6/send/patches/001-libnetfilter_queue_update.patch @@ -0,0 +1,388 @@ +# Update sendd to: +# +# - use $DESTDIR for prefix (Debian interest) +# - use libnetfilter_queue instead of deprecated libipq +# +# Under GPLv2 - Copyright (C) 2008 - EADS - Arnaud Ebalard +--- a/Makefile.config ++++ b/Makefile.config +@@ -19,7 +19,7 @@ OS=linux + #CC=gcc-4.0 + + # Where to install +-prefix=/usr ++prefix=$(DESTDIR)/usr + + # Set to "y" to build MT versions of sendd and cgatool + USE_THREADS=n +--- a/README ++++ b/README +@@ -20,7 +20,7 @@ Linux: + o CONFIG_NETFILTER, CONFIG_IPV6, CONFIG_IP6_NF_QUEUE, CONFIG_IP6_NF_IPTABLES, + CONFIG_IP6_NF_FILTER enabled in your kernel config. + o netfilter ip6tables command +- o netfilter libipq development library and headers ++ o netfilter libnetfilter_queue development library and headers + + FreeBSD: + o NETGRAPH, NETGRAPH_BPF, NETGRAPH_ETHER, NETGRAPH_SOCKET enabled in +--- a/cgatool/Makefile ++++ b/cgatool/Makefile +@@ -25,7 +25,7 @@ endif + + ifeq ($(USE_CONSOLE),y) + ifeq ($(USE_READLINE),y) +-LDLIBS += -lreadline -lncurses ++LDLIBS += -lreadline + endif + endif + +--- a/sendd/Makefile ++++ b/sendd/Makefile +@@ -37,7 +37,7 @@ endif + + ifeq ($(USE_CONSOLE),y) + ifeq ($(USE_READLINE),y) +-LDLIBS += -lreadline -lncurses ++LDLIBS += -lreadline + endif + endif + +--- a/sendd/os-linux/Makefile ++++ b/sendd/os-linux/Makefile +@@ -1,23 +1,5 @@ + + OBJS += os/addr.o os/ipq.o os/rand.o os/snd_linux.o +-OSLIBS= -ldl -lipq ++OSLIBS= -lnetfilter_queue + +-OSEXTRA= os/sendd os/snd_upd_fw +- +-ETCINIT= /etc/init.d +-EXTRAINSTALL= $(ETCINIT)/sendd $(ETCINIT)/snd_upd_fw $(ETCINIT)/snd_fw_functions.sh +-EXTRAUNINSTALL=$(EXTRAINSTALL) +-EXTRACLEAN= os/sendd os/snd_upd_fw os/snd_fw_functions.sh +- +-$(ETCINIT)/%: os/% +- install $< $@ +- +-os/%: os/%.in +- sed "s/@etcinit@/\/etc\/init.d/g" $< > $@ +- +-os/%: os/%.in2 +- @./os/find_ip6tables.sh +- +-# Sometimes libipq.h is installed in include/libipq.h, other times it is +-# installed in include/libipq/libipq.h. This rule helps cpp to find it. +-os/ipq.o: CPPFLAGS += -I/usr/include/libipq -I/usr/local/include/libipq ++os/ipq.o: CPPFLAGS += -I/usr/include/libnetfilter_queue +--- a/sendd/os-linux/ipq.c ++++ b/sendd/os-linux/ipq.c +@@ -32,8 +32,9 @@ + + #include + #include ++#include + #include +-#include ++#include + + #include "config.h" + #include +@@ -42,122 +43,170 @@ + #include "../sendd_local.h" + #include "snd_linux.h" + +-static struct ipq_handle *qh; +- + extern unsigned if_nametoindex(const char *); + +-static inline void +-process_pkt(ipq_packet_msg_t *pkt, struct sbuff *b) +-{ ++struct nfq_handle *h = NULL; ++struct nfq_q_handle *qh = NULL; ++ ++/* This is the default queue number used in our init script */ ++#define SND_DEFAULT_NFQUEUE_NUMBER 13 ++ ++/* The sbuff is must be made available to the callback function that will ++ handle the packet */ ++struct callback_data { ++ struct sbuff *b; ++}; ++ ++struct callback_data process_pkt_data; ++ ++/* nfqueue callback */ ++static int process_pkt(struct nfq_q_handle *qh, struct nfgenmsg *nfmsg, ++ struct nfq_data *nfa, void *data) ++{ ++ struct callback_data * d = (struct callback_data *)data; ++ struct nfqnl_msg_packet_hdr *ph; ++ struct sbuff *b = d->b; ++ char *pkt_data; + int in, ifidx; + +- b->data = pkt->payload; +- b->len = pkt->data_len; ++ b->len = nfq_get_payload(nfa, &pkt_data); ++ if (b->len == -1) { ++ applog(LOG_ERR, "%s: nfq_get_payload() failed.", __FUNCTION__); ++ return 0; ++ } ++ b->data = (unsigned char *)pkt_data; + +- if (*(pkt->indev_name)) { ++ if ((ifidx = nfq_get_indev(nfa)) && ifidx != 0) + in = 1; +- ifidx = if_nametoindex(pkt->indev_name); +- } else if (*(pkt->outdev_name)) { ++ else if ((ifidx = nfq_get_outdev(nfa)) && ifidx != 0) + in = 0; +- ifidx = if_nametoindex(pkt->outdev_name); +- } else { ++ else { + applog(LOG_ERR, "%s: pkt has neither indev nor outdev", + __FUNCTION__); + snd_put_buf(b); +- return; ++ return 0; + } + +- snd_recv_pkt(b, ifidx, in, pkt); +-} ++ /* Grab packet header to get its id later */ ++ ph = nfq_get_msg_packet_hdr(nfa); /* FIXME Check return value */ + +-static void +-ipq_recv_pkt(void) +-{ +- int r; +- struct sbuff *b = snd_get_buf(); ++ snd_recv_pkt(b, ifidx, in, (void *)ph); + +- if (b == NULL) { +- return; +- } +- if ((r = ipq_read(qh, b->head, b->rem, -1)) < 0) { +- applog(LOG_ERR, "%s: ipq_read(): %s", __FUNCTION__, +- ipq_errstr()); +- goto fail; +- } else if (r == 0) { +- /* timeout */ +- goto fail; +- } +- +- switch ((r = ipq_message_type(b->head))) { +- case NLMSG_ERROR: +- applog(LOG_ERR, "%s: nlmsg error: %s", __FUNCTION__, +- strerror(ipq_get_msgerr(b->head))); +- goto fail; +- case IPQM_PACKET: +- process_pkt(ipq_get_packet(b->head), b); +- return; +- default: +- break; +- } +- +-fail: +- snd_put_buf(b); ++ return 1; + } + + void +-linux_ipq_add_fds(fd_set *fds, int *maxfd) ++linux_nfq_add_fds(fd_set *fds, int *maxfd) + { +- FD_SET(qh->fd, fds); +- *maxfd = sendd_max(*maxfd, qh->fd); ++ int fd = nfnl_fd(nfq_nfnlh(h)); ++ ++ FD_SET(fd, fds); ++ *maxfd = sendd_max(*maxfd, fd); + } + + void +-linux_ipq_dispatch_fds(fd_set *fds) ++linux_nfq_dispatch_fds(fd_set *fds) + { +- if (FD_ISSET(qh->fd, fds)) { +- ipq_recv_pkt(); ++ int fd = nfnl_fd(nfq_nfnlh(h)); ++ int r; ++ ++ if (FD_ISSET(fd, fds)) { ++ struct sbuff *b = snd_get_buf(); ++ ++ if (b == NULL) { ++ return; ++ } ++ ++ if ((r = recv(fd, b->head, b->rem, 0)) && r <= 0) { ++ if (r < 0) /* not a timeout */ ++ applog(LOG_ERR, "%s: recv failed.", ++ __FUNCTION__); ++ snd_put_buf(b); ++ return; ++ } ++ ++ process_pkt_data.b = b; /* make sbuff available to ++ callback function */ ++ nfq_handle_packet(h, (char *)b->head, r); + } + } + + void + os_specific_deliver_pkt(void *p, struct sbuff *b, int drop, int changed) + { +- ipq_packet_msg_t *pkt = p; +- void *newpkt = NULL; ++ struct nfqnl_msg_packet_hdr *ph = (struct nfqnl_msg_packet_hdr *)p; ++ unsigned char *newpkt = NULL; + int plen = 0; ++ uint32_t id = 0; ++ ++ if (ph) ++ id = ntohl(ph->packet_id); + + if (changed && !drop) { +- newpkt = sbuff_data(b); ++ newpkt = (unsigned char *)b->data; + plen = b->len; + } + +- ipq_set_verdict(qh, pkt->packet_id, drop ? NF_DROP : NF_ACCEPT, +- plen, newpkt); ++ nfq_set_verdict(qh, id, drop ? NF_DROP : NF_ACCEPT, plen, newpkt); + snd_put_buf(b); + } + + int +-linux_ipq_init(void) ++linux_nfq_init(void) + { +- if ((qh = ipq_create_handle(0, PF_INET6)) == NULL) { +- applog(LOG_ERR, "%s: ipq_create_handle() failed: %s", +- __FUNCTION__, ipq_errstr()); +- return (-1); +- } +- if (ipq_set_mode(qh, IPQ_COPY_PACKET, SND_MAX_PKT) < 0) { +- applog(LOG_ERR, "%s: ipq_set_mode() failed: %s", +- __FUNCTION__, ipq_errstr()); +- if (errno == ECONNREFUSED) { +- applog(LOG_ERR, "%s: perhaps you need to modprobe " +- "ip6_queue?", __FUNCTION__); +- } +- return (-1); ++ struct nfnl_handle *nh; ++ u_int16_t nfqueue_num = SND_DEFAULT_NFQUEUE_NUMBER; ++ ++ /* Get netfilter queue connection handle */ ++ h = nfq_open(); ++ if (!h) { ++ applog(LOG_ERR, "%s: nfq_open() failed.", __FUNCTION__); ++ return -1; ++ } ++ ++ /* Unbinding existing nfqueue handlers for AF_INET6. We ignore the ++ return value: http://www.spinics.net/lists/netfilter/msg42063.html. ++ Note that this call is required, otherwise, nfq_bind_pf() fails. */ ++ nfq_unbind_pf(h, PF_INET6); ++ ++ if (nfq_bind_pf(h, PF_INET6) < 0) { ++ applog(LOG_ERR, "%s: nfq_bind_pf failed.\n", __FUNCTION__); ++ return -1; ++ } ++ ++ /* Binding this socket to queue number nfqueue_num and installing ++ our packet handler */ ++ qh = nfq_create_queue(h, nfqueue_num, ++ (nfq_callback *) &process_pkt, ++ (void *)&process_pkt_data); ++ if (!qh) { ++ applog(LOG_ERR, "%s: nfq_create_queue() failed.\n", ++ __FUNCTION__); ++ return -1; ++ } ++ ++ /* Asking for entire copy of queued packets */ ++ if (nfq_set_mode(qh, NFQNL_COPY_PACKET, 0xffff) < 0) { /* XXX was SND_MAX_PKT */ ++ fprintf(stderr, "nfq_set_mode() failed.\n"); ++ return -1; + } +- return (0); ++ ++ /* XXX - Check if we have an interest in setting queue length */ ++ ++ /* The netlink handle associated with our queue connection handle */ ++ nh = nfq_nfnlh(h); ++ ++ return 0; + } + + void +-linux_ipq_fini(void) ++linux_nfq_fini(void) + { +- ipq_destroy_handle(qh); ++ /* Remove the binding for our queue handler*/ ++ if (qh != NULL) ++ nfq_destroy_queue(qh); ++ ++ /* Close connection associated with our connection handler */ ++ if (h != NULL) ++ nfq_close(h); + } +--- a/sendd/os-linux/snd_linux.c ++++ b/sendd/os-linux/snd_linux.c +@@ -40,13 +40,13 @@ + void + os_specific_add_fds(fd_set *fds, int *maxfd) + { +- linux_ipq_add_fds(fds, maxfd); ++ linux_nfq_add_fds(fds, maxfd); + } + + void + os_specific_dispatch_fds(fd_set *fds) + { +- linux_ipq_dispatch_fds(fds); ++ linux_nfq_dispatch_fds(fds); + } + + int +@@ -59,7 +59,7 @@ int + os_specific_init(void) + { + if (linux_rand_init() < 0 || +- linux_ipq_init() < 0) { ++ linux_nfq_init() < 0) { + return (-1); + } + return (0); +@@ -68,6 +68,6 @@ os_specific_init(void) + void + os_specific_fini(void) + { +- linux_ipq_fini(); ++ linux_nfq_fini(); + linux_rand_fini(); + } +--- a/sendd/os-linux/snd_linux.h ++++ b/sendd/os-linux/snd_linux.h +@@ -33,10 +33,10 @@ + #ifndef _SEND_LINUX_H + #define _SEND_LINUX_H + +-extern void linux_ipq_add_fds(fd_set *, int *); +-extern void linux_ipq_dispatch_fds(fd_set *); +-extern int linux_ipq_init(void); +-extern void linux_ipq_fini(void); ++extern void linux_nfq_add_fds(fd_set *, int *); ++extern void linux_nfq_dispatch_fds(fd_set *); ++extern int linux_nfq_init(void); ++extern void linux_nfq_fini(void); + + extern void linux_rand_fini(void); + extern int linux_rand_init(void); diff --git a/ipv6/send/patches/002-handle_max_bits_conf.patch b/ipv6/send/patches/002-handle_max_bits_conf.patch new file mode 100644 index 0000000..ab4008c --- /dev/null +++ b/ipv6/send/patches/002-handle_max_bits_conf.patch @@ -0,0 +1,50 @@ +This patch allows one to specify a maximum number of bits +for the CGA and RSA key size. RFC specifies that an implementation +may optionnaly honor this setting (5.1.3). This is particularly +useful on embedded systems where both the entropy and the processing +power are limited. + +--- a/sendd/config.c ++++ b/sendd/config.c +@@ -82,6 +82,7 @@ struct snd_conf snd_confs[] = { + SND_CFS(snd_cga_params, NULL, 1), + SND_CFIB(snd_full_secure, 1, 0), + SND_CFII(snd_min_key_bits, 1024, "bits", 0), ++ SND_CFII(snd_max_key_bits, 2048, "bits", 0), + SND_CFII(snd_nonce_cache_gc_intvl, 2, "seconds", 0), + SND_CFII(snd_pfx_cache_gc_intvl, 40, "seconds", 0), + SND_CFS(snd_pkixip_conf, NULL, 0), +--- a/sendd/sig_rfc3971.c ++++ b/sendd/sig_rfc3971.c +@@ -147,7 +147,7 @@ ver(struct iovec *iov, int iovlen, uint8 + EVP_MD_CTX ctx[1]; + EVP_PKEY *pub; + int rv = -1; +- int i, real_slen, min_bits; ++ int i, real_slen, min_bits, max_bits; + DEFINE_TIMESTAMP_VARS(); + + DBG_HEXDUMP(&dbg_cryptox, "key: ", key, klen); +@@ -164,6 +164,12 @@ ver(struct iovec *iov, int iovlen, uint8 + "minimum: %d)", EVP_PKEY_bits(pub), min_bits); + return (-1); + } ++ max_bits = snd_conf_get_int(snd_max_key_bits); ++ if (EVP_PKEY_bits(pub) > max_bits) { ++ DBG(&dbg_snd, "Peer key too strong: %d bits (configured " ++ "maximum: %d)", EVP_PKEY_bits(pub), max_bits); ++ return (-1); ++ } + + real_slen = EVP_PKEY_size(pub); + if (real_slen < slen) { +--- a/sendd/snd_config.h ++++ b/sendd/snd_config.h +@@ -42,6 +42,7 @@ enum snd_conf_syms { + snd_cga_params, + snd_full_secure, + snd_min_key_bits, ++ snd_max_key_bits, + snd_nonce_cache_gc_intvl, + snd_pfx_cache_gc_intvl, + snd_pkixip_conf, diff --git a/ipv6/send/patches/003-keysig_8bytes_alignment.patch b/ipv6/send/patches/003-keysig_8bytes_alignment.patch new file mode 100644 index 0000000..561cc3e --- /dev/null +++ b/ipv6/send/patches/003-keysig_8bytes_alignment.patch @@ -0,0 +1,20 @@ +This patch aligns the structure describing the RSA signature +option to 8 bytes. Before that, send was padding with N bytes +(4 on 32-bits architectures) using a cast in sendd/proto_sig.c : + + so = (struct snd_opt_sig *)(nd_so); + +which would align to the number of bytes representing a pointer +on your architecture. + +--- a/sendd/snd_proto.h ++++ b/sendd/snd_proto.h +@@ -69,7 +69,7 @@ struct snd_opt_sig { + uint32_t reserved; /* opt hdr + reserved */ + uint8_t keyhash[SND_KEYHASH_LEN]; + uint8_t sig[0]; +-}; ++} __attribute__((aligned(8))); + + struct snd_opt_timestamp { + uint8_t type; diff --git a/ipv6/send/patches/004-always_link_with_ncurses.patch b/ipv6/send/patches/004-always_link_with_ncurses.patch new file mode 100644 index 0000000..367baae --- /dev/null +++ b/ipv6/send/patches/004-always_link_with_ncurses.patch @@ -0,0 +1,26 @@ +We should always link with libncurses. This is not noticeable +when building the debian packages because we install libncurses5 +runtime library as a dependency. + +--- a/cgatool/Makefile ++++ b/cgatool/Makefile +@@ -17,7 +17,7 @@ LDLIBS= $(DEPLIBS) + LDFLAGS= -L../libs/.libs + endif + +-LDLIBS += -lcrypto ++LDLIBS += -lcrypto -lncurses + + ifeq ($(USE_THREADS),y) + LDLIBS += -lpthread +--- a/sendd/Makefile ++++ b/sendd/Makefile +@@ -28,7 +28,7 @@ LDLIBS= $(DEPLIBS) + LDFLAGS= -L../libs/.libs + endif + +-LDLIBS += -lcrypto ++LDLIBS += -lcrypto -lncurses + LDLIBS += $(OSLIBS) + + ifeq ($(USE_THREADS),y) diff --git a/ipv6/send/patches/005-use-bundled-libconfig.patch b/ipv6/send/patches/005-use-bundled-libconfig.patch new file mode 100644 index 0000000..99435f9 --- /dev/null +++ b/ipv6/send/patches/005-use-bundled-libconfig.patch @@ -0,0 +1,22 @@ +--- a/cgatool/cgatool.c ++++ b/cgatool/cgatool.c +@@ -49,7 +49,7 @@ + + #include "config.h" + #include +-#include ++#include "../libs/libconfig/libconfig.h" + #include + + #include +--- a/sendd/config.c ++++ b/sendd/config.c +@@ -38,7 +38,7 @@ + #include + + #include "config.h" +-#include ++#include "../libs/libconfig/libconfig.h" + #include + + #include "sendd_local.h" diff --git a/ipv6/send/patches/006-openssl-1.0.0-compat.patch b/ipv6/send/patches/006-openssl-1.0.0-compat.patch new file mode 100644 index 0000000..1df8a93 --- /dev/null +++ b/ipv6/send/patches/006-openssl-1.0.0-compat.patch @@ -0,0 +1,143 @@ +--- a/include/cga_keyutils.h ++++ b/include/cga_keyutils.h +@@ -40,8 +40,8 @@ + + extern int cga_add_key(cga_ctx_t *, EVP_PKEY *, int, uint16_t); + extern EVP_PKEY *cga_der2key(uint8_t *, int ); +-extern STACK *cga_der2keys(uint8_t *, int ); +-extern void cga_free_keystack(STACK *); ++extern STACK_OF(GENERAL_NAME) *cga_der2keys(uint8_t *, int ); ++extern void cga_free_keystack(STACK_OF(GENERAL_NAME) *); + extern uint8_t *cga_key2der(EVP_PKEY *, int *); + extern int cga_load_cert(cga_ctx_t *, const char *); + extern int cga_load_key(cga_ctx_t *, const char *); +--- a/libs/libcga/cga_keyutils.c ++++ b/libs/libcga/cga_keyutils.c +@@ -215,7 +215,7 @@ cga_set_key(cga_ctx_t *cga, EVP_PKEY *k) + } + + void +-cga_free_keystack(STACK *sk) ++cga_free_keystack(STACK_OF(GENERAL_NAME) *sk) + { + EVP_PKEY *k; + +@@ -232,14 +232,14 @@ cga_free_keystack(STACK *sk) + * + * Returns a stack of EVP_PKEYs on success. + */ +-STACK * ++STACK_OF(GENERAL_NAME) * + cga_der2keys(uint8_t *der, int dlen) + { + uint8_t *dk; + EVP_PKEY *k; + int klen, elen; + uint16_t type; +- STACK *sk; ++ STACK_OF(GENERAL_NAME) *sk; + + if ((sk = sk_new_null()) == NULL) { + APPLOG_NOMEM(); +--- a/include/pkixip_ext.h ++++ b/include/pkixip_ext.h +@@ -54,7 +54,7 @@ extern int pkixip_add2stores_cert(X509 * + extern int pkixip_add2stores_file(const char *); + extern int pkixip_add_store(int *, int (*cmp)(X509_OBJECT **, X509_OBJECT **)); + extern void *pkixip_find_cert(void *, int); +-extern STACK *pkixip_get_mychain(void); ++extern STACK_OF(GENERAL_NAME) *pkixip_get_mychain(void); + extern X509_STORE_CTX *pkixip_get_store_ctx(void); + extern int pkixip_has_ext(X509 *x); + extern X509 *pkixip_load_cert(const char *); +--- a/libs/libpkixipext/x509.c ++++ b/libs/libpkixipext/x509.c +@@ -62,14 +62,14 @@ X509V3_EXT_METHOD pkix_ip_ext_method = { + i2v : (X509V3_EXT_I2V)i2v_IPAddrBlocks, + }; + +-static STACK *stores[PKIXIP_MAX_STORES]; ++static STACK_OF(GENERAL_NAME) *stores[PKIXIP_MAX_STORES]; + static X509_STORE_CTX *ctx_bysubj; + static int next_store = 1; + static void *(*wrap_store_cert)(X509 *x); + static void (*trustanchor_cb)(X509 *x); + pthread_mutex_t stores_lock = PTHREAD_MUTEX_INITIALIZER; + +-static STACK *mychain; ++static STACK_OF(GENERAL_NAME) *mychain; + + /* Lifted from openssl x509_lu.c */ + static int +@@ -243,7 +243,7 @@ pkixip_load_pkey(const char *f) + return (pkey); + } + +-static STACK * ++static STACK_OF(GENERAL_NAME) * + pkixip_get_store(int handle) + { + if (handle >= PKIXIP_MAX_STORES || handle < 0) { +@@ -257,7 +257,7 @@ pkixip_get_store(int handle) + void + pkixip_walk_store(int (*cb)(X509 *, void *), void *cookie, int handle) + { +- STACK *objs; ++ STACK_OF(GENERAL_NAME) *objs; + int i; + X509_OBJECT *xo; + +@@ -282,7 +282,7 @@ done: + void * + pkixip_find_cert(void *k, int handle) + { +- STACK *store; ++ STACK_OF(GENERAL_NAME) *store; + int i; + void *r = NULL; + +@@ -305,7 +305,7 @@ done: + /* Caller must hold stores_lock */ + static int + pkixip_do_add_store(int handle, int (*cmp)(X509_OBJECT **, X509_OBJECT **), +- STACK *objs) ++ STACK_OF(GENERAL_NAME) *objs) + { + if (objs == NULL && (objs = sk_X509_OBJECT_new(cmp)) == NULL) { + applog(LOG_CRIT, "no memory"); +@@ -538,7 +538,7 @@ done: + return (r); + } + +-STACK * ++STACK_OF(GENERAL_NAME) * + pkixip_get_mychain(void) + { + return (mychain); +--- a/sendd/cpa.c ++++ b/sendd/cpa.c +@@ -183,13 +183,13 @@ next: + } + + static int +-can_handle_cps(uint8_t *ops, int len, STACK *chain, X509 **x) ++can_handle_cps(uint8_t *ops, int len, STACK_OF(GENERAL_NAME) *chain, X509 **x) + { + int i, j, r = 0; + X509_NAME *dn; + X509 x509_s; + X509_CINF cinf_s; +- STACK *dchain; ++ STACK_OF(GENERAL_NAME) *dchain; + STACK_OF(X509_NAME) *dns; + + *x = NULL; +@@ -239,7 +239,7 @@ snd_handle_cps(struct sbuff *b, struct s + { + uint8_t *msg = sbuff_data(b); + int len = b->len; +- STACK *chain; ++ STACK_OF(GENERAL_NAME) *chain; + X509 *x, *trx = NULL; + int i, tot, olen; + uint8_t *ops; diff --git a/ipv6/shorewall6-lite/Makefile b/ipv6/shorewall6-lite/Makefile new file mode 100644 index 0000000..59afd8b --- /dev/null +++ b/ipv6/shorewall6-lite/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=shorewall6-lite +PKG_VERSION:=4.4.5.4 +PKG_DIRECTORY:=4.4.5 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ \ + http://www1.shorewall.net/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ \ + http://slovakia.shorewall.net/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ \ + http://shorewall.de/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ \ + http://www.shorewall.com.au/4.4/shorewall-$(PKG_DIRECTORY)/ \ + http://shorewall.infohiiway.com/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ \ + http://www.shorewall.com.ar/pub/shorewall/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=498f622be657df38beec256876adabb6 + +include $(INCLUDE_DIR)/package.mk + +define Package/shorewall6-lite + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+ip +ip6tables +ip6tables-utils + TITLE:=Shorewall6 Lite + URL:=http://www.shorewall.net/ + SUBMENU:=firewall +endef + +define Package/shorewall6-lite/description + Shoreline Firewall 6 Lite is an iptables-based firewall for Linux systems. +endef + +define Package/shorewall6-lite/conffiles +/etc/shorewall6-lite/shorewall6-lite.conf +/etc/shorewall6-lite/vardir +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + PREFIX=$(PKG_INSTALL_DIR) $(PKG_BUILD_DIR)/install.sh +endef + +define Package/shorewall6-lite/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DIR) $(1)/etc/shorewall6-lite + $(INSTALL_DIR) $(1)/usr/share + $(INSTALL_BIN) ./files/shorewall-lite.init $(1)/etc/init.d/shorewall6-lite + $(INSTALL_BIN) ./files/hotplug_iface $(1)/etc/hotplug.d/iface/05-shorewall6-lite + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/shorewall6-lite $(1)/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall6-lite $(1)/usr/share + $(INSTALL_BIN) ./files/hostname $(1)/usr/share/shorewall6-lite + $(CP) $(PKG_INSTALL_DIR)/etc/shorewall6-lite $(1)/etc + $(CP) ./files/vardir $(1)/etc/shorewall6-lite +endef + +$(eval $(call BuildPackage,shorewall6-lite)) diff --git a/ipv6/shorewall6-lite/files/hostname b/ipv6/shorewall6-lite/files/hostname new file mode 100644 index 0000000..42e1643 --- /dev/null +++ b/ipv6/shorewall6-lite/files/hostname @@ -0,0 +1,2 @@ +#!/bin/sh +cat /proc/sys/kernel/hostname diff --git a/ipv6/shorewall6-lite/files/hotplug_iface b/ipv6/shorewall6-lite/files/hotplug_iface new file mode 100644 index 0000000..58ecbf9 --- /dev/null +++ b/ipv6/shorewall6-lite/files/hotplug_iface @@ -0,0 +1,12 @@ +#!/bin/sh + +# should restart shorewall when an interface comes up + +[ ifup = "$ACTION" ] && { + /etc/init.d/shorewall6-lite restart +} + +[ ifdown = "$ACTION" ] && { + # might need to restore some routing + /etc/init.d/shorewall6-lite restart +} diff --git a/ipv6/shorewall6-lite/files/shorewall-lite.init b/ipv6/shorewall6-lite/files/shorewall-lite.init new file mode 100644 index 0000000..ca24bbc --- /dev/null +++ b/ipv6/shorewall6-lite/files/shorewall-lite.init @@ -0,0 +1,20 @@ +#!/bin/sh /etc/rc.common + +START=46 +start() { + touch /var/log/messages + mkdir -p /var/lock/subsys + /sbin/shorewall6-lite -qq start -f +} + +stop() { + /sbin/shorewall6-lite -qq stop +} + +restart() { + if [ -f /etc/shorewall6-lite/state/restore ] ; then + /sbin/shorewall6-lite -qq restore + else + /sbin/shorewall6-lite -qq restart + fi +} diff --git a/ipv6/shorewall6-lite/files/vardir b/ipv6/shorewall6-lite/files/vardir new file mode 100644 index 0000000..e7a9030 --- /dev/null +++ b/ipv6/shorewall6-lite/files/vardir @@ -0,0 +1,2 @@ +# move state dir out of ram +VARDIR=/etc/shorewall6-lite/state diff --git a/ipv6/shorewall6-lite/patches/100-hostname.patch b/ipv6/shorewall6-lite/patches/100-hostname.patch new file mode 100644 index 0000000..f901cb6 --- /dev/null +++ b/ipv6/shorewall6-lite/patches/100-hostname.patch @@ -0,0 +1,11 @@ +--- a/shorewall6-lite ++++ b/shorewall6-lite +@@ -153,7 +153,7 @@ + + export VERBOSE + +- [ -n "${HOSTNAME:=$(hostname)}" ] ++ [ -n "${HOSTNAME:=$(${SHAREDIR}/hostname)}" ] + + } + diff --git a/ipv6/shorewall6-lite/patches/110-MODULESDIR.patch b/ipv6/shorewall6-lite/patches/110-MODULESDIR.patch new file mode 100644 index 0000000..4f424da --- /dev/null +++ b/ipv6/shorewall6-lite/patches/110-MODULESDIR.patch @@ -0,0 +1,20 @@ +--- a/lib.base ++++ b/lib.base +@@ -260,7 +260,7 @@ + + [ -n "${MODULE_SUFFIX:=o gz ko o.gz ko.gz}" ] + +- [ -z "$MODULESDIR" ] && MODULESDIR=/lib/modules/$(uname -r)/kernel/net/ipv6/netfilter:/lib/modules/$(uname -r)/kernel/net/netfilter:/lib/modules/$(uname -r)/kernel/net/sched ++ [ -z "$MODULESDIR" ] && MODULESDIR=/lib/modules/$(uname -r)/kernel/net/ipv6/netfilter:/lib/modules/$(uname -r)/kernel/net/netfilter:/lib/modules/$(uname -r)/kernel/net/sched:/lib/modules/$(uname -r) + MODULES=$(lsmod | cut -d ' ' -f1) + + for directory in $(split $MODULESDIR); do +@@ -296,7 +296,7 @@ + [ -n "${MODULE_SUFFIX:=o gz ko o.gz ko.gz}" ] + + [ -z "$MODULESDIR" ] && \ +- MODULESDIR=/lib/modules/$(uname -r)/kernel/net/ipv6/netfilter:/lib/modules/$(uname -r)/kernel/net/netfilter:/lib/modules/$(uname -r)/kernel/net/sched ++ MODULESDIR=/lib/modules/$(uname -r)/kernel/net/ipv6/netfilter:/lib/modules/$(uname -r)/kernel/net/netfilter:/lib/modules/$(uname -r)/kernel/net/sched:/lib/modules/$(uname -r) + + for directory in $(split $MODULESDIR); do + [ -d $directory ] && moduledirectories="$moduledirectories $directory" diff --git a/ipv6/shorewall6-lite/patches/120-LOGFILE.patch b/ipv6/shorewall6-lite/patches/120-LOGFILE.patch new file mode 100644 index 0000000..53db5d7 --- /dev/null +++ b/ipv6/shorewall6-lite/patches/120-LOGFILE.patch @@ -0,0 +1,11 @@ +--- a/shorewall6-lite.conf 2009-12-05 22:37:43.000000000 -0500 ++++ b/shorewall6-lite.conf 2009-12-05 22:37:51.000000000 -0500 +@@ -28,7 +28,7 @@ + # L O G G I N G + ############################################################################### + +-LOGFILE= ++LOGFILE=/dev/null + + LOGFORMAT= + diff --git a/ipv6/shorewall6-lite/patches/130-portability.patch b/ipv6/shorewall6-lite/patches/130-portability.patch new file mode 100644 index 0000000..87a696b --- /dev/null +++ b/ipv6/shorewall6-lite/patches/130-portability.patch @@ -0,0 +1,20 @@ +--- a/install.sh ++++ b/install.sh +@@ -294,13 +294,15 @@ cd manpages + + for f in *.5; do + gzip -c $f > $f.gz +- run_install -D -m 644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz ++ run_install -d ${PREFIX}/usr/share/man/man5 ++ run_install -m 644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz + echo "Man page $f.gz installed to ${PREFIX}/usr/share/man/man5/$f.gz" + done + + for f in *.8; do + gzip -c $f > $f.gz +- run_install -D -m 644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz ++ run_install -d ${PREFIX}/usr/share/man/man8 ++ run_install -m 644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz + echo "Man page $f.gz installed to ${PREFIX}/usr/share/man/man8/$f.gz" + done + diff --git a/ipv6/thc-ipv6/Makefile b/ipv6/thc-ipv6/Makefile new file mode 100644 index 0000000..3e4c9fa --- /dev/null +++ b/ipv6/thc-ipv6/Makefile @@ -0,0 +1,70 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=thc-ipv6 +PKG_VERSION:=0.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://freeworld.thc.org/releases/ +PKG_MD5SUM:=01715cfa7f5d4a53fe8f142a10c38c78 + +include $(INCLUDE_DIR)/package.mk + +define Package/thc-ipv6/Default + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+libpcap + URL:=http://freeworld.thc.org/ +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + OPT="$(TARGET_CFLAGS) -L$(STAGING_DIR)/usr/lib -I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include" all +endef + + +define BuildTool + + PKG_CONFIG_DEPENDS+=CONFIG_PACKAGE_$(1) + + define Package/$(1) + $$(call Package/thc-ipv6/Default) + TITLE:=$(2) + SUBMENU:=IPv6 attack and analyzing toolset (thc-ipv6) + endef + + define Package/$(1)/description + $(3) + endef + + define Package/$(1)/install + $(INSTALL_DIR) $$(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(1) $$(1)/usr/sbin/$(1) + endef + + $$(eval $$(call BuildPackage,$(1))) + +endef + + +#$(eval $(call BuildTool,NAME,TITLE,DESCRIPTION)) +$(eval $(call BuildTool,parasite6,ARP spoofer for IPv6,Provides false answers to Neighbor Solitication requests)) +$(eval $(call BuildTool,dos-new-ip6,DAD spoofer,Prevents new IPv6 interfaces to come up by spoofing DAD)) +$(eval $(call BuildTool,detect-new-ip6,Host detector,Detects new IPv6 addresses joining the network)) +$(eval $(call BuildTool,fake_router6,Router spoofer,Send Router Advertisements and try to become the default router)) +$(eval $(call BuildTool,fake_advertise6,RA spoofer,Advertise arbitary IPv6 addresses)) +$(eval $(call BuildTool,fake_mld6,Multicast membership spoofer,Advertise local host in arbitary multicast groups)) +$(eval $(call BuildTool,fake_mipv6,MIPv6 update spoofer,Spoof MIPv6 updates to redirect packets directed at the home-address)) +$(eval $(call BuildTool,redir6,Route injector,Inject IPv6 routes to redirect traffic to other routers)) +$(eval $(call BuildTool,smurf6,Local smurfer,Smurf the target or all-nodes multicast group with ICMPv6 echo replies)) +$(eval $(call BuildTool,alive6,Host presence scanner,Find active IPv6 hosts in the network segment)) +$(eval $(call BuildTool,toobig6,MTU injector,Inject MTU values in a IPv6 host)) +$(eval $(call BuildTool,rsmurf6,Remote smurfer,Smurf the local network of a target host by exploiting Linux implementation errors)) diff --git a/ipv6/thc-ipv6/patches/100-optional-openssl.patch b/ipv6/thc-ipv6/patches/100-optional-openssl.patch new file mode 100644 index 0000000..96f6ceb --- /dev/null +++ b/ipv6/thc-ipv6/patches/100-optional-openssl.patch @@ -0,0 +1,93 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,8 @@ + CC=gcc + #OPT=-Wall -ggdb +-OPT=-O2 +-LIB=-lpcap -lssl -lcrypto +-PROGRAM=parasite6 dos-new-ip6 detect-new-ip6 fake_router6 fake_advertise6 fake_mld6 fake_mipv6 redir6 smurf6 alive6 toobig6 rsmurf6 test_implementation6 sendpees6 ++OPT=-O2 $(if $(USE_SSL),-DUSE_SSL,) ++LIB=-lpcap $(if $(USE_SSL),-lssl -lcrypto,) ++PROGRAM=parasite6 dos-new-ip6 detect-new-ip6 fake_router6 fake_advertise6 fake_mld6 fake_mipv6 redir6 smurf6 alive6 toobig6 rsmurf6 test_implementation6 $(if $(USE_SSL),sendpees6,) + + all: thc-ipv6-lib.o $(PROGRAM) + +--- a/thc-ipv6-lib.c ++++ b/thc-ipv6-lib.c +@@ -37,8 +37,10 @@ + #include + #include "thc-ipv6.h" + /* libssl */ ++#ifdef USE_SSL + #include + #include ++#endif + + + +@@ -1507,7 +1509,7 @@ + * 2006/07 + */ + +- ++#ifdef USE_SSL + thc_key_t *thc_generate_key(int key_len) + { + thc_key_t *key; +@@ -1598,6 +1600,7 @@ + + return cga_hdr; + } ++#endif + + thc_timestamp_hdr *generate_timestamp(void) + { +@@ -1632,6 +1635,7 @@ + return nonce; + } + ++#ifdef USE_SSL + thc_rsa_hdr *thc_generate_rsa(char *data2sign, int data2sign_len, thc_cga_hdr *cga_hdr, thc_key_t *key) + { + thc_rsa_hdr *rsa_hdr; +@@ -1827,3 +1831,4 @@ + + return 0; + } ++#endif +--- a/thc-ipv6.h ++++ b/thc-ipv6.h +@@ -10,7 +10,9 @@ + #define _THC_IPV6_H + + #include ++#ifdef USE_SSL + #include ++#endif + + #define VERSION "v0.7" + #define AUTHOR "van Hauser / THC " +@@ -228,10 +230,12 @@ + char *pad; + } thc_rsa_hdr; + ++#ifdef USE_SSL + typedef struct { + RSA *rsa; + int len; + } thc_key_t; ++#endif + + typedef struct { + unsigned char *data; +@@ -239,8 +243,10 @@ + int len; + } opt_t; + ++#ifdef USE_SSL + extern thc_key_t *thc_generate_key(int key_len); + extern thc_cga_hdr *thc_generate_cga(unsigned char *prefix, thc_key_t *key, unsigned char **cga); ++#endif + + #endif + diff --git a/ipv6/totd/Makefile b/ipv6/totd/Makefile new file mode 100644 index 0000000..0d2cf9f --- /dev/null +++ b/ipv6/totd/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=totd +PKG_VERSION:=1.5.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.pasta.cs.uit.no/pub/totd/ +PKG_MD5SUM:=7edaedae9f6aca5912dd6c123582cf08 + +include $(INCLUDE_DIR)/package.mk + +define Package/totd + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+kmod-ipv6 + TITLE:=Small DNS proxy that supports IPv6/IPv4 record translation + URL:=http://pasta.cs.uit.no/software/totd.html +endef + +define Package/totd/description + totd is a small DNS proxy nameserver which supports IPv6 and enable IPv6 + only sites to access IPv4 sites by using some translation mechanism such + as NAT-PT, KAME faith, etc... +endef + +define Package/totd/conffiles +/etc/totd.conf +endef + +# uses GNU configure + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + CC="$(TARGET_CC)" \ + all +endef + +define Package/totd/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/ + $(INSTALL_CONF) ./files/totd.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/totd.init $(1)/etc/init.d/totd +endef + +$(eval $(call BuildPackage,totd)) diff --git a/ipv6/totd/files/totd.conf b/ipv6/totd/files/totd.conf new file mode 100644 index 0000000..37e0458 --- /dev/null +++ b/ipv6/totd/files/totd.conf @@ -0,0 +1,17 @@ +; Totd sample configuration file +; you can have multiple forwarders, totd will always prefer +; forwarders listed early and only use forwarders listed later +; if the first ones are unresponsive. +forwarder 192.168.1.1 port 5353 +; you can have multiple prefixes or even no prefixes at all +; totd uses them in round-robin fashion +prefix 3ffe:abcd:1234:9876:: +; the port totd listens on for incoming requests +port 53 +; the pidfile to use (default: /var/run/totd.pid) +pidfile /var/run/totd.pid +; interfaces totd listens on (UDP only for now and not on Linux) +; If left out totd will only open wildcard sockets. +; interfaces lo br0 +; 6to4 reverse lookup +; stf diff --git a/ipv6/totd/files/totd.init b/ipv6/totd/files/totd.init new file mode 100644 index 0000000..c12cc41 --- /dev/null +++ b/ipv6/totd/files/totd.init @@ -0,0 +1,23 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=60 +BIN=totd +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + + +start() { + mkdir -p $RUN_D + $BIN -c /etc/totd.conf +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + +restart() { + stop + sleep 1 + start +} diff --git a/ipv6/totd/patches/001-no_warning_as_errors.patch b/ipv6/totd/patches/001-no_warning_as_errors.patch new file mode 100644 index 0000000..88fc359 --- /dev/null +++ b/ipv6/totd/patches/001-no_warning_as_errors.patch @@ -0,0 +1,12 @@ +diff -urN totd-1.5.1/Makefile.in totd-1.5.1.new/Makefile.in +--- totd-1.5.1/Makefile.in 2005-01-31 12:55:14.000000000 +0100 ++++ totd-1.5.1.new/Makefile.in 2007-02-26 12:12:05.000000000 +0100 +@@ -19,7 +19,7 @@ + + INSTALL = /usr/bin/install + +-CFLAGS = @CFLAGS@ @DEFS@ -Werror -Wall -DTOTCONF=\"$(TOT_CONFIG_FILE)\" @OPTFLAGS@ $(INCLUDEPATH) ++CFLAGS = @CFLAGS@ @DEFS@ -Wall -DTOTCONF=\"$(TOT_CONFIG_FILE)\" @OPTFLAGS@ $(INCLUDEPATH) + + # When debugging is enabled by --enable-malloc-debug flag to the configure + # script, the @DBMALLOC@ substitution will contain the empty string, thus diff --git a/ipv6/tspc/Makefile b/ipv6/tspc/Makefile new file mode 100644 index 0000000..6e76748 --- /dev/null +++ b/ipv6/tspc/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tspc +PKG_VERSION:=2.1.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz +PKG_SOURCE_URL:=http://ftp.fr.debian.org/debian/pool/main/t/tspc/ +PKG_MD5SUM:=65183cae002feaacd8bc92d6a5404cc2 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)2 + +include $(INCLUDE_DIR)/package.mk + +define Package/tspc + SECTION:=ipv6 + CATEGORY:=IPv6 + TITLE:=Client for Hexago's (Freenet6's) IPv6 service + URL:=http://www.hexago.com +endef + +define Package/tspc/description + Client to configure an IPv6 tunnel to + Hexago's (Freenet6's) migration broker. +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/include -I$(PKG_BUILD_DIR)/platform/linux" \ + target=linux \ + all + +define Package/tspc/install + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/tspc $(1)/bin/ + $(INSTALL_DIR) $(1)/etc/tsp + $(INSTALL_CONF) $(PKG_BUILD_DIR)/bin/tspc.conf.sample $(1)/etc/tsp/tspc.conf + $(INSTALL_BIN) $(PKG_BUILD_DIR)/template/linux.sh $(1)/etc/tsp/setup.sh + $(INSTALL_BIN) $(PKG_BUILD_DIR)/template/checktunnel.sh $(1)/etc/tsp/ +endef + +$(eval $(call BuildPackage,tspc)) diff --git a/ipv6/tspc/patches/001-debian_patches.patch b/ipv6/tspc/patches/001-debian_patches.patch new file mode 100644 index 0000000..3a958f6 --- /dev/null +++ b/ipv6/tspc/patches/001-debian_patches.patch @@ -0,0 +1,228 @@ +diff -Nur tspc2/conf/Makefile tspc2.owrt/conf/Makefile +--- tspc2/conf/Makefile 2004-03-29 17:37:56.000000000 +0200 ++++ tspc2.owrt/conf/Makefile 2007-02-19 16:07:05.000000000 +0100 +@@ -42,7 +42,7 @@ + sed -e "s+@ifname_tun@+$(ifname_tun)+" -e "s+@ifname@+$(ifname)+" -e "s+@target@+$(target)+" -e "s+@tsp_dir@+$(configdir)+" tspc.conf.in >$(BIN)/tspc.conf.sample; \ + fi + +- chmod 700 $(BIN)/tspc.conf.sample ++ chmod 600 $(BIN)/tspc.conf.sample + + + clean: +diff -Nur tspc2/conf/tspc.conf.in tspc2.owrt/conf/tspc.conf.in +--- tspc2/conf/tspc.conf.in 2004-06-15 17:01:01.000000000 +0200 ++++ tspc2.owrt/conf/tspc.conf.in 2007-02-19 16:07:05.000000000 +0100 +@@ -18,13 +18,6 @@ + # to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, + # MA 02111-1307 USA + #------------------------------------------------------------------------------ +-# +-# +-# tsp directory: +-# the only use is for the OS scripts which will be taken +-# from $tsp_dir/template +-# +-tsp_dir=@tsp_dir@ + + # + # authentication method: +@@ -66,28 +59,19 @@ + + # + # Name of the script: +-# template=checktunnel|freebsd|netbsd|linux|windows|darwin|cisco| +-# solaris|openbsd ++# template=checktunnel|setup + # + # the value is the file name of the script in the tsp_dir/template directory + # The script will be executed after the TSP session is completed. The script + # is configuring the tunnel interface and routes. + # checktunnel is only printing information and does not configure any tunnel +-# freebsd is for FreeBSD 4.X and above +-# netbsd is for NetBSD 1.6 and above +-# linux is for Linux (most distributions) +-# windows is for WindowsXP +-# darwin is for MacOS X 10.2 and above +-# cisco is for Cisco IOS. This script prints the cisco configuration while +-# not configuring the cisco itself. +-# solaris is for Solaris 8 and above. +-# openbsd is for OpenBSD 3.X and above ++# setup will do the actual work + # you could customize your own script, name it and put the filename in + # the template variable. + # on unix, '.sh' is added to the name of the script. + # on windows, '.bat' is added to the name of the script. + # +-template=@target@ ++template=setup + + # + # 'server' is the tunnel broker identifier +diff -Nur tspc2/platform/linux/tsp_local.c tspc2.owrt/platform/linux/tsp_local.c +--- tspc2/platform/linux/tsp_local.c 2004-07-07 21:25:47.000000000 +0200 ++++ tspc2.owrt/platform/linux/tsp_local.c 2007-02-19 16:07:18.000000000 +0100 +@@ -59,13 +59,13 @@ + + /* these globals are defined by US used by alot of things in */ + +-char *FileName = "tspc.conf"; +-char *LogFile = "tspc.log"; ++char *FileName = "/etc/tsp/tspc.conf"; ++char *LogFile = "/var/log/tspc.log"; + char *LogFileName = NULL; +-char *ScriptInterpretor = "/bin/sh"; ++char *ScriptInterpretor = ""; + char *ScriptExtension = "sh"; + char *ScriptDir = NULL; +-char *TspHomeDir = "/usr/local/etc/tsp"; ++char *TspHomeDir = "/etc/tsp"; + char DirSeparator = '/'; + + int Verbose = 0; +@@ -143,7 +143,7 @@ + { + int tunfd; + +- Display(0, ELInfo, "tspStartLocal", "Going daemon, check %s for tunnel creation status", LogFile); ++ Display(1, ELInfo, "tspStartLocal", "Going daemon, check %s for tunnel creation status", LogFile); + + if (daemon(0,0) == -1) { + Display(1, ELError, "tspStartLocal", "Unable to fork."); +diff -Nur tspc2/src/lib/config.c tspc2.owrt/src/lib/config.c +--- tspc2/src/lib/config.c 2004-06-29 17:06:13.000000000 +0200 ++++ tspc2.owrt/src/lib/config.c 2007-02-19 16:07:11.000000000 +0100 +@@ -474,14 +474,17 @@ + if(IsPresent(Conf->dns_server)) { + char *Server; + char *dns = strdup(Conf->dns_server); ++ struct addrinfo *contact; + if (eq(Conf->host_type, "host")) { + Display(1,ELError, "tspVerifyConfig", "DNS delegation is not supported for host_type=host"); + status = 1; + } + for(Server = strtok(dns, ":");Server; Server = strtok(NULL, ":")) { +- if(gethostbyname(Server) == NULL) { ++ if(getaddrinfo(Server, "domain", 0, &contact)!=0) { + Display(1,ELError, "tspVerifyConfig", "DNS server name %s is not resolving.", Server); + status = 1; ++ } else { ++ freeaddrinfo(contact); + } + } + free(dns); +diff -Nur tspc2/src/tsp/tsp_client.c tspc2.owrt/src/tsp/tsp_client.c +--- tspc2/src/tsp/tsp_client.c 2004-04-20 17:10:58.000000000 +0200 ++++ tspc2.owrt/src/tsp/tsp_client.c 2007-02-19 16:07:18.000000000 +0100 +@@ -275,7 +275,7 @@ + + start_show: + +- Display(0, ELInfo, "tspSetupTunnel", "Got tunnel parameters from server, setting up local tunnel"); ++ Display(1, ELInfo, "tspSetupTunnel", "Got tunnel parameters from server, setting up local tunnel"); + + /* and start the show */ + ret = tspStartLocal(socket, conf, &t, nt[conf->transport]); +@@ -337,8 +337,8 @@ + LogInit("tspc", LogFile); + + Display( 1, ELInfo, "tspMain", "----- TSP Client Version %s Initializing -------------------------", TSP_CLIENT_VERSION); +- Display( 0, ELInfo, "tspMain", IDENTIFICATION); +- Display( 0, ELInfo, "tspMain", "Initializing (use -h for help)\n"); ++ Display( 1, ELInfo, "tspMain", IDENTIFICATION); ++ Display( 1, ELInfo, "tspMain", "Initializing (use -h for help)\n"); + + if((status = tspInitialize(argc, argv, &c)) != 0) { // *** we have no uninitialize + if (status == -1) { +@@ -361,12 +361,12 @@ + + /* first try with RUDP */ + c.transport = NET_TOOLS_T_RUDP; +- Display( 0, ELInfo, "tspMain", "\nConnecting to server with reliable udp"); ++ Display( 1, ELInfo, "tspMain", "\nConnecting to server with reliable udp"); + + try_server: + + if (c.transport == NET_TOOLS_T_TCP) +- Display( 0, ELInfo, "tspMain", "\nConnecting to server with tcp"); ++ Display( 1, ELInfo, "tspMain", "\nConnecting to server with tcp"); + + Display( 1, ELInfo, "tspMain", "Using TSP protocol version %s", + TspProtocolVersionStrings[version_index]); +diff -Nur tspc2/template/linux.sh tspc2.owrt/template/linux.sh +--- tspc2/template/linux.sh 2004-06-23 23:29:20.000000000 +0200 ++++ tspc2.owrt/template/linux.sh 2007-02-19 16:08:39.000000000 +0100 +@@ -135,9 +135,7 @@ + # + # Default route + Display 1 "Adding default route" +- ExecNoCheck $route -A inet6 del ::/0 2>/dev/null # delete old default route + ExecNoCheck $route -A inet6 del 2000::/3 2>/dev/null # delete old gw route +- Exec $route -A inet6 add ::/0 dev $TSP_TUNNEL_INTERFACE + Exec $route -A inet6 add 2000::/3 dev $TSP_TUNNEL_INTERFACE + fi + +@@ -147,9 +145,10 @@ + Display 1 "Kernel setup" + if [ X"${TSP_PREFIXLEN}" != X"64" ]; then + #Better way on linux to avoid loop with the remaining /48? +- $route -A inet6 add $TSP_PREFIX::/$TSP_PREFIXLEN dev $TSP_HOME_INTERFACE 2>/dev/null ++ ExecNoCheck $route -A inet6 del $TSP_PREFIX::/$TSP_PREFIXLEN dev $TSP_HOME_INTERFACE 2>/dev/null ++ Exec $route -A inet6 add $TSP_PREFIX::/$TSP_PREFIXLEN dev $TSP_HOME_INTERFACE + fi +- Exec $sysctl -w net.ipv6.conf.all.forwarding=1 # ipv6_forwarding enabled ++ Exec $sysctl -q -w net.ipv6.conf.all.forwarding=1 # ipv6_forwarding enabled + Display 1 "Adding prefix to $TSP_HOME_INTERFACE" + OLDADDR=`$ifconfig $TSP_HOME_INTERFACE | grep "inet6.* $PREF" | sed -e "s/^.*inet6 addr: //" -e "s/ Scope.*\$//"` + if [ ! -z $OLDADDR ]; then +@@ -157,28 +156,28 @@ + Exec $ifconfig $TSP_HOME_INTERFACE inet6 del $OLDADDR + fi + Exec $ifconfig $TSP_HOME_INTERFACE add $TSP_PREFIX::1/64 +- # Router advertisement configuration +- Display 1 "Create new $rtadvdconfigfile" +- echo "##### rtadvd.conf made by TSP ####" > "$rtadvdconfigfile" +- echo "interface $TSP_HOME_INTERFACE" >> "$rtadvdconfigfile" +- echo "{" >> "$rtadvdconfigfile" +- echo " AdvSendAdvert on;" >> "$rtadvdconfigfile" +- echo " prefix $TSP_PREFIX::/64" >> "$rtadvdconfigfile" +- echo " {" >> "$rtadvdconfigfile" +- echo " AdvOnLink on;" >> "$rtadvdconfigfile" +- echo " AdvAutonomous on;" >> "$rtadvdconfigfile" +- echo " };" >> "$rtadvdconfigfile" +- echo "};" >> "$rtadvdconfigfile" +- echo "" >> "$rtadvdconfigfile" +- /etc/init.d/radvd stop +- if [ -f $rtadvdconfigfile ]; then +- KillProcess $rtadvdconfigfile +- Exec $rtadvd -u radvd -C $rtadvdconfigfile +- Display 1 "Starting radvd: $rtadvd -u radvd -C $rtadvdconfigfile" +- else +- echo "Error : file $rtadvdconfigfile not found" +- exit 1 +- fi ++# # Router advertisement configuration ++# Display 1 "Create new $rtadvdconfigfile" ++# echo "##### rtadvd.conf made by TSP ####" > "$rtadvdconfigfile" ++# echo "interface $TSP_HOME_INTERFACE" >> "$rtadvdconfigfile" ++# echo "{" >> "$rtadvdconfigfile" ++# echo " AdvSendAdvert on;" >> "$rtadvdconfigfile" ++# echo " prefix $TSP_PREFIX::/64" >> "$rtadvdconfigfile" ++# echo " {" >> "$rtadvdconfigfile" ++# echo " AdvOnLink on;" >> "$rtadvdconfigfile" ++# echo " AdvAutonomous on;" >> "$rtadvdconfigfile" ++# echo " };" >> "$rtadvdconfigfile" ++# echo "};" >> "$rtadvdconfigfile" ++# echo "" >> "$rtadvdconfigfile" ++# /etc/init.d/radvd stop ++# if [ -f $rtadvdconfigfile ]; then ++# KillProcess $rtadvdconfigfile ++# Exec $rtadvd -u radvd -C $rtadvdconfigfile ++# Display 1 "Starting radvd: $rtadvd -u radvd -C $rtadvdconfigfile" ++# else ++# echo "Error : file $rtadvdconfigfile not found" ++# exit 1 ++# fi + fi + + Display 1 "--- End of configuration script. ---" diff --git a/ipv6/wide-dhcpv6/Makefile b/ipv6/wide-dhcpv6/Makefile new file mode 100644 index 0000000..54950e4 --- /dev/null +++ b/ipv6/wide-dhcpv6/Makefile @@ -0,0 +1,139 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wide-dhcpv6 +PKG_VERSION:=20080615 +PKG_RELEASE:=6.3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=1011e165850fe40d3e332dad2bfd30b3 + +include $(INCLUDE_DIR)/package.mk + +define Package/wide-dhcpv6/Default + SECTION:=ipv6 + CATEGORY:=IPv6 + TITLE:=WIDE-DHCPv6 + SUBMENU:=wide-dhcpv6 + DEPENDS:=+kmod-ipv6 + URL:=https://sourceforge.net/projects/wide-dhcpv6/ + MAINTAINER:=Andrew Byrne +endef + +define Package/wide-dhcpv6-client + $(call Package/wide-dhcpv6/Default) + TITLE+= client +endef + +define Package/wide-dhcpv6-client/description + WIDE-DHCPv6 is an open-source implementation of Dynamic Host Configuration Protocol + for IPv6 (DHCPv6) originally developed by the KAME project. The implementation + mainly conforms to the following standards: RFC3315,3319,3633,3646,4075,4272,etc. + + This package installs the client component. +endef + +define Package/wide-dhcpv6-server + $(call Package/wide-dhcpv6/Default) + TITLE+= server +endef + +define Package/wide-dhcpv6-server/description + WIDE-DHCPv6 is an open-source implementation of Dynamic Host Configuration Protocol + for IPv6 (DHCPv6) originally developed by the KAME project. The implementation + mainly conforms to the following standards: RFC3315,3319,3633,3646,4075,4272,etc. + + This package installs the server component. +endef + +define Package/wide-dhcpv6-relay + $(call Package/wide-dhcpv6/Default) + TITLE+= relay +endef + +define Package/wide-dhcpv6-relay/description + WIDE-DHCPv6 is an open-source implementation of Dynamic Host Configuration Protocol + for IPv6 (DHCPv6) originally developed by the KAME project. The implementation + mainly conforms to the following standards: RFC3315,3319,3633,3646,4075,4272,etc. + + This package installs the relay component. +endef + +define Package/wide-dhcpv6-control + $(call Package/wide-dhcpv6/Default) + TITLE+= client and server control utility +endef + +define Package/wide-dhcpv6-control/description + WIDE-DHCPv6 is an open-source implementation of Dynamic Host Configuration Protocol + for IPv6 (DHCPv6) originally developed by the KAME project. The implementation + mainly conforms to the following standards: RFC3315,3319,3633,3646,4075,4272,etc. + + This package installs the client and server control utility. +endef + +TARGET_CFLAGS+=-D_GNU_SOURCE + +define Build/Configure + $(call Build/Configure/Default,--with-localdbdir=/var) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + EXTRA_CFLAGS="-include debug.h" \ + all +endef + +define Package/wide-dhcpv6-client/conffiles +/etc/config/dhcp6c +endef + +define Package/wide-dhcpv6-client/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dhcp6c $(1)/usr/sbin + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/dhcp6c.conf $(1)/etc/config/dhcp6c + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/dhcp6c.init $(1)/etc/init.d/dhcp6c + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DATA) ./files/dhcp6c.hotplug $(1)/etc/hotplug.d/iface/40-dhcp6c + $(INSTALL_DIR) $(1)/etc/hotplug.d/dhcp6c + $(INSTALL_DATA) ./files/dhcp6c-dnsmasq.hotplug $(1)/etc/hotplug.d/dhcp6c/10-dnsmasq + $(INSTALL_DATA) ./files/dhcp6c-radvd.hotplug $(1)/etc/hotplug.d/dhcp6c/20-radvd + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) ./files/dhcp6c-state $(1)/usr/bin/dhcp6c-state +endef + +define Package/wide-dhcpv6-server/conffiles +/etc/config/dhcp6s +endef + +define Package/wide-dhcpv6-server/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dhcp6s $(1)/usr/sbin + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/dhcp6s.conf.sample $(1)/etc + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/dhcp6s.conf $(1)/etc/config/dhcp6s + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/dhcp6s.init $(1)/etc/init.d/dhcp6s + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DATA) ./files/dhcp6s.hotplug $(1)/etc/hotplug.d/iface/50-dhcp6s +endef + +define Package/wide-dhcpv6-relay/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dhcp6relay $(1)/usr/sbin +endef + +define Package/wide-dhcpv6-control/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dhcp6ctl $(1)/usr/sbin +endef + +$(eval $(call BuildPackage,wide-dhcpv6-client)) +$(eval $(call BuildPackage,wide-dhcpv6-server)) +$(eval $(call BuildPackage,wide-dhcpv6-relay)) +$(eval $(call BuildPackage,wide-dhcpv6-control)) diff --git a/ipv6/wide-dhcpv6/files/dhcp6c-dnsmasq.hotplug b/ipv6/wide-dhcpv6/files/dhcp6c-dnsmasq.hotplug new file mode 100644 index 0000000..12e18a2 --- /dev/null +++ b/ipv6/wide-dhcpv6/files/dhcp6c-dnsmasq.hotplug @@ -0,0 +1,53 @@ +#!/bin/sh + +. /etc/functions.sh + +getoption() { + local cfg=$1 + config_get resolvfile "$cfg" resolvfile +} + +config_load dhcp6c + +local dns +config_get dns basic dns none +[ $dns != "dnsmasq" ] && return 0 + +if [ "$ACTION" = "start" ]; then + + local domain_name_servers + config_get domain_name_servers state domain_name_servers + + if [ -n "$domain_name_servers" ]; then + + config_load dhcp + + local resolvfile + config_foreach getoption dnsmasq + + if [ -n "$resolvfile" ]; then + + cp -pf $resolvfile "$resolvfile.dhcp6c_backup" + + for nameserver in $domain_name_servers; do + echo nameserver $nameserver >> $resolvfile + done + + fi + + fi + +fi + +if [ "$ACTION" = "stop" ]; then + + config_load dhcp + + local resolvfile + config_foreach getoption dnsmasq + if [ -f "$resolvfile.dhcp6c_backup" ]; then + mv -f "$resolvfile.dhcp6c_backup" $resolvfile + fi + +fi + diff --git a/ipv6/wide-dhcpv6/files/dhcp6c-radvd.hotplug b/ipv6/wide-dhcpv6/files/dhcp6c-radvd.hotplug new file mode 100644 index 0000000..5c08e8c --- /dev/null +++ b/ipv6/wide-dhcpv6/files/dhcp6c-radvd.hotplug @@ -0,0 +1,3 @@ +#!/bin/sh + +[ -f /etc/config/radvd ] && /etc/init.d/radvd restart diff --git a/ipv6/wide-dhcpv6/files/dhcp6c-state b/ipv6/wide-dhcpv6/files/dhcp6c-state new file mode 100644 index 0000000..689ca88 --- /dev/null +++ b/ipv6/wide-dhcpv6/files/dhcp6c-state @@ -0,0 +1,18 @@ +#!/bin/sh + +. /etc/functions.sh + +uci_revert_state dhcp6c state +uci_set_state dhcp6c state "" dhcp6c_state +uci_set_state dhcp6c state domain_name_servers "$new_domain_name_servers" +uci_set_state dhcp6c state domain_name "$new_domain_name" +uci_set_state dhcp6c state ntp_servers "$new_ntp_servers" +uci_set_state dhcp6c state sip_server_address "$new_sip_servers" +uci_set_state dhcp6c state sip_server_domain_name "$new_sip_name" +uci_set_state dhcp6c state nis_server_address "$new_nis_servers" +uci_set_state dhcp6c state nis_domain_name "$new_nis_name" +uci_set_state dhcp6c state nisp_server_address "$new_nisp_servers" +uci_set_state dhcp6c state nisp_domain_name "$new_nisp_name" +uci_set_state dhcp6c state bcmcs_server_address "$new_bcmcs_servers" +uci_set_state dhcp6c state bcmcs_server_domain_name "$new_bcmcs_name" + diff --git a/ipv6/wide-dhcpv6/files/dhcp6c.conf b/ipv6/wide-dhcpv6/files/dhcp6c.conf new file mode 100644 index 0000000..04a3ca9 --- /dev/null +++ b/ipv6/wide-dhcpv6/files/dhcp6c.conf @@ -0,0 +1,42 @@ +config 'dhcp6c' 'basic' + option 'enabled' '0' # 1 = enabled; 0 = disabled + option 'interface' 'wan' # This is the interface the DHCPv6 client will run on + option 'dns' 'dnsmasq' # Which DNS server you run (only dnsmasq currently supported) + option 'debug' '0' # 1 = enable debugging; 0 = disable debugging + + # Send options (1 = send; 0 = do not send) + option 'pd' '1' # Prefix Delegation + option 'na' '0' # Non-Temporary Address + option 'rapid_commit' '1' # Rapid Commit + + # Request options (1 = request; 0 = do not request) + option 'domain_name_servers' '1' + option 'domain_name' '0' + option 'ntp_servers' '0' + option 'sip_server_address' '0' + option 'sip_server_domain_name' '0' + option 'nis_server_address' '0' + option 'nis_domain_name' '0' + option 'nisp_server_address' '0' + option 'nisp_domain_name' '0' + option 'bcmcs_server_address' '0' + option 'bcmcs_server_domain_name' '0' + + # Override the used DUID, by default it is derived from the interface MAC + # The given value must be uppercase and globally unique! + #option 'duid' '00:03:00:06:D8:5D:4C:A5:03:F2' + + # Script to run when a reply is received + option 'script' '/usr/bin/dhcp6c-state' + +# Define one or more interfaces on which prefixes should be assigned +config 'interface' 'loopback' + option 'enabled' '1' # 1 = enabled; 0 = disabled + option 'sla_id' '0' # Site level aggregator identifier specified in decimal (subnet) + option 'sla_len' '4' # Site level aggregator length (64 - size of prefix being delegated) + # e.g. /60 from ISP -> 64 - 60 = 4 + +config 'interface' 'lan' + option 'enabled' '1' + option 'sla_id' '1' + option 'sla_len' '4' diff --git a/ipv6/wide-dhcpv6/files/dhcp6c.hotplug b/ipv6/wide-dhcpv6/files/dhcp6c.hotplug new file mode 100644 index 0000000..947c53c --- /dev/null +++ b/ipv6/wide-dhcpv6/files/dhcp6c.hotplug @@ -0,0 +1,20 @@ +#!/bin/sh + +include /lib/network + +config_load "dhcp6c" + +local enabled +config_get_bool enabled basic enabled 0 +[ $enabled -eq 0 ] && return 0 + +local client_interface +config_get client_interface basic interface + +if [ "$INTERFACE" = "$client_interface" ] && [ "$ACTION" = "ifup" ]; then + /etc/init.d/dhcp6c start +fi + +if [ "$INTERFACE" = "$client_interface" ] && [ "$ACTION" = "ifdown" ]; then + /etc/init.d/dhcp6c stop +fi diff --git a/ipv6/wide-dhcpv6/files/dhcp6c.init b/ipv6/wide-dhcpv6/files/dhcp6c.init new file mode 100644 index 0000000..1224810 --- /dev/null +++ b/ipv6/wide-dhcpv6/files/dhcp6c.init @@ -0,0 +1,190 @@ +#!/bin/sh /etc/rc.common + +DHCP6C_REQUEST_OPTIONS='domain_name_servers domain_name ntp_servers sip_server_address sip_domain_name nis_server_address nis_domain_name nisp_server_address nisp_domain_name bcmcs_server_address bcmcs_domain_name' + +get_ifname() { + local interface=$1 + local ifname + scan_interfaces + config_get ifname "$interface" ifname + printf '%s\n' "$ifname" + return 0 +} + +get_device() { + local interface=$1 + local ifname=$2 + local device + scan_interfaces + config_get device "$interface" device + grep -qE "^ *$device:" /proc/net/dev && \ + printf '%s\n' "$device" || \ + printf '%s\n' "$ifname" + return 0 +} + +dhcp6c_write_duid() { + local mac="${1:-$(ifconfig "$client_device" | sed -ne 's/[[:space:]]*$//; s/.*HWaddr //p')}" + local pat="[0-9A-F][0-9A-F]" + + case "$mac" in + # exactly 6 octets -> assume type 3 (DUID-LL - RFC3315, 9.4) + $pat:$pat:$pat:$pat:$pat:$pat) + local oIFS="$IFS"; IFS=":"; set -- $mac; IFS="$oIFS" + + # low endian + if [ "$(printf \\1 | hexdump -n1 -ve '8/2 "" "%04x" ""')" = "0001" ]; then + printf \\x0a\\x00 + + # big endian + else + printf \\x00\\x0a + fi + + printf \\x00\\x03\\x00\\x06\\x$1\\x$2\\x$3\\x$4\\x$5\\x$6 + logger -t dhcp6c "Using MAC address DUID 00:03:00:06:$1:$2:$3:$4:$5:$6" + ;; + # at least 7 octets -> could be type 1 or type 2 + $pat:$pat:$pat:$pat:$pat:$pat:*) + local len_id=":$(echo "$mac" | sed -e 's/[^:]//g')" + local len_hi=$(printf "%02x" $((${#len_id} / 0xFF)) ) + local len_lo=$(printf "%02x" $((${#len_id} % 0xFF)) ) + + # low endian + if [ "$(printf \\1 | hexdump -n1 -ve '8/2 "" "%04x" ""')" = "0001" ]; then + printf \\x$len_lo\\x$len_hi + + # big endian + else + printf \\x$len_hi\\x$len_lo + fi + + printf $(echo "$mac" | sed -e 's/^/\\x/; s/:/\\x/g') + logger -t dhcp6c "Using user provided DUID $mac" + ;; + *) + logger -t dhcp6c "Unable to derive DUID from interface '$client_device' and no valid user DUID given" + ;; + esac +} + +dhcp6c_write_interface() { + local cfg=$1 + local sla_id + local sla_len + local enabled + + config_get_bool enabled "$cfg" enabled 0 + + if [ $enabled -ne 0 ]; then + config_get sla_id "$cfg" sla_id + config_get sla_len "$cfg" sla_len + + printf '\tprefix-interface %s {\n' "$(get_ifname $cfg)" + printf '\t\tsla-id %s;\n' "$sla_id" + printf '\t\tsla-len %s;\n' "$sla_len" + printf '\t};\n' + fi +} + +dhcp6c_write_request() { + printf '\trequest %s;\n' $1 | sed -e s/_/-/g +} + +dhcp6c_write_config() { + local pd + local na + config_get_bool pd basic pd 0 + config_get_bool na basic na 0 + + printf 'interface %s {\n' "$client_ifname" + + if [ $pd -ne 0 ]; then + printf '\tsend ia-pd 0;\n' + fi + + if [ $na -ne 0 ]; then + printf '\tsend ia-na 0;\n' + fi + + local rapid_commit + config_get_bool rapid_commit basic rapid_commit 0 + [ $rapid_commit -ne 0 ] && printf '\tsend rapid-commit;\n' + + local script + config_get script basic script + [ "$script" != "" ] && printf '\tscript "%s";\n' "$script" + + local request + local value + for request in $DHCP6C_REQUEST_OPTIONS; do + config_get_bool value basic "$request" 0 + [ $value -ne 0 ] && dhcp6c_write_request "$request" + done + + printf '};\n\n' + + if [ $pd -ne 0 ]; then + printf 'id-assoc pd 0 {\n' + config_foreach dhcp6c_write_interface interface + printf '};\n\n' + fi + + if [ $na -ne 0 ]; then + printf 'id-assoc na 0 {\n' + printf '};\n\n' + fi + + return 0 +} + +start() { + [ ! -e /etc/dhcp6cctlkey ] && `dd if=/dev/urandom count=1 2> /dev/null | md5sum | cut -d" " -f1 > /etc/dhcp6cctlkey` + + [ -e /var/run/dhcp6c.pid ] && return 0 + + include /lib/network + + config_load "dhcp6c" + + local enabled + config_get_bool enabled basic enabled 0 + [ $enabled -eq 0 ] && return 0 + + local user_duid + config_get user_duid basic duid + + logger -t dhcp6c starting dhcp6c + + local client_interface + config_get client_interface basic interface + local client_ifname=$(get_ifname "$client_interface") + local client_device=$(get_device "$client_interface" "$client_ifname") + + local config_file="/var/etc/dhcp6c.conf" + local duid_file="/var/dhcp6c_duid" + mkdir -m 755 -p /var/etc + dhcp6c_write_config > $config_file + dhcp6c_write_duid "$user_duid" > $duid_file + + local debug + local debug_option + config_get_bool debug basic debug 0 + [ $debug -eq 1 ] && debug_option="-D" + /usr/sbin/dhcp6c -c $config_file $debug_option $client_ifname + + sleep 3 + ACTION=start /sbin/hotplug-call dhcp6c + + return 0 +} + +stop() { + logger -t dhcp6c stopping dhcp6c + service_kill dhcp6c /var/run/dhcp6c.pid + rm -f /var/etc/dhcp6c.conf /var/run/dhcp6c.pid + ACTION=stop /sbin/hotplug-call dhcp6c + return 0 +} + + diff --git a/ipv6/wide-dhcpv6/files/dhcp6s.conf b/ipv6/wide-dhcpv6/files/dhcp6s.conf new file mode 100644 index 0000000..dda53d1 --- /dev/null +++ b/ipv6/wide-dhcpv6/files/dhcp6s.conf @@ -0,0 +1,4 @@ +config 'dhcp6s' 'basic' + option 'enabled' '0' # 1 = enabled; 0 = disabled + option 'interface' 'lan' # This is the interface the DHCPv6 server will run on + option 'config_file' '/etc/dhcp6s.conf' # Config file (as this UCI config doesn't fully support all options) diff --git a/ipv6/wide-dhcpv6/files/dhcp6s.hotplug b/ipv6/wide-dhcpv6/files/dhcp6s.hotplug new file mode 100644 index 0000000..7260149 --- /dev/null +++ b/ipv6/wide-dhcpv6/files/dhcp6s.hotplug @@ -0,0 +1,20 @@ +#!/bin/sh + +include /lib/network + +config_load "dhcp6s" + +local enabled +config_get_bool enabled basic enabled 0 +[ $enabled -eq 0 ] && return 0 + +local server_interface +config_get server_interface basic interface + +if [ "$INTERFACE" = "$server_interface" ] && [ "$ACTION" = "ifup" ]; then + /etc/init.d/dhcp6s start +fi + +if [ "$INTERFACE" = "$server_interface" ] && [ "$ACTION" = "ifdown" ]; then + /etc/init.d/dhcp6s stop +fi diff --git a/ipv6/wide-dhcpv6/files/dhcp6s.init b/ipv6/wide-dhcpv6/files/dhcp6s.init new file mode 100644 index 0000000..fc0da52 --- /dev/null +++ b/ipv6/wide-dhcpv6/files/dhcp6s.init @@ -0,0 +1,50 @@ +#!/bin/sh /etc/rc.common + +get_ifname() { + local interface=$1 + local ifname + scan_interfaces + config_get ifname "$interface" ifname + printf '%s\n' "$ifname" + return 0 +} + +start() { + + [ ! -e /etc/dhcp6sctlkey ] && `dd if=/dev/urandom count=1 2> /dev/null | md5sum | cut -d" " -f1 > /etc/dhcp6sctlkey` + + [ -e /var/run/dhcp6s.pid ] && return 0 + + include /lib/network + + config_load "dhcp6s" + + local enabled + config_get_bool enabled basic enabled 0 + [ $enabled -eq 0 ] && return 0 + + logger starting dhcp6s + + local server_interface + config_get server_interface basic interface + local server_ifname=$(get_ifname "$server_interface") + + local config_file + config_get config_file basic config_file + + [ ! -e $config_file ] && return 1 + + /usr/sbin/dhcp6s -c $config_file $server_ifname + + return 0 + +} + +stop() { + + logger stopping dhcp6s + kill -TERM `cat /var/run/dhcp6s.pid` + return 0 + +} + diff --git a/ipv6/wide-dhcpv6/patches/000-cftoken-noyywrap.patch b/ipv6/wide-dhcpv6/patches/000-cftoken-noyywrap.patch new file mode 100644 index 0000000..df1361e --- /dev/null +++ b/ipv6/wide-dhcpv6/patches/000-cftoken-noyywrap.patch @@ -0,0 +1,9 @@ +--- a/cftoken.l 2007-03-21 10:52:55.000000000 +0100 ++++ b/cftoken.l 2009-06-12 15:40:03.000000000 +0200 +@@ -1,5 +1,6 @@ + /* $KAME: cftoken.l,v 1.35 2005/01/12 06:06:11 suz Exp $ */ + ++%option noyywrap + %{ + /* + * Copyright (C) 2002 WIDE Project. diff --git a/ipv6/wide-dhcpv6/patches/001-linux_old_compat.patch b/ipv6/wide-dhcpv6/patches/001-linux_old_compat.patch new file mode 100644 index 0000000..6dca9f3 --- /dev/null +++ b/ipv6/wide-dhcpv6/patches/001-linux_old_compat.patch @@ -0,0 +1,37 @@ +--- wide-dhcpv6-20080615.orig/common.h 2007-03-21 20:52:57.000000000 +1100 ++++ wide-dhcpv6-20080615/common.h 2009-11-29 16:00:02.000000000 +1100 +@@ -187,3 +187,34 @@ + #ifndef HAVE_STRLCPY + extern size_t strlcpy __P((char *, const char *, size_t)); + #endif ++ ++/* ++ * compat hacks in case libc and kernel get out of sync: ++ * ++ * glibc 2.4 and uClibc 0.9.29 introduce IPV6_RECVPKTINFO etc. and change IPV6_PKTINFO ++ * This is only supported in Linux kernel >= 2.6.14 ++ * ++ * This is only an approximation because the kernel version that libc was compiled against ++ * could be older or newer than the one being run. But this should not be a problem -- ++ * we just keep using the old kernel interface. ++ * ++ * these are placed here because they're needed in all of socket.c, recv.c and send.c ++ */ ++#ifdef __linux__ ++# if defined IPV6_RECVHOPLIMIT || defined IPV6_RECVPKTINFO ++# include ++# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) ++# if defined IPV6_RECVHOPLIMIT && defined IPV6_2292HOPLIMIT ++# undef IPV6_RECVHOPLIMIT ++# define IPV6_RECVHOPLIMIT IPV6_2292HOPLIMIT ++# endif ++# if defined IPV6_RECVPKTINFO && defined IPV6_2292PKTINFO ++# undef IPV6_RECVPKTINFO ++# undef IPV6_PKTINFO ++# define IPV6_RECVPKTINFO IPV6_2292PKTINFO ++# define IPV6_PKTINFO IPV6_2292PKTINFO ++# endif ++# endif ++# endif ++#endif ++ diff --git a/ipv6/wide-dhcpv6/patches/002-fix-dprintf-clash.patch b/ipv6/wide-dhcpv6/patches/002-fix-dprintf-clash.patch new file mode 100644 index 0000000..a1efcae --- /dev/null +++ b/ipv6/wide-dhcpv6/patches/002-fix-dprintf-clash.patch @@ -0,0 +1,56 @@ +Index: wide-dhcpv6-20080615/common.c +=================================================================== +--- wide-dhcpv6-20080615.orig/common.c 2010-11-02 22:07:03.161000001 +0100 ++++ wide-dhcpv6-20080615/common.c 2010-11-02 22:07:19.532000002 +0100 +@@ -3207,7 +3207,7 @@ + } + + void +-dprintf(int level, const char *fname, const char *fmt, ...) ++my_dprintf(int level, const char *fname, const char *fmt, ...) + { + va_list ap; + char logbuf[LINE_MAX]; +Index: wide-dhcpv6-20080615/Makefile.in +=================================================================== +--- wide-dhcpv6-20080615.orig/Makefile.in 2010-11-02 22:07:03.151000001 +0100 ++++ wide-dhcpv6-20080615/Makefile.in 2010-11-02 22:07:19.533000002 +0100 +@@ -37,7 +37,7 @@ + group= @group@ + + CFLAGS= @CFLAGS@ @DEFS@ -DSYSCONFDIR=\"${sysconfdir}\" \ +- -DLOCALDBDIR=\"${localdbdir}\" ++ -DLOCALDBDIR=\"${localdbdir}\" $(EXTRA_CFLAGS) + LDFLAGS=@LDFLAGS@ + LIBOBJS=@LIBOBJS@ + LIBS= @LIBS@ @LEXLIB@ +Index: wide-dhcpv6-20080615/common.h +=================================================================== +--- wide-dhcpv6-20080615.orig/common.h 2010-11-02 22:07:23.187000002 +0100 ++++ wide-dhcpv6-20080615/common.h 2010-11-02 22:08:43.646001043 +0100 +@@ -155,7 +155,6 @@ + extern int in6_addrscopebyif __P((struct in6_addr *, char *)); + extern int in6_scope __P((struct in6_addr *)); + extern void setloglevel __P((int)); +-extern void dprintf __P((int, const char *, const char *, ...)); + extern int get_duid __P((char *, struct duid *)); + extern void dhcp6_init_options __P((struct dhcp6_optinfo *)); + extern void dhcp6_clear_options __P((struct dhcp6_optinfo *)); +Index: wide-dhcpv6-20080615/debug.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ wide-dhcpv6-20080615/debug.h 2010-11-02 22:14:58.354999418 +0100 +@@ -0,0 +1,13 @@ ++#ifndef MY_DEBUG_H_ ++#define MY_DEBUG_H_ ++ ++/* First include stdio.h, which may contain the prototype for the external dprintf. ++ * We do not want that. We redefine dprintf to our local implementation. */ ++#include ++#define dprintf my_dprintf ++#ifndef __P ++# define __P(x) x ++#endif ++extern void my_dprintf __P((int, const char *, const char *, ...)); ++ ++#endif /* MY_DEBUG_H_ */ diff --git a/lang/cython/Makefile b/lang/cython/Makefile new file mode 100644 index 0000000..0e02fdf --- /dev/null +++ b/lang/cython/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cython +PKG_VERSION:=0.10.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=Cython-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.cython.org/ +PKG_BUILD_DIR:=$(BUILD_DIR)/Cython-$(PKG_VERSION) +PKG_MD5SUM:=684103ed37472d9beef3a38e0d5c431d + +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/cython + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=cython + URL:=http://www.cython.org + DEPENDS:=+python-mini +endef + +define Package/cython/description + Cython is a language that should make writing C extensions for the Python language easier +endef + +define Build/Compile + # <--no-cython-compile> required, otherwise setup.py calls the target-gcc to create so-files which obviously can't be used by on the host system. + $(call Build/Compile/PyMod,,install --no-cython-compile --prefix="$(PKG_INSTALL_DIR)/usr") +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,cython)) diff --git a/lang/distribute/Makefile b/lang/distribute/Makefile new file mode 100644 index 0000000..d6cd067 --- /dev/null +++ b/lang/distribute/Makefile @@ -0,0 +1,69 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=distribute +PKG_VERSION:=0.6.16 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/$(PKG_NAME)/ +PKG_MD5SUM:=19ba112f4916cca1d5a89dbad2b361da +PKG_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)/ + +HOST_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +PYTHON:=$(HOST_PYTHON_BIN) + +define Package/distribute + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Distribute + URL:=http://pypi.python.org/pypi/distribute + DEPENDS:=+python + PROVIDES:=setuptools +endef + +define Package/distribute/description + Distribute (fork of Setuptools) is a collection of extensions to Distutils +endef + +define Host/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Host/Install + $(INSTALL_DIR) $(STAGING_DIR)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(STAGING_DIR)$(PYTHON_PKG_DIR)/ +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/distribute/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR)/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/easy_install \ + $(1)/usr/bin/ + $(SED) '1s/#\!.*/#\!\/usr\/bin\/python/' $(1)/usr/bin/easy_install +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,distribute)) diff --git a/lang/egenix-mx/Makefile b/lang/egenix-mx/Makefile new file mode 100644 index 0000000..301dc0b --- /dev/null +++ b/lang/egenix-mx/Makefile @@ -0,0 +1,94 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=egenix-mx +PKG_VERSION:=2.0.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-base-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.egenix.com/python/ +PKG_MD5SUM:=66841151728a06f92d0b8dd2ed317a29 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-base-$(PKG_VERSION) +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/python-egenix-mx + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + DEPENDS:=+python-mini + TITLE:=Egenix mxBase + URL:=http://www.egenix.com/products/python/mxBase/ +endef + +define Package/python-egenix-mx/description + This package contains a set of base packages from Egenix required by other + python packages. +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Compile + $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) + $(call Build/Compile/PyMod,., \ + build --build-lib="foo", \ + BASECFLAGS="$(TARGET_CFLAGS)" \ + OPT="" \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/mx/BeeBase/mxBeeBase + $(CP) \ + $(PKG_BUILD_DIR)/mx/BeeBase/mxBeeBase/mxh.h \ + $(PKG_BUILD_DIR)/mx/BeeBase/mxBeeBase/btr.h \ + $(PKG_BUILD_DIR)/mx/BeeBase/mxBeeBase/mxBeeBase.h \ + $(1)$(PYTHON_PKG_DIR)/mx/BeeBase/mxBeeBase/ + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/mx/DateTime/mxDateTime + $(CP) \ + $(PKG_BUILD_DIR)/mx/DateTime/mxDateTime/mxh.h \ + $(PKG_BUILD_DIR)/mx/DateTime/mxDateTime/mxDateTime.h \ + $(1)$(PYTHON_PKG_DIR)/mx/DateTime/mxDateTime/ + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/mx/Proxy/mxProxy + $(CP) \ + $(PKG_BUILD_DIR)/mx/Proxy/mxProxy/mxh.h \ + $(PKG_BUILD_DIR)/mx/Proxy/mxProxy/mxProxy.h \ + $(1)$(PYTHON_PKG_DIR)/mx/Proxy/mxProxy/ + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/mx/Queue/mxQueue + $(CP) \ + $(PKG_BUILD_DIR)/mx/Queue/mxQueue/mxh.h \ + $(PKG_BUILD_DIR)/mx/Queue/mxQueue/mxQueue.h \ + $(1)$(PYTHON_PKG_DIR)/mx/Queue/mxQueue/ + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/mx/TextTools/mxTextTools + $(CP) \ + $(PKG_BUILD_DIR)/mx/TextTools/mxTextTools/mxh.h \ + $(PKG_BUILD_DIR)/mx/TextTools/mxTextTools/mxbmse.h \ + $(PKG_BUILD_DIR)/mx/TextTools/mxTextTools/mxte.h \ + $(PKG_BUILD_DIR)/mx/TextTools/mxTextTools/mxTextTools.h \ + $(1)$(PYTHON_PKG_DIR)/mx/TextTools/mxTextTools/ + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/mx/Tools/mxTools + $(CP) \ + $(PKG_BUILD_DIR)/mx/Tools/mxTools/mxh.h \ + $(PKG_BUILD_DIR)/mx/Tools/mxTools/mxTools.h \ + $(1)$(PYTHON_PKG_DIR)/mx/Tools/mxTools/ +endef + +define PyPackage/python-egenix-mx/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) $(PKG_BUILD_DIR)/foo/mx $(1)$(PYTHON_PKG_DIR)/ + ln -sf $(1)$(PYTHON_PKG_DIR)/mx/BeeBase/ExitFunctions.py \ + $(1)$(PYTHON_PKG_DIR)/mx/Misc/ + rm -rf $(1)$(PYTHON_PKG_DIR)/mx/*/Examples +endef + +$(eval $(call PyPackage,python-egenix-mx)) +$(eval $(call BuildPackage,python-egenix-mx)) diff --git a/lang/eggdrop/Makefile b/lang/eggdrop/Makefile new file mode 100644 index 0000000..0610090 --- /dev/null +++ b/lang/eggdrop/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=eggdrop +PKG_VERSION:=1.6.17 +PKG_RELEASE:=1 + +PKG_SOURCE:=eggdrop$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.eggheads.org/pub/eggdrop/source/1.6 +PKG_MD5SUM:=68e181201483dee398f9904e8652e6ca + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION) +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/eggdrop + SECTION:=lang + CATEGORY:=Languages + TITLE:=EggDrop IRC BOT + DEPENDS:=+tcl + URL:=http://www.eggheads.org +endef + +define Package/eggdrop/description + EggDrop IRC BOT +endef + +CONFIGURE_ARGS+=\ + --prefix="$(PKG_INSTALL_DIR)/eggdrop" \ + --enable-threads \ + --with-tcllib="$(STAGING_DIR)/usr/lib/libtcl8.5.so" \ + --with-tclinc="$(STAGING_DIR)/usr/include/tcl.h" + +define Build/Compile + $(MAKE) config -C $(PKG_BUILD_DIR) + $(call Build/Compile/Default) +endef + +define Build/Install + $(call Build/Install/Default) + rm -Rvf $(PKG_INSTALL_DIR)/eggdrop/doc +endef + +define Package/eggdrop/install + $(INSTALL_DIR) $(1)/eggdrop + $(CP) $(PKG_INSTALL_DIR)/* $(1)/eggdrop +endef + +$(eval $(call BuildPackage,eggdrop)) diff --git a/lang/eggdrop/patches/001-makefile_in.patch b/lang/eggdrop/patches/001-makefile_in.patch new file mode 100644 index 0000000..8c09c41 --- /dev/null +++ b/lang/eggdrop/patches/001-makefile_in.patch @@ -0,0 +1,11 @@ +--- eggdrop/Makefile.in 2004-07-25 07:17:33.000000000 -0400 ++++ eggdrop-patched/Makefile.in 2005-05-01 04:33:56.890000000 -0400 +@@ -71,7 +71,7 @@ + + modconf = $(top_srcdir)/misc/modconfig --top_srcdir=$(top_srcdir) + +-egg_test_run = EGG_LANGDIR=$(top_srcdir)/language ./$(EGGEXEC) -v ++egg_test_run = EGG_LANGDIR=$(top_srcdir)/language #./$(EGGEXEC) -v + + post_config = echo "" && \ + echo "You can now compile the bot, using \"make\"." && \ diff --git a/lang/eggdrop/patches/002-eggdrop_h.patch b/lang/eggdrop/patches/002-eggdrop_h.patch new file mode 100644 index 0000000..311b63c --- /dev/null +++ b/lang/eggdrop/patches/002-eggdrop_h.patch @@ -0,0 +1,12 @@ +--- eggdrop/src/eggdrop.h 2008-09-08 21:09:57.000000000 +0100 ++++ eggdrop-patched/src/eggdrop.h 2008-09-08 21:11:46.000000000 +0100 +@@ -218,9 +218,6 @@ + # define sigemptyset(x) ((*(int *)(x))=0) + #endif + +-#ifndef HAVE_SOCKLEN_T +-typedef int socklen_t; +-#endif + + /* + * Handy aliases for memory tracking and core dumps diff --git a/lang/eggdrop/patches/003-language_c.patch b/lang/eggdrop/patches/003-language_c.patch new file mode 100644 index 0000000..d67d4fc --- /dev/null +++ b/lang/eggdrop/patches/003-language_c.patch @@ -0,0 +1,25 @@ +--- eggdrop/src/language.c 2004-04-06 07:56:38.000000000 +0100 ++++ eggdrop-patched/src/language.c 2008-09-08 23:24:34.000000000 +0100 +@@ -240,8 +240,19 @@ + #else + if (sscanf(lbuf, "0x%x,%500c", &lidx, ltext) != 2) { + #endif +- putlog(LOG_MISC, "*", "Malformed text line in %s at %d.", +- langfile, lline); ++ ltexts++; ++ ctmp = strchr(ltext, '\n'); ++ *ctmp = 0; ++ while (ltext[strlen(ltext) - 1] == '\\') { ++ ltext[strlen(ltext) - 1] = 0; ++ if (fgets(lbuf, 511, FLANG)) { ++ lline++; ++ ctmp = strchr(lbuf, '\n'); ++ *ctmp = 0; ++ ltext = nrealloc(ltext, strlen(lbuf) + strlen(ltext) + 1); ++ strcpy(strchr(ltext, 0), lbuf); ++ } ++ } + } else { + ltexts++; + ctmp = strchr(ltext, '\n'); + diff --git a/lang/eggdrop/patches/004-main_c.patch b/lang/eggdrop/patches/004-main_c.patch new file mode 100644 index 0000000..ad263cd --- /dev/null +++ b/lang/eggdrop/patches/004-main_c.patch @@ -0,0 +1,14 @@ +--- eggdrop/src/main.c 2004-07-02 22:21:08.000000000 +0100 ++++ eggdrop/src/main-patched/main.c 2008-09-08 21:37:18.000000000 +0100 +@@ -792,8 +792,8 @@ + printf("\n%s\n", version); + + /* Don't allow eggdrop to run as root */ +- if (((int) getuid() == 0) || ((int) geteuid() == 0)) +- fatal("ERROR: Eggdrop will not run as root!", 0); ++ if (((int) getuid() == 666) || ((int) geteuid() == 666)) ++ fatal("ERROR: Eggdrop will not run the devil!", 0); + + init_dcc_max(); + init_userent(); + diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile new file mode 100644 index 0000000..5c7c592 --- /dev/null +++ b/lang/erlang/Makefile @@ -0,0 +1,335 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=erlang +PKG_VERSION:=R13A +PKG_RELEASE:=2 + +PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:= http://www.erlang.org/download/ \ + http://erlang.mirror.su.se/ +PKG_MD5SUM:=76804ff9c18710184cf0c0230a0443fc + +PKG_BUILD_DEPENDS:=erlang/host openssl + +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/otp_src_$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/otp_src_$(PKG_VERSION) + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Package/erlang/Default + SUBMENU:=Erlang + SECTION:=lang + CATEGORY:=Languages + TITLE:=Erlang/OTP programming language + URL:=http://www.erlang.org/ +endef + +define Package/erlang/Default/description + Erlang/OTP is a general-purpose programming language and runtime + environment. Erlang has built-in support for concurrency, distribution + and fault tolerance. +endef + + +define Package/erlang +$(call Package/erlang/Default) + DEPENDS+= +libncurses +librt + PROVIDES:= erlang-erts=5.7 erlang-kernel=2.13 erlang-sasl=2.1.6 erlang-stdlib=1.16 +endef + +define Package/erlang/description +$(call Package/erlang/Default/description) + . + This package contains the runtime implementation and a minimal set of + modules (erts, kernel, sasl & stdlib). +endef + + +define Package/erlang-asn1 +$(call Package/erlang/Default) + TITLE:=Abstract Syntax Notation One (ASN.1) support + VERSION:=1.6.8 + DEPENDS+= +erlang +erlang-syntax-tools +endef + +define Package/erlang-asn1/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides Abstract Syntax Notation One (ASN.1) + support. +endef + + +define Package/erlang-compiler +$(call Package/erlang/Default) + TITLE:=Byte code compiler + VERSION:=4.6 + DEPENDS+= +erlang +erlang-hipe +endef + +define Package/erlang-compiler/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides a byte code compiler for Erlang which + produces highly compact code. +endef + + +define Package/erlang-crypto +$(call Package/erlang/Default) + TITLE:=Cryptography support + VERSION:=4.6 + DEPENDS+= +erlang +libopenssl +endef + +define Package/erlang-crypto/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides functions for computation of message + digests, and encryption and decryption functions. +endef + + +define Package/erlang-hipe +$(call Package/erlang/Default) + TITLE:=High Performance Erlang + VERSION:=5.0.13 + DEPENDS+= +erlang +endef + +define Package/erlang-hipe/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides HiPE (High Performance Erlang) + support. +endef + + +define Package/erlang-inets +$(call Package/erlang/Default) + TITLE:=Internet clients and servers + VERSION:=5.0.13 + DEPENDS+= +erlang +endef + +define Package/erlang-inets/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides a container for Internet clients and + servers. Currently a FTP client, a HTTP client and server, and a tftp + client and server have been incorporated in Inets. +endef + + +define Package/erlang-mnesia +$(call Package/erlang/Default) + TITLE:=Distributed database + VERSION:=4.4.8 + DEPENDS+= +erlang +endef + +define Package/erlang-mnesia/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides a distributed DataBase Management + System (DBMS), appropriate for telecommunications applications and + other Erlang applications which require continuous operation and + exhibit soft real-time properties. +endef + + +define Package/erlang-runtime-tools +$(call Package/erlang/Default) + TITLE:=Low-profile debugging/tracing tools + VERSION:=1.8 + DEPENDS+= +erlang +endef + +define Package/erlang-runtime-tools/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides low footprint tracing/debugging tools + suitable for inclusion in a production system. +endef + + +define Package/erlang-snmp +$(call Package/erlang/Default) + TITLE:=Simple Network Management Protocol (SNMP) support + VERSION:=4.13 + DEPENDS+= +erlang +erlang-asn1 +endef + +define Package/erlang-snmp/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides Simple Network Management Protocol + (SNMP) support including a MIB compiler and tools for creating SNMP + agents. +endef + + +define Package/erlang-ssh +$(call Package/erlang/Default) + TITLE:=Secure Shell (SSH) support + VERSION:=1.1.1 + DEPENDS+= +erlang +erlang-crypto +endef + +define Package/erlang-ssh/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides an implementation of the Secure Shell + protocol, with SSH & SFTP support. +endef + + +define Package/erlang-ssl +$(call Package/erlang/Default) + TITLE:=Secure Sockets Layer (SSL) support + VERSION:=3.10.1 + DEPENDS+= +erlang +erlang-crypto +endef + +define Package/erlang-ssl/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides support for secure communication over + sockets. +endef + + +define Package/erlang-syntax-tools +$(call Package/erlang/Default) + TITLE:=Abstract Erlang syntax trees handling support + VERSION:=1.6 + DEPENDS+= +erlang +endef + +define Package/erlang-syntax-tools/description +$(call Package/erlang/Default/description) + . + This Erlang/OTP package provides support for handling abstract Erlang + syntax trees. +endef + + +# Host + +HOST_CONFIGURE_ARGS += \ + --disable-hipe \ + --disable-smp-support \ + --without-java \ + --without-ssl + +HOST_CONFIGURE_VARS += \ + ac_cv_prog_JAVAC="" \ + ac_cv_prog_javac_ver_1_2=no + +define Host/Compile + $(MAKE) -C $(HOST_BUILD_DIR) all +endef + +define Host/Install + $(MAKE) -C $(HOST_BUILD_DIR) install +endef + + +# Target + +CONFIGURE_ARGS += \ + --disable-hipe \ + --disable-smp-support \ + --disable-threads \ + --without-java \ + --with-ssl="$(STAGING_DIR)/usr" \ + --enable-dynamic-ssl-lib + +CONFIGURE_VARS += \ + SHLIB_LD="$(TARGET_CC)" \ + TARGET_ARCH="$(TARGET_ARCH)" \ + ac_cv_prog_RX_LD="$(TARGET_LD)" \ + ac_cv_prog_JAVAC="" \ + ac_cv_prog_javac_ver_1_2=no \ + ac_cv_func_getaddrinfo=no \ + ac_cv_func_mmap_fixed_mapped=yes \ + ac_cv_path_WX_CONFIG_PATH=no + +EXTRA_LDFLAGS+=-lz + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + noboot + $(MAKE) -C $(PKG_BUILD_DIR) \ + INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ + install +endef + +define Package/erlang/install + $(INSTALL_DIR) $(1)/usr/bin + for f in epmd erl erlc escript run_erl; do \ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/$$$$f $(1)/usr/bin/ ; \ + done + $(INSTALL_DIR) $(1)/usr/lib/erlang/bin + for f in erl erlc escript run_erl start start.boot start.script start_clean.boot start_erl start_sasl.boot to_erl; do \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/bin/$$$$f $(1)/usr/lib/erlang/bin/ ; \ + done + $(INSTALL_DIR) $(1)/usr/lib/erlang/lib + for m in erts kernel sasl stdlib; do \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$m-* $(1)/usr/lib/erlang/lib/ ; \ + rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/examples ; \ + rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/src ; \ + done + $(INSTALL_DIR) $(1)/usr/lib/erlang + $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/erts-* $(1)/usr/lib/erlang/ + rm -rf $(1)/usr/lib/erlang/erts-*/{doc,include,lib,man,src} + rm -rf $(1)/usr/lib/erlang/erts-*/bin/*.src + $(INSTALL_DIR) $(1)/usr/lib/erlang/releases + $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/releases/* $(1)/usr/lib/erlang/releases/ + $(SED) 's,%ERL_ROOT%,/usr/lib/erlang,g' \ + $(1)/usr/lib/erlang/releases/RELEASES.src + mv -f $(1)/usr/lib/erlang/releases/RELEASES.src \ + $(1)/usr/lib/erlang/releases/RELEASES + for f in bin/erl bin/start erts-*/bin/erl erts-*/bin/start; do \ + $(SED) 's,^\(ROOTDIR\)=.*,\1=/usr/lib/erlang,g' \ + $(1)/usr/lib/erlang/$$$$f ; \ + done +endef + + +define BuildModule + + define Package/erlang-$(1)/install + $(INSTALL_DIR) $$(1)/usr/lib/erlang/lib + for m in $(2); do \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$$$$$m-* $$(1)/usr/lib/erlang/lib/ ; \ + rm -rf $$(1)/usr/lib/erlang/lib/$$$$$$$$m-*/{examples,priv/obj,src} ; \ + done + endef + + $$(eval $$(call BuildPackage,erlang-$(1))) + +endef + + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,erlang)) +$(eval $(call BuildModule,asn1,asn1)) +$(eval $(call BuildModule,compiler,compiler)) +$(eval $(call BuildModule,crypto,crypto)) +$(eval $(call BuildModule,hipe,hipe)) +$(eval $(call BuildModule,inets,inets)) +$(eval $(call BuildModule,mnesia,mnesia)) +$(eval $(call BuildModule,runtime-tools,runtime_tools)) +$(eval $(call BuildModule,snmp,snmp)) +$(eval $(call BuildModule,ssh,ssh)) +$(eval $(call BuildModule,ssl,ssl)) +$(eval $(call BuildModule,syntax-tools,syntax_tools)) diff --git a/lang/erlang/patches/101-emulator_includes.patch b/lang/erlang/patches/101-emulator_includes.patch new file mode 100644 index 0000000..933c73e --- /dev/null +++ b/lang/erlang/patches/101-emulator_includes.patch @@ -0,0 +1,11 @@ +--- a/erts/emulator/Makefile.in ++++ b/erts/emulator/Makefile.in +@@ -591,7 +591,7 @@ endif + + + $(OBJDIR)/%.o: beam/%.c +- $(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ ++ $(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@ + + else + diff --git a/lang/erlang/patches/102-relative_symlinks.patch b/lang/erlang/patches/102-relative_symlinks.patch new file mode 100644 index 0000000..42549ac --- /dev/null +++ b/lang/erlang/patches/102-relative_symlinks.patch @@ -0,0 +1,25 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -809,9 +809,10 @@ install.Install: + # Install erlang base public files + # + install.bin: ++ cd $(BINDIR); \ + for file in $(ERL_BASE_PUB_FILES); do \ + rm -f $(BINDIR)/$$file; \ +- ${LN_S} $(ERLANG_BINDIR)/$$file $(BINDIR)/$$file; \ ++ ${LN_S} ../lib/erlang/bin/$$file .; \ + done + + # +--- a/erts/etc/unix/Install.src ++++ b/erts/etc/unix/Install.src +@@ -104,7 +104,7 @@ if [ -h epmd ]; then + /bin/rm -f epmd + fi + +-ln -s $ERL_ROOT/erts-%I_VSN%/bin/epmd epmd ++ln -s ../erts-%I_VSN%/bin/epmd epmd + + cp -p $ERL_ROOT/erts-%I_VSN%/bin/run_erl . + cp -p $ERL_ROOT/erts-%I_VSN%/bin/to_erl . diff --git a/lang/gst-python/Makefile b/lang/gst-python/Makefile new file mode 100644 index 0000000..e94addb --- /dev/null +++ b/lang/gst-python/Makefile @@ -0,0 +1,71 @@ +# +# Copyright (C) 2008-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gst-python +PKG_VERSION:=0.10.13 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-python/ +PKG_MD5SUM:=870440c6aad304112961ef5700d7698f +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +$(call include_mk, python-package.mk) + + +TARGET_CFLAGS += $(FPIC) +CONFIGURE_VARS += PYTHON=$(HOST_PYTHON) + +define Package/gst-python + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=python bindings for gstreamer + URL:=http://gstreamer.freedesktop.org/ + DEPENDS:=+gstreamer +gst-plugins-base +python-gobject +python-mini +endef + +define Package/gst-python/description + python bindings for gstreamer +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + + $(SED) \ + "s,^defsdir=.*,defsdir=$(STAGING_DIR)/usr/share/gst-python/0.10/defs/,g" \ + $(1)/usr/lib/pkgconfig/gst-python-0.10.pc + + $(INSTALL_DIR) $(1)/usr/share/gst-python/0.10/defs + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/gst-python/0.10/defs/* \ + $(1)/usr/share/gst-python/0.10/defs/ +endef + +define Package/gst-python/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gst-0.10/gst/extend + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/{gstoption.so,pygst.pth,pygst.py} \ + $(1)$(PYTHON_PKG_DIR)/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gst-0.10/gst/*.{so,py} \ + $(1)$(PYTHON_PKG_DIR)/gst-0.10/gst/ + + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gst-0.10/gst/extend/*.py \ + $(1)$(PYTHON_PKG_DIR)/gst-0.10/gst/extend/ +endef + +$(eval $(call BuildPackage,gst-python)) diff --git a/lang/ipython/Makefile b/lang/ipython/Makefile new file mode 100644 index 0000000..ab349a4 --- /dev/null +++ b/lang/ipython/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ipython +PKG_VERSION:=0.8.2 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://ipython.scipy.org/dist/ +PKG_FIXUP:=libtool +PKG_MD5SUM:=fd5a1b6e518898a4aee8b8d8b428af70 + +include $(INCLUDE_DIR)/package.mk + +define Package/ipython + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=ipython + URL:=http://ipython.scipy.org/ +endef + +define Package/ipython/description + An enhanced interactive Python shell from the SciPy project +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); \ + if [ -x $(CONFIGURE_CMD) ]; then \ + $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \ + $(CONFIGURE_VARS) \ + PYTHON=/usr/bin/python \ + $(CONFIGURE_CMD) \ + $(CONFIGURE_ARGS) ;\ + fi \ + ) +endef + +define Build/Compile + cd $(PKG_BUILD_DIR) ; $(CONFIGURE_VARS) ./setup.py install --prefix="$(PKG_INSTALL_DIR)/usr" +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +define Package/ipython/install + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +$(eval $(call BuildPackage,ipython)) diff --git a/lang/jamvm/Makefile b/lang/jamvm/Makefile new file mode 100644 index 0000000..80bf306 --- /dev/null +++ b/lang/jamvm/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=jamvm +PKG_VERSION:=1.5.4 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/jamvm +PKG_MD5SUM:=7654e9657691f5f09c4f481ed4686176 + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/jamvm + SUBMENU:=Java + SECTION:=lang + CATEGORY:=Languages + TITLE:=A compact Java Virtual Machine + URL:=http://sourceforge.net/projects/jamvm + DEPENDS:=+libffi +zlib +libpthread @!avr32 @!mips +endef + +define Package/jamvm/description + JamVM is a new Java Virtual Machine which conforms to the JVM + specification version (blue book). In comparison to most other VM's (free + and commercial) it is extremely small.However, unlike other small VMs + (e.g. KVM) it is designed to support the full specification, and includes + support for object finalisation, Soft/Weak/Phantom References, the Java + Native Interface (JNI) and the Reflection API. +endef + +CONFIGURE_ARGS+= \ + --with-classpath-install-dir=/usr \ + --disable-tls \ + --enable-ffi \ + --disable-int-threading \ + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + all +endef + +ifneq ($(ARCH),mips) + define Package/jamvm/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/jamvm $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share/jamvm + $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/classes.zip $(1)/usr/share/jamvm/ + endef +endif + +$(eval $(call BuildPackage,jamvm)) + diff --git a/lang/jsonpath/Makefile b/lang/jsonpath/Makefile new file mode 100644 index 0000000..25cb124 --- /dev/null +++ b/lang/jsonpath/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=jsonpath +PKG_VERSION:=0.52.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.ultimate.com/phil/python/download/ +PKG_MD5SUM:=4cd0c3a70acbc67d2915d64f132cdb4f +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/jsonpath + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=JsonPath - XPath implementation + URL:=http://goessner.net/articles/JsonPath/ + DEPENDS:=+python +endef + +define Package/jsonpath/description + An XPath implementation for JSON +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr") +endef + +define Package/jsonpath/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,jsonpath)) diff --git a/lang/kid/Makefile b/lang/kid/Makefile new file mode 100644 index 0000000..252c6f1 --- /dev/null +++ b/lang/kid/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=kid +PKG_VERSION:=0.9.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.kid-templating.org/dist/0.9.6/dist +PKG_MD5SUM:=31e7156698a6f214b4067afb9e13728f + +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/python-kid + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + DEPENDS:=+python + TITLE:=XML-based Templating + URL:=http://www.kid-templating.org/ +endef + +define Package/python-kid/description + Kid is a simple template language for XML based vocabularies written in + Python. +endef + +define PyPackage/python-kid/filespec ++|$(PYTHON_PKG_DIR)/kid +-|$(PYTHON_PKG_DIR)/kid/test +endef + +define Build/Compile + $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) + $(call Build/Compile/PyMod,., \ + install --prefix="$(PKG_INSTALL_DIR)/usr", \ + ) +endef + +$(eval $(call PyPackage,python-kid)) +$(eval $(call BuildPackage,python-kid)) diff --git a/lang/kid/patches/000-setup.patch b/lang/kid/patches/000-setup.patch new file mode 100644 index 0000000..aeb059e --- /dev/null +++ b/lang/kid/patches/000-setup.patch @@ -0,0 +1,20 @@ +diff -urN kid-0.9.6_orig/setup.py kid-0.9.6/setup.py +--- kid-0.9.6/setup.py 2007-07-16 13:02:49.000000000 +0200 ++++ kid-0.9.6/setup.py 2007-08-15 14:39:37.000000000 +0200 +@@ -1,15 +1,12 @@ + #!/usr/bin/env python + + # bootstrap setuptools if necessary +-from ez_setup import use_setuptools +-use_setuptools() ++from distutils.core import setup + + import os + + execfile(os.path.join("kid", "release.py")) + +-from setuptools import setup, find_packages +- + setup( + name="kid", + version=version, diff --git a/lang/logilab-astng/Makefile b/lang/logilab-astng/Makefile new file mode 100644 index 0000000..c25a36c --- /dev/null +++ b/lang/logilab-astng/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=logilab-astng +PKG_VERSION:=0.17.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.logilab.fr/pub/astng/ +PKG_MD5SUM:=a654d65a4644fb984d840906cf8b27d5 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/logilab-astng + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=logilab-astng + URL:=http://www.logilab.fr + DEPENDS:=+python-mini +endef + +define Package/logilab-astng/description + The aim of this module is to provide a common base representation of python source code for projects such as pychecker, pyreverse, pylint... +endef + +define Build/Compile + $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) + $(call Build/Compile/PyMod,., \ + install --prefix="$(PKG_INSTALL_DIR)/usr", \ + ) +endef + +define Package/logilab-astng/install + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +$(eval $(call BuildPackage,logilab-astng)) diff --git a/lang/logilab-common/Makefile b/lang/logilab-common/Makefile new file mode 100644 index 0000000..94b2671 --- /dev/null +++ b/lang/logilab-common/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=logilab-common +PKG_VERSION:=0.29.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.logilab.fr/pub/common/ +PKG_MD5SUM:=90f679e0d4ed19e2bf083fb932cde922 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/logilab-common + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=logilab-common + URL:=http://www.logilab.fr + DEPENDS:=+python-mini +endef + +define Package/logilab-common/description + a bunch of modules providing low level functionnalities shared among some python projects devel +endef + +define Build/Compile + $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) + $(call Build/Compile/PyMod,., \ + install --prefix="$(PKG_INSTALL_DIR)/usr", \ + ) +endef + +define Package/logilab-common/install + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +$(eval $(call BuildPackage,logilab-common)) diff --git a/lang/lsqlite3/Makefile b/lang/lsqlite3/Makefile new file mode 100644 index 0000000..b5e15d3 --- /dev/null +++ b/lang/lsqlite3/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2009-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lsqlite3 +PKG_VERSION:=7 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/4472 +PKG_MD5SUM:=ef7afdd3ea7a29333daa951cda3175bb + +include $(INCLUDE_DIR)/package.mk + +define Package/lsqlite3 + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=LuaSQLite3 + URL:=http://luasqlite.luaforge.net/lsqlite3.html + DEPENDS:=+lua +libsqlite3 +endef + +define Package/lsqlite3/description + LuaSQLite 3 is a thin wrapper around the public domain SQLite3 database engine. +endef + +define Build/Configure +endef + +TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS) -std=c99 + +TARGET_LDFLAGS += -llua -lsqlite3 + +MAKE_FLAGS += \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + INCS="$(TARGET_CPPFLAGS)" \ + LIBS="$(TARGET_LDFLAGS)" \ + SHFLAGS="-shared" \ + UNAME="Linux" + +define Package/lsqlite3/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(CP) $(PKG_BUILD_DIR)/lsqlite3.so $(1)/usr/lib/lua/ +endef + +$(eval $(call BuildPackage,lsqlite3)) diff --git a/lang/luaexpat/Makefile b/lang/luaexpat/Makefile new file mode 100644 index 0000000..ded0229 --- /dev/null +++ b/lang/luaexpat/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=luaexpat +PKG_VERSION:=1.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/2469 +PKG_MD5SUM:=6ecb895ccf5cff1e7f2facd438b1f8d0 + +include $(INCLUDE_DIR)/package.mk + +define Package/luaexpat + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=LuaExpat + URL:=http://www.keplerproject.org/luaexpat/ + DEPENDS:=+lua +libexpat +endef + +define Package/luaexpat/description + LuaExpat is a SAX XML parser based on the Expat library. +endef + +define Build/Configure +endef + +define Build/Compile + $(CP) files/compat-5.1r5 $(PKG_BUILD_DIR)/compat-5.1r5 + $(MAKE) -C $(PKG_BUILD_DIR) \ + EXPAT_INC="$(STAGING_DIR)/usr/include/" \ + LUA_INC="$(STAGING_DIR)/usr/include/" \ + LUA_LIBDIR="$(STAGING_DIR)/usr/lib/" \ + COMPAT_DIR="$(PKG_BUILD_DIR)/compat-5.1r5" \ + LIB_OPTION="-shared $(TARGET_LDFLAGS)" \ + CC="$(TARGET_CC) $(TARGET_CFLAGS) $(FPIC) -std=c99" \ + LD="$(TARGET_CROSS)ld -shared" +endef + +define Package/luaexpat/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp.so.1.1.0 $(1)/usr/lib/lua/lxp.so + $(INSTALL_DIR) $(1)/usr/lib/lua/lxp + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp/lom.lua $(1)/usr/lib/lua/lxp +endef + +$(eval $(call BuildPackage,luaexpat)) diff --git a/lang/luaexpat/files/compat-5.1r5/compat-5.1.c b/lang/luaexpat/files/compat-5.1r5/compat-5.1.c new file mode 100644 index 0000000..6fdb8b7 --- /dev/null +++ b/lang/luaexpat/files/compat-5.1r5/compat-5.1.c @@ -0,0 +1,97 @@ +/* +** Compat-5.1 +** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat) +** $Id: compat-5.1.c,v 1.13 2006/02/20 21:12:47 carregal Exp $ +*/ + +#include +#include +#include "lua.h" +#include "lauxlib.h" +#include "compat-5.1.h" + +static void getfield(lua_State *L, int idx, const char *name) { + const char *end = strchr(name, '.'); + lua_pushvalue(L, idx); + while (end) { + lua_pushlstring(L, name, end - name); + lua_gettable(L, -2); + lua_remove(L, -2); + if (lua_isnil(L, -1)) return; + name = end+1; + end = strchr(name, '.'); + } + lua_pushstring(L, name); + lua_gettable(L, -2); + lua_remove(L, -2); +} + +static void setfield(lua_State *L, int idx, const char *name) { + const char *end = strchr(name, '.'); + lua_pushvalue(L, idx); + while (end) { + lua_pushlstring(L, name, end - name); + lua_gettable(L, -2); + /* create table if not found */ + if (lua_isnil(L, -1)) { + lua_pop(L, 1); + lua_newtable(L); + lua_pushlstring(L, name, end - name); + lua_pushvalue(L, -2); + lua_settable(L, -4); + } + lua_remove(L, -2); + name = end+1; + end = strchr(name, '.'); + } + lua_pushstring(L, name); + lua_pushvalue(L, -3); + lua_settable(L, -3); + lua_pop(L, 2); +} + +LUALIB_API void luaL_module(lua_State *L, const char *libname, + const luaL_reg *l, int nup) { + if (libname) { + getfield(L, LUA_GLOBALSINDEX, libname); /* check whether lib already exists */ + if (lua_isnil(L, -1)) { + int env, ns; + lua_pop(L, 1); /* get rid of nil */ + lua_pushliteral(L, "require"); + lua_gettable(L, LUA_GLOBALSINDEX); /* look for require */ + lua_getfenv(L, -1); /* getfenv(require) */ + lua_remove(L, -2); /* remove function require */ + env = lua_gettop(L); + + lua_newtable(L); /* create namespace for lib */ + ns = lua_gettop(L); + getfield(L, env, "package.loaded"); /* get package.loaded table */ + if (lua_isnil(L, -1)) { /* create package.loaded table */ + lua_pop(L, 1); /* remove previous result */ + lua_newtable(L); + lua_pushvalue(L, -1); + setfield(L, env, "package.loaded"); + } + else if (!lua_istable(L, -1)) + luaL_error(L, "name conflict for library `%s'", libname); + lua_pushstring(L, libname); + lua_pushvalue(L, ns); + lua_settable(L, -3); /* package.loaded[libname] = ns */ + lua_pop(L, 1); /* get rid of package.loaded table */ + lua_pushvalue(L, ns); /* copy namespace */ + setfield(L, LUA_GLOBALSINDEX, libname); + lua_remove (L, env); /* remove env */ + } + lua_insert(L, -(nup+1)); /* move library table to below upvalues */ + } + for (; l->name; l++) { + int i; + lua_pushstring(L, l->name); + for (i=0; ifunc, nup); + lua_settable(L, -(nup+3)); + } + lua_pop(L, nup); /* remove upvalues */ +} + diff --git a/lang/luaexpat/files/compat-5.1r5/compat-5.1.h b/lang/luaexpat/files/compat-5.1r5/compat-5.1.h new file mode 100644 index 0000000..97570d9 --- /dev/null +++ b/lang/luaexpat/files/compat-5.1r5/compat-5.1.h @@ -0,0 +1,13 @@ +/* +** Compat-5.1 +** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat/) +** $Id: compat-5.1.h,v 1.8 2006/02/20 21:12:47 carregal Exp $ +*/ + +#ifndef COMPAT_H + +LUALIB_API void luaL_module(lua_State *L, const char *libname, + const luaL_reg *l, int nup); +#define luaL_openlib luaL_module + +#endif diff --git a/lang/luaexpat/files/compat-5.1r5/compat-5.1.lua b/lang/luaexpat/files/compat-5.1r5/compat-5.1.lua new file mode 100644 index 0000000..0938d56 --- /dev/null +++ b/lang/luaexpat/files/compat-5.1r5/compat-5.1.lua @@ -0,0 +1,267 @@ +-- +-- Compat-5.1 +-- Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat) +-- According to Lua 5.1 +-- $Id: compat-5.1.lua,v 1.22 2006/02/20 21:12:47 carregal Exp $ +-- + +_COMPAT51 = "Compat-5.1 R5" + +local LUA_DIRSEP = '/' +local LUA_OFSEP = '_' +local OLD_LUA_OFSEP = '' +local POF = 'luaopen_' +local LUA_PATH_MARK = '?' +local LUA_IGMARK = ':' + +local assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type = assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type +local find, format, gfind, gsub, sub = string.find, string.format, string.gfind, string.gsub, string.sub + +-- +-- avoid overwriting the package table if it's already there +-- +package = package or {} +local _PACKAGE = package + +package.path = LUA_PATH or os.getenv("LUA_PATH") or + ("./?.lua;" .. + "/usr/local/share/lua/5.0/?.lua;" .. + "/usr/local/share/lua/5.0/?/?.lua;" .. + "/usr/local/share/lua/5.0/?/init.lua" ) + +package.cpath = LUA_CPATH or os.getenv("LUA_CPATH") or + "./?.so;" .. + "./l?.so;" .. + "/usr/local/lib/lua/5.0/?.so;" .. + "/usr/local/lib/lua/5.0/l?.so" + +-- +-- make sure require works with standard libraries +-- +package.loaded = package.loaded or {} +package.loaded.debug = debug +package.loaded.string = string +package.loaded.math = math +package.loaded.io = io +package.loaded.os = os +package.loaded.table = table +package.loaded.base = _G +package.loaded.coroutine = coroutine +local _LOADED = package.loaded + +-- +-- avoid overwriting the package.preload table if it's already there +-- +package.preload = package.preload or {} +local _PRELOAD = package.preload + + +-- +-- looks for a file `name' in given path +-- +local function findfile (name, pname) + name = gsub (name, "%.", LUA_DIRSEP) + local path = _PACKAGE[pname] + assert (type(path) == "string", format ("package.%s must be a string", pname)) + for c in gfind (path, "[^;]+") do + c = gsub (c, "%"..LUA_PATH_MARK, name) + local f = io.open (c) + if f then + f:close () + return c + end + end + return nil -- not found +end + + +-- +-- check whether library is already loaded +-- +local function loader_preload (name) + assert (type(name) == "string", format ( + "bad argument #1 to `require' (string expected, got %s)", type(name))) + assert (type(_PRELOAD) == "table", "`package.preload' must be a table") + return _PRELOAD[name] +end + + +-- +-- Lua library loader +-- +local function loader_Lua (name) + assert (type(name) == "string", format ( + "bad argument #1 to `require' (string expected, got %s)", type(name))) + local filename = findfile (name, "path") + if not filename then + return false + end + local f, err = loadfile (filename) + if not f then + error (format ("error loading module `%s' (%s)", name, err)) + end + return f +end + + +local function mkfuncname (name) + name = gsub (name, "^.*%"..LUA_IGMARK, "") + name = gsub (name, "%.", LUA_OFSEP) + return POF..name +end + +local function old_mkfuncname (name) + --name = gsub (name, "^.*%"..LUA_IGMARK, "") + name = gsub (name, "%.", OLD_LUA_OFSEP) + return POF..name +end + +-- +-- C library loader +-- +local function loader_C (name) + assert (type(name) == "string", format ( + "bad argument #1 to `require' (string expected, got %s)", type(name))) + local filename = findfile (name, "cpath") + if not filename then + return false + end + local funcname = mkfuncname (name) + local f, err = loadlib (filename, funcname) + if not f then + funcname = old_mkfuncname (name) + f, err = loadlib (filename, funcname) + if not f then + error (format ("error loading module `%s' (%s)", name, err)) + end + end + return f +end + + +local function loader_Croot (name) + local p = gsub (name, "^([^.]*).-$", "%1") + if p == "" then + return + end + local filename = findfile (p, "cpath") + if not filename then + return + end + local funcname = mkfuncname (name) + local f, err, where = loadlib (filename, funcname) + if f then + return f + elseif where ~= "init" then + error (format ("error loading module `%s' (%s)", name, err)) + end +end + +-- create `loaders' table +package.loaders = package.loaders or { loader_preload, loader_Lua, loader_C, loader_Croot, } +local _LOADERS = package.loaders + + +-- +-- iterate over available loaders +-- +local function load (name, loaders) + -- iterate over available loaders + assert (type (loaders) == "table", "`package.loaders' must be a table") + for i, loader in ipairs (loaders) do + local f = loader (name) + if f then + return f + end + end + error (format ("module `%s' not found", name)) +end + +-- sentinel +local sentinel = function () end + +-- +-- new require +-- +function _G.require (modname) + assert (type(modname) == "string", format ( + "bad argument #1 to `require' (string expected, got %s)", type(name))) + local p = _LOADED[modname] + if p then -- is it there? + if p == sentinel then + error (format ("loop or previous error loading module '%s'", modname)) + end + return p -- package is already loaded + end + local init = load (modname, _LOADERS) + _LOADED[modname] = sentinel + local actual_arg = _G.arg + _G.arg = { modname } + local res = init (modname) + if res then + _LOADED[modname] = res + end + _G.arg = actual_arg + if _LOADED[modname] == sentinel then + _LOADED[modname] = true + end + return _LOADED[modname] +end + + +-- findtable +local function findtable (t, f) + assert (type(f)=="string", "not a valid field name ("..tostring(f)..")") + local ff = f.."." + local ok, e, w = find (ff, '(.-)%.', 1) + while ok do + local nt = rawget (t, w) + if not nt then + nt = {} + t[w] = nt + elseif type(t) ~= "table" then + return sub (f, e+1) + end + t = nt + ok, e, w = find (ff, '(.-)%.', e+1) + end + return t +end + +-- +-- new package.seeall function +-- +function _PACKAGE.seeall (module) + local t = type(module) + assert (t == "table", "bad argument #1 to package.seeall (table expected, got "..t..")") + local meta = getmetatable (module) + if not meta then + meta = {} + setmetatable (module, meta) + end + meta.__index = _G +end + + +-- +-- new module function +-- +function _G.module (modname, ...) + local ns = _LOADED[modname] + if type(ns) ~= "table" then + ns = findtable (_G, modname) + if not ns then + error (string.format ("name conflict for module '%s'", modname)) + end + _LOADED[modname] = ns + end + if not ns._NAME then + ns._NAME = modname + ns._M = ns + ns._PACKAGE = gsub (modname, "[^.]*$", "") + end + setfenv (2, ns) + for i, f in ipairs (arg) do + f (ns) + end +end diff --git a/lang/luaexpat/patches/001-compile-fix.patch b/lang/luaexpat/patches/001-compile-fix.patch new file mode 100644 index 0000000..c2e863a --- /dev/null +++ b/lang/luaexpat/patches/001-compile-fix.patch @@ -0,0 +1,10 @@ +--- a/config ++++ b/config +@@ -31,6 +31,6 @@ + -Wshadow \ + -Wwrite-strings + +-CFLAGS = $(CWARNS) -ansi -O2 -I$(LUA_INC) \ ++CFLAGS = $(CWARNS) -O2 -I$(LUA_INC) \ + -I$(COMPAT_DIR) -I$(EXPAT_INC) + CC = gcc diff --git a/lang/luafilesystem/Makefile b/lang/luafilesystem/Makefile new file mode 100644 index 0000000..ffdd05e --- /dev/null +++ b/lang/luafilesystem/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=luafilesystem +PKG_VERSION:=1.5.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://github.com/downloads/keplerproject/luafilesystem/ +PKG_MD5SUM:=3cf4882bbce956e7a0b010f148f194a3 + +include $(INCLUDE_DIR)/package.mk + +define Package/luafilesystem + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=LuaFileSystem + URL:=http://keplerproject.github.com/luafilesystem/ + DEPENDS:=+liblua +endef + +define Package/luafilesystem/description + This package contains the LuaFileSystem library, a set of portable + functions for directory creation, listing and deletion and for file + locking. +endef + +define Build/Configure +endef + +TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS) + +TARGET_LDFLAGS += -llua + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \ + LDFLAGS="$(TARGET_LDFLAGS)" + $(TARGET_CROSS)ar r $(PKG_BUILD_DIR)/src/luafilesystem.a $(PKG_BUILD_DIR)/src/lfs.o +endef + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR)/usr/include + $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lfs.h $(STAGING_DIR)/usr/include + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(STAGING_DIR)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/luafilesystem.a $(STAGING_DIR)/usr/lib/lua +endef + +define Package/luafilesystem/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(1)/usr/lib/lua/lfs.so +endef + +$(eval $(call BuildPackage,luafilesystem)) diff --git a/lang/luaposix/Makefile b/lang/luaposix/Makefile new file mode 100644 index 0000000..7252b91 --- /dev/null +++ b/lang/luaposix/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=luaposix +PKG_VERSION:=5.1.11 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/4813 +PKG_MD5SUM:=edb76911dbdabe98dec49e3d8a126227 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/luaposix + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=luaposix + URL:=http://luaposix.luaforge.net/ + DEPENDS:=+lua +endef + +define Package/luaposix/description + luaposix is a general POSIX library for Lua providing access + to various low level libc functions. +endef + +define Build/Configure +endef + +TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99 + +ifneq ($(CONFIG_USE_EGLIBC),) + ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),) + TARGET_CFLAGS += -DNO_GETLOGIN + endif +endif + + +define Package/luaposix/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/posix.so $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,luaposix)) diff --git a/lang/luaposix/patches/100-eglibc-compat.patch b/lang/luaposix/patches/100-eglibc-compat.patch new file mode 100644 index 0000000..96a6fce --- /dev/null +++ b/lang/luaposix/patches/100-eglibc-compat.patch @@ -0,0 +1,26 @@ +--- a/lposix.c ++++ b/lposix.c +@@ -960,11 +960,13 @@ static int Pctermid(lua_State *L) /** c + } + + ++#ifndef NO_GETLOGIN + static int Pgetlogin(lua_State *L) /** getlogin() */ + { + lua_pushstring(L, getlogin()); + return 1; + } ++#endif + + + static void Fgetpasswd(lua_State *L, int i, const void *data) +@@ -1778,7 +1780,9 @@ static const luaL_reg R[] = + #if _POSIX_VERSION >= 200112L + {"getgroups", Pgetgroups}, + #endif ++#ifndef NO_GETLOGIN + {"getlogin", Pgetlogin}, ++#endif + {"getopt_long", Pgetopt_long}, + {"getpasswd", Pgetpasswd}, + {"getpid", Pgetpid}, diff --git a/lang/luaprofiler/Makefile b/lang/luaprofiler/Makefile new file mode 100644 index 0000000..1ecc694 --- /dev/null +++ b/lang/luaprofiler/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=luaprofiler +PKG_VERSION:=2.0.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/3400 +PKG_MD5SUM:=611435c8e61e1a330ee0aa8ddc9c124a + +include $(INCLUDE_DIR)/package.mk + +define Package/luaprofiler + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua Profiler + URL:=http://luaprofiler.luaforge.net + DEPENDS:=+lua +endef + +define Package/luaprofiler/description + Profile any Lua application +endef + +define Build/Configure + +endef + +TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS) + +TARGET_LDFLAGS += -llua + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + -f Makefile.linux +endef + +define Package/luaprofiler/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(CP) $(PKG_BUILD_DIR)/bin/profiler.so $(1)/usr/lib/lua/ +endef + +$(eval $(call BuildPackage,luaprofiler)) diff --git a/lang/luaprofiler/patches/100-link.patch b/lang/luaprofiler/patches/100-link.patch new file mode 100644 index 0000000..804e39c --- /dev/null +++ b/lang/luaprofiler/patches/100-link.patch @@ -0,0 +1,11 @@ +--- a/Makefile.linux ++++ b/Makefile.linux +@@ -4,7 +4,7 @@ OBJS= src/clocks.o src/core_profiler.o s + + + profiler: $(OBJS) +- mkdir -p bin && $(LD) -Bshareable -o $(PROFILER_OUTPUT) $(OBJS) ++ mkdir -p bin && $(LD) -Bshareable -o $(PROFILER_OUTPUT) $(OBJS) $(LDFLAGS) + + clean: + rm -f $(PROFILER_OUTPUT) src/*.o diff --git a/lang/luasec/Makefile b/lang/luasec/Makefile new file mode 100644 index 0000000..50d7741 --- /dev/null +++ b/lang/luasec/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=luasec +PKG_VERSION:=0.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/4255 +PKG_MD5SUM:=712158d60207bdbb6215fc7e07d8db24 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/luasec + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=LuaSec + URL:=http://luasec.luaforge.net/ + DEPENDS:=+lua +libopenssl +luasocket +endef + +define Package/luasec/description + LuaSec is a binding for OpenSSL library to provide TLS/SSL communication. +endef + +define Build/Configure +endef + +MAKE_PATH = ./src + +MAKE_FLAGS += \ + INCDIR="$(TARGET_CPPFLAGS)" \ + LIBDIR="$(TARGET_LDFLAGS)" \ + CC="$(TARGET_CC) $(TARGET_CFLAGS) -std=gnu99" \ + LD="$(TARGET_CROSS)ld -shared" \ + LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \ + LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \ + linux \ + +define Package/luasec/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.so $(1)/usr/lib/lua/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.lua $(1)/usr/lib/lua/ + $(INSTALL_DIR) $(1)/usr/lib/lua/ssl + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl/https.lua $(1)/usr/lib/lua/ssl/ +endef + +$(eval $(call BuildPackage,luasec)) diff --git a/lang/luasocket/Makefile b/lang/luasocket/Makefile new file mode 100644 index 0000000..6dc88cd --- /dev/null +++ b/lang/luasocket/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=luasocket +PKG_VERSION:=2.0.2 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/2664 +PKG_MD5SUM:=41445b138deb7bcfe97bff957503da8e + +include $(INCLUDE_DIR)/package.mk + +define Package/luasocket + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=LuaSocket + URL:=http://luasocket.luaforge.net/ + DEPENDS:=+lua +endef + +define Package/luasocket/description + LuaSocket is the most comprehensive networking support + library for the Lua language. It provides easy access to + TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more. +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/ \ + LIBDIR="$(TARGET_LDFLAGS)" \ + CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \ + LD="$(TARGET_CROSS)ld -shared" \ + all +endef + + +define Package/luasocket/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime.so.1.0.2 $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket.so.2.0.2 $(1)/usr/lib/lua + $(INSTALL_DIR) $(1)/usr/lib/lua/mime + ln -sf ../mime.so.1.0.2 $(1)/usr/lib/lua/mime/core.so + $(INSTALL_DIR) $(1)/usr/lib/lua/socket + $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url}.lua $(1)/usr/lib/lua/socket + ln -sf ../socket.so.2.0.2 $(1)/usr/lib/lua/socket/core.so +endef + +$(eval $(call BuildPackage,luasocket)) diff --git a/lang/luasql/Makefile b/lang/luasql/Makefile new file mode 100644 index 0000000..eaf494b --- /dev/null +++ b/lang/luasql/Makefile @@ -0,0 +1,121 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=luasql +PKG_VERSION:=2.1.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/2686/ +PKG_MD5SUM:=63bdd57de4b9d1be336ba112d8cb69eb + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/luasql/Default + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=Lua SQL binding + URL:=http://www.keplerproject.org/luasql/ + DEPENDS:= +lua +endef + +define Package/luasql/Default/description + LuaSQL is a simple interface from Lua to a DBMS. +endef + + +define Package/luasql-mysql +$(call Package/luasql/Default) + TITLE+= for MySQL + DEPENDS+= +libmysqlclient + VARIANT:=mysql +endef + +define Package/luasql-mysql/description +$(call Package/luasql/Default/description) + . + This package contains the MySQL binding. +endef + + +define Package/luasql-pgsql +$(call Package/luasql/Default) + TITLE+= for PostgreSQL + DEPENDS+= +libpq + VARIANT:=postgres +endef + +define Package/luasql-pgsql/description +$(call Package/luasql/Default/description) + . + This package contains the PostgreSQL binding. +endef + + +define Package/luasql-sqlite3 +$(call Package/luasql/Default) + TITLE+= for SQLite 3 + DEPENDS+= +libsqlite3 + VARIANT:=sqlite3 +endef + +define Package/luasql-sqlite3/description +$(call Package/luasql/Default/description) + . + This package contains the SQLite 3 binding. +endef + + +TARGET_CFLAGS += $(FPIC) -std=gnu99 +TARGET_CPPFLAGS += -DLUA_USE_LINUX + +ifeq ($(BUILD_VARIANT),mysql) + TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/mysql + TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz +endif + +ifeq ($(BUILD_VARIANT),postgres) + TARGET_LDFLAGS += -lpq +endif + +ifeq ($(BUILD_VARIANT),sqlite3) + TARGET_LDFLAGS += -lsqlite3 -lpthread +endif + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + T="$(BUILD_VARIANT)" \ + PREFIX="$(STAGING_DIR)/usr" \ + LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \ + DRIVER_INCS="$(TARGET_CPPFLAGS)" \ + DRIVER_LIBS="$(TARGET_LDFLAGS)" \ + CC="$(TARGET_CROSS)gcc" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + lib + $(MAKE) -C $(PKG_BUILD_DIR) \ + T="$(BUILD_VARIANT)" \ + LUA_LIBDIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \ + install +endef + +define Build/Install/Default + $(INSTALL_DIR) $(1)/usr/lib/lua/luasql + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lua/luasql/*.so $(1)/usr/lib/lua/luasql/ +endef + +Package/luasql-mysql/install = $(Build/Install/Default) +Package/luasql-pgsql/install = $(Build/Install/Default) +Package/luasql-sqlite3/install = $(Build/Install/Default) + +$(eval $(call BuildPackage,luasql-mysql)) +$(eval $(call BuildPackage,luasql-pgsql)) +$(eval $(call BuildPackage,luasql-sqlite3)) diff --git a/lang/mako/Makefile b/lang/mako/Makefile new file mode 100644 index 0000000..ad935c6 --- /dev/null +++ b/lang/mako/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mako +PKG_VERSION:=0.2.5 +PKG_RELEASE:=1 + +PKG_SOURCE:=Mako-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.makotemplates.org/downloads/ +PKG_MD5SUM:=d8ca783630dc5e93970a2075532fa643 + +PKG_BUILD_DEPENDS:=distribute/host +PKG_BUILD_DIR:=$(BUILD_DIR)/$(subst .tar.gz,,$(PKG_SOURCE)) + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/mako + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Mako Templates for Python + URL:=http://www.makotemplates.org/ + DEPENDS:=+python +endef + +define Package/mako/description +Mako is a template library written in Python. It provides a familiar, +non-XML syntax which compiles into Python modules for maximum +performance. Mako's syntax and API borrows from the best ideas of many +others, including Django templates, Cheetah, Myghty, and +Genshi. Conceptually, Mako is an embedded Python (i.e. Python Server +Page) language, which refines the familiar ideas of componentized +layout and inheritance to produce one of the most straightforward and +flexible models available, while also maintaining close ties to Python +calling and scoping semantics. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/mako/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR)/ +endef + +$(eval $(call BuildPackage,mako)) diff --git a/lang/numpy/Makefile b/lang/numpy/Makefile new file mode 100644 index 0000000..e9985cc --- /dev/null +++ b/lang/numpy/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2008-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=numpy +PKG_VERSION:=1.0.4 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/numpy +PKG_MD5SUM:=8f011e9d7697da570efaac61c51725e0 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/numpy + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=numpy + URL:=http://numpy.sf.net + DEPENDS:=+python-mini @TARGET_x86||TARGET_olpc||TARGET_uml @BROKEN +endef + +define Package/numpy/description + API to GTK and glade library from python +endef + +define Build/Compile + cd $(PKG_BUILD_DIR) ; $(CONFIGURE_VARS) $(MAKE_VARS) python2.5 ./setup.py install --prefix="$(PKG_INSTALL_DIR)/usr" +endef + +define Package/numpy/install + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +define Require/python25-dev +[ -e /usr/include/python2.5/pyconfig.h ] +endef + +$(eval $(call Require,python25-dev, \ + Please install Python 2.5 (including development headers and libraries) \ +)) + +$(eval $(call BuildPackage,numpy)) + diff --git a/lang/numpy/patches/100-compile.patch b/lang/numpy/patches/100-compile.patch new file mode 100644 index 0000000..632e409 --- /dev/null +++ b/lang/numpy/patches/100-compile.patch @@ -0,0 +1,112 @@ +diff -urN numpy-1.0.4/numpy/core/include/numpy/ufuncobject.h numpy-1.0.4.patched/numpy/core/include/numpy/ufuncobject.h +--- numpy-1.0.4/numpy/core/include/numpy/ufuncobject.h 2007-11-07 22:05:15.000000000 +0000 ++++ numpy-1.0.4.patched/numpy/core/include/numpy/ufuncobject.h 2008-05-25 11:07:14.000000000 +0100 +@@ -284,7 +284,7 @@ + #elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) + + #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) +-#include ++#include "fenv/fenv.h" + #elif defined(__CYGWIN__) + #include "fenv/fenv.c" + #endif +diff -urN numpy-1.0.4/numpy/core/setup.py numpy-1.0.4.patched/numpy/core/setup.py +--- numpy-1.0.4/numpy/core/setup.py 2007-11-07 22:06:43.000000000 +0000 ++++ numpy-1.0.4.patched/numpy/core/setup.py 2008-05-25 11:07:14.000000000 +0100 +@@ -36,6 +36,7 @@ + + def generate_config_h(ext, build_dir): + target = join(build_dir,'config.h') ++ log.info("-----------------------abc") + if newer(__file__,target): + config_cmd = config.get_config_cmd() + log.info('Generating %s',target) +@@ -73,6 +74,7 @@ + nosmp = 1 + except KeyError: + nosmp = 0 ++ nosmp = 1 + if nosmp: moredefs = [('NPY_ALLOW_THREADS', '0')] + else: moredefs = [] + # +@@ -123,8 +125,9 @@ + target_f.write('#define %s\n' % (d)) + else: + target_f.write('#define %s %s\n' % (d[0],d[1])) +- if not nosmp: # default is to use WITH_THREAD +- target_f.write('#ifdef WITH_THREAD\n#define NPY_ALLOW_THREADS 1\n#else\n#define NPY_ALLOW_THREADS 0\n#endif\n') ++ log.info("-----------------------abc") ++ #if not nosmp: # default is to use WITH_THREAD ++ target_f.write('#ifdef WITH_THREAD\n#define NPY_ALLOW_THREADS 1\n#else\n#define NPY_ALLOW_THREADS 0\n#endif\n') + target_f.close() + print 'File:',target + target_f = open(target) +diff -urN numpy-1.0.4/numpy/distutils/unixccompiler.py numpy-1.0.4.patched/numpy/distutils/unixccompiler.py +--- numpy-1.0.4/numpy/distutils/unixccompiler.py 2007-11-07 22:05:15.000000000 +0000 ++++ numpy-1.0.4.patched/numpy/distutils/unixccompiler.py 2008-05-25 11:07:14.000000000 +0100 +@@ -9,11 +9,36 @@ + from numpy.distutils.ccompiler import replace_method + + import log ++def UnixCCompiler__link_executable (self, ++ objects, ++ output_progname, ++ output_dir=None, ++ libraries=None, ++ library_dirs=None, ++ runtime_library_dirs=None, ++ debug=0, ++ extra_preargs=None, ++ extra_postargs=None, ++ target_lang=None): ++ if output_progname == "_configtest": ++ self.spawn(['gcc', '-lm', '-o',output_progname]+objects, display = "") ++ else: ++ print "#### Running " + str(CCompiler.EXECUTABLE) ++ self.link(CCompiler.EXECUTABLE, objects, ++ self.executable_filename(output_progname), output_dir, ++ libraries, library_dirs, runtime_library_dirs, None, ++ debug, extra_preargs, extra_postargs+ ['-lm'], None, target_lang) ++ ++replace_method(UnixCCompiler, 'link_executable', UnixCCompiler__link_executable) + + # Note that UnixCCompiler._compile appeared in Python 2.3 + def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + display = '%s: %s' % (os.path.basename(self.compiler_so[0]),src) + try: ++ if src == "_configtest.c": ++ self.spawn(['gcc', '-fwrapv', '-O2', '-Wall', '-Wstrict-prototypes', '-I/umc/blogic/olpc/staging_dir/i386/usr/include', '-I/umc/blogic/olpc/staging_dir/i386/include', '-I/umc/blogic/olpc/staging_dir/i386/usr/include/python2.5','-I/umc/blogic/olpc/staging_dir/i386/usr/include', '-I/umc/blogic/olpc/staging_dir/i386/include', '-fPIC'] + cc_args + [src, '-o', obj] + ++ extra_postargs, display = display) ++ else: + self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + + extra_postargs, display = display) + except DistutilsExecError, msg: +diff -urN numpy-1.0.4/numpy/numarray/_capi.c numpy-1.0.4.patched/numpy/numarray/_capi.c +--- numpy-1.0.4/numpy/numarray/_capi.c 2007-11-07 22:05:16.000000000 +0000 ++++ numpy-1.0.4.patched/numpy/numarray/_capi.c 2008-05-25 11:07:14.000000000 +0100 +@@ -5,7 +5,7 @@ + #include + + #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) +-#include ++#include "numpy/fenv/fenv.h" + #elif defined(__CYGWIN__) + #include "numpy/fenv/fenv.h" + #include "numpy/fenv/fenv.c" +diff -urN numpy-1.0.4.p2/numpy/core/setup.py numpy-1.0.4/numpy/core/setup.py +--- numpy-1.0.4.p2/numpy/core/setup.py 2008-05-25 11:18:19.000000000 +0100 ++++ numpy-1.0.4/numpy/core/setup.py 2008-05-25 11:18:52.000000000 +0100 +@@ -6,13 +6,11 @@ + from distutils.dep_util import newer + + FUNCTIONS_TO_CHECK = [ +- ('expl', 'HAVE_LONGDOUBLE_FUNCS'), + ('expf', 'HAVE_FLOAT_FUNCS'), + ('log1p', 'HAVE_LOG1P'), + ('expm1', 'HAVE_EXPM1'), + ('asinh', 'HAVE_INVERSE_HYPERBOLIC'), + ('atanhf', 'HAVE_INVERSE_HYPERBOLIC_FLOAT'), +- ('atanhl', 'HAVE_INVERSE_HYPERBOLIC_LONGDOUBLE'), + ('isnan', 'HAVE_ISNAN'), + ('isinf', 'HAVE_ISINF'), + ('rint', 'HAVE_RINT'), diff --git a/lang/perl-compress-bzip2/Makefile b/lang/perl-compress-bzip2/Makefile new file mode 100644 index 0000000..de4c4f4 --- /dev/null +++ b/lang/perl-compress-bzip2/Makefile @@ -0,0 +1,39 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-compress-bzip2 +PKG_VERSION:=2.09 +PKG_RELEASE:=2 +PKG_MD5SUM:=1699fde3e86f2a036f135ae606d456bf + +PKG_SOURCE_URL:=http://search.cpan.org/CPAN/authors/id/A/AR/ARJAY +PKG_SOURCE:=Compress-Bzip2-$(PKG_VERSION).tar.gz + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Compress-Bzip2-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-compress-bzip2 + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Perl interface to bzip2 compression library + URL:=http://search.cpan.org/dist/Compress-Bzip2/ + DEPENDS:=perl +bzip2 +endef + +define Build/Configure + $(call perlmod/Configure,,BUILD_BZLIB=0) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-compress-bzip2/install + $(call perlmod/Install,$(1),Compress auto/Compress) +endef + + +$(eval $(call BuildPackage,perl-compress-bzip2)) diff --git a/lang/perl-dbi/Makefile b/lang/perl-dbi/Makefile new file mode 100644 index 0000000..27a13b9 --- /dev/null +++ b/lang/perl-dbi/Makefile @@ -0,0 +1,39 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-dbi +PKG_VERSION:=1.604 +PKG_RELEASE:=1 +PKG_MD5SUM:=358511d60eb3daba913d49236c469802 + +PKG_SOURCE_URL:=http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/ +PKG_SOURCE:=DBI-$(PKG_VERSION).tar.gz + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/DBI-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-dbi +SUBMENU:=Perl +SECTION:=lang +CATEGORY:=Languages +TITLE:=Database independent interface for Perl +URL:=http://search.cpan.org/dist/DBI/ +DEPENDS:=perl +perlbase-essential +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-dbi/install + $(call perlmod/Install,$(1),DB* auto/DBI,DBI/W32ODBC.pm auto/DBI/*.h) +endef + + +$(eval $(call BuildPackage,perl-dbi)) diff --git a/lang/perl-html-parser/Makefile b/lang/perl-html-parser/Makefile new file mode 100644 index 0000000..1dabc46 --- /dev/null +++ b/lang/perl-html-parser/Makefile @@ -0,0 +1,39 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-html-parser +PKG_VERSION:=3.56 +PKG_RELEASE:=1 +PKG_MD5SUM:=bddc432e5ed9df4d4153a62234f04fc2 + +PKG_SOURCE_URL:=http://search.cpan.org/CPAN/authors/id/G/GA/GAAS +PKG_SOURCE:=HTML-Parser-$(PKG_VERSION).tar.gz + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Parser-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-html-parser +SUBMENU:=Perl +SECTION:=lang +CATEGORY:=Languages +TITLE:=A collection of modules that parse HTML text documents +URL:=http://search.cpan.org/dist/HTML-Parser/ +DEPENDS:=perl +perl-html-tagset +perl-uri +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-html-parser/install + $(call perlmod/Install,$(1),HTML auto/HTML) +endef + + +$(eval $(call BuildPackage,perl-html-parser)) diff --git a/lang/perl-html-tagset/Makefile b/lang/perl-html-tagset/Makefile new file mode 100644 index 0000000..380796e --- /dev/null +++ b/lang/perl-html-tagset/Makefile @@ -0,0 +1,39 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-html-tagset +PKG_VERSION:=3.20 +PKG_RELEASE:=1 +PKG_MD5SUM:=d2bfa18fe1904df7f683e96611e87437 + +PKG_SOURCE_URL:=http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE +PKG_SOURCE:=HTML-Tagset-$(PKG_VERSION).tar.gz + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Tagset-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-html-tagset +SUBMENU:=Perl +SECTION:=lang +CATEGORY:=Languages +TITLE:=Data tables pertaining to HTML +URL:=http://search.cpan.org/dist/HTML-Tagset/ +DEPENDS:=perl +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-html-tagset/install + $(call perlmod/Install,$(1),HTML) +endef + + +$(eval $(call BuildPackage,perl-html-tagset)) diff --git a/lang/perl-html-tree/Makefile b/lang/perl-html-tree/Makefile new file mode 100644 index 0000000..04691d1 --- /dev/null +++ b/lang/perl-html-tree/Makefile @@ -0,0 +1,39 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-html-tree +PKG_VERSION:=3.23 +PKG_RELEASE:=2 +PKG_MD5SUM:=6352f50be402301f79b580dd235d7762 + +PKG_SOURCE_URL:=http://search.cpan.org/CPAN/authors/id/P/PE/PETEK +PKG_SOURCE:=HTML-Tree-$(PKG_VERSION).tar.gz + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Tree-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-html-tree +SUBMENU:=Perl +SECTION:=lang +CATEGORY:=Languages +TITLE:=represent and create HTML syntax trees +URL:=http://search.cpan.org/dist/HTML-Tree/ +DEPENDS:=perl +perl-html-parser +perl-html-tagset +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-html-tree/install + $(call perlmod/Install,$(1),HTML) +endef + + +$(eval $(call BuildPackage,perl-html-tree)) diff --git a/lang/perl-lockfile-simple/Makefile b/lang/perl-lockfile-simple/Makefile new file mode 100644 index 0000000..685493e --- /dev/null +++ b/lang/perl-lockfile-simple/Makefile @@ -0,0 +1,39 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-lockfile-simple +PKG_VERSION:=0.206 +PKG_RELEASE:=1 +PKG_MD5SUM:=d8966c3fb799aefcaaf80f845057a1fa + +PKG_SOURCE_URL:=http://search.cpan.org/CPAN/authors/id/J/JV/JV +PKG_SOURCE:=LockFile-Simple-$(PKG_VERSION).tar.gz + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/LockFile-Simple-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-lockfile-simple +SUBMENU:=Perl +SECTION:=lang +CATEGORY:=Languages +TITLE:=Simple advisory file locking +URL:=http://search.cpan.org/dist/LockFile-Simple/ +DEPENDS:=perl +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-lockfile-simple/install + $(call perlmod/Install,$(1),LockFile auto/LockFile) +endef + + +$(eval $(call BuildPackage,perl-lockfile-simple)) diff --git a/lang/perl-uri/Makefile b/lang/perl-uri/Makefile new file mode 100644 index 0000000..d6938bf --- /dev/null +++ b/lang/perl-uri/Makefile @@ -0,0 +1,39 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-uri +PKG_VERSION:=1.36 +PKG_RELEASE:=1 +PKG_MD5SUM:=a97bbdd38b31c6b2672fdc3060fae34b + +PKG_SOURCE_URL:=http://search.cpan.org/CPAN/authors/id/G/GA/GAAS +PKG_SOURCE:=URI-$(PKG_VERSION).tar.gz + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/URI-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-uri +SUBMENU:=Perl +SECTION:=lang +CATEGORY:=Languages +TITLE:=Manipulates and accesses URI strings +URL:=http://search.cpan.org/dist/URI/ +DEPENDS:=perl +endef + +define Build/Configure + $(call perlmod/Configure,,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-uri/install + $(call perlmod/Install,$(1),URI URI.pm) +endef + + +$(eval $(call BuildPackage,perl-uri)) diff --git a/lang/perl-www-curl/Makefile b/lang/perl-www-curl/Makefile new file mode 100644 index 0000000..4ada0f6 --- /dev/null +++ b/lang/perl-www-curl/Makefile @@ -0,0 +1,39 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-www-curl +PKG_VERSION:=4.00 +PKG_RELEASE:=1 +PKG_MD5SUM:=f34eb29f59a811869a4f77bfc0df2f5d + +PKG_SOURCE_URL:=http://search.cpan.org/CPAN/authors/id/S/SZ/SZBALINT +PKG_SOURCE:=WWW-Curl-$(PKG_VERSION).tar.gz + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-Curl-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-www-curl +SUBMENU:=Perl +SECTION:=lang +CATEGORY:=Languages +TITLE:=Perl bindings to libcurl +URL:=http://search.cpan.org/dist/WWW-Curl/ +DEPENDS:=perl +libcurl +endef + +define Build/Configure + $(call perlmod/Configure,$(STAGING_DIR)/usr/include,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-www-curl/install + $(call perlmod/Install,$(1),WWW/Curl WWW/Curl.pm auto/WWW/Curl) +endef + + +$(eval $(call BuildPackage,perl-www-curl)) diff --git a/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch b/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch new file mode 100644 index 0000000..2b31454 --- /dev/null +++ b/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch @@ -0,0 +1,11 @@ +--- WWW-Curl-4.00.config/Makefile.PL 2008-04-21 23:18:39.000000000 +0200 ++++ WWW-Curl-4.00/Makefile.PL 2008-04-21 23:18:52.000000000 +0200 +@@ -11,7 +11,7 @@ + no_index directory => 'template'; + # This is a hack. If you have libcurl installed, just specify curl.h below + # and comment out this line. +-requires_external_bin 'curl-config'; ++#requires_external_bin 'curl-config'; + + # This utility helper generates the constants function from curl.h + # It is normally only used by the maintainer, but if you're curl is older diff --git a/lang/perl-www-mechanize/Makefile b/lang/perl-www-mechanize/Makefile new file mode 100644 index 0000000..a1ad32f --- /dev/null +++ b/lang/perl-www-mechanize/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-www-mechanize +PKG_VERSION:=1.58 +PKG_RELEASE:=1 + +PKG_SOURCE:=WWW-Mechanize-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/ +PKG_MD5SUM:=c928d1bf3218bfe0c0d99096cf34db52 + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-Mechanize-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-www-mechanize + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=Perl WWW Mechanize + URL:=http://search.cpan.org/dist/WWW-Mechanize/ + DEPENDS:=perl +perl-www +endef + +define Build/Configure + $(call perlmod/Configure,$(STAGING_DIR)/usr/include,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-www-mechanize/install + $(call perlmod/Install,$(1),WWW/Mechanize WWW/Mechanize.pm) +endef + +$(eval $(call BuildPackage,perl-www-mechanize)) diff --git a/lang/perl-www/Makefile b/lang/perl-www/Makefile new file mode 100644 index 0000000..ca8b431 --- /dev/null +++ b/lang/perl-www/Makefile @@ -0,0 +1,39 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl-www +PKG_VERSION:=5.812 +PKG_RELEASE:=1 +PKG_MD5SUM:=86c6121170efe55fc0d33cdc967561bc + +PKG_SOURCE_URL:=http://search.cpan.org/CPAN/authors/id/G/GA/GAAS +PKG_SOURCE:=libwww-perl-$(PKG_VERSION).tar.gz + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/libwww-perl-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../perl/perlmod.mk + +define Package/perl-www +SUBMENU:=Perl +SECTION:=lang +CATEGORY:=Languages +TITLE:=WWW client/server library for Perl (aka LWP) +URL:=http://search.cpan.org/dist/libwww-perl/ +DEPENDS:=perl +perl-html-parser +perl-uri +endef + +define Build/Configure + $(call perlmod/Configure,-n,) +endef + +define Build/Compile + $(call perlmod/Compile,,) +endef + +define Package/perl-www/install + $(call perlmod/Install,$(1),File HTML HTTP LWP LWP.pm Net WWW) +endef + + +$(eval $(call BuildPackage,perl-www)) diff --git a/lang/perl/Makefile b/lang/perl/Makefile new file mode 100644 index 0000000..dd0fc06 --- /dev/null +++ b/lang/perl/Makefile @@ -0,0 +1,193 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=perl +PKG_VERSION:=5.10.0 +PKG_RELEASE:=5 +PKG_MD5SUM:=d2c39b002ebfd2c3c5dba589365c5a71 + +PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \ + ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/src/5.0 \ + ftp://ftp.gmd.de/mirrors/CPAN/src/5.0 \ + ftp://ftp.funet.fi/pub/languages/perl/CPAN/src/5.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz + +PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/perl/Default + SUBMENU:=Perl + SECTION:=lang + CATEGORY:=Languages + TITLE:=The Perl intepreter + URL:=http://www.perl.com/ +endef + +define Package/microperl +$(call Package/perl/Default) + TITLE+=(minimal version) +endef + +define Package/microperl/description + A perl package without operating-specific functions such as readdir. +endef + +define Build/Template + +$(STAMP_CONFIGURED)-$(1): $(STAMP_PREPARED) + -$(MAKE) -C $(PKG_BUILD_DIR) clean + $(call Build/$(1)/Configure) + touch $$@ + +$(STAMP_BUILT)-$(1): $(STAMP_CONFIGURED)-$(1) + $(call Build/$(1)/Compile) + touch $$@ + +$(STAMP_BUILT): $(STAMP_BUILT)-$(1) + +endef + +define Build/microperl/Configure +endef + +define Build/microperl/Compile + $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.micro \ + CC="$(TARGET_CC)" OPTIMIZE="$(TARGET_CFLAGS)" + $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/microperl $(PKG_INSTALL_DIR)/usr/bin/ +endef + +define Package/microperl/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/microperl $(1)/usr/bin/ +endef + +include perlmod.mk + +define Package/perl +$(call Package/perl/Default) + MAINTAINER:=Peter Colberg +endef + +define Package/perl/description + Perl is a stable, cross platform programming language. + It is used for mission critical projects in the public and private sectors + and is widely used to program web applications of all needs. +endef + +define Build/perl/Configure + @echo + @echo "===> Stage 1: Configure host perl" + @echo + mkdir -p $(PKG_BUILD_DIR)/host-perl + (cd $(PKG_BUILD_DIR)/host-perl && sh ../Configure -der -Dmksymlinks -Uusedl -Dotherlibdirs=$(PERL_LIB)) + + @echo + @echo "===> Stage 2: Build host perl binary with static extensions" + @echo + $(MAKE) -C $(PKG_BUILD_DIR)/host-perl + + @echo + @echo "===> Stage 3: Configure target perl" + @echo + -$(MAKE) -C $(PKG_BUILD_DIR) clean + sed \ + -e 's!%%CC%%!$(TARGET_CC)!g' \ + -e 's!%%CFLAGS%%!$(TARGET_CFLAGS) -DUSE_CROSS_COMPILE $(TARGET_CPPFLAGS)!g' \ + -e 's!%%CPP%%!$(TARGET_CROSS)gcc -E!g' \ + -e 's!%%AR%%!$(TARGET_CROSS)ar!g' \ + -e 's!%%LD%%!$(TARGET_CROSS)gcc!g' \ + -e 's!%%LDFLAGS%%!-rdynamic $(TARGET_LDFLAGS)!g' \ + -e 's!%%LIBDIRS%%!$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib!g' \ + -e 's!%%INCDIRS%%!$(STAGING_DIR)/include $(STAGING_DIR)/usr/include!g' \ + files/config.sh-$(patsubst i386,i486,$(ARCH)).in \ + > $(PKG_BUILD_DIR)/config.sh + (cd $(PKG_BUILD_DIR) && ./Configure -S) +endef + +define Build/perl/Compile + @echo + @echo "===> Stage 4: Build target miniperl binary" + @echo + install -m 0644 $(PKG_BUILD_DIR)/config.h $(PKG_BUILD_DIR)/xconfig.h + -rm -f $(PKG_BUILD_DIR)/miniperl + $(MAKE) -C $(PKG_BUILD_DIR) miniperl + mkdir -p $(PKG_BUILD_DIR)/target-bin + install -m 0755 $(PKG_BUILD_DIR)/miniperl $(PKG_BUILD_DIR)/target-bin/ + + @echo + @echo "===> Stage 5: Build target perl binary" + @echo + -rm -f $(PKG_BUILD_DIR)/miniperl $(PKG_BUILD_DIR)/perl + install -m 0755 $(PKG_BUILD_DIR)/host-perl/miniperl $(PKG_BUILD_DIR)/ + touch $(PKG_BUILD_DIR)/miniperl + $(MAKE) -C $(PKG_BUILD_DIR) perl + install -m 0755 $(PKG_BUILD_DIR)/perl $(PKG_BUILD_DIR)/target-bin/ + + @echo + @echo "===> Stage 6: Build target extensions and utils" + @echo + -rm -f $(PKG_BUILD_DIR)/miniperl $(PKG_BUILD_DIR)/perl + install -m 0755 $(PKG_BUILD_DIR)/host-perl/miniperl $(PKG_BUILD_DIR)/ + ln -sf miniperl $(PKG_BUILD_DIR)/perl + touch $(PKG_BUILD_DIR)/miniperl $(PKG_BUILD_DIR)/perl + $(MAKE) -C $(PKG_BUILD_DIR) + + @echo + @echo "===> Stage 7: Install Perl into staging dir" + @echo + -rm -f $(PKG_BUILD_DIR)/perl + $(INSTALL_BIN) $(PKG_BUILD_DIR)/host-perl/perl $(PKG_BUILD_DIR)/ + (cd $(PKG_BUILD_DIR) && ./perl installperl --destdir=$(STAGING_DIR)) + + @echo + @echo "===> Stage 8: Install Perl into a temporary root" + @echo + -rm -f $(PKG_BUILD_DIR)/perl + $(INSTALL_BIN) $(PKG_BUILD_DIR)/target-bin/perl $(PKG_BUILD_DIR) + -rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + (cd $(PKG_BUILD_DIR) && host-perl/miniperl installperl --destdir=$(PKG_INSTALL_DIR)) +endef + +define Package/perl/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/perl$(PKG_VERSION) $(1)/usr/bin + ln -nsf perl$(PKG_VERSION) $(1)/usr/bin/perl +endef + +ifneq ($(CONFIG_PACKAGE_microperl),) +define Build/microperl + $(call Build/Template,microperl) +endef +endif +$(eval $(Build/microperl)) + +ifneq ($(CONFIG_PACKAGE_perl),) +define Build/perl + $(call Build/Template,perl) +endef +endif +$(eval $(Build/perl)) + +define Build/Configure +endef + +define Build/Compile +endef + +$(eval $(call RequireCommand,rsync, \ + $(PKG_NAME) requires rsync installed on the host-system. \ +)) + +$(eval $(call BuildPackage,microperl)) +$(eval $(call BuildPackage,perl)) + +-include perlbase.mk diff --git a/lang/perl/files/Module/ScanDeps.pm b/lang/perl/files/Module/ScanDeps.pm new file mode 100644 index 0000000..4f3a7d5 --- /dev/null +++ b/lang/perl/files/Module/ScanDeps.pm @@ -0,0 +1,1083 @@ +package Module::ScanDeps; + +use 5.004; +use strict; +use vars qw( $VERSION @EXPORT @EXPORT_OK $CurrentPackage ); + +$VERSION = '0.62'; +@EXPORT = qw( scan_deps scan_deps_runtime ); +@EXPORT_OK = qw( scan_line scan_chunk add_deps scan_deps_runtime ); + +use Config; +use Exporter; +use base 'Exporter'; +use constant dl_ext => ".$Config{dlext}"; +use constant lib_ext => $Config{lib_ext}; +use constant is_insensitive_fs => ( + -s $0 + and (-s lc($0) || -1) == (-s uc($0) || -1) + and (-s lc($0) || -1) == -s $0 +); + +use Cwd (); +use File::Path (); +use File::Temp (); +use File::Basename (); +use FileHandle; + +=head1 NAME + +Module::ScanDeps - Recursively scan Perl code for dependencies + +=head1 VERSION + +This document describes version 0.61 of Module::ScanDeps, released +June 30, 2006. + +=head1 SYNOPSIS + +Via the command-line program L: + + % scandeps.pl *.pm # Print PREREQ_PM section for *.pm + % scandeps.pl -e "use utf8" # Read script from command line + % scandeps.pl -B *.pm # Include core modules + % scandeps.pl -V *.pm # Show autoload/shared/data files + +Used in a program; + + use Module::ScanDeps; + + # standard usage + my $hash_ref = scan_deps( + files => [ 'a.pl', 'b.pl' ], + recurse => 1, + ); + + # shorthand; assume recurse == 1 + my $hash_ref = scan_deps( 'a.pl', 'b.pl' ); + + # App::Packer::Frontend compatible interface + # see App::Packer::Frontend for the structure returned by get_files + my $scan = Module::ScanDeps->new; + $scan->set_file( 'a.pl' ); + $scan->set_options( add_modules => [ 'Test::More' ] ); + $scan->calculate_info; + my $files = $scan->get_files; + +=head1 DESCRIPTION + +This module scans potential modules used by perl programs, and returns a +hash reference; its keys are the module names as appears in C<%INC> +(e.g. C); the values are hash references with this structure: + + { + file => '/usr/local/lib/perl5/5.8.0/Test/More.pm', + key => 'Test/More.pm', + type => 'module', # or 'autoload', 'data', 'shared' + used_by => [ 'Test/Simple.pm', ... ], + } + +One function, C, is exported by default. Three other +functions (C, C, C) are exported upon +request. + +Users of B may also use this module as the dependency-checking +frontend, by tweaking their F like below: + + use Module::ScanDeps; + ... + my $packer = App::Packer->new( frontend => 'Module::ScanDeps' ); + ... + +Please see L for detailed explanation on +the structure returned by C. + +=head2 B + + $rv_ref = scan_deps( + files => \@files, recurse => $recurse, + rv => \%rv, skip => \%skip, + compile => $compile, execute => $execute, + ); + $rv_ref = scan_deps(@files); # shorthand, with recurse => 1 + +This function scans each file in C<@files>, registering their +dependencies into C<%rv>, and returns a reference to the updated +C<%rv>. The meaning of keys and values are explained above. + +If C<$recurse> is true, C will call itself recursively, +to perform a breadth-first search on text files (as defined by the +-T operator) found in C<%rv>. + +If the C<\%skip> is specified, files that exists as its keys are +skipped. This is used internally to avoid infinite recursion. + +If C<$compile> or C<$execute> is true, runs C in either +compile-only or normal mode, then inspects their C<%INC> after +termination to determine additional runtime dependencies. + +If C<$execute> is an array reference, runs the files contained +in it instead of C<@files>. + +=head2 B + +Like B, but skips the static scanning part. + +=head2 B + + @modules = scan_line($line); + +Splits a line into chunks (currently with the semicolon characters), and +return the union of C calls of them. + +If the line is C<__END__> or C<__DATA__>, a single C<__END__> element is +returned to signify the end of the program. + +Similarly, it returns a single C<__POD__> if the line matches C; +the caller is responsible for skipping appropriate number of lines +until C<=cut>, before calling C again. + +=head2 B + + $module = scan_chunk($chunk); + @modules = scan_chunk($chunk); + +Apply various heuristics to C<$chunk> to find and return the module +name(s) it contains. In scalar context, returns only the first module +or C. + +=head2 B + + $rv_ref = add_deps( rv => \%rv, modules => \@modules ); + $rv_ref = add_deps( @modules ); # shorthand, without rv + +Resolves a list of module names to its actual on-disk location, by +finding in C<@INC>; modules that cannot be found are skipped. + +This function populates the C<%rv> hash with module/filename pairs, and +returns a reference to it. + +=head1 CAVEATS + +This module intentially ignores the B hack on FreeBSD -- the +additional directory is removed from C<@INC> altogether. + +The static-scanning heuristic is not likely to be 100% accurate, especially +on modules that dynamically load other modules. + +Chunks that span multiple lines are not handled correctly. For example, +this one works: + + use base 'Foo::Bar'; + +But this one does not: + + use base + 'Foo::Bar'; + +=cut + +my $SeenTk; + +# Pre-loaded module dependencies {{{ +my %Preload = ( + 'AnyDBM_File.pm' => [qw( SDBM_File.pm )], + 'Authen/SASL.pm' => 'sub', + 'Bio/AlignIO.pm' => 'sub', + 'Bio/Assembly/IO.pm' => 'sub', + 'Bio/Biblio/IO.pm' => 'sub', + 'Bio/ClusterIO.pm' => 'sub', + 'Bio/CodonUsage/IO.pm' => 'sub', + 'Bio/DB/Biblio.pm' => 'sub', + 'Bio/DB/Flat.pm' => 'sub', + 'Bio/DB/GFF.pm' => 'sub', + 'Bio/DB/Taxonomy.pm' => 'sub', + 'Bio/Graphics/Glyph.pm' => 'sub', + 'Bio/MapIO.pm' => 'sub', + 'Bio/Matrix/IO.pm' => 'sub', + 'Bio/Matrix/PSM/IO.pm' => 'sub', + 'Bio/OntologyIO.pm' => 'sub', + 'Bio/PopGen/IO.pm' => 'sub', + 'Bio/Restriction/IO.pm' => 'sub', + 'Bio/Root/IO.pm' => 'sub', + 'Bio/SearchIO.pm' => 'sub', + 'Bio/SeqIO.pm' => 'sub', + 'Bio/Structure/IO.pm' => 'sub', + 'Bio/TreeIO.pm' => 'sub', + 'Bio/LiveSeq/IO.pm' => 'sub', + 'Bio/Variation/IO.pm' => 'sub', + 'Crypt/Random.pm' => sub { + _glob_in_inc('Crypt/Random/Provider', 1); + }, + 'Crypt/Random/Generator.pm' => sub { + _glob_in_inc('Crypt/Random/Provider', 1); + }, + 'DBI.pm' => sub { + grep !/\bProxy\b/, _glob_in_inc('DBD', 1); + }, + 'DBIx/SearchBuilder.pm' => 'sub', + 'DBIx/ReportBuilder.pm' => 'sub', + 'Device/ParallelPort.pm' => 'sub', + 'Device/SerialPort.pm' => [ qw( + termios.ph asm/termios.ph sys/termiox.ph sys/termios.ph sys/ttycom.ph + ) ], + 'ExtUtils/MakeMaker.pm' => sub { + grep /\bMM_/, _glob_in_inc('ExtUtils', 1); + }, + 'File/Basename.pm' => [qw( re.pm )], + 'File/Spec.pm' => sub { + require File::Spec; + map { my $name = $_; $name =~ s!::!/!g; "$name.pm" } @File::Spec::ISA; + }, + 'HTTP/Message.pm' => [ qw( + URI/URL.pm URI.pm + ) ], + 'IO.pm' => [ qw( + IO/Handle.pm IO/Seekable.pm IO/File.pm + IO/Pipe.pm IO/Socket.pm IO/Dir.pm + ) ], + 'IO/Socket.pm' => [qw( IO/Socket/UNIX.pm )], + 'LWP/UserAgent.pm' => [ qw( + URI/URL.pm URI/http.pm LWP/Protocol/http.pm + LWP/Protocol/https.pm + ), _glob_in_inc("LWP/Authen", 1) ], + 'Locale/Maketext/Lexicon.pm' => 'sub', + 'Locale/Maketext/GutsLoader.pm' => [qw( Locale/Maketext/Guts.pm )], + 'Mail/Audit.pm' => 'sub', + 'Math/BigInt.pm' => 'sub', + 'Math/BigFloat.pm' => 'sub', + 'Math/Symbolic.pm' => 'sub', + 'Module/Build.pm' => 'sub', + 'Module/Pluggable.pm' => sub { + _glob_in_inc('$CurrentPackage/Plugin', 1); + }, + 'MIME/Decoder.pm' => 'sub', + 'Net/DNS/RR.pm' => 'sub', + 'Net/FTP.pm' => 'sub', + 'Net/SSH/Perl.pm' => 'sub', + 'PDF/API2/Resource/Font.pm' => 'sub', + 'PDF/API2/Basic/TTF/Font.pm' => sub { + _glob_in_inc('PDF/API2/Basic/TTF', 1); + }, + 'PDF/Writer.pm' => 'sub', + 'POE' => [ qw( + POE/Kernel.pm POE/Session.pm + ) ], + 'POE/Kernel.pm' => [ + map "POE/Resource/$_.pm", qw( + Aliases Events Extrefs FileHandles + SIDs Sessions Signals Statistics + ) + ], + 'Parse/AFP.pm' => 'sub', + 'Parse/Binary.pm' => 'sub', + 'Regexp/Common.pm' => 'sub', + 'SerialJunk.pm' => [ qw( + termios.ph asm/termios.ph sys/termiox.ph sys/termios.ph sys/ttycom.ph + ) ], + 'SOAP/Lite.pm' => sub { + (($] >= 5.008 ? ('utf8.pm') : ()), _glob_in_inc('SOAP/Transport', 1)); + }, + 'SQL/Parser.pm' => sub { + _glob_in_inc('SQL/Dialects', 1); + }, + 'SVK/Command.pm' => sub { + _glob_in_inc('SVK', 1); + }, + 'SVN/Core.pm' => sub { + _glob_in_inc('SVN', 1), + map "auto/SVN/$_->{name}", _glob_in_inc('auto/SVN'), + }, + 'Template.pm' => 'sub', + 'Term/ReadLine.pm' => 'sub', + 'Test/Deep.pm' => 'sub', + 'Tk.pm' => sub { + $SeenTk = 1; + qw( Tk/FileSelect.pm Encode/Unicode.pm ); + }, + 'Tk/Balloon.pm' => [qw( Tk/balArrow.xbm )], + 'Tk/BrowseEntry.pm' => [qw( Tk/cbxarrow.xbm Tk/arrowdownwin.xbm )], + 'Tk/ColorEditor.pm' => [qw( Tk/ColorEdit.xpm )], + 'Tk/DragDrop/Common.pm' => sub { + _glob_in_inc('Tk/DragDrop', 1), + }, + 'Tk/FBox.pm' => [qw( Tk/folder.xpm Tk/file.xpm )], + 'Tk/Getopt.pm' => [qw( Tk/openfolder.xpm Tk/win.xbm )], + 'Tk/Toplevel.pm' => [qw( Tk/Wm.pm )], + 'URI.pm' => sub { + grep !/.\b[_A-Z]/, _glob_in_inc('URI', 1); + }, + 'Win32/EventLog.pm' => [qw( Win32/IPC.pm )], + 'Win32/Exe.pm' => 'sub', + 'Win32/TieRegistry.pm' => [qw( Win32API/Registry.pm )], + 'Win32/SystemInfo.pm' => [qw( Win32/cpuspd.dll )], + 'XML/Parser.pm' => sub { + _glob_in_inc('XML/Parser/Style', 1), + _glob_in_inc('XML/Parser/Encodings', 1), + }, + 'XML/Parser/Expat.pm' => sub { + ($] >= 5.008) ? ('utf8.pm') : (); + }, + 'XML/SAX.pm' => [qw( XML/SAX/ParserDetails.ini ) ], + 'XMLRPC/Lite.pm' => sub { + _glob_in_inc('XMLRPC/Transport', 1),; + }, + 'diagnostics.pm' => sub { + # shamelessly taken and adapted from diagnostics.pm + use Config; + my($privlib, $archlib) = @Config{qw(privlibexp archlibexp)}; + if ($^O eq 'VMS') { + require VMS::Filespec; + $privlib = VMS::Filespec::unixify($privlib); + $archlib = VMS::Filespec::unixify($archlib); + } + + for ( + "pod/perldiag.pod", + "Pod/perldiag.pod", + "pod/perldiag-$Config{version}.pod", + "Pod/perldiag-$Config{version}.pod", + "pods/perldiag.pod", + "pods/perldiag-$Config{version}.pod", + ) { + return $_ if _find_in_inc($_); + } + + for ( + "$archlib/pods/perldiag.pod", + "$privlib/pods/perldiag-$Config{version}.pod", + "$privlib/pods/perldiag.pod", + ) { + return $_ if -f $_; + } + + return 'pod/perldiag.pod'; + }, + 'utf8.pm' => [ + 'utf8_heavy.pl', do { + my $dir = 'unicore'; + my @subdirs = qw( To ); + my @files = map "$dir/lib/$_->{name}", _glob_in_inc("$dir/lib"); + + if (@files) { + # 5.8.x + push @files, (map "$dir/$_.pl", qw( Exact Canonical )); + } + else { + # 5.6.x + $dir = 'unicode'; + @files = map "$dir/Is/$_->{name}", _glob_in_inc("$dir/Is") + or return; + push @subdirs, 'In'; + } + + foreach my $subdir (@subdirs) { + foreach (_glob_in_inc("$dir/$subdir")) { + push @files, "$dir/$subdir/$_->{name}"; + } + } + @files; + } + ], + 'charnames.pm' => [ + _find_in_inc('unicore/Name.pl') ? 'unicore/Name.pl' : 'unicode/Name.pl' + ], +); + +# }}} + +my $Keys = 'files|keys|recurse|rv|skip|first|execute|compile'; +sub scan_deps { + my %args = ( + rv => {}, + (@_ and $_[0] =~ /^(?:$Keys)$/o) ? @_ : (files => [@_], recurse => 1) + ); + + scan_deps_static(\%args); + + if ($args{execute} or $args{compile}) { + scan_deps_runtime( + rv => $args{rv}, + files => $args{files}, + execute => $args{execute}, + compile => $args{compile}, + skip => $args{skip} + ); + } + + return ($args{rv}); +} + +sub scan_deps_static { + my ($args) = @_; + my ($files, $keys, $recurse, $rv, $skip, $first, $execute, $compile) = + @$args{qw( files keys recurse rv skip first execute compile )}; + + $rv ||= {}; + $skip ||= {}; + + foreach my $file (@{$files}) { + my $key = shift @{$keys}; + next if $skip->{$file}++; + next if is_insensitive_fs() + and $file ne lc($file) and $skip->{lc($file)}++; + + local *FH; + open FH, $file or die "Cannot open $file: $!"; + + $SeenTk = 0; + + # Line-by-line scanning + LINE: + while () { + chomp(my $line = $_); + foreach my $pm (scan_line($line)) { + last LINE if $pm eq '__END__'; + + if ($pm eq '__POD__') { + while () { last if (/^=cut/) } + next LINE; + } + + $pm = 'CGI/Apache.pm' if /^Apache(?:\.pm)$/; + + add_deps( + used_by => $key, + rv => $rv, + modules => [$pm], + skip => $skip + ); + + my $preload = $Preload{$pm} or next; + if ($preload eq 'sub') { + $pm =~ s/\.p[mh]$//i; + $preload = [ _glob_in_inc($pm, 1) ]; + } + elsif (UNIVERSAL::isa($preload, 'CODE')) { + $preload = [ $preload->($pm) ]; + } + + add_deps( + used_by => $key, + rv => $rv, + modules => $preload, + skip => $skip + ); + } + } + close FH; + + # }}} + } + + # Top-level recursion handling {{{ + while ($recurse) { + my $count = keys %$rv; + my @files = sort grep -T $_->{file}, values %$rv; + scan_deps_static({ + files => [ map $_->{file}, @files ], + keys => [ map $_->{key}, @files ], + rv => $rv, + skip => $skip, + recurse => 0, + }) or ($args->{_deep} and return); + last if $count == keys %$rv; + } + + # }}} + + return $rv; +} + +sub scan_deps_runtime { + my %args = ( + perl => $^X, + rv => {}, + (@_ and $_[0] =~ /^(?:$Keys)$/o) ? @_ : (files => [@_], recurse => 1) + ); + my ($files, $rv, $execute, $compile, $skip, $perl) = + @args{qw( files rv execute compile skip perl )}; + + $files = (ref($files)) ? $files : [$files]; + + my ($inchash, $incarray, $dl_shared_objects) = ({}, [], []); + if ($compile) { + my $file; + + foreach $file (@$files) { + ($inchash, $dl_shared_objects, $incarray) = ({}, [], []); + _compile($perl, $file, $inchash, $dl_shared_objects, $incarray); + + my $rv_sub = _make_rv($inchash, $dl_shared_objects, $incarray); + _merge_rv($rv_sub, $rv); + } + } + elsif ($execute) { + my $excarray = (ref($execute)) ? $execute : [@$files]; + my $exc; + my $first_flag = 1; + foreach $exc (@$excarray) { + ($inchash, $dl_shared_objects, $incarray) = ({}, [], []); + _execute( + $perl, $exc, $inchash, $dl_shared_objects, $incarray, + $first_flag + ); + $first_flag = 0; + } + + my $rv_sub = _make_rv($inchash, $dl_shared_objects, $incarray); + _merge_rv($rv_sub, $rv); + } + + return ($rv); +} + +sub scan_line { + my $line = shift; + my %found; + + return '__END__' if $line =~ /^__(?:END|DATA)__$/; + return '__POD__' if $line =~ /^=\w/; + + $line =~ s/\s*#.*$//; + $line =~ s/[\\\/]+/\//g; + + foreach (split(/;/, $line)) { + if (/^\s*package\s+(\w+)/) { + $CurrentPackage = $1; + $CurrentPackage =~ s{::}{/}g; + return; + } + return if /^\s*(use|require)\s+[\d\._]+/; + if (my ($autouse) = /^\s*use\s+autouse\s+(["'].*?["']|\w+)/) + { + $autouse =~ s/["']//g; + $autouse =~ s{::}{/}g; + return ("autouse.pm", "$autouse.pm"); + } + + if (my ($libs) = /\b(?:use\s+lib\s+|(?:unshift|push)\W+\@INC\W+)(.+)/) + { + my $archname = + defined($Config{archname}) ? $Config{archname} : ''; + my $ver = defined($Config{version}) ? $Config{version} : ''; + foreach (grep(/\w/, split(/["';() ]/, $libs))) { + unshift(@INC, "$_/$ver") if -d "$_/$ver"; + unshift(@INC, "$_/$archname") if -d "$_/$archname"; + unshift(@INC, "$_/$ver/$archname") if -d "$_/$ver/$archname"; + } + next; + } + + $found{$_}++ for scan_chunk($_); + } + + return sort keys %found; +} + +sub scan_chunk { + my $chunk = shift; + + # Module name extraction heuristics {{{ + my $module = eval { + $_ = $chunk; + + return [ 'base.pm', + map { s{::}{/}g; "$_.pm" } + grep { length and !/^q[qw]?$/ } split(/[^\w:]+/, $1) ] + if /^\s* use \s+ base \s+ (.*)/sx; + + return [ 'Class/Autouse.pm', + map { s{::}{/}g; "$_.pm" } + grep { length and !/^:|^q[qw]?$/ } split(/[^\w:]+/, $1) ] + if /^\s* use \s+ Class::Autouse \s+ (.*)/sx + or /^\s* Class::Autouse \s* -> \s* autouse \s* (.*)/sx; + + return [ 'POE.pm', + map { s{::}{/}g; "POE/$_.pm" } + grep { length and !/^q[qw]?$/ } split(/[^\w:]+/, $1) ] + if /^\s* use \s+ POE \s+ (.*)/sx; + + return [ 'encoding.pm', + map { _find_encoding($_) } + grep { length and !/^q[qw]?$/ } split(/[^\w:-]+/, $1) ] + if /^\s* use \s+ encoding \s+ (.*)/sx; + + return $1 if /(?:^|\s)(?:use|no|require)\s+([\w:\.\-\\\/\"\']+)/; + return $1 + if /(?:^|\s)(?:use|no|require)\s+\(\s*([\w:\.\-\\\/\"\']+)\s*\)/; + + if ( s/(?:^|\s)eval\s+\"([^\"]+)\"/$1/ + or s/(?:^|\s)eval\s*\(\s*\"([^\"]+)\"\s*\)/$1/) + { + return $1 if /(?:^|\s)(?:use|no|require)\s+([\w:\.\-\\\/\"\']*)/; + } + + return "File/Glob.pm" if /<[^>]*[^\$\w>][^>]*>/; + return "DBD/$1.pm" if /\b[Dd][Bb][Ii]:(\w+):/; + if (/(?:(:encoding)|\b(?:en|de)code)\(\s*['"]?([-\w]+)/) { + my $mod = _find_encoding($2); + return [ 'PerlIO.pm', $mod ] if $1 and $mod; + return $mod if $mod; + } + return $1 if /(?:^|\s)(?:do|require)\s+[^"]*"(.*?)"/; + return $1 if /(?:^|\s)(?:do|require)\s+[^']*'(.*?)'/; + return $1 if /[^\$]\b([\w:]+)->\w/ and $1 ne 'Tk'; + return $1 if /\b(\w[\w:]*)::\w+\(/; + + if ($SeenTk) { + my @modules; + while (/->\s*([A-Z]\w+)/g) { + push @modules, "Tk/$1.pm"; + } + while (/->\s*Scrolled\W+([A-Z]\w+)/g) { + push @modules, "Tk/$1.pm"; + push @modules, "Tk/Scrollbar.pm"; + } + return \@modules; + } + return; + }; + + # }}} + + return unless defined($module); + return wantarray ? @$module : $module->[0] if ref($module); + + $module =~ s/^['"]//; + return unless $module =~ /^\w/; + + $module =~ s/\W+$//; + $module =~ s/::/\//g; + return if $module =~ /^(?:[\d\._]+|'.*[^']|".*[^"])$/; + + $module .= ".pm" unless $module =~ /\./; + return $module; +} + +sub _find_encoding { + return unless $] >= 5.008 and eval { require Encode; %Encode::ExtModule }; + + my $mod = $Encode::ExtModule{ Encode::find_encoding($_[0])->name } + or return; + $mod =~ s{::}{/}g; + return "$mod.pm"; +} + +sub _add_info { + my ($rv, $module, $file, $used_by, $type) = @_; + return unless defined($module) and defined($file); + + $rv->{$module} ||= { + file => $file, + key => $module, + type => $type, + }; + + push @{ $rv->{$module}{used_by} }, $used_by + if defined($used_by) + and $used_by ne $module + and !grep { $_ eq $used_by } @{ $rv->{$module}{used_by} }; +} + +sub add_deps { + my %args = + ((@_ and $_[0] =~ /^(?:modules|rv|used_by)$/) + ? @_ + : (rv => (ref($_[0]) ? shift(@_) : undef), modules => [@_])); + + my $rv = $args{rv} || {}; + my $skip = $args{skip} || {}; + my $used_by = $args{used_by}; + + foreach my $module (@{ $args{modules} }) { + if (exists $rv->{$module}) { + _add_info($rv, undef, undef, $used_by, undef); + next; + } + + my $file = _find_in_inc($module) or next; + next if $skip->{$file}; + next if is_insensitive_fs() and $skip->{lc($file)}; + + my $type = 'module'; + $type = 'data' unless $file =~ /\.p[mh]$/i; + _add_info($rv, $module, $file, $used_by, $type); + + if ($module =~ /(.*?([^\/]*))\.p[mh]$/i) { + my ($path, $basename) = ($1, $2); + + foreach (_glob_in_inc("auto/$path")) { + next if $skip->{$_->{file}}; + next if is_insensitive_fs() and $skip->{lc($_->{file})}; + next if $_->{file} =~ m{\bauto/$path/.*/}; # weed out subdirs + next if $_->{name} =~ m/(?:^|\/)\.(?:exists|packlist)$/; + my $ext = lc($1) if $_->{name} =~ /(\.[^.]+)$/; + next if $ext eq lc(lib_ext()); + my $type = 'shared' if $ext eq lc(dl_ext()); + $type = 'autoload' if $ext eq '.ix' or $ext eq '.al'; + $type ||= 'data'; + + _add_info($rv, "auto/$path/$_->{name}", $_->{file}, $module, + $type); + } + } + } + + return $rv; +} + +sub _find_in_inc { + my $file = shift; + + # absolute file names + return $file if -f $file; + + foreach my $dir (grep !/\bBSDPAN\b/, @INC) { + return "$dir/$file" if -f "$dir/$file"; + } + return; +} + +sub _glob_in_inc { + my $subdir = shift; + my $pm_only = shift; + my @files; + + require File::Find; + + $subdir =~ s/\$CurrentPackage/$CurrentPackage/; + + foreach my $dir (map "$_/$subdir", grep !/\bBSDPAN\b/, @INC) { + next unless -d $dir; + File::Find::find( + sub { + my $name = $File::Find::name; + $name =~ s!^\Q$dir\E/!!; + return if $pm_only and lc($name) !~ /\.p[mh]$/i; + push @files, $pm_only + ? "$subdir/$name" + : { file => $File::Find::name, + name => $name, + } + if -f; + }, + $dir + ); + } + + return @files; +} + +# App::Packer compatibility functions + +sub new { + my ($class, $self) = @_; + return bless($self ||= {}, $class); +} + +sub set_file { + my $self = shift; + foreach my $script (@_) { + my $basename = $script; + $basename =~ s/.*\///; + $self->{main} = { + key => $basename, + file => $script, + }; + } +} + +sub set_options { + my $self = shift; + my %args = @_; + foreach my $module (@{ $args{add_modules} }) { + $module =~ s/::/\//g; + $module .= '.pm' unless $module =~ /\.p[mh]$/i; + my $file = _find_in_inc($module) or next; + $self->{files}{$module} = $file; + } +} + +sub calculate_info { + my $self = shift; + my $rv = scan_deps( + keys => [ $self->{main}{key}, sort keys %{ $self->{files} }, ], + files => [ $self->{main}{file}, + map { $self->{files}{$_} } sort keys %{ $self->{files} }, + ], + recurse => 1, + ); + + my $info = { + main => { file => $self->{main}{file}, + store_as => $self->{main}{key}, + }, + }; + + my %cache = ($self->{main}{key} => $info->{main}); + foreach my $key (sort keys %{ $self->{files} }) { + my $file = $self->{files}{$key}; + + $cache{$key} = $info->{modules}{$key} = { + file => $file, + store_as => $key, + used_by => [ $self->{main}{key} ], + }; + } + + foreach my $key (sort keys %{$rv}) { + my $val = $rv->{$key}; + if ($cache{ $val->{key} }) { + push @{ $info->{ $val->{type} }->{ $val->{key} }->{used_by} }, + @{ $val->{used_by} }; + } + else { + $cache{ $val->{key} } = $info->{ $val->{type} }->{ $val->{key} } = + { file => $val->{file}, + store_as => $val->{key}, + used_by => $val->{used_by}, + }; + } + } + + $self->{info} = { main => $info->{main} }; + + foreach my $type (sort keys %{$info}) { + next if $type eq 'main'; + + my @val; + if (UNIVERSAL::isa($info->{$type}, 'HASH')) { + foreach my $val (sort values %{ $info->{$type} }) { + @{ $val->{used_by} } = map $cache{$_} || "!!$_!!", + @{ $val->{used_by} }; + push @val, $val; + } + } + + $type = 'modules' if $type eq 'module'; + $self->{info}{$type} = \@val; + } +} + +sub get_files { + my $self = shift; + return $self->{info}; +} + +# scan_deps_runtime utility functions + +sub _compile { + my ($perl, $file, $inchash, $dl_shared_objects, $incarray) = @_; + + my ($fhout, $fname) = File::Temp::tempfile("XXXXXX"); + my $fhin = FileHandle->new($file) or die "Couldn't open $file\n"; + + my $line = do { local $/; <$fhin> }; + $line =~ s/use Module::ScanDeps::DataFeed.*?\n//sg; + $line =~ s/^(.*?)((?:[\r\n]+__(?:DATA|END)__[\r\n]+)|$)/ +use Module::ScanDeps::DataFeed '$fname.out'; +sub { +$1 +} +$2/s; + $fhout->print($line); + $fhout->close; + $fhin->close; + + system($perl, $fname); + + _extract_info("$fname.out", $inchash, $dl_shared_objects, $incarray); + unlink("$fname"); + unlink("$fname.out"); +} + +sub _execute { + my ($perl, $file, $inchash, $dl_shared_objects, $incarray, $firstflag) = @_; + + $DB::single = $DB::single = 1; + my ($fhout, $fname) = File::Temp::tempfile("XXXXXX"); + $fname = _abs_path($fname); + my $fhin = FileHandle->new($file) or die "Couldn't open $file"; + + my $line = do { local $/; <$fhin> }; + $line =~ s/use Module::ScanDeps::DataFeed.*?\n//sg; + $line = "use Module::ScanDeps::DataFeed '$fname.out';\n" . $line; + $fhout->print($line); + $fhout->close; + $fhin->close; + + File::Path::rmtree( ['_Inline'], 0, 1); # XXX hack + system($perl, $fname) == 0 or die "SYSTEM ERROR in executing $file: $?"; + + _extract_info("$fname.out", $inchash, $dl_shared_objects, $incarray); + unlink("$fname"); + unlink("$fname.out"); +} + +sub _make_rv { + my ($inchash, $dl_shared_objects, $inc_array) = @_; + + my $rv = {}; + my @newinc = map(quotemeta($_), @$inc_array); + my $inc = join('|', sort { length($b) <=> length($a) } @newinc); + + require File::Spec; + + my $key; + foreach $key (keys(%$inchash)) { + my $newkey = $key; + $newkey =~ s"^(?:(?:$inc)/?)""sg if File::Spec->file_name_is_absolute($newkey); + + $rv->{$newkey} = { + 'used_by' => [], + 'file' => $inchash->{$key}, + 'type' => _gettype($inchash->{$key}), + 'key' => $key + }; + } + + my $dl_file; + foreach $dl_file (@$dl_shared_objects) { + my $key = $dl_file; + $key =~ s"^(?:(?:$inc)/?)""s; + + $rv->{$key} = { + 'used_by' => [], + 'file' => $dl_file, + 'type' => 'shared', + 'key' => $key + }; + } + + return $rv; +} + +sub _extract_info { + my ($fname, $inchash, $dl_shared_objects, $incarray) = @_; + + use vars qw(%inchash @dl_shared_objects @incarray); + my $fh = FileHandle->new($fname) or die "Couldn't open $fname"; + my $line = do { local $/; <$fh> }; + $fh->close; + + eval $line; + + $inchash->{$_} = $inchash{$_} for keys %inchash; + @$dl_shared_objects = @dl_shared_objects; + @$incarray = @incarray; +} + +sub _gettype { + my $name = shift; + my $dlext = quotemeta(dl_ext()); + + return 'autoload' if $name =~ /(?:\.ix|\.al|\.bs)$/i; + return 'module' if $name =~ /\.p[mh]$/i; + return 'shared' if $name =~ /\.$dlext$/i; + return 'data'; +} + +sub _merge_rv { + my ($rv_sub, $rv) = @_; + + my $key; + foreach $key (keys(%$rv_sub)) { + my %mark; + if ($rv->{$key} and _not_dup($key, $rv, $rv_sub)) { + warn "Different modules for file '$key' were found.\n" + . " -> Using '" . _abs_path($rv_sub->{$key}{file}) . "'.\n" + . " -> Ignoring '" . _abs_path($rv->{$key}{file}) . "'.\n"; + $rv->{$key}{used_by} = [ + grep (!$mark{$_}++, + @{ $rv->{$key}{used_by} }, + @{ $rv_sub->{$key}{used_by} }) + ]; + @{ $rv->{$key}{used_by} } = grep length, @{ $rv->{$key}{used_by} }; + $rv->{$key}{file} = $rv_sub->{$key}{file}; + } + elsif ($rv->{$key}) { + $rv->{$key}{used_by} = [ + grep (!$mark{$_}++, + @{ $rv->{$key}{used_by} }, + @{ $rv_sub->{$key}{used_by} }) + ]; + @{ $rv->{$key}{used_by} } = grep length, @{ $rv->{$key}{used_by} }; + } + else { + $rv->{$key} = { + used_by => [ @{ $rv_sub->{$key}{used_by} } ], + file => $rv_sub->{$key}{file}, + key => $rv_sub->{$key}{key}, + type => $rv_sub->{$key}{type} + }; + + @{ $rv->{$key}{used_by} } = grep length, @{ $rv->{$key}{used_by} }; + } + } +} + +sub _not_dup { + my ($key, $rv1, $rv2) = @_; + (_abs_path($rv1->{$key}{file}) ne _abs_path($rv2->{$key}{file})); +} + +sub _abs_path { + return join( + '/', + Cwd::abs_path(File::Basename::dirname($_[0])), + File::Basename::basename($_[0]), + ); +} + +1; + +__END__ + +=head1 SEE ALSO + +L is a bundled utility that writes C section +for a number of files. + +An application of B is to generate executables from +scripts that contains prerequisite modules; this module supports two +such projects, L and L. Please see their respective +documentations on CPAN for further information. + +=head1 AUTHORS + +Audrey Tang Eautrijus@autrijus.orgE + +Parts of heuristics were deduced from: + +=over 4 + +=item * + +B by ActiveState Tools Corp L + +=item * + +B by IndigoStar, Inc L + +=back + +The B function is contributed by Edward S. Peschko. + +L is the official website for this module. You +can write to the mailing list at Epar@perl.orgE, or send an empty +mail to Epar-subscribe@perl.orgE to participate in the discussion. + +Please submit bug reports to Ebug-Module-ScanDeps@rt.cpan.orgE. + +=head1 COPYRIGHT + +Copyright 2002, 2003, 2004, 2005, 2006 by +Audrey Tang Eautrijus@autrijus.orgE. + +This program is free software; you can redistribute it and/or modify it +under the same terms as Perl itself. + +See L + +=cut diff --git a/lang/perl/files/config.sh-arm.in b/lang/perl/files/config.sh-arm.in new file mode 100644 index 0000000..ae87c59 --- /dev/null +++ b/lang/perl/files/config.sh-arm.in @@ -0,0 +1,1068 @@ +#!/bin/sh +# +# This file was produced by running the Configure script. It holds all the +# definitions figured out by Configure. Should you modify one of these values, +# do not forget to propagate your changes by running "Configure -der". You may +# instead choose to run each of the .SH files by yourself, or "Configure -S". +# + +# Package name : perl5 +# Source directory : . +# Configuration time: Fri Jul 20 04:18:17 MDT 2007 +# Configured by : root +# Target system : linux maia 2.6.22 #1 wed jul 11 12:24:09 cest 2007 armv5tel unknown unknown gnulinux + +Author='' +Date='$Date' +Header='' +Id='$Id' +Locker='' +Log='$Log' +Mcc='Mcc' +RCSfile='$RCSfile' +Revision='$Revision' +Source='' +State='' +_a='.a' +_exe='' +_o='.o' +afs='false' +afsroot='/afs' +alignbytes='4' +ansi2knr='' +aphostname='/bin/hostname' +api_revision='5' +api_subversion='0' +api_version='10' +api_versionstring='5.10.0' +ar='ar' +archlib='' +archlibexp='' +archname64='' +archname='arm-linux-uclibc' +archobjs='' +asctime_r_proto='0' +awk='awk' +baserev='5.0' +bash='' +bin='/usr/bin' +binexp='/usr/bin' +bison='bison' +byacc='byacc' +byteorder='1234' +c='' +castflags='0' +cat='cat' +cc='%%CC%%' +cccdlflags='-fPIC' +ccdlflags='-Wl,-E' +ccflags='%%CFLAGS%%' +ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' +ccname='gcc' +ccsymbols='__ARM_ARCH_3__=1' +ccversion='' +cf_by='root' +cf_email='root@maia.dev.null' +cf_time='Fri Jul 20 04:18:17 MDT 2007' +chgrp='' +chmod='chmod' +chown='' +clocktype='clock_t' +comm='comm' +compress='' +contains='grep' +cp='cp' +cpio='' +cpp='cpp' +cpp_stuff='42' +cppccsymbols='' +cppflags='%%CFLAGS%%' +cpplast='-' +cppminus='-' +cpprun='%%CPP%%' +cppstdin='%%CPP%%' +cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' +crypt_r_proto='0' +cryptlib='' +csh='csh' +ctermid_r_proto='0' +ctime_r_proto='0' +d_Gconvert='sprintf((b),"%.*g",(n),(x))' +d_PRIEUldbl='define' +d_PRIFUldbl='define' +d_PRIGUldbl='define' +d_PRIXU64='define' +d_PRId64='define' +d_PRIeldbl='define' +d_PRIfldbl='define' +d_PRIgldbl='define' +d_PRIi64='define' +d_PRIo64='define' +d_PRIu64='define' +d_PRIx64='define' +d_SCNfldbl='define' +d__fwalk='undef' +d_access='define' +d_accessx='undef' +d_aintl='undef' +d_alarm='define' +d_archlib='undef' +d_asctime_r='undef' +d_atolf='undef' +d_atoll='define' +d_attribute_format='define' +d_attribute_malloc='define' +d_attribute_nonnull='define' +d_attribute_noreturn='define' +d_attribute_pure='define' +d_attribute_unused='define' +d_attribute_warn_unused_result='define' +d_bcmp='define' +d_bcopy='define' +d_bsd='undef' +d_bsdgetpgrp='undef' +d_bsdsetpgrp='undef' +d_builtin_choose_expr='define' +d_builtin_expect='undef' +d_bzero='define' +d_c99_variadic_macros='define' +d_casti32='define' +d_castneg='define' +d_charvspr='undef' +d_chown='define' +d_chroot='define' +d_chsize='undef' +d_class='undef' +d_clearenv='define' +d_closedir='define' +d_cmsghdr_s='define' +d_const='define' +d_copysignl='undef' +d_cplusplus='undef' +d_crypt='define' +d_crypt_r='undef' +d_csh='undef' +d_ctermid='define' +d_ctermid_r='undef' +d_ctime_r='undef' +d_cuserid='define' +d_dbl_dig='define' +d_dbminitproto='undef' +d_difftime='define' +d_dir_dd_fd='undef' +d_dirfd='define' +d_dirnamlen='undef' +d_dlerror='define' +d_dlopen='define' +d_dlsymun='undef' +d_dosuid='undef' +d_drand48_r='undef' +d_drand48proto='define' +d_dup2='define' +d_eaccess='undef' +d_endgrent='define' +d_endgrent_r='undef' +d_endhent='define' +d_endhostent_r='undef' +d_endnent='define' +d_endnetent_r='undef' +d_endpent='define' +d_endprotoent_r='undef' +d_endpwent='define' +d_endpwent_r='undef' +d_endsent='define' +d_endservent_r='undef' +d_eofnblk='define' +d_eunice='undef' +d_faststdio='undef' +d_fchdir='define' +d_fchmod='define' +d_fchown='define' +d_fcntl='define' +d_fcntl_can_lock='define' +d_fd_macros='define' +d_fd_set='define' +d_fds_bits='undef' +d_fgetpos='define' +d_finite='define' +d_finitel='undef' +d_flexfnam='define' +d_flock='define' +d_flockproto='define' +d_fork='define' +d_fp_class='undef' +d_fpathconf='define' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' +d_fpos64_t='undef' +d_frexpl='undef' +d_fs_data_s='undef' +d_fseeko='define' +d_fsetpos='define' +d_fstatfs='define' +d_fstatvfs='define' +d_fsync='define' +d_ftello='define' +d_ftime='undef' +d_futimes='undef' +d_getcwd='define' +d_getespwnam='undef' +d_getfsstat='undef' +d_getgrent='define' +d_getgrent_r='undef' +d_getgrgid_r='undef' +d_getgrnam_r='undef' +d_getgrps='define' +d_gethbyaddr='define' +d_gethbyname='define' +d_gethent='define' +d_gethname='define' +d_gethostbyaddr_r='undef' +d_gethostbyname_r='undef' +d_gethostent_r='undef' +d_gethostprotos='define' +d_getitimer='define' +d_getlogin='define' +d_getlogin_r='undef' +d_getmnt='undef' +d_getmntent='define' +d_getnbyaddr='define' +d_getnbyname='define' +d_getnent='define' +d_getnetbyaddr_r='undef' +d_getnetbyname_r='undef' +d_getnetent_r='undef' +d_getnetprotos='define' +d_getpagsz='define' +d_getpbyname='define' +d_getpbynumber='define' +d_getpent='define' +d_getpgid='define' +d_getpgrp2='undef' +d_getpgrp='define' +d_getppid='define' +d_getprior='define' +d_getprotobyname_r='undef' +d_getprotobynumber_r='undef' +d_getprotoent_r='undef' +d_getprotoprotos='define' +d_getprpwnam='undef' +d_getpwent='define' +d_getpwent_r='undef' +d_getpwnam_r='undef' +d_getpwuid_r='undef' +d_getsbyname='define' +d_getsbyport='define' +d_getsent='define' +d_getservbyname_r='undef' +d_getservbyport_r='undef' +d_getservent_r='undef' +d_getservprotos='define' +d_getspnam='define' +d_getspnam_r='undef' +d_gettimeod='define' +d_gmtime_r='undef' +d_gnulibc='undef' +d_grpasswd='define' +d_hasmntopt='define' +d_htonl='define' +d_ilogbl='undef' +d_inc_version_list='undef' +d_index='undef' +d_inetaton='define' +d_int64_t='define' +d_isascii='define' +d_isfinite='undef' +d_isinf='define' +d_isnan='define' +d_isnanl='undef' +d_killpg='define' +d_lchown='define' +d_ldbl_dig='define' +d_libm_lib_version='define' +d_link='define' +d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' +d_locconv='define' +d_lockf='define' +d_longdbl='define' +d_longlong='define' +d_lseekproto='define' +d_lstat='define' +d_madvise='define' +d_malloc_good_size='undef' +d_malloc_size='undef' +d_mblen='define' +d_mbstowcs='define' +d_mbtowc='define' +d_memchr='define' +d_memcmp='define' +d_memcpy='define' +d_memmove='define' +d_memset='define' +d_mkdir='define' +d_mkdtemp='define' +d_mkfifo='define' +d_mkstemp='define' +d_mkstemps='undef' +d_mktime='define' +d_mmap='define' +d_modfl='undef' +d_modfl_pow32_bug='undef' +d_modflproto='undef' +d_mprotect='define' +d_msg='define' +d_msg_ctrunc='define' +d_msg_dontroute='define' +d_msg_oob='define' +d_msg_peek='define' +d_msg_proxy='define' +d_msgctl='define' +d_msgget='define' +d_msghdr_s='define' +d_msgrcv='define' +d_msgsnd='define' +d_msync='define' +d_munmap='define' +d_mymalloc='undef' +d_nice='define' +d_nl_langinfo='define' +d_nv_preserves_uv='define' +d_nv_zero_is_allbits_zero='define' +d_off64_t='undef' +d_old_pthread_create_joinable='undef' +d_oldpthreads='undef' +d_oldsock='undef' +d_open3='define' +d_pathconf='define' +d_pause='define' +d_perl_otherlibdirs='undef' +d_phostname='undef' +d_pipe='define' +d_poll='define' +d_portable='define' +d_printf_format_null='define' +d_procselfexe='define' +d_pseudofork='undef' +d_pthread_atfork='undef' +d_pthread_attr_setscope='define' +d_pthread_yield='undef' +d_pwage='undef' +d_pwchange='undef' +d_pwclass='undef' +d_pwcomment='undef' +d_pwexpire='undef' +d_pwgecos='define' +d_pwpasswd='define' +d_pwquota='undef' +d_qgcvt='undef' +d_quad='define' +d_random_r='undef' +d_readdir64_r='undef' +d_readdir='define' +d_readdir_r='undef' +d_readlink='define' +d_readv='define' +d_recvmsg='define' +d_rename='define' +d_rewinddir='define' +d_rmdir='define' +d_safebcpy='undef' +d_safemcpy='undef' +d_sanemcmp='define' +d_sbrkproto='define' +d_scalbnl='undef' +d_sched_yield='define' +d_scm_rights='define' +d_seekdir='define' +d_select='define' +d_sem='define' +d_semctl='define' +d_semctl_semid_ds='define' +d_semctl_semun='define' +d_semget='define' +d_semop='define' +d_sendmsg='define' +d_setegid='define' +d_seteuid='define' +d_setgrent='define' +d_setgrent_r='undef' +d_setgrps='define' +d_sethent='define' +d_sethostent_r='undef' +d_setitimer='define' +d_setlinebuf='define' +d_setlocale='define' +d_setlocale_r='undef' +d_setnent='define' +d_setnetent_r='undef' +d_setpent='define' +d_setpgid='define' +d_setpgrp2='undef' +d_setpgrp='define' +d_setprior='define' +d_setproctitle='undef' +d_setprotoent_r='undef' +d_setpwent='define' +d_setpwent_r='undef' +d_setregid='define' +d_setresgid='define' +d_setresuid='define' +d_setreuid='define' +d_setrgid='undef' +d_setruid='undef' +d_setsent='define' +d_setservent_r='undef' +d_setsid='define' +d_setvbuf='define' +d_sfio='undef' +d_shm='define' +d_shmat='define' +d_shmatprototype='define' +d_shmctl='define' +d_shmdt='define' +d_shmget='define' +d_sigaction='define' +d_signbit='undef' +d_sigprocmask='define' +d_sigsetjmp='define' +d_sitearch='define' +d_snprintf='define' +d_sockatmark='undef' +d_sockatmarkproto='undef' +d_socket='define' +d_socklen_t='define' +d_sockpair='define' +d_socks5_init='undef' +d_sprintf_returns_strlen='define' +d_sqrtl='undef' +d_srand48_r='undef' +d_srandom_r='undef' +d_sresgproto='undef' +d_sresuproto='undef' +d_statblks='define' +d_statfs_f_flags='undef' +d_statfs_s='define' +d_statvfs='define' +d_stdio_cnt_lval='undef' +d_stdio_ptr_lval='undef' +d_stdio_ptr_lval_nochange_cnt='undef' +d_stdio_ptr_lval_sets_cnt='undef' +d_stdio_stream_array='undef' +d_stdiobase='undef' +d_stdstdio='undef' +d_strchr='define' +d_strcoll='define' +d_strctcpy='define' +d_strerrm='strerror(e)' +d_strerror='define' +d_strerror_r='undef' +d_strftime='define' +d_strlcat='define' +d_strlcpy='define' +d_strtod='define' +d_strtol='define' +d_strtold='define' +d_strtoll='define' +d_strtoq='define' +d_strtoul='define' +d_strtoull='define' +d_strtouq='define' +d_strxfrm='define' +d_suidsafe='undef' +d_symlink='define' +d_syscall='define' +d_syscallproto='define' +d_sysconf='define' +d_sysernlst='' +d_syserrlst='undef' +d_system='define' +d_tcgetpgrp='define' +d_tcsetpgrp='define' +d_telldir='define' +d_telldirproto='define' +d_time='define' +d_times='define' +d_tm_tm_gmtoff='define' +d_tm_tm_zone='define' +d_tmpnam_r='undef' +d_truncate='define' +d_ttyname_r='undef' +d_tzname='define' +d_u32align='undef' +d_ualarm='define' +d_umask='define' +d_uname='define' +d_union_semun='undef' +d_unordered='undef' +d_unsetenv='define' +d_usleep='define' +d_usleepproto='define' +d_ustat='define' +d_vendorarch='undef' +d_vendorbin='undef' +d_vendorlib='undef' +d_vendorscript='undef' +d_vfork='undef' +d_void_closedir='undef' +d_voidsig='define' +d_voidtty='' +d_volatile='define' +d_vprintf='define' +d_vsnprintf='define' +d_wait4='define' +d_waitpid='define' +d_wcstombs='define' +d_wctomb='define' +d_writev='define' +d_xenix='undef' +date='date' +db_hashtype='u_int32_t' +db_prefixtype='size_t' +db_version_major='' +db_version_minor='' +db_version_patch='' +defvoidused='15' +direntrytype='struct dirent' +dlext='so' +dlsrc='dl_dlopen.xs' +doublesize='8' +drand01='drand48()' +drand48_r_proto='0' +dynamic_ext='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +eagain='EAGAIN' +ebcdic='undef' +echo='echo' +egrep='egrep' +emacs='' +endgrent_r_proto='0' +endhostent_r_proto='0' +endnetent_r_proto='0' +endprotoent_r_proto='0' +endpwent_r_proto='0' +endservent_r_proto='0' +eunicefix=':' +exe_ext='' +expr='expr' +extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +extras='' +fflushNULL='define' +fflushall='undef' +find='' +firstmakefile='makefile' +flex='' +fpossize='20' +fpostype='fpos_t' +freetype='void' +from=':' +full_ar='%%AR%%' +full_csh='csh' +full_sed='sed' +gccansipedantic='' +gccosandvers='' +gccversion='3.4.3' +getgrent_r_proto='0' +getgrgid_r_proto='0' +getgrnam_r_proto='0' +gethostbyaddr_r_proto='0' +gethostbyname_r_proto='0' +gethostent_r_proto='0' +getlogin_r_proto='0' +getnetbyaddr_r_proto='0' +getnetbyname_r_proto='0' +getnetent_r_proto='0' +getprotobyname_r_proto='0' +getprotobynumber_r_proto='0' +getprotoent_r_proto='0' +getpwent_r_proto='0' +getpwnam_r_proto='0' +getpwuid_r_proto='0' +getservbyname_r_proto='0' +getservbyport_r_proto='0' +getservent_r_proto='0' +getspnam_r_proto='0' +gidformat='"lu"' +gidsign='1' +gidsize='4' +gidtype='gid_t' +glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib ' +gmake='gmake' +gmtime_r_proto='0' +gnulibc_version='' +grep='grep' +groupcat='cat /etc/group' +groupstype='gid_t' +gzip='gzip' +h_fcntl='false' +h_sysfile='true' +hint='recommended' +hostcat='cat /etc/hosts' +html1dir=' ' +html1direxp='' +html3dir=' ' +html3direxp='' +i16size='2' +i16type='short' +i32size='4' +i32type='long' +i64size='8' +i64type='long long' +i8size='1' +i8type='char' +i_arpainet='define' +i_bsdioctl='' +i_crypt='define' +i_db='define' +i_dbm='undef' +i_dirent='define' +i_dld='undef' +i_dlfcn='define' +i_fcntl='undef' +i_float='define' +i_fp='undef' +i_fp_class='undef' +i_gdbm='define' +i_grp='define' +i_ieeefp='undef' +i_inttypes='define' +i_langinfo='define' +i_libutil='undef' +i_limits='define' +i_locale='define' +i_machcthr='undef' +i_malloc='define' +i_math='define' +i_memory='undef' +i_mntent='define' +i_ndbm='undef' +i_netdb='define' +i_neterrno='undef' +i_netinettcp='define' +i_niin='define' +i_poll='define' +i_prot='undef' +i_pthread='define' +i_pwd='define' +i_rpcsvcdbm='undef' +i_sfio='undef' +i_sgtty='undef' +i_shadow='define' +i_socks='undef' +i_stdarg='define' +i_stddef='define' +i_stdlib='define' +i_string='define' +i_sunmath='undef' +i_sysaccess='undef' +i_sysdir='define' +i_sysfile='define' +i_sysfilio='undef' +i_sysin='undef' +i_sysioctl='define' +i_syslog='define' +i_sysmman='define' +i_sysmode='undef' +i_sysmount='define' +i_sysndir='undef' +i_sysparam='define' +i_sysresrc='define' +i_syssecrt='undef' +i_sysselct='define' +i_syssockio='undef' +i_sysstat='define' +i_sysstatfs='define' +i_sysstatvfs='define' +i_systime='define' +i_systimek='undef' +i_systimes='define' +i_systypes='define' +i_sysuio='define' +i_sysun='define' +i_sysutsname='define' +i_sysvfs='define' +i_syswait='define' +i_termio='undef' +i_termios='define' +i_time='define' +i_unistd='define' +i_ustat='define' +i_utime='define' +i_values='define' +i_varargs='undef' +i_varhdr='stdarg.h' +i_vfork='undef' +ignore_versioned_solibs='y' +inc_version_list=' ' +inc_version_list_init='0' +incpath='' +inews='' +installarchlib='/usr/lib/perl5/5.10' +installbin='/usr/bin' +initialinstalllocation='/usr/bin' +installhtml1dir='' +installhtml3dir='' +installman1dir='' +installman3dir='' +installprefix='/usr' +installprefixexp='/usr' +installprivlib='/usr/lib/perl5/5.10' +installscript='/usr/bin' +installsitearch='/usr/lib/perl5/5.10' +installsitebin='/usr/bin' +installsitehtml1dir='' +installsitehtml3dir='' +installsitelib='/usr/lib/perl5/5.10' +installsiteman1dir='' +installsiteman3dir='' +installsitescript='/usr/bin' +installstyle='lib/perl5' +installusrbinperl='define' +installvendorarch='' +installvendorbin='' +installvendorhtml1dir='' +installvendorhtml3dir='' +installvendorlib='' +installvendorman1dir='' +installvendorman3dir='' +installvendorscript='' +intsize='4' +issymlink='test -h' +ivdformat='"ld"' +ivsize='4' +ivtype='long' +known_extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +ksh='' +ld='%%LD%%' +lddlflags='-shared %%LDFLAGS%%' +ldflags='' +ldflags_uselargefiles='' +ldlibpthname='LD_LIBRARY_PATH' +less='less' +lib_ext='.a' +libc='' +libperl='libperl.a' +libpth='%%LIBDIRS%%' +libs='-lgdbm -ldb -lnsl -ldl -lm -lcrypt -lutil -lc' +libsdirs='%%LIBDIRS%%' +libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libc.so' +#libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so' +libspath='%%LIBDIRS%%' +libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD' +libswanted_uselargefiles='' +line='' +lint='' +lkflags='' +ln='ln' +lns='/bin/ln -s' +localtime_r_proto='0' +locincpth=' ' +loclibpth=' ' +longdblsize='8' +longlongsize='8' +longsize='4' +lp='' +lpr='' +ls='ls' +lseeksize='8' +lseektype='off_t' +mad='undef' +madlyh='' +madlyobj='' +madlysrc='' +mail='' +mailx='' +make='make' +make_set_make='#' +mallocobj='' +mallocsrc='' +malloctype='void *' +man1dir=' ' +man1direxp='' +man1ext='0' +man3dir=' ' +man3direxp='' +man3ext='0' +mips_type='' +mistrustnm='' +mkdir='mkdir' +mmaptype='void *' +modetype='mode_t' +more='more' +multiarch='undef' +mv='' +myarchname='arm-linux-uclibc' +mydomain='.dev.null' +myhostname='maia' +myuname='linux maia 2.6.22 #1 wed jul 11 12:24:09 cest 2007 armv5tel unknown unknown gnulinux ' +n='-n' +need_va_copy='undef' +netdb_hlen_type='size_t' +netdb_host_type='const void *' +netdb_name_type='const char *' +netdb_net_type='in_addr_t' +nm='nm' +nm_opt='' +nm_so_opt='--dynamic' +nonxs_ext='Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +nroff='nroff' +nvEUformat='"E"' +nvFUformat='"F"' +nvGUformat='"G"' +nv_preserves_uv_bits='32' +nveformat='"e"' +nvfformat='"f"' +nvgformat='"g"' +nvsize='8' +nvtype='double' +o_nonblock='O_NONBLOCK' +obj_ext='.o' +old_pthread_create_joinable='' +optimize='-O2' +orderlib='false' +osname='linux' +osvers='2.6.22' +otherlibdirs=' ' +package='perl5' +pager='/usr/bin/less' +passcat='cat /etc/passwd' +patchlevel='10' +path_sep=':' +perl5='' +perl='' +perl_patchlevel='' +perladmin='root@maia.dev.null' +perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc' +perlpath='/usr/bin/perl' +pg='pg' +phostname='hostname' +pidtype='pid_t' +plibpth='' +pmake='' +pr='' +prefix='/usr' +prefixexp='/usr' +privlib='/usr/lib/perl5/5.10' +privlibexp='/usr/lib/perl5/5.10' +procselfexe='"/proc/self/exe"' +prototype='define' +ptrsize='4' +quadkind='3' +quadtype='long long' +randbits='48' +randfunc='drand48' +random_r_proto='0' +randseedtype='long' +ranlib=':' +rd_nodata='-1' +readdir64_r_proto='0' +readdir_r_proto='0' +revision='5' +rm='rm' +rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*' +rmail='' +run='' +runnm='false' +sPRIEUldbl='"E"' +sPRIFUldbl='"F"' +sPRIGUldbl='"G"' +sPRIXU64='"LX"' +sPRId64='"Ld"' +sPRIeldbl='"e"' +sPRIfldbl='"f"' +sPRIgldbl='"g"' +sPRIi64='"Li"' +sPRIo64='"Lo"' +sPRIu64='"Lu"' +sPRIx64='"Lx"' +sSCNfldbl='"f"' +sched_yield='sched_yield()' +scriptdir='/usr/bin' +scriptdirexp='/usr/bin' +sed='sed' +seedfunc='srand48' +selectminbits='32' +selecttype='fd_set *' +sendmail='' +setgrent_r_proto='0' +sethostent_r_proto='0' +setlocale_r_proto='0' +setnetent_r_proto='0' +setprotoent_r_proto='0' +setpwent_r_proto='0' +setservent_r_proto='0' +sh='/bin/sh' +shar='' +sharpbang='#!' +shmattype='void *' +shortsize='2' +shrpenv='' +shsharp='true' +sig_count='64' +sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN NUM33 NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 RTMAX IOT CLD POLL UNUSED ' +sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "RTMIN", "NUM33", "NUM34", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0' +sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 6 17 29 31 ' +sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 17, 29, 31, 0' +sig_size='68' +signal_t='void' +sitearch='' +sitearchexp='' +sitebin='/usr/bin' +sitebinexp='/usr/bin' +sitehtml1dir='' +sitehtml1direxp='' +sitehtml3dir='' +sitehtml3direxp='' +sitelib='' +#sitelib_stem='/usr/lib/perl5/site_perl' +sitelibexp='' +siteman1dir='' +siteman1direxp='' +siteman3dir='' +siteman3direxp='' +siteprefix='/usr' +siteprefixexp='/usr' +sitescript='/usr/bin' +sitescriptexp='/usr/bin' +sizesize='4' +sizetype='size_t' +sleep='' +smail='' +so='so' +sockethdr='' +socketlib='' +socksizetype='socklen_t' +sort='sort' +spackage='Perl5' +spitshell='cat' +srand48_r_proto='0' +srandom_r_proto='0' +src='.' +ssizetype='ssize_t' +startperl='#!/usr/bin/perl' +startsh='#!/bin/sh' +static_ext=' ' +stdchar='char' +stdio_base='((fp)->_base)' +stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)' +stdio_cnt='((fp)->_cnt)' +stdio_filbuf='' +stdio_ptr='((fp)->_ptr)' +stdio_stream_array='' +strerror_r_proto='0' +#strings='/usr/include/string.h' +submit='' +subversion='0' +sysman='/usr/share/man/man1' +tail='' +tar='' +targetarch='arm-linux-uclibc' +tbl='' +tee='' +test='test' +#timeincl='/usr/include/sys/time.h /usr/include/time.h ' +timetype='time_t' +tmpnam_r_proto='0' +to=':' +touch='touch' +tr='tr' +trnl='\n' +troff='' +ttyname_r_proto='0' +u16size='2' +u16type='unsigned short' +u32size='4' +u32type='unsigned long' +u64size='8' +u64type='unsigned long long' +u8size='1' +u8type='unsigned char' +uidformat='"lu"' +uidsign='1' +uidsize='4' +uidtype='uid_t' +uname='uname' +uniq='uniq' +uquadtype='unsigned long long' +use5005threads='undef' +use64bitall='undef' +use64bitint='undef' +usecrosscompile='define' +usedl='define' +usefaststdio='undef' +useithreads='undef' +uselargefiles='define' +uselongdouble='undef' +usemallocwrap='define' +usemorebits='undef' +usemultiplicity='undef' +usemymalloc='n' +usenm='true' +useopcode='true' +useperlio='define' +useposix='true' +usereentrant='undef' +userelocatableinc='undef' +usesfio='false' +useshrplib='false' +usesitecustomize='undef' +usesocks='undef' +usethreads='undef' +usevendorprefix='undef' +usevfork='false' +usrinc='%%INCDIRS%%' +uuname='' +uvXUformat='"lX"' +uvoformat='"lo"' +uvsize='4' +uvtype='unsigned long' +uvuformat='"lu"' +uvxformat='"lx"' +vendorarch='' +vendorarchexp='' +vendorbin='' +vendorbinexp='' +vendorhtml1dir=' ' +vendorhtml1direxp='' +vendorhtml3dir=' ' +vendorhtml3direxp='' +vendorlib='' +vendorlib_stem='' +vendorlibexp='' +vendorman1dir=' ' +vendorman1direxp='' +vendorman3dir=' ' +vendorman3direxp='' +vendorprefix='' +vendorprefixexp='' +vendorscript='' +vendorscriptexp='' +version='5.10.0' +version_patchlevel_string='version 10 subversion 0' +versiononly='undef' +vi='' +voidflags='15' +xlibpth='/usr/lib/386 /lib/386' +yacc='yacc' +yaccflags='' +zcat='' +zip='zip' +# Configure command line arguments. +config_arg0='./Configure' +config_args='-der' +config_argc=1 +config_arg1='-der' +PERL_REVISION=5 +PERL_VERSION=10 +PERL_SUBVERSION=0 +PERL_API_REVISION=5 +PERL_API_VERSION=10 +PERL_API_SUBVERSION=0 +PERL_PATCHLEVEL= +PERL_CONFIG_SH=true +# Fix problem with HiRes timer. +d_nanosleep='define' +d_clock_gettime='define' +d_clock_getres='define' +d_clock_nanosleep='define' +d_clock='define' diff --git a/lang/perl/files/config.sh-armeb.in b/lang/perl/files/config.sh-armeb.in new file mode 100644 index 0000000..ced3b72 --- /dev/null +++ b/lang/perl/files/config.sh-armeb.in @@ -0,0 +1,1068 @@ +#!/bin/sh +# +# This file was produced by running the Configure script. It holds all the +# definitions figured out by Configure. Should you modify one of these values, +# do not forget to propagate your changes by running "Configure -der". You may +# instead choose to run each of the .SH files by yourself, or "Configure -S". +# + +# Package name : perl5 +# Source directory : . +# Configuration time: Fri Jul 20 04:39:05 MDT 2007 +# Configured by : root +# Target system : linux maia 2.6.22 #1 wed jul 11 12:24:09 cest 2007 armv5teb unknown unknown gnulinux + +Author='' +Date='$Date' +Header='' +Id='$Id' +Locker='' +Log='$Log' +Mcc='Mcc' +RCSfile='$RCSfile' +Revision='$Revision' +Source='' +State='' +_a='.a' +_exe='' +_o='.o' +afs='false' +afsroot='/afs' +alignbytes='4' +ansi2knr='' +aphostname='/bin/hostname' +api_revision='5' +api_subversion='0' +api_version='10' +api_versionstring='5.10.0' +ar='ar' +archlib='' +archlibexp='' +archname64='' +archname='armeb-linux-uclibc' +archobjs='' +asctime_r_proto='0' +awk='awk' +baserev='5.0' +bash='' +bin='/usr/bin' +binexp='/usr/bin' +bison='bison' +byacc='byacc' +byteorder='4321' +c='' +castflags='0' +cat='cat' +cc='%%CC%%' +cccdlflags='-fPIC' +ccdlflags='-Wl,-E' +ccflags='%%CFLAGS%%' +ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' +ccname='gcc' +ccsymbols='__ARM_ARCH_3__=1' +ccversion='' +cf_by='root' +cf_email='root@maia.dev.null' +cf_time='Fri Jul 20 04:39:05 MDT 2007' +chgrp='' +chmod='chmod' +chown='' +clocktype='clock_t' +comm='comm' +compress='' +contains='grep' +cp='cp' +cpio='' +cpp='cpp' +cpp_stuff='42' +cppccsymbols='' +cppflags='%%CFLAGS%%' +cpplast='-' +cppminus='-' +cpprun='%%CPP%%' +cppstdin='%%CPP%%' +cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' +crypt_r_proto='0' +cryptlib='' +csh='csh' +ctermid_r_proto='0' +ctime_r_proto='0' +d_Gconvert='sprintf((b),"%.*g",(n),(x))' +d_PRIEUldbl='define' +d_PRIFUldbl='define' +d_PRIGUldbl='define' +d_PRIXU64='define' +d_PRId64='define' +d_PRIeldbl='define' +d_PRIfldbl='define' +d_PRIgldbl='define' +d_PRIi64='define' +d_PRIo64='define' +d_PRIu64='define' +d_PRIx64='define' +d_SCNfldbl='define' +d__fwalk='undef' +d_access='define' +d_accessx='undef' +d_aintl='undef' +d_alarm='define' +d_archlib='undef' +d_asctime_r='undef' +d_atolf='undef' +d_atoll='define' +d_attribute_format='define' +d_attribute_malloc='define' +d_attribute_nonnull='define' +d_attribute_noreturn='define' +d_attribute_pure='define' +d_attribute_unused='define' +d_attribute_warn_unused_result='define' +d_bcmp='define' +d_bcopy='define' +d_bsd='undef' +d_bsdgetpgrp='undef' +d_bsdsetpgrp='undef' +d_builtin_choose_expr='define' +d_builtin_expect='undef' +d_bzero='define' +d_c99_variadic_macros='define' +d_casti32='define' +d_castneg='define' +d_charvspr='undef' +d_chown='define' +d_chroot='define' +d_chsize='undef' +d_class='undef' +d_clearenv='define' +d_closedir='define' +d_cmsghdr_s='define' +d_const='define' +d_copysignl='undef' +d_cplusplus='undef' +d_crypt='define' +d_crypt_r='undef' +d_csh='undef' +d_ctermid='define' +d_ctermid_r='undef' +d_ctime_r='undef' +d_cuserid='define' +d_dbl_dig='define' +d_dbminitproto='undef' +d_difftime='define' +d_dir_dd_fd='undef' +d_dirfd='define' +d_dirnamlen='undef' +d_dlerror='define' +d_dlopen='define' +d_dlsymun='undef' +d_dosuid='undef' +d_drand48_r='undef' +d_drand48proto='define' +d_dup2='define' +d_eaccess='undef' +d_endgrent='define' +d_endgrent_r='undef' +d_endhent='define' +d_endhostent_r='undef' +d_endnent='define' +d_endnetent_r='undef' +d_endpent='define' +d_endprotoent_r='undef' +d_endpwent='define' +d_endpwent_r='undef' +d_endsent='define' +d_endservent_r='undef' +d_eofnblk='define' +d_eunice='undef' +d_faststdio='undef' +d_fchdir='define' +d_fchmod='define' +d_fchown='define' +d_fcntl='define' +d_fcntl_can_lock='define' +d_fd_macros='define' +d_fd_set='define' +d_fds_bits='undef' +d_fgetpos='define' +d_finite='define' +d_finitel='undef' +d_flexfnam='define' +d_flock='define' +d_flockproto='define' +d_fork='define' +d_fp_class='undef' +d_fpathconf='define' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' +d_fpos64_t='undef' +d_frexpl='undef' +d_fs_data_s='undef' +d_fseeko='define' +d_fsetpos='define' +d_fstatfs='define' +d_fstatvfs='define' +d_fsync='define' +d_ftello='define' +d_ftime='undef' +d_futimes='undef' +d_getcwd='define' +d_getespwnam='undef' +d_getfsstat='undef' +d_getgrent='define' +d_getgrent_r='undef' +d_getgrgid_r='undef' +d_getgrnam_r='undef' +d_getgrps='define' +d_gethbyaddr='define' +d_gethbyname='define' +d_gethent='define' +d_gethname='define' +d_gethostbyaddr_r='undef' +d_gethostbyname_r='undef' +d_gethostent_r='undef' +d_gethostprotos='define' +d_getitimer='define' +d_getlogin='define' +d_getlogin_r='undef' +d_getmnt='undef' +d_getmntent='define' +d_getnbyaddr='define' +d_getnbyname='define' +d_getnent='define' +d_getnetbyaddr_r='undef' +d_getnetbyname_r='undef' +d_getnetent_r='undef' +d_getnetprotos='define' +d_getpagsz='define' +d_getpbyname='define' +d_getpbynumber='define' +d_getpent='define' +d_getpgid='define' +d_getpgrp2='undef' +d_getpgrp='define' +d_getppid='define' +d_getprior='define' +d_getprotobyname_r='undef' +d_getprotobynumber_r='undef' +d_getprotoent_r='undef' +d_getprotoprotos='define' +d_getprpwnam='undef' +d_getpwent='define' +d_getpwent_r='undef' +d_getpwnam_r='undef' +d_getpwuid_r='undef' +d_getsbyname='define' +d_getsbyport='define' +d_getsent='define' +d_getservbyname_r='undef' +d_getservbyport_r='undef' +d_getservent_r='undef' +d_getservprotos='define' +d_getspnam='define' +d_getspnam_r='undef' +d_gettimeod='define' +d_gmtime_r='undef' +d_gnulibc='undef' +d_grpasswd='define' +d_hasmntopt='define' +d_htonl='define' +d_ilogbl='undef' +d_inc_version_list='undef' +d_index='undef' +d_inetaton='define' +d_int64_t='define' +d_isascii='define' +d_isfinite='undef' +d_isinf='define' +d_isnan='define' +d_isnanl='undef' +d_killpg='define' +d_lchown='define' +d_ldbl_dig='define' +d_libm_lib_version='define' +d_link='define' +d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' +d_locconv='define' +d_lockf='define' +d_longdbl='define' +d_longlong='define' +d_lseekproto='define' +d_lstat='define' +d_madvise='define' +d_malloc_good_size='undef' +d_malloc_size='undef' +d_mblen='define' +d_mbstowcs='define' +d_mbtowc='define' +d_memchr='define' +d_memcmp='define' +d_memcpy='define' +d_memmove='define' +d_memset='define' +d_mkdir='define' +d_mkdtemp='define' +d_mkfifo='define' +d_mkstemp='define' +d_mkstemps='undef' +d_mktime='define' +d_mmap='define' +d_modfl='undef' +d_modfl_pow32_bug='undef' +d_modflproto='undef' +d_mprotect='define' +d_msg='define' +d_msg_ctrunc='define' +d_msg_dontroute='define' +d_msg_oob='define' +d_msg_peek='define' +d_msg_proxy='define' +d_msgctl='define' +d_msgget='define' +d_msghdr_s='define' +d_msgrcv='define' +d_msgsnd='define' +d_msync='define' +d_munmap='define' +d_mymalloc='undef' +d_nice='define' +d_nl_langinfo='define' +d_nv_preserves_uv='define' +d_nv_zero_is_allbits_zero='define' +d_off64_t='undef' +d_old_pthread_create_joinable='undef' +d_oldpthreads='undef' +d_oldsock='undef' +d_open3='define' +d_pathconf='define' +d_pause='define' +d_perl_otherlibdirs='undef' +d_phostname='undef' +d_pipe='define' +d_poll='define' +d_portable='define' +d_printf_format_null='define' +d_procselfexe='define' +d_pseudofork='undef' +d_pthread_atfork='undef' +d_pthread_attr_setscope='define' +d_pthread_yield='undef' +d_pwage='undef' +d_pwchange='undef' +d_pwclass='undef' +d_pwcomment='undef' +d_pwexpire='undef' +d_pwgecos='define' +d_pwpasswd='define' +d_pwquota='undef' +d_qgcvt='undef' +d_quad='define' +d_random_r='undef' +d_readdir64_r='undef' +d_readdir='define' +d_readdir_r='undef' +d_readlink='define' +d_readv='define' +d_recvmsg='define' +d_rename='define' +d_rewinddir='define' +d_rmdir='define' +d_safebcpy='undef' +d_safemcpy='undef' +d_sanemcmp='define' +d_sbrkproto='define' +d_scalbnl='undef' +d_sched_yield='define' +d_scm_rights='define' +d_seekdir='define' +d_select='define' +d_sem='define' +d_semctl='define' +d_semctl_semid_ds='define' +d_semctl_semun='define' +d_semget='define' +d_semop='define' +d_sendmsg='define' +d_setegid='define' +d_seteuid='define' +d_setgrent='define' +d_setgrent_r='undef' +d_setgrps='define' +d_sethent='define' +d_sethostent_r='undef' +d_setitimer='define' +d_setlinebuf='define' +d_setlocale='define' +d_setlocale_r='undef' +d_setnent='define' +d_setnetent_r='undef' +d_setpent='define' +d_setpgid='define' +d_setpgrp2='undef' +d_setpgrp='define' +d_setprior='define' +d_setproctitle='undef' +d_setprotoent_r='undef' +d_setpwent='define' +d_setpwent_r='undef' +d_setregid='define' +d_setresgid='define' +d_setresuid='define' +d_setreuid='define' +d_setrgid='undef' +d_setruid='undef' +d_setsent='define' +d_setservent_r='undef' +d_setsid='define' +d_setvbuf='define' +d_sfio='undef' +d_shm='define' +d_shmat='define' +d_shmatprototype='define' +d_shmctl='define' +d_shmdt='define' +d_shmget='define' +d_sigaction='define' +d_signbit='undef' +d_sigprocmask='define' +d_sigsetjmp='define' +d_sitearch='define' +d_snprintf='define' +d_sockatmark='undef' +d_sockatmarkproto='undef' +d_socket='define' +d_socklen_t='define' +d_sockpair='define' +d_socks5_init='undef' +d_sprintf_returns_strlen='define' +d_sqrtl='undef' +d_srand48_r='undef' +d_srandom_r='undef' +d_sresgproto='undef' +d_sresuproto='undef' +d_statblks='define' +d_statfs_f_flags='undef' +d_statfs_s='define' +d_statvfs='define' +d_stdio_cnt_lval='undef' +d_stdio_ptr_lval='undef' +d_stdio_ptr_lval_nochange_cnt='undef' +d_stdio_ptr_lval_sets_cnt='undef' +d_stdio_stream_array='undef' +d_stdiobase='undef' +d_stdstdio='undef' +d_strchr='define' +d_strcoll='define' +d_strctcpy='define' +d_strerrm='strerror(e)' +d_strerror='define' +d_strerror_r='undef' +d_strftime='define' +d_strlcat='define' +d_strlcpy='define' +d_strtod='define' +d_strtol='define' +d_strtold='define' +d_strtoll='define' +d_strtoq='define' +d_strtoul='define' +d_strtoull='define' +d_strtouq='define' +d_strxfrm='define' +d_suidsafe='undef' +d_symlink='define' +d_syscall='define' +d_syscallproto='define' +d_sysconf='define' +d_sysernlst='' +d_syserrlst='undef' +d_system='define' +d_tcgetpgrp='define' +d_tcsetpgrp='define' +d_telldir='define' +d_telldirproto='define' +d_time='define' +d_times='define' +d_tm_tm_gmtoff='define' +d_tm_tm_zone='define' +d_tmpnam_r='undef' +d_truncate='define' +d_ttyname_r='undef' +d_tzname='define' +d_u32align='undef' +d_ualarm='define' +d_umask='define' +d_uname='define' +d_union_semun='undef' +d_unordered='undef' +d_unsetenv='define' +d_usleep='define' +d_usleepproto='define' +d_ustat='define' +d_vendorarch='undef' +d_vendorbin='undef' +d_vendorlib='undef' +d_vendorscript='undef' +d_vfork='undef' +d_void_closedir='undef' +d_voidsig='define' +d_voidtty='' +d_volatile='define' +d_vprintf='define' +d_vsnprintf='define' +d_wait4='define' +d_waitpid='define' +d_wcstombs='define' +d_wctomb='define' +d_writev='define' +d_xenix='undef' +date='date' +db_hashtype='u_int32_t' +db_prefixtype='size_t' +db_version_major='' +db_version_minor='' +db_version_patch='' +defvoidused='15' +direntrytype='struct dirent' +dlext='so' +dlsrc='dl_dlopen.xs' +doublesize='8' +drand01='drand48()' +drand48_r_proto='0' +dynamic_ext='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +eagain='EAGAIN' +ebcdic='undef' +echo='echo' +egrep='egrep' +emacs='' +endgrent_r_proto='0' +endhostent_r_proto='0' +endnetent_r_proto='0' +endprotoent_r_proto='0' +endpwent_r_proto='0' +endservent_r_proto='0' +eunicefix=':' +exe_ext='' +expr='expr' +extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +extras='' +fflushNULL='define' +fflushall='undef' +find='' +firstmakefile='makefile' +flex='' +fpossize='20' +fpostype='fpos_t' +freetype='void' +from=':' +full_ar='%%AR%%' +full_csh='csh' +full_sed='sed' +gccansipedantic='' +gccosandvers='' +gccversion='3.4.3' +getgrent_r_proto='0' +getgrgid_r_proto='0' +getgrnam_r_proto='0' +gethostbyaddr_r_proto='0' +gethostbyname_r_proto='0' +gethostent_r_proto='0' +getlogin_r_proto='0' +getnetbyaddr_r_proto='0' +getnetbyname_r_proto='0' +getnetent_r_proto='0' +getprotobyname_r_proto='0' +getprotobynumber_r_proto='0' +getprotoent_r_proto='0' +getpwent_r_proto='0' +getpwnam_r_proto='0' +getpwuid_r_proto='0' +getservbyname_r_proto='0' +getservbyport_r_proto='0' +getservent_r_proto='0' +getspnam_r_proto='0' +gidformat='"lu"' +gidsign='1' +gidsize='4' +gidtype='gid_t' +glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib ' +gmake='gmake' +gmtime_r_proto='0' +gnulibc_version='' +grep='grep' +groupcat='cat /etc/group' +groupstype='gid_t' +gzip='gzip' +h_fcntl='false' +h_sysfile='true' +hint='recommended' +hostcat='cat /etc/hosts' +html1dir=' ' +html1direxp='' +html3dir=' ' +html3direxp='' +i16size='2' +i16type='short' +i32size='4' +i32type='long' +i64size='8' +i64type='long long' +i8size='1' +i8type='char' +i_arpainet='define' +i_bsdioctl='' +i_crypt='define' +i_db='define' +i_dbm='undef' +i_dirent='define' +i_dld='undef' +i_dlfcn='define' +i_fcntl='undef' +i_float='define' +i_fp='undef' +i_fp_class='undef' +i_gdbm='define' +i_grp='define' +i_ieeefp='undef' +i_inttypes='define' +i_langinfo='define' +i_libutil='undef' +i_limits='define' +i_locale='define' +i_machcthr='undef' +i_malloc='define' +i_math='define' +i_memory='undef' +i_mntent='define' +i_ndbm='undef' +i_netdb='define' +i_neterrno='undef' +i_netinettcp='define' +i_niin='define' +i_poll='define' +i_prot='undef' +i_pthread='define' +i_pwd='define' +i_rpcsvcdbm='undef' +i_sfio='undef' +i_sgtty='undef' +i_shadow='define' +i_socks='undef' +i_stdarg='define' +i_stddef='define' +i_stdlib='define' +i_string='define' +i_sunmath='undef' +i_sysaccess='undef' +i_sysdir='define' +i_sysfile='define' +i_sysfilio='undef' +i_sysin='undef' +i_sysioctl='define' +i_syslog='define' +i_sysmman='define' +i_sysmode='undef' +i_sysmount='define' +i_sysndir='undef' +i_sysparam='define' +i_sysresrc='define' +i_syssecrt='undef' +i_sysselct='define' +i_syssockio='undef' +i_sysstat='define' +i_sysstatfs='define' +i_sysstatvfs='define' +i_systime='define' +i_systimek='undef' +i_systimes='define' +i_systypes='define' +i_sysuio='define' +i_sysun='define' +i_sysutsname='define' +i_sysvfs='define' +i_syswait='define' +i_termio='undef' +i_termios='define' +i_time='define' +i_unistd='define' +i_ustat='define' +i_utime='define' +i_values='define' +i_varargs='undef' +i_varhdr='stdarg.h' +i_vfork='undef' +ignore_versioned_solibs='y' +inc_version_list=' ' +inc_version_list_init='0' +incpath='' +inews='' +installarchlib='/usr/lib/perl5/5.10' +installbin='/usr/bin' +initialinstalllocation='/usr/bin' +installhtml1dir='' +installhtml3dir='' +installman1dir='' +installman3dir='' +installprefix='/usr' +installprefixexp='/usr' +installprivlib='/usr/lib/perl5/5.10' +installscript='/usr/bin' +installsitearch='/usr/lib/perl5/5.10' +installsitebin='/usr/bin' +installsitehtml1dir='' +installsitehtml3dir='' +installsitelib='/usr/lib/perl5/5.10' +installsiteman1dir='' +installsiteman3dir='' +installsitescript='/usr/bin' +installstyle='lib/perl5' +installusrbinperl='define' +installvendorarch='' +installvendorbin='' +installvendorhtml1dir='' +installvendorhtml3dir='' +installvendorlib='' +installvendorman1dir='' +installvendorman3dir='' +installvendorscript='' +intsize='4' +issymlink='test -h' +ivdformat='"ld"' +ivsize='4' +ivtype='long' +known_extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +ksh='' +ld='%%LD%%' +lddlflags='-shared %%LDFLAGS%%' +ldflags='' +ldflags_uselargefiles='' +ldlibpthname='LD_LIBRARY_PATH' +less='less' +lib_ext='.a' +libc='' +libperl='libperl.a' +libpth='%%LIBDIRS%%' +libs='-lgdbm -ldb -lnsl -ldl -lm -lcrypt -lutil -lc' +libsdirs='%%LIBDIRS%%' +libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libc.so' +#libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so' +libspath='%%LIBDIRS%%' +libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD' +libswanted_uselargefiles='' +line='' +lint='' +lkflags='' +ln='ln' +lns='/bin/ln -s' +localtime_r_proto='0' +locincpth=' ' +loclibpth=' ' +longdblsize='8' +longlongsize='8' +longsize='4' +lp='' +lpr='' +ls='ls' +lseeksize='8' +lseektype='off_t' +mad='undef' +madlyh='' +madlyobj='' +madlysrc='' +mail='' +mailx='' +make='make' +make_set_make='#' +mallocobj='' +mallocsrc='' +malloctype='void *' +man1dir=' ' +man1direxp='' +man1ext='0' +man3dir=' ' +man3direxp='' +man3ext='0' +mips_type='' +mistrustnm='' +mkdir='mkdir' +mmaptype='void *' +modetype='mode_t' +more='more' +multiarch='undef' +mv='' +myarchname='armeb-linux-uclibc' +mydomain='.dev.null' +myhostname='maia' +myuname='linux maia 2.6.22 #1 wed jul 11 12:24:09 cest 2007 armv5teb unknown unknown gnulinux ' +n='-n' +need_va_copy='undef' +netdb_hlen_type='size_t' +netdb_host_type='const void *' +netdb_name_type='const char *' +netdb_net_type='in_addr_t' +nm='nm' +nm_opt='' +nm_so_opt='--dynamic' +nonxs_ext='Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +nroff='nroff' +nvEUformat='"E"' +nvFUformat='"F"' +nvGUformat='"G"' +nv_preserves_uv_bits='32' +nveformat='"e"' +nvfformat='"f"' +nvgformat='"g"' +nvsize='8' +nvtype='double' +o_nonblock='O_NONBLOCK' +obj_ext='.o' +old_pthread_create_joinable='' +optimize='-O2' +orderlib='false' +osname='linux' +osvers='2.6.22' +otherlibdirs=' ' +package='perl5' +pager='/usr/bin/less' +passcat='cat /etc/passwd' +patchlevel='10' +path_sep=':' +perl5='' +perl='' +perl_patchlevel='' +perladmin='root@maia.dev.null' +perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc' +perlpath='/usr/bin/perl' +pg='pg' +phostname='hostname' +pidtype='pid_t' +plibpth='' +pmake='' +pr='' +prefix='/usr' +prefixexp='/usr' +privlib='/usr/lib/perl5/5.10' +privlibexp='/usr/lib/perl5/5.10' +procselfexe='"/proc/self/exe"' +prototype='define' +ptrsize='4' +quadkind='3' +quadtype='long long' +randbits='48' +randfunc='drand48' +random_r_proto='0' +randseedtype='long' +ranlib=':' +rd_nodata='-1' +readdir64_r_proto='0' +readdir_r_proto='0' +revision='5' +rm='rm' +rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*' +rmail='' +run='' +runnm='false' +sPRIEUldbl='"E"' +sPRIFUldbl='"F"' +sPRIGUldbl='"G"' +sPRIXU64='"LX"' +sPRId64='"Ld"' +sPRIeldbl='"e"' +sPRIfldbl='"f"' +sPRIgldbl='"g"' +sPRIi64='"Li"' +sPRIo64='"Lo"' +sPRIu64='"Lu"' +sPRIx64='"Lx"' +sSCNfldbl='"f"' +sched_yield='sched_yield()' +scriptdir='/usr/bin' +scriptdirexp='/usr/bin' +sed='sed' +seedfunc='srand48' +selectminbits='32' +selecttype='fd_set *' +sendmail='' +setgrent_r_proto='0' +sethostent_r_proto='0' +setlocale_r_proto='0' +setnetent_r_proto='0' +setprotoent_r_proto='0' +setpwent_r_proto='0' +setservent_r_proto='0' +sh='/bin/sh' +shar='' +sharpbang='#!' +shmattype='void *' +shortsize='2' +shrpenv='' +shsharp='true' +sig_count='64' +sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN NUM33 NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 RTMAX IOT CLD POLL UNUSED ' +sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "RTMIN", "NUM33", "NUM34", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0' +sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 6 17 29 31 ' +sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 17, 29, 31, 0' +sig_size='68' +signal_t='void' +sitearch='' +sitearchexp='' +sitebin='/usr/bin' +sitebinexp='/usr/bin' +sitehtml1dir='' +sitehtml1direxp='' +sitehtml3dir='' +sitehtml3direxp='' +sitelib='' +#sitelib_stem='/usr/lib/perl5/site_perl' +sitelibexp='' +siteman1dir='' +siteman1direxp='' +siteman3dir='' +siteman3direxp='' +siteprefix='/usr' +siteprefixexp='/usr' +sitescript='/usr/bin' +sitescriptexp='/usr/bin' +sizesize='4' +sizetype='size_t' +sleep='' +smail='' +so='so' +sockethdr='' +socketlib='' +socksizetype='socklen_t' +sort='sort' +spackage='Perl5' +spitshell='cat' +srand48_r_proto='0' +srandom_r_proto='0' +src='.' +ssizetype='ssize_t' +startperl='#!/usr/bin/perl' +startsh='#!/bin/sh' +static_ext=' ' +stdchar='char' +stdio_base='((fp)->_base)' +stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)' +stdio_cnt='((fp)->_cnt)' +stdio_filbuf='' +stdio_ptr='((fp)->_ptr)' +stdio_stream_array='' +strerror_r_proto='0' +#strings='/usr/include/string.h' +submit='' +subversion='0' +sysman='/usr/share/man/man1' +tail='' +tar='' +targetarch='armeb-linux-uclibc' +tbl='' +tee='' +test='test' +#timeincl='/usr/include/sys/time.h /usr/include/time.h ' +timetype='time_t' +tmpnam_r_proto='0' +to=':' +touch='touch' +tr='tr' +trnl='\n' +troff='' +ttyname_r_proto='0' +u16size='2' +u16type='unsigned short' +u32size='4' +u32type='unsigned long' +u64size='8' +u64type='unsigned long long' +u8size='1' +u8type='unsigned char' +uidformat='"lu"' +uidsign='1' +uidsize='4' +uidtype='uid_t' +uname='uname' +uniq='uniq' +uquadtype='unsigned long long' +use5005threads='undef' +use64bitall='undef' +use64bitint='undef' +usecrosscompile='define' +usedl='define' +usefaststdio='undef' +useithreads='undef' +uselargefiles='define' +uselongdouble='undef' +usemallocwrap='define' +usemorebits='undef' +usemultiplicity='undef' +usemymalloc='n' +usenm='true' +useopcode='true' +useperlio='define' +useposix='true' +usereentrant='undef' +userelocatableinc='undef' +usesfio='false' +useshrplib='false' +usesitecustomize='undef' +usesocks='undef' +usethreads='undef' +usevendorprefix='undef' +usevfork='false' +usrinc='%%INCDIRS%%' +uuname='' +uvXUformat='"lX"' +uvoformat='"lo"' +uvsize='4' +uvtype='unsigned long' +uvuformat='"lu"' +uvxformat='"lx"' +vendorarch='' +vendorarchexp='' +vendorbin='' +vendorbinexp='' +vendorhtml1dir=' ' +vendorhtml1direxp='' +vendorhtml3dir=' ' +vendorhtml3direxp='' +vendorlib='' +vendorlib_stem='' +vendorlibexp='' +vendorman1dir=' ' +vendorman1direxp='' +vendorman3dir=' ' +vendorman3direxp='' +vendorprefix='' +vendorprefixexp='' +vendorscript='' +vendorscriptexp='' +version='5.10.0' +version_patchlevel_string='version 10 subversion 0' +versiononly='undef' +vi='' +voidflags='15' +xlibpth='/usr/lib/386 /lib/386' +yacc='yacc' +yaccflags='' +zcat='' +zip='zip' +# Configure command line arguments. +config_arg0='./Configure' +config_args='-der' +config_argc=1 +config_arg1='-der' +PERL_REVISION=5 +PERL_VERSION=10 +PERL_SUBVERSION=0 +PERL_API_REVISION=5 +PERL_API_VERSION=10 +PERL_API_SUBVERSION=0 +PERL_PATCHLEVEL= +PERL_CONFIG_SH=true +# Fix problem with HiRes timer. +d_nanosleep='define' +d_clock_gettime='define' +d_clock_getres='define' +d_clock_nanosleep='define' +d_clock='define' diff --git a/lang/perl/files/config.sh-avr32.in b/lang/perl/files/config.sh-avr32.in new file mode 100644 index 0000000..d7f148d --- /dev/null +++ b/lang/perl/files/config.sh-avr32.in @@ -0,0 +1,1070 @@ +#!/bin/sh +# +# This file was produced by running the Configure script. It holds all the +# definitions figured out by Configure. Should you modify one of these values, +# do not forget to propagate your changes by running "Configure -der". You may +# instead choose to run each of the .SH files by yourself, or "Configure -S". +# + +# Package name : perl5 +# Source directory : . +# Configuration time: Fri Jul 20 04:39:05 MDT 2007 +# Configured by : root +# Target system : linux maia 2.6.22 #1 wed jul 11 12:24:09 cest 2007 armv5teb unknown unknown gnulinux + +Author='' +Date='$Date' +Header='' +Id='$Id' +Locker='' +Log='$Log' +Mcc='Mcc' +RCSfile='$RCSfile' +Revision='$Revision' +Source='' +State='' +_a='.a' +_exe='' +_o='.o' +afs='false' +afsroot='/afs' +alignbytes='8' +ansi2knr='' +aphostname='/bin/hostname' +api_revision='5' +api_subversion='0' +api_version='10' +api_versionstring='5.10.0' +ar='ar' +archlib='' +archlibexp='' +archname64='' +archname='avr32-linux-uclibc' +archobjs='' +asctime_r_proto='0' +awk='awk' +baserev='5.0' +bash='' +bin='/usr/bin' +binexp='/usr/bin' +bison='bison' +byacc='byacc' +byteorder='4321' +c='' +castflags='0' +cat='cat' +cc='%%CC%%' +cccdlflags='-fPIC' +ccdlflags='-Wl,-E' +ccflags='%%CFLAGS%%' +ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' +ccname='gcc' +ccsymbols='' +ccversion='' +cf_by='root' +cf_email='root@maia.dev.null' +cf_time='Fri Jul 20 04:39:05 MDT 2007' +chgrp='' +chmod='chmod' +chown='' +clocktype='clock_t' +comm='comm' +compress='' +contains='grep' +cp='cp' +cpio='' +cpp='cpp' +cpp_stuff='42' +cppccsymbols='' +cppflags='%%CFLAGS%%' +cpplast='-' +cppminus='-' +cpprun='%%CPP%%' +cppstdin='%%CPP%%' +cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' +crypt_r_proto='0' +cryptlib='' +csh='csh' +ctermid_r_proto='0' +ctime_r_proto='0' +# Matteo Croce, Mon, 21 Apr 2008 03:19:30 +0200 +# Fixes perl: can't resolve symbol 'gcvt' +d_Gconvert='sprintf((b),"%.*g",(n),(x))' +d_PRIEUldbl='define' +d_PRIFUldbl='define' +d_PRIGUldbl='define' +d_PRIXU64='define' +d_PRId64='define' +d_PRIeldbl='define' +d_PRIfldbl='define' +d_PRIgldbl='define' +d_PRIi64='define' +d_PRIo64='define' +d_PRIu64='define' +d_PRIx64='define' +d_SCNfldbl='define' +d__fwalk='undef' +d_access='define' +d_accessx='undef' +d_aintl='undef' +d_alarm='define' +d_archlib='undef' +d_asctime_r='undef' +d_atolf='undef' +d_atoll='define' +d_attribute_format='define' +d_attribute_malloc='define' +d_attribute_nonnull='define' +d_attribute_noreturn='define' +d_attribute_pure='define' +d_attribute_unused='define' +d_attribute_warn_unused_result='define' +d_bcmp='define' +d_bcopy='define' +d_bsd='undef' +d_bsdgetpgrp='undef' +d_bsdsetpgrp='undef' +d_builtin_choose_expr='define' +d_builtin_expect='undef' +d_bzero='define' +d_c99_variadic_macros='define' +d_casti32='define' +d_castneg='define' +d_charvspr='undef' +d_chown='define' +d_chroot='define' +d_chsize='undef' +d_class='undef' +d_clearenv='define' +d_closedir='define' +d_cmsghdr_s='define' +d_const='define' +d_copysignl='undef' +d_cplusplus='undef' +d_crypt='define' +d_crypt_r='undef' +d_csh='undef' +d_ctermid='define' +d_ctermid_r='undef' +d_ctime_r='undef' +d_cuserid='define' +d_dbl_dig='define' +d_dbminitproto='undef' +d_difftime='define' +d_dir_dd_fd='undef' +d_dirfd='define' +d_dirnamlen='undef' +d_dlerror='define' +d_dlopen='define' +d_dlsymun='undef' +d_dosuid='undef' +d_drand48_r='undef' +d_drand48proto='define' +d_dup2='define' +d_eaccess='undef' +d_endgrent='define' +d_endgrent_r='undef' +d_endhent='define' +d_endhostent_r='undef' +d_endnent='define' +d_endnetent_r='undef' +d_endpent='define' +d_endprotoent_r='undef' +d_endpwent='define' +d_endpwent_r='undef' +d_endsent='define' +d_endservent_r='undef' +d_eofnblk='define' +d_eunice='undef' +d_faststdio='undef' +d_fchdir='define' +d_fchmod='define' +d_fchown='define' +d_fcntl='define' +d_fcntl_can_lock='define' +d_fd_macros='define' +d_fd_set='define' +d_fds_bits='undef' +d_fgetpos='define' +d_finite='define' +d_finitel='undef' +d_flexfnam='define' +d_flock='define' +d_flockproto='define' +d_fork='define' +d_fp_class='undef' +d_fpathconf='define' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' +d_fpos64_t='undef' +d_frexpl='undef' +d_fs_data_s='undef' +d_fseeko='define' +d_fsetpos='define' +d_fstatfs='define' +d_fstatvfs='define' +d_fsync='define' +d_ftello='define' +d_ftime='undef' +d_futimes='undef' +d_getcwd='define' +d_getespwnam='undef' +d_getfsstat='undef' +d_getgrent='define' +d_getgrent_r='undef' +d_getgrgid_r='undef' +d_getgrnam_r='undef' +d_getgrps='define' +d_gethbyaddr='define' +d_gethbyname='define' +d_gethent='define' +d_gethname='define' +d_gethostbyaddr_r='undef' +d_gethostbyname_r='undef' +d_gethostent_r='undef' +d_gethostprotos='define' +d_getitimer='define' +d_getlogin='define' +d_getlogin_r='undef' +d_getmnt='undef' +d_getmntent='define' +d_getnbyaddr='define' +d_getnbyname='define' +d_getnent='define' +d_getnetbyaddr_r='undef' +d_getnetbyname_r='undef' +d_getnetent_r='undef' +d_getnetprotos='define' +d_getpagsz='define' +d_getpbyname='define' +d_getpbynumber='define' +d_getpent='define' +d_getpgid='define' +d_getpgrp2='undef' +d_getpgrp='define' +d_getppid='define' +d_getprior='define' +d_getprotobyname_r='undef' +d_getprotobynumber_r='undef' +d_getprotoent_r='undef' +d_getprotoprotos='define' +d_getprpwnam='undef' +d_getpwent='define' +d_getpwent_r='undef' +d_getpwnam_r='undef' +d_getpwuid_r='undef' +d_getsbyname='define' +d_getsbyport='define' +d_getsent='define' +d_getservbyname_r='undef' +d_getservbyport_r='undef' +d_getservent_r='undef' +d_getservprotos='define' +d_getspnam='define' +d_getspnam_r='undef' +d_gettimeod='define' +d_gmtime_r='undef' +d_gnulibc='undef' +d_grpasswd='define' +d_hasmntopt='define' +d_htonl='define' +d_ilogbl='undef' +d_inc_version_list='undef' +d_index='undef' +d_inetaton='define' +d_int64_t='define' +d_isascii='define' +d_isfinite='undef' +d_isinf='define' +d_isnan='define' +d_isnanl='undef' +d_killpg='define' +d_lchown='define' +d_ldbl_dig='define' +d_libm_lib_version='define' +d_link='define' +d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' +d_locconv='define' +d_lockf='define' +d_longdbl='define' +d_longlong='define' +d_lseekproto='define' +d_lstat='define' +d_madvise='define' +d_malloc_good_size='undef' +d_malloc_size='undef' +d_mblen='define' +d_mbstowcs='define' +d_mbtowc='define' +d_memchr='define' +d_memcmp='define' +d_memcpy='define' +d_memmove='define' +d_memset='define' +d_mkdir='define' +d_mkdtemp='define' +d_mkfifo='define' +d_mkstemp='define' +d_mkstemps='undef' +d_mktime='define' +d_mmap='define' +d_modfl='undef' +d_modfl_pow32_bug='undef' +d_modflproto='undef' +d_mprotect='define' +d_msg='define' +d_msg_ctrunc='define' +d_msg_dontroute='define' +d_msg_oob='define' +d_msg_peek='define' +d_msg_proxy='define' +d_msgctl='define' +d_msgget='define' +d_msghdr_s='define' +d_msgrcv='define' +d_msgsnd='define' +d_msync='define' +d_munmap='define' +d_mymalloc='undef' +d_nice='define' +d_nl_langinfo='define' +d_nv_preserves_uv='define' +d_nv_zero_is_allbits_zero='define' +d_off64_t='undef' +d_old_pthread_create_joinable='undef' +d_oldpthreads='undef' +d_oldsock='undef' +d_open3='define' +d_pathconf='define' +d_pause='define' +d_perl_otherlibdirs='undef' +d_phostname='undef' +d_pipe='define' +d_poll='define' +d_portable='define' +d_printf_format_null='define' +d_procselfexe='define' +d_pseudofork='undef' +d_pthread_atfork='undef' +d_pthread_attr_setscope='define' +d_pthread_yield='undef' +d_pwage='undef' +d_pwchange='undef' +d_pwclass='undef' +d_pwcomment='undef' +d_pwexpire='undef' +d_pwgecos='define' +d_pwpasswd='define' +d_pwquota='undef' +d_qgcvt='undef' +d_quad='define' +d_random_r='undef' +d_readdir64_r='undef' +d_readdir='define' +d_readdir_r='undef' +d_readlink='define' +d_readv='define' +d_recvmsg='define' +d_rename='define' +d_rewinddir='define' +d_rmdir='define' +d_safebcpy='undef' +d_safemcpy='undef' +d_sanemcmp='define' +d_sbrkproto='define' +d_scalbnl='undef' +d_sched_yield='define' +d_scm_rights='define' +d_seekdir='define' +d_select='define' +d_sem='define' +d_semctl='define' +d_semctl_semid_ds='define' +d_semctl_semun='define' +d_semget='define' +d_semop='define' +d_sendmsg='define' +d_setegid='define' +d_seteuid='define' +d_setgrent='define' +d_setgrent_r='undef' +d_setgrps='define' +d_sethent='define' +d_sethostent_r='undef' +d_setitimer='define' +d_setlinebuf='define' +d_setlocale='define' +d_setlocale_r='undef' +d_setnent='define' +d_setnetent_r='undef' +d_setpent='define' +d_setpgid='define' +d_setpgrp2='undef' +d_setpgrp='define' +d_setprior='define' +d_setproctitle='undef' +d_setprotoent_r='undef' +d_setpwent='define' +d_setpwent_r='undef' +d_setregid='define' +d_setresgid='define' +d_setresuid='define' +d_setreuid='define' +d_setrgid='undef' +d_setruid='undef' +d_setsent='define' +d_setservent_r='undef' +d_setsid='define' +d_setvbuf='define' +d_sfio='undef' +d_shm='define' +d_shmat='define' +d_shmatprototype='define' +d_shmctl='define' +d_shmdt='define' +d_shmget='define' +d_sigaction='define' +d_signbit='undef' +d_sigprocmask='define' +d_sigsetjmp='define' +d_sitearch='define' +d_snprintf='define' +d_sockatmark='undef' +d_sockatmarkproto='undef' +d_socket='define' +d_socklen_t='define' +d_sockpair='define' +d_socks5_init='undef' +d_sprintf_returns_strlen='define' +d_sqrtl='undef' +d_srand48_r='undef' +d_srandom_r='undef' +d_sresgproto='undef' +d_sresuproto='undef' +d_statblks='define' +d_statfs_f_flags='undef' +d_statfs_s='define' +d_statvfs='define' +d_stdio_cnt_lval='undef' +d_stdio_ptr_lval='undef' +d_stdio_ptr_lval_nochange_cnt='undef' +d_stdio_ptr_lval_sets_cnt='undef' +d_stdio_stream_array='undef' +d_stdiobase='undef' +d_stdstdio='undef' +d_strchr='define' +d_strcoll='define' +d_strctcpy='define' +d_strerrm='strerror(e)' +d_strerror='define' +d_strerror_r='undef' +d_strftime='define' +d_strlcat='define' +d_strlcpy='define' +d_strtod='define' +d_strtol='define' +d_strtold='define' +d_strtoll='define' +d_strtoq='define' +d_strtoul='define' +d_strtoull='define' +d_strtouq='define' +d_strxfrm='define' +d_suidsafe='undef' +d_symlink='define' +d_syscall='define' +d_syscallproto='define' +d_sysconf='define' +d_sysernlst='' +d_syserrlst='undef' +d_system='define' +d_tcgetpgrp='define' +d_tcsetpgrp='define' +d_telldir='define' +d_telldirproto='define' +d_time='define' +d_times='define' +d_tm_tm_gmtoff='define' +d_tm_tm_zone='define' +d_tmpnam_r='undef' +d_truncate='define' +d_ttyname_r='undef' +d_tzname='define' +d_u32align='undef' +d_ualarm='define' +d_umask='define' +d_uname='define' +d_union_semun='undef' +d_unordered='undef' +d_unsetenv='define' +d_usleep='define' +d_usleepproto='define' +d_ustat='define' +d_vendorarch='undef' +d_vendorbin='undef' +d_vendorlib='undef' +d_vendorscript='undef' +d_vfork='undef' +d_void_closedir='undef' +d_voidsig='define' +d_voidtty='' +d_volatile='define' +d_vprintf='define' +d_vsnprintf='define' +d_wait4='define' +d_waitpid='define' +d_wcstombs='define' +d_wctomb='define' +d_writev='define' +d_xenix='undef' +date='date' +db_hashtype='u_int32_t' +db_prefixtype='size_t' +db_version_major='' +db_version_minor='' +db_version_patch='' +defvoidused='15' +direntrytype='struct dirent' +dlext='so' +dlsrc='dl_dlopen.xs' +doublesize='8' +drand01='drand48()' +drand48_r_proto='0' +dynamic_ext='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +eagain='EAGAIN' +ebcdic='undef' +echo='echo' +egrep='egrep' +emacs='' +endgrent_r_proto='0' +endhostent_r_proto='0' +endnetent_r_proto='0' +endprotoent_r_proto='0' +endpwent_r_proto='0' +endservent_r_proto='0' +eunicefix=':' +exe_ext='' +expr='expr' +extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +extras='' +fflushNULL='define' +fflushall='undef' +find='' +firstmakefile='makefile' +flex='' +fpossize='20' +fpostype='fpos_t' +freetype='void' +from=':' +full_ar='%%AR%%' +full_csh='csh' +full_sed='sed' +gccansipedantic='' +gccosandvers='' +gccversion='3.4.3' +getgrent_r_proto='0' +getgrgid_r_proto='0' +getgrnam_r_proto='0' +gethostbyaddr_r_proto='0' +gethostbyname_r_proto='0' +gethostent_r_proto='0' +getlogin_r_proto='0' +getnetbyaddr_r_proto='0' +getnetbyname_r_proto='0' +getnetent_r_proto='0' +getprotobyname_r_proto='0' +getprotobynumber_r_proto='0' +getprotoent_r_proto='0' +getpwent_r_proto='0' +getpwnam_r_proto='0' +getpwuid_r_proto='0' +getservbyname_r_proto='0' +getservbyport_r_proto='0' +getservent_r_proto='0' +getspnam_r_proto='0' +gidformat='"lu"' +gidsign='1' +gidsize='4' +gidtype='gid_t' +glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib ' +gmake='gmake' +gmtime_r_proto='0' +gnulibc_version='' +grep='grep' +groupcat='cat /etc/group' +groupstype='gid_t' +gzip='gzip' +h_fcntl='false' +h_sysfile='true' +hint='recommended' +hostcat='cat /etc/hosts' +html1dir=' ' +html1direxp='' +html3dir=' ' +html3direxp='' +i16size='2' +i16type='short' +i32size='4' +i32type='long' +i64size='8' +i64type='long long' +i8size='1' +i8type='char' +i_arpainet='define' +i_bsdioctl='' +i_crypt='define' +i_db='define' +i_dbm='undef' +i_dirent='define' +i_dld='undef' +i_dlfcn='define' +i_fcntl='undef' +i_float='define' +i_fp='undef' +i_fp_class='undef' +i_gdbm='define' +i_grp='define' +i_ieeefp='undef' +i_inttypes='define' +i_langinfo='define' +i_libutil='undef' +i_limits='define' +i_locale='define' +i_machcthr='undef' +i_malloc='define' +i_math='define' +i_memory='undef' +i_mntent='define' +i_ndbm='undef' +i_netdb='define' +i_neterrno='undef' +i_netinettcp='define' +i_niin='define' +i_poll='define' +i_prot='undef' +i_pthread='define' +i_pwd='define' +i_rpcsvcdbm='undef' +i_sfio='undef' +i_sgtty='undef' +i_shadow='define' +i_socks='undef' +i_stdarg='define' +i_stddef='define' +i_stdlib='define' +i_string='define' +i_sunmath='undef' +i_sysaccess='undef' +i_sysdir='define' +i_sysfile='define' +i_sysfilio='undef' +i_sysin='undef' +i_sysioctl='define' +i_syslog='define' +i_sysmman='define' +i_sysmode='undef' +i_sysmount='define' +i_sysndir='undef' +i_sysparam='define' +i_sysresrc='define' +i_syssecrt='undef' +i_sysselct='define' +i_syssockio='undef' +i_sysstat='define' +i_sysstatfs='define' +i_sysstatvfs='define' +i_systime='define' +i_systimek='undef' +i_systimes='define' +i_systypes='define' +i_sysuio='define' +i_sysun='define' +i_sysutsname='define' +i_sysvfs='define' +i_syswait='define' +i_termio='undef' +i_termios='define' +i_time='define' +i_unistd='define' +i_ustat='define' +i_utime='define' +i_values='define' +i_varargs='undef' +i_varhdr='stdarg.h' +i_vfork='undef' +ignore_versioned_solibs='y' +inc_version_list=' ' +inc_version_list_init='0' +incpath='' +inews='' +installarchlib='/usr/lib/perl5/5.10' +installbin='/usr/bin' +initialinstalllocation='/usr/bin' +installhtml1dir='' +installhtml3dir='' +installman1dir='' +installman3dir='' +installprefix='/usr' +installprefixexp='/usr' +installprivlib='/usr/lib/perl5/5.10' +installscript='/usr/bin' +installsitearch='/usr/lib/perl5/5.10' +installsitebin='/usr/bin' +installsitehtml1dir='' +installsitehtml3dir='' +installsitelib='/usr/lib/perl5/5.10' +installsiteman1dir='' +installsiteman3dir='' +installsitescript='/usr/bin' +installstyle='lib/perl5' +installusrbinperl='define' +installvendorarch='' +installvendorbin='' +installvendorhtml1dir='' +installvendorhtml3dir='' +installvendorlib='' +installvendorman1dir='' +installvendorman3dir='' +installvendorscript='' +intsize='4' +issymlink='test -h' +ivdformat='"ld"' +ivsize='4' +ivtype='long' +known_extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +ksh='' +ld='%%LD%%' +lddlflags='-shared %%LDFLAGS%%' +ldflags='' +ldflags_uselargefiles='' +ldlibpthname='LD_LIBRARY_PATH' +less='less' +lib_ext='.a' +libc='' +libperl='libperl.a' +libpth='%%LIBDIRS%%' +libs='-lgdbm -ldb -lnsl -ldl -lm -lcrypt -lutil -lc' +libsdirs='%%LIBDIRS%%' +libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libc.so' +#libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so' +libspath='%%LIBDIRS%%' +libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD' +libswanted_uselargefiles='' +line='' +lint='' +lkflags='' +ln='ln' +lns='/bin/ln -s' +localtime_r_proto='0' +locincpth=' ' +loclibpth=' ' +longdblsize='8' +longlongsize='8' +longsize='4' +lp='' +lpr='' +ls='ls' +lseeksize='8' +lseektype='off_t' +mad='undef' +madlyh='' +madlyobj='' +madlysrc='' +mail='' +mailx='' +make='make' +make_set_make='#' +mallocobj='' +mallocsrc='' +malloctype='void *' +man1dir=' ' +man1direxp='' +man1ext='0' +man3dir=' ' +man3direxp='' +man3ext='0' +mips_type='' +mistrustnm='' +mkdir='mkdir' +mmaptype='void *' +modetype='mode_t' +more='more' +multiarch='undef' +mv='' +myarchname='avr32-linux-uclibc' +mydomain='.dev.null' +myhostname='maia' +myuname='linux maia 2.6.22 #1 wed jul 11 12:24:09 cest 2007 armv5teb unknown unknown gnulinux ' +n='-n' +need_va_copy='undef' +netdb_hlen_type='size_t' +netdb_host_type='const void *' +netdb_name_type='const char *' +netdb_net_type='in_addr_t' +nm='nm' +nm_opt='' +nm_so_opt='--dynamic' +nonxs_ext='Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +nroff='nroff' +nvEUformat='"E"' +nvFUformat='"F"' +nvGUformat='"G"' +nv_preserves_uv_bits='32' +nveformat='"e"' +nvfformat='"f"' +nvgformat='"g"' +nvsize='8' +nvtype='double' +o_nonblock='O_NONBLOCK' +obj_ext='.o' +old_pthread_create_joinable='' +optimize='-O2' +orderlib='false' +osname='linux' +osvers='2.6.22' +otherlibdirs=' ' +package='perl5' +pager='/usr/bin/less' +passcat='cat /etc/passwd' +patchlevel='10' +path_sep=':' +perl5='' +perl='' +perl_patchlevel='' +perladmin='root@maia.dev.null' +perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc' +perlpath='/usr/bin/perl' +pg='pg' +phostname='hostname' +pidtype='pid_t' +plibpth='' +pmake='' +pr='' +prefix='/usr' +prefixexp='/usr' +privlib='/usr/lib/perl5/5.10' +privlibexp='/usr/lib/perl5/5.10' +procselfexe='"/proc/self/exe"' +prototype='define' +ptrsize='4' +quadkind='3' +quadtype='long long' +randbits='48' +randfunc='drand48' +random_r_proto='0' +randseedtype='long' +ranlib=':' +rd_nodata='-1' +readdir64_r_proto='0' +readdir_r_proto='0' +revision='5' +rm='rm' +rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*' +rmail='' +run='' +runnm='false' +sPRIEUldbl='"E"' +sPRIFUldbl='"F"' +sPRIGUldbl='"G"' +sPRIXU64='"LX"' +sPRId64='"Ld"' +sPRIeldbl='"e"' +sPRIfldbl='"f"' +sPRIgldbl='"g"' +sPRIi64='"Li"' +sPRIo64='"Lo"' +sPRIu64='"Lu"' +sPRIx64='"Lx"' +sSCNfldbl='"f"' +sched_yield='sched_yield()' +scriptdir='/usr/bin' +scriptdirexp='/usr/bin' +sed='sed' +seedfunc='srand48' +selectminbits='32' +selecttype='fd_set *' +sendmail='' +setgrent_r_proto='0' +sethostent_r_proto='0' +setlocale_r_proto='0' +setnetent_r_proto='0' +setprotoent_r_proto='0' +setpwent_r_proto='0' +setservent_r_proto='0' +sh='/bin/sh' +shar='' +sharpbang='#!' +shmattype='void *' +shortsize='2' +shrpenv='' +shsharp='true' +sig_count='64' +sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN NUM33 NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 RTMAX IOT CLD POLL UNUSED ' +sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "RTMIN", "NUM33", "NUM34", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0' +sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 6 17 29 31 ' +sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 17, 29, 31, 0' +sig_size='68' +signal_t='void' +sitearch='' +sitearchexp='' +sitebin='/usr/bin' +sitebinexp='/usr/bin' +sitehtml1dir='' +sitehtml1direxp='' +sitehtml3dir='' +sitehtml3direxp='' +sitelib='' +#sitelib_stem='/usr/lib/perl5/site_perl' +sitelibexp='' +siteman1dir='' +siteman1direxp='' +siteman3dir='' +siteman3direxp='' +siteprefix='/usr' +siteprefixexp='/usr' +sitescript='/usr/bin' +sitescriptexp='/usr/bin' +sizesize='4' +sizetype='size_t' +sleep='' +smail='' +so='so' +sockethdr='' +socketlib='' +socksizetype='socklen_t' +sort='sort' +spackage='Perl5' +spitshell='cat' +srand48_r_proto='0' +srandom_r_proto='0' +src='.' +ssizetype='ssize_t' +startperl='#!/usr/bin/perl' +startsh='#!/bin/sh' +static_ext=' ' +stdchar='char' +stdio_base='((fp)->_base)' +stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)' +stdio_cnt='((fp)->_cnt)' +stdio_filbuf='' +stdio_ptr='((fp)->_ptr)' +stdio_stream_array='' +strerror_r_proto='0' +#strings='/usr/include/string.h' +submit='' +subversion='0' +sysman='/usr/share/man/man1' +tail='' +tar='' +targetarch='avr32-linux-uclibc' +tbl='' +tee='' +test='test' +#timeincl='/usr/include/sys/time.h /usr/include/time.h ' +timetype='time_t' +tmpnam_r_proto='0' +to=':' +touch='touch' +tr='tr' +trnl='\n' +troff='' +ttyname_r_proto='0' +u16size='2' +u16type='unsigned short' +u32size='4' +u32type='unsigned long' +u64size='8' +u64type='unsigned long long' +u8size='1' +u8type='unsigned char' +uidformat='"lu"' +uidsign='1' +uidsize='4' +uidtype='uid_t' +uname='uname' +uniq='uniq' +uquadtype='unsigned long long' +use5005threads='undef' +use64bitall='undef' +use64bitint='undef' +usecrosscompile='undef' +usedl='define' +usefaststdio='undef' +useithreads='undef' +uselargefiles='define' +uselongdouble='undef' +usemallocwrap='define' +usemorebits='undef' +usemultiplicity='undef' +usemymalloc='n' +usenm='true' +useopcode='true' +useperlio='define' +useposix='true' +usereentrant='undef' +userelocatableinc='undef' +usesfio='false' +useshrplib='false' +usesitecustomize='undef' +usesocks='undef' +usethreads='undef' +usevendorprefix='undef' +usevfork='false' +usrinc='%%INCDIRS%%' +uuname='' +uvXUformat='"lX"' +uvoformat='"lo"' +uvsize='4' +uvtype='unsigned long' +uvuformat='"lu"' +uvxformat='"lx"' +vendorarch='' +vendorarchexp='' +vendorbin='' +vendorbinexp='' +vendorhtml1dir=' ' +vendorhtml1direxp='' +vendorhtml3dir=' ' +vendorhtml3direxp='' +vendorlib='' +vendorlib_stem='' +vendorlibexp='' +vendorman1dir=' ' +vendorman1direxp='' +vendorman3dir=' ' +vendorman3direxp='' +vendorprefix='' +vendorprefixexp='' +vendorscript='' +vendorscriptexp='' +version='5.10.0' +version_patchlevel_string='version 10 subversion 0' +versiononly='undef' +vi='' +voidflags='15' +xlibpth='/usr/lib/386 /lib/386' +yacc='yacc' +yaccflags='' +zcat='' +zip='zip' +# Configure command line arguments. +config_arg0='./Configure' +config_args='-der' +config_argc=1 +config_arg1='-der' +PERL_REVISION=5 +PERL_VERSION=10 +PERL_SUBVERSION=0 +PERL_API_REVISION=5 +PERL_API_VERSION=10 +PERL_API_SUBVERSION=0 +PERL_PATCHLEVEL= +PERL_CONFIG_SH=true +# Fix problem with HiRes timer. +d_nanosleep='define' +d_clock_gettime='define' +d_clock_getres='define' +d_clock_nanosleep='define' +d_clock='define' diff --git a/lang/perl/files/config.sh-i486.in b/lang/perl/files/config.sh-i486.in new file mode 100644 index 0000000..2cb2b52 --- /dev/null +++ b/lang/perl/files/config.sh-i486.in @@ -0,0 +1,1068 @@ +#!/bin/sh +# +# This file was produced by running the Configure script. It holds all the +# definitions figured out by Configure. Should you modify one of these values, +# do not forget to propagate your changes by running "Configure -der". You may +# instead choose to run each of the .SH files by yourself, or "Configure -S". +# + +# Package name : perl5 +# Source directory : . +# Configuration time: Sat Apr 19 15:51:11 MDT 2008 +# Configured by : root +# Target system : linux maia 2.6.25 #2 sat apr 19 09:46:49 cest 2008 i686 unknown unknown gnulinux + +Author='' +Date='$Date' +Header='' +Id='$Id' +Locker='' +Log='$Log' +Mcc='Mcc' +RCSfile='$RCSfile' +Revision='$Revision' +Source='' +State='' +_a='.a' +_exe='' +_o='.o' +afs='false' +afsroot='/afs' +alignbytes='4' +ansi2knr='' +aphostname='/bin/hostname' +api_revision='5' +api_subversion='0' +api_version='10' +api_versionstring='5.10.0' +ar='ar' +archlib='' +archlibexp='' +archname64='' +archname='i386-linux-uclibc' +archobjs='' +asctime_r_proto='0' +awk='awk' +baserev='5.0' +bash='' +bin='/usr/bin' +binexp='/usr/bin' +bison='bison' +byacc='byacc' +byteorder='1234' +c='' +castflags='0' +cat='cat' +cc='%%CC%%' +cccdlflags='-fPIC' +ccdlflags='-Wl,-E' +ccflags='%%CFLAGS%%' +ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' +ccname='gcc' +ccsymbols='' +ccversion='' +cf_by='root' +cf_email='root@maia.dev.null' +cf_time='Sat Apr 19 15:51:11 MDT 2008' +chgrp='' +chmod='chmod' +chown='' +clocktype='clock_t' +comm='comm' +compress='' +contains='grep' +cp='cp' +cpio='' +cpp='cpp' +cpp_stuff='42' +cppccsymbols='' +cppflags='%%CFLAGS%%' +cpplast='-' +cppminus='-' +cpprun='%%CPP%%' +cppstdin='%%CPP%%' +cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 i386=1 __i386=1 __i386__=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' +crypt_r_proto='0' +cryptlib='' +csh='csh' +ctermid_r_proto='0' +ctime_r_proto='0' +d_Gconvert='sprintf((b),"%.*g",(n),(x))' +d_PRIEUldbl='define' +d_PRIFUldbl='define' +d_PRIGUldbl='define' +d_PRIXU64='define' +d_PRId64='define' +d_PRIeldbl='define' +d_PRIfldbl='define' +d_PRIgldbl='define' +d_PRIi64='define' +d_PRIo64='define' +d_PRIu64='define' +d_PRIx64='define' +d_SCNfldbl='define' +d__fwalk='undef' +d_access='define' +d_accessx='undef' +d_aintl='undef' +d_alarm='define' +d_archlib='undef' +d_asctime_r='undef' +d_atolf='undef' +d_atoll='define' +d_attribute_format='define' +d_attribute_malloc='define' +d_attribute_nonnull='define' +d_attribute_noreturn='define' +d_attribute_pure='define' +d_attribute_unused='define' +d_attribute_warn_unused_result='define' +d_bcmp='define' +d_bcopy='define' +d_bsd='undef' +d_bsdgetpgrp='undef' +d_bsdsetpgrp='undef' +d_builtin_choose_expr='define' +d_builtin_expect='undef' +d_bzero='define' +d_c99_variadic_macros='define' +d_casti32='undef' +d_castneg='define' +d_charvspr='undef' +d_chown='define' +d_chroot='define' +d_chsize='undef' +d_class='undef' +d_clearenv='define' +d_closedir='define' +d_cmsghdr_s='define' +d_const='define' +d_copysignl='undef' +d_cplusplus='undef' +d_crypt='define' +d_crypt_r='undef' +d_csh='undef' +d_ctermid='define' +d_ctermid_r='undef' +d_ctime_r='undef' +d_cuserid='define' +d_dbl_dig='define' +d_dbminitproto='undef' +d_difftime='define' +d_dir_dd_fd='undef' +d_dirfd='define' +d_dirnamlen='undef' +d_dlerror='define' +d_dlopen='define' +d_dlsymun='undef' +d_dosuid='undef' +d_drand48_r='undef' +d_drand48proto='define' +d_dup2='define' +d_eaccess='undef' +d_endgrent='define' +d_endgrent_r='undef' +d_endhent='define' +d_endhostent_r='undef' +d_endnent='define' +d_endnetent_r='undef' +d_endpent='define' +d_endprotoent_r='undef' +d_endpwent='define' +d_endpwent_r='undef' +d_endsent='define' +d_endservent_r='undef' +d_eofnblk='define' +d_eunice='undef' +d_faststdio='undef' +d_fchdir='define' +d_fchmod='define' +d_fchown='define' +d_fcntl='define' +d_fcntl_can_lock='define' +d_fd_macros='define' +d_fd_set='define' +d_fds_bits='undef' +d_fgetpos='define' +d_finite='define' +d_finitel='undef' +d_flexfnam='define' +d_flock='define' +d_flockproto='define' +d_fork='define' +d_fp_class='undef' +d_fpathconf='define' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' +d_fpos64_t='undef' +d_frexpl='undef' +d_fs_data_s='undef' +d_fseeko='define' +d_fsetpos='define' +d_fstatfs='define' +d_fstatvfs='define' +d_fsync='define' +d_ftello='define' +d_ftime='undef' +d_futimes='undef' +d_getcwd='define' +d_getespwnam='undef' +d_getfsstat='undef' +d_getgrent='define' +d_getgrent_r='undef' +d_getgrgid_r='undef' +d_getgrnam_r='undef' +d_getgrps='define' +d_gethbyaddr='define' +d_gethbyname='define' +d_gethent='define' +d_gethname='define' +d_gethostbyaddr_r='undef' +d_gethostbyname_r='undef' +d_gethostent_r='undef' +d_gethostprotos='define' +d_getitimer='define' +d_getlogin='define' +d_getlogin_r='undef' +d_getmnt='undef' +d_getmntent='define' +d_getnbyaddr='define' +d_getnbyname='define' +d_getnent='define' +d_getnetbyaddr_r='undef' +d_getnetbyname_r='undef' +d_getnetent_r='undef' +d_getnetprotos='define' +d_getpagsz='define' +d_getpbyname='define' +d_getpbynumber='define' +d_getpent='define' +d_getpgid='define' +d_getpgrp2='undef' +d_getpgrp='define' +d_getppid='define' +d_getprior='define' +d_getprotobyname_r='undef' +d_getprotobynumber_r='undef' +d_getprotoent_r='undef' +d_getprotoprotos='define' +d_getprpwnam='undef' +d_getpwent='define' +d_getpwent_r='undef' +d_getpwnam_r='undef' +d_getpwuid_r='undef' +d_getsbyname='define' +d_getsbyport='define' +d_getsent='define' +d_getservbyname_r='undef' +d_getservbyport_r='undef' +d_getservent_r='undef' +d_getservprotos='define' +d_getspnam='define' +d_getspnam_r='undef' +d_gettimeod='define' +d_gmtime_r='undef' +d_gnulibc='undef' +d_grpasswd='define' +d_hasmntopt='define' +d_htonl='define' +d_ilogbl='undef' +d_inc_version_list='undef' +d_index='undef' +d_inetaton='define' +d_int64_t='define' +d_isascii='define' +d_isfinite='undef' +d_isinf='define' +d_isnan='define' +d_isnanl='undef' +d_killpg='define' +d_lchown='define' +d_ldbl_dig='define' +d_libm_lib_version='define' +d_link='define' +d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' +d_locconv='define' +d_lockf='define' +d_longdbl='define' +d_longlong='define' +d_lseekproto='define' +d_lstat='define' +d_madvise='define' +d_malloc_good_size='undef' +d_malloc_size='undef' +d_mblen='define' +d_mbstowcs='define' +d_mbtowc='define' +d_memchr='define' +d_memcmp='define' +d_memcpy='define' +d_memmove='define' +d_memset='define' +d_mkdir='define' +d_mkdtemp='define' +d_mkfifo='define' +d_mkstemp='define' +d_mkstemps='undef' +d_mktime='define' +d_mmap='define' +d_modfl='undef' +d_modfl_pow32_bug='undef' +d_modflproto='define' +d_mprotect='define' +d_msg='define' +d_msg_ctrunc='define' +d_msg_dontroute='define' +d_msg_oob='define' +d_msg_peek='define' +d_msg_proxy='define' +d_msgctl='define' +d_msgget='define' +d_msghdr_s='define' +d_msgrcv='define' +d_msgsnd='define' +d_msync='define' +d_munmap='define' +d_mymalloc='undef' +d_nice='define' +d_nl_langinfo='define' +d_nv_preserves_uv='define' +d_nv_zero_is_allbits_zero='define' +d_off64_t='undef' +d_old_pthread_create_joinable='undef' +d_oldpthreads='undef' +d_oldsock='undef' +d_open3='define' +d_pathconf='define' +d_pause='define' +d_perl_otherlibdirs='undef' +d_phostname='undef' +d_pipe='define' +d_poll='define' +d_portable='define' +d_printf_format_null='define' +d_procselfexe='define' +d_pseudofork='undef' +d_pthread_atfork='undef' +d_pthread_attr_setscope='define' +d_pthread_yield='undef' +d_pwage='undef' +d_pwchange='undef' +d_pwclass='undef' +d_pwcomment='undef' +d_pwexpire='undef' +d_pwgecos='define' +d_pwpasswd='define' +d_pwquota='undef' +d_qgcvt='undef' +d_quad='define' +d_random_r='undef' +d_readdir64_r='undef' +d_readdir='define' +d_readdir_r='undef' +d_readlink='define' +d_readv='define' +d_recvmsg='define' +d_rename='define' +d_rewinddir='define' +d_rmdir='define' +d_safebcpy='undef' +d_safemcpy='undef' +d_sanemcmp='define' +d_sbrkproto='define' +d_scalbnl='undef' +d_sched_yield='define' +d_scm_rights='define' +d_seekdir='define' +d_select='define' +d_sem='define' +d_semctl='define' +d_semctl_semid_ds='define' +d_semctl_semun='define' +d_semget='define' +d_semop='define' +d_sendmsg='define' +d_setegid='define' +d_seteuid='define' +d_setgrent='define' +d_setgrent_r='undef' +d_setgrps='define' +d_sethent='define' +d_sethostent_r='undef' +d_setitimer='define' +d_setlinebuf='define' +d_setlocale='define' +d_setlocale_r='undef' +d_setnent='define' +d_setnetent_r='undef' +d_setpent='define' +d_setpgid='define' +d_setpgrp2='undef' +d_setpgrp='define' +d_setprior='define' +d_setproctitle='undef' +d_setprotoent_r='undef' +d_setpwent='define' +d_setpwent_r='undef' +d_setregid='define' +d_setresgid='define' +d_setresuid='define' +d_setreuid='define' +d_setrgid='undef' +d_setruid='undef' +d_setsent='define' +d_setservent_r='undef' +d_setsid='define' +d_setvbuf='define' +d_sfio='undef' +d_shm='define' +d_shmat='define' +d_shmatprototype='define' +d_shmctl='define' +d_shmdt='define' +d_shmget='define' +d_sigaction='define' +d_signbit='undef' +d_sigprocmask='define' +d_sigsetjmp='define' +d_sitearch='define' +d_snprintf='define' +d_sockatmark='undef' +d_sockatmarkproto='undef' +d_socket='define' +d_socklen_t='define' +d_sockpair='define' +d_socks5_init='undef' +d_sprintf_returns_strlen='define' +d_sqrtl='undef' +d_srand48_r='undef' +d_srandom_r='undef' +d_sresgproto='undef' +d_sresuproto='undef' +d_statblks='define' +d_statfs_f_flags='undef' +d_statfs_s='define' +d_statvfs='define' +d_stdio_cnt_lval='undef' +d_stdio_ptr_lval='undef' +d_stdio_ptr_lval_nochange_cnt='undef' +d_stdio_ptr_lval_sets_cnt='undef' +d_stdio_stream_array='undef' +d_stdiobase='undef' +d_stdstdio='undef' +d_strchr='define' +d_strcoll='define' +d_strctcpy='define' +d_strerrm='strerror(e)' +d_strerror='define' +d_strerror_r='undef' +d_strftime='define' +d_strlcat='define' +d_strlcpy='define' +d_strtod='define' +d_strtol='define' +d_strtold='define' +d_strtoll='define' +d_strtoq='define' +d_strtoul='define' +d_strtoull='define' +d_strtouq='define' +d_strxfrm='define' +d_suidsafe='undef' +d_symlink='define' +d_syscall='define' +d_syscallproto='define' +d_sysconf='define' +d_sysernlst='' +d_syserrlst='undef' +d_system='define' +d_tcgetpgrp='define' +d_tcsetpgrp='define' +d_telldir='define' +d_telldirproto='define' +d_time='define' +d_times='define' +d_tm_tm_gmtoff='define' +d_tm_tm_zone='define' +d_tmpnam_r='undef' +d_truncate='define' +d_ttyname_r='undef' +d_tzname='define' +d_u32align='undef' +d_ualarm='define' +d_umask='define' +d_uname='define' +d_union_semun='undef' +d_unordered='undef' +d_unsetenv='define' +d_usleep='define' +d_usleepproto='define' +d_ustat='define' +d_vendorarch='undef' +d_vendorbin='undef' +d_vendorlib='undef' +d_vendorscript='undef' +d_vfork='undef' +d_void_closedir='undef' +d_voidsig='define' +d_voidtty='' +d_volatile='define' +d_vprintf='define' +d_vsnprintf='define' +d_wait4='define' +d_waitpid='define' +d_wcstombs='define' +d_wctomb='define' +d_writev='define' +d_xenix='undef' +date='date' +db_hashtype='u_int32_t' +db_prefixtype='size_t' +db_version_major='' +db_version_minor='' +db_version_patch='' +defvoidused='15' +direntrytype='struct dirent' +dlext='so' +dlsrc='dl_dlopen.xs' +doublesize='8' +drand01='drand48()' +drand48_r_proto='0' +dynamic_ext='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +eagain='EAGAIN' +ebcdic='undef' +echo='echo' +egrep='egrep' +emacs='' +endgrent_r_proto='0' +endhostent_r_proto='0' +endnetent_r_proto='0' +endprotoent_r_proto='0' +endpwent_r_proto='0' +endservent_r_proto='0' +eunicefix=':' +exe_ext='' +expr='expr' +extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +extras='' +fflushNULL='define' +fflushall='undef' +find='' +firstmakefile='makefile' +flex='' +fpossize='20' +fpostype='fpos_t' +freetype='void' +from=':' +full_ar='%%AR%%' +full_csh='csh' +full_sed='sed' +gccansipedantic='' +gccosandvers='' +gccversion='3.4.3' +getgrent_r_proto='0' +getgrgid_r_proto='0' +getgrnam_r_proto='0' +gethostbyaddr_r_proto='0' +gethostbyname_r_proto='0' +gethostent_r_proto='0' +getlogin_r_proto='0' +getnetbyaddr_r_proto='0' +getnetbyname_r_proto='0' +getnetent_r_proto='0' +getprotobyname_r_proto='0' +getprotobynumber_r_proto='0' +getprotoent_r_proto='0' +getpwent_r_proto='0' +getpwnam_r_proto='0' +getpwuid_r_proto='0' +getservbyname_r_proto='0' +getservbyport_r_proto='0' +getservent_r_proto='0' +getspnam_r_proto='0' +gidformat='"lu"' +gidsign='1' +gidsize='4' +gidtype='gid_t' +glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib ' +gmake='gmake' +gmtime_r_proto='0' +gnulibc_version='' +grep='grep' +groupcat='cat /etc/group' +groupstype='gid_t' +gzip='gzip' +h_fcntl='false' +h_sysfile='true' +hint='recommended' +hostcat='cat /etc/hosts' +html1dir=' ' +html1direxp='' +html3dir=' ' +html3direxp='' +i16size='2' +i16type='short' +i32size='4' +i32type='long' +i64size='8' +i64type='long long' +i8size='1' +i8type='char' +i_arpainet='define' +i_bsdioctl='' +i_crypt='define' +i_db='define' +i_dbm='undef' +i_dirent='define' +i_dld='undef' +i_dlfcn='define' +i_fcntl='undef' +i_float='define' +i_fp='undef' +i_fp_class='undef' +i_gdbm='define' +i_grp='define' +i_ieeefp='undef' +i_inttypes='define' +i_langinfo='define' +i_libutil='undef' +i_limits='define' +i_locale='define' +i_machcthr='undef' +i_malloc='define' +i_math='define' +i_memory='undef' +i_mntent='define' +i_ndbm='undef' +i_netdb='define' +i_neterrno='undef' +i_netinettcp='define' +i_niin='define' +i_poll='define' +i_prot='undef' +i_pthread='define' +i_pwd='define' +i_rpcsvcdbm='undef' +i_sfio='undef' +i_sgtty='undef' +i_shadow='define' +i_socks='undef' +i_stdarg='define' +i_stddef='define' +i_stdlib='define' +i_string='define' +i_sunmath='undef' +i_sysaccess='undef' +i_sysdir='define' +i_sysfile='define' +i_sysfilio='undef' +i_sysin='undef' +i_sysioctl='define' +i_syslog='define' +i_sysmman='define' +i_sysmode='undef' +i_sysmount='define' +i_sysndir='undef' +i_sysparam='define' +i_sysresrc='define' +i_syssecrt='undef' +i_sysselct='define' +i_syssockio='undef' +i_sysstat='define' +i_sysstatfs='define' +i_sysstatvfs='define' +i_systime='define' +i_systimek='undef' +i_systimes='define' +i_systypes='define' +i_sysuio='define' +i_sysun='define' +i_sysutsname='define' +i_sysvfs='define' +i_syswait='define' +i_termio='undef' +i_termios='define' +i_time='define' +i_unistd='define' +i_ustat='define' +i_utime='define' +i_values='define' +i_varargs='undef' +i_varhdr='stdarg.h' +i_vfork='undef' +ignore_versioned_solibs='y' +inc_version_list=' ' +inc_version_list_init='0' +incpath='' +inews='' +installarchlib='/usr/lib/perl5/5.10' +installbin='/usr/bin' +initialinstalllocation='/usr/bin' +installhtml1dir='' +installhtml3dir='' +installman1dir='' +installman3dir='' +installprefix='/usr' +installprefixexp='/usr' +installprivlib='/usr/lib/perl5/5.10' +installscript='/usr/bin' +installsitearch='/usr/lib/perl5/5.10' +installsitebin='/usr/bin' +installsitehtml1dir='' +installsitehtml3dir='' +installsitelib='/usr/lib/perl5/5.10' +installsiteman1dir='' +installsiteman3dir='' +installsitescript='/usr/bin' +installstyle='lib/perl5' +installusrbinperl='define' +installvendorarch='' +installvendorbin='' +installvendorhtml1dir='' +installvendorhtml3dir='' +installvendorlib='' +installvendorman1dir='' +installvendorman3dir='' +installvendorscript='' +intsize='4' +issymlink='test -h' +ivdformat='"ld"' +ivsize='4' +ivtype='long' +known_extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +ksh='' +ld='%%LD%%' +lddlflags='-shared %%LDFLAGS%%' +ldflags='' +ldflags_uselargefiles='' +ldlibpthname='LD_LIBRARY_PATH' +less='less' +lib_ext='.a' +libc='' +libperl='libperl.a' +libpth='%%LIBDIRS%%' +libs='-lgdbm -ldb -lnsl -ldl -lm -lcrypt -lutil -lc' +libsdirs='%%LIBDIRS%%' +libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libc.so' +#libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so' +libspath='%%LIBDIRS%%' +libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD' +libswanted_uselargefiles='' +line='' +lint='' +lkflags='' +ln='ln' +lns='/bin/ln -s' +localtime_r_proto='0' +locincpth=' ' +loclibpth=' ' +longdblsize='12' +longlongsize='8' +longsize='4' +lp='' +lpr='' +ls='ls' +lseeksize='8' +lseektype='off_t' +mad='undef' +madlyh='' +madlyobj='' +madlysrc='' +mail='' +mailx='' +make='make' +make_set_make='#' +mallocobj='' +mallocsrc='' +malloctype='void *' +man1dir=' ' +man1direxp='' +man1ext='0' +man3dir=' ' +man3direxp='' +man3ext='0' +mips_type='' +mistrustnm='' +mkdir='mkdir' +mmaptype='void *' +modetype='mode_t' +more='more' +multiarch='undef' +mv='' +myarchname='i386-linux-uclibc' +mydomain='.dev.null' +myhostname='maia' +myuname='linux maia 2.6.25 #2 sat apr 19 09:46:49 cest 2008 i686 unknown unknown gnulinux ' +n='-n' +need_va_copy='undef' +netdb_hlen_type='size_t' +netdb_host_type='const void *' +netdb_name_type='const char *' +netdb_net_type='in_addr_t' +nm='nm' +nm_opt='' +nm_so_opt='--dynamic' +nonxs_ext='Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +nroff='nroff' +nvEUformat='"E"' +nvFUformat='"F"' +nvGUformat='"G"' +nv_preserves_uv_bits='32' +nveformat='"e"' +nvfformat='"f"' +nvgformat='"g"' +nvsize='8' +nvtype='double' +o_nonblock='O_NONBLOCK' +obj_ext='.o' +old_pthread_create_joinable='' +optimize='-O2' +orderlib='false' +osname='linux' +osvers='2.6.25' +otherlibdirs=' ' +package='perl5' +pager='/usr/bin/less' +passcat='cat /etc/passwd' +patchlevel='10' +path_sep=':' +perl5='' +perl='' +perl_patchlevel='' +perladmin='root@maia.dev.null' +perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc' +perlpath='/usr/bin/perl' +pg='pg' +phostname='hostname' +pidtype='pid_t' +plibpth='' +pmake='' +pr='' +prefix='/usr' +prefixexp='/usr' +privlib='/usr/lib/perl5/5.10' +privlibexp='/usr/lib/perl5/5.10' +procselfexe='"/proc/self/exe"' +prototype='define' +ptrsize='4' +quadkind='3' +quadtype='long long' +randbits='48' +randfunc='drand48' +random_r_proto='0' +randseedtype='long' +ranlib=':' +rd_nodata='-1' +readdir64_r_proto='0' +readdir_r_proto='0' +revision='5' +rm='rm' +rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*' +rmail='' +run='' +runnm='false' +sPRIEUldbl='"LE"' +sPRIFUldbl='"LF"' +sPRIGUldbl='"LG"' +sPRIXU64='"LX"' +sPRId64='"Ld"' +sPRIeldbl='"Le"' +sPRIfldbl='"Lf"' +sPRIgldbl='"Lg"' +sPRIi64='"Li"' +sPRIo64='"Lo"' +sPRIu64='"Lu"' +sPRIx64='"Lx"' +sSCNfldbl='"Lf"' +sched_yield='sched_yield()' +scriptdir='/usr/bin' +scriptdirexp='/usr/bin' +sed='sed' +seedfunc='srand48' +selectminbits='32' +selecttype='fd_set *' +sendmail='' +setgrent_r_proto='0' +sethostent_r_proto='0' +setlocale_r_proto='0' +setnetent_r_proto='0' +setprotoent_r_proto='0' +setpwent_r_proto='0' +setservent_r_proto='0' +sh='/bin/sh' +shar='' +sharpbang='#!' +shmattype='void *' +shortsize='2' +shrpenv='' +shsharp='true' +sig_count='64' +sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN NUM33 NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 RTMAX IOT CLD POLL UNUSED ' +sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "RTMIN", "NUM33", "NUM34", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0' +sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 6 17 29 31 ' +sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 17, 29, 31, 0' +sig_size='68' +signal_t='void' +sitearch='' +sitearchexp='' +sitebin='/usr/bin' +sitebinexp='/usr/bin' +sitehtml1dir='' +sitehtml1direxp='' +sitehtml3dir='' +sitehtml3direxp='' +sitelib='' +#sitelib_stem='/usr/lib/perl5/site_perl' +sitelibexp='' +siteman1dir='' +siteman1direxp='' +siteman3dir='' +siteman3direxp='' +siteprefix='/usr' +siteprefixexp='/usr' +sitescript='/usr/bin' +sitescriptexp='/usr/bin' +sizesize='4' +sizetype='size_t' +sleep='' +smail='' +so='so' +sockethdr='' +socketlib='' +socksizetype='socklen_t' +sort='sort' +spackage='Perl5' +spitshell='cat' +srand48_r_proto='0' +srandom_r_proto='0' +src='.' +ssizetype='ssize_t' +startperl='#!/usr/bin/perl' +startsh='#!/bin/sh' +static_ext=' ' +stdchar='char' +stdio_base='((fp)->_base)' +stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)' +stdio_cnt='((fp)->_cnt)' +stdio_filbuf='' +stdio_ptr='((fp)->_ptr)' +stdio_stream_array='' +strerror_r_proto='0' +#strings='/usr/include/string.h' +submit='' +subversion='0' +sysman='/usr/share/man/man1' +tail='' +tar='' +targetarch='i386-linux-uclibc' +tbl='' +tee='' +test='test' +#timeincl='/usr/include/sys/time.h /usr/include/time.h ' +timetype='time_t' +tmpnam_r_proto='0' +to=':' +touch='touch' +tr='tr' +trnl='\n' +troff='' +ttyname_r_proto='0' +u16size='2' +u16type='unsigned short' +u32size='4' +u32type='unsigned long' +u64size='8' +u64type='unsigned long long' +u8size='1' +u8type='unsigned char' +uidformat='"lu"' +uidsign='1' +uidsize='4' +uidtype='uid_t' +uname='uname' +uniq='uniq' +uquadtype='unsigned long long' +use5005threads='undef' +use64bitall='undef' +use64bitint='undef' +usecrosscompile='define' +usedl='define' +usefaststdio='undef' +useithreads='undef' +uselargefiles='define' +uselongdouble='undef' +usemallocwrap='define' +usemorebits='undef' +usemultiplicity='undef' +usemymalloc='n' +usenm='true' +useopcode='true' +useperlio='define' +useposix='true' +usereentrant='undef' +userelocatableinc='undef' +usesfio='false' +useshrplib='false' +usesitecustomize='undef' +usesocks='undef' +usethreads='undef' +usevendorprefix='undef' +usevfork='false' +usrinc='%%INCDIRS%%' +uuname='' +uvXUformat='"lX"' +uvoformat='"lo"' +uvsize='4' +uvtype='unsigned long' +uvuformat='"lu"' +uvxformat='"lx"' +vendorarch='' +vendorarchexp='' +vendorbin='' +vendorbinexp='' +vendorhtml1dir=' ' +vendorhtml1direxp='' +vendorhtml3dir=' ' +vendorhtml3direxp='' +vendorlib='' +vendorlib_stem='' +vendorlibexp='' +vendorman1dir=' ' +vendorman1direxp='' +vendorman3dir=' ' +vendorman3direxp='' +vendorprefix='' +vendorprefixexp='' +vendorscript='' +vendorscriptexp='' +version='5.10.0' +version_patchlevel_string='version 10 subversion 0' +versiononly='undef' +vi='' +voidflags='15' +xlibpth='/usr/lib/386 /lib/386' +yacc='yacc' +yaccflags='' +zcat='' +zip='zip' +# Configure command line arguments. +config_arg0='./Configure' +config_args='-der' +config_argc=1 +config_arg1='-der' +PERL_REVISION=5 +PERL_VERSION=10 +PERL_SUBVERSION=0 +PERL_API_REVISION=5 +PERL_API_VERSION=10 +PERL_API_SUBVERSION=0 +PERL_PATCHLEVEL= +PERL_CONFIG_SH=true +# Fix problem with HiRes timer. +d_nanosleep='define' +d_clock_gettime='define' +d_clock_getres='define' +d_clock_nanosleep='define' +d_clock='define' diff --git a/lang/perl/files/config.sh-mips.in b/lang/perl/files/config.sh-mips.in new file mode 100644 index 0000000..c261711 --- /dev/null +++ b/lang/perl/files/config.sh-mips.in @@ -0,0 +1,1068 @@ +#!/bin/sh +# +# This file was produced by running the Configure script. It holds all the +# definitions figured out by Configure. Should you modify one of these values, +# do not forget to propagate your changes by running "Configure -der". You may +# instead choose to run each of the .SH files by yourself, or "Configure -S". +# + +# Package name : perl5 +# Source directory : . +# Configuration time: Thu Jan 25 03:12:45 MST 2007 +# Configured by : root +# Target system : linux merope 2.4.30 #1 di 23. jan 15:23:42 cet 2007 mips unknown unknown gnulinux + +Author='' +Date='$Date' +Header='' +Id='$Id' +Locker='' +Log='$Log' +Mcc='Mcc' +RCSfile='$RCSfile' +Revision='$Revision' +Source='' +State='' +_a='.a' +_exe='' +_o='.o' +afs='false' +afsroot='/afs' +alignbytes='8' +ansi2knr='' +aphostname='/bin/hostname' +api_revision='5' +api_subversion='0' +api_version='10' +api_versionstring='5.10.0' +ar='ar' +archlib='' +archlibexp='' +archname64='' +archname='mips-linux-uclibc' +archobjs='' +asctime_r_proto='0' +awk='awk' +baserev='5.0' +bash='' +bin='/usr/bin' +binexp='/usr/bin' +bison='bison' +byacc='byacc' +byteorder='4321' +c='' +castflags='0' +cat='cat' +cc='%%CC%%' +cccdlflags='-fPIC' +ccdlflags='-Wl,-E' +ccflags='%%CFLAGS%%' +ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' +ccname='gcc' +ccsymbols='' +ccversion='' +cf_by='root' +cf_email='root@merope.dev.null' +cf_time='Thu Jan 25 03:12:45 MST 2007' +chgrp='' +chmod='chmod' +chown='' +clocktype='clock_t' +comm='comm' +compress='' +contains='grep' +cp='cp' +cpio='' +cpp='cpp' +cpp_stuff='42' +cppccsymbols='' +cppflags='%%CFLAGS%%' +cpplast='-' +cppminus='-' +cpprun='%%CPP%%' +cppstdin='%%CPP%%' +cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 LANGUAGE_C=1 _LANGUAGE_C=1 __LANGUAGE_C=1 __LANGUAGE_C__=1 _LARGEFILE_SOURCE=1 MIPSEL=1 _MIPSEL=1 __MIPSEL=1 __MIPSEL__=1 _MIPS_FPSET=16 _MIPS_ISA=_MIPS_ISA_MIPS1 _MIPS_SIM=1 _MIPS_SZINT=32 _MIPS_SZLONG=32 _MIPS_SZPTR=32 __PIC__=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 R3000=1 _R3000=1 __R3000=1 __R3000__=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 mips=1 _mips=1 __mips=1 __mips__=1 __pic__=1 unix=1 __unix=1 __unix__=1' +crypt_r_proto='0' +cryptlib='' +csh='csh' +ctermid_r_proto='0' +ctime_r_proto='0' +d_Gconvert='sprintf((b),"%.*g",(n),(x))' +d_PRIEUldbl='define' +d_PRIFUldbl='define' +d_PRIGUldbl='define' +d_PRIXU64='define' +d_PRId64='define' +d_PRIeldbl='define' +d_PRIfldbl='define' +d_PRIgldbl='define' +d_PRIi64='define' +d_PRIo64='define' +d_PRIu64='define' +d_PRIx64='define' +d_SCNfldbl='define' +d__fwalk='undef' +d_access='define' +d_accessx='undef' +d_aintl='undef' +d_alarm='define' +d_archlib='undef' +d_asctime_r='undef' +d_atolf='undef' +d_atoll='define' +d_attribute_format='define' +d_attribute_malloc='define' +d_attribute_nonnull='define' +d_attribute_noreturn='define' +d_attribute_pure='define' +d_attribute_unused='define' +d_attribute_warn_unused_result='define' +d_bcmp='define' +d_bcopy='define' +d_bsd='undef' +d_bsdgetpgrp='undef' +d_bsdsetpgrp='undef' +d_builtin_choose_expr='define' +d_builtin_expect='undef' +d_bzero='define' +d_c99_variadic_macros='define' +d_casti32='define' +d_castneg='define' +d_charvspr='undef' +d_chown='define' +d_chroot='define' +d_chsize='undef' +d_class='undef' +d_clearenv='define' +d_closedir='define' +d_cmsghdr_s='define' +d_const='define' +d_copysignl='undef' +d_cplusplus='undef' +d_crypt='define' +d_crypt_r='undef' +d_csh='undef' +d_ctermid='define' +d_ctermid_r='undef' +d_ctime_r='undef' +d_cuserid='define' +d_dbl_dig='define' +d_dbminitproto='undef' +d_difftime='define' +d_dir_dd_fd='undef' +d_dirfd='define' +d_dirnamlen='undef' +d_dlerror='define' +d_dlopen='define' +d_dlsymun='undef' +d_dosuid='undef' +d_drand48_r='undef' +d_drand48proto='define' +d_dup2='define' +d_eaccess='undef' +d_endgrent='define' +d_endgrent_r='undef' +d_endhent='define' +d_endhostent_r='undef' +d_endnent='define' +d_endnetent_r='undef' +d_endpent='define' +d_endprotoent_r='undef' +d_endpwent='define' +d_endpwent_r='undef' +d_endsent='define' +d_endservent_r='undef' +d_eofnblk='define' +d_eunice='undef' +d_faststdio='undef' +d_fchdir='define' +d_fchmod='define' +d_fchown='define' +d_fcntl='define' +d_fcntl_can_lock='define' +d_fd_macros='define' +d_fd_set='define' +d_fds_bits='undef' +d_fgetpos='define' +d_finite='define' +d_finitel='undef' +d_flexfnam='define' +d_flock='define' +d_flockproto='define' +d_fork='define' +d_fp_class='undef' +d_fpathconf='define' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' +d_fpos64_t='undef' +d_frexpl='undef' +d_fs_data_s='undef' +d_fseeko='define' +d_fsetpos='define' +d_fstatfs='define' +d_fstatvfs='define' +d_fsync='define' +d_ftello='define' +d_ftime='undef' +d_futimes='undef' +d_getcwd='define' +d_getespwnam='undef' +d_getfsstat='undef' +d_getgrent='define' +d_getgrent_r='undef' +d_getgrgid_r='undef' +d_getgrnam_r='undef' +d_getgrps='define' +d_gethbyaddr='define' +d_gethbyname='define' +d_gethent='define' +d_gethname='define' +d_gethostbyaddr_r='undef' +d_gethostbyname_r='undef' +d_gethostent_r='undef' +d_gethostprotos='define' +d_getitimer='define' +d_getlogin='define' +d_getlogin_r='undef' +d_getmnt='undef' +d_getmntent='define' +d_getnbyaddr='define' +d_getnbyname='define' +d_getnent='define' +d_getnetbyaddr_r='undef' +d_getnetbyname_r='undef' +d_getnetent_r='undef' +d_getnetprotos='define' +d_getpagsz='define' +d_getpbyname='define' +d_getpbynumber='define' +d_getpent='define' +d_getpgid='define' +d_getpgrp2='undef' +d_getpgrp='define' +d_getppid='define' +d_getprior='define' +d_getprotobyname_r='undef' +d_getprotobynumber_r='undef' +d_getprotoent_r='undef' +d_getprotoprotos='define' +d_getprpwnam='undef' +d_getpwent='define' +d_getpwent_r='undef' +d_getpwnam_r='undef' +d_getpwuid_r='undef' +d_getsbyname='define' +d_getsbyport='define' +d_getsent='define' +d_getservbyname_r='undef' +d_getservbyport_r='undef' +d_getservent_r='undef' +d_getservprotos='define' +d_getspnam='define' +d_getspnam_r='undef' +d_gettimeod='define' +d_gmtime_r='undef' +d_gnulibc='undef' +d_grpasswd='define' +d_hasmntopt='define' +d_htonl='define' +d_ilogbl='undef' +d_inc_version_list='undef' +d_index='undef' +d_inetaton='define' +d_int64_t='define' +d_isascii='define' +d_isfinite='undef' +d_isinf='define' +d_isnan='define' +d_isnanl='undef' +d_killpg='define' +d_lchown='define' +d_ldbl_dig='define' +d_libm_lib_version='define' +d_link='define' +d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' +d_locconv='define' +d_lockf='define' +d_longdbl='define' +d_longlong='define' +d_lseekproto='define' +d_lstat='define' +d_madvise='define' +d_malloc_good_size='undef' +d_malloc_size='undef' +d_mblen='define' +d_mbstowcs='define' +d_mbtowc='define' +d_memchr='define' +d_memcmp='define' +d_memcpy='define' +d_memmove='define' +d_memset='define' +d_mkdir='define' +d_mkdtemp='define' +d_mkfifo='define' +d_mkstemp='define' +d_mkstemps='undef' +d_mktime='define' +d_mmap='define' +d_modfl='undef' +d_modfl_pow32_bug='undef' +d_modflproto='undef' +d_mprotect='define' +d_msg='define' +d_msg_ctrunc='define' +d_msg_dontroute='define' +d_msg_oob='define' +d_msg_peek='define' +d_msg_proxy='define' +d_msgctl='define' +d_msgget='define' +d_msghdr_s='define' +d_msgrcv='define' +d_msgsnd='define' +d_msync='define' +d_munmap='define' +d_mymalloc='undef' +d_nice='define' +d_nl_langinfo='define' +d_nv_preserves_uv='define' +d_nv_zero_is_allbits_zero='define' +d_off64_t='undef' +d_old_pthread_create_joinable='undef' +d_oldpthreads='undef' +d_oldsock='undef' +d_open3='define' +d_pathconf='define' +d_pause='define' +d_perl_otherlibdirs='undef' +d_phostname='undef' +d_pipe='define' +d_poll='define' +d_portable='define' +d_printf_format_null='define' +d_procselfexe='define' +d_pseudofork='undef' +d_pthread_atfork='undef' +d_pthread_attr_setscope='define' +d_pthread_yield='undef' +d_pwage='undef' +d_pwchange='undef' +d_pwclass='undef' +d_pwcomment='undef' +d_pwexpire='undef' +d_pwgecos='define' +d_pwpasswd='define' +d_pwquota='undef' +d_qgcvt='undef' +d_quad='define' +d_random_r='undef' +d_readdir64_r='undef' +d_readdir='define' +d_readdir_r='undef' +d_readlink='define' +d_readv='define' +d_recvmsg='define' +d_rename='define' +d_rewinddir='define' +d_rmdir='define' +d_safebcpy='undef' +d_safemcpy='undef' +d_sanemcmp='define' +d_sbrkproto='define' +d_scalbnl='undef' +d_sched_yield='define' +d_scm_rights='define' +d_seekdir='define' +d_select='define' +d_sem='define' +d_semctl='define' +d_semctl_semid_ds='define' +d_semctl_semun='define' +d_semget='define' +d_semop='define' +d_sendmsg='define' +d_setegid='define' +d_seteuid='define' +d_setgrent='define' +d_setgrent_r='undef' +d_setgrps='define' +d_sethent='define' +d_sethostent_r='undef' +d_setitimer='define' +d_setlinebuf='define' +d_setlocale='define' +d_setlocale_r='undef' +d_setnent='define' +d_setnetent_r='undef' +d_setpent='define' +d_setpgid='define' +d_setpgrp2='undef' +d_setpgrp='define' +d_setprior='define' +d_setproctitle='undef' +d_setprotoent_r='undef' +d_setpwent='define' +d_setpwent_r='undef' +d_setregid='define' +d_setresgid='define' +d_setresuid='define' +d_setreuid='define' +d_setrgid='undef' +d_setruid='undef' +d_setsent='define' +d_setservent_r='undef' +d_setsid='define' +d_setvbuf='define' +d_sfio='undef' +d_shm='define' +d_shmat='define' +d_shmatprototype='define' +d_shmctl='define' +d_shmdt='define' +d_shmget='define' +d_sigaction='define' +d_signbit='undef' +d_sigprocmask='define' +d_sigsetjmp='define' +d_sitearch='define' +d_snprintf='define' +d_sockatmark='undef' +d_sockatmarkproto='undef' +d_socket='define' +d_socklen_t='define' +d_sockpair='define' +d_socks5_init='undef' +d_sprintf_returns_strlen='define' +d_sqrtl='undef' +d_srand48_r='undef' +d_srandom_r='undef' +d_sresgproto='undef' +d_sresuproto='undef' +d_statblks='define' +d_statfs_f_flags='undef' +d_statfs_s='define' +d_statvfs='define' +d_stdio_cnt_lval='undef' +d_stdio_ptr_lval='undef' +d_stdio_ptr_lval_nochange_cnt='undef' +d_stdio_ptr_lval_sets_cnt='undef' +d_stdio_stream_array='undef' +d_stdiobase='undef' +d_stdstdio='undef' +d_strchr='define' +d_strcoll='define' +d_strctcpy='define' +d_strerrm='strerror(e)' +d_strerror='define' +d_strerror_r='undef' +d_strftime='define' +d_strlcat='define' +d_strlcpy='define' +d_strtod='define' +d_strtol='define' +d_strtold='define' +d_strtoll='define' +d_strtoq='define' +d_strtoul='define' +d_strtoull='define' +d_strtouq='define' +d_strxfrm='define' +d_suidsafe='undef' +d_symlink='define' +d_syscall='define' +d_syscallproto='define' +d_sysconf='define' +d_sysernlst='' +d_syserrlst='undef' +d_system='define' +d_tcgetpgrp='define' +d_tcsetpgrp='define' +d_telldir='define' +d_telldirproto='define' +d_time='define' +d_times='define' +d_tm_tm_gmtoff='define' +d_tm_tm_zone='define' +d_tmpnam_r='undef' +d_truncate='define' +d_ttyname_r='undef' +d_tzname='define' +d_u32align='undef' +d_ualarm='define' +d_umask='define' +d_uname='define' +d_union_semun='undef' +d_unordered='undef' +d_unsetenv='define' +d_usleep='define' +d_usleepproto='define' +d_ustat='define' +d_vendorarch='undef' +d_vendorbin='undef' +d_vendorlib='undef' +d_vendorscript='undef' +d_vfork='undef' +d_void_closedir='undef' +d_voidsig='define' +d_voidtty='' +d_volatile='define' +d_vprintf='define' +d_vsnprintf='define' +d_wait4='define' +d_waitpid='define' +d_wcstombs='define' +d_wctomb='define' +d_writev='define' +d_xenix='undef' +date='date' +db_hashtype='u_int32_t' +db_prefixtype='size_t' +db_version_major='' +db_version_minor='' +db_version_patch='' +defvoidused='15' +direntrytype='struct dirent' +dlext='so' +dlsrc='dl_dlopen.xs' +doublesize='8' +drand01='drand48()' +drand48_r_proto='0' +dynamic_ext='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +eagain='EAGAIN' +ebcdic='undef' +echo='echo' +egrep='egrep' +emacs='' +endgrent_r_proto='0' +endhostent_r_proto='0' +endnetent_r_proto='0' +endprotoent_r_proto='0' +endpwent_r_proto='0' +endservent_r_proto='0' +eunicefix=':' +exe_ext='' +expr='expr' +extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +extras='' +fflushNULL='define' +fflushall='undef' +find='' +firstmakefile='makefile' +flex='' +fpossize='24' +fpostype='fpos_t' +freetype='void' +from=':' +full_ar='%%AR%%' +full_csh='csh' +full_sed='sed' +gccansipedantic='' +gccosandvers='' +gccversion='3.4.3' +getgrent_r_proto='0' +getgrgid_r_proto='0' +getgrnam_r_proto='0' +gethostbyaddr_r_proto='0' +gethostbyname_r_proto='0' +gethostent_r_proto='0' +getlogin_r_proto='0' +getnetbyaddr_r_proto='0' +getnetbyname_r_proto='0' +getnetent_r_proto='0' +getprotobyname_r_proto='0' +getprotobynumber_r_proto='0' +getprotoent_r_proto='0' +getpwent_r_proto='0' +getpwnam_r_proto='0' +getpwuid_r_proto='0' +getservbyname_r_proto='0' +getservbyport_r_proto='0' +getservent_r_proto='0' +getspnam_r_proto='0' +gidformat='"lu"' +gidsign='1' +gidsize='4' +gidtype='gid_t' +glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib ' +gmake='gmake' +gmtime_r_proto='0' +gnulibc_version='' +grep='grep' +groupcat='cat /etc/group' +groupstype='gid_t' +gzip='gzip' +h_fcntl='false' +h_sysfile='true' +hint='recommended' +hostcat='cat /etc/hosts' +html1dir=' ' +html1direxp='' +html3dir=' ' +html3direxp='' +i16size='2' +i16type='short' +i32size='4' +i32type='long' +i64size='8' +i64type='long long' +i8size='1' +i8type='char' +i_arpainet='define' +i_bsdioctl='' +i_crypt='define' +i_db='define' +i_dbm='undef' +i_dirent='define' +i_dld='undef' +i_dlfcn='define' +i_fcntl='undef' +i_float='define' +i_fp='undef' +i_fp_class='undef' +i_gdbm='define' +i_grp='define' +i_ieeefp='undef' +i_inttypes='define' +i_langinfo='define' +i_libutil='undef' +i_limits='define' +i_locale='define' +i_machcthr='undef' +i_malloc='define' +i_math='define' +i_memory='undef' +i_mntent='define' +i_ndbm='undef' +i_netdb='define' +i_neterrno='undef' +i_netinettcp='define' +i_niin='define' +i_poll='define' +i_prot='undef' +i_pthread='define' +i_pwd='define' +i_rpcsvcdbm='undef' +i_sfio='undef' +i_sgtty='undef' +i_shadow='define' +i_socks='undef' +i_stdarg='define' +i_stddef='define' +i_stdlib='define' +i_string='define' +i_sunmath='undef' +i_sysaccess='undef' +i_sysdir='define' +i_sysfile='define' +i_sysfilio='undef' +i_sysin='undef' +i_sysioctl='define' +i_syslog='define' +i_sysmman='define' +i_sysmode='undef' +i_sysmount='define' +i_sysndir='undef' +i_sysparam='define' +i_sysresrc='define' +i_syssecrt='undef' +i_sysselct='define' +i_syssockio='undef' +i_sysstat='define' +i_sysstatfs='define' +i_sysstatvfs='define' +i_systime='define' +i_systimek='undef' +i_systimes='define' +i_systypes='define' +i_sysuio='define' +i_sysun='define' +i_sysutsname='define' +i_sysvfs='define' +i_syswait='define' +i_termio='undef' +i_termios='define' +i_time='define' +i_unistd='define' +i_ustat='define' +i_utime='define' +i_values='define' +i_varargs='undef' +i_varhdr='stdarg.h' +i_vfork='undef' +ignore_versioned_solibs='y' +inc_version_list=' ' +inc_version_list_init='0' +incpath='' +inews='' +installarchlib='/usr/lib/perl5/5.10' +installbin='/usr/bin' +initialinstalllocation='/usr/bin' +installhtml1dir='' +installhtml3dir='' +installman1dir='' +installman3dir='' +installprefix='/usr' +installprefixexp='/usr' +installprivlib='/usr/lib/perl5/5.10' +installscript='/usr/bin' +installsitearch='/usr/lib/perl5/5.10' +installsitebin='/usr/bin' +installsitehtml1dir='' +installsitehtml3dir='' +installsitelib='/usr/lib/perl5/5.10' +installsiteman1dir='' +installsiteman3dir='' +installsitescript='/usr/bin' +installstyle='lib/perl5' +installusrbinperl='define' +installvendorarch='' +installvendorbin='' +installvendorhtml1dir='' +installvendorhtml3dir='' +installvendorlib='' +installvendorman1dir='' +installvendorman3dir='' +installvendorscript='' +intsize='4' +issymlink='test -h' +ivdformat='"ld"' +ivsize='4' +ivtype='long' +known_extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +ksh='' +ld='%%LD%%' +lddlflags='-shared %%LDFLAGS%%' +ldflags='' +ldflags_uselargefiles='' +ldlibpthname='LD_LIBRARY_PATH' +less='less' +lib_ext='.a' +libc='' +libperl='libperl.a' +libpth='%%LIBDIRS%%' +libs='-lgdbm -ldb -lnsl -ldl -lm -lcrypt -lutil -lc' +libsdirs='%%LIBDIRS%%' +libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libc.so' +#libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so' +libspath='%%LIBDIRS%%' +libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD' +libswanted_uselargefiles='' +line='' +lint='' +lkflags='' +ln='ln' +lns='/bin/ln -s' +localtime_r_proto='0' +locincpth=' ' +loclibpth=' ' +longdblsize='8' +longlongsize='8' +longsize='4' +lp='' +lpr='' +ls='ls' +lseeksize='8' +lseektype='off_t' +mad='undef' +madlyh='' +madlyobj='' +madlysrc='' +mail='' +mailx='' +make='make' +make_set_make='#' +mallocobj='' +mallocsrc='' +malloctype='void *' +man1dir=' ' +man1direxp='' +man1ext='0' +man3dir=' ' +man3direxp='' +man3ext='0' +mips_type='' +mistrustnm='' +mkdir='mkdir' +mmaptype='void *' +modetype='mode_t' +more='more' +multiarch='undef' +mv='' +myarchname='mips-linux-uclibc' +mydomain='.dev.null' +myhostname='merope' +myuname='linux merope 2.4.30 #1 di 23. jan 15:23:42 cet 2007 mips unknown unknown gnulinux ' +n='-n' +need_va_copy='undef' +netdb_hlen_type='size_t' +netdb_host_type='const void *' +netdb_name_type='const char *' +netdb_net_type='in_addr_t' +nm='nm' +nm_opt='' +nm_so_opt='--dynamic' +nonxs_ext='Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +nroff='nroff' +nvEUformat='"E"' +nvFUformat='"F"' +nvGUformat='"G"' +nv_preserves_uv_bits='32' +nveformat='"e"' +nvfformat='"f"' +nvgformat='"g"' +nvsize='8' +nvtype='double' +o_nonblock='O_NONBLOCK' +obj_ext='.o' +old_pthread_create_joinable='' +optimize='-O2' +orderlib='false' +osname='linux' +osvers='2.4.30' +otherlibdirs=' ' +package='perl5' +pager='/usr/bin/less' +passcat='cat /etc/passwd' +patchlevel='10' +path_sep=':' +perl5='' +perl='' +perl_patchlevel='' +perladmin='root@merope.dev.null' +perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc' +perlpath='/usr/bin/perl' +pg='pg' +phostname='hostname' +pidtype='pid_t' +plibpth='' +pmake='' +pr='' +prefix='/usr' +prefixexp='/usr' +privlib='/usr/lib/perl5/5.10' +privlibexp='/usr/lib/perl5/5.10' +procselfexe='"/proc/self/exe"' +prototype='define' +ptrsize='4' +quadkind='3' +quadtype='long long' +randbits='48' +randfunc='drand48' +random_r_proto='0' +randseedtype='long' +ranlib=':' +rd_nodata='-1' +readdir64_r_proto='0' +readdir_r_proto='0' +revision='5' +rm='rm' +rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*' +rmail='' +run='' +runnm='false' +sPRIEUldbl='"E"' +sPRIFUldbl='"F"' +sPRIGUldbl='"G"' +sPRIXU64='"LX"' +sPRId64='"Ld"' +sPRIeldbl='"e"' +sPRIfldbl='"f"' +sPRIgldbl='"g"' +sPRIi64='"Li"' +sPRIo64='"Lo"' +sPRIu64='"Lu"' +sPRIx64='"Lx"' +sSCNfldbl='"f"' +sched_yield='sched_yield()' +scriptdir='/usr/bin' +scriptdirexp='/usr/bin' +sed='sed' +seedfunc='srand48' +selectminbits='32' +selecttype='fd_set *' +sendmail='' +setgrent_r_proto='0' +sethostent_r_proto='0' +setlocale_r_proto='0' +setnetent_r_proto='0' +setprotoent_r_proto='0' +setpwent_r_proto='0' +setservent_r_proto='0' +sh='/bin/sh' +shar='' +sharpbang='#!' +shmattype='void *' +shortsize='2' +shrpenv='' +shsharp='true' +sig_count='128' +sig_name='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ RTMIN NUM33 NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 NUM63 NUM64 NUM65 NUM66 NUM67 NUM68 NUM69 NUM70 NUM71 NUM72 NUM73 NUM74 NUM75 NUM76 NUM77 NUM78 NUM79 NUM80 NUM81 NUM82 NUM83 NUM84 NUM85 NUM86 NUM87 NUM88 NUM89 NUM90 NUM91 NUM92 NUM93 NUM94 NUM95 NUM96 NUM97 NUM98 NUM99 NUM100 NUM101 NUM102 NUM103 NUM104 NUM105 NUM106 NUM107 NUM108 NUM109 NUM110 NUM111 NUM112 NUM113 NUM114 NUM115 NUM116 NUM117 NUM118 NUM119 NUM120 NUM121 NUM122 NUM123 NUM124 NUM125 NUM126 RTMAX IOT CLD POLL ' +sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "EMT", "FPE", "KILL", "BUS", "SEGV", "SYS", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "PWR", "WINCH", "URG", "IO", "STOP", "TSTP", "CONT", "TTIN", "TTOU", "VTALRM", "PROF", "XCPU", "XFSZ", "RTMIN", "NUM33", "NUM34", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "NUM63", "NUM64", "NUM65", "NUM66", "NUM67", "NUM68", "NUM69", "NUM70", "NUM71", "NUM72", "NUM73", "NUM74", "NUM75", "NUM76", "NUM77", "NUM78", "NUM79", "NUM80", "NUM81", "NUM82", "NUM83", "NUM84", "NUM85", "NUM86", "NUM87", "NUM88", "NUM89", "NUM90", "NUM91", "NUM92", "NUM93", "NUM94", "NUM95", "NUM96", "NUM97", "NUM98", "NUM99", "NUM100", "NUM101", "NUM102", "NUM103", "NUM104", "NUM105", "NUM106", "NUM107", "NUM108", "NUM109", "NUM110", "NUM 111", "NUM112", "NUM113", "NUM114", "NUM115", "NUM116", "NUM117", "NUM118", "NUM119", "NUM120", "NUM121", "NUM122", "NUM123", "NUM124", "NUM125", "NUM126", "RTMAX", "IOT", "CLD", "POLL", 0' +sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 6 18 22 ' +sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 6, 18, 22, 0' +sig_size='131' +signal_t='void' +sitearch='' +sitearchexp='' +sitebin='/usr/bin' +sitebinexp='/usr/bin' +sitehtml1dir='' +sitehtml1direxp='' +sitehtml3dir='' +sitehtml3direxp='' +sitelib='' +#sitelib_stem='/usr/lib/perl5/site_perl' +sitelibexp='' +siteman1dir='' +siteman1direxp='' +siteman3dir='' +siteman3direxp='' +siteprefix='/usr' +siteprefixexp='/usr' +sitescript='/usr/bin' +sitescriptexp='/usr/bin' +sizesize='4' +sizetype='size_t' +sleep='' +smail='' +so='so' +sockethdr='' +socketlib='' +socksizetype='socklen_t' +sort='sort' +spackage='Perl5' +spitshell='cat' +srand48_r_proto='0' +srandom_r_proto='0' +src='.' +ssizetype='ssize_t' +startperl='#!/usr/bin/perl' +startsh='#!/bin/sh' +static_ext=' ' +stdchar='char' +stdio_base='((fp)->_base)' +stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)' +stdio_cnt='((fp)->_cnt)' +stdio_filbuf='' +stdio_ptr='((fp)->_ptr)' +stdio_stream_array='' +strerror_r_proto='0' +#strings='/usr/include/string.h' +submit='' +subversion='0' +sysman='/usr/share/man/man1' +tail='' +tar='' +targetarch='mips-linux-uclibc' +tbl='' +tee='' +test='test' +#timeincl='/usr/include/sys/time.h /usr/include/time.h ' +timetype='time_t' +tmpnam_r_proto='0' +to=':' +touch='touch' +tr='tr' +trnl='\n' +troff='' +ttyname_r_proto='0' +u16size='2' +u16type='unsigned short' +u32size='4' +u32type='unsigned long' +u64size='8' +u64type='unsigned long long' +u8size='1' +u8type='unsigned char' +uidformat='"lu"' +uidsign='1' +uidsize='4' +uidtype='uid_t' +uname='uname' +uniq='uniq' +uquadtype='unsigned long long' +use5005threads='undef' +use64bitall='undef' +use64bitint='undef' +usecrosscompile='define' +usedl='define' +usefaststdio='undef' +useithreads='undef' +uselargefiles='define' +uselongdouble='undef' +usemallocwrap='define' +usemorebits='undef' +usemultiplicity='undef' +usemymalloc='n' +usenm='true' +useopcode='true' +useperlio='define' +useposix='true' +usereentrant='undef' +userelocatableinc='undef' +usesfio='false' +useshrplib='false' +usesitecustomize='undef' +usesocks='undef' +usethreads='undef' +usevendorprefix='undef' +usevfork='false' +usrinc='%%INCDIRS%%' +uuname='' +uvXUformat='"lX"' +uvoformat='"lo"' +uvsize='4' +uvtype='unsigned long' +uvuformat='"lu"' +uvxformat='"lx"' +vendorarch='' +vendorarchexp='' +vendorbin='' +vendorbinexp='' +vendorhtml1dir=' ' +vendorhtml1direxp='' +vendorhtml3dir=' ' +vendorhtml3direxp='' +vendorlib='' +vendorlib_stem='' +vendorlibexp='' +vendorman1dir=' ' +vendorman1direxp='' +vendorman3dir=' ' +vendorman3direxp='' +vendorprefix='' +vendorprefixexp='' +vendorscript='' +vendorscriptexp='' +version='5.10.0' +version_patchlevel_string='version 10 subversion 0' +versiononly='undef' +vi='' +voidflags='15' +xlibpth='/usr/lib/386 /lib/386' +yacc='yacc' +yaccflags='' +zcat='' +zip='zip' +# Configure command line arguments. +config_arg0='./Configure' +config_args='-der' +config_argc=1 +config_arg1='-der' +PERL_REVISION=5 +PERL_VERSION=10 +PERL_SUBVERSION=0 +PERL_API_REVISION=5 +PERL_API_VERSION=10 +PERL_API_SUBVERSION=0 +PERL_PATCHLEVEL= +PERL_CONFIG_SH=true +# Fix problem with HiRes timer. +d_nanosleep='define' +d_clock_gettime='define' +d_clock_getres='define' +d_clock_nanosleep='define' +d_clock='define' diff --git a/lang/perl/files/config.sh-mipsel.in b/lang/perl/files/config.sh-mipsel.in new file mode 100644 index 0000000..f1ecfdc --- /dev/null +++ b/lang/perl/files/config.sh-mipsel.in @@ -0,0 +1,1068 @@ +#!/bin/sh +# +# This file was produced by running the Configure script. It holds all the +# definitions figured out by Configure. Should you modify one of these values, +# do not forget to propagate your changes by running "Configure -der". You may +# instead choose to run each of the .SH files by yourself, or "Configure -S". +# + +# Package name : perl5 +# Source directory : . +# Configuration time: Thu Jan 25 03:12:45 MST 2007 +# Configured by : root +# Target system : linux merope 2.4.30 #1 di 23. jan 15:23:42 cet 2007 mips unknown unknown gnulinux + +Author='' +Date='$Date' +Header='' +Id='$Id' +Locker='' +Log='$Log' +Mcc='Mcc' +RCSfile='$RCSfile' +Revision='$Revision' +Source='' +State='' +_a='.a' +_exe='' +_o='.o' +afs='false' +afsroot='/afs' +alignbytes='8' +ansi2knr='' +aphostname='/bin/hostname' +api_revision='5' +api_subversion='0' +api_version='10' +api_versionstring='5.10.0' +ar='ar' +archlib='' +archlibexp='' +archname64='' +archname='mipsel-linux-uclibc' +archobjs='' +asctime_r_proto='0' +awk='awk' +baserev='5.0' +bash='' +bin='/usr/bin' +binexp='/usr/bin' +bison='bison' +byacc='byacc' +byteorder='1234' +c='' +castflags='0' +cat='cat' +cc='%%CC%%' +cccdlflags='-fPIC' +ccdlflags='-Wl,-E' +ccflags='%%CFLAGS%%' +ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' +ccname='gcc' +ccsymbols='' +ccversion='' +cf_by='root' +cf_email='root@merope.dev.null' +cf_time='Thu Jan 25 03:12:45 MST 2007' +chgrp='' +chmod='chmod' +chown='' +clocktype='clock_t' +comm='comm' +compress='' +contains='grep' +cp='cp' +cpio='' +cpp='cpp' +cpp_stuff='42' +cppccsymbols='' +cppflags='%%CFLAGS%%' +cpplast='-' +cppminus='-' +cpprun='%%CPP%%' +cppstdin='%%CPP%%' +cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 LANGUAGE_C=1 _LANGUAGE_C=1 __LANGUAGE_C=1 __LANGUAGE_C__=1 _LARGEFILE_SOURCE=1 MIPSEL=1 _MIPSEL=1 __MIPSEL=1 __MIPSEL__=1 _MIPS_FPSET=16 _MIPS_ISA=_MIPS_ISA_MIPS1 _MIPS_SIM=1 _MIPS_SZINT=32 _MIPS_SZLONG=32 _MIPS_SZPTR=32 __PIC__=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 R3000=1 _R3000=1 __R3000=1 __R3000__=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 mips=1 _mips=1 __mips=1 __mips__=1 __pic__=1 unix=1 __unix=1 __unix__=1' +crypt_r_proto='0' +cryptlib='' +csh='csh' +ctermid_r_proto='0' +ctime_r_proto='0' +d_Gconvert='sprintf((b),"%.*g",(n),(x))' +d_PRIEUldbl='define' +d_PRIFUldbl='define' +d_PRIGUldbl='define' +d_PRIXU64='define' +d_PRId64='define' +d_PRIeldbl='define' +d_PRIfldbl='define' +d_PRIgldbl='define' +d_PRIi64='define' +d_PRIo64='define' +d_PRIu64='define' +d_PRIx64='define' +d_SCNfldbl='define' +d__fwalk='undef' +d_access='define' +d_accessx='undef' +d_aintl='undef' +d_alarm='define' +d_archlib='undef' +d_asctime_r='undef' +d_atolf='undef' +d_atoll='define' +d_attribute_format='define' +d_attribute_malloc='define' +d_attribute_nonnull='define' +d_attribute_noreturn='define' +d_attribute_pure='define' +d_attribute_unused='define' +d_attribute_warn_unused_result='define' +d_bcmp='define' +d_bcopy='define' +d_bsd='undef' +d_bsdgetpgrp='undef' +d_bsdsetpgrp='undef' +d_builtin_choose_expr='define' +d_builtin_expect='undef' +d_bzero='define' +d_c99_variadic_macros='define' +d_casti32='define' +d_castneg='define' +d_charvspr='undef' +d_chown='define' +d_chroot='define' +d_chsize='undef' +d_class='undef' +d_clearenv='define' +d_closedir='define' +d_cmsghdr_s='define' +d_const='define' +d_copysignl='undef' +d_cplusplus='undef' +d_crypt='define' +d_crypt_r='undef' +d_csh='undef' +d_ctermid='define' +d_ctermid_r='undef' +d_ctime_r='undef' +d_cuserid='define' +d_dbl_dig='define' +d_dbminitproto='undef' +d_difftime='define' +d_dir_dd_fd='undef' +d_dirfd='define' +d_dirnamlen='undef' +d_dlerror='define' +d_dlopen='define' +d_dlsymun='undef' +d_dosuid='undef' +d_drand48_r='undef' +d_drand48proto='define' +d_dup2='define' +d_eaccess='undef' +d_endgrent='define' +d_endgrent_r='undef' +d_endhent='define' +d_endhostent_r='undef' +d_endnent='define' +d_endnetent_r='undef' +d_endpent='define' +d_endprotoent_r='undef' +d_endpwent='define' +d_endpwent_r='undef' +d_endsent='define' +d_endservent_r='undef' +d_eofnblk='define' +d_eunice='undef' +d_faststdio='undef' +d_fchdir='define' +d_fchmod='define' +d_fchown='define' +d_fcntl='define' +d_fcntl_can_lock='define' +d_fd_macros='define' +d_fd_set='define' +d_fds_bits='undef' +d_fgetpos='define' +d_finite='define' +d_finitel='undef' +d_flexfnam='define' +d_flock='define' +d_flockproto='define' +d_fork='define' +d_fp_class='undef' +d_fpathconf='define' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' +d_fpos64_t='undef' +d_frexpl='undef' +d_fs_data_s='undef' +d_fseeko='define' +d_fsetpos='define' +d_fstatfs='define' +d_fstatvfs='define' +d_fsync='define' +d_ftello='define' +d_ftime='undef' +d_futimes='undef' +d_getcwd='define' +d_getespwnam='undef' +d_getfsstat='undef' +d_getgrent='define' +d_getgrent_r='undef' +d_getgrgid_r='undef' +d_getgrnam_r='undef' +d_getgrps='define' +d_gethbyaddr='define' +d_gethbyname='define' +d_gethent='define' +d_gethname='define' +d_gethostbyaddr_r='undef' +d_gethostbyname_r='undef' +d_gethostent_r='undef' +d_gethostprotos='define' +d_getitimer='define' +d_getlogin='define' +d_getlogin_r='undef' +d_getmnt='undef' +d_getmntent='define' +d_getnbyaddr='define' +d_getnbyname='define' +d_getnent='define' +d_getnetbyaddr_r='undef' +d_getnetbyname_r='undef' +d_getnetent_r='undef' +d_getnetprotos='define' +d_getpagsz='define' +d_getpbyname='define' +d_getpbynumber='define' +d_getpent='define' +d_getpgid='define' +d_getpgrp2='undef' +d_getpgrp='define' +d_getppid='define' +d_getprior='define' +d_getprotobyname_r='undef' +d_getprotobynumber_r='undef' +d_getprotoent_r='undef' +d_getprotoprotos='define' +d_getprpwnam='undef' +d_getpwent='define' +d_getpwent_r='undef' +d_getpwnam_r='undef' +d_getpwuid_r='undef' +d_getsbyname='define' +d_getsbyport='define' +d_getsent='define' +d_getservbyname_r='undef' +d_getservbyport_r='undef' +d_getservent_r='undef' +d_getservprotos='define' +d_getspnam='define' +d_getspnam_r='undef' +d_gettimeod='define' +d_gmtime_r='undef' +d_gnulibc='undef' +d_grpasswd='define' +d_hasmntopt='define' +d_htonl='define' +d_ilogbl='undef' +d_inc_version_list='undef' +d_index='undef' +d_inetaton='define' +d_int64_t='define' +d_isascii='define' +d_isfinite='undef' +d_isinf='define' +d_isnan='define' +d_isnanl='undef' +d_killpg='define' +d_lchown='define' +d_ldbl_dig='define' +d_libm_lib_version='define' +d_link='define' +d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' +d_locconv='define' +d_lockf='define' +d_longdbl='define' +d_longlong='define' +d_lseekproto='define' +d_lstat='define' +d_madvise='define' +d_malloc_good_size='undef' +d_malloc_size='undef' +d_mblen='define' +d_mbstowcs='define' +d_mbtowc='define' +d_memchr='define' +d_memcmp='define' +d_memcpy='define' +d_memmove='define' +d_memset='define' +d_mkdir='define' +d_mkdtemp='define' +d_mkfifo='define' +d_mkstemp='define' +d_mkstemps='undef' +d_mktime='define' +d_mmap='define' +d_modfl='undef' +d_modfl_pow32_bug='undef' +d_modflproto='undef' +d_mprotect='define' +d_msg='define' +d_msg_ctrunc='define' +d_msg_dontroute='define' +d_msg_oob='define' +d_msg_peek='define' +d_msg_proxy='define' +d_msgctl='define' +d_msgget='define' +d_msghdr_s='define' +d_msgrcv='define' +d_msgsnd='define' +d_msync='define' +d_munmap='define' +d_mymalloc='undef' +d_nice='define' +d_nl_langinfo='define' +d_nv_preserves_uv='define' +d_nv_zero_is_allbits_zero='define' +d_off64_t='undef' +d_old_pthread_create_joinable='undef' +d_oldpthreads='undef' +d_oldsock='undef' +d_open3='define' +d_pathconf='define' +d_pause='define' +d_perl_otherlibdirs='undef' +d_phostname='undef' +d_pipe='define' +d_poll='define' +d_portable='define' +d_printf_format_null='define' +d_procselfexe='define' +d_pseudofork='undef' +d_pthread_atfork='undef' +d_pthread_attr_setscope='define' +d_pthread_yield='undef' +d_pwage='undef' +d_pwchange='undef' +d_pwclass='undef' +d_pwcomment='undef' +d_pwexpire='undef' +d_pwgecos='define' +d_pwpasswd='define' +d_pwquota='undef' +d_qgcvt='undef' +d_quad='define' +d_random_r='undef' +d_readdir64_r='undef' +d_readdir='define' +d_readdir_r='undef' +d_readlink='define' +d_readv='define' +d_recvmsg='define' +d_rename='define' +d_rewinddir='define' +d_rmdir='define' +d_safebcpy='undef' +d_safemcpy='undef' +d_sanemcmp='define' +d_sbrkproto='define' +d_scalbnl='undef' +d_sched_yield='define' +d_scm_rights='define' +d_seekdir='define' +d_select='define' +d_sem='define' +d_semctl='define' +d_semctl_semid_ds='define' +d_semctl_semun='define' +d_semget='define' +d_semop='define' +d_sendmsg='define' +d_setegid='define' +d_seteuid='define' +d_setgrent='define' +d_setgrent_r='undef' +d_setgrps='define' +d_sethent='define' +d_sethostent_r='undef' +d_setitimer='define' +d_setlinebuf='define' +d_setlocale='define' +d_setlocale_r='undef' +d_setnent='define' +d_setnetent_r='undef' +d_setpent='define' +d_setpgid='define' +d_setpgrp2='undef' +d_setpgrp='define' +d_setprior='define' +d_setproctitle='undef' +d_setprotoent_r='undef' +d_setpwent='define' +d_setpwent_r='undef' +d_setregid='define' +d_setresgid='define' +d_setresuid='define' +d_setreuid='define' +d_setrgid='undef' +d_setruid='undef' +d_setsent='define' +d_setservent_r='undef' +d_setsid='define' +d_setvbuf='define' +d_sfio='undef' +d_shm='define' +d_shmat='define' +d_shmatprototype='define' +d_shmctl='define' +d_shmdt='define' +d_shmget='define' +d_sigaction='define' +d_signbit='undef' +d_sigprocmask='define' +d_sigsetjmp='define' +d_sitearch='define' +d_snprintf='define' +d_sockatmark='undef' +d_sockatmarkproto='undef' +d_socket='define' +d_socklen_t='define' +d_sockpair='define' +d_socks5_init='undef' +d_sprintf_returns_strlen='define' +d_sqrtl='undef' +d_srand48_r='undef' +d_srandom_r='undef' +d_sresgproto='undef' +d_sresuproto='undef' +d_statblks='define' +d_statfs_f_flags='undef' +d_statfs_s='define' +d_statvfs='define' +d_stdio_cnt_lval='undef' +d_stdio_ptr_lval='undef' +d_stdio_ptr_lval_nochange_cnt='undef' +d_stdio_ptr_lval_sets_cnt='undef' +d_stdio_stream_array='undef' +d_stdiobase='undef' +d_stdstdio='undef' +d_strchr='define' +d_strcoll='define' +d_strctcpy='define' +d_strerrm='strerror(e)' +d_strerror='define' +d_strerror_r='undef' +d_strftime='define' +d_strlcat='define' +d_strlcpy='define' +d_strtod='define' +d_strtol='define' +d_strtold='define' +d_strtoll='define' +d_strtoq='define' +d_strtoul='define' +d_strtoull='define' +d_strtouq='define' +d_strxfrm='define' +d_suidsafe='undef' +d_symlink='define' +d_syscall='define' +d_syscallproto='define' +d_sysconf='define' +d_sysernlst='' +d_syserrlst='undef' +d_system='define' +d_tcgetpgrp='define' +d_tcsetpgrp='define' +d_telldir='define' +d_telldirproto='define' +d_time='define' +d_times='define' +d_tm_tm_gmtoff='define' +d_tm_tm_zone='define' +d_tmpnam_r='undef' +d_truncate='define' +d_ttyname_r='undef' +d_tzname='define' +d_u32align='undef' +d_ualarm='define' +d_umask='define' +d_uname='define' +d_union_semun='undef' +d_unordered='undef' +d_unsetenv='define' +d_usleep='define' +d_usleepproto='define' +d_ustat='define' +d_vendorarch='undef' +d_vendorbin='undef' +d_vendorlib='undef' +d_vendorscript='undef' +d_vfork='undef' +d_void_closedir='undef' +d_voidsig='define' +d_voidtty='' +d_volatile='define' +d_vprintf='define' +d_vsnprintf='define' +d_wait4='define' +d_waitpid='define' +d_wcstombs='define' +d_wctomb='define' +d_writev='define' +d_xenix='undef' +date='date' +db_hashtype='u_int32_t' +db_prefixtype='size_t' +db_version_major='' +db_version_minor='' +db_version_patch='' +defvoidused='15' +direntrytype='struct dirent' +dlext='so' +dlsrc='dl_dlopen.xs' +doublesize='8' +drand01='drand48()' +drand48_r_proto='0' +dynamic_ext='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +eagain='EAGAIN' +ebcdic='undef' +echo='echo' +egrep='egrep' +emacs='' +endgrent_r_proto='0' +endhostent_r_proto='0' +endnetent_r_proto='0' +endprotoent_r_proto='0' +endpwent_r_proto='0' +endservent_r_proto='0' +eunicefix=':' +exe_ext='' +expr='expr' +extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +extras='' +fflushNULL='define' +fflushall='undef' +find='' +firstmakefile='makefile' +flex='' +fpossize='24' +fpostype='fpos_t' +freetype='void' +from=':' +full_ar='%%AR%%' +full_csh='csh' +full_sed='sed' +gccansipedantic='' +gccosandvers='' +gccversion='3.4.3' +getgrent_r_proto='0' +getgrgid_r_proto='0' +getgrnam_r_proto='0' +gethostbyaddr_r_proto='0' +gethostbyname_r_proto='0' +gethostent_r_proto='0' +getlogin_r_proto='0' +getnetbyaddr_r_proto='0' +getnetbyname_r_proto='0' +getnetent_r_proto='0' +getprotobyname_r_proto='0' +getprotobynumber_r_proto='0' +getprotoent_r_proto='0' +getpwent_r_proto='0' +getpwnam_r_proto='0' +getpwuid_r_proto='0' +getservbyname_r_proto='0' +getservbyport_r_proto='0' +getservent_r_proto='0' +getspnam_r_proto='0' +gidformat='"lu"' +gidsign='1' +gidsize='4' +gidtype='gid_t' +glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib ' +gmake='gmake' +gmtime_r_proto='0' +gnulibc_version='' +grep='grep' +groupcat='cat /etc/group' +groupstype='gid_t' +gzip='gzip' +h_fcntl='false' +h_sysfile='true' +hint='recommended' +hostcat='cat /etc/hosts' +html1dir=' ' +html1direxp='' +html3dir=' ' +html3direxp='' +i16size='2' +i16type='short' +i32size='4' +i32type='long' +i64size='8' +i64type='long long' +i8size='1' +i8type='char' +i_arpainet='define' +i_bsdioctl='' +i_crypt='define' +i_db='define' +i_dbm='undef' +i_dirent='define' +i_dld='undef' +i_dlfcn='define' +i_fcntl='undef' +i_float='define' +i_fp='undef' +i_fp_class='undef' +i_gdbm='define' +i_grp='define' +i_ieeefp='undef' +i_inttypes='define' +i_langinfo='define' +i_libutil='undef' +i_limits='define' +i_locale='define' +i_machcthr='undef' +i_malloc='define' +i_math='define' +i_memory='undef' +i_mntent='define' +i_ndbm='undef' +i_netdb='define' +i_neterrno='undef' +i_netinettcp='define' +i_niin='define' +i_poll='define' +i_prot='undef' +i_pthread='define' +i_pwd='define' +i_rpcsvcdbm='undef' +i_sfio='undef' +i_sgtty='undef' +i_shadow='define' +i_socks='undef' +i_stdarg='define' +i_stddef='define' +i_stdlib='define' +i_string='define' +i_sunmath='undef' +i_sysaccess='undef' +i_sysdir='define' +i_sysfile='define' +i_sysfilio='undef' +i_sysin='undef' +i_sysioctl='define' +i_syslog='define' +i_sysmman='define' +i_sysmode='undef' +i_sysmount='define' +i_sysndir='undef' +i_sysparam='define' +i_sysresrc='define' +i_syssecrt='undef' +i_sysselct='define' +i_syssockio='undef' +i_sysstat='define' +i_sysstatfs='define' +i_sysstatvfs='define' +i_systime='define' +i_systimek='undef' +i_systimes='define' +i_systypes='define' +i_sysuio='define' +i_sysun='define' +i_sysutsname='define' +i_sysvfs='define' +i_syswait='define' +i_termio='undef' +i_termios='define' +i_time='define' +i_unistd='define' +i_ustat='define' +i_utime='define' +i_values='define' +i_varargs='undef' +i_varhdr='stdarg.h' +i_vfork='undef' +ignore_versioned_solibs='y' +inc_version_list=' ' +inc_version_list_init='0' +incpath='' +inews='' +installarchlib='/usr/lib/perl5/5.10' +installbin='/usr/bin' +initialinstalllocation='/usr/bin' +installhtml1dir='' +installhtml3dir='' +installman1dir='' +installman3dir='' +installprefix='/usr' +installprefixexp='/usr' +installprivlib='/usr/lib/perl5/5.10' +installscript='/usr/bin' +installsitearch='/usr/lib/perl5/5.10' +installsitebin='/usr/bin' +installsitehtml1dir='' +installsitehtml3dir='' +installsitelib='/usr/lib/perl5/5.10' +installsiteman1dir='' +installsiteman3dir='' +installsitescript='/usr/bin' +installstyle='lib/perl5' +installusrbinperl='define' +installvendorarch='' +installvendorbin='' +installvendorhtml1dir='' +installvendorhtml3dir='' +installvendorlib='' +installvendorman1dir='' +installvendorman3dir='' +installvendorscript='' +intsize='4' +issymlink='test -h' +ivdformat='"ld"' +ivsize='4' +ivtype='long' +known_extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +ksh='' +ld='%%LD%%' +lddlflags='-shared %%LDFLAGS%%' +ldflags='' +ldflags_uselargefiles='' +ldlibpthname='LD_LIBRARY_PATH' +less='less' +lib_ext='.a' +libc='' +libperl='libperl.a' +libpth='%%LIBDIRS%%' +libs='-lgdbm -ldb -lnsl -ldl -lm -lcrypt -lutil -lc' +libsdirs='%%LIBDIRS%%' +libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libc.so' +#libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so' +libspath='%%LIBDIRS%%' +libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD' +libswanted_uselargefiles='' +line='' +lint='' +lkflags='' +ln='ln' +lns='/bin/ln -s' +localtime_r_proto='0' +locincpth=' ' +loclibpth=' ' +longdblsize='8' +longlongsize='8' +longsize='4' +lp='' +lpr='' +ls='ls' +lseeksize='8' +lseektype='off_t' +mad='undef' +madlyh='' +madlyobj='' +madlysrc='' +mail='' +mailx='' +make='make' +make_set_make='#' +mallocobj='' +mallocsrc='' +malloctype='void *' +man1dir=' ' +man1direxp='' +man1ext='0' +man3dir=' ' +man3direxp='' +man3ext='0' +mips_type='' +mistrustnm='' +mkdir='mkdir' +mmaptype='void *' +modetype='mode_t' +more='more' +multiarch='undef' +mv='' +myarchname='mipsel-linux-uclibc' +mydomain='.dev.null' +myhostname='merope' +myuname='linux merope 2.4.30 #1 di 23. jan 15:23:42 cet 2007 mips unknown unknown gnulinux ' +n='-n' +need_va_copy='undef' +netdb_hlen_type='size_t' +netdb_host_type='const void *' +netdb_name_type='const char *' +netdb_net_type='in_addr_t' +nm='nm' +nm_opt='' +nm_so_opt='--dynamic' +nonxs_ext='Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +nroff='nroff' +nvEUformat='"E"' +nvFUformat='"F"' +nvGUformat='"G"' +nv_preserves_uv_bits='32' +nveformat='"e"' +nvfformat='"f"' +nvgformat='"g"' +nvsize='8' +nvtype='double' +o_nonblock='O_NONBLOCK' +obj_ext='.o' +old_pthread_create_joinable='' +optimize='-O2' +orderlib='false' +osname='linux' +osvers='2.4.30' +otherlibdirs=' ' +package='perl5' +pager='/usr/bin/less' +passcat='cat /etc/passwd' +patchlevel='10' +path_sep=':' +perl5='' +perl='' +perl_patchlevel='' +perladmin='root@merope.dev.null' +perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc' +perlpath='/usr/bin/perl' +pg='pg' +phostname='hostname' +pidtype='pid_t' +plibpth='' +pmake='' +pr='' +prefix='/usr' +prefixexp='/usr' +privlib='/usr/lib/perl5/5.10' +privlibexp='/usr/lib/perl5/5.10' +procselfexe='"/proc/self/exe"' +prototype='define' +ptrsize='4' +quadkind='3' +quadtype='long long' +randbits='48' +randfunc='drand48' +random_r_proto='0' +randseedtype='long' +ranlib=':' +rd_nodata='-1' +readdir64_r_proto='0' +readdir_r_proto='0' +revision='5' +rm='rm' +rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*' +rmail='' +run='' +runnm='false' +sPRIEUldbl='"E"' +sPRIFUldbl='"F"' +sPRIGUldbl='"G"' +sPRIXU64='"LX"' +sPRId64='"Ld"' +sPRIeldbl='"e"' +sPRIfldbl='"f"' +sPRIgldbl='"g"' +sPRIi64='"Li"' +sPRIo64='"Lo"' +sPRIu64='"Lu"' +sPRIx64='"Lx"' +sSCNfldbl='"f"' +sched_yield='sched_yield()' +scriptdir='/usr/bin' +scriptdirexp='/usr/bin' +sed='sed' +seedfunc='srand48' +selectminbits='32' +selecttype='fd_set *' +sendmail='' +setgrent_r_proto='0' +sethostent_r_proto='0' +setlocale_r_proto='0' +setnetent_r_proto='0' +setprotoent_r_proto='0' +setpwent_r_proto='0' +setservent_r_proto='0' +sh='/bin/sh' +shar='' +sharpbang='#!' +shmattype='void *' +shortsize='2' +shrpenv='' +shsharp='true' +sig_count='128' +sig_name='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ RTMIN NUM33 NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 NUM63 NUM64 NUM65 NUM66 NUM67 NUM68 NUM69 NUM70 NUM71 NUM72 NUM73 NUM74 NUM75 NUM76 NUM77 NUM78 NUM79 NUM80 NUM81 NUM82 NUM83 NUM84 NUM85 NUM86 NUM87 NUM88 NUM89 NUM90 NUM91 NUM92 NUM93 NUM94 NUM95 NUM96 NUM97 NUM98 NUM99 NUM100 NUM101 NUM102 NUM103 NUM104 NUM105 NUM106 NUM107 NUM108 NUM109 NUM110 NUM111 NUM112 NUM113 NUM114 NUM115 NUM116 NUM117 NUM118 NUM119 NUM120 NUM121 NUM122 NUM123 NUM124 NUM125 NUM126 RTMAX IOT CLD POLL ' +sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "EMT", "FPE", "KILL", "BUS", "SEGV", "SYS", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "PWR", "WINCH", "URG", "IO", "STOP", "TSTP", "CONT", "TTIN", "TTOU", "VTALRM", "PROF", "XCPU", "XFSZ", "RTMIN", "NUM33", "NUM34", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "NUM63", "NUM64", "NUM65", "NUM66", "NUM67", "NUM68", "NUM69", "NUM70", "NUM71", "NUM72", "NUM73", "NUM74", "NUM75", "NUM76", "NUM77", "NUM78", "NUM79", "NUM80", "NUM81", "NUM82", "NUM83", "NUM84", "NUM85", "NUM86", "NUM87", "NUM88", "NUM89", "NUM90", "NUM91", "NUM92", "NUM93", "NUM94", "NUM95", "NUM96", "NUM97", "NUM98", "NUM99", "NUM100", "NUM101", "NUM102", "NUM103", "NUM104", "NUM105", "NUM106", "NUM107", "NUM108", "NUM109", "NUM110", "NUM111", "NUM112", "NUM113", "NUM114", "NUM115", "NUM116", "NUM117", "NUM118", "NUM119", "NUM120", "NUM121", "NUM122", "NUM123", "NUM124", "NUM125", "NUM126", "RTMAX", "IOT", "CLD", "POLL", 0' +sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 6 18 22 ' +sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 6, 18, 22, 0' +sig_size='131' +signal_t='void' +sitearch='' +sitearchexp='' +sitebin='/usr/bin' +sitebinexp='/usr/bin' +sitehtml1dir='' +sitehtml1direxp='' +sitehtml3dir='' +sitehtml3direxp='' +sitelib='' +#sitelib_stem='/usr/lib/perl5/site_perl' +sitelibexp='' +siteman1dir='' +siteman1direxp='' +siteman3dir='' +siteman3direxp='' +siteprefix='/usr' +siteprefixexp='/usr' +sitescript='/usr/bin' +sitescriptexp='/usr/bin' +sizesize='4' +sizetype='size_t' +sleep='' +smail='' +so='so' +sockethdr='' +socketlib='' +socksizetype='socklen_t' +sort='sort' +spackage='Perl5' +spitshell='cat' +srand48_r_proto='0' +srandom_r_proto='0' +src='.' +ssizetype='ssize_t' +startperl='#!/usr/bin/perl' +startsh='#!/bin/sh' +static_ext=' ' +stdchar='char' +stdio_base='((fp)->_base)' +stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)' +stdio_cnt='((fp)->_cnt)' +stdio_filbuf='' +stdio_ptr='((fp)->_ptr)' +stdio_stream_array='' +strerror_r_proto='0' +#strings='/usr/include/string.h' +submit='' +subversion='0' +sysman='/usr/share/man/man1' +tail='' +tar='' +targetarch='mipsel-linux-uclibc' +tbl='' +tee='' +test='test' +#timeincl='/usr/include/sys/time.h /usr/include/time.h ' +timetype='time_t' +tmpnam_r_proto='0' +to=':' +touch='touch' +tr='tr' +trnl='\n' +troff='' +ttyname_r_proto='0' +u16size='2' +u16type='unsigned short' +u32size='4' +u32type='unsigned long' +u64size='8' +u64type='unsigned long long' +u8size='1' +u8type='unsigned char' +uidformat='"lu"' +uidsign='1' +uidsize='4' +uidtype='uid_t' +uname='uname' +uniq='uniq' +uquadtype='unsigned long long' +use5005threads='undef' +use64bitall='undef' +use64bitint='undef' +usecrosscompile='define' +usedl='define' +usefaststdio='undef' +useithreads='undef' +uselargefiles='define' +uselongdouble='undef' +usemallocwrap='define' +usemorebits='undef' +usemultiplicity='undef' +usemymalloc='n' +usenm='true' +useopcode='true' +useperlio='define' +useposix='true' +usereentrant='undef' +userelocatableinc='undef' +usesfio='false' +useshrplib='false' +usesitecustomize='undef' +usesocks='undef' +usethreads='undef' +usevendorprefix='undef' +usevfork='false' +usrinc='%%INCDIRS%%' +uuname='' +uvXUformat='"lX"' +uvoformat='"lo"' +uvsize='4' +uvtype='unsigned long' +uvuformat='"lu"' +uvxformat='"lx"' +vendorarch='' +vendorarchexp='' +vendorbin='' +vendorbinexp='' +vendorhtml1dir=' ' +vendorhtml1direxp='' +vendorhtml3dir=' ' +vendorhtml3direxp='' +vendorlib='' +vendorlib_stem='' +vendorlibexp='' +vendorman1dir=' ' +vendorman1direxp='' +vendorman3dir=' ' +vendorman3direxp='' +vendorprefix='' +vendorprefixexp='' +vendorscript='' +vendorscriptexp='' +version='5.10.0' +version_patchlevel_string='version 10 subversion 0' +versiononly='undef' +vi='' +voidflags='15' +xlibpth='/usr/lib/386 /lib/386' +yacc='yacc' +yaccflags='' +zcat='' +zip='zip' +# Configure command line arguments. +config_arg0='./Configure' +config_args='-der' +config_argc=1 +config_arg1='-der' +PERL_REVISION=5 +PERL_VERSION=10 +PERL_SUBVERSION=0 +PERL_API_REVISION=5 +PERL_API_VERSION=10 +PERL_API_SUBVERSION=0 +PERL_PATCHLEVEL= +PERL_CONFIG_SH=true +# Fix problem with HiRes timer. +d_nanosleep='define' +d_clock_gettime='define' +d_clock_getres='define' +d_clock_nanosleep='define' +d_clock='define' diff --git a/lang/perl/files/config.sh-powerpc.in b/lang/perl/files/config.sh-powerpc.in new file mode 100644 index 0000000..da84eea --- /dev/null +++ b/lang/perl/files/config.sh-powerpc.in @@ -0,0 +1,1068 @@ +#!/bin/sh +# +# This file was produced by running the Configure script. It holds all the +# definitions figured out by Configure. Should you modify one of these values, +# do not forget to propagate your changes by running "Configure -der". You may +# instead choose to run each of the .SH files by yourself, or "Configure -S". +# + +# Package name : perl5 +# Source directory : . +# Configuration time: Fri Jul 20 04:26:18 MDT 2007 +# Configured by : root +# Target system : linux maia 2.6.22 #1 wed jul 11 12:24:09 cest 2007 ppc unknown unknown gnulinux + +Author='' +Date='$Date' +Header='' +Id='$Id' +Locker='' +Log='$Log' +Mcc='Mcc' +RCSfile='$RCSfile' +Revision='$Revision' +Source='' +State='' +_a='.a' +_exe='' +_o='.o' +afs='false' +afsroot='/afs' +alignbytes='8' +ansi2knr='' +aphostname='/bin/hostname' +api_revision='5' +api_subversion='0' +api_version='10' +api_versionstring='5.10.0' +ar='ar' +archlib='' +archlibexp='' +archname64='' +archname='powerpc-linux-uclibc' +archobjs='' +asctime_r_proto='0' +awk='awk' +baserev='5.0' +bash='' +bin='/usr/bin' +binexp='/usr/bin' +bison='bison' +byacc='byacc' +byteorder='4321' +c='' +castflags='0' +cat='cat' +cc='%%CC%%' +cccdlflags='-fPIC' +ccdlflags='-Wl,-E' +ccflags='%%CFLAGS%%' +ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' +ccname='gcc' +ccsymbols='__gnu_linux__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 system=linux system=posix system=unix' +ccversion='' +cf_by='root' +cf_email='root@maia.dev.null' +cf_time='Fri Jul 20 04:26:18 MDT 2007' +chgrp='' +chmod='chmod' +chown='' +clocktype='clock_t' +comm='comm' +compress='' +contains='grep' +cp='cp' +cpio='' +cpp='cpp' +cpp_stuff='42' +cppccsymbols='linux=1 unix=1' +cppflags='%%CFLAGS%%' +cpplast='-' +cppminus='-' +cpprun='%%CPP%%' +cppstdin='%%CPP%%' +cppsymbols='_BIG_ENDIAN=1 __BIG_ENDIAN__=1 __ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 __linux=1 __linux__=1 __unix=1 __unix__=1' +crypt_r_proto='0' +cryptlib='' +csh='csh' +ctermid_r_proto='0' +ctime_r_proto='0' +d_Gconvert='sprintf((b),"%.*g",(n),(x))' +d_PRIEUldbl='define' +d_PRIFUldbl='define' +d_PRIGUldbl='define' +d_PRIXU64='define' +d_PRId64='define' +d_PRIeldbl='define' +d_PRIfldbl='define' +d_PRIgldbl='define' +d_PRIi64='define' +d_PRIo64='define' +d_PRIu64='define' +d_PRIx64='define' +d_SCNfldbl='define' +d__fwalk='undef' +d_access='define' +d_accessx='undef' +d_aintl='undef' +d_alarm='define' +d_archlib='undef' +d_asctime_r='undef' +d_atolf='undef' +d_atoll='define' +d_attribute_format='define' +d_attribute_malloc='define' +d_attribute_nonnull='define' +d_attribute_noreturn='define' +d_attribute_pure='define' +d_attribute_unused='define' +d_attribute_warn_unused_result='define' +d_bcmp='define' +d_bcopy='define' +d_bsd='undef' +d_bsdgetpgrp='undef' +d_bsdsetpgrp='undef' +d_builtin_choose_expr='define' +d_builtin_expect='undef' +d_bzero='define' +d_c99_variadic_macros='define' +d_casti32='undef' +d_castneg='define' +d_charvspr='undef' +d_chown='define' +d_chroot='define' +d_chsize='undef' +d_class='undef' +d_clearenv='define' +d_closedir='define' +d_cmsghdr_s='define' +d_const='define' +d_copysignl='undef' +d_cplusplus='undef' +d_crypt='define' +d_crypt_r='undef' +d_csh='undef' +d_ctermid='define' +d_ctermid_r='undef' +d_ctime_r='undef' +d_cuserid='define' +d_dbl_dig='define' +d_dbminitproto='undef' +d_difftime='define' +d_dir_dd_fd='undef' +d_dirfd='define' +d_dirnamlen='undef' +d_dlerror='define' +d_dlopen='define' +d_dlsymun='undef' +d_dosuid='undef' +d_drand48_r='undef' +d_drand48proto='define' +d_dup2='define' +d_eaccess='undef' +d_endgrent='define' +d_endgrent_r='undef' +d_endhent='define' +d_endhostent_r='undef' +d_endnent='define' +d_endnetent_r='undef' +d_endpent='define' +d_endprotoent_r='undef' +d_endpwent='define' +d_endpwent_r='undef' +d_endsent='define' +d_endservent_r='undef' +d_eofnblk='define' +d_eunice='undef' +d_faststdio='undef' +d_fchdir='define' +d_fchmod='define' +d_fchown='define' +d_fcntl='define' +d_fcntl_can_lock='define' +d_fd_macros='define' +d_fd_set='define' +d_fds_bits='undef' +d_fgetpos='define' +d_finite='define' +d_finitel='undef' +d_flexfnam='define' +d_flock='define' +d_flockproto='define' +d_fork='define' +d_fp_class='undef' +d_fpathconf='define' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' +d_fpos64_t='undef' +d_frexpl='undef' +d_fs_data_s='undef' +d_fseeko='define' +d_fsetpos='define' +d_fstatfs='define' +d_fstatvfs='define' +d_fsync='define' +d_ftello='define' +d_ftime='undef' +d_futimes='undef' +d_getcwd='define' +d_getespwnam='undef' +d_getfsstat='undef' +d_getgrent='define' +d_getgrent_r='undef' +d_getgrgid_r='undef' +d_getgrnam_r='undef' +d_getgrps='define' +d_gethbyaddr='define' +d_gethbyname='define' +d_gethent='define' +d_gethname='define' +d_gethostbyaddr_r='undef' +d_gethostbyname_r='undef' +d_gethostent_r='undef' +d_gethostprotos='define' +d_getitimer='define' +d_getlogin='define' +d_getlogin_r='undef' +d_getmnt='undef' +d_getmntent='define' +d_getnbyaddr='define' +d_getnbyname='define' +d_getnent='define' +d_getnetbyaddr_r='undef' +d_getnetbyname_r='undef' +d_getnetent_r='undef' +d_getnetprotos='define' +d_getpagsz='define' +d_getpbyname='define' +d_getpbynumber='define' +d_getpent='define' +d_getpgid='define' +d_getpgrp2='undef' +d_getpgrp='define' +d_getppid='define' +d_getprior='define' +d_getprotobyname_r='undef' +d_getprotobynumber_r='undef' +d_getprotoent_r='undef' +d_getprotoprotos='define' +d_getprpwnam='undef' +d_getpwent='define' +d_getpwent_r='undef' +d_getpwnam_r='undef' +d_getpwuid_r='undef' +d_getsbyname='define' +d_getsbyport='define' +d_getsent='define' +d_getservbyname_r='undef' +d_getservbyport_r='undef' +d_getservent_r='undef' +d_getservprotos='define' +d_getspnam='define' +d_getspnam_r='undef' +d_gettimeod='define' +d_gmtime_r='undef' +d_gnulibc='undef' +d_grpasswd='define' +d_hasmntopt='define' +d_htonl='define' +d_ilogbl='undef' +d_inc_version_list='undef' +d_index='undef' +d_inetaton='define' +d_int64_t='define' +d_isascii='define' +d_isfinite='undef' +d_isinf='define' +d_isnan='define' +d_isnanl='undef' +d_killpg='define' +d_lchown='define' +d_ldbl_dig='define' +d_libm_lib_version='define' +d_link='define' +d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' +d_locconv='define' +d_lockf='define' +d_longdbl='define' +d_longlong='define' +d_lseekproto='define' +d_lstat='define' +d_madvise='define' +d_malloc_good_size='undef' +d_malloc_size='undef' +d_mblen='define' +d_mbstowcs='define' +d_mbtowc='define' +d_memchr='define' +d_memcmp='define' +d_memcpy='define' +d_memmove='define' +d_memset='define' +d_mkdir='define' +d_mkdtemp='define' +d_mkfifo='define' +d_mkstemp='define' +d_mkstemps='undef' +d_mktime='define' +d_mmap='define' +d_modfl='undef' +d_modfl_pow32_bug='undef' +d_modflproto='undef' +d_mprotect='define' +d_msg='define' +d_msg_ctrunc='define' +d_msg_dontroute='define' +d_msg_oob='define' +d_msg_peek='define' +d_msg_proxy='define' +d_msgctl='define' +d_msgget='define' +d_msghdr_s='define' +d_msgrcv='define' +d_msgsnd='define' +d_msync='define' +d_munmap='define' +d_mymalloc='undef' +d_nice='define' +d_nl_langinfo='define' +d_nv_preserves_uv='define' +d_nv_zero_is_allbits_zero='define' +d_off64_t='undef' +d_old_pthread_create_joinable='undef' +d_oldpthreads='undef' +d_oldsock='undef' +d_open3='define' +d_pathconf='define' +d_pause='define' +d_perl_otherlibdirs='undef' +d_phostname='undef' +d_pipe='define' +d_poll='define' +d_portable='define' +d_printf_format_null='define' +d_procselfexe='define' +d_pseudofork='undef' +d_pthread_atfork='undef' +d_pthread_attr_setscope='define' +d_pthread_yield='undef' +d_pwage='undef' +d_pwchange='undef' +d_pwclass='undef' +d_pwcomment='undef' +d_pwexpire='undef' +d_pwgecos='define' +d_pwpasswd='define' +d_pwquota='undef' +d_qgcvt='undef' +d_quad='define' +d_random_r='undef' +d_readdir64_r='undef' +d_readdir='define' +d_readdir_r='undef' +d_readlink='define' +d_readv='define' +d_recvmsg='define' +d_rename='define' +d_rewinddir='define' +d_rmdir='define' +d_safebcpy='undef' +d_safemcpy='undef' +d_sanemcmp='define' +d_sbrkproto='define' +d_scalbnl='undef' +d_sched_yield='define' +d_scm_rights='define' +d_seekdir='define' +d_select='define' +d_sem='define' +d_semctl='define' +d_semctl_semid_ds='define' +d_semctl_semun='define' +d_semget='define' +d_semop='define' +d_sendmsg='define' +d_setegid='define' +d_seteuid='define' +d_setgrent='define' +d_setgrent_r='undef' +d_setgrps='define' +d_sethent='define' +d_sethostent_r='undef' +d_setitimer='define' +d_setlinebuf='define' +d_setlocale='define' +d_setlocale_r='undef' +d_setnent='define' +d_setnetent_r='undef' +d_setpent='define' +d_setpgid='define' +d_setpgrp2='undef' +d_setpgrp='define' +d_setprior='define' +d_setproctitle='undef' +d_setprotoent_r='undef' +d_setpwent='define' +d_setpwent_r='undef' +d_setregid='define' +d_setresgid='define' +d_setresuid='define' +d_setreuid='define' +d_setrgid='undef' +d_setruid='undef' +d_setsent='define' +d_setservent_r='undef' +d_setsid='define' +d_setvbuf='define' +d_sfio='undef' +d_shm='define' +d_shmat='define' +d_shmatprototype='define' +d_shmctl='define' +d_shmdt='define' +d_shmget='define' +d_sigaction='define' +d_signbit='undef' +d_sigprocmask='define' +d_sigsetjmp='define' +d_sitearch='define' +d_snprintf='define' +d_sockatmark='undef' +d_sockatmarkproto='undef' +d_socket='define' +d_socklen_t='define' +d_sockpair='define' +d_socks5_init='undef' +d_sprintf_returns_strlen='define' +d_sqrtl='undef' +d_srand48_r='undef' +d_srandom_r='undef' +d_sresgproto='undef' +d_sresuproto='undef' +d_statblks='define' +d_statfs_f_flags='undef' +d_statfs_s='define' +d_statvfs='define' +d_stdio_cnt_lval='undef' +d_stdio_ptr_lval='undef' +d_stdio_ptr_lval_nochange_cnt='undef' +d_stdio_ptr_lval_sets_cnt='undef' +d_stdio_stream_array='undef' +d_stdiobase='undef' +d_stdstdio='undef' +d_strchr='define' +d_strcoll='define' +d_strctcpy='define' +d_strerrm='strerror(e)' +d_strerror='define' +d_strerror_r='undef' +d_strftime='define' +d_strlcat='define' +d_strlcpy='define' +d_strtod='define' +d_strtol='define' +d_strtold='define' +d_strtoll='define' +d_strtoq='define' +d_strtoul='define' +d_strtoull='define' +d_strtouq='define' +d_strxfrm='define' +d_suidsafe='undef' +d_symlink='define' +d_syscall='define' +d_syscallproto='define' +d_sysconf='define' +d_sysernlst='' +d_syserrlst='undef' +d_system='define' +d_tcgetpgrp='define' +d_tcsetpgrp='define' +d_telldir='define' +d_telldirproto='define' +d_time='define' +d_times='define' +d_tm_tm_gmtoff='define' +d_tm_tm_zone='define' +d_tmpnam_r='undef' +d_truncate='define' +d_ttyname_r='undef' +d_tzname='define' +d_u32align='undef' +d_ualarm='define' +d_umask='define' +d_uname='define' +d_union_semun='undef' +d_unordered='undef' +d_unsetenv='define' +d_usleep='define' +d_usleepproto='define' +d_ustat='define' +d_vendorarch='undef' +d_vendorbin='undef' +d_vendorlib='undef' +d_vendorscript='undef' +d_vfork='undef' +d_void_closedir='undef' +d_voidsig='define' +d_voidtty='' +d_volatile='define' +d_vprintf='define' +d_vsnprintf='define' +d_wait4='define' +d_waitpid='define' +d_wcstombs='define' +d_wctomb='define' +d_writev='define' +d_xenix='undef' +date='date' +db_hashtype='u_int32_t' +db_prefixtype='size_t' +db_version_major='' +db_version_minor='' +db_version_patch='' +defvoidused='15' +direntrytype='struct dirent' +dlext='so' +dlsrc='dl_dlopen.xs' +doublesize='8' +drand01='drand48()' +drand48_r_proto='0' +dynamic_ext='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +eagain='EAGAIN' +ebcdic='undef' +echo='echo' +egrep='egrep' +emacs='' +endgrent_r_proto='0' +endhostent_r_proto='0' +endnetent_r_proto='0' +endprotoent_r_proto='0' +endpwent_r_proto='0' +endservent_r_proto='0' +eunicefix=':' +exe_ext='' +expr='expr' +extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +extras='' +fflushNULL='define' +fflushall='undef' +find='' +firstmakefile='makefile' +flex='' +fpossize='24' +fpostype='fpos_t' +freetype='void' +from=':' +full_ar='%%AR%%' +full_csh='csh' +full_sed='sed' +gccansipedantic='' +gccosandvers='' +gccversion='3.4.3' +getgrent_r_proto='0' +getgrgid_r_proto='0' +getgrnam_r_proto='0' +gethostbyaddr_r_proto='0' +gethostbyname_r_proto='0' +gethostent_r_proto='0' +getlogin_r_proto='0' +getnetbyaddr_r_proto='0' +getnetbyname_r_proto='0' +getnetent_r_proto='0' +getprotobyname_r_proto='0' +getprotobynumber_r_proto='0' +getprotoent_r_proto='0' +getpwent_r_proto='0' +getpwnam_r_proto='0' +getpwuid_r_proto='0' +getservbyname_r_proto='0' +getservbyport_r_proto='0' +getservent_r_proto='0' +getspnam_r_proto='0' +gidformat='"lu"' +gidsign='1' +gidsize='4' +gidtype='gid_t' +glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib ' +gmake='gmake' +gmtime_r_proto='0' +gnulibc_version='' +grep='grep' +groupcat='cat /etc/group' +groupstype='gid_t' +gzip='gzip' +h_fcntl='false' +h_sysfile='true' +hint='recommended' +hostcat='cat /etc/hosts' +html1dir=' ' +html1direxp='' +html3dir=' ' +html3direxp='' +i16size='2' +i16type='short' +i32size='4' +i32type='long' +i64size='8' +i64type='long long' +i8size='1' +i8type='char' +i_arpainet='define' +i_bsdioctl='' +i_crypt='define' +i_db='define' +i_dbm='undef' +i_dirent='define' +i_dld='undef' +i_dlfcn='define' +i_fcntl='undef' +i_float='define' +i_fp='undef' +i_fp_class='undef' +i_gdbm='define' +i_grp='define' +i_ieeefp='undef' +i_inttypes='define' +i_langinfo='define' +i_libutil='undef' +i_limits='define' +i_locale='define' +i_machcthr='undef' +i_malloc='define' +i_math='define' +i_memory='undef' +i_mntent='define' +i_ndbm='undef' +i_netdb='define' +i_neterrno='undef' +i_netinettcp='define' +i_niin='define' +i_poll='define' +i_prot='undef' +i_pthread='define' +i_pwd='define' +i_rpcsvcdbm='undef' +i_sfio='undef' +i_sgtty='undef' +i_shadow='define' +i_socks='undef' +i_stdarg='define' +i_stddef='define' +i_stdlib='define' +i_string='define' +i_sunmath='undef' +i_sysaccess='undef' +i_sysdir='define' +i_sysfile='define' +i_sysfilio='undef' +i_sysin='undef' +i_sysioctl='define' +i_syslog='define' +i_sysmman='define' +i_sysmode='undef' +i_sysmount='define' +i_sysndir='undef' +i_sysparam='define' +i_sysresrc='define' +i_syssecrt='undef' +i_sysselct='define' +i_syssockio='undef' +i_sysstat='define' +i_sysstatfs='define' +i_sysstatvfs='define' +i_systime='define' +i_systimek='undef' +i_systimes='define' +i_systypes='define' +i_sysuio='define' +i_sysun='define' +i_sysutsname='define' +i_sysvfs='define' +i_syswait='define' +i_termio='undef' +i_termios='define' +i_time='define' +i_unistd='define' +i_ustat='define' +i_utime='define' +i_values='define' +i_varargs='undef' +i_varhdr='stdarg.h' +i_vfork='undef' +ignore_versioned_solibs='y' +inc_version_list=' ' +inc_version_list_init='0' +incpath='' +inews='' +installarchlib='/usr/lib/perl5/5.10' +installbin='/usr/bin' +initialinstalllocation='/usr/bin' +installhtml1dir='' +installhtml3dir='' +installman1dir='' +installman3dir='' +installprefix='/usr' +installprefixexp='/usr' +installprivlib='/usr/lib/perl5/5.10' +installscript='/usr/bin' +installsitearch='/usr/lib/perl5/5.10' +installsitebin='/usr/bin' +installsitehtml1dir='' +installsitehtml3dir='' +installsitelib='/usr/lib/perl5/5.10' +installsiteman1dir='' +installsiteman3dir='' +installsitescript='/usr/bin' +installstyle='lib/perl5' +installusrbinperl='define' +installvendorarch='' +installvendorbin='' +installvendorhtml1dir='' +installvendorhtml3dir='' +installvendorlib='' +installvendorman1dir='' +installvendorman3dir='' +installvendorscript='' +intsize='4' +issymlink='test -h' +ivdformat='"ld"' +ivsize='4' +ivtype='long' +known_extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' +ksh='' +ld='%%LD%%' +lddlflags='-shared %%LDFLAGS%%' +ldflags='' +ldflags_uselargefiles='' +ldlibpthname='LD_LIBRARY_PATH' +less='less' +lib_ext='.a' +libc='' +libperl='libperl.a' +libpth='%%LIBDIRS%%' +libs='-lgdbm -ldb -lnsl -ldl -lm -lcrypt -lutil -lc' +libsdirs='%%LIBDIRS%%' +libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libc.so' +#libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so' +libspath='%%LIBDIRS%%' +libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD' +libswanted_uselargefiles='' +line='' +lint='' +lkflags='' +ln='ln' +lns='/bin/ln -s' +localtime_r_proto='0' +locincpth=' ' +loclibpth=' ' +longdblsize='8' +longlongsize='8' +longsize='4' +lp='' +lpr='' +ls='ls' +lseeksize='8' +lseektype='off_t' +mad='undef' +madlyh='' +madlyobj='' +madlysrc='' +mail='' +mailx='' +make='make' +make_set_make='#' +mallocobj='' +mallocsrc='' +malloctype='void *' +man1dir=' ' +man1direxp='' +man1ext='0' +man3dir=' ' +man3direxp='' +man3ext='0' +mips_type='' +mistrustnm='' +mkdir='mkdir' +mmaptype='void *' +modetype='mode_t' +more='more' +multiarch='undef' +mv='' +myarchname='powerpc-linux-uclibc' +mydomain='.dev.null' +myhostname='maia' +myuname='linux maia 2.6.22 #1 wed jul 11 12:24:09 cest 2007 ppc unknown unknown gnulinux ' +n='-n' +need_va_copy='define' +netdb_hlen_type='size_t' +netdb_host_type='const void *' +netdb_name_type='const char *' +netdb_net_type='in_addr_t' +nm='nm' +nm_opt='' +nm_so_opt='--dynamic' +nonxs_ext='Compress/Zlib Errno IO_Compress_Base IO_Compress_Zlib' +nroff='nroff' +nvEUformat='"E"' +nvFUformat='"F"' +nvGUformat='"G"' +nv_preserves_uv_bits='32' +nveformat='"e"' +nvfformat='"f"' +nvgformat='"g"' +nvsize='8' +nvtype='double' +o_nonblock='O_NONBLOCK' +obj_ext='.o' +old_pthread_create_joinable='' +optimize='-O2' +orderlib='false' +osname='linux' +osvers='2.6.22' +otherlibdirs=' ' +package='perl5' +pager='/usr/bin/less' +passcat='cat /etc/passwd' +patchlevel='10' +path_sep=':' +perl5='' +perl='' +perl_patchlevel='' +perladmin='root@maia.dev.null' +perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc' +perlpath='/usr/bin/perl' +pg='pg' +phostname='hostname' +pidtype='pid_t' +plibpth='' +pmake='' +pr='' +prefix='/usr' +prefixexp='/usr' +privlib='/usr/lib/perl5/5.10' +privlibexp='/usr/lib/perl5/5.10' +procselfexe='"/proc/self/exe"' +prototype='define' +ptrsize='4' +quadkind='3' +quadtype='long long' +randbits='48' +randfunc='drand48' +random_r_proto='0' +randseedtype='long' +ranlib=':' +rd_nodata='-1' +readdir64_r_proto='0' +readdir_r_proto='0' +revision='5' +rm='rm' +rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*' +rmail='' +run='' +runnm='false' +sPRIEUldbl='"E"' +sPRIFUldbl='"F"' +sPRIGUldbl='"G"' +sPRIXU64='"LX"' +sPRId64='"Ld"' +sPRIeldbl='"e"' +sPRIfldbl='"f"' +sPRIgldbl='"g"' +sPRIi64='"Li"' +sPRIo64='"Lo"' +sPRIu64='"Lu"' +sPRIx64='"Lx"' +sSCNfldbl='"f"' +sched_yield='sched_yield()' +scriptdir='/usr/bin' +scriptdirexp='/usr/bin' +sed='sed' +seedfunc='srand48' +selectminbits='32' +selecttype='fd_set *' +sendmail='' +setgrent_r_proto='0' +sethostent_r_proto='0' +setlocale_r_proto='0' +setnetent_r_proto='0' +setprotoent_r_proto='0' +setpwent_r_proto='0' +setservent_r_proto='0' +sh='/bin/sh' +shar='' +sharpbang='#!' +shmattype='void *' +shortsize='2' +shrpenv='' +shsharp='true' +sig_count='64' +sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS RTMIN NUM33 NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 RTMAX IOT CLD POLL UNUSED ' +sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "RTMIN", "NUM33", "NUM34", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0' +sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 6 17 29 31 ' +sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 17, 29, 31, 0' +sig_size='68' +signal_t='void' +sitearch='' +sitearchexp='' +sitebin='/usr/bin' +sitebinexp='/usr/bin' +sitehtml1dir='' +sitehtml1direxp='' +sitehtml3dir='' +sitehtml3direxp='' +sitelib='' +#sitelib_stem='/usr/lib/perl5/site_perl' +sitelibexp='' +siteman1dir='' +siteman1direxp='' +siteman3dir='' +siteman3direxp='' +siteprefix='/usr' +siteprefixexp='/usr' +sitescript='/usr/bin' +sitescriptexp='/usr/bin' +sizesize='4' +sizetype='size_t' +sleep='' +smail='' +so='so' +sockethdr='' +socketlib='' +socksizetype='socklen_t' +sort='sort' +spackage='Perl5' +spitshell='cat' +srand48_r_proto='0' +srandom_r_proto='0' +src='.' +ssizetype='ssize_t' +startperl='#!/usr/bin/perl' +startsh='#!/bin/sh' +static_ext=' ' +stdchar='char' +stdio_base='((fp)->_base)' +stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)' +stdio_cnt='((fp)->_cnt)' +stdio_filbuf='' +stdio_ptr='((fp)->_ptr)' +stdio_stream_array='' +strerror_r_proto='0' +#strings='/usr/include/string.h' +submit='' +subversion='0' +sysman='/usr/share/man/man1' +tail='' +tar='' +targetarch='powerpc-linux-uclibc' +tbl='' +tee='' +test='test' +#timeincl='/usr/include/sys/time.h /usr/include/time.h ' +timetype='time_t' +tmpnam_r_proto='0' +to=':' +touch='touch' +tr='tr' +trnl='\n' +troff='' +ttyname_r_proto='0' +u16size='2' +u16type='unsigned short' +u32size='4' +u32type='unsigned long' +u64size='8' +u64type='unsigned long long' +u8size='1' +u8type='unsigned char' +uidformat='"lu"' +uidsign='1' +uidsize='4' +uidtype='uid_t' +uname='uname' +uniq='uniq' +uquadtype='unsigned long long' +use5005threads='undef' +use64bitall='undef' +use64bitint='undef' +usecrosscompile='define' +usedl='define' +usefaststdio='undef' +useithreads='undef' +uselargefiles='define' +uselongdouble='undef' +usemallocwrap='define' +usemorebits='undef' +usemultiplicity='undef' +usemymalloc='n' +usenm='true' +useopcode='true' +useperlio='define' +useposix='true' +usereentrant='undef' +userelocatableinc='undef' +usesfio='false' +useshrplib='false' +usesitecustomize='undef' +usesocks='undef' +usethreads='undef' +usevendorprefix='undef' +usevfork='false' +usrinc='%%INCDIRS%%' +uuname='' +uvXUformat='"lX"' +uvoformat='"lo"' +uvsize='4' +uvtype='unsigned long' +uvuformat='"lu"' +uvxformat='"lx"' +vendorarch='' +vendorarchexp='' +vendorbin='' +vendorbinexp='' +vendorhtml1dir=' ' +vendorhtml1direxp='' +vendorhtml3dir=' ' +vendorhtml3direxp='' +vendorlib='' +vendorlib_stem='' +vendorlibexp='' +vendorman1dir=' ' +vendorman1direxp='' +vendorman3dir=' ' +vendorman3direxp='' +vendorprefix='' +vendorprefixexp='' +vendorscript='' +vendorscriptexp='' +version='5.10.0' +version_patchlevel_string='version 10 subversion 0' +versiononly='undef' +vi='' +voidflags='15' +xlibpth='/usr/lib/386 /lib/386' +yacc='yacc' +yaccflags='' +zcat='' +zip='zip' +# Configure command line arguments. +config_arg0='./Configure' +config_args='-der' +config_argc=1 +config_arg1='-der' +PERL_REVISION=5 +PERL_VERSION=10 +PERL_SUBVERSION=0 +PERL_API_REVISION=5 +PERL_API_VERSION=10 +PERL_API_SUBVERSION=0 +PERL_PATCHLEVEL= +PERL_CONFIG_SH=true +# Fix problem with HiRes timer. +d_nanosleep='define' +d_clock_gettime='define' +d_clock_getres='define' +d_clock_nanosleep='define' +d_clock='define' diff --git a/lang/perl/files/perlmod-deps.sh b/lang/perl/files/perlmod-deps.sh new file mode 100644 index 0000000..d144b4d --- /dev/null +++ b/lang/perl/files/perlmod-deps.sh @@ -0,0 +1,81 @@ +#!/bin/sh +# +# Generate perl module package dependencies +# +# Copyright (C) 2007 Peter Colberg +# Licensed under the terms of the GNU General Public License. +# + +if [ $# -lt 3 ]; then + echo >&2 "Usage: $(basename $0) STAGING-DIR PERL-BUILD-DIR [FILES...] [DIRECTORIES...]" + exit 1 +fi + +STAGING_DIR="$1" +PERL_BIN="$STAGING_DIR/usr/bin/perl" +PERL_LIB="$STAGING_DIR/usr/lib/perl5/5.10" +INC_DIR="$(dirname $0)" +shift + +"$PERL_BIN" -I"$INC_DIR" -I"$PERL_LIB" - "$@" <<'PERL_SCRIPT' +use strict; +use warnings; + +use Module::ScanDeps; +use File::Find; +use Cwd; + +our $sitelib = "/usr/lib/perl5/5.10"; + +sub scandeps { + my $builddir = Cwd::abs_path(shift); + my @scanpaths = @_; + my ($curdir, @pkgdirs, $dir, @deps, %depends, $file); + our ($pkg, %bundles, $path, @files); + + @pkgdirs = glob($builddir . "/*/ipkg"); + $curdir = getcwd(); + @INC = (); + for $dir (@pkgdirs) { + chdir($dir) or die "$dir: $!"; + for $pkg (glob("*")) { + chdir($dir . "/" . $pkg . $sitelib) or next; + push @INC, getcwd(); + sub wanted { + return unless (-f $_); + s/^\.\///; + $bundles{$_} = $pkg; + } + find({ wanted => \&wanted, no_chdir => 1 }, "."); + } + } + chdir($curdir) or die "$curdir: $!\n"; + + for $path (@scanpaths) { + sub scan_wanted { + return unless (-f $_ and /\.(pl|pm)$/); + push @files, $_; + } + if (-f $path) { + push @files, $path; + } + elsif (-d $path) { + find({ wanted => \&scan_wanted, no_chdir => 1 }, $path); + } + } + + @deps = keys %{scan_deps(files => \@files, recurse => 0)}; + for $file (grep { not exists $bundles{$_} } @deps) { + warn "could not resolve dependency: $file\n"; + } + %depends = map { $bundles{$_}, 1 } grep { exists $bundles{$_} } @deps; + + if (%depends) { + print join(' ', 'perl', sort keys %depends), "\n"; + } +} + +if (@ARGV > 1) { + scandeps(@ARGV); +} +PERL_SCRIPT diff --git a/lang/perl/files/scan-perlbase.sh b/lang/perl/files/scan-perlbase.sh new file mode 100644 index 0000000..ab8963d --- /dev/null +++ b/lang/perl/files/scan-perlbase.sh @@ -0,0 +1,177 @@ +#!/bin/sh +# +# Generate perl base modules package definitions +# +# Copyright (C) 2007 Peter Colberg +# Licensed under the terms of the GNU General Public License. +# + +if [ $# -lt 1 ]; then + echo >&2 "Usage: $(basename $0) STAGING-DIR [OUTFILE]" + exit 1 +fi + +STAGING_DIR="$1" +PERL_BIN="$STAGING_DIR/usr/bin/perl" +PERL_LIB="$STAGING_DIR/usr/lib/perl5/5.10" +INC_DIR="$(dirname $0)" +shift + +"$PERL_BIN" -I"$INC_DIR" -I"$PERL_LIB" - "$PERL_LIB" "$@" <<'PERL_SCRIPT' +use strict; +use warnings; + +use Module::ScanDeps; +use File::Find; +use File::Basename; + +our $skipfiles = 'CORE vmsish.pm auto/sdbm'; + +our %defmodules = ( + 'essential' => 'lib.pm vars.pm strict.pm warnings.pm warnings Carp Carp.pm Exporter Exporter.pm locale.pm subs.pm overload.pm constant.pm', + 'getoptpl' => 'getopt.pl getopts.pl', + 'utf8' => 'utf8_heavy.pl', + 'Getopt' => 'newgetopt.pl', + 'open' => 'open2.pl open3.pl', + 'Config' => 'Config_heavy.pl', + 'bytes' => 'bytes_heavy.pl', +); + +our %defdepends = ( + 'DB_File' => 'libdb1-compat', + 'GDBM_File' => 'libgdbm', +); + +our $prefix = 'perlbase-'; + +sub template ($) { + $_ = $_[0]; + return < +TITLE:=$$_{module} perl module +DEPENDS:=$$_{depends} +endef + +define Package/$$_{package}/install +\$(call perlmod/Install,\$(1),$$_{files},$$_{exclude}) +endef + +\$(eval \$(call BuildPackage,$$_{package})) + + +TEMPLATE +} + + +sub scandeps ($) { + my $sitedir = shift; + my @result; + + my ($mod, $file, @deps, $dep, %depends, $parent, $pkg); + our (%files, %modules); + my (%packages, %excludes); + + for $mod (keys %defmodules) { + ($pkg = $prefix . $mod) =~ tr/A-Z_/a-z-/; + $modules{$pkg} = $mod; + for $file (split / /, $defmodules{$mod}) { + $files{$file} = $pkg; + } + } + for $file ('pod', 'Pod', split(/ /, $skipfiles)) { + $files{$file} = undef; + } + + sub wanted { + s/^\.\///; + return if (/^(\.|auto)$/ or exists $files{$_}); + if (/\.pod$/) { + $files{$_} = undef; + } + elsif (exists $files{dirname($_)}) { + $files{$_} = $files{dirname($_)}; + } + elsif (m!^(?:auto/)?([^./]+)(?:\.(?:pl|pm)|/|$)!) { + (my $pkg = $prefix . $1) =~ tr/A-Z_/a-z-/; + $modules{$pkg} = $1; + $files{$_} = $pkg; + } + else { + $files{$_} = undef; + } + } + chdir($sitedir); + find({ wanted => \&wanted, no_chdir => 1}, '.'); + + for $pkg (keys %modules) { + $packages{$pkg} = []; + $excludes{$pkg} = []; + $depends{$pkg} = {}; + } + + for $file (keys %files) { + $mod = $files{$file}; + $parent = $files{dirname($file)}; + + if (defined ($mod)) { + if (defined ($parent) and not ($parent eq $mod)) { + push @{$packages{$mod}}, $file; + push @{$excludes{$parent}}, $file; + } + elsif (not defined ($parent)) { + push @{$packages{$mod}}, $file; + } + } + elsif (defined ($parent)) { + push @{$excludes{$parent}}, $file; + } + } + + for $mod (keys %defdepends) { + ($pkg = $prefix . $mod) =~ tr/A-Z_/a-z-/; + for $dep (split / /, $defdepends{$mod}) { + ${$depends{$pkg}}{$dep} = 1; + } + } + + @INC = ('.'); + for $file (grep { -f $_ and defined $files{$_} } keys %files) { + @deps = keys %{scan_deps(files => [ $file ], recurse => 0)}; + $pkg = $files{$file}; + + for $dep (grep { not defined $files{$_} } @deps) { + warn "$file: could not resolve dependency: $dep\n"; + } + for $dep (grep { defined $files{$_} } @deps) { + next if ($files{$dep} eq $pkg); + ${$depends{$pkg}}{$files{$dep}} = 1; + } + } + + for $pkg (sort keys %packages) { + push @result, template({ + package => $pkg, + module => $modules{$pkg}, + depends => join(' ', 'perl', sort keys %{$depends{$pkg}}), + files => join(' ', sort @{$packages{$pkg}}), + exclude => join(' ', sort @{$excludes{$pkg}}), + }); + } + + return join('', @result); +} + + +if (@ARGV > 1) { + open FILE, ">$ARGV[1]" or die "$ARGV[1]: $!\n"; + print FILE scandeps($ARGV[0]); + close FILE; +} +else { + print scandeps($ARGV[0] or '.'); +} +PERL_SCRIPT diff --git a/lang/perl/files/strippm.sh b/lang/perl/files/strippm.sh new file mode 100644 index 0000000..b83d2b4 --- /dev/null +++ b/lang/perl/files/strippm.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# Attempt to strip comments and pod docs from perl modules +# + +[ "$#" -gt 0 ] || set . +echo "---> Stripping modules in: $@" >&2 +find "$@" -name \*.pm -or -name \*.pl -or -name \*.pod | while read fn; do + echo " $fn" >&2 + sed -i -e '/^=\(head\|pod\|item\|over\|back\)/,/^=cut/d; /^=\(head\|pod\|item\|over\|back\)/,$d; /^#$/d; /^#[^!"'"'"']/d' "$fn" +done diff --git a/lang/perl/patches/100-static_uudmap.patch b/lang/perl/patches/100-static_uudmap.patch new file mode 100644 index 0000000..698129a --- /dev/null +++ b/lang/perl/patches/100-static_uudmap.patch @@ -0,0 +1,50 @@ +--- /dev/null ++++ b/generate_uudmap +@@ -0,0 +1,7 @@ ++#!/bin/bash ++echo \{ ++for i in {0..31}; do echo -n ' 0,'; done ++echo ++for i in {0..63}; do echo -n " $i,"; done ++echo ++echo \} +--- a/Makefile.micro ++++ b/Makefile.micro +@@ -173,13 +173,8 @@ uperlapi$(_O): $(HE) perlapi.c perlapi.h + uxsutils$(_O): $(HE) xsutils.c + $(CC) $(CCFLAGS) -o $@ $(CFLAGS) xsutils.c + +-uudmap.h: generate_uudmap$(_X) +- $(RUN) ./generate_uudmap$(_X) >uudmap.h +- +-generate_uudmap$(_O): generate_uudmap.c +- $(CC) $(CCFLAGS) -o $@ $(CFLAGS) generate_uudmap.c +- +-generate_uudmap$(_X): generate_uudmap$(_O) +- $(LD) -o generate_uudmap $(LDFLAGS) generate_uudmap$(_O) $(LIBS) ++uudmap.h: ++ chmod a+x generate_uudmap ++ $(RUN) ./generate_uudmap >uudmap.h + + # That's it, folks! +--- a/Makefile.SH ++++ b/Makefile.SH +@@ -478,11 +478,13 @@ opmini\$(OBJ_EXT): opmini.c + + globals\$(OBJ_EXT): uudmap.h + +-uudmap.h: generate_uudmap\$(EXE_EXT) +- \$(RUN) ./generate_uudmap\$(EXE_EXT) >uudmap.h +- +-generate_uudmap\$(EXE_EXT): generate_uudmap\$(OBJ_EXT) +- \$(CC) -o generate_uudmap \$(LDFLAGS) generate_uudmap\$(OBJ_EXT) \$(libs) ++uudmap.h: generate_uudmap ++ chmod a+x generate_uudmap ++ \$(RUN) ./generate_uudmap >uudmap.h ++ ++generate_uudmap: ++ cp ../generate_uudmap . ++ touch generate_uudmap + + !GROK!THIS! + $spitshell >>Makefile <<'!NO!SUBS!' diff --git a/lang/perl/patches/101-fix-cross-compile-endianness-detection.patch b/lang/perl/patches/101-fix-cross-compile-endianness-detection.patch new file mode 100644 index 0000000..8fea9c0 --- /dev/null +++ b/lang/perl/patches/101-fix-cross-compile-endianness-detection.patch @@ -0,0 +1,22 @@ +--- a/config_h.SH ++++ b/config_h.SH +@@ -53,6 +53,19 @@ sed <$CONFIG_H -e 's!^#und + #ifndef _config_h_ + #define _config_h_ + ++#if defined(USE_CROSS_COMPILE) && !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) ++# include ++# if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN) ++# if (__BYTE_ORDER == __LITTLE_ENDIAN) ++# define __LITTLE_ENDIAN__ ++# elif (__BYTE_ORDER == __BIG_ENDIAN) ++# define __BIG_ENDIAN__ ++# else ++# error Unknown endianness ++# endif ++# endif ++#endif ++ + /* LOC_SED: + * This symbol holds the complete pathname to the sed program. + */ diff --git a/lang/perl/patches/200-host-libc-dir-moved-debian+derivatives.patch b/lang/perl/patches/200-host-libc-dir-moved-debian+derivatives.patch new file mode 100644 index 0000000..2a0dd6b --- /dev/null +++ b/lang/perl/patches/200-host-libc-dir-moved-debian+derivatives.patch @@ -0,0 +1,27 @@ +--- a/hints/linux.sh ++++ b/hints/linux.sh +@@ -133,6 +133,24 @@ case "$optimize" in + ;; + esac + ++# Ubuntu 11.04 (and later, presumably) doesn't keep most libraries ++# (such as -lm) in /lib or /usr/lib. So we have to ask gcc to tell us ++# where to look. We don't want gcc's own libraries, however, so we ++# filter those out. ++# This could be conditional on Unbuntu, but other distributions may ++# follow suit, and this scheme seems to work even on rather old gcc's. ++# This unconditionally uses gcc because even if the user is using another ++# compiler, we still need to find the math library and friends, and I don't ++# know how other compilers will cope with that situation. ++# Still, as an escape hatch, allow Configure command line overrides to ++# plibpth to bypass this check. ++case "$plibpth" in ++'') plibpth=`gcc -print-search-dirs | grep libraries | ++ cut -f2- -d= | tr ':' $trnl | grep -v 'gcc'` ++ plibpth="$plibpth" # Collapse all entries on one line ++ ;; ++esac ++ + # Are we using ELF? Thanks to Kenneth Albanowski + # for this test. + cat >try.c <<'EOM' diff --git a/lang/perl/perlbase.mk b/lang/perl/perlbase.mk new file mode 100644 index 0000000..ac6070c --- /dev/null +++ b/lang/perl/perlbase.mk @@ -0,0 +1,1641 @@ +define Package/perlbase-template +SUBMENU:=Perl +SECTION:=lang +CATEGORY:=Languages +URL:=http://www.cpan.org/ +MAINTAINER:=Peter Colberg +DEPENDS:=perl +endef + +define Package/perlbase-abbrev +$(call Package/perlbase-template) +TITLE:=abbrev perl module +endef + +define Package/perlbase-abbrev/install +$(call perlmod/Install,$(1),abbrev.pl,) +endef + +$(eval $(call BuildPackage,perlbase-abbrev)) + + +define Package/perlbase-anydbm-file +$(call Package/perlbase-template) +TITLE:=AnyDBM_File perl module +endef + +define Package/perlbase-anydbm-file/install +$(call perlmod/Install,$(1),AnyDBM_File.pm,) +endef + +$(eval $(call BuildPackage,perlbase-anydbm-file)) + + +define Package/perlbase-archive +$(call Package/perlbase-template) +TITLE:=Archive perl module +endef + +define Package/perlbase-archive/install +$(call perlmod/Install,$(1),Archive,) +endef + +$(eval $(call BuildPackage,perlbase-archive)) + + +define Package/perlbase-assert +$(call Package/perlbase-template) +TITLE:=assert perl module +endef + +define Package/perlbase-assert/install +$(call perlmod/Install,$(1),assert.pl,) +endef + +$(eval $(call BuildPackage,perlbase-assert)) + + +define Package/perlbase-attribute +$(call Package/perlbase-template) +TITLE:=Attribute perl module +endef + +define Package/perlbase-attribute/install +$(call perlmod/Install,$(1),Attribute,) +endef + +$(eval $(call BuildPackage,perlbase-attribute)) + + +define Package/perlbase-attributes +$(call Package/perlbase-template) +TITLE:=attributes perl module +endef + +define Package/perlbase-attributes/install +$(call perlmod/Install,$(1),attributes.pm,) +endef + +$(eval $(call BuildPackage,perlbase-attributes)) + + +define Package/perlbase-attrs +$(call Package/perlbase-template) +TITLE:=attrs perl module +endef + +define Package/perlbase-attrs/install +$(call perlmod/Install,$(1),attrs.pm auto/attrs,) +endef + +$(eval $(call BuildPackage,perlbase-attrs)) + + +define Package/perlbase-autoloader +$(call Package/perlbase-template) +TITLE:=AutoLoader perl module +endef + +define Package/perlbase-autoloader/install +$(call perlmod/Install,$(1),AutoLoader.pm,) +endef + +$(eval $(call BuildPackage,perlbase-autoloader)) + + +define Package/perlbase-autosplit +$(call Package/perlbase-template) +TITLE:=AutoSplit perl module +endef + +define Package/perlbase-autosplit/install +$(call perlmod/Install,$(1),AutoSplit.pm,) +endef + +$(eval $(call BuildPackage,perlbase-autosplit)) + + +define Package/perlbase-autouse +$(call Package/perlbase-template) +TITLE:=autouse perl module +endef + +define Package/perlbase-autouse/install +$(call perlmod/Install,$(1),autouse.pm,) +endef + +$(eval $(call BuildPackage,perlbase-autouse)) + + +define Package/perlbase-b +$(call Package/perlbase-template) +TITLE:=B perl module +endef + +define Package/perlbase-b/install +$(call perlmod/Install,$(1),B B.pm auto/B,) +endef + +$(eval $(call BuildPackage,perlbase-b)) + + +define Package/perlbase-base +$(call Package/perlbase-template) +TITLE:=base perl module +endef + +define Package/perlbase-base/install +$(call perlmod/Install,$(1),base.pm,) +endef + +$(eval $(call BuildPackage,perlbase-base)) + + +define Package/perlbase-benchmark +$(call Package/perlbase-template) +TITLE:=Benchmark perl module +endef + +define Package/perlbase-benchmark/install +$(call perlmod/Install,$(1),Benchmark.pm,) +endef + +$(eval $(call BuildPackage,perlbase-benchmark)) + + +define Package/perlbase-bigfloat +$(call Package/perlbase-template) +TITLE:=bigfloat perl module +endef + +define Package/perlbase-bigfloat/install +$(call perlmod/Install,$(1),bigfloat.pl,) +endef + +$(eval $(call BuildPackage,perlbase-bigfloat)) + + +define Package/perlbase-bigint +$(call Package/perlbase-template) +TITLE:=bigint perl module +endef + +define Package/perlbase-bigint/install +$(call perlmod/Install,$(1),bigint.pl bigint.pm,) +endef + +$(eval $(call BuildPackage,perlbase-bigint)) + + +define Package/perlbase-bignum +$(call Package/perlbase-template) +TITLE:=bignum perl module +endef + +define Package/perlbase-bignum/install +$(call perlmod/Install,$(1),bignum.pm,) +endef + +$(eval $(call BuildPackage,perlbase-bignum)) + + +define Package/perlbase-bigrat +$(call Package/perlbase-template) +TITLE:=bigrat perl module +endef + +define Package/perlbase-bigrat/install +$(call perlmod/Install,$(1),bigrat.pl bigrat.pm,) +endef + +$(eval $(call BuildPackage,perlbase-bigrat)) + + +define Package/perlbase-blib +$(call Package/perlbase-template) +TITLE:=blib perl module +endef + +define Package/perlbase-blib/install +$(call perlmod/Install,$(1),blib.pm,) +endef + +$(eval $(call BuildPackage,perlbase-blib)) + + +define Package/perlbase-bytes +$(call Package/perlbase-template) +TITLE:=bytes perl module +endef + +define Package/perlbase-bytes/install +$(call perlmod/Install,$(1),bytes.pm bytes_heavy.pl,) +endef + +$(eval $(call BuildPackage,perlbase-bytes)) + + +define Package/perlbase-cacheout +$(call Package/perlbase-template) +TITLE:=cacheout perl module +endef + +define Package/perlbase-cacheout/install +$(call perlmod/Install,$(1),cacheout.pl,) +endef + +$(eval $(call BuildPackage,perlbase-cacheout)) + + +define Package/perlbase-cgi +$(call Package/perlbase-template) +TITLE:=CGI perl module +endef + +define Package/perlbase-cgi/install +$(call perlmod/Install,$(1),CGI CGI.pm,) +endef + +$(eval $(call BuildPackage,perlbase-cgi)) + + +define Package/perlbase-charnames +$(call Package/perlbase-template) +TITLE:=charnames perl module +endef + +define Package/perlbase-charnames/install +$(call perlmod/Install,$(1),charnames.pm,) +endef + +$(eval $(call BuildPackage,perlbase-charnames)) + + +define Package/perlbase-class +$(call Package/perlbase-template) +TITLE:=Class perl module +endef + +define Package/perlbase-class/install +$(call perlmod/Install,$(1),Class,) +endef + +$(eval $(call BuildPackage,perlbase-class)) + + +define Package/perlbase-complete +$(call Package/perlbase-template) +TITLE:=complete perl module +endef + +define Package/perlbase-complete/install +$(call perlmod/Install,$(1),complete.pl,) +endef + +$(eval $(call BuildPackage,perlbase-complete)) + + +define Package/perlbase-compress +$(call Package/perlbase-template) +TITLE:=Compress perl module +endef + +define Package/perlbase-compress/install +$(call perlmod/Install,$(1),Compress auto/Compress,) +endef + +$(eval $(call BuildPackage,perlbase-compress)) + + +define Package/perlbase-config +$(call Package/perlbase-template) +TITLE:=Config perl module +endef + +define Package/perlbase-config/install +$(call perlmod/Install,$(1),Config Config.pm Config_heavy.pl,) +endef + +$(eval $(call BuildPackage,perlbase-config)) + + +define Package/perlbase-cpan +$(call Package/perlbase-template) +TITLE:=CPAN perl module +endef + +define Package/perlbase-cpan/install +$(call perlmod/Install,$(1),CPAN CPAN.pm,) +endef + +$(eval $(call BuildPackage,perlbase-cpan)) + + +define Package/perlbase-cpanplus +$(call Package/perlbase-template) +TITLE:=CPANPLUS perl module +endef + +define Package/perlbase-cpanplus/install +$(call perlmod/Install,$(1),CPANPLUS CPANPLUS.pm,CPANPLUS/FAQ.pod CPANPLUS/Hacking.pod CPANPLUS/Shell/Default/Plugins/HOWTO.pod) +endef + +$(eval $(call BuildPackage,perlbase-cpanplus)) + + +define Package/perlbase-ctime +$(call Package/perlbase-template) +TITLE:=ctime perl module +endef + +define Package/perlbase-ctime/install +$(call perlmod/Install,$(1),ctime.pl,) +endef + +$(eval $(call BuildPackage,perlbase-ctime)) + + +define Package/perlbase-cwd +$(call Package/perlbase-template) +TITLE:=Cwd perl module +endef + +define Package/perlbase-cwd/install +$(call perlmod/Install,$(1),Cwd.pm auto/Cwd,) +endef + +$(eval $(call BuildPackage,perlbase-cwd)) + + +define Package/perlbase-data +$(call Package/perlbase-template) +TITLE:=Data perl module +endef + +define Package/perlbase-data/install +$(call perlmod/Install,$(1),Data auto/Data,) +endef + +$(eval $(call BuildPackage,perlbase-data)) + + +define Package/perlbase-db +$(call Package/perlbase-template) +TITLE:=DB perl module +DEPENDS+= +libdb47 +endef + +define Package/perlbase-db/install +$(call perlmod/Install,$(1),DB.pm,) +endef + +$(eval $(call BuildPackage,perlbase-db)) + + +define Package/perlbase-db-file +$(call Package/perlbase-template) +TITLE:=DB_File perl module +DEPENDS+= +libdb47 +endef + +define Package/perlbase-db-file/install +$(call perlmod/Install,$(1),DB_File.pm auto/DB_File,) +endef + +$(eval $(call BuildPackage,perlbase-db-file)) + + +define Package/perlbase-dbm-filter +$(call Package/perlbase-template) +TITLE:=DBM_Filter perl module +endef + +define Package/perlbase-dbm-filter/install +$(call perlmod/Install,$(1),DBM_Filter DBM_Filter.pm,) +endef + +$(eval $(call BuildPackage,perlbase-dbm-filter)) + + +define Package/perlbase-devel +$(call Package/perlbase-template) +TITLE:=Devel perl module +endef + +define Package/perlbase-devel/install +$(call perlmod/Install,$(1),Devel auto/Devel,) +endef + +$(eval $(call BuildPackage,perlbase-devel)) + + +define Package/perlbase-diagnostics +$(call Package/perlbase-template) +TITLE:=diagnostics perl module +endef + +define Package/perlbase-diagnostics/install +$(call perlmod/Install,$(1),diagnostics.pm,) +endef + +$(eval $(call BuildPackage,perlbase-diagnostics)) + + +define Package/perlbase-digest +$(call Package/perlbase-template) +TITLE:=Digest perl module +endef + +define Package/perlbase-digest/install +$(call perlmod/Install,$(1),Digest Digest.pm auto/Digest,) +endef + +$(eval $(call BuildPackage,perlbase-digest)) + + +define Package/perlbase-dirhandle +$(call Package/perlbase-template) +TITLE:=DirHandle perl module +endef + +define Package/perlbase-dirhandle/install +$(call perlmod/Install,$(1),DirHandle.pm,) +endef + +$(eval $(call BuildPackage,perlbase-dirhandle)) + + +define Package/perlbase-dotsh +$(call Package/perlbase-template) +TITLE:=dotsh perl module +endef + +define Package/perlbase-dotsh/install +$(call perlmod/Install,$(1),dotsh.pl,) +endef + +$(eval $(call BuildPackage,perlbase-dotsh)) + + +define Package/perlbase-dumpvalue +$(call Package/perlbase-template) +TITLE:=Dumpvalue perl module +endef + +define Package/perlbase-dumpvalue/install +$(call perlmod/Install,$(1),Dumpvalue.pm,) +endef + +$(eval $(call BuildPackage,perlbase-dumpvalue)) + + +define Package/perlbase-dumpvar +$(call Package/perlbase-template) +TITLE:=dumpvar perl module +endef + +define Package/perlbase-dumpvar/install +$(call perlmod/Install,$(1),dumpvar.pl,) +endef + +$(eval $(call BuildPackage,perlbase-dumpvar)) + + +define Package/perlbase-dynaloader +$(call Package/perlbase-template) +TITLE:=DynaLoader perl module +endef + +define Package/perlbase-dynaloader/install +$(call perlmod/Install,$(1),DynaLoader.pm auto/DynaLoader,) +endef + +$(eval $(call BuildPackage,perlbase-dynaloader)) + + +define Package/perlbase-encode +$(call Package/perlbase-template) +TITLE:=Encode perl module +endef + +define Package/perlbase-encode/install +$(call perlmod/Install,$(1),Encode Encode.pm auto/Encode,Encode/PerlIO.pod Encode/Supported.pod) +endef + +$(eval $(call BuildPackage,perlbase-encode)) + + +define Package/perlbase-encoding +$(call Package/perlbase-template) +TITLE:=encoding perl module +endef + +define Package/perlbase-encoding/install +$(call perlmod/Install,$(1),encoding encoding.pm,) +endef + +$(eval $(call BuildPackage,perlbase-encoding)) + + +define Package/perlbase-english +$(call Package/perlbase-template) +TITLE:=English perl module +endef + +define Package/perlbase-english/install +$(call perlmod/Install,$(1),English.pm,) +endef + +$(eval $(call BuildPackage,perlbase-english)) + + +define Package/perlbase-env +$(call Package/perlbase-template) +TITLE:=Env perl module +endef + +define Package/perlbase-env/install +$(call perlmod/Install,$(1),Env.pm,) +endef + +$(eval $(call BuildPackage,perlbase-env)) + + +define Package/perlbase-errno +$(call Package/perlbase-template) +TITLE:=Errno perl module +endef + +define Package/perlbase-errno/install +$(call perlmod/Install,$(1),Errno.pm,) +endef + +$(eval $(call BuildPackage,perlbase-errno)) + + +define Package/perlbase-essential +$(call Package/perlbase-template) +TITLE:=essential perl module +endef + +define Package/perlbase-essential/install +$(call perlmod/Install,$(1),Carp Carp.pm Exporter Exporter.pm constant.pm lib.pm locale.pm overload.pm strict.pm subs.pm vars.pm warnings warnings.pm,) +endef + +$(eval $(call BuildPackage,perlbase-essential)) + + +define Package/perlbase-exceptions +$(call Package/perlbase-template) +TITLE:=exceptions perl module +endef + +define Package/perlbase-exceptions/install +$(call perlmod/Install,$(1),exceptions.pl,) +endef + +$(eval $(call BuildPackage,perlbase-exceptions)) + + +define Package/perlbase-extutils +$(call Package/perlbase-template) +TITLE:=ExtUtils perl module +endef + +define Package/perlbase-extutils/install +$(call perlmod/Install,$(1),ExtUtils,ExtUtils/MakeMaker/FAQ.pod ExtUtils/MakeMaker/Tutorial.pod) +endef + +$(eval $(call BuildPackage,perlbase-extutils)) + + +define Package/perlbase-fastcwd +$(call Package/perlbase-template) +TITLE:=fastcwd perl module +endef + +define Package/perlbase-fastcwd/install +$(call perlmod/Install,$(1),fastcwd.pl,) +endef + +$(eval $(call BuildPackage,perlbase-fastcwd)) + + +define Package/perlbase-fatal +$(call Package/perlbase-template) +TITLE:=Fatal perl module +endef + +define Package/perlbase-fatal/install +$(call perlmod/Install,$(1),Fatal.pm,) +endef + +$(eval $(call BuildPackage,perlbase-fatal)) + + +define Package/perlbase-fcntl +$(call Package/perlbase-template) +TITLE:=Fcntl perl module +endef + +define Package/perlbase-fcntl/install +$(call perlmod/Install,$(1),Fcntl.pm auto/Fcntl,) +endef + +$(eval $(call BuildPackage,perlbase-fcntl)) + + +define Package/perlbase-feature +$(call Package/perlbase-template) +TITLE:=feature perl module +endef + +define Package/perlbase-feature/install +$(call perlmod/Install,$(1),feature.pm,) +endef + +$(eval $(call BuildPackage,perlbase-feature)) + + +define Package/perlbase-fields +$(call Package/perlbase-template) +TITLE:=fields perl module +endef + +define Package/perlbase-fields/install +$(call perlmod/Install,$(1),fields.pm,) +endef + +$(eval $(call BuildPackage,perlbase-fields)) + + +define Package/perlbase-file +$(call Package/perlbase-template) +TITLE:=File perl module +endef + +define Package/perlbase-file/install +$(call perlmod/Install,$(1),File auto/File,) +endef + +$(eval $(call BuildPackage,perlbase-file)) + + +define Package/perlbase-filecache +$(call Package/perlbase-template) +TITLE:=FileCache perl module +endef + +define Package/perlbase-filecache/install +$(call perlmod/Install,$(1),FileCache.pm,) +endef + +$(eval $(call BuildPackage,perlbase-filecache)) + + +define Package/perlbase-filehandle +$(call Package/perlbase-template) +TITLE:=FileHandle perl module +endef + +define Package/perlbase-filehandle/install +$(call perlmod/Install,$(1),FileHandle.pm,) +endef + +$(eval $(call BuildPackage,perlbase-filehandle)) + + +define Package/perlbase-filetest +$(call Package/perlbase-template) +TITLE:=filetest perl module +endef + +define Package/perlbase-filetest/install +$(call perlmod/Install,$(1),filetest.pm,) +endef + +$(eval $(call BuildPackage,perlbase-filetest)) + + +define Package/perlbase-filter +$(call Package/perlbase-template) +TITLE:=Filter perl module +endef + +define Package/perlbase-filter/install +$(call perlmod/Install,$(1),Filter auto/Filter,) +endef + +$(eval $(call BuildPackage,perlbase-filter)) + + +define Package/perlbase-find +$(call Package/perlbase-template) +TITLE:=find perl module +endef + +define Package/perlbase-find/install +$(call perlmod/Install,$(1),find.pl,) +endef + +$(eval $(call BuildPackage,perlbase-find)) + + +define Package/perlbase-findbin +$(call Package/perlbase-template) +TITLE:=FindBin perl module +endef + +define Package/perlbase-findbin/install +$(call perlmod/Install,$(1),FindBin.pm,) +endef + +$(eval $(call BuildPackage,perlbase-findbin)) + + +define Package/perlbase-finddepth +$(call Package/perlbase-template) +TITLE:=finddepth perl module +endef + +define Package/perlbase-finddepth/install +$(call perlmod/Install,$(1),finddepth.pl,) +endef + +$(eval $(call BuildPackage,perlbase-finddepth)) + + +define Package/perlbase-flush +$(call Package/perlbase-template) +TITLE:=flush perl module +endef + +define Package/perlbase-flush/install +$(call perlmod/Install,$(1),flush.pl,) +endef + +$(eval $(call BuildPackage,perlbase-flush)) + + +define Package/perlbase-gdbm-file +$(call Package/perlbase-template) +TITLE:=GDBM_File perl module +DEPENDS+= +libgdbm +endef + +define Package/perlbase-gdbm-file/install +$(call perlmod/Install,$(1),GDBM_File.pm auto/GDBM_File,) +endef + +$(eval $(call BuildPackage,perlbase-gdbm-file)) + + +define Package/perlbase-getcwd +$(call Package/perlbase-template) +TITLE:=getcwd perl module +endef + +define Package/perlbase-getcwd/install +$(call perlmod/Install,$(1),getcwd.pl,) +endef + +$(eval $(call BuildPackage,perlbase-getcwd)) + + +define Package/perlbase-getopt +$(call Package/perlbase-template) +TITLE:=Getopt perl module +endef + +define Package/perlbase-getopt/install +$(call perlmod/Install,$(1),Getopt newgetopt.pl,) +endef + +$(eval $(call BuildPackage,perlbase-getopt)) + + +define Package/perlbase-getoptpl +$(call Package/perlbase-template) +TITLE:=getoptpl perl module +endef + +define Package/perlbase-getoptpl/install +$(call perlmod/Install,$(1),getopt.pl getopts.pl,) +endef + +$(eval $(call BuildPackage,perlbase-getoptpl)) + + +define Package/perlbase-hash +$(call Package/perlbase-template) +TITLE:=Hash perl module +endef + +define Package/perlbase-hash/install +$(call perlmod/Install,$(1),Hash auto/Hash,) +endef + +$(eval $(call BuildPackage,perlbase-hash)) + + +define Package/perlbase-hostname +$(call Package/perlbase-template) +TITLE:=hostname perl module +endef + +define Package/perlbase-hostname/install +$(call perlmod/Install,$(1),hostname.pl,) +endef + +$(eval $(call BuildPackage,perlbase-hostname)) + + +define Package/perlbase-i18n +$(call Package/perlbase-template) +TITLE:=I18N perl module +endef + +define Package/perlbase-i18n/install +$(call perlmod/Install,$(1),I18N auto/I18N,) +endef + +$(eval $(call BuildPackage,perlbase-i18n)) + + +define Package/perlbase-if +$(call Package/perlbase-template) +TITLE:=if perl module +endef + +define Package/perlbase-if/install +$(call perlmod/Install,$(1),if.pm,) +endef + +$(eval $(call BuildPackage,perlbase-if)) + + +define Package/perlbase-importenv +$(call Package/perlbase-template) +TITLE:=importenv perl module +endef + +define Package/perlbase-importenv/install +$(call perlmod/Install,$(1),importenv.pl,) +endef + +$(eval $(call BuildPackage,perlbase-importenv)) + + +define Package/perlbase-integer +$(call Package/perlbase-template) +TITLE:=integer perl module +endef + +define Package/perlbase-integer/install +$(call perlmod/Install,$(1),integer.pm,) +endef + +$(eval $(call BuildPackage,perlbase-integer)) + + +define Package/perlbase-io +$(call Package/perlbase-template) +TITLE:=IO perl module +endef + +define Package/perlbase-io/install +$(call perlmod/Install,$(1),IO IO.pm auto/IO,) +endef + +$(eval $(call BuildPackage,perlbase-io)) + + +define Package/perlbase-ipc +$(call Package/perlbase-template) +TITLE:=IPC perl module +endef + +define Package/perlbase-ipc/install +$(call perlmod/Install,$(1),IPC auto/IPC,) +endef + +$(eval $(call BuildPackage,perlbase-ipc)) + + +define Package/perlbase-less +$(call Package/perlbase-template) +TITLE:=less perl module +endef + +define Package/perlbase-less/install +$(call perlmod/Install,$(1),less.pm,) +endef + +$(eval $(call BuildPackage,perlbase-less)) + + +define Package/perlbase-list +$(call Package/perlbase-template) +TITLE:=List perl module +endef + +define Package/perlbase-list/install +$(call perlmod/Install,$(1),List auto/List,) +endef + +$(eval $(call BuildPackage,perlbase-list)) + + +define Package/perlbase-locale +$(call Package/perlbase-template) +TITLE:=Locale perl module +endef + +define Package/perlbase-locale/install +$(call perlmod/Install,$(1),Locale,Locale/Constants.pod Locale/Country.pod Locale/Currency.pod Locale/Language.pod Locale/Maketext.pod Locale/Maketext/TPJ13.pod Locale/Script.pod) +endef + +$(eval $(call BuildPackage,perlbase-locale)) + + +define Package/perlbase-log +$(call Package/perlbase-template) +TITLE:=Log perl module +endef + +define Package/perlbase-log/install +$(call perlmod/Install,$(1),Log,) +endef + +$(eval $(call BuildPackage,perlbase-log)) + + +define Package/perlbase-look +$(call Package/perlbase-template) +TITLE:=look perl module +endef + +define Package/perlbase-look/install +$(call perlmod/Install,$(1),look.pl,) +endef + +$(eval $(call BuildPackage,perlbase-look)) + + +define Package/perlbase-math +$(call Package/perlbase-template) +TITLE:=Math perl module +endef + +define Package/perlbase-math/install +$(call perlmod/Install,$(1),Math auto/Math,) +endef + +$(eval $(call BuildPackage,perlbase-math)) + + +define Package/perlbase-memoize +$(call Package/perlbase-template) +TITLE:=Memoize perl module +endef + +define Package/perlbase-memoize/install +$(call perlmod/Install,$(1),Memoize Memoize.pm,) +endef + +$(eval $(call BuildPackage,perlbase-memoize)) + + +define Package/perlbase-mime +$(call Package/perlbase-template) +TITLE:=MIME perl module +endef + +define Package/perlbase-mime/install +$(call perlmod/Install,$(1),MIME auto/MIME,) +endef + +$(eval $(call BuildPackage,perlbase-mime)) + + +define Package/perlbase-module +$(call Package/perlbase-template) +TITLE:=Module perl module +endef + +define Package/perlbase-module/install +$(call perlmod/Install,$(1),Module,Module/Build/API.pod Module/Build/Authoring.pod) +endef + +$(eval $(call BuildPackage,perlbase-module)) + + +define Package/perlbase-mro +$(call Package/perlbase-template) +TITLE:=mro perl module +endef + +define Package/perlbase-mro/install +$(call perlmod/Install,$(1),mro.pm,) +endef + +$(eval $(call BuildPackage,perlbase-mro)) + + +define Package/perlbase-net +$(call Package/perlbase-template) +TITLE:=Net perl module +endef + +define Package/perlbase-net/install +$(call perlmod/Install,$(1),Net,Net/libnetFAQ.pod) +endef + +$(eval $(call BuildPackage,perlbase-net)) + + +define Package/perlbase-next +$(call Package/perlbase-template) +TITLE:=NEXT perl module +endef + +define Package/perlbase-next/install +$(call perlmod/Install,$(1),NEXT.pm,) +endef + +$(eval $(call BuildPackage,perlbase-next)) + + +define Package/perlbase-o +$(call Package/perlbase-template) +TITLE:=O perl module +endef + +define Package/perlbase-o/install +$(call perlmod/Install,$(1),O.pm,) +endef + +$(eval $(call BuildPackage,perlbase-o)) + + +define Package/perlbase-object +$(call Package/perlbase-template) +TITLE:=Object perl module +endef + +define Package/perlbase-object/install +$(call perlmod/Install,$(1),Object,) +endef + +$(eval $(call BuildPackage,perlbase-object)) + + +define Package/perlbase-opcode +$(call Package/perlbase-template) +TITLE:=Opcode perl module +endef + +define Package/perlbase-opcode/install +$(call perlmod/Install,$(1),Opcode.pm auto/Opcode,) +endef + +$(eval $(call BuildPackage,perlbase-opcode)) + + +define Package/perlbase-open +$(call Package/perlbase-template) +TITLE:=open perl module +endef + +define Package/perlbase-open/install +$(call perlmod/Install,$(1),open.pm open2.pl open3.pl,) +endef + +$(eval $(call BuildPackage,perlbase-open)) + + +define Package/perlbase-ops +$(call Package/perlbase-template) +TITLE:=ops perl module +endef + +define Package/perlbase-ops/install +$(call perlmod/Install,$(1),ops.pm,) +endef + +$(eval $(call BuildPackage,perlbase-ops)) + + +define Package/perlbase-package +$(call Package/perlbase-template) +TITLE:=Package perl module +endef + +define Package/perlbase-package/install +$(call perlmod/Install,$(1),Package,) +endef + +$(eval $(call BuildPackage,perlbase-package)) + + +define Package/perlbase-params +$(call Package/perlbase-template) +TITLE:=Params perl module +endef + +define Package/perlbase-params/install +$(call perlmod/Install,$(1),Params,) +endef + +$(eval $(call BuildPackage,perlbase-params)) + + +define Package/perlbase-perl5db +$(call Package/perlbase-template) +TITLE:=perl5db perl module +endef + +define Package/perlbase-perl5db/install +$(call perlmod/Install,$(1),perl5db.pl,) +endef + +$(eval $(call BuildPackage,perlbase-perl5db)) + + +define Package/perlbase-perlio +$(call Package/perlbase-template) +TITLE:=PerlIO perl module +endef + +define Package/perlbase-perlio/install +$(call perlmod/Install,$(1),PerlIO PerlIO.pm auto/PerlIO,) +endef + +$(eval $(call BuildPackage,perlbase-perlio)) + +define Package/perlbase-pod +$(call Package/perlbase-template) +TITLE:=Pod perl module +endef + +define Package/perlbase-pod/install +$(call perlmod/Install,$(1),Pod,) +endef + +$(eval $(call BuildPackage,perlbase-pod)) + + +define Package/perlbase-posix +$(call Package/perlbase-template) +TITLE:=POSIX perl module +endef + +define Package/perlbase-posix/install +$(call perlmod/Install,$(1),POSIX.pm auto/POSIX,) +endef + +$(eval $(call BuildPackage,perlbase-posix)) + + +define Package/perlbase-pwd +$(call Package/perlbase-template) +TITLE:=pwd perl module +endef + +define Package/perlbase-pwd/install +$(call perlmod/Install,$(1),pwd.pl,) +endef + +$(eval $(call BuildPackage,perlbase-pwd)) + + +define Package/perlbase-re +$(call Package/perlbase-template) +TITLE:=re perl module +endef + +define Package/perlbase-re/install +$(call perlmod/Install,$(1),auto/re re.pm,) +endef + +$(eval $(call BuildPackage,perlbase-re)) + + +define Package/perlbase-safe +$(call Package/perlbase-template) +TITLE:=Safe perl module +endef + +define Package/perlbase-safe/install +$(call perlmod/Install,$(1),Safe.pm,) +endef + +$(eval $(call BuildPackage,perlbase-safe)) + + +define Package/perlbase-scalar +$(call Package/perlbase-template) +TITLE:=Scalar perl module +endef + +define Package/perlbase-scalar/install +$(call perlmod/Install,$(1),Scalar,) +endef + +$(eval $(call BuildPackage,perlbase-scalar)) + + +define Package/perlbase-sdbm-file +$(call Package/perlbase-template) +TITLE:=SDBM_File perl module +endef + +define Package/perlbase-sdbm-file/install +$(call perlmod/Install,$(1),SDBM_File.pm auto/SDBM_File,) +endef + +$(eval $(call BuildPackage,perlbase-sdbm-file)) + + +define Package/perlbase-search +$(call Package/perlbase-template) +TITLE:=Search perl module +endef + +define Package/perlbase-search/install +$(call perlmod/Install,$(1),Search,) +endef + +$(eval $(call BuildPackage,perlbase-search)) + + +define Package/perlbase-selectsaver +$(call Package/perlbase-template) +TITLE:=SelectSaver perl module +endef + +define Package/perlbase-selectsaver/install +$(call perlmod/Install,$(1),SelectSaver.pm,) +endef + +$(eval $(call BuildPackage,perlbase-selectsaver)) + + +define Package/perlbase-selfloader +$(call Package/perlbase-template) +TITLE:=SelfLoader perl module +endef + +define Package/perlbase-selfloader/install +$(call perlmod/Install,$(1),SelfLoader.pm,) +endef + +$(eval $(call BuildPackage,perlbase-selfloader)) + + +define Package/perlbase-shell +$(call Package/perlbase-template) +TITLE:=Shell perl module +endef + +define Package/perlbase-shell/install +$(call perlmod/Install,$(1),Shell.pm,) +endef + +$(eval $(call BuildPackage,perlbase-shell)) + + +define Package/perlbase-shellwords +$(call Package/perlbase-template) +TITLE:=shellwords perl module +endef + +define Package/perlbase-shellwords/install +$(call perlmod/Install,$(1),shellwords.pl,) +endef + +$(eval $(call BuildPackage,perlbase-shellwords)) + + +define Package/perlbase-sigtrap +$(call Package/perlbase-template) +TITLE:=sigtrap perl module +endef + +define Package/perlbase-sigtrap/install +$(call perlmod/Install,$(1),sigtrap.pm,) +endef + +$(eval $(call BuildPackage,perlbase-sigtrap)) + + +define Package/perlbase-socket +$(call Package/perlbase-template) +TITLE:=Socket perl module +endef + +define Package/perlbase-socket/install +$(call perlmod/Install,$(1),Socket.pm auto/Socket,) +endef + +$(eval $(call BuildPackage,perlbase-socket)) + + +define Package/perlbase-sort +$(call Package/perlbase-template) +TITLE:=sort perl module +endef + +define Package/perlbase-sort/install +$(call perlmod/Install,$(1),sort.pm,) +endef + +$(eval $(call BuildPackage,perlbase-sort)) + + +define Package/perlbase-stat +$(call Package/perlbase-template) +TITLE:=stat perl module +endef + +define Package/perlbase-stat/install +$(call perlmod/Install,$(1),stat.pl,) +endef + +$(eval $(call BuildPackage,perlbase-stat)) + + +define Package/perlbase-storable +$(call Package/perlbase-template) +TITLE:=Storable perl module +endef + +define Package/perlbase-storable/install +$(call perlmod/Install,$(1),Storable.pm auto/Storable,) +endef + +$(eval $(call BuildPackage,perlbase-storable)) + + +define Package/perlbase-switch +$(call Package/perlbase-template) +TITLE:=Switch perl module +endef + +define Package/perlbase-switch/install +$(call perlmod/Install,$(1),Switch.pm,) +endef + +$(eval $(call BuildPackage,perlbase-switch)) + + +define Package/perlbase-symbol +$(call Package/perlbase-template) +TITLE:=Symbol perl module +endef + +define Package/perlbase-symbol/install +$(call perlmod/Install,$(1),Symbol.pm,) +endef + +$(eval $(call BuildPackage,perlbase-symbol)) + + +define Package/perlbase-sys +$(call Package/perlbase-template) +TITLE:=Sys perl module +endef + +define Package/perlbase-sys/install +$(call perlmod/Install,$(1),Sys auto/Sys,) +endef + +$(eval $(call BuildPackage,perlbase-sys)) + + +define Package/perlbase-syslog +$(call Package/perlbase-template) +TITLE:=syslog perl module +endef + +define Package/perlbase-syslog/install +$(call perlmod/Install,$(1),syslog.pl,) +endef + +$(eval $(call BuildPackage,perlbase-syslog)) + + +define Package/perlbase-tainted +$(call Package/perlbase-template) +TITLE:=tainted perl module +endef + +define Package/perlbase-tainted/install +$(call perlmod/Install,$(1),tainted.pl,) +endef + +$(eval $(call BuildPackage,perlbase-tainted)) + + +define Package/perlbase-term +$(call Package/perlbase-template) +TITLE:=Term perl module +endef + +define Package/perlbase-term/install +$(call perlmod/Install,$(1),Term,) +endef + +$(eval $(call BuildPackage,perlbase-term)) + + +define Package/perlbase-termcap +$(call Package/perlbase-template) +TITLE:=termcap perl module +endef + +define Package/perlbase-termcap/install +$(call perlmod/Install,$(1),termcap.pl,) +endef + +$(eval $(call BuildPackage,perlbase-termcap)) + + +define Package/perlbase-test +$(call Package/perlbase-template) +TITLE:=Test perl module +endef + +define Package/perlbase-test/install +$(call perlmod/Install,$(1),Test Test.pm,Test/Harness/TAP.pod Test/Tutorial.pod) +endef + +$(eval $(call BuildPackage,perlbase-test)) + + +define Package/perlbase-text +$(call Package/perlbase-template) +TITLE:=Text perl module +endef + +define Package/perlbase-text/install +$(call perlmod/Install,$(1),Text auto/Text,) +endef + +$(eval $(call BuildPackage,perlbase-text)) + + +define Package/perlbase-thread +$(call Package/perlbase-template) +TITLE:=Thread perl module +endef + +define Package/perlbase-thread/install +$(call perlmod/Install,$(1),Thread Thread.pm,) +endef + +$(eval $(call BuildPackage,perlbase-thread)) + + +define Package/perlbase-threads +$(call Package/perlbase-template) +TITLE:=threads perl module +endef + +define Package/perlbase-threads/install +$(call perlmod/Install,$(1),auto/threads threads threads.pm,) +endef + +$(eval $(call BuildPackage,perlbase-threads)) + + +define Package/perlbase-tie +$(call Package/perlbase-template) +TITLE:=Tie perl module +endef + +define Package/perlbase-tie/install +$(call perlmod/Install,$(1),Tie,) +endef + +$(eval $(call BuildPackage,perlbase-tie)) + + +define Package/perlbase-time +$(call Package/perlbase-template) +TITLE:=Time perl module +endef + +define Package/perlbase-time/install +$(call perlmod/Install,$(1),Time auto/Time,) +endef + +$(eval $(call BuildPackage,perlbase-time)) + + +define Package/perlbase-timelocal +$(call Package/perlbase-template) +TITLE:=timelocal perl module +endef + +define Package/perlbase-timelocal/install +$(call perlmod/Install,$(1),timelocal.pl,) +endef + +$(eval $(call BuildPackage,perlbase-timelocal)) + + +define Package/perlbase-unicode +$(call Package/perlbase-template) +TITLE:=Unicode perl module +endef + +define Package/perlbase-unicode/install +$(call perlmod/Install,$(1),Unicode auto/Unicode,) +endef + +$(eval $(call BuildPackage,perlbase-unicode)) + + +define Package/perlbase-unicore +$(call Package/perlbase-template) +TITLE:=unicore perl module +endef + +define Package/perlbase-unicore/install +$(call perlmod/Install,$(1),unicore,) +endef + +$(eval $(call BuildPackage,perlbase-unicore)) + + +define Package/perlbase-universal +$(call Package/perlbase-template) +TITLE:=UNIVERSAL perl module +endef + +define Package/perlbase-universal/install +$(call perlmod/Install,$(1),UNIVERSAL.pm,) +endef + +$(eval $(call BuildPackage,perlbase-universal)) + + +define Package/perlbase-user +$(call Package/perlbase-template) +TITLE:=User perl module +endef + +define Package/perlbase-user/install +$(call perlmod/Install,$(1),User,) +endef + +$(eval $(call BuildPackage,perlbase-user)) + + +define Package/perlbase-utf8 +$(call Package/perlbase-template) +TITLE:=utf8 perl module +endef + +define Package/perlbase-utf8/install +$(call perlmod/Install,$(1),utf8.pm utf8_heavy.pl,) +endef + +$(eval $(call BuildPackage,perlbase-utf8)) + + +define Package/perlbase-validate +$(call Package/perlbase-template) +TITLE:=validate perl module +endef + +define Package/perlbase-validate/install +$(call perlmod/Install,$(1),validate.pl,) +endef + +$(eval $(call BuildPackage,perlbase-validate)) + + +define Package/perlbase-version +$(call Package/perlbase-template) +TITLE:=version perl module +endef + +define Package/perlbase-version/install +$(call perlmod/Install,$(1),version.pm,) +endef + +$(eval $(call BuildPackage,perlbase-version)) + + +define Package/perlbase-xsloader +$(call Package/perlbase-template) +TITLE:=XSLoader perl module +endef + +define Package/perlbase-xsloader/install +$(call perlmod/Install,$(1),XSLoader.pm,) +endef + +$(eval $(call BuildPackage,perlbase-xsloader)) diff --git a/lang/perl/perlmod.mk b/lang/perl/perlmod.mk new file mode 100644 index 0000000..157b0f3 --- /dev/null +++ b/lang/perl/perlmod.mk @@ -0,0 +1,53 @@ +# This makefile simplifies perl module builds. +# + +# Build environment +PERL_CMD := $(STAGING_DIR)/usr/bin/perl +PERL_LIB := $(STAGING_DIR)/usr/lib/perl5/5.10 + +# Module install prefix +PERL_SITELIB := /usr/lib/perl5/5.10 + +define perlmod/Configure + (cd $(PKG_BUILD_DIR); \ + PERL5LIB=$(PERL_LIB) \ + PERL_MM_USE_DEFAULT=1 \ + $(2) \ + $(PERL_CMD) Makefile.PL \ + $(1) \ + PERL_LIB=$(PERL_LIB) \ + PERL_ARCHLIB=$(PERL_LIB) \ + INSTALLSITELIB=$(PERL_SITELIB) \ + INSTALLSITEARCH=$(PERL_SITELIB) \ + DESTDIR=$(PKG_INSTALL_DIR) \ + ); +endef + +define perlmod/Compile + PERL5LIB=$(PERL_LIB) \ + $(2) \ + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(1) \ + install +endef + +define perlmod/Install + $(INSTALL_DIR) $(strip $(1))$(PERL_SITELIB) + (cd $(PKG_INSTALL_DIR)$(PERL_SITELIB) && \ + rsync --relative -rlHp --itemize-changes \ + --exclude=\*.pod \ + --exclude=.packlist \ + $(addprefix --exclude=/,$(strip $(3))) \ + --prune-empty-dirs \ + $(strip $(2)) $(strip $(1))$(PERL_SITELIB)) + + chmod -R u+w $(strip $(1))$(PERL_SITELIB) + + @echo "---> Stripping modules in: $(strip $(1))$(PERL_SITELIB)" + find $(strip $(1))$(PERL_SITELIB) -name \*.pm -or -name \*.pl | \ + xargs -r sed -i \ + -e '/^=\(head\|pod\|item\|over\|back\)/,/^=cut/d' \ + -e '/^=\(head\|pod\|item\|over\|back\)/,$$$$d' \ + -e '/^#$$$$/d' \ + -e '/^#[^!"'"'"']/d' +endef diff --git a/lang/php-pear-db/Makefile b/lang/php-pear-db/Makefile new file mode 100644 index 0000000..e135d09 --- /dev/null +++ b/lang/php-pear-db/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=php-pear-db +PKG_VERSION:=1.7.11 +PKG_RELEASE:=1 + +PKG_SOURCE:=DB-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://download.pear.php.net/package +PKG_MD5SUM:=a57302138757500706e075a4d3d87ef7 + +PKG_BUILD_DIR:=$(BUILD_DIR)/DB-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/php-pear-db + SUBMENU:=PHP + SECTION:=lang + CATEGORY:=Languages + TITLE:=PEAR DB module + URL:=http://pear.php.net/package/DB + DEPENDS:=php-pear +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/php-pear-db/install + $(INSTALL_DIR) $(1)/usr/lib/php + $(CP) $(PKG_BUILD_DIR)/DB.php $(PKG_BUILD_DIR)/DB \ + $(1)/usr/lib/php/ +endef + +$(eval $(call BuildPackage,php-pear-db)) diff --git a/lang/php-pear-db/patches/100-php5-deprecation-fixes.patch b/lang/php-pear-db/patches/100-php5-deprecation-fixes.patch new file mode 100644 index 0000000..714b678 --- /dev/null +++ b/lang/php-pear-db/patches/100-php5-deprecation-fixes.patch @@ -0,0 +1,34 @@ +diff -ubrN DB-1.7.11-orig/DB/common.php DB-1.7.11/DB/common.php +--- DB-1.7.11-orig/DB/common.php 2007-03-28 02:11:15.000000000 -0500 ++++ DB-1.7.11/DB/common.php 2007-06-11 14:49:37.000000000 -0500 +@@ -1014,7 +1014,7 @@ + if ($result === DB_OK || DB::isError($result)) { + return $result; + } else { +- $tmp =& new DB_result($this, $result); ++ $tmp = new DB_result($this, $result); + return $tmp; + } + } +@@ -1217,7 +1217,7 @@ + if ($result === DB_OK || DB::isError($result)) { + return $result; + } else { +- $tmp =& new DB_result($this, $result); ++ $tmp = new DB_result($this, $result); + return $tmp; + } + } +diff -ubrN DB-1.7.11-orig/DB.php DB-1.7.11/DB.php +--- DB-1.7.11-orig/DB.php 2007-03-28 02:11:15.000000000 -0500 ++++ DB-1.7.11/DB.php 2007-06-11 14:49:42.000000000 -0500 +@@ -591,7 +591,8 @@ + */ + function isError($value) + { +- return is_a($value, 'DB_Error'); ++ return $value instanceof DB_Error; ++ // return is_a($value, 'DB_Error'); + } + + // }}} diff --git a/lang/php-pear-xmlrpc/Makefile b/lang/php-pear-xmlrpc/Makefile new file mode 100644 index 0000000..23f7679 --- /dev/null +++ b/lang/php-pear-xmlrpc/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=php-pear-xmlrpc +PKG_VERSION:=1.5.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=XML_RPC-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://download.pear.php.net/package +PKG_MD5SUM:=1b516162ad65971b5fd04a7c279627ec + +PKG_BUILD_DIR:=$(BUILD_DIR)/XML_RPC-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/php-pear-xmlrpc + SUBMENU:=PHP + SECTION:=lang + CATEGORY:=Languages + TITLE:=PEAR XML-RPC module + URL:=http://pear.php.net/package/XML_RPC + DEPENDS:=php-pear + PKGARCH:=all +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/php-pear-xmlrpc/install + $(INSTALL_DIR) $(1)/usr/lib/php/XML + $(CP) $(PKG_BUILD_DIR)/Dump.php \ + $(PKG_BUILD_DIR)/RPC.php \ + $(PKG_BUILD_DIR)/Server.php \ + $(1)/usr/lib/php/XML/ +endef + +$(eval $(call BuildPackage,php-pear-xmlrpc)) diff --git a/lang/php-pear/Makefile b/lang/php-pear/Makefile new file mode 100644 index 0000000..22fe6fe --- /dev/null +++ b/lang/php-pear/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=php-pear +PKG_VERSION:=1.5.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=PEAR-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://download.pear.php.net/package +PKG_MD5SUM:=06432c4768fdd7df2c4982c973d3f429 + +PKG_BUILD_DIR:=$(BUILD_DIR)/PEAR-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/php-pear + SUBMENU:=PHP + SECTION:=lang + CATEGORY:=Languages + TITLE:=PEAR + URL:=http://pear.php.net/package/PEAR + DEPENDS:=+php5 +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/php-pear/install + $(INSTALL_DIR) $(1)/usr/lib/php + $(CP) $(PKG_BUILD_DIR)/PEAR.php $(PKG_BUILD_DIR)/PEAR \ + $(1)/usr/lib/php/ +endef + +$(eval $(call BuildPackage,php-pear)) + diff --git a/lang/php-pear/patches/000-remove_deprecation_messages.patch b/lang/php-pear/patches/000-remove_deprecation_messages.patch new file mode 100644 index 0000000..0f79cfc --- /dev/null +++ b/lang/php-pear/patches/000-remove_deprecation_messages.patch @@ -0,0 +1,62 @@ +--- PEAR-1.5.4/PEAR.php 2007-05-07 23:10:49.000000000 -0500 ++++ PEAR-1.5.4/PEAR.php.new 2007-05-23 16:36:05.699498250 -0500 +@@ -278,7 +278,8 @@ + */ + function isError($data, $code = null) + { +- if (is_a($data, 'PEAR_Error')) { ++ //if (is_a($data, 'PEAR_Error')) { ++ if ( $data instanceof PEAR_Error ) { + if (is_null($code)) { + return true; + } elseif (is_string($code)) { +@@ -334,7 +335,8 @@ + + function setErrorHandling($mode = null, $options = null) + { +- if (isset($this) && is_a($this, 'PEAR')) { ++ //if (isset($this) && is_a($this, 'PEAR')) { ++ if ( isset($this) && $this instanceof PEAR ) { + $setmode = &$this->_default_error_mode; + $setoptions = &$this->_default_error_options; + } else { +@@ -588,7 +590,8 @@ + $code = null, + $userinfo = null) + { +- if (isset($this) && is_a($this, 'PEAR')) { ++ //if (isset($this) && is_a($this, 'PEAR')) { ++ if ( isset($this) && $this instanceof PEAR ) { + $a = &$this->raiseError($message, $code, null, null, $userinfo); + return $a; + } else { +@@ -686,7 +689,8 @@ + function pushErrorHandling($mode, $options = null) + { + $stack = &$GLOBALS['_PEAR_error_handler_stack']; +- if (isset($this) && is_a($this, 'PEAR')) { ++ //if (isset($this) && is_a($this, 'PEAR')) { ++ if (isset($this) && $this instanceof PEAR ) { + $def_mode = &$this->_default_error_mode; + $def_options = &$this->_default_error_options; + } else { +@@ -695,7 +699,8 @@ + } + $stack[] = array($def_mode, $def_options); + +- if (isset($this) && is_a($this, 'PEAR')) { ++ //if (isset($this) && is_a($this, 'PEAR')) { ++ if (isset($this) && $this instanceof PEAR ) { + $this->setErrorHandling($mode, $options); + } else { + PEAR::setErrorHandling($mode, $options); +@@ -720,7 +725,8 @@ + array_pop($stack); + list($mode, $options) = $stack[sizeof($stack) - 1]; + array_pop($stack); +- if (isset($this) && is_a($this, 'PEAR')) { ++ //if (isset($this) && is_a($this, 'PEAR')) { ++ if (isset($this) && $this instanceof PEAR ) { + $this->setErrorHandling($mode, $options); + } else { + PEAR::setErrorHandling($mode, $options); diff --git a/lang/php4/Makefile b/lang/php4/Makefile new file mode 100644 index 0000000..2ba1bf3 --- /dev/null +++ b/lang/php4/Makefile @@ -0,0 +1,369 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=php4 +PKG_VERSION:=4.4.9 +PKG_RELEASE:=1 + +PKG_SOURCE:=php-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.php.net/distributions/ +PKG_MD5SUM:=2e3b2a0e27f10cb84fd00e5ecd7a1880 +PKG_BUILD_DIR:=$(BUILD_DIR)/php-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/php4/Default + SUBMENU:=PHP + SECTION:=lang + CATEGORY:=Languages + TITLE:=PHP4 Hypertext preprocessor + DEPENDS:=@!TARGET_ixp4xx + URL:=http://www.php.net/ +endef + +define Package/php4/Default/description + PHP is a widely-used general-purpose scripting language that is especially + suited for Web development and can be embedded into HTML. +endef + +define Package/php4 + $(call Package/php4/Default) + DEPENDS:=+libopenssl +zlib +endef + +define Package/php4/description +$(call Package/php4/Default/description) + This package contains only the PHP config file. You must actually choose + your PHP flavour (cli, cgi or fastcgi). +endef + +define Package/php4-cli + $(call Package/php4/Default) + DEPENDS:=php4 + TITLE+= (CLI) +endef + +define Package/php4-cli/description +$(call Package/php4/Default/description) + This package contains the CLI version of the PHP4 interpreter. +endef + +define Package/php4-cgi + $(call Package/php4/Default) + DEPENDS:=php4 + TITLE+= (CGI) +endef + +define Package/php4-cgi/description +$(call Package/php4/Default/description) + This package contains the CGI version of the PHP4 interpreter. +endef + +define Package/php4-fastcgi + $(call Package/php4/Default) + DEPENDS:=php4 + TITLE+= (FastCGI) +endef + +define Package/php4-fastcgi/description +$(call Package/php4/Default/description) + This package contains the FastCGI version of the PHP4 interpreter. +endef + +define Package/php4-mod-curl + $(call Package/php4/Default) + DEPENDS:=php4 +libcurl + TITLE:=cURL module +endef + +define Package/php4-mod-ftp + $(call Package/php4/Default) + DEPENDS:=php4 + TITLE:=FTP module +endef + +define Package/php4-mod-gd + $(call Package/php4/Default) + DEPENDS:=php4 +libgd + TITLE:=GD graphics module +endef + +define Package/php4-mod-gmp + $(call Package/php4/Default) + DEPENDS:=php4 +libgmp + TITLE:=GMP module +endef + +define Package/php4-mod-ldap + $(call Package/php4/Default) + DEPENDS:=php4 +libopenldap + TITLE:=LDAP module +endef + +define Package/php4-mod-mysql + $(call Package/php4/Default) + DEPENDS:=php4 +libmysqlclient + TITLE:=MySQL module +endef + +define Package/php4-mod-openssl + $(call Package/php4/Default) + DEPENDS:=php4 +libopenssl + TITLE:=OpenSSL module +endef + +define Package/php4-mod-pcre + $(call Package/php4/Default) + DEPENDS:=php4 +libpcre + TITLE:=PCRE module +endef + +define Package/php4-mod-pgsql + $(call Package/php4/Default) + DEPENDS:=php4 +libpq + TITLE:=PostgreSQL module +endef + +define Package/php4-mod-session + $(call Package/php4/Default) + DEPENDS:=php4 + TITLE:=Session module +endef + +define Package/php4-mod-sockets + $(call Package/php4/Default) + DEPENDS:=php4 + TITLE:=Sockets module +endef + +define Package/php4-mod-xml + $(call Package/php4/Default) + DEPENDS:=php4 +libexpat + TITLE:=XML module +endef + +PKG_CONFIGURE_LIBS:= -lcrypto -lssl +PKG_CONFIGURE_OPTS:= \ + --enable-shared \ + --disable-static \ + --disable-rpath \ + --disable-debug \ + --without-pear \ + \ + --with-config-file-path=/etc \ + --enable-magic-quotes \ + --enable-memory-limit \ + --disable-overload \ + --disable-short-tags \ + \ + --disable-ctype \ + --disable-dom \ + --enable-ftp=shared \ + --without-gettext \ + --without-iconv \ + --disable-mbstring \ + --disable-mbregex \ + --with-openssl=shared,"$(STAGING_DIR)/usr" \ + --with-kerberos=no \ + --with-openssl-dir="$(STAGING_DIR)/usr" \ + --enable-session=shared \ + --enable-sockets=shared \ + --disable-tokenizer \ + --with-zlib="$(STAGING_DIR)/usr" \ + --with-zlib-dir="$(STAGING_DIR)/usr" \ + +ifneq ($(SDK),) + PKG_BUILD_DEPENDS:=libopenssl zlib libcurl libgd libgmp libopenldap libmysqlclient libpq libexpat +# force PKG_CONFIGURE_{LIBS,OPTS} below when built in the SDK + CONFIG_PACKAGE_php4-cli:=m + CONFIG_PACKAGE_php4-cgi:=m + CONFIG_PACKAGE_php4-fastcgi:=m + CONFIG_PACKAGE_php4-mod-curl:=m + CONFIG_PACKAGE_php4-mod-gd:=m + CONFIG_PACKAGE_php4-mod-gmp:=m + CONFIG_PACKAGE_php4-mod-ldap:=m + CONFIG_PACKAGE_php4-mod-mysql:=m + CONFIG_PACKAGE_php4-mod-pcre:=m + CONFIG_PACKAGE_php4-mod-pgsql:=m + CONFIG_PACKAGE_php4-mod-xml:=m +endif + +ifneq ($(CONFIG_PACKAGE_php4-mod-curl),) + PKG_CONFIGURE_OPTS+= --with-curl=shared,"$(STAGING_DIR)/usr" +else + PKG_CONFIGURE_OPTS+= --without-curl +endif +ifneq ($(CONFIG_PACKAGE_php4-mod-gd),) + PKG_CONFIGURE_OPTS+= --with-gd=shared,"$(STAGING_DIR)/usr" \ + --without-freetype-dir \ + --with-jpeg-dir="$(STAGING_DIR)/usr" \ + --with-png-dir="$(STAGING_DIR)/usr" \ + --without-xpm-dir \ + --without-ttf \ + --without-t1lib \ + --enable-gd-native-ttf \ + --disable-gd-jis-conv +else + PKG_CONFIGURE_OPTS+= --without-gd +endif +ifneq ($(CONFIG_PACKAGE_php4-mod-gmp),) + PKG_CONFIGURE_OPTS+= --with-gmp=shared,"$(STAGING_DIR)/usr" +else + PKG_CONFIGURE_OPTS+= --without-gmp +endif +ifneq ($(CONFIG_PACKAGE_php4-mod-ldap),) + PKG_CONFIGURE_OPTS+= --with-ldap=shared,"$(STAGING_DIR)/usr" + --with-ldap-sasl="$(STAGING_DIR)/usr" +else + PKG_CONFIGURE_OPTS+= --without-ldap +endif +ifneq ($(CONFIG_PACKAGE_php4-mod-mysql),) + PKG_CONFIGURE_OPTS+= --with-mysql=shared,"$(STAGING_DIR)/usr" +else + PKG_CONFIGURE_OPTS+= --without-mysql +endif +ifneq ($(CONFIG_PACKAGE_php4-mod-pcre),) + PKG_CONFIGURE_OPTS+= --with-pcre-regex=shared,"$(STAGING_DIR)/usr" +else + PKG_CONFIGURE_OPTS+= --without-pcre-regex +endif +ifneq ($(CONFIG_PACKAGE_php4-mod-pgsql),) + PKG_CONFIGURE_OPTS+= --with-pgsql=shared,"$(STAGING_DIR)/usr" +else + PKG_CONFIGURE_OPTS+= --without-pgsql +endif +ifneq ($(CONFIG_PACKAGE_php4-mod-xml),) + PKG_CONFIGURE_OPTS+= --enable-xml=shared \ + --with-expat-dir="$(STAGING_DIR)/usr" +else + PKG_CONFIGURE_OPTS+= --disable-xml +endif + +define Build/Configure +endef + +TARGET_CFLAGS += $(if $(CONFIG_BIG_ENDIAN),-DIEEE_BIG_ENDIAN,-DIEEE_LITTLE_ENDIAN) $(FPIC) + +ifneq ($(CONFIG_PACKAGE_php4-cli),) + define Build/Compile/php4-cli + -$(MAKE) -C $(PKG_BUILD_DIR) clean + $(call Build/Configure/Default, \ + $(PKG_CONFIGURE_OPTS) \ + --enable-cli \ + --disable-cgi \ + --disable-fastcgi \ + --enable-force-cgi-redirect \ + --enable-discard-path \ + , \ + LIBS="$(PKG_CONFIGURE_LIBS)" \ + php_cv_cc_rpath="no" \ + ) + LD_LIBRARY_PATH="" $(MAKE) -C $(PKG_BUILD_DIR) + mv $(PKG_BUILD_DIR)/sapi/cli/php $(PKG_BUILD_DIR)/php-cli + endef +endif + +ifneq ($(CONFIG_PACKAGE_php4-cgi),) + define Build/Compile/php4-cgi + -$(MAKE) -C $(PKG_BUILD_DIR) clean + $(call Build/Configure/Default, \ + $(PKG_CONFIGURE_OPTS) \ + --disable-cli \ + --enable-cgi \ + --disable-fastcgi \ + --enable-force-cgi-redirect \ + --enable-discard-path \ + , \ + LIBS="$(PKG_CONFIGURE_LIBS)" \ + php_cv_cc_rpath="no" \ + ) + LD_LIBRARY_PATH="" $(MAKE) -C $(PKG_BUILD_DIR) + mv $(PKG_BUILD_DIR)/sapi/cgi/php $(PKG_BUILD_DIR)/php-cgi + endef +endif + +ifneq ($(CONFIG_PACKAGE_php4-fastcgi),) + define Build/Compile/php4-fastcgi + -$(MAKE) -C $(PKG_BUILD_DIR) clean + $(call Build/Configure/Default, \ + $(PKG_CONFIGURE_OPTS) \ + --disable-cli \ + --enable-cgi \ + --enable-fastcgi \ + --enable-force-cgi-redirect \ + --enable-discard-path \ + , \ + LIBS="$(PKG_CONFIGURE_LIBS)" \ + php_cv_cc_rpath="no" \ + ) + LD_LIBRARY_PATH="" $(MAKE) -C $(PKG_BUILD_DIR) + mv $(PKG_BUILD_DIR)/sapi/cgi/php $(PKG_BUILD_DIR)/php-fastcgi + endef +endif + +define Build/Compile + $(call Build/Compile/php4-cli) + $(call Build/Compile/php4-cgi) + $(call Build/Compile/php4-fastcgi) +endef + +define Package/php4/conffiles +/etc/php.ini +endef + +define Package/php4/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/php.ini $(1)/etc/ +endef + +define Package/php4-cli/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/php-cli $(1)/usr/bin/php +endef + +define Package/php4-cgi/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/php-cgi $(1)/usr/bin/php +endef + +define Package/php4-fastcgi/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/php-fastcgi $(1)/usr/sbin/php + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/php.init $(1)/etc/init.d/php +endef + +define BuildPlugin + define Package/$(1)/install + [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/php + for m in $(2); do \ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$$$$$$$${m}.so $$(1)/usr/lib/php/ ; \ + done + endef + + $$(eval $$(call BuildPackage,$(1))) +endef + +$(eval $(call BuildPackage,php4)) +$(eval $(call BuildPackage,php4-cli)) +$(eval $(call BuildPackage,php4-cgi)) +$(eval $(call BuildPackage,php4-fastcgi)) +$(eval $(call BuildPlugin,php4-mod-curl,curl)) +$(eval $(call BuildPlugin,php4-mod-ftp,ftp)) +$(eval $(call BuildPlugin,php4-mod-gd,gd)) +$(eval $(call BuildPlugin,php4-mod-gmp,gmp)) +$(eval $(call BuildPlugin,php4-mod-ldap,ldap)) +$(eval $(call BuildPlugin,php4-mod-mysql,mysql)) +$(eval $(call BuildPlugin,php4-mod-openssl,openssl)) +$(eval $(call BuildPlugin,php4-mod-pcre,pcre)) +$(eval $(call BuildPlugin,php4-mod-pgsql,pgsql)) +$(eval $(call BuildPlugin,php4-mod-session,session)) +$(eval $(call BuildPlugin,php4-mod-sockets,sockets)) +$(eval $(call BuildPlugin,php4-mod-xml,xml)) + diff --git a/lang/php4/files/php.ini b/lang/php4/files/php.ini new file mode 100644 index 0000000..ae16d0b --- /dev/null +++ b/lang/php4/files/php.ini @@ -0,0 +1,561 @@ +[PHP] + +cgi.fix_pathinfo=1 + +zend.ze1_compatibility_mode = Off + +;short_open_tag = Off +asp_tags = Off +precision = 12 +y2k_compliance = On +output_buffering = Off + +zlib.output_compression = Off +;zlib.output_handler = +implicit_flush = Off + +unserialize_callback_func= +serialize_precision = 100 + +allow_call_time_pass_reference = On + +safe_mode = Off + +safe_mode_gid = Off + +safe_mode_include_dir = + +safe_mode_exec_dir = + +safe_mode_allowed_env_vars = PHP_ + +safe_mode_protected_env_vars = LD_LIBRARY_PATH + +;open_basedir = + +disable_functions = + +disable_classes = + +; Colors for Syntax Highlighting mode. Anything that's acceptable in +; would work. +;highlight.string = #DD0000 +;highlight.comment = #FF9900 +;highlight.keyword = #007700 +;highlight.bg = #FFFFFF +;highlight.default = #0000BB +;highlight.html = #000000 + +expose_php = On + + +;;;;;;;;;;;;;;;;;;; +; Resource Limits ; +;;;;;;;;;;;;;;;;;;; + +max_execution_time = 30 ; Maximum execution time of each script, in seconds +max_input_time = 60 ; Maximum amount of time each script may spend parsing request data +memory_limit = 8M ; Maximum amount of memory a script may consume (8MB) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Error handling and logging ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; error_reporting is a bit-field. Or each number up to get desired error +; reporting level +; E_ALL - All errors and warnings (doesn't include E_STRICT) +; E_ERROR - fatal run-time errors +; E_WARNING - run-time warnings (non-fatal errors) +; E_PARSE - compile-time parse errors +; E_NOTICE - run-time notices (these are warnings which often result +; from a bug in your code, but it's possible that it was +; intentional (e.g., using an uninitialized variable and +; relying on the fact it's automatically initialized to an +; empty string) +; E_STRICT - run-time notices, enable to have PHP suggest changes +; to your code which will ensure the best interoperability +; and forward compatibility of your code +; E_CORE_ERROR - fatal errors that occur during PHP's initial startup +; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's +; initial startup +; E_COMPILE_ERROR - fatal compile-time errors +; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) +; E_USER_ERROR - user-generated error message +; E_USER_WARNING - user-generated warning message +; E_USER_NOTICE - user-generated notice message +; +; Examples: +; +; - Show all errors, except for notices and coding standards warnings +; +;error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT +; +; - Show all errors, except for notices +; +;error_reporting = E_ALL & ~E_NOTICE +; +; - Show only errors +; +;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR +; +; - Show all errors except for notices and coding standards warnings +; +error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT + +; Print out errors (as a part of the output). For production web sites, +; you're strongly encouraged to turn this feature off, and use error logging +; instead (see below). Keeping display_errors enabled on a production web site +; may reveal security information to end users, such as file paths on your Web +; server, your database schema or other information. +display_errors = On + +; Even when display_errors is on, errors that occur during PHP's startup +; sequence are not displayed. It's strongly recommended to keep +; display_startup_errors off, except for when debugging. +display_startup_errors = Off + +; Log errors into a log file (server-specific log, stderr, or error_log (below)) +; As stated above, you're strongly advised to use error logging in place of +; error displaying on production web sites. +log_errors = Off + +; Set maximum length of log_errors. In error_log information about the source is +; added. The default is 1024 and 0 allows to not apply any maximum length at all. +log_errors_max_len = 1024 + +; Do not log repeated messages. Repeated errors must occur in same file on same +; line until ignore_repeated_source is set true. +ignore_repeated_errors = Off + +; Ignore source of message when ignoring repeated messages. When this setting +; is On you will not log errors with repeated messages from different files or +; sourcelines. +ignore_repeated_source = Off + +; If this parameter is set to Off, then memory leaks will not be shown (on +; stdout or in the log). This has only effect in a debug compile, and if +; error reporting includes E_WARNING in the allowed list +report_memleaks = On + +; Store the last error/warning message in $php_errormsg (boolean). +track_errors = Off + +; Disable the inclusion of HTML tags in error messages. +; Note: Never use this feature for production boxes. +;html_errors = Off + +; If html_errors is set On PHP produces clickable error messages that direct +; to a page describing the error or function causing the error in detail. +; You can download a copy of the PHP manual from http://www.php.net/docs.php +; and change docref_root to the base URL of your local copy including the +; leading '/'. You must also specify the file extension being used including +; the dot. +; Note: Never use this feature for production boxes. +;docref_root = "/phpmanual/" +;docref_ext = .html + +; String to output before an error message. +;error_prepend_string = "" + +; String to output after an error message. +;error_append_string = "" + +; Log errors to specified file. +;error_log = filename + +; Log errors to syslog (Event Log on NT, not valid in Windows 95). +;error_log = syslog + + +;;;;;;;;;;;;;;;;; +; Data Handling ; +;;;;;;;;;;;;;;;;; +; +; Note - track_vars is ALWAYS enabled as of PHP 4.0.3 + +; The separator used in PHP generated URLs to separate arguments. +; Default is "&". +;arg_separator.output = "&" + +; List of separator(s) used by PHP to parse input URLs into variables. +; Default is "&". +; NOTE: Every character in this directive is considered as separator! +;arg_separator.input = ";&" + +; This directive describes the order in which PHP registers GET, POST, Cookie, +; Environment and Built-in variables (G, P, C, E & S respectively, often +; referred to as EGPCS or GPC). Registration is done from left to right, newer +; values override older values. +variables_order = "EGPCS" + +; Whether or not to register the EGPCS variables as global variables. You may +; want to turn this off if you don't want to clutter your scripts' global scope +; with user data. This makes most sense when coupled with track_vars - in which +; case you can access all of the GPC variables through the $HTTP_*_VARS[], +; variables. +; +; You should do your best to write your scripts so that they do not require +; register_globals to be on; Using form variables as globals can easily lead +; to possible security problems, if the code is not very well thought of. +register_globals = Off + +; Whether or not to register the old-style input arrays, HTTP_GET_VARS +; and friends. If you're not using them, it's recommended to turn them off, +; for performance reasons. +register_long_arrays = On + +; This directive tells PHP whether to declare the argv&argc variables (that +; would contain the GET information). If you don't use these variables, you +; should turn it off for increased performance. +register_argc_argv = On + +; Maximum size of POST data that PHP will accept. +post_max_size = 8M + +; Magic quotes +; + +; Magic quotes for incoming GET/POST/Cookie data. +magic_quotes_gpc = On + +; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. +magic_quotes_runtime = Off + +; Use Sybase-style magic quotes (escape ' with '' instead of \'). +magic_quotes_sybase = Off + +; Automatically add files before or after any PHP document. +auto_prepend_file = +auto_append_file = + +; As of 4.0b4, PHP always outputs a character encoding by default in +; the Content-type: header. To disable sending of the charset, simply +; set it to be empty. +; +; PHP's built-in default is text/html +default_mimetype = "text/html" +;default_charset = "iso-8859-1" + +; Always populate the $HTTP_RAW_POST_DATA variable. +;always_populate_raw_post_data = On + + +;;;;;;;;;;;;;;;;;;;;;;;;; +; Paths and Directories ; +;;;;;;;;;;;;;;;;;;;;;;;;; + +; UNIX: "/path1:/path2" +;include_path = ".:/php/includes" +; +; Windows: "\path1;\path2" +;include_path = ".;c:\php\includes" + +; The root of the PHP pages, used only if nonempty. +; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root +; if you are running php as a CGI under any web server (other than IIS) +; see documentation for security issues. The alternate is to use the +; cgi.force_redirect configuration below +doc_root = /www + +; The directory under which PHP opens the script using /~username used only +; if nonempty. +user_dir = + +; Directory in which the loadable extensions (modules) reside. +extension_dir = "/usr/lib/php" + +; Whether or not to enable the dl() function. The dl() function does NOT work +; properly in multithreaded servers, such as IIS or Zeus, and is automatically +; disabled on them. +enable_dl = On + +; cgi.force_redirect is necessary to provide security running PHP as a CGI under +; most web servers. Left undefined, PHP turns this on by default. You can +; turn it off here AT YOUR OWN RISK +; **You CAN safely turn this off for IIS, in fact, you MUST.** +; cgi.force_redirect = 1 + +; if cgi.nph is enabled it will force cgi to always sent Status: 200 with +; every request. +; cgi.nph = 1 + +; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape +; (iPlanet) web servers, you MAY need to set an environment variable name that PHP +; will look for to know it is OK to continue execution. Setting this variable MAY +; cause security issues, KNOW WHAT YOU ARE DOING FIRST. +; cgi.redirect_status_env = ; + +; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate +; security tokens of the calling client. This allows IIS to define the +; security context that the request runs under. mod_fastcgi under Apache +; does not currently support this feature (03/17/2002) +; Set to 1 if running under IIS. Default is zero. +; fastcgi.impersonate = 1; + +; cgi.rfc2616_headers configuration option tells PHP what type of headers to +; use when sending HTTP response code. If it's set 0 PHP sends Status: header that +; is supported by Apache. When this option is set to 1 PHP will send +; RFC2616 compliant header. +; Default is zero. +;cgi.rfc2616_headers = 0 + + +;;;;;;;;;;;;;;;; +; File Uploads ; +;;;;;;;;;;;;;;;; + +; Whether to allow HTTP file uploads. +file_uploads = On + +; Temporary directory for HTTP uploaded files (will use system default if not +; specified). +upload_tmp_dir = /tmp + +; Maximum allowed size for uploaded files. +upload_max_filesize = 2M + + +;;;;;;;;;;;;;;;;;; +; Fopen wrappers ; +;;;;;;;;;;;;;;;;;; + +; Whether to allow the treatment of URLs (like http:// or ftp://) as files. +allow_url_fopen = On + +; Define the anonymous ftp password (your email address) +;from="john@doe.com" + +; Define the User-Agent string +; user_agent="PHP" + +; Default timeout for socket based streams (seconds) +default_socket_timeout = 60 + +; If your scripts have to deal with files from Macintosh systems, +; or you are running on a Mac and need to deal with files from +; unix or win32 systems, setting this flag will cause PHP to +; automatically detect the EOL character in those files so that +; fgets() and file() will work regardless of the source of the file. +; auto_detect_line_endings = Off + + +;;;;;;;;;;;;;;;;;;;;;; +; Dynamic Extensions ; +;;;;;;;;;;;;;;;;;;;;;; +; +; If you wish to have an extension loaded automatically, use the following +; syntax: +; +; extension=modulename.extension +; +; For example, on Windows: +; +; extension=msql.dll +; +; ... or under UNIX: +; +; extension=msql.so +; +; Note that it should be the name of the module only; no directory information +; needs to go here. Specify the location of the extension with the +; extension_dir directive above. + + +;Windows Extensions +;Note that ODBC support is built in, so no dll is needed for it. +; + +;extension=ftp.so +;extension=gd.so +;extension=mysql.so +;extension=pcre.so +;extension=session.so +;extension=sockets.so +;extension=xml.so + + + + +;;;;;;;;;;;;;;;;;;; +; Module Settings ; +;;;;;;;;;;;;;;;;;;; + +[SQL] +sql.safe_mode = Off + +[Session] +; Handler used to store/retrieve data. +session.save_handler = files + +; Argument passed to save_handler. In the case of files, this is the path +; where data files are stored. Note: Windows users have to change this +; variable in order to use PHP's session functions. +; +; As of PHP 4.0.1, you can define the path as: +; +; session.save_path = "N;/path" +; +; where N is an integer. Instead of storing all the session files in +; /path, what this will do is use subdirectories N-levels deep, and +; store the session data in those directories. This is useful if you +; or your OS have problems with lots of files in one directory, and is +; a more efficient layout for servers that handle lots of sessions. +; +; NOTE 1: PHP will not create this directory structure automatically. +; You can use the script in the ext/session dir for that purpose. +; NOTE 2: See the section on garbage collection below if you choose to +; use subdirectories for session storage +; +; The file storage module creates files using mode 600 by default. +; You can change that by using +; +; session.save_path = "N;MODE;/path" +; +; where MODE is the octal representation of the mode. Note that this +; does not overwrite the process's umask. +session.save_path = "/tmp" + +; Whether to use cookies. +session.use_cookies = 1 + +; This option enables administrators to make their users invulnerable to +; attacks which involve passing session ids in URLs; defaults to 0. +; session.use_only_cookies = 1 + +; Name of the session (used as cookie name). +session.name = PHPSESSID + +; Initialize session on request startup. +session.auto_start = 0 + +; Lifetime in seconds of cookie or, if 0, until browser is restarted. +session.cookie_lifetime = 0 + +; The path for which the cookie is valid. +session.cookie_path = / + +; The domain for which the cookie is valid. +session.cookie_domain = + +; Handler used to serialize data. php is the standard serializer of PHP. +session.serialize_handler = php + +; Define the probability that the 'garbage collection' process is started +; on every session initialization. +; The probability is calculated by using gc_probability/gc_divisor, +; e.g. 1/100 means there is a 1% chance that the GC process starts +; on each request. + +session.gc_probability = 1 +session.gc_divisor = 100 + +; After this number of seconds, stored data will be seen as 'garbage' and +; cleaned up by the garbage collection process. +session.gc_maxlifetime = 1440 + +; NOTE: If you are using the subdirectory option for storing session files +; (see session.save_path above), then garbage collection does *not* +; happen automatically. You will need to do your own garbage +; collection through a shell script, cron entry, or some other method. +; For example, the following script would is the equivalent of +; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): +; cd /path/to/sessions; find -cmin +24 | xargs rm + +; PHP 4.2 and less have an undocumented feature/bug that allows you to +; to initialize a session variable in the global scope, albeit register_globals +; is disabled. PHP 4.3 and later will warn you, if this feature is used. +; You can disable the feature and the warning separately. At this time, +; the warning is only displayed, if bug_compat_42 is enabled. + +session.bug_compat_42 = 1 +session.bug_compat_warn = 1 + +; Check HTTP Referer to invalidate externally stored URLs containing ids. +; HTTP_REFERER has to contain this substring for the session to be +; considered as valid. +session.referer_check = + +; How many bytes to read from the file. +session.entropy_length = 0 + +; Specified here to create the session id. +session.entropy_file = + +;session.entropy_length = 16 + +;session.entropy_file = /dev/urandom + +; Set to {nocache,private,public,} to determine HTTP caching aspects +; or leave this empty to avoid sending anti-caching headers. +session.cache_limiter = nocache + +; Document expires after n minutes. +session.cache_expire = 180 + +; trans sid support is disabled by default. +; Use of trans sid may risk your users security. +; Use this option with caution. +; - User may send URL contains active session ID +; to other person via. email/irc/etc. +; - URL that contains active session ID may be stored +; in publically accessible computer. +; - User may access your site with the same session ID +; always using URL stored in browser's history or bookmarks. +session.use_trans_sid = 0 + +; Select a hash function +; 0: MD5 (128 bits) +; 1: SHA-1 (160 bits) +session.hash_function = 0 + +; Define how many bits are stored in each character when converting +; the binary hash data to something readable. +; +; 4 bits: 0-9, a-f +; 5 bits: 0-9, a-v +; 6 bits: 0-9, a-z, A-Z, "-", "," +session.hash_bits_per_character = 4 + +; The URL rewriter will look for URLs in a defined set of HTML tags. +; form/fieldset are special; if you include them here, the rewriter will +; add a hidden field with the info which is otherwise appended +; to URLs. If you want XHTML conformity, remove the form entry. +; Note that all valid entries require a "=", even if no value follows. +url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" + + +[Assertion] +; Assert(expr); active by default. +;assert.active = On + +; Issue a PHP warning for each failed assertion. +;assert.warning = On + +; Don't bail out by default. +;assert.bail = Off + +; User-function to be called if an assertion fails. +;assert.callback = 0 + +; Eval the expression with current error_reporting(). Set to true if you want +; error_reporting(0) around the eval(). +;assert.quiet_eval = 0 + + + + + +[exif] +; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. +; With mbstring support this will automatically be converted into the encoding +; given by corresponding encode setting. When empty mbstring.internal_encoding +; is used. For the decode settings you can distinguish between motorola and +; intel byte order. A decode setting cannot be empty. +;exif.encode_unicode = ISO-8859-15 +;exif.decode_unicode_motorola = UCS-2BE +;exif.decode_unicode_intel = UCS-2LE +;exif.encode_jis = +;exif.decode_jis_motorola = JIS +;exif.decode_jis_intel = JIS + diff --git a/lang/php4/files/php.init b/lang/php4/files/php.init new file mode 100644 index 0000000..373f396 --- /dev/null +++ b/lang/php4/files/php.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start() { + $BIN -b $PORT & +} + +stop() { + killall php +} + diff --git a/lang/php4/patches/002-configure.patch b/lang/php4/patches/002-configure.patch new file mode 100644 index 0000000..af47d5b --- /dev/null +++ b/lang/php4/patches/002-configure.patch @@ -0,0 +1,83 @@ +--- a/configure ++++ b/configure +@@ -12503,7 +12503,7 @@ fi + ac_libs=$LIBS + LIBS="$LIBS -ldl" + if test "$cross_compiling" = yes; then +- found=no ++ found=yes + else + cat > conftest.$ac_ext <&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + if test "$cross_compiling" = yes; then +- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&6 + echo "configure:43893: checking if iconv supports errno" >&5 + if test "$cross_compiling" = yes; then +- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <= 0x10000000L ++#define OPENSSL_D2I_X509_CAST d2i_of_void * ++#else ++#define OPENSSL_D2I_X509_CAST char *(*)() ++#define LHASH_OF(x) LHASH ++#endif ++ + static unsigned char arg2_force_ref[] = + { 2, BYREF_NONE, BYREF_FORCE }; + static unsigned char arg2and3_force_ref[] = +@@ -179,8 +186,8 @@ inline static int php_openssl_safe_mode_ + static char default_ssl_conf_filename[MAXPATHLEN]; + + struct php_x509_request { +- LHASH * global_config; /* Global SSL config */ +- LHASH * req_config; /* SSL config for this request */ ++ LHASH_OF(CONF_VALUE) * global_config; /* Global SSL config */ ++ LHASH_OF(CONF_VALUE) * req_config; /* SSL config for this request */ + const EVP_MD * md_alg; + const EVP_MD * digest; + char * section_name, +@@ -340,7 +347,7 @@ static inline int php_openssl_config_che + const char * section_label, + const char * config_filename, + const char * section, +- LHASH * config TSRMLS_DC) ++ LHASH_OF(CONF_VALUE) * config TSRMLS_DC) + { + X509V3_CTX ctx; + +@@ -720,7 +727,7 @@ static X509 * php_openssl_x509_from_zval + if (in == NULL) + return NULL; + +- cert = (X509 *) PEM_ASN1_read_bio((char *(*)())d2i_X509, ++ cert = (X509 *) PEM_ASN1_read_bio((OPENSSL_D2I_X509_CAST)d2i_X509, + PEM_STRING_X509, in, + NULL, NULL, NULL); + BIO_free(in); +@@ -1859,7 +1866,7 @@ static int php_openssl_is_private_key(EV + case EVP_PKEY_RSA2: + assert(pkey->pkey.rsa != NULL); + +- if (NULL == pkey->pkey.rsa->p || NULL == pkey->pkey.rsa->q) ++ if (NULL == pkey->pkey.rsa || NULL == pkey->pkey.rsa->p || NULL == pkey->pkey.rsa->q) + return 0; + break; + #endif +@@ -1871,7 +1878,7 @@ static int php_openssl_is_private_key(EV + case EVP_PKEY_DSA4: + assert(pkey->pkey.dsa != NULL); + +- if (NULL == pkey->pkey.dsa->p || NULL == pkey->pkey.dsa->q || NULL == pkey->pkey.dsa->priv_key) ++ if (NULL == pkey->pkey.dsa || NULL == pkey->pkey.dsa->p || NULL == pkey->pkey.dsa->q || NULL == pkey->pkey.dsa->priv_key) + return 0; + break; + #endif +@@ -1879,7 +1886,7 @@ static int php_openssl_is_private_key(EV + case EVP_PKEY_DH: + assert(pkey->pkey.dh != NULL); + +- if (NULL == pkey->pkey.dh->p || NULL == pkey->pkey.dh->priv_key) ++ if (NULL == pkey->pkey.dh || NULL == pkey->pkey.dh->p || NULL == pkey->pkey.dh->priv_key) + return 0; + break; + #endif diff --git a/lang/php5/Makefile b/lang/php5/Makefile new file mode 100644 index 0000000..4435eb8 --- /dev/null +++ b/lang/php5/Makefile @@ -0,0 +1,516 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=php +PKG_VERSION:=5.3.6 +PKG_RELEASE:=3.3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.php.net/distributions/ +PKG_MD5SUM:=2286f5a82a6e8397955a0025c1c2ad98 + +PKG_FIXUP:=libtool no-autoreconf +PKG_BUILD_PARALLEL:=1 + +PHP5_MODULES = \ + apc \ + ctype curl \ + fileinfo \ + dom \ + exif \ + ftp \ + gettext gd gmp \ + hash \ + iconv \ + json \ + ldap \ + mbstring mcrypt mysql \ + openssl \ + pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql \ + session simplexml soap sockets sqlite sqlite3 sysvmsg sysvsem sysvshm \ + tokenizer \ + xml xmlreader xmlwriter \ + +PKG_CONFIG_DEPENDS:= \ + CONFIG_PACKAGE_php5-cgi CONFIG_PACKAGE_php5-cli \ + $(patsubst %,CONFIG_PACKAGE_php5-mod-%,$(PHP5_MODULES)) \ + CONFIG_PHP5_FILTER CONFIG_PHP5_LIBXML + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/php5/Default + SUBMENU:=PHP + SECTION:=lang + CATEGORY:=Languages + TITLE:=PHP5 Hypertext preprocessor + URL:=http://www.php.net/ + MAINTAINER:=Michael Heimpold + DEPENDS:=php5 +endef + +define Package/php5/Default/description + PHP is a widely-used general-purpose scripting language that is especially + suited for Web development and can be embedded into HTML. +endef + +define Package/php5/config + config PHP5_FILTER + bool "PHP5 Filter support" + depends on PACKAGE_php5-cli || PACKAGE_php5-cgi + + config PHP5_LIBXML + bool "PHP5 LIBXML support" + depends on PACKAGE_php5-cli || PACKAGE_php5-cgi +endef + +define Package/php5 + $(call Package/php5/Default) + + DEPENDS:=+libpcre +zlib \ + +PHP5_LIBXML:libxml2 \ + +PACKAGE_php5-mod-apc:librt \ + +(PACKAGE_php5-mod-sqlite3||PACKAGE_php5-mod-pdo-sqlite):libsqlite3 \ + +(PACKAGE_php5-mod-sqlite3||PACKAGE_php5-mod-pdo-sqlite):libpthread +endef + +define Package/php5/description + $(call Package/php5/Default/description) + This package contains only the PHP config file. You must actually choose + your PHP flavour (cli, cgi or fastcgi). +endef + +define Package/php5-cli + $(call Package/php5/Default) + TITLE+= (CLI) +endef + +define Package/php5-cli/description + $(call Package/php5/Default/description) + This package contains the CLI version of the PHP5 interpreter. +endef + +define Package/php5-cgi + $(call Package/php5/Default) + TITLE+= (CGI & FastCGI) +endef + +define Package/php5-cgi/description + $(call Package/php5/Default/description) + This package contains the CGI version of the PHP5 interpreter. +endef + +define Package/php5-fastcgi + $(call Package/php5/Default) + DEPENDS+= +php5-cgi + TITLE:=FastCGI startup script +endef + +define Package/php5-fastcgi/description + As FastCGI support is now a core feature the php5-fastcgi package now depends + on the php5-cgi package, containing just the startup script. +endef + +CONFIGURE_ARGS+= \ + --enable-shared \ + --disable-static \ + --disable-rpath \ + --disable-debug \ + --without-pear \ + \ + --with-config-file-path=/etc \ + --with-config-file-scan-dir=/etc/php5 \ + --enable-magic-quotes \ + --disable-short-tags \ + \ + --with-zlib="$(STAGING_DIR)/usr" \ + --with-zlib-dir="$(STAGING_DIR)/usr" \ + --with-pcre-regex="$(STAGING_DIR)/usr" \ + --disable-phar + +ifneq ($(SDK),) + PKG_BUILD_DEPENDS+=libopenssl zlib libcurl libgd libgmp libopenldap libmysqlclient libpq libsqlite2 libpthread libsqlite3 libpcre libxml2 +# force PKG_CONFIGURE_{LIBS,OPTS} below when built in the SDK + CONFIG_PACKAGE_php5-cli:=m + CONFIG_PACKAGE_php5-cgi:=m + CONFIG_PACKAGE_php5-fastcgi:=m + CONFIG_PACKAGE_php5-mod-curl:=m + CONFIG_PACKAGE_php5-mod-gd:=m + CONFIG_PACKAGE_php5-mod-gmp:=m + CONFIG_PACKAGE_php5-mod-ldap:=m + CONFIG_PACKAGE_php5-mod-mysql:=m + CONFIG_PACKAGE_php5-mod-pgsql:=m + CONFIG_PACKAGE_php5-mod-sqlite:=m + CONFIG_PACKAGE_php5-mod-sqlite3:=m + CONFIG_PACKAGE_php5-mod-xml:=m +endif + +ifneq ($(CONFIG_PACKAGE_php5-cli),) + CONFIGURE_ARGS+= --enable-cli +else + CONFIGURE_ARGS+= --disable-cli +endif + +ifneq ($(CONFIG_PACKAGE_php5-cgi),) + CONFIGURE_ARGS+= --enable-cgi +else + CONFIGURE_ARGS+= --disable-cgi +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-apc),) + CONFIGURE_ARGS+= --enable-apc=shared --disable-apc-mmap --disable-apc-pthreadmutex + CONFIGURE_LIBS+= -lrt +else + CONFIGURE_ARGS+= --disable-apc +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-ctype),) + CONFIGURE_ARGS+= --enable-ctype=shared +else + CONFIGURE_ARGS+= --disable-ctype +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-curl),) + CONFIGURE_ARGS+= --with-curl=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-curl +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-fileinfo),) + CONFIGURE_ARGS+= --enable-fileinfo=shared +else + CONFIGURE_ARGS+= --disable-fileinfo +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-gettext),) + CONFIGURE_ARGS+= --with-gettext=shared,"$(STAGING_DIR)/usr/lib/libintl-full" +else + CONFIGURE_ARGS+= --without-gettext +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-dom),) + CONFIGURE_ARGS+= --enable-dom=shared +else + CONFIGURE_ARGS+= --disable-dom +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-exif),) + CONFIGURE_ARGS+= --enable-exif=shared +else + CONFIGURE_ARGS+= --disable-exif +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-ftp),) + CONFIGURE_ARGS+= --enable-ftp=shared +else + CONFIGURE_ARGS+= --disable-ftp +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-gd),) + CONFIGURE_ARGS+= \ + --with-gd=shared,"$(STAGING_DIR)/usr" \ + --without-freetype-dir \ + --with-jpeg-dir="$(STAGING_DIR)/usr" \ + --with-png-dir="$(STAGING_DIR)/usr" \ + --without-xpm-dir \ + --without-t1lib \ + --enable-gd-native-ttf \ + --disable-gd-jis-conv +else + CONFIGURE_ARGS+= --without-gd +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-gmp),) + CONFIGURE_ARGS+= --with-gmp=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-gmp +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-hash),) + CONFIGURE_ARGS+= --enable-hash=shared +else + CONFIGURE_ARGS+= --disable-hash +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-iconv),) + CONFIGURE_ARGS+= --with-iconv=shared,"$(ICONV_PREFIX)" +else + CONFIGURE_ARGS+= --without-iconv +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-json),) + CONFIGURE_ARGS+= --enable-json=shared +else + CONFIGURE_ARGS+= --disable-json +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-ldap),) + CONFIGURE_ARGS+= \ + --with-ldap=shared,"$(STAGING_DIR)/usr" \ + --with-ldap-sasl="$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-ldap +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-mbstring),) + CONFIGURE_ARGS+= --enable-mbstring=shared --enable-mbregex +else + CONFIGURE_ARGS+= --disable-mbstring +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-mcrypt),) + CONFIGURE_ARGS+= --with-mcrypt=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-mcrypt +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-mysql),) + CONFIGURE_ARGS+= --with-mysql=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-mysql +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-openssl),) + CONFIGURE_ARGS+= \ + --with-openssl=shared,"$(STAGING_DIR)/usr" \ + --with-kerberos=no \ + --with-openssl-dir="$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-openssl +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-pcntl),) + CONFIGURE_ARGS+= --enable-pcntl=shared +else + CONFIGURE_ARGS+= --disable-pcntl +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-pdo),) + CONFIGURE_ARGS+= --enable-pdo=shared + ifneq ($(CONFIG_PACKAGE_php5-mod-pdo-mysql),) + CONFIGURE_ARGS+= --with-pdo-mysql=shared,"$(STAGING_DIR)/usr" + else + CONFIGURE_ARGS+= --without-pdo-mysql + endif + ifneq ($(CONFIG_PACKAGE_php5-mod-pdo-pgsql),) + CONFIGURE_ARGS+= --with-pdo-pgsql=shared,"$(STAGING_DIR)/usr" + else + CONFIGURE_ARGS+= --without-pdo-pgsql + endif + ifneq ($(CONFIG_PACKAGE_php5-mod-pdo-sqlite),) + CONFIGURE_ARGS+= --with-pdo-sqlite=shared,"$(STAGING_DIR)/usr" + CONFIGURE_LIBS+= -lsqlite3 -lpthread + else + CONFIGURE_ARGS+= --without-pdo-sqlite + endif +else + CONFIGURE_ARGS+= --disable-pdo +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-pgsql),) + CONFIGURE_ARGS+= --with-pgsql=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-pgsql +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-session),) + CONFIGURE_ARGS+= --enable-session=shared +else + CONFIGURE_ARGS+= --disable-session +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-simplexml),) + CONFIGURE_ARGS+= --enable-simplexml=shared +else + CONFIGURE_ARGS+= --disable-simplexml +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-soap),) + CONFIGURE_ARGS+= --enable-soap=shared +else + CONFIGURE_ARGS+= --disable-soap +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-sockets),) + CONFIGURE_ARGS+= --enable-sockets=shared +else + CONFIGURE_ARGS+= --disable-sockets +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-sqlite),) + CONFIGURE_ARGS+= --with-sqlite=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --without-sqlite +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-sqlite3),) + CONFIGURE_ARGS+= --with-sqlite3=shared,"$(STAGING_DIR)/usr" + CONFIGURE_LIBS+= -lsqlite3 -lpthread +else + CONFIGURE_ARGS+= --without-sqlite3 +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-sysvmsg),) + CONFIGURE_ARGS+= --enable-sysvmsg=shared +else + CONFIGURE_ARGS+= --disable-sysvmsg +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-sysvsem),) + CONFIGURE_ARGS+= --enable-sysvsem=shared +else + CONFIGURE_ARGS+= --disable-sysvsem +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-sysvshm),) + CONFIGURE_ARGS+= --enable-sysvshm=shared +else + CONFIGURE_ARGS+= --disable-sysvshm +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-tokenizer),) + CONFIGURE_ARGS+= --enable-tokenizer=shared +else + CONFIGURE_ARGS+= --disable-tokenizer +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-xml),) + CONFIGURE_ARGS+= --enable-xml=shared,"$(STAGING_DIR)/usr" + ifneq ($(CONFIG_PHP5_LIBXML),) + CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2" + else + CONFIGURE_ARGS+= --with-libexpat-dir="$(STAGING_DIR)/usr" + endif +else + CONFIGURE_ARGS+= --disable-xml +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-xmlreader),) + CONFIGURE_ARGS+= --enable-xmlreader=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --disable-xmlreader +endif + +ifneq ($(CONFIG_PACKAGE_php5-mod-xmlwriter),) + CONFIGURE_ARGS+= --enable-xmlwriter=shared,"$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS+= --disable-xmlwriter +endif + +ifneq ($(CONFIG_PHP5_FILTER),) + CONFIGURE_ARGS+= --enable-filter +else + CONFIGURE_ARGS+= --disable-filter +endif + +ifneq ($(CONFIG_PHP5_LIBXML),) + CONFIGURE_ARGS+= --enable-libxml + CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2" +else + CONFIGURE_ARGS+= --disable-libxml +endif + +CONFIGURE_VARS+= \ + LIBS="$(CONFIGURE_LIBS)" \ + ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no) \ + php_cv_cc_rpath="no" \ + iconv_impl_name="gnu_libiconv" \ + ac_cv_php_xml2_config_path="$(STAGING_DIR)/host/bin/xml2-config" \ + +define Package/php5/conffiles +/etc/php.ini +endef + +define Package/php5/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/php.ini $(1)/etc/ +endef + +define Package/php5-cli/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/sapi/cli/php $(1)/usr/bin/php-cli +endef + +define Package/php5-cgi/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/sapi/cgi/php-cgi $(1)/usr/bin/php-cgi + ln -sf php-cgi $(1)/usr/bin/php-fcgi +endef + +define Package/php5-fastcgi/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/php.init $(1)/etc/init.d/php +endef + +define BuildModule + + define Package/php5-mod-$(1) + $(call Package/php5/Default) + + ifneq ($(3),) + DEPENDS+=$(3) + endif + + TITLE:=$(2) shared module + endef + + define Package/php5-mod-$(1)/install + $(INSTALL_DIR) $$(1)/usr/lib/php + $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/ + $(INSTALL_DIR) $$(1)/etc/php5 + echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php5/$(subst -,_,$(1)).ini + endef + + $$(eval $$(call BuildPackage,php5-mod-$(1))) + +endef + +$(eval $(call BuildPackage,php5)) +$(eval $(call BuildPackage,php5-cli)) +$(eval $(call BuildPackage,php5-cgi)) +$(eval $(call BuildPackage,php5-fastcgi)) + +#$(eval $(call BuildModule,NAME,TITLE[,PKG DEPENDS])) +$(eval $(call BuildModule,apc,APC,+PACKAGE_php5-mod-apc:librt)) +$(eval $(call BuildModule,ctype,Ctype)) +$(eval $(call BuildModule,curl,cURL,+PACKAGE_php5-mod-curl:libcurl)) +$(eval $(call BuildModule,fileinfo,Fileinfo,+PACKAGE_php5-mod-fileinfo:libmagic)) +$(eval $(call BuildModule,dom,DOM,+@PHP5_LIBXML +PACKAGE_php5-mod-dom:libxml2)) +$(eval $(call BuildModule,exif,EXIF)) +$(eval $(call BuildModule,ftp,FTP)) +$(eval $(call BuildModule,gettext,Gettext,+PACKAGE_php5-mod-gettext:libintl-full)) +$(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php5-mod-gd:libgd)) +$(eval $(call BuildModule,gmp,GMP,+PACKAGE_php5-mod-gmp:libgmp)) +$(eval $(call BuildModule,hash,Hash)) +$(eval $(call BuildModule,iconv,iConv,+PACKAGE_php5-mod-iconv:libiconv)) +$(eval $(call BuildModule,json,JSON)) +$(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php5-mod-ldap:libopenldap +PACKAGE_php5-mod-ldap:libsasl2)) +$(eval $(call BuildModule,mbstring,MBString)) +$(eval $(call BuildModule,mcrypt,Mcrypt,+PACKAGE_php5-mod-mcrypt:libmcrypt +PACKAGE_php5-mod-mcrypt:libltdl)) +$(eval $(call BuildModule,mysql,MySQL,+PACKAGE_php5-mod-mysql:libmysqlclient)) +$(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php5-mod-openssl:libopenssl)) +$(eval $(call BuildModule,pcntl,PCNTL)) +$(eval $(call BuildModule,pdo,PHP Data Objects)) +$(eval $(call BuildModule,pdo-mysql,PDO driver for MySQL,+php5-mod-pdo +PACKAGE_php5-mod-pdo-mysql:libmysqlclient)) +$(eval $(call BuildModule,pdo-pgsql,PDO driver for PostgreSQL,+php5-mod-pdo +PACKAGE_php5-mod-pdo-pgsql:libpq)) +$(eval $(call BuildModule,pdo-sqlite,PDO driver for SQLite 3.x,+php5-mod-pdo +PACKAGE_php5-mod-pdo-sqlite:libsqlite3 +PACKAGE_php5-mod-pdo-sqlite:libpthread)) +$(eval $(call BuildModule,pgsql,PostgreSQL,+PACKAGE_php5-mod-pgsql:libpq)) +$(eval $(call BuildModule,session,Session)) +$(eval $(call BuildModule,simplexml,SimpleXML,+@PHP5_LIBXML +PACKAGE_php5-mod-simplexml:libxml2)) +$(eval $(call BuildModule,soap,SOAP,+@PHP5_LIBXML +PACKAGE_php5-mod-soap:libxml2)) +$(eval $(call BuildModule,sockets,Sockets)) +$(eval $(call BuildModule,sqlite,SQLite 2.x,+PACKAGE_php5-mod-sqlite:libsqlite2)) +$(eval $(call BuildModule,sqlite3,SQLite3,+PACKAGE_php5-mod-sqlite3:libsqlite3 +PACKAGE_php5-mod-sqlite3:libpthread)) +$(eval $(call BuildModule,sysvmsg,System V messages)) +$(eval $(call BuildModule,sysvsem,System V shared memory)) +$(eval $(call BuildModule,sysvshm,System V semaphore)) +$(eval $(call BuildModule,tokenizer,Tokenizer)) +$(eval $(call BuildModule,xml,XML,+PHP5_LIBXML:libxml2 +!PHP5_LIBXML:libexpat)) +$(eval $(call BuildModule,xmlreader,XMLReader,+@PHP5_LIBXML +PACKAGE_php5-mod-xmlreader:libxml2 +PACKAGE_php5-mod-xmlreader:libiconv)) +$(eval $(call BuildModule,xmlwriter,XMLWriter,+@PHP5_LIBXML +PACKAGE_php5-mod-xmlwriter:libxml2 +PACKAGE_php5-mod-xmlwriter:libiconv)) diff --git a/lang/php5/files/php.ini b/lang/php5/files/php.ini new file mode 100644 index 0000000..bcfc713 --- /dev/null +++ b/lang/php5/files/php.ini @@ -0,0 +1,318 @@ +[PHP] + +zend.ze1_compatibility_mode = Off + +; Language Options + +engine = On +;short_open_tag = Off +precision = 12 +y2k_compliance = On +output_buffering = Off +;output_handler = +zlib.output_compression = Off +;zlib.output_compression_level = -1 +;zlib.output_handler = +implicit_flush = Off +unserialize_callback_func = +serialize_precision = 100 +allow_call_time_pass_reference = On + +safe_mode = Off +safe_mode_gid = Off +safe_mode_include_dir = +safe_mode_exec_dir = +safe_mode_allowed_env_vars = PHP_ +safe_mode_protected_env_vars = LD_LIBRARY_PATH +;open_basedir = +disable_functions = +disable_classes = + +; Colors for Syntax Highlighting mode. Anything that's acceptable in +; would work. +;highlight.string = #DD0000 +;highlight.comment = #FF9900 +;highlight.keyword = #007700 +;highlight.bg = #FFFFFF +;highlight.default = #0000BB +;highlight.html = #000000 + +;ignore_user_abort = On +;realpath_cache_size = 16k +;realpath_cache_ttl = 120 + +; Miscellaneous + +expose_php = On + +; Resource Limits + +max_execution_time = 30 ; Maximum execution time of each script, in seconds. +max_input_time = 60 ; Maximum amount of time each script may spend parsing request data. +;max_input_nesting_level = 64 +memory_limit = 8M ; Maximum amount of memory a script may consume. + +; Error handling and logging + +; Error Level Constants: +; E_ALL - All errors and warnings (includes E_STRICT as of PHP 6.0.0) +; E_ERROR - fatal run-time errors +; E_RECOVERABLE_ERROR - almost fatal run-time errors +; E_WARNING - run-time warnings (non-fatal errors) +; E_PARSE - compile-time parse errors +; E_NOTICE - run-time notices (these are warnings which often result +; from a bug in your code, but it's possible that it was +; intentional (e.g., using an uninitialized variable and +; relying on the fact it's automatically initialized to an +; empty string) +; E_STRICT - run-time notices, enable to have PHP suggest changes +; to your code which will ensure the best interoperability +; and forward compatibility of your code +; E_CORE_ERROR - fatal errors that occur during PHP's initial startup +; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's +; initial startup +; E_COMPILE_ERROR - fatal compile-time errors +; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) +; E_USER_ERROR - user-generated error message +; E_USER_WARNING - user-generated warning message +; E_USER_NOTICE - user-generated notice message +; E_DEPRECATED - warn about code that will not work in future versions +; of PHP +; E_USER_DEPRECATED - user-generated deprecation warnings +; +; Common Values: +; E_ALL & ~E_NOTICE (Show all errors, except for notices and coding standards warnings.) +; E_ALL & ~E_NOTICE | E_STRICT (Show all errors, except for notices) +; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) +; E_ALL | E_STRICT (Show all errors, warnings and notices including coding standards.) +; Default Value: E_ALL & ~E_NOTICE +error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT + +display_errors = On +display_startup_errors = Off +log_errors = Off +log_errors_max_len = 1024 +ignore_repeated_errors = Off +ignore_repeated_source = Off +report_memleaks = On +;report_zend_debug = 0 +track_errors = Off +;html_errors = Off +;docref_root = "/phpmanual/" +;docref_ext = .html +;error_prepend_string = "" +;error_append_string = "" +; Log errors to specified file. +;error_log = /var/log/php_errors.log +; Log errors to syslog. +;error_log = syslog + +; Data Handling + +;arg_separator.output = "&" +;arg_separator.input = ";&" +variables_order = "EGPCS" +request_order = "GP" +register_globals = Off +register_long_arrays = Off +register_argc_argv = On +auto_globals_jit = On +post_max_size = 8M +;magic_quotes_gpc = Off +magic_quotes_runtime = Off +magic_quotes_sybase = Off +auto_prepend_file = +auto_append_file = +default_mimetype = "text/html" +;default_charset = "iso-8859-1" +;always_populate_raw_post_data = On + +; Paths and Directories + +; UNIX: "/path1:/path2" +;include_path = ".:/php/includes" +doc_root = "/www" +user_dir = +extension_dir = "/usr/lib/php" +enable_dl = On +;cgi.force_redirect = 1 +;cgi.nph = 1 +;cgi.redirect_status_env = ; +cgi.fix_pathinfo=1 +;fastcgi.impersonate = 1; +;fastcgi.logging = 0 +;cgi.rfc2616_headers = 0 + +; File Uploads + +file_uploads = On +upload_tmp_dir = "/tmp" +upload_max_filesize = 2M +max_file_uploads = 20 + +; Fopen wrappers + +allow_url_fopen = On +allow_url_include = Off +;from="john@doe.com" +;user_agent="PHP" +default_socket_timeout = 60 +;auto_detect_line_endings = Off + +; Dynamic Extensions + +;extension=ctype.so +;extension=curl.so +;extension=dom.so +;extension=exif.so +;extension=ftp.so +;extension=gd.so +;extension=gmp.so +;extension=hash.so +;extension=iconv.so +;extension=json.so +;extension=ldap.so +;extension=mbstring.so +;extension=mcrypt.so +;extension=mysql.so +;extension=openssl.so +;extension=pcre.so +;extension=pdo.so +;extension=pdo-mysql.so +;extension=pdo-pgsql.so +;extension=pdo_sqlite.so +;extension=pgsql.so +;extension=session.so +;extension=soap.so +;extension=sockets.so +;extension=sqlite.so +;extension=sqlite3.so +;extension=tokenizer.so +;extension=xml.so +;extension=xmlreader.so +;extension=xmlwriter.so + +; Module Settings + +[APC] +apc.enabled = 1 +apc.shm_segments = 1 ;The number of shared memory segments to allocate for the compiler cache. +apc.shm_size = 4M ;The size of each shared memory segment. + +[Date] +;date.timezone = +;date.default_latitude = 31.7667 +;date.default_longitude = 35.2333 +;date.sunrise_zenith = 90.583333 +;date.sunset_zenith = 90.583333 + +[filter] +;filter.default = unsafe_raw +;filter.default_flags = + +[iconv] +;iconv.input_encoding = ISO-8859-1 +;iconv.internal_encoding = ISO-8859-1 +;iconv.output_encoding = ISO-8859-1 + +[sqlite] +;sqlite.assoc_case = 0 + +[sqlite3] +;sqlite3.extension_dir = + +[Pdo_mysql] +pdo_mysql.cache_size = 2000 +pdo_mysql.default_socket= + +[MySQL] +mysql.allow_local_infile = On +mysql.allow_persistent = On +mysql.cache_size = 2000 +mysql.max_persistent = -1 +mysql.max_links = -1 +mysql.default_port = +mysql.default_socket = +mysql.default_host = +mysql.default_user = +mysql.default_password = +mysql.connect_timeout = 60 +mysql.trace_mode = Off + +[PostgresSQL] +pgsql.allow_persistent = On +pgsql.auto_reset_persistent = Off +pgsql.max_persistent = -1 +pgsql.max_links = -1 +pgsql.ignore_notice = 0 +pgsql.log_notice = 0 + +[Session] +session.save_handler = files +session.save_path = "/tmp" +session.use_cookies = 1 +;session.cookie_secure = +session.use_only_cookies = 1 +session.name = PHPSESSID +session.auto_start = 0 +session.cookie_lifetime = 0 +session.cookie_path = / +session.cookie_domain = +session.cookie_httponly = +session.serialize_handler = php +session.gc_probability = 1 +session.gc_divisor = 100 +session.gc_maxlifetime = 1440 +session.bug_compat_42 = On +session.bug_compat_warn = On +session.referer_check = +session.entropy_length = 0 +;session.entropy_file = /dev/urandom +session.entropy_file = +;session.entropy_length = 16 +session.cache_limiter = nocache +session.cache_expire = 180 +session.use_trans_sid = 0 +session.hash_function = 0 +session.hash_bits_per_character = 4 +url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" + +[mbstring] +;mbstring.language = Japanese +;mbstring.internal_encoding = EUC-JP +;mbstring.http_input = auto +;mbstring.http_output = SJIS +;mbstring.encoding_translation = Off +;mbstring.detect_order = auto +;mbstring.substitute_character = none; +;mbstring.func_overload = 0 +;mbstring.strict_detection = Off +;mbstring.http_output_conv_mimetype= +;mbstring.script_encoding= + +[gd] +;gd.jpeg_ignore_warning = 0 + +[exif] +;exif.encode_unicode = ISO-8859-15 +;exif.decode_unicode_motorola = UCS-2BE +;exif.decode_unicode_intel = UCS-2LE +;exif.encode_jis = +;exif.decode_jis_motorola = JIS +;exif.decode_jis_intel = JIS + +[soap] +soap.wsdl_cache_enabled=1 +soap.wsdl_cache_dir="/tmp" +soap.wsdl_cache_ttl=86400 +soap.wsdl_cache_limit = 5 + +[sysvshm] +;sysvshm.init_mem = 10000 + +[ldap] +ldap.max_links = -1 + +[mcrypt] +;mcrypt.algorithms_dir= +;mcrypt.modes_dir= diff --git a/lang/php5/files/php.init b/lang/php5/files/php.init new file mode 100644 index 0000000..2b8e4d9 --- /dev/null +++ b/lang/php5/files/php.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2010 OpenWrt.org + +START=50 + +export PHP_FCGI_CHILDREN='' +PORT=1026 +BIN=/usr/bin/php-fcgi + +start() { + $BIN -b $PORT & +} + +stop() { + kill `pidof php-fcgi` +} diff --git a/lang/php5/patches/005-APC.patch b/lang/php5/patches/005-APC.patch new file mode 100644 index 0000000..a529774 --- /dev/null +++ b/lang/php5/patches/005-APC.patch @@ -0,0 +1,22333 @@ +--- /dev/null ++++ b/ext/apc/apc_bin.c +@@ -0,0 +1,987 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt. | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Brian Shire | ++ +----------------------------------------------------------------------+ ++ ++ */ ++ ++/* $Id: apc_bin.c 303383 2010-09-15 08:15:58Z dmitry $ */ ++ ++/* Creates a binary architecture specific output to a string or file containing ++ * the current cache contents for both fies and user variables. This is accomplished ++ * via the apc_copy_* functions and "swizzling" pointer values to a position ++ * independent value, and unswizzling them on restoration. ++ */ ++ ++#include "apc_globals.h" ++#include "apc_bin.h" ++#include "apc_zend.h" ++#include "apc_sma.h" ++#include "apc_pool.h" ++#include "ext/standard/md5.h" ++#include "ext/standard/crc32.h" ++ ++extern apc_cache_t* apc_cache; ++extern apc_cache_t* apc_user_cache; ++ ++extern int _apc_store(char *strkey, int strkey_len, const zval *val, const uint ttl, const int exclusive TSRMLS_DC); /* this is hacky */ ++ ++#define APC_BINDUMP_DEBUG 0 ++ ++ ++#if APC_BINDUMP_DEBUG ++ ++#define SWIZZLE(bd, ptr) \ ++ do { \ ++ if((long)bd < (long)ptr && (ulong)ptr < ((long)bd + bd->size)) { \ ++ printf("SWIZZLE: %x ~> ", ptr); \ ++ ptr = (void*)((long)(ptr) - (long)(bd)); \ ++ printf("%x in %s on line %d", ptr, __FILE__, __LINE__); \ ++ } else if((long)ptr > bd->size) { /* not swizzled */ \ ++ apc_error("pointer to be swizzled is not within allowed memory range! (%x < %x < %x) in %s on %d" TSRMLS_CC, (long)bd, ptr, ((long)bd + bd->size), __FILE__, __LINE__); \ ++ } \ ++ printf("\n"); \ ++ } while(0); ++ ++#define UNSWIZZLE(bd, ptr) \ ++ do { \ ++ printf("UNSWIZZLE: %x -> ", ptr); \ ++ ptr = (void*)((long)(ptr) + (long)(bd)); \ ++ printf("%x in %s on line %d \n", ptr, __FILE__, __LINE__); \ ++ } while(0); ++ ++#else /* !APC_BINDUMP_DEBUG */ ++ ++#define SWIZZLE(bd, ptr) \ ++ do { \ ++ if((long)bd < (long)ptr && (ulong)ptr < ((long)bd + bd->size)) { \ ++ ptr = (void*)((long)(ptr) - (long)(bd)); \ ++ } else if((ulong)ptr > bd->size) { /* not swizzled */ \ ++ apc_error("pointer to be swizzled is not within allowed memory range! (%x < %x < %x) in %s on %d" TSRMLS_CC, (long)bd, ptr, ((long)bd + bd->size), __FILE__, __LINE__); \ ++ } \ ++ } while(0); ++ ++#define UNSWIZZLE(bd, ptr) \ ++ do { \ ++ ptr = (void*)((long)(ptr) + (long)(bd)); \ ++ } while(0); ++ ++#endif ++ ++ ++static void *apc_bd_alloc(size_t size TSRMLS_DC); ++static void apc_bd_free(void *ptr TSRMLS_DC); ++static void *apc_bd_alloc_ex(void *ptr_new, size_t size TSRMLS_DC); ++ ++typedef void (*apc_swizzle_cb_t)(apc_bd_t *bd, zend_llist *ll, void *ptr TSRMLS_DC); ++ ++#if APC_BINDUMP_DEBUG ++#define apc_swizzle_ptr(bd, ll, ptr) _apc_swizzle_ptr(bd, ll, (void*)ptr, __FILE__, __LINE__ TSRMLS_CC) ++#else ++#define apc_swizzle_ptr(bd, ll, ptr) _apc_swizzle_ptr(bd, ll, (void*)ptr, NULL, 0 TSRMLS_CC) ++#endif ++ ++static void _apc_swizzle_ptr(apc_bd_t *bd, zend_llist *ll, void **ptr, const char* file, int line TSRMLS_DC); ++static void apc_swizzle_function(apc_bd_t *bd, zend_llist *ll, zend_function *func TSRMLS_DC); ++static void apc_swizzle_class_entry(apc_bd_t *bd, zend_llist *ll, zend_class_entry *ce TSRMLS_DC); ++static void apc_swizzle_hashtable(apc_bd_t *bd, zend_llist *ll, HashTable *ht, apc_swizzle_cb_t swizzle_cb, int is_ptr TSRMLS_DC); ++static void apc_swizzle_zval(apc_bd_t *bd, zend_llist *ll, zval *zv TSRMLS_DC); ++static void apc_swizzle_op_array(apc_bd_t *bd, zend_llist *ll, zend_op_array *op_array TSRMLS_DC); ++static void apc_swizzle_property_info(apc_bd_t *bd, zend_llist *ll, zend_property_info *pi TSRMLS_DC); ++static void apc_swizzle_function_entry(apc_bd_t *bd, zend_llist *ll, const zend_function_entry *fe TSRMLS_DC); ++static void apc_swizzle_arg_info_array(apc_bd_t *bd, zend_llist *ll, const zend_arg_info* arg_info_array, uint num_args TSRMLS_DC); ++ ++static apc_bd_t* apc_swizzle_bd(apc_bd_t* bd, zend_llist *ll TSRMLS_DC); ++static int apc_unswizzle_bd(apc_bd_t *bd, int flags TSRMLS_DC); ++ ++ ++/* {{{ apc_bd_alloc ++ * callback for copy_* functions */ ++static void *apc_bd_alloc(size_t size TSRMLS_DC) { ++ return apc_bd_alloc_ex(NULL, size TSRMLS_CC); ++} /* }}} */ ++ ++ ++/* {{{ apc_bd_free ++ * callback for copy_* functions */ ++static void apc_bd_free(void *ptr TSRMLS_DC) { ++ size_t *size; ++ if(zend_hash_index_find(&APCG(apc_bd_alloc_list), (ulong)ptr, (void**)&size) == FAILURE) { ++ apc_error("apc_bd_free could not free pointer (not found in list: %x)" TSRMLS_CC, ptr); ++ } ++ APCG(apc_bd_alloc_ptr) = (void*)((size_t)APCG(apc_bd_alloc_ptr) - *size); ++ zend_hash_index_del(&APCG(apc_bd_alloc_list), (ulong)ptr); ++} /* }}} */ ++ ++ ++/* {{{ apc_bd_alloc_ex ++ * set ranges or allocate a block of data from an already (e)malloc'd range. ++ * if ptr_new is not NULL, it will reset the pointer to start at ptr_new, ++ * with a range of size. If ptr_new is NULL, returns the next available ++ * block of given size. ++ */ ++static void *apc_bd_alloc_ex(void *ptr_new, size_t size TSRMLS_DC) { ++ void *rval; ++ ++ rval = APCG(apc_bd_alloc_ptr); ++ if(ptr_new != NULL) { /* reset ptrs */ ++ APCG(apc_bd_alloc_ptr) = ptr_new; ++ APCG(apc_bd_alloc_ubptr) = (void*)((unsigned char *) ptr_new + size); ++ } else { /* alloc block */ ++ APCG(apc_bd_alloc_ptr) = (void*)((size_t)APCG(apc_bd_alloc_ptr) + size); ++#if APC_BINDUMP_DEBUG ++ apc_notice("apc_bd_alloc: rval: 0x%x ptr: 0x%x ubptr: 0x%x size: %d" TSRMLS_CC, rval, APCG(apc_bd_alloc_ptr), APCG(apc_bd_alloc_ubptr), size); ++#endif ++ if(APCG(apc_bd_alloc_ptr) > APCG(apc_bd_alloc_ubptr)) { ++ apc_error("Exceeded bounds check in apc_bd_alloc_ex by %d bytes." TSRMLS_CC, (unsigned char *) APCG(apc_bd_alloc_ptr) - (unsigned char *) APCG(apc_bd_alloc_ubptr)); ++ } ++ zend_hash_index_update(&APCG(apc_bd_alloc_list), (ulong)rval, &size, sizeof(size_t), NULL); ++ } ++ ++ return rval; ++} /* }}} */ ++ ++ ++/* {{{ _apc_swizzle_ptr */ ++static void _apc_swizzle_ptr(apc_bd_t *bd, zend_llist *ll, void **ptr, const char* file, int line TSRMLS_DC) { ++ if(*ptr) { ++ if((long)bd < (long)*ptr && (ulong)*ptr < ((long)bd + bd->size)) { ++ zend_llist_add_element(ll, &ptr); ++#if APC_BINDUMP_DEBUG ++ printf("[%06d] apc_swizzle_ptr: %x -> %x ", zend_llist_count(ll), ptr, *ptr); ++ printf(" in %s on line %d \n", file, line); ++#endif ++ } else if((ulong)ptr > bd->size) { ++ apc_error("pointer to be swizzled is not within allowed memory range! (%x < %x < %x) in %s on %d" TSRMLS_CC, (long)bd, *ptr, ((long)bd + bd->size), file, line); \ ++ } ++ } ++} /* }}} */ ++ ++ ++/* {{{ apc_swizzle_op_array */ ++static void apc_swizzle_op_array(apc_bd_t *bd, zend_llist *ll, zend_op_array *op_array TSRMLS_DC) { ++ uint i; ++ ++#ifdef ZEND_ENGINE_2 ++ apc_swizzle_arg_info_array(bd, ll, op_array->arg_info, op_array->num_args TSRMLS_CC); ++ apc_swizzle_ptr(bd, ll, &op_array->arg_info); ++#else ++ if (op_array->arg_types) { ++ apc_swizzle_ptr(bd, ll, &op_array->arg_types); ++ } ++#endif ++ ++ apc_swizzle_ptr(bd, ll, &op_array->function_name); ++ apc_swizzle_ptr(bd, ll, &op_array->filename); ++ apc_swizzle_ptr(bd, ll, &op_array->refcount); ++ ++ /* swizzle op_array */ ++ for(i=0; i < op_array->last; i++) { ++#ifndef ZEND_ENGINE_2_4 ++ if(op_array->opcodes[i].result.op_type == IS_CONST) { ++ apc_swizzle_zval(bd, ll, &op_array->opcodes[i].result.u.constant TSRMLS_CC); ++ } ++ if(op_array->opcodes[i].op1.op_type == IS_CONST) { ++ apc_swizzle_zval(bd, ll, &op_array->opcodes[i].op1.u.constant TSRMLS_CC); ++ } ++ if(op_array->opcodes[i].op2.op_type == IS_CONST) { ++ apc_swizzle_zval(bd, ll, &op_array->opcodes[i].op2.u.constant TSRMLS_CC); ++ } ++#endif ++ switch (op_array->opcodes[i].opcode) { ++ case ZEND_JMP: ++#ifdef ZEND_ENGINE_2_4 ++ apc_swizzle_ptr(bd, ll, &op_array->opcodes[i].op1.jmp_addr); ++#else ++ apc_swizzle_ptr(bd, ll, &op_array->opcodes[i].op1.u.jmp_addr); ++#endif ++ case ZEND_JMPZ: ++ case ZEND_JMPNZ: ++ case ZEND_JMPZ_EX: ++ case ZEND_JMPNZ_EX: ++#ifdef ZEND_ENGINE_2_4 ++ apc_swizzle_ptr(bd, ll, &op_array->opcodes[i].op2.jmp_addr); ++#else ++ apc_swizzle_ptr(bd, ll, &op_array->opcodes[i].op2.u.jmp_addr); ++#endif ++ } ++ } ++ apc_swizzle_ptr(bd, ll, &op_array->opcodes); ++ ++ /* break-continue array ptr */ ++ if(op_array->brk_cont_array) { ++ apc_swizzle_ptr(bd, ll, &op_array->brk_cont_array); ++ } ++ ++ /* static voriables */ ++ if(op_array->static_variables) { ++ apc_swizzle_hashtable(bd, ll, op_array->static_variables, (apc_swizzle_cb_t)apc_swizzle_zval, 1 TSRMLS_CC); ++ apc_swizzle_ptr(bd, ll, &op_array->static_variables); ++ } ++ ++#ifdef ZEND_ENGINE_2 ++ /* try-catch */ ++ if(op_array->try_catch_array) { ++ apc_swizzle_ptr(bd, ll, &op_array->try_catch_array); ++ } ++#endif ++ ++#ifdef ZEND_ENGINE_2_1 /* PHP 5.1 */ ++ /* vars */ ++ if(op_array->vars) { ++ for(i=0; (signed int) i < op_array->last_var; i++) { ++ apc_swizzle_ptr(bd, ll, &op_array->vars[i].name); ++ } ++ apc_swizzle_ptr(bd, ll, &op_array->vars); ++ } ++#endif ++ ++#ifdef ZEND_ENGINE_2 ++ /* doc comment */ ++ if(op_array->doc_comment) { ++ apc_swizzle_ptr(bd, ll, &op_array->doc_comment); ++ } ++#endif ++ ++} /* }}} */ ++ ++ ++/* {{{ apc_swizzle_function */ ++static void apc_swizzle_function(apc_bd_t *bd, zend_llist *ll, zend_function *func TSRMLS_DC) { ++ apc_swizzle_op_array(bd, ll, &func->op_array TSRMLS_CC); ++#ifdef ZEND_ENGINE_2 ++ if(func->common.scope) { ++ apc_swizzle_ptr(bd, ll, &func->common.scope); ++ } ++#endif ++} /* }}} */ ++ ++ ++/* {{{ apc_swizzle_class_entry */ ++static void apc_swizzle_class_entry(apc_bd_t *bd, zend_llist *ll, zend_class_entry *ce TSRMLS_DC) { ++ ++ uint i; ++ ++ if(ce->name) { ++ apc_swizzle_ptr(bd, ll, &ce->name); ++ } ++ ++ if (ce->type == ZEND_USER_CLASS && ZEND_CE_DOC_COMMENT(ce)) { ++ apc_swizzle_ptr(bd, ll, &ZEND_CE_DOC_COMMENT(ce)); ++ } ++ ++#ifndef ZEND_ENGINE_2 ++ apc_swizzle_ptr(bd, ll, &ce->refcount); ++#endif ++ ++ apc_swizzle_hashtable(bd, ll, &ce->function_table, (apc_swizzle_cb_t)apc_swizzle_function, 0 TSRMLS_CC); ++#ifdef ZEND_ENGINE_2_4 ++ if (ce->default_properties_table) { ++ int i; ++ ++ for (i = 0; i < ce->default_properties_count; i++) { ++ if (ce->default_properties_table[i]) { ++ apc_swizzle_ptr(bd, ll, &ce->default_properties_table[i]); ++ apc_swizzle_zval(bd, ll, ce->default_properties_table[i] TSRMLS_CC); ++ } ++ } ++ } ++#else ++ apc_swizzle_hashtable(bd, ll, &ce->default_properties, (apc_swizzle_cb_t)apc_swizzle_zval, 1 TSRMLS_CC); ++#endif ++ ++#ifdef ZEND_ENGINE_2 ++ apc_swizzle_hashtable(bd, ll, &ce->properties_info, (apc_swizzle_cb_t)apc_swizzle_property_info, 0 TSRMLS_CC); ++#endif ++ ++#ifdef ZEND_ENGINE_2_4 ++ if (ce->default_static_members_table) { ++ int i; ++ ++ for (i = 0; i < ce->default_static_members_count; i++) { ++ if (ce->default_static_members_table[i]) { ++ apc_swizzle_ptr(bd, ll, &ce->default_static_members_table[i]); ++ apc_swizzle_zval(bd, ll, ce->default_static_members_table[i] TSRMLS_CC); ++ } ++ } ++ } ++ ce->static_members_table = ce->default_static_members_table; ++#else ++ apc_swizzle_hashtable(bd, ll, &ce->default_static_members, (apc_swizzle_cb_t)apc_swizzle_zval, 1 TSRMLS_CC); ++ ++ if(ce->static_members != &ce->default_static_members) { ++ apc_swizzle_hashtable(bd, ll, ce->static_members, (apc_swizzle_cb_t)apc_swizzle_zval, 1 TSRMLS_CC); ++ } else { ++ apc_swizzle_ptr(bd, ll, &ce->static_members); ++ } ++#endif ++ ++ apc_swizzle_hashtable(bd, ll, &ce->constants_table, (apc_swizzle_cb_t)apc_swizzle_zval, 1 TSRMLS_CC); ++ ++ if(ce->type == ZEND_INTERNAL_CLASS && ZEND_CE_BUILTIN_FUNCTIONS(ce)) { ++ for(i=0; ZEND_CE_BUILTIN_FUNCTIONS(ce)[i].fname; i++) { ++ apc_swizzle_function_entry(bd, ll, &ZEND_CE_BUILTIN_FUNCTIONS(ce)[i] TSRMLS_CC); ++ } ++ } ++ ++ apc_swizzle_ptr(bd, ll, &ce->constructor); ++ apc_swizzle_ptr(bd, ll, &ce->destructor); ++ apc_swizzle_ptr(bd, ll, &ce->clone); ++ apc_swizzle_ptr(bd, ll, &ce->__get); ++ apc_swizzle_ptr(bd, ll, &ce->__set); ++ apc_swizzle_ptr(bd, ll, &ce->__unset); ++ apc_swizzle_ptr(bd, ll, &ce->__isset); ++ apc_swizzle_ptr(bd, ll, &ce->__call); ++ apc_swizzle_ptr(bd, ll, &ce->serialize_func); ++ apc_swizzle_ptr(bd, ll, &ce->unserialize_func); ++ ++#ifdef ZEND_ENGINE_2_2 ++ apc_swizzle_ptr(bd, ll, &ce->__tostring); ++#endif ++ ++ if (ce->type == ZEND_USER_CLASS) { ++ apc_swizzle_ptr(bd, ll, &ZEND_CE_FILENAME(ce)); ++ } ++} /* }}} */ ++ ++ ++/* {{{ apc_swizzle_property_info */ ++static void apc_swizzle_property_info(apc_bd_t *bd, zend_llist *ll, zend_property_info *pi TSRMLS_DC) { ++ apc_swizzle_ptr(bd, ll, &pi->name); ++ apc_swizzle_ptr(bd, ll, &pi->doc_comment); ++ ++#ifdef ZEND_ENGINE_2_2 ++ apc_swizzle_ptr(bd, ll, &pi->ce); ++#endif ++} /* }}} */ ++ ++ ++/* {{{ apc_swizzle_function_entry */ ++static void apc_swizzle_function_entry(apc_bd_t *bd, zend_llist *ll, const zend_function_entry *fe TSRMLS_DC) { ++ apc_swizzle_ptr(bd, ll, &fe->fname); ++ apc_swizzle_arg_info_array(bd, ll, fe->arg_info, fe->num_args TSRMLS_CC); ++ apc_swizzle_ptr(bd, ll, &fe->arg_info); ++} /* }}} */ ++ ++ ++/* {{{ apc_swizzle_arg_info_array */ ++static void apc_swizzle_arg_info_array(apc_bd_t *bd, zend_llist *ll, const zend_arg_info* arg_info_array, uint num_args TSRMLS_DC) { ++ if(arg_info_array) { ++ uint i; ++ ++ for(i=0; i < num_args; i++) { ++ apc_swizzle_ptr(bd, ll, &arg_info_array[i].name); ++ apc_swizzle_ptr(bd, ll, &arg_info_array[i].class_name); ++ } ++ } ++ ++} /* }}} */ ++ ++ ++/* {{{ apc_swizzle_hashtable */ ++static void apc_swizzle_hashtable(apc_bd_t *bd, zend_llist *ll, HashTable *ht, apc_swizzle_cb_t swizzle_cb, int is_ptr TSRMLS_DC) { ++ uint i; ++ Bucket **bp, **bp_prev; ++ ++ bp = &ht->pListHead; ++ while(*bp) { ++ bp_prev = bp; ++ bp = &(*bp)->pListNext; ++ if(is_ptr) { ++ swizzle_cb(bd, ll, *(void**)(*bp_prev)->pData TSRMLS_CC); ++ apc_swizzle_ptr(bd, ll, (*bp_prev)->pData); ++ } else { ++ swizzle_cb(bd, ll, (void**)(*bp_prev)->pData TSRMLS_CC); ++ } ++ apc_swizzle_ptr(bd, ll, &(*bp_prev)->pData); ++ if((*bp_prev)->pDataPtr) { ++ apc_swizzle_ptr(bd, ll, &(*bp_prev)->pDataPtr); ++ } ++ if((*bp_prev)->pListLast) { ++ apc_swizzle_ptr(bd, ll, &(*bp_prev)->pListLast); ++ } ++ if((*bp_prev)->pNext) { ++ apc_swizzle_ptr(bd, ll, &(*bp_prev)->pNext); ++ } ++ if((*bp_prev)->pLast) { ++ apc_swizzle_ptr(bd, ll, &(*bp_prev)->pLast); ++ } ++ apc_swizzle_ptr(bd, ll, bp_prev); ++ } ++ for(i=0; i < ht->nTableSize; i++) { ++ if(ht->arBuckets[i]) { ++ apc_swizzle_ptr(bd, ll, &ht->arBuckets[i]); ++ } ++ } ++ apc_swizzle_ptr(bd, ll, &ht->pListTail); ++ ++ apc_swizzle_ptr(bd, ll, &ht->arBuckets); ++} /* }}} */ ++ ++ ++/* {{{ apc_swizzle_zval */ ++static void apc_swizzle_zval(apc_bd_t *bd, zend_llist *ll, zval *zv TSRMLS_DC) { ++ ++ if(APCG(copied_zvals).nTableSize) { ++ if(zend_hash_index_exists(&APCG(copied_zvals), (ulong)zv)) { ++ return; ++ } ++ zend_hash_index_update(&APCG(copied_zvals), (ulong)zv, (void**)&zv, sizeof(zval*), NULL); ++ } ++ ++ switch(zv->type & ~IS_CONSTANT_INDEX) { ++ case IS_NULL: ++ case IS_LONG: ++ case IS_DOUBLE: ++ case IS_BOOL: ++ case IS_RESOURCE: ++ /* nothing to do */ ++ break; ++ case IS_CONSTANT: ++ case IS_STRING: ++ apc_swizzle_ptr(bd, ll, &zv->value.str.val); ++ break; ++ case IS_ARRAY: ++ case IS_CONSTANT_ARRAY: ++ apc_swizzle_hashtable(bd, ll, zv->value.ht, (apc_swizzle_cb_t)apc_swizzle_zval, 1 TSRMLS_CC); ++ apc_swizzle_ptr(bd, ll, &zv->value.ht); ++ break; ++ case IS_OBJECT: ++ break; ++ default: ++ assert(0); /* shouldn't happen */ ++ } ++} /* }}} */ ++ ++ ++/* {{{ apc_swizzle_bd */ ++static apc_bd_t* apc_swizzle_bd(apc_bd_t* bd, zend_llist *ll TSRMLS_DC) { ++ int count, i; ++ PHP_MD5_CTX context; ++ unsigned char digest[16]; ++ register php_uint32 crc; ++ php_uint32 crcinit = 0; ++ char *crc_p; ++ void ***ptr; ++ void ***ptr_list; ++ ++ count = zend_llist_count(ll); ++ ptr_list = emalloc(count * sizeof(void**)); ++ ptr = zend_llist_get_first(ll); ++ for(i=0; i < count; i++) { ++#if APC_BINDUMP_DEBUG ++ printf("[%06d] ", i+1); ++#endif ++ SWIZZLE(bd, **ptr); /* swizzle ptr */ ++ if((long)bd < (long)*ptr && (ulong)*ptr < ((long)bd + bd->size)) { /* exclude ptrs that aren't actually included in the ptr list */ ++#if APC_BINDUMP_DEBUG ++ printf("[------] "); ++#endif ++ SWIZZLE(bd, *ptr); /* swizzle ptr list */ ++ ptr_list[i] = *ptr; ++ } ++ ptr = zend_llist_get_next(ll); ++ } ++ SWIZZLE(bd, bd->entries); ++ ++ if(count > 0) { ++ bd = erealloc(bd, bd->size + (count * sizeof(void**))); ++ bd->num_swizzled_ptrs = count; ++ bd->swizzled_ptrs = (void***)((unsigned char *)bd + bd->size -2); /* extra -1 for null termination */ ++ bd->size += count * sizeof(void**); ++ memcpy(bd->swizzled_ptrs, ptr_list, count * sizeof(void**)); ++ SWIZZLE(bd, bd->swizzled_ptrs); ++ } else { ++ bd->num_swizzled_ptrs = 0; ++ bd->swizzled_ptrs = NULL; ++ } ++ ((char*)bd)[bd->size-1] = 0; /* silence null termination for zval strings */ ++ efree(ptr_list); ++ bd->swizzled = 1; ++ ++ /* Generate MD5/CRC32 checksum */ ++ for(i=0; i<16; i++) { bd->md5[i] = 0; } ++ bd->crc=0; ++ PHP_MD5Init(&context); ++ PHP_MD5Update(&context, (const unsigned char*)bd, bd->size); ++ PHP_MD5Final(digest, &context); ++ crc = crcinit^0xFFFFFFFF; ++ crc_p = (char*)bd; ++ for(i=bd->size; i--; ++crc_p) { ++ crc = ((crc >> 8) & 0x00FFFFFF) ^ crc32tab[(crc ^ (*crc_p)) & 0xFF ]; ++ } ++ memcpy(bd->md5, digest, 16); ++ bd->crc = crc; ++ ++ return bd; ++} /* }}} */ ++ ++ ++/* {{{ apc_unswizzle_bd */ ++static int apc_unswizzle_bd(apc_bd_t *bd, int flags TSRMLS_DC) { ++ int i; ++ unsigned char md5_orig[16]; ++ unsigned char digest[16]; ++ PHP_MD5_CTX context; ++ register php_uint32 crc; ++ php_uint32 crcinit = 0; ++ php_uint32 crc_orig; ++ char *crc_p; ++ ++ /* Verify the md5 or crc32 before we unswizzle */ ++ memcpy(md5_orig, bd->md5, 16); ++ for(i=0; i<16; i++) { bd->md5[i] = 0; } ++ crc_orig = bd->crc; ++ bd->crc=0; ++ if(flags & APC_BIN_VERIFY_MD5) { ++ PHP_MD5Init(&context); ++ PHP_MD5Update(&context, (const unsigned char*)bd, bd->size); ++ PHP_MD5Final(digest, &context); ++ if(memcmp(md5_orig, digest, 16)) { ++ apc_error("MD5 checksum of binary dump failed." TSRMLS_CC); ++ memcpy(bd->md5, md5_orig, 16); /* add back md5 checksum */ ++ return -1; ++ } ++ } ++ if(flags & APC_BIN_VERIFY_CRC32) { ++ crc = crcinit^0xFFFFFFFF; ++ crc_p = (char*)bd; ++ for(i=bd->size; i--; ++crc_p) { ++ crc = ((crc >> 8) & 0x00FFFFFF) ^ crc32tab[(crc ^ (*crc_p)) & 0xFF ]; ++ } ++ if(crc_orig != crc) { ++ apc_error("CRC32 checksum of binary dump failed." TSRMLS_CC); ++ bd->crc = crc_orig; ++ return -1; ++ } ++ } ++ memcpy(bd->md5, md5_orig, 16); /* add back md5 checksum */ ++ bd->crc = crc_orig; ++ ++ UNSWIZZLE(bd, bd->entries); ++ UNSWIZZLE(bd, bd->swizzled_ptrs); ++ for(i=0; i < bd->num_swizzled_ptrs; i++) { ++ if(bd->swizzled_ptrs[i]) { ++ UNSWIZZLE(bd, bd->swizzled_ptrs[i]); ++ if(*bd->swizzled_ptrs[i] && (*bd->swizzled_ptrs[i] < (void*)bd)) { ++ UNSWIZZLE(bd, *bd->swizzled_ptrs[i]); ++ } ++ } ++ } ++ ++ bd->swizzled=0; ++ ++ return 0; ++} /* }}} */ ++ ++ ++/* {{{ apc_bin_checkfilter */ ++static int apc_bin_checkfilter(HashTable *filter, const char *key, uint key_len) { ++ zval **zptr; ++ ++ if(filter == NULL) { ++ return 1; ++ } ++ ++ if(zend_hash_find(filter, (char*)key, key_len, (void**)&zptr) == SUCCESS) { ++ if(Z_TYPE_PP(zptr) == IS_LONG && Z_LVAL_PP(zptr) == 0) { ++ return 0; ++ } ++ } else { ++ return 0; ++ } ++ ++ ++ return 1; ++} /* }}} */ ++ ++/* {{{ apc_bin_fixup_op_array */ ++static inline void apc_bin_fixup_op_array(zend_op_array *op_array) { ++ ulong i; ++ for (i = 0; i < op_array->last; i++) { ++ op_array->opcodes[i].handler = zend_opcode_handlers[APC_OPCODE_HANDLER_DECODE(&op_array->opcodes[i])]; ++ } ++} ++/* }}} */ ++ ++/* {{{ apc_bin_fixup_class_entry */ ++static inline void apc_bin_fixup_class_entry(zend_class_entry *ce) { ++ zend_function *fe; ++ HashPosition hpos; ++ ++ /* fixup the opcodes in each method */ ++ zend_hash_internal_pointer_reset_ex(&ce->function_table, &hpos); ++ while(zend_hash_get_current_data_ex(&ce->function_table, (void**)&fe, &hpos) == SUCCESS) { ++ apc_bin_fixup_op_array(&fe->op_array); ++ zend_hash_move_forward_ex(&ce->function_table, &hpos); ++ } ++ ++ /* fixup hashtable destructor pointers */ ++ ce->function_table.pDestructor = (dtor_func_t)zend_function_dtor; ++#ifndef ZEND_ENGINE_2_4 ++ ce->default_properties.pDestructor = (dtor_func_t)zval_ptr_dtor_wrapper; ++#endif ++ ce->properties_info.pDestructor = (dtor_func_t)zval_ptr_dtor_wrapper; ++#ifndef ZEND_ENGINE_2_4 ++ ce->default_static_members.pDestructor = (dtor_func_t)zval_ptr_dtor_wrapper; ++ if (ce->static_members) { ++ ce->static_members->pDestructor = (dtor_func_t)zval_ptr_dtor_wrapper; ++ } ++#endif ++ ce->constants_table.pDestructor = (dtor_func_t)zval_ptr_dtor_wrapper; ++} ++/* }}} */ ++ ++/* {{{ apc_bin_dump */ ++apc_bd_t* apc_bin_dump(HashTable *files, HashTable *user_vars TSRMLS_DC) { ++ ++ int i; ++ uint fcount; ++ slot_t *sp; ++ apc_bd_entry_t *ep; ++ int count=0; ++ apc_bd_t *bd; ++ zend_llist ll; ++ zend_function *efp, *sfp; ++ long size=0; ++ apc_context_t ctxt; ++ void *pool_ptr; ++ ++ zend_llist_init(&ll, sizeof(void*), NULL, 0); ++ zend_hash_init(&APCG(apc_bd_alloc_list), 0, NULL, NULL, 0); ++ ++ /* flip the hash for faster filter checking */ ++ files = apc_flip_hash(files); ++ user_vars = apc_flip_hash(user_vars); ++ ++ /* get size and entry counts */ ++ for(i=0; i < apc_user_cache->num_slots; i++) { ++ sp = apc_user_cache->slots[i]; ++ for(; sp != NULL; sp = sp->next) { ++ if(apc_bin_checkfilter(user_vars, sp->key.data.user.identifier, sp->key.data.user.identifier_len)) { ++ size += sizeof(apc_bd_entry_t*) + sizeof(apc_bd_entry_t); ++ size += sp->value->mem_size - (sizeof(apc_cache_entry_t) - sizeof(apc_cache_entry_value_t)); ++ count++; ++ } ++ } ++ } ++ for(i=0; i < apc_cache->num_slots; i++) { ++ sp = apc_cache->slots[i]; ++ for(; sp != NULL; sp = sp->next) { ++ if(sp->key.type == APC_CACHE_KEY_FPFILE) { ++ if(apc_bin_checkfilter(files, sp->key.data.fpfile.fullpath, sp->key.data.fpfile.fullpath_len+1)) { ++ size += sizeof(apc_bd_entry_t*) + sizeof(apc_bd_entry_t); ++ size += sp->value->mem_size - (sizeof(apc_cache_entry_t) - sizeof(apc_cache_entry_value_t)); ++ count++; ++ } ++ } else { ++ /* TODO: Currently we don't support APC_CACHE_KEY_FILE type. We need to store the path and re-stat on load */ ++ apc_warning("Excluding some files from apc_bin_dump[file]. Cached files must be included using full path with apc.stat=0." TSRMLS_CC); ++ } ++ } ++ } ++ ++ size += sizeof(apc_bd_t) +1; /* +1 for null termination */ ++ bd = emalloc(size); ++ bd->size = size; ++ pool_ptr = emalloc(sizeof(apc_pool)); ++ apc_bd_alloc_ex(pool_ptr, sizeof(apc_pool) TSRMLS_CC); ++ ctxt.pool = apc_pool_create(APC_UNPOOL, apc_bd_alloc, apc_bd_free, NULL, NULL TSRMLS_CC); /* ideally the pool wouldn't be alloc'd as part of this */ ++ if (!ctxt.pool) { /* TODO need to cleanup */ ++ apc_warning("Unable to allocate memory for pool." TSRMLS_CC); ++ return NULL; ++ } ++ ctxt.copy = APC_COPY_IN_USER; /* avoid stupid ALLOC_ZVAL calls here, hack */ ++ apc_bd_alloc_ex((void*)((long)bd + sizeof(apc_bd_t)), bd->size - sizeof(apc_bd_t) -1 TSRMLS_CC); ++ bd->num_entries = count; ++ bd->entries = apc_bd_alloc_ex(NULL, sizeof(apc_bd_entry_t) * count TSRMLS_CC); ++ ++ /* User entries */ ++ zend_hash_init(&APCG(copied_zvals), 0, NULL, NULL, 0); ++ count = 0; ++ for(i=0; i < apc_user_cache->num_slots; i++) { ++ sp = apc_user_cache->slots[i]; ++ for(; sp != NULL; sp = sp->next) { ++ if(apc_bin_checkfilter(user_vars, sp->key.data.user.identifier, sp->key.data.user.identifier_len)) { ++ ep = &bd->entries[count]; ++ ep->type = sp->value->type; ++ ep->val.user.info = apc_bd_alloc(sp->value->data.user.info_len TSRMLS_CC); ++ memcpy(ep->val.user.info, sp->value->data.user.info, sp->value->data.user.info_len); ++ ep->val.user.info_len = sp->value->data.user.info_len; ++ ep->val.user.val = apc_copy_zval(NULL, sp->value->data.user.val, &ctxt TSRMLS_CC); ++ ep->val.user.ttl = sp->value->data.user.ttl; ++ ++ /* swizzle pointers */ ++ apc_swizzle_ptr(bd, &ll, &bd->entries[count].val.user.info); ++ zend_hash_clean(&APCG(copied_zvals)); ++ apc_swizzle_zval(bd, &ll, bd->entries[count].val.user.val TSRMLS_CC); ++ apc_swizzle_ptr(bd, &ll, &bd->entries[count].val.user.val); ++ ++ count++; ++ } ++ } ++ } ++ zend_hash_destroy(&APCG(copied_zvals)); ++ APCG(copied_zvals).nTableSize=0; ++ ++ /* File entries */ ++ for(i=0; i < apc_cache->num_slots; i++) { ++ for(sp=apc_cache->slots[i]; sp != NULL; sp = sp->next) { ++ if(sp->key.type == APC_CACHE_KEY_FPFILE) { ++ if(apc_bin_checkfilter(files, sp->key.data.fpfile.fullpath, sp->key.data.fpfile.fullpath_len+1)) { ++ ep = &bd->entries[count]; ++ ep->type = sp->key.type; ++ ep->val.file.filename = apc_bd_alloc(strlen(sp->value->data.file.filename) + 1 TSRMLS_CC); ++ strcpy(ep->val.file.filename, sp->value->data.file.filename); ++ ep->val.file.op_array = apc_copy_op_array(NULL, sp->value->data.file.op_array, &ctxt TSRMLS_CC); ++ ++ for(ep->num_functions=0; sp->value->data.file.functions[ep->num_functions].function != NULL;) { ep->num_functions++; } ++ ep->val.file.functions = apc_bd_alloc(sizeof(apc_function_t) * ep->num_functions TSRMLS_CC); ++ for(fcount=0; fcount < ep->num_functions; fcount++) { ++ memcpy(&ep->val.file.functions[fcount], &sp->value->data.file.functions[fcount], sizeof(apc_function_t)); ++ ep->val.file.functions[fcount].name = apc_xmemcpy(sp->value->data.file.functions[fcount].name, sp->value->data.file.functions[fcount].name_len+1, apc_bd_alloc TSRMLS_CC); ++ ep->val.file.functions[fcount].name_len = sp->value->data.file.functions[fcount].name_len; ++ ep->val.file.functions[fcount].function = apc_bd_alloc(sizeof(zend_function) TSRMLS_CC); ++ efp = ep->val.file.functions[fcount].function; ++ sfp = sp->value->data.file.functions[fcount].function; ++ switch(sfp->type) { ++ case ZEND_INTERNAL_FUNCTION: ++ case ZEND_OVERLOADED_FUNCTION: ++ efp->op_array = sfp->op_array; ++ break; ++ case ZEND_USER_FUNCTION: ++ case ZEND_EVAL_CODE: ++ apc_copy_op_array(&efp->op_array, &sfp->op_array, &ctxt TSRMLS_CC); ++ break; ++ default: ++ assert(0); ++ } ++#ifdef ZEND_ENGINE_2 ++ efp->common.prototype = NULL; ++ efp->common.fn_flags = sfp->common.fn_flags & (~ZEND_ACC_IMPLEMENTED_ABSTRACT); ++#endif ++ apc_swizzle_ptr(bd, &ll, &ep->val.file.functions[fcount].name); ++ apc_swizzle_ptr(bd, &ll, (void**)&ep->val.file.functions[fcount].function); ++ apc_swizzle_op_array(bd, &ll, &efp->op_array TSRMLS_CC); ++ } ++ ++ ++ for(ep->num_classes=0; sp->value->data.file.classes[ep->num_classes].class_entry != NULL;) { ep->num_classes++; } ++ ep->val.file.classes = apc_bd_alloc(sizeof(apc_class_t) * ep->num_classes TSRMLS_CC); ++ for(fcount=0; fcount < ep->num_classes; fcount++) { ++ ep->val.file.classes[fcount].name = apc_xmemcpy(sp->value->data.file.classes[fcount].name, sp->value->data.file.classes[fcount].name_len + 1, apc_bd_alloc TSRMLS_CC); ++ ep->val.file.classes[fcount].name_len = sp->value->data.file.classes[fcount].name_len; ++ ep->val.file.classes[fcount].class_entry = apc_copy_class_entry(NULL, sp->value->data.file.classes[fcount].class_entry, &ctxt TSRMLS_CC); ++ ep->val.file.classes[fcount].parent_name = apc_xstrdup(sp->value->data.file.classes[fcount].parent_name, apc_bd_alloc TSRMLS_CC); ++ ++ apc_swizzle_ptr(bd, &ll, &ep->val.file.classes[fcount].name); ++ apc_swizzle_ptr(bd, &ll, &ep->val.file.classes[fcount].parent_name); ++ apc_swizzle_class_entry(bd, &ll, ep->val.file.classes[fcount].class_entry TSRMLS_CC); ++ apc_swizzle_ptr(bd, &ll, &ep->val.file.classes[fcount].class_entry); ++ } ++ ++ apc_swizzle_ptr(bd, &ll, &bd->entries[count].val.file.filename); ++ apc_swizzle_op_array(bd, &ll, bd->entries[count].val.file.op_array TSRMLS_CC); ++ apc_swizzle_ptr(bd, &ll, &bd->entries[count].val.file.op_array); ++ apc_swizzle_ptr(bd, &ll, (void**)&ep->val.file.functions); ++ apc_swizzle_ptr(bd, &ll, (void**)&ep->val.file.classes); ++ ++ count++; ++ } else { ++ /* TODO: Currently we don't support APC_CACHE_KEY_FILE type. We need to store the path and re-stat on load */ ++ } ++ } ++ } ++ } ++ ++ /* append swizzle pointer list to bd */ ++ bd = apc_swizzle_bd(bd, &ll TSRMLS_CC); ++ zend_llist_destroy(&ll); ++ zend_hash_destroy(&APCG(apc_bd_alloc_list)); ++ ++ if(files) { ++ zend_hash_destroy(files); ++ efree(files); ++ } ++ if(user_vars) { ++ zend_hash_destroy(user_vars); ++ efree(user_vars); ++ } ++ ++ efree(pool_ptr); ++ ++ return bd; ++} /* }}} */ ++ ++ ++/* {{{ apc_bin_load */ ++int apc_bin_load(apc_bd_t *bd, int flags TSRMLS_DC) { ++ ++ apc_bd_entry_t *ep; ++ uint i, i2; ++ int ret; ++ time_t t; ++ zend_op_array *alloc_op_array = NULL; ++ apc_function_t *alloc_functions = NULL; ++ apc_class_t *alloc_classes = NULL; ++ apc_cache_entry_t *cache_entry; ++ apc_cache_key_t cache_key; ++ apc_context_t ctxt; ++ ++ if (bd->swizzled) { ++ if(apc_unswizzle_bd(bd, flags TSRMLS_CC) < 0) { ++ return -1; ++ } ++ } ++ ++ t = apc_time(); ++ ++ for(i = 0; i < bd->num_entries; i++) { ++ ctxt.pool = apc_pool_create(APC_SMALL_POOL, apc_sma_malloc, apc_sma_free, apc_sma_protect, apc_sma_unprotect TSRMLS_CC); ++ if (!ctxt.pool) { /* TODO need to cleanup previous pools */ ++ apc_warning("Unable to allocate memory for pool." TSRMLS_CC); ++ goto failure; ++ } ++ ep = &bd->entries[i]; ++ switch (ep->type) { ++ case APC_CACHE_KEY_FILE: ++ /* TODO: Currently we don't support APC_CACHE_KEY_FILE type. We need to store the path and re-stat on load (or something else perhaps?) */ ++ break; ++ case APC_CACHE_KEY_FPFILE: ++ ctxt.copy = APC_COPY_IN_OPCODE; ++ ++ HANDLE_BLOCK_INTERRUPTIONS(); ++#if NONBLOCKING_LOCK_AVAILABLE ++ if(APCG(write_lock)) { ++ if(!apc_cache_write_lock(apc_cache TSRMLS_CC)) { ++ HANDLE_UNBLOCK_INTERRUPTIONS(); ++ return -1; ++ } ++ } ++#endif ++ if(! (alloc_op_array = apc_copy_op_array(NULL, ep->val.file.op_array, &ctxt TSRMLS_CC))) { ++ goto failure; ++ } ++ apc_bin_fixup_op_array(alloc_op_array); ++ ++ if(! (alloc_functions = apc_sma_malloc(sizeof(apc_function_t) * (ep->num_functions + 1) TSRMLS_CC))) { ++ goto failure; ++ } ++ for(i2=0; i2 < ep->num_functions; i2++) { ++ if(! (alloc_functions[i2].name = apc_xmemcpy(ep->val.file.functions[i2].name, ep->val.file.functions[i2].name_len + 1, apc_sma_malloc TSRMLS_CC))) { ++ goto failure; ++ } ++ alloc_functions[i2].name_len = ep->val.file.functions[i2].name_len; ++ if(! (alloc_functions[i2].function = apc_sma_malloc(sizeof(zend_function) TSRMLS_CC))) { ++ goto failure; ++ } ++ switch(ep->val.file.functions[i2].function->type) { ++ case ZEND_INTERNAL_FUNCTION: ++ case ZEND_OVERLOADED_FUNCTION: ++ alloc_functions[i2].function->op_array = ep->val.file.functions[i2].function->op_array; ++ break; ++ case ZEND_USER_FUNCTION: ++ case ZEND_EVAL_CODE: ++ if (!apc_copy_op_array(&alloc_functions[i2].function->op_array, &ep->val.file.functions[i2].function->op_array, &ctxt TSRMLS_CC)) { ++ goto failure; ++ } ++ apc_bin_fixup_op_array(&alloc_functions[i2].function->op_array); ++ break; ++ default: ++ assert(0); ++ } ++#ifdef ZEND_ENGINE_2 ++ alloc_functions[i2].function->common.prototype=NULL; ++ alloc_functions[i2].function->common.fn_flags=ep->val.file.functions[i2].function->common.fn_flags & (~ZEND_ACC_IMPLEMENTED_ABSTRACT); ++#endif ++ } ++ alloc_functions[i2].name = NULL; ++ alloc_functions[i2].function = NULL; ++ ++ if(! (alloc_classes = apc_sma_malloc(sizeof(apc_class_t) * (ep->num_classes + 1) TSRMLS_CC))) { ++ goto failure; ++ } ++ for(i2=0; i2 < ep->num_classes; i2++) { ++ if(! (alloc_classes[i2].name = apc_xmemcpy(ep->val.file.classes[i2].name, ep->val.file.classes[i2].name_len+1, apc_sma_malloc TSRMLS_CC))) { ++ goto failure; ++ } ++ alloc_classes[i2].name_len = ep->val.file.classes[i2].name_len; ++ if(! (alloc_classes[i2].class_entry = apc_copy_class_entry(NULL, ep->val.file.classes[i2].class_entry, &ctxt TSRMLS_CC))) { ++ goto failure; ++ } ++ apc_bin_fixup_class_entry(alloc_classes[i2].class_entry); ++ if(! (alloc_classes[i2].parent_name = apc_xstrdup(ep->val.file.classes[i2].parent_name, apc_sma_malloc TSRMLS_CC))) { ++ if(ep->val.file.classes[i2].parent_name != NULL) { ++ goto failure; ++ } ++ } ++ } ++ alloc_classes[i2].name = NULL; ++ alloc_classes[i2].class_entry = NULL; ++ ++ if(!(cache_entry = apc_cache_make_file_entry(ep->val.file.filename, alloc_op_array, alloc_functions, alloc_classes, &ctxt TSRMLS_CC))) { ++ goto failure; ++ } ++ ++ if (!apc_cache_make_file_key(&cache_key, ep->val.file.filename, PG(include_path), t TSRMLS_CC)) { ++ goto failure; ++ } ++ ++ if ((ret = apc_cache_insert(apc_cache, cache_key, cache_entry, &ctxt, t TSRMLS_CC)) != 1) { ++ if(ret==-1) { ++ goto failure; ++ } ++ } ++ ++#if NONBLOCKING_LOCK_AVAILABLE ++ if(APCG(write_lock)) { ++ apc_cache_write_unlock(apc_cache TSRMLS_CC); ++ } ++#endif ++ HANDLE_UNBLOCK_INTERRUPTIONS(); ++ ++ break; ++ case APC_CACHE_KEY_USER: ++ ctxt.copy = APC_COPY_IN_USER; ++ _apc_store(ep->val.user.info, ep->val.user.info_len, ep->val.user.val, ep->val.user.ttl, 0 TSRMLS_CC); ++ break; ++ default: ++ break; ++ } ++ } ++ ++ return 0; ++ ++failure: ++ apc_pool_destroy(ctxt.pool TSRMLS_CC); ++ apc_warning("Unable to allocate memory for apc binary load/dump functionality." TSRMLS_CC); ++#if NONBLOCKING_LOCK_AVAILABLE ++ if(APCG(write_lock)) { ++ apc_cache_write_unlock(apc_cache TSRMLS_CC); ++ } ++#endif ++ HANDLE_UNBLOCK_INTERRUPTIONS(); ++ return -1; ++} /* }}} */ ++ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_bin.h +@@ -0,0 +1,63 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Brian Shire | ++ +----------------------------------------------------------------------+ ++ ++ */ ++ ++/* $Id: apc_bin.h 300979 2010-07-04 10:15:05Z kalle $ */ ++ ++#ifndef APC_BINDUMP_H ++#define APC_BINDUMP_H ++ ++#include "apc.h" ++#include "apc_php.h" ++#include "ext/standard/basic_functions.h" ++ ++/* APC binload flags */ ++#define APC_BIN_VERIFY_MD5 1 << 0 ++#define APC_BIN_VERIFY_CRC32 1 << 1 ++ ++typedef struct _apc_bd_entry_t { ++ unsigned char type; ++ uint num_functions; ++ uint num_classes; ++ apc_cache_entry_value_t val; ++} apc_bd_entry_t; ++ ++typedef struct _apc_bd_t { ++ unsigned int size; ++ int swizzled; ++ unsigned char md5[16]; ++ php_uint32 crc; ++ unsigned int num_entries; ++ apc_bd_entry_t *entries; ++ int num_swizzled_ptrs; ++ void ***swizzled_ptrs; ++} apc_bd_t; ++ ++apc_bd_t* apc_bin_dump(HashTable *files, HashTable *user_vars TSRMLS_DC); ++int apc_bin_load(apc_bd_t *bd, int flags TSRMLS_DC); ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc.c +@@ -0,0 +1,636 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | George Schlossnagle | ++ | Rasmus Lerdorf | ++ | Arun C. Murthy | ++ | Gopal Vijayaraghavan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc.c 305003 2010-10-31 19:45:10Z gopalv $ */ ++ ++#include "apc.h" ++#include "apc_zend.h" ++#include "apc_cache.h" ++#include "php.h" ++ ++#if HAVE_PCRE || HAVE_BUNDLED_PCRE ++/* Deal with problem present until php-5.2.2 where php_pcre.h was not installed correctly */ ++# if !HAVE_BUNDLED_PCRE && PHP_MAJOR_VERSION == 5 && (PHP_MINOR_VERSION < 2 || (PHP_MINOR_VERSION == 2 && PHP_RELEASE_VERSION < 2)) ++# include "apc_php_pcre.h" ++# else ++# include "ext/pcre/php_pcre.h" ++# endif ++# include "ext/standard/php_smart_str.h" ++#endif ++ ++#define NELEMS(a) (sizeof(a)/sizeof((a)[0])) ++ ++/* {{{ memory allocation wrappers */ ++ ++void* apc_emalloc(size_t n TSRMLS_DC) ++{ ++ void* p = malloc(n); ++ if (p == NULL) { ++ apc_error("apc_emalloc: malloc failed to allocate %u bytes:" TSRMLS_CC, n); ++ } ++ return p; ++} ++ ++void* apc_erealloc(void* p, size_t n TSRMLS_DC) ++{ ++ p = realloc(p, n); ++ if (p == NULL) { ++ apc_error("apc_erealloc: realloc failed to allocate %u bytes:" TSRMLS_CC, n); ++ } ++ return p; ++} ++ ++void apc_efree(void* p TSRMLS_DC) ++{ ++ if (p == NULL) { ++ apc_error("apc_efree: attempt to free null pointer" TSRMLS_CC); ++ } ++ free(p); ++} ++ ++char* apc_estrdup(const char* s TSRMLS_DC) ++{ ++ int len; ++ char* dup; ++ ++ if (s == NULL) { ++ return NULL; ++ } ++ len = strlen(s); ++ dup = (char*) malloc(len+1); ++ if (dup == NULL) { ++ apc_error("apc_estrdup: malloc failed to allocate %u bytes:" TSRMLS_CC, len+1); ++ } ++ memcpy(dup, s, len); ++ dup[len] = '\0'; ++ return dup; ++} ++ ++void* apc_xstrdup(const char* s, apc_malloc_t f TSRMLS_DC) ++{ ++ return s != NULL ? apc_xmemcpy(s, strlen(s)+1, f TSRMLS_CC) : NULL; ++} ++ ++void* apc_xmemcpy(const void* p, size_t n, apc_malloc_t f TSRMLS_DC) ++{ ++ void* q; ++ ++ if (p != NULL && (q = f(n TSRMLS_CC)) != NULL) { ++ memcpy(q, p, n); ++ return q; ++ } ++ return NULL; ++} ++ ++/* }}} */ ++ ++/* {{{ console display functions */ ++#ifdef ZTS ++# define APC_PRINT_FUNCTION_PARAMETER TSRMLS_C ++#else ++# define APC_PRINT_FUNCTION_PARAMETER format ++#endif ++ ++#define APC_PRINT_FUNCTION(name, verbosity) \ ++ void apc_##name(const char *format TSRMLS_DC, ...) \ ++ { \ ++ va_list args; \ ++ \ ++ va_start(args, APC_PRINT_FUNCTION_PARAMETER); \ ++ php_verror(NULL, "", verbosity, format, args TSRMLS_CC); \ ++ va_end(args); \ ++ } ++ ++APC_PRINT_FUNCTION(error, E_ERROR) ++APC_PRINT_FUNCTION(warning, E_WARNING) ++APC_PRINT_FUNCTION(notice, E_NOTICE) ++ ++#ifdef __DEBUG_APC__ ++APC_PRINT_FUNCTION(debug, E_NOTICE) ++#else ++void apc_debug(const char *format TSRMLS_DC, ...) {} ++#endif ++/* }}} */ ++ ++/* {{{ string and text manipulation */ ++ ++char* apc_append(const char* s, const char* t TSRMLS_DC) ++{ ++ int slen; ++ int tlen; ++ char* p; ++ ++ slen = strlen(s); ++ tlen = strlen(t); ++ ++ p = (char*) apc_emalloc((slen + tlen + 1) * sizeof(char) TSRMLS_CC); ++ memcpy(p, s, slen); ++ memcpy(p + slen, t, tlen + 1); ++ ++ return p; ++} ++ ++char* apc_substr(const char* s, int start, int length TSRMLS_DC) ++{ ++ char* substr; ++ int src_len = strlen(s); ++ ++ /* bring start into range */ ++ if (start < 0) { ++ start = 0; ++ } ++ else if (start >= src_len) { ++ start = src_len - 1; ++ } ++ ++ /* bring length into range */ ++ if (length < 0 || src_len - start < length) { ++ length = src_len - start; ++ } ++ ++ /* create the substring */ ++ substr = apc_xmemcpy(s + start, length + 1, apc_emalloc TSRMLS_CC); ++ substr[length] = '\0'; ++ return substr; ++} ++ ++char** apc_tokenize(const char* s, char delim TSRMLS_DC) ++{ ++ char** tokens; /* array of tokens, NULL terminated */ ++ int size; /* size of tokens array */ ++ int n; /* index of next token in tokens array */ ++ int cur; /* current position in input string */ ++ int end; /* final legal position in input string */ ++ int next; /* position of next delimiter in input */ ++ ++ if (!s) { ++ return NULL; ++ } ++ ++ size = 2; ++ n = 0; ++ cur = 0; ++ end = strlen(s) - 1; ++ ++ tokens = (char**) apc_emalloc(size * sizeof(char*) TSRMLS_CC); ++ tokens[n] = NULL; ++ ++ while (cur <= end) { ++ /* search for the next delimiter */ ++ char* p = strchr(s + cur, delim); ++ next = p ? p-s : end+1; ++ ++ /* resize token array if necessary */ ++ if (n == size-1) { ++ size *= 2; ++ tokens = (char**) apc_erealloc(tokens, size * sizeof(char*) TSRMLS_CC); ++ } ++ ++ /* save the current token */ ++ tokens[n] = apc_substr(s, cur, next-cur TSRMLS_CC); ++ ++ tokens[++n] = NULL; ++ cur = next + 1; ++ } ++ ++ return tokens; ++} ++ ++/* }}} */ ++ ++ ++/* {{{ apc_win32_restat */ ++#ifdef PHP_WIN32 ++static int apc_restat(apc_fileinfo_t *fileinfo TSRMLS_DC) ++{ ++ HANDLE hFile; ++ BY_HANDLE_FILE_INFORMATION hInfo; ++ ++ hFile = CreateFile(fileinfo->fullpath, GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_FLAG_BACKUP_SEMANTICS, NULL); ++ ++ if (!hFile) { ++ apc_debug("Cannot create a file HANDLE for %s\n" TSRMLS_CC, fileinfo->fullpath); ++ return -1; ++ } ++ ++ if (!GetFileInformationByHandle(hFile, &hInfo)) { ++ apc_debug("Cannot get file information from handle\n" TSRMLS_CC); ++ CloseHandle(hFile); ++ return -1; ++ } ++ ++ CloseHandle(hFile); ++ ++ fileinfo->st_buf.sb.st_dev = hInfo.dwVolumeSerialNumber; ++ fileinfo->st_buf.sb.st_ino = (((apc_ino_t)(hInfo.nFileIndexHigh) << 32) | (apc_ino_t) hInfo.nFileIndexLow); ++ ++ return 0; ++} ++#else ++static int apc_restat(apc_fileinfo_t *fileinfo TSRMLS_DC) ++{ ++ return 0; ++} ++#endif ++/* }}} */ ++ ++/* {{{ apc_search_paths */ ++/* similar to php_stream_stat_path */ ++#define APC_URL_STAT(wrapper, filename, pstatbuf) \ ++ ((wrapper)->wops->url_stat((wrapper), (filename), PHP_STREAM_URL_STAT_QUIET, (pstatbuf), NULL TSRMLS_CC)) ++ ++/* copy out to path_buf if path_for_open isn't the same as filename */ ++#define COPY_IF_CHANGED(p) \ ++ (char*) (((p) == filename) ? filename : \ ++ (strlcpy((char*)fileinfo->path_buf, (p), sizeof(fileinfo->path_buf))) \ ++ ? (fileinfo->path_buf) : NULL) ++ ++/* len checks can be skipped here because filename is NUL terminated */ ++#define IS_RELATIVE_PATH(filename, len) \ ++ ((filename) && (filename[0] == '.' && \ ++ (IS_SLASH(filename[1]) || \ ++ (filename[1] == '.' && \ ++ IS_SLASH(filename[2]))))) ++ ++ ++int apc_search_paths(const char* filename, const char* path, apc_fileinfo_t* fileinfo TSRMLS_DC) ++{ ++ char** paths = NULL; ++ char *exec_fname; ++ int exec_fname_length; ++ int found = 0; ++ int i; ++ php_stream_wrapper *wrapper = NULL; ++ char *path_for_open = NULL; ++ ++ assert(filename && fileinfo); ++ ++ ++ wrapper = php_stream_locate_url_wrapper(filename, &path_for_open, 0 TSRMLS_CC); ++ ++ if(!wrapper || !wrapper->wops || !wrapper->wops->url_stat) { ++ return -1; ++ } ++ ++ if(wrapper != &php_plain_files_wrapper) { ++ if(APC_URL_STAT(wrapper, path_for_open, &fileinfo->st_buf) == 0) { ++ fileinfo->fullpath = COPY_IF_CHANGED(path_for_open); ++ return apc_restat(fileinfo TSRMLS_CC); ++ } ++ return -1; /* cannot stat */ ++ } ++ ++ if (IS_ABSOLUTE_PATH(path_for_open, strlen(path_for_open)) && ++ APC_URL_STAT(wrapper, path_for_open, &fileinfo->st_buf) == 0) { ++ fileinfo->fullpath = COPY_IF_CHANGED(path_for_open); ++ return apc_restat(fileinfo TSRMLS_CC); ++ } ++ ++ if (!IS_RELATIVE_PATH(path_for_open, strlen(path_for_open))) { ++ paths = apc_tokenize(path, DEFAULT_DIR_SEPARATOR TSRMLS_CC); ++ if (!paths) ++ return -1; ++ ++ /* for each directory in paths, look for filename inside */ ++ for (i = 0; paths[i]; i++) { ++ snprintf(fileinfo->path_buf, sizeof(fileinfo->path_buf), "%s%c%s", paths[i], DEFAULT_SLASH, path_for_open); ++ if (APC_URL_STAT(wrapper, fileinfo->path_buf, &fileinfo->st_buf) == 0) { ++ fileinfo->fullpath = (char*) fileinfo->path_buf; ++ found = 1; ++ break; ++ } ++ } ++ } ++ ++ /* check in path of the calling scripts' current working directory */ ++ /* modified from main/streams/plain_wrapper.c */ ++ if(!found && zend_is_executing(TSRMLS_C)) { ++ exec_fname = zend_get_executed_filename(TSRMLS_C); ++ exec_fname_length = strlen(exec_fname); ++ while((--exec_fname_length >= 0) && !IS_SLASH(exec_fname[exec_fname_length])); ++ if((exec_fname && exec_fname[0] != '[') && exec_fname_length > 0) { ++ /* not: [no active file] or no path */ ++ memcpy(fileinfo->path_buf, exec_fname, exec_fname_length); ++ fileinfo->path_buf[exec_fname_length] = DEFAULT_SLASH; ++ strlcpy(fileinfo->path_buf +exec_fname_length +1, path_for_open,sizeof(fileinfo->path_buf)-exec_fname_length-1); ++ /* apc_warning("filename: %s, exec_fname: %s, fileinfo->path_buf: %s" TSRMLS_CC, path_for_open, exec_fname, fileinfo->path_buf); */ ++ if (APC_URL_STAT(wrapper, fileinfo->path_buf, &fileinfo->st_buf) == 0) { ++ fileinfo->fullpath = (char*) fileinfo->path_buf; ++ found = 1; ++ } ++ } ++ } ++ ++ if(paths) { ++ /* free the value returned by apc_tokenize */ ++ for (i = 0; paths[i]; i++) { ++ apc_efree(paths[i] TSRMLS_CC); ++ } ++ apc_efree(paths TSRMLS_CC); ++ } ++ ++ return found ? apc_restat(fileinfo TSRMLS_CC) : -1; ++} ++ ++/* }}} */ ++ ++/* {{{ regular expression wrapper functions */ ++ ++#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) ++typedef struct { ++ pcre *preg; ++ pcre *nreg; ++} apc_regex; ++ ++#define APC_ADD_PATTERN(match, pat) do {\ ++ if(match.len > 1) {\ ++ smart_str_appendc(&match, '|');\ ++ }\ ++ smart_str_appendc(&match, '(');\ ++ while(*pat) {\ ++ if(*pat == '/') smart_str_appendc(&match, '\\');\ ++ \ ++ smart_str_appendc(&match, *(pat++));\ ++ }\ ++ smart_str_appendc(&match, ')');\ ++} while(0) ++ ++#define APC_COMPILE_PATTERN(re, match) do {\ ++ if(match.len > 2) { /* more than just "//" */\ ++ if (((re) = pcre_get_compiled_regex(match.c, NULL, NULL TSRMLS_CC)) == NULL) {\ ++ apc_warning("apc_regex_compile_array: invalid expression '%s'" TSRMLS_CC, match.c); \ ++ smart_str_free(&match);\ ++ return NULL;\ ++ }\ ++ } else { \ ++ (re) = NULL;\ ++ }\ ++} while(0) ++ ++void* apc_regex_compile_array(char* patterns[] TSRMLS_DC) ++{ ++ apc_regex* regs; ++ int npat; ++ smart_str pmatch = {0,}; ++ smart_str nmatch = {0,}; ++ char* pattern; ++ ++ if (!patterns) ++ return NULL; ++ ++ regs = (apc_regex*) apc_emalloc(sizeof(apc_regex) TSRMLS_CC); ++ ++ smart_str_appendc(&pmatch, '/'); ++ smart_str_appendc(&nmatch, '/'); ++ ++ for (npat = 0; patterns[npat] != NULL; npat++) { ++ pattern = patterns[npat]; ++ if(pattern[0] == '+') { ++ pattern += sizeof(char); ++ APC_ADD_PATTERN(pmatch, pattern); ++ } else { ++ if(pattern[0] == '-') pattern += sizeof(char); ++ APC_ADD_PATTERN(nmatch, pattern); ++ } ++ } ++ smart_str_appendc(&pmatch, '/'); ++ smart_str_appendc(&nmatch, '/'); ++ ++ smart_str_0(&nmatch); ++ smart_str_0(&pmatch); ++ ++ APC_COMPILE_PATTERN(regs->preg, pmatch); ++ APC_COMPILE_PATTERN(regs->nreg, nmatch); ++ ++ smart_str_free(&pmatch); ++ smart_str_free(&nmatch); ++ ++ return (void*) regs; ++} ++ ++void apc_regex_destroy_array(void* p TSRMLS_DC) ++{ ++ if (p != NULL) { ++ apc_regex* regs = (apc_regex*) p; ++ apc_efree(regs TSRMLS_CC); ++ } ++} ++ ++#define APC_MATCH_PATTERN(re, input, output) do {\ ++ if (re && pcre_exec(re, NULL, (input), strlen(input), 0, 0, NULL, 0) >= 0) {\ ++ return (output);\ ++ }\ ++} while(0) ++ ++ ++int apc_regex_match_array(void* p, const char* input) ++{ ++ apc_regex* regs; ++ ++ if (!p) ++ return 0; ++ ++ regs = (apc_regex*) p; ++ ++ APC_MATCH_PATTERN(regs->preg, input, APC_POSITIVE_MATCH); ++ APC_MATCH_PATTERN(regs->nreg, input, APC_NEGATIVE_MATCH); ++ ++ return 0; ++} ++#else /* no pcre */ ++void* apc_regex_compile_array(char* patterns[] TSRMLS_DC) ++{ ++ if(patterns && patterns[0] != NULL) { ++ apc_warning("pcre missing, disabling filters" TSRMLS_CC); ++ } ++ return NULL; ++} ++void apc_regex_destroy_array(void* p) ++{ ++ /* nothing */ ++} ++int apc_regex_match_array(void* p, const char* input) ++{ ++ return 0; ++} ++#endif ++/* }}} */ ++ ++/* {{{ crc32 implementation */ ++ ++/* this table was generated by crc32gen() */ ++static unsigned int crc32tab[] = { ++ /* 0 */ 0x00000000, 0x3b83984b, 0x77073096, 0x4c84a8dd, ++ /* 4 */ 0xee0e612c, 0xd58df967, 0x990951ba, 0xa28ac9f1, ++ /* 8 */ 0x076dc419, 0x3cee5c52, 0x706af48f, 0x4be96cc4, ++ /* 12 */ 0xe963a535, 0xd2e03d7e, 0x9e6495a3, 0xa5e70de8, ++ /* 16 */ 0x0edb8832, 0x35581079, 0x79dcb8a4, 0x425f20ef, ++ /* 20 */ 0xe0d5e91e, 0xdb567155, 0x97d2d988, 0xac5141c3, ++ /* 24 */ 0x09b64c2b, 0x3235d460, 0x7eb17cbd, 0x4532e4f6, ++ /* 28 */ 0xe7b82d07, 0xdc3bb54c, 0x90bf1d91, 0xab3c85da, ++ /* 32 */ 0x1db71064, 0x2634882f, 0x6ab020f2, 0x5133b8b9, ++ /* 36 */ 0xf3b97148, 0xc83ae903, 0x84be41de, 0xbf3dd995, ++ /* 40 */ 0x1adad47d, 0x21594c36, 0x6ddde4eb, 0x565e7ca0, ++ /* 44 */ 0xf4d4b551, 0xcf572d1a, 0x83d385c7, 0xb8501d8c, ++ /* 48 */ 0x136c9856, 0x28ef001d, 0x646ba8c0, 0x5fe8308b, ++ /* 52 */ 0xfd62f97a, 0xc6e16131, 0x8a65c9ec, 0xb1e651a7, ++ /* 56 */ 0x14015c4f, 0x2f82c404, 0x63066cd9, 0x5885f492, ++ /* 60 */ 0xfa0f3d63, 0xc18ca528, 0x8d080df5, 0xb68b95be, ++ /* 64 */ 0x3b6e20c8, 0x00edb883, 0x4c69105e, 0x77ea8815, ++ /* 68 */ 0xd56041e4, 0xeee3d9af, 0xa2677172, 0x99e4e939, ++ /* 72 */ 0x3c03e4d1, 0x07807c9a, 0x4b04d447, 0x70874c0c, ++ /* 76 */ 0xd20d85fd, 0xe98e1db6, 0xa50ab56b, 0x9e892d20, ++ /* 80 */ 0x35b5a8fa, 0x0e3630b1, 0x42b2986c, 0x79310027, ++ /* 84 */ 0xdbbbc9d6, 0xe038519d, 0xacbcf940, 0x973f610b, ++ /* 88 */ 0x32d86ce3, 0x095bf4a8, 0x45df5c75, 0x7e5cc43e, ++ /* 92 */ 0xdcd60dcf, 0xe7559584, 0xabd13d59, 0x9052a512, ++ /* 96 */ 0x26d930ac, 0x1d5aa8e7, 0x51de003a, 0x6a5d9871, ++ /* 100 */ 0xc8d75180, 0xf354c9cb, 0xbfd06116, 0x8453f95d, ++ /* 104 */ 0x21b4f4b5, 0x1a376cfe, 0x56b3c423, 0x6d305c68, ++ /* 108 */ 0xcfba9599, 0xf4390dd2, 0xb8bda50f, 0x833e3d44, ++ /* 112 */ 0x2802b89e, 0x138120d5, 0x5f058808, 0x64861043, ++ /* 116 */ 0xc60cd9b2, 0xfd8f41f9, 0xb10be924, 0x8a88716f, ++ /* 120 */ 0x2f6f7c87, 0x14ece4cc, 0x58684c11, 0x63ebd45a, ++ /* 124 */ 0xc1611dab, 0xfae285e0, 0xb6662d3d, 0x8de5b576, ++ /* 128 */ 0x76dc4190, 0x4d5fd9db, 0x01db7106, 0x3a58e94d, ++ /* 132 */ 0x98d220bc, 0xa351b8f7, 0xefd5102a, 0xd4568861, ++ /* 136 */ 0x71b18589, 0x4a321dc2, 0x06b6b51f, 0x3d352d54, ++ /* 140 */ 0x9fbfe4a5, 0xa43c7cee, 0xe8b8d433, 0xd33b4c78, ++ /* 144 */ 0x7807c9a2, 0x438451e9, 0x0f00f934, 0x3483617f, ++ /* 148 */ 0x9609a88e, 0xad8a30c5, 0xe10e9818, 0xda8d0053, ++ /* 152 */ 0x7f6a0dbb, 0x44e995f0, 0x086d3d2d, 0x33eea566, ++ /* 156 */ 0x91646c97, 0xaae7f4dc, 0xe6635c01, 0xdde0c44a, ++ /* 160 */ 0x6b6b51f4, 0x50e8c9bf, 0x1c6c6162, 0x27eff929, ++ /* 164 */ 0x856530d8, 0xbee6a893, 0xf262004e, 0xc9e19805, ++ /* 168 */ 0x6c0695ed, 0x57850da6, 0x1b01a57b, 0x20823d30, ++ /* 172 */ 0x8208f4c1, 0xb98b6c8a, 0xf50fc457, 0xce8c5c1c, ++ /* 176 */ 0x65b0d9c6, 0x5e33418d, 0x12b7e950, 0x2934711b, ++ /* 180 */ 0x8bbeb8ea, 0xb03d20a1, 0xfcb9887c, 0xc73a1037, ++ /* 184 */ 0x62dd1ddf, 0x595e8594, 0x15da2d49, 0x2e59b502, ++ /* 188 */ 0x8cd37cf3, 0xb750e4b8, 0xfbd44c65, 0xc057d42e, ++ /* 192 */ 0x4db26158, 0x7631f913, 0x3ab551ce, 0x0136c985, ++ /* 196 */ 0xa3bc0074, 0x983f983f, 0xd4bb30e2, 0xef38a8a9, ++ /* 200 */ 0x4adfa541, 0x715c3d0a, 0x3dd895d7, 0x065b0d9c, ++ /* 204 */ 0xa4d1c46d, 0x9f525c26, 0xd3d6f4fb, 0xe8556cb0, ++ /* 208 */ 0x4369e96a, 0x78ea7121, 0x346ed9fc, 0x0fed41b7, ++ /* 212 */ 0xad678846, 0x96e4100d, 0xda60b8d0, 0xe1e3209b, ++ /* 216 */ 0x44042d73, 0x7f87b538, 0x33031de5, 0x088085ae, ++ /* 220 */ 0xaa0a4c5f, 0x9189d414, 0xdd0d7cc9, 0xe68ee482, ++ /* 224 */ 0x5005713c, 0x6b86e977, 0x270241aa, 0x1c81d9e1, ++ /* 228 */ 0xbe0b1010, 0x8588885b, 0xc90c2086, 0xf28fb8cd, ++ /* 232 */ 0x5768b525, 0x6ceb2d6e, 0x206f85b3, 0x1bec1df8, ++ /* 236 */ 0xb966d409, 0x82e54c42, 0xce61e49f, 0xf5e27cd4, ++ /* 240 */ 0x5edef90e, 0x655d6145, 0x29d9c998, 0x125a51d3, ++ /* 244 */ 0xb0d09822, 0x8b530069, 0xc7d7a8b4, 0xfc5430ff, ++ /* 248 */ 0x59b33d17, 0x6230a55c, 0x2eb40d81, 0x153795ca, ++ /* 252 */ 0xb7bd5c3b, 0x8c3ec470, 0xc0ba6cad, 0xfb39f4e6, ++}; ++ ++unsigned int apc_crc32(const char* buf, int len) ++{ ++ int i; ++ int k; ++ unsigned int crc; ++ ++ /* preconditioning */ ++ crc = 0xFFFFFFFF; ++ ++ for (i = 0; i < len; i++) { ++ k = (crc ^ buf[i]) & 0x000000FF; ++ crc = ((crc >> 8) & 0x00FFFFFF) ^ crc32tab[k]; ++ } ++ ++ /* postconditioning */ ++ return ~crc; ++} ++ ++/* crc32gen: generate the nth (0..255) crc32 table value */ ++#if 0 ++static unsigned long crc32gen(int n) ++{ ++ int i; ++ unsigned long crc; ++ ++ crc = n; ++ for (i = 8; i >= 0; i--) { ++ if (crc & 1) { ++ crc = (crc >> 1) ^ 0xEDB88320; ++ } ++ else { ++ crc >>= 1; ++ } ++ } ++ return crc; ++} ++#endif ++ ++/* }}} */ ++ ++ ++/* {{{ apc_flip_hash() */ ++HashTable* apc_flip_hash(HashTable *hash) { ++ zval **entry, *data; ++ HashTable *new_hash; ++ HashPosition pos; ++ ++ if(hash == NULL) return hash; ++ ++ MAKE_STD_ZVAL(data); ++ ZVAL_LONG(data, 1); ++ ++ new_hash = emalloc(sizeof(HashTable)); ++ zend_hash_init(new_hash, hash->nTableSize, NULL, ZVAL_PTR_DTOR, 0); ++ ++ zend_hash_internal_pointer_reset_ex(hash, &pos); ++ while (zend_hash_get_current_data_ex(hash, (void **)&entry, &pos) == SUCCESS) { ++ if(Z_TYPE_PP(entry) == IS_STRING) { ++ zend_hash_update(new_hash, Z_STRVAL_PP(entry), Z_STRLEN_PP(entry) +1, &data, sizeof(data), NULL); ++ } else { ++ zend_hash_index_update(new_hash, Z_LVAL_PP(entry), &data, sizeof(data), NULL); ++ } ++ Z_ADDREF_P(data); ++ zend_hash_move_forward_ex(hash, &pos); ++ } ++ zval_ptr_dtor(&data); ++ ++ return new_hash; ++} ++/* }}} */ ++ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_cache.c +@@ -0,0 +1,1295 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | Rasmus Lerdorf | ++ | Arun C. Murthy | ++ | Gopal Vijayaraghavan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_cache.c 305771 2010-11-26 12:57:16Z gopalv $ */ ++ ++#include "apc_cache.h" ++#include "apc_zend.h" ++#include "apc_sma.h" ++#include "apc_globals.h" ++#include "SAPI.h" ++ ++/* TODO: rehash when load factor exceeds threshold */ ++ ++#define CHECK(p) { if ((p) == NULL) return NULL; } ++ ++/* {{{ key_equals */ ++#define key_equals(a, b) (a.inode==b.inode && a.device==b.device) ++/* }}} */ ++ ++static void apc_cache_expunge(apc_cache_t* cache, size_t size TSRMLS_DC); ++ ++/* {{{ hash */ ++static unsigned int hash(apc_cache_key_t key) ++{ ++ return (unsigned int)(key.data.file.device + key.data.file.inode); ++} ++/* }}} */ ++ ++/* {{{ string_nhash_8 */ ++#define string_nhash_8(s,len) (unsigned int)(zend_inline_hash_func(s, len)) ++/* }}} */ ++ ++/* {{{ make_prime */ ++static int const primes[] = { ++ 257, /* 256 */ ++ 521, /* 512 */ ++ 1031, /* 1024 */ ++ 2053, /* 2048 */ ++ 3079, /* 3072 */ ++ 4099, /* 4096 */ ++ 5147, /* 5120 */ ++ 6151, /* 6144 */ ++ 7177, /* 7168 */ ++ 8209, /* 8192 */ ++ 9221, /* 9216 */ ++10243, /* 10240 */ ++#if 0 ++11273, /* 11264 */ ++12289, /* 12288 */ ++13313, /* 13312 */ ++14341, /* 14336 */ ++15361, /* 15360 */ ++16411, /* 16384 */ ++17417, /* 17408 */ ++18433, /* 18432 */ ++19457, /* 19456 */ ++#endif ++0 /* sentinel */ ++}; ++ ++static int make_prime(int n) ++{ ++ int *k = (int*)primes; ++ while(*k) { ++ if((*k) > n) return *k; ++ k++; ++ } ++ return *(k-1); ++} ++/* }}} */ ++ ++/* {{{ make_slot */ ++slot_t* make_slot(apc_cache_key_t key, apc_cache_entry_t* value, slot_t* next, time_t t TSRMLS_DC) ++{ ++ slot_t* p = apc_pool_alloc(value->pool, sizeof(slot_t)); ++ ++ if (!p) return NULL; ++ ++ if(value->type == APC_CACHE_ENTRY_USER) { ++ char *identifier = (char*) apc_pmemcpy(key.data.user.identifier, key.data.user.identifier_len, value->pool TSRMLS_CC); ++ if (!identifier) { ++ return NULL; ++ } ++ key.data.user.identifier = identifier; ++ } else if(key.type == APC_CACHE_KEY_FPFILE) { ++ char *fullpath = (char*) apc_pstrdup(key.data.fpfile.fullpath, value->pool TSRMLS_CC); ++ if (!fullpath) { ++ return NULL; ++ } ++ key.data.fpfile.fullpath = fullpath; ++ } ++ p->key = key; ++ p->value = value; ++ p->next = next; ++ p->num_hits = 0; ++ p->creation_time = t; ++ p->access_time = t; ++ p->deletion_time = 0; ++ return p; ++} ++/* }}} */ ++ ++/* {{{ free_slot */ ++static void free_slot(slot_t* slot TSRMLS_DC) ++{ ++ apc_pool_destroy(slot->value->pool TSRMLS_CC); ++} ++/* }}} */ ++ ++/* {{{ remove_slot */ ++static void remove_slot(apc_cache_t* cache, slot_t** slot TSRMLS_DC) ++{ ++ slot_t* dead = *slot; ++ *slot = (*slot)->next; ++ ++ cache->header->mem_size -= dead->value->mem_size; ++ cache->header->num_entries--; ++ if (dead->value->ref_count <= 0) { ++ free_slot(dead TSRMLS_CC); ++ } ++ else { ++ dead->next = cache->header->deleted_list; ++ dead->deletion_time = time(0); ++ cache->header->deleted_list = dead; ++ } ++} ++/* }}} */ ++ ++/* {{{ process_pending_removals */ ++static void process_pending_removals(apc_cache_t* cache TSRMLS_DC) ++{ ++ slot_t** slot; ++ time_t now; ++ ++ /* This function scans the list of removed cache entries and deletes any ++ * entry whose reference count is zero (indicating that it is no longer ++ * being executed) or that has been on the pending list for more than ++ * cache->gc_ttl seconds (we issue a warning in the latter case). ++ */ ++ ++ if (!cache->header->deleted_list) ++ return; ++ ++ slot = &cache->header->deleted_list; ++ now = time(0); ++ ++ while (*slot != NULL) { ++ int gc_sec = cache->gc_ttl ? (now - (*slot)->deletion_time) : 0; ++ ++ if ((*slot)->value->ref_count <= 0 || gc_sec > cache->gc_ttl) { ++ slot_t* dead = *slot; ++ ++ if (dead->value->ref_count > 0) { ++ switch(dead->value->type) { ++ case APC_CACHE_ENTRY_FILE: ++ apc_warning("GC cache entry '%s' (dev=%d ino=%d) was on gc-list for %d seconds" TSRMLS_CC, ++ dead->value->data.file.filename, dead->key.data.file.device, dead->key.data.file.inode, gc_sec); ++ break; ++ case APC_CACHE_ENTRY_USER: ++ apc_warning("GC cache entry '%s'was on gc-list for %d seconds" TSRMLS_CC, dead->value->data.user.info, gc_sec); ++ break; ++ } ++ } ++ *slot = dead->next; ++ free_slot(dead TSRMLS_CC); ++ } ++ else { ++ slot = &(*slot)->next; ++ } ++ } ++} ++/* }}} */ ++ ++/* {{{ prevent_garbage_collection */ ++static void prevent_garbage_collection(apc_cache_entry_t* entry) ++{ ++ /* set reference counts on zend objects to an arbitrarily high value to ++ * prevent garbage collection after execution */ ++ ++ enum { BIG_VALUE = 1000 }; ++ ++ if(entry->data.file.op_array) { ++ entry->data.file.op_array->refcount[0] = BIG_VALUE; ++ } ++ if (entry->data.file.functions) { ++ int i; ++ apc_function_t* fns = entry->data.file.functions; ++ for (i=0; fns[i].function != NULL; i++) { ++ *(fns[i].function->op_array.refcount) = BIG_VALUE; ++ } ++ } ++ if (entry->data.file.classes) { ++ int i; ++ apc_class_t* classes = entry->data.file.classes; ++ for (i=0; classes[i].class_entry != NULL; i++) { ++ classes[i].class_entry->refcount = BIG_VALUE; ++ } ++ } ++} ++/* }}} */ ++ ++/* {{{ apc_cache_create */ ++apc_cache_t* apc_cache_create(int size_hint, int gc_ttl, int ttl TSRMLS_DC) ++{ ++ apc_cache_t* cache; ++ int cache_size; ++ int num_slots; ++ ++ num_slots = make_prime(size_hint > 0 ? size_hint : 2000); ++ ++ cache = (apc_cache_t*) apc_emalloc(sizeof(apc_cache_t) TSRMLS_CC); ++ cache_size = sizeof(cache_header_t) + num_slots*sizeof(slot_t*); ++ ++ cache->shmaddr = apc_sma_malloc(cache_size TSRMLS_CC); ++ if(!cache->shmaddr) { ++ apc_error("Unable to allocate shared memory for cache structures. (Perhaps your shared memory size isn't large enough?). " TSRMLS_CC); ++ } ++ memset(cache->shmaddr, 0, cache_size); ++ ++ cache->header = (cache_header_t*) cache->shmaddr; ++ cache->header->num_hits = 0; ++ cache->header->num_misses = 0; ++ cache->header->deleted_list = NULL; ++ cache->header->start_time = time(NULL); ++ cache->header->expunges = 0; ++ cache->header->busy = 0; ++ ++ cache->slots = (slot_t**) (((char*) cache->shmaddr) + sizeof(cache_header_t)); ++ cache->num_slots = num_slots; ++ cache->gc_ttl = gc_ttl; ++ cache->ttl = ttl; ++ CREATE_LOCK(cache->header->lock); ++#if NONBLOCKING_LOCK_AVAILABLE ++ CREATE_LOCK(cache->header->wrlock); ++#endif ++ memset(cache->slots, 0, sizeof(slot_t*)*num_slots); ++ cache->expunge_cb = apc_cache_expunge; ++ cache->has_lock = 0; ++ ++ return cache; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_destroy */ ++void apc_cache_destroy(apc_cache_t* cache TSRMLS_DC) ++{ ++ DESTROY_LOCK(cache->header->lock); ++#ifdef NONBLOCKING_LOCK_AVAILABLE ++ DESTROY_LOCK(cache->header->wrlock); ++#endif ++ apc_efree(cache TSRMLS_CC); ++} ++/* }}} */ ++ ++/* {{{ apc_cache_clear */ ++void apc_cache_clear(apc_cache_t* cache TSRMLS_DC) ++{ ++ int i; ++ ++ if(!cache) return; ++ ++ CACHE_LOCK(cache); ++ cache->header->busy = 1; ++ cache->header->num_hits = 0; ++ cache->header->num_misses = 0; ++ cache->header->start_time = time(NULL); ++ cache->header->expunges = 0; ++ ++ for (i = 0; i < cache->num_slots; i++) { ++ slot_t* p = cache->slots[i]; ++ while (p) { ++ remove_slot(cache, &p TSRMLS_CC); ++ } ++ cache->slots[i] = NULL; ++ } ++ ++ memset(&cache->header->lastkey, 0, sizeof(apc_keyid_t)); ++ ++ cache->header->busy = 0; ++ CACHE_UNLOCK(cache); ++} ++/* }}} */ ++ ++/* {{{ apc_cache_expunge */ ++static void apc_cache_expunge(apc_cache_t* cache, size_t size TSRMLS_DC) ++{ ++ int i; ++ time_t t; ++ ++ t = apc_time(); ++ ++ if(!cache) return; ++ ++ if(!cache->ttl) { ++ /* ++ * If cache->ttl is not set, we wipe out the entire cache when ++ * we run out of space. ++ */ ++ CACHE_SAFE_LOCK(cache); ++ if (apc_sma_get_avail_mem() > (size_t)(APCG(shm_size)/2)) { ++ /* probably a queued up expunge, we don't need to do this */ ++ CACHE_SAFE_UNLOCK(cache); ++ return; ++ } ++ cache->header->busy = 1; ++ cache->header->expunges++; ++clear_all: ++ for (i = 0; i < cache->num_slots; i++) { ++ slot_t* p = cache->slots[i]; ++ while (p) { ++ remove_slot(cache, &p TSRMLS_CC); ++ } ++ cache->slots[i] = NULL; ++ } ++ memset(&cache->header->lastkey, 0, sizeof(apc_keyid_t)); ++ cache->header->busy = 0; ++ CACHE_SAFE_UNLOCK(cache); ++ } else { ++ slot_t **p; ++ /* ++ * If the ttl for the cache is set we walk through and delete stale ++ * entries. For the user cache that is slightly confusing since ++ * we have the individual entry ttl's we can look at, but that would be ++ * too much work. So if you want the user cache expunged, set a high ++ * default apc.user_ttl and still provide a specific ttl for each entry ++ * on insert ++ */ ++ ++ CACHE_SAFE_LOCK(cache); ++ if (apc_sma_get_avail_mem() > (size_t)(APCG(shm_size)/2)) { ++ /* probably a queued up expunge, we don't need to do this */ ++ CACHE_SAFE_UNLOCK(cache); ++ return; ++ } ++ cache->header->busy = 1; ++ cache->header->expunges++; ++ for (i = 0; i < cache->num_slots; i++) { ++ p = &cache->slots[i]; ++ while(*p) { ++ /* ++ * For the user cache we look at the individual entry ttl values ++ * and if not set fall back to the default ttl for the user cache ++ */ ++ if((*p)->value->type == APC_CACHE_ENTRY_USER) { ++ if((*p)->value->data.user.ttl) { ++ if((time_t) ((*p)->creation_time + (*p)->value->data.user.ttl) < t) { ++ remove_slot(cache, p TSRMLS_CC); ++ continue; ++ } ++ } else if(cache->ttl) { ++ if((*p)->creation_time + cache->ttl < t) { ++ remove_slot(cache, p TSRMLS_CC); ++ continue; ++ } ++ } ++ } else if((*p)->access_time < (t - cache->ttl)) { ++ remove_slot(cache, p TSRMLS_CC); ++ continue; ++ } ++ p = &(*p)->next; ++ } ++ } ++ ++ if (!apc_sma_get_avail_size(size)) { ++ /* TODO: re-do this to remove goto across locked sections */ ++ goto clear_all; ++ } ++ memset(&cache->header->lastkey, 0, sizeof(apc_keyid_t)); ++ cache->header->busy = 0; ++ CACHE_SAFE_UNLOCK(cache); ++ } ++} ++/* }}} */ ++ ++/* {{{ apc_cache_insert */ ++static inline int _apc_cache_insert(apc_cache_t* cache, ++ apc_cache_key_t key, ++ apc_cache_entry_t* value, ++ apc_context_t* ctxt, ++ time_t t ++ TSRMLS_DC) ++{ ++ slot_t** slot; ++ ++ if (!value) { ++ return 0; ++ } ++ ++ apc_debug("Inserting [%s]\n" TSRMLS_CC, value->data.file.filename); ++ ++ process_pending_removals(cache TSRMLS_CC); ++ ++ if(key.type == APC_CACHE_KEY_FILE) slot = &cache->slots[hash(key) % cache->num_slots]; ++ else slot = &cache->slots[string_nhash_8(key.data.fpfile.fullpath, key.data.fpfile.fullpath_len) % cache->num_slots]; ++ ++ while(*slot) { ++ if(key.type == (*slot)->key.type) { ++ if(key.type == APC_CACHE_KEY_FILE) { ++ if(key_equals((*slot)->key.data.file, key.data.file)) { ++ /* If existing slot for the same device+inode is different, remove it and insert the new version */ ++ if (ctxt->force_update || (*slot)->key.mtime != key.mtime) { ++ remove_slot(cache, slot TSRMLS_CC); ++ break; ++ } ++ return 0; ++ } else if(cache->ttl && (*slot)->access_time < (t - cache->ttl)) { ++ remove_slot(cache, slot TSRMLS_CC); ++ continue; ++ } ++ } else { /* APC_CACHE_KEY_FPFILE */ ++ if(!memcmp((*slot)->key.data.fpfile.fullpath, key.data.fpfile.fullpath, key.data.fpfile.fullpath_len+1)) { ++ /* Hrm.. it's already here, remove it and insert new one */ ++ remove_slot(cache, slot TSRMLS_CC); ++ break; ++ } else if(cache->ttl && (*slot)->access_time < (t - cache->ttl)) { ++ remove_slot(cache, slot TSRMLS_CC); ++ continue; ++ } ++ } ++ } ++ slot = &(*slot)->next; ++ } ++ ++ if ((*slot = make_slot(key, value, *slot, t TSRMLS_CC)) == NULL) { ++ return -1; ++ } ++ ++ value->mem_size = ctxt->pool->size; ++ cache->header->mem_size += ctxt->pool->size; ++ cache->header->num_entries++; ++ cache->header->num_inserts++; ++ ++ return 1; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_insert */ ++int apc_cache_insert(apc_cache_t* cache, apc_cache_key_t key, apc_cache_entry_t* value, apc_context_t *ctxt, time_t t TSRMLS_DC) ++{ ++ int rval; ++ CACHE_LOCK(cache); ++ rval = _apc_cache_insert(cache, key, value, ctxt, t TSRMLS_CC); ++ CACHE_UNLOCK(cache); ++ return rval; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_insert */ ++int *apc_cache_insert_mult(apc_cache_t* cache, apc_cache_key_t* keys, apc_cache_entry_t** values, apc_context_t *ctxt, time_t t, int num_entries TSRMLS_DC) ++{ ++ int *rval; ++ int i; ++ ++ rval = emalloc(sizeof(int) * num_entries); ++ CACHE_LOCK(cache); ++ for (i=0; i < num_entries; i++) { ++ if (values[i]) { ++ ctxt->pool = values[i]->pool; ++ rval[i] = _apc_cache_insert(cache, keys[i], values[i], ctxt, t TSRMLS_CC); ++ } ++ } ++ CACHE_UNLOCK(cache); ++ return rval; ++} ++/* }}} */ ++ ++ ++/* {{{ apc_cache_user_insert */ ++int apc_cache_user_insert(apc_cache_t* cache, apc_cache_key_t key, apc_cache_entry_t* value, apc_context_t* ctxt, time_t t, int exclusive TSRMLS_DC) ++{ ++ slot_t** slot; ++ unsigned int keylen = key.data.user.identifier_len; ++ unsigned int h = string_nhash_8(key.data.user.identifier, keylen); ++ apc_keyid_t *lastkey = &cache->header->lastkey; ++ ++ if (!value) { ++ return 0; ++ } ++ ++ if(apc_cache_busy(cache)) { ++ /* cache cleanup in progress, do not wait */ ++ return 0; ++ } ++ ++ if(apc_cache_is_last_key(cache, &key, h, t TSRMLS_CC)) { ++ /* potential cache slam */ ++ printf("Last key warning for it!"); ++ return 0; ++ } ++ ++ CACHE_LOCK(cache); ++ ++ memset(lastkey, 0, sizeof(apc_keyid_t)); ++ ++ lastkey->h = h; ++ lastkey->keylen = keylen; ++ lastkey->mtime = t; ++#ifdef ZTS ++ lastkey->tid = tsrm_thread_id(); ++#else ++ lastkey->pid = getpid(); ++#endif ++ ++ /* we do not reset lastkey after the insert. Whether it is inserted ++ * or not, another insert in the same second is always a bad idea. ++ */ ++ ++ process_pending_removals(cache TSRMLS_CC); ++ ++ slot = &cache->slots[h % cache->num_slots]; ++ ++ while (*slot) { ++ if (((*slot)->key.data.user.identifier_len == key.data.user.identifier_len) && ++ (!memcmp((*slot)->key.data.user.identifier, key.data.user.identifier, keylen))) { ++ /* ++ * At this point we have found the user cache entry. If we are doing ++ * an exclusive insert (apc_add) we are going to bail right away if ++ * the user entry already exists and it has no ttl, or ++ * there is a ttl and the entry has not timed out yet. ++ */ ++ if(exclusive && ( !(*slot)->value->data.user.ttl || ++ ( (*slot)->value->data.user.ttl && (time_t) ((*slot)->creation_time + (*slot)->value->data.user.ttl) >= t ) ++ ) ) { ++ goto fail; ++ } ++ remove_slot(cache, slot TSRMLS_CC); ++ break; ++ } else ++ /* ++ * This is a bit nasty. The idea here is to do runtime cleanup of the linked list of ++ * slot entries so we don't always have to skip past a bunch of stale entries. We check ++ * for staleness here and get rid of them by first checking to see if the cache has a global ++ * access ttl on it and removing entries that haven't been accessed for ttl seconds and secondly ++ * we see if the entry has a hard ttl on it and remove it if it has been around longer than its ttl ++ */ ++ if((cache->ttl && (*slot)->access_time < (t - cache->ttl)) || ++ ((*slot)->value->data.user.ttl && (time_t) ((*slot)->creation_time + (*slot)->value->data.user.ttl) < t)) { ++ remove_slot(cache, slot TSRMLS_CC); ++ continue; ++ } ++ slot = &(*slot)->next; ++ } ++ ++ if ((*slot = make_slot(key, value, *slot, t TSRMLS_CC)) == NULL) { ++ goto fail; ++ } ++ ++ value->mem_size = ctxt->pool->size; ++ cache->header->mem_size += ctxt->pool->size; ++ ++ cache->header->num_entries++; ++ cache->header->num_inserts++; ++ ++ CACHE_UNLOCK(cache); ++ ++ return 1; ++ ++fail: ++ CACHE_UNLOCK(cache); ++ ++ return 0; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_find_slot */ ++slot_t* apc_cache_find_slot(apc_cache_t* cache, apc_cache_key_t key, time_t t TSRMLS_DC) ++{ ++ slot_t** slot; ++ volatile slot_t* retval = NULL; ++ ++ CACHE_LOCK(cache); ++ if(key.type == APC_CACHE_KEY_FILE) slot = &cache->slots[hash(key) % cache->num_slots]; ++ else slot = &cache->slots[string_nhash_8(key.data.fpfile.fullpath, key.data.fpfile.fullpath_len) % cache->num_slots]; ++ ++ while (*slot) { ++ if(key.type == (*slot)->key.type) { ++ if(key.type == APC_CACHE_KEY_FILE) { ++ if(key_equals((*slot)->key.data.file, key.data.file)) { ++ if((*slot)->key.mtime != key.mtime) { ++ remove_slot(cache, slot TSRMLS_CC); ++ cache->header->num_misses++; ++ CACHE_UNLOCK(cache); ++ return NULL; ++ } ++ (*slot)->num_hits++; ++ (*slot)->value->ref_count++; ++ (*slot)->access_time = t; ++ prevent_garbage_collection((*slot)->value); ++ cache->header->num_hits++; ++ retval = *slot; ++ CACHE_UNLOCK(cache); ++ return (slot_t*)retval; ++ } ++ } else { /* APC_CACHE_KEY_FPFILE */ ++ if(!memcmp((*slot)->key.data.fpfile.fullpath, key.data.fpfile.fullpath, key.data.fpfile.fullpath_len+1)) { ++ /* TTL Check ? */ ++ (*slot)->num_hits++; ++ (*slot)->value->ref_count++; ++ (*slot)->access_time = t; ++ prevent_garbage_collection((*slot)->value); ++ cache->header->num_hits++; ++ retval = *slot; ++ CACHE_UNLOCK(cache); ++ return (slot_t*)retval; ++ } ++ } ++ } ++ slot = &(*slot)->next; ++ } ++ cache->header->num_misses++; ++ CACHE_UNLOCK(cache); ++ return NULL; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_find */ ++apc_cache_entry_t* apc_cache_find(apc_cache_t* cache, apc_cache_key_t key, time_t t TSRMLS_DC) ++{ ++ slot_t * slot = apc_cache_find_slot(cache, key, t TSRMLS_CC); ++ return (slot) ? slot->value : NULL; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_user_find */ ++apc_cache_entry_t* apc_cache_user_find(apc_cache_t* cache, char *strkey, int keylen, time_t t TSRMLS_DC) ++{ ++ slot_t** slot; ++ volatile apc_cache_entry_t* value = NULL; ++ ++ if(apc_cache_busy(cache)) ++ { ++ /* cache cleanup in progress */ ++ return NULL; ++ } ++ ++ CACHE_LOCK(cache); ++ ++ slot = &cache->slots[string_nhash_8(strkey, keylen) % cache->num_slots]; ++ ++ while (*slot) { ++ if (!memcmp((*slot)->key.data.user.identifier, strkey, keylen)) { ++ /* Check to make sure this entry isn't expired by a hard TTL */ ++ if((*slot)->value->data.user.ttl && (time_t) ((*slot)->creation_time + (*slot)->value->data.user.ttl) < t) { ++ remove_slot(cache, slot TSRMLS_CC); ++ cache->header->num_misses++; ++ CACHE_UNLOCK(cache); ++ return NULL; ++ } ++ /* Otherwise we are fine, increase counters and return the cache entry */ ++ (*slot)->num_hits++; ++ (*slot)->value->ref_count++; ++ (*slot)->access_time = t; ++ ++ cache->header->num_hits++; ++ value = (*slot)->value; ++ CACHE_UNLOCK(cache); ++ return (apc_cache_entry_t*)value; ++ } ++ slot = &(*slot)->next; ++ } ++ ++ cache->header->num_misses++; ++ CACHE_UNLOCK(cache); ++ return NULL; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_user_exists */ ++apc_cache_entry_t* apc_cache_user_exists(apc_cache_t* cache, char *strkey, int keylen, time_t t TSRMLS_DC) ++{ ++ slot_t** slot; ++ volatile apc_cache_entry_t* value = NULL; ++ ++ if(apc_cache_busy(cache)) ++ { ++ /* cache cleanup in progress */ ++ return NULL; ++ } ++ ++ CACHE_LOCK(cache); ++ ++ slot = &cache->slots[string_nhash_8(strkey, keylen) % cache->num_slots]; ++ ++ while (*slot) { ++ if (!memcmp((*slot)->key.data.user.identifier, strkey, keylen)) { ++ /* Check to make sure this entry isn't expired by a hard TTL */ ++ if((*slot)->value->data.user.ttl && (time_t) ((*slot)->creation_time + (*slot)->value->data.user.ttl) < t) { ++ CACHE_UNLOCK(cache); ++ return NULL; ++ } ++ /* Return the cache entry ptr */ ++ value = (*slot)->value; ++ CACHE_UNLOCK(cache); ++ return (apc_cache_entry_t*)value; ++ } ++ slot = &(*slot)->next; ++ } ++ CACHE_UNLOCK(cache); ++ return NULL; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_user_update */ ++int _apc_cache_user_update(apc_cache_t* cache, char *strkey, int keylen, apc_cache_updater_t updater, void* data TSRMLS_DC) ++{ ++ slot_t** slot; ++ int retval; ++ ++ if(apc_cache_busy(cache)) ++ { ++ /* cache cleanup in progress */ ++ return 0; ++ } ++ ++ CACHE_LOCK(cache); ++ ++ slot = &cache->slots[string_nhash_8(strkey, keylen) % cache->num_slots]; ++ ++ while (*slot) { ++ if (!memcmp((*slot)->key.data.user.identifier, strkey, keylen)) { ++ retval = updater(cache, (*slot)->value, data); ++ (*slot)->key.mtime = apc_time(); ++ CACHE_UNLOCK(cache); ++ return retval; ++ } ++ slot = &(*slot)->next; ++ } ++ CACHE_UNLOCK(cache); ++ return 0; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_user_delete */ ++int apc_cache_user_delete(apc_cache_t* cache, char *strkey, int keylen TSRMLS_DC) ++{ ++ slot_t** slot; ++ ++ CACHE_LOCK(cache); ++ ++ slot = &cache->slots[string_nhash_8(strkey, keylen) % cache->num_slots]; ++ ++ while (*slot) { ++ if (!memcmp((*slot)->key.data.user.identifier, strkey, keylen)) { ++ remove_slot(cache, slot TSRMLS_CC); ++ CACHE_UNLOCK(cache); ++ return 1; ++ } ++ slot = &(*slot)->next; ++ } ++ ++ CACHE_UNLOCK(cache); ++ return 0; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_delete */ ++int apc_cache_delete(apc_cache_t* cache, char *filename, int filename_len TSRMLS_DC) ++{ ++ slot_t** slot; ++ time_t t; ++ apc_cache_key_t key; ++ ++ t = apc_time(); ++ ++ /* try to create a cache key; if we fail, give up on caching */ ++ if (!apc_cache_make_file_key(&key, filename, PG(include_path), t TSRMLS_CC)) { ++ apc_warning("Could not stat file %s, unable to delete from cache." TSRMLS_CC, filename); ++ return -1; ++ } ++ ++ CACHE_LOCK(cache); ++ ++ if(key.type == APC_CACHE_KEY_FILE) slot = &cache->slots[hash(key) % cache->num_slots]; ++ else slot = &cache->slots[string_nhash_8(key.data.fpfile.fullpath, key.data.fpfile.fullpath_len) % cache->num_slots]; ++ ++ while(*slot) { ++ if(key.type == (*slot)->key.type) { ++ if(key.type == APC_CACHE_KEY_FILE) { ++ if(key_equals((*slot)->key.data.file, key.data.file)) { ++ remove_slot(cache, slot TSRMLS_CC); ++ CACHE_UNLOCK(cache); ++ return 1; ++ } ++ } else { /* APC_CACHE_KEY_FPFILE */ ++ if(((*slot)->key.data.fpfile.fullpath_len == key.data.fpfile.fullpath_len) && ++ (!memcmp((*slot)->key.data.fpfile.fullpath, key.data.fpfile.fullpath, key.data.fpfile.fullpath_len+1))) { ++ remove_slot(cache, slot TSRMLS_CC); ++ CACHE_UNLOCK(cache); ++ return 1; ++ } ++ } ++ } ++ slot = &(*slot)->next; ++ } ++ ++ memset(&cache->header->lastkey, 0, sizeof(apc_keyid_t)); ++ ++ CACHE_UNLOCK(cache); ++ return 0; ++ ++} ++/* }}} */ ++ ++/* {{{ apc_cache_release */ ++void apc_cache_release(apc_cache_t* cache, apc_cache_entry_t* entry TSRMLS_DC) ++{ ++ CACHE_LOCK(cache); ++ entry->ref_count--; ++ CACHE_UNLOCK(cache); ++} ++/* }}} */ ++ ++/* {{{ apc_cache_make_file_key */ ++int apc_cache_make_file_key(apc_cache_key_t* key, ++ const char* filename, ++ const char* include_path, ++ time_t t ++ TSRMLS_DC) ++{ ++ struct stat *tmp_buf=NULL; ++ struct apc_fileinfo_t *fileinfo = NULL; ++ int len; ++ ++ assert(key != NULL); ++ ++ if (!filename || !SG(request_info).path_translated) { ++ apc_debug("No filename and no path_translated - bailing\n" TSRMLS_CC); ++ goto cleanup; ++ } ++ ++ len = strlen(filename); ++ if(APCG(fpstat)==0) { ++ if(IS_ABSOLUTE_PATH(filename,len)) { ++ key->data.fpfile.fullpath = filename; ++ key->data.fpfile.fullpath_len = len; ++ key->mtime = t; ++ key->type = APC_CACHE_KEY_FPFILE; ++ goto success; ++ } else if(APCG(canonicalize)) { ++ ++ fileinfo = apc_php_malloc(sizeof(apc_fileinfo_t) TSRMLS_CC); ++ ++ if (apc_search_paths(filename, include_path, fileinfo TSRMLS_CC) != 0) { ++ apc_warning("apc failed to locate %s - bailing" TSRMLS_CC, filename); ++ goto cleanup; ++ } ++ ++ if(!VCWD_REALPATH(fileinfo->fullpath, APCG(canon_path))) { ++ apc_warning("realpath failed to canonicalize %s - bailing" TSRMLS_CC, filename); ++ goto cleanup; ++ } ++ ++ key->data.fpfile.fullpath = APCG(canon_path); ++ key->data.fpfile.fullpath_len = strlen(APCG(canon_path)); ++ key->mtime = t; ++ key->type = APC_CACHE_KEY_FPFILE; ++ goto success; ++ } ++ /* fall through to stat mode */ ++ } ++ ++ fileinfo = apc_php_malloc(sizeof(apc_fileinfo_t) TSRMLS_CC); ++ ++ assert(fileinfo != NULL); ++ ++ if(!strcmp(SG(request_info).path_translated, filename)) { ++ tmp_buf = sapi_get_stat(TSRMLS_C); /* Apache has already done this stat() for us */ ++ } ++ ++ if(tmp_buf) { ++ fileinfo->st_buf.sb = *tmp_buf; ++ } else { ++ if (apc_search_paths(filename, include_path, fileinfo TSRMLS_CC) != 0) { ++ apc_debug("Stat failed %s - bailing (%s) (%d)\n" TSRMLS_CC, filename,SG(request_info).path_translated); ++ goto cleanup; ++ } ++ } ++ ++ if(APCG(max_file_size) < fileinfo->st_buf.sb.st_size) { ++ apc_debug("File is too big %s (%d - %ld) - bailing\n" TSRMLS_CC, filename,t,fileinfo->st_buf.sb.st_size); ++ goto cleanup; ++ } ++ ++ /* ++ * This is a bit of a hack. ++ * ++ * Here I am checking to see if the file is at least 2 seconds old. ++ * The idea is that if the file is currently being written to then its ++ * mtime is going to match or at most be 1 second off of the current ++ * request time and we want to avoid caching files that have not been ++ * completely written. Of course, people should be using atomic ++ * mechanisms to push files onto live web servers, but adding this ++ * tiny safety is easier than educating the world. This is now ++ * configurable, but the default is still 2 seconds. ++ */ ++ if(APCG(file_update_protection) && (t - fileinfo->st_buf.sb.st_mtime < APCG(file_update_protection)) && !APCG(force_file_update)) { ++ apc_debug("File is too new %s (%d - %d) - bailing\n" TSRMLS_CC,filename,t,fileinfo->st_buf.sb.st_mtime); ++ goto cleanup; ++ } ++ ++ key->data.file.device = fileinfo->st_buf.sb.st_dev; ++ key->data.file.inode = fileinfo->st_buf.sb.st_ino; ++ ++ /* ++ * If working with content management systems that like to munge the mtime, ++ * it might be appropriate to key off of the ctime to be immune to systems ++ * that try to backdate a template. If the mtime is set to something older ++ * than the previous mtime of a template we will obviously never see this ++ * "older" template. At some point the Smarty templating system did this. ++ * I generally disagree with using the ctime here because you lose the ++ * ability to warm up new content by saving it to a temporary file, hitting ++ * it once to cache it and then renaming it into its permanent location so ++ * set the apc.stat_ctime=true to enable this check. ++ */ ++ if(APCG(stat_ctime)) { ++ key->mtime = (fileinfo->st_buf.sb.st_ctime > fileinfo->st_buf.sb.st_mtime) ? fileinfo->st_buf.sb.st_ctime : fileinfo->st_buf.sb.st_mtime; ++ } else { ++ key->mtime = fileinfo->st_buf.sb.st_mtime; ++ } ++ key->type = APC_CACHE_KEY_FILE; ++ ++success: ++ ++ if(fileinfo != NULL) { ++ apc_php_free(fileinfo TSRMLS_CC); ++ } ++ ++ return 1; ++ ++cleanup: ++ ++ if(fileinfo != NULL) { ++ apc_php_free(fileinfo TSRMLS_CC); ++ } ++ ++ return 0; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_make_user_key */ ++int apc_cache_make_user_key(apc_cache_key_t* key, char* identifier, int identifier_len, const time_t t) ++{ ++ assert(key != NULL); ++ ++ if (!identifier) ++ return 0; ++ ++ key->data.user.identifier = identifier; ++ key->data.user.identifier_len = identifier_len; ++ key->mtime = t; ++ key->type = APC_CACHE_KEY_USER; ++ return 1; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_make_file_entry */ ++apc_cache_entry_t* apc_cache_make_file_entry(const char* filename, ++ zend_op_array* op_array, ++ apc_function_t* functions, ++ apc_class_t* classes, ++ apc_context_t* ctxt ++ TSRMLS_DC) ++{ ++ apc_cache_entry_t* entry; ++ apc_pool* pool = ctxt->pool; ++ ++ entry = (apc_cache_entry_t*) apc_pool_alloc(pool, sizeof(apc_cache_entry_t)); ++ if (!entry) return NULL; ++ ++ entry->data.file.filename = apc_pstrdup(filename, pool TSRMLS_CC); ++ if(!entry->data.file.filename) { ++ apc_debug("apc_cache_make_file_entry: entry->data.file.filename is NULL - bailing\n" TSRMLS_CC); ++ return NULL; ++ } ++ apc_debug("apc_cache_make_file_entry: entry->data.file.filename is [%s]\n" TSRMLS_CC,entry->data.file.filename); ++ entry->data.file.op_array = op_array; ++ entry->data.file.functions = functions; ++ entry->data.file.classes = classes; ++ ++ entry->data.file.halt_offset = apc_file_halt_offset(filename TSRMLS_CC); ++ ++ entry->type = APC_CACHE_ENTRY_FILE; ++ entry->ref_count = 0; ++ entry->mem_size = 0; ++ entry->pool = pool; ++ return entry; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_store_zval */ ++zval* apc_cache_store_zval(zval* dst, const zval* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ if (Z_TYPE_P(src) == IS_ARRAY) { ++ /* Maintain a list of zvals we've copied to properly handle recursive structures */ ++ zend_hash_init(&APCG(copied_zvals), 0, NULL, NULL, 0); ++ dst = apc_copy_zval(dst, src, ctxt TSRMLS_CC); ++ zend_hash_destroy(&APCG(copied_zvals)); ++ APCG(copied_zvals).nTableSize=0; ++ } else { ++ dst = apc_copy_zval(dst, src, ctxt TSRMLS_CC); ++ } ++ ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_fetch_zval */ ++zval* apc_cache_fetch_zval(zval* dst, const zval* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ if (Z_TYPE_P(src) == IS_ARRAY) { ++ /* Maintain a list of zvals we've copied to properly handle recursive structures */ ++ zend_hash_init(&APCG(copied_zvals), 0, NULL, NULL, 0); ++ dst = apc_copy_zval(dst, src, ctxt TSRMLS_CC); ++ zend_hash_destroy(&APCG(copied_zvals)); ++ APCG(copied_zvals).nTableSize=0; ++ } else { ++ dst = apc_copy_zval(dst, src, ctxt TSRMLS_CC); ++ } ++ ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_make_user_entry */ ++apc_cache_entry_t* apc_cache_make_user_entry(const char* info, int info_len, const zval* val, apc_context_t* ctxt, const unsigned int ttl TSRMLS_DC) ++{ ++ apc_cache_entry_t* entry; ++ apc_pool* pool = ctxt->pool; ++ ++ entry = (apc_cache_entry_t*) apc_pool_alloc(pool, sizeof(apc_cache_entry_t)); ++ if (!entry) return NULL; ++ ++ entry->data.user.info = apc_pmemcpy(info, info_len, pool TSRMLS_CC); ++ entry->data.user.info_len = info_len; ++ if(!entry->data.user.info) { ++ return NULL; ++ } ++ entry->data.user.val = apc_cache_store_zval(NULL, val, ctxt TSRMLS_CC); ++ if(!entry->data.user.val) { ++ return NULL; ++ } ++ INIT_PZVAL(entry->data.user.val); ++ entry->data.user.ttl = ttl; ++ entry->type = APC_CACHE_ENTRY_USER; ++ entry->ref_count = 0; ++ entry->mem_size = 0; ++ entry->pool = pool; ++ return entry; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_info */ ++apc_cache_info_t* apc_cache_info(apc_cache_t* cache, zend_bool limited TSRMLS_DC) ++{ ++ apc_cache_info_t* info; ++ slot_t* p; ++ int i; ++ ++ if(!cache) return NULL; ++ ++ CACHE_LOCK(cache); ++ ++ info = (apc_cache_info_t*) apc_php_malloc(sizeof(apc_cache_info_t) TSRMLS_CC); ++ if(!info) { ++ CACHE_UNLOCK(cache); ++ return NULL; ++ } ++ info->num_slots = cache->num_slots; ++ info->ttl = cache->ttl; ++ info->num_hits = cache->header->num_hits; ++ info->num_misses = cache->header->num_misses; ++ info->list = NULL; ++ info->deleted_list = NULL; ++ info->start_time = cache->header->start_time; ++ info->expunges = cache->header->expunges; ++ info->mem_size = cache->header->mem_size; ++ info->num_entries = cache->header->num_entries; ++ info->num_inserts = cache->header->num_inserts; ++ ++ if(!limited) { ++ /* For each hashtable slot */ ++ for (i = 0; i < info->num_slots; i++) { ++ p = cache->slots[i]; ++ for (; p != NULL; p = p->next) { ++ apc_cache_link_t* link = (apc_cache_link_t*) apc_php_malloc(sizeof(apc_cache_link_t) TSRMLS_CC); ++ ++ if(p->value->type == APC_CACHE_ENTRY_FILE) { ++ if(p->key.type == APC_CACHE_KEY_FILE) { ++ link->data.file.device = p->key.data.file.device; ++ link->data.file.inode = p->key.data.file.inode; ++ link->data.file.filename = apc_xstrdup(p->value->data.file.filename, apc_php_malloc TSRMLS_CC); ++ } else { /* This is a no-stat fullpath file entry */ ++ link->data.file.device = 0; ++ link->data.file.inode = 0; ++ link->data.file.filename = apc_xstrdup(p->key.data.fpfile.fullpath, apc_php_malloc TSRMLS_CC); ++ } ++ link->type = APC_CACHE_ENTRY_FILE; ++ if (APCG(file_md5)) { ++ link->data.file.md5 = emalloc(sizeof(p->key.md5)); ++ memcpy(link->data.file.md5, p->key.md5, 16); ++ } else { ++ link->data.file.md5 = NULL; ++ } ++ } else if(p->value->type == APC_CACHE_ENTRY_USER) { ++ link->data.user.info = apc_xmemcpy(p->value->data.user.info, p->value->data.user.info_len+1, apc_php_malloc TSRMLS_CC); ++ link->data.user.ttl = p->value->data.user.ttl; ++ link->type = APC_CACHE_ENTRY_USER; ++ } ++ link->num_hits = p->num_hits; ++ link->mtime = p->key.mtime; ++ link->creation_time = p->creation_time; ++ link->deletion_time = p->deletion_time; ++ link->access_time = p->access_time; ++ link->ref_count = p->value->ref_count; ++ link->mem_size = p->value->mem_size; ++ link->next = info->list; ++ info->list = link; ++ } ++ } ++ ++ /* For each slot pending deletion */ ++ for (p = cache->header->deleted_list; p != NULL; p = p->next) { ++ apc_cache_link_t* link = (apc_cache_link_t*) apc_php_malloc(sizeof(apc_cache_link_t) TSRMLS_CC); ++ ++ if(p->value->type == APC_CACHE_ENTRY_FILE) { ++ if(p->key.type == APC_CACHE_KEY_FILE) { ++ link->data.file.device = p->key.data.file.device; ++ link->data.file.inode = p->key.data.file.inode; ++ link->data.file.filename = apc_xstrdup(p->value->data.file.filename, apc_php_malloc TSRMLS_CC); ++ } else { /* This is a no-stat fullpath file entry */ ++ link->data.file.device = 0; ++ link->data.file.inode = 0; ++ link->data.file.filename = apc_xstrdup(p->key.data.fpfile.fullpath, apc_php_malloc TSRMLS_CC); ++ } ++ link->type = APC_CACHE_ENTRY_FILE; ++ if (APCG(file_md5)) { ++ link->data.file.md5 = emalloc(sizeof(p->key.md5)); ++ memcpy(link->data.file.md5, p->key.md5, 16); ++ } else { ++ link->data.file.md5 = NULL; ++ } ++ } else if(p->value->type == APC_CACHE_ENTRY_USER) { ++ link->data.user.info = apc_xmemcpy(p->value->data.user.info, p->value->data.user.info_len+1, apc_php_malloc TSRMLS_CC); ++ link->data.user.ttl = p->value->data.user.ttl; ++ link->type = APC_CACHE_ENTRY_USER; ++ } ++ link->num_hits = p->num_hits; ++ link->mtime = p->key.mtime; ++ link->creation_time = p->creation_time; ++ link->deletion_time = p->deletion_time; ++ link->access_time = p->access_time; ++ link->ref_count = p->value->ref_count; ++ link->mem_size = p->value->mem_size; ++ link->next = info->deleted_list; ++ info->deleted_list = link; ++ } ++ } ++ ++ CACHE_UNLOCK(cache); ++ return info; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_free_info */ ++void apc_cache_free_info(apc_cache_info_t* info TSRMLS_DC) ++{ ++ apc_cache_link_t* p = info->list; ++ apc_cache_link_t* q = NULL; ++ while (p != NULL) { ++ q = p; ++ p = p->next; ++ if(q->type == APC_CACHE_ENTRY_FILE) { ++ if(q->data.file.md5) { ++ efree(q->data.file.md5); ++ } ++ apc_php_free(q->data.file.filename TSRMLS_CC); ++ } ++ else if(q->type == APC_CACHE_ENTRY_USER) apc_php_free(q->data.user.info TSRMLS_CC); ++ apc_php_free(q TSRMLS_CC); ++ } ++ p = info->deleted_list; ++ while (p != NULL) { ++ q = p; ++ p = p->next; ++ if(q->type == APC_CACHE_ENTRY_FILE) { ++ if(q->data.file.md5) { ++ efree(q->data.file.md5); ++ } ++ apc_php_free(q->data.file.filename TSRMLS_CC); ++ } ++ else if(q->type == APC_CACHE_ENTRY_USER) apc_php_free(q->data.user.info TSRMLS_CC); ++ apc_php_free(q TSRMLS_CC); ++ } ++ apc_php_free(info TSRMLS_CC); ++} ++/* }}} */ ++ ++/* {{{ apc_cache_unlock */ ++void apc_cache_unlock(apc_cache_t* cache TSRMLS_DC) ++{ ++ CACHE_UNLOCK(cache); ++} ++/* }}} */ ++ ++/* {{{ apc_cache_busy */ ++zend_bool apc_cache_busy(apc_cache_t* cache) ++{ ++ return cache->header->busy; ++} ++/* }}} */ ++ ++/* {{{ apc_cache_is_last_key */ ++zend_bool apc_cache_is_last_key(apc_cache_t* cache, apc_cache_key_t* key, unsigned int h, time_t t TSRMLS_DC) ++{ ++ apc_keyid_t *lastkey = &cache->header->lastkey; ++ unsigned int keylen = key->data.user.identifier_len; ++#ifdef ZTS ++ THREAD_T tid = tsrm_thread_id(); ++ #define FROM_DIFFERENT_THREAD(k) (memcmp(&((k)->tid), &tid, sizeof(THREAD_T))!=0) ++#else ++ pid_t pid = getpid(); ++ #define FROM_DIFFERENT_THREAD(k) (pid != (k)->pid) ++#endif ++ ++ ++ if(!h) h = string_nhash_8(key->data.user.identifier, keylen); ++ ++ /* unlocked reads, but we're not shooting for 100% success with this */ ++ if(lastkey->h == h && keylen == lastkey->keylen) { ++ if(lastkey->mtime == t && FROM_DIFFERENT_THREAD(lastkey)) { ++ /* potential cache slam */ ++ if(APCG(slam_defense)) { ++ apc_warning("Potential cache slam averted for key '%s'" TSRMLS_CC, key->data.user.identifier); ++ return 1; ++ } ++ } ++ } ++ ++ return 0; ++} ++/* }}} */ ++ ++#if NONBLOCKING_LOCK_AVAILABLE ++/* {{{ apc_cache_write_lock */ ++zend_bool apc_cache_write_lock(apc_cache_t* cache TSRMLS_DC) ++{ ++ return apc_lck_nb_lock(cache->header->wrlock); ++} ++/* }}} */ ++ ++/* {{{ apc_cache_write_unlock */ ++void apc_cache_write_unlock(apc_cache_t* cache TSRMLS_DC) ++{ ++ apc_lck_unlock(cache->header->wrlock); ++} ++/* }}} */ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_cache.h +@@ -0,0 +1,403 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt. | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | Rasmus Lerdorf | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_cache.h 305258 2010-11-10 19:02:06Z gopalv $ */ ++ ++#ifndef APC_CACHE_H ++#define APC_CACHE_H ++ ++/* ++ * This module defines the shared memory file cache. Basically all of the ++ * logic for storing and retrieving cache entries lives here. ++ */ ++ ++#include "apc.h" ++#include "apc_compile.h" ++#include "apc_lock.h" ++#include "apc_pool.h" ++#include "apc_main.h" ++#include "TSRM.h" ++ ++#define APC_CACHE_ENTRY_FILE 1 ++#define APC_CACHE_ENTRY_USER 2 ++ ++#define APC_CACHE_KEY_FILE 1 ++#define APC_CACHE_KEY_USER 2 ++#define APC_CACHE_KEY_FPFILE 3 ++ ++#ifdef PHP_WIN32 ++typedef unsigned __int64 apc_ino_t; ++typedef unsigned __int64 apc_dev_t; ++#else ++typedef ino_t apc_ino_t; ++typedef dev_t apc_dev_t; ++#endif ++ ++/* {{{ cache locking macros */ ++#define CACHE_LOCK(cache) { LOCK(cache->header->lock); cache->has_lock = 1; } ++#define CACHE_UNLOCK(cache) { UNLOCK(cache->header->lock); cache->has_lock = 0; } ++#define CACHE_SAFE_LOCK(cache) { if ((++cache->has_lock) == 1) LOCK(cache->header->lock); } ++#define CACHE_SAFE_UNLOCK(cache) { if ((--cache->has_lock) == 0) UNLOCK(cache->header->lock); } ++/* }}} */ ++ ++/* {{{ struct definition: apc_cache_key_t */ ++#define T apc_cache_t* ++typedef struct apc_cache_t apc_cache_t; /* opaque cache type */ ++ ++typedef union _apc_cache_key_data_t { ++ struct { ++ apc_dev_t device; /* the filesystem device */ ++ apc_ino_t inode; /* the filesystem inode */ ++ } file; ++ struct { ++ const char *identifier; ++ int identifier_len; ++ } user; ++ struct { ++ const char *fullpath; ++ int fullpath_len; ++ } fpfile; ++} apc_cache_key_data_t; ++ ++typedef struct apc_cache_key_t apc_cache_key_t; ++struct apc_cache_key_t { ++ apc_cache_key_data_t data; ++ time_t mtime; /* the mtime of this cached entry */ ++ unsigned char type; ++ unsigned char md5[16]; /* md5 hash of the source file */ ++}; ++ ++ ++typedef struct apc_keyid_t apc_keyid_t; ++ ++struct apc_keyid_t { ++ unsigned int h; ++ unsigned int keylen; ++ time_t mtime; ++#ifdef ZTS ++ THREAD_T tid; ++#else ++ pid_t pid; ++#endif ++}; ++/* }}} */ ++ ++/* {{{ struct definition: apc_cache_entry_t */ ++typedef union _apc_cache_entry_value_t { ++ struct { ++ char *filename; /* absolute path to source file */ ++ zend_op_array* op_array; /* op_array allocated in shared memory */ ++ apc_function_t* functions; /* array of apc_function_t's */ ++ apc_class_t* classes; /* array of apc_class_t's */ ++ long halt_offset; /* value of __COMPILER_HALT_OFFSET__ for the file */ ++ } file; ++ struct { ++ char *info; ++ int info_len; ++ zval *val; ++ unsigned int ttl; ++ } user; ++} apc_cache_entry_value_t; ++ ++typedef struct apc_cache_entry_t apc_cache_entry_t; ++struct apc_cache_entry_t { ++ apc_cache_entry_value_t data; ++ unsigned char type; ++ int ref_count; ++ size_t mem_size; ++ apc_pool *pool; ++}; ++/* }}} */ ++ ++/* ++ * apc_cache_create creates the shared memory compiler cache. This function ++ * should be called just once (ideally in the web server parent process, e.g. ++ * in apache), otherwise you will end up with multiple caches (which won't ++ * necessarily break anything). Returns a pointer to the cache object. ++ * ++ * size_hint is a "hint" at the total number of source files that will be ++ * cached. It determines the physical size of the hash table. Passing 0 for ++ * this argument will use a reasonable default value. ++ * ++ * gc_ttl is the maximum time a cache entry may speed on the garbage ++ * collection list. This is basically a work around for the inherent ++ * unreliability of our reference counting mechanism (see apc_cache_release). ++ * ++ * ttl is the maximum time a cache entry can idle in a slot in case the slot ++ * is needed. This helps in cleaning up the cache and ensuring that entries ++ * hit frequently stay cached and ones not hit very often eventually disappear. ++ */ ++extern T apc_cache_create(int size_hint, int gc_ttl, int ttl TSRMLS_DC); ++ ++/* ++ * apc_cache_destroy releases any OS resources associated with a cache object. ++ * Under apache, this function can be safely called by the child processes ++ * when they exit. ++ */ ++extern void apc_cache_destroy(T cache TSRMLS_DC); ++ ++/* ++ * apc_cache_clear empties a cache. This can safely be called at any time, ++ * even while other server processes are executing cached source files. ++ */ ++extern void apc_cache_clear(T cache TSRMLS_DC); ++ ++/* ++ * apc_cache_insert adds an entry to the cache, using a filename as a key. ++ * Internally, the filename is translated to a canonical representation, so ++ * that relative and absolute filenames will map to a single key. Returns ++ * non-zero if the file was successfully inserted, 0 otherwise. If 0 is ++ * returned, the caller must free the cache entry by calling ++ * apc_cache_free_entry (see below). ++ * ++ * key is the value created by apc_cache_make_file_key for file keys. ++ * ++ * value is a cache entry returned by apc_cache_make_entry (see below). ++ */ ++extern int apc_cache_insert(T cache, apc_cache_key_t key, ++ apc_cache_entry_t* value, apc_context_t* ctxt, time_t t TSRMLS_DC); ++ ++extern int apc_cache_user_insert(T cache, apc_cache_key_t key, ++ apc_cache_entry_t* value, apc_context_t* ctxt, time_t t, int exclusive TSRMLS_DC); ++ ++extern int *apc_cache_insert_mult(apc_cache_t* cache, apc_cache_key_t* keys, ++ apc_cache_entry_t** values, apc_context_t *ctxt, time_t t, int num_entries TSRMLS_DC); ++ ++/* ++ * apc_cache_find searches for a cache entry by filename, and returns a ++ * pointer to the entry if found, NULL otherwise. ++ * ++ * key is a value created by apc_cache_make_file_key for file keys. ++ */ ++extern apc_cache_entry_t* apc_cache_find(T cache, apc_cache_key_t key, time_t t TSRMLS_DC); ++ ++/* ++ * apc_cache_user_find searches for a cache entry by its hashed identifier, ++ * and returns a pointer to the entry if found, NULL otherwise. ++ * ++ */ ++extern apc_cache_entry_t* apc_cache_user_find(T cache, char* strkey, int keylen, time_t t TSRMLS_DC); ++ ++/* ++ * apc_cache_user_exists searches for a cache entry by its hashed identifier, ++ * and returns a pointer to the entry if found, NULL otherwise. This is a ++ * quick non-locking version of apc_cache_user_find that does not modify the ++ * shared memory segment in any way. ++ * ++ */ ++extern apc_cache_entry_t* apc_cache_user_exists(T cache, char* strkey, int keylen, time_t t TSRMLS_DC); ++ ++/* ++ * apc_cache_delete and apc_cache_user_delete finds an entry in the cache and deletes it. ++ */ ++extern int apc_cache_delete(apc_cache_t* cache, char *filename, int filename_len TSRMLS_DC); ++extern int apc_cache_user_delete(apc_cache_t* cache, char *strkey, int keylen TSRMLS_DC); ++ ++/* apc_cach_fetch_zval takes a zval in the cache and reconstructs a runtime ++ * zval from it. ++ * ++ */ ++zval* apc_cache_fetch_zval(zval* dst, const zval* src, apc_context_t* ctxt TSRMLS_DC); ++ ++/* ++ * apc_cache_release decrements the reference count associated with a cache ++ * entry. Calling apc_cache_find automatically increments the reference count, ++ * and this function must be called post-execution to return the count to its ++ * original value. Failing to do so will prevent the entry from being ++ * garbage-collected. ++ * ++ * entry is the cache entry whose ref count you want to decrement. ++ */ ++extern void apc_cache_release(T cache, apc_cache_entry_t* entry TSRMLS_DC); ++ ++/* ++ * apc_cache_make_file_key creates a key object given a relative or absolute ++ * filename and an optional list of auxillary paths to search. include_path is ++ * searched if the filename cannot be found relative to the current working ++ * directory. ++ * ++ * key points to caller-allocated storage (must not be null). ++ * ++ * filename is the path to the source file. ++ * ++ * include_path is a colon-separated list of directories to search. ++ * ++ * and finally we pass in the current request time so we can avoid ++ * caching files with a current mtime which tends to indicate that ++ * they are still being written to. ++ */ ++extern int apc_cache_make_file_key(apc_cache_key_t* key, ++ const char* filename, ++ const char* include_path, ++ time_t t ++ TSRMLS_DC); ++ ++/* ++ * apc_cache_make_file_entry creates an apc_cache_entry_t object given a filename ++ * and the compilation results returned by the PHP compiler. ++ */ ++extern apc_cache_entry_t* apc_cache_make_file_entry(const char* filename, ++ zend_op_array* op_array, ++ apc_function_t* functions, ++ apc_class_t* classes, ++ apc_context_t* ctxt ++ TSRMLS_DC); ++ ++ ++zend_bool apc_compile_cache_entry(apc_cache_key_t key, zend_file_handle* h, int type, time_t t, zend_op_array** op_array_pp, apc_cache_entry_t** cache_entry_pp TSRMLS_DC); ++ ++/* ++ * apc_cache_make_user_entry creates an apc_cache_entry_t object given an info string ++ * and the zval to be stored. ++ */ ++extern apc_cache_entry_t* apc_cache_make_user_entry(const char* info, int info_len, const zval *val, apc_context_t* ctxt, const unsigned int ttl TSRMLS_DC); ++ ++extern int apc_cache_make_user_key(apc_cache_key_t* key, char* identifier, int identifier_len, const time_t t); ++ ++/* {{{ struct definition: apc_cache_link_data_t */ ++typedef union _apc_cache_link_data_t { ++ struct { ++ char *filename; ++ apc_ino_t device; ++ apc_dev_t inode; ++ unsigned char *md5; ++ } file; ++ struct { ++ char *info; ++ unsigned int ttl; ++ } user; ++} apc_cache_link_data_t; ++/* }}} */ ++ ++/* {{{ struct definition: apc_cache_link_t */ ++typedef struct apc_cache_link_t apc_cache_link_t; ++struct apc_cache_link_t { ++ apc_cache_link_data_t data; ++ unsigned char type; ++ unsigned long num_hits; ++ time_t mtime; ++ time_t creation_time; ++ time_t deletion_time; ++ time_t access_time; ++ int ref_count; ++ size_t mem_size; ++ apc_cache_link_t* next; ++}; ++/* }}} */ ++ ++ ++/* {{{ struct definition: apc_cache_info_t */ ++typedef struct apc_cache_info_t apc_cache_info_t; ++struct apc_cache_info_t { ++ int num_slots; ++ unsigned long num_hits; ++ unsigned long num_misses; ++ unsigned long num_inserts; ++ unsigned long expunges; ++ int ttl; ++ apc_cache_link_t* list; ++ apc_cache_link_t* deleted_list; ++ time_t start_time; ++ int num_entries; ++ size_t mem_size; ++}; ++/* }}} */ ++ ++/* {{{ struct definition: slot_t */ ++typedef struct slot_t slot_t; ++struct slot_t { ++ apc_cache_key_t key; /* slot key */ ++ apc_cache_entry_t* value; /* slot value */ ++ slot_t* next; /* next slot in linked list */ ++ unsigned long num_hits; /* number of hits to this bucket */ ++ time_t creation_time; /* time slot was initialized */ ++ time_t deletion_time; /* time slot was removed from cache */ ++ time_t access_time; /* time slot was last accessed */ ++}; ++/* }}} */ ++ ++/* {{{ struct definition: cache_header_t ++ Any values that must be shared among processes should go in here. */ ++typedef struct cache_header_t cache_header_t; ++struct cache_header_t { ++ apc_lck_t lock; /* read/write lock (exclusive blocking cache lock) */ ++ apc_lck_t wrlock; /* write lock (non-blocking used to prevent cache slams) */ ++ unsigned long num_hits; /* total successful hits in cache */ ++ unsigned long num_misses; /* total unsuccessful hits in cache */ ++ unsigned long num_inserts; /* total successful inserts in cache */ ++ unsigned long expunges; /* total number of expunges */ ++ slot_t* deleted_list; /* linked list of to-be-deleted slots */ ++ time_t start_time; /* time the above counters were reset */ ++ zend_bool busy; /* Flag to tell clients when we are busy cleaning the cache */ ++ int num_entries; /* Statistic on the number of entries */ ++ size_t mem_size; /* Statistic on the memory size used by this cache */ ++ apc_keyid_t lastkey; /* the key that is being inserted (user cache) */ ++}; ++/* }}} */ ++ ++typedef void (*apc_expunge_cb_t)(T cache, size_t n TSRMLS_DC); ++ ++/* {{{ struct definition: apc_cache_t */ ++struct apc_cache_t { ++ void* shmaddr; /* process (local) address of shared cache */ ++ cache_header_t* header; /* cache header (stored in SHM) */ ++ slot_t** slots; /* array of cache slots (stored in SHM) */ ++ int num_slots; /* number of slots in cache */ ++ int gc_ttl; /* maximum time on GC list for a slot */ ++ int ttl; /* if slot is needed and entry's access time is older than this ttl, remove it */ ++ apc_expunge_cb_t expunge_cb; /* cache specific expunge callback to free up sma memory */ ++ uint has_lock; /* flag for possible recursive locks within the same process */ ++}; ++/* }}} */ ++ ++extern apc_cache_info_t* apc_cache_info(T cache, zend_bool limited TSRMLS_DC); ++extern void apc_cache_free_info(apc_cache_info_t* info TSRMLS_DC); ++extern void apc_cache_unlock(apc_cache_t* cache TSRMLS_DC); ++extern zend_bool apc_cache_busy(apc_cache_t* cache); ++extern zend_bool apc_cache_write_lock(apc_cache_t* cache TSRMLS_DC); ++extern void apc_cache_write_unlock(apc_cache_t* cache TSRMLS_DC); ++extern zend_bool apc_cache_is_last_key(apc_cache_t* cache, apc_cache_key_t* key, unsigned int h, time_t t TSRMLS_DC); ++ ++/* used by apc_rfc1867 to update data in-place - not to be used elsewhere */ ++ ++typedef int (*apc_cache_updater_t)(apc_cache_t*, apc_cache_entry_t*, void* data); ++extern int _apc_cache_user_update(apc_cache_t* cache, char *strkey, int keylen, ++ apc_cache_updater_t updater, void* data TSRMLS_DC); ++ ++ ++#undef T ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_compile.c +@@ -0,0 +1,2102 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt. | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | Rasmus Lerdorf | ++ | Arun C. Murthy | ++ | Gopal Vijayaraghavan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_compile.c 303796 2010-09-27 17:14:18Z gopalv $ */ ++ ++#include "apc_compile.h" ++#include "apc_globals.h" ++#include "apc_zend.h" ++#include "apc_string.h" ++#include "ext/standard/php_var.h" ++#include "ext/standard/php_smart_str.h" ++ ++#ifndef IS_CONSTANT_TYPE_MASK ++#define IS_CONSTANT_TYPE_MASK (~IS_CONSTANT_INDEX) ++#endif ++ ++typedef void* (*ht_copy_fun_t)(void*, void*, apc_context_t* TSRMLS_DC); ++//typedef void (*ht_free_fun_t)(void*, apc_context_t*); ++typedef int (*ht_check_copy_fun_t)(Bucket*, va_list); ++ ++typedef void (*ht_fixup_fun_t)(Bucket*, zend_class_entry*, zend_class_entry*); ++ ++#define CHECK(p) { if ((p) == NULL) return NULL; } ++ ++/* {{{ internal function declarations */ ++ ++static zend_function* my_bitwise_copy_function(zend_function*, zend_function*, apc_context_t* TSRMLS_DC); ++ ++/* ++ * The "copy" functions perform deep-copies on a particular data structure ++ * (passed as the second argument). They also optionally allocate space for ++ * the destination data structure if the first argument is null. ++ */ ++static zval** my_copy_zval_ptr(zval**, const zval**, apc_context_t* TSRMLS_DC); ++static zval* my_copy_zval(zval*, const zval*, apc_context_t* TSRMLS_DC); ++static znode* my_copy_znode(znode*, znode*, apc_context_t* TSRMLS_DC); ++static zend_op* my_copy_zend_op(zend_op*, zend_op*, apc_context_t* TSRMLS_DC); ++static zend_function* my_copy_function(zend_function*, zend_function*, apc_context_t* TSRMLS_DC); ++static zend_function_entry* my_copy_function_entry(zend_function_entry*, const zend_function_entry*, apc_context_t* TSRMLS_DC); ++static zend_class_entry* my_copy_class_entry(zend_class_entry*, zend_class_entry*, apc_context_t* TSRMLS_DC); ++static HashTable* my_copy_hashtable_ex(HashTable*, HashTable* TSRMLS_DC, ht_copy_fun_t, int, apc_context_t*, ht_check_copy_fun_t, ...); ++#define my_copy_hashtable( dst, src, copy_fn, holds_ptr, ctxt) \ ++ my_copy_hashtable_ex(dst, src TSRMLS_CC, copy_fn, holds_ptr, ctxt, NULL) ++static HashTable* my_copy_static_variables(zend_op_array* src, apc_context_t* TSRMLS_DC); ++static zend_property_info* my_copy_property_info(zend_property_info* dst, zend_property_info* src, apc_context_t* TSRMLS_DC); ++static zend_arg_info* my_copy_arg_info_array(zend_arg_info*, const zend_arg_info*, uint, apc_context_t* TSRMLS_DC); ++static zend_arg_info* my_copy_arg_info(zend_arg_info*, const zend_arg_info*, apc_context_t* TSRMLS_DC); ++ ++/* ++ * The "fixup" functions need for ZEND_ENGINE_2 ++ */ ++static void my_fixup_function( Bucket *p, zend_class_entry *src, zend_class_entry *dst ); ++static void my_fixup_hashtable( HashTable *ht, ht_fixup_fun_t fixup, zend_class_entry *src, zend_class_entry *dst ); ++/* my_fixup_function_for_execution is the same as my_fixup_function ++ * but named differently for clarity ++ */ ++#define my_fixup_function_for_execution my_fixup_function ++ ++#ifdef ZEND_ENGINE_2_2 ++static void my_fixup_property_info( Bucket *p, zend_class_entry *src, zend_class_entry *dst ); ++#define my_fixup_property_info_for_execution my_fixup_property_info ++#endif ++ ++/* ++ * These functions return "1" if the member/function is ++ * defined/overridden in the 'current' class and not inherited. ++ */ ++static int my_check_copy_function(Bucket* src, va_list args); ++static int my_check_copy_default_property(Bucket* p, va_list args); ++static int my_check_copy_property_info(Bucket* src, va_list args); ++static int my_check_copy_static_member(Bucket* src, va_list args); ++static int my_check_copy_constant(Bucket* src, va_list args); ++ ++/* }}} */ ++ ++/* {{{ check_op_array_integrity */ ++#if 0 ++static void check_op_array_integrity(zend_op_array* src) ++{ ++ int i, j; ++ ++ /* These sorts of checks really aren't particularly effective, but they ++ * can provide a welcome sanity check when debugging. Just don't enable ++ * for production use! */ ++ ++ assert(src->refcount != NULL); ++ assert(src->opcodes != NULL); ++ assert(src->last > 0); ++ ++ for (i = 0; i < src->last; i++) { ++ zend_op* op = &src->opcodes[i]; ++ znode* nodes[] = { &op->result, &op->op1, &op->op2 }; ++ for (j = 0; j < 3; j++) { ++ assert(nodes[j]->op_type == IS_CONST || ++ nodes[j]->op_type == IS_VAR || ++ nodes[j]->op_type == IS_TMP_VAR || ++ nodes[j]->op_type == IS_UNUSED); ++ ++ if (nodes[j]->op_type == IS_CONST) { ++ int type = nodes[j]->u.constant.type; ++ assert(type == IS_RESOURCE || ++ type == IS_BOOL || ++ type == IS_LONG || ++ type == IS_DOUBLE || ++ type == IS_NULL || ++ type == IS_CONSTANT || ++ type == IS_STRING || ++ type == FLAG_IS_BC || ++ type == IS_ARRAY || ++ type == IS_CONSTANT_ARRAY || ++ type == IS_OBJECT); ++ } ++ } ++ } ++} ++#endif ++/* }}} */ ++ ++/* {{{ my_bitwise_copy_function */ ++static zend_function* my_bitwise_copy_function(zend_function* dst, zend_function* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ apc_pool* pool = ctxt->pool; ++ ++ assert(src != NULL); ++ ++ if (!dst) { ++ CHECK(dst = (zend_function*) apc_pool_alloc(pool, sizeof(src[0]))); ++ } ++ ++ /* We only need to do a bitwise copy */ ++ memcpy(dst, src, sizeof(src[0])); ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ my_copy_zval_ptr */ ++static zval** my_copy_zval_ptr(zval** dst, const zval** src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ zval* dst_new; ++ apc_pool* pool = ctxt->pool; ++ int usegc = (ctxt->copy == APC_COPY_OUT_OPCODE) || (ctxt->copy == APC_COPY_OUT_USER); ++ ++ assert(src != NULL); ++ ++ if (!dst) { ++ CHECK(dst = (zval**) apc_pool_alloc(pool, sizeof(zval*))); ++ } ++ ++ if(usegc) { ++ ALLOC_ZVAL(dst[0]); ++ CHECK(dst[0]); ++ } else { ++ CHECK((dst[0] = (zval*) apc_pool_alloc(pool, sizeof(zval)))); ++ } ++ ++ CHECK((dst_new = my_copy_zval(*dst, *src, ctxt TSRMLS_CC))); ++ ++ if(dst_new != *dst) { ++ if(usegc) { ++ FREE_ZVAL(dst[0]); ++ } ++ *dst = dst_new; ++ } ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ my_serialize_object */ ++static zval* my_serialize_object(zval* dst, const zval* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ smart_str buf = {0}; ++ php_serialize_data_t var_hash; ++ apc_pool* pool = ctxt->pool; ++ ++ PHP_VAR_SERIALIZE_INIT(var_hash); ++ php_var_serialize(&buf, (zval**)&src, &var_hash TSRMLS_CC); ++ PHP_VAR_SERIALIZE_DESTROY(var_hash); ++ ++ if(buf.c) { ++ dst->type = src->type & ~IS_CONSTANT_INDEX; ++ dst->value.str.len = buf.len; ++ CHECK(dst->value.str.val = apc_pmemcpy(buf.c, (buf.len + 1), pool TSRMLS_CC)); ++ dst->type = src->type; ++ smart_str_free(&buf); ++ } ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ my_unserialize_object */ ++static zval* my_unserialize_object(zval* dst, const zval* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ php_unserialize_data_t var_hash; ++ const unsigned char *p = (unsigned char*)Z_STRVAL_P(src); ++ ++ PHP_VAR_UNSERIALIZE_INIT(var_hash); ++ if(!php_var_unserialize(&dst, &p, p + Z_STRLEN_P(src), &var_hash TSRMLS_CC)) { ++ PHP_VAR_UNSERIALIZE_DESTROY(var_hash); ++ zval_dtor(dst); ++ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Error at offset %ld of %d bytes", (long)((char*)p - Z_STRVAL_P(src)), Z_STRLEN_P(src)); ++ dst->type = IS_NULL; ++ } ++ PHP_VAR_UNSERIALIZE_DESTROY(var_hash); ++ return dst; ++} ++/* }}} */ ++ ++static char *apc_string_pmemcpy(char *str, size_t len, apc_pool* pool TSRMLS_DC) ++{ ++#ifdef ZEND_ENGINE_2_4 ++ if (pool->type != APC_UNPOOL) { ++ char * ret = apc_new_interned_string(str, len TSRMLS_CC); ++ if (ret) { ++ return ret; ++ } ++ } ++#endif ++ return apc_pmemcpy(str, len, pool TSRMLS_CC); ++} ++ ++/* {{{ my_copy_zval */ ++static zval* my_copy_zval(zval* dst, const zval* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ zval **tmp; ++ apc_pool* pool = ctxt->pool; ++ ++ assert(dst != NULL); ++ assert(src != NULL); ++ ++ memcpy(dst, src, sizeof(src[0])); ++ ++ if(APCG(copied_zvals).nTableSize) { ++ if(zend_hash_index_find(&APCG(copied_zvals), (ulong)src, (void**)&tmp) == SUCCESS) { ++ if(Z_ISREF_P((zval*)src)) { ++ Z_SET_ISREF_PP(tmp); ++ } ++ Z_ADDREF_PP(tmp); ++ return *tmp; ++ } ++ ++ zend_hash_index_update(&APCG(copied_zvals), (ulong)src, (void**)&dst, sizeof(zval*), NULL); ++ } ++ ++ ++ if(ctxt->copy == APC_COPY_OUT_USER || ctxt->copy == APC_COPY_IN_USER) { ++ /* deep copies are refcount(1), but moved up for recursive ++ * arrays, which end up being add_ref'd during its copy. */ ++ Z_SET_REFCOUNT_P(dst, 1); ++ Z_UNSET_ISREF_P(dst); ++ } else { ++ /* code uses refcount=2 for consts */ ++ Z_SET_REFCOUNT_P(dst, Z_REFCOUNT_P((zval*)src)); ++ Z_SET_ISREF_TO_P(dst, Z_ISREF_P((zval*)src)); ++ } ++ ++ switch (src->type & IS_CONSTANT_TYPE_MASK) { ++ case IS_RESOURCE: ++ case IS_BOOL: ++ case IS_LONG: ++ case IS_DOUBLE: ++ case IS_NULL: ++ break; ++ ++ case IS_CONSTANT: ++ case IS_STRING: ++ if (src->value.str.val) { ++ CHECK(dst->value.str.val = apc_string_pmemcpy(src->value.str.val, ++ src->value.str.len+1, ++ pool TSRMLS_CC)); ++ } ++ break; ++ ++ case IS_ARRAY: ++ case IS_CONSTANT_ARRAY: ++ ++ CHECK(dst->value.ht = ++ my_copy_hashtable(NULL, ++ src->value.ht, ++ (ht_copy_fun_t) my_copy_zval_ptr, ++ 1, ++ ctxt)); ++ break; ++ ++ case IS_OBJECT: ++ ++ dst->type = IS_NULL; ++ if(ctxt->copy == APC_COPY_IN_USER) { ++ dst = my_serialize_object(dst, src, ctxt TSRMLS_CC); ++ } else if(ctxt->copy == APC_COPY_OUT_USER) { ++ dst = my_unserialize_object(dst, src, ctxt TSRMLS_CC); ++ } ++ break; ++ ++ default: ++ assert(0); ++ } ++ ++ return dst; ++} ++/* }}} */ ++ ++#ifdef ZEND_ENGINE_2_4 ++/* {{{ my_copy_znode */ ++static void my_check_znode(zend_uchar op_type, apc_context_t* ctxt TSRMLS_DC) ++{ ++ assert(op_type == IS_CONST || ++ op_type == IS_VAR || ++ op_type == IS_CV || ++ op_type == IS_TMP_VAR || ++ op_type == IS_UNUSED); ++} ++/* }}} */ ++ ++/* {{{ my_copy_zend_op */ ++static zend_op* my_copy_zend_op(zend_op* dst, zend_op* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ assert(dst != NULL); ++ assert(src != NULL); ++ ++ memcpy(dst, src, sizeof(src[0])); ++ ++ my_check_znode(dst->result_type & ~EXT_TYPE_UNUSED, ctxt TSRMLS_CC); ++ my_check_znode(dst->op1_type, ctxt TSRMLS_CC); ++ my_check_znode(dst->op2_type, ctxt TSRMLS_CC); ++ ++ return dst; ++} ++/* }}} */ ++#else ++/* {{{ my_copy_znode */ ++static znode* my_copy_znode(znode* dst, znode* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ assert(dst != NULL); ++ assert(src != NULL); ++ ++ memcpy(dst, src, sizeof(src[0])); ++ ++#ifdef IS_CV ++ assert(dst ->op_type == IS_CONST || ++ dst ->op_type == IS_VAR || ++ dst ->op_type == IS_CV || ++ dst ->op_type == IS_TMP_VAR || ++ dst ->op_type == IS_UNUSED); ++#else ++ assert(dst ->op_type == IS_CONST || ++ dst ->op_type == IS_VAR || ++ dst ->op_type == IS_TMP_VAR || ++ dst ->op_type == IS_UNUSED); ++#endif ++ ++ if (src->op_type == IS_CONST) { ++ if(!my_copy_zval(&dst->u.constant, &src->u.constant, ctxt TSRMLS_CC)) { ++ return NULL; ++ } ++ } ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ my_copy_zend_op */ ++static zend_op* my_copy_zend_op(zend_op* dst, zend_op* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ assert(dst != NULL); ++ assert(src != NULL); ++ ++ memcpy(dst, src, sizeof(src[0])); ++ ++ CHECK(my_copy_znode(&dst->result, &src->result, ctxt TSRMLS_CC)); ++ CHECK(my_copy_znode(&dst->op1, &src->op1, ctxt TSRMLS_CC)); ++ CHECK(my_copy_znode(&dst->op2, &src->op2, ctxt TSRMLS_CC)); ++ ++ return dst; ++} ++/* }}} */ ++#endif ++ ++/* {{{ my_copy_function */ ++static zend_function* my_copy_function(zend_function* dst, zend_function* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ assert(src != NULL); ++ ++ CHECK(dst = my_bitwise_copy_function(dst, src, ctxt TSRMLS_CC)); ++ ++ switch (src->type) { ++ case ZEND_INTERNAL_FUNCTION: ++ case ZEND_OVERLOADED_FUNCTION: ++ /* shallow copy because op_array is internal */ ++ dst->op_array = src->op_array; ++ break; ++ ++ case ZEND_USER_FUNCTION: ++ case ZEND_EVAL_CODE: ++ CHECK(apc_copy_op_array(&dst->op_array, ++ &src->op_array, ++ ctxt TSRMLS_CC)); ++ break; ++ ++ default: ++ assert(0); ++ } ++ /* ++ * op_array bitwise copying overwrites what ever you modified ++ * before apc_copy_op_array - which is why this code is outside ++ * my_bitwise_copy_function. ++ */ ++ ++ /* zend_do_inheritance will re-look this up, because the pointers ++ * in prototype are from a function table of another class. It just ++ * helps if that one is from EG(class_table). ++ */ ++ dst->common.prototype = NULL; ++ ++ /* once a method is marked as ZEND_ACC_IMPLEMENTED_ABSTRACT then you ++ * have to carry around a prototype. Thankfully zend_do_inheritance ++ * sets this properly as well ++ */ ++ dst->common.fn_flags = src->common.fn_flags & (~ZEND_ACC_IMPLEMENTED_ABSTRACT); ++ ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ my_copy_function_entry */ ++static zend_function_entry* my_copy_function_entry(zend_function_entry* dst, const zend_function_entry* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ assert(src != NULL); ++ ++ if (!dst) { ++ CHECK(dst = (zend_function_entry*) apc_pool_alloc(ctxt->pool, sizeof(src[0]))); ++ } ++ ++ /* Start with a bitwise copy */ ++ memcpy(dst, src, sizeof(src[0])); ++ ++ dst->fname = NULL; ++ dst->arg_info = NULL; ++ ++ if (src->fname) { ++ CHECK((dst->fname = apc_pstrdup(src->fname, ctxt->pool TSRMLS_CC))); ++ } ++ ++ if (src->arg_info) { ++ CHECK((dst->arg_info = my_copy_arg_info_array(NULL, ++ src->arg_info, ++ src->num_args, ++ ctxt TSRMLS_CC))); ++ } ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ my_copy_property_info */ ++static zend_property_info* my_copy_property_info(zend_property_info* dst, zend_property_info* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ apc_pool* pool = ctxt->pool; ++ ++ assert(src != NULL); ++ ++ if (!dst) { ++ CHECK(dst = (zend_property_info*) apc_pool_alloc(pool, sizeof(*src))); ++ } ++ ++ /* Start with a bitwise copy */ ++ memcpy(dst, src, sizeof(*src)); ++ ++ dst->name = NULL; ++#if defined(ZEND_ENGINE_2) && PHP_MINOR_VERSION > 0 ++ dst->doc_comment = NULL; ++#endif ++ ++ if (src->name) { ++ /* private members are stored inside property_info as a mangled ++ * string of the form: ++ * \0\0\0 ++ */ ++ CHECK((dst->name = apc_string_pmemcpy(src->name, src->name_length+1, pool TSRMLS_CC))); ++ } ++ ++#if defined(ZEND_ENGINE_2) && PHP_MINOR_VERSION > 0 ++ if (src->doc_comment) { ++ CHECK((dst->doc_comment = apc_pmemcpy(src->doc_comment, (src->doc_comment_len + 1), pool TSRMLS_CC))); ++ } ++#endif ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ my_copy_property_info_for_execution */ ++static zend_property_info* my_copy_property_info_for_execution(zend_property_info* dst, zend_property_info* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ assert(src != NULL); ++ ++ if (!dst) { ++ CHECK(dst = (zend_property_info*) apc_pool_alloc(ctxt->pool, sizeof(*src))); ++ } ++ ++ /* We need only a shallow copy */ ++ memcpy(dst, src, sizeof(*src)); ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ my_copy_arg_info_array */ ++static zend_arg_info* my_copy_arg_info_array(zend_arg_info* dst, const zend_arg_info* src, uint num_args, apc_context_t* ctxt TSRMLS_DC) ++{ ++ uint i = 0; ++ ++ ++ if (!dst) { ++ CHECK(dst = (zend_arg_info*) apc_pool_alloc(ctxt->pool, (sizeof(*src) * num_args))); ++ } ++ ++ /* Start with a bitwise copy */ ++ memcpy(dst, src, sizeof(*src)*num_args); ++ ++ for(i=0; i < num_args; i++) { ++ CHECK((my_copy_arg_info( &dst[i], &src[i], ctxt TSRMLS_CC))); ++ } ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ my_copy_arg_info */ ++static zend_arg_info* my_copy_arg_info(zend_arg_info* dst, const zend_arg_info* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ apc_pool* pool = ctxt->pool; ++ ++ assert(src != NULL); ++ ++ if (!dst) { ++ CHECK(dst = (zend_arg_info*) apc_pool_alloc(pool, sizeof(*src))); ++ } ++ ++ /* Start with a bitwise copy */ ++ memcpy(dst, src, sizeof(*src)); ++ ++ dst->name = NULL; ++ dst->class_name = NULL; ++ ++ if (src->name) { ++ CHECK((dst->name = apc_string_pmemcpy((char *) src->name, src->name_len+1, pool TSRMLS_CC))); ++ } ++ ++ if (src->class_name) { ++ CHECK((dst->class_name = apc_string_pmemcpy((char *) src->class_name, src->class_name_len+1, pool TSRMLS_CC))); ++ } ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ apc_copy_class_entry */ ++zend_class_entry* apc_copy_class_entry(zend_class_entry* dst, zend_class_entry* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ return my_copy_class_entry(dst, src, ctxt TSRMLS_CC); ++} ++ ++/* {{{ my_copy_class_entry */ ++static zend_class_entry* my_copy_class_entry(zend_class_entry* dst, zend_class_entry* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ int i = 0; ++ apc_pool* pool = ctxt->pool; ++ ++ assert(src != NULL); ++ ++ if (!dst) { ++ CHECK(dst = (zend_class_entry*) apc_pool_alloc(pool, sizeof(*src))); ++ } ++ ++ /* Start with a bitwise copy */ ++ memcpy(dst, src, sizeof(*src)); ++ ++ dst->name = NULL; ++ memset(&dst->function_table, 0, sizeof(dst->function_table)); ++ ZEND_CE_DOC_COMMENT(dst) = NULL; ++ ZEND_CE_FILENAME(dst) = NULL; ++ memset(&dst->properties_info, 0, sizeof(dst->properties_info)); ++ memset(&dst->constants_table, 0, sizeof(dst->constants_table)); ++ ++ if (src->name) { ++ CHECK((dst->name = apc_pstrdup(src->name, pool TSRMLS_CC))); ++ } ++ ++ if(!(my_copy_hashtable_ex(&dst->function_table, ++ &src->function_table TSRMLS_CC, ++ (ht_copy_fun_t) my_copy_function, ++ 0, ++ ctxt, ++ (ht_check_copy_fun_t) my_check_copy_function, ++ src))) { ++ return NULL; ++ } ++ ++ /* the interfaces are populated at runtime using ADD_INTERFACE */ ++ dst->interfaces = NULL; ++ ++ /* the current count includes inherited interfaces as well, ++ the real dynamic ones are the first which are zero'd ++ out in zend_do_end_class_declaration */ ++ for(i = 0 ; (uint)i < src->num_interfaces ; i++) { ++ if(src->interfaces[i]) ++ { ++ dst->num_interfaces = i; ++ break; ++ } ++ } ++ ++ /* these will either be set inside my_fixup_hashtable or ++ * they will be copied out from parent inside zend_do_inheritance ++ */ ++ dst->parent = NULL; ++ dst->constructor = NULL; ++ dst->destructor = NULL; ++ dst->clone = NULL; ++ dst->__get = NULL; ++ dst->__set = NULL; ++ dst->__unset = NULL; ++ dst->__isset = NULL; ++ dst->__call = NULL; ++#ifdef ZEND_ENGINE_2_2 ++ dst->__tostring = NULL; ++#endif ++#ifdef ZEND_ENGINE_2_3 ++ dst->__callstatic = NULL; ++#endif ++ ++ /* unset function proxies */ ++ dst->serialize_func = NULL; ++ dst->unserialize_func = NULL; ++ ++ my_fixup_hashtable(&dst->function_table, (ht_fixup_fun_t)my_fixup_function, src, dst); ++ ++#ifdef ZEND_ENGINE_2_4 ++ dst->default_properties_count = src->default_properties_count; ++ if (src->default_properties_count) { ++ CHECK(dst->default_properties_table = (zval**) apc_pool_alloc(pool, (sizeof(zval*) * src->default_properties_count))); ++ for (i = 0; i < src->default_properties_count; i++) { ++ if (src->default_properties_table[i]) { ++ my_copy_zval_ptr(&dst->default_properties_table[i], (const zval**)&src->default_properties_table[i], ctxt TSRMLS_CC); ++ } else { ++ dst->default_properties_table[i] = NULL; ++ } ++ } ++ } else { ++ dst->default_properties_table = NULL; ++ } ++#else ++ memset(&dst->default_properties, 0, sizeof(dst->default_properties)); ++ CHECK((my_copy_hashtable_ex(&dst->default_properties, ++ &src->default_properties TSRMLS_CC, ++ (ht_copy_fun_t) my_copy_zval_ptr, ++ 1, ++ ctxt, ++ (ht_check_copy_fun_t) my_check_copy_default_property, ++ src))); ++#endif ++ ++ CHECK((my_copy_hashtable_ex(&dst->properties_info, ++ &src->properties_info TSRMLS_CC, ++ (ht_copy_fun_t) my_copy_property_info, ++ 0, ++ ctxt, ++ (ht_check_copy_fun_t) my_check_copy_property_info, ++ src))); ++ ++#ifdef ZEND_ENGINE_2_2 ++ /* php5.2 introduced a scope attribute for property info */ ++ my_fixup_hashtable(&dst->properties_info, (ht_fixup_fun_t)my_fixup_property_info_for_execution, src, dst); ++#endif ++ ++#ifdef ZEND_ENGINE_2_4 ++ dst->default_static_members_count = src->default_static_members_count; ++ ++ if (src->default_static_members_count) { ++ CHECK(dst->default_static_members_table = (zval**) apc_pool_alloc(pool, (sizeof(zval*) * src->default_static_members_count))); ++ for (i = 0; i < src->default_static_members_count; i++) { ++ if (src->default_static_members_table[i]) { ++ my_copy_zval_ptr(&dst->default_static_members_table[i], (const zval**)&src->default_static_members_table[i], ctxt TSRMLS_CC); ++ } else { ++ dst->default_static_members_table[i] = NULL; ++ } ++ } ++ } else { ++ dst->default_static_members_table = NULL; ++ } ++ dst->static_members_table = dst->default_static_members_table; ++#else ++ memset(&dst->default_static_members, 0, sizeof(dst->default_static_members)); ++ dst->static_members = NULL; ++ CHECK(my_copy_hashtable_ex(&dst->default_static_members, ++ &src->default_static_members TSRMLS_CC, ++ (ht_copy_fun_t) my_copy_zval_ptr, ++ 1, ++ ctxt, ++ (ht_check_copy_fun_t) my_check_copy_static_member, ++ src, ++ &src->default_static_members)); ++ ++ if(src->static_members != &src->default_static_members) ++ { ++ CHECK((dst->static_members = my_copy_hashtable_ex(NULL, ++ src->static_members TSRMLS_CC, ++ (ht_copy_fun_t) my_copy_zval_ptr, ++ 1, ++ ctxt, ++ (ht_check_copy_fun_t) my_check_copy_static_member, ++ src, ++ src->static_members))); ++ } ++ else ++ { ++ dst->static_members = &dst->default_static_members; ++ } ++#endif ++ ++ CHECK((my_copy_hashtable_ex(&dst->constants_table, ++ &src->constants_table TSRMLS_CC, ++ (ht_copy_fun_t) my_copy_zval_ptr, ++ 1, ++ ctxt, ++ (ht_check_copy_fun_t) my_check_copy_constant, ++ src))); ++ ++ if (src->type == ZEND_USER_CLASS && ZEND_CE_DOC_COMMENT(src)) { ++ CHECK(ZEND_CE_DOC_COMMENT(dst) = ++ apc_pmemcpy(ZEND_CE_DOC_COMMENT(src), (ZEND_CE_DOC_COMMENT_LEN(src) + 1), pool TSRMLS_CC)); ++ } ++ ++ if (src->type == ZEND_INTERNAL_CLASS && ZEND_CE_BUILTIN_FUNCTIONS(src)) { ++ int i, n; ++ ++ for (n = 0; src->type == ZEND_INTERNAL_CLASS && ZEND_CE_BUILTIN_FUNCTIONS(src)[n].fname != NULL; n++) {} ++ ++ CHECK((ZEND_CE_BUILTIN_FUNCTIONS(dst) = ++ (zend_function_entry*) apc_pool_alloc(pool, ((n + 1) * sizeof(zend_function_entry))))); ++ ++ for (i = 0; i < n; i++) { ++ CHECK(my_copy_function_entry((zend_function_entry*)(&ZEND_CE_BUILTIN_FUNCTIONS(dst)[i]), ++ &ZEND_CE_BUILTIN_FUNCTIONS(src)[i], ++ ctxt TSRMLS_CC)); ++ } ++ *(char**)&(ZEND_CE_BUILTIN_FUNCTIONS(dst)[n].fname) = NULL; ++ } ++ ++ if (src->type == ZEND_USER_CLASS && ZEND_CE_FILENAME(src)) { ++ CHECK((ZEND_CE_FILENAME(dst) = apc_pstrdup(ZEND_CE_FILENAME(src), pool TSRMLS_CC))); ++ } ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ my_copy_hashtable_ex */ ++static HashTable* my_copy_hashtable_ex(HashTable* dst, ++ HashTable* src TSRMLS_DC, ++ ht_copy_fun_t copy_fn, ++ int holds_ptrs, ++ apc_context_t* ctxt, ++ ht_check_copy_fun_t check_fn, ++ ...) ++{ ++ Bucket* curr = NULL; ++ Bucket* prev = NULL; ++ Bucket* newp = NULL; ++ int first = 1; ++ apc_pool* pool = ctxt->pool; ++ ++ assert(src != NULL); ++ ++ if (!dst) { ++ CHECK(dst = (HashTable*) apc_pool_alloc(pool, sizeof(src[0]))); ++ } ++ ++ memcpy(dst, src, sizeof(src[0])); ++ ++ /* allocate buckets for the new hashtable */ ++ CHECK((dst->arBuckets = apc_pool_alloc(pool, (dst->nTableSize * sizeof(Bucket*))))); ++ ++ memset(dst->arBuckets, 0, dst->nTableSize * sizeof(Bucket*)); ++ dst->pInternalPointer = NULL; ++ dst->pListHead = NULL; ++ ++ for (curr = src->pListHead; curr != NULL; curr = curr->pListNext) { ++ int n = curr->h % dst->nTableSize; ++ ++ if(check_fn) { ++ va_list args; ++ va_start(args, check_fn); ++ ++ /* Call the check_fn to see if the current bucket ++ * needs to be copied out ++ */ ++ if(!check_fn(curr, args)) { ++ dst->nNumOfElements--; ++ va_end(args); ++ continue; ++ } ++ ++ va_end(args); ++ } ++ ++ /* create a copy of the bucket 'curr' */ ++#ifdef ZEND_ENGINE_2_4 ++ if (!curr->nKeyLength) { ++ CHECK((newp = (Bucket*) apc_pmemcpy(curr, sizeof(Bucket), pool TSRMLS_CC))); ++ } else if (IS_INTERNED(curr->arKey)) { ++ CHECK((newp = (Bucket*) apc_pmemcpy(curr, sizeof(Bucket), pool TSRMLS_CC))); ++ } else if (pool->type != APC_UNPOOL) { ++ char *arKey; ++ ++ arKey = apc_new_interned_string(curr->arKey, curr->nKeyLength TSRMLS_CC); ++ if (!arKey) { ++ CHECK((newp = (Bucket*) apc_pmemcpy(curr, (sizeof(Bucket) + curr->nKeyLength), pool TSRMLS_CC))); ++ newp->arKey = ((char*)newp) + sizeof(Bucket); ++ } else { ++ CHECK((newp = (Bucket*) apc_pmemcpy(curr, sizeof(Bucket), pool TSRMLS_CC))); ++ newp->arKey = arKey; ++ } ++ } else { ++ CHECK((newp = (Bucket*) apc_pmemcpy(curr, (sizeof(Bucket) + curr->nKeyLength), pool TSRMLS_CC))); ++ newp->arKey = ((char*)newp) + sizeof(Bucket); ++ } ++#else ++ CHECK((newp = (Bucket*) apc_pmemcpy(curr, ++ (sizeof(Bucket) + curr->nKeyLength - 1), ++ pool TSRMLS_CC))); ++#endif ++ ++ /* insert 'newp' into the linked list at its hashed index */ ++ if (dst->arBuckets[n]) { ++ newp->pNext = dst->arBuckets[n]; ++ newp->pLast = NULL; ++ newp->pNext->pLast = newp; ++ } ++ else { ++ newp->pNext = newp->pLast = NULL; ++ } ++ ++ dst->arBuckets[n] = newp; ++ ++ /* copy the bucket data using our 'copy_fn' callback function */ ++ CHECK((newp->pData = copy_fn(NULL, curr->pData, ctxt TSRMLS_CC))); ++ ++ if (holds_ptrs) { ++ memcpy(&newp->pDataPtr, newp->pData, sizeof(void*)); ++ } ++ else { ++ newp->pDataPtr = NULL; ++ } ++ ++ /* insert 'newp' into the table-thread linked list */ ++ newp->pListLast = prev; ++ newp->pListNext = NULL; ++ ++ if (prev) { ++ prev->pListNext = newp; ++ } ++ ++ if (first) { ++ dst->pListHead = newp; ++ first = 0; ++ } ++ ++ prev = newp; ++ } ++ ++ dst->pListTail = newp; ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ my_copy_static_variables */ ++static HashTable* my_copy_static_variables(zend_op_array* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ if (src->static_variables == NULL) { ++ return NULL; ++ } ++ ++ return my_copy_hashtable(NULL, ++ src->static_variables, ++ (ht_copy_fun_t) my_copy_zval_ptr, ++ 1, ++ ctxt); ++} ++/* }}} */ ++ ++/* {{{ apc_copy_zval */ ++zval* apc_copy_zval(zval* dst, const zval* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ apc_pool* pool = ctxt->pool; ++ int usegc = (ctxt->copy == APC_COPY_OUT_OPCODE) || (ctxt->copy == APC_COPY_OUT_USER); ++ ++ assert(src != NULL); ++ ++ if (!dst) { ++ if(usegc) { ++ ALLOC_ZVAL(dst); ++ CHECK(dst); ++ } else { ++ CHECK(dst = (zval*) apc_pool_alloc(pool, sizeof(zval))); ++ } ++ } ++ ++ CHECK(dst = my_copy_zval(dst, src, ctxt TSRMLS_CC)); ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ apc_fixup_op_array_jumps */ ++static void apc_fixup_op_array_jumps(zend_op_array *dst, zend_op_array *src ) ++{ ++ uint i; ++ ++ for (i=0; i < dst->last; ++i) { ++ zend_op *zo = &(dst->opcodes[i]); ++ /*convert opline number to jump address*/ ++ switch (zo->opcode) { ++#ifdef ZEND_ENGINE_2_3 ++ case ZEND_GOTO: ++#endif ++ case ZEND_JMP: ++ /*Note: if src->opcodes != dst->opcodes then we need to the opline according to src*/ ++#ifdef ZEND_ENGINE_2_4 ++ zo->op1.jmp_addr = dst->opcodes + (zo->op1.jmp_addr - src->opcodes); ++#else ++ zo->op1.u.jmp_addr = dst->opcodes + (zo->op1.u.jmp_addr - src->opcodes); ++#endif ++ break; ++ case ZEND_JMPZ: ++ case ZEND_JMPNZ: ++ case ZEND_JMPZ_EX: ++ case ZEND_JMPNZ_EX: ++#ifdef ZEND_ENGINE_2_3 ++ case ZEND_JMP_SET: ++#endif ++#ifdef ZEND_ENGINE_2_4 ++ zo->op2.jmp_addr = dst->opcodes + (zo->op2.jmp_addr - src->opcodes); ++#else ++ zo->op2.u.jmp_addr = dst->opcodes + (zo->op2.u.jmp_addr - src->opcodes); ++#endif ++ break; ++ default: ++ break; ++ } ++ } ++} ++/* }}} */ ++ ++/* {{{ apc_copy_op_array */ ++zend_op_array* apc_copy_op_array(zend_op_array* dst, zend_op_array* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ int i; ++ apc_fileinfo_t *fileinfo = NULL; ++ char canon_path[MAXPATHLEN]; ++ char *fullpath = NULL; ++ apc_opflags_t * flags = NULL; ++ apc_pool* pool = ctxt->pool; ++ ++ assert(src != NULL); ++ ++ if (!dst) { ++ CHECK(dst = (zend_op_array*) apc_pool_alloc(pool, sizeof(src[0]))); ++ } ++ ++ if(APCG(apc_optimize_function)) { ++ APCG(apc_optimize_function)(src TSRMLS_CC); ++ } ++ ++ /* start with a bitwise copy of the array */ ++ memcpy(dst, src, sizeof(src[0])); ++ ++ dst->function_name = NULL; ++ dst->filename = NULL; ++ dst->refcount = NULL; ++ dst->opcodes = NULL; ++ dst->brk_cont_array = NULL; ++ dst->static_variables = NULL; ++ dst->try_catch_array = NULL; ++ dst->arg_info = NULL; ++ dst->doc_comment = NULL; ++#ifdef ZEND_ENGINE_2_1 ++ dst->vars = NULL; ++#endif ++ ++ /* copy the arg types array (if set) */ ++ if (src->arg_info) { ++ CHECK(dst->arg_info = my_copy_arg_info_array(NULL, ++ src->arg_info, ++ src->num_args, ++ ctxt TSRMLS_CC)); ++ } ++ ++ if (src->function_name) { ++ CHECK(dst->function_name = apc_pstrdup(src->function_name, pool TSRMLS_CC)); ++ } ++ if (src->filename) { ++ CHECK(dst->filename = apc_pstrdup(src->filename, pool TSRMLS_CC)); ++ } ++ ++ CHECK(dst->refcount = apc_pmemcpy(src->refcount, ++ sizeof(src->refcount[0]), ++ pool TSRMLS_CC)); ++ ++#ifdef ZEND_ENGINE_2_4 ++ if (src->literals) { ++ zend_literal *p, *q, *end; ++ ++ q = src->literals; ++ p = dst->literals = (zend_literal*) apc_pool_alloc(pool, (sizeof(zend_literal) * src->last_literal)); ++ end = p + src->last_literal; ++ while (p < end) { ++ *p = *q; ++ my_copy_zval(&p->constant, &q->constant, ctxt TSRMLS_CC); ++ p++; ++ q++; ++ } ++ } ++#endif ++ ++ /* deep-copy the opcodes */ ++ CHECK(dst->opcodes = (zend_op*) apc_pool_alloc(pool, (sizeof(zend_op) * src->last))); ++ ++ if(apc_reserved_offset != -1) { ++ /* Insanity alert: the void* pointer is cast into an apc_opflags_t ++ * struct. apc_zend_init() checks to ensure that it fits in a void* */ ++ flags = (apc_opflags_t*) & (dst->reserved[apc_reserved_offset]); ++ memset(flags, 0, sizeof(apc_opflags_t)); ++ /* assert(sizeof(apc_opflags_t) <= sizeof(dst->reserved)); */ ++ } ++ ++ for (i = 0; (uint) i < src->last; i++) { ++ zend_op *zo = &(src->opcodes[i]); ++ /* a lot of files are merely constant arrays with no jumps */ ++ switch (zo->opcode) { ++#ifdef ZEND_ENGINE_2_3 ++ case ZEND_GOTO: ++#endif ++ case ZEND_JMP: ++ case ZEND_JMPZ: ++ case ZEND_JMPNZ: ++ case ZEND_JMPZ_EX: ++ case ZEND_JMPNZ_EX: ++#ifdef ZEND_ENGINE_2_3 ++ case ZEND_JMP_SET: ++#endif ++ if(flags != NULL) { ++ flags->has_jumps = 1; ++ } ++ break; ++ /* auto_globals_jit was not in php-4.3.* */ ++ case ZEND_FETCH_R: ++ case ZEND_FETCH_W: ++ case ZEND_FETCH_IS: ++ case ZEND_FETCH_FUNC_ARG: ++ case ZEND_FETCH_RW: ++ case ZEND_FETCH_UNSET: ++ if(PG(auto_globals_jit) && flags != NULL) ++ { ++ /* The fetch is only required if auto_globals_jit=1 */ ++#ifdef ZEND_ENGINE_2_4 ++ if((zo->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_GLOBAL && ++ zo->op1_type == IS_CONST && ++ Z_TYPE_P(zo->op1.zv) == IS_STRING) { ++ if (Z_STRVAL_P(zo->op1.zv)[0] == '_') { ++# define SET_IF_AUTOGLOBAL(member) \ ++ if(!strcmp(Z_STRVAL_P(zo->op1.zv), #member)) \ ++ flags->member = 1 /* no ';' here */ ++#else ++ if(zo->op2.u.EA.type == ZEND_FETCH_GLOBAL && ++ zo->op1.op_type == IS_CONST && ++ zo->op1.u.constant.type == IS_STRING) { ++ znode * varname = &zo->op1; ++ if (varname->u.constant.value.str.val[0] == '_') { ++# define SET_IF_AUTOGLOBAL(member) \ ++ if(!strcmp(varname->u.constant.value.str.val, #member)) \ ++ flags->member = 1 /* no ';' here */ ++#endif ++ SET_IF_AUTOGLOBAL(_GET); ++ else SET_IF_AUTOGLOBAL(_POST); ++ else SET_IF_AUTOGLOBAL(_COOKIE); ++ else SET_IF_AUTOGLOBAL(_SERVER); ++ else SET_IF_AUTOGLOBAL(_ENV); ++ else SET_IF_AUTOGLOBAL(_FILES); ++ else SET_IF_AUTOGLOBAL(_REQUEST); ++ else SET_IF_AUTOGLOBAL(_SESSION); ++#ifdef ZEND_ENGINE_2_4 ++ else if(zend_is_auto_global( ++ Z_STRVAL_P(zo->op1.zv), ++ Z_STRLEN_P(zo->op1.zv) ++ TSRMLS_CC)) ++#else ++ else if(zend_is_auto_global( ++ varname->u.constant.value.str.val, ++ varname->u.constant.value.str.len ++ TSRMLS_CC)) ++#endif ++ { ++ flags->unknown_global = 1; ++ } ++#ifdef ZEND_ENGINE_2_4 ++ } else SET_IF_AUTOGLOBAL(GLOBALS); ++#else ++ } ++#endif ++ } ++ } ++ break; ++ case ZEND_RECV_INIT: ++#ifdef ZEND_ENGINE_2_4 ++ if(zo->op2_type == IS_CONST && ++ Z_TYPE_P(zo->op2.zv) == IS_CONSTANT_ARRAY) { ++#else ++ if(zo->op2.op_type == IS_CONST && ++ zo->op2.u.constant.type == IS_CONSTANT_ARRAY) { ++#endif ++ if(flags != NULL) { ++ flags->deep_copy = 1; ++ } ++ } ++ break; ++ default: ++#ifdef ZEND_ENGINE_2_4 ++ if((zo->op1_type == IS_CONST && ++ Z_TYPE_P(zo->op1.zv) == IS_CONSTANT_ARRAY) || ++ (zo->op2_type == IS_CONST && ++ Z_TYPE_P(zo->op2.zv) == IS_CONSTANT_ARRAY)) { ++#else ++ if((zo->op1.op_type == IS_CONST && ++ zo->op1.u.constant.type == IS_CONSTANT_ARRAY) || ++ (zo->op2.op_type == IS_CONST && ++ zo->op2.u.constant.type == IS_CONSTANT_ARRAY)) { ++#endif ++ if(flags != NULL) { ++ flags->deep_copy = 1; ++ } ++ } ++ break; ++ } ++ ++ if(!(my_copy_zend_op(dst->opcodes+i, src->opcodes+i, ctxt TSRMLS_CC))) { ++ return NULL; ++ } ++ ++#ifdef ZEND_ENGINE_2_4 ++ if (zo->op1_type == IS_CONST) { ++ dst->opcodes[i].op1.literal = src->opcodes[i].op1.literal - src->literals + dst->literals; ++ } ++ if (zo->op2_type == IS_CONST) { ++ dst->opcodes[i].op2.literal = src->opcodes[i].op2.literal - src->literals + dst->literals; ++ } ++ if (zo->result_type == IS_CONST) { ++ dst->opcodes[i].result.literal = src->opcodes[i].result.literal - src->literals + dst->literals; ++ } ++#endif ++ ++ /* This code breaks apc's rule#1 - cache what you compile */ ++ if((APCG(fpstat)==0) && APCG(canonicalize)) { ++ /* not pool allocated, because the pool allocations eat up shm space */ ++ fileinfo = (apc_fileinfo_t*) apc_php_malloc(sizeof(apc_fileinfo_t) TSRMLS_CC); ++#ifdef ZEND_ENGINE_2_4 ++ if((zo->opcode == ZEND_INCLUDE_OR_EVAL) && ++ (zo->op1_type == IS_CONST && Z_TYPE_P(zo->op1.zv) == IS_STRING)) { ++ /* constant includes */ ++ if(!IS_ABSOLUTE_PATH(Z_STRVAL_P(zo->op1.zv),Z_STRLEN_P(zo->op1.zv))) { ++ if (apc_search_paths(Z_STRVAL_P(zo->op1.zv), PG(include_path), fileinfo TSRMLS_CC) == 0) { ++#else ++ if((zo->opcode == ZEND_INCLUDE_OR_EVAL) && ++ (zo->op1.op_type == IS_CONST && zo->op1.u.constant.type == IS_STRING)) { ++ /* constant includes */ ++ if(!IS_ABSOLUTE_PATH(Z_STRVAL_P(&zo->op1.u.constant),Z_STRLEN_P(&zo->op1.u.constant))) { ++ if (apc_search_paths(Z_STRVAL_P(&zo->op1.u.constant), PG(include_path), fileinfo TSRMLS_CC) == 0) { ++#endif ++ if((fullpath = realpath(fileinfo->fullpath, canon_path))) { ++ /* everything has to go through a realpath() */ ++ zend_op *dzo = &(dst->opcodes[i]); ++#ifdef ZEND_ENGINE_2_4 ++ dzo->op1.literal = (zend_literal*) apc_pool_alloc(pool, sizeof(zend_literal)); ++ Z_STRLEN_P(dzo->op1.zv) = strlen(fullpath); ++ Z_STRVAL_P(dzo->op1.zv) = apc_pstrdup(fullpath, pool TSRMLS_CC); ++ Z_SET_REFCOUNT_P(dzo->op1.zv, 2); ++ Z_SET_ISREF_P(dzo->op1.zv); ++ dzo->op1.literal->hash_value = zend_hash_func(Z_STRVAL_P(dzo->op1.zv), Z_STRLEN_P(dzo->op1.zv)+1); ++#else ++ dzo->op1.u.constant.value.str.len = strlen(fullpath); ++ dzo->op1.u.constant.value.str.val = apc_pstrdup(fullpath, pool TSRMLS_CC); ++#endif ++ } ++ } ++ } ++ } ++ apc_php_free(fileinfo TSRMLS_CC); ++ } ++ } ++ ++ if(flags == NULL || flags->has_jumps) { ++ apc_fixup_op_array_jumps(dst,src); ++ } ++ ++ /* copy the break-continue array */ ++ if (src->brk_cont_array) { ++ CHECK(dst->brk_cont_array = apc_pmemcpy(src->brk_cont_array, ++ sizeof(src->brk_cont_array[0]) * src->last_brk_cont, ++ pool TSRMLS_CC)); ++ } ++ ++ /* copy the table of static variables */ ++ if (src->static_variables) { ++ CHECK(dst->static_variables = my_copy_static_variables(src, ctxt TSRMLS_CC)); ++ } ++ ++ if (src->try_catch_array) { ++ CHECK(dst->try_catch_array = apc_pmemcpy(src->try_catch_array, ++ sizeof(src->try_catch_array[0]) * src->last_try_catch, ++ pool TSRMLS_CC)); ++ } ++ ++#ifdef ZEND_ENGINE_2_1 /* PHP 5.1 */ ++ if (src->vars) { ++ CHECK(dst->vars = apc_pmemcpy(src->vars, ++ sizeof(src->vars[0]) * src->last_var, ++ pool TSRMLS_CC)); ++ ++ for(i = 0; i < src->last_var; i++) dst->vars[i].name = NULL; ++ ++ for(i = 0; i < src->last_var; i++) { ++ CHECK(dst->vars[i].name = apc_string_pmemcpy(src->vars[i].name, ++ src->vars[i].name_len + 1, ++ pool TSRMLS_CC)); ++ } ++ } ++#endif ++ ++ if (src->doc_comment) { ++ CHECK(dst->doc_comment ++ = apc_pmemcpy(src->doc_comment, (src->doc_comment_len + 1), pool TSRMLS_CC)); ++ } ++ ++ return dst; ++} ++/* }}} */ ++ ++ ++/* {{{ apc_copy_new_functions */ ++apc_function_t* apc_copy_new_functions(int old_count, apc_context_t* ctxt TSRMLS_DC) ++{ ++ apc_function_t* array; ++ int new_count; /* number of new functions in table */ ++ int i; ++ apc_pool* pool = ctxt->pool; ++ ++ new_count = zend_hash_num_elements(CG(function_table)) - old_count; ++ assert(new_count >= 0); ++ ++ CHECK(array = ++ (apc_function_t*) ++ apc_pool_alloc(pool, (sizeof(apc_function_t) * (new_count + 1)))); ++ ++ if (new_count == 0) { ++ array[0].function = NULL; ++ return array; ++ } ++ ++ /* Skip the first `old_count` functions in the table */ ++ zend_hash_internal_pointer_reset(CG(function_table)); ++ for (i = 0; i < old_count; i++) { ++ zend_hash_move_forward(CG(function_table)); ++ } ++ ++ /* Add the next `new_count` functions to our array */ ++ for (i = 0; i < new_count; i++) { ++ char* key; ++ uint key_size; ++ zend_function* fun; ++ ++ zend_hash_get_current_key_ex(CG(function_table), ++ &key, ++ &key_size, ++ NULL, ++ 0, ++ NULL); ++ ++ zend_hash_get_current_data(CG(function_table), (void**) &fun); ++ ++ CHECK(array[i].name = apc_pmemcpy(key, (int) key_size, pool TSRMLS_CC)); ++ array[i].name_len = (int) key_size-1; ++ CHECK(array[i].function = my_copy_function(NULL, fun, ctxt TSRMLS_CC)); ++ zend_hash_move_forward(CG(function_table)); ++ } ++ ++ array[i].function = NULL; ++ return array; ++} ++/* }}} */ ++ ++/* {{{ apc_copy_new_classes */ ++apc_class_t* apc_copy_new_classes(zend_op_array* op_array, int old_count, apc_context_t *ctxt TSRMLS_DC) ++{ ++ apc_class_t* array; ++ int new_count; /* number of new classes in table */ ++ int i; ++ apc_pool* pool = ctxt->pool; ++ ++ new_count = zend_hash_num_elements(CG(class_table)) - old_count; ++ assert(new_count >= 0); ++ ++ CHECK(array = ++ (apc_class_t*) ++ apc_pool_alloc(pool, (sizeof(apc_class_t) * (new_count + 1)))); ++ ++ if (new_count == 0) { ++ array[0].class_entry = NULL; ++ return array; ++ } ++ ++ /* Skip the first `old_count` classes in the table */ ++ zend_hash_internal_pointer_reset(CG(class_table)); ++ for (i = 0; i < old_count; i++) { ++ zend_hash_move_forward(CG(class_table)); ++ } ++ ++ /* Add the next `new_count` classes to our array */ ++ for (i = 0; i < new_count; i++) { ++ char* key; ++ uint key_size; ++ zend_class_entry* elem = NULL; ++ ++ array[i].class_entry = NULL; ++ ++ zend_hash_get_current_key_ex(CG(class_table), ++ &key, ++ &key_size, ++ NULL, ++ 0, ++ NULL); ++ ++ zend_hash_get_current_data(CG(class_table), (void**) &elem); ++ ++ ++ elem = *((zend_class_entry**)elem); ++ ++ CHECK(array[i].name = apc_pmemcpy(key, (int) key_size, pool TSRMLS_CC)); ++ array[i].name_len = (int) key_size-1; ++ CHECK(array[i].class_entry = my_copy_class_entry(NULL, elem, ctxt TSRMLS_CC)); ++ ++ /* ++ * If the class has a pointer to its parent class, save the parent ++ * name so that we can enable compile-time inheritance when we reload ++ * the child class; otherwise, set the parent name to null and scan ++ * the op_array to determine if this class inherits from some base ++ * class at execution-time. ++ */ ++ ++ if (elem->parent) { ++ CHECK(array[i].parent_name = apc_pstrdup(elem->parent->name, pool TSRMLS_CC)); ++ } ++ else { ++ array[i].parent_name = NULL; ++ } ++ ++ zend_hash_move_forward(CG(class_table)); ++ } ++ ++ array[i].class_entry = NULL; ++ return array; ++} ++/* }}} */ ++ ++/* Used only by my_prepare_op_array_for_execution */ ++#ifdef ZEND_ENGINE_2_4 ++# define APC_PREPARE_FETCH_GLOBAL_FOR_EXECUTION() \ ++ /* The fetch is only required if auto_globals_jit=1 */ \ ++ if((zo->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_GLOBAL && \ ++ zo->op1_type == IS_CONST && \ ++ Z_TYPE_P(zo->op1.zv) == IS_STRING && \ ++ Z_STRVAL_P(zo->op1.zv)[0] == '_') { \ ++ (void)zend_is_auto_global(Z_STRVAL_P(zo->op1.zv), \ ++ Z_STRLEN_P(zo->op1.zv) \ ++ TSRMLS_CC); \ ++ } ++#else ++# define APC_PREPARE_FETCH_GLOBAL_FOR_EXECUTION() \ ++ /* The fetch is only required if auto_globals_jit=1 */ \ ++ if(zo->op2.u.EA.type == ZEND_FETCH_GLOBAL && \ ++ zo->op1.op_type == IS_CONST && \ ++ zo->op1.u.constant.type == IS_STRING && \ ++ zo->op1.u.constant.value.str.val[0] == '_') { \ ++ \ ++ znode* varname = &zo->op1; \ ++ (void)zend_is_auto_global(varname->u.constant.value.str.val, \ ++ varname->u.constant.value.str.len \ ++ TSRMLS_CC); \ ++ } ++#endif ++ ++/* {{{ my_prepare_op_array_for_execution */ ++static int my_prepare_op_array_for_execution(zend_op_array* dst, zend_op_array* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ /* combine my_fetch_global_vars and my_copy_data_exceptions. ++ * - Pre-fetch superglobals which would've been pre-fetched in parse phase. ++ * - If the opcode stream contain mutable data, ensure a copy. ++ * - Fixup array jumps in the same loop. ++ */ ++ int i=src->last; ++ zend_op *zo; ++ zend_op *dzo; ++ apc_opflags_t * flags = apc_reserved_offset != -1 ? ++ (apc_opflags_t*) & (src->reserved[apc_reserved_offset]) : NULL; ++ int needcopy = flags ? flags->deep_copy : 1; ++ /* auto_globals_jit was not in php4 */ ++ int do_prepare_fetch_global = PG(auto_globals_jit) && (flags == NULL || flags->unknown_global); ++ ++#define FETCH_AUTOGLOBAL(member) do { \ ++ if(flags && flags->member == 1) { \ ++ zend_is_auto_global(#member,\ ++ (sizeof(#member) - 1)\ ++ TSRMLS_CC);\ ++ } \ ++} while(0); ++ ++ FETCH_AUTOGLOBAL(_GET); ++ FETCH_AUTOGLOBAL(_POST); ++ FETCH_AUTOGLOBAL(_COOKIE); ++ FETCH_AUTOGLOBAL(_SERVER); ++ FETCH_AUTOGLOBAL(_ENV); ++ FETCH_AUTOGLOBAL(_FILES); ++ FETCH_AUTOGLOBAL(_REQUEST); ++ FETCH_AUTOGLOBAL(_SESSION); ++#ifdef ZEND_ENGINE_2_4 ++ FETCH_AUTOGLOBAL(GLOBALS); ++#endif ++ ++ if(needcopy) { ++ ++#ifdef ZEND_ENGINE_2_4 ++ if (src->literals) { ++ zend_literal *p, *q, *end; ++ ++ q = src->literals; ++ p = dst->literals = (zend_literal*) apc_xmemcpy(src->literals, ++ sizeof(zend_literal) * src->last_literal, ++ apc_php_malloc TSRMLS_CC); ++ end = p + src->last_literal; ++ while (p < end) { ++ if (Z_TYPE(q->constant) == IS_CONSTANT_ARRAY) { ++ my_copy_zval(&p->constant, &q->constant, ctxt TSRMLS_CC); ++ } ++ p++; ++ q++; ++ } ++ } ++#endif ++ ++ dst->opcodes = (zend_op*) apc_xmemcpy(src->opcodes, ++ sizeof(zend_op) * src->last, ++ apc_php_malloc TSRMLS_CC); ++ zo = src->opcodes; ++ dzo = dst->opcodes; ++ while(i > 0) { ++ ++#ifdef ZEND_ENGINE_2_4 ++ if(zo->op1_type == IS_CONST) { ++ dzo->op1.literal = zo->op1.literal - src->literals + dst->literals; ++ } ++ if(zo->op2_type == IS_CONST) { ++ dzo->op2.literal = zo->op2.literal - src->literals + dst->literals; ++ } ++ if(zo->result_type == IS_CONST) { ++ dzo->result.literal = zo->result.literal - src->literals + dst->literals; ++ } ++#else ++ if( ((zo->op1.op_type == IS_CONST && ++ zo->op1.u.constant.type == IS_CONSTANT_ARRAY)) || ++ ((zo->op2.op_type == IS_CONST && ++ zo->op2.u.constant.type == IS_CONSTANT_ARRAY))) { ++ ++ if(!(my_copy_zend_op(dzo, zo, ctxt TSRMLS_CC))) { ++ assert(0); /* emalloc failed or a bad constant array */ ++ } ++ } ++#endif ++ ++ switch(zo->opcode) { ++#ifdef ZEND_ENGINE_2_3 ++ case ZEND_GOTO: ++#endif ++ case ZEND_JMP: ++#ifdef ZEND_ENGINE_2_4 ++ dzo->op1.jmp_addr = dst->opcodes + ++ (zo->op1.jmp_addr - src->opcodes); ++#else ++ dzo->op1.u.jmp_addr = dst->opcodes + ++ (zo->op1.u.jmp_addr - src->opcodes); ++#endif ++ break; ++ case ZEND_JMPZ: ++ case ZEND_JMPNZ: ++ case ZEND_JMPZ_EX: ++ case ZEND_JMPNZ_EX: ++#ifdef ZEND_ENGINE_2_3 ++ case ZEND_JMP_SET: ++#endif ++#ifdef ZEND_ENGINE_2_4 ++ dzo->op2.jmp_addr = dst->opcodes + ++ (zo->op2.jmp_addr - src->opcodes); ++#else ++ dzo->op2.u.jmp_addr = dst->opcodes + ++ (zo->op2.u.jmp_addr - src->opcodes); ++#endif ++ break; ++ case ZEND_FETCH_R: ++ case ZEND_FETCH_W: ++ case ZEND_FETCH_IS: ++ case ZEND_FETCH_FUNC_ARG: ++ if(do_prepare_fetch_global) ++ { ++ APC_PREPARE_FETCH_GLOBAL_FOR_EXECUTION(); ++ } ++ break; ++ default: ++ break; ++ } ++ i--; ++ zo++; ++ dzo++; ++ } ++ } else { /* !needcopy */ ++ /* The fetch is only required if auto_globals_jit=1 */ ++ if(do_prepare_fetch_global) ++ { ++ zo = src->opcodes; ++ while(i > 0) { ++ ++ if(zo->opcode == ZEND_FETCH_R || ++ zo->opcode == ZEND_FETCH_W || ++ zo->opcode == ZEND_FETCH_IS || ++ zo->opcode == ZEND_FETCH_FUNC_ARG ++ ) { ++ APC_PREPARE_FETCH_GLOBAL_FOR_EXECUTION(); ++ } ++ ++ i--; ++ zo++; ++ } ++ } ++ } ++ return 1; ++} ++/* }}} */ ++ ++/* {{{ apc_copy_op_array_for_execution */ ++zend_op_array* apc_copy_op_array_for_execution(zend_op_array* dst, zend_op_array* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ if(dst == NULL) { ++ dst = (zend_op_array*) emalloc(sizeof(src[0])); ++ } ++ memcpy(dst, src, sizeof(src[0])); ++ dst->static_variables = my_copy_static_variables(src, ctxt TSRMLS_CC); ++ ++ /* memory leak */ ++ dst->refcount = apc_pmemcpy(src->refcount, ++ sizeof(src->refcount[0]), ++ ctxt->pool TSRMLS_CC); ++ ++ my_prepare_op_array_for_execution(dst,src, ctxt TSRMLS_CC); ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ apc_copy_function_for_execution */ ++zend_function* apc_copy_function_for_execution(zend_function* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ zend_function* dst; ++ ++ dst = (zend_function*) emalloc(sizeof(src[0])); ++ memcpy(dst, src, sizeof(src[0])); ++ apc_copy_op_array_for_execution(&(dst->op_array), &(src->op_array), ctxt TSRMLS_CC); ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ apc_copy_function_for_execution_ex */ ++zend_function* apc_copy_function_for_execution_ex(void *dummy, zend_function* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++ if(src->type==ZEND_INTERNAL_FUNCTION || src->type==ZEND_OVERLOADED_FUNCTION) return src; ++ return apc_copy_function_for_execution(src, ctxt TSRMLS_CC); ++} ++/* }}} */ ++ ++/* {{{ apc_copy_class_entry_for_execution */ ++zend_class_entry* apc_copy_class_entry_for_execution(zend_class_entry* src, apc_context_t* ctxt TSRMLS_DC) ++{ ++#ifdef ZEND_ENGINE_2_4 ++ int i; ++#endif ++ zend_class_entry* dst = (zend_class_entry*) apc_pool_alloc(ctxt->pool, sizeof(src[0])); ++ memcpy(dst, src, sizeof(src[0])); ++ ++ if(src->num_interfaces) ++ { ++ /* These are slots to be populated later by ADD_INTERFACE insns */ ++ dst->interfaces = apc_php_malloc( ++ (sizeof(zend_class_entry*) * src->num_interfaces) TSRMLS_CC); ++ memset(dst->interfaces, 0, ++ sizeof(zend_class_entry*) * src->num_interfaces); ++ } ++ else ++ { ++ /* assert(dst->interfaces == NULL); */ ++ } ++ ++ /* Deep-copy the class properties, because they will be modified */ ++ ++#ifdef ZEND_ENGINE_2_4 ++ dst->default_properties_count = src->default_properties_count; ++ if (src->default_properties_count) { ++ dst->default_properties_table = (zval**) apc_php_malloc((sizeof(zval*) * src->default_properties_count) TSRMLS_CC); ++ for (i = 0; i < src->default_properties_count; i++) { ++ if (src->default_properties_table[i]) { ++ my_copy_zval_ptr(&dst->default_properties_table[i], (const zval**)&src->default_properties_table[i], ctxt TSRMLS_CC); ++ } else { ++ dst->default_properties_table[i] = NULL; ++ } ++ } ++ } else { ++ dst->default_properties_table = NULL; ++ } ++#else ++ my_copy_hashtable(&dst->default_properties, ++ &src->default_properties, ++ (ht_copy_fun_t) my_copy_zval_ptr, ++ 1, ++ ctxt); ++#endif ++ ++ /* For derived classes, we must also copy the function hashtable (although ++ * we can merely bitwise copy the functions it contains) */ ++ ++ my_copy_hashtable(&dst->function_table, ++ &src->function_table, ++ (ht_copy_fun_t) apc_copy_function_for_execution_ex, ++ 0, ++ ctxt); ++ ++ my_fixup_hashtable(&dst->function_table, (ht_fixup_fun_t)my_fixup_function_for_execution, src, dst); ++ ++ /* zend_do_inheritance merges properties_info. ++ * Need only shallow copying as it doesn't hold the pointers. ++ */ ++ my_copy_hashtable(&dst->properties_info, ++ &src->properties_info, ++ (ht_copy_fun_t) my_copy_property_info_for_execution, ++ 0, ++ ctxt); ++ ++#ifdef ZEND_ENGINE_2_2 ++ /* php5.2 introduced a scope attribute for property info */ ++ my_fixup_hashtable(&dst->properties_info, (ht_fixup_fun_t)my_fixup_property_info_for_execution, src, dst); ++#endif ++ ++ /* if inheritance results in a hash_del, it might result in ++ * a pefree() of the pointers here. Deep copying required. ++ */ ++ ++ my_copy_hashtable(&dst->constants_table, ++ &src->constants_table, ++ (ht_copy_fun_t) my_copy_zval_ptr, ++ 1, ++ ctxt); ++ ++#ifdef ZEND_ENGINE_2_4 ++ dst->default_static_members_count = src->default_static_members_count; ++ if (src->default_static_members_count) { ++ dst->default_static_members_table = (zval**) apc_php_malloc((sizeof(zval*) * src->default_static_members_count) TSRMLS_CC); ++ for (i = 0; i < src->default_static_members_count; i++) { ++ if (src->default_static_members_table[i]) { ++ my_copy_zval_ptr(&dst->default_static_members_table[i], (const zval**)&src->default_static_members_table[i], ctxt TSRMLS_CC); ++ } else { ++ dst->default_static_members_table[i] = NULL; ++ } ++ } ++ } else { ++ dst->default_static_members_table = NULL; ++ } ++ dst->static_members_table = dst->default_static_members_table; ++#else ++ my_copy_hashtable(&dst->default_static_members, ++ &src->default_static_members, ++ (ht_copy_fun_t) my_copy_zval_ptr, ++ 1, ++ ctxt); ++ ++ if(src->static_members != &(src->default_static_members)) ++ { ++ dst->static_members = my_copy_hashtable(NULL, ++ src->static_members, ++ (ht_copy_fun_t) my_copy_zval_ptr, ++ 1, ++ ctxt); ++ } ++ else ++ { ++ dst->static_members = &(dst->default_static_members); ++ } ++#endif ++ ++ return dst; ++} ++/* }}} */ ++ ++/* {{{ apc_free_class_entry_after_execution */ ++void apc_free_class_entry_after_execution(zend_class_entry* src TSRMLS_DC) ++{ ++ if(src->num_interfaces > 0 && src->interfaces) { ++ apc_php_free(src->interfaces TSRMLS_CC); ++ src->interfaces = NULL; ++ src->num_interfaces = 0; ++ } ++ /* my_destroy_hashtable() does not play nice with refcounts */ ++ ++#ifdef ZEND_ENGINE_2_4 ++ if (src->default_static_members_table) { ++ int i; ++ ++ for (i = 0; i < src->default_static_members_count; i++) { ++ zval_ptr_dtor(&src->default_static_members_table[i]); ++ } ++ efree(src->default_static_members_table); ++ src->default_static_members_table = NULL; ++ } ++ src->static_members_table = NULL; ++ if (src->default_properties_table) { ++ int i; ++ ++ for (i = 0; i < src->default_properties_count; i++) { ++ if (src->default_properties_table[i]) { ++ zval_ptr_dtor(&src->default_properties_table[i]); ++ } ++ } ++ efree(src->default_properties_table); ++ src->default_properties_table = NULL; ++ } ++#else ++ zend_hash_clean(&src->default_static_members); ++ if(src->static_members != &(src->default_static_members)) ++ { ++ zend_hash_destroy(src->static_members); ++ apc_php_free(src->static_members TSRMLS_CC); ++ src->static_members = NULL; ++ } ++ else ++ { ++ src->static_members = NULL; ++ } ++ ++ zend_hash_clean(&src->default_properties); ++#endif ++ zend_hash_clean(&src->constants_table); ++ ++ /* TODO: more cleanup */ ++} ++/* }}} */ ++ ++/* {{{ apc_file_halt_offset */ ++long apc_file_halt_offset(const char *filename TSRMLS_DC) ++{ ++ zend_constant *c; ++ char *name; ++ int len; ++ char haltoff[] = "__COMPILER_HALT_OFFSET__"; ++ long value = -1; ++ ++ zend_mangle_property_name(&name, &len, haltoff, sizeof(haltoff) - 1, filename, strlen(filename), 0); ++ ++ if (zend_hash_find(EG(zend_constants), name, len+1, (void **) &c) == SUCCESS) { ++ value = Z_LVAL(c->value); ++ } ++ ++ pefree(name, 0); ++ ++ return value; ++} ++/* }}} */ ++ ++/* {{{ apc_do_halt_compiler_register */ ++void apc_do_halt_compiler_register(const char *filename, long halt_offset TSRMLS_DC) ++{ ++ char *name; ++ char haltoff[] = "__COMPILER_HALT_OFFSET__"; ++ int len; ++ ++ if(halt_offset > 0) { ++ ++ zend_mangle_property_name(&name, &len, haltoff, sizeof(haltoff) - 1, ++ filename, strlen(filename), 0); ++ ++ zend_register_long_constant(name, len+1, halt_offset, CONST_CS, 0 TSRMLS_CC); ++ ++ pefree(name, 0); ++ } ++} ++/* }}} */ ++ ++ ++ ++/* {{{ my_fixup_function */ ++static void my_fixup_function(Bucket *p, zend_class_entry *src, zend_class_entry *dst) ++{ ++ zend_function* zf = p->pData; ++ ++ #define SET_IF_SAME_NAME(member) \ ++ do { \ ++ if(src->member && !strcmp(zf->common.function_name, src->member->common.function_name)) { \ ++ dst->member = zf; \ ++ } \ ++ } \ ++ while(0) ++ ++ if(zf->common.scope == src) ++ { ++ ++ /* Fixing up the default functions for objects here since ++ * we need to compare with the newly allocated functions ++ * ++ * caveat: a sub-class method can have the same name as the ++ * parent's constructor and create problems. ++ */ ++ ++ if(zf->common.fn_flags & ZEND_ACC_CTOR) dst->constructor = zf; ++ else if(zf->common.fn_flags & ZEND_ACC_DTOR) dst->destructor = zf; ++ else if(zf->common.fn_flags & ZEND_ACC_CLONE) dst->clone = zf; ++ else ++ { ++ SET_IF_SAME_NAME(__get); ++ SET_IF_SAME_NAME(__set); ++ SET_IF_SAME_NAME(__unset); ++ SET_IF_SAME_NAME(__isset); ++ SET_IF_SAME_NAME(__call); ++#ifdef ZEND_ENGINE_2_2 ++ SET_IF_SAME_NAME(__tostring); ++#endif ++#ifdef ZEND_ENGINE_2_3 ++ SET_IF_SAME_NAME(__callstatic); ++#endif ++ } ++ zf->common.scope = dst; ++ } ++ else ++ { ++ /* no other function should reach here */ ++ assert(0); ++ } ++ ++ #undef SET_IF_SAME_NAME ++} ++/* }}} */ ++ ++#ifdef ZEND_ENGINE_2_2 ++/* {{{ my_fixup_property_info */ ++static void my_fixup_property_info(Bucket *p, zend_class_entry *src, zend_class_entry *dst) ++{ ++ zend_property_info* property_info = (zend_property_info*)p->pData; ++ ++ if(property_info->ce == src) ++ { ++ property_info->ce = dst; ++ } ++ else ++ { ++ assert(0); /* should never happen */ ++ } ++} ++/* }}} */ ++#endif ++ ++/* {{{ my_fixup_hashtable */ ++static void my_fixup_hashtable(HashTable *ht, ht_fixup_fun_t fixup, zend_class_entry *src, zend_class_entry *dst) ++{ ++ Bucket *p; ++ uint i; ++ ++ for (i = 0; i < ht->nTableSize; i++) { ++ if(!ht->arBuckets) break; ++ p = ht->arBuckets[i]; ++ while (p != NULL) { ++ fixup(p, src, dst); ++ p = p->pNext; ++ } ++ } ++} ++/* }}} */ ++ ++ ++/* {{{ my_check_copy_function */ ++static int my_check_copy_function(Bucket* p, va_list args) ++{ ++ zend_class_entry* src = va_arg(args, zend_class_entry*); ++ zend_function* zf = (zend_function*)p->pData; ++ ++ return (zf->common.scope == src); ++} ++/* }}} */ ++ ++#ifndef ZEND_ENGINE_2_4 ++/* {{{ my_check_copy_default_property */ ++static int my_check_copy_default_property(Bucket* p, va_list args) ++{ ++ zend_class_entry* src = va_arg(args, zend_class_entry*); ++ zend_class_entry* parent = src->parent; ++ zval ** child_prop = (zval**)p->pData; ++ zval ** parent_prop = NULL; ++ ++ if (parent && ++ zend_hash_quick_find(&parent->default_properties, p->arKey, ++ p->nKeyLength, p->h, (void **) &parent_prop)==SUCCESS) { ++ ++ if((parent_prop && child_prop) && (*parent_prop) == (*child_prop)) ++ { ++ return 0; ++ } ++ } ++ ++ /* possibly not in the parent */ ++ return 1; ++} ++/* }}} */ ++#endif ++ ++/* {{{ my_check_copy_property_info */ ++static int my_check_copy_property_info(Bucket* p, va_list args) ++{ ++ zend_class_entry* src = va_arg(args, zend_class_entry*); ++ zend_class_entry* parent = src->parent; ++ zend_property_info* child_info = (zend_property_info*)p->pData; ++ zend_property_info* parent_info = NULL; ++ ++#ifdef ZEND_ENGINE_2_2 ++ /* so much easier */ ++ return (child_info->ce == src); ++#endif ++ ++ if (parent && ++ zend_hash_quick_find(&parent->properties_info, p->arKey, p->nKeyLength, ++ p->h, (void **) &parent_info)==SUCCESS) { ++ if(parent_info->flags & ZEND_ACC_PRIVATE) ++ { ++ return 1; ++ } ++ if((parent_info->flags & ZEND_ACC_PPP_MASK) != ++ (child_info->flags & ZEND_ACC_PPP_MASK)) ++ { ++ /* TODO: figure out whether ACC_CHANGED is more appropriate ++ * here */ ++ return 1; ++ } ++ return 0; ++ } ++ ++ /* property doesn't exist in parent, copy into cached child */ ++ return 1; ++} ++/* }}} */ ++ ++#ifndef ZEND_ENGINE_2_4 ++/* {{{ my_check_copy_static_member */ ++static int my_check_copy_static_member(Bucket* p, va_list args) ++{ ++ zend_class_entry* src = va_arg(args, zend_class_entry*); ++ HashTable * ht = va_arg(args, HashTable*); ++ zend_class_entry* parent = src->parent; ++ HashTable * parent_ht = NULL; ++ char * member_name; ++ char * class_name = NULL; ++ ++ zend_property_info *parent_info = NULL; ++ zend_property_info *child_info = NULL; ++ zval ** parent_prop = NULL; ++ zval ** child_prop = (zval**)(p->pData); ++ ++ if(!parent) { ++ return 1; ++ } ++ ++ /* these do not need free'ing */ ++#ifdef ZEND_ENGINE_2_2 ++ zend_unmangle_property_name(p->arKey, p->nKeyLength-1, &class_name, &member_name); ++#else ++ zend_unmangle_property_name(p->arKey, &class_name, &member_name); ++#endif ++ ++ /* please refer do_inherit_property_access_check in zend_compile.c ++ * to understand why we lookup in properties_info. ++ */ ++ if((zend_hash_find(&parent->properties_info, member_name, ++ strlen(member_name)+1, (void**)&parent_info) == SUCCESS) ++ && ++ (zend_hash_find(&src->properties_info, member_name, ++ strlen(member_name)+1, (void**)&child_info) == SUCCESS)) ++ { ++ if(ht == &(src->default_static_members)) ++ { ++ parent_ht = &parent->default_static_members; ++ } ++ else ++ { ++ parent_ht = parent->static_members; ++ } ++ ++ if(zend_hash_quick_find(parent_ht, p->arKey, ++ p->nKeyLength, p->h, (void**)&parent_prop) == SUCCESS) ++ { ++ /* they point to the same zval */ ++ if(*parent_prop == *child_prop) ++ { ++ return 0; ++ } ++ } ++ } ++ ++ return 1; ++} ++/* }}} */ ++#endif ++ ++/* {{{ my_check_copy_constant */ ++static int my_check_copy_constant(Bucket* p, va_list args) ++{ ++ zend_class_entry* src = va_arg(args, zend_class_entry*); ++ zend_class_entry* parent = src->parent; ++ zval ** child_const = (zval**)p->pData; ++ zval ** parent_const = NULL; ++ ++ if (parent && ++ zend_hash_quick_find(&parent->constants_table, p->arKey, ++ p->nKeyLength, p->h, (void **) &parent_const)==SUCCESS) { ++ ++ if((parent_const && child_const) && (*parent_const) == (*child_const)) ++ { ++ return 0; ++ } ++ } ++ ++ /* possibly not in the parent */ ++ return 1; ++} ++/* }}} */ ++ ++/* {{{ apc_register_optimizer(apc_optimize_function_t optimizer) ++ * register a optimizer callback function, returns the previous callback ++ */ ++apc_optimize_function_t apc_register_optimizer(apc_optimize_function_t optimizer TSRMLS_DC) { ++ apc_optimize_function_t old_optimizer = APCG(apc_optimize_function); ++ APCG(apc_optimize_function) = optimizer; ++ return old_optimizer; ++} ++/* }}} */ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_compile.h +@@ -0,0 +1,146 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | Arun C. Murthy | ++ | Gopal Vijayaraghavan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_compile.h 303388 2010-09-15 09:50:28Z dmitry $ */ ++ ++#ifndef APC_COMPILE_H ++#define APC_COMPILE_H ++ ++/* ++ * This module encapsulates most of the complexity involved in deep-copying ++ * the Zend compiler data structures. The routines are allocator-agnostic, so ++ * the same function can be used for copying to and from shared memory. ++ */ ++ ++#include "apc.h" ++#include "apc_php.h" ++#include "apc_main.h" ++ ++/* {{{ struct definition: apc_function_t */ ++typedef struct apc_function_t apc_function_t; ++struct apc_function_t { ++ char* name; /* the function name */ ++ int name_len; /* length of name */ ++ zend_function* function; /* the zend function data structure */ ++}; ++/* }}} */ ++ ++/* {{{ struct definition: apc_class_t */ ++typedef struct apc_class_t apc_class_t; ++struct apc_class_t { ++ char* name; /* the class name */ ++ int name_len; /* length of name */ ++ char* parent_name; /* the parent class name */ ++ zend_class_entry* class_entry; /* the zend class data structure */ ++}; ++/* }}} */ ++ ++/* {{{ struct definition: apc_opflags_t */ ++typedef struct apc_opflags_t apc_opflags_t; ++struct apc_opflags_t { ++ unsigned int has_jumps : 1; /* has jump offsets */ ++ unsigned int deep_copy : 1; /* needs deep copy */ ++ ++ /* autoglobal bits */ ++ unsigned int _POST : 1; ++ unsigned int _GET : 1; ++ unsigned int _COOKIE : 1; ++ unsigned int _SERVER : 1; ++ unsigned int _ENV : 1; ++ unsigned int _FILES : 1; ++ unsigned int _REQUEST : 1; ++ unsigned int _SESSION : 1; ++#ifdef ZEND_ENGINE_2_4 ++ unsigned int GLOBALS : 1; ++#endif ++ unsigned int unknown_global : 1; ++}; ++/* }}} */ ++ ++/* ++ * These are the top-level copy functions. ++ */ ++ ++extern zend_op_array* apc_copy_op_array(zend_op_array* dst, zend_op_array* src, apc_context_t* ctxt TSRMLS_DC); ++extern zend_class_entry* apc_copy_class_entry(zend_class_entry* dst, zend_class_entry* src, apc_context_t* ctxt TSRMLS_DC); ++extern apc_function_t* apc_copy_new_functions(int old_count, apc_context_t* ctxt TSRMLS_DC); ++extern apc_class_t* apc_copy_new_classes(zend_op_array* op_array, int old_count, apc_context_t* ctxt TSRMLS_DC); ++extern zval* apc_copy_zval(zval* dst, const zval* src, apc_context_t* ctxt TSRMLS_DC); ++ ++#if 0 ++/* ++ * Deallocation functions corresponding to the copy functions above. ++ */ ++ ++extern void apc_free_op_array(zend_op_array* src, apc_context_t* ctxt); ++extern void apc_free_functions(apc_function_t* src, apc_context_t* ctxt); ++extern void apc_free_classes(apc_class_t* src, apc_context_t* ctxt); ++extern void apc_free_zval(zval* src, apc_context_t* ctxt); ++#endif ++ ++/* ++ * These "copy-for-execution" functions must be called after retrieving an ++ * object from the shared cache. They do the minimal amount of work necessary ++ * to allow multiple processes to concurrently execute the same VM data ++ * structures. ++ */ ++ ++extern zend_op_array* apc_copy_op_array_for_execution(zend_op_array* dst, zend_op_array* src, apc_context_t* ctxt TSRMLS_DC); ++extern zend_function* apc_copy_function_for_execution(zend_function* src, apc_context_t* ctxt TSRMLS_DC); ++extern zend_class_entry* apc_copy_class_entry_for_execution(zend_class_entry* src, apc_context_t* ctxt TSRMLS_DC); ++ ++/* ++ * The "free-after-execution" function performs a cursory clean up of the class data ++ * This is required to minimize memory leak warnings and to ensure correct destructor ++ * ordering of some variables. ++ */ ++extern void apc_free_class_entry_after_execution(zend_class_entry* src TSRMLS_DC); ++ ++/* ++ * Optimization callback definition and registration function. ++ */ ++typedef zend_op_array* (*apc_optimize_function_t) (zend_op_array* TSRMLS_DC); ++extern apc_optimize_function_t apc_register_optimizer(apc_optimize_function_t optimizer TSRMLS_DC); ++ ++/* ++ * To handle __COMPILER_HALT_OFFSET__ ++ */ ++long apc_file_halt_offset(const char* filename TSRMLS_DC); ++void apc_do_halt_compiler_register(const char *filename, long halt_offset TSRMLS_DC); ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_debug.c +@@ -0,0 +1,70 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | Arun C. Murthy | ++ | Gopal Vijayaraghavan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++*/ ++ ++/* $Id: apc_debug.c 304107 2010-10-05 15:14:06Z kalle $ */ ++#include "apc.h" ++#include ++#include "zend.h" ++#include "zend_compile.h" ++ ++#if defined(__DEBUG_APC__) ++ ++/* keep track of vld_dump_oparray() signature */ ++typedef void (*vld_dump_f) (zend_op_array * TSRMLS_DC); ++ ++#endif ++ ++void dump(zend_op_array *op_array TSRMLS_DC) ++{ ++#if defined(__DEBUG_APC__) ++ vld_dump_f dump_op_array; ++ DL_HANDLE handle = NULL; ++ ++#ifdef PHP_WIN32 ++ handle = GetModuleHandle(NULL); ++ ++ if (!handle) { ++ apc_warning("unable to fetch current module handle." TSRMLS_CC); ++ } ++#endif ++ ++ dump_op_array = (vld_dump_f) DL_FETCH_SYMBOL(handle, "vld_dump_oparray"); ++ ++#ifdef PHP_WIN32 ++ DL_UNLOAD(handle); ++#endif ++ ++ if(dump_op_array) { ++ dump_op_array(op_array TSRMLS_CC); ++ ++ return; ++ } ++ ++ apc_warning("vld is not installed or something even worse." TSRMLS_CC); ++#endif ++} +--- /dev/null ++++ b/ext/apc/apc_debug.h +@@ -0,0 +1,29 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | Arun C. Murthy | ++ | Gopal Vijayaraghavan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++*/ ++ ++void dump(zend_op_array * TSRMLS_DC); +--- /dev/null ++++ b/ext/apc/apc_fcntl.c +@@ -0,0 +1,123 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: George Schlossnagle | ++ | Rasmus Lerdorf | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_fcntl.c 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#include "apc.h" ++ ++#ifdef APC_FCNTL_LOCKS ++ ++#include "apc_fcntl.h" ++#include ++#include ++ ++int apc_fcntl_create(const char* pathname TSRMLS_DC) ++{ ++ int fd; ++ if(pathname == NULL) { ++ char lock_path[] = "/tmp/.apc.XXXXXX"; ++ mktemp(lock_path); ++ fd = open(lock_path, O_RDWR|O_CREAT, 0666); ++ if(fd > 0 ) { ++ unlink(lock_path); ++ return fd; ++ } else { ++ apc_error("apc_fcntl_create: open(%s, O_RDWR|O_CREAT, 0666) failed:" TSRMLS_CC, lock_path); ++ return -1; ++ } ++ } ++ fd = open(pathname, O_RDWR|O_CREAT, 0666); ++ if(fd > 0 ) { ++ unlink(pathname); ++ return fd; ++ } ++ apc_error("apc_fcntl_create: open(%s, O_RDWR|O_CREAT, 0666) failed:" TSRMLS_CC, pathname); ++ return -1; ++} ++ ++void apc_fcntl_destroy(int fd) ++{ ++ close(fd); ++} ++ ++static int lock_reg(int fd, int cmd, int type, off_t offset, int whence, off_t len) ++{ ++ int ret; ++ struct flock lock; ++ ++ lock.l_type = type; ++ lock.l_start = offset; ++ lock.l_whence = whence; ++ lock.l_len = len; ++ lock.l_pid = 0; ++ ++ do { ret = fcntl(fd, cmd, &lock) ; } ++ while(ret < 0 && errno == EINTR); ++ return(ret); ++} ++ ++void apc_fcntl_lock(int fd TSRMLS_DC) ++{ ++ if(lock_reg(fd, F_SETLKW, F_WRLCK, 0, SEEK_SET, 0) < 0) { ++ apc_error("apc_fcntl_lock failed:" TSRMLS_CC); ++ } ++} ++ ++void apc_fcntl_rdlock(int fd TSRMLS_DC) ++{ ++ if(lock_reg(fd, F_SETLKW, F_RDLCK, 0, SEEK_SET, 0) < 0) { ++ apc_error("apc_fcntl_rdlock failed:" TSRMLS_CC); ++ } ++} ++ ++zend_bool apc_fcntl_nonblocking_lock(int fd TSRMLS_DC) ++{ ++ if(lock_reg(fd, F_SETLK, F_WRLCK, 0, SEEK_SET, 0) < 0) { ++ if(errno==EACCES||errno==EAGAIN) return 0; ++ else apc_error("apc_fcntl_lock failed:" TSRMLS_CC); ++ } ++ return 1; ++} ++ ++void apc_fcntl_unlock(int fd TSRMLS_DC) ++{ ++ if(lock_reg(fd, F_SETLKW, F_UNLCK, 0, SEEK_SET, 0) < 0) { ++ apc_error("apc_fcntl_unlock failed:" TSRMLS_CC); ++ } ++} ++ ++#endif /* APC_FCNTL_LOCKS */ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_fcntl.h +@@ -0,0 +1,50 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt. | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: George Schlossnagle | ++ | Rasmus Lerdorf | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_fcntl.h 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#ifndef APC_FCNTL_H ++#define APC_FCNTL_H ++ ++ ++extern int apc_fcntl_create(const char* pathname TSRMLS_DC); ++extern void apc_fcntl_destroy(int fd); ++extern void apc_fcntl_lock(int fd TSRMLS_DC); ++extern void apc_fcntl_rdlock(int fd TSRMLS_DC); ++extern void apc_fcntl_unlock(int fd TSRMLS_DC); ++extern unsigned char apc_fcntl_nonblocking_lock(int fd TSRMLS_DC); ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_fcntl_win32.c +@@ -0,0 +1,117 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: George Schlossnagle | ++ | Edin Kadribasic | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_fcntl_win32.c 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#include "apc.h" ++#include "apc_fcntl.h" ++#include ++#include ++#include ++#include ++#include ++#include ++ ++int apc_fcntl_create(const char* pathname TSRMLS_DC) ++{ ++ char *lock_file = emalloc(MAXPATHLEN); ++ HANDLE fd; ++ DWORD tmplen; ++ static int i=0; ++ ++ tmplen = GetTempPath(MAXPATHLEN, lock_file); ++ if (!tmplen) { ++ efree(lock_file); ++ return -1; ++ } ++ ++ snprintf(lock_file + tmplen, MAXPATHLEN - tmplen - 1, "apc.lock.%d", i++); ++ ++ fd = CreateFile(lock_file, ++ GENERIC_READ | GENERIC_WRITE, ++ FILE_SHARE_READ | FILE_SHARE_WRITE, ++ NULL, ++ OPEN_ALWAYS, ++ FILE_ATTRIBUTE_NORMAL, ++ NULL); ++ ++ ++ if (fd == INVALID_HANDLE_VALUE) { ++ apc_error("apc_fcntl_create: could not open %s" TSRMLS_CC, lock_file); ++ efree(lock_file); ++ return -1; ++ } ++ ++ efree(lock_file); ++ return (int)fd; ++} ++ ++void apc_fcntl_destroy(int fd) ++{ ++ CloseHandle((HANDLE)fd); ++} ++ ++void apc_fcntl_lock(int fd TSRMLS_DC) ++{ ++ OVERLAPPED offset = {0, 0, 0, 0, NULL}; ++ ++ if (!LockFileEx((HANDLE)fd, LOCKFILE_EXCLUSIVE_LOCK, 0, 1, 0, &offset)) { ++ apc_error("apc_fcntl_lock failed errno:%d" TSRMLS_CC, GetLastError()); ++ } ++} ++ ++void apc_fcntl_rdlock(int fd TSRMLS_DC) ++{ ++ OVERLAPPED offset = {0, 0, 0, 0, NULL}; ++ ++ if (!LockFileEx((HANDLE)fd, 0, 0, 1, 0, &offset)) { ++ apc_error("apc_fcntl_rdlock failed errno:%d" TSRMLS_CC, GetLastError()); ++ } ++} ++ ++void apc_fcntl_unlock(int fd TSRMLS_DC) ++{ ++ OVERLAPPED offset = {0, 0, 0, 0, NULL}; ++ ++ if (!UnlockFileEx((HANDLE)fd, 0, 1, 0, &offset)) { ++ DWORD error_code = GetLastError(); ++ /* Ignore already unlocked error */ ++ if (error_code != ERROR_NOT_LOCKED) { ++ apc_error("apc_fcntl_unlock failed errno:%d" TSRMLS_CC, error_code); ++ } ++ } ++} ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_globals.h +@@ -0,0 +1,148 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt. | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | George Schlossnagle | ++ | Rasmus Lerdorf | ++ | Arun C. Murthy | ++ | Gopal Vijayaraghavan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_globals.h 301232 2010-07-13 12:23:35Z gopalv $ */ ++ ++#ifndef APC_GLOBALS_H ++#define APC_GLOBALS_H ++ ++#include "apc_cache.h" ++#include "apc_stack.h" ++#include "apc_php.h" ++ ++/* {{{ struct apc_rfc1867_data */ ++ ++typedef struct _apc_rfc1867_data apc_rfc1867_data; ++ ++struct _apc_rfc1867_data { ++ char tracking_key[64]; ++ int key_length; ++ size_t content_length; ++ char filename[128]; ++ char name[64]; ++ char *temp_filename; ++ int cancel_upload; ++ double start_time; ++ size_t bytes_processed; ++ size_t prev_bytes_processed; ++ int update_freq; ++ double rate; ++ int started; ++}; ++/* }}} */ ++ ++ZEND_BEGIN_MODULE_GLOBALS(apc) ++ /* configuration parameters */ ++ zend_bool enabled; /* if true, apc is enabled (defaults to true) */ ++ long shm_segments; /* number of shared memory segments to use */ ++ long shm_size; /* size of each shared memory segment (in MB) */ ++ long num_files_hint; /* parameter to apc_cache_create */ ++ long user_entries_hint; ++ long gc_ttl; /* parameter to apc_cache_create */ ++ long ttl; /* parameter to apc_cache_create */ ++ long user_ttl; ++#if APC_MMAP ++ char *mmap_file_mask; /* mktemp-style file-mask to pass to mmap */ ++#endif ++ char** filters; /* array of regex filters that prevent caching */ ++ void* compiled_filters; /* compiled regex filters */ ++ ++ /* module variables */ ++ zend_bool initialized; /* true if module was initialized */ ++ apc_stack_t* cache_stack; /* the stack of cached executable code */ ++ zend_bool cache_by_default; /* true if files should be cached unless filtered out */ ++ /* false if files should only be cached if filtered in */ ++ long file_update_protection; /* Age in seconds before a file is eligible to be cached - 0 to disable */ ++ zend_bool enable_cli; /* Flag to override turning APC off for CLI */ ++ long max_file_size; /* Maximum size of file, in bytes that APC will be allowed to cache */ ++ zend_bool fpstat; /* true if fullpath includes should be stat'ed */ ++ zend_bool canonicalize; /* true if relative paths should be canonicalized in no-stat mode */ ++ zend_bool stat_ctime; /* true if ctime in addition to mtime should be checked */ ++ zend_bool write_lock; /* true for a global write lock */ ++ zend_bool slam_defense; /* true for user cache slam defense */ ++ zend_bool report_autofilter; /* true for auto-filter warnings */ ++ zend_bool include_once; /* Override the ZEND_INCLUDE_OR_EVAL opcode handler to avoid pointless fopen()s [still experimental] */ ++ apc_optimize_function_t apc_optimize_function; /* optimizer function callback */ ++#ifdef MULTIPART_EVENT_FORMDATA ++ zend_bool rfc1867; /* Flag to enable rfc1867 handler */ ++ char* rfc1867_prefix; /* Key prefix */ ++ char* rfc1867_name; /* Name of hidden field to activate upload progress/key suffix */ ++ double rfc1867_freq; /* Update frequency as percentage or bytes */ ++ long rfc1867_ttl; /* TTL for rfc1867 entries */ ++ apc_rfc1867_data rfc1867_data;/* Per-request data */ ++#endif ++ HashTable copied_zvals; /* my_copy recursion detection list */ ++ zend_bool force_file_update; /* force files to be updated during apc_compile_file */ ++ char canon_path[MAXPATHLEN]; /* canonical path for key data */ ++#ifdef APC_FILEHITS ++ zval *filehits; /* Files that came from the cache for this request */ ++#endif ++ zend_bool coredump_unmap; /* Trap signals that coredump and unmap shared memory */ ++ apc_cache_t *current_cache; /* current cache being modified/read */ ++ char *preload_path; ++ zend_bool file_md5; /* record md5 hash of files */ ++ void *apc_bd_alloc_ptr; /* bindump alloc() ptr */ ++ void *apc_bd_alloc_ubptr; /* bindump alloc() upper bound ptr */ ++ HashTable apc_bd_alloc_list; /* bindump alloc() ptr list */ ++ zend_bool use_request_time; /* use the SAPI request start time for TTL */ ++ zend_bool lazy_functions; /* enable/disable lazy function loading */ ++ HashTable *lazy_function_table; /* lazy function entry table */ ++ zend_bool lazy_classes; /* enable/disable lazy class loading */ ++ HashTable *lazy_class_table; /* lazy class entry table */ ++#ifdef ZEND_ENGINE_2_4 ++ long shm_strings_buffer; ++#endif ++ZEND_END_MODULE_GLOBALS(apc) ++ ++/* (the following declaration is defined in php_apc.c) */ ++ZEND_EXTERN_MODULE_GLOBALS(apc) ++ ++#ifdef ZTS ++# define APCG(v) TSRMG(apc_globals_id, zend_apc_globals *, v) ++#else ++# define APCG(v) (apc_globals.v) ++#endif ++ ++/* True globals */ ++extern apc_cache_t* apc_cache; /* the global compiler cache */ ++extern apc_cache_t* apc_user_cache; /* the global user content cache */ ++extern void* apc_compiled_filters; /* compiled filters */ ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc.h +@@ -0,0 +1,124 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | George Schlossnagle | ++ | Rasmus Lerdorf | ++ | Arun C. Murthy | ++ | Gopal Vijayaraghavan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc.h 304310 2010-10-11 12:19:24Z gopalv $ */ ++ ++#ifndef APC_H ++#define APC_H ++ ++/* ++ * This module defines utilities and helper functions used elsewhere in APC. ++ */ ++ ++/* Commonly needed C library headers. */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* UNIX headers (needed for struct stat) */ ++#include ++#include ++#ifndef PHP_WIN32 ++#include ++#endif ++ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++#include "php.h" ++#include "main/php_streams.h" ++ ++/* typedefs for extensible memory allocators */ ++typedef void* (*apc_malloc_t)(size_t TSRMLS_DC); ++typedef void (*apc_free_t) (void * TSRMLS_DC); ++ ++/* wrappers for memory allocation routines */ ++extern void* apc_emalloc(size_t n TSRMLS_DC); ++extern void* apc_erealloc(void* p, size_t n TSRMLS_DC); ++extern void apc_efree(void* p TSRMLS_DC); ++extern char* apc_estrdup(const char* s TSRMLS_DC); ++extern void* apc_xstrdup(const char* s, apc_malloc_t f TSRMLS_DC); ++extern void* apc_xmemcpy(const void* p, size_t n, apc_malloc_t f TSRMLS_DC); ++ ++/* console display functions */ ++extern void apc_error(const char *format TSRMLS_DC, ...); ++extern void apc_warning(const char *format TSRMLS_DC, ...); ++extern void apc_notice(const char *format TSRMLS_DC, ...); ++extern void apc_debug(const char *format TSRMLS_DC, ...); ++ ++/* string and text manipulation */ ++extern char* apc_append(const char* s, const char* t TSRMLS_DC); ++extern char* apc_substr(const char* s, int start, int length TSRMLS_DC); ++extern char** apc_tokenize(const char* s, char delim TSRMLS_DC); ++ ++/* filesystem functions */ ++ ++typedef struct apc_fileinfo_t ++{ ++ char *fullpath; ++ char path_buf[MAXPATHLEN]; ++ php_stream_statbuf st_buf; ++} apc_fileinfo_t; ++ ++extern int apc_search_paths(const char* filename, const char* path, apc_fileinfo_t* fileinfo TSRMLS_DC); ++ ++/* regular expression wrapper functions */ ++extern void* apc_regex_compile_array(char* patterns[] TSRMLS_DC); ++extern void apc_regex_destroy_array(void* p TSRMLS_DC); ++extern int apc_regex_match_array(void* p, const char* input); ++ ++/* apc_crc32: returns the CRC-32 checksum of the first len bytes in buf */ ++extern unsigned int apc_crc32(const char* buf, int len); ++ ++/* apc_flip_hash flips keys and values for faster searching */ ++extern HashTable* apc_flip_hash(HashTable *hash); ++ ++#define APC_NEGATIVE_MATCH 1 ++#define APC_POSITIVE_MATCH 2 ++ ++#define apc_time() \ ++ (APCG(use_request_time) ? sapi_get_request_time(TSRMLS_C) : time(0)); ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_iterator.c +@@ -0,0 +1,710 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Brian Shire | ++ +----------------------------------------------------------------------+ ++ ++ */ ++ ++/* $Id: apc_iterator.c 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#include "php_apc.h" ++#include "apc_iterator.h" ++#include "apc_cache.h" ++#include "apc_zend.h" ++ ++#include "ext/standard/md5.h" ++ ++#include "zend_interfaces.h" ++ ++zend_class_entry *apc_iterator_ce; ++zend_object_handlers apc_iterator_object_handlers; ++ ++ ++/* {{{ apc_iterator_item */ ++static apc_iterator_item_t* apc_iterator_item_ctor(apc_iterator_t *iterator, slot_t **slot_pp TSRMLS_DC) { ++ zval *zvalue; ++ char md5str[33]; ++ slot_t *slot = *slot_pp; ++ apc_context_t ctxt = {0, }; ++ apc_iterator_item_t *item = ecalloc(1, sizeof(apc_iterator_item_t)); ++ ++ if (slot->key.type == APC_CACHE_KEY_FILE) { ++ /* keys should be unique and with stat=1 we could have multiple files with the same name, so use ' ' instead */ ++#ifdef PHP_WIN32 ++ item->key_len = spprintf(&item->key, 0, "%I64d %I64d", slot->key.data.file.device, slot->key.data.file.inode); ++#else ++ item->key_len = spprintf(&item->key, 0, "%ld %ld", (ulong)slot->key.data.file.device, (ulong)slot->key.data.file.inode); ++#endif ++ item->filename_key = estrdup(slot->value->data.file.filename); ++ } else if (slot->key.type == APC_CACHE_KEY_USER) { ++ item->key = estrndup((char*)slot->key.data.user.identifier, slot->key.data.user.identifier_len); ++ item->key_len = slot->key.data.user.identifier_len; ++ item->filename_key = item->key; ++ } else if (slot->key.type == APC_CACHE_KEY_FPFILE) { ++ item->key = estrndup((char*)slot->key.data.fpfile.fullpath, slot->key.data.fpfile.fullpath_len); ++ item->key_len = slot->key.data.fpfile.fullpath_len; ++ item->filename_key = item->key; ++ } else { ++ apc_error("Internal error, invalid entry type." TSRMLS_CC); ++ } ++ ++ ALLOC_INIT_ZVAL(item->value); ++ array_init(item->value); ++ ++ if (APC_ITER_TYPE & iterator->format) { ++ if(slot->value->type == APC_CACHE_ENTRY_FILE) { ++ add_assoc_string(item->value, "type", "file", 1); ++ } else if(slot->value->type == APC_CACHE_ENTRY_USER) { ++ add_assoc_string(item->value, "type", "user", 1); ++ } ++ } ++ if (APC_ITER_FILENAME & iterator->format) { ++ if(slot->value->type == APC_CACHE_ENTRY_FILE) { ++ if (slot->key.type == APC_CACHE_KEY_FILE) { ++ add_assoc_string(item->value, "filename", slot->value->data.file.filename, 1); ++ } else { /* APC_CACHE_FPFILE */ ++ add_assoc_string(item->value, "filename", (char*)slot->key.data.fpfile.fullpath, 1); ++ } ++ } ++ } ++ if (APC_ITER_DEVICE & iterator->format) { ++ if(slot->key.type == APC_CACHE_KEY_FILE) { ++#ifdef PHP_WIN32 ++ char buf[20]; ++ sprintf(buf, "%I64d", slot->key.data.file.device); ++ add_assoc_string(item->value, "device", buf, 1); ++#else ++ add_assoc_long(item->value, "device", slot->key.data.file.device); ++#endif ++ } ++ } ++ if (APC_ITER_INODE & iterator->format) { ++ if(slot->key.type == APC_CACHE_KEY_FILE) { ++#ifdef PHP_WIN32 ++ char buf[20]; ++ sprintf(buf, "%I64d", slot->key.data.file.device); ++ add_assoc_string(item->value, "device", buf, 1); ++#else ++ add_assoc_long(item->value, "inode", slot->key.data.file.inode); ++#endif ++ } ++ } ++ if (APC_ITER_KEY & iterator->format) { ++ add_assoc_stringl(item->value, "key", item->key, (item->key_len - 1), 1); ++ } ++ if (APC_ITER_VALUE & iterator->format) { ++ if(slot->value->type == APC_CACHE_ENTRY_USER) { ++ ++ ctxt.pool = apc_pool_create(APC_UNPOOL, apc_php_malloc, apc_php_free, NULL, NULL TSRMLS_CC); ++ ctxt.copy = APC_COPY_OUT_USER; ++ ++ MAKE_STD_ZVAL(zvalue); ++ apc_cache_fetch_zval(zvalue, slot->value->data.user.val, &ctxt TSRMLS_CC); ++ apc_pool_destroy(ctxt.pool TSRMLS_CC); ++ add_assoc_zval(item->value, "value", zvalue); ++ } ++ } ++ if (APC_ITER_MD5 & iterator->format) { ++ if(slot->value->type == APC_CACHE_ENTRY_FILE) { ++ if(slot->key.md5) { ++ make_digest(md5str, slot->key.md5); ++ add_assoc_string(item->value, "md5", md5str, 1); ++ } ++ } ++ } ++ if (APC_ITER_NUM_HITS & iterator->format) { ++ add_assoc_long(item->value, "num_hits", slot->num_hits); ++ } ++ if (APC_ITER_MTIME & iterator->format) { ++ add_assoc_long(item->value, "mtime", slot->key.mtime); ++ } ++ if (APC_ITER_CTIME & iterator->format) { ++ add_assoc_long(item->value, "creation_time", slot->creation_time); ++ } ++ if (APC_ITER_DTIME & iterator->format) { ++ add_assoc_long(item->value, "deletion_time", slot->deletion_time); ++ } ++ if (APC_ITER_ATIME & iterator->format) { ++ add_assoc_long(item->value, "access_time", slot->access_time); ++ } ++ if (APC_ITER_REFCOUNT & iterator->format) { ++ add_assoc_long(item->value, "ref_count", slot->value->ref_count); ++ } ++ if (APC_ITER_MEM_SIZE & iterator->format) { ++ add_assoc_long(item->value, "mem_size", slot->value->mem_size); ++ } ++ if (APC_ITER_TTL & iterator->format) { ++ if(slot->value->type == APC_CACHE_ENTRY_USER) { ++ add_assoc_long(item->value, "ttl", slot->value->data.user.ttl); ++ } ++ } ++ ++ return item; ++} ++/* }}} */ ++ ++/* {{{ apc_iterator_clone */ ++static zend_object_value apc_iterator_clone(zval *zobject TSRMLS_DC) { ++ zend_object_value value = {0}; ++ apc_error("APCIterator object cannot be cloned." TSRMLS_CC); ++ return value; ++} ++/* }}} */ ++ ++/* {{{ apc_iterator_item_dtor */ ++static void apc_iterator_item_dtor(apc_iterator_item_t *item) { ++ if (item->filename_key && item->filename_key != item->key) { ++ efree(item->filename_key); ++ } ++ if (item->key) { ++ efree(item->key); ++ } ++ if (item->value) { ++ zval_ptr_dtor(&item->value); ++ } ++ efree(item); ++} ++/* }}} */ ++ ++/* {{{ apc_iterator_destroy */ ++static void apc_iterator_destroy(void *object, zend_object_handle handle TSRMLS_DC) { ++ apc_iterator_t *iterator = (apc_iterator_t*)object; ++ ++ if (iterator->initialized == 0) { ++ return; ++ } ++ ++ while (apc_stack_size(iterator->stack) > 0) { ++ apc_iterator_item_dtor(apc_stack_pop(iterator->stack)); ++ } ++ if (iterator->regex) { ++ efree(iterator->regex); ++ } ++ if (iterator->search_hash) { ++ zend_hash_destroy(iterator->search_hash); ++ efree(iterator->search_hash); ++ } ++ iterator->initialized = 0; ++ ++} ++/* }}} */ ++ ++/* {{{ acp_iterator_free */ ++static void apc_iterator_free(void *object TSRMLS_DC) { ++ zend_object_std_dtor(object TSRMLS_CC); ++ efree(object); ++} ++/* }}} */ ++ ++/* {{{ apc_iterator_create */ ++static zend_object_value apc_iterator_create(zend_class_entry *ce TSRMLS_DC) { ++ zend_object_value retval; ++ apc_iterator_t *iterator; ++ ++ iterator = emalloc(sizeof(apc_iterator_t)); ++ iterator->obj.ce = ce; ++ ALLOC_HASHTABLE(iterator->obj.properties); ++ zend_hash_init(iterator->obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0); ++ iterator->obj.guards = NULL; ++ iterator->initialized = 0; ++ retval.handle = zend_objects_store_put(iterator, apc_iterator_destroy, apc_iterator_free, NULL TSRMLS_CC); ++ retval.handlers = &apc_iterator_object_handlers; ++ ++ return retval; ++} ++/* }}} */ ++ ++/* {{{ apc_iterator_search_match ++ * Verify if the key matches oru search parameters ++ */ ++static int apc_iterator_search_match(apc_iterator_t *iterator, slot_t **slot) { ++ char *key; ++ int key_len; ++ char *fname_key = NULL; ++ int fname_key_len; ++ int rval = 1; ++ ++ if ((*slot)->key.type == APC_CACHE_KEY_FILE) { ++ key = estrdup((*slot)->value->data.file.filename); ++ key_len = strlen(key); ++ fname_key_len = spprintf(&fname_key, 0, "%ld %ld", (*slot)->key.data.file.device, (*slot)->key.data.file.inode); ++ } else if ((*slot)->key.type == APC_CACHE_KEY_USER) { ++ key = (char*)(*slot)->key.data.user.identifier; ++ key_len = (*slot)->key.data.user.identifier_len; ++ } else if ((*slot)->key.type == APC_CACHE_KEY_FPFILE) { ++ key = (char*)(*slot)->key.data.fpfile.fullpath; ++ key_len = (*slot)->key.data.fpfile.fullpath_len; ++ } ++ ++#ifdef ITERATOR_PCRE ++ if (iterator->regex) { ++ rval = (pcre_exec(iterator->re, NULL, key, strlen(key), 0, 0, NULL, 0) >= 0); ++ } ++#endif ++ ++ if (iterator->search_hash) { ++ rval = zend_hash_exists(iterator->search_hash, key, key_len); ++ if (!rval && fname_key) { ++ rval = zend_hash_exists(iterator->search_hash, fname_key, fname_key_len+1); ++ } ++ } ++ ++ return rval; ++} ++/* }}} */ ++ ++/* {{{ apc_iterator_fetch_active */ ++static int apc_iterator_fetch_active(apc_iterator_t *iterator TSRMLS_DC) { ++ int count=0; ++ slot_t **slot; ++ apc_iterator_item_t *item; ++ ++ while (apc_stack_size(iterator->stack) > 0) { ++ apc_iterator_item_dtor(apc_stack_pop(iterator->stack)); ++ } ++ ++ CACHE_LOCK(iterator->cache); ++ while(count <= iterator->chunk_size && iterator->slot_idx < iterator->cache->num_slots) { ++ slot = &iterator->cache->slots[iterator->slot_idx]; ++ while(*slot) { ++ if (apc_iterator_search_match(iterator, slot)) { ++ count++; ++ item = apc_iterator_item_ctor(iterator, slot TSRMLS_CC); ++ if (item) { ++ apc_stack_push(iterator->stack, item TSRMLS_CC); ++ } ++ } ++ slot = &(*slot)->next; ++ } ++ iterator->slot_idx++; ++ } ++ CACHE_UNLOCK(iterator->cache); ++ iterator->stack_idx = 0; ++ return count; ++} ++/* }}} */ ++ ++/* {{{ apc_iterator_fetch_deleted */ ++static int apc_iterator_fetch_deleted(apc_iterator_t *iterator TSRMLS_DC) { ++ int count=0; ++ slot_t **slot; ++ apc_iterator_item_t *item; ++ ++ CACHE_LOCK(iterator->cache); ++ slot = &iterator->cache->header->deleted_list; ++ while ((*slot) && count <= iterator->slot_idx) { ++ count++; ++ slot = &(*slot)->next; ++ } ++ count = 0; ++ while ((*slot) && count < iterator->chunk_size) { ++ if (apc_iterator_search_match(iterator, slot)) { ++ count++; ++ item = apc_iterator_item_ctor(iterator, slot TSRMLS_CC); ++ if (item) { ++ apc_stack_push(iterator->stack, item TSRMLS_CC); ++ } ++ } ++ slot = &(*slot)->next; ++ } ++ CACHE_UNLOCK(iterator->cache); ++ iterator->slot_idx += count; ++ iterator->stack_idx = 0; ++ return count; ++} ++/* }}} */ ++ ++/* {{{ apc_iterator_totals */ ++static void apc_iterator_totals(apc_iterator_t *iterator TSRMLS_DC) { ++ slot_t **slot; ++ int i; ++ ++ CACHE_LOCK(iterator->cache); ++ for (i=0; i < iterator->cache->num_slots; i++) { ++ slot = &iterator->cache->slots[i]; ++ while((*slot)) { ++ if (apc_iterator_search_match(iterator, slot)) { ++ iterator->size += (*slot)->value->mem_size; ++ iterator->hits += (*slot)->num_hits; ++ iterator->count++; ++ } ++ slot = &(*slot)->next; ++ } ++ } ++ CACHE_UNLOCK(iterator->cache); ++ iterator->totals_flag = 1; ++} ++/* }}} */ ++ ++/* {{{ proto object APCIterator::__costruct(string cache [, mixed search [, long format [, long chunk_size [, long list ]]]]) */ ++PHP_METHOD(apc_iterator, __construct) { ++ zval *object = getThis(); ++ apc_iterator_t *iterator = (apc_iterator_t*)zend_object_store_get_object(object TSRMLS_CC); ++ char *cachetype; ++ int cachetype_len; ++ long format = APC_ITER_ALL; ++ long chunk_size=0; ++ zval *search = NULL; ++ long list = APC_LIST_ACTIVE; ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|zlll", &cachetype, &cachetype_len, &search, &format, &chunk_size, &list) == FAILURE) { ++ return; ++ } ++ ++ if (!APCG(enabled)) { ++ apc_error("APC must be enabled to use APCIterator." TSRMLS_CC); ++ } ++ ++ if (chunk_size < 0) { ++ apc_error("APCIterator chunk size must be 0 or greater." TSRMLS_CC); ++ return; ++ } ++ ++ if (format > APC_ITER_ALL) { ++ apc_error("APCIterator format is invalid." TSRMLS_CC); ++ return; ++ } ++ ++ if (list == APC_LIST_ACTIVE) { ++ iterator->fetch = apc_iterator_fetch_active; ++ } else if (list == APC_LIST_DELETED) { ++ iterator->fetch = apc_iterator_fetch_deleted; ++ } else { ++ apc_warning("APCIterator invalid list type." TSRMLS_CC); ++ return; ++ } ++ ++ if(!strcasecmp(cachetype,"user")) { ++ iterator->cache = apc_user_cache; ++ } else { ++ iterator->cache = apc_cache; ++ } ++ ++ iterator->slot_idx = 0; ++ iterator->stack_idx = 0; ++ iterator->key_idx = 0; ++ iterator->chunk_size = chunk_size == 0 ? APC_DEFAULT_CHUNK_SIZE : chunk_size; ++ iterator->stack = apc_stack_create(chunk_size TSRMLS_CC); ++ iterator->format = format; ++ iterator->totals_flag = 0; ++ iterator->count = 0; ++ iterator->size = 0; ++ iterator->hits = 0; ++ iterator->regex = NULL; ++ iterator->regex_len = 0; ++ iterator->search_hash = NULL; ++ if (search && Z_TYPE_P(search) == IS_STRING && Z_STRLEN_P(search)) { ++#ifdef ITERATOR_PCRE ++ iterator->regex = estrndup(Z_STRVAL_P(search), Z_STRLEN_P(search)); ++ iterator->regex_len = Z_STRLEN_P(search); ++ iterator->re = pcre_get_compiled_regex(Z_STRVAL_P(search), NULL, NULL TSRMLS_CC); ++ ++ if(!iterator->re) { ++ apc_error("Could not compile regular expression: %s" TSRMLS_CC, Z_STRVAL_P(search)); ++ } ++#else ++ apc_error("Regular expressions support is not enabled, please enable PCRE for APCIterator regex support" TSRMLS_CC); ++#endif ++ } else if (search && Z_TYPE_P(search) == IS_ARRAY) { ++ Z_ADDREF_P(search); ++ iterator->search_hash = apc_flip_hash(Z_ARRVAL_P(search)); ++ } ++ iterator->initialized = 1; ++} ++/* }}} */ ++ ++/* {{{ proto APCIterator::rewind() */ ++PHP_METHOD(apc_iterator, rewind) { ++ apc_iterator_t *iterator = (apc_iterator_t*)zend_object_store_get_object(getThis() TSRMLS_CC); ++ ++ if (zend_parse_parameters_none() == FAILURE) { ++ return; ++ } ++ ++ if (iterator->initialized == 0) { ++ RETURN_FALSE; ++ } ++ ++ iterator->slot_idx = 0; ++ iterator->stack_idx = 0; ++ iterator->key_idx = 0; ++ iterator->fetch(iterator TSRMLS_CC); ++} ++/* }}} */ ++ ++/* {{{ proto boolean APCIterator::valid() */ ++PHP_METHOD(apc_iterator, valid) { ++ apc_iterator_t *iterator = (apc_iterator_t*)zend_object_store_get_object(getThis() TSRMLS_CC); ++ ++ if (zend_parse_parameters_none() == FAILURE) { ++ return; ++ } ++ ++ if (iterator->initialized == 0) { ++ RETURN_FALSE; ++ } ++ ++ if (apc_stack_size(iterator->stack) == iterator->stack_idx) { ++ iterator->fetch(iterator TSRMLS_CC); ++ } ++ ++ RETURN_BOOL(apc_stack_size(iterator->stack) == 0 ? 0 : 1); ++} ++/* }}} */ ++ ++/* {{{ proto mixed APCIterator::current() */ ++PHP_METHOD(apc_iterator, current) { ++ apc_iterator_item_t *item; ++ apc_iterator_t *iterator = (apc_iterator_t*)zend_object_store_get_object(getThis() TSRMLS_CC); ++ ++ if (zend_parse_parameters_none() == FAILURE) { ++ return; ++ } ++ ++ if (iterator->initialized == 0) { ++ RETURN_FALSE; ++ } ++ ++ if (apc_stack_size(iterator->stack) == iterator->stack_idx) { ++ if (iterator->fetch(iterator TSRMLS_CC) == 0) { ++ RETURN_FALSE; ++ } ++ } ++ ++ item = apc_stack_get(iterator->stack, iterator->stack_idx); ++ RETURN_ZVAL(item->value, 1, 0); ++} ++/* }}} */ ++ ++/* {{{ proto string APCIterator::key() */ ++PHP_METHOD(apc_iterator, key) { ++ apc_iterator_item_t *item; ++ apc_iterator_t *iterator = (apc_iterator_t*)zend_object_store_get_object(getThis() TSRMLS_CC); ++ ++ if (zend_parse_parameters_none() == FAILURE) { ++ return; ++ } ++ ++ if (iterator->initialized == 0 || apc_stack_size(iterator->stack) == 0) { ++ RETURN_FALSE; ++ } ++ ++ if (apc_stack_size(iterator->stack) == iterator->stack_idx) { ++ if (iterator->fetch(iterator TSRMLS_CC) == 0) { ++ RETURN_FALSE; ++ } ++ } ++ ++ item = apc_stack_get(iterator->stack, iterator->stack_idx); ++ ++ if (item->key) { ++ RETURN_STRINGL(item->key, (item->key_len-1), 1); ++ } else { ++ RETURN_LONG(iterator->key_idx); ++ } ++} ++/* }}} */ ++ ++/* {{{ proto APCIterator::next() */ ++PHP_METHOD(apc_iterator, next) { ++ apc_iterator_t *iterator = (apc_iterator_t*)zend_object_store_get_object(getThis() TSRMLS_CC); ++ ++ if (zend_parse_parameters_none() == FAILURE) { ++ return; ++ } ++ ++ if (iterator->initialized == 0 || apc_stack_size(iterator->stack) == 0) { ++ RETURN_FALSE; ++ } ++ ++ iterator->stack_idx++; ++ iterator->key_idx++; ++ ++ RETURN_TRUE; ++} ++/* }}} */ ++ ++/* {{{ proto long APCIterator::getTotalHits() */ ++PHP_METHOD(apc_iterator, getTotalHits) { ++ apc_iterator_t *iterator = (apc_iterator_t*)zend_object_store_get_object(getThis() TSRMLS_CC); ++ ++ if (zend_parse_parameters_none() == FAILURE) { ++ return; ++ } ++ ++ if (iterator->initialized == 0) { ++ RETURN_FALSE; ++ } ++ ++ if (iterator->totals_flag == 0) { ++ apc_iterator_totals(iterator TSRMLS_CC); ++ } ++ ++ RETURN_LONG(iterator->hits); ++} ++/* }}} */ ++ ++/* {{{ proto long APCIterator::getTotalSize() */ ++PHP_METHOD(apc_iterator, getTotalSize) { ++ apc_iterator_t *iterator = (apc_iterator_t*)zend_object_store_get_object(getThis() TSRMLS_CC); ++ ++ if (zend_parse_parameters_none() == FAILURE) { ++ return; ++ } ++ ++ if (iterator->initialized == 0) { ++ RETURN_FALSE; ++ } ++ ++ if (iterator->totals_flag == 0) { ++ apc_iterator_totals(iterator TSRMLS_CC); ++ } ++ ++ RETURN_LONG(iterator->size); ++} ++/* }}} */ ++ ++/* {{{ proto long APCIterator::getTotalCount() */ ++PHP_METHOD(apc_iterator, getTotalCount) { ++ apc_iterator_t *iterator = (apc_iterator_t*)zend_object_store_get_object(getThis() TSRMLS_CC); ++ ++ if (zend_parse_parameters_none() == FAILURE) { ++ return; ++ } ++ ++ if (iterator->initialized == 0) { ++ RETURN_FALSE; ++ } ++ ++ if (iterator->totals_flag == 0) { ++ apc_iterator_totals(iterator TSRMLS_CC); ++ } ++ ++ RETURN_LONG(iterator->count); ++} ++/* }}} */ ++ ++/* {{{ arginfo */ ++#if (PHP_MAJOR_VERSION >= 6 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3)) ++# define PHP_APC_ARGINFO ++#else ++# define PHP_APC_ARGINFO static ++#endif ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_iterator___construct, 0, 0, 1) ++ ZEND_ARG_INFO(0, cache) ++ ZEND_ARG_INFO(0, search) ++ ZEND_ARG_INFO(0, format) ++ ZEND_ARG_INFO(0, chunk_size) ++ ZEND_ARG_INFO(0, list) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_iterator_void, 0, 0, 0) ++ZEND_END_ARG_INFO() ++/* }}} */ ++ ++/* {{{ apc_iterator_functions */ ++static zend_function_entry apc_iterator_functions[] = { ++ PHP_ME(apc_iterator, __construct, arginfo_apc_iterator___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) ++ PHP_ME(apc_iterator, rewind, arginfo_apc_iterator_void, ZEND_ACC_PUBLIC) ++ PHP_ME(apc_iterator, current, arginfo_apc_iterator_void, ZEND_ACC_PUBLIC) ++ PHP_ME(apc_iterator, key, arginfo_apc_iterator_void, ZEND_ACC_PUBLIC) ++ PHP_ME(apc_iterator, next, arginfo_apc_iterator_void, ZEND_ACC_PUBLIC) ++ PHP_ME(apc_iterator, valid, arginfo_apc_iterator_void, ZEND_ACC_PUBLIC) ++ PHP_ME(apc_iterator, getTotalHits, arginfo_apc_iterator_void, ZEND_ACC_PUBLIC) ++ PHP_ME(apc_iterator, getTotalSize, arginfo_apc_iterator_void, ZEND_ACC_PUBLIC) ++ PHP_ME(apc_iterator, getTotalCount, arginfo_apc_iterator_void, ZEND_ACC_PUBLIC) ++ {NULL, NULL, NULL} ++}; ++/* }}} */ ++ ++/* {{{ apc_iterator_init */ ++int apc_iterator_init(int module_number TSRMLS_DC) { ++ zend_class_entry ce; ++ ++ INIT_CLASS_ENTRY(ce, APC_ITERATOR_NAME, apc_iterator_functions); ++ apc_iterator_ce = zend_register_internal_class(&ce TSRMLS_CC); ++ apc_iterator_ce->create_object = apc_iterator_create; ++ zend_class_implements(apc_iterator_ce TSRMLS_CC, 1, zend_ce_iterator); ++ ++ zend_register_long_constant("APC_LIST_ACTIVE", sizeof("APC_LIST_ACTIVE"), APC_LIST_ACTIVE, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_LIST_DELETED", sizeof("APC_LIST_DELETED"), APC_LIST_DELETED, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ ++ zend_register_long_constant("APC_ITER_TYPE", sizeof("APC_ITER_TYPE"), APC_ITER_TYPE, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_KEY", sizeof("APC_ITER_KEY"), APC_ITER_KEY, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_FILENAME", sizeof("APC_ITER_FILENAME"), APC_ITER_FILENAME, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_DEVICE", sizeof("APC_ITER_DEVICE"), APC_ITER_DEVICE, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_INODE", sizeof("APC_ITER_INODE"), APC_ITER_INODE, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_VALUE", sizeof("APC_ITER_VALUE"), APC_ITER_VALUE, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_MD5", sizeof("APC_ITER_MD5"), APC_ITER_MD5, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_NUM_HITS", sizeof("APC_ITER_NUM_HITS"), APC_ITER_NUM_HITS, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_MTIME", sizeof("APC_ITER_MTIME"), APC_ITER_MTIME, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_CTIME", sizeof("APC_ITER_CTIME"), APC_ITER_CTIME, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_DTIME", sizeof("APC_ITER_DTIME"), APC_ITER_DTIME, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_ATIME", sizeof("APC_ITER_ATIME"), APC_ITER_ATIME, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_REFCOUNT", sizeof("APC_ITER_REFCOUNT"), APC_ITER_REFCOUNT, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_MEM_SIZE", sizeof("APC_ITER_MEM_SIZE"), APC_ITER_MEM_SIZE, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_TTL", sizeof("APC_ITER_TTL"), APC_ITER_TTL, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_NONE", sizeof("APC_ITER_NONE"), APC_ITER_NONE, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ zend_register_long_constant("APC_ITER_ALL", sizeof("APC_ITER_ALL"), APC_ITER_ALL, CONST_PERSISTENT | CONST_CS, module_number TSRMLS_CC); ++ ++ memcpy(&apc_iterator_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); ++ apc_iterator_object_handlers.clone_obj = apc_iterator_clone; ++ ++ return SUCCESS; ++} ++/* }}} */ ++ ++ ++int apc_iterator_delete(zval *zobj TSRMLS_DC) { ++ apc_iterator_t *iterator; ++ zend_class_entry *ce = Z_OBJCE_P(zobj); ++ apc_iterator_item_t *item; ++ ++ if (!ce || !instanceof_function(ce, apc_iterator_ce TSRMLS_CC)) { ++ apc_error("apc_delete object argument must be instance of APCIterator" TSRMLS_CC); ++ return 0; ++ } ++ iterator = (apc_iterator_t*)zend_object_store_get_object(zobj TSRMLS_CC); ++ ++ if (iterator->initialized == 0) { ++ return 0; ++ } ++ ++ while (iterator->fetch(iterator TSRMLS_CC)) { ++ while (iterator->stack_idx < apc_stack_size(iterator->stack)) { ++ item = apc_stack_get(iterator->stack, iterator->stack_idx++); ++ if (iterator->cache == apc_cache) { ++ apc_cache_delete(apc_cache, item->filename_key, strlen(item->filename_key) + 1 TSRMLS_CC); ++ } else { ++ apc_cache_user_delete(apc_user_cache, item->key, item->key_len TSRMLS_CC); ++ } ++ } ++ } ++ ++ return 1; ++} ++ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_iterator.h +@@ -0,0 +1,117 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Brian Shire | ++ +----------------------------------------------------------------------+ ++ ++ */ ++ ++/* $Id: apc_iterator.h 300979 2010-07-04 10:15:05Z kalle $ */ ++ ++#ifndef APC_ITERATOR_H ++#define APC_ITERATOR_H ++ ++#include "apc.h" ++#include "apc_stack.h" ++ ++#if HAVE_PCRE || HAVE_BUNDLED_PCRE ++/* Deal with problem present until php-5.2.2 where php_pcre.h was not installed correctly */ ++# if !HAVE_BUNDLED_PCRE && PHP_MAJOR_VERSION == 5 && (PHP_MINOR_VERSION < 2 || (PHP_MINOR_VERSION == 2 && PHP_RELEASE_VERSION < 2)) ++# include "apc_php_pcre.h" ++# else ++# include "ext/pcre/php_pcre.h" ++# endif ++# include "ext/standard/php_smart_str.h" ++# define ITERATOR_PCRE 1 ++#endif ++ ++ ++#define APC_ITERATOR_NAME "APCIterator" ++ ++#define APC_DEFAULT_CHUNK_SIZE 100 ++ ++#define APC_LIST_ACTIVE 0x1 ++#define APC_LIST_DELETED 0x2 ++ ++#define APC_ITER_TYPE (1L << 0) ++#define APC_ITER_KEY (1L << 1) ++#define APC_ITER_FILENAME (1L << 2) ++#define APC_ITER_DEVICE (1L << 3) ++#define APC_ITER_INODE (1L << 4) ++#define APC_ITER_VALUE (1L << 5) ++#define APC_ITER_MD5 (1L << 6) ++#define APC_ITER_NUM_HITS (1L << 7) ++#define APC_ITER_MTIME (1L << 8) ++#define APC_ITER_CTIME (1L << 9) ++#define APC_ITER_DTIME (1L << 10) ++#define APC_ITER_ATIME (1L << 11) ++#define APC_ITER_REFCOUNT (1L << 12) ++#define APC_ITER_MEM_SIZE (1L << 13) ++#define APC_ITER_TTL (1L << 14) ++ ++#define APC_ITER_NONE (0x00000000L) ++#define APC_ITER_ALL (0xffffffffL) ++ ++typedef void* (*apc_iterator_item_cb_t)(slot_t **slot); ++ ++ ++/* {{{ apc_iterator_t */ ++typedef struct _apc_iterator_t { ++ zend_object obj; /* must always be first */ ++ short int initialized; /* sanity check in case __construct failed */ ++ long format; /* format bitmask of the return values ie: key, value, info */ ++ int (*fetch)(struct _apc_iterator_t *iterator TSRMLS_DC); ++ /* fetch callback to fetch items from cache slots or lists */ ++ apc_cache_t *cache; /* cache which we are iterating on */ ++ long slot_idx; /* index to the slot array or linked list */ ++ long chunk_size; /* number of entries to pull down per fetch */ ++ apc_stack_t *stack; /* stack of entries pulled from cache */ ++ int stack_idx; /* index into the current stack */ ++#ifdef ITERATOR_PCRE ++ pcre *re; /* regex filter on entry identifiers */ ++#endif ++ char *regex; /* original regex expression or NULL */ ++ int regex_len; /* regex length */ ++ HashTable *search_hash; /* hash of keys to iterate over */ ++ long key_idx; /* incrementing index for numerical keys */ ++ short int totals_flag; /* flag if totals have been calculated */ ++ long hits; /* hit total */ ++ size_t size; /* size total */ ++ long count; /* count total */ ++} apc_iterator_t; ++/* }}} */ ++ ++/* {{{ apc_iterator_item */ ++typedef struct _apc_iterator_item_t { ++ char *key; /* string key */ ++ long key_len; /* strlen of key */ ++ char *filename_key; /* filename key used for deletion */ ++ zval *value; ++} apc_iterator_item_t; ++/* }}} */ ++ ++ ++extern int apc_iterator_init(int module_number TSRMLS_DC); ++extern int apc_iterator_delete(zval *zobj TSRMLS_DC); ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_lock.h +@@ -0,0 +1,101 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: George Schlossnagle | ++ | Rasmus Lerdorf | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_lock.h 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#ifndef APC_LOCK ++#define APC_LOCK ++ ++#include "apc.h" ++#include "apc_sem.h" ++#include "apc_fcntl.h" ++#include "apc_pthreadmutex.h" ++#include "apc_spin.h" ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++/* {{{ generic locking macros */ ++#define CREATE_LOCK(lock) apc_lck_create(NULL, 0, 1, lock) ++#define DESTROY_LOCK(lock) apc_lck_destroy(lock) ++#define LOCK(lock) { HANDLE_BLOCK_INTERRUPTIONS(); apc_lck_lock(lock); } ++#define RDLOCK(lock) { HANDLE_BLOCK_INTERRUPTIONS(); apc_lck_rdlock(lock); } ++#define UNLOCK(lock) { apc_lck_unlock(lock); HANDLE_UNBLOCK_INTERRUPTIONS(); } ++/* }}} */ ++ ++#if defined(APC_SEM_LOCKS) ++#define APC_LOCK_TYPE "IPC Semaphore" ++#define RDLOCK_AVAILABLE 0 ++#define NONBLOCKING_LOCK_AVAILABLE 1 ++#define apc_lck_t int ++#define apc_lck_create(a,b,c,d) d=apc_sem_create((b),(c) TSRMLS_CC) ++#define apc_lck_destroy(a) apc_sem_destroy(a) ++#define apc_lck_lock(a) apc_sem_lock(a TSRMLS_CC) ++#define apc_lck_nb_lock(a) apc_sem_nonblocking_lock(a TSRMLS_CC) ++#define apc_lck_rdlock(a) apc_sem_lock(a TSRMLS_CC) ++#define apc_lck_unlock(a) apc_sem_unlock(a TSRMLS_CC) ++#elif defined(APC_PTHREADMUTEX_LOCKS) ++#define APC_LOCK_TYPE "pthread mutex Locks" ++#define RDLOCK_AVAILABLE 0 ++#define NONBLOCKING_LOCK_AVAILABLE 1 ++#define apc_lck_t pthread_mutex_t ++#define apc_lck_create(a,b,c,d) apc_pthreadmutex_create((pthread_mutex_t*)&d TSRMLS_CC) ++#define apc_lck_destroy(a) apc_pthreadmutex_destroy(&a) ++#define apc_lck_lock(a) apc_pthreadmutex_lock(&a TSRMLS_CC) ++#define apc_lck_nb_lock(a) apc_pthreadmutex_nonblocking_lock(&a TSRMLS_CC) ++#define apc_lck_rdlock(a) apc_pthreadmutex_lock(&a TSRMLS_CC) ++#define apc_lck_unlock(a) apc_pthreadmutex_unlock(&a TSRMLS_CC) ++#elif defined(APC_SPIN_LOCKS) ++#define APC_LOCK_TYPE "spin Locks" ++#define RDLOCK_AVAILABLE 0 ++#define NONBLOCKING_LOCK_AVAILABLE APC_SLOCK_NONBLOCKING_LOCK_AVAILABLE ++#define apc_lck_t slock_t ++#define apc_lck_create(a,b,c,d) apc_slock_create((slock_t*)&(d)) ++#define apc_lck_destroy(a) apc_slock_destroy(&a) ++#define apc_lck_lock(a) apc_slock_lock(&a TSRMLS_CC) ++#define apc_lck_nb_lock(a) apc_slock_nonblocking_lock(&a) ++#define apc_lck_rdlock(a) apc_slock_lock(&a TSRMLS_CC) ++#define apc_lck_unlock(a) apc_slock_unlock(&a) ++#else ++#define APC_LOCK_TYPE "File Locks" ++#define RDLOCK_AVAILABLE 1 ++#ifdef PHP_WIN32 ++#define NONBLOCKING_LOCK_AVAILABLE 0 ++#else ++#define NONBLOCKING_LOCK_AVAILABLE 1 ++#endif ++#define apc_lck_t int ++#define apc_lck_create(a,b,c,d) d=apc_fcntl_create((a) TSRMLS_CC) ++#define apc_lck_destroy(a) apc_fcntl_destroy(a) ++#define apc_lck_lock(a) apc_fcntl_lock(a TSRMLS_CC) ++#define apc_lck_nb_lock(a) apc_fcntl_nonblocking_lock(a TSRMLS_CC) ++#define apc_lck_rdlock(a) apc_fcntl_rdlock(a TSRMLS_CC) ++#define apc_lck_unlock(a) apc_fcntl_unlock(a TSRMLS_CC) ++#endif ++ ++#endif +--- /dev/null ++++ b/ext/apc/apc_main.c +@@ -0,0 +1,969 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | Rasmus Lerdorf | ++ | Arun C. Murthy | ++ | Gopal Vijayaraghavan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_main.c 304994 2010-10-30 20:33:46Z gopalv $ */ ++ ++#include "apc_php.h" ++#include "apc_main.h" ++#include "apc.h" ++#include "apc_lock.h" ++#include "apc_cache.h" ++#include "apc_compile.h" ++#include "apc_globals.h" ++#include "apc_sma.h" ++#include "apc_stack.h" ++#include "apc_zend.h" ++#include "apc_pool.h" ++#include "apc_string.h" ++#include "SAPI.h" ++#include "php_scandir.h" ++#include "ext/standard/php_var.h" ++#include "ext/standard/md5.h" ++ ++/* {{{ module variables */ ++ ++/* pointer to the original Zend engine compile_file function */ ++typedef zend_op_array* (zend_compile_t)(zend_file_handle*, int TSRMLS_DC); ++static zend_compile_t *old_compile_file; ++ ++/* }}} */ ++ ++/* {{{ get/set old_compile_file (to interact with other extensions that need the compile hook) */ ++static zend_compile_t* set_compile_hook(zend_compile_t *ptr) ++{ ++ zend_compile_t *retval = old_compile_file; ++ ++ if (ptr != NULL) old_compile_file = ptr; ++ return retval; ++} ++/* }}} */ ++ ++/* {{{ install_function */ ++static int install_function(apc_function_t fn, apc_context_t* ctxt, int lazy TSRMLS_DC) ++{ ++ int status; ++ ++#if APC_HAVE_LOOKUP_HOOKS ++ if(lazy && fn.name[0] != '\0' && strncmp(fn.name, "__autoload", fn.name_len) != 0) { ++ status = zend_hash_add(APCG(lazy_function_table), ++ fn.name, ++ fn.name_len+1, ++ &fn, ++ sizeof(apc_function_t), ++ NULL); ++#else ++ if(0) { ++#endif ++ } else { ++ zend_function *func = apc_copy_function_for_execution(fn.function, ctxt TSRMLS_CC); ++ status = zend_hash_add(EG(function_table), ++ fn.name, ++ fn.name_len+1, ++ func, ++ sizeof(fn.function[0]), ++ NULL); ++ efree(func); ++ } ++ ++ if (status == FAILURE) { ++ /* apc_error("Cannot redeclare %s()" TSRMLS_CC, fn.name); */ ++ } ++ ++ return status; ++} ++/* }}} */ ++ ++/* {{{ apc_lookup_function_hook */ ++int apc_lookup_function_hook(char *name, int len, ulong hash, zend_function **fe) { ++ apc_function_t *fn; ++ int status = FAILURE; ++ apc_context_t ctxt = {0,}; ++ TSRMLS_FETCH(); ++ ++ ctxt.pool = apc_pool_create(APC_UNPOOL, apc_php_malloc, apc_php_free, apc_sma_protect, apc_sma_unprotect TSRMLS_CC); ++ ctxt.copy = APC_COPY_OUT_OPCODE; ++ ++ if(zend_hash_quick_find(APCG(lazy_function_table), name, len, hash, (void**)&fn) == SUCCESS) { ++ *fe = apc_copy_function_for_execution(fn->function, &ctxt TSRMLS_CC); ++ status = zend_hash_add(EG(function_table), ++ fn->name, ++ fn->name_len+1, ++ *fe, ++ sizeof(zend_function), ++ NULL); ++ } ++ ++ return status; ++} ++/* }}} */ ++ ++/* {{{ install_class */ ++static int install_class(apc_class_t cl, apc_context_t* ctxt, int lazy TSRMLS_DC) ++{ ++ zend_class_entry* class_entry = cl.class_entry; ++ zend_class_entry* parent = NULL; ++ int status; ++ zend_class_entry** allocated_ce = NULL; ++ ++ /* Special case for mangled names. Mangled names are unique to a file. ++ * There is no way two classes with the same mangled name will occur, ++ * unless a file is included twice. And if in case, a file is included ++ * twice, all mangled name conflicts can be ignored and the class redeclaration ++ * error may be deferred till runtime of the corresponding DECLARE_CLASS ++ * calls. ++ */ ++ ++ if(cl.name_len != 0 && cl.name[0] == '\0') { ++ if(zend_hash_exists(CG(class_table), cl.name, cl.name_len+1)) { ++ return SUCCESS; ++ } ++ } ++ ++ if(lazy && cl.name_len != 0 && cl.name[0] != '\0') { ++ status = zend_hash_add(APCG(lazy_class_table), ++ cl.name, ++ cl.name_len+1, ++ &cl, ++ sizeof(apc_class_t), ++ NULL); ++ if(status == FAILURE) { ++ zend_error(E_ERROR, "Cannot redeclare class %s", cl.name); ++ } ++ return status; ++ } ++ ++ /* ++ * XXX: We need to free this somewhere... ++ */ ++ allocated_ce = apc_php_malloc(sizeof(zend_class_entry*) TSRMLS_CC); ++ ++ if(!allocated_ce) { ++ return FAILURE; ++ } ++ ++ *allocated_ce = ++ class_entry = ++ apc_copy_class_entry_for_execution(cl.class_entry, ctxt TSRMLS_CC); ++ ++ ++ /* restore parent class pointer for compile-time inheritance */ ++ if (cl.parent_name != NULL) { ++ zend_class_entry** parent_ptr = NULL; ++ /* ++ * __autoload brings in the old issues with mixed inheritance. ++ * When a statically inherited class triggers autoload, it runs ++ * afoul of a potential require_once "parent.php" in the previous ++ * line, which when executed provides the parent class, but right ++ * now goes and hits __autoload which could fail. ++ * ++ * missing parent == re-compile. ++ * ++ * whether __autoload is enabled or not, because __autoload errors ++ * cause php to die. ++ * ++ * Aside: Do NOT pass *strlen(cl.parent_name)+1* because ++ * zend_lookup_class_ex does it internally anyway! ++ */ ++ status = zend_lookup_class_ex(cl.parent_name, ++ strlen(cl.parent_name), ++#ifdef ZEND_ENGINE_2_4 ++ NULL, ++#endif ++ 0, ++ &parent_ptr TSRMLS_CC); ++ if (status == FAILURE) { ++ if(APCG(report_autofilter)) { ++ apc_warning("Dynamic inheritance detected for class %s" TSRMLS_CC, cl.name); ++ } ++ class_entry->parent = NULL; ++ return status; ++ } ++ else { ++ parent = *parent_ptr; ++ class_entry->parent = parent; ++ zend_do_inheritance(class_entry, parent TSRMLS_CC); ++ } ++ ++ ++ } ++ ++ status = zend_hash_add(EG(class_table), ++ cl.name, ++ cl.name_len+1, ++ allocated_ce, ++ sizeof(zend_class_entry*), ++ NULL); ++ ++ if (status == FAILURE) { ++ apc_error("Cannot redeclare class %s" TSRMLS_CC, cl.name); ++ } ++ return status; ++} ++/* }}} */ ++ ++/* {{{ apc_lookup_class_hook */ ++int apc_lookup_class_hook(char *name, int len, ulong hash, zend_class_entry ***ce) { ++ ++ apc_class_t *cl; ++ apc_context_t ctxt = {0,}; ++ TSRMLS_FETCH(); ++ ++ if(zend_is_compiling(TSRMLS_C)) { return FAILURE; } ++ ++ if(zend_hash_quick_find(APCG(lazy_class_table), name, len, hash, (void**)&cl) == FAILURE) { ++ return FAILURE; ++ } ++ ++ ctxt.pool = apc_pool_create(APC_UNPOOL, apc_php_malloc, apc_php_free, apc_sma_protect, apc_sma_unprotect TSRMLS_CC); ++ ctxt.copy = APC_COPY_OUT_OPCODE; ++ ++ if(install_class(*cl, &ctxt, 0 TSRMLS_CC) == FAILURE) { ++ apc_warning("apc_lookup_class_hook: could not install %s" TSRMLS_CC, name); ++ return FAILURE; ++ } ++ ++ if(zend_hash_quick_find(EG(class_table), name, len, hash, (void**)ce) == FAILURE) { ++ apc_warning("apc_lookup_class_hook: known error trying to fetch class %s" TSRMLS_CC, name); ++ return FAILURE; ++ } ++ ++ return SUCCESS; ++ ++} ++/* }}} */ ++ ++/* {{{ uninstall_class */ ++static int uninstall_class(apc_class_t cl TSRMLS_DC) ++{ ++ int status; ++ ++ status = zend_hash_del(EG(class_table), ++ cl.name, ++ cl.name_len+1); ++ if (status == FAILURE) { ++ apc_error("Cannot delete class %s" TSRMLS_CC, cl.name); ++ } ++ return status; ++} ++/* }}} */ ++ ++/* {{{ copy_function_name (taken from zend_builtin_functions.c to ensure future compatibility with APC) */ ++static int copy_function_name(apc_function_t *pf TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) ++{ ++ zval *internal_ar = va_arg(args, zval *), ++ *user_ar = va_arg(args, zval *); ++ zend_function *func = pf->function; ++ ++ if (hash_key->nKeyLength == 0 || hash_key->arKey[0] == 0) { ++ return 0; ++ } ++ ++ if (func->type == ZEND_INTERNAL_FUNCTION) { ++ add_next_index_stringl(internal_ar, hash_key->arKey, hash_key->nKeyLength-1, 1); ++ } else if (func->type == ZEND_USER_FUNCTION) { ++ add_next_index_stringl(user_ar, hash_key->arKey, hash_key->nKeyLength-1, 1); ++ } ++ ++ return 0; ++} ++ ++/* {{{ copy_class_or_interface_name (taken from zend_builtin_functions.c to ensure future compatibility with APC) */ ++static int copy_class_or_interface_name(apc_class_t *cl TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) ++{ ++ zval *array = va_arg(args, zval *); ++ zend_uint mask = va_arg(args, zend_uint); ++ zend_uint comply = va_arg(args, zend_uint); ++ zend_uint comply_mask = (comply)? mask:0; ++ zend_class_entry *ce = cl->class_entry; ++ ++ if ((hash_key->nKeyLength==0 || hash_key->arKey[0]!=0) ++ && (comply_mask == (ce->ce_flags & mask))) { ++ add_next_index_stringl(array, ce->name, ce->name_length, 1); ++ } ++ return ZEND_HASH_APPLY_KEEP; ++} ++/* }}} */ ++ ++/* }}} */ ++ ++/* {{{ apc_defined_function_hook */ ++int apc_defined_function_hook(zval *internal, zval *user) { ++ TSRMLS_FETCH(); ++ zend_hash_apply_with_arguments(APCG(lazy_function_table) ++#ifdef ZEND_ENGINE_2_3 ++ TSRMLS_CC ++#endif ++ ,(apply_func_args_t) copy_function_name, 2, internal, user); ++ return 1; ++} ++/* }}} */ ++ ++/* {{{ apc_declared_class_hook */ ++int apc_declared_class_hook(zval *classes, zend_uint mask, zend_uint comply) { ++ TSRMLS_FETCH(); ++ zend_hash_apply_with_arguments(APCG(lazy_class_table) ++#ifdef ZEND_ENGINE_2_3 ++ TSRMLS_CC ++#endif ++ , (apply_func_args_t) copy_class_or_interface_name, 3, classes, mask, comply); ++ return 1; ++} ++/* }}} */ ++ ++/* {{{ cached_compile */ ++static zend_op_array* cached_compile(zend_file_handle* h, ++ int type, ++ apc_context_t* ctxt TSRMLS_DC) ++{ ++ apc_cache_entry_t* cache_entry; ++ int i, ii; ++ ++ cache_entry = (apc_cache_entry_t*) apc_stack_top(APCG(cache_stack)); ++ assert(cache_entry != NULL); ++ ++ if (cache_entry->data.file.classes) { ++ int lazy_classes = APCG(lazy_classes); ++ for (i = 0; cache_entry->data.file.classes[i].class_entry != NULL; i++) { ++ if(install_class(cache_entry->data.file.classes[i], ctxt, lazy_classes TSRMLS_CC) == FAILURE) { ++ goto default_compile; ++ } ++ } ++ } ++ ++ if (cache_entry->data.file.functions) { ++ int lazy_functions = APCG(lazy_functions); ++ for (i = 0; cache_entry->data.file.functions[i].function != NULL; i++) { ++ install_function(cache_entry->data.file.functions[i], ctxt, lazy_functions TSRMLS_CC); ++ } ++ } ++ ++ apc_do_halt_compiler_register(cache_entry->data.file.filename, cache_entry->data.file.halt_offset TSRMLS_CC); ++ ++ ++ return apc_copy_op_array_for_execution(NULL, cache_entry->data.file.op_array, ctxt TSRMLS_CC); ++ ++default_compile: ++ ++ if(cache_entry->data.file.classes) { ++ for(ii = 0; ii < i ; ii++) { ++ uninstall_class(cache_entry->data.file.classes[ii] TSRMLS_CC); ++ } ++ } ++ ++ apc_stack_pop(APCG(cache_stack)); /* pop out cache_entry */ ++ ++ apc_cache_release(apc_cache, cache_entry TSRMLS_CC); ++ ++ /* cannot free up cache data yet, it maybe in use */ ++ ++ return NULL; ++} ++/* }}} */ ++ ++/* {{{ apc_compile_cache_entry */ ++zend_bool apc_compile_cache_entry(apc_cache_key_t key, zend_file_handle* h, int type, time_t t, zend_op_array** op_array, apc_cache_entry_t** cache_entry TSRMLS_DC) { ++ int num_functions, num_classes; ++ apc_function_t* alloc_functions; ++ zend_op_array* alloc_op_array; ++ apc_class_t* alloc_classes; ++ char *path; ++ apc_context_t ctxt; ++ ++ /* remember how many functions and classes existed before compilation */ ++ num_functions = zend_hash_num_elements(CG(function_table)); ++ num_classes = zend_hash_num_elements(CG(class_table)); ++ ++ /* compile the file using the default compile function, * ++ * we set *op_array here so we return opcodes during * ++ * a failure. We should not return prior to this line. */ ++ *op_array = old_compile_file(h, type TSRMLS_CC); ++ if (*op_array == NULL) { ++ return FAILURE; ++ } ++ ++ ctxt.pool = apc_pool_create(APC_MEDIUM_POOL, apc_sma_malloc, apc_sma_free, ++ apc_sma_protect, apc_sma_unprotect TSRMLS_CC); ++ if (!ctxt.pool) { ++ apc_warning("Unable to allocate memory for pool." TSRMLS_CC); ++ return FAILURE; ++ } ++ ctxt.copy = APC_COPY_IN_OPCODE; ++ ++ if(APCG(file_md5)) { ++ int n; ++ unsigned char buf[1024]; ++ PHP_MD5_CTX context; ++ php_stream *stream; ++ char *filename; ++ ++ if(h->opened_path) { ++ filename = h->opened_path; ++ } else { ++ filename = h->filename; ++ } ++ stream = php_stream_open_wrapper(filename, "rb", REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL); ++ if(stream) { ++ PHP_MD5Init(&context); ++ while((n = php_stream_read(stream, (char*)buf, sizeof(buf))) > 0) { ++ PHP_MD5Update(&context, buf, n); ++ } ++ PHP_MD5Final(key.md5, &context); ++ php_stream_close(stream); ++ if(n<0) { ++ apc_warning("Error while reading '%s' for md5 generation." TSRMLS_CC, filename); ++ } ++ } else { ++ apc_warning("Unable to open '%s' for md5 generation." TSRMLS_CC, filename); ++ } ++ } ++ ++ if(!(alloc_op_array = apc_copy_op_array(NULL, *op_array, &ctxt TSRMLS_CC))) { ++ goto freepool; ++ } ++ ++ if(!(alloc_functions = apc_copy_new_functions(num_functions, &ctxt TSRMLS_CC))) { ++ goto freepool; ++ } ++ if(!(alloc_classes = apc_copy_new_classes(*op_array, num_classes, &ctxt TSRMLS_CC))) { ++ goto freepool; ++ } ++ ++ path = h->opened_path; ++ if(!path) path=h->filename; ++ ++ apc_debug("2. h->opened_path=[%s] h->filename=[%s]\n" TSRMLS_CC, h->opened_path?h->opened_path:"null",h->filename); ++ ++ if(!(*cache_entry = apc_cache_make_file_entry(path, alloc_op_array, alloc_functions, alloc_classes, &ctxt TSRMLS_CC))) { ++ goto freepool; ++ } ++ ++ return SUCCESS; ++ ++freepool: ++ apc_pool_destroy(ctxt.pool TSRMLS_CC); ++ ctxt.pool = NULL; ++ ++ return FAILURE; ++ ++} ++/* }}} */ ++ ++/* {{{ my_compile_file ++ Overrides zend_compile_file */ ++static zend_op_array* my_compile_file(zend_file_handle* h, ++ int type TSRMLS_DC) ++{ ++ apc_cache_key_t key; ++ apc_cache_entry_t* cache_entry; ++ zend_op_array* op_array = NULL; ++ time_t t; ++ apc_context_t ctxt = {0,}; ++ int bailout=0; ++ const char* filename = NULL; ++ ++ if (!APCG(enabled) || apc_cache_busy(apc_cache)) { ++ return old_compile_file(h, type TSRMLS_CC); ++ } ++ ++ if(h->opened_path) { ++ filename = h->opened_path; ++ } else { ++ filename = h->filename; ++ } ++ ++ /* check our regular expression filters */ ++ if (APCG(filters) && APCG(compiled_filters) && filename) { ++ int ret = apc_regex_match_array(APCG(compiled_filters), filename); ++ ++ if(ret == APC_NEGATIVE_MATCH || (ret != APC_POSITIVE_MATCH && !APCG(cache_by_default))) { ++ return old_compile_file(h, type TSRMLS_CC); ++ } ++ } else if(!APCG(cache_by_default)) { ++ return old_compile_file(h, type TSRMLS_CC); ++ } ++ APCG(current_cache) = apc_cache; ++ ++ ++ t = apc_time(); ++ ++ apc_debug("1. h->opened_path=[%s] h->filename=[%s]\n" TSRMLS_CC, h->opened_path?h->opened_path:"null",h->filename); ++ ++ /* try to create a cache key; if we fail, give up on caching */ ++ if (!apc_cache_make_file_key(&key, h->filename, PG(include_path), t TSRMLS_CC)) { ++ return old_compile_file(h, type TSRMLS_CC); ++ } ++ ++ if(!APCG(force_file_update)) { ++ /* search for the file in the cache */ ++ cache_entry = apc_cache_find(apc_cache, key, t TSRMLS_CC); ++ ctxt.force_update = 0; ++ } else { ++ cache_entry = NULL; ++ ctxt.force_update = 1; ++ } ++ ++ if (cache_entry != NULL) { ++ int dummy = 1; ++ ++ ctxt.pool = apc_pool_create(APC_UNPOOL, apc_php_malloc, apc_php_free, ++ apc_sma_protect, apc_sma_unprotect TSRMLS_CC); ++ if (!ctxt.pool) { ++ apc_warning("Unable to allocate memory for pool." TSRMLS_CC); ++ return old_compile_file(h, type TSRMLS_CC); ++ } ++ ctxt.copy = APC_COPY_OUT_OPCODE; ++ ++ zend_hash_add(&EG(included_files), cache_entry->data.file.filename, ++ strlen(cache_entry->data.file.filename)+1, ++ (void *)&dummy, sizeof(int), NULL); ++ ++ apc_stack_push(APCG(cache_stack), cache_entry TSRMLS_CC); ++ op_array = cached_compile(h, type, &ctxt TSRMLS_CC); ++ ++ if(op_array) { ++#ifdef APC_FILEHITS ++ /* If the file comes from the cache, add it to the global request file list */ ++ add_next_index_string(APCG(filehits), h->filename, 1); ++#endif ++ /* this is an unpool, which has no cleanup - this only free's the pool header */ ++ apc_pool_destroy(ctxt.pool TSRMLS_CC); ++ ++ /* We might leak fds without this hack */ ++ if (h->type != ZEND_HANDLE_FILENAME) { ++ zend_llist_add_element(&CG(open_files), h); ++ } ++ return op_array; ++ } ++ if(APCG(report_autofilter)) { ++ apc_warning("Autofiltering %s" TSRMLS_CC, ++ (h->opened_path ? h->opened_path : h->filename)); ++ apc_warning("Recompiling %s" TSRMLS_CC, cache_entry->data.file.filename); ++ } ++ /* TODO: check what happens with EG(included_files) */ ++ } ++ ++ /* Make sure the mtime reflects the files last known mtime, and we respect max_file_size in the case of fpstat==0 */ ++ if(key.type == APC_CACHE_KEY_FPFILE) { ++ apc_fileinfo_t fileinfo; ++ struct stat *tmp_buf = NULL; ++ if(!strcmp(SG(request_info).path_translated, h->filename)) { ++ tmp_buf = sapi_get_stat(TSRMLS_C); /* Apache has already done this stat() for us */ ++ } ++ if(tmp_buf) { ++ fileinfo.st_buf.sb = *tmp_buf; ++ } else { ++ if (apc_search_paths(h->filename, PG(include_path), &fileinfo TSRMLS_CC) != 0) { ++ apc_debug("Stat failed %s - bailing (%s) (%d)\n" TSRMLS_CC,h->filename,SG(request_info).path_translated); ++ return old_compile_file(h, type TSRMLS_CC); ++ } ++ } ++ if (APCG(max_file_size) < fileinfo.st_buf.sb.st_size) { ++ apc_debug("File is too big %s (%ld) - bailing\n" TSRMLS_CC, h->filename, fileinfo.st_buf.sb.st_size); ++ return old_compile_file(h, type TSRMLS_CC); ++ } ++ key.mtime = fileinfo.st_buf.sb.st_mtime; ++ } ++ ++ HANDLE_BLOCK_INTERRUPTIONS(); ++ ++#if NONBLOCKING_LOCK_AVAILABLE ++ if(APCG(write_lock)) { ++ if(!apc_cache_write_lock(apc_cache TSRMLS_CC)) { ++ HANDLE_UNBLOCK_INTERRUPTIONS(); ++ return old_compile_file(h, type TSRMLS_CC); ++ } ++ } ++#endif ++ ++ zend_try { ++ if (apc_compile_cache_entry(key, h, type, t, &op_array, &cache_entry TSRMLS_CC) == SUCCESS) { ++ ctxt.pool = cache_entry->pool; ++ ctxt.copy = APC_COPY_IN_OPCODE; ++ if (apc_cache_insert(apc_cache, key, cache_entry, &ctxt, t TSRMLS_CC) != 1) { ++ apc_pool_destroy(ctxt.pool TSRMLS_CC); ++ ctxt.pool = NULL; ++ } ++ } ++ } zend_catch { ++ bailout=1; /* in the event of a bailout, ensure we don't create a dead-lock */ ++ } zend_end_try(); ++ ++ APCG(current_cache) = NULL; ++ ++#if NONBLOCKING_LOCK_AVAILABLE ++ if(APCG(write_lock)) { ++ apc_cache_write_unlock(apc_cache TSRMLS_CC); ++ } ++#endif ++ HANDLE_UNBLOCK_INTERRUPTIONS(); ++ ++ if (bailout) zend_bailout(); ++ ++ return op_array; ++} ++/* }}} */ ++ ++/* {{{ data preload */ ++ ++extern int _apc_store(char *strkey, int strkey_len, const zval *val, const unsigned int ttl, const int exclusive TSRMLS_DC); ++ ++static zval* data_unserialize(const char *filename TSRMLS_DC) ++{ ++ zval* retval; ++ long len = 0; ++ struct stat sb; ++ char *contents, *tmp; ++ FILE *fp; ++ php_unserialize_data_t var_hash; ++ ++ if(VCWD_STAT(filename, &sb) == -1) { ++ return NULL; ++ } ++ ++ fp = fopen(filename, "rb"); ++ ++ len = sizeof(char)*sb.st_size; ++ ++ tmp = contents = malloc(len); ++ ++ if(!contents) { ++ return NULL; ++ } ++ ++ if(fread(contents, 1, len, fp) < 1) { ++ free(contents); ++ return NULL; ++ } ++ ++ MAKE_STD_ZVAL(retval); ++ ++ PHP_VAR_UNSERIALIZE_INIT(var_hash); ++ ++ /* I wish I could use json */ ++ if(!php_var_unserialize(&retval, (const unsigned char**)&tmp, (const unsigned char*)(contents+len), &var_hash TSRMLS_CC)) { ++ zval_ptr_dtor(&retval); ++ return NULL; ++ } ++ ++ PHP_VAR_UNSERIALIZE_DESTROY(var_hash); ++ ++ free(contents); ++ fclose(fp); ++ ++ return retval; ++} ++ ++static int apc_load_data(const char *data_file TSRMLS_DC) ++{ ++ char *p; ++ char key[MAXPATHLEN] = {0,}; ++ unsigned int key_len; ++ zval *data; ++ ++ p = strrchr(data_file, DEFAULT_SLASH); ++ ++ if(p && p[1]) { ++ strlcpy(key, p+1, sizeof(key)); ++ p = strrchr(key, '.'); ++ ++ if(p) { ++ p[0] = '\0'; ++ key_len = strlen(key); ++ ++ data = data_unserialize(data_file TSRMLS_CC); ++ if(data) { ++ _apc_store(key, key_len, data, 0, 1 TSRMLS_CC); ++ } ++ return 1; ++ } ++ } ++ ++ return 0; ++} ++ ++static int apc_walk_dir(const char *path TSRMLS_DC) ++{ ++ char file[MAXPATHLEN]={0,}; ++ int ndir, i; ++ char *p = NULL; ++ struct dirent **namelist = NULL; ++ ++ if ((ndir = php_scandir(path, &namelist, 0, php_alphasort)) > 0) ++ { ++ for (i = 0; i < ndir; i++) ++ { ++ /* check for extension */ ++ if (!(p = strrchr(namelist[i]->d_name, '.')) ++ || (p && strcmp(p, ".data"))) ++ { ++ free(namelist[i]); ++ continue; ++ } ++ snprintf(file, MAXPATHLEN, "%s%c%s", ++ path, DEFAULT_SLASH, namelist[i]->d_name); ++ if(!apc_load_data(file TSRMLS_CC)) ++ { ++ /* print error */ ++ } ++ free(namelist[i]); ++ } ++ free(namelist); ++ } ++ ++ return 1; ++} ++ ++void apc_data_preload(TSRMLS_D) ++{ ++ if(!APCG(preload_path)) return; ++ ++ apc_walk_dir(APCG(preload_path) TSRMLS_CC); ++} ++/* }}} */ ++ ++/* {{{ module init and shutdown */ ++ ++int apc_module_init(int module_number TSRMLS_DC) ++{ ++ /* apc initialization */ ++#if APC_MMAP ++ apc_sma_init(APCG(shm_segments), APCG(shm_size), APCG(mmap_file_mask) TSRMLS_CC); ++#else ++ apc_sma_init(APCG(shm_segments), APCG(shm_size), NULL TSRMLS_CC); ++#endif ++ apc_cache = apc_cache_create(APCG(num_files_hint), APCG(gc_ttl), APCG(ttl) TSRMLS_CC); ++ apc_user_cache = apc_cache_create(APCG(user_entries_hint), APCG(gc_ttl), APCG(user_ttl) TSRMLS_CC); ++ ++ /* override compilation */ ++ old_compile_file = zend_compile_file; ++ zend_compile_file = my_compile_file; ++ REGISTER_LONG_CONSTANT("\000apc_magic", (long)&set_compile_hook, CONST_PERSISTENT | CONST_CS); ++ REGISTER_LONG_CONSTANT("\000apc_compile_file", (long)&my_compile_file, CONST_PERSISTENT | CONST_CS); ++ ++ apc_pool_init(); ++ ++ apc_data_preload(TSRMLS_C); ++ ++#if APC_HAVE_LOOKUP_HOOKS ++ if(APCG(lazy_functions)) { ++ zend_set_lookup_function_hook(apc_lookup_function_hook TSRMLS_CC); ++ zend_set_defined_function_hook(apc_defined_function_hook TSRMLS_CC); ++ } ++ if(APCG(lazy_classes)) { ++ zend_set_lookup_class_hook(apc_lookup_class_hook TSRMLS_CC); ++ zend_set_declared_class_hook(apc_declared_class_hook TSRMLS_CC); ++ } ++#else ++ if(APCG(lazy_functions) || APCG(lazy_classes)) { ++ apc_warning("Lazy function/class loading not available with this version of PHP, please disable APC lazy loading." TSRMLS_CC); ++ APCG(lazy_functions) = APCG(lazy_classes) = 0; ++ } ++#endif ++ ++#ifdef ZEND_ENGINE_2_4 ++ apc_interned_strings_init(TSRMLS_C); ++#endif ++ ++ APCG(initialized) = 1; ++ return 0; ++} ++ ++int apc_module_shutdown(TSRMLS_D) ++{ ++ if (!APCG(initialized)) ++ return 0; ++ ++ /* restore compilation */ ++ zend_compile_file = old_compile_file; ++ ++ /* ++ * In case we got interrupted by a SIGTERM or something else during execution ++ * we may have cache entries left on the stack that we need to check to make ++ * sure that any functions or classes these may have added to the global function ++ * and class tables are removed before we blow away the memory that hold them. ++ * ++ * This is merely to remove memory leak warnings - as the process is terminated ++ * immediately after shutdown. The following while loop can be removed without ++ * affecting anything else. ++ */ ++ while (apc_stack_size(APCG(cache_stack)) > 0) { ++ int i; ++ apc_cache_entry_t* cache_entry = (apc_cache_entry_t*) apc_stack_pop(APCG(cache_stack)); ++ if (cache_entry->data.file.functions) { ++ for (i = 0; cache_entry->data.file.functions[i].function != NULL; i++) { ++ zend_hash_del(EG(function_table), ++ cache_entry->data.file.functions[i].name, ++ cache_entry->data.file.functions[i].name_len+1); ++ } ++ } ++ if (cache_entry->data.file.classes) { ++ for (i = 0; cache_entry->data.file.classes[i].class_entry != NULL; i++) { ++ zend_hash_del(EG(class_table), ++ cache_entry->data.file.classes[i].name, ++ cache_entry->data.file.classes[i].name_len+1); ++ } ++ } ++ apc_cache_release(apc_cache, cache_entry TSRMLS_CC); ++ } ++ ++ apc_cache_destroy(apc_cache TSRMLS_CC); ++ apc_cache_destroy(apc_user_cache TSRMLS_CC); ++ apc_sma_cleanup(TSRMLS_C); ++ ++#ifdef ZEND_ENGINE_2_4 ++ apc_interned_strings_shutdown(TSRMLS_C); ++#endif ++ ++ APCG(initialized) = 0; ++ return 0; ++} ++ ++/* }}} */ ++ ++/* {{{ process init and shutdown */ ++int apc_process_init(int module_number TSRMLS_DC) ++{ ++ return 0; ++} ++ ++int apc_process_shutdown(TSRMLS_D) ++{ ++ return 0; ++} ++/* }}} */ ++ ++ ++/* {{{ apc_deactivate */ ++static void apc_deactivate(TSRMLS_D) ++{ ++ /* The execution stack was unwound, which prevented us from decrementing ++ * the reference counts on active cache entries in `my_execute`. ++ */ ++ while (apc_stack_size(APCG(cache_stack)) > 0) { ++ int i; ++ zend_class_entry* zce = NULL; ++ void ** centry = (void*)(&zce); ++ zend_class_entry** pzce = NULL; ++ ++ apc_cache_entry_t* cache_entry = ++ (apc_cache_entry_t*) apc_stack_pop(APCG(cache_stack)); ++ ++ if (cache_entry->data.file.classes) { ++ for (i = 0; cache_entry->data.file.classes[i].class_entry != NULL; i++) { ++ centry = (void**)&pzce; /* a triple indirection to get zend_class_entry*** */ ++ if(zend_hash_find(EG(class_table), ++ cache_entry->data.file.classes[i].name, ++ cache_entry->data.file.classes[i].name_len+1, ++ (void**)centry) == FAILURE) ++ { ++ /* double inclusion of conditional classes ends up failing ++ * this lookup the second time around. ++ */ ++ continue; ++ } ++ ++ zce = *pzce; ++ ++ zend_hash_del(EG(class_table), ++ cache_entry->data.file.classes[i].name, ++ cache_entry->data.file.classes[i].name_len+1); ++ ++ apc_free_class_entry_after_execution(zce TSRMLS_CC); ++ } ++ } ++ apc_cache_release(apc_cache, cache_entry TSRMLS_CC); ++ } ++} ++/* }}} */ ++ ++/* {{{ request init and shutdown */ ++ ++int apc_request_init(TSRMLS_D) ++{ ++ apc_stack_clear(APCG(cache_stack)); ++ if (!APCG(compiled_filters) && APCG(filters)) { ++ /* compile regex filters here to avoid race condition between MINIT of PCRE and APC. ++ * This should be moved to apc_cache_create() if this race condition between modules is resolved */ ++ APCG(compiled_filters) = apc_regex_compile_array(APCG(filters) TSRMLS_CC); ++ } ++ ++#if APC_HAVE_LOOKUP_HOOKS ++ if(APCG(lazy_functions)) { ++ APCG(lazy_function_table) = emalloc(sizeof(HashTable)); ++ zend_hash_init(APCG(lazy_function_table), 0, NULL, NULL, 0); ++ } ++ if(APCG(lazy_classes)) { ++ APCG(lazy_class_table) = emalloc(sizeof(HashTable)); ++ zend_hash_init(APCG(lazy_class_table), 0, NULL, NULL, 0); ++ } ++#endif ++ ++#ifdef APC_FILEHITS ++ ALLOC_INIT_ZVAL(APCG(filehits)); ++ array_init(APCG(filehits)); ++#endif ++ ++ return 0; ++} ++ ++int apc_request_shutdown(TSRMLS_D) ++{ ++ ++#if APC_HAVE_LOOKUP_HOOKS ++ if(APCG(lazy_class_table)) { ++ zend_hash_destroy(APCG(lazy_class_table)); ++ efree(APCG(lazy_class_table)); ++ } ++ if(APCG(lazy_function_table)) { ++ zend_hash_destroy(APCG(lazy_function_table)); ++ efree(APCG(lazy_function_table)); ++ } ++#endif ++ ++ apc_deactivate(TSRMLS_C); ++ ++#ifdef APC_FILEHITS ++ zval_ptr_dtor(&APCG(filehits)); ++#endif ++ ++ return 0; ++} ++ ++/* }}} */ ++ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_main.h +@@ -0,0 +1,74 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | George Schlossnagle | ++ | Rasmus Lerdorf | ++ | Arun C. Murthy | ++ | Gopal Vijayaraghavan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_main.h 300979 2010-07-04 10:15:05Z kalle $ */ ++ ++#ifndef APC_MAIN_H ++#define APC_MAIN_H ++ ++#include "apc_pool.h" ++ ++/* ++ * This module provides the primary interface between PHP and APC. ++ */ ++ ++extern int apc_module_init(int module_number TSRMLS_DC); ++extern int apc_module_shutdown(TSRMLS_D); ++extern int apc_process_init(int module_number TSRMLS_DC); ++extern int apc_process_shutdown(TSRMLS_D); ++extern int apc_request_init(TSRMLS_D); ++extern int apc_request_shutdown(TSRMLS_D); ++ ++typedef enum _apc_copy_type { ++ APC_NO_COPY = 0, ++ APC_COPY_IN_OPCODE, ++ APC_COPY_OUT_OPCODE, ++ APC_COPY_IN_USER, ++ APC_COPY_OUT_USER ++} apc_copy_type; ++ ++typedef struct _apc_context_t ++{ ++ apc_pool *pool; ++ apc_copy_type copy; ++ unsigned int force_update:1; ++} apc_context_t; ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_mmap.c +@@ -0,0 +1,175 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Rasmus Lerdorf | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_mmap.c 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#include "apc.h" ++#include "apc_mmap.h" ++#include "apc_lock.h" ++ ++#if APC_MMAP ++ ++#include ++#include ++#include ++ ++/* ++ * Some operating systems (like FreeBSD) have a MAP_NOSYNC flag that ++ * tells whatever update daemons might be running to not flush dirty ++ * vm pages to disk unless absolutely necessary. My guess is that ++ * most systems that don't have this probably default to only synching ++ * to disk when absolutely necessary. ++ */ ++#ifndef MAP_NOSYNC ++#define MAP_NOSYNC 0 ++#endif ++ ++/* support for systems where MAP_ANONYMOUS is defined but not MAP_ANON, ie: HP-UX bug #14615 */ ++#if !defined(MAP_ANON) && defined(MAP_ANONYMOUS) ++# define MAP_ANON MAP_ANONYMOUS ++#endif ++ ++apc_segment_t apc_mmap(char *file_mask, size_t size TSRMLS_DC) ++{ ++ apc_segment_t segment; ++ ++ int fd = -1; ++ int flags = MAP_SHARED | MAP_NOSYNC; ++ int remap = 1; ++ ++ /* If no filename was provided, do an anonymous mmap */ ++ if(!file_mask || (file_mask && !strlen(file_mask))) { ++#if !defined(MAP_ANON) ++ apc_error("Anonymous mmap does not apear to be available on this system (MAP_ANON/MAP_ANONYMOUS). Please see the apc.mmap_file_mask INI option." TSRMLS_CC); ++#else ++ fd = -1; ++ flags = MAP_SHARED | MAP_ANON; ++ remap = 0; ++#endif ++ } else if(!strcmp(file_mask,"/dev/zero")) { ++ fd = open("/dev/zero", O_RDWR, S_IRUSR | S_IWUSR); ++ if(fd == -1) { ++ apc_error("apc_mmap: open on /dev/zero failed:" TSRMLS_CC); ++ goto error; ++ } ++ remap = 0; /* cannot remap */ ++ } else if(strstr(file_mask,".shm")) { ++ /* ++ * If the filemask contains .shm we try to do a POSIX-compliant shared memory ++ * backed mmap which should avoid synchs on some platforms. At least on ++ * FreeBSD this implies MAP_NOSYNC and on Linux it is equivalent of mmap'ing ++ * a file in a mounted shmfs. For this to work on Linux you need to make sure ++ * you actually have shmfs mounted. Also on Linux, make sure the file_mask you ++ * pass in has a leading / and no other /'s. eg. /apc.shm.XXXXXX ++ * On FreeBSD these are mapped onto the regular filesystem so you can put whatever ++ * path you want here. ++ */ ++ if(!mktemp(file_mask)) { ++ apc_error("apc_mmap: mktemp on %s failed:" TSRMLS_CC, file_mask); ++ goto error; ++ } ++ fd = shm_open(file_mask, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR); ++ if(fd == -1) { ++ apc_error("apc_mmap: shm_open on %s failed:" TSRMLS_CC, file_mask); ++ goto error; ++ } ++ if (ftruncate(fd, size) < 0) { ++ close(fd); ++ shm_unlink(file_mask); ++ apc_error("apc_mmap: ftruncate failed:" TSRMLS_CC); ++ goto error; ++ } ++ shm_unlink(file_mask); ++ } else { ++ /* ++ * Otherwise we do a normal filesystem mmap ++ */ ++ fd = mkstemp(file_mask); ++ if(fd == -1) { ++ apc_error("apc_mmap: mkstemp on %s failed:" TSRMLS_CC, file_mask); ++ goto error; ++ } ++ if (ftruncate(fd, size) < 0) { ++ close(fd); ++ unlink(file_mask); ++ apc_error("apc_mmap: ftruncate failed:" TSRMLS_CC); ++ goto error; ++ } ++ unlink(file_mask); ++ } ++ ++ segment.shmaddr = (void *)mmap(NULL, size, PROT_READ | PROT_WRITE, flags, fd, 0); ++ ++#ifdef APC_MEMPROTECT ++ if(remap) { ++ segment.roaddr = (void *)mmap(NULL, size, PROT_READ, flags, fd, 0); ++ } else { ++ segment.roaddr = NULL; ++ } ++#endif ++ ++ if((long)segment.shmaddr == -1) { ++ apc_error("apc_mmap: mmap failed:" TSRMLS_CC); ++ } ++ ++ if(fd != -1) close(fd); ++ ++ return segment; ++ ++error: ++ ++ segment.shmaddr = (void*)-1; ++#ifdef APC_MEMPROTECT ++ segment.roaddr = NULL; ++#endif ++ return segment; ++} ++ ++void apc_unmap(apc_segment_t *segment TSRMLS_DC) ++{ ++ if (munmap(segment->shmaddr, segment->size) < 0) { ++ apc_warning("apc_unmap: munmap failed:" TSRMLS_CC); ++ } ++ ++#ifdef APC_MEMPROTECT ++ if (segment->roaddr && munmap(segment->roaddr, segment->size) < 0) { ++ apc_warning("apc_unmap: munmap failed:" TSRMLS_CC); ++ } ++#endif ++ ++} ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_mmap.h +@@ -0,0 +1,54 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Gopal V | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_mmap.h 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#ifndef APC_MMAP_H ++#define APC_MMAP_H ++ ++#include ++ ++#include "apc.h" ++#include "apc_sma.h" ++ ++/* Wrapper functions for shared memory mapped files */ ++ ++#if APC_MMAP ++apc_segment_t apc_mmap(char *file_mask, size_t size TSRMLS_DC); ++void apc_unmap(apc_segment_t* segment TSRMLS_DC); ++#endif ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc.php +@@ -0,0 +1,1362 @@ ++ | ++ | Rasmus Lerdorf | ++ | Ilia Alshanetsky | ++ +----------------------------------------------------------------------+ ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++$VERSION='$Id: apc.php 304410 2010-10-15 11:21:07Z gopalv $'; ++ ++////////// READ OPTIONAL CONFIGURATION FILE //////////// ++if (file_exists("apc.conf.php")) include("apc.conf.php"); ++//////////////////////////////////////////////////////// ++ ++////////// BEGIN OF DEFAULT CONFIG AREA /////////////////////////////////////////////////////////// ++ ++defaults('USE_AUTHENTICATION',1); // Use (internal) authentication - best choice if ++ // no other authentication is available ++ // If set to 0: ++ // There will be no further authentication. You ++ // will have to handle this by yourself! ++ // If set to 1: ++ // You need to change ADMIN_PASSWORD to make ++ // this work! ++defaults('ADMIN_USERNAME','apc'); // Admin Username ++defaults('ADMIN_PASSWORD','password'); // Admin Password - CHANGE THIS TO ENABLE!!! ++ ++// (beckerr) I'm using a clear text password here, because I've no good idea how to let ++// users generate a md5 or crypt password in a easy way to fill it in above ++ ++//defaults('DATE_FORMAT', "d.m.Y H:i:s"); // German ++defaults('DATE_FORMAT', 'Y/m/d H:i:s'); // US ++ ++defaults('GRAPH_SIZE',200); // Image size ++ ++//defaults('PROXY', 'tcp://127.0.0.1:8080'); ++ ++////////// END OF DEFAULT CONFIG AREA ///////////////////////////////////////////////////////////// ++ ++ ++// "define if not defined" ++function defaults($d,$v) { ++ if (!defined($d)) define($d,$v); // or just @define(...) ++} ++ ++// rewrite $PHP_SELF to block XSS attacks ++// ++$PHP_SELF= isset($_SERVER['PHP_SELF']) ? htmlentities(strip_tags($_SERVER['PHP_SELF'],''), ENT_QUOTES, 'UTF-8') : ''; ++$time = time(); ++$host = php_uname('n'); ++if($host) { $host = '('.$host.')'; } ++if (isset($_SERVER['SERVER_ADDR'])) { ++ $host .= ' ('.$_SERVER['SERVER_ADDR'].')'; ++} ++ ++// operation constants ++define('OB_HOST_STATS',1); ++define('OB_SYS_CACHE',2); ++define('OB_USER_CACHE',3); ++define('OB_SYS_CACHE_DIR',4); ++define('OB_VERSION_CHECK',9); ++ ++// check validity of input variables ++$vardom=array( ++ 'OB' => '/^\d+$/', // operational mode switch ++ 'CC' => '/^[01]$/', // clear cache requested ++ 'DU' => '/^.*$/', // Delete User Key ++ 'SH' => '/^[a-z0-9]+$/', // shared object description ++ ++ 'IMG' => '/^[123]$/', // image to generate ++ 'LO' => '/^1$/', // login requested ++ ++ 'COUNT' => '/^\d+$/', // number of line displayed in list ++ 'SCOPE' => '/^[AD]$/', // list view scope ++ 'SORT1' => '/^[AHSMCDTZ]$/', // first sort key ++ 'SORT2' => '/^[DA]$/', // second sort key ++ 'AGGR' => '/^\d+$/', // aggregation by dir level ++ 'SEARCH' => '~^[a-zA-Z0-1/_.-]*$~' // aggregation by dir level ++); ++ ++// default cache mode ++$cache_mode='opcode'; ++ ++// cache scope ++$scope_list=array( ++ 'A' => 'cache_list', ++ 'D' => 'deleted_list' ++); ++ ++// handle POST and GET requests ++if (empty($_REQUEST)) { ++ if (!empty($_GET) && !empty($_POST)) { ++ $_REQUEST = array_merge($_GET, $_POST); ++ } else if (!empty($_GET)) { ++ $_REQUEST = $_GET; ++ } else if (!empty($_POST)) { ++ $_REQUEST = $_POST; ++ } else { ++ $_REQUEST = array(); ++ } ++} ++ ++// check parameter syntax ++foreach($vardom as $var => $dom) { ++ if (!isset($_REQUEST[$var])) { ++ $MYREQUEST[$var]=NULL; ++ } else if (!is_array($_REQUEST[$var]) && preg_match($dom.'D',$_REQUEST[$var])) { ++ $MYREQUEST[$var]=$_REQUEST[$var]; ++ } else { ++ $MYREQUEST[$var]=$_REQUEST[$var]=NULL; ++ } ++} ++ ++// check parameter sematics ++if (empty($MYREQUEST['SCOPE'])) $MYREQUEST['SCOPE']="A"; ++if (empty($MYREQUEST['SORT1'])) $MYREQUEST['SORT1']="H"; ++if (empty($MYREQUEST['SORT2'])) $MYREQUEST['SORT2']="D"; ++if (empty($MYREQUEST['OB'])) $MYREQUEST['OB']=OB_HOST_STATS; ++if (!isset($MYREQUEST['COUNT'])) $MYREQUEST['COUNT']=20; ++if (!isset($scope_list[$MYREQUEST['SCOPE']])) $MYREQUEST['SCOPE']='A'; ++ ++$MY_SELF= ++ "$PHP_SELF". ++ "?SCOPE=".$MYREQUEST['SCOPE']. ++ "&SORT1=".$MYREQUEST['SORT1']. ++ "&SORT2=".$MYREQUEST['SORT2']. ++ "&COUNT=".$MYREQUEST['COUNT']; ++$MY_SELF_WO_SORT= ++ "$PHP_SELF". ++ "?SCOPE=".$MYREQUEST['SCOPE']. ++ "&COUNT=".$MYREQUEST['COUNT']; ++ ++// authentication needed? ++// ++if (!USE_AUTHENTICATION) { ++ $AUTHENTICATED=1; ++} else { ++ $AUTHENTICATED=0; ++ if (ADMIN_PASSWORD!='password' && ($MYREQUEST['LO'] == 1 || isset($_SERVER['PHP_AUTH_USER']))) { ++ ++ if (!isset($_SERVER['PHP_AUTH_USER']) || ++ !isset($_SERVER['PHP_AUTH_PW']) || ++ $_SERVER['PHP_AUTH_USER'] != ADMIN_USERNAME || ++ $_SERVER['PHP_AUTH_PW'] != ADMIN_PASSWORD) { ++ Header("WWW-Authenticate: Basic realm=\"APC Login\""); ++ Header("HTTP/1.0 401 Unauthorized"); ++ ++ echo << ++

Rejected!

++ Wrong Username or Password!
 
  ++ Continue... ++ ++EOB; ++ exit; ++ ++ } else { ++ $AUTHENTICATED=1; ++ } ++ } ++} ++ ++// select cache mode ++if ($AUTHENTICATED && $MYREQUEST['OB'] == OB_USER_CACHE) { ++ $cache_mode='user'; ++} ++// clear cache ++if ($AUTHENTICATED && isset($MYREQUEST['CC']) && $MYREQUEST['CC']) { ++ apc_clear_cache($cache_mode); ++} ++ ++if ($AUTHENTICATED && !empty($MYREQUEST['DU'])) { ++ apc_delete($MYREQUEST['DU']); ++} ++ ++if(!function_exists('apc_cache_info') || !($cache=@apc_cache_info($cache_mode))) { ++ echo "No cache info available. APC does not appear to be running."; ++ exit; ++} ++ ++$cache_user = apc_cache_info('user', 1); ++$mem=apc_sma_info(); ++if(!$cache['num_hits']) { $cache['num_hits']=1; $time++; } // Avoid division by 0 errors on a cache clear ++ ++// don't cache this page ++// ++header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 ++header("Cache-Control: post-check=0, pre-check=0", false); ++header("Pragma: no-cache"); // HTTP/1.0 ++ ++function duration($ts) { ++ global $time; ++ $years = (int)((($time - $ts)/(7*86400))/52.177457); ++ $rem = (int)(($time-$ts)-($years * 52.177457 * 7 * 86400)); ++ $weeks = (int)(($rem)/(7*86400)); ++ $days = (int)(($rem)/86400) - $weeks*7; ++ $hours = (int)(($rem)/3600) - $days*24 - $weeks*7*24; ++ $mins = (int)(($rem)/60) - $hours*60 - $days*24*60 - $weeks*7*24*60; ++ $str = ''; ++ if($years==1) $str .= "$years year, "; ++ if($years>1) $str .= "$years years, "; ++ if($weeks==1) $str .= "$weeks week, "; ++ if($weeks>1) $str .= "$weeks weeks, "; ++ if($days==1) $str .= "$days day,"; ++ if($days>1) $str .= "$days days,"; ++ if($hours == 1) $str .= " $hours hour and"; ++ if($hours>1) $str .= " $hours hours and"; ++ if($mins == 1) $str .= " 1 minute"; ++ else $str .= " $mins minutes"; ++ return $str; ++} ++ ++// create graphics ++// ++function graphics_avail() { ++ return extension_loaded('gd'); ++} ++if (isset($MYREQUEST['IMG'])) ++{ ++ if (!graphics_avail()) { ++ exit(0); ++ } ++ ++ function fill_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1,$color2,$text='',$placeindex=0) { ++ $r=$diameter/2; ++ $w=deg2rad((360+$start+($end-$start)/2)%360); ++ ++ ++ if (function_exists("imagefilledarc")) { ++ // exists only if GD 2.0.1 is avaliable ++ imagefilledarc($im, $centerX+1, $centerY+1, $diameter, $diameter, $start, $end, $color1, IMG_ARC_PIE); ++ imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color2, IMG_ARC_PIE); ++ imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color1, IMG_ARC_NOFILL|IMG_ARC_EDGED); ++ } else { ++ imagearc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color2); ++ imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($start)) * $r, $centerY + sin(deg2rad($start)) * $r, $color2); ++ imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($start+1)) * $r, $centerY + sin(deg2rad($start)) * $r, $color2); ++ imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($end-1)) * $r, $centerY + sin(deg2rad($end)) * $r, $color2); ++ imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($end)) * $r, $centerY + sin(deg2rad($end)) * $r, $color2); ++ imagefill($im,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2, $color2); ++ } ++ if ($text) { ++ if ($placeindex>0) { ++ imageline($im,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2,$diameter, $placeindex*12,$color1); ++ imagestring($im,4,$diameter, $placeindex*12,$text,$color1); ++ ++ } else { ++ imagestring($im,4,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2,$text,$color1); ++ } ++ } ++ } ++ ++ function text_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1,$text,$placeindex=0) { ++ $r=$diameter/2; ++ $w=deg2rad((360+$start+($end-$start)/2)%360); ++ ++ if ($placeindex>0) { ++ imageline($im,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2,$diameter, $placeindex*12,$color1); ++ imagestring($im,4,$diameter, $placeindex*12,$text,$color1); ++ ++ } else { ++ imagestring($im,4,$centerX + $r*cos($w)/2, $centerY + $r*sin($w)/2,$text,$color1); ++ } ++ } ++ ++ function fill_box($im, $x, $y, $w, $h, $color1, $color2,$text='',$placeindex='') { ++ global $col_black; ++ $x1=$x+$w-1; ++ $y1=$y+$h-1; ++ ++ imagerectangle($im, $x, $y1, $x1+1, $y+1, $col_black); ++ if($y1>$y) imagefilledrectangle($im, $x, $y, $x1, $y1, $color2); ++ else imagefilledrectangle($im, $x, $y1, $x1, $y, $color2); ++ imagerectangle($im, $x, $y1, $x1, $y, $color1); ++ if ($text) { ++ if ($placeindex>0) { ++ ++ if ($placeindex<16) ++ { ++ $px=5; ++ $py=$placeindex*12+6; ++ imagefilledrectangle($im, $px+90, $py+3, $px+90-4, $py-3, $color2); ++ imageline($im,$x,$y+$h/2,$px+90,$py,$color2); ++ imagestring($im,2,$px,$py-6,$text,$color1); ++ ++ } else { ++ if ($placeindex<31) { ++ $px=$x+40*2; ++ $py=($placeindex-15)*12+6; ++ } else { ++ $px=$x+40*2+100*intval(($placeindex-15)/15); ++ $py=($placeindex%15)*12+6; ++ } ++ imagefilledrectangle($im, $px, $py+3, $px-4, $py-3, $color2); ++ imageline($im,$x+$w,$y+$h/2,$px,$py,$color2); ++ imagestring($im,2,$px+2,$py-6,$text,$color1); ++ } ++ } else { ++ imagestring($im,4,$x+5,$y1-16,$text,$color1); ++ } ++ } ++ } ++ ++ ++ $size = GRAPH_SIZE; // image size ++ if ($MYREQUEST['IMG']==3) ++ $image = imagecreate(2*$size+150, $size+10); ++ else ++ $image = imagecreate($size+50, $size+10); ++ ++ $col_white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF); ++ $col_red = imagecolorallocate($image, 0xD0, 0x60, 0x30); ++ $col_green = imagecolorallocate($image, 0x60, 0xF0, 0x60); ++ $col_black = imagecolorallocate($image, 0, 0, 0); ++ imagecolortransparent($image,$col_white); ++ ++ switch ($MYREQUEST['IMG']) { ++ ++ case 1: ++ $s=$mem['num_seg']*$mem['seg_size']; ++ $a=$mem['avail_mem']; ++ $x=$y=$size/2; ++ $fuzz = 0.000001; ++ ++ // This block of code creates the pie chart. It is a lot more complex than you ++ // would expect because we try to visualize any memory fragmentation as well. ++ $angle_from = 0; ++ $string_placement=array(); ++ for($i=0; $i<$mem['num_seg']; $i++) { ++ $ptr = 0; ++ $free = $mem['block_lists'][$i]; ++ uasort($free, 'block_sort'); ++ foreach($free as $block) { ++ if($block['offset']!=$ptr) { // Used block ++ $angle_to = $angle_from+($block['offset']-$ptr)/$s; ++ if(($angle_to+$fuzz)>1) $angle_to = 1; ++ if( ($angle_to*360) - ($angle_from*360) >= 1) { ++ fill_arc($image,$x,$y,$size,$angle_from*360,$angle_to*360,$col_black,$col_red); ++ if (($angle_to-$angle_from)>0.05) { ++ array_push($string_placement, array($angle_from,$angle_to)); ++ } ++ } ++ $angle_from = $angle_to; ++ } ++ $angle_to = $angle_from+($block['size'])/$s; ++ if(($angle_to+$fuzz)>1) $angle_to = 1; ++ if( ($angle_to*360) - ($angle_from*360) >= 1) { ++ fill_arc($image,$x,$y,$size,$angle_from*360,$angle_to*360,$col_black,$col_green); ++ if (($angle_to-$angle_from)>0.05) { ++ array_push($string_placement, array($angle_from,$angle_to)); ++ } ++ } ++ $angle_from = $angle_to; ++ $ptr = $block['offset']+$block['size']; ++ } ++ if ($ptr < $mem['seg_size']) { // memory at the end ++ $angle_to = $angle_from + ($mem['seg_size'] - $ptr)/$s; ++ if(($angle_to+$fuzz)>1) $angle_to = 1; ++ fill_arc($image,$x,$y,$size,$angle_from*360,$angle_to*360,$col_black,$col_red); ++ if (($angle_to-$angle_from)>0.05) { ++ array_push($string_placement, array($angle_from,$angle_to)); ++ } ++ } ++ } ++ foreach ($string_placement as $angle) { ++ text_arc($image,$x,$y,$size,$angle[0]*360,$angle[1]*360,$col_black,bsize($s*($angle[1]-$angle[0]))); ++ } ++ break; ++ ++ case 2: ++ $s=$cache['num_hits']+$cache['num_misses']; ++ $a=$cache['num_hits']; ++ ++ fill_box($image, 30,$size,50,-$a*($size-21)/$s,$col_black,$col_green,sprintf("%.1f%%",$cache['num_hits']*100/$s)); ++ fill_box($image,130,$size,50,-max(4,($s-$a)*($size-21)/$s),$col_black,$col_red,sprintf("%.1f%%",$cache['num_misses']*100/$s)); ++ break; ++ ++ case 3: ++ $s=$mem['num_seg']*$mem['seg_size']; ++ $a=$mem['avail_mem']; ++ $x=130; ++ $y=1; ++ $j=1; ++ ++ // This block of code creates the bar chart. It is a lot more complex than you ++ // would expect because we try to visualize any memory fragmentation as well. ++ for($i=0; $i<$mem['num_seg']; $i++) { ++ $ptr = 0; ++ $free = $mem['block_lists'][$i]; ++ uasort($free, 'block_sort'); ++ foreach($free as $block) { ++ if($block['offset']!=$ptr) { // Used block ++ $h=(GRAPH_SIZE-5)*($block['offset']-$ptr)/$s; ++ if ($h>0) { ++ $j++; ++ if($j<75) fill_box($image,$x,$y,50,$h,$col_black,$col_red,bsize($block['offset']-$ptr),$j); ++ else fill_box($image,$x,$y,50,$h,$col_black,$col_red); ++ } ++ $y+=$h; ++ } ++ $h=(GRAPH_SIZE-5)*($block['size'])/$s; ++ if ($h>0) { ++ $j++; ++ if($j<75) fill_box($image,$x,$y,50,$h,$col_black,$col_green,bsize($block['size']),$j); ++ else fill_box($image,$x,$y,50,$h,$col_black,$col_green); ++ } ++ $y+=$h; ++ $ptr = $block['offset']+$block['size']; ++ } ++ if ($ptr < $mem['seg_size']) { // memory at the end ++ $h = (GRAPH_SIZE-5) * ($mem['seg_size'] - $ptr) / $s; ++ if ($h > 0) { ++ fill_box($image,$x,$y,50,$h,$col_black,$col_red,bsize($mem['seg_size']-$ptr),$j++); ++ } ++ } ++ } ++ break; ++ case 4: ++ $s=$cache['num_hits']+$cache['num_misses']; ++ $a=$cache['num_hits']; ++ ++ fill_box($image, 30,$size,50,-$a*($size-21)/$s,$col_black,$col_green,sprintf("%.1f%%",$cache['num_hits']*100/$s)); ++ fill_box($image,130,$size,50,-max(4,($s-$a)*($size-21)/$s),$col_black,$col_red,sprintf("%.1f%%",$cache['num_misses']*100/$s)); ++ break; ++ ++ } ++ header("Content-type: image/png"); ++ imagepng($image); ++ exit; ++} ++ ++// pretty printer for byte values ++// ++function bsize($s) { ++ foreach (array('','K','M','G') as $i => $k) { ++ if ($s < 1024) break; ++ $s/=1024; ++ } ++ return sprintf("%5.1f %sBytes",$s,$k); ++} ++ ++// sortable table header in "scripts for this host" view ++function sortheader($key,$name,$extra='') { ++ global $MYREQUEST, $MY_SELF_WO_SORT; ++ ++ if ($MYREQUEST['SORT1']==$key) { ++ $MYREQUEST['SORT2'] = $MYREQUEST['SORT2']=='A' ? 'D' : 'A'; ++ } ++ return "$name"; ++ ++} ++ ++// create menu entry ++function menu_entry($ob,$title) { ++ global $MYREQUEST,$MY_SELF; ++ if ($MYREQUEST['OB']!=$ob) { ++ return "
  • $title
  • "; ++ } else if (empty($MYREQUEST['SH'])) { ++ return "
  • $title
  • "; ++ } else { ++ return "
  • $title
  • "; ++ } ++} ++ ++function put_login_link($s="Login") ++{ ++ global $MY_SELF,$MYREQUEST,$AUTHENTICATED; ++ // needs ADMIN_PASSWORD to be changed! ++ // ++ if (!USE_AUTHENTICATION) { ++ return; ++ } else if (ADMIN_PASSWORD=='password') ++ { ++ print <<$s ++EOB; ++ } else if ($AUTHENTICATED) { ++ print <<$s ++EOB; ++ } ++} ++ ++function block_sort($array1, $array2) ++{ ++ if ($array1['offset'] > $array2['offset']) { ++ return 1; ++ } else { ++ return -1; ++ } ++} ++ ++ ++?> ++ ++ ++APC INFO <?php echo $host ?> ++ ++ ++ ++
    ++

    ++ ++
    Opcode Cache
    ++

    ++ ++
    ++
    ++ ++
  • Refresh Data
  • ++EOB; ++echo ++ menu_entry(1,'View Host Stats'), ++ menu_entry(2,'System Cache Entries'); ++if ($AUTHENTICATED) { ++ echo menu_entry(4,'Per-Directory Entries'); ++} ++echo ++ menu_entry(3,'User Cache Entries'), ++ menu_entry(9,'Version Check'); ++ ++if ($AUTHENTICATED) { ++ echo <<Clear $cache_mode Cache ++EOB; ++} ++echo << ++EOB; ++ ++ ++// CONTENT ++echo << ++EOB; ++ ++// MAIN SWITCH STATEMENT ++ ++switch ($MYREQUEST['OB']) { ++ ++ ++ ++ ++ ++// ----------------------------------------------- ++// Host Stats ++// ----------------------------------------------- ++case OB_HOST_STATS: ++ $mem_size = $mem['num_seg']*$mem['seg_size']; ++ $mem_avail= $mem['avail_mem']; ++ $mem_used = $mem_size-$mem_avail; ++ $seg_size = bsize($mem['seg_size']); ++ $req_rate = sprintf("%.2f",($cache['num_hits']+$cache['num_misses'])/($time-$cache['start_time'])); ++ $hit_rate = sprintf("%.2f",($cache['num_hits'])/($time-$cache['start_time'])); ++ $miss_rate = sprintf("%.2f",($cache['num_misses'])/($time-$cache['start_time'])); ++ $insert_rate = sprintf("%.2f",($cache['num_inserts'])/($time-$cache['start_time'])); ++ $req_rate_user = sprintf("%.2f",($cache_user['num_hits']+$cache_user['num_misses'])/($time-$cache_user['start_time'])); ++ $hit_rate_user = sprintf("%.2f",($cache_user['num_hits'])/($time-$cache_user['start_time'])); ++ $miss_rate_user = sprintf("%.2f",($cache_user['num_misses'])/($time-$cache_user['start_time'])); ++ $insert_rate_user = sprintf("%.2f",($cache_user['num_inserts'])/($time-$cache_user['start_time'])); ++ $apcversion = phpversion('apc'); ++ $phpversion = phpversion(); ++ $number_files = $cache['num_entries']; ++ $size_files = bsize($cache['mem_size']); ++ $number_vars = $cache_user['num_entries']; ++ $size_vars = bsize($cache_user['mem_size']); ++ $i=0; ++ echo <<< EOB ++

    General Cache Information

    ++ ++ ++ ++EOB; ++ ++ if(!empty($_SERVER['SERVER_NAME'])) ++ echo "\n"; ++ if(!empty($_SERVER['SERVER_SOFTWARE'])) ++ echo "\n"; ++ ++ echo << ++EOB; ++ echo ''; ++ echo ''; ++ echo ''; ++ echo <<
    APC Version$apcversion
    PHP Version$phpversion
    APC Host{$_SERVER['SERVER_NAME']} $host
    Server Software{$_SERVER['SERVER_SOFTWARE']}
    Shared Memory{$mem['num_seg']} Segment(s) with $seg_size ++
    ({$cache['memory_type']} memory, {$cache['locking_type']} locking) ++
    Start Time',date(DATE_FORMAT,$cache['start_time']),'
    Uptime',duration($cache['start_time']),'
    File Upload Support',$cache['file_upload_progress'],'
    ++
    ++ ++

    File Cache Information

    ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
    Cached Files$number_files ($size_files)
    Hits{$cache['num_hits']}
    Misses{$cache['num_misses']}
    Request Rate (hits, misses)$req_rate cache requests/second
    Hit Rate$hit_rate cache requests/second
    Miss Rate$miss_rate cache requests/second
    Insert Rate$insert_rate cache requests/second
    Cache full count{$cache['expunges']}
    ++
    ++ ++

    User Cache Information

    ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
    Cached Variables$number_vars ($size_vars)
    Hits{$cache_user['num_hits']}
    Misses{$cache_user['num_misses']}
    Request Rate (hits, misses)$req_rate_user cache requests/second
    Hit Rate$hit_rate_user cache requests/second
    Miss Rate$miss_rate_user cache requests/second
    Insert Rate$insert_rate_user cache requests/second
    Cache full count{$cache_user['expunges']}
    ++
    ++ ++

    Runtime Settings

    ++EOB; ++ ++ $j = 0; ++ foreach (ini_get_all('apc') as $k => $v) { ++ echo "\n"; ++ $j = 1 - $j; ++ } ++ ++ if($mem['num_seg']>1 || $mem['num_seg']==1 && count($mem['block_lists'][0])>1) ++ $mem_note = "Memory Usage
    (multiple slices indicate fragments)"; ++ else ++ $mem_note = "Memory Usage"; ++ ++ echo <<< EOB ++
    ",$k,"",str_replace(',',',
    ',$v['local_value']),"
    ++
    ++ ++

    Host Status Diagrams

    ++ ++EOB; ++ $size='width='.(GRAPH_SIZE+50).' height='.(GRAPH_SIZE+10); ++ echo << ++ ++ ++ ++EOB; ++ ++ echo ++ graphics_avail() ? ++ ''. ++ "". ++ "\n" ++ : "", ++ '', ++ '\n", ++ '\n", ++ '', ++ '', ++ '\n", ++ '\n"; ++ echo <<< EOB ++ ++
    $mem_noteHits & Misses
    \"\"\"\"
     Free: ',bsize($mem_avail).sprintf(" (%.1f%%)",$mem_avail*100/$mem_size)," Hits: ',$cache['num_hits'].sprintf(" (%.1f%%)",$cache['num_hits']*100/($cache['num_hits']+$cache['num_misses'])),"
     Used: ',bsize($mem_used ).sprintf(" (%.1f%%)",$mem_used *100/$mem_size)," Misses: ',$cache['num_misses'].sprintf(" (%.1f%%)",$cache['num_misses']*100/($cache['num_hits']+$cache['num_misses'])),"
    ++ ++
    ++

    Detailed Memory Usage and Fragmentation

    ++ ++ ++ ++ ++EOB; ++ if(isset($mem['adist'])) { ++ foreach($mem['adist'] as $i=>$v) { ++ $cur = pow(2,$i); $nxt = pow(2,$i+1)-1; ++ if($i==0) $range = "1"; ++ else $range = "$cur - $nxt"; ++ echo "\n"; ++ } ++ } ++ echo <<

    ++EOB; ++ ++ // Fragementation: (freeseg - 1) / total_seg ++ $nseg = $freeseg = $fragsize = $freetotal = 0; ++ for($i=0; $i<$mem['num_seg']; $i++) { ++ $ptr = 0; ++ foreach($mem['block_lists'][$i] as $block) { ++ if ($block['offset'] != $ptr) { ++ ++$nseg; ++ } ++ $ptr = $block['offset'] + $block['size']; ++ /* Only consider blocks <5M for the fragmentation % */ ++ if($block['size']<(5*1024*1024)) $fragsize+=$block['size']; ++ $freetotal+=$block['size']; ++ } ++ $freeseg += count($mem['block_lists'][$i]); ++ } ++ ++ if ($freeseg > 1) { ++ $frag = sprintf("%.2f%% (%s out of %s in %d fragments)", ($fragsize/$freetotal)*100,bsize($fragsize),bsize($freetotal),$freeseg); ++ } else { ++ $frag = "0%"; ++ } ++ ++ if (graphics_avail()) { ++ $size='width='.(2*GRAPH_SIZE+150).' height='.(GRAPH_SIZE+10); ++ echo << ++EOB; ++ } ++ echo <<Fragmentation: $frag ++
    $range$v
    ++
    ++EOB; ++ ++ break; ++ ++ ++// ----------------------------------------------- ++// User Cache Entries ++// ----------------------------------------------- ++case OB_USER_CACHE: ++ if (!$AUTHENTICATED) { ++ echo '
    You need to login to see the user values here!
     
    '; ++ put_login_link("Login now!"); ++ echo '
    '; ++ break; ++ } ++ $fieldname='info'; ++ $fieldheading='User Entry Label'; ++ $fieldkey='info'; ++ ++// ----------------------------------------------- ++// System Cache Entries ++// ----------------------------------------------- ++case OB_SYS_CACHE: ++ if (!isset($fieldname)) ++ { ++ $fieldname='filename'; ++ $fieldheading='Script Filename'; ++ if(ini_get("apc.stat")) $fieldkey='inode'; ++ else $fieldkey='filename'; ++ } ++ if (!empty($MYREQUEST['SH'])) ++ { ++ echo <<< EOB ++
    ++ ++EOB; ++ ++ $m=0; ++ foreach($scope_list as $j => $list) { ++ foreach($cache[$list] as $i => $entry) { ++ if (md5($entry[$fieldkey])!=$MYREQUEST['SH']) continue; ++ foreach($entry as $k => $value) { ++ if (!$AUTHENTICATED) { ++ // hide all path entries if not logged in ++ $value=preg_replace('/^.*(\\/|\\\\)/','<hidden>/',$value); ++ } ++ ++ if ($k == "num_hits") { ++ $value=sprintf("%s (%.2f%%)",$value,$value*100/$cache['num_hits']); ++ } ++ if ($k == 'deletion_time') { ++ if(!$entry['deletion_time']) $value = "None"; ++ } ++ echo ++ "", ++ "", ++ "", ++ ""; ++ $m=1-$m; ++ } ++ if($fieldkey=='info') { ++ echo "\n"; ++ } ++ break; ++ } ++ } ++ ++ echo <<
    AttributeValue
    ",ucwords(preg_replace("/_/"," ",$k)),"",(preg_match("/time/",$k) && $value!='None') ? date(DATE_FORMAT,$value) : htmlspecialchars($value, ENT_QUOTES, 'UTF-8'),"
    Stored Value
    ";
    ++					$output = var_export(apc_fetch($entry[$fieldkey]),true);
    ++					echo htmlspecialchars($output, ENT_QUOTES, 'UTF-8');
    ++					echo "
    ++
    ++EOB; ++ break; ++ } ++ ++ $cols=6; ++ echo <<
    Scope: ++ ++ ", ++ ", Sorting:', ++ '', ++ '', ++ '  Search: ', ++ ' ', ++ '
    '; ++ ++ if (isset($MYREQUEST['SEARCH'])) { ++ // Don't use preg_quote because we want the user to be able to specify a ++ // regular expression subpattern. ++ $MYREQUEST['SEARCH'] = '/'.str_replace('/', '\\/', $MYREQUEST['SEARCH']).'/i'; ++ if (preg_match($MYREQUEST['SEARCH'], 'test') === false) { ++ echo '
    Error: enter a valid regular expression as a search query.
    '; ++ break; ++ } ++ } ++ ++ echo ++ '
    ', ++ '', ++ '', ++ '', ++ '', ++ '', ++ '', ++ ''; ++ ++ if($fieldname=='info') { ++ $cols+=2; ++ echo ''; ++ } ++ echo ''; ++ ++ // builds list with alpha numeric sortable keys ++ // ++ $list = array(); ++ foreach($cache[$scope_list[$MYREQUEST['SCOPE']]] as $i => $entry) { ++ switch($MYREQUEST['SORT1']) { ++ case 'A': $k=sprintf('%015d-',$entry['access_time']); break; ++ case 'H': $k=sprintf('%015d-',$entry['num_hits']); break; ++ case 'Z': $k=sprintf('%015d-',$entry['mem_size']); break; ++ case 'M': $k=sprintf('%015d-',$entry['mtime']); break; ++ case 'C': $k=sprintf('%015d-',$entry['creation_time']); break; ++ case 'T': $k=sprintf('%015d-',$entry['ttl']); break; ++ case 'D': $k=sprintf('%015d-',$entry['deletion_time']); break; ++ case 'S': $k=''; break; ++ } ++ if (!$AUTHENTICATED) { ++ // hide all path entries if not logged in ++ $list[$k.$entry[$fieldname]]=preg_replace('/^.*(\\/|\\\\)/','*hidden*/',$entry); ++ } else { ++ $list[$k.$entry[$fieldname]]=$entry; ++ } ++ } ++ ++ if ($list) { ++ ++ // sort list ++ // ++ switch ($MYREQUEST['SORT2']) { ++ case "A": krsort($list); break; ++ case "D": ksort($list); break; ++ } ++ ++ // output list ++ $i=0; ++ foreach($list as $k => $entry) { ++ if(!$MYREQUEST['SEARCH'] || preg_match($MYREQUEST['SEARCH'], $entry[$fieldname]) != 0) { ++ $field_value = htmlentities(strip_tags($entry[$fieldname],''), ENT_QUOTES, 'UTF-8'); ++ echo ++ '', ++ "', ++ '', ++ '', ++ '', ++ '', ++ ''; ++ ++ if($fieldname=='info') { ++ if($entry['ttl']) ++ echo ''; ++ else ++ echo ''; ++ } ++ if ($entry['deletion_time']) { ++ ++ echo ''; ++ } else if ($MYREQUEST['OB'] == OB_USER_CACHE) { ++ ++ echo ''; ++ } else { ++ echo ''; ++ } ++ echo ''; ++ $i++; ++ if ($i == $MYREQUEST['COUNT']) ++ break; ++ } ++ } ++ ++ } else { ++ echo ''; ++ } ++ echo <<< EOB ++
    ',sortheader('S',$fieldheading, "&OB=".$MYREQUEST['OB']),'',sortheader('H','Hits', "&OB=".$MYREQUEST['OB']),'',sortheader('Z','Size', "&OB=".$MYREQUEST['OB']),'',sortheader('A','Last accessed',"&OB=".$MYREQUEST['OB']),'',sortheader('M','Last modified',"&OB=".$MYREQUEST['OB']),'',sortheader('C','Created at', "&OB=".$MYREQUEST['OB']),'',sortheader('T','Timeout',"&OB=".$MYREQUEST['OB']),'',sortheader('D','Deleted at',"&OB=".$MYREQUEST['OB']),'
    ",$field_value,'',$entry['num_hits'],'',$entry['mem_size'],'',date(DATE_FORMAT,$entry['access_time']),'',date(DATE_FORMAT,$entry['mtime']),'',date(DATE_FORMAT,$entry['creation_time']),''.$entry['ttl'].' secondsNone', date(DATE_FORMAT,$entry['deletion_time']), ''; ++ echo '[Delete Now]'; ++ echo '  
    No data
    ++EOB; ++ ++ if ($list && $i < count($list)) { ++ echo "",count($list)-$i,' more available...'; ++ } ++ ++ echo <<< EOB ++
    ++EOB; ++ break; ++ ++ ++// ----------------------------------------------- ++// Per-Directory System Cache Entries ++// ----------------------------------------------- ++case OB_SYS_CACHE_DIR: ++ if (!$AUTHENTICATED) { ++ break; ++ } ++ ++ echo <<
    Scope: ++ ++ ", ++ ", Sorting:', ++ '', ++ '', ++ ", Group By Dir Level:', ++ ' ', ++ '
    ', ++ ++ '
    ', ++ '', ++ '', ++ '', ++ '', ++ '', ++ '', ++ '', ++ ''; ++ ++ // builds list with alpha numeric sortable keys ++ // ++ $tmp = $list = array(); ++ foreach($cache[$scope_list[$MYREQUEST['SCOPE']]] as $entry) { ++ $n = dirname($entry['filename']); ++ if ($MYREQUEST['AGGR'] > 0) { ++ $n = preg_replace("!^(/?(?:[^/\\\\]+[/\\\\]){".($MYREQUEST['AGGR']-1)."}[^/\\\\]*).*!", "$1", $n); ++ } ++ if (!isset($tmp[$n])) { ++ $tmp[$n] = array('hits'=>0,'size'=>0,'ents'=>0); ++ } ++ $tmp[$n]['hits'] += $entry['num_hits']; ++ $tmp[$n]['size'] += $entry['mem_size']; ++ ++$tmp[$n]['ents']; ++ } ++ ++ foreach ($tmp as $k => $v) { ++ switch($MYREQUEST['SORT1']) { ++ case 'A': $kn=sprintf('%015d-',$v['size'] / $v['ents']);break; ++ case 'T': $kn=sprintf('%015d-',$v['ents']); break; ++ case 'H': $kn=sprintf('%015d-',$v['hits']); break; ++ case 'Z': $kn=sprintf('%015d-',$v['size']); break; ++ case 'C': $kn=sprintf('%015d-',$v['hits'] / $v['ents']);break; ++ case 'S': $kn = $k; break; ++ } ++ $list[$kn.$k] = array($k, $v['ents'], $v['hits'], $v['size']); ++ } ++ ++ if ($list) { ++ ++ // sort list ++ // ++ switch ($MYREQUEST['SORT2']) { ++ case "A": krsort($list); break; ++ case "D": ksort($list); break; ++ } ++ ++ // output list ++ $i = 0; ++ foreach($list as $entry) { ++ echo ++ '', ++ "', ++ '', ++ '', ++ '', ++ '', ++ '', ++ ''; ++ ++ if (++$i == $MYREQUEST['COUNT']) break; ++ } ++ ++ } else { ++ echo ''; ++ } ++ echo <<< EOB ++
    ',sortheader('S','Directory Name', "&OB=".$MYREQUEST['OB']),'',sortheader('T','Number of Files',"&OB=".$MYREQUEST['OB']),'',sortheader('H','Total Hits', "&OB=".$MYREQUEST['OB']),'',sortheader('Z','Total Size', "&OB=".$MYREQUEST['OB']),'',sortheader('C','Avg. Hits', "&OB=".$MYREQUEST['OB']),'',sortheader('A','Avg. Size', "&OB=".$MYREQUEST['OB']),'
    ",$entry[0],'',$entry[1],'',$entry[2],'',$entry[3],'',round($entry[2] / $entry[1]),'',round($entry[3] / $entry[1]),'
    No data
    ++EOB; ++ ++ if ($list && $i < count($list)) { ++ echo "",count($list)-$i,' more available...'; ++ } ++ ++ echo <<< EOB ++
    ++EOB; ++ break; ++ ++// ----------------------------------------------- ++// Version check ++// ----------------------------------------------- ++case OB_VERSION_CHECK: ++ echo <<

    APC Version Information

    ++ ++ ++ ++ ++EOB; ++ if (defined('PROXY')) { ++ $ctxt = stream_context_create( array( 'http' => array( 'proxy' => PROXY, 'request_fulluri' => True ) ) ); ++ $rss = @file_get_contents("http://pecl.php.net/feeds/pkg_apc.rss", False, $ctxt); ++ } else { ++ $rss = @file_get_contents("http://pecl.php.net/feeds/pkg_apc.rss"); ++ } ++ if (!$rss) { ++ echo ''; ++ } else { ++ $apcversion = phpversion('apc'); ++ ++ preg_match('!APC ([0-9.]+)!', $rss, $match); ++ echo ''; ++ echo ''; ++ } ++ echo <<< EOB ++
    Unable to fetch version information.
    '; ++ if (version_compare($apcversion, $match[1], '>=')) { ++ echo '
    You are running the latest version of APC ('.$apcversion.')
    '; ++ $i = 3; ++ } else { ++ echo '
    You are running an older version of APC ('.$apcversion.'), ++ newer version '.$match[1].' is available at ++ http://pecl.php.net/package/APC/'.$match[1].' ++
    '; ++ $i = -1; ++ } ++ echo '

    Change Log:


    '; ++ ++ preg_match_all('!<(title|description)>([^<]+)!', $rss, $match); ++ next($match[2]); next($match[2]); ++ ++ while (list(,$v) = each($match[2])) { ++ list(,$ver) = explode(' ', $v, 2); ++ if ($i < 0 && version_compare($apcversion, $ver, '>=')) { ++ break; ++ } else if (!$i--) { ++ break; ++ } ++ echo "".htmlspecialchars($v, ENT_QUOTES, 'UTF-8')."
    "; ++ echo nl2br(htmlspecialchars(current($match[2]), ENT_QUOTES, 'UTF-8'))."
    "; ++ next($match[2]); ++ } ++ echo '
    ++ ++EOB; ++ break; ++ ++} ++ ++echo <<< EOB ++ ++EOB; ++ ++?> ++ ++ ++ ++ +--- /dev/null ++++ b/ext/apc/apc_php.h +@@ -0,0 +1,77 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | George Schlossnagle | ++ | Rasmus Lerdorf | ++ | Arun C. Murthy | ++ | Gopal Vijayaraghavan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_php.h 300979 2010-07-04 10:15:05Z kalle $ */ ++ ++#ifndef APC_PHP_H ++#define APC_PHP_H ++ ++/* ++ * The purpose of this header file is to include all PHP and Zend headers that ++ * are typically needed elsewhere in APC. This makes it easy to insure that ++ * all required headers are available. ++ */ ++ ++#include "php.h" ++#include "zend.h" ++#include "zend_API.h" ++#include "zend_compile.h" ++#include "zend_hash.h" ++#include "zend_extensions.h" ++ ++#if ZEND_MODULE_API_NO >= 20100409 ++#define ZEND_ENGINE_2_4 ++#endif ++#if ZEND_MODULE_API_NO > 20060613 ++#define ZEND_ENGINE_2_3 ++#endif ++#if ZEND_MODULE_API_NO > 20050922 ++#define ZEND_ENGINE_2_2 ++#endif ++#if ZEND_MODULE_API_NO > 20050921 ++#define ZEND_ENGINE_2_1 ++#endif ++#ifdef ZEND_ENGINE_2_1 ++#include "zend_vm.h" ++#endif ++ ++#include "rfc1867.h" ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_php_pcre.h +@@ -0,0 +1,98 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC/PHP Version 5 | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 1997-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Author: Andrei Zmievski | ++ +----------------------------------------------------------------------+ ++ */ ++ ++/* $Id: apc_php_pcre.h 300979 2010-07-04 10:15:05Z kalle $ */ ++ ++#ifndef PHP_PCRE_H ++#define PHP_PCRE_H ++ ++#if HAVE_PCRE || HAVE_BUNDLED_PCRE ++ ++#if HAVE_BUNDLED_PCRE ++#include "ext/pcre/pcrelib/pcre.h" ++#else ++#include "pcre.h" ++#endif ++ ++#if HAVE_LOCALE_H ++#include ++#endif ++ ++PHP_FUNCTION(preg_match); ++PHP_FUNCTION(preg_match_all); ++PHP_FUNCTION(preg_replace); ++PHP_FUNCTION(preg_replace_callback); ++PHP_FUNCTION(preg_split); ++PHP_FUNCTION(preg_quote); ++PHP_FUNCTION(preg_grep); ++ ++PHPAPI char *php_pcre_replace(char *regex, int regex_len, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int *result_len, int limit, int *replace_count TSRMLS_DC); ++PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *options TSRMLS_DC); ++PHPAPI pcre* pcre_get_compiled_regex_ex(char *regex, pcre_extra **extra, int *preg_options, int *coptions TSRMLS_DC); ++ ++extern zend_module_entry pcre_module_entry; ++#define pcre_module_ptr &pcre_module_entry ++ ++typedef struct { ++ pcre *re; ++ pcre_extra *extra; ++ int preg_options; ++#if HAVE_SETLOCALE ++ char *locale; ++ unsigned const char *tables; ++#endif ++ int compile_options; ++ int refcount; ++} pcre_cache_entry; ++ ++PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_len TSRMLS_DC); ++ ++PHPAPI void php_pcre_match_impl( pcre_cache_entry *pce, char *subject, int subject_len, zval *return_value, ++ zval *subpats, int global, int use_flags, long flags, long start_offset TSRMLS_DC); ++ ++PHPAPI char *php_pcre_replace_impl(pcre_cache_entry *pce, char *subject, int subject_len, zval *return_value, ++ int is_callable_replace, int *result_len, int limit, int *replace_count TSRMLS_DC); ++ ++PHPAPI void php_pcre_split_impl( pcre_cache_entry *pce, char *subject, int subject_len, zval *return_value, ++ long limit_val, long flags TSRMLS_DC); ++ ++PHPAPI void php_pcre_grep_impl( pcre_cache_entry *pce, zval *input, zval *return_value, ++ long flags TSRMLS_DC); ++ ++ZEND_BEGIN_MODULE_GLOBALS(pcre) ++ HashTable pcre_cache; ++ long backtrack_limit; ++ long recursion_limit; ++ int error_code; ++ZEND_END_MODULE_GLOBALS(pcre) ++ ++#ifdef ZTS ++# define PCRE_G(v) TSRMG(pcre_globals_id, zend_pcre_globals *, v) ++#else ++# define PCRE_G(v) (pcre_globals.v) ++#endif ++ ++#else ++ ++#define pcre_module_ptr NULL ++ ++#endif /* HAVE_PCRE || HAVE_BUNDLED_PCRE */ ++ ++#define phpext_pcre_ptr pcre_module_ptr ++ ++#endif /* PHP_PCRE_H */ +--- /dev/null ++++ b/ext/apc/apc_pool.c +@@ -0,0 +1,488 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt. | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Gopal Vijayaraghavan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Yahoo! Inc. in 2008. ++ ++ Future revisions and derivatives of this source code must acknowledge ++ Yahoo! Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_pool.c 301964 2010-08-07 03:34:18Z rasmus $ */ ++ ++ ++#include "apc_pool.h" ++#include ++ ++#ifdef HAVE_VALGRIND_MEMCHECK_H ++#include ++#endif ++ ++ ++/* {{{ forward references */ ++static apc_pool* apc_unpool_create(apc_pool_type type, apc_malloc_t, apc_free_t, apc_protect_t, apc_unprotect_t TSRMLS_DC); ++static apc_pool* apc_realpool_create(apc_pool_type type, apc_malloc_t, apc_free_t, apc_protect_t, apc_unprotect_t TSRMLS_DC); ++/* }}} */ ++ ++/* {{{ apc_pool_create */ ++apc_pool* apc_pool_create(apc_pool_type pool_type, ++ apc_malloc_t allocate, ++ apc_free_t deallocate, ++ apc_protect_t protect, ++ apc_unprotect_t unprotect ++ TSRMLS_DC) ++{ ++ if(pool_type == APC_UNPOOL) { ++ return apc_unpool_create(pool_type, allocate, deallocate, ++ protect, unprotect TSRMLS_CC); ++ } ++ ++ return apc_realpool_create(pool_type, allocate, deallocate, ++ protect, unprotect TSRMLS_CC); ++} ++/* }}} */ ++ ++/* {{{ apc_pool_destroy */ ++void apc_pool_destroy(apc_pool *pool TSRMLS_DC) ++{ ++ apc_free_t deallocate = pool->deallocate; ++ apc_pcleanup_t cleanup = pool->cleanup; ++ ++ cleanup(pool TSRMLS_CC); ++ deallocate(pool TSRMLS_CC); ++} ++/* }}} */ ++ ++/* {{{ apc_unpool implementation */ ++ ++typedef struct _apc_unpool apc_unpool; ++ ++struct _apc_unpool { ++ apc_pool parent; ++ /* apc_unpool is a lie! */ ++}; ++ ++static void* apc_unpool_alloc(apc_pool* pool, size_t size TSRMLS_DC) ++{ ++ apc_unpool *upool = (apc_unpool*)pool; ++ ++ apc_malloc_t allocate = upool->parent.allocate; ++ ++ upool->parent.size += size; ++ upool->parent.used += size; ++ ++ return allocate(size TSRMLS_CC); ++} ++ ++static void apc_unpool_free(apc_pool* pool, void *ptr TSRMLS_DC) ++{ ++ apc_unpool *upool = (apc_unpool*) pool; ++ ++ apc_free_t deallocate = upool->parent.deallocate; ++ ++ deallocate(ptr TSRMLS_CC); ++} ++ ++static void apc_unpool_cleanup(apc_pool* pool TSRMLS_DC) ++{ ++} ++ ++static apc_pool* apc_unpool_create(apc_pool_type type, ++ apc_malloc_t allocate, apc_free_t deallocate, ++ apc_protect_t protect, apc_unprotect_t unprotect ++ TSRMLS_DC) ++{ ++ apc_unpool* upool = allocate(sizeof(apc_unpool) TSRMLS_CC); ++ ++ if (!upool) { ++ return NULL; ++ } ++ ++ upool->parent.type = type; ++ upool->parent.allocate = allocate; ++ upool->parent.deallocate = deallocate; ++ ++ upool->parent.protect = protect; ++ upool->parent.unprotect = unprotect; ++ ++ upool->parent.palloc = apc_unpool_alloc; ++ upool->parent.pfree = apc_unpool_free; ++ ++ upool->parent.cleanup = apc_unpool_cleanup; ++ ++ upool->parent.used = 0; ++ upool->parent.size = 0; ++ ++ return &(upool->parent); ++} ++/* }}} */ ++ ++ ++/*{{{ apc_realpool implementation */ ++ ++/* {{{ typedefs */ ++typedef struct _pool_block ++{ ++ size_t avail; ++ size_t capacity; ++ unsigned char *mark; ++ struct _pool_block *next; ++ unsigned :0; /* this should align to word */ ++ /* data comes here */ ++}pool_block; ++ ++/* ++ parts in ? are optional and turned on for fun, memory loss, ++ and for something else that I forgot about ... ah, debugging ++ ++ |--------> data[] |<-- non word boundary (too) ++ +-------------+--------------+-----------+-------------+-------------->>> ++ | pool_block | ?sizeinfo<1> | block<1> | ?redzone<1> | ?sizeinfo<2> ++ | | (size_t) | | padded left | ++ +-------------+--------------+-----------+-------------+-------------->>> ++ */ ++ ++typedef struct _apc_realpool apc_realpool; ++ ++struct _apc_realpool ++{ ++ struct _apc_pool parent; ++ ++ size_t dsize; ++ void *owner; ++ ++ pool_block *head; ++ pool_block first; ++}; ++ ++/* }}} */ ++ ++/* {{{ redzone code */ ++static const unsigned char decaff[] = { ++ 0xde, 0xca, 0xff, 0xc0, 0xff, 0xee, 0xba, 0xad, ++ 0xde, 0xca, 0xff, 0xc0, 0xff, 0xee, 0xba, 0xad, ++ 0xde, 0xca, 0xff, 0xc0, 0xff, 0xee, 0xba, 0xad, ++ 0xde, 0xca, 0xff, 0xc0, 0xff, 0xee, 0xba, 0xad ++}; ++ ++/* a redzone is at least 4 (0xde,0xca,0xc0,0xff) bytes */ ++#define REDZONE_SIZE(size) \ ++ ((ALIGNWORD((size)) > ((size) + 4)) ? \ ++ (ALIGNWORD((size)) - (size)) : /* does not change realsize */\ ++ ALIGNWORD((size)) - (size) + ALIGNWORD((sizeof(char)))) /* adds 1 word to realsize */ ++ ++#define SIZEINFO_SIZE ALIGNWORD(sizeof(size_t)) ++ ++#define MARK_REDZONE(block, redsize) do {\ ++ memcpy(block, decaff, redsize );\ ++ } while(0) ++ ++#define CHECK_REDZONE(block, redsize) (memcmp(block, decaff, redsize) == 0) ++ ++/* }}} */ ++ ++#define INIT_POOL_BLOCK(rpool, entry, size) do {\ ++ (entry)->avail = (entry)->capacity = (size);\ ++ (entry)->mark = ((unsigned char*)(entry)) + ALIGNWORD(sizeof(pool_block));\ ++ (entry)->next = (rpool)->head;\ ++ (rpool)->head = (entry);\ ++} while(0) ++ ++/* {{{ create_pool_block */ ++static pool_block* create_pool_block(apc_realpool *rpool, size_t size TSRMLS_DC) ++{ ++ apc_malloc_t allocate = rpool->parent.allocate; ++ ++ size_t realsize = sizeof(pool_block) + ALIGNWORD(size); ++ ++ pool_block* entry = allocate(realsize TSRMLS_CC); ++ ++ if (!entry) { ++ return NULL; ++ } ++ ++ INIT_POOL_BLOCK(rpool, entry, size); ++ ++ rpool->parent.size += realsize; ++ ++ return entry; ++} ++/* }}} */ ++ ++/* {{{ apc_realpool_alloc */ ++static void* apc_realpool_alloc(apc_pool *pool, size_t size TSRMLS_DC) ++{ ++ apc_realpool *rpool = (apc_realpool*)pool; ++ unsigned char *p = NULL; ++ size_t realsize = ALIGNWORD(size); ++ size_t poolsize; ++ unsigned char *redzone = NULL; ++ size_t redsize = 0; ++ size_t *sizeinfo= NULL; ++ pool_block *entry = NULL; ++ ++ if(APC_POOL_HAS_REDZONES(pool)) { ++ redsize = REDZONE_SIZE(size); /* redsize might be re-using word size padding */ ++ realsize = size + redsize; /* recalculating realsize */ ++ } else { ++ redsize = realsize - size; /* use padding space */ ++ } ++ ++ if(APC_POOL_HAS_SIZEINFO(pool)) { ++ realsize += ALIGNWORD(sizeof(size_t)); ++ } ++ ++ ++ for(entry = rpool->head; entry != NULL; entry = entry->next) { ++ if(entry->avail >= realsize) { ++ goto found; ++ } ++ } ++ ++ poolsize = ALIGNSIZE(realsize, rpool->dsize); ++ ++ entry = create_pool_block(rpool, poolsize TSRMLS_CC); ++ ++ if(!entry) { ++ return NULL; ++ } ++ ++found: ++ p = entry->mark; ++ ++ if(APC_POOL_HAS_SIZEINFO(pool)) { ++ sizeinfo = (size_t*)p; ++ p += SIZEINFO_SIZE; ++ *sizeinfo = size; ++ } ++ ++ redzone = p + size; ++ ++ if(APC_POOL_HAS_REDZONES(pool)) { ++ MARK_REDZONE(redzone, redsize); ++ } ++ ++#ifdef VALGRIND_MAKE_MEM_NOACCESS ++ if(redsize != 0) { ++ VALGRIND_MAKE_MEM_NOACCESS(redzone, redsize); ++ } ++#endif ++ ++ entry->avail -= realsize; ++ entry->mark += realsize; ++ pool->used += realsize; ++ ++#ifdef VALGRIND_MAKE_MEM_UNDEFINED ++ /* need to write before reading data off this */ ++ VALGRIND_MAKE_MEM_UNDEFINED(p, size); ++#endif ++ ++ return (void*)p; ++} ++/* }}} */ ++ ++/* {{{ apc_realpool_check_integrity */ ++/* ++ * Checking integrity at runtime, does an ++ * overwrite check only when the sizeinfo ++ * is set. ++ */ ++static int apc_realpool_check_integrity(apc_realpool *rpool) ++{ ++ apc_pool *pool = &(rpool->parent); ++ pool_block *entry; ++ size_t *sizeinfo = NULL; ++ unsigned char *start; ++ size_t realsize; ++ unsigned char *redzone; ++ size_t redsize; ++ ++ for(entry = rpool->head; entry != NULL; entry = entry->next) { ++ start = (unsigned char *)entry + ALIGNWORD(sizeof(pool_block)); ++ if((entry->mark - start) != (entry->capacity - entry->avail)) { ++ return 0; ++ } ++ } ++ ++ if(!APC_POOL_HAS_REDZONES(pool) || ++ !APC_POOL_HAS_SIZEINFO(pool)) { ++ return 1; ++ } ++ ++ for(entry = rpool->head; entry != NULL; entry = entry->next) { ++ start = (unsigned char *)entry + ALIGNWORD(sizeof(pool_block)); ++ ++ while(start < entry->mark) { ++ sizeinfo = (size_t*)start; ++ /* redzone starts where real data ends, in a non-word boundary ++ * redsize is at least 4 bytes + whatever's needed to make it ++ * to another word boundary. ++ */ ++ redzone = start + SIZEINFO_SIZE + (*sizeinfo); ++ redsize = REDZONE_SIZE(*sizeinfo); ++#ifdef VALGRIND_MAKE_MEM_DEFINED ++ VALGRIND_MAKE_MEM_DEFINED(redzone, redsize); ++#endif ++ if(!CHECK_REDZONE(redzone, redsize)) ++ { ++ /* ++ fprintf(stderr, "Redzone check failed for %p\n", ++ start + ALIGNWORD(sizeof(size_t)));*/ ++ return 0; ++ } ++#ifdef VALGRIND_MAKE_MEM_NOACCESS ++ VALGRIND_MAKE_MEM_NOACCESS(redzone, redsize); ++#endif ++ realsize = SIZEINFO_SIZE + *sizeinfo + redsize; ++ start += realsize; ++ } ++ } ++ ++ return 1; ++} ++/* }}} */ ++ ++/* {{{ apc_realpool_free */ ++/* ++ * free does not do anything other than ++ * check for redzone values when free'ing ++ * data areas. ++ */ ++static void apc_realpool_free(apc_pool *pool, void *p TSRMLS_DC) ++{ ++} ++/* }}} */ ++ ++static void apc_realpool_cleanup(apc_pool *pool TSRMLS_DC) ++{ ++ pool_block *entry; ++ pool_block *tmp; ++ apc_realpool *rpool = (apc_realpool*)pool; ++ apc_free_t deallocate = pool->deallocate; ++ ++ assert(apc_realpool_check_integrity(rpool)!=0); ++ ++ entry = rpool->head; ++ ++ while(entry->next != NULL) { ++ tmp = entry->next; ++ deallocate(entry TSRMLS_CC); ++ entry = tmp; ++ } ++} ++ ++/* {{{ apc_realpool_create */ ++static apc_pool* apc_realpool_create(apc_pool_type type, apc_malloc_t allocate, apc_free_t deallocate, ++ apc_protect_t protect, apc_unprotect_t unprotect ++ TSRMLS_DC) ++{ ++ ++ size_t dsize = 0; ++ apc_realpool *rpool; ++ ++ switch(type & APC_POOL_SIZE_MASK) { ++ case APC_SMALL_POOL: ++ dsize = 512; ++ break; ++ ++ case APC_LARGE_POOL: ++ dsize = 8192; ++ break; ++ ++ case APC_MEDIUM_POOL: ++ dsize = 4096; ++ break; ++ ++ default: ++ return NULL; ++ } ++ ++ rpool = (apc_realpool*)allocate((sizeof(apc_realpool) + ALIGNWORD(dsize)) TSRMLS_CC); ++ ++ if(!rpool) { ++ return NULL; ++ } ++ ++ rpool->parent.type = type; ++ ++ rpool->parent.allocate = allocate; ++ rpool->parent.deallocate = deallocate; ++ ++ rpool->parent.size = sizeof(apc_realpool) + ALIGNWORD(dsize); ++ ++ rpool->parent.palloc = apc_realpool_alloc; ++ rpool->parent.pfree = apc_realpool_free; ++ ++ rpool->parent.protect = protect; ++ rpool->parent.unprotect = unprotect; ++ ++ rpool->parent.cleanup = apc_realpool_cleanup; ++ ++ rpool->dsize = dsize; ++ rpool->head = NULL; ++ ++ INIT_POOL_BLOCK(rpool, &(rpool->first), dsize); ++ ++ return &(rpool->parent); ++} ++ ++ ++/* }}} */ ++ ++/* {{{ apc_pool_init */ ++void apc_pool_init() ++{ ++ /* put all ye sanity checks here */ ++ assert(sizeof(decaff) > REDZONE_SIZE(ALIGNWORD(sizeof(char)))); ++ assert(sizeof(pool_block) == ALIGNWORD(sizeof(pool_block))); ++#if APC_POOL_DEBUG ++ assert((APC_POOL_SIZE_MASK & (APC_POOL_SIZEINFO | APC_POOL_REDZONES)) == 0); ++#endif ++} ++/* }}} */ ++ ++/* {{{ apc_pstrdup */ ++void* apc_pstrdup(const char* s, apc_pool* pool TSRMLS_DC) ++{ ++ return s != NULL ? apc_pmemcpy(s, (strlen(s) + 1), pool TSRMLS_CC) : NULL; ++} ++/* }}} */ ++ ++/* {{{ apc_pmemcpy */ ++void* apc_pmemcpy(const void* p, size_t n, apc_pool* pool TSRMLS_DC) ++{ ++ void* q; ++ ++ if (p != NULL && (q = apc_pool_alloc(pool, n)) != NULL) { ++ memcpy(q, p, n); ++ return q; ++ } ++ return NULL; ++} ++/* }}} */ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_pool.h +@@ -0,0 +1,114 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt. | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Gopal Vijayaraghavan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Yahoo! Inc. in 2008. ++ ++ Future revisions and derivatives of this source code must acknowledge ++ Yahoo! Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_pool.h 301682 2010-07-29 11:09:00Z gopalv $ */ ++ ++#ifndef APC_POOL_H ++#define APC_POOL_H ++ ++#include "apc.h" ++#include "apc_sma.h" ++ ++/* #define APC_POOL_DEBUG 1 */ ++ ++typedef enum { ++ APC_UNPOOL = 0x0, ++ APC_SMALL_POOL = 0x1, ++ APC_MEDIUM_POOL = 0x2, ++ APC_LARGE_POOL = 0x3, ++ APC_POOL_SIZE_MASK = 0x7, /* waste a bit */ ++#if APC_POOL_DEBUG ++ APC_POOL_REDZONES = 0x08, ++ APC_POOL_SIZEINFO = 0x10, ++ APC_POOL_OPT_MASK = 0x18 ++#endif ++} apc_pool_type; ++ ++#if APC_POOL_DEBUG ++#define APC_POOL_HAS_SIZEINFO(pool) ((pool->type & APC_POOL_SIZEINFO)!=0) ++#define APC_POOL_HAS_REDZONES(pool) ((pool->type & APC_POOL_REDZONES)!=0) ++#else ++/* let gcc optimize away the optional features */ ++#define APC_POOL_HAS_SIZEINFO(pool) (0) ++#define APC_POOL_HAS_REDZONES(pool) (0) ++#endif ++ ++ ++typedef struct _apc_pool apc_pool; ++ ++typedef void (*apc_pcleanup_t)(apc_pool *pool TSRMLS_DC); ++ ++typedef void* (*apc_palloc_t)(apc_pool *pool, size_t size TSRMLS_DC); ++typedef void (*apc_pfree_t) (apc_pool *pool, void* p TSRMLS_DC); ++ ++typedef void* (*apc_protect_t) (void *p); ++typedef void* (*apc_unprotect_t)(void *p); ++ ++struct _apc_pool { ++ apc_pool_type type; ++ ++ apc_malloc_t allocate; ++ apc_free_t deallocate; ++ ++ apc_palloc_t palloc; ++ apc_pfree_t pfree; ++ ++ apc_protect_t protect; ++ apc_unprotect_t unprotect; ++ ++ apc_pcleanup_t cleanup; ++ ++ size_t size; ++ size_t used; ++ ++ /* apc_realpool and apc_unpool add more here */ ++}; ++ ++#define apc_pool_alloc(pool, size) ((void *) pool->palloc(pool, size TSRMLS_CC)) ++#define apc_pool_free(pool, ptr) ((void) pool->pfree (pool, ptr TSRMLS_CC)) ++ ++#define apc_pool_protect(pool, ptr) (pool->protect ? \ ++ (pool)->protect((ptr)) : (ptr)) ++ ++#define apc_pool_unprotect(pool, ptr) (pool->unprotect ? \ ++ (pool)->unprotect((ptr)) : (ptr)) ++ ++extern void apc_pool_init(); ++ ++extern apc_pool* apc_pool_create(apc_pool_type pool_type, ++ apc_malloc_t allocate, ++ apc_free_t deallocate, ++ apc_protect_t protect, ++ apc_unprotect_t unprotect ++ TSRMLS_DC); ++ ++extern void apc_pool_destroy(apc_pool* pool TSRMLS_DC); ++ ++extern void* apc_pmemcpy(const void* p, size_t n, apc_pool* pool TSRMLS_DC); ++extern void* apc_pstrdup(const char* s, apc_pool* pool TSRMLS_DC); ++ ++#endif +--- /dev/null ++++ b/ext/apc/apc_pthreadmutex.c +@@ -0,0 +1,111 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Brian Shire | ++ +----------------------------------------------------------------------+ ++ ++ */ ++ ++/* $Id: apc_pthreadmutex.c 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#include "apc_pthreadmutex.h" ++ ++#ifdef APC_PTHREADMUTEX_LOCKS ++ ++pthread_mutex_t *apc_pthreadmutex_create(pthread_mutex_t *lock TSRMLS_DC) ++{ ++ int result; ++ pthread_mutexattr_t* attr; ++ attr = malloc(sizeof(pthread_mutexattr_t)); ++ ++ result = pthread_mutexattr_init(attr); ++ if(result == ENOMEM) { ++ apc_error("pthread mutex error: Insufficient memory exists to create the mutex attribute object." TSRMLS_CC); ++ } else if(result == EINVAL) { ++ apc_error("pthread mutex error: attr does not point to writeable memory." TSRMLS_CC); ++ } else if(result == EFAULT) { ++ apc_error("pthread mutex error: attr is an invalid pointer." TSRMLS_CC); ++ } ++ ++#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP ++ result = pthread_mutexattr_settype(attr, PTHREAD_MUTEX_ADAPTIVE_NP); ++ if (result == EINVAL) { ++ apc_error("pthread_mutexattr_settype: unable to set adaptive mutexes" TSRMLS_CC); ++ } ++#endif ++ ++ /* pthread_mutexattr_settype(attr, PTHREAD_MUTEX_ERRORCHECK); */ ++ result = pthread_mutexattr_setpshared(attr, PTHREAD_PROCESS_SHARED); ++ if(result == EINVAL) { ++ apc_error("pthread mutex error: attr is not an initialized mutex attribute object, or pshared is not a valid process-shared state setting." TSRMLS_CC); ++ } else if(result == EFAULT) { ++ apc_error("pthread mutex error: attr is an invalid pointer." TSRMLS_CC); ++ } else if(result == ENOTSUP) { ++ apc_error("pthread mutex error: pshared was set to PTHREAD_PROCESS_SHARED." TSRMLS_CC); ++ } ++ ++ if(pthread_mutex_init(lock, attr)) { ++ apc_error("unable to initialize pthread lock" TSRMLS_CC); ++ } ++ return lock; ++} ++ ++void apc_pthreadmutex_destroy(pthread_mutex_t *lock) ++{ ++ return; /* we don't actually destroy the mutex, as it would destroy it for all processes */ ++} ++ ++void apc_pthreadmutex_lock(pthread_mutex_t *lock TSRMLS_DC) ++{ ++ int result; ++ result = pthread_mutex_lock(lock); ++ if(result == EINVAL) { ++ apc_error("unable to obtain pthread lock (EINVAL)" TSRMLS_CC); ++ } else if(result == EDEADLK) { ++ apc_error("unable to obtain pthread lock (EDEADLK)" TSRMLS_CC); ++ } ++} ++ ++void apc_pthreadmutex_unlock(pthread_mutex_t *lock TSRMLS_DC) ++{ ++ if(pthread_mutex_unlock(lock)) { ++ apc_error("unable to unlock pthread lock" TSRMLS_CC); ++ } ++} ++ ++zend_bool apc_pthreadmutex_nonblocking_lock(pthread_mutex_t *lock TSRMLS_DC) ++{ ++ int rval; ++ rval = pthread_mutex_trylock(lock); ++ if(rval == EBUSY) { /* Lock is already held */ ++ return 0; ++ } else if(rval == 0) { /* Obtained lock */ ++ return 1; ++ } else { /* Other error */ ++ apc_error("unable to obtain pthread trylock" TSRMLS_CC); ++ return 0; ++ } ++} ++ ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_pthreadmutex.h +@@ -0,0 +1,48 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Brian Shire | ++ +----------------------------------------------------------------------+ ++ ++ */ ++ ++/* $Id: apc_pthreadmutex.h 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#ifndef APC_PTHREADMUTEX_H ++#define APC_PTHREADMUTEX_H ++ ++#include "apc.h" ++ ++#ifdef APC_PTHREADMUTEX_LOCKS ++ ++#include ++ ++pthread_mutex_t *apc_pthreadmutex_create(pthread_mutex_t *lock TSRMLS_DC); ++void apc_pthreadmutex_destroy(pthread_mutex_t *lock); ++void apc_pthreadmutex_lock(pthread_mutex_t *lock TSRMLS_DC); ++void apc_pthreadmutex_unlock(pthread_mutex_t *lock TSRMLS_DC); ++zend_bool apc_pthreadmutex_nonblocking_lock(pthread_mutex_t *lock TSRMLS_DC); ++ ++#endif ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_rfc1867.c +@@ -0,0 +1,232 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Rasmus Lerdorf | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_rfc1867.c 305798 2010-11-28 13:43:20Z gopalv $*/ ++ ++#include "apc.h" ++#include "apc_globals.h" ++#include "rfc1867.h" ++ ++#ifdef PHP_WIN32 ++#include "win32/time.h" ++#endif ++ ++#ifdef MULTIPART_EVENT_FORMDATA ++extern int _apc_store(char *strkey, int strkey_len, const zval *val, const uint ttl, const int exclusive TSRMLS_DC); ++extern int _apc_update(char *strkey, int strkey_len, apc_cache_updater_t updater, void* data TSRMLS_DC); ++ ++static int update_bytes_processed(apc_cache_t* cache, apc_cache_entry_t* entry, void* data) { ++ int *bytes_ptr = (int*)data; ++ zval* val = entry->data.user.val; ++ ++ if(Z_TYPE_P(val) == IS_ARRAY) { ++ HashTable *ht = val->value.ht; ++ Bucket* curr = NULL; ++ for (curr = ht->pListHead; curr != NULL; curr = curr->pListNext) { ++ if(curr->nKeyLength == 8 && ++ (!memcmp(curr->arKey, "current", curr->nKeyLength))) { ++ zval* current = ((zval**)curr->pData)[0]; ++ current->value.lval = *bytes_ptr; ++ return 1; ++ } ++ } ++ } ++ ++ return 0; ++} ++ ++static double my_time() { ++ struct timeval a; ++ double t; ++ gettimeofday(&a, NULL); ++ t = a.tv_sec + (a.tv_usec/1000000.00); ++ return t; ++} ++ ++ ++#define RFC1867_DATA(name) \ ++ ((request_data)->name) ++ ++int apc_rfc1867_progress(uint event, void *event_data, void **extra TSRMLS_DC) { ++ apc_rfc1867_data *request_data = &APCG(rfc1867_data); ++ zval *track = NULL; ++ ++ switch (event) { ++ case MULTIPART_EVENT_START: ++ { ++ multipart_event_start *data = (multipart_event_start *) event_data; ++ ++ RFC1867_DATA(content_length) = data->content_length; ++ RFC1867_DATA(tracking_key)[0] = '\0'; ++ RFC1867_DATA(name)[0] = '\0'; ++ RFC1867_DATA(cancel_upload) = 0; ++ RFC1867_DATA(temp_filename) = NULL; ++ RFC1867_DATA(filename)[0] = '\0'; ++ RFC1867_DATA(key_length) = 0; ++ RFC1867_DATA(start_time) = my_time(); ++ RFC1867_DATA(bytes_processed) = 0; ++ RFC1867_DATA(prev_bytes_processed) = 0; ++ RFC1867_DATA(rate) = 0; ++ RFC1867_DATA(update_freq) = (int) APCG(rfc1867_freq); ++ RFC1867_DATA(started) = 0; ++ ++ if(RFC1867_DATA(update_freq) < 0) { // frequency is a percentage, not bytes ++ RFC1867_DATA(update_freq) = (int) (RFC1867_DATA(content_length) * APCG(rfc1867_freq) / 100); ++ } ++ } ++ break; ++ ++ case MULTIPART_EVENT_FORMDATA: ++ { ++ int prefix_len = strlen(APCG(rfc1867_prefix)); ++ multipart_event_formdata *data = (multipart_event_formdata *) event_data; ++ if(data->name && !strncasecmp(data->name, APCG(rfc1867_name), strlen(APCG(rfc1867_name))) ++ && data->value && data->length) { ++ ++ if(data->length >= sizeof(RFC1867_DATA(tracking_key)) - prefix_len) { ++ apc_warning("Key too long for '%s'. Maximum size is '%d' characters." TSRMLS_CC, ++ APCG(rfc1867_name), ++ sizeof(RFC1867_DATA(tracking_key)) - prefix_len); ++ break; ++ } ++ ++ if(RFC1867_DATA(started)) { ++ apc_warning("Upload progress key '%s' should be before the file upload entry in the form." TSRMLS_CC, ++ APCG(rfc1867_name)); ++ break; ++ } ++ ++ strlcat(RFC1867_DATA(tracking_key), APCG(rfc1867_prefix), 63); ++ strlcat(RFC1867_DATA(tracking_key), *data->value, 63); ++ RFC1867_DATA(key_length) = data->length + prefix_len; ++ RFC1867_DATA(bytes_processed) = data->post_bytes_processed; ++ } ++ } ++ break; ++ ++ case MULTIPART_EVENT_FILE_START: ++ { ++ RFC1867_DATA(started) = 1; ++ if(*RFC1867_DATA(tracking_key)) { ++ multipart_event_file_start *data = (multipart_event_file_start *) event_data; ++ ++ RFC1867_DATA(bytes_processed) = data->post_bytes_processed; ++ strlcpy(RFC1867_DATA(filename),*data->filename,128); ++ RFC1867_DATA(temp_filename) = NULL; ++ strlcpy(RFC1867_DATA(name),data->name,64); ++ ALLOC_INIT_ZVAL(track); ++ array_init(track); ++ add_assoc_long(track, "total", RFC1867_DATA(content_length)); ++ add_assoc_long(track, "current", RFC1867_DATA(bytes_processed)); ++ add_assoc_string(track, "filename", RFC1867_DATA(filename), 1); ++ add_assoc_string(track, "name", RFC1867_DATA(name), 1); ++ add_assoc_long(track, "done", 0); ++ add_assoc_double(track, "start_time", RFC1867_DATA(start_time)); ++ _apc_store(RFC1867_DATA(tracking_key), RFC1867_DATA(key_length)+1, track, APCG(rfc1867_ttl), 0 TSRMLS_CC); ++ zval_ptr_dtor(&track); ++ } ++ } ++ break; ++ ++ case MULTIPART_EVENT_FILE_DATA: ++ if(*RFC1867_DATA(tracking_key)) { ++ multipart_event_file_data *data = (multipart_event_file_data *) event_data; ++ RFC1867_DATA(bytes_processed) = data->post_bytes_processed; ++ if(RFC1867_DATA(bytes_processed) - RFC1867_DATA(prev_bytes_processed) > (uint) RFC1867_DATA(update_freq)) { ++ if(!_apc_update(RFC1867_DATA(tracking_key), RFC1867_DATA(key_length), update_bytes_processed, &RFC1867_DATA(bytes_processed) TSRMLS_CC)) { ++ ALLOC_INIT_ZVAL(track); ++ array_init(track); ++ add_assoc_long(track, "total", RFC1867_DATA(content_length)); ++ add_assoc_long(track, "current", RFC1867_DATA(bytes_processed)); ++ add_assoc_string(track, "filename", RFC1867_DATA(filename), 1); ++ add_assoc_string(track, "name", RFC1867_DATA(name), 1); ++ add_assoc_long(track, "done", 0); ++ add_assoc_double(track, "start_time", RFC1867_DATA(start_time)); ++ _apc_store(RFC1867_DATA(tracking_key), RFC1867_DATA(key_length)+1, track, APCG(rfc1867_ttl), 0 TSRMLS_CC); ++ zval_ptr_dtor(&track); ++ } ++ RFC1867_DATA(prev_bytes_processed) = RFC1867_DATA(bytes_processed); ++ } ++ } ++ break; ++ ++ case MULTIPART_EVENT_FILE_END: ++ if(*RFC1867_DATA(tracking_key)) { ++ multipart_event_file_end *data = (multipart_event_file_end *) event_data; ++ RFC1867_DATA(bytes_processed) = data->post_bytes_processed; ++ RFC1867_DATA(cancel_upload) = data->cancel_upload; ++ RFC1867_DATA(temp_filename) = data->temp_filename; ++ ALLOC_INIT_ZVAL(track); ++ array_init(track); ++ add_assoc_long(track, "total", RFC1867_DATA(content_length)); ++ add_assoc_long(track, "current", RFC1867_DATA(bytes_processed)); ++ add_assoc_string(track, "filename", RFC1867_DATA(filename), 1); ++ add_assoc_string(track, "name", RFC1867_DATA(name), 1); ++ add_assoc_string(track, "temp_filename", RFC1867_DATA(temp_filename), 1); ++ add_assoc_long(track, "cancel_upload", RFC1867_DATA(cancel_upload)); ++ add_assoc_long(track, "done", 0); ++ add_assoc_double(track, "start_time", RFC1867_DATA(start_time)); ++ _apc_store(RFC1867_DATA(tracking_key), RFC1867_DATA(key_length)+1, track, APCG(rfc1867_ttl), 0 TSRMLS_CC); ++ zval_ptr_dtor(&track); ++ } ++ break; ++ ++ case MULTIPART_EVENT_END: ++ if(*RFC1867_DATA(tracking_key)) { ++ double now = my_time(); ++ multipart_event_end *data = (multipart_event_end *) event_data; ++ RFC1867_DATA(bytes_processed) = data->post_bytes_processed; ++ if(now>RFC1867_DATA(start_time)) RFC1867_DATA(rate) = 8.0*RFC1867_DATA(bytes_processed)/(now-RFC1867_DATA(start_time)); ++ else RFC1867_DATA(rate) = 8.0*RFC1867_DATA(bytes_processed); /* Too quick */ ++ ALLOC_INIT_ZVAL(track); ++ array_init(track); ++ add_assoc_long(track, "total", RFC1867_DATA(content_length)); ++ add_assoc_long(track, "current", RFC1867_DATA(bytes_processed)); ++ add_assoc_double(track, "rate", RFC1867_DATA(rate)); ++ add_assoc_string(track, "filename", RFC1867_DATA(filename), 1); ++ add_assoc_string(track, "name", RFC1867_DATA(name), 1); ++ add_assoc_long(track, "cancel_upload", RFC1867_DATA(cancel_upload)); ++ add_assoc_long(track, "done", 1); ++ add_assoc_double(track, "start_time", RFC1867_DATA(start_time)); ++ _apc_store(RFC1867_DATA(tracking_key), RFC1867_DATA(key_length)+1, track, APCG(rfc1867_ttl), 0 TSRMLS_CC); ++ zval_ptr_dtor(&track); ++ } ++ break; ++ } ++ ++ return SUCCESS; ++} ++ ++#endif ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_sem.c +@@ -0,0 +1,192 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_sem.c 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#include "apc.h" ++ ++#ifdef APC_SEM_LOCKS ++ ++#include "apc_sem.h" ++#include "php.h" ++#include ++#include ++#include ++#include ++#include ++ ++#if HAVE_SEMUN ++/* we have semun, no need to define */ ++#else ++#undef HAVE_SEMUN ++union semun { ++ int val; /* value for SETVAL */ ++ struct semid_ds *buf; /* buffer for IPC_STAT, IPC_SET */ ++ unsigned short *array; /* array for GETALL, SETALL */ ++ /* Linux specific part: */ ++ struct seminfo *__buf; /* buffer for IPC_INFO */ ++}; ++#define HAVE_SEMUN 1 ++#endif ++ ++#ifndef SEM_R ++# define SEM_R 0444 ++#endif ++#ifndef SEM_A ++# define SEM_A 0222 ++#endif ++ ++/* always use SEM_UNDO, otherwise we risk deadlock */ ++#define USE_SEM_UNDO ++ ++#ifdef USE_SEM_UNDO ++# define UNDO SEM_UNDO ++#else ++# define UNDO 0 ++#endif ++ ++int apc_sem_create(int proj, int initval TSRMLS_DC) ++{ ++ int semid; ++ int perms = 0777; ++ union semun arg; ++ key_t key = IPC_PRIVATE; ++ ++ if ((semid = semget(key, 1, IPC_CREAT | IPC_EXCL | perms)) >= 0) { ++ /* sempahore created for the first time, initialize now */ ++ arg.val = initval; ++ if (semctl(semid, 0, SETVAL, arg) < 0) { ++ apc_error("apc_sem_create: semctl(%d,...) failed:" TSRMLS_CC, semid); ++ } ++ } ++ else if (errno == EEXIST) { ++ /* sempahore already exists, don't initialize */ ++ if ((semid = semget(key, 1, perms)) < 0) { ++ apc_error("apc_sem_create: semget(%u,...) failed:" TSRMLS_CC, key); ++ } ++ /* insert here */ ++ } ++ else { ++ apc_error("apc_sem_create: semget(%u,...) failed:" TSRMLS_CC, key); ++ } ++ ++ return semid; ++} ++ ++void apc_sem_destroy(int semid) ++{ ++ /* we expect this call to fail often, so we do not check */ ++ union semun arg; ++ semctl(semid, 0, IPC_RMID, arg); ++} ++ ++void apc_sem_lock(int semid TSRMLS_DC) ++{ ++ struct sembuf op; ++ ++ op.sem_num = 0; ++ op.sem_op = -1; ++ op.sem_flg = UNDO; ++ ++ if (semop(semid, &op, 1) < 0) { ++ if (errno != EINTR) { ++ apc_error("apc_sem_lock: semop(%d) failed:" TSRMLS_CC, semid); ++ } ++ } ++} ++ ++int apc_sem_nonblocking_lock(int semid TSRMLS_DC) ++{ ++ struct sembuf op; ++ ++ op.sem_num = 0; ++ op.sem_op = -1; ++ op.sem_flg = UNDO | IPC_NOWAIT; ++ ++ if (semop(semid, &op, 1) < 0) { ++ if (errno == EAGAIN) { ++ return 0; /* Lock is already held */ ++ } else if (errno != EINTR) { ++ apc_error("apc_sem_lock: semop(%d) failed:" TSRMLS_CC, semid); ++ } ++ } ++ ++ return 1; /* Lock obtained */ ++} ++ ++void apc_sem_unlock(int semid TSRMLS_DC) ++{ ++ struct sembuf op; ++ ++ op.sem_num = 0; ++ op.sem_op = 1; ++ op.sem_flg = UNDO; ++ ++ if (semop(semid, &op, 1) < 0) { ++ if (errno != EINTR) { ++ apc_error("apc_sem_unlock: semop(%d) failed:" TSRMLS_CC, semid); ++ } ++ } ++} ++ ++void apc_sem_wait_for_zero(int semid TSRMLS_DC) ++{ ++ struct sembuf op; ++ ++ op.sem_num = 0; ++ op.sem_op = 0; ++ op.sem_flg = UNDO; ++ ++ if (semop(semid, &op, 1) < 0) { ++ if (errno != EINTR) { ++ apc_error("apc_sem_waitforzero: semop(%d) failed:" TSRMLS_CC, semid); ++ } ++ } ++} ++ ++int apc_sem_get_value(int semid TSRMLS_DC) ++{ ++ union semun arg; ++ unsigned short val[1]; ++ ++ arg.array = val; ++ if (semctl(semid, 0, GETALL, arg) < 0) { ++ apc_error("apc_sem_getvalue: semctl(%d,...) failed:" TSRMLS_CC, semid); ++ } ++ return val[0]; ++} ++ ++#endif /* APC_SEM_LOCKS */ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_sem.h +@@ -0,0 +1,52 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_sem.h 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#ifndef APC_SEM_H ++#define APC_SEM_H ++ ++/* Wrapper functions for SysV sempahores */ ++ ++extern int apc_sem_create(int proj, int initval TSRMLS_DC); ++extern void apc_sem_destroy(int semid); ++extern void apc_sem_lock(int semid TSRMLS_DC); ++extern int apc_sem_nonblocking_lock(int semid TSRMLS_DC); ++extern void apc_sem_unlock(int semid TSRMLS_DC); ++extern void apc_sem_wait_for_zero(int semid TSRMLS_DC); ++extern int apc_sem_get_value(int semid TSRMLS_DC); ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_shm.c +@@ -0,0 +1,114 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | Rasmus Lerdorf | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_shm.c 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#include "apc_shm.h" ++#include "apc.h" ++#ifdef PHP_WIN32 ++/* shm functions are available in TSRM */ ++#include ++#define key_t long ++#else ++#include ++#include ++#include ++#endif ++ ++#ifndef SHM_R ++# define SHM_R 0444 /* read permission */ ++#endif ++#ifndef SHM_A ++# define SHM_A 0222 /* write permission */ ++#endif ++ ++int apc_shm_create(int proj, size_t size TSRMLS_DC) ++{ ++ int shmid; /* shared memory id */ ++ int oflag; /* permissions on shm */ ++ key_t key = IPC_PRIVATE; /* shm key */ ++ ++ oflag = IPC_CREAT | SHM_R | SHM_A; ++ if ((shmid = shmget(key, size, oflag)) < 0) { ++ apc_error("apc_shm_create: shmget(%d, %d, %d) failed: %s. It is possible that the chosen SHM segment size is higher than the operation system allows. Linux has usually a default limit of 32MB per segment." TSRMLS_CC, key, size, oflag, strerror(errno)); ++ } ++ ++ return shmid; ++} ++ ++void apc_shm_destroy(int shmid) ++{ ++ /* we expect this call to fail often, so we do not check */ ++ shmctl(shmid, IPC_RMID, 0); ++} ++ ++apc_segment_t apc_shm_attach(int shmid TSRMLS_DC) ++{ ++ apc_segment_t segment; /* shm segment */ ++ ++ if ((long)(segment.shmaddr = shmat(shmid, 0, 0)) == -1) { ++ apc_error("apc_shm_attach: shmat failed:" TSRMLS_CC); ++ } ++ ++#ifdef APC_MEMPROTECT ++ ++ if ((long)(segment.roaddr = shmat(shmid, 0, SHM_RDONLY)) == -1) { ++ segment.roaddr = NULL; ++ } ++ ++#endif ++ ++ /* ++ * We set the shmid for removal immediately after attaching to it. The ++ * segment won't disappear until all processes have detached from it. ++ */ ++ apc_shm_destroy(shmid); ++ return segment; ++} ++ ++void apc_shm_detach(apc_segment_t* segment TSRMLS_DC) ++{ ++ if (shmdt(segment->shmaddr) < 0) { ++ apc_error("apc_shm_detach: shmdt failed:" TSRMLS_CC); ++ } ++ ++#ifdef APC_MEMPROTECT ++ if (segment->roaddr && shmdt(segment->roaddr) < 0) { ++ apc_error("apc_shm_detach: shmdt failed:" TSRMLS_CC); ++ } ++#endif ++} ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_shm.h +@@ -0,0 +1,56 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_shm.h 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#ifndef APC_SHM_H ++#define APC_SHM_H ++ ++#include ++#ifdef PHP_WIN32 ++#include ++#endif ++ ++#include "apc_sma.h" ++ ++/* Wrapper functions for unix shared memory */ ++ ++extern int apc_shm_create(int proj, size_t size TSRMLS_DC); ++extern void apc_shm_destroy(int shmid); ++extern apc_segment_t apc_shm_attach(int shmid TSRMLS_DC); ++extern void apc_shm_detach(apc_segment_t* segment TSRMLS_DC); ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_signal.c +@@ -0,0 +1,197 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Lucas Nealan | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Facebook Inc. in 2007. ++ ++ Future revisions and derivatives of this source code must acknowledge ++ Facebook Inc. as the original contributor of this module by leaving ++ this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ */ ++ ++ /* $Id: apc_signal.c 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++ /* Allows apc to install signal handlers and maintain signalling ++ to already registered handlers. Registers all signals that ++ coredump by default and unmaps the shared memory segment ++ before the coredump. Note: PHP module init is called before ++ signals are set by Apache and thus apc_set_signals should ++ be called in request init (RINIT) ++ */ ++ ++#include "apc.h" ++ ++#if HAVE_SIGACTION ++#include ++#include "apc_globals.h" ++#include "apc_sma.h" ++#include "apc_signal.h" ++ ++static apc_signal_info_t apc_signal_info = {0}; ++ ++static int apc_register_signal(int signo, void (*handler)(int, siginfo_t*, void*) TSRMLS_DC); ++static void apc_rehandle_signal(int signo, siginfo_t *siginfo, void *context); ++static void apc_core_unmap(int signo, siginfo_t *siginfo, void *context); ++ ++/* {{{ apc_core_unmap ++ * Coredump signal handler, unmaps shm and calls previously installed handlers ++ */ ++static void apc_core_unmap(int signo, siginfo_t *siginfo, void *context) ++{ ++ TSRMLS_FETCH(); ++ ++ apc_sma_cleanup(TSRMLS_C); ++ apc_rehandle_signal(signo, siginfo, context); ++ ++#if !defined(WIN32) && !defined(NETWARE) ++ kill(getpid(), signo); ++#else ++ raise(signo); ++#endif ++} /* }}} */ ++ ++/* {{{ apc_rehandle_signal ++ * Call the previously registered handler for a signal ++ */ ++static void apc_rehandle_signal(int signo, siginfo_t *siginfo, void *context) ++{ ++ int i; ++ apc_signal_entry_t p_sig = {0}; ++ ++ for (i=0; (i < apc_signal_info.installed && p_sig.signo != signo); i++) { ++ p_sig = *apc_signal_info.prev[i]; ++ if (p_sig.signo == signo) { ++ if (p_sig.siginfo) { ++ (*(void (*)(int, siginfo_t*, void*))p_sig.handler)(signo, siginfo, context); ++ } else { ++ (*(void (*)(int))p_sig.handler)(signo); ++ } ++ } ++ } ++ ++} /* }}} */ ++ ++/* {{{ apc_register_signal ++ * Set a handler for a previously installed signal and save so we can ++ * callback when handled ++ */ ++static int apc_register_signal(int signo, void (*handler)(int, siginfo_t*, void*) TSRMLS_DC) ++{ ++ struct sigaction sa = {{0}}; ++ apc_signal_entry_t p_sig = {0}; ++ ++ if (sigaction(signo, NULL, &sa) == 0) { ++ if ((void*)sa.sa_handler == (void*)handler) { ++ return SUCCESS; ++ } ++ ++ if (sa.sa_handler != SIG_ERR && sa.sa_handler != SIG_DFL && sa.sa_handler != SIG_IGN) { ++ p_sig.signo = signo; ++ p_sig.siginfo = ((sa.sa_flags & SA_SIGINFO) == SA_SIGINFO); ++ p_sig.handler = (void *)sa.sa_handler; ++ ++ apc_signal_info.prev = (apc_signal_entry_t **)apc_erealloc(apc_signal_info.prev, (apc_signal_info.installed+1)*sizeof(apc_signal_entry_t *) TSRMLS_CC); ++ apc_signal_info.prev[apc_signal_info.installed] = (apc_signal_entry_t *)apc_emalloc(sizeof(apc_signal_entry_t) TSRMLS_CC); ++ *apc_signal_info.prev[apc_signal_info.installed++] = p_sig; ++ } else { ++ /* inherit flags and mask if already set */ ++ sigemptyset(&sa.sa_mask); ++ sa.sa_flags = 0; ++ sa.sa_flags |= SA_SIGINFO; /* we'll use a siginfo handler */ ++#if defined(SA_ONESHOT) ++ sa.sa_flags = SA_ONESHOT; ++#elif defined(SA_RESETHAND) ++ sa.sa_flags = SA_RESETHAND; ++#endif ++ } ++ sa.sa_handler = (void*)handler; ++ ++ if (sigaction(signo, &sa, NULL) < 0) { ++ apc_warning("Error installing apc signal handler for %d" TSRMLS_CC, signo); ++ } ++ ++ return SUCCESS; ++ } ++ return FAILURE; ++} /* }}} */ ++ ++/* {{{ apc_set_signals ++ * Install our signal handlers */ ++void apc_set_signals(TSRMLS_D) ++{ ++ if (APCG(coredump_unmap) && apc_signal_info.installed == 0) { ++ /* ISO C standard signals that coredump */ ++ apc_register_signal(SIGSEGV, apc_core_unmap TSRMLS_CC); ++ apc_register_signal(SIGABRT, apc_core_unmap TSRMLS_CC); ++ apc_register_signal(SIGFPE, apc_core_unmap TSRMLS_CC); ++ apc_register_signal(SIGILL, apc_core_unmap TSRMLS_CC); ++ /* extended signals that coredump */ ++#ifdef SIGBUS ++ apc_register_signal(SIGBUS, apc_core_unmap TSRMLS_CC); ++#endif ++#ifdef SIGABORT ++ apc_register_signal(SIGABORT, apc_core_unmap TSRMLS_CC); ++#endif ++#ifdef SIGEMT ++ apc_register_signal(SIGEMT, apc_core_unmap TSRMLS_CC); ++#endif ++#ifdef SIGIOT ++ apc_register_signal(SIGIOT, apc_core_unmap TSRMLS_CC); ++#endif ++#ifdef SIGQUIT ++ apc_register_signal(SIGQUIT, apc_core_unmap TSRMLS_CC); ++#endif ++#ifdef SIGSYS ++ apc_register_signal(SIGSYS, apc_core_unmap TSRMLS_CC); ++#endif ++#ifdef SIGTRAP ++ apc_register_signal(SIGTRAP, apc_core_unmap TSRMLS_CC); ++#endif ++#ifdef SIGXCPU ++ apc_register_signal(SIGXCPU, apc_core_unmap TSRMLS_CC); ++#endif ++#ifdef SIGXFSZ ++ apc_register_signal(SIGXFSZ, apc_core_unmap TSRMLS_CC); ++#endif ++ } ++} /* }}} */ ++ ++/* {{{ apc_set_signals ++ * cleanup signals for shutdown */ ++void apc_shutdown_signals(TSRMLS_D) ++{ ++ int i=0; ++ if (apc_signal_info.installed > 0) { ++ for (i=0; (i < apc_signal_info.installed); i++) { ++ apc_efree(apc_signal_info.prev[i] TSRMLS_CC); ++ } ++ apc_efree(apc_signal_info.prev TSRMLS_CC); ++ apc_signal_info.installed = 0; /* just in case */ ++ } ++} ++ ++#endif /* HAVE_SIGACTION */ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_signal.h +@@ -0,0 +1,51 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Lucas Nealan | ++ +----------------------------------------------------------------------+ ++ ++ */ ++ ++/* $Id: apc_signal.h 300986 2010-07-04 14:41:33Z felipe $ */ ++ ++#ifndef APC_SIGNAL_H ++#define APC_SIGNAL_H ++ ++#include "apc.h" ++#include "apc_php.h" ++ ++typedef struct apc_signal_entry_t { ++ int signo; /* signal number */ ++ int siginfo; /* siginfo style handler calling */ ++ void* handler; /* signal handler */ ++} apc_signal_entry_t; ++ ++typedef struct apc_signal_info_t { ++ int installed; /* How many signals we've installed handles for */ ++ apc_signal_entry_t **prev; /* Previous signal handlers */ ++} apc_signal_info_t; ++ ++void apc_set_signals(TSRMLS_D); ++void apc_shutdown_signals(TSRMLS_D); ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_sma.c +@@ -0,0 +1,765 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | Rasmus Lerdorf | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_sma.c 305260 2010-11-10 19:23:02Z gopalv $ */ ++ ++#include "apc_sma.h" ++#include "apc.h" ++#include "apc_globals.h" ++#include "apc_lock.h" ++#include "apc_shm.h" ++#include "apc_cache.h" ++ ++#include ++#include "apc_mmap.h" ++ ++#ifdef HAVE_VALGRIND_MEMCHECK_H ++#include ++#endif ++ ++enum { DEFAULT_NUMSEG=1, DEFAULT_SEGSIZE=30*1024*1024 }; ++ ++static int sma_initialized = 0; /* true if the sma has been initialized */ ++static uint sma_numseg; /* number of shm segments to allow */ ++static size_t sma_segsize; /* size of each shm segment */ ++static apc_segment_t* sma_segments; /* array of shm segments */ ++static int sma_lastseg = 0; /* index of MRU segment */ ++ ++typedef struct sma_header_t sma_header_t; ++struct sma_header_t { ++ apc_lck_t sma_lock; /* segment lock, MUST BE ALIGNED for futex locks */ ++ size_t segsize; /* size of entire segment */ ++ size_t avail; /* bytes available (not necessarily contiguous) */ ++#if ALLOC_DISTRIBUTION ++ size_t adist[30]; ++#endif ++}; ++ ++#define SMA_HDR(i) ((sma_header_t*)((sma_segments[i]).shmaddr)) ++#define SMA_ADDR(i) ((char*)(SMA_HDR(i))) ++#define SMA_RO(i) ((char*)(sma_segments[i]).roaddr) ++#define SMA_LCK(i) ((SMA_HDR(i))->sma_lock) ++ ++ ++/* do not enable for threaded http servers */ ++/* #define __APC_SMA_DEBUG__ 1 */ ++ ++#ifdef __APC_SMA_DEBUG__ ++/* global counter for identifying blocks ++ * Technically it is possible to do the same ++ * using offsets, but double allocations of the ++ * same offset can happen. */ ++static volatile size_t block_id = 0; ++#endif ++ ++#define APC_SMA_CANARIES 1 ++ ++typedef struct block_t block_t; ++struct block_t { ++ size_t size; /* size of this block */ ++ size_t prev_size; /* size of sequentially previous block, 0 if prev is allocated */ ++ size_t fnext; /* offset in segment of next free block */ ++ size_t fprev; /* offset in segment of prev free block */ ++#ifdef APC_SMA_CANARIES ++ size_t canary; /* canary to check for memory overwrites */ ++#endif ++#ifdef __APC_SMA_DEBUG__ ++ size_t id; /* identifier for the memory block */ ++#endif ++}; ++ ++/* The macros BLOCKAT and OFFSET are used for convenience throughout this ++ * module. Both assume the presence of a variable shmaddr that points to the ++ * beginning of the shared memory segment in question. */ ++ ++#define BLOCKAT(offset) ((block_t*)((char *)shmaddr + offset)) ++#define OFFSET(block) ((size_t)(((char*)block) - (char*)shmaddr)) ++ ++/* macros for getting the next or previous sequential block */ ++#define NEXT_SBLOCK(block) ((block_t*)((char*)block + block->size)) ++#define PREV_SBLOCK(block) (block->prev_size ? ((block_t*)((char*)block - block->prev_size)) : NULL) ++ ++/* Canary macros for setting, checking and resetting memory canaries */ ++#ifdef APC_SMA_CANARIES ++ #define SET_CANARY(v) (v)->canary = 0x42424242 ++ #define CHECK_CANARY(v) assert((v)->canary == 0x42424242) ++ #define RESET_CANARY(v) (v)->canary = -42 ++#else ++ #define SET_CANARY(v) ++ #define CHECK_CANARY(v) ++ #define RESET_CANARY(v) ++#endif ++ ++ ++/* {{{ MINBLOCKSIZE */ ++#define MINBLOCKSIZE (ALIGNWORD(1) + ALIGNWORD(sizeof(block_t))) ++/* }}} */ ++ ++#if 0 ++/* {{{ sma_debug_state(apc_sma_segment_t *segment, int canary_check, int verbose) ++ * useful for debuging state of memory blocks and free list, and sanity checking ++ */ ++static void sma_debug_state(void* shmaddr, int canary_check, int verbose TSRMLS_DC) { ++ sma_header_t *header = (sma_header_t*)shmaddr; ++ block_t *cur = BLOCKAT(ALIGNWORD(sizeof(sma_header_t))); ++ block_t *prv = NULL; ++ size_t avail; ++ ++ /* Verify free list */ ++ if (verbose) apc_warning("Free List: " TSRMLS_CC); ++ while(1) { ++ if (verbose) apc_warning(" 0x%x[%d] (s%d)" TSRMLS_CC, cur, OFFSET(cur), cur->size); ++ if (canary_check) CHECK_CANARY(cur); ++ if (!cur->fnext) break; ++ cur = BLOCKAT(cur->fnext); ++ avail += cur->size; ++ if (prv == cur) { ++ apc_warning("Circular list detected!" TSRMLS_CC); ++ assert(0); ++ } ++ if (prv && cur->fprev != OFFSET(prv)) { ++ apc_warning("Previous pointer does not point to previous!" TSRMLS_CC); ++ assert(0); ++ } ++ prv = cur; ++ } ++ assert(avail == header->avail); ++ ++ /* Verify each block */ ++ if (verbose) apc_warning("Block List: " TSRMLS_CC); ++ cur = BLOCKAT(ALIGNWORD(sizeof(sma_header_t))); ++ while(1) { ++ if(!cur->fnext) { ++ if (verbose) apc_warning(" 0x%x[%d] (s%d) (u)" TSRMLS_CC, cur, OFFSET(cur), cur->size); ++ } else { ++ if (verbose) apc_warning(" 0x%x[%d] (s%d) (f)" TSRMLS_CC, cur, OFFSET(cur), cur->size); ++ } ++ if (canary_check) CHECK_CANARY(cur); ++ if (!cur->size && !cur->fnext) break; ++ if (!cur->size) { ++ cur = BLOCKAT(OFFSET(cur) + ALIGNWORD(sizeof(block_t))); ++ } else { ++ cur = NEXT_SBLOCK(cur); ++ } ++ if (prv == cur) { ++ apc_warning("Circular list detected!" TSRMLS_CC); ++ assert(0); ++ } ++ prv = cur; ++ } ++} ++/* }}} */ ++#endif ++ ++/* {{{ sma_allocate: tries to allocate at least size bytes in a segment */ ++static size_t sma_allocate(sma_header_t* header, size_t size, size_t fragment, size_t *allocated) ++{ ++ void* shmaddr; /* header of shared memory segment */ ++ block_t* prv; /* block prior to working block */ ++ block_t* cur; /* working block in list */ ++ block_t* prvnextfit; /* block before next fit */ ++ size_t realsize; /* actual size of block needed, including header */ ++ const size_t block_size = ALIGNWORD(sizeof(struct block_t)); ++ ++ realsize = ALIGNWORD(size + block_size); ++ ++ /* ++ * First, insure that the segment contains at least realsize free bytes, ++ * even if they are not contiguous. ++ */ ++ shmaddr = header; ++ ++ if (header->avail < realsize) { ++ return -1; ++ } ++ ++ prvnextfit = 0; /* initially null (no fit) */ ++ prv = BLOCKAT(ALIGNWORD(sizeof(sma_header_t))); ++ CHECK_CANARY(prv); ++ ++ while (prv->fnext != 0) { ++ cur = BLOCKAT(prv->fnext); ++#ifdef __APC_SMA_DEBUG__ ++ CHECK_CANARY(cur); ++#endif ++ /* If it can fit realsize bytes in cur block, stop searching */ ++ if (cur->size >= realsize) { ++ prvnextfit = prv; ++ break; ++ } ++ prv = cur; ++ } ++ ++ if (prvnextfit == 0) { ++ return -1; ++ } ++ ++ prv = prvnextfit; ++ cur = BLOCKAT(prv->fnext); ++ ++ CHECK_CANARY(prv); ++ CHECK_CANARY(cur); ++ ++ if (cur->size == realsize || (cur->size > realsize && cur->size < (realsize + (MINBLOCKSIZE + fragment)))) { ++ /* cur is big enough for realsize, but too small to split - unlink it */ ++ *(allocated) = cur->size - block_size; ++ prv->fnext = cur->fnext; ++ BLOCKAT(cur->fnext)->fprev = OFFSET(prv); ++ NEXT_SBLOCK(cur)->prev_size = 0; /* block is alloc'd */ ++ } else { ++ /* nextfit is too big; split it into two smaller blocks */ ++ block_t* nxt; /* the new block (chopped part of cur) */ ++ size_t oldsize; /* size of cur before split */ ++ ++ oldsize = cur->size; ++ cur->size = realsize; ++ *(allocated) = cur->size - block_size; ++ nxt = NEXT_SBLOCK(cur); ++ nxt->prev_size = 0; /* block is alloc'd */ ++ nxt->size = oldsize - realsize; /* and fix the size */ ++ NEXT_SBLOCK(nxt)->prev_size = nxt->size; /* adjust size */ ++ SET_CANARY(nxt); ++ ++ /* replace cur with next in free list */ ++ nxt->fnext = cur->fnext; ++ nxt->fprev = cur->fprev; ++ BLOCKAT(nxt->fnext)->fprev = OFFSET(nxt); ++ BLOCKAT(nxt->fprev)->fnext = OFFSET(nxt); ++#ifdef __APC_SMA_DEBUG__ ++ nxt->id = -1; ++#endif ++ } ++ ++ cur->fnext = 0; ++ ++ /* update the block header */ ++ header->avail -= cur->size; ++#if ALLOC_DISTRIBUTION ++ header->adist[(int)(log(size)/log(2))]++; ++#endif ++ ++ SET_CANARY(cur); ++#ifdef __APC_SMA_DEBUG__ ++ cur->id = ++block_id; ++ fprintf(stderr, "allocate(realsize=%d,size=%d,id=%d)\n", (int)(size), (int)(cur->size), cur->id); ++#endif ++ ++ return OFFSET(cur) + block_size; ++} ++/* }}} */ ++ ++/* {{{ sma_deallocate: deallocates the block at the given offset */ ++static size_t sma_deallocate(void* shmaddr, size_t offset) ++{ ++ sma_header_t* header; /* header of shared memory segment */ ++ block_t* cur; /* the new block to insert */ ++ block_t* prv; /* the block before cur */ ++ block_t* nxt; /* the block after cur */ ++ size_t size; /* size of deallocated block */ ++ ++ offset -= ALIGNWORD(sizeof(struct block_t)); ++ assert(offset >= 0); ++ ++ /* find position of new block in free list */ ++ cur = BLOCKAT(offset); ++ ++ /* update the block header */ ++ header = (sma_header_t*) shmaddr; ++ header->avail += cur->size; ++ size = cur->size; ++ ++ if (cur->prev_size != 0) { ++ /* remove prv from list */ ++ prv = PREV_SBLOCK(cur); ++ BLOCKAT(prv->fnext)->fprev = prv->fprev; ++ BLOCKAT(prv->fprev)->fnext = prv->fnext; ++ /* cur and prv share an edge, combine them */ ++ prv->size +=cur->size; ++ RESET_CANARY(cur); ++ cur = prv; ++ } ++ ++ nxt = NEXT_SBLOCK(cur); ++ if (nxt->fnext != 0) { ++ assert(NEXT_SBLOCK(NEXT_SBLOCK(cur))->prev_size == nxt->size); ++ /* cur and nxt shared an edge, combine them */ ++ BLOCKAT(nxt->fnext)->fprev = nxt->fprev; ++ BLOCKAT(nxt->fprev)->fnext = nxt->fnext; ++ cur->size += nxt->size; ++#ifdef __APC_SMA_DEBUG__ ++ CHECK_CANARY(nxt); ++ nxt->id = -1; /* assert this or set it ? */ ++#endif ++ RESET_CANARY(nxt); ++ } ++ ++ NEXT_SBLOCK(cur)->prev_size = cur->size; ++ ++ /* insert new block after prv */ ++ prv = BLOCKAT(ALIGNWORD(sizeof(sma_header_t))); ++ cur->fnext = prv->fnext; ++ prv->fnext = OFFSET(cur); ++ cur->fprev = OFFSET(prv); ++ BLOCKAT(cur->fnext)->fprev = OFFSET(cur); ++ ++ return size; ++} ++/* }}} */ ++ ++/* {{{ apc_sma_init */ ++ ++void apc_sma_init(int numseg, size_t segsize, char *mmap_file_mask TSRMLS_DC) ++{ ++ uint i; ++ ++ if (sma_initialized) { ++ return; ++ } ++ sma_initialized = 1; ++ ++#if APC_MMAP ++ /* ++ * I don't think multiple anonymous mmaps makes any sense ++ * so force sma_numseg to 1 in this case ++ */ ++ if(!mmap_file_mask || ++ (mmap_file_mask && !strlen(mmap_file_mask)) || ++ (mmap_file_mask && !strcmp(mmap_file_mask, "/dev/zero"))) { ++ sma_numseg = 1; ++ } else { ++ sma_numseg = numseg > 0 ? numseg : DEFAULT_NUMSEG; ++ } ++#else ++ sma_numseg = numseg > 0 ? numseg : DEFAULT_NUMSEG; ++#endif ++ ++ sma_segsize = segsize > 0 ? segsize : DEFAULT_SEGSIZE; ++ ++ sma_segments = (apc_segment_t*) apc_emalloc((sma_numseg * sizeof(apc_segment_t)) TSRMLS_CC); ++ ++ for (i = 0; i < sma_numseg; i++) { ++ sma_header_t* header; ++ block_t *first, *empty, *last; ++ void* shmaddr; ++ ++#if APC_MMAP ++ sma_segments[i] = apc_mmap(mmap_file_mask, sma_segsize TSRMLS_CC); ++ if(sma_numseg != 1) memcpy(&mmap_file_mask[strlen(mmap_file_mask)-6], "XXXXXX", 6); ++#else ++ sma_segments[i] = apc_shm_attach(apc_shm_create(i, sma_segsize TSRMLS_CC) TSRMLS_CC); ++#endif ++ ++ sma_segments[i].size = sma_segsize; ++ ++ shmaddr = sma_segments[i].shmaddr; ++ ++ header = (sma_header_t*) shmaddr; ++ apc_lck_create(NULL, 0, 1, header->sma_lock); ++ header->segsize = sma_segsize; ++ header->avail = sma_segsize - ALIGNWORD(sizeof(sma_header_t)) - ALIGNWORD(sizeof(block_t)) - ALIGNWORD(sizeof(block_t)); ++#if ALLOC_DISTRIBUTION ++ { ++ int j; ++ for(j=0; j<30; j++) header->adist[j] = 0; ++ } ++#endif ++ first = BLOCKAT(ALIGNWORD(sizeof(sma_header_t))); ++ first->size = 0; ++ first->fnext = ALIGNWORD(sizeof(sma_header_t)) + ALIGNWORD(sizeof(block_t)); ++ first->fprev = 0; ++ first->prev_size = 0; ++ SET_CANARY(first); ++#ifdef __APC_SMA_DEBUG__ ++ block->id = -1; ++#endif ++ empty = BLOCKAT(first->fnext); ++ empty->size = header->avail - ALIGNWORD(sizeof(block_t)); ++ empty->fnext = OFFSET(empty) + empty->size; ++ empty->fprev = ALIGNWORD(sizeof(sma_header_t)); ++ empty->prev_size = 0; ++ SET_CANARY(empty); ++#ifdef __APC_SMA_DEBUG__ ++ empty->id = -1; ++#endif ++ last = BLOCKAT(empty->fnext); ++ last->size = 0; ++ last->fnext = 0; ++ last->fprev = OFFSET(empty); ++ last->prev_size = empty->size; ++ SET_CANARY(last); ++#ifdef __APC_SMA_DEBUG__ ++ last->id = -1; ++#endif ++ } ++} ++/* }}} */ ++ ++/* {{{ apc_sma_cleanup */ ++void apc_sma_cleanup(TSRMLS_D) ++{ ++ uint i; ++ ++ assert(sma_initialized); ++ ++ for (i = 0; i < sma_numseg; i++) { ++ apc_lck_destroy(SMA_LCK(i)); ++#if APC_MMAP ++ apc_unmap(&sma_segments[i] TSRMLS_CC); ++#else ++ apc_shm_detach(&sma_segments[i] TSRMLS_CC); ++#endif ++ } ++ sma_initialized = 0; ++ apc_efree(sma_segments TSRMLS_CC); ++} ++/* }}} */ ++ ++/* {{{ apc_sma_malloc_ex */ ++void* apc_sma_malloc_ex(size_t n, size_t fragment, size_t* allocated TSRMLS_DC) ++{ ++ size_t off; ++ uint i; ++ int nuked = 0; ++ ++restart: ++ assert(sma_initialized); ++ LOCK(SMA_LCK(sma_lastseg)); ++ ++ off = sma_allocate(SMA_HDR(sma_lastseg), n, fragment, allocated); ++ ++ if(off == -1 && APCG(current_cache)) { ++ /* retry failed allocation after we expunge */ ++ UNLOCK(SMA_LCK(sma_lastseg)); ++ APCG(current_cache)->expunge_cb(APCG(current_cache), (n+fragment) TSRMLS_CC); ++ LOCK(SMA_LCK(sma_lastseg)); ++ off = sma_allocate(SMA_HDR(sma_lastseg), n, fragment, allocated); ++ } ++ ++ if (off != -1) { ++ void* p = (void *)(SMA_ADDR(sma_lastseg) + off); ++ UNLOCK(SMA_LCK(sma_lastseg)); ++#ifdef VALGRIND_MALLOCLIKE_BLOCK ++ VALGRIND_MALLOCLIKE_BLOCK(p, n, 0, 0); ++#endif ++ return p; ++ } ++ ++ UNLOCK(SMA_LCK(sma_lastseg)); ++ ++ for (i = 0; i < sma_numseg; i++) { ++ if (i == sma_lastseg) { ++ continue; ++ } ++ LOCK(SMA_LCK(i)); ++ off = sma_allocate(SMA_HDR(i), n, fragment, allocated); ++ if(off == -1 && APCG(current_cache)) { ++ /* retry failed allocation after we expunge */ ++ UNLOCK(SMA_LCK(i)); ++ APCG(current_cache)->expunge_cb(APCG(current_cache), (n+fragment) TSRMLS_CC); ++ LOCK(SMA_LCK(i)); ++ off = sma_allocate(SMA_HDR(i), n, fragment, allocated); ++ } ++ if (off != -1) { ++ void* p = (void *)(SMA_ADDR(i) + off); ++ UNLOCK(SMA_LCK(i)); ++ sma_lastseg = i; ++#ifdef VALGRIND_MALLOCLIKE_BLOCK ++ VALGRIND_MALLOCLIKE_BLOCK(p, n, 0, 0); ++#endif ++ return p; ++ } ++ UNLOCK(SMA_LCK(i)); ++ } ++ ++ /* I've tried being nice, but now you're just asking for it */ ++ if(!nuked) { ++ apc_cache->expunge_cb(apc_cache, (n+fragment) TSRMLS_CC); ++ apc_user_cache->expunge_cb(apc_cache, (n+fragment) TSRMLS_CC); ++ nuked = 1; ++ goto restart; ++ } ++ ++ /* now, I've truly and well given up */ ++ ++ return NULL; ++} ++/* }}} */ ++ ++/* {{{ apc_sma_malloc */ ++void* apc_sma_malloc(size_t n TSRMLS_DC) ++{ ++ size_t allocated; ++ void *p = apc_sma_malloc_ex(n, MINBLOCKSIZE, &allocated TSRMLS_CC); ++ ++ return p; ++} ++/* }}} */ ++ ++/* {{{ apc_sma_realloc */ ++void* apc_sma_realloc(void *p, size_t n TSRMLS_DC) ++{ ++ apc_sma_free(p TSRMLS_CC); ++ return apc_sma_malloc(n TSRMLS_CC); ++} ++/* }}} */ ++ ++/* {{{ apc_sma_strdup */ ++char* apc_sma_strdup(const char* s TSRMLS_DC) ++{ ++ void* q; ++ int len; ++ ++ if(!s) return NULL; ++ ++ len = strlen(s)+1; ++ q = apc_sma_malloc(len TSRMLS_CC); ++ if(!q) return NULL; ++ memcpy(q, s, len); ++ return q; ++} ++/* }}} */ ++ ++/* {{{ apc_sma_free */ ++void apc_sma_free(void* p TSRMLS_DC) ++{ ++ uint i; ++ size_t offset; ++ size_t d_size; ++ ++ if (p == NULL) { ++ return; ++ } ++ ++ assert(sma_initialized); ++ ++ ++ for (i = 0; i < sma_numseg; i++) { ++ offset = (size_t)((char *)p - SMA_ADDR(i)); ++ if (p >= (void*)SMA_ADDR(i) && offset < sma_segsize) { ++ LOCK(SMA_LCK(i)); ++ d_size = sma_deallocate(SMA_HDR(i), offset); ++ UNLOCK(SMA_LCK(i)); ++#ifdef VALGRIND_FREELIKE_BLOCK ++ VALGRIND_FREELIKE_BLOCK(p, 0); ++#endif ++ return; ++ } ++ } ++ ++ apc_error("apc_sma_free: could not locate address %p" TSRMLS_CC, p); ++} ++/* }}} */ ++ ++#ifdef APC_MEMPROTECT ++/* {{{ */ ++void* apc_sma_protect(void *p) ++{ ++ unsigned int i = 0; ++ size_t offset; ++ ++ if (p == NULL) { ++ return NULL; ++ } ++ ++ if(SMA_RO(sma_lastseg) == NULL) return p; ++ ++ offset = (size_t)((char *)p - SMA_ADDR(sma_lastseg)); ++ ++ if(p >= (void*)SMA_ADDR(sma_lastseg) && offset < sma_segsize) { ++ return SMA_RO(sma_lastseg) + offset; ++ } ++ ++ for (i = 0; i < sma_numseg; i++) { ++ offset = (size_t)((char *)p - SMA_ADDR(i)); ++ if (p >= (void*)SMA_ADDR(i) && offset < sma_segsize) { ++ return SMA_RO(i) + offset; ++ } ++ } ++ ++ return NULL; ++} ++/* }}} */ ++ ++/* {{{ */ ++void* apc_sma_unprotect(void *p) ++{ ++ unsigned int i = 0; ++ size_t offset; ++ ++ if (p == NULL) { ++ return NULL; ++ } ++ ++ if(SMA_RO(sma_lastseg) == NULL) return p; ++ ++ offset = (size_t)((char *)p - SMA_RO(sma_lastseg)); ++ ++ if(p >= (void*)SMA_RO(sma_lastseg) && offset < sma_segsize) { ++ return SMA_ADDR(sma_lastseg) + offset; ++ } ++ ++ for (i = 0; i < sma_numseg; i++) { ++ offset = (size_t)((char *)p - SMA_RO(i)); ++ if (p >= (void*)SMA_RO(i) && offset < sma_segsize) { ++ return SMA_ADDR(i) + offset; ++ } ++ } ++ ++ return NULL; ++} ++/* }}} */ ++#else ++/* {{{ */ ++void* apc_sma_protect(void *p) { return p; } ++void* apc_sma_unprotect(void *p) { return p; } ++/* }}} */ ++#endif ++ ++/* {{{ apc_sma_info */ ++apc_sma_info_t* apc_sma_info(zend_bool limited TSRMLS_DC) ++{ ++ apc_sma_info_t* info; ++ apc_sma_link_t** link; ++ uint i; ++ char* shmaddr; ++ block_t* prv; ++ ++ if (!sma_initialized) { ++ return NULL; ++ } ++ ++ info = (apc_sma_info_t*) apc_emalloc(sizeof(apc_sma_info_t) TSRMLS_CC); ++ info->num_seg = sma_numseg; ++ info->seg_size = sma_segsize - (ALIGNWORD(sizeof(sma_header_t)) + ALIGNWORD(sizeof(block_t)) + ALIGNWORD(sizeof(block_t))); ++ ++ info->list = apc_emalloc(info->num_seg * sizeof(apc_sma_link_t*) TSRMLS_CC); ++ for (i = 0; i < sma_numseg; i++) { ++ info->list[i] = NULL; ++ } ++ ++ if(limited) return info; ++ ++ /* For each segment */ ++ for (i = 0; i < sma_numseg; i++) { ++ RDLOCK(SMA_LCK(i)); ++ shmaddr = SMA_ADDR(i); ++ prv = BLOCKAT(ALIGNWORD(sizeof(sma_header_t))); ++ ++ link = &info->list[i]; ++ ++ /* For each block in this segment */ ++ while (BLOCKAT(prv->fnext)->fnext != 0) { ++ block_t* cur = BLOCKAT(prv->fnext); ++#ifdef __APC_SMA_DEBUG__ ++ CHECK_CANARY(cur); ++#endif ++ ++ *link = apc_emalloc(sizeof(apc_sma_link_t) TSRMLS_CC); ++ (*link)->size = cur->size; ++ (*link)->offset = prv->fnext; ++ (*link)->next = NULL; ++ link = &(*link)->next; ++ ++ prv = cur; ++ ++#if ALLOC_DISTRIBUTION ++ sma_header_t* header = (sma_header_t*) segment->shmaddr; ++ memcpy(info->seginfo[i].adist, header->adist, sizeof(size_t) * 30); ++#endif ++ ++ } ++ UNLOCK(SMA_LCK(i)); ++ } ++ ++ return info; ++} ++/* }}} */ ++ ++/* {{{ apc_sma_free_info */ ++void apc_sma_free_info(apc_sma_info_t* info TSRMLS_DC) ++{ ++ int i; ++ ++ for (i = 0; i < info->num_seg; i++) { ++ apc_sma_link_t* p = info->list[i]; ++ while (p) { ++ apc_sma_link_t* q = p; ++ p = p->next; ++ apc_efree(q TSRMLS_CC); ++ } ++ } ++ apc_efree(info->list TSRMLS_CC); ++ apc_efree(info TSRMLS_CC); ++} ++/* }}} */ ++ ++/* {{{ apc_sma_get_avail_mem */ ++size_t apc_sma_get_avail_mem() ++{ ++ size_t avail_mem = 0; ++ uint i; ++ ++ for (i = 0; i < sma_numseg; i++) { ++ sma_header_t* header = SMA_HDR(i); ++ avail_mem += header->avail; ++ } ++ return avail_mem; ++} ++/* }}} */ ++ ++/* {{{ apc_sma_get_avail_size */ ++zend_bool apc_sma_get_avail_size(size_t size) ++{ ++ uint i; ++ ++ for (i = 0; i < sma_numseg; i++) { ++ sma_header_t* header = SMA_HDR(i); ++ if (header->avail > size) { ++ return 1; ++ } ++ } ++ return 0; ++} ++/* }}} */ ++ ++ ++#if ALLOC_DISTRIBUTION ++size_t *apc_sma_get_alloc_distribution(void) { ++ sma_header_t* header = (sma_header_t*) segment->sma_shmaddr; ++ return header->adist; ++} ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_sma.h +@@ -0,0 +1,103 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_sma.h 303274 2010-09-11 14:31:32Z iliaa $ */ ++ ++#ifndef APC_SMA_H ++#define APC_SMA_H ++ ++#define ALLOC_DISTRIBUTION 0 ++ ++#include "apc.h" ++ ++/* Simple shared memory allocator */ ++ ++typedef struct _apc_segment_t apc_segment_t; ++ ++struct _apc_segment_t { ++ size_t size; ++ void* shmaddr; ++#ifdef APC_MEMPROTECT ++ void* roaddr; ++#endif ++}; ++ ++extern void apc_sma_init(int numseg, size_t segsize, char *mmap_file_mask TSRMLS_DC); ++extern void apc_sma_cleanup(TSRMLS_D); ++extern void* apc_sma_malloc(size_t size TSRMLS_DC); ++extern void* apc_sma_malloc_ex(size_t size, size_t fragment, size_t* allocated TSRMLS_DC); ++extern void* apc_sma_realloc(void* p, size_t size TSRMLS_DC); ++extern char* apc_sma_strdup(const char *s TSRMLS_DC); ++extern void apc_sma_free(void* p TSRMLS_DC); ++#if ALLOC_DISTRIBUTION ++extern size_t *apc_sma_get_alloc_distribution(); ++#endif ++ ++extern void* apc_sma_protect(void *p); ++extern void* apc_sma_unprotect(void *p); ++ ++/* {{{ struct definition: apc_sma_link_t */ ++typedef struct apc_sma_link_t apc_sma_link_t; ++struct apc_sma_link_t { ++ long size; /* size of this free block */ ++ long offset; /* offset in segment of this block */ ++ apc_sma_link_t* next; /* link to next free block */ ++}; ++/* }}} */ ++ ++/* {{{ struct definition: apc_sma_info_t */ ++typedef struct apc_sma_info_t apc_sma_info_t; ++struct apc_sma_info_t { ++ int num_seg; /* number of shared memory segments */ ++ size_t seg_size; /* size of each shared memory segment */ ++ apc_sma_link_t** list; /* there is one list per segment */ ++}; ++/* }}} */ ++ ++extern apc_sma_info_t* apc_sma_info(zend_bool limited TSRMLS_DC); ++extern void apc_sma_free_info(apc_sma_info_t* info TSRMLS_DC); ++ ++extern size_t apc_sma_get_avail_mem(); ++extern zend_bool apc_sma_get_avail_size(size_t size); ++extern void apc_sma_check_integrity(); ++ ++/* {{{ ALIGNWORD: pad up x, aligned to the system's word boundary */ ++typedef union { void* p; int i; long l; double d; void (*f)(); } apc_word_t; ++#define ALIGNSIZE(x, size) ((size) * (1 + (((x)-1)/(size)))) ++#define ALIGNWORD(x) ALIGNSIZE(x, sizeof(apc_word_t)) ++/* }}} */ ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_spin.c +@@ -0,0 +1,66 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Brian Shire | ++ +----------------------------------------------------------------------+ ++ ++ */ ++ ++/* $Id: apc_spin.c 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#include "apc_spin.h" ++ ++#ifdef APC_SPIN_LOCKS ++ ++slock_t *apc_slock_create(slock_t *lock) ++{ ++ S_INIT_LOCK(lock); ++ return lock; ++} ++ ++void apc_slock_destroy(slock_t *lock) ++{ ++ return; ++} ++ ++void apc_slock_lock(slock_t *lock TSRMLS_DC) ++{ ++ S_LOCK(lock); ++} ++ ++void apc_slock_unlock(slock_t *lock) ++{ ++ S_UNLOCK(lock); ++} ++ ++zend_bool apc_slock_nonblocking_lock(slock_t *lock) ++{ ++ /* Technically we aren't supposed to call this directly, but the original ++ * code provides no method for absolute non-blocking locks, so we'll call into ++ * the TAS (test and set) functionality directly ++ */ ++ return !(TAS(lock)); /* if TAS returns 0 we obtained the lock, otherwise we failed */ ++} ++ ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_spin.h +@@ -0,0 +1,48 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Brian Shire | ++ +----------------------------------------------------------------------+ ++ ++ */ ++ ++/* $Id: apc_spin.h 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#ifndef APC_SPIN_H ++#define APC_SPIN_H ++ ++#include "apc.h" ++ ++#ifdef APC_SPIN_LOCKS ++ ++#include "pgsql_s_lock.h" ++ ++slock_t *apc_slock_create(slock_t *lock); ++void apc_slock_destroy(slock_t *lock); ++void apc_slock_lock(slock_t *lock TSRMLS_DC); ++zend_bool apc_slock_nonblocking_lock(slock_t *lock); ++void apc_slock_unlock(slock_t *lock); ++ ++#endif ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_stack.c +@@ -0,0 +1,106 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_stack.c 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#include "apc.h" ++#include "apc_stack.h" ++ ++struct apc_stack_t { ++ void** data; ++ int capacity; ++ int size; ++}; ++ ++apc_stack_t* apc_stack_create(int size_hint TSRMLS_DC) ++{ ++ apc_stack_t* stack = (apc_stack_t*) apc_emalloc(sizeof(apc_stack_t) TSRMLS_CC); ++ ++ stack->capacity = (size_hint > 0) ? size_hint : 10; ++ stack->size = 0; ++ stack->data = (void**) apc_emalloc(sizeof(void*) * stack->capacity TSRMLS_CC); ++ ++ return stack; ++} ++ ++void apc_stack_destroy(apc_stack_t* stack TSRMLS_DC) ++{ ++ if (stack != NULL) { ++ apc_efree(stack->data TSRMLS_CC); ++ apc_efree(stack TSRMLS_CC); ++ } ++} ++ ++void apc_stack_clear(apc_stack_t* stack) ++{ ++ assert(stack != NULL); ++ stack->size = 0; ++} ++ ++void apc_stack_push(apc_stack_t* stack, void* item TSRMLS_DC) ++{ ++ assert(stack != NULL); ++ if (stack->size == stack->capacity) { ++ stack->capacity *= 2; ++ stack->data = apc_erealloc(stack->data, sizeof(void*)*stack->capacity TSRMLS_CC); ++ } ++ stack->data[stack->size++] = item; ++} ++ ++void* apc_stack_pop(apc_stack_t* stack) ++{ ++ assert(stack != NULL && stack->size > 0); ++ return stack->data[--stack->size]; ++} ++ ++void* apc_stack_top(apc_stack_t* stack) ++{ ++ assert(stack != NULL && stack->size > 0); ++ return stack->data[stack->size-1]; ++} ++ ++void* apc_stack_get(apc_stack_t* stack, int n) ++{ ++ assert(stack != NULL && stack->size > n); ++ return stack->data[n]; ++} ++ ++int apc_stack_size(apc_stack_t* stack) ++{ ++ assert(stack != NULL); ++ return stack->size; ++} ++ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_stack.h +@@ -0,0 +1,58 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | George Schlossnagle | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_stack.h 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++#ifndef APC_STACK_H ++#define APC_STACK_H ++ ++/* Basic stack datatype */ ++ ++#define T apc_stack_t* ++typedef struct apc_stack_t apc_stack_t; /* opaque stack type */ ++ ++extern T apc_stack_create(int size_hint TSRMLS_DC); ++extern void apc_stack_destroy(T stack TSRMLS_DC); ++extern void apc_stack_clear(T stack); ++extern void apc_stack_push(T stack, void* item TSRMLS_DC); ++extern void* apc_stack_pop(T stack); ++extern void* apc_stack_top(T stack); ++extern void* apc_stack_get(T stack, int n); ++extern int apc_stack_size(T stack); ++ ++#undef T ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_string.c +@@ -0,0 +1,247 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Dmitry Stogov | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: $ */ ++ ++#include "apc.h" ++#include "apc_globals.h" ++#include "apc_php.h" ++#include "apc_lock.h" ++ ++#ifdef ZEND_ENGINE_2_4 ++ ++typedef struct _apc_interned_strings_data_t { ++ char *interned_strings_start; ++ char *interned_strings_end; ++ char *interned_strings_top; ++ apc_lck_t lock; ++ HashTable interned_strings; ++} apc_interned_strings_data_t; ++ ++apc_interned_strings_data_t *apc_interned_strings_data = NULL; ++ ++#define APCSG(v) (apc_interned_strings_data->v) ++ ++static char *old_interned_strings_start; ++static char *old_interned_strings_end; ++static char *(*old_new_interned_string)(char *str, int len, int free_src TSRMLS_DC); ++static void (*old_interned_strings_snapshot)(TSRMLS_D); ++static void (*old_interned_strings_restore)(TSRMLS_D); ++ ++static char *apc_dummy_new_interned_string_for_php(char *str, int len, int free_src TSRMLS_DC) ++{ ++ return str; ++} ++ ++static void apc_dummy_interned_strings_snapshot_for_php(TSRMLS_D) ++{ ++} ++ ++static void apc_dummy_interned_strings_restore_for_php(TSRMLS_D) ++{ ++} ++ ++char *apc_new_interned_string(char *arKey, int nKeyLength TSRMLS_DC) ++{ ++ ulong h; ++ uint nIndex; ++ Bucket *p; ++ ++ if (arKey >= APCSG(interned_strings_start) && arKey < APCSG(interned_strings_end)) { ++ return arKey; ++ } ++ ++ h = zend_inline_hash_func(arKey, nKeyLength); ++ nIndex = h & APCSG(interned_strings).nTableMask; ++ ++ p = APCSG(interned_strings).arBuckets[nIndex]; ++ while (p != NULL) { ++ if ((p->h == h) && (p->nKeyLength == nKeyLength)) { ++ if (!memcmp(p->arKey, arKey, nKeyLength)) { ++ return p->arKey; ++ } ++ } ++ p = p->pNext; ++ } ++ ++ if (APCSG(interned_strings_top) + ZEND_MM_ALIGNED_SIZE(sizeof(Bucket) + nKeyLength) >= ++ APCSG(interned_strings_end)) { ++ /* no memory */ ++ return NULL; ++ } ++ ++ p = (Bucket *) APCSG(interned_strings_top); ++ APCSG(interned_strings_top) += ZEND_MM_ALIGNED_SIZE(sizeof(Bucket) + nKeyLength); ++ ++ p->arKey = (char*)(p+1); ++ memcpy(p->arKey, arKey, nKeyLength); ++ p->nKeyLength = nKeyLength; ++ p->h = h; ++ p->pData = &p->pDataPtr; ++ p->pDataPtr = p; ++ ++ p->pNext = APCSG(interned_strings).arBuckets[nIndex]; ++ p->pLast = NULL; ++ if (p->pNext) { ++ p->pNext->pLast = p; ++ } ++ APCSG(interned_strings).arBuckets[nIndex] = p; ++ ++ p->pListLast = APCSG(interned_strings).pListTail; ++ APCSG(interned_strings).pListTail = p; ++ p->pListNext = NULL; ++ if (p->pListLast != NULL) { ++ p->pListLast->pListNext = p; ++ } ++ if (!APCSG(interned_strings).pListHead) { ++ APCSG(interned_strings).pListHead = p; ++ } ++ ++ APCSG(interned_strings).nNumOfElements++; ++ ++ return p->arKey; ++} ++ ++static void apc_copy_internal_strings(TSRMLS_D) ++{ ++ Bucket *p, *q; ++ ++ p = CG(function_table)->pListHead; ++ while (p) { ++ if (p->nKeyLength) { ++ p->arKey = apc_new_interned_string(p->arKey, p->nKeyLength TSRMLS_CC); ++ } ++ p = p->pListNext; ++ } ++ ++ p = CG(class_table)->pListHead; ++ while (p) { ++ zend_class_entry *ce = (zend_class_entry*)(p->pDataPtr); ++ ++ if (p->nKeyLength) { ++ p->arKey = apc_new_interned_string(p->arKey, p->nKeyLength TSRMLS_CC); ++ } ++ ++ q = ce->properties_info.pListHead; ++ while (q) { ++ zend_property_info *info = (zend_property_info*)(q->pData); ++ ++ if (q->nKeyLength) { ++ q->arKey = apc_new_interned_string(q->arKey, q->nKeyLength TSRMLS_CC); ++ } ++ ++ if (info->name) { ++ info->name = apc_new_interned_string(info->name, info->name_length+1 TSRMLS_CC); ++ } ++ ++ q = q->pListNext; ++ } ++ ++ q = ce->function_table.pListHead; ++ while (q) { ++ if (q->nKeyLength) { ++ q->arKey = apc_new_interned_string(q->arKey, q->nKeyLength TSRMLS_CC); ++ } ++ q = q->pListNext; ++ } ++ ++ q = ce->constants_table.pListHead; ++ while (q) { ++ if (q->nKeyLength) { ++ q->arKey = apc_new_interned_string(q->arKey, q->nKeyLength TSRMLS_CC); ++ } ++ q = q->pListNext; ++ } ++ ++ p = p->pListNext; ++ } ++ ++ p = EG(zend_constants)->pListHead; ++ while (p) { ++ if (p->nKeyLength) { ++ p->arKey = apc_new_interned_string(p->arKey, p->nKeyLength TSRMLS_CC); ++ } ++ p = p->pListNext; ++ } ++} ++ ++void apc_interned_strings_init(TSRMLS_D) ++{ ++ int count = APCG(shm_strings_buffer) / (sizeof(Bucket) + sizeof(Bucket*) * 2); ++ ++ apc_interned_strings_data = (apc_interned_strings_data_t*) apc_sma_malloc(APCG(shm_strings_buffer) TSRMLS_CC); ++ ++ CREATE_LOCK(APCSG(lock)); ++ ++ zend_hash_init(&APCSG(interned_strings), count, NULL, NULL, 1); ++ APCSG(interned_strings).nTableMask = APCSG(interned_strings).nTableSize - 1; ++ APCSG(interned_strings).arBuckets = (Bucket**)((char*)apc_interned_strings_data + sizeof(apc_interned_strings_data_t)); ++ ++ APCSG(interned_strings_start) = (char*)APCSG(interned_strings).arBuckets + APCSG(interned_strings).nTableSize * sizeof(Bucket *); ++ APCSG(interned_strings_end) = (char*)apc_interned_strings_data + APCG(shm_strings_buffer); ++ APCSG(interned_strings_top) = APCSG(interned_strings_start); ++ ++ old_interned_strings_start = CG(interned_strings_start); ++ old_interned_strings_end = CG(interned_strings_end); ++ old_new_interned_string = zend_new_interned_string; ++ old_interned_strings_snapshot = zend_interned_strings_snapshot; ++ old_interned_strings_restore = zend_interned_strings_restore; ++ ++ CG(interned_strings_start) = APCSG(interned_strings_start); ++ CG(interned_strings_end) = APCSG(interned_strings_end); ++ zend_new_interned_string = apc_dummy_new_interned_string_for_php; ++ zend_interned_strings_snapshot = apc_dummy_interned_strings_snapshot_for_php; ++ zend_interned_strings_restore = apc_dummy_interned_strings_restore_for_php; ++ ++ apc_copy_internal_strings(TSRMLS_C); ++} ++ ++void apc_interned_strings_shutdown(TSRMLS_D) ++{ ++ zend_hash_clean(CG(function_table)); ++ zend_hash_clean(CG(class_table)); ++ zend_hash_clean(EG(zend_constants)); ++ ++ CG(interned_strings_start) = old_interned_strings_start; ++ CG(interned_strings_end) = old_interned_strings_end; ++ zend_new_interned_string = old_new_interned_string; ++ zend_interned_strings_snapshot = old_interned_strings_snapshot; ++ zend_interned_strings_restore = old_interned_strings_restore; ++ ++ DESTROY_LOCK(APCSG(lock)); ++} ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_string.h +@@ -0,0 +1,49 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Dmitry Stogov | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: $ */ ++ ++#ifndef APC_STRING ++#define APC_STRING ++ ++#include "apc.h" ++ ++void apc_interned_strings_init(TSRMLS_D); ++void apc_interned_strings_shutdown(TSRMLS_D); ++ ++char *apc_new_interned_string(char *arKey, int nKeyLength TSRMLS_DC); ++ ++#endif ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_zend.c +@@ -0,0 +1,271 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_zend.c 303426 2010-09-16 16:39:08Z iliaa $ */ ++ ++#include "apc_zend.h" ++#include "apc_globals.h" ++ ++/* true global */ ++int apc_reserved_offset; ++ ++void* apc_php_malloc(size_t n TSRMLS_DC) ++{ ++ return emalloc(n); ++} ++ ++void apc_php_free(void* p TSRMLS_DC) ++{ ++ efree(p); ++} ++ ++#ifdef APC_OPCODE_OVERRIDE ++ ++static opcode_handler_t *apc_original_opcode_handlers; ++static opcode_handler_t apc_opcode_handlers[APC_OPCODE_HANDLER_COUNT]; ++ ++#define APC_EX_T(offset) (*(temp_variable *)((char*)execute_data->Ts + offset)) ++ ++#ifdef ZEND_ENGINE_2_4 ++static zval *apc_get_zval_ptr(zend_uchar op_type, znode_op *node, zval **freeval, zend_execute_data *execute_data TSRMLS_DC) ++{ ++ *freeval = NULL; ++ ++ switch (op_type) { ++ case IS_CONST: ++ return node->zv; ++ case IS_VAR: ++ return APC_EX_T(node->var).var.ptr; ++ case IS_TMP_VAR: ++ return (*freeval = &APC_EX_T(node->var).tmp_var); ++ case IS_CV: ++ { ++ zval ***ret = &execute_data->CVs[node->var]; ++ ++ if (!*ret) { ++ zend_compiled_variable *cv = &EG(active_op_array)->vars[node->var]; ++ ++ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void**)ret)==FAILURE) { ++ apc_notice("Undefined variable: %s" TSRMLS_CC, cv->name); ++ return &EG(uninitialized_zval); ++ } ++ } ++ return **ret; ++ } ++ case IS_UNUSED: ++ default: ++ return NULL; ++ } ++} ++#else ++static zval *apc_get_zval_ptr(znode *node, zval **freeval, zend_execute_data *execute_data TSRMLS_DC) ++{ ++ *freeval = NULL; ++ ++ switch (node->op_type) { ++ case IS_CONST: ++ return &(node->u.constant); ++ case IS_VAR: ++ return APC_EX_T(node->u.var).var.ptr; ++ case IS_TMP_VAR: ++ return (*freeval = &APC_EX_T(node->u.var).tmp_var); ++#ifdef ZEND_ENGINE_2_1 ++ case IS_CV: ++ { ++ zval ***ret = &execute_data->CVs[node->u.var]; ++ ++ if (!*ret) { ++ zend_compiled_variable *cv = &EG(active_op_array)->vars[node->u.var]; ++ ++ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void**)ret)==FAILURE) { ++ apc_notice("Undefined variable: %s" TSRMLS_CC, cv->name); ++ return &EG(uninitialized_zval); ++ } ++ } ++ return **ret; ++ } ++#endif ++ case IS_UNUSED: ++ default: ++ return NULL; ++ } ++} ++#endif ++ ++static int ZEND_FASTCALL apc_op_ZEND_INCLUDE_OR_EVAL(ZEND_OPCODE_HANDLER_ARGS) ++{ ++ APC_ZEND_OPLINE ++ zval *freeop1 = NULL; ++ zval *inc_filename = NULL, tmp_inc_filename; ++ char realpath[MAXPATHLEN]; ++ php_stream_wrapper *wrapper; ++ char *path_for_open; ++ char *full_path = NULL; ++ int ret = 0; ++ apc_opflags_t* flags = NULL; ++ ++#ifdef ZEND_ENGINE_2_4 ++ if (opline->extended_value != ZEND_INCLUDE_ONCE && ++ opline->extended_value != ZEND_REQUIRE_ONCE) { ++ return apc_original_opcode_handlers[APC_OPCODE_HANDLER_DECODE(opline)](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); ++ } ++ ++ inc_filename = apc_get_zval_ptr(opline->op1_type, &opline->op1, &freeop1, execute_data TSRMLS_CC); ++#else ++ if (Z_LVAL(opline->op2.u.constant) != ZEND_INCLUDE_ONCE && ++ Z_LVAL(opline->op2.u.constant) != ZEND_REQUIRE_ONCE) { ++ return apc_original_opcode_handlers[APC_OPCODE_HANDLER_DECODE(opline)](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); ++ } ++ ++ inc_filename = apc_get_zval_ptr(&opline->op1, &freeop1, execute_data TSRMLS_CC); ++#endif ++ ++ if (Z_TYPE_P(inc_filename) != IS_STRING) { ++ tmp_inc_filename = *inc_filename; ++ zval_copy_ctor(&tmp_inc_filename); ++ convert_to_string(&tmp_inc_filename); ++ inc_filename = &tmp_inc_filename; ++ } ++ ++ wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(inc_filename), &path_for_open, 0 TSRMLS_CC); ++ ++ if (wrapper != &php_plain_files_wrapper || !(IS_ABSOLUTE_PATH(path_for_open, strlen(path_for_open)) || (full_path = expand_filepath(path_for_open, realpath TSRMLS_CC)))) { ++ /* Fallback to original handler */ ++ if (inc_filename == &tmp_inc_filename) { ++ zval_dtor(&tmp_inc_filename); ++ } ++ return apc_original_opcode_handlers[APC_OPCODE_HANDLER_DECODE(opline)](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); ++ } ++ ++ if (!full_path) { ++ full_path = path_for_open; ++ } ++ if (zend_hash_exists(&EG(included_files), realpath, strlen(realpath) + 1)) { ++#ifdef ZEND_ENGINE_2_4 ++ if (!(opline->result_type & EXT_TYPE_UNUSED)) { ++ ALLOC_INIT_ZVAL(APC_EX_T(opline->result.var).var.ptr); ++ ZVAL_TRUE(APC_EX_T(opline->result.var).var.ptr); ++ } ++#else ++ if (!(opline->result.u.EA.type & EXT_TYPE_UNUSED)) { ++ ALLOC_INIT_ZVAL(APC_EX_T(opline->result.u.var).var.ptr); ++ ZVAL_TRUE(APC_EX_T(opline->result.u.var).var.ptr); ++ } ++#endif ++ if (inc_filename == &tmp_inc_filename) { ++ zval_dtor(&tmp_inc_filename); ++ } ++ if (freeop1) { ++ zval_dtor(freeop1); ++ } ++ execute_data->opline++; ++ return 0; ++ } ++ ++ if (inc_filename == &tmp_inc_filename) { ++ zval_dtor(&tmp_inc_filename); ++ } ++ ++ if(apc_reserved_offset != -1) { ++ /* Insanity alert: look into apc_compile.c for why a void** is cast to a apc_opflags_t* */ ++ flags = (apc_opflags_t*) & (execute_data->op_array->reserved[apc_reserved_offset]); ++ } ++ ++ if(flags && flags->deep_copy == 1) { ++ /* Since the op array is a local copy, we can cheat our way through the file inclusion by temporarily ++ * changing the op to a plain require/include, calling its handler and finally restoring the opcode. ++ */ ++#ifdef ZEND_ENGINE_2_4 ++ opline->extended_value = (opline->extended_value == ZEND_INCLUDE_ONCE) ? ZEND_INCLUDE : ZEND_REQUIRE; ++ ret = apc_original_opcode_handlers[APC_OPCODE_HANDLER_DECODE(opline)](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); ++ opline->extended_value = (opline->extended_value == ZEND_INCLUDE) ? ZEND_INCLUDE_ONCE : ZEND_REQUIRE_ONCE; ++#else ++ Z_LVAL(opline->op2.u.constant) = (Z_LVAL(opline->op2.u.constant) == ZEND_INCLUDE_ONCE) ? ZEND_INCLUDE : ZEND_REQUIRE; ++ ret = apc_original_opcode_handlers[APC_OPCODE_HANDLER_DECODE(opline)](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); ++ Z_LVAL(opline->op2.u.constant) = (Z_LVAL(opline->op2.u.constant) == ZEND_INCLUDE) ? ZEND_INCLUDE_ONCE : ZEND_REQUIRE_ONCE; ++#endif ++ } else { ++ ret = apc_original_opcode_handlers[APC_OPCODE_HANDLER_DECODE(opline)](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); ++ } ++ ++ return ret; ++} ++ ++void apc_zend_init(TSRMLS_D) ++{ ++ zend_extension dummy_ext; ++ apc_reserved_offset = zend_get_resource_handle(&dummy_ext); ++ assert(apc_reserved_offset == dummy_ext.resource_number); ++ assert(apc_reserved_offset != -1); ++ assert(sizeof(apc_opflags_t) <= sizeof(void*)); ++ if (!APCG(include_once)) { ++ /* If we're not overriding the INCLUDE_OR_EVAL handler, then just skip this malarkey */ ++ return; ++ } ++ ++ memcpy(apc_opcode_handlers, zend_opcode_handlers, sizeof(apc_opcode_handlers)); ++ ++ /* 5.0 exposes zend_opcode_handlers differently than 5.1 and later */ ++#ifdef ZEND_ENGINE_2_1 ++ apc_original_opcode_handlers = zend_opcode_handlers; ++ zend_opcode_handlers = apc_opcode_handlers; ++#else ++ apc_original_opcode_handlers = apc_opcode_handlers; ++#endif ++ ++ APC_REPLACE_OPCODE(ZEND_INCLUDE_OR_EVAL); ++} ++ ++void apc_zend_shutdown(TSRMLS_D) ++{ ++ if (!APCG(include_once)) { ++ /* Nothing changed, nothing to restore */ ++ return; ++ } ++ ++#ifdef ZEND_ENGINE_2_1 ++ zend_opcode_handlers = apc_original_opcode_handlers; ++#else ++ memcpy(zend_opcode_handlers, apc_original_opcode_handlers, sizeof(apc_opcode_handlers)); ++#endif ++} ++ ++#else /* Opcode Overrides unavailable */ ++ ++void apc_zend_init(TSRMLS_D) { } ++void apc_zend_shutdown(TSRMLS_D) { } ++ ++#endif /* APC_OPCODE_OVERRIDE */ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/apc_zend.h +@@ -0,0 +1,191 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: apc_zend.h 303464 2010-09-17 12:19:29Z gopalv $ */ ++ ++#ifndef APC_ZEND_H ++#define APC_ZEND_H ++ ++/* Utilities for interfacing with the zend engine */ ++ ++#include "apc.h" ++#include "apc_php.h" ++ ++#ifndef Z_REFCOUNT_P ++#define Z_REFCOUNT_P(pz) (pz)->refcount ++#define Z_REFCOUNT_PP(ppz) Z_REFCOUNT_P(*(ppz)) ++#endif ++ ++#ifndef Z_SET_REFCOUNT_P ++#define Z_SET_REFCOUNT_P(pz, rc) (pz)->refcount = rc ++#define Z_SET_REFCOUNT_PP(ppz, rc) Z_SET_REFCOUNT_P(*(ppz), rc) ++#endif ++ ++#ifndef Z_ADDREF_P ++#define Z_ADDREF_P(pz) (pz)->refcount++ ++#define Z_ADDREF_PP(ppz) Z_ADDREF_P(*(ppz)) ++#endif ++ ++#ifndef Z_DELREF_P ++#define Z_DELREF_P(pz) (pz)->refcount-- ++#define Z_DELREF_PP(ppz) Z_DELREF_P(*(ppz)) ++#endif ++ ++#ifndef Z_ISREF_P ++#define Z_ISREF_P(pz) (pz)->is_ref ++#define Z_ISREF_PP(ppz) Z_ISREF_P(*(ppz)) ++#endif ++ ++#ifndef Z_SET_ISREF_P ++#define Z_SET_ISREF_P(pz) (pz)->is_ref = 1 ++#define Z_SET_ISREF_PP(ppz) Z_SET_ISREF_P(*(ppz)) ++#endif ++ ++#ifndef Z_UNSET_ISREF_P ++#define Z_UNSET_ISREF_P(pz) (pz)->is_ref = 0 ++#define Z_UNSET_ISREF_PP(ppz) Z_UNSET_ISREF_P(*(ppz)) ++#endif ++ ++#ifndef Z_SET_ISREF_TO_P ++#define Z_SET_ISREF_TO_P(pz, isref) (pz)->is_ref = isref ++#define Z_SET_ISREF_TO_PP(ppz, isref) Z_SET_ISREF_TO_P(*(ppz), isref) ++#endif ++ ++ ++extern void* apc_php_malloc(size_t n TSRMLS_DC); ++extern void apc_php_free(void* p TSRMLS_DC); ++ ++extern void apc_zend_init(TSRMLS_D); ++extern void apc_zend_shutdown(TSRMLS_D); ++ ++ ++/* offset for apc info in op_array->reserved */ ++extern int apc_reserved_offset; ++ ++#ifndef ZEND_VM_KIND_CALL /* Not currently defined by any ZE version */ ++# define ZEND_VM_KIND_CALL 1 ++#endif ++ ++#ifndef ZEND_VM_KIND /* Indicates PHP < 5.1 */ ++# define ZEND_VM_KIND ZEND_VM_KIND_CALL ++#endif ++ ++#if defined(ZEND_ENGINE_2) && (ZEND_VM_KIND == ZEND_VM_KIND_CALL) ++# define APC_OPCODE_OVERRIDE ++#endif ++ ++#ifdef APC_OPCODE_OVERRIDE ++ ++#ifdef ZEND_ENGINE_2_1 ++/* Taken from Zend/zend_vm_execute.h */ ++#define _CONST_CODE 0 ++#define _TMP_CODE 1 ++#define _VAR_CODE 2 ++#define _UNUSED_CODE 3 ++#define _CV_CODE 4 ++static inline int _apc_opcode_handler_decode(zend_op *opline) ++{ ++ static const int apc_vm_decode[] = { ++ _UNUSED_CODE, /* 0 */ ++ _CONST_CODE, /* 1 = IS_CONST */ ++ _TMP_CODE, /* 2 = IS_TMP_VAR */ ++ _UNUSED_CODE, /* 3 */ ++ _VAR_CODE, /* 4 = IS_VAR */ ++ _UNUSED_CODE, /* 5 */ ++ _UNUSED_CODE, /* 6 */ ++ _UNUSED_CODE, /* 7 */ ++ _UNUSED_CODE, /* 8 = IS_UNUSED */ ++ _UNUSED_CODE, /* 9 */ ++ _UNUSED_CODE, /* 10 */ ++ _UNUSED_CODE, /* 11 */ ++ _UNUSED_CODE, /* 12 */ ++ _UNUSED_CODE, /* 13 */ ++ _UNUSED_CODE, /* 14 */ ++ _UNUSED_CODE, /* 15 */ ++ _CV_CODE /* 16 = IS_CV */ ++ }; ++#ifdef ZEND_ENGINE_2_4 ++ return (opline->opcode * 25) + (apc_vm_decode[opline->op1_type] * 5) + apc_vm_decode[opline->op2_type]; ++#else ++ return (opline->opcode * 25) + (apc_vm_decode[opline->op1.op_type] * 5) + apc_vm_decode[opline->op2.op_type]; ++#endif ++} ++ ++# define APC_ZEND_OPLINE zend_op *opline = execute_data->opline; ++# define APC_OPCODE_HANDLER_DECODE(opline) _apc_opcode_handler_decode(opline) ++# if PHP_MAJOR_VERSION >= 6 ++# define APC_OPCODE_HANDLER_COUNT ((25 * 152) + 1) ++# elif defined(ZEND_ENGINE_2_4) ++# define APC_OPCODE_HANDLER_COUNT ((25 * 157) + 1) /* 3 new opcodes in 5.4? - separate, bind_trais, add_trait */ ++# elif PHP_MAJOR_VERSION >= 5 && PHP_MINOR_VERSION >= 3 ++# define APC_OPCODE_HANDLER_COUNT ((25 * 154) + 1) /* 3 new opcodes in 5.3 - unused, lambda, jmp_set */ ++# else ++# define APC_OPCODE_HANDLER_COUNT ((25 * 151) + 1) ++# endif ++# define APC_REPLACE_OPCODE(opname) { int i; for(i = 0; i < 25; i++) if (zend_opcode_handlers[(opname*25) + i]) zend_opcode_handlers[(opname*25) + i] = apc_op_##opname; } ++ ++#else /* ZE2.0 */ ++# define APC_ZEND_ONLINE ++# define APC_OPCODE_HANDLER_DECODE(opline) (opline->opcode) ++# define APC_OPCODE_HANDLER_COUNT 512 ++# define APC_REPLACE_OPCODE(opname) zend_opcode_handlers[opname] = apc_op_##opname; ++#endif ++ ++#ifndef ZEND_FASTCALL /* Added in ZE2.3.0 */ ++#define ZEND_FASTCALL ++#endif ++ ++/* Added in ZE2.3.0 */ ++#ifndef zend_parse_parameters_none ++# define zend_parse_parameters_none() zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") ++#endif ++ ++ ++#endif /* APC_OPCODE_OVERRIDE */ ++ ++#ifdef ZEND_ENGINE_2_4 ++# define ZEND_CE_FILENAME(ce) (ce)->info.user.filename ++# define ZEND_CE_DOC_COMMENT(ce) (ce)->info.user.doc_comment ++# define ZEND_CE_DOC_COMMENT_LEN(ce) (ce)->info.user.doc_comment_len ++# define ZEND_CE_BUILTIN_FUNCTIONS(ce) (ce)->info.internal.builtin_functions ++#else ++# define ZEND_CE_FILENAME(ce) (ce)->filename ++# define ZEND_CE_DOC_COMMENT(ce) (ce)->doc_comment ++# define ZEND_CE_DOC_COMMENT_LEN(ce) (ce)->doc_comment_len ++# define ZEND_CE_BUILTIN_FUNCTIONS(ce) (ce)->builtin_functions ++#endif ++ ++#endif /* APC_ZEND_H */ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/CHANGELOG +@@ -0,0 +1,249 @@ ++ ++3.1.2 : 2008-12-12 ++ ++- pecl package.xml/build fixes (bjori) ++ ++3.1.1 : 2008-12-12 ++ ++- PHP4 compatibilty break ++- apc_pool allocator (Gopal) ++- doubly-linked sma allocator (Shire) ++- php 5.3 gc compatibility (Gopal) ++- APCIterator for easy access (Shire) ++- apc_delete_file (Shire) ++- apc_inc/apc_dec/apc_cas functions (Shire) ++- apc.canonicalize (Gopal) ++- apc.preload_path (Gopal) ++- apc.rfc1867_ttl (Shire) ++- apc.file_md5 (Shire) ++- consolidate locking macros (Shire) ++- remove futex/TSRM locks (Shire) ++- non-blocking semaphore locks (Shire) ++- zval* object rework (Gopal) ++ ++3.0.19: 2008-05-14 ++- Safe-mode and fast-cgi fixes ++- Fix double-free of builtin_functions ++- php 5.3 fixes ++ ++3.0.18: 2008-03-29 ++- Revert apc_expunge_cb bug-fix ++- Misc memleaks ++ ++3.0.17: 2008-03-26 ++- Crash fixes ++- Fix apc_add() cache expunge bug (Rasmus) ++- Added parameter to apc_fetch to determine success/failure when fetching booleans (shire) ++- Fix misc. memleaks (shire) ++ ++3.0.16: 2007-12-26 ++- Fix for longstanding cache-full crash (Christian Seiler) ++ http://news.php.net/php.pecl.dev/4951 for the details ++- Added optional shm unmap on a fatal signal feature (Lucas Nealan) ++- Added PTHREAD_MUTEX_ADAPTIVE_NP option pthread locks (Paul Saab) ++- Minor cleanups (Lucas Nealan) ++- Added configure option to enable apc_cache_info('filehits') (Shire) ++ ++3.0.15: 2007-10-18 ++- Eliminate a per-request time() syscall (Rasmus) ++- Added rfc1867 prefix, name, and freq ini options (Shire) ++- Allow deletion of individual user cache entries via apc.php (Sara) ++- Fix overzealous cleanup during RSHUTDOWN (Gopal) ++- Fix memory alignment and locking issues (Gopal) ++- Make apc_compile insert/replace entries (Shire) ++- Make mixed inheritance recompile & cache afresh (Gopal) ++- Make nostat mode search include_path for canonicalization (Gopal) ++- ZTS & other compile fixes (Gopal, Edin, Shire) ++ ++3.0.14: 2007-03-21 ++- Build fix (Shire) ++- Don't hook the upload hook if APC is disabled (Rasmus) ++- Local shadow cache support (Gopal) ++- Avoid uneccessary loops over op_arrays for "known" auto-globals (Gopal) ++- Fix apc_add() to overwrite timed out user entries (Rasmus) ++- Fix double inclusion of files with conditional classes in php4 (Gopal) ++- Allocator fixes to reduce fragmentation (Gopal) ++ ++3.0.13: 2007-02-24 ++- File upload progress (Rasmus) ++- Pthread mutex and spin locks (Shire) ++- Recursive zval support for apc_fetch/_store (Shire, Gopal) ++- apc.stat_ctime flag for ctime checks (Rasmus) ++- Multiple key fetches with apc_fetch (Shire) ++- Canary checks for shm memory deallocation (Gopal) ++- Add hooks for external optimizer (Shire) ++- Obsolete and remove apc optimizer (Gopal) ++- APC info changes - cache insert rate, hit and miss rates (Shire) ++- Fix apc_load_constants (Gopal) ++- Rewrite dump opcode code to use vld (Gopal) ++- Use apc_[ewn]print functions for error reporting (Shire) ++- Auto global fixes and refactoring (Gopal, Shire) ++- Fix memory leaks in object serialization (Ilia) ++- Memory cleanup code for destructor order (Gopal) ++- Win32 build fixes (Ilia, Wez) ++- ZTS and Php 4 build fixes (Bjori) ++- Add apc_add() function (Rasmus) ++- Add optional limited flag to apc_sma_info() (Rasmus) ++ ++3.0.12p2: 2006-09-05 ++- Package version up ++ ++3.0,12p1: 2006-09-05 ++- PHP4 build fixes ++ ++3.0.12: 2006-09-05 ++- PHP 5.2 compatibility (Gopal) ++- TSRM fixes (Gopal) ++- Add extra flags to op_array->reserved to improve op array ++ processing code (Gopal) ++- Fix crashes in optimizer and cli mode (Ilia) ++- Optimizer fixes for PHP5 (Ilia, Gopal) ++- Allow multiple inclusions of a file with a dynamic class (Gopal) ++- Php 4 function table and properties fixes (Gopal) ++- Fix memory leaks in apc_cache_info (Gopal) ++ ++3.0.11: 2006-08-16 ++- Made --enable-apc-mmap the default compile option (for real this time) ++- Add an optional flag to apc_cache_info() and some apc.php tweaks to make it ++ only fetch header information to make it useful when you have tens of ++ thousands of entries. (Brian Shire) ++- 64-bit fixes (George) ++- Don't mix Full Path and Inode keys (George) ++- Override ZEND_INCLUDE_OR_EVAL opcode (when possible) to speed up use of ++ require_once() and include_once() statements. (Sara) ++- Add a non-blocking write_lock for cache inserts. This is a better approach ++ to prevent cache slams and deprecates the slam_defense setting. (Rasmus) ++- A bit of work on the optimizer. (Sara) ++- Various memory issues resolved. (Gopal) ++ ++3.0.10: 2006-03-11 ++- Add apc.stat ini flag which defaults to 1. If set to 0, the main script and any fullpath ++ includes will not be stat'ed for any changes. You will have to restart the server if you ++ change anything. This mode increases performance quite a bit, especially if you have a ++ lot of includes. ++ ++- Get rid of the lock safety net hack I added in 3.0.9. It seems to cause more problems ++ than it solves. I'll need to revisit locking and signal handling at some point soon. ++ ++3.0.9: 2006-03-04 ++- Eliminate rand() call when slam_defense is not set (Rasmus) ++- Fix for __isset problem (Gopal) ++- Rewrite allocator from a "best fit" to a "next fit" algorithm (Rasmus) ++- Added a Cache Full counter so we have an idea how many times the segment has filled up causing an expunge (Rasmus) ++- Report back the correct number of available bytes in the segment instead of the allocated bytes. (Rasmus) ++- Add cache busy flag which is set when an expunge is underway (Rasmus) ++- Add automatic serialization of objects in apc_store() (Marcus) ++- 64-bit .ini flag fix (Rasmus) ++- Static members fix (Gopal) ++- sma_cleanup() mem leak fix (Rasmus) ++- Fix for http://pecl.php.net/bugs/5311 (Rasmus) ++- Fix autoglobals JIT bug (Gopal) ++- Fix instance bug (Gopal) ++- Add a lock cleanup safety net to request shutdown (Rasmus) ++- Fix apc.slam_defense edge-case bug (Rasmus) ++- User entry memory usage tracking support (Ilia) ++- Allow keys used in apc_store/apc_fetch/apc_delete to be binary safe and prevent conflicts between keys that are found at the start of other keys. (Ilia) ++ ++3.0.8: 2005-08-24 ++Fix invalid free in globals destructor introduced in 3.0.7 (Rasmus) ++Cache corruption fix in cache-full cleanup code (Gopal) ++ ++3.0.7: 2005-08-16 ++- Fix to apc.php to show final segment in frag chart. (Ilia) ++- A couple of win32 fixes. (Frank) ++- Add apc.enable_cli ini directive. (Rasmus) ++- Add test cases. (Marcus) ++- Fix apc_define_constants() bug - http://pecl.php.net/bugs/5084 (Rasmus) ++- Simplify user cache handling by removing the user_cache_stack (Rasmus) ++- Fix apc_fetch() memory corruption (Andrei,Rasmus) ++- Added apc.max_file_size INI setting that allows exclusion of large files from being cached. Default file size limit, 1 megabyte. (Ilia) ++ ++3.0.6: 2005-07-30 ++- Added apc.php to package.xml file. ++- Track per-entry memory usage. (Val) ++- Various apc.php fixes and enhancements. (Ralf, Ilia, Rasmus) ++- fcntl locking robustness fixes. (Rasmus) ++- Shared read-locks where possible. (Rasmus) ++- Added file_update_protection configuration parameter. (Rasmus) ++- Windows ZTS fixes (Frank) ++ ++3.0.5: 2005-07-27 ++- Make it easier for sapis that only populate file_handle->filename to use APC. (Rasmus) ++- Support extensions such as bcompiler that need to hook into compile_file. (Val) ++- Ralf Becker's apcgui code has now become the default apc.php status page. (Ralf, Rasmus, Ilia) ++- Segfault in cache cleanup code (Ilia, Rasmus) ++ ++3.0.4: 2005-07-18 ++- Add win32 support (Edin ) ++- Add --with-apxs switch to work around problem when loading APC into Apache binary compiled with LFS switches (Rasmus) ++- A couple of other minor fixes ++ ++3.0.3: 2005-07-05 ++- Fix compile problem against PHP 5.0.x ++ ++3.0.2: 2005-07-05 ++- Better shm error message ++ ++3.0.1: 2005-07-05 ++- PHP4 build fix ++ ++3.0: 2005-06-23 ++- PHP 5.1 support (Arun, Gopal, Rasmus) ++- Major Inheritance bug fix (Arun, Gopal) ++ ++2.0: 2003-02-10 ++- ground-up rewrite sharing none of the original source code (djc) ++ ++1.0.10: ++- merge mmap / shm code to be in one file, module supports both modes now [mpb 2001-05-15] ++- added apc.mode config parameter [mpb 2001-05-15] NOTE: You'll have to add ++ this parameter to your php.ini file to activate apc shm or mmap caching ++- generic source cleanup (missing includes, PATH_MAX usage etc) [mpb ++ 2001-05-15] ++- fixed: realpath return result checking in generate_key [mpb 2001-05-15] ++- updated: gui updated (extras/apc_gui-1.0.2.tar.gz) ++- experminental 'fast' cache-retrieval [djc 2001-05-20] ++- fixed regex support [gws 2001-05-16] ++- enhanced reader-writer lock support [rg 2001-05-07] ++ ++1.0.9: ++- fixed (?) memory alignment bug on 64 bit archiecures ++- added many cache visibiliy functions ++- added opional fcntl locks under shm version ++- numerous bug fixes ++ ++1.0.8: ++- added ability to detect and decompile compiled files placed as 'source' ++ [gws,dw 2001-01-30] ++- fixed apc_rstat bug [gws 2001-01-29] ++- added hack to support included urls [gws 2001-01-30] ++- fixed apc_cache_index [mb 2001-01-31] ++- added multiple regex support [gs 2001-02-03] ++- added apc_cache_info [mb,gs 2001-02-03] ++ ++1.0.7: ++- partially fixed for Solaris [gws 2001-01-29] ++- fixed mtime support for relative includes [gws 2001-01-29] ++- code cleanup [yg,ta,gws 2001-01-29] ++ ++1.0.6: ++- support for mtime in mmap [yg,gws 2001-01-27] ++- fixed indexed-array initialization bug [djc,gws 2001-01-27] ++ ++1.0.5: ++- support for relative include paths [djc,gws 2001-01-19] ++- class member array support fixed [djc 2001-01-18] ++- added apc_cache_index [gws 2001-01-18] ++ ++1.0.4: ++- support for class hierarchies greater than two levels deep [djc 2001-01-17] ++ ++1.0.3: ++- fixed support for class inheritance [djc 2001-01-16] ++ ++1.0.2: ++- support for inherited classes [gws 2001-01-15] ++- support for intialization of class variables and objects [gws 2001-01-13] ++ ++1.0.1: ++- added optional file modification time check [djc 2001-01-12] +--- /dev/null ++++ b/ext/apc/config.m4 +@@ -0,0 +1,246 @@ ++dnl ++dnl $Id: config.m4 304101 2010-10-05 14:37:36Z kalle $ ++dnl ++ ++PHP_ARG_ENABLE(apc, whether to enable APC support, ++[ --enable-apc Enable APC support]) ++ ++AC_ARG_ENABLE(apc-debug, ++[ --enable-apc-debug Enable APC debugging], ++[ ++ PHP_APC_DEBUG=yes ++], ++[ ++ PHP_APC_DEBUG=no ++]) ++ ++AC_MSG_CHECKING(whether we should enable cache request file info) ++AC_ARG_ENABLE(apc-filehits, ++[ --enable-apc-filehits Enable per request file info about files used from the APC cache (ie: apc_cache_info('filehits')) ], ++[ ++ PHP_APC_FILEHITS=$enableval ++ AC_MSG_RESULT($enableval) ++], ++[ ++ PHP_APC_FILEHITS=no ++ AC_MSG_RESULT(no) ++]) ++ ++AC_MSG_CHECKING(whether we should use mmap) ++AC_ARG_ENABLE(apc-mmap, ++[ --disable-apc-mmap ++ Disable mmap support and use IPC shm instead], ++[ ++ PHP_APC_MMAP=$enableval ++ AC_MSG_RESULT($enableval) ++], [ ++ PHP_APC_MMAP=yes ++ AC_MSG_RESULT(yes) ++]) ++ ++AC_MSG_CHECKING(whether we should use semaphore locking instead of fcntl) ++AC_ARG_ENABLE(apc-sem, ++[ --enable-apc-sem ++ Enable semaphore locks instead of fcntl], ++[ ++ PHP_APC_SEM=$enableval ++ AC_MSG_RESULT($enableval) ++], [ ++ PHP_APC_SEM=no ++ AC_MSG_RESULT(no) ++]) ++ ++AC_MSG_CHECKING(whether we should use pthread mutex locking) ++AC_ARG_ENABLE(apc-pthreadmutex, ++[ --disable-apc-pthreadmutex ++ Disable pthread mutex locking ], ++[ ++ PHP_APC_PTHREADMUTEX=$enableval ++ AC_MSG_RESULT($enableval) ++], ++[ ++ PHP_APC_PTHREADMUTEX=yes ++ AC_MSG_RESULT(yes) ++]) ++ ++if test "$PHP_APC_PTHREADMUTEX" != "no"; then ++ orig_LIBS="$LIBS" ++ LIBS="$LIBS -lpthread" ++ AC_TRY_RUN( ++ [ ++ #include ++ #include ++ main() { ++ pthread_mutex_t mutex; ++ pthread_mutexattr_t attr; ++ ++ if(pthread_mutexattr_init(&attr)) { ++ puts("Unable to initialize pthread attributes (pthread_mutexattr_init)."); ++ return -1; ++ } ++ if(pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED)) { ++ puts("Unable to set PTHREAD_PROCESS_SHARED (pthread_mutexattr_setpshared), your system may not support shared mutex's."); ++ return -1; ++ } ++ if(pthread_mutex_init(&mutex, &attr)) { ++ puts("Unable to initialize the mutex (pthread_mutex_init)."); ++ return -1; ++ } ++ if(pthread_mutexattr_destroy(&attr)) { ++ puts("Unable to destroy mutex attributes (pthread_mutexattr_destroy)."); ++ return -1; ++ } ++ if(pthread_mutex_destroy(&mutex)) { ++ puts("Unable to destroy mutex (pthread_mutex_destroy)."); ++ return -1; ++ } ++ ++ puts("pthread mutex's are supported!"); ++ return 0; ++ } ++ ], ++ [ dnl -Success- ++ PHP_ADD_LIBRARY(pthread) ++ ], ++ [ dnl -Failure- ++ AC_MSG_WARN([It doesn't appear that pthread mutex's are supported on your system]) ++ PHP_APC_PTHREADMUTEX=no ++ ], ++ [ ++ PHP_ADD_LIBRARY(pthread) ++ ] ++ ) ++ LIBS="$orig_LIBS" ++fi ++ ++AC_MSG_CHECKING(whether we should use spin locks) ++AC_ARG_ENABLE(apc-spinlocks, ++[ --enable-apc-spinlocks ++ Enable spin locks EXPERIMENTAL ], ++[ ++ PHP_APC_SPINLOCKS=$enableval ++ AC_MSG_RESULT($enableval) ++], ++[ ++ PHP_APC_SPINLOCKS=no ++ AC_MSG_RESULT(no) ++]) ++ ++AC_MSG_CHECKING(whether we should enable memory protection) ++AC_ARG_ENABLE(apc-memprotect, ++[ --enable-apc-memprotect ++ Enable mmap/shm memory protection], ++[ ++ PHP_APC_MEMPROTECT=$enableval ++ AC_MSG_RESULT($enableval) ++], [ ++ PHP_APC_MEMPROTECT=no ++ AC_MSG_RESULT(no) ++]) ++ ++if test "$PHP_APC" != "no"; then ++ test "$PHP_APC_MMAP" != "no" && AC_DEFINE(APC_MMAP, 1, [ ]) ++ test "$PHP_APC_FILEHITS" != "no" && AC_DEFINE(APC_FILEHITS, 1, [ ]) ++ ++ if test "$PHP_APC_DEBUG" != "no"; then ++ AC_DEFINE(__DEBUG_APC__, 1, [ ]) ++ fi ++ ++ if test "$PHP_APC_SEM" != "no"; then ++ AC_DEFINE(APC_SEM_LOCKS, 1, [ ]) ++ elif test "$PHP_APC_SPINLOCKS" != "no"; then ++ AC_DEFINE(APC_SPIN_LOCKS, 1, [ ]) ++ elif test "$PHP_APC_PTHREADMUTEX" != "no"; then ++ AC_DEFINE(APC_PTHREADMUTEX_LOCKS, 1, [ ]) ++ else ++ AC_DEFINE(APC_FCNTL_LOCKS, 1, [ ]) ++ fi ++ ++ if test "$PHP_APC_MEMPROTECT" != "no"; then ++ AC_DEFINE(APC_MEMPROTECT, 1, [ shm/mmap memory protection ]) ++ fi ++ ++ AC_CACHE_CHECK(for zend_set_lookup_function_hook, php_cv_zend_set_lookup_function_hook, ++ [ ++ orig_cflags=$CFLAGS ++ CFLAGS="$INCLUDES $EXTRA_INCLUDES" ++ AC_TRY_COMPILE([ ++#include "main/php.h" ++#include "Zend/zend_API.h" ++ ], [#ifndef zend_set_lookup_function_hook ++ (void) zend_set_lookup_function_hook; ++#endif], [ ++ php_cv_zend_set_lookup_function_hook=yes ++ ],[ ++ php_cv_zend_set_lookup_function_hook=no ++ ]) ++ CFLAGS=$orig_cflags ++ ]) ++ if test "$php_cv_zend_set_lookup_function_hook" = "yes"; then ++ AC_DEFINE(APC_HAVE_LOOKUP_HOOKS, 1, [ ]) ++ else ++ AC_DEFINE(APC_HAVE_LOOKUP_HOOKS, 0, [ ]) ++ fi ++ ++ AC_CHECK_FUNCS(sigaction) ++ AC_CACHE_CHECK(for union semun, php_cv_semun, ++ [ ++ AC_TRY_COMPILE([ ++#include ++#include ++#include ++ ], [union semun x; x.val=1], [ ++ php_cv_semun=yes ++ ],[ ++ php_cv_semun=no ++ ]) ++ ]) ++ if test "$php_cv_semun" = "yes"; then ++ AC_DEFINE(HAVE_SEMUN, 1, [ ]) ++ else ++ AC_DEFINE(HAVE_SEMUN, 0, [ ]) ++ fi ++ ++ AC_MSG_CHECKING(whether we should enable valgrind support) ++ AC_ARG_ENABLE(valgrind-checks, ++ [ --disable-valgrind-checks ++ Disable valgrind based memory checks], ++ [ ++ PHP_APC_VALGRIND=$enableval ++ AC_MSG_RESULT($enableval) ++ ], [ ++ PHP_APC_VALGRIND=yes ++ AC_MSG_RESULT(yes) ++ AC_CHECK_HEADER(valgrind/memcheck.h, ++ [AC_DEFINE([HAVE_VALGRIND_MEMCHECK_H],1, [enable valgrind memchecks])]) ++ ]) ++ ++ apc_sources="apc.c php_apc.c \ ++ apc_cache.c \ ++ apc_compile.c \ ++ apc_debug.c \ ++ apc_fcntl.c \ ++ apc_main.c \ ++ apc_mmap.c \ ++ apc_sem.c \ ++ apc_shm.c \ ++ apc_pthreadmutex.c \ ++ apc_spin.c \ ++ pgsql_s_lock.c \ ++ apc_sma.c \ ++ apc_stack.c \ ++ apc_zend.c \ ++ apc_rfc1867.c \ ++ apc_signal.c \ ++ apc_pool.c \ ++ apc_iterator.c \ ++ apc_bin.c \ ++ apc_string.c " ++ ++ PHP_CHECK_LIBRARY(rt, shm_open, [PHP_ADD_LIBRARY(rt,,APC_SHARED_LIBADD)]) ++ PHP_NEW_EXTENSION(apc, $apc_sources, $ext_shared,, \\$(APC_CFLAGS)) ++ PHP_SUBST(APC_SHARED_LIBADD) ++ PHP_SUBST(APC_CFLAGS) ++ AC_DEFINE(HAVE_APC, 1, [ ]) ++fi ++ +--- /dev/null ++++ b/ext/apc/config.w32 +@@ -0,0 +1,48 @@ ++// $Id: config.w32 305410 2010-11-16 16:47:18Z pajoye $ ++// vim:ft=javascript ++ ++ ++ARG_ENABLE('apc', 'Whether to enable APC support', 'no'); ++ARG_ENABLE('apc-debug', 'Whether to enable APC debugging', 'no'); ++ARG_ENABLE('apc-filehits', 'Whether to enable cache request file info', 'no'); ++ARG_ENABLE('apc-spinlocks', 'Whether to use spin locks (experimental)', 'no'); ++ARG_ENABLE('apc-memprotect', 'Whether to enable memory protection (experimental)', 'no'); ++ ++if(PHP_APC != 'no') ++{ ++ var apc_sources = 'apc.c php_apc.c apc_cache.c apc_compile.c apc_debug.c ' + ++ 'apc_fcntl_win32.c apc_iterator.c apc_main.c apc_shm.c ' + ++ 'apc_sma.c apc_stack.c apc_rfc1867.c apc_zend.c apc_pool.c ' + ++ 'apc_bin.c apc_string.c'; ++ ++ if(PHP_APC_DEBUG != 'no') ++ { ++ ADD_FLAG('CFLAGS_APC', '/D __DEBUG_APC__=1'); ++ } ++ ++ if(PHP_APC_FILEHITS != 'no') ++ { ++ AC_DEFINE('APC_FILEHITS', 1); ++ } ++ ++ if(PHP_APC_MEMPROTECT != 'no') ++ { ++ AC_DEFINE('APC_MEMPROTECT', 1); ++ } ++ ++ if(PHP_APC_SPINLOCKS != 'no') ++ { ++ AC_DEFINE('APC_SPIN_LOCKS', 1); ++ ADD_FLAG('CFLAGS_APC', '/D WIN32_ONLY_COMPILER=1'); ++ ++ apc_sources += ' apc_spin.c pgsql_s_lock.c'; ++ } ++ else ++ { ++ AC_DEFINE('APC_FCNTL_LOCKS', 1); ++ } ++ ++ AC_DEFINE('HAVE_APC', 1); ++ ++ EXTENSION('apc', apc_sources); ++} +\ No newline at end of file +--- /dev/null ++++ b/ext/apc/INSTALL +@@ -0,0 +1,400 @@ ++Installation Instructions for APC ++--------------------------------- ++ ++This version of APC should work on PHP 4.3.0 - 4.4.x and ++5.1.0 - 5.2.x. Yes, that means PHP 5.0.x is no longer ++supported. Upgrade to PHP 5.1.x or 5.2.x and you will ++notice all sorts of performance increases. ++ ++CVS Instructions ++---------------- ++Building from CVS can be done like this: ++ ++ svn co http://svn.php.net/repository/pecl/apc/trunk apc ++ cd apc ++ phpize ++ ./configure --with-php-config=/usr/local/php/bin/php-config ++ make ++ export TEST_PHP_ARGS='-n' ++ make test ++ make install ++ ++Suggested Configuration (in your php.ini file) ++---------------------------------------------- ++ extension=apc.so ++ apc.enabled=1 ++ apc.shm_size=128 ++ apc.ttl=7200 ++ apc.user_ttl=7200 ++ apc.enable_cli=1 ++ ++These are fully described at the bottom of this file. ++ +++---------------------+ ++| QUICK INSTALL (DSO) | +++---------------------+ ++ ++These instructions assume your PHP installation is located in /usr/local/php and you ++want Apache optimizations (--with-apxs). ++ ++$ gunzip -c apc_x.y.tar.gz | tar xf - ++$ cd apc_x.y ++$ /usr/local/php/bin/phpize ++$ ./configure --with-php-config=/usr/local/php/bin/php-config ++$ make ++$ make install ++ ++You will probably need to run the final command (make install) as root. ++ ++The above sequence of commands will install a .so file in your PHP ++installation extension directory. The output of make install should display ++that path to the screen. ++ ++Next you must edit your php.ini file, which is normally located in ++/usr/local/php/lib/php.ini, and add the following line: ++ ++ extension="apc.so" ++ ++Replace "/path/to/php/extensions" with whatever path was displayed when you ++ran make install above. ++ ++Then restart your web server and consult the output of phpinfo(). If there is ++an informational section for APC, the installation was successful. ++ +++------------------------+ ++| QUICK INSTALL (Static) | +++------------------------+ ++ ++APC will not successfully compile on all systems as a DSO. If you run into ++problems using the DSO quick install, you can try to compile it statically ++into PHP. (The DSO install is recommended, though.) ++ ++These instructions assume the current directory is the root of the PHP source ++tree, and that you have already configured PHP by running its bundled ++configure script. ++ ++$ cd ext ++$ gunzip -c apc_x.y.tar.gz | tar xf - ++$ cd .. ++$ ./buildconf ++$ ./config.nice ++$ make ++$ make install ++ ++Once this is complete, simply restart your web server. You do not need to ++modify your php.ini file to enable APC. ++ +++-----------------+ ++| VERBOSE INSTALL | +++-----------------+ ++ ++These instructions assume your PHP installation is located in /usr/local/php. ++ ++1. Unpack your distribution file. ++ ++ You will have downloaded a file named something like apc_x.y.tar.gz. ++ Unzip this file with a command like ++ ++ gunzip apc_x.y.tar.gz ++ ++ Next you have to untar it with ++ ++ tar xvf apc_x.y.tar ++ ++ This will create an apc_x.y directory. cd into this new directory: ++ ++ cd apc_x.y ++ ++2. Run phpize. ++ ++ phpize is a script that should have been installed with PHP, and is ++ normally located in /usr/local/php/bin assuming you installed PHP in ++ /usr/local/php. (If you do not have the phpize script, you must reinstall ++ PHP and be sure not to disable PEAR.) ++ ++ Run the phpize command: ++ ++ /usr/local/php/bin/phpize ++ ++ Its output should resemble this: ++ ++ autoheader: `config.h.in' is created ++ You should update your `aclocal.m4' by running aclocal. ++ Configuring for: ++ PHP Api Version: 20020918 ++ Zend Module Api No: 20020429 ++ Zend Extension Api No: 20021010 ++ ++ phpize should create a configure script in the current directory. If you ++ get errors instead, you might be missing some required development tools, ++ such as autoconf or libtool. You can try downloading the latest versions ++ of those tools and running phpize again. ++ ++3. Run the configure script. ++ ++ phpize creates a configure script. The only option you need to specify is ++ the location of your php-config script: ++ ++ ./configure --enable-apc ++ ++ php-config should be located in the same directory as phpize. ++ ++ If you prefer to use mmap instead of the default IPC shared memory support, ++ add --enable-apc-mmap to your configure line. ++ ++ If you prefer to use sysv IPC semaphores over the safer fcntl() locks, add ++ --enable-sem to your configure line. If you don't have a problem ++ with your server segaulting, or any other unnatural accumulation of ++ semaphores on your system, the semaphore based locking is slightly faster. ++ ++4. Compile and install the files. Simply type: make install ++ ++ (You may need to be root in order to install) ++ ++ If you encounter errors from libtool or gcc during this step, please ++ contact the project maintainer (dcowgill@php.net). ++ ++5. Edit your php.ini ++ ++ make install should have printed a line resembling the following: ++ ++ Installing shared extensions: /path/to/extension/ ++ ++ Copy the path /path/to/extension/ and add the following line to your ++ php.ini file (normally located in /usr/local/php/lib/php.ini): ++ ++ extension="apc.so" ++ ++ If you don't have a php.ini file in that location, you can create it now. ++ ++6. Restart the web server and test the installation. ++ ++ Restart your web server now (for apache, it's apachectl restart) and ++ create a small test PHP file in your document root. The file should ++ contain just the following line: ++ ++ ++ ++ Request that file in a web browser. If there is an entry for APC in the ++ list of installed modules, the installation was successful. ++ ++ If APC is not listed, consult your web server error log. If it contains an ++ error message saying that it can't load the APC extension, your system ++ might not be able to load shared libraries created with PHP's build ++ system. One alternative would be to compile APC statically into PHP. See ++ the Quick Install (Static) instructions above. ++ ++ You should consult your error log anyway to see if APC generated any ++ errors. On BSD-based platforms, it is typical for APC to be unable to ++ allocate the default-sized shared memory segment. See below for hints on ++ raising your system's shared memory limitations. ++ +++-----------------+ ++| CONFIGURING APC | +++-----------------+ ++ ++Although the default APC settings are fine for many installations, serious ++users should consider tuning the following parameters: ++ ++ OPTION DESCRIPTION ++ ------------------ -------------------------------------------------- ++ apc.enabled This can be set to 0 to disable APC. This is ++ primarily useful when APC is statically compiled ++ into PHP, since there is no other way to disable ++ it (when compiled as a DSO, the zend_extension ++ line can just be commented-out). ++ (Default: 1) ++ ++ apc.shm_segments The number of shared memory segments to allocate ++ for the compiler cache. If APC is running out of ++ shared memory but you have already set ++ apc.shm_size as high as your system allows, you ++ can try raising this value. Setting this to a ++ value other than 1 has no effect in mmap mode ++ since mmap'ed shm segments don't have size limits. ++ (Default: 1) ++ ++ apc.shm_size The size of each shared memory segment in MB. ++ By default, some systems (including most BSD ++ variants) have very low limits on the size of a ++ shared memory segment. ++ (Default: 30) ++ ++ apc.optimization This option has been deprecated. ++ (Default: 0) ++ ++ apc.num_files_hint A "hint" about the number of distinct source files ++ that will be included or requested on your web ++ server. Set to zero or omit if you're not sure; ++ this setting is mainly useful for sites that have ++ many thousands of source files. ++ (Default: 1000) ++ ++ apc.user_entries_hint Just like num_files_hint, a "hint" about the number ++ of distinct user cache variables to store. ++ Set to zero or omit if you're not sure; ++ (Default: 4096) ++ ++ apc.ttl The number of seconds a cache entry is allowed to ++ idle in a slot in case this cache entry slot is ++ needed by another entry. Leaving this at zero ++ means that your cache could potentially fill up ++ with stale entries while newer entries won't be ++ cached. ++ (Default: 0) ++ ++ apc.user_ttl The number of seconds a user cache entry is allowed ++ to idle in a slot in case this cache entry slot is ++ needed by another entry. Leaving this at zero ++ means that your cache could potentially fill up ++ with stale entries while newer entries won't be ++ cached. ++ (Default: 0) ++ ++ ++ apc.gc_ttl The number of seconds that a cache entry may ++ remain on the garbage-collection list. This value ++ provides a failsafe in the event that a server ++ process dies while executing a cached source file; ++ if that source file is modified, the memory ++ allocated for the old version will not be ++ reclaimed until this TTL reached. Set to zero to ++ disable this feature. ++ (Default: 3600) ++ ++ apc.cache_by_default On by default, but can be set to off and used in ++ conjunction with positive apc.filters so that files ++ are only cached if matched by a positive filter. ++ (Default: On) ++ ++ apc.filters A comma-separated list of POSIX extended regular ++ expressions. If any pattern matches the source ++ filename, the file will not be cached. Note that ++ the filename used for matching is the one passed ++ to include/require, not the absolute path. If the ++ first character of the expression is a + then the ++ expression will be additive in the sense that any ++ files matched by the expression will be cached, and ++ if the first character is a - then anything matched ++ will not be cached. The - case is the default, so ++ it can be left off. ++ (Default: "") ++ ++ apc.mmap_file_mask If compiled with MMAP support by using --enable-mmap ++ this is the mktemp-style file_mask to pass to the ++ mmap module for determing whether your mmap'ed memory ++ region is going to be file-backed or shared memory ++ backed. For straight file-backed mmap, set it to ++ something like /tmp/apc.XXXXXX (exactly 6 X's). ++ To use POSIX-style shm_open/mmap put a ".shm" ++ somewhere in your mask. eg. "/apc.shm.XXXXXX" ++ You can also set it to "/dev/zero" to use your ++ kernel's /dev/zero interface to anonymous mmap'ed ++ memory. Leaving it undefined will force an ++ anonymous mmap. ++ (Default: "") ++ ++ apc.slam_defense ** DEPRECATED - Use apc.write_lock instead ** ++ On very busy servers whenever you start the server or ++ modify files you can create a race of many processes ++ all trying to cache the same file at the same time. ++ This option sets the percentage of processes that will ++ skip trying to cache an uncached file. Or think of it ++ as the probability of a single process to skip caching. ++ For example, setting this to 75 would mean that there is ++ a 75% chance that the process will not cache an uncached ++ file. So the higher the setting the greater the defense ++ against cache slams. Setting this to 0 disables this ++ feature. ++ (Default: 0) ++ ++ apc.file_update_protection ++ When you modify a file on a live web server you really ++ should do so in an atomic manner. That is, write to a ++ temporary file and rename (mv) the file into its permanent ++ position when it is ready. Many text editors, cp, tar and ++ other such programs don't do this. This means that there ++ is a chance that a file is accessed (and cached) while it ++ is still being written to. This file_update_protection ++ setting puts a delay on caching brand new files. The ++ default is 2 seconds which means that if the modification ++ timestamp (mtime) on a file shows that it is less than 2 ++ seconds old when it is accessed, it will not be cached. ++ The unfortunate person who accessed this half-written file ++ will still see weirdness, but at least it won't persist. ++ If you are certain you always atomically update your files ++ by using something like rsync which does this correctly, you ++ can turn this protection off by setting it to 0. If you ++ have a system that is flooded with io causing some update ++ procedure to take longer than 2 seconds, you may want to ++ increase this a bit. ++ (Default: 2) ++ ++ apc.enable_cli Mostly for testing and debugging. Setting this enables APC ++ for the CLI version of PHP. Normally you wouldn't want to ++ create, populate and tear down the APC cache on every CLI ++ request, but for various test scenarios it is handy to be ++ able to enable APC for the CLI version of APC easily. ++ (Default: 0) ++ ++ apc.max_file_size Prevents large files from being cached. ++ (Default: 1M) ++ ++ apc.stat Whether to stat the main script file and the fullpath ++ includes. If you turn this off you will need to restart ++ your server in order to update scripts. ++ (Default: 1) ++ ++ apc.canonicalize Whether to canonicalize paths in stat=0 mode or ++ fall back to stat behaviour if set to 0 ++ (Default: 0) ++ ++ apc.write_lock On busy servers when you first start up the server, or when ++ many files are modified, you can end up with all your processes ++ trying to compile and cache the same files. With write_lock ++ enabled, only one process at a time will try to compile an ++ uncached script while the other processes will run uncached ++ instead of sitting around waiting on a lock. ++ (Default: 1) ++ ++ apc.report_autofilter Logs any scripts that were automatically excluded from being ++ cached due to early/late binding issues. ++ (Default: 0) ++ ++ apc.rfc1867 RFC1867 File Upload Progress hook handler is only available ++ if you compiled APC against PHP 5.2.0 or later. When enabled ++ any file uploads which includes a field called ++ APC_UPLOAD_PROGRESS before the file field in an upload form ++ will cause APC to automatically create an upload_ ++ user cache entry where is the value of the ++ APC_UPLOAD_PROGRESS form entry. ++ ++ Note that the file upload tracking is not threadsafe at this ++ point, so new uploads that happen while a previous one is ++ still going will disable the tracking for the previous. ++ (Default: 0) ++ ++ apc.rfc1867_prefix Key prefix to use for the user cache entry generated by ++ rfc1867 upload progress functionality. ++ (Default: "upload_") ++ ++ apc.rfc1867_name Specify the hidden form entry name that activates APC upload ++ progress and specifies the user cache key suffix. ++ (Default: "APC_UPLOAD_PROGRESS") ++ ++ apc.rfc1867_freq The frequency that updates should be made to the user cache ++ entry for upload progress. This can take the form of a ++ percentage of the total file size or a size in bytes ++ optionally suffixed with 'k', 'm', or 'g' for kilobytes, ++ megabytes, or gigabytes respectively (case insensitive). ++ A setting of 0 updates as often as possible, which may cause ++ slower uploads. ++ (Default: 0) ++ ++ apc.localcache ** REMOVED ++ apc.localcache.size ** REMOVED ++ ++ apc.include_once_override ++ Optimize include_once and require_once calls and avoid the ++ expensive system calls used. ++ (Default: 0) +--- /dev/null ++++ b/ext/apc/LICENSE +@@ -0,0 +1,68 @@ ++-------------------------------------------------------------------- ++ The PHP License, version 3.01 ++Copyright (c) 1999 - 2010 The PHP Group. All rights reserved. ++-------------------------------------------------------------------- ++ ++Redistribution and use in source and binary forms, with or without ++modification, is permitted provided that the following conditions ++are met: ++ ++ 1. Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ ++ 2. Redistributions in binary form must reproduce the above copyright ++ notice, this list of conditions and the following disclaimer in ++ the documentation and/or other materials provided with the ++ distribution. ++ ++ 3. The name "PHP" must not be used to endorse or promote products ++ derived from this software without prior written permission. For ++ written permission, please contact group@php.net. ++ ++ 4. Products derived from this software may not be called "PHP", nor ++ may "PHP" appear in their name, without prior written permission ++ from group@php.net. You may indicate that your software works in ++ conjunction with PHP by saying "Foo for PHP" instead of calling ++ it "PHP Foo" or "phpfoo" ++ ++ 5. The PHP Group may publish revised and/or new versions of the ++ license from time to time. Each version will be given a ++ distinguishing version number. ++ Once covered code has been published under a particular version ++ of the license, you may always continue to use it under the terms ++ of that version. You may also choose to use such covered code ++ under the terms of any subsequent version of the license ++ published by the PHP Group. No one other than the PHP Group has ++ the right to modify the terms applicable to covered code created ++ under this License. ++ ++ 6. Redistributions of any form whatsoever must retain the following ++ acknowledgment: ++ "This product includes PHP software, freely available from ++ ". ++ ++THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND ++ANY EXPRESSED 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 PHP ++DEVELOPMENT TEAM OR ITS 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. ++ ++-------------------------------------------------------------------- ++ ++This software consists of voluntary contributions made by many ++individuals on behalf of the PHP Group. ++ ++The PHP Group can be contacted via Email at group@php.net. ++ ++For more information on the PHP Group and the PHP project, ++please see . ++ ++PHP includes the Zend Engine, freely available at ++. +--- /dev/null ++++ b/ext/apc/NOTICE +@@ -0,0 +1,43 @@ ++This is the NOTICE file that holds acknowledgements and stuff. ++ ++The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. ++This extension is being released under the PHP License for complete compliance ++with PHP and to encourage wide-spread use. It is our intention that this ++project be kept open source and that all commercial spin-offs contribute their ++modifications back into the public source-tree. ++ ++Creators: ++ Daniel Cowgill ++ George Schlossnagle ++ ++PHP5 support and major features by: ++ Arun C. Murthy ++ Gopal Vijayaraghavan ++ Rasmus Lerdorf ++ ++This software was contributed to PHP by Community Connect Inc. in 2002 ++and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++Future revisions and derivatives of this source code must acknowledge ++Community Connect Inc. as the original contributor of this module by ++leaving this note intact in the source code. ++ ++All other licensing and usage conditions are those of the PHP Group. ++ ++We would like to thank Community Connect Inc. and Yahoo! Inc. for supporting ++this project and providing a challenging and stimulating environment in ++which exciting projects can happen. ++ ++Contributors: ++ Mike Bretz bug fixes, GUI, and lots of work ++ Ricardo Galli changed read-write locks to prefer readers ++ Yann Grossel bug fixes ++ Thies Arntzen bug fixes ++ Sara Golemon optimizer work ++ ++Special Thanks: ++ Florian Baumert help debugging phplib problems ++ Thomas Duffey help debugging inheritance issues ++ Vibol Hou help debugging phplib problems ++ Angel Li diffs for ANSI comment compliance ++ Christian Rishøj help debugging phplib problems ++ Sascha Schumann memory error bug fix +--- /dev/null ++++ b/ext/apc/package.xml +@@ -0,0 +1,827 @@ ++ ++ ++ APC ++ pecl.php.net ++ Alternative PHP Cache ++ APC is a free, open, and robust framework for caching and optimizing PHP intermediate code. ++ ++ Daniel Cowgill ++ dcowgill ++ dan@mail.communityconnect.com ++ no ++ ++ ++ George Schlossnagle ++ gschlossnagle ++ george@omniti.com ++ no ++ ++ ++ Rasmus Lerdorf ++ rasmus ++ rasmus@php.net ++ yes ++ ++ ++ Gopal Vijayaraghavan ++ gopalv ++ gopalv@php.net ++ yes ++ ++ ++ Edin Kadribasic ++ edink ++ edink@emini.dk ++ no ++ ++ ++ Ilia Alshanetsky ++ iliaa ++ ilia@prohost.org ++ yes ++ ++ ++ Marcus Börger ++ helly ++ helly@php.net ++ no ++ ++ ++ Sara Golemon ++ pollita ++ pollita@php.net ++ no ++ ++ ++ Brian Shire ++ shire ++ shire@php.net ++ yes ++ ++ ++ Kalle Sommer Nielsen ++ kalle ++ kalle@php.net ++ yes ++ ++ ++ Pierre Joye ++ pajoye ++ pierre@php.net ++ yes ++ ++ 2010-11-30 ++ ++ ++ 3.1.6 ++ 3.1.0 ++ ++ ++ stable ++ stable ++ ++ PHP License ++ ++- make slam_defense a little more optimistic, allow a thread/process to write to cache in a loop ++- ensure realpaths hit the realpath_cache, in no-stat mode ++- prevent memory starvation, nuke all caches when expunging just one doesn't work ++- fix uploadprogress keylength issues (NUL is part of keylen, pecl bug #20016) ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ 5.1.0 ++ ++ ++ 1.4.0 ++ ++ ++ ++ apc ++ ++ ++ ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 2.0.0 ++ 2.0.0 ++ ++ 2003-07-01 ++ ++Complete rework. ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 2.0.1 ++ 2.0.0 ++ ++ 2003-07-01 ++ ++Win32 support added. ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 2.0.2 ++ 2.0.0 ++ ++ 2004-03-12 ++ ++Fixed non-existant class bug. ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.0 ++ 3.0.0 ++ ++ 2005-07-05 ++ ++PHP-5.1 Support and numerous fixes ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.1 ++ 3.0.0 ++ ++ 2005-07-05 ++ ++PHP4 build fix ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.2 ++ 3.0.0 ++ ++ 2005-07-05 ++ ++Default to mmap and add a better error message for shmget failures ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.3 ++ 3.0.0 ++ ++ 2005-07-07 ++ ++Fix compile problem against PHP 5.0.x ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.4 ++ 3.0.0 ++ ++ 2005-07-18 ++ ++Add win32 support from Edin. ++Add --with-apxs switch to work around problem when loading APC into Apache binary compiled with LFS switches ++A couple of other minor fixes. ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.5 ++ 3.0.0 ++ ++ 2005-07-27 ++ ++Make it easier for sapis that only populate file_handle->filename to use APC. (Rasmus) ++Support extensions such as bcompiler that need to hook into compile_file. (Val) ++Ralf Becker's apcgui code has now become the default apc.php status page. (Ralf, Rasmus, Ilia) ++Segfault in cache cleanup code (Ilia, Rasmus) ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.6 ++ 3.0.0 ++ ++ 2005-07-30 ++ ++Added apc.php to package.xml file. ++Track per-entry memory usage. (Val) ++Various apc.php fixes and enhancements. (Ralf, Ilia, Rasmus) ++fcntl locking robustness fixes. (Rasmus) ++Shared read-locks where possible. (Rasmus) ++Added file_update_protection configuration parameter. (Rasmus) ++Windows ZTS fixes (Frank) ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.7 ++ 3.0.0 ++ ++ 2005-08-16 ++ ++Fix to apc.php to show final segment in frag chart. (Ilia) ++A couple of win32 fixes. (Frank) ++Add apc.enable_cli ini directive. (Rasmus) ++Add test cases. (Marcus) ++Fix apc_define_constants() bug - http://pecl.php.net/bugs/5084 (Rasmus) ++Simplify user cache handling by removing the user_cache_stack (Rasmus) ++Fix apc_fetch() memory corruption (Andrei,Rasmus) ++Added apc.max_file_size INI setting that allows exclusion of large files from being cached. Default file size limit, 1 megabyte. (Ilia) ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.8 ++ 3.0.0 ++ ++ 2005-08-24 ++ ++Fix invalid free in globals destructor introduced in 3.0.7 (Rasmus) ++Cache corruption fix in cache-full cleanup code (Gopal) ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.9 ++ 3.0.0 ++ ++ 2006-03-04 ++ ++Eliminate rand() call when slam_defense is not set (Rasmus) ++Fix for __isset problem (Gopal) ++Rewrite allocator from a "best fit" to a "next fit" algorithm (Rasmus) ++Added a Cache Full counter so we have an idea how many times the segment has filled up causing an expunge (Rasmus) ++Report back the correct number of available bytes in the segment instead of the allocated bytes. (Rasmus) ++Add cache busy flag which is set when an expunge is underway (Rasmus) ++Add automatic serialization of objects in apc_store() (Marcus) ++64-bit .ini flag fix (Rasmus) ++Static members fix (Gopal) ++sma_cleanup() mem leak fix (Rasmus) ++Fix for http://pecl.php.net/bugs/5311 (Rasmus) ++Fix autoglobals JIT bug (Gopal) ++Fix instance bug (Gopal) ++Add a lock cleanup safety net to request shutdown (Rasmus) ++Fix apc.slam_defense edge-case bug (Rasmus) ++User entry memory usage tracking support (Ilia) ++Allow keys used in apc_store/apc_fetch/apc_delete to be binary safe and prevent conflicts between keys that are found at the start of other keys. (Ilia) ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.10 ++ 3.0.0 ++ ++ 2006-03-11 ++ ++* Add apc.stat ini flag which defaults to 1. If set to 0, the main script and any fullpath ++ includes will not be stat'ed for any changes. You will have to restart the server if you ++ change anything. This mode increases performance quite a bit, especially if you have a ++ lot of includes. ++ ++* Get rid of the lock safety net hack I added in 3.0.9. It seems to cause more problems ++ than it solves. I'll need to revisit locking and signal handling at some point soon. ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.11 ++ 3.0.0 ++ ++ 2006-08-16 ++ ++* Made --enable-apc-mmap the default compile option (for real this time) ++ ++* Add an optional flag to apc_cache_info() and some apc.php tweaks to make it ++ only fetch header information to make it useful when you have tens of ++ thousands of entries. (Brian Shire) ++ ++* 64-bit fixes (George) ++ ++* Don't mix Full Path and Inode keys (George) ++ ++* Override ZEND_INCLUDE_OR_EVAL opcode (when possible) to speed up use of ++ require_once() and include_once() statements. (Sara) ++ ++* Add a non-blocking write_lock for cache inserts. This is a better approach ++ to prevent cache slams and deprecates the slam_defense setting. (Rasmus) ++ ++* A bit of work on the optimizer. (Sara) ++ ++* Various memory issues resolved. (Gopal) ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.12 ++ 3.0.0 ++ ++ 2006-09-04 ++ ++* Fix stray debug message ++ ++* Work on the optimizer - still not stable (Gopal, Ilia, Sara) ++ ++* Performance boost - Replace multiple loops over the opcode ++ array with a single loop for copying, jump fixups and auto ++ global pre-fetches. (Gopal) ++ ++* Perform fetch_global checks only in php5 and only if ++ auto_globals_jit is enabled. (Gopal) ++ ++* Fix bug #8579 - scrub php4 classes' function_table and default ++ properties before inserting into cache. (Gopal) ++ ++* Fix bug #8606 - ZEND_FETCH_GLOBAL is not an opcode, but is a ++ op1->type. The opcodes applicable are ZEND_FETCH_R and ++ ZEND_FETCH_W. (Gopal) ++ ++* PHP 5.2 Compatibility (Gopal) ++ ++* Make the include_once override optional - default off (Sara) ++ ++* Fixed crash when apc run in CLI, but enable_cli is off. (Ilia) ++ ++* Ensure that the apc_globals->cache_stack is cleared before the ++ shm cache is destroyed. Fixes segfault for corner-case i.e request ++ shutdown (apc_deactivate) is not called before module shutdown ++ calls (php_apc_shutdown_globals) (Gopal) ++ ++* TSRM fixes (ensure ts_free_id before apc.so is dlclosed) (Gopal) ++ ++* Fix memory leak of apc_cache_info_t->deleted_list (Gopal) ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.12p1 ++ 3.0.0 ++ ++ 2006-09-05 ++ ++* The only change here is a trivial PHP 4 build fix. ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.12p2 ++ 3.0.0 ++ ++ 2006-09-05 ++ ++* Let's get the version number right. 3.0.12p2 now. ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.13 ++ 3.0.0 ++ ++ 2007-02-24 ++ ++* PHP 5.2 file upload progress tracking support (Rasmus) ++* Pthread mutex and spin locks (Shire) ++* Recursive zval support for apc_fetch/_store (Shire, Gopal) ++* apc.stat_ctime flag for ctime checks (Rasmus) ++* Multiple key fetches with apc_fetch (Shire) ++* Canary checks for shm memory deallocation (Gopal) ++* Add hooks for external optimizer (Shire) ++* Obsolete and remove apc optimizer (Gopal) ++* APC info changes - cache insert rate, hit and miss rates (Shire) ++* Fix apc_load_constants (Gopal) ++* Rewrite dump opcode code to use vld (Gopal) ++* Use apc_[ewn]print functions for error reporting (Shire) ++* Auto global fixes and refactoring (Gopal, Shire) ++* Fix memory leaks in object serialization (Ilia) ++* Memory cleanup code for destructor order (Gopal) ++* Win32 build fixes (Ilia, Wez) ++* ZTS and Php 4 build fixes (Bjori) ++* Add apc_add() function (Rasmus) ++* Add optional limited flag to apc_sma_info() (Rasmus) ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.14 ++ 3.0.0 ++ ++ 2007-04-02 ++ ++* Build fix (Shire) ++* Don't hook the upload hook if APC is disabled (Rasmus) ++* Local shadow cache support (Gopal) ++* Avoid uneccessary loops over op_arrays for "known" auto-globals (Gopal) ++* Fix apc_add() to overwrite timed out user entries (Rasmus) ++* Fix double inclusion of files with conditional classes in php4 (Gopal) ++* Allocator fixes to reduce fragmentation (Gopal) ++ ++ ++ ++ ++ stable ++ stable ++ ++ ++ 3.0.15 ++ 3.0.0 ++ ++ 2007-10-18 ++ ++* Eliminate a per-request time() syscall (Rasmus) ++* Added rfc1867 prefix, name, and freq ini options (Shire) ++* Allow deletion of individual user cache entries via apc.php (Sara) ++* Fix overzealous cleanup during RSHUTDOWN (Gopal) ++* Fix memory alignment and locking issues (Gopal) ++* Make apc_compile insert/replace entries (Shire) ++* Make mixed inheritance recompile & cache afresh (Gopal) ++* Make nostat mode search include_path for canonicalization (Gopal) ++* ZTS & other compile fixes (Gopal, Edin, Shire) ++ ++ ++ ++ ++ 3.0.16 ++ 3.0.0 ++ ++ ++ stable ++ stable ++ ++ PHP License ++ 2008-03-26 ++ ++* Fix for longstanding cache-full crash (Christian Seiler) ++ http://news.php.net/php.pecl.dev/4951 for the details ++* Added optional shm unmap on a fatal signal feature (Lucas Nealan) ++* Added PTHREAD_MUTEX_ADAPTIVE_NP option pthread locks (Paul Saab) ++* Minor cleanups (Lucas Nealan) ++* Added configure option to enable apc_cache_info('filehits') (Shire) ++ ++ ++ ++ ++ 3.0.17 ++ 3.0.0 ++ ++ ++ stable ++ stable ++ ++ PHP License ++ 2008-03-29 ++ ++* Crash fixes ++* Fix apc_add() cache expunge bug (Rasmus) ++* Added parameter to apc_fetch to determine success/failure when fetching booleans (shire) ++* Fix misc. memleaks (shire) ++ ++ ++ ++ ++ 3.0.18 ++ 3.0.0 ++ ++ ++ stable ++ stable ++ ++ PHP License ++ 2008-03-29 ++ ++- Revert apc_expunge_cb bug-fix ++- Misc memleaks ++ ++ ++ ++ ++ 3.0.19 ++ 3.0.0 ++ ++ ++ stable ++ stable ++ ++ PHP License ++ 2008-05-15 ++ ++- Safe-mode and fast-cgi fixes ++- Fix double-free of builtin_functions ++- php 5.3 fixes ++ ++ ++ ++ ++ 3.1.1 ++ 3.1.0 ++ ++ ++ beta ++ beta ++ ++ PHP License ++ 2008-12-12 ++ ++- PHP4 compatibilty break ++- apc_pool allocator (Gopal) ++- doubly-linked sma allocator (Shire) ++- php 5.3 gc compatibility (Gopal) ++- APCIterator for easy access (Shire) ++- apc_delete_file (Shire) ++- apc_inc/apc_dec/apc_cas functions (Shire) ++- apc.canonicalize (Gopal) ++- apc.preload_path (Gopal) ++- apc.rfc1867_ttl (Shire) ++- apc.file_md5 (Shire) ++- consolidate locking macros (Shire) ++- remove futex/TSRM locks (Shire) ++- non-blocking semaphore locks (Shire) ++- zval* object rework (Gopal) ++ ++ ++ ++ ++ 3.1.2 ++ 3.1.0 ++ ++ ++ beta ++ beta ++ ++ PHP License ++ 2008-12-12 ++ ++- pecl package.xml/build fixes (bjori) ++ ++ ++ ++ ++ 3.1.3 ++ 3.1.0 ++ ++ ++ beta ++ beta ++ ++ PHP License ++ 2009-08-13 ++ ++- pecl package.xml/build fixes (bjori) ++- 5.3 support + test-cases (Gopal) ++- Lazy loading support (Shire) ++- Fix PCRE module init order issues (Shire) ++- APCIterator fixes (Shire) ++- Cache slam checks (Gopal) ++- ZEND_JMP_SET support (Shire) ++- apc.use_request_time option (shire) ++- apc.php hostname fixes (Shire) ++- memprotect framework (Gopal) ++- Win32 build-fixes (Kalle) ++ ++ ++ ++ ++ 3.1.3p1 ++ 3.1.0 ++ ++ ++ beta ++ beta ++ ++ PHP License ++ 2009-08-14 ++ ++- fix pecl build / package.xml (Gopal) ++ ++ ++ ++ ++ 3.1.4 ++ 3.1.0 ++ ++ ++ beta ++ beta ++ ++ PHP License ++ 2010-08-05 ++ ++- Windows builds may now have filehits and memory protection if enabled (Kalle) ++- Renamed the memory protection configure option to --enable-apc-memprotect (Kalle, Shire) ++- ZTS fixes and optimizations (Kalle, Felipe) ++- Win32 stat support (Pierre, Kalle) ++- Added support for interned strings, run-time caches and Zend Engine 2.4 (Dmitry) ++- Added apc_exists() (Rasmus) ++- Fixed potential XSS in apc.php, CVE-2010-3294 (Pierre, Matt Chapman) ++- Fixed pecl bug #17597 (keys with embedded NUL) (Gopal) ++- Fixed pecl bug #17650 (Fix goto jump offsets) (Gopal) ++- Fixed pecl bug #17527 (Standardized error reporting) (Gopal, Paul Dragoonis) ++- Fixed pecl bug #17089 (Scrub the constant table of all inherited members before caching) (Gopal) ++- Fixed pecl bug #16860 (files can be included more than once even when include/require_once are used) (Pierre) ++- Fixed pecl bug #16717 (apc_fetch dies after 1 hour, regardless of ttl settings) (Kalle) ++- Fixed pecl bug #17597 (apc user cache keys with embedded NULs) (Gopal) ++- Fixed pecl bug #13583 (apc upload progress fixes) (Gopal) ++ ++ ++ ++ ++ 3.1.5 ++ 3.1.0 ++ ++ ++ beta ++ stable ++ ++ PHP License ++ 2010-11-01 ++ ++- Reduce usage of CG(open_files) (mkoppanen at php dot net) ++- Add support for php-trunk, new op code, new internals string format, etc. (Dmitry) ++- apc_debug are not compiler-valid NOPs for non-debug builds ++ ++- Fixed relative paths resolution when ./foo/a.php or ../foo/a.php (or similar path) ++ are used. 'foo/a.php' path behaviors remain unchanged ++- Fixed a possible memory corruption, when partial path cannot be resolved ++ by expand_filepath() ++- Fixed notices in apc.php (Tomasz Krawczyk) ++ ++- Fixed Bug #17978: standardize user keys to include NULs in identifier_len. Z_STRLEN_P() doesn't, so add to it. ++- Fixed bug #16966, apc produces tons of warnings "Unable to allocate memory for pool". ++ ++- Added --enable-apc-debug configuration argument to enable debugging (Kalle) ++- Added support for internal debugging on Windows (Kalle) ++- ZTS optimizations (Kalle) ++ ++ ++ ++ +--- /dev/null ++++ b/ext/apc/pgsql_s_lock.c +@@ -0,0 +1,391 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | The following code was ported from the PostgreSQL project, please | ++ | see appropriate copyright notices that follow. | ++ | Initial conversion by Brian Shire | ++ +----------------------------------------------------------------------+ ++ ++ */ ++ ++/* $Id: pgsql_s_lock.c 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++/*------------------------------------------------------------------------- ++ * ++ * s_lock.c ++ * Hardware-dependent implementation of spinlocks. ++ * ++ * ++ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group ++ * Portions Copyright (c) 1994, Regents of the University of California ++ * ++ * ++ * IDENTIFICATION ++ * $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.47 2006/10/04 00:29:58 momjian Exp $ ++ * ++ *------------------------------------------------------------------------- ++ */ ++/* #include "postgres.h" -- Removed for APC */ ++ ++/* -- Added for APC -- */ ++#include "apc.h" ++#ifdef APC_SPIN_LOCKS ++ ++#ifdef S_LOCK_TEST ++#include ++#endif ++#ifndef WIN32 ++#include ++#endif ++/* ---- */ ++ ++#include ++#ifdef WIN32 ++#include "win32/unistd.h" ++#else ++#include ++#endif ++ ++/* #include "storage/s_lock.h" -- Removed for APC */ ++#include "pgsql_s_lock.h" ++ ++static int spins_per_delay = DEFAULT_SPINS_PER_DELAY; ++ ++ ++/* -- APC specific additions ------------------------------*/ ++/* The following dependencies have been copied from ++ * other pgsql source files. The original locations ++ * have been noted. ++ */ ++ ++/* -- from include/c.h -- */ ++#ifndef TRUE ++#define TRUE 1 ++#endif ++ ++#ifndef FALSE ++#define FALSE 0 ++#endif ++ ++/* -- from include/pg_config_manual.h -- */ ++#define MAX_RANDOM_VALUE (0x7FFFFFFF) ++ ++/* ++ * Max ++ * Return the maximum of two numbers. ++ */ ++#define Max(x, y) ((x) > (y) ? (x) : (y)) ++ ++/* -- from include/c.h -- */ ++/* ++ * Min ++ * Return the minimum of two numbers. ++ */ ++#define Min(x, y) ((x) < (y) ? (x) : (y)) ++ ++ ++/* -- from backend/port/win32/signal.c -- */ ++/* ++ * pg_usleep --- delay the specified number of microseconds. ++ * ++ * NOTE: although the delay is specified in microseconds, the effective ++ * resolution is only 1/HZ, or 10 milliseconds, on most Unixen. Expect ++ * the requested delay to be rounded up to the next resolution boundary. ++ * ++ * On machines where "long" is 32 bits, the maximum delay is ~2000 seconds. ++ */ ++void ++pg_usleep(long microsec) ++{ ++ if (microsec > 0) ++ { ++#ifndef WIN32 ++ struct timeval delay; ++ ++ delay.tv_sec = microsec / 1000000L; ++ delay.tv_usec = microsec % 1000000L; ++ (void) select(0, NULL, NULL, NULL, &delay); ++#else ++ SleepEx((microsec < 500 ? 1 : (microsec + 500) / 1000), FALSE); ++#endif ++ } ++} ++ ++/* -- End APC specific additions ------------------------------*/ ++ ++ ++/* ++ * s_lock_stuck() - complain about a stuck spinlock ++ */ ++static void ++s_lock_stuck(volatile slock_t *lock, const char *file, int line TSRMLS_DC) ++{ ++#if defined(S_LOCK_TEST) ++ fprintf(stderr, ++ "\nStuck spinlock (%p) detected at %s:%d.\n", ++ lock, file, line); ++ exit(1); ++#else ++ /* -- Removed for APC ++ elog(PANIC, "stuck spinlock (%p) detected at %s:%d", ++ lock, file, line); ++ */ ++ apc_error("Stuck spinlock (%p) detected" TSRMLS_CC, lock); ++#endif ++} ++ ++ ++/* ++ * s_lock(lock) - platform-independent portion of waiting for a spinlock. ++ */ ++void ++s_lock(volatile slock_t *lock, const char *file, int line TSRMLS_DC) ++{ ++ /* ++ * We loop tightly for awhile, then delay using pg_usleep() and try again. ++ * Preferably, "awhile" should be a small multiple of the maximum time we ++ * expect a spinlock to be held. 100 iterations seems about right as an ++ * initial guess. However, on a uniprocessor the loop is a waste of ++ * cycles, while in a multi-CPU scenario it's usually better to spin a bit ++ * longer than to call the kernel, so we try to adapt the spin loop count ++ * depending on whether we seem to be in a uniprocessor or multiprocessor. ++ * ++ * Note: you might think MIN_SPINS_PER_DELAY should be just 1, but you'd ++ * be wrong; there are platforms where that can result in a "stuck ++ * spinlock" failure. This has been seen particularly on Alphas; it seems ++ * that the first TAS after returning from kernel space will always fail ++ * on that hardware. ++ * ++ * Once we do decide to block, we use randomly increasing pg_usleep() ++ * delays. The first delay is 1 msec, then the delay randomly increases to ++ * about one second, after which we reset to 1 msec and start again. The ++ * idea here is that in the presence of heavy contention we need to ++ * increase the delay, else the spinlock holder may never get to run and ++ * release the lock. (Consider situation where spinlock holder has been ++ * nice'd down in priority by the scheduler --- it will not get scheduled ++ * until all would-be acquirers are sleeping, so if we always use a 1-msec ++ * sleep, there is a real possibility of starvation.) But we can't just ++ * clamp the delay to an upper bound, else it would take a long time to ++ * make a reasonable number of tries. ++ * ++ * We time out and declare error after NUM_DELAYS delays (thus, exactly ++ * that many tries). With the given settings, this will usually take 2 or ++ * so minutes. It seems better to fix the total number of tries (and thus ++ * the probability of unintended failure) than to fix the total time ++ * spent. ++ * ++ * The pg_usleep() delays are measured in milliseconds because 1 msec is a ++ * common resolution limit at the OS level for newer platforms. On older ++ * platforms the resolution limit is usually 10 msec, in which case the ++ * total delay before timeout will be a bit more. ++ */ ++#define MIN_SPINS_PER_DELAY 10 ++#define MAX_SPINS_PER_DELAY 1000 ++#define NUM_DELAYS 1000 ++#define MIN_DELAY_MSEC 1 ++#define MAX_DELAY_MSEC 1000 ++ ++ int spins = 0; ++ int delays = 0; ++ int cur_delay = 0; ++ ++ while (TAS(lock)) ++ { ++ /* CPU-specific delay each time through the loop */ ++ SPIN_DELAY(); ++ ++ /* Block the process every spins_per_delay tries */ ++ if (++spins >= spins_per_delay) ++ { ++ if (++delays > NUM_DELAYS) ++ s_lock_stuck(lock, file, line TSRMLS_CC); ++ ++ if (cur_delay == 0) /* first time to delay? */ ++ cur_delay = MIN_DELAY_MSEC; ++ ++ pg_usleep(cur_delay * 1000L); ++ ++#if defined(S_LOCK_TEST) ++ fprintf(stdout, "*"); ++ fflush(stdout); ++#endif ++ ++ /* increase delay by a random fraction between 1X and 2X */ ++ cur_delay += (int) (cur_delay * ++ ((double) rand() / (double) MAX_RANDOM_VALUE) + 0.5); ++ /* wrap back to minimum delay when max is exceeded */ ++ if (cur_delay > MAX_DELAY_MSEC) ++ cur_delay = MIN_DELAY_MSEC; ++ ++ spins = 0; ++ } ++ } ++ ++ /* ++ * If we were able to acquire the lock without delaying, it's a good ++ * indication we are in a multiprocessor. If we had to delay, it's a sign ++ * (but not a sure thing) that we are in a uniprocessor. Hence, we ++ * decrement spins_per_delay slowly when we had to delay, and increase it ++ * rapidly when we didn't. It's expected that spins_per_delay will ++ * converge to the minimum value on a uniprocessor and to the maximum ++ * value on a multiprocessor. ++ * ++ * Note: spins_per_delay is local within our current process. We want to ++ * average these observations across multiple backends, since it's ++ * relatively rare for this function to even get entered, and so a single ++ * backend might not live long enough to converge on a good value. That ++ * is handled by the two routines below. ++ */ ++ if (cur_delay == 0) ++ { ++ /* we never had to delay */ ++ if (spins_per_delay < MAX_SPINS_PER_DELAY) ++ spins_per_delay = Min(spins_per_delay + 100, MAX_SPINS_PER_DELAY); ++ } ++ else ++ { ++ if (spins_per_delay > MIN_SPINS_PER_DELAY) ++ spins_per_delay = Max(spins_per_delay - 1, MIN_SPINS_PER_DELAY); ++ } ++} ++ ++ ++#if 0 /* -- APC doesn't use the set_spins_per_delay or update_spins_per_delay -- */ ++/* ++ * Set local copy of spins_per_delay during backend startup. ++ * ++ * NB: this has to be pretty fast as it is called while holding a spinlock ++ */ ++void ++set_spins_per_delay(int shared_spins_per_delay) ++{ ++ spins_per_delay = shared_spins_per_delay; ++} ++ ++/* ++ * Update shared estimate of spins_per_delay during backend exit. ++ * ++ * NB: this has to be pretty fast as it is called while holding a spinlock ++ */ ++int ++update_spins_per_delay(int shared_spins_per_delay) ++{ ++ /* ++ * We use an exponential moving average with a relatively slow adaption ++ * rate, so that noise in any one backend's result won't affect the shared ++ * value too much. As long as both inputs are within the allowed range, ++ * the result must be too, so we need not worry about clamping the result. ++ * ++ * We deliberately truncate rather than rounding; this is so that single ++ * adjustments inside a backend can affect the shared estimate (see the ++ * asymmetric adjustment rules above). ++ */ ++ return (shared_spins_per_delay * 15 + spins_per_delay) / 16; ++} ++#endif ++ ++/* ++ * Various TAS implementations that cannot live in s_lock.h as no inline ++ * definition exists (yet). ++ * In the future, get rid of tas.[cso] and fold it into this file. ++ * ++ * If you change something here, you will likely need to modify s_lock.h too, ++ * because the definitions for these are split between this file and s_lock.h. ++ */ ++ ++ ++#ifdef HAVE_SPINLOCKS /* skip spinlocks if requested */ ++ ++ ++#if defined(__GNUC__) ++ ++/* ++ * All the gcc flavors that are not inlined ++ */ ++ ++ ++/* ++ * Note: all the if-tests here probably ought to be testing gcc version ++ * rather than platform, but I don't have adequate info to know what to ++ * write. Ideally we'd flush all this in favor of the inline version. ++ */ ++#if defined(__m68k__) && !defined(__linux__) ++/* really means: extern int tas(slock_t* **lock); */ ++static void ++tas_dummy() ++{ ++ __asm__ __volatile__( ++#if defined(__NetBSD__) && defined(__ELF__) ++/* no underscore for label and % for registers */ ++ "\ ++.global tas \n\ ++tas: \n\ ++ movel %sp@(0x4),%a0 \n\ ++ tas %a0@ \n\ ++ beq _success \n\ ++ moveq #-128,%d0 \n\ ++ rts \n\ ++_success: \n\ ++ moveq #0,%d0 \n\ ++ rts \n" ++#else ++ "\ ++.global _tas \n\ ++_tas: \n\ ++ movel sp@(0x4),a0 \n\ ++ tas a0@ \n\ ++ beq _success \n\ ++ moveq #-128,d0 \n\ ++ rts \n\ ++_success: \n\ ++ moveq #0,d0 \n\ ++ rts \n" ++#endif /* __NetBSD__ && __ELF__ */ ++ ); ++} ++#endif /* __m68k__ && !__linux__ */ ++#else /* not __GNUC__ */ ++ ++/* ++ * All non gcc ++ */ ++ ++ ++#if defined(sun3) ++static void ++tas_dummy() /* really means: extern int tas(slock_t ++ * *lock); */ ++{ ++ asm("LLA0:"); ++ asm(" .data"); ++ asm(" .text"); ++ asm("|#PROC# 04"); ++ asm(" .globl _tas"); ++ asm("_tas:"); ++ asm("|#PROLOGUE# 1"); ++ asm(" movel sp@(0x4),a0"); ++ asm(" tas a0@"); ++ asm(" beq LLA1"); ++ asm(" moveq #-128,d0"); ++ asm(" rts"); ++ asm("LLA1:"); ++ asm(" moveq #0,d0"); ++ asm(" rts"); ++ asm(" .data"); ++} ++#endif /* sun3 */ ++#endif /* not __GNUC__ */ ++#endif /* HAVE_SPINLOCKS */ ++ ++#endif /* APC_SPIN_LOCKS */ +--- /dev/null ++++ b/ext/apc/pgsql_s_lock.h +@@ -0,0 +1,928 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | The following code was ported from the PostgreSQL project, please | ++ | see appropriate copyright notices that follow. | ++ | Initial conversion by Brian Shire | ++ +----------------------------------------------------------------------+ ++ ++ */ ++ ++/* $Id: pgsql_s_lock.h 302175 2010-08-13 06:20:28Z kalle $ */ ++ ++/*------------------------------------------------------------------------- ++ * ++ * s_lock.h ++ * Hardware-dependent implementation of spinlocks. ++ * ++ * NOTE: none of the macros in this file are intended to be called directly. ++ * Call them through the hardware-independent macros in spin.h. ++ * ++ * The following hardware-dependent macros must be provided for each ++ * supported platform: ++ * ++ * void S_INIT_LOCK(slock_t *lock) ++ * Initialize a spinlock (to the unlocked state). ++ * ++ * void S_LOCK(slock_t *lock) ++ * Acquire a spinlock, waiting if necessary. ++ * Time out and abort() if unable to acquire the lock in a ++ * "reasonable" amount of time --- typically ~ 1 minute. ++ * ++ * void S_UNLOCK(slock_t *lock) ++ * Unlock a previously acquired lock. ++ * ++ * bool S_LOCK_FREE(slock_t *lock) ++ * Tests if the lock is free. Returns TRUE if free, FALSE if locked. ++ * This does *not* change the state of the lock. ++ * ++ * void SPIN_DELAY(void) ++ * Delay operation to occur inside spinlock wait loop. ++ * ++ * Note to implementors: there are default implementations for all these ++ * macros at the bottom of the file. Check if your platform can use ++ * these or needs to override them. ++ * ++ * Usually, S_LOCK() is implemented in terms of an even lower-level macro ++ * TAS(): ++ * ++ * int TAS(slock_t *lock) ++ * Atomic test-and-set instruction. Attempt to acquire the lock, ++ * but do *not* wait. Returns 0 if successful, nonzero if unable ++ * to acquire the lock. ++ * ++ * TAS() is NOT part of the API, and should never be called directly. ++ * ++ * CAUTION: on some platforms TAS() may sometimes report failure to acquire ++ * a lock even when the lock is not locked. For example, on Alpha TAS() ++ * will "fail" if interrupted. Therefore TAS() should always be invoked ++ * in a retry loop, even if you are certain the lock is free. ++ * ++ * ANOTHER CAUTION: be sure that TAS() and S_UNLOCK() represent sequence ++ * points, ie, loads and stores of other values must not be moved across ++ * a lock or unlock. In most cases it suffices to make the operation be ++ * done through a "volatile" pointer. ++ * ++ * On most supported platforms, TAS() uses a tas() function written ++ * in assembly language to execute a hardware atomic-test-and-set ++ * instruction. Equivalent OS-supplied mutex routines could be used too. ++ * ++ * If no system-specific TAS() is available (ie, HAVE_SPINLOCKS is not ++ * defined), then we fall back on an emulation that uses SysV semaphores ++ * (see spin.c). This emulation will be MUCH MUCH slower than a proper TAS() ++ * implementation, because of the cost of a kernel call per lock or unlock. ++ * An old report is that Postgres spends around 40% of its time in semop(2) ++ * when using the SysV semaphore code. ++ * ++ * ++ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group ++ * Portions Copyright (c) 1994, Regents of the University of California ++ * ++ * $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.157 2006/06/07 22:24:45 momjian Exp $ ++ * ++ *------------------------------------------------------------------------- ++ */ ++#ifndef S_LOCK_H ++#define S_LOCK_H ++ ++/** APC namespace protection ************************************************/ ++/* hack to protect against any possible runtime namespace collisions...*/ ++#define pg_usleep apc_spin_pg_usleep ++#define s_lock apc_spin_s_lock ++#define spins_per_delay apc_spin_spins_per_delay ++/****************************************************************************/ ++ ++ ++/* #include "storage/pg_sema.h" -- Removed for APC */ ++ ++#define HAVE_SPINLOCKS 1 /* -- Added for APC */ ++ ++#ifdef HAVE_SPINLOCKS /* skip spinlocks if requested */ ++ ++ ++#if defined(__GNUC__) || defined(__ICC) ++/************************************************************************* ++ * All the gcc inlines ++ * Gcc consistently defines the CPU as __cpu__. ++ * Other compilers use __cpu or __cpu__ so we test for both in those cases. ++ */ ++ ++/*---------- ++ * Standard gcc asm format (assuming "volatile slock_t *lock"): ++ ++ __asm__ __volatile__( ++ " instruction \n" ++ " instruction \n" ++ " instruction \n" ++: "=r"(_res), "+m"(*lock) // return register, in/out lock value ++: "r"(lock) // lock pointer, in input register ++: "memory", "cc"); // show clobbered registers here ++ ++ * The output-operands list (after first colon) should always include ++ * "+m"(*lock), whether or not the asm code actually refers to this ++ * operand directly. This ensures that gcc believes the value in the ++ * lock variable is used and set by the asm code. Also, the clobbers ++ * list (after third colon) should always include "memory"; this prevents ++ * gcc from thinking it can cache the values of shared-memory fields ++ * across the asm code. Add "cc" if your asm code changes the condition ++ * code register, and also list any temp registers the code uses. ++ *---------- ++ */ ++ ++ ++#ifdef __i386__ /* 32-bit i386 */ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned char slock_t; ++ ++#define TAS(lock) tas(lock) ++ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ register slock_t _res = 1; ++ ++ /* ++ * Use a non-locking test before asserting the bus lock. Note that the ++ * extra test appears to be a small loss on some x86 platforms and a small ++ * win on others; it's by no means clear that we should keep it. ++ */ ++ __asm__ __volatile__( ++ " cmpb $0,%1 \n" ++ " jne 1f \n" ++ " lock \n" ++ " xchgb %0,%1 \n" ++ "1: \n" ++: "+q"(_res), "+m"(*lock) ++: ++: "memory", "cc"); ++ return (int) _res; ++} ++ ++#define SPIN_DELAY() spin_delay() ++ ++static __inline__ void ++spin_delay(void) ++{ ++ /* ++ * This sequence is equivalent to the PAUSE instruction ("rep" is ++ * ignored by old IA32 processors if the following instruction is ++ * not a string operation); the IA-32 Architecture Software ++ * Developer's Manual, Vol. 3, Section 7.7.2 describes why using ++ * PAUSE in the inner loop of a spin lock is necessary for good ++ * performance: ++ * ++ * The PAUSE instruction improves the performance of IA-32 ++ * processors supporting Hyper-Threading Technology when ++ * executing spin-wait loops and other routines where one ++ * thread is accessing a shared lock or semaphore in a tight ++ * polling loop. When executing a spin-wait loop, the ++ * processor can suffer a severe performance penalty when ++ * exiting the loop because it detects a possible memory order ++ * violation and flushes the core processor's pipeline. The ++ * PAUSE instruction provides a hint to the processor that the ++ * code sequence is a spin-wait loop. The processor uses this ++ * hint to avoid the memory order violation and prevent the ++ * pipeline flush. In addition, the PAUSE instruction ++ * de-pipelines the spin-wait loop to prevent it from ++ * consuming execution resources excessively. ++ */ ++ __asm__ __volatile__( ++ " rep; nop \n"); ++} ++ ++#endif /* __i386__ */ ++ ++ ++#ifdef __x86_64__ /* AMD Opteron, Intel EM64T */ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned char slock_t; ++ ++#define TAS(lock) tas(lock) ++ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ register slock_t _res = 1; ++ ++ /* ++ * On Opteron, using a non-locking test before the locking instruction ++ * is a huge loss. On EM64T, it appears to be a wash or small loss, ++ * so we needn't bother to try to distinguish the sub-architectures. ++ */ ++ __asm__ __volatile__( ++ " lock \n" ++ " xchgb %0,%1 \n" ++: "+q"(_res), "+m"(*lock) ++: ++: "memory", "cc"); ++ return (int) _res; ++} ++ ++#define SPIN_DELAY() spin_delay() ++ ++static __inline__ void ++spin_delay(void) ++{ ++ /* ++ * Adding a PAUSE in the spin delay loop is demonstrably a no-op on ++ * Opteron, but it may be of some use on EM64T, so we keep it. ++ */ ++ __asm__ __volatile__( ++ " rep; nop \n"); ++} ++ ++#endif /* __x86_64__ */ ++ ++ ++#if defined(__ia64__) || defined(__ia64) /* Intel Itanium */ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned int slock_t; ++ ++#define TAS(lock) tas(lock) ++ ++#ifndef __INTEL_COMPILER ++ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ long int ret; ++ ++ __asm__ __volatile__( ++ " xchg4 %0=%1,%2 \n" ++: "=r"(ret), "+m"(*lock) ++: "r"(1) ++: "memory"); ++ return (int) ret; ++} ++ ++#else /* __INTEL_COMPILER */ ++ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ int ret; ++ ++ ret = _InterlockedExchange(lock,1); /* this is a xchg asm macro */ ++ ++ return ret; ++} ++ ++#endif /* __INTEL_COMPILER */ ++#endif /* __ia64__ || __ia64 */ ++ ++ ++#if defined(__arm__) || defined(__arm) ++#define HAS_TEST_AND_SET ++ ++typedef unsigned char slock_t; ++ ++#define TAS(lock) tas(lock) ++ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ register slock_t _res = 1; ++ ++ __asm__ __volatile__( ++ " swpb %0, %0, [%2] \n" ++: "+r"(_res), "+m"(*lock) ++: "r"(lock) ++: "memory"); ++ return (int) _res; ++} ++ ++#endif /* __arm__ */ ++ ++ ++/* S/390 and S/390x Linux (32- and 64-bit zSeries) */ ++#if defined(__s390__) || defined(__s390x__) ++#define HAS_TEST_AND_SET ++ ++typedef unsigned int slock_t; ++ ++#define TAS(lock) tas(lock) ++ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ int _res = 0; ++ ++ __asm__ __volatile__( ++ " cs %0,%3,0(%2) \n" ++: "+d"(_res), "+m"(*lock) ++: "a"(lock), "d"(1) ++: "memory", "cc"); ++ return _res; ++} ++ ++#endif /* __s390__ || __s390x__ */ ++ ++ ++#if defined(__sparc__) /* Sparc */ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned char slock_t; ++ ++#define TAS(lock) tas(lock) ++ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ register slock_t _res; ++ ++ /* ++ * See comment in /pg/backend/port/tas/solaris_sparc.s for why this ++ * uses "ldstub", and that file uses "cas". gcc currently generates ++ * sparcv7-targeted binaries, so "cas" use isn't possible. ++ */ ++ __asm__ __volatile__( ++ " ldstub [%2], %0 \n" ++: "=r"(_res), "+m"(*lock) ++: "r"(lock) ++: "memory"); ++ return (int) _res; ++} ++ ++#endif /* __sparc__ */ ++ ++ ++/* PowerPC */ ++#if defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__) || defined(__powerpc64__) ++#define HAS_TEST_AND_SET ++ ++#if defined(__ppc64__) || defined(__powerpc64__) ++typedef unsigned long slock_t; ++#else ++typedef unsigned int slock_t; ++#endif ++ ++#define TAS(lock) tas(lock) ++/* ++ * NOTE: per the Enhanced PowerPC Architecture manual, v1.0 dated 7-May-2002, ++ * an isync is a sufficient synchronization barrier after a lwarx/stwcx loop. ++ */ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ slock_t _t; ++ int _res; ++ ++ __asm__ __volatile__( ++" lwarx %0,0,%3 \n" ++" cmpwi %0,0 \n" ++" bne 1f \n" ++" addi %0,%0,1 \n" ++" stwcx. %0,0,%3 \n" ++" beq 2f \n" ++"1: li %1,1 \n" ++" b 3f \n" ++"2: \n" ++" isync \n" ++" li %1,0 \n" ++"3: \n" ++ ++: "=&r"(_t), "=r"(_res), "+m"(*lock) ++: "r"(lock) ++: "memory", "cc"); ++ return _res; ++} ++ ++/* PowerPC S_UNLOCK is almost standard but requires a "sync" instruction */ ++#define S_UNLOCK(lock) \ ++do \ ++{ \ ++ __asm__ __volatile__ (" sync \n"); \ ++ *((volatile slock_t *) (lock)) = 0; \ ++} while (0) ++ ++#endif /* powerpc */ ++ ++ ++/* Linux Motorola 68k */ ++#if (defined(__mc68000__) || defined(__m68k__)) && defined(__linux__) ++#define HAS_TEST_AND_SET ++ ++typedef unsigned char slock_t; ++ ++#define TAS(lock) tas(lock) ++ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ register int rv; ++ ++ __asm__ __volatile__( ++ " clrl %0 \n" ++ " tas %1 \n" ++ " sne %0 \n" ++: "=d"(rv), "+m"(*lock) ++: ++: "memory", "cc"); ++ return rv; ++} ++ ++#endif /* (__mc68000__ || __m68k__) && __linux__ */ ++ ++ ++/* ++ * VAXen -- even multiprocessor ones ++ * (thanks to Tom Ivar Helbekkmo) ++ */ ++#if defined(__vax__) ++#define HAS_TEST_AND_SET ++ ++typedef unsigned char slock_t; ++ ++#define TAS(lock) tas(lock) ++ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ register int _res; ++ ++ __asm__ __volatile__( ++ " movl $1, %0 \n" ++ " bbssi $0, (%2), 1f \n" ++ " clrl %0 \n" ++ "1: \n" ++: "=&r"(_res), "+m"(*lock) ++: "r"(lock) ++: "memory"); ++ return _res; ++} ++ ++#endif /* __vax__ */ ++ ++ ++#if defined(__ns32k__) /* National Semiconductor 32K */ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned char slock_t; ++ ++#define TAS(lock) tas(lock) ++ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ register int _res; ++ ++ __asm__ __volatile__( ++ " sbitb 0, %1 \n" ++ " sfsd %0 \n" ++: "=r"(_res), "+m"(*lock) ++: ++: "memory"); ++ return _res; ++} ++ ++#endif /* __ns32k__ */ ++ ++ ++#if defined(__alpha) || defined(__alpha__) /* Alpha */ ++/* ++ * Correct multi-processor locking methods are explained in section 5.5.3 ++ * of the Alpha AXP Architecture Handbook, which at this writing can be ++ * found at ftp://ftp.netbsd.org/pub/NetBSD/misc/dec-docs/index.html. ++ * For gcc we implement the handbook's code directly with inline assembler. ++ */ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned long slock_t; ++ ++#define TAS(lock) tas(lock) ++ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ register slock_t _res; ++ ++ __asm__ __volatile__( ++ " ldq $0, %1 \n" ++ " bne $0, 2f \n" ++ " ldq_l %0, %1 \n" ++ " bne %0, 2f \n" ++ " mov 1, $0 \n" ++ " stq_c $0, %1 \n" ++ " beq $0, 2f \n" ++ " mb \n" ++ " br 3f \n" ++ "2: mov 1, %0 \n" ++ "3: \n" ++: "=&r"(_res), "+m"(*lock) ++: ++: "memory", "0"); ++ return (int) _res; ++} ++ ++#define S_UNLOCK(lock) \ ++do \ ++{\ ++ __asm__ __volatile__ (" mb \n"); \ ++ *((volatile slock_t *) (lock)) = 0; \ ++} while (0) ++ ++#endif /* __alpha || __alpha__ */ ++ ++ ++#if defined(__mips__) && !defined(__sgi) /* non-SGI MIPS */ ++/* Note: on SGI we use the OS' mutex ABI, see below */ ++/* Note: R10000 processors require a separate SYNC */ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned int slock_t; ++ ++#define TAS(lock) tas(lock) ++ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ register volatile slock_t *_l = lock; ++ register int _res; ++ register int _tmp; ++ ++ __asm__ __volatile__( ++ " .set push \n" ++ " .set mips2 \n" ++ " .set noreorder \n" ++ " .set nomacro \n" ++ " ll %0, %2 \n" ++ " or %1, %0, 1 \n" ++ " sc %1, %2 \n" ++ " xori %1, 1 \n" ++ " or %0, %0, %1 \n" ++ " sync \n" ++ " .set pop " ++: "=&r" (_res), "=&r" (_tmp), "+R" (*_l) ++: ++: "memory"); ++ return _res; ++} ++ ++/* MIPS S_UNLOCK is almost standard but requires a "sync" instruction */ ++#define S_UNLOCK(lock) \ ++do \ ++{ \ ++ __asm__ __volatile__( \ ++ " .set push \n" \ ++ " .set mips2 \n" \ ++ " .set noreorder \n" \ ++ " .set nomacro \n" \ ++ " sync \n" \ ++ " .set pop "); \ ++ *((volatile slock_t *) (lock)) = 0; \ ++} while (0) ++ ++#endif /* __mips__ && !__sgi */ ++ ++ ++/* These live in s_lock.c, but only for gcc */ ++ ++ ++#if defined(__m68k__) && !defined(__linux__) /* non-Linux Motorola 68k */ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned char slock_t; ++#endif ++ ++ ++#endif /* __GNUC__ */ ++ ++ ++ ++/* ++ * --------------------------------------------------------------------- ++ * Platforms that use non-gcc inline assembly: ++ * --------------------------------------------------------------------- ++ */ ++ ++#if !defined(HAS_TEST_AND_SET) /* We didn't trigger above, let's try here */ ++ ++ ++#if defined(USE_UNIVEL_CC) /* Unixware compiler */ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned char slock_t; ++ ++#define TAS(lock) tas(lock) ++ ++asm int ++tas(volatile slock_t *s_lock) ++{ ++/* UNIVEL wants %mem in column 1, so we don't pg_indent this file */ ++%mem s_lock ++ pushl %ebx ++ movl s_lock, %ebx ++ movl $255, %eax ++ lock ++ xchgb %al, (%ebx) ++ popl %ebx ++} ++ ++#endif /* defined(USE_UNIVEL_CC) */ ++ ++ ++#if defined(__alpha) || defined(__alpha__) /* Tru64 Unix Alpha compiler */ ++/* ++ * The Tru64 compiler doesn't support gcc-style inline asm, but it does ++ * have some builtin functions that accomplish much the same results. ++ * For simplicity, slock_t is defined as long (ie, quadword) on Alpha ++ * regardless of the compiler in use. LOCK_LONG and UNLOCK_LONG only ++ * operate on an int (ie, longword), but that's OK as long as we define ++ * S_INIT_LOCK to zero out the whole quadword. ++ */ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned long slock_t; ++ ++#include ++#define S_INIT_LOCK(lock) (*(lock) = 0) ++#define TAS(lock) (__LOCK_LONG_RETRY((lock), 1) == 0) ++#define S_UNLOCK(lock) __UNLOCK_LONG(lock) ++ ++#endif /* __alpha || __alpha__ */ ++ ++ ++#if defined(__hppa) || defined(__hppa__) /* HP PA-RISC, GCC and HP compilers */ ++/* ++ * HP's PA-RISC ++ * ++ * See src/backend/port/hpux/tas.c.template for details about LDCWX. Because ++ * LDCWX requires a 16-byte-aligned address, we declare slock_t as a 16-byte ++ * struct. The active word in the struct is whichever has the aligned address; ++ * the other three words just sit at -1. ++ * ++ * When using gcc, we can inline the required assembly code. ++ */ ++#define HAS_TEST_AND_SET ++ ++typedef struct ++{ ++ int sema[4]; ++} slock_t; ++ ++#define TAS_ACTIVE_WORD(lock) ((volatile int *) (((long) (lock) + 15) & ~15)) ++ ++#if defined(__GNUC__) ++ ++static __inline__ int ++tas(volatile slock_t *lock) ++{ ++ volatile int *lockword = TAS_ACTIVE_WORD(lock); ++ register int lockval; ++ ++ __asm__ __volatile__( ++ " ldcwx 0(0,%2),%0 \n" ++: "=r"(lockval), "+m"(*lockword) ++: "r"(lockword) ++: "memory"); ++ return (lockval == 0); ++} ++ ++#endif /* __GNUC__ */ ++ ++#define S_UNLOCK(lock) (*TAS_ACTIVE_WORD(lock) = -1) ++ ++#define S_INIT_LOCK(lock) \ ++ do { \ ++ volatile slock_t *lock_ = (lock); \ ++ lock_->sema[0] = -1; \ ++ lock_->sema[1] = -1; \ ++ lock_->sema[2] = -1; \ ++ lock_->sema[3] = -1; \ ++ } while (0) ++ ++#define S_LOCK_FREE(lock) (*TAS_ACTIVE_WORD(lock) != 0) ++ ++#endif /* __hppa || __hppa__ */ ++ ++ ++#if defined(__hpux) && defined(__ia64) && !defined(__GNUC__) ++ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned int slock_t; ++ ++#include ++#define TAS(lock) _Asm_xchg(_SZ_W, lock, 1, _LDHINT_NONE) ++ ++#endif /* HPUX on IA64, non gcc */ ++ ++ ++#if defined(__sgi) /* SGI compiler */ ++/* ++ * SGI IRIX 5 ++ * slock_t is defined as a unsigned long. We use the standard SGI ++ * mutex API. ++ * ++ * The following comment is left for historical reasons, but is probably ++ * not a good idea since the mutex ABI is supported. ++ * ++ * This stuff may be supplemented in the future with Masato Kataoka's MIPS-II ++ * assembly from his NECEWS SVR4 port, but we probably ought to retain this ++ * for the R3000 chips out there. ++ */ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned long slock_t; ++ ++#include "mutex.h" ++#define TAS(lock) (test_and_set(lock,1)) ++#define S_UNLOCK(lock) (test_then_and(lock,0)) ++#define S_INIT_LOCK(lock) (test_then_and(lock,0)) ++#define S_LOCK_FREE(lock) (test_then_add(lock,0) == 0) ++#endif /* __sgi */ ++ ++ ++#if defined(sinix) /* Sinix */ ++/* ++ * SINIX / Reliant UNIX ++ * slock_t is defined as a struct abilock_t, which has a single unsigned long ++ * member. (Basically same as SGI) ++ */ ++#define HAS_TEST_AND_SET ++ ++#include "abi_mutex.h" ++typedef abilock_t slock_t; ++ ++#define TAS(lock) (!acquire_lock(lock)) ++#define S_UNLOCK(lock) release_lock(lock) ++#define S_INIT_LOCK(lock) init_lock(lock) ++#define S_LOCK_FREE(lock) (stat_lock(lock) == UNLOCKED) ++#endif /* sinix */ ++ ++ ++#if defined(_AIX) /* AIX */ ++/* ++ * AIX (POWER) ++ */ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned int slock_t; ++ ++#define TAS(lock) _check_lock(lock, 0, 1) ++#define S_UNLOCK(lock) _clear_lock(lock, 0) ++#endif /* _AIX */ ++ ++ ++#if defined (nextstep) /* Nextstep */ ++#define HAS_TEST_AND_SET ++ ++typedef struct mutex slock_t; ++ ++#define APC_SLOCK_NONBLOCKING_LOCK_AVAILABLE 0 /* -- APC: non-blocking lock not available in this case -- */ ++ ++#define S_LOCK(lock) mutex_lock(lock) ++#define S_UNLOCK(lock) mutex_unlock(lock) ++#define S_INIT_LOCK(lock) mutex_init(lock) ++/* For Mach, we have to delve inside the entrails of `struct mutex'. Ick! */ ++#define S_LOCK_FREE(alock) ((alock)->lock == 0) ++#endif /* nextstep */ ++ ++ ++/* These are in s_lock.c */ ++ ++ ++#if defined(sun3) /* Sun3 */ ++#define HAS_TEST_AND_SET ++ ++typedef unsigned char slock_t; ++#endif ++ ++ ++#if defined(__sun) && (defined(__i386) || defined(__x86_64__) || defined(__sparc__) || defined(__sparc)) ++#define HAS_TEST_AND_SET ++ ++#if defined(__i386) || defined(__x86_64__) || defined(__sparcv9) || defined(__sparcv8plus) ++typedef unsigned int slock_t; ++#else ++typedef unsigned char slock_t; ++#endif ++ ++extern slock_t pg_atomic_cas(volatile slock_t *lock, slock_t with, ++ slock_t cmp); ++ ++#define TAS(a) (pg_atomic_cas((a), 1, 0) != 0) ++#endif ++ ++ ++#ifdef WIN32_ONLY_COMPILER ++typedef LONG slock_t; ++ ++#define HAS_TEST_AND_SET ++#define TAS(lock) (InterlockedCompareExchange(lock, 1, 0)) ++ ++#define SPIN_DELAY() spin_delay() ++ ++static __forceinline void ++spin_delay(void) ++{ ++ /* See comment for gcc code. Same code, MASM syntax */ ++ __asm rep nop; ++} ++ ++#endif ++ ++ ++#endif /* !defined(HAS_TEST_AND_SET) */ ++ ++ ++/* Blow up if we didn't have any way to do spinlocks */ ++#ifndef HAS_TEST_AND_SET ++/* -- APC: We have better options in APC than this, that should be specified explicitly so just fail out and notify the user -- */ ++#error Spin locking is not available on your platform, please select another locking method (see ./configure --help). ++/* #error PostgreSQL does not have native spinlock support on this platform. To continue the compilation, rerun configure using --disable-spinlocks. However, performance will be poor. Please report this to pgsql-bugs@postgresql.org. */ ++#endif ++ ++ ++#else /* !HAVE_SPINLOCKS */ ++ ++ ++/* ++ * Fake spinlock implementation using semaphores --- slow and prone ++ * to fall foul of kernel limits on number of semaphores, so don't use this ++ * unless you must! The subroutines appear in spin.c. ++ */ ++ ++/* -- Removed for APC ++typedef PGSemaphoreData slock_t; ++ ++extern bool s_lock_free_sema(volatile slock_t *lock); ++extern void s_unlock_sema(volatile slock_t *lock); ++extern void s_init_lock_sema(volatile slock_t *lock); ++extern int tas_sema(volatile slock_t *lock); ++ ++#define S_LOCK_FREE(lock) s_lock_free_sema(lock) ++#define S_UNLOCK(lock) s_unlock_sema(lock) ++#define S_INIT_LOCK(lock) s_init_lock_sema(lock) ++#define TAS(lock) tas_sema(lock) ++*/ ++ ++#endif /* HAVE_SPINLOCKS */ ++ ++ ++/* ++ * Default Definitions - override these above as needed. ++ */ ++ ++#define APC_SLOCK_NONBLOCKING_LOCK_AVAILABLE 1 /* -- APC: Non-blocking lock available for this case -- */ ++ ++#if !defined(S_LOCK) ++#define S_LOCK(lock) \ ++ do { \ ++ if (TAS(lock)) \ ++ s_lock((lock), __FILE__, __LINE__ TSRMLS_CC); \ ++ } while (0) ++#endif /* S_LOCK */ ++ ++#if !defined(S_LOCK_FREE) ++#define S_LOCK_FREE(lock) (*(lock) == 0) ++#endif /* S_LOCK_FREE */ ++ ++#if !defined(S_UNLOCK) ++#define S_UNLOCK(lock) (*((volatile slock_t *) (lock)) = 0) ++#endif /* S_UNLOCK */ ++ ++#if !defined(S_INIT_LOCK) ++#define S_INIT_LOCK(lock) S_UNLOCK(lock) ++#endif /* S_INIT_LOCK */ ++ ++#if !defined(SPIN_DELAY) ++#define SPIN_DELAY() ((void) 0) ++#endif /* SPIN_DELAY */ ++ ++#if !defined(TAS) ++extern int tas(volatile slock_t *lock); /* in port/.../tas.s, or ++ * s_lock.c */ ++ ++#define TAS(lock) tas(lock) ++#endif /* TAS */ ++ ++ ++/* ++ * Platform-independent out-of-line support routines ++ */ ++extern void s_lock(volatile slock_t *lock, const char *file, int line TSRMLS_DC); ++ ++/* Support for dynamic adjustment of spins_per_delay */ ++#define DEFAULT_SPINS_PER_DELAY 100 ++ ++#if 0 /* -- Removed from APC use -- */ ++extern void set_spins_per_delay(int shared_spins_per_delay); ++extern int update_spins_per_delay(int shared_spins_per_delay); ++#endif ++ ++#endif /* S_LOCK_H */ +--- /dev/null ++++ b/ext/apc/php_apc.c +@@ -0,0 +1,1812 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | Rasmus Lerdorf | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: php_apc.c 303642 2010-09-21 15:42:01Z kalle $ */ ++ ++#include "apc_zend.h" ++#include "apc_cache.h" ++#include "apc_iterator.h" ++#include "apc_main.h" ++#include "apc_sma.h" ++#include "apc_lock.h" ++#include "apc_bin.h" ++#include "php_globals.h" ++#include "php_ini.h" ++#include "ext/standard/info.h" ++#include "ext/standard/file.h" ++#include "ext/standard/flock_compat.h" ++#ifdef HAVE_SYS_FILE_H ++#include ++#endif ++#include "SAPI.h" ++#include "rfc1867.h" ++#include "php_apc.h" ++#include "ext/standard/md5.h" ++ ++#if HAVE_SIGACTION ++#include "apc_signal.h" ++#endif ++ ++/* {{{ PHP_FUNCTION declarations */ ++PHP_FUNCTION(apc_cache_info); ++PHP_FUNCTION(apc_clear_cache); ++PHP_FUNCTION(apc_sma_info); ++PHP_FUNCTION(apc_store); ++PHP_FUNCTION(apc_fetch); ++PHP_FUNCTION(apc_delete); ++PHP_FUNCTION(apc_delete_file); ++PHP_FUNCTION(apc_compile_file); ++PHP_FUNCTION(apc_define_constants); ++PHP_FUNCTION(apc_load_constants); ++PHP_FUNCTION(apc_add); ++PHP_FUNCTION(apc_inc); ++PHP_FUNCTION(apc_dec); ++PHP_FUNCTION(apc_cas); ++PHP_FUNCTION(apc_bin_dump); ++PHP_FUNCTION(apc_bin_load); ++PHP_FUNCTION(apc_bin_dumpfile); ++PHP_FUNCTION(apc_bin_loadfile); ++PHP_FUNCTION(apc_exists); ++/* }}} */ ++ ++/* {{{ ZEND_DECLARE_MODULE_GLOBALS(apc) */ ++ZEND_DECLARE_MODULE_GLOBALS(apc) ++ ++/* True globals */ ++apc_cache_t* apc_cache = NULL; ++apc_cache_t* apc_user_cache = NULL; ++ ++static void php_apc_init_globals(zend_apc_globals* apc_globals TSRMLS_DC) ++{ ++ apc_globals->filters = NULL; ++ apc_globals->compiled_filters = NULL; ++ apc_globals->initialized = 0; ++ apc_globals->cache_stack = apc_stack_create(0 TSRMLS_CC); ++ apc_globals->cache_by_default = 1; ++ apc_globals->fpstat = 1; ++ apc_globals->canonicalize = 1; ++ apc_globals->stat_ctime = 0; ++ apc_globals->write_lock = 1; ++ apc_globals->slam_defense = 1; ++ apc_globals->report_autofilter = 0; ++ apc_globals->include_once = 0; ++ apc_globals->apc_optimize_function = NULL; ++#ifdef MULTIPART_EVENT_FORMDATA ++ apc_globals->rfc1867 = 0; ++ memset(&(apc_globals->rfc1867_data), 0, sizeof(apc_rfc1867_data)); ++#endif ++ memset(&apc_globals->copied_zvals, 0, sizeof(HashTable)); ++ apc_globals->force_file_update = 0; ++ apc_globals->coredump_unmap = 0; ++ apc_globals->preload_path = NULL; ++ apc_globals->use_request_time = 1; ++ apc_globals->lazy_class_table = NULL; ++ apc_globals->lazy_function_table = NULL; ++} ++ ++static void php_apc_shutdown_globals(zend_apc_globals* apc_globals TSRMLS_DC) ++{ ++ /* deallocate the ignore patterns */ ++ if (apc_globals->filters != NULL) { ++ int i; ++ for (i=0; apc_globals->filters[i] != NULL; i++) { ++ apc_efree(apc_globals->filters[i] TSRMLS_CC); ++ } ++ apc_efree(apc_globals->filters TSRMLS_CC); ++ } ++ ++ /* the stack should be empty */ ++ assert(apc_stack_size(apc_globals->cache_stack) == 0); ++ ++ /* apc cleanup */ ++ apc_stack_destroy(apc_globals->cache_stack TSRMLS_CC); ++ ++ /* the rest of the globals are cleaned up in apc_module_shutdown() */ ++} ++ ++static long apc_atol(const char *str, int str_len) ++{ ++#if PHP_MAJOR_VERSION >= 6 || PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3 ++ return zend_atol(str, str_len); ++#else ++ /* Re-implement zend_atol() for 5.2.x */ ++ long retval; ++ ++ if (!str_len) { ++ str_len = strlen(str); ++ } ++ ++ retval = strtol(str, NULL, 0); ++ ++ if (str_len > 0) { ++ switch (str[str_len - 1]) { ++ case 'g': ++ case 'G': ++ retval *= 1024; ++ /* break intentionally missing */ ++ case 'm': ++ case 'M': ++ retval *= 1024; ++ /* break intentionally missing */ ++ case 'k': ++ case 'K': ++ retval *= 1024; ++ break; ++ } ++ } ++ ++ return retval; ++#endif ++} ++ ++/* }}} */ ++ ++/* {{{ PHP_INI */ ++ ++static PHP_INI_MH(OnUpdate_filters) /* {{{ */ ++{ ++ APCG(filters) = apc_tokenize(new_value, ',' TSRMLS_CC); ++ return SUCCESS; ++} ++/* }}} */ ++ ++static PHP_INI_MH(OnUpdateShmSegments) /* {{{ */ ++{ ++#if APC_MMAP ++ if(zend_atoi(new_value, new_value_length)!=1) { ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "apc.shm_segments setting ignored in MMAP mode"); ++ } ++ APCG(shm_segments) = 1; ++#else ++ APCG(shm_segments) = zend_atoi(new_value, new_value_length); ++#endif ++ return SUCCESS; ++} ++/* }}} */ ++ ++static PHP_INI_MH(OnUpdateShmSize) /* {{{ */ ++{ ++ long s = apc_atol(new_value, new_value_length); ++ ++ if(s <= 0) { ++ return FAILURE; ++ } ++ ++ if(s < 1048576L) { ++ /* if it's less than 1Mb, they are probably using the old syntax */ ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "apc.shm_size now uses M/G suffixes, please update your ini files"); ++ s = s * 1048576L; ++ } ++ ++ APCG(shm_size) = s; ++ ++ return SUCCESS; ++} ++/* }}} */ ++ ++#ifdef MULTIPART_EVENT_FORMDATA ++static PHP_INI_MH(OnUpdateRfc1867Freq) /* {{{ */ ++{ ++ int tmp; ++ tmp = zend_atoi(new_value, new_value_length); ++ if(tmp < 0) { ++ apc_error("rfc1867_freq must be greater than or equal to zero." TSRMLS_CC); ++ return FAILURE; ++ } ++ if(new_value[new_value_length-1] == '%') { ++ if(tmp > 100) { ++ apc_error("rfc1867_freq cannot be over 100%%" TSRMLS_CC); ++ return FAILURE; ++ } ++ APCG(rfc1867_freq) = tmp / 100.0; ++ } else { ++ APCG(rfc1867_freq) = tmp; ++ } ++ return SUCCESS; ++} ++/* }}} */ ++#endif ++ ++PHP_INI_BEGIN() ++STD_PHP_INI_BOOLEAN("apc.enabled", "1", PHP_INI_SYSTEM, OnUpdateBool, enabled, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.shm_segments", "1", PHP_INI_SYSTEM, OnUpdateShmSegments, shm_segments, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.shm_size", "32M", PHP_INI_SYSTEM, OnUpdateShmSize, shm_size, zend_apc_globals, apc_globals) ++#ifdef ZEND_ENGINE_2_4 ++STD_PHP_INI_ENTRY("apc.shm_strings_buffer", "4M", PHP_INI_SYSTEM, OnUpdateLong, shm_strings_buffer, zend_apc_globals, apc_globals) ++#endif ++STD_PHP_INI_BOOLEAN("apc.include_once_override", "0", PHP_INI_SYSTEM, OnUpdateBool, include_once, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.num_files_hint", "1000", PHP_INI_SYSTEM, OnUpdateLong, num_files_hint, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.user_entries_hint", "4096", PHP_INI_SYSTEM, OnUpdateLong, user_entries_hint, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.gc_ttl", "3600", PHP_INI_SYSTEM, OnUpdateLong, gc_ttl, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.ttl", "0", PHP_INI_SYSTEM, OnUpdateLong, ttl, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.user_ttl", "0", PHP_INI_SYSTEM, OnUpdateLong, user_ttl, zend_apc_globals, apc_globals) ++#if APC_MMAP ++STD_PHP_INI_ENTRY("apc.mmap_file_mask", NULL, PHP_INI_SYSTEM, OnUpdateString, mmap_file_mask, zend_apc_globals, apc_globals) ++#endif ++PHP_INI_ENTRY("apc.filters", NULL, PHP_INI_SYSTEM, OnUpdate_filters) ++STD_PHP_INI_BOOLEAN("apc.cache_by_default", "1", PHP_INI_ALL, OnUpdateBool, cache_by_default, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.file_update_protection", "2", PHP_INI_SYSTEM, OnUpdateLong,file_update_protection, zend_apc_globals, apc_globals) ++STD_PHP_INI_BOOLEAN("apc.enable_cli", "0", PHP_INI_SYSTEM, OnUpdateBool, enable_cli, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.max_file_size", "1M", PHP_INI_SYSTEM, OnUpdateLong, max_file_size, zend_apc_globals, apc_globals) ++STD_PHP_INI_BOOLEAN("apc.stat", "1", PHP_INI_SYSTEM, OnUpdateBool, fpstat, zend_apc_globals, apc_globals) ++STD_PHP_INI_BOOLEAN("apc.canonicalize", "1", PHP_INI_SYSTEM, OnUpdateBool, canonicalize, zend_apc_globals, apc_globals) ++STD_PHP_INI_BOOLEAN("apc.stat_ctime", "0", PHP_INI_SYSTEM, OnUpdateBool, stat_ctime, zend_apc_globals, apc_globals) ++STD_PHP_INI_BOOLEAN("apc.write_lock", "1", PHP_INI_SYSTEM, OnUpdateBool, write_lock, zend_apc_globals, apc_globals) ++STD_PHP_INI_BOOLEAN("apc.slam_defense", "1", PHP_INI_SYSTEM, OnUpdateBool, slam_defense, zend_apc_globals, apc_globals) ++STD_PHP_INI_BOOLEAN("apc.report_autofilter", "0", PHP_INI_SYSTEM, OnUpdateBool, report_autofilter,zend_apc_globals, apc_globals) ++#ifdef MULTIPART_EVENT_FORMDATA ++STD_PHP_INI_BOOLEAN("apc.rfc1867", "0", PHP_INI_SYSTEM, OnUpdateBool, rfc1867, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.rfc1867_prefix", "upload_", PHP_INI_SYSTEM, OnUpdateStringUnempty, rfc1867_prefix, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.rfc1867_name", "APC_UPLOAD_PROGRESS", PHP_INI_SYSTEM, OnUpdateStringUnempty, rfc1867_name, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.rfc1867_freq", "0", PHP_INI_SYSTEM, OnUpdateRfc1867Freq, rfc1867_freq, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.rfc1867_ttl", "3600", PHP_INI_SYSTEM, OnUpdateLong, rfc1867_ttl, zend_apc_globals, apc_globals) ++#endif ++STD_PHP_INI_BOOLEAN("apc.coredump_unmap", "0", PHP_INI_SYSTEM, OnUpdateBool, coredump_unmap, zend_apc_globals, apc_globals) ++STD_PHP_INI_ENTRY("apc.preload_path", (char*)NULL, PHP_INI_SYSTEM, OnUpdateString, preload_path, zend_apc_globals, apc_globals) ++STD_PHP_INI_BOOLEAN("apc.file_md5", "0", PHP_INI_SYSTEM, OnUpdateBool, file_md5, zend_apc_globals, apc_globals) ++STD_PHP_INI_BOOLEAN("apc.use_request_time", "1", PHP_INI_ALL, OnUpdateBool, use_request_time, zend_apc_globals, apc_globals) ++STD_PHP_INI_BOOLEAN("apc.lazy_functions", "0", PHP_INI_SYSTEM, OnUpdateBool, lazy_functions, zend_apc_globals, apc_globals) ++STD_PHP_INI_BOOLEAN("apc.lazy_classes", "0", PHP_INI_SYSTEM, OnUpdateBool, lazy_classes, zend_apc_globals, apc_globals) ++PHP_INI_END() ++ ++/* }}} */ ++ ++/* {{{ PHP_MINFO_FUNCTION(apc) */ ++static PHP_MINFO_FUNCTION(apc) ++{ ++ php_info_print_table_start(); ++ php_info_print_table_header(2, "APC Support", APCG(enabled) ? "enabled" : "disabled"); ++ php_info_print_table_row(2, "Version", PHP_APC_VERSION); ++#ifdef __DEBUG_APC__ ++ php_info_print_table_row(2, "APC Debugging", "Enabled"); ++#else ++ php_info_print_table_row(2, "APC Debugging", "Disabled"); ++#endif ++#if APC_MMAP ++ php_info_print_table_row(2, "MMAP Support", "Enabled"); ++ php_info_print_table_row(2, "MMAP File Mask", APCG(mmap_file_mask)); ++#else ++ php_info_print_table_row(2, "MMAP Support", "Disabled"); ++#endif ++ php_info_print_table_row(2, "Locking type", APC_LOCK_TYPE); ++ php_info_print_table_row(2, "Revision", "$Revision: 303642 $"); ++ php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__); ++ php_info_print_table_end(); ++ DISPLAY_INI_ENTRIES(); ++} ++/* }}} */ ++ ++#ifdef MULTIPART_EVENT_FORMDATA ++extern int apc_rfc1867_progress(unsigned int event, void *event_data, void **extra TSRMLS_DC); ++#endif ++ ++/* {{{ PHP_MINIT_FUNCTION(apc) */ ++static PHP_MINIT_FUNCTION(apc) ++{ ++ ZEND_INIT_MODULE_GLOBALS(apc, php_apc_init_globals, php_apc_shutdown_globals); ++ ++ REGISTER_INI_ENTRIES(); ++ ++ /* Disable APC in cli mode unless overridden by apc.enable_cli */ ++ if(!APCG(enable_cli) && !strcmp(sapi_module.name, "cli")) { ++ APCG(enabled) = 0; ++ } ++ ++ if (APCG(enabled)) { ++ if(APCG(initialized)) { ++ apc_process_init(module_number TSRMLS_CC); ++ } else { ++ apc_module_init(module_number TSRMLS_CC); ++ apc_zend_init(TSRMLS_C); ++ apc_process_init(module_number TSRMLS_CC); ++#ifdef MULTIPART_EVENT_FORMDATA ++ /* File upload progress tracking */ ++ if(APCG(rfc1867)) { ++ php_rfc1867_callback = apc_rfc1867_progress; ++ } ++#endif ++ apc_iterator_init(module_number TSRMLS_CC); ++ } ++ ++ zend_register_long_constant("APC_BIN_VERIFY_MD5", sizeof("APC_BIN_VERIFY_MD5"), APC_BIN_VERIFY_MD5, (CONST_CS | CONST_PERSISTENT), module_number TSRMLS_CC); ++ zend_register_long_constant("APC_BIN_VERIFY_CRC32", sizeof("APC_BIN_VERIFY_CRC32"), APC_BIN_VERIFY_CRC32, (CONST_CS | CONST_PERSISTENT), module_number TSRMLS_CC); ++ } ++ ++ return SUCCESS; ++} ++/* }}} */ ++ ++/* {{{ PHP_MSHUTDOWN_FUNCTION(apc) */ ++static PHP_MSHUTDOWN_FUNCTION(apc) ++{ ++ if(APCG(enabled)) { ++ apc_process_shutdown(TSRMLS_C); ++ apc_zend_shutdown(TSRMLS_C); ++ apc_module_shutdown(TSRMLS_C); ++#ifndef ZTS ++ php_apc_shutdown_globals(&apc_globals); ++#endif ++#if HAVE_SIGACTION ++ apc_shutdown_signals(TSRMLS_C); ++#endif ++ } ++#ifdef ZTS ++ ts_free_id(apc_globals_id); ++#endif ++ UNREGISTER_INI_ENTRIES(); ++ return SUCCESS; ++} ++/* }}} */ ++ ++/* {{{ PHP_RINIT_FUNCTION(apc) */ ++static PHP_RINIT_FUNCTION(apc) ++{ ++ if(APCG(enabled)) { ++ apc_request_init(TSRMLS_C); ++ ++#if HAVE_SIGACTION ++ apc_set_signals(TSRMLS_C); ++#endif ++ } ++ return SUCCESS; ++} ++/* }}} */ ++ ++/* {{{ PHP_RSHUTDOWN_FUNCTION(apc) */ ++static PHP_RSHUTDOWN_FUNCTION(apc) ++{ ++ if(APCG(enabled)) { ++ apc_request_shutdown(TSRMLS_C); ++ } ++ return SUCCESS; ++} ++/* }}} */ ++ ++/* {{{ proto array apc_cache_info([string type [, bool limited]]) */ ++PHP_FUNCTION(apc_cache_info) ++{ ++ apc_cache_info_t* info; ++ apc_cache_link_t* p; ++ zval* list; ++ char *cache_type; ++ int ct_len; ++ zend_bool limited=0; ++ char md5str[33]; ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sb", &cache_type, &ct_len, &limited) == FAILURE) { ++ return; ++ } ++ ++ if(ZEND_NUM_ARGS()) { ++ if(!strcasecmp(cache_type,"user")) { ++ info = apc_cache_info(apc_user_cache, limited TSRMLS_CC); ++ } else if(!strcasecmp(cache_type,"filehits")) { ++#ifdef APC_FILEHITS ++ RETVAL_ZVAL(APCG(filehits), 1, 0); ++ return; ++#else ++ RETURN_FALSE; ++#endif ++ } else { ++ info = apc_cache_info(apc_cache, limited TSRMLS_CC); ++ } ++ } else { ++ info = apc_cache_info(apc_cache, limited TSRMLS_CC); ++ } ++ ++ if(!info) { ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "No APC info available. Perhaps APC is not enabled? Check apc.enabled in your ini file"); ++ RETURN_FALSE; ++ } ++ ++ array_init(return_value); ++ add_assoc_long(return_value, "num_slots", info->num_slots); ++ add_assoc_long(return_value, "ttl", info->ttl); ++ ++ add_assoc_double(return_value, "num_hits", (double)info->num_hits); ++ add_assoc_double(return_value, "num_misses", (double)info->num_misses); ++ add_assoc_double(return_value, "num_inserts", (double)info->num_inserts); ++ add_assoc_double(return_value, "expunges", (double)info->expunges); ++ ++ add_assoc_long(return_value, "start_time", info->start_time); ++ add_assoc_double(return_value, "mem_size", (double)info->mem_size); ++ add_assoc_long(return_value, "num_entries", info->num_entries); ++#ifdef MULTIPART_EVENT_FORMDATA ++ add_assoc_long(return_value, "file_upload_progress", 1); ++#else ++ add_assoc_long(return_value, "file_upload_progress", 0); ++#endif ++#if APC_MMAP ++ add_assoc_stringl(return_value, "memory_type", "mmap", sizeof("mmap")-1, 1); ++#else ++ add_assoc_stringl(return_value, "memory_type", "IPC shared", sizeof("IPC shared")-1, 1); ++#endif ++#if APC_SEM_LOCKS ++ add_assoc_stringl(return_value, "locking_type", "IPC semaphore", sizeof("IPC semaphore")-1, 1); ++#elif APC_PTHREADMUTEX_LOCKS ++ add_assoc_stringl(return_value, "locking_type", "pthread mutex", sizeof("pthread mutex")-1, 1); ++#elif APC_SPIN_LOCKS ++ add_assoc_stringl(return_value, "locking_type", "spin", sizeof("spin")-1, 1); ++#else ++ add_assoc_stringl(return_value, "locking_type", "file", sizeof("file")-1, 1); ++#endif ++ if(limited) { ++ apc_cache_free_info(info TSRMLS_CC); ++ return; ++ } ++ ++ ALLOC_INIT_ZVAL(list); ++ array_init(list); ++ ++ for (p = info->list; p != NULL; p = p->next) { ++ zval* link; ++ ++ ALLOC_INIT_ZVAL(link); ++ array_init(link); ++ ++ if(p->type == APC_CACHE_ENTRY_FILE) { ++ add_assoc_string(link, "filename", p->data.file.filename, 1); ++#ifdef PHP_WIN32 ++ { ++ char buf[20]; ++ sprintf(buf, "%I64d", p->data.file.device); ++ add_assoc_string(link, "device", buf, 1); ++ ++ sprintf(buf, "%I64d", p->data.file.inode); ++ add_assoc_string(link, "inode", buf, 1); ++ } ++#else ++ add_assoc_long(link, "device", p->data.file.device); ++ add_assoc_long(link, "inode", p->data.file.inode); ++#endif ++ ++ ++ add_assoc_string(link, "type", "file", 1); ++ if(APCG(file_md5)) { ++ make_digest(md5str, p->data.file.md5); ++ add_assoc_string(link, "md5", md5str, 1); ++ } ++ } else if(p->type == APC_CACHE_ENTRY_USER) { ++ add_assoc_string(link, "info", p->data.user.info, 1); ++ add_assoc_long(link, "ttl", (long)p->data.user.ttl); ++ add_assoc_string(link, "type", "user", 1); ++ } ++ ++ add_assoc_double(link, "num_hits", (double)p->num_hits); ++ ++ add_assoc_long(link, "mtime", p->mtime); ++ add_assoc_long(link, "creation_time", p->creation_time); ++ add_assoc_long(link, "deletion_time", p->deletion_time); ++ add_assoc_long(link, "access_time", p->access_time); ++ add_assoc_long(link, "ref_count", p->ref_count); ++ add_assoc_long(link, "mem_size", p->mem_size); ++ ++ ++ add_next_index_zval(list, link); ++ } ++ add_assoc_zval(return_value, "cache_list", list); ++ ++ ALLOC_INIT_ZVAL(list); ++ array_init(list); ++ ++ for (p = info->deleted_list; p != NULL; p = p->next) { ++ zval* link; ++ ++ ALLOC_INIT_ZVAL(link); ++ array_init(link); ++ ++ if(p->type == APC_CACHE_ENTRY_FILE) { ++ add_assoc_string(link, "filename", p->data.file.filename, 1); ++#ifdef PHP_WIN32 ++ { ++ char buf[20]; ++ sprintf(buf, "%I64d", p->data.file.device); ++ add_assoc_string(link, "device", buf, 1); ++ ++ sprintf(buf, "%I64d", p->data.file.inode); ++ add_assoc_string(link, "inode", buf, 1); ++ } ++#else ++ add_assoc_long(link, "device", p->data.file.device); ++ add_assoc_long(link, "inode", p->data.file.inode); ++#endif ++ ++ add_assoc_string(link, "type", "file", 1); ++ if(APCG(file_md5)) { ++ make_digest(md5str, p->data.file.md5); ++ add_assoc_string(link, "md5", md5str, 1); ++ } ++ } else if(p->type == APC_CACHE_ENTRY_USER) { ++ add_assoc_string(link, "info", p->data.user.info, 1); ++ add_assoc_long(link, "ttl", (long)p->data.user.ttl); ++ add_assoc_string(link, "type", "user", 1); ++ } ++ ++ add_assoc_double(link, "num_hits", (double)p->num_hits); ++ ++ add_assoc_long(link, "mtime", p->mtime); ++ add_assoc_long(link, "creation_time", p->creation_time); ++ add_assoc_long(link, "deletion_time", p->deletion_time); ++ add_assoc_long(link, "access_time", p->access_time); ++ add_assoc_long(link, "ref_count", p->ref_count); ++ add_assoc_long(link, "mem_size", p->mem_size); ++ add_next_index_zval(list, link); ++ } ++ add_assoc_zval(return_value, "deleted_list", list); ++ ++ apc_cache_free_info(info TSRMLS_CC); ++} ++/* }}} */ ++ ++/* {{{ proto void apc_clear_cache([string cache]) */ ++PHP_FUNCTION(apc_clear_cache) ++{ ++ char *cache_type; ++ int ct_len = 0; ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &cache_type, &ct_len) == FAILURE) { ++ return; ++ } ++ ++ if(ct_len) { ++ if(!strcasecmp(cache_type, "user")) { ++ apc_cache_clear(apc_user_cache TSRMLS_CC); ++ RETURN_TRUE; ++ } ++ } ++ apc_cache_clear(apc_cache TSRMLS_CC); ++ RETURN_TRUE; ++} ++/* }}} */ ++ ++/* {{{ proto array apc_sma_info([bool limited]) */ ++PHP_FUNCTION(apc_sma_info) ++{ ++ apc_sma_info_t* info; ++ zval* block_lists; ++ int i; ++ zend_bool limited = 0; ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &limited) == FAILURE) { ++ return; ++ } ++ ++ info = apc_sma_info(limited TSRMLS_CC); ++ ++ if(!info) { ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "No APC SMA info available. Perhaps APC is disabled via apc.enabled?"); ++ RETURN_FALSE; ++ } ++ ++ array_init(return_value); ++ add_assoc_long(return_value, "num_seg", info->num_seg); ++ add_assoc_double(return_value, "seg_size", (double)info->seg_size); ++ add_assoc_double(return_value, "avail_mem", (double)apc_sma_get_avail_mem()); ++ ++ if(limited) { ++ apc_sma_free_info(info TSRMLS_CC); ++ return; ++ } ++ ++#if ALLOC_DISTRIBUTION ++ { ++ size_t *adist = apc_sma_get_alloc_distribution(); ++ zval* list; ++ ALLOC_INIT_ZVAL(list); ++ array_init(list); ++ for(i=0; i<30; i++) { ++ add_next_index_long(list, adist[i]); ++ } ++ add_assoc_zval(return_value, "adist", list); ++ } ++#endif ++ ALLOC_INIT_ZVAL(block_lists); ++ array_init(block_lists); ++ ++ for (i = 0; i < info->num_seg; i++) { ++ apc_sma_link_t* p; ++ zval* list; ++ ++ ALLOC_INIT_ZVAL(list); ++ array_init(list); ++ ++ for (p = info->list[i]; p != NULL; p = p->next) { ++ zval* link; ++ ++ ALLOC_INIT_ZVAL(link); ++ array_init(link); ++ ++ add_assoc_long(link, "size", p->size); ++ add_assoc_long(link, "offset", p->offset); ++ add_next_index_zval(list, link); ++ } ++ add_next_index_zval(block_lists, list); ++ } ++ add_assoc_zval(return_value, "block_lists", block_lists); ++ apc_sma_free_info(info TSRMLS_CC); ++} ++/* }}} */ ++ ++/* {{{ */ ++int _apc_update(char *strkey, int strkey_len, apc_cache_updater_t updater, void* data TSRMLS_DC) ++{ ++ if(!APCG(enabled)) { ++ return 0; ++ } ++ ++ HANDLE_BLOCK_INTERRUPTIONS(); ++ APCG(current_cache) = apc_user_cache; ++ ++ if (!_apc_cache_user_update(apc_user_cache, strkey, strkey_len + 1, updater, data TSRMLS_CC)) { ++ HANDLE_UNBLOCK_INTERRUPTIONS(); ++ return 0; ++ } ++ ++ APCG(current_cache) = NULL; ++ HANDLE_UNBLOCK_INTERRUPTIONS(); ++ ++ return 1; ++} ++/* }}} */ ++ ++/* {{{ _apc_store */ ++int _apc_store(char *strkey, int strkey_len, const zval *val, const unsigned int ttl, const int exclusive TSRMLS_DC) { ++ apc_cache_entry_t *entry; ++ apc_cache_key_t key; ++ time_t t; ++ apc_context_t ctxt={0,}; ++ int ret = 1; ++ ++ t = apc_time(); ++ ++ if(!APCG(enabled)) return 0; ++ ++ HANDLE_BLOCK_INTERRUPTIONS(); ++ ++ APCG(current_cache) = apc_user_cache; ++ ++ ctxt.pool = apc_pool_create(APC_SMALL_POOL, apc_sma_malloc, apc_sma_free, apc_sma_protect, apc_sma_unprotect TSRMLS_CC); ++ if (!ctxt.pool) { ++ apc_warning("Unable to allocate memory for pool." TSRMLS_CC); ++ return 0; ++ } ++ ctxt.copy = APC_COPY_IN_USER; ++ ctxt.force_update = 0; ++ ++ if(!ctxt.pool) { ++ ret = 0; ++ goto nocache; ++ } ++ ++ if (!apc_cache_make_user_key(&key, strkey, strkey_len, t)) { ++ goto freepool; ++ } ++ ++ if (apc_cache_is_last_key(apc_user_cache, &key, 0, t TSRMLS_CC)) { ++ goto freepool; ++ } ++ ++ if (!(entry = apc_cache_make_user_entry(strkey, strkey_len, val, &ctxt, ttl TSRMLS_CC))) { ++ goto freepool; ++ } ++ ++ if (!apc_cache_user_insert(apc_user_cache, key, entry, &ctxt, t, exclusive TSRMLS_CC)) { ++freepool: ++ apc_pool_destroy(ctxt.pool TSRMLS_CC); ++ ret = 0; ++ } ++ ++nocache: ++ ++ APCG(current_cache) = NULL; ++ ++ HANDLE_UNBLOCK_INTERRUPTIONS(); ++ ++ return ret; ++} ++/* }}} */ ++ ++/* {{{ apc_store_helper(INTERNAL_FUNCTION_PARAMETERS, const int exclusive) ++ */ ++static void apc_store_helper(INTERNAL_FUNCTION_PARAMETERS, const int exclusive) ++{ ++ zval *key = NULL; ++ zval *val = NULL; ++ long ttl = 0L; ++ HashTable *hash; ++ HashPosition hpos; ++ zval **hentry; ++ char *hkey=NULL; ++ uint hkey_len; ++ ulong hkey_idx; ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|zl", &key, &val, &ttl) == FAILURE) { ++ return; ++ } ++ ++ if (!key) RETURN_FALSE; ++ ++ if (Z_TYPE_P(key) == IS_ARRAY) { ++ hash = Z_ARRVAL_P(key); ++ array_init(return_value); ++ zend_hash_internal_pointer_reset_ex(hash, &hpos); ++ while(zend_hash_get_current_data_ex(hash, (void**)&hentry, &hpos) == SUCCESS) { ++ zend_hash_get_current_key_ex(hash, &hkey, &hkey_len, &hkey_idx, 0, &hpos); ++ if (hkey) { ++ if(!_apc_store(hkey, hkey_len, *hentry, (unsigned int)ttl, exclusive TSRMLS_CC)) { ++ add_assoc_long_ex(return_value, hkey, hkey_len, -1); /* -1: insertion error */ ++ } ++ hkey = NULL; ++ } else { ++ add_index_long(return_value, hkey_idx, -1); /* -1: insertion error */ ++ } ++ zend_hash_move_forward_ex(hash, &hpos); ++ } ++ return; ++ } else if (Z_TYPE_P(key) == IS_STRING) { ++ if (!val) RETURN_FALSE; ++ if(_apc_store(Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, val, (unsigned int)ttl, exclusive TSRMLS_CC)) ++ RETURN_TRUE; ++ } else { ++ apc_warning("apc_store expects key parameter to be a string or an array of key/value pairs." TSRMLS_CC); ++ } ++ ++ RETURN_FALSE; ++} ++/* }}} */ ++ ++/* {{{ proto int apc_store(mixed key, mixed var [, long ttl ]) ++ */ ++PHP_FUNCTION(apc_store) { ++ apc_store_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); ++} ++/* }}} */ ++ ++/* {{{ proto int apc_add(mixed key, mixed var [, long ttl ]) ++ */ ++PHP_FUNCTION(apc_add) { ++ apc_store_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); ++} ++/* }}} */ ++ ++/* {{{ inc_updater */ ++ ++struct _inc_update_args { ++ long step; ++ long lval; ++}; ++ ++static int inc_updater(apc_cache_t* cache, apc_cache_entry_t* entry, void* data) { ++ ++ struct _inc_update_args *args = (struct _inc_update_args*) data; ++ ++ zval* val = entry->data.user.val; ++ ++ if(Z_TYPE_P(val) == IS_LONG) { ++ Z_LVAL_P(val) += args->step; ++ args->lval = Z_LVAL_P(val); ++ return 1; ++ } ++ ++ return 0; ++} ++/* }}} */ ++ ++/* {{{ proto long apc_inc(string key [, long step [, bool& success]]) ++ */ ++PHP_FUNCTION(apc_inc) { ++ char *strkey; ++ int strkey_len; ++ struct _inc_update_args args = {1L, -1}; ++ zval *success = NULL; ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz", &strkey, &strkey_len, &(args.step), &success) == FAILURE) { ++ return; ++ } ++ ++ if(_apc_update(strkey, strkey_len, inc_updater, &args TSRMLS_CC)) { ++ if(success) ZVAL_TRUE(success); ++ RETURN_LONG(args.lval); ++ } ++ ++ if(success) ZVAL_FALSE(success); ++ ++ RETURN_FALSE; ++} ++/* }}} */ ++ ++/* {{{ proto long apc_dec(string key [, long step [, bool &success]]) ++ */ ++PHP_FUNCTION(apc_dec) { ++ char *strkey; ++ int strkey_len; ++ struct _inc_update_args args = {1L, -1}; ++ zval *success = NULL; ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz", &strkey, &strkey_len, &(args.step), &success) == FAILURE) { ++ return; ++ } ++ ++ args.step = args.step * -1; ++ ++ if(_apc_update(strkey, strkey_len, inc_updater, &args TSRMLS_CC)) { ++ if(success) ZVAL_TRUE(success); ++ RETURN_LONG(args.lval); ++ } ++ ++ if(success) ZVAL_FALSE(success); ++ ++ RETURN_FALSE; ++} ++/* }}} */ ++ ++/* {{{ cas_updater */ ++static int cas_updater(apc_cache_t* cache, apc_cache_entry_t* entry, void* data) { ++ long* vals = ((long*)data); ++ long old = vals[0]; ++ long new = vals[1]; ++ zval* val = entry->data.user.val; ++ ++ if(Z_TYPE_P(val) == IS_LONG) { ++ if(Z_LVAL_P(val) == old) { ++ Z_LVAL_P(val) = new; ++ return 1; ++ } ++ } ++ ++ return 0; ++} ++/* }}} */ ++ ++/* {{{ proto int apc_cas(string key, int old, int new) ++ */ ++PHP_FUNCTION(apc_cas) { ++ char *strkey; ++ int strkey_len; ++ long vals[2]; ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sll", &strkey, &strkey_len, &vals[0], &vals[1]) == FAILURE) { ++ return; ++ } ++ ++ if(_apc_update(strkey, strkey_len, cas_updater, &vals TSRMLS_CC)) RETURN_TRUE; ++ RETURN_FALSE; ++} ++/* }}} */ ++ ++void *apc_erealloc_wrapper(void *ptr, size_t size) { ++ return _erealloc(ptr, size, 0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC); ++} ++ ++/* {{{ proto mixed apc_fetch(mixed key[, bool &success]) ++ */ ++PHP_FUNCTION(apc_fetch) { ++ zval *key; ++ zval *success = NULL; ++ HashTable *hash; ++ HashPosition hpos; ++ zval **hentry; ++ zval *result; ++ zval *result_entry; ++ char *strkey; ++ int strkey_len; ++ apc_cache_entry_t* entry; ++ time_t t; ++ apc_context_t ctxt = {0,}; ++ ++ if(!APCG(enabled)) RETURN_FALSE; ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|z", &key, &success) == FAILURE) { ++ return; ++ } ++ ++ t = apc_time(); ++ ++ if (success) { ++ ZVAL_BOOL(success, 0); ++ } ++ ++ ctxt.pool = apc_pool_create(APC_UNPOOL, apc_php_malloc, apc_php_free, NULL, NULL TSRMLS_CC); ++ if (!ctxt.pool) { ++ apc_warning("Unable to allocate memory for pool." TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ctxt.copy = APC_COPY_OUT_USER; ++ ctxt.force_update = 0; ++ ++ if(Z_TYPE_P(key) != IS_STRING && Z_TYPE_P(key) != IS_ARRAY) { ++ convert_to_string(key); ++ } ++ ++ if(Z_TYPE_P(key) == IS_STRING) { ++ strkey = Z_STRVAL_P(key); ++ strkey_len = Z_STRLEN_P(key); ++ if(!strkey_len) RETURN_FALSE; ++ entry = apc_cache_user_find(apc_user_cache, strkey, (strkey_len + 1), t TSRMLS_CC); ++ if(entry) { ++ /* deep-copy returned shm zval to emalloc'ed return_value */ ++ apc_cache_fetch_zval(return_value, entry->data.user.val, &ctxt TSRMLS_CC); ++ apc_cache_release(apc_user_cache, entry TSRMLS_CC); ++ } else { ++ goto freepool; ++ } ++ } else if(Z_TYPE_P(key) == IS_ARRAY) { ++ hash = Z_ARRVAL_P(key); ++ MAKE_STD_ZVAL(result); ++ array_init(result); ++ zend_hash_internal_pointer_reset_ex(hash, &hpos); ++ while(zend_hash_get_current_data_ex(hash, (void**)&hentry, &hpos) == SUCCESS) { ++ if(Z_TYPE_PP(hentry) != IS_STRING) { ++ apc_warning("apc_fetch() expects a string or array of strings." TSRMLS_CC); ++ goto freepool; ++ } ++ entry = apc_cache_user_find(apc_user_cache, Z_STRVAL_PP(hentry), (Z_STRLEN_PP(hentry) + 1), t TSRMLS_CC); ++ if(entry) { ++ /* deep-copy returned shm zval to emalloc'ed return_value */ ++ MAKE_STD_ZVAL(result_entry); ++ apc_cache_fetch_zval(result_entry, entry->data.user.val, &ctxt TSRMLS_CC); ++ apc_cache_release(apc_user_cache, entry TSRMLS_CC); ++ zend_hash_add(Z_ARRVAL_P(result), Z_STRVAL_PP(hentry), Z_STRLEN_PP(hentry) +1, &result_entry, sizeof(zval*), NULL); ++ } /* don't set values we didn't find */ ++ zend_hash_move_forward_ex(hash, &hpos); ++ } ++ RETVAL_ZVAL(result, 0, 1); ++ } else { ++ apc_warning("apc_fetch() expects a string or array of strings." TSRMLS_CC); ++freepool: ++ apc_pool_destroy(ctxt.pool TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ++ if (success) { ++ ZVAL_BOOL(success, 1); ++ } ++ ++ apc_pool_destroy(ctxt.pool TSRMLS_CC); ++ return; ++} ++/* }}} */ ++ ++/* {{{ proto mixed apc_exists(mixed key) ++ */ ++PHP_FUNCTION(apc_exists) { ++ zval *key; ++ HashTable *hash; ++ HashPosition hpos; ++ zval **hentry; ++ char *strkey; ++ int strkey_len; ++ apc_cache_entry_t* entry; ++ zval *result; ++ zval *result_entry; ++ time_t t; ++ ++ if(!APCG(enabled)) RETURN_FALSE; ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &key) == FAILURE) { ++ return; ++ } ++ ++ t = apc_time(); ++ ++ if(Z_TYPE_P(key) != IS_STRING && Z_TYPE_P(key) != IS_ARRAY) { ++ convert_to_string(key); ++ } ++ ++ if(Z_TYPE_P(key) == IS_STRING) { ++ strkey = Z_STRVAL_P(key); ++ strkey_len = Z_STRLEN_P(key); ++ if(!strkey_len) RETURN_FALSE; ++ entry = apc_cache_user_exists(apc_user_cache, strkey, strkey_len + 1, t TSRMLS_CC); ++ if(entry) { ++ RETURN_TRUE; ++ } ++ } else if(Z_TYPE_P(key) == IS_ARRAY) { ++ hash = Z_ARRVAL_P(key); ++ MAKE_STD_ZVAL(result); ++ array_init(result); ++ zend_hash_internal_pointer_reset_ex(hash, &hpos); ++ while(zend_hash_get_current_data_ex(hash, (void**)&hentry, &hpos) == SUCCESS) { ++ if(Z_TYPE_PP(hentry) != IS_STRING) { ++ apc_warning("apc_exists() expects a string or array of strings." TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ++ entry = apc_cache_user_exists(apc_user_cache, Z_STRVAL_PP(hentry), Z_STRLEN_PP(hentry) + 1, t TSRMLS_CC); ++ if(entry) { ++ MAKE_STD_ZVAL(result_entry); ++ ZVAL_BOOL(result_entry, 1); ++ zend_hash_add(Z_ARRVAL_P(result), Z_STRVAL_PP(hentry), Z_STRLEN_PP(hentry) +1, &result_entry, sizeof(zval*), NULL); ++ } /* don't set values we didn't find */ ++ zend_hash_move_forward_ex(hash, &hpos); ++ } ++ RETURN_ZVAL(result, 0, 1); ++ } else { ++ apc_warning("apc_exists() expects a string or array of strings." TSRMLS_CC); ++ } ++ ++ RETURN_FALSE; ++} ++/* }}} */ ++ ++ ++/* {{{ proto mixed apc_delete(mixed keys) ++ */ ++PHP_FUNCTION(apc_delete) { ++ zval *keys; ++ ++ if(!APCG(enabled)) RETURN_FALSE; ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &keys) == FAILURE) { ++ return; ++ } ++ ++ if (Z_TYPE_P(keys) == IS_STRING) { ++ if (!Z_STRLEN_P(keys)) RETURN_FALSE; ++ if(apc_cache_user_delete(apc_user_cache, Z_STRVAL_P(keys), (Z_STRLEN_P(keys) + 1) TSRMLS_CC)) { ++ RETURN_TRUE; ++ } else { ++ RETURN_FALSE; ++ } ++ } else if (Z_TYPE_P(keys) == IS_ARRAY) { ++ HashTable *hash = Z_ARRVAL_P(keys); ++ HashPosition hpos; ++ zval **hentry; ++ array_init(return_value); ++ zend_hash_internal_pointer_reset_ex(hash, &hpos); ++ while(zend_hash_get_current_data_ex(hash, (void**)&hentry, &hpos) == SUCCESS) { ++ if(Z_TYPE_PP(hentry) != IS_STRING) { ++ apc_warning("apc_delete() expects a string, array of strings, or APCIterator instance." TSRMLS_CC); ++ add_next_index_zval(return_value, *hentry); ++ Z_ADDREF_PP(hentry); ++ } else if(apc_cache_user_delete(apc_user_cache, Z_STRVAL_PP(hentry), (Z_STRLEN_PP(hentry) + 1) TSRMLS_CC) != 1) { ++ add_next_index_zval(return_value, *hentry); ++ Z_ADDREF_PP(hentry); ++ } ++ zend_hash_move_forward_ex(hash, &hpos); ++ } ++ return; ++ } else if (Z_TYPE_P(keys) == IS_OBJECT) { ++ if (apc_iterator_delete(keys TSRMLS_CC)) { ++ RETURN_TRUE; ++ } else { ++ RETURN_FALSE; ++ } ++ } else { ++ apc_warning("apc_delete() expects a string, array of strings, or APCIterator instance." TSRMLS_CC); ++ } ++} ++/* }}} */ ++ ++/* {{{ proto mixed apc_delete_file(mixed keys) ++ * Deletes the given files from the opcode cache. ++ * Accepts a string, array of strings, or APCIterator object. ++ * Returns True/False, or for an Array an Array of failed files. ++ */ ++PHP_FUNCTION(apc_delete_file) { ++ zval *keys; ++ ++ if(!APCG(enabled)) RETURN_FALSE; ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &keys) == FAILURE) { ++ return; ++ } ++ ++ if (Z_TYPE_P(keys) == IS_STRING) { ++ if (!Z_STRLEN_P(keys)) RETURN_FALSE; ++ if(apc_cache_delete(apc_cache, Z_STRVAL_P(keys), Z_STRLEN_P(keys) + 1 TSRMLS_CC) != 1) { ++ RETURN_FALSE; ++ } else { ++ RETURN_TRUE; ++ } ++ } else if (Z_TYPE_P(keys) == IS_ARRAY) { ++ HashTable *hash = Z_ARRVAL_P(keys); ++ HashPosition hpos; ++ zval **hentry; ++ array_init(return_value); ++ zend_hash_internal_pointer_reset_ex(hash, &hpos); ++ while(zend_hash_get_current_data_ex(hash, (void**)&hentry, &hpos) == SUCCESS) { ++ if(Z_TYPE_PP(hentry) != IS_STRING) { ++ apc_warning("apc_delete_file() expects a string, array of strings, or APCIterator instance." TSRMLS_CC); ++ add_next_index_zval(return_value, *hentry); ++ Z_ADDREF_PP(hentry); ++ } else if(apc_cache_delete(apc_cache, Z_STRVAL_PP(hentry), Z_STRLEN_PP(hentry) + 1 TSRMLS_CC) != 1) { ++ add_next_index_zval(return_value, *hentry); ++ Z_ADDREF_PP(hentry); ++ } ++ zend_hash_move_forward_ex(hash, &hpos); ++ } ++ return; ++ } else if (Z_TYPE_P(keys) == IS_OBJECT) { ++ if (apc_iterator_delete(keys TSRMLS_CC)) { ++ RETURN_TRUE; ++ } else { ++ RETURN_FALSE; ++ } ++ } else { ++ apc_warning("apc_delete_file() expects a string, array of strings, or APCIterator instance." TSRMLS_CC); ++ } ++} ++/* }}} */ ++ ++static void _apc_define_constants(zval *constants, zend_bool case_sensitive TSRMLS_DC) { ++ char *const_key; ++ unsigned int const_key_len; ++ zval **entry; ++ HashPosition pos; ++ ++ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(constants), &pos); ++ while (zend_hash_get_current_data_ex(Z_ARRVAL_P(constants), (void**)&entry, &pos) == SUCCESS) { ++ zend_constant c; ++ int key_type; ++ ulong num_key; ++ ++ key_type = zend_hash_get_current_key_ex(Z_ARRVAL_P(constants), &const_key, &const_key_len, &num_key, 0, &pos); ++ if(key_type != HASH_KEY_IS_STRING) { ++ zend_hash_move_forward_ex(Z_ARRVAL_P(constants), &pos); ++ continue; ++ } ++ switch(Z_TYPE_PP(entry)) { ++ case IS_LONG: ++ case IS_DOUBLE: ++ case IS_STRING: ++ case IS_BOOL: ++ case IS_RESOURCE: ++ case IS_NULL: ++ break; ++ default: ++ zend_hash_move_forward_ex(Z_ARRVAL_P(constants), &pos); ++ continue; ++ } ++ c.value = **entry; ++ zval_copy_ctor(&c.value); ++ c.flags = case_sensitive; ++ c.name = zend_strndup(const_key, const_key_len); ++ c.name_len = const_key_len; ++ c.module_number = PHP_USER_CONSTANT; ++ zend_register_constant(&c TSRMLS_CC); ++ ++ zend_hash_move_forward_ex(Z_ARRVAL_P(constants), &pos); ++ } ++} ++ ++/* {{{ proto mixed apc_define_constants(string key, array constants [, bool case_sensitive]) ++ */ ++PHP_FUNCTION(apc_define_constants) { ++ char *strkey; ++ int strkey_len; ++ zval *constants = NULL; ++ zend_bool case_sensitive = 1; ++ int argc = ZEND_NUM_ARGS(); ++ ++ if (zend_parse_parameters(argc TSRMLS_CC, "sa|b", &strkey, &strkey_len, &constants, &case_sensitive) == FAILURE) { ++ return; ++ } ++ ++ if(!strkey_len) RETURN_FALSE; ++ ++ _apc_define_constants(constants, case_sensitive TSRMLS_CC); ++ if(_apc_store(strkey, strkey_len + 1, constants, 0, 0 TSRMLS_CC)) RETURN_TRUE; ++ RETURN_FALSE; ++} /* }}} */ ++ ++/* {{{ proto mixed apc_load_constants(string key [, bool case_sensitive]) ++ */ ++PHP_FUNCTION(apc_load_constants) { ++ char *strkey; ++ int strkey_len; ++ apc_cache_entry_t* entry; ++ time_t t; ++ zend_bool case_sensitive = 1; ++ ++ if(!APCG(enabled)) RETURN_FALSE; ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &strkey, &strkey_len, &case_sensitive) == FAILURE) { ++ return; ++ } ++ ++ if(!strkey_len) RETURN_FALSE; ++ ++ t = apc_time(); ++ ++ entry = apc_cache_user_find(apc_user_cache, strkey, (strkey_len + 1), t TSRMLS_CC); ++ ++ if(entry) { ++ _apc_define_constants(entry->data.user.val, case_sensitive TSRMLS_CC); ++ apc_cache_release(apc_user_cache, entry TSRMLS_CC); ++ RETURN_TRUE; ++ } else { ++ RETURN_FALSE; ++ } ++} ++/* }}} */ ++ ++/* {{{ proto mixed apc_compile_file(mixed filenames [, bool atomic]) ++ */ ++PHP_FUNCTION(apc_compile_file) { ++ zval *file; ++ zend_file_handle file_handle; ++ zend_op_array *op_array; ++ char** filters = NULL; ++ zend_bool cache_by_default = 1; ++ HashTable cg_function_table, cg_class_table; ++ HashTable *cg_orig_function_table, *cg_orig_class_table, *eg_orig_function_table, *eg_orig_class_table; ++ apc_cache_entry_t** cache_entries; ++ apc_cache_key_t* keys; ++ zend_op_array **op_arrays; ++ time_t t; ++ zval **hentry; ++ HashPosition hpos; ++ int i=0, c=0; ++ int *rval=NULL; ++ int count=0; ++ zend_bool atomic=1; ++ apc_context_t ctxt = {0,}; ++ zend_execute_data *orig_current_execute_data; ++ int atomic_fail; ++ ++ if(!APCG(enabled)) RETURN_FALSE; ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &file, &atomic) == FAILURE) { ++ return; ++ } ++ ++ if (Z_TYPE_P(file) != IS_ARRAY && Z_TYPE_P(file) != IS_STRING) { ++ apc_warning("apc_compile_file argument must be a string or an array of strings" TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ++ HANDLE_BLOCK_INTERRUPTIONS(); ++ APCG(current_cache) = apc_cache; ++ ++ /* reset filters and cache_by_default */ ++ filters = APCG(filters); ++ APCG(filters) = NULL; ++ ++ cache_by_default = APCG(cache_by_default); ++ APCG(cache_by_default) = 1; ++ ++ /* Replace function/class tables to avoid namespace conflicts */ ++ zend_hash_init_ex(&cg_function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0); ++ cg_orig_function_table = CG(function_table); ++ CG(function_table) = &cg_function_table; ++ zend_hash_init_ex(&cg_class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0); ++ cg_orig_class_table = CG(class_table); ++ CG(class_table) = &cg_class_table; ++ eg_orig_function_table = EG(function_table); ++ EG(function_table) = CG(function_table); ++ eg_orig_class_table = EG(class_table); ++ EG(class_table) = CG(class_table); ++ APCG(force_file_update) = 1; ++ ++ /* Compile the file(s), loading it into the cache */ ++ if (Z_TYPE_P(file) == IS_STRING) { ++ file_handle.type = ZEND_HANDLE_FILENAME; ++ file_handle.filename = Z_STRVAL_P(file); ++ file_handle.free_filename = 0; ++ file_handle.opened_path = NULL; ++ ++ orig_current_execute_data = EG(current_execute_data); ++ zend_try { ++ op_array = zend_compile_file(&file_handle, ZEND_INCLUDE TSRMLS_CC); ++ } zend_catch { ++ EG(current_execute_data) = orig_current_execute_data; ++ EG(in_execution) = 1; ++ CG(unclean_shutdown) = 0; ++ apc_warning("Error compiling %s in apc_compile_file." TSRMLS_CC, file_handle.filename); ++ op_array = NULL; ++ } zend_end_try(); ++ if(op_array != NULL) { ++ /* Free up everything */ ++ destroy_op_array(op_array TSRMLS_CC); ++ efree(op_array); ++ RETVAL_TRUE; ++ } else { ++ RETVAL_FALSE; ++ } ++ zend_destroy_file_handle(&file_handle TSRMLS_CC); ++ ++ } else { /* IS_ARRAY */ ++ ++ array_init(return_value); ++ ++ t = apc_time(); ++ ++ op_arrays = ecalloc(Z_ARRVAL_P(file)->nNumOfElements, sizeof(zend_op_array*)); ++ cache_entries = ecalloc(Z_ARRVAL_P(file)->nNumOfElements, sizeof(apc_cache_entry_t*)); ++ keys = ecalloc(Z_ARRVAL_P(file)->nNumOfElements, sizeof(apc_cache_key_t)); ++ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(file), &hpos); ++ while(zend_hash_get_current_data_ex(Z_ARRVAL_P(file), (void**)&hentry, &hpos) == SUCCESS) { ++ if (Z_TYPE_PP(hentry) != IS_STRING) { ++ apc_warning("apc_compile_file array values must be strings, aborting." TSRMLS_CC); ++ break; ++ } ++ file_handle.type = ZEND_HANDLE_FILENAME; ++ file_handle.filename = Z_STRVAL_PP(hentry); ++ file_handle.free_filename = 0; ++ file_handle.opened_path = NULL; ++ ++ if (!apc_cache_make_file_key(&(keys[i]), file_handle.filename, PG(include_path), t TSRMLS_CC)) { ++ add_assoc_long(return_value, Z_STRVAL_PP(hentry), -1); /* -1: compilation error */ ++ apc_warning("Error compiling %s in apc_compile_file." TSRMLS_CC, file_handle.filename); ++ break; ++ } ++ ++ if (keys[i].type == APC_CACHE_KEY_FPFILE) { ++ keys[i].data.fpfile.fullpath = estrndup(keys[i].data.fpfile.fullpath, keys[i].data.fpfile.fullpath_len); ++ } else if (keys[i].type == APC_CACHE_KEY_USER) { ++ keys[i].data.user.identifier = estrndup(keys[i].data.user.identifier, keys[i].data.user.identifier_len); ++ } ++ ++ orig_current_execute_data = EG(current_execute_data); ++ zend_try { ++ if (apc_compile_cache_entry(keys[i], &file_handle, ZEND_INCLUDE, t, &op_arrays[i], &cache_entries[i] TSRMLS_CC) != SUCCESS) { ++ op_arrays[i] = NULL; ++ cache_entries[i] = NULL; ++ add_assoc_long(return_value, Z_STRVAL_PP(hentry), -2); /* -2: input or cache insertion error */ ++ apc_warning("Error compiling %s in apc_compile_file." TSRMLS_CC, file_handle.filename); ++ } ++ } zend_catch { ++ EG(current_execute_data) = orig_current_execute_data; ++ EG(in_execution) = 1; ++ CG(unclean_shutdown) = 0; ++ op_arrays[i] = NULL; ++ cache_entries[i] = NULL; ++ add_assoc_long(return_value, Z_STRVAL_PP(hentry), -1); /* -1: compilation error */ ++ apc_warning("Error compiling %s in apc_compile_file." TSRMLS_CC, file_handle.filename); ++ } zend_end_try(); ++ ++ zend_destroy_file_handle(&file_handle TSRMLS_CC); ++ if(op_arrays[i] != NULL) { ++ count++; ++ } ++ ++ /* clean out the function/class tables */ ++ zend_hash_clean(&cg_function_table); ++ zend_hash_clean(&cg_class_table); ++ ++ zend_hash_move_forward_ex(Z_ARRVAL_P(file), &hpos); ++ i++; ++ } ++ ++ /* atomically update the cache if no errors or not atomic */ ++ ctxt.copy = APC_COPY_IN_OPCODE; ++ ctxt.force_update = 1; ++ if (count == i || !atomic) { ++ rval = apc_cache_insert_mult(apc_cache, keys, cache_entries, &ctxt, t, i TSRMLS_CC); ++ atomic_fail = 0; ++ } else { ++ atomic_fail = 1; ++ } ++ ++ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(file), &hpos); ++ for(c=0; c < i; c++) { ++ zend_hash_get_current_data_ex(Z_ARRVAL_P(file), (void**)&hentry, &hpos); ++ if (rval && rval[c] != 1) { ++ add_assoc_long(return_value, Z_STRVAL_PP(hentry), -2); /* -2: input or cache insertion error */ ++ if (cache_entries[c]) { ++ apc_pool_destroy(cache_entries[c]->pool TSRMLS_CC); ++ } ++ } ++ if (op_arrays[c]) { ++ destroy_op_array(op_arrays[c] TSRMLS_CC); ++ efree(op_arrays[c]); ++ } ++ if (atomic_fail && cache_entries[c]) { ++ apc_pool_destroy(cache_entries[c]->pool TSRMLS_CC); ++ } ++ if (keys[c].type == APC_CACHE_KEY_FPFILE) { ++ efree((void*)keys[c].data.fpfile.fullpath); ++ } else if (keys[c].type == APC_CACHE_KEY_USER) { ++ efree((void*)keys[c].data.user.identifier); ++ } ++ zend_hash_move_forward_ex(Z_ARRVAL_P(file), &hpos); ++ } ++ efree(op_arrays); ++ efree(keys); ++ efree(cache_entries); ++ if (rval) { ++ efree(rval); ++ } ++ ++ } ++ ++ /* Return class/function tables to previous states, destroy temp tables */ ++ APCG(force_file_update) = 0; ++ CG(function_table) = cg_orig_function_table; ++ zend_hash_destroy(&cg_function_table); ++ CG(class_table) = cg_orig_class_table; ++ zend_hash_destroy(&cg_class_table); ++ EG(function_table) = eg_orig_function_table; ++ EG(class_table) = eg_orig_class_table; ++ ++ /* Restore global settings */ ++ APCG(filters) = filters; ++ APCG(cache_by_default) = cache_by_default; ++ ++ APCG(current_cache) = NULL; ++ HANDLE_UNBLOCK_INTERRUPTIONS(); ++ ++} ++/* }}} */ ++ ++/* {{{ proto mixed apc_bin_dump([array files [, array user_vars]]) ++ Returns a binary dump of the given files and user variables from the APC cache. ++ A NULL for files or user_vars signals a dump of every entry, while array() will dump nothing. ++ */ ++PHP_FUNCTION(apc_bin_dump) { ++ ++ zval *z_files = NULL, *z_user_vars = NULL; ++ HashTable *h_files, *h_user_vars; ++ apc_bd_t *bd; ++ ++ if(!APCG(enabled)) { ++ apc_warning("APC is not enabled, apc_bin_dump not available." TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|a!a!", &z_files, &z_user_vars) == FAILURE) { ++ return; ++ } ++ ++ h_files = z_files ? Z_ARRVAL_P(z_files) : NULL; ++ h_user_vars = z_user_vars ? Z_ARRVAL_P(z_user_vars) : NULL; ++ bd = apc_bin_dump(h_files, h_user_vars TSRMLS_CC); ++ if(bd) { ++ RETVAL_STRINGL((char*)bd, bd->size-1, 0); ++ } else { ++ apc_error("Unknown error encountered during apc_bin_dump." TSRMLS_CC); ++ RETVAL_NULL(); ++ } ++ ++ return; ++} ++ ++/* {{{ proto mixed apc_bin_dumpfile(array files, array user_vars, string filename, [int flags [, resource context]]) ++ Output a binary dump of the given files and user variables from the APC cache to the named file. ++ */ ++PHP_FUNCTION(apc_bin_dumpfile) { ++ ++ zval *z_files = NULL, *z_user_vars = NULL; ++ HashTable *h_files, *h_user_vars; ++ char *filename = NULL; ++ int filename_len; ++ long flags=0; ++ zval *zcontext = NULL; ++ php_stream_context *context = NULL; ++ php_stream *stream; ++ int numbytes = 0; ++ apc_bd_t *bd; ++ ++ if(!APCG(enabled)) { ++ apc_warning("APC is not enabled, apc_bin_dumpfile not available." TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a!a!s|lr!", &z_files, &z_user_vars, &filename, &filename_len, &flags, &zcontext) == FAILURE) { ++ return; ++ } ++ ++ if(!filename_len) { ++ apc_error("apc_bin_dumpfile filename argument must be a valid filename." TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ++ h_files = z_files ? Z_ARRVAL_P(z_files) : NULL; ++ h_user_vars = z_user_vars ? Z_ARRVAL_P(z_user_vars) : NULL; ++ bd = apc_bin_dump(h_files, h_user_vars TSRMLS_CC); ++ if(!bd) { ++ apc_error("Unknown error encountered during apc_bin_dumpfile." TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ++ ++ /* Most of the following has been taken from the file_get/put_contents functions */ ++ ++ context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); ++ stream = php_stream_open_wrapper_ex(filename, (flags & PHP_FILE_APPEND) ? "ab" : "wb", ++ ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context); ++ if (stream == NULL) { ++ efree(bd); ++ apc_error("Unable to write to file in apc_bin_dumpfile." TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ++ if (flags & LOCK_EX && php_stream_lock(stream, LOCK_EX)) { ++ php_stream_close(stream); ++ efree(bd); ++ apc_error("Unable to get a lock on file in apc_bin_dumpfile." TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ++ numbytes = php_stream_write(stream, (char*)bd, bd->size); ++ if(numbytes != bd->size) { ++ numbytes = -1; ++ } ++ ++ php_stream_close(stream); ++ efree(bd); ++ ++ if(numbytes < 0) { ++ apc_error("Only %d of %d bytes written, possibly out of free disk space" TSRMLS_CC, numbytes, bd->size); ++ RETURN_FALSE; ++ } ++ ++ RETURN_LONG(numbytes); ++} ++ ++/* {{{ proto mixed apc_bin_load(string data, [int flags]) ++ Load the given binary dump into the APC file/user cache. ++ */ ++PHP_FUNCTION(apc_bin_load) { ++ ++ int data_len; ++ char *data; ++ long flags = 0; ++ ++ if(!APCG(enabled)) { ++ apc_warning("APC is not enabled, apc_bin_load not available." TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &data, &data_len, &flags) == FAILURE) { ++ return; ++ } ++ ++ if(!data_len || data_len != ((apc_bd_t*)data)->size -1) { ++ apc_error("apc_bin_load string argument does not appear to be a valid APC binary dump due to size (%d vs expected %d)." TSRMLS_CC, data_len, ((apc_bd_t*)data)->size -1); ++ RETURN_FALSE; ++ } ++ ++ apc_bin_load((apc_bd_t*)data, (int)flags TSRMLS_CC); ++ ++ RETURN_TRUE; ++} ++ ++/* {{{ proto mixed apc_bin_loadfile(string filename, [resource context, [int flags]]) ++ Load the given binary dump from the named file into the APC file/user cache. ++ */ ++PHP_FUNCTION(apc_bin_loadfile) { ++ ++ char *filename; ++ int filename_len; ++ zval *zcontext = NULL; ++ long flags; ++ php_stream_context *context = NULL; ++ php_stream *stream; ++ char *data; ++ int len; ++ ++ if(!APCG(enabled)) { ++ apc_warning("APC is not enabled, apc_bin_loadfile not available." TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ++ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|r!l", &filename, &filename_len, &zcontext, &flags) == FAILURE) { ++ return; ++ } ++ ++ if(!filename_len) { ++ apc_error("apc_bin_loadfile filename argument must be a valid filename." TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ++ context = php_stream_context_from_zval(zcontext, 0); ++ stream = php_stream_open_wrapper_ex(filename, "rb", ++ ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context); ++ if (!stream) { ++ apc_error("Unable to read from file in apc_bin_loadfile." TSRMLS_CC); ++ RETURN_FALSE; ++ } ++ ++ len = php_stream_copy_to_mem(stream, &data, PHP_STREAM_COPY_ALL, 0); ++ if(len == 0) { ++ apc_warning("File passed to apc_bin_loadfile was empty: %s." TSRMLS_CC, filename); ++ RETURN_FALSE; ++ } else if(len < 0) { ++ apc_warning("Error reading file passed to apc_bin_loadfile: %s." TSRMLS_CC, filename); ++ RETURN_FALSE; ++ } else if(len != ((apc_bd_t*)data)->size) { ++ apc_warning("file passed to apc_bin_loadfile does not appear to be valid due to size (%d vs expected %d)." TSRMLS_CC, len, ((apc_bd_t*)data)->size -1); ++ RETURN_FALSE; ++ } ++ php_stream_close(stream); ++ ++ apc_bin_load((apc_bd_t*)data, (int)flags TSRMLS_CC); ++ efree(data); ++ ++ RETURN_TRUE; ++} ++/* }}} */ ++ ++/* {{{ arginfo */ ++#if (PHP_MAJOR_VERSION >= 6 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3)) ++# define PHP_APC_ARGINFO ++#else ++# define PHP_APC_ARGINFO static ++#endif ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_store, 0, 0, 2) ++ ZEND_ARG_INFO(0, key) ++ ZEND_ARG_INFO(0, var) ++ ZEND_ARG_INFO(0, ttl) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_clear_cache, 0, 0, 0) ++ ZEND_ARG_INFO(0, info) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_sma_info, 0, 0, 0) ++ ZEND_ARG_INFO(0, limited) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_cache_info, 0, 0, 0) ++ ZEND_ARG_INFO(0, type) ++ ZEND_ARG_INFO(0, limited) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_define_constants, 0, 0, 2) ++ ZEND_ARG_INFO(0, key) ++ ZEND_ARG_INFO(0, constants) ++ ZEND_ARG_INFO(0, case_sensitive) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO(arginfo_apc_delete_file, 0) ++ ZEND_ARG_INFO(0, keys) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO(arginfo_apc_delete, 0) ++ ZEND_ARG_INFO(0, keys) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_fetch, 0, 0, 1) ++ ZEND_ARG_INFO(0, key) ++ ZEND_ARG_INFO(1, success) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_inc, 0, 0, 1) ++ ZEND_ARG_INFO(0, key) ++ ZEND_ARG_INFO(0, step) ++ ZEND_ARG_INFO(1, success) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO(arginfo_apc_cas, 0) ++ ZEND_ARG_INFO(0, key) ++ ZEND_ARG_INFO(0, old) ++ ZEND_ARG_INFO(0, new) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_load_constants, 0, 0, 1) ++ ZEND_ARG_INFO(0, key) ++ ZEND_ARG_INFO(0, case_sensitive) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_compile_file, 0, 0, 1) ++ ZEND_ARG_INFO(0, filenames) ++ ZEND_ARG_INFO(0, atomic) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_bin_dump, 0, 0, 0) ++ ZEND_ARG_INFO(0, files) ++ ZEND_ARG_INFO(0, user_vars) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_bin_dumpfile, 0, 0, 3) ++ ZEND_ARG_INFO(0, files) ++ ZEND_ARG_INFO(0, user_vars) ++ ZEND_ARG_INFO(0, filename) ++ ZEND_ARG_INFO(0, flags) ++ ZEND_ARG_INFO(0, context) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_bin_load, 0, 0, 1) ++ ZEND_ARG_INFO(0, data) ++ ZEND_ARG_INFO(0, flags) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO_EX(arginfo_apc_bin_loadfile, 0, 0, 1) ++ ZEND_ARG_INFO(0, filename) ++ ZEND_ARG_INFO(0, context) ++ ZEND_ARG_INFO(0, flags) ++ZEND_END_ARG_INFO() ++ ++PHP_APC_ARGINFO ++ZEND_BEGIN_ARG_INFO(arginfo_apc_exists, 0) ++ ZEND_ARG_INFO(0, keys) ++ZEND_END_ARG_INFO() ++/* }}} */ ++ ++/* {{{ apc_functions[] */ ++zend_function_entry apc_functions[] = { ++ PHP_FE(apc_cache_info, arginfo_apc_cache_info) ++ PHP_FE(apc_clear_cache, arginfo_apc_clear_cache) ++ PHP_FE(apc_sma_info, arginfo_apc_sma_info) ++ PHP_FE(apc_store, arginfo_apc_store) ++ PHP_FE(apc_fetch, arginfo_apc_fetch) ++ PHP_FE(apc_delete, arginfo_apc_delete) ++ PHP_FE(apc_delete_file, arginfo_apc_delete_file) ++ PHP_FE(apc_define_constants, arginfo_apc_define_constants) ++ PHP_FE(apc_load_constants, arginfo_apc_load_constants) ++ PHP_FE(apc_compile_file, arginfo_apc_compile_file) ++ PHP_FE(apc_add, arginfo_apc_store) ++ PHP_FE(apc_inc, arginfo_apc_inc) ++ PHP_FE(apc_dec, arginfo_apc_inc) ++ PHP_FE(apc_cas, arginfo_apc_cas) ++ PHP_FE(apc_bin_dump, arginfo_apc_bin_dump) ++ PHP_FE(apc_bin_load, arginfo_apc_bin_load) ++ PHP_FE(apc_bin_dumpfile, arginfo_apc_bin_dumpfile) ++ PHP_FE(apc_bin_loadfile, arginfo_apc_bin_loadfile) ++ PHP_FE(apc_exists, arginfo_apc_exists) ++ {NULL, NULL, NULL} ++}; ++/* }}} */ ++ ++/* {{{ module definition structure */ ++ ++zend_module_entry apc_module_entry = { ++ STANDARD_MODULE_HEADER, ++ "apc", ++ apc_functions, ++ PHP_MINIT(apc), ++ PHP_MSHUTDOWN(apc), ++ PHP_RINIT(apc), ++ PHP_RSHUTDOWN(apc), ++ PHP_MINFO(apc), ++ PHP_APC_VERSION, ++ STANDARD_MODULE_PROPERTIES ++}; ++ ++#ifdef COMPILE_DL_APC ++ZEND_GET_MODULE(apc) ++#endif ++/* }}} */ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/php_apc.h +@@ -0,0 +1,54 @@ ++/* ++ +----------------------------------------------------------------------+ ++ | APC | ++ +----------------------------------------------------------------------+ ++ | Copyright (c) 2006-2010 The PHP Group | ++ +----------------------------------------------------------------------+ ++ | This source file is subject to version 3.01 of the PHP license, | ++ | that is bundled with this package in the file LICENSE, and is | ++ | available through the world-wide-web at the following url: | ++ | http://www.php.net/license/3_01.txt | ++ | If you did not receive a copy of the PHP license and are unable to | ++ | obtain it through the world-wide-web, please send a note to | ++ | license@php.net so we can mail you a copy immediately. | ++ +----------------------------------------------------------------------+ ++ | Authors: Daniel Cowgill | ++ | George Schlossnagle | ++ | Rasmus Lerdorf | ++ +----------------------------------------------------------------------+ ++ ++ This software was contributed to PHP by Community Connect Inc. in 2002 ++ and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. ++ Future revisions and derivatives of this source code must acknowledge ++ Community Connect Inc. as the original contributor of this module by ++ leaving this note intact in the source code. ++ ++ All other licensing and usage conditions are those of the PHP Group. ++ ++ */ ++ ++/* $Id: php_apc.h 305846 2010-11-30 09:36:57Z gopalv $ */ ++ ++#ifndef PHP_APC_H ++#define PHP_APC_H ++ ++#include "apc_php.h" ++#include "apc_globals.h" ++ ++#define PHP_APC_VERSION "3.1.6" ++ ++extern zend_module_entry apc_module_entry; ++#define apc_module_ptr &apc_module_entry ++ ++#define phpext_apc_ptr apc_module_ptr ++ ++#endif /* PHP_APC_H */ ++ ++/* ++ * Local variables: ++ * tab-width: 4 ++ * c-basic-offset: 4 ++ * End: ++ * vim>600: expandtab sw=4 ts=4 sts=4 fdm=marker ++ * vim<600: expandtab sw=4 ts=4 sts=4 ++ */ +--- /dev/null ++++ b/ext/apc/TECHNOTES.txt +@@ -0,0 +1,361 @@ ++APC Quick-Start Braindump ++ ++This is a rapidly written braindump of how APC currently works in the ++form of a quick-start guide to start hacking on APC. ++ ++1. Install and use APC a bit so you know what it does from the end-user's ++ perspective. ++ user-space functions are all explained here: ++ ++2. Grab the current APC code from CVS: ++ ++ cvs -d:pserver:cvsread@cvs.php.net:/repository login ++ Password: phpfi ++ cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/apc ++ ++ apc/php_apc.c has most of the code for the user-visible stuff. It is ++ also a regular PHP extension in the sense that there are MINIT, MINFO, ++ MSHUTDOWN, RSHUTDOWN, etc. functions. ++ ++3. Build it. ++ ++ cd pecl/apc ++ phpize ++ ./configure --enable-apc --enable-mmap ++ make ++ cp modules/apc.so /usr/local/lib/php ++ apachectl restart ++ ++4. Debugging Hints ++ ++ apachectl stop ++ gdb /usr/bin/httpd ++ break ?? ++ run -X ++ ++ Grab the .gdbinit from the PHP source tree and have a look at the macros. ++ ++5. Look through apc/apc_sma.c ++ It is a pretty standard memory allocator. ++ ++ apc_sma_malloc, apc_sma_realloc, apc_sma_strdup and apc_sma_free behave to the ++ caller just like malloc, realloc, strdup and free ++ ++ On server startup the MINIT hook in php_apc.c calls apc_module_init() in ++ apc_main.c which in turn calls apc_sma_init(). apc_sma_init calls into ++ apc_mmap.c to mmap the specified sized segment (I tend to just use a single ++ segment). apc_mmap.c should be self-explanatory. It mmaps a temp file and ++ then unlinks that file right after the mmap to provide automatic shared memory ++ cleanup in case the process dies. ++ ++ Once the region has been initialized we stick a header_t at the beginning ++ of the region. It contains the total size in header->segsize and the number ++ of bytes available in header->avail. ++ ++ After the header comes a bit of a hack. A zero-sized block is inserted just ++ to make things easier later on. And then a huge block that is basically ++ the size of the entire segment minus the two (for the 0-sized block, and this one) ++ block headers. ++ ++ The code for this is: ++ ++ header = (header_t*) shmaddr; ++ header->segsize = sma_segsize; ++ header->avail = sma_segsize - sizeof(header_t) - sizeof(block_t) - alignword(sizeof(int)); ++ memset(&header->lock,0,sizeof(header->lock)); ++ sma_lock = &header->lock; ++ block = BLOCKAT(sizeof(header_t)); ++ block->size = 0; ++ block->next = sizeof(header_t) + sizeof(block_t); ++ block = BLOCKAT(block->next); ++ block->size = header->avail; ++ block->next = 0; ++ ++ So the shared memory looks like this: ++ ++ +--------+-------+---------------------------------+ ++ | header | block | block | ++ +--------+-------+---------------------------------+ ++ ++ sma_shmaddrs[0] gives you the address of header ++ ++ The blocks are just a simple offset-based linked list (so no pointers): ++ ++ typedef struct block_t block_t; ++ struct block_t { ++ size_t size; /* size of this block */ ++ size_t next; /* offset in segment of next free block */ ++ size_t canary; /* canary to check for memory overwrites */ ++#ifdef __APC_SMA_DEBUG__ ++ int id; /* identifier for the memory block */ ++#endif ++ }; ++ ++ The BLOCKAT macro turns an offset into an actual address for you: ++ ++ #define BLOCKAT(offset) ((block_t*)((char *)shmaddr + offset)) ++ ++ where shmaddr = sma_shaddrs[0] ++ ++ And the OFFSET macro goes the other way: ++ ++ #define OFFSET(block) ((int)(((char*)block) - (char*)shmaddr)) ++ ++ Allocating a block with a call to apc_sma_allocate() walks through the ++ linked list of blocks until it finds one that is >= to the requested size. ++ The first call to apc_sma_allocate() will hit the second block. We then ++ chop up that block so it looks like this: ++ ++ +--------+-------+-------+-------------------------+ ++ | header | block | block | block | ++ +--------+-------+-------+-------------------------+ ++ ++ Then we unlink that block from the linked list so it won't show up ++ as an available block on the next allocate. So we actually have: ++ ++ +--------+-------+ +-------------------------+ ++ | header | block |------>| block | ++ +--------+-------+ +-------------------------+ ++ ++ And header->avail along with block->size of the remaining large ++ block are updated accordingly. The arrow there representing the ++ link which now points to a block with an offset further along in ++ the segment. ++ ++ When the block is freed using apc_sma_deallocate() the steps are ++ basically just reversed. The block is put back and then the deallocate ++ code looks at the block before and after to see if the block immediately ++ before and after are free and if so the blocks are combined. So you never ++ have 2 free blocks next to each other, apart from at the front with that ++ 0-sized dummy block. This mostly prevents fragmentation. I have been ++ toying with the idea of always allocating block at 2^n boundaries to make ++ it more likely that they will be re-used to cut down on fragmentation further. ++ That's what the POWER_OF_TWO_BLOCKSIZE you see in apc_sma.c is all about. ++ ++ Of course, anytime we fiddle with our shared memory segment we lock using ++ the locking macros, LOCK() and UNLOCK(). ++ ++ That should mostly take care of the low-level shared memory handling. ++ ++6. Next up is apc_main.c and apc_cache.c which implement the meat of the ++ cache logic. ++ ++ The apc_main.c file mostly calls functions in apc_sma.c to allocate memory ++ and apc_cache.c for actual cache manipulation. ++ ++ After the shared memory segment is created and the caches are initialized, ++ apc_module_init() installs the my_compile_file() function overriding Zend's ++ version. I'll talk about my_compile_file() and the rest of apc_compile.c ++ in the next section. For now I will stick with apc_main.c and apc_cache.c ++ and talk about the actual caches. A cache consists of a block of shared ++ memory returned by apc_sma_allocate() via apc_sma_malloc(). You will ++ notice references to apc_emalloc(). apc_emalloc() is just a thin wrapper ++ around PHP's own emalloc() function which allocates per-process memory from ++ PHP's pool-based memory allocator. Don't confuse apc_emalloc() and ++ apc_sma_malloc() as the first is per-process and the second is shared memory. ++ ++ The cache is stored in/described by this struct allocated locally using ++ emalloc(): ++ ++ struct apc_cache_t { ++ void* shmaddr; /* process (local) address of shared cache */ ++ header_t* header; /* cache header (stored in SHM) */ ++ slot_t** slots; /* array of cache slots (stored in SHM) */ ++ int num_slots; /* number of slots in cache */ ++ int gc_ttl; /* maximum time on GC list for a slot */ ++ int ttl; /* if slot is needed and entry's access time is older than this ttl, remove it */ ++ }; ++ ++ Whenever you see functions that take a 'cache' argument, this is what they ++ take. And apc_cache_create() returns a pointer to this populated struct. ++ ++ At the beginning of the cache we have a header. Remember, we are down a level now ++ from the sma stuff. The sma stuff is the low-level shared-memory allocator which ++ has its own header which is completely separate and invisible to apc_cache.c. ++ As far as apc_cache.c is concerned the block of memory it is working with could ++ have come from a call to malloc(). ++ ++ The header looks like this: ++ ++ typedef struct header_t header_t; ++ struct header_t { ++ int num_hits; /* total successful hits in cache */ ++ int num_misses; /* total unsuccessful hits in cache */ ++ slot_t* deleted_list; /* linked list of to-be-deleted slots */ ++ }; ++ ++ Since this is at the start of the shared memory segment, these values are accessible ++ across all the yapache processes and hence access to them has to be locked. ++ ++ After the header we have an array of slots. The number of slots is user-defined ++ through the apc.num_slots ini hint. Each slot is described by: ++ ++ typedef struct slot_t slot_t; ++ struct slot_t { ++ apc_cache_key_t key; /* slot key */ ++ apc_cache_entry_t* value; /* slot value */ ++ slot_t* next; /* next slot in linked list */ ++ int num_hits; /* number of hits to this bucket */ ++ time_t creation_time; /* time slot was initialized */ ++ time_t deletion_time; /* time slot was removed from cache */ ++ time_t access_time; /* time slot was last accessed */ ++ }; ++ ++ The slot_t *next there is a linked list to other slots that happened to hash to the ++ same array position. ++ ++ apc_cache_insert() shows what happens on a new cache insert. ++ ++ slot = &cache->slots[hash(key) % cache->num_slots]; ++ ++ cache->slots is our array of slots in the segment. hash() is simply: ++ ++ static unsigned int hash(apc_cache_key_t key) ++ { ++ return key.data.file.device + key.data.file.inode; ++ } ++ ++ That is, we use the file's device and inode to uniquely identify it. Initially ++ we had used the file's full path, but getting that requires a realpath() call which ++ is amazingly expensive since it has to stat each component of the path to resolve ++ symlinks and get rid of relative path components. By using the device+inode we ++ can uniquely identify a file with a single stat. ++ ++ So, on an insert we find the array position in the slots array by hashing the device+inode. ++ If there are currently no other slots there, we just create the slot and stick it into ++ the array: ++ ++ *slot = make_slot(key, value, *slot, t) ++ ++ If there are other slots already at this position we walk the link list to get to ++ the end. Here is the loop: ++ ++ while (*slot) { ++ if (key_equals((*slot)->key.data.file, key.data.file)) { ++ /* If existing slot for the same device+inode is different, remove it and insert the new version */ ++ if ((*slot)->key.mtime != key.mtime) { ++ remove_slot(cache, slot); ++ break; ++ } ++ UNLOCK(cache); ++ return 0; ++ } else if(cache->ttl && (*slot)->access_time < (t - cache->ttl)) { ++ remove_slot(cache, slot); ++ continue; ++ } ++ slot = &(*slot)->next; ++ } ++ ++ That first key_equals() check sees if we have an exact match meaning the file ++ is already in the cache. Since we try to find the file in the cache before doing ++ an insert, this will generally only happen if another process managed to beat us ++ to inserting it. If we have a newer version of the file at this point we remove ++ it an insert the new version. If our version is not newer we just return without ++ doing anything. ++ ++ While walking the linked list we also check to see if the cache has a TTL defined. ++ If while walking the linked list we see a slot that has expired, we remove it ++ since we are right there looking at it. This is the only place we remove stale ++ entries unless the shared memory segment fills up and we force a full expunge via ++ apc_cache_expunge(). apc_cache_expunge() walks the entire slots array and walks ++ down every linked list removing stale slots to free up room. This is obviously ++ slow and thus only happens when we have run out of room. ++ ++ apc_cache_find() simply hashes and returns the entry if it is there. If it is there ++ but older than the mtime in the entry we are looking for, we delete the one that is ++ there and return indicating we didn't find it. ++ ++ Next we need to understand what an actual cache entry looks like. Have a look at ++ apc_cache.h for the structs. I sort of glossed over the key part earlier saying ++ that we just used the device+inode to find a hash slot. It is actually a bit more ++ complex than that because we have two kinds of caches. We have the standard file ++ cache containing opcode arrays, but we also have a user-controlled cache that the ++ user can insert whatever they want into via apc_store(). For the user cache we ++ obviously don't have a device+inode. The actual identifier is provided by the user ++ as a char *. So the key is actually a union that looks like this: ++ ++ typedef union _apc_cache_key_data_t { ++ struct { ++ int device; /* the filesystem device */ ++ int inode; /* the filesystem inode */ ++ } file; ++ struct { ++ char *identifier; ++ } user; ++ } apc_cache_key_data_t; ++ ++ struct apc_cache_key_t { ++ apc_cache_key_data_t data; ++ int mtime; /* the mtime of this cached entry */ ++ }; ++ ++ And we have two sets of functions to do inserts and finds. apc_cache_user_find() ++ and apc_cache_user_insert() operate on the user cache. ++ ++ Ok, on to the actual cache entry. Again, because we have two kinds of caches, we ++ also have the corresponding two kinds of cache entries described by this union: ++ ++ typedef union _apc_cache_entry_value_t { ++ struct { ++ char *filename; /* absolute path to source file */ ++ zend_op_array* op_array; /* op_array allocated in shared memory */ ++ apc_function_t* functions; /* array of apc_function_t's */ ++ apc_class_t* classes; /* array of apc_class_t's */ ++ } file; ++ struct { ++ char *info; ++ zval *val; ++ unsigned int ttl; ++ } user; ++ } apc_cache_entry_value_t; ++ ++ And then the actual cache entry: ++ ++ struct apc_cache_entry_t { ++ apc_cache_entry_value_t data; ++ unsigned char type; ++ int ref_count; ++ }; ++ ++ The user entry is pretty simple and not all that important for now. I will ++ concentrate on the file entries since that is what holds the actual compiled ++ opcode arrays along with the functions and classes required by the executor. ++ ++ apc_cache_make_file_entry() in apc_cache.c shows how an entry is constructed. ++ The main thing to understand here is that we need more than just the opcode ++ array, we also need the functions and classes created by the compiler when it ++ created the opcode array. As far as the executor is concerned, it doesn't know ++ that it isn't operating in normal mode being called right after the parse/compile ++ phase, so we need to recreate everything so it looks exactly like it would at ++ that point. ++ ++7. my_compile_file() and apc_compile.c ++ ++ my_compile_file() in apc_main.c controls where we get the opcodes from. If ++ the user-specified filters exclude the file from being cached, then we just ++ call the original compile function and return. Otherwise we fetch the request ++ time from Apache to avoid an extra syscall, create the key so we can look up ++ the file in the cache. If we find it we stick it on a local stack which we ++ use at cleanup time to make sure we return everything back to normal after a ++ request and call cached_compile() which installs the functions and classes ++ associated with the op_array in this entry and then copy the op_array down ++ into our memory space for execution. ++ ++ If we didn't find the file in the cache, we need to compile it and insert it. ++ To compile it we simply call the original compile function: ++ ++ op_array = old_compile_file(h, type TSRMLS_CC); ++ ++ To do the insert we need to copy the functions, classes and the opcode array ++ the compile phase created into shared memory. This all happens in apc_compile.c ++ in the apc_copy_op_array(), apc_copy_new_functions() and apc_copy_new_classes() ++ functions. Then we make the file entry and do the insert. Both of these ++ operations were described in the previous section. ++ ++8. The Optimizer ++ ++ The optimizer has been deprecated. ++ ++If you made it to the end of this, you should have a pretty good idea of where things are in ++the code. I skimmed over a lot of things, so plan on spending some time reading through the code. ++ +--- /dev/null ++++ b/ext/apc/tests/apc_001.phpt +@@ -0,0 +1,32 @@ ++--TEST-- ++APC: apc_store/fetch with strings ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++ ++===DONE=== ++ ++--EXPECTF-- ++string(11) "hello world" ++string(11) "hello world" ++string(4) "nice" ++string(11) "hello world" ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc_002.phpt +@@ -0,0 +1,34 @@ ++--TEST-- ++APC: apc_store/fetch with objects ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++a = true; ++var_dump($bar); ++ ++?> ++===DONE=== ++ ++--EXPECTF-- ++object(foo)#%d (0) { ++} ++object(foo)#%d (0) { ++} ++object(foo)#%d (1) { ++ ["a"]=> ++ bool(true) ++} ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc_003b.phpt +@@ -0,0 +1,117 @@ ++--TEST-- ++APC: apc_store/fetch with objects (php 5.3) ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++a = true; ++var_dump($bar); ++ ++class bar extends foo ++{ ++ public $pub = 'bar'; ++ protected $pro = 'bar'; ++ private $pri = 'bar'; // we don't see this, we'd need php 5.1 new serialization ++ ++ function __construct() ++ { ++ $this->bar = true; ++ } ++ ++ function change() ++ { ++ $this->pri = 'mod'; ++ } ++} ++ ++class baz extends bar ++{ ++ private $pri = 'baz'; ++ ++ function __construct() ++ { ++ parent::__construct(); ++ $this->baz = true; ++ } ++} ++ ++$baz = new baz; ++var_dump($baz); ++$baz->change(); ++var_dump($baz); ++apc_store('baz', $baz); ++unset($baz); ++var_dump(apc_fetch('baz')); ++ ++?> ++===DONE=== ++ ++--EXPECTF-- ++object(foo)#%d (0) { ++} ++object(foo)#%d (0) { ++} ++object(foo)#%d (1) { ++ ["a"]=> ++ bool(true) ++} ++object(baz)#%d (6) { ++ ["pri":"baz":private]=> ++ string(3) "baz" ++ ["pub"]=> ++ string(3) "bar" ++ ["pro":protected]=> ++ string(3) "bar" ++ ["pri":"bar":private]=> ++ string(3) "bar" ++ ["bar"]=> ++ bool(true) ++ ["baz"]=> ++ bool(true) ++} ++object(baz)#%d (6) { ++ ["pri":"baz":private]=> ++ string(3) "baz" ++ ["pub"]=> ++ string(3) "bar" ++ ["pro":protected]=> ++ string(3) "bar" ++ ["pri":"bar":private]=> ++ string(3) "mod" ++ ["bar"]=> ++ bool(true) ++ ["baz"]=> ++ bool(true) ++} ++object(baz)#%d (6) { ++ ["pri":"baz":private]=> ++ string(3) "baz" ++ ["pub"]=> ++ string(3) "bar" ++ ["pro":protected]=> ++ string(3) "bar" ++ ["pri":"bar":private]=> ++ string(3) "mod" ++ ["bar"]=> ++ bool(true) ++ ["baz"]=> ++ bool(true) ++} ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc_003.phpt +@@ -0,0 +1,117 @@ ++--TEST-- ++APC: apc_store/fetch with objects (php pre-5.3) ++--SKIPIF-- ++= 0) { ++ echo "skip\n"; ++ } ++?> ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++a = true; ++var_dump($bar); ++ ++class bar extends foo ++{ ++ public $pub = 'bar'; ++ protected $pro = 'bar'; ++ private $pri = 'bar'; // we don't see this, we'd need php 5.1 new serialization ++ ++ function __construct() ++ { ++ $this->bar = true; ++ } ++ ++ function change() ++ { ++ $this->pri = 'mod'; ++ } ++} ++ ++class baz extends bar ++{ ++ private $pri = 'baz'; ++ ++ function __construct() ++ { ++ parent::__construct(); ++ $this->baz = true; ++ } ++} ++ ++$baz = new baz; ++var_dump($baz); ++$baz->change(); ++var_dump($baz); ++apc_store('baz', $baz); ++unset($baz); ++var_dump(apc_fetch('baz')); ++ ++?> ++===DONE=== ++ ++--EXPECTF-- ++object(foo)#%d (0) { ++} ++object(foo)#%d (0) { ++} ++object(foo)#%d (1) { ++ ["a"]=> ++ bool(true) ++} ++object(baz)#%d (6) { ++ ["pri:private"]=> ++ string(3) "baz" ++ ["pub"]=> ++ string(3) "bar" ++ ["pro:protected"]=> ++ string(3) "bar" ++ ["pri:private"]=> ++ string(3) "bar" ++ ["bar"]=> ++ bool(true) ++ ["baz"]=> ++ bool(true) ++} ++object(baz)#%d (6) { ++ ["pri:private"]=> ++ string(3) "baz" ++ ["pub"]=> ++ string(3) "bar" ++ ["pro:protected"]=> ++ string(3) "bar" ++ ["pri:private"]=> ++ string(3) "mod" ++ ["bar"]=> ++ bool(true) ++ ["baz"]=> ++ bool(true) ++} ++object(baz)#%d (6) { ++ ["pri:private"]=> ++ string(3) "baz" ++ ["pub"]=> ++ string(3) "bar" ++ ["pro:protected"]=> ++ string(3) "bar" ++ ["pri:private"]=> ++ string(3) "mod" ++ ["bar"]=> ++ bool(true) ++ ["baz"]=> ++ bool(true) ++} ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc_004.phpt +@@ -0,0 +1,38 @@ ++--TEST-- ++APC: apc_store/fetch with bools ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++ ++===DONE=== ++ ++--EXPECTF-- ++bool(false) ++bool(false) ++bool(false) ++bool(true) ++bool(false) ++bool(false) ++bool(false) ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc_005.phpt +@@ -0,0 +1,50 @@ ++--TEST-- ++APC: apc_store/fetch with arrays of objects ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++ ++===DONE=== ++ ++--EXPECTF-- ++array(2) { ++ [0]=> ++ object(stdClass)#1 (0) { ++ } ++ [1]=> ++ object(stdClass)#2 (0) { ++ } ++} ++array(2) { ++ [0]=> ++ object(stdClass)#1 (0) { ++ } ++ [1]=> ++ object(stdClass)#2 (0) { ++ } ++} ++array(2) { ++ [0]=> ++ object(stdClass)#3 (0) { ++ } ++ [1]=> ++ object(stdClass)#4 (0) { ++ } ++} ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc_006.phpt +@@ -0,0 +1,72 @@ ++--TEST-- ++APC: apc_store/fetch reference test ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++report_memleaks=0 ++--FILE-- ++ ++===DONE=== ++ ++--EXPECTF-- ++array(9) refcount(2){ ++ [0]=> ++ string(1) "a" refcount(1) ++ [1]=> ++ &array(1) refcount(2){ ++ [0]=> ++ string(1) "c" refcount(1) ++ } ++ [2]=> ++ &array(1) refcount(2){ ++ [0]=> ++ string(1) "c" refcount(1) ++ } ++ [3]=> ++ &string(1) "d" refcount(3) ++ [4]=> ++ &string(1) "d" refcount(3) ++ [5]=> ++ &string(1) "d" refcount(3) ++ [6]=> ++ string(1) "e" refcount(2) ++ [7]=> ++ string(1) "e" refcount(2) ++ [8]=> ++ &array(2) refcount(2){ ++ [0]=> ++ string(1) "f" refcount(1) ++ [1]=> ++ &array(2) refcount(2){ ++ [0]=> ++ string(1) "f" refcount(1) ++ [1]=> ++ *RECURSION* ++ } ++ } ++} ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc_007.phpt +@@ -0,0 +1,46 @@ ++--TEST-- ++APC: apc_inc/apc_dec test ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++ ++===DONE=== ++ ++--EXPECTF-- ++$foobar = 2 ++$foobar += 1 = 3 ++$foobar += 10 = 13 ++$foobar -= 1 = 12 ++$foobar -= 10 = 2 ++$f__bar += 1 = fail ++$perfection -= 1 = epic fail ++$foobar += 1 = 3 ++pass by ref success 1 ++$foobar -= 1 = 2 ++pass by ref success 1 ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc_008.phpt +@@ -0,0 +1,34 @@ ++--TEST-- ++APC: apc_cas test ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++ ++===DONE=== ++ ++--EXPECTF-- ++$foobar = 2 ++$foobar == 1 ? 2 : 1 = fail ++$foobar == 2 ? 1 : 2 = ok ++$foobar = 1 ++$f__bar == 1 ? 2 : 1 = fail ++$perfection == 2 ? 1 : 2 = epic fail ++$foobar = 1 ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc_009.phpt +@@ -0,0 +1,97 @@ ++--TEST-- ++APC: apc_delete_file test ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++apc.stat=On ++report_memleaks=0 ++--FILE-- ++ ++===DONE=== ++ ++--CLEAN-- ++ ++--EXPECTF-- ++apc_009.php Found File ++apc_009.php Not Found ++apc_009.php Not Found ++apc_009.php Not Found ++array(0) { ++} ++apc_009.php Found File ++apc_009-1.php Found File ++ ++Parse error: syntax error, unexpected '!' in %s/apc_009-2.php on line 1 ++ ++Warning: apc_compile_file(): Error compiling apc_009-2.php in apc_compile_file. in %s/apc_009.php on line 29 ++ ++Warning: apc_compile_file(): Error compiling nofile.php in apc_compile_file. in %s/apc_009.php on line 29 ++array(2) { ++ ["apc_009-2.php"]=> ++ int(-1) ++ ["nofile.php"]=> ++ int(-1) ++} ++apc_009.php Found File ++apc_009-1.php Found File ++apc_009-2.php Not Found ++nofile.php Not Found ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc_010.phpt +@@ -0,0 +1,83 @@ ++--TEST-- ++APC: apc_store/fetch/add with array of key/value pairs. ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++ ++===DONE=== ++ ++--EXPECTF-- ++array(0) { ++} ++array(4) { ++ ["key1"]=> ++ string(6) "value1" ++ ["key2"]=> ++ string(6) "value2" ++ ["key3"]=> ++ array(2) { ++ [0]=> ++ string(7) "value3a" ++ [1]=> ++ string(7) "value3b" ++ } ++ ["key4"]=> ++ int(4) ++} ++array(2) { ++ ["key1"]=> ++ string(6) "value1" ++ ["key3"]=> ++ array(2) { ++ [0]=> ++ string(7) "value3a" ++ [1]=> ++ string(7) "value3b" ++ } ++} ++array(2) { ++ ["key1"]=> ++ int(-1) ++ ["key3"]=> ++ int(-1) ++} ++array(4) { ++ ["key1"]=> ++ string(6) "value1" ++ ["key2"]=> ++ string(6) "value2" ++ ["key3"]=> ++ array(2) { ++ [0]=> ++ string(7) "value3a" ++ [1]=> ++ string(7) "value3b" ++ } ++ ["key4"]=> ++ int(4) ++} ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc53_001.phpt +@@ -0,0 +1,33 @@ ++--TEST-- ++APC: classes with namespaces (php 5.3) ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++ ++===DONE=== ++ ++--EXPECTF-- ++object(Foo\Bar\Baz)#1 (3) { ++ ["i"]=> ++ int(1) ++ ["f":protected]=> ++ float(3.14) ++ ["s":"Foo\Bar\Baz":private]=> ++ string(11) "hello world" ++} ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc53_002.phpt +@@ -0,0 +1,47 @@ ++--TEST-- ++APC: global spaces (php 5.3) ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++foo(); ++var_dump(Foo\Bar\sort()); ++?> ++===DONE=== ++ ++--EXPECTF-- ++array(4) { ++ [0]=> ++ int(1) ++ [1]=> ++ int(2) ++ [2]=> ++ int(3) ++ [3]=> ++ int(4) ++} ++array(4) { ++ [0]=> ++ int(1) ++ [1]=> ++ int(2) ++ [2]=> ++ int(3) ++ [3]=> ++ int(4) ++} ++string(8) "IT WORKS" ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc53_003.phpt +@@ -0,0 +1,31 @@ ++--TEST-- ++APC: anonymous functions (php 5.3) ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++ ++===DONE=== ++ ++--EXPECTF-- ++Hello World ++Hello PHP ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc53_004.phpt +@@ -0,0 +1,33 @@ ++--TEST-- ++APC: closures (php 5.3) ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++ ++===DONE=== ++ ++--EXPECTF-- ++double of 9 is 18 ++triple of 4 is 12 ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc53_005.phpt +@@ -0,0 +1,35 @@ ++--TEST-- ++APC: goto (php 5.3) ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++ ++===DONE=== ++ ++--EXPECTF-- ++1 ++2 ++4 ++5 ++7 ++8 ++10 ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc_bin_001.phpt +@@ -0,0 +1,24 @@ ++--TEST-- ++APC: bindump user cache ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++--FILE-- ++ ++===DONE=== ++ ++--EXPECTF-- ++bool(false) ++string(9) "testvalue" ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/apc_bin_002-1.inc +@@ -0,0 +1,42 @@ ++my_method()."\n"; ++echo "class static property: ".my_class::$my_static_property."\n"; ++echo "class dynamic property: ".$my_class->my_property."\n"; ++echo "class constant: ".my_class::my_constant."\n"; ++echo "\n"; ++echo "inherited class static method: ".my_i_class::my_static_method()."\n"; ++echo "inherited class dynamic method: ".$my_i_class->my_method()."\n"; ++echo "inherited class static property: ".my_i_class::$my_static_property."\n"; ++echo "inherited class dynamic property: ".$my_i_class->my_property."\n"; ++echo "inherited class constant: ".my_i_class::my_constant."\n"; ++echo "\n"; ++ ++ ++ ++function my_function() { return "Success"; } ++ ++ ++class my_class { ++ static $my_static_property = "Success"; ++ var $my_property = "Success"; ++ const my_constant = "Success"; ++ static function my_static_method() { return "Success"; } ++ function my_method() { return "Success"; } ++} ++ ++class my_i_class extends my_class { ++ function dummy() { return 1; } ++} ++ +--- /dev/null ++++ b/ext/apc/tests/apc_bin_002-2.inc +@@ -0,0 +1,5 @@ ++ +--- /dev/null ++++ b/ext/apc/tests/apc_bin_002.phpt +@@ -0,0 +1,53 @@ ++--TEST-- ++APC: bindump file cache part 1 ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.stat=0 ++apc.cache_by_default=1 ++apc.filters= ++report_memleaks = Off ++--FILE-- ++ ++===DONE=== ++ ++--EXPECTF-- ++apc bindump 002 test ++ ++global scope execution: Success ++ ++function execution: Success ++ ++class static method: Success ++class dynamic method: Success ++class static property: Success ++class dynamic property: Success ++class constant: Success ++ ++inherited class static method: Success ++inherited class dynamic method: Success ++inherited class static property: Success ++inherited class dynamic property: Success ++inherited class constant: Success ++ ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/iterator_001.phpt +@@ -0,0 +1,110 @@ ++--TEST-- ++APC: APCIterator general ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++$value) { ++ $vals[$key] = $value['key']; ++} ++ksort($vals); ++var_dump($vals); ++ ++?> ++===DONE=== ++ ++--EXPECT-- ++array(41) { ++ ["key0"]=> ++ string(4) "key0" ++ ["key1"]=> ++ string(4) "key1" ++ ["key10"]=> ++ string(5) "key10" ++ ["key11"]=> ++ string(5) "key11" ++ ["key12"]=> ++ string(5) "key12" ++ ["key13"]=> ++ string(5) "key13" ++ ["key14"]=> ++ string(5) "key14" ++ ["key15"]=> ++ string(5) "key15" ++ ["key16"]=> ++ string(5) "key16" ++ ["key17"]=> ++ string(5) "key17" ++ ["key18"]=> ++ string(5) "key18" ++ ["key19"]=> ++ string(5) "key19" ++ ["key2"]=> ++ string(4) "key2" ++ ["key20"]=> ++ string(5) "key20" ++ ["key21"]=> ++ string(5) "key21" ++ ["key22"]=> ++ string(5) "key22" ++ ["key23"]=> ++ string(5) "key23" ++ ["key24"]=> ++ string(5) "key24" ++ ["key25"]=> ++ string(5) "key25" ++ ["key26"]=> ++ string(5) "key26" ++ ["key27"]=> ++ string(5) "key27" ++ ["key28"]=> ++ string(5) "key28" ++ ["key29"]=> ++ string(5) "key29" ++ ["key3"]=> ++ string(4) "key3" ++ ["key30"]=> ++ string(5) "key30" ++ ["key31"]=> ++ string(5) "key31" ++ ["key32"]=> ++ string(5) "key32" ++ ["key33"]=> ++ string(5) "key33" ++ ["key34"]=> ++ string(5) "key34" ++ ["key35"]=> ++ string(5) "key35" ++ ["key36"]=> ++ string(5) "key36" ++ ["key37"]=> ++ string(5) "key37" ++ ["key38"]=> ++ string(5) "key38" ++ ["key39"]=> ++ string(5) "key39" ++ ["key4"]=> ++ string(4) "key4" ++ ["key40"]=> ++ string(5) "key40" ++ ["key5"]=> ++ string(4) "key5" ++ ["key6"]=> ++ string(4) "key6" ++ ["key7"]=> ++ string(4) "key7" ++ ["key8"]=> ++ string(4) "key8" ++ ["key9"]=> ++ string(4) "key9" ++} ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/iterator_002.phpt +@@ -0,0 +1,36 @@ ++--TEST-- ++APC: APCIterator regex ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++$value) { ++ $vals[$key] = $value['key']; ++} ++ksort($vals); ++var_dump($vals); ++ ++?> ++===DONE=== ++ ++--EXPECT-- ++array(4) { ++ ["key10"]=> ++ string(5) "key10" ++ ["key20"]=> ++ string(5) "key20" ++ ["key30"]=> ++ string(5) "key30" ++ ["key40"]=> ++ string(5) "key40" ++} ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/iterator_003.phpt +@@ -0,0 +1,110 @@ ++--TEST-- ++APC: APCIterator chunk size ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++$value) { ++ $vals[$key] = $value['key']; ++} ++ksort($vals); ++var_dump($vals); ++ ++?> ++===DONE=== ++ ++--EXPECT-- ++array(41) { ++ ["key0"]=> ++ string(4) "key0" ++ ["key1"]=> ++ string(4) "key1" ++ ["key10"]=> ++ string(5) "key10" ++ ["key11"]=> ++ string(5) "key11" ++ ["key12"]=> ++ string(5) "key12" ++ ["key13"]=> ++ string(5) "key13" ++ ["key14"]=> ++ string(5) "key14" ++ ["key15"]=> ++ string(5) "key15" ++ ["key16"]=> ++ string(5) "key16" ++ ["key17"]=> ++ string(5) "key17" ++ ["key18"]=> ++ string(5) "key18" ++ ["key19"]=> ++ string(5) "key19" ++ ["key2"]=> ++ string(4) "key2" ++ ["key20"]=> ++ string(5) "key20" ++ ["key21"]=> ++ string(5) "key21" ++ ["key22"]=> ++ string(5) "key22" ++ ["key23"]=> ++ string(5) "key23" ++ ["key24"]=> ++ string(5) "key24" ++ ["key25"]=> ++ string(5) "key25" ++ ["key26"]=> ++ string(5) "key26" ++ ["key27"]=> ++ string(5) "key27" ++ ["key28"]=> ++ string(5) "key28" ++ ["key29"]=> ++ string(5) "key29" ++ ["key3"]=> ++ string(4) "key3" ++ ["key30"]=> ++ string(5) "key30" ++ ["key31"]=> ++ string(5) "key31" ++ ["key32"]=> ++ string(5) "key32" ++ ["key33"]=> ++ string(5) "key33" ++ ["key34"]=> ++ string(5) "key34" ++ ["key35"]=> ++ string(5) "key35" ++ ["key36"]=> ++ string(5) "key36" ++ ["key37"]=> ++ string(5) "key37" ++ ["key38"]=> ++ string(5) "key38" ++ ["key39"]=> ++ string(5) "key39" ++ ["key4"]=> ++ string(4) "key4" ++ ["key40"]=> ++ string(5) "key40" ++ ["key5"]=> ++ string(4) "key5" ++ ["key6"]=> ++ string(4) "key6" ++ ["key7"]=> ++ string(4) "key7" ++ ["key8"]=> ++ string(4) "key8" ++ ["key9"]=> ++ string(4) "key9" ++} ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/iterator_004.phpt +@@ -0,0 +1,36 @@ ++--TEST-- ++APC: APCIterator regex & chunk size & list ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++$value) { ++ $vals[$key] = $value['key']; ++} ++ksort($vals); ++var_dump($vals); ++ ++?> ++===DONE=== ++ ++--EXPECT-- ++array(4) { ++ ["key10"]=> ++ string(5) "key10" ++ ["key20"]=> ++ string(5) "key20" ++ ["key30"]=> ++ string(5) "key30" ++ ["key40"]=> ++ string(5) "key40" ++} ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/iterator_005.phpt +@@ -0,0 +1,112 @@ ++--TEST-- ++APC: APCIterator delete ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++$value) { ++ $vals[$key] = $value['key']; ++} ++foreach($it2 as $key=>$value) { ++ $vals2[$key] = $value['key']; ++} ++ksort($vals2); ++var_dump($vals); ++var_dump($vals2); ++ ++?> ++===DONE=== ++ ++--EXPECT-- ++array(0) { ++} ++array(37) { ++ ["key0"]=> ++ string(4) "key0" ++ ["key1"]=> ++ string(4) "key1" ++ ["key11"]=> ++ string(5) "key11" ++ ["key12"]=> ++ string(5) "key12" ++ ["key13"]=> ++ string(5) "key13" ++ ["key14"]=> ++ string(5) "key14" ++ ["key15"]=> ++ string(5) "key15" ++ ["key16"]=> ++ string(5) "key16" ++ ["key17"]=> ++ string(5) "key17" ++ ["key18"]=> ++ string(5) "key18" ++ ["key19"]=> ++ string(5) "key19" ++ ["key2"]=> ++ string(4) "key2" ++ ["key21"]=> ++ string(5) "key21" ++ ["key22"]=> ++ string(5) "key22" ++ ["key23"]=> ++ string(5) "key23" ++ ["key24"]=> ++ string(5) "key24" ++ ["key25"]=> ++ string(5) "key25" ++ ["key26"]=> ++ string(5) "key26" ++ ["key27"]=> ++ string(5) "key27" ++ ["key28"]=> ++ string(5) "key28" ++ ["key29"]=> ++ string(5) "key29" ++ ["key3"]=> ++ string(4) "key3" ++ ["key31"]=> ++ string(5) "key31" ++ ["key32"]=> ++ string(5) "key32" ++ ["key33"]=> ++ string(5) "key33" ++ ["key34"]=> ++ string(5) "key34" ++ ["key35"]=> ++ string(5) "key35" ++ ["key36"]=> ++ string(5) "key36" ++ ["key37"]=> ++ string(5) "key37" ++ ["key38"]=> ++ string(5) "key38" ++ ["key39"]=> ++ string(5) "key39" ++ ["key4"]=> ++ string(4) "key4" ++ ["key5"]=> ++ string(4) "key5" ++ ["key6"]=> ++ string(4) "key6" ++ ["key7"]=> ++ string(4) "key7" ++ ["key8"]=> ++ string(4) "key8" ++ ["key9"]=> ++ string(4) "key9" ++} ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/iterator_006.phpt +@@ -0,0 +1,1535 @@ ++--TEST-- ++APC: APCIterator formats ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++apc.file_update_protection=0 ++--FILE-- ++ $format) { ++ $it_array[$idx] = new APCIterator('user', NULL, $format); ++} ++ ++for($i = 0; $i < 11; $i++) { ++ apc_store("key$i", "value$i"); ++} ++ ++foreach ($it_array as $idx => $it) { ++ print_it($it, $idx); ++} ++ ++function print_it($it, $idx) { ++ echo "IT #$idx\n"; ++ echo "============================\n"; ++ foreach ($it as $key=>$value) { ++ var_dump($key); ++ var_dump($value); ++ } ++ echo "============================\n\n"; ++} ++ ++?> ++===DONE=== ++ ++--EXPECTF-- ++IT #0 ++============================ ++string(5) "key10" ++array(1) { ++ ["type"]=> ++ string(4) "user" ++} ++string(4) "key0" ++array(1) { ++ ["type"]=> ++ string(4) "user" ++} ++string(4) "key1" ++array(1) { ++ ["type"]=> ++ string(4) "user" ++} ++string(4) "key2" ++array(1) { ++ ["type"]=> ++ string(4) "user" ++} ++string(4) "key3" ++array(1) { ++ ["type"]=> ++ string(4) "user" ++} ++string(4) "key4" ++array(1) { ++ ["type"]=> ++ string(4) "user" ++} ++string(4) "key5" ++array(1) { ++ ["type"]=> ++ string(4) "user" ++} ++string(4) "key6" ++array(1) { ++ ["type"]=> ++ string(4) "user" ++} ++string(4) "key7" ++array(1) { ++ ["type"]=> ++ string(4) "user" ++} ++string(4) "key8" ++array(1) { ++ ["type"]=> ++ string(4) "user" ++} ++string(4) "key9" ++array(1) { ++ ["type"]=> ++ string(4) "user" ++} ++============================ ++ ++IT #1 ++============================ ++string(5) "key10" ++array(1) { ++ ["key"]=> ++ string(5) "key10" ++} ++string(4) "key0" ++array(1) { ++ ["key"]=> ++ string(4) "key0" ++} ++string(4) "key1" ++array(1) { ++ ["key"]=> ++ string(4) "key1" ++} ++string(4) "key2" ++array(1) { ++ ["key"]=> ++ string(4) "key2" ++} ++string(4) "key3" ++array(1) { ++ ["key"]=> ++ string(4) "key3" ++} ++string(4) "key4" ++array(1) { ++ ["key"]=> ++ string(4) "key4" ++} ++string(4) "key5" ++array(1) { ++ ["key"]=> ++ string(4) "key5" ++} ++string(4) "key6" ++array(1) { ++ ["key"]=> ++ string(4) "key6" ++} ++string(4) "key7" ++array(1) { ++ ["key"]=> ++ string(4) "key7" ++} ++string(4) "key8" ++array(1) { ++ ["key"]=> ++ string(4) "key8" ++} ++string(4) "key9" ++array(1) { ++ ["key"]=> ++ string(4) "key9" ++} ++============================ ++ ++IT #2 ++============================ ++string(5) "key10" ++array(0) { ++} ++string(4) "key0" ++array(0) { ++} ++string(4) "key1" ++array(0) { ++} ++string(4) "key2" ++array(0) { ++} ++string(4) "key3" ++array(0) { ++} ++string(4) "key4" ++array(0) { ++} ++string(4) "key5" ++array(0) { ++} ++string(4) "key6" ++array(0) { ++} ++string(4) "key7" ++array(0) { ++} ++string(4) "key8" ++array(0) { ++} ++string(4) "key9" ++array(0) { ++} ++============================ ++ ++IT #3 ++============================ ++string(5) "key10" ++array(0) { ++} ++string(4) "key0" ++array(0) { ++} ++string(4) "key1" ++array(0) { ++} ++string(4) "key2" ++array(0) { ++} ++string(4) "key3" ++array(0) { ++} ++string(4) "key4" ++array(0) { ++} ++string(4) "key5" ++array(0) { ++} ++string(4) "key6" ++array(0) { ++} ++string(4) "key7" ++array(0) { ++} ++string(4) "key8" ++array(0) { ++} ++string(4) "key9" ++array(0) { ++} ++============================ ++ ++IT #4 ++============================ ++string(5) "key10" ++array(0) { ++} ++string(4) "key0" ++array(0) { ++} ++string(4) "key1" ++array(0) { ++} ++string(4) "key2" ++array(0) { ++} ++string(4) "key3" ++array(0) { ++} ++string(4) "key4" ++array(0) { ++} ++string(4) "key5" ++array(0) { ++} ++string(4) "key6" ++array(0) { ++} ++string(4) "key7" ++array(0) { ++} ++string(4) "key8" ++array(0) { ++} ++string(4) "key9" ++array(0) { ++} ++============================ ++ ++IT #5 ++============================ ++string(5) "key10" ++array(1) { ++ ["value"]=> ++ string(7) "value10" ++} ++string(4) "key0" ++array(1) { ++ ["value"]=> ++ string(6) "value0" ++} ++string(4) "key1" ++array(1) { ++ ["value"]=> ++ string(6) "value1" ++} ++string(4) "key2" ++array(1) { ++ ["value"]=> ++ string(6) "value2" ++} ++string(4) "key3" ++array(1) { ++ ["value"]=> ++ string(6) "value3" ++} ++string(4) "key4" ++array(1) { ++ ["value"]=> ++ string(6) "value4" ++} ++string(4) "key5" ++array(1) { ++ ["value"]=> ++ string(6) "value5" ++} ++string(4) "key6" ++array(1) { ++ ["value"]=> ++ string(6) "value6" ++} ++string(4) "key7" ++array(1) { ++ ["value"]=> ++ string(6) "value7" ++} ++string(4) "key8" ++array(1) { ++ ["value"]=> ++ string(6) "value8" ++} ++string(4) "key9" ++array(1) { ++ ["value"]=> ++ string(6) "value9" ++} ++============================ ++ ++IT #6 ++============================ ++string(5) "key10" ++array(0) { ++} ++string(4) "key0" ++array(0) { ++} ++string(4) "key1" ++array(0) { ++} ++string(4) "key2" ++array(0) { ++} ++string(4) "key3" ++array(0) { ++} ++string(4) "key4" ++array(0) { ++} ++string(4) "key5" ++array(0) { ++} ++string(4) "key6" ++array(0) { ++} ++string(4) "key7" ++array(0) { ++} ++string(4) "key8" ++array(0) { ++} ++string(4) "key9" ++array(0) { ++} ++============================ ++ ++IT #7 ++============================ ++string(5) "key10" ++array(1) { ++ ["num_hits"]=> ++ int(0) ++} ++string(4) "key0" ++array(1) { ++ ["num_hits"]=> ++ int(0) ++} ++string(4) "key1" ++array(1) { ++ ["num_hits"]=> ++ int(0) ++} ++string(4) "key2" ++array(1) { ++ ["num_hits"]=> ++ int(0) ++} ++string(4) "key3" ++array(1) { ++ ["num_hits"]=> ++ int(0) ++} ++string(4) "key4" ++array(1) { ++ ["num_hits"]=> ++ int(0) ++} ++string(4) "key5" ++array(1) { ++ ["num_hits"]=> ++ int(0) ++} ++string(4) "key6" ++array(1) { ++ ["num_hits"]=> ++ int(0) ++} ++string(4) "key7" ++array(1) { ++ ["num_hits"]=> ++ int(0) ++} ++string(4) "key8" ++array(1) { ++ ["num_hits"]=> ++ int(0) ++} ++string(4) "key9" ++array(1) { ++ ["num_hits"]=> ++ int(0) ++} ++============================ ++ ++IT #8 ++============================ ++string(5) "key10" ++array(1) { ++ ["mtime"]=> ++ int(%d) ++} ++string(4) "key0" ++array(1) { ++ ["mtime"]=> ++ int(%d) ++} ++string(4) "key1" ++array(1) { ++ ["mtime"]=> ++ int(%d) ++} ++string(4) "key2" ++array(1) { ++ ["mtime"]=> ++ int(%d) ++} ++string(4) "key3" ++array(1) { ++ ["mtime"]=> ++ int(%d) ++} ++string(4) "key4" ++array(1) { ++ ["mtime"]=> ++ int(%d) ++} ++string(4) "key5" ++array(1) { ++ ["mtime"]=> ++ int(%d) ++} ++string(4) "key6" ++array(1) { ++ ["mtime"]=> ++ int(%d) ++} ++string(4) "key7" ++array(1) { ++ ["mtime"]=> ++ int(%d) ++} ++string(4) "key8" ++array(1) { ++ ["mtime"]=> ++ int(%d) ++} ++string(4) "key9" ++array(1) { ++ ["mtime"]=> ++ int(%d) ++} ++============================ ++ ++IT #9 ++============================ ++string(5) "key10" ++array(1) { ++ ["creation_time"]=> ++ int(%d) ++} ++string(4) "key0" ++array(1) { ++ ["creation_time"]=> ++ int(%d) ++} ++string(4) "key1" ++array(1) { ++ ["creation_time"]=> ++ int(%d) ++} ++string(4) "key2" ++array(1) { ++ ["creation_time"]=> ++ int(%d) ++} ++string(4) "key3" ++array(1) { ++ ["creation_time"]=> ++ int(%d) ++} ++string(4) "key4" ++array(1) { ++ ["creation_time"]=> ++ int(%d) ++} ++string(4) "key5" ++array(1) { ++ ["creation_time"]=> ++ int(%d) ++} ++string(4) "key6" ++array(1) { ++ ["creation_time"]=> ++ int(%d) ++} ++string(4) "key7" ++array(1) { ++ ["creation_time"]=> ++ int(%d) ++} ++string(4) "key8" ++array(1) { ++ ["creation_time"]=> ++ int(%d) ++} ++string(4) "key9" ++array(1) { ++ ["creation_time"]=> ++ int(%d) ++} ++============================ ++ ++IT #10 ++============================ ++string(5) "key10" ++array(1) { ++ ["deletion_time"]=> ++ int(0) ++} ++string(4) "key0" ++array(1) { ++ ["deletion_time"]=> ++ int(0) ++} ++string(4) "key1" ++array(1) { ++ ["deletion_time"]=> ++ int(0) ++} ++string(4) "key2" ++array(1) { ++ ["deletion_time"]=> ++ int(0) ++} ++string(4) "key3" ++array(1) { ++ ["deletion_time"]=> ++ int(0) ++} ++string(4) "key4" ++array(1) { ++ ["deletion_time"]=> ++ int(0) ++} ++string(4) "key5" ++array(1) { ++ ["deletion_time"]=> ++ int(0) ++} ++string(4) "key6" ++array(1) { ++ ["deletion_time"]=> ++ int(0) ++} ++string(4) "key7" ++array(1) { ++ ["deletion_time"]=> ++ int(0) ++} ++string(4) "key8" ++array(1) { ++ ["deletion_time"]=> ++ int(0) ++} ++string(4) "key9" ++array(1) { ++ ["deletion_time"]=> ++ int(0) ++} ++============================ ++ ++IT #11 ++============================ ++string(5) "key10" ++array(1) { ++ ["access_time"]=> ++ int(%d) ++} ++string(4) "key0" ++array(1) { ++ ["access_time"]=> ++ int(%d) ++} ++string(4) "key1" ++array(1) { ++ ["access_time"]=> ++ int(%d) ++} ++string(4) "key2" ++array(1) { ++ ["access_time"]=> ++ int(%d) ++} ++string(4) "key3" ++array(1) { ++ ["access_time"]=> ++ int(%d) ++} ++string(4) "key4" ++array(1) { ++ ["access_time"]=> ++ int(%d) ++} ++string(4) "key5" ++array(1) { ++ ["access_time"]=> ++ int(%d) ++} ++string(4) "key6" ++array(1) { ++ ["access_time"]=> ++ int(%d) ++} ++string(4) "key7" ++array(1) { ++ ["access_time"]=> ++ int(%d) ++} ++string(4) "key8" ++array(1) { ++ ["access_time"]=> ++ int(%d) ++} ++string(4) "key9" ++array(1) { ++ ["access_time"]=> ++ int(%d) ++} ++============================ ++ ++IT #12 ++============================ ++string(5) "key10" ++array(1) { ++ ["ref_count"]=> ++ int(0) ++} ++string(4) "key0" ++array(1) { ++ ["ref_count"]=> ++ int(0) ++} ++string(4) "key1" ++array(1) { ++ ["ref_count"]=> ++ int(0) ++} ++string(4) "key2" ++array(1) { ++ ["ref_count"]=> ++ int(0) ++} ++string(4) "key3" ++array(1) { ++ ["ref_count"]=> ++ int(0) ++} ++string(4) "key4" ++array(1) { ++ ["ref_count"]=> ++ int(0) ++} ++string(4) "key5" ++array(1) { ++ ["ref_count"]=> ++ int(0) ++} ++string(4) "key6" ++array(1) { ++ ["ref_count"]=> ++ int(0) ++} ++string(4) "key7" ++array(1) { ++ ["ref_count"]=> ++ int(0) ++} ++string(4) "key8" ++array(1) { ++ ["ref_count"]=> ++ int(0) ++} ++string(4) "key9" ++array(1) { ++ ["ref_count"]=> ++ int(0) ++} ++============================ ++ ++IT #13 ++============================ ++string(5) "key10" ++array(1) { ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key0" ++array(1) { ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key1" ++array(1) { ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key2" ++array(1) { ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key3" ++array(1) { ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key4" ++array(1) { ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key5" ++array(1) { ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key6" ++array(1) { ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key7" ++array(1) { ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key8" ++array(1) { ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key9" ++array(1) { ++ ["mem_size"]=> ++ int(%d) ++} ++============================ ++ ++IT #14 ++============================ ++string(5) "key10" ++array(1) { ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key0" ++array(1) { ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key1" ++array(1) { ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key2" ++array(1) { ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key3" ++array(1) { ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key4" ++array(1) { ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key5" ++array(1) { ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key6" ++array(1) { ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key7" ++array(1) { ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key8" ++array(1) { ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key9" ++array(1) { ++ ["ttl"]=> ++ int(0) ++} ++============================ ++ ++IT #15 ++============================ ++string(5) "key10" ++array(0) { ++} ++string(4) "key0" ++array(0) { ++} ++string(4) "key1" ++array(0) { ++} ++string(4) "key2" ++array(0) { ++} ++string(4) "key3" ++array(0) { ++} ++string(4) "key4" ++array(0) { ++} ++string(4) "key5" ++array(0) { ++} ++string(4) "key6" ++array(0) { ++} ++string(4) "key7" ++array(0) { ++} ++string(4) "key8" ++array(0) { ++} ++string(4) "key9" ++array(0) { ++} ++============================ ++ ++IT #16 ++============================ ++string(5) "key10" ++array(11) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(5) "key10" ++ ["value"]=> ++ string(7) "value10" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key0" ++array(11) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key0" ++ ["value"]=> ++ string(6) "value0" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key1" ++array(11) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key1" ++ ["value"]=> ++ string(6) "value1" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key2" ++array(11) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key2" ++ ["value"]=> ++ string(6) "value2" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key3" ++array(11) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key3" ++ ["value"]=> ++ string(6) "value3" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key4" ++array(11) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key4" ++ ["value"]=> ++ string(6) "value4" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key5" ++array(11) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key5" ++ ["value"]=> ++ string(6) "value5" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key6" ++array(11) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key6" ++ ["value"]=> ++ string(6) "value6" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key7" ++array(11) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key7" ++ ["value"]=> ++ string(6) "value7" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key8" ++array(11) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key8" ++ ["value"]=> ++ string(6) "value8" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++ ["ttl"]=> ++ int(0) ++} ++string(4) "key9" ++array(11) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key9" ++ ["value"]=> ++ string(6) "value9" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++ ["ttl"]=> ++ int(0) ++} ++============================ ++ ++IT #17 ++============================ ++string(5) "key10" ++array(10) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(5) "key10" ++ ["value"]=> ++ string(7) "value10" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key0" ++array(10) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key0" ++ ["value"]=> ++ string(6) "value0" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key1" ++array(10) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key1" ++ ["value"]=> ++ string(6) "value1" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key2" ++array(10) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key2" ++ ["value"]=> ++ string(6) "value2" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key3" ++array(10) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key3" ++ ["value"]=> ++ string(6) "value3" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key4" ++array(10) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key4" ++ ["value"]=> ++ string(6) "value4" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key5" ++array(10) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key5" ++ ["value"]=> ++ string(6) "value5" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key6" ++array(10) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key6" ++ ["value"]=> ++ string(6) "value6" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key7" ++array(10) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key7" ++ ["value"]=> ++ string(6) "value7" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key8" ++array(10) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key8" ++ ["value"]=> ++ string(6) "value8" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key9" ++array(10) { ++ ["type"]=> ++ string(4) "user" ++ ["key"]=> ++ string(4) "key9" ++ ["value"]=> ++ string(6) "value9" ++ ["num_hits"]=> ++ int(0) ++ ["mtime"]=> ++ int(%d) ++ ["creation_time"]=> ++ int(%d) ++ ["deletion_time"]=> ++ int(0) ++ ["access_time"]=> ++ int(%d) ++ ["ref_count"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++============================ ++ ++IT #18 ++============================ ++string(5) "key10" ++array(3) { ++ ["key"]=> ++ string(5) "key10" ++ ["num_hits"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key0" ++array(3) { ++ ["key"]=> ++ string(4) "key0" ++ ["num_hits"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key1" ++array(3) { ++ ["key"]=> ++ string(4) "key1" ++ ["num_hits"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key2" ++array(3) { ++ ["key"]=> ++ string(4) "key2" ++ ["num_hits"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key3" ++array(3) { ++ ["key"]=> ++ string(4) "key3" ++ ["num_hits"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key4" ++array(3) { ++ ["key"]=> ++ string(4) "key4" ++ ["num_hits"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key5" ++array(3) { ++ ["key"]=> ++ string(4) "key5" ++ ["num_hits"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key6" ++array(3) { ++ ["key"]=> ++ string(4) "key6" ++ ["num_hits"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key7" ++array(3) { ++ ["key"]=> ++ string(4) "key7" ++ ["num_hits"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key8" ++array(3) { ++ ["key"]=> ++ string(4) "key8" ++ ["num_hits"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++string(4) "key9" ++array(3) { ++ ["key"]=> ++ string(4) "key9" ++ ["num_hits"]=> ++ int(0) ++ ["mem_size"]=> ++ int(%d) ++} ++============================ ++ ++===DONE=== +--- /dev/null ++++ b/ext/apc/tests/iterator_007.phpt +@@ -0,0 +1,36 @@ ++--TEST-- ++APC: APCIterator Overwriting the ctor ++--SKIPIF-- ++ ++--INI-- ++apc.enabled=1 ++apc.enable_cli=1 ++--FILE-- ++rewind(), ++ $obj->current(), ++ $obj->key(), ++ $obj->next(), ++ $obj->valid(), ++ $obj->getTotalHits(), ++ $obj->getTotalSize(), ++ $obj->getTotalCount(), ++ apc_delete($obj) ++); ++?> ++--EXPECTF-- ++bool(false) ++bool(false) ++bool(false) ++bool(false) ++bool(false) ++bool(false) ++bool(false) ++bool(false) ++bool(false) ++ +--- /dev/null ++++ b/ext/apc/tests/php_5_3_ns.inc +@@ -0,0 +1,18 @@ ++ +--- /dev/null ++++ b/ext/apc/TODO +@@ -0,0 +1,32 @@ ++Known Bugs ++ ++1. Gallery2 doesn't work with PHP5+APC. There is something wrong ++ with the way methods are restored in some edge case I haven't ++ been able to figure out yet. ++ To reproduce install gallery2 and click down to an individual photo. ++ ++2. apc_store() probably needs some checks to skip trying to store ++ internal classes. Something along the lines of: ++ ++ if(Z_TYPE_P(val) == IS_OBJECT) { ++ zend_class_entry *ce = Z_OBJCE_P(val); ++ if(ce->type == ZEND_INTERNAL_CLASS) { ++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot cache internal objects"); ++ RETURN_FALSE; ++ } ++ } ++ ++ in the apc_store() function in php_apc.c but I am wondering if it needs to do more ++ than that. ++ ++Windows ++ ++1. The following configurations (build arguments) have not been implemented yet ++ ++ (*) --enable-apc-mmap Memory mapping support ++ (*) --enable-apc-sem Semaphore locking support (FCNTL replacement) ++ (*) --enable-apc-phreadmutex Thread mutexes, while implemented we should probably rename the internals to thread ++ ++2. Non-blocking locks is not supported either ++ ++3. Update fileinfo to support stat info in a more portable way (see PECL #17903) +\ No newline at end of file diff --git a/lang/php5/patches/100-fix_membar_producer_link_error_gcc41.patch b/lang/php5/patches/100-fix_membar_producer_link_error_gcc41.patch new file mode 100644 index 0000000..7055373 --- /dev/null +++ b/lang/php5/patches/100-fix_membar_producer_link_error_gcc41.patch @@ -0,0 +1,11 @@ +--- a/ext/standard/php_crypt_r.c ++++ b/ext/standard/php_crypt_r.c +@@ -94,7 +94,7 @@ + if (!initialized) { + #ifdef PHP_WIN32 + InterlockedIncrement(&initialized); +-#elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)) ++#elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 1)) + __sync_fetch_and_add(&initialized, 1); + #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */ + membar_producer(); diff --git a/lang/php5/patches/101-fix_membar_producer_link_error_gcc3x.patch b/lang/php5/patches/101-fix_membar_producer_link_error_gcc3x.patch new file mode 100644 index 0000000..b3f677f --- /dev/null +++ b/lang/php5/patches/101-fix_membar_producer_link_error_gcc3x.patch @@ -0,0 +1,11 @@ +--- a/ext/standard/php_crypt_r.c ++++ b/ext/standard/php_crypt_r.c +@@ -96,6 +96,8 @@ void _crypt_extended_init_r(void) + InterlockedIncrement(&initialized); + #elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 1)) + __sync_fetch_and_add(&initialized, 1); ++#elif (defined(__GNUC__) && (__GNUC__ == 3)) ++ initialized = 1; + #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */ + membar_producer(); + atomic_add_int(&initialized, 1); diff --git a/lang/php5/patches/900-prevent_buildconf_force.patch b/lang/php5/patches/900-prevent_buildconf_force.patch new file mode 100644 index 0000000..52cb8fd --- /dev/null +++ b/lang/php5/patches/900-prevent_buildconf_force.patch @@ -0,0 +1,19104 @@ +--- a/configure ++++ b/configure +@@ -847,6 +847,30 @@ + ac_help="$ac_help + --with-zlib-dir= Define the location of zlib install directory" + ac_help="$ac_help ++ --enable-apc Enable APC support" ++ac_help="$ac_help ++ --enable-apc-debug Enable APC debugging" ++ac_help="$ac_help ++ --enable-apc-filehits Enable per request file info about files used from the APC cache (ie: apc_cache_info('filehits')) " ++ac_help="$ac_help ++ --disable-apc-mmap ++ Disable mmap support and use IPC shm instead" ++ac_help="$ac_help ++ --enable-apc-sem ++ Enable semaphore locks instead of fcntl" ++ac_help="$ac_help ++ --disable-apc-pthreadmutex ++ Disable pthread mutex locking " ++ac_help="$ac_help ++ --enable-apc-spinlocks ++ Enable spin locks EXPERIMENTAL " ++ac_help="$ac_help ++ --enable-apc-memprotect ++ Enable mmap/shm memory protection" ++ac_help="$ac_help ++ --disable-valgrind-checks ++ Disable valgrind based memory checks" ++ac_help="$ac_help + --enable-bcmath Enable bc style precision math functions" + ac_help="$ac_help + --with-bz2[=DIR] Include BZip2 support" +@@ -1888,12 +1912,12 @@ + + + echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +-echo "configure:1892: checking for Cygwin environment" >&5 ++echo "configure:1916: checking for Cygwin environment" >&5 + if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes + else +@@ -1921,19 +1945,19 @@ + CYGWIN= + test "$ac_cv_cygwin" = yes && CYGWIN=yes + echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +-echo "configure:1925: checking for mingw32 environment" >&5 ++echo "configure:1949: checking for mingw32 environment" >&5 + if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes + else +@@ -1952,7 +1976,7 @@ + + + echo $ac_n "checking for egrep""... $ac_c" 1>&6 +-echo "configure:1956: checking for egrep" >&5 ++echo "configure:1980: checking for egrep" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_egrep'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1967,7 +1991,7 @@ + + + echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6 +-echo "configure:1971: checking for a sed that does not truncate output" >&5 ++echo "configure:1995: checking for a sed that does not truncate output" >&5 + if eval "test \"`echo '$''{'lt_cv_path_SED'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2117,7 +2141,7 @@ + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 +-echo "configure:2121: checking host system type" >&5 ++echo "configure:2145: checking host system type" >&5 + + host_alias=$host + case "$host_alias" in +@@ -2138,7 +2162,7 @@ + echo "$ac_t""$host" 1>&6 + + echo $ac_n "checking target system type""... $ac_c" 1>&6 +-echo "configure:2142: checking target system type" >&5 ++echo "configure:2166: checking target system type" >&5 + + target_alias=$target + case "$target_alias" in +@@ -2250,7 +2274,7 @@ + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2254: checking for $ac_word" >&5 ++echo "configure:2278: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2280,7 +2304,7 @@ + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2284: checking for $ac_word" >&5 ++echo "configure:2308: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2331,7 +2355,7 @@ + # Extract the first word of "cl", so it can be a program name with args. + set dummy cl; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2335: checking for $ac_word" >&5 ++echo "configure:2359: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2363,7 +2387,7 @@ + fi + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:2367: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:2391: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +@@ -2374,12 +2398,12 @@ + + cat > conftest.$ac_ext << EOF + +-#line 2378 "configure" ++#line 2402 "configure" + #include "confdefs.h" + + main(){return(0);} + EOF +-if { (eval echo configure:2383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then +@@ -2405,12 +2429,12 @@ + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:2409: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:2433: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 + cross_compiling=$ac_cv_prog_cc_cross + + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +-echo "configure:2414: checking whether we are using GNU C" >&5 ++echo "configure:2438: checking whether we are using GNU C" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2419,7 +2443,7 @@ + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes + else + ac_cv_prog_gcc=no +@@ -2438,7 +2462,7 @@ + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +-echo "configure:2442: checking whether ${CC-cc} accepts -g" >&5 ++echo "configure:2466: checking whether ${CC-cc} accepts -g" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2470,7 +2494,7 @@ + fi + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:2474: checking how to run the C preprocessor" >&5 ++echo "configure:2498: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -2485,13 +2509,13 @@ + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -2502,13 +2526,13 @@ + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -2519,13 +2543,13 @@ + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -2552,9 +2576,9 @@ + + ICC="no" + echo $ac_n "checking for icc""... $ac_c" 1>&6 +-echo "configure:2556: checking for icc" >&5 ++echo "configure:2580: checking for icc" >&5 + cat > conftest.$ac_ext <&6 +-echo "configure:2580: checking for suncc" >&5 ++echo "configure:2604: checking for suncc" >&5 + cat > conftest.$ac_ext <&6 +-echo "configure:2605: checking whether $CC and cc understand -c and -o together" >&5 ++echo "configure:2629: checking whether $CC and cc understand -c and -o together" >&5 + else + echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 +-echo "configure:2608: checking whether cc understands -c and -o together" >&5 ++echo "configure:2632: checking whether cc understands -c and -o together" >&5 + fi + set dummy $CC; ac_cc="`echo $2 | + sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" +@@ -2616,16 +2640,16 @@ + # We do the test twice because some compilers refuse to overwrite an + # existing .o file with -o, though they will create one. + ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' +-if { (eval echo configure:2620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && +- test -f conftest.o && { (eval echo configure:2621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; ++if { (eval echo configure:2644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && ++ test -f conftest.o && { (eval echo configure:2645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. +- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:2626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then ++ if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:2650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + ac_try='cc -c conftest.c -o conftest.o 1>&5' +- if { (eval echo configure:2628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && +- test -f conftest.o && { (eval echo configure:2629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; ++ if { (eval echo configure:2652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && ++ test -f conftest.o && { (eval echo configure:2653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + then + # cc works too. + : +@@ -2652,7 +2676,7 @@ + fi + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:2656: checking how to run the C preprocessor" >&5 ++echo "configure:2680: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -2667,13 +2691,13 @@ + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -2684,13 +2708,13 @@ + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -2701,13 +2725,13 @@ + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -2732,9 +2756,9 @@ + echo "$ac_t""$CPP" 1>&6 + + echo $ac_n "checking for AIX""... $ac_c" 1>&6 +-echo "configure:2736: checking for AIX" >&5 ++echo "configure:2760: checking for AIX" >&5 + cat > conftest.$ac_ext <&6 +-echo "configure:2760: checking whether ln -s works" >&5 ++echo "configure:2784: checking whether ln -s works" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2781,7 +2805,7 @@ + php_with_libdir=lib + + echo $ac_n "checking for system library directory""... $ac_c" 1>&6 +-echo "configure:2785: checking for system library directory" >&5 ++echo "configure:2809: checking for system library directory" >&5 + # Check whether --with-libdir or --without-libdir was given. + if test "${with_libdir+set}" = set; then + withval="$with_libdir" +@@ -2804,7 +2828,7 @@ + php_enable_rpath=yes + + echo $ac_n "checking whether to enable runpaths""... $ac_c" 1>&6 +-echo "configure:2808: checking whether to enable runpaths" >&5 ++echo "configure:2832: checking whether to enable runpaths" >&5 + # Check whether --enable-rpath or --disable-rpath was given. + if test "${enable_rpath+set}" = set; then + enableval="$enable_rpath" +@@ -2825,7 +2849,7 @@ + + + echo $ac_n "checking if compiler supports -R""... $ac_c" 1>&6 +-echo "configure:2829: checking if compiler supports -R" >&5 ++echo "configure:2853: checking if compiler supports -R" >&5 + if eval "test \"`echo '$''{'php_cv_cc_dashr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2833,14 +2857,14 @@ + SAVE_LIBS=$LIBS + LIBS="-R /usr/$PHP_LIBDIR $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + php_cv_cc_dashr=yes + else +@@ -2858,7 +2882,7 @@ + ld_runpath_switch=-R + else + echo $ac_n "checking if compiler supports -Wl,-rpath,""... $ac_c" 1>&6 +-echo "configure:2862: checking if compiler supports -Wl,-rpath," >&5 ++echo "configure:2886: checking if compiler supports -Wl,-rpath," >&5 + if eval "test \"`echo '$''{'php_cv_cc_rpath'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2866,14 +2890,14 @@ + SAVE_LIBS=$LIBS + LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + php_cv_cc_rpath=yes + else +@@ -2904,7 +2928,7 @@ + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2908: checking for $ac_word" >&5 ++echo "configure:2932: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2945,7 +2969,7 @@ + ;; + *) + echo $ac_n "checking if $AWK is broken""... $ac_c" 1>&6 +-echo "configure:2949: checking if $AWK is broken" >&5 ++echo "configure:2973: checking if $AWK is broken" >&5 + if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then + echo "$ac_t""yes" 1>&6 + { echo "configure: error: You should install GNU awk" 1>&2; exit 1; } +@@ -2964,7 +2988,7 @@ + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2968: checking for $ac_word" >&5 ++echo "configure:2992: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3004,7 +3028,7 @@ + bison_version=none + if test "$YACC"; then + echo $ac_n "checking for bison version""... $ac_c" 1>&6 +-echo "configure:3008: checking for bison version" >&5 ++echo "configure:3032: checking for bison version" >&5 + if eval "test \"`echo '$''{'php_cv_bison_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3042,7 +3066,7 @@ + # Extract the first word of "re2c", so it can be a program name with args. + set dummy re2c; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:3046: checking for $ac_word" >&5 ++echo "configure:3070: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_RE2C'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3070,7 +3094,7 @@ + + if test -n "$RE2C"; then + echo $ac_n "checking for re2c version""... $ac_c" 1>&6 +-echo "configure:3074: checking for re2c version" >&5 ++echo "configure:3098: checking for re2c version" >&5 + if eval "test \"`echo '$''{'php_cv_re2c_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3109,7 +3133,7 @@ + php_enable_re2c_cgoto=no + + echo $ac_n "checking whether to enable computed goto gcc extension with re2c""... $ac_c" 1>&6 +-echo "configure:3113: checking whether to enable computed goto gcc extension with re2c" >&5 ++echo "configure:3137: checking whether to enable computed goto gcc extension with re2c" >&5 + # Check whether --enable-re2c-cgoto or --disable-re2c-cgoto was given. + if test "${enable_re2c_cgoto+set}" = set; then + enableval="$enable_re2c_cgoto" +@@ -3132,9 +3156,9 @@ + RE2C_FLAGS="" + else + echo $ac_n "checking whether re2c -g works""... $ac_c" 1>&6 +-echo "configure:3136: checking whether re2c -g works" >&5 ++echo "configure:3160: checking whether re2c -g works" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:3180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + RE2C_FLAGS="" +@@ -3218,7 +3242,7 @@ + + gcc_arg_name=ac_cv_gcc_arg_no_cpp_precomp + echo $ac_n "checking whether $CC supports -no-cpp-precomp""... $ac_c" 1>&6 +-echo "configure:3222: checking whether $CC supports -no-cpp-precomp" >&5 ++echo "configure:3246: checking whether $CC supports -no-cpp-precomp" >&5 + if eval "test \"`echo '$''{'ac_cv_gcc_arg_no_cpp_precomp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3419,7 +3443,7 @@ + # Disable PIC mode by default where it is known to be safe to do so, + # to avoid the performance hit from the lost register + echo $ac_n "checking whether to force non-PIC code in shared modules""... $ac_c" 1>&6 +-echo "configure:3423: checking whether to force non-PIC code in shared modules" >&5 ++echo "configure:3447: checking whether to force non-PIC code in shared modules" >&5 + case $host_alias in + i?86-*-linux*|i?86-*-freebsd*) + if test "${with_pic+set}" != "set" || test "$with_pic" = "no"; then +@@ -3449,7 +3473,7 @@ + + + echo $ac_n "checking whether /dev/urandom exists""... $ac_c" 1>&6 +-echo "configure:3453: checking whether /dev/urandom exists" >&5 ++echo "configure:3477: checking whether /dev/urandom exists" >&5 + if test -r "/dev/urandom" && test -c "/dev/urandom"; then + cat >> confdefs.h <<\EOF + #define HAVE_DEV_URANDOM 1 +@@ -3510,7 +3534,7 @@ + + else + cat > conftest.$ac_ext < +@@ -3528,7 +3552,7 @@ + return pthread_create(&thd, NULL, thread_routine, &data); + } + EOF +-if { (eval echo configure:3532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + pthreads_working=yes +@@ -3548,7 +3572,7 @@ + CFLAGS=$save_CFLAGS + + echo $ac_n "checking for pthreads_cflags""... $ac_c" 1>&6 +-echo "configure:3552: checking for pthreads_cflags" >&5 ++echo "configure:3576: checking for pthreads_cflags" >&5 + if eval "test \"`echo '$''{'ac_cv_pthreads_cflags'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3570,7 +3594,7 @@ + + else + cat > conftest.$ac_ext < +@@ -3588,7 +3612,7 @@ + return pthread_create(&thd, NULL, thread_routine, &data); + } + EOF +-if { (eval echo configure:3592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:3616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + pthreads_working=yes +@@ -3618,7 +3642,7 @@ + echo "$ac_t""$ac_cv_pthreads_cflags" 1>&6 + + echo $ac_n "checking for pthreads_lib""... $ac_c" 1>&6 +-echo "configure:3622: checking for pthreads_lib" >&5 ++echo "configure:3646: checking for pthreads_lib" >&5 + if eval "test \"`echo '$''{'ac_cv_pthreads_lib'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3640,7 +3664,7 @@ + + else + cat > conftest.$ac_ext < +@@ -3658,7 +3682,7 @@ + return pthread_create(&thd, NULL, thread_routine, &data); + } + EOF +-if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + pthreads_working=yes +@@ -3789,7 +3813,7 @@ + + + echo $ac_n "checking for AOLserver support""... $ac_c" 1>&6 +-echo "configure:3793: checking for AOLserver support" >&5 ++echo "configure:3817: checking for AOLserver support" >&5 + + if test "$PHP_AOLSERVER" != "no"; then + if test -d "$PHP_AOLSERVER/include"; then +@@ -4054,7 +4078,7 @@ + + + echo $ac_n "checking for Apache 1.x module support via DSO through APXS""... $ac_c" 1>&6 +-echo "configure:4058: checking for Apache 1.x module support via DSO through APXS" >&5 ++echo "configure:4082: checking for Apache 1.x module support via DSO through APXS" >&5 + + if test "$PHP_APXS" != "no"; then + if test "$PHP_APXS" = "yes"; then +@@ -4385,7 +4409,7 @@ + + + echo $ac_n "checking for Apache 1.x module support""... $ac_c" 1>&6 +-echo "configure:4389: checking for Apache 1.x module support" >&5 ++echo "configure:4413: checking for Apache 1.x module support" >&5 + + if test "$PHP_SAPI" != "apache" && test "$PHP_APACHE" != "no"; then + +@@ -5262,7 +5286,7 @@ + php_enable_mod_charset=no + + echo $ac_n "checking whether to enable Apache charset compatibility option""... $ac_c" 1>&6 +-echo "configure:5266: checking whether to enable Apache charset compatibility option" >&5 ++echo "configure:5290: checking whether to enable Apache charset compatibility option" >&5 + # Check whether --enable-mod-charset or --disable-mod-charset was given. + if test "${enable_mod_charset+set}" = set; then + enableval="$enable_mod_charset" +@@ -5294,7 +5318,7 @@ + + gcc_arg_name=ac_cv_gcc_arg_rdynamic + echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6 +-echo "configure:5298: checking whether $CC supports -rdynamic" >&5 ++echo "configure:5322: checking whether $CC supports -rdynamic" >&5 + if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -5337,7 +5361,7 @@ + + + echo $ac_n "checking for member fd in BUFF *""... $ac_c" 1>&6 +-echo "configure:5341: checking for member fd in BUFF *" >&5 ++echo "configure:5365: checking for member fd in BUFF *" >&5 + if eval "test \"`echo '$''{'ac_cv_php_fd_in_buff'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -5349,14 +5373,14 @@ + CPPFLAGS="$CPPFLAGS $APACHE_INCLUDE" + fi + cat > conftest.$ac_ext < + int main() { + conn_rec *c; int fd = c->client->fd; + ; return 0; } + EOF +-if { (eval echo configure:5360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:5384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_php_fd_in_buff=yes +@@ -5429,7 +5453,7 @@ + + + echo $ac_n "checking for Apache 2.0 filter-module support via DSO through APXS""... $ac_c" 1>&6 +-echo "configure:5433: checking for Apache 2.0 filter-module support via DSO through APXS" >&5 ++echo "configure:5457: checking for Apache 2.0 filter-module support via DSO through APXS" >&5 + + if test "$PHP_APXS2FILTER" != "no"; then + if test "$PHP_APXS2FILTER" = "yes"; then +@@ -6318,7 +6342,7 @@ + + + echo $ac_n "checking for Apache 2.0 handler-module support via DSO through APXS""... $ac_c" 1>&6 +-echo "configure:6322: checking for Apache 2.0 handler-module support via DSO through APXS" >&5 ++echo "configure:6346: checking for Apache 2.0 handler-module support via DSO through APXS" >&5 + + if test "$PHP_APXS2" != "no"; then + if test "$PHP_APXS2" = "yes"; then +@@ -7208,7 +7232,7 @@ + + + echo $ac_n "checking for Apache 1.x (hooks) module support via DSO through APXS""... $ac_c" 1>&6 +-echo "configure:7212: checking for Apache 1.x (hooks) module support via DSO through APXS" >&5 ++echo "configure:7236: checking for Apache 1.x (hooks) module support via DSO through APXS" >&5 + + if test "$PHP_APACHE_HOOKS" != "no"; then + if test "$PHP_APACHE_HOOKS" = "yes"; then +@@ -7539,7 +7563,7 @@ + + + echo $ac_n "checking for Apache 1.x (hooks) module support""... $ac_c" 1>&6 +-echo "configure:7543: checking for Apache 1.x (hooks) module support" >&5 ++echo "configure:7567: checking for Apache 1.x (hooks) module support" >&5 + + if test "$PHP_SAPI" != "apache" && test "$PHP_SAPI" != "apache_hooks" && test "$PHP_APACHE_HOOKS_STATIC" != "no"; then + +@@ -8416,7 +8440,7 @@ + php_enable_mod_charset=no + + echo $ac_n "checking whether to enable Apache charset compatibility option""... $ac_c" 1>&6 +-echo "configure:8420: checking whether to enable Apache charset compatibility option" >&5 ++echo "configure:8444: checking whether to enable Apache charset compatibility option" >&5 + # Check whether --enable-mod-charset or --disable-mod-charset was given. + if test "${enable_mod_charset+set}" = set; then + enableval="$enable_mod_charset" +@@ -8448,7 +8472,7 @@ + + gcc_arg_name=ac_cv_gcc_arg_rdynamic + echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6 +-echo "configure:8452: checking whether $CC supports -rdynamic" >&5 ++echo "configure:8476: checking whether $CC supports -rdynamic" >&5 + if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8491,7 +8515,7 @@ + + + echo $ac_n "checking for member fd in BUFF *""... $ac_c" 1>&6 +-echo "configure:8495: checking for member fd in BUFF *" >&5 ++echo "configure:8519: checking for member fd in BUFF *" >&5 + if eval "test \"`echo '$''{'ac_cv_php_fd_in_buff'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -8503,14 +8527,14 @@ + CPPFLAGS="$CPPFLAGS $APACHE_INCLUDE" + fi + cat > conftest.$ac_ext < + int main() { + conn_rec *c; int fd = c->client->fd; + ; return 0; } + EOF +-if { (eval echo configure:8514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:8538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_php_fd_in_buff=yes +@@ -8584,7 +8608,7 @@ + + + echo $ac_n "checking for Caudium support""... $ac_c" 1>&6 +-echo "configure:8588: checking for Caudium support" >&5 ++echo "configure:8612: checking for Caudium support" >&5 + + if test "$PHP_CAUDIUM" != "no"; then + if test "$prefix" = "NONE"; then CPREF=/usr/local/; fi +@@ -8654,7 +8678,7 @@ + PIKE_C_INCLUDE=/usr/local/include/`basename $PIKE` + fi + echo $ac_n "checking for C includes in $PIKE_C_INCLUDE""... $ac_c" 1>&6 +-echo "configure:8658: checking for C includes in $PIKE_C_INCLUDE" >&5 ++echo "configure:8682: checking for C includes in $PIKE_C_INCLUDE" >&5 + if test -f $PIKE_C_INCLUDE/version.h; then + PIKE_TEST_VER=`$PIKE -e 'string v; int rel;sscanf(version(), "Pike v%s release %d", v, rel); write(v+"."+rel);'` + ###### VERSION MATCH CHECK ####### +@@ -8943,7 +8967,7 @@ + + + echo $ac_n "checking for CLI build""... $ac_c" 1>&6 +-echo "configure:8947: checking for CLI build" >&5 ++echo "configure:8971: checking for CLI build" >&5 + if test "$PHP_CLI" != "no"; then + + src=$abs_srcdir/sapi/cli/Makefile.frag +@@ -8993,7 +9017,7 @@ + php_with_continuity=no + + echo $ac_n "checking for Continuity support""... $ac_c" 1>&6 +-echo "configure:8997: checking for Continuity support" >&5 ++echo "configure:9021: checking for Continuity support" >&5 + # Check whether --with-continuity or --without-continuity was given. + if test "${with_continuity+set}" = set; then + withval="$with_continuity" +@@ -9017,7 +9041,7 @@ + { echo "configure: error: Please specify the path to the root of your Continuity server using --with-continuity=DIR" 1>&2; exit 1; } + fi + echo $ac_n "checking for Continuity include files""... $ac_c" 1>&6 +-echo "configure:9021: checking for Continuity include files" >&5 ++echo "configure:9045: checking for Continuity include files" >&5 + if test -d $PHP_CONTINUITY/include ; then + CAPI_INCLUDE=$PHP_CONTINUITY/include + echo "$ac_t""Continuity Binary Distribution" 1>&6 +@@ -9275,7 +9299,7 @@ + + + echo $ac_n "checking for embedded SAPI library support""... $ac_c" 1>&6 +-echo "configure:9279: checking for embedded SAPI library support" >&5 ++echo "configure:9303: checking for embedded SAPI library support" >&5 + + if test "$PHP_EMBED" != "no"; then + case "$PHP_EMBED" in +@@ -9534,7 +9558,7 @@ + + + echo $ac_n "checking for FPM build""... $ac_c" 1>&6 +-echo "configure:9538: checking for FPM build" >&5 ++echo "configure:9562: checking for FPM build" >&5 + if test "$PHP_FPM" != "no"; then + echo "$ac_t""$PHP_FPM" 1>&6 + +@@ -9542,12 +9566,12 @@ + for ac_func in setenv clearenv setproctitle + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:9546: checking for $ac_func" >&5 ++echo "configure:9570: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -9597,14 +9621,14 @@ + + + echo $ac_n "checking for library containing socket""... $ac_c" 1>&6 +-echo "configure:9601: checking for library containing socket" >&5 ++echo "configure:9625: checking for library containing socket" >&5 + if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_func_search_save_LIBS="$LIBS" + ac_cv_search_socket="no" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_socket="none required" + else +@@ -9626,7 +9650,7 @@ + test "$ac_cv_search_socket" = "no" && for i in socket; do + LIBS="-l$i $ac_func_search_save_LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_socket="-l$i" + break +@@ -9659,14 +9683,14 @@ + fi + + echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6 +-echo "configure:9663: checking for library containing inet_addr" >&5 ++echo "configure:9687: checking for library containing inet_addr" >&5 + if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_func_search_save_LIBS="$LIBS" + ac_cv_search_inet_addr="no" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_inet_addr="none required" + else +@@ -9688,7 +9712,7 @@ + test "$ac_cv_search_inet_addr" = "no" && for i in nsl; do + LIBS="-l$i $ac_func_search_save_LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_search_inet_addr="-l$i" + break +@@ -9724,17 +9748,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:9728: checking for $ac_hdr" >&5 ++echo "configure:9752: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:9738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:9762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -9764,17 +9788,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:9768: checking for $ac_hdr" >&5 ++echo "configure:9792: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:9778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:9802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -9804,17 +9828,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:9808: checking for $ac_hdr" >&5 ++echo "configure:9832: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:9818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:9842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -9843,17 +9867,17 @@ + + + echo $ac_n "checking for prctl""... $ac_c" 1>&6 +-echo "configure:9847: checking for prctl" >&5 ++echo "configure:9871: checking for prctl" >&5 + + cat > conftest.$ac_ext < + int main() { + prctl(0, 0, 0, 0, 0); + ; return 0; } + EOF +-if { (eval echo configure:9857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:9881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + cat >> confdefs.h <<\EOF +@@ -9876,17 +9900,17 @@ + have_clock_gettime=no + + echo $ac_n "checking for clock_gettime""... $ac_c" 1>&6 +-echo "configure:9880: checking for clock_gettime" >&5 ++echo "configure:9904: checking for clock_gettime" >&5 + + cat > conftest.$ac_ext < + int main() { + struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); + ; return 0; } + EOF +-if { (eval echo configure:9890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + have_clock_gettime=yes +@@ -9904,20 +9928,20 @@ + + if test "$have_clock_gettime" = "no"; then + echo $ac_n "checking for clock_gettime in -lrt""... $ac_c" 1>&6 +-echo "configure:9908: checking for clock_gettime in -lrt" >&5 ++echo "configure:9932: checking for clock_gettime in -lrt" >&5 + + SAVED_LIBS="$LIBS" + LIBS="$LIBS -lrt" + + cat > conftest.$ac_ext < + int main() { + struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); + ; return 0; } + EOF +-if { (eval echo configure:9921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:9945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + have_clock_gettime=yes +@@ -9946,13 +9970,13 @@ + + if test "$have_clock_gettime" = "no"; then + echo $ac_n "checking for clock_get_time""... $ac_c" 1>&6 +-echo "configure:9950: checking for clock_get_time" >&5 ++echo "configure:9974: checking for clock_get_time" >&5 + + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + else + cat > conftest.$ac_ext < + #include +@@ -9976,7 +10000,7 @@ + } + + EOF +-if { (eval echo configure:9980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + have_clock_get_time=yes +@@ -10007,10 +10031,10 @@ + have_broken_ptrace=no + + echo $ac_n "checking for ptrace""... $ac_c" 1>&6 +-echo "configure:10011: checking for ptrace" >&5 ++echo "configure:10035: checking for ptrace" >&5 + + cat > conftest.$ac_ext < +@@ -10019,7 +10043,7 @@ + ptrace(0, 0, (void *) 0, 0); + ; return 0; } + EOF +-if { (eval echo configure:10023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + have_ptrace=yes +@@ -10037,13 +10061,13 @@ + + if test "$have_ptrace" = "yes"; then + echo $ac_n "checking whether ptrace works""... $ac_c" 1>&6 +-echo "configure:10041: checking whether ptrace works" >&5 ++echo "configure:10065: checking whether ptrace works" >&5 + + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + else + cat > conftest.$ac_ext < +@@ -10114,7 +10138,7 @@ + } + + EOF +-if { (eval echo configure:10118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + echo "$ac_t""yes" 1>&6 +@@ -10145,10 +10169,10 @@ + + if test "$have_broken_ptrace" = "yes"; then + echo $ac_n "checking for mach_vm_read""... $ac_c" 1>&6 +-echo "configure:10149: checking for mach_vm_read" >&5 ++echo "configure:10173: checking for mach_vm_read" >&5 + + cat > conftest.$ac_ext < + #include +@@ -10159,7 +10183,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:10163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + have_mach_vm_read=yes +@@ -10195,13 +10219,13 @@ + + if test -n "$proc_mem_file" ; then + echo $ac_n "checking for proc mem file""... $ac_c" 1>&6 +-echo "configure:10199: checking for proc mem file" >&5 ++echo "configure:10223: checking for proc mem file" >&5 + + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:10259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + echo "$ac_t""$proc_mem_file" 1>&6 +@@ -10275,9 +10299,9 @@ + + + echo $ac_n "checking if gcc supports __sync_bool_compare_and_swap""... $ac_c" 1>&6 +-echo "configure:10279: checking if gcc supports __sync_bool_compare_and_swap" >&5 ++echo "configure:10303: checking if gcc supports __sync_bool_compare_and_swap" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:10316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + echo "$ac_t""yes" 1>&6 +@@ -10311,17 +10335,17 @@ + have_lq=no + + echo $ac_n "checking for TCP_INFO""... $ac_c" 1>&6 +-echo "configure:10315: checking for TCP_INFO" >&5 ++echo "configure:10339: checking for TCP_INFO" >&5 + + cat > conftest.$ac_ext < + int main() { + struct tcp_info ti; int x = TCP_INFO; + ; return 0; } + EOF +-if { (eval echo configure:10325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + have_lq=tcp_info +@@ -10346,17 +10370,17 @@ + + if test "$have_lq" = "no" ; then + echo $ac_n "checking for SO_LISTENQLEN""... $ac_c" 1>&6 +-echo "configure:10350: checking for SO_LISTENQLEN" >&5 ++echo "configure:10374: checking for SO_LISTENQLEN" >&5 + + cat > conftest.$ac_ext < + int main() { + int x = SO_LISTENQLIMIT; int y = SO_LISTENQLEN; + ; return 0; } + EOF +-if { (eval echo configure:10360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:10384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + have_lq=so_listenq +@@ -10732,7 +10756,7 @@ + php_with_isapi=no + + echo $ac_n "checking for Zeus ISAPI support""... $ac_c" 1>&6 +-echo "configure:10736: checking for Zeus ISAPI support" >&5 ++echo "configure:10760: checking for Zeus ISAPI support" >&5 + # Check whether --with-isapi or --without-isapi was given. + if test "${with_isapi+set}" = set; then + withval="$with_isapi" +@@ -10986,7 +11010,7 @@ + + + echo $ac_n "checking for LiteSpeed support""... $ac_c" 1>&6 +-echo "configure:10990: checking for LiteSpeed support" >&5 ++echo "configure:11014: checking for LiteSpeed support" >&5 + + + php_with_litespeed=no +@@ -11249,7 +11273,7 @@ + php_with_milter=no + + echo $ac_n "checking for Milter support""... $ac_c" 1>&6 +-echo "configure:11253: checking for Milter support" >&5 ++echo "configure:11277: checking for Milter support" >&5 + # Check whether --with-milter or --without-milter was given. + if test "${with_milter+set}" = set; then + withval="$with_milter" +@@ -11541,7 +11565,7 @@ + php_with_nsapi=no + + echo $ac_n "checking for NSAPI support""... $ac_c" 1>&6 +-echo "configure:11545: checking for NSAPI support" >&5 ++echo "configure:11569: checking for NSAPI support" >&5 + # Check whether --with-nsapi or --without-nsapi was given. + if test "${with_nsapi+set}" = set; then + withval="$with_nsapi" +@@ -11565,7 +11589,7 @@ + { echo "configure: error: Please specify the path to the root of your Netscape/iPlanet/Sun Webserver using --with-nsapi=DIR" 1>&2; exit 1; } + fi + echo $ac_n "checking for NSAPI include files""... $ac_c" 1>&6 +-echo "configure:11569: checking for NSAPI include files" >&5 ++echo "configure:11593: checking for NSAPI include files" >&5 + if test -d $PHP_NSAPI/include ; then + NSAPI_INC_DIR="$PHP_NSAPI/include" + echo "$ac_t""Netscape 3.x / Sun 7.x style" 1>&6 +@@ -11573,17 +11597,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:11577: checking for $ac_hdr" >&5 ++echo "configure:11601: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:11587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:11611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -11618,17 +11642,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:11622: checking for $ac_hdr" >&5 ++echo "configure:11646: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:11632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:11656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -11901,7 +11925,7 @@ + php_with_phttpd=no + + echo $ac_n "checking for PHTTPD support""... $ac_c" 1>&6 +-echo "configure:11905: checking for PHTTPD support" >&5 ++echo "configure:11929: checking for PHTTPD support" >&5 + # Check whether --with-phttpd or --without-phttpd was given. + if test "${with_phttpd+set}" = set; then + withval="$with_phttpd" +@@ -12155,7 +12179,7 @@ + php_with_pi3web=no + + echo $ac_n "checking for Pi3Web support""... $ac_c" 1>&6 +-echo "configure:12159: checking for Pi3Web support" >&5 ++echo "configure:12183: checking for Pi3Web support" >&5 + # Check whether --with-pi3web or --without-pi3web was given. + if test "${with_pi3web+set}" = set; then + withval="$with_pi3web" +@@ -12527,7 +12551,7 @@ + php_enable_roxen_zts=no + + echo $ac_n "checking whether Roxen module is build using ZTS""... $ac_c" 1>&6 +-echo "configure:12531: checking whether Roxen module is build using ZTS" >&5 ++echo "configure:12555: checking whether Roxen module is build using ZTS" >&5 + # Check whether --enable-roxen-zts or --disable-roxen-zts was given. + if test "${enable_roxen_zts+set}" = set; then + enableval="$enable_roxen_zts" +@@ -12548,7 +12572,7 @@ + + RESULT= + echo $ac_n "checking for Roxen/Pike support""... $ac_c" 1>&6 +-echo "configure:12552: checking for Roxen/Pike support" >&5 ++echo "configure:12576: checking for Roxen/Pike support" >&5 + if test "$PHP_ROXEN" != "no"; then + if test ! -d $PHP_ROXEN ; then + { echo "configure: error: You did not specify a directory" 1>&2; exit 1; } +@@ -12834,7 +12858,7 @@ + + + echo $ac_n "checking for thttpd""... $ac_c" 1>&6 +-echo "configure:12838: checking for thttpd" >&5 ++echo "configure:12862: checking for thttpd" >&5 + + if test "$PHP_THTTPD" != "no"; then + if test ! -d $PHP_THTTPD; then +@@ -12867,7 +12891,7 @@ + + gcc_arg_name=ac_cv_gcc_arg_rdynamic + echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6 +-echo "configure:12871: checking whether $CC supports -rdynamic" >&5 ++echo "configure:12895: checking whether $CC supports -rdynamic" >&5 + if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -13103,24 +13127,24 @@ + + + echo $ac_n "checking for TUX""... $ac_c" 1>&6 +-echo "configure:13107: checking for TUX" >&5 ++echo "configure:13131: checking for TUX" >&5 + if test "$PHP_TUX" != "no"; then + INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $PHP_TUX/php5.tux.so" + for ac_hdr in tuxmodule.h + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:13114: checking for $ac_hdr" >&5 ++echo "configure:13138: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:13124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:13148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -13357,7 +13381,7 @@ + + + echo $ac_n "checking for webjames""... $ac_c" 1>&6 +-echo "configure:13361: checking for webjames" >&5 ++echo "configure:13385: checking for webjames" >&5 + + if test "$PHP_WEBJAMES" != "no"; then + +@@ -13617,14 +13641,14 @@ + + if test "$PHP_SAPI" = "default"; then + echo $ac_n "checking whether to build CGI binary""... $ac_c" 1>&6 +-echo "configure:13621: checking whether to build CGI binary" >&5 ++echo "configure:13645: checking whether to build CGI binary" >&5 + if test "$PHP_CGI" != "no"; then + echo "$ac_t""yes" 1>&6 + + echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6 +-echo "configure:13626: checking for socklen_t in sys/socket.h" >&5 ++echo "configure:13650: checking for socklen_t in sys/socket.h" >&5 + cat > conftest.$ac_ext < + EOF +@@ -13644,9 +13668,9 @@ + + + echo $ac_n "checking for sun_len in sys/un.h""... $ac_c" 1>&6 +-echo "configure:13648: checking for sun_len in sys/un.h" >&5 ++echo "configure:13672: checking for sun_len in sys/un.h" >&5 + cat > conftest.$ac_ext < + EOF +@@ -13666,7 +13690,7 @@ + + + echo $ac_n "checking whether cross-process locking is required by accept()""... $ac_c" 1>&6 +-echo "configure:13670: checking whether cross-process locking is required by accept()" >&5 ++echo "configure:13694: checking whether cross-process locking is required by accept()" >&5 + case "`uname -sr`" in + IRIX\ 5.* | SunOS\ 5.* | UNIX_System_V\ 4.0) + echo "$ac_t""yes" 1>&6 +@@ -13910,7 +13934,7 @@ + + + echo $ac_n "checking for chosen SAPI module""... $ac_c" 1>&6 +-echo "configure:13914: checking for chosen SAPI module" >&5 ++echo "configure:13938: checking for chosen SAPI module" >&5 + echo "$ac_t""$PHP_SAPI" 1>&6 + + if test "$enable_maintainer_zts" = "yes"; then +@@ -13967,7 +13991,7 @@ + # Extract the first word of "sendmail", so it can be a program name with args. + set dummy sendmail; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:13971: checking for $ac_word" >&5 ++echo "configure:13995: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PROG_SENDMAIL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -14006,7 +14030,7 @@ + + + echo $ac_n "checking whether system uses EBCDIC""... $ac_c" 1>&6 +-echo "configure:14010: checking whether system uses EBCDIC" >&5 ++echo "configure:14034: checking whether system uses EBCDIC" >&5 + if eval "test \"`echo '$''{'ac_cv_ebcdic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -14017,7 +14041,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:14053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_ebcdic=yes +@@ -14053,7 +14077,7 @@ + + + echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +-echo "configure:14057: checking whether byte ordering is bigendian" >&5 ++echo "configure:14081: checking whether byte ordering is bigendian" >&5 + if eval "test \"`echo '$''{'ac_cv_c_bigendian_php'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -14063,7 +14087,7 @@ + ac_cv_c_bigendian_php=unknown + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:14107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_c_bigendian_php=yes + else +@@ -14105,7 +14129,7 @@ + + + echo $ac_n "checking whether writing to stdout works""... $ac_c" 1>&6 +-echo "configure:14109: checking whether writing to stdout works" >&5 ++echo "configure:14133: checking whether writing to stdout works" >&5 + if eval "test \"`echo '$''{'ac_cv_write_stdout'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -14116,7 +14140,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:14162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_write_stdout=yes +@@ -14209,12 +14233,12 @@ + unset found + + echo $ac_n "checking for socket""... $ac_c" 1>&6 +-echo "configure:14213: checking for socket" >&5 ++echo "configure:14237: checking for socket" >&5 + if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:14265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_socket=yes" + else +@@ -14255,12 +14279,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __socket""... $ac_c" 1>&6 +-echo "configure:14259: checking for __socket" >&5 ++echo "configure:14283: checking for __socket" >&5 + if eval "test \"`echo '$''{'ac_cv_func___socket'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:14311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___socket=yes" + else +@@ -14321,7 +14345,7 @@ + unset ac_cv_lib_socket___socket + unset found + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +-echo "configure:14325: checking for socket in -lsocket" >&5 ++echo "configure:14349: checking for socket in -lsocket" >&5 + ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -14329,7 +14353,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:14368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -14360,7 +14384,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __socket in -lsocket""... $ac_c" 1>&6 +-echo "configure:14364: checking for __socket in -lsocket" >&5 ++echo "configure:14388: checking for __socket in -lsocket" >&5 + ac_lib_var=`echo socket'_'__socket | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -14368,7 +14392,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:14407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -14411,11 +14435,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:14443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -14466,12 +14490,12 @@ + unset found + + echo $ac_n "checking for socketpair""... $ac_c" 1>&6 +-echo "configure:14470: checking for socketpair" >&5 ++echo "configure:14494: checking for socketpair" >&5 + if eval "test \"`echo '$''{'ac_cv_func_socketpair'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:14522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_socketpair=yes" + else +@@ -14512,12 +14536,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __socketpair""... $ac_c" 1>&6 +-echo "configure:14516: checking for __socketpair" >&5 ++echo "configure:14540: checking for __socketpair" >&5 + if eval "test \"`echo '$''{'ac_cv_func___socketpair'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:14568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___socketpair=yes" + else +@@ -14578,7 +14602,7 @@ + unset ac_cv_lib_socket___socketpair + unset found + echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6 +-echo "configure:14582: checking for socketpair in -lsocket" >&5 ++echo "configure:14606: checking for socketpair in -lsocket" >&5 + ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -14586,7 +14610,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:14625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -14617,7 +14641,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __socketpair in -lsocket""... $ac_c" 1>&6 +-echo "configure:14621: checking for __socketpair in -lsocket" >&5 ++echo "configure:14645: checking for __socketpair in -lsocket" >&5 + ac_lib_var=`echo socket'_'__socketpair | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -14625,7 +14649,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:14664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -14668,11 +14692,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:14700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -14723,12 +14747,12 @@ + unset found + + echo $ac_n "checking for htonl""... $ac_c" 1>&6 +-echo "configure:14727: checking for htonl" >&5 ++echo "configure:14751: checking for htonl" >&5 + if eval "test \"`echo '$''{'ac_cv_func_htonl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:14779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_htonl=yes" + else +@@ -14769,12 +14793,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __htonl""... $ac_c" 1>&6 +-echo "configure:14773: checking for __htonl" >&5 ++echo "configure:14797: checking for __htonl" >&5 + if eval "test \"`echo '$''{'ac_cv_func___htonl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:14825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___htonl=yes" + else +@@ -14835,7 +14859,7 @@ + unset ac_cv_lib_socket___htonl + unset found + echo $ac_n "checking for htonl in -lsocket""... $ac_c" 1>&6 +-echo "configure:14839: checking for htonl in -lsocket" >&5 ++echo "configure:14863: checking for htonl in -lsocket" >&5 + ac_lib_var=`echo socket'_'htonl | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -14843,7 +14867,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:14882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -14874,7 +14898,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __htonl in -lsocket""... $ac_c" 1>&6 +-echo "configure:14878: checking for __htonl in -lsocket" >&5 ++echo "configure:14902: checking for __htonl in -lsocket" >&5 + ac_lib_var=`echo socket'_'__htonl | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -14882,7 +14906,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:14921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -14925,11 +14949,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:14957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -14980,12 +15004,12 @@ + unset found + + echo $ac_n "checking for gethostname""... $ac_c" 1>&6 +-echo "configure:14984: checking for gethostname" >&5 ++echo "configure:15008: checking for gethostname" >&5 + if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_gethostname=yes" + else +@@ -15026,12 +15050,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __gethostname""... $ac_c" 1>&6 +-echo "configure:15030: checking for __gethostname" >&5 ++echo "configure:15054: checking for __gethostname" >&5 + if eval "test \"`echo '$''{'ac_cv_func___gethostname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___gethostname=yes" + else +@@ -15092,7 +15116,7 @@ + unset ac_cv_lib_nsl___gethostname + unset found + echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 +-echo "configure:15096: checking for gethostname in -lnsl" >&5 ++echo "configure:15120: checking for gethostname in -lnsl" >&5 + ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -15100,7 +15124,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -15131,7 +15155,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __gethostname in -lnsl""... $ac_c" 1>&6 +-echo "configure:15135: checking for __gethostname in -lnsl" >&5 ++echo "configure:15159: checking for __gethostname in -lnsl" >&5 + ac_lib_var=`echo nsl'_'__gethostname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -15139,7 +15163,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -15182,11 +15206,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:15214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -15237,12 +15261,12 @@ + unset found + + echo $ac_n "checking for gethostbyaddr""... $ac_c" 1>&6 +-echo "configure:15241: checking for gethostbyaddr" >&5 ++echo "configure:15265: checking for gethostbyaddr" >&5 + if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_gethostbyaddr=yes" + else +@@ -15283,12 +15307,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __gethostbyaddr""... $ac_c" 1>&6 +-echo "configure:15287: checking for __gethostbyaddr" >&5 ++echo "configure:15311: checking for __gethostbyaddr" >&5 + if eval "test \"`echo '$''{'ac_cv_func___gethostbyaddr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___gethostbyaddr=yes" + else +@@ -15349,7 +15373,7 @@ + unset ac_cv_lib_nsl___gethostbyaddr + unset found + echo $ac_n "checking for gethostbyaddr in -lnsl""... $ac_c" 1>&6 +-echo "configure:15353: checking for gethostbyaddr in -lnsl" >&5 ++echo "configure:15377: checking for gethostbyaddr in -lnsl" >&5 + ac_lib_var=`echo nsl'_'gethostbyaddr | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -15357,7 +15381,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -15388,7 +15412,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __gethostbyaddr in -lnsl""... $ac_c" 1>&6 +-echo "configure:15392: checking for __gethostbyaddr in -lnsl" >&5 ++echo "configure:15416: checking for __gethostbyaddr in -lnsl" >&5 + ac_lib_var=`echo nsl'_'__gethostbyaddr | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -15396,7 +15420,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -15439,11 +15463,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:15471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -15494,12 +15518,12 @@ + unset found + + echo $ac_n "checking for yp_get_default_domain""... $ac_c" 1>&6 +-echo "configure:15498: checking for yp_get_default_domain" >&5 ++echo "configure:15522: checking for yp_get_default_domain" >&5 + if eval "test \"`echo '$''{'ac_cv_func_yp_get_default_domain'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_yp_get_default_domain=yes" + else +@@ -15540,12 +15564,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __yp_get_default_domain""... $ac_c" 1>&6 +-echo "configure:15544: checking for __yp_get_default_domain" >&5 ++echo "configure:15568: checking for __yp_get_default_domain" >&5 + if eval "test \"`echo '$''{'ac_cv_func___yp_get_default_domain'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___yp_get_default_domain=yes" + else +@@ -15606,7 +15630,7 @@ + unset ac_cv_lib_nsl___yp_get_default_domain + unset found + echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 +-echo "configure:15610: checking for yp_get_default_domain in -lnsl" >&5 ++echo "configure:15634: checking for yp_get_default_domain in -lnsl" >&5 + ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -15614,7 +15638,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -15645,7 +15669,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __yp_get_default_domain in -lnsl""... $ac_c" 1>&6 +-echo "configure:15649: checking for __yp_get_default_domain in -lnsl" >&5 ++echo "configure:15673: checking for __yp_get_default_domain in -lnsl" >&5 + ac_lib_var=`echo nsl'_'__yp_get_default_domain | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -15653,7 +15677,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -15696,11 +15720,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:15728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -15752,12 +15776,12 @@ + unset found + + echo $ac_n "checking for dlopen""... $ac_c" 1>&6 +-echo "configure:15756: checking for dlopen" >&5 ++echo "configure:15780: checking for dlopen" >&5 + if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dlopen=yes" + else +@@ -15798,12 +15822,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __dlopen""... $ac_c" 1>&6 +-echo "configure:15802: checking for __dlopen" >&5 ++echo "configure:15826: checking for __dlopen" >&5 + if eval "test \"`echo '$''{'ac_cv_func___dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___dlopen=yes" + else +@@ -15864,7 +15888,7 @@ + unset ac_cv_lib_dl___dlopen + unset found + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +-echo "configure:15868: checking for dlopen in -ldl" >&5 ++echo "configure:15892: checking for dlopen in -ldl" >&5 + ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -15872,7 +15896,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -15903,7 +15927,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dlopen in -ldl""... $ac_c" 1>&6 +-echo "configure:15907: checking for __dlopen in -ldl" >&5 ++echo "configure:15931: checking for __dlopen in -ldl" >&5 + ac_lib_var=`echo dl'_'__dlopen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -15911,7 +15935,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:15950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -15954,11 +15978,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:15986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -16010,7 +16034,7 @@ + + fi + echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 +-echo "configure:16014: checking for sin in -lm" >&5 ++echo "configure:16038: checking for sin in -lm" >&5 + ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -16018,7 +16042,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lm $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -16063,12 +16087,12 @@ + unset found + + echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 +-echo "configure:16067: checking for inet_aton" >&5 ++echo "configure:16091: checking for inet_aton" >&5 + if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_inet_aton=yes" + else +@@ -16109,12 +16133,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __inet_aton""... $ac_c" 1>&6 +-echo "configure:16113: checking for __inet_aton" >&5 ++echo "configure:16137: checking for __inet_aton" >&5 + if eval "test \"`echo '$''{'ac_cv_func___inet_aton'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___inet_aton=yes" + else +@@ -16175,7 +16199,7 @@ + unset ac_cv_lib_resolv___inet_aton + unset found + echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 +-echo "configure:16179: checking for inet_aton in -lresolv" >&5 ++echo "configure:16203: checking for inet_aton in -lresolv" >&5 + ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -16183,7 +16207,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -16214,7 +16238,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __inet_aton in -lresolv""... $ac_c" 1>&6 +-echo "configure:16218: checking for __inet_aton in -lresolv" >&5 ++echo "configure:16242: checking for __inet_aton in -lresolv" >&5 + ac_lib_var=`echo resolv'_'__inet_aton | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -16222,7 +16246,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -16265,11 +16289,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:16297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -16311,7 +16335,7 @@ + unset ac_cv_lib_bind___inet_aton + unset found + echo $ac_n "checking for inet_aton in -lbind""... $ac_c" 1>&6 +-echo "configure:16315: checking for inet_aton in -lbind" >&5 ++echo "configure:16339: checking for inet_aton in -lbind" >&5 + ac_lib_var=`echo bind'_'inet_aton | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -16319,7 +16343,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lbind $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -16350,7 +16374,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __inet_aton in -lbind""... $ac_c" 1>&6 +-echo "configure:16354: checking for __inet_aton in -lbind" >&5 ++echo "configure:16378: checking for __inet_aton in -lbind" >&5 + ac_lib_var=`echo bind'_'__inet_aton | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -16358,7 +16382,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lbind $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -16401,11 +16425,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:16433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -16456,12 +16480,12 @@ + + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +-echo "configure:16460: checking for ANSI C header files" >&5 ++echo "configure:16484: checking for ANSI C header files" >&5 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -16469,7 +16493,7 @@ + #include + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:16473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:16497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -16486,7 +16510,7 @@ + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -16504,7 +16528,7 @@ + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -16525,7 +16549,7 @@ + : + else + cat > conftest.$ac_ext < + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +@@ -16536,7 +16560,7 @@ + exit (0); } + + EOF +-if { (eval echo configure:16540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:16564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else +@@ -16564,12 +16588,12 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +-echo "configure:16568: checking for $ac_hdr that defines DIR" >&5 ++echo "configure:16592: checking for $ac_hdr that defines DIR" >&5 + if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include <$ac_hdr> +@@ -16577,7 +16601,7 @@ + DIR *dirp = 0; + ; return 0; } + EOF +-if { (eval echo configure:16581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:16605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" + else +@@ -16602,7 +16626,7 @@ + # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. + if test $ac_header_dirent = dirent.h; then + echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +-echo "configure:16606: checking for opendir in -ldir" >&5 ++echo "configure:16630: checking for opendir in -ldir" >&5 + ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -16610,7 +16634,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldir $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -16643,7 +16667,7 @@ + + else + echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +-echo "configure:16647: checking for opendir in -lx" >&5 ++echo "configure:16671: checking for opendir in -lx" >&5 + ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -16651,7 +16675,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lx $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -16744,17 +16768,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:16748: checking for $ac_hdr" >&5 ++echo "configure:16772: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:16758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:16782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -16783,12 +16807,12 @@ + + + echo $ac_n "checking for fopencookie""... $ac_c" 1>&6 +-echo "configure:16787: checking for fopencookie" >&5 ++echo "configure:16811: checking for fopencookie" >&5 + if eval "test \"`echo '$''{'ac_cv_func_fopencookie'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:16839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_fopencookie=yes" + else +@@ -16833,7 +16857,7 @@ + + if test "$have_glibc_fopencookie" = "yes"; then + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:16871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + have_cookie_io_functions_t=yes + else +@@ -16862,7 +16886,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:16922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + cookie_io_functions_use_off64_t=yes +@@ -16914,7 +16938,7 @@ + else + + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:16952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + have_IO_cookie_io_functions_t=yes + else +@@ -16958,7 +16982,7 @@ + + + echo $ac_n "checking for broken getcwd""... $ac_c" 1>&6 +-echo "configure:16962: checking for broken getcwd" >&5 ++echo "configure:16986: checking for broken getcwd" >&5 + os=`uname -sr 2>/dev/null` + case $os in + SunOS*) +@@ -16973,14 +16997,14 @@ + + + echo $ac_n "checking for broken libc stdio""... $ac_c" 1>&6 +-echo "configure:16977: checking for broken libc stdio" >&5 ++echo "configure:17001: checking for broken libc stdio" >&5 + if eval "test \"`echo '$''{'_cv_have_broken_glibc_fopen_append'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + if test "$cross_compiling" = yes; then + cat > conftest.$ac_ext < +@@ -16993,7 +17017,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:16997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + _cv_have_broken_glibc_fopen_append=yes + else +@@ -17006,7 +17030,7 @@ + + else + cat > conftest.$ac_ext < +@@ -17034,7 +17058,7 @@ + } + + EOF +-if { (eval echo configure:17038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:17062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + _cv_have_broken_glibc_fopen_append=no + else +@@ -17062,12 +17086,12 @@ + + + echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 +-echo "configure:17066: checking whether struct tm is in sys/time.h or time.h" >&5 ++echo "configure:17090: checking whether struct tm is in sys/time.h or time.h" >&5 + if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -17075,7 +17099,7 @@ + struct tm *tp; tp->tm_sec; + ; return 0; } + EOF +-if { (eval echo configure:17079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm=time.h + else +@@ -17096,12 +17120,12 @@ + fi + + echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 +-echo "configure:17100: checking for tm_zone in struct tm" >&5 ++echo "configure:17124: checking for tm_zone in struct tm" >&5 + if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include <$ac_cv_struct_tm> +@@ -17109,7 +17133,7 @@ + struct tm tm; tm.tm_zone; + ; return 0; } + EOF +-if { (eval echo configure:17113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm_zone=yes + else +@@ -17129,12 +17153,12 @@ + + else + echo $ac_n "checking for tzname""... $ac_c" 1>&6 +-echo "configure:17133: checking for tzname" >&5 ++echo "configure:17157: checking for tzname" >&5 + if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #ifndef tzname /* For SGI. */ +@@ -17144,7 +17168,7 @@ + atoi(*tzname); + ; return 0; } + EOF +-if { (eval echo configure:17148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:17172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_var_tzname=yes + else +@@ -17168,16 +17192,16 @@ + + + echo $ac_n "checking for missing declarations of reentrant functions""... $ac_c" 1>&6 +-echo "configure:17172: checking for missing declarations of reentrant functions" >&5 ++echo "configure:17196: checking for missing declarations of reentrant functions" >&5 + cat > conftest.$ac_ext < + int main() { + struct tm *(*func)() = localtime_r + ; return 0; } + EOF +-if { (eval echo configure:17181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + : +@@ -17195,14 +17219,14 @@ + fi + rm -f conftest* + cat > conftest.$ac_ext < + int main() { + struct tm *(*func)() = gmtime_r + ; return 0; } + EOF +-if { (eval echo configure:17206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + : +@@ -17220,14 +17244,14 @@ + fi + rm -f conftest* + cat > conftest.$ac_ext < + int main() { + char *(*func)() = asctime_r + ; return 0; } + EOF +-if { (eval echo configure:17231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + : +@@ -17245,14 +17269,14 @@ + fi + rm -f conftest* + cat > conftest.$ac_ext < + int main() { + char *(*func)() = ctime_r + ; return 0; } + EOF +-if { (eval echo configure:17256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + : +@@ -17270,14 +17294,14 @@ + fi + rm -f conftest* + cat > conftest.$ac_ext < + int main() { + char *(*func)() = strtok_r + ; return 0; } + EOF +-if { (eval echo configure:17281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + : +@@ -17298,16 +17322,16 @@ + + + echo $ac_n "checking for fclose declaration""... $ac_c" 1>&6 +-echo "configure:17302: checking for fclose declaration" >&5 ++echo "configure:17326: checking for fclose declaration" >&5 + cat > conftest.$ac_ext < + int main() { + int (*func)() = fclose + ; return 0; } + EOF +-if { (eval echo configure:17311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + cat >> confdefs.h <<\EOF +@@ -17333,12 +17357,12 @@ + + + echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 +-echo "configure:17337: checking for tm_gmtoff in struct tm" >&5 ++echo "configure:17361: checking for tm_gmtoff in struct tm" >&5 + if eval "test \"`echo '$''{'ac_cv_struct_tm_gmtoff'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include <$ac_cv_struct_tm> +@@ -17346,7 +17370,7 @@ + struct tm tm; tm.tm_gmtoff; + ; return 0; } + EOF +-if { (eval echo configure:17350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm_gmtoff=yes + else +@@ -17369,12 +17393,12 @@ + + + echo $ac_n "checking for struct flock""... $ac_c" 1>&6 +-echo "configure:17373: checking for struct flock" >&5 ++echo "configure:17397: checking for struct flock" >&5 + if eval "test \"`echo '$''{'ac_cv_struct_flock'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -17384,7 +17408,7 @@ + struct flock x; + ; return 0; } + EOF +-if { (eval echo configure:17388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_struct_flock=yes +@@ -17411,12 +17435,12 @@ + + + echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 +-echo "configure:17415: checking for socklen_t" >&5 ++echo "configure:17439: checking for socklen_t" >&5 + if eval "test \"`echo '$''{'ac_cv_socklen_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -17428,7 +17452,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:17432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_socklen_t=yes +@@ -17454,7 +17478,7 @@ + + + echo $ac_n "checking size of size_t""... $ac_c" 1>&6 +-echo "configure:17458: checking size of size_t" >&5 ++echo "configure:17482: checking size of size_t" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -17462,18 +17486,19 @@ + ac_cv_sizeof_size_t=8 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(size_t)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:17477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:17502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_size_t=`cat conftestval` + else +@@ -17493,7 +17518,7 @@ + + + echo $ac_n "checking size of long long""... $ac_c" 1>&6 +-echo "configure:17497: checking size of long long" >&5 ++echo "configure:17522: checking size of long long" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -17501,18 +17526,19 @@ + ac_cv_sizeof_long_long=8 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long long)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:17516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:17542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_long_long=`cat conftestval` + else +@@ -17532,7 +17558,7 @@ + + + echo $ac_n "checking size of long long int""... $ac_c" 1>&6 +-echo "configure:17536: checking size of long long int" >&5 ++echo "configure:17562: checking size of long long int" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -17540,18 +17566,19 @@ + ac_cv_sizeof_long_long_int=8 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long long int)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:17555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:17582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_long_long_int=`cat conftestval` + else +@@ -17571,7 +17598,7 @@ + + + echo $ac_n "checking size of long""... $ac_c" 1>&6 +-echo "configure:17575: checking size of long" >&5 ++echo "configure:17602: checking size of long" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -17579,18 +17606,19 @@ + ac_cv_sizeof_long=8 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:17594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:17622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_long=`cat conftestval` + else +@@ -17610,7 +17638,7 @@ + + + echo $ac_n "checking size of int""... $ac_c" 1>&6 +-echo "configure:17614: checking size of int" >&5 ++echo "configure:17642: checking size of int" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -17618,18 +17646,19 @@ + ac_cv_sizeof_int=4 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(int)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:17633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:17662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_int=`cat conftestval` + else +@@ -17651,7 +17680,7 @@ + + + echo $ac_n "checking size of intmax_t""... $ac_c" 1>&6 +-echo "configure:17655: checking size of intmax_t" >&5 ++echo "configure:17684: checking size of intmax_t" >&5 + + php_cache_value=php_cv_sizeof_intmax_t + if eval "test \"`echo '$''{'php_cv_sizeof_intmax_t'+set}'`\" = set"; then +@@ -17668,7 +17697,7 @@ + + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -17692,7 +17721,7 @@ + } + + EOF +-if { (eval echo configure:17696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:17725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + eval $php_cache_value=`cat conftestval` +@@ -17731,7 +17760,7 @@ + + + echo $ac_n "checking size of ssize_t""... $ac_c" 1>&6 +-echo "configure:17735: checking size of ssize_t" >&5 ++echo "configure:17764: checking size of ssize_t" >&5 + + php_cache_value=php_cv_sizeof_ssize_t + if eval "test \"`echo '$''{'php_cv_sizeof_ssize_t'+set}'`\" = set"; then +@@ -17748,7 +17777,7 @@ + + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -17772,7 +17801,7 @@ + } + + EOF +-if { (eval echo configure:17776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:17805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + eval $php_cache_value=`cat conftestval` +@@ -17811,7 +17840,7 @@ + + + echo $ac_n "checking size of ptrdiff_t""... $ac_c" 1>&6 +-echo "configure:17815: checking size of ptrdiff_t" >&5 ++echo "configure:17844: checking size of ptrdiff_t" >&5 + + php_cache_value=php_cv_sizeof_ptrdiff_t + if eval "test \"`echo '$''{'php_cv_sizeof_ptrdiff_t'+set}'`\" = set"; then +@@ -17828,7 +17857,7 @@ + + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -17852,7 +17881,7 @@ + } + + EOF +-if { (eval echo configure:17856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:17885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + eval $php_cache_value=`cat conftestval` +@@ -17891,12 +17920,12 @@ + + + echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 +-echo "configure:17895: checking for st_blksize in struct stat" >&5 ++echo "configure:17924: checking for st_blksize in struct stat" >&5 + if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -17904,7 +17933,7 @@ + struct stat s; s.st_blksize; + ; return 0; } + EOF +-if { (eval echo configure:17908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_blksize=yes + else +@@ -17926,12 +17955,12 @@ + + if test "`uname -s 2>/dev/null`" != "QNX"; then + echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 +-echo "configure:17930: checking for st_blocks in struct stat" >&5 ++echo "configure:17959: checking for st_blocks in struct stat" >&5 + if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -17939,7 +17968,7 @@ + struct stat s; s.st_blocks; + ; return 0; } + EOF +-if { (eval echo configure:17943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:17972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_blocks=yes + else +@@ -17966,12 +17995,12 @@ + WARNING_LEVEL=0 + fi + echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 +-echo "configure:17970: checking for st_rdev in struct stat" >&5 ++echo "configure:17999: checking for st_rdev in struct stat" >&5 + if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -17979,7 +18008,7 @@ + struct stat s; s.st_rdev; + ; return 0; } + EOF +-if { (eval echo configure:17983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:18012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_rdev=yes + else +@@ -18001,12 +18030,12 @@ + + + echo $ac_n "checking for size_t""... $ac_c" 1>&6 +-echo "configure:18005: checking for size_t" >&5 ++echo "configure:18034: checking for size_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -18034,12 +18063,12 @@ + fi + + echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +-echo "configure:18038: checking for uid_t in sys/types.h" >&5 ++echo "configure:18067: checking for uid_t in sys/types.h" >&5 + if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF +@@ -18070,12 +18099,12 @@ + + + echo $ac_n "checking for struct sockaddr_storage""... $ac_c" 1>&6 +-echo "configure:18074: checking for struct sockaddr_storage" >&5 ++echo "configure:18103: checking for struct sockaddr_storage" >&5 + if eval "test \"`echo '$''{'ac_cv_sockaddr_storage'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -18083,7 +18112,7 @@ + struct sockaddr_storage s; s + ; return 0; } + EOF +-if { (eval echo configure:18087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:18116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sockaddr_storage=yes + else +@@ -18104,13 +18133,13 @@ + + fi + echo $ac_n "checking for field sa_len in struct sockaddr""... $ac_c" 1>&6 +-echo "configure:18108: checking for field sa_len in struct sockaddr" >&5 ++echo "configure:18137: checking for field sa_len in struct sockaddr" >&5 + if eval "test \"`echo '$''{'ac_cv_sockaddr_sa_len'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -18118,7 +18147,7 @@ + static struct sockaddr sa; int n = (int) sa.sa_len; return n; + ; return 0; } + EOF +-if { (eval echo configure:18122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:18151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sockaddr_sa_len=yes + else +@@ -18141,12 +18170,12 @@ + + + echo $ac_n "checking for IPv6 support""... $ac_c" 1>&6 +-echo "configure:18145: checking for IPv6 support" >&5 ++echo "configure:18174: checking for IPv6 support" >&5 + if eval "test \"`echo '$''{'ac_cv_ipv6_support'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -18155,7 +18184,7 @@ + struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0; + ; return 0; } + EOF +-if { (eval echo configure:18159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:18188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_ipv6_support=yes + else +@@ -18171,12 +18200,12 @@ + + + echo $ac_n "checking for vprintf""... $ac_c" 1>&6 +-echo "configure:18175: checking for vprintf" >&5 ++echo "configure:18204: checking for vprintf" >&5 + if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:18232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vprintf=yes" + else +@@ -18223,12 +18252,12 @@ + + if test "$ac_cv_func_vprintf" != yes; then + echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +-echo "configure:18227: checking for _doprnt" >&5 ++echo "configure:18256: checking for _doprnt" >&5 + if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:18284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__doprnt=yes" + else +@@ -18359,12 +18388,12 @@ + + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:18363: checking for $ac_func" >&5 ++echo "configure:18392: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:18420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -18418,7 +18447,7 @@ + unset ac_cv_lib_rt___nanosleep + unset found + echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6 +-echo "configure:18422: checking for nanosleep in -lrt" >&5 ++echo "configure:18451: checking for nanosleep in -lrt" >&5 + ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -18426,7 +18455,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lrt $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:18470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -18457,7 +18486,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __nanosleep in -lrt""... $ac_c" 1>&6 +-echo "configure:18461: checking for __nanosleep in -lrt" >&5 ++echo "configure:18490: checking for __nanosleep in -lrt" >&5 + ac_lib_var=`echo rt'_'__nanosleep | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -18465,7 +18494,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lrt $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:18509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -18508,11 +18537,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:18545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -18556,25 +18585,25 @@ + + + echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 +-echo "configure:18560: checking for getaddrinfo" >&5 ++echo "configure:18589: checking for getaddrinfo" >&5 + if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g); + ; return 0; } + EOF +-if { (eval echo configure:18572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:18601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + if test "$cross_compiling" = yes; then + ac_cv_func_getaddrinfo=no + else + cat > conftest.$ac_ext < +@@ -18614,7 +18643,7 @@ + } + + EOF +-if { (eval echo configure:18618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:18647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_func_getaddrinfo=yes + else +@@ -18646,12 +18675,12 @@ + for ac_func in strlcat strlcpy getopt + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:18650: checking for $ac_func" >&5 ++echo "configure:18679: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:18707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -18701,7 +18730,7 @@ + + + echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6 +-echo "configure:18705: checking whether utime accepts a null argument" >&5 ++echo "configure:18734: checking whether utime accepts a null argument" >&5 + if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -18711,7 +18740,7 @@ + ac_cv_func_utime_null=no + else + cat > conftest.$ac_ext < + #include +@@ -18722,7 +18751,7 @@ + && t.st_mtime - s.st_mtime < 120)); + } + EOF +-if { (eval echo configure:18726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:18755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_func_utime_null=yes + else +@@ -18748,19 +18777,19 @@ + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! + echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 +-echo "configure:18752: checking for working alloca.h" >&5 ++echo "configure:18781: checking for working alloca.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + char *p = alloca(2 * sizeof(int)); + ; return 0; } + EOF +-if { (eval echo configure:18764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:18793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_header_alloca_h=yes + else +@@ -18781,12 +18810,12 @@ + fi + + echo $ac_n "checking for alloca""... $ac_c" 1>&6 +-echo "configure:18785: checking for alloca" >&5 ++echo "configure:18814: checking for alloca" >&5 + if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:18847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_alloca_works=yes + else +@@ -18846,12 +18875,12 @@ + + + echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +-echo "configure:18850: checking whether alloca needs Cray hooks" >&5 ++echo "configure:18879: checking whether alloca needs Cray hooks" >&5 + if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +-echo "configure:18880: checking for $ac_func" >&5 ++echo "configure:18909: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:18937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -18931,7 +18960,7 @@ + fi + + echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +-echo "configure:18935: checking stack direction for C alloca" >&5 ++echo "configure:18964: checking stack direction for C alloca" >&5 + if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -18939,7 +18968,7 @@ + ac_cv_c_stack_direction=0 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:18991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_c_stack_direction=1 + else +@@ -18981,13 +19010,13 @@ + + + echo $ac_n "checking for declared timezone""... $ac_c" 1>&6 +-echo "configure:18985: checking for declared timezone" >&5 ++echo "configure:19014: checking for declared timezone" >&5 + if eval "test \"`echo '$''{'ac_cv_declared_timezone'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < +@@ -19002,7 +19031,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:19006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:19035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_declared_timezone=yes +@@ -19028,7 +19057,7 @@ + + + echo $ac_n "checking for type of reentrant time-related functions""... $ac_c" 1>&6 +-echo "configure:19032: checking for type of reentrant time-related functions" >&5 ++echo "configure:19061: checking for type of reentrant time-related functions" >&5 + if eval "test \"`echo '$''{'ac_cv_time_r_type'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -19039,7 +19068,7 @@ + + else + cat > conftest.$ac_ext < +@@ -19057,7 +19086,7 @@ + } + + EOF +-if { (eval echo configure:19061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:19090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_time_r_type=hpux +@@ -19073,7 +19102,7 @@ + + else + cat > conftest.$ac_ext < +@@ -19089,7 +19118,7 @@ + } + + EOF +-if { (eval echo configure:19093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:19122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_time_r_type=irix +@@ -19127,12 +19156,12 @@ + + + echo $ac_n "checking for readdir_r""... $ac_c" 1>&6 +-echo "configure:19131: checking for readdir_r" >&5 ++echo "configure:19160: checking for readdir_r" >&5 + if eval "test \"`echo '$''{'ac_cv_func_readdir_r'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:19188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_readdir_r=yes" + else +@@ -19177,7 +19206,7 @@ + + if test "$ac_cv_func_readdir_r" = "yes"; then + echo $ac_n "checking for type of readdir_r""... $ac_c" 1>&6 +-echo "configure:19181: checking for type of readdir_r" >&5 ++echo "configure:19210: checking for type of readdir_r" >&5 + if eval "test \"`echo '$''{'ac_cv_what_readdir_r'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -19188,7 +19217,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:19246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_what_readdir_r=POSIX +@@ -19224,7 +19253,7 @@ + rm -fr conftest* + + cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:19267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -19276,12 +19305,12 @@ + + + echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6 +-echo "configure:19280: checking for in_addr_t" >&5 ++echo "configure:19309: checking for in_addr_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_in_addr_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -19315,12 +19344,12 @@ + for ac_func in crypt_r + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:19319: checking for $ac_func" >&5 ++echo "configure:19348: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:19376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -19371,14 +19400,14 @@ + if test "x$php_crypt_r" = "x1"; then + + echo $ac_n "checking which data struct is used by crypt_r""... $ac_c" 1>&6 +-echo "configure:19375: checking which data struct is used by crypt_r" >&5 ++echo "configure:19404: checking which data struct is used by crypt_r" >&5 + if eval "test \"`echo '$''{'php_cv_crypt_r_style'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + php_cv_crypt_r_style=none + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:19424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + php_cv_crypt_r_style=cryptd + else +@@ -19402,7 +19431,7 @@ + + if test "$php_cv_crypt_r_style" = "none"; then + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:19448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + php_cv_crypt_r_style=struct_crypt_data + else +@@ -19427,7 +19456,7 @@ + + if test "$php_cv_crypt_r_style" = "none"; then + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:19474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + php_cv_crypt_r_style=struct_crypt_data_gnu_source + else +@@ -19500,7 +19529,7 @@ + php_enable_gcov=no + + echo $ac_n "checking whether to include gcov symbols""... $ac_c" 1>&6 +-echo "configure:19504: checking whether to include gcov symbols" >&5 ++echo "configure:19533: checking whether to include gcov symbols" >&5 + # Check whether --enable-gcov or --disable-gcov was given. + if test "${enable_gcov+set}" = set; then + enableval="$enable_gcov" +@@ -19539,7 +19568,7 @@ + # Extract the first word of "lcov", so it can be a program name with args. + set dummy lcov; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:19543: checking for $ac_word" >&5 ++echo "configure:19572: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LTP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -19568,7 +19597,7 @@ + # Extract the first word of "genhtml", so it can be a program name with args. + set dummy genhtml; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:19572: checking for $ac_word" >&5 ++echo "configure:19601: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LTP_GENHTML'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -19603,7 +19632,7 @@ + + if test "$LTP"; then + echo $ac_n "checking for ltp version""... $ac_c" 1>&6 +-echo "configure:19607: checking for ltp version" >&5 ++echo "configure:19636: checking for ltp version" >&5 + if eval "test \"`echo '$''{'php_cv_ltp_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -19660,7 +19689,7 @@ + php_enable_debug=no + + echo $ac_n "checking whether to include debugging symbols""... $ac_c" 1>&6 +-echo "configure:19664: checking whether to include debugging symbols" >&5 ++echo "configure:19693: checking whether to include debugging symbols" >&5 + # Check whether --enable-debug or --disable-debug was given. + if test "${enable_debug+set}" = set; then + enableval="$enable_debug" +@@ -19708,7 +19737,7 @@ + php_with_layout=PHP + + echo $ac_n "checking layout of installed files""... $ac_c" 1>&6 +-echo "configure:19712: checking layout of installed files" >&5 ++echo "configure:19741: checking layout of installed files" >&5 + # Check whether --with-layout or --without-layout was given. + if test "${with_layout+set}" = set; then + withval="$with_layout" +@@ -19740,7 +19769,7 @@ + php_with_config_file_path=DEFAULT + + echo $ac_n "checking path to configuration file""... $ac_c" 1>&6 +-echo "configure:19744: checking path to configuration file" >&5 ++echo "configure:19773: checking path to configuration file" >&5 + # Check whether --with-config-file-path or --without-config-file-path was given. + if test "${with_config_file_path+set}" = set; then + withval="$with_config_file_path" +@@ -19771,7 +19800,7 @@ + fi + + echo $ac_n "checking where to scan for configuration files""... $ac_c" 1>&6 +-echo "configure:19775: checking where to scan for configuration files" >&5 ++echo "configure:19804: checking where to scan for configuration files" >&5 + + php_with_config_file_scan_dir=DEFAULT + +@@ -19804,7 +19833,7 @@ + php_enable_safe_mode=no + + echo $ac_n "checking whether to enable safe mode by default""... $ac_c" 1>&6 +-echo "configure:19808: checking whether to enable safe mode by default" >&5 ++echo "configure:19837: checking whether to enable safe mode by default" >&5 + # Check whether --enable-safe-mode or --disable-safe-mode was given. + if test "${enable_safe_mode+set}" = set; then + enableval="$enable_safe_mode" +@@ -19836,7 +19865,7 @@ + fi + + echo $ac_n "checking for safe mode exec dir""... $ac_c" 1>&6 +-echo "configure:19840: checking for safe mode exec dir" >&5 ++echo "configure:19869: checking for safe mode exec dir" >&5 + + php_with_exec_dir=no + +@@ -19877,7 +19906,7 @@ + php_enable_sigchild=no + + echo $ac_n "checking whether to enable PHP's own SIGCHLD handler""... $ac_c" 1>&6 +-echo "configure:19881: checking whether to enable PHP's own SIGCHLD handler" >&5 ++echo "configure:19910: checking whether to enable PHP's own SIGCHLD handler" >&5 + # Check whether --enable-sigchild or --disable-sigchild was given. + if test "${enable_sigchild+set}" = set; then + enableval="$enable_sigchild" +@@ -19912,7 +19941,7 @@ + php_enable_magic_quotes=no + + echo $ac_n "checking whether to enable magic quotes by default""... $ac_c" 1>&6 +-echo "configure:19916: checking whether to enable magic quotes by default" >&5 ++echo "configure:19945: checking whether to enable magic quotes by default" >&5 + # Check whether --enable-magic-quotes or --disable-magic-quotes was given. + if test "${enable_magic_quotes+set}" = set; then + enableval="$enable_magic_quotes" +@@ -19947,7 +19976,7 @@ + php_enable_libgcc=no + + echo $ac_n "checking whether to explicitly link against libgcc""... $ac_c" 1>&6 +-echo "configure:19951: checking whether to explicitly link against libgcc" >&5 ++echo "configure:19980: checking whether to explicitly link against libgcc" >&5 + # Check whether --enable-libgcc or --disable-libgcc was given. + if test "${enable_libgcc+set}" = set; then + enableval="$enable_libgcc" +@@ -20024,7 +20053,7 @@ + php_enable_short_tags=yes + + echo $ac_n "checking whether to enable short tags by default""... $ac_c" 1>&6 +-echo "configure:20028: checking whether to enable short tags by default" >&5 ++echo "configure:20057: checking whether to enable short tags by default" >&5 + # Check whether --enable-short-tags or --disable-short-tags was given. + if test "${enable_short_tags+set}" = set; then + enableval="$enable_short_tags" +@@ -20059,7 +20088,7 @@ + php_enable_dmalloc=no + + echo $ac_n "checking whether to enable dmalloc""... $ac_c" 1>&6 +-echo "configure:20063: checking whether to enable dmalloc" >&5 ++echo "configure:20092: checking whether to enable dmalloc" >&5 + # Check whether --enable-dmalloc or --disable-dmalloc was given. + if test "${enable_dmalloc+set}" = set; then + enableval="$enable_dmalloc" +@@ -20080,7 +20109,7 @@ + + if test "$PHP_DMALLOC" = "yes"; then + echo $ac_n "checking for dmalloc_error in -ldmalloc""... $ac_c" 1>&6 +-echo "configure:20084: checking for dmalloc_error in -ldmalloc" >&5 ++echo "configure:20113: checking for dmalloc_error in -ldmalloc" >&5 + ac_lib_var=`echo dmalloc'_'dmalloc_error | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -20088,7 +20117,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldmalloc $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:20132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -20144,7 +20173,7 @@ + php_enable_ipv6=yes + + echo $ac_n "checking whether to enable IPv6 support""... $ac_c" 1>&6 +-echo "configure:20148: checking whether to enable IPv6 support" >&5 ++echo "configure:20177: checking whether to enable IPv6 support" >&5 + # Check whether --enable-ipv6 or --disable-ipv6 was given. + if test "${enable_ipv6+set}" = set; then + enableval="$enable_ipv6" +@@ -20171,7 +20200,7 @@ + fi + + echo $ac_n "checking how big to make fd sets""... $ac_c" 1>&6 +-echo "configure:20175: checking how big to make fd sets" >&5 ++echo "configure:20204: checking how big to make fd sets" >&5 + + php_enable_fd_setsize=no + +@@ -20239,7 +20268,7 @@ + + + echo $ac_n "checking size of long""... $ac_c" 1>&6 +-echo "configure:20243: checking size of long" >&5 ++echo "configure:20272: checking size of long" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -20247,18 +20276,19 @@ + ac_cv_sizeof_long=8 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:20262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:20292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_long=`cat conftestval` + else +@@ -20278,7 +20308,7 @@ + + + echo $ac_n "checking size of int""... $ac_c" 1>&6 +-echo "configure:20282: checking size of int" >&5 ++echo "configure:20312: checking size of int" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -20286,18 +20316,19 @@ + ac_cv_sizeof_int=4 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(int)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:20301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:20332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_int=`cat conftestval` + else +@@ -20318,13 +20349,13 @@ + + + echo $ac_n "checking for int32_t""... $ac_c" 1>&6 +-echo "configure:20322: checking for int32_t" >&5 ++echo "configure:20353: checking for int32_t" >&5 + if eval "test \"`echo '$''{'ac_cv_int_type_int32_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:20378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_int_type_int32_t=yes + else +@@ -20366,13 +20397,13 @@ + + + echo $ac_n "checking for uint32_t""... $ac_c" 1>&6 +-echo "configure:20370: checking for uint32_t" >&5 ++echo "configure:20401: checking for uint32_t" >&5 + if eval "test \"`echo '$''{'ac_cv_int_type_uint32_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:20426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_int_type_uint32_t=yes + else +@@ -20423,17 +20454,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:20427: checking for $ac_hdr" >&5 ++echo "configure:20458: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:20437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:20468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -20463,12 +20494,12 @@ + for ac_func in strtoll atoll strftime + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:20467: checking for $ac_func" >&5 ++echo "configure:20498: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:20526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -20953,7 +20984,7 @@ + esac + + echo $ac_n "checking which regex library to use""... $ac_c" 1>&6 +-echo "configure:20957: checking which regex library to use" >&5 ++echo "configure:20988: checking which regex library to use" >&5 + echo "$ac_t""$REGEX_TYPE" 1>&6 + + if test "$REGEX_TYPE" = "php"; then +@@ -21330,13 +21361,13 @@ + EOF + + echo $ac_n "checking whether field re_magic exists in struct regex_t""... $ac_c" 1>&6 +-echo "configure:21334: checking whether field re_magic exists in struct regex_t" >&5 ++echo "configure:21365: checking whether field re_magic exists in struct regex_t" >&5 + if eval "test \"`echo '$''{'ac_cv_regex_t_re_magic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < + #include +@@ -21344,7 +21375,7 @@ + regex_t rt; rt.re_magic; + ; return 0; } + EOF +-if { (eval echo configure:21348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:21379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_regex_t_re_magic=yes + else +@@ -21370,7 +21401,7 @@ + php_enable_libxml=yes + + echo $ac_n "checking whether to enable LIBXML support""... $ac_c" 1>&6 +-echo "configure:21374: checking whether to enable LIBXML support" >&5 ++echo "configure:21405: checking whether to enable LIBXML support" >&5 + # Check whether --enable-libxml or --disable-libxml was given. + if test "${enable_libxml+set}" = set; then + enableval="$enable_libxml" +@@ -21415,7 +21446,7 @@ + php_with_libxml_dir=no + + echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +-echo "configure:21419: checking libxml2 install dir" >&5 ++echo "configure:21450: checking libxml2 install dir" >&5 + # Check whether --with-libxml-dir or --without-libxml-dir was given. + if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" +@@ -21441,7 +21472,7 @@ + + + echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +-echo "configure:21445: checking for xml2-config path" >&5 ++echo "configure:21476: checking for xml2-config path" >&5 + if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -21599,7 +21630,7 @@ + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +-echo "configure:21603: checking whether libxml build works" >&5 ++echo "configure:21634: checking whether libxml build works" >&5 + if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -21615,7 +21646,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:21661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -21991,7 +22022,7 @@ + php_with_openssl=no + + echo $ac_n "checking for OpenSSL support""... $ac_c" 1>&6 +-echo "configure:21995: checking for OpenSSL support" >&5 ++echo "configure:22026: checking for OpenSSL support" >&5 + # Check whether --with-openssl or --without-openssl was given. + if test "${with_openssl+set}" = set; then + withval="$with_openssl" +@@ -22035,7 +22066,7 @@ + php_with_kerberos=no + + echo $ac_n "checking for Kerberos support""... $ac_c" 1>&6 +-echo "configure:22039: checking for Kerberos support" >&5 ++echo "configure:22070: checking for Kerberos support" >&5 + # Check whether --with-kerberos or --without-kerberos was given. + if test "${with_kerberos+set}" = set; then + withval="$with_kerberos" +@@ -22361,7 +22392,7 @@ + # Extract the first word of "krb5-config", so it can be a program name with args. + set dummy krb5-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:22365: checking for $ac_word" >&5 ++echo "configure:22396: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_KRB5_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -22721,7 +22752,7 @@ + fi + + echo $ac_n "checking for DSA_get_default_method in -lssl""... $ac_c" 1>&6 +-echo "configure:22725: checking for DSA_get_default_method in -lssl" >&5 ++echo "configure:22756: checking for DSA_get_default_method in -lssl" >&5 + ac_lib_var=`echo ssl'_'DSA_get_default_method | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -22729,7 +22760,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lssl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:22775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -22782,7 +22813,7 @@ + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:22786: checking for $ac_word" >&5 ++echo "configure:22817: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -22987,9 +23018,9 @@ + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$OPENSSL_INCDIR + echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6 +-echo "configure:22991: checking for OpenSSL version" >&5 ++echo "configure:23022: checking for OpenSSL version" >&5 + cat > conftest.$ac_ext < +@@ -23144,7 +23175,7 @@ + done + + echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 +-echo "configure:23148: checking for CRYPTO_free in -lcrypto" >&5 ++echo "configure:23179: checking for CRYPTO_free in -lcrypto" >&5 + ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -23152,7 +23183,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcrypto $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:23198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -23320,7 +23351,7 @@ + done + + echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6 +-echo "configure:23324: checking for SSL_CTX_set_ssl_version in -lssl" >&5 ++echo "configure:23355: checking for SSL_CTX_set_ssl_version in -lssl" >&5 + ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -23328,7 +23359,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lssl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:23374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -23481,7 +23512,7 @@ + + if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then + echo $ac_n "checking for PCRE headers location""... $ac_c" 1>&6 +-echo "configure:23485: checking for PCRE headers location" >&5 ++echo "configure:23516: checking for PCRE headers location" >&5 + for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include; do + test -f $i/pcre.h && PCRE_INCDIR=$i + done +@@ -23492,7 +23523,7 @@ + echo "$ac_t""$PCRE_INCDIR" 1>&6 + + echo $ac_n "checking for PCRE library location""... $ac_c" 1>&6 +-echo "configure:23496: checking for PCRE library location" >&5 ++echo "configure:23527: checking for PCRE library location" >&5 + for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR; do + test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j + done +@@ -23914,7 +23945,7 @@ + + else + echo $ac_n "checking for PCRE library to use""... $ac_c" 1>&6 +-echo "configure:23918: checking for PCRE library to use" >&5 ++echo "configure:23949: checking for PCRE library to use" >&5 + echo "$ac_t""bundled" 1>&6 + pcrelib_sources="pcrelib/pcre_chartables.c pcrelib/pcre_ucd.c \ + pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_exec.c \ +@@ -24251,7 +24282,7 @@ + php_with_sqlite3=yes + + echo $ac_n "checking whether to enable the SQLite3 extension""... $ac_c" 1>&6 +-echo "configure:24255: checking whether to enable the SQLite3 extension" >&5 ++echo "configure:24286: checking whether to enable the SQLite3 extension" >&5 + # Check whether --with-sqlite3 or --without-sqlite3 was given. + if test "${with_sqlite3+set}" = set; then + withval="$with_sqlite3" +@@ -24306,7 +24337,7 @@ + + if test $PHP_SQLITE3 != "yes"; then + echo $ac_n "checking for sqlite3 files in default path""... $ac_c" 1>&6 +-echo "configure:24310: checking for sqlite3 files in default path" >&5 ++echo "configure:24341: checking for sqlite3 files in default path" >&5 + for i in $PHP_SQLITE3 /usr/local /usr; do + if test -r $i/include/sqlite3.h; then + SQLITE3_DIR=$i +@@ -24321,7 +24352,7 @@ + fi + + echo $ac_n "checking for SQLite 3.3.9+""... $ac_c" 1>&6 +-echo "configure:24325: checking for SQLite 3.3.9+" >&5 ++echo "configure:24356: checking for SQLite 3.3.9+" >&5 + + save_old_LDFLAGS=$LDFLAGS + ac_stuff=" +@@ -24420,7 +24451,7 @@ + done + + echo $ac_n "checking for sqlite3_prepare_v2 in -lsqlite3""... $ac_c" 1>&6 +-echo "configure:24424: checking for sqlite3_prepare_v2 in -lsqlite3" >&5 ++echo "configure:24455: checking for sqlite3_prepare_v2 in -lsqlite3" >&5 + ac_lib_var=`echo sqlite3'_'sqlite3_prepare_v2 | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -24428,7 +24459,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsqlite3 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:24474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -24699,7 +24730,7 @@ + done + + echo $ac_n "checking for sqlite3_key in -lsqlite3""... $ac_c" 1>&6 +-echo "configure:24703: checking for sqlite3_key in -lsqlite3" >&5 ++echo "configure:24734: checking for sqlite3_key in -lsqlite3" >&5 + ac_lib_var=`echo sqlite3'_'sqlite3_key | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -24707,7 +24738,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsqlite3 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:24753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -24850,7 +24881,7 @@ + done + + echo $ac_n "checking for sqlite3_load_extension in -lsqlite3""... $ac_c" 1>&6 +-echo "configure:24854: checking for sqlite3_load_extension in -lsqlite3" >&5 ++echo "configure:24885: checking for sqlite3_load_extension in -lsqlite3" >&5 + ac_lib_var=`echo sqlite3'_'sqlite3_load_extension | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -24858,7 +24889,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsqlite3 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:24904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -24906,7 +24937,7 @@ + + else + echo $ac_n "checking bundled sqlite3 library""... $ac_c" 1>&6 +-echo "configure:24910: checking bundled sqlite3 library" >&5 ++echo "configure:24941: checking bundled sqlite3 library" >&5 + echo "$ac_t""yes" 1>&6 + + sqlite3_extra_sources="libsqlite/sqlite3.c" +@@ -25262,7 +25293,7 @@ + php_with_zlib=no + + echo $ac_n "checking for ZLIB support""... $ac_c" 1>&6 +-echo "configure:25266: checking for ZLIB support" >&5 ++echo "configure:25297: checking for ZLIB support" >&5 + # Check whether --with-zlib or --without-zlib was given. + if test "${with_zlib+set}" = set; then + withval="$with_zlib" +@@ -25306,7 +25337,7 @@ + php_with_zlib_dir=no + + echo $ac_n "checking if the location of ZLIB install directory is defined""... $ac_c" 1>&6 +-echo "configure:25310: checking if the location of ZLIB install directory is defined" >&5 ++echo "configure:25341: checking if the location of ZLIB install directory is defined" >&5 + # Check whether --with-zlib-dir or --without-zlib-dir was given. + if test "${with_zlib_dir+set}" = set; then + withval="$with_zlib_dir" +@@ -25749,7 +25780,7 @@ + done + + echo $ac_n "checking for gzgets in -lz""... $ac_c" 1>&6 +-echo "configure:25753: checking for gzgets in -lz" >&5 ++echo "configure:25784: checking for gzgets in -lz" >&5 + ac_lib_var=`echo z'_'gzgets | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -25757,7 +25788,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lz $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:25803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -25905,10 +25936,999 @@ + + + ++php_enable_apc=no ++ ++echo $ac_n "checking whether to enable APC support""... $ac_c" 1>&6 ++echo "configure:25943: checking whether to enable APC support" >&5 ++# Check whether --enable-apc or --disable-apc was given. ++if test "${enable_apc+set}" = set; then ++ enableval="$enable_apc" ++ PHP_APC=$enableval ++else ++ ++ PHP_APC=no ++ test "$PHP_ENABLE_ALL" && PHP_APC=$PHP_ENABLE_ALL ++ ++fi ++ ++ ++ ++ext_output="yes, shared" ++ext_shared=yes ++case $PHP_APC in ++shared,*) ++ PHP_APC=`echo "$PHP_APC"|$SED 's/^shared,//'` ++ ;; ++shared) ++ PHP_APC=yes ++ ;; ++no) ++ ext_output=no ++ ext_shared=no ++ ;; ++*) ++ ext_output=yes ++ ext_shared=no ++ ;; ++esac ++ ++ ++ ++echo "$ac_t""$ext_output" 1>&6 ++ ++ ++ ++ ++# Check whether --enable-apc-debug or --disable-apc-debug was given. ++if test "${enable_apc_debug+set}" = set; then ++ enableval="$enable_apc_debug" ++ ++ PHP_APC_DEBUG=yes ++ ++else ++ ++ PHP_APC_DEBUG=no ++ ++fi ++ ++ ++echo $ac_n "checking whether we should enable cache request file info""... $ac_c" 1>&6 ++echo "configure:25997: checking whether we should enable cache request file info" >&5 ++# Check whether --enable-apc-filehits or --disable-apc-filehits was given. ++if test "${enable_apc_filehits+set}" = set; then ++ enableval="$enable_apc_filehits" ++ ++ PHP_APC_FILEHITS=$enableval ++ echo "$ac_t""$enableval" 1>&6 ++ ++else ++ ++ PHP_APC_FILEHITS=no ++ echo "$ac_t""no" 1>&6 ++ ++fi ++ ++ ++echo $ac_n "checking whether we should use mmap""... $ac_c" 1>&6 ++echo "configure:26014: checking whether we should use mmap" >&5 ++# Check whether --enable-apc-mmap or --disable-apc-mmap was given. ++if test "${enable_apc_mmap+set}" = set; then ++ enableval="$enable_apc_mmap" ++ ++ PHP_APC_MMAP=$enableval ++ echo "$ac_t""$enableval" 1>&6 ++ ++else ++ ++ PHP_APC_MMAP=yes ++ echo "$ac_t""yes" 1>&6 ++ ++fi ++ ++ ++echo $ac_n "checking whether we should use semaphore locking instead of fcntl""... $ac_c" 1>&6 ++echo "configure:26031: checking whether we should use semaphore locking instead of fcntl" >&5 ++# Check whether --enable-apc-sem or --disable-apc-sem was given. ++if test "${enable_apc_sem+set}" = set; then ++ enableval="$enable_apc_sem" ++ ++ PHP_APC_SEM=$enableval ++ echo "$ac_t""$enableval" 1>&6 ++ ++else ++ ++ PHP_APC_SEM=no ++ echo "$ac_t""no" 1>&6 ++ ++fi ++ ++ ++echo $ac_n "checking whether we should use pthread mutex locking""... $ac_c" 1>&6 ++echo "configure:26048: checking whether we should use pthread mutex locking" >&5 ++# Check whether --enable-apc-pthreadmutex or --disable-apc-pthreadmutex was given. ++if test "${enable_apc_pthreadmutex+set}" = set; then ++ enableval="$enable_apc_pthreadmutex" ++ ++ PHP_APC_PTHREADMUTEX=$enableval ++ echo "$ac_t""$enableval" 1>&6 ++ ++else ++ ++ PHP_APC_PTHREADMUTEX=yes ++ echo "$ac_t""yes" 1>&6 ++ ++fi ++ ++ ++if test "$PHP_APC_PTHREADMUTEX" != "no"; then ++ orig_LIBS="$LIBS" ++ LIBS="$LIBS -lpthread" ++ if test "$cross_compiling" = yes; then ++ ++ ++ ++ case pthread in ++ c|c_r|pthread*) ;; ++ *) ++ LIBS="-lpthread $LIBS" ++ ;; ++ esac ++ ++ ++ ++ ++else ++ cat > conftest.$ac_ext < ++ #include ++ main() { ++ pthread_mutex_t mutex; ++ pthread_mutexattr_t attr; ++ ++ if(pthread_mutexattr_init(&attr)) { ++ puts("Unable to initialize pthread attributes (pthread_mutexattr_init)."); ++ return -1; ++ } ++ if(pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED)) { ++ puts("Unable to set PTHREAD_PROCESS_SHARED (pthread_mutexattr_setpshared), your system may not support shared mutex's."); ++ return -1; ++ } ++ if(pthread_mutex_init(&mutex, &attr)) { ++ puts("Unable to initialize the mutex (pthread_mutex_init)."); ++ return -1; ++ } ++ if(pthread_mutexattr_destroy(&attr)) { ++ puts("Unable to destroy mutex attributes (pthread_mutexattr_destroy)."); ++ return -1; ++ } ++ if(pthread_mutex_destroy(&mutex)) { ++ puts("Unable to destroy mutex (pthread_mutex_destroy)."); ++ return -1; ++ } ++ ++ puts("pthread mutex's are supported!"); ++ return 0; ++ } ++ ++EOF ++if { (eval echo configure:26118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++then ++ ++ ++ case pthread in ++ c|c_r|pthread*) ;; ++ *) ++ LIBS="-lpthread $LIBS" ++ ;; ++ esac ++ ++ ++ ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -fr conftest* ++ echo "configure: warning: It doesn't appear that pthread mutex's are supported on your system" 1>&2 ++ PHP_APC_PTHREADMUTEX=no ++ ++fi ++rm -fr conftest* ++fi ++ ++ LIBS="$orig_LIBS" ++fi ++ ++echo $ac_n "checking whether we should use spin locks""... $ac_c" 1>&6 ++echo "configure:26146: checking whether we should use spin locks" >&5 ++# Check whether --enable-apc-spinlocks or --disable-apc-spinlocks was given. ++if test "${enable_apc_spinlocks+set}" = set; then ++ enableval="$enable_apc_spinlocks" ++ ++ PHP_APC_SPINLOCKS=$enableval ++ echo "$ac_t""$enableval" 1>&6 ++ ++else ++ ++ PHP_APC_SPINLOCKS=no ++ echo "$ac_t""no" 1>&6 ++ ++fi ++ ++ ++echo $ac_n "checking whether we should enable memory protection""... $ac_c" 1>&6 ++echo "configure:26163: checking whether we should enable memory protection" >&5 ++# Check whether --enable-apc-memprotect or --disable-apc-memprotect was given. ++if test "${enable_apc_memprotect+set}" = set; then ++ enableval="$enable_apc_memprotect" ++ ++ PHP_APC_MEMPROTECT=$enableval ++ echo "$ac_t""$enableval" 1>&6 ++ ++else ++ ++ PHP_APC_MEMPROTECT=no ++ echo "$ac_t""no" 1>&6 ++ ++fi ++ ++ ++if test "$PHP_APC" != "no"; then ++ test "$PHP_APC_MMAP" != "no" && cat >> confdefs.h <<\EOF ++#define APC_MMAP 1 ++EOF ++ ++ test "$PHP_APC_FILEHITS" != "no" && cat >> confdefs.h <<\EOF ++#define APC_FILEHITS 1 ++EOF ++ ++ ++ if test "$PHP_APC_DEBUG" != "no"; then ++ cat >> confdefs.h <<\EOF ++#define __DEBUG_APC__ 1 ++EOF ++ ++ fi ++ ++ if test "$PHP_APC_SEM" != "no"; then ++ cat >> confdefs.h <<\EOF ++#define APC_SEM_LOCKS 1 ++EOF ++ ++ elif test "$PHP_APC_SPINLOCKS" != "no"; then ++ cat >> confdefs.h <<\EOF ++#define APC_SPIN_LOCKS 1 ++EOF ++ ++ elif test "$PHP_APC_PTHREADMUTEX" != "no"; then ++ cat >> confdefs.h <<\EOF ++#define APC_PTHREADMUTEX_LOCKS 1 ++EOF ++ ++ else ++ cat >> confdefs.h <<\EOF ++#define APC_FCNTL_LOCKS 1 ++EOF ++ ++ fi ++ ++ if test "$PHP_APC_MEMPROTECT" != "no"; then ++ cat >> confdefs.h <<\EOF ++#define APC_MEMPROTECT 1 ++EOF ++ ++ fi ++ ++ echo $ac_n "checking for zend_set_lookup_function_hook""... $ac_c" 1>&6 ++echo "configure:26226: checking for zend_set_lookup_function_hook" >&5 ++if eval "test \"`echo '$''{'php_cv_zend_set_lookup_function_hook'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++ orig_cflags=$CFLAGS ++ CFLAGS="$INCLUDES $EXTRA_INCLUDES" ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ++ php_cv_zend_set_lookup_function_hook=yes ++ ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ++ php_cv_zend_set_lookup_function_hook=no ++ ++fi ++rm -f conftest* ++ CFLAGS=$orig_cflags ++ ++fi ++ ++echo "$ac_t""$php_cv_zend_set_lookup_function_hook" 1>&6 ++ if test "$php_cv_zend_set_lookup_function_hook" = "yes"; then ++ cat >> confdefs.h <<\EOF ++#define APC_HAVE_LOOKUP_HOOKS 1 ++EOF ++ ++ else ++ cat >> confdefs.h <<\EOF ++#define APC_HAVE_LOOKUP_HOOKS 0 ++EOF ++ ++ fi ++ ++ for ac_func in sigaction ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:26280: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:26308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.h <&6 ++fi ++done ++ ++ echo $ac_n "checking for union semun""... $ac_c" 1>&6 ++echo "configure:26333: checking for union semun" >&5 ++if eval "test \"`echo '$''{'php_cv_semun'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++ cat > conftest.$ac_ext < ++#include ++#include ++ ++int main() { ++union semun x; x.val=1 ++; return 0; } ++EOF ++if { (eval echo configure:26350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ++ php_cv_semun=yes ++ ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ++ php_cv_semun=no ++ ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$php_cv_semun" 1>&6 ++ if test "$php_cv_semun" = "yes"; then ++ cat >> confdefs.h <<\EOF ++#define HAVE_SEMUN 1 ++EOF ++ ++ else ++ cat >> confdefs.h <<\EOF ++#define HAVE_SEMUN 0 ++EOF ++ ++ fi ++ ++ echo $ac_n "checking whether we should enable valgrind support""... $ac_c" 1>&6 ++echo "configure:26381: checking whether we should enable valgrind support" >&5 ++ # Check whether --enable-valgrind-checks or --disable-valgrind-checks was given. ++if test "${enable_valgrind_checks+set}" = set; then ++ enableval="$enable_valgrind_checks" ++ ++ PHP_APC_VALGRIND=$enableval ++ echo "$ac_t""$enableval" 1>&6 ++ ++else ++ ++ PHP_APC_VALGRIND=yes ++ echo "$ac_t""yes" 1>&6 ++ ac_safe=`echo "valgrind/memcheck.h" | sed 'y%./+-%__p_%'` ++echo $ac_n "checking for valgrind/memcheck.h""... $ac_c" 1>&6 ++echo "configure:26395: checking for valgrind/memcheck.h" >&5 ++if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++EOF ++ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ++{ (eval echo configure:26405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ++if test -z "$ac_err"; then ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=yes" ++else ++ echo "$ac_err" >&5 ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=no" ++fi ++rm -f conftest* ++fi ++if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ cat >> confdefs.h <<\EOF ++#define HAVE_VALGRIND_MEMCHECK_H 1 ++EOF ++ ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ ++fi ++ ++ ++ apc_sources="apc.c php_apc.c \ ++ apc_cache.c \ ++ apc_compile.c \ ++ apc_debug.c \ ++ apc_fcntl.c \ ++ apc_main.c \ ++ apc_mmap.c \ ++ apc_sem.c \ ++ apc_shm.c \ ++ apc_pthreadmutex.c \ ++ apc_spin.c \ ++ pgsql_s_lock.c \ ++ apc_sma.c \ ++ apc_stack.c \ ++ apc_zend.c \ ++ apc_rfc1867.c \ ++ apc_signal.c \ ++ apc_pool.c \ ++ apc_iterator.c \ ++ apc_bin.c \ ++ apc_string.c " ++ ++ ++ save_old_LDFLAGS=$LDFLAGS ++ ac_stuff="" ++ ++ save_ext_shared=$ext_shared ++ ext_shared=yes ++ ++ for ac_i in $ac_stuff; do ++ case $ac_i in ++ -pthread) ++ if test "$ext_shared" = "yes"; then ++ LDFLAGS="$LDFLAGS -pthread" ++ else ++ ++ ++ unique=`echo $ac_i|$SED 's/[^a-zA-Z0-9]/_/g'` ++ ++ cmd="echo $ac_n \"\$EXTRA_LDFLAGS$unique$ac_c\"" ++ if test -n "$unique" && test "`eval $cmd`" = "" ; then ++ eval "EXTRA_LDFLAGS$unique=set" ++ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i" ++ fi ++ ++ fi ++ ;; ++ -l*) ++ ac_ii=`echo $ac_i|cut -c 3-` ++ ++ ++ case $ac_ii in ++ c|c_r|pthread*) ;; ++ *) ++ if test "$ext_shared" = "yes"; then ++ LDFLAGS="$LDFLAGS -l$ac_ii" ++ else ++ ++ ++ case $ac_ii in ++ c|c_r|pthread*) ;; ++ *) ++ LIBS="$LIBS -l$ac_ii" ++ ;; ++ esac ++ ++ ++ fi ++ ;; ++ esac ++ ++ ++ ;; ++ -L*) ++ ac_ii=`echo $ac_i|cut -c 3-` ++ ++ if test "$ac_ii" != "/usr/$PHP_LIBDIR" && test "$ac_ii" != "/usr/lib"; then ++ ++ if test -z "$ac_ii" || echo "$ac_ii" | grep '^/' >/dev/null ; then ++ ai_p=$ac_ii ++ else ++ ++ ep_dir="`echo $ac_ii|$SED 's%/*[^/][^/]*/*$%%'`" ++ ++ ep_realdir="`(cd \"$ep_dir\" && pwd)`" ++ ai_p="$ep_realdir/`basename \"$ac_ii\"`" ++ fi ++ ++ ++ if test "$ext_shared" = "yes"; then ++ LDFLAGS="-L$ai_p $LDFLAGS" ++ test -n "$ld_runpath_switch" && LDFLAGS="$ld_runpath_switch$ai_p $LDFLAGS" ++ else ++ ++ ++ ++ unique=`echo $ai_p|$SED 's/[^a-zA-Z0-9]/_/g'` ++ ++ cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" ++ if test -n "$unique" && test "`eval $cmd`" = "" ; then ++ eval "LIBPATH$unique=set" ++ ++ test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" ++ LDFLAGS="$LDFLAGS -L$ai_p" ++ PHP_RPATHS="$PHP_RPATHS $ai_p" ++ ++ fi ++ ++ ++ fi ++ ++ fi ++ ++ ;; ++ esac ++ done ++ ++ echo $ac_n "checking for shm_open in -lrt""... $ac_c" 1>&6 ++echo "configure:26551: checking for shm_open in -lrt" >&5 ++ac_lib_var=`echo rt'_'shm_open | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lrt $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ++ LDFLAGS=$save_old_LDFLAGS ++ ext_shared=$save_ext_shared ++ ++ ++ case rt in ++ c|c_r|pthread*) ;; ++ *) ++ if test "$ext_shared" = "yes"; then ++ APC_SHARED_LIBADD="-lrt $APC_SHARED_LIBADD" ++ else ++ ++ ++ case rt in ++ c|c_r|pthread*) ;; ++ *) ++ LIBS="-lrt $LIBS" ++ ;; ++ esac ++ ++ ++ fi ++ ;; ++ esac ++ ++ ++ ++else ++ echo "$ac_t""no" 1>&6 ++ ++ LDFLAGS=$save_old_LDFLAGS ++ ext_shared=$save_ext_shared ++ unset ac_cv_lib_rt_shm_open ++ ++ ++fi ++ ++ ++ ext_builddir=ext/apc ++ ext_srcdir=$abs_srcdir/ext/apc ++ ++ ac_extra=`echo "\\$(APC_CFLAGS)"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g` ++ ++ if test "$ext_shared" != "shared" && test "$ext_shared" != "yes" && test "" != "cli"; then ++ PHP_APC_SHARED=no ++ ++ ++ case ext/apc in ++ "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; ++ /*) ac_srcdir=`echo "ext/apc"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; ++ *) ac_srcdir="$abs_srcdir/ext/apc/"; ac_bdir="ext/apc/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; ++ esac ++ ++ ++ ++ b_c_pre=$php_c_pre ++ b_cxx_pre=$php_cxx_pre ++ b_c_meta=$php_c_meta ++ b_cxx_meta=$php_cxx_meta ++ b_c_post=$php_c_post ++ b_cxx_post=$php_cxx_post ++ b_lo=$php_lo ++ ++ ++ old_IFS=$IFS ++ for ac_src in $apc_sources; do ++ ++ IFS=. ++ set $ac_src ++ ac_obj=$1 ++ IFS=$old_IFS ++ ++ PHP_GLOBAL_OBJS="$PHP_GLOBAL_OBJS $ac_bdir$ac_obj.lo" ++ ++ case $ac_src in ++ *.c) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; ++ *.s) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; ++ *.S) ac_comp="$b_c_pre $ac_extra $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;; ++ *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $ac_extra $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;; ++ esac ++ ++ cat >>Makefile.objects<>Makefile.objects<>Makefile.objects<>Makefile.objects<> confdefs.h <>Makefile.objects<>Makefile.objects<> confdefs.h <<\EOF ++#define HAVE_APC 1 ++EOF ++ ++fi ++ ++ ++ ++ + php_enable_bcmath=no + + echo $ac_n "checking whether to enable bc style precision math functions""... $ac_c" 1>&6 +-echo "configure:25912: checking whether to enable bc style precision math functions" >&5 ++echo "configure:26932: checking whether to enable bc style precision math functions" >&5 + # Check whether --enable-bcmath or --disable-bcmath was given. + if test "${enable_bcmath+set}" = set; then + enableval="$enable_bcmath" +@@ -26273,7 +27293,7 @@ + php_with_bz2=no + + echo $ac_n "checking for BZip2 support""... $ac_c" 1>&6 +-echo "configure:26277: checking for BZip2 support" >&5 ++echo "configure:27297: checking for BZip2 support" >&5 + # Check whether --with-bz2 or --without-bz2 was given. + if test "${with_bz2+set}" = set; then + withval="$with_bz2" +@@ -26318,7 +27338,7 @@ + BZIP_DIR=$PHP_BZ2 + else + echo $ac_n "checking for BZip2 in default path""... $ac_c" 1>&6 +-echo "configure:26322: checking for BZip2 in default path" >&5 ++echo "configure:27342: checking for BZip2 in default path" >&5 + for i in /usr/local /usr; do + if test -r $i/include/bzlib.h; then + BZIP_DIR=$i +@@ -26431,7 +27451,7 @@ + done + + echo $ac_n "checking for BZ2_bzerror in -lbz2""... $ac_c" 1>&6 +-echo "configure:26435: checking for BZ2_bzerror in -lbz2" >&5 ++echo "configure:27455: checking for BZ2_bzerror in -lbz2" >&5 + ac_lib_var=`echo bz2'_'BZ2_bzerror | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -26439,7 +27459,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lbz2 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:27474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -26918,7 +27938,7 @@ + php_enable_calendar=no + + echo $ac_n "checking whether to enable calendar conversion support""... $ac_c" 1>&6 +-echo "configure:26922: checking whether to enable calendar conversion support" >&5 ++echo "configure:27942: checking whether to enable calendar conversion support" >&5 + # Check whether --enable-calendar or --disable-calendar was given. + if test "${enable_calendar+set}" = set; then + enableval="$enable_calendar" +@@ -27262,7 +28282,7 @@ + php_enable_ctype=yes + + echo $ac_n "checking whether to enable ctype functions""... $ac_c" 1>&6 +-echo "configure:27266: checking whether to enable ctype functions" >&5 ++echo "configure:28286: checking whether to enable ctype functions" >&5 + # Check whether --enable-ctype or --disable-ctype was given. + if test "${enable_ctype+set}" = set; then + enableval="$enable_ctype" +@@ -27606,7 +28626,7 @@ + php_with_curl=no + + echo $ac_n "checking for cURL support""... $ac_c" 1>&6 +-echo "configure:27610: checking for cURL support" >&5 ++echo "configure:28630: checking for cURL support" >&5 + # Check whether --with-curl or --without-curl was given. + if test "${with_curl+set}" = set; then + withval="$with_curl" +@@ -27650,7 +28670,7 @@ + php_with_curlwrappers=no + + echo $ac_n "checking if we should use cURL for url streams""... $ac_c" 1>&6 +-echo "configure:27654: checking if we should use cURL for url streams" >&5 ++echo "configure:28674: checking if we should use cURL for url streams" >&5 + # Check whether --with-curlwrappers or --without-curlwrappers was given. + if test "${with_curlwrappers+set}" = set; then + withval="$with_curlwrappers" +@@ -27674,7 +28694,7 @@ + CURL_DIR=$PHP_CURL + else + echo $ac_n "checking for cURL in default path""... $ac_c" 1>&6 +-echo "configure:27678: checking for cURL in default path" >&5 ++echo "configure:28698: checking for cURL in default path" >&5 + for i in /usr/local /usr; do + if test -r $i/include/curl/easy.h; then + CURL_DIR=$i +@@ -27692,7 +28712,7 @@ + + CURL_CONFIG="curl-config" + echo $ac_n "checking for cURL 7.10.5 or greater""... $ac_c" 1>&6 +-echo "configure:27696: checking for cURL 7.10.5 or greater" >&5 ++echo "configure:28716: checking for cURL 7.10.5 or greater" >&5 + + if ${CURL_DIR}/bin/curl-config --libs > /dev/null 2>&1; then + CURL_CONFIG=${CURL_DIR}/bin/curl-config +@@ -27930,7 +28950,7 @@ + + + echo $ac_n "checking for SSL support in libcurl""... $ac_c" 1>&6 +-echo "configure:27934: checking for SSL support in libcurl" >&5 ++echo "configure:28954: checking for SSL support in libcurl" >&5 + CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL` + if test "$CURL_SSL" = "SSL"; then + echo "$ac_t""yes" 1>&6 +@@ -27943,7 +28963,7 @@ + CFLAGS="`$CURL_CONFIG --cflags`" + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:27947: checking how to run the C preprocessor" >&5 ++echo "configure:28967: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -27958,13 +28978,13 @@ + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:27968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:28988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -27975,13 +28995,13 @@ + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:27985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:29005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -27992,13 +29012,13 @@ + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:28002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:29022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -28023,14 +29043,14 @@ + echo "$ac_t""$CPP" 1>&6 + + echo $ac_n "checking for openssl support in libcurl""... $ac_c" 1>&6 +-echo "configure:28027: checking for openssl support in libcurl" >&5 ++echo "configure:29047: checking for openssl support in libcurl" >&5 + if test "$cross_compiling" = yes; then + + echo "$ac_t""no" 1>&6 + + else + cat > conftest.$ac_ext < +@@ -28049,7 +29069,7 @@ + } + + EOF +-if { (eval echo configure:28053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:29073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + echo "$ac_t""yes" 1>&6 +@@ -28057,17 +29077,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:28061: checking for $ac_hdr" >&5 ++echo "configure:29081: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:28071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:29091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -28112,14 +29132,14 @@ + + + echo $ac_n "checking for gnutls support in libcurl""... $ac_c" 1>&6 +-echo "configure:28116: checking for gnutls support in libcurl" >&5 ++echo "configure:29136: checking for gnutls support in libcurl" >&5 + if test "$cross_compiling" = yes; then + + echo "$ac_t""no" 1>&6 + + else + cat > conftest.$ac_ext < +@@ -28138,23 +29158,23 @@ + } + + EOF +-if { (eval echo configure:28142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:29162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + echo "$ac_t""yes" 1>&6 + ac_safe=`echo "gcrypt.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for gcrypt.h""... $ac_c" 1>&6 +-echo "configure:28148: checking for gcrypt.h" >&5 ++echo "configure:29168: checking for gcrypt.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:28158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:29178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -28296,7 +29316,7 @@ + done + + echo $ac_n "checking for curl_easy_perform in -lcurl""... $ac_c" 1>&6 +-echo "configure:28300: checking for curl_easy_perform in -lcurl" >&5 ++echo "configure:29320: checking for curl_easy_perform in -lcurl" >&5 + ac_lib_var=`echo curl'_'curl_easy_perform | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -28304,7 +29324,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcurl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:29339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -28451,7 +29471,7 @@ + done + + echo $ac_n "checking for curl_version_info in -lcurl""... $ac_c" 1>&6 +-echo "configure:28455: checking for curl_version_info in -lcurl" >&5 ++echo "configure:29475: checking for curl_version_info in -lcurl" >&5 + ac_lib_var=`echo curl'_'curl_version_info | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -28459,7 +29479,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcurl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:29494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -28604,7 +29624,7 @@ + done + + echo $ac_n "checking for curl_easy_strerror in -lcurl""... $ac_c" 1>&6 +-echo "configure:28608: checking for curl_easy_strerror in -lcurl" >&5 ++echo "configure:29628: checking for curl_easy_strerror in -lcurl" >&5 + ac_lib_var=`echo curl'_'curl_easy_strerror | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -28612,7 +29632,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcurl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:29647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -28757,7 +29777,7 @@ + done + + echo $ac_n "checking for curl_multi_strerror in -lcurl""... $ac_c" 1>&6 +-echo "configure:28761: checking for curl_multi_strerror in -lcurl" >&5 ++echo "configure:29781: checking for curl_multi_strerror in -lcurl" >&5 + ac_lib_var=`echo curl'_'curl_multi_strerror | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -28765,7 +29785,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcurl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:29800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -29462,7 +30482,7 @@ + done + + echo $ac_n "checking for dpopen in -l$LIB""... $ac_c" 1>&6 +-echo "configure:29466: checking for dpopen in -l$LIB" >&5 ++echo "configure:30486: checking for dpopen in -l$LIB" >&5 + ac_lib_var=`echo $LIB'_'dpopen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -29470,7 +30490,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$LIB $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:30505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -29650,7 +30670,7 @@ + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +-echo "configure:29654: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:30674: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi +@@ -29678,7 +30698,7 @@ + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +-echo "configure:29682: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:30702: checking for $THIS_FULL_NAME support" >&5 + if test -n "You cannot combine --with-gdbm with --with-qdbm"; then + { echo "configure: error: You cannot combine --with-gdbm with --with-qdbm" 1>&2; exit 1; } + fi +@@ -29797,7 +30817,7 @@ + done + + echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 +-echo "configure:29801: checking for gdbm_open in -lgdbm" >&5 ++echo "configure:30821: checking for gdbm_open in -lgdbm" >&5 + ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -29805,7 +30825,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgdbm $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:30840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -29981,7 +31001,7 @@ + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +-echo "configure:29985: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:31005: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi +@@ -30110,7 +31130,7 @@ + done + + echo $ac_n "checking for dbm_open in -l$LIB""... $ac_c" 1>&6 +-echo "configure:30114: checking for dbm_open in -l$LIB" >&5 ++echo "configure:31134: checking for dbm_open in -l$LIB" >&5 + ac_lib_var=`echo $LIB'_'dbm_open | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -30118,7 +31138,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$LIB $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:31153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -30298,7 +31318,7 @@ + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +-echo "configure:30302: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:31322: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi +@@ -30382,7 +31402,7 @@ + LIBS="-l$LIB $LIBS" + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:31417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + cat > conftest.$ac_ext <&6 +-echo "configure:30438: checking for DB4 major version" >&5 ++echo "configure:31458: checking for DB4 major version" >&5 + { echo "configure: error: Header contains different version" 1>&2; exit 1; } + fi + if test "4" = "4"; then + echo $ac_n "checking for DB4 minor version and patch level""... $ac_c" 1>&6 +-echo "configure:30443: checking for DB4 minor version and patch level" >&5 ++echo "configure:31463: checking for DB4 minor version and patch level" >&5 + cat > conftest.$ac_ext <&6 +-echo "configure:30471: checking if dba can be used as shared extension" >&5 ++echo "configure:31491: checking if dba can be used as shared extension" >&5 + cat > conftest.$ac_ext <&6 +-echo "configure:30630: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:31650: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi +@@ -30654,7 +31674,7 @@ + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +-echo "configure:30658: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:31678: checking for $THIS_FULL_NAME support" >&5 + if test -n "You cannot combine --with-db3 with --with-db4"; then + { echo "configure: error: You cannot combine --with-db3 with --with-db4" 1>&2; exit 1; } + fi +@@ -30705,7 +31725,7 @@ + LIBS="-l$LIB $LIBS" + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:31740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + cat > conftest.$ac_ext <&6 +-echo "configure:30761: checking for DB3 major version" >&5 ++echo "configure:31781: checking for DB3 major version" >&5 + { echo "configure: error: Header contains different version" 1>&2; exit 1; } + fi + if test "3" = "4"; then + echo $ac_n "checking for DB4 minor version and patch level""... $ac_c" 1>&6 +-echo "configure:30766: checking for DB4 minor version and patch level" >&5 ++echo "configure:31786: checking for DB4 minor version and patch level" >&5 + cat > conftest.$ac_ext <&6 +-echo "configure:30794: checking if dba can be used as shared extension" >&5 ++echo "configure:31814: checking if dba can be used as shared extension" >&5 + cat > conftest.$ac_ext <&6 +-echo "configure:30953: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:31973: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi +@@ -30977,7 +31997,7 @@ + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +-echo "configure:30981: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:32001: checking for $THIS_FULL_NAME support" >&5 + if test -n "You cannot combine --with-db2 with --with-db3 or --with-db4"; then + { echo "configure: error: You cannot combine --with-db2 with --with-db3 or --with-db4" 1>&2; exit 1; } + fi +@@ -31028,7 +32048,7 @@ + LIBS="-l$LIB $LIBS" + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:32063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + cat > conftest.$ac_ext <&6 +-echo "configure:31084: checking for DB2 major version" >&5 ++echo "configure:32104: checking for DB2 major version" >&5 + { echo "configure: error: Header contains different version" 1>&2; exit 1; } + fi + if test "2" = "4"; then + echo $ac_n "checking for DB4 minor version and patch level""... $ac_c" 1>&6 +-echo "configure:31089: checking for DB4 minor version and patch level" >&5 ++echo "configure:32109: checking for DB4 minor version and patch level" >&5 + cat > conftest.$ac_ext <&6 +-echo "configure:31117: checking if dba can be used as shared extension" >&5 ++echo "configure:32137: checking if dba can be used as shared extension" >&5 + cat > conftest.$ac_ext <&6 +-echo "configure:31276: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:32296: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi +@@ -31292,7 +32312,7 @@ + unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT + + echo $ac_n "checking for DB1 in library""... $ac_c" 1>&6 +-echo "configure:31296: checking for DB1 in library" >&5 ++echo "configure:32316: checking for DB1 in library" >&5 + if test "$HAVE_DB4" = "1"; then + THIS_VERSION=4 + THIS_LIBS=$DB4_LIBS +@@ -31340,7 +32360,7 @@ + fi + echo "$ac_t""$THIS_LIBS" 1>&6 + echo $ac_n "checking for DB1 in header""... $ac_c" 1>&6 +-echo "configure:31344: checking for DB1 in header" >&5 ++echo "configure:32364: checking for DB1 in header" >&5 + echo "$ac_t""$THIS_INCLUDE" 1>&6 + if test -n "$THIS_INCLUDE"; then + +@@ -31350,7 +32370,7 @@ + LIBS="-l$THIS_LIBS $LIBS" + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:32385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + cat >> confdefs.h <&6 +-echo "configure:31515: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:32535: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi +@@ -31539,7 +32559,7 @@ + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +-echo "configure:31543: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:32563: checking for $THIS_FULL_NAME support" >&5 + if test -n "You cannot combine --with-dbm with --with-qdbm"; then + { echo "configure: error: You cannot combine --with-dbm with --with-qdbm" 1>&2; exit 1; } + fi +@@ -31663,7 +32683,7 @@ + done + + echo $ac_n "checking for dbminit in -l$LIB""... $ac_c" 1>&6 +-echo "configure:31667: checking for dbminit in -l$LIB" >&5 ++echo "configure:32687: checking for dbminit in -l$LIB" >&5 + ac_lib_var=`echo $LIB'_'dbminit | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -31671,7 +32691,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$LIB $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:32706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -31702,7 +32722,7 @@ + ext_shared=$save_ext_shared + + echo $ac_n "checking for DBM using GDBM""... $ac_c" 1>&6 +-echo "configure:31706: checking for DBM using GDBM" >&5 ++echo "configure:32726: checking for DBM using GDBM" >&5 + cat >> confdefs.h <&6 +-echo "configure:31870: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:32890: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi +@@ -32078,7 +33098,7 @@ + done + + echo $ac_n "checking for cdb_read in -l$LIB""... $ac_c" 1>&6 +-echo "configure:32082: checking for cdb_read in -l$LIB" >&5 ++echo "configure:33102: checking for cdb_read in -l$LIB" >&5 + ac_lib_var=`echo $LIB'_'cdb_read | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -32086,7 +33106,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$LIB $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:33121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -32266,7 +33286,7 @@ + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +-echo "configure:32270: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:33290: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi +@@ -32297,7 +33317,7 @@ + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +-echo "configure:32301: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:33321: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi +@@ -32328,7 +33348,7 @@ + THIS_FULL_NAME="$THIS_NAME" + fi + echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6 +-echo "configure:32332: checking for $THIS_FULL_NAME support" >&5 ++echo "configure:33352: checking for $THIS_FULL_NAME support" >&5 + if test -n ""; then + { echo "configure: error: " 1>&2; exit 1; } + fi +@@ -32343,7 +33363,7 @@ + + + echo $ac_n "checking whether to enable DBA interface""... $ac_c" 1>&6 +-echo "configure:32347: checking whether to enable DBA interface" >&5 ++echo "configure:33367: checking whether to enable DBA interface" >&5 + if test "$HAVE_DBA" = "1"; then + if test "$ext_shared" = "yes"; then + echo "$ac_t""yes, shared" 1>&6 +@@ -32673,7 +33693,7 @@ + php_enable_dom=yes + + echo $ac_n "checking whether to enable DOM support""... $ac_c" 1>&6 +-echo "configure:32677: checking whether to enable DOM support" >&5 ++echo "configure:33697: checking whether to enable DOM support" >&5 + # Check whether --enable-dom or --disable-dom was given. + if test "${enable_dom+set}" = set; then + enableval="$enable_dom" +@@ -32718,7 +33738,7 @@ + php_with_libxml_dir=no + + echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +-echo "configure:32722: checking libxml2 install dir" >&5 ++echo "configure:33742: checking libxml2 install dir" >&5 + # Check whether --with-libxml-dir or --without-libxml-dir was given. + if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" +@@ -32746,7 +33766,7 @@ + + + echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +-echo "configure:32750: checking for xml2-config path" >&5 ++echo "configure:33770: checking for xml2-config path" >&5 + if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -32904,7 +33924,7 @@ + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +-echo "configure:32908: checking whether libxml build works" >&5 ++echo "configure:33928: checking whether libxml build works" >&5 + if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -32920,7 +33940,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:33955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -33354,7 +34374,7 @@ + php_with_enchant=no + + echo $ac_n "checking for ENCHANT support""... $ac_c" 1>&6 +-echo "configure:33358: checking for ENCHANT support" >&5 ++echo "configure:34378: checking for ENCHANT support" >&5 + # Check whether --with-enchant or --without-enchant was given. + if test "${with_enchant+set}" = set; then + withval="$with_enchant" +@@ -33939,7 +34959,7 @@ + done + + echo $ac_n "checking for enchant_broker_set_param in -lenchant""... $ac_c" 1>&6 +-echo "configure:33943: checking for enchant_broker_set_param in -lenchant" >&5 ++echo "configure:34963: checking for enchant_broker_set_param in -lenchant" >&5 + ac_lib_var=`echo enchant'_'enchant_broker_set_param | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -33947,7 +34967,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lenchant $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:34982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -34005,7 +35025,7 @@ + php_enable_exif=no + + echo $ac_n "checking whether to enable EXIF (metadata from images) support""... $ac_c" 1>&6 +-echo "configure:34009: checking whether to enable EXIF (metadata from images) support" >&5 ++echo "configure:35029: checking whether to enable EXIF (metadata from images) support" >&5 + # Check whether --enable-exif or --disable-exif was given. + if test "${enable_exif+set}" = set; then + enableval="$enable_exif" +@@ -34349,7 +35369,7 @@ + php_enable_fileinfo=yes + + echo $ac_n "checking for fileinfo support""... $ac_c" 1>&6 +-echo "configure:34353: checking for fileinfo support" >&5 ++echo "configure:35373: checking for fileinfo support" >&5 + # Check whether --enable-fileinfo or --disable-fileinfo was given. + if test "${enable_fileinfo+set}" = set; then + enableval="$enable_fileinfo" +@@ -34699,12 +35719,12 @@ + for ac_func in utimes strndup + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:34703: checking for $ac_func" >&5 ++echo "configure:35723: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:35751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -34765,7 +35785,7 @@ + php_enable_filter=yes + + echo $ac_n "checking whether to enable input filter support""... $ac_c" 1>&6 +-echo "configure:34769: checking whether to enable input filter support" >&5 ++echo "configure:35789: checking whether to enable input filter support" >&5 + # Check whether --enable-filter or --disable-filter was given. + if test "${enable_filter+set}" = set; then + enableval="$enable_filter" +@@ -34809,7 +35829,7 @@ + php_with_pcre_dir=no + + echo $ac_n "checking pcre install prefix""... $ac_c" 1>&6 +-echo "configure:34813: checking pcre install prefix" >&5 ++echo "configure:35833: checking pcre install prefix" >&5 + # Check whether --with-pcre-dir or --without-pcre-dir was given. + if test "${with_pcre_dir+set}" = set; then + withval="$with_pcre_dir" +@@ -34836,7 +35856,7 @@ + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=$INCLUDES + cat > conftest.$ac_ext < +@@ -34855,7 +35875,7 @@ + rm -rf conftest* + + cat > conftest.$ac_ext < +@@ -35225,7 +36245,7 @@ + php_enable_ftp=no + + echo $ac_n "checking whether to enable FTP support""... $ac_c" 1>&6 +-echo "configure:35229: checking whether to enable FTP support" >&5 ++echo "configure:36249: checking whether to enable FTP support" >&5 + # Check whether --enable-ftp or --disable-ftp was given. + if test "${enable_ftp+set}" = set; then + enableval="$enable_ftp" +@@ -35269,7 +36289,7 @@ + php_with_openssl_dir=no + + echo $ac_n "checking OpenSSL dir for FTP""... $ac_c" 1>&6 +-echo "configure:35273: checking OpenSSL dir for FTP" >&5 ++echo "configure:36293: checking OpenSSL dir for FTP" >&5 + # Check whether --with-openssl-dir or --without-openssl-dir was given. + if test "${with_openssl_dir+set}" = set; then + withval="$with_openssl_dir" +@@ -35607,7 +36627,7 @@ + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:35611: checking for $ac_word" >&5 ++echo "configure:36631: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -35812,9 +36832,9 @@ + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$OPENSSL_INCDIR + echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6 +-echo "configure:35816: checking for OpenSSL version" >&5 ++echo "configure:36836: checking for OpenSSL version" >&5 + cat > conftest.$ac_ext < +@@ -35969,7 +36989,7 @@ + done + + echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 +-echo "configure:35973: checking for CRYPTO_free in -lcrypto" >&5 ++echo "configure:36993: checking for CRYPTO_free in -lcrypto" >&5 + ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -35977,7 +36997,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcrypto $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:37012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -36145,7 +37165,7 @@ + done + + echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6 +-echo "configure:36149: checking for SSL_CTX_set_ssl_version in -lssl" >&5 ++echo "configure:37169: checking for SSL_CTX_set_ssl_version in -lssl" >&5 + ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -36153,7 +37173,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lssl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:37188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -36283,7 +37303,7 @@ + php_with_gd=no + + echo $ac_n "checking for GD support""... $ac_c" 1>&6 +-echo "configure:36287: checking for GD support" >&5 ++echo "configure:37307: checking for GD support" >&5 + # Check whether --with-gd or --without-gd was given. + if test "${with_gd+set}" = set; then + withval="$with_gd" +@@ -36328,7 +37348,7 @@ + php_with_jpeg_dir=no + + echo $ac_n "checking for the location of libjpeg""... $ac_c" 1>&6 +-echo "configure:36332: checking for the location of libjpeg" >&5 ++echo "configure:37352: checking for the location of libjpeg" >&5 + # Check whether --with-jpeg-dir or --without-jpeg-dir was given. + if test "${with_jpeg_dir+set}" = set; then + withval="$with_jpeg_dir" +@@ -36353,7 +37373,7 @@ + php_with_png_dir=no + + echo $ac_n "checking for the location of libpng""... $ac_c" 1>&6 +-echo "configure:36357: checking for the location of libpng" >&5 ++echo "configure:37377: checking for the location of libpng" >&5 + # Check whether --with-png-dir or --without-png-dir was given. + if test "${with_png_dir+set}" = set; then + withval="$with_png_dir" +@@ -36378,7 +37398,7 @@ + php_with_zlib_dir=no + + echo $ac_n "checking for the location of libz""... $ac_c" 1>&6 +-echo "configure:36382: checking for the location of libz" >&5 ++echo "configure:37402: checking for the location of libz" >&5 + # Check whether --with-zlib-dir or --without-zlib-dir was given. + if test "${with_zlib_dir+set}" = set; then + withval="$with_zlib_dir" +@@ -36402,7 +37422,7 @@ + php_with_xpm_dir=no + + echo $ac_n "checking for the location of libXpm""... $ac_c" 1>&6 +-echo "configure:36406: checking for the location of libXpm" >&5 ++echo "configure:37426: checking for the location of libXpm" >&5 + # Check whether --with-xpm-dir or --without-xpm-dir was given. + if test "${with_xpm_dir+set}" = set; then + withval="$with_xpm_dir" +@@ -36425,7 +37445,7 @@ + php_with_freetype_dir=no + + echo $ac_n "checking for FreeType 2""... $ac_c" 1>&6 +-echo "configure:36429: checking for FreeType 2" >&5 ++echo "configure:37449: checking for FreeType 2" >&5 + # Check whether --with-freetype-dir or --without-freetype-dir was given. + if test "${with_freetype_dir+set}" = set; then + withval="$with_freetype_dir" +@@ -36448,7 +37468,7 @@ + php_with_t1lib=no + + echo $ac_n "checking for T1lib support""... $ac_c" 1>&6 +-echo "configure:36452: checking for T1lib support" >&5 ++echo "configure:37472: checking for T1lib support" >&5 + # Check whether --with-t1lib or --without-t1lib was given. + if test "${with_t1lib+set}" = set; then + withval="$with_t1lib" +@@ -36471,7 +37491,7 @@ + php_enable_gd_native_ttf=no + + echo $ac_n "checking whether to enable truetype string function in GD""... $ac_c" 1>&6 +-echo "configure:36475: checking whether to enable truetype string function in GD" >&5 ++echo "configure:37495: checking whether to enable truetype string function in GD" >&5 + # Check whether --enable-gd-native-ttf or --disable-gd-native-ttf was given. + if test "${enable_gd_native_ttf+set}" = set; then + enableval="$enable_gd_native_ttf" +@@ -36494,7 +37514,7 @@ + php_enable_gd_jis_conv=no + + echo $ac_n "checking whether to enable JIS-mapped Japanese font support in GD""... $ac_c" 1>&6 +-echo "configure:36498: checking whether to enable JIS-mapped Japanese font support in GD" >&5 ++echo "configure:37518: checking whether to enable JIS-mapped Japanese font support in GD" >&5 + # Check whether --enable-gd-jis-conv or --disable-gd-jis-conv was given. + if test "${enable_gd_jis_conv+set}" = set; then + enableval="$enable_gd_jis_conv" +@@ -36546,12 +37566,12 @@ + for ac_func in fabsf floorf + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:36550: checking for $ac_func" >&5 ++echo "configure:37570: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:37598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -36746,7 +37766,7 @@ + done + + echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6 +-echo "configure:36750: checking for jpeg_read_header in -ljpeg" >&5 ++echo "configure:37770: checking for jpeg_read_header in -ljpeg" >&5 + ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -36754,7 +37774,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ljpeg $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:37789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -37047,7 +38067,7 @@ + done + + echo $ac_n "checking for png_write_image in -lpng""... $ac_c" 1>&6 +-echo "configure:37051: checking for png_write_image in -lpng" >&5 ++echo "configure:38071: checking for png_write_image in -lpng" >&5 + ac_lib_var=`echo png'_'png_write_image | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -37055,7 +38075,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpng $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:38090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -37446,7 +38466,7 @@ + done + + echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6 +-echo "configure:37450: checking for XpmFreeXpmImage in -lXpm" >&5 ++echo "configure:38470: checking for XpmFreeXpmImage in -lXpm" >&5 + ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -37454,7 +38474,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lXpm $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:38489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -37840,7 +38860,7 @@ + done + + echo $ac_n "checking for FT_New_Face in -lfreetype""... $ac_c" 1>&6 +-echo "configure:37844: checking for FT_New_Face in -lfreetype" >&5 ++echo "configure:38864: checking for FT_New_Face in -lfreetype" >&5 + ac_lib_var=`echo freetype'_'FT_New_Face | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -37848,7 +38868,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lfreetype $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:38883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -38176,7 +39196,7 @@ + done + + echo $ac_n "checking for T1_StrError in -lt1""... $ac_c" 1>&6 +-echo "configure:38180: checking for T1_StrError in -lt1" >&5 ++echo "configure:39200: checking for T1_StrError in -lt1" >&5 + ac_lib_var=`echo t1'_'T1_StrError | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -38184,7 +39204,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lt1 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:39219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -38638,7 +39658,7 @@ + done + + echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6 +-echo "configure:38642: checking for jpeg_read_header in -ljpeg" >&5 ++echo "configure:39662: checking for jpeg_read_header in -ljpeg" >&5 + ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -38646,7 +39666,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ljpeg $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:39681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -38939,7 +39959,7 @@ + done + + echo $ac_n "checking for png_write_image in -lpng""... $ac_c" 1>&6 +-echo "configure:38943: checking for png_write_image in -lpng" >&5 ++echo "configure:39963: checking for png_write_image in -lpng" >&5 + ac_lib_var=`echo png'_'png_write_image | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -38947,7 +39967,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpng $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:39982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -39338,7 +40358,7 @@ + done + + echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6 +-echo "configure:39342: checking for XpmFreeXpmImage in -lXpm" >&5 ++echo "configure:40362: checking for XpmFreeXpmImage in -lXpm" >&5 + ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -39346,7 +40366,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lXpm $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:40381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -39732,7 +40752,7 @@ + done + + echo $ac_n "checking for FT_New_Face in -lfreetype""... $ac_c" 1>&6 +-echo "configure:39736: checking for FT_New_Face in -lfreetype" >&5 ++echo "configure:40756: checking for FT_New_Face in -lfreetype" >&5 + ac_lib_var=`echo freetype'_'FT_New_Face | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -39740,7 +40760,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lfreetype $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:40775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -40068,7 +41088,7 @@ + done + + echo $ac_n "checking for T1_StrError in -lt1""... $ac_c" 1>&6 +-echo "configure:40072: checking for T1_StrError in -lt1" >&5 ++echo "configure:41092: checking for T1_StrError in -lt1" >&5 + ac_lib_var=`echo t1'_'T1_StrError | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -40076,7 +41096,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lt1 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:41111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -40462,7 +41482,7 @@ + done + + echo $ac_n "checking for gdImageString16 in -lgd""... $ac_c" 1>&6 +-echo "configure:40466: checking for gdImageString16 in -lgd" >&5 ++echo "configure:41486: checking for gdImageString16 in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageString16 | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -40470,7 +41490,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:41505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -40610,7 +41630,7 @@ + done + + echo $ac_n "checking for gdImagePaletteCopy in -lgd""... $ac_c" 1>&6 +-echo "configure:40614: checking for gdImagePaletteCopy in -lgd" >&5 ++echo "configure:41634: checking for gdImagePaletteCopy in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImagePaletteCopy | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -40618,7 +41638,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:41653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -40758,7 +41778,7 @@ + done + + echo $ac_n "checking for gdImageCreateFromPng in -lgd""... $ac_c" 1>&6 +-echo "configure:40762: checking for gdImageCreateFromPng in -lgd" >&5 ++echo "configure:41782: checking for gdImageCreateFromPng in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageCreateFromPng | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -40766,7 +41786,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:41801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -40906,7 +41926,7 @@ + done + + echo $ac_n "checking for gdImageCreateFromGif in -lgd""... $ac_c" 1>&6 +-echo "configure:40910: checking for gdImageCreateFromGif in -lgd" >&5 ++echo "configure:41930: checking for gdImageCreateFromGif in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageCreateFromGif | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -40914,7 +41934,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:41949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -41054,7 +42074,7 @@ + done + + echo $ac_n "checking for gdImageGif in -lgd""... $ac_c" 1>&6 +-echo "configure:41058: checking for gdImageGif in -lgd" >&5 ++echo "configure:42078: checking for gdImageGif in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageGif | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -41062,7 +42082,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:42097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -41202,7 +42222,7 @@ + done + + echo $ac_n "checking for gdImageWBMP in -lgd""... $ac_c" 1>&6 +-echo "configure:41206: checking for gdImageWBMP in -lgd" >&5 ++echo "configure:42226: checking for gdImageWBMP in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageWBMP | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -41210,7 +42230,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:42245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -41350,7 +42370,7 @@ + done + + echo $ac_n "checking for gdImageCreateFromJpeg in -lgd""... $ac_c" 1>&6 +-echo "configure:41354: checking for gdImageCreateFromJpeg in -lgd" >&5 ++echo "configure:42374: checking for gdImageCreateFromJpeg in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageCreateFromJpeg | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -41358,7 +42378,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:42393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -41498,7 +42518,7 @@ + done + + echo $ac_n "checking for gdImageCreateFromXpm in -lgd""... $ac_c" 1>&6 +-echo "configure:41502: checking for gdImageCreateFromXpm in -lgd" >&5 ++echo "configure:42522: checking for gdImageCreateFromXpm in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageCreateFromXpm | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -41506,7 +42526,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:42541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -41646,7 +42666,7 @@ + done + + echo $ac_n "checking for gdImageCreateFromGd2 in -lgd""... $ac_c" 1>&6 +-echo "configure:41650: checking for gdImageCreateFromGd2 in -lgd" >&5 ++echo "configure:42670: checking for gdImageCreateFromGd2 in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageCreateFromGd2 | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -41654,7 +42674,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:42689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -41794,7 +42814,7 @@ + done + + echo $ac_n "checking for gdImageCreateTrueColor in -lgd""... $ac_c" 1>&6 +-echo "configure:41798: checking for gdImageCreateTrueColor in -lgd" >&5 ++echo "configure:42818: checking for gdImageCreateTrueColor in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageCreateTrueColor | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -41802,7 +42822,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:42837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -41942,7 +42962,7 @@ + done + + echo $ac_n "checking for gdImageSetTile in -lgd""... $ac_c" 1>&6 +-echo "configure:41946: checking for gdImageSetTile in -lgd" >&5 ++echo "configure:42966: checking for gdImageSetTile in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageSetTile | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -41950,7 +42970,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:42985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -42090,7 +43110,7 @@ + done + + echo $ac_n "checking for gdImageEllipse in -lgd""... $ac_c" 1>&6 +-echo "configure:42094: checking for gdImageEllipse in -lgd" >&5 ++echo "configure:43114: checking for gdImageEllipse in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageEllipse | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -42098,7 +43118,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:43133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -42238,7 +43258,7 @@ + done + + echo $ac_n "checking for gdImageSetBrush in -lgd""... $ac_c" 1>&6 +-echo "configure:42242: checking for gdImageSetBrush in -lgd" >&5 ++echo "configure:43262: checking for gdImageSetBrush in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageSetBrush | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -42246,7 +43266,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:43281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -42386,7 +43406,7 @@ + done + + echo $ac_n "checking for gdImageStringTTF in -lgd""... $ac_c" 1>&6 +-echo "configure:42390: checking for gdImageStringTTF in -lgd" >&5 ++echo "configure:43410: checking for gdImageStringTTF in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageStringTTF | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -42394,7 +43414,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:43429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -42534,7 +43554,7 @@ + done + + echo $ac_n "checking for gdImageStringFT in -lgd""... $ac_c" 1>&6 +-echo "configure:42538: checking for gdImageStringFT in -lgd" >&5 ++echo "configure:43558: checking for gdImageStringFT in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageStringFT | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -42542,7 +43562,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:43577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -42682,7 +43702,7 @@ + done + + echo $ac_n "checking for gdImageStringFTEx in -lgd""... $ac_c" 1>&6 +-echo "configure:42686: checking for gdImageStringFTEx in -lgd" >&5 ++echo "configure:43706: checking for gdImageStringFTEx in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageStringFTEx | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -42690,7 +43710,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:43725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -42830,7 +43850,7 @@ + done + + echo $ac_n "checking for gdImageColorClosestHWB in -lgd""... $ac_c" 1>&6 +-echo "configure:42834: checking for gdImageColorClosestHWB in -lgd" >&5 ++echo "configure:43854: checking for gdImageColorClosestHWB in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageColorClosestHWB | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -42838,7 +43858,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:43873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -42978,7 +43998,7 @@ + done + + echo $ac_n "checking for gdImageColorResolve in -lgd""... $ac_c" 1>&6 +-echo "configure:42982: checking for gdImageColorResolve in -lgd" >&5 ++echo "configure:44002: checking for gdImageColorResolve in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageColorResolve | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -42986,7 +44006,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:44021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -43126,7 +44146,7 @@ + done + + echo $ac_n "checking for gdImageGifCtx in -lgd""... $ac_c" 1>&6 +-echo "configure:43130: checking for gdImageGifCtx in -lgd" >&5 ++echo "configure:44150: checking for gdImageGifCtx in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageGifCtx | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -43134,7 +44154,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:44169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -43274,7 +44294,7 @@ + done + + echo $ac_n "checking for gdCacheCreate in -lgd""... $ac_c" 1>&6 +-echo "configure:43278: checking for gdCacheCreate in -lgd" >&5 ++echo "configure:44298: checking for gdCacheCreate in -lgd" >&5 + ac_lib_var=`echo gd'_'gdCacheCreate | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -43282,7 +44302,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:44317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -43422,7 +44442,7 @@ + done + + echo $ac_n "checking for gdFontCacheShutdown in -lgd""... $ac_c" 1>&6 +-echo "configure:43426: checking for gdFontCacheShutdown in -lgd" >&5 ++echo "configure:44446: checking for gdFontCacheShutdown in -lgd" >&5 + ac_lib_var=`echo gd'_'gdFontCacheShutdown | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -43430,7 +44450,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:44465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -43570,7 +44590,7 @@ + done + + echo $ac_n "checking for gdFreeFontCache in -lgd""... $ac_c" 1>&6 +-echo "configure:43574: checking for gdFreeFontCache in -lgd" >&5 ++echo "configure:44594: checking for gdFreeFontCache in -lgd" >&5 + ac_lib_var=`echo gd'_'gdFreeFontCache | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -43578,7 +44598,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:44613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -43718,7 +44738,7 @@ + done + + echo $ac_n "checking for gdFontCacheMutexSetup in -lgd""... $ac_c" 1>&6 +-echo "configure:43722: checking for gdFontCacheMutexSetup in -lgd" >&5 ++echo "configure:44742: checking for gdFontCacheMutexSetup in -lgd" >&5 + ac_lib_var=`echo gd'_'gdFontCacheMutexSetup | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -43726,7 +44746,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:44761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -43866,7 +44886,7 @@ + done + + echo $ac_n "checking for gdNewDynamicCtxEx in -lgd""... $ac_c" 1>&6 +-echo "configure:43870: checking for gdNewDynamicCtxEx in -lgd" >&5 ++echo "configure:44890: checking for gdNewDynamicCtxEx in -lgd" >&5 + ac_lib_var=`echo gd'_'gdNewDynamicCtxEx | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -43874,7 +44894,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:44909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -43940,7 +44960,7 @@ + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$GD_INCLUDE + cat > conftest.$ac_ext < +@@ -43954,7 +44974,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:43958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:44978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + cat >> confdefs.h <<\EOF +@@ -44285,7 +45305,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:45320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -44447,7 +45467,7 @@ + done + + echo $ac_n "checking for gdImageCreate in -lgd""... $ac_c" 1>&6 +-echo "configure:44451: checking for gdImageCreate in -lgd" >&5 ++echo "configure:45471: checking for gdImageCreate in -lgd" >&5 + ac_lib_var=`echo gd'_'gdImageCreate | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -44455,7 +45475,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgd $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:45490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -44531,7 +45551,7 @@ + php_with_gettext=no + + echo $ac_n "checking for GNU gettext support""... $ac_c" 1>&6 +-echo "configure:44535: checking for GNU gettext support" >&5 ++echo "configure:45555: checking for GNU gettext support" >&5 + # Check whether --with-gettext or --without-gettext was given. + if test "${with_gettext+set}" = set; then + withval="$with_gettext" +@@ -44586,7 +45606,7 @@ + O_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR" + echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 +-echo "configure:44590: checking for bindtextdomain in -lintl" >&5 ++echo "configure:45610: checking for bindtextdomain in -lintl" >&5 + ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -44594,7 +45614,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lintl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:45629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -44627,7 +45647,7 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for bindtextdomain in -lc""... $ac_c" 1>&6 +-echo "configure:44631: checking for bindtextdomain in -lc" >&5 ++echo "configure:45651: checking for bindtextdomain in -lc" >&5 + ac_lib_var=`echo c'_'bindtextdomain | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -44635,7 +45655,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lc $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:45670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -45110,7 +46130,7 @@ + + + echo $ac_n "checking for ngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6 +-echo "configure:45114: checking for ngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 ++echo "configure:46134: checking for ngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 + ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'ngettext | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -45118,7 +46138,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:46153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -45153,7 +46173,7 @@ + fi + + echo $ac_n "checking for dngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6 +-echo "configure:45157: checking for dngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 ++echo "configure:46177: checking for dngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 + ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'dngettext | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -45161,7 +46181,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:46196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -45196,7 +46216,7 @@ + fi + + echo $ac_n "checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6 +-echo "configure:45200: checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 ++echo "configure:46220: checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB" >&5 + ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'dcngettext | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -45204,7 +46224,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:46239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -45239,7 +46259,7 @@ + fi + + echo $ac_n "checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6 +-echo "configure:45243: checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB" >&5 ++echo "configure:46263: checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB" >&5 + ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'bind_textdomain_codeset | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -45247,7 +46267,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$GETTEXT_CHECK_IN_LIB $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:46282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -45289,7 +46309,7 @@ + php_with_gmp=no + + echo $ac_n "checking for GNU MP support""... $ac_c" 1>&6 +-echo "configure:45293: checking for GNU MP support" >&5 ++echo "configure:46313: checking for GNU MP support" >&5 + # Check whether --with-gmp or --without-gmp was given. + if test "${with_gmp+set}" = set; then + withval="$with_gmp" +@@ -45437,7 +46457,7 @@ + done + + echo $ac_n "checking for __gmp_randinit_lc_2exp_size in -lgmp""... $ac_c" 1>&6 +-echo "configure:45441: checking for __gmp_randinit_lc_2exp_size in -lgmp" >&5 ++echo "configure:46461: checking for __gmp_randinit_lc_2exp_size in -lgmp" >&5 + ac_lib_var=`echo gmp'_'__gmp_randinit_lc_2exp_size | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -45445,7 +46465,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgmp $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:46480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -45581,7 +46601,7 @@ + done + + echo $ac_n "checking for gmp_randinit_lc_2exp_size in -lgmp""... $ac_c" 1>&6 +-echo "configure:45585: checking for gmp_randinit_lc_2exp_size in -lgmp" >&5 ++echo "configure:46605: checking for gmp_randinit_lc_2exp_size in -lgmp" >&5 + ac_lib_var=`echo gmp'_'gmp_randinit_lc_2exp_size | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -45589,7 +46609,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgmp $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:46624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -46072,7 +47092,7 @@ + php_with_mhash=no + + echo $ac_n "checking for mhash support""... $ac_c" 1>&6 +-echo "configure:46076: checking for mhash support" >&5 ++echo "configure:47096: checking for mhash support" >&5 + # Check whether --with-mhash or --without-mhash was given. + if test "${with_mhash+set}" = set; then + withval="$with_mhash" +@@ -46116,7 +47136,7 @@ + php_enable_hash=yes + + echo $ac_n "checking whether to enable hash support""... $ac_c" 1>&6 +-echo "configure:46120: checking whether to enable hash support" >&5 ++echo "configure:47140: checking whether to enable hash support" >&5 + # Check whether --enable-hash or --disable-hash was given. + if test "${enable_hash+set}" = set; then + enableval="$enable_hash" +@@ -46174,7 +47194,7 @@ + + + echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +-echo "configure:46178: checking whether byte ordering is bigendian" >&5 ++echo "configure:47198: checking whether byte ordering is bigendian" >&5 + if eval "test \"`echo '$''{'ac_cv_c_bigendian_php'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -46184,7 +47204,7 @@ + ac_cv_c_bigendian_php=unknown + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:47224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_c_bigendian_php=yes + else +@@ -46225,7 +47245,7 @@ + + + echo $ac_n "checking size of short""... $ac_c" 1>&6 +-echo "configure:46229: checking size of short" >&5 ++echo "configure:47249: checking size of short" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -46233,18 +47253,19 @@ + ac_cv_sizeof_short=2 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(short)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:46248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:47269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_short=`cat conftestval` + else +@@ -46264,7 +47285,7 @@ + + + echo $ac_n "checking size of int""... $ac_c" 1>&6 +-echo "configure:46268: checking size of int" >&5 ++echo "configure:47289: checking size of int" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -46272,18 +47293,19 @@ + ac_cv_sizeof_int=4 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(int)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:46287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:47309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_int=`cat conftestval` + else +@@ -46303,7 +47325,7 @@ + + + echo $ac_n "checking size of long""... $ac_c" 1>&6 +-echo "configure:46307: checking size of long" >&5 ++echo "configure:47329: checking size of long" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -46311,18 +47333,19 @@ + ac_cv_sizeof_long=4 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:46326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:47349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_long=`cat conftestval` + else +@@ -46342,7 +47365,7 @@ + + + echo $ac_n "checking size of long long""... $ac_c" 1>&6 +-echo "configure:46346: checking size of long long" >&5 ++echo "configure:47369: checking size of long long" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -46350,18 +47373,19 @@ + ac_cv_sizeof_long_long=8 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long long)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:46365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:47389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_long_long=`cat conftestval` + else +@@ -46710,7 +47734,7 @@ + php_with_iconv=yes + + echo $ac_n "checking for iconv support""... $ac_c" 1>&6 +-echo "configure:46714: checking for iconv support" >&5 ++echo "configure:47738: checking for iconv support" >&5 + # Check whether --with-iconv or --without-iconv was given. + if test "${with_iconv+set}" = set; then + withval="$with_iconv" +@@ -46771,12 +47795,12 @@ + + if test "$PHP_ICONV" = "yes"; then + echo $ac_n "checking for iconv""... $ac_c" 1>&6 +-echo "configure:46775: checking for iconv" >&5 ++echo "configure:47799: checking for iconv" >&5 + if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:47827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_iconv=yes" + else +@@ -46820,12 +47844,12 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for libiconv""... $ac_c" 1>&6 +-echo "configure:46824: checking for libiconv" >&5 ++echo "configure:47848: checking for libiconv" >&5 + if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:47876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_libiconv=yes" + else +@@ -47004,7 +48028,7 @@ + done + + echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6 +-echo "configure:47008: checking for libiconv in -l$iconv_lib_name" >&5 ++echo "configure:48032: checking for libiconv in -l$iconv_lib_name" >&5 + ac_lib_var=`echo $iconv_lib_name'_'libiconv | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -47012,7 +48036,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$iconv_lib_name $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:48051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -47164,7 +48188,7 @@ + done + + echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6 +-echo "configure:47168: checking for iconv in -l$iconv_lib_name" >&5 ++echo "configure:48192: checking for iconv in -l$iconv_lib_name" >&5 + ac_lib_var=`echo $iconv_lib_name'_'iconv | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -47172,7 +48196,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$iconv_lib_name $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:48211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -47394,16 +48418,16 @@ + fi + + echo $ac_n "checking if iconv is glibc's""... $ac_c" 1>&6 +-echo "configure:47398: checking if iconv is glibc's" >&5 ++echo "configure:48422: checking if iconv is glibc's" >&5 + cat > conftest.$ac_ext < + int main() { + gnu_get_libc_version(); + ; return 0; } + EOF +-if { (eval echo configure:47407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:48431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + echo "$ac_t""yes" 1>&6 +@@ -47421,7 +48445,7 @@ + + if test -z "$iconv_impl_name"; then + echo $ac_n "checking if using GNU libiconv""... $ac_c" 1>&6 +-echo "configure:47425: checking if using GNU libiconv" >&5 ++echo "configure:48449: checking if using GNU libiconv" >&5 + php_iconv_old_ld="$LDFLAGS" + LDFLAGS="-liconv $LDFLAGS" + if test "$cross_compiling" = yes; then +@@ -47431,7 +48455,7 @@ + + else + cat > conftest.$ac_ext < +@@ -47441,7 +48465,7 @@ + } + + EOF +-if { (eval echo configure:47445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:48469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + echo "$ac_t""yes" 1>&6 +@@ -47463,16 +48487,16 @@ + + if test -z "$iconv_impl_name"; then + echo $ac_n "checking if iconv is Konstantin Chuguev's""... $ac_c" 1>&6 +-echo "configure:47467: checking if iconv is Konstantin Chuguev's" >&5 ++echo "configure:48491: checking if iconv is Konstantin Chuguev's" >&5 + cat > conftest.$ac_ext < + int main() { + iconv_ccs_init(NULL, NULL); + ; return 0; } + EOF +-if { (eval echo configure:47476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:48500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + echo "$ac_t""yes" 1>&6 +@@ -47491,18 +48515,18 @@ + + if test -z "$iconv_impl_name"; then + echo $ac_n "checking if using IBM iconv""... $ac_c" 1>&6 +-echo "configure:47495: checking if using IBM iconv" >&5 ++echo "configure:48519: checking if using IBM iconv" >&5 + php_iconv_old_ld="$LDFLAGS" + LDFLAGS="-liconv $LDFLAGS" + cat > conftest.$ac_ext < + int main() { + cstoccsid(""); + ; return 0; } + EOF +-if { (eval echo configure:47506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:48530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + echo "$ac_t""yes" 1>&6 +@@ -47688,7 +48712,7 @@ + esac + + echo $ac_n "checking if iconv supports errno""... $ac_c" 1>&6 +-echo "configure:47692: checking if iconv supports errno" >&5 ++echo "configure:48716: checking if iconv supports errno" >&5 + if test "$cross_compiling" = yes; then + + echo "$ac_t""no" 1>&6 +@@ -47702,7 +48726,7 @@ + + else + cat > conftest.$ac_ext < +@@ -47723,7 +48747,7 @@ + } + + EOF +-if { (eval echo configure:47727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:48751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + echo "$ac_t""yes" 1>&6 +@@ -47755,9 +48779,9 @@ + + + echo $ac_n "checking if your cpp allows macro usage in include lines""... $ac_c" 1>&6 +-echo "configure:47759: checking if your cpp allows macro usage in include lines" >&5 ++echo "configure:48783: checking if your cpp allows macro usage in include lines" >&5 + cat > conftest.$ac_ext < +@@ -47767,7 +48791,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:47771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:48795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + echo "$ac_t""yes" 1>&6 +@@ -48123,7 +49147,7 @@ + php_with_imap=no + + echo $ac_n "checking for IMAP support""... $ac_c" 1>&6 +-echo "configure:48127: checking for IMAP support" >&5 ++echo "configure:49151: checking for IMAP support" >&5 + # Check whether --with-imap or --without-imap was given. + if test "${with_imap+set}" = set; then + withval="$with_imap" +@@ -48167,7 +49191,7 @@ + php_with_kerberos=no + + echo $ac_n "checking for IMAP Kerberos support""... $ac_c" 1>&6 +-echo "configure:48171: checking for IMAP Kerberos support" >&5 ++echo "configure:49195: checking for IMAP Kerberos support" >&5 + # Check whether --with-kerberos or --without-kerberos was given. + if test "${with_kerberos+set}" = set; then + withval="$with_kerberos" +@@ -48190,7 +49214,7 @@ + php_with_imap_ssl=no + + echo $ac_n "checking for IMAP SSL support""... $ac_c" 1>&6 +-echo "configure:48194: checking for IMAP SSL support" >&5 ++echo "configure:49218: checking for IMAP SSL support" >&5 + # Check whether --with-imap-ssl or --without-imap-ssl was given. + if test "${with_imap_ssl+set}" = set; then + withval="$with_imap_ssl" +@@ -48594,7 +49618,7 @@ + done + + cat > conftest.$ac_ext < + EOF +@@ -48614,12 +49638,12 @@ + old_CFLAGS=$CFLAGS + CFLAGS="-I$IMAP_INC_DIR" + echo $ac_n "checking for utf8_mime2text signature""... $ac_c" 1>&6 +-echo "configure:48618: checking for utf8_mime2text signature" >&5 ++echo "configure:49642: checking for utf8_mime2text signature" >&5 + if eval "test \"`echo '$''{'ac_cv_utf8_mime2text'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -48632,7 +49656,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:48636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:49660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_utf8_mime2text=old +@@ -48661,12 +49685,12 @@ + old_CFLAGS=$CFLAGS + CFLAGS="-I$IMAP_INC_DIR" + echo $ac_n "checking for U8T_DECOMPOSE""... $ac_c" 1>&6 +-echo "configure:48665: checking for U8T_DECOMPOSE" >&5 ++echo "configure:49689: checking for U8T_DECOMPOSE" >&5 + if eval "test \"`echo '$''{'ac_cv_u8t_canonical'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -48677,7 +49701,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:48681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:49705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_u8t_decompose=yes +@@ -48707,7 +49731,7 @@ + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$IMAP_INC_DIR + cat > conftest.$ac_ext <&6 +-echo "configure:48830: checking for pam_start in -lpam" >&5 ++echo "configure:49854: checking for pam_start in -lpam" >&5 + ac_lib_var=`echo pam'_'pam_start | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -48834,7 +49858,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpam $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:49873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -49000,7 +50024,7 @@ + done + + echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 +-echo "configure:49004: checking for crypt in -lcrypt" >&5 ++echo "configure:50028: checking for crypt in -lcrypt" >&5 + ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -49008,7 +50032,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcrypt $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:50047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -49223,7 +50247,7 @@ + # Extract the first word of "krb5-config", so it can be a program name with args. + set dummy krb5-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:49227: checking for $ac_word" >&5 ++echo "configure:50251: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_KRB5_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -49592,7 +50616,7 @@ + + else + cat > conftest.$ac_ext < + EOF +@@ -49633,7 +50657,7 @@ + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:49637: checking for $ac_word" >&5 ++echo "configure:50661: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -49838,9 +50862,9 @@ + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$OPENSSL_INCDIR + echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6 +-echo "configure:49842: checking for OpenSSL version" >&5 ++echo "configure:50866: checking for OpenSSL version" >&5 + cat > conftest.$ac_ext < +@@ -49995,7 +51019,7 @@ + done + + echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 +-echo "configure:49999: checking for CRYPTO_free in -lcrypto" >&5 ++echo "configure:51023: checking for CRYPTO_free in -lcrypto" >&5 + ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -50003,7 +51027,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcrypto $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:51042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -50171,7 +51195,7 @@ + done + + echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6 +-echo "configure:50175: checking for SSL_CTX_set_ssl_version in -lssl" >&5 ++echo "configure:51199: checking for SSL_CTX_set_ssl_version in -lssl" >&5 + ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -50179,7 +51203,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lssl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:51218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -50309,7 +51333,7 @@ + + elif test -f "$IMAP_INC_DIR/linkage.c"; then + cat > conftest.$ac_ext < + EOF +@@ -50340,7 +51364,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:51401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -50409,7 +51433,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:51470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -50469,7 +51493,7 @@ + + + echo $ac_n "checking whether rfc822_output_address_list function present""... $ac_c" 1>&6 +-echo "configure:50473: checking whether rfc822_output_address_list function present" >&5 ++echo "configure:51497: checking whether rfc822_output_address_list function present" >&5 + + old_LIBS=$LIBS + LIBS=" +@@ -50481,7 +51505,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:51545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -50546,7 +51570,7 @@ + + + echo $ac_n "checking whether build with IMAP works""... $ac_c" 1>&6 +-echo "configure:50550: checking whether build with IMAP works" >&5 ++echo "configure:51574: checking whether build with IMAP works" >&5 + + + old_LIBS=$LIBS +@@ -50557,7 +51581,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:51618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -50622,7 +51646,7 @@ + php_with_interbase=no + + echo $ac_n "checking for InterBase support""... $ac_c" 1>&6 +-echo "configure:50626: checking for InterBase support" >&5 ++echo "configure:51650: checking for InterBase support" >&5 + # Check whether --with-interbase or --without-interbase was given. + if test "${with_interbase+set}" = set; then + withval="$with_interbase" +@@ -50769,7 +51793,7 @@ + done + + echo $ac_n "checking for isc_detach_database in -lfbclient""... $ac_c" 1>&6 +-echo "configure:50773: checking for isc_detach_database in -lfbclient" >&5 ++echo "configure:51797: checking for isc_detach_database in -lfbclient" >&5 + ac_lib_var=`echo fbclient'_'isc_detach_database | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -50777,7 +51801,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lfbclient $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:51816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -50915,7 +51939,7 @@ + done + + echo $ac_n "checking for isc_detach_database in -lgds""... $ac_c" 1>&6 +-echo "configure:50919: checking for isc_detach_database in -lgds" >&5 ++echo "configure:51943: checking for isc_detach_database in -lgds" >&5 + ac_lib_var=`echo gds'_'isc_detach_database | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -50923,7 +51947,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgds $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:51962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -51061,7 +52085,7 @@ + done + + echo $ac_n "checking for isc_detach_database in -lib_util""... $ac_c" 1>&6 +-echo "configure:51065: checking for isc_detach_database in -lib_util" >&5 ++echo "configure:52089: checking for isc_detach_database in -lib_util" >&5 + ac_lib_var=`echo ib_util'_'isc_detach_database | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -51069,7 +52093,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lib_util $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:52108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -51557,7 +52581,7 @@ + php_enable_intl=no + + echo $ac_n "checking whether to enable internationalization support""... $ac_c" 1>&6 +-echo "configure:51561: checking whether to enable internationalization support" >&5 ++echo "configure:52585: checking whether to enable internationalization support" >&5 + # Check whether --enable-intl or --disable-intl was given. + if test "${enable_intl+set}" = set; then + enableval="$enable_intl" +@@ -51629,7 +52653,7 @@ + # Extract the first word of "icu-config", so it can be a program name with args. + set dummy icu-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:51633: checking for $ac_word" >&5 ++echo "configure:52657: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_ICU_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -51667,7 +52691,7 @@ + fi + + echo $ac_n "checking for location of ICU headers and libraries""... $ac_c" 1>&6 +-echo "configure:51671: checking for location of ICU headers and libraries" >&5 ++echo "configure:52695: checking for location of ICU headers and libraries" >&5 + + icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null` + if test "$?" != "0" || test -z "$icu_install_prefix"; then +@@ -51677,7 +52701,7 @@ + echo "$ac_t""$icu_install_prefix" 1>&6 + + echo $ac_n "checking for ICU 3.4 or greater""... $ac_c" 1>&6 +-echo "configure:51681: checking for ICU 3.4 or greater" >&5 ++echo "configure:52705: checking for ICU 3.4 or greater" >&5 + icu_version_full=`$ICU_CONFIG --version` + ac_IFS=$IFS + IFS="." +@@ -51834,7 +52858,7 @@ + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:51838: checking for $ac_word" >&5 ++echo "configure:52862: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -51866,7 +52890,7 @@ + + + echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:51870: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ++echo "configure:52894: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 + + ac_ext=C + # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +@@ -51877,12 +52901,12 @@ + + cat > conftest.$ac_ext << EOF + +-#line 51881 "configure" ++#line 52905 "configure" + #include "confdefs.h" + + int main(){return(0);} + EOF +-if { (eval echo configure:51886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:52910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cxx_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then +@@ -51908,12 +52932,12 @@ + { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:51912: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:52936: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 + echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 + cross_compiling=$ac_cv_prog_cxx_cross + + echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 +-echo "configure:51917: checking whether we are using GNU C++" >&5 ++echo "configure:52941: checking whether we are using GNU C++" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -51922,7 +52946,7 @@ + yes; + #endif + EOF +-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:51926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:52950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gxx=yes + else + ac_cv_prog_gxx=no +@@ -51941,7 +52965,7 @@ + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS= + echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 +-echo "configure:51945: checking whether ${CXX-g++} accepts -g" >&5 ++echo "configure:52969: checking whether ${CXX-g++} accepts -g" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -51972,59 +52996,8 @@ + fi + fi + +-for ac_declaration in \ +- ''\ +- '#include ' \ +- 'extern "C" void std::exit (int) throw (); using std::exit;' \ +- 'extern "C" void std::exit (int); using std::exit;' \ +- 'extern "C" void exit (int) throw ();' \ +- 'extern "C" void exit (int);' \ +- 'void exit (int);' +-do +- cat > conftest.$ac_ext < +-$ac_declaration +-int main() { +-exit (42); +-; return 0; } +-EOF +-if { (eval echo configure:51994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +- : +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- continue +-fi +-rm -f conftest* +- cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +- rm -rf conftest* +- break +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +-fi +-rm -f conftest* +-done +-if test -n "$ac_declaration"; then +- echo '#ifdef __cplusplus' >>confdefs.h +- echo $ac_declaration >>confdefs.h +- echo '#endif' >>confdefs.h +-fi +- +- + echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 +-echo "configure:52028: checking how to run the C++ preprocessor" >&5 ++echo "configure:53001: checking how to run the C++ preprocessor" >&5 + if test -z "$CXXCPP"; then + if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -52037,12 +53010,12 @@ + cross_compiling=$ac_cv_prog_cxx_cross + CXXCPP="${CXX-g++} -E" + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:52046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:53019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -52600,7 +53573,7 @@ + php_enable_json=yes + + echo $ac_n "checking whether to enable JavaScript Object Serialization support""... $ac_c" 1>&6 +-echo "configure:52604: checking whether to enable JavaScript Object Serialization support" >&5 ++echo "configure:53577: checking whether to enable JavaScript Object Serialization support" >&5 + # Check whether --enable-json or --disable-json was given. + if test "${enable_json+set}" = set; then + enableval="$enable_json" +@@ -52646,12 +53619,12 @@ + EOF + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +-echo "configure:52650: checking for ANSI C header files" >&5 ++echo "configure:53623: checking for ANSI C header files" >&5 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -52659,7 +53632,7 @@ + #include + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:52663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:53636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -52676,7 +53649,7 @@ + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -52694,7 +53667,7 @@ + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -52715,7 +53688,7 @@ + : + else + cat > conftest.$ac_ext < + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +@@ -52726,7 +53699,7 @@ + exit (0); } + + EOF +-if { (eval echo configure:52730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:53703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else +@@ -53076,7 +54049,7 @@ + php_with_ldap=no + + echo $ac_n "checking for LDAP support""... $ac_c" 1>&6 +-echo "configure:53080: checking for LDAP support" >&5 ++echo "configure:54053: checking for LDAP support" >&5 + # Check whether --with-ldap or --without-ldap was given. + if test "${with_ldap+set}" = set; then + withval="$with_ldap" +@@ -53120,7 +54093,7 @@ + php_with_ldap_sasl=no + + echo $ac_n "checking for LDAP Cyrus SASL support""... $ac_c" 1>&6 +-echo "configure:53124: checking for LDAP Cyrus SASL support" >&5 ++echo "configure:54097: checking for LDAP Cyrus SASL support" >&5 + # Check whether --with-ldap-sasl or --without-ldap-sasl was given. + if test "${with_ldap_sasl+set}" = set; then + withval="$with_ldap_sasl" +@@ -55462,19 +56435,19 @@ + LIBS="$LIBS $LDAP_SHARED_LIBADD" + + echo $ac_n "checking for 3 arg ldap_set_rebind_proc""... $ac_c" 1>&6 +-echo "configure:55466: checking for 3 arg ldap_set_rebind_proc" >&5 ++echo "configure:56439: checking for 3 arg ldap_set_rebind_proc" >&5 + if eval "test \"`echo '$''{'ac_cv_3arg_setrebindproc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + ldap_set_rebind_proc(0,0,0) + ; return 0; } + EOF +-if { (eval echo configure:55478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:56451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_3arg_setrebindproc=yes + else +@@ -55497,12 +56470,12 @@ + for ac_func in ldap_parse_result ldap_parse_reference ldap_start_tls_s + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:55501: checking for $ac_func" >&5 ++echo "configure:56474: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:56502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -55687,7 +56660,7 @@ + done + + echo $ac_n "checking for sasl_version in -lldap""... $ac_c" 1>&6 +-echo "configure:55691: checking for sasl_version in -lldap" >&5 ++echo "configure:56664: checking for sasl_version in -lldap" >&5 + ac_lib_var=`echo ldap'_'sasl_version | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -55695,7 +56668,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lldap $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:56683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -55875,12 +56848,12 @@ + fi + + echo $ac_n "checking for ldap_bind_s""... $ac_c" 1>&6 +-echo "configure:55879: checking for ldap_bind_s" >&5 ++echo "configure:56852: checking for ldap_bind_s" >&5 + if eval "test \"`echo '$''{'ac_cv_func_ldap_bind_s'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:56880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_ldap_bind_s=yes" + else +@@ -55956,7 +56929,7 @@ + php_enable_mbstring=no + + echo $ac_n "checking whether to enable multibyte string support""... $ac_c" 1>&6 +-echo "configure:55960: checking whether to enable multibyte string support" >&5 ++echo "configure:56933: checking whether to enable multibyte string support" >&5 + # Check whether --enable-mbstring or --disable-mbstring was given. + if test "${enable_mbstring+set}" = set; then + enableval="$enable_mbstring" +@@ -56000,7 +56973,7 @@ + php_enable_mbregex=yes + + echo $ac_n "checking whether to enable multibyte regex support""... $ac_c" 1>&6 +-echo "configure:56004: checking whether to enable multibyte regex support" >&5 ++echo "configure:56977: checking whether to enable multibyte regex support" >&5 + # Check whether --enable-mbregex or --disable-mbregex was given. + if test "${enable_mbregex+set}" = set; then + enableval="$enable_mbregex" +@@ -56023,7 +56996,7 @@ + php_enable_mbregex_backtrack=yes + + echo $ac_n "checking whether to check multibyte regex backtrack""... $ac_c" 1>&6 +-echo "configure:56027: checking whether to check multibyte regex backtrack" >&5 ++echo "configure:57000: checking whether to check multibyte regex backtrack" >&5 + # Check whether --enable-mbregex_backtrack or --disable-mbregex_backtrack was given. + if test "${enable_mbregex_backtrack+set}" = set; then + enableval="$enable_mbregex_backtrack" +@@ -56046,7 +57019,7 @@ + php_with_libmbfl=no + + echo $ac_n "checking for external libmbfl""... $ac_c" 1>&6 +-echo "configure:56050: checking for external libmbfl" >&5 ++echo "configure:57023: checking for external libmbfl" >&5 + # Check whether --with-libmbfl or --without-libmbfl was given. + if test "${with_libmbfl+set}" = set; then + withval="$with_libmbfl" +@@ -56069,7 +57042,7 @@ + php_with_onig=no + + echo $ac_n "checking for external oniguruma""... $ac_c" 1>&6 +-echo "configure:56073: checking for external oniguruma" >&5 ++echo "configure:57046: checking for external oniguruma" >&5 + # Check whether --with-onig or --without-onig was given. + if test "${with_onig+set}" = set; then + withval="$with_onig" +@@ -56110,7 +57083,7 @@ + fi + + echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 +-echo "configure:56114: checking for variable length prototypes and stdarg.h" >&5 ++echo "configure:57087: checking for variable length prototypes and stdarg.h" >&5 + if eval "test \"`echo '$''{'php_cv_mbstring_stdarg'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -56128,7 +57101,7 @@ + + else + cat > conftest.$ac_ext < +@@ -56143,7 +57116,7 @@ + int main() { return foo(10, "", 3.14); } + + EOF +-if { (eval echo configure:56147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:57120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + php_cv_mbstring_stdarg=yes + else +@@ -56164,17 +57137,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:56168: checking for $ac_hdr" >&5 ++echo "configure:57141: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:56178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:57151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -56201,7 +57174,7 @@ + done + + echo $ac_n "checking size of int""... $ac_c" 1>&6 +-echo "configure:56205: checking size of int" >&5 ++echo "configure:57178: checking size of int" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -56209,18 +57182,19 @@ + ac_cv_sizeof_int=4 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(int)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:56224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:57198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_int=`cat conftestval` + else +@@ -56240,7 +57214,7 @@ + + + echo $ac_n "checking size of short""... $ac_c" 1>&6 +-echo "configure:56244: checking size of short" >&5 ++echo "configure:57218: checking size of short" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -56248,18 +57222,19 @@ + ac_cv_sizeof_short=2 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(short)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:56263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:57238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_short=`cat conftestval` + else +@@ -56279,7 +57254,7 @@ + + + echo $ac_n "checking size of long""... $ac_c" 1>&6 +-echo "configure:56283: checking size of long" >&5 ++echo "configure:57258: checking size of long" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -56287,18 +57262,19 @@ + ac_cv_sizeof_long=4 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:56302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:57278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_long=`cat conftestval` + else +@@ -56318,12 +57294,12 @@ + + + echo $ac_n "checking for working const""... $ac_c" 1>&6 +-echo "configure:56322: checking for working const" >&5 ++echo "configure:57298: checking for working const" >&5 + if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:57352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes + else +@@ -56393,12 +57369,12 @@ + fi + + echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +-echo "configure:56397: checking whether time.h and sys/time.h may both be included" >&5 ++echo "configure:57373: checking whether time.h and sys/time.h may both be included" >&5 + if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -56407,7 +57383,7 @@ + struct tm *tp; + ; return 0; } + EOF +-if { (eval echo configure:56411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:57387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes + else +@@ -56430,19 +57406,19 @@ + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! + echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 +-echo "configure:56434: checking for working alloca.h" >&5 ++echo "configure:57410: checking for working alloca.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + char *p = alloca(2 * sizeof(int)); + ; return 0; } + EOF +-if { (eval echo configure:56446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:57422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_header_alloca_h=yes + else +@@ -56463,12 +57439,12 @@ + fi + + echo $ac_n "checking for alloca""... $ac_c" 1>&6 +-echo "configure:56467: checking for alloca" >&5 ++echo "configure:57443: checking for alloca" >&5 + if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:57476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_alloca_works=yes + else +@@ -56528,12 +57504,12 @@ + + + echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +-echo "configure:56532: checking whether alloca needs Cray hooks" >&5 ++echo "configure:57508: checking whether alloca needs Cray hooks" >&5 + if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +-echo "configure:56562: checking for $ac_func" >&5 ++echo "configure:57538: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:57566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -56613,7 +57589,7 @@ + fi + + echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +-echo "configure:56617: checking stack direction for C alloca" >&5 ++echo "configure:57593: checking stack direction for C alloca" >&5 + if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -56621,7 +57597,7 @@ + ac_cv_c_stack_direction=0 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:57620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_c_stack_direction=1 + else +@@ -56662,7 +57638,7 @@ + fi + + echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 +-echo "configure:56666: checking for 8-bit clean memcmp" >&5 ++echo "configure:57642: checking for 8-bit clean memcmp" >&5 + if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -56670,7 +57646,7 @@ + ac_cv_func_memcmp_clean=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:57660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_func_memcmp_clean=yes + else +@@ -56699,17 +57675,17 @@ + + ac_safe=`echo "stdarg.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for stdarg.h""... $ac_c" 1>&6 +-echo "configure:56703: checking for stdarg.h" >&5 ++echo "configure:57679: checking for stdarg.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:56713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:57689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -56939,7 +57915,7 @@ + done + + echo $ac_n "checking for onig_init in -lonig""... $ac_c" 1>&6 +-echo "configure:56943: checking for onig_init in -lonig" >&5 ++echo "configure:57919: checking for onig_init in -lonig" >&5 + ac_lib_var=`echo onig'_'onig_init | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -56947,7 +57923,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lonig $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:57938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -57184,9 +58160,9 @@ + done + + echo $ac_n "checking if oniguruma has an invalid entry for KOI8 encoding""... $ac_c" 1>&6 +-echo "configure:57188: checking if oniguruma has an invalid entry for KOI8 encoding" >&5 ++echo "configure:58164: checking if oniguruma has an invalid entry for KOI8 encoding" >&5 + cat > conftest.$ac_ext < +@@ -57197,7 +58173,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:57201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:58177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + echo "$ac_t""no" 1>&6 +@@ -57495,7 +58471,7 @@ + done + + echo $ac_n "checking for mbfl_buffer_converter_new in -lmbfl""... $ac_c" 1>&6 +-echo "configure:57499: checking for mbfl_buffer_converter_new in -lmbfl" >&5 ++echo "configure:58475: checking for mbfl_buffer_converter_new in -lmbfl" >&5 + ac_lib_var=`echo mbfl'_'mbfl_buffer_converter_new | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -57503,7 +58479,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lmbfl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:58494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -58151,7 +59127,7 @@ + php_with_mcrypt=no + + echo $ac_n "checking for mcrypt support""... $ac_c" 1>&6 +-echo "configure:58155: checking for mcrypt support" >&5 ++echo "configure:59131: checking for mcrypt support" >&5 + # Check whether --with-mcrypt or --without-mcrypt was given. + if test "${with_mcrypt+set}" = set; then + withval="$with_mcrypt" +@@ -58204,9 +59180,9 @@ + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$MCRYPT_DIR/include + echo $ac_n "checking for libmcrypt version""... $ac_c" 1>&6 +-echo "configure:58208: checking for libmcrypt version" >&5 ++echo "configure:59184: checking for libmcrypt version" >&5 + cat > conftest.$ac_ext < +@@ -58330,7 +59306,7 @@ + done + + echo $ac_n "checking for mcrypt_module_open in -lmcrypt""... $ac_c" 1>&6 +-echo "configure:58334: checking for mcrypt_module_open in -lmcrypt" >&5 ++echo "configure:59310: checking for mcrypt_module_open in -lmcrypt" >&5 + ac_lib_var=`echo mcrypt'_'mcrypt_module_open | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -58338,7 +59314,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lmcrypt $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:59329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -58502,7 +59478,7 @@ + done + + echo $ac_n "checking for mcrypt_module_open in -lmcrypt""... $ac_c" 1>&6 +-echo "configure:58506: checking for mcrypt_module_open in -lmcrypt" >&5 ++echo "configure:59482: checking for mcrypt_module_open in -lmcrypt" >&5 + ac_lib_var=`echo mcrypt'_'mcrypt_module_open | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -58510,7 +59486,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lmcrypt $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:59501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -58994,7 +59970,7 @@ + php_with_mssql=no + + echo $ac_n "checking for MSSQL support via FreeTDS""... $ac_c" 1>&6 +-echo "configure:58998: checking for MSSQL support via FreeTDS" >&5 ++echo "configure:59974: checking for MSSQL support via FreeTDS" >&5 + # Check whether --with-mssql or --without-mssql was given. + if test "${with_mssql+set}" = set; then + withval="$with_mssql" +@@ -59492,7 +60468,7 @@ + fi + + echo $ac_n "checking for dnet_addr in -ldnet_stub""... $ac_c" 1>&6 +-echo "configure:59496: checking for dnet_addr in -ldnet_stub" >&5 ++echo "configure:60472: checking for dnet_addr in -ldnet_stub" >&5 + ac_lib_var=`echo dnet_stub'_'dnet_addr | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -59500,7 +60476,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldnet_stub $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:60491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -59655,7 +60631,7 @@ + php_with_mysql=no + + echo $ac_n "checking for MySQL support""... $ac_c" 1>&6 +-echo "configure:59659: checking for MySQL support" >&5 ++echo "configure:60635: checking for MySQL support" >&5 + # Check whether --with-mysql or --without-mysql was given. + if test "${with_mysql+set}" = set; then + withval="$with_mysql" +@@ -59699,7 +60675,7 @@ + php_with_mysql_sock=no + + echo $ac_n "checking for specified location of the MySQL UNIX socket""... $ac_c" 1>&6 +-echo "configure:59703: checking for specified location of the MySQL UNIX socket" >&5 ++echo "configure:60679: checking for specified location of the MySQL UNIX socket" >&5 + # Check whether --with-mysql-sock or --without-mysql-sock was given. + if test "${with_mysql_sock+set}" = set; then + withval="$with_mysql_sock" +@@ -59723,7 +60699,7 @@ + php_with_zlib_dir=no + + echo $ac_n "checking for the location of libz""... $ac_c" 1>&6 +-echo "configure:59727: checking for the location of libz" >&5 ++echo "configure:60703: checking for the location of libz" >&5 + # Check whether --with-zlib-dir or --without-zlib-dir was given. + if test "${with_zlib_dir+set}" = set; then + withval="$with_zlib_dir" +@@ -59897,7 +60873,7 @@ + done + + echo $ac_n "checking for mysql_close in -l$MYSQL_LIBNAME""... $ac_c" 1>&6 +-echo "configure:59901: checking for mysql_close in -l$MYSQL_LIBNAME" >&5 ++echo "configure:60877: checking for mysql_close in -l$MYSQL_LIBNAME" >&5 + ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_close | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -59905,7 +60881,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$MYSQL_LIBNAME $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:60896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -60139,7 +61115,7 @@ + done + + echo $ac_n "checking for mysql_error in -l$MYSQL_LIBNAME""... $ac_c" 1>&6 +-echo "configure:60143: checking for mysql_error in -l$MYSQL_LIBNAME" >&5 ++echo "configure:61119: checking for mysql_error in -l$MYSQL_LIBNAME" >&5 + ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_error | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -60147,7 +61123,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$MYSQL_LIBNAME $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:61138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -60313,7 +61289,7 @@ + done + + echo $ac_n "checking for mysql_errno in -l$MYSQL_LIBNAME""... $ac_c" 1>&6 +-echo "configure:60317: checking for mysql_errno in -l$MYSQL_LIBNAME" >&5 ++echo "configure:61293: checking for mysql_errno in -l$MYSQL_LIBNAME" >&5 + ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_errno | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -60321,7 +61297,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$MYSQL_LIBNAME $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:61312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -60526,7 +61502,7 @@ + + if test "$PHP_MYSQL" != "no"; then + echo $ac_n "checking for MySQL UNIX socket location""... $ac_c" 1>&6 +-echo "configure:60530: checking for MySQL UNIX socket location" >&5 ++echo "configure:61506: checking for MySQL UNIX socket location" >&5 + if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then + MYSQL_SOCK=$PHP_MYSQL_SOCK + cat >> confdefs.h <&6 +-echo "configure:60903: checking for MySQLi support" >&5 ++echo "configure:61879: checking for MySQLi support" >&5 + # Check whether --with-mysqli or --without-mysqli was given. + if test "${with_mysqli+set}" = set; then + withval="$with_mysqli" +@@ -60943,7 +61919,7 @@ + php_enable_embedded_mysqli=no + + echo $ac_n "checking whether to enable embedded MySQLi support""... $ac_c" 1>&6 +-echo "configure:60947: checking whether to enable embedded MySQLi support" >&5 ++echo "configure:61923: checking whether to enable embedded MySQLi support" >&5 + # Check whether --enable-embedded_mysqli or --disable-embedded_mysqli was given. + if test "${enable_embedded_mysqli+set}" = set; then + enableval="$enable_embedded_mysqli" +@@ -61094,7 +62070,7 @@ + done + + echo $ac_n "checking for mysql_set_server_option in -l$MYSQL_LIB_NAME""... $ac_c" 1>&6 +-echo "configure:61098: checking for mysql_set_server_option in -l$MYSQL_LIB_NAME" >&5 ++echo "configure:62074: checking for mysql_set_server_option in -l$MYSQL_LIB_NAME" >&5 + ac_lib_var=`echo $MYSQL_LIB_NAME'_'mysql_set_server_option | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -61102,7 +62078,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$MYSQL_LIB_NAME $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:62093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -61361,7 +62337,7 @@ + done + + echo $ac_n "checking for mysql_set_character_set in -l$MYSQL_LIB_NAME""... $ac_c" 1>&6 +-echo "configure:61365: checking for mysql_set_character_set in -l$MYSQL_LIB_NAME" >&5 ++echo "configure:62341: checking for mysql_set_character_set in -l$MYSQL_LIB_NAME" >&5 + ac_lib_var=`echo $MYSQL_LIB_NAME'_'mysql_set_character_set | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -61369,7 +62345,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$MYSQL_LIB_NAME $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:62360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -61524,7 +62500,7 @@ + done + + echo $ac_n "checking for mysql_stmt_next_result in -l$MYSQL_LIB_NAME""... $ac_c" 1>&6 +-echo "configure:61528: checking for mysql_stmt_next_result in -l$MYSQL_LIB_NAME" >&5 ++echo "configure:62504: checking for mysql_stmt_next_result in -l$MYSQL_LIB_NAME" >&5 + ac_lib_var=`echo $MYSQL_LIB_NAME'_'mysql_stmt_next_result | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -61532,7 +62508,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$MYSQL_LIB_NAME $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:62523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -61947,7 +62923,7 @@ + php_with_oci8=no + + echo $ac_n "checking for Oracle (OCI8) support""... $ac_c" 1>&6 +-echo "configure:61951: checking for Oracle (OCI8) support" >&5 ++echo "configure:62927: checking for Oracle (OCI8) support" >&5 + # Check whether --with-oci8 or --without-oci8 was given. + if test "${with_oci8+set}" = set; then + withval="$with_oci8" +@@ -61995,7 +62971,7 @@ + + + echo $ac_n "checking PHP version""... $ac_c" 1>&6 +-echo "configure:61999: checking PHP version" >&5 ++echo "configure:62975: checking PHP version" >&5 + + tmp_version=$PHP_VERSION + if test -z "$tmp_version"; then +@@ -62027,7 +63003,7 @@ + + + echo $ac_n "checking size of long int""... $ac_c" 1>&6 +-echo "configure:62031: checking size of long int" >&5 ++echo "configure:63007: checking size of long int" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -62035,18 +63011,19 @@ + ac_cv_sizeof_long_int=4 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long int)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:62050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:63027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_long_int=`cat conftestval` + else +@@ -62066,7 +63043,7 @@ + + + echo $ac_n "checking checking if we're on a 64-bit platform""... $ac_c" 1>&6 +-echo "configure:62070: checking checking if we're on a 64-bit platform" >&5 ++echo "configure:63047: checking checking if we're on a 64-bit platform" >&5 + if test "$ac_cv_sizeof_long_int" = "4"; then + echo "$ac_t""no" 1>&6 + PHP_OCI8_OH_LIBDIR=lib32 +@@ -62110,7 +63087,7 @@ + if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then + + echo $ac_n "checking Oracle ORACLE_HOME install directory""... $ac_c" 1>&6 +-echo "configure:62114: checking Oracle ORACLE_HOME install directory" >&5 ++echo "configure:63091: checking Oracle ORACLE_HOME install directory" >&5 + + if test "$PHP_OCI8" = "yes"; then + OCI8_DIR=$ORACLE_HOME +@@ -62121,7 +63098,7 @@ + + + echo $ac_n "checking ORACLE_HOME library validity""... $ac_c" 1>&6 +-echo "configure:62125: checking ORACLE_HOME library validity" >&5 ++echo "configure:63102: checking ORACLE_HOME library validity" >&5 + if test ! -d "$OCI8_DIR"; then + { echo "configure: error: ${OCI8_DIR} is not a directory" 1>&2; exit 1; } + fi +@@ -62462,7 +63439,7 @@ + + + echo $ac_n "checking Oracle version""... $ac_c" 1>&6 +-echo "configure:62466: checking Oracle version" >&5 ++echo "configure:63443: checking Oracle version" >&5 + if test -s "$OCI8_DIR/orainst/unix.rgs"; then + OCI8_ORACLE_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | $PHP_OCI8_SED 's/ */:/g' | cut -d: -f 6 | cut -c 2-4` + test -z "$OCI8_ORACLE_VERSION" && OCI8_ORACLE_VERSION=7.3 +@@ -62592,7 +63569,7 @@ + done + + echo $ac_n "checking for OCIEnvNlsCreate in -lclntsh""... $ac_c" 1>&6 +-echo "configure:62596: checking for OCIEnvNlsCreate in -lclntsh" >&5 ++echo "configure:63573: checking for OCIEnvNlsCreate in -lclntsh" >&5 + ac_lib_var=`echo clntsh'_'OCIEnvNlsCreate | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -62600,7 +63577,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lclntsh $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:63592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -63048,7 +64025,7 @@ + else + + echo $ac_n "checking Oracle Instant Client directory""... $ac_c" 1>&6 +-echo "configure:63052: checking Oracle Instant Client directory" >&5 ++echo "configure:64029: checking Oracle Instant Client directory" >&5 + + if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then + PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | tail -1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'` +@@ -63061,7 +64038,7 @@ + OCI8_DIR=$PHP_OCI8_INSTANT_CLIENT + + echo $ac_n "checking Oracle Instant Client SDK header directory""... $ac_c" 1>&6 +-echo "configure:63065: checking Oracle Instant Client SDK header directory" >&5 ++echo "configure:64042: checking Oracle Instant Client SDK header directory" >&5 + + OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client\('${PHP_OCI8_IC_LIBDIR_SUFFIX}'\)*/lib/*$!/usr/include/oracle/\1/client\2!'` + +@@ -63270,7 +64247,7 @@ + + + echo $ac_n "checking Oracle Instant Client version""... $ac_c" 1>&6 +-echo "configure:63274: checking Oracle Instant Client version" >&5 ++echo "configure:64251: checking Oracle Instant Client version" >&5 + if test -f $PHP_OCI8_INSTANT_CLIENT/libnnz11.$SHLIB_SUFFIX_NAME; then + if test -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then + if test ! -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME; then +@@ -63749,7 +64726,7 @@ + + if test "$PHP_ADABAS" != "no"; then + echo $ac_n "checking for Adabas support""... $ac_c" 1>&6 +-echo "configure:63753: checking for Adabas support" >&5 ++echo "configure:64730: checking for Adabas support" >&5 + if test "$PHP_ADABAS" = "yes"; then + PHP_ADABAS=/usr/local + fi +@@ -63952,7 +64929,7 @@ + + if test "$PHP_SAPDB" != "no"; then + echo $ac_n "checking for SAP DB support""... $ac_c" 1>&6 +-echo "configure:63956: checking for SAP DB support" >&5 ++echo "configure:64933: checking for SAP DB support" >&5 + if test "$PHP_SAPDB" = "yes"; then + PHP_SAPDB=/usr/local + fi +@@ -64085,7 +65062,7 @@ + + if test "$PHP_SOLID" != "no"; then + echo $ac_n "checking for Solid support""... $ac_c" 1>&6 +-echo "configure:64089: checking for Solid support" >&5 ++echo "configure:65066: checking for Solid support" >&5 + if test "$PHP_SOLID" = "yes"; then + PHP_SOLID=/usr/local/solid + fi +@@ -64112,7 +65089,7 @@ + echo "$ac_t""$ext_output" 1>&6 + + echo $ac_n "checking Solid library file""... $ac_c" 1>&6 +-echo "configure:64116: checking Solid library file" >&5 ++echo "configure:65093: checking Solid library file" >&5 + ac_solid_uname_r=`uname -r 2>/dev/null` + ac_solid_uname_s=`uname -s 2>/dev/null` + case $ac_solid_uname_s in +@@ -64233,7 +65210,7 @@ + + if test "$PHP_IBM_DB2" != "no"; then + echo $ac_n "checking for IBM DB2 support""... $ac_c" 1>&6 +-echo "configure:64237: checking for IBM DB2 support" >&5 ++echo "configure:65214: checking for IBM DB2 support" >&5 + if test "$PHP_IBM_DB2" = "yes"; then + ODBC_INCDIR=/home/db2inst1/sqllib/include + ODBC_LIBDIR=/home/db2inst1/sqllib/lib +@@ -64264,7 +65241,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:65256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -64356,7 +65333,7 @@ + + if test "$PHP_ODBCROUTER" != "no"; then + echo $ac_n "checking for ODBCRouter.com support""... $ac_c" 1>&6 +-echo "configure:64360: checking for ODBCRouter.com support" >&5 ++echo "configure:65337: checking for ODBCRouter.com support" >&5 + if test "$PHP_ODBCROUTER" = "yes"; then + PHP_ODBCROUTER=/usr + fi +@@ -64420,7 +65397,7 @@ + + if test "$PHP_EMPRESS" != "no"; then + echo $ac_n "checking for Empress support""... $ac_c" 1>&6 +-echo "configure:64424: checking for Empress support" >&5 ++echo "configure:65401: checking for Empress support" >&5 + if test "$PHP_EMPRESS" = "yes"; then + ODBC_INCDIR=$EMPRESSPATH/include/odbc + ODBC_LIBDIR=$EMPRESSPATH/shlib +@@ -64438,7 +65415,7 @@ + echo "$ac_t""$ext_output" 1>&6 + + echo $ac_n "checking Empress library file""... $ac_c" 1>&6 +-echo "configure:64442: checking Empress library file" >&5 ++echo "configure:65419: checking Empress library file" >&5 + ODBC_LIBS=`echo $ODBC_LIBDIR/libempodbccl.so | cut -d' ' -f1` + if test ! -f $ODBC_LIBS; then + ODBC_LIBS=`echo $ODBC_LIBDIR/libempodbccl.so | cut -d' ' -f1` +@@ -64494,7 +65471,7 @@ + + if test "$PHP_EMPRESS_BCS" != "no"; then + echo $ac_n "checking for Empress local access support""... $ac_c" 1>&6 +-echo "configure:64498: checking for Empress local access support" >&5 ++echo "configure:65475: checking for Empress local access support" >&5 + if test "$PHP_EMPRESS_BCS" = "yes"; then + ODBC_INCDIR=$EMPRESSPATH/include/odbc + ODBC_LIBDIR=$EMPRESSPATH/shlib +@@ -64528,7 +65505,7 @@ + echo "$ac_t""$ext_output" 1>&6 + + echo $ac_n "checking Empress local access library file""... $ac_c" 1>&6 +-echo "configure:64532: checking Empress local access library file" >&5 ++echo "configure:65509: checking Empress local access library file" >&5 + ODBCBCS_LIBS=`echo $ODBC_LIBDIR/libempodbcbcs.a | cut -d' ' -f1` + if test ! -f $ODBCBCS_LIBS; then + ODBCBCS_LIBS=`echo $ODBC_LIBDIR/libempodbcbcs.a | cut -d' ' -f1` +@@ -64584,7 +65561,7 @@ + + if test "$PHP_BIRDSTEP" != "no"; then + echo $ac_n "checking for Birdstep support""... $ac_c" 1>&6 +-echo "configure:64588: checking for Birdstep support" >&5 ++echo "configure:65565: checking for Birdstep support" >&5 + if test "$PHP_BIRDSTEP" = "yes"; then + ODBC_INCDIR=/usr/local/birdstep/include + ODBC_LIBDIR=/usr/local/birdstep/lib +@@ -64696,7 +65673,7 @@ + + if test "$PHP_CUSTOM_ODBC" != "no"; then + echo $ac_n "checking for a custom ODBC support""... $ac_c" 1>&6 +-echo "configure:64700: checking for a custom ODBC support" >&5 ++echo "configure:65677: checking for a custom ODBC support" >&5 + if test "$PHP_CUSTOM_ODBC" = "yes"; then + PHP_CUSTOM_ODBC=/usr/local + fi +@@ -64760,7 +65737,7 @@ + + if test "$PHP_IODBC" != "no"; then + echo $ac_n "checking for iODBC support""... $ac_c" 1>&6 +-echo "configure:64764: checking for iODBC support" >&5 ++echo "configure:65741: checking for iODBC support" >&5 + if test "$PHP_IODBC" = "yes"; then + PHP_IODBC=/usr/local + fi +@@ -64906,7 +65883,7 @@ + + if test "$PHP_ESOOB" != "no"; then + echo $ac_n "checking for Easysoft ODBC-ODBC Bridge support""... $ac_c" 1>&6 +-echo "configure:64910: checking for Easysoft ODBC-ODBC Bridge support" >&5 ++echo "configure:65887: checking for Easysoft ODBC-ODBC Bridge support" >&5 + if test "$PHP_ESOOB" = "yes"; then + PHP_ESOOB=/usr/local/easysoft/oob/client + fi +@@ -64970,7 +65947,7 @@ + + if test "$PHP_UNIXODBC" != "no"; then + echo $ac_n "checking for unixODBC support""... $ac_c" 1>&6 +-echo "configure:64974: checking for unixODBC support" >&5 ++echo "configure:65951: checking for unixODBC support" >&5 + if test "$PHP_UNIXODBC" = "yes"; then + PHP_UNIXODBC=/usr/local + fi +@@ -65039,7 +66016,7 @@ + + if test "$PHP_DBMAKER" != "no"; then + echo $ac_n "checking for DBMaker support""... $ac_c" 1>&6 +-echo "configure:65043: checking for DBMaker support" >&5 ++echo "configure:66020: checking for DBMaker support" >&5 + if test "$PHP_DBMAKER" = "yes"; then + # find dbmaker's home directory + DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | $AWK -F: '{print $6}'` +@@ -65601,7 +66578,7 @@ + php_enable_pcntl=no + + echo $ac_n "checking whether to enable pcntl support""... $ac_c" 1>&6 +-echo "configure:65605: checking whether to enable pcntl support" >&5 ++echo "configure:66582: checking whether to enable pcntl support" >&5 + # Check whether --enable-pcntl or --disable-pcntl was given. + if test "${enable_pcntl+set}" = set; then + enableval="$enable_pcntl" +@@ -65645,12 +66622,12 @@ + for ac_func in fork + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:65649: checking for $ac_func" >&5 ++echo "configure:66626: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:66654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -65704,12 +66681,12 @@ + for ac_func in waitpid + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:65708: checking for $ac_func" >&5 ++echo "configure:66685: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:66713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -65763,12 +66740,12 @@ + for ac_func in sigaction + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:65767: checking for $ac_func" >&5 ++echo "configure:66744: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:66772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -65822,12 +66799,12 @@ + for ac_func in getpriority setpriority wait3 sigprocmask sigwaitinfo sigtimedwait + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:65826: checking for $ac_func" >&5 ++echo "configure:66803: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:66831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -66175,7 +67152,7 @@ + php_enable_pdo=yes + + echo $ac_n "checking whether to enable PDO support""... $ac_c" 1>&6 +-echo "configure:66179: checking whether to enable PDO support" >&5 ++echo "configure:67156: checking whether to enable PDO support" >&5 + # Check whether --enable-pdo or --disable-pdo was given. + if test "${enable_pdo+set}" = set; then + enableval="$enable_pdo" +@@ -66609,7 +67586,7 @@ + php_with_pdo_dblib=no + + echo $ac_n "checking for PDO_DBLIB support via FreeTDS""... $ac_c" 1>&6 +-echo "configure:66613: checking for PDO_DBLIB support via FreeTDS" >&5 ++echo "configure:67590: checking for PDO_DBLIB support via FreeTDS" >&5 + # Check whether --with-pdo-dblib or --without-pdo-dblib was given. + if test "${with_pdo_dblib+set}" = set; then + withval="$with_pdo_dblib" +@@ -66826,13 +67803,13 @@ + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:66830: checking for PDO includes" >&5 ++echo "configure:67807: checking for PDO includes" >&5 + if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:66836: checking for PDO includes" >&5 ++echo "configure:67813: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then +@@ -67146,7 +68123,7 @@ + fi + + echo $ac_n "checking for dnet_addr in -ldnet_stub""... $ac_c" 1>&6 +-echo "configure:67150: checking for dnet_addr in -ldnet_stub" >&5 ++echo "configure:68127: checking for dnet_addr in -ldnet_stub" >&5 + ac_lib_var=`echo dnet_stub'_'dnet_addr | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -67154,7 +68131,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldnet_stub $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:68146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -67326,7 +68303,7 @@ + php_with_pdo_firebird=no + + echo $ac_n "checking for Firebird support for PDO""... $ac_c" 1>&6 +-echo "configure:67330: checking for Firebird support for PDO" >&5 ++echo "configure:68307: checking for Firebird support for PDO" >&5 + # Check whether --with-pdo-firebird or --without-pdo-firebird was given. + if test "${with_pdo_firebird+set}" = set; then + withval="$with_pdo_firebird" +@@ -67480,7 +68457,7 @@ + done + + echo $ac_n "checking for isc_detach_database in -lfbclient""... $ac_c" 1>&6 +-echo "configure:67484: checking for isc_detach_database in -lfbclient" >&5 ++echo "configure:68461: checking for isc_detach_database in -lfbclient" >&5 + ac_lib_var=`echo fbclient'_'isc_detach_database | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -67488,7 +68465,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lfbclient $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:68480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -67626,7 +68603,7 @@ + done + + echo $ac_n "checking for isc_detach_database in -lgds""... $ac_c" 1>&6 +-echo "configure:67630: checking for isc_detach_database in -lgds" >&5 ++echo "configure:68607: checking for isc_detach_database in -lgds" >&5 + ac_lib_var=`echo gds'_'isc_detach_database | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -67634,7 +68611,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgds $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:68626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -67772,7 +68749,7 @@ + done + + echo $ac_n "checking for isc_detach_database in -lib_util""... $ac_c" 1>&6 +-echo "configure:67776: checking for isc_detach_database in -lib_util" >&5 ++echo "configure:68753: checking for isc_detach_database in -lib_util" >&5 + ac_lib_var=`echo ib_util'_'isc_detach_database | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -67780,7 +68757,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lib_util $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:68772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -67836,13 +68813,13 @@ + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:67840: checking for PDO includes" >&5 ++echo "configure:68817: checking for PDO includes" >&5 + if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:67846: checking for PDO includes" >&5 ++echo "configure:68823: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then +@@ -68314,7 +69291,7 @@ + php_with_pdo_mysql=no + + echo $ac_n "checking for MySQL support for PDO""... $ac_c" 1>&6 +-echo "configure:68318: checking for MySQL support for PDO" >&5 ++echo "configure:69295: checking for MySQL support for PDO" >&5 + # Check whether --with-pdo-mysql or --without-pdo-mysql was given. + if test "${with_pdo_mysql+set}" = set; then + withval="$with_pdo_mysql" +@@ -68359,7 +69336,7 @@ + php_with_zlib_dir=no + + echo $ac_n "checking for the location of libz""... $ac_c" 1>&6 +-echo "configure:68363: checking for the location of libz" >&5 ++echo "configure:69340: checking for the location of libz" >&5 + # Check whether --with-zlib-dir or --without-zlib-dir was given. + if test "${with_zlib_dir+set}" = set; then + withval="$with_zlib_dir" +@@ -68423,14 +69400,14 @@ + + + echo $ac_n "checking for mysql_config""... $ac_c" 1>&6 +-echo "configure:68427: checking for mysql_config" >&5 ++echo "configure:69404: checking for mysql_config" >&5 + if test -n "$PDO_MYSQL_CONFIG"; then + echo "$ac_t""$PDO_MYSQL_CONFIG" 1>&6 + if test "x$SED" = "x"; then + # Extract the first word of "sed", so it can be a program name with args. + set dummy sed; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:68434: checking for $ac_word" >&5 ++echo "configure:69411: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -68474,7 +69451,7 @@ + elif test -n "$PDO_MYSQL_DIR"; then + echo "$ac_t""not found" 1>&6 + echo $ac_n "checking for mysql install under $PDO_MYSQL_DIR""... $ac_c" 1>&6 +-echo "configure:68478: checking for mysql install under $PDO_MYSQL_DIR" >&5 ++echo "configure:69455: checking for mysql install under $PDO_MYSQL_DIR" >&5 + if test -r $PDO_MYSQL_DIR/include/mysql; then + PDO_MYSQL_INC_DIR=$PDO_MYSQL_DIR/include/mysql + else +@@ -68628,7 +69605,7 @@ + done + + echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6 +-echo "configure:68632: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5 ++echo "configure:69609: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5 + ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -68636,7 +69613,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$PDO_MYSQL_LIBNAME $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:69628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -69000,7 +69977,7 @@ + done + + echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6 +-echo "configure:69004: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5 ++echo "configure:69981: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5 + ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -69008,7 +69985,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$PDO_MYSQL_LIBNAME $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:70000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -69174,7 +70151,7 @@ + done + + echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6 +-echo "configure:69178: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5 ++echo "configure:70155: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5 + ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -69182,7 +70159,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$PDO_MYSQL_LIBNAME $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:70174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -69367,12 +70344,12 @@ + for ac_func in mysql_commit mysql_stmt_prepare mysql_next_result mysql_sqlstate + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:69371: checking for $ac_func" >&5 ++echo "configure:70348: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:70376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -69425,13 +70402,13 @@ + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:69429: checking for PDO includes" >&5 ++echo "configure:70406: checking for PDO includes" >&5 + if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:69435: checking for PDO includes" >&5 ++echo "configure:70412: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then +@@ -69816,7 +70793,7 @@ + php_with_pdo_oci=no + + echo $ac_n "checking Oracle OCI support for PDO""... $ac_c" 1>&6 +-echo "configure:69820: checking Oracle OCI support for PDO" >&5 ++echo "configure:70797: checking Oracle OCI support for PDO" >&5 + # Check whether --with-pdo-oci or --without-pdo-oci was given. + if test "${with_pdo_oci+set}" = set; then + withval="$with_pdo_oci" +@@ -69863,7 +70840,7 @@ + fi + + echo $ac_n "checking Oracle Install-Dir""... $ac_c" 1>&6 +-echo "configure:69867: checking Oracle Install-Dir" >&5 ++echo "configure:70844: checking Oracle Install-Dir" >&5 + if test "$PHP_PDO_OCI" = "yes" || test -z "$PHP_PDO_OCI"; then + PDO_OCI_DIR=$ORACLE_HOME + else +@@ -69872,7 +70849,7 @@ + echo "$ac_t""$PHP_PDO_OCI" 1>&6 + + echo $ac_n "checking if that is sane""... $ac_c" 1>&6 +-echo "configure:69876: checking if that is sane" >&5 ++echo "configure:70853: checking if that is sane" >&5 + if test -z "$PDO_OCI_DIR"; then + { echo "configure: error: + You need to tell me where to find your Oracle Instant Client SDK, or set ORACLE_HOME. +@@ -69885,7 +70862,7 @@ + PDO_OCI_IC_PREFIX="`echo $PDO_OCI_DIR | cut -d, -f2`" + PDO_OCI_IC_VERS="`echo $PDO_OCI_DIR | cut -d, -f3`" + echo $ac_n "checking for oci.h""... $ac_c" 1>&6 +-echo "configure:69889: checking for oci.h" >&5 ++echo "configure:70866: checking for oci.h" >&5 + if test -f $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client/oci.h ; then + + if test "$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client" != "/usr/include"; then +@@ -70034,7 +71011,7 @@ + else + + echo $ac_n "checking size of long int""... $ac_c" 1>&6 +-echo "configure:70038: checking size of long int" >&5 ++echo "configure:71015: checking size of long int" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -70042,18 +71019,19 @@ + ac_cv_sizeof_long_int=4 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long int)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:70057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:71035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_long_int=`cat conftestval` + else +@@ -70073,7 +71051,7 @@ + + + echo $ac_n "checking if we're on a 64-bit platform""... $ac_c" 1>&6 +-echo "configure:70077: checking if we're on a 64-bit platform" >&5 ++echo "configure:71055: checking if we're on a 64-bit platform" >&5 + if test "$ac_cv_sizeof_long_int" = "4" ; then + echo "$ac_t""no" 1>&6 + TMP_PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib32" +@@ -70083,7 +71061,7 @@ + fi + + echo $ac_n "checking OCI8 libraries dir""... $ac_c" 1>&6 +-echo "configure:70087: checking OCI8 libraries dir" >&5 ++echo "configure:71065: checking OCI8 libraries dir" >&5 + if test -d "$PDO_OCI_DIR/lib" && test ! -d "$PDO_OCI_DIR/lib32"; then + PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib" + elif test ! -d "$PDO_OCI_DIR/lib" && test -d "$PDO_OCI_DIR/lib32"; then +@@ -70450,7 +71428,7 @@ + fi + + echo $ac_n "checking Oracle version""... $ac_c" 1>&6 +-echo "configure:70454: checking Oracle version" >&5 ++echo "configure:71432: checking Oracle version" >&5 + for OCI_VER in $SUPPORTED_LIB_VERS; do + if test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.$OCI_VER; then + PDO_OCI_VERSION="$OCI_VER" +@@ -70632,7 +71610,7 @@ + done + + echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6 +-echo "configure:70636: checking for OCIEnvCreate in -lclntsh" >&5 ++echo "configure:71614: checking for OCIEnvCreate in -lclntsh" >&5 + ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -70640,7 +71618,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lclntsh $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:71633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -70785,7 +71763,7 @@ + done + + echo $ac_n "checking for OCIEnvNlsCreate in -lclntsh""... $ac_c" 1>&6 +-echo "configure:70789: checking for OCIEnvNlsCreate in -lclntsh" >&5 ++echo "configure:71767: checking for OCIEnvNlsCreate in -lclntsh" >&5 + ac_lib_var=`echo clntsh'_'OCIEnvNlsCreate | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -70793,7 +71771,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lclntsh $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:71786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -70938,7 +71916,7 @@ + done + + echo $ac_n "checking for OCILobIsTemporary in -lclntsh""... $ac_c" 1>&6 +-echo "configure:70942: checking for OCILobIsTemporary in -lclntsh" >&5 ++echo "configure:71920: checking for OCILobIsTemporary in -lclntsh" >&5 + ac_lib_var=`echo clntsh'_'OCILobIsTemporary | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -70946,7 +71924,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lclntsh $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:71939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -71087,7 +72065,7 @@ + done + + echo $ac_n "checking for OCILobIsTemporary in -locijdbc8""... $ac_c" 1>&6 +-echo "configure:71091: checking for OCILobIsTemporary in -locijdbc8" >&5 ++echo "configure:72069: checking for OCILobIsTemporary in -locijdbc8" >&5 + ac_lib_var=`echo ocijdbc8'_'OCILobIsTemporary | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -71095,7 +72073,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-locijdbc8 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:72088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -71267,7 +72245,7 @@ + done + + echo $ac_n "checking for OCICollAssign in -lclntsh""... $ac_c" 1>&6 +-echo "configure:71271: checking for OCICollAssign in -lclntsh" >&5 ++echo "configure:72249: checking for OCICollAssign in -lclntsh" >&5 + ac_lib_var=`echo clntsh'_'OCICollAssign | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -71275,7 +72253,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lclntsh $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:72268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -71420,7 +72398,7 @@ + done + + echo $ac_n "checking for OCIStmtFetch2 in -lclntsh""... $ac_c" 1>&6 +-echo "configure:71424: checking for OCIStmtFetch2 in -lclntsh" >&5 ++echo "configure:72402: checking for OCIStmtFetch2 in -lclntsh" >&5 + ac_lib_var=`echo clntsh'_'OCIStmtFetch2 | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -71428,7 +72406,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lclntsh $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:72421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -71478,13 +72456,13 @@ + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:71482: checking for PDO includes" >&5 ++echo "configure:72460: checking for PDO includes" >&5 + if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:71488: checking for PDO includes" >&5 ++echo "configure:72466: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then +@@ -71852,7 +72830,7 @@ + php_with_pdo_odbc=no + + echo $ac_n "checking for ODBC v3 support for PDO""... $ac_c" 1>&6 +-echo "configure:71856: checking for ODBC v3 support for PDO" >&5 ++echo "configure:72834: checking for ODBC v3 support for PDO" >&5 + # Check whether --with-pdo-odbc or --without-pdo-odbc was given. + if test "${with_pdo_odbc+set}" = set; then + withval="$with_pdo_odbc" +@@ -71904,13 +72882,13 @@ + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:71908: checking for PDO includes" >&5 ++echo "configure:72886: checking for PDO includes" >&5 + if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:71914: checking for PDO includes" >&5 ++echo "configure:72892: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then +@@ -71931,7 +72909,7 @@ + + + echo $ac_n "checking for selected PDO ODBC flavour""... $ac_c" 1>&6 +-echo "configure:71935: checking for selected PDO ODBC flavour" >&5 ++echo "configure:72913: checking for selected PDO ODBC flavour" >&5 + + pdo_odbc_flavour="`echo $PHP_PDO_ODBC | cut -d, -f1`" + pdo_odbc_dir="`echo $PHP_PDO_ODBC | cut -d, -f2`" +@@ -72010,7 +72988,7 @@ + + + echo $ac_n "checking for odbc.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72014: checking for odbc.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:72992: checking for odbc.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/odbc.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72024,7 +73002,7 @@ + + + echo $ac_n "checking for odbcsdk.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72028: checking for odbcsdk.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73006: checking for odbcsdk.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/odbcsdk.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72038,7 +73016,7 @@ + + + echo $ac_n "checking for iodbc.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72042: checking for iodbc.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73020: checking for iodbc.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/iodbc.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72052,7 +73030,7 @@ + + + echo $ac_n "checking for sqlunix.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72056: checking for sqlunix.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73034: checking for sqlunix.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/sqlunix.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72066,7 +73044,7 @@ + + + echo $ac_n "checking for sqltypes.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72070: checking for sqltypes.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73048: checking for sqltypes.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/sqltypes.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72080,7 +73058,7 @@ + + + echo $ac_n "checking for sqlucode.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72084: checking for sqlucode.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73062: checking for sqlucode.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/sqlucode.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72094,7 +73072,7 @@ + + + echo $ac_n "checking for sql.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72098: checking for sql.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73076: checking for sql.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/sql.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72108,7 +73086,7 @@ + + + echo $ac_n "checking for isql.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72112: checking for isql.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73090: checking for isql.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/isql.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72122,7 +73100,7 @@ + + + echo $ac_n "checking for sqlext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72126: checking for sqlext.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73104: checking for sqlext.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/sqlext.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72136,7 +73114,7 @@ + + + echo $ac_n "checking for isqlext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72140: checking for isqlext.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73118: checking for isqlext.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/isqlext.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72150,7 +73128,7 @@ + + + echo $ac_n "checking for udbcext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72154: checking for udbcext.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73132: checking for udbcext.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/udbcext.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72164,7 +73142,7 @@ + + + echo $ac_n "checking for sqlcli1.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72168: checking for sqlcli1.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73146: checking for sqlcli1.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/sqlcli1.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72178,7 +73156,7 @@ + + + echo $ac_n "checking for LibraryManager.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72182: checking for LibraryManager.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73160: checking for LibraryManager.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/LibraryManager.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72192,7 +73170,7 @@ + + + echo $ac_n "checking for cli0core.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72196: checking for cli0core.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73174: checking for cli0core.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/cli0core.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72206,7 +73184,7 @@ + + + echo $ac_n "checking for cli0ext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72210: checking for cli0ext.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73188: checking for cli0ext.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/cli0ext.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72220,7 +73198,7 @@ + + + echo $ac_n "checking for cli0cli.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72224: checking for cli0cli.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73202: checking for cli0cli.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/cli0cli.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72234,7 +73212,7 @@ + + + echo $ac_n "checking for cli0defs.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72238: checking for cli0defs.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73216: checking for cli0defs.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/cli0defs.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72248,7 +73226,7 @@ + + + echo $ac_n "checking for cli0env.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6 +-echo "configure:72252: checking for cli0env.h in $PDO_ODBC_INCDIR" >&5 ++echo "configure:73230: checking for cli0env.h in $PDO_ODBC_INCDIR" >&5 + if test -f "$PDO_ODBC_INCDIR/cli0env.h"; then + php_pdo_have_header=yes + cat >> confdefs.h <<\EOF +@@ -72454,7 +73432,7 @@ + done + + echo $ac_n "checking for SQLBindCol in -l$pdo_odbc_def_lib""... $ac_c" 1>&6 +-echo "configure:72458: checking for SQLBindCol in -l$pdo_odbc_def_lib" >&5 ++echo "configure:73436: checking for SQLBindCol in -l$pdo_odbc_def_lib" >&5 + ac_lib_var=`echo $pdo_odbc_def_lib'_'SQLBindCol | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -72462,7 +73440,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$pdo_odbc_def_lib $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:73455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -72588,7 +73566,7 @@ + done + + echo $ac_n "checking for SQLAllocHandle in -l$pdo_odbc_def_lib""... $ac_c" 1>&6 +-echo "configure:72592: checking for SQLAllocHandle in -l$pdo_odbc_def_lib" >&5 ++echo "configure:73570: checking for SQLAllocHandle in -l$pdo_odbc_def_lib" >&5 + ac_lib_var=`echo $pdo_odbc_def_lib'_'SQLAllocHandle | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -72596,7 +73574,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$pdo_odbc_def_lib $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:73589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -72981,7 +73959,7 @@ + php_with_pdo_pgsql=no + + echo $ac_n "checking for PostgreSQL support for PDO""... $ac_c" 1>&6 +-echo "configure:72985: checking for PostgreSQL support for PDO" >&5 ++echo "configure:73963: checking for PostgreSQL support for PDO" >&5 + # Check whether --with-pdo-pgsql or --without-pdo-pgsql was given. + if test "${with_pdo_pgsql+set}" = set; then + withval="$with_pdo_pgsql" +@@ -73040,7 +74018,7 @@ + + + echo $ac_n "checking for pg_config""... $ac_c" 1>&6 +-echo "configure:73044: checking for pg_config" >&5 ++echo "configure:74022: checking for pg_config" >&5 + for i in $PHP_PDO_PGSQL $PHP_PDO_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do + if test -x $i/pg_config; then + PG_CONFIG="$i/pg_config" +@@ -73104,13 +74082,13 @@ + + + echo $ac_n "checking for openssl dependencies""... $ac_c" 1>&6 +-echo "configure:73108: checking for openssl dependencies" >&5 ++echo "configure:74086: checking for openssl dependencies" >&5 + if grep -q openssl $PGSQL_INCLUDE/libpq-fe.h ; then + echo "$ac_t""yes" 1>&6 + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:73114: checking for $ac_word" >&5 ++echo "configure:74092: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -73154,7 +74132,7 @@ + old_LDFLAGS=$LDFLAGS + LDFLAGS="-L$PGSQL_LIBDIR $LDFLAGS" + echo $ac_n "checking for PQparameterStatus in -lpq""... $ac_c" 1>&6 +-echo "configure:73158: checking for PQparameterStatus in -lpq" >&5 ++echo "configure:74136: checking for PQparameterStatus in -lpq" >&5 + ac_lib_var=`echo pq'_'PQparameterStatus | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -73162,7 +74140,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:74155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -73202,7 +74180,7 @@ + + + echo $ac_n "checking for PQprepare in -lpq""... $ac_c" 1>&6 +-echo "configure:73206: checking for PQprepare in -lpq" >&5 ++echo "configure:74184: checking for PQprepare in -lpq" >&5 + ac_lib_var=`echo pq'_'PQprepare | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -73210,7 +74188,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:74203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -73245,7 +74223,7 @@ + fi + + echo $ac_n "checking for PQescapeStringConn in -lpq""... $ac_c" 1>&6 +-echo "configure:73249: checking for PQescapeStringConn in -lpq" >&5 ++echo "configure:74227: checking for PQescapeStringConn in -lpq" >&5 + ac_lib_var=`echo pq'_'PQescapeStringConn | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -73253,7 +74231,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:74246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -73288,7 +74266,7 @@ + fi + + echo $ac_n "checking for PQescapeByteaConn in -lpq""... $ac_c" 1>&6 +-echo "configure:73292: checking for PQescapeByteaConn in -lpq" >&5 ++echo "configure:74270: checking for PQescapeByteaConn in -lpq" >&5 + ac_lib_var=`echo pq'_'PQescapeByteaConn | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -73296,7 +74274,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:74289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -73332,7 +74310,7 @@ + + + echo $ac_n "checking for pg_encoding_to_char in -lpq""... $ac_c" 1>&6 +-echo "configure:73336: checking for pg_encoding_to_char in -lpq" >&5 ++echo "configure:74314: checking for pg_encoding_to_char in -lpq" >&5 + ac_lib_var=`echo pq'_'pg_encoding_to_char | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -73340,7 +74318,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:74333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -73515,13 +74493,13 @@ + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:73519: checking for PDO includes" >&5 ++echo "configure:74497: checking for PDO includes" >&5 + if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:73525: checking for PDO includes" >&5 ++echo "configure:74503: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then +@@ -73861,7 +74839,7 @@ + php_with_pdo_sqlite=$PHP_PDO + + echo $ac_n "checking for sqlite 3 support for PDO""... $ac_c" 1>&6 +-echo "configure:73865: checking for sqlite 3 support for PDO" >&5 ++echo "configure:74843: checking for sqlite 3 support for PDO" >&5 + # Check whether --with-pdo-sqlite or --without-pdo-sqlite was given. + if test "${with_pdo_sqlite+set}" = set; then + withval="$with_pdo_sqlite" +@@ -73910,13 +74888,13 @@ + + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:73914: checking for PDO includes" >&5 ++echo "configure:74892: checking for PDO includes" >&5 + if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:73920: checking for PDO includes" >&5 ++echo "configure:74898: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then +@@ -73945,7 +74923,7 @@ + PDO_SQLITE_DIR=$PHP_PDO_SQLITE + else # search default path list + echo $ac_n "checking for sqlite3 files in default path""... $ac_c" 1>&6 +-echo "configure:73949: checking for sqlite3 files in default path" >&5 ++echo "configure:74927: checking for sqlite3 files in default path" >&5 + for i in $SEARCH_PATH ; do + if test -r $i/$SEARCH_FOR; then + PDO_SQLITE_DIR=$i +@@ -74091,7 +75069,7 @@ + done + + echo $ac_n "checking for $LIBSYMBOL in -l$LIBNAME""... $ac_c" 1>&6 +-echo "configure:74095: checking for $LIBSYMBOL in -l$LIBNAME" >&5 ++echo "configure:75073: checking for $LIBSYMBOL in -l$LIBNAME" >&5 + ac_lib_var=`echo $LIBNAME'_'$LIBSYMBOL | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -74099,7 +75077,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$LIBNAME $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:75092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -74340,7 +75318,7 @@ + done + + echo $ac_n "checking for sqlite3_key in -lsqlite3""... $ac_c" 1>&6 +-echo "configure:74344: checking for sqlite3_key in -lsqlite3" >&5 ++echo "configure:75322: checking for sqlite3_key in -lsqlite3" >&5 + ac_lib_var=`echo sqlite3'_'sqlite3_key | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -74348,7 +75326,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsqlite3 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:75341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -75100,12 +76078,12 @@ + for ac_func in usleep nanosleep + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:75104: checking for $ac_func" >&5 ++echo "configure:76082: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -75156,17 +76134,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:75160: checking for $ac_hdr" >&5 ++echo "configure:76138: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:75170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:76148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -75290,7 +76268,7 @@ + done + + echo $ac_n "checking for fdatasync in -lrt""... $ac_c" 1>&6 +-echo "configure:75294: checking for fdatasync in -lrt" >&5 ++echo "configure:76272: checking for fdatasync in -lrt" >&5 + ac_lib_var=`echo rt'_'fdatasync | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -75298,7 +76276,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lrt $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -75390,7 +76368,7 @@ + php_with_pgsql=no + + echo $ac_n "checking for PostgreSQL support""... $ac_c" 1>&6 +-echo "configure:75394: checking for PostgreSQL support" >&5 ++echo "configure:76372: checking for PostgreSQL support" >&5 + # Check whether --with-pgsql or --without-pgsql was given. + if test "${with_pgsql+set}" = set; then + withval="$with_pgsql" +@@ -75444,7 +76422,7 @@ + + + echo $ac_n "checking for pg_config""... $ac_c" 1>&6 +-echo "configure:75448: checking for pg_config" >&5 ++echo "configure:76426: checking for pg_config" >&5 + for i in $PHP_PGSQL $PHP_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do + if test -x $i/pg_config; then + PG_CONFIG="$i/pg_config" +@@ -75512,7 +76490,7 @@ + old_LDFLAGS=$LDFLAGS + LDFLAGS="-L$PGSQL_LIBDIR $LDFLAGS" + echo $ac_n "checking for PQescapeString in -lpq""... $ac_c" 1>&6 +-echo "configure:75516: checking for PQescapeString in -lpq" >&5 ++echo "configure:76494: checking for PQescapeString in -lpq" >&5 + ac_lib_var=`echo pq'_'PQescapeString | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -75520,7 +76498,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -75555,7 +76533,7 @@ + fi + + echo $ac_n "checking for PQunescapeBytea in -lpq""... $ac_c" 1>&6 +-echo "configure:75559: checking for PQunescapeBytea in -lpq" >&5 ++echo "configure:76537: checking for PQunescapeBytea in -lpq" >&5 + ac_lib_var=`echo pq'_'PQunescapeBytea | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -75563,7 +76541,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -75598,7 +76576,7 @@ + fi + + echo $ac_n "checking for PQsetnonblocking in -lpq""... $ac_c" 1>&6 +-echo "configure:75602: checking for PQsetnonblocking in -lpq" >&5 ++echo "configure:76580: checking for PQsetnonblocking in -lpq" >&5 + ac_lib_var=`echo pq'_'PQsetnonblocking | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -75606,7 +76584,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -75641,7 +76619,7 @@ + fi + + echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6 +-echo "configure:75645: checking for PQcmdTuples in -lpq" >&5 ++echo "configure:76623: checking for PQcmdTuples in -lpq" >&5 + ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -75649,7 +76627,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -75684,7 +76662,7 @@ + fi + + echo $ac_n "checking for PQoidValue in -lpq""... $ac_c" 1>&6 +-echo "configure:75688: checking for PQoidValue in -lpq" >&5 ++echo "configure:76666: checking for PQoidValue in -lpq" >&5 + ac_lib_var=`echo pq'_'PQoidValue | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -75692,7 +76670,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -75727,7 +76705,7 @@ + fi + + echo $ac_n "checking for PQclientEncoding in -lpq""... $ac_c" 1>&6 +-echo "configure:75731: checking for PQclientEncoding in -lpq" >&5 ++echo "configure:76709: checking for PQclientEncoding in -lpq" >&5 + ac_lib_var=`echo pq'_'PQclientEncoding | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -75735,7 +76713,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -75770,7 +76748,7 @@ + fi + + echo $ac_n "checking for PQparameterStatus in -lpq""... $ac_c" 1>&6 +-echo "configure:75774: checking for PQparameterStatus in -lpq" >&5 ++echo "configure:76752: checking for PQparameterStatus in -lpq" >&5 + ac_lib_var=`echo pq'_'PQparameterStatus | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -75778,7 +76756,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -75813,7 +76791,7 @@ + fi + + echo $ac_n "checking for PQprotocolVersion in -lpq""... $ac_c" 1>&6 +-echo "configure:75817: checking for PQprotocolVersion in -lpq" >&5 ++echo "configure:76795: checking for PQprotocolVersion in -lpq" >&5 + ac_lib_var=`echo pq'_'PQprotocolVersion | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -75821,7 +76799,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -75856,7 +76834,7 @@ + fi + + echo $ac_n "checking for PQtransactionStatus in -lpq""... $ac_c" 1>&6 +-echo "configure:75860: checking for PQtransactionStatus in -lpq" >&5 ++echo "configure:76838: checking for PQtransactionStatus in -lpq" >&5 + ac_lib_var=`echo pq'_'PQtransactionStatus | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -75864,7 +76842,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -75899,7 +76877,7 @@ + fi + + echo $ac_n "checking for PQexecParams in -lpq""... $ac_c" 1>&6 +-echo "configure:75903: checking for PQexecParams in -lpq" >&5 ++echo "configure:76881: checking for PQexecParams in -lpq" >&5 + ac_lib_var=`echo pq'_'PQexecParams | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -75907,7 +76885,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -75942,7 +76920,7 @@ + fi + + echo $ac_n "checking for PQprepare in -lpq""... $ac_c" 1>&6 +-echo "configure:75946: checking for PQprepare in -lpq" >&5 ++echo "configure:76924: checking for PQprepare in -lpq" >&5 + ac_lib_var=`echo pq'_'PQprepare | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -75950,7 +76928,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -75985,7 +76963,7 @@ + fi + + echo $ac_n "checking for PQexecPrepared in -lpq""... $ac_c" 1>&6 +-echo "configure:75989: checking for PQexecPrepared in -lpq" >&5 ++echo "configure:76967: checking for PQexecPrepared in -lpq" >&5 + ac_lib_var=`echo pq'_'PQexecPrepared | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -75993,7 +76971,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:76986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76028,7 +77006,7 @@ + fi + + echo $ac_n "checking for PQresultErrorField in -lpq""... $ac_c" 1>&6 +-echo "configure:76032: checking for PQresultErrorField in -lpq" >&5 ++echo "configure:77010: checking for PQresultErrorField in -lpq" >&5 + ac_lib_var=`echo pq'_'PQresultErrorField | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76036,7 +77014,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76071,7 +77049,7 @@ + fi + + echo $ac_n "checking for PQsendQueryParams in -lpq""... $ac_c" 1>&6 +-echo "configure:76075: checking for PQsendQueryParams in -lpq" >&5 ++echo "configure:77053: checking for PQsendQueryParams in -lpq" >&5 + ac_lib_var=`echo pq'_'PQsendQueryParams | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76079,7 +77057,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76114,7 +77092,7 @@ + fi + + echo $ac_n "checking for PQsendPrepare in -lpq""... $ac_c" 1>&6 +-echo "configure:76118: checking for PQsendPrepare in -lpq" >&5 ++echo "configure:77096: checking for PQsendPrepare in -lpq" >&5 + ac_lib_var=`echo pq'_'PQsendPrepare | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76122,7 +77100,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76157,7 +77135,7 @@ + fi + + echo $ac_n "checking for PQsendQueryPrepared in -lpq""... $ac_c" 1>&6 +-echo "configure:76161: checking for PQsendQueryPrepared in -lpq" >&5 ++echo "configure:77139: checking for PQsendQueryPrepared in -lpq" >&5 + ac_lib_var=`echo pq'_'PQsendQueryPrepared | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76165,7 +77143,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76200,7 +77178,7 @@ + fi + + echo $ac_n "checking for PQputCopyData in -lpq""... $ac_c" 1>&6 +-echo "configure:76204: checking for PQputCopyData in -lpq" >&5 ++echo "configure:77182: checking for PQputCopyData in -lpq" >&5 + ac_lib_var=`echo pq'_'PQputCopyData | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76208,7 +77186,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76243,7 +77221,7 @@ + fi + + echo $ac_n "checking for PQputCopyEnd in -lpq""... $ac_c" 1>&6 +-echo "configure:76247: checking for PQputCopyEnd in -lpq" >&5 ++echo "configure:77225: checking for PQputCopyEnd in -lpq" >&5 + ac_lib_var=`echo pq'_'PQputCopyEnd | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76251,7 +77229,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76286,7 +77264,7 @@ + fi + + echo $ac_n "checking for PQgetCopyData in -lpq""... $ac_c" 1>&6 +-echo "configure:76290: checking for PQgetCopyData in -lpq" >&5 ++echo "configure:77268: checking for PQgetCopyData in -lpq" >&5 + ac_lib_var=`echo pq'_'PQgetCopyData | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76294,7 +77272,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76329,7 +77307,7 @@ + fi + + echo $ac_n "checking for PQfreemem in -lpq""... $ac_c" 1>&6 +-echo "configure:76333: checking for PQfreemem in -lpq" >&5 ++echo "configure:77311: checking for PQfreemem in -lpq" >&5 + ac_lib_var=`echo pq'_'PQfreemem | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76337,7 +77315,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76372,7 +77350,7 @@ + fi + + echo $ac_n "checking for PQsetErrorVerbosity in -lpq""... $ac_c" 1>&6 +-echo "configure:76376: checking for PQsetErrorVerbosity in -lpq" >&5 ++echo "configure:77354: checking for PQsetErrorVerbosity in -lpq" >&5 + ac_lib_var=`echo pq'_'PQsetErrorVerbosity | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76380,7 +77358,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76415,7 +77393,7 @@ + fi + + echo $ac_n "checking for PQftable in -lpq""... $ac_c" 1>&6 +-echo "configure:76419: checking for PQftable in -lpq" >&5 ++echo "configure:77397: checking for PQftable in -lpq" >&5 + ac_lib_var=`echo pq'_'PQftable | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76423,7 +77401,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76458,7 +77436,7 @@ + fi + + echo $ac_n "checking for PQescapeStringConn in -lpq""... $ac_c" 1>&6 +-echo "configure:76462: checking for PQescapeStringConn in -lpq" >&5 ++echo "configure:77440: checking for PQescapeStringConn in -lpq" >&5 + ac_lib_var=`echo pq'_'PQescapeStringConn | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76466,7 +77444,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76501,7 +77479,7 @@ + fi + + echo $ac_n "checking for PQescapeByteaConn in -lpq""... $ac_c" 1>&6 +-echo "configure:76505: checking for PQescapeByteaConn in -lpq" >&5 ++echo "configure:77483: checking for PQescapeByteaConn in -lpq" >&5 + ac_lib_var=`echo pq'_'PQescapeByteaConn | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76509,7 +77487,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76544,7 +77522,7 @@ + fi + + echo $ac_n "checking for pg_encoding_to_char in -lpq""... $ac_c" 1>&6 +-echo "configure:76548: checking for pg_encoding_to_char in -lpq" >&5 ++echo "configure:77526: checking for pg_encoding_to_char in -lpq" >&5 + ac_lib_var=`echo pq'_'pg_encoding_to_char | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76552,7 +77530,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76587,7 +77565,7 @@ + fi + + echo $ac_n "checking for lo_create in -lpq""... $ac_c" 1>&6 +-echo "configure:76591: checking for lo_create in -lpq" >&5 ++echo "configure:77569: checking for lo_create in -lpq" >&5 + ac_lib_var=`echo pq'_'lo_create | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76595,7 +77573,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -76630,7 +77608,7 @@ + fi + + echo $ac_n "checking for lo_import_with_oid in -lpq""... $ac_c" 1>&6 +-echo "configure:76634: checking for lo_import_with_oid in -lpq" >&5 ++echo "configure:77612: checking for lo_import_with_oid in -lpq" >&5 + ac_lib_var=`echo pq'_'lo_import_with_oid | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -76638,7 +77616,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lpq $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:77631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -77109,7 +78087,7 @@ + php_enable_phar=yes + + echo $ac_n "checking for phar archive support""... $ac_c" 1>&6 +-echo "configure:77113: checking for phar archive support" >&5 ++echo "configure:78091: checking for phar archive support" >&5 + # Check whether --enable-phar or --disable-phar was given. + if test "${enable_phar+set}" = set; then + enableval="$enable_phar" +@@ -77443,7 +78421,7 @@ + fi + + echo $ac_n "checking for phar openssl support""... $ac_c" 1>&6 +-echo "configure:77447: checking for phar openssl support" >&5 ++echo "configure:78425: checking for phar openssl support" >&5 + if test "$PHP_HASH_SHARED" != "yes"; then + if test "$PHP_HASH" != "no"; then + cat >> confdefs.h <<\EOF +@@ -77518,7 +78496,7 @@ + php_enable_posix=yes + + echo $ac_n "checking whether to enable POSIX-like functions""... $ac_c" 1>&6 +-echo "configure:77522: checking whether to enable POSIX-like functions" >&5 ++echo "configure:78500: checking whether to enable POSIX-like functions" >&5 + # Check whether --enable-posix or --disable-posix was given. + if test "${enable_posix+set}" = set; then + enableval="$enable_posix" +@@ -77860,17 +78838,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:77864: checking for $ac_hdr" >&5 ++echo "configure:78842: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:77874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:78852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -77900,12 +78878,12 @@ + for ac_func in seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:77904: checking for $ac_func" >&5 ++echo "configure:78882: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:78910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -77954,14 +78932,14 @@ + + + echo $ac_n "checking for working ttyname_r() implementation""... $ac_c" 1>&6 +-echo "configure:77958: checking for working ttyname_r() implementation" >&5 ++echo "configure:78936: checking for working ttyname_r() implementation" >&5 + if test "$cross_compiling" = yes; then + + echo "$ac_t""no, cannot detect working ttyname_r() when cross compiling. posix_ttyname() will be thread-unsafe" 1>&6 + + else + cat > conftest.$ac_ext < +@@ -77974,7 +78952,7 @@ + } + + EOF +-if { (eval echo configure:77978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:78956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + echo "$ac_t""yes" 1>&6 +@@ -77996,13 +78974,13 @@ + + + echo $ac_n "checking for utsname.domainname""... $ac_c" 1>&6 +-echo "configure:78000: checking for utsname.domainname" >&5 ++echo "configure:78978: checking for utsname.domainname" >&5 + if eval "test \"`echo '$''{'ac_cv_have_utsname_domainname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:78996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_have_utsname_domainname=yes +@@ -78045,7 +79023,7 @@ + php_with_pspell=no + + echo $ac_n "checking for PSPELL support""... $ac_c" 1>&6 +-echo "configure:78049: checking for PSPELL support" >&5 ++echo "configure:79027: checking for PSPELL support" >&5 + # Check whether --with-pspell or --without-pspell was given. + if test "${with_pspell+set}" = set; then + withval="$with_pspell" +@@ -78595,7 +79573,7 @@ + done + + echo $ac_n "checking for new_aspell_config in -laspell""... $ac_c" 1>&6 +-echo "configure:78599: checking for new_aspell_config in -laspell" >&5 ++echo "configure:79577: checking for new_aspell_config in -laspell" >&5 + ac_lib_var=`echo aspell'_'new_aspell_config | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -78603,7 +79581,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-laspell $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:79596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -78788,7 +79766,7 @@ + php_with_libedit=no + + echo $ac_n "checking for libedit readline replacement""... $ac_c" 1>&6 +-echo "configure:78792: checking for libedit readline replacement" >&5 ++echo "configure:79770: checking for libedit readline replacement" >&5 + # Check whether --with-libedit or --without-libedit was given. + if test "${with_libedit+set}" = set; then + withval="$with_libedit" +@@ -78833,7 +79811,7 @@ + php_with_readline=no + + echo $ac_n "checking for readline support""... $ac_c" 1>&6 +-echo "configure:78837: checking for readline support" >&5 ++echo "configure:79815: checking for readline support" >&5 + # Check whether --with-readline or --without-readline was given. + if test "${with_readline+set}" = set; then + withval="$with_readline" +@@ -78919,7 +79897,7 @@ + + PHP_READLINE_LIBS="" + echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 +-echo "configure:78923: checking for tgetent in -lncurses" >&5 ++echo "configure:79901: checking for tgetent in -lncurses" >&5 + ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -78927,7 +79905,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lncurses $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:79920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -78983,7 +79961,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 +-echo "configure:78987: checking for tgetent in -ltermcap" >&5 ++echo "configure:79965: checking for tgetent in -ltermcap" >&5 + ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -78991,7 +79969,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ltermcap $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:79984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -79149,7 +80127,7 @@ + done + + echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 +-echo "configure:79153: checking for readline in -lreadline" >&5 ++echo "configure:80131: checking for readline in -lreadline" >&5 + ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -79157,7 +80135,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lreadline $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:80150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -79397,7 +80375,7 @@ + done + + echo $ac_n "checking for rl_pending_input in -lreadline""... $ac_c" 1>&6 +-echo "configure:79401: checking for rl_pending_input in -lreadline" >&5 ++echo "configure:80379: checking for rl_pending_input in -lreadline" >&5 + ac_lib_var=`echo readline'_'rl_pending_input | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -79405,7 +80383,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lreadline $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:80398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -79547,7 +80525,7 @@ + done + + echo $ac_n "checking for rl_callback_read_char in -lreadline""... $ac_c" 1>&6 +-echo "configure:79551: checking for rl_callback_read_char in -lreadline" >&5 ++echo "configure:80529: checking for rl_callback_read_char in -lreadline" >&5 + ac_lib_var=`echo readline'_'rl_callback_read_char | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -79555,7 +80533,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lreadline $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:80548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -79650,7 +80628,7 @@ + + + echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 +-echo "configure:79654: checking for tgetent in -lncurses" >&5 ++echo "configure:80632: checking for tgetent in -lncurses" >&5 + ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -79658,7 +80636,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lncurses $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:80651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -79713,7 +80691,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 +-echo "configure:79717: checking for tgetent in -ltermcap" >&5 ++echo "configure:80695: checking for tgetent in -ltermcap" >&5 + ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -79721,7 +80699,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ltermcap $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:80714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -79878,7 +80856,7 @@ + done + + echo $ac_n "checking for readline in -ledit""... $ac_c" 1>&6 +-echo "configure:79882: checking for readline in -ledit" >&5 ++echo "configure:80860: checking for readline in -ledit" >&5 + ac_lib_var=`echo edit'_'readline | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -79886,7 +80864,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ledit $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:80879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -80038,12 +81016,12 @@ + for ac_func in rl_completion_matches + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:80042: checking for $ac_func" >&5 ++echo "configure:81020: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:81048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -80392,7 +81370,7 @@ + php_with_recode=no + + echo $ac_n "checking for recode support""... $ac_c" 1>&6 +-echo "configure:80396: checking for recode support" >&5 ++echo "configure:81374: checking for recode support" >&5 + # Check whether --with-recode or --without-recode was given. + if test "${with_recode+set}" = set; then + withval="$with_recode" +@@ -80556,7 +81534,7 @@ + done + + echo $ac_n "checking for recode_format_table in -lrecode""... $ac_c" 1>&6 +-echo "configure:80560: checking for recode_format_table in -lrecode" >&5 ++echo "configure:81538: checking for recode_format_table in -lrecode" >&5 + ac_lib_var=`echo recode'_'recode_format_table | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -80564,7 +81542,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lrecode $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:81557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -80705,7 +81683,7 @@ + LDFLAGS="$LDFLAGS -L$RECODE_DIR/$RECODE_LIB" + LIBS="$LIBS -lrecode" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:81698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + + +@@ -80879,17 +81857,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:80883: checking for $ac_hdr" >&5 ++echo "configure:81861: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:80893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:81871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -81512,7 +82490,7 @@ + php_enable_session=yes + + echo $ac_n "checking whether to enable PHP sessions""... $ac_c" 1>&6 +-echo "configure:81516: checking whether to enable PHP sessions" >&5 ++echo "configure:82494: checking whether to enable PHP sessions" >&5 + # Check whether --enable-session or --disable-session was given. + if test "${enable_session+set}" = set; then + enableval="$enable_session" +@@ -81556,7 +82534,7 @@ + php_with_mm=no + + echo $ac_n "checking for mm support""... $ac_c" 1>&6 +-echo "configure:81560: checking for mm support" >&5 ++echo "configure:82538: checking for mm support" >&5 + # Check whether --with-mm or --without-mm was given. + if test "${with_mm+set}" = set; then + withval="$with_mm" +@@ -81578,7 +82556,7 @@ + if test "$PHP_SESSION" != "no"; then + + echo $ac_n "checking whether pwrite works""... $ac_c" 1>&6 +-echo "configure:81582: checking whether pwrite works" >&5 ++echo "configure:82560: checking whether pwrite works" >&5 + if eval "test \"`echo '$''{'ac_cv_pwrite'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -81590,7 +82568,7 @@ + + else + cat > conftest.$ac_ext < +@@ -81611,7 +82589,7 @@ + + + EOF +-if { (eval echo configure:81615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:82593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_pwrite=yes +@@ -81636,7 +82614,7 @@ + + else + cat > conftest.$ac_ext < +@@ -81657,7 +82635,7 @@ + + + EOF +-if { (eval echo configure:81661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:82639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_pwrite=yes +@@ -81698,7 +82676,7 @@ + + + echo $ac_n "checking whether pread works""... $ac_c" 1>&6 +-echo "configure:81702: checking whether pread works" >&5 ++echo "configure:82680: checking whether pread works" >&5 + if eval "test \"`echo '$''{'ac_cv_pread'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -81711,7 +82689,7 @@ + + else + cat > conftest.$ac_ext < +@@ -81731,7 +82709,7 @@ + } + + EOF +-if { (eval echo configure:81735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:82713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_pread=yes +@@ -81758,7 +82736,7 @@ + + else + cat > conftest.$ac_ext < +@@ -81778,7 +82756,7 @@ + } + + EOF +-if { (eval echo configure:81782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:82760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_pread=yes +@@ -82342,7 +83320,7 @@ + php_enable_shmop=no + + echo $ac_n "checking whether to enable shmop support""... $ac_c" 1>&6 +-echo "configure:82346: checking whether to enable shmop support" >&5 ++echo "configure:83324: checking whether to enable shmop support" >&5 + # Check whether --enable-shmop or --disable-shmop was given. + if test "${enable_shmop+set}" = set; then + enableval="$enable_shmop" +@@ -82686,7 +83664,7 @@ + php_enable_simplexml=yes + + echo $ac_n "checking whether to enable SimpleXML support""... $ac_c" 1>&6 +-echo "configure:82690: checking whether to enable SimpleXML support" >&5 ++echo "configure:83668: checking whether to enable SimpleXML support" >&5 + # Check whether --enable-simplexml or --disable-simplexml was given. + if test "${enable_simplexml+set}" = set; then + enableval="$enable_simplexml" +@@ -82731,7 +83709,7 @@ + php_with_libxml_dir=no + + echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +-echo "configure:82735: checking libxml2 install dir" >&5 ++echo "configure:83713: checking libxml2 install dir" >&5 + # Check whether --with-libxml-dir or --without-libxml-dir was given. + if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" +@@ -82759,7 +83737,7 @@ + + + echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +-echo "configure:82763: checking for xml2-config path" >&5 ++echo "configure:83741: checking for xml2-config path" >&5 + if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -82917,7 +83895,7 @@ + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +-echo "configure:82921: checking whether libxml build works" >&5 ++echo "configure:83899: checking whether libxml build works" >&5 + if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -82933,7 +83911,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:83926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -83332,7 +84310,7 @@ + php_with_snmp=no + + echo $ac_n "checking for SNMP support""... $ac_c" 1>&6 +-echo "configure:83336: checking for SNMP support" >&5 ++echo "configure:84314: checking for SNMP support" >&5 + # Check whether --with-snmp or --without-snmp was given. + if test "${with_snmp+set}" = set; then + withval="$with_snmp" +@@ -83376,7 +84354,7 @@ + php_with_openssl_dir=no + + echo $ac_n "checking OpenSSL dir for SNMP""... $ac_c" 1>&6 +-echo "configure:83380: checking OpenSSL dir for SNMP" >&5 ++echo "configure:84358: checking OpenSSL dir for SNMP" >&5 + # Check whether --with-openssl-dir or --without-openssl-dir was given. + if test "${with_openssl_dir+set}" = set; then + withval="$with_openssl_dir" +@@ -83399,7 +84377,7 @@ + php_enable_ucd_snmp_hack=no + + echo $ac_n "checking whether to enable UCD SNMP hack""... $ac_c" 1>&6 +-echo "configure:83403: checking whether to enable UCD SNMP hack" >&5 ++echo "configure:84381: checking whether to enable UCD SNMP hack" >&5 + # Check whether --enable-ucd-snmp-hack or --disable-ucd-snmp-hack was given. + if test "${enable_ucd_snmp_hack+set}" = set; then + enableval="$enable_ucd_snmp_hack" +@@ -83424,7 +84402,7 @@ + # Extract the first word of "net-snmp-config", so it can be a program name with args. + set dummy net-snmp-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:83428: checking for $ac_word" >&5 ++echo "configure:84406: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_SNMP_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -83625,17 +84603,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:83629: checking for $ac_hdr" >&5 ++echo "configure:84607: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:83639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:84617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -83663,9 +84641,9 @@ + + if test "$ac_cv_header_default_store_h" = "yes"; then + echo $ac_n "checking for OpenSSL support in SNMP libraries""... $ac_c" 1>&6 +-echo "configure:83667: checking for OpenSSL support in SNMP libraries" >&5 ++echo "configure:84645: checking for OpenSSL support in SNMP libraries" >&5 + cat > conftest.$ac_ext < +@@ -83720,7 +84698,7 @@ + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:83724: checking for $ac_word" >&5 ++echo "configure:84702: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -83925,9 +84903,9 @@ + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$OPENSSL_INCDIR + echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6 +-echo "configure:83929: checking for OpenSSL version" >&5 ++echo "configure:84907: checking for OpenSSL version" >&5 + cat > conftest.$ac_ext < +@@ -84082,7 +85060,7 @@ + done + + echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 +-echo "configure:84086: checking for CRYPTO_free in -lcrypto" >&5 ++echo "configure:85064: checking for CRYPTO_free in -lcrypto" >&5 + ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -84090,7 +85068,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcrypto $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:85083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -84258,7 +85236,7 @@ + done + + echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6 +-echo "configure:84262: checking for SSL_CTX_set_ssl_version in -lssl" >&5 ++echo "configure:85240: checking for SSL_CTX_set_ssl_version in -lssl" >&5 + ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -84266,7 +85244,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lssl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:85259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -84390,7 +85368,7 @@ + fi + + echo $ac_n "checking for kstat_read in -lkstat""... $ac_c" 1>&6 +-echo "configure:84394: checking for kstat_read in -lkstat" >&5 ++echo "configure:85372: checking for kstat_read in -lkstat" >&5 + ac_lib_var=`echo kstat'_'kstat_read | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -84398,7 +85376,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lkstat $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:85391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -84680,7 +85658,7 @@ + done + + echo $ac_n "checking for snmp_parse_oid in -l$SNMP_LIBNAME""... $ac_c" 1>&6 +-echo "configure:84684: checking for snmp_parse_oid in -l$SNMP_LIBNAME" >&5 ++echo "configure:85662: checking for snmp_parse_oid in -l$SNMP_LIBNAME" >&5 + ac_lib_var=`echo $SNMP_LIBNAME'_'snmp_parse_oid | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -84688,7 +85666,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$SNMP_LIBNAME $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:85681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -84833,7 +85811,7 @@ + done + + echo $ac_n "checking for init_snmp in -l$SNMP_LIBNAME""... $ac_c" 1>&6 +-echo "configure:84837: checking for init_snmp in -l$SNMP_LIBNAME" >&5 ++echo "configure:85815: checking for init_snmp in -l$SNMP_LIBNAME" >&5 + ac_lib_var=`echo $SNMP_LIBNAME'_'init_snmp | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -84841,7 +85819,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$SNMP_LIBNAME $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:85834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -85199,7 +86177,7 @@ + php_enable_soap=no + + echo $ac_n "checking whether to enable SOAP support""... $ac_c" 1>&6 +-echo "configure:85203: checking whether to enable SOAP support" >&5 ++echo "configure:86181: checking whether to enable SOAP support" >&5 + # Check whether --enable-soap or --disable-soap was given. + if test "${enable_soap+set}" = set; then + enableval="$enable_soap" +@@ -85244,7 +86222,7 @@ + php_with_libxml_dir=no + + echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +-echo "configure:85248: checking libxml2 install dir" >&5 ++echo "configure:86226: checking libxml2 install dir" >&5 + # Check whether --with-libxml-dir or --without-libxml-dir was given. + if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" +@@ -85272,7 +86250,7 @@ + + + echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +-echo "configure:85276: checking for xml2-config path" >&5 ++echo "configure:86254: checking for xml2-config path" >&5 + if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -85430,7 +86408,7 @@ + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +-echo "configure:85434: checking whether libxml build works" >&5 ++echo "configure:86412: checking whether libxml build works" >&5 + if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -85446,7 +86424,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:86439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -85807,7 +86785,7 @@ + php_enable_sockets=no + + echo $ac_n "checking whether to enable sockets support""... $ac_c" 1>&6 +-echo "configure:85811: checking whether to enable sockets support" >&5 ++echo "configure:86789: checking whether to enable sockets support" >&5 + # Check whether --enable-sockets or --disable-sockets was given. + if test "${enable_sockets+set}" = set; then + enableval="$enable_sockets" +@@ -85849,13 +86827,13 @@ + + if test "$PHP_SOCKETS" != "no"; then + echo $ac_n "checking for struct cmsghdr""... $ac_c" 1>&6 +-echo "configure:85853: checking for struct cmsghdr" >&5 ++echo "configure:86831: checking for struct cmsghdr" >&5 + if eval "test \"`echo '$''{'ac_cv_cmsghdr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < +@@ -85864,7 +86842,7 @@ + struct cmsghdr s; s + ; return 0; } + EOF +-if { (eval echo configure:85868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:86846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cmsghdr=yes + else +@@ -85889,12 +86867,12 @@ + for ac_func in hstrerror socketpair + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:85893: checking for $ac_func" >&5 ++echo "configure:86871: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:86899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -85945,17 +86923,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:85949: checking for $ac_hdr" >&5 ++echo "configure:86927: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:85959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:86937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -85982,7 +86960,7 @@ + done + + cat > conftest.$ac_ext < +@@ -85992,7 +86970,7 @@ + static struct msghdr tp; int n = (int) tp.msg_flags; return n + ; return 0; } + EOF +-if { (eval echo configure:85996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:86974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : + else + echo "configure: failed program was:" >&5 +@@ -86326,7 +87304,7 @@ + + + echo $ac_n "checking whether zend_object_value is packed""... $ac_c" 1>&6 +-echo "configure:86330: checking whether zend_object_value is packed" >&5 ++echo "configure:87308: checking whether zend_object_value is packed" >&5 + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS" + if test "$cross_compiling" = yes; then +@@ -86336,7 +87314,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:87327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_result=1 +@@ -86709,7 +87687,7 @@ + php_with_sqlite=yes + + echo $ac_n "checking for sqlite support""... $ac_c" 1>&6 +-echo "configure:86713: checking for sqlite support" >&5 ++echo "configure:87691: checking for sqlite support" >&5 + # Check whether --with-sqlite or --without-sqlite was given. + if test "${with_sqlite+set}" = set; then + withval="$with_sqlite" +@@ -86753,7 +87731,7 @@ + php_enable_sqlite_utf8=no + + echo $ac_n "checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)""... $ac_c" 1>&6 +-echo "configure:86757: checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)" >&5 ++echo "configure:87735: checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)" >&5 + # Check whether --enable-sqlite-utf8 or --disable-sqlite-utf8 was given. + if test "${enable_sqlite_utf8+set}" = set; then + enableval="$enable_sqlite_utf8" +@@ -86781,13 +87759,13 @@ + if test "$PHP_PDO" != "no"; then + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:86785: checking for PDO includes" >&5 ++echo "configure:87763: checking for PDO includes" >&5 + if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + echo $ac_n "checking for PDO includes""... $ac_c" 1>&6 +-echo "configure:86791: checking for PDO includes" >&5 ++echo "configure:87769: checking for PDO includes" >&5 + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then +@@ -86821,7 +87799,7 @@ + SQLITE_DIR=$PHP_SQLITE + else # search default path list + echo $ac_n "checking for sqlite files in default path""... $ac_c" 1>&6 +-echo "configure:86825: checking for sqlite files in default path" >&5 ++echo "configure:87803: checking for sqlite files in default path" >&5 + for i in $SEARCH_PATH ; do + if test -r $i/$SEARCH_FOR; then + SQLITE_DIR=$i +@@ -86933,7 +87911,7 @@ + done + + echo $ac_n "checking for sqlite_open in -lsqlite""... $ac_c" 1>&6 +-echo "configure:86937: checking for sqlite_open in -lsqlite" >&5 ++echo "configure:87915: checking for sqlite_open in -lsqlite" >&5 + ac_lib_var=`echo sqlite'_'sqlite_open | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -86941,7 +87919,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsqlite $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:87934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -87125,7 +88103,7 @@ + # Extract the first word of "lemon", so it can be a program name with args. + set dummy lemon; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:87129: checking for $ac_word" >&5 ++echo "configure:88107: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LEMON'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -87153,7 +88131,7 @@ + + if test "$LEMON"; then + echo $ac_n "checking for lemon version""... $ac_c" 1>&6 +-echo "configure:87157: checking for lemon version" >&5 ++echo "configure:88135: checking for lemon version" >&5 + if eval "test \"`echo '$''{'php_cv_lemon_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -87566,7 +88544,7 @@ + + + echo $ac_n "checking size of char *""... $ac_c" 1>&6 +-echo "configure:87570: checking size of char *" >&5 ++echo "configure:88548: checking size of char *" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -87574,18 +88552,19 @@ + ac_cv_sizeof_char_p=4 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(char *)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:87589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:88568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_char_p=`cat conftestval` + else +@@ -87647,12 +88626,12 @@ + for ac_func in usleep nanosleep + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:87651: checking for $ac_func" >&5 ++echo "configure:88630: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:88658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -87703,17 +88682,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:87707: checking for $ac_hdr" >&5 ++echo "configure:88686: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:87717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:88696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -87744,7 +88723,7 @@ + + + echo $ac_n "checking whether flush should be called explicitly after a buffered io""... $ac_c" 1>&6 +-echo "configure:87748: checking whether flush should be called explicitly after a buffered io" >&5 ++echo "configure:88727: checking whether flush should be called explicitly after a buffered io" >&5 + if eval "test \"`echo '$''{'ac_cv_flush_io'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -87755,7 +88734,7 @@ + + else + cat > conftest.$ac_ext < +@@ -87793,7 +88772,7 @@ + } + + EOF +-if { (eval echo configure:87797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:88776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_flush_io=no +@@ -87821,7 +88800,7 @@ + + if test "$ac_cv_func_crypt" = "no"; then + echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 +-echo "configure:87825: checking for crypt in -lcrypt" >&5 ++echo "configure:88804: checking for crypt in -lcrypt" >&5 + ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -87829,7 +88808,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lcrypt $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:88823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -87869,7 +88848,7 @@ + fi + + echo $ac_n "checking for standard DES crypt""... $ac_c" 1>&6 +-echo "configure:87873: checking for standard DES crypt" >&5 ++echo "configure:88852: checking for standard DES crypt" >&5 + if eval "test \"`echo '$''{'ac_cv_crypt_des'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -87880,7 +88859,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:88882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_crypt_des=yes +@@ -87920,7 +88899,7 @@ + echo "$ac_t""$ac_cv_crypt_des" 1>&6 + + echo $ac_n "checking for extended DES crypt""... $ac_c" 1>&6 +-echo "configure:87924: checking for extended DES crypt" >&5 ++echo "configure:88903: checking for extended DES crypt" >&5 + if eval "test \"`echo '$''{'ac_cv_crypt_ext_des'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -87931,7 +88910,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:88933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_crypt_ext_des=yes +@@ -87971,7 +88950,7 @@ + echo "$ac_t""$ac_cv_crypt_ext_des" 1>&6 + + echo $ac_n "checking for MD5 crypt""... $ac_c" 1>&6 +-echo "configure:87975: checking for MD5 crypt" >&5 ++echo "configure:88954: checking for MD5 crypt" >&5 + if eval "test \"`echo '$''{'ac_cv_crypt_md5'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -87982,7 +88961,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:88993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_crypt_md5=yes +@@ -88031,7 +89010,7 @@ + echo "$ac_t""$ac_cv_crypt_md5" 1>&6 + + echo $ac_n "checking for Blowfish crypt""... $ac_c" 1>&6 +-echo "configure:88035: checking for Blowfish crypt" >&5 ++echo "configure:89014: checking for Blowfish crypt" >&5 + if eval "test \"`echo '$''{'ac_cv_crypt_blowfish'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -88042,7 +89021,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:89050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_crypt_blowfish=yes +@@ -88088,7 +89067,7 @@ + echo "$ac_t""$ac_cv_crypt_blowfish" 1>&6 + + echo $ac_n "checking for SHA512 crypt""... $ac_c" 1>&6 +-echo "configure:88092: checking for SHA512 crypt" >&5 ++echo "configure:89071: checking for SHA512 crypt" >&5 + if eval "test \"`echo '$''{'ac_cv_crypt_SHA512'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -88099,7 +89078,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:89106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_crypt_SHA512=yes +@@ -88144,7 +89123,7 @@ + echo "$ac_t""$ac_cv_crypt_SHA512" 1>&6 + + echo $ac_n "checking for SHA256 crypt""... $ac_c" 1>&6 +-echo "configure:88148: checking for SHA256 crypt" >&5 ++echo "configure:89127: checking for SHA256 crypt" >&5 + if eval "test \"`echo '$''{'ac_cv_crypt_SHA256'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -88155,7 +89134,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:89162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_crypt_SHA256=yes +@@ -88203,13 +89182,13 @@ + if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "x$php_crypt_r" = "x0"; then + + echo $ac_n "checking whether the compiler supports __alignof__""... $ac_c" 1>&6 +-echo "configure:88207: checking whether the compiler supports __alignof__" >&5 ++echo "configure:89186: checking whether the compiler supports __alignof__" >&5 + if eval "test \"`echo '$''{'ac_cv_alignof_exists'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:89202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_alignof_exists=yes +@@ -88244,13 +89223,13 @@ + fi + + echo $ac_n "checking whether the compiler supports aligned attribute""... $ac_c" 1>&6 +-echo "configure:88248: checking whether the compiler supports aligned attribute" >&5 ++echo "configure:89227: checking whether the compiler supports aligned attribute" >&5 + if eval "test \"`echo '$''{'ac_cv_attribute_aligned'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:89243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_attribute_aligned=yes +@@ -88439,12 +89418,12 @@ + for ac_func in getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:88443: checking for $ac_func" >&5 ++echo "configure:89422: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:89450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -88492,7 +89471,7 @@ + done + + echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6 +-echo "configure:88496: checking for working fnmatch" >&5 ++echo "configure:89475: checking for working fnmatch" >&5 + if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -88503,11 +89482,11 @@ + ac_cv_func_fnmatch_works=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:89490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_func_fnmatch_works=yes + else +@@ -88534,12 +89513,12 @@ + for ac_func in fork CreateProcess + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:88538: checking for $ac_func" >&5 ++echo "configure:89517: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:89545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -88592,7 +89571,7 @@ + done + + echo $ac_n "checking if your OS can spawn processes with inherited handles""... $ac_c" 1>&6 +-echo "configure:88596: checking if your OS can spawn processes with inherited handles" >&5 ++echo "configure:89575: checking if your OS can spawn processes with inherited handles" >&5 + if test "$php_can_support_proc_open" = "yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +@@ -88616,12 +89595,12 @@ + unset found + + echo $ac_n "checking for res_nsearch""... $ac_c" 1>&6 +-echo "configure:88620: checking for res_nsearch" >&5 ++echo "configure:89599: checking for res_nsearch" >&5 + if eval "test \"`echo '$''{'ac_cv_func_res_nsearch'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:89627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_res_nsearch=yes" + else +@@ -88662,12 +89641,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __res_nsearch""... $ac_c" 1>&6 +-echo "configure:88666: checking for __res_nsearch" >&5 ++echo "configure:89645: checking for __res_nsearch" >&5 + if eval "test \"`echo '$''{'ac_cv_func___res_nsearch'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:89673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___res_nsearch=yes" + else +@@ -88728,7 +89707,7 @@ + unset ac_cv_lib_resolv___res_nsearch + unset found + echo $ac_n "checking for res_nsearch in -lresolv""... $ac_c" 1>&6 +-echo "configure:88732: checking for res_nsearch in -lresolv" >&5 ++echo "configure:89711: checking for res_nsearch in -lresolv" >&5 + ac_lib_var=`echo resolv'_'res_nsearch | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -88736,7 +89715,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:89730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -88767,7 +89746,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_nsearch in -lresolv""... $ac_c" 1>&6 +-echo "configure:88771: checking for __res_nsearch in -lresolv" >&5 ++echo "configure:89750: checking for __res_nsearch in -lresolv" >&5 + ac_lib_var=`echo resolv'_'__res_nsearch | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -88775,7 +89754,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:89769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -88818,11 +89797,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:89805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -88864,7 +89843,7 @@ + unset ac_cv_lib_bind___res_nsearch + unset found + echo $ac_n "checking for res_nsearch in -lbind""... $ac_c" 1>&6 +-echo "configure:88868: checking for res_nsearch in -lbind" >&5 ++echo "configure:89847: checking for res_nsearch in -lbind" >&5 + ac_lib_var=`echo bind'_'res_nsearch | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -88872,7 +89851,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lbind $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:89866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -88903,7 +89882,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_nsearch in -lbind""... $ac_c" 1>&6 +-echo "configure:88907: checking for __res_nsearch in -lbind" >&5 ++echo "configure:89886: checking for __res_nsearch in -lbind" >&5 + ac_lib_var=`echo bind'_'__res_nsearch | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -88911,7 +89890,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lbind $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:89905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -88954,11 +89933,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:89941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -89000,7 +89979,7 @@ + unset ac_cv_lib_socket___res_nsearch + unset found + echo $ac_n "checking for res_nsearch in -lsocket""... $ac_c" 1>&6 +-echo "configure:89004: checking for res_nsearch in -lsocket" >&5 ++echo "configure:89983: checking for res_nsearch in -lsocket" >&5 + ac_lib_var=`echo socket'_'res_nsearch | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -89008,7 +89987,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -89039,7 +90018,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_nsearch in -lsocket""... $ac_c" 1>&6 +-echo "configure:89043: checking for __res_nsearch in -lsocket" >&5 ++echo "configure:90022: checking for __res_nsearch in -lsocket" >&5 + ac_lib_var=`echo socket'_'__res_nsearch | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -89047,7 +90026,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -89090,11 +90069,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:90077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -89151,12 +90130,12 @@ + unset found + + echo $ac_n "checking for dns_search""... $ac_c" 1>&6 +-echo "configure:89155: checking for dns_search" >&5 ++echo "configure:90134: checking for dns_search" >&5 + if eval "test \"`echo '$''{'ac_cv_func_dns_search'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dns_search=yes" + else +@@ -89197,12 +90176,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __dns_search""... $ac_c" 1>&6 +-echo "configure:89201: checking for __dns_search" >&5 ++echo "configure:90180: checking for __dns_search" >&5 + if eval "test \"`echo '$''{'ac_cv_func___dns_search'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___dns_search=yes" + else +@@ -89263,7 +90242,7 @@ + unset ac_cv_lib_resolv___dns_search + unset found + echo $ac_n "checking for dns_search in -lresolv""... $ac_c" 1>&6 +-echo "configure:89267: checking for dns_search in -lresolv" >&5 ++echo "configure:90246: checking for dns_search in -lresolv" >&5 + ac_lib_var=`echo resolv'_'dns_search | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -89271,7 +90250,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -89302,7 +90281,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dns_search in -lresolv""... $ac_c" 1>&6 +-echo "configure:89306: checking for __dns_search in -lresolv" >&5 ++echo "configure:90285: checking for __dns_search in -lresolv" >&5 + ac_lib_var=`echo resolv'_'__dns_search | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -89310,7 +90289,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -89353,11 +90332,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:90340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -89399,7 +90378,7 @@ + unset ac_cv_lib_bind___dns_search + unset found + echo $ac_n "checking for dns_search in -lbind""... $ac_c" 1>&6 +-echo "configure:89403: checking for dns_search in -lbind" >&5 ++echo "configure:90382: checking for dns_search in -lbind" >&5 + ac_lib_var=`echo bind'_'dns_search | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -89407,7 +90386,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lbind $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -89438,7 +90417,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dns_search in -lbind""... $ac_c" 1>&6 +-echo "configure:89442: checking for __dns_search in -lbind" >&5 ++echo "configure:90421: checking for __dns_search in -lbind" >&5 + ac_lib_var=`echo bind'_'__dns_search | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -89446,7 +90425,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lbind $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -89489,11 +90468,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:90476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -89535,7 +90514,7 @@ + unset ac_cv_lib_socket___dns_search + unset found + echo $ac_n "checking for dns_search in -lsocket""... $ac_c" 1>&6 +-echo "configure:89539: checking for dns_search in -lsocket" >&5 ++echo "configure:90518: checking for dns_search in -lsocket" >&5 + ac_lib_var=`echo socket'_'dns_search | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -89543,7 +90522,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -89574,7 +90553,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dns_search in -lsocket""... $ac_c" 1>&6 +-echo "configure:89578: checking for __dns_search in -lsocket" >&5 ++echo "configure:90557: checking for __dns_search in -lsocket" >&5 + ac_lib_var=`echo socket'_'__dns_search | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -89582,7 +90561,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -89625,11 +90604,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:90612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -89686,12 +90665,12 @@ + unset found + + echo $ac_n "checking for dn_expand""... $ac_c" 1>&6 +-echo "configure:89690: checking for dn_expand" >&5 ++echo "configure:90669: checking for dn_expand" >&5 + if eval "test \"`echo '$''{'ac_cv_func_dn_expand'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dn_expand=yes" + else +@@ -89732,12 +90711,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __dn_expand""... $ac_c" 1>&6 +-echo "configure:89736: checking for __dn_expand" >&5 ++echo "configure:90715: checking for __dn_expand" >&5 + if eval "test \"`echo '$''{'ac_cv_func___dn_expand'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___dn_expand=yes" + else +@@ -89798,7 +90777,7 @@ + unset ac_cv_lib_resolv___dn_expand + unset found + echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 +-echo "configure:89802: checking for dn_expand in -lresolv" >&5 ++echo "configure:90781: checking for dn_expand in -lresolv" >&5 + ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -89806,7 +90785,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -89837,7 +90816,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dn_expand in -lresolv""... $ac_c" 1>&6 +-echo "configure:89841: checking for __dn_expand in -lresolv" >&5 ++echo "configure:90820: checking for __dn_expand in -lresolv" >&5 + ac_lib_var=`echo resolv'_'__dn_expand | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -89845,7 +90824,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -89888,11 +90867,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:90875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -89934,7 +90913,7 @@ + unset ac_cv_lib_bind___dn_expand + unset found + echo $ac_n "checking for dn_expand in -lbind""... $ac_c" 1>&6 +-echo "configure:89938: checking for dn_expand in -lbind" >&5 ++echo "configure:90917: checking for dn_expand in -lbind" >&5 + ac_lib_var=`echo bind'_'dn_expand | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -89942,7 +90921,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lbind $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -89973,7 +90952,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dn_expand in -lbind""... $ac_c" 1>&6 +-echo "configure:89977: checking for __dn_expand in -lbind" >&5 ++echo "configure:90956: checking for __dn_expand in -lbind" >&5 + ac_lib_var=`echo bind'_'__dn_expand | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -89981,7 +90960,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lbind $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:90975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -90024,11 +91003,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:91011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -90070,7 +91049,7 @@ + unset ac_cv_lib_socket___dn_expand + unset found + echo $ac_n "checking for dn_expand in -lsocket""... $ac_c" 1>&6 +-echo "configure:90074: checking for dn_expand in -lsocket" >&5 ++echo "configure:91053: checking for dn_expand in -lsocket" >&5 + ac_lib_var=`echo socket'_'dn_expand | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -90078,7 +91057,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -90109,7 +91088,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dn_expand in -lsocket""... $ac_c" 1>&6 +-echo "configure:90113: checking for __dn_expand in -lsocket" >&5 ++echo "configure:91092: checking for __dn_expand in -lsocket" >&5 + ac_lib_var=`echo socket'_'__dn_expand | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -90117,7 +91096,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -90160,11 +91139,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:91147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -90221,12 +91200,12 @@ + unset found + + echo $ac_n "checking for dn_skipname""... $ac_c" 1>&6 +-echo "configure:90225: checking for dn_skipname" >&5 ++echo "configure:91204: checking for dn_skipname" >&5 + if eval "test \"`echo '$''{'ac_cv_func_dn_skipname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dn_skipname=yes" + else +@@ -90267,12 +91246,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __dn_skipname""... $ac_c" 1>&6 +-echo "configure:90271: checking for __dn_skipname" >&5 ++echo "configure:91250: checking for __dn_skipname" >&5 + if eval "test \"`echo '$''{'ac_cv_func___dn_skipname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___dn_skipname=yes" + else +@@ -90333,7 +91312,7 @@ + unset ac_cv_lib_resolv___dn_skipname + unset found + echo $ac_n "checking for dn_skipname in -lresolv""... $ac_c" 1>&6 +-echo "configure:90337: checking for dn_skipname in -lresolv" >&5 ++echo "configure:91316: checking for dn_skipname in -lresolv" >&5 + ac_lib_var=`echo resolv'_'dn_skipname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -90341,7 +91320,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -90372,7 +91351,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dn_skipname in -lresolv""... $ac_c" 1>&6 +-echo "configure:90376: checking for __dn_skipname in -lresolv" >&5 ++echo "configure:91355: checking for __dn_skipname in -lresolv" >&5 + ac_lib_var=`echo resolv'_'__dn_skipname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -90380,7 +91359,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -90423,11 +91402,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:91410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -90469,7 +91448,7 @@ + unset ac_cv_lib_bind___dn_skipname + unset found + echo $ac_n "checking for dn_skipname in -lbind""... $ac_c" 1>&6 +-echo "configure:90473: checking for dn_skipname in -lbind" >&5 ++echo "configure:91452: checking for dn_skipname in -lbind" >&5 + ac_lib_var=`echo bind'_'dn_skipname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -90477,7 +91456,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lbind $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -90508,7 +91487,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dn_skipname in -lbind""... $ac_c" 1>&6 +-echo "configure:90512: checking for __dn_skipname in -lbind" >&5 ++echo "configure:91491: checking for __dn_skipname in -lbind" >&5 + ac_lib_var=`echo bind'_'__dn_skipname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -90516,7 +91495,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lbind $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -90559,11 +91538,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:91546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -90605,7 +91584,7 @@ + unset ac_cv_lib_socket___dn_skipname + unset found + echo $ac_n "checking for dn_skipname in -lsocket""... $ac_c" 1>&6 +-echo "configure:90609: checking for dn_skipname in -lsocket" >&5 ++echo "configure:91588: checking for dn_skipname in -lsocket" >&5 + ac_lib_var=`echo socket'_'dn_skipname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -90613,7 +91592,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -90644,7 +91623,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __dn_skipname in -lsocket""... $ac_c" 1>&6 +-echo "configure:90648: checking for __dn_skipname in -lsocket" >&5 ++echo "configure:91627: checking for __dn_skipname in -lsocket" >&5 + ac_lib_var=`echo socket'_'__dn_skipname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -90652,7 +91631,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -90695,11 +91674,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:91682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -90758,12 +91737,12 @@ + unset found + + echo $ac_n "checking for res_search""... $ac_c" 1>&6 +-echo "configure:90762: checking for res_search" >&5 ++echo "configure:91741: checking for res_search" >&5 + if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_res_search=yes" + else +@@ -90804,12 +91783,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __res_search""... $ac_c" 1>&6 +-echo "configure:90808: checking for __res_search" >&5 ++echo "configure:91787: checking for __res_search" >&5 + if eval "test \"`echo '$''{'ac_cv_func___res_search'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func___res_search=yes" + else +@@ -90870,7 +91849,7 @@ + unset ac_cv_lib_resolv___res_search + unset found + echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6 +-echo "configure:90874: checking for res_search in -lresolv" >&5 ++echo "configure:91853: checking for res_search in -lresolv" >&5 + ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -90878,7 +91857,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -90909,7 +91888,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_search in -lresolv""... $ac_c" 1>&6 +-echo "configure:90913: checking for __res_search in -lresolv" >&5 ++echo "configure:91892: checking for __res_search in -lresolv" >&5 + ac_lib_var=`echo resolv'_'__res_search | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -90917,7 +91896,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lresolv $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:91911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -90960,11 +91939,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:91947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -91006,7 +91985,7 @@ + unset ac_cv_lib_bind___res_search + unset found + echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6 +-echo "configure:91010: checking for res_search in -lbind" >&5 ++echo "configure:91989: checking for res_search in -lbind" >&5 + ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -91014,7 +91993,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lbind $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:92008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -91045,7 +92024,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6 +-echo "configure:91049: checking for __res_search in -lbind" >&5 ++echo "configure:92028: checking for __res_search in -lbind" >&5 + ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -91053,7 +92032,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lbind $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:92047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -91096,11 +92075,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:92083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -91142,7 +92121,7 @@ + unset ac_cv_lib_socket___res_search + unset found + echo $ac_n "checking for res_search in -lsocket""... $ac_c" 1>&6 +-echo "configure:91146: checking for res_search in -lsocket" >&5 ++echo "configure:92125: checking for res_search in -lsocket" >&5 + ac_lib_var=`echo socket'_'res_search | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -91150,7 +92129,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:92144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -91181,7 +92160,7 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for __res_search in -lsocket""... $ac_c" 1>&6 +-echo "configure:91185: checking for __res_search in -lsocket" >&5 ++echo "configure:92164: checking for __res_search in -lsocket" >&5 + ac_lib_var=`echo socket'_'__res_search | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -91189,7 +92168,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:92183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -91232,11 +92211,11 @@ + found=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:92219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + found=yes + else +@@ -91289,7 +92268,7 @@ + + + echo $ac_n "checking whether atof() accepts NAN""... $ac_c" 1>&6 +-echo "configure:91293: checking whether atof() accepts NAN" >&5 ++echo "configure:92272: checking whether atof() accepts NAN" >&5 + if eval "test \"`echo '$''{'ac_cv_atof_accept_nan'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -91300,7 +92279,7 @@ + + else + cat > conftest.$ac_ext < +@@ -91320,7 +92299,7 @@ + } + + EOF +-if { (eval echo configure:91324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:92303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_atof_accept_nan=yes +@@ -91347,7 +92326,7 @@ + fi + + echo $ac_n "checking whether atof() accepts INF""... $ac_c" 1>&6 +-echo "configure:91351: checking whether atof() accepts INF" >&5 ++echo "configure:92330: checking whether atof() accepts INF" >&5 + if eval "test \"`echo '$''{'ac_cv_atof_accept_inf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -91358,7 +92337,7 @@ + + else + cat > conftest.$ac_ext < +@@ -91381,7 +92360,7 @@ + } + + EOF +-if { (eval echo configure:91385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:92364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_atof_accept_inf=yes +@@ -91408,7 +92387,7 @@ + fi + + echo $ac_n "checking whether HUGE_VAL == INF""... $ac_c" 1>&6 +-echo "configure:91412: checking whether HUGE_VAL == INF" >&5 ++echo "configure:92391: checking whether HUGE_VAL == INF" >&5 + if eval "test \"`echo '$''{'ac_cv_huge_val_inf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -91419,7 +92398,7 @@ + + else + cat > conftest.$ac_ext < +@@ -91442,7 +92421,7 @@ + } + + EOF +-if { (eval echo configure:91446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:92425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_huge_val_inf=yes +@@ -91469,7 +92448,7 @@ + fi + + echo $ac_n "checking whether HUGE_VAL + -HUGEVAL == NAN""... $ac_c" 1>&6 +-echo "configure:91473: checking whether HUGE_VAL + -HUGEVAL == NAN" >&5 ++echo "configure:92452: checking whether HUGE_VAL + -HUGEVAL == NAN" >&5 + if eval "test \"`echo '$''{'ac_cv_huge_val_nan'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -91480,7 +92459,7 @@ + + else + cat > conftest.$ac_ext < +@@ -91505,7 +92484,7 @@ + } + + EOF +-if { (eval echo configure:91509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:92488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_huge_val_nan=yes +@@ -91532,13 +92511,13 @@ + fi + + echo $ac_n "checking whether strptime() declaration fails""... $ac_c" 1>&6 +-echo "configure:91536: checking whether strptime() declaration fails" >&5 ++echo "configure:92515: checking whether strptime() declaration fails" >&5 + if eval "test \"`echo '$''{'ac_cv_strptime_decl_fails'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < +@@ -91554,7 +92533,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:91558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:92537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_strptime_decl_fails=no +@@ -91582,17 +92561,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:91586: checking for $ac_hdr" >&5 ++echo "configure:92565: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:91596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:92575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -91621,12 +92600,12 @@ + for ac_func in mblen + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:91625: checking for $ac_func" >&5 ++echo "configure:92604: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:92632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -91676,12 +92655,12 @@ + for ac_func in mbrlen mbsinit + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:91680: checking for $ac_func" >&5 ++echo "configure:92659: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:92687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -91729,13 +92708,13 @@ + done + + echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6 +-echo "configure:91733: checking for mbstate_t" >&5 ++echo "configure:92712: checking for mbstate_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_mbstate_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:92731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_type_mbstate_t=yes +@@ -91776,17 +92755,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:91780: checking for $ac_hdr" >&5 ++echo "configure:92759: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:91790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:92769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -92176,7 +93155,7 @@ + php_with_sybase_ct=no + + echo $ac_n "checking for Sybase-CT support""... $ac_c" 1>&6 +-echo "configure:92180: checking for Sybase-CT support" >&5 ++echo "configure:93159: checking for Sybase-CT support" >&5 + # Check whether --with-sybase-ct or --without-sybase-ct was given. + if test "${with_sybase_ct+set}" = set; then + withval="$with_sybase_ct" +@@ -92828,7 +93807,7 @@ + done + + echo $ac_n "checking for netg_errstr in -lsybtcl64""... $ac_c" 1>&6 +-echo "configure:92832: checking for netg_errstr in -lsybtcl64" >&5 ++echo "configure:93811: checking for netg_errstr in -lsybtcl64" >&5 + ac_lib_var=`echo sybtcl64'_'netg_errstr | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -92836,7 +93815,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsybtcl64 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:93830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -93022,7 +94001,7 @@ + done + + echo $ac_n "checking for insck__getVdate in -linsck64""... $ac_c" 1>&6 +-echo "configure:93026: checking for insck__getVdate in -linsck64" >&5 ++echo "configure:94005: checking for insck__getVdate in -linsck64" >&5 + ac_lib_var=`echo insck64'_'insck__getVdate | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -93030,7 +94009,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-linsck64 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:94024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -93189,7 +94168,7 @@ + done + + echo $ac_n "checking for bsd_tcp in -linsck64""... $ac_c" 1>&6 +-echo "configure:93193: checking for bsd_tcp in -linsck64" >&5 ++echo "configure:94172: checking for bsd_tcp in -linsck64" >&5 + ac_lib_var=`echo insck64'_'bsd_tcp | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -93197,7 +94176,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-linsck64 $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:94191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -93454,7 +94433,7 @@ + done + + echo $ac_n "checking for netg_errstr in -lsybtcl""... $ac_c" 1>&6 +-echo "configure:93458: checking for netg_errstr in -lsybtcl" >&5 ++echo "configure:94437: checking for netg_errstr in -lsybtcl" >&5 + ac_lib_var=`echo sybtcl'_'netg_errstr | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -93462,7 +94441,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsybtcl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:94456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -93648,7 +94627,7 @@ + done + + echo $ac_n "checking for insck__getVdate in -linsck""... $ac_c" 1>&6 +-echo "configure:93652: checking for insck__getVdate in -linsck" >&5 ++echo "configure:94631: checking for insck__getVdate in -linsck" >&5 + ac_lib_var=`echo insck'_'insck__getVdate | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -93656,7 +94635,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-linsck $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:94650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -93815,7 +94794,7 @@ + done + + echo $ac_n "checking for bsd_tcp in -linsck""... $ac_c" 1>&6 +-echo "configure:93819: checking for bsd_tcp in -linsck" >&5 ++echo "configure:94798: checking for bsd_tcp in -linsck" >&5 + ac_lib_var=`echo insck'_'bsd_tcp | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -93823,7 +94802,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-linsck $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:94817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -94080,7 +95059,7 @@ + done + + echo $ac_n "checking for netg_errstr in -ltcl""... $ac_c" 1>&6 +-echo "configure:94084: checking for netg_errstr in -ltcl" >&5 ++echo "configure:95063: checking for netg_errstr in -ltcl" >&5 + ac_lib_var=`echo tcl'_'netg_errstr | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -94088,7 +95067,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ltcl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:95082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -94274,7 +95253,7 @@ + done + + echo $ac_n "checking for insck__getVdate in -linsck""... $ac_c" 1>&6 +-echo "configure:94278: checking for insck__getVdate in -linsck" >&5 ++echo "configure:95257: checking for insck__getVdate in -linsck" >&5 + ac_lib_var=`echo insck'_'insck__getVdate | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -94282,7 +95261,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-linsck $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:95276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -94441,7 +95420,7 @@ + done + + echo $ac_n "checking for bsd_tcp in -linsck""... $ac_c" 1>&6 +-echo "configure:94445: checking for bsd_tcp in -linsck" >&5 ++echo "configure:95424: checking for bsd_tcp in -linsck" >&5 + ac_lib_var=`echo insck'_'bsd_tcp | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -94449,7 +95428,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-linsck $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:95443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -94520,7 +95499,7 @@ + php_enable_sysvmsg=no + + echo $ac_n "checking whether to enable System V IPC support""... $ac_c" 1>&6 +-echo "configure:94524: checking whether to enable System V IPC support" >&5 ++echo "configure:95503: checking whether to enable System V IPC support" >&5 + # Check whether --enable-sysvmsg or --disable-sysvmsg was given. + if test "${enable_sysvmsg+set}" = set; then + enableval="$enable_sysvmsg" +@@ -94563,17 +95542,17 @@ + if test "$PHP_SYSVMSG" != "no"; then + ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6 +-echo "configure:94567: checking for sys/msg.h" >&5 ++echo "configure:95546: checking for sys/msg.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:94577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:95556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -94900,7 +95879,7 @@ + php_enable_sysvsem=no + + echo $ac_n "checking whether to enable System V semaphore support""... $ac_c" 1>&6 +-echo "configure:94904: checking whether to enable System V semaphore support" >&5 ++echo "configure:95883: checking whether to enable System V semaphore support" >&5 + # Check whether --enable-sysvsem or --disable-sysvsem was given. + if test "${enable_sysvsem+set}" = set; then + enableval="$enable_sysvsem" +@@ -95238,12 +96217,12 @@ + EOF + + echo $ac_n "checking for union semun""... $ac_c" 1>&6 +-echo "configure:95242: checking for union semun" >&5 ++echo "configure:96221: checking for union semun" >&5 + if eval "test \"`echo '$''{'php_cv_semun'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < +@@ -95254,7 +96233,7 @@ + union semun x; + ; return 0; } + EOF +-if { (eval echo configure:95258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:96237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + php_cv_semun=yes +@@ -95290,7 +96269,7 @@ + php_enable_sysvshm=no + + echo $ac_n "checking whether to enable System V shared memory support""... $ac_c" 1>&6 +-echo "configure:95294: checking whether to enable System V shared memory support" >&5 ++echo "configure:96273: checking whether to enable System V shared memory support" >&5 + # Check whether --enable-sysvshm or --disable-sysvshm was given. + if test "${enable_sysvshm+set}" = set; then + enableval="$enable_sysvshm" +@@ -95634,7 +96613,7 @@ + php_with_tidy=no + + echo $ac_n "checking for TIDY support""... $ac_c" 1>&6 +-echo "configure:95638: checking for TIDY support" >&5 ++echo "configure:96617: checking for TIDY support" >&5 + # Check whether --with-tidy or --without-tidy was given. + if test "${with_tidy+set}" = set; then + withval="$with_tidy" +@@ -95923,7 +96902,7 @@ + done + + echo $ac_n "checking for tidyOptGetDoc in -ltidy""... $ac_c" 1>&6 +-echo "configure:95927: checking for tidyOptGetDoc in -ltidy" >&5 ++echo "configure:96906: checking for tidyOptGetDoc in -ltidy" >&5 + ac_lib_var=`echo tidy'_'tidyOptGetDoc | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -95931,7 +96910,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ltidy $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:96925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -96286,7 +97265,7 @@ + php_enable_tokenizer=yes + + echo $ac_n "checking whether to enable tokenizer support""... $ac_c" 1>&6 +-echo "configure:96290: checking whether to enable tokenizer support" >&5 ++echo "configure:97269: checking whether to enable tokenizer support" >&5 + # Check whether --enable-tokenizer or --disable-tokenizer was given. + if test "${enable_tokenizer+set}" = set; then + enableval="$enable_tokenizer" +@@ -96632,7 +97611,7 @@ + php_enable_wddx=no + + echo $ac_n "checking whether to enable WDDX support""... $ac_c" 1>&6 +-echo "configure:96636: checking whether to enable WDDX support" >&5 ++echo "configure:97615: checking whether to enable WDDX support" >&5 + # Check whether --enable-wddx or --disable-wddx was given. + if test "${enable_wddx+set}" = set; then + enableval="$enable_wddx" +@@ -96677,7 +97656,7 @@ + php_with_libxml_dir=no + + echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +-echo "configure:96681: checking libxml2 install dir" >&5 ++echo "configure:97660: checking libxml2 install dir" >&5 + # Check whether --with-libxml-dir or --without-libxml-dir was given. + if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" +@@ -96701,7 +97680,7 @@ + php_with_libexpat_dir=no + + echo $ac_n "checking libexpat dir for WDDX""... $ac_c" 1>&6 +-echo "configure:96705: checking libexpat dir for WDDX" >&5 ++echo "configure:97684: checking libexpat dir for WDDX" >&5 + # Check whether --with-libexpat-dir or --without-libexpat-dir was given. + if test "${with_libexpat_dir+set}" = set; then + withval="$with_libexpat_dir" +@@ -96729,7 +97708,7 @@ + + + echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +-echo "configure:96733: checking for xml2-config path" >&5 ++echo "configure:97712: checking for xml2-config path" >&5 + if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -96887,7 +97866,7 @@ + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +-echo "configure:96891: checking whether libxml build works" >&5 ++echo "configure:97870: checking whether libxml build works" >&5 + if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -96903,7 +97882,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:97897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -97481,7 +98460,7 @@ + php_enable_xml=yes + + echo $ac_n "checking whether to enable XML support""... $ac_c" 1>&6 +-echo "configure:97485: checking whether to enable XML support" >&5 ++echo "configure:98464: checking whether to enable XML support" >&5 + # Check whether --enable-xml or --disable-xml was given. + if test "${enable_xml+set}" = set; then + enableval="$enable_xml" +@@ -97526,7 +98505,7 @@ + php_with_libxml_dir=no + + echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +-echo "configure:97530: checking libxml2 install dir" >&5 ++echo "configure:98509: checking libxml2 install dir" >&5 + # Check whether --with-libxml-dir or --without-libxml-dir was given. + if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" +@@ -97550,7 +98529,7 @@ + php_with_libexpat_dir=no + + echo $ac_n "checking libexpat install dir""... $ac_c" 1>&6 +-echo "configure:97554: checking libexpat install dir" >&5 ++echo "configure:98533: checking libexpat install dir" >&5 + # Check whether --with-libexpat-dir or --without-libexpat-dir was given. + if test "${with_libexpat_dir+set}" = set; then + withval="$with_libexpat_dir" +@@ -97579,7 +98558,7 @@ + + + echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +-echo "configure:97583: checking for xml2-config path" >&5 ++echo "configure:98562: checking for xml2-config path" >&5 + if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -97737,7 +98716,7 @@ + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +-echo "configure:97741: checking whether libxml build works" >&5 ++echo "configure:98720: checking whether libxml build works" >&5 + if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -97753,7 +98732,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:98747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -98300,7 +99279,7 @@ + php_enable_xmlreader=yes + + echo $ac_n "checking whether to enable XMLReader support""... $ac_c" 1>&6 +-echo "configure:98304: checking whether to enable XMLReader support" >&5 ++echo "configure:99283: checking whether to enable XMLReader support" >&5 + # Check whether --enable-xmlreader or --disable-xmlreader was given. + if test "${enable_xmlreader+set}" = set; then + enableval="$enable_xmlreader" +@@ -98345,7 +99324,7 @@ + php_with_libxml_dir=no + + echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +-echo "configure:98349: checking libxml2 install dir" >&5 ++echo "configure:99328: checking libxml2 install dir" >&5 + # Check whether --with-libxml-dir or --without-libxml-dir was given. + if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" +@@ -98373,7 +99352,7 @@ + + + echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +-echo "configure:98377: checking for xml2-config path" >&5 ++echo "configure:99356: checking for xml2-config path" >&5 + if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -98531,7 +99510,7 @@ + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +-echo "configure:98535: checking whether libxml build works" >&5 ++echo "configure:99514: checking whether libxml build works" >&5 + if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -98547,7 +99526,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:99541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -98940,7 +99919,7 @@ + php_with_xmlrpc=no + + echo $ac_n "checking for XMLRPC-EPI support""... $ac_c" 1>&6 +-echo "configure:98944: checking for XMLRPC-EPI support" >&5 ++echo "configure:99923: checking for XMLRPC-EPI support" >&5 + # Check whether --with-xmlrpc or --without-xmlrpc was given. + if test "${with_xmlrpc+set}" = set; then + withval="$with_xmlrpc" +@@ -98985,7 +99964,7 @@ + php_with_libxml_dir=no + + echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +-echo "configure:98989: checking libxml2 install dir" >&5 ++echo "configure:99968: checking libxml2 install dir" >&5 + # Check whether --with-libxml-dir or --without-libxml-dir was given. + if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" +@@ -99009,7 +99988,7 @@ + php_with_libexpat_dir=no + + echo $ac_n "checking libexpat dir for XMLRPC-EPI""... $ac_c" 1>&6 +-echo "configure:99013: checking libexpat dir for XMLRPC-EPI" >&5 ++echo "configure:99992: checking libexpat dir for XMLRPC-EPI" >&5 + # Check whether --with-libexpat-dir or --without-libexpat-dir was given. + if test "${with_libexpat_dir+set}" = set; then + withval="$with_libexpat_dir" +@@ -99032,7 +100011,7 @@ + php_with_iconv_dir=no + + echo $ac_n "checking iconv dir for XMLRPC-EPI""... $ac_c" 1>&6 +-echo "configure:99036: checking iconv dir for XMLRPC-EPI" >&5 ++echo "configure:100015: checking iconv dir for XMLRPC-EPI" >&5 + # Check whether --with-iconv-dir or --without-iconv-dir was given. + if test "${with_iconv_dir+set}" = set; then + withval="$with_iconv_dir" +@@ -99088,7 +100067,7 @@ + + + echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +-echo "configure:99092: checking for xml2-config path" >&5 ++echo "configure:100071: checking for xml2-config path" >&5 + if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -99246,7 +100225,7 @@ + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +-echo "configure:99250: checking whether libxml build works" >&5 ++echo "configure:100229: checking whether libxml build works" >&5 + if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -99262,7 +100241,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:100256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -99542,12 +100521,12 @@ + + if test "$PHP_ICONV" = "yes"; then + echo $ac_n "checking for iconv""... $ac_c" 1>&6 +-echo "configure:99546: checking for iconv" >&5 ++echo "configure:100525: checking for iconv" >&5 + if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:100553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_iconv=yes" + else +@@ -99591,12 +100570,12 @@ + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for libiconv""... $ac_c" 1>&6 +-echo "configure:99595: checking for libiconv" >&5 ++echo "configure:100574: checking for libiconv" >&5 + if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:100602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_libiconv=yes" + else +@@ -99775,7 +100754,7 @@ + done + + echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6 +-echo "configure:99779: checking for libiconv in -l$iconv_lib_name" >&5 ++echo "configure:100758: checking for libiconv in -l$iconv_lib_name" >&5 + ac_lib_var=`echo $iconv_lib_name'_'libiconv | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -99783,7 +100762,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$iconv_lib_name $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:100777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -99935,7 +100914,7 @@ + done + + echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6 +-echo "configure:99939: checking for iconv in -l$iconv_lib_name" >&5 ++echo "configure:100918: checking for iconv in -l$iconv_lib_name" >&5 + ac_lib_var=`echo $iconv_lib_name'_'iconv | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -99943,7 +100922,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$iconv_lib_name $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:100937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -100144,7 +101123,7 @@ + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:100148: checking for $ac_word" >&5 ++echo "configure:101127: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -100172,21 +101151,21 @@ + fi + + echo $ac_n "checking for inline""... $ac_c" 1>&6 +-echo "configure:100176: checking for inline" >&5 ++echo "configure:101155: checking for inline" >&5 + if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_cv_c_inline=no + for ac_kw in inline __inline__ __inline; do + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:101169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break + else +@@ -100224,12 +101203,12 @@ + + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +-echo "configure:100228: checking for ANSI C header files" >&5 ++echo "configure:101207: checking for ANSI C header files" >&5 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -100237,7 +101216,7 @@ + #include + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:100241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:101220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -100254,7 +101233,7 @@ + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -100272,7 +101251,7 @@ + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -100293,7 +101272,7 @@ + : + else + cat > conftest.$ac_ext < + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +@@ -100304,7 +101283,7 @@ + exit (0); } + + EOF +-if { (eval echo configure:100308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:101287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else +@@ -100331,17 +101310,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:100335: checking for $ac_hdr" >&5 ++echo "configure:101314: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:100345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:101324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -100373,7 +101352,7 @@ + + + echo $ac_n "checking size of char""... $ac_c" 1>&6 +-echo "configure:100377: checking size of char" >&5 ++echo "configure:101356: checking size of char" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -100381,18 +101360,19 @@ + ac_cv_sizeof_char=1 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(char)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:100396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:101376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_char=`cat conftestval` + else +@@ -100413,7 +101393,7 @@ + + + echo $ac_n "checking size of int""... $ac_c" 1>&6 +-echo "configure:100417: checking size of int" >&5 ++echo "configure:101397: checking size of int" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -100421,18 +101401,19 @@ + ac_cv_sizeof_int=4 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(int)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:100436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:101417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_int=`cat conftestval` + else +@@ -100452,7 +101433,7 @@ + + + echo $ac_n "checking size of long""... $ac_c" 1>&6 +-echo "configure:100456: checking size of long" >&5 ++echo "configure:101437: checking size of long" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -100460,18 +101441,19 @@ + ac_cv_sizeof_long=4 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:100475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:101457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_long=`cat conftestval` + else +@@ -100491,7 +101473,7 @@ + + + echo $ac_n "checking size of long long""... $ac_c" 1>&6 +-echo "configure:100495: checking size of long long" >&5 ++echo "configure:101477: checking size of long long" >&5 + if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -100499,18 +101481,19 @@ + ac_cv_sizeof_long_long=8 + else + cat > conftest.$ac_ext < +-int main() ++#include ++main() + { + FILE *f=fopen("conftestval", "w"); +- if (!f) return(1); ++ if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long long)); +- return(0); ++ exit(0); + } + EOF +-if { (eval echo configure:100514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:101497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_sizeof_long_long=`cat conftestval` + else +@@ -100530,12 +101513,12 @@ + + + echo $ac_n "checking for size_t""... $ac_c" 1>&6 +-echo "configure:100534: checking for size_t" >&5 ++echo "configure:101517: checking for size_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -100563,12 +101546,12 @@ + fi + + echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +-echo "configure:100567: checking whether time.h and sys/time.h may both be included" >&5 ++echo "configure:101550: checking whether time.h and sys/time.h may both be included" >&5 + if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -100577,7 +101560,7 @@ + struct tm *tp; + ; return 0; } + EOF +-if { (eval echo configure:100581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:101564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes + else +@@ -100598,12 +101581,12 @@ + fi + + echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +-echo "configure:100602: checking for uid_t in sys/types.h" >&5 ++echo "configure:101585: checking for uid_t in sys/types.h" >&5 + if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF +@@ -100643,12 +101626,12 @@ + memcpy memmove + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:100647: checking for $ac_func" >&5 ++echo "configure:101630: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:101658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -101025,7 +102008,7 @@ + XMLRPC_DIR=$PHP_XMLRPC/include/xmlrpc-epi + else + echo $ac_n "checking for XMLRPC-EPI in default path""... $ac_c" 1>&6 +-echo "configure:101029: checking for XMLRPC-EPI in default path" >&5 ++echo "configure:102012: checking for XMLRPC-EPI in default path" >&5 + for i in /usr/local /usr; do + if test -r $i/include/xmlrpc.h; then + XMLRPC_DIR=$i/include +@@ -101468,7 +102451,7 @@ + php_enable_xmlwriter=yes + + echo $ac_n "checking whether to enable XMLWriter support""... $ac_c" 1>&6 +-echo "configure:101472: checking whether to enable XMLWriter support" >&5 ++echo "configure:102455: checking whether to enable XMLWriter support" >&5 + # Check whether --enable-xmlwriter or --disable-xmlwriter was given. + if test "${enable_xmlwriter+set}" = set; then + enableval="$enable_xmlwriter" +@@ -101513,7 +102496,7 @@ + php_with_libxml_dir=no + + echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6 +-echo "configure:101517: checking libxml2 install dir" >&5 ++echo "configure:102500: checking libxml2 install dir" >&5 + # Check whether --with-libxml-dir or --without-libxml-dir was given. + if test "${with_libxml_dir+set}" = set; then + withval="$with_libxml_dir" +@@ -101541,7 +102524,7 @@ + + + echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6 +-echo "configure:101545: checking for xml2-config path" >&5 ++echo "configure:102528: checking for xml2-config path" >&5 + if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -101699,7 +102682,7 @@ + + + echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6 +-echo "configure:101703: checking whether libxml build works" >&5 ++echo "configure:102686: checking whether libxml build works" >&5 + if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -101715,7 +102698,7 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:102713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBS=$old_LIBS +@@ -102076,7 +103059,7 @@ + php_with_xsl=no + + echo $ac_n "checking for XSL support""... $ac_c" 1>&6 +-echo "configure:102080: checking for XSL support" >&5 ++echo "configure:103063: checking for XSL support" >&5 + # Check whether --with-xsl or --without-xsl was given. + if test "${with_xsl+set}" = set; then + withval="$with_xsl" +@@ -102276,7 +103259,7 @@ + + + echo $ac_n "checking for EXSLT support""... $ac_c" 1>&6 +-echo "configure:102280: checking for EXSLT support" >&5 ++echo "configure:103263: checking for EXSLT support" >&5 + for i in $PHP_XSL /usr/local /usr; do + if test -r "$i/include/libexslt/exslt.h"; then + PHP_XSL_EXSL_DIR=$i +@@ -102752,7 +103735,7 @@ + php_enable_zip=no + + echo $ac_n "checking for zip archive read/writesupport""... $ac_c" 1>&6 +-echo "configure:102756: checking for zip archive read/writesupport" >&5 ++echo "configure:103739: checking for zip archive read/writesupport" >&5 + # Check whether --enable-zip or --disable-zip was given. + if test "${enable_zip+set}" = set; then + enableval="$enable_zip" +@@ -102797,7 +103780,7 @@ + php_with_zlib_dir=no + + echo $ac_n "checking for the location of libz""... $ac_c" 1>&6 +-echo "configure:102801: checking for the location of libz" >&5 ++echo "configure:103784: checking for the location of libz" >&5 + # Check whether --with-zlib-dir or --without-zlib-dir was given. + if test "${with_zlib_dir+set}" = set; then + withval="$with_zlib_dir" +@@ -102821,7 +103804,7 @@ + php_with_pcre_dir=no + + echo $ac_n "checking pcre install prefix""... $ac_c" 1>&6 +-echo "configure:102825: checking pcre install prefix" >&5 ++echo "configure:103808: checking pcre install prefix" >&5 + # Check whether --with-pcre-dir or --without-pcre-dir was given. + if test "${with_pcre_dir+set}" = set; then + withval="$with_pcre_dir" +@@ -102865,7 +103848,7 @@ + fi + + echo $ac_n "checking for the location of zlib""... $ac_c" 1>&6 +-echo "configure:102869: checking for the location of zlib" >&5 ++echo "configure:103852: checking for the location of zlib" >&5 + if test "$PHP_ZLIB_DIR" = "no"; then + { echo "configure: error: zip support requires ZLIB. Use --with-zlib-dir= to specify prefix where ZLIB include and library are located" 1>&2; exit 1; } + else +@@ -103003,7 +103986,7 @@ + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=$INCLUDES + cat > conftest.$ac_ext < +@@ -103022,7 +104005,7 @@ + rm -rf conftest* + + cat > conftest.$ac_ext < +@@ -103390,7 +104373,7 @@ + php_enable_disable_mysqlnd_compression_support=yes + + echo $ac_n "checking whether to disable compressed protocol support in mysqlnd""... $ac_c" 1>&6 +-echo "configure:103394: checking whether to disable compressed protocol support in mysqlnd" >&5 ++echo "configure:104377: checking whether to disable compressed protocol support in mysqlnd" >&5 + # Check whether --enable-disable_mysqlnd_compression_support or --disable-disable_mysqlnd_compression_support was given. + if test "${enable_disable_mysqlnd_compression_support+set}" = set; then + enableval="$enable_disable_mysqlnd_compression_support" +@@ -103435,7 +104418,7 @@ + php_with_zlib_dir=no + + echo $ac_n "checking for the location of libz""... $ac_c" 1>&6 +-echo "configure:103439: checking for the location of libz" >&5 ++echo "configure:104422: checking for the location of libz" >&5 + # Check whether --with-zlib-dir or --without-zlib-dir was given. + if test "${with_zlib_dir+set}" = set; then + withval="$with_zlib_dir" +@@ -103901,7 +104884,7 @@ + + for php_typename in int8 uint8 int16 uint16 int32 uint32 uchar ulong int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t; do + echo $ac_n "checking whether $php_typename exists""... $ac_c" 1>&6 +-echo "configure:103905: checking whether $php_typename exists" >&5 ++echo "configure:104888: checking whether $php_typename exists" >&5 + + php_cache_value=php_cv_sizeof_$php_typename + if eval "test \"`echo '$''{'php_cv_sizeof_$php_typename'+set}'`\" = set"; then +@@ -103918,7 +104901,7 @@ + + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -103948,7 +104931,7 @@ + } + + EOF +-if { (eval echo configure:103952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:104935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + eval $php_cache_value=`cat conftestval` +@@ -104088,7 +105071,7 @@ + done + + echo $ac_n "checking for hash_insert in -l$MYSQL_LIBNAME""... $ac_c" 1>&6 +-echo "configure:104092: checking for hash_insert in -l$MYSQL_LIBNAME" >&5 ++echo "configure:105075: checking for hash_insert in -l$MYSQL_LIBNAME" >&5 + ac_lib_var=`echo $MYSQL_LIBNAME'_'hash_insert | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -104096,7 +105079,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-l$MYSQL_LIBNAME $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:105094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -104209,7 +105192,7 @@ + php_with_pear=DEFAULT + + echo $ac_n "checking whether to install PEAR""... $ac_c" 1>&6 +-echo "configure:104213: checking whether to install PEAR" >&5 ++echo "configure:105196: checking whether to install PEAR" >&5 + # Check whether --with-pear or --without-pear was given. + if test "${with_pear+set}" = set; then + withval="$with_pear" +@@ -104311,7 +105294,7 @@ + bison_version=none + if test "$YACC"; then + echo $ac_n "checking for bison version""... $ac_c" 1>&6 +-echo "configure:104315: checking for bison version" >&5 ++echo "configure:105298: checking for bison version" >&5 + if eval "test \"`echo '$''{'php_cv_bison_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -104367,17 +105350,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:104371: checking for $ac_hdr" >&5 ++echo "configure:105354: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:104381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:105364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -104405,12 +105388,12 @@ + + + echo $ac_n "checking for size_t""... $ac_c" 1>&6 +-echo "configure:104409: checking for size_t" >&5 ++echo "configure:105392: checking for size_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -104438,12 +105421,12 @@ + fi + + echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +-echo "configure:104442: checking return type of signal handlers" >&5 ++echo "configure:105425: checking return type of signal handlers" >&5 + if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -104460,7 +105443,7 @@ + int i; + ; return 0; } + EOF +-if { (eval echo configure:104464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:105447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void + else +@@ -104484,12 +105467,12 @@ + + + echo $ac_n "checking for uint""... $ac_c" 1>&6 +-echo "configure:104488: checking for uint" >&5 ++echo "configure:105471: checking for uint" >&5 + if eval "test \"`echo '$''{'ac_cv_type_uint'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -104517,12 +105500,12 @@ + fi + + echo $ac_n "checking for ulong""... $ac_c" 1>&6 +-echo "configure:104521: checking for ulong" >&5 ++echo "configure:105504: checking for ulong" >&5 + if eval "test \"`echo '$''{'ac_cv_type_ulong'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -104552,9 +105535,9 @@ + + + echo $ac_n "checking for int32_t""... $ac_c" 1>&6 +-echo "configure:104556: checking for int32_t" >&5 ++echo "configure:105539: checking for int32_t" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:105560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + cat >> confdefs.h <&6 +-echo "configure:104596: checking for uint32_t" >&5 ++echo "configure:105579: checking for uint32_t" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:105600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + cat >> confdefs.h <&6 +-echo "configure:104636: checking for vprintf" >&5 ++echo "configure:105619: checking for vprintf" >&5 + if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:105647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vprintf=yes" + else +@@ -104684,12 +105667,12 @@ + + if test "$ac_cv_func_vprintf" != yes; then + echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +-echo "configure:104688: checking for _doprnt" >&5 ++echo "configure:105671: checking for _doprnt" >&5 + if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:105699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__doprnt=yes" + else +@@ -104737,7 +105720,7 @@ + fi + + echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 +-echo "configure:104741: checking for 8-bit clean memcmp" >&5 ++echo "configure:105724: checking for 8-bit clean memcmp" >&5 + if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -104745,7 +105728,7 @@ + ac_cv_func_memcmp_clean=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:105742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_func_memcmp_clean=yes + else +@@ -104775,19 +105758,19 @@ + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! + echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 +-echo "configure:104779: checking for working alloca.h" >&5 ++echo "configure:105762: checking for working alloca.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int main() { + char *p = alloca(2 * sizeof(int)); + ; return 0; } + EOF +-if { (eval echo configure:104791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:105774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_header_alloca_h=yes + else +@@ -104808,12 +105791,12 @@ + fi + + echo $ac_n "checking for alloca""... $ac_c" 1>&6 +-echo "configure:104812: checking for alloca" >&5 ++echo "configure:105795: checking for alloca" >&5 + if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:105828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_alloca_works=yes + else +@@ -104873,12 +105856,12 @@ + + + echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +-echo "configure:104877: checking whether alloca needs Cray hooks" >&5 ++echo "configure:105860: checking whether alloca needs Cray hooks" >&5 + if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +-echo "configure:104907: checking for $ac_func" >&5 ++echo "configure:105890: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:105918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -104958,7 +105941,7 @@ + fi + + echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +-echo "configure:104962: checking stack direction for C alloca" >&5 ++echo "configure:105945: checking stack direction for C alloca" >&5 + if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -104966,7 +105949,7 @@ + ac_cv_c_stack_direction=0 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:105972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_c_stack_direction=1 + else +@@ -105009,12 +105992,12 @@ + for ac_func in memcpy strdup getpid kill strtod strtol finite fpclass sigsetjmp + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:105013: checking for $ac_func" >&5 ++echo "configure:105996: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:106024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -105063,7 +106046,7 @@ + + + echo $ac_n "checking whether sprintf is broken""... $ac_c" 1>&6 +-echo "configure:105067: checking whether sprintf is broken" >&5 ++echo "configure:106050: checking whether sprintf is broken" >&5 + if eval "test \"`echo '$''{'ac_cv_broken_sprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -105074,11 +106057,11 @@ + + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:106065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + ac_cv_broken_sprintf=no +@@ -105112,12 +106095,12 @@ + for ac_func in finite isfinite isinf isnan + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:105116: checking for $ac_func" >&5 ++echo "configure:106099: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:106127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -105167,13 +106150,13 @@ + + + echo $ac_n "checking whether fp_except is defined""... $ac_c" 1>&6 +-echo "configure:105171: checking whether fp_except is defined" >&5 ++echo "configure:106154: checking whether fp_except is defined" >&5 + if eval "test \"`echo '$''{'ac_cv_type_fp_except'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + cat > conftest.$ac_ext < +@@ -105184,7 +106167,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:105188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:106171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + ac_cv_type_fp_except=yes +@@ -105211,9 +106194,9 @@ + + + echo $ac_n "checking for usable _FPU_SETCW""... $ac_c" 1>&6 +-echo "configure:105215: checking for usable _FPU_SETCW" >&5 ++echo "configure:106198: checking for usable _FPU_SETCW" >&5 + cat > conftest.$ac_ext < +@@ -105233,7 +106216,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:105237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:106220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cfp_have__fpu_setcw=yes + else +@@ -105254,9 +106237,9 @@ + fi + + echo $ac_n "checking for usable fpsetprec""... $ac_c" 1>&6 +-echo "configure:105258: checking for usable fpsetprec" >&5 ++echo "configure:106241: checking for usable fpsetprec" >&5 + cat > conftest.$ac_ext < +@@ -105275,7 +106258,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:105279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:106262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cfp_have_fpsetprec=yes + else +@@ -105296,9 +106279,9 @@ + fi + + echo $ac_n "checking for usable _controlfp""... $ac_c" 1>&6 +-echo "configure:105300: checking for usable _controlfp" >&5 ++echo "configure:106283: checking for usable _controlfp" >&5 + cat > conftest.$ac_ext < +@@ -105317,7 +106300,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:105321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:106304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cfp_have__controlfp=yes + else +@@ -105338,9 +106321,9 @@ + fi + + echo $ac_n "checking for usable _controlfp_s""... $ac_c" 1>&6 +-echo "configure:105342: checking for usable _controlfp_s" >&5 ++echo "configure:106325: checking for usable _controlfp_s" >&5 + cat > conftest.$ac_ext < +@@ -105360,7 +106343,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:105364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:106347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cfp_have__controlfp_s=yes + else +@@ -105381,9 +106364,9 @@ + fi + + echo $ac_n "checking whether FPU control word can be manipulated by inline assembler""... $ac_c" 1>&6 +-echo "configure:105385: checking whether FPU control word can be manipulated by inline assembler" >&5 ++echo "configure:106368: checking whether FPU control word can be manipulated by inline assembler" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:106392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cfp_have_fpu_inline_asm_x86=yes + else +@@ -105427,7 +106410,7 @@ + + + echo $ac_n "checking whether double cast to long preserves least significant bits""... $ac_c" 1>&6 +-echo "configure:105431: checking whether double cast to long preserves least significant bits" >&5 ++echo "configure:106414: checking whether double cast to long preserves least significant bits" >&5 + + if test "$cross_compiling" = yes; then + +@@ -105435,7 +106418,7 @@ + + else + cat > conftest.$ac_ext < +@@ -105459,7 +106442,7 @@ + } + + EOF +-if { (eval echo configure:105463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:106446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + cat >> confdefs.h <<\EOF +@@ -105485,17 +106468,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:105489: checking for $ac_hdr" >&5 ++echo "configure:106472: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:105499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:106482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -105523,14 +106506,14 @@ + + + echo $ac_n "checking whether dlsym() requires a leading underscore in symbol names""... $ac_c" 1>&6 +-echo "configure:105527: checking whether dlsym() requires a leading underscore in symbol names" >&5 ++echo "configure:106510: checking whether dlsym() requires a leading underscore in symbol names" >&5 + if test "$cross_compiling" = yes; then : + + 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; } && test -s conftest${ac_exeext} 2>/dev/null; then ++ if { (eval echo configure:106580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in +@@ -105676,23 +106659,23 @@ + + + echo $ac_n "checking virtual machine dispatch method""... $ac_c" 1>&6 +-echo "configure:105680: checking virtual machine dispatch method" >&5 ++echo "configure:106663: checking virtual machine dispatch method" >&5 + echo "$ac_t""$PHP_ZEND_VM" 1>&6 + + echo $ac_n "checking whether to enable thread-safety""... $ac_c" 1>&6 +-echo "configure:105684: checking whether to enable thread-safety" >&5 ++echo "configure:106667: checking whether to enable thread-safety" >&5 + echo "$ac_t""$ZEND_MAINTAINER_ZTS" 1>&6 + + echo $ac_n "checking whether to enable inline optimization for GCC""... $ac_c" 1>&6 +-echo "configure:105688: checking whether to enable inline optimization for GCC" >&5 ++echo "configure:106671: checking whether to enable inline optimization for GCC" >&5 + echo "$ac_t""$ZEND_INLINE_OPTIMIZATION" 1>&6 + + echo $ac_n "checking whether to enable Zend debugging""... $ac_c" 1>&6 +-echo "configure:105692: checking whether to enable Zend debugging" >&5 ++echo "configure:106675: checking whether to enable Zend debugging" >&5 + echo "$ac_t""$ZEND_DEBUG" 1>&6 + + echo $ac_n "checking whether to enable Zend multibyte""... $ac_c" 1>&6 +-echo "configure:105696: checking whether to enable Zend multibyte" >&5 ++echo "configure:106679: checking whether to enable Zend multibyte" >&5 + echo "$ac_t""$ZEND_MULTIBYTE" 1>&6 + + case $PHP_ZEND_VM in +@@ -105765,21 +106748,21 @@ + + + echo $ac_n "checking for inline""... $ac_c" 1>&6 +-echo "configure:105769: checking for inline" >&5 ++echo "configure:106752: checking for inline" >&5 + if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_cv_c_inline=no + for ac_kw in inline __inline__ __inline; do + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:106766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break + else +@@ -105808,7 +106791,7 @@ + + + echo $ac_n "checking target system is Darwin""... $ac_c" 1>&6 +-echo "configure:105812: checking target system is Darwin" >&5 ++echo "configure:106795: checking target system is Darwin" >&5 + if echo "$target" | grep "darwin" > /dev/null; then + cat >> confdefs.h <<\EOF + #define DARWIN 1 +@@ -105820,7 +106803,7 @@ + fi + + echo $ac_n "checking for MM alignment and log values""... $ac_c" 1>&6 +-echo "configure:105824: checking for MM alignment and log values" >&5 ++echo "configure:106807: checking for MM alignment and log values" >&5 + + if test "$cross_compiling" = yes; then + +@@ -105828,7 +106811,7 @@ + + else + cat > conftest.$ac_ext < +@@ -105864,7 +106847,7 @@ + } + + EOF +-if { (eval echo configure:105868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:106851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + LIBZEND_MM_ALIGN=`cat conftest.zend | cut -d ' ' -f 1` +@@ -105889,7 +106872,7 @@ + echo "$ac_t""done" 1>&6 + + echo $ac_n "checking for memory allocation using mmap(MAP_ANON)""... $ac_c" 1>&6 +-echo "configure:105893: checking for memory allocation using mmap(MAP_ANON)" >&5 ++echo "configure:106876: checking for memory allocation using mmap(MAP_ANON)" >&5 + + if test "$cross_compiling" = yes; then + +@@ -105897,7 +106880,7 @@ + + else + cat > conftest.$ac_ext < +@@ -105933,7 +106916,7 @@ + } + + EOF +-if { (eval echo configure:105937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:106920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + cat >> confdefs.h <<\EOF +@@ -105955,7 +106938,7 @@ + + + echo $ac_n "checking for memory allocation using mmap("/dev/zero")""... $ac_c" 1>&6 +-echo "configure:105959: checking for memory allocation using mmap("/dev/zero")" >&5 ++echo "configure:106942: checking for memory allocation using mmap("/dev/zero")" >&5 + + if test "$cross_compiling" = yes; then + +@@ -105963,7 +106946,7 @@ + + else + cat > conftest.$ac_ext < +@@ -106009,7 +106992,7 @@ + } + + EOF +-if { (eval echo configure:106013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:106996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + cat >> confdefs.h <<\EOF +@@ -106033,12 +107016,12 @@ + for ac_func in mremap + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:106037: checking for $ac_func" >&5 ++echo "configure:107020: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:107048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -106128,17 +107111,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:106132: checking for $ac_hdr" >&5 ++echo "configure:107115: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:106142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:107125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -106215,7 +107198,7 @@ + + + echo $ac_n "checking for GNU Pth""... $ac_c" 1>&6 +-echo "configure:106219: checking for GNU Pth" >&5 ++echo "configure:107202: checking for GNU Pth" >&5 + PTH_PREFIX="`$TSRM_PTH --prefix`" + if test -z "$PTH_PREFIX"; then + echo "$ac_t""Please check your Pth installation" 1>&6 +@@ -106245,17 +107228,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:106249: checking for $ac_hdr" >&5 ++echo "configure:107232: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:106259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:107242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -106285,7 +107268,7 @@ + + LIBS="$LIBS -lst" + echo $ac_n "checking for SGI's State Threads""... $ac_c" 1>&6 +-echo "configure:106289: checking for SGI's State Threads" >&5 ++echo "configure:107272: checking for SGI's State Threads" >&5 + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF + #define TSRM_ST 1 +@@ -106324,7 +107307,7 @@ + + else + cat > conftest.$ac_ext < +@@ -106342,7 +107325,7 @@ + return pthread_create(&thd, NULL, thread_routine, &data); + } + EOF +-if { (eval echo configure:106346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:107329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + pthreads_working=yes +@@ -106362,7 +107345,7 @@ + CFLAGS=$save_CFLAGS + + echo $ac_n "checking for pthreads_cflags""... $ac_c" 1>&6 +-echo "configure:106366: checking for pthreads_cflags" >&5 ++echo "configure:107349: checking for pthreads_cflags" >&5 + if eval "test \"`echo '$''{'ac_cv_pthreads_cflags'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -106384,7 +107367,7 @@ + + else + cat > conftest.$ac_ext < +@@ -106402,7 +107385,7 @@ + return pthread_create(&thd, NULL, thread_routine, &data); + } + EOF +-if { (eval echo configure:106406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:107389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + pthreads_working=yes +@@ -106432,7 +107415,7 @@ + echo "$ac_t""$ac_cv_pthreads_cflags" 1>&6 + + echo $ac_n "checking for pthreads_lib""... $ac_c" 1>&6 +-echo "configure:106436: checking for pthreads_lib" >&5 ++echo "configure:107419: checking for pthreads_lib" >&5 + if eval "test \"`echo '$''{'ac_cv_pthreads_lib'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -106454,7 +107437,7 @@ + + else + cat > conftest.$ac_ext < +@@ -106472,7 +107455,7 @@ + return pthread_create(&thd, NULL, thread_routine, &data); + } + EOF +-if { (eval echo configure:106476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:107459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + + pthreads_working=yes +@@ -106523,7 +107506,7 @@ + + + echo $ac_n "checking for POSIX threads""... $ac_c" 1>&6 +-echo "configure:106527: checking for POSIX threads" >&5 ++echo "configure:107510: checking for POSIX threads" >&5 + echo "$ac_t""yes" 1>&6 + fi + +@@ -107157,7 +108140,7 @@ + + + echo $ac_n "checking build system type""... $ac_c" 1>&6 +-echo "configure:107161: checking build system type" >&5 ++echo "configure:108144: checking build system type" >&5 + + build_alias=$build + case "$build_alias" in +@@ -107186,7 +108169,7 @@ + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by $CC""... $ac_c" 1>&6 +-echo "configure:107190: checking for ld used by $CC" >&5 ++echo "configure:108173: checking for ld used by $CC" >&5 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw +@@ -107216,10 +108199,10 @@ + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +-echo "configure:107220: checking for GNU ld" >&5 ++echo "configure:108203: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +-echo "configure:107223: checking for non-GNU ld" >&5 ++echo "configure:108206: checking for non-GNU ld" >&5 + fi + if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -107258,7 +108241,7 @@ + fi + test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } + echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +-echo "configure:107262: checking if the linker ($LD) is GNU ld" >&5 ++echo "configure:108245: checking if the linker ($LD) is GNU ld" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -107278,7 +108261,7 @@ + + + echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 +-echo "configure:107282: checking for $LD option to reload object files" >&5 ++echo "configure:108265: checking for $LD option to reload object files" >&5 + if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -107303,7 +108286,7 @@ + esac + + echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +-echo "configure:107307: checking for BSD-compatible nm" >&5 ++echo "configure:108290: checking for BSD-compatible nm" >&5 + if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -107356,7 +108339,7 @@ + NM="$lt_cv_path_NM" + + echo $ac_n "checking how to recognize dependent libraries""... $ac_c" 1>&6 +-echo "configure:107360: checking how to recognize dependent libraries" >&5 ++echo "configure:108343: checking how to recognize dependent libraries" >&5 + if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -107548,13 +108531,13 @@ + test -z "$deplibs_check_method" && deplibs_check_method=unknown + + echo $ac_n "checking for object suffix""... $ac_c" 1>&6 +-echo "configure:107552: checking for object suffix" >&5 ++echo "configure:108535: checking for object suffix" >&5 + if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + rm -f conftest* + echo 'int i = 1;' > conftest.$ac_ext +-if { (eval echo configure:107558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:108541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; +@@ -107574,7 +108557,7 @@ + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +-echo "configure:107578: checking for executable suffix" >&5 ++echo "configure:108561: checking for executable suffix" >&5 + if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -107584,10 +108567,10 @@ + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= +- if { (eval echo configure:107588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then ++ if { (eval echo configure:108571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in +- *.c | *.o | *.obj) ;; ++ *.$ac_ext | *.c | *.o | *.obj) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done +@@ -107630,7 +108613,7 @@ + ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext +- if { (eval echo configure:107634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ if { (eval echo configure:108617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" +@@ -107644,8 +108627,8 @@ + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 107648 "configure"' > conftest.$ac_ext +- if { (eval echo configure:107649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ echo '#line 108631 "configure"' > conftest.$ac_ext ++ if { (eval echo configure:108632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) +@@ -107679,7 +108662,7 @@ + s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext +- if { (eval echo configure:107683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ if { (eval echo configure:108666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in +@@ -107729,7 +108712,7 @@ + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 +-echo "configure:107733: checking whether the C compiler needs -belf" >&5 ++echo "configure:108716: checking whether the C compiler needs -belf" >&5 + if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -107742,14 +108725,14 @@ + cross_compiling=$ac_cv_prog_cc_cross + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:108736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + lt_cv_cc_needs_belf=yes + else +@@ -107777,7 +108760,7 @@ + sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext +- if { (eval echo configure:107781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ if { (eval echo configure:108764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in +@@ -107806,7 +108789,7 @@ + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 +-echo "configure:107810: checking how to run the C++ preprocessor" >&5 ++echo "configure:108793: checking how to run the C++ preprocessor" >&5 + if test -z "$CXXCPP"; then + if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -107819,12 +108802,12 @@ + cross_compiling=$ac_cv_prog_cxx_cross + CXXCPP="${CXX-g++} -E" + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:107828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:108811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -107854,7 +108837,7 @@ + # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + # find the maximum length of command line arguments + echo $ac_n "checking the maximum length of command line arguments""... $ac_c" 1>&6 +-echo "configure:107858: checking the maximum length of command line arguments" >&5 ++echo "configure:108841: checking the maximum length of command line arguments" >&5 + if eval "test \"`echo '$''{'lt_cv_sys_max_cmd_len'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -107976,7 +108959,7 @@ + + # Check for command to grab the raw symbol name followed by C symbol from nm. + echo $ac_n "checking command to parse $NM output from $compiler object""... $ac_c" 1>&6 +-echo "configure:107980: checking command to parse $NM output from $compiler object" >&5 ++echo "configure:108963: checking command to parse $NM output from $compiler object" >&5 + if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108080,10 +109063,10 @@ + int main(){nm_test_var='a';nm_test_func();return(0);} + EOF + +- if { (eval echo configure:108084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ if { (eval echo configure:109067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + # Now try to grab the symbols. + nlist=conftest.nm +- if { (eval echo configure:108087: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then ++ if { (eval echo configure:109070: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" +@@ -108134,7 +109117,7 @@ + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" +- if { (eval echo configure:108138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ if { (eval echo configure:109121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" +@@ -108174,7 +109157,7 @@ + fi + + echo $ac_n "checking for objdir""... $ac_c" 1>&6 +-echo "configure:108178: checking for objdir" >&5 ++echo "configure:109161: checking for objdir" >&5 + if eval "test \"`echo '$''{'lt_cv_objdir'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108240,7 +109223,7 @@ + # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:108244: checking for $ac_word" >&5 ++echo "configure:109227: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108272,7 +109255,7 @@ + # Extract the first word of "ar", so it can be a program name with args. + set dummy ar; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:108276: checking for $ac_word" >&5 ++echo "configure:109259: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108307,7 +109290,7 @@ + # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:108311: checking for $ac_word" >&5 ++echo "configure:109294: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108339,7 +109322,7 @@ + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:108343: checking for $ac_word" >&5 ++echo "configure:109326: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108374,7 +109357,7 @@ + # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:108378: checking for $ac_word" >&5 ++echo "configure:109361: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108406,7 +109389,7 @@ + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:108410: checking for $ac_word" >&5 ++echo "configure:109393: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108493,7 +109476,7 @@ + file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 +-echo "configure:108497: checking for ${ac_tool_prefix}file" >&5 ++echo "configure:109480: checking for ${ac_tool_prefix}file" >&5 + if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108553,7 +109536,7 @@ + if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + echo $ac_n "checking for file""... $ac_c" 1>&6 +-echo "configure:108557: checking for file" >&5 ++echo "configure:109540: checking for file" >&5 + if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108625,7 +109608,7 @@ + # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:108629: checking for $ac_word" >&5 ++echo "configure:109612: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_DSYMUTIL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108657,7 +109640,7 @@ + # Extract the first word of "dsymutil", so it can be a program name with args. + set dummy dsymutil; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:108661: checking for $ac_word" >&5 ++echo "configure:109644: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_DSYMUTIL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108692,7 +109675,7 @@ + # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:108696: checking for $ac_word" >&5 ++echo "configure:109679: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_NMEDIT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108724,7 +109707,7 @@ + # Extract the first word of "nmedit", so it can be a program name with args. + set dummy nmedit; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:108728: checking for $ac_word" >&5 ++echo "configure:109711: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_NMEDIT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108758,7 +109741,7 @@ + + + echo $ac_n "checking for -single_module linker flag""... $ac_c" 1>&6 +-echo "configure:108762: checking for -single_module linker flag" >&5 ++echo "configure:109745: checking for -single_module linker flag" >&5 + if eval "test \"`echo '$''{'lt_cv_apple_cc_single_mod'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108781,7 +109764,7 @@ + + echo "$ac_t""$lt_cv_apple_cc_single_mod" 1>&6 + echo $ac_n "checking for -exported_symbols_list linker flag""... $ac_c" 1>&6 +-echo "configure:108785: checking for -exported_symbols_list linker flag" >&5 ++echo "configure:109768: checking for -exported_symbols_list linker flag" >&5 + if eval "test \"`echo '$''{'lt_cv_ld_exported_symbols_list'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108791,12 +109774,12 @@ + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:109783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + lt_cv_ld_exported_symbols_list=yes + rm -rf conftest* + else +@@ -108930,7 +109913,7 @@ + + + echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6 +-echo "configure:108934: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 ++echo "configure:109917: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_compiler_rtti_exceptions'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -108947,11 +109930,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"configure:108951: $lt_compile\"" >&5) ++ (eval echo "\"configure:109934: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "configure:108955: \$? = $ac_status" >&5 ++ echo "configure:109938: \$? = $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. +@@ -108980,7 +109963,7 @@ + lt_prog_compiler_static= + + echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 +-echo "configure:108984: checking for $compiler option to produce PIC" >&5 ++echo "configure:109967: checking for $compiler option to produce PIC" >&5 + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -109227,7 +110210,7 @@ + if test -n "$lt_prog_compiler_pic"; then + + echo $ac_n "checking if $compiler PIC flag $lt_prog_compiler_pic works""... $ac_c" 1>&6 +-echo "configure:109231: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 ++echo "configure:110214: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_compiler_pic_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -109244,11 +110227,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"configure:109248: $lt_compile\"" >&5) ++ (eval echo "\"configure:110231: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "configure:109252: \$? = $ac_status" >&5 ++ echo "configure:110235: \$? = $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. +@@ -109290,7 +110273,7 @@ + # + wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" + echo $ac_n "checking if $compiler static flag $lt_tmp_static_flag works""... $ac_c" 1>&6 +-echo "configure:109294: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++echo "configure:110277: checking if $compiler static flag $lt_tmp_static_flag works" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_compiler_static_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -109328,7 +110311,7 @@ + + + echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 +-echo "configure:109332: checking if $compiler supports -c -o file.$ac_objext" >&5 ++echo "configure:110315: checking if $compiler supports -c -o file.$ac_objext" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_compiler_c_o'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -109348,11 +110331,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"configure:109352: $lt_compile\"" >&5) ++ (eval echo "\"configure:110335: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "configure:109356: \$? = $ac_status" >&5 ++ echo "configure:110339: \$? = $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 +@@ -109382,7 +110365,7 @@ + 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 $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 +-echo "configure:109386: checking if we can lock with hard links" >&5 ++echo "configure:110369: checking if we can lock with hard links" >&5 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no +@@ -109399,7 +110382,7 @@ + fi + + echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6 +-echo "configure:109403: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++echo "configure:110386: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + + runpath_var= + allow_undefined_flag= +@@ -109810,12 +110793,12 @@ + # Determine the default libpath from the value encoded in an empty executable. + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:110802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -109848,12 +110831,12 @@ + # Determine the default libpath from the value encoded in an empty executable. + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:110840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -110343,11 +111326,11 @@ + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 +-echo "configure:110347: checking whether -lc should be explicitly linked in" >&5 ++echo "configure:111330: checking whether -lc should be explicitly linked in" >&5 + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + +- if { (eval echo configure:110351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then ++ if { (eval echo configure:111334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext +@@ -110361,7 +111344,7 @@ + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= +- if { (eval echo configure:110365: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } ++ if { (eval echo configure:111348: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } + then + archive_cmds_need_lc=no + else +@@ -110380,7 +111363,7 @@ + esac + + echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 +-echo "configure:110384: checking dynamic linker characteristics" >&5 ++echo "configure:111367: checking dynamic linker characteristics" >&5 + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -111005,7 +111988,7 @@ + fi + + echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 +-echo "configure:111009: checking how to hardcode library paths into programs" >&5 ++echo "configure:111992: checking how to hardcode library paths into programs" >&5 + hardcode_action= + if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ +@@ -111043,7 +112026,7 @@ + striplib= + old_striplib= + echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 +-echo "configure:111047: checking whether stripping libraries is possible" >&5 ++echo "configure:112030: checking whether stripping libraries is possible" >&5 + 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" +@@ -111094,7 +112077,7 @@ + darwin*) + # if libdl is installed we need to link against it + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +-echo "configure:111098: checking for dlopen in -ldl" >&5 ++echo "configure:112081: checking for dlopen in -ldl" >&5 + ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -111102,7 +112085,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:112100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -111142,12 +112125,12 @@ + + *) + echo $ac_n "checking for shl_load""... $ac_c" 1>&6 +-echo "configure:111146: checking for shl_load" >&5 ++echo "configure:112129: checking for shl_load" >&5 + if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:112157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shl_load=yes" + else +@@ -111188,7 +112171,7 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 +-echo "configure:111192: checking for shl_load in -ldld" >&5 ++echo "configure:112175: checking for shl_load in -ldld" >&5 + ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -111196,7 +112179,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldld $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:112194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -111226,12 +112209,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for dlopen""... $ac_c" 1>&6 +-echo "configure:111230: checking for dlopen" >&5 ++echo "configure:112213: checking for dlopen" >&5 + if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:112241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dlopen=yes" + else +@@ -111272,7 +112255,7 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +-echo "configure:111276: checking for dlopen in -ldl" >&5 ++echo "configure:112259: checking for dlopen in -ldl" >&5 + ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -111280,7 +112263,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:112278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -111310,7 +112293,7 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 +-echo "configure:111314: checking for dlopen in -lsvld" >&5 ++echo "configure:112297: checking for dlopen in -lsvld" >&5 + ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -111318,7 +112301,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsvld $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:112316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -111348,7 +112331,7 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 +-echo "configure:111352: checking for dld_link in -ldld" >&5 ++echo "configure:112335: checking for dld_link in -ldld" >&5 + ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -111356,7 +112339,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldld $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:112354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -111423,7 +112406,7 @@ + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 +-echo "configure:111427: checking whether a program can dlopen itself" >&5 ++echo "configure:112410: checking whether a program can dlopen itself" >&5 + if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -111433,7 +112416,7 @@ + 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; } && test -s conftest${ac_exeext} 2>/dev/null; then ++ if { (eval echo configure:112483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in +@@ -111519,7 +112502,7 @@ + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 +-echo "configure:111523: checking whether a statically linked program can dlopen itself" >&5 ++echo "configure:112506: checking whether a statically linked program can dlopen itself" >&5 + if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -111529,7 +112512,7 @@ + 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; } && test -s conftest${ac_exeext} 2>/dev/null; then ++ if { (eval echo configure:112579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in +@@ -111633,11 +112616,11 @@ + + # Report which library types will actually be built + echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 +-echo "configure:111637: checking if libtool supports shared libraries" >&5 ++echo "configure:112620: checking if libtool supports shared libraries" >&5 + echo "$ac_t""$can_build_shared" 1>&6 + + echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6 +-echo "configure:111641: checking whether to build shared libraries" >&5 ++echo "configure:112624: checking whether to build shared libraries" >&5 + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and +@@ -111660,7 +112643,7 @@ + echo "$ac_t""$enable_shared" 1>&6 + + echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6 +-echo "configure:111664: checking whether to build static libraries" >&5 ++echo "configure:112647: checking whether to build static libraries" >&5 + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + echo "$ac_t""$enable_static" 1>&6 +@@ -112346,7 +113329,7 @@ + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by $CC""... $ac_c" 1>&6 +-echo "configure:112350: checking for ld used by $CC" >&5 ++echo "configure:113333: checking for ld used by $CC" >&5 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw +@@ -112376,10 +113359,10 @@ + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +-echo "configure:112380: checking for GNU ld" >&5 ++echo "configure:113363: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +-echo "configure:112383: checking for non-GNU ld" >&5 ++echo "configure:113366: checking for non-GNU ld" >&5 + fi + if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -112418,7 +113401,7 @@ + fi + test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } + echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +-echo "configure:112422: checking if the linker ($LD) is GNU ld" >&5 ++echo "configure:113405: checking if the linker ($LD) is GNU ld" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -112484,7 +113467,7 @@ + + # PORTME: fill in a description of your system's C++ link characteristics + echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6 +-echo "configure:112488: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++echo "configure:113471: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + ld_shlibs_CXX=yes + case $host_os in + aix3*) +@@ -112582,12 +113565,12 @@ + # Determine the default libpath from the value encoded in an empty executable. + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:113574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -112621,12 +113604,12 @@ + # Determine the default libpath from the value encoded in an empty executable. + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:113613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -113393,7 +114376,7 @@ + }; + EOF + +-if { (eval echo configure:113397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:114380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + +@@ -113549,7 +114532,7 @@ + lt_prog_compiler_static_CXX= + + echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 +-echo "configure:113553: checking for $compiler option to produce PIC" >&5 ++echo "configure:114536: checking for $compiler option to produce PIC" >&5 + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then +@@ -113846,7 +114829,7 @@ + if test -n "$lt_prog_compiler_pic_CXX"; then + + echo $ac_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works""... $ac_c" 1>&6 +-echo "configure:113850: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 ++echo "configure:114833: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_compiler_pic_works_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -113863,11 +114846,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"configure:113867: $lt_compile\"" >&5) ++ (eval echo "\"configure:114850: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "configure:113871: \$? = $ac_status" >&5 ++ echo "configure:114854: \$? = $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. +@@ -113909,7 +114892,7 @@ + # + wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" + echo $ac_n "checking if $compiler static flag $lt_tmp_static_flag works""... $ac_c" 1>&6 +-echo "configure:113913: checking if $compiler static flag $lt_tmp_static_flag works" >&5 ++echo "configure:114896: checking if $compiler static flag $lt_tmp_static_flag works" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_compiler_static_works_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -113947,7 +114930,7 @@ + + + echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 +-echo "configure:113951: checking if $compiler supports -c -o file.$ac_objext" >&5 ++echo "configure:114934: checking if $compiler supports -c -o file.$ac_objext" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_compiler_c_o_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -113967,11 +114950,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"configure:113971: $lt_compile\"" >&5) ++ (eval echo "\"configure:114954: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "configure:113975: \$? = $ac_status" >&5 ++ echo "configure:114958: \$? = $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 +@@ -114001,7 +114984,7 @@ + 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 $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 +-echo "configure:114005: checking if we can lock with hard links" >&5 ++echo "configure:114988: checking if we can lock with hard links" >&5 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no +@@ -114018,7 +115001,7 @@ + fi + + echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6 +-echo "configure:114022: checking whether the $compiler linker ($LD) supports shared libraries" >&5 ++echo "configure:115005: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in +@@ -114064,11 +115047,11 @@ + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 +-echo "configure:114068: checking whether -lc should be explicitly linked in" >&5 ++echo "configure:115051: checking whether -lc should be explicitly linked in" >&5 + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + +- if { (eval echo configure:114072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then ++ if { (eval echo configure:115055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext +@@ -114082,7 +115065,7 @@ + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= +- if { (eval echo configure:114086: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } ++ if { (eval echo configure:115069: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } + then + archive_cmds_need_lc_CXX=no + else +@@ -114101,7 +115084,7 @@ + esac + + echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 +-echo "configure:114105: checking dynamic linker characteristics" >&5 ++echo "configure:115088: checking dynamic linker characteristics" >&5 + library_names_spec= + libname_spec='lib$name' + soname_spec= +@@ -114674,7 +115657,7 @@ + fi + + echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 +-echo "configure:114678: checking how to hardcode library paths into programs" >&5 ++echo "configure:115661: checking how to hardcode library paths into programs" >&5 + hardcode_action_CXX= + if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ +--- a/generated_lists ++++ b/generated_lists +@@ -1,3 +1,3 @@ + makefile_am_files = Zend/Makefile.am TSRM/Makefile.am + config_h_files = Zend/acconfig.h TSRM/acconfig.h +-config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 Zend/acinclude.m4 ext/bcmath/config.m4 ext/bz2/config.m4 ext/calendar/config.m4 ext/ctype/config.m4 ext/curl/config.m4 ext/date/config0.m4 ext/dba/config.m4 ext/dom/config.m4 ext/enchant/config.m4 ext/ereg/config0.m4 ext/exif/config.m4 ext/fileinfo/config.m4 ext/filter/config.m4 ext/ftp/config.m4 ext/gd/config.m4 ext/gettext/config.m4 ext/gmp/config.m4 ext/hash/config.m4 ext/iconv/config.m4 ext/imap/config.m4 ext/interbase/config.m4 ext/intl/config.m4 ext/json/config.m4 ext/ldap/config.m4 ext/libxml/config0.m4 ext/mbstring/config.m4 ext/mcrypt/config.m4 ext/mssql/config.m4 ext/mysql/config.m4 ext/mysqli/config.m4 ext/mysqlnd/config9.m4 ext/oci8/config.m4 ext/odbc/config.m4 ext/openssl/config0.m4 ext/pcntl/config.m4 ext/pcre/config0.m4 ext/pdo/config.m4 ext/pdo_dblib/config.m4 ext/pdo_firebird/config.m4 ext/pdo_mysql/config.m4 ext/pdo_oci/config.m4 ext/pdo_odbc/config.m4 ext/pdo_pgsql/config.m4 ext/pdo_sqlite/config.m4 ext/pgsql/config.m4 ext/phar/config.m4 ext/posix/config.m4 ext/pspell/config.m4 ext/readline/config.m4 ext/recode/config.m4 ext/recode/config9.m4 ext/reflection/config.m4 ext/session/config.m4 ext/shmop/config.m4 ext/simplexml/config.m4 ext/snmp/config.m4 ext/soap/config.m4 ext/sockets/config.m4 ext/spl/config.m4 ext/sqlite/config.m4 ext/sqlite3/config0.m4 ext/standard/config.m4 ext/sybase_ct/config.m4 ext/sysvmsg/config.m4 ext/sysvsem/config.m4 ext/sysvshm/config.m4 ext/tidy/config.m4 ext/tokenizer/config.m4 ext/wddx/config.m4 ext/xml/config.m4 ext/xmlreader/config.m4 ext/xmlrpc/config.m4 ext/xmlwriter/config.m4 ext/xsl/config.m4 ext/zip/config.m4 ext/zlib/config0.m4 sapi/aolserver/config.m4 sapi/apache/config.m4 sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 sapi/apache_hooks/config.m4 sapi/caudium/config.m4 sapi/cli/config.m4 sapi/continuity/config.m4 sapi/embed/config.m4 sapi/fpm/config.m4 sapi/isapi/config.m4 sapi/litespeed/config.m4 sapi/milter/config.m4 sapi/nsapi/config.m4 sapi/phttpd/config.m4 sapi/pi3web/config.m4 sapi/roxen/config.m4 sapi/thttpd/config.m4 sapi/tux/config.m4 sapi/webjames/config.m4 ++config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 Zend/acinclude.m4 ext/apc/config.m4 ext/bcmath/config.m4 ext/bz2/config.m4 ext/calendar/config.m4 ext/ctype/config.m4 ext/curl/config.m4 ext/date/config0.m4 ext/dba/config.m4 ext/dom/config.m4 ext/enchant/config.m4 ext/ereg/config0.m4 ext/exif/config.m4 ext/fileinfo/config.m4 ext/filter/config.m4 ext/ftp/config.m4 ext/gd/config.m4 ext/gettext/config.m4 ext/gmp/config.m4 ext/hash/config.m4 ext/iconv/config.m4 ext/imap/config.m4 ext/interbase/config.m4 ext/intl/config.m4 ext/json/config.m4 ext/ldap/config.m4 ext/libxml/config0.m4 ext/mbstring/config.m4 ext/mcrypt/config.m4 ext/mssql/config.m4 ext/mysql/config.m4 ext/mysqli/config.m4 ext/mysqlnd/config9.m4 ext/oci8/config.m4 ext/odbc/config.m4 ext/openssl/config0.m4 ext/pcntl/config.m4 ext/pcre/config0.m4 ext/pdo/config.m4 ext/pdo_dblib/config.m4 ext/pdo_firebird/config.m4 ext/pdo_mysql/config.m4 ext/pdo_oci/config.m4 ext/pdo_odbc/config.m4 ext/pdo_pgsql/config.m4 ext/pdo_sqlite/config.m4 ext/pgsql/config.m4 ext/phar/config.m4 ext/posix/config.m4 ext/pspell/config.m4 ext/readline/config.m4 ext/recode/config.m4 ext/recode/config9.m4 ext/reflection/config.m4 ext/session/config.m4 ext/shmop/config.m4 ext/simplexml/config.m4 ext/snmp/config.m4 ext/soap/config.m4 ext/sockets/config.m4 ext/spl/config.m4 ext/sqlite/config.m4 ext/sqlite3/config0.m4 ext/standard/config.m4 ext/sybase_ct/config.m4 ext/sysvmsg/config.m4 ext/sysvsem/config.m4 ext/sysvshm/config.m4 ext/tidy/config.m4 ext/tokenizer/config.m4 ext/wddx/config.m4 ext/xml/config.m4 ext/xmlreader/config.m4 ext/xmlrpc/config.m4 ext/xmlwriter/config.m4 ext/xsl/config.m4 ext/zip/config.m4 ext/zlib/config0.m4 sapi/aolserver/config.m4 sapi/apache/config.m4 sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 sapi/apache_hooks/config.m4 sapi/caudium/config.m4 sapi/cli/config.m4 sapi/continuity/config.m4 sapi/embed/config.m4 sapi/fpm/config.m4 sapi/isapi/config.m4 sapi/litespeed/config.m4 sapi/milter/config.m4 sapi/nsapi/config.m4 sapi/phttpd/config.m4 sapi/pi3web/config.m4 sapi/roxen/config.m4 sapi/thttpd/config.m4 sapi/tux/config.m4 sapi/webjames/config.m4 +--- a/main/php_config.h.in ++++ b/main/php_config.h.in +@@ -1,4 +1,4 @@ +-/* main/php_config.h.in. Generated automatically from configure.in by autoheader. */ ++/* main/php_config.h.in. Generated automatically from configure.in by autoheader 2.13. */ + /* Leave this file alone */ + /* + +----------------------------------------------------------------------+ +@@ -1325,6 +1325,51 @@ + /* */ + #undef HAVE_ZLIB + ++/* */ ++#undef APC_MMAP ++ ++/* */ ++#undef APC_FILEHITS ++ ++/* */ ++#undef __DEBUG_APC__ ++ ++/* */ ++#undef APC_SEM_LOCKS ++ ++/* */ ++#undef APC_SPIN_LOCKS ++ ++/* */ ++#undef APC_PTHREADMUTEX_LOCKS ++ ++/* */ ++#undef APC_FCNTL_LOCKS ++ ++/* shm/mmap memory protection */ ++#undef APC_MEMPROTECT ++ ++/* */ ++#undef APC_HAVE_LOOKUP_HOOKS ++ ++/* */ ++#undef APC_HAVE_LOOKUP_HOOKS ++ ++/* */ ++#undef HAVE_SEMUN ++ ++/* */ ++#undef HAVE_SEMUN ++ ++/* enable valgrind memchecks */ ++#undef HAVE_VALGRIND_MEMCHECK_H ++ ++/* Whether to build apc as dynamic module */ ++#undef COMPILE_DL_APC ++ ++/* */ ++#undef HAVE_APC ++ + /* Whether to build bcmath as dynamic module */ + #undef COMPILE_DL_BCMATH + diff --git a/lang/php5/patches/950-Fix-dl-cross-compiling-issue.patch b/lang/php5/patches/950-Fix-dl-cross-compiling-issue.patch new file mode 100644 index 0000000..81de7f8 --- /dev/null +++ b/lang/php5/patches/950-Fix-dl-cross-compiling-issue.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -15979,7 +15979,7 @@ + ac_libs=$LIBS + LIBS="$LIBS -ldl" + if test "$cross_compiling" = yes; then +- found=no ++ found=$found + else + cat > conftest.$ac_ext <> constants.py +- chmod 444 constants.py +- +-generate_constants_CFLAGS = $(GLIB_CFLAGS) $(PYTHON_INCLUDES) +- +-noinst_PROGRAMS = generate-constants + CLEANFILES = constants.py +-EXTRA_DIST = constants.py.in ++ ++_constants_la_CFLAGS = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) ++_constants_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_constants ++_constants_la_SOURCES = _constants.c + + _gobject_la_CFLAGS = \ + $(PYTHON_INCLUDES) \ +diff --git a/gobject/Makefile.in b/gobject/Makefile.in +index c4c2efa..5bd0c08 100644 +--- a/gobject/Makefile.in ++++ b/gobject/Makefile.in +@@ -15,7 +15,6 @@ + @SET_MAKE@ + + +- + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ +@@ -38,7 +37,6 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + @PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined +-noinst_PROGRAMS = generate-constants$(EXEEXT) + @HAVE_LIBFFI_TRUE@am__append_2 = ffi-marshaller.c ffi-marshaller.h + @PLATFORM_WIN32_TRUE@am__append_3 = -DPLATFORM_WIN32 + subdir = gobject +@@ -66,6 +64,9 @@ am__installdirs = "$(DESTDIR)$(pygobjectdir)" \ + "$(DESTDIR)$(pkgincludedir)" + pygobjectLTLIBRARIES_INSTALL = $(INSTALL) + LTLIBRARIES = $(pygobject_LTLIBRARIES) ++_constants_la_LIBADD = ++am__constants_la_OBJECTS = _constants_la-_constants.lo ++_constants_la_OBJECTS = $(am__constants_la_OBJECTS) + am__DEPENDENCIES_1 = + am___gobject_la_SOURCES_DIST = gobjectmodule.c pygboxed.c pygboxed.h \ + pygenum.c pygenum.h pygflags.c pygflags.h pyginterface.c \ +@@ -80,11 +81,6 @@ am__gobject_la_OBJECTS = _gobject_la-gobjectmodule.lo \ + _gobject_la-pygpointer.lo _gobject_la-pygtype.lo \ + $(am__objects_1) + _gobject_la_OBJECTS = $(am__gobject_la_OBJECTS) +-PROGRAMS = $(noinst_PROGRAMS) +-generate_constants_SOURCES = generate-constants.c +-generate_constants_OBJECTS = \ +- generate_constants-generate-constants.$(OBJEXT) +-generate_constants_LDADD = $(LDADD) + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles +@@ -96,8 +92,9 @@ LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + CCLD = $(CC) + LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +-SOURCES = $(_gobject_la_SOURCES) generate-constants.c +-DIST_SOURCES = $(am___gobject_la_SOURCES_DIST) generate-constants.c ++SOURCES = $(_constants_la_SOURCES) $(_gobject_la_SOURCES) ++DIST_SOURCES = $(_constants_la_SOURCES) \ ++ $(am___gobject_la_SOURCES_DIST) + nodist_pygobjectPYTHON_INSTALL = $(INSTALL_DATA) + pygobjectPYTHON_INSTALL = $(INSTALL_DATA) + py_compile = $(top_srcdir)/py-compile +@@ -265,12 +262,13 @@ pygobject_PYTHON = \ + __init__.py \ + propertyhelper.py + +-pygobject_LTLIBRARIES = _gobject.la ++pygobject_LTLIBRARIES = _gobject.la _constants.la + nodist_pygobject_PYTHON = constants.py + common_ldflags = -module -avoid-version $(am__append_1) +-generate_constants_CFLAGS = $(GLIB_CFLAGS) $(PYTHON_INCLUDES) + CLEANFILES = constants.py +-EXTRA_DIST = constants.py.in ++_constants_la_CFLAGS = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) ++_constants_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_constants ++_constants_la_SOURCES = _constants.c + _gobject_la_CFLAGS = $(PYTHON_INCLUDES) $(FFI_CFLAGS) $(GLIB_CFLAGS) \ + -DPY_SSIZE_T_CLEAN -I$(top_srcdir)/glib $(am__append_3) + _gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_gobject|PyInit__gobject" +@@ -345,25 +343,18 @@ clean-pygobjectLTLIBRARIES: + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done ++_constants.la: $(_constants_la_OBJECTS) $(_constants_la_DEPENDENCIES) ++ $(LINK) -rpath $(pygobjectdir) $(_constants_la_LDFLAGS) $(_constants_la_OBJECTS) $(_constants_la_LIBADD) $(LIBS) + _gobject.la: $(_gobject_la_OBJECTS) $(_gobject_la_DEPENDENCIES) + $(LINK) -rpath $(pygobjectdir) $(_gobject_la_LDFLAGS) $(_gobject_la_OBJECTS) $(_gobject_la_LIBADD) $(LIBS) + +-clean-noinstPROGRAMS: +- @list='$(noinst_PROGRAMS)'; for p in $$list; do \ +- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ +- echo " rm -f $$p $$f"; \ +- rm -f $$p $$f ; \ +- done +-generate-constants$(EXEEXT): $(generate_constants_OBJECTS) $(generate_constants_DEPENDENCIES) +- @rm -f generate-constants$(EXEEXT) +- $(LINK) $(generate_constants_LDFLAGS) $(generate_constants_OBJECTS) $(generate_constants_LDADD) $(LIBS) +- + mostlyclean-compile: + -rm -f *.$(OBJEXT) + + distclean-compile: + -rm -f *.tab.c + ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_constants_la-_constants.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-ffi-marshaller.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-gobjectmodule.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygboxed.Plo@am__quote@ +@@ -374,7 +365,6 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygparamspec.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygpointer.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygtype.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_constants-generate-constants.Po@am__quote@ + + .c.o: + @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@@ -397,6 +387,13 @@ distclean-compile: + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + ++_constants_la-_constants.lo: _constants.c ++@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_constants_la_CFLAGS) $(CFLAGS) -MT _constants_la-_constants.lo -MD -MP -MF "$(DEPDIR)/_constants_la-_constants.Tpo" -c -o _constants_la-_constants.lo `test -f '_constants.c' || echo '$(srcdir)/'`_constants.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/_constants_la-_constants.Tpo" "$(DEPDIR)/_constants_la-_constants.Plo"; else rm -f "$(DEPDIR)/_constants_la-_constants.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='_constants.c' object='_constants_la-_constants.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_constants_la_CFLAGS) $(CFLAGS) -c -o _constants_la-_constants.lo `test -f '_constants.c' || echo '$(srcdir)/'`_constants.c ++ + _gobject_la-gobjectmodule.lo: gobjectmodule.c + @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-gobjectmodule.lo -MD -MP -MF "$(DEPDIR)/_gobject_la-gobjectmodule.Tpo" -c -o _gobject_la-gobjectmodule.lo `test -f 'gobjectmodule.c' || echo '$(srcdir)/'`gobjectmodule.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/_gobject_la-gobjectmodule.Tpo" "$(DEPDIR)/_gobject_la-gobjectmodule.Plo"; else rm -f "$(DEPDIR)/_gobject_la-gobjectmodule.Tpo"; exit 1; fi +@@ -467,20 +464,6 @@ _gobject_la-ffi-marshaller.lo: ffi-marshaller.c + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-ffi-marshaller.lo `test -f 'ffi-marshaller.c' || echo '$(srcdir)/'`ffi-marshaller.c + +-generate_constants-generate-constants.o: generate-constants.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -MT generate_constants-generate-constants.o -MD -MP -MF "$(DEPDIR)/generate_constants-generate-constants.Tpo" -c -o generate_constants-generate-constants.o `test -f 'generate-constants.c' || echo '$(srcdir)/'`generate-constants.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/generate_constants-generate-constants.Tpo" "$(DEPDIR)/generate_constants-generate-constants.Po"; else rm -f "$(DEPDIR)/generate_constants-generate-constants.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate-constants.c' object='generate_constants-generate-constants.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -c -o generate_constants-generate-constants.o `test -f 'generate-constants.c' || echo '$(srcdir)/'`generate-constants.c +- +-generate_constants-generate-constants.obj: generate-constants.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -MT generate_constants-generate-constants.obj -MD -MP -MF "$(DEPDIR)/generate_constants-generate-constants.Tpo" -c -o generate_constants-generate-constants.obj `if test -f 'generate-constants.c'; then $(CYGPATH_W) 'generate-constants.c'; else $(CYGPATH_W) '$(srcdir)/generate-constants.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/generate_constants-generate-constants.Tpo" "$(DEPDIR)/generate_constants-generate-constants.Po"; else rm -f "$(DEPDIR)/generate_constants-generate-constants.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate-constants.c' object='generate_constants-generate-constants.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -c -o generate_constants-generate-constants.obj `if test -f 'generate-constants.c'; then $(CYGPATH_W) 'generate-constants.c'; else $(CYGPATH_W) '$(srcdir)/generate-constants.c'; fi` +- + mostlyclean-libtool: + -rm -f *.lo + +@@ -641,7 +624,7 @@ distdir: $(DISTFILES) + done + check-am: all-am + check: check-am +-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) ++all-am: Makefile $(LTLIBRARIES) $(HEADERS) + installdirs: + for dir in "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ +@@ -673,8 +656,8 @@ maintainer-clean-generic: + @echo "it deletes files that may require special tools to rebuild." + clean: clean-am + +-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ +- clean-pygobjectLTLIBRARIES mostlyclean-am ++clean-am: clean-generic clean-libtool clean-pygobjectLTLIBRARIES \ ++ mostlyclean-am + + distclean: distclean-am + -rm -rf ./$(DEPDIR) +@@ -727,28 +710,21 @@ uninstall-am: uninstall-info-am uninstall-nodist_pygobjectPYTHON \ + uninstall-pygobjectPYTHON + + .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ +- clean-libtool clean-noinstPROGRAMS clean-pygobjectLTLIBRARIES \ +- ctags distclean distclean-compile distclean-generic \ +- distclean-libtool distclean-tags distdir dvi dvi-am html \ +- html-am info info-am install install-am install-data \ +- install-data-am install-exec install-exec-am install-info \ +- install-info-am install-man install-nodist_pygobjectPYTHON \ +- install-pkgincludeHEADERS install-pygobjectLTLIBRARIES \ +- install-pygobjectPYTHON 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-info-am \ +- uninstall-nodist_pygobjectPYTHON uninstall-pkgincludeHEADERS \ +- uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON +- +- +-constants.py: generate-constants$(EXEEXT) constants.py.in +- rm -f constants.py +- cp $(srcdir)/constants.py.in constants.py +- chmod 644 constants.py +- $(top_builddir)/gobject/generate-constants$(EXEEXT) >> constants.py +- chmod 444 constants.py ++ clean-libtool clean-pygobjectLTLIBRARIES ctags distclean \ ++ distclean-compile distclean-generic distclean-libtool \ ++ distclean-tags distdir dvi dvi-am html html-am info info-am \ ++ install install-am install-data install-data-am install-exec \ ++ install-exec-am install-info install-info-am install-man \ ++ install-nodist_pygobjectPYTHON install-pkgincludeHEADERS \ ++ install-pygobjectLTLIBRARIES install-pygobjectPYTHON \ ++ 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-info-am uninstall-nodist_pygobjectPYTHON \ ++ uninstall-pkgincludeHEADERS uninstall-pygobjectLTLIBRARIES \ ++ uninstall-pygobjectPYTHON ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +diff --git a/gobject/_constants.c b/gobject/_constants.c +index e69de29..c304105 100644 +--- a/gobject/_constants.c ++++ b/gobject/_constants.c +@@ -0,0 +1,26 @@ ++#include ++#include ++ ++DL_EXPORT(void) ++init_constants(void) ++{ ++ PyObject *m, *d; ++ ++ m = Py_InitModule("gobject._constants", NULL); ++ d = PyModule_GetDict(m); ++ ++ PyDict_SetItemString(d, "G_MINFLOAT", PyFloat_FromDouble(G_MINFLOAT)); ++ PyDict_SetItemString(d, "G_MAXFLOAT", PyFloat_FromDouble(G_MAXFLOAT)); ++ PyDict_SetItemString(d, "G_MINDOUBLE", PyFloat_FromDouble(G_MINDOUBLE)); ++ PyDict_SetItemString(d, "G_MAXDOUBLE", PyFloat_FromDouble(G_MAXDOUBLE)); ++ PyDict_SetItemString(d, "G_MINSHORT", PyLong_FromLong(G_MINSHORT)); ++ PyDict_SetItemString(d, "G_MAXSHORT", PyLong_FromLong(G_MAXSHORT)); ++ PyDict_SetItemString(d, "G_MAXUSHORT", PyLong_FromUnsignedLong(G_MAXUSHORT)); ++ PyDict_SetItemString(d, "G_MININT", PyLong_FromLong(G_MININT)); ++ PyDict_SetItemString(d, "G_MAXINT", PyLong_FromLong(G_MAXINT)); ++ PyDict_SetItemString(d, "G_MAXUINT", PyLong_FromUnsignedLong(G_MAXUINT)); ++ PyDict_SetItemString(d, "G_MINLONG", PyLong_FromLong(G_MINLONG)); ++ PyDict_SetItemString(d, "G_MAXLONG", PyLong_FromLong(G_MAXLONG)); ++ PyDict_SetItemString(d, "G_MAXULONG", PyLong_FromUnsignedLong(G_MAXULONG)); ++} ++ +diff --git a/gobject/constants.py b/gobject/constants.py +--- a/gobject/constants.py ++++ b/gobject/constants.py +@@ -0,0 +1,51 @@ ++# -*- Mode: Python; py-indent-offset: 4 -*- ++# pygobject - Python bindings for the GObject library ++# Copyright (C) 2006-2007 Johan Dahlin ++# ++# gobject/constants.py: GObject type constants ++# ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License as published by the Free Software Foundation; either ++# version 2.1 of the License, or (at your option) any later version. ++# ++# This 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 ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ++# USA ++ ++import sys ++ ++import gobject._gobject ++_gobject = sys.modules['gobject._gobject'] ++from _constants import * ++ ++# TYPE_INVALID defined in gobjectmodule.c ++TYPE_NONE = _gobject.type_from_name('void') ++TYPE_INTERFACE = _gobject.type_from_name('GInterface') ++TYPE_CHAR = _gobject.type_from_name('gchar') ++TYPE_UCHAR = _gobject.type_from_name('guchar') ++TYPE_BOOLEAN = _gobject.type_from_name('gboolean') ++TYPE_INT = _gobject.type_from_name('gint') ++TYPE_UINT = _gobject.type_from_name('guint') ++TYPE_LONG = _gobject.type_from_name('glong') ++TYPE_ULONG = _gobject.type_from_name('gulong') ++TYPE_INT64 = _gobject.type_from_name('gint64') ++TYPE_UINT64 = _gobject.type_from_name('guint64') ++TYPE_ENUM = _gobject.type_from_name('GEnum') ++TYPE_FLAGS = _gobject.type_from_name('GFlags') ++TYPE_FLOAT = _gobject.type_from_name('gfloat') ++TYPE_DOUBLE = _gobject.type_from_name('gdouble') ++TYPE_STRING = _gobject.type_from_name('gchararray') ++TYPE_POINTER = _gobject.type_from_name('gpointer') ++TYPE_BOXED = _gobject.type_from_name('GBoxed') ++TYPE_PARAM = _gobject.type_from_name('GParam') ++TYPE_OBJECT = _gobject.type_from_name('GObject') ++TYPE_PYOBJECT = _gobject.type_from_name('PyObject') ++TYPE_UNICHAR = TYPE_UINT ++ +diff --git a/gobject/constants.py.in b/gobject/constants.py.in +deleted file mode 100644 +index 80bf920..0000000 +--- a/gobject/constants.py.in ++++ /dev/null +@@ -1,50 +0,0 @@ +-# -*- Mode: Python; py-indent-offset: 4 -*- +-# pygobject - Python bindings for the GObject library +-# Copyright (C) 2006-2007 Johan Dahlin +-# +-# gobject/constants.py: GObject type constants +-# +-# This library is free software; you can redistribute it and/or +-# modify it under the terms of the GNU Lesser General Public +-# License as published by the Free Software Foundation; either +-# version 2.1 of the License, or (at your option) any later version. +-# +-# This 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 +-# Lesser General Public License for more details. +-# +-# You should have received a copy of the GNU Lesser General Public +-# License along with this library; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +-# USA +- +-import sys +- +-import gobject._gobject +-_gobject = sys.modules['gobject._gobject'] +- +-# TYPE_INVALID defined in gobjectmodule.c +-TYPE_NONE = _gobject.type_from_name('void') +-TYPE_INTERFACE = _gobject.type_from_name('GInterface') +-TYPE_CHAR = _gobject.type_from_name('gchar') +-TYPE_UCHAR = _gobject.type_from_name('guchar') +-TYPE_BOOLEAN = _gobject.type_from_name('gboolean') +-TYPE_INT = _gobject.type_from_name('gint') +-TYPE_UINT = _gobject.type_from_name('guint') +-TYPE_LONG = _gobject.type_from_name('glong') +-TYPE_ULONG = _gobject.type_from_name('gulong') +-TYPE_INT64 = _gobject.type_from_name('gint64') +-TYPE_UINT64 = _gobject.type_from_name('guint64') +-TYPE_ENUM = _gobject.type_from_name('GEnum') +-TYPE_FLAGS = _gobject.type_from_name('GFlags') +-TYPE_FLOAT = _gobject.type_from_name('gfloat') +-TYPE_DOUBLE = _gobject.type_from_name('gdouble') +-TYPE_STRING = _gobject.type_from_name('gchararray') +-TYPE_POINTER = _gobject.type_from_name('gpointer') +-TYPE_BOXED = _gobject.type_from_name('GBoxed') +-TYPE_PARAM = _gobject.type_from_name('GParam') +-TYPE_OBJECT = _gobject.type_from_name('GObject') +-TYPE_PYOBJECT = _gobject.type_from_name('PyObject') +-TYPE_UNICHAR = TYPE_UINT +- diff --git a/lang/pygtk/Makefile b/lang/pygtk/Makefile new file mode 100644 index 0000000..9618182 --- /dev/null +++ b/lang/pygtk/Makefile @@ -0,0 +1,85 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pygtk +PKG_VERSION:=2.12.1 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.12/ +PKG_MD5SUM:=a816346d750d61e3fa67a200e4292694 +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +$(call include_mk, python-package.mk) + +define Package/python-gtk + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=GTK bindings for python + URL:=http://www.pygtk.org/ + DEPENDS:=+python-mini +python-gobject +gtk2 +pycairo @!LINUX_2_4 +endef + +define Package/python-gtk/description + API to GTK and glade library from python. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + SUBDIRS="codegen . gtk" \ + all install DESTDIR="$(PKG_INSTALL_DIR)" +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/pygtk-2.0/pygtk + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/pygtk-2.0/pygtk/* \ + $(1)/usr/include/pygtk-2.0/pygtk + + $(INSTALL_DIR) $(1)/usr/share/pygtk/2.0/codegen + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/pygtk/2.0/codegen/*.py \ + $(1)/usr/share/pygtk/2.0/codegen/ + + $(INSTALL_DIR) $(1)/usr/share/pygtk/2.0/defs/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/pygtk/2.0/defs/* \ + $(1)/usr/share/pygtk/2.0/defs + + $(INSTALL_DIR) $(2)/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/* \ + $(2)/bin + + $(SED) 's,^\(datadir\|prefix\)=,\1=$(STAGING_DIR),g' $(2)/bin/pygtk-codegen-2.0 + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig + + $(SED) 's,^datadir=,datadir=$(STAGING_DIR),g' $(1)/usr/lib/pkgconfig/pygtk-2.0.pc +endef + +define Package/python-gtk/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0 + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/*.so \ + $(1)$(PYTHON_PKG_DIR)/gtk-2.0 + + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0/gtk + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/gtk/*{.py,.so}* \ + $(1)$(PYTHON_PKG_DIR)/gtk-2.0/gtk +endef + +$(eval $(call BuildPackage,python-gtk)) diff --git a/lang/pygtk/patches/001-automake-compat.patch b/lang/pygtk/patches/001-automake-compat.patch new file mode 100644 index 0000000..d141cd6 --- /dev/null +++ b/lang/pygtk/patches/001-automake-compat.patch @@ -0,0 +1,8 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,4 +1,5 @@ + AUTOMAKE_OPTIONS = 1.7 ++ACLOCAL_AMFLAGS = -I m4 + + if BUILD_GTK + GTK_SUBDIR = gtk diff --git a/lang/pymysql/Makefile b/lang/pymysql/Makefile new file mode 100644 index 0000000..9a54f26 --- /dev/null +++ b/lang/pymysql/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=MySQL-python +PKG_VERSION:=1.2.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/mysql-python +PKG_MD5SUM:=532268f02870bea18c1d465e88afff30 + +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/python-mysql + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=MySQL database adapter for Python + URL:=http://mysql-python.sourceforge.net/ + DEPENDS:=+python +libmysqlclient +endef + +define Package/python-mysql/description + MySQLdb is an thread-compatible interface to the popular MySQL database + server that provides the Python database API. +endef + +define PyPackage/python-mysql/filespec ++|$(PYTHON_PKG_DIR)/_mysql.so ++|$(PYTHON_PKG_DIR)/_mysql_exceptions.py* ++|$(PYTHON_PKG_DIR)/MySQLdb +endef + +define Build/Compile + $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) + $(call Build/Compile/PyMod,., \ + install --prefix="$(PKG_INSTALL_DIR)/usr", \ + ) +endef + +$(eval $(call PyPackage,python-mysql)) +$(eval $(call BuildPackage,python-mysql)) diff --git a/lang/pymysql/patches/000-setup.patch b/lang/pymysql/patches/000-setup.patch new file mode 100644 index 0000000..e04e2f9 --- /dev/null +++ b/lang/pymysql/patches/000-setup.patch @@ -0,0 +1,12 @@ +--- MySQL-python-1.2.2/setup.py 2007-02-25 04:37:12.000000000 +0100 ++++ MySQL-python-1.2.2/setup.py 2007-08-15 12:23:18.000000000 +0200 +@@ -2,8 +2,7 @@ + + import os + import sys +-import ez_setup; ez_setup.use_setuptools() +-from setuptools import setup, Extension ++from distutils.core import setup, Extension + + if sys.version_info < (2, 3): + raise Error, "Python-2.3 or newer is required" diff --git a/lang/pymysql/patches/010-threadsafe.patch b/lang/pymysql/patches/010-threadsafe.patch new file mode 100644 index 0000000..bcd9af8 --- /dev/null +++ b/lang/pymysql/patches/010-threadsafe.patch @@ -0,0 +1,11 @@ +--- MySQL-python-1.2.2/site_orig.cfg 2007-08-15 12:58:40.000000000 +0200 ++++ MySQL-python-1.2.2/site.cfg 2007-08-15 12:58:49.000000000 +0200 +@@ -4,7 +4,7 @@ + # static: link against a static library (probably required for embedded) + + embedded = False +-threadsafe = True ++threadsafe = False + static = False + + # The path to mysql_config. diff --git a/lang/pyopenssl/Makefile b/lang/pyopenssl/Makefile new file mode 100644 index 0000000..f81b996 --- /dev/null +++ b/lang/pyopenssl/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pyopenssl +PKG_VERSION:=0.10 +PKG_RELEASE:=1 + +PKG_SOURCE:=pyOpenSSL-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/p/pyOpenSSL/ +PKG_MD5SUM:=34db8056ec53ce80c7f5fc58bee9f093 + +PKG_BUILD_DIR:=$(BUILD_DIR)/pyOpenSSL-$(PKG_VERSION) +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/pyopenssl + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=pyopenssl + URL:=http://pyopenssl.sourceforge.net/ + DEPENDS:=+python +endef + +define Package/pyopenssl/description + Python interface to the OpenSSL library. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr") +endef + +define Package/pyopenssl/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,pyopenssl)) diff --git a/lang/pypcap/Makefile b/lang/pypcap/Makefile new file mode 100644 index 0000000..ecc0df5 --- /dev/null +++ b/lang/pypcap/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pypcap +PKG_VERSION:=1.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypcap.googlecode.com/files +PKG_MD5SUM:=034c3cbbfa81aa19e8f685b767c65764 + +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/python-pcap + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Python interface to lipcap + URL:=http://code.google.com/p/pypcap/ + DEPENDS:=+python-mini +libpcap +endef + +define PyPackage/python-pcap/filespec ++|$(PYTHON_PKG_DIR)/pcap.so +endef + +TARGET_CFLAGS += -DHAVE_PCAP_FILE=1 + +define Build/Compile + $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) + $(call Build/Compile/PyMod,., \ + install --prefix="$(PKG_INSTALL_DIR)/usr", \ + PCAP_HOME="$(STAGING_DIR)/usr" \ + ) +endef + +$(eval $(call PyPackage,python-pcap)) +$(eval $(call BuildPackage,python-pcap)) diff --git a/lang/pypcap/patches/000-no_cpickle.patch b/lang/pypcap/patches/000-no_cpickle.patch new file mode 100644 index 0000000..8cabb05 --- /dev/null +++ b/lang/pypcap/patches/000-no_cpickle.patch @@ -0,0 +1,142 @@ +--- pypcap/setup.py 2006-03-15 13:59:54.000000000 -0600 ++++ pypcap.new/setup.py 2007-05-25 17:29:02.413355500 -0500 +@@ -4,69 +4,53 @@ + + from distutils.core import setup, Extension + from distutils.command import config, clean +-import cPickle, glob, os, sys ++import os,sys,glob + +-pcap_config = {} +-pcap_cache = 'config.pkl' ++# where to find pcap ++pcap_location = os.environ.get('PCAP_HOME') + +-class config_pcap(config.config): +- description = 'configure pcap paths' +- user_options = [ ('with-pcap=', None, +- 'path to pcap build or installation directory') ] +- +- def initialize_options(self): +- config.config.initialize_options(self) +- self.dump_source = 0 +- #self.noisy = 0 +- self.with_pcap = None +- +- def _write_config_h(self, cfg): +- # XXX - write out config.h for pcap_ex.c +- d = {} +- if os.path.exists(os.path.join(cfg['include_dirs'][0], 'pcap-int.h')): +- d['HAVE_PCAP_INT_H'] = 1 +- buf = open(os.path.join(cfg['include_dirs'][0], 'pcap.h')).read() +- if buf.find('pcap_file(') != -1: +- d['HAVE_PCAP_FILE'] = 1 +- if buf.find('pcap_compile_nopcap(') != -1: +- d['HAVE_PCAP_COMPILE_NOPCAP'] = 1 +- if buf.find('pcap_setnonblock(') != -1: +- d['HAVE_PCAP_SETNONBLOCK'] = 1 +- f = open('config.h', 'w') +- for k, v in d.iteritems(): +- f.write('#define %s %s\n' % (k, v)) +- +- def _pcap_config(self, dirs=[ None ]): +- cfg = {} +- if not dirs[0]: +- dirs = [ '/usr', sys.prefix ] + glob.glob('/opt/libpcap*') + \ +- glob.glob('../libpcap*') + glob.glob('../wpdpack*') +- for d in dirs: +- for sd in ('include', 'include/pcap', ''): +- incdirs = [ os.path.join(d, sd) ] +- if os.path.exists(os.path.join(d, sd, 'pcap.h')): +- cfg['include_dirs'] = [ os.path.join(d, sd) ] +- for sd in ('lib', ''): +- for lib in (('pcap', 'libpcap.a'), +- ('pcap', 'libpcap.dylib'), +- ('wpcap', 'wpcap.lib')): +- if os.path.exists(os.path.join(d, sd, lib[1])): +- cfg['library_dirs'] = [ os.path.join(d, sd) ] +- cfg['libraries'] = [ lib[0] ] +- if lib[0] == 'wpcap': +- cfg['libraries'].append('iphlpapi') +- cfg['extra_compile_args'] = \ +- [ '-DWIN32', '-DWPCAP' ] +- print 'found', cfg +- self._write_config_h(cfg) +- return cfg +- raise "couldn't find pcap build or installation directory" +- +- def run(self): +- #config.log.set_verbosity(0) +- cPickle.dump(self._pcap_config([ self.with_pcap ]), +- open(pcap_cache, 'wb')) +- self.temp_files.append(pcap_cache) ++def write_config_h(cfg): ++ # XXX - write out config.h for pcap_ex.c ++ d = {} ++ if os.path.exists(os.path.join(cfg['include_dirs'][0], 'pcap-int.h')): ++ d['HAVE_PCAP_INT_H'] = 1 ++ buf = open(os.path.join(cfg['include_dirs'][0], 'pcap.h')).read() ++ if buf.find('pcap_file(') != -1: ++ d['HAVE_PCAP_FILE'] = 1 ++ if buf.find('pcap_compile_nopcap(') != -1: ++ d['HAVE_PCAP_COMPILE_NOPCAP'] = 1 ++ if buf.find('pcap_setnonblock(') != -1: ++ d['HAVE_PCAP_SETNONBLOCK'] = 1 ++ f = open('config.h', 'w') ++ for k, v in d.iteritems(): ++ f.write('#define %s %s\n' % (k, v)) ++ ++ ++def f_pcap_config(dirs=[ None ]): ++ cfg = {} ++ if not dirs[0]: ++ dirs = [ '/usr', sys.prefix ] + glob.glob('/opt/libpcap*') + \ ++ glob.glob('../libpcap*') + glob.glob('../wpdpack*') ++ for d in dirs: ++ for sd in ('include/pcap', 'include', ''): ++ incdirs = [ os.path.join(d, sd) ] ++ if os.path.exists(os.path.join(d, sd, 'pcap.h')): ++ cfg['include_dirs'] = [ os.path.join(d, sd) ] ++ for sd in ('lib', ''): ++ for lib in (('pcap', 'libpcap.a'), ++ ('pcap', 'libpcap.dylib'), ++ ('wpcap', 'wpcap.lib')): ++ if os.path.exists(os.path.join(d, sd, lib[1])): ++ cfg['library_dirs'] = [ os.path.join(d, sd) ] ++ cfg['libraries'] = [ lib[0] ] ++ if lib[0] == 'wpcap': ++ cfg['libraries'].append('iphlpapi') ++ cfg['extra_compile_args'] = \ ++ [ '-DWIN32', '-DWPCAP' ] ++ print 'found', cfg ++ write_config_h(cfg) ++ return cfg ++ raise "couldn't find pcap build or installation directory" + + class clean_pcap(clean.clean): + def run(self): +@@ -75,13 +59,9 @@ + print "removing '%s'" % pcap_cache + os.unlink(pcap_cache) + +-if len(sys.argv) > 1 and sys.argv[1] == 'build': +- try: +- pcap_config = cPickle.load(open(pcap_cache)) +- except IOError: +- print >>sys.stderr, 'run "%s config" first!' % sys.argv[0] +- sys.exit(1) + ++ ++pcap_config = f_pcap_config([pcap_location]) + pcap = Extension(name='pcap', + sources=[ 'pcap.c', 'pcap_ex.c' ], + include_dirs=pcap_config.get('include_dirs', ''), +@@ -89,7 +69,7 @@ + libraries=pcap_config.get('libraries', ''), + extra_compile_args=pcap_config.get('extra_compile_args', '')) + +-pcap_cmds = { 'config':config_pcap, 'clean':clean_pcap } ++pcap_cmds = { 'clean':clean_pcap } + + setup(name='pcap', + version='1.1', diff --git a/lang/pypcap/patches/001-python2_5.patch b/lang/pypcap/patches/001-python2_5.patch new file mode 100644 index 0000000..d2bb3a0 --- /dev/null +++ b/lang/pypcap/patches/001-python2_5.patch @@ -0,0 +1,11 @@ +--- pypcap-1.1-old/pcap.pyx 2005-10-16 18:00:11.000000000 -0500 ++++ pypcap-1.1/pcap.pyx 2007-06-12 11:11:41.000000000 -0500 +@@ -285,7 +285,7 @@ + &ctx) + if ctx.got_exc: + exc = sys.exc_info() +- raise exc[0], exc[1], exc[2] ++ raise OSError, "%s [%s]" % (exc[0], exc[1]), exc[2] + return n + + def loop(self, callback, *args): diff --git a/lang/pyqt4/Makefile b/lang/pyqt4/Makefile new file mode 100644 index 0000000..2763d0e --- /dev/null +++ b/lang/pyqt4/Makefile @@ -0,0 +1,154 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pyqt4 +PKG_VERSION:=4.8.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=PyQt-x11-gpl-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://bu3sch.de/pyqt4/ +PKG_MD5SUM:=d54fd1c37a74864faf42709c8102f254 +PKG_BUILD_DIR:=$(BUILD_DIR)/PyQt-x11-gpl-$(PKG_VERSION) +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +PKG_BUILD_DEPENDS:=python-sip/host + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) +$(call include_mk, python-sip-package.mk) + +define Package/pyqt4 + SECTION:=language-python + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Python QT4 + MAINTAINER:=Michael Buesch + URL:=http://www.riverbankcomputing.co.uk/software/pyqt/download + DEPENDS:=+qt4 +qt4-gui +dbus-python +python +python-sip @FEATURE_drawing-backend_libX11 +endef + +define Package/pyqt4/Description + Python QT4 framework bindings. +endef + +TARGET_INCDIRS+=$(STAGING_DIR)/include \ + $(STAGING_DIR)/usr/include \ + $(STAGING_DIR)/usr/include/Qt \ + $(STAGING_DIR)/usr/include/Qt3Support \ + $(STAGING_DIR)/usr/include/QtCore \ + $(STAGING_DIR)/usr/include/QtDBus \ + $(STAGING_DIR)/usr/include/QtGui \ + $(STAGING_DIR)/usr/include/QtNetwork \ + $(STAGING_DIR)/usr/include/QtSql \ + $(STAGING_DIR)/usr/include/QtSvg \ + $(STAGING_DIR)/usr/include/QtTest \ + $(STAGING_DIR)/usr/include/QtXml \ + $(STAGING_DIR)/usr/include/python$(PYTHON_VERSION) \ + $(STAGING_DIR)/usr/lib/dbus-1.0/include \ + $(TOOLCHAIN_DIR)/include \ + $(TOOLCHAIN_DIR)/usr/include + +TARGET_LIBDIRS+=$(STAGING_DIR)/lib \ + $(STAGING_DIR)/usr/lib \ + $(TOOLCHAIN_DIR)/lib \ + $(TOOLCHAIN_DIR)/usr/lib + +EXTRA_CFLAGS:= +EXTRA_LDFLAGS:=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ + -Wl,-rpath=/usr/lib/ + +QTDIRSFILE:=$(PKG_BUILD_DIR)/qtdirs.out +SIPCFGFILE:=$(PKG_BUILD_DIR)/sipconfig.macros + +QT_VERSION:=./files/qt_versioning.sh version "$(STAGING_DIR)/usr/include" "$(PKG_BUILD_DIR)/qtver.tmp" +QT_EDITION:=./files/qt_versioning.sh edition "$(STAGING_DIR)/usr/include" "$(PKG_BUILD_DIR)/qtver.tmp" + +# Welcome to cross compilation hell. Dinner is served! + +define Build/Configure + echo "$(STAGING_DIR)/usr" > $(QTDIRSFILE) + echo "$(STAGING_DIR)/usr/include" >> $(QTDIRSFILE) + echo "$(STAGING_DIR)/usr/lib" >> $(QTDIRSFILE) + echo "$(STAGING_DIR)/usr/bin" >> $(QTDIRSFILE) + echo "$(STAGING_DIR)/usr/share" >> $(QTDIRSFILE) + echo "$(STAGING_DIR)/usr/lib/Qt/plugins" >> $(QTDIRSFILE) + $(QT_VERSION) >> $(QTDIRSFILE) + $(QT_EDITION) >> $(QTDIRSFILE) + echo "Open Source" >> $(QTDIRSFILE) + echo "shared" >> $(QTDIRSFILE) + + $(CP) "$(PYTHON_SIP_CONFIG_TEMPLATE)" "$(SIPCFGFILE)" + echo "INCDIR_QT $(STAGING_DIR)/usr/include" >> $(SIPCFGFILE) + echo "LIBDIR_QT $(STAGING_DIR)/usr/lib" >> $(SIPCFGFILE) + echo "MOC $(STAGING_DIR_HOST)/bin/moc" >> $(SIPCFGFILE) + echo "QT_INSTALL_BINS $(STAGING_DIR)/usr/bin" >> $(SIPCFGFILE) + echo "QT_INSTALL_HEADERS $(STAGING_DIR)/usr/include" >> $(SIPCFGFILE) + echo "QT_INSTALL_LIBS $(STAGING_DIR)/usr/lib" >> $(SIPCFGFILE) + echo "INCDIR $(TARGET_INCDIRS)" >> $(SIPCFGFILE) + echo "INCDIR_OPENGL $(TARGET_INCDIRS)" >> $(SIPCFGFILE) + echo "INCDIR_X11 $(TARGET_INCDIRS)" >> $(SIPCFGFILE) + echo "LIBDIR $(TARGET_LIBDIRS)" >> $(SIPCFGFILE) + echo "LIBDIR_OPENGL $(TARGET_LIBDIRS)" >> $(SIPCFGFILE) + echo "LIBDIR_X11 $(TARGET_LIBDIRS)" >> $(SIPCFGFILE) + + $(call HostPython, \ + cd "$(PKG_BUILD_DIR)"; \ + , \ + ./configure.py \ + --use-arch="$(ARCH)" \ + --qmake="$(STAGING_DIR_HOST)/bin/qmake" \ + --qmake-spec="$(STAGING_DIR)/usr/share/mkspecs/linux-openwrt-g++" \ + --qmake-prefix='TARGET_CC="$(TARGET_CROSS)gcc"' \ + --qmake-prefix='TARGET_CXX="$(TARGET_CROSS)g++"' \ + --qmake-prefix='TARGET_AR="$(TARGET_CROSS)ar cqs"' \ + --qmake-prefix='TARGET_OBJCOPY="$(TARGET_CROSS)objcopy"' \ + --qmake-prefix='TARGET_RANLIB="$(TARGET_CROSS)ranlib"' \ + --qmake-prefix='TARGET_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)"' \ + --qmake-prefix='TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)"' \ + --qmake-prefix='TARGET_LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)"' \ + --qmake-prefix='TARGET_INCDIRS="$(TARGET_INCDIRS)"' \ + --qmake-prefix='TARGET_LIBDIRS="$(TARGET_LIBDIRS)"' \ + --qmake-prefix='STAGING_DIR_HOST="$(STAGING_DIR)/../host"' \ + --qtdirs-file="$(QTDIRSFILE)" \ + --host-sip-bin="$(STAGING_DIR_HOST)/usr/bin/sip" \ + --sipconfig-macros="$(SIPCFGFILE)" \ + --dbus="$(STAGING_DIR)/usr/include/dbus-1.0" \ + --bindir="$(PKG_INSTALL_DIR)/usr/bin" \ + --destdir="$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)" \ + --plugin-destdir="$(PKG_INSTALL_DIR)/usr/lib/Qt/plugins" \ + --pydbus-installdir="$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)" \ + --sipdir="$(PKG_INSTALL_DIR)/usr/share/sip" \ + --protected-is-public \ + --crosscompile \ + --no-designer-plugin \ + --no-qsci-api \ + --confirm-license \ + --verbose \ + ) + ./files/fixup.sh "$(PKG_BUILD_DIR)" +endef + +define Build/Compile + $(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) +endef + +define Build/Install + $(MAKE_VARS) DESTDIR="" $(MAKE) -C $(PKG_BUILD_DIR) install +endef + +define Package/pyqt4/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/$(PYTHON_PKG_DIR)/PyQt4 + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{pylupdate4,pyrcc4,pyuic4} $(1)/usr/bin + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)/qt.so $(1)/$(PYTHON_PKG_DIR) + $(CP) $(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)/PyQt4 $(1)/$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,pyqt4)) diff --git a/lang/pyqt4/files/fixup.sh b/lang/pyqt4/files/fixup.sh new file mode 100755 index 0000000..c4203a0 --- /dev/null +++ b/lang/pyqt4/files/fixup.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -e +PKG_BUILD_DIR="$1" + +# SIP uses PyLong_FromUnsignedLong to convert from void * to +# PyLong. This results in a compilation error for the implicit cast +# on C++ compilers. Make an explicit cast. +sed -i -e 's/PyLong_FromUnsignedLong(/PyLong_FromUnsignedLong((unsigned long)/g' $PKG_BUILD_DIR/QtCore/sipQtCoreQThread.cpp + diff --git a/lang/pyqt4/files/qt_versioning.sh b/lang/pyqt4/files/qt_versioning.sh new file mode 100755 index 0000000..ec4fe94 --- /dev/null +++ b/lang/pyqt4/files/qt_versioning.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +die() +{ + echo "PyQt qt_versioning.sh: $*" >&2 + exit 1 +} + +[ $# -eq 3 ] || die "Invalid arguments" + +action="$1" +qtincdir="$2" +tmpfile="$3" + +cp -f "$qtincdir/QtCore/qglobal.h" "$tmpfile" || die "cp failed" +echo "int QT_VERSION_IS = QT_VERSION;" >> "$tmpfile" || die "patching failed (1)" +echo "int QT_EDITION_IS = QT_EDITION;" >> "$tmpfile" || die "patching failed (2)" +# First resolve all preprocessor macros +cpp -x c++ -traditional-cpp "-I$qtincdir" "$tmpfile" > "$tmpfile.processed" || die "CPP failed" + +if [ "$action" = "version" ]; then + raw="$(grep -e 'QT_VERSION_IS' "$tmpfile.processed" | cut -d'=' -f2 | cut -d';' -f1)" +elif [ "$action" = "edition" ]; then + raw="$(grep -e 'QT_EDITION_IS' "$tmpfile.processed" | cut -d'=' -f2 | cut -d';' -f1)" +else + die "Invalid action" +fi +# We use python to evaluate the arithmetic C++ expression. Languages are similar +# enough in that area for this to succeed. +python -c "print \"%d\" % ($raw)" || die "C++ evaluation failed" + +exit 0 diff --git a/lang/pyqt4/patches/100-cross-compile.patch b/lang/pyqt4/patches/100-cross-compile.patch new file mode 100644 index 0000000..6d8cbe4 --- /dev/null +++ b/lang/pyqt4/patches/100-cross-compile.patch @@ -0,0 +1,376 @@ +Index: PyQt-x11-gpl-4.8.3/configure.py +=================================================================== +--- PyQt-x11-gpl-4.8.3.orig/configure.py 2011-01-23 11:08:20.000000000 +0100 ++++ PyQt-x11-gpl-4.8.3/configure.py 2011-03-13 15:03:08.279673485 +0100 +@@ -33,6 +33,7 @@ import os + import glob + import optparse + import shutil ++import re + + import sipconfig + +@@ -184,25 +185,17 @@ def create_optparser(): + "in the header comments of generated code [default: include " + "timestamps]") + +- if sys.platform != 'win32': +- if sys.platform in ('linux2', 'darwin'): +- pip_default = True +- pip_default_str = "enabled" +- else: +- pip_default = False +- pip_default_str = "disabled" +- +- g.add_option("--protected-is-public", action="store_true", +- default=pip_default, dest="prot_is_public", +- help="enable building with 'protected' redefined as 'public' " +- "[default: %s]" % pip_default_str) +- g.add_option("--protected-not-public", action="store_false", +- dest="prot_is_public", +- help="disable building with 'protected' redefined as 'public'") +- g.add_option("-q", "--qmake", action="callback", metavar="FILE", +- default=qmake, dest="qmake", callback=store_abspath_file, +- type="string", +- help="the pathname of qmake [default: %s]" % (qmake or "none")) ++ g.add_option("--protected-is-public", action="store_true", ++ default=True, dest="prot_is_public", ++ help="enable building with 'protected' redefined as 'public' " ++ "[default: True]") ++ g.add_option("--protected-not-public", action="store_false", ++ dest="prot_is_public", ++ help="disable building with 'protected' redefined as 'public'") ++ g.add_option("-q", "--qmake", action="callback", metavar="FILE", ++ default=qmake, dest="qmake", callback=store_abspath_file, ++ type="string", ++ help="the pathname of qmake [default: %s]" % (qmake or "none")) + + g.add_option("-s", "--dbus", action="callback", metavar="DIR", + dest="pydbusincdir", callback=store_abspath_dir, type="string", +@@ -210,13 +203,13 @@ def create_optparser(): + "[default: supplied by pkg-config]") + p.add_option_group(g) + +- if sys.platform == 'darwin': +- g = optparse.OptionGroup(p, title="MacOS X Configuration") +- g.add_option("--use-arch", action="store", metavar="ARCH", +- dest="use_arch", choices=["i386", "x86_64", "ppc"], +- help="the architecture to use when running pyuic4 " +- "[default: system default]") +- p.add_option_group(g) ++ g = optparse.OptionGroup(p, title="Arch Configuration") ++ g.add_option("--use-arch", action="store", metavar="ARCH", ++ dest="use_arch", choices=["", "i386", "x86_64", "ppc", "arm"], ++ default="", ++ help="the architecture to use when running pyuic4 " ++ "[default: system default]") ++ p.add_option_group(g) + + # Installation. + g = optparse.OptionGroup(p, title="Installation") +@@ -275,12 +268,42 @@ def create_optparser(): + "QTDIR/qsci]") + p.add_option_group(g) + ++ # Crosscompilation ++ g = optparse.OptionGroup(p, title="Crosscompilation") ++ g.add_option("--crosscompile", action="store_true", ++ default=False, dest="crosscompile", ++ help="Set, if cross-compiling") ++ g.add_option("--host-sip-bin", action="callback", metavar="FILE", ++ default=None, dest="host_sip_bin", type="string", ++ callback=store_abspath_file, ++ help="Path to the host SIP binary") ++ g.add_option("--sipconfig-macros", action="callback", metavar="FILE", ++ default=None, dest="sipconfig_macros", type="string", ++ callback=store_abspath_file, ++ help="Path to a file containing sipconfig macros") ++ g.add_option("--qmake-prefix", action="append", ++ default=[], dest="qmake_prefixes", type="string", ++ help="Commandline prefix to qmake") ++ g.add_option("--qmake-spec", action="callback", metavar="FILE", ++ default=None, dest="qmake_spec", callback=store_abspath, ++ type="string", ++ help="the pathname to qmake spec file") ++ g.add_option("--qtdirs-file", action="callback", metavar="FILE", ++ default=None, dest="qtdirs_file", callback=store_abspath_file, ++ type="string", ++ help="Path to a predefined qtdirs file") ++ g.add_option("--pydbus-installdir", action="callback", metavar="DIR", ++ default=None, dest="pydbus_installdir", callback=store_abspath, ++ type="string", ++ help="Install dir for pydbus module") ++ p.add_option_group(g) ++ + return p + + + class pyrccMakefile(sipconfig.ProgramMakefile): + """This class implements the Makefile for pyrcc. This is specialised so +- that pyrcc is automatically run against the examples. ++ that pyrcc is automatically run against the examples, if not crosscompiling. + """ + + def __init__(self): +@@ -294,6 +317,8 @@ class pyrccMakefile(sipconfig.ProgramMak + def generate_target_default(self, mfile): + """Generate the default target.""" + sipconfig.ProgramMakefile.generate_target_default(self, mfile) ++ if opts.crosscompile: ++ return + + # The correct call to pyrcc depends on the Python version. + if sys.hexversion >= 0x03000000: +@@ -807,7 +832,7 @@ include(%s) + + f.close() + +- run_command("%s %s %s" % (opts.qmake, qmake_args, wrapped_pro)) ++ run_qmake("%s %s" % (qmake_args, wrapped_pro)) + os.chdir(cwd) + + sipconfig.inform("Creating QPy support libraries Makefile...") +@@ -861,12 +886,16 @@ include(%s) + # not on Windows (so that normal console use will work). + sipconfig.inform("Creating pyuic4 wrapper...") + +- if sys.platform == 'darwin': +- gui = True ++ if opts.use_arch: ++ gui = False#FIXME + use_arch = opts.use_arch + else: +- gui = False +- use_arch = '' ++ if sys.platform == 'darwin': ++ gui = True ++ use_arch = opts.use_arch ++ else: ++ gui = False ++ use_arch = '' + + # The pyuic directory may not exist if we are building away from the + # source directory. +@@ -926,6 +955,7 @@ include(%s) + + abi = getattr(sys, 'abiflags', '') + ++ print "FIXME CROSSCOMPILE" #FIXME: Crosscompile + if sys.platform == 'win32': + # Use abiflags in case it is supported in a future version. + lib_dir_flag = quote("-L%s" % sipcfg.py_lib_dir) +@@ -988,7 +1018,7 @@ include(%s) + fout.write(prj) + fout.close() + +- run_command("%s %s" % (opts.qmake, qmake_args)) ++ run_qmake(qmake_args) + os.chdir(cwd) + + tool.append("designer") +@@ -1106,6 +1136,14 @@ def create_config(module, template, macr + sipconfig.create_config_module(module, template, content, macros) + + ++def run_qmake(args): ++ pfx = " ".join(opts.qmake_prefixes) ++ if opts.qmake_spec: ++ spec = "-spec \"" + opts.qmake_spec + "\"" ++ else: ++ spec = "" ++ run_command(pfx + " " + opts.qmake + " " + spec + " " + args) ++ + def run_command(cmd, envvars=None): + """Run a command and display the output if verbose mode is enabled. + +@@ -1334,30 +1372,38 @@ def check_dbus(): + """ + sipconfig.inform("Checking to see if the dbus support module should be built...") + +- sout = get_command_stdout("pkg-config --cflags-only-I --libs dbus-1") +- iflags = sout.read().strip() ++ if opts.crosscompile and not opts.pydbusincdir: ++ sipconfig.inform("Crosscompiling but no dbus incdir specified. Disabling dbus.") ++ return ++ ++ if not opts.crosscompile: ++ sout = get_command_stdout("pkg-config --cflags-only-I --libs dbus-1") ++ iflags = sout.read().strip() ++ ++ if not iflags: ++ sipconfig.inform("DBus v1 does not seem to be installed.") ++ return ++ ++ # Using str() means it will work with both Python v2 and v3. ++ for f in str(iflags).split(): ++ if f.startswith("-I"): ++ dbusincdirs.append(f[2:]) ++ elif f.startswith("-L"): ++ dbuslibdirs.append(f[2:]) ++ elif f.startswith("-l"): ++ dbuslibs.append(f[2:]) + +- if not iflags: +- sipconfig.inform("DBus v1 does not seem to be installed.") +- return +- +- # Using str() means it will work with both Python v2 and v3. +- for f in str(iflags).split(): +- if f.startswith("-I"): +- dbusincdirs.append(f[2:]) +- elif f.startswith("-L"): +- dbuslibdirs.append(f[2:]) +- elif f.startswith("-l"): +- dbuslibs.append(f[2:]) +- +- try: +- import dbus.mainloop +- except: +- sipconfig.inform("The Python dbus module doesn't seem to be installed.") +- return ++ try: ++ import dbus.mainloop ++ except: ++ sipconfig.inform("The Python dbus module doesn't seem to be installed.") ++ return + + global pydbusmoddir +- pydbusmoddir = dbus.mainloop.__path__[0] ++ if opts.pydbus_installdir: ++ pydbusmoddir = opts.pydbus_installdir ++ else: ++ pydbusmoddir = dbus.mainloop.__path__[0] + + # Try and find dbus-python.h. We don't use pkg-config because it is broken + # for dbus-python (at least for versions up to and including v0.81.0). +@@ -1443,6 +1489,7 @@ def set_sip_flags(pyqt): + + pyqt is the configuration instance. + """ ++ #FIXME: Needs some crosscompile fixes. + # If we don't check for signed interpreters, we exclude the 'VendorID' + # feature + if not opts.vendorcheck: +@@ -1588,7 +1635,10 @@ def generate_code(mname, extra_include_d + needed_qt_libs(mname, qt_libs) + + # Build the SIP command line. +- argv = ['"' + sipcfg.sip_bin + '"', '-w'] ++ sip_bin = sipcfg.sip_bin ++ if opts.host_sip_bin: ++ sip_bin = opts.host_sip_bin ++ argv = ['"' + sip_bin + '"', '-w'] + + if opts.no_timestamp: + argv.append("-T") +@@ -1890,6 +1940,8 @@ def check_qt_installation(macros): + def fix_qmake_args(args=""): + """Make any platform specific adjustments to the arguments passed to qmake. + """ ++ if opts.crosscompile: ++ return args + if sys.platform == "darwin": + # The Qt binary installer has macx-xcode as the default. + args = "-spec %s %s" % (sipcfg.platform, args) +@@ -2041,7 +2093,7 @@ int main(int, char **) + + # Create the makefile, first making sure it doesn't already exist. + remove_file(make_file) +- run_command("%s %s %s" % (opts.qmake, qmake_args, pro_file)) ++ run_qmake("%s %s" % (qmake_args, pro_file)) + + if not os.access(make_file, os.F_OK): + sipconfig.error("%s failed to create a makefile. %s" % (opts.qmake, MSG_CHECK_QMAKE)) +@@ -2063,15 +2115,30 @@ int main(int, char **) + if not os.access(exe_file, os.X_OK): + sipconfig.error("Failed to determine the layout of your Qt installation. Try again using the --verbose flag to see more detail about the problem.") + +- # Create the output file, first making sure it doesn't exist. +- remove_file(out_file) +- run_command(exe_file) ++ if opts.qtdirs_file: ++ # The user supplied a partial qtdirs.out file. We're probably crosscompiling. ++ # Do _not_ try to execute our qtdirs exe. Take the supplied qtdirs.out files ++ # instead and add the PyQt_... flags by grepping through the executable. ++ # This assumes the executable is not compiled with -O0. ++ read_qtdirs_file(opts.qtdirs_file) ++ global qt_xfeatures ++ print("Got %d features from qtdirs.out file: %s" % (len(qt_xfeatures), str(qt_xfeatures))) ++ found = re.findall(r'PyQt_[\w]+', file(exe_file, "r").read()) ++ print("Grepped %d features from qtdirs.exe file: %s" % (len(found), str(found))) ++ qt_xfeatures.extend(found) ++ else: ++ # Create the output file, first making sure it doesn't exist. ++ remove_file(out_file) ++ run_command(exe_file) ++ ++ if not os.access(out_file, os.F_OK): ++ sipconfig.error("%s failed to create %s. Make sure your Qt v4 installation is correct." % (exe_file, out_file)) + +- if not os.access(out_file, os.F_OK): +- sipconfig.error("%s failed to create %s. Make sure your Qt v4 installation is correct." % (exe_file, out_file)) ++ # Read the directories. ++ read_qtdirs_file(out_file) + +- # Read the directories. +- f = open(out_file, "r") ++def read_qtdirs_file(filename): ++ f = open(filename, "r") + lines = f.read().strip().split("\n") + f.close() + +@@ -2136,6 +2203,24 @@ int main(int, char **) + sipconfig.error("Qt has been built as static libraries so either the -g or -k argument should be used.") + + ++def load_sipconfig_macros(filename): ++ macros = {} ++ fd = file(filename, "r") ++ for line in fd.readlines(): ++ line = line.split() ++ try: ++ key = line[0] ++ except IndexError: ++ sipconfig.error("Invalid sipconfig macros file format") ++ value = "" ++ try: ++ value = " ".join(line[1:]) ++ except IndexError: ++ pass ++ macros[key] = value ++ return macros ++ ++ + def main(): + """Create the configuration module module. + """ +@@ -2154,7 +2239,7 @@ def main(): + opts.no_timestamp = False + + # Provide defaults for platform-specific options. +- if sys.platform == 'win32': ++ if sys.platform == 'win32' and not opts.crosscompile: + opts.qmake = find_default_qmake() + opts.prot_is_public = False + +@@ -2187,12 +2272,14 @@ def main(): + # Install the API file if the default directory exists. + opts.api = os.path.isdir(opts.qscidir) + +- # Replace the existing build macros with the ones from the Qt installation. +- macros = get_build_macros(args) +- +- if macros is None: +- p.print_help() +- sys.exit(2) ++ if opts.sipconfig_macros: ++ macros = load_sipconfig_macros(opts.sipconfig_macros) ++ else: ++ # Replace the existing build macros with the ones from the Qt installation. ++ macros = get_build_macros(args) ++ if macros is None: ++ p.print_help() ++ sys.exit(2) + + sipcfg.set_build_macros(macros) + diff --git a/lang/pyserial/Makefile b/lang/pyserial/Makefile new file mode 100644 index 0000000..aed6919 --- /dev/null +++ b/lang/pyserial/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pyserial +PKG_VERSION:=2.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/pyserial +PKG_MD5SUM:=eec19df59fd75ba5a136992897f8e468 + +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/pyserial + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=pyserial + URL:=http://pyserial.sourceforge.net + DEPENDS:=+python-mini +endef + +define Package/pyserial/description + serial port python bindings +endef + +define Build/Compile + $(call Build/Compile/PyMod,., \ + install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \ + ) +endef + +define Package/pyserial/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR)/ +endef + +$(eval $(call BuildPackage,pyserial)) diff --git a/lang/pysqlite/Makefile b/lang/pysqlite/Makefile new file mode 100644 index 0000000..1c77bbc --- /dev/null +++ b/lang/pysqlite/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pysqlite +PKG_VERSION:=2.3.5 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://initd.org/pub/software/pysqlite/releases/2.3/2.3.5/ +PKG_MD5SUM:=b4a185e936848370fcc1a5b17755b641 + +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/python-sqlite + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=SQLite database adapter for Python + URL:=http://www.initd.org/tracker/pysqlite/wiki/pysqlite + DEPENDS:=+python-mini +libsqlite3 +endef + +define Package/python-sqlite/description + This package contains an SQLite database adapter for the Python + programming language. +endef + +define PyPackage/python-sqlite/filespec ++|$(PYTHON_PKG_DIR)/pysqlite2 +-|$(PYTHON_PKG_DIR)/pysqlite2/test +endef + +define Build/Configure + cp ./files/setup.cfg.in $(PKG_BUILD_DIR)/setup.cfg + $(SED) \ + 's,@INCLUDE_DIRS@,$(STAGING_DIR)/usr/include,g' \ + -e 's,@INCLUDE_DIRS@,$(STAGING_DIR)/usr/include,g' \ + $(PKG_BUILD_DIR)/setup.cfg +endef + +define Build/Compile + $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) + $(call Build/Compile/PyMod,., \ + install --prefix="$(PKG_INSTALL_DIR)/usr", \ + ) +endef + +$(eval $(call PyPackage,python-sqlite)) +$(eval $(call BuildPackage,python-sqlite)) diff --git a/lang/pysqlite/files/setup.cfg.in b/lang/pysqlite/files/setup.cfg.in new file mode 100644 index 0000000..50f04cd --- /dev/null +++ b/lang/pysqlite/files/setup.cfg.in @@ -0,0 +1,5 @@ +[build_ext] +define= +include_dirs=@INCLUDE_DIRS@ +library_dirs=@LIBRARY_DIRS@ +libraries=sqlite3 diff --git a/lang/python-cjson/Makefile b/lang/python-cjson/Makefile new file mode 100644 index 0000000..ce6dc2d --- /dev/null +++ b/lang/python-cjson/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-cjson +PKG_VERSION:=1.0.5 +PKG_RELEASE:=1 + +PKG_SOURCE:=python-cjson-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pypi.python.org/packages/source/p/python-cjson/ +PKG_MD5SUM:=4d55b66ecdf0300313af9d030d9644a3 + +PKG_BUILD_DIR:=$(BUILD_DIR)/python-cjson-$(PKG_VERSION) +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/python-cjson + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=python-cjson + URL:=http://pypi.python.org/pypi/python-cjson/ + DEPENDS:=+python +endef + +define Package/python-cjson/description + Fast JSON encoder/decoder for Python +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr") +endef + +define Package/python-cjson/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,python-cjson)) diff --git a/lang/python-cjson/patches/001-unicode-buffer-overflow.patch b/lang/python-cjson/patches/001-unicode-buffer-overflow.patch new file mode 100644 index 0000000..21c4994 --- /dev/null +++ b/lang/python-cjson/patches/001-unicode-buffer-overflow.patch @@ -0,0 +1,79 @@ +=== modified file 'cjson.c' +--- a/cjson.c 2007-08-24 16:12:17 +0000 ++++ b/cjson.c 2010-05-26 05:05:55 +0000 +@@ -613,6 +613,25 @@ + char *p; + + static const char *hexdigit = "0123456789abcdef"; ++#ifdef Py_UNICODE_WIDE ++ const Py_ssize_t expandsize = 10; ++#else ++ const Py_ssize_t expandsize = 6; ++#endif ++ ++ /* Initial allocation is based on the longest-possible unichr ++ escape. ++ ++ In wide (UTF-32) builds '\U00xxxxxx' is 10 chars per source ++ unichr, so in this case it's the longest unichr escape. In ++ narrow (UTF-16) builds this is five chars per source unichr ++ since there are two unichrs in the surrogate pair, so in narrow ++ (UTF-16) builds it's not the longest unichr escape. ++ ++ In wide or narrow builds '\uxxxx' is 6 chars per source unichr, ++ so in the narrow (UTF-16) build case it's the longest unichr ++ escape. ++ */ + + s = PyUnicode_AS_UNICODE(unicode); + size = PyUnicode_GET_SIZE(unicode); +@@ -623,7 +642,7 @@ + return NULL; + } + +- repr = PyString_FromStringAndSize(NULL, 2 + 6*size + 1); ++ repr = PyString_FromStringAndSize(NULL, 2 + expandsize*size + 1); + if (repr == NULL) + return NULL; + +@@ -644,15 +663,6 @@ + #ifdef Py_UNICODE_WIDE + /* Map 21-bit characters to '\U00xxxxxx' */ + else if (ch >= 0x10000) { +- int offset = p - PyString_AS_STRING(repr); +- +- /* Resize the string if necessary */ +- if (offset + 12 > PyString_GET_SIZE(repr)) { +- if (_PyString_Resize(&repr, PyString_GET_SIZE(repr) + 100)) +- return NULL; +- p = PyString_AS_STRING(repr) + offset; +- } +- + *p++ = '\\'; + *p++ = 'U'; + *p++ = hexdigit[(ch >> 28) & 0x0000000F]; + +=== modified file 'jsontest.py' +--- a/jsontest.py 2007-08-24 16:12:17 +0000 ++++ b/jsontest.py 2010-05-26 05:05:55 +0000 +@@ -316,6 +316,18 @@ + + def testWriteLong(self): + self.assertEqual("12345678901234567890", cjson.encode(12345678901234567890)) ++ ++ def testWriteLongUnicode(self): ++ # This test causes a buffer overrun in cjson 1.0.5, on UCS4 builds. ++ # The string length is only resized for wide unicode characters if ++ # there is less than 12 bytes of space left. Padding with ++ # narrow-but-escaped characters prevents string resizing. ++ # Note that u'\U0001D11E\u1234' also breaks, but sometimes goes ++ # undetected. ++ s = cjson.encode(u'\U0001D11E\U0001D11E\U0001D11E\U0001D11E' ++ u'\u1234\u1234\u1234\u1234\u1234\u1234') ++ self.assertEqual(r'"\U0001d11e\U0001d11e\U0001d11e\U0001d11e' ++ r'\u1234\u1234\u1234\u1234\u1234\u1234"', s) + + def main(): + unittest.main() + + diff --git a/lang/python-crypto/Makefile b/lang/python-crypto/Makefile new file mode 100644 index 0000000..f1cd777 --- /dev/null +++ b/lang/python-crypto/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pycrypto +PKG_VERSION:=2.0.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.amk.ca/files/python/crypto/ +PKG_MD5SUM:=4d5674f3898a573691ffb335e8d749cd + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/python-crypto + SECTION:=lang-python + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=python-crypto + URL:=http://www.pycrypto.org/ + DEPENDS:=+python +libgmp +endef + +define Package/python-crypto/description +A collection of both secure hash functions (such as MD5 and SHA), +and various encryption algorithms (AES, DES, IDEA, RSA, ElGamal, etc.). +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/python-crypto/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/ + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR)/ +endef + +$(eval $(call BuildPackage,python-crypto)) diff --git a/lang/python-curl/Makefile b/lang/python-curl/Makefile new file mode 100644 index 0000000..e2f106a --- /dev/null +++ b/lang/python-curl/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pycurl +PKG_VERSION:=7.19.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pycurl.sourceforge.net/download/ +PKG_MD5SUM:= + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/python-curl + SECTION:=language-python + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=python-curl + URL:=http://sourceforge.net/projects/pycurl + DEPENDS:=+python +libcurl +endef + +define Package/python-curl/description +Python module interface to the cURL library. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) +endef + +define Package/python-curl/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,python-curl)) diff --git a/lang/python-curl/patches/001-no_static.patch b/lang/python-curl/patches/001-no_static.patch new file mode 100644 index 0000000..3aa7706 --- /dev/null +++ b/lang/python-curl/patches/001-no_static.patch @@ -0,0 +1,12 @@ +--- a/setup.py ++++ b/setup.py +@@ -97,8 +97,7 @@ else: + else: + extra_compile_args.append(e) + libs = split_quoted( +- os.popen("'%s' --libs" % CURL_CONFIG).read()+\ +- os.popen("'%s' --static-libs" % CURL_CONFIG).read()) ++ os.popen("'%s' --libs" % CURL_CONFIG).read()) + for e in libs: + if e[:2] == "-l": + libraries.append(e[2:]) diff --git a/lang/python-dbus/Makefile b/lang/python-dbus/Makefile new file mode 100644 index 0000000..79becc9 --- /dev/null +++ b/lang/python-dbus/Makefile @@ -0,0 +1,72 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dbus-python +PKG_VERSION:=0.83.0 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus-python/ +PKG_MD5SUM:=562c78876219bf458d79a041af18293d + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +$(call include_mk, python-package.mk) + + +TARGET_LDFLAGS += \ + -Wl,-rpath=$(STAGING_DIR)/usr/lib + +define Package/dbus-python + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Python bindings for dbus + URL:=http://dbus.freedesktop.org/ + DEPENDS:=+python +python-expat +libdbus-glib +endef + +define Package/dbus-python/description + Python bindings for dbus. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/dbus-1.0/dbus + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/dbus-1.0/dbus/* \ + $(1)/usr/include/dbus-1.0/dbus/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig +endef + +define Package/dbus-python/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/*.{py,so} \ + $(1)$(PYTHON_PKG_DIR) + + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/dbus + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/dbus/*.py \ + $(1)$(PYTHON_PKG_DIR)/dbus + + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/dbus/mainloop + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/dbus/mainloop/*.py \ + $(1)$(PYTHON_PKG_DIR)/dbus/mainloop + +endef + +$(eval $(call BuildPackage,dbus-python)) diff --git a/lang/python-gnome-desktop2/Makefile b/lang/python-gnome-desktop2/Makefile new file mode 100644 index 0000000..cc971a5 --- /dev/null +++ b/lang/python-gnome-desktop2/Makefile @@ -0,0 +1,88 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gnome-python-desktop +PKG_VERSION:=2.22.0 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.22 +PKG_MD5SUM:=504877a973f6abc0788283232cd703cb +PKG_FIXUP:=libtool + +# AM_PATH_GTK_2_0 +PKG_BUILD_DEPENDS:=gtk2 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +$(call include_mk, python-package.mk) + +PKG_INSTALL=1 + +EXTRA_CFLAGS += -I$(ICONV_PREFIX) -I$(INTL_PREFIX) +EXTRA_LDFLAGS += -L$(ICONV_PREFIX) -L$(INTL_PREFIX) + +STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_python-rsvg CONFIG_PACKAGE_python-wnck) + +define Package/python-gnome-desktop/Default + SECTION:=lang + SUBMENU:=Python + CATEGORY:=Languages + TITLE:=$(1) python bindings + URL:=http://ftp.gnome.org/ + DEPENDS:=+python-mini python-gtk $(2) +endef + +define Package/python-rsvg + $(call Package/python-gnome-desktop/Default,librsvg,+librsvg +pycairo) +endef + +define Package/python-wnck + $(call Package/python-gnome-desktop/Default,libwnck,+PACKAGE_python-wnck:libwnck) +endef + +define Build/Configure + $(call Build/Configure/Default, \ + $(if $(CONFIG_PACKAGE_python-rsvg), --enable-rsvg, --disable-rsvg) \ + $(if $(CONFIG_PACKAGE_python-wnck), --enable-wnck, --disable-wnck) \ + ) +endef + +MAKE_INSTALL_FLAGS += \ + PYGTK_DEFSDIR="$(PKG_INSTALL_DIR)/usr/share/pygtk/2.0/defs" + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ + $(1)/usr/lib/pkgconfig/ + + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0 + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/*.{a,la,so} \ + $(1)$(PYTHON_PKG_DIR)/gtk-2.0/ +endef + +define Package/python-gnome-desktop/install/Default + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0 + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/$(2).so \ + $(1)$(PYTHON_PKG_DIR)/gtk-2.0/ +endef + +define Package/python-rsvg/install + $(call Package/python-gnome-desktop/install/Default,$(1),rsvg) +endef + +define Package/python-wnck/install + $(call Package/python-gnome-desktop/install/Default,$(1),wnck) +endef + +$(eval $(call BuildPackage,python-rsvg)) +$(eval $(call BuildPackage,python-wnck)) + diff --git a/lang/python-ifconfig/Makefile b/lang/python-ifconfig/Makefile new file mode 100644 index 0000000..d16baf2 --- /dev/null +++ b/lang/python-ifconfig/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-ifconfig +PKG_VERSION:=0.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=python-ifconfig-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://python-ifconfig.googlecode.com/files/ +PKG_MD5SUM:=6d780d29c1df1acc17195bde7be0e394 + +PKG_BUILD_DIR:=$(BUILD_DIR)/python-ifconfig-$(PKG_VERSION) +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/python-ifconfig + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=python-ifconfig + URL:=http://code.google.com/p/python-ifconfig/ + DEPENDS:=+python +endef + +define Package/python-ifconfig/description + Display network interface status. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr") +endef + +define Package/python-ifconfig/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,python-ifconfig)) diff --git a/lang/python-ifconfig/patches/001-errorcheck.patch b/lang/python-ifconfig/patches/001-errorcheck.patch new file mode 100644 index 0000000..86048f4 --- /dev/null +++ b/lang/python-ifconfig/patches/001-errorcheck.patch @@ -0,0 +1,69 @@ +--- a/ifconfig.old 2010-12-10 11:18:19.890041196 +0100 ++++ b/ifconfig.c 2010-12-10 11:59:58.170347114 +0100 +@@ -43,6 +43,9 @@ + char addr[20]; + char brdaddr[20]; + char netmask[20]; ++ short int flags = 0; ++ ++ hwaddr[0] = addr[0] = brdaddr[0] = netmask[0] = 0; + + if (!PyArg_ParseTuple(args, "s", &itf)) + return NULL; +@@ -51,29 +54,35 @@ + + strcpy(ifreq.ifr_name, itf); + +- /* hardware address */ +- ioctl(fd, SIOCGIFHWADDR, &ifreq); +- hw = ifreq.ifr_hwaddr.sa_data; +- sprintf(hwaddr, "%02x:%02x:%02x:%02x:%02x:%02x", +- *hw, *(hw + 1), *(hw + 2), *(hw + 3), *(hw + 4), *(hw + 5)); +- +- /* address */ +- ioctl(fd, SIOCGIFADDR, &ifreq); +- sin = (struct sockaddr_in *)&ifreq.ifr_broadaddr; +- sprintf(addr, "%s", inet_ntoa(sin->sin_addr)); +- +- /* broadcast */ +- ioctl(fd, SIOCGIFBRDADDR, &ifreq); +- sin = (struct sockaddr_in *)&ifreq.ifr_broadaddr; +- sprintf(brdaddr, "%s", inet_ntoa(sin->sin_addr)); +- +- /* netmask */ +- ioctl(fd, SIOCGIFNETMASK, &ifreq); +- sin = (struct sockaddr_in *)&ifreq.ifr_broadaddr; +- sprintf(netmask, "%s", inet_ntoa(sin->sin_addr)); ++ /* flags */ ++ if (ioctl(fd, SIOCGIFFLAGS, &ifreq) == 0) { ++ flags = ifreq.ifr_flags; ++ ++ /* hardware address */ ++ ioctl(fd, SIOCGIFHWADDR, &ifreq); ++ hw = ifreq.ifr_hwaddr.sa_data; ++ sprintf(hwaddr, "%02x:%02x:%02x:%02x:%02x:%02x", ++ *hw, *(hw + 1), *(hw + 2), *(hw + 3), *(hw + 4), *(hw + 5)); ++ ++ /* address */ ++ ioctl(fd, SIOCGIFADDR, &ifreq); ++ sin = (struct sockaddr_in *)&ifreq.ifr_broadaddr; ++ sprintf(addr, "%s", inet_ntoa(sin->sin_addr)); ++ ++ /* broadcast */ ++ ioctl(fd, SIOCGIFBRDADDR, &ifreq); ++ sin = (struct sockaddr_in *)&ifreq.ifr_broadaddr; ++ sprintf(brdaddr, "%s", inet_ntoa(sin->sin_addr)); ++ ++ /* netmask */ ++ ioctl(fd, SIOCGIFNETMASK, &ifreq); ++ sin = (struct sockaddr_in *)&ifreq.ifr_broadaddr; ++ sprintf(netmask, "%s", inet_ntoa(sin->sin_addr)); ++ } + + close(fd); +- return Py_BuildValue("{s:s,s:s,s:s,s:s}", ++ return Py_BuildValue("{s:i,s:s,s:s,s:s,s:s}", ++ "flags", flags, + "hwaddr", hwaddr, + "addr", addr, + "brdaddr", brdaddr, diff --git a/lang/python-ifconfig/patches/002-checkflags-up.patch b/lang/python-ifconfig/patches/002-checkflags-up.patch new file mode 100644 index 0000000..9f98c9e --- /dev/null +++ b/lang/python-ifconfig/patches/002-checkflags-up.patch @@ -0,0 +1,39 @@ +--- a/ifconfig.old 2010-12-10 12:14:12.026329707 +0100 ++++ b/ifconfig.c 2010-12-10 12:15:18.374672352 +0100 +@@ -64,20 +64,22 @@ + sprintf(hwaddr, "%02x:%02x:%02x:%02x:%02x:%02x", + *hw, *(hw + 1), *(hw + 2), *(hw + 3), *(hw + 4), *(hw + 5)); + +- /* address */ +- ioctl(fd, SIOCGIFADDR, &ifreq); +- sin = (struct sockaddr_in *)&ifreq.ifr_broadaddr; +- sprintf(addr, "%s", inet_ntoa(sin->sin_addr)); +- +- /* broadcast */ +- ioctl(fd, SIOCGIFBRDADDR, &ifreq); +- sin = (struct sockaddr_in *)&ifreq.ifr_broadaddr; +- sprintf(brdaddr, "%s", inet_ntoa(sin->sin_addr)); +- +- /* netmask */ +- ioctl(fd, SIOCGIFNETMASK, &ifreq); +- sin = (struct sockaddr_in *)&ifreq.ifr_broadaddr; +- sprintf(netmask, "%s", inet_ntoa(sin->sin_addr)); ++ if (flags & IFF_UP) { ++ /* address */ ++ ioctl(fd, SIOCGIFADDR, &ifreq); ++ sin = (struct sockaddr_in *)&ifreq.ifr_broadaddr; ++ sprintf(addr, "%s", inet_ntoa(sin->sin_addr)); ++ ++ /* broadcast */ ++ ioctl(fd, SIOCGIFBRDADDR, &ifreq); ++ sin = (struct sockaddr_in *)&ifreq.ifr_broadaddr; ++ sprintf(brdaddr, "%s", inet_ntoa(sin->sin_addr)); ++ ++ /* netmask */ ++ ioctl(fd, SIOCGIFNETMASK, &ifreq); ++ sin = (struct sockaddr_in *)&ifreq.ifr_broadaddr; ++ sprintf(netmask, "%s", inet_ntoa(sin->sin_addr)); ++ } + } + + close(fd); diff --git a/lang/python-json/Makefile b/lang/python-json/Makefile new file mode 100644 index 0000000..b02f0c5 --- /dev/null +++ b/lang/python-json/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=json-py +PKG_VERSION:=3_4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=921ebfede886a10ff32d6d4b4e216f8f + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +PKG_UNPACK:=unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) + +define Package/python-json + SECTION:=language-python + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=json-py + URL:=http://sourceforge.net/projects/json-py/ + DEPENDS:=+python-mini +endef + +define Build/Configure +endef + +define Build/Compile + $(INSTALL_DIR) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR) + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/json.py \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR) +endef + +define Package/python-json/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/json.py \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,python-json)) diff --git a/lang/python-sip/Makefile b/lang/python-sip/Makefile new file mode 100644 index 0000000..01d1b0d --- /dev/null +++ b/lang/python-sip/Makefile @@ -0,0 +1,148 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-sip +PKG_VERSION:=4.12.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=sip-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://bu3sch.de/pyqt4/ +PKG_MD5SUM:=0f8e8305b14c1812191de2e0ee22fea9 +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +HOST_BUILD_PARALLEL:=1 +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/sip-$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/sip-$(PKG_VERSION) + +PKG_BUILD_DEPENDS:=python +HOST_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) +-include $(if $(DUMP),,./files/python-sip-package.mk) + +define Package/python-sip + SECTION:=devel + CATEGORY:=Development + TITLE:=Python SIP + DEPENDS:=+python + MAINTAINER:=Michael Buesch + URL:=http://www.riverbankcomputing.co.uk/software/sip/download +endef + + +# ===> TARGET <=== + +EXTRA_CFLAGS:=\ + $(FPIC) + +define Build/Configure + $(INSTALL_DIR) "$(PYTHON_SIP_CONFIG_TEMPLATE_DIR)" + $(CP) ./files/sipconfig.macros.template "$(PYTHON_SIP_CONFIG_TEMPLATE)" + echo "CC $(TARGET_CROSS)gcc" >> $(PYTHON_SIP_CONFIG_TEMPLATE) + echo "CFLAGS $(TARGET_CFLAGS) $(EXTRA_CFLAGS)" >> $(PYTHON_SIP_CONFIG_TEMPLATE) + echo "CXX $(TARGET_CROSS)g++" >> $(PYTHON_SIP_CONFIG_TEMPLATE) + echo "CXXFLAGS $(TARGET_CFLAGS) $(EXTRA_CFLAGS)" >> $(PYTHON_SIP_CONFIG_TEMPLATE) + echo "LINK $(TARGET_CROSS)g++" >> $(PYTHON_SIP_CONFIG_TEMPLATE) + echo "LINK_SHLIB $(TARGET_CROSS)g++" >> $(PYTHON_SIP_CONFIG_TEMPLATE) + echo "LFLAGS $(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" >> $(PYTHON_SIP_CONFIG_TEMPLATE) + echo "AR $(TARGET_CROSS)ar cqs" >> $(PYTHON_SIP_CONFIG_TEMPLATE) + echo "STRIP $(STRIP)" >> $(PYTHON_SIP_CONFIG_TEMPLATE) + $(call HostPython, \ + cd "$(PKG_BUILD_DIR)"; \ + , \ + ./configure.py \ + --crosscompile \ + --bindir=$(PKG_INSTALL_DIR)/usr/bin \ + --destdir=$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR) \ + --incdir=$(PKG_INSTALL_DIR)/usr/include \ + --sipdir=$(PKG_INSTALL_DIR)/usr/share/sip \ + --sipconfig-macros="$(PYTHON_SIP_CONFIG_TEMPLATE)" \ + --py-site-dir=$(STAGING_DIR)/$(PYTHON_PKG_DIR) \ + --py-inc-dir=$(PYTHON_INC_DIR) \ + --py-conf-inc-dir=$(PKG_BUILD_DIR) \ + --py-lib-dir=$(PYTHON_LIB_DIR) \ + --py-bin-dir=$(PYTHON_BIN_DIR) \ + --py-sip-dir=$(STAGING_DIR)/usr/share/sip \ + ) +endef + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CROSS)gcc" \ + CXX="$(TARGET_CROSS)g++" \ + LINK="$(TARGET_CROSS)g++" \ + CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/mk $(1)/$(PYTHON_PKG_DIR) + $(INSTALL_DATA) ./files/python-sip-package.mk $(1)/mk/ + $(CP) $(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)/* $(1)/$(PYTHON_PKG_DIR) +endef + +define Build/Install + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CROSS)gcc" \ + CXX="$(TARGET_CROSS)g++" \ + LINK="$(TARGET_CROSS)g++" \ + CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + DESTDIR="" \ + install +endef + +define Package/python-sip/install + # We only install the python module for now... + $(INSTALL_DIR) $(1)/$(PYTHON_PKG_DIR) + $(CP) $(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)/* $(1)/$(PYTHON_PKG_DIR) +endef + + +# ===> HOST <=== + +HOST_CFLAGS+= \ + $(HOST_FPIC) \ + -I$(STAGING_DIR_HOST)/include/python$(PYTHON_VERSION) + +define Host/Configure + $(call HostPython, \ + cd "$(HOST_BUILD_DIR)"; \ + , \ + ./configure.py \ + --bindir=$(STAGING_DIR_HOST)/usr/bin \ + --destdir=$(STAGING_DIR_HOST)/$(PYTHON_PKG_DIR) \ + --incdir=$(STAGING_DIR_HOST)/usr/include \ + --sipdir=$(STAGING_DIR_HOST)/usr/share/sip \ + ) +endef + +define Host/Compile + $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ + CC="$(HOSTCC)" \ + CXX="g++" \ + LINK="g++" \ + CFLAGS="$(HOST_CFLAGS)" \ + CXXFLAGS="$(HOST_CFLAGS)" +endef + +define Host/Install + $(MAKE) -C $(HOST_BUILD_DIR) \ + CC="$(HOSTCC)" \ + CXX="g++" \ + LINK="g++" \ + CFLAGS="$(HOST_CFLAGS)" \ + CXXFLAGS="$(HOST_CFLAGS)" \ + install +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,python-sip)) diff --git a/lang/python-sip/files/python-sip-package.mk b/lang/python-sip/files/python-sip-package.mk new file mode 100644 index 0000000..ac2292c --- /dev/null +++ b/lang/python-sip/files/python-sip-package.mk @@ -0,0 +1,10 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +PYTHON_SIP_CONFIG_TEMPLATE_DIR:=$(STAGING_DIR)/usr/share/python-sip +PYTHON_SIP_CONFIG_TEMPLATE:=$(PYTHON_SIP_CONFIG_TEMPLATE_DIR)/sipconfig.template + diff --git a/lang/python-sip/files/sipconfig.macros.template b/lang/python-sip/files/sipconfig.macros.template new file mode 100644 index 0000000..ae9e1a6 --- /dev/null +++ b/lang/python-sip/files/sipconfig.macros.template @@ -0,0 +1,87 @@ +AIX_SHLIB +AR ar cqs +CC gcc +CFLAGS -pipe +CFLAGS_CONSOLE +CFLAGS_DEBUG +CFLAGS_EXCEPTIONS_OFF +CFLAGS_EXCEPTIONS_ON +CFLAGS_MT +CFLAGS_MT_DBG +CFLAGS_MT_DLL +CFLAGS_MT_DLLDBG +CFLAGS_RELEASE +CFLAGS_RTTI_OFF +CFLAGS_RTTI_ON +CFLAGS_SHLIB +CFLAGS_STL_OFF +CFLAGS_STL_ON +CFLAGS_THREAD -D_REENTRANT +CFLAGS_WARN_OFF -w +CFLAGS_WARN_ON -Wall -W +CHK_DIR_EXISTS test -d +CONFIG qt warn_on release incremental link_prl +COPY cp -f +CXX g++ +CXXFLAGS -pipe +CXXFLAGS_CONSOLE +CXXFLAGS_DEBUG +CXXFLAGS_EXCEPTIONS_OFF +CXXFLAGS_EXCEPTIONS_ON +CXXFLAGS_MT +CXXFLAGS_MT_DBG +CXXFLAGS_MT_DLL +CXXFLAGS_MT_DLLDBG +CXXFLAGS_RELEASE +CXXFLAGS_RTTI_OFF +CXXFLAGS_RTTI_ON +CXXFLAGS_SHLIB +CXXFLAGS_STL_OFF +CXXFLAGS_STL_ON +CXXFLAGS_THREAD -D_REENTRANT +CXXFLAGS_WARN_OFF -w +CXXFLAGS_WARN_ON -Wall -W +DEFINES +DEL_FILE rm -f +EXTENSION_PLUGIN +EXTENSION_SHLIB +INCDIR +INCDIR_OPENGL /usr/X11R6/include +INCDIR_X11 /usr/X11R6/include +LFLAGS +LFLAGS_CONSOLE +LFLAGS_CONSOLE_DLL +LFLAGS_DEBUG +LFLAGS_DLL +LFLAGS_OPENGL +LFLAGS_PLUGIN -shared +LFLAGS_RELEASE +LFLAGS_SHLIB -shared +LFLAGS_SONAME -Wl,-soname, +LFLAGS_THREAD +LFLAGS_WINDOWS +LFLAGS_WINDOWS_DLL +LIB +LIBDIR +LIBDIR_OPENGL /usr/X11R6/lib +LIBDIR_X11 /usr/X11R6/lib +LIBS +LIBS_CONSOLE +LIBS_CORE +LIBS_GUI +LIBS_NETWORK +LIBS_OPENGL -lGLU -lGL +LIBS_RT +LIBS_RTMT +LIBS_THREAD -lpthread +LIBS_WEBKIT +LIBS_WINDOWS +LIBS_X11 -lXext -lX11 -lm +LINK g++ +LINK_SHLIB g++ +LINK_SHLIB_CMD +MAKEFILE_GENERATOR UNIX +MKDIR mkdir -p +RANLIB +RPATH -Wl,-rpath, +STRIP strip diff --git a/lang/python-sip/patches/100-cross-compile.patch b/lang/python-sip/patches/100-cross-compile.patch new file mode 100644 index 0000000..9b7c3da --- /dev/null +++ b/lang/python-sip/patches/100-cross-compile.patch @@ -0,0 +1,208 @@ +Index: sip-4.12.1/configure.py +=================================================================== +--- sip-4.12.1.orig/configure.py 2011-01-22 14:47:21.000000000 +0100 ++++ sip-4.12.1/configure.py 2011-03-13 16:47:19.085716739 +0100 +@@ -19,7 +19,6 @@ import sys + import os + import glob + import optparse +-from distutils import sysconfig + + import siputils + +@@ -197,21 +196,45 @@ def set_platform_directories(): + global plat_py_site_dir, plat_py_inc_dir, plat_py_conf_inc_dir + global plat_bin_dir, plat_py_lib_dir, plat_sip_dir + +- # We trust distutils for some stuff. +- plat_py_site_dir = sysconfig.get_python_lib(plat_specific=1) +- plat_py_inc_dir = sysconfig.get_python_inc() +- plat_py_conf_inc_dir = os.path.dirname(sysconfig.get_config_h_filename()) +- +- if sys.platform == "win32": +- plat_py_lib_dir = sys.prefix + "\\libs" +- plat_bin_dir = sys.exec_prefix +- plat_sip_dir = sys.prefix + "\\sip" +- else: +- lib_dir = sysconfig.get_python_lib(plat_specific=1, standard_lib=1) ++ if not opts.crosscompile: ++ # We trust distutils for some stuff. ++ from distutils import sysconfig ++ plat_py_site_dir = sysconfig.get_python_lib(plat_specific=1) ++ plat_py_inc_dir = sysconfig.get_python_inc() ++ plat_py_conf_inc_dir = os.path.dirname(sysconfig.get_config_h_filename()) ++ ++ if sys.platform == "win32": ++ plat_py_lib_dir = sys.prefix + "\\libs" ++ plat_bin_dir = sys.exec_prefix ++ plat_sip_dir = sys.prefix + "\\sip" ++ else: ++ lib_dir = sysconfig.get_python_lib(plat_specific=1, standard_lib=1) + +- plat_py_lib_dir = lib_dir + "/config" +- plat_bin_dir = sys.exec_prefix + "/bin" +- plat_sip_dir = sys.prefix + "/share/sip" ++ plat_py_lib_dir = lib_dir + "/config" ++ plat_bin_dir = sys.exec_prefix + "/bin" ++ plat_sip_dir = sys.prefix + "/share/sip" ++ ++ count = 0 ++ if opts.py_site_dir: ++ plat_py_site_dir = opts.py_site_dir ++ count += 1 ++ if opts.py_inc_dir: ++ plat_py_inc_dir = opts.py_inc_dir ++ count += 1 ++ if opts.py_conf_inc_dir: ++ plat_py_conf_inc_dir = opts.py_conf_inc_dir ++ count += 1 ++ if opts.py_lib_dir: ++ plat_py_lib_dir = opts.py_lib_dir ++ count += 1 ++ if opts.py_bin_dir: ++ plat_py_bin_dir = opts.py_bin_dir ++ count += 1 ++ if opts.py_sip_dir: ++ plat_sip_dir = opts.py_sip_dir ++ count += 1 ++ if count != 6 and opts.crosscompile: ++ siputils.error("Need to specify all --py-... options for crosscompile.") + + + def patch_files(): +@@ -337,6 +360,11 @@ def create_optparser(): + def store_abspath(option, opt_str, value, parser): + setattr(parser.values, option.dest, os.path.abspath(value)) + ++ def store_abspath_file(option, opt_str, value, parser): ++ if not os.path.isfile(value): ++ raise optparse.OptionValueError("'%s' is not a file" % value) ++ setattr(parser.values, option.dest, os.path.abspath(value)) ++ + p = optparse.OptionParser(usage="python %prog [opts] [macro=value] " + "[macro+=value]", version=sip_version_str) + +@@ -411,9 +439,62 @@ def create_optparser(): + "are normally installed [default: %s]" % default_sipsipdir) + p.add_option_group(g) + ++ # Crosscompilation ++ g = optparse.OptionGroup(p, title="Crosscompilation") ++ g.add_option("--crosscompile", action="store_true", ++ default=False, dest="crosscompile", ++ help="Set, if cross-compiling") ++ g.add_option("--sipconfig-macros", action="callback", metavar="FILE", ++ default=None, dest="sipconfig_macros", type="string", ++ callback=store_abspath_file, ++ help="Path to a file containing sipconfig macros") ++ g.add_option("--py-site-dir", action="callback", ++ default=None, dest="py_site_dir", type="string", ++ callback=store_abspath, ++ help="Python site directory") ++ g.add_option("--py-inc-dir", action="callback", ++ default=None, dest="py_inc_dir", type="string", ++ callback=store_abspath, ++ help="Python include directory") ++ g.add_option("--py-conf-inc-dir", action="callback", ++ default=None, dest="py_conf_inc_dir", type="string", ++ callback=store_abspath, ++ help="Python config include directory") ++ g.add_option("--py-lib-dir", action="callback", ++ default=None, dest="py_lib_dir", type="string", ++ callback=store_abspath, ++ help="Python library directory") ++ g.add_option("--py-bin-dir", action="callback", ++ default=None, dest="py_bin_dir", type="string", ++ callback=store_abspath, ++ help="Python binary directory") ++ g.add_option("--py-sip-dir", action="callback", ++ default=None, dest="py_sip_dir", type="string", ++ callback=store_abspath, ++ help="Python SIP directory") ++ p.add_option_group(g) ++ + return p + + ++def load_sipconfig_macros(filename): ++ macros = {} ++ fd = file(filename, "r") ++ for line in fd.readlines(): ++ line = line.split() ++ try: ++ key = line[0] ++ except IndexError: ++ sipconfig.error("Invalid sipconfig macros file format") ++ value = "" ++ try: ++ value = " ".join(line[1:]) ++ except IndexError: ++ pass ++ macros[key] = value ++ return macros ++ ++ + def main(argv): + """Create the configuration module module. + +@@ -424,9 +505,6 @@ def main(argv): + if py_version < 0x020300: + siputils.error("This version of SIP requires Python v2.3 or later.") + +- # Basic initialisation. +- set_platform_directories() +- + # Build up the list of valid specs. + for s in os.listdir(os.path.join(src_dir, "specs")): + platform_specs.append(s) +@@ -438,6 +516,9 @@ def main(argv): + p = create_optparser() + opts, args = p.parse_args() + ++ # Basic initialisation. ++ set_platform_directories() ++ + # Make sure MacOS specific options get initialised. + if sys.platform != 'darwin': + opts.universal = '' +@@ -477,14 +558,16 @@ def main(argv): + else: + opts.universal = '' + +- # Get the platform specific macros for building. +- macros = siputils.parse_build_macros( +- os.path.join(src_dir, "specs", opts.platform), build_macro_names, +- args) +- +- if macros is None: +- siputils.error("Unsupported macro name specified. Use the --show-build-macros flag to see a list of supported macros.") +- sys.exit(2) ++ if opts.sipconfig_macros: ++ macros = load_sipconfig_macros(opts.sipconfig_macros) ++ else: ++ # Get the platform specific macros for building. ++ macros = siputils.parse_build_macros( ++ os.path.join(src_dir, "specs", opts.platform), build_macro_names, ++ args) ++ if macros is None: ++ siputils.error("Unsupported macro name specified. Use the --show-build-macros flag to see a list of supported macros.") ++ sys.exit(2) + + # Fix the name of the sip module. + global sip_module_base +Index: sip-4.12.1/siputils.py +=================================================================== +--- sip-4.12.1.orig/siputils.py 2011-01-22 14:45:38.000000000 +0100 ++++ sip-4.12.1/siputils.py 2011-03-13 16:47:19.087716533 +0100 +@@ -1044,9 +1044,11 @@ class Makefile: + + for f in self.optional_list("DEFINES"): + cppflags.append("-D" + f) ++ print "CPPFLAGS: Adding -D", f + + for f in self.optional_list("INCDIR"): + cppflags.append("-I" + _quote(f)) ++ print "CPPFLAGS: Adding -I", _quote(f) + + libs = [] + diff --git a/lang/python/Makefile b/lang/python/Makefile new file mode 100644 index 0000000..dd8d883 --- /dev/null +++ b/lang/python/Makefile @@ -0,0 +1,445 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python +PKG_VERSION:=2.6.4 +PKG_RELEASE:=3 + +PKG_SOURCE:=Python-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION)/ +PKG_MD5SUM:=fee5408634a54e721a93531aba37f8c1 + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +HOST_BUILD_PARALLEL:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION) +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION) + +PKG_BUILD_DEPENDS:=python/host + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk +-include $(if $(DUMP),,./files/python-package.mk) + +define Package/python/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Python $(PYTHON_VERSION) programming language + URL:=http://www.python.org/ +endef + +define Package/python/Default/description + Python is a dynamic object-oriented programming language that can be used + for many kinds of software development. It offers strong support for + integration with other languages and tools, comes with extensive standard + libraries, and can be learned in a few days. Many Python programmers + report substantial productivity gains and feel the language encourages + the development of higher quality, more maintainable code. +endef + +define Package/python +$(call Package/python/Default) + TITLE+= (full) + DEPENDS:=+libpthread +zlib +libffi +python-mini +endef + +define Package/python/description +$(call Package/python/Default/description) + . + This package contains the full Python install. +endef + +define Package/python-mini +$(call Package/python/Default) + TITLE+= (minimal) + DEPENDS:=+libpthread +zlib +endef + +define Package/python-mini/description +$(call Package/python/Default/description) + . + This package contains only a minimal Python install. +endef + +define Package/python-doc +$(call Package/python/Default) + TITLE:=Python interactive documentation + DEPENDS+=+python-mini +endef + +define Package/python-expat +$(call Package/python/Default) + TITLE:=Python support for expat + DEPENDS+=+python-mini +libexpat +endef + +define Package/python-gzip +$(call Package/python/Default) + TITLE:=Python support for gzip + DEPENDS+=+python-mini +endef + +define Package/python-openssl +$(call Package/python/Default) + TITLE:=Python support for OpenSSL + DEPENDS+=+python-mini +libopenssl +endef + +define Package/python-shutil +$(call Package/python/Default) + TITLE:=Python support for shutil + DEPENDS+=+python-mini +endef + +define Package/python-sqlite3 +$(call Package/python/Default) + TITLE:=Python support for sqlite3 + DEPENDS+=+python-mini +libsqlite3 +endef + +define Package/python-gdbm +$(call Package/python/Default) + TITLE:=Python support for gdbm + DEPENDS+=+python-mini +libgdbm +endef + +PY_DISABLED_MODULES:= \ + readline _curses _curses_panel _tkinter nis + +MAKE_FLAGS:=\ + $(TARGET_CONFIGURE_OPTS) \ + PYTHON_DISABLE_MODULES="$(PY_DISABLED_MODULES)" \ + PYTHON_MODULES_INCLUDE="$(STAGING_DIR)/usr/include" \ + PYTHON_MODULES_LIB="$(STAGING_DIR)/usr/lib" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + CROSS_COMPILE=yes \ + CFLAGS="$(TARGET_CFLAGS) -fno-inline" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + LD="$(TARGET_CC)" \ + HOSTPYTHON=./hostpython \ + HOSTPGEN=./hostpgen + +define Build/Configure + -$(MAKE) -C $(PKG_BUILD_DIR) distclean + (cd $(PKG_BUILD_DIR); autoreconf --force --install || exit 0) + # The python executable needs to stay in the rootdir since its location will + # be used to compute the path of the config files. + $(CP) $(STAGING_DIR_HOST)/bin/pgen $(PKG_BUILD_DIR)/hostpgen + $(CP) $(STAGING_DIR_HOST)/bin/python $(PKG_BUILD_DIR)/hostpython + $(call Build/Configure/Default, \ + --sysconfdir=/etc \ + --disable-shared \ + --without-cxx-main \ + --with-threads \ + --with-system-ffi \ + ac_cv_lib_readline_readline=no \ + ac_cv_have_chflags=no \ + ac_cv_have_lchflags=no \ + ac_cv_py_format_size_t=no \ + OPT="$(TARGET_CFLAGS)" \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib + $(INSTALL_DIR) $(STAGING_DIR)/mk/ + $(INSTALL_DATA) ./files/python-package.mk $(STAGING_DIR)/mk/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \ + $(1)/usr/include/ + $(CP) \ + $(STAGING_DIR_HOST)/lib/python$(PYTHON_VERSION) \ + $(PKG_BUILD_DIR)/libpython$(PYTHON_VERSION).a \ + $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \ + $(1)/usr/lib/python$(PYTHON_VERSION)/ + + $(CP) \ + $(STAGING_DIR_HOST)/bin/python \ + $(1)/usr/bin/hostpython + (cd $(2)/bin; \ + ln -sf ../../usr/bin/hostpython python$(PYTHON_VERSION); \ + ln -sf python$(PYTHON_VERSION) python) + + $(CP) \ + $(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION)-config \ + $(2)/bin/ + $(SED) 's,^#!.*,#!/usr/bin/env python$(PYTHON_VERSION),g' $(2)/bin/python$(PYTHON_VERSION)-config + + (cd $(2)/bin; \ + ln -sf python$(PYTHON_VERSION)-config python-config;) +endef + +define PyPackage/python/filespec ++|/usr/lib/python$(PYTHON_VERSION) +-|/usr/lib/python$(PYTHON_VERSION)/bsddb/test +-|/usr/lib/python$(PYTHON_VERSION)/config ++|/usr/lib/python$(PYTHON_VERSION)/config/Makefile +-|/usr/lib/python$(PYTHON_VERSION)/ctypes/test +-|/usr/lib/python$(PYTHON_VERSION)/distutils/command/wininst-*.exe +-|/usr/lib/python$(PYTHON_VERSION)/distutils/tests +-|/usr/lib/python$(PYTHON_VERSION)/email/test +-|/usr/lib/python$(PYTHON_VERSION)/idlelib +-|/usr/lib/python$(PYTHON_VERSION)/json/tests +-|/usr/lib/python$(PYTHON_VERSION)/lib-tk +-|/usr/lib/python$(PYTHON_VERSION)/sqlite3 +-|/usr/lib/python$(PYTHON_VERSION)/test +-|/usr/lib/python$(PYTHON_VERSION)/lib2to3 +-|/usr/lib/python$(PYTHON_VERSION)/lib-old +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/gdbm.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sqlite3.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ssl.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/pyexpat.so +-|/usr/lib/python$(PYTHON_VERSION)/pydoc_topics.py +-|/usr/lib/python$(PYTHON_VERSION)/pydoc.py +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ctypes_test.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_testcapi.so +-|/usr/lib/python$(PYTHON_VERSION)/__future__.py +-|/usr/lib/python$(PYTHON_VERSION)/_abcoll.py +-|/usr/lib/python$(PYTHON_VERSION)/abc.py +-|/usr/lib/python$(PYTHON_VERSION)/codecs.py +-|/usr/lib/python$(PYTHON_VERSION)/compileall.py +-|/usr/lib/python$(PYTHON_VERSION)/ConfigParser.py +-|/usr/lib/python$(PYTHON_VERSION)/copy.py +-|/usr/lib/python$(PYTHON_VERSION)/copy_reg.py +-|/usr/lib/python$(PYTHON_VERSION)/dis.py +-|/usr/lib/python$(PYTHON_VERSION)/encodings +-|/usr/lib/python$(PYTHON_VERSION)/fnmatch.py +-|/usr/lib/python$(PYTHON_VERSION)/genericpath.py +-|/usr/lib/python$(PYTHON_VERSION)/getopt.py +-|/usr/lib/python$(PYTHON_VERSION)/glob.py +-|/usr/lib/python$(PYTHON_VERSION)/hashlib.py +-|/usr/lib/python$(PYTHON_VERSION)/inspect.py +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/array.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/binascii.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/cStringIO.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/fcntl.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/grp.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/itertools.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/math.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_md5.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/operator.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_random.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/select.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha256.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha512.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_socket.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/strop.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_struct.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/syslog.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/time.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/unicodedata.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/zlib.so +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_weakref.so +-|/usr/lib/python$(PYTHON_VERSION)/linecache.py +-|/usr/lib/python$(PYTHON_VERSION)/md5.py +-|/usr/lib/python$(PYTHON_VERSION)/new.py +-|/usr/lib/python$(PYTHON_VERSION)/opcode.py +-|/usr/lib/python$(PYTHON_VERSION)/optparse.py +-|/usr/lib/python$(PYTHON_VERSION)/os.py +-|/usr/lib/python$(PYTHON_VERSION)/pickle.py +-|/usr/lib/python$(PYTHON_VERSION)/pickle.py +-|/usr/lib/python$(PYTHON_VERSION)/pkgutil.py +-|/usr/lib/python$(PYTHON_VERSION)/popen2.py +-|/usr/lib/python$(PYTHON_VERSION)/posixpath.py +-|/usr/lib/python$(PYTHON_VERSION)/py_compile.py +-|/usr/lib/python$(PYTHON_VERSION)/random.py +-|/usr/lib/python$(PYTHON_VERSION)/repr.py +-|/usr/lib/python$(PYTHON_VERSION)/re.py +-|/usr/lib/python$(PYTHON_VERSION)/sha.py +-|/usr/lib/python$(PYTHON_VERSION)/site.py +-|/usr/lib/python$(PYTHON_VERSION)/socket.py +-|/usr/lib/python$(PYTHON_VERSION)/sre_compile.py +-|/usr/lib/python$(PYTHON_VERSION)/sre_constants.py +-|/usr/lib/python$(PYTHON_VERSION)/sre_parse.py +-|/usr/lib/python$(PYTHON_VERSION)/sre.py +-|/usr/lib/python$(PYTHON_VERSION)/stat.py +-|/usr/lib/python$(PYTHON_VERSION)/StringIO.py +-|/usr/lib/python$(PYTHON_VERSION)/stringprep.py +-|/usr/lib/python$(PYTHON_VERSION)/string.py +-|/usr/lib/python$(PYTHON_VERSION)/struct.py +-|/usr/lib/python$(PYTHON_VERSION)/subprocess.py +-|/usr/lib/python$(PYTHON_VERSION)/tempfile.py +-|/usr/lib/python$(PYTHON_VERSION)/textwrap.py +-|/usr/lib/python$(PYTHON_VERSION)/tokenize.py +-|/usr/lib/python$(PYTHON_VERSION)/token.py +-|/usr/lib/python$(PYTHON_VERSION)/traceback.py +-|/usr/lib/python$(PYTHON_VERSION)/types.py +-|/usr/lib/python$(PYTHON_VERSION)/UserDict.py +-|/usr/lib/python$(PYTHON_VERSION)/warnings.py +-|/usr/lib/python$(PYTHON_VERSION)/weakref.py +endef + +define PyPackage/python-mini/filespec ++|/usr/bin/python$(PYTHON_VERSION) ++|/usr/lib/python$(PYTHON_VERSION)/__future__.py ++|/usr/lib/python$(PYTHON_VERSION)/_abcoll.py ++|/usr/lib/python$(PYTHON_VERSION)/abc.py ++|/usr/lib/python$(PYTHON_VERSION)/codecs.py ++|/usr/lib/python$(PYTHON_VERSION)/compileall.py ++|/usr/lib/python$(PYTHON_VERSION)/ConfigParser.py ++|/usr/lib/python$(PYTHON_VERSION)/copy.py ++|/usr/lib/python$(PYTHON_VERSION)/copy_reg.py ++|/usr/lib/python$(PYTHON_VERSION)/dis.py ++|/usr/lib/python$(PYTHON_VERSION)/encodings ++|/usr/lib/python$(PYTHON_VERSION)/fnmatch.py ++|/usr/lib/python$(PYTHON_VERSION)/genericpath.py ++|/usr/lib/python$(PYTHON_VERSION)/getopt.py ++|/usr/lib/python$(PYTHON_VERSION)/glob.py ++|/usr/lib/python$(PYTHON_VERSION)/hashlib.py ++|/usr/lib/python$(PYTHON_VERSION)/inspect.py ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/array.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/binascii.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/cStringIO.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/fcntl.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/grp.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/itertools.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/math.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_md5.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/operator.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_random.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/select.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha256.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha512.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_socket.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/strop.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_struct.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/syslog.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/time.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/unicodedata.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/zlib.so ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_weakref.so ++|/usr/lib/python$(PYTHON_VERSION)/linecache.py ++|/usr/lib/python$(PYTHON_VERSION)/md5.py ++|/usr/lib/python$(PYTHON_VERSION)/new.py ++|/usr/lib/python$(PYTHON_VERSION)/opcode.py ++|/usr/lib/python$(PYTHON_VERSION)/optparse.py ++|/usr/lib/python$(PYTHON_VERSION)/os.py ++|/usr/lib/python$(PYTHON_VERSION)/pickle.py ++|/usr/lib/python$(PYTHON_VERSION)/pickle.py ++|/usr/lib/python$(PYTHON_VERSION)/pkgutil.py ++|/usr/lib/python$(PYTHON_VERSION)/popen2.py ++|/usr/lib/python$(PYTHON_VERSION)/posixpath.py ++|/usr/lib/python$(PYTHON_VERSION)/py_compile.py ++|/usr/lib/python$(PYTHON_VERSION)/random.py ++|/usr/lib/python$(PYTHON_VERSION)/repr.py ++|/usr/lib/python$(PYTHON_VERSION)/re.py ++|/usr/lib/python$(PYTHON_VERSION)/sha.py ++|/usr/lib/python$(PYTHON_VERSION)/site.py ++|/usr/lib/python$(PYTHON_VERSION)/socket.py ++|/usr/lib/python$(PYTHON_VERSION)/sre_compile.py ++|/usr/lib/python$(PYTHON_VERSION)/sre_constants.py ++|/usr/lib/python$(PYTHON_VERSION)/sre_parse.py ++|/usr/lib/python$(PYTHON_VERSION)/sre.py ++|/usr/lib/python$(PYTHON_VERSION)/stat.py ++|/usr/lib/python$(PYTHON_VERSION)/StringIO.py ++|/usr/lib/python$(PYTHON_VERSION)/stringprep.py ++|/usr/lib/python$(PYTHON_VERSION)/string.py ++|/usr/lib/python$(PYTHON_VERSION)/struct.py ++|/usr/lib/python$(PYTHON_VERSION)/subprocess.py ++|/usr/lib/python$(PYTHON_VERSION)/tempfile.py ++|/usr/lib/python$(PYTHON_VERSION)/textwrap.py ++|/usr/lib/python$(PYTHON_VERSION)/tokenize.py ++|/usr/lib/python$(PYTHON_VERSION)/token.py ++|/usr/lib/python$(PYTHON_VERSION)/traceback.py ++|/usr/lib/python$(PYTHON_VERSION)/types.py ++|/usr/lib/python$(PYTHON_VERSION)/UserDict.py ++|/usr/lib/python$(PYTHON_VERSION)/warnings.py ++|/usr/lib/python$(PYTHON_VERSION)/weakref.py ++|/usr/include/python$(PYTHON_VERSION)/pyconfig.h +endef + +define PyPackage/python-mini/install + ln -sf python$(PYTHON_VERSION) $(1)/usr/bin/python +endef + +define PyPackage/python-doc/filespec ++|/usr/lib/python$(PYTHON_VERSION)/pydoc_topics.py ++|/usr/lib/python$(PYTHON_VERSION)/pydoc.py +endef + +define PyPackage/python-expat/filespec ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/pyexpat.so +endef + +define PyPackage/python-gzip/filespec ++|/usr/lib/python$(PYTHON_VERSION)/gzip.py +endef + +define PyPackage/python-openssl/filespec ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ssl.so +endef + +define PyPackage/python-shutil/filespec ++|/usr/lib/python$(PYTHON_VERSION)/shutil.py +endef + +define PyPackage/python-sqlite3/filespec ++|/usr/lib/python$(PYTHON_VERSION)/sqlite3 ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sqlite3.so +endef + +define PyPackage/python-gdbm/filespec ++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/gdbm.so +endef + +define Host/Configure + -$(MAKE) -C $(HOST_BUILD_DIR) distclean + (cd $(HOST_BUILD_DIR); autoreconf --force --install || exit 0) + (cd $(HOST_BUILD_DIR); \ + rm -rf config.cache; \ + CONFIG_SITE= \ + OPT="$(HOST_CFLAGS)" \ + ./configure --without-cxx-main --without-threads --prefix=$(STAGING_DIR_HOST); \ + ) +endef + +define Host/Compile + $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ + python Parser/pgen + $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ + HOSTPYTHON=$(HOST_BUILD_DIR)/python \ + sharedmods +endef + +define Host/Install + $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/ + $(MAKE) -C $(HOST_BUILD_DIR) \ + HOSTPYTHON=$(HOST_BUILD_DIR)/python \ + install + $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/ +endef + + +$(eval $(call HostBuild)) + +$(eval $(call PyPackage,python)) +$(eval $(call PyPackage,python-mini)) +$(eval $(call PyPackage,python-doc)) +$(eval $(call PyPackage,python-expat)) +$(eval $(call PyPackage,python-gzip)) +$(eval $(call PyPackage,python-openssl)) +$(eval $(call PyPackage,python-shutil)) +$(eval $(call PyPackage,python-sqlite3)) +$(eval $(call PyPackage,python-gdbm)) + +$(eval $(call BuildPackage,python)) +$(eval $(call BuildPackage,python-mini)) +$(eval $(call BuildPackage,python-doc)) +$(eval $(call BuildPackage,python-expat)) +$(eval $(call BuildPackage,python-gzip)) +$(eval $(call BuildPackage,python-openssl)) +$(eval $(call BuildPackage,python-shutil)) +$(eval $(call BuildPackage,python-sqlite3)) +$(eval $(call BuildPackage,python-gdbm)) diff --git a/lang/python/files/python-package.mk b/lang/python/files/python-package.mk new file mode 100644 index 0000000..995e411 --- /dev/null +++ b/lang/python/files/python-package.mk @@ -0,0 +1,77 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +PYTHON_VERSION=2.6 + +PYTHON_DIR:=$(STAGING_DIR)/usr +PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin +PYTHON_INC_DIR:=$(PYTHON_DIR)/include/python$(PYTHON_VERSION) +PYTHON_LIB_DIR:=$(PYTHON_DIR)/lib/python$(PYTHON_VERSION) + +PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages + +PYTHON:=python$(PYTHON_VERSION) + +HOST_PYTHON_BIN:=$(STAGING_DIR)/usr/bin/hostpython + +define HostPython + ( export PYTHONPATH="$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR)"; \ + export PYTHONOPTIMIZE=""; \ + export PYTHONDONTWRITEBYTECODE=1; \ + $(1) \ + $(HOST_PYTHON_BIN) $(2); \ + ) +endef + +define PyPackage + $(call shexport,PyPackage/$(1)/filespec) + + define Package/$(1)/install + @$(SH_FUNC) getvar $$(call shvar,PyPackage/$(1)/filespec) | ( \ + IFS='|'; \ + while read fop fspec fperm; do \ + if [ "$$$$$$$$fop" = "+" ]; then \ + dpath=`dirname "$$$$$$$$fspec"`; \ + if [ -n "$$$$$$$$fperm" ]; then \ + dperm="-m$$$$$$$$fperm"; \ + else \ + dperm=`stat -c "%a" $(PKG_INSTALL_DIR)$$$$$$$$dpath`; \ + fi; \ + mkdir -p $$$$$$$$$dperm $$(1)$$$$$$$$dpath; \ + echo "copying: '$$$$$$$$fspec'"; \ + cp -fpR $(PKG_INSTALL_DIR)$$$$$$$$fspec $$(1)$$$$$$$$dpath/; \ + if [ -n "$$$$$$$$fperm" ]; then \ + chmod -R $$$$$$$$fperm $$(1)$$$$$$$$fspec; \ + fi; \ + elif [ "$$$$$$$$fop" = "-" ]; then \ + echo "removing: '$$$$$$$$fspec'"; \ + rm -fR $$(1)$$$$$$$$fspec; \ + elif [ "$$$$$$$$fop" = "=" ]; then \ + echo "setting permissions: '$$$$$$$$fperm' on '$$$$$$$$fspec'"; \ + chmod -R $$$$$$$$fperm $$(1)$$$$$$$$fspec; \ + fi; \ + done; \ + ) + $(call PyPackage/$(1)/install,$$(1)) + endef +endef + +# $(1) => build subdir +# $(2) => additional arguments to setup.py +# $(3) => additional variables +define Build/Compile/PyMod + $(call HostPython, \ + cd $(PKG_BUILD_DIR)/$(strip $(1)); \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + $(3) \ + , \ + ./setup.py $(2) \ + ) + find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f +endef diff --git a/lang/python/patches/000-cross-compile.patch b/lang/python/patches/000-cross-compile.patch new file mode 100644 index 0000000..dc2e166 --- /dev/null +++ b/lang/python/patches/000-cross-compile.patch @@ -0,0 +1,113 @@ +--- + Makefile.pre.in | 25 +++++++++++++------------ + 1 file changed, 13 insertions(+), 12 deletions(-) + +--- Python-2.6.4.orig/Makefile.pre.in ++++ Python-2.6.4/Makefile.pre.in +@@ -175,6 +175,7 @@ UNICODE_OBJS= @UNICODE_OBJS@ + + PYTHON= python$(EXE) + BUILDPYTHON= python$(BUILDEXE) ++HOSTPYTHON= $(BUILDPYTHON) + + # The task to run while instrument when building the profile-opt target + PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck +@@ -205,7 +206,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar + ########################################################################## + # Parser + PGEN= Parser/pgen$(EXE) +- ++HOSTPGEN= $(PGEN)$(EXE) + POBJS= \ + Parser/acceler.o \ + Parser/grammar1.o \ +@@ -370,7 +371,7 @@ build_all_generate_profile: + $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov" + + run_profile_task: +- ./$(BUILDPYTHON) $(PROFILE_TASK) ++ $(HOSTPYTHON) $(PROFILE_TASK) + + build_all_use_profile: + $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use" +@@ -388,14 +389,14 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA + $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) + + platform: $(BUILDPYTHON) +- $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform ++ $(RUNSHARED) $(HOSTPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform + + + # Build the shared modules + sharedmods: $(BUILDPYTHON) + @case $$MAKEFLAGS in \ +- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ +- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ ++ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ ++ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ + esac + + # Build static library +@@ -517,7 +518,7 @@ Modules/python.o: $(srcdir)/Modules/pyth + + $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) + -@$(INSTALL) -d Include +- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) ++ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + + $(PGEN): $(PGENOBJS) + $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) +@@ -676,7 +677,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho + + TESTOPTS= -l $(EXTRATESTOPTS) + TESTPROG= $(srcdir)/Lib/test/regrtest.py +-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -E -tt ++TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) -E -tt + test: all platform + -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f + -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) +@@ -1001,7 +1002,7 @@ libainstall: all + # Install the dynamically loadable modules + # This goes into $(exec_prefix) + sharedinstall: +- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ ++ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ +@@ -1039,7 +1040,7 @@ frameworkinstallstructure: $(LDLIBRARY) + fi; \ + done + $(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers +- sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist ++ sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist + $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current + $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK) + $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers +@@ -1081,7 +1082,7 @@ frameworkinstallextras: + # This installs a few of the useful scripts in Tools/scripts + scriptsinstall: + SRCDIR=$(srcdir) $(RUNSHARED) \ +- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \ ++ $(HOSTPYTHON) $(srcdir)/Tools/scripts/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --root=/$(DESTDIR) +@@ -1103,7 +1104,7 @@ config.status: $(srcdir)/configure + + # Run reindent on the library + reindent: +- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib ++ $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib + + # Rerun configure with the same options as it was run last time, + # provided the config.status script exists +@@ -1200,7 +1201,7 @@ funny: + + # Perform some verification checks on any modified files. + patchcheck: +- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py ++ $(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py + + # Dependencies + diff --git a/lang/python/patches/010-cannot-run-test-programm.patch b/lang/python/patches/010-cannot-run-test-programm.patch new file mode 100644 index 0000000..471f008 --- /dev/null +++ b/lang/python/patches/010-cannot-run-test-programm.patch @@ -0,0 +1,89 @@ +--- + configure.in | 46 ++++++++++++++++++++++++++++++++++------------ + 1 file changed, 34 insertions(+), 12 deletions(-) + +--- Python-2.6.4.orig/configure.in ++++ Python-2.6.4/configure.in +@@ -2653,6 +2653,7 @@ AC_CHECK_LIB(c, inet_aton, [$ac_cv_prog_ + # On Tru64, chflags seems to be present, but calling it will + # exit Python + AC_MSG_CHECKING(for chflags) ++AC_CACHE_VAL(ac_cv_have_chflags, [ + AC_TRY_RUN([ + #include + #include +@@ -2662,12 +2663,19 @@ int main(int argc, char*argv[]) + return 1; + return 0; + } +-],AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.) +- AC_MSG_RESULT(yes), +- AC_MSG_RESULT(no) +-) ++], ++ac_cv_have_chflags=yes, ++ac_cv_have_chflags=no, ++ac_cv_have_chflags=no)]) ++AC_MSG_RESULT($ac_cv_have_chflags) ++if test "$ac_cv_have_chflags" = yes ++then ++ AC_DEFINE(HAVE_CHFLAGS, 1, ++ [Define to 1 if you have the `chflags' function.]) ++fi + + AC_MSG_CHECKING(for lchflags) ++AC_CACHE_VAL(ac_cv_have_lchflags, [ + AC_TRY_RUN([ + #include + #include +@@ -2677,10 +2685,16 @@ int main(int argc, char*argv[]) + return 1; + return 0; + } +-],AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.) +- AC_MSG_RESULT(yes), +- AC_MSG_RESULT(no) +-) ++], ++ac_cv_have_lchflags=yes, ++ac_cv_have_lchflags=no, ++ac_cv_have_lchflags=no)]) ++AC_MSG_RESULT($ac_cv_have_lchflags) ++if test "$ac_cv_have_lchflags" = yes ++then ++ AC_DEFINE(HAVE_CHFLAGS, 1, ++ [Define to 1 if you have the `lchflags' function.]) ++fi + + dnl Check if system zlib has *Copy() functions + dnl +@@ -3781,6 +3795,7 @@ else + fi + + AC_MSG_CHECKING(for %zd printf() format support) ++AC_CACHE_VAL(ac_cv_py_format_size_t, [ + AC_TRY_RUN([#include + #include + #include +@@ -3814,10 +3829,17 @@ int main() + return 1; + + return 0; +-}], +-[AC_MSG_RESULT(yes) +- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])], +- AC_MSG_RESULT(no)) ++} ++], ++ac_cv_py_format_size_t=yes, ++ac_cv_py_format_size_t=no, ++ac_cv_py_format_size_t=no)]) ++AC_MSG_RESULT($ac_cv_py_format_size_t) ++if test "$ac_cv_pyt_format_t" = yes ++then ++ AC_DEFINE(PY_FORMAT_SIZE_T, "z", ++ [Define to printf format modifier for Py_ssize_t]) ++fi + + AC_CHECK_TYPE(socklen_t,, + AC_DEFINE(socklen_t,int, diff --git a/lang/python/patches/020-dont-compile-python-files.patch b/lang/python/patches/020-dont-compile-python-files.patch new file mode 100644 index 0000000..b3dd89d --- /dev/null +++ b/lang/python/patches/020-dont-compile-python-files.patch @@ -0,0 +1,29 @@ +--- + Makefile.pre.in | 16 ---------------- + 1 file changed, 16 deletions(-) + +--- Python-2.6.4.orig/Makefile.pre.in ++++ Python-2.6.4/Makefile.pre.in +@@ -887,22 +887,6 @@ libinstall: build_all $(srcdir)/Lib/$(PL + done; \ + done + $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt +- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST) -f \ +- -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) +- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST) -f \ +- -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST)/site-packages -f \ +- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST)/site-packages -f \ +- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" + diff --git a/lang/python/patches/030-fixup-include-dirs.patch b/lang/python/patches/030-fixup-include-dirs.patch new file mode 100644 index 0000000..ad00956 --- /dev/null +++ b/lang/python/patches/030-fixup-include-dirs.patch @@ -0,0 +1,42 @@ +--- + setup.py | 15 ++------------- + 1 file changed, 2 insertions(+), 13 deletions(-) + +--- Python-2.6.4.orig/setup.py ++++ Python-2.6.4/setup.py +@@ -309,9 +309,6 @@ class PyBuildExt(build_ext): + return sys.platform + + def detect_modules(self): +- # Ensure that /usr/local is always used +- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') +- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + + # Add paths specified in the environment variables LDFLAGS and + # CPPFLAGS for header and library files. +@@ -347,11 +344,6 @@ class PyBuildExt(build_ext): + for directory in reversed(options.dirs): + add_dir_to_list(dir_list, directory) + +- if os.path.normpath(sys.prefix) != '/usr': +- add_dir_to_list(self.compiler.library_dirs, +- sysconfig.get_config_var("LIBDIR")) +- add_dir_to_list(self.compiler.include_dirs, +- sysconfig.get_config_var("INCLUDEDIR")) + + try: + have_unicode = unicode +@@ -361,11 +353,8 @@ class PyBuildExt(build_ext): + # lib_dirs and inc_dirs are used to search for files; + # if a file is found in one of those directories, it can + # be assumed that no additional -I,-L directives are needed. +- lib_dirs = self.compiler.library_dirs + [ +- '/lib64', '/usr/lib64', +- '/lib', '/usr/lib', +- ] +- inc_dirs = self.compiler.include_dirs + ['/usr/include'] ++ lib_dirs = self.compiler.library_dirs ++ inc_dirs = self.compiler.include_dirs + exts = [] + missing = [] + diff --git a/lang/python/patches/040-dont-import-cross-compiled-modules.patch b/lang/python/patches/040-dont-import-cross-compiled-modules.patch new file mode 100644 index 0000000..85e1e7e --- /dev/null +++ b/lang/python/patches/040-dont-import-cross-compiled-modules.patch @@ -0,0 +1,43 @@ +--- + setup.py | 30 ------------------------------ + 1 file changed, 30 deletions(-) + +--- Python-2.6.4.orig/setup.py ++++ Python-2.6.4/setup.py +@@ -270,36 +270,6 @@ class PyBuildExt(build_ext): + ext_filename = os.path.join( + self.build_lib, + self.get_ext_filename(self.get_ext_fullname(ext.name))) +- try: +- imp.load_dynamic(ext.name, ext_filename) +- except ImportError, why: +- self.failed.append(ext.name) +- self.announce('*** WARNING: renaming "%s" since importing it' +- ' failed: %s' % (ext.name, why), level=3) +- assert not self.inplace +- basename, tail = os.path.splitext(ext_filename) +- newname = basename + "_failed" + tail +- if os.path.exists(newname): +- os.remove(newname) +- os.rename(ext_filename, newname) +- +- # XXX -- This relies on a Vile HACK in +- # distutils.command.build_ext.build_extension(). The +- # _built_objects attribute is stored there strictly for +- # use here. +- # If there is a failure, _built_objects may not be there, +- # so catch the AttributeError and move on. +- try: +- for filename in self._built_objects: +- os.remove(filename) +- except AttributeError: +- self.announce('unable to remove files (ignored)') +- except: +- exc_type, why, tb = sys.exc_info() +- self.announce('*** WARNING: importing extension "%s" ' +- 'failed with %s: %s' % (ext.name, exc_type, why), +- level=3) +- self.failed.append(ext.name) + + def get_platform(self): + # Get value of sys.platform diff --git a/lang/python/patches/070-dont-clean-ipkg-install.patch b/lang/python/patches/070-dont-clean-ipkg-install.patch new file mode 100644 index 0000000..0eee56b --- /dev/null +++ b/lang/python/patches/070-dont-clean-ipkg-install.patch @@ -0,0 +1,21 @@ +--- + Makefile.pre.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- Python-2.6.4.orig/Makefile.pre.in ++++ Python-2.6.4/Makefile.pre.in +@@ -1118,11 +1118,11 @@ TAGS:: + # Sanitation targets -- clean leaves libraries, executables and tags + # files, which clobber removes as well + pycremoval: +- find $(srcdir) -name '*.py[co]' -exec rm -f {} ';' ++ find $(srcdir) ! -path './ipkg-install/*' -name '*.py[co]' -exec rm -f {} ';' + + clean: pycremoval +- find . -name '*.o' -exec rm -f {} ';' +- find . -name '*.s[ol]' -exec rm -f {} ';' ++ find . ! -path './ipkg-install/*' -name '*.o' -exec rm -f {} ';' ++ find . ! -path './ipkg-install/*' -name '*.s[ol]' -exec rm -f {} ';' + find $(srcdir)/build -name 'fficonfig.h' -exec rm -f {} ';' || true + find $(srcdir)/build -name 'fficonfig.py' -exec rm -f {} ';' || true + -rm -f Lib/lib2to3/*Grammar*.pickle diff --git a/lang/python/patches/080-distutils-dont_adjust_files.patch b/lang/python/patches/080-distutils-dont_adjust_files.patch new file mode 100644 index 0000000..c4798e5 --- /dev/null +++ b/lang/python/patches/080-distutils-dont_adjust_files.patch @@ -0,0 +1,63 @@ +--- + Lib/distutils/command/build_scripts.py | 43 +++------------------------------ + 1 file changed, 4 insertions(+), 39 deletions(-) + +--- Python-2.6.4.orig/Lib/distutils/command/build_scripts.py ++++ Python-2.6.4/Lib/distutils/command/build_scripts.py +@@ -54,10 +54,7 @@ class build_scripts (Command): + + + def copy_scripts (self): +- """Copy each script listed in 'self.scripts'; if it's marked as a +- Python script in the Unix way (first line matches 'first_line_re', +- ie. starts with "\#!" and contains "python"), then adjust the first +- line to refer to the current Python interpreter as we copy. ++ """Copy each script listed in 'self.scripts' + """ + self.mkpath(self.build_dir) + outfiles = [] +@@ -80,41 +77,9 @@ class build_scripts (Command): + if not self.dry_run: + raise + f = None +- else: +- first_line = f.readline() +- if not first_line: +- self.warn("%s is an empty file (skipping)" % script) +- continue +- +- match = first_line_re.match(first_line) +- if match: +- adjust = 1 +- post_interp = match.group(1) or '' +- +- if adjust: +- log.info("copying and adjusting %s -> %s", script, +- self.build_dir) +- if not self.dry_run: +- outf = open(outfile, "w") +- if not sysconfig.python_build: +- outf.write("#!%s%s\n" % +- (self.executable, +- post_interp)) +- else: +- outf.write("#!%s%s\n" % +- (os.path.join( +- sysconfig.get_config_var("BINDIR"), +- "python%s%s" % (sysconfig.get_config_var("VERSION"), +- sysconfig.get_config_var("EXE"))), +- post_interp)) +- outf.writelines(f.readlines()) +- outf.close() +- if f: +- f.close() +- else: +- if f: +- f.close() +- self.copy_file(script, outfile) ++ if f: ++ f.close() ++ self.copy_file(script, outfile) + + if os.name == 'posix': + for file in outfiles: diff --git a/lang/python/patches/090-fix-ctypes.patch b/lang/python/patches/090-fix-ctypes.patch new file mode 100644 index 0000000..616e76d --- /dev/null +++ b/lang/python/patches/090-fix-ctypes.patch @@ -0,0 +1,16 @@ +--- + Lib/ctypes/__init__.py | 6 ------ + 1 file changed, 6 deletions(-) + +--- Python-2.6.4.orig/Lib/ctypes/__init__.py ++++ Python-2.6.4/Lib/ctypes/__init__.py +@@ -538,9 +538,3 @@ for kind in [c_ushort, c_uint, c_ulong, + elif sizeof(kind) == 4: c_uint32 = kind + elif sizeof(kind) == 8: c_uint64 = kind + del(kind) +- +-# XXX for whatever reasons, creating the first instance of a callback +-# function is needed for the unittests on Win64 to succeed. This MAY +-# be a compiler bug, since the problem occurs only when _ctypes is +-# compiled with the MS SDK compiler. Or an uninitialized variable? +-CFUNCTYPE(c_int)(lambda: None) diff --git a/lang/python/patches/110-enable-zlib.patch b/lang/python/patches/110-enable-zlib.patch new file mode 100644 index 0000000..ac2e051 --- /dev/null +++ b/lang/python/patches/110-enable-zlib.patch @@ -0,0 +1,15 @@ +--- + Modules/Setup.dist | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- Python-2.6.4.orig/Modules/Setup.dist ++++ Python-2.6.4/Modules/Setup.dist +@@ -460,7 +460,7 @@ GLHACK=-Dclear=__GLclear + # Andrew Kuchling's zlib module. + # This require zlib 1.1.3 (or later). + # See http://www.gzip.org/zlib/ +-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz ++zlib zlibmodule.c -lz + + # Interface to the Expat XML parser + # diff --git a/lang/python/patches/120-force-internal-modules-for-hashlib.patch b/lang/python/patches/120-force-internal-modules-for-hashlib.patch new file mode 100644 index 0000000..f0bdeef --- /dev/null +++ b/lang/python/patches/120-force-internal-modules-for-hashlib.patch @@ -0,0 +1,30 @@ +--- + setup.py | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +--- Python-2.6.4.orig/setup.py ++++ Python-2.6.4/setup.py +@@ -622,9 +622,10 @@ class PyBuildExt(build_ext): + + #print 'openssl_ver = 0x%08x' % openssl_ver + +- if (ssl_incs is not None and +- ssl_libs is not None and +- openssl_ver >= 0x00907000): ++# if (ssl_incs is not None and ++# ssl_libs is not None and ++# openssl_ver >= 0x00907000): ++ if False: + # The _hashlib module wraps optimized implementations + # of hash functions from the OpenSSL library. + exts.append( Extension('_hashlib', ['_hashopenssl.c'], +@@ -644,7 +645,8 @@ class PyBuildExt(build_ext): + depends = ['md5.h']) ) + missing.append('_hashlib') + +- if (openssl_ver < 0x00908000): ++# if (openssl_ver < 0x00908000): ++ if True: + # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash + exts.append( Extension('_sha256', ['sha256module.c']) ) + exts.append( Extension('_sha512', ['sha512module.c']) ) diff --git a/lang/python2-chardet/Makefile b/lang/python2-chardet/Makefile new file mode 100644 index 0000000..4e8bcb3 --- /dev/null +++ b/lang/python2-chardet/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python2-chardet +PKG_VERSION:=2.0.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://chardet.feedparser.org/download/ +PKG_MD5SUM:=ec771971bab5dd1943a10362ebd2fd4c + +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/python2-chardet + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Universal Encoding Detector + URL:=http://chardet.feedparser.org/ + DEPENDS:=+python +endef + +define Package/python2-chardet/description + Character encoding auto-detection in Python. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr") +endef + +define Package/python2-chardet/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,python2-chardet)) diff --git a/lang/pyusb/Makefile b/lang/pyusb/Makefile new file mode 100644 index 0000000..9f2ca62 --- /dev/null +++ b/lang/pyusb/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pyusb +PKG_VERSION:=0.4.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/pyusb +PKG_MD5SUM:=5667a00af1ac0d5062103b4512e227f8 +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/pyusb + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=pyusb + URL:=http://pyusb.sourceforge.net + DEPENDS:=+python-mini +libusb +endef + +define Package/pyusb/description + usb port python bindings +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr") +endef + +define Package/pyusb/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,pyusb)) diff --git a/lang/pyxdg/Makefile b/lang/pyxdg/Makefile new file mode 100644 index 0000000..1eb255c --- /dev/null +++ b/lang/pyxdg/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pyxdg +PKG_VERSION:=0.18 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://people.freedesktop.org/~lanius/ +PKG_MD5SUM:=076b57722e91dab8ab83028c6ef9dcea + +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/pyxdg + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=pyxdg + URL:=http://freedesktop.org/wiki/Software/pyxdg + DEPENDS:=+python +endef + +define Package/pyxdg/description + A Python module to deal with freedesktop.org specifications +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr") +endef + +define Package/pyxdg/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,pyxdg)) diff --git a/lang/pyyaml/Makefile b/lang/pyyaml/Makefile new file mode 100644 index 0000000..02103f1 --- /dev/null +++ b/lang/pyyaml/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=PyYAML +PKG_VERSION:=3.08 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pyyaml.org/download/pyyaml/ +PKG_MD5SUM:=a4163a2017fa57f448c66815511fa555 + +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/pyyaml + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=pyyaml + URL:=http://pyyaml.org + DEPENDS:=+python +libyaml +endef + +define Package/pyyaml/description + yaml python bindings +endef + +define Build/Compile + $(call Build/Compile/PyMod,,--with-libyaml install --prefix="$(PKG_INSTALL_DIR)/usr") +endef + +define Package/pyyaml/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,pyyaml)) diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile new file mode 100644 index 0000000..04c8a16 --- /dev/null +++ b/lang/ruby/Makefile @@ -0,0 +1,486 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# +# To Do: +# - split up encodings +# - allow selection of either native or pure version of a library where supported +# +-> some native libraries are probably only supported if ruby-dl is enabled +# anything else? + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ruby +PKG_VERSION:=1.9.2-p0 +PKG_RELEASE:=1 + +PKG_LIBVER:=1.9 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/ +PKG_MD5SUM:=d8a02cadf57d2571cd4250e248ea7e4b + +PKG_BUILD_DEPENDS:=ruby/host +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/ruby/Default + SUBMENU:=Ruby + SECTION:=lang + CATEGORY:=Languages + TITLE:=Ruby scripting language + URL:=http://www.ruby-lang.org/ +endef + +define Package/ruby/Default/description + Ruby is the interpreted scripting language for quick and easy + object-oriented programming. It has many features to process text files + and to do system management tasks (as in perl). It is simple, + straight-forward, and extensible. +endef + +define Package/ruby +$(call Package/ruby/Default) + TITLE+= (interpreter) + DEPENDS:=+libruby +endef + +define Package/ruby/description +$(call Package/ruby/Default/description) +endef + +define Package/libruby +$(call Package/ruby/Default) + SUBMENU:= + SECTION:=libs + CATEGORY:=Libraries + TITLE+= (shared library) + DEPENDS+= +libpthread +endef + +# Ongoing work to break up ruby's standard library into coherent pieces +# with minimal dependencies between them + +define Package/ruby-core +$(call Package/ruby/Default) + TITLE:=Ruby standard libraries + DEPENDS:=ruby +endef + +define Package/ruby-cgi +$(call Package/ruby/Default) + TITLE:=Ruby CGI support toolkit + DEPENDS:=ruby +endef + +define Package/ruby-dl +$(call Package/ruby/Default) + TITLE+= (dynamic linker support) (adds 5MB+) + DEPENDS:=ruby +endef + +define Package/ruby-enc +$(call Package/ruby/Default) + TITLE+= (character re-coding library) (adds 2MB+) + DEPENDS:=ruby +endef + +define Package/ruby-erb +$(call Package/ruby/Default) + TITLE+= (embedded interpreter) + DEPENDS:=ruby +endef + +define Package/ruby-gdbm +$(call Package/ruby/Default) + TITLE:=Ruby support for gdbm + DEPENDS:=ruby +libgdbm +endef + +define Package/ruby-gems +$(call Package/ruby/Default) + TITLE:=Ruby gems packet management + DEPENDS:=ruby +ruby-yaml +ruby-zlib +ruby-openssl +ruby-webrick +ruby-erb +endef + +define Package/ruby-irb +$(call Package/ruby/Default) + TITLE+= (interactive shell) + DEPENDS:=ruby +ruby-core +endef + +define Package/ruby-json +$(call Package/ruby/Default) + TITLE:=Ruby support for JSON + DEPENDS:=ruby +endef + +define Package/ruby-ncurses +$(call Package/ruby/Default) + TITLE:=Ruby support for ncurses + DEPENDS:=ruby +libncurses +endef + +define Package/ruby-nkf +$(call Package/ruby/Default) + TITLE:=Ruby Network Kanji Filter + DEPENDS:=ruby +endef + +define Package/ruby-openssl +$(call Package/ruby/Default) + TITLE:=Ruby support for openssl + DEPENDS:=ruby +libopenssl +endef + +define Package/ruby-rdoc +$(call Package/ruby/Default) + TITLE+= (documentation generator) + DEPENDS:=ruby +endef + +define Package/ruby-rake +$(call Package/ruby/Default) + TITLE+=Ruby Rake (make replacement) + DEPENDS:=ruby +endef + +define Package/ruby-readline +$(call Package/ruby/Default) + TITLE:=Ruby support for readline + DEPENDS:=ruby +libncurses +libreadline +endef + +define Package/ruby-rexml +$(call Package/ruby/Default) + TITLE:=Ruby XML toolkit + DEPENDS:=ruby +endef + +define Package/ruby-rss +$(call Package/ruby/Default) + TITLE:=Ruby RSS toolkit + DEPENDS:=ruby +endef + +define Package/ruby-unit +$(call Package/ruby/Default) + TITLE:=Ruby unit testing toolkit + DEPENDS:=ruby +endef + +define Package/ruby-webrick +$(call Package/ruby/Default) + TITLE:=Ruby Web server toolkit + DEPENDS:=ruby +endef + +define Package/ruby-xmlrpc +$(call Package/ruby/Default) + TITLE:=Ruby XML-RPC toolkit + DEPENDS:=ruby +endef + +define Package/ruby-yaml +$(call Package/ruby/Default) + TITLE:=Ruby YAML toolkit + DEPENDS:=ruby +endef + +define Package/ruby-zlib +$(call Package/ruby/Default) + TITLE:=Ruby support for zlib + DEPENDS:=ruby +zlib +endef + + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --disable-rpath \ + --enable-ipv6 \ + --enable-wide-getaddrinfo \ + --with-ruby-version=minor \ + --with-iconv-dir=$(ICONV_PREFIX) \ + +TARGET_LDFLAGS += -L$(PKG_BUILD_DIR) + +MAKE_FLAGS += \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + SHELL="/bin/bash" + +define Build/Prepare +$(call Build/Prepare/Default) + ( cd $(PKG_BUILD_DIR) ; \ + autoconf ; \ + ) +endef + +define Package/ruby/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/bin/ +endef + +define Package/libruby/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/ +endef + +define Package/ruby-core/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby $(1)/usr/lib/ + rm -rf \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/curses.so \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/digest \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/digest.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/digest \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/digest.so \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/openssl \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/openssl.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/drb/ssl.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/net/https.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick/ssl.rb \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/dl.so \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/enc \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/readline.so \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb/completion.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb/ext/save-history.rb \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/json.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/json \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/json \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/rdoc \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/rake \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/rubygems \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/cgi \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/rexml \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/rss \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/rss.rb \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/test \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/yaml \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/syck.so \ + + find $(1) -name '*.h' | xargs rm -f +endef + +define Package/ruby-cgi/install + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi $(1)/usr/lib/ruby/$(PKG_LIBVER)/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + +define Package/ruby-dl/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/*/dl.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-enc/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/*/enc \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-erb/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/erb $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + +define Package/ruby-gdbm/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-gems/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + +define Package/ruby-irb/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + +define Package/ruby-json/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/json.rb \ + usr/lib/ruby/$(PKG_LIBVER)/json \ + usr/lib/ruby/$(PKG_LIBVER)/*/json \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-ncurses/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/*/curses.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-nkf/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \ + usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-openssl/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/digest \ + usr/lib/ruby/$(PKG_LIBVER)/digest.rb \ + usr/lib/ruby/$(PKG_LIBVER)/*/digest.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/digest/*.so \ + usr/lib/ruby/$(PKG_LIBVER)/openssl \ + usr/lib/ruby/$(PKG_LIBVER)/openssl.rb \ + usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so \ + usr/lib/ruby/$(PKG_LIBVER)/drb/ssl.rb \ + usr/lib/ruby/$(PKG_LIBVER)/net/https.rb \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-rdoc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + +define Package/ruby-rake/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + +define Package/ruby-readline/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/*/readline.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-rexml/install + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rexml $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + + +define Package/ruby-rss/install + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss $(1)/usr/lib/ruby/$(PKG_LIBVER)/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + +define Package/ruby-unit/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/testrb $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/test $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + +define Package/ruby-webrick/install + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick $(1)/usr/lib/ruby/$(PKG_LIBVER)/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + +define Package/ruby-xmlrpc/install + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + +define Package/ruby-yaml/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/yaml \ + usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \ + usr/lib/ruby/$(PKG_LIBVER)/*/syck.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-zlib/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Build/InstallDev + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + . \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +$(eval $(call BuildPackage,ruby)) +$(eval $(call BuildPackage,libruby)) +$(eval $(call BuildPackage,ruby-core)) +$(eval $(call BuildPackage,ruby-cgi)) +$(eval $(call BuildPackage,ruby-dl)) +$(eval $(call BuildPackage,ruby-enc)) +$(eval $(call BuildPackage,ruby-erb)) +$(eval $(call BuildPackage,ruby-gdbm)) +$(eval $(call BuildPackage,ruby-gems)) +$(eval $(call BuildPackage,ruby-json)) +$(eval $(call BuildPackage,ruby-irb)) +$(eval $(call BuildPackage,ruby-ncurses)) +$(eval $(call BuildPackage,ruby-nkf)) +$(eval $(call BuildPackage,ruby-openssl)) +$(eval $(call BuildPackage,ruby-rake)) +$(eval $(call BuildPackage,ruby-rdoc)) +$(eval $(call BuildPackage,ruby-readline)) +$(eval $(call BuildPackage,ruby-rexml)) +$(eval $(call BuildPackage,ruby-rss)) +$(eval $(call BuildPackage,ruby-unit)) +$(eval $(call BuildPackage,ruby-webrick)) +$(eval $(call BuildPackage,ruby-xmlrpc)) +$(eval $(call BuildPackage,ruby-yaml)) +$(eval $(call BuildPackage,ruby-zlib)) +$(eval $(call HostBuild)) diff --git a/lang/ruby/patches/0001-Add-option-which-enable-SSLv2-support.patch b/lang/ruby/patches/0001-Add-option-which-enable-SSLv2-support.patch new file mode 100644 index 0000000..5591d99 --- /dev/null +++ b/lang/ruby/patches/0001-Add-option-which-enable-SSLv2-support.patch @@ -0,0 +1,53 @@ +From b983e73adf7a7d3fd07fdf493eee51c22881a6e6 Mon Sep 17 00:00:00 2001 +From: Nobuhiro Iwamatsu +Date: Wed, 6 Apr 2011 02:28:09 +0900 +Subject: [PATCH] Add option which enable SSLv2 support + +From openssl 1.0, SSLv2 becomes disable by default. +If you want to use SSLv2 in ruby, you need config with --enable-opensslv2. +The SSLv2 support is disable by default. + +Signed-off-by: Nobuhiro Iwamatsu +--- + ext/openssl/extconf.rb | 8 ++++++++ + ext/openssl/ossl_ssl.c | 2 ++ + 2 files changed, 10 insertions(+), 0 deletions(-) + +diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb +index b1f2d88..89c6f19 100644 +--- a/ext/openssl/extconf.rb ++++ b/ext/openssl/extconf.rb +@@ -33,6 +33,14 @@ if with_config("debug") or enable_config("debug") + end + end + ++## ++## From openssl 1.0, SSLv2 becomes disable by default. ++## If you want to use SSLv2 in ruby, you need config with --enable-opensslv2. ++## ++if enable_config("opensslv2") ++ $defs << "-DENABLE_OPENSSLV2" ++end ++ + message "=== Checking for system dependent stuff... ===\n" + have_library("nsl", "t_open") + have_library("socket", "socket") +diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c +index d8951fb..d0c9059 100644 +--- a/ext/openssl/ossl_ssl.c ++++ b/ext/openssl/ossl_ssl.c +@@ -107,9 +107,11 @@ struct { + OSSL_SSL_METHOD_ENTRY(TLSv1), + OSSL_SSL_METHOD_ENTRY(TLSv1_server), + OSSL_SSL_METHOD_ENTRY(TLSv1_client), ++#if defined(ENABLE_OPENSSLV2) + OSSL_SSL_METHOD_ENTRY(SSLv2), + OSSL_SSL_METHOD_ENTRY(SSLv2_server), + OSSL_SSL_METHOD_ENTRY(SSLv2_client), ++#endif + OSSL_SSL_METHOD_ENTRY(SSLv3), + OSSL_SSL_METHOD_ENTRY(SSLv3_server), + OSSL_SSL_METHOD_ENTRY(SSLv3_client), +-- +1.7.4.1 + diff --git a/lang/sigscheme/Makefile b/lang/sigscheme/Makefile new file mode 100644 index 0000000..7830e04 --- /dev/null +++ b/lang/sigscheme/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sigscheme +PKG_VERSION:=0.8.3 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://sigscheme.googlecode.com/files/ +PKG_MD5SUM:=f25b0acbb854651b375b42f17ad20f39 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/sigscheme + SECTION:=lang + CATEGORY:=Languages + TITLE:=SigScheme + URL:=http://code.google.com/p/sigscheme/ + DEPENDS:=@!avr32 +endef + +define Package/sigscheme/description +SigScheme is a R5RS Scheme interpreter for embedded use. It features small +footprint (64KB in library form on the 'small' configuration) like SIOD and +TinyScheme, low memory consumption (2-words per cons cell), multibyte characters +handling (UTF-8, EUCs and Shift_JIS) and more. +endef + +define Package/sigscheme/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{gcroots,sscm}.so.* $(1)/usr/lib + + $(INSTALL_DIR) $(1)/usr/share/sigscheme/lib + $(CP) $(PKG_INSTALL_DIR)/usr/share/sigscheme/lib/* \ + $(1)/usr/share/sigscheme/lib/ + + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/sscm $(1)/usr/bin +endef + +$(eval $(call BuildPackage,sigscheme)) diff --git a/lang/sqlite3-ruby/Makefile b/lang/sqlite3-ruby/Makefile new file mode 100644 index 0000000..c675550 --- /dev/null +++ b/lang/sqlite3-ruby/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sqlite3-ruby +PKG_VERSION:=1.2.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://files.rubyforge.vm.bytemark.co.uk/sqlite-ruby/ +PKG_MD5SUM:=fe75fa99dd9a2b5a2f84ab484e7f6469 + +include $(INCLUDE_DIR)/package.mk + +define Package/ruby-sqlite3 + SUBMENU:=Ruby + SECTION:=lang + CATEGORY:=Languages + TITLE:=Ruby interface for SQLite + URL:=http://www.ruby-lang.org/ + DEPENDS:=+libruby +libsqlite3 @BROKEN +endef + +RUBY:= \ + ruby -I $(STAGING_DIR)/usr/share/ruby \ + +define Build/Configure + (cd $(PKG_BUILD_DIR)/ext/sqlite3_api; \ + $(RUBY) extconf.rb; \ + ) +endef + +define Build/Compile + (cd $(PKG_BUILD_DIR)/ext/sqlite3_api; \ + $(MAKE); \ + ) +endef + +define Package/ruby-sqlite3/install + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ + +endef + +$(eval $(call BuildPackage,ruby-sqlite3)) diff --git a/lang/tcl/Makefile b/lang/tcl/Makefile new file mode 100644 index 0000000..6e736c6 --- /dev/null +++ b/lang/tcl/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tcl +PKG_VERSION:=8.5.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION)-src.tar.gz +PKG_SOURCE_URL:=@SF/tcl +PKG_MD5SUM:=7f123e53b3daaaba2478d3af5a0752e3 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION) + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/tcl + SECTION:=lang + CATEGORY:=Languages + TITLE:=TCL Lang + URL:=http://www.tcl.tk +endef + +define Package/tcl/description +Tcl (Tool Command Language) is a very powerful but easy to learn dynamic +programming language, suitable for a very wide range of uses, including web and +desktop applications, networking, administration, testing and many more. Open +source and business-friendly, Tcl is a mature yet evolving language that is truly +cross platform, easily deployed and highly extensible. +endef + +CONFIGURE_PATH := unix + +CONFIGURE_VARS += \ + tcl_cv_strtod_unbroken=ok + +CONFIGURE_ARGS += \ + --enable-threads + +MAKE_PATH := unix + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtcl*.{a,so*} $(1)/usr/lib/ +endef + +define Package/tcl/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib + + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin +endef + +$(eval $(call BuildPackage,tcl)) diff --git a/lang/tcl/patches/100-disable_tzdata_and_msgs_install.patch b/lang/tcl/patches/100-disable_tzdata_and_msgs_install.patch new file mode 100644 index 0000000..1db8f07 --- /dev/null +++ b/lang/tcl/patches/100-disable_tzdata_and_msgs_install.patch @@ -0,0 +1,22 @@ +--- a/unix/Makefile.in ++++ b/unix/Makefile.in +@@ -817,15 +817,15 @@ install-tzdata: tclsh + @echo "Installing time zone data" + @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ + TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ +- ./tclsh $(TOOL_DIR)/installData.tcl \ +- $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata ++ #./tclsh $(TOOL_DIR)/installData.tcl \ ++ # $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata + + install-msgs: tclsh + @echo "Installing message catalogs" + @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ + TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ +- ./tclsh $(TOOL_DIR)/installData.tcl \ +- $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs ++ #./tclsh $(TOOL_DIR)/installData.tcl \ ++ # $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs + + install-doc: doc + @for i in "$(MAN_INSTALL_DIR)" "$(MAN1_INSTALL_DIR)" "$(MAN3_INSTALL_DIR)" "$(MANN_INSTALL_DIR)" ; \ diff --git a/lang/tcl/patches/200-fix_mips_build.patch b/lang/tcl/patches/200-fix_mips_build.patch new file mode 100644 index 0000000..48485ca --- /dev/null +++ b/lang/tcl/patches/200-fix_mips_build.patch @@ -0,0 +1,20 @@ +--- a/generic/tclStrToD.c ++++ b/generic/tclStrToD.c +@@ -73,7 +73,7 @@ typedef unsigned int fpu_control_t __att + * MIPS floating-point units need special settings in control registers + * to use gradual underflow as we expect. + */ +-#if defined(__mips) ++#if defined(__sgi) && defined(_COMPILER_VERSION) + #include + #endif + /* +@@ -2166,7 +2166,7 @@ TclInitDoubleConversion(void) + } bitwhack; + #endif + +-#if defined(__mips) ++#if defined(__sgi) && defined(_COMPILER_VERSION) + union fpc_csr mipsCR; + + mipsCR.fc_word = get_fpc_csr(); diff --git a/lang/telepathy-python/Makefile b/lang/telepathy-python/Makefile new file mode 100644 index 0000000..436ea67 --- /dev/null +++ b/lang/telepathy-python/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2008-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=telepathy-python +PKG_VERSION:=0.15.3 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://telepathy.freedesktop.org/releases/telepathy-python/ +PKG_MD5SUM:=594a66a70764052e30df9428b5be52b2 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/telepathy-python + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=telepathy-python + URL:=http://telepathy.freedesktop.org + DEPENDS:=+python-mini +dbus-python +endef + +define Package/telepathy-python/description + telepathy python bindings +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr") +endef + +define Package/telepathy-python/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call RequireCommand,xsltproc, \ + $(PKG_NAME) requires xsltproc installed on the host-system. \ +)) + +$(eval $(call BuildPackage,telepathy-python)) + diff --git a/lang/twisted/Makefile b/lang/twisted/Makefile new file mode 100644 index 0000000..cabb8cb --- /dev/null +++ b/lang/twisted/Makefile @@ -0,0 +1,248 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=twisted +PKG_VERSION:=2.5.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=Twisted-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://tmrc.mit.edu/mirror/twisted/Twisted/2.5 +PKG_MD5SUM:=56df2ae66db57932515a491c03bf514f + +PKG_BUILD_DIR:=$(BUILD_DIR)/Twisted-$(PKG_VERSION) +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/twisted/default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + URL:=http://twistedmatrix.com/ + DEPENDS:=+python-mini +endef + +define Package/twisted/default/description + Twisted is a networking engine written in Python, supporting numerous + protocols. It contains a web server, numerous chat clients, chat servers, + mail servers, and more. +endef + +define Package/twisted +$(call Package/twisted/default) + TITLE:=Python networking engine + DEPENDS+= +zope-interface +endef + +define Package/twisted-conch +$(call Package/twisted/default) + TITLE:=Twisted - Conch + DEPENDS+= twisted +endef + +define Package/twisted-lore +$(call Package/twisted/default) + TITLE:=Twisted - Lore + DEPENDS+= twisted +endef + +define Package/twisted-mail +$(call Package/twisted/default) + TITLE:=Twisted - Mail + DEPENDS+= twisted +endef + +define Package/twisted-names +$(call Package/twisted/default) + TITLE:=Twisted - Names + DEPENDS+= twisted +endef + +define Package/twisted-news +$(call Package/twisted/default) + TITLE:=Twisted - News + DEPENDS+= twisted +endef + +define Package/twisted-runner +$(call Package/twisted/default) + TITLE:=Twisted - Runner + DEPENDS+= twisted +endef + +define Package/twisted-web +$(call Package/twisted/default) + TITLE:=Twisted - Web + DEPENDS+= twisted +endef + +define Package/twisted-words +$(call Package/twisted/default) + TITLE:=Twisted - Words + DEPENDS+= twisted +endef + +define Package/zope-interface +$(call Package/twisted/default) + TITLE:=Zope interface +endef + +TWISTED_SUPPROJECTS:=core + +ZOPE_IF_VER=3.3.0 + +ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-conch),) + TWISTED_SUBPROJECTS+=conch +endif +ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-lore),) + TWISTED_SUBPROJECTS+=lore +endif +ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-mail),) + TWISTED_SUBPROJECTS+=mail +endif +ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-names),) + TWISTED_SUBPROJECTS+=names +endif +ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-news),) + TWISTED_SUBPROJECTS+=news +endif +ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-runner),) + TWISTED_SUBPROJECTS+=runner +endif +ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-web),) + TWISTED_SUBPROJECTS+=web +endif +ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-words),) + TWISTED_SUBPROJECTS+=words +endif + + +define Build/Configure +endef + +define PyPackage/twisted/filespec ++|/usr/bin/mktap ++|/usr/bin/twistd ++|$(PYTHON_PKG_DIR)/twisted/application ++|$(PYTHON_PKG_DIR)/twisted/copyright.py ++|$(PYTHON_PKG_DIR)/twisted/cred ++|$(PYTHON_PKG_DIR)/twisted/enterprise ++|$(PYTHON_PKG_DIR)/twisted/im.py ++|$(PYTHON_PKG_DIR)/twisted/__init__.py ++|$(PYTHON_PKG_DIR)/twisted/internet ++|$(PYTHON_PKG_DIR)/twisted/manhole ++|$(PYTHON_PKG_DIR)/twisted/persisted ++|$(PYTHON_PKG_DIR)/twisted/plugin.py ++|$(PYTHON_PKG_DIR)/twisted/protocols ++|$(PYTHON_PKG_DIR)/twisted/python ++|$(PYTHON_PKG_DIR)/twisted/scripts ++|$(PYTHON_PKG_DIR)/twisted/spread ++|$(PYTHON_PKG_DIR)/twisted/tap ++|$(PYTHON_PKG_DIR)/twisted/trial +-|$(PYTHON_PKG_DIR)/twisted/trial/test ++|$(PYTHON_PKG_DIR)/twisted/_version.py ++|$(PYTHON_PKG_DIR)/twisted/plugins/dropin.cache ++|$(PYTHON_PKG_DIR)/twisted/plugins/__init__.py ++|$(PYTHON_PKG_DIR)/twisted/plugins/notestplugin.py ++|$(PYTHON_PKG_DIR)/twisted/plugins/testplugin.py ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_ftp.py ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_inet.py ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_manhole.py ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_portforward.py ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_reactors.py ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_socks.py ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_telnet.py ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_trial.py +endef + +define PyPackage/twisted-conch/filespec ++|$(PYTHON_PKG_DIR)/twisted/conch +-|$(PYTHON_PKG_DIR)/twisted/conch/test ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_conch.py +endef + +define PyPackage/twisted-lore/filespec ++|$(PYTHON_PKG_DIR)/twisted/lore +-|$(PYTHON_PKG_DIR)/twisted/lore/test ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_lore.py +endef + +define PyPackage/twisted-mail/filespec ++|$(PYTHON_PKG_DIR)/twisted/mail +-|$(PYTHON_PKG_DIR)/twisted/mail/test ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_mail.py +endef + +define PyPackage/twisted-names/filespec ++|$(PYTHON_PKG_DIR)/twisted/names +-|$(PYTHON_PKG_DIR)/twisted/names/test ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_names.py +endef + +define PyPackage/twisted-news/filespec ++|$(PYTHON_PKG_DIR)/twisted/news +-|$(PYTHON_PKG_DIR)/twisted/news/test ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_news.py +endef + +define PyPackage/twisted-runner/filespec ++|$(PYTHON_PKG_DIR)/twisted/runner +endef + +define PyPackage/twisted-web/filespec ++|$(PYTHON_PKG_DIR)/twisted/web +-|$(PYTHON_PKG_DIR)/twisted/web/test ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_web.py +endef + +define PyPackage/twisted-words/filespec ++|$(PYTHON_PKG_DIR)/twisted/words +-|$(PYTHON_PKG_DIR)/twisted/words/test ++|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_words.py +endef + +define PyPackage/zope-interface/filespec ++|$(PYTHON_PKG_DIR)/zope +-|$(PYTHON_PKG_DIR)/zope/interface/tests +endef + +define Build/Compile + $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) + $(call Build/Compile/PyMod,., \ + install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --no-compile, \ + TWISTED_SUBPROJECTS="$(TWISTED_SUBPROJECTS)" \ + ) + $(call Build/Compile/PyMod,zope.interface-$(ZOPE_IF_VER), \ + install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --no-compile, \ + ) + $(SED) 's,#!$(PYTHON),#!/usr/bin/python,' $(PKG_INSTALL_DIR)/usr/bin/* +endef + +$(eval $(call PyPackage,twisted)) +$(eval $(call PyPackage,twisted-conch)) +$(eval $(call PyPackage,twisted-lore)) +$(eval $(call PyPackage,twisted-mail)) +$(eval $(call PyPackage,twisted-names)) +$(eval $(call PyPackage,twisted-news)) +$(eval $(call PyPackage,twisted-runner)) +$(eval $(call PyPackage,twisted-web)) +$(eval $(call PyPackage,twisted-words)) +$(eval $(call PyPackage,zope-interface)) + +$(eval $(call BuildPackage,twisted)) +$(eval $(call BuildPackage,twisted-conch)) +$(eval $(call BuildPackage,twisted-lore)) +$(eval $(call BuildPackage,twisted-mail)) +$(eval $(call BuildPackage,twisted-names)) +$(eval $(call BuildPackage,twisted-news)) +$(eval $(call BuildPackage,twisted-runner)) +$(eval $(call BuildPackage,twisted-web)) +$(eval $(call BuildPackage,twisted-words)) +$(eval $(call BuildPackage,zope-interface)) diff --git a/lang/twisted/patches/000-select_submodules.patch b/lang/twisted/patches/000-select_submodules.patch new file mode 100644 index 0000000..d36e737 --- /dev/null +++ b/lang/twisted/patches/000-select_submodules.patch @@ -0,0 +1,25 @@ +diff -ruN Twisted-2.5.0/setup.py Twisted-2.5.0.new/setup.py +--- Twisted-2.5.0/setup.py 2007-01-08 16:30:05.000000000 -0600 ++++ Twisted-2.5.0.new/setup.py 2007-05-10 13:42:28.361934000 -0500 +@@ -16,9 +16,19 @@ + """ + + import sys, os, glob ++# sumoSubprojects = ['core', 'conch', 'lore', 'mail', 'names', ++# 'runner', 'web', 'words', 'news'] ++ ++sp = os.getenv("TWISTED_SUBPROJECTS", None) ++if sp == None: ++ sumoSubprojects = ['core'] ++else: ++ sumoSubprojects = sp.split() ++ ++## make sure core is in sumoSubprojects ++if 'core' not in sumoSubprojects: ++ sumoSubprojects.insert(0, 'core') + +-sumoSubprojects = ['core', 'conch', 'lore', 'mail', 'names', +- 'runner', 'web', 'words', 'news'] + + specialPaths = {'core': 'twisted/topfiles/setup.py'} + diff --git a/lang/twisted/patches/001-dont_use_zope.patch b/lang/twisted/patches/001-dont_use_zope.patch new file mode 100644 index 0000000..5f42bd0 --- /dev/null +++ b/lang/twisted/patches/001-dont_use_zope.patch @@ -0,0 +1,162 @@ +--- Twisted-2.5.0/TwistedCore-2.5.0/setup.py 2006-12-22 23:02:47.000000000 -0600 ++++ Twisted-2.5.0.new/TwistedCore-2.5.0/setup.py 2007-05-14 16:13:36.095282000 -0500 +@@ -16,9 +16,8 @@ + from distutils.core import Extension + + if os.path.exists('twisted'): +- sys.path.insert(0, '.') # eek! need this to import twisted. sorry. +-from twisted import copyright +-from twisted.python import dist, util ++ sys.path.insert(0, 'twisted/python') # eek! need this to import twisted. sorry. ++import dist + + def detectExtensions(builder): + """ +@@ -72,7 +71,7 @@ + setup_args = dict( + # metadata + name="Twisted", +- version=copyright.version, ++ version="2.5.0", + description="An asynchronous networking framework written in Python", + author="Twisted Matrix Laboratories", + author_email="twisted-python@twistedmatrix.com", +--- Twisted-2.5.0/TwistedWords-0.5.0/setup.py 2006-05-13 14:26:09.000000000 -0500 ++++ Twisted-2.5.0.new/TwistedWords-0.5.0/setup.py 2007-05-14 16:24:39.860764750 -0500 +@@ -1,7 +1,8 @@ + import sys ++sys.path.append('../TwistedCore-2.5.0/twisted/python') + + try: +- from twisted.python import dist ++ import dist + except ImportError: + raise SystemExit("twisted.python.dist module not found. Make sure you " + "have installed the Twisted core package before " +--- Twisted-2.5.0/TwistedCore-2.5.0/twisted/python/dist.py 2006-10-01 14:16:04.000000000 -0500 ++++ Twisted-2.5.0.new//TwistedCore-2.5.0/twisted/python/dist.py 2007-05-14 16:50:07.952264500 -0500 +@@ -85,12 +85,25 @@ + "2.0.0". + """ + if proj == 'core': +- vfile = os.path.join(base, '_version.py') ++ return '2.5.0' ++ elif proj == 'words': ++ return '0.7.0' ++ elif proj == 'conch': ++ return '0.8.0' ++ elif proj == 'lore': ++ return '0.3.0' ++ elif proj == 'mail': ++ return '0.4.0' ++ elif proj == 'names': ++ return '0.4.0' ++ elif proj == 'news': ++ return '0.3.0' ++ elif proj == 'runner': ++ return '0.2.0' ++ elif proj == 'web': ++ return '0.7.0' + else: +- vfile = os.path.join(base, proj, '_version.py') +- ns = {'__name__': 'Nothing to see here'} +- execfile(vfile, ns) +- return ns['version'].base() ++ return False + + + # Names that are exluded from globbing results: +--- Twisted-2.5.0/TwistedConch-0.8.0/setup.py 2006-05-13 14:26:09.000000000 -0500 ++++ Twisted-2.5.0.new//TwistedConch-0.8.0/setup.py 2007-05-14 17:00:05.501609000 -0500 +@@ -1,7 +1,8 @@ + import sys ++sys.path.append('../TwistedCore-2.5.0/twisted/python') + + try: +- from twisted.python import dist ++ import dist + except ImportError: + raise SystemExit("twisted.python.dist module not found. Make sure you " + "have installed the Twisted core package before " +--- Twisted-2.5.0/TwistedLore-0.3.0/setup.py 2006-05-13 14:26:09.000000000 -0500 ++++ Twisted-2.5.0.new/TwistedLore-0.3.0/setup.py 2007-05-14 17:17:25.374597000 -0500 +@@ -1,7 +1,8 @@ + import sys ++sys.path.append('../TwistedCore-2.5.0/twisted/python') + + try: +- from twisted.python import dist ++ import dist + except ImportError: + raise SystemExit("twisted.python.dist module not found. Make sure you " + "have installed the Twisted core package before " +--- Twisted-2.5.0/TwistedMail-0.4.0/setup.py 2006-05-13 14:26:09.000000000 -0500 ++++ Twisted-2.5.0.new/TwistedMail-0.4.0/setup.py 2007-05-14 17:18:02.544920000 -0500 +@@ -1,7 +1,10 @@ + import sys ++sys.path.append('../TwistedCore-2.5.0/twisted/python') ++ + + try: +- from twisted.python import dist ++ import dist ++ + except ImportError: + raise SystemExit("twisted.python.dist module not found. Make sure you " + "have installed the Twisted core package before " +--- Twisted-2.5.0/TwistedNames-0.4.0/setup.py 2006-05-13 14:26:09.000000000 -0500 ++++ Twisted-2.5.0.new/TwistedNames-0.4.0/setup.py 2007-05-14 17:18:37.707117500 -0500 +@@ -1,7 +1,10 @@ + import sys ++sys.path.append('../TwistedCore-2.5.0/twisted/python') ++ + + try: +- from twisted.python import dist ++ import dist ++ + except ImportError: + raise SystemExit("twisted.python.dist module not found. Make sure you " + "have installed the Twisted core package before " +--- Twisted-2.5.0/TwistedNews-0.3.0/setup.py 2006-05-13 14:26:09.000000000 -0500 ++++ Twisted-2.5.0.new/TwistedNews-0.3.0/setup.py 2007-05-14 17:19:16.769558750 -0500 +@@ -1,6 +1,9 @@ ++import sys ++sys.path.append('../TwistedCore-2.5.0/twisted/python') + + try: +- from twisted.python import dist ++ import dist ++ + except ImportError: + raise SystemExit("twisted.python.dist module not found. Make sure you " + "have installed the Twisted core package before " +--- Twisted-2.5.0/TwistedRunner-0.2.0/setup.py 2006-05-13 14:26:09.000000000 -0500 ++++ Twisted-2.5.0.new/TwistedRunner-0.2.0/setup.py 2007-05-14 17:20:54.367658250 -0500 +@@ -1,8 +1,11 @@ ++import sys ++sys.path.append('../TwistedCore-2.5.0/twisted/python') + + from distutils.core import Extension + + try: +- from twisted.python import dist ++ import dist ++ + except ImportError: + raise SystemExit("twisted.python.dist module not found. Make sure you " + "have installed the Twisted core package before " +--- Twisted-2.5.0/TwistedWeb-0.7.0/setup.py 2006-05-13 14:26:09.000000000 -0500 ++++ Twisted-2.5.0.new/TwistedWeb-0.7.0/setup.py 2007-05-14 17:21:21.065326750 -0500 +@@ -1,7 +1,10 @@ + import sys ++sys.path.append('../TwistedCore-2.5.0/twisted/python') ++ + + try: +- from twisted.python import dist ++ import dist ++ + except ImportError: + raise SystemExit("twisted.python.dist module not found. Make sure you " + "have installed the Twisted core package before " diff --git a/lang/urbi/Makefile b/lang/urbi/Makefile new file mode 100644 index 0000000..945dbf9 --- /dev/null +++ b/lang/urbi/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=urbi +PKG_VERSION:=1.0RC2-l455 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-sdk-$(PKG_VERSION)-src.zip +PKG_SOURCE_URL:=http://www.gostai.com/downloads/aibo/ +PKG_MD5SUM:=02f64abb6232ddd7b0cb6dc182e2df26 +PKG_FIXUP:=libtool-ucxx + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-sdk + +include $(INCLUDE_DIR)/package.mk + +TARGET_CFLAGS += $(FPIC) + +define Package/urbi + SECTION:=lang + CATEGORY:=Languages + DEPENDS:=+uclibcxx +libpthread + TITLE:=URBI SDK + URL:=http://www.urbiforge.com +endef + +define Package/urbi/description + Universal Real-Time Behavior Interface for robots. +endef + +CONFIGURE_VARS += \ + CXX="g++-uc" \ + CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \ + EXAMPLES=0 \ + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + WARNING_CXXFLAGS="-Wall" \ + all install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/urbi + $(CP) $(PKG_INSTALL_DIR)/usr/include/urbi* $(1)/usr/include/urbi/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liburbi* $(1)/usr/lib/ +endef + +define Package/urbi/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/gostai + $(CP) $(PKG_INSTALL_DIR)/usr/gostai/* $(1)/usr/gostai/ +endef + +$(eval $(call BuildPackage,urbi)) diff --git a/lang/urbi/patches/001-no_examples.patch b/lang/urbi/patches/001-no_examples.patch new file mode 100644 index 0000000..0991b6e --- /dev/null +++ b/lang/urbi/patches/001-no_examples.patch @@ -0,0 +1,31 @@ +diff -urN urbi-sdk/src/Makefile.am urbi-sdk.new/src/Makefile.am +--- urbi-sdk/src/Makefile.am 2007-01-31 11:37:04.000000000 +0100 ++++ urbi-sdk.new/src/Makefile.am 2007-10-03 11:17:00.000000000 +0200 +@@ -1,5 +1,5 @@ + SUBDIRS = liburbi + + if EXAMPLES +-SUBDIRS += utils examples ++SUBDIRS += utils + endif +diff -urN urbi-sdk/src/Makefile.in urbi-sdk.new/src/Makefile.in +--- urbi-sdk/src/Makefile.in 2007-04-10 17:44:07.000000000 +0200 ++++ urbi-sdk.new/src/Makefile.in 2007-10-03 11:14:33.000000000 +0200 +@@ -30,7 +30,7 @@ + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-@EXAMPLES_TRUE@am__append_1 = utils examples ++@EXAMPLES_TRUE@am__append_1 = utils + subdir = src + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +@@ -68,7 +68,7 @@ + distclean-recursive maintainer-clean-recursive + ETAGS = etags + CTAGS = ctags +-DIST_SUBDIRS = liburbi utils examples ++DIST_SUBDIRS = liburbi utils + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + INSTALL_HEADER = @INSTALL_HEADER@ + ACLOCAL = @ACLOCAL@ diff --git a/lang/urbi/patches/005-fix-gcc_4_3-compile.patch b/lang/urbi/patches/005-fix-gcc_4_3-compile.patch new file mode 100644 index 0000000..790d73e --- /dev/null +++ b/lang/urbi/patches/005-fix-gcc_4_3-compile.patch @@ -0,0 +1,22 @@ +diff --git a/libport/semaphore.hxx b/libport/semaphore.hxx +index bb2546d..38b0d8e 100644 +--- a/libport/semaphore.hxx ++++ b/libport/semaphore.hxx +@@ -5,6 +5,7 @@ + # include "exception.hh" + # include + # include ++# include + + namespace libport + { +--- a/src/liburbi/uconversion.cc 2007-01-31 11:37:04.000000000 +0100 ++++ b/src/liburbi/uconversion.cc 2010-03-29 09:43:00.000000000 +0200 +@@ -1,5 +1,7 @@ + #include "urbi/uconversion.hh" + ++#include ++ + #ifndef NO_IMAGE_CONVERSION + # include + diff --git a/lang/xapian-bindings/Makefile b/lang/xapian-bindings/Makefile new file mode 100644 index 0000000..85cbba0 --- /dev/null +++ b/lang/xapian-bindings/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xapian-bindings +PKG_VERSION:=1.0.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://oligarchy.co.uk/xapian/$(PKG_VERSION) +PKG_MD5SUM:=a80e51f4971d7505abcc0bdde912266b + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +PKG_INSTALL=1 + +define Package/python-xapian + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=xapian python bindings + URL:=http://xapian.org/ + DEPENDS:=+python-mini +libxapian +endef + +CONFIGURE_ARGS+= \ + --with-python \ + +CONFIGURE_VARS+= \ + PYTHON_LIB="$(PYTHON_PKG_DIR)" \ + +define Package/python-xapian/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* $(1)$(PYTHON_PKG_DIR)/ +endef + +$(eval $(call BuildPackage,python-xapian)) + + diff --git a/lang/xapian-bindings/patches/010-build.patch b/lang/xapian-bindings/patches/010-build.patch new file mode 100644 index 0000000..32428f6 --- /dev/null +++ b/lang/xapian-bindings/patches/010-build.patch @@ -0,0 +1,67 @@ +--- a/python/Makefile.am ++++ b/python/Makefile.am +@@ -23,7 +23,7 @@ pylibdir = @PYTHON_LIB@ + + # Install as _DATA rather than _SCRIPTS because we don't want to make these + # executable (they don't have a #! line). +-pylib_DATA = xapian.py xapian.pyc xapian.pyo ++pylib_DATA = xapian.py + + pylib_LTLIBRARIES = _xapian.la + +@@ -53,20 +53,12 @@ _xapian_la_LIBADD = $(XAPIAN_LIBS) $(PYT + xapian.py: modern/xapian.py + cp `test -f modern/xapian.py || echo '$(srcdir)/'`modern/xapian.py . + +-# We "import _xapian" first so that if we fail to import the glue library +-# we don't generate a broken xapian.pyc or xapian.pyo. +-xapian.pyc: xapian.py _xapian$(PYTHON_SO) +- PYTHONPATH=. $(PYTHON) -c "import _xapian;import xapian" +- +-xapian.pyo: xapian.py _xapian$(PYTHON_SO) +- PYTHONPATH=. $(PYTHON) -O -c "import _xapian;import xapian" +- + _xapian$(PYTHON_SO): _xapian.la + $(LIBTOOL) --config > libtoolconfig.tmp + . ./libtoolconfig.tmp; cp $$objdir/_xapian$(PYTHON_SO) . + rm -f libtoolconfig.tmp + +-CLEANFILES = _xapian$(PYTHON_SO) xapian.py xapian.pyc xapian.pyo testsuite.pyc ++CLEANFILES = _xapian$(PYTHON_SO) xapian.py testsuite.pyc + + if MAINTAINER_MODE + # We need to explicitly set -outdir because on Windows, SWIG splits paths at +--- a/python/Makefile.in ++++ b/python/Makefile.in +@@ -292,14 +292,14 @@ pylibdir = @PYTHON_LIB@ + + # Install as _DATA rather than _SCRIPTS because we don't want to make these + # executable (they don't have a #! line). +-pylib_DATA = xapian.py xapian.pyc xapian.pyo ++pylib_DATA = xapian.py + pylib_LTLIBRARIES = _xapian.la + AM_CPPFLAGS = -I$(PYTHON_INC) + AM_CXXFLAGS = $(SWIG_CXXFLAGS) $(XAPIAN_CXXFLAGS) + _xapian_la_LDFLAGS = -avoid-version -module -shrext "$(PYTHON_SO)" $(NO_UNDEFINED) + _xapian_la_SOURCES = modern/xapian_wrap.cc + _xapian_la_LIBADD = $(XAPIAN_LIBS) $(PYTHON_LIBS) +-CLEANFILES = _xapian$(PYTHON_SO) xapian.py xapian.pyc xapian.pyo \ ++CLEANFILES = _xapian$(PYTHON_SO) xapian.py \ + testsuite.pyc $(am__append_2) + @MAINTAINER_MODE_FALSE@MAINTAINERCLEANFILES = $(BUILT_SOURCES) + all: $(BUILT_SOURCES) +@@ -819,14 +819,6 @@ uninstall-local: + xapian.py: modern/xapian.py + cp `test -f modern/xapian.py || echo '$(srcdir)/'`modern/xapian.py . + +-# We "import _xapian" first so that if we fail to import the glue library +-# we don't generate a broken xapian.pyc or xapian.pyo. +-xapian.pyc: xapian.py _xapian$(PYTHON_SO) +- PYTHONPATH=. $(PYTHON) -c "import _xapian;import xapian" +- +-xapian.pyo: xapian.py _xapian$(PYTHON_SO) +- PYTHONPATH=. $(PYTHON) -O -c "import _xapian;import xapian" +- + _xapian$(PYTHON_SO): _xapian.la + $(LIBTOOL) --config > libtoolconfig.tmp + . ./libtoolconfig.tmp; cp $$objdir/_xapian$(PYTHON_SO) . diff --git a/lang/yapsnmp/Makefile b/lang/yapsnmp/Makefile new file mode 100644 index 0000000..b0a290f --- /dev/null +++ b/lang/yapsnmp/Makefile @@ -0,0 +1,67 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=yapsnmp +PKG_VERSION:=0.7.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=8a3e9a5b814388d7907c639105cb2365 + +PKG_BUILD_DEPENDS:=python + +PKG_FIXUP:=libtool +PKG_REMOVE_FILES:=aclocal.m4 acinclude.m4 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/python-yapsnmp + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Python interface to Net-SNMP + URL:=http://yapsnmp.sourceforge.net/ + DEPENDS:=+python-mini +libnetsnmp +endef + +define Package/python-yapsnmp/description + This package contains a Python SNMP module based on the net-snmp (formerly + known as ucd-snmp) library. It's composed of a low level interface to the + library, created using SWIG, and a higher level python module removing all + the complexity out of dealing with SNMP. +endef + +define PyPackage/python-yapsnmp/filespec ++|$(PYTHON_PKG_DIR)/netsnmp.py ++|$(PYTHON_PKG_DIR)/netsnmpc.so ++|$(PYTHON_PKG_DIR)/yapsnmp.py +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --enable-site-packages-prefix="$(PYTHON_PKG_DIR)" \ + +CONFIGURE_VARS += \ + ac_cv_file__usr_include_net_snmp_library="yes" \ + ac_cv_prog_SWIG="echo MISSING SWIG" \ + +define Build/Compile + $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) + $(MAKE) -C $(PKG_BUILD_DIR) \ + INCLUDES="-I$(PYTHON_INC_DIR)" \ + SNMPINCDIR="$(STAGING_DIR)/usr/include/net-snmp/library" \ + all + $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install +endef + +$(eval $(call PyPackage,python-yapsnmp)) +$(eval $(call BuildPackage,python-yapsnmp)) diff --git a/lang/yapsnmp/patches/000-compile_fix.patch b/lang/yapsnmp/patches/000-compile_fix.patch new file mode 100644 index 0000000..6d94f05 --- /dev/null +++ b/lang/yapsnmp/patches/000-compile_fix.patch @@ -0,0 +1,334 @@ +--- a/configure ++++ b/configure +@@ -8757,13 +8757,13 @@ _ACEOF + fi + + +-echo "$as_me:$LINENO: checking for init_snmp in -lsnmp" >&5 +-echo $ECHO_N "checking for init_snmp in -lsnmp... $ECHO_C" >&6 ++echo "$as_me:$LINENO: checking for init_snmp in -lnetsnmp" >&5 ++echo $ECHO_N "checking for init_snmp in -lnetsnmp... $ECHO_C" >&6 + if test "${ac_cv_lib_snmp_init_snmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lsnmp $LIBS" ++LIBS="-lnetsnmp $LIBS" + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ +@@ -8816,7 +8816,7 @@ if test $ac_cv_lib_snmp_init_snmp = yes; + #define HAVE_LIBSNMP 1 + _ACEOF + +- LIBS="-lsnmp $LIBS" ++ LIBS="-lnetsnmp $LIBS" + + else + { { echo "$as_me:$LINENO: error: Couldn't find libsnmp" >&5 +@@ -9291,7 +9291,7 @@ fi + done + + +-for PYTHONINCPATH in python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 ++for PYTHONINCPATH in python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 + do + as_ac_Header=`echo "ac_cv_header_$PYTHONINCPATH/Python.h" | $as_tr_sh` + if eval "test \"\${$as_ac_Header+set}\" = set"; then +--- a/src/mib.h-patch ++++ b/src/mib.h-patch +@@ -1,36 +1,11 @@ +-*** /usr/include/net-snmp/library/mib.h 2003-11-11 08:37:02.000000000 -0800 +---- mib.h 2004-03-07 14:59:47.000000000 -0800 +-*************** +-*** 127,133 **** +- int get_wild_node(const char *, oid *, size_t *); +- int get_node(const char *, oid *, size_t *); +- oid *snmp_parse_oid(const char *, oid *, size_t *); +-! struct tree *get_symbol(oid *, size_t, struct tree *, char *); +- struct tree *get_tree(const oid *, size_t, struct tree *); +- struct tree *get_tree_head(void); +- void set_function(struct tree *); +---- 127,133 ---- +- int get_wild_node(const char *, oid *, size_t *); +- int get_node(const char *, oid *, size_t *); +- oid *snmp_parse_oid(const char *, oid *, size_t *); +-! /* struct tree *get_symbol(oid *, size_t, struct tree *, char *);*/ +- struct tree *get_tree(const oid *, size_t, struct tree *); +- struct tree *get_tree_head(void); +- void set_function(struct tree *); +-*************** +-*** 482,488 **** +- const char *parse_octet_hint(const char *hint, const char *value, +- unsigned char **new_val, int *new_val_len); +- +-! void clear_tree_flags(register struct tree *tp); +- +- char *snmp_out_toggle_options(char *); +- void snmp_out_toggle_options_usage(const char *, FILE *); +---- 482,488 ---- +- const char *parse_octet_hint(const char *hint, const char *value, +- unsigned char **new_val, int *new_val_len); +- +-! /* void clear_tree_flags(register struct tree *tp);*/ +- +- char *snmp_out_toggle_options(char *); +- void snmp_out_toggle_options_usage(const char *, FILE *); ++--- mib.h.old 2007-07-19 15:11:03.917123577 -0500 +++++ mib.h 2007-07-19 15:10:44.804034380 -0500 ++@@ -498,7 +498,7 @@ ++ const char *parse_octet_hint(const char *hint, const char *value, ++ unsigned char **new_val, int *new_val_len); ++ ++- void clear_tree_flags(register struct tree *tp); +++ /* void clear_tree_flags(register struct tree *tp); */ ++ ++ char *snmp_out_toggle_options(char *); ++ void snmp_out_toggle_options_usage(const char *, FILE *); +--- a/src/snmp_api.h-patch ++++ b/src/snmp_api.h-patch +@@ -1,147 +1,100 @@ +-*** /usr/include/net-snmp/library/snmp_api.h 2003-11-11 08:37:07.000000000 -0800 +---- snmp_api.h 2004-03-07 15:02:18.000000000 -0800 +-*************** +-*** 82,91 **** +- +- /* +- * The actual transport domain. This SHOULD NOT BE FREE()D. +-- */ +- +- const oid *tDomain; +- size_t tDomainLen; +- +- netsnmp_variable_list *variables; +- +---- 82,91 ---- +- +- /* +- * The actual transport domain. This SHOULD NOT BE FREE()D. +- +- const oid *tDomain; +- size_t tDomainLen; +-+ */ +- +- netsnmp_variable_list *variables; +- +-*************** +-*** 152,158 **** +- /* +- * Authentication function or NULL if null authentication is used +- */ +-! u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t); +- netsnmp_callback callback; /* Function to interpret incoming data */ +- /* +- * Pointer to data that the callback function may consider important +---- 152,158 ---- +- /* +- * Authentication function or NULL if null authentication is used +- */ +-! /* u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t);*/ +- netsnmp_callback callback; /* Function to interpret incoming data */ +- /* +- * Pointer to data that the callback function may consider important +-*************** +-*** 384,391 **** +---- 384,393 ---- +- +- #define SNMPERR_MAX (-63) +- +-+ /* +- #define non_repeaters errstat +- #define max_repetitions errindex +-+ */ +- +- struct variable_list { +- struct variable_list *next_variable; /* NULL for last variable */ +-*************** +-*** 410,416 **** +- oid name_loc[MAX_OID_LEN]; /* 90 percentile < 24. */ +- u_char buf[40]; /* 90 percentile < 40. */ +- void *data; /* (Opaque) hook for additional data */ +-! void (*dataFreeHook)(void *); /* callback to free above */ +- int index; +- }; +- +---- 412,418 ---- +- oid name_loc[MAX_OID_LEN]; /* 90 percentile < 24. */ +- u_char buf[40]; /* 90 percentile < 40. */ +- void *data; /* (Opaque) hook for additional data */ +-! /* void (*dataFreeHook)(void *); */ /* callback to free above */ +- int index; +- }; +- +-*************** +-*** 601,608 **** +- size_t); +- int netsnmp_oid_equals(const oid *, size_t, const oid *, +- size_t); +-! int netsnmp_oid_tree_equals(const oid *, size_t, const oid *, +-! size_t); +- int netsnmp_oid_is_subtree(const oid *, size_t, const oid *, +- size_t); +- int netsnmp_oid_find_prefix(const oid * in_name1, size_t len1, +---- 603,610 ---- +- size_t); +- int netsnmp_oid_equals(const oid *, size_t, const oid *, +- size_t); +-! /* int netsnmp_oid_tree_equals(const oid *, size_t, const oid *, +-! size_t);*/ +- int netsnmp_oid_is_subtree(const oid *, size_t, const oid *, +- size_t); +- int netsnmp_oid_find_prefix(const oid * in_name1, size_t len1, +-*************** +-*** 619,629 **** +---- 621,633 ---- ++--- snmp_api.h.orig Fri Jan 7 17:06:46 2005 +++++ snmp_api.h Fri Jan 7 17:10:01 2005 ++@@ -112,10 +112,10 @@ ++ ++ /** ++ * The actual transport domain. This SHOULD NOT BE FREE()D. ++- */ ++ ++ const oid *tDomain; ++ size_t tDomainLen; +++ */ ++ ++ netsnmp_variable_list *variables; ++ ++@@ -209,7 +209,7 @@ ++ /** ++ * Authentication function or NULL if null authentication is used ++ */ ++- u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t); +++ /* u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t); */ ++ /** Function to interpret incoming data */ ++ netsnmp_callback callback; ++ /** ++@@ -487,8 +487,10 @@ ++ ++ #define SNMPERR_MAX (-63) ++ +++/* ++ #define non_repeaters errstat ++ #define max_repetitions errindex +++*/ ++ ++ typedef union { ++ long *integer; ++@@ -530,7 +532,7 @@ ++ /** (Opaque) hook for additional data */ ++ void *data; ++ /** callback to free above */ ++- void (*dataFreeHook)(void *); +++ /* void (*dataFreeHook)(void *); */ ++ int index; ++ }; ++ ++@@ -721,8 +723,8 @@ ++ size_t); ++ int netsnmp_oid_equals(const oid *, size_t, const oid *, ++ size_t); ++- int netsnmp_oid_tree_equals(const oid *, size_t, const oid *, ++- size_t); +++/* int netsnmp_oid_tree_equals(const oid *, size_t, const oid *, +++ size_t);*/ ++ int netsnmp_oid_is_subtree(const oid *, size_t, const oid *, ++ size_t); ++ int netsnmp_oid_find_prefix(const oid * in_name1, size_t len1, ++@@ -739,11 +741,13 @@ ++ size_t * out_length, ++ u_char * pdu_data, ++ size_t pdu_data_len); +++/* ++ int snmpv3_packet_rbuild(netsnmp_session *, ++ netsnmp_pdu *pdu, u_char * packet, + size_t * out_length, + u_char * pdu_data, + size_t pdu_data_len); +-+ /* +- int snmpv3_packet_rbuild(netsnmp_session *, +- netsnmp_pdu *pdu, u_char * packet, +- size_t * out_length, +- u_char * pdu_data, +- size_t pdu_data_len); +-+ */ +- int snmpv3_make_report(netsnmp_pdu *pdu, int error); +- int snmpv3_get_report_type(netsnmp_pdu *pdu); +- int snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, +-*************** +-*** 672,677 **** +---- 676,682 ---- +- * Extended open; fpre_parse has changed. +- */ +- +-+ /* +- netsnmp_session *snmp_open_ex(netsnmp_session *, +- int (*fpre_parse) (netsnmp_session *, +- struct +-*************** +-*** 689,694 **** +---- 694,700 ---- +- netsnmp_pdu *, u_char **, +- size_t *, size_t *), +- int (*fcheck) (u_char *, size_t)); +-+ */ +- +- /* +- * provided for backwards compatability. Don't use these functions. +-*************** +-*** 770,775 **** +---- 776,782 ---- +- * +- */ +- +-+ /* +- void *snmp_sess_add_ex(netsnmp_session *, +- struct netsnmp_transport_s *, +- int (*fpre_parse) (netsnmp_session *, +-*************** +-*** 836,841 **** +---- 843,849 ---- +- *, void *, +- size_t) +- ); +-+ */ +- +- /* +- * use return value from snmp_sess_open as void * parameter +++*/ ++ int snmpv3_make_report(netsnmp_pdu *pdu, int error); ++ int snmpv3_get_report_type(netsnmp_pdu *pdu); ++ int snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, ++@@ -793,6 +797,7 @@ ++ * Extended open; fpre_parse has changed. ++ */ ++ +++ /* ++ netsnmp_session *snmp_open_ex(netsnmp_session *, ++ int (*fpre_parse) (netsnmp_session *, ++ struct ++@@ -810,6 +815,7 @@ ++ netsnmp_pdu *, u_char **, ++ size_t *, size_t *), ++ int (*fcheck) (u_char *, size_t)); +++ */ ++ ++ /* ++ * provided for backwards compatability. Don't use these functions. ++@@ -891,6 +897,7 @@ ++ * ++ */ ++ +++ /* ++ void *snmp_sess_add_ex(netsnmp_session *, ++ struct netsnmp_transport_s *, ++ int (*fpre_parse) (netsnmp_session *, ++@@ -957,6 +964,7 @@ ++ *, void *, ++ size_t) ++ ); +++ */ ++ ++ /* ++ * use return value from snmp_sess_open as void * parameter diff --git a/lang/yapsnmp/patches/001-automake-compat.patch b/lang/yapsnmp/patches/001-automake-compat.patch new file mode 100644 index 0000000..f738190 --- /dev/null +++ b/lang/yapsnmp/patches/001-automake-compat.patch @@ -0,0 +1,46 @@ +--- a/configure.in ++++ b/configure.in +@@ -15,7 +15,7 @@ dnl Checks for libraries. + AC_CHECK_LIB(kstat, kstat_open) + AC_CHECK_LIB(socket, socket) + AC_CHECK_LIB(crypto, HMAC) +-AC_CHECK_LIB(snmp, init_snmp, , AC_MSG_ERROR(Couldn't find libsnmp)) ++AC_CHECK_LIB(netsnmp, init_snmp, , AC_MSG_ERROR(Couldn't find libsnmp)) + + dnl Checks for header files. + AC_HEADER_STDC +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -19,10 +19,10 @@ moduledir = $(SITEPACKAGE) + module_DATA = yapsnmp.py $(module).py + + lib_LTLIBRARIES = netsnmpc.la +-netsnmpc_la_SOURCES = $(prodname)_wrap.c ++netsnmpc_la_SOURCES = net-snmp_wrap.c + netsnmpc_la_LDFLAGS = -module -avoid-version + +-$(module).py $(prodname)_wrap.c: $(prodname).i $(includefiles) ++$(module).py net-snmp_wrap.c: $(prodname).i $(includefiles) + $(SWIG) -python -shadow -I$(snmpinclude) $(prodname).i + + $(includefiles): $(patchfiles) +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -101,7 +101,7 @@ patchfiles = snmp_api.h-patch snmp_clien + EXTRA_DIST = yapsnmp.py $(prodname).i $(module).py $(patchfiles) + + CLEANFILES = $(includefiles) +-MAINTAINERCLEANFILES = $(module).py $(prodname)_wrap.c $(prodname)_wrap.doc Makefile.in ++MAINTAINERCLEANFILES = $(module).py net-snmp_wrap.c $(prodname)_wrap.doc Makefile.in + + INCLUDES = -I$(oldincludedir)/$(PYTHONINCPATH) -I$(includedir)/$(PYTHONINCPATH) + +@@ -109,7 +109,7 @@ moduledir = $(SITEPACKAGE) + module_DATA = yapsnmp.py $(module).py + + lib_LTLIBRARIES = netsnmpc.la +-netsnmpc_la_SOURCES = $(prodname)_wrap.c ++netsnmpc_la_SOURCES = net-snmp_wrap.c + netsnmpc_la_LDFLAGS = -module -avoid-version + subdir = src + mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs diff --git a/libs/aalib/Makefile b/libs/aalib/Makefile new file mode 100644 index 0000000..fe4b452 --- /dev/null +++ b/libs/aalib/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=aalib +PKG_VERSION:=1.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/aa-project +PKG_MD5SUM:=790434e0f2005fc95559ab3eab42e746 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libaa + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Ascii-Art rendering library + URL:=http://aa-project.sourceforge.net/ + DEPENDS:=+libncurses +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-shared \ + --enable-static \ + --without-x \ + --without-x11-driver \ + --without-slang-driver \ + --with-ncurses=$(STAGING_DIR)/usr \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/aalib.h \ + $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libaa.{a,so*} \ + $(1)/usr/lib/ +endef + +define Package/libaa/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libaa.so.* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libaa)) diff --git a/libs/aalib/patches/001-destdir.patch b/libs/aalib/patches/001-destdir.patch new file mode 100644 index 0000000..df1d65e --- /dev/null +++ b/libs/aalib/patches/001-destdir.patch @@ -0,0 +1,91 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -37,6 +37,8 @@ AUTOCONF = @AUTOCONF@ + AUTOMAKE = @AUTOMAKE@ + AUTOHEADER = @AUTOHEADER@ + ++DESTDIR = ++ + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_DATA = @INSTALL_DATA@ +@@ -235,11 +237,11 @@ maintainer-clean-libLTLIBRARIES: + + install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(libdir) ++ $(mkinstalldirs) $(DESTDIR)$(libdir) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ +- echo "$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(libdir)/$$p"; \ +- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(libdir)/$$p; \ ++ echo "$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p"; \ ++ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \ + else :; fi; \ + done + +@@ -289,11 +291,11 @@ maintainer-clean-binPROGRAMS: + + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(bindir) ++ $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + if test -f $$p; then \ +- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`"; \ +- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \ ++ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ ++ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + else :; fi; \ + done + +@@ -357,21 +359,21 @@ DVIPS = dvips + + install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(infodir) ++ $(mkinstalldirs) $(DESTDIR)$(infodir) + @for file in $(INFO_DEPS); do \ + d=$(srcdir); \ + for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ + if test -f $$d/$$ifile; then \ +- echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \ +- $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \ ++ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ ++ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ + else : ; fi; \ + done; \ + done + @$(POST_INSTALL) + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ + for file in $(INFO_DEPS); do \ +- echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\ +- install-info --info-dir=$(infodir) $(infodir)/$$file || :;\ ++ echo " install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$$file";\ ++ install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ + done; \ + else : ; fi + +@@ -412,10 +414,10 @@ maintainer-clean-aminfo: + + install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) +- $(mkinstalldirs) $(includedir) ++ $(mkinstalldirs) $(DESTDIR)$(includedir) + @list='$(include_HEADERS)'; for p in $$list; do \ +- echo " $(INSTALL_DATA) $(srcdir)/$$p $(includedir)/$$p"; \ +- $(INSTALL_DATA) $(srcdir)/$$p $(includedir)/$$p; \ ++ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(includedir)/$$p"; \ ++ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(includedir)/$$p; \ + done + + uninstall-includeHEADERS: +@@ -508,7 +510,7 @@ all: Makefile $(INFO_DEPS) $(LTLIBRARIES + install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install + installdirs: +- $(mkinstalldirs) $(libdir) $(bindir) $(infodir) $(includedir) ++ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(infodir) $(DESTDIR)$(includedir) + + + mostlyclean-generic: diff --git a/libs/alsa-lib/Makefile b/libs/alsa-lib/Makefile new file mode 100644 index 0000000..c3e938a --- /dev/null +++ b/libs/alsa-lib/Makefile @@ -0,0 +1,94 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=alsa-lib +PKG_VERSION:=1.0.24.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \ + http://alsa.cybermirror.org/lib/ +PKG_MD5SUM:=7cc05f25e1d5b65da8fb3fdcd540f226 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +ifeq ($(KERNEL),2.4) +DEPENDS_KMOD:=+kmod-alsa +else +DEPENDS_KMOD:=+kmod-sound-core +endif + +define Package/alsa-lib + SECTION:=libs + CATEGORY:=Libraries + TITLE:=ALSA (Advanced Linux Sound Architecture) library + URL:=http://www.alsa-project.org/ + DEPENDS:=@AUDIO_SUPPORT $(DEPENDS_KMOD) +endef + +define Package/alsa-lib/description + This is the library package for alsa, needed by some userspace programs. + You must have enabled the ALSA support in the kernel. +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-static \ + --disable-python \ + --disable-debug \ + --without-debug \ + $(SOFT_FLOAT_CONFIG_OPTION) \ + --with-versioned=no \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/alsa \ + $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libasound.{la,a,so*} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/alsa.pc \ + $(1)/usr/lib/pkgconfig/ + + $(INSTALL_DIR) $(1)/usr/share/aclocal + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/aclocal/alsa.m4 \ + $(1)/usr/share/aclocal/ +endef + +define Package/alsa-lib/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libasound.so.* \ + $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/share/alsa/{cards,pcm} + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/alsa/alsa.conf \ + $(1)/usr/share/alsa/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/alsa/pcm/* \ + $(1)/usr/share/alsa/pcm/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/share/alsa/cards/* \ + $(1)/usr/share/alsa/cards/ +endef + +$(eval $(call BuildPackage,alsa-lib)) diff --git a/libs/alsa-lib/patches/001-link_fix.patch b/libs/alsa-lib/patches/001-link_fix.patch new file mode 100644 index 0000000..d5627d9 --- /dev/null +++ b/libs/alsa-lib/patches/001-link_fix.patch @@ -0,0 +1,26 @@ +Index: alsa-lib-1.0.24.1/src/Makefile.in +=================================================================== +--- alsa-lib-1.0.24.1.orig/src/Makefile.in ++++ alsa-lib-1.0.24.1/src/Makefile.in +@@ -372,7 +372,7 @@ clean-libLTLIBRARIES: + rm -f "$${dir}/so_locations"; \ + done + libasound.la: $(libasound_la_OBJECTS) $(libasound_la_DEPENDENCIES) +- $(AM_V_CCLD)$(libasound_la_LINK) -rpath $(libdir) $(libasound_la_OBJECTS) $(libasound_la_LIBADD) $(LIBS) ++ $(AM_V_CCLD)$(libasound_la_LINK) -rpath $(DESTDIR)$(libdir) $(libasound_la_OBJECTS) $(libasound_la_LIBADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +Index: alsa-lib-1.0.24.1/src/pcm/scopes/Makefile.in +=================================================================== +--- alsa-lib-1.0.24.1.orig/src/pcm/scopes/Makefile.in ++++ alsa-lib-1.0.24.1/src/pcm/scopes/Makefile.in +@@ -300,7 +300,7 @@ clean-pkglibLTLIBRARIES: + rm -f "$${dir}/so_locations"; \ + done + scope-level.la: $(scope_level_la_OBJECTS) $(scope_level_la_DEPENDENCIES) +- $(AM_V_CCLD)$(scope_level_la_LINK) -rpath $(pkglibdir) $(scope_level_la_OBJECTS) $(scope_level_la_LIBADD) $(LIBS) ++ $(AM_V_CCLD)$(scope_level_la_LINK) -rpath $(DESTDIR)$(pkglibdir) $(scope_level_la_OBJECTS) $(scope_level_la_LIBADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) diff --git a/libs/alsa-lib/patches/003-mips-atomic-static-inline.patch b/libs/alsa-lib/patches/003-mips-atomic-static-inline.patch new file mode 100644 index 0000000..ab7bc26 --- /dev/null +++ b/libs/alsa-lib/patches/003-mips-atomic-static-inline.patch @@ -0,0 +1,40 @@ +diff --git a/include/iatomic.h b/include/iatomic.h +index e92dbfd..364bc5c 100644 +--- a/include/iatomic.h ++++ b/include/iatomic.h +@@ -720,7 +720,7 @@ typedef struct { volatile int counter; } atomic_t; + * Atomically adds @i to @v. Note that the guaranteed useful range + * of an atomic_t is only 24 bits. + */ +-extern __inline__ void atomic_add(int i, atomic_t * v) ++static __inline__ void atomic_add(int i, atomic_t * v) + { + unsigned long temp; + +@@ -744,7 +744,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v) + * Atomically subtracts @i from @v. Note that the guaranteed + * useful range of an atomic_t is only 24 bits. + */ +-extern __inline__ void atomic_sub(int i, atomic_t * v) ++static __inline__ void atomic_sub(int i, atomic_t * v) + { + unsigned long temp; + +@@ -763,7 +763,7 @@ extern __inline__ void atomic_sub(int i, atomic_t * v) + /* + * Same as above, but return the result value + */ +-extern __inline__ int atomic_add_return(int i, atomic_t * v) ++static __inline__ int atomic_add_return(int i, atomic_t * v) + { + unsigned long temp, result; + +@@ -784,7 +784,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v) + return result; + } + +-extern __inline__ int atomic_sub_return(int i, atomic_t * v) ++static __inline__ int atomic_sub_return(int i, atomic_t * v) + { + unsigned long temp, result; + diff --git a/libs/apr-util/Makefile b/libs/apr-util/Makefile new file mode 100644 index 0000000..2ed9983 --- /dev/null +++ b/libs/apr-util/Makefile @@ -0,0 +1,75 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=apr-util +PKG_VERSION:=1.3.12 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.ibiblio.org/pub/mirrors/apache/apr +PKG_MD5SUM:=0f671b037ca62751a8a7005578085560 + +PKG_FIXUP:=libtool +PKG_REMOVE_FILES:=aclocal.m4 build/ltmain.sh + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/libaprutil + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libapr +libexpat +libsqlite3 +libuuid $(ICONV_DEPENDS) + TITLE:=Apache Portable Runtime Utility Library + URL:=http://apr.apache.org/ +endef + +TARGET_CFLAGS += $(FPIC) +TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE + +CONFIGURE_ARGS += \ + --with-pgsql=no \ + --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \ + --with-expat="$(STAGING_DIR)/usr" \ + --without-sqlite2 \ + --with-sqlite3="$(STAGING_DIR)/usr" \ + --with-iconv="$(ICONV_PREFIX)" \ + +CONFIGURE_VARS += \ + ac_cv_file_dbd_apr_dbd_mysql_c=no \ + ac_cv_path_ODBC_CONFIG= \ + APR_BUILD_DIR="$(STAGING_DIR)/usr/share/build-1" \ + +MAKE_FLAGS += \ + APRUTIL_LIBS="-lsqlite3 $(TARGET_LDFLAGS) -lexpat $(if $(ICONV_FULL),-liconv) -lapr-1 -luuid -lm -lcrypt" \ + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1/ $(1)/usr/lib $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/apu-1-config \ + $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/apr-1/* \ + $(1)/usr/include/apr-1/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaprutil-1.{la,a,so*} \ + $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-util-1.pc \ + $(1)/usr/lib/pkgconfig/ + $(SED) 's, -e \"s -I$$$$prefix/lib g\",,g' $(1)/usr/bin/apu-1-config + $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/apu-1-config + $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/apu-1-config + $(SED) 's,-L$$$$libdir,,g' $(1)/usr/bin/apu-1-config + $(SED) 's,-R$$$$libdir,,g' $(1)/usr/bin/apu-1-config +endef + +define Package/libaprutil/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaprutil-1.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libaprutil)) diff --git a/libs/apr-util/patches/001-automake-compat.patch b/libs/apr-util/patches/001-automake-compat.patch new file mode 100644 index 0000000..d8071c5 --- /dev/null +++ b/libs/apr-util/patches/001-automake-compat.patch @@ -0,0 +1,21 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -8,6 +8,7 @@ APRUTIL_MAJOR_VERSION=@APRUTIL_MAJOR_VER + APRUTIL_DOTTED_VERSION=@APRUTIL_DOTTED_VERSION@ + + srcdir = @srcdir@ ++top_builddir = @top_builddir@ + VPATH = @srcdir@ + + INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@ +--- a/configure.in ++++ b/configure.in +@@ -40,6 +40,8 @@ AC_SUBST(APU_CONFIG_LOCATION) + AC_CANONICAL_SYSTEM + + AC_PROG_INSTALL ++AC_PROG_LIBTOOL ++LT_INIT + + # Use -no-install to link the test programs on all platforms + # but Darwin, where it would cause the programs to be linked diff --git a/libs/apr/Makefile b/libs/apr/Makefile new file mode 100644 index 0000000..e3e5a65 --- /dev/null +++ b/libs/apr/Makefile @@ -0,0 +1,77 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=apr +PKG_VERSION:=1.4.5 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.ibiblio.org/pub/mirrors/apache/apr +PKG_MD5SUM:=8b53f5a5669d0597f2da889a2f576eb6 + +PKG_FIXUP:=autoreconf +PKG_REMOVE_FILES:=aclocal.m4 build/ltmain.sh + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libapr + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libpthread +librt + TITLE:=Apache Portable Runtime Library + URL:=http://apr.apache.org/ +endef + +TARGET_CFLAGS += $(FPIC) +TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE + +CONFIGURE_ARGS += \ + --with-devrandom=/dev/urandom \ + --disable-dso \ + --enable-ipv6 + +# XXX: ac_cv_sizeof_struct_iovec=1 is just to trick configure +CONFIGURE_VARS += \ + ac_cv_sizeof_struct_iovec=1 \ + ac_cv_struct_rlimit=yes \ + apr_cv_process_shared_works=no \ + apr_cv_mutex_robust_shared=no \ + apr_cv_tcp_nodelay_with_cork=yes \ + apr_cv_use_lfs64=yes \ + LDFLAGS="$$$$LDFLAGS -lpthread" \ + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1 $(1)/usr/lib $(1)/usr/lib/pkgconfig $(1)/usr/share/build-1 + $(CP) $(PKG_INSTALL_DIR)/usr/bin/apr-1-config \ + $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/apr-1/* \ + $(1)/usr/include/apr-1/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.{la,a,so*} \ + $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-1.pc \ + $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/build-1/* \ + $(1)/usr/share/build-1/ + $(SED) 's,^datadir=\"/usr/share\",datadir=\"$(STAGING_DIR)/usr/share\",g' $(1)/usr/bin/apr-1-config + $(SED) 's,^installbuilddir=\"/usr/share/build-1\",installbuilddir=\"$(STAGING_DIR)/usr/share/build-1\",g' $(1)/usr/bin/apr-1-config + $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/apr-1-config + $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/apr-1-config + $(SED) 's,-L$$$$libdir,,g' $(1)/usr/bin/apr-1-config + $(SED) 's,-R$$$$libdir,,g' $(1)/usr/bin/apr-1-config + $(SED) 's,/usr/share/build-1,$(STAGING_DIR)/usr/share/build-1,g' $(1)/usr/share/build-1/apr_rules.mk +endef + +define Package/libapr/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libapr)) diff --git a/libs/apr/patches/001-autoconf-compat.patch b/libs/apr/patches/001-autoconf-compat.patch new file mode 100644 index 0000000..8170572 --- /dev/null +++ b/libs/apr/patches/001-autoconf-compat.patch @@ -0,0 +1,22 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -3,6 +3,7 @@ srcdir=@srcdir@ + VPATH=@srcdir@ + top_srcdir=@apr_srcdir@ + top_blddir=@apr_builddir@ ++top_builddir=@top_builddir@ + + # + # APR (Apache Portable Runtime) library Makefile. +--- a/configure.in ++++ b/configure.in +@@ -246,9 +246,6 @@ case $host in + gcc $CFLAGS $CPPFLAGS -o $LIBTOOL.exe $LIBTOOL.c + ;; + *) +- if test "x$LTFLAGS" = "x"; then +- LTFLAGS='--silent' +- fi + if test "$experimental_libtool" = "yes"; then + # Use a custom-made libtool replacement + echo "using jlibtool" diff --git a/libs/apr/patches/101-fix_apr_time_now.patch b/libs/apr/patches/101-fix_apr_time_now.patch new file mode 100644 index 0000000..6ad14a3 --- /dev/null +++ b/libs/apr/patches/101-fix_apr_time_now.patch @@ -0,0 +1,13 @@ +https://dev.openwrt.org/ticket/9287 + +--- a/time/unix/time.c ++++ b/time/unix/time.c +@@ -75,7 +75,7 @@ APR_DECLARE(apr_time_t) apr_time_now(voi + { + struct timeval tv; + gettimeofday(&tv, NULL); +- return tv.tv_sec * APR_USEC_PER_SEC + tv.tv_usec; ++ return tv.tv_sec * (apr_time_t)APR_USEC_PER_SEC + (apr_time_t)tv.tv_usec; + } + + static void explode_time(apr_time_exp_t *xt, apr_time_t t, diff --git a/libs/argp-standalone/Makefile b/libs/argp-standalone/Makefile new file mode 100644 index 0000000..02e100d --- /dev/null +++ b/libs/argp-standalone/Makefile @@ -0,0 +1,37 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=argp-standalone +PKG_VERSION:=1.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.lysator.liu.se/~nisse/misc/ +PKG_MD5SUM:=720704bac078d067111b32444e24ba69 + +include $(INCLUDE_DIR)/package.mk + +define Package/argp-standalone + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Hierarchial argument parsing broken out from glibc + URL:=http://www.lysator.liu.se/~nisse/misc/ +endef + +define Package/argp-standalone/description + GNU libc hierarchial argument parsing library broken out from glibc. +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) $(FPIC)" + + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/argp.h \ + $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/libargp.a \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,argp-standalone)) diff --git a/libs/argp-standalone/patches/001-throw-in-funcdef.patch b/libs/argp-standalone/patches/001-throw-in-funcdef.patch new file mode 100644 index 0000000..4a90751 --- /dev/null +++ b/libs/argp-standalone/patches/001-throw-in-funcdef.patch @@ -0,0 +1,79 @@ +# --- T2-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# T2 SDE: package/.../rng-tools/throw-in-funcdef.patch.argp-standalone +# Copyright (C) 2006 The T2 SDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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. +# --- T2-COPYRIGHT-NOTE-END --- + + +No __THROW in function implementation. + --jsaw + +--- argp-standalone-1.4-test2/argp.h.orig 2006-01-06 02:29:59.000000000 +0100 ++++ argp-standalone-1.4-test2/argp.h 2006-01-06 02:41:10.000000000 +0100 +@@ -560,17 +560,17 @@ + # endif + + # ifndef ARGP_EI +-# define ARGP_EI extern __inline__ ++# define ARGP_EI extern inline + # endif + + ARGP_EI void +-__argp_usage (__const struct argp_state *__state) __THROW ++__argp_usage (__const struct argp_state *__state) + { + __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); + } + + ARGP_EI int +-__option_is_short (__const struct argp_option *__opt) __THROW ++__option_is_short (__const struct argp_option *__opt) + { + if (__opt->flags & OPTION_DOC) + return 0; +@@ -582,7 +582,7 @@ + } + + ARGP_EI int +-__option_is_end (__const struct argp_option *__opt) __THROW ++__option_is_end (__const struct argp_option *__opt) + { + return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; + } +--- argp-standalone-1.4-test2/argp-parse.c.orig 2006-01-06 02:47:48.000000000 +0100 ++++ argp-standalone-1.4-test2/argp-parse.c 2006-01-06 02:48:16.000000000 +0100 +@@ -1290,13 +1290,13 @@ + /* Defined here, in case a user is not inlining the definitions in + * argp.h */ + void +-__argp_usage (__const struct argp_state *__state) __THROW ++__argp_usage (__const struct argp_state *__state) + { + __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); + } + + int +-__option_is_short (__const struct argp_option *__opt) __THROW ++__option_is_short (__const struct argp_option *__opt) + { + if (__opt->flags & OPTION_DOC) + return 0; +@@ -1310,7 +1310,7 @@ + } + + int +-__option_is_end (__const struct argp_option *__opt) __THROW ++__option_is_end (__const struct argp_option *__opt) + { + return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; + } diff --git a/libs/argtable/Makefile b/libs/argtable/Makefile new file mode 100644 index 0000000..50023d8 --- /dev/null +++ b/libs/argtable/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=argtable +PKG_VERSION:=2.12 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)2-12.tar.gz +PKG_SOURCE_URL:=@SF/argtable +PKG_MD5SUM:=291e249ea60f4d0637e467356a8ae41a + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)2-12 +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/argtable + SECTION:=libs + CATEGORY:=Libraries + TITLE:=A library for parsing GNU style command line options + URL:=http://argtable.sourceforge.net/ +endef + +define Package/argtable/description + Argtable is an ANSI C library for parsing GNU style command line options + with a minimum of fuss. It enables a program's command line syntax to be + defined in the source code as an array of argtable structs. The command + line is then parsed according to that specification and the resulting + values are returned in those same structs where they are accessible to + the main program. Both tagged (-v, --verbose, --foo=bar) and untagged + arguments are supported, as are multiple instances of each argument. +endef + +TARGET_CFLAGS += $(FPIC) +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + +MAKE_PATH = ./src + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/argtable2.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libargtable2.{a,so*} $(1)/usr/lib/ +endef + +define Package/argtable/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libargtable2.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,argtable)) diff --git a/libs/avahi/Makefile b/libs/avahi/Makefile new file mode 100644 index 0000000..5372492 --- /dev/null +++ b/libs/avahi/Makefile @@ -0,0 +1,374 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=avahi +PKG_VERSION:=0.6.30 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://avahi.org/download/ +PKG_MD5SUM:=e4db89a2a403ff4c47d66ac66fad1f43 + +PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host libpthread + +PKG_FIXUP:=autoreconf +PKG_REMOVE_FILES:=autogen.sh + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/avahi/Default + SECTION:=net + CATEGORY:=Network + TITLE:=mDNS/DNS-SD + URL:=http://www.avahi.org/ +endef + +define Package/avahi/Default/description + An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library). + 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. +endef + +define Package/libavahi + $(call Package/avahi/Default) + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libdaemon +libpthread +libgdbm + TITLE+= (library) + VARIANT:=nodbus +endef + +define Package/libavahi-dbus + $(call Package/avahi/Default) + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libdaemon +libpthread +libgdbm +dbus @!LINUX_2_4 + TITLE+= (library) (dbus) + VARIANT:=dbus +endef + +define Package/libavahi/description +$(call Package/avahi/Default/description) + . + This package contains the mDNS/DNS-SD shared libraries, used by other programs. + Specifically, it provides libavahi-core and libavahi-common libraries. + This version is compiled without D-Bus support, i.e. the --disable-dbus + compilation flag is set. +endef + +define Package/libavahi-dbus/description +$(call Package/avahi/Default/description) + . + This package contains the mDNS/DNS-SD shared libraries, used by other programs. + Specifically, it provides libavahi-core and libavahi-common libraries. + This version is compiled with D-Bus support +endef + +define Package/avahi-autoipd + $(call Package/avahi/Default) + SUBMENU:=IP Addresses and Names + DEPENDS:=+libdaemon + TITLE:=IPv4LL address conf daemon + VARIANT:=nodbus +endef + +define Package/avahi-autoipd-dbus + $(call Package/avahi/Default) + SUBMENU:=IP Addresses and Names + DEPENDS:=+libdaemon + TITLE:=IPv4LL address conf daemon (dbus) + VARIANT:=dbus +endef + +define Package/avahi-autoipd/description +$(call Package/avahi/Default/description) + . + This package implements IPv4LL, "Dynamic Configuration of IPv4 Link-Local + Addresses" (IETF RFC3927), a protocol for automatic IP address configuration + from the link-local 169.254.0.0/16 range without the need for a central + server. It is primarily intended to be used in ad-hoc networks which lack a + DHCP server. + . + This verison is compile along with non-D-Bus version of libavahi. +endef + +define Package/avahi-autoipd-dbus/description +$(call Package/avahi/Default/description) + . + This package implements IPv4LL, "Dynamic Configuration of IPv4 Link-Local + Addresses" (IETF RFC3927), a protocol for automatic IP address configuration + from the link-local 169.254.0.0/16 range without the need for a central + server. It is primarily intended to be used in ad-hoc networks which lack a + DHCP server. + . + This version is compiled along with the D-Bus version of libavahi. +endef + +define Package/avahi-daemon + $(call Package/avahi/Default) + SUBMENU:=IP Addresses and Names + DEPENDS:=+libavahi +libexpat + TITLE+= (daemon) + VARIANT:=nodbus +endef + +define Package/avahi-daemon-dbus + $(call Package/avahi/Default) + SUBMENU:=IP Addresses and Names + DEPENDS:=+libavahi-dbus +libexpat + TITLE+= (daemon) (dbus) + VARIANT:=dbus +endef + +define Package/avahi-daemon/description +$(call Package/avahi/Default/description) + . + This package contains an mDNS/DNS-SD daemon. +endef + +define Package/avahi-daemon-dbus/description +$(call Package/avahi/Default/description) + . + This package contains an mDNS/DNS-SD daemon with dbus support. +endef + +define Package/avahi-daemon/conffiles +/etc/avahi/avahi-daemon.conf +/etc/avahi/services/http.service +/etc/avahi/services/ssh.service +endef + +define Package/avahi-daemon-dbus/conffiles +/etc/avahi/avahi-daemon.conf +/etc/avahi/services/http.service +/etc/avahi/services/ssh.service +endef + +define Package/avahi-dnsconfd + $(call Package/avahi/Default) + SUBMENU:=IP Addresses and Names + DEPENDS:=+libavahi + TITLE:=A Unicast DNS server from mDNS/DNS-SD configuration daemon + VARIANT:=nodbus +endef + +define Package/avahi-dnsconfd-dbus + $(call Package/avahi/Default) + SUBMENU:=IP Addresses and Names + DEPENDS:=+libavahi-dbus + TITLE:=A Unicast DNS server from mDNS/DNS-SD configuration daemon with dbus support + VARIANT:=dbus +endef + +define Package/avahi-dnsconfd/description +$(call Package/avahi/Default/description) + . + This package contains a 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. + . + This version does not have D-Bus support. +endef + +define Package/avahi-dnsconfd-dbus/description +$(call Package/avahi/Default/description) + . + This package contains a 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. + . + This version has D-Bus support. +endef + +define Package/libavahi-client + $(call Package/avahi/Default) + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libavahi-dbus + TITLE+= (libavahi-client library) + VARIANT:=dbus +endef + +define Package/libavahi-client/description +$(call Package/avahi/Default/description) + . + This packages adds the libavahi-client library. + For more information please see the avahi documentation. + . + Requires D-Bus support. +endef + +define Package/avahi-utils + $(call Package/avahi/Default) + SUBMENU:=IP Addresses and Names + DEPENDS:=+libavahi-client + TITLE+= (utilities) + VARIANT:=dbus +endef + +define Package/avahi-utils/description +$(call Package/avahi/Default/description) + . + This packages installs the following avahi utility programs: + avahi-browse, avahi-publish, avahi-resolve, avahi-set-host-name. + For more information please see the avahi documentation. + . + Requires D-Bus support. +endef + +TARGET_CFLAGS += $(FPIC) -DGETTEXT_PACKAGE + +CONFIGURE_ARGS+= \ + --enable-shared \ + --enable-static \ + --disable-glib \ + --disable-gobject \ + --disable-qt3 \ + --disable-qt4 \ + --disable-gtk \ + --disable-gtk3 \ + --with-xml=expat \ + --disable-dbm \ + --enable-gdbm \ + --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=nobody \ + --with-avahi-group=nogroup \ + --with-autoipd-user=nobody \ + --with-autoipd-group=nogroup + +ifneq ($(CONFIG_SSP_SUPPORT),y) +CONFIGURE_ARGS+= \ + --disable-stack-protector +endif + +ifeq ($(BUILD_VARIANT),dbus) +CONFIGURE_ARGS += \ + --enable-dbus +endif +ifeq ($(BUILD_VARIANT),nodbus) +CONFIGURE_ARGS += \ + --disable-dbus +endif + +CONFIGURE_VARS+= \ + CFLAGS="$$$$CFLAGS -DNDEBUG -DDISABLE_SYSTEMD" \ + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ +endef + +define Package/libavahi-dbus/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/etc/dbus-1/system.d + $(CP) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/* $(1)/etc/dbus-1/system.d +endef + +define Package/libavahi/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/ +endef + +define Package/libavahi-client/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-client.so.* $(1)/usr/lib/ +endef + +define Package/avahi-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ +endef + +define Package/avahi-autoipd/install + $(INSTALL_DIR) $(1)/etc/avahi + $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-autoipd.action $(1)/etc/avahi/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-autoipd $(1)/usr/sbin/ +endef + +define Package/avahi-daemon/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/avahi + $(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/ + $(INSTALL_DIR) $(1)/etc/avahi/services + $(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service + $(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon +endef + +define Package/avahi-daemon-dbus/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/avahi + $(INSTALL_DATA) ./files/avahi-daemon.conf $(1)/etc/avahi/ + $(INSTALL_DIR) $(1)/etc/avahi/services + $(INSTALL_DATA) ./files/service-http $(1)/etc/avahi/services/http.service + $(INSTALL_DATA) ./files/service-ssh $(1)/etc/avahi/services/ssh.service + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon +endef + +define Package/avahi-dnsconfd/install + $(INSTALL_DIR) $(1)/etc/avahi + $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/ +endef + +define Package/avahi-dnsconfd-dbus/install + $(INSTALL_DIR) $(1)/etc/avahi + $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,libavahi-client)) +$(eval $(call BuildPackage,avahi-utils)) +$(eval $(call BuildPackage,libavahi-dbus)) +$(eval $(call BuildPackage,libavahi)) +$(eval $(call BuildPackage,avahi-autoipd)) +$(eval $(call BuildPackage,avahi-autoipd-dbus)) +$(eval $(call BuildPackage,avahi-daemon)) +$(eval $(call BuildPackage,avahi-daemon-dbus)) +$(eval $(call BuildPackage,avahi-dnsconfd)) +$(eval $(call BuildPackage,avahi-dnsconfd-dbus)) + diff --git a/libs/avahi/files/avahi-daemon.conf b/libs/avahi/files/avahi-daemon.conf new file mode 100644 index 0000000..cf13856 --- /dev/null +++ b/libs/avahi/files/avahi-daemon.conf @@ -0,0 +1,28 @@ +[server] +#host-name=foo +#domain-name=local +use-ipv4=yes +use-ipv6=no +check-response-ttl=no +use-iff-running=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/libs/avahi/files/avahi-daemon.init b/libs/avahi/files/avahi-daemon.init new file mode 100644 index 0000000..b2ae458 --- /dev/null +++ b/libs/avahi/files/avahi-daemon.init @@ -0,0 +1,23 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=61 + +BIN=avahi-daemon +DEFAULT=/etc/default/$BIN +OPTIONS="-D" +RUN_D=/var/run/$BIN + +start() { + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $RUN_D + $BIN $OPTIONS +} + +stop() { + $BIN -k +} + +reload() { + $BIN -r +} + diff --git a/libs/avahi/files/service-http b/libs/avahi/files/service-http new file mode 100644 index 0000000..8e0d3a5 --- /dev/null +++ b/libs/avahi/files/service-http @@ -0,0 +1,10 @@ + + + + Web Server on %h + + _http._tcp + 80 + path=/index.html + + diff --git a/libs/avahi/files/service-ssh b/libs/avahi/files/service-ssh new file mode 100644 index 0000000..b415803 --- /dev/null +++ b/libs/avahi/files/service-ssh @@ -0,0 +1,9 @@ + + + + Secure Shell on %h + + _ssh._tcp + 22 + + diff --git a/libs/avahi/patches/010-step_back_autotools-no-gettext.patch b/libs/avahi/patches/010-step_back_autotools-no-gettext.patch new file mode 100644 index 0000000..fab87aa --- /dev/null +++ b/libs/avahi/patches/010-step_back_autotools-no-gettext.patch @@ -0,0 +1,80 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -75,8 +75,7 @@ SUBDIRS = \ + avahi-compat-howl \ + avahi-autoipd \ + avahi-ui \ +- avahi-ui-sharp \ +- po ++ avahi-ui-sharp + + DX_INPUT = \ + $(srcdir)/avahi-common/address.h \ +--- a/avahi-python/avahi-discover/Makefile.am ++++ b/avahi-python/avahi-discover/Makefile.am +@@ -38,7 +38,6 @@ if HAVE_GDBM + pythonscripts += \ + avahi-discover + desktop_DATA += avahi-discover.desktop +-@INTLTOOL_DESKTOP_RULE@ + avahi_discover_PYTHON += __init__.py + endif + +@@ -46,7 +45,6 @@ if HAVE_DBM + pythonscripts += \ + avahi-discover + desktop_DATA += avahi-discover.desktop +-@INTLTOOL_DESKTOP_RULE@ + avahi_discover_PYTHON += __init__.py + endif + +--- a/avahi-ui/Makefile.am ++++ b/avahi-ui/Makefile.am +@@ -78,7 +78,6 @@ endif + + bin_PROGRAMS = bssh + desktop_DATA += bssh.desktop bvnc.desktop +-@INTLTOOL_DESKTOP_RULE@ + + bssh_SOURCES = bssh.c + +@@ -106,6 +105,4 @@ endif # HAVE_GLIB + endif + endif + +-@INTLTOOL_DESKTOP_RULE@ +- + CLEANFILES = $(desktop_DATA) $(desktop_DATA_in) +--- a/configure.ac ++++ b/configure.ac +@@ -23,7 +23,7 @@ AC_INIT([avahi],[0.6.29],[avahi (at) lis + AC_CONFIG_SRCDIR([avahi-core/server.c]) + AC_CONFIG_MACRO_DIR([common]) + AC_CONFIG_HEADERS([config.h]) +-AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax]) ++AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability tar-pax]) + + AC_SUBST(PACKAGE_URL, [http://avahi.org/]) + +@@ -43,8 +43,6 @@ AC_SUBST(HOWL_COMPAT_VERSION, [0.9.8]) + + AC_CANONICAL_HOST + +-AM_SILENT_RULES([yes]) +- + AC_CHECK_PROG([STOW], [stow], [yes], [no]) + + AS_IF([test "x$STOW" = "xyes" && test -d /usr/local/stow], [ +@@ -412,12 +410,6 @@ if test "x$have_kqueue" = "xyes" ; then + AC_DEFINE([HAVE_KQUEUE], 1, [Enable BSD kqueue() usage]) + fi + +-IT_PROG_INTLTOOL([0.35.0]) +-GETTEXT_PACKAGE=avahi +-AC_SUBST([GETTEXT_PACKAGE]) +-AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package]) +-AM_GLIB_GNU_GETTEXT +- + avahilocaledir='${prefix}/${DATADIRNAME}/locale' + AC_SUBST(avahilocaledir) + diff --git a/libs/axtls/Makefile b/libs/axtls/Makefile new file mode 100644 index 0000000..d719a9b --- /dev/null +++ b/libs/axtls/Makefile @@ -0,0 +1,93 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=axtls +PKG_VERSION:=1.2.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=axTLS-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/axtls +PKG_MD5SUM:=4b7a6dafbe45357f63813410dae676fd + +include $(INCLUDE_DIR)/package.mk + +define Package/libaxtls + SUBMENU:=SSL + SECTION:=libs + CATEGORY:=Libraries + SUBMENU:=SSL + TITLE:=Embedded client/server TLSv1 SSL library + URL:=http://sourceforge.net/projects/axtls +endef + +define Package/axhttpd + SUBMENU:=Web Servers/Proxies + SECTION:=net + CATEGORY:=Network + TITLE:=A small embedded web server using the axTLS library + URL:=http://www.axtls.co.nr/ + DEPENDS:=+libaxtls +endef + +define Package/axtlswrap + SUBMENU:=SSL + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=A simple TLS/SSL wrapper using the axTLS library + URL:=http://sourceforge.net/projects/axtls + DEPENDS:=+libaxtls +endef + +define Build/Configure + $(CP) ./files/config $(PKG_BUILD_DIR)/config/.config + $(MAKE) -C $(PKG_BUILD_DIR) oldconfig +endef + +TAR_CMD:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components 1 $(TAR_OPTIONS) + +TARGET_CFLAGS += $(FPIC) + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + STRIP="/bin/true" \ + OPT_CFLAGS="$(TARGET_CFLAGS)" OPT_LDFLAGS="" \ + all + $(MAKE) -C $(PKG_BUILD_DIR) \ + PREFIX="$(PKG_INSTALL_DIR)/usr" \ + install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/axTLS $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaxtls.{a,so*} $(1)/usr/lib/ +endef + +define Package/libaxtls/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaxtls.so.* $(1)/usr/lib/ +endef + +define Package/axhttpd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/axhttpd $(1)/usr/sbin/ +endef + +define Package/axtlswrap/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/_stage/axtlswrap $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,libaxtls)) +$(eval $(call BuildPackage,axhttpd)) +$(eval $(call BuildPackage,axtlswrap)) diff --git a/libs/axtls/files/config b/libs/axtls/files/config new file mode 100644 index 0000000..3a189ca --- /dev/null +++ b/libs/axtls/files/config @@ -0,0 +1,121 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y +CONFIG_PLATFORM_LINUX=y +# CONFIG_PLATFORM_CYGWIN is not set +# CONFIG_PLATFORM_WIN32 is not set + +# +# General Configuration +# +PREFIX="/usr" +# CONFIG_DEBUG is not set +CONFIG_STRIP_UNWANTED_SECTIONS=y +# CONFIG_VISUAL_STUDIO_7_0 is not set +# CONFIG_VISUAL_STUDIO_8_0 is not set +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 is not set +CONFIG_SSL_FULL_MODE=y +# 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_PRIVATE_KEY_LOCATION="" +CONFIG_SSL_PRIVATE_KEY_PASSWORD="" +CONFIG_SSL_X509_CERT_LOCATION="" +# CONFIG_SSL_GENERATE_X509_CERT is not set +CONFIG_SSL_X509_COMMON_NAME="" +CONFIG_SSL_X509_ORGANIZATION_NAME="" +CONFIG_SSL_X509_ORGANIZATION_UNIT_NAME="" +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_SSL_CTX_MUTEXING is not set +CONFIG_USE_DEV_URANDOM=y +# CONFIG_WIN32_USE_CRYPTO_LIB is not set +# CONFIG_OPENSSL_COMPATIBLE is not set +# CONFIG_PERFORMANCE_TESTING is not set +# CONFIG_SSL_TEST is not set +CONFIG_AXHTTPD=y +CONFIG_AXTLSWRAP=y + +# +# Axhttpd Configuration +# +# CONFIG_HTTP_STATIC_BUILD is not set +CONFIG_HTTP_PORT=0 +CONFIG_HTTP_HTTPS_PORT=443 +CONFIG_HTTP_SESSION_CACHE_SIZE=5 +CONFIG_HTTP_WEBROOT="" +CONFIG_HTTP_TIMEOUT=0 + +# +# CGI +# +# CONFIG_HTTP_HAS_CGI is not set +CONFIG_HTTP_CGI_EXTENSIONS="" +# CONFIG_HTTP_ENABLE_LUA is not set +CONFIG_HTTP_LUA_PREFIX="" +CONFIG_HTTP_LUA_CGI_LAUNCHER="" +# CONFIG_HTTP_BUILD_LUA is not set +# CONFIG_HTTP_DIRECTORIES is not set +# CONFIG_HTTP_HAS_AUTHORIZATION is not set +# CONFIG_HTTP_HAS_IPV6 is not set +# CONFIG_HTTP_ENABLE_DIFFERENT_USER is not set +CONFIG_HTTP_USER="" +# CONFIG_HTTP_VERBOSE is not set +# CONFIG_HTTP_IS_DAEMON is not set + +# +# 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="" +# CONFIG_LUA_BINDINGS is not set +CONFIG_LUA_CORE="" + +# +# 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 +# CONFIG_LUA_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=y +# CONFIG_BIGINT_KARATSUBA is not set +MUL_KARATSUBA_THRESH=0 +SQU_KARATSUBA_THRESH=0 +CONFIG_BIGINT_SLIDING_WINDOW=y +CONFIG_BIGINT_SQUARE=y +# CONFIG_BIGINT_CHECK_ON is not set diff --git a/libs/axtls/patches/001-opt_flags.patch b/libs/axtls/patches/001-opt_flags.patch new file mode 100644 index 0000000..5cc972e --- /dev/null +++ b/libs/axtls/patches/001-opt_flags.patch @@ -0,0 +1,32 @@ +--- a/config/makefile.conf ++++ b/config/makefile.conf +@@ -105,20 +105,23 @@ endif + 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/libs/axtls/patches/002-axhttpd_install.patch b/libs/axtls/patches/002-axhttpd_install.patch new file mode 100644 index 0000000..22469d7 --- /dev/null +++ b/libs/axtls/patches/002-axhttpd_install.patch @@ -0,0 +1,15 @@ +--- a/Makefile ++++ b/Makefile +@@ -91,8 +91,11 @@ win32_demo: + install: $(PREFIX) all + cp --no-dereference $(STAGE)/libax* $(PREFIX)/lib + chmod 755 $(PREFIX)/lib/libax* ++ifdef CONFIG_AXHTTPD ++ install -m 755 $(STAGE)/axhttpd $(PREFIX)/bin ++endif + ifdef CONFIG_SAMPLES +- install -m 755 $(STAGE)/ax* $(PREFIX)/bin ++ install -m 755 $(STAGE)/axssl $(PREFIX)/bin + endif + ifdef CONFIG_HTTP_HAS_AUTHORIZATION + install -m 755 $(STAGE)/htpasswd $(PREFIX)/bin diff --git a/libs/bluez-libs/Makefile b/libs/bluez-libs/Makefile new file mode 100644 index 0000000..c43cda5 --- /dev/null +++ b/libs/bluez-libs/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bluez-libs +PKG_VERSION:=3.36 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://bluez.sourceforge.net/download +PKG_MD5SUM:=8c2ca546c0e7bb73dbd0e906fce7f6b1 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/bluez-libs + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Bluetooth library + URL:=http://www.bluez.org/ +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + +TARGET_CFLAGS += $(FPIC) + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/bluetooth + $(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth/*.h $(1)/usr/include/bluetooth + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/bluez-libs/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,bluez-libs)) diff --git a/libs/bluez-libs/patches/010-dont-override-libdir.patch b/libs/bluez-libs/patches/010-dont-override-libdir.patch new file mode 100644 index 0000000..af7568c --- /dev/null +++ b/libs/bluez-libs/patches/010-dont-override-libdir.patch @@ -0,0 +1,15 @@ +diff --git a/configure b/configure +index 6a387c6..5ffc003 100755 +--- a/configure ++++ b/configure +@@ -2430,10 +2430,6 @@ fi + prefix="${ac_default_prefix}" + fi + +- if (test "${libdir}" = '${exec_prefix}/lib'); then +- libdir="${prefix}/lib" +- fi +- + if (test "$sysconfdir" = '${prefix}/etc'); then + configdir="${prefix}/etc/bluetooth" + else diff --git a/libs/boost/Makefile b/libs/boost/Makefile new file mode 100644 index 0000000..1d6c2fb --- /dev/null +++ b/libs/boost/Makefile @@ -0,0 +1,277 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# Dude, this "boost" is really one of the most crude stuff I ported yet. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=boost +PKG_VERSION:=1_38_0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/boost +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION) +PKG_MD5SUM:=a4fc691c4e7c49b3b9b54a667d8f5529 + +PKG_BUILD_DEPENDS:=boost-jam/host +PKG_BUILD_PARALLEL:=1 + +PKG_CONFIG_DEPENDS := \ + CONFIG_PACKAGE_boost-date_time \ + CONFIG_PACKAGE_boost-filesystem \ + CONFIG_PACKAGE_boost-graph \ + CONFIG_PACKAGE_boost-iostreams \ + CONFIG_PACKAGE_boost-math \ + CONFIG_PACKAGE_boost-program_options \ + CONFIG_PACKAGE_boost-python \ + CONFIG_PACKAGE_boost-regex \ + CONFIG_PACKAGE_boost-serialization \ + CONFIG_PACKAGE_boost-signals \ + CONFIG_PACKAGE_boost-system \ + CONFIG_PACKAGE_boost-test \ + CONFIG_PACKAGE_boost-thread \ + CONFIG_PACKAGE_boost-wave \ + +include $(INCLUDE_DIR)/package.mk + +define Package/boost/Default + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Boost C++ source libraries + URL:=http://www.boost.org + DEPENDS:=+libstdcpp @!LINUX_2_4 +endef + +define Package/boost/Default/description + Boost provides free peer-reviewed portable C++ source libraries +endef + +define Package/boost-date_time + $(call Package/boost/Default) + TITLE+= (date_time) +endef + +define Package/boost-filesystem + $(call Package/boost/Default) + TITLE+= (filesystem) +endef + +define Package/boost-function_types + $(call Package/boost/Default) + TITLE+= (function_types) + BUILD_ONLY:=1 +endef + +define Package/boost-graph + $(call Package/boost/Default) + TITLE+= (graph) +endef + +define Package/boost-iostreams + $(call Package/boost/Default) + TITLE+= (iostreams) + DEPENDS+= +zlib +endef + +define Package/boost-math + $(call Package/boost/Default) + TITLE+= (math) +endef + +#define Package/boost-mpi +# $(call Package/boost/Default) +# TITLE+= (mpi) +#endef + +define Package/boost-program_options + $(call Package/boost/Default) + TITLE+= (program_options) +endef + +define Package/boost-python + $(call Package/boost/Default) + TITLE+= (python) + DEPENDS+= +python +endef + +define Package/boost-regex + $(call Package/boost/Default) + TITLE+= (regex) +endef + +define Package/boost-serialization + $(call Package/boost/Default) + TITLE+= (serialization) +endef + +define Package/boost-signals + $(call Package/boost/Default) + TITLE+= (signals) +endef + +define Package/boost-system + $(call Package/boost/Default) + TITLE+= (system) +endef + +define Package/boost-test + $(call Package/boost/Default) + TITLE+= (test) +endef + +define Package/boost-thread + $(call Package/boost/Default) + TITLE+= (thread) +endef + +define Package/boost-wave + $(call Package/boost/Default) + TITLE+= (wave) +endef + +define Package/boost + $(call Package/boost/Default) + TITLE+= (header-only) + BUILDONLY:=1 +endef + +define Build/Configure +endef + +CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR) +define Build/Compile + ( cd $(PKG_BUILD_DIR) ; \ + echo "using gcc : : $(GNU_TARGET_NAME)-gcc : $(TARGET_CFLAGS) $(TARGET_CXXFLAGS) $(TARGET_LDFLAGS) ;" > tools/build/v2/site-config.jam ; \ + $(if $(CONFIG_PACKAGE_boost-python), \ + echo "using python : : $(STAGING_DIR_ROOT)/usr/bin/python : $(STAGING_DIR)/usr/include/python2.6/ ;" >> \ + tools/build/v2/site-config.jam; \ + ) \ + bjam \ + '-sBUILD=release space on off' \ + $(filter -j%,$(PKG_JOBS)) \ + --toolset=gcc --build-type=minimal --layout=system \ + --disable-long-double \ + $(CONFIGURE_ARGS) \ + $(if $(CONFIG_PACKAGE_boost-date_time),--with-date_time) \ + $(if $(CONFIG_PACKAGE_boost-filesystem),--with-filesystem) \ + $(if $(CONFIG_PACKAGE_boost-function_types),--with-function_types) \ + $(if $(CONFIG_PACKAGE_boost-graph),--with-graph) \ + $(if $(CONFIG_PACKAGE_boost-iostreams),--with-iostreams) \ + $(if $(CONFIG_PACKAGE_boost-math),--with-math) \ + $(if $(CONFIG_PACKAGE_boost-mpi),--with-mpi) \ + $(if $(CONFIG_PACKAGE_boost-program_options),--with-program_options) \ + $(if $(CONFIG_PACKAGE_boost-python),--with-python) \ + $(if $(CONFIG_PACKAGE_boost-regex),--with-regex) \ + $(if $(CONFIG_PACKAGE_boost-serialization),--with-serialization) \ + $(if $(CONFIG_PACKAGE_boost-signals),--with-signals) \ + $(if $(CONFIG_PACKAGE_boost-system),--with-system) \ + $(if $(CONFIG_PACKAGE_boost-test),--with-test) \ + $(if $(CONFIG_PACKAGE_boost-thread),--with-thread) \ + $(if $(CONFIG_PACKAGE_boost-wave),--with-wave) \ + \ + $(if $(CONFIG_PACKAGE_boost-iostreams),-sNO_BZIP2=1 -sZLIB_INCLUDE=$(STAGING_DIR)/usr/include \ + -sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \ + install \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/boost/ + $(CP) $(PKG_INSTALL_DIR)/include/boost/* $(1)/usr/include/boost/ # copies _all_ header files - independent of <--with-library>-argument above + + if [ -d $(PKG_INSTALL_DIR)/lib ]; then \ + $(INSTALL_DIR) $(1)/usr/lib; \ + $(CP) $(PKG_INSTALL_DIR)/lib/*.a $(1)/usr/lib/; \ + $(CP) $(PKG_INSTALL_DIR)/lib/*.so* $(1)/usr/lib/; \ + fi +endef + +define Package/boost/Default/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/lib/libboost_$(2)*.so* $(1)/usr/lib/ +endef + +define Package/boost-date_time/install + $(call Package/boost/Default/install,$(1),date_time) +endef + +define Package/boost-filesystem/install + $(call Package/boost/Default/install,$(1),filesystem) +endef + +define Package/boost-graph/install + $(call Package/boost/Default/install,$(1),graph) +endef + +define Package/boost-iostreams/install + $(call Package/boost/Default/install,$(1),iostreams) +endef + +define Package/boost-math/install + $(call Package/boost/Default/install,$(1),math) +endef + +#define Package/boost-mpi/install +# $(call Package/boost/Default/install,$(1),mpi) +#endef + +define Package/boost-program_options/install + $(call Package/boost/Default/install,$(1),program_options) +endef + +define Package/boost-python/install + $(call Package/boost/Default/install,$(1),python) +endef + +define Package/boost-regex/install + $(call Package/boost/Default/install,$(1),regex) +endef + +define Package/boost-serialization/install + $(call Package/boost/Default/install,$(1),serialization) +endef + +define Package/boost-signals/install + $(call Package/boost/Default/install,$(1),signals) +endef + +define Package/boost-system/install + $(call Package/boost/Default/install,$(1),system) +endef + +define Package/boost-test/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/lib/libboost_unit_test_framework*.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/lib/libboost_prg_exec_monitor*.so* $(1)/usr/lib/ +endef + +define Package/boost-thread/install + $(call Package/boost/Default/install,$(1),thread) +endef + +define Package/boost-wave/install + $(call Package/boost/Default/install,$(1),wave) +endef + +$(eval $(call BuildPackage,boost)) +$(eval $(call BuildPackage,boost-date_time)) +$(eval $(call BuildPackage,boost-filesystem)) +$(eval $(call BuildPackage,boost-function_types)) +$(eval $(call BuildPackage,boost-graph)) +$(eval $(call BuildPackage,boost-iostreams)) +$(eval $(call BuildPackage,boost-math)) +#$(eval $(call BuildPackage,boost-mpi)) +$(eval $(call BuildPackage,boost-program_options)) +$(eval $(call BuildPackage,boost-python)) +$(eval $(call BuildPackage,boost-regex)) +$(eval $(call BuildPackage,boost-serialization)) +$(eval $(call BuildPackage,boost-signals)) +$(eval $(call BuildPackage,boost-system)) +$(eval $(call BuildPackage,boost-test)) +$(eval $(call BuildPackage,boost-thread)) +$(eval $(call BuildPackage,boost-wave)) diff --git a/libs/boost/patches/010-one-cpu.patch b/libs/boost/patches/010-one-cpu.patch new file mode 100644 index 0000000..baed048 --- /dev/null +++ b/libs/boost/patches/010-one-cpu.patch @@ -0,0 +1,12 @@ +diff -Naur boost_1_35_0.orig/libs/thread/src/pthread/thread.cpp boost_1_35_0/libs/thread/src/pthread/thread.cpp +--- boost_1_35_0.orig/libs/thread/src/pthread/thread.cpp 2008-05-08 06:18:57.000000000 -0400 ++++ boost_1_35_0/libs/thread/src/pthread/thread.cpp 2008-05-08 06:20:15.000000000 -0400 +@@ -419,7 +419,7 @@ + #if defined(PTW32_VERSION) || defined(__hpux) + return pthread_num_processors_np(); + #elif defined(__linux__) +- return get_nprocs(); ++ return 1; + #elif defined(__APPLE__) || defined(__FreeBSD__) + int count; + size_t size=sizeof(count); diff --git a/libs/boost/patches/020-buildin-offsetof.patch b/libs/boost/patches/020-buildin-offsetof.patch new file mode 100644 index 0000000..8ad06e2 --- /dev/null +++ b/libs/boost/patches/020-buildin-offsetof.patch @@ -0,0 +1,11 @@ +--- boost_1_38_0/boost/python/detail/config.hpp 2007-11-25 19:07:19.000000000 +0100 ++++ boost_1_38_0/boost/python/detail/config.hpp 2010-02-26 02:06:26.000000000 +0100 +@@ -111,7 +111,7 @@ + # define BOOST_PYTHON_OFFSETOF(s_name, s_member) \ + ((size_t)__INTADDR__(&(((s_name *)0)->s_member))) + #else +-# define BOOST_PYTHON_OFFSETOF offsetof ++# define BOOST_PYTHON_OFFSETOF __builtin_offsetof + #endif + + // enable automatic library variant selection ------------------------------// diff --git a/libs/c-ares/Makefile b/libs/c-ares/Makefile new file mode 100644 index 0000000..d87fae6 --- /dev/null +++ b/libs/c-ares/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# Copyright (C) 2009 Jakob Pfeiffer +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=c-ares +PKG_VERSION:=1.7.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://c-ares.haxx.se +PKG_MD5SUM:=dd71e8f07d9f3c837e12a5416d1b7f73 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libcares + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Library for asyncronous name resolves + URL:=$(PKG_SOURCE_URL) +endef + +define Package/libcares/description + c-ares is a C library that performs DNS requests and name resolves + asynchronously. +endef + +define Package/libcares/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +$(eval $(call BuildPackage,libcares)) + diff --git a/libs/cgilib/Makefile b/libs/cgilib/Makefile new file mode 100644 index 0000000..f52e26d --- /dev/null +++ b/libs/cgilib/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cgilib +PKG_VERSION:=0.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.infodrom.org/projects/cgilib/download +PKG_MD5SUM:=2c7053f58dfb06f7a80a112797ed7e86 + +PKG_FIXUP:=libtool +LIBTOOL="$(STAGING_DIR)/host/bin/libtool" + +include $(INCLUDE_DIR)/package.mk + +define Package/cgilib + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Simple CGI Library + URL:=http://www.infodrom.org/projects/cgilib/ +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + OFLAGS="$(TARGET_CFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + LIBTOOL="$(LIBTOOL)" \ + install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/cgi.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcgi.{a,so*} $(1)/usr/lib/ +endef + +define Package/cgilib/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcgi.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,cgilib)) diff --git a/libs/cgilib/patches/200-cgitest_bugfix.patch b/libs/cgilib/patches/200-cgitest_bugfix.patch new file mode 100644 index 0000000..745aa0e --- /dev/null +++ b/libs/cgilib/patches/200-cgitest_bugfix.patch @@ -0,0 +1,11 @@ +--- a/cgitest.c ++++ b/cgitest.c +@@ -216,7 +216,7 @@ int main (int argc, char **argv, char ** + cgiSetHeader ("Set-Cookie", "Version=1; Library=cgilib; Path=/"); + cgiHeader(); + printf (HTML_CSS HTML_HEAD); +- printf ("

    Cookie Library set

    \n"); ++ printf ("

    Cookie \"Library\" set

    \n"); + printf ("



    Test

    \n"); + printf ("



    Redirect

    \n"); + printf ("



    List Everything

    \n"); diff --git a/libs/cgilib/patches/300-cpp_bugfix.patch b/libs/cgilib/patches/300-cpp_bugfix.patch new file mode 100644 index 0000000..c06f816 --- /dev/null +++ b/libs/cgilib/patches/300-cpp_bugfix.patch @@ -0,0 +1,22 @@ +--- a/cgi.h ++++ b/cgi.h +@@ -24,6 +24,10 @@ + extern "C" { + #endif + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + typedef struct var_s { + char *name, + *value; +@@ -146,4 +150,8 @@ char *cgiEscape (char *string); + extern } + #endif + ++#ifdef __cplusplus ++} /* end of extern "C" */ ++#endif ++ + #endif /* _CGI_H_ */ diff --git a/libs/check/Makefile b/libs/check/Makefile new file mode 100644 index 0000000..59b8ec7 --- /dev/null +++ b/libs/check/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=check +PKG_VERSION:=0.9.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/check +PKG_MD5SUM:=5d75e9a6027cde79d2c339ef261e7470 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_CFLAGS += $(FPIC) + +define Package/check + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Unit testing framework for C + URL:=http://check.sourceforge.net/ + DEPENDS:= +libpthread +endef + +define Package/check/description + Check features a simple interface for defining unit tests, putting little in + the way of the developer. Tests are run in a separate address space, so Check + can catch both assertion failures and code errors that cause segmentation + faults or other signals. The output from unit tests can be used within source + code editors and IDEs. +endef + +define Build/Configure + $(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/build-aux/ + $(call Build/Configure/Default) +endef + +define Build/Install + $(call Build/Install/Default) + cd $(PKG_INSTALL_DIR)/usr/lib/ ; ln -nsf libcheck.so libcheck_pic.so +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +define Package/check/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcheck.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,check)) diff --git a/libs/classpath/Makefile b/libs/classpath/Makefile new file mode 100644 index 0000000..084fbde --- /dev/null +++ b/libs/classpath/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=classpath +PKG_VERSION:=0.98 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@GNU/classpath +PKG_MD5SUM:=90c6571b8b0309e372faa0f9f6255ea9 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/classpath + SECTION:=libs + CATEGORY:=Libraries + TITLE:=GNU Classpath + URL:=http://www.gnu.org/software/classpath/ + MAINTAINER:=Roberto Riggio + DEPENDS:=@BROKEN +endef + +define Package/classpath/Description + GNU Classpath, Essential Libraries for Java, is a GNU project + to create free core class libraries for use with virtual + machines and compilers for the java programming language. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --with-javac \ + --enable-jni \ + --disable-gtk-peer \ + --disable-gconf-peer \ + --disable-plugin \ + ) +endef + +define Package/classpath/install + $(INSTALL_DIR) $(1)/usr/share/classpath + $(INSTALL_DIR) $(1)/usr/lib/classpath + $(CP) $(PKG_INSTALL_DIR)/usr/share/classpath/glibj.zip $(1)/usr/share/classpath/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/classpath/* $(1)/usr/lib/classpath/ +endef + +$(eval $(call BuildPackage,classpath)) diff --git a/libs/clearsilver/Config.in b/libs/clearsilver/Config.in new file mode 100644 index 0000000..9aa5c32 --- /dev/null +++ b/libs/clearsilver/Config.in @@ -0,0 +1,12 @@ +config CLEARSILVER_ENABLE_COMPRESSION + bool "HTML compression support" + default y if PACKAGE_zlib + select PACKAGE_zlib + +config CLEARSILVER_ENABLE_REMOTE_DEBUGGER + bool "Remote X CGI debugging" + default n + +config CLEARSILVER_ENABLE_GETTEXT + bool "Gettext message translation" + default n diff --git a/libs/clearsilver/Makefile b/libs/clearsilver/Makefile new file mode 100644 index 0000000..9d1d532 --- /dev/null +++ b/libs/clearsilver/Makefile @@ -0,0 +1,101 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=clearsilver +PKG_VERSION:=0.10.5 +PKG_RELEASE:=5 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.clearsilver.net/downloads/ +PKG_MD5SUM:=b8c0c7fbe0ef5e06e0c935f134304d44 + +PKG_CONFIG_DEPENDS:= \ + CONFIG_CLEARSILVER_ENABLE_COMPRESSION \ + CONFIG_CLEARSILVER_ENABLE_REMOTE_DEBUGGER \ + CONFIG_CLEARSILVER_ENABLE_GETTEXT + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=0 + +include $(INCLUDE_DIR)/package.mk + +define Package/clearsilver + SECTION:=libs + CATEGORY:=Libraries + TITLE:=ClearSilver template system + URL:=http://www.clearsilver.net/ + MAINTAINER:=Raphaël HUCK + DEPENDS:=+CLEARSILVER_ENABLE_COMPRESSION:zlib +CLEARSILVER_ENABLE_GETTEXT:libintl +endef + +define Package/clearsilver/config + menu "Configuration" + depends on PACKAGE_clearsilver + source "$(SOURCE)/Config.in" + endmenu +endef + +define Package/clearsilver/description +Clearsilver is a fast, powerful, and language-neutral HTML template system. In +both static content sites and dynamic HTML applications, it provides a separation +between presentation code and application logic which makes working with your +project easier. +endef + +CONFIGURE_ARGS+= \ + --disable-wdb \ + --disable-apache \ + --disable-python \ + --disable-perl \ + --disable-ruby \ + --disable-java \ + --disable-csharp \ + --prefix=/usr + +ifeq ($(SDK)$(CONFIG_CLEARSILVER_ENABLE_COMPRESSION),y) + CONFIGURE_ARGS+= \ + --enable-compression +else + CONFIGURE_ARGS+= \ + --disable-compression +endif + +ifeq ($(SDK)$(CONFIG_CLEARSILVER_ENABLE_REMOTE_DEBUGGER),y) + CONFIGURE_ARGS+= \ + --enable-remote-debugger +else + CONFIGURE_ARGS+= \ + --disable-remote-debugger +endif + +ifeq ($(SDK)$(CONFIG_CLEARSILVER_ENABLE_GETTEXT),y) + CONFIGURE_ARGS+= \ + --enable-gettext +else + CONFIGURE_ARGS+= \ + --disable-gettext +endif + +TARGET_CFLAGS+=$(FPIC) + +MAKE_FLAGS+= \ + $(TARGET_CONFIGURE_OPTS) \ + AR="$(AR) cr" \ + LD="$(TARGET_CC) -o" + +define Build/InstallDev + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +define Package/clearsilver/install + $(INSTALL_DIR) $(1)/usr/lib +endef + +$(eval $(call BuildPackage,clearsilver)) diff --git a/libs/clearsilver/patches/001-gcc-vs-dollar-cc.patch b/libs/clearsilver/patches/001-gcc-vs-dollar-cc.patch new file mode 100644 index 0000000..fe7191a --- /dev/null +++ b/libs/clearsilver/patches/001-gcc-vs-dollar-cc.patch @@ -0,0 +1,11 @@ +--- a/rules.mk.in ++++ b/rules.mk.in +@@ -158,7 +158,7 @@ Makefile.depends: $(NEOTONIC_ROOT)/rules + @touch Makefile.depends + @if test "x" != "x$(SOURCE_FILES)"; then \ + for II in "$(SOURCE_FILES)"; do \ +- gcc -M -MG ${CFLAGS} $$II >> Makefile.depends; \ ++ $(CC) -M -MG ${CFLAGS} $$II >> Makefile.depends; \ + done; \ + fi + @echo "** (done) " diff --git a/libs/clearsilver/patches/002-make-install-depends.patch b/libs/clearsilver/patches/002-make-install-depends.patch new file mode 100644 index 0000000..978db0b --- /dev/null +++ b/libs/clearsilver/patches/002-make-install-depends.patch @@ -0,0 +1,99 @@ +--- a/Makefile ++++ b/Makefile +@@ -35,7 +35,7 @@ cs: output_dir + fi; \ + done + +-install: all ++install: + ./mkinstalldirs $(DESTDIR)$(cs_includedir) + ./mkinstalldirs $(DESTDIR)$(bindir) + ./mkinstalldirs $(DESTDIR)$(libdir) +--- a/cgi/Makefile ++++ b/cgi/Makefile +@@ -38,7 +38,7 @@ $(STATIC_CSO): $(STATIC_OBJ) $(DEP_LIBS) + $(CGICSTEST_EXE): $(CGICSTEST_OBJ) $(DEP_LIBS) + $(LD) $@ $(CGICSTEST_OBJ) $(LDFLAGS) $(DLIBS) $(LIBS) + +-install: all ++install: + $(NEOTONIC_ROOT)/mkinstalldirs $(DESTDIR)$(cs_includedir)/cgi + $(INSTALL) -m 644 cgi.h $(DESTDIR)$(cs_includedir)/cgi + $(INSTALL) -m 644 cgiwrap.h $(DESTDIR)$(cs_includedir)/cgi +--- a/cs/Makefile ++++ b/cs/Makefile +@@ -89,7 +89,7 @@ test: $(CSTEST_EXE) $(CS_TESTS) + @touch test + @echo "Passed" + +-install: all ++install: + $(NEOTONIC_ROOT)/mkinstalldirs $(DESTDIR)$(cs_includedir)/cs + $(INSTALL) -m 644 cs.h $(DESTDIR)$(cs_includedir)/cs + $(INSTALL) -m 644 $(CS_LIB) $(DESTDIR)$(libdir) +--- a/dso/Makefile ++++ b/dso/Makefile +@@ -21,7 +21,7 @@ $(NEO_SO): $(NEO_STATIC_LIBS) $(DEP_LIBS + + # $(LDSHARED) -o $@ $(LDFLAGS) -Wl,-whole-archive $(DLIBS) + +-install: all ++install: + $(NEOTONIC_ROOT)/mkinstalldirs $(DESTDIR)$(PYTHON_SITE) + $(INSTALL) $(TARGETS) $(DESTDIR)$(PYTHON_SITE) + +--- a/java-jni/Makefile ++++ b/java-jni/Makefile +@@ -74,7 +74,7 @@ $(NEO_UTIL_SO): $(NEO_UTIL_JAVA_JAR) $(N + $(LDSHARED) -o $@ $(LDFLAGS) $(NEO_UTIL_OBJ) $(LIBS) + + # I guess we'll just stick the .jar file in the lib directory +-install: all ++install: + $(INSTALL) $(NEO_UTIL_SO) $(DESTDIR)$(libdir) + $(INSTALL) $(NEO_UTIL_JAVA_JAR) $(DESTDIR)$(libdir) + +--- a/mod_ecs/Makefile ++++ b/mod_ecs/Makefile +@@ -19,7 +19,7 @@ all: $(TARGETS) + $(MOD_ECS_SO): $(MOD_ECS_SRC) $(DEP_LIBS) + $(APXS) -c -o $@ $(MOD_ECS_SRC) + +-install: all ++install: + $(NEOTONIC_ROOT)/mkinstalldirs $(DESTDIR)$(libexecdir) + $(INSTALL) $(MOD_ECS_SO) $(DESTDIR)$(libexecdir) + +--- a/python/Makefile ++++ b/python/Makefile +@@ -40,7 +40,7 @@ $(NEO_UTIL_PYD): $(NEO_UTIL_OBJ) $(DEP_L + --target=i386-mingw32 \ + $(LDFLAGS) $(PYTHON_LIB) $(LIBS) + +-install: all ++install: + $(NEOTONIC_ROOT)/mkinstalldirs $(DESTDIR)$(PYTHON_SITE) + $(INSTALL) $(TARGETS) $(DESTDIR)$(PYTHON_SITE) + +--- a/ruby/Makefile ++++ b/ruby/Makefile +@@ -40,7 +40,7 @@ testrb: ext/hdf/hdf.so + @echo "Passed ruby test" + + +-install: all ++install: + $(RUBY) install.rb install + + clean: +--- a/util/Makefile ++++ b/util/Makefile +@@ -21,7 +21,7 @@ $(UTL_LIB): $(UTL_OBJ) + $(AR) $@ $(UTL_OBJ) + $(RANLIB) $@ + +-install: all ++install: + $(NEOTONIC_ROOT)/mkinstalldirs $(DESTDIR)$(cs_includedir)/util + $(INSTALL) -m 644 $(UTL_HDR) $(DESTDIR)$(cs_includedir)/util + $(INSTALL) -m 644 $(UTL_LIB) $(DESTDIR)$(libdir) diff --git a/libs/clearsilver/patches/003-disable-tests.patch b/libs/clearsilver/patches/003-disable-tests.patch new file mode 100644 index 0000000..562dcd8 --- /dev/null +++ b/libs/clearsilver/patches/003-disable-tests.patch @@ -0,0 +1,11 @@ +--- a/cs/Makefile ++++ b/cs/Makefile +@@ -24,7 +24,7 @@ CSDUMP_OBJ = $(CSDUMP_SRC:%.c=%.o) + + LIBS += -lneo_cs -lneo_utl # -lefence + +-TARGETS = $(CS_LIB) $(CSTEST_EXE) $(CSR_EXE) test ++TARGETS = $(CS_LIB) $(CSTEST_EXE) $(CSR_EXE) # test + + CS_TESTS = test.cs test2.cs test3.cs test4.cs test5.cs test6.cs test7.cs \ + test8.cs test9.cs test10.cs test11.cs test12.cs test13.cs \ diff --git a/libs/clearsilver/patches/100-remove_warnings.patch b/libs/clearsilver/patches/100-remove_warnings.patch new file mode 100644 index 0000000..cf0605b --- /dev/null +++ b/libs/clearsilver/patches/100-remove_warnings.patch @@ -0,0 +1,690 @@ +--- a/cgi/cgi.c ++++ b/cgi/cgi.c +@@ -698,7 +698,7 @@ NEOERR *cgi_parse (CGI *cgi) + x = 0; + while (x < len) + { +- if (len-x > sizeof(buf)) ++ if (len-x > (int) sizeof(buf)) + cgiwrap_read (buf, sizeof(buf), &r); + else + cgiwrap_read (buf, len - x, &r); +@@ -1363,6 +1363,8 @@ void cgi_neo_error (CGI *cgi, NEOERR *er + { + STRING str; + ++ UNUSED(cgi); ++ + string_init(&str); + cgiwrap_writef("Status: 500\n"); + cgiwrap_writef("Content-Type: text/html\n\n"); +@@ -1377,6 +1379,8 @@ void cgi_error (CGI *cgi, const char *fm + { + va_list ap; + ++ UNUSED(cgi); ++ + cgiwrap_writef("Status: 500\n"); + cgiwrap_writef("Content-Type: text/html\n\n"); + cgiwrap_writef("\nAn error occured:

    ");
    +@@ -1536,6 +1540,8 @@ NEOERR *cgi_cookie_set (CGI *cgi, const
    +   STRING str;
    +   char my_time[256];
    + 
    ++  UNUSED(cgi);
    ++
    +   if (path == NULL) path = "/";
    + 
    +   string_init(&str);
    +@@ -1584,6 +1590,8 @@ NEOERR *cgi_cookie_set (CGI *cgi, const
    + NEOERR *cgi_cookie_clear (CGI *cgi, const char *name, const char *domain,
    +                           const char *path)
    + {
    ++  UNUSED(cgi);
    ++
    +   if (path == NULL) path = "/";
    +   if (domain)
    +   {
    +--- a/cgi/cgiwrap.c
    ++++ b/cgi/cgiwrap.c
    +@@ -14,6 +14,9 @@
    + #if HAVE_FEATURES_H
    + #include 
    + #endif
    ++#ifdef __UCLIBC__
    ++#include 
    ++#endif
    + #include 
    + #include 
    + #include 
    +--- a/cgi/date.c
    ++++ b/cgi/date.c
    +@@ -94,7 +94,7 @@ NEOERR *export_date_tm (HDF *data, const
    +   if (err) return nerr_pass(err);
    +   err = hdf_set_int_value (obj, "wday", ttm->tm_wday);
    +   if (err) return nerr_pass(err);
    +-  // neo_tz_offset() returns offset from GMT in seconds
    ++  /* neo_tz_offset() returns offset from GMT in seconds */
    +   tzoffset_seconds = neo_tz_offset(ttm);
    +   tzoffset = tzoffset_seconds / 60;
    +   if (tzoffset < 0)
    +@@ -109,12 +109,12 @@ NEOERR *export_date_tm (HDF *data, const
    +   return STATUS_OK;
    + }
    + 
    +-NEOERR *export_date_time_t (HDF *data, const char *prefix, const char *timezone,
    ++NEOERR *export_date_time_t (HDF *data, const char *prefix, const char *tz,
    +                             time_t tt)
    + {
    +   struct tm ttm;
    + 
    +-  neo_time_expand (tt, timezone, &ttm);
    ++  neo_time_expand (tt, tz, &ttm);
    +   return nerr_pass (export_date_tm (data, prefix, &ttm));
    + }
    + 
    +--- a/cgi/date.h
    ++++ b/cgi/date.h
    +@@ -17,7 +17,7 @@
    + __BEGIN_DECLS
    + 
    + NEOERR *export_date_tm (HDF *obj, const char *prefix, struct tm *ttm);
    +-NEOERR *export_date_time_t (HDF *obj, const char *prefix, const char *timezone, 
    ++NEOERR *export_date_time_t (HDF *obj, const char *prefix, const char *tz,
    +                             time_t tt);
    + 
    + __END_DECLS
    +--- a/cgi/html.c
    ++++ b/cgi/html.c
    +@@ -774,7 +774,7 @@ NEOERR *html_strip_alloc(const char *src
    + 	}
    + 	else
    + 	{
    +-	  if (ampl < sizeof(amp)-1)
    ++	  if (ampl < (int) sizeof(amp)-1)
    + 	    amp[ampl++] = tolower(src[x]);
    + 	  else
    + 	  {
    +--- a/cgi/rfc2388.c
    ++++ b/cgi/rfc2388.c
    +@@ -155,14 +155,14 @@ static NEOERR * _read_line (CGI *cgi, ch
    +     ofs = cgi->readlen - cgi->nl;
    +     memmove(cgi->buf, cgi->buf + cgi->nl, ofs);
    +   }
    +-  // Read either as much buffer space as we have left, or up to 
    +-  // the amount of data remaining according to Content-Length
    +-  // If there is no Content-Length, just use the buffer space, but recognize
    +-  // that it might not work on some servers or cgiwrap implementations.
    +-  // Some servers will close their end of the stdin pipe, so cgiwrap_read
    +-  // will return if we ask for too much.  Techically, not including
    +-  // Content-Length is against the HTTP spec, so we should consider failing
    +-  // earlier if we don't have a length.
    ++  /* Read either as much buffer space as we have left, or up to
    ++   * the amount of data remaining according to Content-Length
    ++   * If there is no Content-Length, just use the buffer space, but recognize
    ++   * that it might not work on some servers or cgiwrap implementations.
    ++   * Some servers will close their end of the stdin pipe, so cgiwrap_read
    ++   * will return if we ask for too much.  Techically, not including
    ++   * Content-Length is against the HTTP spec, so we should consider failing
    ++   * earlier if we don't have a length. */
    +   to_read = cgi->buflen - ofs;
    +   if (cgi->data_expected && (to_read > cgi->data_expected - cgi->data_read))
    +   {
    +--- a/cs/csparse.c
    ++++ b/cs/csparse.c
    +@@ -59,7 +59,7 @@ typedef enum
    +   ST_DEF = 1<<6,
    +   ST_LOOP =  1<<7,
    +   ST_ALT = 1<<8,
    +-  ST_ESCAPE = 1<<9,
    ++  ST_ESCAPE = 1<<9
    + } CS_STATE;
    + 
    + #define ST_ANYWHERE (ST_EACH | ST_WITH | ST_ELSE | ST_IF | ST_GLOBAL | ST_DEF | ST_LOOP | ST_ALT | ST_ESCAPE)
    +@@ -178,7 +178,8 @@ CS_CMDS Commands[] = {
    +     escape_parse, escape_eval, 1},
    +   {"/escape",    sizeof("/escape")-1,    ST_ESCAPE,     ST_POP,
    +     end_parse, skip_eval, 1},
    +-  {NULL},
    ++  {NULL,    0,    0,    0,
    ++  	NULL, NULL, 0}
    + };
    + 
    + /* Possible Config.VarEscapeMode values */
    +@@ -193,7 +194,7 @@ CS_ESCAPE_MODES EscapeModes[] = {
    +   {"html", NEOS_ESCAPE_HTML},
    +   {"js",   NEOS_ESCAPE_SCRIPT},
    +   {"url",  NEOS_ESCAPE_URL},
    +-  {NULL},
    ++  {NULL,   0}
    + };
    + 
    + 
    +@@ -1154,7 +1155,7 @@ static char *token_list (CSTOKEN *tokens
    +     {
    +       t = snprintf(p, buflen, "%s%d:%s", i ? "  ":"", i, expand_token_type(tokens[i].type, 0));
    +     }
    +-    if (t == -1 || t >= buflen) return buf;
    ++    if (t == -1 || t >= (int) buflen) return buf;
    +     buflen -= t;
    +     p += t;
    +   }
    +@@ -2567,6 +2568,9 @@ static NEOERR *else_parse (CSPARSE *pars
    +   NEOERR *err;
    +   STACK_ENTRY *entry;
    + 
    ++  UNUSED(cmd);
    ++  UNUSED(arg);
    ++
    +   /* ne_warn ("else"); */
    +   err = uListGet (parse->stack, -1, (void *)&entry);
    +   if (err != STATUS_OK) return nerr_pass(err);
    +@@ -2600,6 +2604,9 @@ static NEOERR *endif_parse (CSPARSE *par
    +   NEOERR *err;
    +   STACK_ENTRY *entry;
    + 
    ++  UNUSED(cmd);
    ++  UNUSED(arg);
    ++
    +   /* ne_warn ("endif"); */
    +   err = uListGet (parse->stack, -1, (void *)&entry);
    +   if (err != STATUS_OK) return nerr_pass(err);
    +@@ -2781,6 +2788,9 @@ static NEOERR *end_parse (CSPARSE *parse
    +   NEOERR *err;
    +   STACK_ENTRY *entry;
    + 
    ++  UNUSED(cmd);
    ++  UNUSED(arg);
    ++
    +   err = uListGet (parse->stack, -1, (void *)&entry);
    +   if (err != STATUS_OK) return nerr_pass(err);
    + 
    +@@ -2796,6 +2806,8 @@ static NEOERR *include_parse (CSPARSE *p
    +   int flags = 0;
    +   CSARG arg1, val;
    + 
    ++  UNUSED(cmd);
    ++
    +   memset(&arg1, 0, sizeof(CSARG));
    +   if (arg[0] == '!')
    +     flags |= CSF_REQUIRED;
    +@@ -3511,6 +3523,8 @@ static NEOERR *loop_eval (CSPARSE *parse
    + 
    + static NEOERR *skip_eval (CSPARSE *parse, CSTREE *node, CSTREE **next)
    + {
    ++  UNUSED(parse);
    ++
    +   *next = node->next;
    +   return STATUS_OK;
    + }
    +@@ -3651,6 +3665,8 @@ static NEOERR * _builtin_subcount(CSPARS
    +   int count = 0;
    +   CSARG val;
    + 
    ++  UNUSED(csf);
    ++
    +   memset(&val, 0, sizeof(val));
    +   err = eval_expr(parse, args, &val);
    +   if (err) return nerr_pass(err);
    +@@ -3683,6 +3699,8 @@ static NEOERR * _builtin_str_length(CSPA
    +   NEOERR *err;
    +   CSARG val;
    + 
    ++  UNUSED(csf);
    ++
    +   memset(&val, 0, sizeof(val));
    +   err = eval_expr(parse, args, &val);
    +   if (err) return nerr_pass(err);
    +@@ -3706,6 +3724,8 @@ static NEOERR * _builtin_str_crc(CSPARSE
    +   NEOERR *err;
    +   CSARG val;
    + 
    ++  UNUSED(csf);
    ++
    +   memset(&val, 0, sizeof(val));
    +   err = eval_expr(parse, args, &val);
    +   if (err) return nerr_pass(err);
    +@@ -3731,6 +3751,8 @@ static NEOERR * _builtin_str_find(CSPARS
    +   char *substr = NULL;
    +   char *pstr = NULL;
    + 
    ++  UNUSED(csf);
    ++
    +   result->op_type = CS_TYPE_NUM;
    +   result->n = -1;
    + 
    +@@ -3758,6 +3780,8 @@ static NEOERR * _builtin_name(CSPARSE *p
    +   HDF *obj;
    +   CSARG val;
    + 
    ++  UNUSED(csf);
    ++
    +   memset(&val, 0, sizeof(val));
    +   err = eval_expr(parse, args, &val);
    +   if (err) return nerr_pass(err);
    +@@ -3790,6 +3814,8 @@ static NEOERR * _builtin_first(CSPARSE *
    +   char *c;
    +   CSARG val;
    + 
    ++  UNUSED(csf);
    ++
    +   memset(&val, 0, sizeof(val));
    +   err = eval_expr(parse, args, &val);
    +   if (err) return nerr_pass(err);
    +@@ -3819,6 +3845,8 @@ static NEOERR * _builtin_last(CSPARSE *p
    +   char *c;
    +   CSARG val;
    + 
    ++  UNUSED(csf);
    ++
    +   memset(&val, 0, sizeof(val));
    +   err = eval_expr(parse, args, &val);
    +   if (err) return nerr_pass(err);
    +@@ -3853,6 +3881,8 @@ static NEOERR * _builtin_abs (CSPARSE *p
    +   int n1 = 0;
    +   CSARG val;
    + 
    ++  UNUSED(csf);
    ++
    +   memset(&val, 0, sizeof(val));
    +   err = eval_expr(parse, args, &val);
    +   if (err) return nerr_pass(err);
    +@@ -3873,6 +3903,8 @@ static NEOERR * _builtin_max (CSPARSE *p
    +   long int n1 = 0;
    +   long int n2 = 0;
    + 
    ++  UNUSED(csf);
    ++
    +   result->op_type = CS_TYPE_NUM;
    +   result->n = 0;
    + 
    +@@ -3891,6 +3923,8 @@ static NEOERR * _builtin_min (CSPARSE *p
    +   long int n1 = 0;
    +   long int n2 = 0;
    + 
    ++  UNUSED(csf);
    ++
    +   result->op_type = CS_TYPE_NUM;
    +   result->n = 0;
    + 
    +@@ -3910,6 +3944,8 @@ static NEOERR * _builtin_str_slice (CSPA
    +   long int e = 0;
    +   size_t len;
    + 
    ++  UNUSED(csf);
    ++
    +   result->op_type = CS_TYPE_STRING;
    +   result->s = "";
    + 
    +@@ -3921,9 +3957,9 @@ static NEOERR * _builtin_str_slice (CSPA
    +   if (b < 0 && e == 0) e = len;
    +   if (b < 0) b += len;
    +   if (e < 0) e += len;
    +-  if (e > len) e = len;
    ++  if (e > (int) len) e = len;
    +   /* Its the whole string */
    +-  if (b == 0 && e == len)
    ++  if (b == 0 && e == (int) len)
    +   {
    +     result->s = s;
    +     result->alloc = 1;
    +@@ -4179,10 +4215,10 @@ static NEOERR *cs_init_internal (CSPARSE
    +     my_parse->global_hdf = parent->global_hdf;
    +     my_parse->fileload = parent->fileload;
    +     my_parse->fileload_ctx = parent->fileload_ctx;
    +-    // This should be safe since locals handling is done entirely local to the
    +-    // eval functions, not globally by the parse handling.  This should
    +-    // pass the locals down to the new parse context to make locals work with
    +-    // lvar
    ++    /* This should be safe since locals handling is done entirely local to the
    ++     * eval functions, not globally by the parse handling.  This should
    ++     * pass the locals down to the new parse context to make locals work with
    ++     * lvar */
    +     my_parse->locals = parent->locals;
    +     my_parse->parent = parent;
    + 
    +--- a/util/dict.c
    ++++ b/util/dict.c
    +@@ -87,6 +87,8 @@ static NEOERR *dictNewItem(dictCtx dict,
    + {
    +   dictItemPtr my_item;
    + 
    ++  UNUSED(dict);
    ++
    +   if (item != NULL)
    +     *item = NULL;
    + 
    +--- a/util/neo_date.h
    ++++ b/util/neo_date.h
    +@@ -17,10 +17,10 @@
    + __BEGIN_DECLS
    + 
    + /* UTC time_t -> struct tm in local timezone */
    +-void neo_time_expand (const time_t tt, const char *timezone, struct tm *ttm);
    ++void neo_time_expand (const time_t tt, const char *tz, struct tm *ttm);
    + 
    + /* local timezone struct tm -> time_t UTC */
    +-time_t neo_time_compact (struct tm *ttm, const char *timezone);
    ++time_t neo_time_compact (struct tm *ttm, const char *tz);
    + 
    + /* To be portable... in seconds */
    + long neo_tz_offset(struct tm *ttm);
    +--- a/util/neo_files.c
    ++++ b/util/neo_files.c
    +@@ -35,7 +35,7 @@ NEOERR *ne_mkdirs (const char *path, mod
    + 
    +   strncpy (mypath, path, sizeof(mypath));
    +   x = strlen(mypath);
    +-  if ((x < sizeof(mypath)) && (mypath[x-1] != '/'))
    ++  if ((x < (int) sizeof(mypath)) && (mypath[x-1] != '/'))
    +   {
    +     mypath[x] = '/';
    +     mypath[x+1] = '\0';
    +--- a/util/neo_hash.c
    ++++ b/util/neo_hash.c
    +@@ -57,7 +57,7 @@ void ne_hash_destroy (NE_HASH **hash)
    + 
    +   my_hash = *hash;
    + 
    +-  for (x = 0; x < my_hash->size; x++)
    ++  for (x = 0; x < (int) my_hash->size; x++)
    +   {
    +     node = my_hash->nodes[x];
    +     while (node)
    +@@ -111,16 +111,16 @@ void *ne_hash_lookup(NE_HASH *hash, void
    + 
    + void *ne_hash_remove(NE_HASH *hash, void *key)
    + {
    +-  NE_HASHNODE **node, *remove;
    ++  NE_HASHNODE **node, *rem;
    +   void *value = NULL;
    + 
    +   node = _hash_lookup_node(hash, key, NULL);
    +   if (*node)
    +   {
    +-    remove = *node;
    +-    *node = remove->next;
    +-    value = remove->value;
    +-    free(remove);
    ++    rem = *node;
    ++    *node = rem->next;
    ++    value = rem->value;
    ++    free(rem);
    +     hash->num--;
    +   }
    +   return value;
    +@@ -233,7 +233,7 @@ static NEOERR *_hash_resize(NE_HASH *has
    +   hash->size = hash->size*2;
    + 
    +   /* Initialize new parts */
    +-  for (x = orig_size; x < hash->size; x++)
    ++  for (x = orig_size; x < (int) hash->size; x++)
    +   {
    +     hash->nodes[x] = NULL;
    +   }
    +@@ -248,7 +248,7 @@ static NEOERR *_hash_resize(NE_HASH *has
    + 	 entry; 
    + 	 entry = prev ? prev->next : hash->nodes[x]) 
    +     {
    +-      if ((entry->hashv & hash_mask) != x)
    ++      if ((int) (entry->hashv & hash_mask) != x)
    +       {
    + 	if (prev)
    + 	{
    +--- a/util/neo_hdf.c
    ++++ b/util/neo_hdf.c
    +@@ -54,7 +54,7 @@ static UINT32 hash_hdf_hash(const void *
    + }
    + 
    + static NEOERR *_alloc_hdf (HDF **hdf, const char *name, size_t nlen, 
    +-                           const char *value, int dup, int wf, HDF *top)
    ++                           const char *value, int dupl, int wf, HDF *top)
    + {
    +   *hdf = calloc (1, sizeof (HDF));
    +   if (*hdf == NULL)
    +@@ -80,7 +80,7 @@ static NEOERR *_alloc_hdf (HDF **hdf, co
    +   }
    +   if (value != NULL)
    +   {
    +-    if (dup)
    ++    if (dupl)
    +     {
    +       (*hdf)->alloc_value = 1;
    +       (*hdf)->value = strdup(value);
    +@@ -233,7 +233,7 @@ static int _walk_hdf (HDF *hdf, const ch
    + 
    +   n = name;
    +   s = strchr (n, '.');
    +-  x = (s == NULL) ? strlen(n) : s - n;
    ++  x = (s == NULL) ? (int) strlen(n) : s - n;
    + 
    +   while (1)
    +   {
    +@@ -279,7 +279,7 @@ static int _walk_hdf (HDF *hdf, const ch
    +     }
    +     n = s + 1;
    +     s = strchr (n, '.');
    +-    x = (s == NULL) ? strlen(n) : s - n;
    ++    x = (s == NULL) ? (int) strlen(n) : s - n;
    +   } 
    +   if (hp->link)
    +   {
    +@@ -570,7 +570,7 @@ NEOERR* _hdf_hash_level(HDF *hdf)
    + }
    + 
    + static NEOERR* _set_value (HDF *hdf, const char *name, const char *value, 
    +-                           int dup, int wf, int link, HDF_ATTR *attr, 
    ++                           int dupl, int wf, int lnk, HDF_ATTR *attr, 
    +                            HDF **set_node)
    + {
    +   NEOERR *err;
    +@@ -615,7 +615,7 @@ static NEOERR* _set_value (HDF *hdf, con
    +       hdf->alloc_value = 0;
    +       hdf->value = NULL;
    +     }
    +-    else if (dup)
    ++    else if (dupl)
    +     {
    +       hdf->alloc_value = 1;
    +       hdf->value = strdup(value);
    +@@ -650,7 +650,7 @@ static NEOERR* _set_value (HDF *hdf, con
    +     strcpy(new_name, hdf->value);
    +     strcat(new_name, ".");
    +     strcat(new_name, name);
    +-    err = _set_value (hdf->top, new_name, value, dup, wf, link, attr, set_node);
    ++    err = _set_value (hdf->top, new_name, value, dupl, wf, lnk, attr, set_node);
    +     free(new_name);
    +     return nerr_pass(err);
    +   }
    +@@ -719,8 +719,8 @@ skip_search:
    +       }
    +       else
    +       {
    +-	err = _alloc_hdf (&hp, n, x, value, dup, wf, hdf->top);
    +-	if (link) hp->link = 1;
    ++	err = _alloc_hdf (&hp, n, x, value, dupl, wf, hdf->top);
    ++	if (lnk) hp->link = 1;
    + 	else hp->link = 0;
    + 	hp->attr = attr;
    +       }
    +@@ -770,7 +770,7 @@ skip_search:
    + 	  hp->alloc_value = 0;
    + 	  hp->value = NULL;
    + 	}
    +-	else if (dup)
    ++	else if (dupl)
    + 	{
    + 	  hp->alloc_value = 1;
    + 	  hp->value = strdup(value);
    +@@ -784,7 +784,7 @@ skip_search:
    + 	  hp->value = (char *)value;
    + 	}
    +       }
    +-      if (link) hp->link = 1;
    ++      if (lnk) hp->link = 1;
    +       else hp->link = 0;
    +     }
    +     else if (hp->link) 
    +@@ -796,7 +796,7 @@ skip_search:
    +       }
    +       strcpy(new_name, hp->value);
    +       strcat(new_name, s);
    +-      err = _set_value (hdf->top, new_name, value, dup, wf, link, attr, set_node);
    ++      err = _set_value (hdf->top, new_name, value, dupl, wf, lnk, attr, set_node);
    +       free(new_name);
    +       return nerr_pass(err);
    +     }
    +@@ -1267,6 +1267,8 @@ NEOERR* hdf_dump(HDF *hdf, const char *p
    + 
    + NEOERR* hdf_dump_format (HDF *hdf, int lvl, FILE *fp)
    + {
    ++  UNUSED(lvl);
    ++
    +   return nerr_pass(hdf_dump_cb(hdf, "", DUMP_TYPE_PRETTY, 0, fp, _fp_dump_cb));
    + }
    + 
    +@@ -1357,7 +1359,7 @@ static int _copy_line (const char **s, c
    +   int x = 0;
    +   const char *st = *s;
    + 
    +-  while (*st && x < buf_len-1)
    ++  while (*st && x < (int) buf_len-1)
    +   {
    +     buf[x++] = *st;
    +     if (*st++ == '\n') break;
    +@@ -1398,17 +1400,17 @@ static NEOERR *_copy_line_advance(const
    + 
    + char *_strndup(const char *s, int len) {
    +   int x;
    +-  char *dup; 
    ++  char *t;
    +   if (s == NULL) return NULL;
    +-  dup = (char *) malloc(len+1);
    +-  if (dup == NULL) return NULL;
    ++  t = (char *) malloc(len+1);
    ++  if (t == NULL) return NULL;
    +   for (x = 0; x < len && s[x]; x++)
    +   {
    +-    dup[x] = s[x];
    ++    t[x] = s[x];
    +   }
    +-  dup[x] = '\0';
    +-  dup[len] = '\0';
    +-  return dup;
    ++  t[x] = '\0';
    ++  t[len] = '\0';
    ++  return t;
    + }
    + 
    + /* attributes are of the form [key1, key2, key3=value, key4="repr"] */
    +--- a/util/neo_misc.c
    ++++ b/util/neo_misc.c
    +@@ -34,7 +34,7 @@ void ne_vwarn (const char *fmt, va_list
    + 
    +   localtime_r(&now, &my_tm);
    + 
    +-  strftime(tbuf, sizeof(tbuf), "%m/%d %T", &my_tm);
    ++  strftime(tbuf, sizeof(tbuf), "%m/%d %H:%M:%S", &my_tm);
    + 
    +   vsnprintf (buf, sizeof(buf), fmt, ap);
    +   len = strlen(buf);
    +--- a/util/neo_misc.h
    ++++ b/util/neo_misc.h
    +@@ -106,6 +106,10 @@ typedef char BOOL;
    + #define MIN(x,y)        (((x) < (y)) ? (x) : (y))
    + #endif
    + 
    ++#ifndef UNUSED
    ++#define UNUSED(x)        ((void)(x))
    ++#endif
    ++
    + #ifndef TRUE
    + #define TRUE 1
    + #endif
    +--- a/util/neo_net.c
    ++++ b/util/neo_net.c
    +@@ -489,7 +489,7 @@ static NEOERR *_ne_net_read_int(NSOCK *s
    +   char buf[32];
    +   char *ep = NULL;
    + 
    +-  while (x < sizeof(buf))
    ++  while (x < (int) sizeof(buf))
    +   {
    +     while (sock->il - sock->ib > 0)
    +     {
    +--- a/util/neo_server.c
    ++++ b/util/neo_server.c
    +@@ -104,6 +104,8 @@ static int ShutdownPending = 0;
    + 
    + static void sig_term(int sig)
    + {
    ++  UNUSED(sig);
    ++
    +   ShutdownPending = 1;
    +   ne_net_shutdown();
    + }
    +--- a/util/neo_str.c
    ++++ b/util/neo_str.c
    +@@ -592,11 +592,11 @@ char *repr_string_alloc (const char *s)
    +   return rs;
    + }
    + 
    +-// List of all characters that must be escaped
    +-// List based on http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
    ++/* List of all characters that must be escaped
    ++ * List based on http://www.blooberry.com/indexdot/html/topics/urlencoding.htm */
    + static char EscapedChars[] = "$&+,/:;=?@ \"<>#%{}|\\^~[]`'";
    + 
    +-// Check if a single character needs to be escaped
    ++/* Check if a single character needs to be escaped */
    + static BOOL is_reserved_char(char c)
    + {
    +   int i = 0;
    +@@ -835,15 +835,15 @@ NEOERR *neos_url_validate (const char *i
    +   colonpos = memchr(in, ':', i);
    + 
    +   if (colonpos == NULL) {
    +-    // no scheme in 'in': so this is a relative url
    ++    /* no scheme in 'in': so this is a relative url */
    +     valid = 1;
    +   }
    +   else {
    +-    for (i = 0; i < num_protocols; i++)
    ++    for (i = 0; (int) i < num_protocols; i++)
    +     {
    +       if ((inlen >= strlen(URL_PROTOCOLS[i])) && 
    +           strncmp(in, URL_PROTOCOLS[i], strlen(URL_PROTOCOLS[i])) == 0) {
    +-        // 'in' starts with one of the allowed protocols
    ++        /* 'in' starts with one of the allowed protocols */
    +         valid = 1;
    +         break;
    +       }
    +@@ -854,7 +854,7 @@ NEOERR *neos_url_validate (const char *i
    +   if (valid)
    +     return neos_html_escape(in, inlen, esc);
    + 
    +-  // 'in' contains an unsupported scheme, replace with '#' 
    ++  /* 'in' contains an unsupported scheme, replace with '#' */
    +   string_init(&out_s);
    +   err = string_append (&out_s, "#");
    +   if (err) return nerr_pass (err);
    +--- a/util/skiplist.c
    ++++ b/util/skiplist.c
    +@@ -409,7 +409,7 @@ NEOERR *skipNewList(skipList *skip, int
    +     if (err != STATUS_OK) break;
    + 
    +     for(i = 0;                                       /* init header and tail */
    +-        i <= list->maxLevel;
    ++        i <= (UINT32) list->maxLevel;
    +         i++) {
    +       list->tail->next[i] = NULL;
    +       list->header->next[i] = list->tail;
    +@@ -444,7 +444,7 @@ static void skipFreeAllItems(skipList li
    +   }
    +                                                     /* clear header pointers */
    +   for(i = 0;
    +-      i <= list->maxLevel;
    ++      i <= (UINT32) list->maxLevel;
    +       i++)
    +     list->header->next[i] = list->tail;
    + 
    diff --git a/libs/clearsilver/patches/101-fix_content_type_ff3.patch b/libs/clearsilver/patches/101-fix_content_type_ff3.patch
    new file mode 100644
    index 0000000..95eb5b6
    --- /dev/null
    +++ b/libs/clearsilver/patches/101-fix_content_type_ff3.patch
    @@ -0,0 +1,11 @@
    +--- a/cgi/cgi.c
    ++++ b/cgi/cgi.c
    +@@ -640,7 +640,7 @@ NEOERR *cgi_parse (CGI *cgi)
    + 
    +   if (!strcmp(method, "POST"))
    +   {
    +-    if (type && !strcmp(type, "application/x-www-form-urlencoded"))
    ++    if (type && !strncmp(type, "application/x-www-form-urlencoded", 33))
    +     {
    +       err = _parse_post_form(cgi);
    +       if (err != STATUS_OK) return nerr_pass (err);
    diff --git a/libs/clearsilver/patches/102-add_x_requested_http_headers.patch b/libs/clearsilver/patches/102-add_x_requested_http_headers.patch
    new file mode 100644
    index 0000000..51cbbfe
    --- /dev/null
    +++ b/libs/clearsilver/patches/102-add_x_requested_http_headers.patch
    @@ -0,0 +1,11 @@
    +--- a/cgi/cgi.c
    ++++ b/cgi/cgi.c
    +@@ -201,6 +201,8 @@ struct _http_vars
    +   {"HTTP_IF_MODIFIED_SINCE", "IfModifiedSince"},
    +   {"HTTP_REFERER", "Referer"},
    +   {"HTTP_VIA", "Via"},
    ++  {"HTTP_X_REQUESTED_WITH", "XRequestedWith"},
    ++  {"HTTP_X_REQUESTED_HANDLER", "XRequestedHandler"},	
    +   /* SOAP */
    +   {"HTTP_SOAPACTION", "Soap.Action"},
    +   {NULL, NULL}
    diff --git a/libs/clinkc/Makefile b/libs/clinkc/Makefile
    new file mode 100644
    index 0000000..3d118c5
    --- /dev/null
    +++ b/libs/clinkc/Makefile
    @@ -0,0 +1,54 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=clinkc
    +PKG_VERSION:=101
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/clinkc/
    +PKG_MD5SUM:=4c8ac54a15da47203a86daf77fbc2664
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/CyberLinkC
    +
    +PKG_BUILD_DEPENDS:=libexpat
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libclinkc
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libexpat
    +  TITLE:=Embedded UPnP library
    +  URL:=http://sourceforge.net/projects/clinkc
    +endef
    +
    +define Package/libclinkc/description
    +CyberLink for C is a UPnP library using C for small and embedded platforms.
    +endef
    +
    +# uses GNU configure
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile
    +	chmod +x $(PKG_BUILD_DIR)/config/install-sh
    +	$(call Build/Compile/Default)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/cybergarage $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libclinkc.a $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libclinkc))
    diff --git a/libs/confuse/Makefile b/libs/confuse/Makefile
    new file mode 100644
    index 0000000..9302ee6
    --- /dev/null
    +++ b/libs/confuse/Makefile
    @@ -0,0 +1,77 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=confuse
    +PKG_VERSION:=2.6
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://bzero.se/confuse
    +PKG_MD5SUM:=0e883d66f0f58fc33585b430c652aa30
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/confuse
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=libConfuse is a configuration file parser library
    +  URL:=http://www.nongnu.org/confuse/
    +endef
    +
    +define Package/confuse/description
    +	libConfuse is a configuration file parser library, licensed under the
    +	terms of the ISC license, and written in C. It supports sections and
    +	(lists of) values (strings, integers, floats, booleans or other
    +	sections), as well as some other features (such as single/double-quoted
    +	strings, environment variable expansion, functions and nested include
    +	statements). It makes it very easy to add configuration file capability
    +	to a program using a simple API.
    +
    +	The goal of libConfuse is not to be the configuration file parser
    +	library with a gazillion of features. Instead, it aims to be easy to use
    +	and quick to integrate with your code. libConfuse was called libcfg
    +	before, but was changed to not confuse with other similar libraries.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-rpath \
    +	--without-libiconv-prefix \
    +	--without-libintl-prefix \
    +
    +MAKE_FLAGS += \
    +	-C $(PKG_BUILD_DIR)/src \
    +	DESTDIR="$(PKG_INSTALL_DIR)" \
    +	all install \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/confuse.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfuse.{a,so*} $(1)/usr/lib/
    +	$(CP) $(PKG_BUILD_DIR)/*.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Build/UninstallDev
    +	rm -rf \
    +	$(STAGING_DIR)/usr/include/confuse.h \
    +	$(STAGING_DIR)/usr/lib/libconfuse.{a,so*}
    +endef
    +
    +define Package/confuse/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfuse.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,confuse))
    diff --git a/libs/confuse/patches/001-no_werror.patch b/libs/confuse/patches/001-no_werror.patch
    new file mode 100644
    index 0000000..a6a7dc4
    --- /dev/null
    +++ b/libs/confuse/patches/001-no_werror.patch
    @@ -0,0 +1,24 @@
    +diff -urN confuse-2.6/src/Makefile.am confuse-2.6.new/src/Makefile.am
    +--- confuse-2.6/src/Makefile.am	2007-10-13 13:18:28.000000000 +0200
    ++++ confuse-2.6.new/src/Makefile.am	2009-06-18 18:00:02.000000000 +0200
    +@@ -10,7 +10,7 @@
    + DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
    + 
    + if cc_is_gcc
    +-AM_CFLAGS=-Wall -Werror
    ++AM_CFLAGS=-Wall
    + endif
    + 
    + LIBS = @LIBS@
    +diff -urN confuse-2.6/src/Makefile.in confuse-2.6.new/src/Makefile.in
    +--- confuse-2.6/src/Makefile.in	2007-12-29 11:56:12.000000000 +0100
    ++++ confuse-2.6.new/src/Makefile.in	2009-06-18 17:59:55.000000000 +0200
    +@@ -196,7 +196,7 @@
    + libconfuse_la_SOURCES = confuse.c lexer.l
    + libconfuse_la_LIBADD = $(LTLIBINTL)
    + include_HEADERS = confuse.h
    +-@cc_is_gcc_TRUE@AM_CFLAGS = -Wall -Werror
    ++@cc_is_gcc_TRUE@AM_CFLAGS = -Wall
    + CLEANFILES = *~ \#*\#
    + AM_LFLAGS = -Pcfg_yy -olex.yy.c
    + all: all-am
    diff --git a/libs/credis/Makefile b/libs/credis/Makefile
    new file mode 100644
    index 0000000..3fea0cc
    --- /dev/null
    +++ b/libs/credis/Makefile
    @@ -0,0 +1,51 @@
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=credis
    +PKG_VERSION:=0.2.2
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://credis.googlecode.com/files/
    +PKG_MD5SUM:=bbc498beb22b8590005520405766cf6e
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/credis
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +	TITLE:=C library for communicating with Redis servers.
    +  URL:=http://code.google.com/p/credis
    +endef
    +
    +define Package/credis/description
    + Credis is a client library in plain C for communicating with Redis
    + servers. Redis is a high performance key-value database, refer to
    + Redis project page for more information. Credis aims to be fast
    + and minimalistic with respect to memory usage. It supports
    + connections to multiple Redis servers.
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		CC='$(TARGET_CC)' \
    +		CFLAGS='$(TARGET_CFLAGS)' \
    +		LDFLAGS='$(TARGET_LDFLAGS)' \
    +		AR='$(TARGET_CROSS)ar' \
    +		all
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_BUILD_DIR)/credis.h $(1)/usr/include/credis.h
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libcredis.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/credis/install
    +	$(INSTALL_DIR)  $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libcredis.so $(1)/usr/lib
    +endef
    +
    +$(eval $(call BuildPackage,credis))
    diff --git a/libs/credis/patches/200-Makefile.patch b/libs/credis/patches/200-Makefile.patch
    new file mode 100644
    index 0000000..177a809
    --- /dev/null
    +++ b/libs/credis/patches/200-Makefile.patch
    @@ -0,0 +1,15 @@
    +--- a/Makefile	2010-05-19 22:50:09.000000000 +0200
    ++++ b/Makefile	2010-06-22 09:59:16.000000000 +0200
    +@@ -1,9 +1,9 @@
    +-CFLAGS = -g -O2 -Wall
    +-LDFLAGS =
    ++CFLAGS += -g -O2 -Wall
    ++LDFLAGS +=
    + #CPPFLAGS = -DPRINTDEBUG
    + 
    + # build shared lib under OS X or Linux
    +-OS = $(shell uname -s)
    ++OS = Linux
    + ifeq ($(OS),Darwin)
    + 	SHAREDLIB_LINK_OPTIONS=-dynamiclib -Wl,-install_name -Wl,
    + else
    diff --git a/libs/curl/Makefile b/libs/curl/Makefile
    new file mode 100644
    index 0000000..806192d
    --- /dev/null
    +++ b/libs/curl/Makefile
    @@ -0,0 +1,116 @@
    +# 
    +# Copyright (C) 2007-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=curl
    +PKG_VERSION:=7.21.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=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/
    +PKG_MD5SUM:=5f6d50c4d4ee38c57fe37e3cff75adbd
    +
    +PKG_FIXUP:=libtool
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/curl/Default
    +  SECTION:=net
    +  CATEGORY:=Network
    +  URL:=http://curl.haxx.se/
    +endef
    +
    +define Package/curl
    +  $(call Package/curl/Default)
    +  SUBMENU:=File Transfer
    +  DEPENDS:=+libcurl
    +  TITLE:=A client-side URL transfer utility
    +endef
    +
    +define Package/libcurl
    +  $(call Package/curl/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libopenssl +zlib
    +  TITLE:=A client-side URL transfer library
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-thread \
    +	--enable-cookies \
    +	--enable-crypto-auth \
    +	--enable-nonblocking \
    +	--enable-file \
    +	--enable-ftp \
    +	--enable-http \
    +	--disable-ares \
    +	--disable-debug \
    +	--disable-dict \
    +	--disable-gopher \
    +	--disable-ldap \
    +	--disable-manual \
    +	--disable-sspi \
    +	--disable-telnet \
    +	--enable-tftp \
    +	--disable-verbose \
    +	--with-random="/dev/urandom" \
    +	--with-ssl="$(STAGING_DIR)/usr" \
    +	--without-ca-bundle \
    +	--without-gnutls \
    +	--without-krb4 \
    +	--without-libidn \
    +	--without-nss \
    +	--without-libssh2 \
    +	--with-zlib="$(STAGING_DIR)/usr" \
    +	$(call autoconf_bool,CONFIG_IPV6,ipv6) \
    +
    +CONFIGURE_VARS += \
    +	LDFLAGS="$$$$LDFLAGS -lcrypto -lssl -lz" \
    +	CC="$(filter-out ccache,$(TARGET_CC))"
    +
    +define Build/Compile
    +	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		CC="$(TARGET_CC)" \
    +		install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(1)/usr/bin/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(1)/usr/lib/
    +	$(CP) $(PKG_BUILD_DIR)/libcurl.pc $(1)/usr/lib/pkgconfig/
    +	$(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/curl-config
    +	$(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/libcurl.pc
    +	ln -sf $(STAGING_DIR)/usr/bin/curl-config $(2)/bin/
    +endef
    +
    +define Package/curl/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/
    +endef
    +
    +define Package/libcurl/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,curl))
    +$(eval $(call BuildPackage,libcurl))
    diff --git a/libs/curl/patches/100-cross-compile.patch b/libs/curl/patches/100-cross-compile.patch
    new file mode 100644
    index 0000000..9110940
    --- /dev/null
    +++ b/libs/curl/patches/100-cross-compile.patch
    @@ -0,0 +1,119 @@
    +Index: curl-7.21.7/configure.ac
    +===================================================================
    +--- curl-7.21.7.orig/configure.ac
    ++++ curl-7.21.7/configure.ac
    +@@ -1522,15 +1522,6 @@ if test X"$OPT_SSL" != Xno; then
    +   fi
    + 
    +   if test "$OPENSSL_ENABLED" = "1"; then
    +-    if test -n "$LIB_OPENSSL"; then
    +-       dnl when the ssl shared libs were found in a path that the run-time
    +-       dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
    +-       dnl to prevent further configure tests to fail due to this
    +-
    +-       LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
    +-       export LD_LIBRARY_PATH
    +-       AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
    +-    fi
    +     CURL_CHECK_OPENSSL_API
    +   fi
    + 
    +@@ -1759,17 +1750,6 @@ if test "$OPENSSL_ENABLED" != "1"; then
    + 
    +       if test "x$USE_GNUTLS" = "xyes"; then
    +         AC_MSG_NOTICE([detected GnuTLS version $version])
    +-
    +-        if test -n "$gtlslib"; then
    +-          dnl when shared libs were found in a path that the run-time
    +-          dnl linker doesn't search through, we need to add it to
    +-          dnl LD_LIBRARY_PATH to prevent further configure tests to fail
    +-          dnl due to this
    +-
    +-          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
    +-          export LD_LIBRARY_PATH
    +-          AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
    +-        fi
    +       fi
    + 
    +     fi
    +@@ -1869,18 +1849,6 @@ if test "$OPENSSL_ENABLED" != "1"; then
    + 
    +       CURL_LIBS="$CURL_LIBS -lpolarssl"
    +       LIBS="$LIBS -lpolarssl"
    +-
    +-      if test -n "$polarssllib"; then
    +-        dnl when shared libs were found in a path that the run-time
    +-        dnl linker doesn't search through, we need to add it to
    +-        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
    +-        dnl due to this
    +-
    +-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
    +-        export LD_LIBRARY_PATH
    +-        AC_MSG_NOTICE([Added $polarssllib to LD_LIBRARY_PATH])
    +-      fi
    +-
    +     fi
    + 
    +   fi dnl PolarSSL not disabled
    +@@ -1958,18 +1926,6 @@ if test "$OPENSSL_ENABLED" != "1"; then
    + 
    +       CURL_LIBS="$CURL_LIBS -lcyassl -lm"
    +       LIBS="$LIBS -lcyassl -lm"
    +-
    +-      if test -n "$cyassllib"; then
    +-        dnl when shared libs were found in a path that the run-time
    +-        dnl linker doesn't search through, we need to add it to
    +-        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
    +-        dnl due to this
    +-
    +-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$cyassllib"
    +-        export LD_LIBRARY_PATH
    +-        AC_MSG_NOTICE([Added $cyassllib to LD_LIBRARY_PATH])
    +-      fi
    +-
    +     fi
    + 
    +   fi dnl CyaSSL not disabled
    +@@ -2053,19 +2009,6 @@ if test "$OPENSSL_ENABLED" != "1" -a "$G
    +          CPPFLAGS="$CLEANCPPFLAGS"
    +        ])
    + 
    +-      if test "x$USE_NSS" = "xyes"; then
    +-        AC_MSG_NOTICE([detected NSS version $version])
    +-
    +-        dnl when shared libs were found in a path that the run-time
    +-        dnl linker doesn't search through, we need to add it to
    +-        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
    +-        dnl due to this
    +-
    +-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
    +-        export LD_LIBRARY_PATH
    +-        AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
    +-      fi
    +-
    +     fi
    + 
    +   fi dnl NSS not disabled
    +@@ -2114,11 +2057,6 @@ if test "$curl_ssl_msg" = "$init_ssl_msg
    +       AXTLS_ENABLED=1
    +       USE_AXTLS="yes"
    +       curl_ssl_msg="enabled (axTLS)"
    +-
    +-
    +-      LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS"
    +-      export LD_LIBRARY_PATH
    +-      AC_MSG_NOTICE([Added $LIB_AXTLS to LD_LIBRARY_PATH])
    +       ],[
    +       LDFLAGS="$CLEANLDFLAGS"
    +       CPPFLAGS="$CLEANCPPFLAGS"
    +@@ -2220,10 +2158,6 @@ if test X"$OPT_LIBSSH2" != Xno; then
    +        dnl libssh2_session_handshake was added in 1.2.8
    +        AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \
    +                        libssh2_scp_send64 libssh2_session_handshake)
    +-
    +-       LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
    +-       export LD_LIBRARY_PATH
    +-       AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
    +     fi
    +   else
    +     dnl no libssh2, revert back to clean variables
    diff --git a/libs/curl/patches/200-no_docs_tests.patch b/libs/curl/patches/200-no_docs_tests.patch
    new file mode 100644
    index 0000000..6519a09
    --- /dev/null
    +++ b/libs/curl/patches/200-no_docs_tests.patch
    @@ -0,0 +1,22 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -41,7 +41,7 @@ EXTRA_DIST = CHANGES COPYING maketgz Mak
    + bin_SCRIPTS = curl-config
    + 
    + SUBDIRS = lib src include
    +-DIST_SUBDIRS = $(SUBDIRS) tests packages docs
    ++DIST_SUBDIRS = $(SUBDIRS) packages
    + 
    + pkgconfigdir = $(libdir)/pkgconfig
    + pkgconfig_DATA = libcurl.pc
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -326,7 +326,7 @@ EXTRA_DIST = CHANGES COPYING maketgz Mak
    + 
    + bin_SCRIPTS = curl-config
    + SUBDIRS = lib src include
    +-DIST_SUBDIRS = $(SUBDIRS) tests packages docs
    ++DIST_SUBDIRS = $(SUBDIRS) packages
    + pkgconfigdir = $(libdir)/pkgconfig
    + pkgconfig_DATA = libcurl.pc
    + all: all-recursive
    diff --git a/libs/curl/patches/510-no_sslv2.patch b/libs/curl/patches/510-no_sslv2.patch
    new file mode 100644
    index 0000000..4866b37
    --- /dev/null
    +++ b/libs/curl/patches/510-no_sslv2.patch
    @@ -0,0 +1,25 @@
    +--- a/src/main.c
    ++++ b/src/main.c
    +@@ -936,7 +936,9 @@ static void help(void)
    +     "Time needed to trig speed-limit abort. Defaults to 30",
    +     "    --ssl           Try SSL/TLS (FTP, IMAP, POP3, SMTP)",
    +     "    --ssl-reqd      Require SSL/TLS (FTP, IMAP, POP3, SMTP)",
    ++#ifndef OPENSSL_NO_SSL2
    +     " -2/--sslv2         Use SSLv2 (SSL)",
    ++#endif
    +     " -3/--sslv3         Use SSLv3 (SSL)",
    +     "    --stderr  Where to redirect stderr. - means stdout",
    +     "    --tcp-nodelay   Use the TCP_NODELAY option",
    +@@ -2535,10 +2537,12 @@ static ParameterError getparameter(char 
    +       /* TLS version 1 */
    +       config->ssl_version = CURL_SSLVERSION_TLSv1;
    +       break;
    ++#ifndef OPENSSL_NO_SSL2
    +     case '2':
    +       /* SSL version 2 */
    +       config->ssl_version = CURL_SSLVERSION_SSLv2;
    +       break;
    ++#endif
    +     case '3':
    +       /* SSL version 3 */
    +       config->ssl_version = CURL_SSLVERSION_SSLv3;
    diff --git a/libs/cyrus-sasl/Makefile b/libs/cyrus-sasl/Makefile
    new file mode 100644
    index 0000000..1452520
    --- /dev/null
    +++ b/libs/cyrus-sasl/Makefile
    @@ -0,0 +1,108 @@
    +#
    +# Copyright (C) 2006-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=cyrus-sasl
    +PKG_VERSION:=2.1.23
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://ftp.andrew.cmu.edu/pub/cyrus-mail/
    +PKG_MD5SUM:=2eb0e48106f0e9cd8001e654f267ecbc
    +
    +PKG_BUILD_DEPENDS:=libopenssl
    +
    +PKG_FIXUP:=autoreconf
    +PKG_MACRO_PATHS:=cmulocal config ../cmulocal ../config
    +PKG_AUTOMAKE_PATHS:=. saslauthd
    +PKG_REMOVE_FILES:=aclocal.m4 saslauthd/aclocal.m4
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libsasl2
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=A general purpose authentication library
    +  URL:=http://asg.web.cmu.edu/sasl/
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-sample \
    +	--enable-staticdlopen \
    +	--disable-java \
    +	--disable-alwaystrue \
    +	--disable-checkapop \
    +	--enable-cram \
    +	--enable-digest \
    +	--without-auth-sasldb \
    +	--disable-otp \
    +	--disable-srp \
    +	--disable-srp-setpass \
    +	--disable-krb4 \
    +	--disable-gssapi \
    +	--disable-gss_mutexes \
    +	--enable-plain \
    +	--enable-anon \
    +	--disable-login \
    +	--disable-ntlm \
    +	--disable-sql \
    +	--disable-ldapdb \
    +	--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-sample
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR)/include \
    +		CC="$(HOSTCC)" \
    +		LINK="$(HOSTCC) -o makemd5 -lc" \
    +		CFLAGS="" \
    +		CPPFLAGS="" \
    +		makemd5
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/sasl $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.{a,so*} $(1)/usr/lib/
    +	ln -sf libsasl2.a $(1)/usr/lib/libsasl.a
    +	ln -sf libsasl2.so $(1)/usr/lib/libsasl.so
    +	$(INSTALL_DIR) $(1)/usr/lib/sasl2
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.{a,so*} $(1)/usr/lib/sasl2/
    +endef
    +
    +define Package/libsasl2/install
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so.* $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/sasl2
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.so.* $(1)/usr/lib/sasl2/
    +endef
    +
    +$(eval $(call BuildPackage,libsasl2))
    diff --git a/libs/cyrus-sasl/patches/001-automake-compat.patch b/libs/cyrus-sasl/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..d6a4808
    --- /dev/null
    +++ b/libs/cyrus-sasl/patches/001-automake-compat.patch
    @@ -0,0 +1,125 @@
    +--- a/lib/Makefile.am
    ++++ b/lib/Makefile.am
    +@@ -44,6 +44,7 @@
    + sasl_version = 2:23:0
    + 
    + INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb
    ++SASL_STATIC_SRC = $(patsubst %.o, %.c, $(SASL_STATIC_OBJS))
    + 
    + EXTRA_DIST = windlopen.c staticopen.h NTMakefile
    + EXTRA_LIBRARIES = libsasl2.a
    +@@ -93,7 +94,7 @@ libsasl2.a: libsasl2.la $(SASL_STATIC_OB
    + 	rm -f $@
    + 	ln -s .libs/$@ $@
    + 
    +-$(SASL_STATIC_OBJS): linksrcs
    ++$(SASL_STATIC_SRC): linksrcs
    + 
    + linksrcs:
    + 	-ln -s $(SASL_STATIC_SRCS) .
    +--- a/lib/Makefile.in
    ++++ b/lib/Makefile.in
    +@@ -176,6 +176,7 @@ SASL_KRB_LIB = @SASL_KRB_LIB@
    + SASL_MECHS = @SASL_MECHS@
    + SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
    + SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
    ++SASL_STATIC_SRC = $(patsubst %.o, %.c, $(SASL_STATIC_OBJS)) 
    + SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
    + SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
    + SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
    +@@ -646,7 +647,7 @@ libsasl2.a: libsasl2.la $(SASL_STATIC_OB
    + 	rm -f $@
    + 	ln -s .libs/$@ $@
    + 
    +-$(SASL_STATIC_OBJS): linksrcs
    ++$(SASL_STATIC_SRC): linksrcs
    + 
    + linksrcs:
    + 	-ln -s $(SASL_STATIC_SRCS) .
    +--- a/plugins/Makefile.am
    ++++ b/plugins/Makefile.am
    +@@ -82,12 +82,12 @@ EXTRA_LTLIBRARIES = libplain.la libanony
    + 	libntlm.la libpassdss.la libsasldb.la libsql.la libldapdb.la
    + 
    + libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
    +-libplain_la_LDFLAGS = -version-info $(plain_version)
    ++libplain_la_LDFLAGS = -version-info $(plain_version) $(AM_LDFLAGS)
    + libplain_la_DEPENDENCIES = $(COMPAT_OBJS)
    + libplain_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
    + 
    + libanonymous_la_SOURCES = anonymous.c anonymous_init.c $(common_sources)
    +-libanonymous_la_LDFLAGS = -version-info $(anonymous_version)
    ++libanonymous_la_LDFLAGS = -version-info $(anonymous_version) $(AM_LDFLAGS)
    + libanonymous_la_DEPENDENCIES = $(COMPAT_OBJS)
    + libanonymous_la_LIBADD = $(COMPAT_OBJS)
    + 
    +@@ -97,58 +97,58 @@ libkerberos4_la_DEPENDENCIES = $(COMPAT_
    + libkerberos4_la_LIBADD = $(SASL_KRB_LIB) $(LIB_SOCKET) $(COMPAT_OBJS)
    + 
    + libgssapiv2_la_SOURCES = gssapi.c gssapiv2_init.c $(common_sources)
    +-libgssapiv2_la_LDFLAGS = -version-info $(gssapiv2_version)
    ++libgssapiv2_la_LDFLAGS = -version-info $(gssapiv2_version) $(AM_LDFLAGS)
    + libgssapiv2_la_DEPENDENCIES = $(COMPAT_OBJS)
    + libgssapiv2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
    + 
    + libcrammd5_la_SOURCES = cram.c crammd5_init.c $(common_sources)
    +-libcrammd5_la_LDFLAGS = -version-info $(crammd5_version)
    ++libcrammd5_la_LDFLAGS = -version-info $(crammd5_version) $(AM_LDFLAGS)
    + libcrammd5_la_DEPENDENCIES = $(COMPAT_OBJS)
    + libcrammd5_la_LIBADD = $(COMPAT_OBJS)
    + 
    + libdigestmd5_la_SOURCES = digestmd5.c digestmd5_init.c $(common_sources)
    +-libdigestmd5_la_LDFLAGS = -version-info $(digestmd5_version)
    ++libdigestmd5_la_LDFLAGS = -version-info $(digestmd5_version) $(AM_LDFLAGS)
    + libdigestmd5_la_DEPENDENCIES = $(COMPAT_OBJS)
    + libdigestmd5_la_LIBADD = $(LIB_DES) $(LIB_SOCKET) $(COMPAT_OBJS)
    + 
    + liblogin_la_SOURCES = login.c login_init.c $(common_sources)
    +-liblogin_la_LDFLAGS = -version-info $(login_version)
    ++liblogin_la_LDFLAGS = -version-info $(login_version) $(AM_LDFLAGS)
    + liblogin_la_DEPENDENCIES = $(COMPAT_OBJS)
    + liblogin_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
    + 
    + libsrp_la_SOURCES = srp.c srp_init.c $(common_sources)
    +-libsrp_la_LDFLAGS = -version-info $(srp_version)
    ++libsrp_la_LDFLAGS = -version-info $(srp_version) $(AM_LDFLAGS)
    + libsrp_la_DEPENDENCIES = $(COMPAT_OBJS)
    + libsrp_la_LIBADD = $(SRP_LIBS) $(COMPAT_OBJS)
    + 
    + libotp_la_SOURCES = otp.c otp_init.c otp.h $(common_sources)
    +-libotp_la_LDFLAGS = -version-info $(otp_version)
    ++libotp_la_LDFLAGS = -version-info $(otp_version) $(AM_LDFLAGS)
    + libotp_la_DEPENDENCIES = $(COMPAT_OBJS)
    + libotp_la_LIBADD = $(OTP_LIBS) $(COMPAT_OBJS)
    + 
    + libntlm_la_SOURCES = ntlm.c ntlm_init.c $(common_sources)
    +-libntlm_la_LDFLAGS = -version-info $(ntlm_version)
    ++libntlm_la_LDFLAGS = -version-info $(ntlm_version) $(AM_LDFLAGS)
    + libntlm_la_DEPENDENCIES = $(COMPAT_OBJS)
    + libntlm_la_LIBADD = $(NTLM_LIBS) $(COMPAT_OBJS)
    + 
    + libpassdss_la_SOURCES = passdss.c passdss_init.c $(common_sources)
    +-libpassdss_la_LDFLAGS = -version-info $(passdss_version)
    ++libpassdss_la_LDFLAGS = -version-info $(passdss_version) $(AM_LDFLAGS)
    + libpassdss_la_DEPENDENCIES = $(COMPAT_OBJS)
    + libpassdss_la_LIBADD = $(PASSDSS_LIBS) $(COMPAT_OBJS)
    + 
    + # Auxprop Plugins
    + libsasldb_la_SOURCES = sasldb.c sasldb_init.c $(common_sources)
    +-libsasldb_la_LDFLAGS = -version-info $(sasldb_version)
    ++libsasldb_la_LDFLAGS = -version-info $(sasldb_version) $(AM_LDFLAGS)
    + libsasldb_la_DEPENDENCIES = $(COMPAT_OBJS)
    + libsasldb_la_LIBADD = ../sasldb/libsasldb.la $(SASL_DB_LIB) $(COMPAT_OBJS)
    + 
    + libldapdb_la_SOURCES = ldapdb.c ldapdb_init.c $(common_sources)
    +-libldapdb_la_LDFLAGS = $(LIB_LDAP) -version-info $(ldapdb_version)
    ++libldapdb_la_LDFLAGS = $(LIB_LDAP) -version-info $(ldapdb_version) $(AM_LDFLAGS)
    + libldapdb_la_DEPENDENCIES = $(COMPAT_OBJS)
    + libldapdb_la_LIBADD = $(COMPAT_OBJS)
    + 
    + libsql_la_SOURCES = sql.c sql_init.c $(common_sources)
    +-libsql_la_LDFLAGS = $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE) -version-info $(sql_version)
    ++libsql_la_LDFLAGS = $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE) -version-info $(sql_version) $(AM_LDFLAGS)
    + libsql_la_DEPENDENCIES = $(COMPAT_OBJS)
    + libsql_la_LIBADD = $(COMPAT_OBJS)
    + 
    diff --git a/libs/cyrus-sasl/patches/200-fix_avr32_compile.patch b/libs/cyrus-sasl/patches/200-fix_avr32_compile.patch
    new file mode 100644
    index 0000000..4058a7b
    --- /dev/null
    +++ b/libs/cyrus-sasl/patches/200-fix_avr32_compile.patch
    @@ -0,0 +1,11 @@
    +--- a/config/config.sub
    ++++ b/config/config.sub
    +@@ -241,7 +241,7 @@ case $basic_machine in
    + 		| mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \
    + 		| sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \
    + 		| v850 | c4x \
    +-		| thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
    ++		| thumb | d10v | d30v | fr30 | avr | avr32 | openrisc | tic80 \
    + 		| pj | pjl | h8500 | z8k)
    + 		basic_machine=$basic_machine-unknown
    + 		;;
    diff --git a/libs/db47/Makefile b/libs/db47/Makefile
    new file mode 100644
    index 0000000..7c38f23
    --- /dev/null
    +++ b/libs/db47/Makefile
    @@ -0,0 +1,98 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=db47
    +PKG_VERSION:=4.7.25.NC
    +PKG_RELEASE:=6
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/db-$(PKG_VERSION)
    +PKG_SOURCE:=db-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://download.oracle.com/berkeley-db/
    +PKG_MD5SUM:=073ab7f20d24b3872a51ca762f5090e7
    +
    +PKG_FIXUP:=libtool
    +PKG_LIBTOOL_PATHS:=. build_unix
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libdb47
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libxml2
    +  TITLE:=Berkeley DB library (4.7)
    +  URL:=http://www.sleepycat.com/products/db.shtml
    +  MAINTAINER:=W. Michael Petullo 
    +endef
    +
    +define Package/libdb47/description
    +  Berkeley DB library (4.7).
    +endef
    +
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR)/build_unix; rm -f config.cache; \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		CFLAGS="$(TARGET_CFLAGS)" \
    +		CPPFLAGS="$(TARGET_CPPFLAGS)" \
    +		LDFLAGS="$(TARGET_LDFLAGS)" \
    +		../dist/configure \
    +			--target=$(GNU_TARGET_NAME) \
    +			--host=$(GNU_TARGET_NAME) \
    +			--build=$(GNU_HOST_NAME) \
    +			--program-prefix="" \
    +			--program-suffix="" \
    +			--prefix=/usr \
    +			--exec-prefix=/usr \
    +			--bindir=/usr/bin \
    +			--datadir=/usr/share \
    +			--includedir=/usr/include \
    +			--infodir=/usr/share/info \
    +			--libdir=/usr/lib \
    +			--libexecdir=/usr/lib \
    +			--localstatedir=/var \
    +			--mandir=/usr/share/man \
    +			--sbindir=/usr/sbin \
    +			--sysconfdir=/etc \
    +			$(DISABLE_NLS) \
    +			--enable-shared \
    +			--enable-static \
    +			--disable-java \
    +			--disable-cxx \
    +			--with-mutex=UNIX/fcntl \
    +			--disable-tcl \
    +			--disable-rpc \
    +			--enable-compat185 \
    +			--enable-smallbuild \
    +			--disable-debug \
    +			--enable-cryptography \
    +	);
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile
    +	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/build_unix \
    +		DESTDIR="$(PKG_INSTALL_DIR)" all
    +	$(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
    +		DESTDIR="$(PKG_INSTALL_DIR)" install
    +endef
    +
    +define Package/libdb47/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib
    +endef
    +
    +$(eval $(call BuildPackage,libdb47))
    diff --git a/libs/db47/patches/001-sequence_lock.patch b/libs/db47/patches/001-sequence_lock.patch
    new file mode 100644
    index 0000000..8ede4b4
    --- /dev/null
    +++ b/libs/db47/patches/001-sequence_lock.patch
    @@ -0,0 +1,56 @@
    +diff -ruN db-4.7.25.NC/sequence/sequence.c db-4.7.25.NC.new/sequence/sequence.c
    +--- db-4.7.25.NC/sequence/sequence.c	2008-05-05 22:25:09.000000000 +0200
    ++++ db-4.7.25.NC.new/sequence/sequence.c	2009-11-08 12:50:27.000000000 +0100
    +@@ -187,7 +187,11 @@
    + 	if ((ret = __db_get_flags(dbp, &tflags)) != 0)
    + 		goto err;
    + 
    +-	if (DB_IS_READONLY(dbp)) {
    ++	/*
    ++	 * We can let replication clients open sequences, but must
    ++	 * check later that they do not update them.
    ++	 */
    ++	if (F_ISSET(dbp, DB_AM_RDONLY)) {
    + 		ret = __db_rdonly(dbp->env, "DB_SEQUENCE->open");
    + 		goto err;
    + 	}
    +@@ -244,6 +248,11 @@
    + 		if ((ret != DB_NOTFOUND && ret != DB_KEYEMPTY) ||
    + 		    !LF_ISSET(DB_CREATE))
    + 			goto err;
    ++		if (IS_REP_CLIENT(env) &&
    ++		    !F_ISSET(dbp, DB_AM_NOT_DURABLE)) {
    ++			ret = __db_rdonly(env, "DB_SEQUENCE->open");
    ++			goto err;
    ++		}
    + 		ret = 0;
    + 
    + 		rp = &seq->seq_record;
    +@@ -296,7 +305,12 @@
    + 	 */
    + 	rp = seq->seq_data.data;
    + 	if (rp->seq_version == DB_SEQUENCE_OLDVER) {
    +-oldver:		rp->seq_version = DB_SEQUENCE_VERSION;
    ++oldver:		if (IS_REP_CLIENT(env) &&
    ++		    !F_ISSET(dbp, DB_AM_NOT_DURABLE)) {
    ++			ret = __db_rdonly(env, "DB_SEQUENCE->open");
    ++			goto err;
    ++		}
    ++		rp->seq_version = DB_SEQUENCE_VERSION;
    + 		if (!F_ISSET(env, ENV_LITTLEENDIAN)) {
    + 			if (IS_DB_AUTO_COMMIT(dbp, txn)) {
    + 				if ((ret =
    +@@ -707,6 +721,13 @@
    + 
    + 	MUTEX_LOCK(env, seq->mtx_seq);
    + 
    ++	if (handle_check && IS_REP_CLIENT(env) &&
    ++	    !F_ISSET(dbp, DB_AM_NOT_DURABLE)) {
    ++		ret = __db_rdonly(env, "DB_SEQUENCE->get");
    ++		goto err;
    ++	}
    ++
    ++
    + 	if (rp->seq_min + delta > rp->seq_max) {
    + 		__db_errx(env, "Sequence overflow");
    + 		ret = EINVAL;
    diff --git a/libs/db47/patches/002-lock.patch b/libs/db47/patches/002-lock.patch
    new file mode 100644
    index 0000000..8cfd8fa
    --- /dev/null
    +++ b/libs/db47/patches/002-lock.patch
    @@ -0,0 +1,43 @@
    +diff -urN db-4.7.25.NC/lock/lock.c db-4.7.25.NC.new/lock/lock.c
    +--- db-4.7.25.NC/lock/lock.c	2008-05-07 14:27:35.000000000 +0200
    ++++ db-4.7.25.NC.new/lock/lock.c	2009-11-08 12:52:19.000000000 +0100
    +@@ -1274,10 +1274,12 @@
    + 		SH_TAILQ_REMOVE(
    + 		    <->obj_tab[obj_ndx], sh_obj, links, __db_lockobj);
    + 		if (sh_obj->lockobj.size > sizeof(sh_obj->objdata)) {
    +-			LOCK_REGION_LOCK(env);
    ++			if (region->part_t_size != 1)
    ++				LOCK_REGION_LOCK(env);
    + 			__env_alloc_free(<->reginfo,
    + 			    SH_DBT_PTR(&sh_obj->lockobj));
    +-			LOCK_REGION_UNLOCK(env);
    ++			if (region->part_t_size != 1)
    ++				LOCK_REGION_UNLOCK(env);
    + 		}
    + 		SH_TAILQ_INSERT_HEAD(
    + 		    &FREE_OBJS(lt, part_id), sh_obj, links, __db_lockobj);
    +@@ -1467,15 +1469,21 @@
    + 		if (obj->size <= sizeof(sh_obj->objdata))
    + 			p = sh_obj->objdata;
    + 		else {
    +-			LOCK_REGION_LOCK(env);
    ++			/*
    ++			 * If we have only one partition, the region is locked.
    ++			 */
    ++			if (region->part_t_size != 1)
    ++				LOCK_REGION_LOCK(env);
    + 			if ((ret =
    + 			    __env_alloc(<->reginfo, obj->size, &p)) != 0) {
    + 				__db_errx(env,
    + 				    "No space for lock object storage");
    +-				LOCK_REGION_UNLOCK(env);
    ++				if (region->part_t_size != 1)
    ++					LOCK_REGION_UNLOCK(env);
    + 				goto err;
    + 			}
    +-			LOCK_REGION_UNLOCK(env);
    ++			if (region->part_t_size != 1)
    ++				LOCK_REGION_UNLOCK(env);
    + 		}
    + 
    + 		memcpy(p, obj->data, obj->size);
    diff --git a/libs/db47/patches/003-dead_lock.patch b/libs/db47/patches/003-dead_lock.patch
    new file mode 100644
    index 0000000..2b86660
    --- /dev/null
    +++ b/libs/db47/patches/003-dead_lock.patch
    @@ -0,0 +1,212 @@
    +diff -urN db-4.7.25.NC/lock/lock_deadlock.c db-4.7.25.NC.new/lock/lock_deadlock.c
    +--- db-4.7.25.NC/lock/lock_deadlock.c	2008-03-10 14:31:33.000000000 +0100
    ++++ db-4.7.25.NC.new/lock/lock_deadlock.c	2009-11-08 12:53:25.000000000 +0100
    +@@ -121,7 +121,7 @@
    + 	DB_LOCKTAB *lt;
    + 	db_timespec now;
    + 	locker_info *idmap;
    +-	u_int32_t *bitmap, *copymap, **deadp, **free_me, *tmpmap;
    ++	u_int32_t *bitmap, *copymap, **deadp, **deadlist, *tmpmap;
    + 	u_int32_t i, cid, keeper, killid, limit, nalloc, nlockers;
    + 	u_int32_t lock_max, txn_max;
    + 	int ret, status;
    +@@ -133,7 +133,8 @@
    + 	if (IS_REP_CLIENT(env))
    + 		atype = DB_LOCK_MINWRITE;
    + 
    +-	free_me = NULL;
    ++	copymap = tmpmap = NULL;
    ++	deadlist = NULL;
    + 
    + 	lt = env->lk_handle;
    + 	if (rejectp != NULL)
    +@@ -179,11 +180,11 @@
    + 	memcpy(copymap, bitmap, nlockers * sizeof(u_int32_t) * nalloc);
    + 
    + 	if ((ret = __os_calloc(env, sizeof(u_int32_t), nalloc, &tmpmap)) != 0)
    +-		goto err1;
    ++		goto err;
    + 
    + 	/* Find a deadlock. */
    + 	if ((ret =
    +-	    __dd_find(env, bitmap, idmap, nlockers, nalloc, &deadp)) != 0)
    ++	    __dd_find(env, bitmap, idmap, nlockers, nalloc, &deadlist)) != 0)
    + 		return (ret);
    + 
    + 	/*
    +@@ -204,8 +205,7 @@
    + 		txn_max = TXN_MAXIMUM;
    + 
    + 	killid = BAD_KILLID;
    +-	free_me = deadp;
    +-	for (; *deadp != NULL; deadp++) {
    ++	for (deadp = deadlist; *deadp != NULL; deadp++) {
    + 		if (rejectp != NULL)
    + 			++*rejectp;
    + 		killid = (u_int32_t)(*deadp - bitmap) / nalloc;
    +@@ -342,11 +342,12 @@
    + 			__db_msg(env,
    + 			    "Aborting locker %lx", (u_long)idmap[killid].id);
    + 	}
    +-	__os_free(env, tmpmap);
    +-err1:	__os_free(env, copymap);
    +-
    +-err:	if (free_me != NULL)
    +-		__os_free(env, free_me);
    ++err:	if(copymap != NULL)
    ++		__os_free(env, copymap);
    ++	if (deadlist != NULL)
    ++		__os_free(env, deadlist);
    ++	if(tmpmap != NULL)
    ++		__os_free(env, tmpmap);
    + 	__os_free(env, bitmap);
    + 	__os_free(env, idmap);
    + 
    +@@ -360,6 +361,17 @@
    + 
    + #define	DD_INVALID_ID	((u_int32_t) -1)
    + 
    ++/*
    ++ * __dd_build --
    ++ *	Build the lock dependency bit maps.
    ++ * Notes on syncronization:  
    ++ *	LOCK_SYSTEM_LOCK is used to hold objects locked when we have
    ++ *		a single partition.
    ++ *	LOCK_LOCKERS is held while we are walking the lockers list and
    ++ *		to single thread the use of lockerp->dd_id.
    ++ *	LOCK_DD protects the DD list of objects.
    ++ */
    ++
    + static int
    + __dd_build(env, atype, bmp, nlockers, allocp, idmap, rejectp)
    + 	ENV *env;
    +@@ -393,6 +405,7 @@
    + 	 * In particular we do not build the conflict array and our caller
    + 	 * needs to expect this.
    + 	 */
    ++	LOCK_SYSTEM_LOCK(lt, region);
    + 	if (atype == DB_LOCK_EXPIRE) {
    + skip:		LOCK_DD(env, region);
    + 		op = SH_TAILQ_FIRST(®ion->dd_objs, __db_lockobj);
    +@@ -430,17 +443,18 @@
    + 			OBJECT_UNLOCK(lt, region, indx);
    + 		}
    + 		UNLOCK_DD(env, region);
    ++		LOCK_SYSTEM_UNLOCK(lt, region);
    + 		goto done;
    + 	}
    + 
    + 	/*
    +-	 * We'll check how many lockers there are, add a few more in for
    +-	 * good measure and then allocate all the structures.  Then we'll
    +-	 * verify that we have enough room when we go back in and get the
    +-	 * mutex the second time.
    ++	 * Allocate after locking the region
    ++	 * to make sure the structures are large enough.
    + 	 */
    +-retry:	count = region->stat.st_nlockers;
    ++	LOCK_LOCKERS(env, region);
    ++	count = region->stat.st_nlockers;
    + 	if (count == 0) {
    ++		UNLOCK_LOCKERS(env, region);
    + 		*nlockers = 0;
    + 		return (0);
    + 	}
    +@@ -448,50 +462,37 @@
    + 	if (FLD_ISSET(env->dbenv->verbose, DB_VERB_DEADLOCK))
    + 		__db_msg(env, "%lu lockers", (u_long)count);
    + 
    +-	count += 20;
    + 	nentries = (u_int32_t)DB_ALIGN(count, 32) / 32;
    + 
    +-	/*
    +-	 * Allocate enough space for a count by count bitmap matrix.
    +-	 *
    +-	 * XXX
    +-	 * We can probably save the malloc's between iterations just
    +-	 * reallocing if necessary because count grew by too much.
    +-	 */
    ++	/* Allocate enough space for a count by count bitmap matrix. */
    + 	if ((ret = __os_calloc(env, (size_t)count,
    +-	    sizeof(u_int32_t) * nentries, &bitmap)) != 0)
    ++	    sizeof(u_int32_t) * nentries, &bitmap)) != 0) {
    ++		UNLOCK_LOCKERS(env, region);
    + 		return (ret);
    ++	}
    + 
    + 	if ((ret = __os_calloc(env,
    + 	    sizeof(u_int32_t), nentries, &tmpmap)) != 0) {
    ++		UNLOCK_LOCKERS(env, region);
    + 		__os_free(env, bitmap);
    + 		return (ret);
    + 	}
    + 
    + 	if ((ret = __os_calloc(env,
    + 	    (size_t)count, sizeof(locker_info), &id_array)) != 0) {
    ++		UNLOCK_LOCKERS(env, region);
    + 		__os_free(env, bitmap);
    + 		__os_free(env, tmpmap);
    + 		return (ret);
    + 	}
    + 
    + 	/*
    +-	 * Now go back in and actually fill in the matrix.
    +-	 */
    +-	if (region->stat.st_nlockers > count) {
    +-		__os_free(env, bitmap);
    +-		__os_free(env, tmpmap);
    +-		__os_free(env, id_array);
    +-		goto retry;
    +-	}
    +-
    +-	/*
    + 	 * First we go through and assign each locker a deadlock detector id.
    + 	 */
    + 	id = 0;
    +-	LOCK_LOCKERS(env, region);
    + 	SH_TAILQ_FOREACH(lip, ®ion->lockers, ulinks, __db_locker) {
    + 		if (lip->master_locker == INVALID_ROFF) {
    ++			DB_ASSERT(env, id < count);
    + 			lip->dd_id = id++;
    + 			id_array[lip->dd_id].id = lip->id;
    + 			switch (atype) {
    +@@ -510,7 +511,6 @@
    + 			lip->dd_id = DD_INVALID_ID;
    + 
    + 	}
    +-	UNLOCK_LOCKERS(env, region);
    + 
    + 	/*
    + 	 * We only need consider objects that have waiters, so we use
    +@@ -669,7 +669,6 @@
    + 	 * status after building the bit maps so that we will not detect
    + 	 * a blocked transaction without noting that it is already aborting.
    + 	 */
    +-	LOCK_LOCKERS(env, region);
    + 	for (id = 0; id < count; id++) {
    + 		if (!id_array[id].valid)
    + 			continue;
    +@@ -738,6 +737,7 @@
    + 			id_array[id].in_abort = 1;
    + 	}
    + 	UNLOCK_LOCKERS(env, region);
    ++	LOCK_SYSTEM_UNLOCK(lt, region);
    + 
    + 	/*
    + 	 * Now we can release everything except the bitmap matrix that we
    +@@ -839,6 +839,7 @@
    + 	ret = 0;
    + 
    + 	/* We must lock so this locker cannot go away while we abort it. */
    ++	LOCK_SYSTEM_LOCK(lt, region);
    + 	LOCK_LOCKERS(env, region);
    + 
    + 	/*
    +@@ -895,6 +896,7 @@
    + done:	OBJECT_UNLOCK(lt, region, info->last_ndx);
    + err:
    + out:	UNLOCK_LOCKERS(env, region);
    ++	LOCK_SYSTEM_UNLOCK(lt, region);
    + 	return (ret);
    + }
    + 
    diff --git a/libs/dbus-glib/Makefile b/libs/dbus-glib/Makefile
    new file mode 100644
    index 0000000..ab63800
    --- /dev/null
    +++ b/libs/dbus-glib/Makefile
    @@ -0,0 +1,74 @@
    +#
    +# Copyright (C) 2007-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=dbus-glib
    +PKG_VERSION:=0.80
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus-glib/
    +PKG_MD5SUM:=86ea60ba2118a1b9deafe8257f6a6a1a
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +
    +define Package/libdbus-glib
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=D-Bus Glib bindings
    +  URL:=http://dbus.freedesktop.org/doc/dbus-glib/
    +  DEPENDS:=+libdbus +glib2 $(ICONV_DEPENDS) $(INTL_DEPENDS)
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-tests \
    +	--disable-xml-docs \
    +	--disable-doxygen-docs \
    +
    +CONFIGURE_VARS+= \
    +	ac_cv_func_posix_getpwnam_r="yes" \
    +	ac_cv_have_abstract_sockets="yes" \
    +	CPPFLAGS="$$$$CPPFLAGS -I$(ICONV_PREFIX)/include" \
    +	CPPFLAGS="$$$$CPPFLAGS -I$(INTL_PREFIX)/include" \
    +	LDFLAGS="$$$$LDFLAGS -L$(ICONV_PREFIX)/lib" \
    +	LDFLAGS="$$$$LDFLAGS -L$(INTL_PREFIX)/lib" \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/dbus-1.0/dbus
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/dbus-1.0/dbus/*.h \
    +		$(1)/usr/include/dbus-1.0/dbus/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libdbus-glib-1.{la,a,so*} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/dbus-glib-1.pc \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libdbus-glib/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdbus-glib-1.so.* $(1)/usr/lib/
    +endef
    +
    +
    +$(eval $(call BuildPackage,libdbus-glib))
    diff --git a/libs/dbus-glib/patches/001-cross.patch b/libs/dbus-glib/patches/001-cross.patch
    new file mode 100644
    index 0000000..486782d
    --- /dev/null
    +++ b/libs/dbus-glib/patches/001-cross.patch
    @@ -0,0 +1,96 @@
    +--- a/dbus/Makefile.in
    ++++ b/dbus/Makefile.in
    +@@ -315,7 +315,7 @@ target_vendor = @target_vendor@
    + top_build_prefix = @top_build_prefix@
    + top_builddir = @top_builddir@
    + top_srcdir = @top_srcdir@
    +-SUBDIRS = . examples
    ++SUBDIRS = .
    + INCLUDES = \
    + 	-I$(top_srcdir)						\
    + 	-I$(top_builddir)					\
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -267,8 +267,8 @@ top_build_prefix = @top_build_prefix@
    + top_builddir = @top_builddir@
    + top_srcdir = @top_srcdir@
    + GLIB_PC = dbus-glib-1.pc
    +-SUBDIRS = dbus tools test doc
    +-DIST_SUBDIRS = dbus tools test doc m4
    ++SUBDIRS = dbus
    ++DIST_SUBDIRS = dbus tools m4
    + pkgconfigdir = $(libdir)/pkgconfig
    + pkgconfig_DATA = $(GLIB_PC)
    + DISTCLEANFILES = \
    +--- a/tools/Makefile.am
    ++++ b/tools/Makefile.am
    +@@ -1,24 +1,10 @@
    + INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_X_CFLAGS) $(DBUS_GTK_THREADS_CFLAGS) -DDBUS_COMPILATION
    + 
    +-nodist_libdbus_glib_HEADERS = dbus-glib-bindings.h
    + libdbus_glibdir = $(includedir)/dbus-1.0/dbus
    + 
    +-dbus-glib-bindings.h: dbus-bus-introspect.xml $(top_builddir)/dbus/dbus-binding-tool$(EXEEXT)
    +-	$(top_builddir)/dbus/dbus-binding-tool --mode=glib-client --prefix=dbus_bus --output=dbus-glib-bindings.h dbus-bus-introspect.xml
    +-
    +-BUILT_SOURCES = dbus-glib-bindings.h dbus-bus-introspect.xml
    +-
    +-if USE_INTROSPECT_XML
    +-dbus-bus-introspect.xml: $(INTROSPECT_XML_PATH)
    +-	cp $(INTROSPECT_XML_PATH) dbus-bus-introspect.xml
    +-else
    +-dbus-bus-introspect.xml:
    +-	DBUS_TOP_BUILDDIR=$(top_builddir) @DBUS_DAEMONDIR@dbus-daemon --introspect > dbus-bus-introspect.xml.tmp && mv dbus-bus-introspect.xml.tmp dbus-bus-introspect.xml
    +-endif
    ++BUILT_SOURCES = 
    + 
    + EXTRA_DIST = run-with-tmp-session-bus.sh session.conf
    + 
    + CLEANFILES = 				\
    +-	run-with-tmp-session-bus.conf   \
    +-        dbus-bus-introspect.xml         \
    +-        dbus-glib-bindings.h
    ++	run-with-tmp-session-bus.conf
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -58,9 +58,6 @@ AC_ARG_ENABLE(bash-completion, AS_HELP_S
    + AC_ARG_WITH(test-socket-dir, AS_HELP_STRING([--with-test-socket-dir=[dirname]],[Where to put sockets for make check]))
    + 
    + 
    +-AC_ARG_WITH(introspect-xml, AS_HELP_STRING([--with-introspect-xml=[filename]],[Pass in a pregenerated dbus daemon introspection xml file (as generated by 'dbus-daemon --introspect') to use instead of querying the installed dbus daemon]))
    +-
    +-
    + AM_CONDITIONAL(DBUS_BASH_COMPLETION, test x$enable_bash_completion = xyes)
    + if test x$enable_bash_completion = xyes; then
    +   AC_DEFINE(DBUS_BASH_COMPLETION,1,[Enable bash completion])
    +@@ -815,18 +812,6 @@ fi
    + AC_SUBST(TEST_SOCKET_DIR)
    + AC_DEFINE_UNQUOTED(DBUS_TEST_SOCKET_DIR, "$TEST_SOCKET_DIR", [Where to put test sockets])
    + 
    +-#### Test if we should generate daemon introspection xml
    +-use_introspect_xml=false
    +-
    +-if ! test -z "$with_introspect_xml" ; then
    +-  use_introspect_xml=true
    +-  INTROSPECT_XML_PATH="$with_introspect_xml"
    +-  AC_DEFINE(INTROSPECT_XML_PATH, "$INTROSPECT_XML_PATH", [Path to pregenerated xml for dbus daemon introspection])
    +-  AC_SUBST(INTROSPECT_XML_PATH)
    +-fi
    +-
    +-AM_CONDITIONAL(USE_INTROSPECT_XML, $use_introspect_xml)
    +-
    + AC_OUTPUT([
    + Makefile
    + m4/Makefile
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -1,7 +1,7 @@
    + GLIB_PC=dbus-glib-1.pc
    + 
    +-SUBDIRS=dbus tools test doc
    +-DIST_SUBDIRS=dbus tools test doc m4
    ++SUBDIRS=dbus tools
    ++DIST_SUBDIRS=dbus tools m4
    + 
    + pkgconfigdir = $(libdir)/pkgconfig
    + pkgconfig_DATA = $(GLIB_PC)
    diff --git a/libs/dbus-glib/patches/003-disable-tests-docs-examples.patch b/libs/dbus-glib/patches/003-disable-tests-docs-examples.patch
    new file mode 100644
    index 0000000..e6945d9
    --- /dev/null
    +++ b/libs/dbus-glib/patches/003-disable-tests-docs-examples.patch
    @@ -0,0 +1,29 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -815,18 +815,7 @@ AC_DEFINE_UNQUOTED(DBUS_TEST_SOCKET_DIR,
    + AC_OUTPUT([
    + Makefile
    + m4/Makefile
    +-doc/Makefile
    +-doc/reference/Makefile
    +-doc/reference/version.xml
    + dbus/Makefile
    +-dbus/examples/Makefile
    +-dbus/examples/statemachine/Makefile
    +-test/Makefile
    +-test/core/Makefile
    +-test/interfaces/Makefile
    +-test/data/valid-service-files/debug-glib.service
    +-test/data/valid-service-files/debug-echo.service
    +-test/data/valid-service-files/interfaces-test.service
    + tools/Makefile
    + dbus-glib-1.pc
    + dbus-glib-1-uninstalled.pc
    +--- a/dbus/Makefile.am
    ++++ b/dbus/Makefile.am
    +@@ -1,4 +1,4 @@
    +-SUBDIRS = . examples
    ++SUBDIRS = .
    + 
    + INCLUDES = \
    + 	-I$(top_srcdir)						\
    diff --git a/libs/elfutils/Makefile b/libs/elfutils/Makefile
    new file mode 100644
    index 0000000..069854d
    --- /dev/null
    +++ b/libs/elfutils/Makefile
    @@ -0,0 +1,52 @@
    +#
    +# Copyright (C) 2010-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=elfutils
    +PKG_VERSION:=0.152
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://fedorahosted.org/releases/e/l/$(PKG_NAME)/$(PKG_VERSION)
    +PKG_MD5SUM:=39739ed58a0fa1862eff8735f111fe5c
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/elfutils/Default
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=$(INTL_DEPENDS) +USE_UCLIBC:argp-standalone @BROKEN
    +  TITLE:=ELF manipulation libraries
    +  URL:=https://fedorahosted.org/elfutils/
    +endef
    +
    +define Package/libdw
    +  $(call Package/elfutils/Default)
    +  TITLE+= (libdw)
    +endef
    +
    +ifdef CONFIG_USE_UCLIBC
    +CONFIGURE_VARS += \
    +	LIBS="-largp"
    +endif
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libdw/libdw.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libdw/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libdw/libdw.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libdw))
    diff --git a/libs/elfutils/patches/001-elfutils-portability.patch b/libs/elfutils/patches/001-elfutils-portability.patch
    new file mode 100644
    index 0000000..c7b30d9
    --- /dev/null
    +++ b/libs/elfutils/patches/001-elfutils-portability.patch
    @@ -0,0 +1,1243 @@
    +--- a/backends/ChangeLog
    ++++ b/backends/ChangeLog
    +@@ -111,6 +111,10 @@
    + 	* ppc_attrs.c (ppc_check_object_attribute): Handle tag
    + 	GNU_Power_ABI_Struct_Return.
    + 
    ++2009-01-23  Roland McGrath  
    ++
    ++	* Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
    ++
    + 2008-10-04  Ulrich Drepper  
    + 
    + 	* i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
    +@@ -438,6 +442,11 @@
    + 	* sparc_init.c: Likewise.
    + 	* x86_64_init.c: Likewise.
    + 
    ++2005-11-22  Roland McGrath  
    ++
    ++	* Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
    ++	(libebl_%.so rule): Use it in place of -Wl,--as-needed.
    ++
    + 2005-11-19  Roland McGrath  
    + 
    + 	* ppc64_reloc.def: REL30 -> ADDR30.
    +@@ -460,6 +469,9 @@
    + 	* Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
    + 	(CLEANFILES): Add libebl_$(m).so.
    + 
    ++	* Makefile.am (WEXTRA): New variable, substituted by configure.
    ++	(AM_CFLAGS): Use it in place of -Wextra.
    ++
    + 	* ppc_reloc.def: Update bits per Alan Modra .
    + 	* ppc64_reloc.def: Likewise.
    + 
    +--- a/backends/Makefile.am
    ++++ b/backends/Makefile.am
    +@@ -103,7 +103,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a
    + 	$(LINK) -shared -o $(@:.map=.so) \
    + 		-Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
    + 		-Wl,--version-script,$(@:.so=.map) \
    +-		-Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
    ++		-Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
    + 	$(textrel_check)
    + 
    + libebl_i386.so: $(cpu_i386)
    +--- a/backends/Makefile.in
    ++++ b/backends/Makefile.in
    +@@ -165,6 +165,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
    + INSTALL_SCRIPT = @INSTALL_SCRIPT@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LDFLAGS = @LDFLAGS@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    + LEX = @LEX@
    + LEXLIB = @LEXLIB@
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    +@@ -194,6 +195,7 @@ SHELL = @SHELL@
    + STRIP = @STRIP@
    + USE_NLS = @USE_NLS@
    + VERSION = @VERSION@
    ++WEXTRA = @WEXTRA@
    + XGETTEXT = @XGETTEXT@
    + XGETTEXT_015 = @XGETTEXT_015@
    + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
    +@@ -257,7 +259,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
    + 	-I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    + 	$($(*F)_no_Werror),,-Werror) $(if \
    +-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
    ++	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1)
    + @MUDFLAP_FALSE@libmudflap = 
    +@@ -698,7 +700,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a
    + 	$(LINK) -shared -o $(@:.map=.so) \
    + 		-Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
    + 		-Wl,--version-script,$(@:.so=.map) \
    +-		-Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
    ++		-Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
    + 	$(textrel_check)
    + 
    + libebl_i386.so: $(cpu_i386)
    +--- a/ChangeLog
    ++++ b/ChangeLog
    +@@ -13,6 +13,10 @@
    + 
    + 	* configure.ac (LOCALEDIR, DATADIRNAME): Removed.
    + 
    ++2009-11-22  Roland McGrath  
    ++
    ++	* configure.ac: Use sed and expr instead of modern bash extensions.
    ++
    + 2009-09-21  Ulrich Drepper  
    + 
    + 	* configure.ac: Update for more modern autoconf.
    +@@ -21,6 +25,10 @@
    + 
    + 	* configure.ac (zip_LIBS): Check for liblzma too.
    + 
    ++2009-08-17  Roland McGrath  
    ++
    ++	* configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works.
    ++
    + 2009-04-19  Roland McGrath  
    + 
    + 	* configure.ac (eu_version): Round down here, not in version.h macros.
    +@@ -32,6 +40,8 @@
    + 
    + 2009-01-23  Roland McGrath  
    + 
    ++	* configure.ac: Check for __builtin_popcount.
    ++
    + 	* configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
    + 
    + 	* configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
    +@@ -112,6 +122,10 @@
    + 	* configure.ac: Add dummy automake conditional to get dependencies
    + 	for non-generic linker right.  See src/Makefile.am.
    + 
    ++2005-11-22  Roland McGrath  
    ++
    ++	* configure.ac: Check for --as-needed linker option.
    ++
    + 2005-11-18  Roland McGrath  
    + 
    + 	* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
    +@@ -159,6 +173,17 @@
    + 	* Makefile.am (all_SUBDIRS): Add libdwfl.
    + 	* configure.ac: Write libdwfl/Makefile.
    + 
    ++2005-05-31  Roland McGrath  
    ++
    ++	* configure.ac (WEXTRA): Check for -Wextra and set this substitution.
    ++
    ++	* configure.ac: Check for struct stat st_?tim members.
    ++	* src/strip.c (process_file): Use st_?time if st_?tim are not there.
    ++
    ++	* configure.ac: Check for futimes function.
    ++	* src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
    ++	(handle_ar) [! HAVE_FUTIMES]: Likewise.
    ++
    + 2005-05-19  Roland McGrath  
    + 
    + 	* configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
    +--- a/config/eu.am
    ++++ b/config/eu.am
    +@@ -25,11 +25,14 @@
    + ## .
    + ##
    + 
    ++WEXTRA = @WEXTRA@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    ++
    + DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
    + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
    + 	    $(if $($(*F)_no_Werror),,-Werror) \
    +-	    $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
    ++	    $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
    + 	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
    + 	    $($(*F)_CFLAGS)
    + 
    +--- a/config/Makefile.in
    ++++ b/config/Makefile.in
    +@@ -76,6 +76,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
    + INSTALL_SCRIPT = @INSTALL_SCRIPT@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LDFLAGS = @LDFLAGS@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    + LEX = @LEX@
    + LEXLIB = @LEXLIB@
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    +@@ -105,6 +106,7 @@ SHELL = @SHELL@
    + STRIP = @STRIP@
    + USE_NLS = @USE_NLS@
    + VERSION = @VERSION@
    ++WEXTRA = @WEXTRA@
    + XGETTEXT = @XGETTEXT@
    + XGETTEXT_015 = @XGETTEXT_015@
    + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
    +--- a/config.h.in
    ++++ b/config.h.in
    +@@ -1,5 +1,8 @@
    + /* config.h.in.  Generated from configure.ac by autoheader.  */
    + 
    ++/* Have __builtin_popcount. */
    ++#undef HAVE_BUILTIN_POPCOUNT
    ++
    + /* $libdir subdirectory containing libebl modules. */
    + #undef LIBEBL_SUBDIR
    + 
    +@@ -55,4 +58,7 @@
    + /* Define for large files, on AIX-style hosts. */
    + #undef _LARGE_FILES
    + 
    ++/* Stubbed out if missing compiler support. */
    ++#undef __thread
    ++
    + #include 
    +--- a/configure
    ++++ b/configure
    +@@ -602,6 +602,8 @@ NEVER_TRUE
    + base_cpu
    + NATIVE_LD_FALSE
    + NATIVE_LD_TRUE
    ++LD_AS_NEEDED
    ++WEXTRA
    + LEXLIB
    + LEX_OUTPUT_ROOT
    + LEX
    +@@ -3856,6 +3858,130 @@ if test "x$ac_cv_c99" != xyes; then :
    +   as_fn_error $? "gcc with C99 support required" "$LINENO" 5
    + fi
    + 
    ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra option to $CC" >&5
    ++$as_echo_n "checking for -Wextra option to $CC... " >&6; }
    ++if test "${ac_cv_cc_wextra+set}" = set; then :
    ++  $as_echo_n "(cached) " >&6
    ++else
    ++  old_CFLAGS="$CFLAGS"
    ++CFLAGS="$CFLAGS -Wextra"
    ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    ++/* end confdefs.h.  */
    ++void foo (void) { }
    ++_ACEOF
    ++if ac_fn_c_try_compile "$LINENO"; then :
    ++  ac_cv_cc_wextra=yes
    ++else
    ++  ac_cv_cc_wextra=no
    ++fi
    ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ++CFLAGS="$old_CFLAGS"
    ++fi
    ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_wextra" >&5
    ++$as_echo "$ac_cv_cc_wextra" >&6; }
    ++
    ++if test "x$ac_cv_cc_wextra" = xyes; then :
    ++  WEXTRA=-Wextra
    ++else
    ++  WEXTRA=-W
    ++fi
    ++
    ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fgnu89-inline option to $CC" >&5
    ++$as_echo_n "checking for -fgnu89-inline option to $CC... " >&6; }
    ++if test "${ac_cv_cc_gnu89_inline+set}" = set; then :
    ++  $as_echo_n "(cached) " >&6
    ++else
    ++  old_CFLAGS="$CFLAGS"
    ++CFLAGS="$CFLAGS -fgnu89-inline -Werror"
    ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    ++/* end confdefs.h.  */
    ++
    ++void foo (void)
    ++{
    ++  inline void bar (void) {}
    ++  bar ();
    ++}
    ++extern inline void baz (void) {}
    ++
    ++_ACEOF
    ++if ac_fn_c_try_compile "$LINENO"; then :
    ++  ac_cv_cc_gnu89_inline=yes
    ++else
    ++  ac_cv_cc_gnu89_inline=no
    ++fi
    ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ++CFLAGS="$old_CFLAGS"
    ++fi
    ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_gnu89_inline" >&5
    ++$as_echo "$ac_cv_cc_gnu89_inline" >&6; }
    ++if test "x$ac_cv_cc_gnu89_inline" = xyes; then :
    ++  WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"
    ++fi
    ++
    ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed linker option" >&5
    ++$as_echo_n "checking for --as-needed linker option... " >&6; }
    ++if test "${ac_cv_as_needed+set}" = set; then :
    ++  $as_echo_n "(cached) " >&6
    ++else
    ++  cat > conftest.c <&5
    ++  (eval $ac_try) 2>&5
    ++  ac_status=$?
    ++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    ++  test $ac_status = 0; }; }
    ++then
    ++  ac_cv_as_needed=yes
    ++else
    ++  ac_cv_as_needed=no
    ++fi
    ++rm -f conftest*
    ++fi
    ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_as_needed" >&5
    ++$as_echo "$ac_cv_as_needed" >&6; }
    ++if test "x$ac_cv_as_needed" = xyes; then :
    ++  LD_AS_NEEDED=-Wl,--as-needed
    ++else
    ++  LD_AS_NEEDED=
    ++fi
    ++
    ++
    ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
    ++$as_echo_n "checking for __builtin_popcount... " >&6; }
    ++if test "${ac_cv_popcount+set}" = set; then :
    ++  $as_echo_n "(cached) " >&6
    ++else
    ++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    ++/* end confdefs.h.  */
    ++
    ++int
    ++main ()
    ++{
    ++exit (__builtin_popcount (127));
    ++  ;
    ++  return 0;
    ++}
    ++_ACEOF
    ++if ac_fn_c_try_link "$LINENO"; then :
    ++  ac_cv_popcount=yes
    ++else
    ++  ac_cv_popcount=no
    ++fi
    ++rm -f core conftest.err conftest.$ac_objext \
    ++    conftest$ac_exeext conftest.$ac_ext
    ++fi
    ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_popcount" >&5
    ++$as_echo "$ac_cv_popcount" >&6; }
    ++if test "x$ac_cv_popcount" = xyes; then :
    ++
    ++$as_echo "#define HAVE_BUILTIN_POPCOUNT 1" >>confdefs.h
    ++
    ++fi
    ++
    + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5
    + $as_echo_n "checking for __thread support... " >&6; }
    + if test "${ac_cv_tls+set}" = set; then :
    +@@ -3892,7 +4018,11 @@ fi
    + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5
    + $as_echo "$ac_cv_tls" >&6; }
    + if test "x$ac_cv_tls" != xyes; then :
    +-  as_fn_error $? "__thread support required" "$LINENO" 5
    ++  if test "$use_locks" = yes; then :
    ++    as_fn_error "--enable-thread-safety requires __thread support" "$LINENO" 5
    ++  else
    ++    as_echo "#define __thread /* empty: no multi-thread support */" >>confdefs.h
    ++  fi
    + fi
    + 
    + # Check whether --enable-largefile was given.
    +@@ -4878,7 +5008,7 @@ ac_config_files="$ac_config_files versio
    + 
    + # 1.234 -> 1234
    + case "$PACKAGE_VERSION" in
    +-[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;;
    ++[0-9].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
    + *)     	   as_fn_error $? "confused by version number '$PACKAGE_VERSION'" "$LINENO" 5 ;;
    + esac
    + case "$eu_version" in
    +@@ -4907,7 +5037,7 @@ case "$eu_version" in
    + esac
    + 
    + # Round up to the next release API (x.y) version.
    +-eu_version=$[($eu_version + 999) / 1000]
    ++eu_version=`expr \( $eu_version + 999 \) / 1000`
    + 
    + cat >confcache <<\_ACEOF
    + # This file is a shell script that caches the results of configure
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -70,6 +70,54 @@ CFLAGS="$old_CFLAGS"])
    + AS_IF([test "x$ac_cv_c99" != xyes],
    +       AC_MSG_ERROR([gcc with C99 support required]))
    + 
    ++AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
    ++old_CFLAGS="$CFLAGS"
    ++CFLAGS="$CFLAGS -Wextra"
    ++AC_COMPILE_IFELSE([void foo (void) { }],
    ++		  ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
    ++CFLAGS="$old_CFLAGS"])
    ++AC_SUBST(WEXTRA)
    ++AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
    ++
    ++AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl
    ++old_CFLAGS="$CFLAGS"
    ++CFLAGS="$CFLAGS -fgnu89-inline -Werror"
    ++AC_COMPILE_IFELSE([
    ++void foo (void)
    ++{
    ++  inline void bar (void) {}
    ++  bar ();
    ++}
    ++extern inline void baz (void) {}
    ++], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no)
    ++CFLAGS="$old_CFLAGS"])
    ++AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes],
    ++      [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"])
    ++
    ++AC_CACHE_CHECK([for --as-needed linker option],
    ++	       ac_cv_as_needed, [dnl
    ++cat > conftest.c <&AS_MESSAGE_LOG_FD])
    ++then
    ++  ac_cv_as_needed=yes
    ++else
    ++  ac_cv_as_needed=no
    ++fi
    ++rm -f conftest*])
    ++AS_IF([test "x$ac_cv_as_needed" = xyes],
    ++      [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
    ++AC_SUBST(LD_AS_NEEDED)
    ++
    ++AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl
    ++AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])],
    ++	       ac_cv_popcount=yes, ac_cv_popcount=no)])
    ++AS_IF([test "x$ac_cv_popcount" = xyes],
    ++      [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])])
    ++
    + AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
    + # Use the same flags that we use for our DSOs, so the test is representative.
    + # Some old compiler/linker/libc combinations fail some ways and not others.
    +@@ -85,7 +133,10 @@ static __thread int a; int foo (int b) {
    + CFLAGS="$save_CFLAGS"
    + LDFLAGS="$save_LDFLAGS"])
    + AS_IF([test "x$ac_cv_tls" != xyes],
    +-      AC_MSG_ERROR([__thread support required]))
    ++      [AS_IF([test "$use_locks" = yes],
    ++	     [AC_MSG_ERROR([--enable-thread-safety requires __thread support])],
    ++	     [AC_DEFINE([__thread], [/* empty: no multi-thread support */],
    ++			[Stubbed out if missing compiler support.])])])
    + 
    + dnl This test must come as early as possible after the compiler configuration
    + dnl tests, because the choice of the file model can (in principle) affect
    +@@ -248,7 +299,7 @@ AC_SUBST([eu_version])
    + 
    + # 1.234 -> 1234
    + case "$PACKAGE_VERSION" in
    +-[[0-9]].*) eu_version="${PACKAGE_VERSION/./}" ;;
    ++[[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
    + *)     	   AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
    + esac
    + case "$eu_version" in
    +@@ -277,6 +328,6 @@ case "$eu_version" in
    + esac
    + 
    + # Round up to the next release API (x.y) version.
    +-[eu_version=$[($eu_version + 999) / 1000]]
    ++eu_version=`expr \( $eu_version + 999 \) / 1000`
    + 
    + AC_OUTPUT
    +--- a/lib/ChangeLog
    ++++ b/lib/ChangeLog
    +@@ -14,6 +14,9 @@
    + 
    + 2009-01-23  Roland McGrath  
    + 
    ++	* eu-config.h [! HAVE_BUILTIN_POPCOUNT]
    ++	(__builtin_popcount): New inline function.
    ++
    + 	* eu-config.h: Add multiple inclusion protection.
    + 
    + 2009-01-17  Ulrich Drepper  
    +@@ -70,6 +73,11 @@
    + 	* Makefile.am (libeu_a_SOURCES): Add it.
    + 	* system.h: Declare crc32_file.
    + 
    ++2005-02-07  Roland McGrath  
    ++
    ++	* Makefile.am (WEXTRA): New variable, substituted by configure.
    ++	(AM_CFLAGS): Use it in place of -Wextra.
    ++
    + 2005-04-30  Ulrich Drepper  
    + 
    + 	* Makefile.am: Use -ffunction-sections for xmalloc.c.
    +--- a/lib/eu-config.h
    ++++ b/lib/eu-config.h
    +@@ -182,6 +182,17 @@ asm (".section predict_data, \"aw\"; .pr
    + /* This macro is used by the tests conditionalize for standalone building.  */
    + #define ELFUTILS_HEADER(name) 
    + 
    ++#ifndef HAVE_BUILTIN_POPCOUNT
    ++# define __builtin_popcount hakmem_popcount
    ++static inline unsigned int __attribute__ ((unused))
    ++hakmem_popcount (unsigned int x)
    ++{
    ++  /* HAKMEM 169 */
    ++  unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111);
    ++  return ((n + (n >> 3)) & 030707070707) % 63;
    ++}
    ++#endif	/* HAVE_BUILTIN_POPCOUNT */
    ++
    + 
    + #ifdef SHARED
    + # define OLD_VERSION(name, version) \
    +--- a/lib/Makefile.in
    ++++ b/lib/Makefile.in
    +@@ -99,6 +99,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
    + INSTALL_SCRIPT = @INSTALL_SCRIPT@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LDFLAGS = @LDFLAGS@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    + LEX = @LEX@
    + LEXLIB = @LEXLIB@
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    +@@ -128,6 +129,7 @@ SHELL = @SHELL@
    + STRIP = @STRIP@
    + USE_NLS = @USE_NLS@
    + VERSION = @VERSION@
    ++WEXTRA = @WEXTRA@
    + XGETTEXT = @XGETTEXT@
    + XGETTEXT_015 = @XGETTEXT_015@
    + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
    +@@ -190,7 +192,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
    + 	-I$(srcdir)/../libelf
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    + 	$($(*F)_no_Werror),,-Werror) $(if \
    +-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
    ++	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1) -fpic
    + @MUDFLAP_FALSE@libmudflap = 
    +--- a/libasm/ChangeLog
    ++++ b/libasm/ChangeLog
    +@@ -71,6 +71,11 @@
    + 	* asm_error.c: Add new error ASM_E_IOERROR.
    + 	* libasmP.h: Add ASM_E_IOERROR definition.
    + 
    ++2005-05-31  Roland McGrath  
    ++
    ++	* Makefile.am (WEXTRA): New variable, substituted by configure.
    ++	(AM_CFLAGS): Use it in place of -Wextra.
    ++
    + 2005-02-15  Ulrich Drepper  
    + 
    + 	* Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
    +--- a/libasm/Makefile.in
    ++++ b/libasm/Makefile.in
    +@@ -147,6 +147,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
    + INSTALL_SCRIPT = @INSTALL_SCRIPT@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LDFLAGS = @LDFLAGS@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    + LEX = @LEX@
    + LEXLIB = @LEXLIB@
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    +@@ -176,6 +177,7 @@ SHELL = @SHELL@
    + STRIP = @STRIP@
    + USE_NLS = @USE_NLS@
    + VERSION = 1
    ++WEXTRA = @WEXTRA@
    + XGETTEXT = @XGETTEXT@
    + XGETTEXT_015 = @XGETTEXT_015@
    + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
    +@@ -239,7 +241,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
    + 	-I$(top_srcdir)/libdw
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    + 	$($(*F)_no_Werror),,-Werror) $(if \
    +-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
    ++	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1)
    + @MUDFLAP_FALSE@libmudflap = 
    +--- a/libcpu/ChangeLog
    ++++ b/libcpu/ChangeLog
    +@@ -15,6 +15,9 @@
    + 
    + 2009-01-23  Roland McGrath  
    + 
    ++	* i386_disasm.c (i386_disasm): Add abort after assert-constant for old
    ++	compilers that don't realize it's noreturn.
    ++
    + 	* Makefile.am (i386_parse_CFLAGS): Use quotes around command
    + 	substitution that can produce leading whitespace.
    + 
    +@@ -344,6 +347,11 @@
    + 	* defs/i386.doc: New file.
    + 	* defs/x86_64: New file.
    + 
    ++2005-04-04  Roland McGrath  
    ++
    ++	* Makefile.am (WEXTRA): New variable, substituted by configure.
    ++	(AM_CFLAGS): Use it instead of -Wextra.
    ++
    + 2005-02-15  Ulrich Drepper  
    + 
    + 	* Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
    +--- a/libcpu/i386_disasm.c
    ++++ b/libcpu/i386_disasm.c
    +@@ -791,6 +791,7 @@ i386_disasm (const uint8_t **startp, con
    + 
    + 			default:
    + 			  assert (! "INVALID not handled");
    ++			  abort ();
    + 			}
    + 		    }
    + 		  else
    +--- a/libcpu/Makefile.in
    ++++ b/libcpu/Makefile.in
    +@@ -116,6 +116,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
    + INSTALL_SCRIPT = @INSTALL_SCRIPT@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LDFLAGS = @LDFLAGS@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    + LEX = @LEX@
    + LEXLIB = @LEXLIB@
    + LEX_OUTPUT_ROOT = lex.$(
    ++
    ++	* libdw.h: Disable extern inlines for GCC 4.2.
    ++
    + 2009-08-10  Roland McGrath  
    + 
    + 	* dwarf_getscopevar.c: Use dwarf_diename.
    +@@ -1076,6 +1080,11 @@
    + 
    + 2005-05-31  Roland McGrath  
    + 
    ++	* Makefile.am (WEXTRA): New variable, substituted by configure.
    ++	(AM_CFLAGS): Use it in place of -Wextra.
    ++
    ++2005-05-31  Roland McGrath  
    ++
    + 	* dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
    + 	formref offset.
    + 
    +--- a/libdw/libdw.h
    ++++ b/libdw/libdw.h
    +@@ -852,7 +852,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (
    + 
    + 
    + /* Inline optimizations.  */
    +-#ifdef __OPTIMIZE__
    ++#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
    + /* Return attribute code of given attribute.  */
    + __libdw_extern_inline unsigned int
    + dwarf_whatattr (Dwarf_Attribute *attr)
    +--- a/libdw/Makefile.in
    ++++ b/libdw/Makefile.in
    +@@ -192,6 +192,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
    + INSTALL_SCRIPT = @INSTALL_SCRIPT@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LDFLAGS = @LDFLAGS@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    + LEX = @LEX@
    + LEXLIB = @LEXLIB@
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    +@@ -221,6 +222,7 @@ SHELL = @SHELL@
    + STRIP = @STRIP@
    + USE_NLS = @USE_NLS@
    + VERSION = 1
    ++WEXTRA = @WEXTRA@
    + XGETTEXT = @XGETTEXT@
    + XGETTEXT_015 = @XGETTEXT_015@
    + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
    +@@ -283,7 +285,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
    + 	-I$(srcdir)/../libelf
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    + 	$($(*F)_no_Werror),,-Werror) $(if \
    +-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
    ++	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1) $(am__append_2)
    + @MUDFLAP_FALSE@libmudflap = 
    +--- a/libdwfl/ChangeLog
    ++++ b/libdwfl/ChangeLog
    +@@ -1366,6 +1366,11 @@
    + 
    + 2005-07-21  Roland McGrath  
    + 
    ++	* Makefile.am (WEXTRA): New variable, substituted by configure.
    ++	(AM_CFLAGS): Use it in place of -Wextra.
    ++
    ++2005-07-21  Roland McGrath  
    ++
    + 	* Makefile.am (noinst_HEADERS): Add loc2c.c.
    + 
    + 	* test2.c (main): Check sscanf result to quiet warning.
    +--- a/libdwfl/Makefile.in
    ++++ b/libdwfl/Makefile.in
    +@@ -182,6 +182,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
    + INSTALL_SCRIPT = @INSTALL_SCRIPT@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LDFLAGS = @LDFLAGS@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    + LEX = @LEX@
    + LEXLIB = @LEXLIB@
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    +@@ -211,6 +212,7 @@ SHELL = @SHELL@
    + STRIP = @STRIP@
    + USE_NLS = @USE_NLS@
    + VERSION = 1
    ++WEXTRA = @WEXTRA@
    + XGETTEXT = @XGETTEXT@
    + XGETTEXT_015 = @XGETTEXT_015@
    + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
    +@@ -274,7 +276,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
    + 	-I$(srcdir)/../libdw
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    + 	$($(*F)_no_Werror),,-Werror) $(if \
    +-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
    ++	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1)
    + @MUDFLAP_FALSE@libmudflap = 
    +--- a/libebl/ChangeLog
    ++++ b/libebl/ChangeLog
    +@@ -628,6 +628,11 @@
    + 	* Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
    + 	tracking works right.
    + 
    ++2005-05-31  Roland McGrath  
    ++
    ++	* Makefile.am (WEXTRA): New variable, substituted by configure.
    ++	(AM_CFLAGS): Use it in place of -Wextra.
    ++
    + 2005-05-21  Ulrich Drepper  
    + 
    + 	* libebl_x86_64.map: Add x86_64_core_note.
    +--- a/libebl/Makefile.in
    ++++ b/libebl/Makefile.in
    +@@ -143,6 +143,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
    + INSTALL_SCRIPT = @INSTALL_SCRIPT@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LDFLAGS = @LDFLAGS@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    + LEX = @LEX@
    + LEXLIB = @LEXLIB@
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    +@@ -172,6 +173,7 @@ SHELL = @SHELL@
    + STRIP = @STRIP@
    + USE_NLS = @USE_NLS@
    + VERSION = 1
    ++WEXTRA = @WEXTRA@
    + XGETTEXT = @XGETTEXT@
    + XGETTEXT_015 = @XGETTEXT_015@
    + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
    +@@ -235,7 +237,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
    + 	-I$(srcdir)/../libasm
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    + 	$($(*F)_no_Werror),,-Werror) $(if \
    +-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
    ++	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1) -fpic
    + @MUDFLAP_FALSE@libmudflap = 
    +--- a/libelf/ChangeLog
    ++++ b/libelf/ChangeLog
    +@@ -671,6 +671,11 @@
    + 
    + 	* elf.h: Update from glibc.
    + 
    ++2005-05-31  Roland McGrath  
    ++
    ++	* Makefile.am (WEXTRA): New variable, substituted by configure.
    ++	(AM_CFLAGS): Use it in place of -Wextra.
    ++
    + 2005-05-08  Roland McGrath  
    + 
    + 	* elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
    +--- a/libelf/common.h
    ++++ b/libelf/common.h
    +@@ -160,7 +160,7 @@ libelf_release_all (Elf *elf)
    +   (Var) = (sizeof (Var) == 1						      \
    + 	   ? (unsigned char) (Var)					      \
    + 	   : (sizeof (Var) == 2						      \
    +-	      ? bswap_16 (Var)						      \
    ++	      ? (unsigned short int) bswap_16 (Var)			      \
    + 	      : (sizeof (Var) == 4					      \
    + 		 ? bswap_32 (Var)					      \
    + 		 : bswap_64 (Var))))
    +@@ -169,7 +169,7 @@ libelf_release_all (Elf *elf)
    +   (Dst) = (sizeof (Var) == 1						      \
    + 	   ? (unsigned char) (Var)					      \
    + 	   : (sizeof (Var) == 2						      \
    +-	      ? bswap_16 (Var)						      \
    ++	      ? (unsigned short int) bswap_16 (Var)			      \
    + 	      : (sizeof (Var) == 4					      \
    + 		 ? bswap_32 (Var)					      \
    + 		 : bswap_64 (Var))))
    +--- a/libelf/Makefile.in
    ++++ b/libelf/Makefile.in
    +@@ -189,6 +189,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
    + INSTALL_SCRIPT = @INSTALL_SCRIPT@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LDFLAGS = @LDFLAGS@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    + LEX = @LEX@
    + LEXLIB = @LEXLIB@
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    +@@ -218,6 +219,7 @@ SHELL = @SHELL@
    + STRIP = @STRIP@
    + USE_NLS = @USE_NLS@
    + VERSION = 1
    ++WEXTRA = @WEXTRA@
    + XGETTEXT = @XGETTEXT@
    + XGETTEXT_015 = @XGETTEXT_015@
    + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
    +@@ -279,7 +281,7 @@ zip_LIBS = @zip_LIBS@
    + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    + 	$($(*F)_no_Werror),,-Werror) $(if \
    +-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
    ++	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1) $(am__append_2)
    + @MUDFLAP_FALSE@libmudflap = 
    +--- a/m4/Makefile.in
    ++++ b/m4/Makefile.in
    +@@ -75,6 +75,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
    + INSTALL_SCRIPT = @INSTALL_SCRIPT@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LDFLAGS = @LDFLAGS@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    + LEX = @LEX@
    + LEXLIB = @LEXLIB@
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    +@@ -104,6 +105,7 @@ SHELL = @SHELL@
    + STRIP = @STRIP@
    + USE_NLS = @USE_NLS@
    + VERSION = @VERSION@
    ++WEXTRA = @WEXTRA@
    + XGETTEXT = @XGETTEXT@
    + XGETTEXT_015 = @XGETTEXT_015@
    + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -155,6 +155,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
    + INSTALL_SCRIPT = @INSTALL_SCRIPT@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LDFLAGS = @LDFLAGS@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    + LEX = @LEX@
    + LEXLIB = @LEXLIB@
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    +@@ -184,6 +185,7 @@ SHELL = @SHELL@
    + STRIP = @STRIP@
    + USE_NLS = @USE_NLS@
    + VERSION = @VERSION@
    ++WEXTRA = @WEXTRA@
    + XGETTEXT = @XGETTEXT@
    + XGETTEXT_015 = @XGETTEXT_015@
    + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
    +--- a/src/addr2line.c
    ++++ b/src/addr2line.c
    +@@ -455,10 +455,10 @@ handle_address (const char *string, Dwfl
    +       bool parsed = false;
    +       int i, j;
    +       char *name = NULL;
    +-      if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
    ++      if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
    + 	  && string[i] == '\0')
    + 	parsed = adjust_to_section (name, &addr, dwfl);
    +-      switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
    ++      switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
    + 	{
    + 	default:
    + 	  break;
    +--- a/src/ChangeLog
    ++++ b/src/ChangeLog
    +@@ -260,8 +260,16 @@
    + 	* readelf.c (attr_callback): Use print_block only when we don't use
    + 	print_ops.
    + 
    ++2009-08-17  Roland McGrath  
    ++
    ++	* ld.h: Disable extern inlines for GCC 4.2.
    ++
    + 2009-08-14  Roland McGrath  
    + 
    ++	* strings.c (read_block): Conditionalize posix_fadvise use
    ++	on [POSIX_FADV_SEQUENTIAL].
    ++	From Petr Salinger .
    ++
    + 	* ar.c (do_oper_extract): Use pathconf instead of statfs.
    + 
    + 2009-08-01  Ulrich Drepper  
    +@@ -425,6 +433,8 @@
    + 	* readelf.c (print_debug_frame_section): Use t instead of j formats
    + 	for ptrdiff_t OFFSET.
    + 
    ++	* addr2line.c (handle_address): Use %a instead of %m for compatibility.
    ++
    + 2009-01-21  Ulrich Drepper  
    + 
    + 	* elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
    +@@ -608,6 +618,11 @@
    + 	that matches its PT_LOAD's p_flags &~ PF_W.  On sparc, PF_X really
    + 	is valid in RELRO.
    + 
    ++2008-03-01  Roland McGrath  
    ++
    ++	* readelf.c (dump_archive_index): Tweak portability hack
    ++	to match [__GNUC__ < 4] too.
    ++
    + 2008-02-29  Roland McGrath  
    + 
    + 	* readelf.c (print_attributes): Add a cast.
    +@@ -859,6 +874,8 @@
    + 
    + 	* readelf.c (hex_dump): Fix rounding error in whitespace calculation.
    + 
    ++	* Makefile.am (readelf_no_Werror): New variable.
    ++
    + 2007-10-15  Roland McGrath  
    + 
    + 	* make-debug-archive.in: New file.
    +@@ -1298,6 +1315,10 @@
    + 	* elflint.c (valid_e_machine): Add EM_ALPHA.
    + 	Reported by Christian Aichinger .
    + 
    ++	* strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
    ++	MADV_SEQUENTIAL if undefined.  	Don't call posix_madvise
    ++	if neither is defined.
    ++
    + 2006-08-08  Ulrich Drepper  
    + 
    + 	* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
    +@@ -1374,6 +1395,10 @@
    + 	* Makefile.am: Add hacks to create dependency files for non-generic
    + 	linker.
    + 
    ++2006-04-05  Roland McGrath  
    ++
    ++	* strings.c (MAP_POPULATE): Define to 0 if undefined.
    ++
    + 2006-06-12  Ulrich Drepper  
    + 
    + 	* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
    +@@ -1722,6 +1747,11 @@
    + 	* readelf.c (print_debug_loc_section): Fix indentation for larger
    + 	address size.
    + 
    ++2005-05-31  Roland McGrath  
    ++
    ++	* Makefile.am (WEXTRA): New variable, substituted by configure.
    ++	(AM_CFLAGS): Use it in place of -Wextra.
    ++
    + 2005-05-30  Roland McGrath  
    + 
    + 	* readelf.c (print_debug_line_section): Print section offset of each
    +--- a/src/findtextrel.c
    ++++ b/src/findtextrel.c
    +@@ -504,7 +504,11 @@ ptrcompare (const void *p1, const void *
    + 
    + 
    + static void
    +-check_rel (size_t nsegments, struct segments segments[nsegments],
    ++check_rel (size_t nsegments, struct segments segments[
    ++#if __GNUC__ >= 4
    ++						      nsegments
    ++#endif
    ++	   ],
    + 	   GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
    + 	   const char *fname, bool more_than_one, void **knownsrcs)
    + {
    +--- a/src/ld.h
    ++++ b/src/ld.h
    +@@ -1122,6 +1122,7 @@ extern bool dynamically_linked_p (void);
    + 
    + /* Checked whether the symbol is undefined and referenced from a DSO.  */
    + extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx);
    ++#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
    + #ifdef __GNUC_STDC_INLINE__
    + __attribute__ ((__gnu_inline__))
    + #endif
    +@@ -1139,5 +1140,6 @@ linked_from_dso_p (struct scninfo *scnin
    + 
    +   return sym->defined && sym->in_dso;
    + }
    ++#endif	/* Optimizing and not GCC 4.2.  */
    + 
    + #endif	/* ld.h */
    +--- a/src/Makefile.am
    ++++ b/src/Makefile.am
    +@@ -99,6 +99,9 @@ addr2line_no_Wformat = yes
    + # XXX While the file is not finished, don't warn about this
    + ldgeneric_no_Wunused = yes
    + 
    ++# Buggy old compilers.
    ++readelf_no_Werror = yes
    ++
    + readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
    + nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
    + size_LDADD = $(libelf) $(libeu) $(libmudflap)
    +--- a/src/Makefile.in
    ++++ b/src/Makefile.in
    +@@ -228,6 +228,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
    + INSTALL_SCRIPT = @INSTALL_SCRIPT@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LDFLAGS = @LDFLAGS@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    + LEX = @LEX@
    + LEXLIB = @LEXLIB@
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    +@@ -257,6 +258,7 @@ SHELL = @SHELL@
    + STRIP = @STRIP@
    + USE_NLS = @USE_NLS@
    + VERSION = @VERSION@
    ++WEXTRA = @WEXTRA@
    + XGETTEXT = @XGETTEXT@
    + XGETTEXT_015 = @XGETTEXT_015@
    + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
    +@@ -321,7 +323,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
    + 	-I$(srcdir)/../libasm
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    + 	$($(*F)_no_Werror),,-Werror) $(if \
    +-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
    ++	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1)
    + @MUDFLAP_FALSE@libmudflap = 
    +@@ -368,6 +370,9 @@ strings_no_Wformat = yes
    + addr2line_no_Wformat = yes
    + # XXX While the file is not finished, don't warn about this
    + ldgeneric_no_Wunused = yes
    ++
    ++# Buggy old compilers.
    ++readelf_no_Werror = yes
    + readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
    + nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
    + size_LDADD = $(libelf) $(libeu) $(libmudflap)
    +--- a/src/readelf.c
    ++++ b/src/readelf.c
    +@@ -4274,10 +4274,11 @@ struct listptr
    + #define listptr_offset_size(p)	((p)->dwarf64 ? 8 : 4)
    + #define listptr_address_size(p)	((p)->addr64 ? 8 : 4)
    + 
    ++static const char *listptr_name;
    + static int
    +-compare_listptr (const void *a, const void *b, void *arg)
    ++compare_listptr (const void *a, const void *b)
    + {
    +-  const char *name = arg;
    ++  const char *const name = listptr_name;
    +   struct listptr *p1 = (void *) a;
    +   struct listptr *p2 = (void *) b;
    + 
    +@@ -4357,8 +4358,11 @@ static void
    + sort_listptr (struct listptr_table *table, const char *name)
    + {
    +   if (table->n > 0)
    +-    qsort_r (table->table, table->n, sizeof table->table[0],
    +-	     &compare_listptr, (void *) name);
    ++    {
    ++      listptr_name = name;
    ++      qsort (table->table, table->n, sizeof table->table[0],
    ++	     &compare_listptr);
    ++    }
    + }
    + 
    + static bool
    +@@ -8098,7 +8102,7 @@ dump_archive_index (Elf *elf, const char
    + 	  if (unlikely (elf_rand (elf, as_off) == 0)
    + 	      || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
    + 			   == NULL))
    +-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
    ++#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4
    + 	    while (1)
    + #endif
    + 	      error (EXIT_FAILURE, 0,
    +--- a/src/strings.c
    ++++ b/src/strings.c
    +@@ -51,6 +51,10 @@
    + 
    + #include 
    + 
    ++#ifndef MAP_POPULATE
    ++# define MAP_POPULATE 0
    ++#endif
    ++
    + 
    + /* Prototypes of local functions.  */
    + static int read_fd (int fd, const char *fname, off64_t fdlen);
    +@@ -491,8 +495,13 @@ map_file (int fd, off64_t start_off, off
    + 		    fd, start_off);
    +       if (mem != MAP_FAILED)
    + 	{
    ++#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
    ++# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
    ++#endif
    ++#ifdef POSIX_MADV_SEQUENTIAL
    + 	  /* We will go through the mapping sequentially.  */
    + 	  (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
    ++#endif
    + 	  break;
    + 	}
    +       if (errno != EINVAL && errno != ENOMEM)
    +@@ -584,9 +593,11 @@ read_block (int fd, const char *fname, o
    +       elfmap_off = from & ~(ps - 1);
    +       elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
    + 
    ++#ifdef POSIX_FADV_SEQUENTIAL
    +       if (unlikely (elfmap == MAP_FAILED))
    + 	/* Let the kernel know we are going to read everything in sequence.  */
    + 	(void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
    ++#endif
    +     }
    + 
    +   if (unlikely (elfmap == MAP_FAILED))
    +--- a/src/strip.c
    ++++ b/src/strip.c
    +@@ -53,6 +53,12 @@
    + #include 
    + #include 
    + 
    ++#ifdef HAVE_FUTIMES
    ++# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
    ++#else
    ++# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
    ++#endif
    ++
    + 
    + /* Name and version of program.  */
    + static void print_version (FILE *stream, struct argp_state *state);
    +@@ -311,8 +317,18 @@ process_file (const char *fname)
    + 
    +       /* If we have to preserve the timestamp, we need it in the
    + 	 format utimes() understands.  */
    ++#ifdef HAVE_STRUCT_STAT_ST_ATIM
    +       TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
    ++#else
    ++      tv[0].tv_sec = pre_st.st_atime;
    ++      tv[0].tv_usec = 0;
    ++#endif
    ++#ifdef HAVE_STRUCT_STAT_ST_MTIM
    +       TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
    ++#else
    ++      tv[1].tv_sec = pre_st.st_atime;
    ++      tv[1].tv_usec = 0;
    ++#endif
    +     }
    + 
    +   /* Open the file.  */
    +@@ -1809,7 +1825,7 @@ while computing checksum for debug infor
    +   /* If requested, preserve the timestamp.  */
    +   if (tvp != NULL)
    +     {
    +-      if (futimes (fd, tvp) != 0)
    ++      if (FUTIMES (fd, output_fname, tvp) != 0)
    + 	{
    + 	  error (0, errno, gettext ("\
    + cannot set access and modification date of '%s'"),
    +@@ -1866,7 +1882,7 @@ handle_ar (int fd, Elf *elf, const char
    + 
    +   if (tvp != NULL)
    +     {
    +-      if (unlikely (futimes (fd, tvp) != 0))
    ++      if (unlikely (FUTIMES (fd, fname, tvp) != 0))
    + 	{
    + 	  error (0, errno, gettext ("\
    + cannot set access and modification date of '%s'"), fname);
    +--- a/tests/ChangeLog
    ++++ b/tests/ChangeLog
    +@@ -205,6 +205,8 @@
    + 
    + 2008-01-21  Roland McGrath  
    + 
    ++	* line2addr.c (main): Revert last change.
    ++
    + 	* testfile45.S.bz2: Add tests for cltq, cqto.
    + 	* testfile45.expect.bz2: Adjust.
    + 
    +@@ -913,6 +915,11 @@
    + 	* Makefile.am (TESTS): Add run-elflint-test.sh.
    + 	(EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
    + 
    ++2005-05-31  Roland McGrath  
    ++
    ++	* Makefile.am (WEXTRA): New variable, substituted by configure.
    ++	(AM_CFLAGS): Use it in place of -Wextra.
    ++
    + 2005-05-24  Ulrich Drepper  
    + 
    + 	* get-files.c (main): Use correct format specifier.
    +--- a/tests/line2addr.c
    ++++ b/tests/line2addr.c
    +@@ -132,7 +132,7 @@ main (int argc, char *argv[])
    +     {
    +       struct args a = { .arg = argv[cnt] };
    + 
    +-      switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
    ++      switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
    + 	{
    + 	default:
    + 	case 0:
    +--- a/tests/Makefile.in
    ++++ b/tests/Makefile.in
    +@@ -372,6 +372,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
    + INSTALL_SCRIPT = @INSTALL_SCRIPT@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LDFLAGS = @LDFLAGS@
    ++LD_AS_NEEDED = @LD_AS_NEEDED@
    + LEX = @LEX@
    + LEXLIB = @LEXLIB@
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    +@@ -401,6 +402,7 @@ SHELL = @SHELL@
    + STRIP = @STRIP@
    + USE_NLS = @USE_NLS@
    + VERSION = @VERSION@
    ++WEXTRA = @WEXTRA@
    + XGETTEXT = @XGETTEXT@
    + XGETTEXT_015 = @XGETTEXT_015@
    + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
    +@@ -462,7 +464,7 @@ zip_LIBS = @zip_LIBS@
    + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2)
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    + 	$($(*F)_no_Werror),,-Werror) $(if \
    +-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
    ++	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1)
    + @MUDFLAP_FALSE@libmudflap = 
    diff --git a/libs/elfutils/patches/002-no_tests.patch b/libs/elfutils/patches/002-no_tests.patch
    new file mode 100644
    index 0000000..2c7a02a
    --- /dev/null
    +++ b/libs/elfutils/patches/002-no_tests.patch
    @@ -0,0 +1,22 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -31,7 +31,7 @@ pkginclude_HEADERS = version.h
    + 
    + # Add doc back when we have some real content.
    + SUBDIRS = config m4 lib libelf libebl libdwfl libdw libcpu libasm backends \
    +-	  src po tests
    ++	  src po
    + 
    + EXTRA_DIST = elfutils.spec GPG-KEY NOTES EXCEPTION
    + 
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -249,7 +249,7 @@ pkginclude_HEADERS = version.h
    + 
    + # Add doc back when we have some real content.
    + SUBDIRS = config m4 lib libelf libebl libdwfl libdw libcpu libasm backends \
    +-	  src po tests
    ++	  src po
    + 
    + EXTRA_DIST = elfutils.spec GPG-KEY NOTES EXCEPTION
    + 
    diff --git a/libs/elfutils/patches/003-no_warnings_as_errors.patch b/libs/elfutils/patches/003-no_warnings_as_errors.patch
    new file mode 100644
    index 0000000..b56a2dd
    --- /dev/null
    +++ b/libs/elfutils/patches/003-no_warnings_as_errors.patch
    @@ -0,0 +1,99 @@
    +--- a/src/Makefile.in
    ++++ b/src/Makefile.in
    +@@ -322,7 +322,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
    + 	-I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \
    + 	-I$(srcdir)/../libasm
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    +-	$($(*F)_no_Werror),,-Werror) $(if \
    ++	$($(*F)_no_Werror),,) $(if \
    + 	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1)
    +--- a/libelf/Makefile.in
    ++++ b/libelf/Makefile.in
    +@@ -280,7 +280,7 @@ top_srcdir = @top_srcdir@
    + zip_LIBS = @zip_LIBS@
    + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    +-	$($(*F)_no_Werror),,-Werror) $(if \
    ++	$($(*F)_no_Werror),,) $(if \
    + 	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1) $(am__append_2)
    +--- a/lib/Makefile.in
    ++++ b/lib/Makefile.in
    +@@ -191,7 +191,7 @@ zip_LIBS = @zip_LIBS@
    + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
    + 	-I$(srcdir)/../libelf
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    +-	$($(*F)_no_Werror),,-Werror) $(if \
    ++	$($(*F)_no_Werror),,) $(if \
    + 	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1) -fpic
    +--- a/libasm/Makefile.in
    ++++ b/libasm/Makefile.in
    +@@ -240,7 +240,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
    + 	-I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
    + 	-I$(top_srcdir)/libdw
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    +-	$($(*F)_no_Werror),,-Werror) $(if \
    ++	$($(*F)_no_Werror),,) $(if \
    + 	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1)
    +--- a/libcpu/Makefile.in
    ++++ b/libcpu/Makefile.in
    +@@ -209,7 +209,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
    + 	-I$(srcdir)/../libelf -I$(srcdir)/../libebl \
    + 	-I$(srcdir)/../libdw -I$(srcdir)/../libasm
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    +-	$($(*F)_no_Werror),,-Werror) $(if \
    ++	$($(*F)_no_Werror),,) $(if \
    + 	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1) -fpic -fdollars-in-identifiers
    +--- a/libdw/Makefile.in
    ++++ b/libdw/Makefile.in
    +@@ -284,7 +284,7 @@ zip_LIBS = @zip_LIBS@
    + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
    + 	-I$(srcdir)/../libelf
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    +-	$($(*F)_no_Werror),,-Werror) $(if \
    ++	$($(*F)_no_Werror),,) $(if \
    + 	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1) $(am__append_2)
    +--- a/libdwfl/Makefile.in
    ++++ b/libdwfl/Makefile.in
    +@@ -275,7 +275,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
    + 	-I$(srcdir)/../libelf -I$(srcdir)/../libebl \
    + 	-I$(srcdir)/../libdw
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    +-	$($(*F)_no_Werror),,-Werror) $(if \
    ++	$($(*F)_no_Werror),,) $(if \
    + 	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1)
    +--- a/libebl/Makefile.in
    ++++ b/libebl/Makefile.in
    +@@ -236,7 +236,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi
    + 	-I$(srcdir)/../libelf -I$(srcdir)/../libdw \
    + 	-I$(srcdir)/../libasm
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    +-	$($(*F)_no_Werror),,-Werror) $(if \
    ++	$($(*F)_no_Werror),,) $(if \
    + 	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1) -fpic
    +--- a/tests/Makefile.in
    ++++ b/tests/Makefile.in
    +@@ -463,7 +463,7 @@ top_srcdir = @top_srcdir@
    + zip_LIBS = @zip_LIBS@
    + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2)
    + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
    +-	$($(*F)_no_Werror),,-Werror) $(if \
    ++	$($(*F)_no_Werror),,) $(if \
    + 	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
    + 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
    + 	$(am__append_1)
    diff --git a/libs/elfutils/patches/004-memcpy_def.patch b/libs/elfutils/patches/004-memcpy_def.patch
    new file mode 100644
    index 0000000..77a037d
    --- /dev/null
    +++ b/libs/elfutils/patches/004-memcpy_def.patch
    @@ -0,0 +1,14 @@
    +--- a/libelf/libelf.h
    ++++ b/libelf/libelf.h
    +@@ -55,6 +55,11 @@
    + /* Get the ELF types.  */
    + #include 
    + 
    ++#ifndef _LIBC
    ++#ifndef __mempcpy
    ++#define __mempcpy mempcpy
    ++#endif
    ++#endif
    + 
    + /* Known translation types.  */
    + typedef enum
    diff --git a/libs/elfutils/patches/005-only_libdw_libelf.patch b/libs/elfutils/patches/005-only_libdw_libelf.patch
    new file mode 100644
    index 0000000..93d1dbe
    --- /dev/null
    +++ b/libs/elfutils/patches/005-only_libdw_libelf.patch
    @@ -0,0 +1,27 @@
    +diff -urN elfutils-0.152/Makefile.am elfutils-0.152.new/Makefile.am
    +--- elfutils-0.152/Makefile.am	2011-07-06 20:22:31.111366384 +0200
    ++++ elfutils-0.152.new/Makefile.am	2011-07-06 20:32:46.081366237 +0200
    +@@ -30,8 +30,8 @@
    + pkginclude_HEADERS = version.h
    + 
    + # Add doc back when we have some real content.
    +-SUBDIRS = config m4 lib libelf libebl libdwfl libdw libcpu libasm backends \
    +-	  src po
    ++SUBDIRS = config m4 lib libelf libebl libdwfl libdw
    ++
    + 
    + EXTRA_DIST = elfutils.spec GPG-KEY NOTES EXCEPTION
    + 
    +diff -urN elfutils-0.152/Makefile.in elfutils-0.152.new/Makefile.in
    +--- elfutils-0.152/Makefile.in	2011-07-06 20:22:31.111366384 +0200
    ++++ elfutils-0.152.new/Makefile.in	2011-07-06 20:32:54.211366235 +0200
    +@@ -248,8 +248,7 @@
    + pkginclude_HEADERS = version.h
    + 
    + # Add doc back when we have some real content.
    +-SUBDIRS = config m4 lib libelf libebl libdwfl libdw libcpu libasm backends \
    +-	  src po
    ++SUBDIRS = config m4 lib libelf libebl libdwfl libdw
    + 
    + EXTRA_DIST = elfutils.spec GPG-KEY NOTES EXCEPTION
    + 
    diff --git a/libs/elfutils/patches/006-libdw_LIBS.patch b/libs/elfutils/patches/006-libdw_LIBS.patch
    new file mode 100644
    index 0000000..1cca414
    --- /dev/null
    +++ b/libs/elfutils/patches/006-libdw_LIBS.patch
    @@ -0,0 +1,24 @@
    +diff -urN elfutils-0.152/libdw//Makefile.am elfutils-0.152.new/libdw/Makefile.am
    +--- elfutils-0.152/libdw//Makefile.am	2010-09-10 15:18:31.000000000 +0200
    ++++ elfutils-0.152.new/libdw/Makefile.am	2011-07-07 09:47:25.041354790 +0200
    +@@ -108,7 +108,7 @@
    + 		-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
    + 		-Wl,--version-script,$<,--no-undefined \
    + 		-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
    +-		-ldl $(zip_LIBS)
    ++		-ldl $(zip_LIBS) $(LIBS)
    + 	if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
    + 	ln -fs $@ $@.$(VERSION)
    + 
    +diff -urN elfutils-0.152/libdw//Makefile.in elfutils-0.152.new/libdw/Makefile.in
    +--- elfutils-0.152/libdw//Makefile.in	2011-07-06 20:22:31.161366385 +0200
    ++++ elfutils-0.152.new/libdw/Makefile.in	2011-07-07 09:47:16.631354792 +0200
    +@@ -839,7 +839,7 @@
    + @MUDFLAP_FALSE@		-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
    + @MUDFLAP_FALSE@		-Wl,--version-script,$<,--no-undefined \
    + @MUDFLAP_FALSE@		-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
    +-@MUDFLAP_FALSE@		-ldl $(zip_LIBS)
    ++@MUDFLAP_FALSE@		-ldl $(zip_LIBS) $(LIBS)
    + @MUDFLAP_FALSE@	if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
    + @MUDFLAP_FALSE@	ln -fs $@ $@.$(VERSION)
    + 
    diff --git a/libs/eventlog/Makefile b/libs/eventlog/Makefile
    new file mode 100644
    index 0000000..c2bc99b
    --- /dev/null
    +++ b/libs/eventlog/Makefile
    @@ -0,0 +1,49 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=eventlog
    +PKG_VERSION:=0.2.9
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE_URL:=http://www.balabit.com/downloads/files/eventlog/0.2/
    +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
    +PKG_MD5SUM:=76e3d7a0b8f335c12099e9b91191fbf1
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libeventlog
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=A new API to format and send structured log messages.
    +endef
    +
    +define Package/eventlog/description
    +  A new API to format and send structured log messages. It supports multiple message
    +  representations (plain, XML attributes and XML tags) and multiple output methods
    +  (local syslogd).
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/eventlog $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/eventlog.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libeventlog/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libeventlog))
    diff --git a/libs/expat/Makefile b/libs/expat/Makefile
    new file mode 100644
    index 0000000..3a8bd35
    --- /dev/null
    +++ b/libs/expat/Makefile
    @@ -0,0 +1,66 @@
    +# 
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=expat
    +PKG_VERSION:=2.0.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_MD5SUM:=ee8b492592568805593f81f8cdf2a04c
    +PKG_SOURCE_URL:=@SF/expat
    +
    +PKG_FIXUP:=libtool
    +PKG_REMOVE_FILES:=conftools/libtool.m4
    +
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/host-build.mk
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libexpat
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=An XML parsing library
    +  URL:=http://expat.sourceforge.net/
    +endef
    +
    +define Package/libexpat/description
    + A fast, non-validating, stream-oriented XML parsing library.
    +endef
    +
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static
    +
    +define Build/Compile
    +	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
    +endef
    +
    +define Host/Install
    +	$(MAKE) -C $(HOST_BUILD_DIR) install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/expat{,_external}.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libexpat/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call HostBuild))
    +$(eval $(call BuildPackage,libexpat))
    +
    diff --git a/libs/ezxml/Makefile b/libs/ezxml/Makefile
    new file mode 100644
    index 0000000..8333a6d
    --- /dev/null
    +++ b/libs/ezxml/Makefile
    @@ -0,0 +1,53 @@
    +# 
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ezxml
    +PKG_VERSION:=0.8.6
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/ezxml
    +PKG_MD5SUM:=e22ae17a0bd82dfa2a66f9876f1a8fd7
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/ezxml/Default
    +  TITLE:=ezXML
    +  URL:=http://ezxml.sourceforge.net/
    +endef
    +
    +define Package/libezxml
    +  $(call Package/ezxml/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= (library)
    +endef
    +
    +define Package/libezxml/description
    +	ezXML is a fast and lightweight C library for parsing XML documents.
    +endef
    +
    +TAR_CMD:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components 1 $(TAR_OPTIONS)
    +
    +TARGET_CFLAGS += $(FPIC) -D_GNU_SOURCE
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/ezxml.h $(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libezxml.{a,so} $(1)/usr/lib/
    +endef
    +
    +define Package/libezxml/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libezxml.so $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libezxml))
    diff --git a/libs/ezxml/patches/100-cross_compile.patch b/libs/ezxml/patches/100-cross_compile.patch
    new file mode 100644
    index 0000000..dd3ef3d
    --- /dev/null
    +++ b/libs/ezxml/patches/100-cross_compile.patch
    @@ -0,0 +1,16 @@
    +--- a/GNUmakefile
    ++++ b/GNUmakefile
    +@@ -21,10 +21,10 @@
    + # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    + # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    + 
    +-CC = gcc
    +-AR = ar
    ++#CC = gcc
    ++#AR = ar
    + RM = rm -f
    +-CFLAGS = -Wall -O2
    ++#CFLAGS = -Wall -O2
    + DEBUG_CFLAGS = -O0 -g
    + OBJS = ezxml.o
    + LIB = libezxml.a
    diff --git a/libs/ezxml/patches/101-build_shared.patch b/libs/ezxml/patches/101-build_shared.patch
    new file mode 100644
    index 0000000..e3124f0
    --- /dev/null
    +++ b/libs/ezxml/patches/101-build_shared.patch
    @@ -0,0 +1,26 @@
    +--- a/GNUmakefile
    ++++ b/GNUmakefile
    +@@ -28,6 +28,7 @@ RM = rm -f
    + DEBUG_CFLAGS = -O0 -g
    + OBJS = ezxml.o
    + LIB = libezxml.a
    ++DYN = libezxml.so
    + TEST = ezxmltest
    + ifdef NOMMAP
    + CFLAGS += -D EZXML_NOMMAP
    +@@ -36,11 +37,14 @@ ifdef DEBUG
    + CFLAGS += $(DEBUG_CFLAGS)
    + endif
    + 
    +-all: $(LIB)
    ++all: $(LIB) $(DYN)
    + 
    + $(LIB): $(OBJS)
    + 	$(AR) rcs $(LIB) $(OBJS)
    + 
    ++$(DYN): $(OBJS)
    ++	$(CC) -shared -o $(DYN) $(OBJS)
    ++
    + nommap: CFLAGS += -D EZXML_NOMMAP
    + nommap: all
    + 
    diff --git a/libs/ezxml/patches/200-ezxml_parse_str.patch b/libs/ezxml/patches/200-ezxml_parse_str.patch
    new file mode 100644
    index 0000000..dd65def
    --- /dev/null
    +++ b/libs/ezxml/patches/200-ezxml_parse_str.patch
    @@ -0,0 +1,36 @@
    +--- a/ezxml.c
    ++++ b/ezxml.c
    +@@ -599,6 +599,19 @@ ezxml_t ezxml_parse_str(char *s, size_t
    +     else return ezxml_err(root, d, "unclosed tag <%s>", root->cur->name);
    + }
    + 
    ++// parse the given xml string and return an ezxml structure
    ++ezxml_t ezxml_parse_str_d(char const *_s, size_t len)
    ++{
    ++    ezxml_root_t root;
    ++    char *s;
    ++
    ++    if (! (s = strndup(_s, len))) return NULL;
    ++
    ++    root = (ezxml_root_t)ezxml_parse_str(s, strlen(s));
    ++    root->len = -1; // so we know to free s in ezxml_free()
    ++    return &root->xml;
    ++}
    ++
    + // Wrapper for ezxml_parse_str() that accepts a file stream. Reads the entire
    + // stream into memory and then parses it. For xml files, use ezxml_parse_file()
    + // or ezxml_parse_fd()
    +--- a/ezxml.h
    ++++ b/ezxml.h
    +@@ -59,6 +59,11 @@ struct ezxml {
    + // pass in the copy. Returns NULL on failure.
    + ezxml_t ezxml_parse_str(char *s, size_t len);
    + 
    ++// Given a string of xml data and its length, parses it and creates an ezxml
    ++// structure. that strdup()s s
    ++// Returns NULL on failure.
    ++ezxml_t ezxml_parse_str_d(char const *s, size_t len);
    ++
    + // A wrapper for ezxml_parse_str() that accepts a file descriptor. First
    + // attempts to mem map the file. Failing that, reads the file into memory.
    + // Returns NULL on failure.
    diff --git a/libs/ezxml/patches/201-ezxml_int.patch b/libs/ezxml/patches/201-ezxml_int.patch
    new file mode 100644
    index 0000000..1616bd5
    --- /dev/null
    +++ b/libs/ezxml/patches/201-ezxml_int.patch
    @@ -0,0 +1,123 @@
    +--- a/ezxml.c
    ++++ b/ezxml.c
    +@@ -25,6 +25,7 @@
    + #include 
    + #include 
    + #include 
    ++#include 
    + #include 
    + #include 
    + #include 
    +@@ -72,6 +73,19 @@ ezxml_t ezxml_idx(ezxml_t xml, int idx)
    +     return xml;
    + }
    + 
    ++int ezxml_int(ezxml_t xml, int default_value)
    ++{
    ++	int ret;
    ++	
    ++	if(!xml)
    ++		return default_value;
    ++		
    ++	errno = 0;
    ++	ret = strtol(xml->txt, NULL, 10);
    ++
    ++	return (errno == 0 ? ret : default_value);
    ++}
    ++
    + // returns the value of the requested tag attribute or NULL if not found
    + const char *ezxml_attr(ezxml_t xml, const char *attr)
    + {
    +@@ -89,6 +103,23 @@ const char *ezxml_attr(ezxml_t xml, cons
    +     return (root->attr[i][j]) ? root->attr[i][j + 1] : NULL; // found default
    + }
    + 
    ++int ezxml_attr_int(ezxml_t xml, const char *attr, int default_value)
    ++{
    ++	int ret;
    ++	const char *val = NULL;
    ++	
    ++	if(!xml)
    ++		return default_value;
    ++		
    ++	if((val = ezxml_attr(xml, attr)) == NULL)
    ++		return default_value;
    ++	
    ++	errno = 0;
    ++	ret = strtol(val, NULL, 10);
    ++
    ++	return (errno == 0 ? ret : default_value);
    ++}
    ++
    + // same as ezxml_get but takes an already initialized va_list
    + ezxml_t ezxml_vget(ezxml_t xml, va_list ap)
    + {
    +@@ -926,6 +957,16 @@ ezxml_t ezxml_set_txt(ezxml_t xml, const
    +     return xml;
    + }
    + 
    ++ezxml_t ezxml_set_int(ezxml_t xml, int data)
    ++{
    ++	char *buf = NULL;
    ++	if (! xml) return NULL;
    ++	
    ++	asprintf(&buf, "%d", data);
    ++	
    ++	return ezxml_set_flag(ezxml_set_txt(xml, buf), EZXML_TXTM);
    ++}
    ++
    + // Sets the given tag attribute or adds a new attribute if not found. A value
    + // of NULL will remove the specified attribute. Returns the tag given.
    + ezxml_t ezxml_set_attr(ezxml_t xml, const char *name, const char *value)
    +@@ -968,6 +1009,15 @@ ezxml_t ezxml_set_attr(ezxml_t xml, cons
    +     return xml;
    + }
    + 
    ++ezxml_t ezxml_set_attr_int(ezxml_t xml, const char *name, int data)
    ++{
    ++	char *buf = NULL;
    ++	if (! xml) return NULL;
    ++	
    ++	asprintf(&buf, "%d", data);
    ++	return ezxml_set_attr(ezxml_set_flag(xml, EZXML_DUP), name, buf);
    ++}
    ++
    + // sets a flag for the given tag and returns the tag
    + ezxml_t ezxml_set_flag(ezxml_t xml, short flag)
    + {
    +--- a/ezxml.h
    ++++ b/ezxml.h
    +@@ -95,9 +95,13 @@ ezxml_t ezxml_idx(ezxml_t xml, int idx);
    + // returns the given tag's character content or empty string if none
    + #define ezxml_txt(xml) ((xml) ? xml->txt : "")
    + 
    ++int ezxml_int(ezxml_t xml, int default_value);
    ++
    + // returns the value of the requested tag attribute, or NULL if not found
    + const char *ezxml_attr(ezxml_t xml, const char *attr);
    + 
    ++int ezxml_attr_int(ezxml_t xml, const char *attr, int default_value);
    ++
    + // Traverses the ezxml sturcture to retrieve a specific subtag. Takes a
    + // variable length list of tag names and indexes. The argument list must be
    + // terminated by either an index of -1 or an empty string tag name. Example: 
    +@@ -137,6 +141,9 @@ ezxml_t ezxml_add_child(ezxml_t xml, con
    + // sets the character content for the given tag and returns the tag
    + ezxml_t ezxml_set_txt(ezxml_t xml, const char *txt);
    + 
    ++// set int value
    ++ezxml_t ezxml_set_int(ezxml_t xml, int data);
    ++
    + // wrapper for ezxml_set_txt() that strdup()s txt
    + #define ezxml_set_txt_d(xml, txt) \
    +     ezxml_set_flag(ezxml_set_txt(xml, strdup(txt)), EZXML_TXTM)
    +@@ -144,6 +151,9 @@ ezxml_t ezxml_set_txt(ezxml_t xml, const
    + // Sets the given tag attribute or adds a new attribute if not found. A value
    + // of NULL will remove the specified attribute. Returns the tag given.
    + ezxml_t ezxml_set_attr(ezxml_t xml, const char *name, const char *value);
    ++	
    ++// set int value for an attr
    ++ezxml_t ezxml_set_attr_int(ezxml_t xml, const char *name, int data);
    + 
    + // Wrapper for ezxml_set_attr() that strdup()s name/value. Value cannot be NULL
    + #define ezxml_set_attr_d(xml, name, value) \
    diff --git a/libs/ezxml/patches/202-ezxml_child.patch b/libs/ezxml/patches/202-ezxml_child.patch
    new file mode 100644
    index 0000000..96e3085
    --- /dev/null
    +++ b/libs/ezxml/patches/202-ezxml_child.patch
    @@ -0,0 +1,20 @@
    +--- a/ezxml.h
    ++++ b/ezxml.h
    +@@ -175,6 +175,17 @@ ezxml_t ezxml_insert(ezxml_t xml, ezxml_
    + // removes a tag along with all its subtags
    + #define ezxml_remove(xml) ezxml_free(ezxml_cut(xml))
    + 
    ++static inline char const * ezxml_child_txt( ezxml_t node, char const *child )
    ++{
    ++	return ezxml_txt( ezxml_child( node, child ) );
    ++}
    ++
    ++static inline ezxml_t ezxml_child_set_txt_d( ezxml_t node, char const *child,
    ++					char const *value )
    ++{
    ++	return ezxml_set_txt_d( ezxml_child( node, child ), value );
    ++}
    ++
    + #ifdef __cplusplus
    + }
    + #endif
    diff --git a/libs/ezxml/patches/203-ezxml_cut.patch b/libs/ezxml/patches/203-ezxml_cut.patch
    new file mode 100644
    index 0000000..63642de
    --- /dev/null
    +++ b/libs/ezxml/patches/203-ezxml_cut.patch
    @@ -0,0 +1,23 @@
    +--- a/ezxml.c
    ++++ b/ezxml.c
    +@@ -1042,7 +1042,7 @@ ezxml_t ezxml_cut(ezxml_t xml)
    + 
    +             cur = xml->parent->child; // go back to head of subtag list
    +             if (strcmp(cur->name, xml->name)) { // not in first sibling list
    +-                while (strcmp(cur->sibling->name, xml->name))
    ++                while (cur->sibling && strcmp(cur->sibling->name, xml->name))
    +                     cur = cur->sibling;
    +                 if (cur->sibling == xml) { // first of a sibling list
    +                     cur->sibling = (xml->next) ? xml->next
    +@@ -1051,8 +1051,9 @@ ezxml_t ezxml_cut(ezxml_t xml)
    +                 else cur = cur->sibling; // not first of a sibling list
    +             }
    + 
    +-            while (cur->next && cur->next != xml) cur = cur->next;
    +-            if (cur->next) cur->next = cur->next->next; // patch next list
    ++            cur = xml->parent->child; // go back to head of subtag list
    ++            while (cur && cur->next != xml) cur = cur->ordered;
    ++            if (cur && cur->next) cur->next = cur->next->next; // patch next list
    +         }        
    +     }
    +     xml->ordered = xml->sibling = xml->next = NULL;
    diff --git a/libs/faad2/Makefile b/libs/faad2/Makefile
    new file mode 100644
    index 0000000..87ed016
    --- /dev/null
    +++ b/libs/faad2/Makefile
    @@ -0,0 +1,96 @@
    +#
    +# Copyright (C) 2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=faad2
    +PKG_VERSION:=2.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/faac
    +PKG_MD5SUM:=4c332fa23febc0e4648064685a3d4332
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Package/faad2/Default
    +  URL:=http://www.audiocoding.com/faad2.html
    +  TITLE:=Freeware Advanced Audio Decoder
    +endef
    +
    +define Package/faad2/Default/description
    +	FAAD2 is the fastest ISO AAC audio decoder available.
    +	FAAD2 correctly decodes all MPEG-4 and MPEG-2 MAIN,
    +	LOW, LTP, LD and ER object type AAC files.
    +endef
    +
    +define Package/faad2
    +$(call Package/faad2/Default)
    +  SECTION:=sound
    +  CATEGORY:=Sound
    +  TITLE+=player
    +  DEPENDS:=+libfaad2
    +endef
    +
    +define Package/faad2/description
    +$(call Package/faad2/Default/description)
    +  This package contains a binary to play AAC or MP4 files.
    +endef
    +
    +define Package/libfaad2
    +$(call Package/faad2/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+=library
    +  DEPENDS:=@BUILD_PATENTED
    +endef
    +
    +define Package/libfaad2/description
    +$(call Package/faad2/Default/description)
    +  This package contains the library.
    +endef
    +
    +define Build/Configure
    +	# This replacement were do according to many comments on the web because of gcc 3.4.5 version (.6 included).-
    +	# wich doesn't recognices the -iquote parameter to AM_CFLAGS
    +	($(SED) 's,-iquote $$$$(top_srcdir),-I$$$$(top_srcdir),g' $(PKG_BUILD_DIR)/libfaad/Makefile.am; \
    +	$(SED) 's,-iquote $$$$(top_srcdir),-I$$$$(top_srcdir),g' $(PKG_BUILD_DIR)/libfaad/Makefile.in);
    +	(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
    +		autoreconf -vif \
    +	);
    +	$(call Build/Configure/Default, \
    +		--with-mp4v2 \
    +		--without-xmms \
    +		, \
    +		FAAD2_CPPFLAGS="-fno-builtin-cos -fno-builtin-sin -fno-builtin-log" \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/faad2/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/faad $(1)/usr/bin/
    +endef
    +
    +define Package/libfaad2/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,faad2))
    +$(eval $(call BuildPackage,libfaad2))
    diff --git a/libs/fcgi/Makefile b/libs/fcgi/Makefile
    new file mode 100644
    index 0000000..fcb1f64
    --- /dev/null
    +++ b/libs/fcgi/Makefile
    @@ -0,0 +1,64 @@
    +#
    +# Copyright (C) 2007 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=fcgi
    +PKG_VERSION:=2.4.0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.fastcgi.com/dist/
    +PKG_MD5SUM:=d15060a813b91383a9f3c66faf84867e
    +
    +PKG_FIXUP:=libtool-ucxx
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/fcgi
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Shared library of FastCGI
    +  DEPENDS:=+uclibcxx
    +  URL:=http://www.fastcgi.com/
    +endef
    +
    +define Package/fcgi/description
    + FastCGI is a language independent, scalable, open extension to 
    + CGI that provides high performance without the limitations of 
    + server specific APIs.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +CONFIGURE_VARS += \
    +	CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClic++" \
    +	CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
    +	LIBS="-nodefaultlibs -luClibc++ -lm" \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/fastcgi.h $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/fcgi{app,_config,misc,o,os,_stdio}.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/fcgi/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgi-fcgi $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,fcgi))
    diff --git a/libs/fcgi/patches/100-fcgio-int-type-fix.patch b/libs/fcgi/patches/100-fcgio-int-type-fix.patch
    new file mode 100644
    index 0000000..4de8f5f
    --- /dev/null
    +++ b/libs/fcgi/patches/100-fcgio-int-type-fix.patch
    @@ -0,0 +1,38 @@
    +Index: fcgi-2.4.0/include/fcgio.h
    +===================================================================
    +--- fcgi-2.4.0.orig/include/fcgio.h	2007-07-17 13:30:28.000000000 +0200
    ++++ fcgi-2.4.0/include/fcgio.h	2007-07-17 13:30:28.000000000 +0200
    +@@ -77,10 +77,10 @@
    +     virtual int sync();
    + 
    +     // Remove and return the current character.
    +-    virtual int uflow();
    ++    virtual int_type uflow();
    + 
    +     // Fill the get area (if buffered) and return the current character.
    +-    virtual int underflow();
    ++    virtual int_type underflow();
    + 
    +     // Use a buffer.  The only reasons that a buffer would be useful is
    +     // to support the use of the unget()/putback() or seek() methods.  Using
    +diff -urN fcgi-2.4.0/libfcgi/fcgio.cpp fcgi-2.4.0.new/libfcgi/fcgio.cpp
    +--- fcgi-2.4.0/libfcgi/fcgio.cpp	2002-02-24 21:12:22.000000000 +0100
    ++++ fcgi-2.4.0.new/libfcgi/fcgio.cpp	2007-08-28 11:22:22.000000000 +0200
    +@@ -89,7 +89,7 @@
    + }
    + 
    + // uflow() removes the char, underflow() doesn't
    +-int fcgi_streambuf::uflow() 
    ++short int fcgi_streambuf::uflow() 
    + {
    +     int rv = underflow();
    +     if (this->bufsize) gbump(1);
    +@@ -97,7 +97,7 @@
    + }
    + 				
    + // Note that the expected behaviour when there is no buffer varies
    +-int fcgi_streambuf::underflow()
    ++short int fcgi_streambuf::underflow()
    + {
    +     if (this->bufsize)
    +     {
    diff --git a/libs/fcgi/patches/110-no_examples.patch b/libs/fcgi/patches/110-no_examples.patch
    new file mode 100644
    index 0000000..8c14e8a
    --- /dev/null
    +++ b/libs/fcgi/patches/110-no_examples.patch
    @@ -0,0 +1,24 @@
    +diff -urN fcgi-2.4.0/Makefile.am fcgi-2.4.0.new/Makefile.am
    +--- fcgi-2.4.0/Makefile.am	2001-12-22 14:05:39.000000000 +0100
    ++++ fcgi-2.4.0.new/Makefile.am	2007-08-28 11:05:10.000000000 +0200
    +@@ -4,7 +4,7 @@
    + #  $Id: Makefile.am,v 1.7 2001/12/22 13:05:39 robs Exp $
    + #
    + 
    +-SUBDIRS = libfcgi cgi-fcgi examples include
    ++SUBDIRS = libfcgi cgi-fcgi include
    + 
    + include_HEADERS = fcgi_config.h
    + 
    +diff -urN fcgi-2.4.0/Makefile.in fcgi-2.4.0.new/Makefile.in
    +--- fcgi-2.4.0/Makefile.in	2003-01-19 18:21:15.000000000 +0100
    ++++ fcgi-2.4.0.new/Makefile.in	2007-08-28 11:04:55.000000000 +0200
    +@@ -93,7 +93,7 @@
    + am__quote = @am__quote@
    + install_sh = @install_sh@
    + 
    +-SUBDIRS = libfcgi cgi-fcgi examples include
    ++SUBDIRS = libfcgi cgi-fcgi include
    + 
    + include_HEADERS = fcgi_config.h
    + 
    diff --git a/libs/fftw3/Makefile b/libs/fftw3/Makefile
    new file mode 100644
    index 0000000..5a181d0
    --- /dev/null
    +++ b/libs/fftw3/Makefile
    @@ -0,0 +1,69 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=fftw3
    +PKG_VERSION:=3.2.2
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=fftw-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.fftw.org
    +PKG_MD5SUM:=b616e5c91218cc778b5aa735fefb61ae
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/fftw-$(PKG_VERSION)
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/fftw3
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=@!avr32
    +  TITLE:=Fast Fourier transform library
    +  URL:=http://www.fftw.org/
    +endef
    +
    +define Package/fftw3/description
    +	FFTW is a collection of fast C routines for computing the
    +	Discrete Fourier Transform in one or more dimensions. It
    +	includes complex, real, and parallel transforms, and can
    +	handle arbitrary array sizes efficiently.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--prefix=/usr \
    +	--without-libiconv-prefix \
    +	--without-libintl-prefix \
    +	--disable-nls \
    +	--enable-shared \
    +	--enable-threads \
    +	--enable-double \
    +	--enable-type-prefix \
    +	--disable-debug \
    +	--disable-fortran \
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/fftw3.h $(1)/usr/include
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3*.{a,la} $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3*.so* $(1)/usr/lib
    +endef
    +
    +define Package/fftw3/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfftw3.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,fftw3))
    diff --git a/libs/fftw3/patches/001-makefile.patch b/libs/fftw3/patches/001-makefile.patch
    new file mode 100644
    index 0000000..d09bc2d
    --- /dev/null
    +++ b/libs/fftw3/patches/001-makefile.patch
    @@ -0,0 +1,20 @@
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -110,7 +110,7 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-re
    + ETAGS = etags
    + CTAGS = ctags
    + DIST_SUBDIRS = support genfft kernel simd dft rdft reodft api threads \
    +-	cell libbench2 . tests doc tools m4
    ++	cell libbench2 . doc tools m4
    + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    + distdir = $(PACKAGE)-$(VERSION)
    + top_distdir = $(distdir)
    +@@ -278,7 +278,7 @@ lib_LTLIBRARIES = libfftw3@PREC_SUFFIX@.
    + @MAINTAINER_MODE_TRUE@GENFFT = genfft
    + ACLOCAL_AMFLAGS = -I m4
    + SUBDIRS = support $(GENFFT) kernel simd dft rdft reodft api threads \
    +-cell libbench2 . tests doc tools m4
    ++cell libbench2 . m4
    + 
    + EXTRA_DIST = COPYRIGHT bootstrap.sh CONVENTIONS fftw.pc.in README.Cell
    + @HAVE_SIMD_TRUE@SIMD_LIBS = \
    diff --git a/libs/file/Makefile b/libs/file/Makefile
    new file mode 100644
    index 0000000..54bc17c
    --- /dev/null
    +++ b/libs/file/Makefile
    @@ -0,0 +1,91 @@
    +#
    +# Copyright (C) 2007-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=file
    +PKG_VERSION:=5.05
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=ftp://ftp.astron.com/pub/file/
    +PKG_MD5SUM:=0b429063710457be2bd17a18389cb018
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/file/Default
    +  TITLE:=File type determination
    +  URL:=ftp://ftp.astron.com/pub/file/
    +  MAINTAINER:=Luka Perkov 
    +endef
    +
    +define Package/file
    +$(call package/file/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  TITLE+= utility
    +  DEPENDS:=+libmagic
    +endef
    +
    +define Package/libmagic
    +$(call package/file/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= library
    +  DEPENDS:=+zlib
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +MAKE_PATH := src
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile/magic
    +	( cd $(PKG_BUILD_DIR)/magic/Magdir; \
    +		for f in `ls`; do \
    +			cat $$$${f}; \
    +		done \
    +	) > $(PKG_BUILD_DIR)/magic/magic
    +endef
    +Hooks/Compile/Post += Build/Compile/magic
    +
    +define Build/Install/magic
    +	$(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/share/file
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/magic/magic $(PKG_INSTALL_DIR)/usr/share/file/
    +endef
    +Hooks/Install/Post += Build/Install/magic
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/magic.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libmagic.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/file/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/file $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/share/misc
    +	$(SED) "/^#/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
    +	$(SED) "/^$$$$/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/file/magic $(1)/usr/share/misc/
    +endef
    +
    +define Package/libmagic/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libmagic.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,file))
    +$(eval $(call BuildPackage,libmagic))
    diff --git a/libs/firewall-mod-save/Makefile b/libs/firewall-mod-save/Makefile
    new file mode 100644
    index 0000000..595fdc6
    --- /dev/null
    +++ b/libs/firewall-mod-save/Makefile
    @@ -0,0 +1,51 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +include $(INCLUDE_DIR)/kernel.mk
    +
    +PKG_NAME:=firewall-mod-save
    +PKG_VERSION:=1.0
    +PKG_RELEASE:=2
    +
    +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/firewall-mod-save/Default
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Preserve dynamic chains during firewall restart
    +  MAINTAINER:=Daniel Dickinson 
    +endef
    +
    +define Package/firewall-mod-save
    +  $(call Package/firewall-mod-save/Default)
    +  DEPENDS:=+iptables
    +endef
    +
    +define Package/firewall-mod-save/description
    +    Uses iptables-save to save the option chain in option table (default filter)
    +    as defined by the config section save in /etc/config/firewall.
    +endef
    +
    +define Build/Prepare
    +endef
    +
    +define Build/Configure
    +endef
    +
    +define Build/Compile
    +endef
    +
    +define Package/firewall-mod-save/install
    +	$(INSTALL_DIR) $(1)/lib/firewall
    +	$(INSTALL_DATA) ./files/20_save.sh $(1)/lib/firewall/
    +endef
    +
    +$(eval $(call BuildPackage,firewall-mod-save))
    +
    diff --git a/libs/firewall-mod-save/files/20_save.sh b/libs/firewall-mod-save/files/20_save.sh
    new file mode 100644
    index 0000000..d262518
    --- /dev/null
    +++ b/libs/firewall-mod-save/files/20_save.sh
    @@ -0,0 +1,73 @@
    +#!/bin/sh
    +
    +. /etc/functions.sh
    +
    +save_print_table_chain() {
    +	local table="$1"
    +	local chain="$2"
    +	local fsave="$3"
    +	local fsavetmp="$fsave"".tmp"
    +	local next_table_line
    +	local cur_table_line
    +	local table_line
    +	table_line="$(($(grep -n "^*$table" "$fsave" | cut -f1 -d: ) + 1))"
    +	tail -n+$table_line $fsave >"$fsavetmp"
    +	for cur_table_line in $(grep -n "^*" "$fsavetmp"); do
    +		[ -z "$next_table_line" ] && {
    +			local lineno="$(echo $cur_table_line | cut -f1 -d:)"
    +			[ -n "$lineno" ] && [ "$lineno" -gt $(($table_line - 1)) ] && {
    +				next_table_line=$lineno
    +			}
    +		}
    +	done
    +	[ -z "$next_table_line" ] && {
    +		next_table_line="$(cat $fsavetmp|wc -l)"
    +	}
    +	next_table_line=$(($next_table_line - 1))
    +	head -n $next_table_line "$fsave.tmp" | grep $chain | grep -Ev "^:$chain" 
    +        rm -f "$fsavetmp"
    +}
    +
    +save_save_fw_chain() {
    +	local chain
    +	local table
    +	local fsave="/tmp/.firewall/save"
    +
    +	config_get chain $1 chain
    +	config_get table $1 table filter
    +	[ -z "$chain" ] && return 0
    +	mkdir -p /tmp/.firewall
    +	iptables-save >"$fsave"
    +	save_print_table_chain $table $chain "$fsave" > /tmp/.firewall/save-$table-$chain
    +
    +}
    +
    +save_load_fw_chain() {
    +	local chain
    +	local table
    +
    +	config_get chain $1 chain
    +	config_get table $1 table filter 
    +	[ -e /tmp/.firewall/save-$table-$chain ] && [ "$(cat /tmp/.firewall/save-$table-$chain | wc -l)" -ge 1 ] && {
    +		iptables -t $table -N $chain
    +		while read line; do
    +			sh -c "iptables -t $table $line"
    +		done < /tmp/.firewall/save-$table-$chain
    +		rm /tmp/.firewall/save-$table-$chain
    +	}
    +}
    +
    +save_pre_stop_cb() {
    +	echo "Saving dynamic firewall chains"
    +	config_load firewall
    +
    +	config_foreach save_save_fw_chain save
    +}
    +
    +save_post_core_cb() {
    +	echo "Loading dynamic firewall chains"
    +
    +	config_load firewall
    +	config_foreach save_load_fw_chain save
    +}
    +
    diff --git a/libs/flac/Makefile b/libs/flac/Makefile
    new file mode 100644
    index 0000000..4d121ae
    --- /dev/null
    +++ b/libs/flac/Makefile
    @@ -0,0 +1,72 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=flac
    +PKG_VERSION:=1.2.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/flac
    +PKG_MD5SUM:=
    +PKG_INSTALL:=1
    +
    +PKG_FIXUP:=libtool
    +PKG_REMOVE_FILES:=autogen.sh aclocal.m4
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libflac
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Free Lossless Audio Codec library
    +  URL:=http://flac.sourceforge.net/
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--disable-cpplibs \
    +		--disable-sse \
    +		--disable-3dnow \
    +		--disable-altivec \
    +		--disable-doxgen-docs \
    +		--disable-local-xmms-plugin \
    +		--disable-xmms-plugin \
    +		--disable-ogg \
    +		--disable-oggtest \
    +		--disable-debug \
    +	)
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/FLAC \
    +		$(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libFLAC.{a,so*,la} \
    +		$(1)/usr/lib/
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
    +		$(1)/usr/lib/pkgconfig/
    +
    +	$(INSTALL_DIR) $(1)/usr/share/aclocal/
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/share/aclocal/* \
    +		$(1)/usr/share/aclocal/
    +endef
    +
    +define Package/libflac/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libFLAC.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libflac))
    diff --git a/libs/flac/patches/001-no-docs-and-examples.patch b/libs/flac/patches/001-no-docs-and-examples.patch
    new file mode 100644
    index 0000000..cd4e821
    --- /dev/null
    +++ b/libs/flac/patches/001-no-docs-and-examples.patch
    @@ -0,0 +1,73 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -30,7 +30,7 @@
    + 
    + AUTOMAKE_OPTIONS = foreign 1.7
    + 
    +-SUBDIRS = doc include m4 man src examples test build obj
    ++SUBDIRS = include m4 src build obj
    + 
    + DISTCLEANFILES = libtool-disable-static
    + 
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -234,7 +234,7 @@ target_alias = @target_alias@
    + 
    + AUTOMAKE_OPTIONS = foreign 1.7
    + 
    +-SUBDIRS = doc include m4 man src examples test build obj
    ++SUBDIRS = include m4 src build obj
    + 
    + DISTCLEANFILES = libtool-disable-static
    + 
    +--- a/src/Makefile.am
    ++++ b/src/Makefile.am
    +@@ -30,12 +30,6 @@ SUBDIRS = \
    + 	metaflac \
    + 	monkeys_audio_utilities \
    + 	$(XMMS_DIRS) \
    +-	plugin_winamp2 \
    +-	test_grabbag \
    +-	test_libs_common \
    +-	test_libFLAC \
    +-	test_seeking \
    +-	test_streams \
    + 	$(CPPLIBS_DIRS)
    + 
    + EXTRA_DIST = \
    +--- a/src/Makefile.in
    ++++ b/src/Makefile.in
    +@@ -221,7 +221,7 @@ target_alias = @target_alias@
    + 
    + @FLaC__HAS_XMMS_TRUE@XMMS_DIRS = plugin_common plugin_xmms
    + 
    +-@FLaC__WITH_CPPLIBS_TRUE@CPPLIBS_DIRS = libFLAC++ test_libFLAC++
    ++@FLaC__WITH_CPPLIBS_TRUE@CPPLIBS_DIRS = libFLAC++
    + 
    + SUBDIRS = \
    + 	libFLAC \
    +@@ -230,12 +230,6 @@ SUBDIRS = \
    + 	metaflac \
    + 	monkeys_audio_utilities \
    + 	$(XMMS_DIRS) \
    +-	plugin_winamp2 \
    +-	test_grabbag \
    +-	test_libs_common \
    +-	test_libFLAC \
    +-	test_seeking \
    +-	test_streams \
    + 	$(CPPLIBS_DIRS)
    + 
    + 
    +@@ -256,9 +250,8 @@ RECURSIVE_TARGETS = info-recursive dvi-r
    + 	check-recursive installcheck-recursive
    + DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
    + DIST_SUBDIRS = libFLAC share flac metaflac monkeys_audio_utilities \
    +-	plugin_common plugin_xmms plugin_winamp2 test_grabbag \
    +-	test_libs_common test_libFLAC test_seeking test_streams \
    +-	libFLAC++ test_libFLAC++
    ++	plugin_common plugin_xmms plugin_winamp2 \
    ++	libFLAC++
    + all: all-recursive
    + 
    + .SUFFIXES:
    diff --git a/libs/flac/patches/002-no-utility.patch b/libs/flac/patches/002-no-utility.patch
    new file mode 100644
    index 0000000..e6fe1b3
    --- /dev/null
    +++ b/libs/flac/patches/002-no-utility.patch
    @@ -0,0 +1,24 @@
    +--- a/src/Makefile.am
    ++++ b/src/Makefile.am
    +@@ -26,9 +26,6 @@ endif
    + SUBDIRS = \
    + 	libFLAC \
    + 	share \
    +-	flac \
    +-	metaflac \
    +-	monkeys_audio_utilities \
    + 	$(XMMS_DIRS) \
    + 	$(CPPLIBS_DIRS)
    + 
    +--- a/src/Makefile.in
    ++++ b/src/Makefile.in
    +@@ -226,9 +226,6 @@ target_alias = @target_alias@
    + SUBDIRS = \
    + 	libFLAC \
    + 	share \
    +-	flac \
    +-	metaflac \
    +-	monkeys_audio_utilities \
    + 	$(XMMS_DIRS) \
    + 	$(CPPLIBS_DIRS)
    + 
    diff --git a/libs/flac/patches/010-automake-compat.patch b/libs/flac/patches/010-automake-compat.patch
    new file mode 100644
    index 0000000..f8b1546
    --- /dev/null
    +++ b/libs/flac/patches/010-automake-compat.patch
    @@ -0,0 +1,11 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -34,6 +34,8 @@ SUBDIRS = include m4 src build obj
    + 
    + DISTCLEANFILES = libtool-disable-static
    + 
    ++ACLOCAL_AMFLAGS = -I m4
    ++
    + EXTRA_DIST = \
    + 	COPYING.FDL \
    + 	COPYING.GPL \
    diff --git a/libs/freetype/Makefile b/libs/freetype/Makefile
    new file mode 100644
    index 0000000..c4026c7
    --- /dev/null
    +++ b/libs/freetype/Makefile
    @@ -0,0 +1,72 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=freetype
    +PKG_VERSION:=2.3.12
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/freetype
    +PKG_MD5SUM:=e974a82e5939be8e05ee65f07275d7c5
    +
    +PKG_FIXUP:=libtool
    +PKG_LIBTOOL_PATHS:=builds/unix
    +
    +include $(INCLUDE_DIR)/host-build.mk
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libfreetype
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=A free, high-quality and portable font engine
    +  URL:=http://www.freetype.org/
    +  DEPENDS:=+zlib
    +endef
    +
    +define Package/libfreetype/description
    + The FreeType project is a team of volunteers who develop free, 
    + portable and high-quality software solutions for digital typography.
    + They specifically target embedded systems and focus on bringing small, 
    + efficient and ubiquitous products.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(2)/bin/
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/freetype2 $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/ft2build.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(1)/usr/lib/pkgconfig/
    +
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1="$(STAGING_DIR)/usr",g' \
    +		 $(2)/bin/freetype-config
    +endef
    +
    +
    +define Package/libfreetype/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call HostBuild))
    +$(eval $(call BuildPackage,libfreetype))
    diff --git a/libs/fribidi/Makefile b/libs/fribidi/Makefile
    new file mode 100644
    index 0000000..a103436
    --- /dev/null
    +++ b/libs/fribidi/Makefile
    @@ -0,0 +1,46 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=fribidi
    +PKG_VERSION:=0.10.9
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://fribidi.org/download
    +PKG_MD5SUM:=647aee89079b056269ff0918dc1c6d28
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/host-build.mk
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/fribidi
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=GNU FriBidi is an implementation of the Unicode Bidirectional Algorithm (bidi)
    +  URL:=http://fribidi.org
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/fribidi $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/fribidi/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfribidi.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call HostBuild))
    +$(eval $(call BuildPackage,fribidi))
    diff --git a/libs/gconf2/Makefile b/libs/gconf2/Makefile
    new file mode 100644
    index 0000000..86b764d
    --- /dev/null
    +++ b/libs/gconf2/Makefile
    @@ -0,0 +1,109 @@
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gconf2
    +PKG_VERSION:=2.24.0
    +PKG_RELEASE:=1
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/GConf-$(PKG_VERSION)
    +PKG_SOURCE:=GConf-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@GNOME/GConf/2.24
    +PKG_MD5SUM:=4971d96f5ba94fe4a69396267bd5afe8
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +PKG_BUILD_DEPENDS:=orbit2/host intltool/host
    +
    +PKG_INSTALL=1
    +
    +TARGET_LDFLAGS+= \
    +	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
    +
    +define Package/libgconf2
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=GConf2 library
    +  URL:=http://www.gnome.org/projects/gconf/
    +  DEPENDS:=+orbit2 +glib2 +dbus +libdbus-glib +libxml2
    +endef
    +
    +define Package/libgconf2/description
    +GConf is a configuration database system for storing application preferences.
    +endef
    +
    +define Package/gconf2
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  TITLE:=GConf2 command line utils
    +  URL:=http://www.gnome.org/projects/gconf/
    +  DEPENDS:=+libgconf2
    +endef
    +
    +define Package/gconf2/description
    +GConf is a configuration database system for storing application preferences.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +	    --disable-gtk \
    +	)
    +	find $(PKG_BUILD_DIR) -name Makefile -exec sed -i 's,ORBIT_IDL.*orbit-idl-2,ORBIT_IDL = $(STAGING_DIR_HOST)/bin/orbit-idl-2,g' {} \; # tell gconf2 to use the host-built idl-compiler
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/{include/gconf/2/gconf,lib/pkgconfig,share/aclocal}
    +
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/gconf/2/gconf/* \
    +		$(1)/usr/include/gconf/2/gconf/
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libgconf-2.{so*,la,a} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
    +		$(1)/usr/lib/pkgconfig/
    +
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/share/aclocal/* \
    +		$(1)/usr/share/aclocal/
    +endef
    +
    +define Package/libgconf2/install
    +	$(INSTALL_DIR) $(1)/etc/gconf
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/etc/gconf/* \
    +		$(1)/etc/gconf/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libgconf-2.so* \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/lib/gconfd-2 \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/GConf/2
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/GConf/2/libgconfbackend-xml.so \
    +		$(1)/usr/lib/GConf/2/
    +
    +	$(INSTALL_DIR) $(1)/usr/share/dbus-1/services
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/share/dbus-1/services/* \
    +		$(1)/usr/share/dbus-1/services/
    +endef
    +
    +define Package/gconf2/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/* \
    +		$(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,libgconf2))
    +$(eval $(call BuildPackage,gconf2))
    diff --git a/libs/gconf2/patches/010-do-not-use-GTK_DOC-macro.patch b/libs/gconf2/patches/010-do-not-use-GTK_DOC-macro.patch
    new file mode 100644
    index 0000000..170524c
    --- /dev/null
    +++ b/libs/gconf2/patches/010-do-not-use-GTK_DOC-macro.patch
    @@ -0,0 +1,11 @@
    +--- GConf-2.24.0.orig/configure.in	2008-09-22 19:51:00.000000000 +0200
    ++++ GConf-2.24.0/configure.in	2010-12-10 15:50:41.515380606 +0100
    +@@ -127,7 +127,7 @@
    +   fi
    + fi
    + 
    +-GTK_DOC_CHECK([1.0])
    ++#GTK_DOC_CHECK([1.0])
    + 
    + AC_ARG_ENABLE(gtk, [  --enable-gtk          Enable GTK+ support (for gconf-sanity-check) [default=auto]], enable_gtk="$enableval", enable_gtk=auto)
    + 
    diff --git a/libs/gconf2/patches/020-do-not-build-examples_docs_pos_tests.patch b/libs/gconf2/patches/020-do-not-build-examples_docs_pos_tests.patch
    new file mode 100644
    index 0000000..70cc993
    --- /dev/null
    +++ b/libs/gconf2/patches/020-do-not-build-examples_docs_pos_tests.patch
    @@ -0,0 +1,23 @@
    +--- GConf-2.24.0.orig/Makefile.in	2008-09-22 20:03:56.000000000 +0200
    ++++ GConf-2.24.0/Makefile.in	2010-12-10 13:52:16.027379891 +0100
    +@@ -267,8 +267,8 @@
    + top_build_prefix = @top_build_prefix@
    + top_builddir = @top_builddir@
    + top_srcdir = @top_srcdir@
    +-SUBDIRS = gconf backends po doc examples $(am__append_1)
    +-DIST_SUBDIRS = tests $(SUBDIRS) 
    ++SUBDIRS = gconf backends $(am__append_1)
    ++DIST_SUBDIRS = $(SUBDIRS) 
    + EXTRA_DIST = \
    + 	TODO                \
    + 	gtk-doc.make        \
    +diff -ruN GConf-2.24.0.orig//Makefile.am GConf-2.24.0//Makefile.am
    +--- GConf-2.24.0.orig//Makefile.am	2008-08-19 11:41:58.000000000 +0200
    ++++ GConf-2.24.0//Makefile.am	2010-12-10 18:49:14.591378059 +0100
    +@@ -1,5 +1,5 @@
    + 
    +-SUBDIRS = gconf backends po doc examples 
    ++SUBDIRS = gconf backends
    + 
    + if ENABLE_DEFAULTS_SERVICE
    + SUBDIRS += defaults
    diff --git a/libs/gconv-modules/Makefile b/libs/gconv-modules/Makefile
    new file mode 100644
    index 0000000..6e0f7fc
    --- /dev/null
    +++ b/libs/gconv-modules/Makefile
    @@ -0,0 +1,44 @@
    +# 
    +# Copyright (C) 2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gconv-modules
    +PKG_VERSION:=$(CONFIG_GLIBC_VERSION)
    +PKG_RELEASE:=2
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/gconv-modules
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=@USE_GLIBC
    +  TITLE:=The GNU libc charset conversion modules
    +endef
    +
    +define Package/gconv-modules/description
    + This package contains helper modules necessary to convert data between
    +various charsets.
    +endef
    +
    +define Build/Compile
    +endef
    +
    +define Package/gconv-modules/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(TOOLCHAIN_DIR)/usr/lib/gconv $(1)/usr/lib
    +
    +	rm -f $(1)/usr/lib/gconv/EUC-*.so
    +	rm -f $(1)/usr/lib/gconv/ISO-2022-*.so
    +	rm -f $(1)/usr/lib/gconv/JOHAB.so
    +	rm -f $(1)/usr/lib/gconv/UHC.so
    +
    +#	$(INSTALL_DIR) $(1)/usr/bin
    +#	$(INSTALL_BIN) $(TOOLCHAIN_DIR)/usr/bin/iconv $(1)/usr/bin
    +endef
    +
    +$(eval $(call BuildPackage,gconv-modules))
    diff --git a/libs/gd/Makefile b/libs/gd/Makefile
    new file mode 100644
    index 0000000..6c50cd5
    --- /dev/null
    +++ b/libs/gd/Makefile
    @@ -0,0 +1,76 @@
    +# 
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gd
    +PKG_VERSION:=2.0.35
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://www.libgd.org/releases
    +PKG_MD5SUM:=6c6c3dbb7bf079e0bb5fbbfd3bb8a71c
    +
    +PKG_FIXUP:=autoreconf
    +
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libgd
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libjpeg +libpng
    +  TITLE:=The GD graphics library
    +  URL:=http://www.libgd.org/
    +endef
    +
    +define Package/libgd/description
    +  GD is an open source code library for the dynamic creation of images by
    +  programmers. GD creates PNG, JPEG and GIF images, among other formats.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-rpath \
    +	--without-x \
    +	--without-freetype \
    +	--with-jpeg=$(STAGING_DIR)/usr \
    +	--with-png=$(STAGING_DIR)/usr \
    +	--without-xpm \
    +	--without-iconv
    +
    +CONFIGURE_VARS += \
    +	LIBPNG12_CONFIG="$(STAGING_DIR)/host/bin/libpng12-config" \
    +	ac_cv_header_iconv_h=no
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
    +		$(1)/usr/bin/gdlib-config
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/gd{,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx}.h \
    +		$(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,la,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(2)/bin
    +	$(LN) ../../usr/bin/gdlib-config $(2)/bin/
    +endef
    +
    +define Package/libgd/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libgd))
    diff --git a/libs/gd/patches/100-configure_fix.patch b/libs/gd/patches/100-configure_fix.patch
    new file mode 100644
    index 0000000..b0123b3
    --- /dev/null
    +++ b/libs/gd/patches/100-configure_fix.patch
    @@ -0,0 +1,30 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -61,7 +61,7 @@ fi
    + AC_HEADER_STDC
    + AC_CHECK_HEADERS([errno.h limits.h stddef.h stdlib.h string.h unistd.h])
    + 
    +-AM_ICONV
    ++m4_pattern_allow([AM_ICONV])
    + # if test -n "$LIBICONV" ; then
    + #   LIBS="$LIBS $LIBICONV"
    + # fi
    +@@ -353,14 +353,14 @@ if test "$withval" != no; then
    +   AC_PATH_PROG([LIBPNG12_CONFIG], [libpng12-config])
    +   AC_PATH_PROG([LIBPNG_CONFIG], [libpng-config])
    +   if test -n "$LIBPNG12_CONFIG"; then
    +-    libpng_CPPFLAGS=`libpng12-config --cflags`
    ++    libpng_CPPFLAGS=`$LIBPNG12_CONFIG --cflags`
    +     # should be --ldopts, but it's currently broken
    +-    libpng_LDFLAGS=`libpng12-config --ldflags`
    ++    libpng_LDFLAGS=`$LIBPNG12_CONFIG --ldflags`
    +     libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'`
    +   elif test -n "$LIBPNG_CONFIG"; then
    +-    libpng_CPPFLAGS=`libpng-config --cflags`
    ++    libpng_CPPFLAGS=`$LIBPNG_CONFIG --cflags`
    +     # should be --ldopts, but it's currently broken
    +-    libpng_LDFLAGS=`libpng-config --ldflags`
    ++    libpng_LDFLAGS=`$LIBPNG_CONFIG --ldflags`
    +     libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'`
    +   elif test -d "$withval"; then
    +     libpng_CPPFLAGS="-I$withval/include"
    diff --git a/libs/gd/patches/101-gdlib-config.patch b/libs/gd/patches/101-gdlib-config.patch
    new file mode 100644
    index 0000000..217f01e
    --- /dev/null
    +++ b/libs/gd/patches/101-gdlib-config.patch
    @@ -0,0 +1,20 @@
    +--- a/config/gdlib-config.in
    ++++ b/config/gdlib-config.in
    +@@ -71,7 +71,7 @@ while test $# -gt 0; do
    + 	echo @LDFLAGS@
    + 	;;
    +     --libs)
    +-	echo @LIBS@ @LIBICONV@
    ++	echo @LIBS@
    + 	;;
    +     --cflags|--includes)
    + 	echo -I@includedir@
    +@@ -84,7 +84,7 @@ while test $# -gt 0; do
    + 	echo "includedir: $includedir"
    + 	echo "cflags:     -I@includedir@"
    + 	echo "ldflags:    @LDFLAGS@"
    +-	echo "libs:       @LIBS@ @LIBICONV@"
    ++	echo "libs:       @LIBS@
    + 	echo "libdir:     $libdir"
    + 	echo "features:   @FEATURES@"
    + 	;;
    diff --git a/libs/gdbm/Makefile b/libs/gdbm/Makefile
    new file mode 100644
    index 0000000..9d9c58c
    --- /dev/null
    +++ b/libs/gdbm/Makefile
    @@ -0,0 +1,56 @@
    +# 
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gdbm
    +PKG_VERSION:=1.8.3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@GNU/gdbm
    +PKG_MD5SUM:=1d1b1d5c0245b1c00aff92da751e9aa1
    +
    +PKG_FIXUP:=libtool
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libgdbm
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=GNU database manager
    +  URL:=http://www.gnu.org/software/gdbm/
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +define Build/Compile
    +	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
    +		BINOWN=`id -u` \
    +		BINGRP=`id -g` \
    +		INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/gdbm.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgdbm.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libgdbm/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgdbm.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libgdbm))
    diff --git a/libs/gdbm/patches/100-fix-build-with-libtool2.patch b/libs/gdbm/patches/100-fix-build-with-libtool2.patch
    new file mode 100644
    index 0000000..8501971
    --- /dev/null
    +++ b/libs/gdbm/patches/100-fix-build-with-libtool2.patch
    @@ -0,0 +1,29 @@
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -55,7 +55,7 @@ manext = 3
    + .c.lo:
    + 	$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
    + 
    +-SHELL = /bin/sh
    ++SHELL = @SHELL@
    + 
    + PROGS = libgdbm.la testgdbm testdbm testndbm tndbm tdbm conv2gdbm
    + 
    +@@ -130,7 +130,7 @@ install: libgdbm.la gdbm.h gdbm.info
    + 	$(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
    + 		$(INSTALL_ROOT)$(includedir) $(INSTALL_ROOT)$(man3dir) \
    + 		$(INSTALL_ROOT)$(infodir)
    +-	$(LIBTOOL) $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la
    ++	$(LIBTOOL) --mode=install $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la
    + 	$(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) gdbm.h \
    + 		$(INSTALL_ROOT)$(includedir)/gdbm.h
    + 	$(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.3 \
    +@@ -141,7 +141,7 @@ install: libgdbm.la gdbm.h gdbm.info
    + install-compat:
    + 	$(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
    + 		$(INSTALL_ROOT)$(includedir)
    +-	$(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \
    ++	$(LIBTOOL) --mode=install $(INSTALL) -c libgdbm_compat.la \
    + 		$(INSTALL_ROOT)$(libdir)/libgdbm_compat.la
    + 	$(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/dbm.h \
    + 		$(INSTALL_ROOT)$(includedir)/dbm.h
    diff --git a/libs/gettext-full/Makefile b/libs/gettext-full/Makefile
    new file mode 100644
    index 0000000..32df491
    --- /dev/null
    +++ b/libs/gettext-full/Makefile
    @@ -0,0 +1,63 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gettext-full
    +PKG_VERSION:=0.18.1.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=gettext-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@GNU/gettext
    +PKG_MD5SUM:=3dd55b952826d2b32f51308f2f91aa89
    +PKG_BUILD_DIR:=$(BUILD_DIR)/gettext-$(PKG_VERSION)
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=0
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libintl-full
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=GNU Internationalization library
    +  URL:=http://www.gnu.org/software/gettext/
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-rpath \
    +	--enable-nls \
    +	--disable-java \
    +	--disable-native-java \
    +	--disable-openmp \
    +	--with-included-gettext \
    +	--without-libintl-prefix \
    +	--without-libexpat-prefix \
    +	--without-emacs
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/lib/libintl-full/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libintl.h $(1)/usr/lib/libintl-full/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/libintl-full/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.{a,so*} $(1)/usr/lib/libintl-full/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/share/aclocal
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal/
    +endef
    +
    +define Package/libintl-full/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libintl.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libintl-full))
    diff --git a/libs/gettext-full/patches/001-autotools.patch b/libs/gettext-full/patches/001-autotools.patch
    new file mode 100644
    index 0000000..bf44fcb
    --- /dev/null
    +++ b/libs/gettext-full/patches/001-autotools.patch
    @@ -0,0 +1,35 @@
    +--- a/gettext-runtime/man/Makefile.am
    ++++ b/gettext-runtime/man/Makefile.am
    +@@ -159,8 +159,7 @@ bind_textdomain_codeset.3.html: bind_tex
    + 	$(MAN2HTML) $(srcdir)/bind_textdomain_codeset.3.in | sed -e '/CreationDate:/d' > t-$@
    + 	mv t-$@ $@
    + 
    +-install-html-local:
    +-	$(mkdir_p) $(DESTDIR)$(htmldir)
    ++install-html: installdirs-html
    + 	for file in $(man_HTML); do \
    + 	  if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
    + 	  $(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \
    +--- a/gettext-tools/man/Makefile.am
    ++++ b/gettext-tools/man/Makefile.am
    +@@ -186,8 +186,7 @@ autopoint.1.html: autopoint.1
    + 	$(MAN2HTML) `if test -f autopoint.1; then echo .; else echo $(srcdir); fi`/autopoint.1 | sed -e '/CreationDate:/d' > t-$@
    + 	mv t-$@ $@
    + 
    +-install-html-local:
    +-	$(mkdir_p) $(DESTDIR)$(htmldir)
    ++install-html: installdirs-html
    + 	for file in $(man_HTML); do \
    + 	  if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
    + 	  $(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \
    +--- a/gettext-runtime/intl/Makefile.in
    ++++ b/gettext-runtime/intl/Makefile.in
    +@@ -19,7 +19,7 @@
    + PACKAGE = @PACKAGE@
    + VERSION = @VERSION@
    + 
    +-SHELL = /bin/sh
    ++SHELL = @SHELL@
    + 
    + srcdir = @srcdir@
    + top_srcdir = @top_srcdir@
    diff --git a/libs/gettext-full/patches/001-no_examples_and_tests.patch b/libs/gettext-full/patches/001-no_examples_and_tests.patch
    new file mode 100644
    index 0000000..7cdb389
    --- /dev/null
    +++ b/libs/gettext-full/patches/001-no_examples_and_tests.patch
    @@ -0,0 +1,22 @@
    +--- a/gettext-runtime/Makefile.in
    ++++ b/gettext-runtime/Makefile.in
    +@@ -208,7 +208,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGE
    + ETAGS = etags
    + CTAGS = ctags
    + DIST_SUBDIRS = doc intl intl-java intl-csharp gnulib-lib libasprintf \
    +-	src po man m4 tests
    ++	src po man m4
    + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    + distdir = $(PACKAGE)-$(VERSION)
    + top_distdir = $(distdir)
    +--- a/gettext-tools/Makefile.in
    ++++ b/gettext-tools/Makefile.in
    +@@ -1248,7 +1248,7 @@ top_builddir = @top_builddir@
    + top_srcdir = @top_srcdir@
    + AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
    + ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
    +-SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4 tests gnulib-tests examples
    ++SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4
    + 
    + # Allow users to use "gnulib-tool --update".
    + 
    diff --git a/libs/gettext-full/patches/003-gettext-error_print_progname.patch b/libs/gettext-full/patches/003-gettext-error_print_progname.patch
    new file mode 100644
    index 0000000..9e84551
    --- /dev/null
    +++ b/libs/gettext-full/patches/003-gettext-error_print_progname.patch
    @@ -0,0 +1,11 @@
    +--- a/gettext-tools/libgettextpo/error.h
    ++++ b/gettext-tools/libgettextpo/error.h
    +@@ -49,7 +49,7 @@ extern void error_at_line (int __status,
    + /* If NULL, error will flush stdout, then print on stderr the program
    +    name, a colon and a space.  Otherwise, error will call this
    +    function without parameters instead.  */
    +-extern DLL_VARIABLE void (*error_print_progname) (void);
    ++void (*error_print_progname) (void);
    + 
    + /* This variable is incremented each time `error' is called.  */
    + extern DLL_VARIABLE unsigned int error_message_count;
    diff --git a/libs/gettext-full/patches/004-gnulib-uclibc-sched_param-def.patch b/libs/gettext-full/patches/004-gnulib-uclibc-sched_param-def.patch
    new file mode 100644
    index 0000000..051c374
    --- /dev/null
    +++ b/libs/gettext-full/patches/004-gnulib-uclibc-sched_param-def.patch
    @@ -0,0 +1,17 @@
    +uclibc defines __GLIBC__ but it does not expose struct shed_param as much as glibc
    +and is not needed too per standard. gnulib attempts to use it but we have to account
    +for it because in this case uclibc does not behave like glibc.
    +
    +-Khem
    +
    +--- a/gettext-tools/gnulib-lib/spawn.in.h
    ++++ b/gettext-tools/gnulib-lib/spawn.in.h
    +@@ -31,7 +31,7 @@
    + 
    + /* Get definitions of 'struct sched_param' and 'sigset_t'.
    +    But avoid namespace pollution on glibc systems.  */
    +-#ifndef __GLIBC__
    ++#if !defined __GLIBC__ || defined __UCLIBC__
    + # include 
    + # include 
    + #endif
    diff --git a/libs/gettext-full/patches/005-uclibc-0.9.30-compat.patch b/libs/gettext-full/patches/005-uclibc-0.9.30-compat.patch
    new file mode 100644
    index 0000000..dafa79c
    --- /dev/null
    +++ b/libs/gettext-full/patches/005-uclibc-0.9.30-compat.patch
    @@ -0,0 +1,22 @@
    +--- a/gettext-runtime/intl/localename.c
    ++++ b/gettext-runtime/intl/localename.c
    +@@ -2607,7 +2607,7 @@ gl_locale_name_thread_unsafe (int catego
    +     locale_t thread_locale = uselocale (NULL);
    +     if (thread_locale != LC_GLOBAL_LOCALE)
    +       {
    +-#  if __GLIBC__ >= 2
    ++#  if __GLIBC__ >= 2 && !defined __UCLIBC__
    +         /* Work around an incorrect definition of the _NL_LOCALE_NAME macro in
    +            glibc < 2.12.
    +            See .  */
    +--- a/gettext-tools/gnulib-lib/localename.c
    ++++ b/gettext-tools/gnulib-lib/localename.c
    +@@ -2607,7 +2607,7 @@ gl_locale_name_thread_unsafe (int catego
    +     locale_t thread_locale = uselocale (NULL);
    +     if (thread_locale != LC_GLOBAL_LOCALE)
    +       {
    +-#  if __GLIBC__ >= 2
    ++#  if __GLIBC__ >= 2 && !defined __UCLIBC__
    +         /* Work around an incorrect definition of the _NL_LOCALE_NAME macro in
    +            glibc < 2.12.
    +            See .  */
    diff --git a/libs/gettext-full/patches/100-error_progname.patch b/libs/gettext-full/patches/100-error_progname.patch
    new file mode 100644
    index 0000000..f414703
    --- /dev/null
    +++ b/libs/gettext-full/patches/100-error_progname.patch
    @@ -0,0 +1,10 @@
    +--- a/gettext-runtime/intl/intl-compat.c
    ++++ b/gettext-runtime/intl/intl-compat.c
    +@@ -131,3 +131,7 @@ bind_textdomain_codeset (const char *dom
    + {
    +   return libintl_bind_textdomain_codeset (domainname, codeset);
    + }
    ++
    ++#ifdef __UCLIBC__
    ++DLL_EXPORTED void (*error_print_progname)(void) = NULL;
    ++#endif
    diff --git a/libs/gettext-full/patches/120-uclibc-nolocale.patch b/libs/gettext-full/patches/120-uclibc-nolocale.patch
    new file mode 100644
    index 0000000..3e409eb
    --- /dev/null
    +++ b/libs/gettext-full/patches/120-uclibc-nolocale.patch
    @@ -0,0 +1,11 @@
    +--- a/gettext-runtime/intl/localename.c
    ++++ b/gettext-runtime/intl/localename.c
    +@@ -2780,7 +2780,7 @@ gl_locale_name_posix (int category, cons
    + {
    +   /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
    +      On some systems this can be done by the 'setlocale' function itself.  */
    +-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
    ++#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL && (!defined __UCLIBC__ || defined __UCLIBC_HAS_LOCALE__)
    +   return setlocale (category, NULL);
    + #else
    +   /* On other systems we ignore what setlocale reports and instead look at the
    diff --git a/libs/gettext-full/patches/150-disable_libxml_iconv.patch b/libs/gettext-full/patches/150-disable_libxml_iconv.patch
    new file mode 100644
    index 0000000..a8f5a5c
    --- /dev/null
    +++ b/libs/gettext-full/patches/150-disable_libxml_iconv.patch
    @@ -0,0 +1,22 @@
    +--- a/gettext-tools/gnulib-lib/libxml/xmlversion.in.h
    ++++ b/gettext-tools/gnulib-lib/libxml/xmlversion.in.h
    +@@ -263,7 +263,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(i
    +  *
    +  * Whether iconv support is available
    +  */
    +-#if 1
    ++#if 0
    + #define LIBXML_ICONV_ENABLED
    + #endif
    + 
    +--- a/gnulib-local/lib/libxml/xmlversion.in.h
    ++++ b/gnulib-local/lib/libxml/xmlversion.in.h
    +@@ -263,7 +263,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(i
    +  *
    +  * Whether iconv support is available
    +  */
    +-#if 1
    ++#if 0
    + #define LIBXML_ICONV_ENABLED
    + #endif
    + 
    diff --git a/libs/gettext/Makefile b/libs/gettext/Makefile
    new file mode 100644
    index 0000000..c4b166f
    --- /dev/null
    +++ b/libs/gettext/Makefile
    @@ -0,0 +1,63 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gettext
    +PKG_RELEASE:=2
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/host-build.mk
    +
    +define Package/libintl
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Stub header for the GNU Internationalization library
    +endef
    +
    +define Build/Prepare
    +	$(INSTALL_DIR) $(PKG_BUILD_DIR)
    +	$(CP) ./src/* $(PKG_BUILD_DIR)/
    +endef      
    +
    +define Build/Configure
    +endef
    +
    +define Build/Compile
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/lib/libintl-stub/include
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/include/libintl.h $(1)/usr/lib/libintl-stub/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/share/aclocal
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(1)/usr/share/aclocal/
    +endef
    +
    +define Host/Prepare
    +	mkdir -p $(HOST_BUILD_DIR)
    +endef
    +
    +define Host/Compile
    +
    +endef
    +
    +define Host/Install
    +	$(INSTALL_DIR) $(STAGING_DIR_HOST)/include
    +	$(INSTALL_DATA) ./src/include/libintl.h $(STAGING_DIR_HOST)/include/
    +
    +	$(INSTALL_DIR) $(STAGING_DIR_HOST)/share/aclocal
    +	$(INSTALL_DATA) ./src/m4/* $(STAGING_DIR_HOST)/share/aclocal/
    +endef
    +
    +define Package/libintl/install
    +	$(INSTALL_DIR) $(1)/tmp
    +	touch $(1)/tmp/.libintl-placeholder
    +endef
    +
    +$(eval $(call HostBuild))
    +$(eval $(call BuildPackage,libintl))
    diff --git a/libs/gettext/src/include/libintl.h b/libs/gettext/src/include/libintl.h
    new file mode 100644
    index 0000000..a1157a4
    --- /dev/null
    +++ b/libs/gettext/src/include/libintl.h
    @@ -0,0 +1,53 @@
    +/*
    + * This code is lifted from http://permalink.gmane.org/gmane.linux.gentoo.embedded/3218
    + */
    +
    +#ifndef _LIBINTL_H
    +#define _LIBINTL_H      1
    +
    +#include 
    +
    +/* Undef gettext macros, if any... */
    +#undef gettext
    +#undef dgettext
    +#undef dcgettext
    +#undef ngettext
    +#undef dngettext
    +#undef dcngettext
    +#undef textdomain
    +#undef bindtextdomain
    +#undef bind_textdomain_codeset
    +
    +/* part of locale.h */
    +/* #undef setlocale */
    +
    +#undef _
    +#undef N_
    +
    +/* Define gettext stubs that map back to the original strings */
    +#define gettext(String) (String)
    +#define dgettext(Domain, String) (String)
    +#define dcgettext(Domain, String, Type) (String)
    +
    +#define ngettext(Singular, Plural, Count) \
    +	((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural))
    +
    +#define dngettext(Domain, Singular, Plural, Count) \
    +	((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural))
    +
    +#define dcngettext(Domain, Singular, Plural, Count, Category) \
    +	((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural))
    +
    +#define _(String) (String)
    +#define N_(String) String
    +
    +#ifndef _LOCALE_H
    +/* #define setlocale(Category, Locale) ((char *)NULL) */
    +#endif
    +
    +/* No-ops for textdomain operations */
    +#define bindtextdomain(Domain, Directory) (Domain)
    +#define bind_textdomain_codeset(Domain, Codeset) (Codeset)
    +#define textdomain(String) (String) ?: "messages"
    +
    +#endif  /* _LIBINTL_H */
    diff --git a/libs/gettext/src/m4/codeset.m4 b/libs/gettext/src/m4/codeset.m4
    new file mode 100644
    index 0000000..a53c042
    --- /dev/null
    +++ b/libs/gettext/src/m4/codeset.m4
    @@ -0,0 +1,21 @@
    +# codeset.m4 serial 4 (gettext-0.18)
    +dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, Inc.
    +dnl This file is free software; the Free Software Foundation
    +dnl gives unlimited permission to copy and/or distribute it,
    +dnl with or without modifications, as long as this notice is preserved.
    +
    +dnl From Bruno Haible.
    +
    +AC_DEFUN([AM_LANGINFO_CODESET],
    +[
    +  AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
    +    [AC_TRY_LINK([#include ],
    +      [char* cs = nl_langinfo(CODESET); return !cs;],
    +      [am_cv_langinfo_codeset=yes],
    +      [am_cv_langinfo_codeset=no])
    +    ])
    +  if test $am_cv_langinfo_codeset = yes; then
    +    AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
    +      [Define if you have  and nl_langinfo(CODESET).])
    +  fi
    +])
    diff --git a/libs/gettext/src/m4/gettext.m4 b/libs/gettext/src/m4/gettext.m4
    new file mode 100644
    index 0000000..f84e6a5
    --- /dev/null
    +++ b/libs/gettext/src/m4/gettext.m4
    @@ -0,0 +1,383 @@
    +# gettext.m4 serial 63 (gettext-0.18)
    +dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
    +dnl This file is free software; the Free Software Foundation
    +dnl gives unlimited permission to copy and/or distribute it,
    +dnl with or without modifications, as long as this notice is preserved.
    +dnl
    +dnl This file can can be used in projects which are not available under
    +dnl the GNU General Public License or the GNU Library General Public
    +dnl License but which still want to provide support for the GNU gettext
    +dnl functionality.
    +dnl Please note that the actual code of the GNU gettext library is covered
    +dnl by the GNU Library General Public License, and the rest of the GNU
    +dnl gettext package package is covered by the GNU General Public License.
    +dnl They are *not* in the public domain.
    +
    +dnl Authors:
    +dnl   Ulrich Drepper , 1995-2000.
    +dnl   Bruno Haible , 2000-2006, 2008-2010.
    +
    +dnl Macro to add for using GNU gettext.
    +
    +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
    +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
    +dnl    default (if it is not specified or empty) is 'no-libtool'.
    +dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
    +dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
    +dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
    +dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
    +dnl    depending on --{enable,disable}-{shared,static} and on the presence of
    +dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
    +dnl    $(top_builddir)/intl/libintl.a will be created.
    +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
    +dnl    implementations (in libc or libintl) without the ngettext() function
    +dnl    will be ignored.  If NEEDSYMBOL is specified and is
    +dnl    'need-formatstring-macros', then GNU gettext implementations that don't
    +dnl    support the ISO C 99  formatstring macros will be ignored.
    +dnl INTLDIR is used to find the intl libraries.  If empty,
    +dnl    the value `$(top_builddir)/intl/' is used.
    +dnl
    +dnl The result of the configuration is one of three cases:
    +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
    +dnl    and used.
    +dnl    Catalog format: GNU --> install in $(datadir)
    +dnl    Catalog extension: .mo after installation, .gmo in source tree
    +dnl 2) GNU gettext has been found in the system's C library.
    +dnl    Catalog format: GNU --> install in $(datadir)
    +dnl    Catalog extension: .mo after installation, .gmo in source tree
    +dnl 3) No internationalization, always use English msgid.
    +dnl    Catalog format: none
    +dnl    Catalog extension: none
    +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
    +dnl The use of .gmo is historical (it was needed to avoid overwriting the
    +dnl GNU format catalogs when building on a platform with an X/Open gettext),
    +dnl but we keep it in order not to force irrelevant filename changes on the
    +dnl maintainers.
    +dnl
    +AC_DEFUN([AM_GNU_GETTEXT],
    +[
    +  dnl Argument checking.
    +  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
    +    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
    +])])])])])
    +  ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
    +    [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
    +  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
    +    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
    +])])])])
    +  define([gt_included_intl],
    +    ifelse([$1], [external],
    +      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
    +      [yes]))
    +  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
    +  gt_NEEDS_INIT
    +  AM_GNU_GETTEXT_NEED([$2])
    +
    +  AC_REQUIRE([AM_PO_SUBDIRS])dnl
    +  ifelse(gt_included_intl, yes, [
    +    AC_REQUIRE([AM_INTL_SUBDIR])dnl
    +  ])
    +
    +  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
    +  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
    +  AC_REQUIRE([AC_LIB_RPATH])
    +
    +  dnl Sometimes libintl requires libiconv, so first search for libiconv.
    +  dnl Ideally we would do this search only after the
    +  dnl      if test "$USE_NLS" = "yes"; then
    +  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
    +  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
    +  dnl the configure script would need to contain the same shell code
    +  dnl again, outside any 'if'. There are two solutions:
    +  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
    +  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
    +  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
    +  dnl documented, we avoid it.
    +  ifelse(gt_included_intl, yes, , [
    +    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
    +  ])
    +
    +  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
    +  gt_INTL_MACOSX
    +
    +  dnl Set USE_NLS.
    +  AC_REQUIRE([AM_NLS])
    +
    +  ifelse(gt_included_intl, yes, [
    +    BUILD_INCLUDED_LIBINTL=no
    +    USE_INCLUDED_LIBINTL=no
    +  ])
    +  LIBINTL=
    +  LTLIBINTL=
    +  POSUB=
    +
    +  dnl Add a version number to the cache macros.
    +  case " $gt_needs " in
    +    *" need-formatstring-macros "*) gt_api_version=3 ;;
    +    *" need-ngettext "*) gt_api_version=2 ;;
    +    *) gt_api_version=1 ;;
    +  esac
    +  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
    +  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
    +
    +  dnl If we use NLS figure out what method
    +  if test "$USE_NLS" = "yes"; then
    +    gt_use_preinstalled_gnugettext=no
    +    ifelse(gt_included_intl, yes, [
    +      AC_MSG_CHECKING([whether included gettext is requested])
    +      AC_ARG_WITH([included-gettext],
    +        [  --with-included-gettext use the GNU gettext library included here],
    +        nls_cv_force_use_gnu_gettext=$withval,
    +        nls_cv_force_use_gnu_gettext=no)
    +      AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
    +
    +      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
    +      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
    +    ])
    +        dnl User does not insist on using GNU NLS library.  Figure out what
    +        dnl to use.  If GNU gettext is available we use this.  Else we have
    +        dnl to fall back to GNU NLS library.
    +
    +        if test $gt_api_version -ge 3; then
    +          gt_revision_test_code='
    +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
    +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
    +#endif
    +changequote(,)dnl
    +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
    +changequote([,])dnl
    +'
    +        else
    +          gt_revision_test_code=
    +        fi
    +        if test $gt_api_version -ge 2; then
    +          gt_expression_test_code=' + * ngettext ("", "", 0)'
    +        else
    +          gt_expression_test_code=
    +        fi
    +
    +        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
    +         [AC_TRY_LINK([#include 
    +$gt_revision_test_code
    +extern int _nl_msg_cat_cntr;
    +extern int *_nl_domain_bindings;],
    +            [bindtextdomain ("", "");
    +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
    +            [eval "$gt_func_gnugettext_libc=yes"],
    +            [eval "$gt_func_gnugettext_libc=no"])])
    +
    +        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
    +          dnl Sometimes libintl requires libiconv, so first search for libiconv.
    +          ifelse(gt_included_intl, yes, , [
    +            AM_ICONV_LINK
    +          ])
    +          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
    +          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
    +          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
    +          dnl even if libiconv doesn't exist.
    +          AC_LIB_LINKFLAGS_BODY([intl])
    +          AC_CACHE_CHECK([for GNU gettext in libintl],
    +            [$gt_func_gnugettext_libintl],
    +           [gt_save_CPPFLAGS="$CPPFLAGS"
    +            CPPFLAGS="$CPPFLAGS $INCINTL"
    +            gt_save_LIBS="$LIBS"
    +            LIBS="$LIBS $LIBINTL"
    +            dnl Now see whether libintl exists and does not depend on libiconv.
    +            AC_TRY_LINK([#include 
    +$gt_revision_test_code
    +extern int _nl_msg_cat_cntr;
    +extern
    +#ifdef __cplusplus
    +"C"
    +#endif
    +const char *_nl_expand_alias (const char *);],
    +              [bindtextdomain ("", "");
    +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
    +              [eval "$gt_func_gnugettext_libintl=yes"],
    +              [eval "$gt_func_gnugettext_libintl=no"])
    +            dnl Now see whether libintl exists and depends on libiconv.
    +            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
    +              LIBS="$LIBS $LIBICONV"
    +              AC_TRY_LINK([#include 
    +$gt_revision_test_code
    +extern int _nl_msg_cat_cntr;
    +extern
    +#ifdef __cplusplus
    +"C"
    +#endif
    +const char *_nl_expand_alias (const char *);],
    +                [bindtextdomain ("", "");
    +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
    +               [LIBINTL="$LIBINTL $LIBICONV"
    +                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
    +                eval "$gt_func_gnugettext_libintl=yes"
    +               ])
    +            fi
    +            CPPFLAGS="$gt_save_CPPFLAGS"
    +            LIBS="$gt_save_LIBS"])
    +        fi
    +
    +        dnl If an already present or preinstalled GNU gettext() is found,
    +        dnl use it.  But if this macro is used in GNU gettext, and GNU
    +        dnl gettext is already preinstalled in libintl, we update this
    +        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
    +        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
    +           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
    +                && test "$PACKAGE" != gettext-runtime \
    +                && test "$PACKAGE" != gettext-tools; }; then
    +          gt_use_preinstalled_gnugettext=yes
    +        else
    +          dnl Reset the values set by searching for libintl.
    +          LIBINTL=
    +          LTLIBINTL=
    +          INCINTL=
    +        fi
    +
    +    ifelse(gt_included_intl, yes, [
    +        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
    +          dnl GNU gettext is not found in the C library.
    +          dnl Fall back on included GNU gettext library.
    +          nls_cv_use_gnu_gettext=yes
    +        fi
    +      fi
    +
    +      if test "$nls_cv_use_gnu_gettext" = "yes"; then
    +        dnl Mark actions used to generate GNU NLS library.
    +        BUILD_INCLUDED_LIBINTL=yes
    +        USE_INCLUDED_LIBINTL=yes
    +        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
    +        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
    +        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
    +      fi
    +
    +      CATOBJEXT=
    +      if test "$gt_use_preinstalled_gnugettext" = "yes" \
    +         || test "$nls_cv_use_gnu_gettext" = "yes"; then
    +        dnl Mark actions to use GNU gettext tools.
    +        CATOBJEXT=.gmo
    +      fi
    +    ])
    +
    +    if test -n "$INTL_MACOSX_LIBS"; then
    +      if test "$gt_use_preinstalled_gnugettext" = "yes" \
    +         || test "$nls_cv_use_gnu_gettext" = "yes"; then
    +        dnl Some extra flags are needed during linking.
    +        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
    +        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
    +      fi
    +    fi
    +
    +    if test "$gt_use_preinstalled_gnugettext" = "yes" \
    +       || test "$nls_cv_use_gnu_gettext" = "yes"; then
    +      AC_DEFINE([ENABLE_NLS], [1],
    +        [Define to 1 if translation of program messages to the user's native language
    +   is requested.])
    +    else
    +      USE_NLS=no
    +    fi
    +  fi
    +
    +  AC_MSG_CHECKING([whether to use NLS])
    +  AC_MSG_RESULT([$USE_NLS])
    +  if test "$USE_NLS" = "yes"; then
    +    AC_MSG_CHECKING([where the gettext function comes from])
    +    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
    +      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
    +        gt_source="external libintl"
    +      else
    +        gt_source="libc"
    +      fi
    +    else
    +      gt_source="included intl directory"
    +    fi
    +    AC_MSG_RESULT([$gt_source])
    +  fi
    +
    +  if test "$USE_NLS" = "yes"; then
    +
    +    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
    +      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
    +        AC_MSG_CHECKING([how to link with libintl])
    +        AC_MSG_RESULT([$LIBINTL])
    +        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
    +      fi
    +
    +      dnl For backward compatibility. Some packages may be using this.
    +      AC_DEFINE([HAVE_GETTEXT], [1],
    +       [Define if the GNU gettext() function is already present or preinstalled.])
    +      AC_DEFINE([HAVE_DCGETTEXT], [1],
    +       [Define if the GNU dcgettext() function is already present or preinstalled.])
    +    fi
    +
    +    dnl We need to process the po/ directory.
    +    POSUB=po
    +  fi
    +
    +  ifelse(gt_included_intl, yes, [
    +    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
    +    dnl to 'yes' because some of the testsuite requires it.
    +    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
    +      BUILD_INCLUDED_LIBINTL=yes
    +    fi
    +
    +    dnl Make all variables we use known to autoconf.
    +    AC_SUBST([BUILD_INCLUDED_LIBINTL])
    +    AC_SUBST([USE_INCLUDED_LIBINTL])
    +    AC_SUBST([CATOBJEXT])
    +
    +    dnl For backward compatibility. Some configure.ins may be using this.
    +    nls_cv_header_intl=
    +    nls_cv_header_libgt=
    +
    +    dnl For backward compatibility. Some Makefiles may be using this.
    +    DATADIRNAME=share
    +    AC_SUBST([DATADIRNAME])
    +
    +    dnl For backward compatibility. Some Makefiles may be using this.
    +    INSTOBJEXT=.mo
    +    AC_SUBST([INSTOBJEXT])
    +
    +    dnl For backward compatibility. Some Makefiles may be using this.
    +    GENCAT=gencat
    +    AC_SUBST([GENCAT])
    +
    +    dnl For backward compatibility. Some Makefiles may be using this.
    +    INTLOBJS=
    +    if test "$USE_INCLUDED_LIBINTL" = yes; then
    +      INTLOBJS="\$(GETTOBJS)"
    +    fi
    +    AC_SUBST([INTLOBJS])
    +
    +    dnl Enable libtool support if the surrounding package wishes it.
    +    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
    +    AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
    +  ])
    +
    +  dnl For backward compatibility. Some Makefiles may be using this.
    +  INTLLIBS="$LIBINTL"
    +  AC_SUBST([INTLLIBS])
    +
    +  dnl Make all documented variables known to autoconf.
    +  AC_SUBST([LIBINTL])
    +  AC_SUBST([LTLIBINTL])
    +  AC_SUBST([POSUB])
    +])
    +
    +
    +dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
    +m4_define([gt_NEEDS_INIT],
    +[
    +  m4_divert_text([DEFAULTS], [gt_needs=])
    +  m4_define([gt_NEEDS_INIT], [])
    +])
    +
    +
    +dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
    +AC_DEFUN([AM_GNU_GETTEXT_NEED],
    +[
    +  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
    +])
    +
    +
    +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
    +AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
    diff --git a/libs/gettext/src/m4/intl.m4 b/libs/gettext/src/m4/intl.m4
    new file mode 100644
    index 0000000..335b23c
    --- /dev/null
    +++ b/libs/gettext/src/m4/intl.m4
    @@ -0,0 +1,294 @@
    +# intl.m4 serial 17 (gettext-0.18)
    +dnl Copyright (C) 1995-2009 Free Software Foundation, Inc.
    +dnl This file is free software; the Free Software Foundation
    +dnl gives unlimited permission to copy and/or distribute it,
    +dnl with or without modifications, as long as this notice is preserved.
    +dnl
    +dnl This file can can be used in projects which are not available under
    +dnl the GNU General Public License or the GNU Library General Public
    +dnl License but which still want to provide support for the GNU gettext
    +dnl functionality.
    +dnl Please note that the actual code of the GNU gettext library is covered
    +dnl by the GNU Library General Public License, and the rest of the GNU
    +dnl gettext package package is covered by the GNU General Public License.
    +dnl They are *not* in the public domain.
    +
    +dnl Authors:
    +dnl   Ulrich Drepper , 1995-2000.
    +dnl   Bruno Haible , 2000-2009.
    +
    +AC_PREREQ([2.52])
    +
    +dnl Checks for all prerequisites of the intl subdirectory,
    +dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
    +dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
    +AC_DEFUN([AM_INTL_SUBDIR],
    +[
    +  AC_REQUIRE([AC_PROG_INSTALL])dnl
    +  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
    +  AC_REQUIRE([AC_PROG_CC])dnl
    +  AC_REQUIRE([AC_CANONICAL_HOST])dnl
    +  AC_REQUIRE([gt_GLIBC2])dnl
    +  AC_REQUIRE([AC_PROG_RANLIB])dnl
    +  AC_REQUIRE([gl_VISIBILITY])dnl
    +  AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
    +  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
    +  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
    +  AC_REQUIRE([gt_TYPE_WINT_T])dnl
    +  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
    +  AC_REQUIRE([gt_TYPE_INTMAX_T])
    +  AC_REQUIRE([gt_PRINTF_POSIX])
    +  AC_REQUIRE([gl_GLIBC21])dnl
    +  AC_REQUIRE([gl_XSIZE])dnl
    +  AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl
    +  AC_REQUIRE([gt_INTL_MACOSX])dnl
    +
    +  dnl Support for automake's --enable-silent-rules.
    +  case "$enable_silent_rules" in
    +    yes) INTL_DEFAULT_VERBOSITY=0;;
    +    no)  INTL_DEFAULT_VERBOSITY=1;;
    +    *)   INTL_DEFAULT_VERBOSITY=1;;
    +  esac
    +  AC_SUBST([INTL_DEFAULT_VERBOSITY])
    +
    +  AC_CHECK_TYPE([ptrdiff_t], ,
    +    [AC_DEFINE([ptrdiff_t], [long],
    +       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
    +    ])
    +  AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
    +  AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \
    +    snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
    +
    +  dnl Use the _snprintf function only if it is declared (because on NetBSD it
    +  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
    +  gt_CHECK_DECL(_snprintf, [#include ])
    +  gt_CHECK_DECL(_snwprintf, [#include ])
    +
    +  dnl Use the *_unlocked functions only if they are declared.
    +  dnl (because some of them were defined without being declared in Solaris
    +  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
    +  dnl on Solaris 2.5.1 to run on Solaris 2.6).
    +  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
    +  gt_CHECK_DECL(getc_unlocked, [#include ])
    +
    +  case $gt_cv_func_printf_posix in
    +    *yes) HAVE_POSIX_PRINTF=1 ;;
    +    *) HAVE_POSIX_PRINTF=0 ;;
    +  esac
    +  AC_SUBST([HAVE_POSIX_PRINTF])
    +  if test "$ac_cv_func_asprintf" = yes; then
    +    HAVE_ASPRINTF=1
    +  else
    +    HAVE_ASPRINTF=0
    +  fi
    +  AC_SUBST([HAVE_ASPRINTF])
    +  if test "$ac_cv_func_snprintf" = yes; then
    +    HAVE_SNPRINTF=1
    +  else
    +    HAVE_SNPRINTF=0
    +  fi
    +  AC_SUBST([HAVE_SNPRINTF])
    +  if test "$ac_cv_func_newlocale" = yes; then
    +    HAVE_NEWLOCALE=1
    +  else
    +    HAVE_NEWLOCALE=0
    +  fi
    +  AC_SUBST([HAVE_NEWLOCALE])
    +  if test "$ac_cv_func_wprintf" = yes; then
    +    HAVE_WPRINTF=1
    +  else
    +    HAVE_WPRINTF=0
    +  fi
    +  AC_SUBST([HAVE_WPRINTF])
    +
    +  AM_LANGINFO_CODESET
    +  gt_LC_MESSAGES
    +
    +  dnl Compilation on mingw and Cygwin needs special Makefile rules, because
    +  dnl 1. when we install a shared library, we must arrange to export
    +  dnl    auxiliary pointer variables for every exported variable,
    +  dnl 2. when we install a shared library and a static library simultaneously,
    +  dnl    the include file specifies __declspec(dllimport) and therefore we
    +  dnl    must arrange to define the auxiliary pointer variables for the
    +  dnl    exported variables _also_ in the static library.
    +  if test "$enable_shared" = yes; then
    +    case "$host_os" in
    +      mingw* | cygwin*) is_woe32dll=yes ;;
    +      *) is_woe32dll=no ;;
    +    esac
    +  else
    +    is_woe32dll=no
    +  fi
    +  WOE32DLL=$is_woe32dll
    +  AC_SUBST([WOE32DLL])
    +
    +  dnl On mingw and Cygwin, we can activate special Makefile rules which add
    +  dnl version information to the shared libraries and executables.
    +  case "$host_os" in
    +    mingw* | cygwin*) is_woe32=yes ;;
    +    *) is_woe32=no ;;
    +  esac
    +  WOE32=$is_woe32
    +  AC_SUBST([WOE32])
    +  if test $WOE32 = yes; then
    +    dnl Check for a program that compiles Windows resource files.
    +    AC_CHECK_TOOL([WINDRES], [windres])
    +  fi
    +
    +  dnl Determine whether when creating a library, "-lc" should be passed to
    +  dnl libtool or not. On many platforms, it is required for the libtool option
    +  dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool
    +  dnl in the *.la files - makes it impossible to create multithreaded programs,
    +  dnl because libtool also reorders the -lc to come before the -pthread, and
    +  dnl this disables pthread_create() .
    +  case "$host_os" in
    +    hpux*) LTLIBC="" ;;
    +    *)     LTLIBC="-lc" ;;
    +  esac
    +  AC_SUBST([LTLIBC])
    +
    +  dnl Rename some macros and functions used for locking.
    +  AH_BOTTOM([
    +#define __libc_lock_t                   gl_lock_t
    +#define __libc_lock_define              gl_lock_define
    +#define __libc_lock_define_initialized  gl_lock_define_initialized
    +#define __libc_lock_init                gl_lock_init
    +#define __libc_lock_lock                gl_lock_lock
    +#define __libc_lock_unlock              gl_lock_unlock
    +#define __libc_lock_recursive_t                   gl_recursive_lock_t
    +#define __libc_lock_define_recursive              gl_recursive_lock_define
    +#define __libc_lock_define_initialized_recursive  gl_recursive_lock_define_initialized
    +#define __libc_lock_init_recursive                gl_recursive_lock_init
    +#define __libc_lock_lock_recursive                gl_recursive_lock_lock
    +#define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
    +#define glthread_in_use  libintl_thread_in_use
    +#define glthread_lock_init_func     libintl_lock_init_func
    +#define glthread_lock_lock_func     libintl_lock_lock_func
    +#define glthread_lock_unlock_func   libintl_lock_unlock_func
    +#define glthread_lock_destroy_func  libintl_lock_destroy_func
    +#define glthread_rwlock_init_multithreaded     libintl_rwlock_init_multithreaded
    +#define glthread_rwlock_init_func              libintl_rwlock_init_func
    +#define glthread_rwlock_rdlock_multithreaded   libintl_rwlock_rdlock_multithreaded
    +#define glthread_rwlock_rdlock_func            libintl_rwlock_rdlock_func
    +#define glthread_rwlock_wrlock_multithreaded   libintl_rwlock_wrlock_multithreaded
    +#define glthread_rwlock_wrlock_func            libintl_rwlock_wrlock_func
    +#define glthread_rwlock_unlock_multithreaded   libintl_rwlock_unlock_multithreaded
    +#define glthread_rwlock_unlock_func            libintl_rwlock_unlock_func
    +#define glthread_rwlock_destroy_multithreaded  libintl_rwlock_destroy_multithreaded
    +#define glthread_rwlock_destroy_func           libintl_rwlock_destroy_func
    +#define glthread_recursive_lock_init_multithreaded     libintl_recursive_lock_init_multithreaded
    +#define glthread_recursive_lock_init_func              libintl_recursive_lock_init_func
    +#define glthread_recursive_lock_lock_multithreaded     libintl_recursive_lock_lock_multithreaded
    +#define glthread_recursive_lock_lock_func              libintl_recursive_lock_lock_func
    +#define glthread_recursive_lock_unlock_multithreaded   libintl_recursive_lock_unlock_multithreaded
    +#define glthread_recursive_lock_unlock_func            libintl_recursive_lock_unlock_func
    +#define glthread_recursive_lock_destroy_multithreaded  libintl_recursive_lock_destroy_multithreaded
    +#define glthread_recursive_lock_destroy_func           libintl_recursive_lock_destroy_func
    +#define glthread_once_func            libintl_once_func
    +#define glthread_once_singlethreaded  libintl_once_singlethreaded
    +#define glthread_once_multithreaded   libintl_once_multithreaded
    +])
    +])
    +
    +
    +dnl Checks for the core files of the intl subdirectory:
    +dnl   dcigettext.c
    +dnl   eval-plural.h
    +dnl   explodename.c
    +dnl   finddomain.c
    +dnl   gettextP.h
    +dnl   gmo.h
    +dnl   hash-string.h hash-string.c
    +dnl   l10nflist.c
    +dnl   libgnuintl.h.in (except the *printf stuff)
    +dnl   loadinfo.h
    +dnl   loadmsgcat.c
    +dnl   localealias.c
    +dnl   log.c
    +dnl   plural-exp.h plural-exp.c
    +dnl   plural.y
    +dnl Used by libglocale.
    +AC_DEFUN([gt_INTL_SUBDIR_CORE],
    +[
    +  AC_REQUIRE([AC_C_INLINE])dnl
    +  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
    +  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
    +  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
    +  AC_REQUIRE([AC_FUNC_MMAP])dnl
    +  AC_REQUIRE([gt_INTDIV0])dnl
    +  AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
    +  AC_REQUIRE([gt_INTTYPES_PRI])dnl
    +  AC_REQUIRE([gl_LOCK])dnl
    +
    +  AC_TRY_LINK(
    +    [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }],
    +    [],
    +    [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1],
    +       [Define to 1 if the compiler understands __builtin_expect.])])
    +
    +  AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h])
    +  AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
    +    stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \
    +    argz_stringify argz_next __fsetlocking])
    +
    +  dnl Use the *_unlocked functions only if they are declared.
    +  dnl (because some of them were defined without being declared in Solaris
    +  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
    +  dnl on Solaris 2.5.1 to run on Solaris 2.6).
    +  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
    +  gt_CHECK_DECL([feof_unlocked], [#include ])
    +  gt_CHECK_DECL([fgets_unlocked], [#include ])
    +
    +  AM_ICONV
    +
    +  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
    +  dnl because plural.y uses bison specific features. It requires at least
    +  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
    +  dnl compile.
    +  dnl bison is only needed for the maintainer (who touches plural.y). But in
    +  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
    +  dnl the rule in general Makefile. Now, some people carelessly touch the
    +  dnl files or have a broken "make" program, hence the plural.c rule will
    +  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
    +  dnl present or too old.
    +  AC_CHECK_PROGS([INTLBISON], [bison])
    +  if test -z "$INTLBISON"; then
    +    ac_verc_fail=yes
    +  else
    +    dnl Found it, now check the version.
    +    AC_MSG_CHECKING([version of bison])
    +changequote(<<,>>)dnl
    +    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
    +    case $ac_prog_version in
    +      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
    +      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
    +changequote([,])dnl
    +         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
    +      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
    +    esac
    +    AC_MSG_RESULT([$ac_prog_version])
    +  fi
    +  if test $ac_verc_fail = yes; then
    +    INTLBISON=:
    +  fi
    +])
    +
    +
    +dnl gt_CHECK_DECL(FUNC, INCLUDES)
    +dnl Check whether a function is declared.
    +AC_DEFUN([gt_CHECK_DECL],
    +[
    +  AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1],
    +    [AC_TRY_COMPILE([$2], [
    +#ifndef $1
    +  char *p = (char *) $1;
    +#endif
    +], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
    +  if test $ac_cv_have_decl_$1 = yes; then
    +    gt_value=1
    +  else
    +    gt_value=0
    +  fi
    +  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
    +    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
    +])
    diff --git a/libs/gettext/src/m4/intldir.m4 b/libs/gettext/src/m4/intldir.m4
    new file mode 100644
    index 0000000..ebae76d
    --- /dev/null
    +++ b/libs/gettext/src/m4/intldir.m4
    @@ -0,0 +1,19 @@
    +# intldir.m4 serial 2 (gettext-0.18)
    +dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
    +dnl This file is free software; the Free Software Foundation
    +dnl gives unlimited permission to copy and/or distribute it,
    +dnl with or without modifications, as long as this notice is preserved.
    +dnl
    +dnl This file can can be used in projects which are not available under
    +dnl the GNU General Public License or the GNU Library General Public
    +dnl License but which still want to provide support for the GNU gettext
    +dnl functionality.
    +dnl Please note that the actual code of the GNU gettext library is covered
    +dnl by the GNU Library General Public License, and the rest of the GNU
    +dnl gettext package package is covered by the GNU General Public License.
    +dnl They are *not* in the public domain.
    +
    +AC_PREREQ([2.52])
    +
    +dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory.
    +AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], [])
    diff --git a/libs/gettext/src/m4/intlmacosx.m4 b/libs/gettext/src/m4/intlmacosx.m4
    new file mode 100644
    index 0000000..dd91025
    --- /dev/null
    +++ b/libs/gettext/src/m4/intlmacosx.m4
    @@ -0,0 +1,51 @@
    +# intlmacosx.m4 serial 3 (gettext-0.18)
    +dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
    +dnl This file is free software; the Free Software Foundation
    +dnl gives unlimited permission to copy and/or distribute it,
    +dnl with or without modifications, as long as this notice is preserved.
    +dnl
    +dnl This file can can be used in projects which are not available under
    +dnl the GNU General Public License or the GNU Library General Public
    +dnl License but which still want to provide support for the GNU gettext
    +dnl functionality.
    +dnl Please note that the actual code of the GNU gettext library is covered
    +dnl by the GNU Library General Public License, and the rest of the GNU
    +dnl gettext package package is covered by the GNU General Public License.
    +dnl They are *not* in the public domain.
    +
    +dnl Checks for special options needed on MacOS X.
    +dnl Defines INTL_MACOSX_LIBS.
    +AC_DEFUN([gt_INTL_MACOSX],
    +[
    +  dnl Check for API introduced in MacOS X 10.2.
    +  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
    +    [gt_cv_func_CFPreferencesCopyAppValue],
    +    [gt_save_LIBS="$LIBS"
    +     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
    +     AC_TRY_LINK([#include ],
    +       [CFPreferencesCopyAppValue(NULL, NULL)],
    +       [gt_cv_func_CFPreferencesCopyAppValue=yes],
    +       [gt_cv_func_CFPreferencesCopyAppValue=no])
    +     LIBS="$gt_save_LIBS"])
    +  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
    +    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
    +      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
    +  fi
    +  dnl Check for API introduced in MacOS X 10.3.
    +  AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
    +    [gt_save_LIBS="$LIBS"
    +     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
    +     AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();],
    +       [gt_cv_func_CFLocaleCopyCurrent=yes],
    +       [gt_cv_func_CFLocaleCopyCurrent=no])
    +     LIBS="$gt_save_LIBS"])
    +  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
    +    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
    +      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
    +  fi
    +  INTL_MACOSX_LIBS=
    +  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
    +    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
    +  fi
    +  AC_SUBST([INTL_MACOSX_LIBS])
    +])
    diff --git a/libs/gettext/src/m4/lcmessage.m4 b/libs/gettext/src/m4/lcmessage.m4
    new file mode 100644
    index 0000000..1a70543
    --- /dev/null
    +++ b/libs/gettext/src/m4/lcmessage.m4
    @@ -0,0 +1,31 @@
    +# lcmessage.m4 serial 6 (gettext-0.18)
    +dnl Copyright (C) 1995-2002, 2004-2005, 2008-2010 Free Software Foundation,
    +dnl Inc.
    +dnl This file is free software; the Free Software Foundation
    +dnl gives unlimited permission to copy and/or distribute it,
    +dnl with or without modifications, as long as this notice is preserved.
    +dnl
    +dnl This file can can be used in projects which are not available under
    +dnl the GNU General Public License or the GNU Library General Public
    +dnl License but which still want to provide support for the GNU gettext
    +dnl functionality.
    +dnl Please note that the actual code of the GNU gettext library is covered
    +dnl by the GNU Library General Public License, and the rest of the GNU
    +dnl gettext package package is covered by the GNU General Public License.
    +dnl They are *not* in the public domain.
    +
    +dnl Authors:
    +dnl   Ulrich Drepper , 1995.
    +
    +# Check whether LC_MESSAGES is available in .
    +
    +AC_DEFUN([gt_LC_MESSAGES],
    +[
    +  AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
    +    [AC_TRY_LINK([#include ], [return LC_MESSAGES],
    +       [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])])
    +  if test $gt_cv_val_LC_MESSAGES = yes; then
    +    AC_DEFINE([HAVE_LC_MESSAGES], [1],
    +      [Define if your  file defines LC_MESSAGES.])
    +  fi
    +])
    diff --git a/libs/gettext/src/m4/nls.m4 b/libs/gettext/src/m4/nls.m4
    new file mode 100644
    index 0000000..003704c
    --- /dev/null
    +++ b/libs/gettext/src/m4/nls.m4
    @@ -0,0 +1,32 @@
    +# nls.m4 serial 5 (gettext-0.18)
    +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
    +dnl Inc.
    +dnl This file is free software; the Free Software Foundation
    +dnl gives unlimited permission to copy and/or distribute it,
    +dnl with or without modifications, as long as this notice is preserved.
    +dnl
    +dnl This file can can be used in projects which are not available under
    +dnl the GNU General Public License or the GNU Library General Public
    +dnl License but which still want to provide support for the GNU gettext
    +dnl functionality.
    +dnl Please note that the actual code of the GNU gettext library is covered
    +dnl by the GNU Library General Public License, and the rest of the GNU
    +dnl gettext package package is covered by the GNU General Public License.
    +dnl They are *not* in the public domain.
    +
    +dnl Authors:
    +dnl   Ulrich Drepper , 1995-2000.
    +dnl   Bruno Haible , 2000-2003.
    +
    +AC_PREREQ([2.50])
    +
    +AC_DEFUN([AM_NLS],
    +[
    +  AC_MSG_CHECKING([whether NLS is requested])
    +  dnl Default is enabled NLS
    +  AC_ARG_ENABLE([nls],
    +    [  --disable-nls           do not use Native Language Support],
    +    USE_NLS=$enableval, USE_NLS=yes)
    +  AC_MSG_RESULT([$USE_NLS])
    +  AC_SUBST([USE_NLS])
    +])
    diff --git a/libs/gettext/src/m4/po.m4 b/libs/gettext/src/m4/po.m4
    new file mode 100644
    index 0000000..47f36a4
    --- /dev/null
    +++ b/libs/gettext/src/m4/po.m4
    @@ -0,0 +1,449 @@
    +# po.m4 serial 17 (gettext-0.18)
    +dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
    +dnl This file is free software; the Free Software Foundation
    +dnl gives unlimited permission to copy and/or distribute it,
    +dnl with or without modifications, as long as this notice is preserved.
    +dnl
    +dnl This file can can be used in projects which are not available under
    +dnl the GNU General Public License or the GNU Library General Public
    +dnl License but which still want to provide support for the GNU gettext
    +dnl functionality.
    +dnl Please note that the actual code of the GNU gettext library is covered
    +dnl by the GNU Library General Public License, and the rest of the GNU
    +dnl gettext package package is covered by the GNU General Public License.
    +dnl They are *not* in the public domain.
    +
    +dnl Authors:
    +dnl   Ulrich Drepper , 1995-2000.
    +dnl   Bruno Haible , 2000-2003.
    +
    +AC_PREREQ([2.50])
    +
    +dnl Checks for all prerequisites of the po subdirectory.
    +AC_DEFUN([AM_PO_SUBDIRS],
    +[
    +  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
    +  AC_REQUIRE([AC_PROG_INSTALL])dnl
    +  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
    +  AC_REQUIRE([AM_NLS])dnl
    +
    +  dnl Release version of the gettext macros. This is used to ensure that
    +  dnl the gettext macros and po/Makefile.in.in are in sync.
    +  AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
    +
    +  dnl Perform the following tests also if --disable-nls has been given,
    +  dnl because they are needed for "make dist" to work.
    +
    +  dnl Search for GNU msgfmt in the PATH.
    +  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
    +  dnl The second test excludes FreeBSD msgfmt.
    +  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
    +    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
    +     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
    +    :)
    +  AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
    +
    +  dnl Test whether it is GNU msgfmt >= 0.15.
    +changequote(,)dnl
    +  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
    +    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
    +    *) MSGFMT_015=$MSGFMT ;;
    +  esac
    +changequote([,])dnl
    +  AC_SUBST([MSGFMT_015])
    +changequote(,)dnl
    +  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
    +    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
    +    *) GMSGFMT_015=$GMSGFMT ;;
    +  esac
    +changequote([,])dnl
    +  AC_SUBST([GMSGFMT_015])
    +
    +  dnl Search for GNU xgettext 0.12 or newer in the PATH.
    +  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
    +  dnl The second test excludes FreeBSD xgettext.
    +  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
    +    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
    +     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
    +    :)
    +  dnl Remove leftover from FreeBSD xgettext call.
    +  rm -f messages.po
    +
    +  dnl Test whether it is GNU xgettext >= 0.15.
    +changequote(,)dnl
    +  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
    +    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
    +    *) XGETTEXT_015=$XGETTEXT ;;
    +  esac
    +changequote([,])dnl
    +  AC_SUBST([XGETTEXT_015])
    +
    +  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
    +  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
    +    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
    +
    +  dnl Installation directories.
    +  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
    +  dnl have to define it here, so that it can be used in po/Makefile.
    +  test -n "$localedir" || localedir='${datadir}/locale'
    +  AC_SUBST([localedir])
    +
    +  dnl Support for AM_XGETTEXT_OPTION.
    +  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
    +  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
    +
    +  AC_CONFIG_COMMANDS([po-directories], [[
    +    for ac_file in $CONFIG_FILES; do
    +      # Support "outfile[:infile[:infile...]]"
    +      case "$ac_file" in
    +        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
    +      esac
    +      # PO directories have a Makefile.in generated from Makefile.in.in.
    +      case "$ac_file" in */Makefile.in)
    +        # Adjust a relative srcdir.
    +        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
    +        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
    +        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
    +        # In autoconf-2.13 it is called $ac_given_srcdir.
    +        # In autoconf-2.50 it is called $srcdir.
    +        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
    +        case "$ac_given_srcdir" in
    +          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
    +          /*) top_srcdir="$ac_given_srcdir" ;;
    +          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
    +        esac
    +        # Treat a directory as a PO directory if and only if it has a
    +        # POTFILES.in file. This allows packages to have multiple PO
    +        # directories under different names or in different locations.
    +        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
    +          rm -f "$ac_dir/POTFILES"
    +          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
    +          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
    +          POMAKEFILEDEPS="POTFILES.in"
    +          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
    +          # on $ac_dir but don't depend on user-specified configuration
    +          # parameters.
    +          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
    +            # The LINGUAS file contains the set of available languages.
    +            if test -n "$OBSOLETE_ALL_LINGUAS"; then
    +              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
    +            fi
    +            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
    +            # Hide the ALL_LINGUAS assigment from automake < 1.5.
    +            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
    +            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
    +          else
    +            # The set of available languages was given in configure.in.
    +            # Hide the ALL_LINGUAS assigment from automake < 1.5.
    +            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
    +          fi
    +          # Compute POFILES
    +          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
    +          # Compute UPDATEPOFILES
    +          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
    +          # Compute DUMMYPOFILES
    +          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
    +          # Compute GMOFILES
    +          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
    +          case "$ac_given_srcdir" in
    +            .) srcdirpre= ;;
    +            *) srcdirpre='$(srcdir)/' ;;
    +          esac
    +          POFILES=
    +          UPDATEPOFILES=
    +          DUMMYPOFILES=
    +          GMOFILES=
    +          for lang in $ALL_LINGUAS; do
    +            POFILES="$POFILES $srcdirpre$lang.po"
    +            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
    +            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
    +            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
    +          done
    +          # CATALOGS depends on both $ac_dir and the user's LINGUAS
    +          # environment variable.
    +          INST_LINGUAS=
    +          if test -n "$ALL_LINGUAS"; then
    +            for presentlang in $ALL_LINGUAS; do
    +              useit=no
    +              if test "%UNSET%" != "$LINGUAS"; then
    +                desiredlanguages="$LINGUAS"
    +              else
    +                desiredlanguages="$ALL_LINGUAS"
    +              fi
    +              for desiredlang in $desiredlanguages; do
    +                # Use the presentlang catalog if desiredlang is
    +                #   a. equal to presentlang, or
    +                #   b. a variant of presentlang (because in this case,
    +                #      presentlang can be used as a fallback for messages
    +                #      which are not translated in the desiredlang catalog).
    +                case "$desiredlang" in
    +                  "$presentlang"*) useit=yes;;
    +                esac
    +              done
    +              if test $useit = yes; then
    +                INST_LINGUAS="$INST_LINGUAS $presentlang"
    +              fi
    +            done
    +          fi
    +          CATALOGS=
    +          if test -n "$INST_LINGUAS"; then
    +            for lang in $INST_LINGUAS; do
    +              CATALOGS="$CATALOGS $lang.gmo"
    +            done
    +          fi
    +          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
    +          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
    +          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
    +            if test -f "$f"; then
    +              case "$f" in
    +                *.orig | *.bak | *~) ;;
    +                *) cat "$f" >> "$ac_dir/Makefile" ;;
    +              esac
    +            fi
    +          done
    +        fi
    +        ;;
    +      esac
    +    done]],
    +   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
    +    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
    +    # from automake < 1.5.
    +    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
    +    # Capture the value of LINGUAS because we need it to compute CATALOGS.
    +    LINGUAS="${LINGUAS-%UNSET%}"
    +   ])
    +])
    +
    +dnl Postprocesses a Makefile in a directory containing PO files.
    +AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
    +[
    +  # When this code is run, in config.status, two variables have already been
    +  # set:
    +  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
    +  # - LINGUAS is the value of the environment variable LINGUAS at configure
    +  #   time.
    +
    +changequote(,)dnl
    +  # Adjust a relative srcdir.
    +  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
    +  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
    +  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
    +  # In autoconf-2.13 it is called $ac_given_srcdir.
    +  # In autoconf-2.50 it is called $srcdir.
    +  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
    +  case "$ac_given_srcdir" in
    +    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
    +    /*) top_srcdir="$ac_given_srcdir" ;;
    +    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
    +  esac
    +
    +  # Find a way to echo strings without interpreting backslash.
    +  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
    +    gt_echo='echo'
    +  else
    +    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
    +      gt_echo='printf %s\n'
    +    else
    +      echo_func () {
    +        cat < "$ac_file.tmp"
    +  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
    +    # Add dependencies that cannot be formulated as a simple suffix rule.
    +    for lang in $ALL_LINGUAS; do
    +      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
    +      cat >> "$ac_file.tmp" < /dev/null; then
    +    # Add dependencies that cannot be formulated as a simple suffix rule.
    +    for lang in $ALL_LINGUAS; do
    +      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
    +      cat >> "$ac_file.tmp" <> "$ac_file.tmp" <
    +-             int main (void) { return (log(1) != log(1.)); }],
    +-     AC_MSG_RESULT(none needed),
    +-     glib_save_CFLAGS=$CFLAGS
    +-     CFLAGS="$CFLAGS -std1"
    +-     AC_TRY_RUN([#include 
    +-                 int main (void) { return (log(1) != log(1.)); }],
    +-         AC_MSG_RESULT(-std1),
    +-         AC_MSG_RESULT()
    +-         CFLAGS=$glib_save_CFLAGS
    +-         AC_MSG_WARN(
    +-                [No ANSI prototypes found in library. (-std1 didn't work.)])
    +-     )
    +-)
    +-LIBS=$glib_save_LIBS
    +-
    +-dnl NeXTStep cc seems to need this
    +-AC_MSG_CHECKING([for extra flags for POSIX compliance])
    +-AC_TRY_COMPILE([#include ], [DIR *dir;],
    +-  AC_MSG_RESULT(none needed),
    +-  glib_save_CFLAGS=$CFLAGS
    +-  CFLAGS="$CFLAGS -posix"
    +-  AC_TRY_COMPILE([#include ], [DIR *dir;],
    +-    AC_MSG_RESULT(-posix),
    +-    AC_MSG_RESULT()
    +-    CFLAGS=$glib_save_CFLAGS
    +-    AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
    +-
    + # Checks for header files.
    + AC_HEADER_STDC
    + 
    +@@ -405,11 +366,13 @@ AC_CACHE_VAL(glib_cv_sane_realloc,[
    + 	  return realloc (0, sizeof (int)) == 0;
    + 	}],
    + 	glib_cv_sane_realloc=yes
    +-	AC_DEFINE(REALLOC_0_WORKS)
    + 	,
    + 	glib_cv_sane_realloc=no
    + 	,)
    + ])
    ++if test "x$glib_cv_sane_realloc" = "xyes"; then
    ++	AC_DEFINE(REALLOC_0_WORKS)
    ++fi
    + AC_MSG_RESULT($glib_cv_sane_realloc)
    + 
    + 
    +@@ -485,7 +448,8 @@ AC_CACHE_VAL(glib_cv_va_val_copy,[
    + ])
    + if test "x$glib_cv_va_copy" = "xyes"; then
    +   AC_DEFINE(G_VA_COPY, va_copy)
    +-else if test "x$glib_cv___va_copy" = "xyes"; then
    ++else
    ++if test "x$glib_cv___va_copy" = "xyes"; then
    +   AC_DEFINE(G_VA_COPY, __va_copy)
    + fi
    + fi
    +@@ -505,21 +469,13 @@ G_MODULE_NEED_USCORE=0
    + G_MODULE_BROKEN_RTLD_GLOBAL=0
    + G_MODULE_HAVE_DLERROR=0
    + dnl *** dlopen() and dlsym() in system libraries
    +-if test -z "$G_MODULE_IMPL"; then
    +-	AC_CHECK_FUNC(dlopen,
    +-		AC_CHECK_FUNC(dlsym,
    +-			G_MODULE_IMPL=G_MODULE_IMPL_DL
    +-		,)
    +-	,)
    +-fi
    ++AC_CHECK_FUNC([dlopen], [AC_CHECK_FUNC([dlsym], [G_MODULE_IMPL=G_MODULE_IMPL_DL], [])], [])
    + dnl *** dlopen() and dlsym() in libdl
    + if test -z "$G_MODULE_IMPL"; then
    +-	AC_CHECK_LIB(dl, dlopen,
    +-		AC_CHECK_LIB(dl, dlsym,
    +-			G_MODULE_LIBS=-ldl
    +-			G_MODULE_IMPL=G_MODULE_IMPL_DL
    +-		,)
    +-	,)
    ++	AC_CHECK_LIB([dl], [dlopen], [AC_CHECK_LIB([dl], [dlsym], [
    ++		G_MODULE_LIBS=-ldl
    ++		G_MODULE_IMPL=G_MODULE_IMPL_DL
    ++	], [])], [])
    + fi
    + dnl *** shl_load() in libdld (HP-UX)
    + if test -z "$G_MODULE_IMPL"; then
    +@@ -854,49 +810,68 @@ if test x"$have_threads" != xnone; then
    + 			AC_MSG_CHECKING(whether getpwuid_r is posix like)
    + 			# The signature for the POSIX version is:
    + 			# int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **)
    +-			AC_TRY_COMPILE([#include 
    +-                                        #include 
    +-                                        #include ],
    +-				[getpwuid_r((uid_t)0, NULL, NULL, (size_t)0, NULL);],
    +-				[AC_DEFINE(HAVE_GETPWUID_R_POSIX)
    +-				AC_MSG_RESULT(yes)],
    +-				[AC_MSG_RESULT(no)])
    ++			AC_CACHE_CHECK([whether pthread_getspecific is posix like],
    ++			 	[ac_cv_func_getpwuid_r_posix],
    ++			 	[AC_TRY_COMPILE([#include 
    ++                                 #include 
    ++                                 #include ],
    ++					[getpwuid_r((uid_t)0, NULL, NULL, (size_t)0, NULL);],
    ++					[ac_cv_func_getpwuid_r_posix=yes],
    ++					[ac_cv_func_getpwuid_r_posix=no])]
    ++			)
    ++			if test "x$ac_cv_func_getpwuid_r_posix" = "xyes"; then
    ++				AC_DEFINE(HAVE_GETPWUID_R_POSIX)
    ++			fi
    + 		fi
    + 	fi
    + 	if test x"$have_threads" = xposix; then
    + 		LIBS="$LIBS $G_THREAD_LIBS"
    + 		AC_MSG_CHECKING(whether pthread_getspecific is posix like)
    + 		# PCThreads has pthread_getspecific(pthread_key_t, void **);
    +-		AC_TRY_COMPILE([#include ],
    +-			[pthread_getspecific(0,NULL);],
    +-			[AC_MSG_RESULT(no)],
    +-			[AC_MSG_RESULT(yes)
    +-			AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)])
    ++		AC_CACHE_CHECK([whether pthread_getspecific is posix like],
    ++			[glib_cv_sys_pthread_getspecific_posix],
    ++			[AC_TRY_COMPILE([#include ],
    ++				[pthread_getspecific(0,NULL);],
    ++				[glib_cv_sys_pthread_getspecific_posix=no],
    ++				[glib_cv_sys_pthread_getspecific_posix=yes])]
    ++		)
    ++		if test "x$glib_cv_sys_pthread_getspecific_posix" = "xyes"; then
    ++			AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)
    ++		fi
    + 		AC_MSG_CHECKING(whether pthread_mutex_trylock is posix like)
    + 		# DCE Threads return 1 as success, posix 0. what a mess.
    +-		AC_TRY_RUN([#include 
    +-			pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
    +-			int main () { 
    +-			return !pthread_mutex_trylock (&mutex); }],
    +-			[AC_MSG_RESULT(no)],
    +-			[AC_MSG_RESULT(yes)
    +-			AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)])
    ++		AC_CACHE_CHECK([whether pthread_mutex_trylock is posix like],
    ++			[glib_cv_sys_pthread_mutex_trylock_posix],
    ++			[AC_TRY_RUN([#include 
    ++				pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
    ++				int main () { 
    ++				return !pthread_mutex_trylock (&mutex); }],
    ++			[glib_cv_sys_pthread_mutex_trylock_posix=no],
    ++			[glib_cv_sys_pthread_mutex_trylock_posix=yes])]
    ++		)
    ++		if test "x$glib_cv_sys_pthread_mutex_trylock_posix=no" = "xyes"; then
    ++			AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)
    ++		fi
    + 		AC_MSG_CHECKING(whether pthread_cond_timedwait is posix like)
    + 		# DCE Threads return -1 as failure, posix ETIMEDOUT.
    +-		AC_TRY_RUN([#include 
    +-			int main () { 
    +-			pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
    +-			pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
    +-			struct timeval tval;
    +-			struct timespec tspec;
    +-			gettimeofday (&tval, NULL);
    +-			tspec.tv_sec = tval.tv_sec;
    +-			tspec.tv_nsec = 0;
    +-			return pthread_cond_timedwait (&cond,&mutex,&tspec) 
    +-				!= -1;}],
    +-			[AC_MSG_RESULT(no)],
    +-			[AC_MSG_RESULT(yes)
    +-			AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)])
    ++		AC_CACHE_CHECK([whether pthread_cond_timedwait is posix like],
    ++			[glib_cv_sys_pthread_cond_timedwait_posix],
    ++			[AC_TRY_RUN([#include 
    ++				int main () { 
    ++				pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
    ++				pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
    ++				struct timeval tval;
    ++				struct timespec tspec;
    ++				gettimeofday (&tval, NULL);
    ++				tspec.tv_sec = tval.tv_sec;
    ++				tspec.tv_nsec = 0;
    ++				return pthread_cond_timedwait (&cond,&mutex,&tspec) != -1;}],
    ++			[glib_cv_sys_pthread_cond_timedwait_posix=no],
    ++			[glib_cv_sys_pthread_cond_timedwait_posix=yes])]
    ++		)
    ++		if test "x$glib_cv_sys_pthread_cond_timedwait_posix" = "xyes"; then
    ++			AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)
    ++		fi
    + 	fi
    + 	LIBS="$glib_save_LIBS"
    + 	CFLAGS="$glib_save_CFLAGS"
    +@@ -940,12 +915,14 @@ GLIB_IF_VAR_EQ(mutex_has_default, yes,
    + dnl ****************************************
    + dnl *** GLib POLL* compatibility defines ***
    + dnl ****************************************
    ++if test "x$cross_compiling" != "xyes"; then
    + GLIB_SYSDEFS(
    + [#include 
    + #include ],
    + 	POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32,
    + 	glibconfig-sysdefs.h,
    + 	=)
    ++fi
    + 
    + 
    + dnl ******************************
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -70,7 +70,7 @@ configinclude_DATA = \
    + 
    + CONFIGURE_DEPENDENCIES = acglib.m4		
    + 
    +-BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
    ++BUILT_SOURCES += stamp-gc-h #note: not glibconfig.h
    + glibconfig.h: stamp-gc-h
    + 	@:
    + stamp-gc-h: config.status
    +--- a/gmodule/Makefile.am
    ++++ b/gmodule/Makefile.am
    +@@ -42,7 +42,7 @@ libgplugin_b_la_LDFLAGS = @G_MODULE_LDFL
    + libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ # $(libglib)
    + 
    + noinst_PROGRAMS = testgmodule
    +-testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
    ++testgmodule_LDFLAGS = @G_MODULE_LDFLAGS@
    + testgmodule_LDADD = libgmodule.la $(libglib) @G_MODULE_LIBS@
    + 
    + .PHONY: files release
    diff --git a/libs/glib/patches/002-glibconfig-sysdefs.h.patch b/libs/glib/patches/002-glibconfig-sysdefs.h.patch
    new file mode 100644
    index 0000000..be21652
    --- /dev/null
    +++ b/libs/glib/patches/002-glibconfig-sysdefs.h.patch
    @@ -0,0 +1,9 @@
    +--- /dev/null
    ++++ b/glibconfig-sysdefs.h
    +@@ -0,0 +1,6 @@
    ++#define GLIB_SYSDEF_POLLIN	=1
    ++#define GLIB_SYSDEF_POLLPRI	=2
    ++#define GLIB_SYSDEF_POLLOUT	=4
    ++#define GLIB_SYSDEF_POLLERR	=8
    ++#define GLIB_SYSDEF_POLLHUP	=16
    ++#define GLIB_SYSDEF_POLLNVAL	=32
    diff --git a/libs/glib/patches/003-gcc-3.4-compat.patch b/libs/glib/patches/003-gcc-3.4-compat.patch
    new file mode 100644
    index 0000000..9b58ab5
    --- /dev/null
    +++ b/libs/glib/patches/003-gcc-3.4-compat.patch
    @@ -0,0 +1,22 @@
    +Submitted By: Uwe Düffert (lfs at uwe-dueffert dot de)
    +Date: 2004-05-15
    +Initial Package Version: 1.2.10
    +Origin: self-created, http://www.uwe-dueffert.de/lfs/ownpatches/glib-1.2.10-gcc34-1.patch
    +Upstream Status: not reported
    +Description: fix compilation of glib1 with gcc34
    + 
    +$LastChangedBy: pavlov $
    +$Date: 2007-03-05 02:34:12 +0100 (Mon, 05 Mar 2007) $
    +
    +diff -Naur glib-1.2.10.orig/gstrfuncs.c glib-1.2.10/gstrfuncs.c
    +--- glib-1.2.10.orig/gstrfuncs.c	2004-05-15 13:40:03.556092792 +0000
    ++++ glib-1.2.10/gstrfuncs.c	2004-05-15 13:40:36.712052320 +0000
    +@@ -47,6 +47,8 @@
    +  * inteferes with g_strsignal() on some OSes
    +  */
    + 
    ++#define G_GNUC_PRETTY_FUNCTION
    ++
    + typedef union  _GDoubleIEEE754  GDoubleIEEE754;
    + #define G_IEEE754_DOUBLE_BIAS   (1023)
    + /* multiply with base2 exponent to get base10 exponent (nomal numbers) */
    diff --git a/libs/glib/patches/004-underquoted-glib.m4.patch b/libs/glib/patches/004-underquoted-glib.m4.patch
    new file mode 100644
    index 0000000..4c76b57
    --- /dev/null
    +++ b/libs/glib/patches/004-underquoted-glib.m4.patch
    @@ -0,0 +1,11 @@
    +--- a/glib.m4
    ++++ b/glib.m4
    +@@ -5,7 +5,7 @@ dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTI
    + dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or 
    + dnl gthread is specified in MODULES, pass to glib-config
    + dnl
    +-AC_DEFUN(AM_PATH_GLIB,
    ++AC_DEFUN([AM_PATH_GLIB],
    + [dnl 
    + dnl Get the cflags and libraries from the glib-config script
    + dnl
    diff --git a/libs/glib2/Makefile b/libs/glib2/Makefile
    new file mode 100644
    index 0000000..da44539
    --- /dev/null
    +++ b/libs/glib2/Makefile
    @@ -0,0 +1,100 @@
    +#
    +# Copyright (C) 2007-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=glib2
    +PKG_VERSION:=2.26.1
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=glib-$(PKG_VERSION).tar.bz2
    +PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
    +PKG_SOURCE_URL:=@GNOME/glib/2.26
    +PKG_MD5SUM:=17535accceef55bcb17a74d73f9c2aef
    +
    +PKG_FIXUP:=autoreconf
    +PKG_BUILD_DEPENDS:=glib2/host libpthread zlib
    +HOST_BUILD_DEPENDS:=gettext/host libiconv/host
    +PKG_INSTALL:=1
    +
    +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/host-build.mk
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/glib2
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS)
    +  TITLE:=glib 2.0
    +  URL:=http://www.gtk.org/
    +endef
    +
    +define Package/glib2/description
    +  The GLib library of C routines
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +		--enable-debug=no \
    +		--disable-selinux \
    +        --disable-fam \
    +        $(if $(ICONV_FULL),--with-libiconv=gnu) \
    +		, \
    +		glib_cv_stack_grows=no \
    +		glib_cv_uscore=no \
    +		ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR_HOST)/bin/glib-genmarshal \
    +		ac_cv_func_mmap_fixed_mapped=yes \
    +		ac_cv_func_posix_getpwuid_r=yes \
    +		ac_cv_func_posix_getgrgid_r=yes \
    +	);
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
    +		$(1)/usr/include/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/glib-2.0/include/*.h \
    +		$(1)/usr/include/glib-2.0/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
    +		$(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
    +		$(1)/usr/lib/
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
    +		$(1)/usr/lib/pkgconfig
    +
    +	$(INSTALL_DIR) $(2)/share/aclocal/
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4  \
    +		$(2)/share/aclocal/
    +endef
    +
    +define Package/glib2/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call HostBuild))
    +$(eval $(call BuildPackage,glib2))
    diff --git a/libs/glib2/patches/001-automake-compat.patch b/libs/glib2/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..aa6833a
    --- /dev/null
    +++ b/libs/glib2/patches/001-automake-compat.patch
    @@ -0,0 +1,12 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -2741,7 +2741,8 @@ dnl **************************
    + dnl *** Checks for gtk-doc ***
    + dnl **************************
    + 
    +-GTK_DOC_CHECK([1.15])
    ++AM_CONDITIONAL([ENABLE_GTK_DOC], [false])
    ++AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [false])
    + 
    + AC_ARG_ENABLE(man,
    +               [AC_HELP_STRING([--enable-man],
    diff --git a/libs/glib2/patches/002-missing-gthread-include.patch b/libs/glib2/patches/002-missing-gthread-include.patch
    new file mode 100644
    index 0000000..8def409
    --- /dev/null
    +++ b/libs/glib2/patches/002-missing-gthread-include.patch
    @@ -0,0 +1,10 @@
    +--- a/glib/gatomic.c
    ++++ b/glib/gatomic.c
    +@@ -881,6 +881,7 @@ g_atomic_pointer_compare_and_exchange (v
    + #endif /* DEFINE_WITH_WIN32_INTERLOCKED */
    + 
    + #ifdef DEFINE_WITH_MUTEXES
    ++#include "gthread.h"
    + /* We have to use the slow, but safe locking method */
    + static GMutex *g_atomic_mutex; 
    + 
    diff --git a/libs/glib2/patches/010-move-iconv-to-libs.patch b/libs/glib2/patches/010-move-iconv-to-libs.patch
    new file mode 100644
    index 0000000..89b3fea
    --- /dev/null
    +++ b/libs/glib2/patches/010-move-iconv-to-libs.patch
    @@ -0,0 +1,10 @@
    +--- a/glib-2.0.pc.in
    ++++ b/glib-2.0.pc.in
    +@@ -10,6 +10,5 @@ glib_mkenums=glib-mkenums
    + Name: GLib
    + Description: C Utility Library
    + Version: @VERSION@
    +-Libs: -L${libdir} -lglib-2.0 @INTLLIBS@
    +-Libs.private: @ICONV_LIBS@
    ++Libs: -L${libdir} -lglib-2.0 @INTLLIBS@ @ICONV_LIBS@
    + Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include @GLIB_EXTRA_CFLAGS@
    diff --git a/libs/glib2/patches/020-no-docs-tests-translations.patch b/libs/glib2/patches/020-no-docs-tests-translations.patch
    new file mode 100644
    index 0000000..0460640
    --- /dev/null
    +++ b/libs/glib2/patches/020-no-docs-tests-translations.patch
    @@ -0,0 +1,81 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -3737,18 +3737,6 @@ gio/fen/Makefile
    + gio/fam/Makefile
    + gio/win32/Makefile
    + gio/tests/Makefile
    +-po/Makefile.in
    +-docs/Makefile
    +-docs/reference/Makefile
    +-docs/reference/glib/Makefile
    +-docs/reference/glib/version.xml
    +-docs/reference/gobject/Makefile
    +-docs/reference/gobject/version.xml
    +-docs/reference/gio/Makefile
    +-docs/reference/gio/version.xml
    +-tests/Makefile
    +-tests/gobject/Makefile
    +-tests/refcount/Makefile
    + m4macros/Makefile
    + ])
    + 
    +--- a/gio/Makefile.am
    ++++ b/gio/Makefile.am
    +@@ -264,8 +264,6 @@ giowin32include_HEADERS = \
    + 
    + endif
    + 
    +-SUBDIRS += tests
    +-
    + libgio_2_0_la_SOURCES =		\
    + 	gappinfo.c 		\
    + 	gasynchelper.c 		\
    +--- a/glib/Makefile.am
    ++++ b/glib/Makefile.am
    +@@ -48,9 +48,9 @@ else
    + gatomic_c = gatomic.c
    + endif
    + 
    +-SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
    ++SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre .
    + 
    +-DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
    ++DIST_SUBDIRS = libcharset gnulib pcre update-pcre
    + 
    + AM_CPPFLAGS = 				\
    + 	$(glib_INCLUDES) 		\
    +--- a/gobject/Makefile.am
    ++++ b/gobject/Makefile.am
    +@@ -4,7 +4,7 @@
    + ## Process this file with automake to produce Makefile.in
    + include $(top_srcdir)/Makefile.decl
    + 
    +-SUBDIRS = . tests
    ++SUBDIRS = .
    + 
    + CLEANFILES=
    + 
    +--- a/gthread/Makefile.am
    ++++ b/gthread/Makefile.am
    +@@ -1,8 +1,8 @@
    + ## Process this file with automake to produce Makefile.in
    + include $(top_srcdir)/Makefile.decl
    + 
    +-SUBDIRS = . tests
    +-DIST_SUBDIRS = tests
    ++SUBDIRS = .
    ++DIST_SUBDIRS = 
    + 
    + AM_CPPFLAGS = 				\
    + 	$(glib_INCLUDES) 		\
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.decl
    + 
    + ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
    + 
    +-SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs
    ++SUBDIRS = . m4macros glib gmodule gthread gobject gio
    + DIST_SUBDIRS = $(SUBDIRS) build
    + 
    + bin_SCRIPTS = glib-gettextize
    diff --git a/libs/glibmm/Makefile b/libs/glibmm/Makefile
    new file mode 100644
    index 0000000..e8a3623
    --- /dev/null
    +++ b/libs/glibmm/Makefile
    @@ -0,0 +1,65 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=glibmm
    +PKG_VERSION:=2.22.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@GNOME/glibmm/2.22
    +PKG_MD5SUM:=1a96c7fde75ddbb421bc23fb4aa7adba
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/glibmm
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libsigcxx +glib2 +libstdcpp
    +  TITLE:=glibmm
    +  URL:=http://www.gtk.org/
    +endef
    +
    +define Package/glibmm/description
    +c++ bindings for glib2
    +endef
    +
    +TARGET_LDFLAGS+= \
    +	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
    +
    +CONFIGURE_ARGS+= --disable-fulldocs
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/* \
    +		$(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/* \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
    +		$(1)/usr/lib/pkgconfig
    +endef
    +
    +define Package/glibmm/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,glibmm))
    diff --git a/libs/glibmm/patches/100-disable-examples-tests-doc-tools-scripts.patch b/libs/glibmm/patches/100-disable-examples-tests-doc-tools-scripts.patch
    new file mode 100644
    index 0000000..4cbfefb
    --- /dev/null
    +++ b/libs/glibmm/patches/100-disable-examples-tests-doc-tools-scripts.patch
    @@ -0,0 +1,125 @@
    +diff -ruN glibmm-2.22.1.orig/configure glibmm-2.22.1/configure
    +--- glibmm-2.22.1.orig/configure	2009-09-21 18:07:01.000000000 +0200
    ++++ glibmm-2.22.1/configure	2009-11-05 17:32:32.000000000 +0100
    +@@ -18361,7 +18361,7 @@
    +   fi
    + 
    + 
    +-ac_config_files="$ac_config_files Makefile tools/Makefile tools/gmmproc tools/generate_wrap_init.pl glib/${GLIBMM_MODULE_NAME}.pc:glib/glibmm.pc.in glib/${GLIBMM_MODULE_NAME}-uninstalled.pc:glib/glibmm-uninstalled.pc.in glib/src/Makefile glib/glibmm/Makefile gio/${GIOMM_MODULE_NAME}.pc:gio/giomm.pc.in gio/${GIOMM_MODULE_NAME}-uninstalled.pc:gio/giomm-uninstalled.pc.in gio/src/Makefile gio/giomm/Makefile tests/Makefile examples/Makefile docs/Makefile docs/reference/Doxyfile MSVC_Net2005/glibmm/glibmm.rc MSVC_Net2005/giomm/giomm.rc MSVC_Net2008/glibmm/glibmm.rc MSVC_Net2008/giomm/giomm.rc"
    ++ac_config_files="$ac_config_files Makefile glib/${GLIBMM_MODULE_NAME}.pc:glib/glibmm.pc.in glib/${GLIBMM_MODULE_NAME}-uninstalled.pc:glib/glibmm-uninstalled.pc.in glib/src/Makefile glib/glibmm/Makefile gio/${GIOMM_MODULE_NAME}.pc:gio/giomm.pc.in gio/${GIOMM_MODULE_NAME}-uninstalled.pc:gio/giomm-uninstalled.pc.in gio/src/Makefile gio/giomm/Makefile MSVC_Net2005/glibmm/glibmm.rc MSVC_Net2005/giomm/giomm.rc MSVC_Net2008/glibmm/glibmm.rc MSVC_Net2008/giomm/giomm.rc"
    + 
    + 
    + # Copy the generated configuration headers into the MSVC project directories.
    +@@ -19400,9 +19400,6 @@
    +     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
    +     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
    +     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
    +-    "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
    +-    "tools/gmmproc") CONFIG_FILES="$CONFIG_FILES tools/gmmproc" ;;
    +-    "tools/generate_wrap_init.pl") CONFIG_FILES="$CONFIG_FILES tools/generate_wrap_init.pl" ;;
    +     "glib/${GLIBMM_MODULE_NAME}.pc") CONFIG_FILES="$CONFIG_FILES glib/${GLIBMM_MODULE_NAME}.pc:glib/glibmm.pc.in" ;;
    +     "glib/${GLIBMM_MODULE_NAME}-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES glib/${GLIBMM_MODULE_NAME}-uninstalled.pc:glib/glibmm-uninstalled.pc.in" ;;
    +     "glib/src/Makefile") CONFIG_FILES="$CONFIG_FILES glib/src/Makefile" ;;
    +@@ -19411,10 +19408,6 @@
    +     "gio/${GIOMM_MODULE_NAME}-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES gio/${GIOMM_MODULE_NAME}-uninstalled.pc:gio/giomm-uninstalled.pc.in" ;;
    +     "gio/src/Makefile") CONFIG_FILES="$CONFIG_FILES gio/src/Makefile" ;;
    +     "gio/giomm/Makefile") CONFIG_FILES="$CONFIG_FILES gio/giomm/Makefile" ;;
    +-    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
    +-    "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
    +-    "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
    +-    "docs/reference/Doxyfile") CONFIG_FILES="$CONFIG_FILES docs/reference/Doxyfile" ;;
    +     "MSVC_Net2005/glibmm/glibmm.rc") CONFIG_FILES="$CONFIG_FILES MSVC_Net2005/glibmm/glibmm.rc" ;;
    +     "MSVC_Net2005/giomm/giomm.rc") CONFIG_FILES="$CONFIG_FILES MSVC_Net2005/giomm/giomm.rc" ;;
    +     "MSVC_Net2008/glibmm/glibmm.rc") CONFIG_FILES="$CONFIG_FILES MSVC_Net2008/glibmm/glibmm.rc" ;;
    +diff -ruN glibmm-2.22.1.orig/configure.ac glibmm-2.22.1/configure.ac
    +--- glibmm-2.22.1.orig/configure.ac	2009-09-21 18:03:52.000000000 +0200
    ++++ glibmm-2.22.1/configure.ac	2009-11-05 17:32:41.000000000 +0100
    +@@ -124,9 +124,6 @@
    + GLIBMM_ARG_ENABLE_API_DEFAULT_SIGNAL_HANDLERS
    + 
    + AC_CONFIG_FILES([Makefile
    +-                 tools/Makefile
    +-                 tools/gmmproc
    +-                 tools/generate_wrap_init.pl
    +                  glib/${GLIBMM_MODULE_NAME}.pc:glib/glibmm.pc.in
    +                  glib/${GLIBMM_MODULE_NAME}-uninstalled.pc:glib/glibmm-uninstalled.pc.in
    +                  glib/src/Makefile
    +@@ -135,10 +132,6 @@
    +                  gio/${GIOMM_MODULE_NAME}-uninstalled.pc:gio/giomm-uninstalled.pc.in
    +                  gio/src/Makefile
    +                  gio/giomm/Makefile
    +-                 tests/Makefile
    +-                 examples/Makefile
    +-                 docs/Makefile
    +-                 docs/reference/Doxyfile
    +                  MSVC_Net2005/glibmm/glibmm.rc
    +                  MSVC_Net2005/giomm/giomm.rc
    +                  MSVC_Net2008/glibmm/glibmm.rc
    +diff -ruN glibmm-2.22.1.orig/Makefile.am glibmm-2.22.1/Makefile.am
    +--- glibmm-2.22.1.orig/Makefile.am	2009-09-08 18:12:29.000000000 +0200
    ++++ glibmm-2.22.1/Makefile.am	2009-11-05 17:33:01.000000000 +0100
    +@@ -28,7 +28,7 @@
    + else
    + doc_subdirs =
    + endif
    +-SUBDIRS = tools $(src_subdirs) glib/glibmm gio/giomm tests examples $(doc_subdirs)
    ++SUBDIRS = $(src_subdirs) glib/glibmm gio/giomm
    + 
    + glibmm_includedir = $(includedir)/$(GLIBMM_MODULE_NAME)
    + glibmm_include_HEADERS = glib/glibmm.h
    +diff -ruN glibmm-2.22.1.orig/Makefile.in glibmm-2.22.1/Makefile.in
    +--- glibmm-2.22.1.orig/Makefile.in	2009-09-21 18:07:00.000000000 +0200
    ++++ glibmm-2.22.1/Makefile.in	2009-11-05 17:32:54.000000000 +0100
    +@@ -137,8 +137,7 @@
    + 	distdir dist dist-all distcheck
    + ETAGS = etags
    + CTAGS = ctags
    +-DIST_SUBDIRS = tools glib/src gio/src glib/glibmm gio/giomm tests \
    +-	examples docs
    ++DIST_SUBDIRS = glib/src gio/src glib/glibmm gio/giomm
    + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    + distdir = $(PACKAGE)-$(VERSION)
    + top_distdir = $(distdir)
    +@@ -330,7 +329,7 @@
    + @MAINTAINER_MODE_TRUE@src_subdirs = glib/src gio/src
    + @ENABLE_DOCUMENTATION_FALSE@doc_subdirs = 
    + @ENABLE_DOCUMENTATION_TRUE@doc_subdirs = docs
    +-SUBDIRS = tools $(src_subdirs) glib/glibmm gio/giomm tests examples $(doc_subdirs)
    ++SUBDIRS = $(src_subdirs) glib/glibmm gio/giomm
    + glibmm_includedir = $(includedir)/$(GLIBMM_MODULE_NAME)
    + glibmm_include_HEADERS = glib/glibmm.h
    + glibmm_libincludedir = $(libdir)/$(GLIBMM_MODULE_NAME)/include
    +@@ -350,15 +349,7 @@
    + 	glibmm/glibmm.vcproj			\
    + 	glibmm/glibmmconfig.h			\
    + 	giomm/giomm.vcproj			\
    +-	giomm/giommconfig.h			\
    +-	tests/giomm_simple/giomm_simple.vcproj	\
    +-	tests/glibmm_value/glibmm_value.vcproj	\
    +-	examples/dispatcher/dispatcher.vcproj	\
    +-	examples/dispatcher2/dispatcher2.vcproj	\
    +-	examples/markup/markup.vcproj		\
    +-	examples/options/options.vcproj		\
    +-	examples/thread/thread.vcproj		\
    +-	examples/thread_pool/thread_pool.vcproj
    ++	giomm/giommconfig.h
    + 
    + msvc_net2008_data = \
    + 	blank.cpp				\
    +@@ -368,15 +359,7 @@
    + 	glibmm/glibmm.vcproj			\
    + 	glibmm/glibmmconfig.h			\
    + 	giomm/giomm.vcproj			\
    +-	giomm/giommconfig.h			\
    +-	tests/giomm_simple/giomm_simple.vcproj	\
    +-	tests/glibmm_value/glibmm_value.vcproj	\
    +-	examples/dispatcher/dispatcher.vcproj	\
    +-	examples/dispatcher2/dispatcher2.vcproj	\
    +-	examples/markup/markup.vcproj		\
    +-	examples/options/options.vcproj		\
    +-	examples/thread/thread.vcproj		\
    +-	examples/thread_pool/thread_pool.vcproj
    ++	giomm/giommconfig.h
    + 
    + text_files = COPYING.tools README.SUN README.win32
    + msvc_files = $(addprefix MSVC_Net2005/,$(msvc_net2005_data)) \
    diff --git a/libs/gmp/Makefile b/libs/gmp/Makefile
    new file mode 100644
    index 0000000..5f2d46b
    --- /dev/null
    +++ b/libs/gmp/Makefile
    @@ -0,0 +1,62 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gmp
    +PKG_VERSION:=4.3.1
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@GNU/gmp
    +PKG_MD5SUM:=26cec15a90885042dd4a15c4003b08ae
    +
    +PKG_BUILD_PARALLEL:=1
    +PKG_INSTALL:=1
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libgmp
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=GNU multiprecision arithmetic library
    +  URL:=http://gmplib.org/
    +endef
    +
    +define Package/libgmp/description
    +	GMP is a free library for arbitrary precision arithmetic, operating on
    +	signed integers, rational numbers, and floating point numbers.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +define Build/Compile
    +	$(call Build/Compile/Default, \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		CC="$(TARGET_CC)" \
    +		all \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libgmp/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libgmp))
    diff --git a/libs/gnutls/Makefile b/libs/gnutls/Makefile
    new file mode 100644
    index 0000000..e38f537
    --- /dev/null
    +++ b/libs/gnutls/Makefile
    @@ -0,0 +1,186 @@
    +#
    +# Copyright (C) 2005-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gnutls
    +PKG_VERSION:=2.8.6
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@GNU/gnutls \
    +	ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/
    +PKG_MD5SUM:=eb0a6d7d3cb9ac684d971c14f9f6d3ba
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +PKG_LIBTOOL_PATHS:=. lib libextra
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/gnutls/Default
    +  SUBMENU:=SSL
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=GNU TLS
    +  URL:=http://www.gnu.org/software/gnutls/
    +endef
    +
    +define Package/gnutls/Default/description
    + GnuTLS is a project that aims to develop a library which provides a
    + secure layer, over a reliable transport layer. Currently the GnuTLS
    + library implements the SSL 3.0, TLS 1.0, and TLS 1.1 protocols.
    +endef
    +
    +
    +define Package/certtool
    +$(call Package/gnutls/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  TITLE+= (certool utility)
    +  DEPENDS+= +libgnutls +libgnutls-extra +libncurses +libreadline
    +endef
    +
    +define Package/certtool/description
    +$(call Package/gnutls/Default/description)
    + This package contains the GnuTLS certtool utility.
    +endef
    +
    +
    +define Package/gnutls-utils
    +$(call Package/gnutls/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  TITLE+= (utilities)
    +  DEPENDS+= +libgnutls +libgnutls-extra
    +endef
    +
    +define Package/gnutls-utils/description
    +$(call Package/gnutls/Default/description)
    + This package contains the GnuTLS gnutls-cli, gnutls-serv, psktool,
    + and srptool utilities.
    +endef
    +
    +
    +define Package/libgnutls
    +$(call Package/gnutls/Default)
    +  TITLE+= (library)
    +  DEPENDS+= +zlib +libgcrypt +libgpg-error
    +endef
    +
    +define Package/libgnutls/description
    +$(call Package/gnutls/Default/description)
    + This package contains the GnuTLS shared library, needed by other programs.
    +endef
    +
    +
    +define Package/libgnutls-extra
    +$(call Package/gnutls/Default)
    +  TITLE+= (extra library)
    +  DEPENDS+= +libgnutls
    +endef
    +
    +define Package/libgnutls-extra/description
    +$(call Package/gnutls/Default/description)
    + This package contains the GnuTLS extra shared library.
    +endef
    +
    +
    +define Package/libgnutls-openssl
    +$(call Package/gnutls/Default)
    +  TITLE+= (OpenSSL compat library)
    +  DEPENDS+= +libgnutls
    +endef
    +
    +define Package/libgnutls-openssl/description
    +$(call Package/gnutls/Default/description)
    + This package contains the GnuTLS OpenSSL compatibility layer shared library.
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-openpgp-authentication \
    +	--disable-guile \
    +	--with-included-libcfg \
    +	--with-included-libtasn1 \
    +	--with-libgcrypt-prefix="$(STAGING_DIR)/usr" \
    +	--with-libreadline-prefix="$(STAGING_DIR)/usr" \
    +	--with-libz-prefix="$(STAGING_DIR)/usr" \
    +	--without-lzo \
    +
    +# XXX: AM_CFLAGS duplicates with CFLAGS
    +MAKE_FLAGS:= \
    +	AM_CFLAGS="" \
    +
    +TARGET_CFLAGS += $(FPIC)
    +TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
    +
    +define Build/Configure
    +	$(SED) 's,-I$$$${includedir},,g' $(PKG_BUILD_DIR)/configure
    +	$(SED) 's,-L$$$${libdir},,g' $(PKG_BUILD_DIR)/configure
    +	$(call Build/Configure/Default)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/gnutls \
    +		$(1)/usr/include/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} \
    +		$(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/certtool/conffiles
    +/etc/gnutls/certtool.cfg
    +endef
    +
    +define Package/certtool/install
    +	$(INSTALL_DIR) $(1)/etc/gnutls
    +	$(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/certtool.cfg $(1)/etc/gnutls/
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/certtool $(1)/usr/bin/
    +endef
    +
    +
    +define Package/gnutls-utils/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} \
    +		$(PKG_INSTALL_DIR)/usr/bin/psktool \
    +		$(PKG_INSTALL_DIR)/usr/bin/srptool \
    +		$(1)/usr/bin/
    +endef
    +
    +
    +define Package/libgnutls/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls.so.* $(1)/usr/lib/
    +endef
    +
    +
    +define Package/libgnutls-extra/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-extra.so.* $(1)/usr/lib/
    +endef
    +
    +
    +define Package/libgnutls-openssl/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-openssl.so.* $(1)/usr/lib/
    +endef
    +
    +
    +$(eval $(call BuildPackage,certtool))
    +$(eval $(call BuildPackage,gnutls-utils))
    +$(eval $(call BuildPackage,libgnutls))
    +$(eval $(call BuildPackage,libgnutls-extra))
    +$(eval $(call BuildPackage,libgnutls-openssl))
    diff --git a/libs/gnutls/patches/001-no_doc_tests_po.patch b/libs/gnutls/patches/001-no_doc_tests_po.patch
    new file mode 100644
    index 0000000..50c3465
    --- /dev/null
    +++ b/libs/gnutls/patches/001-no_doc_tests_po.patch
    @@ -0,0 +1,65 @@
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -147,7 +147,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGE
    + 	distdir dist dist-all distcheck
    + ETAGS = etags
    + CTAGS = ctags
    +-DIST_SUBDIRS = lib libextra gl src doc tests guile
    ++DIST_SUBDIRS = lib libextra gl src guile
    + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    + distdir = $(PACKAGE)-$(VERSION)
    + top_distdir = $(distdir)
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -22,7 +22,7 @@
    + 
    + DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
    + 
    +-SUBDIRS = lib libextra gl src doc tests
    ++SUBDIRS = lib libextra gl src
    + 
    + if HAVE_GUILE
    + SUBDIRS += guile
    +--- a/lib/Makefile.in
    ++++ b/lib/Makefile.in
    +@@ -274,7 +274,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGE
    + 	distdir dist dist-all distcheck
    + ETAGS = etags
    + CTAGS = ctags
    +-DIST_SUBDIRS = gl po includes x509 minitasn1 opencdk openpgp
    ++DIST_SUBDIRS = gl includes x509 minitasn1 opencdk openpgp
    + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    + distdir = $(PACKAGE)-$(VERSION)
    + top_distdir = $(distdir)
    +@@ -819,7 +819,7 @@ top_build_prefix = @top_build_prefix@
    + top_builddir = @top_builddir@
    + top_srcdir = @top_srcdir@
    + ACLOCAL_AMFLAGS = -I m4 -I gl/m4
    +-SUBDIRS = gl po includes x509 $(am__append_1) $(am__append_2)
    ++SUBDIRS = gl includes x509 $(am__append_1) $(am__append_2)
    + AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
    + AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(srcdir)/gl \
    + 	-I$(builddir)/gl -I$(srcdir)/includes -I$(builddir)/includes \
    +--- a/lib/Makefile.am
    ++++ b/lib/Makefile.am
    +@@ -22,7 +22,7 @@
    + 
    + ACLOCAL_AMFLAGS = -I m4 -I gl/m4
    + 
    +-SUBDIRS = gl po includes x509
    ++SUBDIRS = gl includes x509
    + if ENABLE_MINITASN1
    + SUBDIRS += minitasn1
    + endif
    +--- a/lib/configure.ac
    ++++ b/lib/configure.ac
    +@@ -37,9 +37,6 @@ AC_PROG_LIBTOOL
    + 
    + LIBGNUTLS_HOOKS
    + 
    +-AM_GNU_GETTEXT([external])
    +-AM_GNU_GETTEXT_VERSION([0.17])
    +-
    + AC_C_BIGENDIAN
    + 
    + # For includes/gnutls/gnutls.h.in.
    diff --git a/libs/gperf/Makefile b/libs/gperf/Makefile
    new file mode 100644
    index 0000000..6e8115f
    --- /dev/null
    +++ b/libs/gperf/Makefile
    @@ -0,0 +1,39 @@
    +# 
    +# Copyright (C) 2006-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gperf
    +PKG_VERSION:=3.0.3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@GNU/gperf
    +PKG_MD5SUM:=cc20e58975a38075440423c8fb85fd00
    +PKG_HOST_ONLY=1
    +
    +include $(INCLUDE_DIR)/host-build.mk
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/gperf
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Perfect hash function generator
    +  BUILDONLY:=1
    +  URL:=http://www.gnu.org/software/gperf
    +endef
    +
    +define Package/lua/Default/description
    + gperf is a perfect hash function generator
    +endef
    +
    +define Host/Install
    +	$(MAKE) -C $(HOST_BUILD_DIR) install
    +endef
    +
    +
    +$(eval $(call HostBuild))
    +$(eval $(call BuildPackage,gperf))
    diff --git a/libs/gsl/Makefile b/libs/gsl/Makefile
    new file mode 100644
    index 0000000..c9c5e19
    --- /dev/null
    +++ b/libs/gsl/Makefile
    @@ -0,0 +1,52 @@
    +#
    +# Copyright (C) 2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gsl
    +PKG_VERSION:=1.9
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@GNU/gsl
    +PKG_MD5SUM:=81dca4362ae8d2aa1547b7d010881e43
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libgsl
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=@!TARGET_avr32
    +  TITLE:=GNU Scientific Library
    +  URL:=http://www.gnu.org/software/gsl/
    +endef
    +
    +define Package/libgsl/description
    +	The library provides a wide range of mathematical routines such as
    +	random number generators, special functions and least-squares fitting.
    +	There are over 1000 functions in total with an extensive test suite.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Package/libgsl/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsl.so* $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgslcblas.so* $(1)/usr/lib/
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/gsl $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/gsl/*.h $(1)/usr/include/gsl
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsl.* $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgslcblas.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libgsl))
    diff --git a/libs/gsm/Makefile b/libs/gsm/Makefile
    new file mode 100644
    index 0000000..916105d
    --- /dev/null
    +++ b/libs/gsm/Makefile
    @@ -0,0 +1,93 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gsm
    +PKG_VERSION:=1.0.13
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://user.cs.tu-berlin.de/~jutta/gsm/
    +PKG_MD5SUM:=c1ba392ce61dc4aff1c29ea4e92f6df4
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-1.0-pl13
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/gsm/Default
    +  TITLE:=GSM transcoding
    +  URL:=http://user.cs.tu-berlin.de/~jutta/toast.html
    +endef
    +
    +define Package/gsm/description/Default
    + An implementation of the European GSM 06.10 provisional standard 
    + for full-rate speech transcoding, prI-ETS 300 036, which uses 
    + RPE/LTP (residual pulse excitation/long term prediction) coding 
    + at 13 kbit/s.
    +endef
    +
    +define Package/libgsm
    +$(call Package/gsm/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= library
    +endef
    +
    +define Package/libgsm/description
    +$(call Package/gsm/description/Default)
    + This package contains a shared GSM transcoding library, used by other
    + programs.
    +endef
    +
    +define Package/gsm-utils
    +$(call Package/gsm/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+libgsm
    +  TITLE+= utilities
    +endef
    +
    +define Package/gsm-utils/description
    +$(call Package/gsm/description/Default)
    + This package contains GSM transcoding utilities.
    +endef
    +
    +define Build/Configure
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		LD="$(TARGET_CC)" \
    +		COPTS="$(TARGET_CFLAGS)" \
    +		INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Package/libgsm/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/gsm-utils/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/toast $(1)/usr/bin/
    +	(cd $(1)/usr/bin; ln -sf toast untoast; ln -sf toast tcat)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/gsm
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/gsm.h $(1)/usr/include/gsm/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.{a,so*} $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libgsm))
    +$(eval $(call BuildPackage,gsm-utils))
    diff --git a/libs/gsm/patches/001-debian-libsgm-1.0.10-13.patch b/libs/gsm/patches/001-debian-libsgm-1.0.10-13.patch
    new file mode 100644
    index 0000000..479c63d
    --- /dev/null
    +++ b/libs/gsm/patches/001-debian-libsgm-1.0.10-13.patch
    @@ -0,0 +1,428 @@
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -8,10 +8,12 @@ SASR	= -DSASR
    + ######### Define SASR if >> is a signed arithmetic shift (-1 >> 1 == -1)
    + 
    + # MULHACK = -DUSE_FLOAT_MUL
    ++MULHACK =
    + ######### Define this if your host multiplies floats faster than integers,
    + ######### e.g. on a SPARCstation.
    + 
    + # FAST	= -DFAST
    ++FAST	=
    + ######### Define together with USE_FLOAT_MUL to enable the GSM library's
    + ######### approximation option for incorrect, but good-enough results.
    + 
    +@@ -22,8 +24,8 @@ LTP_CUT	=
    + ######### both integer and floating point multiplications.
    + ######### This flag is still in the experimental stage.
    + 
    +-WAV49	= -DWAV49
    +-# WAV49	=
    ++# WAV49	= -DWAV49
    ++WAV49	=
    + ######### Define to enable the GSM library's option to pack GSM frames 
    + ######### in the style used by the WAV #49 format.  If you want to write
    + ######### a tool that produces .WAV files which contain GSM-encoded data,
    +@@ -44,7 +46,8 @@ WAV49	= -DWAV49
    + # CCFLAGS 	= -c -O
    + 
    + CC		= gcc -ansi -pedantic
    +-CCFLAGS 	= -c -O2 -DNeedFunctionPrototypes=1
    ++COPTS		= -O2
    ++CCFLAGS 	= -c $(COPTS) -DNeedFunctionPrototypes=1
    + 
    + LD 		= $(CC)
    + 
    +@@ -78,10 +81,10 @@ INSTALL_ROOT	=
    + # Leave GSM_INSTALL_ROOT empty to not install the GSM library outside of
    + # this directory.
    + 
    +-GSM_INSTALL_ROOT = $(INSTALL_ROOT)
    ++GSM_INSTALL_ROOT = $(INSTALL_ROOT)/usr
    + GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib
    +-GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc
    +-GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
    ++GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/include
    ++GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/share/man/man3
    + 
    + 
    + # Where do you want to install the toast binaries and their manpage?
    +@@ -89,14 +92,14 @@ GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/ma
    + # Leave TOAST_INSTALL_ROOT empty to not install the toast binaries outside
    + # of this directory.
    + 
    +-TOAST_INSTALL_ROOT	  = $(INSTALL_ROOT)
    ++TOAST_INSTALL_ROOT	  = $(INSTALL_ROOT)/usr
    + TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin
    +-TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1
    ++TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/share/man/man1
    + 
    + #  Other tools
    + 
    + SHELL		= /bin/sh
    +-LN		= ln
    ++LN		= ln -s
    + BASENAME 	= basename
    + AR		= ar
    + ARFLAGS		= cr
    +@@ -126,7 +129,7 @@ INC	= $(ROOT)/inc
    + 
    + # Flags
    + 
    +-# DEBUG	= -DNDEBUG
    ++DEBUG	= -DNDEBUG
    + ######### Remove -DNDEBUG to enable assertions.
    + 
    + CFLAGS	= $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
    +@@ -140,6 +143,7 @@ LFLAGS	= $(LDFLAGS) $(LDINC)
    + # Targets
    + 
    + LIBGSM	= $(LIB)/libgsm.a
    ++LIBGSMSO= $(LIB)/libgsm.so
    + 
    + TOAST	= $(BIN)/toast
    + UNTOAST	= $(BIN)/untoast
    +@@ -258,6 +262,9 @@ STUFF = 	ChangeLog			\
    + 
    + GSM_INSTALL_TARGETS =	\
    + 		$(GSM_INSTALL_LIB)/libgsm.a		\
    ++		$(GSM_INSTALL_LIB)/libgsm.so		\
    ++		$(GSM_INSTALL_LIB)/libgsm.so.1		\
    ++		$(GSM_INSTALL_LIB)/libgsm.so.1.0.10	\
    + 		$(GSM_INSTALL_INC)/gsm.h		\
    + 		$(GSM_INSTALL_MAN)/gsm.3		\
    + 		$(GSM_INSTALL_MAN)/gsm_explode.3	\
    +@@ -279,7 +286,7 @@ TOAST_INSTALL_TARGETS =	\
    + 
    + # Target rules
    + 
    +-all:		$(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
    ++all:		$(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST)
    + 		@-echo $(ROOT): Done.
    + 
    + tst:		$(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
    +@@ -299,6 +306,11 @@ install:	toastinstall gsminstall
    + 
    + # The basic API: libgsm
    + 
    ++$(LIBGSMSO):	$(LIB) $(GSM_OBJECTS)
    ++		$(LD) -o $@.1.0.10 -shared -Xlinker -soname -Xlinker libgsm.so.1 $(GSM_OBJECTS) -lc
    ++		ln -fs libgsm.so.1.0.10 lib/libgsm.so.1
    ++		ln -fs libgsm.so.1.0.10 lib/libgsm.so
    ++
    + $(LIBGSM):	$(LIB) $(GSM_OBJECTS)
    + 		-rm $(RMFLAGS) $(LIBGSM)
    + 		$(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
    +@@ -308,15 +320,15 @@ $(LIBGSM):	$(LIB) $(GSM_OBJECTS)
    + # Toast, Untoast and Tcat -- the compress-like frontends to gsm.
    + 
    + $(TOAST):	$(BIN) $(TOAST_OBJECTS) $(LIBGSM)
    +-		$(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB)
    ++		$(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB)
    + 
    + $(UNTOAST):	$(BIN) $(TOAST)
    + 		-rm $(RMFLAGS) $(UNTOAST)
    +-		$(LN) $(TOAST) $(UNTOAST)
    ++		$(LN) toast $(UNTOAST)
    + 
    + $(TCAT):	$(BIN) $(TOAST)
    + 		-rm $(RMFLAGS) $(TCAT)
    +-		$(LN) $(TOAST) $(TCAT)
    ++		$(LN) toast $(TCAT)
    + 
    + 
    + # The local bin and lib directories
    +@@ -351,53 +363,66 @@ toastuninstall:
    + 		fi
    + 
    + $(TOAST_INSTALL_BIN)/toast:	$(TOAST)
    +-		-rm $@
    +-		cp $(TOAST) $@
    ++		mkdir -p $(TOAST_INSTALL_BIN)
    ++		cp -f $(TOAST) $@
    + 		chmod 755 $@
    + 
    + $(TOAST_INSTALL_BIN)/untoast:	$(TOAST_INSTALL_BIN)/toast
    +-		-rm $@
    +-		ln $? $@
    ++		mkdir -p $(TOAST_INSTALL_BIN)
    ++		ln -sf $? $@
    + 
    + $(TOAST_INSTALL_BIN)/tcat:	$(TOAST_INSTALL_BIN)/toast
    +-		-rm $@
    +-		ln $? $@
    ++		mkdir -p $(TOAST_INSTALL_BIN)
    ++		ln -sf $? $@
    + 
    + $(TOAST_INSTALL_MAN)/toast.1:	$(MAN)/toast.1
    +-		-rm $@
    +-		cp $? $@
    ++		mkdir -p $(TOAST_INSTALL_MAN)
    ++		cp -f $? $@
    + 		chmod 444 $@
    + 
    + $(GSM_INSTALL_MAN)/gsm.3:	$(MAN)/gsm.3
    +-		-rm $@
    +-		cp $? $@
    ++		mkdir -p $(GSM_INSTALL_MAN)
    ++		cp -f $? $@
    + 		chmod 444 $@
    + 
    + $(GSM_INSTALL_MAN)/gsm_option.3:	$(MAN)/gsm_option.3
    +-		-rm $@
    +-		cp $? $@
    ++		mkdir -p $(GSM_INSTALL_MAN)
    ++		cp -f $? $@
    + 		chmod 444 $@
    + 
    + $(GSM_INSTALL_MAN)/gsm_explode.3:	$(MAN)/gsm_explode.3
    +-		-rm $@
    +-		cp $? $@
    ++		mkdir -p $(GSM_INSTALL_MAN)
    ++		cp -f $? $@
    + 		chmod 444 $@
    + 
    + $(GSM_INSTALL_MAN)/gsm_print.3:	$(MAN)/gsm_print.3
    +-		-rm $@
    +-		cp $? $@
    ++		mkdir -p $(GSM_INSTALL_MAN)
    ++		cp -f $? $@
    + 		chmod 444 $@
    + 
    + $(GSM_INSTALL_INC)/gsm.h:	$(INC)/gsm.h
    +-		-rm $@
    +-		cp $? $@
    ++		mkdir -p $(GSM_INSTALL_INC)
    ++		cp -f $? $@
    + 		chmod 444 $@
    + 
    + $(GSM_INSTALL_LIB)/libgsm.a:	$(LIBGSM)
    +-		-rm $@
    +-		cp $? $@
    ++		mkdir -p $(GSM_INSTALL_LIB)
    ++		cp -f $? $@
    + 		chmod 444 $@
    + 
    ++$(GSM_INSTALL_LIB)/libgsm.so:	$(LIBGSMSO)
    ++		mkdir -p $(GSM_INSTALL_LIB)
    ++		cp -f $? $@
    ++
    ++$(GSM_INSTALL_LIB)/libgsm.so.1:	$(LIBGSMSO)
    ++		mkdir -p $(GSM_INSTALL_LIB)
    ++		cp -f $? $@
    ++
    ++$(GSM_INSTALL_LIB)/libgsm.so.1.0.10:	$(LIBGSMSO)
    ++		mkdir -p $(GSM_INSTALL_LIB)
    ++		cp -f $? $@
    ++		chmod 755 $@
    ++
    + 
    + # Distribution
    + 
    +@@ -426,7 +451,9 @@ semi-clean:
    + 
    + clean:	semi-clean
    + 		-rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add		\
    +-			$(TOAST) $(TCAT) $(UNTOAST)	\
    ++			$(LIBGSMSO) $(LIB)/libgsm.so.1.0.10	\
    ++			$(LIB)libgsm.so.1			\
    ++			$(TOAST) $(TCAT) $(UNTOAST)		\
    + 			$(ROOT)/gsm-1.0.tar.Z
    + 
    + 
    +--- a/inc/config.h
    ++++ b/inc/config.h
    +@@ -9,8 +9,8 @@
    + #ifndef	CONFIG_H
    + #define	CONFIG_H
    + 
    +-/*efine	SIGHANDLER_T	int 		/* signal handlers are void	*/
    +-/*efine HAS_SYSV_SIGNAL	1		/* sigs not blocked/reset?	*/
    ++/*efine	SIGHANDLER_T	int 		*//* signal handlers are void	*/
    ++/*efine HAS_SYSV_SIGNAL	1		*//* sigs not blocked/reset?	*/
    + 
    + #define	HAS_STDLIB_H	1		/* /usr/include/stdlib.h	*/
    + #define	HAS_LIMITS_H	1		/* /usr/include/limits.h	*/
    +@@ -22,16 +22,16 @@
    + #define	HAS_CHMOD 	1		/* chmod syscall		*/
    + #define	HAS_FCHOWN 	1		/* fchown syscall		*/
    + #define	HAS_CHOWN 	1		/* chown syscall		*/
    +-/*efine	HAS__FSETMODE 	1		/* _fsetmode -- set file mode	*/
    ++/*efine	HAS__FSETMODE 	1		*//* _fsetmode -- set file mode	*/
    + 
    + #define	HAS_STRING_H 	1		/* /usr/include/string.h 	*/
    +-/*efine	HAS_STRINGS_H	1		/* /usr/include/strings.h 	*/
    ++/*efine	HAS_STRINGS_H	1		*//* /usr/include/strings.h 	*/
    + 
    + #define	HAS_UNISTD_H	1		/* /usr/include/unistd.h	*/
    + #define	HAS_UTIME	1		/* POSIX utime(path, times)	*/
    +-/*efine	HAS_UTIMES	1		/* use utimes()	syscall instead	*/
    ++/*efine	HAS_UTIMES	1		*//* use utimes()	syscall instead	*/
    + #define	HAS_UTIME_H	1		/* UTIME header file		*/
    + #define	HAS_UTIMBUF	1		/* struct utimbuf		*/
    +-/*efine	HAS_UTIMEUSEC   1		/* microseconds in utimbuf?	*/
    ++/*efine	HAS_UTIMEUSEC   1		*//* microseconds in utimbuf?	*/
    + 
    + #endif	/* CONFIG_H */
    +--- a/inc/gsm.h
    ++++ b/inc/gsm.h
    +@@ -54,6 +54,10 @@ typedef gsm_byte 		gsm_frame[33];		/* 33
    + #define	GSM_OPT_FRAME_INDEX	5
    + #define	GSM_OPT_FRAME_CHAIN	6
    + 
    ++#ifdef __cplusplus
    ++extern "C" {
    ++#endif
    ++
    + extern gsm  gsm_create 	GSM_P((void));
    + extern void gsm_destroy GSM_P((gsm));	
    + 
    +@@ -66,6 +70,10 @@ extern int  gsm_decode  GSM_P((gsm, gsm_
    + extern int  gsm_explode GSM_P((gsm, gsm_byte   *, gsm_signal *));
    + extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte   *));
    + 
    ++#ifdef __cplusplus
    ++}
    ++#endif
    ++
    + #undef	GSM_P
    + 
    + #endif	/* GSM_H */
    +--- a/inc/toast.h
    ++++ b/inc/toast.h
    +@@ -16,11 +16,12 @@
    + 
    + #include 
    + #include 
    ++#include 
    + #include 
    + 
    + #include 
    +-#ifndef	HAS_ERRNO_DECL
    +-	 extern int	errno;
    ++#ifndef errno
    ++ extern int	errno;
    + #endif
    + 
    + #ifdef	HAS_LIMITS_H
    +@@ -37,6 +38,10 @@
    + # endif
    + #endif
    + 
    ++#ifdef  HAS_STDIO_H
    ++# include 
    ++#endif
    ++
    + #include "gsm.h"
    + 
    + #ifndef	S_ISREG
    +--- a/src/code.c
    ++++ b/src/code.c
    +@@ -9,8 +9,8 @@
    + #include	"config.h"
    + 
    + 
    +-#ifdef	HAS_STDLIB_H
    +-#include	
    ++#ifdef	HAS_STRING_H
    ++#include	
    + #else
    + #	include "proto.h"
    + 	extern char	* memcpy P((char *, char *, int));
    +--- a/src/debug.c
    ++++ b/src/debug.c
    +@@ -49,7 +49,7 @@ void gsm_debug_longwords P4( (name, from
    + 	fprintf( stderr, "%s [%d .. %d]: ", name, from, to );
    + 	while (from <= to) {
    + 
    +-		fprintf(stderr, "%d ", ptr[ from ] );
    ++		fprintf(stderr, "%ld ", ptr[ from ] );
    + 		from++;
    + 		if (nprinted++ >= 7) {
    + 			nprinted = 0;
    +@@ -63,14 +63,14 @@ void gsm_debug_longword P2(  (name, valu
    + 	char		* name,
    + 	longword	  value	)
    + {
    +-	fprintf(stderr, "%s: %d\n", name, (long)value );
    ++	fprintf(stderr, "%s: %ld\n", name, (long)value );
    + }
    + 
    + void gsm_debug_word P2(  (name, value),
    + 	char	* name,
    + 	word	  value	)
    + {
    +-	fprintf(stderr, "%s: %d\n", name, (long)value);
    ++	fprintf(stderr, "%s: %ld\n", name, (long)value);
    + }
    + 
    + #endif
    +--- a/src/toast.c
    ++++ b/src/toast.c
    +@@ -251,8 +251,8 @@ static char * emalloc P1((len), size_t l
    + {
    + 	char * s;
    + 	if (!(s = malloc(len))) {
    +-		fprintf(stderr, "%s: failed to malloc %d bytes -- abort\n",
    +-			progname, len);
    ++		fprintf(stderr, "%s: failed to malloc %ld bytes -- abort\n",
    ++			progname, (long) len);
    + 		onintr();
    + 		exit(1);
    + 	}
    +@@ -270,7 +270,7 @@ static char* normalname P3((name, want, 
    + 	maxlen = strlen(name) + 1 + strlen(want) + strlen(cut);
    + 	p = strcpy(emalloc(maxlen), name);
    + 
    +-	if (s = suffix(p, cut)) strcpy(s, want);
    ++	if ((s = suffix(p, cut))) strcpy(s, want);
    + 	else if (*want && !suffix(p, want)) strcat(p, want);
    + 
    + 	return p;
    +@@ -386,7 +386,7 @@ static void update_times P0()
    + 		ut[0] = instat.st_atime;
    + 		ut[1] = instat.st_mtime;
    + 
    +-		(void) utime(outname, ut);
    ++		(void) utime(outname, (struct utimbuf *)ut);
    + 
    + #endif	/* UTIMBUF */
    + 	}
    +@@ -416,7 +416,7 @@ static int okay_as_input P3((name,f,st),
    + 	}
    + 	if (st->st_nlink > 1 && !f_cat && !f_precious) {
    + 		fprintf(stderr, 
    +-		      "%s: \"%s\" has %s other link%s -- unchanged.\n",
    ++		      "%s: \"%s\" has %d other link%s -- unchanged.\n",
    + 			progname,name,st->st_nlink - 1,"s" + (st->st_nlink<=2));
    + 		return 0;
    + 	}
    +@@ -585,8 +585,8 @@ static int process_decode P0()
    + 
    + 		if (cc != sizeof(s)) {
    + 			if (cc >= 0) fprintf(stderr,
    +-			"%s: incomplete frame (%d byte%s missing) from %s\n",
    +-					progname, sizeof(s) - cc,
    ++			"%s: incomplete frame (%ld byte%s missing) from %s\n",
    ++					progname, (long) sizeof(s) - cc,
    + 					"s" + (sizeof(s) - cc == 1),
    + 					inname ? inname : "stdin" );
    + 			gsm_destroy(r);
    +@@ -624,8 +624,6 @@ static int process_decode P0()
    + 
    + static int process P1((name), char * name)
    + {
    +-	int step = 0;
    +-
    + 	out     = (FILE *)0;
    + 	in      = (FILE *)0;
    + 
    +@@ -779,7 +777,6 @@ int main P2((ac, av), int ac, char **av)
    + 	case 'h': help();    exit(0);
    + 
    + 	default: 
    +-	usage:
    + 		fprintf(stderr,
    + 	"Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n",
    + 			progname);
    diff --git a/libs/howl/Makefile b/libs/howl/Makefile
    new file mode 100644
    index 0000000..459f838
    --- /dev/null
    +++ b/libs/howl/Makefile
    @@ -0,0 +1,148 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=howl
    +PKG_VERSION:=1.0.0
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.porchdogsoft.com/download/
    +PKG_MD5SUM:=c389d3ffba0e69a179de2ec650f1fdcc
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Package/howl/Default
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=Zeroconf networking implementation
    +  URL:=http://www.porchdogsoft.com/products/howl/
    +endef
    +
    +define Package/libhowl
    +  $(call Package/howl/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= (library)
    +endef
    +
    +define Package/libhowl/description
    +	Howl is a cross-platform implementation of Zeroconf networking.	
    +	This package contains the Howl shared libraries, used by other programs.
    +endef
    +
    +define Package/howl-autoipd
    +  $(call Package/howl/Default)
    +  SUBMENU:=IP Addresses and Names
    +  DEPENDS:=+libhowl
    +  TITLE:=An IPv4 Link-Local address self-assigner daemon
    +endef
    +
    +define Package/howl-autoipd/description
    +	Howl is a cross-platform implementation of Zeroconf networking.	
    +	This package contains an IPv4 Link-Local address self-assigner daemon.
    +endef
    +
    +define Package/howl-mdnsresponder
    +  $(call Package/howl/Default)
    +  SUBMENU:=IP Addresses and Names
    +  DEPENDS:=+libhowl +libpthread
    +  TITLE:=An mDNS (Multicast DNS) service responder daemon
    +endef
    +
    +define Package/howl-mdnsresponder/description
    +	Howl is a cross-platform implementation of Zeroconf networking.	
    +	This package contains an mDNS (Multicast DNS) service responder daemon.
    +endef
    +
    +define Package/howl-mdnsresponder/conffiles
    +/etc/mDNSResponder.conf
    +endef
    +
    +define Package/howl-nifd
    +  $(call Package/howl/Default)
    +  SUBMENU:=IP Addresses and Names
    +  DEPENDS:=+libhowl
    +  TITLE:=A network interface monitor daemon
    +endef
    +
    +define Package/howl-nifd/description
    +	This package contains a network interface monitor daemon.
    +endef
    +
    +define Package/howl-utils
    +  $(call Package/howl/Default)
    +  SUBMENU:=IP Addresses and Names
    +  DEPENDS:=+libhowl
    +  TITLE+= (utilities)
    +endef
    +
    +define Package/howl-utils/description
    +	This package contains mDNS (Multicast DNS) client utilities.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +	);
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/howl $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/howl.pc $(1)/usr/lib/pkgconfig/
    +	$(SED) 's,-I/usr/include,-I$$$${includedir},g' $(1)/usr/lib/pkgconfig/howl.pc
    +	$(SED) 's,-L/usr/lib/howl,-L$$$${libdir}/howl,g' $(1)/usr/lib/pkgconfig/howl.pc
    +endef
    +
    +define Package/libhowl/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/howl-autoipd/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/autoipd $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_DATA) ./files/autoipd.init $(1)/etc/init.d/autoipd
    +endef
    +
    +define Package/howl-mdnsresponder/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mDNSResponder $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_DATA) ./files/mDNSResponder.conf $(1)/etc/mDNSResponder.conf
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/mDNSResponder.init $(1)/etc/init.d/mDNSResponder
    +endef
    +
    +define Package/howl-nifd/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nifd $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_DATA) ./files/nifd.init $(1)/etc/init.d/nifd
    +endef
    +
    +define Package/howl-utils/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mDNS{Browse,Publish,Query,Resolve} $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,libhowl))
    +$(eval $(call BuildPackage,howl-autoipd))
    +$(eval $(call BuildPackage,howl-mdnsresponder))
    +$(eval $(call BuildPackage,howl-nifd))
    +$(eval $(call BuildPackage,howl-utils))
    diff --git a/libs/howl/files/autoipd.init b/libs/howl/files/autoipd.init
    new file mode 100644
    index 0000000..e68ee77
    --- /dev/null
    +++ b/libs/howl/files/autoipd.init
    @@ -0,0 +1,18 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +DEFAULT=/etc/default/autopid
    +RUN_D=/var/run
    +PID_F=$RUN_D/autoipd.pid
    +
    +start() {
    +	[ -f $DEFAULT ] && . $DEFAULT
    +	[ -d $RUN_D ] || mkdir -p $RUN_D
    +	autoipd $OPTIONS
    +}
    +
    +stop() {
    +	[ -f $PID_F ] && kill $(cat $PID_F)
    +}
    +
    diff --git a/libs/howl/files/mDNSResponder.conf b/libs/howl/files/mDNSResponder.conf
    new file mode 100644
    index 0000000..eac712f
    --- /dev/null
    +++ b/libs/howl/files/mDNSResponder.conf
    @@ -0,0 +1,2 @@
    +#name         #type        #domain  #port  #text
    +"My Router"   _http._tcp   local.   80     "txtvers=1" "path=/P" "note=My Router"
    diff --git a/libs/howl/files/mDNSResponder.init b/libs/howl/files/mDNSResponder.init
    new file mode 100644
    index 0000000..a1f6508
    --- /dev/null
    +++ b/libs/howl/files/mDNSResponder.init
    @@ -0,0 +1,17 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +DEFAULT=/etc/default/mDNSResponder
    +RUN_D=/var/run
    +PID_F=$RUN_D/mDNSResponder.pid
    +
    +start() {
    +	[ -f $DEFAULT ] && . $DEFAULT
    +	[ -d $RUN_D ] || mkdir -p $RUN_D
    +	mDNSResponder $OPTIONS
    +}
    +stop() {
    +	[ -f $PID_F ] && kill $(cat $PID_F)
    +}
    +
    diff --git a/libs/howl/files/nifd.init b/libs/howl/files/nifd.init
    new file mode 100644
    index 0000000..d650648
    --- /dev/null
    +++ b/libs/howl/files/nifd.init
    @@ -0,0 +1,17 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +DEFAULT=/etc/default/nifd
    +RUN_D=/var/run
    +PID_F=$RUN_D/nifd.pid
    +
    +start() {
    +	[ -f $DEFAULT ] && . $DEFAULT
    +	[ -d $RUN_D ] || mkdir -p $RUN_D
    +	nifd $OPTIONS
    +}
    +stop() {
    +	[ -f $PID_F ] && kill $(cat $PID_F)
    +}
    +
    diff --git a/libs/howl/patches/001-config.patch b/libs/howl/patches/001-config.patch
    new file mode 100644
    index 0000000..a0c26d1
    --- /dev/null
    +++ b/libs/howl/patches/001-config.patch
    @@ -0,0 +1,14 @@
    +--- howl-0.9.10-orig/src/mDNSResponder/Posix/posix_main.c	2005-01-27 04:11:20.000000000 +0100
    ++++ howl-0.9.10-2/src/mDNSResponder/Posix/posix_main.c	2005-03-19 13:04:42.000000000 +0100
    +@@ -249,9 +249,9 @@
    + 	{
    + 		sw_mdns_servant_load_file(servant, conf_file);
    + 	}
    +-	else if (sw_mdns_servant_load_file(servant, "/etc/howl/mDNSResponder.conf") != SW_OKAY)
    ++	else
    + 	{
    +-		sw_mdns_servant_load_file(servant, "/usr/local/etc/howl/mDNSResponder.conf");
    ++		sw_mdns_servant_load_file(servant, "/etc/mDNSResponder.conf");
    + 	}
    + 
    + 	write_pidfile("mDNSResponder", &pidfd);
    diff --git a/libs/howl/patches/002-debug_log.patch b/libs/howl/patches/002-debug_log.patch
    new file mode 100644
    index 0000000..91410b8
    --- /dev/null
    +++ b/libs/howl/patches/002-debug_log.patch
    @@ -0,0 +1,10 @@
    +--- howl-0.9.10-orig/src/mDNSResponder/Posix/posix_main.c	2005-01-27 04:11:20.000000000 +0100
    ++++ howl-0.9.10-2/src/mDNSResponder/Posix/posix_main.c	2005-03-19 13:04:42.000000000 +0100
    +@@ -186,6 +186,7 @@
    + 			case 'd':
    + 			{
    + 				make_daemon = SW_FALSE;
    ++				sw_debug_set_level(SW_LOG_VERBOSE);
    + 			}
    + 			break;
    + 
    diff --git a/libs/howl/patches/003-proto_fix.patch b/libs/howl/patches/003-proto_fix.patch
    new file mode 100644
    index 0000000..0b9d105
    --- /dev/null
    +++ b/libs/howl/patches/003-proto_fix.patch
    @@ -0,0 +1,11 @@
    +--- howl-0.9.10-orig/include/salt/platform.h	2005-01-28 21:46:14.000000000 +0100
    ++++ howl-0.9.10-2/include/salt/platform.h	2005-03-19 13:04:42.000000000 +0100
    +@@ -409,7 +409,7 @@
    +  */
    + 
    + sw_const_string
    +-sw_strerror();
    ++sw_strerror(void);
    + 
    + 
    + /*
    diff --git a/libs/howl/patches/004-linux_types.patch b/libs/howl/patches/004-linux_types.patch
    new file mode 100644
    index 0000000..ee36760
    --- /dev/null
    +++ b/libs/howl/patches/004-linux_types.patch
    @@ -0,0 +1,11 @@
    +diff -ruN howl-1.0.0-old/src/lib/howl/Posix/posix_interface.c howl-1.0.0-new/src/lib/howl/Posix/posix_interface.c
    +--- howl-1.0.0-old/src/lib/howl/Posix/posix_interface.c	2005-05-19 23:39:27.000000000 +0200
    ++++ howl-1.0.0-new/src/lib/howl/Posix/posix_interface.c	2007-01-07 23:56:54.000000000 +0100
    +@@ -41,6 +41,7 @@
    + typedef __uint32_t 	u32;
    + typedef __uint16_t 	u16;
    + typedef __uint8_t		u8;
    ++#	include 
    + #	include 
    + #	include  
    + #endif
    diff --git a/libs/id3lib/Makefile b/libs/id3lib/Makefile
    new file mode 100644
    index 0000000..24ec47a
    --- /dev/null
    +++ b/libs/id3lib/Makefile
    @@ -0,0 +1,55 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=id3lib
    +PKG_VERSION:=3.8.3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/id3lib
    +PKG_MD5SUM:=19f27ddd2dda4b2d26a559a4f0f402a7
    +
    +PKG_FIXUP:=libtool-ucxx
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/id3lib
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+zlib +uclibcxx
    +  TITLE:=An ID3v1/ID3v2 tag manipulation library
    +  URL:=http://www.id3lib.org/
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static
    +
    +#CONFIGURE_VARS += \
    +	CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti"  \
    +	LIBS="-nodefaultlibs -lz -luClibc++ -Wl,-Bstatic,-lstdc++,-Bdynamic -lm" \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/id3 $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/id3.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3.{a,so} $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3-*.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/id3lib/install
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3-*.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,id3lib))
    diff --git a/libs/id3lib/patches/100-missing_include.patch b/libs/id3lib/patches/100-missing_include.patch
    new file mode 100644
    index 0000000..81199ab
    --- /dev/null
    +++ b/libs/id3lib/patches/100-missing_include.patch
    @@ -0,0 +1,11 @@
    +diff -urN id3lib-3.8.3/include/id3/id3lib_strings.h id3lib-3.8.3.new/include/id3/id3lib_strings.h
    +--- id3lib-3.8.3/include/id3/id3lib_strings.h	2003-03-02 01:23:00.000000000 +0100
    ++++ id3lib-3.8.3.new/include/id3/id3lib_strings.h	2007-08-28 12:08:44.000000000 +0200
    +@@ -30,6 +30,7 @@
    + #define _ID3LIB_STRINGS_H_
    + 
    + #include 
    ++#include 
    + 
    + #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000))
    + namespace std
    diff --git a/libs/id3lib/patches/120-fix-configure-remove-check-for-iomanip_h.patch b/libs/id3lib/patches/120-fix-configure-remove-check-for-iomanip_h.patch
    new file mode 100644
    index 0000000..26944cc
    --- /dev/null
    +++ b/libs/id3lib/patches/120-fix-configure-remove-check-for-iomanip_h.patch
    @@ -0,0 +1,24 @@
    +diff --git a/configure b/configure
    +index 37b66f3..723ca1e 100755
    +--- a/configure
    ++++ b/configure
    +@@ -10296,7 +10296,6 @@ done
    + 
    + for ac_header in \
    +   string                        \
    +-  iomanip.h                     \
    + 
    + do
    + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    +diff --git a/configure.in b/configure.in
    +index c857735..abfe4cd 100644
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -227,7 +227,6 @@ AC_CHECK_HEADERS(fstream iostream iomanip vector \
    + )
    + AC_CHECK_HEADERS(               \
    +   string                        \
    +-  iomanip.h                     \
    +   ,,AC_MSG_ERROR([Missing a vital header file for id3lib])
    + )
    + 
    diff --git a/libs/id3lib/patches/130-fix-includes.patch b/libs/id3lib/patches/130-fix-includes.patch
    new file mode 100644
    index 0000000..d3e636a
    --- /dev/null
    +++ b/libs/id3lib/patches/130-fix-includes.patch
    @@ -0,0 +1,25 @@
    +diff --git a/include/id3/id3lib_strings.h b/include/id3/id3lib_strings.h
    +index 02a9aba..101b797 100644
    +--- a/include/id3/id3lib_strings.h
    ++++ b/include/id3/id3lib_strings.h
    +@@ -29,6 +29,7 @@
    + #ifndef _ID3LIB_STRINGS_H_
    + #define _ID3LIB_STRINGS_H_
    + 
    ++#include 
    + #include 
    + #include 
    + 
    +diff --git a/include/id3/writers.h b/include/id3/writers.h
    +index 1cbb0dc..4bc8f77 100644
    +--- a/include/id3/writers.h
    ++++ b/include/id3/writers.h
    +@@ -30,7 +30,7 @@
    + 
    + #include "id3/writer.h"
    + #include "id3/id3lib_streams.h"
    +-//#include 
    ++#include 
    + 
    + class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer
    + {
    diff --git a/libs/id3lib/patches/140-dont-build-examples.patch b/libs/id3lib/patches/140-dont-build-examples.patch
    new file mode 100644
    index 0000000..61b97e0
    --- /dev/null
    +++ b/libs/id3lib/patches/140-dont-build-examples.patch
    @@ -0,0 +1,15 @@
    +diff --git a/Makefile.in b/Makefile.in
    +index 8c121c5..b2131c2 100644
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -132,8 +132,8 @@ EXTRA_DIST = \
    + @ID3_NEEDZLIB_TRUE@zlib_subdir = zlib
    + @ID3_NEEDZLIB_FALSE@zlib_subdir = 
    + 
    +-SUBDIRS = . m4 $(zlib_subdir) doc include id3com src examples
    +-DIST_SUBDIRS = . m4 zlib doc include id3com src examples prj libprj
    ++SUBDIRS = . m4 $(zlib_subdir) doc include id3com src
    ++DIST_SUBDIRS = . m4 zlib doc include id3com src prj libprj
    + 
    + INCLUDES = @ID3LIB_DEBUG_FLAGS@
    + 
    diff --git a/libs/iksemel/Makefile b/libs/iksemel/Makefile
    new file mode 100644
    index 0000000..afa6c4b
    --- /dev/null
    +++ b/libs/iksemel/Makefile
    @@ -0,0 +1,68 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=iksemel
    +PKG_VERSION:=1.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://iksemel.googlecode.com/files/
    +PKG_MD5SUM:=532e77181694f87ad5eb59435d11c1ca
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libiksemel
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Iksemel Jabber Library
    +  URL:=http://code.google.com/p/iksemel/
    +  DEPENDS:= +libgnutls +libtasn1
    +endef
    +
    +define Package/libiksemel/description
    +  Iksemel is an XML parser library mainly designed for Jabber applications.
    +  It provides SAX, DOM, and special Jabber stream APIs. Library is coded
    +  in ANSI C except the network code (which is POSIX compatible), thus
    +  highly portable.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +TARGET_LDFLAGS += \
    +	-Wl,-rpath-link,$(STAGING_DIR)/usr/lib \
    +	-lgnutls -lgcrypt -lgpg-error
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +		--with-libgnutls-prefix="$(STAGING_DIR)/usr" \
    +		, \
    +		LIBS="$(TARGET_LDFLAGS)" \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/iksemel.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libiksemel.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/iksemel.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libiksemel/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libiksemel.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libiksemel))
    diff --git a/libs/iksemel/patches/001-missing-macros.patch b/libs/iksemel/patches/001-missing-macros.patch
    new file mode 100644
    index 0000000..4563ac5
    --- /dev/null
    +++ b/libs/iksemel/patches/001-missing-macros.patch
    @@ -0,0 +1,163 @@
    +--- /dev/null
    ++++ b/gnutls.m4
    +@@ -0,0 +1,160 @@
    ++dnl Autoconf macros for libgnutls
    ++dnl $id$
    ++
    ++# Modified for LIBGNUTLS -- nmav
    ++# Configure paths for LIBGCRYPT
    ++# Shamelessly stolen from the one of XDELTA by Owen Taylor
    ++# Werner Koch   99-12-09
    ++
    ++dnl AM_PATH_LIBGNUTLS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
    ++dnl Test for libgnutls, and define LIBGNUTLS_CFLAGS and LIBGNUTLS_LIBS
    ++dnl
    ++AC_DEFUN([AM_PATH_LIBGNUTLS],
    ++[dnl
    ++dnl Get the cflags and libraries from the libgnutls-config script
    ++dnl
    ++AC_ARG_WITH(libgnutls-prefix,
    ++          [  --with-libgnutls-prefix=PFX   Prefix where libgnutls is installed (optional)],
    ++          libgnutls_config_prefix="$withval", libgnutls_config_prefix="")
    ++
    ++  if test x$libgnutls_config_prefix != x ; then
    ++     if test x${LIBGNUTLS_CONFIG+set} != xset ; then
    ++        LIBGNUTLS_CONFIG=$libgnutls_config_prefix/bin/libgnutls-config
    ++     fi
    ++  fi
    ++
    ++  AC_PATH_PROG(LIBGNUTLS_CONFIG, libgnutls-config, no)
    ++  min_libgnutls_version=ifelse([$1], ,0.1.0,$1)
    ++  AC_MSG_CHECKING(for libgnutls - version >= $min_libgnutls_version)
    ++  no_libgnutls=""
    ++  if test "$LIBGNUTLS_CONFIG" = "no" ; then
    ++    no_libgnutls=yes
    ++  else
    ++    LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags`
    ++    LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs`
    ++    libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version`
    ++
    ++
    ++      ac_save_CFLAGS="$CFLAGS"
    ++      ac_save_LIBS="$LIBS"
    ++      CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
    ++      LIBS="$LIBS $LIBGNUTLS_LIBS"
    ++dnl
    ++dnl Now check if the installed libgnutls is sufficiently new. Also sanity
    ++dnl checks the results of libgnutls-config to some extent
    ++dnl
    ++      rm -f conf.libgnutlstest
    ++      AC_TRY_RUN([
    ++#include 
    ++#include 
    ++#include 
    ++#include 
    ++
    ++int
    ++main ()
    ++{
    ++    system ("touch conf.libgnutlstest");
    ++
    ++    if( strcmp( gnutls_check_version(NULL), "$libgnutls_config_version" ) )
    ++    {
    ++      printf("\n*** 'libgnutls-config --version' returned %s, but LIBGNUTLS (%s)\n",
    ++             "$libgnutls_config_version", gnutls_check_version(NULL) );
    ++      printf("*** was found! If libgnutls-config was correct, then it is best\n");
    ++      printf("*** to remove the old version of LIBGNUTLS. You may also be able to fix the error\n");
    ++      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
    ++      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
    ++      printf("*** required on your system.\n");
    ++      printf("*** If libgnutls-config was wrong, set the environment variable LIBGNUTLS_CONFIG\n");
    ++      printf("*** to point to the correct copy of libgnutls-config, and remove the file config.cache\n");
    ++      printf("*** before re-running configure\n");
    ++    }
    ++    else if ( strcmp(gnutls_check_version(NULL), LIBGNUTLS_VERSION ) )
    ++    {
    ++      printf("\n*** LIBGNUTLS header file (version %s) does not match\n", LIBGNUTLS_VERSION);
    ++      printf("*** library (version %s)\n", gnutls_check_version(NULL) );
    ++    }
    ++    else
    ++    {
    ++      if ( gnutls_check_version( "$min_libgnutls_version" ) )
    ++      {
    ++        return 0;
    ++      }
    ++     else
    ++      {
    ++        printf("no\n*** An old version of LIBGNUTLS (%s) was found.\n",
    ++                gnutls_check_version(NULL) );
    ++        printf("*** You need a version of LIBGNUTLS newer than %s. The latest version of\n",
    ++               "$min_libgnutls_version" );
    ++        printf("*** LIBGNUTLS is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n");
    ++        printf("*** \n");
    ++        printf("*** If you have already installed a sufficiently new version, this error\n");
    ++        printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n");
    ++        printf("*** being found. The easiest way to fix this is to remove the old version\n");
    ++        printf("*** of LIBGNUTLS, but you can also set the LIBGNUTLS_CONFIG environment to point to the\n");
    ++        printf("*** correct copy of libgnutls-config. (In this case, you will have to\n");
    ++        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
    ++        printf("*** so that the correct libraries are found at run-time))\n");
    ++      }
    ++    }
    ++  return 1;
    ++}
    ++],, no_libgnutls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
    ++       CFLAGS="$ac_save_CFLAGS"
    ++       LIBS="$ac_save_LIBS"
    ++  fi
    ++
    ++  if test "x$no_libgnutls" = x ; then
    ++     AC_MSG_RESULT(yes)
    ++     ifelse([$2], , :, [$2])
    ++  else
    ++     if test -f conf.libgnutlstest ; then
    ++        :
    ++     else
    ++        AC_MSG_RESULT(no)
    ++     fi
    ++     if test "$LIBGNUTLS_CONFIG" = "no" ; then
    ++       echo "*** The libgnutls-config script installed by LIBGNUTLS could not be found"
    ++       echo "*** If LIBGNUTLS was installed in PREFIX, make sure PREFIX/bin is in"
    ++       echo "*** your path, or set the LIBGNUTLS_CONFIG environment variable to the"
    ++       echo "*** full path to libgnutls-config."
    ++     else
    ++       if test -f conf.libgnutlstest ; then
    ++        :
    ++       else
    ++          echo "*** Could not run libgnutls test program, checking why..."
    ++          CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
    ++          LIBS="$LIBS $LIBGNUTLS_LIBS"
    ++          AC_TRY_LINK([
    ++#include 
    ++#include 
    ++#include 
    ++#include 
    ++],      [ return !!gnutls_check_version(NULL); ],
    ++        [ echo "*** The test program compiled, but did not run. This usually means"
    ++          echo "*** that the run-time linker is not finding LIBGNUTLS or finding the wrong"
    ++          echo "*** version of LIBGNUTLS. If it is not finding LIBGNUTLS, you'll need to set your"
    ++          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
    ++          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
    ++          echo "*** is required on your system"
    ++          echo "***"
    ++          echo "*** If you have an old version installed, it is best to remove it, although"
    ++          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
    ++          echo "***" ],
    ++        [ echo "*** The test program failed to compile or link. See the file config.log for the"
    ++          echo "*** exact error that occured. This usually means LIBGNUTLS was incorrectly installed"
    ++          echo "*** or that you have moved LIBGNUTLS since it was installed. In the latter case, you"
    ++          echo "*** may want to edit the libgnutls-config script: $LIBGNUTLS_CONFIG" ])
    ++          CFLAGS="$ac_save_CFLAGS"
    ++          LIBS="$ac_save_LIBS"
    ++       fi
    ++     fi
    ++     LIBGNUTLS_CFLAGS=""
    ++     LIBGNUTLS_LIBS=""
    ++     ifelse([$3], , :, [$3])
    ++  fi
    ++  rm -f conf.libgnutlstest
    ++  AC_SUBST(LIBGNUTLS_CFLAGS)
    ++  AC_SUBST(LIBGNUTLS_LIBS)
    ++])
    ++
    ++dnl *-*wedit:notab*-*  Please keep this as the last line.
    diff --git a/libs/intltool/Makefile b/libs/intltool/Makefile
    new file mode 100644
    index 0000000..2d76bcf
    --- /dev/null
    +++ b/libs/intltool/Makefile
    @@ -0,0 +1,46 @@
    +#
    +# Copyright (C) 2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=intltool
    +PKG_LIBVER:=0.40
    +PKG_VERSION:=$(PKG_LIBVER).6
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@GNOME/intltool/$(PKG_LIBVER)
    +PKG_MD5SUM:=69bc0353323112f42ad4f9cf351bc3e5
    +
    +PKG_HOST_ONLY:=1
    +
    +include $(INCLUDE_DIR)/host-build.mk
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/intltool
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=set of tools to centralize translation using GNU gettext
    +  URL:=http://www.freedesktop.org/wiki/Software/intltool
    +  BUILDONLY:=1
    +endef
    +
    +define Package/intltool/description
    +  intltool is a set of tools to centralize translation of many different
    +  file formats using GNU gettext-compatible PO files. 
    +endef
    +
    +define Require/perl-xml-parser
    +  perl -e 'use XML::Parser;'
    +endef
    +
    +$(eval $(call Require,perl-xml-parser, \
    +	Please install Perl XML::Parser \
    +))
    +
    +$(eval $(call BuildPackage,intltool))
    +$(eval $(call HostBuild))
    diff --git a/libs/jpeg/Makefile b/libs/jpeg/Makefile
    new file mode 100644
    index 0000000..9261bb0
    --- /dev/null
    +++ b/libs/jpeg/Makefile
    @@ -0,0 +1,98 @@
    +# 
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=jpeg
    +PKG_VERSION:=6b
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.ijg.org/files/ \
    +        ftp://ftp.uu.net/graphics/jpeg/
    +PKG_MD5SUM:=dbd5f3b47ed13132f04c685d608a7547
    +
    +PKG_FIXUP:=libtool
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/host-build.mk
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/jpeg/Default
    +  TITLE:=The Independent JPEG Group's JPEG
    +  URL:=http://www.ijg.org/
    +endef
    +
    +define Package/libjpeg
    +  $(call Package/jpeg/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= runtime library
    +endef
    +
    +define Package/jpeg-tools
    +  $(call Package/jpeg/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+libjpeg
    +  TITLE+= manipulation tools
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +HOST_CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +define Build/Prepare
    +	$(call Build/Prepare/Default)
    +	(cd $(PKG_BUILD_DIR); \
    +		rm -f ltconfig ltmain.sh libtool; \
    +		ln -s `which true` ltconfig; \
    +		ln -s $(STAGING_DIR)/host/bin/libtool libtool; \
    +	)
    +endef
    +
    +define Build/Compile
    +	$(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/{include,lib,bin,man/man1}
    +	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
    +		LIBTOOL="./libtool --tag=CC" \
    +		prefix="$(PKG_INSTALL_DIR)/usr" \
    +		exec_prefix="$(PKG_INSTALL_DIR)/usr" \
    +		all
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		prefix="$(PKG_INSTALL_DIR)/usr" \
    +		exec_prefix="$(PKG_INSTALL_DIR)/usr" \
    +		install install-headers install-lib
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(1)/usr/include/
    +	$(CP) $(PKG_BUILD_DIR)/jpegint.h $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libjpeg/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/jpeg-tools/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/*jpeg* $(1)/usr/bin/
    +endef
    +
    +$(eval $(call HostBuild))
    +$(eval $(call BuildPackage,libjpeg))
    +$(eval $(call BuildPackage,jpeg-tools))
    diff --git a/libs/jpeg/patches/001-allow-ccache.patch b/libs/jpeg/patches/001-allow-ccache.patch
    new file mode 100644
    index 0000000..0a21f21
    --- /dev/null
    +++ b/libs/jpeg/patches/001-allow-ccache.patch
    @@ -0,0 +1,11 @@
    +--- a/makefile.cfg
    ++++ b/makefile.cfg
    +@@ -168,7 +168,7 @@ libjpeg.a: @A2K_DEPS@ $(LIBOBJECTS)
    + 
    + # with libtool:
    + libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS)
    +-	$(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \
    ++	$(LIBTOOL) --mode=link "$(CC)" -o libjpeg.la $(LIBOBJECTS) \
    + 		-rpath $(libdir) -version-info $(JPEG_LIB_VERSION)
    + 
    + # sample programs:
    diff --git a/libs/jpeg/patches/200-crop.patch b/libs/jpeg/patches/200-crop.patch
    new file mode 100644
    index 0000000..271ef50
    --- /dev/null
    +++ b/libs/jpeg/patches/200-crop.patch
    @@ -0,0 +1,1896 @@
    +#! /bin/sh -e
    +
    +# DP: Lossless-crop patch from 
    +# DP: by .
    +
    +case "$1" in
    +    -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
    +    -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
    +    *)
    +        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    +        exit 1
    +esac
    +exit 0
    +@DPATCH@
    +diff -urNad /home/bill/debian/libjpeg/libjpeg6b-6b/jerror.h libjpeg6b-6b/jerror.h
    +--- /home/bill/debian/libjpeg/libjpeg6b-6b/jerror.h	2003-09-22 18:15:48.000000000 +0200
    ++++ libjpeg6b-6b/jerror.h	2003-09-22 18:16:12.000000000 +0200
    +@@ -45,6 +45,7 @@
    + JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix")
    + JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode")
    + JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS")
    ++JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request")
    + JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range")
    + JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported")
    + JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition")
    +diff -urNad /home/bill/debian/libjpeg/libjpeg6b-6b/jpegtran.c libjpeg6b-6b/jpegtran.c
    +--- /home/bill/debian/libjpeg/libjpeg6b-6b/jpegtran.c	2003-09-22 18:15:48.000000000 +0200
    ++++ libjpeg6b-6b/jpegtran.c	2003-09-22 18:16:22.000000000 +0200
    +@@ -1,7 +1,7 @@
    + /*
    +  * jpegtran.c
    +  *
    +- * Copyright (C) 1995-1997, Thomas G. Lane.
    ++ * Copyright (C) 1995-2001, Thomas G. Lane.
    +  * This file is part of the Independent JPEG Group's software.
    +  * For conditions of distribution and use, see the accompanying README file.
    +  *
    +@@ -64,8 +64,10 @@
    + #endif
    + #if TRANSFORMS_SUPPORTED
    +   fprintf(stderr, "Switches for modifying the image:\n");
    ++  fprintf(stderr, "  -crop WxH+X+Y  Crop to a rectangular subarea\n");
    +   fprintf(stderr, "  -grayscale     Reduce to grayscale (omit color data)\n");
    +   fprintf(stderr, "  -flip [horizontal|vertical]  Mirror image (left-right or top-bottom)\n");
    ++  fprintf(stderr, "  -perfect       Fail if there is non-transformable edge blocks\n");
    +   fprintf(stderr, "  -rotate [90|180|270]         Rotate image (degrees clockwise)\n");
    +   fprintf(stderr, "  -transpose     Transpose image\n");
    +   fprintf(stderr, "  -transverse    Transverse transpose image\n");
    +@@ -133,7 +135,9 @@
    +   copyoption = JCOPYOPT_DEFAULT;
    +   transformoption.transform = JXFORM_NONE;
    +   transformoption.trim = FALSE;
    ++  transformoption.perfect = FALSE;
    +   transformoption.force_grayscale = FALSE;
    ++  transformoption.crop = FALSE;
    +   cinfo->err->trace_level = 0;
    + 
    +   /* Scan command line options, adjust parameters */
    +@@ -160,7 +164,7 @@
    +       exit(EXIT_FAILURE);
    + #endif
    + 
    +-    } else if (keymatch(arg, "copy", 1)) {
    ++    } else if (keymatch(arg, "copy", 2)) {
    +       /* Select which extra markers to copy. */
    +       if (++argn >= argc)	/* advance to next argument */
    + 	usage();
    +@@ -173,6 +177,20 @@
    +       } else
    + 	usage();
    + 
    ++    } else if (keymatch(arg, "crop", 2)) {
    ++      /* Perform lossless cropping. */
    ++#if TRANSFORMS_SUPPORTED
    ++      if (++argn >= argc)	/* advance to next argument */
    ++	usage();
    ++      if (! jtransform_parse_crop_spec(&transformoption, argv[argn])) {
    ++	fprintf(stderr, "%s: bogus -crop argument '%s'\n",
    ++		progname, argv[argn]);
    ++	exit(EXIT_FAILURE);
    ++      }
    ++#else
    ++      select_transform(JXFORM_NONE);	/* force an error */
    ++#endif
    ++
    +     } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
    +       /* Enable debug printouts. */
    +       /* On first -d, print version identification */
    +@@ -233,7 +251,12 @@
    + 	usage();
    +       outfilename = argv[argn];	/* save it away for later use */
    + 
    +-    } else if (keymatch(arg, "progressive", 1)) {
    ++    } else if (keymatch(arg, "perfect", 2)) {
    ++      /* Fail if there is any partial edge MCUs that the transform can't
    ++       * handle. */
    ++      transformoption.perfect = TRUE;
    ++
    ++    } else if (keymatch(arg, "progressive", 2)) {
    +       /* Select simple progressive mode. */
    + #ifdef C_PROGRESSIVE_SUPPORTED
    +       simple_progressive = TRUE;
    +@@ -342,8 +365,10 @@
    +   jvirt_barray_ptr * src_coef_arrays;
    +   jvirt_barray_ptr * dst_coef_arrays;
    +   int file_index;
    +-  FILE * input_file;
    +-  FILE * output_file;
    ++  /* We assume all-in-memory processing and can therefore use only a
    ++   * single file pointer for sequential input and output operation. 
    ++   */
    ++  FILE * fp;
    + 
    +   /* On Mac, fetch a command line. */
    + #ifdef USE_CCOMMAND
    +@@ -406,24 +431,13 @@
    + 
    +   /* Open the input file. */
    +   if (file_index < argc) {
    +-    if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) {
    +-      fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]);
    ++    if ((fp = fopen(argv[file_index], READ_BINARY)) == NULL) {
    ++      fprintf(stderr, "%s: can't open %s for reading\n", progname, argv[file_index]);
    +       exit(EXIT_FAILURE);
    +     }
    +   } else {
    +     /* default input file is stdin */
    +-    input_file = read_stdin();
    +-  }
    +-
    +-  /* Open the output file. */
    +-  if (outfilename != NULL) {
    +-    if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) {
    +-      fprintf(stderr, "%s: can't open %s\n", progname, outfilename);
    +-      exit(EXIT_FAILURE);
    +-    }
    +-  } else {
    +-    /* default output file is stdout */
    +-    output_file = write_stdout();
    ++    fp = read_stdin();
    +   }
    + 
    + #ifdef PROGRESS_REPORT
    +@@ -431,7 +445,7 @@
    + #endif
    + 
    +   /* Specify data source for decompression */
    +-  jpeg_stdio_src(&srcinfo, input_file);
    ++  jpeg_stdio_src(&srcinfo, fp);
    + 
    +   /* Enable saving of extra markers that we want to copy */
    +   jcopy_markers_setup(&srcinfo, copyoption);
    +@@ -443,6 +457,15 @@
    +    * jpeg_read_coefficients so that memory allocation will be done right.
    +    */
    + #if TRANSFORMS_SUPPORTED
    ++  /* Fails right away if -perfect is given and transformation is not perfect.
    ++   */
    ++  if (transformoption.perfect &&
    ++      !jtransform_perfect_transform(srcinfo.image_width, srcinfo.image_height,
    ++      srcinfo.max_h_samp_factor * DCTSIZE, srcinfo.max_v_samp_factor * DCTSIZE,
    ++      transformoption.transform)) {
    ++    fprintf(stderr, "%s: transformation is not perfect\n", progname);
    ++    exit(EXIT_FAILURE);
    ++  }
    +   jtransform_request_workspace(&srcinfo, &transformoption);
    + #endif
    + 
    +@@ -463,11 +486,32 @@
    +   dst_coef_arrays = src_coef_arrays;
    + #endif
    + 
    ++  /* Close input file, if we opened it.
    ++   * Note: we assume that jpeg_read_coefficients consumed all input
    ++   * until JPEG_REACHED_EOI, and that jpeg_finish_decompress will
    ++   * only consume more while (! cinfo->inputctl->eoi_reached).
    ++   * We cannot call jpeg_finish_decompress here since we still need the
    ++   * virtual arrays allocated from the source object for processing.
    ++   */
    ++  if (fp != stdin)
    ++    fclose(fp);
    ++
    ++  /* Open the output file. */
    ++  if (outfilename != NULL) {
    ++    if ((fp = fopen(outfilename, WRITE_BINARY)) == NULL) {
    ++      fprintf(stderr, "%s: can't open %s for writing\n", progname, outfilename);
    ++      exit(EXIT_FAILURE);
    ++    }
    ++  } else {
    ++    /* default output file is stdout */
    ++    fp = write_stdout();
    ++  }
    ++
    +   /* Adjust default compression parameters by re-parsing the options */
    +   file_index = parse_switches(&dstinfo, argc, argv, 0, TRUE);
    + 
    +   /* Specify data destination for compression */
    +-  jpeg_stdio_dest(&dstinfo, output_file);
    ++  jpeg_stdio_dest(&dstinfo, fp);
    + 
    +   /* Start compressor (note no image data is actually written here) */
    +   jpeg_write_coefficients(&dstinfo, dst_coef_arrays);
    +@@ -488,11 +532,9 @@
    +   (void) jpeg_finish_decompress(&srcinfo);
    +   jpeg_destroy_decompress(&srcinfo);
    + 
    +-  /* Close files, if we opened them */
    +-  if (input_file != stdin)
    +-    fclose(input_file);
    +-  if (output_file != stdout)
    +-    fclose(output_file);
    ++  /* Close output file, if we opened it */
    ++  if (fp != stdout)
    ++    fclose(fp);
    + 
    + #ifdef PROGRESS_REPORT
    +   end_progress_monitor((j_common_ptr) &dstinfo);
    +diff -urNad /home/bill/debian/libjpeg/libjpeg6b-6b/transupp.c libjpeg6b-6b/transupp.c
    +--- /home/bill/debian/libjpeg/libjpeg6b-6b/transupp.c	2003-09-22 18:15:49.000000000 +0200
    ++++ libjpeg6b-6b/transupp.c	2003-09-22 18:16:28.000000000 +0200
    +@@ -1,7 +1,7 @@
    + /*
    +  * transupp.c
    +  *
    +- * Copyright (C) 1997, Thomas G. Lane.
    ++ * Copyright (C) 1997-2001, Thomas G. Lane.
    +  * This file is part of the Independent JPEG Group's software.
    +  * For conditions of distribution and use, see the accompanying README file.
    +  *
    +@@ -20,6 +20,7 @@
    + #include "jinclude.h"
    + #include "jpeglib.h"
    + #include "transupp.h"		/* My own external interface */
    ++#include 		/* to declare isdigit() */
    + 
    + 
    + #if TRANSFORMS_SUPPORTED
    +@@ -28,7 +29,8 @@
    +  * Lossless image transformation routines.  These routines work on DCT
    +  * coefficient arrays and thus do not require any lossy decompression
    +  * or recompression of the image.
    +- * Thanks to Guido Vollbeding for the initial design and code of this feature.
    ++ * Thanks to Guido Vollbeding for the initial design and code of this feature,
    ++ * and to Ben Jackson for introducing the cropping feature.
    +  *
    +  * Horizontal flipping is done in-place, using a single top-to-bottom
    +  * pass through the virtual source array.  It will thus be much the
    +@@ -42,6 +44,13 @@
    +  * arrays for most of the transforms.  That could result in much thrashing
    +  * if the image is larger than main memory.
    +  *
    ++ * If cropping or trimming is involved, the destination arrays may be smaller
    ++ * than the source arrays.  Note it is not possible to do horizontal flip
    ++ * in-place when a nonzero Y crop offset is specified, since we'd have to move
    ++ * data from one block row to another but the virtual array manager doesn't
    ++ * guarantee we can touch more than one row at a time.  So in that case,
    ++ * we have to use a separate destination array.
    ++ *
    +  * Some notes about the operating environment of the individual transform
    +  * routines:
    +  * 1. Both the source and destination virtual arrays are allocated from the
    +@@ -54,20 +63,65 @@
    +  *    and we may as well take that as the effective iMCU size.
    +  * 4. When "trim" is in effect, the destination's dimensions will be the
    +  *    trimmed values but the source's will be untrimmed.
    +- * 5. All the routines assume that the source and destination buffers are
    ++ * 5. When "crop" is in effect, the destination's dimensions will be the
    ++ *    cropped values but the source's will be uncropped.  Each transform
    ++ *    routine is responsible for picking up source data starting at the
    ++ *    correct X and Y offset for the crop region.  (The X and Y offsets
    ++ *    passed to the transform routines are measured in iMCU blocks of the
    ++ *    destination.)
    ++ * 6. All the routines assume that the source and destination buffers are
    +  *    padded out to a full iMCU boundary.  This is true, although for the
    +  *    source buffer it is an undocumented property of jdcoefct.c.
    +- * Notes 2,3,4 boil down to this: generally we should use the destination's
    +- * dimensions and ignore the source's.
    +  */
    + 
    + 
    + LOCAL(void)
    +-do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
    +-	   jvirt_barray_ptr *src_coef_arrays)
    +-/* Horizontal flip; done in-place, so no separate dest array is required */
    ++do_crop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
    ++	 JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
    ++	 jvirt_barray_ptr *src_coef_arrays,
    ++	 jvirt_barray_ptr *dst_coef_arrays)
    ++/* Crop.  This is only used when no rotate/flip is requested with the crop. */
    + {
    +-  JDIMENSION MCU_cols, comp_width, blk_x, blk_y;
    ++  JDIMENSION dst_blk_y, x_crop_blocks, y_crop_blocks;
    ++  int ci, offset_y;
    ++  JBLOCKARRAY src_buffer, dst_buffer;
    ++  jpeg_component_info *compptr;
    ++
    ++  /* We simply have to copy the right amount of data (the destination's
    ++   * image size) starting at the given X and Y offsets in the source.
    ++   */
    ++  for (ci = 0; ci < dstinfo->num_components; ci++) {
    ++    compptr = dstinfo->comp_info + ci;
    ++    x_crop_blocks = x_crop_offset * compptr->h_samp_factor;
    ++    y_crop_blocks = y_crop_offset * compptr->v_samp_factor;
    ++    for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
    ++	 dst_blk_y += compptr->v_samp_factor) {
    ++      dst_buffer = (*srcinfo->mem->access_virt_barray)
    ++	((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
    ++	 (JDIMENSION) compptr->v_samp_factor, TRUE);
    ++      src_buffer = (*srcinfo->mem->access_virt_barray)
    ++	((j_common_ptr) srcinfo, src_coef_arrays[ci],
    ++	 dst_blk_y + y_crop_blocks,
    ++	 (JDIMENSION) compptr->v_samp_factor, FALSE);
    ++      for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
    ++	jcopy_block_row(src_buffer[offset_y] + x_crop_blocks,
    ++			dst_buffer[offset_y],
    ++			compptr->width_in_blocks);
    ++      }
    ++    }
    ++  }
    ++}
    ++
    ++
    ++LOCAL(void)
    ++do_flip_h_no_crop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
    ++		   JDIMENSION x_crop_offset,
    ++		   jvirt_barray_ptr *src_coef_arrays)
    ++/* Horizontal flip; done in-place, so no separate dest array is required.
    ++ * NB: this only works when y_crop_offset is zero.
    ++ */
    ++{
    ++  JDIMENSION MCU_cols, comp_width, blk_x, blk_y, x_crop_blocks;
    +   int ci, k, offset_y;
    +   JBLOCKARRAY buffer;
    +   JCOEFPTR ptr1, ptr2;
    +@@ -79,17 +133,19 @@
    +    * mirroring by changing the signs of odd-numbered columns.
    +    * Partial iMCUs at the right edge are left untouched.
    +    */
    +-  MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
    ++  MCU_cols = srcinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
    + 
    +   for (ci = 0; ci < dstinfo->num_components; ci++) {
    +     compptr = dstinfo->comp_info + ci;
    +     comp_width = MCU_cols * compptr->h_samp_factor;
    ++    x_crop_blocks = x_crop_offset * compptr->h_samp_factor;
    +     for (blk_y = 0; blk_y < compptr->height_in_blocks;
    + 	 blk_y += compptr->v_samp_factor) {
    +       buffer = (*srcinfo->mem->access_virt_barray)
    + 	((j_common_ptr) srcinfo, src_coef_arrays[ci], blk_y,
    + 	 (JDIMENSION) compptr->v_samp_factor, TRUE);
    +       for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
    ++	/* Do the mirroring */
    + 	for (blk_x = 0; blk_x * 2 < comp_width; blk_x++) {
    + 	  ptr1 = buffer[offset_y][blk_x];
    + 	  ptr2 = buffer[offset_y][comp_width - blk_x - 1];
    +@@ -105,6 +161,79 @@
    + 	    *ptr2++ = -temp1;
    + 	  }
    + 	}
    ++	if (x_crop_blocks > 0) {
    ++	  /* Now left-justify the portion of the data to be kept.
    ++	   * We can't use a single jcopy_block_row() call because that routine
    ++	   * depends on memcpy(), whose behavior is unspecified for overlapping
    ++	   * source and destination areas.  Sigh.
    ++	   */
    ++	  for (blk_x = 0; blk_x < compptr->width_in_blocks; blk_x++) {
    ++	    jcopy_block_row(buffer[offset_y] + blk_x + x_crop_blocks,
    ++			    buffer[offset_y] + blk_x,
    ++			    (JDIMENSION) 1);
    ++	  }
    ++	}
    ++      }
    ++    }
    ++  }
    ++}
    ++
    ++
    ++LOCAL(void)
    ++do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
    ++	   JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
    ++	   jvirt_barray_ptr *src_coef_arrays,
    ++	   jvirt_barray_ptr *dst_coef_arrays)
    ++/* Horizontal flip in general cropping case */
    ++{
    ++  JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y;
    ++  JDIMENSION x_crop_blocks, y_crop_blocks;
    ++  int ci, k, offset_y;
    ++  JBLOCKARRAY src_buffer, dst_buffer;
    ++  JBLOCKROW src_row_ptr, dst_row_ptr;
    ++  JCOEFPTR src_ptr, dst_ptr;
    ++  jpeg_component_info *compptr;
    ++
    ++  /* Here we must output into a separate array because we can't touch
    ++   * different rows of a single virtual array simultaneously.  Otherwise,
    ++   * this is essentially the same as the routine above.
    ++   */
    ++  MCU_cols = srcinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
    ++
    ++  for (ci = 0; ci < dstinfo->num_components; ci++) {
    ++    compptr = dstinfo->comp_info + ci;
    ++    comp_width = MCU_cols * compptr->h_samp_factor;
    ++    x_crop_blocks = x_crop_offset * compptr->h_samp_factor;
    ++    y_crop_blocks = y_crop_offset * compptr->v_samp_factor;
    ++    for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
    ++	 dst_blk_y += compptr->v_samp_factor) {
    ++      dst_buffer = (*srcinfo->mem->access_virt_barray)
    ++	((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
    ++	 (JDIMENSION) compptr->v_samp_factor, TRUE);
    ++      src_buffer = (*srcinfo->mem->access_virt_barray)
    ++	((j_common_ptr) srcinfo, src_coef_arrays[ci],
    ++	 dst_blk_y + y_crop_blocks,
    ++	 (JDIMENSION) compptr->v_samp_factor, FALSE);
    ++      for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
    ++	dst_row_ptr = dst_buffer[offset_y];
    ++	src_row_ptr = src_buffer[offset_y];
    ++	for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) {
    ++	  if (x_crop_blocks + dst_blk_x < comp_width) {
    ++	    /* Do the mirrorable blocks */
    ++	    dst_ptr = dst_row_ptr[dst_blk_x];
    ++	    src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1];
    ++	    /* this unrolled loop doesn't need to know which row it's on... */
    ++	    for (k = 0; k < DCTSIZE2; k += 2) {
    ++	      *dst_ptr++ = *src_ptr++;	 /* copy even column */
    ++	      *dst_ptr++ = - *src_ptr++; /* copy odd column with sign change */
    ++	    }
    ++	  } else {
    ++	    /* Copy last partial block(s) verbatim */
    ++	    jcopy_block_row(src_row_ptr + dst_blk_x + x_crop_blocks,
    ++			    dst_row_ptr + dst_blk_x,
    ++			    (JDIMENSION) 1);
    ++	  }
    ++	}
    +       }
    +     }
    +   }
    +@@ -113,11 +242,13 @@
    + 
    + LOCAL(void)
    + do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
    ++	   JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
    + 	   jvirt_barray_ptr *src_coef_arrays,
    + 	   jvirt_barray_ptr *dst_coef_arrays)
    + /* Vertical flip */
    + {
    +   JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y;
    ++  JDIMENSION x_crop_blocks, y_crop_blocks;
    +   int ci, i, j, offset_y;
    +   JBLOCKARRAY src_buffer, dst_buffer;
    +   JBLOCKROW src_row_ptr, dst_row_ptr;
    +@@ -131,33 +262,38 @@
    +    * of odd-numbered rows.
    +    * Partial iMCUs at the bottom edge are copied verbatim.
    +    */
    +-  MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
    ++  MCU_rows = srcinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
    + 
    +   for (ci = 0; ci < dstinfo->num_components; ci++) {
    +     compptr = dstinfo->comp_info + ci;
    +     comp_height = MCU_rows * compptr->v_samp_factor;
    ++    x_crop_blocks = x_crop_offset * compptr->h_samp_factor;
    ++    y_crop_blocks = y_crop_offset * compptr->v_samp_factor;
    +     for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
    + 	 dst_blk_y += compptr->v_samp_factor) {
    +       dst_buffer = (*srcinfo->mem->access_virt_barray)
    + 	((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
    + 	 (JDIMENSION) compptr->v_samp_factor, TRUE);
    +-      if (dst_blk_y < comp_height) {
    ++      if (y_crop_blocks + dst_blk_y < comp_height) {
    + 	/* Row is within the mirrorable area. */
    + 	src_buffer = (*srcinfo->mem->access_virt_barray)
    + 	  ((j_common_ptr) srcinfo, src_coef_arrays[ci],
    +-	   comp_height - dst_blk_y - (JDIMENSION) compptr->v_samp_factor,
    ++	   comp_height - y_crop_blocks - dst_blk_y -
    ++	   (JDIMENSION) compptr->v_samp_factor,
    + 	   (JDIMENSION) compptr->v_samp_factor, FALSE);
    +       } else {
    + 	/* Bottom-edge blocks will be copied verbatim. */
    + 	src_buffer = (*srcinfo->mem->access_virt_barray)
    +-	  ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_y,
    ++	  ((j_common_ptr) srcinfo, src_coef_arrays[ci],
    ++	   dst_blk_y + y_crop_blocks,
    + 	   (JDIMENSION) compptr->v_samp_factor, FALSE);
    +       }
    +       for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
    +-	if (dst_blk_y < comp_height) {
    ++	if (y_crop_blocks + dst_blk_y < comp_height) {
    + 	  /* Row is within the mirrorable area. */
    + 	  dst_row_ptr = dst_buffer[offset_y];
    + 	  src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1];
    ++	  src_row_ptr += x_crop_blocks;
    + 	  for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
    + 	       dst_blk_x++) {
    + 	    dst_ptr = dst_row_ptr[dst_blk_x];
    +@@ -173,7 +309,8 @@
    + 	  }
    + 	} else {
    + 	  /* Just copy row verbatim. */
    +-	  jcopy_block_row(src_buffer[offset_y], dst_buffer[offset_y],
    ++	  jcopy_block_row(src_buffer[offset_y] + x_crop_blocks,
    ++			  dst_buffer[offset_y],
    + 			  compptr->width_in_blocks);
    + 	}
    +       }
    +@@ -184,11 +321,12 @@
    + 
    + LOCAL(void)
    + do_transpose (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
    ++	      JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
    + 	      jvirt_barray_ptr *src_coef_arrays,
    + 	      jvirt_barray_ptr *dst_coef_arrays)
    + /* Transpose source into destination */
    + {
    +-  JDIMENSION dst_blk_x, dst_blk_y;
    ++  JDIMENSION dst_blk_x, dst_blk_y, x_crop_blocks, y_crop_blocks;
    +   int ci, i, j, offset_x, offset_y;
    +   JBLOCKARRAY src_buffer, dst_buffer;
    +   JCOEFPTR src_ptr, dst_ptr;
    +@@ -201,6 +339,8 @@
    +    */
    +   for (ci = 0; ci < dstinfo->num_components; ci++) {
    +     compptr = dstinfo->comp_info + ci;
    ++    x_crop_blocks = x_crop_offset * compptr->h_samp_factor;
    ++    y_crop_blocks = y_crop_offset * compptr->v_samp_factor;
    +     for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
    + 	 dst_blk_y += compptr->v_samp_factor) {
    +       dst_buffer = (*srcinfo->mem->access_virt_barray)
    +@@ -210,11 +350,12 @@
    + 	for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
    + 	     dst_blk_x += compptr->h_samp_factor) {
    + 	  src_buffer = (*srcinfo->mem->access_virt_barray)
    +-	    ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
    ++	    ((j_common_ptr) srcinfo, src_coef_arrays[ci],
    ++	     dst_blk_x + x_crop_blocks,
    + 	     (JDIMENSION) compptr->h_samp_factor, FALSE);
    + 	  for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
    +-	    src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
    + 	    dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
    ++	    src_ptr = src_buffer[offset_x][dst_blk_y + offset_y + y_crop_blocks];
    + 	    for (i = 0; i < DCTSIZE; i++)
    + 	      for (j = 0; j < DCTSIZE; j++)
    + 		dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
    +@@ -228,6 +369,7 @@
    + 
    + LOCAL(void)
    + do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
    ++	   JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
    + 	   jvirt_barray_ptr *src_coef_arrays,
    + 	   jvirt_barray_ptr *dst_coef_arrays)
    + /* 90 degree rotation is equivalent to
    +@@ -237,6 +379,7 @@
    +  */
    + {
    +   JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y;
    ++  JDIMENSION x_crop_blocks, y_crop_blocks;
    +   int ci, i, j, offset_x, offset_y;
    +   JBLOCKARRAY src_buffer, dst_buffer;
    +   JCOEFPTR src_ptr, dst_ptr;
    +@@ -246,11 +389,13 @@
    +    * at the (output) right edge properly.  They just get transposed and
    +    * not mirrored.
    +    */
    +-  MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
    ++  MCU_cols = srcinfo->image_height / (dstinfo->max_h_samp_factor * DCTSIZE);
    + 
    +   for (ci = 0; ci < dstinfo->num_components; ci++) {
    +     compptr = dstinfo->comp_info + ci;
    +     comp_width = MCU_cols * compptr->h_samp_factor;
    ++    x_crop_blocks = x_crop_offset * compptr->h_samp_factor;
    ++    y_crop_blocks = y_crop_offset * compptr->v_samp_factor;
    +     for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
    + 	 dst_blk_y += compptr->v_samp_factor) {
    +       dst_buffer = (*srcinfo->mem->access_virt_barray)
    +@@ -259,15 +404,26 @@
    +       for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
    + 	for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
    + 	     dst_blk_x += compptr->h_samp_factor) {
    +-	  src_buffer = (*srcinfo->mem->access_virt_barray)
    +-	    ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
    +-	     (JDIMENSION) compptr->h_samp_factor, FALSE);
    ++	  if (x_crop_blocks + dst_blk_x < comp_width) {
    ++	    /* Block is within the mirrorable area. */
    ++	    src_buffer = (*srcinfo->mem->access_virt_barray)
    ++	      ((j_common_ptr) srcinfo, src_coef_arrays[ci],
    ++	       comp_width - x_crop_blocks - dst_blk_x -
    ++	       (JDIMENSION) compptr->h_samp_factor,
    ++	       (JDIMENSION) compptr->h_samp_factor, FALSE);
    ++	  } else {
    ++	    /* Edge blocks are transposed but not mirrored. */
    ++	    src_buffer = (*srcinfo->mem->access_virt_barray)
    ++	      ((j_common_ptr) srcinfo, src_coef_arrays[ci],
    ++	       dst_blk_x + x_crop_blocks,
    ++	       (JDIMENSION) compptr->h_samp_factor, FALSE);
    ++	  }
    + 	  for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
    +-	    src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
    +-	    if (dst_blk_x < comp_width) {
    ++	    dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
    ++	    if (x_crop_blocks + dst_blk_x < comp_width) {
    + 	      /* Block is within the mirrorable area. */
    +-	      dst_ptr = dst_buffer[offset_y]
    +-		[comp_width - dst_blk_x - offset_x - 1];
    ++	      src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1]
    ++		[dst_blk_y + offset_y + y_crop_blocks];
    + 	      for (i = 0; i < DCTSIZE; i++) {
    + 		for (j = 0; j < DCTSIZE; j++)
    + 		  dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
    +@@ -277,7 +433,8 @@
    + 	      }
    + 	    } else {
    + 	      /* Edge blocks are transposed but not mirrored. */
    +-	      dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
    ++	      src_ptr = src_buffer[offset_x]
    ++		[dst_blk_y + offset_y + y_crop_blocks];
    + 	      for (i = 0; i < DCTSIZE; i++)
    + 		for (j = 0; j < DCTSIZE; j++)
    + 		  dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
    +@@ -292,6 +449,7 @@
    + 
    + LOCAL(void)
    + do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
    ++	    JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
    + 	    jvirt_barray_ptr *src_coef_arrays,
    + 	    jvirt_barray_ptr *dst_coef_arrays)
    + /* 270 degree rotation is equivalent to
    +@@ -301,6 +459,7 @@
    +  */
    + {
    +   JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y;
    ++  JDIMENSION x_crop_blocks, y_crop_blocks;
    +   int ci, i, j, offset_x, offset_y;
    +   JBLOCKARRAY src_buffer, dst_buffer;
    +   JCOEFPTR src_ptr, dst_ptr;
    +@@ -310,11 +469,13 @@
    +    * at the (output) bottom edge properly.  They just get transposed and
    +    * not mirrored.
    +    */
    +-  MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
    ++  MCU_rows = srcinfo->image_width / (dstinfo->max_v_samp_factor * DCTSIZE);
    + 
    +   for (ci = 0; ci < dstinfo->num_components; ci++) {
    +     compptr = dstinfo->comp_info + ci;
    +     comp_height = MCU_rows * compptr->v_samp_factor;
    ++    x_crop_blocks = x_crop_offset * compptr->h_samp_factor;
    ++    y_crop_blocks = y_crop_offset * compptr->v_samp_factor;
    +     for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
    + 	 dst_blk_y += compptr->v_samp_factor) {
    +       dst_buffer = (*srcinfo->mem->access_virt_barray)
    +@@ -324,14 +485,15 @@
    + 	for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
    + 	     dst_blk_x += compptr->h_samp_factor) {
    + 	  src_buffer = (*srcinfo->mem->access_virt_barray)
    +-	    ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
    ++	    ((j_common_ptr) srcinfo, src_coef_arrays[ci],
    ++	     dst_blk_x + x_crop_blocks,
    + 	     (JDIMENSION) compptr->h_samp_factor, FALSE);
    + 	  for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
    + 	    dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
    +-	    if (dst_blk_y < comp_height) {
    ++	    if (y_crop_blocks + dst_blk_y < comp_height) {
    + 	      /* Block is within the mirrorable area. */
    + 	      src_ptr = src_buffer[offset_x]
    +-		[comp_height - dst_blk_y - offset_y - 1];
    ++		[comp_height - y_crop_blocks - dst_blk_y - offset_y - 1];
    + 	      for (i = 0; i < DCTSIZE; i++) {
    + 		for (j = 0; j < DCTSIZE; j++) {
    + 		  dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
    +@@ -341,7 +503,8 @@
    + 	      }
    + 	    } else {
    + 	      /* Edge blocks are transposed but not mirrored. */
    +-	      src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
    ++	      src_ptr = src_buffer[offset_x]
    ++		[dst_blk_y + offset_y + y_crop_blocks];
    + 	      for (i = 0; i < DCTSIZE; i++)
    + 		for (j = 0; j < DCTSIZE; j++)
    + 		  dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
    +@@ -356,6 +519,7 @@
    + 
    + LOCAL(void)
    + do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
    ++	    JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
    + 	    jvirt_barray_ptr *src_coef_arrays,
    + 	    jvirt_barray_ptr *dst_coef_arrays)
    + /* 180 degree rotation is equivalent to
    +@@ -365,89 +529,93 @@
    +  */
    + {
    +   JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y;
    ++  JDIMENSION x_crop_blocks, y_crop_blocks;
    +   int ci, i, j, offset_y;
    +   JBLOCKARRAY src_buffer, dst_buffer;
    +   JBLOCKROW src_row_ptr, dst_row_ptr;
    +   JCOEFPTR src_ptr, dst_ptr;
    +   jpeg_component_info *compptr;
    + 
    +-  MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
    +-  MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
    ++  MCU_cols = srcinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
    ++  MCU_rows = srcinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
    + 
    +   for (ci = 0; ci < dstinfo->num_components; ci++) {
    +     compptr = dstinfo->comp_info + ci;
    +     comp_width = MCU_cols * compptr->h_samp_factor;
    +     comp_height = MCU_rows * compptr->v_samp_factor;
    ++    x_crop_blocks = x_crop_offset * compptr->h_samp_factor;
    ++    y_crop_blocks = y_crop_offset * compptr->v_samp_factor;
    +     for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
    + 	 dst_blk_y += compptr->v_samp_factor) {
    +       dst_buffer = (*srcinfo->mem->access_virt_barray)
    + 	((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
    + 	 (JDIMENSION) compptr->v_samp_factor, TRUE);
    +-      if (dst_blk_y < comp_height) {
    ++      if (y_crop_blocks + dst_blk_y < comp_height) {
    + 	/* Row is within the vertically mirrorable area. */
    + 	src_buffer = (*srcinfo->mem->access_virt_barray)
    + 	  ((j_common_ptr) srcinfo, src_coef_arrays[ci],
    +-	   comp_height - dst_blk_y - (JDIMENSION) compptr->v_samp_factor,
    ++	   comp_height - y_crop_blocks - dst_blk_y -
    ++	   (JDIMENSION) compptr->v_samp_factor,
    + 	   (JDIMENSION) compptr->v_samp_factor, FALSE);
    +       } else {
    + 	/* Bottom-edge rows are only mirrored horizontally. */
    + 	src_buffer = (*srcinfo->mem->access_virt_barray)
    +-	  ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_y,
    ++	  ((j_common_ptr) srcinfo, src_coef_arrays[ci],
    ++	   dst_blk_y + y_crop_blocks,
    + 	   (JDIMENSION) compptr->v_samp_factor, FALSE);
    +       }
    +       for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
    +-	if (dst_blk_y < comp_height) {
    ++	dst_row_ptr = dst_buffer[offset_y];
    ++	if (y_crop_blocks + dst_blk_y < comp_height) {
    + 	  /* Row is within the mirrorable area. */
    +-	  dst_row_ptr = dst_buffer[offset_y];
    + 	  src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1];
    +-	  /* Process the blocks that can be mirrored both ways. */
    +-	  for (dst_blk_x = 0; dst_blk_x < comp_width; dst_blk_x++) {
    ++	  for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) {
    + 	    dst_ptr = dst_row_ptr[dst_blk_x];
    +-	    src_ptr = src_row_ptr[comp_width - dst_blk_x - 1];
    +-	    for (i = 0; i < DCTSIZE; i += 2) {
    +-	      /* For even row, negate every odd column. */
    +-	      for (j = 0; j < DCTSIZE; j += 2) {
    +-		*dst_ptr++ = *src_ptr++;
    +-		*dst_ptr++ = - *src_ptr++;
    ++	    if (x_crop_blocks + dst_blk_x < comp_width) {
    ++	      /* Process the blocks that can be mirrored both ways. */
    ++	      src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1];
    ++	      for (i = 0; i < DCTSIZE; i += 2) {
    ++		/* For even row, negate every odd column. */
    ++		for (j = 0; j < DCTSIZE; j += 2) {
    ++		  *dst_ptr++ = *src_ptr++;
    ++		  *dst_ptr++ = - *src_ptr++;
    ++		}
    ++		/* For odd row, negate every even column. */
    ++		for (j = 0; j < DCTSIZE; j += 2) {
    ++		  *dst_ptr++ = - *src_ptr++;
    ++		  *dst_ptr++ = *src_ptr++;
    ++		}
    + 	      }
    +-	      /* For odd row, negate every even column. */
    +-	      for (j = 0; j < DCTSIZE; j += 2) {
    +-		*dst_ptr++ = - *src_ptr++;
    +-		*dst_ptr++ = *src_ptr++;
    ++	    } else {
    ++	      /* Any remaining right-edge blocks are only mirrored vertically. */
    ++	      src_ptr = src_row_ptr[x_crop_blocks + dst_blk_x];
    ++	      for (i = 0; i < DCTSIZE; i += 2) {
    ++		for (j = 0; j < DCTSIZE; j++)
    ++		  *dst_ptr++ = *src_ptr++;
    ++		for (j = 0; j < DCTSIZE; j++)
    ++		  *dst_ptr++ = - *src_ptr++;
    + 	      }
    + 	    }
    + 	  }
    +-	  /* Any remaining right-edge blocks are only mirrored vertically. */
    +-	  for (; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) {
    +-	    dst_ptr = dst_row_ptr[dst_blk_x];
    +-	    src_ptr = src_row_ptr[dst_blk_x];
    +-	    for (i = 0; i < DCTSIZE; i += 2) {
    +-	      for (j = 0; j < DCTSIZE; j++)
    +-		*dst_ptr++ = *src_ptr++;
    +-	      for (j = 0; j < DCTSIZE; j++)
    +-		*dst_ptr++ = - *src_ptr++;
    +-	    }
    +-	  }
    + 	} else {
    + 	  /* Remaining rows are just mirrored horizontally. */
    +-	  dst_row_ptr = dst_buffer[offset_y];
    + 	  src_row_ptr = src_buffer[offset_y];
    +-	  /* Process the blocks that can be mirrored. */
    +-	  for (dst_blk_x = 0; dst_blk_x < comp_width; dst_blk_x++) {
    +-	    dst_ptr = dst_row_ptr[dst_blk_x];
    +-	    src_ptr = src_row_ptr[comp_width - dst_blk_x - 1];
    +-	    for (i = 0; i < DCTSIZE2; i += 2) {
    +-	      *dst_ptr++ = *src_ptr++;
    +-	      *dst_ptr++ = - *src_ptr++;
    ++	  for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) {
    ++	    if (x_crop_blocks + dst_blk_x < comp_width) {
    ++	      /* Process the blocks that can be mirrored. */
    ++	      dst_ptr = dst_row_ptr[dst_blk_x];
    ++	      src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1];
    ++	      for (i = 0; i < DCTSIZE2; i += 2) {
    ++		*dst_ptr++ = *src_ptr++;
    ++		*dst_ptr++ = - *src_ptr++;
    ++	      }
    ++	    } else {
    ++	      /* Any remaining right-edge blocks are only copied. */
    ++	      jcopy_block_row(src_row_ptr + dst_blk_x + x_crop_blocks,
    ++			      dst_row_ptr + dst_blk_x,
    ++			      (JDIMENSION) 1);
    + 	    }
    + 	  }
    +-	  /* Any remaining right-edge blocks are only copied. */
    +-	  for (; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) {
    +-	    dst_ptr = dst_row_ptr[dst_blk_x];
    +-	    src_ptr = src_row_ptr[dst_blk_x];
    +-	    for (i = 0; i < DCTSIZE2; i++)
    +-	      *dst_ptr++ = *src_ptr++;
    +-	  }
    + 	}
    +       }
    +     }
    +@@ -457,6 +625,7 @@
    + 
    + LOCAL(void)
    + do_transverse (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
    ++	       JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
    + 	       jvirt_barray_ptr *src_coef_arrays,
    + 	       jvirt_barray_ptr *dst_coef_arrays)
    + /* Transverse transpose is equivalent to
    +@@ -470,18 +639,21 @@
    +  */
    + {
    +   JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y;
    ++  JDIMENSION x_crop_blocks, y_crop_blocks;
    +   int ci, i, j, offset_x, offset_y;
    +   JBLOCKARRAY src_buffer, dst_buffer;
    +   JCOEFPTR src_ptr, dst_ptr;
    +   jpeg_component_info *compptr;
    + 
    +-  MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
    +-  MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
    ++  MCU_cols = srcinfo->image_height / (dstinfo->max_h_samp_factor * DCTSIZE);
    ++  MCU_rows = srcinfo->image_width / (dstinfo->max_v_samp_factor * DCTSIZE);
    + 
    +   for (ci = 0; ci < dstinfo->num_components; ci++) {
    +     compptr = dstinfo->comp_info + ci;
    +     comp_width = MCU_cols * compptr->h_samp_factor;
    +     comp_height = MCU_rows * compptr->v_samp_factor;
    ++    x_crop_blocks = x_crop_offset * compptr->h_samp_factor;
    ++    y_crop_blocks = y_crop_offset * compptr->v_samp_factor;
    +     for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
    + 	 dst_blk_y += compptr->v_samp_factor) {
    +       dst_buffer = (*srcinfo->mem->access_virt_barray)
    +@@ -490,17 +662,26 @@
    +       for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
    + 	for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
    + 	     dst_blk_x += compptr->h_samp_factor) {
    +-	  src_buffer = (*srcinfo->mem->access_virt_barray)
    +-	    ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
    +-	     (JDIMENSION) compptr->h_samp_factor, FALSE);
    ++	  if (x_crop_blocks + dst_blk_x < comp_width) {
    ++	    /* Block is within the mirrorable area. */
    ++	    src_buffer = (*srcinfo->mem->access_virt_barray)
    ++	      ((j_common_ptr) srcinfo, src_coef_arrays[ci],
    ++	       comp_width - x_crop_blocks - dst_blk_x -
    ++	       (JDIMENSION) compptr->h_samp_factor,
    ++	       (JDIMENSION) compptr->h_samp_factor, FALSE);
    ++	  } else {
    ++	    src_buffer = (*srcinfo->mem->access_virt_barray)
    ++	      ((j_common_ptr) srcinfo, src_coef_arrays[ci],
    ++	       dst_blk_x + x_crop_blocks,
    ++	       (JDIMENSION) compptr->h_samp_factor, FALSE);
    ++	  }
    + 	  for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
    +-	    if (dst_blk_y < comp_height) {
    +-	      src_ptr = src_buffer[offset_x]
    +-		[comp_height - dst_blk_y - offset_y - 1];
    +-	      if (dst_blk_x < comp_width) {
    ++	    dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
    ++	    if (y_crop_blocks + dst_blk_y < comp_height) {
    ++	      if (x_crop_blocks + dst_blk_x < comp_width) {
    + 		/* Block is within the mirrorable area. */
    +-		dst_ptr = dst_buffer[offset_y]
    +-		  [comp_width - dst_blk_x - offset_x - 1];
    ++		src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1]
    ++		  [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1];
    + 		for (i = 0; i < DCTSIZE; i++) {
    + 		  for (j = 0; j < DCTSIZE; j++) {
    + 		    dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
    +@@ -516,7 +697,8 @@
    + 		}
    + 	      } else {
    + 		/* Right-edge blocks are mirrored in y only */
    +-		dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
    ++		src_ptr = src_buffer[offset_x]
    ++		  [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1];
    + 		for (i = 0; i < DCTSIZE; i++) {
    + 		  for (j = 0; j < DCTSIZE; j++) {
    + 		    dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
    +@@ -526,11 +708,10 @@
    + 		}
    + 	      }
    + 	    } else {
    +-	      src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
    +-	      if (dst_blk_x < comp_width) {
    ++	      if (x_crop_blocks + dst_blk_x < comp_width) {
    + 		/* Bottom-edge blocks are mirrored in x only */
    +-		dst_ptr = dst_buffer[offset_y]
    +-		  [comp_width - dst_blk_x - offset_x - 1];
    ++		src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1]
    ++		  [dst_blk_y + offset_y + y_crop_blocks];
    + 		for (i = 0; i < DCTSIZE; i++) {
    + 		  for (j = 0; j < DCTSIZE; j++)
    + 		    dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
    +@@ -540,7 +721,8 @@
    + 		}
    + 	      } else {
    + 		/* At lower right corner, just transpose, no mirroring */
    +-		dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
    ++		src_ptr = src_buffer[offset_x]
    ++		  [dst_blk_y + offset_y + y_crop_blocks];
    + 		for (i = 0; i < DCTSIZE; i++)
    + 		  for (j = 0; j < DCTSIZE; j++)
    + 		    dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
    +@@ -554,8 +736,116 @@
    + }
    + 
    + 
    ++/* Parse an unsigned integer: subroutine for jtransform_parse_crop_spec.
    ++ * Returns TRUE if valid integer found, FALSE if not.
    ++ * *strptr is advanced over the digit string, and *result is set to its value.
    ++ */
    ++
    ++LOCAL(boolean)
    ++jt_read_integer (const char ** strptr, JDIMENSION * result)
    ++{
    ++  const char * ptr = *strptr;
    ++  JDIMENSION val = 0;
    ++
    ++  for (; isdigit(*ptr); ptr++) {
    ++    val = val * 10 + (JDIMENSION) (*ptr - '0');
    ++  }
    ++  *result = val;
    ++  if (ptr == *strptr)
    ++    return FALSE;		/* oops, no digits */
    ++  *strptr = ptr;
    ++  return TRUE;
    ++}
    ++
    ++
    ++/* Parse a crop specification (written in X11 geometry style).
    ++ * The routine returns TRUE if the spec string is valid, FALSE if not.
    ++ *
    ++ * The crop spec string should have the format
    ++ *	x{+-}{+-}
    ++ * where width, height, xoffset, and yoffset are unsigned integers.
    ++ * Each of the elements can be omitted to indicate a default value.
    ++ * (A weakness of this style is that it is not possible to omit xoffset
    ++ * while specifying yoffset, since they look alike.)
    ++ *
    ++ * This code is loosely based on XParseGeometry from the X11 distribution.
    ++ */
    ++
    ++GLOBAL(boolean)
    ++jtransform_parse_crop_spec (jpeg_transform_info *info, const char *spec)
    ++{
    ++  info->crop = FALSE;
    ++  info->crop_width_set = JCROP_UNSET;
    ++  info->crop_height_set = JCROP_UNSET;
    ++  info->crop_xoffset_set = JCROP_UNSET;
    ++  info->crop_yoffset_set = JCROP_UNSET;
    ++
    ++  if (isdigit(*spec)) {
    ++    /* fetch width */
    ++    if (! jt_read_integer(&spec, &info->crop_width))
    ++      return FALSE;
    ++    info->crop_width_set = JCROP_POS;
    ++  }
    ++  if (*spec == 'x' || *spec == 'X') {	
    ++    /* fetch height */
    ++    spec++;
    ++    if (! jt_read_integer(&spec, &info->crop_height))
    ++      return FALSE;
    ++    info->crop_height_set = JCROP_POS;
    ++  }
    ++  if (*spec == '+' || *spec == '-') {
    ++    /* fetch xoffset */
    ++    info->crop_xoffset_set = (*spec == '-') ? JCROP_NEG : JCROP_POS;
    ++    spec++;
    ++    if (! jt_read_integer(&spec, &info->crop_xoffset))
    ++      return FALSE;
    ++  }
    ++  if (*spec == '+' || *spec == '-') {
    ++    /* fetch yoffset */
    ++    info->crop_yoffset_set = (*spec == '-') ? JCROP_NEG : JCROP_POS;
    ++    spec++;
    ++    if (! jt_read_integer(&spec, &info->crop_yoffset))
    ++      return FALSE;
    ++  }
    ++  /* We had better have gotten to the end of the string. */
    ++  if (*spec != '\0')
    ++    return FALSE;
    ++  info->crop = TRUE;
    ++  return TRUE;
    ++}
    ++
    ++
    ++/* Trim off any partial iMCUs on the indicated destination edge */
    ++
    ++LOCAL(void)
    ++trim_right_edge (jpeg_transform_info *info, JDIMENSION full_width)
    ++{
    ++  JDIMENSION MCU_cols;
    ++
    ++  MCU_cols = info->output_width / (info->max_h_samp_factor * DCTSIZE);
    ++  if (MCU_cols > 0 && info->x_crop_offset + MCU_cols ==
    ++      full_width / (info->max_h_samp_factor * DCTSIZE))
    ++    info->output_width = MCU_cols * (info->max_h_samp_factor * DCTSIZE);
    ++}
    ++
    ++LOCAL(void)
    ++trim_bottom_edge (jpeg_transform_info *info, JDIMENSION full_height)
    ++{
    ++  JDIMENSION MCU_rows;
    ++
    ++  MCU_rows = info->output_height / (info->max_v_samp_factor * DCTSIZE);
    ++  if (MCU_rows > 0 && info->y_crop_offset + MCU_rows ==
    ++      full_height / (info->max_v_samp_factor * DCTSIZE))
    ++    info->output_height = MCU_rows * (info->max_v_samp_factor * DCTSIZE);
    ++}
    ++
    ++
    + /* Request any required workspace.
    +  *
    ++ * This routine figures out the size that the output image will be
    ++ * (which implies that all the transform parameters must be set before
    ++ * it is called).
    ++ *
    +  * We allocate the workspace virtual arrays from the source decompression
    +  * object, so that all the arrays (both the original data and the workspace)
    +  * will be taken into account while making memory management decisions.
    +@@ -569,9 +859,13 @@
    + 			      jpeg_transform_info *info)
    + {
    +   jvirt_barray_ptr *coef_arrays = NULL;
    ++  boolean need_workspace, transpose_it;
    +   jpeg_component_info *compptr;
    +-  int ci;
    ++  JDIMENSION xoffset, yoffset, width_in_iMCUs, height_in_iMCUs;
    ++  JDIMENSION width_in_blocks, height_in_blocks;
    ++  int ci, h_samp_factor, v_samp_factor;
    + 
    ++  /* Determine number of components in output image */
    +   if (info->force_grayscale &&
    +       srcinfo->jpeg_color_space == JCS_YCbCr &&
    +       srcinfo->num_components == 3) {
    +@@ -581,55 +875,181 @@
    +     /* Process all the components */
    +     info->num_components = srcinfo->num_components;
    +   }
    ++  /* If there is only one output component, force the iMCU size to be 1;
    ++   * else use the source iMCU size.  (This allows us to do the right thing
    ++   * when reducing color to grayscale, and also provides a handy way of
    ++   * cleaning up "funny" grayscale images whose sampling factors are not 1x1.)
    ++   */
    + 
    +   switch (info->transform) {
    ++  case JXFORM_TRANSPOSE:
    ++  case JXFORM_TRANSVERSE:
    ++  case JXFORM_ROT_90:
    ++  case JXFORM_ROT_270:
    ++    info->output_width = srcinfo->image_height;
    ++    info->output_height = srcinfo->image_width;
    ++    if (info->num_components == 1) {
    ++      info->max_h_samp_factor = 1;
    ++      info->max_v_samp_factor = 1;
    ++    } else {
    ++      info->max_h_samp_factor = srcinfo->max_v_samp_factor;
    ++      info->max_v_samp_factor = srcinfo->max_h_samp_factor;
    ++    }
    ++    break;
    ++  default:
    ++    info->output_width = srcinfo->image_width;
    ++    info->output_height = srcinfo->image_height;
    ++    if (info->num_components == 1) {
    ++      info->max_h_samp_factor = 1;
    ++      info->max_v_samp_factor = 1;
    ++    } else {
    ++      info->max_h_samp_factor = srcinfo->max_h_samp_factor;
    ++      info->max_v_samp_factor = srcinfo->max_v_samp_factor;
    ++    }
    ++    break;
    ++  }
    ++
    ++  /* If cropping has been requested, compute the crop area's position and
    ++   * dimensions, ensuring that its upper left corner falls at an iMCU boundary.
    ++   */
    ++  if (info->crop) {
    ++    /* Insert default values for unset crop parameters */
    ++    if (info->crop_xoffset_set == JCROP_UNSET)
    ++      info->crop_xoffset = 0;	/* default to +0 */
    ++    if (info->crop_yoffset_set == JCROP_UNSET)
    ++      info->crop_yoffset = 0;	/* default to +0 */
    ++    if (info->crop_xoffset >= info->output_width ||
    ++	info->crop_yoffset >= info->output_height)
    ++      ERREXIT(srcinfo, JERR_BAD_CROP_SPEC);
    ++    if (info->crop_width_set == JCROP_UNSET)
    ++      info->crop_width = info->output_width - info->crop_xoffset;
    ++    if (info->crop_height_set == JCROP_UNSET)
    ++      info->crop_height = info->output_height - info->crop_yoffset;
    ++    /* Ensure parameters are valid */
    ++    if (info->crop_width <= 0 || info->crop_width > info->output_width ||
    ++	info->crop_height <= 0 || info->crop_height > info->output_height ||
    ++	info->crop_xoffset > info->output_width - info->crop_width ||
    ++	info->crop_yoffset > info->output_height - info->crop_height)
    ++      ERREXIT(srcinfo, JERR_BAD_CROP_SPEC);
    ++    /* Convert negative crop offsets into regular offsets */
    ++    if (info->crop_xoffset_set == JCROP_NEG)
    ++      xoffset = info->output_width - info->crop_width - info->crop_xoffset;
    ++    else
    ++      xoffset = info->crop_xoffset;
    ++    if (info->crop_yoffset_set == JCROP_NEG)
    ++      yoffset = info->output_height - info->crop_height - info->crop_yoffset;
    ++    else
    ++      yoffset = info->crop_yoffset;
    ++    /* Now adjust so that upper left corner falls at an iMCU boundary */
    ++    info->output_width =
    ++      info->crop_width + (xoffset % (info->max_h_samp_factor * DCTSIZE));
    ++    info->output_height =
    ++      info->crop_height + (yoffset % (info->max_v_samp_factor * DCTSIZE));
    ++    /* Save x/y offsets measured in iMCUs */
    ++    info->x_crop_offset = xoffset / (info->max_h_samp_factor * DCTSIZE);
    ++    info->y_crop_offset = yoffset / (info->max_v_samp_factor * DCTSIZE);
    ++  } else {
    ++    info->x_crop_offset = 0;
    ++    info->y_crop_offset = 0;
    ++  }
    ++
    ++  /* Figure out whether we need workspace arrays,
    ++   * and if so whether they are transposed relative to the source.
    ++   */
    ++  need_workspace = FALSE;
    ++  transpose_it = FALSE;
    ++  switch (info->transform) {
    +   case JXFORM_NONE:
    ++    if (info->x_crop_offset != 0 || info->y_crop_offset != 0)
    ++      need_workspace = TRUE;
    ++    /* No workspace needed if neither cropping nor transforming */
    ++    break;
    +   case JXFORM_FLIP_H:
    +-    /* Don't need a workspace array */
    ++    if (info->trim)
    ++      trim_right_edge(info, srcinfo->image_width);
    ++    if (info->y_crop_offset != 0)
    ++      need_workspace = TRUE;
    ++    /* do_flip_h_no_crop doesn't need a workspace array */
    +     break;
    +   case JXFORM_FLIP_V:
    +-  case JXFORM_ROT_180:
    +-    /* Need workspace arrays having same dimensions as source image.
    +-     * Note that we allocate arrays padded out to the next iMCU boundary,
    +-     * so that transform routines need not worry about missing edge blocks.
    +-     */
    +-    coef_arrays = (jvirt_barray_ptr *)
    +-      (*srcinfo->mem->alloc_small) ((j_common_ptr) srcinfo, JPOOL_IMAGE,
    +-	SIZEOF(jvirt_barray_ptr) * info->num_components);
    +-    for (ci = 0; ci < info->num_components; ci++) {
    +-      compptr = srcinfo->comp_info + ci;
    +-      coef_arrays[ci] = (*srcinfo->mem->request_virt_barray)
    +-	((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE,
    +-	 (JDIMENSION) jround_up((long) compptr->width_in_blocks,
    +-				(long) compptr->h_samp_factor),
    +-	 (JDIMENSION) jround_up((long) compptr->height_in_blocks,
    +-				(long) compptr->v_samp_factor),
    +-	 (JDIMENSION) compptr->v_samp_factor);
    +-    }
    ++    if (info->trim)
    ++      trim_bottom_edge(info, srcinfo->image_height);
    ++    /* Need workspace arrays having same dimensions as source image. */
    ++    need_workspace = TRUE;
    +     break;
    +   case JXFORM_TRANSPOSE:
    ++    /* transpose does NOT have to trim anything */
    ++    /* Need workspace arrays having transposed dimensions. */
    ++    need_workspace = TRUE;
    ++    transpose_it = TRUE;
    ++    break;
    +   case JXFORM_TRANSVERSE:
    ++    if (info->trim) {
    ++      trim_right_edge(info, srcinfo->image_height);
    ++      trim_bottom_edge(info, srcinfo->image_width);
    ++    }
    ++    /* Need workspace arrays having transposed dimensions. */
    ++    need_workspace = TRUE;
    ++    transpose_it = TRUE;
    ++    break;
    +   case JXFORM_ROT_90:
    ++    if (info->trim)
    ++      trim_right_edge(info, srcinfo->image_height);
    ++    /* Need workspace arrays having transposed dimensions. */
    ++    need_workspace = TRUE;
    ++    transpose_it = TRUE;
    ++    break;
    ++  case JXFORM_ROT_180:
    ++    if (info->trim) {
    ++      trim_right_edge(info, srcinfo->image_width);
    ++      trim_bottom_edge(info, srcinfo->image_height);
    ++    }
    ++    /* Need workspace arrays having same dimensions as source image. */
    ++    need_workspace = TRUE;
    ++    break;
    +   case JXFORM_ROT_270:
    +-    /* Need workspace arrays having transposed dimensions.
    +-     * Note that we allocate arrays padded out to the next iMCU boundary,
    +-     * so that transform routines need not worry about missing edge blocks.
    +-     */
    ++    if (info->trim)
    ++      trim_bottom_edge(info, srcinfo->image_width);
    ++    /* Need workspace arrays having transposed dimensions. */
    ++    need_workspace = TRUE;
    ++    transpose_it = TRUE;
    ++    break;
    ++  }
    ++
    ++  /* Allocate workspace if needed.
    ++   * Note that we allocate arrays padded out to the next iMCU boundary,
    ++   * so that transform routines need not worry about missing edge blocks.
    ++   */
    ++  if (need_workspace) {
    +     coef_arrays = (jvirt_barray_ptr *)
    +       (*srcinfo->mem->alloc_small) ((j_common_ptr) srcinfo, JPOOL_IMAGE,
    +-	SIZEOF(jvirt_barray_ptr) * info->num_components);
    ++		SIZEOF(jvirt_barray_ptr) * info->num_components);
    ++    width_in_iMCUs = (JDIMENSION)
    ++      jdiv_round_up((long) info->output_width,
    ++		    (long) (info->max_h_samp_factor * DCTSIZE));
    ++    height_in_iMCUs = (JDIMENSION)
    ++      jdiv_round_up((long) info->output_height,
    ++		    (long) (info->max_v_samp_factor * DCTSIZE));
    +     for (ci = 0; ci < info->num_components; ci++) {
    +       compptr = srcinfo->comp_info + ci;
    ++      if (info->num_components == 1) {
    ++	/* we're going to force samp factors to 1x1 in this case */
    ++	h_samp_factor = v_samp_factor = 1;
    ++      } else if (transpose_it) {
    ++	h_samp_factor = compptr->v_samp_factor;
    ++	v_samp_factor = compptr->h_samp_factor;
    ++      } else {
    ++	h_samp_factor = compptr->h_samp_factor;
    ++	v_samp_factor = compptr->v_samp_factor;
    ++      }
    ++      width_in_blocks = width_in_iMCUs * h_samp_factor;
    ++      height_in_blocks = height_in_iMCUs * v_samp_factor;
    +       coef_arrays[ci] = (*srcinfo->mem->request_virt_barray)
    + 	((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE,
    +-	 (JDIMENSION) jround_up((long) compptr->height_in_blocks,
    +-				(long) compptr->v_samp_factor),
    +-	 (JDIMENSION) jround_up((long) compptr->width_in_blocks,
    +-				(long) compptr->h_samp_factor),
    +-	 (JDIMENSION) compptr->h_samp_factor);
    ++	 width_in_blocks, height_in_blocks, (JDIMENSION) v_samp_factor);
    +     }
    +-    break;
    +   }
    ++
    +   info->workspace_coef_arrays = coef_arrays;
    + }
    + 
    +@@ -642,14 +1062,8 @@
    +   int tblno, i, j, ci, itemp;
    +   jpeg_component_info *compptr;
    +   JQUANT_TBL *qtblptr;
    +-  JDIMENSION dtemp;
    +   UINT16 qtemp;
    + 
    +-  /* Transpose basic image dimensions */
    +-  dtemp = dstinfo->image_width;
    +-  dstinfo->image_width = dstinfo->image_height;
    +-  dstinfo->image_height = dtemp;
    +-
    +   /* Transpose sampling factors */
    +   for (ci = 0; ci < dstinfo->num_components; ci++) {
    +     compptr = dstinfo->comp_info + ci;
    +@@ -674,46 +1088,159 @@
    + }
    + 
    + 
    +-/* Trim off any partial iMCUs on the indicated destination edge */
    ++/* Adjust Exif image parameters.
    ++ *
    ++ * We try to adjust the Tags ExifImageWidth and ExifImageHeight if possible.
    ++ */
    + 
    + LOCAL(void)
    +-trim_right_edge (j_compress_ptr dstinfo)
    ++adjust_exif_parameters (JOCTET FAR * data, unsigned int length,
    ++			JDIMENSION new_width, JDIMENSION new_height)
    + {
    +-  int ci, max_h_samp_factor;
    +-  JDIMENSION MCU_cols;
    ++  boolean is_motorola; /* Flag for byte order */
    ++  unsigned int number_of_tags, tagnum;
    ++  unsigned int firstoffset, offset;
    ++  JDIMENSION new_value;
    + 
    +-  /* We have to compute max_h_samp_factor ourselves,
    +-   * because it hasn't been set yet in the destination
    +-   * (and we don't want to use the source's value).
    +-   */
    +-  max_h_samp_factor = 1;
    +-  for (ci = 0; ci < dstinfo->num_components; ci++) {
    +-    int h_samp_factor = dstinfo->comp_info[ci].h_samp_factor;
    +-    max_h_samp_factor = MAX(max_h_samp_factor, h_samp_factor);
    ++  if (length < 12) return; /* Length of an IFD entry */
    ++
    ++  /* Discover byte order */
    ++  if (GETJOCTET(data[0]) == 0x49 && GETJOCTET(data[1]) == 0x49)
    ++    is_motorola = FALSE;
    ++  else if (GETJOCTET(data[0]) == 0x4D && GETJOCTET(data[1]) == 0x4D)
    ++    is_motorola = TRUE;
    ++  else
    ++    return;
    ++
    ++  /* Check Tag Mark */
    ++  if (is_motorola) {
    ++    if (GETJOCTET(data[2]) != 0) return;
    ++    if (GETJOCTET(data[3]) != 0x2A) return;
    ++  } else {
    ++    if (GETJOCTET(data[3]) != 0) return;
    ++    if (GETJOCTET(data[2]) != 0x2A) return;
    +   }
    +-  MCU_cols = dstinfo->image_width / (max_h_samp_factor * DCTSIZE);
    +-  if (MCU_cols > 0)		/* can't trim to 0 pixels */
    +-    dstinfo->image_width = MCU_cols * (max_h_samp_factor * DCTSIZE);
    +-}
    + 
    +-LOCAL(void)
    +-trim_bottom_edge (j_compress_ptr dstinfo)
    +-{
    +-  int ci, max_v_samp_factor;
    +-  JDIMENSION MCU_rows;
    ++  /* Get first IFD offset (offset to IFD0) */
    ++  if (is_motorola) {
    ++    if (GETJOCTET(data[4]) != 0) return;
    ++    if (GETJOCTET(data[5]) != 0) return;
    ++    firstoffset = GETJOCTET(data[6]);
    ++    firstoffset <<= 8;
    ++    firstoffset += GETJOCTET(data[7]);
    ++  } else {
    ++    if (GETJOCTET(data[7]) != 0) return;
    ++    if (GETJOCTET(data[6]) != 0) return;
    ++    firstoffset = GETJOCTET(data[5]);
    ++    firstoffset <<= 8;
    ++    firstoffset += GETJOCTET(data[4]);
    ++  }
    ++  if (firstoffset > length - 2) return; /* check end of data segment */
    + 
    +-  /* We have to compute max_v_samp_factor ourselves,
    +-   * because it hasn't been set yet in the destination
    +-   * (and we don't want to use the source's value).
    +-   */
    +-  max_v_samp_factor = 1;
    +-  for (ci = 0; ci < dstinfo->num_components; ci++) {
    +-    int v_samp_factor = dstinfo->comp_info[ci].v_samp_factor;
    +-    max_v_samp_factor = MAX(max_v_samp_factor, v_samp_factor);
    ++  /* Get the number of directory entries contained in this IFD */
    ++  if (is_motorola) {
    ++    number_of_tags = GETJOCTET(data[firstoffset]);
    ++    number_of_tags <<= 8;
    ++    number_of_tags += GETJOCTET(data[firstoffset+1]);
    ++  } else {
    ++    number_of_tags = GETJOCTET(data[firstoffset+1]);
    ++    number_of_tags <<= 8;
    ++    number_of_tags += GETJOCTET(data[firstoffset]);
    +   }
    +-  MCU_rows = dstinfo->image_height / (max_v_samp_factor * DCTSIZE);
    +-  if (MCU_rows > 0)		/* can't trim to 0 pixels */
    +-    dstinfo->image_height = MCU_rows * (max_v_samp_factor * DCTSIZE);
    ++  if (number_of_tags == 0) return;
    ++  firstoffset += 2;
    ++
    ++  /* Search for ExifSubIFD offset Tag in IFD0 */
    ++  for (;;) {
    ++    if (firstoffset > length - 12) return; /* check end of data segment */
    ++    /* Get Tag number */
    ++    if (is_motorola) {
    ++      tagnum = GETJOCTET(data[firstoffset]);
    ++      tagnum <<= 8;
    ++      tagnum += GETJOCTET(data[firstoffset+1]);
    ++    } else {
    ++      tagnum = GETJOCTET(data[firstoffset+1]);
    ++      tagnum <<= 8;
    ++      tagnum += GETJOCTET(data[firstoffset]);
    ++    }
    ++    if (tagnum == 0x8769) break; /* found ExifSubIFD offset Tag */
    ++    if (--number_of_tags == 0) return;
    ++    firstoffset += 12;
    ++  }
    ++
    ++  /* Get the ExifSubIFD offset */
    ++  if (is_motorola) {
    ++    if (GETJOCTET(data[firstoffset+8]) != 0) return;
    ++    if (GETJOCTET(data[firstoffset+9]) != 0) return;
    ++    offset = GETJOCTET(data[firstoffset+10]);
    ++    offset <<= 8;
    ++    offset += GETJOCTET(data[firstoffset+11]);
    ++  } else {
    ++    if (GETJOCTET(data[firstoffset+11]) != 0) return;
    ++    if (GETJOCTET(data[firstoffset+10]) != 0) return;
    ++    offset = GETJOCTET(data[firstoffset+9]);
    ++    offset <<= 8;
    ++    offset += GETJOCTET(data[firstoffset+8]);
    ++  }
    ++  if (offset > length - 2) return; /* check end of data segment */
    ++
    ++  /* Get the number of directory entries contained in this SubIFD */
    ++  if (is_motorola) {
    ++    number_of_tags = GETJOCTET(data[offset]);
    ++    number_of_tags <<= 8;
    ++    number_of_tags += GETJOCTET(data[offset+1]);
    ++  } else {
    ++    number_of_tags = GETJOCTET(data[offset+1]);
    ++    number_of_tags <<= 8;
    ++    number_of_tags += GETJOCTET(data[offset]);
    ++  }
    ++  if (number_of_tags < 2) return;
    ++  offset += 2;
    ++
    ++  /* Search for ExifImageWidth and ExifImageHeight Tags in this SubIFD */
    ++  do {
    ++    if (offset > length - 12) return; /* check end of data segment */
    ++    /* Get Tag number */
    ++    if (is_motorola) {
    ++      tagnum = GETJOCTET(data[offset]);
    ++      tagnum <<= 8;
    ++      tagnum += GETJOCTET(data[offset+1]);
    ++    } else {
    ++      tagnum = GETJOCTET(data[offset+1]);
    ++      tagnum <<= 8;
    ++      tagnum += GETJOCTET(data[offset]);
    ++    }
    ++    if (tagnum == 0xA002 || tagnum == 0xA003) {
    ++      if (tagnum == 0xA002)
    ++	new_value = new_width; /* ExifImageWidth Tag */
    ++      else
    ++	new_value = new_height; /* ExifImageHeight Tag */
    ++      if (is_motorola) {
    ++	data[offset+2] = 0; /* Format = unsigned long (4 octets) */
    ++	data[offset+3] = 4;
    ++	data[offset+4] = 0; /* Number Of Components = 1 */
    ++	data[offset+5] = 0;
    ++	data[offset+6] = 0;
    ++	data[offset+7] = 1;
    ++	data[offset+8] = 0;
    ++	data[offset+9] = 0;
    ++	data[offset+10] = (JOCTET)((new_value >> 8) & 0xFF);
    ++	data[offset+11] = (JOCTET)(new_value & 0xFF);
    ++      } else {
    ++	data[offset+2] = 4; /* Format = unsigned long (4 octets) */
    ++	data[offset+3] = 0;
    ++	data[offset+4] = 1; /* Number Of Components = 1 */
    ++	data[offset+5] = 0;
    ++	data[offset+6] = 0;
    ++	data[offset+7] = 0;
    ++	data[offset+8] = (JOCTET)(new_value & 0xFF);
    ++	data[offset+9] = (JOCTET)((new_value >> 8) & 0xFF);
    ++	data[offset+10] = 0;
    ++	data[offset+11] = 0;
    ++      }
    ++    }
    ++    offset += 12;
    ++  } while (--number_of_tags);
    + }
    + 
    + 
    +@@ -736,18 +1263,22 @@
    + {
    +   /* If force-to-grayscale is requested, adjust destination parameters */
    +   if (info->force_grayscale) {
    +-    /* We use jpeg_set_colorspace to make sure subsidiary settings get fixed
    +-     * properly.  Among other things, the target h_samp_factor & v_samp_factor
    +-     * will get set to 1, which typically won't match the source.
    +-     * In fact we do this even if the source is already grayscale; that
    +-     * provides an easy way of coercing a grayscale JPEG with funny sampling
    +-     * factors to the customary 1,1.  (Some decoders fail on other factors.)
    ++    /* First, ensure we have YCbCr or grayscale data, and that the source's
    ++     * Y channel is full resolution.  (No reasonable person would make Y
    ++     * be less than full resolution, so actually coping with that case
    ++     * isn't worth extra code space.  But we check it to avoid crashing.)
    +      */
    +-    if ((dstinfo->jpeg_color_space == JCS_YCbCr &&
    +-	 dstinfo->num_components == 3) ||
    +-	(dstinfo->jpeg_color_space == JCS_GRAYSCALE &&
    +-	 dstinfo->num_components == 1)) {
    +-      /* We have to preserve the source's quantization table number. */
    ++    if (((dstinfo->jpeg_color_space == JCS_YCbCr &&
    ++	  dstinfo->num_components == 3) ||
    ++	 (dstinfo->jpeg_color_space == JCS_GRAYSCALE &&
    ++	  dstinfo->num_components == 1)) &&
    ++	srcinfo->comp_info[0].h_samp_factor == srcinfo->max_h_samp_factor &&
    ++	srcinfo->comp_info[0].v_samp_factor == srcinfo->max_v_samp_factor) {
    ++      /* We use jpeg_set_colorspace to make sure subsidiary settings get fixed
    ++       * properly.  Among other things, it sets the target h_samp_factor &
    ++       * v_samp_factor to 1, which typically won't match the source.
    ++       * We have to preserve the source's quantization table number, however.
    ++       */
    +       int sv_quant_tbl_no = dstinfo->comp_info[0].quant_tbl_no;
    +       jpeg_set_colorspace(dstinfo, JCS_GRAYSCALE);
    +       dstinfo->comp_info[0].quant_tbl_no = sv_quant_tbl_no;
    +@@ -755,50 +1286,52 @@
    +       /* Sorry, can't do it */
    +       ERREXIT(dstinfo, JERR_CONVERSION_NOTIMPL);
    +     }
    ++  } else if (info->num_components == 1) {
    ++    /* For a single-component source, we force the destination sampling factors
    ++     * to 1x1, with or without force_grayscale.  This is useful because some
    ++     * decoders choke on grayscale images with other sampling factors.
    ++     */
    ++    dstinfo->comp_info[0].h_samp_factor = 1;
    ++    dstinfo->comp_info[0].v_samp_factor = 1;
    +   }
    + 
    +-  /* Correct the destination's image dimensions etc if necessary */
    ++  /* Correct the destination's image dimensions as necessary
    ++   * for crop and rotate/flip operations.
    ++   */
    ++  dstinfo->image_width = info->output_width;
    ++  dstinfo->image_height = info->output_height;
    ++
    ++  /* Transpose destination image parameters */
    +   switch (info->transform) {
    +-  case JXFORM_NONE:
    +-    /* Nothing to do */
    +-    break;
    +-  case JXFORM_FLIP_H:
    +-    if (info->trim)
    +-      trim_right_edge(dstinfo);
    +-    break;
    +-  case JXFORM_FLIP_V:
    +-    if (info->trim)
    +-      trim_bottom_edge(dstinfo);
    +-    break;
    +   case JXFORM_TRANSPOSE:
    +-    transpose_critical_parameters(dstinfo);
    +-    /* transpose does NOT have to trim anything */
    +-    break;
    +   case JXFORM_TRANSVERSE:
    +-    transpose_critical_parameters(dstinfo);
    +-    if (info->trim) {
    +-      trim_right_edge(dstinfo);
    +-      trim_bottom_edge(dstinfo);
    +-    }
    +-    break;
    +   case JXFORM_ROT_90:
    +-    transpose_critical_parameters(dstinfo);
    +-    if (info->trim)
    +-      trim_right_edge(dstinfo);
    +-    break;
    +-  case JXFORM_ROT_180:
    +-    if (info->trim) {
    +-      trim_right_edge(dstinfo);
    +-      trim_bottom_edge(dstinfo);
    +-    }
    +-    break;
    +   case JXFORM_ROT_270:
    +     transpose_critical_parameters(dstinfo);
    +-    if (info->trim)
    +-      trim_bottom_edge(dstinfo);
    +     break;
    +   }
    + 
    ++  /* Adjust Exif properties */
    ++  if (srcinfo->marker_list != NULL &&
    ++      srcinfo->marker_list->marker == JPEG_APP0+1 &&
    ++      srcinfo->marker_list->data_length >= 6 &&
    ++      GETJOCTET(srcinfo->marker_list->data[0]) == 0x45 &&
    ++      GETJOCTET(srcinfo->marker_list->data[1]) == 0x78 &&
    ++      GETJOCTET(srcinfo->marker_list->data[2]) == 0x69 &&
    ++      GETJOCTET(srcinfo->marker_list->data[3]) == 0x66 &&
    ++      GETJOCTET(srcinfo->marker_list->data[4]) == 0 &&
    ++      GETJOCTET(srcinfo->marker_list->data[5]) == 0) {
    ++    /* Suppress output of JFIF marker */
    ++    dstinfo->write_JFIF_header = FALSE;
    ++    /* Adjust Exif image parameters */
    ++    if (dstinfo->image_width != srcinfo->image_width ||
    ++	dstinfo->image_height != srcinfo->image_height)
    ++      /* Align data segment to start of TIFF structure for parsing */
    ++      adjust_exif_parameters(srcinfo->marker_list->data + 6,
    ++	srcinfo->marker_list->data_length - 6,
    ++	dstinfo->image_width, dstinfo->image_height);
    ++  }
    ++
    +   /* Return the appropriate output data set */
    +   if (info->workspace_coef_arrays != NULL)
    +     return info->workspace_coef_arrays;
    +@@ -816,38 +1349,106 @@
    +  */
    + 
    + GLOBAL(void)
    +-jtransform_execute_transformation (j_decompress_ptr srcinfo,
    +-				   j_compress_ptr dstinfo,
    +-				   jvirt_barray_ptr *src_coef_arrays,
    +-				   jpeg_transform_info *info)
    ++jtransform_execute_transform (j_decompress_ptr srcinfo,
    ++			      j_compress_ptr dstinfo,
    ++			      jvirt_barray_ptr *src_coef_arrays,
    ++			      jpeg_transform_info *info)
    + {
    +   jvirt_barray_ptr *dst_coef_arrays = info->workspace_coef_arrays;
    + 
    ++  /* Note: conditions tested here should match those in switch statement
    ++   * in jtransform_request_workspace()
    ++   */
    +   switch (info->transform) {
    +   case JXFORM_NONE:
    ++    if (info->x_crop_offset != 0 || info->y_crop_offset != 0)
    ++      do_crop(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset,
    ++	      src_coef_arrays, dst_coef_arrays);
    +     break;
    +   case JXFORM_FLIP_H:
    +-    do_flip_h(srcinfo, dstinfo, src_coef_arrays);
    ++    if (info->y_crop_offset != 0)
    ++      do_flip_h(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset,
    ++		src_coef_arrays, dst_coef_arrays);
    ++    else
    ++      do_flip_h_no_crop(srcinfo, dstinfo, info->x_crop_offset,
    ++			src_coef_arrays);
    +     break;
    +   case JXFORM_FLIP_V:
    +-    do_flip_v(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
    ++    do_flip_v(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset,
    ++	      src_coef_arrays, dst_coef_arrays);
    +     break;
    +   case JXFORM_TRANSPOSE:
    +-    do_transpose(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
    ++    do_transpose(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset,
    ++		 src_coef_arrays, dst_coef_arrays);
    +     break;
    +   case JXFORM_TRANSVERSE:
    +-    do_transverse(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
    ++    do_transverse(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset,
    ++		  src_coef_arrays, dst_coef_arrays);
    +     break;
    +   case JXFORM_ROT_90:
    +-    do_rot_90(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
    ++    do_rot_90(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset,
    ++	      src_coef_arrays, dst_coef_arrays);
    +     break;
    +   case JXFORM_ROT_180:
    +-    do_rot_180(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
    ++    do_rot_180(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset,
    ++	       src_coef_arrays, dst_coef_arrays);
    +     break;
    +   case JXFORM_ROT_270:
    +-    do_rot_270(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
    ++    do_rot_270(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset,
    ++	       src_coef_arrays, dst_coef_arrays);
    ++    break;
    ++  }
    ++}
    ++
    ++/* jtransform_perfect_transform
    ++ *
    ++ * Determine whether lossless transformation is perfectly
    ++ * possible for a specified image and transformation.
    ++ *
    ++ * Inputs:
    ++ *   image_width, image_height: source image dimensions.
    ++ *   MCU_width, MCU_height: pixel dimensions of MCU.
    ++ *   transform: transformation identifier.
    ++ * Parameter sources from initialized jpeg_struct
    ++ * (after reading source header):
    ++ *   image_width = cinfo.image_width
    ++ *   image_height = cinfo.image_height
    ++ *   MCU_width = cinfo.max_h_samp_factor * DCTSIZE
    ++ *   MCU_height = cinfo.max_v_samp_factor * DCTSIZE
    ++ * Result:
    ++ *   TRUE = perfect transformation possible
    ++ *   FALSE = perfect transformation not possible
    ++ *           (may use custom action then)
    ++ */
    ++
    ++GLOBAL(boolean)
    ++jtransform_perfect_transform(JDIMENSION image_width, JDIMENSION image_height,
    ++			     int MCU_width, int MCU_height,
    ++			     JXFORM_CODE transform)
    ++{
    ++  boolean result = TRUE; /* initialize TRUE */
    ++
    ++  switch (transform) {
    ++  case JXFORM_FLIP_H:
    ++  case JXFORM_ROT_270:
    ++    if (image_width % (JDIMENSION) MCU_width)
    ++      result = FALSE;
    ++    break;
    ++  case JXFORM_FLIP_V:
    ++  case JXFORM_ROT_90:
    ++    if (image_height % (JDIMENSION) MCU_height)
    ++      result = FALSE;
    ++    break;
    ++  case JXFORM_TRANSVERSE:
    ++  case JXFORM_ROT_180:
    ++    if (image_width % (JDIMENSION) MCU_width)
    ++      result = FALSE;
    ++    if (image_height % (JDIMENSION) MCU_height)
    ++      result = FALSE;
    +     break;
    +   }
    ++
    ++  return result;
    + }
    + 
    + #endif /* TRANSFORMS_SUPPORTED */
    +diff -urNad /home/bill/debian/libjpeg/libjpeg6b-6b/transupp.h libjpeg6b-6b/transupp.h
    +--- /home/bill/debian/libjpeg/libjpeg6b-6b/transupp.h	2003-09-22 18:15:49.000000000 +0200
    ++++ libjpeg6b-6b/transupp.h	2003-09-22 18:16:16.000000000 +0200
    +@@ -1,7 +1,7 @@
    + /*
    +  * transupp.h
    +  *
    +- * Copyright (C) 1997, Thomas G. Lane.
    ++ * Copyright (C) 1997-2001, Thomas G. Lane.
    +  * This file is part of the Independent JPEG Group's software.
    +  * For conditions of distribution and use, see the accompanying README file.
    +  *
    +@@ -22,32 +22,6 @@
    + #define TRANSFORMS_SUPPORTED 1		/* 0 disables transform code */
    + #endif
    + 
    +-/* Short forms of external names for systems with brain-damaged linkers. */
    +-
    +-#ifdef NEED_SHORT_EXTERNAL_NAMES
    +-#define jtransform_request_workspace		jTrRequest
    +-#define jtransform_adjust_parameters		jTrAdjust
    +-#define jtransform_execute_transformation	jTrExec
    +-#define jcopy_markers_setup			jCMrkSetup
    +-#define jcopy_markers_execute			jCMrkExec
    +-#endif /* NEED_SHORT_EXTERNAL_NAMES */
    +-
    +-
    +-/*
    +- * Codes for supported types of image transformations.
    +- */
    +-
    +-typedef enum {
    +-	JXFORM_NONE,		/* no transformation */
    +-	JXFORM_FLIP_H,		/* horizontal flip */
    +-	JXFORM_FLIP_V,		/* vertical flip */
    +-	JXFORM_TRANSPOSE,	/* transpose across UL-to-LR axis */
    +-	JXFORM_TRANSVERSE,	/* transpose across UR-to-LL axis */
    +-	JXFORM_ROT_90,		/* 90-degree clockwise rotation */
    +-	JXFORM_ROT_180,		/* 180-degree rotation */
    +-	JXFORM_ROT_270		/* 270-degree clockwise (or 90 ccw) */
    +-} JXFORM_CODE;
    +-
    + /*
    +  * Although rotating and flipping data expressed as DCT coefficients is not
    +  * hard, there is an asymmetry in the JPEG format specification for images
    +@@ -75,6 +49,19 @@
    +  * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim
    +  * followed by -rot 180 -trim trims both edges.)
    +  *
    ++ * We also offer a lossless-crop option, which discards data outside a given
    ++ * image region but losslessly preserves what is inside.  Like the rotate and
    ++ * flip transforms, lossless crop is restricted by the JPEG format: the upper
    ++ * left corner of the selected region must fall on an iMCU boundary.  If this
    ++ * does not hold for the given crop parameters, we silently move the upper left
    ++ * corner up and/or left to make it so, simultaneously increasing the region
    ++ * dimensions to keep the lower right crop corner unchanged.  (Thus, the
    ++ * output image covers at least the requested region, but may cover more.)
    ++ *
    ++ * If both crop and a rotate/flip transform are requested, the crop is applied
    ++ * last --- that is, the crop region is specified in terms of the destination
    ++ * image.
    ++ *
    +  * We also offer a "force to grayscale" option, which simply discards the
    +  * chrominance channels of a YCbCr image.  This is lossless in the sense that
    +  * the luminance channel is preserved exactly.  It's not the same kind of
    +@@ -83,20 +70,89 @@
    +  * be aware of the option to know how many components to work on.
    +  */
    + 
    ++
    ++/* Short forms of external names for systems with brain-damaged linkers. */
    ++
    ++#ifdef NEED_SHORT_EXTERNAL_NAMES
    ++#define jtransform_parse_crop_spec	jTrParCrop
    ++#define jtransform_request_workspace	jTrRequest
    ++#define jtransform_adjust_parameters	jTrAdjust
    ++#define jtransform_execute_transform	jTrExec
    ++#define jtransform_perfect_transform	jTrPerfect
    ++#define jcopy_markers_setup		jCMrkSetup
    ++#define jcopy_markers_execute		jCMrkExec
    ++#endif /* NEED_SHORT_EXTERNAL_NAMES */
    ++
    ++
    ++/*
    ++ * Codes for supported types of image transformations.
    ++ */
    ++
    ++typedef enum {
    ++	JXFORM_NONE,		/* no transformation */
    ++	JXFORM_FLIP_H,		/* horizontal flip */
    ++	JXFORM_FLIP_V,		/* vertical flip */
    ++	JXFORM_TRANSPOSE,	/* transpose across UL-to-LR axis */
    ++	JXFORM_TRANSVERSE,	/* transpose across UR-to-LL axis */
    ++	JXFORM_ROT_90,		/* 90-degree clockwise rotation */
    ++	JXFORM_ROT_180,		/* 180-degree rotation */
    ++	JXFORM_ROT_270		/* 270-degree clockwise (or 90 ccw) */
    ++} JXFORM_CODE;
    ++
    ++/*
    ++ * Codes for crop parameters, which can individually be unspecified,
    ++ * positive, or negative.  (Negative width or height makes no sense, though.)
    ++ */
    ++
    ++typedef enum {
    ++	JCROP_UNSET,
    ++	JCROP_POS,
    ++	JCROP_NEG
    ++} JCROP_CODE;
    ++
    ++/*
    ++ * Transform parameters struct.
    ++ * NB: application must not change any elements of this struct after
    ++ * calling jtransform_request_workspace.
    ++ */
    ++
    + typedef struct {
    +   /* Options: set by caller */
    +   JXFORM_CODE transform;	/* image transform operator */
    ++  boolean perfect;		/* if TRUE, fail if partial MCUs are requested */
    +   boolean trim;			/* if TRUE, trim partial MCUs as needed */
    +   boolean force_grayscale;	/* if TRUE, convert color image to grayscale */
    ++  boolean crop;			/* if TRUE, crop source image */
    ++
    ++  /* Crop parameters: application need not set these unless crop is TRUE.
    ++   * These can be filled in by jtransform_parse_crop_spec().
    ++   */
    ++  JDIMENSION crop_width;	/* Width of selected region */
    ++  JCROP_CODE crop_width_set;
    ++  JDIMENSION crop_height;	/* Height of selected region */
    ++  JCROP_CODE crop_height_set;
    ++  JDIMENSION crop_xoffset;	/* X offset of selected region */
    ++  JCROP_CODE crop_xoffset_set;	/* (negative measures from right edge) */
    ++  JDIMENSION crop_yoffset;	/* Y offset of selected region */
    ++  JCROP_CODE crop_yoffset_set;	/* (negative measures from bottom edge) */
    + 
    +   /* Internal workspace: caller should not touch these */
    +   int num_components;		/* # of components in workspace */
    +   jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */
    ++  JDIMENSION output_width;	/* cropped destination dimensions */
    ++  JDIMENSION output_height;
    ++  JDIMENSION x_crop_offset;	/* destination crop offsets measured in iMCUs */
    ++  JDIMENSION y_crop_offset;
    ++  int max_h_samp_factor;	/* destination iMCU size */
    ++  int max_v_samp_factor;
    + } jpeg_transform_info;
    + 
    + 
    + #if TRANSFORMS_SUPPORTED
    + 
    ++/* Parse a crop specification (written in X11 geometry style) */
    ++EXTERN(boolean) jtransform_parse_crop_spec
    ++	JPP((jpeg_transform_info *info, const char *spec));
    + /* Request any required workspace */
    + EXTERN(void) jtransform_request_workspace
    + 	JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info));
    +@@ -106,10 +162,24 @@
    + 	     jvirt_barray_ptr *src_coef_arrays,
    + 	     jpeg_transform_info *info));
    + /* Execute the actual transformation, if any */
    +-EXTERN(void) jtransform_execute_transformation
    ++EXTERN(void) jtransform_execute_transform
    + 	JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
    + 	     jvirt_barray_ptr *src_coef_arrays,
    + 	     jpeg_transform_info *info));
    ++/* Determine whether lossless transformation is perfectly
    ++ * possible for a specified image and transformation.
    ++ */
    ++EXTERN(boolean) jtransform_perfect_transform
    ++	JPP((JDIMENSION image_width, JDIMENSION image_height,
    ++	     int MCU_width, int MCU_height,
    ++	     JXFORM_CODE transform));
    ++
    ++/* jtransform_execute_transform used to be called
    ++ * jtransform_execute_transformation, but some compilers complain about
    ++ * routine names that long.  This macro is here to avoid breaking any
    ++ * old source code that uses the original name...
    ++ */
    ++#define jtransform_execute_transformation	jtransform_execute_transform
    + 
    + #endif /* TRANSFORMS_SUPPORTED */
    + 
    diff --git a/libs/keynote/Makefile b/libs/keynote/Makefile
    new file mode 100644
    index 0000000..e25f002
    --- /dev/null
    +++ b/libs/keynote/Makefile
    @@ -0,0 +1,56 @@
    +# 
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=keynote
    +PKG_VERSION:=2.3
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
    +PKG_MD5SUM:=b569066ac2ba1356c2112b118a7d74d0
    +
    +PKG_BUILD_PARALLEL:=0
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/keynote
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=@!LINUX_2_4 +libopenssl
    +  TITLE:=Simple and flexible trust-management system
    +  URL:=http://www1.cs.columbia.edu/~angelos/keynote.html
    +endef
    +
    +define Package/keynote/description
    + KeyNote is a simple and flexible trust-management system designed to work 
    + well for a variety of large- and small- scale Internet-based applications.
    + It provides a single, unified language for both local policies and 
    + credentials.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--enable-static \
    +	--enable-shared
    +
    +MAKE_FLAGS += \
    +	CFLAGS="$(TARGET_CFLAGS)"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/keynote
    +	$(CP) $(PKG_BUILD_DIR)/{assertion,header,keynote,signature}.h $(1)/usr/include/keynote/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libkeynote.a $(1)/usr/lib/
    +endef
    +
    +define Package/keynote/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/keynote $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,keynote))
    diff --git a/libs/keynote/patches/001-build.patch b/libs/keynote/patches/001-build.patch
    new file mode 100644
    index 0000000..88db372
    --- /dev/null
    +++ b/libs/keynote/patches/001-build.patch
    @@ -0,0 +1,345 @@
    +Index: keynote-2.3/configure.in
    +===================================================================
    +--- keynote-2.3.orig/configure.in	2007-06-04 13:22:41.284579072 +0200
    ++++ keynote-2.3/configure.in	2007-06-04 13:22:41.389563112 +0200
    +@@ -21,19 +21,13 @@
    + AC_PATH_PROG(ECHO, echo, /bin/echo)
    + AC_PATH_PROG(SED, sed, /usr/bin/sed)
    + 
    +-dnl Checks for libraries.
    +-LIBS="-L/usr/lib -L/usr/local/lib -L/usr/ssl/lib -L/usr/openssl/lib\
    +- -L/usr/local/ssl/lib -L/usr/local/openssl/lib -L/usr/pkg/lib -L/pkg/lib"
    +-
    + AC_CHECK_LIB(m, floor, LIBS="$LIBS -lm")
    + AC_CHECK_LIB(rsaref, RSAPrivateDecrypt, LIBS="$LIBS -lrsaref")
    + AC_CHECK_LIB(crypto, i2a_ASN1_STRING, LIBS="$LIBS -lcrypto")
    + AC_CHECK_LIB(RSAglue, RSA_ref_private_encrypt, LIBS="$LIBS -lRSAglue")
    + 
    + dnl Checks for header files.
    +-CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/ssl/include\
    +- -I/usr/local/ssl/include -I/usr/openssl/include -I/usr/pkg/include\
    +- -I/usr/local/openssl/include -I/pkg/include"
    ++CPPFLAGS="-I/usr/include/openssl"
    + 
    + AC_HEADER_STDC
    + AC_HEADER_TIME
    +Index: keynote-2.3/keynote-keygen.c
    +===================================================================
    +--- keynote-2.3.orig/keynote-keygen.c	2007-06-04 13:22:41.290578160 +0200
    ++++ keynote-2.3/keynote-keygen.c	2007-06-04 13:22:41.389563112 +0200
    +@@ -161,7 +161,7 @@
    +     if (strlen(algname) + 2 > prlen)
    +     {
    + 	fprintf(stderr, "Parameter ``print-length'' should be larger "
    +-		"than the length of AlgorithmName (%d)\n", strlen(algname));
    ++		"than the length of AlgorithmName (%lu)\n", strlen(algname));
    + 	exit(-1);
    +     }
    + 
    +Index: keynote-2.3/keynote.l
    +===================================================================
    +--- keynote-2.3.orig/keynote.l	2007-06-04 13:22:41.295577400 +0200
    ++++ keynote-2.3/keynote.l	2007-06-04 13:22:41.390562960 +0200
    +@@ -61,7 +61,8 @@
    + static struct lex_list *keynote_lex_list = (struct lex_list *) NULL;
    + static int    keynote_max_lex_list = 32;
    + static int    keynote_lex_counter = 0;
    +-static int    first_tok = 0;
    ++extern int    first_tok;
    ++int    first_tok = 0;
    + %}
    + digit		[0-9]
    + specnumber      [1-9][0-9]*
    +@@ -766,7 +767,7 @@
    +     if (0)
    +     {
    + 	yyunput(0, NULL);
    +-	yy_flex_realloc(0, NULL);
    ++	yy_flex_realloc(NULL, 0);
    +     }
    + 
    +     return en;
    +Index: keynote-2.3/keynote-ver.l
    +===================================================================
    +--- keynote-2.3.orig/keynote-ver.l	2007-06-04 13:22:41.301576488 +0200
    ++++ keynote-2.3/keynote-ver.l	2007-06-04 13:22:41.390562960 +0200
    +@@ -267,7 +267,7 @@
    +     if (0)
    +     {
    + 	yyunput(0, NULL);
    +-	yy_flex_realloc(0, NULL);
    ++	yy_flex_realloc(NULL, 0);
    +     }
    + }
    + 
    +Index: keynote-2.3/keynote-ver.y
    +===================================================================
    +--- keynote-2.3.orig/keynote-ver.y	2007-06-04 13:22:41.306575728 +0200
    ++++ keynote-2.3/keynote-ver.y	2007-06-04 13:22:41.390562960 +0200
    +@@ -49,7 +49,7 @@
    + 				 return keynote_errno;
    +                                free($1);
    +                              }
    +-
    ++		;
    + expr: VSTRING EQ STRING      { int i = kn_add_action(sessid, $1, $3, 0);
    + 
    +                                if (i != 0)
    +@@ -64,6 +64,7 @@
    + 			       free($1);
    + 			       free($3);
    +                              } expr 
    ++		;
    + %%
    + void
    + kverror(char *s)
    +Index: keynote-2.3/keynote.y
    +===================================================================
    +--- keynote-2.3.orig/keynote.y	2007-06-04 13:22:41.311574968 +0200
    ++++ keynote-2.3/keynote.y	2007-06-04 13:22:41.391562808 +0200
    +@@ -73,8 +73,7 @@
    + %}
    + %%
    + 
    +-grammarswitch: LOCINI { keynote_exceptionflag = keynote_donteval = 0; }
    +-                localinit
    ++grammarswitch: LOCINI { keynote_exceptionflag = keynote_donteval = 0; } localinit
    +              | ACTSTR { keynote_exceptionflag = keynote_donteval = 0; } program
    +    	     | KEYPRE { keynote_exceptionflag = keynote_donteval = 0; }
    +                 keypredicate
    +@@ -91,17 +90,17 @@
    +                         STRING { keynote_lex_remove($3);
    + 			         keynote_privkey = $3;
    + 			       }
    +-    
    ++    		;
    + keypredicate: /* Nothing */   { keynote_returnvalue = 0;
    +                                 return 0; 
    +                               }
    +        | notemptykeypredicate { keynote_returnvalue = $1;
    + 				return 0;
    +                               }
    +-
    ++		;
    + notemptykeypredicate:  key     { $$ = $1; }
    +        		     | keyexp  { $$ = $1; }
    +-
    ++		;
    + keyexp: notemptykeypredicate AND { if (($1 == 0) && !keynote_justrecord)
    +                                      keynote_donteval = 1;
    +                                  } notemptykeypredicate 
    +@@ -138,7 +137,7 @@
    + 			    else
    + 			      $$ = 0;
    + 			  }  /* K-th */
    +-
    ++			;
    + keylist: key
    + 	    { /* Don't do anything if we're just recording */ 
    +               if (!keynote_justrecord && !keynote_donteval)
    +@@ -155,7 +154,7 @@
    + 
    + 	      keylistcount++;
    +             }
    +-
    ++		;
    + key: str        {
    + 		   if (keynote_donteval)
    + 		     $$ = 0;
    +@@ -193,10 +192,10 @@
    + 			 }
    + 		   }
    +                  }
    +-
    ++		;
    + localinit: /* Nothing */
    +          | localconstants
    +-
    ++		;
    + localconstants: VARIABLE EQQ STRING 
    + 	  {
    +             int i;
    +@@ -265,12 +264,12 @@
    + 	    if (i != RESULT_TRUE)
    + 	      return -1;
    + 	  } localconstants
    +-
    ++		;
    + program: prog { 
    + 	        keynote_returnvalue = $1;
    + 		return 0;
    + 	      }
    +-
    ++		;
    + prog:   /* Nada */ { $$ = 0; }
    +        | notemptyprog {
    + 			  /* 
    +@@ -285,7 +284,7 @@
    + 		      else
    + 			$$ = $4;
    +                     } 
    +-
    ++		;
    + notemptyprog: expr HINT afterhint
    +               {
    + 		if (checkexception($1))
    +@@ -300,7 +299,7 @@
    + 		else
    + 		  $$ = 0;
    + 	      }
    +-
    ++		;
    + afterhint: str {  if (keynote_exceptionflag || keynote_donteval)
    + 		    $$ = 0;
    + 		  else
    +@@ -315,7 +314,7 @@
    + 		  }
    +                 }
    +          | OPENBLOCK prog CLOSEBLOCK { $$ = $2; }
    +-
    ++		;
    + 
    + expr:     OPENPAREN expr CLOSEPAREN 	{ $$ = $2; }
    + 	| expr AND { if ($1 == 0)
    +@@ -334,19 +333,19 @@
    + 	| stringexp 			{ $$ = $1; }
    +         | TRUE	  		        { $$ = 1; }
    +         | FALSE	  		        { $$ = 0; }
    +-
    ++		;
    + numexp:	  numex LT numex { $$ = $1 < $3; }
    + 	| numex GT numex { $$ = $1 > $3; }
    + 	| numex EQ numex { $$ = $1 == $3; }
    + 	| numex LE numex { $$ = $1 <= $3; }
    + 	| numex GE numex { $$ = $1 >= $3; }
    + 	| numex NE numex { $$ = $1 != $3; }
    +-
    ++		;
    + floatexp: floatex LT floatex { $$ = $1 < $3; }
    + 	| floatex GT floatex { $$ = $1 > $3; }
    + 	| floatex LE floatex { $$ = $1 <= $3; }
    + 	| floatex GE floatex { $$ = $1 >= $3; }
    +-
    ++		;
    + numex:	  numex PLUS numex  { $$ = $1 + $3; }
    + 	| numex MINUS numex { $$ = $1 - $3; }
    + 	| numex MULT numex  { $$ = $1 * $3; }
    +@@ -384,7 +383,7 @@
    + 					      free($2);
    + 					  }
    + 					}
    +-
    ++		;
    + floatex:  floatex PLUS floatex  	{ $$ = ($1 + $3); }
    + 	| floatex MINUS floatex 	{ $$ = ($1 - $3); }
    + 	| floatex MULT floatex          { $$ = ($1 * $3); }
    +@@ -418,7 +417,7 @@
    + 					      free($2);
    + 					  }
    + 	                                }
    +-
    ++		;
    + stringexp: str EQ str {
    +                         if (keynote_exceptionflag || keynote_donteval)
    + 			  $$ = 0;
    +@@ -529,9 +528,9 @@
    + 		      if (i == 0)
    + 		      {
    + #if !defined(HAVE_SNPRINTF)
    +-			  sprintf(grp, "%d", preg.re_nsub);
    ++			  sprintf(grp, "%d", (int)preg.re_nsub);
    + #else /* !HAVE_SNPRINTF */
    +-			  snprintf(grp, 3, "%d", preg.re_nsub);
    ++			  snprintf(grp, 3, "%d", (int)preg.re_nsub);
    + #endif /* !HAVE_SNPRINTF */
    + 			  if (keynote_env_add("_0", grp, &keynote_temp_list,
    + 					      1, 0) != RESULT_TRUE)
    +@@ -579,7 +578,7 @@
    + 		  }
    + 	      }
    + 	    }
    +-
    ++		;
    + str: str DOTT str    {  if (keynote_exceptionflag || keynote_donteval)
    + 			  $$ = (char *) NULL;
    + 			else
    +@@ -605,7 +604,7 @@
    + 			}
    + 		      }
    + 	| strnotconcat { $$ = $1; }
    +-
    ++		;
    + strnotconcat: STRING 	                { $$ = $1; }
    +         | OPENPAREN str CLOSEPAREN 	{ $$ = $2; }
    +         | VARIABLE      {  if (keynote_exceptionflag || keynote_donteval)
    +@@ -660,6 +659,7 @@
    + 				  return -1;
    + 			    }
    + 			 }
    ++		;
    + %%
    + 
    + /*
    +Index: keynote-2.3/Makefile.in
    +===================================================================
    +--- keynote-2.3.orig/Makefile.in	2007-06-04 13:22:41.317574056 +0200
    ++++ keynote-2.3/Makefile.in	2007-06-04 13:22:41.391562808 +0200
    +@@ -41,7 +41,8 @@
    + YACCFLAGS = -d -p kn -b k
    + LEXFLAGS2 = -Pkv -s -i
    + LEXFLAGS = -Cr -Pkn -s -i
    +-CFLAGS = -O2 -Wall # -g
    ++CFLAGS = -O2 -Wall -fno-strict-aliasing # -g
    ++LDFLAGS = @LDFLAGS@
    + RMFLAGS2 = -rf
    + RMFLAGS = -f
    + NROFFFLAGS = -mandoc
    +@@ -83,7 +84,7 @@
    + 	$(RANLIB) $(TARGET)
    + 
    + $(TARGET2): $(TARGET) $(OBJS2)
    +-	$(CC) $(CFLAGS) -o $(TARGET2) $(OBJS2) $(LIBS)
    ++	$(CC) $(CFLAGS) -o $(TARGET2) $(OBJS2) $(LDFLAGS) $(LIBS)
    + 
    + k.tab.c: keynote.y header.h keynote.h assertion.h config.h
    + 	$(YACC) $(YACCFLAGS) keynote.y
    +Index: keynote-2.3/signature.c
    +===================================================================
    +--- keynote-2.3.orig/signature.c	2007-06-04 13:22:41.323573144 +0200
    ++++ keynote-2.3/signature.c	2007-06-04 13:22:41.392562656 +0200
    +@@ -515,7 +515,7 @@
    + 	kk = dc->dec_key;
    + 	if (keytype == KEYNOTE_PRIVATE_KEY)
    + 	{
    +-	    if (d2i_DSAPrivateKey((DSA **) &kk, &decoded, len) == (DSA *) NULL)
    ++	    if (d2i_DSAPrivateKey((DSA **) &kk, (const unsigned char **) &decoded, len) == (DSA *) NULL)
    + 	    {
    + 		if (ptr != (unsigned char *) NULL)
    + 		  free(ptr);
    +@@ -526,7 +526,7 @@
    + 	}
    + 	else
    + 	{
    +-	    if (d2i_DSAPublicKey((DSA **) &kk, &decoded, len) == (DSA *) NULL)
    ++	    if (d2i_DSAPublicKey((DSA **) &kk, (const unsigned char **) &decoded, len) == (DSA *) NULL)
    + 	    {
    + 		if (ptr != (unsigned char *) NULL)
    + 		  free(ptr);
    +@@ -556,7 +556,7 @@
    +         kk = dc->dec_key;
    +         if (keytype == KEYNOTE_PRIVATE_KEY)
    +         {
    +-            if (d2i_RSAPrivateKey((RSA **) &kk, &decoded, len) == (RSA *) NULL)
    ++            if (d2i_RSAPrivateKey((RSA **) &kk, (const unsigned char **) &decoded, len) == (RSA *) NULL)
    +             {
    +                 if (ptr != (unsigned char *) NULL)
    +                   free(ptr);
    +@@ -567,7 +567,7 @@
    +         }
    +         else
    +         {
    +-            if (d2i_RSAPublicKey((RSA **) &kk, &decoded, len) == (RSA *) NULL)
    ++            if (d2i_RSAPublicKey((RSA **) &kk, (const unsigned char **) &decoded, len) == (RSA *) NULL)
    +             {
    +                 if (ptr != (unsigned char *) NULL)
    +                   free(ptr);
    diff --git a/libs/keynote/patches/002-cross_compile.patch b/libs/keynote/patches/002-cross_compile.patch
    new file mode 100644
    index 0000000..050efbd
    --- /dev/null
    +++ b/libs/keynote/patches/002-cross_compile.patch
    @@ -0,0 +1,588 @@
    +Index: keynote-2.3/configure
    +===================================================================
    +--- keynote-2.3.orig/configure	2007-06-04 13:22:41.259582872 +0200
    ++++ keynote-2.3/configure	2007-06-04 13:22:41.658522224 +0200
    +@@ -889,52 +889,10 @@
    + done
    + test -n "$YACC" || YACC="yacc"
    + 
    +-for ac_prog in openssl ssleay
    +-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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
    +-echo "configure:898: checking for $ac_word" >&5
    +-if eval "test \"`echo '$''{'ac_cv_path_SSLEAY'+set}'`\" = set"; then
    +-  echo $ac_n "(cached) $ac_c" 1>&6
    +-else
    +-  case "$SSLEAY" in
    +-  /*)
    +-  ac_cv_path_SSLEAY="$SSLEAY" # Let the user override the test with a path.
    +-  ;;
    +-  ?:/*)			 
    +-  ac_cv_path_SSLEAY="$SSLEAY" # Let the user override the test with a dos path.
    +-  ;;
    +-  *)
    +-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
    +-  ac_dummy="\
    +-               $PATH:/usr/local/bin:/usr/local/ssl/sbin:/usr/local/ssl/bin:/usr/ssl/bin:/usr/ssl/sbin:/usr/sbin:/usr/openssl/bin:/usr/openssl/bin:/usr/local/openssl/bin:/usr/local/openssl/sbin"
    +-  for ac_dir in $ac_dummy; do 
    +-    test -z "$ac_dir" && ac_dir=.
    +-    if test -f $ac_dir/$ac_word; then
    +-      ac_cv_path_SSLEAY="$ac_dir/$ac_word"
    +-      break
    +-    fi
    +-  done
    +-  IFS="$ac_save_ifs"
    +-  ;;
    +-esac
    +-fi
    +-SSLEAY="$ac_cv_path_SSLEAY"
    +-if test -n "$SSLEAY"; then
    +-  echo "$ac_t""$SSLEAY" 1>&6
    +-else
    +-  echo "$ac_t""no" 1>&6
    +-fi
    +-
    +-test -n "$SSLEAY" && break
    +-done
    +-test -n "$SSLEAY" || SSLEAY="/usr/local/bin/ssleay"
    +-
    + # Extract the first word of "rm", so it can be a program name with args.
    + set dummy rm; ac_word=$2
    + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    +-echo "configure:938: checking for $ac_word" >&5
    ++echo "configure:896: checking for $ac_word" >&5
    + if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +@@ -970,7 +928,7 @@
    + # Extract the first word of "ar", so it can be a program name with args.
    + set dummy ar; ac_word=$2
    + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    +-echo "configure:974: checking for $ac_word" >&5
    ++echo "configure:932: checking for $ac_word" >&5
    + if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +@@ -1006,7 +964,7 @@
    + # Extract the first word of "nroff", so it can be a program name with args.
    + set dummy nroff; ac_word=$2
    + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    +-echo "configure:1010: checking for $ac_word" >&5
    ++echo "configure:968: checking for $ac_word" >&5
    + if eval "test \"`echo '$''{'ac_cv_path_NROFF'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +@@ -1042,7 +1000,7 @@
    + # Extract the first word of "tar", so it can be a program name with args.
    + set dummy tar; ac_word=$2
    + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    +-echo "configure:1046: checking for $ac_word" >&5
    ++echo "configure:1004: checking for $ac_word" >&5
    + if eval "test \"`echo '$''{'ac_cv_path_TAR'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +@@ -1078,7 +1036,7 @@
    + # Extract the first word of "true", so it can be a program name with args.
    + set dummy true; ac_word=$2
    + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    +-echo "configure:1082: checking for $ac_word" >&5
    ++echo "configure:1040: checking for $ac_word" >&5
    + if eval "test \"`echo '$''{'ac_cv_path_TRUE'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +@@ -1114,7 +1072,7 @@
    + # Extract the first word of "mkdir", so it can be a program name with args.
    + set dummy mkdir; ac_word=$2
    + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    +-echo "configure:1118: checking for $ac_word" >&5
    ++echo "configure:1076: checking for $ac_word" >&5
    + if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +@@ -1150,7 +1108,7 @@
    + # Extract the first word of "tr", so it can be a program name with args.
    + set dummy tr; ac_word=$2
    + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    +-echo "configure:1154: checking for $ac_word" >&5
    ++echo "configure:1112: checking for $ac_word" >&5
    + if eval "test \"`echo '$''{'ac_cv_path_TR'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +@@ -1186,7 +1144,7 @@
    + # Extract the first word of "echo", so it can be a program name with args.
    + set dummy echo; ac_word=$2
    + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    +-echo "configure:1190: checking for $ac_word" >&5
    ++echo "configure:1148: checking for $ac_word" >&5
    + if eval "test \"`echo '$''{'ac_cv_path_ECHO'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +@@ -1222,7 +1180,7 @@
    + # Extract the first word of "sed", so it can be a program name with args.
    + set dummy sed; ac_word=$2
    + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    +-echo "configure:1226: checking for $ac_word" >&5
    ++echo "configure:1184: checking for $ac_word" >&5
    + if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +@@ -1256,11 +1214,8 @@
    + fi
    + 
    + 
    +-LIBS="-L/usr/lib -L/usr/local/lib -L/usr/ssl/lib -L/usr/openssl/lib\
    +- -L/usr/local/ssl/lib -L/usr/local/openssl/lib -L/usr/pkg/lib -L/pkg/lib"
    +-
    + echo $ac_n "checking for floor in -lm""... $ac_c" 1>&6
    +-echo "configure:1264: checking for floor in -lm" >&5
    ++echo "configure:1219: checking for floor in -lm" >&5
    + ac_lib_var=`echo m'_'floor | sed 'y%./+-%__p_%'`
    + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    +@@ -1268,7 +1223,7 @@
    +   ac_save_LIBS="$LIBS"
    + LIBS="-lm  $LIBS"
    + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    ++if { (eval echo configure:1238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    +   rm -rf conftest*
    +   eval "ac_cv_lib_$ac_lib_var=yes"
    + else
    +@@ -1300,7 +1255,7 @@
    + fi
    + 
    + echo $ac_n "checking for RSAPrivateDecrypt in -lrsaref""... $ac_c" 1>&6
    +-echo "configure:1304: checking for RSAPrivateDecrypt in -lrsaref" >&5
    ++echo "configure:1259: checking for RSAPrivateDecrypt in -lrsaref" >&5
    + ac_lib_var=`echo rsaref'_'RSAPrivateDecrypt | sed 'y%./+-%__p_%'`
    + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    +@@ -1308,7 +1263,7 @@
    +   ac_save_LIBS="$LIBS"
    + LIBS="-lrsaref  $LIBS"
    + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    ++if { (eval echo configure:1278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    +   rm -rf conftest*
    +   eval "ac_cv_lib_$ac_lib_var=yes"
    + else
    +@@ -1340,7 +1295,7 @@
    + fi
    + 
    + echo $ac_n "checking for i2a_ASN1_STRING in -lcrypto""... $ac_c" 1>&6
    +-echo "configure:1344: checking for i2a_ASN1_STRING in -lcrypto" >&5
    ++echo "configure:1299: checking for i2a_ASN1_STRING in -lcrypto" >&5
    + ac_lib_var=`echo crypto'_'i2a_ASN1_STRING | sed 'y%./+-%__p_%'`
    + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    +@@ -1348,7 +1303,7 @@
    +   ac_save_LIBS="$LIBS"
    + LIBS="-lcrypto  $LIBS"
    + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    ++if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    +   rm -rf conftest*
    +   eval "ac_cv_lib_$ac_lib_var=yes"
    + else
    +@@ -1380,7 +1335,7 @@
    + fi
    + 
    + echo $ac_n "checking for RSA_ref_private_encrypt in -lRSAglue""... $ac_c" 1>&6
    +-echo "configure:1384: checking for RSA_ref_private_encrypt in -lRSAglue" >&5
    ++echo "configure:1339: checking for RSA_ref_private_encrypt in -lRSAglue" >&5
    + ac_lib_var=`echo RSAglue'_'RSA_ref_private_encrypt | sed 'y%./+-%__p_%'`
    + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    +@@ -1388,7 +1343,7 @@
    +   ac_save_LIBS="$LIBS"
    + LIBS="-lRSAglue  $LIBS"
    + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    ++if { (eval echo configure:1358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    +   rm -rf conftest*
    +   eval "ac_cv_lib_$ac_lib_var=yes"
    + else
    +@@ -1420,12 +1375,9 @@
    + fi
    + 
    + 
    +-CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/ssl/include\
    +- -I/usr/local/ssl/include -I/usr/openssl/include -I/usr/pkg/include\
    +- -I/usr/local/openssl/include -I/pkg/include"
    + 
    + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
    +-echo "configure:1429: checking how to run the C preprocessor" >&5
    ++echo "configure:1381: checking how to run the C preprocessor" >&5
    + # On Suns, sometimes $CPP names a directory.
    + if test -n "$CPP" && test -d "$CPP"; then
    +   CPP=
    +@@ -1440,13 +1392,13 @@
    +   # On the NeXT, cc -E runs the code through the compiler's parser,
    +   # not just through cpp.
    +   cat > conftest.$ac_ext <
    + Syntax Error
    + EOF
    + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    +-{ (eval echo configure:1450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    ++{ (eval echo configure:1402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    + if test -z "$ac_err"; then
    +   :
    +@@ -1457,13 +1409,13 @@
    +   rm -rf conftest*
    +   CPP="${CC-cc} -E -traditional-cpp"
    +   cat > conftest.$ac_ext <
    + Syntax Error
    + EOF
    + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    +-{ (eval echo configure:1467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    ++{ (eval echo configure:1419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    + if test -z "$ac_err"; then
    +   :
    +@@ -1474,13 +1426,13 @@
    +   rm -rf conftest*
    +   CPP="${CC-cc} -nologo -E"
    +   cat > conftest.$ac_ext <
    + Syntax Error
    + EOF
    + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    +-{ (eval echo configure:1484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    ++{ (eval echo configure:1436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    + if test -z "$ac_err"; then
    +   :
    +@@ -1505,12 +1457,12 @@
    + echo "$ac_t""$CPP" 1>&6
    + 
    + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
    +-echo "configure:1509: checking for ANSI C header files" >&5
    ++echo "configure:1461: checking for ANSI C header files" >&5
    + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +   cat > conftest.$ac_ext <
    + #include 
    +@@ -1518,7 +1470,7 @@
    + #include 
    + EOF
    + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    +-{ (eval echo configure:1522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    ++{ (eval echo configure:1474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    + if test -z "$ac_err"; then
    +   rm -rf conftest*
    +@@ -1535,7 +1487,7 @@
    + if test $ac_cv_header_stdc = yes; then
    +   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    + cat > conftest.$ac_ext <
    + EOF
    +@@ -1553,7 +1505,7 @@
    + if test $ac_cv_header_stdc = yes; then
    +   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    + cat > conftest.$ac_ext <
    + EOF
    +@@ -1574,7 +1526,7 @@
    +   :
    + else
    +   cat > conftest.$ac_ext <
    + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
    +@@ -1585,7 +1537,7 @@
    + exit (0); }
    + 
    + EOF
    +-if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    ++if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    + then
    +   :
    + else
    +@@ -1609,12 +1561,12 @@
    + fi
    + 
    + echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
    +-echo "configure:1613: checking whether time.h and sys/time.h may both be included" >&5
    ++echo "configure:1565: checking whether time.h and sys/time.h may both be included" >&5
    + if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +   cat > conftest.$ac_ext <
    + #include 
    +@@ -1623,7 +1575,7 @@
    + struct tm *tp;
    + ; return 0; }
    + EOF
    +-if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    ++if { (eval echo configure:1579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    +   rm -rf conftest*
    +   ac_cv_header_time=yes
    + else
    +@@ -1647,17 +1599,17 @@
    + do
    + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    +-echo "configure:1651: checking for $ac_hdr" >&5
    ++echo "configure:1603: checking for $ac_hdr" >&5
    + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +   cat > conftest.$ac_ext <
    + EOF
    + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    +-{ (eval echo configure:1661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    ++{ (eval echo configure:1613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    + if test -z "$ac_err"; then
    +   rm -rf conftest*
    +@@ -1687,17 +1639,17 @@
    + do
    + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    +-echo "configure:1691: checking for $ac_hdr" >&5
    ++echo "configure:1643: checking for $ac_hdr" >&5
    + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +   cat > conftest.$ac_ext <
    + EOF
    + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    +-{ (eval echo configure:1701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    ++{ (eval echo configure:1653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    + if test -z "$ac_err"; then
    +   rm -rf conftest*
    +@@ -1726,12 +1678,12 @@
    + 
    + 
    + echo $ac_n "checking for working const""... $ac_c" 1>&6
    +-echo "configure:1730: checking for working const" >&5
    ++echo "configure:1682: checking for working const" >&5
    + if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +   cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
    ++if { (eval echo configure:1736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    +   rm -rf conftest*
    +   ac_cv_c_const=yes
    + else
    +@@ -1801,12 +1753,12 @@
    + fi
    + 
    + echo $ac_n "checking for u_int""... $ac_c" 1>&6
    +-echo "configure:1805: checking for u_int" >&5
    ++echo "configure:1757: checking for u_int" >&5
    + if eval "test \"`echo '$''{'ac_cv_type_u_int'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +   cat > conftest.$ac_ext <
    + #if STDC_HEADERS
    +@@ -1834,12 +1786,12 @@
    + fi
    + 
    + echo $ac_n "checking for u_char""... $ac_c" 1>&6
    +-echo "configure:1838: checking for u_char" >&5
    ++echo "configure:1790: checking for u_char" >&5
    + if eval "test \"`echo '$''{'ac_cv_type_u_char'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +   cat > conftest.$ac_ext <
    + #if STDC_HEADERS
    +@@ -1870,12 +1822,12 @@
    + for ac_func in regcomp open close read _open _close _read strchr memcpy
    + do
    + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    +-echo "configure:1874: checking for $ac_func" >&5
    ++echo "configure:1826: checking for $ac_func" >&5
    + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +   cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    ++if { (eval echo configure:1854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    +   rm -rf conftest*
    +   eval "ac_cv_func_$ac_func=yes"
    + else
    +@@ -1925,12 +1877,12 @@
    + for ac_func in strcasecmp strncasecmp stricmp strnicmp snprintf __b64_ntop
    + do
    + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    +-echo "configure:1929: checking for $ac_func" >&5
    ++echo "configure:1881: checking for $ac_func" >&5
    + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +   cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    ++if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    +   rm -rf conftest*
    +   eval "ac_cv_func_$ac_func=yes"
    + else
    +@@ -1980,12 +1932,12 @@
    + for ac_func in getopt
    + do
    + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    +-echo "configure:1984: checking for $ac_func" >&5
    ++echo "configure:1936: checking for $ac_func" >&5
    + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    +   echo $ac_n "(cached) $ac_c" 1>&6
    + else
    +   cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    ++if { (eval echo configure:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    +   rm -rf conftest*
    +   eval "ac_cv_func_$ac_func=yes"
    + else
    +@@ -2172,7 +2124,6 @@
    + s%@CC@%$CC%g
    + s%@RANLIB@%$RANLIB%g
    + s%@YACC@%$YACC%g
    +-s%@SSLEAY@%$SSLEAY%g
    + s%@RM@%$RM%g
    + s%@AR@%$AR%g
    + s%@NROFF@%$NROFF%g
    +Index: keynote-2.3/configure.in
    +===================================================================
    +--- keynote-2.3.orig/configure.in	2007-06-04 13:22:41.389563112 +0200
    ++++ keynote-2.3/configure.in	2007-06-04 13:22:41.658522224 +0200
    +@@ -9,8 +9,8 @@
    + AC_PROG_CC
    + AC_PROG_RANLIB
    + AC_PROG_YACC
    +-AC_PATH_PROGS(SSLEAY, openssl ssleay, /usr/local/bin/ssleay, \
    +-               $PATH:/usr/local/bin:/usr/local/ssl/sbin:/usr/local/ssl/bin:/usr/ssl/bin:/usr/ssl/sbin:/usr/sbin:/usr/openssl/bin:/usr/openssl/bin:/usr/local/openssl/bin:/usr/local/openssl/sbin)
    ++dnl AC_PATH_PROGS(SSLEAY, openssl ssleay, /usr/local/bin/ssleay, \
    ++dnl                $PATH:/usr/local/bin:/usr/local/ssl/sbin:/usr/local/ssl/bin:/usr/ssl/bin:/usr/ssl/sbin:/usr/sbin:/usr/openssl/bin:/usr/openssl/bin:/usr/local/openssl/bin:/usr/local/openssl/sbin)
    + AC_PATH_PROG(RM, rm, /bin/rm)
    + AC_PATH_PROG(AR, ar, /usr/bin/ar)
    + AC_PATH_PROG(NROFF, nroff, /usr/bin/nroff)
    +@@ -27,7 +27,7 @@
    + AC_CHECK_LIB(RSAglue, RSA_ref_private_encrypt, LIBS="$LIBS -lRSAglue")
    + 
    + dnl Checks for header files.
    +-CPPFLAGS="-I/usr/include/openssl"
    ++dnl CPPFLAGS="-I/usr/include/openssl"
    + 
    + AC_HEADER_STDC
    + AC_HEADER_TIME
    diff --git a/libs/ldns/Makefile b/libs/ldns/Makefile
    new file mode 100644
    index 0000000..c60903b
    --- /dev/null
    +++ b/libs/ldns/Makefile
    @@ -0,0 +1,47 @@
    +#
    +# Copyright (C) 2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ldns
    +PKG_VERSION:=1.6.11
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/ldns
    +PKG_MD5SUM:=c55b592a679672281712c457fbb41eb5
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libldns
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=A library to simplify DNS programming
    +  URL:=http://www.nlnetlabs.nl/projects/ldns/
    +  DEPENDS:=+libopenssl
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--disable-gost \
    +	--with-ssl="$(STAGING_DIR)/usr"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/ldns $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libldns.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libldns/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libldns.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libldns))
    diff --git a/libs/libIDL2/Makefile b/libs/libIDL2/Makefile
    new file mode 100644
    index 0000000..2056487
    --- /dev/null
    +++ b/libs/libIDL2/Makefile
    @@ -0,0 +1,71 @@
    +#
    +# Copyright (C) 2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libIDL2
    +PKG_VERSION:=0.8.13
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=libIDL-$(PKG_VERSION).tar.bz2
    +PKG_BUILD_DIR:=$(BUILD_DIR)/libIDL-$(PKG_VERSION)
    +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/libIDL-$(PKG_VERSION)
    +PKG_SOURCE_URL:=@GNOME/libIDL/0.8
    +PKG_MD5SUM:=b43b289a859eb38a710f70622c46e571
    +PKG_FIXUP:=libtool
    +HOST_BUILD_DEPENDS:=glib2/host
    +PKG_INSTALL=1
    +
    +include $(INCLUDE_DIR)/host-build.mk
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/libIDL2
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=IDL Compiling Library
    +  URL:=http://andrewtv.org/libIDL/
    +  DEPENDS:=+glib2
    +endef
    +
    +define Package/libIDL2/description
    +  libIDL is a library licensed under the GNU LGPL for creating trees of
    +  CORBA Interface Definition Language (IDL) files, which is a
    +  specification for defining portable interfaces.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default,libIDL_cv_long_long_format=ll)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
    +		$(1)/usr/lib/pkgconfig/
    +
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/* \
    +		$(1)/usr/include/
    +endef
    +
    +define Package/libIDL2/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call HostBuild))
    +$(eval $(call BuildPackage,libIDL2))
    diff --git a/libs/libaio/Makefile b/libs/libaio/Makefile
    new file mode 100644
    index 0000000..147db8e
    --- /dev/null
    +++ b/libs/libaio/Makefile
    @@ -0,0 +1,60 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libaio
    +PKG_VERSION:=0.3.107
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
    +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/liba/libaio/
    +PKG_MD5SUM:=db32c19c61ca937bcb1ba48da9180682
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libaio
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=@!LINUX_2_4
    +  TITLE:=Linux kernel AIO interface access library
    +  URL:=http://lse.sourceforge.net/io/aio.html
    +endef
    +
    +define Build/Configure
    +endef
    +
    +LIBAIO_CFLAGS:=-nostdlib -nostartfiles -I. $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		ARCH="$(ARCH)" \
    +		CC="$(TARGET_CROSS)gcc" \
    +		LD="$(TARGET_CROSS)ld" \
    +		CFLAGS="$(LIBAIO_CFLAGS)" \
    +		all
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		prefix="$(PKG_INSTALL_DIR)/usr" \
    +		install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libaio.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libaio.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libaio/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libaio.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libaio))
    diff --git a/libs/libaio/patches/001-arches_from_debian_package_0.3.106-8.patch b/libs/libaio/patches/001-arches_from_debian_package_0.3.106-8.patch
    new file mode 100644
    index 0000000..d0a7613
    --- /dev/null
    +++ b/libs/libaio/patches/001-arches_from_debian_package_0.3.106-8.patch
    @@ -0,0 +1,770 @@
    +--- /dev/null
    ++++ b/src/syscall-m68k.h
    +@@ -0,0 +1,78 @@
    ++#define __NR_io_setup		241
    ++#define __NR_io_destroy		242
    ++#define __NR_io_getevents	243
    ++#define __NR_io_submit		244
    ++#define __NR_io_cancel		245
    ++
    ++#define io_syscall1(type,fname,sname,atype,a) \
    ++type fname(atype a) \
    ++{ \
    ++register long __res __asm__ ("%d0") = __NR_##sname; \
    ++register long __a __asm__ ("%d1") = (long)(a); \
    ++__asm__ __volatile__ ("trap  #0" \
    ++		      : "+d" (__res) \
    ++		      : "d" (__a)  ); \
    ++return (type) __res; \
    ++}
    ++
    ++#define io_syscall2(type,fname,sname,atype,a,btype,b) \
    ++type fname(atype a,btype b) \
    ++{ \
    ++register long __res __asm__ ("%d0") = __NR_##sname; \
    ++register long __a __asm__ ("%d1") = (long)(a); \
    ++register long __b __asm__ ("%d2") = (long)(b); \
    ++__asm__ __volatile__ ("trap  #0" \
    ++		      : "+d" (__res) \
    ++		      : "d" (__a), "d" (__b) \
    ++		     ); \
    ++return (type) __res; \
    ++}
    ++
    ++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
    ++type fname(atype a,btype b,ctype c) \
    ++{ \
    ++register long __res __asm__ ("%d0") = __NR_##sname; \
    ++register long __a __asm__ ("%d1") = (long)(a); \
    ++register long __b __asm__ ("%d2") = (long)(b); \
    ++register long __c __asm__ ("%d3") = (long)(c); \
    ++__asm__ __volatile__ ("trap  #0" \
    ++		      : "+d" (__res) \
    ++		      : "d" (__a), "d" (__b), \
    ++			"d" (__c) \
    ++		     ); \
    ++return (type) __res; \
    ++}
    ++
    ++#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
    ++type fname (atype a, btype b, ctype c, dtype d) \
    ++{ \
    ++register long __res __asm__ ("%d0") = __NR_##sname; \
    ++register long __a __asm__ ("%d1") = (long)(a); \
    ++register long __b __asm__ ("%d2") = (long)(b); \
    ++register long __c __asm__ ("%d3") = (long)(c); \
    ++register long __d __asm__ ("%d4") = (long)(d); \
    ++__asm__ __volatile__ ("trap  #0" \
    ++		      : "+d" (__res) \
    ++		      : "d" (__a), "d" (__b), \
    ++			"d" (__c), "d" (__d)  \
    ++		     ); \
    ++return (type) __res; \
    ++}
    ++
    ++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
    ++type fname (atype a,btype b,ctype c,dtype d,etype e) \
    ++{ \
    ++register long __res __asm__ ("%d0") = __NR_##sname; \
    ++register long __a __asm__ ("%d1") = (long)(a); \
    ++register long __b __asm__ ("%d2") = (long)(b); \
    ++register long __c __asm__ ("%d3") = (long)(c); \
    ++register long __d __asm__ ("%d4") = (long)(d); \
    ++register long __e __asm__ ("%d5") = (long)(e); \
    ++__asm__ __volatile__ ("trap  #0" \
    ++		      : "+d" (__res) \
    ++		      : "d" (__a), "d" (__b), \
    ++			"d" (__c), "d" (__d), "d" (__e)  \
    ++		     ); \
    ++return (type) __res; \
    ++}
    ++
    +--- /dev/null
    ++++ b/src/syscall-sparc.h
    +@@ -0,0 +1,130 @@
    ++/* $Id: unistd.h,v 1.74 2002/02/08 03:57:18 davem Exp $ */
    ++
    ++/*
    ++ * System calls under the Sparc.
    ++ *
    ++ * Don't be scared by the ugly clobbers, it is the only way I can
    ++ * think of right now to force the arguments into fixed registers
    ++ * before the trap into the system call with gcc 'asm' statements.
    ++ *
    ++ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
    ++ *
    ++ * SunOS compatibility based upon preliminary work which is:
    ++ *
    ++ * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
    ++ */
    ++
    ++
    ++#define __NR_io_setup		268
    ++#define __NR_io_destroy		269
    ++#define __NR_io_submit		270
    ++#define __NR_io_cancel		271
    ++#define __NR_io_getevents	272
    ++
    ++
    ++#define io_syscall1(type,fname,sname,type1,arg1) \
    ++type fname(type1 arg1) \
    ++{ \
    ++long __res; \
    ++register long __g1 __asm__ ("g1") = __NR_##sname; \
    ++register long __o0 __asm__ ("o0") = (long)(arg1); \
    ++__asm__ __volatile__ ("t 0x10\n\t" \
    ++		      "bcc 1f\n\t" \
    ++		      "mov %%o0, %0\n\t" \
    ++		      "sub %%g0, %%o0, %0\n\t" \
    ++		      "1:\n\t" \
    ++		      : "=r" (__res), "=&r" (__o0) \
    ++		      : "1" (__o0), "r" (__g1) \
    ++		      : "cc"); \
    ++if (__res < -255 || __res >= 0) \
    ++	return (type) __res; \
    ++return -1; \
    ++}
    ++
    ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
    ++type fname(type1 arg1,type2 arg2) \
    ++{ \
    ++long __res; \
    ++register long __g1 __asm__ ("g1") = __NR_##sname; \
    ++register long __o0 __asm__ ("o0") = (long)(arg1); \
    ++register long __o1 __asm__ ("o1") = (long)(arg2); \
    ++__asm__ __volatile__ ("t 0x10\n\t" \
    ++		      "bcc 1f\n\t" \
    ++		      "mov %%o0, %0\n\t" \
    ++		      "sub %%g0, %%o0, %0\n\t" \
    ++		      "1:\n\t" \
    ++		      : "=r" (__res), "=&r" (__o0) \
    ++		      : "1" (__o0), "r" (__o1), "r" (__g1) \
    ++		      : "cc"); \
    ++if (__res < -255 || __res >= 0) \
    ++	return (type) __res; \
    ++return -1; \
    ++}
    ++
    ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
    ++type fname(type1 arg1,type2 arg2,type3 arg3) \
    ++{ \
    ++long __res; \
    ++register long __g1 __asm__ ("g1") = __NR_##sname; \
    ++register long __o0 __asm__ ("o0") = (long)(arg1); \
    ++register long __o1 __asm__ ("o1") = (long)(arg2); \
    ++register long __o2 __asm__ ("o2") = (long)(arg3); \
    ++__asm__ __volatile__ ("t 0x10\n\t" \
    ++		      "bcc 1f\n\t" \
    ++		      "mov %%o0, %0\n\t" \
    ++		      "sub %%g0, %%o0, %0\n\t" \
    ++		      "1:\n\t" \
    ++		      : "=r" (__res), "=&r" (__o0) \
    ++		      : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \
    ++		      : "cc"); \
    ++if (__res < -255 || __res>=0) \
    ++	return (type) __res; \
    ++return -1; \
    ++}
    ++
    ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
    ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
    ++{ \
    ++long __res; \
    ++register long __g1 __asm__ ("g1") = __NR_##sname; \
    ++register long __o0 __asm__ ("o0") = (long)(arg1); \
    ++register long __o1 __asm__ ("o1") = (long)(arg2); \
    ++register long __o2 __asm__ ("o2") = (long)(arg3); \
    ++register long __o3 __asm__ ("o3") = (long)(arg4); \
    ++__asm__ __volatile__ ("t 0x10\n\t" \
    ++		      "bcc 1f\n\t" \
    ++		      "mov %%o0, %0\n\t" \
    ++		      "sub %%g0, %%o0, %0\n\t" \
    ++		      "1:\n\t" \
    ++		      : "=r" (__res), "=&r" (__o0) \
    ++		      : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \
    ++		      : "cc"); \
    ++if (__res < -255 || __res>=0) \
    ++	return (type) __res; \
    ++return -1; \
    ++}
    ++
    ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
    ++	  type5,arg5) \
    ++type fname(type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
    ++{ \
    ++long __res; \
    ++register long __g1 __asm__ ("g1") = __NR_##sname; \
    ++register long __o0 __asm__ ("o0") = (long)(arg1); \
    ++register long __o1 __asm__ ("o1") = (long)(arg2); \
    ++register long __o2 __asm__ ("o2") = (long)(arg3); \
    ++register long __o3 __asm__ ("o3") = (long)(arg4); \
    ++register long __o4 __asm__ ("o4") = (long)(arg5); \
    ++__asm__ __volatile__ ("t 0x10\n\t" \
    ++		      "bcc 1f\n\t" \
    ++		      "mov %%o0, %0\n\t" \
    ++		      "sub %%g0, %%o0, %0\n\t" \
    ++		      "1:\n\t" \
    ++		      : "=r" (__res), "=&r" (__o0) \
    ++		      : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \
    ++		      : "cc"); \
    ++if (__res < -255 || __res>=0) \
    ++	return (type) __res; \
    ++return -1; \
    ++}
    ++
    +--- a/src/syscall.h
    ++++ b/src/syscall.h
    +@@ -22,6 +22,16 @@
    + #include "syscall-s390.h"
    + #elif defined(__alpha__)
    + #include "syscall-alpha.h"
    ++#elif defined(__arm__)
    ++#include "syscall-arm.h"
    ++#elif defined(__m68k__)
    ++#include "syscall-m68k.h"
    ++#elif defined(__sparc__)
    ++#include "syscall-sparc.h"
    ++#elif defined(__hppa__)
    ++#include "syscall-parisc.h"
    ++#elif defined(__mips__)
    ++#include "syscall-mips.h"
    + #else
    + #error "add syscall-arch.h"
    + #endif
    +--- /dev/null
    ++++ b/src/syscall-mips.h
    +@@ -0,0 +1,223 @@
    ++/*
    ++ * This file is subject to the terms and conditions of the GNU General Public
    ++ * License.  See the file "COPYING" in the main directory of this archive
    ++ * for more details.
    ++ *
    ++ * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle
    ++ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
    ++ *
    ++ * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto
    ++ * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A
    ++ */
    ++
    ++#ifndef _MIPS_SIM_ABI32
    ++#define _MIPS_SIM_ABI32			1
    ++#define _MIPS_SIM_NABI32		2
    ++#define _MIPS_SIM_ABI64			3
    ++#endif
    ++
    ++#if _MIPS_SIM == _MIPS_SIM_ABI32
    ++
    ++/*
    ++ * Linux o32 style syscalls are in the range from 4000 to 4999.
    ++ */
    ++#define __NR_Linux			4000
    ++#define __NR_io_setup			(__NR_Linux + 241)
    ++#define __NR_io_destroy			(__NR_Linux + 242)
    ++#define __NR_io_getevents		(__NR_Linux + 243)
    ++#define __NR_io_submit			(__NR_Linux + 244)
    ++#define __NR_io_cancel			(__NR_Linux + 245)
    ++
    ++#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
    ++
    ++#if _MIPS_SIM == _MIPS_SIM_ABI64
    ++
    ++/*
    ++ * Linux 64-bit syscalls are in the range from 5000 to 5999.
    ++ */
    ++#define __NR_Linux			5000
    ++#define __NR_io_setup			(__NR_Linux + 200)
    ++#define __NR_io_destroy			(__NR_Linux + 201)
    ++#define __NR_io_getevents		(__NR_Linux + 202)
    ++#define __NR_io_submit			(__NR_Linux + 203)
    ++#define __NR_io_cancel			(__NR_Linux + 204)
    ++#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
    ++
    ++#if _MIPS_SIM == _MIPS_SIM_NABI32
    ++
    ++/*
    ++ * Linux N32 syscalls are in the range from 6000 to 6999.
    ++ */
    ++#define __NR_Linux			6000
    ++#define __NR_io_setup			(__NR_Linux + 200)
    ++#define __NR_io_destroy			(__NR_Linux + 201)
    ++#define __NR_io_getevents		(__NR_Linux + 202)
    ++#define __NR_io_submit			(__NR_Linux + 203)
    ++#define __NR_io_cancel			(__NR_Linux + 204)
    ++#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
    ++
    ++#define io_syscall1(type,fname,sname,atype,a) \
    ++type fname(atype a) \
    ++{ \
    ++	register unsigned long __a0 asm("$4") = (unsigned long) a; \
    ++	register unsigned long __a3 asm("$7"); \
    ++	unsigned long __v0; \
    ++	\
    ++	__asm__ volatile ( \
    ++	".set\tnoreorder\n\t" \
    ++	"li\t$2, %3\t\t\t# " #fname "\n\t" \
    ++	"syscall\n\t" \
    ++	"move\t%0, $2\n\t" \
    ++	".set\treorder" \
    ++	: "=&r" (__v0), "=r" (__a3) \
    ++	: "r" (__a0), "i" (__NR_##sname) \
    ++	: "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
    ++	  "memory"); \
    ++	\
    ++	if (__a3 == 0) \
    ++		return (type) __v0; \
    ++	return (type) -1; \
    ++}
    ++
    ++#define io_syscall2(type,fname,sname,atype,a,btype,b) \
    ++type fname(atype a, btype b) \
    ++{ \
    ++	register unsigned long __a0 asm("$4") = (unsigned long) a; \
    ++	register unsigned long __a1 asm("$5") = (unsigned long) b; \
    ++	register unsigned long __a3 asm("$7"); \
    ++	unsigned long __v0; \
    ++	\
    ++	__asm__ volatile ( \
    ++	".set\tnoreorder\n\t" \
    ++	"li\t$2, %4\t\t\t# " #fname "\n\t" \
    ++	"syscall\n\t" \
    ++	"move\t%0, $2\n\t" \
    ++	".set\treorder" \
    ++	: "=&r" (__v0), "=r" (__a3) \
    ++	: "r" (__a0), "r" (__a1), "i" (__NR_##sname) \
    ++	: "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
    ++	  "memory"); \
    ++	\
    ++	if (__a3 == 0) \
    ++		return (type) __v0; \
    ++	return (type) -1; \
    ++}
    ++
    ++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
    ++type fname(atype a, btype b, ctype c) \
    ++{ \
    ++	register unsigned long __a0 asm("$4") = (unsigned long) a; \
    ++	register unsigned long __a1 asm("$5") = (unsigned long) b; \
    ++	register unsigned long __a2 asm("$6") = (unsigned long) c; \
    ++	register unsigned long __a3 asm("$7"); \
    ++	unsigned long __v0; \
    ++	\
    ++	__asm__ volatile ( \
    ++	".set\tnoreorder\n\t" \
    ++	"li\t$2, %5\t\t\t# " #fname "\n\t" \
    ++	"syscall\n\t" \
    ++	"move\t%0, $2\n\t" \
    ++	".set\treorder" \
    ++	: "=&r" (__v0), "=r" (__a3) \
    ++	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \
    ++	: "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
    ++	  "memory"); \
    ++	\
    ++	if (__a3 == 0) \
    ++		return (type) __v0; \
    ++	return (type) -1; \
    ++}
    ++
    ++#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
    ++type fname(atype a, btype b, ctype c, dtype d) \
    ++{ \
    ++	register unsigned long __a0 asm("$4") = (unsigned long) a; \
    ++	register unsigned long __a1 asm("$5") = (unsigned long) b; \
    ++	register unsigned long __a2 asm("$6") = (unsigned long) c; \
    ++	register unsigned long __a3 asm("$7") = (unsigned long) d; \
    ++	unsigned long __v0; \
    ++	\
    ++	__asm__ volatile ( \
    ++	".set\tnoreorder\n\t" \
    ++	"li\t$2, %5\t\t\t# " #fname "\n\t" \
    ++	"syscall\n\t" \
    ++	"move\t%0, $2\n\t" \
    ++	".set\treorder" \
    ++	: "=&r" (__v0), "+r" (__a3) \
    ++	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \
    ++	: "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
    ++	  "memory"); \
    ++	\
    ++	if (__a3 == 0) \
    ++		return (type) __v0; \
    ++	return (type) -1; \
    ++}
    ++
    ++#if (_MIPS_SIM == _MIPS_SIM_ABI32)
    ++
    ++/*
    ++ * Using those means your brain needs more than an oil change ;-)
    ++ */
    ++
    ++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
    ++type fname(atype a, btype b, ctype c, dtype d, etype e) \
    ++{ \
    ++	register unsigned long __a0 asm("$4") = (unsigned long) a; \
    ++	register unsigned long __a1 asm("$5") = (unsigned long) b; \
    ++	register unsigned long __a2 asm("$6") = (unsigned long) c; \
    ++	register unsigned long __a3 asm("$7") = (unsigned long) d; \
    ++	unsigned long __v0; \
    ++	\
    ++	__asm__ volatile ( \
    ++	".set\tnoreorder\n\t" \
    ++	"lw\t$2, %6\n\t" \
    ++	"subu\t$29, 32\n\t" \
    ++	"sw\t$2, 16($29)\n\t" \
    ++	"li\t$2, %5\t\t\t# " #fname "\n\t" \
    ++	"syscall\n\t" \
    ++	"move\t%0, $2\n\t" \
    ++	"addiu\t$29, 32\n\t" \
    ++	".set\treorder" \
    ++	: "=&r" (__v0), "+r" (__a3) \
    ++	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname), \
    ++	  "m" ((unsigned long)e) \
    ++	: "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
    ++	  "memory"); \
    ++	\
    ++	if (__a3 == 0) \
    ++		return (type) __v0; \
    ++	return (type) -1; \
    ++}
    ++
    ++#endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
    ++
    ++#if (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64)
    ++
    ++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
    ++type fname (atype a,btype b,ctype c,dtype d,etype e) \
    ++{ \
    ++	register unsigned long __a0 asm("$4") = (unsigned long) a; \
    ++	register unsigned long __a1 asm("$5") = (unsigned long) b; \
    ++	register unsigned long __a2 asm("$6") = (unsigned long) c; \
    ++	register unsigned long __a3 asm("$7") = (unsigned long) d; \
    ++	register unsigned long __a4 asm("$8") = (unsigned long) e; \
    ++	unsigned long __v0; \
    ++	\
    ++	__asm__ volatile ( \
    ++	".set\tnoreorder\n\t" \
    ++	"li\t$2, %6\t\t\t# " #fname "\n\t" \
    ++	"syscall\n\t" \
    ++	"move\t%0, $2\n\t" \
    ++	".set\treorder" \
    ++	: "=&r" (__v0), "+r" (__a3) \
    ++	: "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##sname) \
    ++	: "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
    ++	  "memory"); \
    ++	\
    ++	if (__a3 == 0) \
    ++		return (type) __v0; \
    ++	return (type) -1; \
    ++}
    ++
    ++#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
    ++
    +--- a/src/libaio.h
    ++++ b/src/libaio.h
    +@@ -73,6 +73,40 @@ typedef enum io_iocb_cmd {
    + #define PADDED(x, y)	unsigned y; x
    + #define PADDEDptr(x, y) unsigned y; x
    + #define PADDEDul(x, y)	unsigned y; unsigned long x
    ++#elif defined(__arm__)
    ++#  if defined (__ARMEB__) /* big endian, 32 bits */
    ++#define PADDED(x, y)	unsigned y; x
    ++#define PADDEDptr(x, y)	unsigned y; x
    ++#define PADDEDul(x, y)	unsigned y; unsigned long x
    ++#  else                   /* little endian, 32 bits */
    ++#define PADDED(x, y)	x; unsigned y
    ++#define PADDEDptr(x, y)	x; unsigned y
    ++#define PADDEDul(x, y)	unsigned long x; unsigned y
    ++#  endif
    ++#elif defined(__m68k__) /* big endian, 32 bits */
    ++#define PADDED(x, y)	unsigned y; x
    ++#define PADDEDptr(x, y)	unsigned y; x
    ++#define PADDEDul(x, y)	unsigned y; unsigned long x
    ++#elif defined(__sparc__) /* big endian, 32 bits */
    ++#define PADDED(x, y)	unsigned y; x
    ++#define PADDEDptr(x, y)	unsigned y; x
    ++#define PADDEDul(x, y)	unsigned y; unsigned long x
    ++#elif defined(__hppa__) /* big endian, 32 bits */
    ++#define PADDED(x, y)	unsigned y; x
    ++#define PADDEDptr(x, y)	unsigned y; x
    ++#define PADDEDul(x, y)	unsigned y; unsigned long x
    ++#elif defined(__mips__)
    ++#  if defined (__MIPSEB__) /* big endian, 32 bits */
    ++#define PADDED(x, y)	unsigned y; x
    ++#define PADDEDptr(x, y)	unsigned y; x
    ++#define PADDEDul(x, y)	unsigned y; unsigned long x
    ++#  elif defined(__MIPSEL__) /* little endian, 32 bits */
    ++#define PADDED(x, y)	x; unsigned y
    ++#define PADDEDptr(x, y)	x; unsigned y
    ++#define PADDEDul(x, y)	unsigned long x; unsigned y
    ++#  else
    ++#    error "neither mipseb nor mipsel?"
    ++#  endif
    + #else
    + #error	endian?
    + #endif
    +--- /dev/null
    ++++ b/src/syscall-parisc.h
    +@@ -0,0 +1,146 @@
    ++/*
    ++ * Linux system call numbers.
    ++ *
    ++ * Cary Coutant says that we should just use another syscall gateway
    ++ * page to avoid clashing with the HPUX space, and I think he's right:
    ++ * it will would keep a branch out of our syscall entry path, at the
    ++ * very least.  If we decide to change it later, we can ``just'' tweak
    ++ * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be
    ++ * 1024 or something.  Oh, and recompile libc. =)
    ++ *
    ++ * 64-bit HPUX binaries get the syscall gateway address passed in a register
    ++ * from the kernel at startup, which seems a sane strategy.
    ++ */
    ++
    ++#define __NR_Linux                0
    ++#define __NR_io_setup           (__NR_Linux + 215)
    ++#define __NR_io_destroy         (__NR_Linux + 216)
    ++#define __NR_io_getevents       (__NR_Linux + 217)
    ++#define __NR_io_submit          (__NR_Linux + 218)
    ++#define __NR_io_cancel          (__NR_Linux + 219)
    ++
    ++#define SYS_ify(syscall_name)   __NR_##syscall_name
    ++
    ++/* Assume all syscalls are done from PIC code just to be
    ++ * safe. The worst case scenario is that you lose a register
    ++ * and save/restore r19 across the syscall. */
    ++#define PIC
    ++
    ++/* Definition taken from glibc 2.3.3
    ++ * sysdeps/unix/sysv/linux/hppa/sysdep.h
    ++ */
    ++
    ++#ifdef PIC
    ++/* WARNING: CANNOT BE USED IN A NOP! */
    ++# define K_STW_ASM_PIC	"       copy %%r19, %%r4\n"
    ++# define K_LDW_ASM_PIC	"       copy %%r4, %%r19\n"
    ++# define K_USING_GR4	"%r4",
    ++#else
    ++# define K_STW_ASM_PIC	" \n"
    ++# define K_LDW_ASM_PIC	" \n"
    ++# define K_USING_GR4
    ++#endif
    ++
    ++/* GCC has to be warned that a syscall may clobber all the ABI
    ++   registers listed as "caller-saves", see page 8, Table 2
    ++   in section 2.2.6 of the PA-RISC RUN-TIME architecture
    ++   document. However! r28 is the result and will conflict with
    ++   the clobber list so it is left out. Also the input arguments
    ++   registers r20 -> r26 will conflict with the list so they
    ++   are treated specially. Although r19 is clobbered by the syscall
    ++   we cannot say this because it would violate ABI, thus we say
    ++   r4 is clobbered and use that register to save/restore r19
    ++   across the syscall. */
    ++
    ++#define K_CALL_CLOB_REGS "%r1", "%r2", K_USING_GR4 \
    ++			 "%r20", "%r29", "%r31"
    ++
    ++#undef K_INLINE_SYSCALL
    ++#define K_INLINE_SYSCALL(name, nr, args...)	({			\
    ++	long __sys_res;							\
    ++	{								\
    ++		register unsigned long __res __asm__("r28");		\
    ++		K_LOAD_ARGS_##nr(args)					\
    ++		/* FIXME: HACK stw/ldw r19 around syscall */		\
    ++		__asm__ volatile(					\
    ++			K_STW_ASM_PIC					\
    ++			"	ble  0x100(%%sr2, %%r0)\n"		\
    ++			"	ldi %1, %%r20\n"			\
    ++			K_LDW_ASM_PIC					\
    ++			: "=r" (__res)					\
    ++			: "i" (SYS_ify(name)) K_ASM_ARGS_##nr		\
    ++			: "memory", K_CALL_CLOB_REGS K_CLOB_ARGS_##nr	\
    ++		);							\
    ++		__sys_res = (long)__res;				\
    ++	}								\
    ++	__sys_res;							\
    ++})
    ++
    ++#define K_LOAD_ARGS_0()
    ++#define K_LOAD_ARGS_1(r26)					\
    ++	register unsigned long __r26 __asm__("r26") = (unsigned long)(r26);   \
    ++	K_LOAD_ARGS_0()
    ++#define K_LOAD_ARGS_2(r26,r25)					\
    ++	register unsigned long __r25 __asm__("r25") = (unsigned long)(r25);   \
    ++	K_LOAD_ARGS_1(r26)
    ++#define K_LOAD_ARGS_3(r26,r25,r24)				\
    ++	register unsigned long __r24 __asm__("r24") = (unsigned long)(r24);   \
    ++	K_LOAD_ARGS_2(r26,r25)
    ++#define K_LOAD_ARGS_4(r26,r25,r24,r23)				\
    ++	register unsigned long __r23 __asm__("r23") = (unsigned long)(r23);   \
    ++	K_LOAD_ARGS_3(r26,r25,r24)
    ++#define K_LOAD_ARGS_5(r26,r25,r24,r23,r22)			\
    ++	register unsigned long __r22 __asm__("r22") = (unsigned long)(r22);   \
    ++	K_LOAD_ARGS_4(r26,r25,r24,r23)
    ++#define K_LOAD_ARGS_6(r26,r25,r24,r23,r22,r21)			\
    ++	register unsigned long __r21 __asm__("r21") = (unsigned long)(r21);   \
    ++	K_LOAD_ARGS_5(r26,r25,r24,r23,r22)
    ++
    ++/* Even with zero args we use r20 for the syscall number */
    ++#define K_ASM_ARGS_0
    ++#define K_ASM_ARGS_1 K_ASM_ARGS_0, "r" (__r26)
    ++#define K_ASM_ARGS_2 K_ASM_ARGS_1, "r" (__r25)
    ++#define K_ASM_ARGS_3 K_ASM_ARGS_2, "r" (__r24)
    ++#define K_ASM_ARGS_4 K_ASM_ARGS_3, "r" (__r23)
    ++#define K_ASM_ARGS_5 K_ASM_ARGS_4, "r" (__r22)
    ++#define K_ASM_ARGS_6 K_ASM_ARGS_5, "r" (__r21)
    ++
    ++/* The registers not listed as inputs but clobbered */
    ++#define K_CLOB_ARGS_6
    ++#define K_CLOB_ARGS_5 K_CLOB_ARGS_6, "%r21"
    ++#define K_CLOB_ARGS_4 K_CLOB_ARGS_5, "%r22"
    ++#define K_CLOB_ARGS_3 K_CLOB_ARGS_4, "%r23"
    ++#define K_CLOB_ARGS_2 K_CLOB_ARGS_3, "%r24"
    ++#define K_CLOB_ARGS_1 K_CLOB_ARGS_2, "%r25"
    ++#define K_CLOB_ARGS_0 K_CLOB_ARGS_1, "%r26"
    ++
    ++#define io_syscall1(type,fname,sname,type1,arg1)			\
    ++type fname(type1 arg1)							\
    ++{									\
    ++    return K_INLINE_SYSCALL(sname, 1, arg1);				\
    ++}
    ++
    ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2)		\
    ++type fname(type1 arg1, type2 arg2)					\
    ++{									\
    ++    return K_INLINE_SYSCALL(sname, 2, arg1, arg2);			\
    ++}
    ++
    ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3)	\
    ++type fname(type1 arg1, type2 arg2, type3 arg3)				\
    ++{									\
    ++    return K_INLINE_SYSCALL(sname, 3, arg1, arg2, arg3);		\
    ++}
    ++
    ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
    ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4)		\
    ++{									\
    ++    return K_INLINE_SYSCALL(sname, 4, arg1, arg2, arg3, arg4);		\
    ++}
    ++
    ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
    ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5)	\
    ++{									\
    ++    return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5);	\
    ++}
    ++
    +--- /dev/null
    ++++ b/src/syscall-arm.h
    +@@ -0,0 +1,116 @@
    ++/*
    ++ *  linux/include/asm-arm/unistd.h
    ++ *
    ++ *  Copyright (C) 2001-2005 Russell King
    ++ *
    ++ * This program 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.
    ++ *
    ++ * Please forward _all_ changes to this file to rmk@arm.linux.org.uk,
    ++ * no matter what the change is.  Thanks!
    ++ */
    ++
    ++#define __NR_OABI_SYSCALL_BASE	0x900000
    ++
    ++#if defined(__thumb__) || defined(__ARM_EABI__)
    ++#define __NR_SYSCALL_BASE	0
    ++#else
    ++#define __NR_SYSCALL_BASE	__NR_OABI_SYSCALL_BASE
    ++#endif
    ++
    ++#define __NR_io_setup			(__NR_SYSCALL_BASE+243)
    ++#define __NR_io_destroy			(__NR_SYSCALL_BASE+244)
    ++#define __NR_io_getevents		(__NR_SYSCALL_BASE+245)
    ++#define __NR_io_submit			(__NR_SYSCALL_BASE+246)
    ++#define __NR_io_cancel			(__NR_SYSCALL_BASE+247)
    ++
    ++#define __sys2(x) #x
    ++#define __sys1(x) __sys2(x)
    ++
    ++#if defined(__thumb__) || defined(__ARM_EABI__)
    ++#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name;
    ++#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs
    ++#define __syscall(name) "swi\t0"
    ++#else
    ++#define __SYS_REG(name)
    ++#define __SYS_REG_LIST(regs...) regs
    ++#define __syscall(name) "swi\t" __sys1(__NR_##name) ""
    ++#endif
    ++
    ++#define io_syscall1(type,fname,sname,type1,arg1)			\
    ++type fname(type1 arg1) {						\
    ++  __SYS_REG(sname)							\
    ++  register long __r0 __asm__("r0") = (long)arg1;			\
    ++  register long __res_r0 __asm__("r0");					\
    ++  __asm__ __volatile__ (						\
    ++  __syscall(sname)							\
    ++	: "=r" (__res_r0)						\
    ++	: __SYS_REG_LIST( "0" (__r0) )					\
    ++	: "memory" );							\
    ++  return (type) __res_r0;						\
    ++}
    ++
    ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2)		\
    ++type fname(type1 arg1,type2 arg2) {					\
    ++  __SYS_REG(sname)							\
    ++  register long __r0 __asm__("r0") = (long)arg1;			\
    ++  register long __r1 __asm__("r1") = (long)arg2;			\
    ++  register long __res_r0 __asm__("r0");					\
    ++  __asm__ __volatile__ (						\
    ++  __syscall(sname)							\
    ++	: "=r" (__res_r0)						\
    ++	: __SYS_REG_LIST( "0" (__r0), "r" (__r1) )			\
    ++	: "memory" );							\
    ++  return (type) __res_r0;						\
    ++}
    ++
    ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3)	\
    ++type fname(type1 arg1,type2 arg2,type3 arg3) {				\
    ++  __SYS_REG(sname)							\
    ++  register long __r0 __asm__("r0") = (long)arg1;			\
    ++  register long __r1 __asm__("r1") = (long)arg2;			\
    ++  register long __r2 __asm__("r2") = (long)arg3;			\
    ++  register long __res_r0 __asm__("r0");					\
    ++  __asm__ __volatile__ (						\
    ++  __syscall(sname)							\
    ++	: "=r" (__res_r0)						\
    ++	: __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) )		\
    ++	: "memory" );							\
    ++  return (type) __res_r0;						\
    ++}
    ++
    ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\
    ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) {		\
    ++  __SYS_REG(sname)							\
    ++  register long __r0 __asm__("r0") = (long)arg1;			\
    ++  register long __r1 __asm__("r1") = (long)arg2;			\
    ++  register long __r2 __asm__("r2") = (long)arg3;			\
    ++  register long __r3 __asm__("r3") = (long)arg4;			\
    ++  register long __res_r0 __asm__("r0");					\
    ++  __asm__ __volatile__ (						\
    ++  __syscall(sname)							\
    ++	: "=r" (__res_r0)						\
    ++	: __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \
    ++	: "memory" );							\
    ++  return (type) __res_r0;						\
    ++}
    ++
    ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5)	\
    ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\
    ++  __SYS_REG(sname)							\
    ++  register long __r0 __asm__("r0") = (long)arg1;			\
    ++  register long __r1 __asm__("r1") = (long)arg2;			\
    ++  register long __r2 __asm__("r2") = (long)arg3;			\
    ++  register long __r3 __asm__("r3") = (long)arg4;			\
    ++  register long __r4 __asm__("r4") = (long)arg5;			\
    ++  register long __res_r0 __asm__("r0");					\
    ++  __asm__ __volatile__ (						\
    ++  __syscall(sname)							\
    ++	: "=r" (__res_r0)						\
    ++	: __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2),		\
    ++			  "r" (__r3), "r" (__r4) )			\
    ++	: "memory" );							\
    ++  return (type) __res_r0;						\
    ++}
    ++
    diff --git a/libs/libaio/patches/002-avr32_support.patch b/libs/libaio/patches/002-avr32_support.patch
    new file mode 100644
    index 0000000..60f8195
    --- /dev/null
    +++ b/libs/libaio/patches/002-avr32_support.patch
    @@ -0,0 +1,118 @@
    +--- a/src/libaio.h
    ++++ b/src/libaio.h
    +@@ -107,6 +107,10 @@ typedef enum io_iocb_cmd {
    + #  else
    + #    error "neither mipseb nor mipsel?"
    + #  endif
    ++#elif defined(__avr32__) /* big endian, 32 bits */
    ++#define PADDED(x, y)	unsigned y; x
    ++#define PADDEDptr(x, y)	unsigned y; x
    ++#define PADDEDul(x, y)	unsigned y; unsigned long x;
    + #else
    + #error	endian?
    + #endif
    +--- /dev/null
    ++++ b/src/syscall-avr32.h
    +@@ -0,0 +1,91 @@
    ++/*
    ++ * Copyright (C) 2007 Atmel Corporation
    ++ *
    ++ * This program 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.
    ++ */
    ++
    ++#define __NR_io_setup		197
    ++#define __NR_io_destroy		198
    ++#define __NR_io_getevents	199
    ++#define __NR_io_submit		200
    ++#define __NR_io_cancel		201
    ++
    ++#define io_syscall1(type,fname,sname,type1,arg1)			\
    ++type fname(type1 arg1)							\
    ++{									\
    ++	register long __r12 __asm__("r12") = (long)arg1;		\
    ++	register long __res_r12 __asm__("r12");				\
    ++	register long __scno __asm__("r8") = __NR_##sname;		\
    ++	__asm__ __volatile__("scall"					\
    ++			     : "=r"(__res_r12)				\
    ++			     : "0"(__r12), "r"(__scno)			\
    ++			     : "memory");				\
    ++	return (type) __res_r12;					\
    ++}
    ++
    ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2)		\
    ++type fname(type1 arg1, type2 arg2)					\
    ++{									\
    ++	register long __r12 __asm__("r12") = (long)arg1;		\
    ++	register long __r11 __asm__("r11") = (long)arg2;		\
    ++	register long __res_r12 __asm__("r12");				\
    ++	register long __scno __asm__("r8") = __NR_##sname;		\
    ++	__asm__ __volatile__("scall"					\
    ++			     : "=r"(__res_r12)				\
    ++			     : "0"(__r12), "r"(__r11), "r"(__scno)	\
    ++			     : "memory");				\
    ++	return (type) __res_r12;					\
    ++}
    ++
    ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3)	\
    ++type fname(type1 arg1, type2 arg2, type3 arg3)				\
    ++{									\
    ++	register long __r12 __asm__("r12") = (long)arg1;		\
    ++	register long __r11 __asm__("r11") = (long)arg2;		\
    ++	register long __r10 __asm__("r10") = (long)arg3;		\
    ++	register long __res_r12 __asm__("r12");				\
    ++	register long __scno __asm__("r8") = __NR_##sname;		\
    ++	__asm__ __volatile__("scall"					\
    ++			     : "=r"(__res_r12)				\
    ++			     : "0"(__r12), "r"(__r11), "r"(__r10),	\
    ++			       "r"(__scno)				\
    ++			     : "memory");				\
    ++	return (type) __res_r12;					\
    ++}
    ++
    ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
    ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4)		\
    ++{									\
    ++	register long __r12 __asm__("r12") = (long)arg1;		\
    ++	register long __r11 __asm__("r11") = (long)arg2;		\
    ++	register long __r10 __asm__("r10") = (long)arg3;		\
    ++	register long __r9 __asm__("r9") = (long)arg4;			\
    ++	register long __res_r12 __asm__("r12");				\
    ++	register long __scno __asm__("r8") = __NR_##sname;		\
    ++	__asm__ __volatile__("scall"					\
    ++			     : "=r"(__res_r12)				\
    ++			     : "0"(__r12), "r"(__r11), "r"(__r10),	\
    ++			       "r"(__r9), "r"(__scno)			\
    ++			     : "memory");				\
    ++	return (type) __res_r12;					\
    ++}
    ++
    ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
    ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5)	\
    ++{									\
    ++	register long __r12 __asm__("r12") = (long)arg1;		\
    ++	register long __r11 __asm__("r11") = (long)arg2;		\
    ++	register long __r10 __asm__("r10") = (long)arg3;		\
    ++	register long __r9 __asm__("r9") = (long)arg4;			\
    ++	register long __r5 __asm__("r5") = (long)arg5;			\
    ++	register long __res_r12 __asm__("r12");				\
    ++	register long __scno __asm__("r8") = __NR_##sname;		\
    ++	__asm__ __volatile__("scall"					\
    ++			     : "=r"(__res_r12)				\
    ++			     : "0"(__r12), "r"(__r11), "r"(__r10),	\
    ++			       "r"(__r9), "r"(__r5), "r"(__scno)	\
    ++			     : "memory");				\
    ++	return (type) __res_r12;					\
    ++}
    +--- a/src/syscall.h
    ++++ b/src/syscall.h
    +@@ -32,6 +32,8 @@
    + #include "syscall-parisc.h"
    + #elif defined(__mips__)
    + #include "syscall-mips.h"
    ++#elif defined(__avr32__)
    ++#include "syscall-avr32.h"
    + #else
    + #error "add syscall-arch.h"
    + #endif
    diff --git a/libs/libamsel/Makefile b/libs/libamsel/Makefile
    new file mode 100644
    index 0000000..5f5af9c
    --- /dev/null
    +++ b/libs/libamsel/Makefile
    @@ -0,0 +1,56 @@
    +# 
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libamsel
    +PKG_VERSION:=20040621-cvs
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=ftp://ftp.amselinux.net/source/
    +PKG_MD5SUM:=2077e620047404881a65d39c53c9917e
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libamsel
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=The amwall library
    +  URL:=http://amselinux.de/
    +endef
    +
    +define Package/libamsel/description
    +	A library for amwall configuration files.
    +endef
    +
    +define Build/Configure
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +MAKE_FLAGS += \
    +	CFLAGS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR) -fPIC" \
    +	LDIR=$(PKG_BUILD_DIR) \
    +	PREFIX="$(PKG_INSTALL_DIR)/usr" \
    +	all install
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/amsel/compat.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/include/compat
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/amsel/compat/queue.h $(1)/usr/include/compat/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libamsel.so $(1)/usr/lib/
    +endef
    +
    +define Package/libamsel/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
    +endef
    +
    +$(eval $(call BuildPackage,libamsel))
    diff --git a/libs/libao/Makefile b/libs/libao/Makefile
    new file mode 100644
    index 0000000..9156a2c
    --- /dev/null
    +++ b/libs/libao/Makefile
    @@ -0,0 +1,62 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libao
    +PKG_VERSION:=1.1.0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.xiph.org/releases/ao/
    +PKG_MD5SUM:=2b2508c29bc97e4dc218fa162cf883c8
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libao
    +  SECTION:=libs
    +  DEPENDS:=+alsa-lib
    +  CATEGORY:=Libraries
    +  TITLE:=A cross platform audio library
    +  URL:=http://www.xiph.org/ao/
    +endef
    +
    +define Package/libao/description
    +	Libao is a cross-platform audio library that allows programs to
    +	output audio using a simple API on a wide variety of platforms.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-esd \
    +	--disable-arts \
    +	--disable-nas \
    +	--disable-pulse
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/ao $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ao.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libao/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.so.* $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/ao/plugins-4
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/ao/plugins-4/lib*.so $(1)/usr/lib/ao/plugins-4/
    +endef
    +
    +$(eval $(call BuildPackage,libao))
    diff --git a/libs/libart/Makefile b/libs/libart/Makefile
    new file mode 100644
    index 0000000..caebc56
    --- /dev/null
    +++ b/libs/libart/Makefile
    @@ -0,0 +1,74 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libart
    +PKG_VERSION:=2.3.21
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)_lgpl-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)_lgpl/2.3
    +PKG_MD5SUM:=08559ff3c67fd95d57b0c5e91a6b4302
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_lgpl-$(PKG_VERSION)
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libart
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=An high-performance 2D graphics library
    +  URL:=http://www.levien.com/libart/
    +endef
    +
    +define Package/libart/description
    + A library of functions for 2D graphics supporting a superset of the
    + PostScript imaging model, designed to be integrated with graphics,
    + artwork, and illustration programs. It is written in optimized C, and
    + is fully compatible with C++. With a small footprint of 10,000 lines of
    + code, it is especially suitable for embedded applications.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin $(1)/usr/include $(1)/usr/lib/pkgconfig
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/libart2-config \
    +		$(2)/bin/
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
    +		$(2)/bin/libart2-config
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/libart-2.0 \
    +			$(1)/usr/include/
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libart_lgpl_2.{la,a,so*} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libart-2.0.pc \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libart/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libart_lgpl_2.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libart))
    diff --git a/libs/libatomicops/Makefile b/libs/libatomicops/Makefile
    new file mode 100644
    index 0000000..b82d940
    --- /dev/null
    +++ b/libs/libatomicops/Makefile
    @@ -0,0 +1,57 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libatomicops
    +PKG_VERSION:=1.2
    +PKG_EXTRA_VERSION:=+cvs20080819.orig
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=libatomic-ops_$(PKG_VERSION)$(PKG_EXTRA_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/liba/libatomic-ops/
    +PKG_MD5SUM:=bf26c062f28796e3daaab586a38abec1
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/libatomic_ops-$(PKG_VERSION)
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libatomicops
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=implementations for atomic memory update operations
    +  DEPENDS:=@!TARGET_avr32
    +  URL:=http://www.hpl.hp.com/research/linux/atomic_ops/
    +endef
    +
    +define Package/libatomicops/description
    +  Provides implementations for atomic memory update
    +  operations on a number of architectures. This allows
    +  direct use of these in reasonably portable code. Unlike
    +  earlier similar packages, this one explicitly considers
    +  memory barrier semantics, and allows the construction of
    +  code that involves minimum overhead across a variety of
    +  architectures.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
    +	$(CP) $(PKG_BUILD_DIR)/src/atomic_ops $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libatomic_ops*.a $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libatomicops))
    diff --git a/libs/libaudiofile/Makefile b/libs/libaudiofile/Makefile
    new file mode 100644
    index 0000000..7cb7793
    --- /dev/null
    +++ b/libs/libaudiofile/Makefile
    @@ -0,0 +1,77 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=audiofile
    +PKG_VERSION:=0.2.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:= \
    +	http://github.com/downloads/mpruett/audiofile/ \
    +	http://www.68k.org/~michael/audiofile/
    +PKG_MD5SUM:=a39be317a7b1971b408805dc5e371862
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libaudiofile
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Audio File library
    +  URL:=http://www.68k.org/~michael/audiofile/
    +endef
    +
    +define Package/libaudiofile/description
    + The audiofile library allows the processing of audio data to and from audio 
    + files of many common formats (currently AIFF, AIFF-C, WAVE, NeXT/Sun, BICS, 
    + and raw data).
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--enable-shared \
    +	--enable-static \
    +	--with-build-cc="$(HOSTCC)" \
    +
    +TARGET_CFLAGS+= $(FPIC) -std=c99
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/bin/audiofile-config \
    +		$(2)/bin/
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
    +		$(2)/bin/audiofile-config
    +
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/{af_vfs,audiofile,aupvlist}.h \
    +		$(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libaudiofile.{la,a,so*} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/audiofile.pc \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libaudiofile/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libaudiofile.so.* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libaudiofile))
    diff --git a/libs/libaudiofile/patches/001-audiofile-config-libdirs.patch b/libs/libaudiofile/patches/001-audiofile-config-libdirs.patch
    new file mode 100644
    index 0000000..209225e
    --- /dev/null
    +++ b/libs/libaudiofile/patches/001-audiofile-config-libdirs.patch
    @@ -0,0 +1,13 @@
    +--- a/audiofile-config.in
    ++++ b/audiofile-config.in
    +@@ -45,7 +45,9 @@ while test $# -gt 0; do
    +       echo $includes
    +       ;;
    +     --libs)
    +-      libdirs=-L@libdir@
    ++      if test @libdir@ != /usr/libdir ; then
    ++        libdirs=-L@libdir@
    ++      fi
    +       echo $libdirs -laudiofile -lm
    +       ;;
    +     *)
    diff --git a/libs/libcelt/Makefile b/libs/libcelt/Makefile
    new file mode 100644
    index 0000000..2f8df0d
    --- /dev/null
    +++ b/libs/libcelt/Makefile
    @@ -0,0 +1,57 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=celt
    +PKG_VERSION:=0.7.0
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/celt/
    +PKG_MD5SUM:=0bb72abec367f4ef12551f79dda11b23
    +
    +PKG_BUILD_DEPENDS:=libogg
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libcelt
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=CELT Codec
    +  URL:=http://www.celt-codec.org/
    +endef
    +
    +define Package/libcelt/description
    + The CELT codec is an experimental audio codec for use in low-delay speech and audio communication.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--without-ogg \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/celt
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/celt/celt*.h \
    +		$(1)/usr/include/celt
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/* \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/libcelt/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcelt.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libcelt))
    diff --git a/libs/libcli/Makefile b/libs/libcli/Makefile
    new file mode 100644
    index 0000000..5eb3850
    --- /dev/null
    +++ b/libs/libcli/Makefile
    @@ -0,0 +1,56 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libcli
    +PKG_VERSION:=1.9.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://libcli.googlecode.com/files
    +PKG_MD5SUM:=b917617d21b90db214971efe64a33416
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libcli
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=A Cisco-like CLI library
    +  URL:=http://code.google.com/p/libcli/
    +endef
    +
    +define Package/libcli/description
    +	Libcli provides a shared library for including a Cisco-like
    +	command-line interface into other software. It's a telnet
    +	interface which supports command-line editing, history,
    +	authentication and callbacks for a user-definable function tree.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +MAKE_FLAGS += \
    +	DEBUG="" \
    +	OPTIM="$(TARGET_CFLAGS)" \
    +	CFLAGS="$(TARGET_CFLAGS)" \
    +	PREFIX="/usr" \
    +	DESTDIR="$(PKG_INSTALL_DIR)" \
    +	all install
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libcli.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcli.so* $(1)/usr/lib/
    +endef
    +
    +define Package/libcli/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcli.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libcli))
    diff --git a/libs/libconfig/Makefile b/libs/libconfig/Makefile
    new file mode 100644
    index 0000000..6b50e5e
    --- /dev/null
    +++ b/libs/libconfig/Makefile
    @@ -0,0 +1,59 @@
    +#
    +# Copyright (C) 2008-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libconfig
    +PKG_VERSION:=1.4.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.hyperrealm.com/libconfig
    +PKG_MD5SUM:=d57da7a91aadbfd53afedb5c1bade5f4
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libconfig
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Configuration File Library
    +  URL:=http://www.hyperrealm.com/libconfig/
    +endef
    +
    +define Package/libconfig/description
    + Libconfig is a simple library for manipulating structured configuration
    + files. This file format is more compact and more readable than XML. And
    + unlike XML, it is type-aware, so it is not necessary to do string
    + parsing in application code.
    +
    + Libconfig is very compact -- just 38K for the stripped C shared
    + library (less than one-fourth the size of the expat XML parser library)
    + and 66K for the stripped C++ shared library. This makes it well-suited
    + for memory-constrained systems like handheld devices.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-cxx
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libconfig.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libconfig/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libconfig))
    diff --git a/libs/libcroco/Makefile b/libs/libcroco/Makefile
    new file mode 100644
    index 0000000..bcc17d5
    --- /dev/null
    +++ b/libs/libcroco/Makefile
    @@ -0,0 +1,59 @@
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libcroco
    +PKG_VERSION:=0.6.2
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/0.6/
    +PKG_MD5SUM:=1429c597aa4b75fc610ab3a542c99209
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +EXTRA_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
    +               -L$(ICONV_PREFIX) -L$(INTL_PREFIX)
    +
    +define Package/libcroco
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Croco css2 parsing libraray.
    +  DEPENDS:=+glib2 +libxml2
    +  URL:=http://www.freespiders.org/projects/libcroco/
    +endef
    +
    +define Package/libcroco/description
    +Libcroco is a standalone css2 parsing and manipulation library.
    +The parser provides a low level event driven SAC like api
    +and a css object model like api.
    +Libcroco provides a CSS2 selection engine and an experimental
    +xml/css rendering engine.
    +
    +This library is being written to bring the css support
    +to the mlview xml editor project but it can be used
    +for other applications as well.
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR)
    +	$(MAKE) -C $(PKG_BUILD_DIR)/ install DESTDIR=$(PKG_INSTALL_DIR)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/host/bin/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/croco-0.6-config $(1)/host/bin/
    +endef
    +
    +define Package/libcroco/install
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*{a,so*} $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libcroco))
    +
    +
    diff --git a/libs/libcroco/patches/001-automake-compat.patch b/libs/libcroco/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..0012c56
    --- /dev/null
    +++ b/libs/libcroco/patches/001-automake-compat.patch
    @@ -0,0 +1,11 @@
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -67,8 +67,6 @@ case "$host" in
    + esac
    + AM_CONDITIONAL(PLATFORM_WIN32, [test "$platform_win32" = "yes"])
    + 
    +-GTK_DOC_CHECK([1.0])
    +-
    + dnl **************************************************************
    + dnl check for the different --enable-option=val  
    + dnl messages issued by the user
    diff --git a/libs/libcrypto++/Makefile b/libs/libcrypto++/Makefile
    new file mode 100644
    index 0000000..f5c3212
    --- /dev/null
    +++ b/libs/libcrypto++/Makefile
    @@ -0,0 +1,57 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libcrypto++
    +PKG_VERSION:=5.6.0
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
    +PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/libc/libcrypto++/
    +PKG_MD5SUM:=681f830145bf93cbc16113eaf61fbe2a
    +
    +PKG_FIXUP:=autoreconf
    +PKG_REMOVE_FILES:=aclocal.m4 GNUmakefile
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libcryptoxx
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libpthread
    +  TITLE:=Crypto++ is library for creating C++ programs which use cryptographic algorithms
    +  URL:=http://packages.debian.org/sid/libcrypto++-dev
    +endef
    +
    +define Package/package/libcryptoxx
    +  Crypto++ is library for creating C++ programs which use cryptographic algorithms.
    +  The library uses a Pipes & Filters architecture with heavy use of templates and
    +  abstract base classes.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--enable-static \
    +	--enable-shared
    +
    +TARGET_LDFLAGS += \
    +	-lpthread
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/crypto++
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/crypto--/* $(1)/usr/include/crypto++/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypto++.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libcryptoxx/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypto++.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libcryptoxx))
    diff --git a/libs/libcrypto++/patches/001-strict_gcc43_include.patch b/libs/libcrypto++/patches/001-strict_gcc43_include.patch
    new file mode 100644
    index 0000000..f8c38eb
    --- /dev/null
    +++ b/libs/libcrypto++/patches/001-strict_gcc43_include.patch
    @@ -0,0 +1,16 @@
    +## strict-gcc43-include.diff by Jens Peter Secher 
    +##
    +## Explicitly include cstring to allow compilation with GCC 4.3.
    +
    +Index: libcrypto++/misc.h
    +===================================================================
    +--- libcrypto++.orig/misc.h	2009-04-07 02:48:55.000000000 +0200
    ++++ libcrypto++/misc.h	2009-04-07 02:50:56.000000000 +0200
    +@@ -40,6 +40,7 @@
    + #if defined(__GNUC__) && defined(__linux__)
    + #define CRYPTOPP_BYTESWAP_AVAILABLE
    + #include 
    ++#include 
    + #endif
    + 
    + NAMESPACE_BEGIN(CryptoPP)
    diff --git a/libs/libcrypto++/patches/002-cryptest_data_files_location.patch b/libs/libcrypto++/patches/002-cryptest_data_files_location.patch
    new file mode 100644
    index 0000000..2dbb696
    --- /dev/null
    +++ b/libs/libcrypto++/patches/002-cryptest_data_files_location.patch
    @@ -0,0 +1,500 @@
    +## cryptest-data-files-location.diff by Jens Peter Secher 
    +##
    +## Prefix data file names by PACKAGE_DATA_DIR which is set during build.
    +
    +Index: libcrypto++/bench2.cpp
    +===================================================================
    +--- libcrypto++.orig/bench2.cpp	2009-04-07 03:08:36.000000000 +0200
    ++++ libcrypto++/bench2.cpp	2009-04-07 03:23:43.000000000 +0200
    +@@ -245,44 +245,44 @@
    + 	cout << "OperationMilliseconds/Operation" << (g_hertz ? "Megacycles/Operation" : "") << endl;
    + 
    + 	cout << "\n";
    +-	BenchMarkCrypto > >("TestData/rsa1024.dat", "RSA 1024", t);
    +-	BenchMarkCrypto > >("TestData/luc1024.dat", "LUC 1024", t);
    +-	BenchMarkCrypto >("TestData/dlie1024.dat", "DLIES 1024", t);
    +-	BenchMarkCrypto >("TestData/lucc512.dat", "LUCELG 512", t);
    ++	BenchMarkCrypto > >(PACKAGE_DATA_DIR "TestData/rsa1024.dat", "RSA 1024", t);
    ++	BenchMarkCrypto > >(PACKAGE_DATA_DIR "TestData/luc1024.dat", "LUC 1024", t);
    ++	BenchMarkCrypto >(PACKAGE_DATA_DIR "TestData/dlie1024.dat", "DLIES 1024", t);
    ++	BenchMarkCrypto >(PACKAGE_DATA_DIR "TestData/lucc512.dat", "LUCELG 512", t);
    + 
    + 	cout << "\n";
    +-	BenchMarkCrypto > >("TestData/rsa2048.dat", "RSA 2048", t);
    +-	BenchMarkCrypto > >("TestData/luc2048.dat", "LUC 2048", t);
    +-	BenchMarkCrypto >("TestData/dlie2048.dat", "DLIES 2048", t);
    +-	BenchMarkCrypto >("TestData/lucc1024.dat", "LUCELG 1024", t);
    ++	BenchMarkCrypto > >(PACKAGE_DATA_DIR "TestData/rsa2048.dat", "RSA 2048", t);
    ++	BenchMarkCrypto > >(PACKAGE_DATA_DIR "TestData/luc2048.dat", "LUC 2048", t);
    ++	BenchMarkCrypto >(PACKAGE_DATA_DIR "TestData/dlie2048.dat", "DLIES 2048", t);
    ++	BenchMarkCrypto >(PACKAGE_DATA_DIR "TestData/lucc1024.dat", "LUCELG 1024", t);
    + 
    + 	cout << "\n";
    +-	BenchMarkSignature >("TestData/rsa1024.dat", "RSA 1024", t);
    +-	BenchMarkSignature >("TestData/rw1024.dat", "RW 1024", t);
    +-	BenchMarkSignature >("TestData/luc1024.dat", "LUC 1024", t);
    +-	BenchMarkSignature >("TestData/nr1024.dat", "NR 1024", t);
    +-	BenchMarkSignature("TestData/dsa1024.dat", "DSA 1024", t);
    +-	BenchMarkSignature >("TestData/lucs512.dat", "LUC-HMP 512", t);
    +-	BenchMarkSignature >("TestData/esig1023.dat", "ESIGN 1023", t);
    +-	BenchMarkSignature >("TestData/esig1536.dat", "ESIGN 1536", t);
    ++	BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/rsa1024.dat", "RSA 1024", t);
    ++	BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/rw1024.dat", "RW 1024", t);
    ++	BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/luc1024.dat", "LUC 1024", t);
    ++	BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/nr1024.dat", "NR 1024", t);
    ++	BenchMarkSignature(PACKAGE_DATA_DIR "TestData/dsa1024.dat", "DSA 1024", t);
    ++	BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/lucs512.dat", "LUC-HMP 512", t);
    ++	BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/esig1023.dat", "ESIGN 1023", t);
    ++	BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/esig1536.dat", "ESIGN 1536", t);
    + 
    + 	cout << "\n";
    +-	BenchMarkSignature >("TestData/rsa2048.dat", "RSA 2048", t);
    +-	BenchMarkSignature >("TestData/rw2048.dat", "RW 2048", t);
    +-	BenchMarkSignature >("TestData/luc2048.dat", "LUC 2048", t);
    +-	BenchMarkSignature >("TestData/nr2048.dat", "NR 2048", t);
    +-	BenchMarkSignature >("TestData/lucs1024.dat", "LUC-HMP 1024", t);
    +-	BenchMarkSignature >("TestData/esig2046.dat", "ESIGN 2046", t);
    ++	BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/rsa2048.dat", "RSA 2048", t);
    ++	BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/rw2048.dat", "RW 2048", t);
    ++	BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/luc2048.dat", "LUC 2048", t);
    ++	BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/nr2048.dat", "NR 2048", t);
    ++	BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/lucs1024.dat", "LUC-HMP 1024", t);
    ++	BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/esig2046.dat", "ESIGN 2046", t);
    + 
    + 	cout << "\n";
    +-	BenchMarkKeyAgreement("TestData/xtrdh171.dat", "XTR-DH 171", t);
    +-	BenchMarkKeyAgreement("TestData/xtrdh342.dat", "XTR-DH 342", t);
    +-	BenchMarkKeyAgreement("TestData/dh1024.dat", "DH 1024", t);
    +-	BenchMarkKeyAgreement("TestData/dh2048.dat", "DH 2048", t);
    +-	BenchMarkKeyAgreement("TestData/lucd512.dat", "LUCDIF 512", t);
    +-	BenchMarkKeyAgreement("TestData/lucd1024.dat", "LUCDIF 1024", t);
    +-	BenchMarkKeyAgreement("TestData/mqv1024.dat", "MQV 1024", t);
    +-	BenchMarkKeyAgreement("TestData/mqv2048.dat", "MQV 2048", t);
    ++	BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/xtrdh171.dat", "XTR-DH 171", t);
    ++	BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/xtrdh342.dat", "XTR-DH 342", t);
    ++	BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/dh1024.dat", "DH 1024", t);
    ++	BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/dh2048.dat", "DH 2048", t);
    ++	BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/lucd512.dat", "LUCDIF 512", t);
    ++	BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/lucd1024.dat", "LUCDIF 1024", t);
    ++	BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/mqv1024.dat", "MQV 1024", t);
    ++	BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/mqv2048.dat", "MQV 2048", t);
    + 
    + 	cout << "\n";
    + 	{
    +Index: libcrypto++/test.cpp
    +===================================================================
    +--- libcrypto++.orig/test.cpp	2009-04-07 03:08:36.000000000 +0200
    ++++ libcrypto++/test.cpp	2009-04-07 03:24:04.000000000 +0200
    +@@ -337,7 +337,7 @@
    + 			AES_CTR_Encrypt(argv[2], argv[3], argv[4], argv[5]);
    + 		else if (command == "h")
    + 		{
    +-			FileSource usage("TestData/usage.dat", true, new FileSink(cout));
    ++			FileSource usage(PACKAGE_DATA_DIR "TestData/usage.dat", true, new FileSink(cout));
    + 			return 1;
    + 		}
    + 		else if (command == "V")
    +Index: libcrypto++/validat1.cpp
    +===================================================================
    +--- libcrypto++.orig/validat1.cpp	2009-04-07 03:08:36.000000000 +0200
    ++++ libcrypto++/validat1.cpp	2009-04-07 03:25:57.000000000 +0200
    +@@ -508,12 +508,12 @@
    + {
    + 	cout << "\nDES validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/descert.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/descert.dat", true, new HexDecoder);
    + 	bool pass = BlockTransformationTest(FixedRoundsCipherFactory(), valdata);
    + 
    + 	cout << "\nTesting EDE2, EDE3, and XEX3 variants...\n\n";
    + 
    +-	FileSource valdata1("TestData/3desval.dat", true, new HexDecoder);
    ++	FileSource valdata1(PACKAGE_DATA_DIR "TestData/3desval.dat", true, new HexDecoder);
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(), valdata1, 1) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(), valdata1, 1) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(), valdata1, 1) && pass;
    +@@ -855,7 +855,7 @@
    + {
    + 	cout << "\nIDEA validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/ideaval.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/ideaval.dat", true, new HexDecoder);
    + 	return BlockTransformationTest(FixedRoundsCipherFactory(), valdata);
    + }
    + 
    +@@ -863,7 +863,7 @@
    + {
    + 	cout << "\nSAFER validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/saferval.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/saferval.dat", true, new HexDecoder);
    + 	bool pass = true;
    + 	pass = BlockTransformationTest(VariableRoundsCipherFactory(8,6), valdata, 4) && pass;
    + 	pass = BlockTransformationTest(VariableRoundsCipherFactory(16,12), valdata, 4) && pass;
    +@@ -876,7 +876,7 @@
    + {
    + 	cout << "\nRC2 validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/rc2val.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/rc2val.dat", true, new HexDecoder);
    + 	HexEncoder output(new FileSink(cout));
    + 	SecByteBlock plain(RC2Encryption::BLOCKSIZE), cipher(RC2Encryption::BLOCKSIZE), out(RC2Encryption::BLOCKSIZE), outplain(RC2Encryption::BLOCKSIZE);
    + 	SecByteBlock key(128);
    +@@ -1086,7 +1086,7 @@
    + {
    + 	cout << "\nRC5 validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/rc5val.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/rc5val.dat", true, new HexDecoder);
    + 	return BlockTransformationTest(VariableRoundsCipherFactory(16, 12), valdata);
    + }
    + 
    +@@ -1094,7 +1094,7 @@
    + {
    + 	cout << "\nRC6 validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/rc6val.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/rc6val.dat", true, new HexDecoder);
    + 	bool pass = true;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 2) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(24), valdata, 2) && pass;
    +@@ -1106,7 +1106,7 @@
    + {
    + 	cout << "\nMARS validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/marsval.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/marsval.dat", true, new HexDecoder);
    + 	bool pass = true;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 4) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(24), valdata, 3) && pass;
    +@@ -1118,7 +1118,7 @@
    + {
    + 	cout << "\nRijndael (AES) validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/rijndael.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/rijndael.dat", true, new HexDecoder);
    + 	bool pass = true;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 4) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(24), valdata, 3) && pass;
    +@@ -1131,7 +1131,7 @@
    + {
    + 	cout << "\nTwofish validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/twofishv.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/twofishv.dat", true, new HexDecoder);
    + 	bool pass = true;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 4) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(24), valdata, 3) && pass;
    +@@ -1143,7 +1143,7 @@
    + {
    + 	cout << "\nSerpent validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/serpentv.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/serpentv.dat", true, new HexDecoder);
    + 	bool pass = true;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 4) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(24), valdata, 3) && pass;
    +@@ -1189,7 +1189,7 @@
    + {
    + 	cout << "\n3-WAY validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/3wayval.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/3wayval.dat", true, new HexDecoder);
    + 	return BlockTransformationTest(FixedRoundsCipherFactory(), valdata);
    + }
    + 
    +@@ -1197,7 +1197,7 @@
    + {
    + 	cout << "\nGOST validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/gostval.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/gostval.dat", true, new HexDecoder);
    + 	return BlockTransformationTest(FixedRoundsCipherFactory(), valdata);
    + }
    + 
    +@@ -1205,7 +1205,7 @@
    + {
    + 	cout << "\nSHARK validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/sharkval.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/sharkval.dat", true, new HexDecoder);
    + 	return BlockTransformationTest(FixedRoundsCipherFactory(), valdata);
    + }
    + 
    +@@ -1215,14 +1215,14 @@
    + 
    + 	cout << "\nCAST-128 validation suite running...\n\n";
    + 
    +-	FileSource val128("TestData/cast128v.dat", true, new HexDecoder);
    ++	FileSource val128(PACKAGE_DATA_DIR "TestData/cast128v.dat", true, new HexDecoder);
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(16), val128, 1) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(10), val128, 1) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(5), val128, 1) && pass;
    + 
    + 	cout << "\nCAST-256 validation suite running...\n\n";
    + 
    +-	FileSource val256("TestData/cast256v.dat", true, new HexDecoder);
    ++	FileSource val256(PACKAGE_DATA_DIR "TestData/cast256v.dat", true, new HexDecoder);
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(16), val256, 1) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(24), val256, 1) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(32), val256, 1) && pass;
    +@@ -1234,7 +1234,7 @@
    + {
    + 	cout << "\nSquare validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/squareva.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/squareva.dat", true, new HexDecoder);
    + 	return BlockTransformationTest(FixedRoundsCipherFactory(), valdata);
    + }
    + 
    +@@ -1242,7 +1242,7 @@
    + {
    + 	cout << "\nSKIPJACK validation suite running...\n\n";
    + 
    +-	FileSource valdata("TestData/skipjack.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/skipjack.dat", true, new HexDecoder);
    + 	return BlockTransformationTest(FixedRoundsCipherFactory(), valdata);
    + }
    + 
    +@@ -1346,7 +1346,7 @@
    + 	cout << "\nSHACAL-2 validation suite running...\n\n";
    + 
    + 	bool pass = true;
    +-	FileSource valdata("TestData/shacal2v.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/shacal2v.dat", true, new HexDecoder);
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 4) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(64), valdata, 10) && pass;
    + 	return pass;
    +@@ -1357,7 +1357,7 @@
    + 	cout << "\nCamellia validation suite running...\n\n";
    + 
    + 	bool pass = true;
    +-	FileSource valdata("TestData/camellia.dat", true, new HexDecoder);
    ++	FileSource valdata(PACKAGE_DATA_DIR "TestData/camellia.dat", true, new HexDecoder);
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 15) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(24), valdata, 15) && pass;
    + 	pass = BlockTransformationTest(FixedRoundsCipherFactory(32), valdata, 15) && pass;
    +@@ -1368,19 +1368,19 @@
    + {
    + 	cout << "\nSalsa validation suite running...\n";
    + 
    +-	return RunTestDataFile("TestVectors/salsa.txt");
    ++	return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/salsa.txt");
    + }
    + 
    + bool ValidateSosemanuk()
    + {
    + 	cout << "\nSosemanuk validation suite running...\n";
    +-	return RunTestDataFile("TestVectors/sosemanuk.txt");
    ++	return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/sosemanuk.txt");
    + }
    + 
    + bool ValidateVMAC()
    + {
    + 	cout << "\nVMAC validation suite running...\n";
    +-	return RunTestDataFile("TestVectors/vmac.txt");
    ++	return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/vmac.txt");
    + }
    + 
    + bool ValidateCCM()
    +Index: libcrypto++/validat2.cpp
    +===================================================================
    +--- libcrypto++.orig/validat2.cpp	2009-04-07 03:08:36.000000000 +0200
    ++++ libcrypto++/validat2.cpp	2009-04-07 03:28:02.000000000 +0200
    +@@ -268,7 +268,7 @@
    + 			"\x69\x94\xac\x04\xf3\x41\xb5\x7d\x05\x20\x2d\x42\x8f\xb2\xa2\x7b"
    + 			"\x5c\x77\xdf\xd9\xb1\x5b\xfc\x3d\x55\x93\x53\x50\x34\x10\xc1\xe1";
    + 
    +-		FileSource keys("TestData/rsa512a.dat", true, new HexDecoder);
    ++		FileSource keys(PACKAGE_DATA_DIR "TestData/rsa512a.dat", true, new HexDecoder);
    + 		Weak::RSASSA_PKCS1v15_MD2_Signer rsaPriv(keys);
    + 		Weak::RSASSA_PKCS1v15_MD2_Verifier rsaPub(rsaPriv);
    + 
    +@@ -293,7 +293,7 @@
    + 		cout << "invalid signature verification\n";
    + 	}
    + 	{
    +-		FileSource keys("TestData/rsa1024.dat", true, new HexDecoder);
    ++		FileSource keys(PACKAGE_DATA_DIR "TestData/rsa1024.dat", true, new HexDecoder);
    + 		RSAES_PKCS1v15_Decryptor rsaPriv(keys);
    + 		RSAES_PKCS1v15_Encryptor rsaPub(rsaPriv);
    + 
    +@@ -320,8 +320,8 @@
    + 		bq.Put(oaepSeed, 20);
    + 		FixedRNG rng(bq);
    + 
    +-		FileSource privFile("TestData/rsa400pv.dat", true, new HexDecoder);
    +-		FileSource pubFile("TestData/rsa400pb.dat", true, new HexDecoder);
    ++		FileSource privFile(PACKAGE_DATA_DIR "TestData/rsa400pv.dat", true, new HexDecoder);
    ++		FileSource pubFile(PACKAGE_DATA_DIR "TestData/rsa400pb.dat", true, new HexDecoder);
    + 		RSAES_OAEP_SHA_Decryptor rsaPriv;
    + 		rsaPriv.AccessKey().BERDecodePrivateKey(privFile, false, 0);
    + 		RSAES_OAEP_SHA_Encryptor rsaPub(pubFile);
    +@@ -344,7 +344,7 @@
    + {
    + 	cout << "\nDH validation suite running...\n\n";
    + 
    +-	FileSource f("TestData/dh1024.dat", true, new HexDecoder());
    ++	FileSource f(PACKAGE_DATA_DIR "TestData/dh1024.dat", true, new HexDecoder());
    + 	DH dh(f);
    + 	return SimpleKeyAgreementValidate(dh);
    + }
    +@@ -353,7 +353,7 @@
    + {
    + 	cout << "\nMQV validation suite running...\n\n";
    + 
    +-	FileSource f("TestData/mqv1024.dat", true, new HexDecoder());
    ++	FileSource f(PACKAGE_DATA_DIR "TestData/mqv1024.dat", true, new HexDecoder());
    + 	MQV mqv(f);
    + 	return AuthenticatedKeyAgreementValidate(mqv);
    + }
    +@@ -362,7 +362,7 @@
    + {
    + 	cout << "\nLUC-DH validation suite running...\n\n";
    + 
    +-	FileSource f("TestData/lucd512.dat", true, new HexDecoder());
    ++	FileSource f(PACKAGE_DATA_DIR "TestData/lucd512.dat", true, new HexDecoder());
    + 	LUC_DH dh(f);
    + 	return SimpleKeyAgreementValidate(dh);
    + }
    +@@ -371,7 +371,7 @@
    + {
    + 	cout << "\nXTR-DH validation suite running...\n\n";
    + 
    +-	FileSource f("TestData/xtrdh171.dat", true, new HexDecoder());
    ++	FileSource f(PACKAGE_DATA_DIR "TestData/xtrdh171.dat", true, new HexDecoder());
    + 	XTR_DH dh(f);
    + 	return SimpleKeyAgreementValidate(dh);
    + }
    +@@ -381,7 +381,7 @@
    + 	cout << "\nElGamal validation suite running...\n\n";
    + 	bool pass = true;
    + 	{
    +-		FileSource fc("TestData/elgc1024.dat", true, new HexDecoder);
    ++		FileSource fc(PACKAGE_DATA_DIR "TestData/elgc1024.dat", true, new HexDecoder);
    + 		ElGamalDecryptor privC(fc);
    + 		ElGamalEncryptor pubC(privC);
    + 		privC.AccessKey().Precompute();
    +@@ -399,7 +399,7 @@
    + 	cout << "\nDLIES validation suite running...\n\n";
    + 	bool pass = true;
    + 	{
    +-		FileSource fc("TestData/dlie1024.dat", true, new HexDecoder);
    ++		FileSource fc(PACKAGE_DATA_DIR "TestData/dlie1024.dat", true, new HexDecoder);
    + 		DLIES<>::Decryptor privC(fc);
    + 		DLIES<>::Encryptor pubC(privC);
    + 		pass = CryptoSystemValidate(privC, pubC) && pass;
    +@@ -422,7 +422,7 @@
    + 	cout << "\nNR validation suite running...\n\n";
    + 	bool pass = true;
    + 	{
    +-		FileSource f("TestData/nr2048.dat", true, new HexDecoder);
    ++		FileSource f(PACKAGE_DATA_DIR "TestData/nr2048.dat", true, new HexDecoder);
    + 		NR::Signer privS(f);
    + 		privS.AccessKey().Precompute();
    + 		NR::Verifier pubS(privS);
    +@@ -445,7 +445,7 @@
    + 
    + 	bool pass = true, fail;
    + 	{
    +-	FileSource fs("TestData/dsa512.dat", true, new HexDecoder());
    ++	FileSource fs(PACKAGE_DATA_DIR "TestData/dsa512.dat", true, new HexDecoder());
    + 	GDSA::Signer priv(fs);
    + 	priv.AccessKey().Precompute(16);
    + 	GDSA::Verifier pub(priv);
    +@@ -487,10 +487,10 @@
    + 	fail = pub.VerifyMessage((byte *)"xyz", 3, sig, sizeof(sig));
    + 	pass = pass && !fail;
    + 	}
    +-	FileSource fs1("TestData/dsa1024.dat", true, new HexDecoder());
    ++	FileSource fs1(PACKAGE_DATA_DIR "TestData/dsa1024.dat", true, new HexDecoder());
    + 	DSA::Signer priv(fs1);
    + 	DSA::Verifier pub(priv);
    +-	FileSource fs2("TestData/dsa1024b.dat", true, new HexDecoder());
    ++	FileSource fs2(PACKAGE_DATA_DIR "TestData/dsa1024b.dat", true, new HexDecoder());
    + 	DSA::Verifier pub1(fs2);
    + 	assert(pub.GetKey() == pub1.GetKey());
    + 	pass = SignatureValidate(priv, pub, thorough) && pass;
    +@@ -503,7 +503,7 @@
    + 	bool pass=true;
    + 
    + 	{
    +-		FileSource f("TestData/luc1024.dat", true, new HexDecoder);
    ++		FileSource f(PACKAGE_DATA_DIR "TestData/luc1024.dat", true, new HexDecoder);
    + 		LUCSSA_PKCS1v15_SHA_Signer priv(f);
    + 		LUCSSA_PKCS1v15_SHA_Verifier pub(priv);
    + 		pass = SignatureValidate(priv, pub) && pass;
    +@@ -520,14 +520,14 @@
    + {
    + 	cout << "\nLUC-HMP validation suite running...\n\n";
    + 
    +-	FileSource f("TestData/lucs512.dat", true, new HexDecoder);
    ++	FileSource f(PACKAGE_DATA_DIR "TestData/lucs512.dat", true, new HexDecoder);
    + 	LUC_HMP::Signer privS(f);
    + 	LUC_HMP::Verifier pubS(privS);
    + 	bool pass = SignatureValidate(privS, pubS);
    + 
    + 	cout << "\nLUC-IES validation suite running...\n\n";
    + 
    +-	FileSource fc("TestData/lucc512.dat", true, new HexDecoder);
    ++	FileSource fc(PACKAGE_DATA_DIR "TestData/lucc512.dat", true, new HexDecoder);
    + 	LUC_IES<>::Decryptor privC(fc);
    + 	LUC_IES<>::Encryptor pubC(privC);
    + 	pass = CryptoSystemValidate(privC, pubC) && pass;
    +@@ -541,7 +541,7 @@
    + 	bool pass=true;
    + 
    + 	{
    +-		FileSource f("TestData/rabi1024.dat", true, new HexDecoder);
    ++		FileSource f(PACKAGE_DATA_DIR "TestData/rabi1024.dat", true, new HexDecoder);
    + 		RabinSS::Signer priv(f);
    + 		RabinSS::Verifier pub(priv);
    + 		pass = SignatureValidate(priv, pub) && pass;
    +@@ -558,7 +558,7 @@
    + {
    + 	cout << "\nRW validation suite running...\n\n";
    + 
    +-	FileSource f("TestData/rw1024.dat", true, new HexDecoder);
    ++	FileSource f(PACKAGE_DATA_DIR "TestData/rw1024.dat", true, new HexDecoder);
    + 	RWSS::Signer priv(f);
    + 	RWSS::Verifier pub(priv);
    + 
    +@@ -570,7 +570,7 @@
    + {
    + 	cout << "\nBlumGoldwasser validation suite running...\n\n";
    + 
    +-	FileSource f("TestData/blum512.dat", true, new HexDecoder);
    ++	FileSource f(PACKAGE_DATA_DIR "TestData/blum512.dat", true, new HexDecoder);
    + 	BlumGoldwasserPrivateKey priv(f);
    + 	BlumGoldwasserPublicKey pub(priv);
    + 
    +@@ -740,7 +740,7 @@
    + 		"\x74\x02\x37\x0E\xED\x0A\x06\xAD\xF4\x15\x65\xB8\xE1\xD1\x45\xAE\x39\x19\xB4\xFF\x5D\xF1\x45\x7B\xE0\xFE\x72\xED\x11\x92\x8F\x61\x41\x4F\x02\x00\xF2\x76\x6F\x7C"
    + 		"\x79\xA2\xE5\x52\x20\x5D\x97\x5E\xFE\x39\xAE\x21\x10\xFB\x35\xF4\x80\x81\x41\x13\xDD\xE8\x5F\xCA\x1E\x4F\xF8\x9B\xB2\x68\xFB\x28";
    + 
    +-	FileSource keys("TestData/esig1536.dat", true, new HexDecoder);
    ++	FileSource keys(PACKAGE_DATA_DIR "TestData/esig1536.dat", true, new HexDecoder);
    + 	ESIGN::Signer signer(keys);
    + 	ESIGN::Verifier verifier(signer);
    + 
    +Index: libcrypto++/validat3.cpp
    +===================================================================
    +--- libcrypto++.orig/validat3.cpp	2009-04-07 03:08:36.000000000 +0200
    ++++ libcrypto++/validat3.cpp	2009-04-07 03:29:42.000000000 +0200
    +@@ -365,14 +365,14 @@
    + {
    + 	cout << "\nPanama validation suite running...\n";
    + 
    +-	return RunTestDataFile("TestVectors/panama.txt");
    ++	return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/panama.txt");
    + }
    + 
    + bool ValidateWhirlpool()
    + {
    + 	cout << "\nWhirlpool Hash Function validation suite running...\n";
    + 
    +-	return RunTestDataFile("TestVectors/whrlpool.txt");
    ++	return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/whrlpool.txt");
    + }
    + 
    + #ifdef CRYPTOPP_REMOVED
    diff --git a/libs/libcrypto++/patches/003-autoconf_files.patch b/libs/libcrypto++/patches/003-autoconf_files.patch
    new file mode 100644
    index 0000000..16ea3ff
    --- /dev/null
    +++ b/libs/libcrypto++/patches/003-autoconf_files.patch
    @@ -0,0 +1,822 @@
    +--- /dev/null	2009-09-20 12:09:29.503935207 +0200
    ++++ debian/configure.ac	2009-09-20 18:51:50.000000000 +0200
    +@@ -0,0 +1,43 @@
    ++# -*- autoconf -*-
    ++# Process this file with autoconf to produce a configure script.
    ++# Written by Jens Peter Secher .
    ++
    ++AC_INIT([Crypto++], [5.6.0], [libcrypto++@bugs.debian.org])
    ++AC_CONFIG_SRCDIR([cryptlib.h])
    ++AC_CONFIG_HEADERS([cryptopp_config.h])
    ++AC_CONFIG_HEADERS([config.h])
    ++AM_INIT_AUTOMAKE([foreign])
    ++AM_MAINTAINER_MODE
    ++
    ++# Checks for programs.
    ++AC_PROG_CXX
    ++AC_PROG_CC
    ++AC_PROG_LN_S
    ++AC_PROG_LIBTOOL
    ++
    ++# Checks for header files.
    ++AC_HEADER_STDC
    ++AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h malloc.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])
    ++
    ++# Checks for typedefs, structures, and compiler characteristics.
    ++AC_HEADER_STDBOOL
    ++AC_C_CONST
    ++AC_C_INLINE
    ++AC_TYPE_SIZE_T
    ++AC_HEADER_TIME
    ++AC_CHECK_TYPES([ptrdiff_t])
    ++AC_C_BIGENDIAN(
    ++	AC_DEFINE(IS_BIG_ENDIAN, [], [Big-endian architecture]),
    ++	AC_DEFINE(IS_LITTLE_ENDIAN, [], [Little-endian architecture]),
    ++	AC_MSG_ERROR([Can't tell endianess of platform]))
    ++
    ++# Checks for library functions.
    ++AC_PROG_GCC_TRADITIONAL
    ++AC_FUNC_MALLOC
    ++AC_FUNC_MEMCMP
    ++AC_FUNC_SELECT_ARGTYPES
    ++AC_TYPE_SIGNAL
    ++AC_CHECK_FUNCS([gethostbyname gettimeofday memmove memset pow select socket])
    ++
    ++AC_CONFIG_FILES([Makefile libcrypto++.pc])
    ++AC_OUTPUT
    +--- /dev/null	2009-09-20 12:09:29.503935207 +0200
    ++++ debian/Makefile.am	2009-09-20 18:51:50.000000000 +0200
    +@@ -0,0 +1,303 @@
    ++## Process this file with automake to produce Makefile.in
    ++# Written by Jens Peter Secher .
    ++
    ++# Build two versions of cryptest, one that uses data files from the
    ++# current working directory, and one that uses data files from
    ++# /usr/share/crypto++.  The former is for running the test suite at
    ++# build time, the latter is included in the package.
    ++
    ++# To test against newest GCC, uncomment the following two lines.
    ++#CXX = /usr/lib/gcc-snapshot/bin/g++
    ++#CXXCPP = /usr/lib/gcc-snapshot/bin/g++
    ++
    ++bin_PROGRAMS = cryptest cryptestcwd
    ++cryptest_CXXFLAGS = -DPACKAGE_DATA_DIR='"/usr/share/crypto++/"'
    ++cryptest_SOURCES = \
    ++	bench.cpp \
    ++	bench2.cpp \
    ++	datatest.cpp \
    ++	dlltest.cpp \
    ++	fipsalgt.cpp \
    ++	regtest.cpp \
    ++	test.cpp \
    ++	validat1.cpp \
    ++	validat2.cpp \
    ++	validat3.cpp
    ++cryptest_LDADD = libcrypto++.la
    ++cryptestcwd_CXXFLAGS = -DPACKAGE_DATA_DIR='""'
    ++cryptestcwd_SOURCES = \
    ++	bench.cpp \
    ++	bench2.cpp \
    ++	datatest.cpp \
    ++	dlltest.cpp \
    ++	fipsalgt.cpp \
    ++	regtest.cpp \
    ++	test.cpp \
    ++	validat1.cpp \
    ++	validat2.cpp \
    ++	validat3.cpp
    ++cryptestcwd_LDADD = libcrypto++.la
    ++
    ++lib_LTLIBRARIES = libcrypto++.la
    ++libcrypto___la_LDFLAGS = -version-info 8:0:0
    ++libcrypto___la_SOURCES = \
    ++	3way.cpp \
    ++	adler32.cpp \
    ++	algebra.cpp \
    ++	algparam.cpp \
    ++	arc4.cpp \
    ++	asn.cpp	\
    ++	authenc.cpp \
    ++	base32.cpp \
    ++	base64.cpp \
    ++	basecode.cpp \
    ++	bfinit.cpp \
    ++	blowfish.cpp \
    ++	blumshub.cpp \
    ++	camellia.cpp \
    ++	cast.cpp \
    ++	casts.cpp \
    ++	cbcmac.cpp \
    ++	ccm.cpp \
    ++	channels.cpp \
    ++	cmac.cpp \
    ++	cpu.cpp \
    ++	crc.cpp \
    ++	cryptlib.cpp \
    ++	default.cpp \
    ++	des.cpp \
    ++	dessp.cpp \
    ++	dh2.cpp \
    ++	dh.cpp \
    ++	dll.cpp \
    ++	dsa.cpp \
    ++	eax.cpp \
    ++	ec2n.cpp \
    ++	eccrypto.cpp \
    ++	ecp.cpp \
    ++	elgamal.cpp \
    ++	emsa2.cpp \
    ++	eprecomp.cpp \
    ++	esign.cpp \
    ++	files.cpp \
    ++	filters.cpp \
    ++	fips140.cpp \
    ++	fipstest.cpp \
    ++	gcm.cpp \
    ++	gf2_32.cpp \
    ++	gf256.cpp \
    ++	gf2n.cpp \
    ++	gfpcrypt.cpp \
    ++	gost.cpp \
    ++	gzip.cpp \
    ++	hex.cpp \
    ++	hmac.cpp \
    ++	hrtimer.cpp \
    ++	ida.cpp \
    ++	idea.cpp \
    ++	integer.cpp \
    ++	iterhash.cpp \
    ++	luc.cpp \
    ++	mars.cpp \
    ++	marss.cpp \
    ++	md2.cpp \
    ++	md4.cpp \
    ++	md5.cpp \
    ++	misc.cpp \
    ++	modes.cpp \
    ++	mqueue.cpp \
    ++	mqv.cpp \
    ++	nbtheory.cpp \
    ++	network.cpp \
    ++	oaep.cpp \
    ++	osrng.cpp \
    ++	panama.cpp \
    ++	pch.cpp \
    ++	pkcspad.cpp \
    ++	polynomi.cpp \
    ++	pssr.cpp \
    ++	pubkey.cpp \
    ++	queue.cpp \
    ++	rabin.cpp \
    ++	randpool.cpp \
    ++	rc2.cpp \
    ++	rc5.cpp \
    ++	rc6.cpp \
    ++	rdtables.cpp \
    ++	rijndael.cpp \
    ++	ripemd.cpp \
    ++	rng.cpp \
    ++	rsa.cpp \
    ++	rw.cpp \
    ++	safer.cpp \
    ++	salsa.cpp \
    ++	seal.cpp \
    ++	seed.cpp \
    ++	serpent.cpp \
    ++	shacal2.cpp \
    ++	sha.cpp \
    ++	sharkbox.cpp \
    ++	shark.cpp \
    ++	simple.cpp \
    ++	skipjack.cpp \
    ++	socketft.cpp \
    ++	sosemanuk.cpp \
    ++	square.cpp \
    ++	squaretb.cpp \
    ++	strciphr.cpp \
    ++	tea.cpp \
    ++	tftables.cpp \
    ++	tiger.cpp \
    ++	tigertab.cpp \
    ++	trdlocal.cpp \
    ++	ttmac.cpp \
    ++	twofish.cpp \
    ++	vmac.cpp \
    ++	wait.cpp \
    ++	wake.cpp \
    ++	whrlpool.cpp \
    ++	winpipes.cpp \
    ++	xtr.cpp \
    ++	xtrcrypt.cpp \
    ++	zdeflate.cpp \
    ++	zinflate.cpp \
    ++	zlib.cpp
    ++
    ++pkginclude_HEADERS = \
    ++	3way.h \
    ++	adler32.h \
    ++	aes.h \
    ++	algebra.h \
    ++	algparam.h \
    ++	arc4.h \
    ++	argnames.h \
    ++	asn.h \
    ++	authenc.h \
    ++	base32.h \
    ++	base64.h \
    ++	basecode.h \
    ++	bench.h \
    ++	blowfish.h \
    ++	blumshub.h \
    ++	camellia.h \
    ++	cast.h \
    ++	cbcmac.h \
    ++	ccm.h \
    ++	channels.h \
    ++	cmac.h \
    ++	config.h \
    ++	cpu.h \
    ++	crc.h \
    ++	cryptlib.h \
    ++	default.h \
    ++	des.h \
    ++	dh2.h \
    ++	dh.h \
    ++	dll.h \
    ++	dmac.h \
    ++	dsa.h \
    ++	eax.h \
    ++	ec2n.h \
    ++	eccrypto.h \
    ++	ecp.h \
    ++	elgamal.h \
    ++	emsa2.h \
    ++	eprecomp.h \
    ++	esign.h \
    ++	factory.h \
    ++	files.h \
    ++	filters.h \
    ++	fips140.h \
    ++	fltrimpl.h \
    ++	gcm.h \
    ++	gf2_32.h \
    ++	gf256.h \
    ++	gf2n.h \
    ++	gfpcrypt.h \
    ++	gost.h \
    ++	gzip.h \
    ++	hex.h \
    ++	hmac.h \
    ++	hrtimer.h \
    ++	ida.h \
    ++	idea.h \
    ++	integer.h \
    ++	iterhash.h \
    ++	lubyrack.h \
    ++	luc.h \
    ++	mars.h \
    ++	md2.h \
    ++	md4.h \
    ++	md5.h \
    ++	mdc.h \
    ++	misc.h \
    ++	modarith.h \
    ++	modes.h	 \
    ++	modexppc.h \
    ++	mqueue.h \
    ++	mqv.h \
    ++	nbtheory.h \
    ++	network.h \
    ++	nr.h \
    ++	oaep.h \
    ++	oids.h \
    ++	osrng.h \
    ++	panama.h \
    ++	pch.h \
    ++	pkcspad.h \
    ++	polynomi.h \
    ++	pssr.h \
    ++	pubkey.h \
    ++	pwdbased.h \
    ++	queue.h \
    ++	rabin.h \
    ++	randpool.h \
    ++	rc2.h \
    ++	rc5.h \
    ++	rc6.h \
    ++	rijndael.h \
    ++	ripemd.h \
    ++	rng.h \
    ++	rsa.h \
    ++	rw.h \
    ++	safer.h \
    ++	salsa.h \
    ++	seal.h \
    ++	secblock.h \
    ++	seckey.h \
    ++	seed.h \
    ++	serpent.h \
    ++	serpentp.h \
    ++	shacal2.h \
    ++	sha.h \
    ++	shark.h \
    ++	simple.h \
    ++	skipjack.h \
    ++	smartptr.h \
    ++	socketft.h \
    ++	sosemanuk.h \
    ++	square.h \
    ++	stdcpp.h \
    ++	strciphr.h \
    ++	tea.h \
    ++	tiger.h \
    ++	trdlocal.h \
    ++	trunhash.h \
    ++	ttmac.h \
    ++	twofish.h \
    ++	vmac.h \
    ++	wait.h \
    ++	wake.h \
    ++	whrlpool.h \
    ++	winpipes.h \
    ++	words.h \
    ++	xtr.h \
    ++	xtrcrypt.h \
    ++	zdeflate.h \
    ++	zinflate.h \
    ++	zlib.h
    ++
    ++htmldir = $(datadir)/html
    ++
    ++html: $(libcrypto___la_SOURCES)
    ++	doxygen
    +--- /dev/null	2009-09-20 12:09:29.503935207 +0200
    ++++ debian/config.h.in	2009-09-20 18:51:50.000000000 +0200
    +@@ -0,0 +1,452 @@
    ++// Debian note: This is a copy of the original config.h file except for the two
    ++// endianness undefs below; they are substituted by the autoconf process
    ++// according to the build architecture.
    ++
    ++#ifndef CRYPTOPP_CONFIG_H
    ++#define CRYPTOPP_CONFIG_H
    ++
    ++// ***************** Important Settings ********************
    ++
    ++// Endianness
    ++#undef IS_BIG_ENDIAN
    ++#undef IS_LITTLE_ENDIAN
    ++
    ++// define this if you want to disable all OS-dependent features,
    ++// such as sockets and OS-provided random number generators
    ++// #define NO_OS_DEPENDENCE
    ++
    ++// Define this to use features provided by Microsoft's CryptoAPI.
    ++// Currently the only feature used is random number generation.
    ++// This macro will be ignored if NO_OS_DEPENDENCE is defined.
    ++#define USE_MS_CRYPTOAPI
    ++
    ++// Define this to 1 to enforce the requirement in FIPS 186-2 Change Notice 1 that only 1024 bit moduli be used
    ++#ifndef DSA_1024_BIT_MODULUS_ONLY
    ++#	define DSA_1024_BIT_MODULUS_ONLY 1
    ++#endif
    ++
    ++// ***************** Less Important Settings ***************
    ++
    ++// define this to retain (as much as possible) old deprecated function and class names
    ++// #define CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY
    ++
    ++#define GZIP_OS_CODE 0
    ++
    ++// Try this if your CPU has 256K internal cache or a slow multiply instruction
    ++// and you want a (possibly) faster IDEA implementation using log tables
    ++// #define IDEA_LARGECACHE
    ++
    ++// Define this if, for the linear congruential RNG, you want to use
    ++// the original constants as specified in S.K. Park and K.W. Miller's
    ++// CACM paper.
    ++// #define LCRNG_ORIGINAL_NUMBERS
    ++
    ++// choose which style of sockets to wrap (mostly useful for cygwin which has both)
    ++#define PREFER_BERKELEY_STYLE_SOCKETS
    ++// #define PREFER_WINDOWS_STYLE_SOCKETS
    ++
    ++// set the name of Rijndael cipher, was "Rijndael" before version 5.3
    ++#define CRYPTOPP_RIJNDAEL_NAME "AES"
    ++
    ++// ***************** Important Settings Again ********************
    ++// But the defaults should be ok.
    ++
    ++// namespace support is now required
    ++#ifdef NO_NAMESPACE
    ++#	error namespace support is now required
    ++#endif
    ++
    ++// Define this to workaround a Microsoft CryptoAPI bug where
    ++// each call to CryptAcquireContext causes a 100 KB memory leak.
    ++// Defining this will cause Crypto++ to make only one call to CryptAcquireContext.
    ++#define WORKAROUND_MS_BUG_Q258000
    ++
    ++#ifdef CRYPTOPP_DOXYGEN_PROCESSING
    ++// Avoid putting "CryptoPP::" in front of everything in Doxygen output
    ++#	define CryptoPP
    ++#	define NAMESPACE_BEGIN(x)
    ++#	define NAMESPACE_END
    ++// Get Doxygen to generate better documentation for these typedefs
    ++#	define DOCUMENTED_TYPEDEF(x, y) class y : public x {};
    ++#else
    ++#	define NAMESPACE_BEGIN(x) namespace x {
    ++#	define NAMESPACE_END }
    ++#	define DOCUMENTED_TYPEDEF(x, y) typedef x y;
    ++#endif
    ++#define ANONYMOUS_NAMESPACE_BEGIN namespace {
    ++#define USING_NAMESPACE(x) using namespace x;
    ++#define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x {
    ++#define DOCUMENTED_NAMESPACE_END }
    ++
    ++// What is the type of the third parameter to bind?
    ++// For Unix, the new standard is ::socklen_t (typically unsigned int), and the old standard is int.
    ++// Unfortunately there is no way to tell whether or not socklen_t is defined.
    ++// To work around this, TYPE_OF_SOCKLEN_T is a macro so that you can change it from the makefile.
    ++#ifndef TYPE_OF_SOCKLEN_T
    ++#	if defined(_WIN32) || defined(__CYGWIN__)
    ++#		define TYPE_OF_SOCKLEN_T int
    ++#	else
    ++#		define TYPE_OF_SOCKLEN_T ::socklen_t
    ++#	endif
    ++#endif
    ++
    ++#if defined(__CYGWIN__) && defined(PREFER_WINDOWS_STYLE_SOCKETS)
    ++#	define __USE_W32_SOCKETS
    ++#endif
    ++
    ++typedef unsigned char byte;		// put in global namespace to avoid ambiguity with other byte typedefs
    ++
    ++NAMESPACE_BEGIN(CryptoPP)
    ++
    ++typedef unsigned short word16;
    ++typedef unsigned int word32;
    ++
    ++#if defined(_MSC_VER) || defined(__BORLANDC__)
    ++	typedef unsigned __int64 word64;
    ++	#define W64LIT(x) x##ui64
    ++#else
    ++	typedef unsigned long long word64;
    ++	#define W64LIT(x) x##ULL
    ++#endif
    ++
    ++// define large word type, used for file offsets and such
    ++typedef word64 lword;
    ++const lword LWORD_MAX = W64LIT(0xffffffffffffffff);
    ++
    ++#ifdef __GNUC__
    ++	#define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
    ++#endif
    ++
    ++// define hword, word, and dword. these are used for multiprecision integer arithmetic
    ++// Intel compiler won't have _umul128 until version 10.0. See http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30231625.aspx
    ++#if (defined(_MSC_VER) && (!defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1000) && (defined(_M_X64) || defined(_M_IA64))) || (defined(__DECCXX) && defined(__alpha__)) || (defined(__INTEL_COMPILER) && defined(__x86_64__)) || (defined(__SUNPRO_CC) && defined(__x86_64__))
    ++	typedef word32 hword;
    ++	typedef word64 word;
    ++#else
    ++	#define CRYPTOPP_NATIVE_DWORD_AVAILABLE
    ++	#if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || defined(__x86_64__) || defined(__mips64) || defined(__sparc64__)
    ++		#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !(CRYPTOPP_GCC_VERSION == 40001 && defined(__APPLE__)) && CRYPTOPP_GCC_VERSION >= 30400
    ++			// GCC 4.0.1 on MacOS X is missing __umodti3 and __udivti3
    ++			// mode(TI) division broken on amd64 with GCC earlier than GCC 3.4
    ++			typedef word32 hword;
    ++			typedef word64 word;
    ++			typedef __uint128_t dword;
    ++			typedef __uint128_t word128;
    ++			#define CRYPTOPP_WORD128_AVAILABLE
    ++		#else
    ++			// if we're here, it means we're on a 64-bit CPU but we don't have a way to obtain 128-bit multiplication results
    ++			typedef word16 hword;
    ++			typedef word32 word;
    ++			typedef word64 dword;
    ++		#endif
    ++	#else
    ++		// being here means the native register size is probably 32 bits or less
    ++		#define CRYPTOPP_BOOL_SLOW_WORD64 1
    ++		typedef word16 hword;
    ++		typedef word32 word;
    ++		typedef word64 dword;
    ++	#endif
    ++#endif
    ++#ifndef CRYPTOPP_BOOL_SLOW_WORD64
    ++	#define CRYPTOPP_BOOL_SLOW_WORD64 0
    ++#endif
    ++
    ++const unsigned int WORD_SIZE = sizeof(word);
    ++const unsigned int WORD_BITS = WORD_SIZE * 8;
    ++
    ++NAMESPACE_END
    ++
    ++#ifndef CRYPTOPP_L1_CACHE_LINE_SIZE
    ++	// This should be a lower bound on the L1 cache line size. It's used for defense against timing attacks.
    ++	#if defined(_M_X64) || defined(__x86_64__)
    ++		#define CRYPTOPP_L1_CACHE_LINE_SIZE 64
    ++	#else
    ++		// L1 cache line size is 32 on Pentium III and earlier
    ++		#define CRYPTOPP_L1_CACHE_LINE_SIZE 32
    ++	#endif
    ++#endif
    ++
    ++#if defined(_MSC_VER)
    ++	#if _MSC_VER == 1200
    ++		#include 
    ++	#endif
    ++	#if _MSC_VER > 1200 || defined(_mm_free)
    ++		#define CRYPTOPP_MSVC6PP_OR_LATER		// VC 6 processor pack or later
    ++	#else
    ++		#define CRYPTOPP_MSVC6_NO_PP			// VC 6 without processor pack
    ++	#endif
    ++#endif
    ++
    ++#ifndef CRYPTOPP_ALIGN_DATA
    ++	#if defined(CRYPTOPP_MSVC6PP_OR_LATER)
    ++		#define CRYPTOPP_ALIGN_DATA(x) __declspec(align(x))
    ++	#elif defined(__GNUC__)
    ++		#define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x)))
    ++	#else
    ++		#define CRYPTOPP_ALIGN_DATA(x)
    ++	#endif
    ++#endif
    ++
    ++#ifndef CRYPTOPP_SECTION_ALIGN16
    ++	#if defined(__GNUC__) && !defined(__APPLE__)
    ++		// the alignment attribute doesn't seem to work without this section attribute when -fdata-sections is turned on
    ++		#define CRYPTOPP_SECTION_ALIGN16 __attribute__((section ("CryptoPP_Align16")))
    ++	#else
    ++		#define CRYPTOPP_SECTION_ALIGN16
    ++	#endif
    ++#endif
    ++
    ++#if defined(_MSC_VER) || defined(__fastcall)
    ++	#define CRYPTOPP_FASTCALL __fastcall
    ++#else
    ++	#define CRYPTOPP_FASTCALL
    ++#endif
    ++
    ++// VC60 workaround: it doesn't allow typename in some places
    ++#if defined(_MSC_VER) && (_MSC_VER < 1300)
    ++#define CPP_TYPENAME
    ++#else
    ++#define CPP_TYPENAME typename
    ++#endif
    ++
    ++// VC60 workaround: can't cast unsigned __int64 to float or double
    ++#if defined(_MSC_VER) && !defined(CRYPTOPP_MSVC6PP_OR_LATER)
    ++#define CRYPTOPP_VC6_INT64 (__int64)
    ++#else
    ++#define CRYPTOPP_VC6_INT64
    ++#endif
    ++
    ++#ifdef _MSC_VER
    ++#define CRYPTOPP_NO_VTABLE __declspec(novtable)
    ++#else
    ++#define CRYPTOPP_NO_VTABLE
    ++#endif
    ++
    ++#ifdef _MSC_VER
    ++	// 4231: nonstandard extension used : 'extern' before template explicit instantiation
    ++	// 4250: dominance
    ++	// 4251: member needs to have dll-interface
    ++	// 4275: base needs to have dll-interface
    ++	// 4660: explicitly instantiating a class that's already implicitly instantiated
    ++	// 4661: no suitable definition provided for explicit template instantiation request
    ++	// 4786: identifer was truncated in debug information
    ++	// 4355: 'this' : used in base member initializer list
    ++	// 4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
    ++#	pragma warning(disable: 4231 4250 4251 4275 4660 4661 4786 4355 4910)
    ++#endif
    ++
    ++#ifdef __BORLANDC__
    ++// 8037: non-const function called for const object. needed to work around BCB2006 bug
    ++#	pragma warn -8037
    ++#endif
    ++
    ++#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || defined(_STLPORT_VERSION)
    ++#define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
    ++#endif
    ++
    ++#ifndef CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
    ++#define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE
    ++#endif
    ++
    ++#ifdef CRYPTOPP_DISABLE_X86ASM		// for backwards compatibility: this macro had both meanings
    ++#define CRYPTOPP_DISABLE_ASM
    ++#define CRYPTOPP_DISABLE_SSE2
    ++#endif
    ++
    ++#if !defined(CRYPTOPP_DISABLE_ASM) && ((defined(_MSC_VER) && defined(_M_IX86)) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))))
    ++	#define CRYPTOPP_X86_ASM_AVAILABLE
    ++
    ++	#if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || CRYPTOPP_GCC_VERSION >= 30300)
    ++		#define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 1
    ++	#else
    ++		#define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 0
    ++	#endif
    ++
    ++	// SSSE3 was actually introduced in GNU as 2.17, which was released 6/23/2006, but we can't tell what version of binutils is installed.
    ++	// GCC 4.1.2 was released on 2/13/2007, so we'll use that as a proxy for the binutils version.
    ++	#if !defined(CRYPTOPP_DISABLE_SSSE3) && (_MSC_VER >= 1400 || CRYPTOPP_GCC_VERSION >= 40102)
    ++		#define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 1
    ++	#else
    ++		#define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 0
    ++	#endif
    ++#endif
    ++
    ++#if !defined(CRYPTOPP_DISABLE_ASM) && defined(_MSC_VER) && defined(_M_X64)
    ++	#define CRYPTOPP_X64_MASM_AVAILABLE
    ++#endif
    ++
    ++#if !defined(CRYPTOPP_DISABLE_ASM) && defined(__GNUC__) && defined(__x86_64__)
    ++	#define CRYPTOPP_X64_ASM_AVAILABLE
    ++#endif
    ++
    ++#if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || defined(__SSE2__))
    ++	#define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 1
    ++#else
    ++	#define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 0
    ++#endif
    ++
    ++#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
    ++	#define CRYPTOPP_BOOL_ALIGN16_ENABLED 1
    ++#else
    ++	#define CRYPTOPP_BOOL_ALIGN16_ENABLED 0
    ++#endif
    ++
    ++// how to allocate 16-byte aligned memory (for SSE2)
    ++#if defined(CRYPTOPP_MSVC6PP_OR_LATER)
    ++	#define CRYPTOPP_MM_MALLOC_AVAILABLE
    ++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
    ++	#define CRYPTOPP_MALLOC_ALIGNMENT_IS_16
    ++#elif defined(__linux__) || defined(__sun__) || defined(__CYGWIN__)
    ++	#define CRYPTOPP_MEMALIGN_AVAILABLE
    ++#else
    ++	#define CRYPTOPP_NO_ALIGNED_ALLOC
    ++#endif
    ++
    ++// how to disable inlining
    ++#if defined(_MSC_VER) && _MSC_VER >= 1300
    ++#	define CRYPTOPP_NOINLINE_DOTDOTDOT
    ++#	define CRYPTOPP_NOINLINE __declspec(noinline)
    ++#elif defined(__GNUC__)
    ++#	define CRYPTOPP_NOINLINE_DOTDOTDOT
    ++#	define CRYPTOPP_NOINLINE __attribute__((noinline))
    ++#else
    ++#	define CRYPTOPP_NOINLINE_DOTDOTDOT ...
    ++#	define CRYPTOPP_NOINLINE 
    ++#endif
    ++
    ++// how to declare class constants
    ++#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__INTEL_COMPILER)
    ++#	define CRYPTOPP_CONSTANT(x) enum {x};
    ++#else
    ++#	define CRYPTOPP_CONSTANT(x) static const int x;
    ++#endif
    ++
    ++#if defined(_M_X64) || defined(__x86_64__)
    ++	#define CRYPTOPP_BOOL_X64 1
    ++#else
    ++	#define CRYPTOPP_BOOL_X64 0
    ++#endif
    ++
    ++// see http://predef.sourceforge.net/prearch.html
    ++#if defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(_X86_) || defined(__I86__) || defined(__INTEL__)
    ++	#define CRYPTOPP_BOOL_X86 1
    ++#else
    ++	#define CRYPTOPP_BOOL_X86 0
    ++#endif
    ++
    ++#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86 || defined(__powerpc__)
    ++	#define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
    ++#endif
    ++
    ++#define CRYPTOPP_VERSION 560
    ++
    ++// ***************** determine availability of OS features ********************
    ++
    ++#ifndef NO_OS_DEPENDENCE
    ++
    ++#if defined(_WIN32) || defined(__CYGWIN__)
    ++#define CRYPTOPP_WIN32_AVAILABLE
    ++#endif
    ++
    ++#if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__) || defined(__sun)
    ++#define CRYPTOPP_UNIX_AVAILABLE
    ++#endif
    ++
    ++#if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)
    ++#	define HIGHRES_TIMER_AVAILABLE
    ++#endif
    ++
    ++#ifdef CRYPTOPP_UNIX_AVAILABLE
    ++#	define HAS_BERKELEY_STYLE_SOCKETS
    ++#endif
    ++
    ++#ifdef CRYPTOPP_WIN32_AVAILABLE
    ++#	define HAS_WINDOWS_STYLE_SOCKETS
    ++#endif
    ++
    ++#if defined(HIGHRES_TIMER_AVAILABLE) && (defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(HAS_WINDOWS_STYLE_SOCKETS))
    ++#	define SOCKETS_AVAILABLE
    ++#endif
    ++
    ++#if defined(HAS_WINDOWS_STYLE_SOCKETS) && (!defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(PREFER_WINDOWS_STYLE_SOCKETS))
    ++#	define USE_WINDOWS_STYLE_SOCKETS
    ++#else
    ++#	define USE_BERKELEY_STYLE_SOCKETS
    ++#endif
    ++
    ++#if defined(HIGHRES_TIMER_AVAILABLE) && defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(USE_BERKELEY_STYLE_SOCKETS)
    ++#	define WINDOWS_PIPES_AVAILABLE
    ++#endif
    ++
    ++#if defined(CRYPTOPP_WIN32_AVAILABLE) && defined(USE_MS_CRYPTOAPI)
    ++#	define NONBLOCKING_RNG_AVAILABLE
    ++#	define OS_RNG_AVAILABLE
    ++#endif
    ++
    ++#if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
    ++#	define NONBLOCKING_RNG_AVAILABLE
    ++#	define BLOCKING_RNG_AVAILABLE
    ++#	define OS_RNG_AVAILABLE
    ++#	define HAS_PTHREADS
    ++#	define THREADS_AVAILABLE
    ++#endif
    ++
    ++#ifdef CRYPTOPP_WIN32_AVAILABLE
    ++#	define HAS_WINTHREADS
    ++#	define THREADS_AVAILABLE
    ++#endif
    ++
    ++#endif	// NO_OS_DEPENDENCE
    ++
    ++// ***************** DLL related ********************
    ++
    ++#ifdef CRYPTOPP_WIN32_AVAILABLE
    ++
    ++#ifdef CRYPTOPP_EXPORTS
    ++#define CRYPTOPP_IS_DLL
    ++#define CRYPTOPP_DLL __declspec(dllexport)
    ++#elif defined(CRYPTOPP_IMPORTS)
    ++#define CRYPTOPP_IS_DLL
    ++#define CRYPTOPP_DLL __declspec(dllimport)
    ++#else
    ++#define CRYPTOPP_DLL
    ++#endif
    ++
    ++#define CRYPTOPP_API __cdecl
    ++
    ++#else	// CRYPTOPP_WIN32_AVAILABLE
    ++
    ++#define CRYPTOPP_DLL
    ++#define CRYPTOPP_API
    ++
    ++#endif	// CRYPTOPP_WIN32_AVAILABLE
    ++
    ++#if defined(__MWERKS__)
    ++#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL
    ++#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
    ++#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
    ++#else
    ++#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL
    ++#endif
    ++
    ++#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_IMPORTS)
    ++#define CRYPTOPP_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
    ++#else
    ++#define CRYPTOPP_DLL_TEMPLATE_CLASS CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS
    ++#endif
    ++
    ++#if defined(__MWERKS__)
    ++#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern class
    ++#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
    ++#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS template class
    ++#else
    ++#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern template class
    ++#endif
    ++
    ++#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_EXPORTS)
    ++#define CRYPTOPP_STATIC_TEMPLATE_CLASS template class
    ++#else
    ++#define CRYPTOPP_STATIC_TEMPLATE_CLASS CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS
    ++#endif
    ++
    ++#endif
    +--- /dev/null	2009-09-20 12:09:29.503935207 +0200
    ++++ debian/libcrypto++.pc.in	2009-09-20 18:51:50.000000000 +0200
    +@@ -0,0 +1,12 @@
    ++prefix=@prefix@
    ++exec_prefix=@exec_prefix@
    ++libdir=@libdir@
    ++includedir=@includedir@
    ++
    ++Name: libcrypto++
    ++Description: General purpose cryptographic shared library
    ++URL: http://www.cryptopp.com
    ++Version: @VERSION@
    ++Requires:
    ++Libs: -lcrypto++
    ++Cflags:
    diff --git a/libs/libcunit/Makefile b/libs/libcunit/Makefile
    new file mode 100644
    index 0000000..7cec339
    --- /dev/null
    +++ b/libs/libcunit/Makefile
    @@ -0,0 +1,71 @@
    +# 
    +# Copyright (C) 2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libcunit
    +PKG_VERSION:=2.1-0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=CUnit-$(PKG_VERSION)-src.tar.gz
    +PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/cunit/CUnit/$(PKG_VERSION)
    +PKG_MD5SUM:=f4f53d2c41e9315a91b4f14a1706fe4f
    +PKG_BUILD_DIR:=$(BUILD_DIR)/CUnit-$(PKG_VERSION)
    +
    +PKG_FIXUP:=autoreconf
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libcunit
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Unit testing framework for C
    +  URL:=http://cunit.sourceforge.net/
    +endef
    +
    +define Package/libcunit/description
    +  CUnit, lightweight unit testing for C
    +  CUnit is a lightweight system for writing, administering, and running unit
    +  tests in C.  It provides C programmers a basic testing functionality with a
    +  flexible variety of user interfaces.
    +endef
    +
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		, \
    +		BUILD_CC="$(TARGET_CC)" \
    +		HOSTCC="$(HOSTCC)" \
    +	)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		CCOPT="$(TARGET_CFLAGS)" \
    +		LDFLAGS="$(TARGET_LDFLAGS)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		install
    +endef
    +
    +
    +define Build/InstallDev
    +	mkdir -p $(1)/usr/include/CUnit
    +	$(CP)	$(PKG_INSTALL_DIR)/usr/include/CUnit/* \
    +		$(1)/usr/include/CUnit
    +
    +	mkdir -p $(1)/usr/lib
    +	$(CP)	$(PKG_INSTALL_DIR)/usr/lib/libcunit.* \
    +		$(1)/usr/lib
    +endef
    +
    +
    +define Package/libcunit/install
    +	$(INSTALL_DIR)	$(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcunit.* $(1)/usr/lib
    +endef
    +
    +
    +$(eval $(call BuildPackage,libcunit))
    diff --git a/libs/libdaemon/Makefile b/libs/libdaemon/Makefile
    new file mode 100644
    index 0000000..68e3e36
    --- /dev/null
    +++ b/libs/libdaemon/Makefile
    @@ -0,0 +1,70 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libdaemon
    +PKG_VERSION:=0.14
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://0pointer.de/lennart/projects/libdaemon/
    +PKG_MD5SUM:=509dc27107c21bcd9fbf2f95f5669563
    +
    +PKG_FIXUP:=autoreconf
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libdaemon
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=A lightweight C library that eases the writing of UNIX daemons
    +  URL:=http://0pointer.de/lennart/projects/libdaemon/
    +endef
    +
    +define Package/libdaemon/description
    +	libdaemon is a lightweight C library that eases the writing of UNIX daemons.
    +	It consists of the following parts:
    +	- A wrapper around fork() which does the correct daemonization procedure of a process
    +	- A wrapper around syslog() for simpler and compatible log output to Syslog or STDERR
    +	- An API for writing PID files
    +	- An API for serializing UNIX signals into a pipe for usage with select() or poll()
    +	- An API for running subprocesses with STDOUT and STDERR redirected to syslog
    +
    +	APIs like these are used in most daemon software available. It is not that
    +	simple to get it done right and code duplication is not a goal.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +		--disable-lynx \
    +		, \
    +		ac_cv_func_setpgrp_void=yes \
    +	)
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libdaemon $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.a $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so* $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdaemon.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libdaemon/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libdaemon))
    diff --git a/libs/libdbi/Makefile b/libs/libdbi/Makefile
    new file mode 100644
    index 0000000..82511e8
    --- /dev/null
    +++ b/libs/libdbi/Makefile
    @@ -0,0 +1,49 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libdbi
    +PKG_VERSION:=0.8.3
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/libdbi
    +PKG_MD5SUM:=ca66db78d479cbfa727cf3245b5864ae
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libdbi
    +  NAME:=libdbi
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= (library)
    +  URL:=http://libdbi.sourceforge.net/
    +endef
    +
    +define Package/libdbi/description
    +	SQLite is a small C library that implements a self-contained, embeddable, 
    +	zero-configuration SQL database engine.	This package contains the SQLite
    +	(v3.x) shared library, used by other programs.
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/dbi $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdbi.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libdbi/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdbi.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libdbi))
    diff --git a/libs/libdbi/patches/001-no_docs.patch b/libs/libdbi/patches/001-no_docs.patch
    new file mode 100644
    index 0000000..f290db1
    --- /dev/null
    +++ b/libs/libdbi/patches/001-no_docs.patch
    @@ -0,0 +1,24 @@
    +diff -urN libdbi-0.8.3/Makefile.am libdbi-0.8.3.new/Makefile.am
    +--- libdbi-0.8.3/Makefile.am	2006-05-18 22:27:50.000000000 +0200
    ++++ libdbi-0.8.3.new/Makefile.am	2009-01-09 00:06:34.000000000 +0100
    +@@ -2,7 +2,7 @@
    + 
    + AUTOMAKE_OPTIONS = foreign dist-zip
    + 
    +-SUBDIRS = src include @docs_subdirs@
    ++SUBDIRS = src include
    + 
    + EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL README README.win32 README.osx TODO NEWS libdbi.spec.in config.h.in Makefile.w32 autogen.sh drivers/example/AUTHORS drivers/example/Makefile.am drivers/example/README drivers/example/TODO drivers/example/.cvsignore drivers/example/dbd_example.c drivers/example/dbd_example.h drivers/example/dbd_example.sgml
    + 
    +diff -urN libdbi-0.8.3/Makefile.in libdbi-0.8.3.new/Makefile.in
    +--- libdbi-0.8.3/Makefile.in	2008-02-06 20:40:10.000000000 +0100
    ++++ libdbi-0.8.3.new/Makefile.in	2009-01-09 00:06:28.000000000 +0100
    +@@ -180,7 +180,7 @@
    + sysconfdir = @sysconfdir@
    + target_alias = @target_alias@
    + AUTOMAKE_OPTIONS = foreign dist-zip
    +-SUBDIRS = src include @docs_subdirs@
    ++SUBDIRS = src include
    + EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL README README.win32 README.osx TODO NEWS libdbi.spec.in config.h.in Makefile.w32 autogen.sh drivers/example/AUTHORS drivers/example/Makefile.am drivers/example/README drivers/example/TODO drivers/example/.cvsignore drivers/example/dbd_example.c drivers/example/dbd_example.h drivers/example/dbd_example.sgml
    + all: config.h
    + 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
    diff --git a/libs/libdirectfb/Makefile b/libs/libdirectfb/Makefile
    new file mode 100644
    index 0000000..2c4d2ce
    --- /dev/null
    +++ b/libs/libdirectfb/Makefile
    @@ -0,0 +1,118 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=DirectFB
    +PKG_VERSION:=1.4.2
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.directfb.org/downloads/Core/DirectFB-1.4
    +PKG_MD5SUM:=e4376c6c5b8e27d735edb7f62a7a8e86
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/directfb
    +    TITLE:=DirectFB
    +    SECTION:=libs
    +    CATEGORY:=Libraries
    +    URL:=http://directfb.org
    +    DEPENDS:=+libpng +libjpeg +libpthread +libfreetype
    +endef
    +
    +define Package/directfb/description
    +    DirectFB is a thin library that provides hardware graphics acceleration, input device handling and abstraction, integrated windowing system with support for translucent windows and multiple display layers, not only on top of the Linux Framebuffer Device. It is a complete hardware abstraction layer with software fallbacks for every graphics operation that is not supported by the underlying hardware.
    +endef
    +
    +TARGET_LDFLAGS+="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
    +CONFIGURE_CMD=./autogen.sh
    +
    +define Feature/DirectFB
    +  TARGET_NAME:=drawing-backend
    +  TARGET_TITLE:=Drawing Backend
    +  NAME:=DirectFB
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--disable-osx \
    +		--disable-x11 \
    +		--enable-debug-support \
    +		--disable-network \
    +		--disable-mmx \
    +		--disable-sse \
    +		--enable-fbdev \
    +		--disable-sdl \
    +		--disable-vnc \
    +		--enable-sysfs \
    +		--with-inputdrivers=linuxinput \
    +		--with-gfxdrivers=none \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) \
    +		$(1)/usr/include \
    +		$(1)/usr/lib \
    +		$(1)/usr/lib/pkgconfig
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/* \
    +		$(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/* \
    +		$(1)/usr/include/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/directfb/install
    +	$(INSTALL_DIR) \
    +		$(1)/usr/bin \
    +		$(1)/usr/lib \
    +		$(1)/usr/share/directfb-1.4.2 \
    +		$(1)/usr/lib/directfb-1.4-0/interfaces/IDirectFBFont \
    +		$(1)/usr/lib/directfb-1.4-0/interfaces/IDirectFBImageProvider \
    +		$(1)/usr/lib/directfb-1.4-0/interfaces/IDirectFBVideoProvider \
    +		$(1)/usr/lib/directfb-1.4-0/wm \
    +		$(1)/usr/lib/directfb-1.4-0/systems \
    +		$(1)/usr/lib/directfb-1.4-0/inputdrivers
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/bin/* \
    +		$(1)/usr/bin/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/share/directfb-1.4.2/* \
    +		$(1)/usr/share/directfb-1.4.2/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/lib{direct,fusion}*.so* \
    +		$(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/directfb-1.4-0/interfaces/IDirectFBFont/*.so* \
    +		$(1)/usr/lib/directfb-1.4-0/interfaces/IDirectFBFont/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/directfb-1.4-0/interfaces/IDirectFBImageProvider/*.so* \
    +		$(1)/usr/lib/directfb-1.4-0/interfaces/IDirectFBImageProvider/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/directfb-1.4-0/interfaces/IDirectFBVideoProvider/*.so* \
    +		$(1)/usr/lib/directfb-1.4-0/interfaces/IDirectFBVideoProvider/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/directfb-1.4-0/wm/*.so* \
    +		$(1)/usr/lib/directfb-1.4-0/wm/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/directfb-1.4-0/systems/*.so* \
    +		$(1)/usr/lib/directfb-1.4-0/systems/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/directfb-1.4-0/inputdrivers/*.so* \
    +		$(1)/usr/lib/directfb-1.4-0/inputdrivers/
    +endef
    +
    +$(eval $(call Feature,DirectFB))
    +$(eval $(call BuildPackage,directfb))
    diff --git a/libs/libdirectfb/patches/disable-asm.patch b/libs/libdirectfb/patches/disable-asm.patch
    new file mode 100644
    index 0000000..c38498a
    --- /dev/null
    +++ b/libs/libdirectfb/patches/disable-asm.patch
    @@ -0,0 +1,13 @@
    +--- DirectFB-1.4.2/configure.in.orig	2009-10-14 17:19:38.000000000 +0200
    ++++ DirectFB-1.4.2/configure.in	2009-10-14 17:19:55.000000000 +0200
    +@@ -221,8 +221,8 @@
    + have_kos=no
    + need_libc_r=no
    + need_libdl=yes
    ++want_ppcasm=no
    ++want_armasm=no
    +-want_ppcasm=yes
    +-want_armasm=yes
    + 
    + case "$target_or_host" in
    +   *-linux*)
    diff --git a/libs/libdlna/Makefile b/libs/libdlna/Makefile
    new file mode 100644
    index 0000000..496f22c
    --- /dev/null
    +++ b/libs/libdlna/Makefile
    @@ -0,0 +1,78 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libdlna
    +PKG_VERSION:=0.2.3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://libdlna.geexbox.org/releases/
    +PKG_MD5SUM:=2c974f95b711e5fd07f78fc4ebfcca66
    +
    +PKG_BUILD_PARALLEL:=1
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libdlna
    + SECTION:=libs
    + CATEGORY:=Libraries
    + TITLE:= Reference DLNA implementation
    + URL:=http://libdlna.geexbox.org/
    + DEPENDS:=+libffmpeg +@FFMPEG_LIBDLNA_SUPPORT
    +endef
    +
    +define Package/libdlna/description
    + libdlna aims at being the reference open-source implementation of DLNA 
    + (Digital Living Network Alliance) standards. Its primary goal is to 
    + provide DLNA support to uShare, an embedded DLNA & UPnP A/V Media Server, 
    + but it will be used to build both DLNA servers and players in the long 
    + term.
    +endef
    +
    +define Build/Configure
    +	# this is *NOT* GNU configure
    +	( cd $(PKG_BUILD_DIR); \
    +		CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
    +		LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -lpthread" \
    +		HOST_CC="$(HOSTCC)" \
    +		./configure \
    +		--cross-compile \
    +		--cross-prefix=$(TARGET_CROSS) \
    +		--prefix=/usr \
    +		--enable-shared \
    +		--enable-static \
    +		--disable-debug \
    +		--disable-optimize \
    +		--disable-strip \
    +	)
    +endef
    +
    +# XXX: fix build on systems where install is not at its usual location
    +# INSTALL defaults to /usr/bin/install
    +MAKE_INSTALL_FLAGS += \
    +	INSTALL="install" \
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/dlna.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdlna.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdlna.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libdlna/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdlna.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libdlna))
    diff --git a/libs/libdlna/patches/100-configure_fix.patch b/libs/libdlna/patches/100-configure_fix.patch
    new file mode 100644
    index 0000000..f11fd38
    --- /dev/null
    +++ b/libs/libdlna/patches/100-configure_fix.patch
    @@ -0,0 +1,120 @@
    +diff -ruN libdlna-0.2.3.orig/configure libdlna-0.2.3/configure
    +--- libdlna-0.2.3.orig/configure	2007-11-26 21:47:43.000000000 +0100
    ++++ libdlna-0.2.3/configure	2008-04-19 21:59:15.000000000 +0200
    +@@ -177,6 +177,19 @@
    +     check_cmd $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs
    + }
    + 
    ++check_host_cc(){
    ++    log check_host_cc "$@"
    ++    cat >$TMPC
    ++    log_file $TMPC
    ++    check_cmd $host_cc $host_cflags "$@" -c -o $TMPO $TMPC
    ++}
    ++
    ++check_host_ld(){
    ++    log check_host_ld "$@"
    ++    check_host_cc || return
    ++    check_cmd $host_cc $host_cflags $host_ldflags "$@" -o $TMPE $TMPO
    ++}
    ++
    + check_exec(){
    +     check_ld "$@" && { enabled cross_compile || $TMPE >>$logfile 2>&1; }
    + }
    +@@ -311,6 +324,7 @@
    + static="yes"
    + shared="yes"
    + cc="gcc"
    ++host_cc="gcc"
    + ar="ar"
    + ranlib="ranlib"
    + make="make"
    +@@ -454,6 +468,11 @@
    + fi
    + [ -n "$MAKE" ] && make="$MAKE"
    + 
    ++[ -n "$HOST_CC" ] && host_cc="$HOST_CC"
    ++[ -n "$HOST_CFLAGS" ] && host_cflags="$HOST_CFLAGS"
    ++[ -n "$HOST_LDFLAGS" ] && host_ldflags="$HOST_LDFLAGS"
    ++host_cflags="-Isrc $host_cflags"
    ++
    + #################################################
    + #   create logging file
    + #################################################
    +@@ -610,15 +629,14 @@
    + fi
    + 
    + echolog "Checking for libavformat ..."
    +-check_lib ffmpeg/avformat.h av_register_all -lavformat || die "Error, can't find libavformat !"
    ++check_lib libavformat/avformat.h av_register_all -lavformat -lavcodec -lavutil || die "Error, can't find libavformat !"
    + echolog "Checking for libavcodec ..."
    +-check_lib ffmpeg/avcodec.h avcodec_register_all -lavcodec || die "Error, can't find libavcodec !"
    ++check_lib libavcodec/avcodec.h avcodec_register_all -lavcodec || die "Error, can't find libavcodec !"
    + 
    + #################################################
    + #   version
    + #################################################
    +-temp_cflags "-Isrc"
    +-check_ld <
    + #include 
    + int main(){
    +@@ -628,7 +646,6 @@
    + }
    + EOF
    + VERSION=`$TMPE`
    +-restore_flags
    + 
    + 
    + #################################################
    +diff -ruN libdlna-0.2.3.orig/src/av_mpeg4_part10.c libdlna-0.2.3/src/av_mpeg4_part10.c
    +--- libdlna-0.2.3.orig/src/av_mpeg4_part10.c	2007-11-26 21:47:43.000000000 +0100
    ++++ libdlna-0.2.3/src/av_mpeg4_part10.c	2008-04-19 21:48:45.000000000 +0200
    +@@ -26,7 +26,7 @@
    + #include 
    + #include 
    + 
    +-#include 
    ++#include 
    + 
    + #include "dlna_internals.h"
    + #include "profiles.h"
    +diff -ruN libdlna-0.2.3.orig/src/av_mpeg4_part2.c libdlna-0.2.3/src/av_mpeg4_part2.c
    +--- libdlna-0.2.3.orig/src/av_mpeg4_part2.c	2007-11-26 21:47:43.000000000 +0100
    ++++ libdlna-0.2.3/src/av_mpeg4_part2.c	2008-04-19 21:48:45.000000000 +0200
    +@@ -26,7 +26,7 @@
    + #include 
    + #include 
    + 
    +-#include 
    ++#include 
    + 
    + #include "dlna_internals.h"
    + #include "profiles.h"
    +diff -ruN libdlna-0.2.3.orig/src/containers.c libdlna-0.2.3/src/containers.c
    +--- libdlna-0.2.3.orig/src/containers.c	2007-11-26 21:47:43.000000000 +0100
    ++++ libdlna-0.2.3/src/containers.c	2008-04-19 21:48:45.000000000 +0200
    +@@ -4,7 +4,7 @@
    + #include 
    + #include 
    + 
    +-#include 
    ++#include 
    + 
    + #include "containers.h"
    + #include "profiles.h"
    +diff -ruN libdlna-0.2.3.orig/src/profiles.h libdlna-0.2.3/src/profiles.h
    +--- libdlna-0.2.3.orig/src/profiles.h	2007-11-26 21:47:43.000000000 +0100
    ++++ libdlna-0.2.3/src/profiles.h	2008-04-19 21:48:45.000000000 +0200
    +@@ -22,8 +22,8 @@
    + #ifndef _PROFILES_H_
    + #define _PROFILES_H_
    + 
    +-#include 
    +-#include 
    ++#include 
    ++#include 
    + 
    + #include "dlna_internals.h"
    + #include "containers.h"
    diff --git a/libs/libdlna/patches/200-parallel-build.patch b/libs/libdlna/patches/200-parallel-build.patch
    new file mode 100644
    index 0000000..7f9934b
    --- /dev/null
    +++ b/libs/libdlna/patches/200-parallel-build.patch
    @@ -0,0 +1,17 @@
    +---
    + Makefile |    4 ++--
    + 1 file changed, 2 insertions(+), 2 deletions(-)
    +
    +--- libdlna-0.2.3.orig/Makefile
    ++++ libdlna-0.2.3/Makefile
    +@@ -32,8 +32,8 @@ lib:
    + 
    + test: $(LIBTEST)
    + 
    +-$(LIBTEST): $(SRCS)
    +-	$(CC) $? $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
    ++$(LIBTEST): lib $(SRCS)
    ++	$(CC) $(SRCS) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
    + 
    + clean:
    + 	$(MAKE) -C src clean
    diff --git a/libs/libdmapsharing/Makefile b/libs/libdmapsharing/Makefile
    new file mode 100644
    index 0000000..6edc986
    --- /dev/null
    +++ b/libs/libdmapsharing/Makefile
    @@ -0,0 +1,66 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +# This Makefile is a skeleton
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libdmapsharing
    +PKG_VERSION:=2.9.12
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=libdmapsharing-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.flyn.org/projects/libdmapsharing/
    +PKG_MD5SUM:=ec34948df21e9ba0656c917b10fed1c3
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/libdmapsharing-$(PKG_VERSION)
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +TARGET_LDFLAGS+= \
    +	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
    +
    +define Package/libdmapsharing
    +  SECTION:=libs
    +  CATAGORY:=Libraries
    +  DEPENDS:=+libsoup +mdnsresponder +gstreamer +gst-plugins-base
    +  TITLE:=libdmapsharing
    +  URL:=http://www.flyn.org/projects/libdmapsharing/
    +  MAINTAINER:=W. Michael Petullo 
    +endef
    +
    +define Package/libdmapsharing/decription
    +  Libdmapsharing is a DMAP library implementation in C
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/libdmapsharing-3.0/ \
    +		$(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
    +		$(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libdmapsharing/install
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libdmapsharing))
    diff --git a/libs/libdnet/Makefile b/libs/libdnet/Makefile
    new file mode 100644
    index 0000000..54e25c4
    --- /dev/null
    +++ b/libs/libdnet/Makefile
    @@ -0,0 +1,144 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libdnet
    +PKG_VERSION:=1.11
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/$(PKG_NAME)
    +PKG_MD5SUM:=04c394ed8e1e7fc455456e79e908916d
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +PKG_CONFIG_DEPENDS:=\
    +	CONFIG_PACKAGE_libdnet \
    +	CONFIG_PACKAGE_pydnet
    +
    +PKG_BUILD_DEPENDS:=PACKAGE_pydnet:python
    +
    +include $(INCLUDE_DIR)/package.mk
    +$(call include_mk, python-package.mk)
    +
    +define Package/libdnet/Default
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Low-level network library
    +  URL:=http://sourceforge.net/projects/libdnet/
    +endef
    +
    +define Package/libdnet/Default/description
    +	libdnet is a library of simplified, portable interface to several
    +	low-level networking routines.
    +endef
    +
    +define Package/libdnet
    +  $(call Package/libdnet/Default)
    +endef
    +
    +define Package/libdnet/description
    +  $(call Package/libdnet/Default/description)
    +endef
    +
    +define Package/pydnet
    +  $(call Package/libdnet/Default)
    +  DEPENDS:=libdnet +python-mini
    +endef
    +
    +define Package/pydnet/description
    +  $(call Package/libdnet/Default/description)
    +  This package contains the python dnet library.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--without-check \
    +	--without-python
    +
    +CONFIGURE_VARS += \
    +	ac_cv_dnet_bsd_bpf=no
    +
    +MAKE_FLAGS += \
    +	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
    +
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR); \
    +		ln -sf config/acinclude.m4 . ; \
    +		autoreconf -v --install || exit 1 \
    +	);
    +	$(call Build/Configure/Default)
    +endef
    +
    +define Build/Compile
    +	$(call Build/Compile/Default)
    +	$(if $(CONFIG_PACKAGE_pydnet), \
    +		$(call Build/Compile/PyMod, \
    +			python/, \
    +			build \
    +		) \
    +	)
    +endef
    +
    +define Build/Install
    +	$(call Build/Install/Default)
    +	$(if $(CONFIG_PACKAGE_pydnet), \
    +		$(call Build/Compile/PyMod, \
    +			python/, \
    +			install --no-compile --prefix $(PKG_INSTALL_DIR)/usr \
    +		) \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/dnet-config \
    +		$(2)/bin/
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
    +		$(2)/bin/dnet-config
    +
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(INSTALL_DATA)\
    +		$(PKG_INSTALL_DIR)/usr/include/dnet.h \
    +		$(1)/usr/include/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/dnet \
    +		$(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libdnet.{la,a,so*} \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/libdnet/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/sbin/dnet \
    +		$(1)/usr/sbin/
    +endef
    +
    +define Package/pydnet/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/python* $(1)/usr/lib/
    +endef
    +
    +
    +$(eval $(call BuildPackage,libdnet))
    +$(eval $(call BuildPackage,pydnet))
    diff --git a/libs/libdnet/patches/001-dnet_config.patch b/libs/libdnet/patches/001-dnet_config.patch
    new file mode 100644
    index 0000000..cde376a
    --- /dev/null
    +++ b/libs/libdnet/patches/001-dnet_config.patch
    @@ -0,0 +1,23 @@
    +--- a/dnet-config.in
    ++++ b/dnet-config.in
    +@@ -45,10 +45,18 @@ while test $# -gt 0; do
    + done
    + 
    + if test "$echo_cflags" = "yes"; then
    +-      echo -I@includedir@
    ++      includes=
    ++      if test "@includedir@" != "/usr/include" ; then
    ++             includes=-I@includedir@
    ++      fi
    ++      echo $includes
    + fi
    + 
    + if test "$echo_libs" = "yes"; then
    +-      echo -L@libdir@ -ldnet @LIBS@
    ++      libs=
    ++      if test "@libdir@" != "/usr/lib" ; then
    ++             libs=-I@libdir@
    ++      fi
    ++      echo $libs -ldnet @LIBS@
    + fi      
    + 
    diff --git a/libs/libdnet/patches/002-fix_avr32_compile.patch b/libs/libdnet/patches/002-fix_avr32_compile.patch
    new file mode 100644
    index 0000000..54223c9
    --- /dev/null
    +++ b/libs/libdnet/patches/002-fix_avr32_compile.patch
    @@ -0,0 +1,20 @@
    +--- a/config/config.sub
    ++++ b/config/config.sub
    +@@ -228,7 +228,7 @@ case $basic_machine in
    + 	| a29k \
    + 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
    + 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
    +-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
    ++	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
    + 	| c4x | clipper \
    + 	| d10v | d30v | dlx | dsp16xx \
    + 	| fr30 | frv \
    +@@ -290,7 +290,7 @@ case $basic_machine in
    + 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
    + 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
    + 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
    +-	| avr-* \
    ++	| avr-* | avr32-* \
    + 	| bs2000-* \
    + 	| c[123]* | c30-* | [cjt]90-* | c54x-* \
    + 	| clipper-* | cydra-* \
    diff --git a/libs/libdnet/patches/010-gcc4.patch b/libs/libdnet/patches/010-gcc4.patch
    new file mode 100644
    index 0000000..bfbf822
    --- /dev/null
    +++ b/libs/libdnet/patches/010-gcc4.patch
    @@ -0,0 +1,20 @@
    +--- a/python/dnet.c
    ++++ b/python/dnet.c
    +@@ -2726,7 +2726,7 @@ static PyObject *__pyx_f_4dnet_15__addr_
    +   PyObject *__pyx_3 = 0;
    +   unsigned short __pyx_4;
    +   Py_INCREF(__pyx_v_self);
    +-  ((PyObject*)__pyx_v_next) = Py_None; Py_INCREF(((PyObject*)__pyx_v_next));
    ++  __pyx_v_next = Py_None; Py_INCREF(((PyObject*)__pyx_v_next));
    + 
    +   /* "/Users/dugsong/projects/libdnet/python/./dnet.pyx":634 */
    +   __pyx_1 = (((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur <= ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->max);
    +@@ -2738,7 +2738,7 @@ static PyObject *__pyx_f_4dnet_15__addr_
    +     Py_DECREF(__pyx_2); __pyx_2 = 0;
    +     if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_4dnet_addr)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
    +     Py_DECREF(((PyObject *)__pyx_v_next));
    +-    ((PyObject *)__pyx_v_next) = __pyx_3;
    ++    __pyx_v_next = __pyx_3;
    +     __pyx_3 = 0;
    + 
    +     /* "/Users/dugsong/projects/libdnet/python/./dnet.pyx":636 */
    diff --git a/libs/libdvbpsi/Makefile b/libs/libdvbpsi/Makefile
    new file mode 100644
    index 0000000..d95486e
    --- /dev/null
    +++ b/libs/libdvbpsi/Makefile
    @@ -0,0 +1,56 @@
    +#
    +# Copyright (C) 2007-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libdvbpsi5
    +PKG_VERSION:=0.1.6
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://download.videolan.org/pub/libdvbpsi/$(PKG_VERSION)/
    +PKG_MD5SUM:=bd2d9861be3311e1e03c91cd9345f542
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +PKG_INSTALL=1
    +
    +define Package/libdvbpsi
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=MPEG TS and DVB PSI tables decoding and generating
    +  URL:=http://www.videolan.org/developers/libdvbpsi.html
    +endef
    +
    +define Package/libdvbpsi/description
    +	libdvbpsi is a simple library designed for MPEG TS and DVB PSI tables
    +	decoding and generating.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/dvbpsi
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/dvbpsi/*.h \
    +		$(1)/usr/include/dvbpsi/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libdvbpsi.{so*,a,la} \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/libdvbpsi/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libdvbpsi.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libdvbpsi))
    diff --git a/libs/libdvbpsi/patches/001-no_doc_examples.patch b/libs/libdvbpsi/patches/001-no_doc_examples.patch
    new file mode 100644
    index 0000000..a32f5da
    --- /dev/null
    +++ b/libs/libdvbpsi/patches/001-no_doc_examples.patch
    @@ -0,0 +1,25 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -1,7 +1,7 @@
    + ## Process this file with automake to produce Makefile.in
    + 
    +-SUBDIRS = src examples misc
    +-DIST_SUBDIRS = $(SUBDIRS) doc debian wince
    ++SUBDIRS = src
    ++DIST_SUBDIRS = $(SUBDIRS) debian wince
    + 
    + EXTRA_DIST = libdvbpsi.spec bootstrap
    + 
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -179,8 +179,8 @@ target_alias = @target_alias@
    + target_cpu = @target_cpu@
    + target_os = @target_os@
    + target_vendor = @target_vendor@
    +-SUBDIRS = src examples misc
    +-DIST_SUBDIRS = $(SUBDIRS) doc debian wince
    ++SUBDIRS = src
    ++DIST_SUBDIRS = $(SUBDIRS) debian wince
    + EXTRA_DIST = libdvbpsi.spec bootstrap
    + AUTOMAKE_OPTIONS = foreign dist-bzip2 subdir-objects
    + all: config.h
    diff --git a/libs/libdvdread/Makefile b/libs/libdvdread/Makefile
    new file mode 100644
    index 0000000..7df03c9
    --- /dev/null
    +++ b/libs/libdvdread/Makefile
    @@ -0,0 +1,65 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libdvdread
    +PKG_VERSION:=0.9.7
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.dtek.chalmers.se/~dvd/dist
    +PKG_MD5SUM:=078788c9241ae16763529e1235502337
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libdvdread
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=simple foundation for reading DVD video disks.
    +  URL:=http://www.dtek.chalmers.se/~dvd/downloads.shtml
    +endef
    +
    +define Package/libdvdread/description
    +	libdvdread provides a simple foundation for reading DVD video disks.
    +	It provides the functionality that is required to access many DVDs.
    +	It parses IFO files, reads NAV-blocks, and performs CSS
    +	authentication and descrambling.
    +endef
    +
    +TARGET_CFLAGS += \
    +	-ffunction-sections -fdata-sections
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static
    +#	--with-build-cc="$(HOSTCC)" 
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/dvdread
    +	$(CP)	$(PKG_INSTALL_DIR)/usr/include/dvdread/*.h \
    +		$(1)/usr/include/dvdread
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP)	$(PKG_INSTALL_DIR)/usr/lib/libdvdread.{a,so*} \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/libdvdread/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdvdread.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libdvdread))
    diff --git a/libs/libelf/Makefile b/libs/libelf/Makefile
    new file mode 100644
    index 0000000..8c33188
    --- /dev/null
    +++ b/libs/libelf/Makefile
    @@ -0,0 +1,61 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libelf
    +PKG_VERSION:=0.8.13
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.mr511.de/software/
    +PKG_MD5SUM:=4136d7b4c04df68b686570afa26988ac
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libelf
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=ELF object file access library
    +  URL:=http://www.mr511.de/software/
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--enable-elf64=yes \
    +
    +CONFIGURE_VARS += \
    +	mr_cv_target_elf=yes \
    +	libelf_64bit=yes \
    +	libelf_cv_struct_elf64_ehdr=yes \
    +	libelf_cv_type_elf64_addr=no \
    +	libelf_cv_struct_elf64_rel=yes \
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		instroot="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libelf* $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libelf.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libelf/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libelf))
    diff --git a/libs/libevent/Makefile b/libs/libevent/Makefile
    new file mode 100644
    index 0000000..ba8aec2
    --- /dev/null
    +++ b/libs/libevent/Makefile
    @@ -0,0 +1,66 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libevent
    +PKG_VERSION:=1.4.14b
    +PKG_RELEASE:=1
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-stable
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-stable.tar.gz
    +PKG_SOURCE_URL:=http://www.monkey.org/~provos/
    +PKG_MD5SUM:=a00e037e4d3f9e4fe9893e8a2d27918c
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libevent
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Event notification library
    +  URL:=http://www.monkey.org/~provos/libevent/
    +endef
    +
    +define Package/libevent/description
    +	The libevent API provides a mechanism to execute a callback function
    +	when a specific event occurs on a file descriptor or after a timeout
    +	has been reached. Furthermore, libevent also support callbacks due
    +	to signals or regular timeouts.
    +
    +	libevent is meant to replace the event loop found in event driven
    +	network servers. An application just needs to call event_dispatch()
    +	and then add or remove events dynamically without having to change
    +	the event loop.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +MAKE_FLAGS += \
    +	CFLAGS="$(TARGET_CFLAGS)" \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent.{la,a,so} $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-1.4.so* $(1)/usr/lib/
    +endef
    +
    +define Package/libevent/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-1.4.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libevent))
    diff --git a/libs/libevent2/Makefile b/libs/libevent2/Makefile
    new file mode 100644
    index 0000000..74693f6
    --- /dev/null
    +++ b/libs/libevent2/Makefile
    @@ -0,0 +1,154 @@
    +#
    +# Copyright (C) 2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libevent2
    +PKG_VERSION:=2.0.12
    +PKG_RELEASE:=1
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/libevent-$(PKG_VERSION)-stable
    +PKG_SOURCE:=libevent-$(PKG_VERSION)-stable.tar.gz
    +PKG_SOURCE_URL:=http://www.monkey.org/~provos/
    +PKG_MD5SUM:=42986228baf95e325778ed328a93e070
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libevent2/Default
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Event notification
    +  URL:=http://www.monkey.org/~provos/libevent/
    +endef
    +
    +define Package/libevent2/Default/description
    +	The libevent API provides a mechanism to execute a callback function
    +	when a specific event occurs on a file descriptor or after a timeout
    +	has been reached. Furthermore, libevent also support callbacks due
    +	to signals or regular timeouts.
    +
    +	libevent is meant to replace the event loop found in event driven
    +	network servers. An application just needs to call event_dispatch()
    +	and then add or remove events dynamically without having to change
    +	the event loop.
    +endef
    +
    +define Package/libevent2
    +  $(call Package/libevent2/Default)
    +  TITLE+=  library (version 2.0)
    +endef
    +
    +define Package/libevent2/description
    +	$(call Package/libevent2/Default/description)
    +
    +	This package contains the libevent shared library historically
    +	containing both the core & extra libraries.
    +endef
    +
    +define Package/libevent2-core
    +  $(call Package/libevent2/Default)
    +  TITLE+= core library (version 2.0)
    +endef
    +
    +define Package/libevent2-core/description
    +	$(call Package/libevent2/Default/description)
    +
    +	This package contains the libevent core shared library for the event,
    +	buffer & utility functions.
    +endef
    +
    +define Package/libevent2-extra
    +  $(call Package/libevent2/Default)
    +  TITLE+= extra library (version 2.0)
    +endef
    +
    +define Package/libevent2-extra/description
    +	$(call Package/libevent2/Default/description)
    +
    +	This package contains the libevent extra shared library for specific
    +	protocols including HTTP, DNS & RPC.
    +endef
    +
    +define Package/libevent2-openssl
    +  $(call Package/libevent2/Default)
    +  TITLE+= OpenSSL library (version 2.0)
    +  DEPENDS:=+libopenssl
    +endef
    +
    +define Package/libevent2-openssl/description
    +	$(call Package/libevent2/Default/description)
    +
    +	This package contains the libevent OpenSSL shared library for encrypted
    +	bufferevents.
    +endef
    +
    +define Package/libevent2-pthreads
    +  $(call Package/libevent2/Default)
    +  TITLE+= Pthreads library (version 2.0)
    +  DEPENDS:=+libpthread
    +endef
    +
    +define Package/libevent2-pthreads/description
    +	$(call Package/libevent2/Default/description)
    +
    +	This package contains the libevent Pthreads shared library for
    +	threading & locking.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static
    +
    +MAKE_FLAGS += \
    +	CFLAGS="$(TARGET_CFLAGS)"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*.{la,a,so} $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*-2.0.so* $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libevent*.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libevent2/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-2.0.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/libevent2-core/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_core-2.0.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/libevent2-extra/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_extra-2.0.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/libevent2-openssl/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_openssl-2.0.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/libevent2-pthreads/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_pthreads-2.0.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libevent2))
    +$(eval $(call BuildPackage,libevent2-core))
    +$(eval $(call BuildPackage,libevent2-extra))
    +$(eval $(call BuildPackage,libevent2-openssl))
    +$(eval $(call BuildPackage,libevent2-pthreads))
    diff --git a/libs/libexif/Makefile b/libs/libexif/Makefile
    new file mode 100644
    index 0000000..43a09fe
    --- /dev/null
    +++ b/libs/libexif/Makefile
    @@ -0,0 +1,59 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libexif
    +PKG_VERSION:=0.6.19
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/libexif
    +PKG_MD5SUM:=56144a030a4c875c600b1ccf713f69f7
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libexif
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=library for jpeg files with exif tags
    +  URL:=http://libexif.sourceforge.net/
    +endef
    +
    +define Package/libexif/description
    +  libexif is a library for parsing, editing, and saving EXIF data. It is
    +  intended to replace lots of redundant implementations in command-line
    +  utilities and programs with GUIs.
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-rpath \
    +	--without-libiconv-prefix \
    +	--without-libintl-prefix \
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libexif $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libexif*.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libexif.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libexif/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libexif*.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libexif))
    diff --git a/libs/libexif/patches/100-no_doc.patch b/libs/libexif/patches/100-no_doc.patch
    new file mode 100644
    index 0000000..5ca00ce
    --- /dev/null
    +++ b/libs/libexif/patches/100-no_doc.patch
    @@ -0,0 +1,11 @@
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -280,7 +280,7 @@ target_alias = @target_alias@
    + top_build_prefix = @top_build_prefix@
    + top_builddir = @top_builddir@
    + top_srcdir = @top_srcdir@
    +-SUBDIRS = m4m po libexif test doc binary contrib
    ++SUBDIRS = m4m po libexif test binary contrib
    + @SHIP_BINARIES_TRUE@README_W32_XDIST = README-Win32.txt
    + EXTRA_DIST = @PACKAGE_TARNAME@.spec $(README_W32_XDIST) libexif.pc.in \
    + 	libexif-uninstalled.pc.in
    diff --git a/libs/libffi-sable/Makefile b/libs/libffi-sable/Makefile
    new file mode 100644
    index 0000000..f879143
    --- /dev/null
    +++ b/libs/libffi-sable/Makefile
    @@ -0,0 +1,60 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libffi-sable
    +PKG_VERSION:=3325
    +PKG_RELEASE:=5
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://sablevm.org/download/snapshot/2005-01-21/
    +PKG_MD5SUM:=0c32eaaea0269c5fbe156fcd0be3e5bd
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libffi-sable
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Foreign Function Interface library (for sablevm)
    +  DEPENDS:=@!TARGET_avr32
    +  URL:=http://sources.redhat.com/libffi/
    +endef
    +
    +define Package/libffi-sable/description
    +	The libffi library provides a portable, high level programming 
    +	interface to various calling conventions. This allows a programmer to 
    +	call any function specified by a call interface description at run 
    +	time.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +		--disable-debug \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/ffi{,target}.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libffi.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libffi-sable/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libffi-sable))
    diff --git a/libs/libffi/Makefile b/libs/libffi/Makefile
    new file mode 100644
    index 0000000..b03d078
    --- /dev/null
    +++ b/libs/libffi/Makefile
    @@ -0,0 +1,65 @@
    +#
    +# Copyright (C) 2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libffi
    +PKG_VERSION:=3.0.9
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=ftp://sourceware.org/pub/libffi/
    +PKG_MD5SUM:=1f300a7a7f975d4046f51c3022fa5ff1
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libffi
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Foreign Function Interface (FFI) library
    +  URL:=http://sourceware.org/libffi/
    +endef
    +
    +define Package/libffi/description
    +The libffi library provides a portable, high level programming interface to
    +various calling conventions. This allows a programmer to call any function
    +specified by a call interface description at run-time.
    +
    +FFI stands for Foreign Function Interface. A foreign function interface is the
    +popular name for the interface that allows code written in one language to call
    +code written in another language. The libffi library really only provides the
    +lowest, machine dependent layer of a fully featured foreign function interface.
    +A layer must exist above libffi that handles type conversions for values passed
    +between the two languages.
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libffi.{so*,a,la} \
    +		$(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
    +		$(1)/usr/lib/pkgconfig/
    +
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libffi-$(PKG_VERSION)/include/*.h \
    +		$(1)/usr/include/
    +endef
    +
    +define Package/libffi/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libffi.so.* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libffi))
    diff --git a/libs/libftdi/Makefile b/libs/libftdi/Makefile
    new file mode 100644
    index 0000000..17a8e60
    --- /dev/null
    +++ b/libs/libftdi/Makefile
    @@ -0,0 +1,48 @@
    +#
    +# Copyright (C) 2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libftdi
    +PKG_VERSION:=0.18
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
    +PKG_MD5SUM:=916f65fa68d154621fc0cf1f405f2726
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libftdi
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=library to talk to FTDI chips
    +  URL:=http://www.intra2net.com/en/developer/libftdi/
    +endef
    +
    +define Package/libftdi/description
    +  libFTDI - FTDI USB driver with bitbang mode
    +  libFTDI is an open source library to talk to FTDI chips: FT232BM, FT245BM, FT2232C, FT2232H, FT4232H, FT2232D and FT245R, including the popular bitbang mode. 
    +  The library is linked with your program in userspace, no kernel driver required.
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/ftdi.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.{a,so} $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.so* $(1)/usr/lib/
    +endef
    +
    +define Package/libftdi/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libftdi))
    diff --git a/libs/libgcrypt/Makefile b/libs/libgcrypt/Makefile
    new file mode 100644
    index 0000000..34f7051
    --- /dev/null
    +++ b/libs/libgcrypt/Makefile
    @@ -0,0 +1,70 @@
    +#
    +# Copyright (C) 2005-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libgcrypt
    +PKG_VERSION:=1.4.5
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=ftp://ftp.gnupg.org/gcrypt/libgcrypt/
    +PKG_MD5SUM:=cc2017ad09b4543f8b3b5e9a53cfd89d
    +
    +PKG_FIXUP:=libtool no-autoreconf
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libgcrypt
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libgpg-error
    +  TITLE:=GNU crypto library
    +  URL:=http://directory.fsf.org/security/libgcrypt.html
    +endef
    +
    +define Package/libgcrypt/description
    + This is a general purpose cryptographic library based on the code from 
    + GnuPG. It provides functions for all cryptograhic building blocks: 
    + symmetric ciphers (AES, DES, Arcfour), hash algorithms (MD5, SHA-1,
    + RIPE-MD160, SHA-224/256, SHA-384/512), MACs (HMAC for all hash
    + algorithms), public key algorithms (RSA, DSA), large integer functions,
    + random numbers and a lot of supporting functions. Some algorithms have
    + been disabled to reduce size (Blowfish, CAST5, Twofish, Serpent,
    + RC2, SEED, Camellia, CRC, MD4, TIGER-192, Whirlpool, ElGamal, ECC).
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-asm \
    +	--with-gpg-error-prefix="$(STAGING_DIR)/usr" \
    +	--enable-digests="md5 rmd160 sha1 sha256 sha512" \
    +	--enable-ciphers="arcfour des aes" \
    +	--enable-pubkey-ciphers="rsa dsa" \
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/bin $(2)/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/share/aclocal
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libgcrypt-config $(1)/usr/bin/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/gcrypt*.h $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.{la,a,so*} $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libgcrypt.m4 $(1)/usr/share/aclocal/
    +	$(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/libgcrypt-config
    +	$(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/libgcrypt-config
    +	ln -sf $(STAGING_DIR)/usr/bin/libgcrypt-config $(2)/bin/
    +endef
    +
    +define Package/libgcrypt/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libgcrypt))
    diff --git a/libs/libgcrypt/patches/001-mips-h-constraint.patch b/libs/libgcrypt/patches/001-mips-h-constraint.patch
    new file mode 100644
    index 0000000..b84cce6
    --- /dev/null
    +++ b/libs/libgcrypt/patches/001-mips-h-constraint.patch
    @@ -0,0 +1,70 @@
    +The MIPS port for GCC-4.4 no longer recognizes the h asm constraint.
    +Patch from: https://forum.openwrt.org/viewtopic.php?id=20520
    +
    +--- a/mpi/longlong.h
    ++++ b/mpi/longlong.h
    +@@ -710,18 +710,35 @@ extern USItype __udiv_qrnnd ();
    + #endif /* __m88110__ */
    + #endif /* __m88000__ */
    + 
    ++/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
    ++#if defined (__GNUC__) && defined (__GNUC_MINOR__)
    ++#define __GNUC_PREREQ(maj, min) \
    ++	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
    ++#else
    ++#define __GNUC_PREREQ(maj, min)  0
    ++#endif
    ++
    + /***************************************
    +  **************  MIPS  *****************
    +  ***************************************/
    + #if defined (__mips__) && W_TYPE_SIZE == 32
    +-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
    ++#if __GNUC_PREREQ (4,4)
    ++#define umul_ppmm(w1, w0, u, v) \
    ++  do {                                                                 \
    ++    UDItype __ll = (UDItype)(u) * (v);                                 \
    ++    w1 = __ll >> 32;                                                   \
    ++    w0 = __ll;                                                         \
    ++  } while (0)
    ++#endif
    ++#if !defined (umul_ppmm) && __GNUC_PREREQ (2,7)
    + #define umul_ppmm(w1, w0, u, v) \
    +   __asm__ ("multu %2,%3"                                                \
    + 	   : "=l" ((USItype)(w0)),                                      \
    + 	     "=h" ((USItype)(w1))                                       \
    + 	   : "d" ((USItype)(u)),                                        \
    + 	     "d" ((USItype)(v)))
    +-#else
    ++#endif
    ++#if !defined (umul_ppmm)
    + #define umul_ppmm(w1, w0, u, v) \
    +   __asm__ ("multu %2,%3 \n" \
    + 	   "mflo %0 \n"     \
    +@@ -739,14 +756,24 @@ extern USItype __udiv_qrnnd ();
    +  **************  MIPS/64  **************
    +  ***************************************/
    + #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
    +-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
    ++#if __GNUC_PREREQ (4,4)
    ++#define umul_ppmm(w1, w0, u, v) \
    ++  do {                                                                 \
    ++    typedef unsigned int __ll_UTItype __attribute__((mode(TI)));       \
    ++    __ll_UTItype __ll = (__ll_UTItype)(u) * (v);                       \
    ++    w1 = __ll >> 64;                                                   \
    ++    w0 = __ll;                                                         \
    ++  } while (0)
    ++#endif
    ++#if !defined (umul_ppmm) && __GNUC_PREREQ (2,7)
    + #define umul_ppmm(w1, w0, u, v) \
    +   __asm__ ("dmultu %2,%3"                                               \
    + 	   : "=l" ((UDItype)(w0)),                                      \
    + 	     "=h" ((UDItype)(w1))                                       \
    + 	   : "d" ((UDItype)(u)),                                        \
    + 	     "d" ((UDItype)(v)))
    +-#else
    ++#endif
    ++#if !defined (umul_ppmm)
    + #define umul_ppmm(w1, w0, u, v) \
    +   __asm__ ("dmultu %2,%3 \n"    \
    + 	   "mflo %0 \n"         \
    diff --git a/libs/libgcrypt/patches/002-no_docs_tests.patch b/libs/libgcrypt/patches/002-no_docs_tests.patch
    new file mode 100644
    index 0000000..0132c08
    --- /dev/null
    +++ b/libs/libgcrypt/patches/002-no_docs_tests.patch
    @@ -0,0 +1,26 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -22,8 +22,8 @@ AUTOMAKE_OPTIONS = dist-bzip2
    + DISTCHECK_CONFIGURE_FLAGS = --enable-random-daemon \
    +   --enable-ciphers=arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia
    + 
    +-DIST_SUBDIRS = m4 mpi cipher random src doc tests
    +-SUBDIRS = mpi cipher random src doc tests
    ++DIST_SUBDIRS = m4 mpi cipher random src
    ++SUBDIRS = mpi cipher random src
    + EXTRA_DIST = autogen.sh README.SVN
    + DISTCLEANFILES = 
    + 
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -239,8 +239,8 @@ AUTOMAKE_OPTIONS = dist-bzip2
    + DISTCHECK_CONFIGURE_FLAGS = --enable-random-daemon \
    +   --enable-ciphers=arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia
    + 
    +-DIST_SUBDIRS = m4 mpi cipher random src doc tests
    +-SUBDIRS = mpi cipher random src doc tests
    ++DIST_SUBDIRS = m4 mpi cipher random src
    ++SUBDIRS = mpi cipher random src
    + EXTRA_DIST = autogen.sh README.SVN
    + DISTCLEANFILES = 
    + all: config.h
    diff --git a/libs/libgpg-error/Makefile b/libs/libgpg-error/Makefile
    new file mode 100644
    index 0000000..77f8835
    --- /dev/null
    +++ b/libs/libgpg-error/Makefile
    @@ -0,0 +1,85 @@
    +#
    +# Copyright (C) 2005-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libgpg-error
    +PKG_VERSION:=1.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=ftp://ftp.gnupg.org/gcrypt/libgpg-error/ \
    +	http://mirrors.rootmode.com/ftp.gnupg.org/libgpg-error/ \
    +	http://gulus.usherbrooke.ca/pub/appl/GnuPG/libgpg-error/ \
    +	http://gnupg.unixmexico.org/ftp/libgpg-error/
    +PKG_MD5SUM:=62c0d09d1e76c5b6da8fff92314c4665
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +PKG_INSTALL=1
    +
    +define Package/libgpg-error
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=GnuPG error handling helper library
    +  URL:=http://www.gnupg.org/related_software/libgpg-error/
    +endef
    +
    +define Package/libgpg-error/description
    +	An helper library for common error codes and descriptions.
    +	This is a library that defines common error values for all GnuPG 
    +	components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, 
    +	Libksba, DirMngr, Pinentry, SmartCard Daemon and possibly more in the 
    +	future.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +		--disable-rpath \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin $(1)/usr/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/gpg-error-config \
    +		$(2)/bin/
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
    +		$(2)/bin/gpg-error-config
    +	ln -sf $(STAGING_DIR)/host/bin/gpg-error-config $(1)/usr/bin/gpg-error-config
    +
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/gpg-error.h \
    +		$(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libgpg-error.{la,a,so*} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/share/aclocal
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/share/aclocal/gpg-error.m4 \
    +		$(1)/usr/share/aclocal/
    +endef
    +
    +define Package/libgpg-error/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libgpg-error.so.* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libgpg-error))
    diff --git a/libs/libgphoto2/Makefile b/libs/libgphoto2/Makefile
    new file mode 100644
    index 0000000..8ecea47
    --- /dev/null
    +++ b/libs/libgphoto2/Makefile
    @@ -0,0 +1,102 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libgphoto2
    +PKG_VERSION:=2.4.9
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/gphoto
    +PKG_MD5SUM:=32b233189e3df7e5e67d2a81163682b8
    +
    +PKG_FIXUP:=libtool
    +PKG_LIBTOOL_PATHS:=. libgphoto2_port
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/libgphoto2/Default
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  URL:=http://www.gphoto.org/
    +endef
    +
    +define Package/libgphoto2
    +  $(call Package/libgphoto2/Default)
    +  DEPENDS:=+libusb +libexif +libjpeg +libpthread +libltdl $(ICONV_DEPENDS)
    +  TITLE:=The basic library of the gphoto2 program.
    +  MENU:=1
    +endef
    +
    +define Package/libgphoto2-drivers
    +  $(call Package/libgphoto2/Default)
    +  DEPENDS:=libgphoto2
    +  TITLE:=Gphoto2 drivers for various cameras
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-rpath \
    +	--with-drivers=all \
    +	--without-included-ltdl \
    +	--without-libiconv-prefix \
    +	--without-libintl-prefix \
    +
    +CONFIGURE_VARS += \
    +	CPPFLAGS="$$$$CPPFLAGS $(ICONV_CFLAGS)" \
    +	LDFLAGS="$$$$LDFLAGS $(ICONV_LDFLAGS)" \
    +	LIBEXIF_CFLAGS="$$$$CPPFLAGS" \
    +	LIBEXIF_LIBS="$$$$LDFLAGS -lexif" \
    +	LIBUSB_CFLAGS="$$$$CPPFLAGS" \
    +	LIBUSB_LIBS="$$$$LDFLAGS -lusb" \
    +	LIBS="-lltdl" \
    +
    +# If OpenWrt is using the iconv stub, we disable iconv support 
    +# in libgphoto2 entirely since the stub lacks some essential
    +# conversions like UCS-2 to UTF-8 which will let certain drivers
    +# fail with "Failed to create iconv converter" .
    +ifneq ($(ICONV_FULL),1)
    +  CONFIGURE_VARS += am_cv_func_iconv=no am_cv_lib_iconv=no
    +endif
    +
    +MAKE_FLAGS += \
    +	LIBLTDL="" \
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gphoto2{,-port}-config $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/gphoto2 $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port}.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgphoto2.pc $(1)/usr/lib/pkgconfig/
    +	$(SED) 's,-I$$$${prefix}/include/gphoto2,,g' $(1)/usr/bin/gphoto2{,-port}-config
    +	$(SED) 's,-I$$$${prefix}/include,,g' $(1)/usr/bin/gphoto2{,-port}-config
    +	# remove annoying recursive symlink
    +	rm -f $(1)/usr/include/gphoto2/gphoto2
    +endef
    +
    +define Package/libgphoto2/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port}.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/libgphoto2-drivers/install
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port} $(1)/usr/lib/
    +	rm -rf $(1)/usr/lib/libgphoto2{,_port}/*/*.{,l}a
    +endef
    +
    +$(eval $(call BuildPackage,libgphoto2))
    +$(eval $(call BuildPackage,libgphoto2-drivers))
    diff --git a/libs/libgphoto2/patches/001-automake-compat.patch b/libs/libgphoto2/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..0da6e46
    --- /dev/null
    +++ b/libs/libgphoto2/patches/001-automake-compat.patch
    @@ -0,0 +1,53 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -227,7 +227,6 @@ ALL_LINGUAS="da de es eu fr hu it ja nl 
    + GP_GETTEXT_HACK([${PACKAGE}-${LIBGPHOTO2_CURRENT_MIN}],[The gPhoto Team],[${MAIL_GPHOTO_TRANSLATION}])
    + AM_GNU_GETTEXT_VERSION([0.14.1])
    + AM_GNU_GETTEXT([external])
    +-AM_PO_SUBDIRS()
    + AM_ICONV()
    + GP_GETTEXT_FLAGS()
    + 
    +--- a/libgphoto2_port/configure.ac
    ++++ b/libgphoto2_port/configure.ac
    +@@ -116,7 +116,6 @@ GP_GETTEXT_HACK([${PACKAGE}-${LIBGPHOTO2
    + ALL_LINGUAS="cs da de fr es eu it ja nl pl pt_BR ru sk sv uk vi zh_CN zh_TW"
    + AM_GNU_GETTEXT_VERSION([0.14.1])
    + AM_GNU_GETTEXT([external])
    +-AM_PO_SUBDIRS()
    + AM_ICONV()
    + GP_GETTEXT_FLAGS()
    + 
    +--- a/libgphoto2_port/libgphoto2_port/Makefile.in
    ++++ b/libgphoto2_port/libgphoto2_port/Makefile.in
    +@@ -14,6 +14,8 @@
    + 
    + @SET_MAKE@
    + 
    ++SHELL = @SHELL@
    ++
    + VPATH = @srcdir@
    + pkgdatadir = $(datadir)/@PACKAGE@
    + pkglibdir = $(libdir)/@PACKAGE@
    +--- a/libgphoto2_port/Makefile.in
    ++++ b/libgphoto2_port/Makefile.in
    +@@ -14,7 +14,7 @@
    + 
    + @SET_MAKE@
    + 
    +-
    ++SHELL = @SHELL@
    + 
    + VPATH = @srcdir@
    + pkgdatadir = $(datadir)/@PACKAGE@
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -19,7 +19,7 @@
    + ########################################################################
    + # put file lists and special compile rules here
    + 
    +-
    ++SHELL = @SHELL@
    + 
    + VPATH = @srcdir@
    + pkgdatadir = $(datadir)/@PACKAGE@
    diff --git a/libs/libgphoto2/patches/002-no-tests-docs-examples-translations.patch b/libs/libgphoto2/patches/002-no-tests-docs-examples-translations.patch
    new file mode 100644
    index 0000000..36a64aa
    --- /dev/null
    +++ b/libs/libgphoto2/patches/002-no-tests-docs-examples-translations.patch
    @@ -0,0 +1,86 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -628,20 +628,11 @@ camlibs/konica/localization/Makefile
    + libgphoto2/Makefile
    + libgphoto2.pc
    + libgphoto2-uninstalled.pc
    +-examples/Makefile
    +-tests/Makefile
    +-tests/check-camera-list.sh
    +-tests/ddb/Makefile
    +-tests/ddb/check-ddb.sh
    + packaging/Makefile
    + packaging/linux-hotplug/Makefile
    + packaging/generic/Makefile
    + packaging/rpm/Makefile
    + packaging/rpm/package.spec
    +-po/Makefile.in
    +-doc/Makefile
    +-doc/Doxyfile
    +-doc/api/Makefile
    + ],[
    + dnl This relies on this code being called for each of the above files
    + dnl with ac_file set to the filename.
    +--- a/libgphoto2_port/configure.ac
    ++++ b/libgphoto2_port/configure.ac
    +@@ -483,7 +483,6 @@ AC_SUBST([AM_LDFLAGS])
    + # ---------------------------------------------------------------------------
    + AC_CONFIG_FILES([
    + Makefile
    +-po/Makefile.in
    + libgphoto2_port/Makefile
    + libgphoto2_port.pc
    + libgphoto2_port-uninstalled.pc
    +@@ -494,8 +493,6 @@ usbscsi/Makefile
    + disk/Makefile
    + ptpip/Makefile
    + gphoto2-port-config
    +-test/Makefile
    +-doc/Makefile
    + m4/Makefile
    + ])
    + AC_OUTPUT
    +--- a/libgphoto2_port/Makefile.am
    ++++ b/libgphoto2_port/Makefile.am
    +@@ -10,7 +10,7 @@ VERSION_FLAGS = -DLIBGPPORT_VERSION=\"@L
    + bin_SCRIPTS = gphoto2-port-config
    + 
    + # Note: @subdirs@ lists all the directories from AC_CONFIG_SUBDIRS()
    +-SUBDIRS = po libgphoto2_port test @IOLIB_SUBDIRS@ doc m4
    ++SUBDIRS = libgphoto2_port @IOLIB_SUBDIRS@ m4
    + 
    + EXTRA_DIST =   		\
    + 	AUTHORS \
    +--- a/libgphoto2_port/Makefile.in
    ++++ b/libgphoto2_port/Makefile.in
    +@@ -271,7 +271,7 @@ VERSION_FLAGS = -DLIBGPPORT_VERSION=\"@L
    + bin_SCRIPTS = gphoto2-port-config
    + 
    + # Note: @subdirs@ lists all the directories from AC_CONFIG_SUBDIRS()
    +-SUBDIRS = po libgphoto2_port test @IOLIB_SUBDIRS@ doc m4
    ++SUBDIRS = libgphoto2_port @IOLIB_SUBDIRS@ m4
    + EXTRA_DIST = AUTHORS ChangeLog COPYING.LIB NEWS README iolib.sym \
    + 	gphoto2-port-config.in libgphoto2_port.pc.in \
    + 	libgphoto2_port-uninstalled.pc.in \
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -8,7 +8,7 @@ bin_SCRIPTS = gphoto2-config
    + EXTRA_DIST = HACKING MAINTAINERS TESTERS installcheck.mk README.packaging
    + 
    + # Note: @subdirs@ lists all the directories from AC_CONFIG_SUBDIRS()
    +-SUBDIRS = @subdirs@ libgphoto2 camlibs tests examples po packaging doc
    ++SUBDIRS = @subdirs@ libgphoto2 camlibs packaging
    + 
    + EXTRA_DIST    += libgphoto2.pc.in
    + pkgconfig_DATA = libgphoto2.pc
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -302,7 +302,7 @@ EXTRA_DIST = HACKING MAINTAINERS TESTERS
    + 	ChangeLog INSTALL README.in README README.packaging
    + 
    + # Note: @subdirs@ lists all the directories from AC_CONFIG_SUBDIRS()
    +-SUBDIRS = @subdirs@ libgphoto2 camlibs tests examples po packaging doc
    ++SUBDIRS = @subdirs@ libgphoto2 camlibs packaging
    + pkgconfig_DATA = libgphoto2.pc
    + noinst_DATA = libgphoto2-uninstalled.pc
    + doc_DATA = AUTHORS COPYING NEWS ABOUT-NLS ChangeLog README \
    diff --git a/libs/libgssapi/Makefile b/libs/libgssapi/Makefile
    new file mode 100644
    index 0000000..88ebcbc
    --- /dev/null
    +++ b/libs/libgssapi/Makefile
    @@ -0,0 +1,51 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libgssapi
    +PKG_VERSION:=0.11
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.citi.umich.edu/projects/nfsv4/linux/libgssapi/
    +PKG_MD5SUM:=0e5b4c7267724f8ddf64bc35514c272e
    +
    +PKG_BUILD_PARALLEL:=1
    +PKG_INSTALL:=1
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libgssapi
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=required libraries for the nfs-utils
    +  URL:=http://www.citi.umich.edu/projects/nfsv4/linux
    +endef
    +
    +define Package/libgssapi/description
    + Support libraries - for newer nfs mount command (nfs4)
    +endef
    +
    +TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib $(FPIC)
    +
    +MAKE_FLAGS += \
    +	OPT="$(TARGET_CFLAGS)" \
    +	INSTALLSUID="install -m 4755" \
    +	DESTDIR="$(PKG_INSTALL_DIR)"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/gssglue/gssapi
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/gssglue/gssapi/gssapi.h $(1)/usr/include/gssglue/gssapi
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgssapi.{a,so*} $(1)/usr/lib
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgssapi.pc $(1)/usr/lib/pkgconfig
    +endef
    +
    +$(eval $(call BuildPackage,libgssapi))
    diff --git a/libs/libiconv-full/Makefile b/libs/libiconv-full/Makefile
    new file mode 100644
    index 0000000..7c1e574
    --- /dev/null
    +++ b/libs/libiconv-full/Makefile
    @@ -0,0 +1,86 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libiconv-full
    +PKG_VERSION:=1.11.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=libiconv-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@GNU/libiconv
    +PKG_MD5SUM:=d42b97f6ef5dd0ba4469d520ed732fed
    +PKG_BUILD_DIR:=$(BUILD_DIR)/libiconv-$(PKG_VERSION)
    +
    +PKG_FIXUP = libtool no-autoreconf
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libiconv-full/Default
    +  URL:=http://www.gnu.org/software/libiconv/
    +  TITLE:=Character set conversion
    +endef
    +
    +define Package/libiconv-full
    +  $(call Package/libiconv-full/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= library
    +endef
    +
    +define Package/libcharset
    +  $(call Package/libiconv-full/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= library
    +endef
    +
    +define Package/iconv
    +  $(call Package/libiconv-full/Default)
    +  DEPENDS:=+libiconv-full +libcharset
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  TITLE+= utility
    +endef
    +
    +TARGET_CFLAGS += $(FPIC) -DUSE_DOS
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-rpath \
    +	--enable-relocatable
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		CC="$(TARGET_CC)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/lib/libiconv-full/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/iconv.h $(1)/usr/lib/libiconv-full/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/libiconv-full/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcharset.{a,so*} $(1)/usr/lib/libiconv-full/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libiconv.{a,so*} $(1)/usr/lib/libiconv-full/lib/
    +endef
    +
    +define Package/libcharset/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcharset.so* $(1)/usr/lib/
    +endef
    +
    +define Package/libiconv-full/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libiconv.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libcharset))
    +$(eval $(call BuildPackage,libiconv-full))
    +$(eval $(call BuildPackage,iconv))
    diff --git a/libs/libiconv-full/patches/100-strip_charsets.patch b/libs/libiconv-full/patches/100-strip_charsets.patch
    new file mode 100644
    index 0000000..e4f49ae
    --- /dev/null
    +++ b/libs/libiconv-full/patches/100-strip_charsets.patch
    @@ -0,0 +1,3438 @@
    +--- a/lib/aliases_dos.h
    ++++ b/lib/aliases_dos.h
    +@@ -2,47 +2,3 @@
    +   S(dos_1, "IBM437", ei_cp437 )
    +   S(dos_2, "437", ei_cp437 )
    +   S(dos_3, "CSPC8CODEPAGE437", ei_cp437 )
    +-  S(dos_4, "CP737", ei_cp737 )
    +-  S(dos_5, "CP775", ei_cp775 )
    +-  S(dos_6, "IBM775", ei_cp775 )
    +-  S(dos_7, "CSPC775BALTIC", ei_cp775 )
    +-  S(dos_8, "CP852", ei_cp852 )
    +-  S(dos_9, "IBM852", ei_cp852 )
    +-  S(dos_10, "852", ei_cp852 )
    +-  S(dos_11, "CSPCP852", ei_cp852 )
    +-  S(dos_12, "CP853", ei_cp853 )
    +-  S(dos_13, "CP855", ei_cp855 )
    +-  S(dos_14, "IBM855", ei_cp855 )
    +-  S(dos_15, "855", ei_cp855 )
    +-  S(dos_16, "CSIBM855", ei_cp855 )
    +-  S(dos_17, "CP857", ei_cp857 )
    +-  S(dos_18, "IBM857", ei_cp857 )
    +-  S(dos_19, "857", ei_cp857 )
    +-  S(dos_20, "CSIBM857", ei_cp857 )
    +-  S(dos_21, "CP858", ei_cp858 )
    +-  S(dos_22, "CP860", ei_cp860 )
    +-  S(dos_23, "IBM860", ei_cp860 )
    +-  S(dos_24, "860", ei_cp860 )
    +-  S(dos_25, "CSIBM860", ei_cp860 )
    +-  S(dos_26, "CP861", ei_cp861 )
    +-  S(dos_27, "IBM861", ei_cp861 )
    +-  S(dos_28, "861", ei_cp861 )
    +-  S(dos_29, "CP-IS", ei_cp861 )
    +-  S(dos_30, "CSIBM861", ei_cp861 )
    +-  S(dos_31, "CP863", ei_cp863 )
    +-  S(dos_32, "IBM863", ei_cp863 )
    +-  S(dos_33, "863", ei_cp863 )
    +-  S(dos_34, "CSIBM863", ei_cp863 )
    +-  S(dos_35, "CP864", ei_cp864 )
    +-  S(dos_36, "IBM864", ei_cp864 )
    +-  S(dos_37, "CSIBM864", ei_cp864 )
    +-  S(dos_38, "CP865", ei_cp865 )
    +-  S(dos_39, "IBM865", ei_cp865 )
    +-  S(dos_40, "865", ei_cp865 )
    +-  S(dos_41, "CSIBM865", ei_cp865 )
    +-  S(dos_42, "CP869", ei_cp869 )
    +-  S(dos_43, "IBM869", ei_cp869 )
    +-  S(dos_44, "869", ei_cp869 )
    +-  S(dos_45, "CP-GR", ei_cp869 )
    +-  S(dos_46, "CSIBM869", ei_cp869 )
    +-  S(dos_47, "CP1125", ei_cp1125 )
    +--- a/lib/aliases.gperf
    ++++ b/lib/aliases.gperf
    +@@ -48,8 +48,6 @@ UCS-2-INTERNAL, ei_ucs2internal
    + UCS-2-SWAPPED, ei_ucs2swapped
    + UCS-4-INTERNAL, ei_ucs4internal
    + UCS-4-SWAPPED, ei_ucs4swapped
    +-C99, ei_c99
    +-JAVA, ei_java
    + ISO-8859-1, ei_iso8859_1
    + ISO_8859-1, ei_iso8859_1
    + ISO_8859-1:1987, ei_iso8859_1
    +@@ -68,285 +66,16 @@ LATIN2, ei_iso8859_2
    + L2, ei_iso8859_2
    + CSISOLATIN2, ei_iso8859_2
    + ISO8859-2, ei_iso8859_2
    +-ISO-8859-3, ei_iso8859_3
    +-ISO_8859-3, ei_iso8859_3
    +-ISO_8859-3:1988, ei_iso8859_3
    +-ISO-IR-109, ei_iso8859_3
    +-LATIN3, ei_iso8859_3
    +-L3, ei_iso8859_3
    +-CSISOLATIN3, ei_iso8859_3
    +-ISO8859-3, ei_iso8859_3
    +-ISO-8859-4, ei_iso8859_4
    +-ISO_8859-4, ei_iso8859_4
    +-ISO_8859-4:1988, ei_iso8859_4
    +-ISO-IR-110, ei_iso8859_4
    +-LATIN4, ei_iso8859_4
    +-L4, ei_iso8859_4
    +-CSISOLATIN4, ei_iso8859_4
    +-ISO8859-4, ei_iso8859_4
    +-ISO-8859-5, ei_iso8859_5
    +-ISO_8859-5, ei_iso8859_5
    +-ISO_8859-5:1988, ei_iso8859_5
    +-ISO-IR-144, ei_iso8859_5
    +-CYRILLIC, ei_iso8859_5
    +-CSISOLATINCYRILLIC, ei_iso8859_5
    +-ISO8859-5, ei_iso8859_5
    +-ISO-8859-6, ei_iso8859_6
    +-ISO_8859-6, ei_iso8859_6
    +-ISO_8859-6:1987, ei_iso8859_6
    +-ISO-IR-127, ei_iso8859_6
    +-ECMA-114, ei_iso8859_6
    +-ASMO-708, ei_iso8859_6
    +-ARABIC, ei_iso8859_6
    +-CSISOLATINARABIC, ei_iso8859_6
    +-ISO8859-6, ei_iso8859_6
    +-ISO-8859-7, ei_iso8859_7
    +-ISO_8859-7, ei_iso8859_7
    +-ISO_8859-7:1987, ei_iso8859_7
    +-ISO_8859-7:2003, ei_iso8859_7
    +-ISO-IR-126, ei_iso8859_7
    +-ECMA-118, ei_iso8859_7
    +-ELOT_928, ei_iso8859_7
    +-GREEK8, ei_iso8859_7
    +-GREEK, ei_iso8859_7
    +-CSISOLATINGREEK, ei_iso8859_7
    +-ISO8859-7, ei_iso8859_7
    +-ISO-8859-8, ei_iso8859_8
    +-ISO_8859-8, ei_iso8859_8
    +-ISO_8859-8:1988, ei_iso8859_8
    +-ISO-IR-138, ei_iso8859_8
    +-HEBREW, ei_iso8859_8
    +-CSISOLATINHEBREW, ei_iso8859_8
    +-ISO8859-8, ei_iso8859_8
    +-ISO-8859-9, ei_iso8859_9
    +-ISO_8859-9, ei_iso8859_9
    +-ISO_8859-9:1989, ei_iso8859_9
    +-ISO-IR-148, ei_iso8859_9
    +-LATIN5, ei_iso8859_9
    +-L5, ei_iso8859_9
    +-CSISOLATIN5, ei_iso8859_9
    +-ISO8859-9, ei_iso8859_9
    +-ISO-8859-10, ei_iso8859_10
    +-ISO_8859-10, ei_iso8859_10
    +-ISO_8859-10:1992, ei_iso8859_10
    +-ISO-IR-157, ei_iso8859_10
    +-LATIN6, ei_iso8859_10
    +-L6, ei_iso8859_10
    +-CSISOLATIN6, ei_iso8859_10
    +-ISO8859-10, ei_iso8859_10
    +-ISO-8859-11, ei_iso8859_11
    +-ISO_8859-11, ei_iso8859_11
    +-ISO8859-11, ei_iso8859_11
    +-ISO-8859-13, ei_iso8859_13
    +-ISO_8859-13, ei_iso8859_13
    +-ISO-IR-179, ei_iso8859_13
    +-LATIN7, ei_iso8859_13
    +-L7, ei_iso8859_13
    +-ISO8859-13, ei_iso8859_13
    +-ISO-8859-14, ei_iso8859_14
    +-ISO_8859-14, ei_iso8859_14
    +-ISO_8859-14:1998, ei_iso8859_14
    +-ISO-IR-199, ei_iso8859_14
    +-LATIN8, ei_iso8859_14
    +-L8, ei_iso8859_14
    +-ISO-CELTIC, ei_iso8859_14
    +-ISO8859-14, ei_iso8859_14
    + ISO-8859-15, ei_iso8859_15
    + ISO_8859-15, ei_iso8859_15
    + ISO_8859-15:1998, ei_iso8859_15
    + ISO-IR-203, ei_iso8859_15
    + LATIN-9, ei_iso8859_15
    + ISO8859-15, ei_iso8859_15
    +-ISO-8859-16, ei_iso8859_16
    +-ISO_8859-16, ei_iso8859_16
    +-ISO_8859-16:2001, ei_iso8859_16
    +-ISO-IR-226, ei_iso8859_16
    +-LATIN10, ei_iso8859_16
    +-L10, ei_iso8859_16
    +-ISO8859-16, ei_iso8859_16
    + KOI8-R, ei_koi8_r
    + CSKOI8R, ei_koi8_r
    +-KOI8-U, ei_koi8_u
    +-KOI8-RU, ei_koi8_ru
    + CP1250, ei_cp1250
    + WINDOWS-1250, ei_cp1250
    + MS-EE, ei_cp1250
    +-CP1251, ei_cp1251
    +-WINDOWS-1251, ei_cp1251
    +-MS-CYRL, ei_cp1251
    +-CP1252, ei_cp1252
    +-WINDOWS-1252, ei_cp1252
    +-MS-ANSI, ei_cp1252
    +-CP1253, ei_cp1253
    +-WINDOWS-1253, ei_cp1253
    +-MS-GREEK, ei_cp1253
    +-CP1254, ei_cp1254
    +-WINDOWS-1254, ei_cp1254
    +-MS-TURK, ei_cp1254
    +-CP1255, ei_cp1255
    +-WINDOWS-1255, ei_cp1255
    +-MS-HEBR, ei_cp1255
    +-CP1256, ei_cp1256
    +-WINDOWS-1256, ei_cp1256
    +-MS-ARAB, ei_cp1256
    +-CP1257, ei_cp1257
    +-WINDOWS-1257, ei_cp1257
    +-WINBALTRIM, ei_cp1257
    +-CP1258, ei_cp1258
    +-WINDOWS-1258, ei_cp1258
    +-CP850, ei_cp850
    +-IBM850, ei_cp850
    +-850, ei_cp850
    +-CSPC850MULTILINGUAL, ei_cp850
    +-CP862, ei_cp862
    +-IBM862, ei_cp862
    +-862, ei_cp862
    +-CSPC862LATINHEBREW, ei_cp862
    +-CP866, ei_cp866
    +-IBM866, ei_cp866
    +-866, ei_cp866
    +-CSIBM866, ei_cp866
    +-MACROMAN, ei_mac_roman
    +-MACINTOSH, ei_mac_roman
    +-MAC, ei_mac_roman
    +-CSMACINTOSH, ei_mac_roman
    +-MACCENTRALEUROPE, ei_mac_centraleurope
    +-MACICELAND, ei_mac_iceland
    +-MACCROATIAN, ei_mac_croatian
    +-MACROMANIA, ei_mac_romania
    +-MACCYRILLIC, ei_mac_cyrillic
    +-MACUKRAINE, ei_mac_ukraine
    +-MACGREEK, ei_mac_greek
    +-MACTURKISH, ei_mac_turkish
    +-MACHEBREW, ei_mac_hebrew
    +-MACARABIC, ei_mac_arabic
    +-MACTHAI, ei_mac_thai
    +-HP-ROMAN8, ei_hp_roman8
    +-ROMAN8, ei_hp_roman8
    +-R8, ei_hp_roman8
    +-CSHPROMAN8, ei_hp_roman8
    +-NEXTSTEP, ei_nextstep
    +-ARMSCII-8, ei_armscii_8
    +-GEORGIAN-ACADEMY, ei_georgian_academy
    +-GEORGIAN-PS, ei_georgian_ps
    +-KOI8-T, ei_koi8_t
    +-PT154, ei_pt154
    +-PTCP154, ei_pt154
    +-CP154, ei_pt154
    +-CYRILLIC-ASIAN, ei_pt154
    +-CSPTCP154, ei_pt154
    +-MULELAO-1, ei_mulelao
    +-CP1133, ei_cp1133
    +-IBM-CP1133, ei_cp1133
    +-TIS-620, ei_tis620
    +-TIS620, ei_tis620
    +-TIS620-0, ei_tis620
    +-TIS620.2529-1, ei_tis620
    +-TIS620.2533-0, ei_tis620
    +-TIS620.2533-1, ei_tis620
    +-ISO-IR-166, ei_tis620
    +-CP874, ei_cp874
    +-WINDOWS-874, ei_cp874
    +-VISCII, ei_viscii
    +-VISCII1.1-1, ei_viscii
    +-CSVISCII, ei_viscii
    +-TCVN, ei_tcvn
    +-TCVN-5712, ei_tcvn
    +-TCVN5712-1, ei_tcvn
    +-TCVN5712-1:1993, ei_tcvn
    +-JIS_C6220-1969-RO, ei_iso646_jp
    +-ISO646-JP, ei_iso646_jp
    +-ISO-IR-14, ei_iso646_jp
    +-JP, ei_iso646_jp
    +-CSISO14JISC6220RO, ei_iso646_jp
    +-JIS_X0201, ei_jisx0201
    +-JISX0201-1976, ei_jisx0201
    +-X0201, ei_jisx0201
    +-CSHALFWIDTHKATAKANA, ei_jisx0201
    +-JIS_X0208, ei_jisx0208
    +-JIS_X0208-1983, ei_jisx0208
    +-JIS_X0208-1990, ei_jisx0208
    +-JIS0208, ei_jisx0208
    +-X0208, ei_jisx0208
    +-ISO-IR-87, ei_jisx0208
    +-JIS_C6226-1983, ei_jisx0208
    +-CSISO87JISX0208, ei_jisx0208
    +-JIS_X0212, ei_jisx0212
    +-JIS_X0212.1990-0, ei_jisx0212
    +-JIS_X0212-1990, ei_jisx0212
    +-X0212, ei_jisx0212
    +-ISO-IR-159, ei_jisx0212
    +-CSISO159JISX02121990, ei_jisx0212
    +-GB_1988-80, ei_iso646_cn
    +-ISO646-CN, ei_iso646_cn
    +-ISO-IR-57, ei_iso646_cn
    +-CN, ei_iso646_cn
    +-CSISO57GB1988, ei_iso646_cn
    +-GB_2312-80, ei_gb2312
    +-ISO-IR-58, ei_gb2312
    +-CSISO58GB231280, ei_gb2312
    +-CHINESE, ei_gb2312
    +-ISO-IR-165, ei_isoir165
    +-CN-GB-ISOIR165, ei_isoir165
    +-KSC_5601, ei_ksc5601
    +-KS_C_5601-1987, ei_ksc5601
    +-KS_C_5601-1989, ei_ksc5601
    +-ISO-IR-149, ei_ksc5601
    +-CSKSC56011987, ei_ksc5601
    +-KOREAN, ei_ksc5601
    +-EUC-JP, ei_euc_jp
    +-EUCJP, ei_euc_jp
    +-EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE, ei_euc_jp
    +-CSEUCPKDFMTJAPANESE, ei_euc_jp
    +-SHIFT_JIS, ei_sjis
    +-SHIFT-JIS, ei_sjis
    +-SJIS, ei_sjis
    +-MS_KANJI, ei_sjis
    +-CSSHIFTJIS, ei_sjis
    +-CP932, ei_cp932
    +-ISO-2022-JP, ei_iso2022_jp
    +-CSISO2022JP, ei_iso2022_jp
    +-ISO-2022-JP-1, ei_iso2022_jp1
    +-ISO-2022-JP-2, ei_iso2022_jp2
    +-CSISO2022JP2, ei_iso2022_jp2
    +-EUC-CN, ei_euc_cn
    +-EUCCN, ei_euc_cn
    +-GB2312, ei_euc_cn
    +-CN-GB, ei_euc_cn
    +-CSGB2312, ei_euc_cn
    +-GBK, ei_ces_gbk
    +-CP936, ei_cp936
    +-MS936, ei_cp936
    +-WINDOWS-936, ei_cp936
    +-GB18030, ei_gb18030
    +-ISO-2022-CN, ei_iso2022_cn
    +-CSISO2022CN, ei_iso2022_cn
    +-ISO-2022-CN-EXT, ei_iso2022_cn_ext
    +-HZ, ei_hz
    +-HZ-GB-2312, ei_hz
    +-EUC-TW, ei_euc_tw
    +-EUCTW, ei_euc_tw
    +-CSEUCTW, ei_euc_tw
    +-BIG5, ei_ces_big5
    +-BIG-5, ei_ces_big5
    +-BIG-FIVE, ei_ces_big5
    +-BIGFIVE, ei_ces_big5
    +-CN-BIG5, ei_ces_big5
    +-CSBIG5, ei_ces_big5
    +-CP950, ei_cp950
    +-BIG5-HKSCS:1999, ei_big5hkscs1999
    +-BIG5-HKSCS:2001, ei_big5hkscs2001
    +-BIG5-HKSCS, ei_big5hkscs2004
    +-BIG5HKSCS, ei_big5hkscs2004
    +-BIG5-HKSCS:2004, ei_big5hkscs2004
    +-EUC-KR, ei_euc_kr
    +-EUCKR, ei_euc_kr
    +-CSEUCKR, ei_euc_kr
    +-CP949, ei_cp949
    +-UHC, ei_cp949
    +-JOHAB, ei_johab
    +-CP1361, ei_johab
    +-ISO-2022-KR, ei_iso2022_kr
    +-CSISO2022KR, ei_iso2022_kr
    + CHAR, ei_local_char
    + WCHAR_T, ei_local_wchar_t
    +--- a/lib/aliases.h
    ++++ b/lib/aliases.h
    +@@ -1,6 +1,6 @@
    + /* ANSI-C code produced by gperf version 3.0.2 */
    + /* Command-line: gperf -m 10 lib/aliases.gperf  */
    +-/* Computed positions: -k'1,3-11,$' */
    ++/* Computed positions: -k'4-7,10,$' */
    + 
    + #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
    +       && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
    +@@ -32,12 +32,12 @@
    + #line 1 "lib/aliases.gperf"
    + struct alias { int name; unsigned int encoding_index; };
    + 
    +-#define TOTAL_KEYWORDS 341
    ++#define TOTAL_KEYWORDS 70
    + #define MIN_WORD_LENGTH 2
    +-#define MAX_WORD_LENGTH 45
    +-#define MIN_HASH_VALUE 13
    +-#define MAX_HASH_VALUE 997
    +-/* maximum key range = 985, duplicates = 0 */
    ++#define MAX_WORD_LENGTH 17
    ++#define MIN_HASH_VALUE 4
    ++#define MAX_HASH_VALUE 98
    ++/* maximum key range = 95, duplicates = 0 */
    + 
    + #ifdef __GNUC__
    + __inline
    +@@ -49,38 +49,31 @@ inline
    + static unsigned int
    + aliases_hash (register const char *str, register unsigned int len)
    + {
    +-  static const unsigned short asso_values[] =
    ++  static const unsigned char asso_values[] =
    +     {
    +-      998, 998, 998, 998, 998, 998, 998, 998, 998, 998,
    +-      998, 998, 998, 998, 998, 998, 998, 998, 998, 998,
    +-      998, 998, 998, 998, 998, 998, 998, 998, 998, 998,
    +-      998, 998, 998, 998, 998, 998, 998, 998, 998, 998,
    +-      998, 998, 998, 998, 998,   4, 199, 998,  79,   6,
    +-       29,  65,  13,  15,   4,  88,  20,  22, 386, 998,
    +-      998, 998, 998, 998, 998,  47, 188, 110,   6,  26,
    +-       63,  19,  12,   5, 281, 202,   7, 166,  11,   5,
    +-       64, 998,   4,  11,  20, 185, 110, 152, 163,   4,
    +-        4, 998, 998, 998, 998,   5, 998, 998, 998, 998,
    +-      998, 998, 998, 998, 998, 998, 998, 998, 998, 998,
    +-      998, 998, 998, 998, 998, 998, 998, 998, 998, 998,
    +-      998, 998, 998, 998, 998, 998, 998, 998
    ++      99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
    ++      99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
    ++      99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
    ++      99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
    ++      99, 99, 99, 99, 99,  6, 99, 99, 22,  3,
    ++       2,  2, 17,  3,  2,  7,  3,  2, 99, 99,
    ++      99, 99, 99, 99, 99,  4, 53,  2, 21,  2,
    ++      99,  7, 99, 15, 99, 99, 19, 99, 33,  2,
    ++       4, 99, 11, 26, 17, 99, 99,  3, 26, 99,
    ++      99, 99, 99, 99, 99, 10, 99, 99, 99, 99,
    ++      99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
    ++      99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
    ++      99, 99, 99, 99, 99, 99, 99, 99
    +     };
    +   register int hval = len;
    + 
    +   switch (hval)
    +     {
    +       default:
    +-        hval += asso_values[(unsigned char)str[10]];
    +-      /*FALLTHROUGH*/
    +-      case 10:
    +         hval += asso_values[(unsigned char)str[9]];
    +       /*FALLTHROUGH*/
    +       case 9:
    +-        hval += asso_values[(unsigned char)str[8]];
    +-      /*FALLTHROUGH*/
    +       case 8:
    +-        hval += asso_values[(unsigned char)str[7]];
    +-      /*FALLTHROUGH*/
    +       case 7:
    +         hval += asso_values[(unsigned char)str[6]];
    +       /*FALLTHROUGH*/
    +@@ -94,11 +87,7 @@ aliases_hash (register const char *str,
    +         hval += asso_values[(unsigned char)str[3]];
    +       /*FALLTHROUGH*/
    +       case 3:
    +-        hval += asso_values[(unsigned char)str[2]];
    +-      /*FALLTHROUGH*/
    +       case 2:
    +-      case 1:
    +-        hval += asso_values[(unsigned char)str[0]];
    +         break;
    +     }
    +   return hval + asso_values[(unsigned char)str[len - 1]];
    +@@ -106,1576 +95,306 @@ aliases_hash (register const char *str,
    + 
    + struct stringpool_t
    +   {
    +-    char stringpool_str13[sizeof("L6")];
    +-    char stringpool_str15[sizeof("L1")];
    +-    char stringpool_str18[sizeof("HZ")];
    +-    char stringpool_str22[sizeof("L4")];
    +-    char stringpool_str24[sizeof("L5")];
    +-    char stringpool_str26[sizeof("R8")];
    +-    char stringpool_str29[sizeof("L8")];
    +-    char stringpool_str31[sizeof("866")];
    +-    char stringpool_str38[sizeof("L2")];
    +-    char stringpool_str42[sizeof("SJIS")];
    +-    char stringpool_str43[sizeof("ISO-IR-6")];
    +-    char stringpool_str55[sizeof("ISO-IR-166")];
    +-    char stringpool_str57[sizeof("LATIN6")];
    +-    char stringpool_str61[sizeof("LATIN1")];
    +-    char stringpool_str68[sizeof("ISO-IR-14")];
    +-    char stringpool_str74[sizeof("L3")];
    +-    char stringpool_str75[sizeof("LATIN4")];
    +-    char stringpool_str77[sizeof("ISO-IR-165")];
    +-    char stringpool_str79[sizeof("LATIN5")];
    +-    char stringpool_str80[sizeof("ISO-IR-126")];
    +-    char stringpool_str81[sizeof("862")];
    +-    char stringpool_str82[sizeof("ISO-IR-144")];
    +-    char stringpool_str89[sizeof("LATIN8")];
    +-    char stringpool_str91[sizeof("ISO-IR-58")];
    +-    char stringpool_str96[sizeof("ISO-IR-148")];
    +-    char stringpool_str97[sizeof("L7")];
    +-    char stringpool_str98[sizeof("LATIN-9")];
    +-    char stringpool_str100[sizeof("ISO-IR-149")];
    +-    char stringpool_str102[sizeof("ISO-IR-159")];
    +-    char stringpool_str103[sizeof("ISO-IR-226")];
    +-    char stringpool_str107[sizeof("LATIN2")];
    +-    char stringpool_str108[sizeof("ISO8859-6")];
    +-    char stringpool_str109[sizeof("ISO-IR-199")];
    +-    char stringpool_str112[sizeof("ISO8859-1")];
    +-    char stringpool_str113[sizeof("ISO-8859-6")];
    +-    char stringpool_str114[sizeof("ISO_8859-6")];
    +-    char stringpool_str115[sizeof("ISO8859-16")];
    +-    char stringpool_str116[sizeof("PT154")];
    +-    char stringpool_str117[sizeof("ISO-8859-1")];
    +-    char stringpool_str118[sizeof("ISO_8859-1")];
    +-    char stringpool_str119[sizeof("ISO8859-11")];
    +-    char stringpool_str120[sizeof("ISO-8859-16")];
    +-    char stringpool_str121[sizeof("ISO_8859-16")];
    +-    char stringpool_str123[sizeof("CN")];
    +-    char stringpool_str124[sizeof("ISO-8859-11")];
    +-    char stringpool_str125[sizeof("ISO_8859-11")];
    +-    char stringpool_str126[sizeof("ISO8859-4")];
    +-    char stringpool_str128[sizeof("ISO_8859-16:2001")];
    +-    char stringpool_str130[sizeof("ISO8859-5")];
    +-    char stringpool_str131[sizeof("ISO-8859-4")];
    +-    char stringpool_str132[sizeof("ISO_8859-4")];
    +-    char stringpool_str133[sizeof("ISO8859-14")];
    +-    char stringpool_str134[sizeof("ISO-IR-101")];
    +-    char stringpool_str135[sizeof("ISO-8859-5")];
    +-    char stringpool_str136[sizeof("ISO_8859-5")];
    +-    char stringpool_str137[sizeof("ISO8859-15")];
    +-    char stringpool_str138[sizeof("ISO-8859-14")];
    +-    char stringpool_str139[sizeof("ISO_8859-14")];
    +-    char stringpool_str140[sizeof("ISO8859-8")];
    +-    char stringpool_str142[sizeof("ISO-8859-15")];
    +-    char stringpool_str143[sizeof("ISO_8859-15")];
    +-    char stringpool_str144[sizeof("ISO8859-9")];
    +-    char stringpool_str145[sizeof("ISO-8859-8")];
    +-    char stringpool_str146[sizeof("ISO_8859-8")];
    +-    char stringpool_str147[sizeof("CP866")];
    +-    char stringpool_str148[sizeof("ISO-IR-138")];
    +-    char stringpool_str149[sizeof("ISO-8859-9")];
    +-    char stringpool_str150[sizeof("ISO_8859-9")];
    +-    char stringpool_str151[sizeof("ISO_8859-14:1998")];
    +-    char stringpool_str153[sizeof("ISO_8859-15:1998")];
    +-    char stringpool_str155[sizeof("ELOT_928")];
    +-    char stringpool_str156[sizeof("TCVN")];
    +-    char stringpool_str157[sizeof("C99")];
    +-    char stringpool_str158[sizeof("ISO8859-2")];
    +-    char stringpool_str162[sizeof("CP154")];
    +-    char stringpool_str163[sizeof("ISO-8859-2")];
    +-    char stringpool_str164[sizeof("ISO_8859-2")];
    +-    char stringpool_str166[sizeof("ISO-IR-109")];
    +-    char stringpool_str168[sizeof("L10")];
    +-    char stringpool_str169[sizeof("CHAR")];
    +-    char stringpool_str174[sizeof("CP1256")];
    +-    char stringpool_str175[sizeof("ISO-IR-179")];
    +-    char stringpool_str176[sizeof("ISO646-CN")];
    +-    char stringpool_str177[sizeof("ASCII")];
    +-    char stringpool_str178[sizeof("CP1251")];
    +-    char stringpool_str179[sizeof("LATIN3")];
    +-    char stringpool_str181[sizeof("850")];
    +-    char stringpool_str183[sizeof("GB2312")];
    +-    char stringpool_str185[sizeof("CP819")];
    +-    char stringpool_str192[sizeof("CP1254")];
    +-    char stringpool_str194[sizeof("CP949")];
    +-    char stringpool_str196[sizeof("CP1255")];
    +-    char stringpool_str197[sizeof("CP862")];
    +-    char stringpool_str198[sizeof("US")];
    +-    char stringpool_str203[sizeof("CP1361")];
    +-    char stringpool_str206[sizeof("CP1258")];
    +-    char stringpool_str207[sizeof("ISO-IR-110")];
    +-    char stringpool_str209[sizeof("IBM866")];
    +-    char stringpool_str210[sizeof("CP936")];
    +-    char stringpool_str211[sizeof("GEORGIAN-PS")];
    +-    char stringpool_str214[sizeof("LATIN10")];
    +-    char stringpool_str222[sizeof("CHINESE")];
    +-    char stringpool_str224[sizeof("CP1252")];
    +-    char stringpool_str225[sizeof("LATIN7")];
    +-    char stringpool_str226[sizeof("ISO_8859-10:1992")];
    +-    char stringpool_str227[sizeof("ISO-IR-57")];
    +-    char stringpool_str228[sizeof("TIS620")];
    +-    char stringpool_str230[sizeof("ISO8859-3")];
    +-    char stringpool_str231[sizeof("UCS-4")];
    +-    char stringpool_str232[sizeof("ISO-IR-87")];
    +-    char stringpool_str233[sizeof("TIS-620")];
    +-    char stringpool_str234[sizeof("ISO-IR-157")];
    +-    char stringpool_str235[sizeof("ISO-8859-3")];
    +-    char stringpool_str236[sizeof("ISO_8859-3")];
    +-    char stringpool_str237[sizeof("ISO8859-13")];
    +-    char stringpool_str240[sizeof("CSISOLATIN6")];
    +-    char stringpool_str241[sizeof("BIG5")];
    +-    char stringpool_str242[sizeof("ISO-8859-13")];
    +-    char stringpool_str243[sizeof("ISO_8859-13")];
    +-    char stringpool_str244[sizeof("CSISOLATIN1")];
    +-    char stringpool_str245[sizeof("KOI8-R")];
    +-    char stringpool_str246[sizeof("BIG-5")];
    +-    char stringpool_str247[sizeof("IBM819")];
    +-    char stringpool_str248[sizeof("ISO-IR-127")];
    +-    char stringpool_str249[sizeof("CP874")];
    +-    char stringpool_str251[sizeof("ISO646-US")];
    +-    char stringpool_str252[sizeof("VISCII")];
    +-    char stringpool_str253[sizeof("MS-EE")];
    +-    char stringpool_str256[sizeof("MS-ANSI")];
    +-    char stringpool_str258[sizeof("CSISOLATIN4")];
    +-    char stringpool_str259[sizeof("IBM862")];
    +-    char stringpool_str260[sizeof("CP932")];
    +-    char stringpool_str261[sizeof("X0212")];
    +-    char stringpool_str262[sizeof("CSISOLATIN5")];
    +-    char stringpool_str263[sizeof("UCS-2")];
    +-    char stringpool_str265[sizeof("ISO8859-10")];
    +-    char stringpool_str266[sizeof("MS936")];
    +-    char stringpool_str267[sizeof("WCHAR_T")];
    +-    char stringpool_str270[sizeof("ISO-8859-10")];
    +-    char stringpool_str271[sizeof("ISO_8859-10")];
    +-    char stringpool_str272[sizeof("UTF-16")];
    +-    char stringpool_str273[sizeof("EUCCN")];
    +-    char stringpool_str274[sizeof("ROMAN8")];
    +-    char stringpool_str275[sizeof("ISO-IR-203")];
    +-    char stringpool_str276[sizeof("ISO8859-7")];
    +-    char stringpool_str277[sizeof("KOI8-T")];
    +-    char stringpool_str278[sizeof("EUC-CN")];
    +-    char stringpool_str279[sizeof("UCS-4LE")];
    +-    char stringpool_str280[sizeof("ISO-IR-100")];
    +-    char stringpool_str281[sizeof("ISO-8859-7")];
    +-    char stringpool_str282[sizeof("ISO_8859-7")];
    +-    char stringpool_str283[sizeof("MULELAO-1")];
    +-    char stringpool_str284[sizeof("GB_1988-80")];
    +-    char stringpool_str288[sizeof("X0201")];
    +-    char stringpool_str289[sizeof("ECMA-114")];
    +-    char stringpool_str290[sizeof("CSISOLATIN2")];
    +-    char stringpool_str291[sizeof("GEORGIAN-ACADEMY")];
    +-    char stringpool_str292[sizeof("PTCP154")];
    +-    char stringpool_str295[sizeof("UCS-2LE")];
    +-    char stringpool_str296[sizeof("CP1253")];
    +-    char stringpool_str297[sizeof("UTF-8")];
    +-    char stringpool_str298[sizeof("HP-ROMAN8")];
    +-    char stringpool_str300[sizeof("CSASCII")];
    +-    char stringpool_str303[sizeof("ECMA-118")];
    +-    char stringpool_str304[sizeof("UCS-4-INTERNAL")];
    +-    char stringpool_str305[sizeof("TCVN5712-1")];
    +-    char stringpool_str307[sizeof("KOREAN")];
    +-    char stringpool_str308[sizeof("CP850")];
    +-    char stringpool_str309[sizeof("MS-CYRL")];
    +-    char stringpool_str310[sizeof("CP950")];
    +-    char stringpool_str313[sizeof("TIS620-0")];
    +-    char stringpool_str316[sizeof("X0208")];
    +-    char stringpool_str319[sizeof("GREEK8")];
    +-    char stringpool_str320[sizeof("UCS-2-INTERNAL")];
    +-    char stringpool_str321[sizeof("TCVN-5712")];
    +-    char stringpool_str323[sizeof("CP1133")];
    +-    char stringpool_str324[sizeof("CP1250")];
    +-    char stringpool_str327[sizeof("ISO-2022-CN")];
    +-    char stringpool_str329[sizeof("UTF-16LE")];
    +-    char stringpool_str335[sizeof("CYRILLIC-ASIAN")];
    +-    char stringpool_str337[sizeof("ISO-10646-UCS-4")];
    +-    char stringpool_str340[sizeof("ISO-2022-CN-EXT")];
    +-    char stringpool_str342[sizeof("CP1257")];
    +-    char stringpool_str345[sizeof("GB_2312-80")];
    +-    char stringpool_str347[sizeof("JP")];
    +-    char stringpool_str351[sizeof("EUCKR")];
    +-    char stringpool_str353[sizeof("ISO-10646-UCS-2")];
    +-    char stringpool_str354[sizeof("GB18030")];
    +-    char stringpool_str356[sizeof("EUC-KR")];
    +-    char stringpool_str357[sizeof("CSKOI8R")];
    +-    char stringpool_str358[sizeof("CSBIG5")];
    +-    char stringpool_str360[sizeof("CP367")];
    +-    char stringpool_str361[sizeof("MACINTOSH")];
    +-    char stringpool_str362[sizeof("CSISOLATIN3")];
    +-    char stringpool_str363[sizeof("CN-BIG5")];
    +-    char stringpool_str366[sizeof("CYRILLIC")];
    +-    char stringpool_str369[sizeof("CSVISCII")];
    +-    char stringpool_str370[sizeof("IBM850")];
    +-    char stringpool_str372[sizeof("MACTHAI")];
    +-    char stringpool_str374[sizeof("UNICODE-1-1")];
    +-    char stringpool_str376[sizeof("ISO_646.IRV:1991")];
    +-    char stringpool_str380[sizeof("US-ASCII")];
    +-    char stringpool_str381[sizeof("UTF-32")];
    +-    char stringpool_str384[sizeof("CN-GB-ISOIR165")];
    +-    char stringpool_str387[sizeof("NEXTSTEP")];
    +-    char stringpool_str389[sizeof("MAC")];
    +-    char stringpool_str393[sizeof("EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE")];
    +-    char stringpool_str394[sizeof("CSISOLATINARABIC")];
    +-    char stringpool_str395[sizeof("HZ-GB-2312")];
    +-    char stringpool_str397[sizeof("ARMSCII-8")];
    +-    char stringpool_str401[sizeof("CSISOLATINHEBREW")];
    +-    char stringpool_str405[sizeof("ISO-2022-KR")];
    +-    char stringpool_str407[sizeof("WINDOWS-1256")];
    +-    char stringpool_str408[sizeof("UHC")];
    +-    char stringpool_str409[sizeof("WINDOWS-1251")];
    +-    char stringpool_str411[sizeof("MS-HEBR")];
    +-    char stringpool_str412[sizeof("ISO-CELTIC")];
    +-    char stringpool_str413[sizeof("UTF-32LE")];
    +-    char stringpool_str416[sizeof("WINDOWS-1254")];
    +-    char stringpool_str418[sizeof("WINDOWS-1255")];
    +-    char stringpool_str420[sizeof("SHIFT-JIS")];
    +-    char stringpool_str421[sizeof("SHIFT_JIS")];
    +-    char stringpool_str422[sizeof("IBM367")];
    +-    char stringpool_str423[sizeof("WINDOWS-1258")];
    +-    char stringpool_str424[sizeof("CSPTCP154")];
    +-    char stringpool_str426[sizeof("GBK")];
    +-    char stringpool_str428[sizeof("UNICODELITTLE")];
    +-    char stringpool_str432[sizeof("WINDOWS-1252")];
    +-    char stringpool_str433[sizeof("UTF-7")];
    +-    char stringpool_str435[sizeof("KSC_5601")];
    +-    char stringpool_str437[sizeof("ASMO-708")];
    +-    char stringpool_str440[sizeof("CSISO2022CN")];
    +-    char stringpool_str444[sizeof("BIGFIVE")];
    +-    char stringpool_str447[sizeof("WINDOWS-936")];
    +-    char stringpool_str448[sizeof("CSUCS4")];
    +-    char stringpool_str449[sizeof("BIG-FIVE")];
    +-    char stringpool_str453[sizeof("ISO646-JP")];
    +-    char stringpool_str456[sizeof("TIS620.2529-1")];
    +-    char stringpool_str457[sizeof("CSISOLATINGREEK")];
    +-    char stringpool_str459[sizeof("CSISOLATINCYRILLIC")];
    +-    char stringpool_str460[sizeof("UCS-4BE")];
    +-    char stringpool_str462[sizeof("UNICODE-1-1-UTF-7")];
    +-    char stringpool_str465[sizeof("EUCTW")];
    +-    char stringpool_str468[sizeof("WINDOWS-1253")];
    +-    char stringpool_str469[sizeof("CSHPROMAN8")];
    +-    char stringpool_str470[sizeof("EUC-TW")];
    +-    char stringpool_str472[sizeof("KS_C_5601-1989")];
    +-    char stringpool_str476[sizeof("UCS-2BE")];
    +-    char stringpool_str479[sizeof("VISCII1.1-1")];
    +-    char stringpool_str480[sizeof("GREEK")];
    +-    char stringpool_str482[sizeof("WINDOWS-1250")];
    +-    char stringpool_str483[sizeof("CSGB2312")];
    +-    char stringpool_str486[sizeof("WINDOWS-874")];
    +-    char stringpool_str487[sizeof("CSUNICODE11")];
    +-    char stringpool_str489[sizeof("JAVA")];
    +-    char stringpool_str491[sizeof("WINDOWS-1257")];
    +-    char stringpool_str493[sizeof("CSUNICODE")];
    +-    char stringpool_str500[sizeof("CSHALFWIDTHKATAKANA")];
    +-    char stringpool_str502[sizeof("CSISO57GB1988")];
    +-    char stringpool_str504[sizeof("MACICELAND")];
    +-    char stringpool_str509[sizeof("CSIBM866")];
    +-    char stringpool_str510[sizeof("UTF-16BE")];
    +-    char stringpool_str513[sizeof("ARABIC")];
    +-    char stringpool_str514[sizeof("CN-GB")];
    +-    char stringpool_str518[sizeof("CSISO2022KR")];
    +-    char stringpool_str520[sizeof("CSMACINTOSH")];
    +-    char stringpool_str526[sizeof("JIS0208")];
    +-    char stringpool_str528[sizeof("MACROMAN")];
    +-    char stringpool_str530[sizeof("ISO_8859-4:1988")];
    +-    char stringpool_str532[sizeof("ISO_8859-5:1988")];
    +-    char stringpool_str535[sizeof("TIS620.2533-1")];
    +-    char stringpool_str536[sizeof("ANSI_X3.4-1986")];
    +-    char stringpool_str537[sizeof("ISO_8859-8:1988")];
    +-    char stringpool_str538[sizeof("KS_C_5601-1987")];
    +-    char stringpool_str539[sizeof("CSSHIFTJIS")];
    +-    char stringpool_str540[sizeof("HEBREW")];
    +-    char stringpool_str541[sizeof("ISO_8859-9:1989")];
    +-    char stringpool_str547[sizeof("MACCROATIAN")];
    +-    char stringpool_str548[sizeof("ISO-2022-JP-1")];
    +-    char stringpool_str550[sizeof("EUCJP")];
    +-    char stringpool_str552[sizeof("ANSI_X3.4-1968")];
    +-    char stringpool_str555[sizeof("EUC-JP")];
    +-    char stringpool_str561[sizeof("CSISO58GB231280")];
    +-    char stringpool_str562[sizeof("JIS_C6226-1983")];
    +-    char stringpool_str566[sizeof("IBM-CP1133")];
    +-    char stringpool_str569[sizeof("MACCENTRALEUROPE")];
    +-    char stringpool_str570[sizeof("CSISO159JISX02121990")];
    +-    char stringpool_str571[sizeof("ISO-2022-JP-2")];
    +-    char stringpool_str573[sizeof("CSUNICODE11UTF7")];
    +-    char stringpool_str574[sizeof("UCS-4-SWAPPED")];
    +-    char stringpool_str578[sizeof("UNICODEBIG")];
    +-    char stringpool_str579[sizeof("CSISO14JISC6220RO")];
    +-    char stringpool_str580[sizeof("JIS_C6220-1969-RO")];
    +-    char stringpool_str582[sizeof("ISO_8859-3:1988")];
    +-    char stringpool_str586[sizeof("CSPC862LATINHEBREW")];
    +-    char stringpool_str588[sizeof("BIG5HKSCS")];
    +-    char stringpool_str589[sizeof("ISO_8859-6:1987")];
    +-    char stringpool_str590[sizeof("UCS-2-SWAPPED")];
    +-    char stringpool_str591[sizeof("ISO_8859-1:1987")];
    +-    char stringpool_str593[sizeof("BIG5-HKSCS")];
    +-    char stringpool_str594[sizeof("UTF-32BE")];
    +-    char stringpool_str604[sizeof("ISO-2022-JP")];
    +-    char stringpool_str607[sizeof("KOI8-U")];
    +-    char stringpool_str608[sizeof("TIS620.2533-0")];
    +-    char stringpool_str612[sizeof("KOI8-RU")];
    +-    char stringpool_str614[sizeof("ISO_8859-2:1987")];
    +-    char stringpool_str618[sizeof("MACROMANIA")];
    +-    char stringpool_str641[sizeof("JIS_X0212")];
    +-    char stringpool_str648[sizeof("CSEUCKR")];
    +-    char stringpool_str649[sizeof("MACCYRILLIC")];
    +-    char stringpool_str650[sizeof("ISO_8859-7:2003")];
    +-    char stringpool_str651[sizeof("MS-ARAB")];
    +-    char stringpool_str657[sizeof("MS-GREEK")];
    +-    char stringpool_str666[sizeof("CSKSC56011987")];
    +-    char stringpool_str668[sizeof("JIS_X0201")];
    +-    char stringpool_str673[sizeof("ISO_8859-7:1987")];
    +-    char stringpool_str683[sizeof("CSISO2022JP2")];
    +-    char stringpool_str696[sizeof("JIS_X0208")];
    +-    char stringpool_str697[sizeof("JISX0201-1976")];
    +-    char stringpool_str706[sizeof("JIS_X0212-1990")];
    +-    char stringpool_str717[sizeof("CSISO2022JP")];
    +-    char stringpool_str721[sizeof("JOHAB")];
    +-    char stringpool_str730[sizeof("MS_KANJI")];
    +-    char stringpool_str734[sizeof("CSISO87JISX0208")];
    +-    char stringpool_str737[sizeof("MACTURKISH")];
    +-    char stringpool_str755[sizeof("TCVN5712-1:1993")];
    +-    char stringpool_str756[sizeof("JIS_X0208-1983")];
    +-    char stringpool_str762[sizeof("CSEUCTW")];
    +-    char stringpool_str763[sizeof("MACGREEK")];
    +-    char stringpool_str770[sizeof("JIS_X0208-1990")];
    +-    char stringpool_str776[sizeof("WINBALTRIM")];
    +-    char stringpool_str790[sizeof("MS-TURK")];
    +-    char stringpool_str792[sizeof("MACUKRAINE")];
    +-    char stringpool_str796[sizeof("MACARABIC")];
    +-    char stringpool_str802[sizeof("CSPC850MULTILINGUAL")];
    +-    char stringpool_str845[sizeof("MACHEBREW")];
    +-    char stringpool_str903[sizeof("JIS_X0212.1990-0")];
    +-    char stringpool_str979[sizeof("BIG5-HKSCS:2001")];
    +-    char stringpool_str986[sizeof("BIG5-HKSCS:2004")];
    +-    char stringpool_str995[sizeof("BIG5-HKSCS:1999")];
    +-    char stringpool_str997[sizeof("CSEUCPKDFMTJAPANESE")];
    ++    char stringpool_str4[sizeof("L2")];
    ++    char stringpool_str5[sizeof("L1")];
    ++    char stringpool_str11[sizeof("MS-EE")];
    ++    char stringpool_str12[sizeof("CP819")];
    ++    char stringpool_str15[sizeof("UCS-2")];
    ++    char stringpool_str16[sizeof("IBM819")];
    ++    char stringpool_str17[sizeof("UTF-8")];
    ++    char stringpool_str18[sizeof("UTF-32")];
    ++    char stringpool_str19[sizeof("UTF-16")];
    ++    char stringpool_str21[sizeof("CP367")];
    ++    char stringpool_str22[sizeof("ISO8859-2")];
    ++    char stringpool_str23[sizeof("ISO8859-1")];
    ++    char stringpool_str24[sizeof("IBM367")];
    ++    char stringpool_str25[sizeof("UTF-7")];
    ++    char stringpool_str26[sizeof("CHAR")];
    ++    char stringpool_str27[sizeof("ISO8859-15")];
    ++    char stringpool_str28[sizeof("US")];
    ++    char stringpool_str29[sizeof("ISO-8859-2")];
    ++    char stringpool_str31[sizeof("ISO-8859-1")];
    ++    char stringpool_str32[sizeof("ISO-8859-15")];
    ++    char stringpool_str33[sizeof("ISO_8859-2")];
    ++    char stringpool_str35[sizeof("ISO_8859-1")];
    ++    char stringpool_str36[sizeof("ISO_8859-15")];
    ++    char stringpool_str37[sizeof("KOI8-R")];
    ++    char stringpool_str38[sizeof("UCS-2LE")];
    ++    char stringpool_str39[sizeof("UTF-32LE")];
    ++    char stringpool_str40[sizeof("UTF-16LE")];
    ++    char stringpool_str41[sizeof("ISO_8859-15:1998")];
    ++    char stringpool_str43[sizeof("ISO_8859-2:1987")];
    ++    char stringpool_str44[sizeof("ISO_8859-1:1987")];
    ++    char stringpool_str45[sizeof("UCS-4")];
    ++    char stringpool_str47[sizeof("UNICODE-1-1")];
    ++    char stringpool_str48[sizeof("ISO-IR-6")];
    ++    char stringpool_str49[sizeof("CSKOI8R")];
    ++    char stringpool_str50[sizeof("ASCII")];
    ++    char stringpool_str51[sizeof("UNICODEBIG")];
    ++    char stringpool_str52[sizeof("ISO-IR-203")];
    ++    char stringpool_str53[sizeof("UCS-4LE")];
    ++    char stringpool_str54[sizeof("ISO-IR-101")];
    ++    char stringpool_str55[sizeof("CP1250")];
    ++    char stringpool_str56[sizeof("ISO-10646-UCS-2")];
    ++    char stringpool_str57[sizeof("UNICODE-1-1-UTF-7")];
    ++    char stringpool_str58[sizeof("LATIN2")];
    ++    char stringpool_str59[sizeof("UNICODELITTLE")];
    ++    char stringpool_str60[sizeof("LATIN1")];
    ++    char stringpool_str61[sizeof("ISO_646.IRV:1991")];
    ++    char stringpool_str62[sizeof("ISO646-US")];
    ++    char stringpool_str63[sizeof("CSUNICODE")];
    ++    char stringpool_str64[sizeof("UCS-2-INTERNAL")];
    ++    char stringpool_str65[sizeof("LATIN-9")];
    ++    char stringpool_str66[sizeof("WCHAR_T")];
    ++    char stringpool_str68[sizeof("CSUCS4")];
    ++    char stringpool_str69[sizeof("CSUNICODE11")];
    ++    char stringpool_str70[sizeof("US-ASCII")];
    ++    char stringpool_str71[sizeof("ISO-10646-UCS-4")];
    ++    char stringpool_str72[sizeof("UCS-2BE")];
    ++    char stringpool_str73[sizeof("UTF-32BE")];
    ++    char stringpool_str74[sizeof("UTF-16BE")];
    ++    char stringpool_str75[sizeof("ANSI_X3.4-1986")];
    ++    char stringpool_str76[sizeof("ANSI_X3.4-1968")];
    ++    char stringpool_str77[sizeof("CSUNICODE11UTF7")];
    ++    char stringpool_str78[sizeof("UCS-2-SWAPPED")];
    ++    char stringpool_str79[sizeof("UCS-4-INTERNAL")];
    ++    char stringpool_str80[sizeof("CSASCII")];
    ++    char stringpool_str87[sizeof("UCS-4BE")];
    ++    char stringpool_str88[sizeof("WINDOWS-1250")];
    ++    char stringpool_str92[sizeof("ISO-IR-100")];
    ++    char stringpool_str93[sizeof("UCS-4-SWAPPED")];
    ++    char stringpool_str97[sizeof("CSISOLATIN2")];
    ++    char stringpool_str98[sizeof("CSISOLATIN1")];
    +   };
    + static const struct stringpool_t stringpool_contents =
    +   {
    +-    "L6",
    +-    "L1",
    +-    "HZ",
    +-    "L4",
    +-    "L5",
    +-    "R8",
    +-    "L8",
    +-    "866",
    +     "L2",
    +-    "SJIS",
    +-    "ISO-IR-6",
    +-    "ISO-IR-166",
    +-    "LATIN6",
    +-    "LATIN1",
    +-    "ISO-IR-14",
    +-    "L3",
    +-    "LATIN4",
    +-    "ISO-IR-165",
    +-    "LATIN5",
    +-    "ISO-IR-126",
    +-    "862",
    +-    "ISO-IR-144",
    +-    "LATIN8",
    +-    "ISO-IR-58",
    +-    "ISO-IR-148",
    +-    "L7",
    +-    "LATIN-9",
    +-    "ISO-IR-149",
    +-    "ISO-IR-159",
    +-    "ISO-IR-226",
    +-    "LATIN2",
    +-    "ISO8859-6",
    +-    "ISO-IR-199",
    ++    "L1",
    ++    "MS-EE",
    ++    "CP819",
    ++    "UCS-2",
    ++    "IBM819",
    ++    "UTF-8",
    ++    "UTF-32",
    ++    "UTF-16",
    ++    "CP367",
    ++    "ISO8859-2",
    +     "ISO8859-1",
    +-    "ISO-8859-6",
    +-    "ISO_8859-6",
    +-    "ISO8859-16",
    +-    "PT154",
    +-    "ISO-8859-1",
    +-    "ISO_8859-1",
    +-    "ISO8859-11",
    +-    "ISO-8859-16",
    +-    "ISO_8859-16",
    +-    "CN",
    +-    "ISO-8859-11",
    +-    "ISO_8859-11",
    +-    "ISO8859-4",
    +-    "ISO_8859-16:2001",
    +-    "ISO8859-5",
    +-    "ISO-8859-4",
    +-    "ISO_8859-4",
    +-    "ISO8859-14",
    +-    "ISO-IR-101",
    +-    "ISO-8859-5",
    +-    "ISO_8859-5",
    ++    "IBM367",
    ++    "UTF-7",
    ++    "CHAR",
    +     "ISO8859-15",
    +-    "ISO-8859-14",
    +-    "ISO_8859-14",
    +-    "ISO8859-8",
    ++    "US",
    ++    "ISO-8859-2",
    ++    "ISO-8859-1",
    +     "ISO-8859-15",
    ++    "ISO_8859-2",
    ++    "ISO_8859-1",
    +     "ISO_8859-15",
    +-    "ISO8859-9",
    +-    "ISO-8859-8",
    +-    "ISO_8859-8",
    +-    "CP866",
    +-    "ISO-IR-138",
    +-    "ISO-8859-9",
    +-    "ISO_8859-9",
    +-    "ISO_8859-14:1998",
    ++    "KOI8-R",
    ++    "UCS-2LE",
    ++    "UTF-32LE",
    ++    "UTF-16LE",
    +     "ISO_8859-15:1998",
    +-    "ELOT_928",
    +-    "TCVN",
    +-    "C99",
    +-    "ISO8859-2",
    +-    "CP154",
    +-    "ISO-8859-2",
    +-    "ISO_8859-2",
    +-    "ISO-IR-109",
    +-    "L10",
    +-    "CHAR",
    +-    "CP1256",
    +-    "ISO-IR-179",
    +-    "ISO646-CN",
    +-    "ASCII",
    +-    "CP1251",
    +-    "LATIN3",
    +-    "850",
    +-    "GB2312",
    +-    "CP819",
    +-    "CP1254",
    +-    "CP949",
    +-    "CP1255",
    +-    "CP862",
    +-    "US",
    +-    "CP1361",
    +-    "CP1258",
    +-    "ISO-IR-110",
    +-    "IBM866",
    +-    "CP936",
    +-    "GEORGIAN-PS",
    +-    "LATIN10",
    +-    "CHINESE",
    +-    "CP1252",
    +-    "LATIN7",
    +-    "ISO_8859-10:1992",
    +-    "ISO-IR-57",
    +-    "TIS620",
    +-    "ISO8859-3",
    ++    "ISO_8859-2:1987",
    ++    "ISO_8859-1:1987",
    +     "UCS-4",
    +-    "ISO-IR-87",
    +-    "TIS-620",
    +-    "ISO-IR-157",
    +-    "ISO-8859-3",
    +-    "ISO_8859-3",
    +-    "ISO8859-13",
    +-    "CSISOLATIN6",
    +-    "BIG5",
    +-    "ISO-8859-13",
    +-    "ISO_8859-13",
    +-    "CSISOLATIN1",
    +-    "KOI8-R",
    +-    "BIG-5",
    +-    "IBM819",
    +-    "ISO-IR-127",
    +-    "CP874",
    +-    "ISO646-US",
    +-    "VISCII",
    +-    "MS-EE",
    +-    "MS-ANSI",
    +-    "CSISOLATIN4",
    +-    "IBM862",
    +-    "CP932",
    +-    "X0212",
    +-    "CSISOLATIN5",
    +-    "UCS-2",
    +-    "ISO8859-10",
    +-    "MS936",
    +-    "WCHAR_T",
    +-    "ISO-8859-10",
    +-    "ISO_8859-10",
    +-    "UTF-16",
    +-    "EUCCN",
    +-    "ROMAN8",
    ++    "UNICODE-1-1",
    ++    "ISO-IR-6",
    ++    "CSKOI8R",
    ++    "ASCII",
    ++    "UNICODEBIG",
    +     "ISO-IR-203",
    +-    "ISO8859-7",
    +-    "KOI8-T",
    +-    "EUC-CN",
    +     "UCS-4LE",
    +-    "ISO-IR-100",
    +-    "ISO-8859-7",
    +-    "ISO_8859-7",
    +-    "MULELAO-1",
    +-    "GB_1988-80",
    +-    "X0201",
    +-    "ECMA-114",
    +-    "CSISOLATIN2",
    +-    "GEORGIAN-ACADEMY",
    +-    "PTCP154",
    +-    "UCS-2LE",
    +-    "CP1253",
    +-    "UTF-8",
    +-    "HP-ROMAN8",
    +-    "CSASCII",
    +-    "ECMA-118",
    +-    "UCS-4-INTERNAL",
    +-    "TCVN5712-1",
    +-    "KOREAN",
    +-    "CP850",
    +-    "MS-CYRL",
    +-    "CP950",
    +-    "TIS620-0",
    +-    "X0208",
    +-    "GREEK8",
    +-    "UCS-2-INTERNAL",
    +-    "TCVN-5712",
    +-    "CP1133",
    ++    "ISO-IR-101",
    +     "CP1250",
    +-    "ISO-2022-CN",
    +-    "UTF-16LE",
    +-    "CYRILLIC-ASIAN",
    +-    "ISO-10646-UCS-4",
    +-    "ISO-2022-CN-EXT",
    +-    "CP1257",
    +-    "GB_2312-80",
    +-    "JP",
    +-    "EUCKR",
    +     "ISO-10646-UCS-2",
    +-    "GB18030",
    +-    "EUC-KR",
    +-    "CSKOI8R",
    +-    "CSBIG5",
    +-    "CP367",
    +-    "MACINTOSH",
    +-    "CSISOLATIN3",
    +-    "CN-BIG5",
    +-    "CYRILLIC",
    +-    "CSVISCII",
    +-    "IBM850",
    +-    "MACTHAI",
    +-    "UNICODE-1-1",
    +-    "ISO_646.IRV:1991",
    +-    "US-ASCII",
    +-    "UTF-32",
    +-    "CN-GB-ISOIR165",
    +-    "NEXTSTEP",
    +-    "MAC",
    +-    "EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE",
    +-    "CSISOLATINARABIC",
    +-    "HZ-GB-2312",
    +-    "ARMSCII-8",
    +-    "CSISOLATINHEBREW",
    +-    "ISO-2022-KR",
    +-    "WINDOWS-1256",
    +-    "UHC",
    +-    "WINDOWS-1251",
    +-    "MS-HEBR",
    +-    "ISO-CELTIC",
    +-    "UTF-32LE",
    +-    "WINDOWS-1254",
    +-    "WINDOWS-1255",
    +-    "SHIFT-JIS",
    +-    "SHIFT_JIS",
    +-    "IBM367",
    +-    "WINDOWS-1258",
    +-    "CSPTCP154",
    +-    "GBK",
    ++    "UNICODE-1-1-UTF-7",
    ++    "LATIN2",
    +     "UNICODELITTLE",
    +-    "WINDOWS-1252",
    +-    "UTF-7",
    +-    "KSC_5601",
    +-    "ASMO-708",
    +-    "CSISO2022CN",
    +-    "BIGFIVE",
    +-    "WINDOWS-936",
    ++    "LATIN1",
    ++    "ISO_646.IRV:1991",
    ++    "ISO646-US",
    ++    "CSUNICODE",
    ++    "UCS-2-INTERNAL",
    ++    "LATIN-9",
    ++    "WCHAR_T",
    +     "CSUCS4",
    +-    "BIG-FIVE",
    +-    "ISO646-JP",
    +-    "TIS620.2529-1",
    +-    "CSISOLATINGREEK",
    +-    "CSISOLATINCYRILLIC",
    +-    "UCS-4BE",
    +-    "UNICODE-1-1-UTF-7",
    +-    "EUCTW",
    +-    "WINDOWS-1253",
    +-    "CSHPROMAN8",
    +-    "EUC-TW",
    +-    "KS_C_5601-1989",
    +-    "UCS-2BE",
    +-    "VISCII1.1-1",
    +-    "GREEK",
    +-    "WINDOWS-1250",
    +-    "CSGB2312",
    +-    "WINDOWS-874",
    +     "CSUNICODE11",
    +-    "JAVA",
    +-    "WINDOWS-1257",
    +-    "CSUNICODE",
    +-    "CSHALFWIDTHKATAKANA",
    +-    "CSISO57GB1988",
    +-    "MACICELAND",
    +-    "CSIBM866",
    ++    "US-ASCII",
    ++    "ISO-10646-UCS-4",
    ++    "UCS-2BE",
    ++    "UTF-32BE",
    +     "UTF-16BE",
    +-    "ARABIC",
    +-    "CN-GB",
    +-    "CSISO2022KR",
    +-    "CSMACINTOSH",
    +-    "JIS0208",
    +-    "MACROMAN",
    +-    "ISO_8859-4:1988",
    +-    "ISO_8859-5:1988",
    +-    "TIS620.2533-1",
    +     "ANSI_X3.4-1986",
    +-    "ISO_8859-8:1988",
    +-    "KS_C_5601-1987",
    +-    "CSSHIFTJIS",
    +-    "HEBREW",
    +-    "ISO_8859-9:1989",
    +-    "MACCROATIAN",
    +-    "ISO-2022-JP-1",
    +-    "EUCJP",
    +     "ANSI_X3.4-1968",
    +-    "EUC-JP",
    +-    "CSISO58GB231280",
    +-    "JIS_C6226-1983",
    +-    "IBM-CP1133",
    +-    "MACCENTRALEUROPE",
    +-    "CSISO159JISX02121990",
    +-    "ISO-2022-JP-2",
    +     "CSUNICODE11UTF7",
    +-    "UCS-4-SWAPPED",
    +-    "UNICODEBIG",
    +-    "CSISO14JISC6220RO",
    +-    "JIS_C6220-1969-RO",
    +-    "ISO_8859-3:1988",
    +-    "CSPC862LATINHEBREW",
    +-    "BIG5HKSCS",
    +-    "ISO_8859-6:1987",
    +     "UCS-2-SWAPPED",
    +-    "ISO_8859-1:1987",
    +-    "BIG5-HKSCS",
    +-    "UTF-32BE",
    +-    "ISO-2022-JP",
    +-    "KOI8-U",
    +-    "TIS620.2533-0",
    +-    "KOI8-RU",
    +-    "ISO_8859-2:1987",
    +-    "MACROMANIA",
    +-    "JIS_X0212",
    +-    "CSEUCKR",
    +-    "MACCYRILLIC",
    +-    "ISO_8859-7:2003",
    +-    "MS-ARAB",
    +-    "MS-GREEK",
    +-    "CSKSC56011987",
    +-    "JIS_X0201",
    +-    "ISO_8859-7:1987",
    +-    "CSISO2022JP2",
    +-    "JIS_X0208",
    +-    "JISX0201-1976",
    +-    "JIS_X0212-1990",
    +-    "CSISO2022JP",
    +-    "JOHAB",
    +-    "MS_KANJI",
    +-    "CSISO87JISX0208",
    +-    "MACTURKISH",
    +-    "TCVN5712-1:1993",
    +-    "JIS_X0208-1983",
    +-    "CSEUCTW",
    +-    "MACGREEK",
    +-    "JIS_X0208-1990",
    +-    "WINBALTRIM",
    +-    "MS-TURK",
    +-    "MACUKRAINE",
    +-    "MACARABIC",
    +-    "CSPC850MULTILINGUAL",
    +-    "MACHEBREW",
    +-    "JIS_X0212.1990-0",
    +-    "BIG5-HKSCS:2001",
    +-    "BIG5-HKSCS:2004",
    +-    "BIG5-HKSCS:1999",
    +-    "CSEUCPKDFMTJAPANESE"
    ++    "UCS-4-INTERNAL",
    ++    "CSASCII",
    ++    "UCS-4BE",
    ++    "WINDOWS-1250",
    ++    "ISO-IR-100",
    ++    "UCS-4-SWAPPED",
    ++    "CSISOLATIN2",
    ++    "CSISOLATIN1"
    +   };
    + #define stringpool ((const char *) &stringpool_contents)
    + 
    + static const struct alias aliases[] =
    +   {
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +     {-1}, {-1}, {-1}, {-1},
    +-#line 134 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str13, ei_iso8859_10},
    +-    {-1},
    +-#line 60 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str15, ei_iso8859_1},
    +-    {-1}, {-1},
    +-#line 325 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str18, ei_hz},
    +-    {-1}, {-1}, {-1},
    +-#line 84 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str22, ei_iso8859_4},
    +-    {-1},
    +-#line 126 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str24, ei_iso8859_9},
    +-    {-1},
    +-#line 226 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str26, ei_hp_roman8},
    +-    {-1}, {-1},
    +-#line 151 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str29, ei_iso8859_14},
    +-    {-1},
    +-#line 207 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str31, ei_cp866},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 68 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str38, ei_iso8859_2},
    +-    {-1}, {-1}, {-1},
    +-#line 303 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str42, ei_sjis},
    +-#line 16 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str43, ei_ascii},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1},
    +-#line 247 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str55, ei_tis620},
    +-    {-1},
    +-#line 133 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str57, ei_iso8859_10},
    +-    {-1}, {-1}, {-1},
    +-#line 59 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str61, ei_iso8859_1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 259 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str68, ei_iso646_jp},
    ++#line 66 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str4, ei_iso8859_2},
    ++#line 58 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str5, ei_iso8859_1},
    +     {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 76 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str74, ei_iso8859_3},
    +-#line 83 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str75, ei_iso8859_4},
    +-    {-1},
    +-#line 289 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str77, ei_isoir165},
    +-    {-1},
    +-#line 125 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str79, ei_iso8859_9},
    +-#line 107 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str80, ei_iso8859_7},
    +-#line 203 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str81, ei_cp862},
    +-#line 90 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str82, ei_iso8859_5},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 150 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str89, ei_iso8859_14},
    +-    {-1},
    +-#line 286 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str91, ei_gb2312},
    +-    {-1}, {-1}, {-1}, {-1},
    +-#line 124 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str96, ei_iso8859_9},
    +-#line 144 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str97, ei_iso8859_13},
    +-#line 158 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str98, ei_iso8859_15},
    +-    {-1},
    +-#line 294 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str100, ei_ksc5601},
    +-    {-1},
    +-#line 278 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str102, ei_jisx0212},
    +-#line 163 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str103, ei_iso8859_16},
    +-    {-1}, {-1}, {-1},
    +-#line 67 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str107, ei_iso8859_2},
    +-#line 102 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str108, ei_iso8859_6},
    +-#line 149 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str109, ei_iso8859_14},
    ++#line 79 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str11, ei_cp1250},
    ++#line 55 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str12, ei_iso8859_1},
    +     {-1}, {-1},
    +-#line 62 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str112, ei_iso8859_1},
    +-#line 94 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str113, ei_iso8859_6},
    +-#line 95 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str114, ei_iso8859_6},
    +-#line 166 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str115, ei_iso8859_16},
    +-#line 233 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str116, ei_pt154},
    +-#line 53 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str117, ei_iso8859_1},
    +-#line 54 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str118, ei_iso8859_1},
    +-#line 139 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str119, ei_iso8859_11},
    +-#line 160 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str120, ei_iso8859_16},
    +-#line 161 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str121, ei_iso8859_16},
    +-    {-1},
    +-#line 283 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str123, ei_iso646_cn},
    +-#line 137 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str124, ei_iso8859_11},
    +-#line 138 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str125, ei_iso8859_11},
    +-#line 86 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str126, ei_iso8859_4},
    +-    {-1},
    +-#line 162 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str128, ei_iso8859_16},
    ++#line 24 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str15, ei_ucs2},
    ++#line 56 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str16, ei_iso8859_1},
    ++#line 23 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str17, ei_utf8},
    ++#line 41 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str18, ei_utf32},
    ++#line 38 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str19, ei_utf16},
    +     {-1},
    +-#line 93 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str130, ei_iso8859_5},
    +-#line 79 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str131, ei_iso8859_4},
    ++#line 19 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str21, ei_ascii},
    ++#line 68 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str22, ei_iso8859_2},
    ++#line 60 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str23, ei_iso8859_1},
    ++#line 20 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str24, ei_ascii},
    ++#line 44 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str25, ei_utf7},
    + #line 80 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str132, ei_iso8859_4},
    +-#line 153 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str133, ei_iso8859_14},
    +-#line 66 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str134, ei_iso8859_2},
    +-#line 87 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str135, ei_iso8859_5},
    +-#line 88 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str136, ei_iso8859_5},
    +-#line 159 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str137, ei_iso8859_15},
    +-#line 146 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str138, ei_iso8859_14},
    +-#line 147 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str139, ei_iso8859_14},
    +-#line 120 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str140, ei_iso8859_8},
    +-    {-1},
    +-#line 154 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str142, ei_iso8859_15},
    +-#line 155 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str143, ei_iso8859_15},
    +-#line 128 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str144, ei_iso8859_9},
    +-#line 114 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str145, ei_iso8859_8},
    +-#line 115 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str146, ei_iso8859_8},
    +-#line 205 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str147, ei_cp866},
    +-#line 117 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str148, ei_iso8859_8},
    +-#line 121 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str149, ei_iso8859_9},
    +-#line 122 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str150, ei_iso8859_9},
    +-#line 148 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str151, ei_iso8859_14},
    +-    {-1},
    +-#line 156 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str153, ei_iso8859_15},
    +-    {-1},
    +-#line 109 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str155, ei_iso8859_7},
    +-#line 253 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str156, ei_tcvn},
    +-#line 51 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str157, ei_c99},
    +-#line 70 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str158, ei_iso8859_2},
    +-    {-1}, {-1}, {-1},
    +-#line 235 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str162, ei_pt154},
    +-#line 63 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str163, ei_iso8859_2},
    +-#line 64 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str164, ei_iso8859_2},
    +-    {-1},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str26, ei_local_char},
    + #line 74 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str166, ei_iso8859_3},
    +-    {-1},
    +-#line 165 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str168, ei_iso8859_16},
    +-#line 351 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str169, ei_local_char},
    +-    {-1}, {-1}, {-1}, {-1},
    +-#line 189 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str174, ei_cp1256},
    +-#line 142 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str175, ei_iso8859_13},
    +-#line 281 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str176, ei_iso646_cn},
    +-#line 13 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str177, ei_ascii},
    +-#line 174 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str178, ei_cp1251},
    +-#line 75 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str179, ei_iso8859_3},
    +-    {-1},
    +-#line 199 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str181, ei_cp850},
    +-    {-1},
    +-#line 314 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str183, ei_euc_cn},
    +-    {-1},
    +-#line 57 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str185, ei_iso8859_1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 183 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str192, ei_cp1254},
    +-    {-1},
    +-#line 345 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str194, ei_cp949},
    +-    {-1},
    +-#line 186 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str196, ei_cp1255},
    +-#line 201 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str197, ei_cp862},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str27, ei_iso8859_15},
    + #line 21 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str198, ei_ascii},
    +-    {-1}, {-1}, {-1}, {-1},
    +-#line 348 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str203, ei_johab},
    +-    {-1}, {-1},
    +-#line 195 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str206, ei_cp1258},
    +-#line 82 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str207, ei_iso8859_4},
    +-    {-1},
    +-#line 206 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str209, ei_cp866},
    +-#line 318 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str210, ei_cp936},
    +-#line 231 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str211, ei_georgian_ps},
    +-    {-1}, {-1},
    +-#line 164 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str214, ei_iso8859_16},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 288 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str222, ei_gb2312},
    +-    {-1},
    +-#line 177 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str224, ei_cp1252},
    +-#line 143 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str225, ei_iso8859_13},
    +-#line 131 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str226, ei_iso8859_10},
    +-#line 282 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str227, ei_iso646_cn},
    +-#line 242 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str228, ei_tis620},
    +-    {-1},
    +-#line 78 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str230, ei_iso8859_3},
    +-#line 33 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str231, ei_ucs4},
    +-#line 271 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str232, ei_jisx0208},
    +-#line 241 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str233, ei_tis620},
    +-#line 132 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str234, ei_iso8859_10},
    +-#line 71 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str235, ei_iso8859_3},
    +-#line 72 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str236, ei_iso8859_3},
    +-#line 145 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str237, ei_iso8859_13},
    +-    {-1}, {-1},
    +-#line 135 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str240, ei_iso8859_10},
    +-#line 330 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str241, ei_ces_big5},
    +-#line 140 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str242, ei_iso8859_13},
    +-#line 141 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str243, ei_iso8859_13},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str28, ei_ascii},
    + #line 61 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str244, ei_iso8859_1},
    +-#line 167 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str245, ei_koi8_r},
    +-#line 331 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str246, ei_ces_big5},
    +-#line 58 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str247, ei_iso8859_1},
    +-#line 97 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str248, ei_iso8859_6},
    +-#line 248 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str249, ei_cp874},
    +-    {-1},
    +-#line 14 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str251, ei_ascii},
    +-#line 250 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str252, ei_viscii},
    +-#line 173 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str253, ei_cp1250},
    +-    {-1}, {-1},
    +-#line 179 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str256, ei_cp1252},
    +-    {-1},
    +-#line 85 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str258, ei_iso8859_4},
    +-#line 202 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str259, ei_cp862},
    +-#line 306 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str260, ei_cp932},
    +-#line 277 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str261, ei_jisx0212},
    +-#line 127 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str262, ei_iso8859_9},
    +-#line 24 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str263, ei_ucs2},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str29, ei_iso8859_2},
    +     {-1},
    +-#line 136 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str265, ei_iso8859_10},
    +-#line 319 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str266, ei_cp936},
    +-#line 352 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str267, ei_local_wchar_t},
    +-    {-1}, {-1},
    +-#line 129 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str270, ei_iso8859_10},
    +-#line 130 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str271, ei_iso8859_10},
    +-#line 38 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str272, ei_utf16},
    +-#line 313 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str273, ei_euc_cn},
    +-#line 225 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str274, ei_hp_roman8},
    +-#line 157 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str275, ei_iso8859_15},
    +-#line 113 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str276, ei_iso8859_7},
    +-#line 232 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str277, ei_koi8_t},
    +-#line 312 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str278, ei_euc_cn},
    +-#line 37 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str279, ei_ucs4le},
    +-#line 56 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str280, ei_iso8859_1},
    +-#line 103 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str281, ei_iso8859_7},
    +-#line 104 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str282, ei_iso8859_7},
    +-#line 238 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str283, ei_mulelao},
    +-#line 280 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str284, ei_iso646_cn},
    +-    {-1}, {-1}, {-1},
    +-#line 264 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str288, ei_jisx0201},
    +-#line 98 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str289, ei_iso8859_6},
    ++#line 51 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str31, ei_iso8859_1},
    + #line 69 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str290, ei_iso8859_2},
    +-#line 230 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str291, ei_georgian_academy},
    +-#line 234 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str292, ei_pt154},
    +-    {-1}, {-1},
    +-#line 31 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str295, ei_ucs2le},
    +-#line 180 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str296, ei_cp1253},
    +-#line 23 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str297, ei_utf8},
    +-#line 224 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str298, ei_hp_roman8},
    +-    {-1},
    +-#line 22 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str300, ei_ascii},
    +-    {-1}, {-1},
    +-#line 108 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str303, ei_iso8859_7},
    +-#line 49 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str304, ei_ucs4internal},
    +-#line 255 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str305, ei_tcvn},
    +-    {-1},
    +-#line 296 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str307, ei_ksc5601},
    +-#line 197 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str308, ei_cp850},
    +-#line 176 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str309, ei_cp1251},
    +-#line 336 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str310, ei_cp950},
    +-    {-1}, {-1},
    +-#line 243 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str313, ei_tis620},
    +-    {-1}, {-1},
    +-#line 270 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str316, ei_jisx0208},
    +-    {-1}, {-1},
    +-#line 110 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str319, ei_iso8859_7},
    +-#line 47 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str320, ei_ucs2internal},
    +-#line 254 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str321, ei_tcvn},
    +-    {-1},
    +-#line 239 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str323, ei_cp1133},
    +-#line 171 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str324, ei_cp1250},
    +-    {-1}, {-1},
    +-#line 322 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str327, ei_iso2022_cn},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str32, ei_iso8859_15},
    ++#line 62 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str33, ei_iso8859_2},
    +     {-1},
    ++#line 52 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str35, ei_iso8859_1},
    ++#line 70 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str36, ei_iso8859_15},
    ++#line 75 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str37, ei_koi8_r},
    ++#line 31 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str38, ei_ucs2le},
    ++#line 43 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str39, ei_utf32le},
    + #line 40 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str329, ei_utf16le},
    +-    {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 236 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str335, ei_pt154},
    +-    {-1},
    +-#line 34 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str337, ei_ucs4},
    +-    {-1}, {-1},
    +-#line 324 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str340, ei_iso2022_cn_ext},
    +-    {-1},
    +-#line 192 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str342, ei_cp1257},
    +-    {-1}, {-1},
    +-#line 285 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str345, ei_gb2312},
    +-    {-1},
    +-#line 260 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str347, ei_iso646_jp},
    +-    {-1}, {-1}, {-1},
    +-#line 343 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str351, ei_euc_kr},
    +-    {-1},
    +-#line 25 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str353, ei_ucs2},
    +-#line 321 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str354, ei_gb18030},
    +-    {-1},
    +-#line 342 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str356, ei_euc_kr},
    +-#line 168 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str357, ei_koi8_r},
    +-#line 335 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str358, ei_ces_big5},
    +-    {-1},
    +-#line 19 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str360, ei_ascii},
    +-#line 210 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str361, ei_mac_roman},
    +-#line 77 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str362, ei_iso8859_3},
    +-#line 334 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str363, ei_ces_big5},
    +-    {-1}, {-1},
    +-#line 91 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str366, ei_iso8859_5},
    +-    {-1}, {-1},
    +-#line 252 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str369, ei_viscii},
    +-#line 198 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str370, ei_cp850},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str40, ei_utf16le},
    ++#line 71 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str41, ei_iso8859_15},
    +     {-1},
    +-#line 223 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str372, ei_mac_thai},
    ++#line 63 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str43, ei_iso8859_2},
    ++#line 53 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str44, ei_iso8859_1},
    ++#line 33 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str45, ei_ucs4},
    +     {-1},
    + #line 29 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str374, ei_ucs2be},
    +-    {-1},
    +-#line 15 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str376, ei_ascii},
    +-    {-1}, {-1}, {-1},
    +-#line 12 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str380, ei_ascii},
    +-#line 41 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str381, ei_utf32},
    +-    {-1}, {-1},
    +-#line 290 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str384, ei_isoir165},
    +-    {-1}, {-1},
    +-#line 228 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str387, ei_nextstep},
    +-    {-1},
    +-#line 211 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str389, ei_mac_roman},
    +-    {-1}, {-1}, {-1},
    +-#line 299 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str393, ei_euc_jp},
    +-#line 101 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str394, ei_iso8859_6},
    +-#line 326 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str395, ei_hz},
    +-    {-1},
    +-#line 229 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str397, ei_armscii_8},
    +-    {-1}, {-1}, {-1},
    +-#line 119 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str401, ei_iso8859_8},
    +-    {-1}, {-1}, {-1},
    +-#line 349 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str405, ei_iso2022_kr},
    +-    {-1},
    +-#line 190 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str407, ei_cp1256},
    +-#line 346 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str408, ei_cp949},
    +-#line 175 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str409, ei_cp1251},
    +-    {-1},
    +-#line 188 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str411, ei_cp1255},
    +-#line 152 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str412, ei_iso8859_14},
    +-#line 43 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str413, ei_utf32le},
    +-    {-1}, {-1},
    +-#line 184 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str416, ei_cp1254},
    +-    {-1},
    +-#line 187 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str418, ei_cp1255},
    +-    {-1},
    +-#line 302 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str420, ei_sjis},
    +-#line 301 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str421, ei_sjis},
    +-#line 20 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str422, ei_ascii},
    +-#line 196 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str423, ei_cp1258},
    +-#line 237 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str424, ei_pt154},
    +-    {-1},
    +-#line 317 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str426, ei_ces_gbk},
    +-    {-1},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str47, ei_ucs2be},
    ++#line 16 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str48, ei_ascii},
    ++#line 76 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str49, ei_koi8_r},
    ++#line 13 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str50, ei_ascii},
    ++#line 28 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str51, ei_ucs2be},
    ++#line 72 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str52, ei_iso8859_15},
    ++#line 37 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str53, ei_ucs4le},
    ++#line 64 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str54, ei_iso8859_2},
    ++#line 77 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str55, ei_cp1250},
    ++#line 25 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str56, ei_ucs2},
    ++#line 45 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str57, ei_utf7},
    ++#line 65 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str58, ei_iso8859_2},
    + #line 32 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str428, ei_ucs2le},
    +-    {-1}, {-1}, {-1},
    +-#line 178 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str432, ei_cp1252},
    +-#line 44 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str433, ei_utf7},
    +-    {-1},
    +-#line 291 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str435, ei_ksc5601},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str59, ei_ucs2le},
    ++#line 57 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str60, ei_iso8859_1},
    ++#line 15 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str61, ei_ascii},
    ++#line 14 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str62, ei_ascii},
    ++#line 26 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str63, ei_ucs2},
    ++#line 47 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str64, ei_ucs2internal},
    ++#line 73 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str65, ei_iso8859_15},
    ++#line 81 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str66, ei_local_wchar_t},
    +     {-1},
    +-#line 99 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str437, ei_iso8859_6},
    +-    {-1}, {-1},
    +-#line 323 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str440, ei_iso2022_cn},
    +-    {-1}, {-1}, {-1},
    +-#line 333 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str444, ei_ces_big5},
    +-    {-1}, {-1},
    +-#line 320 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str447, ei_cp936},
    + #line 35 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str448, ei_ucs4},
    +-#line 332 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str449, ei_ces_big5},
    +-    {-1}, {-1}, {-1},
    +-#line 258 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str453, ei_iso646_jp},
    +-    {-1}, {-1},
    +-#line 244 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str456, ei_tis620},
    +-#line 112 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str457, ei_iso8859_7},
    +-    {-1},
    +-#line 92 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str459, ei_iso8859_5},
    +-#line 36 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str460, ei_ucs4be},
    +-    {-1},
    +-#line 45 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str462, ei_utf7},
    +-    {-1}, {-1},
    +-#line 328 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str465, ei_euc_tw},
    +-    {-1}, {-1},
    +-#line 181 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str468, ei_cp1253},
    +-#line 227 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str469, ei_hp_roman8},
    +-#line 327 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str470, ei_euc_tw},
    +-    {-1},
    +-#line 293 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str472, ei_ksc5601},
    +-    {-1}, {-1}, {-1},
    +-#line 27 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str476, ei_ucs2be},
    +-    {-1}, {-1},
    +-#line 251 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str479, ei_viscii},
    +-#line 111 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str480, ei_iso8859_7},
    +-    {-1},
    +-#line 172 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str482, ei_cp1250},
    +-#line 316 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str483, ei_euc_cn},
    +-    {-1}, {-1},
    +-#line 249 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str486, ei_cp874},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str68, ei_ucs4},
    + #line 30 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str487, ei_ucs2be},
    +-    {-1},
    +-#line 52 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str489, ei_java},
    +-    {-1},
    +-#line 193 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str491, ei_cp1257},
    +-    {-1},
    +-#line 26 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str493, ei_ucs2},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 265 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str500, ei_jisx0201},
    +-    {-1},
    +-#line 284 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str502, ei_iso646_cn},
    +-    {-1},
    +-#line 214 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str504, ei_mac_iceland},
    +-    {-1}, {-1}, {-1}, {-1},
    +-#line 208 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str509, ei_cp866},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str69, ei_ucs2be},
    ++#line 12 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str70, ei_ascii},
    ++#line 34 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str71, ei_ucs4},
    ++#line 27 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str72, ei_ucs2be},
    ++#line 42 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str73, ei_utf32be},
    + #line 39 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str510, ei_utf16be},
    +-    {-1}, {-1},
    +-#line 100 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str513, ei_iso8859_6},
    +-#line 315 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str514, ei_euc_cn},
    +-    {-1}, {-1}, {-1},
    +-#line 350 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str518, ei_iso2022_kr},
    +-    {-1},
    +-#line 212 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str520, ei_mac_roman},
    +-    {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 269 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str526, ei_jisx0208},
    +-    {-1},
    +-#line 209 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str528, ei_mac_roman},
    +-    {-1},
    +-#line 81 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str530, ei_iso8859_4},
    +-    {-1},
    +-#line 89 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str532, ei_iso8859_5},
    +-    {-1}, {-1},
    +-#line 246 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str535, ei_tis620},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str74, ei_utf16be},
    + #line 18 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str536, ei_ascii},
    +-#line 116 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str537, ei_iso8859_8},
    +-#line 292 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str538, ei_ksc5601},
    +-#line 305 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str539, ei_sjis},
    +-#line 118 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str540, ei_iso8859_8},
    +-#line 123 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str541, ei_iso8859_9},
    +-    {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 215 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str547, ei_mac_croatian},
    +-#line 309 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str548, ei_iso2022_jp1},
    +-    {-1},
    +-#line 298 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str550, ei_euc_jp},
    +-    {-1},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str75, ei_ascii},
    + #line 17 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str552, ei_ascii},
    +-    {-1}, {-1},
    +-#line 297 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str555, ei_euc_jp},
    +-    {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 287 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str561, ei_gb2312},
    +-#line 272 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str562, ei_jisx0208},
    +-    {-1}, {-1}, {-1},
    +-#line 240 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str566, ei_cp1133},
    +-    {-1}, {-1},
    +-#line 213 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str569, ei_mac_centraleurope},
    +-#line 279 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str570, ei_jisx0212},
    +-#line 310 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str571, ei_iso2022_jp2},
    +-    {-1},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str76, ei_ascii},
    + #line 46 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str573, ei_utf7},
    +-#line 50 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str574, ei_ucs4swapped},
    +-    {-1}, {-1}, {-1},
    +-#line 28 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str578, ei_ucs2be},
    +-#line 261 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str579, ei_iso646_jp},
    +-#line 257 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str580, ei_iso646_jp},
    +-    {-1},
    +-#line 73 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str582, ei_iso8859_3},
    +-    {-1}, {-1}, {-1},
    +-#line 204 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str586, ei_cp862},
    +-    {-1},
    +-#line 340 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str588, ei_big5hkscs2004},
    +-#line 96 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str589, ei_iso8859_6},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str77, ei_utf7},
    + #line 48 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str590, ei_ucs2swapped},
    +-#line 55 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str591, ei_iso8859_1},
    +-    {-1},
    +-#line 339 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str593, ei_big5hkscs2004},
    +-#line 42 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str594, ei_utf32be},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 307 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str604, ei_iso2022_jp},
    +-    {-1}, {-1},
    +-#line 169 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str607, ei_koi8_u},
    +-#line 245 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str608, ei_tis620},
    +-    {-1}, {-1}, {-1},
    +-#line 170 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str612, ei_koi8_ru},
    +-    {-1},
    +-#line 65 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str614, ei_iso8859_2},
    +-    {-1}, {-1}, {-1},
    +-#line 216 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str618, ei_mac_romania},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1},
    +-#line 274 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str641, ei_jisx0212},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 344 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str648, ei_euc_kr},
    +-#line 217 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str649, ei_mac_cyrillic},
    +-#line 106 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str650, ei_iso8859_7},
    +-#line 191 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str651, ei_cp1256},
    +-    {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 182 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str657, ei_cp1253},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 295 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str666, ei_ksc5601},
    +-    {-1},
    +-#line 262 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str668, ei_jisx0201},
    +-    {-1}, {-1}, {-1}, {-1},
    +-#line 105 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str673, ei_iso8859_7},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 311 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str683, ei_iso2022_jp2},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1},
    +-#line 266 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str696, ei_jisx0208},
    +-#line 263 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str697, ei_jisx0201},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 276 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str706, ei_jisx0212},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1},
    +-#line 308 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str717, ei_iso2022_jp},
    +-    {-1}, {-1}, {-1},
    +-#line 347 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str721, ei_johab},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 304 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str730, ei_sjis},
    +-    {-1}, {-1}, {-1},
    +-#line 273 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str734, ei_jisx0208},
    +-    {-1}, {-1},
    +-#line 220 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str737, ei_mac_turkish},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 256 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str755, ei_tcvn},
    +-#line 267 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str756, ei_jisx0208},
    +-    {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 329 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str762, ei_euc_tw},
    +-#line 219 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str763, ei_mac_greek},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 268 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str770, ei_jisx0208},
    +-    {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 194 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str776, ei_cp1257},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1},
    +-#line 185 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str790, ei_cp1254},
    +-    {-1},
    +-#line 218 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str792, ei_mac_ukraine},
    +-    {-1}, {-1}, {-1},
    +-#line 222 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str796, ei_mac_arabic},
    +-    {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 200 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str802, ei_cp850},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str78, ei_ucs2swapped},
    ++#line 49 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str79, ei_ucs4internal},
    ++#line 22 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str80, ei_ascii},
    +     {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 221 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str845, ei_mac_hebrew},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    ++#line 36 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str87, ei_ucs4be},
    ++#line 78 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str88, ei_cp1250},
    +     {-1}, {-1}, {-1},
    +-#line 275 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str903, ei_jisx0212},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    ++#line 54 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str92, ei_iso8859_1},
    ++#line 50 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str93, ei_ucs4swapped},
    +     {-1}, {-1}, {-1},
    +-#line 338 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str979, ei_big5hkscs2001},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 341 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str986, ei_big5hkscs2004},
    +-    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
    +-#line 337 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str995, ei_big5hkscs1999},
    +-    {-1},
    +-#line 300 "lib/aliases.gperf"
    +-    {(int)(long)&((struct stringpool_t *)0)->stringpool_str997, ei_euc_jp}
    ++#line 67 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str97, ei_iso8859_2},
    ++#line 59 "lib/aliases.gperf"
    ++    {(int)(long)&((struct stringpool_t *)0)->stringpool_str98, ei_iso8859_1}
    +   };
    + 
    + #ifdef __GNUC__
    +--- a/lib/canonical_dos.h
    ++++ b/lib/canonical_dos.h
    +@@ -1,15 +1 @@
    +   (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_0,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_4,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_5,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_8,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_12,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_13,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_17,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_21,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_22,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_26,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_31,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_35,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_38,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_42,
    +-  (int)(long)&((struct stringpool2_t *)0)->stringpool_dos_47,
    +--- a/lib/canonical.h
    ++++ b/lib/canonical.h
    +@@ -1,107 +1 @@
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str380,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str297,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str263,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str476,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str295,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str231,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str460,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str279,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str272,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str510,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str329,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str381,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str594,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str413,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str433,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str320,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str590,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str304,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str574,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str157,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str489,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str117,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str163,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str235,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str131,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str135,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str113,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str281,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str145,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str149,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str270,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str124,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str242,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str138,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str142,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str120,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str245,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str607,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str612,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str324,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str178,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str224,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str296,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str192,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str196,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str174,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str342,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str206,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str308,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str197,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str147,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str528,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str569,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str504,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str547,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str618,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str649,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str792,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str763,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str737,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str845,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str796,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str372,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str298,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str387,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str397,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str291,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str211,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str277,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str116,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str283,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str323,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str233,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str249,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str252,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str156,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str580,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str668,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str696,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str641,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str284,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str345,
    +   (int)(long)&((struct stringpool_t *)0)->stringpool_str77,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str435,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str555,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str421,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str260,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str604,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str548,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str571,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str278,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str426,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str210,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str354,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str327,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str340,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str18,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str470,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str241,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str310,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str995,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str979,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str593,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str356,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str194,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str721,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str405,
    +--- a/lib/canonical_local.h
    ++++ b/lib/canonical_local.h
    +@@ -1,2 +1 @@
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str169,
    +-  (int)(long)&((struct stringpool_t *)0)->stringpool_str267,
    ++
    +--- a/lib/converters.h
    ++++ b/lib/converters.h
    +@@ -129,161 +129,15 @@ struct conv_struct {
    + #include "ucs2swapped.h"
    + #include "ucs4internal.h"
    + #include "ucs4swapped.h"
    +-#include "c99.h"
    +-#include "java.h"
    + 
    + /* 8-bit encodings */
    + #include "iso8859_1.h"
    + #include "iso8859_2.h"
    +-#include "iso8859_3.h"
    +-#include "iso8859_4.h"
    +-#include "iso8859_5.h"
    +-#include "iso8859_6.h"
    +-#include "iso8859_7.h"
    +-#include "iso8859_8.h"
    +-#include "iso8859_9.h"
    +-#include "iso8859_10.h"
    +-#include "iso8859_11.h"
    +-#include "iso8859_13.h"
    +-#include "iso8859_14.h"
    + #include "iso8859_15.h"
    +-#include "iso8859_16.h"
    + #include "koi8_r.h"
    +-#include "koi8_u.h"
    +-#include "koi8_ru.h"
    + #include "cp1250.h"
    +-#include "cp1251.h"
    +-#include "cp1252.h"
    +-#include "cp1253.h"
    +-#include "cp1254.h"
    +-#include "cp1255.h"
    +-#include "cp1256.h"
    +-#include "cp1257.h"
    +-#include "cp1258.h"
    + #include "cp850.h"
    +-#include "cp862.h"
    +-#include "cp866.h"
    +-#include "mac_roman.h"
    +-#include "mac_centraleurope.h"
    +-#include "mac_iceland.h"
    +-#include "mac_croatian.h"
    +-#include "mac_romania.h"
    +-#include "mac_cyrillic.h"
    +-#include "mac_ukraine.h"
    +-#include "mac_greek.h"
    +-#include "mac_turkish.h"
    +-#include "mac_hebrew.h"
    +-#include "mac_arabic.h"
    +-#include "mac_thai.h"
    +-#include "hp_roman8.h"
    +-#include "nextstep.h"
    +-#include "armscii_8.h"
    +-#include "georgian_academy.h"
    +-#include "georgian_ps.h"
    +-#include "koi8_t.h"
    +-#include "pt154.h"
    +-#include "mulelao.h"
    +-#include "cp1133.h"
    +-#include "tis620.h"
    +-#include "cp874.h"
    +-#include "viscii.h"
    +-#include "tcvn.h"
    +-
    +-/* CJK character sets [CCS = coded character set] [CJKV.INF chapter 3] */
    +-
    +-typedef struct {
    +-  unsigned short indx; /* index into big table */
    +-  unsigned short used; /* bitmask of used entries */
    +-} Summary16;
    +-
    +-#include "iso646_jp.h"
    +-#include "jisx0201.h"
    +-#include "jisx0208.h"
    +-#include "jisx0212.h"
    +-
    +-#include "iso646_cn.h"
    +-#include "gb2312.h"
    +-#include "isoir165.h"
    +-/*#include "gb12345.h"*/
    +-#include "gbk.h"
    +-#include "cns11643.h"
    +-#include "big5.h"
    +-
    +-#include "ksc5601.h"
    +-#include "johab_hangul.h"
    +-
    +-/* CJK encodings [CES = character encoding scheme] [CJKV.INF chapter 4] */
    +-
    +-#include "euc_jp.h"
    +-#include "sjis.h"
    +-#include "cp932.h"
    +-#include "iso2022_jp.h"
    +-#include "iso2022_jp1.h"
    +-#include "iso2022_jp2.h"
    +-
    +-#include "euc_cn.h"
    +-#include "ces_gbk.h"
    +-#include "cp936.h"
    +-#include "gb18030.h"
    +-#include "iso2022_cn.h"
    +-#include "iso2022_cnext.h"
    +-#include "hz.h"
    +-#include "euc_tw.h"
    +-#include "ces_big5.h"
    +-#include "cp950.h"
    +-#include "big5hkscs1999.h"
    +-#include "big5hkscs2001.h"
    +-#include "big5hkscs2004.h"
    +-
    +-#include "euc_kr.h"
    +-#include "cp949.h"
    +-#include "johab.h"
    +-#include "iso2022_kr.h"
    +-
    +-/* Encodings used by system dependent locales. */
    +-
    +-#ifdef USE_AIX
    +-#include "cp856.h"
    +-#include "cp922.h"
    +-#include "cp943.h"
    +-#include "cp1046.h"
    +-#include "cp1124.h"
    +-#include "cp1129.h"
    +-#include "cp1161.h"
    +-#include "cp1162.h"
    +-#include "cp1163.h"
    +-#endif
    +-
    +-#ifdef USE_OSF1
    +-#include "dec_kanji.h"
    +-#include "dec_hanyu.h"
    +-#endif
    + 
    + #ifdef USE_DOS
    + #include "cp437.h"
    +-#include "cp737.h"
    +-#include "cp775.h"
    +-#include "cp852.h"
    +-#include "cp853.h"
    +-#include "cp855.h"
    +-#include "cp857.h"
    +-#include "cp858.h"
    +-#include "cp860.h"
    +-#include "cp861.h"
    +-#include "cp863.h"
    +-#include "cp864.h"
    +-#include "cp865.h"
    +-#include "cp869.h"
    +-#include "cp1125.h"
    +-#endif
    +-
    +-#ifdef USE_EXTRA
    +-#include "euc_jisx0213.h"
    +-#include "shift_jisx0213.h"
    +-#include "iso2022_jp3.h"
    +-#include "big5_2003.h"
    +-#include "tds565.h"
    +-#include "atarist.h"
    +-#include "riscos1.h"
    + #endif
    +-
    +--- a/lib/encodings.def
    ++++ b/lib/encodings.def
    +@@ -161,16 +161,6 @@ DEFENCODING(( "UCS-4-SWAPPED",
    +             ucs4swapped,
    +             { ucs4swapped_mbtowc, NULL }, { ucs4swapped_wctomb, NULL })
    + 
    +-DEFENCODING(( "C99",
    +-            ),
    +-            c99,
    +-            { c99_mbtowc, NULL },         { c99_wctomb, NULL })
    +-
    +-DEFENCODING(( "JAVA",
    +-            ),
    +-            java,
    +-            { java_mbtowc, NULL },        { java_wctomb, NULL })
    +-
    + /* Standard 8-bit encodings */
    + 
    + DEFENCODING(( "ISO-8859-1",             /* IANA */
    +@@ -203,148 +193,6 @@ DEFENCODING(( "ISO-8859-2",
    +             iso8859_2,
    +             { iso8859_2_mbtowc, NULL },   { iso8859_2_wctomb, NULL })
    + 
    +-DEFENCODING(( "ISO-8859-3",             /* IANA */
    +-              "ISO_8859-3",             /* IANA */
    +-              "ISO_8859-3:1988",        /* IANA */
    +-              "ISO-IR-109",             /* IANA */
    +-              "LATIN3",                 /* IANA */
    +-              "L3",                     /* IANA */
    +-              "csISOLatin3",            /* IANA */
    +-              "ISO8859-3",              /* X11R6.4, glibc, FreeBSD */
    +-            /*"ISO8859_3",                 JDK 1.1 */
    +-            /*"CP28593",                   Windows */
    +-            ),
    +-            iso8859_3,
    +-            { iso8859_3_mbtowc, NULL },   { iso8859_3_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-8859-4",             /* IANA */
    +-              "ISO_8859-4",             /* IANA */
    +-              "ISO_8859-4:1988",        /* IANA */
    +-              "ISO-IR-110",             /* IANA */
    +-              "LATIN4",                 /* IANA */
    +-              "L4",                     /* IANA */
    +-              "csISOLatin4",            /* IANA */
    +-              "ISO8859-4",              /* X11R6.4, glibc, FreeBSD */
    +-            /*"ISO8859_4",                 JDK 1.1 */
    +-            /*"CP28594",                   Windows */
    +-            ),
    +-            iso8859_4,
    +-            { iso8859_4_mbtowc, NULL },   { iso8859_4_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-8859-5",             /* IANA */
    +-              "ISO_8859-5",             /* IANA */
    +-              "ISO_8859-5:1988",        /* IANA */
    +-              "ISO-IR-144",             /* IANA */
    +-              "CYRILLIC",               /* IANA */
    +-              "csISOLatinCyrillic",     /* IANA */
    +-              "ISO8859-5",              /* X11R6.4, glibc, FreeBSD */
    +-            /*"ISO8859_5",                 JDK 1.1 */
    +-            /*"CP28595",                   Windows */
    +-            ),
    +-            iso8859_5,
    +-            { iso8859_5_mbtowc, NULL },   { iso8859_5_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-8859-6",             /* IANA */
    +-              "ISO_8859-6",             /* IANA */
    +-              "ISO_8859-6:1987",        /* IANA */
    +-              "ISO-IR-127",             /* IANA */
    +-              "ECMA-114",               /* IANA */
    +-              "ASMO-708",               /* IANA */
    +-              "ARABIC",                 /* IANA */
    +-              "csISOLatinArabic",       /* IANA */
    +-              "ISO8859-6",              /* X11R6.4, glibc, FreeBSD */
    +-            /*"ISO8859_6",                 JDK 1.1 */
    +-            /*"CP28596",                   Windows */
    +-            ),
    +-            iso8859_6,
    +-            { iso8859_6_mbtowc, NULL },   { iso8859_6_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-8859-7",             /* IANA, RFC 1947 */
    +-              "ISO_8859-7",             /* IANA */
    +-              "ISO_8859-7:1987",        /* IANA */
    +-              "ISO_8859-7:2003",
    +-              "ISO-IR-126",             /* IANA */
    +-              "ECMA-118",               /* IANA */
    +-              "ELOT_928",               /* IANA */
    +-              "GREEK8",                 /* IANA */
    +-              "GREEK",                  /* IANA */
    +-              "csISOLatinGreek",        /* IANA */
    +-              "ISO8859-7",              /* X11R6.4, glibc, FreeBSD */
    +-            /*"ISO8859_7",                 JDK 1.1 */
    +-            /*"CP28597",                   Windows */
    +-            ),
    +-            iso8859_7,
    +-            { iso8859_7_mbtowc, NULL },   { iso8859_7_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-8859-8",             /* IANA */
    +-              "ISO_8859-8",             /* IANA */
    +-              "ISO_8859-8:1988",        /* IANA */
    +-              "ISO-IR-138",             /* IANA */
    +-              "HEBREW",                 /* IANA */
    +-              "csISOLatinHebrew",       /* IANA */
    +-              "ISO8859-8",              /* X11R6.4, glibc, FreeBSD */
    +-            /*"ISO8859_8",                 JDK 1.1 */
    +-            /*"CP28598",                   Windows */
    +-            /*"CP38598",                   Windows */
    +-            ),
    +-            iso8859_8,
    +-            { iso8859_8_mbtowc, NULL },   { iso8859_8_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-8859-9",             /* IANA */
    +-              "ISO_8859-9",             /* IANA */
    +-              "ISO_8859-9:1989",        /* IANA */
    +-              "ISO-IR-148",             /* IANA */
    +-              "LATIN5",                 /* IANA */
    +-              "L5",                     /* IANA */
    +-              "csISOLatin5",            /* IANA */
    +-              "ISO8859-9",              /* X11R6.4, glibc, FreeBSD */
    +-            /*"ISO8859_9",                 JDK 1.1 */
    +-            /*"CP28599",                   Windows */
    +-            ),
    +-            iso8859_9,
    +-            { iso8859_9_mbtowc, NULL },   { iso8859_9_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-8859-10",            /* IANA */
    +-              "ISO_8859-10",
    +-              "ISO_8859-10:1992",       /* IANA */
    +-              "ISO-IR-157",             /* IANA */
    +-              "LATIN6",                 /* IANA */
    +-              "L6",                     /* IANA */
    +-              "csISOLatin6",            /* IANA */
    +-              "ISO8859-10",             /* X11R6.4, glibc, FreeBSD */
    +-            ),
    +-            iso8859_10,
    +-            { iso8859_10_mbtowc, NULL },  { iso8859_10_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-8859-11",            /* glibc */
    +-              "ISO_8859-11",
    +-              "ISO8859-11",             /* X11R6.7, glibc */
    +-            ),
    +-            iso8859_11,
    +-            { iso8859_11_mbtowc, NULL },  { iso8859_11_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-8859-13",            /* IANA, glibc */
    +-              "ISO_8859-13",
    +-              "ISO-IR-179",             /* glibc */
    +-              "LATIN7",                 /* glibc */
    +-              "L7",                     /* glibc */
    +-              "ISO8859-13",             /* glibc, FreeBSD */
    +-            ),
    +-            iso8859_13,
    +-            { iso8859_13_mbtowc, NULL },  { iso8859_13_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-8859-14",            /* IANA, glibc */
    +-              "ISO_8859-14",            /* IANA */
    +-              "ISO_8859-14:1998",       /* IANA, glibc */
    +-              "ISO-IR-199",             /* IANA */
    +-              "LATIN8",                 /* IANA, glibc */
    +-              "L8",                     /* IANA, glibc */
    +-              "ISO-CELTIC",             /* IANA */
    +-              "ISO8859-14",             /* glibc, FreeBSD */
    +-            ),
    +-            iso8859_14,
    +-            { iso8859_14_mbtowc, NULL },  { iso8859_14_wctomb, NULL })
    +-
    + DEFENCODING(( "ISO-8859-15",            /* IANA, glibc */
    +               "ISO_8859-15",            /* IANA */
    +               "ISO_8859-15:1998",       /* glibc */
    +@@ -356,17 +204,6 @@ DEFENCODING(( "ISO-8859-15",
    +             iso8859_15,
    +             { iso8859_15_mbtowc, NULL },  { iso8859_15_wctomb, NULL })
    + 
    +-DEFENCODING(( "ISO-8859-16",            /* IANA */
    +-              "ISO_8859-16",            /* IANA */
    +-              "ISO_8859-16:2001",       /* IANA */
    +-              "ISO-IR-226",             /* IANA */
    +-              "LATIN10",                /* IANA */
    +-              "L10",                    /* IANA */
    +-              "ISO8859-16",             /* glibc, FreeBSD */
    +-            ),
    +-            iso8859_16,
    +-            { iso8859_16_mbtowc, NULL },  { iso8859_16_wctomb, NULL })
    +-
    + DEFENCODING(( "KOI8-R",                 /* IANA, RFC 1489, X11R6.4, JDK 1.1 */
    +               "csKOI8R",                /* IANA */
    +             /*"CP20866",                   Windows */
    +@@ -374,16 +211,6 @@ DEFENCODING(( "KOI8-R",
    +             koi8_r,
    +             { koi8_r_mbtowc, NULL },      { koi8_r_wctomb, NULL })
    + 
    +-DEFENCODING(( "KOI8-U",                 /* IANA, RFC 2319 */
    +-            ),
    +-            koi8_u,
    +-            { koi8_u_mbtowc, NULL },      { koi8_u_wctomb, NULL })
    +-
    +-DEFENCODING(( "KOI8-RU",
    +-            ),
    +-            koi8_ru,
    +-            { koi8_ru_mbtowc, NULL },     { koi8_ru_wctomb, NULL })
    +-
    + /* Windows 8-bit encodings */
    + 
    + DEFENCODING(( "CP1250",                 /* JDK 1.1 */
    +@@ -393,61 +220,6 @@ DEFENCODING(( "CP1250",
    +             cp1250,
    +             { cp1250_mbtowc, NULL },      { cp1250_wctomb, NULL })
    + 
    +-DEFENCODING(( "CP1251",                 /* JDK 1.1 */
    +-              "WINDOWS-1251",           /* IANA */
    +-              "MS-CYRL",
    +-            ),
    +-            cp1251,
    +-            { cp1251_mbtowc, NULL },      { cp1251_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP1252",                 /* JDK 1.1 */
    +-              "WINDOWS-1252",           /* IANA */
    +-              "MS-ANSI",
    +-            ),
    +-            cp1252,
    +-            { cp1252_mbtowc, NULL },      { cp1252_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP1253",                 /* JDK 1.1 */
    +-              "WINDOWS-1253",           /* IANA */
    +-              "MS-GREEK",
    +-            ),
    +-            cp1253,
    +-            { cp1253_mbtowc, NULL },      { cp1253_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP1254",                 /* JDK 1.1 */
    +-              "WINDOWS-1254",           /* IANA */
    +-              "MS-TURK",
    +-            ),
    +-            cp1254,
    +-            { cp1254_mbtowc, NULL },      { cp1254_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP1255",                 /* JDK 1.1 */
    +-              "WINDOWS-1255",           /* IANA */
    +-              "MS-HEBR",
    +-            ),
    +-            cp1255,
    +-            { cp1255_mbtowc, cp1255_flushwc }, { cp1255_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP1256",                 /* JDK 1.1 */
    +-              "WINDOWS-1256",           /* IANA */
    +-              "MS-ARAB",
    +-            ),
    +-            cp1256,
    +-            { cp1256_mbtowc, NULL },      { cp1256_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP1257",                 /* JDK 1.1 */
    +-              "WINDOWS-1257",           /* IANA */
    +-              "WINBALTRIM",
    +-            ),
    +-            cp1257,
    +-            { cp1257_mbtowc, NULL },      { cp1257_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP1258",                 /* JDK 1.1 */
    +-              "WINDOWS-1258",           /* IANA */
    +-            ),
    +-            cp1258,
    +-            { cp1258_mbtowc, cp1258_flushwc }, { cp1258_wctomb, NULL })
    +-
    + /* DOS 8-bit encodings */
    + 
    + DEFENCODING(( "CP850",                  /* IANA, JDK 1.1 */
    +@@ -458,431 +230,3 @@ DEFENCODING(( "CP850",
    +             cp850,
    +             { cp850_mbtowc, NULL },       { cp850_wctomb, NULL })
    + 
    +-DEFENCODING(( "CP862",                  /* IANA, JDK 1.1 */
    +-              "IBM862",                 /* IANA */
    +-              "862",                    /* IANA */
    +-              "csPC862LatinHebrew",     /* IANA */
    +-            ),
    +-            cp862,
    +-            { cp862_mbtowc, NULL },       { cp862_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP866",                  /* IANA, JDK 1.1 */
    +-              "IBM866",                 /* IANA */
    +-              "866",                    /* IANA */
    +-              "csIBM866",               /* IANA */
    +-            ),
    +-            cp866,
    +-            { cp866_mbtowc, NULL },       { cp866_wctomb, NULL })
    +-
    +-/* Macintosh 8-bit encodings */
    +-
    +-DEFENCODING(( "MacRoman",               /* JDK 1.1 */
    +-              /* This is the best table for MACINTOSH. The ones */
    +-              /* in glibc and FreeBSD-iconv are bad quality. */
    +-              "MACINTOSH",              /* IANA */
    +-              "MAC",                    /* IANA */
    +-              "csMacintosh",            /* IANA */
    +-            /*"CP10000",                   Windows */
    +-            ),
    +-            mac_roman,
    +-            { mac_roman_mbtowc, NULL },   { mac_roman_wctomb, NULL })
    +-
    +-DEFENCODING(( "MacCentralEurope",       /* JDK 1.1 */
    +-            /*"CP10029",                   Windows */
    +-            ),
    +-            mac_centraleurope,
    +-            { mac_centraleurope_mbtowc, NULL }, { mac_centraleurope_wctomb, NULL })
    +-
    +-DEFENCODING(( "MacIceland",             /* JDK 1.1 */
    +-            /*"CP10079",                   Windows */
    +-            ),
    +-            mac_iceland,
    +-            { mac_iceland_mbtowc, NULL }, { mac_iceland_wctomb, NULL })
    +-
    +-DEFENCODING(( "MacCroatian",            /* JDK 1.1 */
    +-            /*"CP10082",                   Windows */
    +-            ),
    +-            mac_croatian,
    +-            { mac_croatian_mbtowc, NULL }, { mac_croatian_wctomb, NULL })
    +-
    +-DEFENCODING(( "MacRomania",             /* JDK 1.1 */
    +-            /*"CP10010",                   Windows */
    +-            ),
    +-            mac_romania,
    +-            { mac_romania_mbtowc, NULL }, { mac_romania_wctomb, NULL })
    +-
    +-DEFENCODING(( "MacCyrillic",            /* JDK 1.1 */
    +-            /*"CP10007",                   Windows */
    +-            ),
    +-            mac_cyrillic,
    +-            { mac_cyrillic_mbtowc, NULL }, { mac_cyrillic_wctomb, NULL })
    +-
    +-DEFENCODING(( "MacUkraine",             /* JDK 1.1 */
    +-            /*"CP10017",                   Windows */
    +-            ),
    +-            mac_ukraine,
    +-            { mac_ukraine_mbtowc, NULL }, { mac_ukraine_wctomb, NULL })
    +-
    +-DEFENCODING(( "MacGreek",               /* JDK 1.1 */
    +-            /*"CP10006",                   Windows */
    +-            ),
    +-            mac_greek,
    +-            { mac_greek_mbtowc, NULL },   { mac_greek_wctomb, NULL })
    +-
    +-DEFENCODING(( "MacTurkish",             /* JDK 1.1 */
    +-            /*"CP10081",                   Windows */
    +-            ),
    +-            mac_turkish,
    +-            { mac_turkish_mbtowc, NULL }, { mac_turkish_wctomb, NULL })
    +-
    +-DEFENCODING(( "MacHebrew",              /* JDK 1.1 */
    +-            /*"CP10005",                   Windows */
    +-            ),
    +-            mac_hebrew,
    +-            { mac_hebrew_mbtowc, NULL },  { mac_hebrew_wctomb, NULL })
    +-
    +-DEFENCODING(( "MacArabic",              /* JDK 1.1 */
    +-            /*"CP10004",                   Windows */
    +-            ),
    +-            mac_arabic,
    +-            { mac_arabic_mbtowc, NULL },  { mac_arabic_wctomb, NULL })
    +-
    +-DEFENCODING(( "MacThai",                /* JDK 1.1 */
    +-            /*"CP10021",                   Windows */
    +-            ),
    +-            mac_thai,
    +-            { mac_thai_mbtowc, NULL },    { mac_thai_wctomb, NULL })
    +-
    +-/* Other platform specific 8-bit encodings */
    +-
    +-DEFENCODING(( "HP-ROMAN8",              /* IANA, X11R6.4 */
    +-              "ROMAN8",                 /* IANA */
    +-              "R8",                     /* IANA */
    +-              "csHPRoman8",             /* IANA */
    +-            ),
    +-            hp_roman8,
    +-            { hp_roman8_mbtowc, NULL },   { hp_roman8_wctomb, NULL })
    +-
    +-DEFENCODING(( "NEXTSTEP",
    +-            ),
    +-            nextstep,
    +-            { nextstep_mbtowc, NULL },    { nextstep_wctomb, NULL })
    +-
    +-/* Regional 8-bit encodings used for a single language */
    +-
    +-DEFENCODING(( "ARMSCII-8",
    +-            ),
    +-            armscii_8,
    +-            { armscii_8_mbtowc, NULL },   { armscii_8_wctomb, NULL })
    +-
    +-DEFENCODING(( "GEORGIAN-ACADEMY",
    +-            ),
    +-            georgian_academy,
    +-            { georgian_academy_mbtowc, NULL }, { georgian_academy_wctomb, NULL })
    +-
    +-DEFENCODING(( "GEORGIAN-PS",
    +-            ),
    +-            georgian_ps,
    +-            { georgian_ps_mbtowc, NULL }, { georgian_ps_wctomb, NULL })
    +-
    +-DEFENCODING(( "KOI8-T",
    +-            ),
    +-            koi8_t,
    +-            { koi8_t_mbtowc, NULL },      { koi8_t_wctomb, NULL })
    +-
    +-DEFENCODING(( "PT154",                  /* IANA, glibc */
    +-              "PTCP154",                /* IANA */
    +-              "CP154",                  /* IANA */
    +-              "CYRILLIC-ASIAN",         /* IANA */
    +-              "csPTCP154",              /* IANA */
    +-            ),
    +-            pt154,
    +-            { pt154_mbtowc, NULL },       { pt154_wctomb, NULL })
    +-
    +-DEFENCODING(( "MULELAO-1",
    +-            ),
    +-            mulelao,
    +-            { mulelao_mbtowc, NULL },     { mulelao_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP1133",
    +-              "IBM-CP1133",
    +-            ),
    +-            cp1133,
    +-            { cp1133_mbtowc, NULL },      { cp1133_wctomb, NULL })
    +-
    +-DEFENCODING(( "TIS-620",                /* IANA */
    +-              "TIS620",                 /* glibc */
    +-              "TIS620-0",               /* glibc */
    +-              "TIS620.2529-1",          /* glibc */
    +-              "TIS620.2533-0",          /* glibc */
    +-              "TIS620.2533-1",
    +-              "ISO-IR-166",             /* glibc */
    +-            ),
    +-            tis620,
    +-            { tis620_mbtowc, NULL },      { tis620_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP874",                  /* JDK 1.1 */
    +-              "WINDOWS-874",
    +-            ),
    +-            cp874,
    +-            { cp874_mbtowc, NULL },       { cp874_wctomb, NULL })
    +-
    +-DEFENCODING(( "VISCII",                 /* IANA, RFC 1456 */
    +-              "VISCII1.1-1",
    +-              "csVISCII",               /* IANA */
    +-            ),
    +-            viscii,
    +-            { viscii_mbtowc, NULL },      { viscii_wctomb, NULL })
    +-
    +-DEFENCODING(( "TCVN",
    +-              "TCVN-5712",
    +-              "TCVN5712-1",
    +-              "TCVN5712-1:1993",
    +-            ),
    +-            tcvn,
    +-            { tcvn_mbtowc, tcvn_flushwc }, { tcvn_wctomb, NULL })
    +-
    +-/* CJK character sets (not documented) */
    +-
    +-DEFENCODING(( "JIS_C6220-1969-RO",      /* IANA */
    +-              "ISO646-JP",              /* IANA */
    +-              "ISO-IR-14",              /* IANA */
    +-              "JP",                     /* IANA */
    +-              "csISO14JISC6220ro",      /* IANA */
    +-            ),
    +-            iso646_jp,
    +-            { iso646_jp_mbtowc, NULL },   { iso646_jp_wctomb, NULL })
    +-
    +-DEFENCODING(( "JIS_X0201",              /* IANA */
    +-              "JISX0201-1976",
    +-              "X0201",                  /* IANA */
    +-              "csHalfWidthKatakana",    /* IANA */
    +-            /*"JISX0201.1976-0",           X11R6.4 */
    +-            /*"JIS0201",                   JDK 1.1 */
    +-            ),
    +-            jisx0201,
    +-            { jisx0201_mbtowc, NULL },    { jisx0201_wctomb, NULL })
    +-
    +-DEFENCODING(( "JIS_X0208",
    +-              "JIS_X0208-1983",         /* IANA */
    +-              "JIS_X0208-1990",
    +-              "JIS0208",
    +-              "X0208",                  /* IANA */
    +-              "ISO-IR-87",              /* IANA */
    +-              "JIS_C6226-1983",         /* IANA */
    +-              "csISO87JISX0208",        /* IANA */
    +-            /*"JISX0208.1983-0",           X11R6.4 */
    +-            /*"JISX0208.1990-0",           X11R6.4 */
    +-            /*"JIS0208",                   JDK 1.1 */
    +-            ),
    +-            jisx0208,
    +-            { jisx0208_mbtowc, NULL },    { jisx0208_wctomb, NULL })
    +-
    +-DEFENCODING(( "JIS_X0212",
    +-              "JIS_X0212.1990-0",
    +-              "JIS_X0212-1990",         /* IANA */
    +-              "X0212",                  /* IANA */
    +-              "ISO-IR-159",             /* IANA */
    +-              "csISO159JISX02121990",   /* IANA */
    +-            /*"JISX0212.1990-0",           X11R6.4 */
    +-            /*"JIS0212",                   JDK 1.1 */
    +-            ),
    +-            jisx0212,
    +-            { jisx0212_mbtowc, NULL },    { jisx0212_wctomb, NULL })
    +-
    +-DEFENCODING(( "GB_1988-80",             /* IANA */
    +-              "ISO646-CN",              /* IANA */
    +-              "ISO-IR-57",              /* IANA */
    +-              "CN",                     /* IANA */
    +-              "csISO57GB1988",          /* IANA */
    +-            ),
    +-            iso646_cn,
    +-            { iso646_cn_mbtowc, NULL },   { iso646_cn_wctomb, NULL })
    +-
    +-DEFENCODING(( "GB_2312-80",             /* IANA */
    +-              "ISO-IR-58",              /* IANA */
    +-              "csISO58GB231280",        /* IANA */
    +-              "CHINESE",                /* IANA */
    +-            /*"GB2312.1980-0",             X11R6.4 */
    +-            ),
    +-            gb2312,
    +-            { gb2312_mbtowc, NULL },      { gb2312_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-IR-165",
    +-              "CN-GB-ISOIR165",         /* RFC 1922 */
    +-            ),
    +-            isoir165,
    +-            { isoir165_mbtowc, NULL },    { isoir165_wctomb, NULL })
    +-
    +-DEFENCODING(( "KSC_5601",               /* IANA */
    +-              "KS_C_5601-1987",         /* IANA */
    +-              "KS_C_5601-1989",         /* IANA */
    +-              "ISO-IR-149",             /* IANA */
    +-              "csKSC56011987",          /* IANA */
    +-              "KOREAN",                 /* IANA */
    +-            /*"KSC5601.1987-0",            X11R6.4 */
    +-            /*"KSX1001:1992",              Ken Lunde */
    +-            ),
    +-            ksc5601,
    +-            { ksc5601_mbtowc, NULL },     { ksc5601_wctomb, NULL })
    +-
    +-/* CJK encodings */
    +-
    +-DEFENCODING(( "EUC-JP",                 /* IANA */
    +-              "EUCJP",                  /* glibc */
    +-              "Extended_UNIX_Code_Packed_Format_for_Japanese", /* IANA */
    +-              "csEUCPkdFmtJapanese",    /* IANA */
    +-            /*"EUC_JP",                    JDK 1.1 */
    +-            /*"CP51932",                   Windows */
    +-            ),
    +-            euc_jp,
    +-            { euc_jp_mbtowc, NULL },      { euc_jp_wctomb, NULL })
    +-
    +-DEFENCODING(( "SHIFT_JIS",              /* IANA */
    +-              "SHIFT-JIS",              /* glibc */
    +-              "SJIS",                   /* JDK 1.1 */
    +-              "MS_KANJI",               /* IANA */
    +-              "csShiftJIS",             /* IANA */
    +-            ),
    +-            sjis,
    +-            { sjis_mbtowc, NULL },        { sjis_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP932",                  /* glibc */
    +-            ),
    +-            cp932,
    +-            { cp932_mbtowc, NULL },       { cp932_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-2022-JP",            /* IANA, RFC 1468 */
    +-              "csISO2022JP",            /* IANA */
    +-            /*"ISO2022JP",                 JDK 1.1 */
    +-            ),
    +-            iso2022_jp,
    +-            { iso2022_jp_mbtowc, NULL },  { iso2022_jp_wctomb, iso2022_jp_reset })
    +-
    +-DEFENCODING(( "ISO-2022-JP-1",          /* RFC 2237 */
    +-            ),
    +-            iso2022_jp1,
    +-            { iso2022_jp1_mbtowc, NULL }, { iso2022_jp1_wctomb, iso2022_jp1_reset })
    +-
    +-DEFENCODING(( "ISO-2022-JP-2",          /* IANA, RFC 1554 */
    +-              "csISO2022JP2",           /* IANA */
    +-            ),
    +-            iso2022_jp2,
    +-            { iso2022_jp2_mbtowc, NULL }, { iso2022_jp2_wctomb, iso2022_jp2_reset })
    +-
    +-DEFENCODING(( "EUC-CN",                 /* glibc */
    +-              "EUCCN",                  /* glibc */
    +-              "GB2312",                 /* IANA */
    +-              "CN-GB",                  /* RFC 1922 */
    +-              "csGB2312",               /* IANA */
    +-            /*"EUC_CN",                    JDK 1.1 */
    +-            /*"CP51936",                   Windows */
    +-            ),
    +-            euc_cn,
    +-            { euc_cn_mbtowc, NULL },      { euc_cn_wctomb, NULL })
    +-
    +-DEFENCODING(( "GBK",                    /* IANA, JDK 1.1 */
    +-            ),
    +-            ces_gbk,
    +-            { ces_gbk_mbtowc, NULL },     { ces_gbk_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP936",                  /* IANA */
    +-              "MS936",                  /* IANA */
    +-              "WINDOWS-936",            /* IANA */
    +-            ),
    +-            cp936,
    +-            { cp936_mbtowc, NULL },       { cp936_wctomb, NULL })
    +-
    +-DEFENCODING(( "GB18030",                /* IANA, glibc */
    +-            /*"CP54936",                   Windows */
    +-            ),
    +-            gb18030,
    +-            { gb18030_mbtowc, NULL },     { gb18030_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-2022-CN",            /* IANA, RFC 1922 */
    +-              "csISO2022CN",
    +-            /*"ISO2022CN",                 JDK 1.1 */
    +-            ),
    +-            iso2022_cn,
    +-            { iso2022_cn_mbtowc, NULL },  { iso2022_cn_wctomb, iso2022_cn_reset })
    +-
    +-DEFENCODING(( "ISO-2022-CN-EXT",        /* IANA, RFC 1922 */
    +-            ),
    +-            iso2022_cn_ext,
    +-            { iso2022_cn_ext_mbtowc, NULL }, { iso2022_cn_ext_wctomb, iso2022_cn_ext_reset })
    +-
    +-DEFENCODING(( "HZ",                     /* RFC 1843 */
    +-              "HZ-GB-2312",             /* IANA, RFC 1842 */
    +-            ),
    +-            hz,
    +-            { hz_mbtowc, NULL },          { hz_wctomb, hz_reset })
    +-
    +-DEFENCODING(( "EUC-TW",                 /* glibc */
    +-              "EUCTW",                  /* glibc */
    +-              "csEUCTW",
    +-            /*"EUC_TW",                    JDK 1.1 */
    +-            /*"CP51950",                   Windows */
    +-            ),
    +-            euc_tw,
    +-            { euc_tw_mbtowc, NULL },      { euc_tw_wctomb, NULL })
    +-
    +-DEFENCODING(( "BIG5",                   /* IANA, JDK 1.1 */
    +-              "BIG-5",                  /* glibc */
    +-              "BIG-FIVE",               /* glibc */
    +-              "BIGFIVE",                /* glibc */
    +-              "CN-BIG5",                /* RFC 1922 */
    +-              "csBig5",                 /* IANA */
    +-            ),
    +-            ces_big5,
    +-            { ces_big5_mbtowc, NULL },    { ces_big5_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP950",                  /* JDK 1.1 */
    +-            ),
    +-            cp950,
    +-            { cp950_mbtowc, NULL },       { cp950_wctomb, NULL })
    +-
    +-DEFENCODING(( "BIG5-HKSCS:1999",
    +-            ),
    +-            big5hkscs1999,
    +-            { big5hkscs1999_mbtowc, big5hkscs1999_flushwc }, { big5hkscs1999_wctomb, big5hkscs1999_reset })
    +-
    +-DEFENCODING(( "BIG5-HKSCS:2001",
    +-            ),
    +-            big5hkscs2001,
    +-            { big5hkscs2001_mbtowc, big5hkscs2001_flushwc }, { big5hkscs2001_wctomb, big5hkscs2001_reset })
    +-
    +-DEFENCODING(( "BIG5-HKSCS",             /* IANA */
    +-              "BIG5HKSCS",              /* glibc */
    +-              "BIG5-HKSCS:2004",
    +-            ),
    +-            big5hkscs2004,
    +-            { big5hkscs2004_mbtowc, big5hkscs2004_flushwc }, { big5hkscs2004_wctomb, big5hkscs2004_reset })
    +-
    +-DEFENCODING(( "EUC-KR",                 /* IANA, RFC 1557 */
    +-              "EUCKR",                  /* glibc */
    +-              "csEUCKR",                /* IANA */
    +-            /*"EUC_KR",                    JDK 1.1 */
    +-            /*"CP51949",                   Windows */
    +-            ),
    +-            euc_kr,
    +-            { euc_kr_mbtowc, NULL },      { euc_kr_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP949",                  /* JDK 1.1 */
    +-              "UHC",                    /* glibc */
    +-            ),
    +-            cp949,
    +-            { cp949_mbtowc, NULL },       { cp949_wctomb, NULL })
    +-
    +-DEFENCODING(( "JOHAB",                  /* glibc */
    +-              "CP1361",                 /* glibc */
    +-            ),
    +-            johab,
    +-            { johab_mbtowc, NULL },       { johab_wctomb, NULL })
    +-
    +-DEFENCODING(( "ISO-2022-KR",            /* IANA, RFC 1557 */
    +-              "csISO2022KR",            /* IANA */
    +-            /*"ISO2022KR",                 JDK 1.1 */
    +-            ),
    +-            iso2022_kr,
    +-            { iso2022_kr_mbtowc, NULL },  { iso2022_kr_wctomb, iso2022_kr_reset })
    +-
    +--- a/lib/encodings_dos.def
    ++++ b/lib/encodings_dos.def
    +@@ -26,102 +26,3 @@ DEFENCODING(( "CP437",
    +             cp437,
    +             { cp437_mbtowc, NULL },       { cp437_wctomb, NULL })
    + 
    +-DEFENCODING(( "CP737",                  /* JDK 1.1 */
    +-            ),
    +-            cp737,
    +-            { cp737_mbtowc, NULL },       { cp737_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP775",                  /* IANA, JDK 1.1 */
    +-              "IBM775",                 /* IANA */
    +-              "csPC775Baltic",          /* IANA */
    +-            ),
    +-            cp775,
    +-            { cp775_mbtowc, NULL },       { cp775_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP852",                  /* IANA, JDK 1.1 */
    +-              "IBM852",                 /* IANA */
    +-              "852",                    /* IANA */
    +-              "csPCp852",               /* IANA */
    +-            ),
    +-            cp852,
    +-            { cp852_mbtowc, NULL },       { cp852_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP853",
    +-            ),
    +-            cp853,
    +-            { cp853_mbtowc, NULL },       { cp853_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP855",                  /* IANA, JDK 1.1 */
    +-              "IBM855",                 /* IANA */
    +-              "855",                    /* IANA */
    +-              "csIBM855",               /* IANA */
    +-            ),
    +-            cp855,
    +-            { cp855_mbtowc, NULL },       { cp855_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP857",                  /* IANA, JDK 1.1 */
    +-              "IBM857",                 /* IANA */
    +-              "857",                    /* IANA */
    +-              "csIBM857",               /* IANA */
    +-            ),
    +-            cp857,
    +-            { cp857_mbtowc, NULL },       { cp857_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP858",                  /* JDK 1.1.7 */
    +-            ),
    +-            cp858,
    +-            { cp858_mbtowc, NULL },       { cp858_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP860",                  /* IANA, JDK 1.1 */
    +-              "IBM860",                 /* IANA */
    +-              "860",                    /* IANA */
    +-              "csIBM860",               /* IANA */
    +-            ),
    +-            cp860,
    +-            { cp860_mbtowc, NULL },       { cp860_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP861",                  /* IANA, JDK 1.1 */
    +-              "IBM861",                 /* IANA */
    +-              "861",                    /* IANA */
    +-              "CP-IS",                  /* IANA */
    +-              "csIBM861",               /* IANA */
    +-            ),
    +-            cp861,
    +-            { cp861_mbtowc, NULL },       { cp861_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP863",                  /* IANA, JDK 1.1 */
    +-              "IBM863",                 /* IANA */
    +-              "863",                    /* IANA */
    +-              "csIBM863",               /* IANA */
    +-            ),
    +-            cp863,
    +-            { cp863_mbtowc, NULL },       { cp863_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP864",                  /* IANA, JDK 1.1 */
    +-              "IBM864",                 /* IANA */
    +-              "csIBM864",               /* IANA */
    +-            ),
    +-            cp864,
    +-            { cp864_mbtowc, NULL },       { cp864_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP865",                  /* IANA, JDK 1.1 */
    +-              "IBM865",                 /* IANA */
    +-              "865",                    /* IANA */
    +-              "csIBM865",               /* IANA */
    +-            ),
    +-            cp865,
    +-            { cp865_mbtowc, NULL },       { cp865_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP869",                  /* IANA, JDK 1.1 */
    +-              "IBM869",                 /* IANA */
    +-              "869",                    /* IANA */
    +-              "CP-GR",                  /* IANA */
    +-              "csIBM869",               /* IANA */
    +-            ),
    +-            cp869,
    +-            { cp869_mbtowc, NULL },       { cp869_wctomb, NULL })
    +-
    +-DEFENCODING(( "CP1125",                 /* ICU */
    +-            ),
    +-            cp1125,
    +-            { cp1125_mbtowc, NULL },      { cp1125_wctomb, NULL })
    +--- a/lib/loop_unicode.h
    ++++ b/lib/loop_unicode.h
    +@@ -24,14 +24,15 @@
    + static int unicode_transliterate (conv_t cd, ucs4_t wc,
    +                                   unsigned char* outptr, size_t outleft)
    + {
    ++/*
    +   if (cd->oflags & HAVE_HANGUL_JAMO) {
    +-    /* Decompose Hangul into Jamo. Use double-width Jamo (contained
    ++    /-* Decompose Hangul into Jamo. Use double-width Jamo (contained
    +        in all Korean encodings and ISO-2022-JP-2), not half-width Jamo
    +-       (contained in Unicode only). */
    ++       (contained in Unicode only). *-/
    +     ucs4_t buf[3];
    +     int ret = johab_hangul_decompose(cd,buf,wc);
    +     if (ret != RET_ILUNI) {
    +-      /* we know 1 <= ret <= 3 */
    ++      /-* we know 1 <= ret <= 3 *-/
    +       state_t backup_state = cd->ostate;
    +       unsigned char* backup_outptr = outptr;
    +       size_t backup_outleft = outleft;
    +@@ -57,9 +58,9 @@ static int unicode_transliterate (conv_t
    +     }
    +   }
    +   {
    +-    /* Try to use a variant, but postfix it with
    ++    /-* Try to use a variant, but postfix it with
    +        U+303E IDEOGRAPHIC VARIATION INDICATOR
    +-       (cf. Ken Lunde's "CJKV information processing", p. 188). */
    ++       (cf. Ken Lunde's "CJKV information processing", p. 188). *-/
    +     int indx = -1;
    +     if (wc == 0x3006)
    +       indx = 0;
    +@@ -105,20 +106,20 @@ static int unicode_transliterate (conv_t
    +     }
    +   }
    +   if (wc >= 0x2018 && wc <= 0x201a) {
    +-    /* Special case for quotation marks 0x2018, 0x2019, 0x201a */
    ++    /-* Special case for quotation marks 0x2018, 0x2019, 0x201a *-/
    +     ucs4_t substitute =
    +       (cd->oflags & HAVE_QUOTATION_MARKS
    +        ? (wc == 0x201a ? 0x2018 : wc)
    +        : (cd->oflags & HAVE_ACCENTS
    +-          ? (wc==0x2019 ? 0x00b4 : 0x0060) /* use accents */
    +-          : 0x0027 /* use apostrophe */
    ++          ? (wc==0x2019 ? 0x00b4 : 0x0060) /-* use accents *-/
    ++          : 0x0027 /-* use apostrophe *-/
    +       )  );
    +     int outcount = cd->ofuncs.xxx_wctomb(cd,outptr,substitute,outleft);
    +     if (outcount != RET_ILUNI)
    +       return outcount;
    +   }
    +   {
    +-    /* Use the transliteration table. */
    ++    /-* Use the transliteration table. *-/
    +     int indx = translit_index(wc);
    +     if (indx >= 0) {
    +       const unsigned int * cp = &translit_data[indx];
    +@@ -135,7 +136,7 @@ static int unicode_transliterate (conv_t
    +         }
    +         sub_outcount = cd->ofuncs.xxx_wctomb(cd,outptr,cp[i],outleft);
    +         if (sub_outcount == RET_ILUNI)
    +-          /* Recursive transliteration. */
    ++          /-* Recursive transliteration. *-/
    +           sub_outcount = unicode_transliterate(cd,cp[i],outptr,outleft);
    +         if (sub_outcount <= RET_ILUNI)
    +           goto translit_failed;
    +@@ -151,6 +152,7 @@ static int unicode_transliterate (conv_t
    +         return RET_TOOSMALL;
    +     }
    +   }
    ++*/
    +   return RET_ILUNI;
    + }
    + 
    diff --git a/libs/libiconv-full/patches/101-autotools.patch b/libs/libiconv-full/patches/101-autotools.patch
    new file mode 100644
    index 0000000..f8fdce5
    --- /dev/null
    +++ b/libs/libiconv-full/patches/101-autotools.patch
    @@ -0,0 +1,26014 @@
    +--- a/libcharset/configure.ac
    ++++ b/libcharset/configure.ac
    +@@ -16,17 +16,17 @@ dnl along with the GNU CHARSET Library;
    + dnl write to the Free Software Foundation, Inc., 51 Franklin Street,
    + dnl Fifth Floor, Boston, MA 02110-1301, USA.
    + 
    +-AC_PREREQ(2.13)
    ++AC_PREREQ(2.61)
    ++AC_INIT([libcharset],[1.4] )
    ++AC_CONFIG_SRCDIR([lib/localcharset.c])
    + 
    +-PACKAGE=libcharset
    +-VERSION=1.4
    +-
    +-AC_INIT(lib/localcharset.c)
    + AC_CONFIG_AUX_DIR(build-aux)
    + AC_CONFIG_HEADER(config.h)
    + AC_PROG_MAKE_SET
    +-AC_SUBST(PACKAGE)
    +-AC_SUBST(VERSION)
    ++dnl AC_SUBST(PACKAGE)
    ++dnl AC_SUBST(VERSION)
    ++
    ++AC_CONFIG_MACRO_DIR([m4])
    + 
    + dnl           checks for basic programs
    + 
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -24,6 +24,8 @@ AM_INIT_AUTOMAKE(libiconv, 1.11)
    + AC_CONFIG_HEADERS(config.h lib/config.h)
    + AC_PROG_MAKE_SET
    + 
    ++AC_CONFIG_MACRO_DIR([m4])
    ++
    + dnl           checks for basic programs
    + 
    + AC_PROG_CC
    +--- a/libcharset/m4/libtool.m4
    ++++ b/libcharset/m4/libtool.m4
    +@@ -1,107 +1,186 @@
    + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
    +-## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
    +-## Free Software Foundation, Inc.
    +-## Originally 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.
    +-
    +-# serial 48 AC_PROG_LIBTOOL
    +-
    +-
    +-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
    +-# -----------------------------------------------------------
    +-# If this macro is not defined by Autoconf, define it here.
    +-m4_ifdef([AC_PROVIDE_IFELSE],
    +-         [],
    +-         [m4_define([AC_PROVIDE_IFELSE],
    +-	         [m4_ifdef([AC_PROVIDE_$1],
    +-		           [$2], [$3])])])
    ++#
    ++#   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
    + 
    +-# AC_PROG_LIBTOOL
    +-# ---------------
    +-AC_DEFUN([AC_PROG_LIBTOOL],
    +-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
    +-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
    +-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
    +-  AC_PROVIDE_IFELSE([AC_PROG_CXX],
    +-    [AC_LIBTOOL_CXX],
    +-    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
    +-  ])])
    +-dnl And a similar setup for Fortran 77 support
    +-  AC_PROVIDE_IFELSE([AC_PROG_F77],
    +-    [AC_LIBTOOL_F77],
    +-    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
    +-])])
    +-
    +-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
    +-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
    +-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
    +-  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
    +-    [AC_LIBTOOL_GCJ],
    +-    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
    +-      [AC_LIBTOOL_GCJ],
    +-      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
    +-	[AC_LIBTOOL_GCJ],
    +-      [ifdef([AC_PROG_GCJ],
    +-	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
    +-       ifdef([A][M_PROG_GCJ],
    +-	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
    +-       ifdef([LT_AC_PROG_GCJ],
    +-	     [define([LT_AC_PROG_GCJ],
    +-		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
    +-])])# AC_PROG_LIBTOOL
    + 
    ++# 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])])
    + 
    +-# _AC_PROG_LIBTOOL
    +-# ----------------
    +-AC_DEFUN([_AC_PROG_LIBTOOL],
    +-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
    +-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
    +-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
    +-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
    ++
    ++# _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="$ac_aux_dir/ltmain.sh"
    ++LIBTOOL_DEPS="$ltmain"
    + 
    + # Always use our own libtool.
    +-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
    ++LIBTOOL='$(SHELL) $(top_builddir)'
    ++LIBTOOL="$LIBTOOL/$host_alias-libtool"
    + AC_SUBST(LIBTOOL)dnl
    + 
    +-# Prevent multiple expansion
    +-define([AC_PROG_LIBTOOL], [])
    +-])# _AC_PROG_LIBTOOL
    ++_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], [])
    + 
    +-# AC_LIBTOOL_SETUP
    +-# ----------------
    +-AC_DEFUN([AC_LIBTOOL_SETUP],
    +-[AC_PREREQ(2.50)dnl
    +-AC_REQUIRE([AC_ENABLE_SHARED])dnl
    +-AC_REQUIRE([AC_ENABLE_STATIC])dnl
    +-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
    +-AC_REQUIRE([AC_CANONICAL_HOST])dnl
    ++
    ++# _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([AC_PROG_LD])dnl
    +-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
    +-AC_REQUIRE([AC_PROG_NM])dnl
    +-
    ++AC_REQUIRE([LT_PATH_LD])dnl
    ++AC_REQUIRE([LT_PATH_NM])dnl
    ++dnl
    + AC_REQUIRE([AC_PROG_LN_S])dnl
    +-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
    +-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
    +-AC_REQUIRE([AC_OBJEXT])dnl
    +-AC_REQUIRE([AC_EXEEXT])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
    + 
    +-AC_LIBTOOL_SYS_MAX_CMD_LEN
    +-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
    +-AC_LIBTOOL_OBJDIR
    ++_LT_CHECK_OBJDIR
    + 
    +-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
    +-_LT_AC_PROG_ECHO_BACKSLASH
    ++m4_require([_LT_TAG_COMPILER])dnl
    ++_LT_PROG_ECHO_BACKSLASH
    + 
    + case $host_os in
    + aix3*)
    +@@ -117,6307 +196,6803 @@ esac
    + 
    + # Sed substitution that helps us do robust quoting.  It backslashifies
    + # metacharacters that are still active within double-quoted strings.
    +-Xsed='sed -e 1s/^X//'
    +-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
    ++sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
    + 
    + # Same as above, but do not quote variable references.
    +-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
    ++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'
    + 
    +-# Constants:
    +-rm="rm -f"
    +-
    + # Global variables:
    +-default_ofile=libtool
    ++ofile=${host_alias}-libtool
    + can_build_shared=yes
    + 
    + # All known linkers require a `.a' archive for static linking (except MSVC,
    + # which needs '.lib').
    + libext=a
    +-ltmain="$ac_aux_dir/ltmain.sh"
    +-ofile="$default_ofile"
    +-with_gnu_ld="$lt_cv_prog_gnu_ld"
    + 
    +-AC_CHECK_TOOL(AR, ar, false)
    +-AC_CHECK_TOOL(RANLIB, ranlib, :)
    +-AC_CHECK_TOOL(STRIP, strip, :)
    ++with_gnu_ld="$lt_cv_prog_gnu_ld"
    + 
    + old_CC="$CC"
    + old_CFLAGS="$CFLAGS"
    + 
    + # Set sane defaults for various variables
    +-test -z "$AR" && AR=ar
    +-test -z "$AR_FLAGS" && AR_FLAGS=cru
    +-test -z "$AS" && AS=as
    + test -z "$CC" && CC=cc
    + test -z "$LTCC" && LTCC=$CC
    + test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
    +-test -z "$DLLTOOL" && DLLTOOL=dlltool
    + test -z "$LD" && LD=ld
    +-test -z "$LN_S" && LN_S="ln -s"
    +-test -z "$MAGIC_CMD" && MAGIC_CMD=file
    +-test -z "$NM" && NM=nm
    +-test -z "$SED" && SED=sed
    +-test -z "$OBJDUMP" && OBJDUMP=objdump
    +-test -z "$RANLIB" && RANLIB=:
    +-test -z "$STRIP" && STRIP=:
    + test -z "$ac_objext" && ac_objext=o
    + 
    +-# Determine commands to create old-style static archives.
    +-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
    +-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_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
    +-    AC_PATH_MAGIC
    ++    _LT_PATH_MAGIC
    +   fi
    +   ;;
    + esac
    + 
    +-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
    +-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
    +-enable_win32_dll=yes, enable_win32_dll=no)
    +-
    +-AC_ARG_ENABLE([libtool-lock],
    +-    [AC_HELP_STRING([--disable-libtool-lock],
    +-	[avoid locking (might break parallel builds)])])
    +-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
    ++# 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
    + 
    +-AC_ARG_WITH([pic],
    +-    [AC_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=default
    + 
    +-# Use C for the default configuration in the libtool script
    +-tagname=
    +-AC_LIBTOOL_LANG_C_CONFIG
    +-_LT_AC_TAGCONFIG
    +-])# AC_LIBTOOL_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
    + 
    + 
    +-# _LT_AC_SYS_COMPILER
    +-# -------------------
    +-AC_DEFUN([_LT_AC_SYS_COMPILER],
    +-[AC_REQUIRE([AC_PROG_CC])dnl
    ++## ------------------------------------- ##
    ++## 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])
    ++])
    + 
    +-# If no C compiler was specified, use CC.
    +-LTCC=${LTCC-"$CC"}
    + 
    +-# If no C compiler flags were specified, use CFLAGS.
    +-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
    ++# _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], [[!?.]$], [], [.])
    ++)])
    + 
    +-# Allow CC to be a program name with arguments.
    +-compiler=$CC
    +-])# _LT_AC_SYS_COMPILER
    + 
    + 
    +-# _LT_CC_BASENAME(CC)
    +-# -------------------
    +-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
    +-AC_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-%%"`
    ++## ------------------------ ##
    ++## 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_COMPILER_BOILERPLATE
    +-# ------------------------
    +-# Check for compiler boilerplate output or warnings with
    +-# the simple compiler test code.
    +-AC_DEFUN([_LT_COMPILER_BOILERPLATE],
    +-[ac_outfile=conftest.$ac_objext
    +-printf "$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_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_LINKER_BOILERPLATE
    +-# ----------------------
    +-# Check for linker boilerplate output or warnings with
    +-# the simple link test code.
    +-AC_DEFUN([_LT_LINKER_BOILERPLATE],
    +-[ac_outfile=conftest.$ac_objext
    +-printf "$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 conftest*
    +-])# _LT_LINKER_BOILERPLATE
    + 
    ++# 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],
    ++[_$0(m4_quote(m4_default([$1], [[, ]])),
    ++     m4_quote(m4_if([$2], [],
    ++		     m4_quote(lt_decl_tag_varnames),
    ++		  m4_quote(m4_shift($@)))),
    ++     m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
    ++m4_define([_lt_decl_varnames_tagged], [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_AC_SYS_LIBPATH_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.
    +-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
    +-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
    +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
    +-}'`
    +-# 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 '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
    +-}'`; fi],[])
    +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
    +-])# _LT_AC_SYS_LIBPATH_AIX
    + 
    ++# _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_AC_SHELL_INIT(ARG)
    +-# ----------------------
    +-AC_DEFUN([_LT_AC_SHELL_INIT],
    +-[ifdef([AC_DIVERSION_NOTICE],
    +-	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
    +-	 [AC_DIVERT_PUSH(NOTICE)])
    +-$1
    +-AC_DIVERT_POP
    +-])# _LT_AC_SHELL_INIT
    + 
    ++# _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_AC_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.
    +-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
    +-[_LT_AC_SHELL_INIT([
    +-# Check that we are running under the correct shell.
    +-SHELL=${CONFIG_SHELL-/bin/sh}
    + 
    +-case X$ECHO in
    +-X*--fallback-echo)
    +-  # Remove one level of quotation (which was required for Make).
    +-  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
    +-  ;;
    +-esac
    ++# _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
    ++])
    + 
    +-echo=${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 </dev/null 2>&1 && unset CDPATH
    + 
    +-if test -z "$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 &&
    +-       echo_test_string=`eval $cmd` &&
    +-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
    +-    then
    +-      break
    +-    fi
    +-  done
    +-fi
    ++# _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)])])])
    + 
    +-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"
    ++# _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])])])])
    + 
    +-  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
    ++# _LT_TAGVAR(VARNAME, [TAGNAME])
    ++# ------------------------------
    ++m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
    + 
    +-	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.
    +-ECHO=$echo
    +-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
    +-   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
    +-fi
    ++# _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
    + 
    +-AC_SUBST(ECHO)
    +-])])# _LT_AC_PROG_ECHO_BACKSLASH
    + 
    ++# Initialize.
    ++m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
    ++[
    + 
    +-# _LT_AC_LOCK
    +-# -----------
    +-AC_DEFUN([_LT_AC_LOCK],
    +-[AC_ARG_ENABLE([libtool-lock],
    +-    [AC_HELP_STRING([--disable-libtool-lock],
    +-	[avoid locking (might break parallel builds)])])
    +-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
    ++# 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
    + 
    +-# 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"
    ++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\\"\\\`\\\\\\""
    +       ;;
    +-    *64-bit*)
    +-      LD="${LD-ld} -melf64bmip"
    ++    *)
    ++      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
    +       ;;
    +     esac
    +-   else
    +-    case `/usr/bin/file conftest.$ac_objext` in
    +-    *32-bit*)
    +-      LD="${LD-ld} -32"
    +-      ;;
    +-    *N32*)
    +-      LD="${LD-ld} -n32"
    ++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\\"\\\`\\\\\\""
    +       ;;
    +-    *64-bit*)
    +-      LD="${LD-ld} -64"
    ++    *)
    ++      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
    +       ;;
    +     esac
    +-   fi
    +-  fi
    +-  rm -rf conftest*
    ++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
    + 
    +-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|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-*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-*linux*)
    +-          LD="${LD-ld} -m elf_x86_64"
    +-          ;;
    +-        ppc*-*linux*|powerpc*-*linux*)
    +-          LD="${LD-ld} -m elf64ppc"
    +-          ;;
    +-        s390*-*linux*)
    +-          LD="${LD-ld} -m elf64_s390"
    +-          ;;
    +-        sparc*-*linux*)
    +-          LD="${LD-ld} -m elf64_sparc"
    +-          ;;
    +-      esac
    +-      ;;
    +-    esac
    +-  fi
    +-  rm -rf conftest*
    +-  ;;
    ++_LT_OUTPUT_LIBTOOL_INIT
    ++])
    + 
    +-*-*-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_TRY_LINK([],[],[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" ;;
    +-      *)    LD="${LD-ld} -64" ;;
    +-      esac
    +-      ;;
    +-    esac
    +-  fi
    +-  rm -rf conftest*
    +-  ;;
    + 
    +-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
    +-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
    +-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
    +-  AC_CHECK_TOOL(AS, as, false)
    +-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
    +-  ;;
    +-  ])
    +-esac
    ++# 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
    + 
    +-need_locks="$enable_libtool_lock"
    ++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."
    + 
    +-])# _LT_AC_LOCK
    ++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_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
    +-#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
    +-# ----------------------------------------------------------------
    +-# Check whether the given compiler option works
    +-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
    +-[AC_REQUIRE([LT_AC_PROG_SED])
    +-AC_CACHE_CHECK([$1], [$2],
    +-  [$2=no
    +-  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
    +-   printf "$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*
    +-])
    ++    *) AC_MSG_ERROR([unrecognized argument: $[1]
    ++Try \`$[0] --help' for more information.]) ;;
    ++  esac
    ++  shift
    ++done
    + 
    +-if test x"[$]$2" = xyes; then
    +-    ifelse([$5], , :, [$5])
    +-else
    +-    ifelse([$6], , :, [$6])
    ++if $lt_cl_silent; then
    ++  exec AS_MESSAGE_FD>/dev/null
    + fi
    +-])# AC_LIBTOOL_COMPILER_OPTION
    +-
    +-
    +-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
    +-#                          [ACTION-SUCCESS], [ACTION-FAILURE])
    +-# ------------------------------------------------------------
    +-# Check whether the given compiler option works
    +-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
    +-[AC_CACHE_CHECK([$1], [$2],
    +-  [$2=no
    +-   save_LDFLAGS="$LDFLAGS"
    +-   LDFLAGS="$LDFLAGS $3"
    +-   printf "$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 conftest*
    +-   LDFLAGS="$save_LDFLAGS"
    +-])
    ++_LTEOF
    + 
    +-if test x"[$]$2" = xyes; then
    +-    ifelse([$4], , :, [$4])
    +-else
    +-    ifelse([$5], , :, [$5])
    ++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
    +-])# AC_LIBTOOL_LINKER_OPTION
    +-
    ++])# LT_OUTPUT
    + 
    +-# AC_LIBTOOL_SYS_MAX_CMD_LEN
    +-# --------------------------
    +-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
    +-[# 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
    +-    ;;
    ++# _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
    + 
    +-  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;
    +-    ;;
    ++    cfgfile="${ofile}T"
    ++    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
    ++    $RM "$cfgfile"
    + 
    +-  cygwin* | mingw*)
    +-    # 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;
    +-    ;;
    ++    cat <<_LT_EOF >> "$cfgfile"
    ++#! $SHELL
    + 
    +-  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;
    +-    ;;
    ++# `$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
    + 
    +-  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`
    +-    ;;
    ++# ### BEGIN LIBTOOL CONFIG
    ++_LT_LIBTOOL_CONFIG_VARS
    ++_LT_LIBTOOL_TAG_VARS
    ++# ### END LIBTOOL CONFIG
    + 
    +-  interix*)
    +-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
    +-    lt_cv_sys_max_cmd_len=196608
    +-    ;;
    ++_LT_EOF
    + 
    +-  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
    +-    ;;
    +-  *)
    +-    # 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.
    +-    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
    +-    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
    +-	       = "XX$teststring") >/dev/null 2>&1 &&
    +-	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
    +-	    lt_cv_sys_max_cmd_len=$new_result &&
    +-	    test $i != 17 # 1/2 MB should be enough
    +-    do
    +-      i=`expr $i + 1`
    +-      teststring=$teststring$teststring
    +-    done
    +-    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`
    ++  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
    +-])
    +-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
    +-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
    + 
    ++  _LT_PROG_LTMAIN
    + 
    +-# _LT_AC_CHECK_DLFCN
    +-# ------------------
    +-AC_DEFUN([_LT_AC_CHECK_DLFCN],
    +-[AC_CHECK_HEADERS(dlfcn.h)dnl
    +-])# _LT_AC_CHECK_DLFCN
    ++  # 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
    + 
    +-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
    +-#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
    +-# ---------------------------------------------------------------------
    +-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
    +-[AC_REQUIRE([_LT_AC_CHECK_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 <> "$cfgfile" \
    ++    || (rm -f "$cfgfile"; exit 1)
    + 
    +-#if HAVE_DLFCN_H
    +-#include 
    +-#endif
    ++  mv -f "$cfgfile" "$ofile" ||
    ++    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
    ++  chmod +x "$ofile"
    ++],
    ++[cat <<_LT_EOF >> "$ofile"
    + 
    +-#include 
    ++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], [])
    + 
    +-#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
    ++# 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
    + 
    +-#ifdef __cplusplus
    +-extern "C" void exit (int);
    +-#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 ());
    ++# _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
    + 
    +-    exit (status);
    +-}]
    +-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_AC_TRY_DLOPEN_SELF
    + 
    ++# _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], [])
    + 
    +-# AC_LIBTOOL_DLOPEN_SELF
    +-# ----------------------
    +-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
    +-[AC_REQUIRE([_LT_AC_CHECK_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
    +-    ;;
    ++# _LT_TAG_COMPILER
    ++# ----------------
    ++m4_defun([_LT_TAG_COMPILER],
    ++[AC_REQUIRE([AC_PROG_CC])dnl
    + 
    +-  mingw* | pw32*)
    +-    lt_cv_dlopen="LoadLibrary"
    +-    lt_cv_dlopen_libs=
    +-   ;;
    ++_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
    + 
    +-  cygwin*)
    +-    lt_cv_dlopen="dlopen"
    +-    lt_cv_dlopen_libs=
    +-   ;;
    ++# If no C compiler was specified, use CC.
    ++LTCC=${LTCC-"$CC"}
    + 
    +-  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
    +-    ])
    +-   ;;
    ++# If no C compiler flags were specified, use CFLAGS.
    ++LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
    + 
    +-  *)
    +-    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="-dld"],
    +-	[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="-dld"])
    +-	      ])
    +-	    ])
    +-	  ])
    +-	])
    +-      ])
    +-    ;;
    +-  esac
    ++# Allow CC to be a program name with arguments.
    ++compiler=$CC
    ++])# _LT_TAG_COMPILER
    + 
    +-  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"
    ++# _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
    + 
    +-    save_LDFLAGS="$LDFLAGS"
    +-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
    + 
    +-    save_LIBS="$LIBS"
    +-    LIBS="$lt_cv_dlopen_libs $LIBS"
    ++# _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
    + 
    +-    AC_CACHE_CHECK([whether a program can dlopen itself],
    +-	  lt_cv_dlopen_self, [dnl
    +-	  _LT_AC_TRY_DLOPEN_SELF(
    +-	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
    +-	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
    ++# _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"
    +     ])
    +-
    +-    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_AC_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)
    +-      ])
    ++    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
    +-
    +-    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
    +-])# AC_LIBTOOL_DLOPEN_SELF
    ++# _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"
    ++  if test "$GCC" = "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
    + 
    +-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
    +-# ---------------------------------
    +-# Check to see if options -c and -o are simultaneously supported by compiler
    +-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
    +-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
    +-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    +-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
    +-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
    +-   $rm -r conftest 2>/dev/null
    +-   mkdir conftest
    +-   cd conftest
    +-   mkdir out
    +-   printf "$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_AC_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 ..
    +-   rmdir conftest
    +-   $rm conftest*
    +-])
    +-])# AC_LIBTOOL_PROG_CC_C_O
    ++# _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
    + 
    + 
    +-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
    +-# -----------------------------------------
    +-# Check to see if we can do hard links to lock some files if needed
    +-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
    +-[AC_REQUIRE([_LT_AC_LOCK])dnl
    ++# _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}
    + 
    +-hard_links="nottested"
    +-if test "$_LT_AC_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
    ++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
    +-  need_locks=no
    ++  # Restart under the correct shell.
    ++  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
    + fi
    +-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
    + 
    +-
    +-# AC_LIBTOOL_OBJDIR
    +-# -----------------
    +-AC_DEFUN([AC_LIBTOOL_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
    ++if test "X[$]1" = X--fallback-echo; then
    ++  # used as fallback echo
    ++  shift
    ++  cat <<_LT_EOF
    ++[$]*
    ++_LT_EOF
    ++  exit 0
    + fi
    +-rmdir .libs 2>/dev/null])
    +-objdir=$lt_cv_objdir
    +-])# AC_LIBTOOL_OBJDIR
    + 
    ++# 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
    + 
    +-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
    +-# ----------------------------------------------
    +-# Check hardcoding attributes.
    +-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
    +-[AC_MSG_CHECKING([how to hardcode library paths into programs])
    +-_LT_AC_TAGVAR(hardcode_action, $1)=
    +-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
    +-   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
    +-   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
    +-
    +-  # We can hardcode non-existant directories.
    +-  if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
    +-     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
    +-    # Linking always hardcodes the temporary library directory.
    +-    _LT_AC_TAGVAR(hardcode_action, $1)=relink
    +-  else
    +-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
    +-    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
    ++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
    +-else
    +-  # We cannot hardcode anything, or else we can only hardcode existing
    +-  # directories.
    +-  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
    +-fi
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
    + 
    +-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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
    +-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
    ++  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"
    + 
    +-# AC_LIBTOOL_SYS_LIB_STRIP
    +-# ------------------------
    +-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
    +-[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"
    +-         AC_MSG_RESULT([yes])
    +-       else
    +-  AC_MSG_RESULT([no])
    +-fi
    +-       ;;
    +-   *)
    +-  AC_MSG_RESULT([no])
    +-    ;;
    +-  esac
    +-fi
    +-])# AC_LIBTOOL_SYS_LIB_STRIP
    ++    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
    + 
    +-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
    +-# -----------------------------
    +-# PORTME Fill in your ld.so characteristics
    +-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
    +-[AC_MSG_CHECKING([dynamic linker characteristics])
    +-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"
    +-if test "$GCC" = yes; then
    +-  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 ';' >/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.
    +-    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"`
    ++	  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
    +-else
    +-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
    + fi
    +-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
    ++# 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
    + 
    +-case $host_os in
    +-aix3*)
    +-  version_type=linux
    +-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
    +-  shlibpath_var=LIBPATH
    ++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
    + 
    +-  # AIX 3 has no versioning support, so we append a major version to the name.
    +-  soname_spec='${libname}${release}${shared_ext}$major'
    +-  ;;
    + 
    +-aix4* | aix5*)
    +-  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
    +-      ;;
    ++# _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
    +-    # 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}'
    ++  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
    +-      # 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'
    ++      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
    +-    shlibpath_var=LIBPATH
    +   fi
    ++  rm -rf conftest*
    +   ;;
    + 
    +-amigaos*)
    +-  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'
    ++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*
    +   ;;
    + 
    +-beos*)
    +-  library_names_spec='${libname}${shared_ext}'
    +-  dynamic_linker="$host_os ld.so"
    +-  shlibpath_var=LIBRARY_PATH
    ++*-*-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
    +   ;;
    +-
    +-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
    ++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
    + 
    +-cygwin* | mingw* | pw32*)
    +-  version_type=windows
    +-  shrext_cmds=".dll"
    +-  need_version=no
    +-  need_lib_prefix=no
    ++need_locks="$enable_libtool_lock"
    ++])# _LT_ENABLE_LOCK
    + 
    +-  case $GCC,$host_os in
    +-  yes,cygwin* | yes,mingw* | yes,pw32*)
    +-    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'
    +-    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*)
    +-      # 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
    +-    ;;
    ++# _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"
    ++    ;;
    +   *)
    +-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
    ++    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
    +     ;;
    +   esac
    +-  dynamic_linker='Win32 ld.exe'
    +-  # FIXME: first we should search . and the directory the executable is in
    +-  shlibpath_var=PATH
    +-  ;;
    ++  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
    + 
    +-darwin* | rhapsody*)
    +-  dynamic_linker="$host_os dyld"
    +-  version_type=darwin
    +-  need_lib_prefix=no
    +-  need_version=no
    +-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${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`'
    +-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
    +-  if test "$GCC" = yes; then
    +-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
    +-  else
    +-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
    +-  fi
    +-  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
    +-  ;;
    ++# _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*
    ++])
    + 
    +-freebsd1*)
    +-  dynamic_linker=no
    +-  ;;
    ++if test x"[$]$2" = xyes; then
    ++    m4_if([$5], , :, [$5])
    ++else
    ++    m4_if([$6], , :, [$6])
    ++fi
    ++])# _LT_COMPILER_OPTION
    + 
    +-kfreebsd*-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='GNU ld.so'
    +-  ;;
    ++# Old name:
    ++AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
    ++dnl aclocal-1.4 backwards compatibility:
    ++dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
    + 
    +-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
    +-  version_type=freebsd-$objformat
    +-  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
    +-      ;;
    +-  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
    ++
    ++# _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
    +     ;;
    +-  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
    ++
    ++  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;
    +     ;;
    +-  freebsd*) # from 4.6 on
    +-    shlibpath_overrides_runpath=yes
    +-    hardcode_into_libs=yes
    ++
    ++  cygwin* | mingw*)
    ++    # 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;
    +     ;;
    +-  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
    +-  ;;
    ++  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;
    ++    ;;
    + 
    +-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"
    ++  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
    +-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
    ++      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
    +     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'
    ++    # 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`
    +     ;;
    +-  esac
    +-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
    +-  postinstall_cmds='chmod 555 $lib'
    +-  ;;
    + 
    +-interix3*)
    +-  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
    +-  ;;
    ++  interix*)
    ++    # We know the value 262144 and hardcode it with a safety zone (like BSD)
    ++    lt_cv_sys_max_cmd_len=196608
    ++    ;;
    + 
    +-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=
    ++  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
    +     ;;
    +   *)
    +-    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
    ++    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
    +-  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
    +-  ;;
    ++])
    ++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
    + 
    +-# No shared lib support for Linux oldld, aout, or coff.
    +-linux*oldld* | linux*aout* | linux*coff*)
    +-  dynamic_linker=no
    +-  ;;
    ++# 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], [])
    + 
    +-# This must be Linux ELF.
    +-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}'
    +-  soname_spec='${libname}${release}${shared_ext}$major'
    +-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
    +-  shlibpath_var=LD_LIBRARY_PATH
    +-  shlibpath_overrides_runpath=no
    +-  # 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/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
    +-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
    +-  fi
    ++# _LT_HEADER_DLFCN
    ++# ----------------
    ++m4_defun([_LT_HEADER_DLFCN],
    ++[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
    ++])# _LT_HEADER_DLFCN
    + 
    +-  # 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'
    +-  ;;
    + 
    +-knetbsd*-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='GNU ld.so'
    +-  ;;
    ++# _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"
    + 
    +-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
    +-  ;;
    ++#if HAVE_DLFCN_H
    ++#include 
    ++#endif
    + 
    +-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
    +-  ;;
    ++#include 
    + 
    +-nto-qnx*)
    +-  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
    +-  ;;
    ++#ifdef RTLD_GLOBAL
    ++#  define LT_DLGLOBAL		RTLD_GLOBAL
    ++#else
    ++#  ifdef DL_GLOBAL
    ++#    define LT_DLGLOBAL		DL_GLOBAL
    ++#  else
    ++#    define LT_DLGLOBAL		0
    ++#  endif
    ++#endif
    + 
    +-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
    ++/* 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
    ++
    ++#ifdef __cplusplus
    ++extern "C" void exit (int);
    ++#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
    +-    shlibpath_overrides_runpath=yes
    ++    puts (dlerror ());
    ++
    ++    exit (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
    + 
    +-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"
    +-  ;;
    ++# 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=
    + 
    +-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'
    +-  ;;
    ++  case $host_os in
    ++  beos*)
    ++    lt_cv_dlopen="load_add_on"
    ++    lt_cv_dlopen_libs=
    ++    lt_cv_dlopen_self=yes
    ++    ;;
    + 
    +-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
    +-  ;;
    ++  mingw* | pw32*)
    ++    lt_cv_dlopen="LoadLibrary"
    ++    lt_cv_dlopen_libs=
    ++    ;;
    + 
    +-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
    +-      export_dynamic_flag_spec='${wl}-Blargedynsym'
    +-      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
    +-  ;;
    ++  cygwin*)
    ++    lt_cv_dlopen="dlopen"
    ++    lt_cv_dlopen_libs=
    ++    ;;
    + 
    +-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
    +-  ;;
    ++  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
    ++    ])
    ++    ;;
    + 
    +-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
    +-  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'
    +-    shlibpath_overrides_runpath=no
    ++  *)
    ++    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
    +-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
    +-    shlibpath_overrides_runpath=yes
    +-    case $host_os in
    +-      sco3.2v5*)
    +-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
    +-	;;
    +-    esac
    ++    enable_dlopen=no
    +   fi
    +-  sys_lib_dlsearch_path_spec='/usr/lib'
    +-  ;;
    +-
    +-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
    +-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
    +-
    + 
    +-# _LT_AC_TAGCONFIG
    +-# ----------------
    +-AC_DEFUN([_LT_AC_TAGCONFIG],
    +-[AC_ARG_WITH([tags],
    +-    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
    +-        [include additional configurations @<:@automatic@:>@])],
    +-    [tagnames="$withval"])
    +-
    +-if test -f "$ltmain" && test -n "$tagnames"; then
    +-  if test ! -f "${ofile}"; then
    +-    AC_MSG_WARN([output file `$ofile' does not exist])
    +-  fi
    ++  case $lt_cv_dlopen in
    ++  dlopen)
    ++    save_CPPFLAGS="$CPPFLAGS"
    ++    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
    + 
    +-  if test -z "$LTCC"; then
    +-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
    +-    if test -z "$LTCC"; then
    +-      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
    +-    else
    +-      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
    +-    fi
    +-  fi
    +-  if test -z "$LTCFLAGS"; then
    +-    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
    +-  fi
    ++    save_LDFLAGS="$LDFLAGS"
    ++    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
    + 
    +-  # Extract list of available tagged configurations in $ofile.
    +-  # Note that this assumes the entire list is on one line.
    +-  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
    ++    save_LIBS="$LIBS"
    ++    LIBS="$lt_cv_dlopen_libs $LIBS"
    + 
    +-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
    +-  for tagname in $tagnames; do
    +-    IFS="$lt_save_ifs"
    +-    # Check whether tagname contains only valid characters
    +-    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
    +-    "") ;;
    +-    *)  AC_MSG_ERROR([invalid tag name: $tagname])
    +-	;;
    +-    esac
    ++    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 grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
    +-    then
    +-      AC_MSG_ERROR([tag name \"$tagname\" already exists])
    ++    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
    + 
    +-    # Update the list of available tags.
    +-    if test -n "$tagname"; then
    +-      echo appending configuration tag \"$tagname\" to $ofile
    +-
    +-      case $tagname in
    +-      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_LIBTOOL_LANG_CXX_CONFIG
    +-	else
    +-	  tagname=""
    +-	fi
    +-	;;
    +-
    +-      F77)
    +-	if test -n "$F77" && test "X$F77" != "Xno"; then
    +-	  AC_LIBTOOL_LANG_F77_CONFIG
    +-	else
    +-	  tagname=""
    +-	fi
    +-	;;
    +-
    +-      GCJ)
    +-	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
    +-	  AC_LIBTOOL_LANG_GCJ_CONFIG
    +-	else
    +-	  tagname=""
    +-	fi
    +-	;;
    +-
    +-      RC)
    +-	AC_LIBTOOL_LANG_RC_CONFIG
    +-	;;
    +-
    +-      *)
    +-	AC_MSG_ERROR([Unsupported tag name: $tagname])
    +-	;;
    +-      esac
    ++    CPPFLAGS="$save_CPPFLAGS"
    ++    LDFLAGS="$save_LDFLAGS"
    ++    LIBS="$save_LIBS"
    ++    ;;
    ++  esac
    + 
    +-      # Append the new tag name to the list of available tags.
    +-      if test -n "$tagname" ; then
    +-      available_tags="$available_tags $tagname"
    +-    fi
    +-    fi
    +-  done
    +-  IFS="$lt_save_ifs"
    ++  case $lt_cv_dlopen_self in
    ++  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
    ++  *) enable_dlopen_self=unknown ;;
    ++  esac
    + 
    +-  # Now substitute the updated list of available tags.
    +-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
    +-    mv "${ofile}T" "$ofile"
    +-    chmod +x "$ofile"
    +-  else
    +-    rm -f "${ofile}T"
    +-    AC_MSG_ERROR([unable to update list of available tagged configurations.])
    +-  fi
    ++  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_AC_TAGCONFIG
    ++_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], [])
    + 
    + 
    +-# AC_LIBTOOL_DLOPEN
    +-# -----------------
    +-# enable checks for dlopen support
    +-AC_DEFUN([AC_LIBTOOL_DLOPEN],
    +- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
    +-])# AC_LIBTOOL_DLOPEN
    ++# _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
    + 
    +-# AC_LIBTOOL_WIN32_DLL
    +-# --------------------
    +-# declare package support for building win32 DLLs
    +-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
    +-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
    +-])# AC_LIBTOOL_WIN32_DLL
    + 
    ++# _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])
    + 
    +-# AC_ENABLE_SHARED([DEFAULT])
    +-# ---------------------------
    +-# implement the --enable-shared flag
    +-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
    +-AC_DEFUN([AC_ENABLE_SHARED],
    +-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
    +-AC_ARG_ENABLE([shared],
    +-    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
    +-	[build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT)
    +-])# AC_ENABLE_SHARED
    +-
    +-
    +-# AC_DISABLE_SHARED
    +-# -----------------
    +-# set the default shared flag to --disable-shared
    +-AC_DEFUN([AC_DISABLE_SHARED],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-AC_ENABLE_SHARED(no)
    +-])# AC_DISABLE_SHARED
    +-
    +-
    +-# AC_ENABLE_STATIC([DEFAULT])
    +-# ---------------------------
    +-# implement the --enable-static flag
    +-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
    +-AC_DEFUN([AC_ENABLE_STATIC],
    +-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
    +-AC_ARG_ENABLE([static],
    +-    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
    +-	[build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT)
    +-])# AC_ENABLE_STATIC
    +-
    +-
    +-# AC_DISABLE_STATIC
    +-# -----------------
    +-# set the default static flag to --disable-static
    +-AC_DEFUN([AC_DISABLE_STATIC],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-AC_ENABLE_STATIC(no)
    +-])# AC_DISABLE_STATIC
    +-
    +-
    +-# AC_ENABLE_FAST_INSTALL([DEFAULT])
    +-# ---------------------------------
    +-# implement the --enable-fast-install flag
    +-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
    +-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
    +-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
    +-AC_ARG_ENABLE([fast-install],
    +-    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
    +-    [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT)
    +-])# AC_ENABLE_FAST_INSTALL
    +-
    +-
    +-# AC_DISABLE_FAST_INSTALL
    +-# -----------------------
    +-# set the default to --disable-fast-install
    +-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-AC_ENABLE_FAST_INSTALL(no)
    +-])# AC_DISABLE_FAST_INSTALL
    +-
    +-
    +-# AC_LIBTOOL_PICMODE([MODE])
    +-# --------------------------
    +-# implement the --with-pic flag
    +-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
    +-AC_DEFUN([AC_LIBTOOL_PICMODE],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-pic_mode=ifelse($#,1,$1,default)
    +-])# AC_LIBTOOL_PICMODE
    +-
    +-
    +-# AC_PROG_EGREP
    +-# -------------
    +-# This is predefined starting with Autoconf 2.54, so this conditional
    +-# definition can be removed once we require Autoconf 2.54 or later.
    +-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
    +-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
    +-   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
    +-    then ac_cv_prog_egrep='grep -E'
    +-    else ac_cv_prog_egrep='egrep'
    +-    fi])
    +- EGREP=$ac_cv_prog_egrep
    +- AC_SUBST([EGREP])
    +-])])
    +-
    +-
    +-# AC_PATH_TOOL_PREFIX
    +-# -------------------
    +-# find a file program which can recognise shared library
    +-AC_DEFUN([AC_PATH_TOOL_PREFIX],
    +-[AC_REQUIRE([AC_PROG_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="ifelse([$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 <&2
    ++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
    + 
    +-*** 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
    + 
    +-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)
    ++# _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
    +-  AC_MSG_RESULT(no)
    ++  # MS-DOS does not allow filenames that begin with a dot.
    ++  lt_cv_objdir=_libs
    + fi
    +-])# AC_PATH_TOOL_PREFIX
    ++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
    + 
    + 
    +-# AC_PATH_MAGIC
    +-# -------------
    +-# find a file program which can recognise a shared library
    +-AC_DEFUN([AC_PATH_MAGIC],
    +-[AC_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
    +-    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
    ++# _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
    +-    MAGIC_CMD=:
    ++    # 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
    +-])# AC_PATH_MAGIC
    ++_LT_TAGDECL([], [hardcode_action], [0],
    ++    [How to hardcode a shared library path into an executable])
    ++])# _LT_LINKER_HARDCODE_LIBPATH
    + 
    + 
    +-# AC_PROG_LD
    +-# ----------
    +-# find the pathname to the GNU or non-GNU linker
    +-AC_DEFUN([AC_PROG_LD],
    +-[AC_ARG_WITH([gnu-ld],
    +-    [AC_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])
    +-AC_REQUIRE([LT_AC_PROG_SED])dnl
    +-AC_REQUIRE([AC_PROG_CC])dnl
    +-AC_REQUIRE([AC_CANONICAL_HOST])dnl
    +-AC_REQUIRE([AC_CANONICAL_BUILD])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
    ++# _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
    +     ;;
    +   *)
    +-    # If it is relative, then search for the first ld in PATH.
    +-    with_gnu_ld=unknown
    ++    AC_MSG_RESULT([no])
    +     ;;
    +   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 /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
    +-  IFS="$lt_save_ifs"
    ++  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
    +-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
    ++  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
    + fi])
    +-LD="$lt_cv_path_LD"
    +-if test -n "$LD"; then
    +-  AC_MSG_RESULT($LD)
    +-else
    +-  AC_MSG_RESULT(no)
    +-fi
    +-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
    +-AC_PROG_LD_GNU
    +-])# AC_PROG_LD
    ++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
    + 
    +-# AC_PROG_LD_GNU
    +-# --------------
    +-AC_DEFUN([AC_PROG_LD_GNU],
    +-[AC_REQUIRE([AC_PROG_EGREP])dnl
    +-AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
    +-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
    +-case `$LD -v 2>&1  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
    +-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
    ++      # 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
    +-    ;;
    +-esac
    +-])# AC_PROG_LD_RELOAD_FLAG
    +-
    +-
    +-# AC_DEPLIBS_CHECK_METHOD
    +-# -----------------------
    +-# how to check for library dependencies
    +-#  -- PORTME fill in with the dynamic library characteristics
    +-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
    +-[AC_CACHE_CHECK([how to recognise dependent libraries],
    +-lt_cv_deplibs_check_method,
    +-[lt_cv_file_magic_cmd='$MAGIC_CMD'
    +-lt_cv_file_magic_test_file=
    +-lt_cv_deplibs_check_method='unknown'
    +-# Need to set the preceding variable on all platforms that support
    +-# interlibrary dependencies.
    +-# 'none' -- dependencies not supported.
    +-# `unknown' -- same as none, but documents that we really don't know.
    +-# 'pass_all' -- all dependencies passed with no checks.
    +-# 'test_compile' -- check by making test program.
    +-# 'file_magic [[regex]]' -- check by looking for files in library path
    +-# which responds to the $file_magic_cmd with a given extended regex.
    +-# If you have `file' or equivalent on your system and you're not sure
    +-# whether `pass_all' will *always* work, you probably want this one.
    ++    shlibpath_var=LIBPATH
    ++  fi
    ++  ;;
    + 
    +-case $host_os in
    +-aix4* | aix5*)
    +-  lt_cv_deplibs_check_method=pass_all
    ++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*)
    +-  lt_cv_deplibs_check_method=pass_all
    ++  library_names_spec='${libname}${shared_ext}'
    ++  dynamic_linker="$host_os ld.so"
    ++  shlibpath_var=LIBRARY_PATH
    +   ;;
    + 
    + bsdi[[45]]*)
    +-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
    +-  lt_cv_file_magic_cmd='/usr/bin/file -L'
    +-  lt_cv_file_magic_test_file=/shlib/libc.so
    +-  ;;
    +-
    +-cygwin*)
    +-  # func_win32_libid is a shell function defined in ltmain.sh
    +-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
    +-  lt_cv_file_magic_cmd='func_win32_libid'
    ++  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
    +   ;;
    + 
    +-mingw* | pw32*)
    +-  # Base MSYS/MinGW do not provide the 'file' command needed by
    +-  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
    +-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
    +-  lt_cv_file_magic_cmd='$OBJDUMP -f'
    +-  ;;
    ++cygwin* | mingw* | pw32*)
    ++  version_type=windows
    ++  shrext_cmds=".dll"
    ++  need_version=no
    ++  need_lib_prefix=no
    + 
    +-darwin* | rhapsody*)
    +-  lt_cv_deplibs_check_method=pass_all
    +-  ;;
    ++  case $GCC,$host_os in
    ++  yes,cygwin* | yes,mingw* | yes,pw32*)
    ++    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
    + 
    +-freebsd* | kfreebsd*-gnu | 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.*`
    ++    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*)
    ++      # 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
    +-  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
    ++    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
    +   ;;
    + 
    +-interix3*)
    +-  # 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*)
    +-  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
    ++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'
    +   ;;
    + 
    +-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
    ++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
    +   ;;
    + 
    +-nto-qnx*)
    +-  lt_cv_deplibs_check_method=unknown
    ++freebsd1*)
    ++  dynamic_linker=no
    +   ;;
    + 
    +-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)$'
    ++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
    +-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
    ++    case $host_os in
    ++    freebsd[[123]]*) objformat=aout ;;
    ++    *) objformat=elf ;;
    ++    esac
    +   fi
    +-  ;;
    +-
    +-osf3* | osf4* | osf5*)
    +-  lt_cv_deplibs_check_method=pass_all
    +-  ;;
    +-
    +-solaris*)
    +-  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 )'
    ++  version_type=freebsd-$objformat
    ++  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
    ++      ;;
    ++  esac
    ++  shlibpath_var=LD_LIBRARY_PATH
    ++  case $host_os in
    ++  freebsd2*)
    ++    shlibpath_overrides_runpath=yes
    +     ;;
    +-  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
    ++  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
    ++    shlibpath_overrides_runpath=yes
    ++    hardcode_into_libs=yes
    +     ;;
    +-  siemens)
    +-    lt_cv_deplibs_check_method=pass_all
    ++  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
    +     ;;
    +-  pc)
    +-    lt_cv_deplibs_check_method=pass_all
    ++  *) # from 4.6 on, and DragonFly
    ++    shlibpath_overrides_runpath=yes
    ++    hardcode_into_libs=yes
    +     ;;
    +   esac
    +   ;;
    + 
    +-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
    +-  lt_cv_deplibs_check_method=pass_all
    ++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
    +   ;;
    +-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
    +-])# AC_DEPLIBS_CHECK_METHOD
    + 
    +-
    +-# AC_PROG_NM
    +-# ----------
    +-# find the pathname to a BSD-compatible name lister
    +-AC_DEFUN([AC_PROG_NM],
    +-[AC_CACHE_CHECK([for BSD-compatible 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
    +-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
    +-fi])
    +-NM="$lt_cv_path_NM"
    +-])# AC_PROG_NM
    +-
    +-
    +-# AC_CHECK_LIBM
    +-# -------------
    +-# check for math library
    +-AC_DEFUN([AC_CHECK_LIBM],
    +-[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")
    ++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'
    +   ;;
    +-esac
    +-])# AC_CHECK_LIBM
    + 
    ++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
    ++  ;;
    + 
    +-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
    +-# -----------------------------------
    +-# sets LIBLTDL to the link flags for the libltdl convenience library and
    +-# LTDLINCL to the include flags for the libltdl header and adds
    +-# --enable-ltdl-convenience to the configure arguments.  Note that
    +-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
    +-# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
    +-# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
    +-# (note the single quotes!).  If your package is not flat and you're not
    +-# using automake, define top_builddir and top_srcdir appropriately in
    +-# the Makefiles.
    +-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-  case $enable_ltdl_convenience in
    +-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
    +-  "") enable_ltdl_convenience=yes
    +-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
    ++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
    +-  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
    +-  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
    +-  # For backwards non-gettext consistent compatibility...
    +-  INCLTDL="$LTDLINCL"
    +-])# AC_LIBLTDL_CONVENIENCE
    +-
    +-
    +-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
    +-# -----------------------------------
    +-# sets LIBLTDL to the link flags for the libltdl installable library and
    +-# LTDLINCL to the include flags for the libltdl header and adds
    +-# --enable-ltdl-install to the configure arguments.  Note that
    +-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
    +-# and an installed libltdl is not found, it is assumed to be `libltdl'.
    +-# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
    +-# '${top_srcdir}/' (note the single quotes!).  If your package is not
    +-# flat and you're not using automake, define top_builddir and top_srcdir
    +-# appropriately in the Makefiles.
    +-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
    +-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-  AC_CHECK_LIB(ltdl, lt_dlinit,
    +-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
    +-  [if test x"$enable_ltdl_install" = xno; then
    +-     AC_MSG_WARN([libltdl not installed, but installation disabled])
    +-   else
    +-     enable_ltdl_install=yes
    +-   fi
    +-  ])
    +-  if test x"$enable_ltdl_install" = x"yes"; then
    +-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
    +-    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
    +-    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
    +-  else
    +-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
    +-    LIBLTDL="-lltdl"
    +-    LTDLINCL=
    +-  fi
    +-  # For backwards non-gettext consistent compatibility...
    +-  INCLTDL="$LTDLINCL"
    +-])# AC_LIBLTDL_INSTALLABLE
    ++  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
    ++  ;;
    + 
    +-# AC_LIBTOOL_CXX
    +-# --------------
    +-# enable support for C++ libraries
    +-AC_DEFUN([AC_LIBTOOL_CXX],
    +-[AC_REQUIRE([_LT_AC_LANG_CXX])
    +-])# AC_LIBTOOL_CXX
    ++# 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
    + 
    +-# _LT_AC_LANG_CXX
    +-# ---------------
    +-AC_DEFUN([_LT_AC_LANG_CXX],
    +-[AC_REQUIRE([AC_PROG_CXX])
    +-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
    +-])# _LT_AC_LANG_CXX
    ++  # 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
    + 
    +-# _LT_AC_PROG_CXXCPP
    +-# ------------------
    +-AC_DEFUN([_LT_AC_PROG_CXXCPP],
    +-[
    +-AC_REQUIRE([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
    +-fi
    +-])# _LT_AC_PROG_CXXCPP
    +-
    +-# AC_LIBTOOL_F77
    +-# --------------
    +-# enable support for Fortran 77 libraries
    +-AC_DEFUN([AC_LIBTOOL_F77],
    +-[AC_REQUIRE([_LT_AC_LANG_F77])
    +-])# AC_LIBTOOL_F77
    +-
    +-
    +-# _LT_AC_LANG_F77
    +-# ---------------
    +-AC_DEFUN([_LT_AC_LANG_F77],
    +-[AC_REQUIRE([AC_PROG_F77])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
    +-])# _LT_AC_LANG_F77
    +-
    +-
    +-# AC_LIBTOOL_GCJ
    +-# --------------
    +-# enable support for GCJ libraries
    +-AC_DEFUN([AC_LIBTOOL_GCJ],
    +-[AC_REQUIRE([_LT_AC_LANG_GCJ])
    +-])# AC_LIBTOOL_GCJ
    +-
    +-
    +-# _LT_AC_LANG_GCJ
    +-# ---------------
    +-AC_DEFUN([_LT_AC_LANG_GCJ],
    +-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
    +-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
    +-    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
    +-      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
    +-	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
    +-	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
    +-])# _LT_AC_LANG_GCJ
    +-
    +-
    +-# AC_LIBTOOL_RC
    +-# -------------
    +-# enable support for Windows resource files
    +-AC_DEFUN([AC_LIBTOOL_RC],
    +-[AC_REQUIRE([LT_AC_PROG_RC])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
    +-])# AC_LIBTOOL_RC
    ++  # 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
    ++  ;;
    + 
    +-# AC_LIBTOOL_LANG_C_CONFIG
    +-# ------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
    +-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
    +-[lt_save_CC="$CC"
    +-AC_LANG_PUSH(C)
    ++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
    ++  ;;
    + 
    +-# Source file extension for C test sources.
    +-ac_ext=c
    ++*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'
    ++  ;;
    + 
    +-# Object file extension for compiled C test sources.
    +-objext=o
    +-_LT_AC_TAGVAR(objext, $1)=$objext
    ++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
    ++  ;;
    + 
    +-# Code to be used in simple compile tests
    +-lt_simple_compile_test_code="int some_variable = 0;\n"
    ++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
    ++  ;;
    + 
    +-# Code to be used in simple link tests
    +-lt_simple_link_test_code='int main(){return(0);}\n'
    ++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"
    ++  ;;
    + 
    +-_LT_AC_SYS_COMPILER
    ++rdos*)
    ++  dynamic_linker=no
    ++  ;;
    + 
    +-# save warnings/boilerplate of simple test code
    +-_LT_COMPILER_BOILERPLATE
    +-_LT_LINKER_BOILERPLATE
    ++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'
    ++  ;;
    + 
    +-## 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...
    +-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    +-AC_LIBTOOL_SYS_LIB_STRIP
    +-AC_LIBTOOL_DLOPEN_SELF
    +-
    +-# Report which library types will actually be built
    +-AC_MSG_CHECKING([if libtool supports shared libraries])
    +-AC_MSG_RESULT([$can_build_shared])
    ++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
    ++  ;;
    + 
    +-AC_MSG_CHECKING([whether to build shared libraries])
    +-test "$can_build_shared" = "no" && enable_shared=no
    ++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
    ++  ;;
    + 
    +-# 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'
    ++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
    +   ;;
    + 
    +-aix4* | aix5*)
    +-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
    +-    test "$enable_shared" = yes && enable_static=no
    ++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
    +-    ;;
    +-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])
    +-
    +-AC_LIBTOOL_CONFIG($1)
    +-
    +-AC_LANG_POP
    +-CC="$lt_save_CC"
    +-])# AC_LIBTOOL_LANG_C_CONFIG
    +-
    +-
    +-# AC_LIBTOOL_LANG_CXX_CONFIG
    +-# --------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
    +-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
    +-[AC_LANG_PUSH(C++)
    +-AC_REQUIRE([AC_PROG_CXX])
    +-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
    +-
    +-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
    +-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
    +-_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
    +-_LT_AC_TAGVAR(module_cmds, $1)=
    +-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
    +-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
    +-_LT_AC_TAGVAR(no_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
    +-
    +-# Dependencies to place before and after the object being linked:
    +-_LT_AC_TAGVAR(predep_objects, $1)=
    +-_LT_AC_TAGVAR(postdep_objects, $1)=
    +-_LT_AC_TAGVAR(predeps, $1)=
    +-_LT_AC_TAGVAR(postdeps, $1)=
    +-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
    +-
    +-# Source file extension for C++ test sources.
    +-ac_ext=cpp
    +-
    +-# Object file extension for compiled C++ test sources.
    +-objext=o
    +-_LT_AC_TAGVAR(objext, $1)=$objext
    +-
    +-# Code to be used in simple compile tests
    +-lt_simple_compile_test_code="int some_variable = 0;\n"
    ++  sys_lib_dlsearch_path_spec='/usr/lib'
    ++  ;;
    + 
    +-# Code to be used in simple link tests
    +-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
    ++tpf*)
    ++  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
    ++  version_type=linux
    ++  need_lib_prefix=no
    ++  need_version=no
    ++  library_name_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
    ++  ;;
    + 
    +-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
    +-_LT_AC_SYS_COMPILER
    ++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
    ++  ;;
    + 
    +-# save warnings/boilerplate of simple test code
    +-_LT_COMPILER_BOILERPLATE
    +-_LT_LINKER_BOILERPLATE
    ++*)
    ++  dynamic_linker=no
    ++  ;;
    ++esac
    ++AC_MSG_RESULT([$dynamic_linker])
    ++test "$dynamic_linker" = no && can_build_shared=no
    + 
    +-# 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
    ++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 -n "${lt_cv_path_LDCXX+set}"; then
    +-  lt_cv_path_LD=$lt_cv_path_LDCXX
    +-else
    +-  $as_unset lt_cv_path_LD
    ++ 
    ++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
    +-test -z "${LDCXX+set}" || LD=$LDCXX
    +-CC=${CXX-"c++"}
    +-compiler=$CC
    +-_LT_AC_TAGVAR(compiler, $1)=$CC
    +-_LT_CC_BASENAME([$compiler])
    +-
    +-# We don't want -fno-exception wen compiling C++ code, so set the
    +-# no_builtin_flag separately
    +-if test "$GXX" = yes; then
    +-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
    +-else
    +-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
    ++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
    + 
    +-if test "$GXX" = yes; then
    +-  # Set up default GNU C++ configuration
    +-
    +-  AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-    _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
    +-    _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
    +-    else
    +-      _LT_AC_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_AC_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
    ++_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
    + 
    +-# PORTME: fill in a description of your system's C++ link characteristics
    +-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
    +-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
    +-case $host_os in
    +-  aix3*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  aix4* | aix5*)
    +-    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]].*|aix5*)
    +-	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
    ++# _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
    + 
    +-    # 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_AC_TAGVAR(archive_cmds, $1)=''
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    ++*** 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
    + 
    +-    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
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	else
    +-	  # We have old collect2
    +-	  _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-	  _LT_AC_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
    ++_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
    + 
    +-    # It seems that -bexpall does not export symbols beginning with
    +-    # underscore (_), so it is better to generate a list of symbols to export.
    +-    _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
    +-      # Determine the default libpath from the value encoded in an empty executable.
    +-      _LT_AC_SYS_LIBPATH_AIX
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
    ++# 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_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
    +-     else
    +-      if test "$host_cpu" = ia64; then
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
    +-	_LT_AC_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_AC_SYS_LIBPATH_AIX
    +-	_LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
    +-	# Exported symbols can be pulled into shared objects from archives
    +-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
    +-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-	# This is similar to how AIX traditionally builds its shared libraries.
    +-	_LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      # Joseph Beckenbach  says some releases of gcc
    +-      # support --undefined.  This deserves some investigation.  FIXME
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-    else
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    fi
    +-    ;;
    ++# _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
    + 
    +-  chorus*)
    +-    case $cc_basename in
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    + 
    +-  cygwin* | mingw* | pw32*)
    +-    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
    +-    # as there is no search path for DLLs.
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-    _LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
    +-
    +-    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
    +-      _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-    fi
    +-  ;;
    +-      darwin* | rhapsody*)
    +-        case $host_os in
    +-        rhapsody* | darwin1.[[012]])
    +-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
    +-         ;;
    +-       *) # Darwin 1.3 on
    +-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
    +-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-         else
    +-           case ${MACOSX_DEPLOYMENT_TARGET} in
    +-             10.[[012]])
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-               ;;
    +-             10.*)
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
    +-               ;;
    +-           esac
    +-         fi
    +-         ;;
    +-        esac
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-
    +-    if test "$GXX" = yes ; then
    +-      lt_int_apple_cc_single_mod=no
    +-      output_verbose_link_cmd='echo'
    +-      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
    +-       lt_int_apple_cc_single_mod=yes
    +-      fi
    +-      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
    +-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
    +-      else
    +-          _LT_AC_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'
    +-        fi
    +-        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
    +-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          else
    +-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          fi
    +-            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-      else
    +-      case $cc_basename in
    +-        xlc*)
    +-         output_verbose_link_cmd='echo'
    +-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
    +-          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          ;;
    +-       *)
    +-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-          ;;
    +-      esac
    +-      fi
    +-        ;;
    ++# 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
    + 
    +-  dgux*)
    +-    case $cc_basename in
    +-      ec++*)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      ghcx*)
    +-	# Green Hills C++ Compiler
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    +-  freebsd[[12]]*)
    +-    # C++ shared libraries reported to be fairly broken before switch to ELF
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  freebsd-elf*)
    +-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-    ;;
    +-  freebsd* | kfreebsd*-gnu | dragonfly*)
    +-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
    +-    # conventions
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
    +-    ;;
    +-  gnu*)
    +-    ;;
    +-  hpux9*)
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-    _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    +-    aCC*)
    +-      _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
    +-      ;;
    +-    *)
    +-      if test "$GXX" = yes; then
    +-        _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-    esac
    +-    ;;
    +-  hpux10*|hpux11*)
    +-    if test $with_gnu_ld = no; then
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    ++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
    + 
    +-      case $host_cpu in
    +-      hppa*64*|ia64*)
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
    +-        ;;
    +-      *)
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-        ;;
    +-      esac
    +-    fi
    +-    case $host_cpu in
    +-    hppa*64*|ia64*)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-    *)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
    +-					      # but as the default
    +-					      # location of the library.
    ++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"
    +       ;;
    +-    esac
    +-
    +-    case $cc_basename in
    +-      CC*)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      aCC*)
    +-	case $host_cpu in
    +-	hppa*64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	  ;;
    +-	ia64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	  ;;
    +-	*)
    +-	  _LT_AC_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 $list'
    +-	;;
    +-      *)
    +-	if test "$GXX" = yes; then
    +-	  if test $with_gnu_ld = no; then
    +-	    case $host_cpu in
    +-	    hppa*64*)
    +-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	      ;;
    +-	    ia64*)
    +-	      _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  interix3*)
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-    _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-	  else
    +-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
    +-	  fi
    +-	fi
    +-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-	;;
    +-    esac
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    ++  "")
    ++    # If it fails, then pretend we aren't using GCC.
    ++    ac_prog=ld
    +     ;;
    +-  linux*)
    +-    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_AC_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_AC_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 $list'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
    +-	_LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
    +-	;;
    +-      icpc*)
    +-	# 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-  	  _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	  _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
    +-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
    +-	;;
    +-      pgCC*)
    +-        # Portland Group C++ compiler
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
    +-  	_LT_AC_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'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
    +-	_LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
    +-	_LT_AC_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 $templist | $SED "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 $list'
    +-	;;
    +-      *)
    +-	case `$CC -V 2>&1 | sed 5q` in
    +-	*Sun\ C*)
    +-	  # Sun C++ 5.9
    +-	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	  _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-	  _LT_AC_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'
    +-
    +-	  # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
    +-	  ;;
    +-	esac
    +-	;;
    +-    esac
    ++  *)
    ++    # If it is relative, then search for the first ld in PATH.
    ++    with_gnu_ld=unknown
    +     ;;
    +-  lynxos*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  m88k*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  mvs*)
    +-    case $cc_basename in
    +-      cxx*)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    ++  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 /dev/null; then
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
    +-      wlarc=
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_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::"'
    +-    ;;
    +-  openbsd2*)
    +-    # C++ shared libraries are fairly broken
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  openbsd*)
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
    +-    _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
    ++      esac
    +     fi
    +-    output_verbose_link_cmd='echo'
    +-    ;;
    +-  osf3*)
    +-    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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-	# Archives containing C++ object files must be created using
    +-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
    +-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
    +-
    +-	;;
    +-      RCC*)
    +-	# Rational C++ 2.4.1
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      cxx*)
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-	_LT_AC_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 $templist | $SED "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 $list'
    +-	;;
    +-      *)
    +-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	  _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-	  _LT_AC_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"'
    ++  done
    ++  IFS="$lt_save_ifs"
    ++else
    ++  lt_cv_path_LD="$LD" # Let the user override the test with a path.
    ++fi])
    ++LD="$lt_cv_path_LD"
    ++if test -n "$LD"; then
    ++  AC_MSG_RESULT($LD)
    ++else
    ++  AC_MSG_RESULT(no)
    ++fi
    ++test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
    ++_LT_PATH_LD_GNU
    ++AC_SUBST([LD])
    + 
    +-	else
    +-	  # FIXME: insert proper C++ library support
    +-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-	# Archives containing C++ object files must be created using
    +-	# the KAI C++ compiler.
    +-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
    +-	;;
    +-      RCC*)
    +-	# Rational C++ 2.4.1
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      cxx*)
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_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 -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
    +-	  $rm $lib.exp'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
    +-	_LT_AC_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 $templist | $SED "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 $list'
    +-	;;
    +-      *)
    +-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	 _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-	  _LT_AC_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"'
    ++_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
    ++])# LT_PATH_LD
    + 
    +-	else
    +-	  # FIXME: insert proper C++ library support
    +-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  psos*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  sunos4*)
    +-    case $cc_basename in
    +-      CC*)
    +-	# Sun C++ 4.x
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      lcc*)
    +-	# Lucid
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    ++# Old names:
    ++AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
    ++AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
    ++dnl aclocal-1.4 backwards compatibility:
    ++dnl AC_DEFUN([AM_PROG_LD], [])
    ++dnl AC_DEFUN([AC_PROG_LD], [])
    ++
    ++
    ++# _LT_PATH_LD_GNU
    ++#- --------------
    ++m4_defun([_LT_PATH_LD_GNU],
    ++[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
    ++[# I'd rather use --version here, but apparently some GNU lds only accept -v.
    ++case `$LD -v 2>&1  /dev/null; then
    +-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
    +-	    _LT_AC_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'
    ++case $host_os in
    ++aix[[4-9]]*)
    ++  lt_cv_deplibs_check_method=pass_all
    ++  ;;
    + 
    +-	    # 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_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
    +-	    _LT_AC_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'
    ++beos*)
    ++  lt_cv_deplibs_check_method=pass_all
    ++  ;;
    + 
    +-	    # 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
    ++bsdi[[45]]*)
    ++  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
    ++  lt_cv_file_magic_cmd='/usr/bin/file -L'
    ++  lt_cv_file_magic_test_file=/shlib/libc.so
    ++  ;;
    + 
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
    +-    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    runpath_var='LD_RUN_PATH'
    +-
    +-    case $cc_basename in
    +-      CC*)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_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.
    +-    # 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.
    +-    # So that behaviour is only enabled if SCOABSPATH is set to a
    +-    # non-empty value in the environment.  Most likely only useful for
    +-    # creating official distributions of packages.
    +-    # This is a hack until libtool officially supports absolute path
    +-    # names for shared libraries.
    +-    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
    +-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
    +-    runpath_var='LD_RUN_PATH'
    +-
    +-    case $cc_basename in
    +-      CC*)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    ++cygwin*)
    ++  # func_win32_libid is a shell function defined in ltmain.sh
    ++  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
    ++  lt_cv_file_magic_cmd='func_win32_libid'
    ++  ;;
    ++
    ++mingw* | pw32*)
    ++  # Base MSYS/MinGW do not provide the 'file' command needed by
    ++  # func_win32_libid shell function, so use a weaker test based on 'objdump',
    ++  # unless we find 'file', for example because we are cross-compiling.
    ++  if ( file / ) >/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
    ++  ;;
    ++
    ++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
    +     ;;
    +-  vxworks*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    ++  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
    +     ;;
    +   *)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    ++    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
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
    +-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
    ++  esac
    ++  ;;
    + 
    +-_LT_AC_TAGVAR(GCC, $1)="$GXX"
    +-_LT_AC_TAGVAR(LD, $1)="$LD"
    ++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)$'
    ++  ;;
    + 
    +-## 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...
    +-AC_LIBTOOL_POSTDEP_PREDEP($1)
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    ++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
    ++  ;;
    + 
    +-AC_LIBTOOL_CONFIG($1)
    ++# This must be Linux ELF.
    ++linux* | k*bsd*-gnu)
    ++  lt_cv_deplibs_check_method=pass_all
    ++  ;;
    + 
    +-AC_LANG_POP
    +-CC=$lt_save_CC
    +-LDCXX=$LD
    +-LD=$lt_save_LD
    +-GCC=$lt_save_GCC
    +-with_gnu_ldcxx=$with_gnu_ld
    +-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
    +-])# AC_LIBTOOL_LANG_CXX_CONFIG
    ++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
    ++  ;;
    + 
    +-# AC_LIBTOOL_POSTDEP_PREDEP([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.
    +-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
    +-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...
    +-ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&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*)
    ++  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*
    + 
    +-       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_AC_TAGVAR(compiler_lib_search_path, $1)"; then
    +-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
    +-	   else
    +-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_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_AC_TAGVAR(postdeps, $1)"; then
    +-	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
    +-	 else
    +-	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
    +-	 fi
    +-       fi
    +-       ;;
    ++  # 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
    + 
    +-    *.$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
    ++_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
    + 
    +-       if test "$pre_test_object_deps_done" = no; then
    +-	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
    +-	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
    +-	 else
    +-	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
    +-	 fi
    +-       else
    +-	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
    +-	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
    +-	 else
    +-	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
    +-	 fi
    +-       fi
    +-       ;;
    + 
    +-    *) ;; # Ignore the rest.
    ++# _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*)
    ++      # 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 IA64 HP-UX and 64-bit HP-UX, but
    ++      # not for PA HP-UX.
    ++      case $host_cpu in
    ++      hppa*64*|ia64*)
    ++	;;
    ++      *)
    ++	_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'
    ++	    ;;
    ++	  icpc* | ecpc* )
    ++	    # Intel C++
    ++	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    ++	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    ++	    _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
    +-  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
    +-ifelse([$1],[CXX],
    +-[case $host_os in
    +-interix3*)
    +-  # 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_AC_TAGVAR(predep_objects,$1)=
    +-  _LT_AC_TAGVAR(postdep_objects,$1)=
    +-  _LT_AC_TAGVAR(postdeps,$1)=
    +-  ;;
    +-
    +-linux*)
    +-  case `$CC -V 2>&1 | sed 5q` in
    +-  *Sun\ C*)
    +-    # Sun C++ 5.9
    +-    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
    +-    ;;
    +-  esac
    +-  ;;
    +-
    +-solaris*)
    +-  case $cc_basename in
    +-  CC*)
    +-    # 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.
    +-    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
    +-    ;;
    +-  esac
    +-  ;;
    +-esac
    +-])
    +-
    +-case " $_LT_AC_TAGVAR(postdeps, $1) " in
    +-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
    +-esac
    +-])# AC_LIBTOOL_POSTDEP_PREDEP
    +-
    +-# AC_LIBTOOL_LANG_F77_CONFIG
    +-# --------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
    +-AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
    +-[AC_REQUIRE([AC_PROG_F77])
    +-AC_LANG_PUSH(Fortran 77)
    +-
    +-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
    +-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
    +-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
    +-_LT_AC_TAGVAR(module_cmds, $1)=
    +-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
    +-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
    +-_LT_AC_TAGVAR(no_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-_LT_AC_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_AC_TAGVAR(objext, $1)=$objext
    +-
    +-# Code to be used in simple compile tests
    +-lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
    +-
    +-# Code to be used in simple link tests
    +-lt_simple_link_test_code="      program t\n      end\n"
    +-
    +-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
    +-_LT_AC_SYS_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"
    +-CC=${F77-"f77"}
    +-compiler=$CC
    +-_LT_AC_TAGVAR(compiler, $1)=$CC
    +-_LT_CC_BASENAME([$compiler])
    +-
    +-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
    +-  ;;
    +-aix4* | aix5*)
    +-  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_AC_TAGVAR(GCC, $1)="$G77"
    +-_LT_AC_TAGVAR(LD, $1)="$LD"
    +-
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    +-
    +-AC_LIBTOOL_CONFIG($1)
    +-
    +-AC_LANG_POP
    +-CC="$lt_save_CC"
    +-])# AC_LIBTOOL_LANG_F77_CONFIG
    +-
    +-
    +-# AC_LIBTOOL_LANG_GCJ_CONFIG
    +-# --------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
    +-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
    +-[AC_LANG_SAVE
    +-
    +-# Source file extension for Java test sources.
    +-ac_ext=java
    ++],
    ++[
    ++  if test "$GCC" = yes; then
    ++    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    ++    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
    + 
    +-# Object file extension for compiled Java test sources.
    +-objext=o
    +-_LT_AC_TAGVAR(objext, $1)=$objext
    ++    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
    ++      ;;
    + 
    +-# Code to be used in simple compile tests
    +-lt_simple_compile_test_code="class foo {}\n"
    ++    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
    ++      ;;
    + 
    +-# Code to be used in simple link tests
    +-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
    ++    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    ++      # PIC is the default for these OSes.
    ++      ;;
    + 
    +-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
    +-_LT_AC_SYS_COMPILER
    ++    mingw* | cygwin* | pw32* | os2*)
    ++      # 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'])
    ++      ;;
    + 
    +-# save warnings/boilerplate of simple test code
    +-_LT_COMPILER_BOILERPLATE
    +-_LT_LINKER_BOILERPLATE
    ++    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'
    ++      ;;
    + 
    +-# Allow CC to be a program name with arguments.
    +-lt_save_CC="$CC"
    +-CC=${GCJ-"gcj"}
    +-compiler=$CC
    +-_LT_AC_TAGVAR(compiler, $1)=$CC
    +-_LT_CC_BASENAME([$compiler])
    ++    hpux*)
    ++      # 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)='-fPIC'
    ++	;;
    ++      esac
    ++      ;;
    + 
    +-# GCJ did not exist at the time GCC didn't implicitly link libc in.
    +-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    ++    interix[[3-9]]*)
    ++      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
    ++      # Instead, we relocate shared libraries at runtime.
    ++      ;;
    + 
    +-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
    ++    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
    ++      ;;
    + 
    +-## 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...
    +-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    ++    *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'
    ++      ;;
    + 
    +-AC_LIBTOOL_CONFIG($1)
    ++    sysv4*MP*)
    ++      if test -d /usr/nec; then
    ++	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
    ++      fi
    ++      ;;
    + 
    +-AC_LANG_RESTORE
    +-CC="$lt_save_CC"
    +-])# AC_LIBTOOL_LANG_GCJ_CONFIG
    ++    *)
    ++      _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*)
    ++      # 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'])
    ++      ;;
    + 
    +-# AC_LIBTOOL_LANG_RC_CONFIG
    +-# -------------------------
    +-# Ensure that the configuration vars for the Windows resource compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
    +-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
    +-[AC_LANG_SAVE
    ++    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'
    ++      ;;
    + 
    +-# Source file extension for RC test sources.
    +-ac_ext=rc
    ++    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'
    ++      ;;
    + 
    +-# Object file extension for compiled RC test sources.
    +-objext=o
    +-_LT_AC_TAGVAR(objext, $1)=$objext
    ++    linux* | k*bsd*-gnu)
    ++      case $cc_basename in
    ++      icc* | ecc* | ifort*)
    ++	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    ++	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    ++	_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
    ++      ;;
    + 
    +-# Code to be used in simple compile tests
    +-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
    ++    newsos6)
    ++      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    ++      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    ++      ;;
    + 
    +-# Code to be used in simple link tests
    +-lt_simple_link_test_code="$lt_simple_compile_test_code"
    ++    *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'
    ++      ;;
    + 
    +-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
    +-_LT_AC_SYS_COMPILER
    ++    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'
    ++      ;;
    + 
    +-# save warnings/boilerplate of simple test code
    +-_LT_COMPILER_BOILERPLATE
    +-_LT_LINKER_BOILERPLATE
    ++    rdos*)
    ++      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    ++      ;;
    + 
    +-# Allow CC to be a program name with arguments.
    +-lt_save_CC="$CC"
    +-CC=${RC-"windres"}
    +-compiler=$CC
    +-_LT_AC_TAGVAR(compiler, $1)=$CC
    +-_LT_CC_BASENAME([$compiler])
    +-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
    ++    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
    ++      ;;
    + 
    +-AC_LIBTOOL_CONFIG($1)
    ++    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'
    ++      ;;
    + 
    +-AC_LANG_RESTORE
    +-CC="$lt_save_CC"
    +-])# AC_LIBTOOL_LANG_RC_CONFIG
    ++    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'
    ++      ;;
    + 
    +-# AC_LIBTOOL_CONFIG([TAGNAME])
    +-# ----------------------------
    +-# If TAGNAME is not passed, then 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
    +-# TAGNAME from the matching tagged config vars.
    +-AC_DEFUN([AC_LIBTOOL_CONFIG],
    +-[# The else clause should only fire when bootstrapping the
    +-# libtool distribution, otherwise you forgot to ship ltmain.sh
    +-# with your package, and you will get complaints that there are
    +-# no rules to generate ltmain.sh.
    +-if test -f "$ltmain"; then
    +-  # 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
    +-  # Now quote all the things that may contain metacharacters while being
    +-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
    +-  # variables and quote the copies for generation of the libtool script.
    +-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
    +-    SED SHELL STRIP \
    +-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
    +-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
    +-    deplibs_check_method reload_flag reload_cmds need_locks \
    +-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
    +-    lt_cv_sys_global_symbol_to_c_name_address \
    +-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
    +-    old_postinstall_cmds old_postuninstall_cmds \
    +-    _LT_AC_TAGVAR(compiler, $1) \
    +-    _LT_AC_TAGVAR(CC, $1) \
    +-    _LT_AC_TAGVAR(LD, $1) \
    +-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
    +-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
    +-    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
    +-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
    +-    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
    +-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
    +-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
    +-    _LT_AC_TAGVAR(old_archive_cmds, $1) \
    +-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
    +-    _LT_AC_TAGVAR(predep_objects, $1) \
    +-    _LT_AC_TAGVAR(postdep_objects, $1) \
    +-    _LT_AC_TAGVAR(predeps, $1) \
    +-    _LT_AC_TAGVAR(postdeps, $1) \
    +-    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
    +-    _LT_AC_TAGVAR(archive_cmds, $1) \
    +-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
    +-    _LT_AC_TAGVAR(postinstall_cmds, $1) \
    +-    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
    +-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
    +-    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
    +-    _LT_AC_TAGVAR(no_undefined_flag, $1) \
    +-    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
    +-    _LT_AC_TAGVAR(hardcode_automatic, $1) \
    +-    _LT_AC_TAGVAR(module_cmds, $1) \
    +-    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
    +-    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
    +-    _LT_AC_TAGVAR(exclude_expsyms, $1) \
    +-    _LT_AC_TAGVAR(include_expsyms, $1); do
    +-
    +-    case $var in
    +-    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
    +-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
    +-    _LT_AC_TAGVAR(archive_cmds, $1) | \
    +-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
    +-    _LT_AC_TAGVAR(module_cmds, $1) | \
    +-    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
    +-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
    +-    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
    +-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
    +-    postinstall_cmds | postuninstall_cmds | \
    +-    old_postinstall_cmds | old_postuninstall_cmds | \
    +-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
    +-      # Double-quote double-evaled strings.
    +-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
    ++    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'
    +       ;;
    ++
    +     *)
    +-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
    ++      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +       ;;
    +     esac
    +-  done
    +-
    +-  case $lt_echo in
    +-  *'\[$]0 --fallback-echo"')
    +-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
    ++  fi
    ++])
    ++case $host_os in
    ++  # For platforms which do not support PIC, -DPIC is meaningless:
    ++  *djgpp*)
    ++    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
    +     ;;
    +-  esac
    +-
    +-ifelse([$1], [],
    +-  [cfgfile="${ofile}T"
    +-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
    +-  $rm -f "$cfgfile"
    +-  AC_MSG_NOTICE([creating $ofile])],
    +-  [cfgfile="$ofile"])
    +-
    +-  cat <<__EOF__ >> "$cfgfile"
    +-ifelse([$1], [],
    +-[#! $SHELL
    ++  *)
    ++    _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])
    + 
    +-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
    +-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
    +-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
    + #
    +-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
    +-# Free Software Foundation, Inc.
    +-#
    +-# This file is part of GNU Libtool:
    +-# Originally by Gordon Matzigkeit , 1996
    +-#
    +-# This program is free software; you can redistribute it and/or modify
    +-# it under the terms of the GNU General Public License as published by
    +-# the Free Software Foundation; either version 2 of the License, or
    +-# (at your option) any later version.
    ++# Check to make sure the PIC flag actually works.
    + #
    +-# 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.
    ++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])
    ++
    + #
    +-# 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.
    ++# Check to make sure the static flag actually works.
    + #
    +-# As a special exception to the GNU General Public License, if you
    +-# distribute this file as part of a program that contains a
    +-# configuration script generated by Autoconf, you may include it under
    +-# the same distribution terms that you use for the rest of that program.
    +-
    +-# A sed program that does not truncate output.
    +-SED=$lt_SED
    +-
    +-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
    +-Xsed="$SED -e 1s/^X//"
    +-
    +-# 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
    +-
    +-# The names of the tagged configurations supported by this script.
    +-available_tags=
    +-
    +-# ### BEGIN LIBTOOL CONFIG],
    +-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
    +-
    +-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
    +-
    +-# Shell to use when invoking shell scripts.
    +-SHELL=$lt_SHELL
    +-
    +-# Whether or not to build shared libraries.
    +-build_libtool_libs=$enable_shared
    +-
    +-# Whether or not to build static libraries.
    +-build_old_libs=$enable_static
    +-
    +-# Whether or not to add -lc for building shared libraries.
    +-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
    +-
    +-# Whether or not to disallow shared libs when runtime libs are static
    +-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
    +-
    +-# Whether or not to optimize for fast installation.
    +-fast_install=$enable_fast_install
    +-
    +-# The host system.
    +-host_alias=$host_alias
    +-host=$host
    +-host_os=$host_os
    ++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
    + 
    +-# The build system.
    +-build_alias=$build_alias
    +-build=$build
    +-build_os=$build_os
    + 
    +-# An echo program that does not interpret backslashes.
    +-echo=$lt_echo
    ++# _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*)
    ++    _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=
    + 
    +-# The archiver.
    +-AR=$lt_AR
    +-AR_FLAGS=$lt_AR_FLAGS
    ++  case $host_os in
    ++  cygwin* | mingw* | pw32*)
    ++    # 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
    + 
    +-# A C compiler.
    +-LTCC=$lt_LTCC
    ++  _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}'
    + 
    +-# LTCC compiler flags.
    +-LTCFLAGS=$lt_LTCFLAGS
    ++    # 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
    + 
    +-# A language-specific compiler.
    +-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
    ++    # 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
    + 
    +-# Is the compiler the GNU C compiler?
    +-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
    ++*** 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.
    + 
    +-# An ERE matcher.
    +-EGREP=$lt_EGREP
    ++_LT_EOF
    ++      fi
    ++      ;;
    + 
    +-# The linker used to build libraries.
    +-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
    ++    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
    ++      ;;
    + 
    +-# Whether we need hard or soft links.
    +-LN_S=$lt_LN_S
    ++    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
    ++      ;;
    + 
    +-# A BSD-compatible nm program.
    +-NM=$lt_NM
    ++    cygwin* | mingw* | pw32*)
    ++      # _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'
    + 
    +-# A symbol stripping program
    +-STRIP=$lt_STRIP
    ++      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
    ++      ;;
    + 
    +-# Used to examine libraries when file_magic_cmd begins "file"
    +-MAGIC_CMD=$MAGIC_CMD
    ++    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'
    ++      ;;
    + 
    +-# Used on cygwin: DLL creation program.
    +-DLLTOOL="$DLLTOOL"
    ++    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' ;;
    ++	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'
    + 
    +-# Used on cygwin: object dumper.
    +-OBJDUMP="$OBJDUMP"
    ++        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
    + 
    +-# Used on cygwin: assembler.
    +-AS="$AS"
    ++	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
    ++      ;;
    + 
    +-# The name of the directory that contains temporary libtool files.
    +-objdir=$objdir
    ++    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
    ++      ;;
    + 
    +-# How to create reloadable object files.
    +-reload_flag=$lt_reload_flag
    +-reload_cmds=$lt_reload_cmds
    ++    solaris*)
    ++      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
    ++	_LT_TAGVAR(ld_shlibs, $1)=no
    ++	cat <<_LT_EOF 1>&2
    + 
    +-# How to pass a linker flag through the compiler.
    +-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
    ++*** 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.
    + 
    +-# Object file suffix (normally "o").
    +-objext="$ac_objext"
    ++_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
    ++      ;;
    + 
    +-# Old archive suffix (normally "a").
    +-libext="$libext"
    ++    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
    + 
    +-# Shared library suffix (normally ".so").
    +-shrext_cmds='$shrext_cmds'
    ++*** 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.
    + 
    +-# Executable file suffix (normally "").
    +-exeext="$exeext"
    ++_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
    ++      ;;
    + 
    +-# Additional compiler flags for building library objects.
    +-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
    +-pic_mode=$pic_mode
    ++    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
    ++      ;;
    + 
    +-# What is the maximum length of a command?
    +-max_cmd_len=$lt_cv_sys_max_cmd_len
    ++    *)
    ++      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
    + 
    +-# Does compiler simultaneously support -c and -o options?
    +-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
    ++    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
    ++      ;;
    + 
    +-# Must we lock files when doing compilation?
    +-need_locks=$lt_need_locks
    ++    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
    + 
    +-# Do we need the lib prefix for modules?
    +-need_lib_prefix=$need_lib_prefix
    ++	# 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
    + 
    +-# Do we need a version for libraries?
    +-need_version=$need_version
    ++	exp_sym_flag='-bexport'
    ++	no_entry_flag='-bnoentry'
    ++      fi
    + 
    +-# Whether dlopen is supported.
    +-dlopen_support=$enable_dlopen
    ++      # 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.
    + 
    +-# Whether dlopen of programs is supported.
    +-dlopen_self=$enable_dlopen_self
    ++      _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,'
    + 
    +-# Whether dlopen of statically linked programs is supported.
    +-dlopen_self_static=$enable_dlopen_self_static
    ++      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
    + 
    +-# Compiler flag to prevent dynamic linking.
    +-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
    ++      # 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
    ++      ;;
    + 
    +-# Compiler flag to turn off builtin functions.
    +-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
    ++    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
    ++      ;;
    + 
    +-# Compiler flag to allow reflexive dlopens.
    +-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
    ++    bsdi[[45]]*)
    ++      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
    ++      ;;
    + 
    +-# Compiler flag to generate shared objects directly from archives.
    +-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
    ++    cygwin* | mingw* | pw32*)
    ++      # 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
    ++      ;;
    + 
    +-# Compiler flag to generate thread-safe objects.
    +-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
    ++    darwin* | rhapsody*)
    ++      _LT_DARWIN_LINKER_FEATURES($1)
    ++      ;;
    + 
    +-# Library versioning type.
    +-version_type=$version_type
    ++    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
    ++      ;;
    + 
    +-# Format of library name prefix.
    +-libname_spec=$lt_libname_spec
    ++    freebsd1*)
    ++      _LT_TAGVAR(ld_shlibs, $1)=no
    ++      ;;
    + 
    +-# 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.
    +-library_names_spec=$lt_library_names_spec
    ++    # 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
    ++      ;;
    + 
    +-# The coded name of the library, if different from the real name.
    +-soname_spec=$lt_soname_spec
    ++    # 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
    ++      ;;
    + 
    +-# Commands used to build and install an old-style archive.
    +-RANLIB=$lt_RANLIB
    +-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
    +-old_postinstall_cmds=$lt_old_postinstall_cmds
    +-old_postuninstall_cmds=$lt_old_postuninstall_cmds
    ++    # 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
    ++      ;;
    + 
    +-# Create an old-style archive from a shared archive.
    +-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
    ++    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
    + 
    +-# Create a temporary old-style archive to link instead of a shared archive.
    +-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
    ++      # 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'
    ++      ;;
    + 
    +-# Commands used to build and install a shared archive.
    +-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
    +-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
    +-postinstall_cmds=$lt_postinstall_cmds
    +-postuninstall_cmds=$lt_postuninstall_cmds
    ++    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
    ++      ;;
    + 
    +-# Commands used to build a loadable module (assumed same as above if empty)
    +-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
    +-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
    ++    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 ${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)=:
    + 
    +-# Commands to strip libraries.
    +-old_striplib=$lt_old_striplib
    +-striplib=$lt_striplib
    ++	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'
    + 
    +-# Dependencies to place before the objects being linked to create a
    +-# shared library.
    +-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
    ++	  # 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
    ++      ;;
    + 
    +-# Dependencies to place after the objects being linked to create a
    +-# shared library.
    +-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
    ++    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
    ++      ;;
    + 
    +-# Dependencies to place before the objects being linked to create a
    +-# shared library.
    +-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
    ++    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
    ++      ;;
    + 
    +-# Dependencies to place after the objects being linked to create a
    +-# shared library.
    +-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
    ++    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
    ++      ;;
    + 
    +-# The library search path used internally by the compiler when linking
    +-# a shared library.
    +-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
    ++    *nto* | *qnx*)
    ++      ;;
    + 
    +-# Method to check whether dependent libraries are shared objects.
    +-deplibs_check_method=$lt_deplibs_check_method
    ++    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
    ++      ;;
    + 
    +-# Command to use when deplibs_check_method == file_magic.
    +-file_magic_cmd=$lt_file_magic_cmd
    ++    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'
    ++      ;;
    + 
    +-# Flag that allows shared libraries with undefined symbols to be built.
    +-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
    ++    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)=:
    ++      ;;
    + 
    +-# Flag that forces no undefined symbols.
    +-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $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'
    + 
    +-# Commands used to finish a libtool library installation in a directory.
    +-finish_cmds=$lt_finish_cmds
    ++	# 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)=:
    ++      ;;
    + 
    +-# Same as above, but a single script fragment to be evaled but not shown.
    +-finish_eval=$lt_finish_eval
    ++    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
    ++      ;;
    + 
    +-# Take the output of nm and produce a listing of raw symbols and C names.
    +-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
    ++    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
    ++      ;;
    + 
    +-# Transform the output of nm in a proper C declaration
    +-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
    ++    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
    ++      ;;
    + 
    +-# Transform the output of nm in a C name address pair
    +-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
    ++    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'
    ++      ;;
    + 
    +-# This is the shared library runtime path variable.
    +-runpath_var=$runpath_var
    ++    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
    ++      ;;
    + 
    +-# This is the shared library path variable.
    +-shlibpath_var=$shlibpath_var
    ++    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'
    + 
    +-# Is shlibpath searched before the hard-coded library search path?
    +-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
    ++      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
    ++      ;;
    + 
    +-# How to hardcode a shared library path into an executable.
    +-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
    ++    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'
    + 
    +-# Whether we should hardcode library paths into libraries.
    +-hardcode_into_libs=$hardcode_into_libs
    ++      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
    ++      ;;
    + 
    +-# Flag to hardcode \$libdir into a binary during linking.
    +-# This must work even if \$libdir does not exist.
    +-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
    ++    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
    ++      ;;
    + 
    +-# If ld is used when linking, flag to hardcode \$libdir into
    +-# a binary during linking. This must work even if \$libdir does
    +-# not exist.
    +-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
    ++    *)
    ++      _LT_TAGVAR(ld_shlibs, $1)=no
    ++      ;;
    ++    esac
    + 
    +-# Whether we need a single -rpath flag with a separated argument.
    +-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
    ++    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
    + 
    +-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
    +-# resulting binary.
    +-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
    ++_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
    + 
    +-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
    +-# resulting binary.
    +-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
    ++_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])
    + 
    +-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
    +-# the resulting binary.
    +-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
    ++#
    ++# 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
    + 
    +-# Set to yes if building a shared library automatically hardcodes DIR into the library
    +-# and all subsequent libraries and executables linked against it.
    +-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
    ++  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
    + 
    +-# Variables whose values should be saved in libtool wrapper scripts and
    +-# restored at relink time.
    +-variables_saved_for_relink="$variables_saved_for_relink"
    ++      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
    + 
    +-# Whether libtool must link a program against all its dependency libraries.
    +-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
    ++_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
    + 
    +-# Compile-time system search path for libraries
    +-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
    + 
    +-# Run-time system search path for libraries
    +-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
    ++# _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)
    + 
    +-# Fix the shell variable \$srcfile for the compiler.
    +-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
    ++# Source file extension for C test sources.
    ++ac_ext=c
    + 
    +-# Set to yes if exported symbols are required.
    +-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
    ++# Object file extension for compiled C test sources.
    ++objext=o
    ++_LT_TAGVAR(objext, $1)=$objext
    + 
    +-# The commands to list exported symbols.
    +-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
    ++# Code to be used in simple compile tests
    ++lt_simple_compile_test_code="int some_variable = 0;"
    + 
    +-# The commands to extract the exported symbol list from a shared archive.
    +-extract_expsyms_cmds=$lt_extract_expsyms_cmds
    ++# Code to be used in simple link tests
    ++lt_simple_link_test_code='int main(){return(0);}'
    + 
    +-# Symbols that should not be listed in the preloaded symbols.
    +-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
    ++_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
    + 
    +-# Symbols that must always be exported.
    +-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
    ++# save warnings/boilerplate of simple test code
    ++_LT_COMPILER_BOILERPLATE
    ++_LT_LINKER_BOILERPLATE
    + 
    +-ifelse([$1],[],
    +-[# ### END LIBTOOL CONFIG],
    +-[# ### END LIBTOOL TAG CONFIG: $tagname])
    ++## 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])
    + 
    +-__EOF__
    ++  AC_MSG_CHECKING([whether to build shared libraries])
    ++  test "$can_build_shared" = "no" && enable_shared=no
    + 
    +-ifelse([$1],[], [
    ++  # On AIX, shared libraries and static libraries use the same namespace, and
    ++  # are all built from PIC.
    +   case $host_os in
    +   aix3*)
    +-    cat <<\EOF >> "$cfgfile"
    ++    test "$enable_shared" = yes && enable_static=no
    ++    if test -n "$RANLIB"; then
    ++      archive_cmds="$archive_cmds~\$RANLIB \$lib"
    ++      postinstall_cmds='$RANLIB $lib'
    ++    fi
    ++    ;;
    + 
    +-# 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
    +-EOF
    ++  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])
    + 
    +-  # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
    ++  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])
    + 
    +-  mv -f "$cfgfile" "$ofile" || \
    +-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
    +-  chmod +x "$ofile"
    +-])
    +-else
    +-  # If there is no Makefile yet, we rely on a make rule to execute
    +-  # `config.status --recheck' to rerun these tests and create the
    +-  # libtool script then.
    +-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
    +-  if test -f "$ltmain_in"; then
    +-    test -f Makefile && make "$ltmain"
    +-  fi
    ++  _LT_CONFIG($1)
    + fi
    +-])# AC_LIBTOOL_CONFIG
    +-
    +-
    +-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
    +-# -------------------------------------------
    +-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
    +-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
    +-
    +-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
    ++AC_LANG_POP
    ++CC="$lt_save_CC"
    ++])# _LT_LANG_C_CONFIG
    + 
    +-if test "$GCC" = yes; then
    +-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
    + 
    +-  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
    +-    lt_cv_prog_compiler_rtti_exceptions,
    +-    [-fno-rtti -fno-exceptions], [],
    +-    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
    ++# _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
    +-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
    ++popdef([AC_MSG_ERROR])
    ++])# _LT_PROG_CXX
    + 
    ++dnl aclocal-1.4 backwards compatibility:
    ++dnl AC_DEFUN([_LT_PROG_CXX], [])
    + 
    +-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
    +-# ---------------------------------
    +-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
    +-[AC_REQUIRE([AC_CANONICAL_HOST])
    +-AC_REQUIRE([AC_PROG_NM])
    +-AC_REQUIRE([AC_OBJEXT])
    +-# 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]]*\)'
    ++# _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
    + 
    +-# Transform an extracted symbol line into a proper C declaration
    +-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
    ++# Source file extension for C++ test sources.
    ++ac_ext=cpp
    + 
    +-# 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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
    ++# Object file extension for compiled C++ test sources.
    ++objext=o
    ++_LT_TAGVAR(objext, $1)=$objext
    + 
    +-# Define system-specific variables.
    +-case $host_os in
    +-aix*)
    +-  symcode='[[BCDT]]'
    +-  ;;
    +-cygwin* | mingw* | pw32*)
    +-  symcode='[[ABCDGISTW]]'
    +-  ;;
    +-hpux*) # Its linker distinguishes data from code symbols
    +-  if test "$host_cpu" = ia64; then
    +-    symcode='[[ABCDEGRST]]'
    ++# 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
    +-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
    +-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
    +-  ;;
    +-linux*)
    +-  if test "$host_cpu" = ia64; then
    +-    symcode='[[ABCDGIRSTW]]'
    +-    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
    +-    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
    ++  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
    +-  ;;
    +-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
    +-
    +-# 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
    +-
    +-# If we're using GNU nm, then use its standard symbol codes.
    +-case `$NM -V 2>&1` in
    +-*GNU* | *'with BFD'*)
    +-  symcode='[[ABCDGIRSTW]]' ;;
    +-esac
    +-
    +-# Try without a prefix undercore, 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.
    +-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    +-
    +-  # Check to see that the pipe works correctly.
    +-  pipe_works=no
    +-
    +-  rm -f conftest*
    +-  cat > conftest.$ac_ext < $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 < conftest.$ac_ext
    +-#ifdef __cplusplus
    +-extern "C" {
    +-#endif
    +-
    +-EOF
    +-	  # Now generate the symbol file.
    +-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
    +-
    +-	  cat <> conftest.$ac_ext
    +-#if defined (__STDC__) && __STDC__
    +-# define lt_ptr_t void *
    +-#else
    +-# define lt_ptr_t char *
    +-# define const
    +-#endif
    +-
    +-/* The mapping between symbol names and symbols. */
    +-const struct {
    +-  const char *name;
    +-  lt_ptr_t address;
    +-}
    +-lt_preloaded_symbols[[]] =
    +-{
    +-EOF
    +-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
    +-	  cat <<\EOF >> conftest.$ac_ext
    +-  {0, (lt_ptr_t) 0}
    +-};
    ++  test -z "${LDCXX+set}" || LD=$LDCXX
    ++  CC=${CXX-"c++"}
    ++  compiler=$CC
    ++  _LT_TAGVAR(compiler, $1)=$CC
    ++  _LT_CC_BASENAME([$compiler])
    + 
    +-#ifdef __cplusplus
    +-}
    +-#endif
    +-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_AC_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
    ++  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
    +-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
    ++      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
    +     fi
    +-  else
    +-    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
    +-    cat conftest.$ac_ext >&5
    +-  fi
    +-  rm -f 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
    +-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
    + 
    ++    if test "$GXX" = yes; then
    ++      # Set up default GNU C++ configuration
    + 
    +-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
    +-# ---------------------------------------
    +-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
    +-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
    +-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
    ++      LT_PATH_LD
    + 
    +-AC_MSG_CHECKING([for $compiler option to produce PIC])
    +- ifelse([$1],[CXX],[
    +-  # C++ specific cases for pic, static, wl, etc.
    +-  if test "$GXX" = yes; then
    +-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
    ++      # 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=
    + 
    +-    case $host_os in
    +-    aix*)
    +-      # All AIX code is PIC.
    +-      if test "$host_cpu" = ia64; then
    +-	# AIX 5 now supports IA64 processor
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      fi
    +-      ;;
    +-    amigaos*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
    +-      ;;
    +-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    +-      # PIC is the default for these OSes.
    +-      ;;
    +-    mingw* | cygwin* | os2* | pw32*)
    +-      # 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
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
    +-      ;;
    +-    *djgpp*)
    +-      # DJGPP does not support shared libraries at all
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-      ;;
    +-    interix3*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
    ++        # 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
    +-      ;;
    +-    hpux*)
    +-      # 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*)
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    +-	;;
    +-      esac
    +-      ;;
    +-    *)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    +-      ;;
    +-    esac
    +-  else
    ++
    ++      # 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
    +-      aix4* | aix5*)
    +-	# All AIX code is PIC.
    +-	if test "$host_cpu" = ia64; then
    +-	  # AIX 5 now supports IA64 processor
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    ++      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
    ++
    ++        # 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_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
    ++	  _LT_TAGVAR(ld_shlibs, $1)=no
    + 	fi
    + 	;;
    ++
    +       chorus*)
    +-	case $cc_basename in
    +-	cxch68*)
    +-	  # Green Hills C++ Compiler
    +-	  # _LT_AC_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"
    ++        case $cc_basename in
    ++          *)
    ++	  # FIXME: insert proper C++ library support
    ++	  _LT_TAGVAR(ld_shlibs, $1)=no
    + 	  ;;
    +-	esac
    ++        esac
    ++        ;;
    ++
    ++      cygwin* | mingw* | pw32*)
    ++        # _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)
    + 	;;
    +-       darwin*)
    +-         # PIC is the default on this platform
    +-         # Common symbols not allowed in MH_DYLIB files
    +-         case $cc_basename in
    +-           xlc*)
    +-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
    +-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-           ;;
    +-         esac
    +-       ;;
    ++
    +       dgux*)
    +-	case $cc_basename in
    +-	  ec++*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    ++        case $cc_basename in
    ++          ec++*)
    ++	    # FIXME: insert proper C++ library support
    ++	    _LT_TAGVAR(ld_shlibs, $1)=no
    + 	    ;;
    +-	  ghcx*)
    ++          ghcx*)
    + 	    # Green Hills C++ Compiler
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    ++	    # 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* | kfreebsd*-gnu | dragonfly*)
    +-	# FreeBSD uses GNU C++
    +-	;;
    +-      hpux9* | hpux10* | hpux11*)
    +-	case $cc_basename in
    +-	  CC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
    +-	    if test "$host_cpu" != ia64; then
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
    +-	    fi
    ++        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*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
    ++          aCC*)
    + 	    case $host_cpu in
    +-	    hppa*64*|ia64*)
    +-	      # +Z the default
    +-	      ;;
    +-	    *)
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
    +-	      ;;
    ++	      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*)
    +-	# 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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-	    # CC pic flag -KPIC is the default.
    ++        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
    +-	;;
    +-      linux*)
    +-	case $cc_basename in
    +-	  KCC*)
    +-	    # KAI C++ Compiler
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    ++        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*)
    ++	  icpc* | ecpc* )
    + 	    # Intel C++
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
    +-	    ;;
    +-	  pgCC*)
    +-	    # Portland Group C++ compiler.
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
    +-	    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    ++	    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'
    + 	    ;;
    +-	  *)
    +-	    case `$CC -V 2>&1 | sed 5q` in
    +-	    *Sun\ C*)
    +-	      # Sun C++ 5.9
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
    ++          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
    +-	    ;;
    +-	esac
    +-	;;
    +-      lynxos*)
    +-	;;
    +-      m88k*)
    +-	;;
    +-      mvs*)
    +-	case $cc_basename in
    +-	  cxx*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      netbsd*)
    +-	;;
    +-      osf3* | osf4* | osf5*)
    +-	case $cc_basename in
    +-	  KCC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
    +-	    ;;
    +-	  RCC*)
    +-	    # Rational C++ 2.4.1
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    ;;
    ++
    ++	    _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*)
    +-	    # Digital/Compaq C++
    +-	    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-	    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
    +-	    ;;
    +-	  gcx*)
    +-	    # Green Hills C++ Compiler
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      sunos4*)
    +-	case $cc_basename in
    +-	  CC*)
    +-	    # Sun C++ 4.x
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	    ;;
    +-	  lcc*)
    +-	    # Lucid
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    ;;
    +-	  *)
    ++	    # 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'
    + 	    ;;
    +-	esac
    +-	;;
    +-      tandem*)
    +-	case $cc_basename in
    +-	  NCC*)
    +-	    # NonStop-UX NCC 3.20
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    ++	  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
    + 	;;
    +-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
    +-	case $cc_basename in
    +-	  CC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    ++
    ++      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
    + 	;;
    +-      vxworks*)
    ++
    ++      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::"'
    + 	;;
    +-      *)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    ++
    ++      *nto* | *qnx*)
    ++        _LT_TAGVAR(ld_shlibs, $1)=yes
    + 	;;
    +-    esac
    +-  fi
    +-],
    +-[
    +-  if test "$GCC" = yes; then
    +-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      fi
    +-      ;;
    ++      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
    ++	;;
    + 
    +-    amigaos*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
    +-      ;;
    ++      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
    + 
    +-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    +-      # PIC is the default for these OSes.
    +-      ;;
    ++	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
    + 
    +-    mingw* | cygwin* | pw32* | os2*)
    +-      # 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
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
    +-      ;;
    ++	    # 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
    ++        ;;
    + 
    +-    darwin* | rhapsody*)
    +-      # PIC is the default on this platform
    +-      # Common symbols not allowed in MH_DYLIB files
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
    +-      ;;
    ++      psos*)
    ++        # FIXME: insert proper C++ library support
    ++        _LT_TAGVAR(ld_shlibs, $1)=no
    ++        ;;
    + 
    +-    interix3*)
    +-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
    +-      # Instead, we relocate shared libraries at runtime.
    +-      ;;
    ++      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
    ++        ;;
    + 
    +-    msdosdjgpp*)
    +-      # Just because we use GCC doesn't mean we suddenly get shared libraries
    +-      # on systems that don't support them.
    +-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-      enable_shared=no
    +-      ;;
    ++      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
    + 
    +-    sysv4*MP*)
    +-      if test -d /usr/nec; then
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
    +-      fi
    +-      ;;
    ++	    output_verbose_link_cmd='echo'
    + 
    +-    hpux*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    +-	;;
    +-      esac
    +-      ;;
    ++	    # 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'
    + 
    +-    *)
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      if test "$host_cpu" = ia64; then
    +-	# AIX 5 now supports IA64 processor
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      else
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
    +-      fi
    +-      ;;
    +-      darwin*)
    +-        # PIC is the default on this platform
    +-        # Common symbols not allowed in MH_DYLIB files
    +-       case $cc_basename in
    +-         xlc*)
    +-         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
    +-         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-         ;;
    +-       esac
    +-       ;;
    ++	    # 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
    ++        ;;
    + 
    +-    mingw* | cygwin* | pw32* | os2*)
    +-      # 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
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
    +-      ;;
    ++    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'
    + 
    +-    hpux9* | hpux10* | hpux11*)
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
    +-	;;
    ++      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
    +-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
    +       ;;
    + 
    +-    irix5* | irix6* | nonstopux*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      # PIC (with -KPIC) is the default.
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-      ;;
    ++      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'
    + 
    +-    newsos6)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    ++	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
    +       ;;
    + 
    +-    linux*)
    +-      case $cc_basename in
    +-      icc* | ecc*)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	_LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-        ;;
    +-      ccc*)
    +-        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-        # All Alpha code is PIC.
    +-        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    ++      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
    +         ;;
    +-      como)
    +-        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-lopt='
    ++
    ++      vxworks*)
    ++        # FIXME: insert proper C++ library support
    ++        _LT_TAGVAR(ld_shlibs, $1)=no
    +         ;;
    ++
    +       *)
    +-        case `$CC -V 2>&1 | sed 5q` in
    +-	*Sun\ C*)
    +-	  # Sun C 5.9
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	  ;;
    +-	*Sun\ F*)
    +-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
    +-	  ;;
    +-	esac
    +-	;;
    +-      esac
    +-      ;;
    ++        # FIXME: insert proper C++ library support
    ++        _LT_TAGVAR(ld_shlibs, $1)=no
    ++        ;;
    ++    esac
    + 
    +-    osf3* | osf4* | osf5*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      # All OSF/1 code is PIC.
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-      ;;
    ++    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
    ++    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
    + 
    +-    solaris*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      case $cc_basename in
    +-      f77* | f90* | f95*)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
    +-      *)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
    +-      esac
    +-      ;;
    ++    _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
    + 
    +-    sunos4*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    ++  for p in `eval "$output_verbose_link_cmd"`; do
    ++    case $p in
    + 
    +-    sysv4 | sysv4.2uw2* | sysv4.3*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    ++    -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
    + 
    +-    sysv4*MP*)
    +-      if test -d /usr/nec ;then
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      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
    ++       ;;
    + 
    +-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    ++    *.$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
    + 
    +-    unicos*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-      ;;
    ++       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
    ++       ;;
    + 
    +-    uts4*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    ++    *) ;; # Ignore the rest.
    + 
    +-    *)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-      ;;
    +     esac
    +-  fi
    +-])
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
    ++  done
    + 
    +-#
    +-# Check to make sure the PIC flag actually works.
    +-#
    +-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
    +-  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
    +-    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
    +-    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
    +-     "" | " "*) ;;
    +-     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
    +-     esac],
    +-    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
    ++  # Clean up.
    ++  rm -f a.out a.exe
    ++else
    ++  echo "libtool.m4: error: problem compiling $1 test program"
    + fi
    +-case $host_os in
    +-  # For platforms which do not support PIC, -DPIC is meaningless:
    +-  *djgpp*)
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-    ;;
    +-  *)
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
    +-    ;;
    +-esac
    +-
    +-#
    +-# Check to make sure the static flag actually works.
    +-#
    +-wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
    +-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
    +-  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
    +-  $lt_tmp_static_flag,
    +-  [],
    +-  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
    +-])
    + 
    ++$RM -f confest.$objext
    + 
    +-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
    +-# ------------------------------------
    +-# See if the linker supports building shared libraries.
    +-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
    +-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
    +-ifelse([$1],[CXX],[
    +-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
    +-  case $host_os in
    +-  aix4* | aix5*)
    +-    # 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_AC_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_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
    +-  ;;
    +-  cygwin* | mingw*)
    +-    _LT_AC_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_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
    ++# 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)=
    +   ;;
    +-  esac
    +-],[
    +-  runpath_var=
    +-  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
    +-  _LT_AC_TAGVAR(archive_cmds, $1)=
    +-  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
    +-  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
    +-  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
    +-  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
    +-  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
    +-  _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
    +-  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
    +-  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
    +-  _LT_AC_TAGVAR(module_cmds, $1)=
    +-  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
    +-  _LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
    +-  # include_expsyms should be a list of space-separated symbols to be *always*
    +-  # included in the symbol list
    +-  _LT_AC_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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
    +-  # 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.
    +-  extract_expsyms_cmds=
    +-  # Just being paranoid about ensuring that cc_basename is set.
    +-  _LT_CC_BASENAME([$compiler])
    +-  case $host_os in
    +-  cygwin* | mingw* | pw32*)
    +-    # 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
    +-    _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
    +-      else
    +-  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-    fi
    +-    supports_anon_versioning=no
    +-    case `$LD -v 2>/dev/null` 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
    +-    aix3* | aix4* | aix5*)
    +-      # On AIX/PPC, the GNU linker is very broken
    +-      if test "$host_cpu" != ia64; then
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	cat <&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.
    +-
    +-EOF
    +-      fi
    +-      ;;
    + 
    +-    amigaos*)
    +-      _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-
    +-      # Samuel A. Falvo II  reports
    +-      # that the semantics of dynamic libraries on AmigaOS, at least up
    +-      # to version 4, is to share data among multiple programs linked
    +-      # with the same dynamic library.  Since this doesn't match the
    +-      # behavior of shared libraries on other platforms, we can't use
    +-      # them.
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    ++linux*)
    ++  case `$CC -V 2>&1 | sed 5q` in
    ++  *Sun\ C*)
    ++    # Sun C++ 5.9
    + 
    +-    beos*)
    +-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-	# Joseph Beckenbach  says some releases of gcc
    +-	# support --undefined.  This deserves some investigation.  FIXME
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-      else
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    ++    # 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
    + 
    +-    cygwin* | mingw* | pw32*)
    +-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
    +-      # as there is no search path for DLLs.
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      _LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
    +-      _LT_AC_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_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    ++    if test "$solaris_use_stlport4" != yes; then
    ++      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
    ++    fi
    ++    ;;
    ++  esac
    ++  ;;
    + 
    +-    interix3*)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-      _LT_AC_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_AC_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_AC_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'
    ++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
    + 
    +-    linux*)
    +-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	tmp_addflag=
    +-	case $cc_basename,$host_cpu in
    +-	pgcc*)				# Portland Group C compiler
    +-	  _LT_AC_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_AC_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' ;;
    +-	esac
    +-	case `$CC -V 2>&1 | sed 5q` in
    +-	*Sun\ C*)			# Sun C 5.9
    +-	  _LT_AC_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 /dev/null'
    +-	  tmp_sharedflag='-G' ;;
    +-	*Sun\ F*)			# Sun Fortran 8.3
    +-	  tmp_sharedflag='-G' ;;
    +-	*)
    +-	  tmp_sharedflag='-shared' ;;
    +-	esac
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    ++    # 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
    ++])
    + 
    +-	if test $supports_anon_versioning = yes; then
    +-	  _LT_AC_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
    +-      else
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    ++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
    + 
    +-    netbsd*)
    +-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
    +-	wlarc=
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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
    +-      ;;
    ++dnl aclocal-1.4 backwards compatibility:
    ++dnl AC_DEFUN([_LT_PROG_F77], [])
    + 
    +-    solaris*)
    +-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	cat <&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_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)
    + 
    +-EOF
    +-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    ++_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
    + 
    +-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
    +-      case `$LD -v 2>&1` in
    +-        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	cat <<_LT_EOF 1>&2
    ++# Source file extension for f77 test sources.
    ++ac_ext=f
    + 
    +-*** 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.
    ++# Object file extension for compiled f77 test sources.
    ++objext=o
    ++_LT_TAGVAR(objext, $1)=$objext
    + 
    +-_LT_EOF
    +-	;;
    +-	*)
    +-	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
    +-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
    +-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
    +-	  else
    +-	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	  fi
    +-	;;
    +-      esac
    +-      ;;
    ++# 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
    ++"
    + 
    +-    sunos4*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
    +-      wlarc=
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++  # Code to be used in simple link tests
    ++  lt_simple_link_test_code="\
    ++      program t
    ++      end
    ++"
    + 
    +-    *)
    +-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-    esac
    ++  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
    ++  _LT_TAG_COMPILER
    + 
    +-    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
    +-      runpath_var=
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-      _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
    +-      _LT_AC_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_AC_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_AC_TAGVAR(hardcode_direct, $1)=unsupported
    +-      fi
    +-      ;;
    ++  # 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])
    + 
    +-    aix4* | aix5*)
    +-      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_AC_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_AC_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'
    ++    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
    +-	aix_use_runtimelinking=no
    ++        ;;
    ++    esac
    ++    AC_MSG_RESULT([$enable_shared])
    + 
    +-	# 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]].*|aix5*)
    +-	  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
    ++    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
    + 
    +-	exp_sym_flag='-bexport'
    +-	no_entry_flag='-bnoentry'
    +-      fi
    ++AC_LANG_POP
    ++])# _LT_LANG_F77_CONFIG
    + 
    +-      # 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_AC_TAGVAR(archive_cmds, $1)=''
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    ++# _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
    + 
    +-      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
    +-  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	  else
    +-  	  # We have old collect2
    +-  	  _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-  	  _LT_AC_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
    ++dnl aclocal-1.4 backwards compatibility:
    ++dnl AC_DEFUN([_LT_PROG_FC], [])
    + 
    +-      # It seems that -bexpall does not export symbols beginning with
    +-      # underscore (_), so it is better to generate a list of symbols to export.
    +-      _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
    +-       # Determine the default libpath from the value encoded in an empty executable.
    +-       _LT_AC_SYS_LIBPATH_AIX
    +-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
    +-	_LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
    +-       else
    +-	if test "$host_cpu" = ia64; then
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
    +-	  _LT_AC_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_AC_SYS_LIBPATH_AIX
    +-	 _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
    +-	  # Exported symbols can be pulled into shared objects from archives
    +-	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
    +-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-	  # This is similar to how AIX traditionally builds its shared libraries.
    +-	  _LT_AC_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*)
    +-      _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      # see comment about different semantics on the GNU ld section
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    ++# _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
    + 
    +-    bsdi[[45]]*)
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
    +-      ;;
    ++# Source file extension for fc test sources.
    ++ac_ext=${ac_fc_srcext-f}
    + 
    +-    cygwin* | mingw* | pw32*)
    +-      # 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
    +-      _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
    +-      # The linker will automatically build a .lib file if we build a DLL.
    +-      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
    +-      # FIXME: Should let the user specify the lib program.
    +-      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
    +-      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
    +-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
    +-      ;;
    ++# Object file extension for compiled fc test sources.
    ++objext=o
    ++_LT_TAGVAR(objext, $1)=$objext
    + 
    +-    darwin* | rhapsody*)
    +-      case $host_os in
    +-        rhapsody* | darwin1.[[012]])
    +-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
    +-         ;;
    +-       *) # Darwin 1.3 on
    +-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
    +-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-         else
    +-           case ${MACOSX_DEPLOYMENT_TARGET} in
    +-             10.[[012]])
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-               ;;
    +-             10.*)
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
    +-               ;;
    +-           esac
    +-         fi
    +-         ;;
    +-      esac
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-    if test "$GCC" = yes ; then
    +-    	output_verbose_link_cmd='echo'
    +-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
    +-      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-    else
    +-      case $cc_basename in
    +-        xlc*)
    +-         output_verbose_link_cmd='echo'
    +-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
    +-         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          ;;
    +-       *)
    +-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-          ;;
    +-      esac
    +-    fi
    +-      ;;
    ++# 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
    ++"
    + 
    +-    dgux*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++  # Code to be used in simple link tests
    ++  lt_simple_link_test_code="\
    ++      program t
    ++      end
    ++"
    + 
    +-    freebsd1*)
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    ++  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
    ++  _LT_TAG_COMPILER
    + 
    +-    # 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_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++  # 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
    + 
    +-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
    +-    freebsd2*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++  _LT_TAGVAR(compiler, $1)=$CC
    ++  _LT_CC_BASENAME([$compiler])
    + 
    +-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
    +-    freebsd* | kfreebsd*-gnu | dragonfly*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++  if test -n "$compiler"; then
    ++    AC_MSG_CHECKING([if libtool supports shared libraries])
    ++    AC_MSG_RESULT([$can_build_shared])
    + 
    +-    hpux9*)
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    ++    AC_MSG_CHECKING([whether to build shared libraries])
    ++    test "$can_build_shared" = "no" && enable_shared=no
    + 
    +-      # hardcode_minus_L: Not really in the search PATH,
    +-      # but as the default location of the library.
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-      ;;
    ++    # 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])
    + 
    +-    hpux10*)
    +-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    ++    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
    + 
    +-	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    ++AC_LANG_POP
    ++])# _LT_LANG_FC_CONFIG
    + 
    +-	# hardcode_minus_L: Not really in the search PATH,
    +-	# but as the default location of the library.
    +-	_LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	ia64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	*)
    +-	  _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	ia64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	*)
    +-	  _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    ++# _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
    + 
    +-	case $host_cpu in
    +-	hppa*64*|ia64*)
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-	  ;;
    +-	*)
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    ++# Source file extension for Java test sources.
    ++ac_ext=java
    + 
    +-	  # hardcode_minus_L: Not really in the search PATH,
    +-	  # but as the default location of the library.
    +-	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-	  ;;
    +-	esac
    +-      fi
    +-      ;;
    ++# Object file extension for compiled Java test sources.
    ++objext=o
    ++_LT_TAGVAR(objext, $1)=$objext
    + 
    +-    irix5* | irix6* | nonstopux*)
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-      ;;
    ++# Code to be used in simple compile tests
    ++lt_simple_compile_test_code="class foo {}"
    + 
    +-    netbsd*)
    +-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++# Code to be used in simple link tests
    ++lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
    + 
    +-    newsos6)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++# 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])
    + 
    +-    openbsd*)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-      else
    +-       case $host_os in
    +-	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
    +-	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
    +-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-	   ;;
    +-	 *)
    +-	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
    +-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	   ;;
    +-       esac
    +-      fi
    +-      ;;
    ++# GCJ did not exist at the time GCC didn't implicitly link libc in.
    ++_LT_TAGVAR(archive_cmds_need_lc, $1)=no
    + 
    +-    os2*)
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
    +-      ;;
    ++_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
    + 
    +-    osf3*)
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-      else
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      ;;
    ++## 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)
    + 
    +-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      else
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_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~
    +-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
    ++  _LT_CONFIG($1)
    ++fi
    + 
    +-	# Both c and cxx compiler support -rpath directly
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      ;;
    ++AC_LANG_RESTORE
    + 
    +-    solaris*)
    +-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
    +-      if test "$GCC" = yes; then
    +-	wlarc='${wl}'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
    +-      else
    +-	wlarc=''
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	_LT_AC_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'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      case $host_os in
    +-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
    +-      *)
    +- 	# The compiler driver will combine linker options so we
    +- 	# cannot just pass the convience library names through
    +- 	# without $wl, iff we do not link with $LD.
    +- 	# Luckily, gcc supports the same syntax we need for Sun Studio.
    +- 	# Supported since Solaris 2.6 (maybe 2.5.1?)
    +- 	case $wlarc in
    +- 	'')
    +- 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
    +- 	*)
    +- 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
    +- 	esac ;;
    +-      esac
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-      ;;
    ++GCC=$lt_save_GCC
    ++CC="$lt_save_CC"
    ++])# _LT_LANG_GCJ_CONFIG
    + 
    +-    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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    + 
    +-    sysv4)
    +-      case $host_vendor in
    +-	sni)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
    +-	;;
    +-	siemens)
    +-	  ## LD is ld it makes a PLAMLIB
    +-	  ## CC just makes a GrossModule.
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
    +-	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-        ;;
    +-	motorola)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
    +-	;;
    +-      esac
    +-      runpath_var='LD_RUN_PATH'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++# _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
    + 
    +-    sysv4.3*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
    +-      ;;
    ++# Source file extension for RC test sources.
    ++ac_ext=rc
    + 
    +-    sysv4*MP*)
    +-      if test -d /usr/nec; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-	runpath_var=LD_RUN_PATH
    +-	hardcode_runpath_var=yes
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
    +-      fi
    +-      ;;
    ++# Object file extension for compiled RC test sources.
    ++objext=o
    ++_LT_TAGVAR(objext, $1)=$objext
    + 
    +-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
    +-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      runpath_var='LD_RUN_PATH'
    ++# Code to be used in simple compile tests
    ++lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
    + 
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      fi
    +-      ;;
    ++# Code to be used in simple link tests
    ++lt_simple_link_test_code="$lt_simple_compile_test_code"
    + 
    +-    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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
    +-      runpath_var='LD_RUN_PATH'
    ++# ltmain only uses $CC for tagged configurations so make sure $CC is set.
    ++_LT_TAG_COMPILER
    + 
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      fi
    +-      ;;
    ++# save warnings/boilerplate of simple test code
    ++_LT_COMPILER_BOILERPLATE
    ++_LT_LINKER_BOILERPLATE
    + 
    +-    uts4*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++# 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
    + 
    +-    *)
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    +-    esac
    +-  fi
    +-])
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
    +-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
    ++if test -n "$compiler"; then
    ++  :
    ++  _LT_CONFIG($1)
    ++fi
    + 
    +-#
    +-# Do we need to explicitly link libc?
    +-#
    +-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
    +-x|xyes)
    +-  # Assume -lc should be added
    +-  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    ++GCC=$lt_save_GCC
    ++AC_LANG_RESTORE
    ++CC="$lt_save_CC"
    ++])# _LT_LANG_RC_CONFIG
    + 
    +-  if test "$enable_shared" = yes && test "$GCC" = yes; then
    +-    case $_LT_AC_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*
    +-      printf "$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_AC_TAGVAR(lt_prog_compiler_wl, $1)
    +-	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
    +-        compiler_flags=-v
    +-        linker_flags=-v
    +-        verstring=
    +-        output_objdir=.
    +-        libname=conftest
    +-        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
    +-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
    +-        then
    +-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-        else
    +-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-        fi
    +-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
    +-      else
    +-        cat conftest.err 1>&5
    +-      fi
    +-      $rm conftest*
    +-      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
    +-      ;;
    +-    esac
    +-  fi
    +-  ;;
    +-esac
    +-])# AC_LIBTOOL_PROG_LD_SHLIBS
    ++# 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_AC_FILE_LTDLL_C
    +-# -------------------
    +-# Be careful that the start marker always follows a newline.
    +-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
    +-# /* ltdll.c starts here */
    +-# #define WIN32_LEAN_AND_MEAN
    +-# #include 
    +-# #undef WIN32_LEAN_AND_MEAN
    +-# #include 
    +-#
    +-# #ifndef __CYGWIN__
    +-# #  ifdef __CYGWIN32__
    +-# #    define __CYGWIN__ __CYGWIN32__
    +-# #  endif
    +-# #endif
    +-#
    +-# #ifdef __cplusplus
    +-# extern "C" {
    +-# #endif
    +-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
    +-# #ifdef __cplusplus
    +-# }
    +-# #endif
    +-#
    +-# #ifdef __CYGWIN__
    +-# #include 
    +-# DECLARE_CYGWIN_DLL( DllMain );
    +-# #endif
    +-# HINSTANCE __hDllInstance_base;
    +-#
    +-# BOOL APIENTRY
    +-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
    +-# {
    +-#   __hDllInstance_base = hInst;
    +-#   return TRUE;
    +-# }
    +-# /* ltdll.c ends here */
    +-])# _LT_AC_FILE_LTDLL_C
    + 
    ++# LT_PROG_RC
    ++# ----------
    ++AC_DEFUN([LT_PROG_RC],
    ++[AC_CHECK_TOOL(RC, windres,)
    ++])
    + 
    +-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
    +-# ---------------------------------
    +-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
    ++# Old name:
    ++AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
    ++dnl aclocal-1.4 backwards compatibility:
    ++dnl AC_DEFUN([LT_AC_PROG_RC], [])
    + 
    + 
    +-# old names
    +-AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
    +-AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
    +-AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
    +-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
    +-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
    +-AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
    +-AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
    +-
    +-# This is just to silence aclocal about the macro not being used
    +-ifelse([AC_DISABLE_FAST_INSTALL])
    +-
    +-AC_DEFUN([LT_AC_PROG_GCJ],
    +-[AC_CHECK_TOOL(GCJ, gcj, no)
    +-  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
    +-  AC_SUBST(GCJFLAGS)
    ++# _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])
    + ])
    + 
    +-AC_DEFUN([LT_AC_PROG_RC],
    +-[AC_CHECK_TOOL(RC, windres, no)
    +-])
    + 
    ++# _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.                               #
    + ############################################################
    +-# LT_AC_PROG_SED
    +-# --------------
    +-# Check for a fully-functional sed program, that truncates
    +-# as few characters as possible.  Prefer GNU sed if found.
    +-AC_DEFUN([LT_AC_PROG_SED],
    ++
    ++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.
    +@@ -6435,6 +7010,7 @@ do
    +     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
    +@@ -6467,5 +7043,268 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xp
    + 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
    + ])
    +--- a/m4/libtool.m4
    ++++ b/m4/libtool.m4
    +@@ -1,107 +1,186 @@
    + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
    +-## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
    +-## Free Software Foundation, Inc.
    +-## Originally 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.
    +-
    +-# serial 48 AC_PROG_LIBTOOL
    +-
    +-
    +-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
    +-# -----------------------------------------------------------
    +-# If this macro is not defined by Autoconf, define it here.
    +-m4_ifdef([AC_PROVIDE_IFELSE],
    +-         [],
    +-         [m4_define([AC_PROVIDE_IFELSE],
    +-	         [m4_ifdef([AC_PROVIDE_$1],
    +-		           [$2], [$3])])])
    ++#
    ++#   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
    + 
    +-# AC_PROG_LIBTOOL
    +-# ---------------
    +-AC_DEFUN([AC_PROG_LIBTOOL],
    +-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
    +-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
    +-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
    +-  AC_PROVIDE_IFELSE([AC_PROG_CXX],
    +-    [AC_LIBTOOL_CXX],
    +-    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
    +-  ])])
    +-dnl And a similar setup for Fortran 77 support
    +-  AC_PROVIDE_IFELSE([AC_PROG_F77],
    +-    [AC_LIBTOOL_F77],
    +-    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
    +-])])
    +-
    +-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
    +-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
    +-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
    +-  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
    +-    [AC_LIBTOOL_GCJ],
    +-    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
    +-      [AC_LIBTOOL_GCJ],
    +-      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
    +-	[AC_LIBTOOL_GCJ],
    +-      [ifdef([AC_PROG_GCJ],
    +-	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
    +-       ifdef([A][M_PROG_GCJ],
    +-	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
    +-       ifdef([LT_AC_PROG_GCJ],
    +-	     [define([LT_AC_PROG_GCJ],
    +-		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
    +-])])# AC_PROG_LIBTOOL
    + 
    ++# 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])])
    + 
    +-# _AC_PROG_LIBTOOL
    +-# ----------------
    +-AC_DEFUN([_AC_PROG_LIBTOOL],
    +-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
    +-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
    +-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
    +-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
    ++
    ++# _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="$ac_aux_dir/ltmain.sh"
    ++LIBTOOL_DEPS="$ltmain"
    + 
    + # Always use our own libtool.
    +-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
    ++LIBTOOL='$(SHELL) $(top_builddir)'
    ++LIBTOOL="$LIBTOOL/$host_alias-libtool"
    + AC_SUBST(LIBTOOL)dnl
    + 
    +-# Prevent multiple expansion
    +-define([AC_PROG_LIBTOOL], [])
    +-])# _AC_PROG_LIBTOOL
    ++_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], [])
    + 
    +-# AC_LIBTOOL_SETUP
    +-# ----------------
    +-AC_DEFUN([AC_LIBTOOL_SETUP],
    +-[AC_PREREQ(2.50)dnl
    +-AC_REQUIRE([AC_ENABLE_SHARED])dnl
    +-AC_REQUIRE([AC_ENABLE_STATIC])dnl
    +-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
    +-AC_REQUIRE([AC_CANONICAL_HOST])dnl
    ++
    ++# _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([AC_PROG_LD])dnl
    +-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
    +-AC_REQUIRE([AC_PROG_NM])dnl
    +-
    ++AC_REQUIRE([LT_PATH_LD])dnl
    ++AC_REQUIRE([LT_PATH_NM])dnl
    ++dnl
    + AC_REQUIRE([AC_PROG_LN_S])dnl
    +-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
    +-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
    +-AC_REQUIRE([AC_OBJEXT])dnl
    +-AC_REQUIRE([AC_EXEEXT])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
    + 
    +-AC_LIBTOOL_SYS_MAX_CMD_LEN
    +-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
    +-AC_LIBTOOL_OBJDIR
    ++_LT_CHECK_OBJDIR
    + 
    +-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
    +-_LT_AC_PROG_ECHO_BACKSLASH
    ++m4_require([_LT_TAG_COMPILER])dnl
    ++_LT_PROG_ECHO_BACKSLASH
    + 
    + case $host_os in
    + aix3*)
    +@@ -117,6307 +196,6803 @@ esac
    + 
    + # Sed substitution that helps us do robust quoting.  It backslashifies
    + # metacharacters that are still active within double-quoted strings.
    +-Xsed='sed -e 1s/^X//'
    +-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
    ++sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
    + 
    + # Same as above, but do not quote variable references.
    +-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
    ++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'
    + 
    +-# Constants:
    +-rm="rm -f"
    +-
    + # Global variables:
    +-default_ofile=libtool
    ++ofile=${host_alias}-libtool
    + can_build_shared=yes
    + 
    + # All known linkers require a `.a' archive for static linking (except MSVC,
    + # which needs '.lib').
    + libext=a
    +-ltmain="$ac_aux_dir/ltmain.sh"
    +-ofile="$default_ofile"
    +-with_gnu_ld="$lt_cv_prog_gnu_ld"
    + 
    +-AC_CHECK_TOOL(AR, ar, false)
    +-AC_CHECK_TOOL(RANLIB, ranlib, :)
    +-AC_CHECK_TOOL(STRIP, strip, :)
    ++with_gnu_ld="$lt_cv_prog_gnu_ld"
    + 
    + old_CC="$CC"
    + old_CFLAGS="$CFLAGS"
    + 
    + # Set sane defaults for various variables
    +-test -z "$AR" && AR=ar
    +-test -z "$AR_FLAGS" && AR_FLAGS=cru
    +-test -z "$AS" && AS=as
    + test -z "$CC" && CC=cc
    + test -z "$LTCC" && LTCC=$CC
    + test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
    +-test -z "$DLLTOOL" && DLLTOOL=dlltool
    + test -z "$LD" && LD=ld
    +-test -z "$LN_S" && LN_S="ln -s"
    +-test -z "$MAGIC_CMD" && MAGIC_CMD=file
    +-test -z "$NM" && NM=nm
    +-test -z "$SED" && SED=sed
    +-test -z "$OBJDUMP" && OBJDUMP=objdump
    +-test -z "$RANLIB" && RANLIB=:
    +-test -z "$STRIP" && STRIP=:
    + test -z "$ac_objext" && ac_objext=o
    + 
    +-# Determine commands to create old-style static archives.
    +-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
    +-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_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
    +-    AC_PATH_MAGIC
    ++    _LT_PATH_MAGIC
    +   fi
    +   ;;
    + esac
    + 
    +-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
    +-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
    +-enable_win32_dll=yes, enable_win32_dll=no)
    +-
    +-AC_ARG_ENABLE([libtool-lock],
    +-    [AC_HELP_STRING([--disable-libtool-lock],
    +-	[avoid locking (might break parallel builds)])])
    +-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
    ++# 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
    + 
    +-AC_ARG_WITH([pic],
    +-    [AC_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=default
    + 
    +-# Use C for the default configuration in the libtool script
    +-tagname=
    +-AC_LIBTOOL_LANG_C_CONFIG
    +-_LT_AC_TAGCONFIG
    +-])# AC_LIBTOOL_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
    + 
    + 
    +-# _LT_AC_SYS_COMPILER
    +-# -------------------
    +-AC_DEFUN([_LT_AC_SYS_COMPILER],
    +-[AC_REQUIRE([AC_PROG_CC])dnl
    ++## ------------------------------------- ##
    ++## 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])
    ++])
    + 
    +-# If no C compiler was specified, use CC.
    +-LTCC=${LTCC-"$CC"}
    + 
    +-# If no C compiler flags were specified, use CFLAGS.
    +-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
    ++# _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], [[!?.]$], [], [.])
    ++)])
    + 
    +-# Allow CC to be a program name with arguments.
    +-compiler=$CC
    +-])# _LT_AC_SYS_COMPILER
    + 
    + 
    +-# _LT_CC_BASENAME(CC)
    +-# -------------------
    +-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
    +-AC_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-%%"`
    ++## ------------------------ ##
    ++## 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_COMPILER_BOILERPLATE
    +-# ------------------------
    +-# Check for compiler boilerplate output or warnings with
    +-# the simple compiler test code.
    +-AC_DEFUN([_LT_COMPILER_BOILERPLATE],
    +-[ac_outfile=conftest.$ac_objext
    +-printf "$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_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_LINKER_BOILERPLATE
    +-# ----------------------
    +-# Check for linker boilerplate output or warnings with
    +-# the simple link test code.
    +-AC_DEFUN([_LT_LINKER_BOILERPLATE],
    +-[ac_outfile=conftest.$ac_objext
    +-printf "$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 conftest*
    +-])# _LT_LINKER_BOILERPLATE
    + 
    ++# 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],
    ++[_$0(m4_quote(m4_default([$1], [[, ]])),
    ++     m4_quote(m4_if([$2], [],
    ++		     m4_quote(lt_decl_tag_varnames),
    ++		  m4_quote(m4_shift($@)))),
    ++     m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
    ++m4_define([_lt_decl_varnames_tagged], [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_AC_SYS_LIBPATH_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.
    +-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
    +-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
    +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
    +-}'`
    +-# 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 '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
    +-}'`; fi],[])
    +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
    +-])# _LT_AC_SYS_LIBPATH_AIX
    + 
    ++# _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_AC_SHELL_INIT(ARG)
    +-# ----------------------
    +-AC_DEFUN([_LT_AC_SHELL_INIT],
    +-[ifdef([AC_DIVERSION_NOTICE],
    +-	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
    +-	 [AC_DIVERT_PUSH(NOTICE)])
    +-$1
    +-AC_DIVERT_POP
    +-])# _LT_AC_SHELL_INIT
    + 
    ++# _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_AC_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.
    +-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
    +-[_LT_AC_SHELL_INIT([
    +-# Check that we are running under the correct shell.
    +-SHELL=${CONFIG_SHELL-/bin/sh}
    + 
    +-case X$ECHO in
    +-X*--fallback-echo)
    +-  # Remove one level of quotation (which was required for Make).
    +-  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
    +-  ;;
    +-esac
    ++# _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
    ++])
    + 
    +-echo=${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 </dev/null 2>&1 && unset CDPATH
    + 
    +-if test -z "$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 &&
    +-       echo_test_string=`eval $cmd` &&
    +-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
    +-    then
    +-      break
    +-    fi
    +-  done
    +-fi
    ++# _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)])])])
    + 
    +-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"
    ++# _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])])])])
    + 
    +-  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
    ++# _LT_TAGVAR(VARNAME, [TAGNAME])
    ++# ------------------------------
    ++m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
    + 
    +-	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.
    +-ECHO=$echo
    +-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
    +-   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
    +-fi
    ++# _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
    + 
    +-AC_SUBST(ECHO)
    +-])])# _LT_AC_PROG_ECHO_BACKSLASH
    + 
    ++# Initialize.
    ++m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
    ++[
    + 
    +-# _LT_AC_LOCK
    +-# -----------
    +-AC_DEFUN([_LT_AC_LOCK],
    +-[AC_ARG_ENABLE([libtool-lock],
    +-    [AC_HELP_STRING([--disable-libtool-lock],
    +-	[avoid locking (might break parallel builds)])])
    +-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
    ++# 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
    + 
    +-# 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"
    ++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\\"\\\`\\\\\\""
    +       ;;
    +-    *64-bit*)
    +-      LD="${LD-ld} -melf64bmip"
    ++    *)
    ++      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
    +       ;;
    +     esac
    +-   else
    +-    case `/usr/bin/file conftest.$ac_objext` in
    +-    *32-bit*)
    +-      LD="${LD-ld} -32"
    +-      ;;
    +-    *N32*)
    +-      LD="${LD-ld} -n32"
    ++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\\"\\\`\\\\\\""
    +       ;;
    +-    *64-bit*)
    +-      LD="${LD-ld} -64"
    ++    *)
    ++      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
    +       ;;
    +     esac
    +-   fi
    +-  fi
    +-  rm -rf conftest*
    ++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
    + 
    +-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|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-*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-*linux*)
    +-          LD="${LD-ld} -m elf_x86_64"
    +-          ;;
    +-        ppc*-*linux*|powerpc*-*linux*)
    +-          LD="${LD-ld} -m elf64ppc"
    +-          ;;
    +-        s390*-*linux*)
    +-          LD="${LD-ld} -m elf64_s390"
    +-          ;;
    +-        sparc*-*linux*)
    +-          LD="${LD-ld} -m elf64_sparc"
    +-          ;;
    +-      esac
    +-      ;;
    +-    esac
    +-  fi
    +-  rm -rf conftest*
    +-  ;;
    ++_LT_OUTPUT_LIBTOOL_INIT
    ++])
    + 
    +-*-*-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_TRY_LINK([],[],[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" ;;
    +-      *)    LD="${LD-ld} -64" ;;
    +-      esac
    +-      ;;
    +-    esac
    +-  fi
    +-  rm -rf conftest*
    +-  ;;
    + 
    +-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
    +-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
    +-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
    +-  AC_CHECK_TOOL(AS, as, false)
    +-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
    +-  ;;
    +-  ])
    +-esac
    ++# 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
    + 
    +-need_locks="$enable_libtool_lock"
    ++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."
    + 
    +-])# _LT_AC_LOCK
    ++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_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
    +-#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
    +-# ----------------------------------------------------------------
    +-# Check whether the given compiler option works
    +-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
    +-[AC_REQUIRE([LT_AC_PROG_SED])
    +-AC_CACHE_CHECK([$1], [$2],
    +-  [$2=no
    +-  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
    +-   printf "$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*
    +-])
    ++    *) AC_MSG_ERROR([unrecognized argument: $[1]
    ++Try \`$[0] --help' for more information.]) ;;
    ++  esac
    ++  shift
    ++done
    + 
    +-if test x"[$]$2" = xyes; then
    +-    ifelse([$5], , :, [$5])
    +-else
    +-    ifelse([$6], , :, [$6])
    ++if $lt_cl_silent; then
    ++  exec AS_MESSAGE_FD>/dev/null
    + fi
    +-])# AC_LIBTOOL_COMPILER_OPTION
    +-
    +-
    +-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
    +-#                          [ACTION-SUCCESS], [ACTION-FAILURE])
    +-# ------------------------------------------------------------
    +-# Check whether the given compiler option works
    +-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
    +-[AC_CACHE_CHECK([$1], [$2],
    +-  [$2=no
    +-   save_LDFLAGS="$LDFLAGS"
    +-   LDFLAGS="$LDFLAGS $3"
    +-   printf "$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 conftest*
    +-   LDFLAGS="$save_LDFLAGS"
    +-])
    ++_LTEOF
    + 
    +-if test x"[$]$2" = xyes; then
    +-    ifelse([$4], , :, [$4])
    +-else
    +-    ifelse([$5], , :, [$5])
    ++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
    +-])# AC_LIBTOOL_LINKER_OPTION
    +-
    ++])# LT_OUTPUT
    + 
    +-# AC_LIBTOOL_SYS_MAX_CMD_LEN
    +-# --------------------------
    +-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
    +-[# 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
    +-    ;;
    ++# _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
    + 
    +-  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;
    +-    ;;
    ++    cfgfile="${ofile}T"
    ++    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
    ++    $RM "$cfgfile"
    + 
    +-  cygwin* | mingw*)
    +-    # 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;
    +-    ;;
    ++    cat <<_LT_EOF >> "$cfgfile"
    ++#! $SHELL
    + 
    +-  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;
    +-    ;;
    ++# `$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
    + 
    +-  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`
    +-    ;;
    ++# ### BEGIN LIBTOOL CONFIG
    ++_LT_LIBTOOL_CONFIG_VARS
    ++_LT_LIBTOOL_TAG_VARS
    ++# ### END LIBTOOL CONFIG
    + 
    +-  interix*)
    +-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
    +-    lt_cv_sys_max_cmd_len=196608
    +-    ;;
    ++_LT_EOF
    + 
    +-  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
    +-    ;;
    +-  *)
    +-    # 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.
    +-    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
    +-    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
    +-	       = "XX$teststring") >/dev/null 2>&1 &&
    +-	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
    +-	    lt_cv_sys_max_cmd_len=$new_result &&
    +-	    test $i != 17 # 1/2 MB should be enough
    +-    do
    +-      i=`expr $i + 1`
    +-      teststring=$teststring$teststring
    +-    done
    +-    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`
    ++  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
    +-])
    +-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
    +-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
    + 
    ++  _LT_PROG_LTMAIN
    + 
    +-# _LT_AC_CHECK_DLFCN
    +-# ------------------
    +-AC_DEFUN([_LT_AC_CHECK_DLFCN],
    +-[AC_CHECK_HEADERS(dlfcn.h)dnl
    +-])# _LT_AC_CHECK_DLFCN
    ++  # 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
    + 
    +-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
    +-#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
    +-# ---------------------------------------------------------------------
    +-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
    +-[AC_REQUIRE([_LT_AC_CHECK_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 <> "$cfgfile" \
    ++    || (rm -f "$cfgfile"; exit 1)
    + 
    +-#if HAVE_DLFCN_H
    +-#include 
    +-#endif
    ++  mv -f "$cfgfile" "$ofile" ||
    ++    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
    ++  chmod +x "$ofile"
    ++],
    ++[cat <<_LT_EOF >> "$ofile"
    + 
    +-#include 
    ++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], [])
    + 
    +-#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
    ++# 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
    + 
    +-#ifdef __cplusplus
    +-extern "C" void exit (int);
    +-#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 ());
    ++# _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
    + 
    +-    exit (status);
    +-}]
    +-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_AC_TRY_DLOPEN_SELF
    + 
    ++# _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], [])
    + 
    +-# AC_LIBTOOL_DLOPEN_SELF
    +-# ----------------------
    +-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
    +-[AC_REQUIRE([_LT_AC_CHECK_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
    +-    ;;
    ++# _LT_TAG_COMPILER
    ++# ----------------
    ++m4_defun([_LT_TAG_COMPILER],
    ++[AC_REQUIRE([AC_PROG_CC])dnl
    + 
    +-  mingw* | pw32*)
    +-    lt_cv_dlopen="LoadLibrary"
    +-    lt_cv_dlopen_libs=
    +-   ;;
    ++_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
    + 
    +-  cygwin*)
    +-    lt_cv_dlopen="dlopen"
    +-    lt_cv_dlopen_libs=
    +-   ;;
    ++# If no C compiler was specified, use CC.
    ++LTCC=${LTCC-"$CC"}
    + 
    +-  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
    +-    ])
    +-   ;;
    ++# If no C compiler flags were specified, use CFLAGS.
    ++LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
    + 
    +-  *)
    +-    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="-dld"],
    +-	[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="-dld"])
    +-	      ])
    +-	    ])
    +-	  ])
    +-	])
    +-      ])
    +-    ;;
    +-  esac
    ++# Allow CC to be a program name with arguments.
    ++compiler=$CC
    ++])# _LT_TAG_COMPILER
    + 
    +-  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"
    ++# _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
    + 
    +-    save_LDFLAGS="$LDFLAGS"
    +-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
    + 
    +-    save_LIBS="$LIBS"
    +-    LIBS="$lt_cv_dlopen_libs $LIBS"
    ++# _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
    + 
    +-    AC_CACHE_CHECK([whether a program can dlopen itself],
    +-	  lt_cv_dlopen_self, [dnl
    +-	  _LT_AC_TRY_DLOPEN_SELF(
    +-	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
    +-	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
    ++# _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"
    +     ])
    +-
    +-    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_AC_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)
    +-      ])
    ++    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
    +-
    +-    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
    +-])# AC_LIBTOOL_DLOPEN_SELF
    ++# _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"
    ++  if test "$GCC" = "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
    + 
    +-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
    +-# ---------------------------------
    +-# Check to see if options -c and -o are simultaneously supported by compiler
    +-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
    +-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
    +-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    +-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
    +-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
    +-   $rm -r conftest 2>/dev/null
    +-   mkdir conftest
    +-   cd conftest
    +-   mkdir out
    +-   printf "$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_AC_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 ..
    +-   rmdir conftest
    +-   $rm conftest*
    +-])
    +-])# AC_LIBTOOL_PROG_CC_C_O
    ++# _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
    + 
    + 
    +-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
    +-# -----------------------------------------
    +-# Check to see if we can do hard links to lock some files if needed
    +-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
    +-[AC_REQUIRE([_LT_AC_LOCK])dnl
    ++# _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}
    + 
    +-hard_links="nottested"
    +-if test "$_LT_AC_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
    ++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
    +-  need_locks=no
    ++  # Restart under the correct shell.
    ++  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
    + fi
    +-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
    + 
    +-
    +-# AC_LIBTOOL_OBJDIR
    +-# -----------------
    +-AC_DEFUN([AC_LIBTOOL_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
    ++if test "X[$]1" = X--fallback-echo; then
    ++  # used as fallback echo
    ++  shift
    ++  cat <<_LT_EOF
    ++[$]*
    ++_LT_EOF
    ++  exit 0
    + fi
    +-rmdir .libs 2>/dev/null])
    +-objdir=$lt_cv_objdir
    +-])# AC_LIBTOOL_OBJDIR
    + 
    ++# 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
    + 
    +-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
    +-# ----------------------------------------------
    +-# Check hardcoding attributes.
    +-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
    +-[AC_MSG_CHECKING([how to hardcode library paths into programs])
    +-_LT_AC_TAGVAR(hardcode_action, $1)=
    +-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
    +-   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
    +-   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
    +-
    +-  # We can hardcode non-existant directories.
    +-  if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
    +-     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
    +-    # Linking always hardcodes the temporary library directory.
    +-    _LT_AC_TAGVAR(hardcode_action, $1)=relink
    +-  else
    +-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
    +-    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
    ++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
    +-else
    +-  # We cannot hardcode anything, or else we can only hardcode existing
    +-  # directories.
    +-  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
    +-fi
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
    + 
    +-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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
    +-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
    ++  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"
    + 
    +-# AC_LIBTOOL_SYS_LIB_STRIP
    +-# ------------------------
    +-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
    +-[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"
    +-         AC_MSG_RESULT([yes])
    +-       else
    +-  AC_MSG_RESULT([no])
    +-fi
    +-       ;;
    +-   *)
    +-  AC_MSG_RESULT([no])
    +-    ;;
    +-  esac
    +-fi
    +-])# AC_LIBTOOL_SYS_LIB_STRIP
    ++    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
    + 
    +-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
    +-# -----------------------------
    +-# PORTME Fill in your ld.so characteristics
    +-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
    +-[AC_MSG_CHECKING([dynamic linker characteristics])
    +-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"
    +-if test "$GCC" = yes; then
    +-  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 ';' >/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.
    +-    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"`
    ++	  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
    +-else
    +-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
    + fi
    +-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
    ++# 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
    + 
    +-case $host_os in
    +-aix3*)
    +-  version_type=linux
    +-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
    +-  shlibpath_var=LIBPATH
    ++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
    + 
    +-  # AIX 3 has no versioning support, so we append a major version to the name.
    +-  soname_spec='${libname}${release}${shared_ext}$major'
    +-  ;;
    + 
    +-aix4* | aix5*)
    +-  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
    +-      ;;
    ++# _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
    +-    # 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}'
    ++  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
    +-      # 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'
    ++      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
    +-    shlibpath_var=LIBPATH
    +   fi
    ++  rm -rf conftest*
    +   ;;
    + 
    +-amigaos*)
    +-  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'
    ++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*
    +   ;;
    + 
    +-beos*)
    +-  library_names_spec='${libname}${shared_ext}'
    +-  dynamic_linker="$host_os ld.so"
    +-  shlibpath_var=LIBRARY_PATH
    ++*-*-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
    +   ;;
    +-
    +-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
    ++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
    + 
    +-cygwin* | mingw* | pw32*)
    +-  version_type=windows
    +-  shrext_cmds=".dll"
    +-  need_version=no
    +-  need_lib_prefix=no
    ++need_locks="$enable_libtool_lock"
    ++])# _LT_ENABLE_LOCK
    + 
    +-  case $GCC,$host_os in
    +-  yes,cygwin* | yes,mingw* | yes,pw32*)
    +-    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'
    +-    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*)
    +-      # 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
    +-    ;;
    ++# _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"
    ++    ;;
    +   *)
    +-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
    ++    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
    +     ;;
    +   esac
    +-  dynamic_linker='Win32 ld.exe'
    +-  # FIXME: first we should search . and the directory the executable is in
    +-  shlibpath_var=PATH
    +-  ;;
    ++  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
    + 
    +-darwin* | rhapsody*)
    +-  dynamic_linker="$host_os dyld"
    +-  version_type=darwin
    +-  need_lib_prefix=no
    +-  need_version=no
    +-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${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`'
    +-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
    +-  if test "$GCC" = yes; then
    +-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
    +-  else
    +-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
    +-  fi
    +-  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
    +-  ;;
    ++# _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*
    ++])
    + 
    +-freebsd1*)
    +-  dynamic_linker=no
    +-  ;;
    ++if test x"[$]$2" = xyes; then
    ++    m4_if([$5], , :, [$5])
    ++else
    ++    m4_if([$6], , :, [$6])
    ++fi
    ++])# _LT_COMPILER_OPTION
    + 
    +-kfreebsd*-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='GNU ld.so'
    +-  ;;
    ++# Old name:
    ++AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
    ++dnl aclocal-1.4 backwards compatibility:
    ++dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
    + 
    +-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
    +-  version_type=freebsd-$objformat
    +-  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
    +-      ;;
    +-  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
    ++
    ++# _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
    +     ;;
    +-  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
    ++
    ++  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;
    +     ;;
    +-  freebsd*) # from 4.6 on
    +-    shlibpath_overrides_runpath=yes
    +-    hardcode_into_libs=yes
    ++
    ++  cygwin* | mingw*)
    ++    # 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;
    +     ;;
    +-  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
    +-  ;;
    ++  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;
    ++    ;;
    + 
    +-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"
    ++  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
    +-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
    ++      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
    +     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'
    ++    # 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`
    +     ;;
    +-  esac
    +-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
    +-  postinstall_cmds='chmod 555 $lib'
    +-  ;;
    + 
    +-interix3*)
    +-  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
    +-  ;;
    ++  interix*)
    ++    # We know the value 262144 and hardcode it with a safety zone (like BSD)
    ++    lt_cv_sys_max_cmd_len=196608
    ++    ;;
    + 
    +-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=
    ++  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
    +     ;;
    +   *)
    +-    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
    ++    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
    +-  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
    +-  ;;
    ++])
    ++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
    + 
    +-# No shared lib support for Linux oldld, aout, or coff.
    +-linux*oldld* | linux*aout* | linux*coff*)
    +-  dynamic_linker=no
    +-  ;;
    ++# 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], [])
    + 
    +-# This must be Linux ELF.
    +-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}'
    +-  soname_spec='${libname}${release}${shared_ext}$major'
    +-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
    +-  shlibpath_var=LD_LIBRARY_PATH
    +-  shlibpath_overrides_runpath=no
    +-  # 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/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
    +-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
    +-  fi
    ++# _LT_HEADER_DLFCN
    ++# ----------------
    ++m4_defun([_LT_HEADER_DLFCN],
    ++[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
    ++])# _LT_HEADER_DLFCN
    + 
    +-  # 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'
    +-  ;;
    + 
    +-knetbsd*-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='GNU ld.so'
    +-  ;;
    ++# _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"
    + 
    +-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
    +-  ;;
    ++#if HAVE_DLFCN_H
    ++#include 
    ++#endif
    + 
    +-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
    +-  ;;
    ++#include 
    + 
    +-nto-qnx*)
    +-  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
    +-  ;;
    ++#ifdef RTLD_GLOBAL
    ++#  define LT_DLGLOBAL		RTLD_GLOBAL
    ++#else
    ++#  ifdef DL_GLOBAL
    ++#    define LT_DLGLOBAL		DL_GLOBAL
    ++#  else
    ++#    define LT_DLGLOBAL		0
    ++#  endif
    ++#endif
    + 
    +-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
    ++/* 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
    ++
    ++#ifdef __cplusplus
    ++extern "C" void exit (int);
    ++#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
    +-    shlibpath_overrides_runpath=yes
    ++    puts (dlerror ());
    ++
    ++    exit (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
    + 
    +-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"
    +-  ;;
    ++# 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=
    + 
    +-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'
    +-  ;;
    ++  case $host_os in
    ++  beos*)
    ++    lt_cv_dlopen="load_add_on"
    ++    lt_cv_dlopen_libs=
    ++    lt_cv_dlopen_self=yes
    ++    ;;
    + 
    +-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
    +-  ;;
    ++  mingw* | pw32*)
    ++    lt_cv_dlopen="LoadLibrary"
    ++    lt_cv_dlopen_libs=
    ++    ;;
    + 
    +-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
    +-      export_dynamic_flag_spec='${wl}-Blargedynsym'
    +-      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
    +-  ;;
    ++  cygwin*)
    ++    lt_cv_dlopen="dlopen"
    ++    lt_cv_dlopen_libs=
    ++    ;;
    + 
    +-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
    +-  ;;
    ++  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
    ++    ])
    ++    ;;
    + 
    +-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
    +-  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'
    +-    shlibpath_overrides_runpath=no
    ++  *)
    ++    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
    +-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
    +-    shlibpath_overrides_runpath=yes
    +-    case $host_os in
    +-      sco3.2v5*)
    +-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
    +-	;;
    +-    esac
    ++    enable_dlopen=no
    +   fi
    +-  sys_lib_dlsearch_path_spec='/usr/lib'
    +-  ;;
    +-
    +-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
    +-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
    +-
    + 
    +-# _LT_AC_TAGCONFIG
    +-# ----------------
    +-AC_DEFUN([_LT_AC_TAGCONFIG],
    +-[AC_ARG_WITH([tags],
    +-    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
    +-        [include additional configurations @<:@automatic@:>@])],
    +-    [tagnames="$withval"])
    +-
    +-if test -f "$ltmain" && test -n "$tagnames"; then
    +-  if test ! -f "${ofile}"; then
    +-    AC_MSG_WARN([output file `$ofile' does not exist])
    +-  fi
    ++  case $lt_cv_dlopen in
    ++  dlopen)
    ++    save_CPPFLAGS="$CPPFLAGS"
    ++    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
    + 
    +-  if test -z "$LTCC"; then
    +-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
    +-    if test -z "$LTCC"; then
    +-      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
    +-    else
    +-      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
    +-    fi
    +-  fi
    +-  if test -z "$LTCFLAGS"; then
    +-    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
    +-  fi
    ++    save_LDFLAGS="$LDFLAGS"
    ++    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
    + 
    +-  # Extract list of available tagged configurations in $ofile.
    +-  # Note that this assumes the entire list is on one line.
    +-  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
    ++    save_LIBS="$LIBS"
    ++    LIBS="$lt_cv_dlopen_libs $LIBS"
    + 
    +-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
    +-  for tagname in $tagnames; do
    +-    IFS="$lt_save_ifs"
    +-    # Check whether tagname contains only valid characters
    +-    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
    +-    "") ;;
    +-    *)  AC_MSG_ERROR([invalid tag name: $tagname])
    +-	;;
    +-    esac
    ++    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 grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
    +-    then
    +-      AC_MSG_ERROR([tag name \"$tagname\" already exists])
    ++    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
    + 
    +-    # Update the list of available tags.
    +-    if test -n "$tagname"; then
    +-      echo appending configuration tag \"$tagname\" to $ofile
    +-
    +-      case $tagname in
    +-      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_LIBTOOL_LANG_CXX_CONFIG
    +-	else
    +-	  tagname=""
    +-	fi
    +-	;;
    +-
    +-      F77)
    +-	if test -n "$F77" && test "X$F77" != "Xno"; then
    +-	  AC_LIBTOOL_LANG_F77_CONFIG
    +-	else
    +-	  tagname=""
    +-	fi
    +-	;;
    +-
    +-      GCJ)
    +-	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
    +-	  AC_LIBTOOL_LANG_GCJ_CONFIG
    +-	else
    +-	  tagname=""
    +-	fi
    +-	;;
    +-
    +-      RC)
    +-	AC_LIBTOOL_LANG_RC_CONFIG
    +-	;;
    +-
    +-      *)
    +-	AC_MSG_ERROR([Unsupported tag name: $tagname])
    +-	;;
    +-      esac
    ++    CPPFLAGS="$save_CPPFLAGS"
    ++    LDFLAGS="$save_LDFLAGS"
    ++    LIBS="$save_LIBS"
    ++    ;;
    ++  esac
    + 
    +-      # Append the new tag name to the list of available tags.
    +-      if test -n "$tagname" ; then
    +-      available_tags="$available_tags $tagname"
    +-    fi
    +-    fi
    +-  done
    +-  IFS="$lt_save_ifs"
    ++  case $lt_cv_dlopen_self in
    ++  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
    ++  *) enable_dlopen_self=unknown ;;
    ++  esac
    + 
    +-  # Now substitute the updated list of available tags.
    +-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
    +-    mv "${ofile}T" "$ofile"
    +-    chmod +x "$ofile"
    +-  else
    +-    rm -f "${ofile}T"
    +-    AC_MSG_ERROR([unable to update list of available tagged configurations.])
    +-  fi
    ++  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_AC_TAGCONFIG
    ++_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], [])
    + 
    + 
    +-# AC_LIBTOOL_DLOPEN
    +-# -----------------
    +-# enable checks for dlopen support
    +-AC_DEFUN([AC_LIBTOOL_DLOPEN],
    +- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
    +-])# AC_LIBTOOL_DLOPEN
    ++# _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
    + 
    +-# AC_LIBTOOL_WIN32_DLL
    +-# --------------------
    +-# declare package support for building win32 DLLs
    +-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
    +-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
    +-])# AC_LIBTOOL_WIN32_DLL
    + 
    ++# _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])
    + 
    +-# AC_ENABLE_SHARED([DEFAULT])
    +-# ---------------------------
    +-# implement the --enable-shared flag
    +-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
    +-AC_DEFUN([AC_ENABLE_SHARED],
    +-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
    +-AC_ARG_ENABLE([shared],
    +-    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
    +-	[build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT)
    +-])# AC_ENABLE_SHARED
    +-
    +-
    +-# AC_DISABLE_SHARED
    +-# -----------------
    +-# set the default shared flag to --disable-shared
    +-AC_DEFUN([AC_DISABLE_SHARED],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-AC_ENABLE_SHARED(no)
    +-])# AC_DISABLE_SHARED
    +-
    +-
    +-# AC_ENABLE_STATIC([DEFAULT])
    +-# ---------------------------
    +-# implement the --enable-static flag
    +-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
    +-AC_DEFUN([AC_ENABLE_STATIC],
    +-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
    +-AC_ARG_ENABLE([static],
    +-    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
    +-	[build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT)
    +-])# AC_ENABLE_STATIC
    +-
    +-
    +-# AC_DISABLE_STATIC
    +-# -----------------
    +-# set the default static flag to --disable-static
    +-AC_DEFUN([AC_DISABLE_STATIC],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-AC_ENABLE_STATIC(no)
    +-])# AC_DISABLE_STATIC
    +-
    +-
    +-# AC_ENABLE_FAST_INSTALL([DEFAULT])
    +-# ---------------------------------
    +-# implement the --enable-fast-install flag
    +-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
    +-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
    +-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
    +-AC_ARG_ENABLE([fast-install],
    +-    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
    +-    [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT)
    +-])# AC_ENABLE_FAST_INSTALL
    +-
    +-
    +-# AC_DISABLE_FAST_INSTALL
    +-# -----------------------
    +-# set the default to --disable-fast-install
    +-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-AC_ENABLE_FAST_INSTALL(no)
    +-])# AC_DISABLE_FAST_INSTALL
    +-
    +-
    +-# AC_LIBTOOL_PICMODE([MODE])
    +-# --------------------------
    +-# implement the --with-pic flag
    +-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
    +-AC_DEFUN([AC_LIBTOOL_PICMODE],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-pic_mode=ifelse($#,1,$1,default)
    +-])# AC_LIBTOOL_PICMODE
    +-
    +-
    +-# AC_PROG_EGREP
    +-# -------------
    +-# This is predefined starting with Autoconf 2.54, so this conditional
    +-# definition can be removed once we require Autoconf 2.54 or later.
    +-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
    +-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
    +-   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
    +-    then ac_cv_prog_egrep='grep -E'
    +-    else ac_cv_prog_egrep='egrep'
    +-    fi])
    +- EGREP=$ac_cv_prog_egrep
    +- AC_SUBST([EGREP])
    +-])])
    +-
    +-
    +-# AC_PATH_TOOL_PREFIX
    +-# -------------------
    +-# find a file program which can recognise shared library
    +-AC_DEFUN([AC_PATH_TOOL_PREFIX],
    +-[AC_REQUIRE([AC_PROG_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="ifelse([$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 <&2
    ++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
    + 
    +-*** 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
    + 
    +-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)
    ++# _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
    +-  AC_MSG_RESULT(no)
    ++  # MS-DOS does not allow filenames that begin with a dot.
    ++  lt_cv_objdir=_libs
    + fi
    +-])# AC_PATH_TOOL_PREFIX
    ++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
    + 
    + 
    +-# AC_PATH_MAGIC
    +-# -------------
    +-# find a file program which can recognise a shared library
    +-AC_DEFUN([AC_PATH_MAGIC],
    +-[AC_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
    +-    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
    ++# _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
    +-    MAGIC_CMD=:
    ++    # 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
    +-])# AC_PATH_MAGIC
    ++_LT_TAGDECL([], [hardcode_action], [0],
    ++    [How to hardcode a shared library path into an executable])
    ++])# _LT_LINKER_HARDCODE_LIBPATH
    + 
    + 
    +-# AC_PROG_LD
    +-# ----------
    +-# find the pathname to the GNU or non-GNU linker
    +-AC_DEFUN([AC_PROG_LD],
    +-[AC_ARG_WITH([gnu-ld],
    +-    [AC_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])
    +-AC_REQUIRE([LT_AC_PROG_SED])dnl
    +-AC_REQUIRE([AC_PROG_CC])dnl
    +-AC_REQUIRE([AC_CANONICAL_HOST])dnl
    +-AC_REQUIRE([AC_CANONICAL_BUILD])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
    ++# _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
    +     ;;
    +   *)
    +-    # If it is relative, then search for the first ld in PATH.
    +-    with_gnu_ld=unknown
    ++    AC_MSG_RESULT([no])
    +     ;;
    +   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 /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
    +-  IFS="$lt_save_ifs"
    ++  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
    +-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
    ++  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
    + fi])
    +-LD="$lt_cv_path_LD"
    +-if test -n "$LD"; then
    +-  AC_MSG_RESULT($LD)
    +-else
    +-  AC_MSG_RESULT(no)
    +-fi
    +-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
    +-AC_PROG_LD_GNU
    +-])# AC_PROG_LD
    ++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
    + 
    +-# AC_PROG_LD_GNU
    +-# --------------
    +-AC_DEFUN([AC_PROG_LD_GNU],
    +-[AC_REQUIRE([AC_PROG_EGREP])dnl
    +-AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
    +-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
    +-case `$LD -v 2>&1  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
    +-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
    ++      # 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
    +-    ;;
    +-esac
    +-])# AC_PROG_LD_RELOAD_FLAG
    +-
    +-
    +-# AC_DEPLIBS_CHECK_METHOD
    +-# -----------------------
    +-# how to check for library dependencies
    +-#  -- PORTME fill in with the dynamic library characteristics
    +-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
    +-[AC_CACHE_CHECK([how to recognise dependent libraries],
    +-lt_cv_deplibs_check_method,
    +-[lt_cv_file_magic_cmd='$MAGIC_CMD'
    +-lt_cv_file_magic_test_file=
    +-lt_cv_deplibs_check_method='unknown'
    +-# Need to set the preceding variable on all platforms that support
    +-# interlibrary dependencies.
    +-# 'none' -- dependencies not supported.
    +-# `unknown' -- same as none, but documents that we really don't know.
    +-# 'pass_all' -- all dependencies passed with no checks.
    +-# 'test_compile' -- check by making test program.
    +-# 'file_magic [[regex]]' -- check by looking for files in library path
    +-# which responds to the $file_magic_cmd with a given extended regex.
    +-# If you have `file' or equivalent on your system and you're not sure
    +-# whether `pass_all' will *always* work, you probably want this one.
    ++    shlibpath_var=LIBPATH
    ++  fi
    ++  ;;
    + 
    +-case $host_os in
    +-aix4* | aix5*)
    +-  lt_cv_deplibs_check_method=pass_all
    ++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*)
    +-  lt_cv_deplibs_check_method=pass_all
    ++  library_names_spec='${libname}${shared_ext}'
    ++  dynamic_linker="$host_os ld.so"
    ++  shlibpath_var=LIBRARY_PATH
    +   ;;
    + 
    + bsdi[[45]]*)
    +-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
    +-  lt_cv_file_magic_cmd='/usr/bin/file -L'
    +-  lt_cv_file_magic_test_file=/shlib/libc.so
    +-  ;;
    +-
    +-cygwin*)
    +-  # func_win32_libid is a shell function defined in ltmain.sh
    +-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
    +-  lt_cv_file_magic_cmd='func_win32_libid'
    ++  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
    +   ;;
    + 
    +-mingw* | pw32*)
    +-  # Base MSYS/MinGW do not provide the 'file' command needed by
    +-  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
    +-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
    +-  lt_cv_file_magic_cmd='$OBJDUMP -f'
    +-  ;;
    ++cygwin* | mingw* | pw32*)
    ++  version_type=windows
    ++  shrext_cmds=".dll"
    ++  need_version=no
    ++  need_lib_prefix=no
    + 
    +-darwin* | rhapsody*)
    +-  lt_cv_deplibs_check_method=pass_all
    +-  ;;
    ++  case $GCC,$host_os in
    ++  yes,cygwin* | yes,mingw* | yes,pw32*)
    ++    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
    + 
    +-freebsd* | kfreebsd*-gnu | 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.*`
    ++    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*)
    ++      # 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
    +-  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
    ++    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
    +   ;;
    + 
    +-interix3*)
    +-  # 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*)
    +-  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
    ++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'
    +   ;;
    + 
    +-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
    ++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
    +   ;;
    + 
    +-nto-qnx*)
    +-  lt_cv_deplibs_check_method=unknown
    ++freebsd1*)
    ++  dynamic_linker=no
    +   ;;
    + 
    +-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)$'
    ++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
    +-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
    ++    case $host_os in
    ++    freebsd[[123]]*) objformat=aout ;;
    ++    *) objformat=elf ;;
    ++    esac
    +   fi
    +-  ;;
    +-
    +-osf3* | osf4* | osf5*)
    +-  lt_cv_deplibs_check_method=pass_all
    +-  ;;
    +-
    +-solaris*)
    +-  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 )'
    ++  version_type=freebsd-$objformat
    ++  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
    ++      ;;
    ++  esac
    ++  shlibpath_var=LD_LIBRARY_PATH
    ++  case $host_os in
    ++  freebsd2*)
    ++    shlibpath_overrides_runpath=yes
    +     ;;
    +-  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
    ++  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
    ++    shlibpath_overrides_runpath=yes
    ++    hardcode_into_libs=yes
    +     ;;
    +-  siemens)
    +-    lt_cv_deplibs_check_method=pass_all
    ++  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
    +     ;;
    +-  pc)
    +-    lt_cv_deplibs_check_method=pass_all
    ++  *) # from 4.6 on, and DragonFly
    ++    shlibpath_overrides_runpath=yes
    ++    hardcode_into_libs=yes
    +     ;;
    +   esac
    +   ;;
    + 
    +-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
    +-  lt_cv_deplibs_check_method=pass_all
    ++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
    +   ;;
    +-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
    +-])# AC_DEPLIBS_CHECK_METHOD
    + 
    +-
    +-# AC_PROG_NM
    +-# ----------
    +-# find the pathname to a BSD-compatible name lister
    +-AC_DEFUN([AC_PROG_NM],
    +-[AC_CACHE_CHECK([for BSD-compatible 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
    +-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
    +-fi])
    +-NM="$lt_cv_path_NM"
    +-])# AC_PROG_NM
    +-
    +-
    +-# AC_CHECK_LIBM
    +-# -------------
    +-# check for math library
    +-AC_DEFUN([AC_CHECK_LIBM],
    +-[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")
    ++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'
    +   ;;
    +-esac
    +-])# AC_CHECK_LIBM
    + 
    ++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
    ++  ;;
    + 
    +-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
    +-# -----------------------------------
    +-# sets LIBLTDL to the link flags for the libltdl convenience library and
    +-# LTDLINCL to the include flags for the libltdl header and adds
    +-# --enable-ltdl-convenience to the configure arguments.  Note that
    +-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
    +-# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
    +-# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
    +-# (note the single quotes!).  If your package is not flat and you're not
    +-# using automake, define top_builddir and top_srcdir appropriately in
    +-# the Makefiles.
    +-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-  case $enable_ltdl_convenience in
    +-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
    +-  "") enable_ltdl_convenience=yes
    +-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
    ++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
    +-  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
    +-  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
    +-  # For backwards non-gettext consistent compatibility...
    +-  INCLTDL="$LTDLINCL"
    +-])# AC_LIBLTDL_CONVENIENCE
    +-
    +-
    +-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
    +-# -----------------------------------
    +-# sets LIBLTDL to the link flags for the libltdl installable library and
    +-# LTDLINCL to the include flags for the libltdl header and adds
    +-# --enable-ltdl-install to the configure arguments.  Note that
    +-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
    +-# and an installed libltdl is not found, it is assumed to be `libltdl'.
    +-# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
    +-# '${top_srcdir}/' (note the single quotes!).  If your package is not
    +-# flat and you're not using automake, define top_builddir and top_srcdir
    +-# appropriately in the Makefiles.
    +-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
    +-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-  AC_CHECK_LIB(ltdl, lt_dlinit,
    +-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
    +-  [if test x"$enable_ltdl_install" = xno; then
    +-     AC_MSG_WARN([libltdl not installed, but installation disabled])
    +-   else
    +-     enable_ltdl_install=yes
    +-   fi
    +-  ])
    +-  if test x"$enable_ltdl_install" = x"yes"; then
    +-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
    +-    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
    +-    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
    +-  else
    +-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
    +-    LIBLTDL="-lltdl"
    +-    LTDLINCL=
    +-  fi
    +-  # For backwards non-gettext consistent compatibility...
    +-  INCLTDL="$LTDLINCL"
    +-])# AC_LIBLTDL_INSTALLABLE
    ++  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
    ++  ;;
    + 
    +-# AC_LIBTOOL_CXX
    +-# --------------
    +-# enable support for C++ libraries
    +-AC_DEFUN([AC_LIBTOOL_CXX],
    +-[AC_REQUIRE([_LT_AC_LANG_CXX])
    +-])# AC_LIBTOOL_CXX
    ++# 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
    + 
    +-# _LT_AC_LANG_CXX
    +-# ---------------
    +-AC_DEFUN([_LT_AC_LANG_CXX],
    +-[AC_REQUIRE([AC_PROG_CXX])
    +-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
    +-])# _LT_AC_LANG_CXX
    ++  # 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
    + 
    +-# _LT_AC_PROG_CXXCPP
    +-# ------------------
    +-AC_DEFUN([_LT_AC_PROG_CXXCPP],
    +-[
    +-AC_REQUIRE([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
    +-fi
    +-])# _LT_AC_PROG_CXXCPP
    +-
    +-# AC_LIBTOOL_F77
    +-# --------------
    +-# enable support for Fortran 77 libraries
    +-AC_DEFUN([AC_LIBTOOL_F77],
    +-[AC_REQUIRE([_LT_AC_LANG_F77])
    +-])# AC_LIBTOOL_F77
    +-
    +-
    +-# _LT_AC_LANG_F77
    +-# ---------------
    +-AC_DEFUN([_LT_AC_LANG_F77],
    +-[AC_REQUIRE([AC_PROG_F77])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
    +-])# _LT_AC_LANG_F77
    +-
    +-
    +-# AC_LIBTOOL_GCJ
    +-# --------------
    +-# enable support for GCJ libraries
    +-AC_DEFUN([AC_LIBTOOL_GCJ],
    +-[AC_REQUIRE([_LT_AC_LANG_GCJ])
    +-])# AC_LIBTOOL_GCJ
    +-
    +-
    +-# _LT_AC_LANG_GCJ
    +-# ---------------
    +-AC_DEFUN([_LT_AC_LANG_GCJ],
    +-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
    +-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
    +-    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
    +-      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
    +-	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
    +-	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
    +-])# _LT_AC_LANG_GCJ
    +-
    +-
    +-# AC_LIBTOOL_RC
    +-# -------------
    +-# enable support for Windows resource files
    +-AC_DEFUN([AC_LIBTOOL_RC],
    +-[AC_REQUIRE([LT_AC_PROG_RC])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
    +-])# AC_LIBTOOL_RC
    ++  # 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
    ++  ;;
    + 
    +-# AC_LIBTOOL_LANG_C_CONFIG
    +-# ------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
    +-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
    +-[lt_save_CC="$CC"
    +-AC_LANG_PUSH(C)
    ++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
    ++  ;;
    + 
    +-# Source file extension for C test sources.
    +-ac_ext=c
    ++*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'
    ++  ;;
    + 
    +-# Object file extension for compiled C test sources.
    +-objext=o
    +-_LT_AC_TAGVAR(objext, $1)=$objext
    ++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
    ++  ;;
    + 
    +-# Code to be used in simple compile tests
    +-lt_simple_compile_test_code="int some_variable = 0;\n"
    ++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
    ++  ;;
    + 
    +-# Code to be used in simple link tests
    +-lt_simple_link_test_code='int main(){return(0);}\n'
    ++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"
    ++  ;;
    + 
    +-_LT_AC_SYS_COMPILER
    ++rdos*)
    ++  dynamic_linker=no
    ++  ;;
    + 
    +-# save warnings/boilerplate of simple test code
    +-_LT_COMPILER_BOILERPLATE
    +-_LT_LINKER_BOILERPLATE
    ++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'
    ++  ;;
    + 
    +-## 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...
    +-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    +-AC_LIBTOOL_SYS_LIB_STRIP
    +-AC_LIBTOOL_DLOPEN_SELF
    +-
    +-# Report which library types will actually be built
    +-AC_MSG_CHECKING([if libtool supports shared libraries])
    +-AC_MSG_RESULT([$can_build_shared])
    ++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
    ++  ;;
    + 
    +-AC_MSG_CHECKING([whether to build shared libraries])
    +-test "$can_build_shared" = "no" && enable_shared=no
    ++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
    ++  ;;
    + 
    +-# 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'
    ++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
    +   ;;
    + 
    +-aix4* | aix5*)
    +-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
    +-    test "$enable_shared" = yes && enable_static=no
    ++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
    +-    ;;
    +-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])
    +-
    +-AC_LIBTOOL_CONFIG($1)
    +-
    +-AC_LANG_POP
    +-CC="$lt_save_CC"
    +-])# AC_LIBTOOL_LANG_C_CONFIG
    +-
    +-
    +-# AC_LIBTOOL_LANG_CXX_CONFIG
    +-# --------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
    +-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
    +-[AC_LANG_PUSH(C++)
    +-AC_REQUIRE([AC_PROG_CXX])
    +-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
    +-
    +-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
    +-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
    +-_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
    +-_LT_AC_TAGVAR(module_cmds, $1)=
    +-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
    +-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
    +-_LT_AC_TAGVAR(no_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
    +-
    +-# Dependencies to place before and after the object being linked:
    +-_LT_AC_TAGVAR(predep_objects, $1)=
    +-_LT_AC_TAGVAR(postdep_objects, $1)=
    +-_LT_AC_TAGVAR(predeps, $1)=
    +-_LT_AC_TAGVAR(postdeps, $1)=
    +-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
    +-
    +-# Source file extension for C++ test sources.
    +-ac_ext=cpp
    +-
    +-# Object file extension for compiled C++ test sources.
    +-objext=o
    +-_LT_AC_TAGVAR(objext, $1)=$objext
    +-
    +-# Code to be used in simple compile tests
    +-lt_simple_compile_test_code="int some_variable = 0;\n"
    ++  sys_lib_dlsearch_path_spec='/usr/lib'
    ++  ;;
    + 
    +-# Code to be used in simple link tests
    +-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
    ++tpf*)
    ++  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
    ++  version_type=linux
    ++  need_lib_prefix=no
    ++  need_version=no
    ++  library_name_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
    ++  ;;
    + 
    +-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
    +-_LT_AC_SYS_COMPILER
    ++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
    ++  ;;
    + 
    +-# save warnings/boilerplate of simple test code
    +-_LT_COMPILER_BOILERPLATE
    +-_LT_LINKER_BOILERPLATE
    ++*)
    ++  dynamic_linker=no
    ++  ;;
    ++esac
    ++AC_MSG_RESULT([$dynamic_linker])
    ++test "$dynamic_linker" = no && can_build_shared=no
    + 
    +-# 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
    ++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 -n "${lt_cv_path_LDCXX+set}"; then
    +-  lt_cv_path_LD=$lt_cv_path_LDCXX
    +-else
    +-  $as_unset lt_cv_path_LD
    ++ 
    ++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
    +-test -z "${LDCXX+set}" || LD=$LDCXX
    +-CC=${CXX-"c++"}
    +-compiler=$CC
    +-_LT_AC_TAGVAR(compiler, $1)=$CC
    +-_LT_CC_BASENAME([$compiler])
    +-
    +-# We don't want -fno-exception wen compiling C++ code, so set the
    +-# no_builtin_flag separately
    +-if test "$GXX" = yes; then
    +-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
    +-else
    +-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
    ++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
    + 
    +-if test "$GXX" = yes; then
    +-  # Set up default GNU C++ configuration
    +-
    +-  AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-    _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
    +-    _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
    +-    else
    +-      _LT_AC_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_AC_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
    ++_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
    + 
    +-# PORTME: fill in a description of your system's C++ link characteristics
    +-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
    +-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
    +-case $host_os in
    +-  aix3*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  aix4* | aix5*)
    +-    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]].*|aix5*)
    +-	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
    ++# _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
    + 
    +-    # 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_AC_TAGVAR(archive_cmds, $1)=''
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    ++*** 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
    + 
    +-    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
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	else
    +-	  # We have old collect2
    +-	  _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-	  _LT_AC_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
    ++_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
    + 
    +-    # It seems that -bexpall does not export symbols beginning with
    +-    # underscore (_), so it is better to generate a list of symbols to export.
    +-    _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
    +-      # Determine the default libpath from the value encoded in an empty executable.
    +-      _LT_AC_SYS_LIBPATH_AIX
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
    ++# 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_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
    +-     else
    +-      if test "$host_cpu" = ia64; then
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
    +-	_LT_AC_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_AC_SYS_LIBPATH_AIX
    +-	_LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
    +-	# Exported symbols can be pulled into shared objects from archives
    +-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
    +-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-	# This is similar to how AIX traditionally builds its shared libraries.
    +-	_LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      # Joseph Beckenbach  says some releases of gcc
    +-      # support --undefined.  This deserves some investigation.  FIXME
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-    else
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    fi
    +-    ;;
    ++# _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
    + 
    +-  chorus*)
    +-    case $cc_basename in
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    + 
    +-  cygwin* | mingw* | pw32*)
    +-    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
    +-    # as there is no search path for DLLs.
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-    _LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
    +-
    +-    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
    +-      _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-    fi
    +-  ;;
    +-      darwin* | rhapsody*)
    +-        case $host_os in
    +-        rhapsody* | darwin1.[[012]])
    +-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
    +-         ;;
    +-       *) # Darwin 1.3 on
    +-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
    +-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-         else
    +-           case ${MACOSX_DEPLOYMENT_TARGET} in
    +-             10.[[012]])
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-               ;;
    +-             10.*)
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
    +-               ;;
    +-           esac
    +-         fi
    +-         ;;
    +-        esac
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-
    +-    if test "$GXX" = yes ; then
    +-      lt_int_apple_cc_single_mod=no
    +-      output_verbose_link_cmd='echo'
    +-      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
    +-       lt_int_apple_cc_single_mod=yes
    +-      fi
    +-      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
    +-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
    +-      else
    +-          _LT_AC_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'
    +-        fi
    +-        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
    +-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          else
    +-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          fi
    +-            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-      else
    +-      case $cc_basename in
    +-        xlc*)
    +-         output_verbose_link_cmd='echo'
    +-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
    +-          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          ;;
    +-       *)
    +-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-          ;;
    +-      esac
    +-      fi
    +-        ;;
    ++# 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
    + 
    +-  dgux*)
    +-    case $cc_basename in
    +-      ec++*)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      ghcx*)
    +-	# Green Hills C++ Compiler
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    +-  freebsd[[12]]*)
    +-    # C++ shared libraries reported to be fairly broken before switch to ELF
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  freebsd-elf*)
    +-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-    ;;
    +-  freebsd* | kfreebsd*-gnu | dragonfly*)
    +-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
    +-    # conventions
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
    +-    ;;
    +-  gnu*)
    +-    ;;
    +-  hpux9*)
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-    _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    +-    aCC*)
    +-      _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
    +-      ;;
    +-    *)
    +-      if test "$GXX" = yes; then
    +-        _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-    esac
    +-    ;;
    +-  hpux10*|hpux11*)
    +-    if test $with_gnu_ld = no; then
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    ++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
    + 
    +-      case $host_cpu in
    +-      hppa*64*|ia64*)
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
    +-        ;;
    +-      *)
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-        ;;
    +-      esac
    +-    fi
    +-    case $host_cpu in
    +-    hppa*64*|ia64*)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-    *)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
    +-					      # but as the default
    +-					      # location of the library.
    ++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"
    +       ;;
    +-    esac
    +-
    +-    case $cc_basename in
    +-      CC*)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      aCC*)
    +-	case $host_cpu in
    +-	hppa*64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	  ;;
    +-	ia64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	  ;;
    +-	*)
    +-	  _LT_AC_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 $list'
    +-	;;
    +-      *)
    +-	if test "$GXX" = yes; then
    +-	  if test $with_gnu_ld = no; then
    +-	    case $host_cpu in
    +-	    hppa*64*)
    +-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	      ;;
    +-	    ia64*)
    +-	      _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  interix3*)
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-    _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-	  else
    +-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
    +-	  fi
    +-	fi
    +-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-	;;
    +-    esac
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    ++  "")
    ++    # If it fails, then pretend we aren't using GCC.
    ++    ac_prog=ld
    +     ;;
    +-  linux*)
    +-    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_AC_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_AC_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 $list'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
    +-	_LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
    +-	;;
    +-      icpc*)
    +-	# 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-  	  _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	  _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
    +-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
    +-	;;
    +-      pgCC*)
    +-        # Portland Group C++ compiler
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
    +-  	_LT_AC_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'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
    +-	_LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
    +-	_LT_AC_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 $templist | $SED "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 $list'
    +-	;;
    +-      *)
    +-	case `$CC -V 2>&1 | sed 5q` in
    +-	*Sun\ C*)
    +-	  # Sun C++ 5.9
    +-	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	  _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-	  _LT_AC_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'
    +-
    +-	  # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
    +-	  ;;
    +-	esac
    +-	;;
    +-    esac
    ++  *)
    ++    # If it is relative, then search for the first ld in PATH.
    ++    with_gnu_ld=unknown
    +     ;;
    +-  lynxos*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  m88k*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  mvs*)
    +-    case $cc_basename in
    +-      cxx*)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    ++  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 /dev/null; then
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
    +-      wlarc=
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_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::"'
    +-    ;;
    +-  openbsd2*)
    +-    # C++ shared libraries are fairly broken
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  openbsd*)
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
    +-    _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
    ++      esac
    +     fi
    +-    output_verbose_link_cmd='echo'
    +-    ;;
    +-  osf3*)
    +-    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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-	# Archives containing C++ object files must be created using
    +-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
    +-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
    +-
    +-	;;
    +-      RCC*)
    +-	# Rational C++ 2.4.1
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      cxx*)
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-	_LT_AC_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 $templist | $SED "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 $list'
    +-	;;
    +-      *)
    +-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	  _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-	  _LT_AC_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"'
    ++  done
    ++  IFS="$lt_save_ifs"
    ++else
    ++  lt_cv_path_LD="$LD" # Let the user override the test with a path.
    ++fi])
    ++LD="$lt_cv_path_LD"
    ++if test -n "$LD"; then
    ++  AC_MSG_RESULT($LD)
    ++else
    ++  AC_MSG_RESULT(no)
    ++fi
    ++test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
    ++_LT_PATH_LD_GNU
    ++AC_SUBST([LD])
    + 
    +-	else
    +-	  # FIXME: insert proper C++ library support
    +-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-	# Archives containing C++ object files must be created using
    +-	# the KAI C++ compiler.
    +-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
    +-	;;
    +-      RCC*)
    +-	# Rational C++ 2.4.1
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      cxx*)
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_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 -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
    +-	  $rm $lib.exp'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
    +-	_LT_AC_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 $templist | $SED "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 $list'
    +-	;;
    +-      *)
    +-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	 _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-	  _LT_AC_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"'
    ++_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
    ++])# LT_PATH_LD
    + 
    +-	else
    +-	  # FIXME: insert proper C++ library support
    +-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  psos*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  sunos4*)
    +-    case $cc_basename in
    +-      CC*)
    +-	# Sun C++ 4.x
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      lcc*)
    +-	# Lucid
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    ++# Old names:
    ++AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
    ++AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
    ++dnl aclocal-1.4 backwards compatibility:
    ++dnl AC_DEFUN([AM_PROG_LD], [])
    ++dnl AC_DEFUN([AC_PROG_LD], [])
    ++
    ++
    ++# _LT_PATH_LD_GNU
    ++#- --------------
    ++m4_defun([_LT_PATH_LD_GNU],
    ++[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
    ++[# I'd rather use --version here, but apparently some GNU lds only accept -v.
    ++case `$LD -v 2>&1  /dev/null; then
    +-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
    +-	    _LT_AC_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'
    ++case $host_os in
    ++aix[[4-9]]*)
    ++  lt_cv_deplibs_check_method=pass_all
    ++  ;;
    + 
    +-	    # 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_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
    +-	    _LT_AC_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'
    ++beos*)
    ++  lt_cv_deplibs_check_method=pass_all
    ++  ;;
    + 
    +-	    # 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
    ++bsdi[[45]]*)
    ++  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
    ++  lt_cv_file_magic_cmd='/usr/bin/file -L'
    ++  lt_cv_file_magic_test_file=/shlib/libc.so
    ++  ;;
    + 
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
    +-    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    runpath_var='LD_RUN_PATH'
    +-
    +-    case $cc_basename in
    +-      CC*)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_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.
    +-    # 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.
    +-    # So that behaviour is only enabled if SCOABSPATH is set to a
    +-    # non-empty value in the environment.  Most likely only useful for
    +-    # creating official distributions of packages.
    +-    # This is a hack until libtool officially supports absolute path
    +-    # names for shared libraries.
    +-    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
    +-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
    +-    runpath_var='LD_RUN_PATH'
    +-
    +-    case $cc_basename in
    +-      CC*)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    ++cygwin*)
    ++  # func_win32_libid is a shell function defined in ltmain.sh
    ++  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
    ++  lt_cv_file_magic_cmd='func_win32_libid'
    ++  ;;
    ++
    ++mingw* | pw32*)
    ++  # Base MSYS/MinGW do not provide the 'file' command needed by
    ++  # func_win32_libid shell function, so use a weaker test based on 'objdump',
    ++  # unless we find 'file', for example because we are cross-compiling.
    ++  if ( file / ) >/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
    ++  ;;
    ++
    ++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
    +     ;;
    +-  vxworks*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    ++  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
    +     ;;
    +   *)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    ++    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
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
    +-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
    ++  esac
    ++  ;;
    + 
    +-_LT_AC_TAGVAR(GCC, $1)="$GXX"
    +-_LT_AC_TAGVAR(LD, $1)="$LD"
    ++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)$'
    ++  ;;
    + 
    +-## 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...
    +-AC_LIBTOOL_POSTDEP_PREDEP($1)
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    ++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
    ++  ;;
    + 
    +-AC_LIBTOOL_CONFIG($1)
    ++# This must be Linux ELF.
    ++linux* | k*bsd*-gnu)
    ++  lt_cv_deplibs_check_method=pass_all
    ++  ;;
    + 
    +-AC_LANG_POP
    +-CC=$lt_save_CC
    +-LDCXX=$LD
    +-LD=$lt_save_LD
    +-GCC=$lt_save_GCC
    +-with_gnu_ldcxx=$with_gnu_ld
    +-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
    +-])# AC_LIBTOOL_LANG_CXX_CONFIG
    ++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
    ++  ;;
    + 
    +-# AC_LIBTOOL_POSTDEP_PREDEP([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.
    +-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
    +-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...
    +-ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&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*)
    ++  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*
    + 
    +-       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_AC_TAGVAR(compiler_lib_search_path, $1)"; then
    +-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
    +-	   else
    +-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_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_AC_TAGVAR(postdeps, $1)"; then
    +-	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
    +-	 else
    +-	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
    +-	 fi
    +-       fi
    +-       ;;
    ++  # 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
    + 
    +-    *.$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
    ++_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
    + 
    +-       if test "$pre_test_object_deps_done" = no; then
    +-	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
    +-	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
    +-	 else
    +-	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
    +-	 fi
    +-       else
    +-	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
    +-	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
    +-	 else
    +-	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
    +-	 fi
    +-       fi
    +-       ;;
    + 
    +-    *) ;; # Ignore the rest.
    ++# _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*)
    ++      # 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 IA64 HP-UX and 64-bit HP-UX, but
    ++      # not for PA HP-UX.
    ++      case $host_cpu in
    ++      hppa*64*|ia64*)
    ++	;;
    ++      *)
    ++	_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'
    ++	    ;;
    ++	  icpc* | ecpc* )
    ++	    # Intel C++
    ++	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    ++	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    ++	    _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
    +-  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
    +-ifelse([$1],[CXX],
    +-[case $host_os in
    +-interix3*)
    +-  # 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_AC_TAGVAR(predep_objects,$1)=
    +-  _LT_AC_TAGVAR(postdep_objects,$1)=
    +-  _LT_AC_TAGVAR(postdeps,$1)=
    +-  ;;
    +-
    +-linux*)
    +-  case `$CC -V 2>&1 | sed 5q` in
    +-  *Sun\ C*)
    +-    # Sun C++ 5.9
    +-    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
    +-    ;;
    +-  esac
    +-  ;;
    +-
    +-solaris*)
    +-  case $cc_basename in
    +-  CC*)
    +-    # 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.
    +-    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
    +-    ;;
    +-  esac
    +-  ;;
    +-esac
    +-])
    +-
    +-case " $_LT_AC_TAGVAR(postdeps, $1) " in
    +-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
    +-esac
    +-])# AC_LIBTOOL_POSTDEP_PREDEP
    +-
    +-# AC_LIBTOOL_LANG_F77_CONFIG
    +-# --------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
    +-AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
    +-[AC_REQUIRE([AC_PROG_F77])
    +-AC_LANG_PUSH(Fortran 77)
    +-
    +-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
    +-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
    +-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
    +-_LT_AC_TAGVAR(module_cmds, $1)=
    +-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
    +-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
    +-_LT_AC_TAGVAR(no_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-_LT_AC_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_AC_TAGVAR(objext, $1)=$objext
    +-
    +-# Code to be used in simple compile tests
    +-lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
    +-
    +-# Code to be used in simple link tests
    +-lt_simple_link_test_code="      program t\n      end\n"
    +-
    +-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
    +-_LT_AC_SYS_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"
    +-CC=${F77-"f77"}
    +-compiler=$CC
    +-_LT_AC_TAGVAR(compiler, $1)=$CC
    +-_LT_CC_BASENAME([$compiler])
    +-
    +-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
    +-  ;;
    +-aix4* | aix5*)
    +-  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_AC_TAGVAR(GCC, $1)="$G77"
    +-_LT_AC_TAGVAR(LD, $1)="$LD"
    +-
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    +-
    +-AC_LIBTOOL_CONFIG($1)
    +-
    +-AC_LANG_POP
    +-CC="$lt_save_CC"
    +-])# AC_LIBTOOL_LANG_F77_CONFIG
    +-
    +-
    +-# AC_LIBTOOL_LANG_GCJ_CONFIG
    +-# --------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
    +-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
    +-[AC_LANG_SAVE
    +-
    +-# Source file extension for Java test sources.
    +-ac_ext=java
    ++],
    ++[
    ++  if test "$GCC" = yes; then
    ++    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    ++    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
    + 
    +-# Object file extension for compiled Java test sources.
    +-objext=o
    +-_LT_AC_TAGVAR(objext, $1)=$objext
    ++    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
    ++      ;;
    + 
    +-# Code to be used in simple compile tests
    +-lt_simple_compile_test_code="class foo {}\n"
    ++    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
    ++      ;;
    + 
    +-# Code to be used in simple link tests
    +-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
    ++    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    ++      # PIC is the default for these OSes.
    ++      ;;
    + 
    +-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
    +-_LT_AC_SYS_COMPILER
    ++    mingw* | cygwin* | pw32* | os2*)
    ++      # 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'])
    ++      ;;
    + 
    +-# save warnings/boilerplate of simple test code
    +-_LT_COMPILER_BOILERPLATE
    +-_LT_LINKER_BOILERPLATE
    ++    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'
    ++      ;;
    + 
    +-# Allow CC to be a program name with arguments.
    +-lt_save_CC="$CC"
    +-CC=${GCJ-"gcj"}
    +-compiler=$CC
    +-_LT_AC_TAGVAR(compiler, $1)=$CC
    +-_LT_CC_BASENAME([$compiler])
    ++    hpux*)
    ++      # 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)='-fPIC'
    ++	;;
    ++      esac
    ++      ;;
    + 
    +-# GCJ did not exist at the time GCC didn't implicitly link libc in.
    +-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    ++    interix[[3-9]]*)
    ++      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
    ++      # Instead, we relocate shared libraries at runtime.
    ++      ;;
    + 
    +-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
    ++    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
    ++      ;;
    + 
    +-## 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...
    +-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    ++    *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'
    ++      ;;
    + 
    +-AC_LIBTOOL_CONFIG($1)
    ++    sysv4*MP*)
    ++      if test -d /usr/nec; then
    ++	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
    ++      fi
    ++      ;;
    + 
    +-AC_LANG_RESTORE
    +-CC="$lt_save_CC"
    +-])# AC_LIBTOOL_LANG_GCJ_CONFIG
    ++    *)
    ++      _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*)
    ++      # 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'])
    ++      ;;
    + 
    +-# AC_LIBTOOL_LANG_RC_CONFIG
    +-# -------------------------
    +-# Ensure that the configuration vars for the Windows resource compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
    +-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
    +-[AC_LANG_SAVE
    ++    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'
    ++      ;;
    + 
    +-# Source file extension for RC test sources.
    +-ac_ext=rc
    ++    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'
    ++      ;;
    + 
    +-# Object file extension for compiled RC test sources.
    +-objext=o
    +-_LT_AC_TAGVAR(objext, $1)=$objext
    ++    linux* | k*bsd*-gnu)
    ++      case $cc_basename in
    ++      icc* | ecc* | ifort*)
    ++	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    ++	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    ++	_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
    ++      ;;
    + 
    +-# Code to be used in simple compile tests
    +-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
    ++    newsos6)
    ++      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    ++      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    ++      ;;
    + 
    +-# Code to be used in simple link tests
    +-lt_simple_link_test_code="$lt_simple_compile_test_code"
    ++    *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'
    ++      ;;
    + 
    +-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
    +-_LT_AC_SYS_COMPILER
    ++    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'
    ++      ;;
    + 
    +-# save warnings/boilerplate of simple test code
    +-_LT_COMPILER_BOILERPLATE
    +-_LT_LINKER_BOILERPLATE
    ++    rdos*)
    ++      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    ++      ;;
    + 
    +-# Allow CC to be a program name with arguments.
    +-lt_save_CC="$CC"
    +-CC=${RC-"windres"}
    +-compiler=$CC
    +-_LT_AC_TAGVAR(compiler, $1)=$CC
    +-_LT_CC_BASENAME([$compiler])
    +-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
    ++    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
    ++      ;;
    + 
    +-AC_LIBTOOL_CONFIG($1)
    ++    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'
    ++      ;;
    + 
    +-AC_LANG_RESTORE
    +-CC="$lt_save_CC"
    +-])# AC_LIBTOOL_LANG_RC_CONFIG
    ++    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'
    ++      ;;
    + 
    +-# AC_LIBTOOL_CONFIG([TAGNAME])
    +-# ----------------------------
    +-# If TAGNAME is not passed, then 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
    +-# TAGNAME from the matching tagged config vars.
    +-AC_DEFUN([AC_LIBTOOL_CONFIG],
    +-[# The else clause should only fire when bootstrapping the
    +-# libtool distribution, otherwise you forgot to ship ltmain.sh
    +-# with your package, and you will get complaints that there are
    +-# no rules to generate ltmain.sh.
    +-if test -f "$ltmain"; then
    +-  # 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
    +-  # Now quote all the things that may contain metacharacters while being
    +-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
    +-  # variables and quote the copies for generation of the libtool script.
    +-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
    +-    SED SHELL STRIP \
    +-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
    +-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
    +-    deplibs_check_method reload_flag reload_cmds need_locks \
    +-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
    +-    lt_cv_sys_global_symbol_to_c_name_address \
    +-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
    +-    old_postinstall_cmds old_postuninstall_cmds \
    +-    _LT_AC_TAGVAR(compiler, $1) \
    +-    _LT_AC_TAGVAR(CC, $1) \
    +-    _LT_AC_TAGVAR(LD, $1) \
    +-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
    +-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
    +-    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
    +-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
    +-    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
    +-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
    +-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
    +-    _LT_AC_TAGVAR(old_archive_cmds, $1) \
    +-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
    +-    _LT_AC_TAGVAR(predep_objects, $1) \
    +-    _LT_AC_TAGVAR(postdep_objects, $1) \
    +-    _LT_AC_TAGVAR(predeps, $1) \
    +-    _LT_AC_TAGVAR(postdeps, $1) \
    +-    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
    +-    _LT_AC_TAGVAR(archive_cmds, $1) \
    +-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
    +-    _LT_AC_TAGVAR(postinstall_cmds, $1) \
    +-    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
    +-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
    +-    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
    +-    _LT_AC_TAGVAR(no_undefined_flag, $1) \
    +-    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
    +-    _LT_AC_TAGVAR(hardcode_automatic, $1) \
    +-    _LT_AC_TAGVAR(module_cmds, $1) \
    +-    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
    +-    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
    +-    _LT_AC_TAGVAR(exclude_expsyms, $1) \
    +-    _LT_AC_TAGVAR(include_expsyms, $1); do
    +-
    +-    case $var in
    +-    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
    +-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
    +-    _LT_AC_TAGVAR(archive_cmds, $1) | \
    +-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
    +-    _LT_AC_TAGVAR(module_cmds, $1) | \
    +-    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
    +-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
    +-    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
    +-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
    +-    postinstall_cmds | postuninstall_cmds | \
    +-    old_postinstall_cmds | old_postuninstall_cmds | \
    +-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
    +-      # Double-quote double-evaled strings.
    +-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
    ++    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'
    +       ;;
    ++
    +     *)
    +-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
    ++      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +       ;;
    +     esac
    +-  done
    +-
    +-  case $lt_echo in
    +-  *'\[$]0 --fallback-echo"')
    +-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
    ++  fi
    ++])
    ++case $host_os in
    ++  # For platforms which do not support PIC, -DPIC is meaningless:
    ++  *djgpp*)
    ++    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
    +     ;;
    +-  esac
    +-
    +-ifelse([$1], [],
    +-  [cfgfile="${ofile}T"
    +-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
    +-  $rm -f "$cfgfile"
    +-  AC_MSG_NOTICE([creating $ofile])],
    +-  [cfgfile="$ofile"])
    +-
    +-  cat <<__EOF__ >> "$cfgfile"
    +-ifelse([$1], [],
    +-[#! $SHELL
    ++  *)
    ++    _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])
    + 
    +-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
    +-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
    +-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
    + #
    +-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
    +-# Free Software Foundation, Inc.
    +-#
    +-# This file is part of GNU Libtool:
    +-# Originally by Gordon Matzigkeit , 1996
    +-#
    +-# This program is free software; you can redistribute it and/or modify
    +-# it under the terms of the GNU General Public License as published by
    +-# the Free Software Foundation; either version 2 of the License, or
    +-# (at your option) any later version.
    ++# Check to make sure the PIC flag actually works.
    + #
    +-# 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.
    ++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])
    ++
    + #
    +-# 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.
    ++# Check to make sure the static flag actually works.
    + #
    +-# As a special exception to the GNU General Public License, if you
    +-# distribute this file as part of a program that contains a
    +-# configuration script generated by Autoconf, you may include it under
    +-# the same distribution terms that you use for the rest of that program.
    +-
    +-# A sed program that does not truncate output.
    +-SED=$lt_SED
    +-
    +-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
    +-Xsed="$SED -e 1s/^X//"
    +-
    +-# 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
    +-
    +-# The names of the tagged configurations supported by this script.
    +-available_tags=
    +-
    +-# ### BEGIN LIBTOOL CONFIG],
    +-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
    +-
    +-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
    +-
    +-# Shell to use when invoking shell scripts.
    +-SHELL=$lt_SHELL
    +-
    +-# Whether or not to build shared libraries.
    +-build_libtool_libs=$enable_shared
    +-
    +-# Whether or not to build static libraries.
    +-build_old_libs=$enable_static
    +-
    +-# Whether or not to add -lc for building shared libraries.
    +-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
    +-
    +-# Whether or not to disallow shared libs when runtime libs are static
    +-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
    +-
    +-# Whether or not to optimize for fast installation.
    +-fast_install=$enable_fast_install
    +-
    +-# The host system.
    +-host_alias=$host_alias
    +-host=$host
    +-host_os=$host_os
    ++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
    + 
    +-# The build system.
    +-build_alias=$build_alias
    +-build=$build
    +-build_os=$build_os
    + 
    +-# An echo program that does not interpret backslashes.
    +-echo=$lt_echo
    ++# _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*)
    ++    _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=
    + 
    +-# The archiver.
    +-AR=$lt_AR
    +-AR_FLAGS=$lt_AR_FLAGS
    ++  case $host_os in
    ++  cygwin* | mingw* | pw32*)
    ++    # 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
    + 
    +-# A C compiler.
    +-LTCC=$lt_LTCC
    ++  _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}'
    + 
    +-# LTCC compiler flags.
    +-LTCFLAGS=$lt_LTCFLAGS
    ++    # 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
    + 
    +-# A language-specific compiler.
    +-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
    ++    # 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
    + 
    +-# Is the compiler the GNU C compiler?
    +-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
    ++*** 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.
    + 
    +-# An ERE matcher.
    +-EGREP=$lt_EGREP
    ++_LT_EOF
    ++      fi
    ++      ;;
    + 
    +-# The linker used to build libraries.
    +-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
    ++    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
    ++      ;;
    + 
    +-# Whether we need hard or soft links.
    +-LN_S=$lt_LN_S
    ++    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
    ++      ;;
    + 
    +-# A BSD-compatible nm program.
    +-NM=$lt_NM
    ++    cygwin* | mingw* | pw32*)
    ++      # _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'
    + 
    +-# A symbol stripping program
    +-STRIP=$lt_STRIP
    ++      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
    ++      ;;
    + 
    +-# Used to examine libraries when file_magic_cmd begins "file"
    +-MAGIC_CMD=$MAGIC_CMD
    ++    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'
    ++      ;;
    + 
    +-# Used on cygwin: DLL creation program.
    +-DLLTOOL="$DLLTOOL"
    ++    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' ;;
    ++	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'
    + 
    +-# Used on cygwin: object dumper.
    +-OBJDUMP="$OBJDUMP"
    ++        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
    + 
    +-# Used on cygwin: assembler.
    +-AS="$AS"
    ++	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
    ++      ;;
    + 
    +-# The name of the directory that contains temporary libtool files.
    +-objdir=$objdir
    ++    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
    ++      ;;
    + 
    +-# How to create reloadable object files.
    +-reload_flag=$lt_reload_flag
    +-reload_cmds=$lt_reload_cmds
    ++    solaris*)
    ++      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
    ++	_LT_TAGVAR(ld_shlibs, $1)=no
    ++	cat <<_LT_EOF 1>&2
    + 
    +-# How to pass a linker flag through the compiler.
    +-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
    ++*** 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.
    + 
    +-# Object file suffix (normally "o").
    +-objext="$ac_objext"
    ++_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
    ++      ;;
    + 
    +-# Old archive suffix (normally "a").
    +-libext="$libext"
    ++    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
    + 
    +-# Shared library suffix (normally ".so").
    +-shrext_cmds='$shrext_cmds'
    ++*** 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.
    + 
    +-# Executable file suffix (normally "").
    +-exeext="$exeext"
    ++_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
    ++      ;;
    + 
    +-# Additional compiler flags for building library objects.
    +-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
    +-pic_mode=$pic_mode
    ++    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
    ++      ;;
    + 
    +-# What is the maximum length of a command?
    +-max_cmd_len=$lt_cv_sys_max_cmd_len
    ++    *)
    ++      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
    + 
    +-# Does compiler simultaneously support -c and -o options?
    +-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
    ++    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
    ++      ;;
    + 
    +-# Must we lock files when doing compilation?
    +-need_locks=$lt_need_locks
    ++    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
    + 
    +-# Do we need the lib prefix for modules?
    +-need_lib_prefix=$need_lib_prefix
    ++	# 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
    + 
    +-# Do we need a version for libraries?
    +-need_version=$need_version
    ++	exp_sym_flag='-bexport'
    ++	no_entry_flag='-bnoentry'
    ++      fi
    + 
    +-# Whether dlopen is supported.
    +-dlopen_support=$enable_dlopen
    ++      # 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.
    + 
    +-# Whether dlopen of programs is supported.
    +-dlopen_self=$enable_dlopen_self
    ++      _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,'
    + 
    +-# Whether dlopen of statically linked programs is supported.
    +-dlopen_self_static=$enable_dlopen_self_static
    ++      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
    + 
    +-# Compiler flag to prevent dynamic linking.
    +-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
    ++      # 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
    ++      ;;
    + 
    +-# Compiler flag to turn off builtin functions.
    +-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
    ++    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
    ++      ;;
    + 
    +-# Compiler flag to allow reflexive dlopens.
    +-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
    ++    bsdi[[45]]*)
    ++      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
    ++      ;;
    + 
    +-# Compiler flag to generate shared objects directly from archives.
    +-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
    ++    cygwin* | mingw* | pw32*)
    ++      # 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
    ++      ;;
    + 
    +-# Compiler flag to generate thread-safe objects.
    +-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
    ++    darwin* | rhapsody*)
    ++      _LT_DARWIN_LINKER_FEATURES($1)
    ++      ;;
    + 
    +-# Library versioning type.
    +-version_type=$version_type
    ++    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
    ++      ;;
    + 
    +-# Format of library name prefix.
    +-libname_spec=$lt_libname_spec
    ++    freebsd1*)
    ++      _LT_TAGVAR(ld_shlibs, $1)=no
    ++      ;;
    + 
    +-# 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.
    +-library_names_spec=$lt_library_names_spec
    ++    # 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
    ++      ;;
    + 
    +-# The coded name of the library, if different from the real name.
    +-soname_spec=$lt_soname_spec
    ++    # 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
    ++      ;;
    + 
    +-# Commands used to build and install an old-style archive.
    +-RANLIB=$lt_RANLIB
    +-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
    +-old_postinstall_cmds=$lt_old_postinstall_cmds
    +-old_postuninstall_cmds=$lt_old_postuninstall_cmds
    ++    # 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
    ++      ;;
    + 
    +-# Create an old-style archive from a shared archive.
    +-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
    ++    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
    + 
    +-# Create a temporary old-style archive to link instead of a shared archive.
    +-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
    ++      # 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'
    ++      ;;
    + 
    +-# Commands used to build and install a shared archive.
    +-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
    +-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
    +-postinstall_cmds=$lt_postinstall_cmds
    +-postuninstall_cmds=$lt_postuninstall_cmds
    ++    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
    ++      ;;
    + 
    +-# Commands used to build a loadable module (assumed same as above if empty)
    +-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
    +-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
    ++    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 ${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)=:
    + 
    +-# Commands to strip libraries.
    +-old_striplib=$lt_old_striplib
    +-striplib=$lt_striplib
    ++	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'
    + 
    +-# Dependencies to place before the objects being linked to create a
    +-# shared library.
    +-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
    ++	  # 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
    ++      ;;
    + 
    +-# Dependencies to place after the objects being linked to create a
    +-# shared library.
    +-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
    ++    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
    ++      ;;
    + 
    +-# Dependencies to place before the objects being linked to create a
    +-# shared library.
    +-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
    ++    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
    ++      ;;
    + 
    +-# Dependencies to place after the objects being linked to create a
    +-# shared library.
    +-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
    ++    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
    ++      ;;
    + 
    +-# The library search path used internally by the compiler when linking
    +-# a shared library.
    +-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
    ++    *nto* | *qnx*)
    ++      ;;
    + 
    +-# Method to check whether dependent libraries are shared objects.
    +-deplibs_check_method=$lt_deplibs_check_method
    ++    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
    ++      ;;
    + 
    +-# Command to use when deplibs_check_method == file_magic.
    +-file_magic_cmd=$lt_file_magic_cmd
    ++    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'
    ++      ;;
    + 
    +-# Flag that allows shared libraries with undefined symbols to be built.
    +-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
    ++    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)=:
    ++      ;;
    + 
    +-# Flag that forces no undefined symbols.
    +-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $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'
    + 
    +-# Commands used to finish a libtool library installation in a directory.
    +-finish_cmds=$lt_finish_cmds
    ++	# 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)=:
    ++      ;;
    + 
    +-# Same as above, but a single script fragment to be evaled but not shown.
    +-finish_eval=$lt_finish_eval
    ++    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
    ++      ;;
    + 
    +-# Take the output of nm and produce a listing of raw symbols and C names.
    +-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
    ++    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
    ++      ;;
    + 
    +-# Transform the output of nm in a proper C declaration
    +-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
    ++    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
    ++      ;;
    + 
    +-# Transform the output of nm in a C name address pair
    +-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
    ++    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'
    ++      ;;
    + 
    +-# This is the shared library runtime path variable.
    +-runpath_var=$runpath_var
    ++    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
    ++      ;;
    + 
    +-# This is the shared library path variable.
    +-shlibpath_var=$shlibpath_var
    ++    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'
    + 
    +-# Is shlibpath searched before the hard-coded library search path?
    +-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
    ++      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
    ++      ;;
    + 
    +-# How to hardcode a shared library path into an executable.
    +-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
    ++    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'
    + 
    +-# Whether we should hardcode library paths into libraries.
    +-hardcode_into_libs=$hardcode_into_libs
    ++      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
    ++      ;;
    + 
    +-# Flag to hardcode \$libdir into a binary during linking.
    +-# This must work even if \$libdir does not exist.
    +-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
    ++    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
    ++      ;;
    + 
    +-# If ld is used when linking, flag to hardcode \$libdir into
    +-# a binary during linking. This must work even if \$libdir does
    +-# not exist.
    +-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
    ++    *)
    ++      _LT_TAGVAR(ld_shlibs, $1)=no
    ++      ;;
    ++    esac
    + 
    +-# Whether we need a single -rpath flag with a separated argument.
    +-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
    ++    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
    + 
    +-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
    +-# resulting binary.
    +-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
    ++_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
    + 
    +-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
    +-# resulting binary.
    +-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
    ++_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])
    + 
    +-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
    +-# the resulting binary.
    +-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
    ++#
    ++# 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
    + 
    +-# Set to yes if building a shared library automatically hardcodes DIR into the library
    +-# and all subsequent libraries and executables linked against it.
    +-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
    ++  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
    + 
    +-# Variables whose values should be saved in libtool wrapper scripts and
    +-# restored at relink time.
    +-variables_saved_for_relink="$variables_saved_for_relink"
    ++      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
    + 
    +-# Whether libtool must link a program against all its dependency libraries.
    +-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
    ++_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
    + 
    +-# Compile-time system search path for libraries
    +-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
    + 
    +-# Run-time system search path for libraries
    +-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
    ++# _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)
    + 
    +-# Fix the shell variable \$srcfile for the compiler.
    +-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
    ++# Source file extension for C test sources.
    ++ac_ext=c
    + 
    +-# Set to yes if exported symbols are required.
    +-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
    ++# Object file extension for compiled C test sources.
    ++objext=o
    ++_LT_TAGVAR(objext, $1)=$objext
    + 
    +-# The commands to list exported symbols.
    +-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
    ++# Code to be used in simple compile tests
    ++lt_simple_compile_test_code="int some_variable = 0;"
    + 
    +-# The commands to extract the exported symbol list from a shared archive.
    +-extract_expsyms_cmds=$lt_extract_expsyms_cmds
    ++# Code to be used in simple link tests
    ++lt_simple_link_test_code='int main(){return(0);}'
    + 
    +-# Symbols that should not be listed in the preloaded symbols.
    +-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
    ++_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
    + 
    +-# Symbols that must always be exported.
    +-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
    ++# save warnings/boilerplate of simple test code
    ++_LT_COMPILER_BOILERPLATE
    ++_LT_LINKER_BOILERPLATE
    + 
    +-ifelse([$1],[],
    +-[# ### END LIBTOOL CONFIG],
    +-[# ### END LIBTOOL TAG CONFIG: $tagname])
    ++## 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])
    + 
    +-__EOF__
    ++  AC_MSG_CHECKING([whether to build shared libraries])
    ++  test "$can_build_shared" = "no" && enable_shared=no
    + 
    +-ifelse([$1],[], [
    ++  # On AIX, shared libraries and static libraries use the same namespace, and
    ++  # are all built from PIC.
    +   case $host_os in
    +   aix3*)
    +-    cat <<\EOF >> "$cfgfile"
    ++    test "$enable_shared" = yes && enable_static=no
    ++    if test -n "$RANLIB"; then
    ++      archive_cmds="$archive_cmds~\$RANLIB \$lib"
    ++      postinstall_cmds='$RANLIB $lib'
    ++    fi
    ++    ;;
    + 
    +-# 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
    +-EOF
    ++  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])
    + 
    +-  # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
    ++  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])
    + 
    +-  mv -f "$cfgfile" "$ofile" || \
    +-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
    +-  chmod +x "$ofile"
    +-])
    +-else
    +-  # If there is no Makefile yet, we rely on a make rule to execute
    +-  # `config.status --recheck' to rerun these tests and create the
    +-  # libtool script then.
    +-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
    +-  if test -f "$ltmain_in"; then
    +-    test -f Makefile && make "$ltmain"
    +-  fi
    ++  _LT_CONFIG($1)
    + fi
    +-])# AC_LIBTOOL_CONFIG
    +-
    +-
    +-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
    +-# -------------------------------------------
    +-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
    +-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
    +-
    +-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
    ++AC_LANG_POP
    ++CC="$lt_save_CC"
    ++])# _LT_LANG_C_CONFIG
    + 
    +-if test "$GCC" = yes; then
    +-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
    + 
    +-  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
    +-    lt_cv_prog_compiler_rtti_exceptions,
    +-    [-fno-rtti -fno-exceptions], [],
    +-    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
    ++# _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
    +-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
    ++popdef([AC_MSG_ERROR])
    ++])# _LT_PROG_CXX
    + 
    ++dnl aclocal-1.4 backwards compatibility:
    ++dnl AC_DEFUN([_LT_PROG_CXX], [])
    + 
    +-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
    +-# ---------------------------------
    +-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
    +-[AC_REQUIRE([AC_CANONICAL_HOST])
    +-AC_REQUIRE([AC_PROG_NM])
    +-AC_REQUIRE([AC_OBJEXT])
    +-# 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]]*\)'
    ++# _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
    + 
    +-# Transform an extracted symbol line into a proper C declaration
    +-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
    ++# Source file extension for C++ test sources.
    ++ac_ext=cpp
    + 
    +-# 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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
    ++# Object file extension for compiled C++ test sources.
    ++objext=o
    ++_LT_TAGVAR(objext, $1)=$objext
    + 
    +-# Define system-specific variables.
    +-case $host_os in
    +-aix*)
    +-  symcode='[[BCDT]]'
    +-  ;;
    +-cygwin* | mingw* | pw32*)
    +-  symcode='[[ABCDGISTW]]'
    +-  ;;
    +-hpux*) # Its linker distinguishes data from code symbols
    +-  if test "$host_cpu" = ia64; then
    +-    symcode='[[ABCDEGRST]]'
    ++# 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
    +-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
    +-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
    +-  ;;
    +-linux*)
    +-  if test "$host_cpu" = ia64; then
    +-    symcode='[[ABCDGIRSTW]]'
    +-    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
    +-    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
    ++  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
    +-  ;;
    +-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
    +-
    +-# 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
    +-
    +-# If we're using GNU nm, then use its standard symbol codes.
    +-case `$NM -V 2>&1` in
    +-*GNU* | *'with BFD'*)
    +-  symcode='[[ABCDGIRSTW]]' ;;
    +-esac
    +-
    +-# Try without a prefix undercore, 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.
    +-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    +-
    +-  # Check to see that the pipe works correctly.
    +-  pipe_works=no
    +-
    +-  rm -f conftest*
    +-  cat > conftest.$ac_ext < $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 < conftest.$ac_ext
    +-#ifdef __cplusplus
    +-extern "C" {
    +-#endif
    +-
    +-EOF
    +-	  # Now generate the symbol file.
    +-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
    +-
    +-	  cat <> conftest.$ac_ext
    +-#if defined (__STDC__) && __STDC__
    +-# define lt_ptr_t void *
    +-#else
    +-# define lt_ptr_t char *
    +-# define const
    +-#endif
    +-
    +-/* The mapping between symbol names and symbols. */
    +-const struct {
    +-  const char *name;
    +-  lt_ptr_t address;
    +-}
    +-lt_preloaded_symbols[[]] =
    +-{
    +-EOF
    +-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
    +-	  cat <<\EOF >> conftest.$ac_ext
    +-  {0, (lt_ptr_t) 0}
    +-};
    ++  test -z "${LDCXX+set}" || LD=$LDCXX
    ++  CC=${CXX-"c++"}
    ++  compiler=$CC
    ++  _LT_TAGVAR(compiler, $1)=$CC
    ++  _LT_CC_BASENAME([$compiler])
    + 
    +-#ifdef __cplusplus
    +-}
    +-#endif
    +-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_AC_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
    ++  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
    +-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
    ++      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
    +     fi
    +-  else
    +-    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
    +-    cat conftest.$ac_ext >&5
    +-  fi
    +-  rm -f 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
    +-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
    + 
    ++    if test "$GXX" = yes; then
    ++      # Set up default GNU C++ configuration
    + 
    +-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
    +-# ---------------------------------------
    +-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
    +-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
    +-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
    ++      LT_PATH_LD
    + 
    +-AC_MSG_CHECKING([for $compiler option to produce PIC])
    +- ifelse([$1],[CXX],[
    +-  # C++ specific cases for pic, static, wl, etc.
    +-  if test "$GXX" = yes; then
    +-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
    ++      # 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=
    + 
    +-    case $host_os in
    +-    aix*)
    +-      # All AIX code is PIC.
    +-      if test "$host_cpu" = ia64; then
    +-	# AIX 5 now supports IA64 processor
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      fi
    +-      ;;
    +-    amigaos*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
    +-      ;;
    +-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    +-      # PIC is the default for these OSes.
    +-      ;;
    +-    mingw* | cygwin* | os2* | pw32*)
    +-      # 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
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
    +-      ;;
    +-    *djgpp*)
    +-      # DJGPP does not support shared libraries at all
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-      ;;
    +-    interix3*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
    ++        # 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
    +-      ;;
    +-    hpux*)
    +-      # 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*)
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    +-	;;
    +-      esac
    +-      ;;
    +-    *)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    +-      ;;
    +-    esac
    +-  else
    ++
    ++      # 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
    +-      aix4* | aix5*)
    +-	# All AIX code is PIC.
    +-	if test "$host_cpu" = ia64; then
    +-	  # AIX 5 now supports IA64 processor
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    ++      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
    ++
    ++        # 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_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
    ++	  _LT_TAGVAR(ld_shlibs, $1)=no
    + 	fi
    + 	;;
    ++
    +       chorus*)
    +-	case $cc_basename in
    +-	cxch68*)
    +-	  # Green Hills C++ Compiler
    +-	  # _LT_AC_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"
    ++        case $cc_basename in
    ++          *)
    ++	  # FIXME: insert proper C++ library support
    ++	  _LT_TAGVAR(ld_shlibs, $1)=no
    + 	  ;;
    +-	esac
    ++        esac
    ++        ;;
    ++
    ++      cygwin* | mingw* | pw32*)
    ++        # _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)
    + 	;;
    +-       darwin*)
    +-         # PIC is the default on this platform
    +-         # Common symbols not allowed in MH_DYLIB files
    +-         case $cc_basename in
    +-           xlc*)
    +-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
    +-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-           ;;
    +-         esac
    +-       ;;
    ++
    +       dgux*)
    +-	case $cc_basename in
    +-	  ec++*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    ++        case $cc_basename in
    ++          ec++*)
    ++	    # FIXME: insert proper C++ library support
    ++	    _LT_TAGVAR(ld_shlibs, $1)=no
    + 	    ;;
    +-	  ghcx*)
    ++          ghcx*)
    + 	    # Green Hills C++ Compiler
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    ++	    # 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* | kfreebsd*-gnu | dragonfly*)
    +-	# FreeBSD uses GNU C++
    +-	;;
    +-      hpux9* | hpux10* | hpux11*)
    +-	case $cc_basename in
    +-	  CC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
    +-	    if test "$host_cpu" != ia64; then
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
    +-	    fi
    ++        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*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
    ++          aCC*)
    + 	    case $host_cpu in
    +-	    hppa*64*|ia64*)
    +-	      # +Z the default
    +-	      ;;
    +-	    *)
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
    +-	      ;;
    ++	      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*)
    +-	# 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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-	    # CC pic flag -KPIC is the default.
    ++        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
    +-	;;
    +-      linux*)
    +-	case $cc_basename in
    +-	  KCC*)
    +-	    # KAI C++ Compiler
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    ++        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*)
    ++	  icpc* | ecpc* )
    + 	    # Intel C++
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
    +-	    ;;
    +-	  pgCC*)
    +-	    # Portland Group C++ compiler.
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
    +-	    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    ++	    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'
    + 	    ;;
    +-	  *)
    +-	    case `$CC -V 2>&1 | sed 5q` in
    +-	    *Sun\ C*)
    +-	      # Sun C++ 5.9
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
    ++          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
    +-	    ;;
    +-	esac
    +-	;;
    +-      lynxos*)
    +-	;;
    +-      m88k*)
    +-	;;
    +-      mvs*)
    +-	case $cc_basename in
    +-	  cxx*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      netbsd*)
    +-	;;
    +-      osf3* | osf4* | osf5*)
    +-	case $cc_basename in
    +-	  KCC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
    +-	    ;;
    +-	  RCC*)
    +-	    # Rational C++ 2.4.1
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    ;;
    ++
    ++	    _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*)
    +-	    # Digital/Compaq C++
    +-	    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-	    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
    +-	    ;;
    +-	  gcx*)
    +-	    # Green Hills C++ Compiler
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      sunos4*)
    +-	case $cc_basename in
    +-	  CC*)
    +-	    # Sun C++ 4.x
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	    ;;
    +-	  lcc*)
    +-	    # Lucid
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    ;;
    +-	  *)
    ++	    # 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'
    + 	    ;;
    +-	esac
    +-	;;
    +-      tandem*)
    +-	case $cc_basename in
    +-	  NCC*)
    +-	    # NonStop-UX NCC 3.20
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    ++	  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
    + 	;;
    +-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
    +-	case $cc_basename in
    +-	  CC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    ++
    ++      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
    + 	;;
    +-      vxworks*)
    ++
    ++      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::"'
    + 	;;
    +-      *)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    ++
    ++      *nto* | *qnx*)
    ++        _LT_TAGVAR(ld_shlibs, $1)=yes
    + 	;;
    +-    esac
    +-  fi
    +-],
    +-[
    +-  if test "$GCC" = yes; then
    +-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      fi
    +-      ;;
    ++      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
    ++	;;
    + 
    +-    amigaos*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
    +-      ;;
    ++      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
    + 
    +-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    +-      # PIC is the default for these OSes.
    +-      ;;
    ++	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
    + 
    +-    mingw* | cygwin* | pw32* | os2*)
    +-      # 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
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
    +-      ;;
    ++	    # 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
    ++        ;;
    + 
    +-    darwin* | rhapsody*)
    +-      # PIC is the default on this platform
    +-      # Common symbols not allowed in MH_DYLIB files
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
    +-      ;;
    ++      psos*)
    ++        # FIXME: insert proper C++ library support
    ++        _LT_TAGVAR(ld_shlibs, $1)=no
    ++        ;;
    + 
    +-    interix3*)
    +-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
    +-      # Instead, we relocate shared libraries at runtime.
    +-      ;;
    ++      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
    ++        ;;
    + 
    +-    msdosdjgpp*)
    +-      # Just because we use GCC doesn't mean we suddenly get shared libraries
    +-      # on systems that don't support them.
    +-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-      enable_shared=no
    +-      ;;
    ++      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
    + 
    +-    sysv4*MP*)
    +-      if test -d /usr/nec; then
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
    +-      fi
    +-      ;;
    ++	    output_verbose_link_cmd='echo'
    + 
    +-    hpux*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    +-	;;
    +-      esac
    +-      ;;
    ++	    # 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'
    + 
    +-    *)
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      if test "$host_cpu" = ia64; then
    +-	# AIX 5 now supports IA64 processor
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      else
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
    +-      fi
    +-      ;;
    +-      darwin*)
    +-        # PIC is the default on this platform
    +-        # Common symbols not allowed in MH_DYLIB files
    +-       case $cc_basename in
    +-         xlc*)
    +-         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
    +-         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-         ;;
    +-       esac
    +-       ;;
    ++	    # 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
    ++        ;;
    + 
    +-    mingw* | cygwin* | pw32* | os2*)
    +-      # 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
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
    +-      ;;
    ++    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'
    + 
    +-    hpux9* | hpux10* | hpux11*)
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
    +-	;;
    ++      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
    +-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
    +       ;;
    + 
    +-    irix5* | irix6* | nonstopux*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      # PIC (with -KPIC) is the default.
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-      ;;
    ++      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'
    + 
    +-    newsos6)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    ++	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
    +       ;;
    + 
    +-    linux*)
    +-      case $cc_basename in
    +-      icc* | ecc*)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	_LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-        ;;
    +-      ccc*)
    +-        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-        # All Alpha code is PIC.
    +-        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    ++      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
    +         ;;
    +-      como)
    +-        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-lopt='
    ++
    ++      vxworks*)
    ++        # FIXME: insert proper C++ library support
    ++        _LT_TAGVAR(ld_shlibs, $1)=no
    +         ;;
    ++
    +       *)
    +-        case `$CC -V 2>&1 | sed 5q` in
    +-	*Sun\ C*)
    +-	  # Sun C 5.9
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	  ;;
    +-	*Sun\ F*)
    +-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
    +-	  ;;
    +-	esac
    +-	;;
    +-      esac
    +-      ;;
    ++        # FIXME: insert proper C++ library support
    ++        _LT_TAGVAR(ld_shlibs, $1)=no
    ++        ;;
    ++    esac
    + 
    +-    osf3* | osf4* | osf5*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      # All OSF/1 code is PIC.
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-      ;;
    ++    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
    ++    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
    + 
    +-    solaris*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      case $cc_basename in
    +-      f77* | f90* | f95*)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
    +-      *)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
    +-      esac
    +-      ;;
    ++    _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
    + 
    +-    sunos4*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    ++  for p in `eval "$output_verbose_link_cmd"`; do
    ++    case $p in
    + 
    +-    sysv4 | sysv4.2uw2* | sysv4.3*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    ++    -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
    + 
    +-    sysv4*MP*)
    +-      if test -d /usr/nec ;then
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      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
    ++       ;;
    + 
    +-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    ++    *.$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
    + 
    +-    unicos*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-      ;;
    ++       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
    ++       ;;
    + 
    +-    uts4*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    ++    *) ;; # Ignore the rest.
    + 
    +-    *)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-      ;;
    +     esac
    +-  fi
    +-])
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
    ++  done
    + 
    +-#
    +-# Check to make sure the PIC flag actually works.
    +-#
    +-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
    +-  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
    +-    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
    +-    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
    +-     "" | " "*) ;;
    +-     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
    +-     esac],
    +-    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
    ++  # Clean up.
    ++  rm -f a.out a.exe
    ++else
    ++  echo "libtool.m4: error: problem compiling $1 test program"
    + fi
    +-case $host_os in
    +-  # For platforms which do not support PIC, -DPIC is meaningless:
    +-  *djgpp*)
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-    ;;
    +-  *)
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
    +-    ;;
    +-esac
    +-
    +-#
    +-# Check to make sure the static flag actually works.
    +-#
    +-wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
    +-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
    +-  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
    +-  $lt_tmp_static_flag,
    +-  [],
    +-  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
    +-])
    + 
    ++$RM -f confest.$objext
    + 
    +-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
    +-# ------------------------------------
    +-# See if the linker supports building shared libraries.
    +-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
    +-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
    +-ifelse([$1],[CXX],[
    +-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
    +-  case $host_os in
    +-  aix4* | aix5*)
    +-    # 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_AC_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_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
    +-  ;;
    +-  cygwin* | mingw*)
    +-    _LT_AC_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_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
    ++# 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)=
    +   ;;
    +-  esac
    +-],[
    +-  runpath_var=
    +-  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
    +-  _LT_AC_TAGVAR(archive_cmds, $1)=
    +-  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
    +-  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
    +-  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
    +-  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
    +-  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
    +-  _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
    +-  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
    +-  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
    +-  _LT_AC_TAGVAR(module_cmds, $1)=
    +-  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
    +-  _LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
    +-  # include_expsyms should be a list of space-separated symbols to be *always*
    +-  # included in the symbol list
    +-  _LT_AC_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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
    +-  # 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.
    +-  extract_expsyms_cmds=
    +-  # Just being paranoid about ensuring that cc_basename is set.
    +-  _LT_CC_BASENAME([$compiler])
    +-  case $host_os in
    +-  cygwin* | mingw* | pw32*)
    +-    # 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
    +-    _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
    +-      else
    +-  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-    fi
    +-    supports_anon_versioning=no
    +-    case `$LD -v 2>/dev/null` 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
    +-    aix3* | aix4* | aix5*)
    +-      # On AIX/PPC, the GNU linker is very broken
    +-      if test "$host_cpu" != ia64; then
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	cat <&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.
    +-
    +-EOF
    +-      fi
    +-      ;;
    + 
    +-    amigaos*)
    +-      _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-
    +-      # Samuel A. Falvo II  reports
    +-      # that the semantics of dynamic libraries on AmigaOS, at least up
    +-      # to version 4, is to share data among multiple programs linked
    +-      # with the same dynamic library.  Since this doesn't match the
    +-      # behavior of shared libraries on other platforms, we can't use
    +-      # them.
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    ++linux*)
    ++  case `$CC -V 2>&1 | sed 5q` in
    ++  *Sun\ C*)
    ++    # Sun C++ 5.9
    + 
    +-    beos*)
    +-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-	# Joseph Beckenbach  says some releases of gcc
    +-	# support --undefined.  This deserves some investigation.  FIXME
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-      else
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    ++    # 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
    + 
    +-    cygwin* | mingw* | pw32*)
    +-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
    +-      # as there is no search path for DLLs.
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      _LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
    +-      _LT_AC_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_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    ++    if test "$solaris_use_stlport4" != yes; then
    ++      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
    ++    fi
    ++    ;;
    ++  esac
    ++  ;;
    + 
    +-    interix3*)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-      _LT_AC_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_AC_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_AC_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'
    ++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
    + 
    +-    linux*)
    +-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	tmp_addflag=
    +-	case $cc_basename,$host_cpu in
    +-	pgcc*)				# Portland Group C compiler
    +-	  _LT_AC_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_AC_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' ;;
    +-	esac
    +-	case `$CC -V 2>&1 | sed 5q` in
    +-	*Sun\ C*)			# Sun C 5.9
    +-	  _LT_AC_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 /dev/null'
    +-	  tmp_sharedflag='-G' ;;
    +-	*Sun\ F*)			# Sun Fortran 8.3
    +-	  tmp_sharedflag='-G' ;;
    +-	*)
    +-	  tmp_sharedflag='-shared' ;;
    +-	esac
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    ++    # 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
    ++])
    + 
    +-	if test $supports_anon_versioning = yes; then
    +-	  _LT_AC_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
    +-      else
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    ++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
    + 
    +-    netbsd*)
    +-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
    +-	wlarc=
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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
    +-      ;;
    ++dnl aclocal-1.4 backwards compatibility:
    ++dnl AC_DEFUN([_LT_PROG_F77], [])
    + 
    +-    solaris*)
    +-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	cat <&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_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)
    + 
    +-EOF
    +-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    ++_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
    + 
    +-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
    +-      case `$LD -v 2>&1` in
    +-        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	cat <<_LT_EOF 1>&2
    ++# Source file extension for f77 test sources.
    ++ac_ext=f
    + 
    +-*** 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.
    ++# Object file extension for compiled f77 test sources.
    ++objext=o
    ++_LT_TAGVAR(objext, $1)=$objext
    + 
    +-_LT_EOF
    +-	;;
    +-	*)
    +-	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
    +-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
    +-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
    +-	  else
    +-	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	  fi
    +-	;;
    +-      esac
    +-      ;;
    ++# 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
    ++"
    + 
    +-    sunos4*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
    +-      wlarc=
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++  # Code to be used in simple link tests
    ++  lt_simple_link_test_code="\
    ++      program t
    ++      end
    ++"
    + 
    +-    *)
    +-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-    esac
    ++  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
    ++  _LT_TAG_COMPILER
    + 
    +-    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
    +-      runpath_var=
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-      _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
    +-      _LT_AC_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_AC_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_AC_TAGVAR(hardcode_direct, $1)=unsupported
    +-      fi
    +-      ;;
    ++  # 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])
    + 
    +-    aix4* | aix5*)
    +-      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_AC_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_AC_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'
    ++    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
    +-	aix_use_runtimelinking=no
    ++        ;;
    ++    esac
    ++    AC_MSG_RESULT([$enable_shared])
    + 
    +-	# 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]].*|aix5*)
    +-	  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
    ++    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
    + 
    +-	exp_sym_flag='-bexport'
    +-	no_entry_flag='-bnoentry'
    +-      fi
    ++AC_LANG_POP
    ++])# _LT_LANG_F77_CONFIG
    + 
    +-      # 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_AC_TAGVAR(archive_cmds, $1)=''
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    ++# _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
    + 
    +-      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
    +-  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	  else
    +-  	  # We have old collect2
    +-  	  _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-  	  _LT_AC_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
    ++dnl aclocal-1.4 backwards compatibility:
    ++dnl AC_DEFUN([_LT_PROG_FC], [])
    + 
    +-      # It seems that -bexpall does not export symbols beginning with
    +-      # underscore (_), so it is better to generate a list of symbols to export.
    +-      _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
    +-       # Determine the default libpath from the value encoded in an empty executable.
    +-       _LT_AC_SYS_LIBPATH_AIX
    +-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
    +-	_LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
    +-       else
    +-	if test "$host_cpu" = ia64; then
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
    +-	  _LT_AC_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_AC_SYS_LIBPATH_AIX
    +-	 _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
    +-	  # Exported symbols can be pulled into shared objects from archives
    +-	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
    +-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-	  # This is similar to how AIX traditionally builds its shared libraries.
    +-	  _LT_AC_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*)
    +-      _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      # see comment about different semantics on the GNU ld section
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    ++# _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
    + 
    +-    bsdi[[45]]*)
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
    +-      ;;
    ++# Source file extension for fc test sources.
    ++ac_ext=${ac_fc_srcext-f}
    + 
    +-    cygwin* | mingw* | pw32*)
    +-      # 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
    +-      _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
    +-      # The linker will automatically build a .lib file if we build a DLL.
    +-      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
    +-      # FIXME: Should let the user specify the lib program.
    +-      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
    +-      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
    +-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
    +-      ;;
    ++# Object file extension for compiled fc test sources.
    ++objext=o
    ++_LT_TAGVAR(objext, $1)=$objext
    + 
    +-    darwin* | rhapsody*)
    +-      case $host_os in
    +-        rhapsody* | darwin1.[[012]])
    +-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
    +-         ;;
    +-       *) # Darwin 1.3 on
    +-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
    +-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-         else
    +-           case ${MACOSX_DEPLOYMENT_TARGET} in
    +-             10.[[012]])
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-               ;;
    +-             10.*)
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
    +-               ;;
    +-           esac
    +-         fi
    +-         ;;
    +-      esac
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-    if test "$GCC" = yes ; then
    +-    	output_verbose_link_cmd='echo'
    +-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
    +-      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-    else
    +-      case $cc_basename in
    +-        xlc*)
    +-         output_verbose_link_cmd='echo'
    +-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
    +-         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          ;;
    +-       *)
    +-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-          ;;
    +-      esac
    +-    fi
    +-      ;;
    ++# 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
    ++"
    + 
    +-    dgux*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++  # Code to be used in simple link tests
    ++  lt_simple_link_test_code="\
    ++      program t
    ++      end
    ++"
    + 
    +-    freebsd1*)
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    ++  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
    ++  _LT_TAG_COMPILER
    + 
    +-    # 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_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++  # 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
    + 
    +-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
    +-    freebsd2*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++  _LT_TAGVAR(compiler, $1)=$CC
    ++  _LT_CC_BASENAME([$compiler])
    + 
    +-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
    +-    freebsd* | kfreebsd*-gnu | dragonfly*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++  if test -n "$compiler"; then
    ++    AC_MSG_CHECKING([if libtool supports shared libraries])
    ++    AC_MSG_RESULT([$can_build_shared])
    + 
    +-    hpux9*)
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    ++    AC_MSG_CHECKING([whether to build shared libraries])
    ++    test "$can_build_shared" = "no" && enable_shared=no
    + 
    +-      # hardcode_minus_L: Not really in the search PATH,
    +-      # but as the default location of the library.
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-      ;;
    ++    # 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])
    + 
    +-    hpux10*)
    +-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    ++    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
    + 
    +-	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    ++AC_LANG_POP
    ++])# _LT_LANG_FC_CONFIG
    + 
    +-	# hardcode_minus_L: Not really in the search PATH,
    +-	# but as the default location of the library.
    +-	_LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	ia64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	*)
    +-	  _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	ia64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	*)
    +-	  _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    ++# _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
    + 
    +-	case $host_cpu in
    +-	hppa*64*|ia64*)
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-	  ;;
    +-	*)
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    ++# Source file extension for Java test sources.
    ++ac_ext=java
    + 
    +-	  # hardcode_minus_L: Not really in the search PATH,
    +-	  # but as the default location of the library.
    +-	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-	  ;;
    +-	esac
    +-      fi
    +-      ;;
    ++# Object file extension for compiled Java test sources.
    ++objext=o
    ++_LT_TAGVAR(objext, $1)=$objext
    + 
    +-    irix5* | irix6* | nonstopux*)
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-      ;;
    ++# Code to be used in simple compile tests
    ++lt_simple_compile_test_code="class foo {}"
    + 
    +-    netbsd*)
    +-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++# Code to be used in simple link tests
    ++lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
    + 
    +-    newsos6)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++# 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])
    + 
    +-    openbsd*)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-      else
    +-       case $host_os in
    +-	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
    +-	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
    +-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-	   ;;
    +-	 *)
    +-	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
    +-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	   ;;
    +-       esac
    +-      fi
    +-      ;;
    ++# GCJ did not exist at the time GCC didn't implicitly link libc in.
    ++_LT_TAGVAR(archive_cmds_need_lc, $1)=no
    + 
    +-    os2*)
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
    +-      ;;
    ++_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
    + 
    +-    osf3*)
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-      else
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      ;;
    ++## 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)
    + 
    +-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      else
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_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~
    +-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
    ++  _LT_CONFIG($1)
    ++fi
    + 
    +-	# Both c and cxx compiler support -rpath directly
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      ;;
    ++AC_LANG_RESTORE
    + 
    +-    solaris*)
    +-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
    +-      if test "$GCC" = yes; then
    +-	wlarc='${wl}'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
    +-      else
    +-	wlarc=''
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	_LT_AC_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'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      case $host_os in
    +-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
    +-      *)
    +- 	# The compiler driver will combine linker options so we
    +- 	# cannot just pass the convience library names through
    +- 	# without $wl, iff we do not link with $LD.
    +- 	# Luckily, gcc supports the same syntax we need for Sun Studio.
    +- 	# Supported since Solaris 2.6 (maybe 2.5.1?)
    +- 	case $wlarc in
    +- 	'')
    +- 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
    +- 	*)
    +- 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
    +- 	esac ;;
    +-      esac
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-      ;;
    ++GCC=$lt_save_GCC
    ++CC="$lt_save_CC"
    ++])# _LT_LANG_GCJ_CONFIG
    + 
    +-    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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    + 
    +-    sysv4)
    +-      case $host_vendor in
    +-	sni)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
    +-	;;
    +-	siemens)
    +-	  ## LD is ld it makes a PLAMLIB
    +-	  ## CC just makes a GrossModule.
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
    +-	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-        ;;
    +-	motorola)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
    +-	;;
    +-      esac
    +-      runpath_var='LD_RUN_PATH'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++# _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
    + 
    +-    sysv4.3*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
    +-      ;;
    ++# Source file extension for RC test sources.
    ++ac_ext=rc
    + 
    +-    sysv4*MP*)
    +-      if test -d /usr/nec; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-	runpath_var=LD_RUN_PATH
    +-	hardcode_runpath_var=yes
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
    +-      fi
    +-      ;;
    ++# Object file extension for compiled RC test sources.
    ++objext=o
    ++_LT_TAGVAR(objext, $1)=$objext
    + 
    +-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
    +-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      runpath_var='LD_RUN_PATH'
    ++# Code to be used in simple compile tests
    ++lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
    + 
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      fi
    +-      ;;
    ++# Code to be used in simple link tests
    ++lt_simple_link_test_code="$lt_simple_compile_test_code"
    + 
    +-    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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
    +-      runpath_var='LD_RUN_PATH'
    ++# ltmain only uses $CC for tagged configurations so make sure $CC is set.
    ++_LT_TAG_COMPILER
    + 
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      fi
    +-      ;;
    ++# save warnings/boilerplate of simple test code
    ++_LT_COMPILER_BOILERPLATE
    ++_LT_LINKER_BOILERPLATE
    + 
    +-    uts4*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    ++# 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
    + 
    +-    *)
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    +-    esac
    +-  fi
    +-])
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
    +-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
    ++if test -n "$compiler"; then
    ++  :
    ++  _LT_CONFIG($1)
    ++fi
    + 
    +-#
    +-# Do we need to explicitly link libc?
    +-#
    +-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
    +-x|xyes)
    +-  # Assume -lc should be added
    +-  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    ++GCC=$lt_save_GCC
    ++AC_LANG_RESTORE
    ++CC="$lt_save_CC"
    ++])# _LT_LANG_RC_CONFIG
    + 
    +-  if test "$enable_shared" = yes && test "$GCC" = yes; then
    +-    case $_LT_AC_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*
    +-      printf "$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_AC_TAGVAR(lt_prog_compiler_wl, $1)
    +-	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
    +-        compiler_flags=-v
    +-        linker_flags=-v
    +-        verstring=
    +-        output_objdir=.
    +-        libname=conftest
    +-        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
    +-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
    +-        then
    +-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-        else
    +-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-        fi
    +-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
    +-      else
    +-        cat conftest.err 1>&5
    +-      fi
    +-      $rm conftest*
    +-      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
    +-      ;;
    +-    esac
    +-  fi
    +-  ;;
    +-esac
    +-])# AC_LIBTOOL_PROG_LD_SHLIBS
    ++# 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_AC_FILE_LTDLL_C
    +-# -------------------
    +-# Be careful that the start marker always follows a newline.
    +-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
    +-# /* ltdll.c starts here */
    +-# #define WIN32_LEAN_AND_MEAN
    +-# #include 
    +-# #undef WIN32_LEAN_AND_MEAN
    +-# #include 
    +-#
    +-# #ifndef __CYGWIN__
    +-# #  ifdef __CYGWIN32__
    +-# #    define __CYGWIN__ __CYGWIN32__
    +-# #  endif
    +-# #endif
    +-#
    +-# #ifdef __cplusplus
    +-# extern "C" {
    +-# #endif
    +-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
    +-# #ifdef __cplusplus
    +-# }
    +-# #endif
    +-#
    +-# #ifdef __CYGWIN__
    +-# #include 
    +-# DECLARE_CYGWIN_DLL( DllMain );
    +-# #endif
    +-# HINSTANCE __hDllInstance_base;
    +-#
    +-# BOOL APIENTRY
    +-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
    +-# {
    +-#   __hDllInstance_base = hInst;
    +-#   return TRUE;
    +-# }
    +-# /* ltdll.c ends here */
    +-])# _LT_AC_FILE_LTDLL_C
    + 
    ++# LT_PROG_RC
    ++# ----------
    ++AC_DEFUN([LT_PROG_RC],
    ++[AC_CHECK_TOOL(RC, windres,)
    ++])
    + 
    +-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
    +-# ---------------------------------
    +-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
    ++# Old name:
    ++AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
    ++dnl aclocal-1.4 backwards compatibility:
    ++dnl AC_DEFUN([LT_AC_PROG_RC], [])
    + 
    + 
    +-# old names
    +-AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
    +-AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
    +-AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
    +-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
    +-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
    +-AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
    +-AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
    +-
    +-# This is just to silence aclocal about the macro not being used
    +-ifelse([AC_DISABLE_FAST_INSTALL])
    +-
    +-AC_DEFUN([LT_AC_PROG_GCJ],
    +-[AC_CHECK_TOOL(GCJ, gcj, no)
    +-  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
    +-  AC_SUBST(GCJFLAGS)
    ++# _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])
    + ])
    + 
    +-AC_DEFUN([LT_AC_PROG_RC],
    +-[AC_CHECK_TOOL(RC, windres, no)
    +-])
    + 
    ++# _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.                               #
    + ############################################################
    +-# LT_AC_PROG_SED
    +-# --------------
    +-# Check for a fully-functional sed program, that truncates
    +-# as few characters as possible.  Prefer GNU sed if found.
    +-AC_DEFUN([LT_AC_PROG_SED],
    ++
    ++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.
    +@@ -6435,6 +7010,7 @@ do
    +     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
    +@@ -6467,5 +7043,268 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xp
    + 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/libs/libiconv-full/patches/103-configure_ac_fix.patch b/libs/libiconv-full/patches/103-configure_ac_fix.patch
    new file mode 100644
    index 0000000..d57ae84
    --- /dev/null
    +++ b/libs/libiconv-full/patches/103-configure_ac_fix.patch
    @@ -0,0 +1,31 @@
    +--- /dev/null
    ++++ b/Makefile.am
    +@@ -0,0 +1,2 @@
    ++ACLOCAL_AMFLAGS = -I m4
    ++SUBDIRS = .
    +--- /dev/null
    ++++ b/libcharset/Makefile.am
    +@@ -0,0 +1 @@
    ++ACLOCAL_AMFLAGS = -I m4
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -54,7 +54,7 @@ AC_ISC_POSIX
    + 
    + dnl           checks for installer options
    + 
    +-AC_RELOCATABLE
    ++gl_RELOCATABLE
    + 
    + AC_ARG_ENABLE([extra-encodings],
    +   [AC_HELP_STRING([--enable-extra-encodings],
    +--- a/libcharset/configure.ac
    ++++ b/libcharset/configure.ac
    +@@ -41,7 +41,7 @@ AC_CANONICAL_HOST
    + 
    + dnl           checks for installer options
    + 
    +-AC_RELOCATABLE_LIBRARY
    ++gl_RELOCATABLE_LIBRARY
    + 
    + dnl           checks for programs
    + 
    diff --git a/libs/libiconv-full/patches/200-work-with-libtool2.patch b/libs/libiconv-full/patches/200-work-with-libtool2.patch
    new file mode 100644
    index 0000000..6e31967
    --- /dev/null
    +++ b/libs/libiconv-full/patches/200-work-with-libtool2.patch
    @@ -0,0 +1,17 @@
    +Make iconv 1.11.x link correctly with libtool2 - argument "-Xcompiler" ensures "-shared" is passed to $(CC) when used as linker. Otherwise $(CC) tries to create an executable and fails while looking for a main()-function
    +
    +diff -ruN libiconv-1.11.1/lib/Makefile.in libiconv-1.11.1.mod/lib/Makefile.in
    +--- libiconv-1.11.1/lib/Makefile.in	2006-07-14 15:18:42.000000000 +0200
    ++++ libiconv-1.11.1.mod/lib/Makefile.in	2010-12-01 20:47:57.000000000 +0100
    +@@ -70,9 +70,9 @@
    + 
    + preloadable_libiconv_linux.so : $(SOURCES)
    + 	if test -n "@GCC@"; then \
    +-	  $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \
    ++	  $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -Xcompiler -shared -o preloadable_libiconv_linux.so; \
    + 	else \
    +-	  $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \
    ++	  $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -Xcompiler -shared -o preloadable_libiconv_linux.so; \
    + 	fi
    + 
    + preloadable_libiconv_solaris.so : $(SOURCES)
    diff --git a/libs/libiconv/COPYING b/libs/libiconv/COPYING
    new file mode 100644
    index 0000000..223ede7
    --- /dev/null
    +++ b/libs/libiconv/COPYING
    @@ -0,0 +1,504 @@
    +		  GNU LESSER GENERAL PUBLIC LICENSE
    +		       Version 2.1, February 1999
    +
    + Copyright (C) 1991, 1999 Free Software Foundation, Inc.
    +     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    + Everyone is permitted to copy and distribute verbatim copies
    + of this license document, but changing it is not allowed.
    +
    +[This is the first released version of the Lesser GPL.  It also counts
    + as the successor of the GNU Library Public License, version 2, hence
    + the version number 2.1.]
    +
    +			    Preamble
    +
    +  The licenses for most software are designed to take away your
    +freedom to share and change it.  By contrast, the GNU General Public
    +Licenses are intended to guarantee your freedom to share and change
    +free software--to make sure the software is free for all its users.
    +
    +  This license, the Lesser General Public License, applies to some
    +specially designated software packages--typically libraries--of the
    +Free Software Foundation and other authors who decide to use it.  You
    +can use it too, but we suggest you first think carefully about whether
    +this license or the ordinary General Public License is the better
    +strategy to use in any particular case, based on the explanations below.
    +
    +  When we speak of free software, we are referring to freedom of use,
    +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 and use pieces of
    +it in new free programs; and that you are informed that you can do
    +these things.
    +
    +  To protect your rights, we need to make restrictions that forbid
    +distributors to deny you these rights or to ask you to surrender these
    +rights.  These restrictions translate to certain responsibilities for
    +you if you distribute copies of the library or if you modify it.
    +
    +  For example, if you distribute copies of the library, whether gratis
    +or for a fee, you must give the recipients all the rights that we gave
    +you.  You must make sure that they, too, receive or can get the source
    +code.  If you link other code with the library, you must provide
    +complete object files to the recipients, so that they can relink them
    +with the library after making changes to the library and recompiling
    +it.  And you must show them these terms so they know their rights.
    +
    +  We protect your rights with a two-step method: (1) we copyright the
    +library, and (2) we offer you this license, which gives you legal
    +permission to copy, distribute and/or modify the library.
    +
    +  To protect each distributor, we want to make it very clear that
    +there is no warranty for the free library.  Also, if the library is
    +modified by someone else and passed on, the recipients should know
    +that what they have is not the original version, so that the original
    +author's reputation will not be affected by problems that might be
    +introduced by others.
    +
    +  Finally, software patents pose a constant threat to the existence of
    +any free program.  We wish to make sure that a company cannot
    +effectively restrict the users of a free program by obtaining a
    +restrictive license from a patent holder.  Therefore, we insist that
    +any patent license obtained for a version of the library must be
    +consistent with the full freedom of use specified in this license.
    +
    +  Most GNU software, including some libraries, is covered by the
    +ordinary GNU General Public License.  This license, the GNU Lesser
    +General Public License, applies to certain designated libraries, and
    +is quite different from the ordinary General Public License.  We use
    +this license for certain libraries in order to permit linking those
    +libraries into non-free programs.
    +
    +  When a program is linked with a library, whether statically or using
    +a shared library, the combination of the two is legally speaking a
    +combined work, a derivative of the original library.  The ordinary
    +General Public License therefore permits such linking only if the
    +entire combination fits its criteria of freedom.  The Lesser General
    +Public License permits more lax criteria for linking other code with
    +the library.
    +
    +  We call this license the "Lesser" General Public License because it
    +does Less to protect the user's freedom than the ordinary General
    +Public License.  It also provides other free software developers Less
    +of an advantage over competing non-free programs.  These disadvantages
    +are the reason we use the ordinary General Public License for many
    +libraries.  However, the Lesser license provides advantages in certain
    +special circumstances.
    +
    +  For example, on rare occasions, there may be a special need to
    +encourage the widest possible use of a certain library, so that it becomes
    +a de-facto standard.  To achieve this, non-free programs must be
    +allowed to use the library.  A more frequent case is that a free
    +library does the same job as widely used non-free libraries.  In this
    +case, there is little to gain by limiting the free library to free
    +software only, so we use the Lesser General Public License.
    +
    +  In other cases, permission to use a particular library in non-free
    +programs enables a greater number of people to use a large body of
    +free software.  For example, permission to use the GNU C Library in
    +non-free programs enables many more people to use the whole GNU
    +operating system, as well as its variant, the GNU/Linux operating
    +system.
    +
    +  Although the Lesser General Public License is Less protective of the
    +users' freedom, it does ensure that the user of a program that is
    +linked with the Library has the freedom and the wherewithal to run
    +that program using a modified version of the Library.
    +
    +  The precise terms and conditions for copying, distribution and
    +modification follow.  Pay close attention to the difference between a
    +"work based on the library" and a "work that uses the library".  The
    +former contains code derived from the library, whereas the latter must
    +be combined with the library in order to run.
    +
    +		  GNU LESSER GENERAL PUBLIC LICENSE
    +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
    +
    +  0. This License Agreement applies to any software library or other
    +program which contains a notice placed by the copyright holder or
    +other authorized party saying it may be distributed under the terms of
    +this Lesser General Public License (also called "this License").
    +Each licensee is addressed as "you".
    +
    +  A "library" means a collection of software functions and/or data
    +prepared so as to be conveniently linked with application programs
    +(which use some of those functions and data) to form executables.
    +
    +  The "Library", below, refers to any such software library or work
    +which has been distributed under these terms.  A "work based on the
    +Library" means either the Library or any derivative work under
    +copyright law: that is to say, a work containing the Library or a
    +portion of it, either verbatim or with modifications and/or translated
    +straightforwardly into another language.  (Hereinafter, translation is
    +included without limitation in the term "modification".)
    +
    +  "Source code" for a work means the preferred form of the work for
    +making modifications to it.  For a library, 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 library.
    +
    +  Activities other than copying, distribution and modification are not
    +covered by this License; they are outside its scope.  The act of
    +running a program using the Library is not restricted, and output from
    +such a program is covered only if its contents constitute a work based
    +on the Library (independent of the use of the Library in a tool for
    +writing it).  Whether that is true depends on what the Library does
    +and what the program that uses the Library does.
    +  
    +  1. You may copy and distribute verbatim copies of the Library's
    +complete 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 distribute a copy of this License along with the
    +Library.
    +
    +  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 Library or any portion
    +of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
    +
    +    b) You must cause the files modified to carry prominent notices
    +    stating that you changed the files and the date of any change.
    +
    +    c) You must cause the whole of the work to be licensed at no
    +    charge to all third parties under the terms of this License.
    +
    +    d) If a facility in the modified Library refers to a function or a
    +    table of data to be supplied by an application program that uses
    +    the facility, other than as an argument passed when the facility
    +    is invoked, then you must make a good faith effort to ensure that,
    +    in the event an application does not supply such function or
    +    table, the facility still operates, and performs whatever part of
    +    its purpose remains meaningful.
    +
    +    (For example, a function in a library to compute square roots has
    +    a purpose that is entirely well-defined independent of the
    +    application.  Therefore, Subsection 2d requires that any
    +    application-supplied function or table used by this function must
    +    be optional: if the application does not supply it, the square
    +    root function must still compute square roots.)
    +
    +These requirements apply to the modified work as a whole.  If
    +identifiable sections of that work are not derived from the Library,
    +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 Library, 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 Library.
    +
    +In addition, mere aggregation of another work not based on the Library
    +with the Library (or with a work based on the Library) on a volume of
    +a storage or distribution medium does not bring the other work under
    +the scope of this License.
    +
    +  3. You may opt to apply the terms of the ordinary GNU General Public
    +License instead of this License to a given copy of the Library.  To do
    +this, you must alter all the notices that refer to this License, so
    +that they refer to the ordinary GNU General Public License, version 2,
    +instead of to this License.  (If a newer version than version 2 of the
    +ordinary GNU General Public License has appeared, then you can specify
    +that version instead if you wish.)  Do not make any other change in
    +these notices.
    +
    +  Once this change is made in a given copy, it is irreversible for
    +that copy, so the ordinary GNU General Public License applies to all
    +subsequent copies and derivative works made from that copy.
    +
    +  This option is useful when you wish to copy part of the code of
    +the Library into a program that is not a library.
    +
    +  4. You may copy and distribute the Library (or a portion or
    +derivative of it, under Section 2) in object code or executable form
    +under the terms of Sections 1 and 2 above provided that you 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.
    +
    +  If distribution of 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 satisfies the requirement to
    +distribute the source code, even though third parties are not
    +compelled to copy the source along with the object code.
    +
    +  5. A program that contains no derivative of any portion of the
    +Library, but is designed to work with the Library by being compiled or
    +linked with it, is called a "work that uses the Library".  Such a
    +work, in isolation, is not a derivative work of the Library, and
    +therefore falls outside the scope of this License.
    +
    +  However, linking a "work that uses the Library" with the Library
    +creates an executable that is a derivative of the Library (because it
    +contains portions of the Library), rather than a "work that uses the
    +library".  The executable is therefore covered by this License.
    +Section 6 states terms for distribution of such executables.
    +
    +  When a "work that uses the Library" uses material from a header file
    +that is part of the Library, the object code for the work may be a
    +derivative work of the Library even though the source code is not.
    +Whether this is true is especially significant if the work can be
    +linked without the Library, or if the work is itself a library.  The
    +threshold for this to be true is not precisely defined by law.
    +
    +  If such an object file uses only numerical parameters, data
    +structure layouts and accessors, and small macros and small inline
    +functions (ten lines or less in length), then the use of the object
    +file is unrestricted, regardless of whether it is legally a derivative
    +work.  (Executables containing this object code plus portions of the
    +Library will still fall under Section 6.)
    +
    +  Otherwise, if the work is a derivative of the Library, you may
    +distribute the object code for the work under the terms of Section 6.
    +Any executables containing that work also fall under Section 6,
    +whether or not they are linked directly with the Library itself.
    +
    +  6. As an exception to the Sections above, you may also combine or
    +link a "work that uses the Library" with the Library to produce a
    +work containing portions of the Library, and distribute that work
    +under terms of your choice, provided that the terms permit
    +modification of the work for the customer's own use and reverse
    +engineering for debugging such modifications.
    +
    +  You must give prominent notice with each copy of the work that the
    +Library is used in it and that the Library and its use are covered by
    +this License.  You must supply a copy of this License.  If the work
    +during execution displays copyright notices, you must include the
    +copyright notice for the Library among them, as well as a reference
    +directing the user to the copy of this License.  Also, you must do one
    +of these things:
    +
    +    a) Accompany the work with the complete corresponding
    +    machine-readable source code for the Library including whatever
    +    changes were used in the work (which must be distributed under
    +    Sections 1 and 2 above); and, if the work is an executable linked
    +    with the Library, with the complete machine-readable "work that
    +    uses the Library", as object code and/or source code, so that the
    +    user can modify the Library and then relink to produce a modified
    +    executable containing the modified Library.  (It is understood
    +    that the user who changes the contents of definitions files in the
    +    Library will not necessarily be able to recompile the application
    +    to use the modified definitions.)
    +
    +    b) Use a suitable shared library mechanism for linking with the
    +    Library.  A suitable mechanism is one that (1) uses at run time a
    +    copy of the library already present on the user's computer system,
    +    rather than copying library functions into the executable, and (2)
    +    will operate properly with a modified version of the library, if
    +    the user installs one, as long as the modified version is
    +    interface-compatible with the version that the work was made with.
    +
    +    c) Accompany the work with a written offer, valid for at
    +    least three years, to give the same user the materials
    +    specified in Subsection 6a, above, for a charge no more
    +    than the cost of performing this distribution.
    +
    +    d) If distribution of the work is made by offering access to copy
    +    from a designated place, offer equivalent access to copy the above
    +    specified materials from the same place.
    +
    +    e) Verify that the user has already received a copy of these
    +    materials or that you have already sent this user a copy.
    +
    +  For an executable, the required form of the "work that uses the
    +Library" must include any data and utility programs needed for
    +reproducing the executable from it.  However, as a special exception,
    +the materials to be 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.
    +
    +  It may happen that this requirement contradicts the license
    +restrictions of other proprietary libraries that do not normally
    +accompany the operating system.  Such a contradiction means you cannot
    +use both them and the Library together in an executable that you
    +distribute.
    +
    +  7. You may place library facilities that are a work based on the
    +Library side-by-side in a single library together with other library
    +facilities not covered by this License, and distribute such a combined
    +library, provided that the separate distribution of the work based on
    +the Library and of the other library facilities is otherwise
    +permitted, and provided that you do these two things:
    +
    +    a) Accompany the combined library with a copy of the same work
    +    based on the Library, uncombined with any other library
    +    facilities.  This must be distributed under the terms of the
    +    Sections above.
    +
    +    b) Give prominent notice with the combined library of the fact
    +    that part of it is a work based on the Library, and explaining
    +    where to find the accompanying uncombined form of the same work.
    +
    +  8. You may not copy, modify, sublicense, link with, or distribute
    +the Library except as expressly provided under this License.  Any
    +attempt otherwise to copy, modify, sublicense, link with, or
    +distribute the Library 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.
    +
    +  9. 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 Library or its derivative works.  These actions are
    +prohibited by law if you do not accept this License.  Therefore, by
    +modifying or distributing the Library (or any work based on the
    +Library), you indicate your acceptance of this License to do so, and
    +all its terms and conditions for copying, distributing or modifying
    +the Library or works based on it.
    +
    +  10. Each time you redistribute the Library (or any work based on the
    +Library), the recipient automatically receives a license from the
    +original licensor to copy, distribute, link with or modify the Library
    +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 with
    +this License.
    +
    +  11. 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 Library at all.  For example, if a patent
    +license would not permit royalty-free redistribution of the Library 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 Library.
    +
    +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.
    +
    +  12. If the distribution and/or use of the Library is restricted in
    +certain countries either by patents or by copyrighted interfaces, the
    +original copyright holder who places the Library 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.
    +
    +  13. The Free Software Foundation may publish revised and/or new
    +versions of the Lesser 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 Library
    +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 Library does not specify a
    +license version number, you may choose any version ever published by
    +the Free Software Foundation.
    +
    +  14. If you wish to incorporate parts of the Library into other free
    +programs whose distribution conditions are incompatible with these,
    +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
    +
    +  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
    +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
    +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
    +OTHER PARTIES PROVIDE THE LIBRARY "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
    +LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
    +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
    +
    +  16. 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 LIBRARY 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
    +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries
    +
    +  If you develop a new library, and you want it to be of the greatest
    +possible use to the public, we recommend making it free software that
    +everyone can redistribute and change.  You can do so by permitting
    +redistribution under these terms (or, alternatively, under the terms of the
    +ordinary General Public License).
    +
    +  To apply these terms, attach the following notices to the library.  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 library is free software; you can redistribute it and/or
    +    modify it under the terms of the GNU Lesser General Public
    +    License as published by the Free Software Foundation; either
    +    version 2 of the License, or (at your option) any later version.
    +
    +    This 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
    +    Lesser General Public License for more details.
    +
    +    You should have received a copy of the GNU Lesser General Public
    +    License along with this library; if not, write to the Free Software
    +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    +
    +Also add information on how to contact you by electronic and paper mail.
    +
    +You should also get your employer (if you work as a programmer) or your
    +school, if any, to sign a "copyright disclaimer" for the library, if
    +necessary.  Here is a sample; alter the names:
    +
    +  Yoyodyne, Inc., hereby disclaims all copyright interest in the
    +  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
    +
    +  , 1 April 1990
    +  Ty Coon, President of Vice
    +
    +That's all there is to it!
    +
    +
    diff --git a/libs/libiconv/COPYRIGHT b/libs/libiconv/COPYRIGHT
    new file mode 100644
    index 0000000..d228af3
    --- /dev/null
    +++ b/libs/libiconv/COPYRIGHT
    @@ -0,0 +1,20 @@
    +Copyright status on all included code:
    +
    +All files which have no copyright comments are original works
    +Copyright (C) 2005-2006 Rich Felker. The decision to exclude such
    +comments is intentional, as it should be possible to carry around the
    +complete source code on tiny storage media. All public header files
    +(include/*) should be treated as Public Domain as they intentionally
    +contain no content which can be covered by copyright. Some source
    +modules may fall in this category as well. If you believe that a file
    +is so trivial that it should be in the Public Domain, please contact
    +me and, if I agree, I will explicitly release it from copyright.
    +
    +Some code has been modified by the OpenWrt project, this includes
    +the conversion from char map files to C arrays and the iconv.h header
    +file in particular.
    +
    +The library as a whole is licensed under the GNU LGPL version 2.1.
    +See the file COPYING for the text of this license.
    +
    +The original source can be accessed at svn://svn.mplayerhq.hu/libc/trunk
    diff --git a/libs/libiconv/Makefile b/libs/libiconv/Makefile
    new file mode 100644
    index 0000000..6509ce1
    --- /dev/null
    +++ b/libs/libiconv/Makefile
    @@ -0,0 +1,79 @@
    +#
    +# Copyright (C) 2010-2011 OpenWrt.org
    +#
    +# This Makefile and the code shipped in src/ is free software, licensed
    +# under the GNU Lesser General Public License, version 2.1 and later.
    +# See src/COPYING for more information.
    +#
    +# Refer to src/COPYRIGHT for copyright statements on the source files.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libiconv
    +PKG_RELEASE:=5
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/host-build.mk
    +
    +define Package/libiconv
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Tiny drop-in replacement for the GNU Character set conversion library
    +endef
    +
    +define Build/Prepare
    +	$(INSTALL_DIR) $(PKG_BUILD_DIR)
    +	$(CP) ./src/* $(PKG_BUILD_DIR)/
    +endef      
    +
    +define Build/Configure
    +endef
    +
    +define Build/Compile
    +	$(TARGET_CC) -c $(PKG_BUILD_DIR)/iconv.c -o $(PKG_BUILD_DIR)/iconv.o -I$(PKG_BUILD_DIR)/include $(FPIC)
    +	$(TARGET_CROSS)ar rcs $(PKG_BUILD_DIR)/libiconv.a $(PKG_BUILD_DIR)/iconv.o
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/lib
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/libiconv.a $(1)/usr/lib/libiconv-stub/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/include
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/include/iconv.h $(1)/usr/lib/libiconv-stub/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/share/aclocal
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(1)/usr/share/aclocal/
    +endef
    +
    +define Package/libiconv/install
    +	$(INSTALL_DIR) $(1)/tmp
    +	touch $(1)/tmp/.libiconv-placeholder
    +endef
    +
    +define Host/Prepare
    +	mkdir -p $(HOST_BUILD_DIR)
    +endef
    +
    +define Host/Configure
    +
    +endef
    +
    +define Host/Compile
    +	$(HOSTCC) -c src/iconv.c -o $(HOST_BUILD_DIR)/iconv.o -Isrc/include -fPIC
    +	ar rcs $(HOST_BUILD_DIR)/libiconv.a $(HOST_BUILD_DIR)/iconv.o
    +endef
    +
    +define Host/Install
    +	$(INSTALL_DIR) $(STAGING_DIR_HOST)/lib
    +	$(INSTALL_DATA) $(HOST_BUILD_DIR)/libiconv.a $(STAGING_DIR_HOST)/lib/
    +
    +	$(INSTALL_DIR) $(STAGING_DIR_HOST)/include
    +	$(INSTALL_DATA) ./src/include/iconv.h $(STAGING_DIR_HOST)/include/
    +
    +	$(INSTALL_DIR) $(STAGING_DIR_HOST)/share/aclocal
    +	$(INSTALL_DATA) ./src/m4/* $(STAGING_DIR_HOST)/share/aclocal/
    +endef
    +
    +$(eval $(call HostBuild))
    +$(eval $(call BuildPackage,libiconv))
    diff --git a/libs/libiconv/src/iconv.c b/libs/libiconv/src/iconv.c
    new file mode 100644
    index 0000000..0c3ada3
    --- /dev/null
    +++ b/libs/libiconv/src/iconv.c
    @@ -0,0 +1,306 @@
    +#include 
    +#include 
    +#include 
    +#include 
    +#include 
    +#include 
    +#include 
    +
    +#include 
    +#include 
    +#include 
    +#include 
    +#include 
    +#include 
    +
    +/* builtin charmaps */
    +#include "charmaps.h"
    +
    +/* only 0-7 are valid as dest charset */
    +#define UTF_16BE    000
    +#define UTF_16LE    001
    +#define UTF_32BE    002
    +#define UTF_32LE    003
    +#define WCHAR_T     004
    +#define UTF_8       005
    +#define US_ASCII    006
    +#define LATIN_1     007
    +
    +/* additional charsets with algorithmic conversion */
    +#define LATIN_9     010
    +#define TIS_620     011
    +#define JIS_0201    012
    +
    +/* some programs like php need this */
    +int _libiconv_version = _LIBICONV_VERSION;
    +
    +/* these must match the constants above */
    +static const unsigned char charsets[] =
    +	"\005" "UTF-8"      "\0"
    +	"\004" "WCHAR_T"    "\0"
    +	"\000" "UTF-16BE"   "\0"
    +	"\001" "UTF-16LE"   "\0"
    +	"\002" "UTF-32BE"   "\0"
    +	"\003" "UTF-32LE"   "\0"
    +	"\006" "ASCII"      "\0"
    +	"\006" "US-ASCII"   "\0"
    +	"\007" "ISO-8859-1" "\0"
    +	"\007" "LATIN1"     "\0"
    +	"\010" "ISO-8859-15""\0"
    +	"\010" "LATIN9"     "\0"
    +	"\011" "ISO-8859-11""\0"
    +	"\011" "TIS-620"    "\0"
    +	"\012" "JIS-0201"   "\0"
    +	"\377";
    +
    +/* separate identifiers for sbcs/dbcs/etc map type */
    +#define UCS2_8BIT   000
    +#define UCS3_8BIT   001
    +#define EUC         002
    +#define EUC_TW      003
    +#define SHIFT_JIS   004
    +#define BIG5        005
    +#define GBK         006
    +
    +/* FIXME: these are not implemented yet
    +// EUC:   A1-FE A1-FE
    +// GBK:   81-FE 40-7E,80-FE
    +// Big5:  A1-FE 40-7E,A1-FE
    +*/
    +
    +static const unsigned short maplen[] = {
    +	[UCS2_8BIT] = 4+ 2* 128,
    +	[UCS3_8BIT] = 4+ 3* 128,
    +	[EUC]       = 4+ 2* 94*94,
    +	[SHIFT_JIS] = 4+ 2* 94*94,
    +	[BIG5]      = 4+ 2* 94*157,
    +	[GBK]       = 4+ 2* 126*190,
    +	[EUC_TW]    = 4+ 2* 2*94*94,
    +};
    +
    +static int find_charmap(const char *name)
    +{
    +	int i;
    +	for (i = 0; i < (sizeof(charmaps) / sizeof(charmaps[0])); i++)
    +		if (!strcasecmp(charmaps[i].name, name))
    +			return i;
    +	return -1;
    +}
    +
    +static int find_charset(const char *name)
    +{
    +	const unsigned char *s;
    +	for (s=charsets; *s<0xff && strcasecmp(s+1, name); s+=strlen(s)+1);
    +	return *s;
    +}
    +
    +iconv_t iconv_open(const char *to, const char *from)
    +{
    +	unsigned f, t;
    +	int m;
    +
    +	if ((t = find_charset(to)) >= 8)
    +		return -1;
    +
    +	if ((f = find_charset(from)) < 255)
    +		return 0 | (t<<1) | (f<<4);
    +
    +	if ((m = find_charmap(from)) > -1)
    +		return 1 | (t<<1) | (m<<4);
    +
    +	return -1;
    +}
    +
    +int iconv_close(iconv_t cd)
    +{
    +	return 0;
    +}
    +
    +static inline wchar_t get_16(const unsigned char *s, int endian)
    +{
    +	endian &= 1;
    +	return s[endian]<<8 | s[endian^1];
    +}
    +
    +static inline void put_16(unsigned char *s, wchar_t c, int endian)
    +{
    +	endian &= 1;
    +	s[endian] = c>>8;
    +	s[endian^1] = c;
    +}
    +
    +size_t iconv(iconv_t cd, char **in, size_t *inb, char **out, size_t *outb)
    +{
    +	size_t x=0;
    +	unsigned char to = (cd>>1)&7;
    +	unsigned char from = 255;
    +	const unsigned char *map = 0;
    +	mbstate_t st = {0};
    +	char tmp[MB_LEN_MAX];
    +	wchar_t c, d;
    +	size_t k, l;
    +	int err;
    +
    +	if (!in || !*in || !*inb) return 0;
    +
    +	if (cd & 1)
    +		map = charmaps[cd>>4].map;
    +	else
    +		from = cd>>4;
    +
    +	for (; *inb; *in+=l, *inb-=l) {
    +		c = *(unsigned char *)*in;
    +		l = 1;
    +		if (from >= UTF_8 && c < 0x80) goto charok;
    +		switch (from) {
    +		case WCHAR_T:
    +			l = sizeof(wchar_t);
    +			if (*inb < l) goto starved;
    +			c = *(wchar_t *)*in;
    +			break;
    +		case UTF_8:
    +			l = mbrtowc(&c, *in, *inb, &st);
    +			if (!l) l++;
    +			else if (l == (size_t)-1) goto ilseq;
    +			else if (l == (size_t)-2) goto starved;
    +			break;
    +		case US_ASCII:
    +			goto ilseq;
    +		case LATIN_9:
    +			if ((unsigned)c - 0xa4 <= 0xbe - 0xa4) {
    +				static const unsigned char map[] = {
    +					0, 0x60, 0, 0x61, 0, 0, 0, 0, 0, 0, 0,
    +					0, 0, 0, 0, 0x7d, 0, 0, 0, 0x7e, 0, 0, 0,
    +					0x52, 0x53, 0x78
    +				};
    +				if (c == 0xa4) c = 0x20ac;
    +				else if (map[c-0xa5]) c = 0x100 | map[c-0xa5];
    +			}
    +		case LATIN_1:
    +			goto charok;
    +		case TIS_620:
    +			if (c >= 0xa1) c += 0x0e01-0xa1;
    +			goto charok;
    +		case JIS_0201:
    +			if (c >= 0xa1) {
    +				if (c <= 0xdf) c += 0xff61-0xa1;
    +				else goto ilseq;
    +			}
    +			goto charok;
    +		case UTF_16BE:
    +		case UTF_16LE:
    +			l = 2;
    +			if (*inb < 2) goto starved;
    +			c = get_16(*in, from);
    +			if ((unsigned)(c-0xdc00) < 0x400) goto ilseq;
    +			if ((unsigned)(c-0xd800) < 0x400) {
    +				l = 4;
    +				if (*inb < 4) goto starved;
    +				d = get_16(*in + 2, from);
    +				if ((unsigned)(c-0xdc00) >= 0x400) goto ilseq;
    +				c = ((c-0xd800)<<10) | (d-0xdc00);
    +			}
    +			break;
    +		case UTF_32BE:
    +		case UTF_32LE:
    +			l = 4;
    +			if (*inb < 4) goto starved;
    +			// FIXME
    +			// c = get_32(*in, from);
    +			break;
    +		default:
    +			/* only support ascii supersets */
    +			if (c < 0x80) break;
    +			switch (map[0]) {
    +			case UCS2_8BIT:
    +				c -= 0x80;
    +				break;
    +			case EUC:
    +				if ((unsigned)c - 0xa1 >= 94) goto ilseq;
    +				if ((unsigned)in[0][1] - 0xa1 >= 94) goto ilseq;
    +				c = (c-0xa1)*94 + (in[0][1]-0xa1);
    +				l = 2;
    +				break;
    +			case SHIFT_JIS:
    +				if ((unsigned)c - 0xa1 <= 0xdf-0xa1) {
    +					c += 0xff61-0xa1;
    +					goto charok;
    +				}
    +				// FIXME...
    +				l = 2;
    +				break;
    +			default:
    +				goto badf;
    +			}
    +			c = get_16(map + 4 + 2*c, 0);
    +			if (c == 0xffff) goto ilseq;
    +			goto charok;
    +		}
    +
    +		if ((unsigned)c - 0xd800 < 0x800 || (unsigned)c >= 0x110000)
    +			goto ilseq;
    +charok:
    +		switch (to) {
    +		case WCHAR_T:
    +			if (*outb < sizeof(wchar_t)) goto toobig;
    +			*(wchar_t *)*out = c;
    +			*out += sizeof(wchar_t);
    +			*outb -= sizeof(wchar_t);
    +			break;
    +		case UTF_8:
    +			if (*outb < 4) {
    +				k = wctomb(tmp, c);
    +				if (*outb < k) goto toobig;
    +				memcpy(*out, tmp, k);
    +			} else k = wctomb(*out, c);
    +			*out += k;
    +			*outb -= k;
    +			break;
    +		case US_ASCII:
    +			if (c > 0x7f) c = 0xfffd;
    +			/* fall thru and count replacement in latin1 case */
    +		case LATIN_1:
    +			if (!*outb) goto toobig;
    +			if (c < 0x100) **out = c;
    +			else x++, **out = '*'; //FIXME: translit?
    +			++*out;
    +			--*outb;
    +			break;
    +		case UTF_16BE:
    +		case UTF_16LE:
    +			if (c < 0x10000) {
    +				if (*outb < 2) goto toobig;
    +				put_16(*out, c, to);
    +				*out += 2;
    +				*outb -= 2;
    +				break;
    +			}
    +			if (*outb < 4) goto toobig;
    +			put_16(*out, (c>>10)|0xd800, to);
    +			put_16(*out + 2, (c&0x3ff)|0xdc00, to);
    +			*out += 4;
    +			*outb -= 4;
    +			break;
    +		default:
    +			goto badf;
    +		}
    +	}
    +	return x;
    +ilseq:
    +	err = EILSEQ;
    +	x = -1;
    +	goto end;
    +badf:
    +	err = EBADF;
    +	x = -1;
    +	goto end;
    +toobig:
    +	err = E2BIG;
    +	x = -1;
    +	goto end;
    +starved:
    +	err = EINVAL;
    +end:
    +	errno = err;
    +	return x;
    +}
    diff --git a/libs/libiconv/src/include/charmaps.h b/libs/libiconv/src/include/charmaps.h
    new file mode 100644
    index 0000000..083cd69
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps.h
    @@ -0,0 +1,80 @@
    +#include "charmaps/iso-8859-2.h"
    +#include "charmaps/iso-8859-10.h"
    +#include "charmaps/windows-874.h"
    +#include "charmaps/windows-1250.h"
    +#include "charmaps/koi8-r.h"
    +
    +#ifdef ALL_CHARSETS
    +#include "charmaps/iso-8859-3.h"
    +#include "charmaps/iso-8859-4.h"
    +#include "charmaps/iso-8859-5.h"
    +#include "charmaps/iso-8859-6.h"
    +#include "charmaps/iso-8859-7.h"
    +#include "charmaps/iso-8859-8.h"
    +#include "charmaps/iso-8859-9.h"
    +#include "charmaps/iso-8859-13.h"
    +#include "charmaps/iso-8859-14.h"
    +#include "charmaps/iso-8859-16.h"
    +#include "charmaps/windows-1251.h"
    +#include "charmaps/windows-1252.h"
    +#include "charmaps/windows-1253.h"
    +#include "charmaps/windows-1254.h"
    +#include "charmaps/windows-1255.h"
    +#include "charmaps/windows-1256.h"
    +#include "charmaps/windows-1257.h"
    +#include "charmaps/windows-1258.h"
    +#endif
    +
    +
    +struct charmap {
    +	const char name[13];
    +	const unsigned char *map;
    +};
    +
    +static struct charmap charmaps[] = {
    +	{ "ISO-8859-2",   map_iso_8859_2   },
    +	{ "ISO-8859-10",  map_iso_8859_10  },
    +
    +#ifdef ALL_CHARSETS
    +	{ "ISO-8859-3",   map_iso_8859_3   },
    +	{ "ISO-8859-4",   map_iso_8859_4   },
    +	{ "ISO-8859-5",   map_iso_8859_5   },
    +	{ "ISO-8859-6",   map_iso_8859_6   },
    +	{ "ISO-8859-7",   map_iso_8859_7   },
    +	{ "ISO-8859-8",   map_iso_8859_8   },
    +	{ "ISO-8859-9",   map_iso_8859_9   },
    +	{ "ISO-8859-13",  map_iso_8859_13  },
    +	{ "ISO-8859-14",  map_iso_8859_14  },
    +	{ "ISO-8859-16",  map_iso_8859_16  },
    +#endif
    +
    +	{ "WINDOWS-874",  map_windows_874  },
    +	{ "WINDOWS-1250", map_windows_1250 },
    +
    +#ifdef ALL_CHARSETS
    +	{ "WINDOWS-1251", map_windows_1251 },
    +	{ "WINDOWS-1252", map_windows_1252 },
    +	{ "WINDOWS-1253", map_windows_1253 },
    +	{ "WINDOWS-1254", map_windows_1254 },
    +	{ "WINDOWS-1255", map_windows_1255 },
    +	{ "WINDOWS-1256", map_windows_1256 },
    +	{ "WINDOWS-1257", map_windows_1257 },
    +	{ "WINDOWS-1258", map_windows_1258 },
    +#endif
    +
    +	{ "KOI8-R",       map_koi8_r       },
    +
    +	/* Aliases */
    +	{ "LATIN2",       map_iso_8859_2   },
    +	{ "LATIN6",       map_iso_8859_10  },
    +
    +#ifdef ALL_CHARSETS
    +	{ "ARABIC",       map_iso_8859_6   },
    +	{ "CYRILLIC",     map_iso_8859_5   },
    +	{ "GREEK",        map_iso_8859_7   },
    +	{ "HEBREW",       map_iso_8859_8   },
    +	{ "LATIN3",       map_iso_8859_3   },
    +	{ "LATIN4",       map_iso_8859_4   },
    +	{ "LATIN5",       map_iso_8859_9   },
    +#endif
    +};
    diff --git a/libs/libiconv/src/include/charmaps/iso-8859-10.h b/libs/libiconv/src/include/charmaps/iso-8859-10.h
    new file mode 100644
    index 0000000..cb93d02
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/iso-8859-10.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_iso_8859_10[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
    +	0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
    +	0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
    +	0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
    +	0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
    +	0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
    +	0x01, 0x12, 0x01, 0x22, 0x01, 0x2a, 0x01, 0x28, 0x01, 0x36, 0x00, 0xa7,
    +	0x01, 0x3b, 0x01, 0x10, 0x01, 0x60, 0x01, 0x66, 0x01, 0x7d, 0x00, 0xad,
    +	0x01, 0x6a, 0x01, 0x4a, 0x00, 0xb0, 0x01, 0x05, 0x01, 0x13, 0x01, 0x23,
    +	0x01, 0x2b, 0x01, 0x29, 0x01, 0x37, 0x00, 0xb7, 0x01, 0x3c, 0x01, 0x11,
    +	0x01, 0x61, 0x01, 0x67, 0x01, 0x7e, 0x20, 0x15, 0x01, 0x6b, 0x01, 0x4b,
    +	0x01, 0x00, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
    +	0x00, 0xc6, 0x01, 0x2e, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
    +	0x01, 0x16, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x01, 0x45,
    +	0x01, 0x4c, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x01, 0x68,
    +	0x00, 0xd8, 0x01, 0x72, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd,
    +	0x00, 0xde, 0x00, 0xdf, 0x01, 0x01, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
    +	0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x01, 0x2f, 0x01, 0x0d, 0x00, 0xe9,
    +	0x01, 0x19, 0x00, 0xeb, 0x01, 0x17, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
    +	0x00, 0xf0, 0x01, 0x46, 0x01, 0x4d, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
    +	0x00, 0xf6, 0x01, 0x69, 0x00, 0xf8, 0x01, 0x73, 0x00, 0xfa, 0x00, 0xfb,
    +	0x00, 0xfc, 0x00, 0xfd, 0x00, 0xfe, 0x01, 0x38
    +};
    diff --git a/libs/libiconv/src/include/charmaps/iso-8859-13.h b/libs/libiconv/src/include/charmaps/iso-8859-13.h
    new file mode 100644
    index 0000000..b44d1b4
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/iso-8859-13.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_iso_8859_13[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
    +	0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
    +	0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
    +	0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
    +	0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
    +	0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x20, 0x1d,
    +	0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x20, 0x1e, 0x00, 0xa6, 0x00, 0xa7,
    +	0x00, 0xd8, 0x00, 0xa9, 0x01, 0x56, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
    +	0x00, 0xae, 0x00, 0xc6, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
    +	0x20, 0x1c, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xf8, 0x00, 0xb9,
    +	0x01, 0x57, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xe6,
    +	0x01, 0x04, 0x01, 0x2e, 0x01, 0x00, 0x01, 0x06, 0x00, 0xc4, 0x00, 0xc5,
    +	0x01, 0x18, 0x01, 0x12, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x79, 0x01, 0x16,
    +	0x01, 0x22, 0x01, 0x36, 0x01, 0x2a, 0x01, 0x3b, 0x01, 0x60, 0x01, 0x43,
    +	0x01, 0x45, 0x00, 0xd3, 0x01, 0x4c, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
    +	0x01, 0x72, 0x01, 0x41, 0x01, 0x5a, 0x01, 0x6a, 0x00, 0xdc, 0x01, 0x7b,
    +	0x01, 0x7d, 0x00, 0xdf, 0x01, 0x05, 0x01, 0x2f, 0x01, 0x01, 0x01, 0x07,
    +	0x00, 0xe4, 0x00, 0xe5, 0x01, 0x19, 0x01, 0x13, 0x01, 0x0d, 0x00, 0xe9,
    +	0x01, 0x7a, 0x01, 0x17, 0x01, 0x23, 0x01, 0x37, 0x01, 0x2b, 0x01, 0x3c,
    +	0x01, 0x61, 0x01, 0x44, 0x01, 0x46, 0x00, 0xf3, 0x01, 0x4d, 0x00, 0xf5,
    +	0x00, 0xf6, 0x00, 0xf7, 0x01, 0x73, 0x01, 0x42, 0x01, 0x5b, 0x01, 0x6b,
    +	0x00, 0xfc, 0x01, 0x7c, 0x01, 0x7e, 0x20, 0x19
    +};
    diff --git a/libs/libiconv/src/include/charmaps/iso-8859-14.h b/libs/libiconv/src/include/charmaps/iso-8859-14.h
    new file mode 100644
    index 0000000..76cead9
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/iso-8859-14.h
    @@ -0,0 +1,25 @@
    +static const unsigned char map_iso_8859_14[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
    +	0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
    +	0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
    +	0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
    +	0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
    +	0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x1e, 0x02,
    +	0x1e, 0x03, 0x00, 0xa3, 0x01, 0x0a, 0x01, 0x0b, 0x1e, 0x0a, 0x00, 0xa7,
    +	0x1e, 0x80, 0x00, 0xa9, 0x1e, 0x82, 0x1e, 0x0b, 0x1e, 0xf2, 0x00, 0xad,
    +	0x00, 0xae, 0x01, 0x78, 0x1e, 0x1e, 0x1e, 0x1f, 0x01, 0x20, 0x01, 0x21,
    +	0x1e, 0x40, 0x1e, 0x41, 0x00, 0xb6, 0x1e, 0x56, 0x1e, 0x81, 0x1e, 0x57,
    +	0x1e, 0x83, 0x1e, 0x60, 0x1e, 0xf3, 0x1e, 0x84, 0x1e, 0x85, 0x1e, 0x61,
    +	0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
    +	0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
    +	0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x74, 0x00, 0xd1,
    +	0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x1e, 0x6a,
    +	0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd,
    +	0x01, 0x76, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
    +	0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
    +	0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
    +	0x01, 0x75, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
    +	0x00, 0xf6, 0x1e, 0x6b, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
    +	0x00, 0xfc, 0x00, 0xfd, 0x01, 0x77, 0x00, 0xff
    +};
    +
    diff --git a/libs/libiconv/src/include/charmaps/iso-8859-16.h b/libs/libiconv/src/include/charmaps/iso-8859-16.h
    new file mode 100644
    index 0000000..4437a41
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/iso-8859-16.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_iso_8859_16[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
    +	0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
    +	0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
    +	0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
    +	0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
    +	0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
    +	0x01, 0x05, 0x01, 0x41, 0x20, 0xac, 0x20, 0x1e, 0x01, 0x60, 0x00, 0xa7,
    +	0x01, 0x61, 0x00, 0xa9, 0x02, 0x18, 0x00, 0xab, 0x01, 0x79, 0x00, 0xad,
    +	0x01, 0x7a, 0x01, 0x7b, 0x00, 0xb0, 0x00, 0xb1, 0x01, 0x0c, 0x01, 0x42,
    +	0x01, 0x7d, 0x20, 0x1d, 0x00, 0xb6, 0x00, 0xb7, 0x01, 0x7e, 0x01, 0x0d,
    +	0x02, 0x19, 0x00, 0xbb, 0x01, 0x52, 0x01, 0x53, 0x01, 0x78, 0x01, 0x7c,
    +	0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x06,
    +	0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
    +	0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x10, 0x01, 0x43,
    +	0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x01, 0x5a,
    +	0x01, 0x70, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x18,
    +	0x02, 0x1a, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
    +	0x00, 0xe4, 0x01, 0x07, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
    +	0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
    +	0x01, 0x11, 0x01, 0x44, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51,
    +	0x00, 0xf6, 0x01, 0x5b, 0x01, 0x71, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
    +	0x00, 0xfc, 0x01, 0x19, 0x02, 0x1b, 0x00, 0xff
    +};
    diff --git a/libs/libiconv/src/include/charmaps/iso-8859-2.h b/libs/libiconv/src/include/charmaps/iso-8859-2.h
    new file mode 100644
    index 0000000..631610e
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/iso-8859-2.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_iso_8859_2[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
    +	0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
    +	0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
    +	0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
    +	0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
    +	0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
    +	0x02, 0xd8, 0x01, 0x41, 0x00, 0xa4, 0x01, 0x3d, 0x01, 0x5a, 0x00, 0xa7,
    +	0x00, 0xa8, 0x01, 0x60, 0x01, 0x5e, 0x01, 0x64, 0x01, 0x79, 0x00, 0xad,
    +	0x01, 0x7d, 0x01, 0x7b, 0x00, 0xb0, 0x01, 0x05, 0x02, 0xdb, 0x01, 0x42,
    +	0x00, 0xb4, 0x01, 0x3e, 0x01, 0x5b, 0x02, 0xc7, 0x00, 0xb8, 0x01, 0x61,
    +	0x01, 0x5f, 0x01, 0x65, 0x01, 0x7a, 0x02, 0xdd, 0x01, 0x7e, 0x01, 0x7c,
    +	0x01, 0x54, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x39,
    +	0x01, 0x06, 0x00, 0xc7, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
    +	0x01, 0x1a, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x0e, 0x01, 0x10, 0x01, 0x43,
    +	0x01, 0x47, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x00, 0xd7,
    +	0x01, 0x58, 0x01, 0x6e, 0x00, 0xda, 0x01, 0x70, 0x00, 0xdc, 0x00, 0xdd,
    +	0x01, 0x62, 0x00, 0xdf, 0x01, 0x55, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
    +	0x00, 0xe4, 0x01, 0x3a, 0x01, 0x07, 0x00, 0xe7, 0x01, 0x0d, 0x00, 0xe9,
    +	0x01, 0x19, 0x00, 0xeb, 0x01, 0x1b, 0x00, 0xed, 0x00, 0xee, 0x01, 0x0f,
    +	0x01, 0x11, 0x01, 0x44, 0x01, 0x48, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51,
    +	0x00, 0xf6, 0x00, 0xf7, 0x01, 0x59, 0x01, 0x6f, 0x00, 0xfa, 0x01, 0x71,
    +	0x00, 0xfc, 0x00, 0xfd, 0x01, 0x63, 0x02, 0xd9
    +};
    diff --git a/libs/libiconv/src/include/charmaps/iso-8859-3.h b/libs/libiconv/src/include/charmaps/iso-8859-3.h
    new file mode 100644
    index 0000000..cd76d59
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/iso-8859-3.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_iso_8859_3[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
    +	0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
    +	0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
    +	0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
    +	0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
    +	0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x26,
    +	0x02, 0xd8, 0x00, 0xa3, 0x00, 0xa4, 0xff, 0xff, 0x01, 0x24, 0x00, 0xa7,
    +	0x00, 0xa8, 0x01, 0x30, 0x01, 0x5e, 0x01, 0x1e, 0x01, 0x34, 0x00, 0xad,
    +	0xff, 0xff, 0x01, 0x7b, 0x00, 0xb0, 0x01, 0x27, 0x00, 0xb2, 0x00, 0xb3,
    +	0x00, 0xb4, 0x00, 0xb5, 0x01, 0x25, 0x00, 0xb7, 0x00, 0xb8, 0x01, 0x31,
    +	0x01, 0x5f, 0x01, 0x1f, 0x01, 0x35, 0x00, 0xbd, 0xff, 0xff, 0x01, 0x7c,
    +	0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc4, 0x01, 0x0a,
    +	0x01, 0x08, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
    +	0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1,
    +	0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x20, 0x00, 0xd6, 0x00, 0xd7,
    +	0x01, 0x1c, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x6c,
    +	0x01, 0x5c, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0xff, 0xff,
    +	0x00, 0xe4, 0x01, 0x0b, 0x01, 0x09, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
    +	0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
    +	0xff, 0xff, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x21,
    +	0x00, 0xf6, 0x00, 0xf7, 0x01, 0x1d, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
    +	0x00, 0xfc, 0x01, 0x6d, 0x01, 0x5d, 0x02, 0xd9
    +};
    diff --git a/libs/libiconv/src/include/charmaps/iso-8859-4.h b/libs/libiconv/src/include/charmaps/iso-8859-4.h
    new file mode 100644
    index 0000000..5db2f77
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/iso-8859-4.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_iso_8859_4[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
    +	0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
    +	0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
    +	0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
    +	0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
    +	0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04,
    +	0x01, 0x38, 0x01, 0x56, 0x00, 0xa4, 0x01, 0x28, 0x01, 0x3b, 0x00, 0xa7,
    +	0x00, 0xa8, 0x01, 0x60, 0x01, 0x12, 0x01, 0x22, 0x01, 0x66, 0x00, 0xad,
    +	0x01, 0x7d, 0x00, 0xaf, 0x00, 0xb0, 0x01, 0x05, 0x02, 0xdb, 0x01, 0x57,
    +	0x00, 0xb4, 0x01, 0x29, 0x01, 0x3c, 0x02, 0xc7, 0x00, 0xb8, 0x01, 0x61,
    +	0x01, 0x13, 0x01, 0x23, 0x01, 0x67, 0x01, 0x4a, 0x01, 0x7e, 0x01, 0x4b,
    +	0x01, 0x00, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
    +	0x00, 0xc6, 0x01, 0x2e, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
    +	0x01, 0x16, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x2a, 0x01, 0x10, 0x01, 0x45,
    +	0x01, 0x4c, 0x01, 0x36, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
    +	0x00, 0xd8, 0x01, 0x72, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x68,
    +	0x01, 0x6a, 0x00, 0xdf, 0x01, 0x01, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
    +	0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x01, 0x2f, 0x01, 0x0d, 0x00, 0xe9,
    +	0x01, 0x19, 0x00, 0xeb, 0x01, 0x17, 0x00, 0xed, 0x00, 0xee, 0x01, 0x2b,
    +	0x01, 0x11, 0x01, 0x46, 0x01, 0x4d, 0x01, 0x37, 0x00, 0xf4, 0x00, 0xf5,
    +	0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x01, 0x73, 0x00, 0xfa, 0x00, 0xfb,
    +	0x00, 0xfc, 0x01, 0x69, 0x01, 0x6b, 0x02, 0xd9
    +};
    diff --git a/libs/libiconv/src/include/charmaps/iso-8859-5.h b/libs/libiconv/src/include/charmaps/iso-8859-5.h
    new file mode 100644
    index 0000000..d9fe684
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/iso-8859-5.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_iso_8859_5[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
    +	0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
    +	0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
    +	0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
    +	0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
    +	0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x04, 0x01,
    +	0x04, 0x02, 0x04, 0x03, 0x04, 0x04, 0x04, 0x05, 0x04, 0x06, 0x04, 0x07,
    +	0x04, 0x08, 0x04, 0x09, 0x04, 0x0a, 0x04, 0x0b, 0x04, 0x0c, 0x00, 0xad,
    +	0x04, 0x0e, 0x04, 0x0f, 0x04, 0x10, 0x04, 0x11, 0x04, 0x12, 0x04, 0x13,
    +	0x04, 0x14, 0x04, 0x15, 0x04, 0x16, 0x04, 0x17, 0x04, 0x18, 0x04, 0x19,
    +	0x04, 0x1a, 0x04, 0x1b, 0x04, 0x1c, 0x04, 0x1d, 0x04, 0x1e, 0x04, 0x1f,
    +	0x04, 0x20, 0x04, 0x21, 0x04, 0x22, 0x04, 0x23, 0x04, 0x24, 0x04, 0x25,
    +	0x04, 0x26, 0x04, 0x27, 0x04, 0x28, 0x04, 0x29, 0x04, 0x2a, 0x04, 0x2b,
    +	0x04, 0x2c, 0x04, 0x2d, 0x04, 0x2e, 0x04, 0x2f, 0x04, 0x30, 0x04, 0x31,
    +	0x04, 0x32, 0x04, 0x33, 0x04, 0x34, 0x04, 0x35, 0x04, 0x36, 0x04, 0x37,
    +	0x04, 0x38, 0x04, 0x39, 0x04, 0x3a, 0x04, 0x3b, 0x04, 0x3c, 0x04, 0x3d,
    +	0x04, 0x3e, 0x04, 0x3f, 0x04, 0x40, 0x04, 0x41, 0x04, 0x42, 0x04, 0x43,
    +	0x04, 0x44, 0x04, 0x45, 0x04, 0x46, 0x04, 0x47, 0x04, 0x48, 0x04, 0x49,
    +	0x04, 0x4a, 0x04, 0x4b, 0x04, 0x4c, 0x04, 0x4d, 0x04, 0x4e, 0x04, 0x4f,
    +	0x21, 0x16, 0x04, 0x51, 0x04, 0x52, 0x04, 0x53, 0x04, 0x54, 0x04, 0x55,
    +	0x04, 0x56, 0x04, 0x57, 0x04, 0x58, 0x04, 0x59, 0x04, 0x5a, 0x04, 0x5b,
    +	0x04, 0x5c, 0x00, 0xa7, 0x04, 0x5e, 0x04, 0x5f
    +};
    diff --git a/libs/libiconv/src/include/charmaps/iso-8859-6.h b/libs/libiconv/src/include/charmaps/iso-8859-6.h
    new file mode 100644
    index 0000000..820020f
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/iso-8859-6.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_iso_8859_6[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
    +	0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
    +	0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
    +	0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
    +	0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
    +	0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x06, 0x0c, 0x00, 0xad,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0x06, 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x06, 0x1f,
    +	0xff, 0xff, 0x06, 0x21, 0x06, 0x22, 0x06, 0x23, 0x06, 0x24, 0x06, 0x25,
    +	0x06, 0x26, 0x06, 0x27, 0x06, 0x28, 0x06, 0x29, 0x06, 0x2a, 0x06, 0x2b,
    +	0x06, 0x2c, 0x06, 0x2d, 0x06, 0x2e, 0x06, 0x2f, 0x06, 0x30, 0x06, 0x31,
    +	0x06, 0x32, 0x06, 0x33, 0x06, 0x34, 0x06, 0x35, 0x06, 0x36, 0x06, 0x37,
    +	0x06, 0x38, 0x06, 0x39, 0x06, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0x06, 0x40, 0x06, 0x41, 0x06, 0x42, 0x06, 0x43,
    +	0x06, 0x44, 0x06, 0x45, 0x06, 0x46, 0x06, 0x47, 0x06, 0x48, 0x06, 0x49,
    +	0x06, 0x4a, 0x06, 0x4b, 0x06, 0x4c, 0x06, 0x4d, 0x06, 0x4e, 0x06, 0x4f,
    +	0x06, 0x50, 0x06, 0x51, 0x06, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
    +};
    diff --git a/libs/libiconv/src/include/charmaps/iso-8859-7.h b/libs/libiconv/src/include/charmaps/iso-8859-7.h
    new file mode 100644
    index 0000000..174f9d3
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/iso-8859-7.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_iso_8859_7[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
    +	0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
    +	0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
    +	0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
    +	0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
    +	0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x20, 0x18,
    +	0x20, 0x19, 0x00, 0xa3, 0x20, 0xac, 0x20, 0xaf, 0x00, 0xa6, 0x00, 0xa7,
    +	0x00, 0xa8, 0x00, 0xa9, 0x03, 0x7a, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
    +	0xff, 0xff, 0x20, 0x15, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
    +	0x03, 0x84, 0x03, 0x85, 0x03, 0x86, 0x00, 0xb7, 0x03, 0x88, 0x03, 0x89,
    +	0x03, 0x8a, 0x00, 0xbb, 0x03, 0x8c, 0x00, 0xbd, 0x03, 0x8e, 0x03, 0x8f,
    +	0x03, 0x90, 0x03, 0x91, 0x03, 0x92, 0x03, 0x93, 0x03, 0x94, 0x03, 0x95,
    +	0x03, 0x96, 0x03, 0x97, 0x03, 0x98, 0x03, 0x99, 0x03, 0x9a, 0x03, 0x9b,
    +	0x03, 0x9c, 0x03, 0x9d, 0x03, 0x9e, 0x03, 0x9f, 0x03, 0xa0, 0x03, 0xa1,
    +	0xff, 0xff, 0x03, 0xa3, 0x03, 0xa4, 0x03, 0xa5, 0x03, 0xa6, 0x03, 0xa7,
    +	0x03, 0xa8, 0x03, 0xa9, 0x03, 0xaa, 0x03, 0xab, 0x03, 0xac, 0x03, 0xad,
    +	0x03, 0xae, 0x03, 0xaf, 0x03, 0xb0, 0x03, 0xb1, 0x03, 0xb2, 0x03, 0xb3,
    +	0x03, 0xb4, 0x03, 0xb5, 0x03, 0xb6, 0x03, 0xb7, 0x03, 0xb8, 0x03, 0xb9,
    +	0x03, 0xba, 0x03, 0xbb, 0x03, 0xbc, 0x03, 0xbd, 0x03, 0xbe, 0x03, 0xbf,
    +	0x03, 0xc0, 0x03, 0xc1, 0x03, 0xc2, 0x03, 0xc3, 0x03, 0xc4, 0x03, 0xc5,
    +	0x03, 0xc6, 0x03, 0xc7, 0x03, 0xc8, 0x03, 0xc9, 0x03, 0xca, 0x03, 0xcb,
    +	0x03, 0xcc, 0x03, 0xcd, 0x03, 0xce, 0xff, 0xff
    +};
    diff --git a/libs/libiconv/src/include/charmaps/iso-8859-8.h b/libs/libiconv/src/include/charmaps/iso-8859-8.h
    new file mode 100644
    index 0000000..66d4a5e
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/iso-8859-8.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_iso_8859_8[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
    +	0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
    +	0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
    +	0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
    +	0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
    +	0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0xff, 0xff,
    +	0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
    +	0x00, 0xa8, 0x00, 0xa9, 0x00, 0xd7, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
    +	0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
    +	0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
    +	0x00, 0xf7, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0x20, 0x17, 0x05, 0xd0, 0x05, 0xd1, 0x05, 0xd2, 0x05, 0xd3,
    +	0x05, 0xd4, 0x05, 0xd5, 0x05, 0xd6, 0x05, 0xd7, 0x05, 0xd8, 0x05, 0xd9,
    +	0x05, 0xda, 0x05, 0xdb, 0x05, 0xdc, 0x05, 0xdd, 0x05, 0xde, 0x05, 0xdf,
    +	0x05, 0xe0, 0x05, 0xe1, 0x05, 0xe2, 0x05, 0xe3, 0x05, 0xe4, 0x05, 0xe5,
    +	0x05, 0xe6, 0x05, 0xe7, 0x05, 0xe8, 0x05, 0xe9, 0x05, 0xea, 0xff, 0xff,
    +	0xff, 0xff, 0x20, 0x0e, 0x20, 0x0f, 0xff, 0xff
    +};
    diff --git a/libs/libiconv/src/include/charmaps/iso-8859-9.h b/libs/libiconv/src/include/charmaps/iso-8859-9.h
    new file mode 100644
    index 0000000..f1a8646
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/iso-8859-9.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_iso_8859_9[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83,
    +	0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89,
    +	0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f,
    +	0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95,
    +	0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b,
    +	0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1,
    +	0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
    +	0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
    +	0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
    +	0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
    +	0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
    +	0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
    +	0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
    +	0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x1e, 0x00, 0xd1,
    +	0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
    +	0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x30,
    +	0x01, 0x5e, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
    +	0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
    +	0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
    +	0x01, 0x1f, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
    +	0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
    +	0x00, 0xfc, 0x01, 0x31, 0x01, 0x5f, 0x00, 0xff
    +};
    diff --git a/libs/libiconv/src/include/charmaps/koi8-r.h b/libs/libiconv/src/include/charmaps/koi8-r.h
    new file mode 100644
    index 0000000..c2453a5
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/koi8-r.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_koi8_r[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x25, 0x02, 0x25, 0x0c, 0x25, 0x10,
    +	0x25, 0x14, 0x25, 0x18, 0x25, 0x1c, 0x25, 0x24, 0x25, 0x2c, 0x25, 0x34,
    +	0x25, 0x3c, 0x25, 0x80, 0x25, 0x84, 0x25, 0x88, 0x25, 0x8c, 0x25, 0x90,
    +	0x25, 0x91, 0x25, 0x92, 0x25, 0x93, 0x23, 0x20, 0x25, 0xa0, 0x22, 0x19,
    +	0x22, 0x1a, 0x22, 0x48, 0x22, 0x64, 0x22, 0x65, 0x00, 0xa0, 0x23, 0x21,
    +	0x00, 0xb0, 0x00, 0xb2, 0x00, 0xb7, 0x00, 0xf7, 0x25, 0x50, 0x25, 0x51,
    +	0x25, 0x52, 0x04, 0x51, 0x25, 0x53, 0x25, 0x54, 0x25, 0x55, 0x25, 0x56,
    +	0x25, 0x57, 0x25, 0x58, 0x25, 0x59, 0x25, 0x5a, 0x25, 0x5b, 0x25, 0x5c,
    +	0x25, 0x5d, 0x25, 0x5e, 0x25, 0x5f, 0x25, 0x60, 0x25, 0x61, 0x04, 0x01,
    +	0x25, 0x62, 0x25, 0x63, 0x25, 0x64, 0x25, 0x65, 0x25, 0x66, 0x25, 0x67,
    +	0x25, 0x68, 0x25, 0x69, 0x25, 0x6a, 0x25, 0x6b, 0x25, 0x6c, 0x00, 0xa9,
    +	0x04, 0x4e, 0x04, 0x30, 0x04, 0x31, 0x04, 0x46, 0x04, 0x34, 0x04, 0x35,
    +	0x04, 0x44, 0x04, 0x33, 0x04, 0x45, 0x04, 0x38, 0x04, 0x39, 0x04, 0x3a,
    +	0x04, 0x3b, 0x04, 0x3c, 0x04, 0x3d, 0x04, 0x3e, 0x04, 0x3f, 0x04, 0x4f,
    +	0x04, 0x40, 0x04, 0x41, 0x04, 0x42, 0x04, 0x43, 0x04, 0x36, 0x04, 0x32,
    +	0x04, 0x4c, 0x04, 0x4b, 0x04, 0x37, 0x04, 0x48, 0x04, 0x4d, 0x04, 0x49,
    +	0x04, 0x47, 0x04, 0x4a, 0x04, 0x2e, 0x04, 0x10, 0x04, 0x11, 0x04, 0x26,
    +	0x04, 0x14, 0x04, 0x15, 0x04, 0x24, 0x04, 0x13, 0x04, 0x25, 0x04, 0x18,
    +	0x04, 0x19, 0x04, 0x1a, 0x04, 0x1b, 0x04, 0x1c, 0x04, 0x1d, 0x04, 0x1e,
    +	0x04, 0x1f, 0x04, 0x2f, 0x04, 0x20, 0x04, 0x21, 0x04, 0x22, 0x04, 0x23,
    +	0x04, 0x16, 0x04, 0x12, 0x04, 0x2c, 0x04, 0x2b, 0x04, 0x17, 0x04, 0x28,
    +	0x04, 0x2d, 0x04, 0x29, 0x04, 0x27, 0x04, 0x2a
    +};
    diff --git a/libs/libiconv/src/include/charmaps/windows-1250.h b/libs/libiconv/src/include/charmaps/windows-1250.h
    new file mode 100644
    index 0000000..8e4723e
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/windows-1250.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_windows_1250[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0xff, 0xff,
    +	0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0xff, 0xff, 0x20, 0x30,
    +	0x01, 0x60, 0x20, 0x39, 0x01, 0x5a, 0x01, 0x64, 0x01, 0x7d, 0x01, 0x79,
    +	0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
    +	0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0x01, 0x61, 0x20, 0x3a,
    +	0x01, 0x5b, 0x01, 0x65, 0x01, 0x7e, 0x01, 0x7a, 0x00, 0xa0, 0x02, 0xc7,
    +	0x02, 0xd8, 0x01, 0x41, 0x00, 0xa4, 0x01, 0x04, 0x00, 0xa6, 0x00, 0xa7,
    +	0x00, 0xa8, 0x00, 0xa9, 0x01, 0x5e, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
    +	0x00, 0xae, 0x01, 0x7b, 0x00, 0xb0, 0x00, 0xb1, 0x02, 0xdb, 0x01, 0x42,
    +	0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x01, 0x05,
    +	0x01, 0x5f, 0x00, 0xbb, 0x01, 0x3d, 0x02, 0xdd, 0x01, 0x3e, 0x01, 0x7c,
    +	0x01, 0x54, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x39,
    +	0x01, 0x06, 0x00, 0xc7, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb,
    +	0x01, 0x1a, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x0e, 0x01, 0x10, 0x01, 0x43,
    +	0x01, 0x47, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x00, 0xd7,
    +	0x01, 0x58, 0x01, 0x6e, 0x00, 0xda, 0x01, 0x70, 0x00, 0xdc, 0x00, 0xdd,
    +	0x01, 0x62, 0x00, 0xdf, 0x01, 0x55, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
    +	0x00, 0xe4, 0x01, 0x3a, 0x01, 0x07, 0x00, 0xe7, 0x01, 0x0d, 0x00, 0xe9,
    +	0x01, 0x19, 0x00, 0xeb, 0x01, 0x1b, 0x00, 0xed, 0x00, 0xee, 0x01, 0x0f,
    +	0x01, 0x11, 0x01, 0x44, 0x01, 0x48, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51,
    +	0x00, 0xf6, 0x00, 0xf7, 0x01, 0x59, 0x01, 0x6f, 0x00, 0xfa, 0x01, 0x71,
    +	0x00, 0xfc, 0x00, 0xfd, 0x01, 0x63, 0x02, 0xd9
    +};
    diff --git a/libs/libiconv/src/include/charmaps/windows-1251.h b/libs/libiconv/src/include/charmaps/windows-1251.h
    new file mode 100644
    index 0000000..e278850
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/windows-1251.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_windows_1251[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x04, 0x03, 0x20, 0x1a, 0x04, 0x53,
    +	0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x20, 0xac, 0x20, 0x30,
    +	0x04, 0x09, 0x20, 0x39, 0x04, 0x0a, 0x04, 0x0c, 0x04, 0x0b, 0x04, 0x0f,
    +	0x04, 0x52, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
    +	0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0x04, 0x59, 0x20, 0x3a,
    +	0x04, 0x5a, 0x04, 0x5c, 0x04, 0x5b, 0x04, 0x5f, 0x00, 0xa0, 0x04, 0x0e,
    +	0x04, 0x5e, 0x04, 0x08, 0x00, 0xa4, 0x04, 0x90, 0x00, 0xa6, 0x00, 0xa7,
    +	0x04, 0x01, 0x00, 0xa9, 0x04, 0x04, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
    +	0x00, 0xae, 0x04, 0x07, 0x00, 0xb0, 0x00, 0xb1, 0x04, 0x06, 0x04, 0x56,
    +	0x04, 0x91, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x04, 0x51, 0x21, 0x16,
    +	0x04, 0x54, 0x00, 0xbb, 0x04, 0x58, 0x04, 0x05, 0x04, 0x55, 0x04, 0x57,
    +	0x04, 0x10, 0x04, 0x11, 0x04, 0x12, 0x04, 0x13, 0x04, 0x14, 0x04, 0x15,
    +	0x04, 0x16, 0x04, 0x17, 0x04, 0x18, 0x04, 0x19, 0x04, 0x1a, 0x04, 0x1b,
    +	0x04, 0x1c, 0x04, 0x1d, 0x04, 0x1e, 0x04, 0x1f, 0x04, 0x20, 0x04, 0x21,
    +	0x04, 0x22, 0x04, 0x23, 0x04, 0x24, 0x04, 0x25, 0x04, 0x26, 0x04, 0x27,
    +	0x04, 0x28, 0x04, 0x29, 0x04, 0x2a, 0x04, 0x2b, 0x04, 0x2c, 0x04, 0x2d,
    +	0x04, 0x2e, 0x04, 0x2f, 0x04, 0x30, 0x04, 0x31, 0x04, 0x32, 0x04, 0x33,
    +	0x04, 0x34, 0x04, 0x35, 0x04, 0x36, 0x04, 0x37, 0x04, 0x38, 0x04, 0x39,
    +	0x04, 0x3a, 0x04, 0x3b, 0x04, 0x3c, 0x04, 0x3d, 0x04, 0x3e, 0x04, 0x3f,
    +	0x04, 0x40, 0x04, 0x41, 0x04, 0x42, 0x04, 0x43, 0x04, 0x44, 0x04, 0x45,
    +	0x04, 0x46, 0x04, 0x47, 0x04, 0x48, 0x04, 0x49, 0x04, 0x4a, 0x04, 0x4b,
    +	0x04, 0x4c, 0x04, 0x4d, 0x04, 0x4e, 0x04, 0x4f
    +};
    diff --git a/libs/libiconv/src/include/charmaps/windows-1252.h b/libs/libiconv/src/include/charmaps/windows-1252.h
    new file mode 100644
    index 0000000..a6dad8a
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/windows-1252.h
    @@ -0,0 +1,25 @@
    +static const unsigned char map_windows_1252[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
    +	0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
    +	0x01, 0x60, 0x20, 0x39, 0x01, 0x52, 0xff, 0xff, 0x01, 0x7d, 0xff, 0xff,
    +	0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
    +	0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0x01, 0x61, 0x20, 0x3a,
    +	0x01, 0x53, 0xff, 0xff, 0x01, 0x7e, 0x01, 0x78, 0x00, 0xa0, 0x00, 0xa1,
    +	0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
    +	0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
    +	0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
    +	0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
    +	0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
    +	0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
    +	0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
    +	0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1,
    +	0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
    +	0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd,
    +	0x00, 0xde, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
    +	0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
    +	0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
    +	0x00, 0xf0, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
    +	0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
    +	0x00, 0xfc, 0x00, 0xfd, 0x00, 0xfe, 0x00, 0xff
    +};
    +
    diff --git a/libs/libiconv/src/include/charmaps/windows-1253.h b/libs/libiconv/src/include/charmaps/windows-1253.h
    new file mode 100644
    index 0000000..b0bdf1e
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/windows-1253.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_windows_1253[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
    +	0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0xff, 0xff, 0x20, 0x30,
    +	0xff, 0xff, 0x20, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
    +	0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xa0, 0x03, 0x85,
    +	0x03, 0x86, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
    +	0x00, 0xa8, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
    +	0x00, 0xae, 0x20, 0x15, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
    +	0x03, 0x84, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x03, 0x88, 0x03, 0x89,
    +	0x03, 0x8a, 0x00, 0xbb, 0x03, 0x8c, 0x00, 0xbd, 0x03, 0x8e, 0x03, 0x8f,
    +	0x03, 0x90, 0x03, 0x91, 0x03, 0x92, 0x03, 0x93, 0x03, 0x94, 0x03, 0x95,
    +	0x03, 0x96, 0x03, 0x97, 0x03, 0x98, 0x03, 0x99, 0x03, 0x9a, 0x03, 0x9b,
    +	0x03, 0x9c, 0x03, 0x9d, 0x03, 0x9e, 0x03, 0x9f, 0x03, 0xa0, 0x03, 0xa1,
    +	0xff, 0xff, 0x03, 0xa3, 0x03, 0xa4, 0x03, 0xa5, 0x03, 0xa6, 0x03, 0xa7,
    +	0x03, 0xa8, 0x03, 0xa9, 0x03, 0xaa, 0x03, 0xab, 0x03, 0xac, 0x03, 0xad,
    +	0x03, 0xae, 0x03, 0xaf, 0x03, 0xb0, 0x03, 0xb1, 0x03, 0xb2, 0x03, 0xb3,
    +	0x03, 0xb4, 0x03, 0xb5, 0x03, 0xb6, 0x03, 0xb7, 0x03, 0xb8, 0x03, 0xb9,
    +	0x03, 0xba, 0x03, 0xbb, 0x03, 0xbc, 0x03, 0xbd, 0x03, 0xbe, 0x03, 0xbf,
    +	0x03, 0xc0, 0x03, 0xc1, 0x03, 0xc2, 0x03, 0xc3, 0x03, 0xc4, 0x03, 0xc5,
    +	0x03, 0xc6, 0x03, 0xc7, 0x03, 0xc8, 0x03, 0xc9, 0x03, 0xca, 0x03, 0xcb,
    +	0x03, 0xcc, 0x03, 0xcd, 0x03, 0xce, 0xff, 0xff
    +};
    diff --git a/libs/libiconv/src/include/charmaps/windows-1254.h b/libs/libiconv/src/include/charmaps/windows-1254.h
    new file mode 100644
    index 0000000..be22600
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/windows-1254.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_windows_1254[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
    +	0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
    +	0x01, 0x60, 0x20, 0x39, 0x01, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
    +	0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0x01, 0x61, 0x20, 0x3a,
    +	0x01, 0x53, 0xff, 0xff, 0xff, 0xff, 0x01, 0x78, 0x00, 0xa0, 0x00, 0xa1,
    +	0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
    +	0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
    +	0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
    +	0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
    +	0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
    +	0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5,
    +	0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
    +	0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x1e, 0x00, 0xd1,
    +	0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
    +	0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x30,
    +	0x01, 0x5e, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3,
    +	0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
    +	0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
    +	0x01, 0x1f, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5,
    +	0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
    +	0x00, 0xfc, 0x01, 0x31, 0x01, 0x5f, 0x00, 0xff
    +};
    diff --git a/libs/libiconv/src/include/charmaps/windows-1255.h b/libs/libiconv/src/include/charmaps/windows-1255.h
    new file mode 100644
    index 0000000..28bf513
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/windows-1255.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_windows_1255[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
    +	0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
    +	0xff, 0xff, 0x20, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
    +	0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xa0, 0x00, 0xa1,
    +	0x00, 0xa2, 0x00, 0xa3, 0x20, 0xaa, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
    +	0x00, 0xa8, 0x00, 0xa9, 0x00, 0xd7, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
    +	0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
    +	0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
    +	0x00, 0xf7, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
    +	0x05, 0xb0, 0x05, 0xb1, 0x05, 0xb2, 0x05, 0xb3, 0x05, 0xb4, 0x05, 0xb5,
    +	0x05, 0xb6, 0x05, 0xb7, 0x05, 0xb8, 0x05, 0xb9, 0xff, 0xff, 0x05, 0xbb,
    +	0x05, 0xbc, 0x05, 0xbd, 0x05, 0xbe, 0x05, 0xbf, 0x05, 0xc0, 0x05, 0xc1,
    +	0x05, 0xc2, 0x05, 0xc3, 0x05, 0xf0, 0x05, 0xf1, 0x05, 0xf2, 0x05, 0xf3,
    +	0x05, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0x05, 0xd0, 0x05, 0xd1, 0x05, 0xd2, 0x05, 0xd3,
    +	0x05, 0xd4, 0x05, 0xd5, 0x05, 0xd6, 0x05, 0xd7, 0x05, 0xd8, 0x05, 0xd9,
    +	0x05, 0xda, 0x05, 0xdb, 0x05, 0xdc, 0x05, 0xdd, 0x05, 0xde, 0x05, 0xdf,
    +	0x05, 0xe0, 0x05, 0xe1, 0x05, 0xe2, 0x05, 0xe3, 0x05, 0xe4, 0x05, 0xe5,
    +	0x05, 0xe6, 0x05, 0xe7, 0x05, 0xe8, 0x05, 0xe9, 0x05, 0xea, 0xff, 0xff,
    +	0xff, 0xff, 0x20, 0x0e, 0x20, 0x0f, 0xff, 0xff
    +};
    diff --git a/libs/libiconv/src/include/charmaps/windows-1256.h b/libs/libiconv/src/include/charmaps/windows-1256.h
    new file mode 100644
    index 0000000..fbca315
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/windows-1256.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_windows_1256[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0x06, 0x7e, 0x20, 0x1a, 0x01, 0x92,
    +	0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
    +	0x06, 0x79, 0x20, 0x39, 0x01, 0x52, 0x06, 0x86, 0x06, 0x98, 0x06, 0x88,
    +	0x06, 0xaf, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
    +	0x20, 0x13, 0x20, 0x14, 0x06, 0xa9, 0x21, 0x22, 0x06, 0x91, 0x20, 0x3a,
    +	0x01, 0x53, 0x20, 0x0c, 0x20, 0x0d, 0x06, 0xba, 0x00, 0xa0, 0x06, 0x0c,
    +	0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
    +	0x00, 0xa8, 0x00, 0xa9, 0x06, 0xbe, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
    +	0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
    +	0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
    +	0x06, 0x1b, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x06, 0x1f,
    +	0x06, 0xc1, 0x06, 0x21, 0x06, 0x22, 0x06, 0x23, 0x06, 0x24, 0x06, 0x25,
    +	0x06, 0x26, 0x06, 0x27, 0x06, 0x28, 0x06, 0x29, 0x06, 0x2a, 0x06, 0x2b,
    +	0x06, 0x2c, 0x06, 0x2d, 0x06, 0x2e, 0x06, 0x2f, 0x06, 0x30, 0x06, 0x31,
    +	0x06, 0x32, 0x06, 0x33, 0x06, 0x34, 0x06, 0x35, 0x06, 0x36, 0x00, 0xd7,
    +	0x06, 0x37, 0x06, 0x38, 0x06, 0x39, 0x06, 0x3a, 0x06, 0x40, 0x06, 0x41,
    +	0x06, 0x42, 0x06, 0x43, 0x00, 0xe0, 0x06, 0x44, 0x00, 0xe2, 0x06, 0x45,
    +	0x06, 0x46, 0x06, 0x47, 0x06, 0x48, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
    +	0x00, 0xea, 0x00, 0xeb, 0x06, 0x49, 0x06, 0x4a, 0x00, 0xee, 0x00, 0xef,
    +	0x06, 0x4b, 0x06, 0x4c, 0x06, 0x4d, 0x06, 0x4e, 0x00, 0xf4, 0x06, 0x4f,
    +	0x06, 0x50, 0x00, 0xf7, 0x06, 0x51, 0x00, 0xf9, 0x06, 0x52, 0x00, 0xfb,
    +	0x00, 0xfc, 0x20, 0x0e, 0x20, 0x0f, 0x06, 0xd2
    +};
    diff --git a/libs/libiconv/src/include/charmaps/windows-1257.h b/libs/libiconv/src/include/charmaps/windows-1257.h
    new file mode 100644
    index 0000000..69d4474
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/windows-1257.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_windows_1257[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0xff, 0xff,
    +	0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0xff, 0xff, 0x20, 0x30,
    +	0xff, 0xff, 0x20, 0x39, 0xff, 0xff, 0x00, 0xa8, 0x02, 0xc7, 0x00, 0xb8,
    +	0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
    +	0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a,
    +	0xff, 0xff, 0x00, 0xaf, 0x02, 0xdb, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff,
    +	0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa6, 0x00, 0xa7,
    +	0x00, 0xd8, 0x00, 0xa9, 0x01, 0x56, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
    +	0x00, 0xae, 0x00, 0xc6, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
    +	0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xf8, 0x00, 0xb9,
    +	0x01, 0x57, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xe6,
    +	0x01, 0x04, 0x01, 0x2e, 0x01, 0x00, 0x01, 0x06, 0x00, 0xc4, 0x00, 0xc5,
    +	0x01, 0x18, 0x01, 0x12, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x79, 0x01, 0x16,
    +	0x01, 0x22, 0x01, 0x36, 0x01, 0x2a, 0x01, 0x3b, 0x01, 0x60, 0x01, 0x43,
    +	0x01, 0x45, 0x00, 0xd3, 0x01, 0x4c, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7,
    +	0x01, 0x72, 0x01, 0x41, 0x01, 0x5a, 0x01, 0x6a, 0x00, 0xdc, 0x01, 0x7b,
    +	0x01, 0x7d, 0x00, 0xdf, 0x01, 0x05, 0x01, 0x2f, 0x01, 0x01, 0x01, 0x07,
    +	0x00, 0xe4, 0x00, 0xe5, 0x01, 0x19, 0x01, 0x13, 0x01, 0x0d, 0x00, 0xe9,
    +	0x01, 0x7a, 0x01, 0x17, 0x01, 0x23, 0x01, 0x37, 0x01, 0x2b, 0x01, 0x3c,
    +	0x01, 0x61, 0x01, 0x44, 0x01, 0x46, 0x00, 0xf3, 0x01, 0x4d, 0x00, 0xf5,
    +	0x00, 0xf6, 0x00, 0xf7, 0x01, 0x73, 0x01, 0x42, 0x01, 0x5b, 0x01, 0x6b,
    +	0x00, 0xfc, 0x01, 0x7c, 0x01, 0x7e, 0x02, 0xd9
    +};
    diff --git a/libs/libiconv/src/include/charmaps/windows-1258.h b/libs/libiconv/src/include/charmaps/windows-1258.h
    new file mode 100644
    index 0000000..5bbd737
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/windows-1258.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_windows_1258[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92,
    +	0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30,
    +	0xff, 0xff, 0x20, 0x39, 0x01, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
    +	0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a,
    +	0x01, 0x53, 0xff, 0xff, 0xff, 0xff, 0x01, 0x78, 0x00, 0xa0, 0x00, 0xa1,
    +	0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
    +	0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad,
    +	0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3,
    +	0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9,
    +	0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf,
    +	0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x00, 0xc5,
    +	0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
    +	0x03, 0x00, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x10, 0x00, 0xd1,
    +	0x03, 0x09, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0xa0, 0x00, 0xd6, 0x00, 0xd7,
    +	0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0xaf,
    +	0x03, 0x03, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03,
    +	0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9,
    +	0x00, 0xea, 0x00, 0xeb, 0x03, 0x01, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef,
    +	0x01, 0x11, 0x00, 0xf1, 0x03, 0x23, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0xa1,
    +	0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb,
    +	0x00, 0xfc, 0x01, 0xb0, 0x20, 0xab, 0x00, 0xff
    +};
    diff --git a/libs/libiconv/src/include/charmaps/windows-874.h b/libs/libiconv/src/include/charmaps/windows-874.h
    new file mode 100644
    index 0000000..5749280
    --- /dev/null
    +++ b/libs/libiconv/src/include/charmaps/windows-874.h
    @@ -0,0 +1,24 @@
    +static const unsigned char map_windows_874[] = {
    +	0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0x20, 0x26, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22,
    +	0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xa0, 0x0e, 0x01,
    +	0x0e, 0x02, 0x0e, 0x03, 0x0e, 0x04, 0x0e, 0x05, 0x0e, 0x06, 0x0e, 0x07,
    +	0x0e, 0x08, 0x0e, 0x09, 0x0e, 0x0a, 0x0e, 0x0b, 0x0e, 0x0c, 0x0e, 0x0d,
    +	0x0e, 0x0e, 0x0e, 0x0f, 0x0e, 0x10, 0x0e, 0x11, 0x0e, 0x12, 0x0e, 0x13,
    +	0x0e, 0x14, 0x0e, 0x15, 0x0e, 0x16, 0x0e, 0x17, 0x0e, 0x18, 0x0e, 0x19,
    +	0x0e, 0x1a, 0x0e, 0x1b, 0x0e, 0x1c, 0x0e, 0x1d, 0x0e, 0x1e, 0x0e, 0x1f,
    +	0x0e, 0x20, 0x0e, 0x21, 0x0e, 0x22, 0x0e, 0x23, 0x0e, 0x24, 0x0e, 0x25,
    +	0x0e, 0x26, 0x0e, 0x27, 0x0e, 0x28, 0x0e, 0x29, 0x0e, 0x2a, 0x0e, 0x2b,
    +	0x0e, 0x2c, 0x0e, 0x2d, 0x0e, 0x2e, 0x0e, 0x2f, 0x0e, 0x30, 0x0e, 0x31,
    +	0x0e, 0x32, 0x0e, 0x33, 0x0e, 0x34, 0x0e, 0x35, 0x0e, 0x36, 0x0e, 0x37,
    +	0x0e, 0x38, 0x0e, 0x39, 0x0e, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    +	0xff, 0xff, 0x0e, 0x3f, 0x0e, 0x40, 0x0e, 0x41, 0x0e, 0x42, 0x0e, 0x43,
    +	0x0e, 0x44, 0x0e, 0x45, 0x0e, 0x46, 0x0e, 0x47, 0x0e, 0x48, 0x0e, 0x49,
    +	0x0e, 0x4a, 0x0e, 0x4b, 0x0e, 0x4c, 0x0e, 0x4d, 0x0e, 0x4e, 0x0e, 0x4f,
    +	0x0e, 0x50, 0x0e, 0x51, 0x0e, 0x52, 0x0e, 0x53, 0x0e, 0x54, 0x0e, 0x55,
    +	0x0e, 0x56, 0x0e, 0x57, 0x0e, 0x58, 0x0e, 0x59, 0x0e, 0x5a, 0x0e, 0x5b,
    +	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
    +};
    diff --git a/libs/libiconv/src/include/iconv.h b/libs/libiconv/src/include/iconv.h
    new file mode 100644
    index 0000000..dfab27f
    --- /dev/null
    +++ b/libs/libiconv/src/include/iconv.h
    @@ -0,0 +1,32 @@
    +#ifndef _ICONV_H
    +#define _ICONV_H 1
    +
    +#define _LIBICONV_VERSION 0x010B    /* version number: (major<<8) + minor */
    +
    +#include 
    +
    +#ifdef __cplusplus
    +extern "C" {
    +#endif
    +
    +extern int _libiconv_version; /* Likewise */
    +
    +typedef long iconv_t;
    +
    +extern iconv_t
    +iconv_open(const char *tocode, const char *fromcode);
    +
    +extern size_t
    +iconv(iconv_t cd, char **inbuf, size_t *inbytesleft,
    +                  char **outbuf, size_t *outbytesleft);
    +
    +extern int
    +iconv_close(iconv_t cd);
    +
    +#define libiconv_set_relocation_prefix(...) do {} while(0)
    +
    +#ifdef __cplusplus
    +}
    +#endif
    +
    +#endif /* _ICONV_H */
    diff --git a/libs/libiconv/src/m4/iconv.m4 b/libs/libiconv/src/m4/iconv.m4
    new file mode 100644
    index 0000000..e2041b9
    --- /dev/null
    +++ b/libs/libiconv/src/m4/iconv.m4
    @@ -0,0 +1,214 @@
    +# iconv.m4 serial 11 (gettext-0.18.1)
    +dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
    +dnl This file is free software; the Free Software Foundation
    +dnl gives unlimited permission to copy and/or distribute it,
    +dnl with or without modifications, as long as this notice is preserved.
    +
    +dnl From Bruno Haible.
    +
    +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
    +[
    +  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
    +  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
    +  AC_REQUIRE([AC_LIB_RPATH])
    +
    +  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
    +  dnl accordingly.
    +  AC_LIB_LINKFLAGS_BODY([iconv])
    +])
    +
    +AC_DEFUN([AM_ICONV_LINK],
    +[
    +  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
    +  dnl those with the standalone portable GNU libiconv installed).
    +  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
    +
    +  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
    +  dnl accordingly.
    +  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
    +
    +  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
    +  dnl because if the user has installed libiconv and not disabled its use
    +  dnl via --without-libiconv-prefix, he wants to use it. The first
    +  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
    +  am_save_CPPFLAGS="$CPPFLAGS"
    +  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
    +
    +  AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
    +    am_cv_func_iconv="no, consider installing GNU libiconv"
    +    am_cv_lib_iconv=no
    +    AC_TRY_LINK([#include 
    +#include ],
    +      [iconv_t cd = iconv_open("","");
    +       iconv(cd,NULL,NULL,NULL,NULL);
    +       iconv_close(cd);],
    +      [am_cv_func_iconv=yes])
    +    if test "$am_cv_func_iconv" != yes; then
    +      am_save_LIBS="$LIBS"
    +      LIBS="$LIBS $LIBICONV"
    +      AC_TRY_LINK([#include 
    +#include ],
    +        [iconv_t cd = iconv_open("","");
    +         iconv(cd,NULL,NULL,NULL,NULL);
    +         iconv_close(cd);],
    +        [am_cv_lib_iconv=yes]
    +        [am_cv_func_iconv=yes])
    +      LIBS="$am_save_LIBS"
    +    fi
    +  ])
    +  if test "$am_cv_func_iconv" = yes; then
    +    AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
    +      dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
    +      am_save_LIBS="$LIBS"
    +      if test $am_cv_lib_iconv = yes; then
    +        LIBS="$LIBS $LIBICONV"
    +      fi
    +      AC_TRY_RUN([
    +#include 
    +#include 
    +int main ()
    +{
    +  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
    +     returns.  */
    +  {
    +    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
    +    if (cd_utf8_to_88591 != (iconv_t)(-1))
    +      {
    +        static const char input[] = "\342\202\254"; /* EURO SIGN */
    +        char buf[10];
    +        const char *inptr = input;
    +        size_t inbytesleft = strlen (input);
    +        char *outptr = buf;
    +        size_t outbytesleft = sizeof (buf);
    +        size_t res = iconv (cd_utf8_to_88591,
    +                            (char **) &inptr, &inbytesleft,
    +                            &outptr, &outbytesleft);
    +        if (res == 0)
    +          return 1;
    +      }
    +  }
    +  /* Test against Solaris 10 bug: Failures are not distinguishable from
    +     successful returns.  */
    +  {
    +    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
    +    if (cd_ascii_to_88591 != (iconv_t)(-1))
    +      {
    +        static const char input[] = "\263";
    +        char buf[10];
    +        const char *inptr = input;
    +        size_t inbytesleft = strlen (input);
    +        char *outptr = buf;
    +        size_t outbytesleft = sizeof (buf);
    +        size_t res = iconv (cd_ascii_to_88591,
    +                            (char **) &inptr, &inbytesleft,
    +                            &outptr, &outbytesleft);
    +        if (res == 0)
    +          return 1;
    +      }
    +  }
    +#if 0 /* This bug could be worked around by the caller.  */
    +  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
    +  {
    +    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
    +    if (cd_88591_to_utf8 != (iconv_t)(-1))
    +      {
    +        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
    +        char buf[50];
    +        const char *inptr = input;
    +        size_t inbytesleft = strlen (input);
    +        char *outptr = buf;
    +        size_t outbytesleft = sizeof (buf);
    +        size_t res = iconv (cd_88591_to_utf8,
    +                            (char **) &inptr, &inbytesleft,
    +                            &outptr, &outbytesleft);
    +        if ((int)res > 0)
    +          return 1;
    +      }
    +  }
    +#endif
    +  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
    +     provided.  */
    +  if (/* Try standardized names.  */
    +      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
    +      /* Try IRIX, OSF/1 names.  */
    +      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
    +      /* Try AIX names.  */
    +      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
    +      /* Try HP-UX names.  */
    +      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
    +    return 1;
    +  return 0;
    +}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
    +        [case "$host_os" in
    +           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
    +           *)            am_cv_func_iconv_works="guessing yes" ;;
    +         esac])
    +      LIBS="$am_save_LIBS"
    +    ])
    +    case "$am_cv_func_iconv_works" in
    +      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
    +      *)   am_func_iconv=yes ;;
    +    esac
    +  else
    +    am_func_iconv=no am_cv_lib_iconv=no
    +  fi
    +  if test "$am_func_iconv" = yes; then
    +    AC_DEFINE([HAVE_ICONV], [1],
    +      [Define if you have the iconv() function and it works.])
    +  fi
    +  if test "$am_cv_lib_iconv" = yes; then
    +    AC_MSG_CHECKING([how to link with libiconv])
    +    AC_MSG_RESULT([$LIBICONV])
    +  else
    +    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
    +    dnl either.
    +    CPPFLAGS="$am_save_CPPFLAGS"
    +    LIBICONV=
    +    LTLIBICONV=
    +  fi
    +  AC_SUBST([LIBICONV])
    +  AC_SUBST([LTLIBICONV])
    +])
    +
    +dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
    +dnl avoid warnings like
    +dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
    +dnl This is tricky because of the way 'aclocal' is implemented:
    +dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
    +dnl   Otherwise aclocal's initial scan pass would miss the macro definition.
    +dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
    +dnl   Otherwise aclocal would emit many "Use of uninitialized value $1"
    +dnl   warnings.
    +m4_define([gl_iconv_AC_DEFUN],
    +  m4_version_prereq([2.64],
    +    [[AC_DEFUN_ONCE(
    +        [$1], [$2])]],
    +    [[AC_DEFUN(
    +        [$1], [$2])]]))
    +gl_iconv_AC_DEFUN([AM_ICONV],
    +[
    +  AM_ICONV_LINK
    +  if test "$am_cv_func_iconv" = yes; then
    +    AC_MSG_CHECKING([for iconv declaration])
    +    AC_CACHE_VAL([am_cv_proto_iconv], [
    +      AC_TRY_COMPILE([
    +#include 
    +#include 
    +extern
    +#ifdef __cplusplus
    +"C"
    +#endif
    +#if defined(__STDC__) || defined(__cplusplus)
    +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
    +#else
    +size_t iconv();
    +#endif
    +], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
    +      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
    +    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
    +    AC_MSG_RESULT([
    +         $am_cv_proto_iconv])
    +    AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
    +      [Define as const if the declaration of iconv() needs const.])
    +  fi
    +])
    diff --git a/libs/libid3tag/Makefile b/libs/libid3tag/Makefile
    new file mode 100644
    index 0000000..7b05b22
    --- /dev/null
    +++ b/libs/libid3tag/Makefile
    @@ -0,0 +1,59 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libid3tag
    +PKG_VERSION:=0.15.1b
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/mad
    +PKG_MD5SUM:=e5808ad997ba32c498803822078748c3
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libid3tag
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+zlib
    +  TITLE:=An ID3 tag manipulation library
    +  URL:=http://mad.sourceforge.net/
    +endef
    +
    +define Package/libid3tag/description
    +	libid3tag is a library for reading and (eventually) writing ID3 tags, both 
    +	ID3v1 and the various versions of ID3v2.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +		--disable-debugging \
    +		--disable-profiling \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/id3tag.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3tag.so* $(1)/usr/lib/
    +endef
    +
    +define Package/libid3tag/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3tag.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libid3tag))
    diff --git a/libs/libidn/Makefile b/libs/libidn/Makefile
    new file mode 100644
    index 0000000..6c7a08c
    --- /dev/null
    +++ b/libs/libidn/Makefile
    @@ -0,0 +1,59 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libidn
    +PKG_VERSION:=1.18
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@GNU/libidn
    +PKG_MD5SUM:=66f115347439f56386f37a3ad92c1da2
    +
    +PKG_FIXUP:=libtool
    +PKG_REMOVE_FILES:=GNUmakefile aclocal.m4
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libidn
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Stringprep, Punycode and IDNA implementation
    +  URL:=http://www.gnu.org/software/libidn/
    +endef
    +
    +define Package/libidn/description
    +  GNU Libidn is a fully documented implementation of the Stringprep,
    +  Punycode and IDNA specifications. Libidn's purpose is to encode and
    +  decode internationalized domain names.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +MAKE_FLAGS += \
    +	CC="$(TARGET_CC)" \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libidn/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libidn))
    diff --git a/libs/libidn/patches/001-remove-libtool.patch b/libs/libidn/patches/001-remove-libtool.patch
    new file mode 100644
    index 0000000..942094d
    --- /dev/null
    +++ b/libs/libidn/patches/001-remove-libtool.patch
    @@ -0,0 +1,10 @@
    +--- a/aclocal.m4
    ++++ b/aclocal.m4
    +@@ -1080,7 +1080,6 @@ m4_include([m4/intlmacosx.m4])
    + m4_include([m4/lib-ld.m4])
    + m4_include([m4/lib-link.m4])
    + m4_include([m4/lib-prefix.m4])
    +-m4_include([m4/libtool.m4])
    + m4_include([m4/longlong.m4])
    + m4_include([m4/ltoptions.m4])
    + m4_include([m4/ltsugar.m4])
    diff --git a/libs/libidn/patches/002-disable-po-docs-examples.patch b/libs/libidn/patches/002-disable-po-docs-examples.patch
    new file mode 100644
    index 0000000..817749e
    --- /dev/null
    +++ b/libs/libidn/patches/002-disable-po-docs-examples.patch
    @@ -0,0 +1,22 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -16,7 +16,7 @@
    + # You should have received a copy of the GNU General Public License
    + # along with this program.  If not, see .
    + 
    +-SUBDIRS = gl lib/gl lib po src doc gltests lib/gltests tests examples	\
    ++SUBDIRS = gl lib/gl lib src \
    + 	java csharp
    + 
    + EXTRA_DIST = cfg.mk maint.mk .clcopying
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -46,8 +46,6 @@ gl_EARLY
    + AC_PROG_LIBTOOL
    + AM_MISSING_PROG(PERL, perl, $missing_dir)
    + AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
    +-AM_GNU_GETTEXT(external)
    +-AM_GNU_GETTEXT_VERSION(0.17)
    + AM_ICONV
    + AM_PATH_LISPDIR
    + 
    diff --git a/libs/libinklevel/Makefile b/libs/libinklevel/Makefile
    new file mode 100644
    index 0000000..9eb17b8
    --- /dev/null
    +++ b/libs/libinklevel/Makefile
    @@ -0,0 +1,58 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libinklevel
    +PKG_VERSION:=0.8.0
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/libinklevel
    +PKG_MD5SUM:=83464cb23fe46a1d1adbe10f08b247be
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libinklevel
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=$(if $(WITH_PARPORT), +libieee1284)
    +  TITLE:=Printers Ink Level Library
    +  URL:=http://libinklevel.sourceforge.net/
    +endef
    +
    +define Package/libinklevel/description
    +  Libinklevel is a library for checking the ink level of your printer on a system which runs Linux.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +TARGET_LIBS += $(if $(WITH_PARPORT), -lieee1284)
    +MAKE_ARGS += LIBS="$(TARGET_LIBS)"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/inklevel.h \
    +		$(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libinklevel.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/libinklevel/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libinklevel.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libinklevel))
    diff --git a/libs/libinklevel/patches/001-configure.patch b/libs/libinklevel/patches/001-configure.patch
    new file mode 100644
    index 0000000..8fda561
    --- /dev/null
    +++ b/libs/libinklevel/patches/001-configure.patch
    @@ -0,0 +1,275 @@
    +--- a/configure
    ++++ b/configure
    +@@ -12070,7 +12070,7 @@ fi
    + ## Check for optional  header files
    + 
    + 
    +-for ac_header in ifaddrs.h ieee1284.h
    ++for ac_header in ifaddrs.h
    + do
    + 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
    +@@ -13690,235 +13690,6 @@ case $host in
    + cat >>confdefs.h <<_ACEOF
    + #define HOST_OS LINUX
    + _ACEOF
    +-
    +-
    +-for ac_header in ieee1284.h
    +-do
    +-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
    +-  { $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
    +-  $as_echo_n "(cached) " >&6
    +-fi
    +-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?
    +-{ $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
    +-cat confdefs.h >>conftest.$ac_ext
    +-cat >>conftest.$ac_ext <<_ACEOF
    +-/* end confdefs.h.  */
    +-$ac_includes_default
    +-#include <$ac_header>
    +-_ACEOF
    +-rm -f conftest.$ac_objext
    +-if { (ac_try="$ac_compile"
    +-case "(($ac_try" in
    +-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    +-  *) ac_try_echo=$ac_try;;
    +-esac
    +-eval ac_try_echo="\"\$as_me:$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
    +-  $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
    +-  $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
    +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    +-$as_echo "$ac_header_compiler" >&6; }
    +-
    +-# Is the header present?
    +-{ $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
    +-cat confdefs.h >>conftest.$ac_ext
    +-cat >>conftest.$ac_ext <<_ACEOF
    +-/* end confdefs.h.  */
    +-#include <$ac_header>
    +-_ACEOF
    +-if { (ac_try="$ac_cpp conftest.$ac_ext"
    +-case "(($ac_try" in
    +-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    +-  *) ac_try_echo=$ac_try;;
    +-esac
    +-eval ac_try_echo="\"\$as_me:$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
    +-  $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
    +-  $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
    +-{ $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: )
    +-    { $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:* )
    +-    { $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
    +-{ $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
    +-  $as_echo_n "(cached) " >&6
    +-else
    +-  eval "$as_ac_Header=\$ac_header_preproc"
    +-fi
    +-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
    +-as_val=`eval 'as_val=${'$as_ac_Header'}
    +-		 $as_echo "$as_val"'`
    +-   if test "x$as_val" = x""yes; then
    +-  cat >>confdefs.h <<_ACEOF
    +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
    +-_ACEOF
    +-
    +-else
    +-  { { $as_echo "$as_me:$LINENO: error: ( required header file ieee1284.h missing)" >&5
    +-$as_echo "$as_me: error: ( required header file ieee1284.h missing)" >&2;}
    +-   { (exit 1); exit 1; }; }
    +-fi
    +-
    +-done
    +-
    +-
    +-{ $as_echo "$as_me:$LINENO: checking for ieee1284_open in -lieee1284" >&5
    +-$as_echo_n "checking for ieee1284_open in -lieee1284... " >&6; }
    +-if test "${ac_cv_lib_ieee1284_ieee1284_open+set}" = set; then
    +-  $as_echo_n "(cached) " >&6
    +-else
    +-  ac_check_lib_save_LIBS=$LIBS
    +-LIBS="-lieee1284  $LIBS"
    +-cat >conftest.$ac_ext <<_ACEOF
    +-/* confdefs.h.  */
    +-_ACEOF
    +-cat confdefs.h >>conftest.$ac_ext
    +-cat >>conftest.$ac_ext <<_ACEOF
    +-/* end confdefs.h.  */
    +-
    +-/* Override any GCC internal prototype to avoid an error.
    +-   Use char because int might match the return type of a GCC
    +-   builtin and then its argument prototype would still apply.  */
    +-#ifdef __cplusplus
    +-extern "C"
    +-#endif
    +-char ieee1284_open ();
    +-int
    +-main ()
    +-{
    +-return ieee1284_open ();
    +-  ;
    +-  return 0;
    +-}
    +-_ACEOF
    +-rm -f conftest.$ac_objext conftest$ac_exeext
    +-if { (ac_try="$ac_link"
    +-case "(($ac_try" in
    +-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    +-  *) ac_try_echo=$ac_try;;
    +-esac
    +-eval ac_try_echo="\"\$as_me:$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
    +-  $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 && {
    +-	 test "$cross_compiling" = yes ||
    +-	 $as_test_x conftest$ac_exeext
    +-       }; then
    +-  ac_cv_lib_ieee1284_ieee1284_open=yes
    +-else
    +-  $as_echo "$as_me: failed program was:" >&5
    +-sed 's/^/| /' conftest.$ac_ext >&5
    +-
    +-	ac_cv_lib_ieee1284_ieee1284_open=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
    +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee1284_ieee1284_open" >&5
    +-$as_echo "$ac_cv_lib_ieee1284_ieee1284_open" >&6; }
    +-if test "x$ac_cv_lib_ieee1284_ieee1284_open" = x""yes; then
    +-  cat >>confdefs.h <<_ACEOF
    +-#define HAVE_LIBIEEE1284 1
    +-_ACEOF
    +-
    +-  LIBS="-lieee1284 $LIBS"
    +-
    +-else
    +-  { { $as_echo "$as_me:$LINENO: error: Library not found" >&5
    +-$as_echo "$as_me: error: Library not found" >&2;}
    +-   { (exit 1); exit 1; }; }
    +-fi
    + ;;
    + 
    +   *-*-solaris2.*)
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -60,7 +60,7 @@ fi
    + 
    + 
    + ## Check for optional  header files
    +-AC_CHECK_HEADERS([ifaddrs.h ieee1284.h])
    ++AC_CHECK_HEADERS([ifaddrs.h])
    + 
    + ## Check for mandatory header files
    + 
    +@@ -95,15 +95,7 @@ AC_TYPE_UINT32_T
    + AC_TYPE_UINT8_T
    + AC_DEFINE_UNQUOTED(LINUX,1,[Define value for Linux OS])
    + AC_DEFINE_UNQUOTED(OPENSOLARIS,2,[Define value for OpenSolaris OS])
    +-case $host in
    +-  *-*-linux*) AC_DEFINE_UNQUOTED(HOST_OS,LINUX,[Host OS])
    +-  	      AC_CHECK_HEADERS([ieee1284.h],,
    +-				AC_MSG_ERROR(( required header file ieee1284.h missing)))
    +-  	      AC_CHECK_LIB([ieee1284],ieee1284_open,, AC_MSG_ERROR(Library not found),);;
    +-
    +-  *-*-solaris2.*) AC_DEFINE(HOST_OS,OPENSOLARIS,[HOST OS]);;
    +-  *-*-*) AC_MSG_ERROR( Host OS not (yet) supported) ;;
    +-esac
    ++AC_DEFINE_UNQUOTED(HOST_OS,LINUX,[Host OS])
    + 
    + ## Variables to be exported
    + 
    diff --git a/libs/libinklevel/patches/002-disable_parport.patch b/libs/libinklevel/patches/002-disable_parport.patch
    new file mode 100644
    index 0000000..72d0338
    --- /dev/null
    +++ b/libs/libinklevel/patches/002-disable_parport.patch
    @@ -0,0 +1,55 @@
    +--- a/linux.c
    ++++ b/linux.c
    +@@ -16,10 +16,11 @@
    + #include 
    + #include 
    + 
    ++#ifdef WITH_PARPORT
    + /* ieee1284.h uses HAVE_IEEE1284_H, so we undefine it */
    + #undef HAVE_IEEE1284_H
    + #include 
    +-
    ++#endif
    + #include "internal.h"
    + #include "inklevel.h"
    + #include "platform_specific.h"
    +@@ -32,7 +33,9 @@
    + 
    + int get_device_id(const int port, const char *device_file, 
    +                   const int portnumber, char *device_id) {
    ++#ifdef WITH_PARPORT
    +   struct parport_list parports;
    ++#endif
    +   char tmp[BUFLEN];
    +   char device_file1[256];
    +   char device_file2[256];
    +@@ -41,6 +44,7 @@ int get_device_id(const int port, const 
    +   char *c;
    +   int realsize;
    + 
    ++#ifdef WITH_PARPORT
    +   if (port == PARPORT ) {
    +     /* check if we have appropiate permissions */
    + 
    +@@ -73,7 +77,9 @@ int get_device_id(const int port, const 
    + 
    +     return COULD_NOT_GET_DEVICE_ID;
    + 
    +-  } else if (port == USB || port == CUSTOM_USB) {
    ++  } else
    ++#endif
    ++  if (port == USB || port == CUSTOM_USB) {
    + 
    +     if (port == USB) {
    +       sprintf(device_file1, "/dev/usb/lp%d", portnumber);
    +@@ -138,8 +144,10 @@ int open_printer_device(const int port, 
    +   if (port == USB) {
    +     sprintf(device_file1, "/dev/usb/lp%d", portnumber);
    +     sprintf(device_file2, "/dev/usblp%d", portnumber);
    ++#ifdef WITH_PARPORT
    +   } else if (port == PARPORT) {
    +     sprintf(device_file1, "/dev/lp%d", portnumber);
    ++#endif
    +   } else if (port == CUSTOM_USB) {
    +     strncpy(device_file1, device_file, 255);
    +     device_file1[255] = '\0';
    diff --git a/libs/libinklevel/patches/003-fix_usb_device_location.patch b/libs/libinklevel/patches/003-fix_usb_device_location.patch
    new file mode 100644
    index 0000000..7bf78c3
    --- /dev/null
    +++ b/libs/libinklevel/patches/003-fix_usb_device_location.patch
    @@ -0,0 +1,20 @@
    +--- a/linux.c
    ++++ b/linux.c
    +@@ -82,7 +82,7 @@ int get_device_id(const int port, const 
    +   if (port == USB || port == CUSTOM_USB) {
    + 
    +     if (port == USB) {
    +-      sprintf(device_file1, "/dev/usb/lp%d", portnumber);
    ++      sprintf(device_file1, "/dev/lp%d", portnumber);
    +       sprintf(device_file2, "/dev/usblp%d", portnumber);
    +       fd = open(device_file1, O_RDONLY);
    +       if (fd == -1) {
    +@@ -142,7 +142,7 @@ int open_printer_device(const int port, 
    +   int fd;
    + 
    +   if (port == USB) {
    +-    sprintf(device_file1, "/dev/usb/lp%d", portnumber);
    ++    sprintf(device_file1, "/dev/lp%d", portnumber);
    +     sprintf(device_file2, "/dev/usblp%d", portnumber);
    + #ifdef WITH_PARPORT
    +   } else if (port == PARPORT) {
    diff --git a/libs/liblo/Makefile b/libs/liblo/Makefile
    new file mode 100644
    index 0000000..86c8e8f
    --- /dev/null
    +++ b/libs/liblo/Makefile
    @@ -0,0 +1,83 @@
    +# 
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=liblo
    +PKG_VERSION:=0.26
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/liblo
    +PKG_MD5SUM:=5351de14262560e15e7f23865293b16f
    +
    +PKG_FIXUP:=libtool
    +PKG_REMOVE_FILES:=autogen.sh aclocal.m4
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/liblo/Default
    +  SUBMENU:=Sound
    +  TITLE:=Lightweight Open Sound Control (OSC)
    +  URL:=http://liblo.sourceforge.net/
    +endef
    +
    +define Package/liblo
    +$(call Package/liblo/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= library
    +  DEPENDS:= +libpthread
    +endef
    +
    +define Package/liblo-utils
    +$(call Package/liblo/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  TITLE+= utilities
    +  DEPENDS:= +liblo
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/include/lo \
    +		$(1)/usr/include/ \
    +	)
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/liblo.so* \
    +		$(1)/usr/lib/ \
    +	)
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/pkgconfig/liblo.pc \
    +		$(1)/usr/lib/pkgconfig/ \
    +	)
    +endef
    +
    +define Package/liblo/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/liblo.so.* \
    +		$(1)/usr/lib/ \
    +	)
    +endef
    +
    +define Package/liblo-utils/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/bin/oscdump \
    +		./usr/bin/oscsend \
    +		$(1)/usr/bin/ \
    +	)
    +endef
    +
    +$(eval $(call BuildPackage,liblo))
    +$(eval $(call BuildPackage,liblo-utils))
    diff --git a/libs/libmad/Makefile b/libs/libmad/Makefile
    new file mode 100644
    index 0000000..6146600
    --- /dev/null
    +++ b/libs/libmad/Makefile
    @@ -0,0 +1,82 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libmad
    +PKG_VERSION:=0.15.1b
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/mad \
    +	ftp://ftp.mars.org/pub/mpeg/
    +PKG_MD5SUM:=1be543bc30c56fb6bea1d7bf6a64e66c
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +FPM:=default
    +ifeq ($(ARCH),armeb)
    +  FPM:=arm
    +endif
    +ifeq ($(ARCH),i386)
    +  FPM:=intel
    +endif
    +ifeq ($(ARCH),mipsel)
    +  FPM:=mips
    +endif
    +
    +define Package/libmad
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=An high-quality MPEG audio decoding library
    +  URL:=http://www.underbit.com/products/mad/
    +  DEPENDS:=@BUILD_PATENTED
    +endef
    +
    +define Package/libmad/description
    +	MAD is a high-quality MPEG audio decoder. It currently supports 
    +	MPEG-1 and the MPEG-2 extension to lower sampling frequencies, 
    +	as well as the de facto MPEG 2.5 format. All three audio layers - 
    +	Layer I, Layer II, and Layer III (i.e. MP3) - are fully implemented.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS+= \
    +	--enable-shared \
    +	--enable-static \
    +	--enable-fpm="$(FPM)" \
    +	--disable-debugging \
    +	--enable-speed \
    +
    +# XXX: configure is parsing and "optimizing" CFLAGS, adding unsupported 
    +# XXX: compiler args to it (like -fforce-mem)
    +# XXX: so pass an empty one to configure
    +CONFIGURE_VARS+= \
    +	CFLAGS="" \
    +
    +# XXX: and pass our own to make
    +MAKE_FLAGS+= \
    +	CFLAGS="$(TARGET_CFLAGS)" \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/mad.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libmad/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libmad))
    diff --git a/libs/libmad/patches/001-mips_removal_h_constraint.patch b/libs/libmad/patches/001-mips_removal_h_constraint.patch
    new file mode 100644
    index 0000000..b65555e
    --- /dev/null
    +++ b/libs/libmad/patches/001-mips_removal_h_constraint.patch
    @@ -0,0 +1,70 @@
    +diff -ur libmad-0.15.1b-orig/fixed.h libmad-0.15.1b/fixed.h
    +--- libmad-0.15.1b-orig/fixed.h	2004-02-17 12:32:03.000000000 +1030
    ++++ libmad-0.15.1b/fixed.h	2009-08-05 10:46:30.000000000 +0930
    +@@ -299,6 +299,23 @@
    + 
    + # elif defined(FPM_MIPS)
    + 
    ++/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
    ++#if defined (__GNUC__) && defined (__GNUC_MINOR__)
    ++#define __GNUC_PREREQ(maj, min) \
    ++	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
    ++#else
    ++#define __GNUC_PREREQ(maj, min)  0
    ++#endif
    ++
    ++#if __GNUC_PREREQ(4,4)
    ++  typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
    ++# define MAD_F_MLX(hi, lo, x, y) \
    ++   do { \
    ++      u64_di_t __ll = (u64_di_t) (x) * (y); \
    ++      hi = __ll >> 32; \
    ++      lo = __ll; \
    ++   } while (0) 
    ++#else
    + /*
    +  * This MIPS version is fast and accurate; the disposition of the least
    +  * significant bit depends on OPT_ACCURACY via mad_f_scale64().
    +@@ -328,6 +345,7 @@
    + 	 : "%r" ((x) >> 12), "r" ((y) >> 16))
    + #  define MAD_F_MLZ(hi, lo)  ((mad_fixed_t) (lo))
    + # endif
    ++#endif /* __GNU_PREREQ(4,4) */
    + 
    + # if defined(OPT_SPEED)
    + #  define mad_f_scale64(hi, lo)  \
    +diff -ur libmad-0.15.1b-orig/mad.h libmad-0.15.1b/mad.h
    +--- libmad-0.15.1b-orig/mad.h	2004-02-17 13:25:44.000000000 +1030
    ++++ libmad-0.15.1b/mad.h	2009-08-05 10:42:40.000000000 +0930
    +@@ -344,6 +344,23 @@
    + 
    + # elif defined(FPM_MIPS)
    + 
    ++/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
    ++#if defined (__GNUC__) && defined (__GNUC_MINOR__)
    ++#define __GNUC_PREREQ(maj, min) \
    ++	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
    ++#else
    ++#define __GNUC_PREREQ(maj, min)  0
    ++#endif
    ++
    ++#if __GNUC_PREREQ(4,4)
    ++  typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
    ++# define MAD_F_MLX(hi, lo, x, y) \
    ++   do { \
    ++      u64_di_t __ll = (u64_di_t) (x) * (y); \
    ++      hi = __ll >> 32; \
    ++      lo = __ll; \
    ++   } while (0) 
    ++#else
    + /*
    +  * This MIPS version is fast and accurate; the disposition of the least
    +  * significant bit depends on OPT_ACCURACY via mad_f_scale64().
    +@@ -373,6 +390,7 @@
    + 	 : "%r" ((x) >> 12), "r" ((y) >> 16))
    + #  define MAD_F_MLZ(hi, lo)  ((mad_fixed_t) (lo))
    + # endif
    ++#endif /* __GNU_PREREQ(4,4) */
    + 
    + # if defined(OPT_SPEED)
    + #  define mad_f_scale64(hi, lo)  \
    diff --git a/libs/libmcrypt/Makefile b/libs/libmcrypt/Makefile
    new file mode 100644
    index 0000000..5ba805e
    --- /dev/null
    +++ b/libs/libmcrypt/Makefile
    @@ -0,0 +1,60 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libmcrypt
    +PKG_VERSION:=2.5.8
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/mcrypt
    +PKG_MD5SUM:=c4f491dd411a09e9de3b8702ea6f73eb
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Package/libmcrypt
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Cryptographic library
    +  URL:=http://mcrypt.sourceforge.net/
    +endef
    +
    +define Package/libmcrypt/description
    +	libmcrypt is a cryptographic library that conveniently brings
    +	together a variety of ciphers for convenient use.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmcrypt.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libmcrypt-config $(1)/usr/bin/
    +	$(SED) 's,-I$$$${prefix}/include,,g' $(1)/usr/bin/libmcrypt-config
    +	$(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/libmcrypt-config
    +endef
    +
    +define Package/libmcrypt/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmcrypt.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libmcrypt))
    diff --git a/libs/libmicrohttpd/Makefile b/libs/libmicrohttpd/Makefile
    new file mode 100644
    index 0000000..85d9c14
    --- /dev/null
    +++ b/libs/libmicrohttpd/Makefile
    @@ -0,0 +1,54 @@
    +# 
    +# Copyright (C) 2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libmicrohttpd
    +PKG_VERSION:=0.4.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@GNU/libmicrohttpd
    +PKG_MD5SUM:=bcd61ebb10286379f55c7db9c79e0465
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libmicrohttpd
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Microhttpd
    +  URL:=http://www.gnu.org/software/libmicrohttpd
    +  DEPENDS:=+libpthread
    +endef
    +
    +define Package/libmicrohttpd/description
    + GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application.
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--disable-curl \
    +	--disable-https \
    +
    +define Build/InstallDev 
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/microhttpd.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmicrohttpd.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libmicrohttpd/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libmicrohttpd))
    +
    diff --git a/libs/libmikmod/Makefile b/libs/libmikmod/Makefile
    new file mode 100644
    index 0000000..4c1c817
    --- /dev/null
    +++ b/libs/libmikmod/Makefile
    @@ -0,0 +1,77 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libmikmod
    +PKG_VERSION:=3.1.12
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://prdownloads.sourceforge.net/mikmod
    +PKG_MD5SUM:=9f3c740298260d5f88981fc0d51f6f16
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libmikmod
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Mikmod sound library
    +  URL:=http://mikmod.raphnet.net/
    +  DEPENDS:=+alsa-lib +libpthread
    +endef
    +
    +define Package/libmikmod/description
    +  Mikmod is a library supporting many formats, including mod, s3m, it, and xm.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--disable-af \
    +		--enable-alsa \
    +		--disable-oss \
    +		--disable-esd \
    +		--disable-sam9407 \
    +		--disable-ultra \
    +		--enable-dl \
    +		--disable-debug \
    +		--enable-threads \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/mikmod.h \
    +		$(1)/usr/include/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libmikmod.{a,la,so*} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(2)/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/libmikmod-config \
    +		$(2)/bin
    +
    +	$(SED) 's,^\(exec_prefix\|prefix\)=.*,\1=\"$(STAGING_DIR)/usr/\",g' \
    +		$(2)/bin/libmikmod-config
    +
    +	$(INSTALL_DIR) $(1)/usr/share/aclocal
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/share/aclocal/* \
    +		$(1)/usr/share/aclocal/
    +endef
    +
    +define Package/libmikmod/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmikmod.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libmikmod))
    diff --git a/libs/libmikmod/patches/001-disable-doc.patch b/libs/libmikmod/patches/001-disable-doc.patch
    new file mode 100644
    index 0000000..723102b
    --- /dev/null
    +++ b/libs/libmikmod/patches/001-disable-doc.patch
    @@ -0,0 +1,21 @@
    +--- libmikmod-3.1.12/Makefile.am	2004-01-21 17:43:53.000000000 +0000
    ++++ libmikmod-3.1.12/Makefile.am.new	2010-07-03 12:12:51.946725127 +0000
    +@@ -1,6 +1,6 @@
    + AUTOMAKE_OPTIONS = foreign
    + SUBDIRS = drivers include libmikmod loaders mmio playercode \
    +-          docs dlapi macintosh posix os2 win32
    ++          dlapi macintosh posix os2 win32
    + 
    + bin_SCRIPTS = libmikmod-config
    + 
    +--- libmikmod-3.1.12/Makefile.in	2004-01-21 17:43:53.000000000 +0000
    ++++ libmikmod-3.1.12/Makefile.in.new	2010-07-03 12:12:39.626725146 +0000
    +@@ -86,7 +86,7 @@
    + VERSION = @VERSION@
    + 
    + AUTOMAKE_OPTIONS = foreign
    +-SUBDIRS = drivers include libmikmod loaders mmio playercode           docs dlapi macintosh posix os2 win32
    ++SUBDIRS = drivers include libmikmod loaders mmio playercode dlapi macintosh posix os2 win32
    + 
    + 
    + bin_SCRIPTS = libmikmod-config
    diff --git a/libs/libmikmod/patches/003-automake-compat.patch b/libs/libmikmod/patches/003-automake-compat.patch
    new file mode 100644
    index 0000000..bf94fca
    --- /dev/null
    +++ b/libs/libmikmod/patches/003-automake-compat.patch
    @@ -0,0 +1,16 @@
    +--- a/libmikmod-config.in
    ++++ b/libmikmod-config.in
    +@@ -1,4 +1,4 @@
    +-#! /bin/sh
    ++#! @SHELL@
    + 
    + prefix=@prefix@
    + exec_prefix=@exec_prefix@
    +--- a/libmikmod/Makefile.in
    ++++ b/libmikmod/Makefile.in
    +@@ -1,3 +1,5 @@
    ++SHELL = @SHELL@
    ++
    + exec_prefix=@exec_prefix@
    + prefix=@prefix@
    + 
    diff --git a/libs/libmms/Makefile b/libs/libmms/Makefile
    new file mode 100644
    index 0000000..62a49d5
    --- /dev/null
    +++ b/libs/libmms/Makefile
    @@ -0,0 +1,62 @@
    +#
    +# Copyright (C) 2010-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libmms
    +PKG_VERSION:=0.6
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/libmms
    +PKG_MD5SUM:=650ad04a4c8bd79246390b81b29680b6
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/libmms
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+glib2
    +  TITLE:=MMS stream protocol library
    +  URL:=http://libmms.sourceforge.net
    +endef
    +
    +define Package/libmms/description
    +	LibMMS is a common library for parsing mms:// and mmsh:// type network streams.
    +	These are commonly used to stream Windows Media Video content over the web.
    +	LibMMS itself is only for receiving MMS stream,
    +	it doesn't handle sending at all.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR); ./autogen.sh );
    +	$(call Build/Configure/Default)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libmms $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmms.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
    +		$(1)/usr/lib/pkgconfig
    +endef
    +
    +define Package/libmms/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmms.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libmms))
    diff --git a/libs/libmodbus/Makefile b/libs/libmodbus/Makefile
    new file mode 100644
    index 0000000..e379ad8
    --- /dev/null
    +++ b/libs/libmodbus/Makefile
    @@ -0,0 +1,50 @@
    +# 
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libmodbus
    +PKG_VERSION:=2.0.3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://github.com/downloads/stephane/libmodbus/
    +PKG_MD5SUM:=0646f3edca6d7783d0356dc2fc4f9f4c
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libmodbus
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  URL:=http://www.libmodbus.org
    +  TITLE:=libmodbus
    +endef
    +
    +define Package/libmodbus/description
    +A Modbus library for Linux, Mac OS X, FreeBSD, QNX and Win32 
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/modbus $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.{so*,la} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/modbus.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libmodbus/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libmodbus))
    diff --git a/libs/libmpcdec/Makefile b/libs/libmpcdec/Makefile
    new file mode 100644
    index 0000000..3514d17
    --- /dev/null
    +++ b/libs/libmpcdec/Makefile
    @@ -0,0 +1,55 @@
    +#
    +# Copyright (C) 2007-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libmpcdec
    +PKG_VERSION:=1.2.6
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://files.musepack.net/source/
    +PKG_MD5SUM:=7f7a060e83b4278acf4b77d7a7b9d2c0
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +PKG_INSTALL=1
    +
    +define Package/libmpcdec
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Musepack decoder library
    +  URL:=http://www.musepack.net
    +endef
    +
    +define Package/libmpcdec/description
    +	Musepack decoder library
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/mpcdec/
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/mpcdec/*.h \
    +		$(1)/usr/include/mpcdec/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/libmpcdec/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libmpcdec.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libmpcdec))
    diff --git a/libs/libmpcdec/patches/001-automake-compat.patch b/libs/libmpcdec/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..4cb4c5a
    --- /dev/null
    +++ b/libs/libmpcdec/patches/001-automake-compat.patch
    @@ -0,0 +1,10 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -4,6 +4,7 @@ AC_CONFIG_AUX_DIR(config)
    + AM_INIT_AUTOMAKE(libmpcdec,1.2.6)
    + AM_CONFIG_HEADER(include/config.h)
    + 
    ++AC_PROG_CXX
    + AM_PROG_LIBTOOL
    + 
    + CFLAGS="$CFLAGS -O3 -fomit-frame-pointer -fPIC"
    diff --git a/libs/libmpcdec/patches/100-fixed_point.patch b/libs/libmpcdec/patches/100-fixed_point.patch
    new file mode 100644
    index 0000000..0f7752f
    --- /dev/null
    +++ b/libs/libmpcdec/patches/100-fixed_point.patch
    @@ -0,0 +1,11 @@
    +--- a/include/mpcdec/math.h
    ++++ b/include/mpcdec/math.h
    +@@ -38,7 +38,7 @@
    + #ifndef _mpcdec_math_h_
    + #define _mpcdec_math_h_
    + 
    +-//#define MPC_FIXED_POINT
    ++#define MPC_FIXED_POINT
    + 
    + #define MPC_FIXED_POINT_SHIFT 16
    + 
    diff --git a/libs/libmpd/Makefile b/libs/libmpd/Makefile
    new file mode 100644
    index 0000000..bdbb620
    --- /dev/null
    +++ b/libs/libmpd/Makefile
    @@ -0,0 +1,53 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libmpd
    +PKG_VERSION:=0.20.0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://download.sarine.nl/Programs/gmpc/$(PKG_VERSION)/
    +PKG_MD5SUM:=2f1c99e12c69f7d95cfd1e27368056ed
    +
    +PKG_FIXUP:=libtool
    +PKG_BUILD_PARALLEL:=1
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Package/libmpd
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+glib2
    +  TITLE:=Libmpd is an a library to easily connect to a mpd server
    +  URL:=http://gmpc.wikia.com/wiki/LIBMPD_RELEASES
    +endef
    +
    +define Package/libmpd/description
    +It's wraps around libmpdclient and provides a higher level api.
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libmpd-1.0 $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmpd.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmpd.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libmpd/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmpd.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libmpd))
    diff --git a/libs/libmpdclient/Makefile b/libs/libmpdclient/Makefile
    new file mode 100644
    index 0000000..2e6ec93
    --- /dev/null
    +++ b/libs/libmpdclient/Makefile
    @@ -0,0 +1,67 @@
    +#
    +# Copyright (C) 2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libmpdclient
    +PKG_VERSION:=2.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=https://sourceforge.net/projects/musicpd/files/libmpdclient/$(PKG_VERSION)/
    +#PKG_SOURCE_URL:=@SF/musicpd/files/libmpdclient/$(PKG_VERSION)
    +PKG_MD5SUM:=8c166c5212dd95d538d3a35bb9ad4634
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libmpdclient
    +    TITLE:=libmpdclient
    +    SECTION:=libs
    +    CATEGORY:=Libraries
    +    URL:=http://mpd.wikia.com/wiki/ClientLib:libmpdclient
    +    DEPENDS:=
    +endef
    +
    +define Package/libmpdclient/description
    +    A stable, documented, asynchronous API library for interfacing MPD in the C, C++ & Objective C languages.
    +endef
    +
    +TARGET_CFLAGS+="-std=gnu99"
    +
    +#TARGET_LDFLAGS+=-lpthread
    +
    +define Build/Configure
    +	$(call Build/Configure/Default)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) \
    +		$(1)/usr/include \
    +		$(1)/usr/lib \
    +		$(1)/usr/lib/pkgconfig
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/* \
    +		$(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/* \
    +		$(1)/usr/include/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/libmpdclient/install
    +	$(INSTALL_DIR) \
    +		$(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libmpdclient.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libmpdclient))
    diff --git a/libs/libnatpmp/Makefile b/libs/libnatpmp/Makefile
    new file mode 100644
    index 0000000..df2ab55
    --- /dev/null
    +++ b/libs/libnatpmp/Makefile
    @@ -0,0 +1,82 @@
    +#
    +# Copyright (C) 2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libnatpmp
    +PKG_VERSION:=20110618
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://miniupnp.free.fr/files
    +PKG_MD5SUM:=6a5fdc8aa6c8602ea96567dabe51d6d3
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libnatpmp/Default
    +  TITLE:=NAT Port Mapping Protocol (NAT-PMP)
    +  URL:=http://miniupnp.free.fr/libnatpmp.html
    +endef
    +
    +define Package/libnatpmp/Default/description
    +  libnatpmp is an attempt to make a portable and fully compliant implementation
    +  of the protocol for the client side. It is based on non blocking sockets and
    +  all calls of the API are asynchronous. It is therefore very easy to integrate
    +  the NAT-PMP code to any event driven code.
    +endef
    +
    +define Package/libnatpmp
    +  $(call Package/libnatpmp/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= library
    +endef
    +
    +define Package/libnatpmp/description
    +  $(call Package/libnatpmp/Default/description)
    +  This package contains the shared library.
    +endef
    +
    +define Package/natpmpc
    +  $(call Package/libnatpmp/Default)
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Firewall
    +  TITLE+= client
    +  DEPENDS:=+libnatpmp
    +endef
    +
    +define Package/natpmpc/description
    +  $(call Package/libnatpmp/Default/description)
    +  This package contains the natpmp client.
    +endef
    +
    +MAKE_FLAGS += \
    +	COPTS="$(TARGET_CFLAGS)" \
    +	PREFIX="$(PKG_INSTALL_DIR)"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/natpmp.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp*.{so*,a} $(1)/usr/lib/
    +endef
    +
    +define Package/libnatpmp/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/natpmpc/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/natpmpc $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,libnatpmp))
    +$(eval $(call BuildPackage,natpmpc))
    diff --git a/libs/libnatpmp/patches/001-cross_compile.patch b/libs/libnatpmp/patches/001-cross_compile.patch
    new file mode 100644
    index 0000000..0869f2d
    --- /dev/null
    +++ b/libs/libnatpmp/patches/001-cross_compile.patch
    @@ -0,0 +1,20 @@
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -4,14 +4,15 @@
    + # (c) 2007-2011 Thomas Bernard
    + # http://miniupnp.free.fr/libnatpmp.html
    + 
    +-OS = $(shell uname -s)
    ++OS = Linux
    + CC = gcc
    + INSTALL = install
    + 
    + # APIVERSION is used in soname
    + APIVERSION = 1
    + LDFLAGS = -Wl,--no-undefined
    +-CFLAGS = -O -fPIC -Wall -DENABLE_STRNATPMPERR
    ++COPTS = -O
    ++CFLAGS = $(COPTS) -fPIC -Wall -DENABLE_STRNATPMPERR
    + 
    + LIBOBJS = natpmp.o getgateway.o
    + 
    diff --git a/libs/libnet-1.0.x/Makefile b/libs/libnet-1.0.x/Makefile
    new file mode 100644
    index 0000000..e7db9ba
    --- /dev/null
    +++ b/libs/libnet-1.0.x/Makefile
    @@ -0,0 +1,74 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libnet0
    +PKG_VERSION:=1.0.2a
    +PKG_RELEASE:=8
    +
    +PKG_SOURCE:=libnet-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.packetfactory.net/libnet/dist/deprecated/
    +PKG_MD5SUM:=ddf53f0f484184390e8c2a1bd0853667
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/Libnet-$(PKG_VERSION)
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libnet0
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libpcap
    +  TITLE:=Low-level packet creation library (v1.0.x)
    +  URL:=http://www.packetfactory.net/libnet/
    +endef
    +
    +ENDIANESS:=lil
    +ifeq ($(CONFIG_BIG_ENDIAN),y)
    +  ENDIANESS:=big
    +endif
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--with-pf_packet=yes
    +
    +CONFIGURE_VARS += \
    +	ac_cv_libnet_endianess=$(ENDIANESS) \
    +	ac_libnet_have_pf_packet=yes \
    +	LL_INT_TYPE=sockpacket
    +
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR); touch \
    +		configure.in \
    +		include.m4 \
    +		aclocal.m4 \
    +		Makefile.in \
    +		configure \
    +	);
    +	$(call Build/Configure/Default)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/lib/libnet-1.0.x/bin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libnet-config $(1)/usr/lib/libnet-1.0.x/bin/
    +	$(INSTALL_DIR) $(1)/usr/lib/libnet-1.0.x/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libnet* $(1)/usr/lib/libnet-1.0.x/include/
    +	$(INSTALL_DIR) $(1)/usr/lib/libnet-1.0.x/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,so*} $(1)/usr/lib/libnet-1.0.x/lib/
    +endef
    +
    +define Package/libnet0/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libnet0))
    diff --git a/libs/libnet-1.0.x/patches/100-debian_subset.patch.gz b/libs/libnet-1.0.x/patches/100-debian_subset.patch.gz
    new file mode 100644
    index 0000000000000000000000000000000000000000..0c1d676ca4b443b9be68ba77cd310f115ec80a91
    GIT binary patch
    literal 208420
    zcmV(vKzB?ue-h07nzP8EpP9IA%d#F|
    z-#UEp?7%uWgn#VduyJqz|7r*Fk5vy24-U4g)#`oCY#kjOJhcv%sSYI+Ts4;0c*9kt3l|_SDw$xyJ@tvli2lwxMIq!xzS<~h1=Eb>gf9AX>T}U
    zO$KyKa3Z4n(|FjnPkW;=;EH)~g3umyhP|sX@{4}BQ8)>vh`#mXB#6S=tigWl4oAH~
    zf4jPs_#U%-wv*Ird-bn9kQ(|D%}U>t>O1T^R{oBC&&sWB?~y|#bh^)!QtgKaPEh_G
    z<0nOZ<}f~?QEXq22bb+1y7u5|48}ndPomflrXdR>%k!6h==q@=_z4;t2dZiJACotIkQmKA!C=pJD;7_*vOrMi5E`DzFPpO6@-&0^gpZ;9Qf}!^SytZq{Y|F
    zD)#LlT&_~+6-RVK=VtCh$KdaDwOA(1^KVwuX%J2sw#A&#W3bF_qQqx@97i#M}%`Pwokh+ug^i>WekS-
    zz_o9p?i>Ir`yYJQ7HGm406=p$WH537U|#n6_SFy?{YhZJuOOzrZT0${EJ`>ifxhUy
    z%%Wk23DjjfCsYH-yujM;j)W8W;y}Zi>Rca2knIZ5Z
    z*C2R8-MP3v?J5G%8-r-3h^$weh;+%C`Hlx()?_<-1lwd4x;R5JjH5>|CTYBKQ<$h3
    z&dWz|E*v+GGF?#msXAvD?eme@2m!G9t1E@$7y$s>;N?HNo$*L(eubz246JJ?@);TQDmW);l6LQOdal-Yz@c^gqqyb1LbP%RBZriMZsU8~DT+S+Qx
    z3uaA7+s8!Jij{}f&>D7!_I}yRE!U$yo>2UQB&#%-8zfA)9!`o#O)BitC?pj~O)aq6
    z!e9^O8u_q{##k)x@(7~Bo;`hfADNB?9wgOKMMZ52pTYAGsg5)rB-NphCN&*@MNgf=
    zo&tlI1;u!(@OXwI6da2Uq$k)^zk(#@fb1(ndU*sSC
    zMgGgb$lv~p{DUv#hk3ej;ubRSh-%{u#&wPVxpUtM(eVZo?lLX@t0k7A(kgsR7koyES-M$sgF?|{9}qE+b8VS1nSLYIs-o&`z9>`yj)NOaRs<<2`#wl#
    z3^4c|tx~p#ykHWzBsPQvCrR>fs^*m(sa+b??;z406D_*riZ
    z@!E);4Th|Z0*3X4)TJJ_M%}TE3A7g0MEaqr^A1&=97V9M0qV!A
    z_V`tXc=>J$aDAG=ZE%rmy_`P15xl|oh)7p6gs2OJ%$yFo<1B0&
    z7DSVEPEoaHsa*c^=g})$#B|l#r}8c$>`@oY(H;+ml@cx+*W0cNH;&yAMamIV0A?pM
    za_>SL38QG(TCi`Ak29oK!@>EmeOW-AA>&EmLMpkZyy~`3yF(($Y%|b#82kj2ScDW4
    z)K*YCbQV64^#{YtHlE;Q=Nj8p*obm~!DyU?2)66~8e<-WtT~uC-NEr^4iPTclK^1N
    zS(KzE9P2oaPCWH92o7oSe68IXTwX#z-eg0t#$^|}OXIAZvga?8igEHcZzsS3ZWUl)
    zJOjmxA$V#%hVLCm*=IO!-!Wxv2ms}jUro}r!
    z0`e1BnX4N$&D))eK?jEC@|XtS)WdP-k?YKBi(|eTMBQE-lbH(W#o_{vf_|%RVUD}H
    zZg!Ga(2kCSAfC5RyI0-*X}90$;R%wrqWe(cf;qXZGW51g(MzMHPP$SibR8Fbp{UHG
    zDN1Ep+c})ZMg}JDk~MjwP{lc&*bC<)>{tLD
    z4X%eB)KRQFqdx3*uEB}^*tN&);dz(j9>a%oVGGG!u
    zQ{^iHH;o*lL}9MHfFmc!p`vm`l@!Ajo!Q>oel&`@)Qk(vY#kXaBCU4q}V&)OHGE)nReLXL;m1`cb4f)&c4V@$kPMQtcmLa6`Uj{OS5pAfH9&Pb2*R8`6hX<$!D*L6L(D|@Sic$dqKXqZ<5rj%D4COk8adfSvqdXB>w#>SL*5PC;2Qr9MFxkpN
    zOp-AGilk)_z;JP@>@A82q#TLdruCQ=!Pm&;9nu=TK&&yyWw8$Bq=T3Llz1$1poEC(
    zcrdsS5G-<_F&4UpD1FUAIOEnMgS4+ZIXpm+geD7KX+hEEn!qS_2Kje*4lCL3IO-6QqA`5^#t?
    z0tgBhnWAwVLo9Gm*Cu_}+R2sDne6wVP03kbkDP5><6;Z^IR
    zb#PqUO>OS9WLbfA>t~yp{F95F*OZUDGZOO2aKVcFyqAHNE
    zO?hyTu)Qdi1O`YD{l1D)#ZQ$M1)AcxFWwl4Go5*s6PI!Gz)2LCR~6D-t~3fN3K1DB
    zk*2@(LobRoiq`?HQwl9n1Yq_dMfMp5oivRTCLKJLuDT{sLQ`3m;7F54idJiBRP}Q*
    zp{MZz15uMm!Ks)@EpWK30ZQdZ@JOQNS&qUKjJb7J2!dy$18$;SkbOcJeXDua;8
    z9EhZX8g#R+(PH3rO`{@{Ei!oY1jqnB^DSD@OSDbT3?F=Cc<&QKxmY5k4Tmjq-?OM31)BoC8ko#|2Sb@L`NvbTqp6_
    zP9fV46Db-z80?kH0Nkr60As#8i`WjMJ3OHho*&A)a(LhvV##sYIWagN$3hHSfc8HG
    zDLXI)5ajSgg8amBdD)9XpO;MS45QuCoHVCUwTP29_W(bPIRp}&-r#!FFo3euC>q-!
    zTuX9f(lI!MVyOOMjLTkz$QT{bdzEgfWyKkzv57<(cU`Koj8c|cwO9}C{t<>TC~U4qikA@l4=|D!qrU&R^9lTbXwcRi?n!Ipe_{@
    zXJqn}kbF9@SPEyX=%U@ern
    z+mq}vEOA3+6O|S457f>M`t-H#*URO}PRU&R1rkbJLaESzC_xFJ&Np;_(fQ)c*NHh}
    zTr&fyE;1@#G$3DMHeob=fBmp=INbv#kR4t?fI9z3`6_&cl}6DV`)kR|@_B?*#rSx_
    zY5+@^jh{%Ta$g0q1jMv4Wk#Jv!?;ETHGMaY;*UECnZgqDLE3}SC4rjyr;e;M_vA5ZMZJ&hX
    zp(qCbcHhqecgC-dU1ybW?NoDkO?>0C*w-%?-s5UT+h`k9PDrbx3XAZ$#QPxe_u0}(
    z5)$V530T`xUFLVmqT3jxp+WI>q=qhiE!kh8b%K4Hgi#C*wTxi~`RWtqEGErz`AE*a
    z)J}XqY=#jB@E}>N4A>$0vPkMW9Ie;IYLE*~X1~Q^6IWkFD~_)ouoR9@xh&2BM9H~I
    zd6!pG7`$kym2#d>ssGVWv_s;XndnJLwga;}>vQfWSG3v>@8aGh^x>NlkKSNIytI{t
    zE7)&CqzZgsW1-*+nt(AVVZZm95ErR1bnhM1CQdM??wl|aR}`EYMv{ggGlfysPMh@1
    zmm(N&X(^g3bw7T^@n80g|
    zf?eg@HLr5usA7hzYtx&VfgzP*|F*gF@U(wmGB-}L^AV*gQjiAqwaKU_fuM#jRx5q>
    z8qRADV*V@F>;L|hiLI|M8@xBn&h^iCp6m9lq2iD2I;v1H0}l6pfKu+7R@>FyDMs)7
    zMvJaSjT_U8-sp;MPJx?W&{s^gHKD;?z$4C#5dHkV@|$n5k3nJg@=<#rCp2GLem7Wl#5Y)3nri(S$X3RP(zN7orb&~l0o8Om(IE9X|w!zcO3;Bs!EOmNmaCc`+12Qf-ziEO~
    zF58uI87*GV@ZYmr+_zNzZ>$xiB%S(cV%iWjk1E{4asd@@&YUyE?g=s+D`A^*Sxuu8
    z)d4Z{MM3>Q2i#y5U?`#w)^f~w11OaJr3c^Hr^YUK5gqO$I^0FL{|!Fk|0ks}BRd;s
    zq>xPcsg9gho&2=Q0y+iLDnGAqe>kVnS7Re`i=KR8m&wK9zzJdW7&n*TR+uTZVg-Od
    zH`L%BE1ROAnW*y<(lUhjgBMKBYZ%Y;rMKz`#B!PKN65-{zJ8Za1DoP?*qlpn
    zQg2|AbBHG(DqC7p=~C6r%u)^FVh!n+g!}bheyjg$uUy{W*Ev1&7>)b&S53_;qj?jz
    zo`rxmOLb0RTF*=(%bAs>%0vSwW@jhAcN^A0TX^-1J=VOOm+@j`OW6ltM*R)5WkkSq
    zS~6=nTo;hjKA$O|6m+1=QjF5|VFBw=5&is6Ek_|oQs8+F8!2w1fI8b+Hq-oX3G!fE
    zN*N6$pP?joP7jjhO`kt&>G9lj>N0jHX1pYAmTI*+U$RnzQie85caN3^vDw-~17SV*
    z{`A?iXPNh>PBni20bij0dV)W4=2E{}=Q}<=W)}WHK4FJ>0gqwNJ$rp57dA><#(VYk
    zpQ8w2TpkL;*-gz@LqeL{6_%{&AHlLA4NO}Yy&Z+)^emb%%e3Gf!^gDXD&?En3PWye
    z`ul>Hx0^Oj(eMqh9zD8cqGr~MqQ-9iIC`)(p!@mJjp0lA7=N@;(AdupHifTO%%-sZ
    z1!hFH$JjA9ewO^Xvl0XZ0H+q>-*bq3_;OD})CT|2|G#&(h#Mr4FkFRD5EmP$6?td8
    z!ASXK663#2lULdN|L2E+2%mmf2p(g)a`4x4KHje2FZZM<`e`5j!jP_V<`cY0rc^Ke
    zC~v_Nmrh7mEGP=}5SL37d*UTKH_f)lBg>Sqe4wtMuk49#tA`Bhrdox>>HQ?*|Seph&cRY
    z0?OZh`K|Hmul0X5e!eRw1O&1@U+kIX@}J{Ne9&&y)5Y>r-C0AHVsZd87n~8SzV4o3G--zuxs18zL8#P`9AnWSTESuOCJazoBy7616EpvnK$7$Pm0;|N
    z&7NFqO?0hvDck1nfjyn1&4gQZL$jw37QSZ|oehCfK$54+Y+#HF(*)JVFJ+}_(8swy
    zY~7Gk{xI;{_axNVhvvG_a;S41YR*0ugp!&yqdG&ry`mLkiYP9BzS)TDwfbiLdSkG0
    zxA9P-$3Ou2SC%&yUH@w0mtJI^DJ98XW){=#UD%~t;H|rt@P7atzg&J=d7h=+lar&9
    zbymoUZqOMCzcUJk26NX7V#7f|En)Xg(^m$u12!u1N22s*7eu=K^oKZM4WwldO^2y6nKBoKH~`%b|GKCuU`-(#b6zbBupCmo2%a-GWQ*#xmy
    z+h1CayX)CryiOT5MVn)iMM{`VL(Jq&G+(+CfliunT6#BDH|S_x8UDYv2eT>Q`ZJqS
    z=;dNcxen2mjorG)^ffkc>`6v5$B8Tt_XeY!*zICf4Nxvrwkx%1mXx*YbhKo*m~dl6
    zJJn2IM6E7L2iKTX$9;}%ZhEnVbg7mV^>g?h2$pp_%G)E+Ka^HBsW3j+G&KvCI)IyF
    z#zcmCVQbx(SK3d^Eroe%MD}#Z06dI6>q5tM9bp4w9pB7-NA^`oYbC4IUwFJETPrI-
    z_zD%!0JBY}wW&{*h+|+ZO-2E
    zXleyHH|t4TFEeY1zfPZpV}L5`IcG$*!ZKx8jM?*?A9JE&iWxTv1I=^__DX6kttYCN
    zL?N7;DeCE`aNUiOAfGCuS&WvjF5H+2ycavsdLnp&damjwwy^U|ZgWFlj5V}fOf{1g
    z=fE!4!zgA65}}$*qTYJibna`{hIn5mk_krgS{ns?9%n6Ks%@MEdtKALlZ%=#Q(PCB
    zHj7DPMg*Th6-0(vHdY<9JL|#;Iw7B`*&M(@H;5CjWA)Y?1=wzut$Q+T1@9R5;d*Xt
    z3vwDeetUHI8(xm4Erj{nU*52yq{dwlmUEdUtSdC(oiuTiXIOpCkx@a)w7}6&3Zq~a
    zTFI^VA}MHv)(Q)yMHO0&XD}nNf%7+dj*V(!^CvlA6;&fc(pMS~rV2z0m>|$8-HC);
    zM=fL<6kyYoG!EF5A$ig}oPYx$$r{MU9b^&~MQ|z;JK!o-62!vh-|VWAaZByX+>J_=
    z^J$E|^)k06RZnlv?EQ|LRq+0VeJN-w@|8WVasoGv2E*Q{%IIXay-I=bcaL6wkE9W(
    zQ4gRu5>hPAR%=gRR#$7!Rx9ZA@aFIxoA|(q-H$M!FA6HOv9*^3xl|k}ZvznA;`?|M
    zU`mi4@C9XL9vb)YuL3v%n7MdVA;#be1KzcQpiMFMYKKR=A21rh`s73mR!FU6f&}v_
    zFAak!ff*E*yyX@6Pb|M&UtL~beK}JW1{cJvNf@3|zLDpYf}!2-a{dJa>M`jTpgO~l
    z2^jFab1pb6xPr4XU}-D(VR
    zdmpiAFpS#c7NUvMO$leQzVHpRvnUqu|JmmT3xD&}Adt+NQQi5rc>xG@*z;n347_+p
    z$WSP+8o(00Z5}l;UNm3*cDmbayx%(3FL(Bj_nJGqzsevYuw$J{ueTbf%?~f0HA#!F
    z-@e^~lf7}Yzjd-_+M$OC3SqiW8%NuJ+1lATX*RZ+`@4sUDp(vh#L8+FHpI$PPTiu)
    zG@%o}9-UzSQ$qpvfwpM?q{2r0IJ$o?b-9T}0IdW#j5Q@bQFBZ)UWM!hnvtT&vC!aw%n3=>w-Dp2q
    z`aZ79%nI&{PT7`f
    zdxu9S_;fkZF`m{s|4H||u5%A?Pp~W4jr|qe-$;!>_{Hr!kET5KRCdGu_|BTltXFyo
    ztVaE~S4RVpIPqLp%IsJ
    zaDoF>XP}{PDL30>&
    zO_!1Fd|>wOj2d0@WEyQgoP$4zuRu53I}w*zIYya{}S9KvUA4L@Y?+bI`XH_^wS
    zU8roBSEOw%?|#@r;=Z^4?qpZJeLzx)UwT0=hW`9H_N!v4D&p|(LDVV7ex+gt+Zx=L
    zVe~clp8~g31&>b^!TyC&Yt)5a!g%(Mw%_c%-aFjc{ZJKuhDsISHJ2(}_B(W(dga&R
    zZnxR-dtvt;rgclr=Z5n>M5C_&!_=t$%O`Fzh3il*xdt1_iRulli4x`BP|s9vSnCa~
    zCfz4A6DYS>^5)DQ?v3kc;RZTc&n+LlGuYj?CyLVj0
    zJ0V2B3ii^>CXLkU?<~u4-p2*eQ5Ug0M7t3ScaL{Z4l3s5XDd1*(~vQ6Kc!f_+uK2-
    z&?O?ab`jMUO#Bsy5BE-6xd@<3JeaQvQa>uF?UGwxSO^52y!Y>GLfnER2<#Uc0+GgZ
    zByOYO$G`tTWY2ElK8OiNiE1+hy^D#2rMsi(R$jRtn<;RzkeBqJ=XRhOTM
    z#TP5pm1TXjtDCK&-)gE%FaD>XsgHNSBVIDT-ZFEr1xHxpP4i^80hm=LAS!q{SE$u$
    z!jI!|4-J|6kt8iaca|o}Cz{&xtoAsBUzu1v`;^G;62PdK?q&u9+$7FxV*C6*2-aC^Vj?>W<_0?LCPTXb*nWA-*7w^#1o@TNixUtmsQwb
    zE6-M{FKB-~kucsJmf?#;G!`XT2&(e1&g4wev%SMN<(?1HAn-T1z5PCjb+Sz;x4i|W
    zn!j%CmofI=Cp9WvvT6o!<}&Q+me;WALZw4Y^VB2?tghgAR+pbwpF5&}T1vB=<_6g;
    zqiljg&dX+5ST?I0khT2t}Jd>vH#t21^`?eCGZ!?T9*4Ou$~
    z$hYV1ATZySxr6m376^%`nI3V6a!tuQBc%Qwpo6lmR#!<%K}8{I
    z`NE`zWV~?`;9Xg37!F2A)ye4rRvm38)}CQ!(fFh(gIVLto!|=2SW!F)KCO%8r4`hJ
    zW59XI-JB(=T)?8^vyDbUcevUp`B%2XE!M@=&kOpe;*@M5sil;y6x*3(_qNN#!kp#JU(UF5)HKR
    z?p5QoEGwDb9}f{LfnLDUVNMymyz=`oQ6yGUWlWAZLnf9PS!WL2Ig*oje6kDkSYD|u
    zuX4MIiQPTidbPjXY`on%+1Arc;B
    zP$30}gfcW$lAA!WTNNcsoK2L-Kh-J`63xH<3
    z3p@q|%S%2&t;S?n@AnQ@R{$a%OtSKA*oSBBZr1^6o)T0V#n#CiNgm7cNbrEU`$&@Z
    znGhZ(XvE5%{T4RDrzmV=7%*ZL%01%Lu7-jCQ4IVc2wXvz?V#fd9tFHecSYF|39E_q
    z$#ws(AK~p$#%mk^pGJ+S7l=+5Z9?$0l+hf4bsPBCB=1RX3w`VW8HUIup=U9CLj=5z
    zqPE3WD3kG;!a3q25XTmPYY2zo-7`ipVC>QP8Tn=oF9}Q-Dn5}#A7h3wykM50lh5Wa
    zF!rNpHY5DoY>I+*3oDdtH3gpRz!pjz-ok7IzcqK2=7UF2v9Xpqd08LF!}?X&uagwv
    zK#Q*a3IH!@2t;pISG=omw4gPJ`#Zo;eBR&jy6p$yt*#W*iw&tAUI0AGE8fp4|7>ki
    z3(wY4HF$ri9Vg8XwR%PELSBNn6|L4*K0Q^daMTx#?IUpno1%d{{7^it;yMs6cvnHU
    zg9w0Lt-zOeJ$a)Eymr|4(VLZ)se$|^=T?EP@)zo5;u!;^H~Ms;{a!u;b`7Z^q1v`V
    zHta^s)nHq9N2tSTwVL#}iBF~Oia4RILpYhCD{_9+qiypW(P4k@5Zb$_;(r+cacAVb
    z=|>lp1niUD#_7???uA1(?+V3?>bxUKXK!QRJWC8LE|F4ET(??crS_r*a&d6oia{1!
    z!d=%7ZiC?loQS+Qxcg{g7>=H5YcUEg9exbOJ40k?-CqN7!c`+#VYN%M
    zp*sGp3ZREb5UQf%!_k;ga;t$da{hbZe|Fv-0R4w8h)Lv4Nygk^&_XVn`$!ih)Ilk<
    z#6*c;GJQBd##dse+dTkAUlJR{GQ1FCNaW-Ls6PzbaG0Xp3F3d$MFSWG40Z&vCM4%E
    zT=J<%<8jzAq!5JAZd;XC9q5evEz}TbbjHQR(*xxY3!80JRU7^cMc!ebZi|~ue|g
    z=GTkc+mdKnm{bSU21M#d>cJO-SQWJ&VCEA`sf_gt9<*A(MZgmXmKLzBic8u>+sR>|
    za01pQR?tk{9#-bZxdbbNWLedci+vN_>drt{Vw*&@(I4bC9JOxDv?i8S(Ek}VHmOmY
    z3fb@QRYg&v%xy1EhV<yO!{tw~m@+b^KFQW)GWDXFs3!RoY}|ZHd1%5IF23VTFiR
    z6Yh)mVINWKm*r=IWpIjKEY5CuYf0d)P<8cHvEF&-rsC*7vzPO3G9SjXkPcnO>|%U
    z!M--tS1!yIVgGf+O0i-hRvK=I`gOLva&b{xsEC{a0O`=I3X5#&TV4h1uw6qfJbw5%
    zOR_%~QaBKbCC&kj({bmFSRXnv1Yenp*KR5(7a>1E1g5Mm3g8-?wrIQR|7GGk&j}h%VKB{I}!;QFy
    zOocKv2jbWXZt0|x)R%5D&H%_gjyd4|zw5#Ye^(RYJpySFI|0HOvnBwzFH8LV!w+Jk
    za={(hz5z+Gg}$+^E>iM#fLhxt6ewYwJPI{St*A{bJp9D3o29d}SKB+gZ%$zGE=mmV
    zB)AUl1~^+iAE>mfDhDQ&uzm{-i38=H3+xW{f15!M{LyCVynJ@n-17d%_x^ryp}#J9
    zFE1_@&MUI5Q=K*(7uvsyC_e
    z8GsH(!-`mXs6vlbt)fH^r?T~(;S^xzZ5Zc&K3^d)a^O2`f64gn>1!(6UBjGknBRu(=q@*vUtL;c&EoV%Qw3+7{G%v)4F%Z`HjSi~&AyF?*v}X*KYw3IL767rsFw95q0=Lj9;8k0P4=^y(V=
    z!r__BtS&mXy+r{G$53Do2&TORNwO8#w8H+aI=*R3F$SJo>y}DFiumAh;d|
    z15qjilrMC<{p$5j1r=WLOO*}i1{u3O@z8qTlh*rQhV?!hME;Ad_h(jb&x=D;QNT{L8EAQk
    zNlCmUtgoW9_n$-sw?HbJ&BU;+xxRvGPC+q
    ziu})IRKiU(r54jLB3PNXHdATXqOxB9!&Btn(o=+}CayCR9%VFY;h%CI#gJK_KoC_|
    zCE0v*0e!*^Mx}A4WZ9(u8#t%Tjsr6}dpQ0ZU*YVL*l{^qj+L`ODay@e<8%iNA=u}T
    ze;_X>nE~eO=_UbPh}q~N^_u6@dfq~2-<;ry`7xd+i{xgF&VD_AFhH7r6^w3!pl=Jq
    zu_X=1HFD!2`05ZP&mVrm9l=T)QeMLDNx_I5U65Y{&a@lB3bZBi#b;+17XrBW&+G?7
    z{Vjgp-u7Cp2XqW@O-zKkC`ehJBvSn7n1KaLpt1$48p~9*Y2s92%AT;6{XBQw0sfLB
    z?g5jvp*GXJIEn^;7i+au@v5-{40sUtOCxy$b`!$1iw3Z-z`8pAAU_E2PSom&`ANEf
    zRHctd9X)lpT$l-cqgQu
    zrf-Yp$Uz7mWkBQCi8{r8M5cnk-ZatTf(xZNIUJ9}E~z2#>IDGbI#M0sfy_GQSWB+^
    zSJcBwbjunTzL6}D3NzO7`*_(yLF(;8p2A})^!qdP{q;_BdmE$Ig$ZUV9}aLBd0-5~
    zr6Ennoy#QJUFz!trxO^)aU#Q-?hB8KM`Yj?(YP5&%R1%BL(_3-?R@LU>uD%0f0P#8
    ze){uM*KWi0iXp68P!i=1M>$87wJ?)U6NM7`fw|C`zkt
    zb7(RY#4mctZdYQ@Zh`#Sol@4UoJS4!6HmtBl#FEy?SwWSl7$b%$
    zQ!h1(Qp(2*M>y2_$p4UX)!7j-dTqd9$y)&sRGLT7Pme4fe_?7WuekCo^KyKuaDsYF*KansIcwBxP_{4
    zoF%IWS-`S^3#QZv`(ui51QQr`Mo2F+TX1H`Ze@!^q_9uddF`k*?x9%{=7Fo?@hszv
    zQDkE@Ji|)sZY!7NB3}@kk4hDXmXHzl2Y75Z_**y_1OS{X(JB9fhRU=a7ms&YKAxap
    zhWUF4K|}#ppx{hX@$>Q`KK`ZfpfvrDn;CM~0sK$}XzN-tZ3(PT7K;m#-IoI6l6AWP
    zy?=Y`z55_O#y7NX$48C54?Gf?aggKzPRU}zMx#o8)RyjH(D&^fIyNYw$|yno`JJTt
    zHqn>0HZk`VN1o#c8^WCvI@bx!)g0L1ap=qrqltU}I{SE;msC!0A@VE4LE)D{6vyEe
    zx&S!dhJl<0yq#~Mo1MI7A+8OrDthFFSHiV;y7V`>&?SDbl6KKG*%cryX>*~;)$EdGwG_!Jl+8QivC}4lu@%^wi&i{6v&YGOGQ-|hz0^H`*41!S
    z^}>|?T`C}{Q5s-*12tRLp&+>H8hp!I6v){hujwLpo@+Fs
    zDlE(}rjxT9MQmead@~82bWfG>VsKa2SOnX9jWY9R{3GTbV2Vh54m-&7!$Ww0uZqbt
    zTL>$vJG~X;Z!m6MnJt6puJZt*Um|ryXN9yL8XZ8zMrDIqy7mm{CGt^BgP9r4#J8fF
    z>J7}NYQ5lYEs@+>YE{%y6lRZ6GFym}Sz^?%M)Ui}sL@5fLmV3G+@X2J4F`j
    z6t|IWmS@gYFhWZ*ELjDn-P$x=yp{pB?^6&PlC80j4`6TjZAhr0{A+PgIvDdA%HG>j
    zZ6|b(i2p_zgSm`h*!oy=aJZz3mZaLKYwvO5y^(XVwzzth+~IS2L^k`*e1fWz8~~Yx
    zu)-GJR!L2&!~`Q#`PbwUp=~g@_R-1So4rGj_3h^Jg$FriW`i>8sxl5d)$;^^ta{9O
    z+Ha<^raa?Hm8Gth*+z!%NU~O|BmNYh_e<8z=p#?;x$kgb&wUF5&tcdN^tzGbAxQup
    zuN%!QUfpJQGIR0FR69I<##G4OPu+m_bmbmDkLt^;6Z=iHVb0wSIha0|iN|wXso?Hl
    zQ(9N%)6W?*4mmmE!Ys@AZ?KC0K8yDiGfP((^C+xesmRD8?x7RzP|9K?t;`LE!KY11
    zaxiBLS4J{QOHJ8gRq}x)nlYz1XEBPoQcJFk#A$=fwULxo%xw`3q<}RGI%^QydZ;S|
    zC_v{oNlst2Dc{xYWgTgH51TeQ*beoBi#(QM?@m@IU
    z4KOK8_nvr~zmDnl7*23rW$ai@k7bh;6xQXIx|-rA_^o<$p}A*IWAy2h8@#
    zQKR8)9~~U;?e87Fsmyef@ikW+iJ?igv)XkSy(yOFeR7v;F+$M6epXz&a4vPUV@-ya
    z5eF2ZYlL=p-2d2*Zu^@{8~nQ;HODd9=WZ^mC+O@cpRLGxoJNkW6EukF7OH3S`Cj~1
    z5NLYZ4mxp7#^ecgpmykf^Q|2(S~^GlWUK?SqkU_mf|Jwz9eI^SXdx|BV3v0F`SIMG
    zTSnQq2nMjTZ&%L-;Fi$x|7q8DRFs8KiYs`BOzueN`H8nM1E3e^k5W_d$2pLFq8V!nXnycj#;B|saw2s>
    zYaaAeT2LmyaSK{-oF1u8P6n1L>VUJl=7P%ym@1k8m|t_rt|Zq#{mXn$;m8zoNxFkz
    zLo1L4(7wu4rFWfvG;EhE;xidAhns6FX!xw`rA4`dHc)^>Z108n#)0&302Oi@xA6E&
    za&+uyj<96T$xY#qiw)MPvDsd?Bb`@2TcTIF-Hq>i{JL78z7{IVbuaYF}6-j4x>KD
    z@o?;C+}J|af#|$wA`(r0OKTLiOd)lq^ToXmUX*-<`bM;G(PjpY^AWK6L8KkT9Z&@{
    zeMG~NX4EgF-z&JO=dp~G!ml>uZl36hmuz_-THX(@hW_w=a?1+30;BmESi$Y`S$u;b
    zjr_I=UxA-9w=q?yaN$H_U^svQ<+FCTjraN4(DLDBbQ+^na6@xviN10%dX))QVwfzD
    z>LEECCqd)^$?RFT-7V<43Hb3Ro`Q@P9@ho}D%gX}oN4$&6fx0IMpImF!ct+QUQoH^vuWUxoB*zL))iomjFR<`=}6RZy5?0L4|PJ@86p8wXKeG}#$ley#H
    zN9H_`YiDg{hmI&b-*Mi$8#rw&E+nnw3r-nk#ipBSibf-pWDTb1OFyb)aX}e%WXz(>
    z;*uXq(e0e})K6&!(Hoo1i;D^&sYtA4XTG@sz5>nh<-IZ6tb9#|WnvjQo}gB_gAJP;`?K8eYOv
    zOdE>&Qjiqe(HLV{lCrZcb>ny|{2>n7nH7C3P&2Ax(d;yC`2#FXH^sUS7>lw5N1==vifH}#k%^dI=79U
    zO@1F^euJE}Ss*eYBW%3k*e*Jv#yZ85Mr)jAgqq|{oz58uDhI7@VxnPKBpnVEqq;Lb
    zb2yCHisyA%^GkpOts7i=)L_d^qWo{lm^gJX5(mX!w>d&S>7_Y_W2pwMm(U6n{(_*p
    z>7(}*g^tvt5wC
    zQcgaM5Tis;9~?YRa|Am|Pq&Q6N;ZF6CunFUwoW$vq5HfkL$uLb{sAY!*eN7mH#U6-
    zC`R)_hHZPZ)v}+=L11fNMu!&CO=DCdINH690O&QeDF2(_YsT6<3OEvSFq5;!e`sThgj#pSf
    z|Jsaf%e%V*iN!JyXOT95b;AL*2tPPf#b)s{$crh#)-hJ@n@wouCQF@!JkV9#RtlNSUVs3|u!J`f
    z=dvUJC}x!{*h2Y?Kpz27sUlNTT_`3W{UZgxVD|SGhM5EED??-(p^w~s*g#--O{V@7
    zQw`0|$GzS?27*K0
    zj2C((+x*t7B17Gzr?x@wK?D7d%*~KbV?@HvzShL{T?N<5Ow5O(Y$+xoHW?zTZF9Pn
    z5Yf3NiJLlBIwpE44?t=Iz8AxzV`Cot7S2ZoGNI%g7!&_^Z@b=)`X2nn{s8%jLF(f}
    zdJ{`sMWdSwWTpXBvxnh|IR51)zgwsZ{ZLk^*e8m5Ne4=@BqPN8fbBp7^6W5CegOKI
    z86=A}X|ou{u+`J}1~4b%`E56=Fw0))7skap<7JBNEhe8N)PYt6Rr|C^b+CkyYfD)#
    zWk*XMe<>+JJ&UXYZ=u57;b&gF3UD`$2)jZwLxp`a!W&@@Ed}cXtI!9I10y=Ryg2Pv
    zRQFmIkmeXgXjehY$2|hG-tG#ioU^qr1Oj)Epk&p6l?E0(*%oEw4YoN|9jfsw$`U2I
    z`h=`8fHGcqbSF=iQCvDymj?_EX8VdFpVw4&AM6_?Rj1e#I(iL_OAeOO7S!w!hB40$
    z(Xm);8xI5~+V;>23Jht*rDLc9g43xu!X}PVfzl0TuCybM=*Ob?If*n6UUxec
    z${*I?+K*xz3107gIM`j+G5K`}(PuA~R+h96B_}^(BsMdg7?j^`E90R{uSWn%G>HfS
    znYaO`CW;vxM`5}r*9vI~UbWZkqXM(GRLYr@0pUJ3CA?t}Q@FO(72yHSVx}d0Hj0LU
    z=dYELlR>vuz|>;Uz^CfVGdFx7{D|Vts{Feq|30-R5Ko7Y?X;D1ip+8a7<=_=kIab`M`I)BU8WE%9R6N%(P{#)MsVk&0bXSy&g_6B+uZ$dd~|Y}8Zkv~TsSyR$Gis4hn#Er
    z#_Mw~1HAVal)PY}@Rx#-jx259XD$gKLaJ-_y|=pc#xWf1T2YM=gE-}iO1H*QQFY#n
    z+LS|r@E!iH$-htYdYU+!NT7oSLc&dy0~QuKQ%g=G3(C#bV2r0<=s#Pt49v0eQ^4d~
    z6Wx4o>)9I8M~niD-sE#Rhu|xH3UYhWMl+}MRUdHFyV_gFv}$#jB0Qer8emi@d(HSe
    z26cUj6N6utm-M$~dn@e4@?6zEE}3LoM{l;I-K#Oi0d0dM@biq5o^w!S90`8bK_MlS
    z!USYo{GU>KA|}zzS@9)jX#kMqm@Ldfv@Y`j{TKLNNl?jJx`+R_NEd(a2e)w)KbuHe
    z{$i7s8TXQDVcLO+6yT`wy1txA1HKzVm=3u~hjIr!utt;9OuL^~f~1EMCB(_he5$sPDU?fC+Q}VT@&J0
    zS$C=Sf&z*lt!LkD1(mNPTO*F~^AYGO2Ycz`Z<(_ji>UG#7t4=pkIlO)f5@ON6O-@C
    z^v6#8=bjaqH6TS230%70CRA5S|AO(kwfaTzj3T`v4C6xQ(8^cFaQrW28bRA3JGLFZ
    zN@haJXxQ6+o&radk<|s)W#rmkSIsyb$#3&S4Ney`G4<$B8
    z(M5
    zlaq|rSO)^xs7mr7DIn(lOl}Rir7PmxQP+J)qo|2^_rbN}%T`IwNQjeB@@z1LjE$la
    z@xj!zZv6grKsEv8AAhWhpME0C4P^#*c7|azJ7jo$v)O>Mqp`&TqV9u)I
    z!T^y|YHQrHU@6U9aEHOU^QtB(y1Zn8pPz!5rs0;O8r?@@#Ww3ahU9w^j&y(oJCb8F
    zL02~~rP)aK$iE1RHeGNJmcn^DIq(8^N@(aW7jM}AqrKC=lDcyhB3_}!+0fs2(WE5T?3Y>)@s}+8ejy296
    z2YQz}{rB7LNqweE>21unDf<%iKN-^=Ja>kHzP4B7a3-Q*yhJCT^pc_~IS^$yXaaYExCh@_@Rh5Vj{&hUlpfyy{cRk?7<1-vOzhrqbGz~GU?TTQ
    z70K?qaeDG@`&3mDWsWSfBU@cmOl<0|gHJk1gLqG=v=me!PT!8)@E!YYH}&ck1Fj~`
    zh;y!2(BjLDt(+=o-WM|L-;$-11qu_n8aYu8OXF^EmH1;o;RSs-M%5BuRCE=GeKtph
    zO2yJ_zH00=8%OU>ws$k$X1+AOu=jBt1NT!-l#KT}-F<&*0gN9y>P;(#S?@2bp!#R-
    zNogh|9BjC+psJi3*pW-tO9!008G(A(;rA0Um0WzTOn}pm6d08{)Jfz6TbGq9F$RLi
    z!@z6t^?KNY-Q@QJzV_7O0A6Y;!akMmD{VT!^f-#S6;V8o+^gzMD2OEX$zqW*fNRks
    z%XUP)gPqW}e(-@zPMc9L(59)h428^$9SlxJQ`~B`qG4NxG&luXbqWM4xUY&mzc2Rv
    zek%~C{(Tq78=UMsJyHihw3B|vY{`I%cQlre5*um{B4TFfu1vc#9ZI1;?YS-sb+o;5**_o$1cR%b_*%}<{
    zp)D!?MfOWw%u1P2N0B1|5w#waZxZ8&kfAn_7c%%Gb1m;ypwUpaIG##M9N~zxL+FYd
    zdEQ0|I@AHpK8rFr=*UR9l7Cs(&iL!%oUABi-Sa|4EdTW9ryH`G^$NXC?Z#QOeX#vn
    z^ZI570zGA)bw+*4z^z4j%7by;kEG5-sxx5_6u}+1uj_vJcXl1cn0~;q++$XBExjW;
    zDZ$;A4--AJWpcyBr6w;e?KwrH2N*JT#;j^fne8wUDImvmZD7_}(Ty@xfXP!LYIfx@
    zk-{u|Wy=6rTEP?{qUJUFb~%0$RhJgn1&1^V%Qjn&Go?1nK7kxn)%PMGGm;R8h~yEF
    zNi*t(qsuC%y{Y-4fY;K@mfYmlOit3lA#HJ>CwC}5%+ffxh+^FfqzA?NEQcx1*jbX-
    zI!ofSv&o&^Z5U#M#_Yt}z3Mh~r6wK47AHsAC4MAV0j{dyNUoc6U^Km#zEXU3RnM+`lR9d#EWNDnFh|rDz^@kMTjYTEYJuqfUjYx+q#F4MXf)q3*
    z-Yfvmi(Nz=rU?U?l2lmnEngb%S#p-^I~hEr-!2mBPaSqG+c
    zA$gLG93u^hEC|g|nVYpnBpGE#uqAP(Z_wU1U#}8*B5Y91n~$P#>&B`(1=ydTV$|*w
    zl&@|+$%2~#`ld`7oxQC?-c~bc#<o<=%9b}LYlakrx;En=(C|s
    zFcNklB&Zl`$k-a%(O&r?!-GnyJSCMP{}bsIhl$AW*hOwp`!K^`Y;S4vGq@YX_dWI0
    z_Mt{qY_lKS=Dy>qv3j2u84Oef>h-YNM~Z^yD{-
    z%uaDlIWN-lfLd`MsaOGr2N-JW3PS_n!Poy3^h1n(Bff}?e4;8q#CfR{*J}%+UdONa
    z6q$oBaQ=sXgY&NFwpC&eWl|!k1yr_Psw#
    zt+*8B5}kvWl_K*;nB=gBk&;}sf6qr2=JvMw(DFITNE
    zwS{(Vp~P*;=B>fTP)as<)hbcA96ts=7=tUtY|F)yLN}q>YT&Ysu9k`E*es}sP)Dy{
    zH-LJbZoS&yZ5B9c0dDK-8tvSyoX0WMWqk*U94;eT88d-!&Znc=sIpw8^!t%Q5bQMcp36i
    z;RMbIV;Der<#B0chR4*3rPwh)q$`zv@F^H-Ehu%HMx^q->xrf)J~X={411LzRx(s!
    zBE~tYbA_YN%}}>yy@Fj!?=0&?8F<;&q9!z6utAd=hzy+=>`ioA%24!>YPWTEhH3et
    zPMHc;QVOOAXvfiNbJH~pm%Mbhw7j&EwAjEX&ID3Om|}BNtW>7<6e|MYmN+|GLTxiL
    z4j>}QN6Y*u2`2{@ev~@w)p@^=rRd7g(q*eJa^R=?yOQqj^5eDOs^9xL{m$uo;!)yf
    zdSn?rP%ZzQ(Q*RbFc^(NRw$!VwApw^w>x%~qz3V^n!`t^2){x#I9Vn56{wG9e1etmjLJP`w>K}H)bUX2GPU`5X1P3yA+IuRnJ0AmD!fkOP6pWh$AayK-DxQK
    zn3=>+Crs8(e$qD9G?_D~2=k2Ki`gBlIK(@l2uzfP>4Q0*rUpz3Qs0mQFa@h%W90PS
    z!qUywTO-nadv6V_LV6X+=p^MpG%@734xT~zbQ-@>6c0QbZ+xN`S3%GhtQ=(z;BEvT
    zG~EhS)Ux*|b0GuBx#O-|ttu%i+3XCs4BH_{=Hs?empH(PJPHH%1vN
    z%6>@2n6YCV8vAkf|8wGRr3>1j$;g70WDHW9nr5wP8G5?Cj6v+Su?K<=~L==I;0Anb9g3|#RMCm7O
    z=2dB`blz$-;99|vFDxvG_pB3JPjs$o%mv2-JaT{;4RGKqwU@Q!D)wF3NHQFjp~e)+
    zQkD;i%a!Jl$*Ghhs&Va8)X~9d7F2brDQKY`#?p*2Ra-6*28ZpS%7MW^Q|PkTLL{fN
    zF%@nGwG*gJzV-WL^Vo~pVdown4=I%{!%_bGKKbFfOV)|T{kDpM1$z(U!}!Ay<=~Z>
    zHH-&sB3w=)kRH(dA{%}-Ip$d1UkUG|PfV@tkNkhg#Ei;_8e{yCK#lSQs(v3?AL!W0
    z*2!x`7El#et_35FJY-#?XOoAMUjPOaiXrZCL>Ubrg)N
    z0NC9SBL;RdcYj2xP%XDt)g9Z|1g3!!yx_L!YJ1g}^2cZBC*JZa*|wWC&P-MXe>
    z8?1P}wjeMbgU!ji`u|LIsiQgLa`WQ9qBt1bh*vl6!{3R@vK7A`Ks_$fSge8pgvyP;ot@8GU)`^+22>;vmUY8XIu4bU8qGDGW9eizI5s&
    zNnY3+Tn8wpfBC{*!}yV*$qV)0=f!#bd_i!jb0|jZ8FOUE^M&(zy_zTlWde-zYD$RD
    z8036j)ax7cccBR1#9%`_6tESva4MEcOX*`p0sM#R*W@t-cL9zfn-uG@S!o>J9yNgJ
    zW;U~MSCEXoP|p$f7_=GMh5*d_jZfD1Y};^b?C
    zk_vbY+t`mci(4Q;cz3-Ju`0Mt{f
    zBQ%-gGt@Dn(5-_YRjwE-Eh|vz(+sjzd)A$Hc%=
    za#&k?&nj36E8U=X-LVgG0EYHp-tIUI
    zR1B!v&erJ`aJkofb$*4hS#Mz{$gB&B0%YCUqNlN%!GaDBWgTf|X6Oge4^Q10mWmlv
    zrDP7XDTiLEs28-9d2g&~r$YVZYMmq5HR^3b*+N_wzu^6c_wwRmp{kt{;7@@~|i8cXt
    zA3U*qshU}^n#t@iw>o3DkIBMOL7(`H&R0NrZ5(%D}kaDO+j$r$b3{p0MJD-`bO=aWt
    zgya>Y3DFc179_7Ay!yx2PIx}ZKi1+a*J84WCY7``K5<$tbEyZTcypGJW-W
    zN35LJUQAGsrj>tFZ<^4~TWdg9YAq
    zUM#%_`Eqz2(3KG;bs1a_{WkTH;ar9N@hD{LJ?C}|gKZGI4M4W~tmal0>#@0XVkr9N
    z32PbacNqYKBcj>ir29T4Hq`e~3^U)foY(|^0Ml{09f
    zAIAZRcZ2aT@J1*b+f-7vJdIk)p4l`qX(Fs$_;XBxlUFPMyla&|5N9glWaj@a>N*)|
    ze{3V}{hj8?yTc~mX*)}vzW(6hctg51p&#ybNUjyUswpL6S)epY89U`Fh#dH&n5%9U
    z@g8P~Nk!Y3cni($J(c7$07C6|b!hl}n|yws&YLk0M6(s5a4l^=+F={pG#7Cb8=SN;
    z`jJ~Vb34rCb-7Taja(=tdf*t*m#k8$<`TmAw7E%V7qKFETcLwwvXBm1jdNClfOA7i
    zn|3wI)_E#JdbPWr+TW*7msf=Mmj1mu
    zSZ|!{W|}KxwpdbXA2R#VaTjsU)P|KgDr97^kVA{@@4X_XLHV~SFsK^pM^0%9ci0Kp
    zi@@7Y-iA8%3=*ePE|MmA7DaDQ=1zBsI}9cWiRZh~v+VQYu5Il#wP284^=|3#O~5
    zI63V6jCchAW$ZjuT&6~jTrZ`1GXN+zD9JXtuKEK;{Yn
    zWfbGdl0DUsjIiO75?bln+1bkK#l;uvdu`#1TKhRleaKV=YbXnErA<_6+jR+gxIq1;
    z`V(f5Bbj4?D`4L~(s!xMV|q%OHNB43&0lI&uO_Z4rXPw}7m&W^AgjQAem5mbDmE1I|v{;z(*Vng)gsM85E(u>MZXi3pL}al%qJ*MkiKlSESGGd>B66s+
    zkxDO3ocIC-pA)A?+jMo;0is{PByhs(0a*$Gm%LHb0t8TCwm*EJm8wfCeO$=v#l<@1
    zI~fkb0V)af-~C)Eu;P+@UyU^W4lPOc^C@$I&^%>bdlXX@ep!PPQcb?3j1$%`IMd
    zT5dL{0hS%!B>7YWCY!=0cF0_!+Xkw^nv4R>rCsO
    zjeKI&nBy(esaLV`YQiJ{Q^szi*rou9`o2}0gEmv+v7As^a2!}@vZuGT{R3@&hnEjxAoPek6t&t)!f0YnH=jbjq@x!h%O
    zyFPJ^s2ex4FWIEI|CZSqW|H)fmeXaPC1)064fP0R7YqesuSzg5LYPt9lIvNW~N`t
    zt0lamNYmk!0wN8ql@x(A8h4wt)MRq%w<*(XEpuD59em=#D9N-)CPb3Fg3zX<9C}4~
    z-ByutG>Tuy^jC#mPK5ONgxQF=tyXEzv`GzP5byjSv=QaEHZz;Lll{pj84I%al)ANU8SixNG_snNQXyJkFW
    z;Ru?DMVqBd*c*gT-Yra|d{?+km{a5@YL~&FrBGkc_anL-)ZyC8O1RgT7CDTwen9$E
    z3^S9;{=HCvDcm8jV!5^|qW%<^@MlEwJjKotv$SDy_vzI-3A&^@1R^wu;_&WX6w4Jm
    zi-lG)bs}xhEk8&fV$Vtt#w^4bQ=E>*eUPcTyyS$_$j-(x1Y`oxJ=zEcBUDKLJ-(sh
    zC6v5-5hjoTf$SW*-tsY~wGdlfkmax#&`%^S5*8`;#3h{Hl-Vwp=se)iGCkA=;6BB)
    zj&a1A-yd>!=}>qdgJ94c48u<_42-WA3^DE=I%^?9(nkIaUmm=kAH&O9WcIYQlP;Et
    zgRd2Pz_3wVy_(e5(|mZG3>%1)qO5!{&mr7+qwgwo)Ss!J9Y+YKT*&
    zg88%-7l)%ISU`A&5sxs)KnwG%V}c{zZu6Ge%j@w71GGsWQrb&&E9DS&-h&w3N=8W1
    ztuQzp+l`dq`l5qPRPe481%T^**a2|FCzPdmODkgK2&zd&qprMjBu6?9-^H2DcxRKgs`O#e>j9Ia7hc7>)p2D+C-8CkoJsnw
    zQ#A7^Q=IC|<5$C5C2YASo39}!paTX|n{V*7P-ch*Ir5x=+eUi%gU&RQ{1@WE#GJ#L
    zgGkv|aJ9;GVNcTFe-IvAiA9(MMXGrmUw=*h502fEU3Zgb91f)3r%CWjHq(-Uy3pkt
    zZ6lo1`&sZggKwFpxWU%aRxohZ--NacG4)MMe@D9H`!!Lb2HX^{V^bLC6-PQNA^r9J;KQ2vXSj|Ed
    zG|wUHnRueIvMzcli;M?tWW0vKbr_>-tkeuTNcm8YF{2DmY}zDws**3?sw&@r8Sy)R
    zmRySzH9a%Uj5{gTd}K_;cbWw?0nXT!rfTY*Nkt;no92JVVtr<+g0?sun{xKGo*g)|
    z$}o`0)A>(4oShCY99=Hk(tZFb^3dDu>5tFNC$JJI*$YzTWDfSE(B~Hy8IRap;(PJMlP-Lc+fU&Xe>3)||Ex9o>Q%D4X*i_hO+yr~q_)JjXtigw
    z|8%E{m74OBLElq|y~DlJy~D=o*5USU#-)XE)CxN4x?pFwv3;_4e2O;(=LJ>bypZW+
    znXXU%yEBz6h{oRGoBdsJcy!o!yLGa=Gh-9lt9EkXpm#?;Yzj}N!A5NRAM``_{--q@
    z(U)0KZ4%(pR2?sLH0%wsL=FWeeG8Uuz@TGi^${#;rs`9&h%kLX*x{`-aBB1O^M#aU
    zL2AS1T^#-=Fuo2$lRbYKQ)e!`6ZgS3XSk0r}7;8g^8+u{&acX!5XRXa^FX0uGxz5k~x3ACGKD_X6s
    z7`Ntsl2n>4(#__4XP464?leirb?-0tj0ySFnCJ>SR`E>bP4>DFTdh_!Y)hA!)37Ig_50#2UFRq`KaRp)
    z?UUcH-O%G-2C%21pf2PvVF*eF0{c}MCG@IH?AaYg8SUFdSv
    z`be{b5zpu@PAY}diJwZSl|cK<$N48*(iyMO&q^wIX^H7)XO^47r%_Kb`c&>xX0Bzv_0eSmcc`YlTEqR=Qa*nksffMKDJ
    zrfWa}ySggl*|GJEiswt`h6+8v)-v38hGee01Yp!HVz7yAO}-6maitP+kqHkWt*)tu
    zhkj@_-X!cw-(WO#grOYQdVZe`uYkW~Am^7%df3H;XNBCM$`tYDR;+mppD+u8Wh!r{+#O|w4q?*pxXnAu
    z9a5hD_PZN_V05Cjw4DQ^fW=P4{V-p3{*C;8&Imb(BN^MsbQ5Tw`t#2}XKBpiFz5yS
    z*y`i_ynue8mp{>HL@u=HJ>K6s*x!5Qlmqmk=)S7V8?=NxATzt#v_U_5q?~LnVV7?+es#}k3CFhXNuHNr_99Uflizyhm4PJpD%C@<-1#;&(9~2b!J)r
    z&aA6N-@nP+PqD%FZOwP&g%iy7x3r@0lTG;*gMn?jSsl+ztT%N1$%_95OwOPG
    zjQX!8DL7uYhdiXwx
    zLYpReA6-o3lB|NsaAQhaQ>|^5un75sV6+9@E6m6i+=UnqZe+)~N@OieY(sLwr|FXD
    zqocV~#Qh!|uzo*`d!%?Gmcp7gR1VrpY{e)t@tin>N0rsUw;{+Zw}I$|*Eb{MXpNe-
    zWXO?w4T-dMw}F+kP=(WxO5ginSK>d(8r^^Ke-lIoeJGdHiR0;#ZshwMM+{eqHpiPw%(+Ecrj!>;{
    z;%z^|mmJ~66?yk}l#r`U>@sCv(^q+jG+Rh!n?0EPs7?LOdZDug6J?e`6kp3AiWD=k
    z+pfhCWk84Z4~B?ZtvF+uO*TFbl~>LF^u;+w>;;FI5lU+#Hm|5gclV#UmuX_0FF=IDM9Z1#z)DLIu#x~c6x
    zd8%OXfv=%}Q|&H0NRV%?jGu{aT-u+@Dm$g5{DP8}teBP6*TkxHx(yv2-{I4Y6)2HE
    zB|dm4ewLvf9$*-BK|k(bEHY#3MjVDajWXh+IuXI~DUsz)qVtegZB>$THV@h%iY?woaaq~p~Tr`KJny?k1`
    ztLl(u;+A*-r7EF}c4%6GIuQi|uXFWKhqF26ELqg*eka)5x5b{dwsE+IRK!xB|gF!0XV`#ttZiMcnrX
    zzyXc)z3*U%Nkn0eR%=VOluFpT9^oLLG7EE!Ey3MieD4hC^qDPXO7rl&*@W|L8$CkA
    z3gx8I4>mX93D9%-;9&3Y=mg7cikHtTB^l;XLZT?CiD&beu)I^+5D#e9&tdp1!+xxh
    z6%ts8bvt@lCVNj|%jVKLO5OxzSdC-!09dF@ArdB12XiaDlDfiC^JQ$BND|nh${;1fEljfl1uDo0G@_WS4?LDF#7=>2>jJ)3N*G
    zK!)eFqQL^KM2~8Yl$zzr`dIR15va)oE=9iF5P$Dwim4$;H!v(fA`DN^r}HB#wKiR;
    zVO&iZ2~42@giJe4rj~EyB#3sDwGfXVwVymVi5NfbOfy1%&Z(;klYUb=aq8S6wNls+Ur~$VVcdlyvCMXz7GGo1Nl!*VwQ;60
    zsTnBca0Rm2xE-!d<)d7V>0dz?9=VTfv7m$_#CUA@cfB58Ve-swn{%5uww_ZtrwPnE
    z)lIPPAC{NR548RohFAO`lfyUgGX;sP7ToH&_iElyKI46Dxok6f)NnF@XTp=1jnv|F
    zr-6cUbv3q=XY{V@g%{q7%=fam*%V45%wj)TFl0qf?$wC`Zj_&~suW
    zFb83wSUb9nb5J&08eo17EzJ^49bVSTrj-_T5=o_8TZ$XE5%*GB|10#h0$#=S-@6#_
    zV&9ay#YD&T1DIb+3M1x-5Ry`{@B&m2IYk=Tf^%QtsuIAK$Q2#cL4}t;w|0
    zpOHU*2sfzV^J1HFpAiAo2IcK8l-w+W)I7o}m+%kqVOScWUnbIWx9JVWK)@giA1N5Z
    zKs_^N>Z+r-*c6}($TK&u%BtVi=n{GW7$1y2dw4i7X)m8QE}9#f2Wqj~)$i!sPy@8C
    z1Q{iqjLws(;5V*lF5zKwSGIWMmmaDgwa)B!%^9s1oJ(Hog-K4jQ5W@V`J=j7uhy&A
    zh0Elq?a+H!gPxA$gWIV%UYk50+?#*y)SEM?tKB~AtCG~2TY4Y%S67gtf>a_|C>eQ-
    z0z+9!bs0#brgCK&O|?wzs-zmEsZ4|1!^u6h^WwYZG6n7XE^93vn#o`ur7ijT*lOP?
    zvf9_gReKE6;$X#;C}(hdssLv&!4%po6C&{`-vsT^b!TIuzPf7(_9?AjmBNXO#5=!b
    z@K}t|ZUC|b9y983!H+7)l6T!7e-{Pdzacw2oiUv-_0!avNhc+LVr9cg*wwgI(9}5N9%;D)jNA@#r$OXtEivs4E!u%r2;PZmL4i?U*12
    z-*q7~G!>cHqaUYG&72>mzu(+h(<$>byL*;RihGJpMXoG0XELbU40}I$YEQ@6Nm!d4
    z1>@(xCk>EPRivf%?@b4$sfDIQbDI}$FuR|Wxiq@Zmi6G
    zg*%w>$jO>OJ?p8Uc)0ta^-V@{`kFfU)?1UFfNiqvk&*nMBk^w2xyDv*uu?!UI%`Zr_;{>2(@um4CT_f!;BNmY7-Zb$)^MaKu4B+m)u
    zNem@GdT*icH{H*2%?3KUand!WFjpLCTZY;ue`CZX8zR@dBFAQSc|s#NsK{q=+qH8`
    zus&S*J>B3^8zie>6BJ>Y_20{+h+#kJ%*5^tMTWC8K70osCB~yco=K;c0-%E7NG9v>
    zop8;kFku_{MUIqhg3NbA6-h&)<6Fd4hSI|r)v`w(;k3Al?o94@rwN&w2fEy5y9lYv
    zmlwo1pVDN)^W-#0i|MMgtwjBmFBK{(%loYykWQ~be$92BlZ1g7DY9@8viQD|sg@Ku
    z?ZBGf$O(RHRL*ZD16fkqBldAG5tt-7hljxkW%e=!{H$0LX|B}&rQAzO+WCs>@SHKC
    zjSY#1L{`%FnRFg$4^FciX8^#c{rw5gSCgHoxF-=yMdIu__P)y4HxI2c2dc2&
    zxs&m;tR6~7jkH}qE4BL4rlHgarspsoKrf##oke9r?_XcG(F
    zCF>Tc0CP28=Gt|V>TB^Xsrj-4hGZY2|55^udoLKZzS_uX`aBz}SCmhhAZ9na?F>`b
    zY<%Q1E$ebZPAB@q;w`=Li`BnY)z^u}{{KIscYb^kJG#hhyh{EB)YKS%Kx3{0cpcyO
    z^gYrP7ih)cB%_Q>zXnT%T(r3|MVdA^n0&bs$ZCLF+j4gyM35*<9?
    z|KJg0(H|X?AR{7y*f1n6dzPkfvT;<)zQnENn#H?AP1Tsy_lIdOk8_HCl`%f)9qJah
    zJi^@`=1H$sVvrYp&mFBGRD?
    zTMjk}l0?;h#KCV#DVZGY5xI3#Gp^kFZ7Zyde5gF0V!VYV6vCu)Ro2_h6SLx@?i9K(
    z;YTF&B&Lo9;^w8xL!;bvzL_cuT8~)>5d4s3DyZ+)qC1BlZJ&hH_ot#>&hDi72#22gfn2@aD>c0^k!=3#cPZlD%aRo
    zu`$up#>tx@+p+chG|vD|H#gyQH-nPrbl%AA5CRkW24o!s0vQJ(vu|+3q0FG%wt>K6
    zoL407{wEAs5)GR?7n=p7wxZ||W8uV>u;(-@hRG!0#r&7(sMy^7u)EznKG}V}_d#qQ
    z9USlN@179-7xrOLP~(90hv%n9NBhm4{iEaE!)AjLI@w*!+a(i5!0fC|4?1`
    zeunJhM{RiBmW)anaUezoNQdI}x)@m&T^Px05NNWzjDo5)bmqg?es>u7ZH!YAqXi7S
    zQgF~2uU+LlymX_EEoulDyO&GmQVZ#%OAoyt*=3#-b?3?R0*06_ECt^M*@7wF_C
    zC*5?D`M1_ZmCK)@fjdfxxReW0QAu8-in3sMlX0(izflrD>5{dg-@-(}DjGYW3bcF*
    zxV4K7!%I2m71#5TxtL7_Mm>golJyKj9c(&HVo0_-T|`CjRKIV#n?)WnIukTot>$f4
    zy>lb%YM2R@E|VsF%rUws+Uc`A_G6
    zUKZz4!+u^Mtbsr0<}ynb(&Co%^vy>TTXJMa;0a|dowxF0%o$HHcXA{KI=Qw+2JPSw
    zz$o2M`DG`x(B2JMl#loon{=3jAC`5Xv^Zh(#7QybGCU?3zidN&b!FcLKohwF&El;fLlAiATTANFhU4b~^B
    zMZr3NEBxqRGh;~A=t>>aD=SskDAta@L-Kh=0Kf|k$6Yq!QBL)yiJBFdrGv4a=!M1h
    zt=n;HIDXME;DeMn7xMML4=|=U-t~7WO1aMwY_VOT9k(TnOV(4>kmii>3VIk&(2^2I
    zG$P+zy1ZuVf6Dm4zNz|7T}uY7VK|`S_Sw##IuED#rt|~h2aXfSISjg3uZ8`3>C$0(
    z&FGuX1PJ|J4;M~D8lRpn#WC_JJ9$D8K`{DM57T^oj>s45^c)JXb7(;cK8cc(uNkK#_MjWAm=jJfF(-4i_9U19MY@NV=O@0i8_ICt1=^h@4
    z#@pTfeZc{KWMMlHj}@f{&KXrgr^2JC(tKp{gMLH;BCH1g&QrW8NTVC%9)P3kSi!FI
    zf?zwhY6?PH<6tWdR4FNJ**VZ?Ou0$X=uJ{;Q_$2q*B{T33bO)~rldeUpJ`Y!l((!N
    z=k(TjYjsY=Zqh-VC=f}LjQp^$aO0pl^|Rt9Wu9m0*o6v&rKPvs;$>J?*=lnT4uZs^
    zQPga;gO*0L^jlizCUBEOyvUHna--elXRi^eZl02K!gZahs+lX`(993aq{OI>uOmj@o^Wjq{u*<)Iu{JU&W*If_ewVvR|}=u7BTD
    zM~He0?Ln)BV|(e!H_&sDA^%yFl^G`Js9T*~rxMJ&I3`OI5cT3Qn5
    zdL|lCXN1vV#p?(NtMm%p>$hkmM^FtF#@zWg(GaE^7_rgc!|RU$@Jl~l!=qoW`{SA)
    z)_NfTia>S0NDb}rPgQC{woT@%GP(frt?11Jhb6bUL5wt7L=FSZp;NjB;8W^AFnduu
    z?A#-qa3qsEu!-cbr#Kuk@#GorietcUkfirvDf$?E2b#tw@eQoS6~Vz8dE?$tDnOmm
    zNVOpWqKP#EDZ?z2P{0XkDi}UehP;tgYdOO=qojOT2>T`)1k4_WBfX*=1Bu*o5zPC&
    z)3-Ukp~}{)z5Tt@
    z-%zLddhhgbx6u%cXE8x*hMSZK%1Ewq)tt7hgNBbQ7(Y3
    z?Z#^0zrn&vIgM0JAZ7$1CM`5Mxh5|jDc`%1iiJ9|CUOJC2H=Z9=oyBiKzU0!%Zk;L
    z7+n=lUy9QJbA^fHu8(On(;Q|PS#b{a)cv9nZ4Q{BjZAJfM0OdL&cT$ZDJG8kk~tMg)h
    zeqOxVeY1Bcq;6PjA058ld&6({r4WYp;A-(H2C%@Z8F5+0Kjc981p|HK7Z2!>73WEw
    zZOebVT$dA1BbWKHNOKbQKSgA=&XdAug*%x}OkOr~cD|RIQp}mfvT61m9@OW1J1I!A
    zk&vt4o&qs(VWS~N4Ap{0CG(&uJuo7(Ik~5GSF5Symptf*kUiiIv@eBo=>cG!yNzPT
    zg@?gZT2$7BLq)oM1J1*Tftv69oS(=YD8+GyaOk}V7#<7>IZ=K**mgMCF{$VPq5J%fuB!TMN+f;gco6GIR?hSz=nWoOqPZrt8
    zsRgtCM%6o&dE}sq@+)EVu$OM1smuP3yGpn0@j@aQE*UZ&d>?^z4x2n4{Gw>ttHurm
    z$biK||CD~uqIQP|RQ&Kj6FyESYr-$fvaoYdxxqUJzj1|kviq2?5<_sBOK94L332%<
    zxJJ5PAP)7(;=$INz3t}q0Sr`swZH;J;IK*SVrPF}s;4kQi0(Z+M)CrbQhqCBSC_e1
    z+T-4UmhtG-f9IcEv5z<>syLB7N(ck+
    z4c86k~O%6*KpfX7=QDpYuMAhzP2zPfgi6L$nyF85hg
    zB5UrNur@hOQ{~_;;L7|(R^Br4IrVPkM8ysTmBNsmZ=7nSqoWy6Klm}aI&T)$H*RMK
    zNtDSY9O4b6-w&d3Y+SrBycC|=UZhTbpc1wcgzurO2Qm|aPmw2?K~#B(Imu+L8wnc-
    zDoMroL2Oul`@Fo-EQ_2
    z*+fYyg^lNBlO(E`{cc**tg-h{V{cKLOg%m|llew7)I_wbFvVz3SWASXcVgdg&DR`G
    zhok=z3_8ms=#
    zKT(TQJ@XZ$KC8lhTU%coZXN8_GSdaf4ksR)^BWb~ZRZr1rAfAJhn-G9xpxU0^a#ju
    z(oHyk4OzeS(xcT$oZ#?~@Jk*UNt=pi*O{H5_`BJTr*0c1(R+?w`
    z#V#@X(x#hEt)IJgS(*6kQr7c~1Q*1eq!u`5adQ_|jf)foLo^()GL
    zyFouDj)O11kh7&^PRcMz#r+>8JZW6AjOSohE)r}f>xDBGM=6kbCAYb0Nhv7WIwA|T
    z;y#k3llf&|W;xG@hC}qp%9Jj1B_g^6d~708WE!~OvS*sNxGe)~)Zz#Vsb=^T&VZYG
    znuF4O55)N`Np4XmglqnYmKk=QB-^owr%wNtsv0D>KCJUq^eNz2jXv7XT_Z=&%D>Lg
    zzosk-JXP|(2uqR~=uLFnuesS;td{V%B=KlDKt~8E?2sUU=!-Z3>{ff+;^dv2bP3)K
    z{ad|8SZG@wWlt8<*R9lG`mtz>bgWAFWdm&AzDesy#)YvTBia`0&<-dTyt5i
    zozYKa%v8i96$m6SVWUkeGPEjI`FV2ApGoG$j+|{0a%B#QVpYRgYUQFxr=?4pPN!5t
    z`d%VG?VU}_Gh7{u>1Q^*vBq&O9Rg+7#Z}m+bZO%ui_l8GumkK+#1^{L0oF8;+9$aRjlLicQKwpoM+GMn@tsF92*Kd{bp9mJ(His%d
    z$IjjfI)f358b^s4vhvSCIi5^u;s-knEtjDT&#m1znUOP@8!*2Ui0R%wHbE2cT{@w%
    zf2Q*8<#&TZ-r+q#^VhADO>AsxPt>)}q@EUR+BqBpQ7gh#G(==FLzG!n
    z?xcHXgOeDK+?}#=E+(Hi0;)%}nzi&c4Rp0H6Y`G{)0gv7I&6*mk8LHx!{2Tv{aO;N
    z@J=2ec=e-Z9jHz`Y?0c{X5aRwP4)JMg*DJXtQw9!WNxejz7KF~7*R
    z$_psA8oj8e(bclAv+
    z$6#B7?l{K(@hN8N8umqDyC6P0Rm3aYi(AKgyN9PIzloi0_W+I0%WwA%8>d@`+q>ds
    z4^GIc*m-|+vZMFK{_(Fzd-#*mfwe0e`At9MchQ*;J%5agb^g=DMdbP4+1=jXI@wjV
    zcJ}wny1%jmdQ_(S&E^dh!ZG;$R?xfxIhw?5*g0unf3%Mp-SwjH#7
    z9rQEz9lRB3Tf>(#+8WaAoob7y&{#yFk$~j#+=Ac1tnj{q2O(leb~&+!S2G@Ad9t5xuVWGU2+V3$f#`>
    z#oNGgr7D2)4?f}-ycEl**=hAhUAy8@^JM4faR0X|e0#NbxCIACvJM-h+m+x+dpuC!
    zB|Xsf!<2VPSp;<998eM=#`6F7mf-_o`_}0$J&X8wg
    z*&klFs;CwF%H#F!iqQoJ30@~hglCj2{`Hb4N`0HKPmwJ`TM1VX0`YmM`qL7?5(4DVl+!=+qZQ1u6#7JEDwr
    zeiX~JGIMg#mlHsnvPlKh=@AgAa=5v)q2Hc`7jQN#E;2}L!+L|4W2Jft4RMoC&(BLD
    z>-l<#A?0)ikT4XBPM4ENfrzd5e;Xr$FWs%S%sd#B;gW9UMX?6|uPo`}7FMMpTd)?z
    zOD0|ReA|_A-thqFM-uU3Nz5}B!rH}f!-
    z0h}BV^kYdZNHUTr{0T3y(i5y;K=tq(ZSxI
    z#oJu>abl&>UT0&|{r$fvm*`WY4FxlJg*N-;F2>QWYgszU=Q(
    zj0BK&M=^sy`HP^}q|i&flS)|G7tEHxI%|pva))UXP`JIlxhLH@#u@G8|L=XO$|
    zaaBaN_!MqDPOwELK1y*!hPTqLmO@tT?7n_?
    zSUyYDzo-g)_-Yr#{N3_dap|IJ7XsSw?)aj@Va=T8SBjr!S$=whR
    zm9Hg6?=+2Jrp{O@PQPr*9$es+2L_ZW7vZ$*NBlp)u2kCnE`i@Vc_ZtVWmb|Wi!Jg%
    zCb#VJk3UvndvNg|e-z0XI@>({%bUi9$Z-l2XL4wpKmC;7Nw>wbs<`0x&IX&s&(dew
    zlYky%C`M`Pjb7(SU2sf^_>g!DiNvrUCEsAc!VMLrGaXbCDa^ift{#z#6k9>y-O+V4
    z;@B%lHdV|Q)R{(oz8KV&5A40a_ZnSeKI0!aqk)L{ExO@uh8>LR2+!e}DfF;jEvU#V
    zgOAs!*fRs=FbgUM
    z-=PQ8bRIpRmtRQ_Xv{Oy11g=Q2g&fO+4LaM$?r`MbWF|^Jy1bNGw6XGpY%V99#|1d
    zzl9z!n7l>Irw3}IrRag#VF`L5J$SO|fkFPq(*vq&=z&WSUT-x{n{;tVoJ$T}K)+s3
    z8MfzA2OHM^3XQNkkV7f#B40-@?75hgYS?u&?U?LholQfsyZ@ajiR0RxK~EAPchgiQ
    z6_fWri?$@^=bI>u18nj_=Te)*CQi~EhtAljm_uz++vw3W$A*yLL{!D&z3qdeo!tzY
    zgEyDnAd?MAR6Z-?zb=I#px;1VuA%mnf5QEVsn*
    zmp#%(2%pUd)V(;{K(Hx5E4uE7ane>k(f=e|H2^nSFm93JvW$Rlq5#W?xM*Riee|(D
    zlM($$sz2&7ZC6Gm*bw@A0V#sSQ`q=Jp)BaFY>{lIjWB9z^9b?t`gd=k9mUC3xCym=
    zv*9O+kq{H9(K=KBj1Wi^C?K+O-iZfYKuGdI=~E7akq>(TyX>Ljfb0{D-CJK#Y0tyTe^{=rvGPDS4
    zq{qW>bT821wI*kX#J!moWQ7jL(_{=)54-;hhEOyj)v2ubdYy3k1&|Ox75=6q+OBiC%R5)x>$`2*t`z
    z!iuOv5a5ub@XyYi&8Q&Qnu*oG_yDtCq=M_p7valfD`$P0hUe^aa
    zs#TSt`#5HmXge5TWQnAPrOF@@tjO`mGzaX*k
    z29SXQh-P8K3MzxKoerTRCjL>9xyrRqS{(x!cGg4CaL)Gj6PKQ>0>|TDwJn0b*@-`mCqQk2vL%4rE#9Ji$~a
    z{K@WrzuQ9|1&?$*=^Zve^KD56pb+jTp3wma!3M{k<@J8H%WwbA{=3U)^^u=*a`XJW8{4IPk^1`41vX)&$pgYJ^U!?xBCNc5
    zD1ua-2ZV5m#iwp>Z<{4|Fk|cR=x}d)YrpySsBt>2%&T{MF#dEQbxotV;NKd&j*Z>p
    zt&^?OqZ3&NmL73@v)i7Q#$;Y>le>7x88SS&Z}hOTM>!KC)jrXNGc_NHixCsBmQ+1{roi3nM%V|0<5UXh5u3
    zOMH8Fc79&JxIhnzv$HMle|+!n7Z>a5sg8m>WS2w0(o+5G?00y_|1Q+eYv;AP&U{A!
    zi=sY8y1{c)?>0OV+p3Tr9*5VLKXvTdbNKwJ{-tdAcKD({q5X`u^6-8F|@!3kPs
    zR&#DrdxiK<1_HEN(2c4?$mLY`cZf^fmxm7mO2qUn6f`b@=m`=hvKMic!zg0>Iz0Su
    zDX{|DlCq;DplHoqdo^7yW+<3+QH*M%Pl1FiUF(#aTZclibjgGox1@w_(~NQdV?Vm>
    zr*GHod`gqDb!P56rfL`IqtPv<2`&{ys+}i+?vv>0oI3mV88fqXsOXZW3=xGRT7I2)
    zVk8cQ7CKRR)?3boL&3^&#hHCuj!7b$B9s`mBM7J`H-T+O&$EjPkWyO=ebSAf!p-xf
    zKR{4lzWI
    zms%ck7zo^2-Y43);zwIdkpfByV@-b{Zur&fok}TFI>|!YA5>yNi_z55OHKuuuF9#Q
    zIM(S*szUwbV(vd)3&I&|_7m*ueu{71pTMy0&%mjsNSrLUdvbDgQa*zTWE3Dv3s}?+
    z`V8Q%;T*zJha_30CIwrzbb!`#;bpT|_)f7{ObCc#P!dNg4it^X;P*vUO)}Ujc9$qsf!1E+ys#UvTZpb921mIWuNGtFo{b3sY#2(uaK
    zu+tK#9r02xY`1NPxx8ECwebOb&+cVxl;T^V-cKbCk`?#)7u7hD~T1m^Hte#{}
    zy6l?~EHeTzVMU&@ERB_!`b4;-l97l@3P6_jX>$_v&64CtN;pA>0s9K7i;V#~Mv+od
    zyY^#(C=7iKToA^>QGVvi;%lA*24}4Rc`23PfC@^u5cVrK=_D1rRQ+c%U2tLkEySI4tE1gLn|h_yM>UNmZjf
    zuTU)OOJYb(QdjmUU_3jwU3O>$=ri@VaflI~(2b|>=$B+xveGb+OTjK`Dtg$ZnMKli
    zEwHoy0;#_^Ry-=M06~;e3w2#TB||2LsB-_%5XE0p
    zEpCTvQ|sBQxV!%vR&vREiGmmXS@5oa<2pM#*uS`Fyb@(6e%cp{h*V0Zo#e(<+Lbz~
    zp}hU&hV%u%E*S>_g$H_StRrqyj17{4I4zKaHjDzo3I0#P3ReEMDP+>
    zDge}*3}JvTCiIqX4aQn25-z-WCaj!AhmzJfNni))IZsJmJK_jv^{d7XTc)F&;{&S4
    zn5fPYh=8#N=27yEc&#k`cY6W@qji}W(REuuSTi2z$}=Kj8J%~bA75mDD)sQ}Y!&GN
    zjHgTi-+_Uu{M-)cu4Uj~XX9w*x*?uAXqsCxg>Kd|BW0*9Xf;YQ(UH;K&PX!t+}^vNfYqR`>$
    ziYoDJ4GTP5bKXB&vw&F7`*`u>0bOt1xEuaat7u1-yTXVA{qY^1iyZiBeCK@~a`c1I
    z_oFtGP>RNn(mRDX!IeZ6>Ur(rV(}cd%(=p#Mf0s#nt8`e1J9uBz0?QlA3yufT!;y1
    zI3o-4wY#9-jU5gI-97X=esfC`shX{dyqpbRE{!r!pZ1Z8oqq1*5itK=iLw_4TPuuL(6ko@z%bpJgu^
    zMMD@)#NojvK`?sf?|ga2TfNna5v}>hxOFA)*Q4&$M!i9^-`mueUrE!HelK;6)H5ozc;Qt+gxCFue8yDC)8Y8p8pxQ?N$gga^G%`R(cDO2
    z3^q!J=XXO#r*2)mmDO~4uM&6WDu*nLM|uV?Rjf-6UHHqMY=HC`7^aCE!bBr@H5VQMgt
    zQ35CyM_N&ghF&91(MWVkr#+Dh=orzDGgdwR3Q}ZSX~FKt?dFaHw-etr(V*PonvlsG
    z!!w{DSk$@>;mZdgh)8nH?MDx3ZnoK)sgY^6mSvoTg*R;-E-^-E!9!YDKmh!1G?Dnr
    zC?P2nZma_lvvQua(kP~?a|%S?*3eUoSw&u#>duyXw^h;X-4f!{IJ;Fr{VI6f-fbbH
    zLX{#csZvFrqi&Cj8aJ9rm7L<{BsJa@`=>km&F!PZUw04pb`Q6A&&ohFD;Mk+5(`;E
    zsqZPav`&MDP-GSyjO@rE3;H3cz0`F81w#M`dxzT^ii)6?3y34cP+h;>j*Vv&zV+;8
    zO!RS`8C1IqVcdnoXe9TA8i~^(pRWq!bTr<*YMi302gZd2N{AE7Aq3#f&fZBwp!zmw
    zvttMa9gkJ@0cXl)KM|y&WV_dvDJd@H$k3-mbwtG?1AZR_^og0~OewT)yHTDm((ZJ5f;w%urxiM#;Mrwlv~Y-XDXi
    zir#AXQw2LWUBEl?VKf+q{wP2@5B4%R001g4VbX0TiH(nOol)YC^pwKsZrZ5Aq7XW!
    zxz-76=`3dfudHJVpy;470=uXfBQ25Bi1F_tV=Rr6O~A>R$*lV6pI>m!_j@M#%_4fB=#PtnCw6ylM+cUFmwz17D}XCBgx+6pGS$5kE?{HmlmNs
    zo(g4yD~
    zI7Ct61(~YdNn5py_h?hjK$N7E2M56PBS$=v6!!hr2@F!99w%a!ILQVOjtjH&Ic>{}
    zN~2rM?46>t%*|dX9sIP87NDM^9Q_(HtpGBFZ=}qUFn=3qHk0)Yy0EKo>v
    z&?syFSw{i}siJgR&TctycG5)^`gE4qUQ#7uY9s;#aSb>4N%5CTZZ#Q7!L7zI60)i#
    zL$Zi;oR-P;RD0=o4w?0|dx?-A+vg;+Fe;@|g;^@o_hj(jU-7C8l^Ym`6H}kHx)G2y
    zOv5&2wGmT3PRfA<7d*pVGO^BlxwGlxf~yX*2&j^JP#i>rXbZe6j*HHm?AK*yXp
    z4tfI!M<#G+Y`Fyl9Xc`)hRQ$M_nEavIto~Dd#V4Ng!6(~V2=?Ku>2~iul`9wKKQ`Ha
    ztISf2hVT|6$`RKATug9l?EYek(;me!Y7C)=$7DuL^T%=Qm=kagCAW|H&fh+Ppg!ol
    zT&gqD!*Y^>5@55j?S2%Y^21~jM}=gGovdk|iKbJ0ZOPnR$I`y;6jvITLHcEKYFT(&
    zqJc*;a-IetyT>8qeaxq$t{j_#&4SeZ73dYILr8lG|K#W~X%=Efi}_@cRh3lU0^=%G
    zxDqQbW23y3T2bkOL&L?P8uh0vfZfLAIasJv5>iR2MuLej*l*iZq_eS@7_sh1(zAeo
    zCwvQpXvUO+JH}k;`n#A2BB^>(N+~4>!a^Ni2&MvAimlpFUZ9NF<&ulkB(RoNSt5K*64Ww@C{F49&Pd;_swT=Np5&!SxzlixH`a$;|+1pET+~z>O9Mm^O;0
    zPWg+eLqZagf*eM{@{E}5dXw#O!^FWo6E-Dm^)}_;tz7zGZ33IX;UqevO#HH@fN`Iz
    z^*#yrMb_*K4pEv7yx-NOXkC8#Df69LdM^;Axb7G0AoTv|g0cGu2uFq=&dov#NkA+T
    zrCb=vI`d*}3A4{2Pe7+)*vHrhaexWKdYsx6(~0)+{8g0*V~dP*!n=k|xRi2fk|@cM
    zDpc7;v8>JalsIO?DdHARoh-PmWhwJCi5Jb-+-7ATC_<5SMcytdP6jdnLsDcb?7W!U^g&vnz2onjVk_ZuVoRLQ;Yq(#LMd;g;
    z2z_%7p~s~V!W!QtfzUVR5Blo#K~i;m(A;`=dUUY$7mzP@Pa1nihh_P;DRy(nmf`2p$xo7?YBPIeDZQ}w3}T*;ZJy3S}GubBbMafe?8
    zJSj@rLRuhYQF%couU;uu0{q-N+%x@2j&o9=~!i>hhl5rx3?pBr-`s15fvRafA
    z!lC0ZpQ<7(U2?IY)+JsrLfZF`Ac4D}=zf?y!t~uM9JUgPd4tkzuP2wCyQ=)f#_?RGi8Bk<-!iD=i#tod%14l)0R^sp;feM)1E_%IcobV
    zSm)IP?n)NeES(q2rsYb##PV#x0)o*N3yO@@7dX};2K$+3^)${8^orY%x6Q?ay+&j2
    z@C}d=Zc_f|64d&yB2^yzFiDi9(%ap124DsS;^)Ya6cs+Jc)jr*|c
    zN8>)hAa?I5Nz>
    z&*3iT?T%4SU796Ba{0zyUa}Mjy$j9?N*vnibL)g*ba+x59FQX<$|RGwQ{2*a@>uh!
    zGa5rFt`Q#(?V*2*H<)@mN&^BX5?=Gn9rR9cT`Unt&MQm
    za?Ahu&th=fzO>AA4v?kT**gWMd~5$(6&q=mefj0f=ftuvRsUe$|6t$$@38N200gxw
    zo@H&b^5NFOZdK5U;pyj7bsLVLzr#loSv9spzDQ2W=2nyH##a&+perlV)<{QfUPcuK
    zrgvAC5wEvSp|5AfrFHE*pc`AKFySQN%bKsZ_8Ys>$YF+>+9igpvqQsry<<*J>Zjn;jx9TkTVF<=f=P@pxP%1~P6~FPGCCBA
    za?j`JGb43=nWD~86;1!H(eC(zSpPw+|AUFO6ze2E?31w#FiRNZ-pBlbS3#F!W%-no
    zyBlz{{Yw*4w*+O#3U-KAPJLp#F{DS80(sqV5NAYGZNEzL*H8*NMh{(OTUttig2vDx
    z-RYt6`U0TNLRHBolF#Onu%9UcH@bR_N+gx6?qNdQtndXuegOxHsOFBQc>gInlZ
    z40{x_&IVHW-rg3$s8vf^&Q@ip^H^Fm^@W)VL~$|(R5RN|OSs+R-NT*T!|lD@1|5DA
    z&N`AUgMeeFahQ0Hk*t%1#3oYKJ$o0ik;uG2(6}87+uMaI{QKbp{&}8{Xt($)Mw=qt%Gy!8v0cO&DWxd>jxeT4j|7!7a;^LQLu*;Zhf?Ln)xStw%AY0@4jOk;bf3mpzs
    z$Z8)xRPAbjT(eX|oU58@go5d6rR!E}6=O}8QUCyb?RF8HGuq7rV1G0KWJR(%UXjAA
    z6D82vY4Pa3OQDa71Sz8#yx?kmY65Fyhq5#6peyJ_DtPbK0k7A)U5m$}2)R9kgS8zO
    z=l20=Q?*`?(7YXKC+C<6B+$Df{Bn!24W)A>Mp_;Z7>taScNJZaV|lr!{4hK%p>ml0iod}egU7cwnOC>_z;;&O-L
    z^eOG$rFQ@im~3ATq}49lF{$o|of28~uss*Df8_d2dPg!4!h>2)ERi^#Mb$!NPueZb
    z1UaL!>CkOZ8U_qUYE+D})Trpmackf%VX7ysc1Gvk%R^0SA+PxQgI3s%jz~&eN3E;%
    zV>AgPaT9b0b~=%;?_(mJ7Ae~;tj5GlF|VgyN(MsOS><01D~Fxf+cqaFtOUZBX-Ayy
    z`J`<}AThe%2b>cGb5YY)kjx8mfC!KVtkyCyOol?o$#_WdR?U#vWQuy|!04&-nx~IJ
    zxQoNM0TalknltR%&Azn8F`>YdB!t4&xE7`x0sT_)*mA5_K+(YXYTm4hFbroI@x9-`I{J6EPYO5KUNvPW)yM8G3t=
    zTCvIje-*G;0U>25tnw||jKUFn?H~^}8FS92?zq<%FP21^+BvUO*&T_Y80&M=@ZLlb
    zCGt?4kcPu-VrV5Kzhbdan&{0dVDH(ZQ3h{iOUx1ZGBXv!ISPPNp=GKH8G>80Q9b`&
    zLBjYD%xlx&Rct!qO|f#Q*!1WsM$1<#WlulQ{bFJ02DTS4_?X@g&G1Jie(l!Y2P@Tu
    zthFwFLiDR^3eYmf&>=1@+TpH>HSttDvkd~t7_T(1eEbSjKOU8eVX1agC}D#0EU?(k
    zcSNr)otEQKF|6H`q(Q5cwyn3zwHtXqq@YL}Q}F_b!e=xOtv;}A=#7pAF^VuZPofRi
    zv`rh;eny)RIhqH-Kgmh%!5PMJWWU112KcJi;q9xuWX;atr~L@Y4^tm2wjsN)5w|z;
    zud8sHVD88;23cEqEduIcRgdddIY>cpUs4fW2zzj@Sf*_=&HzIR6gI^0*+Y!QgV%{k
    zyTQVpa^o`lsEPI{cmR?&mz7dL$4Su3&rujMqp+LMf=H?=Y}c3yHz;=y2PGgJz4Th_
    z;CSgpC7mxJMixVgvxT-F-}K^98!a;x5S(eer~{Ha9`?zY*s$4+asPN2iS5Njv+=Y)
    zg;Mn^NNA+jrK4Ry514JgHJe->U=}HWxs*%2sn`5mb7M^JHr;I?&jR;p@iTCvyB|)y
    z=)tNF5Ge>y0s+yKJoD8lyfd|nq}4RUTXKuSga0Ct+kB$82A;6Oc8HaqbeUi{lm_wi
    zA**C-%RQ^zh~xm0*+BB^Pwd?kNX5@6pm@llKA>H%*O7ZQBO8eud?tixLL@IfnhrhI_yb23*&f<;YTU0T5Ro2;#B?N$5@m}jYOF4y@y$ghUk6Ex3@g%Q5z?d
    zC3#?of*6x+8dw~G1TW!y9g7ATT^Wmpvn9DfvQ<@b+F}XRJ2~
    z>ab5QYD-hv=Gk1gT0Abf!?p-rnQi0~-7EP5o+e1!jMUJSFxMM
    zYu$3POqgr}Mkkdr85WyTACsf4+27sT**kpG+&MZ;-P5R=;!H9x(psb0jz$mA*SK(D
    zCn=WW*BY7R@RKgHT61INR+Cw`%|v)=sZ^>pmDxC>2%LulvT_1h0Fcfbg*|CagR84u
    zrZa0QYx-e8k*s1=16#`x++k77O6|BL%z|5n^cx9z(>700$0xBHq#=0)v(nh#YP{Vn
    zotNYtRs!Lv94^i59dWmx+mP-1pqvh1&$k21dcm3w1sZ*3zt82H>v~YX*o+B8Ldb}TpDXXO^(@S=r)&@P}
    zMDD?(f|rEn%lZ>IAb48_#mbU_)}#}R}IwiL1x
    zk(CP$o!wo4lqhy#VyK>MdBnmICR>!Hjl#F}x)h?^YitOQNPvq%adr@f6T^-w
    zw}Rn_by}#CgKoVVj}(7{sy&$w&KFnVHLM_+ZDvYG&#KaV8vcDzohUE;VW#(ou=F1<
    zEGYxm9+1JkLoy-GsB(66jM|gN#q8GC$#aH7
    zL-It)9uNbsJg;@oP{meZ96U0nA+HmxTOJGp?Hl5u(?_LhE`&K0+u(+Rn*qjQ$S-b3
    zc`IorZ*|FhOYu25g(NJHbmFG6Y{9|~MrsSTWWdwp^e9s~W%58K5mcD^AM4vPIFb4>
    z@#1J^*ck;n=xQHBT4|9^#%Qw~R*~G$E4nJ?ezJd@nl)6y`zB^$X|rfvWBhQh8~J_w7QJuiexNYJc2NPZ#dEvUNR;%
    z#<-o3Y&ynp0t0;*-C}4)*byFE_OX%Mt^7qU*^G=~2c$U=6;^0NSPxcF*W8qt$AlCU
    zgL~}Wpq)H~>AR#`SP#8GlCP~;8PFQJmn7gf%9#}{xFy7E{@Fa;A`z%Gu_e2Ld|c9f
    zf3k?}@4e0#UR9C@K3|&e4*&bz(dq7vIfV*E`L%!tkyMt+6(LD0qq07^3Pt%9E2}(9
    z{c-OK^SW4IbU)`gS2z04$A;jNhj%SaDz<>o{l-R~*`xt4UXVPTY#pcq2Tkd!N-xS=
    z+xth`Tl-aIzV7jTkQLzMp^{Mx2onk$Rej#&6hi7%)w-$Kfxq3|+SxtfnjGmnqaXs`
    zJA8dqrL!mOccLt42Y^3SG4dq@n_4y-Z!?~qp6nf`=9-E~fm;(t^1!4v;EjqcqvQANDyH2jLB<@@9bJmx8g(n1TuKe>PeHEC!Bg~Dc
    z-WSlquX{VYP;_^{VKutFoo%6{R5v;5L>yZ_DoH
    zVdeqkLCqNf6wew0HdwJPV9g~g=_H*4SL@f&y@Yp470*M8*fAcoeHFTWNjnX8m
    zkU=5o&CyCMR+u^|;_2@TPR+A#-9hcrl^oq&vB
    znYof;fMF#uiU`KJ<%>~NXfQQszCAknizt)QM*7}WWTz1V>IIP_7zT+MQd$}k6siAl
    zRbGZ5`>6(iFeqiYH2}6jcW-2JI(ES!bGM`3fZ{AHmvBbg!5v-AaF3d@d4SjiLP#yi
    zSbfVJvlbuA%m(RdXePoMN46An3NzXjF^y7jd40j8L3S?yjOCCFKfQc;FRZ<5VsTJ`dWpZXs<
    zmH#6;m2@b1vyZZ@gA(B__@FV{X|wp*{O}5PEEM_Ni*E`KmNa9ESH3aK=8Sw>V%H_;j^iheL0Ug?j&FarcmtzU+03?=X4HQUE{pQ)8hRqe`;h20GHA9INu~m`nR~N*3*R
    zt$-=#z@i)wQYXueY_l+5;0NR_w#gDBi0b3+NE+V5;*zNvhCo0ZqUq#zB#@dC(^R8!
    zf^63_(qfTa7Y^fcw-5W5P6(v|kZx7`f&a;Uj&-Gv`g}@MI^L+Z0&`YfAw><{!(I>C;;=p2jRRp#26cZ1DIAg69*h;U)2uvW8Urr
    zTLRS_uS`Uil7%h8@&TM-9hbAaen;YI6t)I!*cBfOG;`#^~BQir%z#D
    z!4@o8SztKXr3sWz96nwAk(5PTyh>_Z;t+uxllnFqQa(|?jV9hzUgWT&mPDmR9_rXA
    z>K+qColmHM!wXbEHj)elC*vyzwd)$D%A_Hdp%`iE
    ztayAfO`+dv1%naod>uT{R}Mpr7A0POjO%^f5C0BRaS4RCrp;;GdNGU;&B9?ltT-?g
    z9X4fjgV^B3ekWK*OrW^pAgm%9bd}N~E3Z{bV6J0`!b-JJK^PRN}7{mmdZ4lWIjzW@QcnE1?x(&m{ATHP}
    zpc9)^@=^;*^3nao1JUwznO&X`rb!_v119iZiaV;~Au`-g8A>#B*7-+R*6a?*`
    z{{yLp>$<2NG43xxFi<_atd&fd2r{pXMX^jxH3t=m@f^~|_8L=FC^bVnz~lH<<~+cA
    zY!wA;IL5nw+(2AS*szPVJupl^zhsL8^Hc_ZG7)~QIKf!He5rDOmQ1A*&Ol}(#6I{$
    z`lXxU9a16OrzYM$r_+QZ0+VEsClYGeWI~8|eC5GG-0jw=$FhyhlC?0RW<^|{7e{?@
    z7~G8-qhLVzbp$Qqk1Ef-+;S?6l!}NW9rM&4qz%h>!vS^(H$zk}VU87Y0g>TQC=-Jn
    z-b`*T#&XMG*uNtCWfesak$}xe)zoNTD~h>*CqE$5z`-bXXR`gVfFEt+{PUGUv27fl
    z5GbyS#ih~uDz+XoYpIipP~B$dtlsE*kB*bQqV801G$eYJlFcVfO|5d)B`l1olx=n@
    z%bUxPw?TJ+c~4~SFg6C4+g*7hWjf`2)#b<^tm_}F>wh@wnhpkVuyy!me^*&rP6?cx
    za{qT~)1k^y0qA%0qPNz(8u%k1^6{u#gxz*__PY+o*t{UyZnN7HX5Q2KVoA3RAlZ^E
    zU@cBqA2VMeW2AQPWk^%@>87xvovwc^O=Hpfav<}qxI;8OQnu;RurfV+WKdQW%Q+)z
    zl;z(U9f7cvtik7OJb*>_;sDt_+<+=^y(aVW$eJ()?TrZ=XLoD+t&HM8^`yys+Th+4
    zskp0UOmz7V;OT1*Dgp@ja(Hy=k>&4f!*#~JOZnyl2@f|6w;&V9Q9}~GqndEXt@~%(
    z3ZQcS%8>(tK(7NeOy_E_XSq?!cnusxHt2r}hf$vxKJ1|1m!Z2eb?@5g@(&5j-fcILOx>kx=wmyTNJ{2jXDbzF?#5(t^j{R(uuu1_PZr}Yh;L}iM7NB_Z1^V=
    ze-7=Hq)y=yXh=!NhbHMoT5R(*ajP3$UCE85LMl@!PMo0K4gp0D#`22X+n1qTWS`tD
    zklJ;er2Y852aNB>4Zc%m!>SnFG*E~Rhi!3b4(xdv6XJ}lOC2c(*R=;cMJ7as8-+{~#{AF^p-H@WUHR^LIU??tQF#gIhdX
    zxS$)_4~1kHOPH;8*v7d=AAKDS(rS8Y%a{6+R&cPvPI9f&eW4Wa(*PGt><$yy&#LZ@
    zKLt#W)r@uzHmjtg6od#h1Ik5Jre~mxi+$0Jb?^tjFLi
    z=TCeid>M(o4-Hbd6$3#x1C%B7V-p9*+GnZ`LXuPkbz$edIYu9cmgB-4yqBUJJafqp@9~0^YyBa!nGG)rk|b1Jq)0C}iN9r$|QfrNd*aR}HvuYBgWl!an%4c?+#
    zsPKm4L(vVd`oYLst}WG8d@q6}R52#5$CxAAegE8f`2+--X#nO>Dc~(V^;Vt&`C4Cj
    zvA*`Qwxm8{aS7f(SzKJ4*boAF>MgB$OE1LI>iW~w^_6E1kYxb!%P+!Pu09uw%hly2
    z@yjny#QYCJCYpfnVrw+QID&{PJTxCkVAKy=K<6bNg7&DjCm!BHrPLg7&c0lQ|JUIE
    zr=;?DHjTOP=J^6R3l{vlO8>6WzY=0b{3-_VjX{6447gds8s5@#Z~0{j-U!<{`72o;
    z48VxljlP-n5szhkR2vc?azca$E6Y_lRu@;+s;es!7qkS*6iAvRIZ-{;4NH}VjTiRH
    zJXbMxs)y2TTh0i=<00$Abu76MB8vg5HR+`$OajsDz07_HjUU6fUPYrD=#TjEiog8Q
    zy1(v^;~J2fp9n2aQJnQ-i=|`0)&fdJ-s{F|B)#<;kg4m}?K;4z!xp2X^9XP;eLu}y?uy-RCvw`+d
    zxK^Fk1E;Eo@q5~0o6-#IN60sfF!hp{*ElNI%;$|9Pu@Qzd(
    z1-4ok?xSkirjJYr2@coW7o5k0^Aqva=Sb=!mh7Bq1jTx}Y&C;FQI8Y!9fDp1+$
    zudMJqa-=cxlz>gR@~nzcteS5!$EdzyFnv)*PN~k(FsSzxB0?TAiCvYuQE6C+2fo6H
    zHh#O!>>l-tvqBAIEU0#y71A+6DI?#H`W-0y5p_&7S)<_?1Y=YjU=*Q>qI>yWW@VPu
    zaiUSZK*vE|a>5{2YYX*i6{8?OSsbGW1e}qW2N=Gsi{g@y5y>v_{SjLgjBbL&hPOj6
    z%a+eCi@kvE{E_RC;?dC{kTodJ86~;!ZmPobFh82UktJl|`NHQ?gMo`r6-HPAiLS?*
    zH&uZ`L_jaPXo1ApD_fFOy8u2_EgKH2#ZOLL8>iNj#gl+zj*YK50o*K`w15>QRGL?$
    z*A5F%F6z^RFyI!VVBGHw*{Vo@3K!Ampg$
    zMpfBhJknaYWch`3&w7DL%r2WRE*Eh`1@Y6LS4?s2`EphS5T_A4xQ7ufU>QM_STd4?
    z)i?!MMU9Tux4W%#!zyMQ#k(!>vl3;7TYf4PWpr2CeD!W`e+MU4C)=_U=*a`9CJuG#
    zV<{ve@$%WmPS(RL&mk#}Bw1ziI-DWaEwx~~`ItJ0EvIBaU^Z-ngFG7g!+RA1hHS}{
    zIuTHv%&im?iu;!`OIKyYZR!XHWuYv?l=#b+VI}E01F0d&haDdfL+iiZ!T|?@3Ld=o
    zRdH$0NJ(oxu5>!lw?~ar%vfEcxQ-(kXPAtl)GN*}Ms`YUL&*JW2ZJHVl$_y-wz2Ba
    z2)3aK`@=z_al-oXfPy7UJ%P6Q83iQFK0)7rW~v{$;4|?Vr)KlA%%;6d&!1zDdLI!{(0I)I8*B%zRBv5>piiMZyW
    zI*>TvL_nz|X$~~f(8jl0v}lDi=9Px4zO~H^&SAtO?w^9BNSC0Mpb+Jo*tQDm>=%samZVN{dX+-3B_%>NWt*939rA
    zOlnb5;MR+mqV@8nJn-f?$YfC^%}e&GmC6MsbizcU&2|rAbghCuL#RY2q%TOX>5C%R
    zcLir`t{tK;w(!dyqnbY#%l5SP6(MuvGrz1?spT;!)1pkn;77|M&2he$=WB
    z$D?Zusui@y;zfOBt^RVYMwbmaWsu$TmR@)(Yn3OoM#?s`UIRG}wKLSI-1QN27`bz^
    zi2tsuI)tpm>f+-kc)bO~euuVF&4aD&w|j@XNJ40|UN1o&zI;iPl=%V`fRo+*-K~ZN
    zV3-F$l~e#ce%$!2ak_h8>c@HYWkFSaaklEY_2p9;1k(Wcl-Is0sR2Ckm~UVzueP7s
    zOY~Qf3C&b^h;PUytjm!5$UTJDeUfZoFMBMDAsx5^Mw;XiW&9u9wYp<8uSRtUmnjrK
    zJFD}st{(7c&2KsT=7Ai}LqT)B3+so$2(Wp5VSNFR6qrE%Ez13?xLuK9BV%RI!P|1&&b#}s?PeClEsY=!x`E8~5@EVFsKr@KSv|yJg}TK7
    z_W2XVA|wY1cn6{m*FiD`htE~m#lX0%tD!sW81wj;?6)McaGTOuAg@V$&I>@8B9}p>
    z?li#(@G@BkcIGP;y3V4yxZ}0Ti`g@d7A>!G@PZ{I1#dy3G+wmN0bAM{bvFzA7mxaz
    z+gcA;Mqt;P{;+ieGS-}fbj>Xg?qCDeVTS<%`=xQEW=*?}32Cl;i0O?C(qip*sq
    zI<+Zrm*D!tUT}pNNFCjzpPtHXy0KwOEjWeJMdF*)pliy+H{I+qS9Y0n5v!TZuDdl@
    zz?oy+m(-~MiZob6V7)3O`jogrXi}BFx@c>mu$_P~#_R1sH{R04fl#3{M*UOmF>|}{
    zC0u>+>`U+2i;rLW@#@OQFE9rSUt++;)|XHI9ny?$e}o?
    zB#;bjXsAf@^k^rz3Vphtu1m5Y(JWThKqiPO-coj1EbL3nxEaS)85o!}@_<^Xq6~pD
    z1ErI9mR0tIlgTNuG*$i>4Ew;ZDvgGvccFV?a`vMchc&~y`L>Mg#pHM#N?8swf~$D0
    zD)LM>?2qp})Uu_J(mkhW)_4wR66fUHY?iQgDLu=&04qzA$Ke-~VCl?jUep%q=QYY8
    zmt2ZQhzPcQ{H}TW+wrb#3V1zseJDe9Ui>m=O}(CewO2ZK(d`s
    z6#2dOv$b_}p|VbWf^+xcS@YSNqETK1MF2sQla~cCy!JC8BIWoBc*9mUv~U0i>Eq$G
    z{85|<&^iichjueqU0V8%qwN9<`r^gM1Vnrzp}zPUsDKd9Qb50@n*eYy$X=HL5Rl=Z
    z^%XEb^@8u*OMsZ3%x{`VfcV`9KIr*(-xbB<>o6bQ)mOk9_gBB;vfN$|!}$Ad>V-^b
    zNy+GI;07N*Ml-|3!jIWM2jMUqi!3zig~J)UngK1hr!zn$&cyEyZh)FMUN0-Ste|r0
    z@v*$HR$HRuHlY!QiU~B*Q?N(E<6!tW#k<&!VRGG{T{mvot2?fM?xwdd#
    zQ8!4@5cBMwFJsQiFQz+|tmZaoac+g(U)Mx=WqIk@TBTs&i&8EXsJ(&_qp(8l>Eo*G
    zZ*R#)p4IW+7c)0S4J}V>DERa=QK$Ay*4mm}?O9&EKhJ9~Wv$6=Jy&fRY9@~RwZ4(V(4vP8723vhT~NVaQw60skSckaU$PSh
    zT^SrKQRzdn5+)qh^)MX7Fr?TfU34yi=bwTu*Illy2nq~SfNuqou$BI}_QaDsIZl8F
    zBD)vGoow;VN&o%(*{`P`E;s>r&I$M!V8;>~JRS{2Y3tSY&hG0sZ}-!JC{ZC1h{HsGtma@7x*pwBEvjox`F1KJ2%n
    z+qijns#UHaf}`LKWF60H5UNYD*rULwcVg&|Zj`485_&Sn3tQs&sIm8fywT`z`I!Y)
    z*3x1o5i$~U)%dg?l-Q26pKJyMXU5o$F-mZh5fB+BL1WZ;vi9lztfePfDd1Z|?kOyB
    zf|VfpZH;&R>C*aY<%vkH^ljMhk5+3>(-5{$v|Lz!cewYV$$GKouj{~d;KX?rN7}mT
    zVYu;6Yngm1zfr&ewr9jvTl?)X|KWmVHBE|dQe}02Etn2xnh7+I9Zf-%jNaLne}SOS
    zj-rdRMtm_F%SXM5;w;Yb?4WlM4F@-m1K7hV*#M6k_0^Y44w!KD`H~mP(FSZglwEag
    zX~~j%^>iuuieSWRXa$|(R)@XylfB0F!uoRUY-xGr0>FI1hbVA_ch*ybcOdoqz#8^F
    zE|Xe>B%;WBKEDfm1*hMe1#$?3U|%CCQhc?!_72
    z?)syVxtWwA4)@w3Et
    z#dmTs@Zo~}ROEEz({RlJNws%Q8b3e7Rf9p^5xIG0){L~@UfAk-{kvyrbk=p5W+Am&
    zSy+E=1Sw|3^{uY(2A76aCg2s3YUsH(I$1J&fi11CyoxSn9Ud)lj
    zR;Fu2f3ICEsPoj_Y}n3%-433TetQsgg9W#FVK)!ezNUG5S;%o==|y$r86eAxmFgNJ
    zi&9mn*6p^5)>6~seiY|!a(faHUtqb2bmJ5zFT1gq%YPH~VAQJjqER~`hf>UwVYvvn
    zTwSd^l-#WW@OT5I2o8BX-;qs?+v2Jgt}Y2-@FMQg60C6Od-wj8jE?ah!ADc{rCvOPoMp%K7H#eWc
    zp^P1I9Q;Q6*nU#
    zk;EaguF}=KfFmoA>zXK_Su_1sP^1fK7a0ZGDM~IW^k7F8L>W7WCeHK|+j`Ar*&0Bi
    z>B8wzqafM=jFd7M%6EDObXW#!DzHZY`4uqJY8imx?W3uHHWOe6JOEDm8@3;%2~t4N
    zmNLR=f}%ZXbt`A}ECBWlAw#xFZkm7p+a0
    z>i)tET~F=R%s!hDCiu#Z--S)!wrw6-t(%A6dD`+x56#=eO^#kUiO#D>cGuOjNj;}B
    zkDI(3za7MG>*|r+x_UOLbt?17rE}NJZF6#KM%(>}_ORwU639`|&%ixeEctrk+7oOk
    zw7BrZoFmXo21(4$8ZpLet1qg{FEp?7>(&PlhWAfT_C72)fIs_VO$N@hdK==I6seAsCR9noyI23=rQ;D3B3of>~cZ-}UN^OF$u1v+Sn)$5c=
    zFFuM$>%LHjR!o0YAFHyD*u}Gp3U+c{nv2XfIIg(C75nY5gVLO_qGwOGCQdCGN9)Hp
    z=ew^e$9tNlQs_4sR)FPEA@+EAO@x
    zi>z-dU@6bbXG`A8i-q$Fnr`5g#HE2W?73E%Msk7@8CILH90{`|WfEq9efY${UIlLb9`(DU!oBCCdl($DJp@%{@h
    z4F@n1`ZfW|A-b|P--19y8{O&`YC-P%Ktb-O_I6S$BGC%LYND8(Nn>qLD95Me$>%St
    z%TED=U#{9TcI($LJUU!&Uytu3T=kh3J8$amKIp(%T#~2)+MuCy7UF#zg{0QCcqNZd
    zj<$CjjiZyz4EbNF{m4T9OkK6=Dj**AS}$HKFD(&n=Db~A5*JGE;>|Ij&!<}_Z+1_c
    zul5eNPJV0d9iHxk3+p>kcK{Nd+u1X=7q#W}l?rVccqCS8E45{m6Zyw7`~dmqJGJGMhl02cF)}$ZF^@6=QD4d^VX&BOzBej
    z3|y895@-qgRpJQ@e}3@{$6;}p;e!20DCIURh3spZJcs_XH46&w6Yoywy&uJNFJ|wh
    zxxH5hu$sSG6hfA|H29+nB`qau8OXj
    z@;D@uRF^zb(mh4fBEx}Y@_G|(h_kC|?hQ7g#jD-Nb(Ys#oonFP&|zY34*9Hdh0%9q
    zt@;A6_vupgxl}gOpoyu$ADUyCz_M7($~0~xhuxUYZx~L)W)f$c5F+RZVUi~w~a1uS_37#hGpx+9NY5Wv@TZ$5hyMT
    zwkpc*Fre#a)8>QfcZqvm%AaYhM6MG&d$e?XqUbl0gW4^`
    zHt3l`Ygx485rjsqIujZ-j4T?HWWiRR^5~wc(Gl&u>J3N0iLR0AlLc~)G-
    zZ77?@ItH_l3B)}kq@@<0N7BBYZ0ElLjDnHT+mr9u@
    z>$)N80032_{MAuI9!50p&z>X8yZ97X-xp8y%(H2;nt4(TyaXJrpRKN4!08U)p!@49
    z&J_>qcm}!4pa497fgs)hjORS;V);yaQP^O()@;-A(ADRlzDvF$+9X_Bj-kllS81v*l;cUtT~(RY6|+ChENS
    zIj1*Ve90IRad&XeNW!Fl=sG7w8?J*9`Nm%uE&~C?t!8U5ZmN(bm#OlNZK7;)&nND&
    zvM>-JvZqKBlRafaWRD5p%TF6KKvYZU_SN!SOn;uPteQzK$Z11ED#5-L$6HO*KP@+x
    z@*%uPL0Ha$u$&8Fb)}O1#(}Vs-v?*t)}&4xI)1Qar|&DZrG7#4q}iWmYw1e2()bLK
    zrBq74FEBNl7qnl+@=|SO!f2eU>a3Sfw67H5FAQ8Z$Ty>fB=+WWi}+S?jBY#Gy1!(f
    z=2=-LnnZgVNAFIycT;6--5`bw14c8q$haRuDJqgIWORU)0UZopK%)PhJIV;(rzgu;Lm1ka)o2rsKH`zVSsR8MtvE;Udl-0ogo7lSd3
    zq^vh|MFt*7jUc1;a-#O~BWlAQUH_Jqn6t-^tC22|F$3HU5FhQ1)27VtIoDZTN!IC4
    zssqFD$K6q~&ZH_2Id4d>O)Byq@+OD0MM5vR#HE7Bp&tGYL{F9|*rjnaOdXjQA!_M;181Z(cACN>
    zfi+Y=p^TdcIVlP;quLlnC8WD!o#`-(0GknEtQa@!2YPwu5pJw!yoL9VpRJL*aNcz9
    z3a=uxo3JeI_z6=-;*yK>%Jx{!C`|8UxF_(4J3B2Eef7R)R636Ni=@6d1e5T}Bd(+Ky
    zSM&(Q%U53WWUF25*aVKH=54T&zW!D0zmk?LF$yFBkOS-&a&DGatIMlm@%hrz>hd!!
    zjVYnPs-UGVN#>;BmBzk>mp}i!uzqm7TMyM0?*hnnOZKyb6)FMi4T3P^*5zh^BT_zL
    zXbdorgVE0tU0X(IQQS#S5LW%!@-It|C|S+uWi78XdbZ#^OXx<}W$ZpyCP9{dgm(XA
    zf5Eu3-214MCA3OwATzJLgk@S=(IIp3v%R*kz8&>H1$V4hhv{k2PxBOun4z}TJTAa%
    z=bS-iz}qKVzb$<54#;BIG9bAF0lzi$@1d(dhJ8KlwNV_$=R0oKNoBuZcRmM{wFng4z=uN5pHeayevVVSMZj#WUjKX*nK_U
    zg`=MDz){yXO5Xs(x|f=Lo=zKy^%}ignq|GF6q|9qH0F6LiEbe5m1&4ak6y28>u2S$
    zVLL)Vfp`A}9N{}OMA%ffF#~qEp`{dOzW4VFx5srp2+cID?y3&j?kK^hr*kAuhVKK+)AmuL-W#}vHvqo>$r;JuTiSsoIa^x3NUsV2dHpP@U}@SH9XJAmF^XZ%-?=f+;~
    zvo(kZ^9$fT6cYAn1@jtb^kGIIdFKPH>GGs)Mr}f8mvuYiyTK*yEm)5FD*RQJm-ySUy(9+AEu|l6W@ur3D{g`GelB)sZ)Dx}(DK22p
    zLe?mp!D$1>nCO`8exTU7OlTS8I0H~Fi#QdgV3;!B-sBN0plGWOfMmG<
    z``5RtD;c}N8LDSlfau|^uIRRor#3XeR#ND92Rlc4{VuHIZIk6n`IOs|uC^0Ke_kWB
    zNJ9sJPcNVa<&OLEDecbG;}@Ba(Hh(ICUf#WX847M33q3Jd>r&g;kftD^@H9U0Y4Z=
    zJBSwI$^xLity=PXBx=-oe_|jQ2Fbc)aU0K0vJaIcM22=jYuFJ7}ET
    zKSWvvSy(BJ2fBgYHwHf^m&j;f7!0x<`_eGJ(ZNsB$~TAa9Aa>pIVA>KwO(5&V%`hg
    zkL&(;S{HPsCmbD*^Y1YFs7adI@R?V?_{O$Vrw_*W)3U}q=M>SgV+ethEX2*Dol2h-6Ag3IqOwW6!^Xe_g8@GdgoTHN&XA_&1MDf43dxChZ)c0BY+AmZ<;2gwm+k(SJ_Ry
    z%4q6Ux~W%oQ&vOxh<@_DmHxulNi?gMse6sA`y+MJ@jF7)Zp3#WPQrr+%B**1g5&ek
    z^imfrowf|7E|)un(%*Z*pRFZ-{|gpfHS#Z6b{^sXPYaK+=+YD;8PIS7p#T7xv`~Vu
    z;)qTF!m;KYARHq>dC}B=N3#QpJ5vYD10F<%C6kfJeiU`I>#Rd53~8n#DeV6G6s>UF
    z;7UqEs0^u~(6dTjp=YYp@%9!L%P2)ry6j@lrx)A(^;vGm>_X4;I`-_jRqDk;W{Vi<
    z%CWeSRyNVqUjfYq!t(~h@RL6ZJdERpMvF2Bq{6svyB0^aW%o|iB=`Io?Q)jnb&A;E
    zd$qk;K(1t&QW~Kt06)W@6Kv2^2vYov^|In+`V>D>BMRL>4HB3$FZQG8Be~a}wlu9mq+i8P;ArD`53YY)pdLx(b$m48}~W?i;apZbARW%HM!lW+>|mrbVGd1?a&CL`gy%$3bV@m9(fP#G6)2-1>b^
    zgv+T9uE!xTI#Zvk#BK;`H|83`1U4{s!l_$bt*xOK|`~I=_$G$s@#GJQN~;#n2{kBxxHD@1)g|1
    zyucIBi7)WP`~1YyQ4lEU2A-`tIKZD`r~7VH0I10enqL8@FPj9~RmuC@^d&%xBA9DP{^(vfO2)}+b2(lJh*s>mrrD7!EmVkMQMV&IQ%
    zC?St%1S7G(-Q3#W-`vJVf_{vN<^We%2^@=F5MxSCOqeNl``4JN8><3k(3`#~GZt-L
    zLjUU<2B3Rx$^Qm}q2#%>;tqo48~%9H~^+
    z3X2E5hI7qyXx4);4X422dB1{4akX4Zm7q~G_L7N4vYR?O@K+L#Z&CJW!_Q9OQ^*7I
    za+pgH66~CM@&=_l`3yI=ejxlMrl-3O+7KirD3ZO`KGP5>}i>~W*oiKEMJAl
    zvVHZW1-S==adaovYD?-7O}t|c0<4-b$f>3
    zFcBFNK){yqfD>xVq-6c59mvZu&Yl+E$L!k(h1AQMWo@9_Twk*_k&o1s(IPm?GSVre
    zwPksmO;@nhW*V5La2XKocUd|&64uhA{Dw7QR8K6+Bi4lKXRnJL<{%FKHim;W5l7jz
    z6u;QW~9HTR-Wv4SQ-u1&f%302V#ep`*H+axT9ntvpWKCxd
    zzM(|PaFpNbSmZVsPW=wYC>`+e2$SbwAVZwTm0GQ4m)#S7j|lW2io+2SX`g;)e?i
    z82N~iPVJP1rvHz$XYFbmN%nL26}p63z*t5P+ZfMeW(Xk(cfw;a$z~2=64@3;gDrU^
    z+2B3d|GxF;R<|BDu)|5LR;#P}T~*y(U6r9I-ppRIJ#g0Bb<`f&@eLlY-;)zZVU>{l
    zp0ZlhW}Wx+j!r&PSLEFsGBqa$7<~X<(787WPb&)?C64J&Do?+mc%LtOrc3spdzWYD
    zk8h|XX*6Ae3N-|x1z|}RV=@i!=vk#qxNKWy5u)z5Bd3KH=b}~W>vB90
    z0Xj1anl5WkZBEy!=Cm@9yIP%+6y#3MH^iyG
    zv{Z2#%~7n+S*k#>s%WS}bCNABiY)6}n7w0~AXOF(o&)qB%}&C~nfUaK$^goALM1_U
    z8%~~d*1E0k)n4aXHzutalKL!};QAjYZ0&VjGc8?fcG|UV)<@5u83gb}T`sQ)1)b`o
    zty0q3_u8Qk!etZ|&mw}hOe{C9S5NGU)-32OJdxsMO{dJ3o5G4mG^MSV-9f*BjixMS
    zXhT_E812L^t(^peZjsr
    zG=+>t?G@g5-o}mC7nLwU$HHDO+)^x$i=_xQds^wM~_u*#3T2lGXwxX6)NlU(-TArnQ@lAHY-YlqNCYw(nWHAh$2vCJ
    zv61F|q=T&K*jpHhcjFuVh2bU147EFnr8aW>wZI6oBh$QU8fqbqyVxmRw`2wkQNS0s
    zWZ$OQ*+VO?wzcP?sX@B;_>yc>2RAXaz`ABd#j-8F78Z}BtX<{|C#dOD>t48@u3GKA
    zYb9Dw$lx#;Lu6Xn0vgz|CwWu0Mf_z`kWh|atnM2V5w#j_(H8D7@cQPkQbj9Yw2pMS
    z!PGZ4@Fw1;b|+geZL(=%X`K>_vzd2tKoxd{?U@?6VQ?F0Axgy6Yq{8Fr)8-K(JU_M
    zu~x$$JOQbQ-7RFr{z{hRjrJ~oJ7^YS-t?S&#QS%Jh`p9&*YqkFFV1>IJvTS?mPGdh
    zjTkt|kjND@nn>2rSl87b#&yl$Utx)qev~y*RGv_%zR`efSytU?;)vaM>W;F>l<$UG
    zMSJOnGIQ1~t5)eb3XYXfe{y^v5jVp@%*&mMk-|%3q&nN?-tjeui2z^CW_*7U_l}^?kUsqA{_D-%|A6@sd{fk^*qv_t^(63$*
    zl&W-b0(254ofoEv&CK5~BxFe#D2G=0f*^G7Sc5Yv;flPd@)luVDB2k
    z&i}mxCJjh_x(M)8YS=hwy!K*Xw!aPrCtfga9O8*f(s+0FNwc$~wCiV72H93ixOd5e
    zSgrf^^0UyFc#Cc(-ubaN9vbicdmqYji;rLN!pX#o@BFj@lFZNS!w#<~kN~1wt_L1%
    zF3BUsB#pgvmgMaL|6-WKKPTJ~F8i^uZ5MBpx20G>
    zlnb;&(5=b7s0r1Yi>A89_q&{4RG-klPio!Mqkr{Gs8_o@RibcVVxlOi@W*t4eCnw=
    zVr)%!-juT|AWnZne~?+EGG63HB$WrgFQo%4YL{VFt%1daEDvo{pO=T{(plC2G&!?N
    zu77ie<}b^ZXK2Nxaq6bm{_E(W``TBgi7}ix%!L&=W=%W86K_Z|{cFE&oSz?(C)`Gn
    zy7ztfSLLbhwGTr4%8cMUo{!;UFpk1ix$v-GmJzU^Rr%18!T{9DM~qsTh>JtjsC%Ey
    zX1Dk8{OCe6FT-s9p~>TKHud9**;s|DwG373*{IsfP_>_jia0p%$XjokM8id;jxx7>
    zERsCsa%UyF(t`K-c;9&OeULd0;eELZ-)^-|rbeu+!K*zoOd{%5P9{Dq-%ZPs$_fmr
    zP){j7uAIX(l4P;g{pacDE_zLbr4uaV_OElBy_z9=Wxrlm4lX2P=VnTOFWVK;+Q8+F
    zko-Qz6zf>l9@Z*a>N==}`B(Ua@x^rnQKqoh4#NuI%jr*h7v?YB)3Z}Nq7Y`ya-%3r
    zVl(x^p+7Ohq-1oWssN`^*h`~najFnEAcF9h8Ac%*5#JZx^N_hcQX_885X9rWivx3^MmP(
    zT&jo*l?{W32Aw+b<^^f9aCeD4CV^$J&~<$t1RTh4F^gy75U-INtRg=eq^>?lu?~fO
    zH7<%~$3OpFA*&p>rS0x1wog^V!4T`2cHWihbU3xu(g_AdVq2B4N2f=hS3&xrUoo71
    z>p^~$uVV=^@Y{z{6nc+o>T!ik&;bz^&8aBb=ifeT1?Fe6!{Atk>VFP>upk71fXO>+-WyJiv1oe!)hnavN-9}Z
    z_-4Z`7Kh-uPcWpRviJ8btNjSN*bk#hlv+POtsw=JY#TjTF=QS=l)s#8R&uM2Zz4%Mm`3Aq
    zlw?Y5!X>Ma6Di6M=Rq8WAn~RRIrTan+U{&xPQ9tTdoicL{S+Mi%q>2KQWI)4^OHo+
    zKr#lV%>QsC0pGB?$WWGnp(*T3^6^S{1nR~ZJ>pIx=)?f}Xd?|KAb)z3X`K|=ZoFX3
    zVr|Bg)^^CwNI`lv7SW8<`-ErThesZ?K2&v7V5?BTYmvMD;ShnI`e#@$Vf7Tcg|5
    z=mR{o4m1v)xdZB-xJ>4hwdj5oMgAGbNE8oIC7S%}&V!-P%8xuE_Yp=6zfYx?OF6#)s6kC)U^Lj4$M__tv5oB#A6F2gI2q`};$tS=u=;uLlpGt7D0=QLg
    zn0Go{;ZtRn^sQ9N?9w%+1*;THy)()U+E`!|}{025KlsL^A6azV2zC)=bk}4gA8fEZejk
    z)7mpEt7|vAj@7W_pRr@v7A$Iac2;D9C|aiFnpVfK+-}S5I_(k)@_|V_GFuJ&pELx3
    zs{MzAZWc3Tg#HMI9E1#FSV!S)6UpBs^|u>#17Qt-o-Sgd)LVz!D8SiuW8Z=QF8pu8
    z|5hDi+XkA)GkVcYN}Ky{qglw=)Q#hC(7={|dO;d2u9fn3C@+_OoAfJkr{6vL?a=Rj
    zol)Q>S{;9F`gQ2nrQhbGMF!@rMjk?#R@-!%oAAZJ``N%2>E1Oww}3mLI5-G^DQ?qx
    zmD$k2hYxI)N@UYuP*imCfo~3cuT7K9|;WHuT>_6bV_y|a^}94f>#@IuMy
    zD3QR^Fi@t*t}F$U>3C5p3IaET|1KOq&c5&q_fiNGva7gL*ixH^8+Uy`HcKN+RVR)<
    z@fO(%0|)}zh>6#PMpuFy0`F|bL4U^F*^ehlCg#wNA#MTEZ9v@5BZL7W4?C*EgFRZkUwa^i0
    zeNQZF(eBMx+|n~o4o*M5J)o8Hg~^-c=Gpnt#lhwA={vzIs7zF#`xw2;;LS?fJp!?h
    zcW|jD(4(TJ1F9c(sY$1?4;!{{=V}T)S%S~EI0+e(AYo~lBzci;{UcVjYiw9(EW|u{
    zdjUm+qOIpsL95^&q&oO;d{Fp$Pl}H8fh1jRN2#g@GgxMQChieW{8!SKw3T^}COdHr
    zGRXFg)+xqYx)VF~Q1rZoF*LfRh8h#&lq7(+fpEhKchYU#nloS2C=F>Ai7iH(g7Ur?
    zUQU8k_#OAtX4opP*1rHJ&)Vne?EDgV_jSIZvK>%81+@jzzr$7InJ*YYsxw~RKonZ|
    zNk~J~ysgVCvGR|HDUmmf7gtoU3IvcMfMVJi08K6!K-$`CAjotc!5k4t4yNTOqxdpW
    z4r*=Zf*kG{{n;qtD^^dSEb9m;H`cI`k*aD^!tHOUehMPlcS5n
    z_Xnq!2d|Gm9AEy9+q7?wFHetpJ>%`!g>hhAAbCBaABN(yf{DW9dRS#ICur2
    z%XndY`L=;e2^uq-gmw~P&T3i5Fu(~sTp!3i;W11aDA_G?OgawQcxjj;+F1q;h$BOr
    zNi^DX!|c0w#ghy(HPn%Sn9o^PDvJ%-M!Xts-*GWkf)!sYA!%x0=C_pdZ5f&-@p=WQ
    za4!gqB#ov9-(!%9)6jnzp5!*TNreL?1#X}c1KnXuhahg?1-x*I77`>_A$_e}vI$TW
    z!GL7;8}hO?w$wR{0
    z)+;9XOvZP)UIuL+sfrO&dz+EhatP8Wg2F>RB!*-u3U%UP^nBcvO?_qJ2kn9yBfO3X
    zR4gL0jrW}oPJbs#b=JdqCi!v?L{JoL7TY8zyvIokqQL~OG-mva{M*wm4|Sb_g}DR^
    z1~z8`@Br07D!(Ak_5H6=BCmtl>H^pwY`4w)vUT-`d0jK<_sjOi?iYt{g>l151jM`y
    zWr~A)U!3pbxL04Y7kTqKie|gK;{!Gs9@^Nv&vT5;LnDNAVZ7CbTK
    z5GFyht@ykPXXz~$%v+$|-V11VeB|32h=3u?PnbzSSq%cngQ{{D;N#vO&?5-@z|+VQ
    z1ftrhK(&*h8h~)Wt={kBL;{-ghx;fd1KBGOzzB$E2@IwTOvbE&GbCUW1*`TtmGu
    zr`-J_3w%=*n4nCG69S%m;95}~b?ZQO6DF56P+a4UPpdf~=RkM){?)*bQ}o!T^NRv~
    zXCj@;kzFdkG%hk;fqa6JkQqke!nA%wooUi+0uCo_3;_Fz(DVQ>od}lPxRfTbvF{H&
    zT;2n&1>dZvWgv2Q-$Mn;1d@!Sdo<6Kdbbgh0X+EPyB>G^z^yI_bm*Ow+~MiP6QUz8
    zDCl2}`{-#1L8wApU~fSTtbT~)8b(_tSn?_$WaXfqVIjq
    zH%#m{K7sE{VcCNS-93a$ZY79R^82pLt3%k{YgveBm`v^V!vofcEY6C6KhD61Q`^oy
    z6G`P@6tkqMy(uWV7$Qv@j{P(X2C1(s9^y!o1;OUPyN9BEL{L;$*dM)Wnw@L)+G?wC
    z8*ebnSG0|K)!w_-u~5}SsDKG06fS(rVQV*w_$IFV6%GE2SE?zF0Q$Y^kFR|rHx3{;
    zze2^w>;=Q}<2)9K2F(YpD>-gxTXXCtmmlK?thSnhPLcF&BmY{FCf>8}jABGCUHahe8!D*2g|_8z
    zGeF2y116b5n~4`m&X}xn9O}%VDO!|;V`wIhCEYqhk*DdO^doaC5j|?3EKEaFCx_GN
    zpf3lQqT2XI=8KbC6j+-i#7rImGQsSo-MJmeknLnKjrgU;A3Ty1$6*U6uq|JdEc=9PisLLsV6u
    zBKhNAv|cv8O$VDf7c<{P88#`Elt;E;<&H-To64dt2s60PG#=x+-LK;kn?SalZ4!k*
    z@E@Y~GhtgdpxuYGONje^h_dgG0=^T1>vpoP8z9$dU$YH6v}j>`7dC;n>Gsgdwwn$p
    z4GF9-jWag$3rl?36r-x4X*yjHqayOQzP)GF9T$&u?0TmyFA4I7wUpSOBI^|dJ@W->
    zI^j}~1~-MWO7a_CY!g>??_>ZK*=vFoK|ne76my6^^6f0
    z;zvO{xKJ>o7!U*+3dB%+4)CSbnxsO7V&KT6k1dfkyU8RA+{oOyZu_Ec4+80eo;n_~
    z`Yr8tqZ?cmwz*`aRf{2-;GEZD7<-}(fEpK2PPt0qlo33j%D5;a%PkZpc4}s}t&wUK
    z@gUvi6t}7!rUN}Z_7#eDllzQVXcqLxX1ODf{b`9+S#qqN`xYG;(t?LuS_z=)C2JyG
    z2-PE6ZT*cz$2_zsa9;S#N9i~+0W^jp3DU(hh%!9V?%i%lDLVjO{<~0R0
    zkF&72@F8E-hRwj`?!FrQnO^UUu5a=*9JI1PO9a{v3Wqj8gey{gyeWB?qEX`Iz*wR1
    z#}7%6z1^_?QSQk-F$_^07J<1we>K@yOr(}pzrsw(&`KNoS{Nne?47z+NW--v(aC0L
    z@L%@6w6TdJY524G6&;~n`H206K$K@xU7o5P30EPFN=aOr+FV%u}_
    zA)lVg$*jAV7ddv5i`jRZ-i_=+WUk%3nhi_u3wrCY8>uk!GQkcL&lKNm2mRmVhcQm}
    z8@o$7+`YS3$dEc5e$GxpT)u^3_G*65?#`NNmwk%4di{c@0R2qo0C{n0!1I7t*1Y1G
    zKpv&#d?v6(4JYDmfBIx#U*K%uyy$(_K)8HlQ!gL8&(d6dO5nFk*^;k+G+-=iMJEUQ
    zJ<>Y?oh0o=MItHI|a*GNh^Qj5r{k}U(#!F=ha2jxmX#n(RDK*bK_*>3mK`o*kQSVFp>Ki|8z;3&dOn-L`K2s2!O*2l$%_
    zPJ`Ac$ty?+ZtuCKc6=JH%lRwYexNUu!?|7<8Nv08m^uiTkkd0_9we7^jt(@BACi=P
    z_0e*5RXlLz^^=a6%FdG+o^G3^pQ%EE&}5|Sd)>#ke2eaV1Aq)J
    zIys$19+(r&B?)_O(dD9Z62{_hjg^0Lt_fPF-Q1~opE~Q;7+^b2#zEpsqMFW1BLa_c
    zq8mcx$Je*uz%W-I(jP>A26g>K9nzzX>WexAg)|MYx2R?pT@#MqqnsxE^4f<=-Ep9zt%4sQlrAt$@)_YNl
    zuN|qSeDzyvE$6hiwJbNo?((7LuC1X9v4yp@mFn6`ZhKp+k8%oYtiuK=qWn1%j{5<%
    zxaPIE=9FE@DaPk>>8e!lTkeqjriVm%73jvjZ4G~WCt339(WPst0p;^l-W2dbD?1Bl
    zSfVFyu)N;NEeqe%s|X$ZYZRB8`cV(pU_Q!W7KOeANHR(WDbmZU
    zjJ$b;Ei)RJmn?ynNk;-+;UTA!#tdF}(HQEd;H+pkE7QYSS+b)Qc7{mbSLH@SJ5fx(
    zbG~EaafnM8r;F4C$YDMd4ZKe0W&L;ssnCO^2ZjoTJ-Q?U{NhpXc7r_1#?*;3o3Ra(
    zS6e$wG2?ya?*+#)biyeYWeDNb$Knf
    z;;BykA`w
    z5JfyXH_1R)eY;|-9oGrkbg;z3RGsPf$L}A}%R_pT=Q-;2S%0rSX#@W>Xvub%I`dAYrz1|i+5XvrQIp9=IN6tynP0GLPkzVvowjcarsG5^Cy
    z?;cBj^9bJ`uky#ot9REl8u8`T^@q}T@5?w6;A76C)Korlr;--Q+7j_!4<4->{)?oi
    z=-|NU7-^3QtIq1^1M{7CBJ{h&6!*;OU4IZyRSNRCn?GtVV9ZbwwZcyx(UvTlo$6ki
    z)4_eUQ{ng>6qt*yctN^_WJ7SuQ8-rXD?hq-ZI?{FQ8-MG(<*kQ
    zl+6sGS~08ER>A(JsEW0`Zr-knwVWCZ{4a){1)jtmGerFSB~<`F0knO^pdId$2&QNY
    z#TSi0`q>n$T_(g4;m?%P7|d!>kojHwS!)-ugvmK=o~#7NI?A-pV0|q=RtxKE533KB
    z$DGSX!|;7B=YXEcucl!hB%^7zaU@>6-&j3hQ{8-4lMvqKUq*XJ`u8*S3ukbgR_AkB
    z_%Y%SMiVN#$Z~yGLzH3O0mQ5dL)?pivn}f8AjTivPmB|1aIPB<`WLzKjFfv}GfG^*
    z0!Z@3A?XQE+HRrC{31dd7c6bm^U-S!(A{btMHTrxc!>itAv}(rDIE$DfCEG{C1v=IL>6e`v3&?}GV9LMCaa1Xjfr`5Wo>mGg9kiZ
    zU9GO=x0(^LjOGQ{KRJzk-eGg?
    z!D{sZoV*@BTCP48d3yi!vy1GjpJ@!_~$+SvrYu%8umuy9HOALnzvLQ7=ldWE|37B5Ez13XEnQEc+p|4ae8Rx
    z;T3v&%>fqS<&HeB*vH8Ip4&D7ml_e>w!A@E&kjo7^+xnC7cz^|9>}bvzR|ey4`2H6
    z*zye_j&APE()dn)HInTr*T3$y$^9%dL=QYQ`R!Q$taiL-)FVB@HiZYY)(U4)OG)Tl
    zx?$XW`K*$tzduknA-g=KxPcgbSdq5@iS$!|%6Jo}rQ0yFVQ>11_ZZ1Pt6H8!7gu>?
    z1zX*h$WL3%C9Ss{=hRBczhEP5z3toq-O3aG_IutA1(=2;eJ+(t6c3op=jLEN2+Uxr
    z>$h?VgZbFSy@`lK$YD{W(O1Fam=B_>q
    z^0pmXz*OR*{
    zTv)fid+sNB=X>J)EmA|H3eK$$vS)<8J-IH-@Y(9tCoeTK=)Ogry4)iGG4bs9+MxSj
    zNX7;DlZ$zzOXT(_S$#}O7psq#a)*@?gugQduBF6vVUcUUOtA8JC71OZqjfQpoGuse
    z<3`0SjWncXHla}1$rcNvBF-O@%xMR`9h;evYv&@Yac-sM%H_e*Lp+u}diW59`FRJN
    zw;K)zH&dWr
    zRw-h*nn#Sa)_8HXP%>9{U^q^l0t%7#onkfYJc1$WdE-u?thT3EgS!aEgNZQ6b_xD1
    zfUrIR!1e0m0y;qos_9k8imGEuTO7!`x%rY>p
    ztDkr6;gN5usc-iqpwB?DbATH{t}G#^C9_U(xX>Y9fiQ{{(r!kUgmkUPg3CwCEC_4i
    zQ=UW$KD#0*$9PJi8BX5KfcPQygwxd4hZ4VXY1NqIk1cs=$g@80U-tX+A1|-r|D=ef
    z{68NU8F`$Iev5|5D3g_Y??KD--2-6y%#@oXVfi97B=gEA^XxBug^1ho(()rzA}pM%
    zobvkgaGk5Xbe*rfv@mnE{vfYk@VR!?_NO!@R=FnATvo0{2v?6DzaJ|d6W_4*lfv|a-*~PKQ6BwbMyQ|bm
    z&*T_-X}!9FZn2lv)~ajl7u)rGW4t1U=u{%Ej3&RZ;-PY3KgnD*qYEKwUz)A*!<`-R-%
    z56Q^{2NUbvaG0-zWFybEw{(1(K%xhS!=lZ{->MWcm~ovW
    zZWnbCk_$FVb_|+56J|1Y$URyDFP&kEZ_7Zd@dnMgtSnkbSnkfyD>5d-%H<(blC90~
    zUsz3M;K(dR+}p3Nle?Iu$2Pb!B`+^M$b%!TXT47l!BoY}mRW|DEhPz2^D`ZF@!yb%S|)vZX`*j`&ye
    zeJ&oKl$Vby8>TqCdo4Y#q++5-{1RjROC!Gih}ePURp9zXqeNfi8-E_UY5itkpoSSRlk0#$o~#!PaOk%)>IL-BK9?*q6a0MB_3dwsqCR&i
    z(NBEwDOKPu&CQF?93PC%b!(75Cpc6^&@(|(9hb5oUSqhivtcb
    zYQ@R5z+x>ddTCutWkEb*?`^=DrN%0+LGPUwb)&(!c6zYF_wQo^!)<}xH|J23B=@Nqz;_PlSM%&4eEty%+pbp
    zgpj?DhJpZ^toC&WjD|r9LdplDXx#H7#=0{fS>+yMyQSNZa1ECNp&xX*noO{hNNxbU
    zgrm$Dvs#akZi;Ry^U-~89@rD4pm94&(m;qw=muP}t-Id4Ugw{O1UzJXHi6(Ic=bWp
    z4cR+!7$DowfvG`%ZI_{X`TFokZSOr(J9}!r>aZ3m$HsNL?V@u{+HngUy+I0{HMRXb
    z8PZb$2EcJn`2!ughH;tCd6F)nOQkyP&vVZEWcK|0-5hd!l!70fI~eWBk?je*J>i
    zz+j~tUXm2$+8GD{GGQPf$49El8wTGOs$rk}&z6UphJPB%J3U-tr;RI1mJ4U*Wqkrz
    z&h$~Zl+}-}vqqs7ruqC%zNK|n^+AFaY@Do~z70-i%V8tw)pj44r$L;AmJgK=ZU>jw
    zIfmQH%EPLT)?N!*k>jW_aQ!r*6Cu}$C%-$0deiA(pc9w3+z=rPq?fFyIp^NiRRv!$awhkK08ZXpxbR{QX7|-A3`{Y&483qrOk&87
    zKXT0v>VzKrIM3&}hbxa6gC0E4LPpL}a5^v(KkT2`wzx9c8t~#nU<|$TtL~hxv0QWI
    z;kpjXHzR>L$nkNDoKl_vEmc%@u*U6%M`L%6Sek?`-Z}FpR46AAzz~CJ+D2~{X1;Q6
    zO>5`YQrfvG4O~ROfroqp7xmr;ZW_Kh7@-Ae`anqo^^mN*7M53+A6Hl8WHb-h9}jw_
    z2h18S*R3u$I$&ZAPoDsp+9*R3b|YsAjf~Jk&#?HKnBzHjd>5=;o39#q`CdYQp;lyO
    z^fWwUCs?7HM{$e^)-fagEi5*lz@9a?c6z=A$}j_Ct}?fed{&Z+LqzuKU(H6tE+$n
    z4_!aTu8ICU8mnv1%C6D8eRmAt0maTub$Gt#ihzotfzR^V%A@M)W4$=Xn)jHsHP32J
    zbJSCL%r?}?ZscZM#CcVAld=tFGtZnv2V`;{F)(_NoG3oY$;xUSl3l;#Y!6tsb{TFd
    z)No|PQSKcPg44dKDN&J`nadEE+Cf94=9(LyVeXarb)APja7dMqg(OZs
    z7`8;SQ24OugJEkg2TYU&V^up$R~|0`P9wMVU};_7&R}ttwE5*(%SWaan{lc8!eStM
    z>hzl?H@UX`nu9DFDrx~rC;TjqN`Y-eR!}8PGTcgWJMx8G`q1cCE_aT$eL-e?jS~r5
    z10IP|^JHyv-3is_mR1Hoj40b?za`INL1{Z8X9zO&Il3ykv+TzF7Un>uWKksUi)9A8
    zSTY)s+9`TYaXP$8tfc?IP=$EokRL=4QpN`=gbWg=aJjbpP^~O)Jb1jZx_XN^g#uy9
    zFoml~6RK;E9%KR);)UxAipmP}FcM$(>}CNNGg$v^3=nIkjKi%BLX4P#_bxb13B@dY
    zVZzh}qhXAZgIZ+dJL0G=61UErY*y;atBT_!W}`H@Q4XhyarnZGk%wWSbeue>=fPtP
    z&BBoo-KsF0(i&I7e7TlfK%3!=k2hT$w@K;5;*vNlPeb)I9u2fx+hIg!
    z>FA8ZI@NlrRQ~XPhd=2kqzg$n{8Yj))3afB)Im&0F6NXI19#gdDrLaF?>(x)mrAY%YL
    zIY8uq#fEXju)`F<2|E8QN;t$cMRo*~9bp_uC`EqERP9_<49p4;4*0DAz3TWqf4Z65
    zb$G&%-2FI#!)S5m-E8+3FlODe*PFXrn}^$tWehPzMh5zmVpnP}|9(h=g>!Q#b_k;$
    zLb}2bY5*(2DXP;P&8pd#n>)LW^`$40318n_4=2cJ@r1hfL4_?1hu{QGc||)d9``;)4hdPhs%vh
    zSyk|9rBV5TpVk_c1$@F<_I3|dZv=DKYf%6y@-CM&fdpZF6l!R9bMFQH^Lq2ew%Xll
    zZa#ZE
    zdUyz63E0d1z3rpTga5^6jKoX7uU~E->}=uVtIb#22L{g3_U`tppP&T2?7ZB@xL25l
    z(}csZaQ#Fu>mRCgGK)K(Ds$HwTLv5C%N$MD3C6V7Gp5w|BDC6M7L~Ho;3VT@>R?Inxf3P;SPd%>W$z`faGn@oaEBR~d^+n7M)fc!)$_Jv_p((AB8L40__)
    zq9H21IkDMfC{zPJFP6M|b*6@X@ai|I8C>2&z!JkfybfEVVZdt&N?};ZvQt{ZOMYb3
    zreT3*;5QhX`urlsm|A>?|IHuIEzXxK>i8qewBP7lZ;odd7mw$PlDw2U9olHv>p1Lw
    zcyZ_-a$3@Wk3838iLm%Q%rUfP@qYq=NHj$?>pUI-2Z)$3`dt&*Ej#D=)Akz
    zM@K-p8^0PMn3Ia1viNz&ZKTPUf6qZh?49)U6q&*F9EXr;HS4PfX@Khq`a@VPO2PVpq|zU2t1b$m%2613z5I)Zvw
    zXE?;b3IeQ4)J$a6&_R3(H2wyM_6ijk2O|o@c>*lx*8aJQSq`;=yXqX>>eJ9rurm=otwq@w6(wYeCI{;@TYBH
    ztQfT_l{wR$+v5+CsZ^H5Q8LK+{NyhacqPfqdyrNq_UUBcg96d&6+1`U@de8hQ$F
    zK1>gs56MN%MtY8PCMoIWwMk(MDt41f%
    z>pbohS)Pvi$a&gzUWLtU=iC1T7YCAl2!R4lC=QP^@TZBF6Ns
    z03%od6b8;>2z45~OA6R&igcyKYK(u4gzDHMW3mr#easv!e)835NA$m~JzTc8fqPr(2~GXfzPodbV~A{pYM8x?NN
    zt6SgO?a1nEuZp@ab7aMxGyrEIJ};fML0zz6&~YsPfyTcU6V4t4M|kTyBE21Qstc
    z6P*w}aS~3Exl1(Y$)OU|`l2^N40s#+jlOzE30ukpLw)Y;1bnrR@!Sanj?uk^Pt0x8
    z`r%uF5|U^bg5ws(MaM78)s^b%NtKgpJtY~uRN)rpTl3Xg54g?kt)KRrdky~GY5;~;
    z`1z<&nW+drhq>pKGPwb^_6e0jmJoEGMkgm)7Py#@C+Np!Y84
    zs@EAxn4rgejCq0!!STF80qC&;!&!EEO*mq=`l{AX9UV;~jbBA`tR%UGPt%U42Gi+z
    zGwj!kfTx;an$YfhWFc#PSd2wgQkG^P54^fk9=6EbuuElPHPwbf3i^_mJmzxY9kiw
    z?33B^-js3spsv4}uhn4DbxwoU`x?^lIVPP4VK+wM3viaC#e+NQ@1s~e>d&(D;0l7a@43#9x^PW
    z)ZtC7){AR{5GjPagFK6pRxn_Ebh4tK0q
    z)FZ~b9k)hZyh29ihs<@m!3|1LI^h{CvdfUJB{uvzPG-wAHkIR{e@>-4fXW;A>{j@{
    zXqpJXxe#r7-x;V$sHcpS1;${990Y#I=J4DWz&|GCqJtiZZT)+pNf%qh6gmKvo
    z)%V|T?>|S-^uzoZ>P~QdEH(b=Rqgc~l3>s&#j?FXz)+6_dj=gvMMKy$pnoy5x5=;_
    zGf9DVGlfE00|X*POE^tvh)Y7GRAa*&$N9q(<&OsmWC*GC2)N*}<4t^PGV#wRR`;1b
    zHai3iT?adb5BdVMN?&76r4uX-1DqM~j2-gHAR1~pP^(KqJ3O_i2TQ-x1XuWV#eZE+
    zrJ6UwFKl~-MMuotz+k{IjjqyNse7uO8#^N~(u(`xxTotJh?2jG1V&FJ!NFQ-Y5j>G%<5g58(N}U>+*&Gs
    zz#ld935JN|uF+WnU*Th^K-9}i&Alm5B-|afPVJIGbk|3QGRo|zDOwWfek=zqWO7j@
    z*F|NETBh_A=%tEL%z&91&D58onr;n@r>?y;VQJ}E(Nj_4sdA_*K|!MJ??3i>1kYPS
    zSx6WJe~X9)10ijnxb)n?DkQVFXvwsL`b9Kh#$N^n7(SDKg~WwY*GD$DDav4H0
    z-QUtQ6ZtQnzdy^g-Fi&vI`BRoJx@b@V~}(qGi-nioOtn>{vf5XNH_b1@Ju?MMF{`LDc963GF(-w|An`
    zArNPEHi)}qR&Zf;<59Ah48x$UB}7yPy_(5=k0>+aQJiE1s49(ON0Jbgx%m!*$FibE
    znq$breur-$V5#*&LZ;kBBQiG9&VR-SoMhu(4Okc8n);2j_T&Z33hD9T1K)u4*oPaN
    z5hQB%@aKco`bt&pq800$8id2qphvt{d_GE8%)wVwRRjdn%CgDxaF~#q4va5~Vxa|6
    z2T&tZ-N%oTz1H)O$$UOq{+%=v2{G4y`0FywG|7fNZFyvM@845UhaBpffbeJ0b%V|?
    z9kg7*0olZm)@`<>PiV?5(^Zdp8`Mhv(gehaPk+C5N4n=cOWVe{|X`gx+f5}jXNN8M4^u@pzKTS9m7qajkSKy$lz`>4fnbrvT@i50ge
    zA32%FnGxjpr8+l
    zixx>-0MQ8tY|lgbZ%9HCUPV!_)fu(JM0cxEItC!}Rehff+fiJ<_yND2sh>7~hLQZ=
    z!zQZHA2xp?5u(X@lPt0iN6L;Gyl1Imhew-7Ii+yDX9^u2J=<#jw7vO^lx^J-!#2ze
    z=l8xs4+IMB7$n`~s*j%S?mXp+3*hLAGp#1Hkv5;H@7z}5{TyX_x&3ng;D6KbyRbS2
    zH!1jT^~7uBj}_IL8DJ_=FuXf^M|qP1M+A3HvI7Id3r4+dSG-TmSol=J*#qKT1#E
    z=GN~1*5wc>^_PpqbHk+W>}{vN=49NWtzT_zDS6s`
    zCSP8?;s+iB$gurpd;86i+JE{#`15T0)w7)g>Z)Fu_{=Qq=1WL!9v!^imdEFtyNB}p
    z6ej9$ck}Qks1#mb?my!J!~Lfn_P4gUod1c-@9s4jRi#lfAgE2SjjIy-cC^30i@(rJ
    z=**EkRU86ACZvr@h5ZN{rYvM0(psM4&H5=Y2z|}1(MA>xHCL)%#llpSB}9&I!I0pL
    zZi|oR@aog|~;qyVUR1Xt_1^_V>2$)mj1U)67TI#YDGG
    z-|$k|B-w+UORfY2E=_(^y|~FbZ;gBCtpFNk69!>x#67&H-13InxgR-_EjgiCd-O=V
    zH%Oo@yGCuYP{+N9t`AZoM8I3;TR<88hP6RjH&*@OdPLQz67_Ik9Njr
    zE)u@2r~BVg56+Spdx3P`@D?JW`@0fek?8gB4b|dV923Vw8l#Xn^k$c2w+NmTmlB?|
    zQ?_hF#U>XPLIH%*3=`==p^ItK#o#%oHor#8xIxguI~#kL>q9L)42O&Afq3^=MdMXC
    z&xONQ9a;wc30keNPdBpN`aRio8kO<~rwyNwn+McS3Q`kJwp&ytha^=bNCtUgeXzVF
    zzMy0S!cw{begcrZCAkUkrNXDa^dcl@+jf)z_07ShCI=VgoLg$+&n>ktIJMNWXNct$
    zv|7@Sirc(0s9=RFdfJMv<(
    z2bOyD>6+zBC?7FNjpMSZzQhi4A6FkdhFMuz!e5*g{L_jS_gEUC&|eGbpOl>PsD%RG
    zYx4~>*P+kQOrtvDWHgt7Z)?q<_K(fl|B=gx28Jb4>XtLjtd*LB+*{L0^d-T
    z>$kr)030h6qq8|4)J=oqbelOC2EC!$x;gKST&sCQSramQ!X@60g7Y4%P;>!Levk_L
    zuXU2_XL1ye_1A=j`v|9|^rLyw5Ar+5!>?ycilHkD1FtdfKy+W6XZvWL8ahOS6x1Do
    zQ7swmC`q$PR5e#lydA;vp7ewKN+qTPlvjiIz6wjJ`$pTb)_aX`q+GeQ}=c
    zqj}N~W}qELA$PQ$bbqkv8n{;D^=8LsYc5mH0=KzC;Mz4&69qR-_&qx5Hi;C
    zD&5U{b6=ci`{)jOJ1_&LVdajNPRzs0HoJzXNd@}Nt}JmEp}pc5%Jb2N$F9xmavb?B
    zQ!<~7+G3WJ@>S+R_#3LDF-vL~8MGl_#aP}DJ@r`Jirp(s+@frgr76zNU^a&4yT!%x
    z%8A~_#8sHK!Z3u}7-Bf!Hh}tagX9CXq(mO?9Wx7t2^(ASkfz<Wn&ZxCC#iVUM(%
    zNp>jNKQ(%>on>c~B^`&kRG)wQYt2^-E~#7%sshWCygquvFr6jk_@1jw*B7!~cK}Go
    z8HYJtP*}g*5`(1}Ah3LD)aP%B%>n`~iyH6#Xnb}!oj*H17qNEuN8H_iGDhd{ZwpS>
    zix^v?=f($FWwCNBf0fGOdFh1r7lPu#xCu4OBkb)YdQ!2~RUFDvv`i@W!l
    zuc=)AtM}%`r_K#+La46MRYx*?AW-#wVvFHVIN1DT=6pFV5
    z8XD`2LQ-%Zk_lfNv)VI@HjIw6=yGl@zJ8-t>&ptAF$w8G)pCVO<+axcWy3j|y_MFy
    zQ*TiK_3mD6pFeDJK%W9N3rhObogUTw<_m$N}5<+9YzcXqdBsWR(H
    z)O`>p8aig+QZ%laKdswtM}l+r;+hzTx_|9hIcB5rXox}uk~4Ct-$xM!^RCrc5ayTS
    zs*X?S-i9H8^}ww$@&e8+XWRAJk+Ah+(EnzyH@nq;u3
    z((hI)Cu9_7JAdRY#~Qp*6`19%)Pv$B0g&WEU~L2yw7XGnETF_fa^!9fFcGwl1tKK{
    zjy{X{Ey4g*HNHPDnnyZpG3>Deshf_MReBW69hO_ItrKYsFmBq_r&E&w7Y=m?{97;$
    zkQ@{;_jXr3XvJMU_U=ua>4H<`6deHO(#~WKQpKmlqPF5Tx$Eat@a_i08n=R)Xfwt_?&kax
    z>1o{bLm~bwd3*YLXZM*?jUB@?edjAKGCAj4`f2>Me|RKgOE*jS?lsqkL&Mg>Y
    zaU}%~!*jAtdEehQpds&62GCphjI5k=jhH>Tq}D}flQB2fIR$`|&}IBqyXBk~yOr4X
    zUf0ZRnzL-)m=-e)z_YR?n^?+Tx!GcGglyg9lrkumzQ8~hD|J%lW0xLFnl)~|VODKy
    z!wmz&KNGXHqVVTq8D$DDG-pne_7<1eS_eR5FmGTu&-PKCE(Y^?;N+_GGW1|34ov%O
    zALZ#H$%UC*pzfrP)A}*!HI&WawNAqOPNR*y?II>`K
    z&qj`l%13Wo^IyF;_r)IL_=9~kPx>Jx8+NLa{yN*?e5y6+52<(m)jeGDCpX=BwvT2Y
    zohoyO(@D=CPFC~zXg6i&**=;l{g4?PE^9`H_xE`hu=nP^IM4Rc=^>Xc=pHBL^-WZq
    zJ{lg%KANXgHzc3*LO8E^2Za0LJe$T!uH3dtT0v8_BG*TcdG}wvH}}Qj4}Y+a<|*4#
    zU4`wfJ~7OvT9N*cdiP&lZ01jHy7TM~ny#p5;BfA!wn
    z7ZG1!gs|nuYGHkK34cX==DmwNYKvmo4b=h;4*Cp$@A%k$^S
    z%aS)$qD}bG@bC7~Jn0Ad<)0MxN@2lVISR}>aNQT@**=;l{a`vO0CIaMX?b1ioiVRq
    zf5(dJkRdzky8^qjJ}_DiJR=_>Xt{6hi}Q?ONtJy!Ps9{tKjTAB8f(?JjOrcfCd)tYQ?sh4lyPI+`BF@beCpJQb6^Wk0zHZa=5|jftaf9uPV7xk0
    zNtvE_>4hnpsy=#*G3VAFuT=H5Sx$*mulZ}*6Jz{$1Xi`{F#i
    zAN@SuoBQHCr=XY=JLvuuLjKtMd2**9(xc@(r066iX)KED5O|NaVfZ<}
    zIhc~$h=Dm)rXS6devsdE69?|8QKabe4n+6GdA5({$#!H=eEO5L+|F2ICjwaT>bhZo2bqAI*~;R$F)e(AxC8;T20O
    z1e$&{Px?WA`6nell)`BNqGvoN!zXh4d8bnM#d)@m=1D)8{tJNIzPq*O_Wlxqi6sfa
    z%|6>l^CSqOEl@lS41KvSc~j5!(L8B|5?>XJec|euak=s7N_leaTUU<{Kc^(g+D2)^
    z4iw!L@X+(4GyQyjGG3LB3Kc8zSr|o%d<5W+P~(%P+?5)ifU^p2@?nA+Us~5rO5Lrl
    zo!b@)aQUpLx#24`u2Wia`lm)+<)RGR#IMtch+>O|aaoeKod;6+-k}$h
    z9IBz&T=v`x@8gWfYva&?f`p@wbFofG3R+@>9PH$LCs}lx2cGaPwR@AauQOgeyEJnHLgvKZ!mLS|4
    zn6iYf-Fj_|IuP~xqal7+nQ3SPP>blYz{kWd$^}12&rz*u50dqc3?4>On*evLCnHGdt
    z(01bUdo}A;k;UKWnePTiNKdOcowIH~YUGW{rl31IO-4~5FmYxvdjVC?!<0Ol4fa5IBU88|czR4sYqm;aUGs
    zIPLlS9)2nnWslhy4W(ehOyB@F
    zN~iUkLKj=uhgwaVv!Rl0P1vsxPCQ^+qEP{-kC~ZnI1E}kgmc1vJIt&$u}lL<63-93ea3Wti4(759Rc!-
    z+#;C_!^og;{6Ucl_b_6EJ@tkDnZWfBeJokMEdy%i;u$qW?`*WMo;kW89cb
    zQPNC_EQY&T=6{Bzon|j!S?=u~s@^C{f?kV6M)%b|S^0!yl9tfA+Ct(QbkGKfQaGF^
    zq;=7YE-v)bkV=et7~ztfoT4`*gr*%GQIJiHgedzldBma}UWN7Zy4u~`d(qfZvyhKm
    zh8}M1&()bjxJLT0yVZQTeR#O}V*8L>@xVrv=r9`?pqE^#(zP`@l7a%b-eFuuY(;Vc
    z&8vJz9gcgoEd;kkp4%h~c|>NPy~z0So?myj>JQjLi8_Okacz7XZu%2@?7$CCgokzk
    zY&AD`cTI#G2LL4?2n~QfJjnr|#~>eyPW3_QuX*rj5KOPq@Fq_X)-+2PRdEs)B4*|O&M7UX)W>~iH2d2I}A=b&bR@nOw6
    zPIfXmjmSjxPJ8wxH{)Z^N;_wCT)GN+Lmnzwrux)GhnA|uM-=G^yIDq{P&(jBEu#vH
    zryUNN=FqHr>1Z|=vWGM6lGo4~C-7FPn;c}?8J=;S2ENzvs7)kEpDOAXD!`aviP}HZ
    z@kTi;FEGvLLyQ&NjfNr`A^(?n1`e-VA-WE(;b~=XmUCLEUl2dC^G3D$ee@0v>mN`Q
    z%Xa%iHi;pZQ)FdL%moH_HEb&yTw@5-00RMHd+NgH{@_-Djs?-bx7H2=j57y07j-c7
    zxS!KWt|3O|ofWWH=9ECAw@K}%or1j->u|4HVqFEa?ogN(PH{IF97;U}%t>Qt!JhUu
    zE&pt@9}
    zyyP$?c$@DY#p3gid=UG~;@e*r-{F7r<-h!eZ!%2KbyKz^A=kO6Mh*?QE{8r-(QI3S
    z2cskWloRuh99oiOC2z=4{su;Cm_;$k;=ALy#l?BkqQ&`gMIC=+2G`BJxOhB=If_$@
    z3SyXColsXSHK{=D_&wcD8ZR#GhO%D#)oJeW;<3|UcrGt~PzkhPdGU$*T_lUZol_yq
    z%nh&4Ps}y}&|DFSWD!#8_>J%B990>apnHyF?>h_;B>1^l_E&}L6i}el`Ictw;ac^<
    z^151h^yp#r;nE6S(;%I^9ay{P=d6c}^kI^e5mz8Bd&f%G={1|@=86@y6yvjMkhPr$
    z7x^0ePXD?=!yyPdK--%k$kQm?&?}{X|KxxBh
    z7~@4iOJZqDa?CzmJu0OASMD5bJF+@wyJSM2FXMFzH%gL|4fM5Wh1Aq^3NS?OcM;Bx
    zkBjaN?Q9Bb<_e~Bn!67>zkV-*w5N!?4rMcarM_uInx;p%)(E>;h=9#thkyvk>EshR
    z)Ehh)$YRq4yt@PLKqn^O(xfgZJB{+oaPE2ptOrp{uW_$w791C>%>Y
    zeqt6Z&?&eudN?ulRXE-mjyr~yn&$c^wM6w?cncH{%s{^B+^m=B0$=4c9Zs{EAph=4
    z;^`oho0X1vsWSoM_~mVY=HxDbi`gs}Cot^?znxA-0q34mY`s$f%;wF9iJ9D^kAQSP
    z`K|Oa3rzp)WNV)qa9;i**qCu^OTcYy`K^NlDYv!dLe4E<)BG~@k(?3hLiCcVi8JVu
    z^yWbw2f)vhg@K9Ux?Ld1o8JbVMF7aFTf+n(sa!d5sF~tCUUx=bQ{$mC>E6h@*WXEi
    z()sdWNd^le(+;Ot3Tj>Bd1oKjpyGi#H3rOz|S5inREp%nJceo6QzHVluMCrmhA(
    zqr)S3j%jhsG7d}dz2g?(6@6K*u2fg&U@Jc#gniX=uHNm+!MmhjKpvic26P$(>hR}-
    zH7?P?5XP#8vX|f{QRf%IKcc_2f~a2~jE3iU9~8Dnb>XtO5w)I@W~AGI>_oCy>n&dQ
    z7Il-Zd%10*Gj*>)7}0<+s*pgYQJJauXBNs;W6WuA9?gmAOfI0~Rz+vR1uP!)%1i3)
    z{woam@ec2j-~POL(D-?C_w_cuqTbL^to_IXb&3XYk0hWrRKYBY%d2W@t137R<>sm)
    z5+Qj;SK*Fn0K@6~Fbo0FJMk5VS$2Hz(UOU6R5n-&XQPhmvmctIqq(un$40#1hzVL2
    z<9hp}<@fXULE{7$w*+%J(bvITKDg)Py#v!f3bwRVsWFV5$%l
    z)-ZAF&N;+mBoc&_lLQO9!W*vo-*`llA0cDFpcyABPY0x^!!EYvCd9&zPm`@Pvk-W%5);wR2&foNIA3b=!+ehbbY7dYe
    zxO@+g>Q;^(VFV6&jZ;WQO+-?T9VfbUG=3Qu^87gxw_nqDy?9uoOJr#Y9saP%0FJ#p
    z5>SDa_VHNI6syYTI(=ksj|Ktg;&&mf>S_*K*1GW%Ikh8ZLfu>_t*nScZl-S|F
    z`a7HwWvcm;LzHx6*PAd^7FTe~FH4`MD2ws`YJ%tj0e93c#tB2L!1UDinTDjtQDSBz
    zv3{>uI{dl7g
    zwRuy~ea95gCC+=J8cdc$(~<-zGO;XMRu5!^N)RvhUaL;qjD9b6;Phdty}uz|o>TBW
    zHamE=v$cr33;fE4XE6dZodWAdWQ}D`XPps-Zid;&J?7HXY;D=@w@
    zCpf1;&_WUXL(z&(tFqErZTEXL)q<_-2b3wGZVl;>dOn>4eX`Jh&`YD5ZdC^iBx;uy
    z%V4_}w-y#?YvMC)oNB|)_nL^L+mWtV$7ZHDcLl9*VM$AzF?3sjlku84+{BB8=pYm+
    z#9hP@o|(E(IcjIS@;TN4p$OCqtXNM+EjxbX$5-zsD7*4o(=7RHJ+
    z%}LvnYjU){K`7B2Dcm4xylBBGYW3=qJRjM$Rz*MV)6G=>s!fWWa^=Sgyowbq1z4yp63%
    zYoKQVE~fI~Xqi!4Fbd{w!BpS8g+w<6?w3#XR8MnqWcuubOjSQ|2&QR}J0N3gTPy@{
    z`;l^xl^@eXV-hkW;uO8rSmajecD?}cV!FiV;YDhB7WUdE=HkNV_I_*=(kL))B+@0l
    z(NLmYY&Kbbzpu8CQKsDv&%$01ohK|!yowU^>SMysCc_)HQsZ3dedEkQkwu#eiu$_;
    z?gjd}OreYm3uZ45^j0&W*3YW(vumqkwA7Dm12r~Z)Em>Vz_GWHmSi{90{!=1to&;t
    z_XZ?N91g~@*40jX05{l#miRnUCSwIE7C#io9$3*DJvk9qW)kHN#&$F#!P<)ZHv>A7
    z&Th@Am8GRs^?VS9>M%YVULnu&JRSiXjBT%~ogUgX&_%i(9nlFx!$~ZdNI|Nz5Z1kg
    zbC^;zup#w$lq`h?7zO%<<_hJ)yIBxZah=e(iF)rJ9Arr$V%V&CalcP?O$
    zfB5SI=Vs(fj64^<+{hDVac4+M;yPd!)Wb+*G}!TK)N|p5hu%$Xt-ex!@EDlNo!+HZ
    zIrr=iuryJcGT!5s|K{8iEqves!NE9uy|?*t8<>^*fZ+0{?%$^muYmVLoUQ8*eh#)&
    zA)W4qI+-;uaAX+KL#>z6<0IyB`FCI|B}11=>X)?EA1|#@?|m=6>e)gAx6ok9LWx@_
    znX=HOTj+99p?eD?sKyxZQlwAiGhZhGax=4xm%zAReGvGU+a4@}mka*c+(5&mEF|-n
    z(=y!^0$O|T0!$_4!7Ts?=zJMoFT%c-+$1E#Hvlt9lg19QkU(U+tdqv{xM(u;O-jxf
    zN>UNfF=H4fo$xa3xByd0Q;s1cMucQO%xR%cDrjN`AQ1|o3#^$GjINt>?5+8N27PSO
    zO8xb^^9cXXXd0jCJ#SHDsI}xGrQD+H(!7!WE(My&1s_!;p94tMTB3zaa#dD{DXzMH
    zS5?<@tHzB8HA;iau(|X6uu+D8o+x^HwR!YY^Kkps=E3IC{()G1CuUGFS=;SXeg_PG
    zb7TSu^ABixLyvs$XO0BHY$%;a>}YFgnS%6XDnA{bxq~zA`pTMzVhX${@ZDk9ttQ9iLb;EQ`E20UTdn|
    zuqj}olo6bmr(LAWlkj#lK!Y_(tV+!R+k663*wd_-#RIBtt*(y5O%Sx6uX_Y?s$mbN
    zXxMNJC^k=3dbmkJNZh7S`?d3{kaZ=JQNQ0I$iy_NvNZ|@2&A5ZRl%Z)duXYH9={-o
    z&$yTu_$<*Z$0yxxSfgl$1E1#cKVYixSAUXM{fYe-jCE>uXTF%IDn9OiLS7s9kqp~S
    zqxaI-s)~^&-rU-S%O*@JuHzI0
    z4eR&e=2Ix`BnI=s>B|rS8mPqHftO0CFG&zZ1+bQG!h^>THdHYH#SUN`mfN!BTj;R}
    ziFlG_%sCgd)Aj6x&w^OKJ+DTlIpgEQMKh&L8g1bY$df5%hnDDxoeP9A<$O?4>)PrG
    z-7=8_2Ti*GBMY5@SsxniAV|kJ4bjxWSBsoPe5dIh;+`{>Co(nxuYgROb%dppu2cH9E#R7?w&jGMX06e`{Dz9<40Q-e9+z$WOm)9Nq
    z&jCRz0Nr_cp2+ykAhVk|B|4}4dHcZ$8EyO=V-UwQZ+et*VV{`ZIcQ@XsNVu{1d5M3
    zw*$1|0~qL6Wd81|2e}78t8O@WAa68mU9~YQ{efvc-dtM7(vjZAld#VZ
    z$R0G`!}vFQX#R5+kceL771%^Pm@caoeX@2vv!Qfd1n=geYH)5mWaYRvBiF;^hb-4G
    z8PEZ(HDO$7eO?qID*ExZafsw>E4!gKwh2$m#COdBE=P
    z&KYS<*h!~s8a3y$C`X@6s1v7bCaQ=2m=l?R9d^%&Z$hidke=a^9uoY^o4yiYvYA1^
    zX_Z=VGZy9OQNGpWvNtt*IJum~VyV51o6?J4nW<40uK+7xTnFeZoOgsyD9#l6R{4k3
    zT7a0r3e{iIONXxj`CpXl0SU(wd3N|del&j5vZ>-h?K|?HhFL%4Ej;6tEt^KZ5ysTN
    zJhuMjY3g4dQ$HQ`NI&Nn@^pkI!Glqs9Gnd3G+1d@6?yX=^`RYI0Ar%Zvy2Px^U!n{
    zf!JF@*3c3^YPf5Y-#)#q!sd7-=5e%JCSoEyAShQPKjfUS_rcohCfFQuKQ%h<+|ZV3
    zE{C-vP~6rOp-;oed)3;;JlGq7(N?
    z3%!L^sKMwG85+Qzk#U5Ys1Q8@2K7hQv^zu@7K~)<42QP3wzt;gyo@!M$u=5Yt7I%c_X9!JEn?Acjs4J%$(uTRW@X47zH7&LnblGQn%E|aL4q<$M
    zyP`FVLYQD6Mw)G-4Kl&Ess_y475VzdQ5Kh{^jy*)dlWPUs9Scuq%BLhJw&@wDxVX^
    zDm6|7A%BcA4`;qfLca=l)ZjCU$H4&r&u^IW9E;o_}o
    zNqdLCueRCZMC?Ha3Hbw}y}5MWYL&>FVnlLzb_n4bJF!|g?n3o@HC*uRQMY@epxhJe
    zI09;vR|XpRR)x0Q%E_@f
    zVNH7nk%rC^ZEVk_nkDW6JjC4Ea$tCMH7F4%@vgZ0q`MGLNuNAESipG235){%sF_bC
    z8c4eCjLwkHg6}21H!W?Hq&gaPNW&{m_AupNOY1E9{#p5Vp61T9C3mKNlnr}RtOwkW
    zYmw?NB8^Vs+h2bnCyuAhTdZKcRBhoRY5$nDOQ*8MU(1VtGmfj$oYkddb=8E;G!x^@
    zhAbldk0#n1h>~-+oIw#^yn_hhBbS$sA)+{0bKs6c!05b(4y1v5Tq+Eb0c;rZD4bV0
    z#VomX+=$`zLD^x7C>P&g!2`vS;E)j#D}rk+^w`Qz5rbg*Sh4k07^EPTb
    zi!9Xgs#<>VMD`-);!GY6DZ|geh2(lOt2l$84-gi>lIKY1AL+RpOEEu_V15;P`S=^X
    zETETE7aL%PZM2p9Gmz1=-O!?)F4)aU6>8KvU2L^dp^S2RgtnKp8Dpm;8Fg5o%!p?Q
    zwi88Y9Px7nL|y~ZUP!!EnktD$w`2xHbW9qQ;*>a$sLeuIqza0Xy0}NWqgYpAS-eGdUpT%jbhU
    zJUZCfd*MLj51$Y4>FXB<+pqQyjvScgTMDct`s7xXke{9PQcR5w`MMiwnFYIYJwt54
    zn;pDxsS6r>kw4%Cf9ucs174WMA26{nci<1$T2_1=x4g>nllzDBvQv5HU6{f%FAY%2
    zA#Qnh2QMu*)MQ`1%-s5X@KmMNpNP;#U+pe_REw2#BQ@`w=MH#*ayUGgsh`img1wpUW~oSTOx2-7tEiX1yP4|e>q--)t8(ljXFFQGS@~b#I4~7cZxY$
    zE5N|9^OAPVLiB)xv^WD=(4xsCD(g~q9BInUZAcQ|sMKD!Le53YM&aa*8GO^LUqW61!JAclj0b**8d
    zLE2jr@;CB6><`VE0722EiKuc=O&Cyx?&DHQ7$QMF@$XgSl2_k2;HDC=m*nHww;brb
    zxm0_MN<-usxjv8DOa01;-Ym7$IqtM6!?CP31VQ(YQ12&9aWeyNZ8ML}iC|HnUCM_`
    zy)UIf+X6+o&HcYLyIQubGMJ0s&6P|M(unRXyBLI8Dr8ki(UxNQDt)M!Q|KVPr0E`v
    zdbyZ&2QXLkx@3x)!i)`b8B|4V_`E)n0zVDcm-K1^l&SkMm%T-E*k(IoI_Q)|6+<#-
    zrtd$V%v%>h?;L#xN9Zgv-S~|u$6!iGG!BIgq&>PDN*KEhrMwR3v}00%N!4j%5h?DD
    zW`1?!3vhLL6Ku6X+<2q7S-wK`r5ws>Z_!!2>+O~$XPtX7@lv``(l&c_d`FsF`u@$)
    z;4;H7g%+2%KyU!LjV;jiD*2Z59J#XO?9VA>9<*9Pw=&FijQUAkDfIpX9F3?)guR3u
    ztp_cb)}VD$ced|LRa1oARHoI2xAP7q$W9iUE%ah+2<(gGe6!UO(H{_$W9DHqmI@++
    z7bE=?&RKkzKn{4-YGo16IT@aAP}nz!yO9XkM5(rzCVVD1A&?&?wHA$R#7Qq&^wZ5q
    z1=VpD$(Qk<>oPEufNuK+LpoiIYxfre)+Byx)aWAHpR0>d{QP=O>Sh6Ltm}L6?KVfD
    zXOd}7hYue)r^C;wL)71KIox?*0V($%9avz&>k16?biJS&7HlW5pwoWS{Lg5;0j&|B
    zdEOi8#`|9pTS;h{h4uaSN*m&lwEN+s#}4Ab+4R14%U7}j&l2YE22pQz?!zD)jt0Hi
    zr8!tNH3WsHSzJ1}0}viNX#98$cnzYzI3CBPIhunfl3RbL)4&6?Av8gulH57Zl}fbe
    z6#qWqYanr~$CiZ^w(UcW{OA%LIEt{RN~hWZ>*`SqU-reFjyY-~IB=|ZYz~tK&z3%A
    zMxI6`xp4D>Gi35e+uZ;Sne7G-@s9UhU|xmCtFbOY9x@h<6}Aa0qxP
    z(%zc~Q|y0_R+c_{|I4e9m%_ODp#r)&x0>*x@evZklm%V)Y)#ei2RR+j0d*@O@p-Ft
    zCsN|np3;Kdgm!@Y5pEQ!*@U)jHJg|fFT^1s?6spacb~w)AKbXBb=v_b8Z0?m$)i=X
    zl|cEtodiCcjRg0Sk18Z>Tns^+YayPZjW9?|hMfpGZki^U4l|gCOQ;WKOxN-jI{LIv
    zDGa>W+VZQ$54t9-0$@laHWa2iq1sB6PI70H&JU0xUnbzGnF&6`BtX@tLDUDUIf$AE
    z>sFWwtLywuP?f>c5%LVUmQNKAaealS6N`-JxcN8;P72)lw;|ZnLWH42Z)s>oGyjMdTYNY8{7%e}cD{oicJ>fyoU)1#z
    z0(Us-?H{VO`f`1_02~&Ovh(_<)qf%h^YeWMw70!QQP%29^_6k0ONN6{YpD7$Htz%e
    zb6r(8Pd+`lC+`21mxF8kM>s&&Vjq^OOP{zpRMUC03p~YgeQ5>iT=MH81l$?g$gv&h
    zGWw!OMyGtojJoO!{LMVqrIo9K9>@QQNcSfgbO{)S)9S%us9~&gwt@xPiE3K#t&c(p
    z;k5$>izd8IRvJk&0cswXZ;2xomT)Xv=yC3^=W0RCo~s|#IjqtR1t&G?>`$*=zfljN
    zkKT}mNmwVi3ky6U2x1n&&!ZJ9&r!>KOwHk(!t@UcabRm-t=3mA*9xXgNt=gH%(DPN
    zmUju7%M}33C1|x*8+>|#{1!kOE-YYnc>Sa+j=LdwsJVb+0PCwAV)T+xzYhc3?%dQi
    z_YQX~+ejCp5{|-aAED9PcZeb@52|YU;U{h?wE+|7(FHUN@b%lJca*fS0AJjuK)r`s
    zfK1A-(j5*}t5I-bvi(9oLZ|ViOo38*)j4%W{o#Nr!w1!u&STwur{?jPj8O^!N8}>A
    z^uCU2yF^7+>MIX7)bfL+_1e@oz{N%4f^rGY5(ipql29{wbd2%GltuoJqRz=<2iMi!X=GK
    zrWT%&WyS}fZBG=-Clr|}PLfYNUR%;krOZ_xV<|}vbEzqMS_{xJ0kRwT{K1`_=qJ}(
    z#CnWjJfvvB8C6nKr&HF9bCoK;|NfXaDN&5$QalsNY~Rzf#u!>-|JBi9qXMh}^kvi=
    z#2t*P62s(f`ATwu(eFRYezH`kLP{#;#!h@emK-nPc|IXaZV_|}Ii>*mck?}pjLD6>^)zlGi;0RK
    z2+5}`skCwA#m_nwjq!`Pgl00`-rae+w|&%nzIk}md;=i1e%jvpyIN*KzA%LozlE|l
    zA-SIV$VdD1IG*RHZz9s>7n+QPDX3OSYl6!uE>_;&`f0zpH_pcuolGekN%Pj-P&yxY
    zQ=~FEQ@x-Mle!jrob&)X;cPTC&l48EXovDbgZ!K&v0KZ6I4P$V>B&@prk!kd0?4B_
    z&I{l~1ehMsWTbF<<@KK&bY;4HGA({jge08exZd6d#x&SZp7e7Y%>k7+yej;beIP76
    z`jpNAD9K~zCdfC}mzk4#E01Oic^=I^1K5fK%=$I^3_#@FY+(vwQs4o!fR?0lPeDqs
    z$emG=w0F@WI^w!)bIFKXK7*%vm5DFTT(ovPZ+_Vtb6og+?h?xdai=Scop6p>U^>G(
    zJHT%^pZQC6aoyTI=|YZs(%XYtv7pim>(;JHr&(7;o<)mRRyO|>Yl{or+3L!3dFrh&
    z)*emeB(vFTf1UY|(&(xen(<+pi{75c(l1+VE~w95ZUsQ@birw-rDK+y%>wf$Bj_dR
    zui2&d87^KIa$UTB4!9K;TzUz9hPzjm>5x&u7kWisDE5l(L_Eqk{am;Mr=N5@&pQ2F
    znC$dZkp!mOYzF;E2U=>Bmg|p7_u$m{JR%eD^Efu=W(|?OjrG}hGoW~gwu}T3CMYc&YkuY5k%4+uyJZ-{z17KH5)8!!c#&VCRimOwdEE^A%;!i|#ix
    zfbK@;0Ycf*Uv*d`c?FIhZdg>)3}
    zZG`C#g!4f>>f_Z+aCSy!=lh3?E0sj=D=AQ@f*%;Kbe$W=Vm}GHL2nqfusQW~6U2rQ
    z$z?B$M+tiIx6!0XBbM%>>W(C=KIZB)P)`q^DF{8M6_0xCRJb3;fVy~-snFRNkXX{2Qb{LBE?A`;i$h~V@~T*O?R&NC
    z)mry1eyrpF7e5mHng2*jkf@G4%V+nKUE}frm+btU_}(U~9AhE8fB1Zv^uY1Xa{t+p
    zTCFd!b=#1lF2`3r*|*Ld5vMKxjQlH;zYar|c%=bkF`|ivmeM6d*n*H`4}j!ZFtA3&
    zT;0Id{)%BQz(G6Ln?}-#qn-^tZ|A`^GfJ7ZA`mAG^S>q*(U;rr^vKg0wf6q3M|
    z8>CZnCWJ9_7N3oA3wMEU3t4PixGk>vz5r2kl&&M8ScRQSS!Gg82z$h5aM2kub4lDR
    zeS^#K=7XTa79$#52+h?cE{i}Xwlzd*B7o^R?ch*d(d5Z_c
    zbdC~cCw_V*)zxZkjgNJKvOyi-t!Bniad);b6JXj-2?b4?F*jrAn|(~-;vVu1n*(T-
    znuE8aGx!hxX=8o-)0+ZEVkk1?#~snS?BpjK)0n^E0f6hc?FP8bH>o#$>t27O?3Uh__`391r)Yyg1Ers&Xp86si+MMy+Siay=UsNqvO^Z%#M2;
    zImHkX93}X}WiY4#7y7AAN3fx*=*0d_$kj6!QDLvmN!lP)k-OGtI1);e;dYy^4)$Lh
    zY`&zuJM|6qwB^&MiiySHl|I}$*m-s273NP)Sq%9j`7Omj_*Nm;QsK}tWdcvfhCU;WRB
    zm|8k@-djjI7^`PlsvwLT2Hn1^cFitRDD>wEt{26dAdpkuNMjpo2Pp9AsaPm!PXm;z
    zk{|>f{RVYSUy=_**z0P$+Djt0$%()iStmTOFQd!^N?gHd&-%
    zZ`28#JZif`qw!G$R
    zzsh8$(=9C%j0n5C!4N60geJWb2Rwlm@OBWJ
    zNG}QHfEPi(?~Yh>R<&nII3QM)8)XbJjJ!kPnUs!>P$9az3@ijwjgq?-?K9L_Z@L9^
    z&Jm2Y5V%cY8*&{|%nB|4Y!TH)<&0C-5RKa5fP7Ej(l^sP@tTPz9%~5(B#XuSAY5Zc
    zISB_cv`Y2dr+W+BBUpGh7(~PA(75}kuT$IPiz`7}dJqI#!F7^F-#K8f^t!pP_GO`L
    z*bBzVLyBHUtr(ddX(cM|w28U_qM?t4L3BFO$;o&37Fh3%dZ%X?1^eR$^RDZePOWe}
    zJ5PII9w#pe>-zpRb=5?x9j}g3mqz|oQ=^nrf32p9R-Y7IOd+{_&Hj7i5%Te6<25!q
    z@5Si;1ib~PTg10r)3@ljTuqf7-=t^U7>pHnjAyfQU3dfz3_~i|(6u4OzY@6~-R(U!
    z@+VSrJfUm0N>vBkiO5^<2%VEAEcX-V_~ft79t
    zwFdD?%g+xxM*pf!nhZ3J*T@;~93JlMy)Y7kYYCGi-_ftw2cqE^A<}?egtH@_t_|7{
    zvk2|ct)wEfXEPgF7I>;wLk&p`f#vMF09XJvA+?dtU2;?w{G8+5)|l`|$0t&x;@oTw
    z;~1Ae;*{=79{KnjAVeFOghKzj?{VmBedvo^h^l%F(#)fY`x*WV&Wd(;Ar
    zlX}H)c^n5ZQRP{xs@b2zi8u{elqOe|3_=${X<@G&(!IEQ28ua)3x{^^MDIf`rd-(N
    zS*j!*zVETy=O76JY2i9YaDY@rH{KyD=!Hn8u;18EFk7|MGu
    zvE3b#GEmeijyH)y42~2Ti`O0Eplie&*Qv!)N2B6QjH*{Gios6SQ+wg{@NkI1l>nRf
    zp+Ypj=FEhC=Z*YCmvzrnYM
    zm~!FIcX7cT`w(7UdbD;YPJ|CO_jY%le$oB)6xaEF+s0kr>zq^Q-ckEEfBE|zT#-?HlwK*+2{CMUicT?Z-3T}D2>zj
    zD^VP=yerX#)Zj6?n2}@mi@8gYof3|%!#Zv^7jmw#n!fSU7bot-`IDJ;ah+LA{+)|n
    zModYtOJ%={j-gz3@l3d)p{102JtHaWlUz4XtOIlA)xh7^^_G_z4@4$o6zF%)CJEMO
    z3&WW}&%ob^eb3oegTcMpSJ*FWf5`5(y!`l1cDK!guer00yX%?7Pjl1BvWv@ScfrrN
    zHmYvmy-~G^7e`f80ZtFzvA3h1dlbP!
    zVxu*d(U(?m+dyW@gfF{&EHoRZEiXQs#Hm3S8Hp8E^}?{t0qZumcK5e7cY!F#Qw`7h
    zo|O4hfY&}jr$z~`>CLCoCvN8E>!W?V@I)~3mPM%3Dy6!z4>hW
    zKtSO{l(VjM
    z;7L=KFO=kx7-0Aj}s^JaYA4w`y{+jY8kEIm3P2DJ2YU8cD`~q3wO%6s);fcUB
    ztbEN+r$M<~^KIyX#ep&W
    z^4Fma=%&0;wms3n^TNNUI4&Jz^y^9r?~2d(Q&F97Y{s9Cy5zDM-?)r_HJ9<3%l}Wc
    z+Q0D_|29;>4%#;s<6p>PWN3-k)&F>c@n>calvdMia(tt(jf!XgRrJCMY&dTDH&n^^
    zRs*c`T?1rC5%nE)B04XKdLvP^(Z>JjiTlGyRNAkXX|xygh*st=q0}3w)A&3_7h=W-
    zQq>p&>-ZZzQk)=l2-b=9^|M_z2+}U1v!RRG<@>0ru;dObHK0X-=>o?asR?Lid;vh?
    zM(DpaG|uWojiZW`1Kk3UI|(Ehr$G`T<)G$ESqy)NdKjlto2gzrV^AP(?9A2{Dq;La
    zzB4W?tS839)fsAGkr_FDm)4lBW*2LEIzKEgR8-|t`EMmx1M5GLpZtuYX3DCd)xnS2
    zW^tlzfdljQrUnZ>D(ArZw&8r^L?@g_3y|>JnRIH_Q~3?`ESI>WChheCWPsFC86Q5TI8_@%XYKOxh>Lg>MC*FBQ)5JQtuU-w}OI*RE1%s;M
    zgDxwX1g97(0T;GzNxgs$TIXgyopbsin(xy8!0JpiPS`tJ*?xN>ByHv7-hvmAH#0?E
    zOx}UxspWfXasd?{mr8Sb8D--278m14zCsn*My65zu^6F`%Rd5bE}P6HTPKdXO_-y>
    zzg^cZZ`r4G{y$Y`e!gXA()qt~XT*FZqYPwiSQh7dAIb2QpanL65!=}fZW+Yc(J
    zQ`D3?Y)a}BpUHpJ(cs2}TR1s;??#9H4k`WF}=HsRS
    zl4bD%R#0n731fsU-%B>E5)R(HMv}L`s(15?i(-;J&2n>V$zNb@j<33;T#*$8JHlOs
    zhpNi{o@hw5w5W^0p3sd|=SF*uOkm(~eFO+#OHql`3EoMmac-
    zF#%Ak-2#M5)ND|npHp!U{iJH==VWF?{?F^Y5k5tK<8bmDk;56fIr+#-bN2
    z#GbkiyT(}EK+v@G$WNCI-xEDvU$X0@Zd@a=t3-g<#KndSmzS?0I{XO%>QC@GZ`0?w
    zI?auHexTT+>BoTZ=3$@w@*3!@PA*@!|AE~
    zoYQa2|DOJazAI-qY=+8eYht1VVU9$k$Y!K6qNe2A;Pf5!ol6)oDi+a8*;2ErIvov#
    zyfiB0*{n-36QO7;9H8S{z$~&m!%B!D)iuq-Kw>4{WS)fA{ee4_8>;g5*ZRBp_bpI#GB@LR=_{&cs}JM2vQ$QxslQsUWsD8j808a-Pbja1@%G
    zkmwB3D+xLDgEjUHeW3-to6{J5k^unRVX$8s?2o`D1@9v?Wt+)qL8jN#XXld}3?cVe
    zATj#P3H>TaHiV|=D07P+)nX-A?-v*FL`L4B))Mkpb}l>7$rm&6cUnoBfq(c=bMOxz
    z`lic)R&LhEK0Pgy&vT4`MaMavy3RC`J*&EB0-Uh+2>tgtJ#>P7qYu3^q}Wx({))*m
    z(*=OK__WoIZzkq$J7b^
    zE`cd%VmC#BAH(?&+d~85L4f8|xl4+JWY}ow0qi&!@@;BsQtyt4m<1GU4sIHi`l6mw
    zGA^Hni-2a!q5OIIDog$9f$vX3$k@{eiZ?pVvGb^1x0E?9|#yb6_!Ik8~~p?8`Z-)
    zI^@QXw0MZ|z|ZNBy~KV}D251~r`%U3gKi~zKJm^Y<|JZIAzDKJr#XKpkF!^w!Pl!i
    z9-h9Zd1y6(gPwM$!X=5G#&eg8mn$Nt?QMk!e^(pRSFU|p_ddR(u3PiTCi9rP4>!wt
    zwoWSm`~Ms%Yigcj=kfHnsrMgQ
    z0%N7&f6y+JqS7a`&c=}H-V^1f&Cj_`u1+-h{#wM@A;+2)GkWIIVj#hFj!R!TG1`BB
    zE-6JJ&2$%OnrMDKN_{7_ejbIcm)-fyA)=EH6dr`JblYYD`n3P_e;n$}Nkp9mwaT2~
    zwhX+DYl+@Nt-#?{oO}_GDd@IusQ%wYzwbw9J;eD$U`1!Q
    zCG};47I#kOEo(ej&LjBb2DWyoD!;1v1&8E7cI6fxP-pyR3rIZ+I;U>W9qc6%gV+k6
    zd{d?76_K9iStmFz&CJXoH%~dfQ?fEVK~wD|e$laeN;WId&KFx-jT58Z?`B}_e$+`KaPWLW
    z9l*>@c3ILWf8Ylq-jqt(aXOWM?=8rCsdhenj7{{H!um&vs!b_f^2(~>>{eRzf$t=+q^A?FL=^A<`dx-0iAqfuV4I-`WVIO
    zZ#T)}@TMOoIp2|Z&}XRcC8~spJM*&`11Hik7~01UrjudZ345$UcCdA*9@HOJ5_FwU
    zKJM#@ZelVVj9No=I>LPw_GxvEgz4VG^PSyoHLqsp2dyOThrKy9>tvlrEj4<>0JlI$
    zzc%436rFp5;DTY)0(1-pYCcr6eMp&;vn79=?~8njYKxu_KVTSv{@dss^8y|u^dnCX
    z(4g}<{UX&?4dki<6rB@@{4t^0E`w$#f&shKZyZx`_OjZaqfZH-={YqQ5@Dt=31QFa
    z0yw|3mvb)Dl5j(5I`$8rtF`))+5*-h_+7PH6j7amj^o7!OjOW86{#Anq*D{ql_M%%
    zaNI<7HtMysKf_^6Xh7osWH>rIW2Gw;H&u?WfBLDSF2ZZ-WY8LhM6B@wO9B;&P6kI=
    z2WXdgs7H-dWC+vuC4Qob`|a?*|4sA;t|8bt9Zff}J(OG}mS8c-FC
    z)>Uvr7qlGBlk~DUGIzjKGZ+kl8)z;Ds2r+J7$iKHfaSdqok0eyje9kShM~Z2G?t__
    z9H!=i!n321)xwG?g
    zlNT)gYt}BcVQ}7pM*#+JmrruocUb_iDlw=hWU8vAIn=bl=eJAm6mptg^0G~)F&fMM
    zW3*(%TVTP^U7M-}y(D_VdO(;TFyf429;0fiwOzucLRz6Hzt*ddoSY`OSTI(ATFtJ>=~YI&)?vc#8ius#Me
    zwaw5bavW~4o=6}qP_<{xpI*Iw(>&aNeXzAnaU6a=Si`E{v@o%`{pM(U551`#q7+W<
    z8IT0Qc$Z4bZ=tL$s8p4*&`a@_-qZZ)dJ=XRiO^GZ*oevL5a&
    zhzZ@-Ie|@o+R|5V`M2izCB)cImbf+bqYKB9C!D
    zmP=(=mrKd{si5aJaf%b8&bTgTCpPuZ2Z!z9%S{tmrys_sR5~Kx9a{?vR&Nb81VtHR
    z3)q1}vUj-RtS5+Ol`293dX2@d!~r*yYKN^3GF1@=D(6dI+?Q~8ptR%VLsy1?a1S7b
    zC!;y0wrIymfv0Fpq^s+;7AlR}p;o@*Ca?h`DVjt>Yq3#Dta(X0Bq!BSmlMjRKKX2A
    zFOpjQ&M3kEnEOs&BYhL@ecNdMD>oV)_|aL3XuC{Qs#4Jp$j1UJT-qwB%Q(U_UwdPN
    zKqG%Y2haxb6)@mWC?Szl!Q@d@c6bsyKhqwZ*>?Df&irzEPcTRA(xx^CvmD=g^zHll*+v
    z|B$or(_V-waMVhjv?^XqS$n;fVmIk8H)n-UXBFlC`8ip9@FyJ6;6FWZ(zESX&vp(P
    z9F*1#n*FIA_Bq~{oiu`pddCO^kMi1WiT@GK`F*yBVE<1T?lyQIda=Z1@1i~c7YtjL
    zs%-B)t59yJKN`a3KJzz11xD-otDpAw{&z#^^m_}CUo3mC^feUO+LN0SW~@1sb#xh4
    z*+D5b5xu2aFH7wyi~`AWV|ddcUlJNLd7?N)-*w!*DU3fRfyi-O0-crIjne%RfB1bA
    z55orR!0^HXtwxWA2pxT(Q$D=ZKuu+KL`$^_5Yt!P1R4L5Ohxxh;=9pailcP0-GieT
    zcEN-N7qhtCFu3%;W7#fVi=Cs@=0()HAj8eL)fx>@L*e8KgZKi1jQV&yMQk8UX1_E&
    z)kmi!tr5@^JENUAevh|rC%A@Dn|OxWNgb>7K!c
    zq^t*}kCr|02knI1C?k%${_Wg}mtXT;&p*66C;;QZ#O}V@gVQwPz|+HL`8ePxyx4lE
    z9rxWvF!`=)Tq$W}sW{l;nt@L-4*9)Jb-3>K*z0r&_J94=={t0kFSniO>=OjQwse8u
    z*Uzx-ZX!sqbpNd(vsTco)xsW{+0}py0=9>})=drFW)dBUF})ong&AOfQ|CaidfqgB
    zV318)qNz(1sK8Ku;E#Yp7nd#Z2KmIP>UvyuykNa{182h+K|b74cqh<7%H<=?)#gjs
    zWS(wr{rzxv^YEue<+x%e=`*V(kj3RXgs|c_|)L?0AwN
    zM@~3nGNPwE%mE^{qfj3>N6OCf#bvu&DlGe
    zcG$t2#QPplJocT4HL%Zh_6EYH*9^zlU!$EgtTQ0U@c?}~5j0?8`Gy@^hdKe&J@S>7
    z)0jY9*BY;5up>UJz~VL=)Jg3nd_V^fi8|>E!@&-?baT|R3aQd`-{asIehywZ$5z}&
    zH69vRyp54j)HTHJpj}x8C=&PVl|jgGSSTAnhdTjsLw5V2>RWw(3NtNfwR0NxODGQF
    zM^UFOMr*7~`dTGH#VBmV4zSe8s82@UFcS!09L0IfL*HZ!Btegy;n^8BAwHAKE;`(>S`-4L
    z4(qv0b(5hGS2-GxPk!5FHqWOPdN8^=cmNL{gYYMZaRUaBdGRS$y>NqG6o(W!qg~kF
    zfio2E1i4c^sHzNQ}3H
    zeVj6KGMt9~#PLyo7!H9U47A@c(u;zF#Emz=RfF}!)fw+=8VI_sV_mGEuR0in*hL+z
    z5@R7ixz4EDQ;(L^EY)*7S7n_ZhJqmt*qspBTwcTyW)O
    zdEIywyGib`ilMPhwp|(gwHG7tVcIiiyAYfW$x{~k)eFw6u$Qzhf?kw#S^pMM^z?@4
    zR*lQ*_#HQuPRD|wu{xFGCgDtYjr27_9n3-a`v@8?T9__3Kb|E6j?7UppK1BwT(ny!
    zx;&8)!W0eWBg4jP7;pj=NB}dO%Trq*i6J#(%OS#kzl8bIKY_q#m
    z1|mwJJ4UgONN>P2{BYEJHHcH%4d|E;2Uoja(U4&9+a2226|{i;qk5_sw0$|G0LD_L
    zx?$#AyKPoN?;8Fxke$H)TK>S+&$alIQ(nX@jT8c^VYi=~bOdR(beZD3TjDJ&Ck1+s
    zRbln1)>?Qp4!^KJ{u(OPM$c6UAupyx!JG9l4;3-Oy5o{g70Hez%&e|kCH5j~4P@En1
    zL@W3gx(t{@O`sT2jC(z7<6yFa@{N|XSXhMA3FGP#@NpX>D`@;#E+Odc&4fn0Et}(#?jWySc$N)3KLZQ>neI
    zJRzs+gYyvy;*k6RyVJG+QU6uAc~0V2Jh))mnWSseS=eGTq?v^ZKX7
    zHdmej7J%E^-Xdd!`ci#md{f1Cq#t8j$t>l%s&2>@MJch=^73%a{|JG7Yp4%P)um6m
    zQas4K*@d&ra(!t9YF_ed6zT~Kq2cs8Fa+qX6Zi*?aD>{kT)~@pu1|;73wnH`5SfE>
    z54N)|*PK~6JBLHs(wy!*+G^0=?F}@XI_m;`VL?w80wO!N`T03zX0T;Gr{;K0
    zagGm!CtLe!wZ3w>Ryd&=8HP`sHvxsVaA?saR(5mnvfhA7)EZ4o0@JZq1)Sch)63Bs%rV+C+qGUxi?6jKZ_C3
    z{(Aj(>767lEWo#Pqo4(cTYz}VuiPCXk`juc9kx0+B|)Wbj9#=(-BEuykV^59W^T!}
    zqMvHRc>G5eQ5&V`y2!>-Krh&H
    zqcd{MuR7#n-!@$vfQg~!Z%^D#1pT+G@7VOy%R7JiM4i@t_zn8>Ak~xCyGI8*Z)&S6
    z>gQD;NV5mwrFuN4E>k#XG0xP+v$bq+=9{OXZ`w@Xw3&)bl!PJs`c5HqMSq-22&r+R
    z*C5H`u&aI|1q{*S=5mI@K7RlGv9VWyPmyLIENyZ5^PD=;UWq*S4O{!Kjt(1@+WrcR
    z*Qhs$JDpl5j{7LKh`Z6Sb_SCY)-5IG7{DvLq&!H)#!kzaYE%grVX67<0S;=qX;XlHCPG
    zdgg#p@qjJU5QBkBN47v)CvTAD+fDMbS`3G+MQK@8QPA)NrSbBK^3lnIlAO$>8U#Fm
    z%H&5bXEFV)8=VITWy@A3_ci>QsM9zeo_1o4903gXStst}9cz@d5)E{X8{vRHP1+ic
    zmiv)^ZXIzeP{4%aUPmCFOD}@67--|*6Ge=8i53=EY%!D5&%<(BMM3u3nPeE+1Wch+T7hW
    zH=$W)GXbn)fpr(oX8tu1S^+6rt$5Vqs6}Fh3Wrm^h8_fL0Gf1ycuy^%FUZe@;}>^VxauEaeTZOCoAx;3_m@-KAXP+;
    zuwSFtzAgYZ*xi3;>NfYUP^$K2ZI(^7mh{6G9FAMc&Li!pT2J7oS5jTA*4FrxZaCeX
    zl4L1Ef*NBRscNl~6y-bBReD2qZ^mA}+N*8*WNp>;B?5Dat`5o66cOf(7p94a>=YrA
    zY3@N_vUO}g2@F^@8(Y$euM`j@GlmCgK}uYFLyQ&8vELfMj5r38@}T
    z7q!Q1T=}OOCsl%oy-q^2P3Qq2hHDLm*kwpg2SJPXfbxgSU{C{g_LGhq>Im96`g^Ox
    zfkUAPD|Qbl>LN#NL}6+&jD{mwoS9v>`RZW*#lhxF+OAUH8kO<~`Shvc2a(n}54R3>
    zULARb`O_3-pKTs(dL{9LTTa!wYJF|3GQ~}bam?!8C&PkB;8Z?~pXR1?>{?hp%fz6_
    zp7jsiQcsX#kg0_ZaJphbo8DA6>Wd4tYO~qwH>(oTltd0C8lL0QvFBh9!8GX$fo>*p
    zqC1x5p0*tNybBv*7M-&XtOINJQIX1lbw%}J8Ow_6#K~GYps%e6w{FqiFX896%kMUn
    zHei5JENK>&gEWc)7p!q)PjM_xe5C+KGC{RCQ5Lj9KQ-Zgb#rqm&vXmNxacNVGMfmxz|-6=G}jue|U
    z2zs69RP)sL)%G=C`&iNj=R30YDCv#1M9NjsP#=E+bC4zj5z^bh6I|U}ol=-qCW35~
    zSElo?Dfy>xrYSk6^_+RIxwpIX^e#2S5#t$ZDJ@rYYHXNHFy6Z%k2S2m0ckf5BDoJG
    z?A4Y0i;hd5#bDEbjOVa%nsPa8huQN6Orsv>$VVFvqC2)4EezId;fiK7nAy`TpJqLz
    z`f{d4DJqwl^9ekQp8i~x#U`%b8EN39ud+?X2^U2g?tC`K$B#-+!{5+nV=0G<1cU!d
    z3bJ`{*VJS4AfIwQ15Wsw)BtNJrUsY_)BuOsQiCyuz{y1*`q$R>SH6um_vK7eTljKzn(;mygI;ZJ
    z{eAPrc1;A%pR^d?lq5kuoX+Ny2LKPDBoXYz>6Bhf2`o}iCo$>U6@z_JY|?7psKOqL
    z0FS(1!U0-qKgK;W&w}3d(V0j*U=2N7c`y?Aqh>yph~m*IjLy*Q1bi<&aWZ|{sFw8F
    z>%S+0Y&&YD=VpxGlpzBC2<^tabaGMp5-vkZN!<3yiL9i?M}u9er%!
    zZxgVEGEI*yl>JMvg#hGY3#a5_i%$BF!xl3dcY!Squ<_V}m-sb(+2G-fmogr6NKs+@
    zEoT;g+(KV~MJ|{;T=LTMFe;VdKMk+a<8uetl?5p{MrtHHA_KhM;Co;*BrtNX#e)iI
    zUBdrQHY#KtO&<0C=f$g6>~r|!Nrf$PpY0#I821J-#AUt&+rDe4Hy*yd-rIbMqCEPo
    zos5Vlc7xo0Vqr4O;+ryMvH@;uQ0biN43P^-ZW6wJGM#8tplwb7Tl_1|yP@-HvqZo7
    zjdD@ZiCR|Yy-}^x_SKQ(+c-5O$kOZ-ummafBhFefoDF}53?nonfQ0`1aSuclh7@;&J`BzF5(D00Dwt+>2U4
    z2g9eBt57%rcZ>y|>6Gy(hp%#BmHg!x{{FJ~mvb98n%yXPx%E9vscf26$}!+16^L>5
    zm6E?$2vBRuRBCU@-J{>`GddycKFb`nw0U!>WH4yw3=jIKL7Pd&|yuCy`>!*s5e1#%JwgVu#Hk7nsZr>(Vm1iHJv#d6iHMsFK-mAe!rz1pW(
    zxp-06nL_%&`LZi@{7KIP0ccm7wmO?PTcuo{Y3j>_o{0SJv%7Yz1K4E2OwDs-1R2&5
    zxFgE2Y=@_#Zv+=DE4Xl4b!KuIRg;p@;?GO9J_}QPj5lzNEL4YN(4K*QZo<$gP>4_r
    z5M3q;2B^|ju*u?Pifml1Ci|E{AF@t`}8X%Y)
    zooO#YLyr5sXmQ1OA7ZUq10cd-@w!_=3l1_o|K9Tj7qS`gEWrCnlD?
    z^48yXw0~Oxg)oe)IaE+U;@nQOAI|3{HP)sl6T3J`94E3&z0+GKZ3Mv|ue7-6*)7CH
    z&x*uF&+cAal-USA!2j~$k|oRrS-lg=vEfu(gm37kpO&d#sTf_{qU_2OVu{K01Z_T+
    z=bo^4{AD)zm?$Qe1&0nvVHRhhV{>-ZjVGmJi;fi}%j~19a2#iQE6RGmkU%K(HdehQ
    zaX_)`?lZfPr&!0!Fj%(nnLhfgb~ah-bWEWKmML7Y26FSkn7MpFHq+FWlil)8d
    zK$hIXCFLbgIkhRh`d)YPRA!1yLjrIE*n4@`cS(CMJ%@x7?~S}2ZtrD-AXwOU%$l*f
    zdaFgc??!i>tXgixwGF%dX0O{YtQFqR4db}eL@QNkrt((=uRePHDC?v;K=#T8T
    zOLNY~U^0K)kqXFRB%p#+gvQ>;`DGcuG$NW7l+up1=$vMo*uPB^ZPr^fp`X(P;ywKW
    zskLnYls>`Kybn=((wtDc!LW59qD13OOx_92mYd%XTuzpYrH=VUChiOfHg_N3g!O41xX{G1KDu^gF&vC~Ep#==-Y%yx
    zotg+_TKavseHSNVlHMb34C2xGg`wB5j7fxq20TYn?}F@vYs;lq^GQ+p1OT+l!P>v{?)1kTE_&ti(R$5!)NLm2wnS3iy$R`O=t=`
    z3oVt+vlSv%GvgoE%!M-2wz@Zsns1!Y)-@1Jy&QOkUG)D4pNYU$xaY+(02
    z4h)KnYrn(1aiK++g*Wt9n)B{U#PglyjE3mw*En%*%NJ<3as~=&bpV&kHPnxMw*L|n
    z)2%_AM;LPm!+_9-Vm!?P0VlVrV-vBNKBZ(cEssU{foBIn)T5rPA-BJp!ty?{SHmUO`=m-s%PXsE57r+(dMrs>
    zl+;4cq&Xlpho>d6nz|-oha58xMJyI2JZx5ISdwm(oWu5bxmUipDt*WA8G@lWtH;0YrScQ>dO2BEMgkYkcgFhq}$
    ziFbNqCnCdez+>ine<#+yg03zo#DeE}Kkd`@zBGEao4N>#x?oC1Q}sH>pIuKDnsRyQH#Nk5|*bC87~x?V%=1o(Zxx8Y+jRM(B!
    zo{+Dc(=bjxr&!XC)+Uy7XK{P?xq6Gi66l}#+9~i&Z(r`dJA4X90Z|Ah5zxo>O)uy|
    z34k|ODPFS1DGf=GYPp{MV`{vF%Fh=KLz^;SjQ(3q16%R#$G-Icfr~
    zVOT%?Fq*GLtB=-a>+`635TO@zK!Od0ALo7?)1~tM)Bkz)`sFL&gDbXy?O-4c99#tb
    zByQi_s%*;vp@g#a(XI;&XK5MVqvw)X(&n#h=Bm(&D_NL8TWMmaL{(EUhJi{z|AdYPr6u
    z;@-r@aGwQXq~i7sJXf-MA$p?D24M&bgJ%crjIlq>CSZQE2`wW{rEOKyDmpr)fbDmd
    zdaFM&%1Y7vqjlv3Mc5M>V+f3FHc5yMSmHBuSlL5CAl~)S1%8134TczB&qCP^hbR!@
    zYd#7eql0Py!x?pqeq*Z>63&eJrtp+#IQtw%2ioyb+B3HpydMH|$GlOi-BqLR*&l}b}9e=?(>6nsGG6T+-ao!t!29dq!kFJ-O
    z>MKk0AL()VR_lH?vE-Ki`S@zHcCd4}MK5*wcW!DLkQv``l-3_rr$^BMcPUr^_^^%-
    zJ@g3}L+`k6jP$$DjP~K`%E$QgzSl`S
    zE+Yo2XJ+n;YZ^av*~y=L|vI_^pbR_c#x{rD;z^joEAacR=r?7qag
    z@tD9{Ad~}LwwC&Q9$9m-Do)N;k@~>zn*4qa^PIF|^!fc+MOnJ~IVEqB%Lk*Yw+|nY
    zRx-Y>&5y1oGpzZb)-;Uz3IZ{2tNQVQOPL8J;FQ#kwa52vJd6j>nYk~=gNdgB_0lP$
    zg!^MSm1)__)S8+17{y*|Fu5P@IO>84hK=eCi{HAgrrglqY0-ppu{$YOj=9CWhW^QCz2k1P1CX
    zyi#$eEm9vAbiD;2H`qn-_{t$k(7^73T+gGEEno(r7@gCCp5*xPyYJMKxp#UR1N4;u
    zIa-~7Zf?=t-zg3r3>EiY&sU2=fFdF9;$x%o_UYEM?H31!NAD^O?EvLi6fBh(FDWS9
    z(ykWZ*hjKEzIMb*Ky3XM0|r*DQ8}J{+Z6K`{UCuarJkcf&`VGPqD%w_6ko;|Wz}L{
    zKyH~ex-tCgvq2XsSXRd?$E)giH3JZ@Uf6#Go(UNcMQ0HB9F`8CwnG@P0VywNIjxT@
    z!?@YPOpTJn^5mPQU+W53hU3{fbf>(C$^pQcQt*xAGCsnz0Ejooq1{rwsnP@l1MVk;9=#_J0sE>D{-@hHlfsuox`JF
    zY{?5cD56F)tV~g_ZbuaGa}<%Y-gYny7=5Ydg6@_xnhqh3iV
    z0V%f*fG>%9j9m&9KXEP)HRC?a!Jv_cwT_Xa{cpDr}N?Z7dS+YgNk@
    zDL2uLK|kB59SJ?HE!y^8!wxIPY2-Z_gIx`w<-wqxrt7GZ1Vq2~vsPT3-cY7+CGjmF
    zlCvAfVLNNas!zjv&0GpSl@m13&rHs+y>IV
    zEfwL#A5e{uEXc=g;~AF$35k(i!pUy_T*6iGePx&yNs6H6+2V<>4W(QoO5>%e}u%58B?(EVWn#)KS
    z1rj0LWo)0X7`nwuAW#&3r4?cg+bbJ@NUM9KoM$G=(F32@U08;BkywsDs`5CbR>wc6
    zGF6*1N?#1~s}8Q!hC_WCs;`vRfJY*NZmN;8;d&qSqTff+*^Sn1ca*|ppfR@r2NVrU
    zkU|%KIWo%D-AlHsl<($A!x9y1UXCW4PSrk)xS21>C+=tvnk(+47o6iAgZ6o$`C^G*
    z?6z2FuDdYH72AazJ@K4ExZEa`Vmd-ZBZr#YhK|Tep3#fqJnV%73Ab*JdayR@>|veU
    z;g-koM{W9MkX
    z)5#n$&-pG7fy-7SdlI#
    z34P!jjPYBHk6}o5kssIVes~od72X+AAuJ4Il?=OHTsa&ZR0-eRd5UHU_*1f9ZS*F3
    z;1tf91C5hYWy-y{c{++ZK(w^w*UZ#g9(FQ+zr&P2j2`RJw8lwZ00xI?A=^qF^*|3*
    z*^F>%gq$(P6cc=bn=cB>WNqRSHq!Iec!(Wv!Yc@fVgNu+Gv$31MmJ8h2WK$qjo&F9
    za16|Xk_kbjBV5hn0=n^Sd^YNuPG!(3zEC6gyyiQf#iS3U!#U(^>!PY34Mi!@z084@
    znmNrloN#o2(|0BXthR2p>#y+MLLN^(etc8$gU05y?JYQj=O_8cW2?wlbdn#xkxf%a
    zF$gbT$@hst1CZ@@IkzD>Uwzm>f~Qj~WwgzgP204o)l1{|`Jni_Q6l99&}eZS!+yU}
    zDQ~@crSKmj9u-dDBLF6Dsai`30k+w4mlT&paw-Mm9CDWftGxTH04QxD7PK2%P`l^!
    zzfP?s3j_!kGe(gMfpVZ6H6Bc-9-CVuKU2GY5jJT
    zMqrMJ`iXbiCH8U}_T6AAQif1UTs~bVfpD?_=;g#(nCX%4`cF3J0
    zj7c=JXBq1m;^34!F18cX3TFEK3>7Sp(&Xg)4+zJcJzhI{F@D75wA1K*zX@M?U&vB`
    z{Cxb(MVwI2K11dd((IRsgJ_e)|740L+YAnA-uPOviP`rPMl)qt0C5?xH0V4h52#U4>^F54k0SBq8N1=%V5
    znTdp1^}y`eFr~Emzb)`@3p}&H?J7)0bVrYCMtkPSuEeiL3|`?rm9Szs=0V25XPtl+
    z$r}MVW^HznD?u9;`0g#Udbg2kS{DyALpm{D^xYvt?z%y1;vyu@kkG4veP@tHf@MI
    z%6vDTNhyDzKB`%!+1siz8+<&StIRo6l9V5rOp#Jzx+#r{6t39&;+#zMQ?a+fQyjz6
    zKnl)edD$?W#`X&!0*y@a)RVWlcen$K$T^=);W#*_&=eEP*9X5i$hEm*%xGf@@Z7blM^)RI4@knolDSc`g_
    zeGb{{{9$#Rv_Qp}$5)0Tmrjr4Rl>g^w@wfeQvl*9Uw
    zWecTHb;Is_6>A!jx1wQ8RQuoL1n3Y%@9Z}#ilhYxw~`L*guN`&)~HG_5UqPz(%rT2#HyrHD=-+124miNW;h6C}Zm^HFoZjlD!&LFz3
    zt-%aFQ0EwQ3?(qc47JdyxatNdpVmrtY>ZP2dP$Vhvm+_C?4pn-qinbF@5JU%*M)b1
    znVzkviu$Wsx?Xzzd`>kQ__VS#=V(vw9PaM_vVAbynp3ltprXESD183wU+D+lD*vds
    z`H%Krzj`J4ow7fw%4S6^K#lNHQvhjBZ6JubtRlBl>{vv|vjufW6`KeB@X8wt^SKurY%QRU(EL6-;9+i6q{>)2?1y?
    zj0_`N&)qUyvnthS^iDRJ>ceh2U#Fk*ZrnpRz3TLoesW|f)A4EgP(Ss--f7?1lYJ`R
    z`t)0rOT>lJfB*flURs)N(9PRV+ndj}4-VC`U3%77b04<1gPk|(L4CD~X0wY(*V$|Z
    zs0O_NXk<~arcTrvva9#(|Kx&L!~^I3&@)aVK58b&aIwIvp^~Zog87BUI!%CL
    z5ncemYTTYUZV-by{UH|^O%SJG#@C`{*++VOAkY*MhS#1lIyGyn^XRY2H>}FrI#ry~Cg8yQ?b7Eq$3Yg3=Z!_rA=EsQ~
    zhaEdLN`lj<6Af?1k9b~*?707XF$Uk*f^TfWH@3jLe#(cpqPg0)`P3v=7x?#~xD#mWH$A&=dUiQd?w|@o@f&LeONy&N_g$|1_O2_?8g{qq5y9a2MkISqSyS)~
    zPv8Ej!I{<;tOHCE-_G#{PTBltO_*#{6fa4fkDQtowQtj}NpL=I_{l|y@&DV661v`m
    z+6EY?C_%S;qJ#e9^o_kG(9df*d*KV!=4cory)faZ$dBvvjhzhV^G7y;6@!i*k4vv)
    z{+`18ZSnj)4b_&+AMCET8r<8#y}O0!uK7D!oP{7iuhkJ-ZJmuUa#Gb>{v0+7_ot>)(8)BQKF>)cnhssGgd`&8l}#29V7KS^LR)EnR2`upaK
    z?dIO*%WaC+jOHa$;+A#j)?tI^Sbu}Dj$Mx}X2uEs7Hyna$C2rOiulQ}ML9y%;~ci)
    zUoNon*}y-mxKz8K-|uy9R6iUTN8on*Kt<##vESx1JF-`_n+!01-%#^sc@FQ1?Xq6;
    zO$;1S+wuMBBYL<&9bNu@8eB%LXmlLhWWTtd5c(8oomXtyVDYB0ccOodqi7%s$GYf-
    z2=VJ|lx*%2#{)Bg=2d(N%zV`5{gqlSX1@r7w5OQE`f=mVYiP$wx)!biPkQL9E+0PT
    z!1(eo!uSJ|{s}0BE)$)hk1t3lan$^K0%N2=!zDlhbgp`SAo7T$~-_oIY!Kt2Tx
    zMDl*!C~>Ic<5DglAlfLKZ~(EB%j41syCHP@m)C9MsgWfYsVJVuxjj@XKe!>c#X%yw
    zXZ6N}dQi%9rA;L^*bkz1i0HaHU8W85-opI+y!r)Bi9ilEG-E-*E?^|c3;75Q(O|1*
    z(@#H0Q4}Us29fGl75T09sAWQ|vyHxnsa+v*wB3K8tvLcgkEgsrQFwQ^L^rr0L4Xsa
    z_a9-VF$@N+)J83oOHnv8VvvHfGi*I|5JT4^2OFOm@CE|a%3wH9ELqK_`%Fh65lAFD
    zG9{}oLB$#>gR!8gArzGZrY#t>NvD%S7D6jAerhM|qFFA+a)X9qGR0P9I5+|vTNOt@
    zxUf){!>?{YSD3=!9EcRmfbi?Z=3qJP5nQ7Q+F@QY+pC@
    zMVZcIBYEm5JJap(_tiE>?P3XFG)TzPb{lc5lsQNZf*uAhB=1*|jg@9D&nUhZ?^lC!
    z3c?0k8|@BRIRL|=tq3b@lvkz}sbT)<1ZtRbS`+?*&Ar{7r*~t+Z%3Y?`j?Y_jSZ7&
    zA}>(amB0wm+Q3zW+c)ptv`04&w_j}@Y#!|&h{|4KwrWh)j?O5*0|vi28+T$i?!<1~
    zvh`!cV7dZj_i193AVGvNA?#5Mdd(7$myX2E(>HZ2>S-!FfJ^DS=k$OTAm%up^(-C%
    zWgc6rzBw1NrB?LHVxr|bhR6S;HRVhLQ;RQy0u$(s#)e#CV-xS1(&XN)d;Lmb@lel4
    zS$BH^J^2Fi@u#B}?f~31&2VAoQx0$VQw6?JkqK19AG|-5bg2C0<QL^;M
    zUxNijvW!3;YE5ApX4_Y273OBSdp^kRsO_Du#9IqK)yl|6?vNuwyRZJ;Fhm6EPekDk
    zj}CV3BBFse>;yEQrcqKuXZc3OCQvawT=^LJ$8tj4mU6mvsU?@5`w2ux@F17kn6y8V
    z3ChFWq0B>BIy`}Xd_KAOvrz}9^IwPk8AB=Df%mh2qZ(83J~DKFB&it7`N-tuF+S4N
    zEZ>u*InMW7uIHBY$7|Xcp69F4BBh)@nvUrzT=e${lr9cgdxR?OPTUWBq?9aQuA<)R
    z3ViR-N7Pc;@*MTnYMfEa{c4>UQe#YLM@cpXJ$If*mtn8&kqfC!vNkbm0j;2nmjQ+<
    z%PCZ1%8c>92=aAqCUoa<-HQ>6a*|o~m6f4^$fDA6Lcx?ImJ$qLKR6GD{J~R!gMLd~
    zbzHsYaok2QS`3_w`Y2efy8*Q6CSkrdU&Dyu>wHafUp>bVf2e+abrH2L)aKJ246PdI
    zFxYj2IFPWk)b{clhC}uNkW@n>Lr*;+wsGQkW
    zFj{moK-hAK8fw|_pPBHU46sx@kA@Y{6kteU*vt~(sACLeEGsd&{1lhKtyYr?G%^1d
    za~CG)aqyq-|5oV>yFa4|*B!bA{kp!F{>^Q?zM0SFhXek%=#M3FIkfO=+Og$TcT4-(
    zW4%F6a#tmc%YO$=p2GE3&e#_mISO*FyNBrOQhqk%k4xy5#bw0qvnqjT69C(MgYk{j
    zO8rrNsj9;BR-%^cOUMKFLZBQ^;PApc3i86Vp)(xAaX36l$-kMVBZ=Hj0~-!7lF?~0
    zjD{mptsvcvi?Gv2Pn2-(RnQ)cFN8r*kv)bJ_fVY%t@lYMNG_r?(%ra^8uI~0pbuKZ
    za3C5W$WsGg)Zu6i;aoy874%p_VO47sR<&(>cHLWe152b)!F5uDf{VYtSzN5px@l6@
    zCbbhXEFRCkJw7fSAD@(u;qTq?+#>ueFP>MVPbj~EvrupvUxuvl(dH1>1V>#0>xL&2
    zMWLV2lm=_(Ruxv2UsGoEP}`;x+;C9XM08bx9x$n`ppUs>XgjtAFd6~5dCXK^F++oG
    zLzqon%4wbbD=+F_-MFo|hq0%I$p(^+Mv2HriPK(CkZ02l%p(3XnlYXN8b%SO74#@3
    zeY?rJH1-6y2_1Rgi?4ceE=#n%gbLJ2J*dF^w=Qtn5l4}_MlH&T3@VUaGy_#H%Rg^b
    z5f~rFm_e=7q4vrg^c#MWE(J&zkzwJ3b}+goK?r}VCl}BuZZ#@`IlX}Ih;m2*nw_>)
    zO~F$-e}f!YC!I}`F~{B*`oFb>ocvZv-ZK0?BgBxy??^im>O2l}46Dfuw;Z8~8`wM`
    zk;~>mBN+JKn+%y#`K8esjJ!;eeAoy)pwLYG4oz;g-0#nJcaQe>cPUYx8|_Yqr`l%Q
    zeMULp=+$X^-}jnaAwD!pogQrQB{zekgaf&(rVP%8n{V$WW!QV!=yl!i`%nMp+3S}q
    zgp%h5Y-{aNx9?_i?&##kX~Rvnf-Dx#c!_4C)RHcKYsBv56cBHeAPBWC(*p3NppLM=
    zQT~9Ln?WZEl20|yZr;siohBX)fH;sT5-f<(^*quIJf6~94N!Bwil0QNp#a~M5kRP<
    zHHi8YEXImDnsGvBbPHgPh&_X!Qqr7MSw=9&D~pvA
    zyI*8045I5*eVE?ddE-O^zX*(KTw<*;Uu@xdw9^S&!xhaX!JhIQNdy#SK!Y$y;vU&#
    z!C5>JQS#RQ?(X*15!oLe!rA6B8pJ)cqc!WQ>gv@=OsmVF7bO=&XjOl7c82sg>BjFv
    z-?{Re@&^yToOfaR-*_ipx=GqM~L3?9}FgGITr3IltP*3Y0}o>oZMEFjs=#g0rx5m`DZyVuLyr!#p{Vc
    zZvjz@k}^YGDyKjFGXuY5*Eej9@fA>Ck!luPEs+s;>N5$@)0#CY)R14ryjr$?-1%OTrM5E*cU6pFJDI
    zVt9)M=b%(OY5~d9dfWFY5tFn~RzgP{)M`gFIj_9~&T
    znRU^1SFd)qrnsCP4`3R*8atSGa9x|7p@x-M=ItdX4WSDn1fwCUs|^kO;$0Oia{
    z%p4KQ=`So|w8QZN`O}m|cuoT=wO=~bN?xKgv{K`Tik7sZQs)+;OEn<(7TS@c$`8;^CF&lGdb^|AH$d6|
    z&pUvquCW2d{KH_yxLzzQ__C#Dk&oJ1SP=Vzo4Kl-j^fixJVpR0B%!^^P)EE)n;F-X
    z!h(a*J|$5?oh>T3ZKIxqF;>Y<_cZPZeRSE{BPq@!jsTyo{W1+;J0Bs2y4Mw
    zB|R9YA&dkZ0Pt4yfqq!WhaO4{;yxZoKB_o5Tb18609Qb$zxjRO4j@oGw)HWGT_Te3
    z4j8t77}^Qd6}N-IRn$XRgNvY_#O<32@JJkmGBMa(@U&zzZvpF!<~@SGhMVA}@bahT
    zv;RfbjAG1<8^W_*jA6k6R%V!5H|Nq?VAjvC@S%UTy23-T;M2uTTF
    zs|L^+l>KNThnpd9{CVl<9GDlU%ONzkFr;=J0rQN!$xt)=Di4zV>%KrNTtvn}%VnkjxeD
    z+}J4rM94HvGv?L`2M`AO@N!%DGaLZKAl4`lMARl#df%>3*dz$w;df1b9~8ATwKvh>
    z7bXY^H&G6lSY!y&!^lE~W~)EK-7gB(*UV`0>G=U*@|8aJCu(PNeN7qXMUbmt6MSlR
    zL9S2C1`BeZ_5ep~r#l;qK+qOph;VyK>VQ#|{5j+23!n>+abWOadC5F2yGwzcXp#t!
    zDO)Zz=M}>7s*Pme6m})NI@#L#amqn2*eG(ggdlIDkkedg3^FeKUnM&bU~pbLaPLH^D*o12Mpv}j_-$1`PMWE&IZ&hFq+yx@Pl^}ERJ?l_M`H7o(5o62Qa7owPz@P(!A+^yw=#aI1Aqt#r_lHEbw3c;c~+9
    zX@)eBe|lAW{ie#Y!L2Qlq@(mGM%R_-|n27&L0&pyD$Dk$VBRHkRAz8X?yNZ}l@dECy3t+H+@&W1FH}q-8RL
    z`|ph2nt5N(@(x}Jn_1tuel36Vxoniv$1jX|;q4vH{!+4hiMPeQ$!;u7*<>5)O)oAM
    zwCj6=DY+%P?`6T1@;DRAPTiiZX=eC@am9Pft$YZPJ?V$72<7^&NcToZSt15s
    zi@&|g?wn(h!}v|~AbosN-rA~IhqCaV1F=#pavtwS`cA-$FKP65#kH`~lPX(vCxza3
    z*_l->RHe6S=3QPz_`Q?~a-lXn^qDwjLAyP!Bcu|tg}1QMwy<|;73+|AqPHn+wKI13
    z?z$%9m3yiMWgQ6JhPig`YSQaQl5WdlPYLlB*PLAJ4ms^&@G_P}C`EC&QPL{JM1nG3
    z^E+A6?B0Jk7yiw5;~Pu<-(kCvOD?{m3CCA7)vz?oC3GH3Na_tkH4od;yn@}m#XcbM
    zenNF`)Nl}^Nqz#o>~wGoXvbGQtsk3VBHbYqJ`y#G3Y11}#oYOzr{M3>1xSjeMO7L7
    z0A@Ue+vB}liwvkhlGP}&}zPA2IJm9LPr=|<#MY4#7RER&znrk8T`>(jZ@8A`rl
    z8qRGP;!e);=>!dIkSD3NSa&Mw!te*ZkTpllArAFI^wxh%&O={MLJd$CxfFJ_s;6f-
    z#sZqgLRH)NK$$x*P%V?~uvvI{dXPE|=B@3#@bJOjOiIkgPy<@C^rVz)FV5iN5ox|{
    zwp#Ikbx2}$6nE9p0KnW-)lSe;yFsrNs-xhh0}Lp;4@K*EzGWS__Pq&f(c#r9D(ZJ6x3?6bw8$ySfX^jR0)SZTAgsou=$)0Odt&k@^U`;M^%{oe|C^E(dZ~gKN)wSC-
    zmQql?q+`UvV`y~llU5Z_)hfFLz;b9=fxmbx)2cTjh_HS`Q0jmdHL>ak1E5!72Z7OI
    zAoX`rUanm!RH4n6z-BD4W9-qQo{tq5ajoJl;uA5HX@1CX`5O<`A1!6%lym5t_ra5V
    zDWzL4i%M|kHBywKX1Ol0j$D5Tcq?l~L%8Cj^Ij|>e7UQF_IuuX+YILrXhv{@He^N`
    zgqWlSL9SdO)v|O%!t6RMkP>)VB>tHjVh|QVpPcsMA)VN(#Cm|hL9cgW_RWBNU%E*&
    z?smt|vR{Pe6LVs=xx;_Lsb0mf8=&w+x8xa~zy9-;5VU$|3r;;F8DOqb(k=Povh
    z42~gO_w+fHBZ!u328&~1iiXQ1FGTZ(IM3Cv}vw_
    zg#?ml&8x|p(!Gefug&t&KcH|J#sVqk7I0C-jmxNQV*}&yU^*^Dddv>eP>IrZd?Euf
    zrfeSX;f$2vy~j@y@6fX-7}&>Cmu1Akb3pM@8^#!(!j_!??5_`y(r2K2cJ&hw*yb<5
    zUOz*MQ*#r244M9B%@`GGo9W{dVzMga<@5N2G@NR`RVWz8DVo3}!P$gsp)Uq)?tvU1
    z14w|=haV@|F5dChQe(tFXwxtl4kLbIM+=lf;-Gx_&*$>`;4;&L1I
    zyl@C%;?s~z9tFlyOg&o^%U8@K+ATmQzb{{h_k1WM$y?1h>C9r*SF-h6s)JJsn)
    zjCW4<^|WDgaps1~IQ>fB6IFP-k#EJjP{kLpjt5iG%!WP^95TCrSSkK=%?@nLQ`71}
    zlMU=$kD~&1w!Hgn&H^8&(KOzJ>2&b2T*AEtvI%V(b7vkOx}eK`BOWX|)y{fGJ@RcO
    z32;C`gC_eGJywN14BSTE3EWJ`ll9`Nqf{RaEfdMNBQ+?b^CK`eTNGpJ@QlMvqJ^|^
    z69S!a9g^7B@VcMeboE!)O$oYOX!gRZ!Za?L=yW#BYKqM|4NMbnP$B8+BJPB?u#+;p
    z!0VqTvb^4RWa`llstF85OpZH<0-4WfA0G|!i%41$;ZXi~7_6}eZ|{?K$FuiRl>q{J-$63d
    zy9|2~x|hR{_2=YqO-eNTQ9sl^n2swzD(mxVaSZH3<5BKAD`T*$VBUCv#;!XT`lxbew8JgdTS`qqGF^&=2s5KrT3L_5Eae#~)ISeSm7=(~t8|n)%
    zZgMoNIPNTw*b-&L7?~R7xY^VrfD;F8gQtorqm75-c%+F{o-?u{yI1Y`on1a)uU{Vi
    zOui>@rCkK%OXD;Qdy1u7Y`5Bp;SaB)Bkh;$7bN+Jf8;41-D;4taJfo{PP&@&u2Xp~
    z{xWI};v@#@{&SR!fNg~)_+H5PsQ+EYGm7iQ&?=3x)tcvFE1S`EK1MnuMB<3Qv(-Aq
    zawH8qXUg4s6p+tE?LMp0P;70%7{Fq0IYcPz_J=pr983Vh_~EMasiLjUgaLW6_Zn>}
    zi}!Ori)F1T#u@699mVF(8}V#-Uv|y_&fATbP1d<;-^^m+HuuP_7u^2ZG}~<0x{}ykXU>R)k^(weYuKl*Loie
    zhe`N|d{s*Rh!&Zse58j`dQ>;DdSQLT$)swcCqNAxQ6i7|GqDvEVuFck3ss?MU<;9)
    zJbY%Hq#$$T#=h;w?da@=gWYln7lfm&&I2-7@u!RepJ<;_u=dcaNkCB^B=W6m_nC6?
    zl5&*?2aPf-vozVw*J7{|U5oyIy&VjLf0miYz0aJXLN9)_pCdU#nbIxG@9sQ3*gW{(
    z=FT&<48?C<{^#w3!=3#-Rqh7A#e>g*aIpRJ4ucqkml5v6(?Rjw3PPG;YyPR7-rOyeng}}&+dcKd;SaKa5)H%pIS9Leol%RzISc2TS~!SS`-k2lHDF?;
    znf^6erznoab)aw{0V8q$K>fQ2IFWSNX${19z(~+Jpx=fYv;Wfms{KAO{{v+-jMMNU
    zxQx)h-&yYJkLfUF*oLaU+89}PDv+aFNYC^dBi})DMjQbrGF7Xgw`i2SEF0sH%7!Co
    zh7}9EN3sDdE_xBj3wh4ch}_ef$GB_3%m2i{*IuZnK)7M^3t%k1|7~!(`nOXQ5de+;
    z0i`JkUuX$2r3pT7wJZ=V&ac%>l{)ZvJ4`Sdh(L&dkxzzz1$g>KXQjwTm`3|#1|6LD
    zVxm&cSwKz}j_iRCe6%svl9=2=majTxd91}$xRP_pnwc7H0I#QLEE9zNE?kJjerl8N
    zZW!QR#i7gt?banSE2xJT57>EyM=9C?p6%{xr%$(7?9OWDRN?1!D(Xl!mUQv2EA;2+pK?Y8%(O#Fz*9)(BEo#)~6-HbMEiv?PgI;tl
    zVOpazIynsi9fq*~_2UTrzLEDEpn=XY*x5ql{8-nYv}-!zipWo%_`<|Rh9?(skOb8>
    zshUQ!$!%(yPk&opaWcsPRWF-ooz6=*ze1jBUP1E_7_yw?e`*#t&(N7^j^h=FM~FM1
    zzd8+e%waLuW;aPW77^k^iXr_aC&4?c>hLPoXIPx_`q!F<>H2TGItW{cml@<`A8E|x;}I5!-RM*a
    zaPd6ps$9?tz`G6!>d3MN;~b3p?xB=Jy6<&-9eWx-W;ac5>l-J
    zoSvDg-A?BVw+J1}#jj%SpLx888TFizbgzpTN!$RevLM9u7l|mzAu!<4Nv+18YrqLq
    z(5o5gAXOc{6c2u|d4z*NRD^UUWxNV!E2!#|r2|M`c(utX8Qs=#iKGCCp~+7}I_aK`
    zI@&6M!gf-zXPZZxz~!E^34((K643(=377Fkxx
    zIaH-$H?s+wUZrd%w2~{fHndZt{&IDZ{jVJ^wh3iR$)ft3db?D6{BC}6(R`YJQb%^D
    zga}<+f1YSt5BCn!Qt7^N6^BzEbnwFAhGnI7g9)?C$&f_98U&;NHPhEJZuPfm{AP-Om$Jy_d!rj~T6g
    zI^USVvtBOPkp`Xn1>#t?3JT6NfzZM!dDvLSHxyN+EB=Udp916rS|H0YaA%bDRexNT
    z6#Puwz;XFLF#srkp@=XcMHwOKpPxJ6#UQ`U#b?gN_#>GJW$VbR1m3j$sivahOJ;iE&s-AA1cxD0YFG4|nU=e0U#MwcpIS_MnG%sc
    zef~_X9M>O>5r}4meG_k%P$kVsJTZLWygrvYH!FO5Yp#tL#F)FIL++YB+mVzseTT$A
    zroBk|1c=R
    z!ctaIPmFlk+mq|`xED~ELUaGbQ1HTh(j63x4bdLp%$+R8nf5L@lLdE{#lUBpH>-0u7|}Rm#`9M)`&~6A{Oi16nl*Qzj=k
    zjjJ=Z`>c8JdaucM*xr<9uRFLqwE^9d(2IZlQK)pMOUfBoGE~M1UngAskj0f8Z1qhd
    z-n$GiOlTW}S)rC+O^59aflvn>)6(?7wy43M|(%58UV7Pv!tq%kVX>o>1YV12daXs7&T^I6Oy=DqMNbbqd+HBSJ#`=rGey<@}21ojIpr&B;37%nTvs-SWx=L
    zp&i=@OX35{^bQ)?1eUG|&=I)6b~tQ6LBu~%rmsC^lr&4e7xO7md^?qLPE5r$*rp!g
    z;ING;;uQcC|34_I%=8?&UJ6KN0Z_D63Kc4u>L}2xoeqW_4(8DfulUZsr~QVphhGhV
    z;$HD!NlOhRd)V+v3C(o1X?f1TsjVn{S6zq
    z&@`3Ej!YfxZ_zc~84&yuc{#0hfh0wMN3~(xg2~rlw%)v=;_Z2z#X2jJ}?tYYrs9U957|C}%l6jn27djgxf~U#N(m_W9WYZ8B>s
    zP}!&y)7q4+R6cqyEw5<&#>YCLrlyj(u{2J~AGWqWsak&!^@cT^fEs<*nNC~}*=J-I
    zWJ{MsGXpS}1H31h3?cx68I3!a)W;@mp{`${8RKc2f_V~74MKE}7q$&er}W&BwJx}A
    zagH-RrlhwMP|=+snSmud?Z8EvsKMUJpNwVX##|>01Y(TE#W-HMSvv$dJ)sI*IHVPl
    z-dF_$Qcc@34&a!Oc!O4r-xY69o|#%zDJQ3EpE6@vJfHS3UC^Y(i{<0)8TWm?a)$?=
    zu#3)k74VtiMVddgVDhPJYIV${nr)$4tjWp1{8_~t4E^L1(H#m7+m(R7M2-XU8%K^Q
    zU`+(Qb5eLDr}VJV>v&TXP|Ol7b0zE;y|^|eBx{B5P%tD>lCch03<@rDi)|pt;5X*nt9V|qK5a#W9};q-eASV
    z6FCdzBtW)n}>1qGh4
    z>e>b>shz;#?wE6Xd%u#8F2AsGoVk^CP(O$Jn_|gM9RCAVH1IRI6I_C$1Bt{jocT=Q
    zwD?UQJ4e)vi|MCq+}MA~XqQryY%=QhVnJRtB`(iQxsX+MC0D8R9W37bY1Lhl#XBSM
    z`bhKP6a#BBspJ|W(p8Jl?hdHmMSMk!C*){HC_W&iUUr>HkXX4bYjbla*fRyX+&!jL
    z6p03EtwAT-GPyA<%Vk167%wyMH!l4BW@Yl$%IC_1#k!MQNr*m=Ga(C1q4b*}_}Z
    zI;}F>c%Q&C?h~kv@lVs5hLKkuSwR?WD#2(NcTuiqi8wi8m0=JulKu`8A-yPe22dFe
    zMpizm$A=9#JK@l}U}gd5jXsZQVM9&@3>Wh(?!P|Tz^F0sfiE!o5`Ss
    zJ!m2pH7X~tHVB_;S1^#0Rys+kQ51&}r}KPCALvWwUc}^sGF*C@kM`!OqJV8SA4rOd
    zw(Ob6)bn#NfX@i1TCT6ExHkbN{0!+dPX_vGnmY7lfiqVJVTS~UK!W;l5?$Y@^6Z@J
    zf7^(c&SImsEq_QIlA06ph#80xhTj~HdT^rZ@PrdaBQu+br@j=R8`K31hbV^rM{+^g
    zD|qhi#^{s>j$_Br^j6RhQHr(Mfs-6&1L}Eh!m{5dk)Aq%-TU`ZJY?5{fXsciU+nAW4oe7
    z8@fD8{CmCJ1$K@6U)4oQPvcSJK-H*G&F^wE2TpaLXI>qT96!>P0t^A@|glQ{>`o5Qe8o+k`1E-kD)>LEfi_&(unNg$V>N
    z;sj_R4w?2^&{|j+43}U6;TyVDKvx1Si~&9v;l&WcvdS*cM?>@iBbK7Hmgp|ZBkQ~d
    z(S?S%VKB8YIO9Nu#NXz6gB4Toh7{TV^ImiY;D}3@6{VI|%%Tw#k_?9(xoISGIrb64
    zQMYB7pyy*$DQ>Sgq4a5MQFmtwM(v=0QTt3yi~H)eOWLYpsbb~>2FFaic1g-NNjOVq
    zVSv-;4bq(s(bT=n@TpVxUw3bnu;rXIy#~0!C&*qJr47Ce%5}sbJum3EtD0Bb>0IT=
    zKM)VbhTt^(Lq@BDi_J|w>In`0C*i@VT7W^&q?-Hj`IqDWq%EPKY=cJ}Hl*(5IQSKp
    zX~{udX!3>83@&K>H29puw@eb-U~O65m|}tZ#%HVqc$9oS6g@msjf_7i&UoYu#T|`;9ssZJT23`_&1Br2nML!j(NmwAs-OlAJHVQL
    zuBQjitTJ?D{BVB7?FkO&Nt~<~vlcH@&C=()W-e~M*rq4WW^yu_$nOqTcxRqv5rl5YnEu*S*iLHGW~YsxqvN@nV5-z
    zbI`jwZdGP1-Y(T1zRP@IHHo|8h{s*@q!*sXCVsN|r(bJ!K6`%LW?J4TeZvqZE1AXc
    zCDQCE^*#NeVqvCSE|~iXwX?T#w6k}3w7IvnopV`X4YR^CeNFIe`*7=E=hYG35FD3u
    zj^k3UQDwF~S?Ercv!o7p_Fn96tG)fb!=E+}wx3N|g|V9*pE>Malg*mOlS!}<+x`#j
    z%xnMG8Vu=ST2vbcxH3_;3k{9B{k+4529v%0%2r^}@oe=L%xSLBQBToaQULh7p9-4Dmw!M$8&CLU
    z94=b*FX4#gm~r51ZU^NgXBoaB&Ne6>D=NOWRY9ziVD92Og|A%bq6#@1qL_7B>?G33
    z1A^pME<3GO*e^H*tV#Fu<*s!4_*kT?CKfxr8Gqu!PgwE)NAf}$W63cDcpd@VHrWN$
    z^|iH9HAYel*~|@fZ~k=gfHA9VMvtm%){Oa2;zzTYx!H{E+){?xoyG(C<{U}mZKH%i
    zV)2UJ`0v%D>WWe8GRDbbN3AWV!){x<2Db_fDI;iYbzO$9-^ZOHYb2bbrhUNX&V+;5
    z^&|#j=5|OGjf@M-tDV+=C534!P8#}ErS?p3q$J{a`4nSVdJoL%wb2OqY?n!?BV;G)
    z)THQAOFJ;r!411xmsZfxzY59AvN!1)dL|nKnDs|tC_On%#TeO4&xszdW9_e0-muqI
    zB1Cqlr+y6j>J>fY=ytvzb$ZqJLBD!Q$9*9Ad(mwKa
    zLksdc8Vv9yj?VF-GT}GS#H#s@RtG(r(JP#YgVS*(N+^#&z0BL$B%IM5Z@|xq&UWT7
    z=)YLwgvm|;jvN=L(60)EVYfrUHDD2SCkWva9RqmaJ&T`!vOY258=yZT1xU7I0qg*~
    z5cZqoJzfJ*rfUJus{pr!7MZ@{1f1!zc&lTb8SSl?ZVl~dfOTYe?A(%l=28GpR|vn>
    zb2V8su%4BU_Cbm}1hS^4nI2l5xlohPCVh#%(yq9(U>b1Iu9&
    zMmh-QJ*9I`={U|~ZXqejI87P?$D@fZvOdRIxy3~{`DnK;tTxn_K2}0QORo=;)K;a%
    zim&~!IaL?tlTh}QaZVAXO%tZM+R|P~*fc6$8(&RQi@oh-Iy+IMr#fXNCQo$YDtTyp
    zeD%!|2WPy#0{r~V1hmd1>%W=zmAi)%y_?E{?iA`S-#o)cZ-tDz%MT(;0l=
    z=<;5g=oU(>0&37(
    zlY(x(LP?cYcs^#o9kvCpc5cmaAD_*_)(k=BZ^E4GMKYdR7@gcuKgw>0)1T_F?!Me%
    zZ(BPHNVwmB{*RT;8#&xLNEoSivfU-v}ugQzQH8p
    z+Da#)h%>%S{0iR(UHIh_JMM2CS1Hz%s$Fh*ziEta24THVmxC5U@Vx6rk(ajsAQgyK
    z@*mdfvc(ITT8kT0w97LFdQRCXCFKLzXsMVLjM=&z^@a@t9baQ=#txLoKo%1|7XJ`W
    z9UoyDq<1lHqgy$v!bs$!zl`FzQxg~H|Ku`2t4Tcs@&~CO3)zDth8!o^2>HJ-Ph|4W
    zMqN=y4g};5lbWD$G1Z#(i)`{`#5}J8T>80e26`BT3v320%xS%!B@5
    zh_PQ`jUH83swsKD^X|pIS|xZknmGUJezP(GfYKj)E0yNqyU~D)cni&Y)Eb2mGYR!N
    zq`(~^39one500>0U48e>VoAJpN=xMEHjy?Di_&SAHq=M7(O{2?j+F-1$nxr})Vk}4
    zE|Uu*4|H>B;WHnA1=xv0H0M}aoPr>%(-o!>bt@i0*^GwdidXn#)`KzLL96O;7@bpi
    zZodt*#ZPyOyQm?YhM+Z119mPIyG@*vmkta{1~+eeZ0wZp?9mR`Ce~F*d7xd8sOXQY
    zYe+YD(Smr9Q~>~ZzsHIH0LR?6gm)oEk75lWDL|@5=wDzp?==&CAr8gEvg6Pf
    z@FbeYv$NYQyX4!VE(bYHMs6w8<$G)VN#cSHfj@+40T7|Di9X#OS<%qxtrXp(!c1TZ
    zZ9~ZR&|(@6Q5He9qO6U${j7uJrAdhRcK4Z;=H%SCxSywj
    z@U}=i10b)ruB)Gizg3rNrwhOQR{M47bn(=-SbTW8`j8v|ZSd*D_W(1-TK0T4(C-=?
    zlLGp|GKGn6+S_kv&smvO7YiHe4zR#{Qkp=fOU@5$h&kIhu_Gy|YKdO*63
    zTb;*KDJY*-`YW))El-il5R`C+=vWW`uGivojCR^>ac~+>d3P$!G=XfVx(UMl?dq!i
    zfeL-Y&N(M!()PCfOco-m2fupmb7^HLX?&_3>w5-|DlP_4OLz~n-eH^`G~iFJuIG02
    zl+qXUZ}#s+VkfwKY^g!5{){3s;
    z9FWcC1DKLS<-r6whi~xGwHA&~LZ}ohP1E5n;GT&&hX!BAb6H&bt&6@}ZZ2x2GhI#t
    zw^#0$>aVp*?V@y6{KK54kJzX5m|~hstuAr5XXinD$&#N+lMrZCqJ;l}bos~526cN{
    zY*FYsLZ8Mypw)$v^&)V~Bdl@;{}2s^rLpz1L=^QF<)AYQ^p^3Cyjl!&nzcI61I4W-
    zKWl)TxqDq!|8{1V;QwKMF#GK3;l#xJA#Yx^Hna}ZW4CMa=+@8^bl!OxAiMzFlX2iD
    z?Po61Vclg`VCBpTif)Zq?>9petrxs^dnd!jlHI7O+J*cm*K6fk`J!-^oU`jcF>A`x
    z0eo;Z4Zf=rSA)m$XD++Fd%DJc$9?%q-L<8kI{im$h)IDL5yDBF$B}O@=P^Qjp;UE{
    zGb`bjD7>1NL0rnX$G?>P+d9udUoJ7wy6Lh|)x(wC%&p`jcXyBXnVjR@#Wmh-h!qbi
    zrZ}pDYg7BEg9Rq;VId?4QbIfJ%hi1vNRCE%Dr
    zj|;xjezGbT{qbiJ`F(+8>~w;3!qQI@WG1oL%l$Vs?Y@kt!cuBmc%7s3f3-10&ZsUH
    zeb-Fv0byM;c?dHZsTzEOXgoSgZJKmbDVhqFEOQGQDVwekcH7n)#b@2f4EaPR^qAxn
    zsM-6&j`x!XYX@ahvxn!X82Pu@RN%@IY$pBk&2aXUclLCcodmVXSulKlnK(eOs!DU~
    zpBoQM69!Fj$TzQEVpzaH3sy05mHHLkn%lvj`hnMbD
    zc0Onh}c80B~uJ*DYNSs3cPMZwZFv$Gp6~!JC_+WPMxZM%_Q>cR(ubiv}G^?KS
    zYlx>GdapB((`ObM=0?%Bqi;nq)!t(<>THotlsIFAk{raHPPp3JmVK!_TKlk6fPYnC
    zF{@up>jf8`X8qAx<-9X88(Qge&Awk1e%Z?V$W!V1@WWPq`WWjzee70+U$!dzFg2e(
    z_IjQ&&OVx@R)FwmUZ&r)X1hO&f0%|p-hxn@AX^lXAAt)stCBxGS)k3BE>xV>bitl;
    zbn59~4)ctL^8G!$X;B-fivhfWwkvZW@OHb3${vu3WIE*|%$gJ|>Lp;6skFaDXX&A_
    z(RnDH@9e#B`}zXOfxlR?UFqLaxIGm_byS?*pxYrI*{U4?PLg{<8-+s&;NF{P#80oX
    zT=N+17CCAjW0-UHl`h`W$#fhc$!(Eqo|BC_Td<+>AXMbLxaI2yCP*Ky{1d&~QXj;t
    zU>D>ho8{iCB#2>?_b|)So?8)*gw`bU^*e!hRAjXA@KOzEuSP;-?Y~K=PhrG8GIJei
    zZ3GEeL={OwVjPvkWp1U1ZpLLq6@qDX9$kkf{;b!9#8!eKw^$QGWcczdjO!^%5|xT9
    zgDAk4MJE;ISAhsrFqO4OxfK&1g-q0Iye0_+F%o3qCS=ilC0i}Ya=N}zKamprRL82H
    ziUzW{v|F6xUc$pnat-&x5%TN{X(h-H>+qA^ejN
    zn{Y|f_$Sw6>}OT7yWLgs8D`4!@m#@v`sw=X{lVrrQ?;H_zx~eloC?3IR_rp15W)>T
    zGfTacq{Y&T_9V{G0E6}CM>=;#IaA?IfJ(bl?Rwh1TD3P1q%tR}A>VtC39>XDN(aX^
    z@9`y9Z$^(2-3@+7xFSrQ14zz+_v~4G3GC#p(Zytz!%;YBHe*jQxz+?4a2P{+o$FmoXns-)gn!e6f&lP!-2C&$TZYx8%H5(rJPRn|jkmW?v
    zW_+KwCeG&9BmFs1wg2x3-ubR#Tt_jp(JJ|mPg5N=0*<)|Av?b5nKz^<*6fOlI
    zZCDhSy-HIk**L0ZKj2n#72*ABG2}=Q%~T$`C)rqSmjSV^EteWG(!Yc~i~&
    zk3u%sxD4?Q47wBpklds-XEF5ew2i8%vBye^>LwdK&eB5K^l{2MCa0UTl3B&bHhD%1
    zJ#8|Tc}S|Pec8@dW{|zV~ji+cBr;Da&ms)t{95MZwPNqT4&Uh^46K?AfNZZ;;24X$xu0L52G=GcIwK^{>X`@@Bb?wRp258k7QPy
    z6?aXu+z(A^yqKSfW~hyww>w*n!=s%SyKmLj!Ry1_y`3Yv@0EM`7xX+F*Q7G-Ru?6s
    zge0!LQF-~+AU=`NKp)kUb2ZqSLRtpe1^o10cOZ15lf*1Mzu#pkK3K!3L{kNFxDd2j
    z4FKA7zHT>_PE$$wcAaQxlI(d8dfsE=Z*tE`A4^k^8QV8<^VfWBIbNeV~y6g>t0fPx3?rdotf(6j6J-#0e5$QN~O
    z2}!m#`e(0RR$>0N2g^DS>)K59L#iDvl1}&AN4xJ-ACSIHp2E!HDE1xR>Gz}NI2y-%
    z4AI?gr_b>AeYex=jG&DlR4Z%(Zyd&UX=&SDSbzOx(Y9J$?PONG2uFC;M(tK`BV(Fx
    zB}Qb%Vs-?91crW0-rdz@7_|6Gl9~-TTjO)p3-E!M!%_pBwa4h(wH;oe%Ka!p=7gV&
    zl|0PjV=t~yx6>TS12bSyJC23L4LDuh=t?YK4}sf*ew}H-5WZ*sz4(hv){jrN(Lx;^
    z$FobeGCOYOCY-wD1(;!?6_>bhSY)~^AvkiNyLeU^B>O*(4*CUh0
    z*f1nSNggE@(C#|tYB?=naik+o3x!3#Qk2xtIg4t|;@WVyiX|Wm@AGk7FOuVEdd;o8
    zSEb+7(sD_;#g$u`Onwq`kR~~unIxeFj6SU&qrXy>*c%hET(hhw^pd@xkb&#T$;nmx3{%aYZJYri
    ze~bB88YF{Q5jH5xr59lzIN)M7jA~2k(if_Lp#@^?gQ}HOijbf(z)xp%hXg7T(J2@n
    zW**8@EkRDNeX84;+}CA{DTlAiDd~`ZSw)guiBH&?hNgK@%OpgRq^h9K=j^nrsWJl*
    z%g@QJ&q>E(!{mRBUJiisLSgE0y@>xlSf=j+4G#mR!LNeQre7fG`{$E5Upjr0x_|xb
    z`)l|9+P%Ma^RL|`dj0cn-c*l&>gCIrJsacS;%ZI~dgASzRXBY?CrizEM`s9~3YAv(
    zmY27d3{JbTx!kO>CNBMdLej)jy_=j#7WFeqnPfCp#>5GKsf0
    z^Zy0e63;eAvLu<)Xvmg?=RQ;%k}tz^xHRbZw
    zZRP7_uzA+3f0LdG@XImna=T&6E+b6GI_6TuM&dGCgei^Nx
    zqPT(WJ-2#x1AZCPKz893E+oncW)@6a_5uv!{yuaxhp6)2=KucOI5=wTAN+)j15%g(
    z2R(|wh=pLu*o7#%b7(0HP~X8Yj3L|Ul9Sj@pY%4=pc{-Z7DQFkzNBiC?8aFFS|7~H
    zn3YpQ7Sa@S*1;^L)5?T){DMw9-iY)dCpVTV>NV#K&2KKh!Bo*igZVXA+)A?l>0kCc
    z1tXLB6h*8Jkvt2)5iD-FRVlCCkA|&bVd
    zVfSsuIs$(mFf2m40{ZF5a4pK$Df&Ke!f6TdZ>F1SN)vd7lDE|Rk|jH*5ZkGSbLi~M
    za!)m!=1{RxFzKU!sIVl#hb~h3@5Ji>^Rni!%}R=KWl|p`-$boXC(drseJ+YF?T_vA
    z5_XflicKp1lt*lZn2vPMlNo9W+qReMOY}tiW`uKvY`JJ!Vo9U20lh!;qs1(zRvC44
    z;H(Kgux9PwxPY5748588Ele0x!u6InHZ4)M6knc~KgrH=UB;7h{Ta%HmP-Gxq?`7tJP&jzXI?k!q2MLr}G>H?G0@SqH>VK&Bh1EmOm8R6Zph{6vmEX&H`o*K=U_T8
    zw7P?o%nFsv0RftF-0R(Jlrji@hi{zaA`}?Oz6&MuPkzR8c~|!9Ti27)$=%L*R$6ra
    zuehG^tfq^!!hz%3PN}P|#u~_JHk!@GRo6bi@nIqUIIdUT+kVg$Zz>rb7LSGiSEh9!
    z_Xpz<4x!Z<)~n7qGv`ETnxcC($VL+Fs=>!G`_0=I%u?cVp!&8zDf3
    zX2YsX%u*?nP-KE4$r|`Xnk28n(=_3LL(yw73IA1Kp+4$Jgdt!-m|jaYyQE(uSeHV>
    zwL5SNT%qXXJc>qel!C!PLb73H?Nhqd!BciVMk24w;c~A!(9}&dMlGxhV5>(Md$BVB
    zvJd&EYJ7?H>4t+sL%5fk?}7_Kn=VL
    zsb7k#O942fjWd?oRE3DIRE8nlY$Yr?42R>sM6<&|v0-`>F6L2agX|eU-OXWVK+|P=
    zdLDeE)30-oDwz$2mVoQ95~4Q5DNMRpt9JUe(wXpC$=Nr&1yCm6Ocy98nx9!Nml~h8
    zpa>w44tFEqus2`vx~&EfkMxH{#K$|^S{Y^Y2>!pp$xvu-TkY*Pj@ABab^K~)Z%-Yc9PJ+J
    z!T`GHTNcrq{-)dDs;f&3MCPoLLTFf_hUn1o?>xN&-O}h1Da}S4v_mKJ>M{ZvUE?B~
    z-gQE4=@!yq2;4{lx|BE;$JOy}I5z>Ebe&U>CP9FN$F{8<@7T6&bH}!g9qib)ZQHhO
    zd;T$R?k?iu9_}J4`k}ijqMy2=vogOd0iEus=afV|YG=)2zxHa=n|On)6!2a+XzYAq
    zS_g@T>{Bcs;VgJ`%<3Z!6y=gkL*&7N|MwR0_pw{x2vB;lf(avy7C)OJusGg{;n09e
    zRq~e4oagnxu84`bb;@%pRTCv>hD07OrdSZ}%jYb7rn7GL;Keg|DyB5aad%89fG|kv
    zv~LeI;tggdzA_b&$wVBIQf+xEO{8=cQ#uz#8YZ#m9m*{!zqi=C
    zvOrD^!bM8oxvGxywU3gwxe^pDRV#nvXvA(&!K3@-RKmlL;
    zY7YI)#RD1m4}7Y?_7%GYIiv#oK;P}IzL>CvEzzLZ_q9$ZY=GX|7f5`z?!(AZuJV0%?gC;#{yIL<=ON
    zYNKDUwc~?mBA}Hm5@Ha#s}9Od>C8Ud6Un}B!aedb1g>JH;sH~@`!$uhq-=nN>#>R;
    zb_z?UZ?ngRV`K#k3Vu5zr@)w?!#L=S{nkBNZ~zX(Co%)*!_$N3iTMS(%9?j~M~l}z
    zbI62yomYL2lXs;a9#B#-0(*>{Ys>Z}@R;k%@#*cZJEZP+F!^;O`1vAAi$#h7wzj~G
    zYkOVx%S>%ue@UDM%4#H1EIl4{A(vgT9RVAP^RFvO^Fx|Lhn|6Y&h&~5t%?Nfy{$xgjrgVWS}~L@QqA952u6M
    z84NHXwtBI*z#@Z+#+@5u_hu2#-@wk41^Rq+x;3KFT_Tc3>btDFQDWR@0^m6-sb_$d0x=R0Vt$!eigqcQsO9dB6<$XxSp%!wAVi)IsMFO6c7H}5
    zsH<(K6h{b>0jW{$3kq2g$FJpO`9!XXYkk_-(5f;hg1lV6()E_SMD%~Y*7l#OjVKnN
    z1Sd-jM1C`Xzz0$xTC$bEV+e#zm?pH|S!NUc_Q#JHh#P1*(0zh5!^ykS{?(LZ`S=K*
    zXG3Zzylr{B^n*(D>;^cx5$@>9As{?0F86&!Y^7v&P{?3Ggt5P2P`)W(H3(8)BCEtZF^;J+En!9R890ROd5K&_K^>|A(#UKvOtheBS}BQdmoKNLHoSxRW_eeCpTu4o|=Q@gZ4&->Ot^EcgK(P>Z2t?%Og(()Rkk
    zV@KV0It$bGh4VcB&l?^tkXOD*>)r$#BUAE-huLV}+PB!o)J<$R_eiS~JBSX(?U0-=R1v>SKU>^JKFQ!sDw4kx}YFv
    z*0G`+BF&qBprw##;l6N9m(VBC+GH`rqF)nL-T$gjdE<%_CL8zX=22%|@aIr$!T=k_
    zN|YQFsD55uyA`B5Qy`(FZdkeq1$RS5kc+cfJP5jDWqh?kiYRH00lLILIJq#G2p(<&
    z?F;btds0|8AO*S;#sWuyB*U^+CO?TOd{k%78mscjb`pg&{=$3HiY39_Jcd|Dt+TE1
    zk=*q&(i(QUrsTOfm{Y<`xI}La`g8hgGhD^QGve!AE0Z$EmCYm<
    zkBNxu{0{>VFb1WZ@5=HkyT9UUs1cs2MVw)Gpk>QTB#herc`Wkmw^^+#8tEr3+xNA
    z;{%BAm44xOt4acibD4H8rnz#Yr7lpXX^LMpGd{8*sOIejKco|n$WK@#9~St(tZ&`o
    zFoMm*S3h;SFFJ3X7#~0UA*gb$6y>{ml2QDS?^9a!h$hOa`{TOZSgrX-UogBY$cE|Y
    zWl`2Nnz$6&VvI4jq(4ItYRZE#G~$}R`V~Zxf>99XZZ2!sEFQTIo_uoF5Y_o)Qq&?-
    z?gp~gvgZ_zSh!=@#1}T!ZV_^N&R(CgVzw|sK~yjwLxn*;_PF}|L0e4O%n$I0fXIq1
    zrU{WL(frH~)2O{oOIH-$V&k%YWgkWnn%g(&-%rJ_;W|K*0AZM@kxIL)@DCM@fW$X1
    zZcY?5_A|-dd4W}gnq?}6W|7*j-z7a(L)nxmE~2Qv?>v7DPJ1&2+zb7KCJj4*LbD(x
    zp#U*COS#&cmlc(MxvFd3EF
    zt%>te3$J1I2I?0ET1+~q^WWHB1Z0rfZYWd%+os{ESaQsSVbDYPpx+JR8s^f~^^g;1
    zCu-*mSu~#rLB5eszt5&E+H&1?h4Or&2L)i$E=BlvO`QuHOfMqM@*ae5hy>J}#+~ft
    zO7yUOB3%FYD081xJ$oy}S|rG++L^w}+LbL^ILRfAQW5L|v0Oalh>`zTj&pQ`N1mF*d8)nmcVy`Zdd%_{~
    z9!fzAlPr3n9w-q)xvL8yK>CbrZJUE9caz3r)zZ!F`^RGkVBnku8??(Kx1*AUO>fB6
    zVZWgb^9Xok93piquC@wr63J0mqfvevW3UW6cBbaaE>^8vVubjmk3}-XLNRAN>-~G-tzRSwJJ2+Ov=g#0l`K)BNAcba$&6+NFn=6e3
    zo`GNiu1MpAxj|#azbozrR4Y899C3Vj`#%R(!dY|oPfO%){vLE$8mrr(2sWdC0jlgM
    zNf4gez--(FIr=B!606QCE6i%w2`XpJqvWPF*O4l7hqVZ^XPG?T!7-cC4J0%<2Wgm3
    zPm$ooh4XB;A+6OkctMdx3svDniwVW|d8!IoiHev(%DG7IA03AJvK3;i>{P2eRw#sF
    z-Ei1Pd=u-7AJP-Er_dbMJ;1;MuMZ8iw8|W>JH3dqFOgr^UI&7#UNf5XxAkldK0*t*
    zN+jRsnk6P>VqQGHdI7uMJpDzqUKIgv-$&)azq<0c*S}~fJk2v*Z$2p{c@7qzARNTm
    z)+}r$^V8WYoaH^bt)VCD?jIF3XY~?Bm#OIbk3CR_fBv6v<&YB$>mnjQsf*po5;@=2
    zpITxLJjOJ%K21pft065}A{F|UTgkEwaFHIUb-m^vjv?0B`
    zxV0(ZI|HLtSN(Rd#e7JrAKNG=+MQBX=imJ${K(ZtuGq$CyyiM)y-4W3_L^uBhxFU%
    zhd6v{kTi`>#f{j5(6fdVSZC;F^bLIrG?fU^ba*kc&LG)q+^DJ?eIXMB7t_fr7pBHC=1AGLs(97O)aZ;})p^}XwKG7eH8mOt{T9O&2QVRl=&uLy|fxxLWh(Ku;GtAaO}hWvm{!D^`s9AEZ=YT~Nx
    z@VT&ajVMYL6eQ{y`WNg)82${sy%R;6&cCL6CFK}OxRexcEL;8Z%5;So>z4I27TvO_I3c)<7ab$^t#SyX>6r>jbtFGDXqks$3(q5oaD=!1**J47#@(|Rq?69Ua4X0
    zn*@Mp8!uL^9!YjI?R_3I;ZD;UtQ)uN^i+OQvznJ}B~P5Yo1NrD9b_elI`JF0JJUGm
    zsaZvQRXKc3jMrFd(q?|wzx|v=`gNGw#+IRaHYRiC4SJhq{G?LkPVN%VZl7_yYxt4~
    zV|GW@4>T!o203Q>%+1{*w>AWnz9N&S_oA1{_+0Fnu%7Br;po#%6908QtKt2`KLALz
    zlk`39Mu++K${F#di^0hT?fYHoHN2b9DYPHhDXM;(R=rJ;U_iBuoU%|}+}?zVQ5Lc%
    zJN6quAjaUqOzF%0^9tR%`NqPeQz53cMwF>^LkYn&0->{OC`fXGf530GMqG(7$z?$t
    zWy|Vl;mror=CrE5&X0xQM~Na$H|E^WgN8vOFlNWx6x4s}B`nO2jTh8Wqu2_iw@TSb
    z1e9R$ohyo+{LVgL+y?HM*u#A|IA1u_%99k3+0#5dwUji^F34=D%ou=z@tZE;Iib;@
    zR*ye~QB9g0KT9oE`U2rn9)8nTjNJA#p(}3&lsiwzX-}MUi|Jl_b|g7$-GQ8ngSgib
    z0Vbnr?YXK}N?a`w1mw$_+Ux&RV9&BA-O}YstzGQkI#mRsA#HY}o{2$dh&w#FEbFLVb
    zaYS4afOeW=A-yc8+)r4=WDQi_6jcVsc%uy^HfT{^cJlIYaB=coVPZ5Ou0A`Dm}FL7
    zO3z*3`qF18(z+!Z*E$tHFU$>S@G2t)IIZ~;Cnl*ERjL7>Z8)@LoD5pk{Q)0{d3XG4
    z{hI5k&=(FN>!>3f!~O}Gr1p>-h%=zpzeVoTSYa-aE?AfniEdEq5L`)GzkHGhm=$V4
    z@4-NrlW7WEjmm_j()9rC7$UzIYJx;}MFOV!6yYe$Pozd0^+NGPq|W6|C{Y^m#Mjl=
    z^||Lj_8VIycOyghb|PX{K^e%#Sfv*&)1dxT+<$>O>@~CN5kXm-Un^_XnMe3Vy?%lc
    zv*@XFKl~Sgi#nPfmQr(b!)^Wctz5Y{UEPbs6(YpD^r4}3l=wDag{AWyWa;d?m*2h`
    zwlV$?zjz^<7<8UE3Z@FPkXy@Zbbwt%D#7O@#Tq@n4dX!>-
    z`sNNTeGj1|TiZlzs+_~BBl@8NSM@KREXX^u@y+J%lcPOit^mUen)pRx(0^6Evl`F!
    zD{Uc%RR!zYu(*APR5Fi=F@sKV=$H6|;f%q~i>__rxH(
    zO#j-T6Xg{yRFPrkP7mXRhEYJDcG>ao(?CK0xa3z%;CgBc_0S`qQCf1Mvf;)tlQBin
    zed*O-tDw|?O03frW)_*JP)B^w%z5REx>f#&kzE#|jzC};L6=goN$2s~jOi)029~eu
    zXg>Y|5T!GqXqEH^qrE35{jo^f*-;?}wY^^-ctyBdjN@epy^l$>RWvcIQD)+%L&*x-&645D5aJ|2BVVyF|TAo4f%T7fP<55G8>xJ
    zXw9?o!QkPY8*ur{t5Z|$`#cJ;*B!gF#~*|*jX6i-c@P>do$CR5+r)v#y*tv()}Mu*
    zV4?EOrAs^8*wo%w*e4Wa*3lY0WZGUH+D*X$Mw)NYNeU{LG2QdSVBUk$KcUXSQmDHh3qY~p%fX_mi_c`=;bg9g
    zub&uf0_tftbjzFyZQCFl*yx$#;9J|aWI1&RIodRNN*tHvaFHycH;v;+cYq&2(#O(X
    z9)+VbLEWC`sdap(NlKJuw&AOtzF~G%;YJO$QuKloSKp7FuGxhkUCJSp1;jw=8wkj{
    z9h|9TV>y{r(T#iIMBqZQd@Y;mf+!1o?pA1y-js;E#;;-M0!}T`f#GYv?`B3Mpz^JB
    zHlVtRLB!d}57-ZDwKgHTl62zXJA7-4T!H3|$Nx?7MA;x&L#0In!0rTxcsgkq)EGI;
    zktK7CO$SW*{jXM<4$_5hY`G$;=_wLJB^gB8=z;o#V*%zR{Uk*{z-qfv3<)gq@Tn!|fW<&ILky;L^INW4`;GWfq2rt+KmZgjq5Bo3S
    z`0h}8P+yuBYnbejQvpIT?O8}F*x}g!_g4oF4129xxEIBCQE<}Qoh>)tBOGlSW6=->y-ZL;
    z_Oi3N{GwIpwYO>5!C13MNmd@N-IEczwC;FhSioq`Ggy>P=iECS(VQTU%sttEC7*po
    zdd**RJSbu28m+QrcW@mCnFv8j+aoLX1kdzKZl$aj6q>t#K%HyR&V<}>YCRz-Etplm
    zyfY9hl0Ru=e(@1=FznqRbW)hCFH$XD)OH4!NB0x)4gwnPK4%{xeqi(j@vyetti_)@
    z@Gr$q#H#Dq*`X`D(Q=hbIUzki?C+f3xWVFLj=V~tXX{yBT;~}GlR80EDkucU`;%Ic
    z1nyx88b2Jb!A2=IcxL6!mT;pP=vtRHIm0G+5B^pLy>ZqhMw(aa#5_xmDoVF~Lgtvvy&Z-m%9*lXfARXQHV
    z$SFM>x`#C{VWWDYHA=woww{sOccH^QU{4O8Dedcixg$yp3g*5NW}s1kUoMHJ6i^>t
    z?H0-z9m+~vWA$mTg4;O9Jz;WPN&)xwWR%Twn2DV5TSvg$<5wgxvs+}U$A+R~)`!FS
    zN4OR4&R}D=f@}ZzPlgmsE3VEaO2P_u(
    z>4Lgh7L=eyUU8{RP}{~hwso7kh2(vu7nffS@y&@k
    zhT@IiJ)4lWH}2W^#zOpFx5O$hevm<$D>M>F{H6hXJ^=TXV62khYA|n35ne1aS7yin
    zD1Io*rz9J`{Y&EIW+ws!h7Yt3Ig?#BeqPWta#SL}bl)PMQ=Lf2uQZd*%iz`B7*^7k
    zNog`H;`wKZJoEPu3MHU5+P!9h+y&a(K-Zi_59F+I$()8<%B9sf=p#kKqbE*`0q^#=
    zPx4ZmBxrkcj!ckaZF0ECf(5@O&TSUoyq*|0SUce~0W}3BOmWqxzm5Pv)@XE{@OgS5
    z4?~cO+3ZnRwq0c38v_}qtcqNBUORjlHnP)CRl
    zI5-v7VmGRq8+Zrw&RjHx?%ll9YD44OxchkSTw!7)1t*FVH&wtaaqH$cCVX((hRfy`?65~E~
    zX=ksk%<$x8@BBcZ<_KL;5Qx!N`uKzMHm5A~2azovb_tgYwg|&hxIwAQu!-Hd{b6Jm
    zog~db_bwK(2~o&8TA|gc)#<@=&h*QW9~?M;NPtSs&b39+!RYU7jkd`1
    zU#{IgkLTfw-2LZG19(nDSXl1jjK2z*tWxlvPc=@ijU)
    zHD~=hZzh@0{Xl)~h3)du#22uWL%=ZSJZ#7Se`*rEX}*+U&d{4MEk`CuL{Y
    z_KqI|=v{=n`wBt$t>pZ~J`29jz?zDpe&T4YSO5~#NM#fJ5BcroM4R|%r|_9Xq6F_b
    znSJYvsZ@38r5|A5DE)&JN7lU_5{5H%9Fr&p4I%
    z5l${KB|m`}vVCJ)orJA$3C-~KO6Z0Q1^qlX
    zI1u}~5LQ{Xt`j#+$i$UXng6)@fys
    zD)j1^f3U7(J(;IxXtpz^SR-@x7>pMO6!Lg|M~BB6ms~XnZ|CkZ1P+mYbNkDC#9qzM
    zywC5ZBMPMk=%HHif5Nd}RM|aQ)b{#lSqk#FR9UVV5ex&)))t0`EjN=aEDE#AG{&4k_H#hq)xaGRp|60wy>3xcashg?V+hfM5&%CDGmDwwti5KC$B
    zf`op|3ATpKTbp;XerP%s_)HZh)#A>A8ha)TqqEMndEEFeIp#cpa`z9L1b%=;WhBXp
    zHta{F`HX?;kbyVN>}Dj-uXh9IaG0Jo!Fs06(*uh-`(z+<+eP5fM;drwntXk(FBR5S
    zQi-y0bF9-|S9FcH{!0d+=g|~I&>i0P(10<9*_ie@(Zab28SQW5qq~%zM|m~%?$Ij9
    zV-;_>Fh(cHPm)$UF2rQ*IJSI0Q4?=&&$|>=7Fkl8GeFd4TU)s6^@7cfQ{)phfYE8|(UBwVhSV!HOdfaO!P${TvE5D&;>vnWeURtCC>{`|UGVG4=#?o(eI~
    ztsWH{KN_l45?hHw<7cY5>FZGJ#VE67T8w*2Z7&t38`jA036@BFfmdyrQDsJq!?N!+5Uwl|@Ft%Cf
    z0j9B5oU1Gahkn48O@(E=#UWr1btUh^eXv4k6bA;#JuC_WzYWnF#_!x`wPQ%_&#jN~9p#MZxrOrsa@4PTy~*bU9tK<6IJU*(
    z34E9ci8{u)fvm+=6GBgCj$P45!5DnW5fGG;GMD~uOBTZj4o;{8zi{(c{xNac{OVC?
    zwSLqT9{fyGB<@K(vb2it!pTf=mbH=)nfyXCA9g!sf$E<+DPm9)j(l%7)k`^}mSXvNhFGzfNG;AgI^I=EH(bCQ0eajB7=I@#+
    zoQqJNS?Dn3Z|7UdikxflU#)cecR)4Hi!#;DJC7QfsEGMtvky?9Ee(#l9oYzxo-pn@
    z;z(d5{;*bzv6hI6idL>s%ko&m_izKF?L=P>bfWLw8|q1|vcSI;gXnvNZ|sGYzo*RJ
    z8}QhHpQ$)95H=T<>?UHCZ+m?JjUT6Voc8tWr>RFbZJT}&t{FDE-wz$vPDH<*6o7R<
    zDQXiJzVCCQvQ4ihMx-Hu-dcL4?WMT<28{0i{wbn}8L!x>E4#ly+Ez
    z56OA~(6;7AbWIg(bq+ldy3JDcy|!*eXwBw6jRxZVDvvNZPn0ds`x3Sjme1jPb=(fQ
    zX1)CXMz_r38~Z|ShUCKOSrz>07mRE{$qvu!%{+_aBQSJ@Z~giX=G*nNrd^R2S=IkJ
    zda|7787`jB75wCXDzA}Wx=H_*9nruSZ=Rs+Pu$Xq@vKkZ+ulz}F<}^#qfZIVJPgMw
    zd-ZF|ElZ4C^?t|eZPfOQK!!laW`4D@eLA?en@yVZRAB3!H@o>x!XgNOGSLMqp>|ej
    zFQnl~?)z0u*Xl7u=twx{yvjkURt^-W_1ZovqI|yFXyj%f-!fguw+nUNuL+z0>qS%)
    z?xRlvxqI}U^lh8{?ZLy62_zCC2q5Y)5>8+k5+Wxp&U1hW`-oI1^NDKaR<0#_Cp}rs
    z{NP0us3zNqVO}@Xl!}cE8E-2RlPvc}c2F?OZ@WL{INL3}n8f-_gq_IwcHdM^8@?jR
    z@dcQZGf&e$ZS8&=A1XsD#iHM-m~C;*pRvaf?uc`_gx(#AaxGaysZ?K#deU`cu;@Z7
    z+I~*h2_EfaBz^0ad9S=QEtl#hD&!#H_I+e%@zp3zn5kH{94Hy&hQNF{uj;!R@KZol
    zWOxvIKk7Lg@V%TL?p6>016G1{A3Huez;qtPvcADm)Va7v%hfLt>M?yFbE&&d7ILsM
    z!89pV^2R;0T{yGG3D16~Oh0n9uO$zUR&j7y*VH=!;G?ta+xznLzedq*
    zF@(Q~1$x>~Bf%gK2IEFeYUujsOweMc?Pe93oq#`Exltn?W#dm~EPjVh1=8%+eQ@~^
    zs#(qJP}FI!J(?P~{M+z8ThFq
    zz}5ABgFj7(Z?EZSh^2X%US?x=m<^LN8&S<4*BFk@Z++>e)-R5hFqx*Y)~7Y7%*h+f
    zKE*uWw=#FK^C4P=(E31h)2vO36w~Osi$zZk4iC3VnHg#AjNe8cQ1AK4m&ah*0j7B;
    z04zEMp&c9RiH&uSmSz_@BX)Z1**zX<0F9{cvsz#Ia{1)$T;e*`>z0_6AGeUw#18M<
    zv4e+;3#~hS@<+D
    zE*-2x$c+B5sx!;<-habnxhxFp#P_g<70e`o-6aR#nL7feJx5B0dZ0nJVFqZwYCv>^
    zGn_{}v)uL?%dg+ws6RDl7
    zG#6TyJ+JhZA56y6ne5Ox;23f2CLII3Th4Qpb&*%ZIhtok5T!`gt-}>e%e>NNyJSxF
    z$XP_m6UjxsNXit%M*MKw6g)2%$b{Ei9F2v~`X$e1(ax7eN7{lb(WK@pPwN&^kv;-L
    zTV$Q{N_ke?jh6&I)0M8CY%?agswgAhi;%~y_Z5{cHq1Ig_ul1LqK{yJ{y^tqSBKf2
    z_+X(SIo`$uUQQ+}2A(=Q1pb?7kQoWx-aX-WDU5`C-hlYtx|~Z
    zN|(YJj_JaGa3%M$uXF#jzOKjCTdFTqpL;IzRywk(^_TfKl`Ui5Z{Frq_Y0f2%g)2U
    zy(w3KQa|Ks*=||k&T`7-7Eow$THM;}N30(Ij+WY~k>;$d9&&T3zLfn&mDgX;^8hLa
    zOp6v*EjUYd)3R!&*XUYZcUxax+TGY5do&Gw+g{M{ExGoIMlF~j+P|($`r5hO$Y*rf
    zbnFJSiZy7iq9&VeBDQBm@Wu9?f|Ew?;fP6jkh8p1MTk)}7J(yzg)fMdoot0zlmsk&
    z>)3Qz3``H4ygr(WUY3RXmSd@&i4W{kV(9@zvO^mAvXV}AHQ%3h+#ig{1H16+{`_Y7
    z+;6oI+?)3K2vMS;`x)>z^o7HhB
    zfhlzWVV@1xceQ;&^;!^io5zC^MHp6FlLk0-Hykkc$d7a1UjkK=tP(Xs6o{Zp!@*nm
    zxTzK%46HS3*a!U)dtsRUj&d+{QsV|9oT0FHe*)-NZgyxv1;Zt`jmmM+M5=S6EJSm7
    zs)t)))abCoDuG*F4wP`Nl(++W#;Q#PLY*s~hic3dInFQRM6urRz9Ynx-VO%5L@IpR
    zfe=G_PeN*eRO5mrY}L5FF+%yYQlbQiXL}YRkOGq5dU<38YQ=~;viNMx%z)7)p6WpW
    zE*U+XiP^1@_d>NLrI`klyV)ybpdj`IdnhrI^9voHkRswo1WpJGq7tKuAf{BK0{@p8
    z7Od@!=!wti4P~?TUQ?;T#3N>h7q@4X0iC%UN-U#R7(~!C78}+*7bBaK3)Kggd?1A5
    zkkp4l(MD93OqWG3H;F{lOjE+HT-XNrtb~DiiEJ&P9zbw%5w#*^ua$*G*z~6y=xE%z
    zr@0?+Hw3Q6{42NFI6yNPf_uA5F=!V;z=9>vWBl?{bwqVow@B4kSkSsmDPRxP&L9OI
    zE68Ez%Hh@NA*|{)WNP*o2)2>6%dnf_k3+>=Tv4(MF$7<)9GnObiDhpvxInb{4G2=i
    z`Up&g@QS2)E((OiNgM|~=_ry$af@sV+9h`b+Fzc;2408Syb#}|V-B4P6>`e~3d?Y<
    ziwJ4%uUy`54nF_k>X0mCx2hEgEQZGMLF|Wt--#F`9Fhel)=+KZ6$*K8IBatcuT9oi4-slDeCtYUmFp5{m_1D=veZ03n1!Hd{BCy~)*O47w2WsC<9
    zy@8%&5w8E41X0>c(A+gd(4v)tG_Vpi(kO$$3<@HQ;VNJRskKFvwfo}&^PN|x4W@6R
    z8InAfkU2!HPD04;b2Sz6u?8fnU!GK(q*UgrC~^Gh>e+r9ae!b3-M1{w!K+&-oJZ}u
    zC?~HTK=1|nEs$YV6w?&YY7LnUq)uLk!=%{&6V@fGa|gh6akuY$PfjjIpDSNOzb_fg
    z_VUf((!lzSfG*aq73$D$zG4tb<`y~HW_}+}6gqlrYUghUDk?>sKa5ekc-O9wX3kNR
    z2q`-;`MrgcU8)C?A1v}tnpz*#+Up`+>ZlN^L($8wE*AzSgQ+V%--~;`ZhueS7K=P`#CY
    zUcptEN{lhf;p*u&fxXq%MWwEqnehuolb!SWpelr2U+v;w&ik#O+Mix4n^v~*TKZp4
    zpKGe%`byHOZ=#o&K#DnS^jE_}^}dLc>u@2xhPuBlb#4eRZ+1QHQMzi>YF0S@+#$9{`KY}Ii=
    z#7B9Cz>z@J)!mIM9A8Z%aZ%vF7qteTr7L3EuiI~;TWY?*nu6Fzycw>-Xs53U;mEFv
    zRa1ct5@G2k$C>x;r(4Z=qa&iUVK(y+!k5`4I}9tv;2Yb2tLG62IRJAQ5*cDltcu+s
    zem%z7Uon5($uxy3%CCpsIZ`9kD9{Qx39!PWT{6X`17|yFgc;7BF##hU#8d^;I!83L
    zwMT{(U89aoPUVEkVp&x7ZyPuV!S~^_;v`t1Vlg}4^O1u3Odgll!aPtjdehqg)A1mN
    zGH$}CrMz`xw^q>Vi@O#H_#kXolb&h|XLA!9D%)R#PbA4m2<>a4j^vSJO-t4}9pAFv1+{8llghK)-kM(GHQs9p5kL
    zKjZo&wD3u(f~vV_6@Hh1tKb8X!r(RhnWMb^$Vf$o_hJjw{*BQhG-W7)4z=O-c2nSH
    zIAPP`#XL8*rq3Q&mc1}vPT~jFC02k>6vMr`KCb84Gg@LBu(Iyw{QK))++;HuVzQY?
    zG6Jh;^VK6*coGdMiG4;a$Ev^0JsUlwjWOL#aJ{?(FjPsQ!atAf7b)}@{j1BXy}x#G
    zFuBOKIfcyP2i-|Vb+?h8=pF~|qxo`u+z*y=hiKt@vJ%YeOhK7iqnUN5)Z}+Gv0A59
    z$Qni;1JjHAly|hN;M&acsjw4{kR_u
    z*@Is_SbIk`FSJj45Acn>yDNc=>xOIOn^GKap4>#lV9!LfFX44iV*z;;@!`
    zkH^<~pJ(GCX#F`6?xV<5@>n=TB;^Vvepk|+l9))Q*3m()R5;zrB%L7x0w+iuN#j3k
    zVb7oFRktUmzS^9psFnivJO8}>DPdtbAq^ox4T#@Ako19rCeJg-FHaqM+5^m|`W`np
    zJj6@g9!U^Vu29DIfBj#he&gH6U(#i;
    z68pWzoXj|LTo*JbCJk~59r;d*ozKefmybRQ@63*+W|>M{tju1RS*eirB?4zkMYP;5d&VP5p!yGo-a
    zmj<46+Ow(JeXM|8dJJ9Z8Iv{a^s(l!gzbqEs`F>0S9Ex6$XCWCvIBoPM~nor&@{kG
    zg|JfAEze^qeER)`s4toPkIdyQ0Brxfith2rIZusScXHz1v7AIS#H41w-Ya+$lGw}y
    z=w3|d()X(6e7=l7RT)e63K4xpg0H|Ab7a+ta?LlwWY2H)wUH@;VPcZR0p77ZHDn)5
    zPYb0!cadIATb!offNP6X2?ygBjD3QRCWukc7p}rRxBo$h3pQNPG1P3I;%rauMIa$k
    z`<{6)HBXUuR%tw4M~jmq$g@{hVhyp$gj9!UO-BAoEZxSrj;(ayBAPTo@EIoOEcDc);oQS~h|Ci22G5qjCL0eAI_h3EnK>XZ
    z$rVjwqC}&TNmuN(yw|+~sP{f7XQ%U0l(tuPTzbgq-_{Cj6Q3sp1PWf*P84+}pRz3o
    zbbccLlcz<&VL^$=SNpJBwL?OrSdJFgJSF>;c+^rmgP-rcmg{{1SFScsi)aaW6C7T(
    zSGxp}>7YwMaqoFP=ATj-MSPat4i%EjES?hm1WA15z3O)iE5u_wF3s?AEo?`bEZ
    z;)I2^EzFTel8=VG(}^7%;gUEa{8AV4XMdnT)6&j`NKMq{t2`+YHGo-{B`ln50L~vK
    zx`I#(CWcSE(@3|cZKdNV1wAMaNne-%7uz~NU!6Y&Sh-ctFaKtR`LI`4oqF#`Gkah(
    zqhLMGnGIB$5%hYtH+SfuPv*?{g4GjS!q@*=-SZgVd|&&j>Kbuudt^g~d+|DPnEj&Z
    zy(m9iuijO0tB_04siWhb%DS)%n@8v>2V+be%1O&FY`WPsEa
    z&F5rx8xy*ThVk`@>yLI}=
    z?J(%mU#BjWN+4|gZg#IebSd0(lY0fDa@ZafvV`@XiV{wDn?PP?8M+ABU7`Zh7+Xe#
    zH)}a#J!v@%H05m*Z;xGco>-^ZErB5j#!L-n5rU>$zqXF84;?mqAgrKgt~OGk-F{Yl
    z`RnQV3DGmMbd)tawz>tm3^3QV(9uJSOyO#4nu_WW=kqJ-LGoSzrUk|cWGsSXx!9&i4JNHS=L?8vA&u$j6Mr
    zNN}<1F;^R2Wgwu~1v~Q9msA>Y)3yxrzl)p7K+zF};K=(+F<_jB@QspiH926u&`WSC8itMn2tPd%b#;(iM8{Vr%qX(gx1klz0^)f7VEkAbw
    zxY$D%3~B>M^eT*hkiJvbBQpkbq1u;{iqeMysb7eyAur6Wm=T7J_PQY2o*2Z6lx7OV
    z2Etb#WEWBx5N62_6gsSgx(;(RYXC-|!pw0(L7iCC;QB{Z)oL5ZVSt;%PLWQWnTscu
    zMBog9kO#VYD6U(W>Gif7;)_XB+C
    z4E8rqXK9j73NiMM;Y7)_$NTc(Xvtyc>>2&0ib_xb%f~M&uZ{Lx@3V)klf?f3k3ew02!ABSQ73~8
    z=a=N0tVAlgF=)WV`!QZr4Fpjtm6aj2fc8ekp@&8Okkr^D$6h*I-Z&i2vOgrZ6^sJT
    zk}uubO-y=y+@SfPbII5U0VtFbUV`p9Y6e}WkoVh;&Wy~a3W>ov_J`y~-IiCt`)yii
    zN4h$FNjjb-O6Cu}pL;;$oiy;>qw!`7ch*Ztm-35Ps1U!}3>)%8a(DN)Y_9zwxxgpe
    zT>C?EpYJ-k_J`yiZSF&Fki#F6x_JaCn@4(V`#7e3owvQci%&Y6dkq2QM2ekJ+L0E_9(=kvK;XBcq0Z!AZhmAM
    zjdY9bGZd2f!%H>eaDVzGcr5mZpKHeB{r1a5P6uXG6hi=!0{(T=%#fU4UOo@Ve0zCj
    zIPOocL}Z&bW7)zpw6$d*pSUIf+Jl!zo39D{y_7_`qz
    zI0ndhz4=c(r25m|6?{#=Z@5JH4iaBku`!Otiwf@2(<=U*7G
    zs$3AAZEYNgcV8`&-zq5Zv9+PthgHAz@%KW4baP3$qO22{Dw((n)ZFbGVE@~W%r?#_
    z=nmUo6b3`eNVsvz8D`R3mR`?9lnQU9$tWkQY5gMZ1efqCx*g~M?-Sb5zQ{Eko{8|0
    zf1=>=%oIQvEb?NTGz2$W2mSXgt0efHx&E$-Mg1@Y)S>=l>lH$AKX^&7bltw*AW7BD
    zWQZx{6`@H1!2UHxp2oQ3+5VrGhld*^ykRdQxFx|NNlIdMzKARl?lNm7bmUEf>@dab
    zbr@2Ju=jASwE#B&A4hHKFsLXs=wV#0SS@hIT6N{|qW897pT%JI?&E;wK=BbDX3Q@|
    z8^|KEY3U`~B9IxvyVywCyZuI7FEt0MGDy76nM_*0lGxj@3RSm1^LpxLx_u8H`~CVJ
    z%_i(HZD{Wuiqk6tU{mwDq#}(0zA5TXdHGtv*+R{)zlNiSt>CXj9Zyk!t`4mm0GS2Z
    zg@UMXg)O?B!Z;Qq>0U5E6ixAKV2?3Qqii@_*N@C|naFuO
    zA4VTpl17Bt*H5tC*0JcaT0bGEn@n~pEm!+l6gV;W!Lp~H^>Y7>l|rpmpL~ZtFZ%C+
    z(IyG6rlW|kpxQV^Z=n^wHx=C^r^u_F&22a&ZV^dx3hnLg|1;4JB{@apA^6xSqLZ*x
    zk<{Uykyim(6sE*s3b)e3cBPf{W%Y%TO6!IqVDo)C;G*|}7Li`ngd%UkdrZpRz2|J^
    zG*zDbo+Y%D9i6SLe#CK3UQgQB&S^%SJM>03S6*L~>GwoQcj!kTF}Ew7@AsxtCv`YY
    z5nSt;i+cO%gXPmRK2{~R`s$B50orS`aReDUj>6ucONl|V3HX%USVSxh&apFCMne(S
    zoL^DD92}xB<@i_i3m&Oo0dMfpt6Y|~iX{Ix7-CRf@$lIll-Wd*1-(%G$FhUSOmUsS
    z3{A4m?^x&eaR(zk^V25@y16O|7SZoS5B`DS64g>^VHHx?H?O5Y-e^NjSd57D#l^ma
    z%UA_m_>b(1^&0>preUbphg{w8qAsR{`JA~96jgT?GZP3
    z&XP02#ERSwpMg8IBwo0=tq03nscvGRd5Z42P8X9S=oFNcbWsh}PFbCVg~h8LDU1Wq
    zeGeZMt%v*UqCc)i!;2rPg&B+?bOAm90yS_1;0$;eQ2!i@gM#8pSxvrX=%tDtck~r}
    zs$IA_=U3}Bo470Vd{8Kyo}CuW148Kxl6a8@H~em~um$*iW#y52F$_a>9JNPRs4MgW
    zHH2sh%W%mxt8#Jr$Xs4j@j}JQu~g;<+PwDQR;93t<35QRP(Be3$z3SZeE8s8Mo&dR
    z^_`=B4qmFgsMTrTpzSpbKcPIZoS`#t8{-u;0q;i);y6@#Txxgh^EGNY%E5Px!Qphj
    z$2T7v0)y!#d|SQotj5v74xnnrd8D_M*+rFr2Wx2qe3U;dv%G=D3iGG{vZ57#SUYD`
    zq+ylHQeFGUFv|SGnij5$tE8!WZQVbx@vJTjppz=g*3bMV>y(Z!JM9r`J8Cx-$Zm9W^x%}07@
    zDz)6iIyovU%XXPfby@Ct^-2g~{e&o|v+4&0m;`#C(a1uttYi7Lt~V!Tys(5{KWf*;
    z4kj^(%d-*?l&>udgk48G3rjvSZt&!;#p9}Ph#6nYgWfqHFbu%TYY6u`Y|#naf8J!X#T0~PJ27IYvY??TxKq9+WdklGbw@E_5
    z`oJIZm;dMrMSZgPr^{#53m)5{!5I!o!GKQgQP8_7Q$*@rf9a3OLl8d34np%fw;RUq
    z*c%gD9}L;0zx0Rv9Zm=O
    zaUbcni$00yKQG*WhNh>1zF7j)!8SYuzmxf%KqXD#t)eSwbwLIdRuxP|Z^)1myMkUo
    zuA1R61Q4k;5E)b#{;25goWl>X$i=X=Btpw+DM4h}90N?^_?Lt0O;)y>ay2+HU9>%x
    zpz|azr%mZtYXcdfLY9@=Y3|?)lg#RLgh*N^+r_Oq$ZuXhVR;zJn(xu?%Kr%k&%(zk
    z8k+QmsLj2_S*}7a*zQ`9lNMKdziHiGU01aOp4oYrd7_H|qfy-bkSqj~-5=oBsp
    z@ugI7JsVG}?3a}WlHQP~HIgo$Xei-DdDiw))udS;UZ*scC@f91!U0S4Y;6r#wgCfb
    zwsc}*Rtb7>DrJ$bV_1x-H*=@YZwwkl*3&RI>Gqwm`fS7{-;~zgmEDyw8>DT8$o&}l
    zK-M5lZd8fIWbU$q9-1-H5zUmvQ!Y!3!v1@pX-A%08}$a{NgKVFjXFK@HjUkBJz;_xF*wMa
    z7I%AzCWSb`4*FzA@o3Q1j(m-`7JN|?2I_-6F0ri$o+KNcZbJveD&pYCBO%6za|)Hz
    zimjY^B*moS5n5F&f0SoEJ&T1HX`66SVf+66UvbXeK!8d+#Et*L74-GnAq*{`K?_kclK&Q6dVzGiMjN1pVF)uk5
    zd|AdO7Rhm`Zb4&BazW(jqh~`WQYtn+Namu-O3qA~2yNousy=Blul6G&d()Ct7Kv-G
    z>e}TaqcN|wDw{Ur69E}`u-X*kP1aj?ya9dVF%UyZ_QD$qDI#
    z&)>W}+BrNpI&sRHG+W$NS1-Hj>b8iadp`9d@UHuf|?ZsIfbv@HE-Wz9zdjSTj&B!%xd?CJp9B8~!e*-@aj1w7s6vZvc@3z7Lmnan3_
    zBI~I_GJhm8_I1X7BI877I5119-RYY%W{H=47_$HkUo!=47GBu3D5>
    zGFhy|I&!D_Gm&Y!bbcj@L}nAB)DD=nPi+nNYJa2(n4Z1gsbZ0{zi$6Y9qw{chdW(V
    z)VRwDHSTml(&R3Cn%uU~*3T~qFaHE3%y$a!S!`#sEP73$)y=KFgRM=x6XeUudUJAs
    zmn7!Nr=Llh<(!G1ekRl4lFdJC0W7|||Kb3$^`}$&HQW7y=uGEV#y(+k#>RT-4x(X|KEyQq<;>xyf8q>&`lmBIt&3kay79{MiWeeCJ?oRI80``Y3;27+b
    z9fKWPKx}r(Vzc9{ApwB{0ec9+doJ)MjCaaO;~j6N8TLEnZ2O(OY8LM%67wpE6;HAX
    zCp#w_w{gqaI#VxMQk&tGwHcmMM_d1ujrCvh5Kuq*)46Bf?(Dp!dxk!2#=-Od;SBz8
    zFSx_)-6Oi<@WY2=xvm9<<(FTCLOe(T`gTvh7FQAq&_9v|$nmZzLBA43o&y#<-rGEW
    zrAwIvci|!Z^}+TIt-pNxL-pMO%b5Mdyb5}Z8L2K%H)uQIkAL&ay`S7eb6nh?9uzPD
    zIE^9Ai>={b4^mGK4)z#0@yp9X7uB4FUryGElX>E2YbMaLgE|o3q(}Bow3MM1KFwB!
    zUzfB=09#Q!{#KGPsXYuXCYr!38v}%?Mlj39E}@w0bap$K<)qQax-(jOea$0mgf)y`&>wP^Elg@8>>h0}9uA^7
    zv^M7FAse+z!Z|Q+6o<_!>XBV~WSfZxD9IQP#OFmzN!(nlw2%~JoINXv;Y67;Y&$IF
    z(_)eHVRRL`Hb?I5{tMd{C6hQwN-pVgJdsZnrX9f3DcQWnWczG_%uqeM>6T*i#
    z)UTawT{J^u8qWM9Z!L#(5?dVEqOQ%6O`T?SM8J9GLO4Gm%&=O{5bZlVx6w1#ux7kFeY?>%go#f2-B%ufG<``W=GxV@V5E
    z*Qj>-g{pOgYde&nZtJYzfN4N!xPdCD*aw!sJ*4m@>klPVt==ZFD9f(0UR}cS)(@-G
    z4P!C<^$`c?#3(~|NI3J&7MXVi){h>mL!zC?prOAJ*$9upx0)A9vZ@=C$Q^Vc#9ed*
    zMjmc3zBNAgh|hLZzf@{J8nOEi4*bc6S>o`cDoPso{A=R?<23Z7YsR%_Q7@MD7Rfc)
    zhnL+5<4@Jiuezp#5)@H_zp{;~o#;)~zT+c$Z#gX)X}3u-hJDCy#p5={EGpFOWFT43
    z<+syn4JT31qu5l1YPD9Nl_sx3o-DlRHCnYDMWeXxbs$B&HCuWJO+UQgC9}ql{yb=NiDg)JP4_
    zUkU8oHlHyUek?Vbnu1wK7YnfT(z^V+j;LT*4L~g_sqMvR4s$W(4%qr6b|%Aqg{w;l{HKex+LFN>N&m!&D(Iyc%S|gYxe+we
    zznwc{cO&>36`#h=G|*YGoycV0#^Tu+OXm45c8X1DXh!$P_)OOkXKyTVa>)W?xN5QG
    za>C@+oKKyrQ<-7VEQ5!O*+Zq}8*CMwseMq!1;2z3U);_V@Dg{Jw}39MMmBJzicDY(xCP(?wfr>!<7&E=~Qi-gv_CZ@
    z-0>Yl{H?k!u``I6<>WnHb5J{PyTJe0U98t3kY$bsR&QE>a!zP+zG?I;$zearlY3O=?B#*~n*H)v_j<{O}le
    zO{};>DEO?q9--fW%eN;=SVG2a)mfUN-UlUQ4Sb5v>JRE4>&AUG?vv|pI5nAK7TL35
    zN;zZF3(3x-$zQN)q4wUec*H95_Iovcdj=7Yw>o-|*WZm^apM{$PDsu@byt(cgbcUFntbW=W7
    z6En>yk(#sLWTN}2OEAlT+y$A~TP?SN+pm-Zto)f=8k3P)5vS^{)*`b@ck($6*OE2v
    z1{aCrnLBHnnF$Mbo&CfiBtc-(N+fIgtKr)BX(nl5N$M_wTxZ6^v_A(9`i)Uq#_$KGuGG;8HS40OGa7m<`W
    zYhV5YRkR!cs6vu^d2ve%6GU)YC0&~u^)NDUVYPF5N^t-a!zy?JH7T8%yB!u(iR;;e
    zt-xsFhrc~cUV*iT1<6}~sM47i1rpNe7K&yVNtnqDSZ$YA_7Z
    zj|wRs$8bmM36;c|is$=bp;Ha3W%hf(O^svi&S0^u24OTn?=0lP>KtDthJ#@z=7$Rm
    zAS}`O6bg`x?j;b8UMNdnQ4*k`<_f>B9U!Z#>xxSzCZXJCaZ_i&$WoLlXgPVhSPDq(
    zV6zVk#Xz2$V|V;QZNkAJsZQeHh}cHn1hv*Q>HV{ui*&P73gKlH;TzFaha*5(cj3b(
    z#(QGg@t%ST0IcB-EG{vl&v-U|b3=;SkFUz?qd$Lso4c
    z99QDeO&7J&V+wk)PKC8wu|lz3xDBgFKBw&ptt+fQTR@R?t?6F2=k%c31v_bvddD)3
    zn=~rvM4y;f&mCocOfd~o>s_y|;G$F;$I*D$4AYI+^4ypX6EUx>Ji=D`V%M1CQHWI9
    z#H2txcE+%gse_(}8oo;6hUvk3P2GuMd!15GWmf4MSCGk!7Nh$0JJ3$Pm#vfUnIGox
    zp?1=h%^TS2{+DG84{bEUOl*~6eMRaLh*1>q5?5`HnxdmINEx7h5M>7
    z&kb^))L?;KeEGP
    z*&88`WNZe0y2zvDwsEA(dL1ZC$ehwG;+L!gd`gBChvqP$x>PL7+?QqUNFG1C4v#3KDOHxey$;tm*iXTScpSTZWU$N
    zA%_BA%QAdgaAjRPRNxm${vhh}yV;FeSGBdx#sF1$#(*A2?BSbqS=$RkfLE*@SuFa-Z@X-88
    zJ}DZ>~WqM%2^Xb=vyKV53Y2rfE(@g~_Ti;f2`vBVk%m=U_`~e(D1Fs^r#O~-G5+Z4Bemq^}ujl4#
    z>*MJfe{Fw!crn0s@dy4hw!g>tPe{Lca0t?UZ$dbBXYYSVPBk%qD1I-9`CABL=s}U7
    z94eLh^o8#c%3*5!ddRm7p9`2_31foYOK`qi367)0N^0tw7$#Tlo}oOE;l*05l)iuH
    zIN&MqeOc$<1gH&f?}E6@l5fHWjLG5>@{QPt%^~_aE|pW4Mb1q@E;puL7B;9R`Dcf^
    zXM#f~qY>L{^w`r5#!j{np#7F2@s806sv^rc
    z3;P)8lzr;p4hHX|PKzPH*$axU;fOTU0{Zqx{cCc^zfwW}8W@Iw1QhWi#vtu>IJ!=s
    zGFfs#i_y{ENHMSi9}DAFSg(S3U4{$ftl15NVW}$O8G-aQbO9tj9`upmYrL$l@nxWL
    z=^8I%D*OhT2%CDayskem1Sg)l`AiOe;g{d$)WWa)FU0_blts9JP8X#BUiigw){U=k
    zdbsl+={vs+cRCD$>?LOCnK~xP$+XVWl27rgj
    zEe_l6a0E
    zsFEL(P_m(mB~<%gQkz>9Hcpio@t09Qf&&2%G46MMcX6MXy%=iA1(Y9>ClWS+5ic$o
    z{xhy!l+x$+ht$Ef2i$32%l=>m+;buUhhrt85t3o)GfLP|dngE?zcXi*Pi7Ky{8V8kOFX|3Iv
    z)ZltnX5#K10kNk2oYQow8Ti3*)!LG9zCR5+BeQK`i)?rkxBN($9BBqo2uJso;aT~S
    zQvv`I0V!+bY)s51nd=g|0mh2-4|95b45OkcFD=+N9oEwOM8=QV9sLvy-@!JZ=X`1#
    zP}W5_s*KQ+YK$M3VWr&-F3?||(+OU{!|XQ295cTF&Yo^JG$h2OWJ|)2zh~@7Zu{i(%DN5@#79+W{zP>jxdOBa>Ro6UG>z7l{B;c?L{gPG*e^)DFCwGoJ
    zw;|yLXT?>XjJ9gzx*Aa>WVjYhCEho*_Suw^OqYMU@@;V|Z_@HKFt^8I{+f0{KT>2#~&A~A$Ik$CxFvb6w3gWJmslTu=sQmcI6V8
    z>W7>)?O|`qqsOH=S_L2<9TmPjjaEOCM4JJ@et2K@{4H;@&V_0l&Q{>%p7@+#;X%uF%*#{WLu@OxI%@0pFi6I6?X
    zx&AXmi^dJpXco;hPdZe(OeV#mGiM1}^WUrcYfwT)d(O$HowZ(HU8ShWNM)wRM1wdO
    zS(r-~N)oHgauJPK<4@*8t_c0p{WxWyPmNYt$t|^|zDEAiRe>*$hdn@vL
    zEAo3Q^4#h(Tai0DwT=d^tDS35w<$o`I;ef3az&~-6y_AwUiZrJE*+C0y%}?%W$Qph
    zw_QTQtQB69jzZH5n1I3Zf*$(d?+qGFV9ZAKRaT|LWC=T#uBO)YIcMbtuP~3*Ts9xf
    zC+cnK1tj*|XgxR?$>E5Xtwb_;>GFK1@Z=dR=miH0lbFF#FS3Y6Cr-jMW(u>SnM8#Q
    zER#`UQUkZgF?QMio+ze9`&PM3Zul*g*wqYLte%>CcA%wPol;$VMx|0#AZkIm>Dq@<
    zI3_id8Fd@;s5R_yI<-cnZbz-TRr08{WSPm0+>u)2HvXo-j!E~F+C8OqPpRGe`?>e`
    z^X2>dS)xr)y;Glz
    zRrnlEeR9c%>##XCRzFC+8~fpGdSP;TkzAXlqXJq4p#z!15@^x98!8v2^97=UC<-^5
    za3mdJ^PPV@8g>Ti^$Qh8sE38mE#rY$>f+Nl62#)jo!%ViA*gL``d(XK@0Ac$F@e)V
    z4R|3awlKUjYAd4N7qnplns3q*=)2HF(QBFTw+cqg0YK?pJv55VyIP0$YiVDFY)~Wm()yir6!!HPUZQdh?$gL<
    z!c%Ai(Z~+_(fHzW-Ro=+#iNS&)8|Hro^poCuc9sZpX!HK+#p5C9N=3e>NOkFnj5JWLE~BoqFB4;*3S_}c3bsuBpz@z%0QLvLaOCkru*;Kq
    zAq0cj`5;?5lLzv%bF1Ek_aSio`|>@WvmhgX;a5G`c#0@P!7G>Q3TC6`VR65glj`m}
    zAP2XRd9{N+J(?pOTvycm5gKiqWV?g~%xM)Pac)9Kjz1$%Baq}EJM}Zs>jo6@8z-r{
    zs?`Q&Y&1VheRG*YQq%+p0X3k;Yvm
    zSsLdXZ!~Z62ZAC6ISw^5BEwpy^9;)B^xsGC*oDOCs?!XOP948wv-TV+hohVQ0pJNd
    z?jym-^m<9x!UDIuNb!|NfH<3@anQ9MA1J&s&MaoJo*3+jNY6}?A*SYl2JnkZ7@o6O
    zQ-5fFCH4!{YC2;b(Bl9OSzO~PkTHk9(QHhT)Vbn9TthxSW_4UkcVyRI(Qy|3$zCd_
    zW+iGR0~#e%_SgAuFyjrSomuJ6JjX1K#}Z=1va>|U$5lsyK!$NmN5O;IW=mxzpS^H6g*Abt;Zh+~4Ei~R{C>nL8cHZgN;>(Xo!4;I`
    zwIshaPUH1NXN@>OBX3sCw}xFnEL;scwAR+KLpQoGwzhq;|BDlfX({tqSZ}oX1sWo{
    z>Z36#0R&JDWks>bTd5wXjW>NDC`RKx%)NV4rZ{v5$IQpIgHAUlGkseJhs&CK@4~@I
    zMT3wGbzRl8GO}L&(5@n}{ztP`9K;nVh!f4Tfnz2k1JS6wl`1Aku;0D7|i
    zCcw_PiHxQRq$e5;JgP=8yx{9fnu`J6`Xdd?Uw>`nwHejK!)!8LRVu%aJK=~Q?Qq?n
    zxK>n3agg@pX~<~|4v9Yx6ZuY>{=x1PlgMv?l>YFcOzij9Uze@fGafcvd&8%6#A37f
    z518+&SX*)W<)>=-+w$sT_3Rl=baSh*
    zyT5y~5D%L*?tmq1jn1IjT!a$Kt$vsOQQP4t9QIJ~fpM}&H-nI{S{yPDI*cM-cGM7W
    zS+#3!0Q%Y5+&|dg-P+u19RGZLvh$h}IYKW6!`*zdcd}3$$HPU$s++HATn!!Yd4UI4
    zRy=(yqkh~0Minm{i8Osi(|LXTvT?L?jIBKnfiWWvHxPSwTrW0t7ikZ%V6w6pvASBV
    z;;eD0)}EACVX+=P(yIlHAHR8ie6o-Z%Db4G%TaZ)%?d6=z@<``*>mV2rjN62A>*^!^Kqg-hNqi`!-wP
    z>VS3zgUx0PM0S0Mo)X&Qep5Uom;tS>u9Uw~%d4y3!XF$G{s+ynUHrnU%^!Cf+k1z*
    z(4FI~WvFoZYT5%`7dX-DS{yasg{WZXF1HgQyN(400TyDlJRgSJWTSL^fYaUF`sdDx
    z=%;0sq7Gpz(NYTy-4?ks6MYp?Yh%!EaBs@JoRs+w8rBfZi~K@5HVTEbK##wn1$y$t
    zS)j}S*Y!eWyYc*ZTP)}m{7U|OvH9b{5hfPQLUZ5ZFmC})XN`o?eO$>ha4%-KIelga
    z+lJm~>o8~MK9X?bd~>p3
    zM1=@5HUHPi)?p%LM|Q;~pV}CUwKvvLf8s+YH1+YGWUqs+`}3-sA%TiaXEdU|bF
    zzN6Kh_ujKIpPPWX`nLLn$#Hktv2x1WH#5Im(cp$%KP_x6s@3nldtAnUpU}Tg>ECbY
    z-*4&P@5%~>ze4}6(!XoO@WIC;`uSL?7sD_FCb2!bLUo`Qc(n!0{OavH)W*b;o)7qezHK#D9z$viWGgBzsDYCtCd>pB{C&QbNGGorx~ivl^?
    z<1V0*PP@~jwwcN9Mo4tV%$ES$gO3XAGbRp)@5w&e%mXOViy@q5__STM^n<}AFtlun
    z2`maZjyb0{*7le=WhktE+C6y%NK0+*|Ezx6JUZIkKlz!sEPipow^5$oNcOuMTy5B=
    zAYixOhuj-7>m4Wq3pNb;BMJ)sdgo~C6*Rf|e0Oj6}?*Y!#78V2gf@!!)M2Ezasfgz#^IibrVnY!Lp-ZQ1^n1K3M+oaP#DqS9tL5
    z0`@Q9!o>yoUaUPs`egIv4i|wFq)YH;vVa^ZUC93Q3VLc^byY?G&b>yX*@7Qi+c-A3
    zo{N9{@A0dKupi6SkHrPdXdLgrdTgE?94+#rMC-w_4*XNM0aFoQ5slx7FB{vNCz~=H
    zowkS$3o1SJ^zmb_D3Z2Eo3ArUd&Q2oj&=`EGE2z_v`2L;qLXkOa0`x%r#s9P2yK|u
    z21>o5*#5!M>&?A}o!t6^WuRRW2?xg~eu`9kv!AM%Ov0*(G-gjx4WdglEW7fD)kI#(
    zO~>E3kpY_ayBVAUS=+nEC!|1su!**)PrK6CSQ*A4
    zqd-z*?*N&+*Nqy;zrC}+wYvjr$GzA&0J!wt2_&L?o!TV1(_&(P@|pOFL)N-Cjb3mAs1s6|^PsW>0nYEEovk-;n1Mw&**to=bAmJk
    z45R`)_;?tjqGc2LN9T9zeaHEQlfE4F+zOq3JMwjY`(<2a1>l1z{t-g|KvS3>!Z||PKtpKo(0wT)vldupefxXz=JKmuJ_NU224KbUCzbFg9
    zlT+aX6ZjW>zBxI-gFy-MEy?BxJ+r?g3omJ%As6=MPyeKppZ*CyELVzY_7`MrZDG>Z
    z7Jb4XUmtAmaEkoE43dITDt%$n;UWD#Jmep?gnVQ2&oAjh{fW}`55(L%FQ_d3rJtgr
    z@{GSAX=m%z0Vd#I`Ptag35_kCv~QC3b<&ARI>DruM>{l7`oM&@JFxqdLSN7DKHYK_
    z$NqX|uUfg^pSi!CY8avc
    z#F8p68L0~TSfo?A=)v><(fRnvi8@7oqIgeI@RJjry|BM9%L?5n&;Il?8*jD}`H+G|
    z2w3*^>9fHjfxr0k#2xR69WfpyL>ic`zbV;0P4*XLK}7*C{(>YSN-@pSr}EW!{s!Ul
    z;ONB3wuw$b3jE=e!QW0c0?7VLw*aR&MF7<#8<8ZZkPyReAxWY_E_KXh+!QDR%nK|Z
    zX7Lv!X(j>_9fpG6tS}8fFacql67U0A2s;)#27Cw_H5h5>ZP@d}b>e+ARJJ*_N?;CZCXqgiwP;
    zpqSzO6ms7o^NIR5W3|6@mW)(?>*UB5k4#xRO6RAQPsup#FUo31CY?S#{*Kf2FUT@n
    z>NEc0B%Gm5mS32KL^r;{>b|`MD8Q0v%;7IgVr42y<4;J8(6Y*%gqMK)u~}`i(AnG{
    z7s<+jDzOEx*uYnO84SagI}1Mri`>Md-yzxNmto^P_DwiDv+3?{n=Kn}f7z_atrj_T
    zEC6^34z1KUI7Cto5k5>j>|FF!KdQj#MRkLIvl9y8NxX?BF_->dmfUiJ)N&c%W!+(T
    zfT6<9kpkU(O?Z%B7gd4|f3RFVe)9q@l$~SXm@|3Rb(O>2PUBRC6Z9EG4Eyj5AJyOo
    zSugy9?9oZfjBO%Hnbk^4_+yleFBOZBxU^^zplVCTqeU@`C{W2=g4Lesmf2KTK&U{O^ndhb&hnTul1}=Bte9?Xf;pq1@}t!4K0{i<1Ogb3nw!qk1Xb
    zB_J!jEcvP|Vkzgk^kV-M2cm1ETJ;T5d54dJ1&sm%um<#Yy&!h$#er+)_u;qdQtiWs
    z(pkY=dZZX^7b78rTZF5j*n(C{cyDLUuU0I!O9gwx@){~|LxtRh!iEa=0>({u_tV=w
    zZ>!9^z~Y^k`qm4^fH&Kk=rGPRPg~vtjm8%`*0df>(Xbt#G5LIvA1x*}VL~_2n3Q3g
    zEsl}HPk%iQOfl|@ftPu&yolI5a)_3Y{6=Yr2O37iR!yOeSR3O@pfvM77ZRtepV4ZrydIy2|#gf
    z?S3=_tXnjf+Xh^2?Rv4ernh|5h{Ld7??;@#e1>*A@l1d*u34(SRy*UO8q&2GTOeHC
    zkFvm=ffrVai~x$lN>NF!Wnk87{OKH&;a3aZEsN#=GJH}X)2V#>%S;NoA3(?U6e0ea
    zT-=nkXl(&6Fd5Gz@&V@UG-*gqw47vL4#fbC)?nUCb)ZNMAF%WeexW8YO=m;7d0E_n
    zvq*X&XqozvzfO7M^p?ij9B|_}ZF}<+aae`qwd%Y^C4SrM(tEAJa8e`qUpTBJa_apquqb1Q&?9GyY8C|Fo7Mu46tQtwKf^h8GN+d$
    zf;$?Zg;?vz(dD0p7^Vyhodg#jti0u?e=cG;3bdUgis6@HaphN7IyC%n&oBpoK^O@O_hM&>K05n&^>S6V~wieKWNki
    z5x)^SotWB|KAj&eSatP!@
    zUrvY|{RC$qW?E+ZxdRQQg3#C17N7YoKJv}~?3up@G6%>U2;0hqFlm{DJ6jq|wvu4t
    zCv0VaNfJ)*7I;Z8VYW#Gcr7io^8|$CrH&gT)zO6L&g5KBFO?4DzjTJd$jFzR5qw&)
    z8R0j$v#6SSdBlH?e|`=BlFluwO>qm*>AL7bnS0-neiav_&|(cWWamU#7qyrN#_5#a
    zcOmK}5zb-p>>20D@AgiJFG?O}uZFT@{y
    zD;Ay6);@eFoEi2-CB(2ZwB=8}_8}=~cAK{(uXplfHaZSjr6nmwa9A~xLo-e906MNf
    zy%CZutX$)GJ>>8*gYRgWa6Q%yODZodK|qVa8kcZa&y}lc(DF-p*Ecp(DkU#lXLWEb
    zS~YJyQn;(-;U-#3JqM_a<9C+LYXZP&pelo-bOVXeC%JsKq;sCEq!}~T=?$dG7z71-
    z9;F>!0(q?gIa0~$Bcrt6n@h+1MN}F2XK_cU>p6qeuAQb7OD=tqPqO=&$1yqg4my2n
    zNPl(oz{^KgkD%a{^~+5drBm4LZOTTlo^Q}wCk=q0Cn@VmHD%HypmN3>ErTL3uO^6&
    z*0Ys{y)yjNLedP`_uS`@B=gFAIxRu+LB%=lJWJ`(j3{F?q%>^{_$t)46zUe)Qoath
    z^X{;&GS!=HJMN0(lSDSqc%wlJAGcquY8sSX%huku-O?Sg{vcluB%wTtFGZOepax3Q
    zb|sVQ`03bZy%I}HXL?%^Enxm)$>pN>eo2h4v9teUoeE<@-PSCe>5=)8Pm=9-n(Oun
    z(M_==k4@E7k9mA|tObymsW{Z3udu^UeY$ock3_Ob0jJaJGoCL!=;((73QIR)ewOu6%0@K6347Jz#nk_DBN-Y9_vYLpxa79
    z*?L;AK5-jTrExm$-lW@;jY&K^tgFm7h~(o0HlJ~1Rfb*wRvon3>&i1ikyJhZ0o+7`
    zIFTLeT#Ki%-@J$8q$vx7w4b=1Ywtq(bce4F_J2lJDE;cktiSM6=(B@|!*{UKo5_zR
    zIQ@wyFZIGhd>++Jh!o5oe)5sZdOxCWg&^Su-ggwAE;>_uu;@~2M@m-JcrCG;!eSoh
    zI3;gE@0LtmnQraGp1PZ*65H$5gVUwF8`QgJRpQXORguQ=$e@hV!jj;eBQ)Wxay@$}
    zW<4~?dam_WtF8Ftz==_GNQjwF3ZO;0BYWi@q5Ko%)p1YJygCV?6%ixH>X%2=C*PGH
    zRi8duM74mI`)|Z^RwO?82hotj$QnHYQaU)$@9`M8l>*F4{PG37E01sDAJOMC%s3t`
    z8vn7^%`j|{IdygaVCOBGJgm=V>+edz@{I1CGSh7RouX);zfxIwQdxVVR@T@NzPvXL36z|c4L;q^F1E$APpkxc+$
    zY9v;US-%YDP~1zg^F8f(*_i^a-(VQE#!UoxZ-~@N4LyU%x`~C<^J5@FUo{SnGcp>_
    ze?Hl19RIX=Xfn}1QDb}ON3kt}Gv-x#v3Y#bc>C>B_8nt#$v@8V!QST4uI-2Y9YIsr
    zrk{$Qi8i;lj~d6DjlG?Hv)2>aNwwj)81ibL9KG2(X#l6Ob^PWvyT1Vlf25YzzA1l8
    zfSz0kpzn9~w|6)9lR104dnU()VgO!L5TZ!d^bc&fv&$GFShm@uMn9|YY;9Ibe$DXZF6`31P#}YXKMDWA9qW}
    zAJ#&p3%?iBZQ@cM?@eC6?|oNIiBalPJ8>}VFv}YcCuI)_0T3W(hQ;fJJ@lhCZRuX`
    zygoSkdA9wSI9oi!Zo|IUsVVD-KAg_S?OxQn(<*+Cgj+vzO#Vqf*+wJBnI;QO!k*01
    zB${2$1bF(mm7MdIZciV#S%x_5^e?6#54LTb?Q}?^GqyQnlli-wgqq`@j~mb5ym)=E
    zJrm5dx`R$5yuRDno7_Uy$mo*Uc{>|CYoBCy9a&EOtZ^Y$*gcpwD!_ATw3ov7g7;<{
    z;wYHm(BS}2Hm5EcqrFT-m^Da^31=DSY_|vwboOiHd*BZMM@((?&HgUn2-D=g#H>ND
    zguzAV78eWRRNvTJ&}t2l!n(o-Pjx=N04fYw3wG&AbeC>1z9iqV=NRGvaAHOe)?zxd
    zuQn>h*w{L@>CCp!B6>PPZH*SAM>yK?ZSuwR-8M
    zSf8w3vW^w*CH8{mFiNCF@u2OeusdjACgWMX0VY>!f}kK>^tLu?Y$;ibbqto#_m|^_EmtIz=ZVdqXwn(mgyypSv89{Kb;*|A*ay?SvfXy^
    zKZj$sNlTRBn{Db6+&f75(;TGatm|Lr6XE~HcKp|R+qj3Hdq*1oMUFJ?eQDhL(zy4f
    z@qfgZ#uOJ0m@vV2gYUB8LB21B1ZVVF-7(-8C-`A-vojnpV0NbG1|4F5>@tBD=TZ2m2cF_
    z%KGYe>uXQ$UF84UtCVFmQu;d8
    zT4FCgsLZoTb>aMG6sl;5wm+8v+u@vtzyi?i+U|s{GMWpOfDozlVMlPY^>D%tZfx3`
    z8+FW6T~?Jk4$0!^L8TQn$Gs3v1vvv4h8MxG#nCT9y@veQqv9qUz!Bc)w;nIlDSW08
    zV^en+vziB5r_-k0p)aLsORCY3o?fAK(-epnG?WF)Ix8QFbqNcrYnKAAdU|
    z{JKrd1i6nNm%mZV^e;lL(a<;#;t-WI>V<-n+6aahl!84qd-#0Q9H4eb;X$Q&*^63|
    zhM$U23&PKd#Btj<5Qmub8;#b68TOt;QDfF?VA
    zazJx_qh124h3$VGjQ-uZcnA1XeSZN-&o27oYS5{|EnW><;~&^wOvaV8i%Qsb>A*1#-&2Ro+es>AVl7bvAYSm{2J7|=DQ#Fu0&
    zh3!l-Cfm?=f(G<8-G?+-hP#2n69I_=BOfaEFu#cVq`JY#R;}ht|CVN9XcLCbWSNB-
    zv#*IZUt}ye#q2A~=F8l7xW3p(&Jq*v9t|-x6A-rDSWo^ChOv1*bF=G(XA0%
    z|jEqUNx2*)<35YJMC*J`X3yT!0!*0+F;Se8>
    zv4uyE;8;8d`WlPA-c&1VtE;P()kiCEe%>5!>Pc6S@G+1R9aMPHZaE-
    z_FZ}l$!>=~cLswH8s|#5H1SuaRfKdbbOcQ!2v{uFjD{Fl4kihl7f+r9@@(=XjUm1u
    zM_$+pEme_q(hJ3vg13alKUSA99Ms1L%N$bkHfuJ^)akDe~7?eM%4^ovK~`*pSY_=zggAb`CH#@$f^2U&lx
    z44XHo7fyyZ>h#Qv7B&XcOBQ{0$lU>*Yvgcx!9}N8FFbts@b%`)-7UjJLqb8+s_O;%
    zgFoNH_j^@o!}qXPFObAc7UUQsT#e7;QD-EF91kjX9>b>MBf~H{9|IJiQa*aoQEC^s
    zDA?k-8{p=W7V*650eWv<2E(8^A`vaNg109$j54R@2>li!riNRs6#@1OE2QS%QrhLu
    zgXOmXM6hMFp@kB@xUI&u-`>`0r3cH9#dZM=8g0E4*G?CHIXyi)JuMVZ;lE!`7i;im
    zwRS-P2MKa_o^Nf#;=mei9&hdLs=NLNOa#7^^1I;Xhp440*C=%Vga*~pFI&xDSCKhtL+cOKso2S!{4)
    zWLGmZg6%MO3eHC%a2Yq+wycE?pruHnk+6KajyruJ{w@Sm`T_>BHp8zlZ^
    z?^yN6ojB-gj^>~bECPlp+}qrLNmte0Rs$_&fi~Jg>L=(9!=OcF#P350C$5K>hs8Ej
    zd)$ZX9pjWn!gPcjNR(J2z%#t@F<+91=qa9RSOv6&9oM(i0u%*Ad83ZE4i>4WpODlM
    z|29$A#15r5A|UvXbR8pxqT3V6GDO@i$x{4-=K?rt^bs#g_-pS*Y`eh)0Jrf+VMC^0
    z-`dckP)^{R&}|xqJ*i=w6*LQfuu+<$ZE_P`4(Y2EUq}Ge!+dsM9FsgOKzB-U2Sd8b
    zrSxEV9WGSJhx={r!7|bU?r7K^N-jrIH71RQ8(1!@=pgn~T+kG-JMM9*;ZZzBOs=Is+VMc4u4YArinnx#W@$MZI&MT?V`Qx
    zM(2Sqqo#Yi=-%QFmitj3SiL%#CcT$GoB+&t9nFfOE7&F+bb)_0=-y}ZF#xJYt4lAJ
    zb+n^ei|Pfq-cGCC=(Jd?7XOIO{}o=3KGvXawAR(RCLIfPqnh04hrtj|1ahBlz*}KO
    zF(z&kNKIf2DR^-A24-}1i981Dc+9KH1yN)zBHu{n2IQYZ$}usAibIg8I<%)13i}9M
    zV0lfSy~P4VqP;Z=G__wUjiB=H&C36-RKELlsSbDh8K5+5!!{rZh?=;&d9};zAg*gC
    z0=k4}qfllGaNNgn5}A%JSz@#>>5PctHF_j*>cLvrrt}zb?$z&9qK(MwU8aukrLlZ{9p+K+ejS$|_mIrQsQU!#!tkGCpKXoMdB+|Ui
    zNU|&Fk!0^@yVLKW_Z!001^!iV@-cnUoT~yS6!^^Hr<_PmN5sYr6&XFbEom=LmDYGr
    zVV^1R)kOzUY?kI&l6m8d*&o|^2>6Cx6SRy8C3l2>kN_bQb9|}tRt=T1
    z4DvSXCbwt5Eixm393hj0igm8Yf6MA-T#>w+=8{}$HUWf}mY3n*i)Ispg)dd)<6?Ok
    z|6F&Q_U@ze14#6pPCzOQ_DBCjT4T|qRz1Amopj^`9uOi
    zpO%vLBdSM2ex<35t59pR@%uGvHAhM2gqySHDS;tKG1;H69m4-0(}i3W0*uhPS%BkS
    z1!>@!^UgB^kj>0G&sV_^R_J0KAAFD}=n&NU9rFQ!BhL*QG&RRp$lcr3ZzbppsDc&*
    zre%HC*jpz_vbmHPF}m(%Ao_qkkFJ=tp`8^JPEzYQO{ZpUmRz`eQvpjQW!$4WD}I;W
    zZ;9gV6zN@(p#zJnUKq#d&lP4D(3C3zpH1{_OVbk-B_=GT7fknrpL*Ovkm~!F((@&u
    zJSGtrK*^ZIj(~|-?*q^^FBQ(cjrT*?ZvrxnSVRevxIxNH!M)LZN8FIcdAxZd-!=+x
    zjE5AneMsR9tI07vIgJw5^{(v?`uimkKk?G!0
    z?GC=c0U-j!1JDToaaS61-{3n^91a3}mLs5>Tl(enm(%}uI)D1x>DQ-ArwgZxr+=J&
    zJpFLGar*t~52yb)EuE^)&c+uQ$nA9H6Qu
    z?F-#Z7jb)#SSZR~6vry#n!t^HB#K%-3z~rn{T&YIY2T;q~
    z;(wKB(V1JJ=)gN0628&+!z*Z@(jHL7G95Jre=K1
    z%eRt8)Z{_vC1OqEbVkgV8`Ce(ZD9&0+M=Acig^;5Hq#LXNY
    zyh*1yuKk8(Yc)K^a~7M;k&v^~MtRHbi(}X(luee(B{7uYjiwEcH<*l6R0QyY)TAq7
    zj^2*%jta2)ryv8Ye=Bs5gk<&~a~B+ui6sP2=yNt_ZxC~!wLD8l3{I_T2A0-GJGr-t
    zH`YT)8V|*PCq%@X;+$s(&EU!AJC7c*;TO5~@5HRE00aluK%A053YkZiTfHIK&>THe
    zTtrMc@ck{(u)Kz1^el@Wl%n&08Q%L=7?voLF+gsAWUq=K&Y?-uPxG=!nDidKvoen4a<-n5(gP1|3kDMuxnsL>tY9e?Q-J^_W<+0Tx}+%u!GiajrP
    zz-9*6PR(&=j5YzRZ$bZXof&XXF6NOjF#4Gh`EVW0TWV?8WNZVgZ)65~?)}ISBWNbW
    z>e7TJ3=O^-HAfaU8CzJ;)CbvrxpCBM{C=(UBAareH(U)OfyRQQv`18w%WnEI#q6gM
    zRD}|z7S`cCsnelSaY#6e)aBxFyWP1CHRzk?BV0-&Jc$t}6E2HLud9P$00*e{*W%Gp
    zURQXZYh*g>rC*v`FOJ*2IQq5Z?h&t{m5)_}R+>GmMlW~3RWVF9q(HZdRW<*1i0c2R#Hl@Id6Oy#S
    zX|+i0$P?z75BsTg?M91gdb34*LoJ-m1fqffTOn#UB1@rsb%O5?TnU!Y~ZF
    z1$DT)MdCTR;%Ea{E#W-EkRS{c6otzLSnaP>Lu`}UM}auN*2NWm46Yun;om4;vv6sc
    zFr$c(1xo(%>pHmbFmNj*YyldB4QY_wVFRdv%cw=1?jVTc22eBp9?jExF;2M2BCpi@
    zpW@Ia+E^iMO&+!jS6e~1IY!lY4xoi^Ue1*yl&q{~r>%u$Lkjey+i>aR;hy#1`!g}FbY<~t#DZ5LHcEo6eW{h^!+a4@7D
    zQ|mS$ojgpa7}3BMV<)X-6(frv)a3EWxHznq<-0D7v7ytEf*bwhuskg(Q+^HxT-UGfMaIxQTYYWqb?;_J;JB@M(-A)M0qQ
    z(Fmnc1Z-$80hliAGS-gO0zqZvUyE#4gKx0VK9U}2wWE+G4NMby9{j*CmwoNb`M17(
    z9bzwEf?CuME)*nBp7-tpG;2d@H3q@xGC>-U29f5fPt(OuQ?1K$l&I6uon}$(6*Ixc
    z5>0Ql!TLG({Z!o(zzy=4M$60!S*)Dp@jw^IVxrr*4hP=mRXmSdjZ0vvfmcIEE9c{j
    zx<@Zr<}T|d{L01qC~X3ESnqR8U|-pWWhjdsI+9bs8Oj+U6NWhKog)M{`I&Q0=&KY1
    zr?;0nCrW`@PBMYWw)ab#cF>pX^mbE>;mm~BTsLYM36Pb!^6zNv{6~c)0GUiR6!gYS;;-)dOE0f
    z;x5(5sorz3)FE35Rg_WcIyRLO+2wJ)_>Tv!U#+5eR;~c^uwuxtugI4c)N}?YYC=B2Vu^`qqaAaSJK`x-j92CbV>IC8RTw0<+)$cnhNN
    zjqNF=9y-RC9`9*{FNj94*CZ+0U|Hsc%+1V%w&?a;L`ny$E6
    zHYo3Xf&nquL!Y*sBKFi-JW5*k8Z+jsg+_l=Hih==y7)R!`hJ!5AnRavz51{=B(@{S
    zVQo)Wn7d%*F1o3L@ei4x9fXZtbdUD5>lWpa#M9!SfbU~Tk(j#i#fRI+_m1nS(yXL&
    z5z(S?QFj?Rg;&YjKM{}>vo_Aj`r*S1sJRrH`
    zGx2G$;zJ@C_%S&thm`sWi6PomQ2BYa535TC@)u%vkE=+CP7_v$(W0J3kNPQ2c4h&c
    z)#8}x%Aqh^x>vm`i|%gGrB<4yR>@hfdG)5>Wwt%c_X02nKB?qXQueNdd-Lnn(iA3X5XEF)
    zX5!?Ge4dHRp`q9`Mrop8G>3Wd5z8mC4u%E!&v8K$>Ddf2Gl!&P?3O`;X2H*~fPkem
    zM9e5muUHzkI+`cWf}_+xiV4Un{FMalJ>7awxBgw|)|qJ1nF!Kp)aYM8if*CA8YxRy
    zSvaX33pLKPBSpwm>l9z1*AN5{+f2}GcJL}8g%^~HlSsW!8q?OpMe^w8o7*Orjt=Cg
    z(?cI2y@C3{CFUJ8lPY#AQIjF4ryZbM
    zN2l1fL=20@&XKvg>@+X6CkK&LGwRasI7Y`G89*Re@RR~yJPd3jM3G=w)DyWes|{y4
    zdgtHw^K7KiK+gf_{;@^xW;XZ5?%UTp>i|U1+GyM-6{j-48`IF>6vILRbtT@YAoU#2
    z%@sm6Urx3${YECsNi#)*eA7A1yLTRS<1$W?^J#-Uq(W}J0^daP1~(4z#t1H-7clXD
    zbXCUX)7~vbiNLmk9)N7WQD3VHS+FEUYnlhNgSubm@FyJN_Bm6cdzoA?(8yVb4n`KU
    zof2Kx#1J{UXXER~}f3frf1jY&xxIbj?jw_?N6eO`7Oz1(&Fotf`9
    zFvO>rdZLz_s0+rIFrKW!$qb;2V5d7F5CxKgoJBfSp8cINeu|;H$?Qm5j=&Blk^m;-
    zFc>y3oiRW&4Njz|CJw73Sh63FB;suY*>$}jM5;8zWZb+$TR#WPaaoBB}((K5h
    z(YgVA*J&n`1=Q+UiH%`+5nfA{@qlJ$1J{mOf|0XGfLzDj(Dc-g8e+6(lAM~XOy6KY
    zW|e(i3bMLU&~ksf2L0Ap2g-$TwDm7%&9B`bgK*gMzz7LjKj9MjnnoP7?eO2Du~gmO
    zfj?P9@D4D8Ha#Fl@Iq7u*-NCOV~lr==5Z(51trWb*eN!h@ei(%gCh+h4OkQgIfY%B
    z&e-CQ%+VeQ#*nNn6#Cz49JS4Wo
    zYY@~IogY%ewrVINPm|0_G|e)6#y(lzmRfnX6v?zz$v6?5p>1}Pnz{@}R_Aq|{IwISBt$!%_psG0lEF(#c1h<{^_ej5J{Sd@GaE>;9JLpLNj-8wqZe==mS|INkIPMtz
    zU9PM6U1tEOB1UC)@%%>F-VQD;D(Z~}owc#4E7$$0ioYif1MceOg|4AoPcL%`t3{C`
    zv3X4T-cO{cX9sUi4&R(S(-P1WA&^W;)bK6xl4Ftk@PoYx7ZaFIZW3RmZH^aAYq#^I
    z=RJvN{VUu#8JL(d%{1xbpI>9}mS@^tXr_55E9py+QGh{@DbuEe$Mp&H{iKBCtHI7V{(5)@{^_MoTr73=q5`V<;N4kyPHWA7?fhDiE;X0qCB
    z)J(%p!kdCSV5W4lhAlL(Gx$l(Idr_Bpafw*V>?37avPeuEmUT#j07#Z51|ik!;-Cd
    z1)RrG7kw*WevYN&FQ=!qUs1I2%Vy<&gUY{uUFVd=6pUs#mBF_l)5&n$uV6>a&Walc
    zhu-tHEDcxbBS6#g;DttCDDuP$j(psob?-Ve
    zujWjX^J=8$C!p_nqbr=cw!srojzikDJ8IsLT-1^!R6b^g)k{^M
    zeHpW=W?2clvxu&&B#n)BMQX@WYi1qAsH7L79A5kQZ;wYDt6?sUkxtK&ZI>ugKnRQ6
    zWVi0(1(ntG9j`qGQ{@gCWi*akzd2uMGuf4ZaZkqn0F3jo2^FAVqK>}9CsgB0ts+#(
    zBHw&zI%P_AEtmX|OsSarGvS2Cy-KadP(~)-vy**DxUM2XJ%q4TvEouOOBGWaeb+oN
    z&m6{`M5g@2pOZTl@eoI}!UIQ+;HL8orhzyT1QjL-Dj0-RXK+&vxnMF}Zgz7>4yc<+r>1)bQgFO}hA_xNOeiJn<2d;16LOSYXjD$C=39BPJvQ7?+B
    z;p%RWIcy5@MMHjwrNCnNYPx6Uw}XMj
    zeqrgO(51}5#1@XPBTuZ3`}w~yfK!ZK$JsbDUYrbI!8!g
    z?mc-W&Iy$z5_e5z0f|-FqqQg`CagvCwh9+42;t$2+evcbrZ}4FsZls^c>5ld3<`<5tf!yJbIGuCAhWxaD=+Rg9VJdLqc{Cv`b*-j!g(0Q
    z=7efr5!$PGi`21#=4eds_!7#5;tTX}PxKSqLJ*@u$E7{#nT&FBH|!3~-gRD=*$W0|
    zDt|0^F#~Yx(O@7Z{AowD&7m80ycp=ZsaoTZb#8D-Vnx)%KxECvuzI(#XbACwwzzd0
    z!-+e5*SR!?f*SB)mvrO?{G>uxNp<30x@b0ivUB{f7%=aRKEVH|ulPgd9e;hO{8N7n
    z5+AX1HQk{%df~#QkhiYM`QcOXmDn4LM0FIajm_^H!xMOU#jU=#;*^db~eYE6VbJDx`jh6FXqo~t=T
    zoq0V18r@En$n(xcKN?ExYWC!8ZX1^AT!Gq81FK8Yiya=JfsJJ}vcshMSETNV
    z&Y1x}ybsU`H)(!d4I>@iNQ&T-B@RLd9H#2qor?|zop{slToW_0x%;*{VZ|6_SMXUL
    zm(6{ppNx2g38x^;2E6G(e?p~M9qy&x01eoa8$JU3*?l9k4
    z;WF3Z-}yD>)iK%`v9`NWKo@#c8pYdYd5KZ-n?9=b^d0Alu=V7yCM7Ij4->w?0dF~K
    zhaF=CX+M2d*f>JZ$%yMwl#I?|FuZAX`if@xxJ$b2{S%zwddrFr&Gg<}WM3}4c$?PY
    z(NK~22_sD!Z)tP0JZMTpR}R*TJel^?E?#R`X3F&BZIqkrn=jiOB<*I16`1&tn)@8;
    zJQa}!hOgkxB*?gLT>pp}rlV3Sul!ZFBTumFXcOfuW5)CNygKA|*~p*^SLo=b8#?=u
    z{~kP1`-OdjJ#e2o%o1d2CIDTl^#!#pZS22^EiEd^PUpFtp$~%CmW92()@8z(j@m|ZG=3yC~;>bm&k8SyX&0TB8qIs^77(=SjeZdn!wiSv|DIHX}Bx^t5w;MPJ5QvVq)rH|WB6(OpufrmBAwGk^W=2kg13pw*1>2<%=M!7aaP0xFs>$#522(=|l
    zXB69a1yK_xF^Cti_^nv4P4=uRS4;z`RD0tTG9km53N&ET6KgteG`jW3(32mUPBCNd
    zSN3*-a=ZtK)3Z~a#A)H}Y4H!g?#I)DI{lzd&74kwRavj8+65eanU(9DF5SFcc{_%i
    zxRDwK%s8FwL5Ekj)y=8xWtjTz#x>ZuZR*~6jt;!z@wVu-q@5mcD|xO76V8;9E0-$h
    z{;v7;^lBO-M#oswz-q#Dot+kWttRk}?=H!op(*70PV$Nv2(XTne1ts7mr~}i=6sJz
    zKBn~@oa&cATnBXAiAR~+$4Yy!at
    zX-<&@ALEof|Cd`VaI(A>oOCoqMeSRpMsLu-^MYVcn`a}5kuX+u9o&kibl>F2`J7iT
    zNVeYXvIlkRUO^LB7~_mir8e+04i6>cS3ki
    z`g0ZYT~}vb{60Rl9K+93Cnv-ldqP(30p+ZTwE(>1CFrt+ETt+(b6yw@Ti!L7pf7K+
    z`{9*d)aFgY&&Wo&WY)@NruBYAMweu`4%}U7Xw}E@J;Ver3#|!sVt>$+1nPk3QL*RN
    z%FOj>U{HxA-?Z1_5@5D=w99A)XLEv~6bW3=sRgVk+RbUhS(cD>*s#ZPCN9$<0y7bg
    zaZ$|~2D2!Xnn9B3q>aACBLCD>*14BibxcLBrH?Zn&qardwE$wtRVNLWQ~#o;9fTlb
    zpU1x(`#gUMDGGqZF*EFzSy%_ZD7TuMXW<^Vfh>4&8@PDZ>9l)WrAkd2*b5VH@I|0ea##;9dM1(NJ^Mu0}FVcBF~JssGhd#E7{{7Enj1G-)v`kZ3PdI
    zwYT!SQxCUy4)=DSA3r1{;2!RY*du}REWSg3NCXb(1UsY0l6*St$`b{{A>TXv
    zM5>DE%Sfe_n=+_;;aA)wgPqxI5YrRZ>m(tPA_({>&yc~Ol1lLpoX|(WInKJ*$0$(C-D_uO$d#fpJYSSGjlR>x@vJOyT
    z`jOl-N79fGnpp6z*gSMG(_SWKZT2GBI?@ieZ~aeN4G&=dnloY+W;*%k-Vb|sydNBr
    zkzCF&tY=+ycs%y-cpN3~JJ~s`>|Z0Ej3jTpkDT?!FjVg_Mvp|`5*-xnHH_(EU^jjr
    zdy*@ofH%pU$y0Qp#EHr-wEYQlrYV4!VNoO8^|`51&>7AX&!2T8PsLx3Y3!_FK?JaI
    zQ@tOsv`b6sCk>G&#^oBhiJ_Ml>(fQUrk+K$kkQsItMQPGJ{Sb&oo;7zA6k8KOOw?wN@l1Gy#UyUs;W}Y$0O*sNkRi?sU-zEZE?1SYDHO1iZcRH
    z%Si;)DhuC%O|bJXg$jwmP{(}EYSDR|Q4;)N6!x+8SZUbdemahU2rf;mdLbG^cf#zJ
    zY30})=wB$G3K9+zxWKL!?ci`p9}C?XRWon$X~3{2vI5fOa>K{m7?E0Vf#;h<(wXb)
    z`!O;M3ERWqn?P{h4ZpHgr=FK=T409z@2d<%H$#8_$(tl!FFA?w3CkPY#0V^<4UtAy
    zmdCfglao3LOx`*LvK1RrZVcG(!!YE{)=~xSUNK6_qZm>U50p(4`T7XH7=tJV_X*gD
    z*8X~K)DgGHurkJ!%aa<(fIO&LS&n8;vh6qNS<7<#5A1tCb1BN-!~`egd+E!yyCFSl
    z2R};Wv{GJ-twP$*=sE)@?qxBj{La;LDE^bS1RBxN$jR!{k^A!TqA=GqNX;W#FH
    z(ALsvs%S%TkQoIxRuF%ltu8U?543=bzvS#vaP`hPyXl&fy=jnxCrl8JIG9+c9oh9G
    zN202Q6~oenkJl*NAfnJMar1B$%G3aQRm3=|xJ+;-kXkUT*02+>J0)q0_EG=P{&>i<
    zy6FF)gAj4DZ6X7T=)FcZ0;i`y>Qy;it2tLywPq8H3zmu8GZbg$84ds+(~KgbXDc$xYP}c#vv2+A+4+gOv7G
    z4iziTw28zd4#ja(mm?!3?2@=kJ%c|6SYMjq6>z{dDf5_&plql|a&yQ)j-yUvE4trZ
    zIlQ@fwYyAtw-T-+)ZrRAF
    zH_%T;JiXMLnJb`hByW@HBIW&et7kS{NfH~hQ
    z=<2tGq3RNtIDkc{*j_INVst$?*N$R#;=ogp$p-azJjZFO;}&|1X_^>wGW-?h;;r0y
    zNH5u&yPk=V(!1<+&xAnXuOQd4qw)-tyJ^9p;3rV-xfhc;ce4=F6DVo#DDcouHS8+VsnWzcSrcz4Pmm%SiyqH99lOo1?cAJ`xs
    zcG?mGfQ~)3@2U8|EgEtZkHB01)h6Ksj1PLv;4P~H*>*RrmW9|R?p}ga)kU(<+!h;+#aK^WP@(9@0ipXh8yuOYcPI3()rdw4vX^Xw6U5pmGP8B
    z(D}0csr;$%p|)%aAvs7-!cZXS(Gyjl0;5r^)k<1&4YOs@^{iKgqj#PwLHS%4h8DE_5>xkN2MMAnX(eHKS#w=EVrADtBSl}O*eWmLg?8;pQ7;lxwgI;o3r79GAiX#o
    zsn)pHOG|
    zjjHg!QjFnm+T@xIlA{*N8k0m-E(fP%di8?GsHM0+F6CRN8kBI}4KLwxwqC>xiu0Tc
    z67CY0W{3*sdcnV45^TE}hmKwLqrg>-YfM=?yBTE{(|4H8PnEl-0DlT@==wRfB>voy4Ox
    z237;Qhs}z~{#8d3XR}D8>H5)C5}Z(UmoTs7!Bl`)aFroai>_lb^6HTpop}4zp#X3Y
    z97*x?Oj<43i!9rt&;Kj=P=K4k=F;g+I<<|_8*Gmaelbh$CW<2z56W2*Z}?bBJFbM~cg^$MH^cyk|`n5eTXzAIJvq}5M0lv=)dRE9_$zB5+^UA=OJM!^Exq#h|2dUkwoAXhmSC9l`ua702uNF-y8Yco&X@i`3s#(
    zCt7v*r#Z94bB5kvH#eUI7pYbIGXZ01QF(=v9AM(AVTamWIwyou#>sz+^GPf>poMx?zgg@FE?;EB$bwIWt#MCM)umD
    ztA6iJzY1u`%~zN9TFP%Fw*`-q$R1Y4aAp`rqWe^h2}tWJ<3s1vGO}4nXZD{g~#=9h8)VWnt9YBWw@j2c8Hd4oSJ0~ycr(W;=v7d6sXWsDc{eJt~ebOP!
    zUf7KL=}ve(qv&Wu*be;sajFxp&}B4}#m{tt^w`B3TSQxZdZnkQ1|
    z6)GBDiCb?m3qg@h)K&@1i|U3+^eK&q=Bz`jRTXRV!2h%H2KxDi1!Rwm+FGvPk_P1I
    z%eW)2CU!6DB6oW8mM~ithAcUZZfu5zc8=nN)Va0NgsC@GVItMB;0hhuX7-+w6|=ie
    zoSq5r>%CX*lWKJGjndnt+gZROs3T4vv7IYFl_%fT&9lEUPV4RKp>|2HUm3NB2T_lu
    z>&F!SAEYz}!%iO?6BR&GQVd$YDHS@+_aEF{p?o1pUdXgOx!{shg``fwrsaJ*dV5cN4(*5
    z1OP6$z8!%a3f3ElNBFOZwX;lY4Ulp(WnO790=|ld@37Zygm5Qu1W9X-0CB*28yN3C
    zqh(ra0x(j9#JXCeojl6J6oz3Ob>Hh))iFj@7>@h++FnhwMx>o^(T&c7u0+{u3_1hn
    zWoJ&nbk2_9Rdf};N9AMMS&rdAn@uz8SkKm|xk>hCqe#DT$fyc_izug$Sx|3W-<3sC
    z^7O3VE8&%6!$@!pimtH&f&nBNG!_dOtI2Vvr_^yICb!G)f7J_S)o*UoSxtLuG3aR+3xGq_yzeb}acsA2X|-x_UxcdS5OvxFJ7mKyi)!Lw>`^{R!Zo+ILXAyBdsEwJO
    zJTT{=-*}v*azs45fq2wr9*E=r%Zvzxo3XeEBy%u#5W3sM;?kmWUh*x7g)_NwSAA7#
    zM3F*i{xxYDPHM2nTrv-xnOn|~PHFVy5>}R8(uUh9?QG-vH04M(*CNZYp~>{_3QOKb
    zr_&ta!$o|FZe8!O2IEas>bGv4T}Q4d$3zL6V?UFe^0JgNaoc6za;er+?i{S%YLaZ2
    z&0$-T08t3jAZ=V4IP6ILsXs?ZpHGv{`j2HHdfI4Ic6JX_O3G8#sXr+oHQw3u8*(X6JXJg?=hXNfrMwhIX+VzM_=?FT={rKukx
    z!;U>MuA#3eGr3DD{HZ-&->S=_PwkE(zRud48#DHkSC(CR&Ahf;{8M|C=uaXfwlJ2F
    z*%*cw;q|QJym6&@>DDO(T)c$6UHhU_S6|9?{B`|0j9cS#_UGJVXF*-hM+jz
    zEt$csZsk>BPBVAfqM_?qhdgit!BLl4FDahbA~OJo>p~qFDIRHwWA~hg7x*%7CWT?rwgq#kYB8fM=
    z1jCy}luUD6KaniS^bl!~ZC39o%4Ayqd9=y&t_8Od4j}Q+VK5XYGg>JCCpGM`5}*_5
    zH779pI+_?cM}bySt>FJbM#`usIrVQRPa3vX^)Ou5AQ(cz2!@DEe{u_MdBedUFc{Y=biKB%N-mjwEM-(
    z)Ld^kS-jvh5KcVEiHTg0P7hk;2CQ~$4+`FudwWyfzfm1Cs+}*Z7*XZj9QIUKu@>
    z;C;~PinnR0Yx}1a_4p|6bhi5VH
    z0^TIAa0_t%($
    zM6{6b8D)euN6p;DrWK0j$f|K+_2Q>?r3^JvQ}mo~lGMqD{hTvk0LGbb;7D{M|K*j0
    zYqL0yv`o{6p4TgNclUC+qTL!r_a2fM7mdE01W3z+?D8J%I(sS7vs+=fF}y@1@*(DT-~)r&dUqG@c(+=XWC
    zfTeC{qBEmNUWQev&%=-b)6yd&?LdZ;urm@0EbXk2B^s2vb;7*1G}A?WF^I>>BC!qq
    zTOggW@zf8b#V{Sf}*6p
    zPv!2aJEk4q1JSW}o8NzG85icQi%lg=RqU#vNKq=YjKoOtI7QDA*xgj7C$YFSIYTIx
    zu(!0V1C-c8@`W-9+0^Fm2Hg&+TpfEIeCG~RJZ|TiM6k}zYyxn`v)^=CVpcZ_GVdoR
    zg-M^2sAw#itnLrF*BiWVnnHQSQ(@62+UaBYBDbX}Dwf=!Sn|RSQjUf~(JDO6sH}iAzwa@Za$Ba
    zP@X(pq1U4GZOZReIQDS1Zde53FwDW4ucIXv)gQdS%F3V{^5
    z`&=oncIaxX1gy`K0aZCXcyfAt9*6HH3_+JLpv2`knP@>M-!HKz&B$!&I1JZI$u
    zBR5gu-MtAGHpzg|a*p}_t;A?VVvtF|Fmc4Y!IgJi4;Cc_iuGvV4~7SJ3zt0ag4&7a
    zY(67sW;|f#^8CRvgCjXezH(pp5$BjFa8NL*SMw%_aVqQHVru|PK(xOmkEp?+Y)g_@
    zi2Pr8mYdE^PBWJt%Q2ndFYc~UgDa<|tfw)E^-^W=4_PW%D7#AVZzMaHHGy&y5c&A)
    zL&Ee}3=DtD(F`gvo1x;lYY}hy?(C;ddP)kHSyR8umD)6;pjf0vjF}~Y8ZmtwJONF;
    zdan<|_fMbb??GmMUZfag%ka>wtrPhQ2aoJWdpsdmRrV=OoJ$UYKZ)}GrQY_gqt>Tpy>x56)EB6v_e$eGnYUS;)Yo>_Q3E6rW
    zKtCN{WF2R&%v{+_ztB=ULH|uwAGGQiOtjajgEY}a+tm-L$>ZZRi@Orrm1&CN&+CSG
    zM-X&-lTOOLhy*jq5T@*kebHXUznY`458INMzP80*nr1Fe{%pOi>jtRPPupphIZn`q
    zB>I@g1|H}USGrBJFg{ZR(!F*rGM`U^Z5k@WZD?guN3*xGydg5@`*XwEGh2-#XA2L&
    zyUnr$bTwul^irM{@dA%{IC(Emi;j+7zL@7lQRK^eRiwcITDhSWBLW3r!{;$xSExON
    zriN?}Mk5O03L^bJ-37j-2K2kgV#Fj*hKkg+Ub581f39wZ-&RFd<()?QkMV#Sq11XD
    zl;wT5onjXXF7EcPcG4_&Ig(^aC&xe8R9-D`JEOsHn0CDe&vX@bs4{87NbJxJa6PGor{
    z6zK=@W`+^Ka*0R$SVCY7^lD^~T|Q0z1ONGk)E~OKl7kf&8GZCHR)N%@I7xWtO%tGV
    z7~QLTPy^@`4&WliZ41H>&&&a@LeXkzaMLx#5WeaHf^!-GVr5yH84D^gW}{G+>`Dy>
    z1Kxdix>pqcr#sg4G{`iA90sT9Er2rxIU%`#F}|g2Fa%EN)^+vPjKf`>t!u@jyAr31
    zRX*IB$hkceci;>eN7mI8t@bDa01n>m7
    z&GD@&uQ3Q86Cx!1ATD?Y8WH(`ZQdLe4?Uwt$C~4*)tf)Iwa7)yo7NasKZ{ne0e9Sr
    zj*W=lM%e0RnLNLA9tn6WBWkzP;h5YkU7NXXy%aX}U?D@iRv#c@h}Yg+0YmnIB=)*Mg51y{
    z*kG=?i?rRs!04^SC5#~HcgTSU9dyg0HEf5bd-j8NEI3gl6g{S6krnk8EW_{XcpoKusQFI@?e=8EWRXmjDeRhn0M_Rq
    z#lY|qA0=z`-sydmaOO$Y1x_5V1vZi$L)xG{H)g8nZkyL=DQ=-HCyiKE}LkVgy7FCdUJNu=Ec
    zgxoPQ=@QBZC6&Jyv3z)P`EU`IA`N~S$)qs@O^P&3Y+i(J`XmzpFq>?uoA&*W)USX5
    z8WbQKF2;+CTW?{=Hfo<(a)KU5J<1&kj2GRpu0OQ?3&5PNolF=a4frP}(^wqEnZZr|
    z+|u3&Hr=s+i{$SM$9zMJY1S)@S#+Cg>~hklnCz_{ignz%SZqmS;=|4&lw9aBho6qe
    z>F9xvDmOzdYO{b~Ty@)`dB{;FUqqA!v=X~8Z7NBMJ466+DnCj1bdiK9Wa8fRV{8Ox
    zly^dzveAR;i_WRLpHd9hJDe3(G1*m@e&3T@^HupTuX|Cya%yfk7^BGAlAFf!9xl4M
    z33^?xy;)A4d~c#wXxJdWPocU^1-;*t+X)339?*4UHn`-?#Yvsa0pCL%(E$eku&tKd
    zo;kepLh?x>Y$Ubs;V=8$9#0ESm`xXV%}~xH%po*Y>2^d4Cq1xKc%)-jrj+n!prw5YyYn|c#%SGzaB
    zyE8U5dXIi<1Xk*D#jS+&4wXbec>ZeN18{p3SJQ#A{puJn)vkFd!e!89UEpt&kLjEi
    zuaii5FG)>(85c?ePKnOQ))oKqDM4f05lbbBF1294+UrIgvgfX~!hvsAR$!|~+EEvE
    z27-_`i<<0z?a(UBY=U6{xTQt`nhFfo*M76_QpVkKNcc+e$S}opS?L%p-hw`{+HPTi
    z^f}3s82)>yQ@jU1{JysDuzit}IUjrQC!4aHcnTsxhIJ$E2UTc9`t^#14{z-rOLv6JzuWGJD^qe$M58~z
    z*+b_*ATdbz2-j)S@6?l}dcBTaQip`S)J-*vQ&iA6s!{tAv6xrW^n$8lGAdKFxIxYo
    z+RpJnnw;B?p`IMHvN69PaHX9MB{3ntV}1tl((#Ikr33FE)WNTP1*A#
    zQH_T^x)dz7wb+rxAj%(G`d*K&2=*16UUTmrDjA$%_{uxR_z3&=@%8WH>r0O>!r4SH
    z_>VimykY#WJ;VqcpN!G_CpA29d*sGpRh3J(;ogF<3TP)l@i7`^=;q7ogOfL}e@)&j
    zudZHc0FBql!W()tVS9;6)njrYLCl79cVn7H4^51SiL(ojod~fYmyw!oW1|w&8(Fpr
    z(A-#EiMF6A6l_#@cRBCZ3oil(M6?+ma+Vji@oievcCW?v3sXDblrBO>O{00T>MMps
    zxUyCTW#6=7QB4lY)~sUDnkbZA1C2#v$FXS-d4A6?oi~e*bNK=1v@d#;9QCb%5#Un~
    z-AZx4d&WkEmPQWhpIeN#Z(~TGtmci85)EMz_oD@7&w_rMeS2}J{plGFdT#u7Mq)Ue
    zvddc`1u?A2XAbbt2E9oN;*(y@>Ud{1JFRj_GJNki&gndE$3a}F;nG5k|LHSHSvFg=hhzpwde
    z(AGT}jAHF{*~|-sWS}Em%*&2Jt6-W6x>|owGee3F#Upw|0wi;ZA#@IF&JYb`o>}=S
    z?t=RN;N%v@Wo>~B1cm!0MuSgFv=KIDa`q67+sbc?53e9cO&l58j{D7$ALxiu9Hw#$
    zP&Mu%J@?9e)3qd*FPqkKoLCQc6lb_5WFWVKS`eaNxJ_Y)plcnWmPus;2!u`+=)w6V
    z=H4-vg?y}~A2kc0YY$1$?5TihgJC0qR{`QpvQss1
    z9P#}|0`Wc=CpoH-wkJG$r`8e+n1LI6+&kMtaCkAwbFeBo4lIr=Dfz5g?e^rx1_%*9
    z1*t1{ML`1YaG1IA6c;sFJeH?STgE#DE;f;}=JT*`BJ-brd~@Yo_Q?vVvdBxZF$DoA
    zqThnWSkj29?~nR329(HVSYw}wN#EoGjVHAjrlXtCBMJY+y^`olHL;a8y%s``BpOjJ
    zxkbmix1UZfvT=7j5lm80bQGCv^p=t4XqbB=IGJ<`iwD;JJ&hNaE2iMZg|jO%bM?%e
    z3s=SWEw`}r2S&H9YD+I(m`*FI9C0X{ACKL(>lwW15;6g!Osy&jTXiJO*&Fm`g=;j*
    z?%T?G03=WV2YXm}XDUitRPxtyMH{w}8aUwF^Ko
    z&j1+jn*$m@KkuUBEAm3u6?L*GI?&MR&<^yNxZD~F)H&G;tm_uN&~#o2(oMAZ(3c=^
    z*>(4F{4Ak=@{#JYfw_#x!GpiyD4bG$R8lE|F%-C01;BzmsF(*~wBV6RdlI?jBG37G
    zt*xw9M`dM03cS%}-y*~N7XrvV4bLs;Vy;GaU_^HlG#
    z!^%=xzp5v#?uV+eq>!5<*bx+)pjLxA$h_5<9hMP87kZb24#sAae(+P_z_;mna6DDu
    z2b&BBD|!UwgUyNK32gkHtGYY)0_FmZOdrdy_2pGF5cZ;WDo7JvC2@}ShyGPkyG&>Z
    zl&1~q_#q3}<9?~#;X;Th<&Ou4&C}0`c9KZNs?sxZohLM{%vZ63-mw&Jr2JP42nSg(
    zo(rsDzXJz=K@pDdaLc|cw7QP+zuT5@43rd>qrJ}QTOM&Dr$HQ#@VHYJ7Q;nQ|X59lZKRg}7xp=IdIKSeaf&$*Ya|fm5AS`al!uQ|D
    zM;IHC6FVce(W%V)>jCgW8eOPB{8V;>h!)z5^)yIzLG?!NXaNE+9t`vQ_@fP7^7%u_
    zCmI^;gzNg-oIjPqZ(Q-_E#;z))Z;HM1JtpF&ia6B$1E
    ziQghv;HBq{axvQ{$p?4@a95*e1eR_D#T!!IJ336|UM{M9>6|VP7$7PaA1cpcdSs5)3mKD-Dy)2dMepDc
    zGV+V}HRM3eBz6a0{B4aU214x(aHC%6u-T`Q(rrFwhzrWCgK|ufvVnN#q{nk|C@rc=
    z6e-yhk~WU#6ef?Ksm6US=jxP}oQ#wu%5KcDpRw0X*z4BK?^!=%Z@xZP@iSe8pmVrP
    z+lC7^BM?tvK?~W>7=xH&JEyapGW=M`dW?XUjR&K&aMz&H0-O4M_RHDS{bIg4%7s_9
    zXkMP9-)rv1+Toijaz98^?U-6MOWjc~Nb;P-Y81>W*r}U=XmU_48WoSGfWY*JFHl@{
    zA)p@%CEYJ+bEXiyf0@+evK#=T>6p}?4lff;_^lPAxMa0XJ;V}g*Wu(K6XGQ;#!_w^
    zar76q7P1Dq5(kEYd}XYI>2}aUwcYA5lhjeY7ps?a=hoJ7b@-*}+wRue!)0%~BUm3MdE3lR-7H~F
    zhA?CZ-E>_h4V0J2>`v*O=-A-#%#+=zFk2Thw{Etzg+N;=KH+iQV~~$bT9ZcHMvF3I
    z0aun{cwH97dL2g`bC`Idyrg909^Cpzs$|BgM^o64by*i9(`1ty8xigiy4qd!Qbn}F
    z%0H=P3Dqs}(b>0Vx@6g3)XJ8Qa+_jgut3E*F~>q;vcuok0lP1xGZX$2=QR$Ux`
    zn?C>^4uF5haWzR8(GQ{#unlNQjBpG91D5PyS0Z5cZYicQ02xDuku!D|z|ubg-q3iOwofBYe9;2AcY!`d#S>F
    z?T3)aDT=Up)gND={K)OWlD7jNKo26qQcK38w;|6CijayT&_s$
    zVSEkm3PTZ>l5z;8Qu650BU;*Q(jCK*oxSZ2lRg^(O1OFP%QBW^96N@FUoz*TEB-ok
    zy{1_6!DQ0pfErOuko!D?pFJV!qfr8@Oz{WA1mY1cvX7
    zF^VLiaN<-SiCdfM?gZH+E+gAn8qN%WtZq;Xg=yRKpH2591cjL*
    zF+sFe#q30C7hlvH%wI29zT3PCY%0u>Pcf^A8&!mR+q0@LJX~N=K__6|nj$_5hdsEf
    zIYsn79is)ZXPBqW7oBuYf`jr;r2>SvG+7zItvUrORaSM|8!
    zfb=Tm`a$Sd>gk8Hyt48vTPf4;mCAV%%6^fVKAd8}20r~qY6j--6-XOXjUpRv)IOmm
    zsVRO3oP>n6bk-wY%aEGNEx
    zS@z>8bC#E0>%VU`Nbd>-1mlptJC7eH?4pJ`j%+-dU}6jwEp*~?k~&77@&@+z``+i;
    z1@QdM*0@QiEAppI%vKFw71ni~LW@*GbBrupHH&O>3@x`X({!>Am@6aZnVOETu#lb`6=RPB2D`c^1MZoV5kDIyL*P*)hi??
    zp-i`kpWz$gFlGwE`8-5C3i@D9B0_>6z)!?8fWa3J<{~oHHNthBoZm;p;$*3ua}SYx
    zTJyMtOmPV*+=BDEf;gEGqQ2~RNZV1hgWUk$pvOUNu-6Sc+zlDPhCf`dIAt$!tLvb{
    z9CrmNO%&zt?!^+J&odoa=5b<~>cGO9X>nZ1Z#xgCEOGQtF%Qk0qvn1j@!vG?-!$-_
    zlLi{hyc02u)Y^=i&B^zFBg&+Z!Sg~9;Ocr(hE9_uFb{M@;$4q_XYwn^y#QO
    z5|{GfRtpn+ncI6~A;;U>Hp5SIH)=s@9lFtYd@~Bd``C_n4II7B3clXI(Q7}|m7xZc+b(~ke?Om^UuUig9txJY
    zBswx^S?BkeHvK3$ZjCY~D0I_B&5KSw8%##+R4+E{K-!uFDjdJSPTICdD-4RTgclZF
    z7vdF@Qe*M)>aqcMO}&ID=K6$!+EChW^%%17sxWFLDV?@xd5|oxQe!X7Me@aMQa(O8
    zdU3M-5}L*+Ehh1F`R{utr~5~T<+J^ld#7jHFORAE;^Rl%%T9WkG@I>VZ<67Ei;poM
    z_o$yVN;^Q{K0=wa-|1drY3S}4W6}5J<{4G{Z}El^kbuL9aAY3D5ZGBT}wM^w@V?}o0Q{BUP-5WG$OMP+`clCx=6^>2>Ssz>oU2@I@Q62ah2wB
    z-x9+eds$tC0F{koOV(j4sSrLevYMJ4`;D^fzVDkDE=r>1lyioloD`PioP?f_qHmlu
    zH+fcOwKck82WoBIGdtGnCb4+|*a%J9@u?C(2pTe;ZT>~b;mZWSV)uChirzjI29c?5
    z>@RZ!Ed5aEW90X$o>}jJsaXoERm&wyL+lEjRbmaX$*q(yzg&;0_(13IQ@fKN*+UO^
    zZr{qBFj4GZNi6LQuSR}!of>DlHTviz*BE`i|Nqt5Z)yfm$yR@@FG~pB@@iv!by!JC
    zmG68g7Wlw)~hrg~StNObP|ErWL$#)Sig~&H1mssSot9}8kkf^}S6~TvGzU07!$lWzmX+vTem)LR8
    zpT!r@A%_Zi=#TV1h+ScG-KtkT28vBFNGRqFpa{#B)6m1?(ykP+r5mxc;x5GRJ`~Sl
    zMHCleRO1ZfiEKdeU&+dw#QyH(ttQSCT(lD~!-B2qp(lm`MTQ$&OKNYEr^$CV%&`;k
    z_{sPGvF--*G36J%*gf?6F$EyL>~iBcHfOr00mL?9TfT6(PCHYG|7Brsf`vZnjR(y(
    zGBiRYq$Xo>oR5ssDP}!@SvovA+yfSL
    zc6XZ1D)L790A&(~2ON(QO5m}Kd?w8&{M-f+n?CD%x)=-C(lfex84eKzFVgXQ46r8*
    z6vx6qJe6@WBTB6#e8YxZZo=(KcUXxoyJQfpP6so1!mH1Vk7JX6{U!ks^rORgPFZe>
    zOwyD#eGHqnW_MbuB>A|uk}UD~tH~OS`|~pcEec^ddW(T#G1xL&7=h$*gT(#$C{2Gj
    z-PIV-#J01X@cd+N556>iIy(8=_Q}z!!`;Ql67!Cs$7|^WC>>9Rn7|XqBsn}|5M45~PO{?$nl4w5?X+bHLpo$1zl&S?|0cx8btfYaK0n^3g
    zDv<=o6U^~yQfgst+fggKW>?Ev55qJ{Z3)&WX`t{Xl2bcd11O0Nj`8R;V&Wvzm{N9N
    z*s>;j<@kjrKQHbHT~*1UYo@Pbe^P%^{}XKv&3)}6z|;CVQ*kHd^^@gK&ePNSn)eI>
    z7QWJC)}m<)Z-bpET+1aLu^)pAuU(=mT1t!+T2k9Zc-40EXj$@%m7P4^*Tcz&f9UW^
    zd9!H~8d$GmHP;&{QpB-LP%@{TC~$bge2MLHf6zn~A)L%Kf^u|>7(Ie1MWa*=jn;}B
    z>h99M(J}=#R5IfoV2k>gDI2G2?cg2#k*g7klDNAlii&9Dyc#5{Q*|f>(FmiEmQ>w|
    z`uycBBBpCojg+2!y>YjiBL2&En)!Ff@v#qZy
    z#$&DW^%V(*IO<{pB;PVcoxOh&Q4OXV^YwP4Hu=TC}YAsx}hG&AWsLO
    z9_1dRYi@`OeV(ii_JXwTX=07EriF_%SD>bWlN5FF@3?^tvK(uX8zBxO?T>9vX0O#o
    zS<0-&+V||Y7VJ!&+rk;p&WC=C1d_BDKsnnzKjdR$z6Qf^ka#y5Zsz=js5kCuql}md
    z=7u@npmOvwYW6B4$Ch)Kx9-c?*X_RlL^Ss4T#-+mxTiCto)#go3Ebh%&kuXrD8=HQ
    z0^p2ce|*gzerA!T?=nSix$Zc};tf_p7FbS-{Pp`!;?83-4jUJa_an^0G)l7es5>Op
    zSiyM(1DSbt-Q}qDx^aCmobzb@LpJXNZu_n;x~?evfvOx(<}31>PTLa}5u7k8cRoJv
    z>bd0Daj@5RBvcDX#4TbeX=P1*5ib+a7cLt27_)Q6>LFRmhihM)>ha*ED6$z5D0HjK
    z+eq>-<1}yh@O;}&uma6<&2xbIoe5>zb>ZbZR0!j4*WeQ1Yj@69K@N#&pa~%x3uIr^
    zPyVhqScW|7IeRgS_Dh4VQ1M`IP{vr=TOE8LbBNVGRc!eEWG=c?xF76=w)En2FueRd?>gMz}lf?O^
    z`)%uSojX*#E<-aG&+YgBn+&88k@r;hg(q-!-6c(W+{Dhu9G9Cv9;G0Lzhix-&EP@0
    zQB11Qy1Ya!i5hAEK>_KjI~WOf4>joEH#I3USch~=O0I4EDFT~b$zkY;k67_B?559+
    z(zG34`dC;E!9MBZhQycn^pSpT+Sums^ep*I{|_M{TV2NnC1Ef1Cg~>d8C1<)AewK}
    zM;hz9pjSg+Y`1nh+3tLs5cttVe|KP+(fHD&UX6~U;S3ugJbP45B(2=(hiXO&FOjQT
    zjU1MCDnUOp=My7QjQrf>RD6g2u#ot|p8mLZaFCSOl3MK&Xg5Y!tkLJdm~M?l(BhyQ
    zzhNzaYH@?CR|^UfxK@jbi`>XnEWCc>3Css3L8GvZyENfLnw-CZ>6(!GjFX%8ugC`+
    zt)GzmDd8b*t6#(G-guY+@6!Dduq6GbPna>mMw!E8N{DT>Fhv>p7-9~lxuQ1-{laqrqsVz6KxYsH;b7ls2)aKs1l12HMB
    zZr+jlF-zXB4tRKIf!9aJ*=#ZINdm(#e!fr`%5G96YoaZ0z3zRcd<-Xtr!aaZT3BG>
    zk|)Xfw+_4cy@3K=D?a)vVRWP`I`gTPpr&HLfknMziDq2RAD~$Kp0FmoSNm5R
    zIt{*+nvhB&b);yfFz)tT!)VlHVnc=*=A#PWz?#2|Qeb27I%S{hrfa-F_2(&KF2|pO
    z0o)AW@IqWs6IqT3#^V~0ZiqY+F~~zkKA?omID8KAXYLhxw{?d0DKhYCCQsI)lu|D3
    z4Ks`w1^a6>xIopo1Tm>6$^Mu^!DhV{rn~53Osz-BO*(GjJvZ!3O!Ppl;5?yW7y$}N
    z@Aw83u(UInU@8aN>>b)Fuz_JbNDDT_B&tN#PV3p~uRpJ@Ru&%z)B)3m_-`saA6&s7
    zk87`fPTpqMBoiJVo$mh(piE&L9F7JdH*SqE8kPZFLN@F$GBg9g9lo=BynXhgaMLh2
    zB^-3X^G7}6H?auQ5vjJhVGc8X@l2>#a0oR*-ltL0X;|QgnrFnNrE@9BuxHEYlF~{v>t3GP4~jGm8i>=goPZA^T?zEi?@0h$@o?l!qRYe
    ziqejm;#cuGvQZ1dolYe6sK8z+*w~uBam}x2Aaq|Z$A}%k&yDgr0rck@X89YXI1aZv
    zHFZbV2!y3mj9he9XtJ2Nu-l*5XgHEchEGtpyYnRhOr*BEuM`xQ7NK)$=Zo!rjM6c}R63M6?H#2h9{{M4~3&1YmKq
    zw1l|)$g0C&qQOiW#EZxpd@#y(*-0Nv1L)Qv9n{SbY4gZEUbiiAa{1tRpHfIZH)yWZ
    zuQLP?E6?E=uK|@u7@2`ud(}#|T3@bxpRBG9Wt{J?>Ed6cD_f049RzR(zTFK94F!Yl
    z4)%XX+eFMw>%bpHG2qWJuPmVl918ub)SH*PfdF_i8r`%X?08)yCY}W+V~gAH5x@q=
    zSYu(1&7ym?-RPBG5xq)@7q(Z)mM@isnhi{`I&GYL^_&H^eb2SjYE7yplz>TBq7!fF
    zRg_&Cu_Z|G8!vy`>yYGLda9I}{nR4i
    zLJ2F_5Osu?5DCj!6`FLwVtJz>Yx>b$i1p66u#)?}UiUsZgxIdx`fm*oMomA7b85))
    z62|`=?Tr)y46xvkYLshEIsNQRyW@^D+(>1PUg(v`p8&|n`(WS^>rm8~rHD35TvC*x
    z934HzD@)sHmH|`mk6Q37W8QAT5rqF
    zu~*%z{{k#>44@0AforSQ7kkWeBV+8{(n^FlvdjRIS@$TFEs6e!qb^YWrd;Ah({T8v
    z2SJJsbGe?6=$r#w=(XiWO+iv#4lEaFwQ_gVw#)q8wB3uRgPT;NyQ@gs2H}A%Jllib
    zpkHIbf+NUAx@O@jOMzMKa1GXqAiF0vzvRwA)~mqU|BxP?CMVwrF^mu2J2P`P>;CDv
    zy0HO#2uOpL4~eFS^f2oYnxKkdU#c8fE_OOsQ}HUnCb1(?97m??CD`qX8ilK_ms4d4kd?%0Z=w9!XVbif4Lf
    zJrR>SY>**BxAMIn)#(iem{(@Za>-&WunEO7sZIyKh#C&TiRIK7z844}~}f`Q(CxVh$-4
    z{IZb+WJfX5MFu`~tVT0fJko|eb=OQ_`)TdFL$il1AGMZYd8DT4)BxU9qs;`FsLR~_
    zj)Be(MjKINF&EubyW!qJn>NlI`4WDS?WncLAhT3$ukN)V^-ojY5Jn@}8MJ9zhF*dHliZWqr;h76p>tI#g{K{KoQSt??opUlFLyvop7ymiHFl|b*PI?KL$N~
    z$Tz;(9~9aV#D~JURUE=!JdPwO=+LrGw(=a&s=47gLRMGGbB3%|ODhX89Dxrtiz?Ae
    zTB&M}!nrdO&K0@T4VzySXTKoIz8iY|o)Pwgpz8#yIb!Sckq_8@lipmQ-aD6vLbeFm
    z+1ea|WH
    za$$r*8tN*2yx7@=Z92!j`f1F_FWx2Ytev{K!#gR)J?~I;Jj(46=3A@XvL2h7#0&7W
    zPgh%}JZCX{l!(6;k!uWA0)rV$uC8-=$w?bJY-O-zzLE_uF`(r{9Jp!9{mk8woZVp_
    zb1E?_m3d(@bFLlu4|^HS1OMM#R&ys4MI^I%baa8A{XD_A2TytfV>dE2ZFw#pH`SPx
    zvwTWOZr{RW8q)f>YWb^w*7OXvKu+)GoNl42(52%}Dc`s)_!{cKayDi{Bm(X+nmr3B
    zUCYEKml$QZZH=+~v>;}<=x&{o$$egC_Nf%ibEdk_P(qCkVz_Hnl5<2181$9xMf#5YBQZnQbA(N&gg(H%R*O8L+P;P-@+4lLG#lypW($o%2t1s4}QcWX_cynIeWY%
    zh&u41w=UJMs4qk-@iW`VsbHK4TyI{M%N8QQES2*wHCpIuSre7|u~}n_5^qNV84tkf
    zXE>hOT**NRj&SIrg297cK5kmDyt4!}8sR?2#B$|B{e5P!c%m^BnLms_K|r#qA};g4j;aK2Bvz#H6?>YjNWSEivgt&|tmdyP%e_{21x}om{$ORf-s$zK
    zrki?w^`hHf)w-ejBx>23IHyWd;|yrdxxw+fzT9l}nDWvjyGP04(HRgSaZ922E4}n9
    zvI-?dwYhvxG$Xf$tLd3!-D*WiV^*OXBW`krm!+pwC?qhclm$9seR)WMk;pg|db4fH
    zFA7qGhJxO6CFoOZTScO_Qi99NSIW+lG;rYC+|m#LEsf>vWJq2@A&sttXRb8&cS#KE
    z=-}D#Sfz-?$L+}obBt}4<;UXV))n9*{DqdD@48rjv#h_k+5L=1*6JI(#$1>H5b4aj
    zO^d(Wz;oJ#W6ij;YGU`|s^GskBPM$ld?jD$t?opb;%>xhPBBx=KL==c>~d`zw3B9^Xsim;Y%i)Rw&MMP6V`wKLHosiPZ
    zwsWwHX^~F0Pkw2VnXp7%a<1GcNt9#c%{6DIt#=59NhAiOC*mij`Rk?Sxf0mlvGrKO
    zGXKtqemQqanpfXi;hA3xWP(H-L5cea7@4a4H
    zubPYLMAq>lz3TSSi`Aq$Hpb0Ox`bXz$$5}`NMK+8#235C;aN4XP(<(SKJ-RPG?vfY
    zc;EIT9S+&GvD%?Nx5@TXqRAj(LwcTFBU~y5JycvYNRk*vLz`D#;}ZuGYtgNi!tjF6ml-K7g0Q&V;>8cgNu)mVabNW2sSX
    zd~AGfd}=&veAoEC@z+MBku(uBdE*vjiF1~0lS(HgcM7HQx_S02
    zrmY>D*MwhJrk&SUovAVIWp{)ZyNX=mj&b1x|CY1LbMp4@+-IzXzY-d$bmlVT7vYXe
    z-~hr|hoT)GEQI?=W45sS$zB?_+U;~Wc7m3Qn+%45Q`Dz4Spo{Qw%xR*jv9X-)<}QC
    z@%3)gAJO=BnCdICO4WN_^1!;$ZxUx#^`Oyv4(#6z55gR*Fun8Vy}vQ{j=IE~47hK+XzlS~LOtu^I6GrL60zA67PVR;a)1R8MFG_s^t)8_*?Nt{8_
    z*g<4bAKf1^A0Zo4x@5JrSB@nutKQS&xww=g9(R(WRLn=&N$3F
    zRH&IBib0z|Kd~T4Ltvy6xoz-JplC?Aa3IlQ*@_~Y#7WCsbbFw2{dXceJ#TSr3-|;g
    zmUDyS5|BnO8>1;D4%?&$jE1wAXEogB@<~STH}yx!Dfy`4b;fwq;=rY32FFGWWXEW`
    zb!oJ#Va&$4`$)Np)NXdJQ@&Bn($sR=E`Yk82Z{8=VDBi{kzF;EGi1@|L!c|>xvQs3
    zNeQ@pO?xty(gBayo9uz>Fqj
    z87I|1N!X2=;Rq#oCDfVR+}tL-2SVg8KZ1j3oIII=`lQ#*#*X&Mj4l@r#>LPn7W9_j
    z3g`^cEw+A9T535QJoqKDrp!(hd)%~qTEx^ey+L(G_(_>1%DTKmSr{pBwQ=H6MyEbK
    zOrJEm|f|awiiOm(?~H94sckT-JMD=3sUQu3E`n++eCX
    z3LEB(zf`sl+^(L~wsF35iPN`krtv+Aw&icUktteo5)wT5ts>+9Bq8@pzXn>t`m!nl
    zOVxNFdkQ^2B_|Z1FLp7vig-5OibcAw-diM-P3NjU487qnluV#7eRQD%A;v%ypN-s}
    zT_pqYMgz8fT|Q`_i+WODb>5f&$<|7rF_2=a`8X*79why)e+ars?R`q0zk<|Q&_V07
    z6XJz?B;Q6sB0RJBbVj7^G|5eqcci?kyMy%i>O4vN{LP(fVM?k#6r;QomNr=N3A?(8
    zQ7Z-J2Hsd{m5REoEN|sL;ojWQ|}zPL6Lg4(OY&OHdS>jI(ZsbP+h7
    z^aC95#tuhY=?yqcR&uf0W&$)fguWR_G#&2q5TN@N{;x`j497g!T
    z1`+gO(kn~}J;<%&+UfGThmyu7j>Lz8m2xfRqWfJkv^b`Yg}5en6b8qPkw@!dVC`mA
    z`!6U-C^vQn>@j+z#4yfj>Il-e7iVc;qDriZ<-8D;hMiy8N#_BHm
    z-KvN7pMI2S)|drOp7a)N0Ad;c%-6!P`lFpzJZ78f4N@etwIFj;5SUP*EU`w|maCt>
    zCj+IrX9dxJYp&80*8sv2axFuygwE&{El4E;@)q_TB;+g8#v(zI?F^mLd7*Mp^#H%rt*3Q#
    z)V{4ca-^j5kr6+q9KRG6%+;!q?1PhB5qai)D`QSlqA59gpoQE;h`*;G;Nx!EnY8oQZ|=0wLoplQ_SA>Urp_?Bq(JGz+mV(jqTb96UVQ7^
    zbS3pN`|9MHDtXgzChAl!QZ`v9{oCBqBeN^Ys2q267gbYklLy^Uz>VJ~&`klF(9|M%
    zBmCV*01rS>yjO$LKHZ9vCW^jmMhx(~==tNFmFAoe%_wda;*&14@6s{_U8VrYw4^`v
    zx^W7e8cwZ-TP+VT6VZGjaRZ!m*P&S879M_alrc&THPA*KB1e=>`;ICNmYqwGDW!`&4zBbEK1iH&
    z!m;rF|2#X@8WnDOn=l_J&M_378XVpiOBF)7h)vPt%1JW58Irzu6@FM5(e`@w@_2Xu
    zgjZdP>bqPUW&W`$M4?tL+cKz-Vh8pbhDYX-)GWv9_|LU9``Xh_(H@XI#Iuy4>Yrr-
    zCfjueoZ{9kPPv9Zfov>M=I(I#;vZ*m4KT`<)nl46cYYbJa35E;XetLkcY|)zDLO=5
    zwmJ2PbFI@uC=wS;-~>UJxt7ucgC0j-Hu_?UCD;`V-lI*@otKWpWz8jIy741m_t*{`
    zS)*Pz9U1M@46G||<4sH^fl
    z#j8b{g$axM1HKlA7SLLv)xUk;y0!7rUG96u;ReG-msd8!)`EuZHLc?Jpo-tN<*u1SHN%;QOLdN9FW6H=qEW?ZO!O-fXd0%HM1gJ;
    z$$*aL#iBO5_~$lA%(~7sn)3_~tghynVsbxjedxpFl1OCTu@*+EXA=v0?z>yGCA1$f23$nt&N(NRnJT;XT|TEJKnoiAk&bl(_>=mHt>0
    zPnfM-BKVSp#|9y*ZZX+>M4xI8@~7lBY5hN~(#P{$R9BxVs4X;s+CvzL@b402E#P(y
    zQZ`y`Q=XPL`o%xiRQ?q2NxZNSd>8EG#3M`&Zh^^Jt{2_`KT3WANz~pZ=YnxEr|XF}
    z78tDHnR>e-s@0a}siw5jq-h1FhC{p6I=4`-+pa{NOBe5Gn7&wKmu}3`>%I*-?$VCU
    zg0UKblCff6wPx(oFjkg=Ldc>?2!~^l+a&T-!f52@Zi|&7L@h8z`acxjyc1^HLf`>U
    zs}W={D6QH?JUkThmJ5ZrfUC`DN&C2a)gK^|AyLJ2puJq^HatBfnyi6L)HgcxIDQf4
    zT2cnvx*Bt)B}}wbD(lS;2K&n^Ke(uwvw0C_YtAnO5>}Tft~=)g%Y<%7$S})>MLxAi
    z4Kj>0aNtgO071rSr8gqoxMv8RACA7^?#^t{{3Ptxb_a(xFFQugp-m4i03-2mm!3O$
    zCfQG78M84?W8m4Qlb(8Hs`I^r=J&T+i5ZK0>G}El-YVNO$X+SC?>x(ovr(&`AuEi~
    zCUKiq!Z3mh<^oJ}JZMUW(qcg@0o`UC&eJaR61v-H{8!E->gPMH)-86=xX3DwEw7;{-WdB+4cf&Q|1JPwdV46qm{$
    zNl|vN)7(Bdpa`{IB2^d$e^QMaKiL?q{2UUMNC(@8FXGL^2h%wGcAAE#_&kyR0wN62
    z35p_|NE&KNVB!cP_9{Y^(?A#DA6i@$n!J3QyWMQqYuzUA>7rEQ%yf9~%)hX_bWX05
    zfIP>@vYw=~7o30T!5hqHUR8R#m!i*fzheWc8qtuyeX?Js35oPmIv?HS1NztyGNT)y
    z6K&(|55sIq3W2rzpFqF2J9R9ge1Z@C$iaB&DZGNQm3rsyBP0@Micxeb)>a?&H>_ig}^
    zac45@q3up2YJ`k{_OyWxyBnhiPu|a1I`{pIWlc+3LqU~~m=InZQwAtBzmaWTFpvTj}05iTzF`3{IABI>1(RXsQtiWWrjD>0&cKe!Dn_79rUNZ=flM7Gk5
    z79@tF=3>If&n8=IxHk=Th(}n@D`9e$!c*)sEa~y@dI?iQ4>?oVz4paFQ?GuN%15q$
    zBQ_eLkw(r+W6_CeUj8dOINCfy&W`%Z-%<-cOJM_*%Q<61BNtsr8=LS*<{ia`c_FX%
    zE^|XaSK(iE1;qO9`Tox@_cqjjV3fM9fEPFpI2c9k6;odtOT?%$ZGML&PN(BW>12P!
    z0!Oq6MNoo*8Fr#$nyp?a(kn!%5<~F!Q8~nn+eKlZ=I?hSiKjNfRv5N8lDT|-i}d1Q
    z^u{$OWV(+gvMn8E#uzByB-)a1=;wY>>oR8pSiCp#4QmR;HWsm&AOJ)AoGJ0>I9X5M
    zlY)nmY2hK-Vd=nf)@nb&d|B*Ts-{ZM&|Z+LsPz%k0Q)M$f@yj~HmP%_?hBozlE{y9
    zUGKd-+TC-d46Q_&jk@h-D22E(2rr`54|`IPDgiv%sMxni?urL}5_?g1kN;NgH#ANU
    znmlrbgKN-~>&nH)-hmStDG_JVZD{4kNl2vk|MS|`Os*Y*$l
    zog%w?G00R;h$$T@i(IY0f^}d_i0=AFVWnp@U00zk08AaQl8tO`-K|%vU8XHG(agd&
    zE?QZ)9Sqv_&_^Z#m(8@phIn?~2x*Xl8t0OIhznG-JgukmNBgD2f=06_n6op<@P0EkL7evJtjwS#iRDLOFiA0f$1%1!W1j*?!vb$
    zP?*a4+yYT+0?d(WJSZHJ@6PQiCGoaO|FkCK0nUU2=b~;)Z+lS-D4Kl4+Lp2bmL~fs
    zgo7~>mlqTpz>$-{%y}Ukmj2OaE2<$8F&WcMJ+iBF{)iV;%M2eiXnm)qR
    z0TM|HM*$o)S29$WG^~8Y5hl?YHz)Cwz8M2gUM8
    zdsI)3Pz(INo24rpag{q8XKC*e`&2e+f+oH=rjoOcyov9#lCu4Gj$R%^e>JgD!V;%P
    zuTFOM7^aJlcjloJX5-iZBcv8563y}4GoP&C4PRFXs4R$3y4oONU%VOtBH=i*q4ytW
    znemEJWegyej%t7ivPZ|vzM2F5cz?&FfJJb-weXssYlgM(OSGm0d9i<5J#_vuX=5Ab
    z^+81(7AIYzCY;_+gTs*RCIQ-C2}U;+(it~V&qx`LG~pz+4=wdOtx>1q2ATi{OSc}|
    z1lvWG)ro+UkWHc(l8{C8P3<%ym$kIN7a!ZUHHbT2P_(OYE{pd8f)Cv~s4Jt0yyM};w!+Jfz6vnTKI}pmXedpus3lUwc`4r8Q>9#Ud%tZgQ
    z1M|lK!_IO=q87zC+`)*jn=Dk-_61N!k}DADb1WF>AYrJU`4f^JMlYIWe*QJu_*QfpR;A8U`kd{{mfo6
    zyLqk%X9N%#<;f8+qu`T{C}t?|ukV0Hpeb;YyuwQ;vG-T0#01*!vO5FacB&HtYKHvF
    zX@$EBU-#PfZU9z}Z2$1|Z2REAImifs<*UO5ChW%Hz$U1wT#2_XdO@E!7R8nhnhY;M
    zoVsF5gdmb8#Fnl-tOS$;^TnY5!=)MlaC@0VO9fgCClen2E?zQ*(~|Syu*9d)52w2|
    zYyt*+(X*k*l-SNeUx;oF7)vfx(Dcqk3QHx{96F@1AOlsMn1@4_*W^zXppcS
    z4m(hLZYARZa5uu2yR5heK(}xIykusHj~j{H4UJnygVu`{B3GJ9GwQeTr@|K=s7j)OyTNBwwzH_ouFqDK+u%
    zXc;k6&RE!yL%wB8<3|qBeM$9J5!SQ7R2K&UyM5ff(YB0;|HmSex46G?z|0%EfA7COaml
    zBL|BHwz-D7@0t;gJKcj!GVm%*{xq~A#|i9sdYPuo4(
    zXE-oBPQ0v7I0VHd6Pok`5K~J0=HOgT(h!Q{zBPQb30$T^05t))OgS`9_73*8PoWXj
    z3lCfEx2V(70-oLnD-vVoEIyq8LN0V36lQ|LZL_^tkW(?Sj#{;o*U1|XmGXXOvU!;$
    z1Zt(`MeO_IVN_16nNFUHv@}YlYB>93=hex{-r?Enjg!5O{
    zW*BNno0HLDLV{*1&@NIaU+@CBvB<@}RW*B}!GGq>0fdCYXe*CtHkm}Nz(%9&ZSS#j
    zM@|Ly6wtVvVo()(?@9A0m_tjrraC&-nAsTUlDdF|RMGcjAnUGXa++^DP98BUK4d3SsS#Hqlj1lD{XxZ#lqnJ4w3S%V
    zq7L|vl7j&(Q}TDc%-X
    z`%3e-;w(X`zd_b}Jh@;i+~hKSpXkgmg{wJn-(PpFhz4KlTz_~Ale!)!OFPwM{V#v{
    z(+d9mpY-=%RuUNG8vXr*{(hP~AAxXvI=CFaM}&Qj*@nfxcfa4JCXb*!jBtm%10XJt
    z!Jq!nq}yjCQ6WzV
    zc@B(WWMhuj+r$EasCnF|m$Y~ImJjwctGWBH)lPWu_%&JFPm
    zpc(2Uu^p^YH1%g1;Xs*(Cq(;~Sn^Zepo+~PBSS{2TDD-ic2>q%>KgVf^PK3Ch)f!5
    zXD=tc6>I_uCqM0<{Rn4DvVHhV^3(Ro$@bydFVD<9Ei!e?k>7Au7?=mF&iIxx4?jv?
    z?w#!X2vxR!*gx1m`vvFleE;ll@ANczesq#-C&$|-XZt&^4z^E{<5wrgN2hpmBxxZi
    zGkh^f4GG|jqfF-g3#_9X{S@ea+C|x_#lfU!t`z~bH&7;P?7;CEN|nGst|aeA-EpcM
    zske%hq&&dkmE_yMBxfmV%aUUX16WH=F&1a?^eOCx9|qYNi@w~(%4<*7*Vk+7PuF0_
    zygJ>MX>F6kD9hi%ogiMw2#RO3BI+z`!$EAC73s_oGg~9l-dNp%uZwG8W&dVfBEDX^
    z#!RSr#!?ceqlKy6+r3FAHCsl}o-VA-XlNd^kBn+#BI`T$bW5$Vr#EraK%~FfG!WwC
    zkEe_|K-Q+793}TOVw(<-GB!6D^!tqBXtSYqL9BIbjmM-bJ{RIh4wq~xjtX|(WptQ~
    z+GyG%!K3Sr*~z7WYg%u$?F`J@W~;sF7J=hTJZB1upgjpsL2_HIvz2)bb)0mLTVtq6
    z-v&5$F8+Y$B;_YTg!L%Eu(Z=uqKqMI@L!X3x>VlsLf!ZWIyuaB$5xyr<8vZtm$-3t
    zC`&_QN!`b5oem+EP_-&iBvnk@OpxTUQMEr!lGm<3)%d@Z{_64HLotV9&H~s_zzUb|
    zJU%&kakBlAu2WvU1QAd5+!D8-aULzfC`FQjen;eBl%QFT((z=37AOD{vdCv^EiueD
    zeuQuPgZF(PTF@Dy5Vk4}(kPD1wF}O0#WP9C8>6^JD7AMho0^Iv|jol$u$En>$kV{_KZfzND|lh$&J|2@VJA!Wh~`(
    zbH9ENHl(TE)lUXD2P+g$b$PCJkcHD#t
    zT+y6)0i6ZD@o@j}#fCt@Qb$x~IKhX2^>es45>m;klE{haF=6%s`Elepkw^%ifn-AB
    zJ$!Ue$IlgM`G&+2ywh`91Cr(%xi`+YWqDQma-5EO71e~|?cs}2>jKN(h~#Y`ATkr|`P&;kj<#XC`7c#nh?1XSmo+ACElCA#wI(f6a{d(u+o952Z;q(0$
    z%^&x+clS<~FsybJ!)jOS%d3s`RiL}UjKs0jE--r|;1Y|kgF?i`ou=!6O`f=MH(bp>
    zTXJ0sH&Bbqjn&nPyx4&0tya!Gf9K*Z
    z%9p_Ql!|?y?G|yX<#!2E(SN}M$?%S?o65?Z2b9y=RPs0bd~#Zf)4qZ&18vol+W2+|
    z+!$;d6w#fDpmiY{fPZ37A4D}ks|I{2uL80FqRAK538J8zTq33mq9D3HbI`{_lW$Bs
    zynk*i!Nu2`BV2R2PR!DjZVjYU65(zYm7L}9kcwBBsu1>p)8nQa2)dAA-qUO9Dl(l3yfy-vHXZUC*}N>
    zFD1>Zc&jNVPEU65p3R`MDfmfA=xuqmy=qcT&@c#jrDn;FWx>q2J#-7md_rH|xw^i7
    zh_0{wu7l7NPITJW9II1mInC1$zxNiTs9HO$RzZK{rE2m~^=xa;lFt=wtsUPoz4XH;
    z)WZBh8>TmH!#sy^{l5E!dzf>(sJiI)*eAXD_et-I_lcdzov>A_&5L(Fyh6lN#ohl3
    ze&=3jzYyX(JBX$I_AOsBIboS28vq+W19&TC=$3e_51$dSNI!7%=CYSeKcp73!v(*w_h!H}oF?b8_fsMUAZznP7&xVsx
    zcQDDEX4+)3O43HFmyx9ro9Xv6y!%5_HfV{>ep&#?t1DDQvw*p@z5nxy)7I{*m1O^9
    z|L5u~EgiIQrZd$YJaAPZTz#z)K_=F;>$@Gj-?#T%wpZJWt*85_01$GDab
    zVfELoEFG(<$uI||CtTxHprZu|S#Jg(K
    z4J};|AFixLl}{R&taqjnqXaZX8AG$x!Ro4VNjxN5Bpja2ZYSC73i`jkOaIsR?|&{b
    zy^kk)#cEwHFamWiwQ0QwpG}HMzNWVBaG|2Db(^DKNNjNEXsv{%J;Tjp|;-}j<`mVvF|vF
    z8#}G3BZ_npAD@COTr7;paM>S>I*G7Q8z!tV%ME;iyU|!(eYE-vf34y_@R+P#;qxQ>
    z{Y(TISzP>yZcOOMOP9_Rq7HxPRkQh8D(la(=F8(%)z?8n22-)VYKtg_yD34ObWDhc
    zS~i;bjDcy(*yvFF#i@?Eie3xYn9*o6ma(_Ey9G<@%hG}wg=~cdrOE=@>a@0p@$4Dh{^HnACzdCmfBGaHm9rk4|er(a*_fX+;l(TLcYOON=M|
    z)Y1ZpET|pL@SRC!IL{>3dnU&VkdGP~!A@t6vQc~0y^Riemf(94gA^3IH;WXub4MoW
    zTlTwA^Z4=-9A-^660f@L*4yNZ!@&(Mng?eG`#+p)pX~3QCYv&*daos);i1`UH93q8
    z7Qmp}@?IRw>uvXCHfXTKe@B(I2Ocj&)`K~NaFWjQOMD)gM;S&;aT(Sm*c&yV1zB4OYCrjr$8z&pvmE|Ja;)Twd0feO)BD#`0V|hBqSORFUt6E!~{#VRc0;p`i
    z*mFAiW_m|5+dFlI^MX!vN)C?gK0nxgfke*t%?AR$v4)we3VrlVke(Vqv{kzv4Blc=
    z#9kjSRB9@B*IPi8clS=ucK1)J<)t2FiLI`}zeM8dtp(4!*)+p9rqiq5;h^jGr=L8)
    zsm*iHb^8x<&_O$QJ?Pe+ur?rZ=j3^f84ry0`k(9HO2|{^2*k=;)>y9FA5O+XPja57
    z-;l%Sw=1F7>7R4Hr|aT@ip`)CDm{La%;AelewFTQ@~))QJUg)oR7qk$g?_xBH7QMW`4
    zR|0f`<~Nr0?zP?<|50pYnhWVn|4~x$Huv0M>tNuO7$VhQol
    zgJX+-ZJ{H+a%K41KEbEIA8()i=oKEmy+Vq@h09CwySln10p7U?lLH+_q=4{*TF5?n
    z1#v8Ns&hGXQ)}Hco9zxf?Cj#$fWa?+{QpmXZ2o=k1PS2d`seZzerTTV0mQb?j!vqi
    zi*I*K=rEj*{M<5hvYA~scel^BWjOk-n$+4T4gcwzZ@i-F-jy%y6+7KI**`vumXZ;O
    zg*Fw@S2&I;MkUeQclc3oxM|)}vJNPAcy#h|8#zXu98l=vlfB@@(dn80MykC!%vB6u
    zVb$QBaF)QD_2BFRc+v}i=Jg;OyYKNC7qT_FO1%&K20rcXL-QDg3(j<$XGA`Ty~TJR
    z7*>9!Op#3l6`|1Lq*>as>I
    zU_vGwMr8}ayS<$=D@ht5u{Y2+A|dt$Q4!IWWBJfNt8nO7G}56h=!k~7mn0YZEwEr{
    zOGczZzk(wc+FC{?3}2x@=-0OrVOSQ$!B|-%59azqVK7#Mq`|N>ih|)gk^^Hcj3RR(
    zDKLCVBB0*_$$++;5dfX#5a};~tP%fu0~h@)R?#NTeE?kD-Fv?M>Hw+k&cUl)!qVD)
    z9sV=ajDANq-r{2*1*C$MO$Lv2ec8Ne-2!*AX(ABQ2zGX=#Em~cm4CgCtF+1N@9me(
    zo#SJYER>|!XZ~y+I}OJjicq`gaCUYMc6I6;S~5B=
    z3RH)M4t9&CX1ft-3%{A4wLwzen$1_yAvUYf-Wkhs>6n~=cjU3nkJyCJRRo|t6|4HF
    zEy45I-p~7o&yVQ$-p^+z+f6J{HRl^rMEMD$-`?HbNB4g?GXOwDE`wKC=p~TU=JV}?
    z(>*F+AI-MNc4=Ph{@h^OJd`!>B$NXSR
    z$Zvf8%M0Qwf1>yLutocv%HqHDc#Ki}=mq|QS9?1@9^ni8S00-?`l7j`uMW+tLw$8-
    zUY+5q7bkl(Q2K!{e%^!Cr#JL#3)#vY2RQa=%W|B;=5D#q&S%ToZUwKLLWZ&3^53{c
    z&frC?HSYsduv(5S`H3(0e>mJbQ#VGtX0i9V;;=S;nhdF(7&UWu(^VLr99o}FOLY9L=`q|`>z`t9<`1tBFON>noX_^9Q;;H{I%V+L`HTp1
    z_`)r~Z=51PYQje3l~YJ$Lbs5-qC&2a$YtC&Pz0oW03UwhUw9CRw2dzv$(wj?dWS#o
    z1>!ipz#k|{+p*X&wA#(~xXDCIf1B5~clX(RHa$3x%=h*F~KXL^7S7i0lUQY8J_68X}VD}@{Fbz7Nv
    z&5!0|dpNP5;K6(tI8_F={JXT@8I0^FeumFhzp*7hw>XUf21CX;&G5l_6sgydc1Z{}
    zW3^BENk*!__4U9OADFUsl+L5QRFiSqC;D_bFz@N7r{>`I`m{w{trX{9{0e7iU&|AI
    zLSYr}OSNzB1r$JgApXL?@D<*6H;43&f5OWFChKq~;k`gLk%6`WbX*C-MPgr|N@me3
    zGx)_h9o<>@Z?MR1hSINoHcv*I;b}2M!C@BNeYT%v;q8
    z05!~*xA?ez`sz8b&wHmE?(YOp9aT$p{Qt#&Ek2H_v^SDM1^9F|x2TeR4Kq43Y>|ar
    zI;5~Hf2BYb4YKzlW4KDRS|t(XIznx^T!xp+Rr3O>c0zqIUa*vx@GKH73;q-hO6#Up
    zgX0^{i)(6Q!8k@dbJ`T^S$%~Dcl;YowfGl%quSn8iAH_vS%{h+Jp>c?R=2{9#APc6EalKQCqhcOJY>^SgOrz>5?u;DsX;Q@BY*m}zP$SB
    zQ{}w$%-6pGe;-aaH+cC|)f7EualBg2
    z&CZPWS=6X9MzF=q%^(~1Zh2+po{N^0r?*@$FR^x%3Zr>ZaZ!oX0(?ZfKG@)!H@;OP
    zJCpKv`t9Ps@?X#4QLi14ihPHz5mdY_8<%Dv9}Ubgg&E)9#YN`p9s<2{sdcb_dQ6vFuvBbfP$l7zvEM1^
    zRFBjV<^%fwZIW)DlTT#vDPR4Tu%!8s;#(37|0+!E^^SJjvf9Im^*a{+zqGdE14Zd%3?0L*hxHZs-bl
    z8=N#Hxr2Y{;E%yofs?l+S@6K7z{Il}THoZ((Pd%teE7a2gPFD({~F8TMO0X#JKZK`
    zBdwOp2sd3L9sGuj+M%)(vp|a>i51wC%jwN@WiD{2PD%f%xMf&rTuoNXx_^?{pBV6
    zO~$8e9lSzLKi)I6;tIoRoMmA#ynMvA*olP@MZvz6q866=puPe&DuB<53ZSOw&
    zY65NMzST>CJV?y)DwlAf=gOvvT7D^qwsSKTqx-N^avYbT_NoVu9PR3Ow25G;bAZY?
    zeg|w`6BG!pHay8U5R9JVVzIlr5sAC@w>D$OI=cZ64h9wMew22!1k|Ta;(bI)`@Q+{
    zDcvw3gK4y|^kyT`52T}|0;-n7qsEi693xgFPNX&MQk0*lTEf}FmYy?$g-Q(vU3j?C
    z)rLm;paJS{yl1sv@X7m(_tEwhpC@Q-pG=zi8+rbt70Z0cF32;OHVHey*RE8Mlee0
    zOu=X(G#=QiG%Q9j{jF~`$W~0dl6ZnB3rx-`aDxWg8;J!x?F0e2Rpz_j?WmHRT%Y7t
    zkhgd!8Ye#IL!)`ug>k&=>fq=XVa4_M2DUK%Z8qEGU?UL$T3=}CU~~G)I7byXYqJ{<
    zLAOz%0G8PJV0Vk^AU$c{EdVIB5t0s_M2MLiNe)-z3l%BmuWr5}S*SoE0zKvs#((3N
    zPy~o<_8j^dZOG!|Vdruqfxn~&{zV`df+#l3^nIqUT}tlKbpdcvq?ElY8u;#=q*6Nm
    z@#ydukq?D4M^z|~MM8t=D)Jsl@^F}Aw~`!c7cJO9#XBv(%lw+ASvuLZleMZ&|-J1pG>a;K;CC9j{>
    zzx~U~)B2yDR?!wk1ApR~$0-5P$b~kOCP&XW^{dT0Ez#@}a+^(-@c2Ew&Hj#NCTP(x
    zHaWgAJthW`g9hq{M|(e`k?oAcy?C1)SYX9mq5UG$oUi?o=r_GyTYFMl`!;#9w(;ai
    z%x}8L|2p5)TrSv8*H-?NJchsjj4s$ovW)+&!e0PZHCX))C;>EIzy2Q9I(dX)FMr(r
    z`<_XXQ^l83wp6d@+}}#@9W%#YPKPe?XRCW+zBM(DOJT_(SQl2fx66BRi+6Q?zjKh6
    z{s1?da@J^b(;5wvF-U}H-`2coWp5L*p6ql+7-Vh;<>_FuMmn%a@PCUoXtFqaZT5Fw
    z9?xEvu+-Ew2@8MOdgNOB1J;7pfH-^lHR+Ei1w1{ByEjaA>?2Ukn_-f5dq4xngZ|Yd
    zO@?UnJ-BRk($@I;LDp@aRlCEQJ>-gg$$H&wwPwRzzzH+BnFF3!Z8lKDQd1!t7XC8u=34s$=mlB_
    zH!(8WfPeO~7XOf(%MU>Sc*SNfMZVnB#mE=`vgL@h_XjKpaZng*p~XpwzZCeelV(Fc
    zC^Qx9LD?^ZdDz$=0PyU#U%TuL1|8yI;6HL9GCv-7hl8QF4IbZjDS)8OUW%a5)TIc@
    ze%Vrljr{>jG3gBPKZ5%g;=cN$T<0chz7&Dh6u37$Z439{C?0hHR{b&5
    + echo $ECHO_N "checking low-level packet interface type... $ECHO_C" >&6
    + 
    +-if test -r /dev/bpf0 ; then
    ++if [ -n "$LL_INT_TYPE" ]; then
    ++    echo "$as_me:$LINENO: result: found $LL_INT_TYPE (cached)" >&5
    ++elif test -r /dev/bpf0 ; then
    +     LL_INT_TYPE=bpf
    +     echo "$as_me:$LINENO: result: found bpf" >&5
    + echo "${ECHO_T}found bpf" >&6
    +diff -ur libnet.old/configure.in libnet.dev/configure.in
    +--- libnet.old/configure.in	2007-04-01 17:36:55.000000000 +0200
    ++++ libnet.dev/configure.in	2007-04-01 17:41:08.000000000 +0200
    +@@ -97,7 +97,9 @@
    + dnl
    + AC_MSG_CHECKING(low-level packet interface type)
    + 
    +-if test -r /dev/bpf0 ; then
    ++if [ -n "$LL_INT_TYPE" ]; then
    ++    AC_MSG_RESULT(found $LL_INT_TYPE (cached))
    ++elif test -r /dev/bpf0 ; then
    +     LL_INT_TYPE=bpf
    +     AC_MSG_RESULT(found bpf)
    + elif test -r /usr/include/net/pfilt.h ; then
    diff --git a/libs/libnet-1.1.x/Makefile b/libs/libnet-1.1.x/Makefile
    new file mode 100644
    index 0000000..feb00cd
    --- /dev/null
    +++ b/libs/libnet-1.1.x/Makefile
    @@ -0,0 +1,75 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libnet
    +PKG_VERSION:=1.1.2.1
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME).tar.gz
    +PKG_SOURCE_URL:=http://www.packetfactory.net/libnet/dist/
    +PKG_MD5SUM:=be845c41170d72c7db524f3411b50256
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/libnet
    +
    +PKG_FIXUP:=libtool autoreconf
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libnet1
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libpcap
    +  TITLE:=Low-level packet creation library (v1.1.x)
    +  URL:=http://www.packetfactory.net/libnet/
    +endef
    +
    +ENDIANESS:=lil
    +ifeq ($(CONFIG_BIG_ENDIAN),y)
    +  ENDIANESS:=big
    +endif
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--with-pf_packet=yes
    +
    +CONFIGURE_VARS += \
    +	ac_cv_libnet_endianess=$(ENDIANESS) \
    +	ac_libnet_have_pf_packet=yes \
    +	LL_INT_TYPE=libnet_link_linux
    +
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR); touch \
    +		configure.in \
    +		include.m4 \
    +		aclocal.m4 \
    +		Makefile.in \
    +		configure \
    +	);
    +	$(call Build/Configure/Default)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/lib/libnet-1.1.x/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libnet-config $(1)/usr/lib/libnet-1.1.x/bin/
    +	$(INSTALL_DIR) $(1)/usr/lib/libnet-1.1.x/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libnet* $(1)/usr/lib/libnet-1.1.x/include/
    +	$(INSTALL_DIR) $(1)/usr/lib/libnet-1.1.x/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,so*} $(1)/usr/lib/libnet-1.1.x/lib/
    +endef
    +
    +define Package/libnet1/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libnet1))
    diff --git a/libs/libnet-1.1.x/patches/100-debian-subset.patch b/libs/libnet-1.1.x/patches/100-debian-subset.patch
    new file mode 100644
    index 0000000..ec3b932
    --- /dev/null
    +++ b/libs/libnet-1.1.x/patches/100-debian-subset.patch
    @@ -0,0 +1,107 @@
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -21,7 +21,7 @@
    + dnl
    + AC_PROG_CC
    + AC_PROG_INSTALL
    +-AC_PROG_RANLIB
    ++AC_PROG_LIBTOOL
    + 
    + AC_CHECK_HEADERS(sys/sockio.h)
    + 
    +--- a/include/libnet/libnet-functions.h
    ++++ b/include/libnet/libnet-functions.h
    +@@ -1429,7 +1429,7 @@
    +  * @param ptag protocol tag to modify an existing header, 0 to build a new one
    +  * @return protocol tag value on success, -1 on error
    +  */
    +-inline u_int32_t
    ++u_int32_t
    + libnet_getgre_length(u_int16_t fv);
    + 
    + /**
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -12,4 +12,4 @@
    + 
    + EXTRA_DIST = Makefile.am.common
    + 
    +-bin_scripts = libnet-config
    ++bin_SCRIPTS = libnet-config
    +--- a/sample/Makefile.am
    ++++ b/sample/Makefile.am
    +@@ -60,4 +60,4 @@
    + ip_link_SOURCES		= ip_link.c
    + sebek_SOURCES           = sebek.c
    + 
    +-LDADD = $(top_srcdir)/src/libnet.a
    ++LDADD = $(top_srcdir)/src/libnet.la
    +--- a/src/libnet_checksum.c
    ++++ b/src/libnet_checksum.c
    +@@ -42,8 +42,10 @@
    + libnet_in_cksum(u_int16_t *addr, int len)
    + {
    +     int sum;
    ++    u_int16_t last_byte;
    + 
    +     sum = 0;
    ++    last_byte = 0;
    + 
    +     while (len > 1)
    +     {
    +@@ -52,7 +54,8 @@
    +     }
    +     if (len == 1)
    +     {
    +-        sum += *(u_int16_t *)addr;
    ++        *(u_int8_t*)&last_byte = *(u_int8_t*)addr;
    ++        sum += last_byte;
    +     }
    + 
    +     return (sum);
    +--- a/src/Makefile.am
    ++++ b/src/Makefile.am
    +@@ -8,9 +8,9 @@
    + 
    + include $(top_srcdir)/Makefile.am.common
    + 
    +-lib_LIBRARIES = libnet.a
    ++lib_LTLIBRARIES = libnet.la
    + 
    +-libnet_a_SOURCES = libnet_asn1.c \
    ++libnet_la_SOURCES = libnet_asn1.c \
    + 			libnet_build_802.1q.c \
    + 			libnet_build_802.1x.c \
    + 			libnet_build_802.2.c \
    +@@ -57,15 +57,20 @@
    + 			libnet_version.c \
    + 			libnet_write.c
    + 
    +-EXTRA_libnet_a_SOURCES = libnet_link_bpf.c \
    +-			libnet_link_dlpi.c \
    +-			libnet_link_linux.c \
    +-			libnet_link_nit.c \
    +- 			libnet_link_none.c \
    +-			libnet_link_pf.c \
    +-			libnet_link_snit.c \
    +-			libnet_link_snoop.c \
    +-			libnet_link_win32.c
    +-
    +-libnet_a_LIBADD = @LIBOBJS@
    ++libnet_la_LIBADD = @LTLIBOBJS@
    + 
    ++#   Here are a set of rules to help you update your library version
    ++# information:
    ++# 
    ++#   1. If the library source code has changed at all since the last
    ++#      update, then increment REVISION (`C:R:A' becomes `C:r+1:A').
    ++# 
    ++#   2. If any interfaces have been added, removed, or changed since the
    ++#      last update, increment CURRENT, and set REVISION to 0.
    ++# 
    ++#   3. If any interfaces have been added since the last public release,
    ++#      then increment AGE.
    ++# 
    ++#   4. If any interfaces have been removed since the last public release,
    ++#      then set AGE to 0.
    ++libnet_la_LDFLAGS = -version-info 4:0:3 # CURRENT[:REVISION[:AGE]]
    diff --git a/libs/libnet-1.1.x/patches/150-portability.patch b/libs/libnet-1.1.x/patches/150-portability.patch
    new file mode 100644
    index 0000000..d96b395
    --- /dev/null
    +++ b/libs/libnet-1.1.x/patches/150-portability.patch
    @@ -0,0 +1,14 @@
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -67,7 +67,10 @@
    + dnl
    + AC_MSG_CHECKING(link-layer packet interface type)
    + 
    +-if test -r /dev/bpf0 ; then
    ++if test -n "$LL_INT_TYPE"; then
    ++	AC_LIBOBJ($LL_INT_TYPE)
    ++	AC_MSG_RESULT(found $LL_INT_TYPE (cached))
    ++elif test -r /dev/bpf0 ; then
    +     AC_LIBOBJ([libnet_link_bpf])
    +     AC_MSG_RESULT(found bpf)
    + elif test -r /usr/include/net/pfilt.h ; then
    diff --git a/libs/libnet-1.1.x/patches/160-endian_cache.patch b/libs/libnet-1.1.x/patches/160-endian_cache.patch
    new file mode 100644
    index 0000000..766d2fe
    --- /dev/null
    +++ b/libs/libnet-1.1.x/patches/160-endian_cache.patch
    @@ -0,0 +1,18 @@
    +--- a/acinclude.m4
    ++++ b/acinclude.m4
    +@@ -281,6 +281,7 @@
    + AC_DEFUN(AC_LIBNET_ENDIAN_CHECK,
    +     [AC_MSG_CHECKING(machine endianess)
    + 
    ++    if \! test x${ac_cv_libnet_endianess+set} = xset ; then
    +     cat > conftest.c << EOF
    + #       include 
    + #       include 
    +@@ -332,6 +333,7 @@
    +             fi                                
    +         fi
    +         rm -f conftest* core core.conftest
    ++	fi
    + 
    +         AC_MSG_RESULT($ac_cv_libnet_endianess)
    + 
    diff --git a/libs/libnetfilter-conntrack/Makefile b/libs/libnetfilter-conntrack/Makefile
    new file mode 100644
    index 0000000..690b9ac
    --- /dev/null
    +++ b/libs/libnetfilter-conntrack/Makefile
    @@ -0,0 +1,72 @@
    +#
    +# Copyright (C) 2009-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libnetfilter_conntrack
    +PKG_VERSION:=0.9.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:= \
    +	http://www.netfilter.org/projects/libnetfilter_conntrack/files/ \
    +	ftp://ftp.netfilter.org/pub/libnetfilter_conntrack/
    +PKG_MD5SUM:=b7506cbb7580433859809d8eac53a199
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libnetfilter-conntrack
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=@!LINUX_2_4 +libnfnetlink +kmod-nf-conntrack-netlink
    +  TITLE:=API to the in-kernel connection tracking state table
    +  URL:=http://www.netfilter.org/projects/libnetfilter_conntrack/
    +endef
    +
    +define Package/libnetfilter-conntrack/description
    + libnetfilter_conntrack is a userspace library providing a programming
    + interface (API) to the in-kernel connection tracking state table. The
    + library libnetfilter_conntrack has been previously known as
    + libnfnetlink_conntrack and libctnetlink. This library is currently
    + used by conntrack-tools among many other applications.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-static \
    +	--enable-shared \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/libnetfilter_conntrack
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/libnetfilter_conntrack/*.h \
    +		$(1)/usr/include/libnetfilter_conntrack/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libnetfilter_conntrack.{so*,a,la} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetfilter_conntrack.pc \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libnetfilter-conntrack/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libnetfilter_conntrack.so.* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libnetfilter-conntrack))
    diff --git a/libs/libnetfilter-log/Makefile b/libs/libnetfilter-log/Makefile
    new file mode 100644
    index 0000000..0936941
    --- /dev/null
    +++ b/libs/libnetfilter-log/Makefile
    @@ -0,0 +1,72 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libnetfilter_log
    +PKG_VERSION:=1.0.0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:= \
    +	http://www.netfilter.org/projects/libnetfilter_log/files/ \
    +	ftp://ftp.netfilter.org/pub/libnetfilter_log/ \
    +	http://mirrors.evolva.ro/netfilter.org/libnetfilter_log/
    +PKG_MD5SUM:=acdb188a1e7504e95636d0770ade393c
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libnetfilter-log
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=@!LINUX_2_4 +libnfnetlink +kmod-nfnetlink-log
    +  TITLE:=API to packets logged by the kernel packet filter
    +  URL:=http://www.netfilter.org/projects/libnetfilter_log/
    +endef
    +
    +define Package/libnetfilter-log/description
    + libnetfilter_log is a userspace library providing interface to
    + packets that have been logged by the kernel packet filter.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-static \
    +	--enable-shared \
    +
    +CONFIGURE_VARS += \
    +	LIBNFNETLINK_CFLAGS="$(TARGET_CPPFLAGS)" \
    +	LIBNFNETLINK_LIBS="$(TARGET_LDFLAGS)"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/libnetfilter_log
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/libnetfilter_log/*.h \
    +		$(1)/usr/include/libnetfilter_log/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libnetfilter_log*.{so*,a,la} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetfilter_log.pc \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libnetfilter-log/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetfilter_log*.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libnetfilter-log))
    diff --git a/libs/libnetfilter-queue/Makefile b/libs/libnetfilter-queue/Makefile
    new file mode 100644
    index 0000000..d10a799
    --- /dev/null
    +++ b/libs/libnetfilter-queue/Makefile
    @@ -0,0 +1,72 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libnetfilter_queue
    +PKG_VERSION:=1.0.0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:= \
    +	http://www.netfilter.org/projects/libnetfilter_queue/files/ \
    +	ftp://ftp.netfilter.org/pub/libnetfilter_queue/ \
    +	http://mirrors.evolva.ro/netfilter.org/libnetfilter_queue/
    +PKG_MD5SUM:=af6a9ea350f63a13609bc3b47b5c395c
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libnetfilter-queue
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=@!LINUX_2_4 +libnfnetlink +kmod-nfnetlink-queue
    +  TITLE:=API to packets queued by the kernel packet filter
    +  URL:=http://www.netfilter.org/projects/libnetfilter_queue/
    +endef
    +
    +define Package/libnetfilter-queue/description
    + libnetfilter_queue is a userspace library providing an API to packets
    + that have been queued by the kernel packet filter.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-static \
    +	--enable-shared \
    +
    +CONFIGURE_VARS += \
    +	LIBNFNETLINK_CFLAGS="$(TARGET_CPPFLAGS)" \
    +	LIBNFNETLINK_LIBS="$(TARGET_LDFLAGS)"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/libnetfilter_queue
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/libnetfilter_queue/*.h \
    +		$(1)/usr/include/libnetfilter_queue/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libnetfilter_queue*.{so*,a,la} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetfilter_queue.pc \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libnetfilter-queue/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetfilter_queue*.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libnetfilter-queue))
    diff --git a/libs/libnfc/Makefile b/libs/libnfc/Makefile
    new file mode 100644
    index 0000000..e22ecf0
    --- /dev/null
    +++ b/libs/libnfc/Makefile
    @@ -0,0 +1,82 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libnfc
    +PKG_VERSION:=1.3.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://libnfc.googlecode.com/files/
    +PKG_MD5SUM:=f89f58e70b72bf4aac0567d0741719c8
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libnfc/Default
    +  TITLE:=Near Field Communication (NFC) library
    +  URL:=http://www.libnfc.org
    +endef
    +
    +define Package/libnfc
    +$(call Package/libnfc/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libpcsclite +libusb +pcscd +ccid
    +endef
    +
    +define Package/libnfc/description
    +  libnfc is a free software library used to communicate with NFC 
    +  capable devices or tags. It support the four main NFC modulations:
    +  * ISO14443-A (NXP MIFARE),
    +  * ISO14443-B,
    +  * JIS X 6319-4 (Sony Felica) and
    +  * Jewel Topaz (Innovision Research & Development).
    +  Supported NFC hardware devices are theorically all readers based 
    +  on the NXP PN53x NFC Controller.
    +endef
    +
    +define Package/libnfc-examples
    +$(call Package/libnfc/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+libnfc
    +endef
    +
    +define Package/libnfc-examples/description
    +  libnfc is provided with some examples like:
    +   * tag listing
    +   * relaying NFC
    +   * simple UID emulation
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/nfc $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnfc.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libnfc/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/libnfc-examples/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc* $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,libnfc))
    +$(eval $(call BuildPackage,libnfc-examples))
    diff --git a/libs/libnfnetlink/Makefile b/libs/libnfnetlink/Makefile
    new file mode 100644
    index 0000000..85d3c7c
    --- /dev/null
    +++ b/libs/libnfnetlink/Makefile
    @@ -0,0 +1,70 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libnfnetlink
    +PKG_VERSION:=1.0.0
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:= \
    +	http://www.netfilter.org/projects/libnfnetlink/files/ \
    +	ftp://ftp.netfilter.org/pub/libnfnetlink/ \
    +	http://mirrors.evolva.ro/netfilter.org/libnfnetlink/
    +PKG_MD5SUM:=016fdec8389242615024c529acc1adb8
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libnfnetlink
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=@!LINUX_2_4
    +  TITLE:=A low-level library for netfilter related kernel/userspace communication
    +  URL:=http://netfilter.org/projects/libnfnetlink/
    +endef
    +
    +define Package/libnfnetlink/description
    + libnfnetlink is is the low-level library for netfilter related kernel/userspace communication.
    + It provides a generic messaging infrastructure for in-kernel netfilter subsystems
    + (such as nfnetlink_log, nfnetlink_queue, nfnetlink_conntrack) and their respective users
    + and/or management tools in userspace.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-static \
    +	--enable-shared
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/libnfnetlink
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/libnfnetlink/{libnfnetlink,linux_nfnetlink,linux_nfnetlink_compat}.h \
    +		$(1)/usr/include/libnfnetlink/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libnfnetlink.{a,so*} \
    +		$(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnfnetlink.pc \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libnfnetlink/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libnfnetlink.so.* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libnfnetlink))
    diff --git a/libs/libnfsidmap/Makefile b/libs/libnfsidmap/Makefile
    new file mode 100644
    index 0000000..0352a08
    --- /dev/null
    +++ b/libs/libnfsidmap/Makefile
    @@ -0,0 +1,53 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libnfsidmap
    +PKG_VERSION:=0.20
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/
    +PKG_MD5SUM:=9233cb77876eb642374a0d2bcaba1170
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libnfsidmap
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  SUBMENU:=Filesystem
    +  TITLE:=libnfsidmap, for compiling mount.nfs4
    +  URL:=http://www.citi.umich.edu/projects/nfsv4
    +endef
    +
    +define Package/libnfsidmap/description
    + needed for nfs-utils
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib
    +
    +MAKE_FLAGS += \
    +	OPT="$(TARGET_CFLAGS)" \
    +	INSTALLSUID="install -m 4755" \
    +	DESTDIR="$(PKG_INSTALL_DIR)" \
    +	all install
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/nfsidmap.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfsidmap.{a,so*} $(1)/usr/lib
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnfsidmap.pc $(1)/usr/lib/pkgconfig
    +endef
    +
    +$(eval $(call BuildPackage,libnfsidmap))
    diff --git a/libs/libnfsidmap/patches/000-no-getgrouplist.patch b/libs/libnfsidmap/patches/000-no-getgrouplist.patch
    new file mode 100644
    index 0000000..ea48245
    --- /dev/null
    +++ b/libs/libnfsidmap/patches/000-no-getgrouplist.patch
    @@ -0,0 +1,17 @@
    +Index: libnfsidmap-0.20/nss.c
    +===================================================================
    +--- libnfsidmap-0.20.orig/nss.c	2007-07-12 11:42:09.000000000 +0200
    ++++ libnfsidmap-0.20/nss.c	2007-07-12 11:42:09.000000000 +0200
    +@@ -295,9 +295,9 @@
    + 		ret = -ENOENT;
    + 		goto out;
    + 	}
    +-	if (getgrouplist(pw->pw_name, pw->pw_gid, groups, ngroups) < 0)
    +-		ret = -ERANGE;
    +-	free(pw);
    ++	//	if (getgrouplist(pw->pw_name, pw->pw_gid, groups, ngroups) < 0)
    ++	//		ret = -ERANGE;
    ++	//	free(pw);
    + out:
    + 	return ret;
    + }
    diff --git a/libs/libnids/Makefile b/libs/libnids/Makefile
    new file mode 100644
    index 0000000..21c0de1
    --- /dev/null
    +++ b/libs/libnids/Makefile
    @@ -0,0 +1,66 @@
    +# 
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libnids
    +PKG_VERSION:=1.18
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.packetfactory.net/projects/libnids/dist/
    +PKG_MD5SUM:=9ee6dcdfac97bae6fe611aa27d2594a5
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libnids
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libnet0
    +  TITLE:=A network intrusion detection library
    +  URL:=http://www.packetfactory.net/projects/libnids/
    +endef
    +
    +define Package/libnids/description
    +	An implementation of an E-component of Network Intrusion Detection 
    +	System.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +		--with-libnet="$(STAGING_DIR)/usr/lib/libnet-1.0.x" \
    +		--with-libpcap="$(STAGING_DIR)/usr" \
    +		, \
    +		CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \
    +	)
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		LNETLIB="-L$(STAGING_DIR)/usr/lib/libnet-1.0.x/lib -lnet" \
    +		PCAPLIB="$(TARGET_LDFLAGS) -lpcap" \
    +		install_prefix="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/nids.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnids.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libnids/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnids.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libnids))
    diff --git a/libs/libnids/patches/001-no_asm_for_i386.patch b/libs/libnids/patches/001-no_asm_for_i386.patch
    new file mode 100644
    index 0000000..ff6fde7
    --- /dev/null
    +++ b/libs/libnids/patches/001-no_asm_for_i386.patch
    @@ -0,0 +1,12 @@
    +diff -ruN libnids-1.18-orig/src/checksum.c libnids-1.18/src/checksum.c
    +--- libnids-1.18-orig/src/checksum.c	2003-09-20 22:40:44.000000000 +0200
    ++++ libnids-1.18/src/checksum.c	2005-08-09 23:55:00.000000000 +0200
    +@@ -4,7 +4,7 @@
    + #include 
    + #include 
    + 
    +-#if ( __i386__ || __i386 )
    ++#if 0
    + // all asm procedures are copied from Linux 2.0.36 and 2.2.10 kernels
    + 
    + /*
    diff --git a/libs/libnids/patches/002-configure.patch b/libs/libnids/patches/002-configure.patch
    new file mode 100644
    index 0000000..3b56aba
    --- /dev/null
    +++ b/libs/libnids/patches/002-configure.patch
    @@ -0,0 +1,62 @@
    +diff -Nur libnids-1.18/configure libnids-1.18.patched/configure
    +--- libnids-1.18/configure	2003-10-15 01:40:09.000000000 +0200
    ++++ libnids-1.18.patched/configure	2005-06-09 12:37:42.000000000 +0200
    +@@ -3253,7 +3253,7 @@
    + esac
    + 
    + 
    +-CFLAGS="$CFLAGS -D_BSD_SOURCE"
    ++CFLAGS="$CFLAGS"
    + 
    + for ac_func in gettimeofday
    + do
    +@@ -3489,17 +3489,21 @@
    + echo "${ECHO_T}no" >&6
    +      ;;
    +   *)
    +-     echo "$as_me:$LINENO: result: $withval" >&5
    +-echo "${ECHO_T}$withval" >&6
    ++     echo "$ac_t""$withval" 1>&6
    +      if test -f $withval/pcap.h -a -f $withval/libpcap.a; then
    +         owd=`pwd`
    +         if cd $withval; then withval=`pwd`; cd $owd; fi
    +-	PCAP_CFLAGS="-I$withval -I$withval/bpf"
    ++	PCAPINC="-I$withval -I$withval/bpf"
    + 	PCAPLIB="-L$withval -lpcap"
    ++     elif test -f $withval/include/pcap.h -a \
    ++	       -f $withval/include/pcap-bpf.h -a \
    ++	       -f $withval/lib/libpcap.a; then
    ++	owd=`pwd`
    ++	if cd $withval; then withval=`pwd`; cd $owd; fi
    ++	PCAPINC="-I$withval/include"
    ++	PCAPLIB="-L$withval/lib -lpcap"
    +      else
    +-        { { echo "$as_me:$LINENO: error: pcap.h or libpcap.a not found in $withval" >&5
    +-echo "$as_me: error: pcap.h or libpcap.a not found in $withval" >&2;}
    +-   { (exit 1); exit 1; }; }
    ++        { echo "configure: error: pcap.h" 1>&2; exit 1; }
    +      fi
    +      ;;
    +   esac
    +@@ -3605,10 +3609,10 @@
    +   *)
    +      echo "$as_me:$LINENO: result: $withval" >&5
    + echo "${ECHO_T}$withval" >&6
    +-     if test -f $withval/include/libnet.h -a -f $withval/lib/libnet.a -a -f $withval/libnet-config ; then
    ++     if test -f $withval/include/libnet.h -a -f $withval/lib/libnet.a -a -f $withval/bin/libnet-config ; then
    +         owd=`pwd`
    +         if cd $withval; then withval=`pwd`; cd $owd; fi
    +-	LNET_CFLAGS="-I$withval/include `$withval/libnet-config --defines`"
    ++	LNET_CFLAGS="-I$withval/include `$withval/bin/libnet-config --defines`"
    + 	LNETLIB="-L$withval/lib -lnet"
    +      elif test -f $withval/include/libnet.h -a -f $withval/src/libnet.a; then
    +         owd=`pwd`
    +@@ -3861,7 +3865,7 @@
    + else
    +   echo "$as_me: failed program was:" >&5
    + cat conftest.$ac_ext >&5
    +-HAVE_BSD_UDPHDR=0
    ++HAVE_BSD_UDPHDR=1
    + fi
    + rm -f conftest.$ac_objext conftest.$ac_ext
    + 
    diff --git a/libs/libnids/patches/003-missing_else.patch b/libs/libnids/patches/003-missing_else.patch
    new file mode 100644
    index 0000000..215fe92
    --- /dev/null
    +++ b/libs/libnids/patches/003-missing_else.patch
    @@ -0,0 +1,11 @@
    +diff -urN libnids-1.18/src/killtcp.c libnids-1.18.new/src/killtcp.c
    +--- libnids-1.18/src/killtcp.c	2002-08-21 18:19:40.000000000 +0200
    ++++ libnids-1.18.new/src/killtcp.c	2010-03-27 13:44:59.000000000 +0100
    +@@ -100,6 +100,6 @@
    +     if (initialized)
    + 	abort();
    + }
    +-#elif
    ++#else
    + #error Something wrong with LIBNET_VER
    + #endif
    diff --git a/libs/libogg/Makefile b/libs/libogg/Makefile
    new file mode 100644
    index 0000000..4088c3b
    --- /dev/null
    +++ b/libs/libogg/Makefile
    @@ -0,0 +1,55 @@
    +#
    +# Copyright (C) 2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libogg
    +PKG_VERSION:=1.1.4
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.xiph.org/releases/ogg/
    +PKG_MD5SUM:=10200ec22543841d9d1c23e0aed4e5e9
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libogg
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=libogg
    +  URL:=http://xiph.org/ogg/
    +endef
    +
    +define Package/libogg/description
    +Ogg project codecs use the Ogg bitstream format to arrange the raw,
    +compressed bitstream into a more robust, useful form.  For example,
    +the Ogg bitstream makes seeking, time stamping and error recovery
    +possible, as well as mixing several sepearate, concurrent media
    +streams into a single physical bitstream.
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/ogg/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/ogg/* $(1)/usr/include/ogg/
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
    +	$(INSTALL_DIR) $(1)/usr/share/aclocal/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal/
    +endef
    +
    +define Package/libogg/install
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libogg))
    diff --git a/libs/liboil/Makefile b/libs/liboil/Makefile
    new file mode 100644
    index 0000000..9336a67
    --- /dev/null
    +++ b/libs/liboil/Makefile
    @@ -0,0 +1,64 @@
    +# 
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=liboil
    +PKG_VERSION:=0.3.17
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://liboil.freedesktop.org/download/
    +PKG_MD5SUM:=47dc734f82faeb2964d97771cfd2e701
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/liboil
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=simple functions optimized for various CPUs
    +  URL:=http://liboil.freedesktop.org/wiki/
    +endef
    +
    +define Package/liboil/description
    +  Liboil is a library of simple functions that are optimized for various CPUs.
    +  These functions are generally loops implementing simple algorithms, such as
    +  converting an array of N integers to floating-point numbers or multiplying
    +  and summing an array of N numbers. Such functions are candidates for significant
    +  optimization using various techniques, especially by using extended instructions
    +  provided by modern CPUs (Altivec, MMX, SSE, etc.).
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +# XXX: VFP_CFLAGS is set to '-mfpu=vfp' on arm by configure, but that breaks 
    +# final linking stages, so override it until we find why
    +MAKE_FLAGS += \
    +	VFP_CFLAGS="" \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/liboil-0.3/* $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/liboil-0.3.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/liboil-0.3.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/liboil/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/liboil-0.3.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,liboil))
    diff --git a/libs/liboil/patches/001-no-tools-docs-examples.patch b/libs/liboil/patches/001-no-tools-docs-examples.patch
    new file mode 100644
    index 0000000..1cebc70
    --- /dev/null
    +++ b/libs/liboil/patches/001-no-tools-docs-examples.patch
    @@ -0,0 +1,22 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -1,7 +1,7 @@
    + 
    + AUTOMAKE_OPTIONS = foreign
    + 
    +-SUBDIRS = liboil testsuite examples doc
    ++SUBDIRS = liboil
    + 
    + EXTRA_DIST = COPYING autogen.sh gtk-doc.make HACKING BUG-REPORTING
    + 
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -278,7 +278,7 @@ top_build_prefix = @top_build_prefix@
    + top_builddir = @top_builddir@
    + top_srcdir = @top_srcdir@
    + AUTOMAKE_OPTIONS = foreign
    +-SUBDIRS = liboil testsuite examples doc
    ++SUBDIRS = liboil
    + EXTRA_DIST = COPYING autogen.sh gtk-doc.make HACKING BUG-REPORTING
    + DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
    + pkgconfig_DATA = liboil-$(LIBOIL_MAJORMINOR).pc
    diff --git a/libs/liboil/patches/002-pkgconfig.patch b/libs/liboil/patches/002-pkgconfig.patch
    new file mode 100644
    index 0000000..993f8e6
    --- /dev/null
    +++ b/libs/liboil/patches/002-pkgconfig.patch
    @@ -0,0 +1,19 @@
    +--- a/liboil.pc.in
    ++++ b/liboil.pc.in
    +@@ -1,7 +1,7 @@
    + prefix=@prefix@
    + exec_prefix=@exec_prefix@
    + libdir=@libdir@
    +-includedir=@includedir@/liboil-@LIBOIL_MAJORMINOR@
    ++includedir=@includedir@
    + toolsdir=${exec_prefix}/bin
    + 
    + 
    +@@ -9,6 +9,6 @@ Name: liboil-@LIBOIL_MAJORMINOR@
    + Description: Library of Optimized Inner Loops
    + Version: @VERSION@
    + Libs: -L${libdir} -loil-@LIBOIL_MAJORMINOR@ @LIBM@ @LIBRT@
    +-Cflags: -I${includedir}
    ++Cflags: -I${includedir}/liboil-@LIBOIL_MAJORMINOR@
    + 
    + 
    diff --git a/libs/libol/Makefile b/libs/libol/Makefile
    new file mode 100644
    index 0000000..2ef6d92
    --- /dev/null
    +++ b/libs/libol/Makefile
    @@ -0,0 +1,69 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libol
    +PKG_VERSION:=0.3.18
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.balabit.com/downloads/files/libol/0.3
    +PKG_MD5SUM:=cbadf4b7ea276dfa85acc38a1cc5ff17
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libol
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Support library for syslog-ng
    +  URL:=http://www.balabit.com/products/syslog_ng/
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +	)
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +# pass CFLAGS again to override -O2 set by configure
    +MAKE_ARGS += CFLAGS="$(TARGET_CFLAGS)"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/libol-config \
    +		$(2)/bin/
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
    +		$(2)/bin/libol-config
    +
    +	$(INSTALL_DIR) $(1)/usr/include/libol
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/libol/*.h \
    +		$(1)/usr/include/libol/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libol.{a,la,so*} \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/libol/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libol.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libol))
    diff --git a/libs/liboping/Makefile b/libs/liboping/Makefile
    new file mode 100644
    index 0000000..89ec7fe
    --- /dev/null
    +++ b/libs/liboping/Makefile
    @@ -0,0 +1,83 @@
    +#
    +# Copyright (C) 2009-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=liboping
    +PKG_VERSION:=1.6.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://verplant.org/liboping/files
    +PKG_MD5SUM:=748554a18e1771913f4f402ee9f957c9
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/host-build.mk
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/liboping/Default
    +  URL:=http://verplant.org/liboping/
    +endef
    +
    +define Package/liboping
    +$(call Package/liboping/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=C library to generate ICMP echo requests.
    +endef
    +
    +define Package/oping
    +$(call Package/liboping/Default)
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=Send ICMP echo request to network hosts
    +  DEPENDS+= +liboping
    +endef
    +
    +define Package/noping
    +$(call Package/liboping/Default)
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=Ncurses application to send ICMP echo request to network hosts
    +  DEPENDS+= +liboping +libncurses
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--without-perl-bindings \
    +	--enable-shared \
    +	--enable-static
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/oping.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/liboping.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/liboping/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/liboping.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/oping/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/oping $(1)/usr/bin/
    +endef
    +
    +define Package/noping/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/noping $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,liboping))
    +$(eval $(call BuildPackage,oping))
    +$(eval $(call BuildPackage,noping))
    diff --git a/libs/liboping/patches/01-no-werror.patch b/libs/liboping/patches/01-no-werror.patch
    new file mode 100644
    index 0000000..2cbcd20
    --- /dev/null
    +++ b/libs/liboping/patches/01-no-werror.patch
    @@ -0,0 +1,9 @@
    +--- liboping-1.6.0.org/src/Makefile.am	2011-01-26 14:18:42.000000000 +0100
    ++++ liboping-1.6.0/src/Makefile.am	2011-01-27 13:23:27.716204995 +0100
    +@@ -4,5 +4,5 @@ SUBDIRS = mans
    + 
    + if COMPILER_IS_GCC
    +-AM_CFLAGS = -Wall -Werror
    ++AM_CFLAGS = -Wall
    + endif
    + 
    diff --git a/libs/libosip2/Makefile b/libs/libosip2/Makefile
    new file mode 100644
    index 0000000..1f22ac0
    --- /dev/null
    +++ b/libs/libosip2/Makefile
    @@ -0,0 +1,63 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libosip2
    +PKG_VERSION:=3.1.0
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@GNU/osip
    +PKG_MD5SUM:=7eb305608256ac2a7a27b66ce52627c8
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libosip2
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=GNU oSIP library
    +  URL:=http://www.gnu.org/software/osip/
    +  DEPENDS:=+libpthread
    +endef
    +
    +define Package/libosip2description
    + GNU oSIP library, a Session Initiation Protocol (SIP) implementation.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +		--disable-debug \
    +		--disable-trace \
    +		--enable-pthread \
    +		--enable-semaphore \
    +		--enable-ntimer \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/osip{,parser}2 $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libosip2.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libosip2/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.so $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libosip2))
    diff --git a/libs/libosip2/patches/001-automake-compat.patch b/libs/libosip2/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..1a6a0ec
    --- /dev/null
    +++ b/libs/libosip2/patches/001-automake-compat.patch
    @@ -0,0 +1,8 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -1,3 +1,5 @@
    ++ACLOCAL_AMFLAGS = -I scripts
    ++
    + EXTRA_DIST = README BUGS FEATURES HISTORY autogen.sh libosip2.pc.in
    + 
    + SUBDIRS = include src scripts help platform debian
    diff --git a/libs/libowfat/Makefile b/libs/libowfat/Makefile
    new file mode 100644
    index 0000000..23a8869
    --- /dev/null
    +++ b/libs/libowfat/Makefile
    @@ -0,0 +1,59 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +LOWFAT_VERSION=0.28
    +
    +PKG_NAME:=libowfat
    +PKG_VERSION:=$(LOWFAT_VERSION)
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://dl.fefe.de
    +PKG_MD5SUM:=6bbee9a86506419657d87123b7a6f2c1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +# set to 1 to enable debugging
    +DEBUG=
    +
    +define Package/libowfat
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=reimplemented libdjb under GPL
    +  URL:=http://www.fefe.de/libowfat/
    +endef
    +
    +define Build/Configure
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +LOWFAT_MAKEOPTS = $(TARGET_CONFIGURE_OPTS) \
    +	COPTS="$(TARGET_CFLAGS)" \
    +	DEBUG="$(DEBUG)" \
    +	VERSION="$(LOWFAT_VERSION)" \
    +	CPPFLAGS="-I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include" \
    +	OS="Linux"
    +
    +# work around a nasty gcc bug
    +ifneq ($(CONFIG_GCC_VERSION_4_2_4),)
    +  LOWFAT_MAKEOPTS += WOPTS=""
    +endif
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) $(LOWFAT_MAKEOPTS)
    +endef
    +
    +define Build/InstallDev
    +	mkdir -p $(1)/usr/include/libowfat
    +	$(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libowfat
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/*.a $(1)/usr/lib
    +endef
    +
    +$(eval $(call BuildPackage,libowfat))
    diff --git a/libs/libpam/Makefile b/libs/libpam/Makefile
    new file mode 100644
    index 0000000..42673e4
    --- /dev/null
    +++ b/libs/libpam/Makefile
    @@ -0,0 +1,71 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libpam
    +PKG_VERSION:=1.1.3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=Linux-PAM-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@KERNEL/linux/libs/pam/library
    +PKG_MD5SUM:=6db7fcb5db6253350e3a4648ceac40e7
    +PKG_INSTALL:=1
    +PKG_FIXUP:=libtool
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/Linux-PAM-$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libpam
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=@BROKEN
    +  TITLE:=free implementation of the following DCE-RFC from Sunsoft.
    +  URL:=http://www.kernel.org/pub/linux/libs/pam
    +endef
    +
    +define Package/libpam/description
    +	Linux-PAM is a free implementation of the following DCE-RFC from Sunsoft. 
    +
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR); autoreconf -v -f --install || exit 1)
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +		--enable-pamlocking \
    +		--disable-prelude \
    +		--disable-lckpwdf \
    +		--disable-selinux \
    +		--disable-nls \
    +		--disable-rpath \
    +	)
    +endef
    +
    +
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/lib
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
    +endef
    +
    +define Package/libpam/install
    +	$(INSTALL_DIR) $(1)/lib
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/etc/* $(1)/etc/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,libpam))
    diff --git a/libs/libpam/patches/000-OE-pam-no-innetgr.patch b/libs/libpam/patches/000-OE-pam-no-innetgr.patch
    new file mode 100644
    index 0000000..45babfc
    --- /dev/null
    +++ b/libs/libpam/patches/000-OE-pam-no-innetgr.patch
    @@ -0,0 +1,85 @@
    +innetgr may not be there so make sure that when innetgr is not present
    +then we inform about it and not use it.
    +
    +-Khem
    +--- a/modules/pam_group/pam_group.c
    ++++ b/modules/pam_group/pam_group.c
    +@@ -659,7 +659,11 @@ static int check_account(pam_handle_t *p
    + 	}
    + 	/* If buffer starts with @, we are using netgroups */
    + 	if (buffer[0] == '@')
    ++#ifdef HAVE_INNETGR
    + 	  good &= innetgr (&buffer[1], NULL, user, NULL);
    ++#else
    ++	pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support");
    ++#endif
    + 	/* otherwise, if the buffer starts with %, it's a UNIX group */
    + 	else if (buffer[0] == '%')
    +           good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]);
    +--- a/modules/pam_time/pam_time.c
    ++++ b/modules/pam_time/pam_time.c
    +@@ -555,9 +555,13 @@ check_account(pam_handle_t *pamh, const
    + 	  }
    + 	  /* If buffer starts with @, we are using netgroups */
    + 	  if (buffer[0] == '@')
    +-	    good &= innetgr (&buffer[1], NULL, user, NULL);
    ++#ifdef HAVE_INNETGR
    ++	       good &= innetgr (&buffer[1], NULL, user, NULL);
    ++#else
    ++	       pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support");
    ++#endif
    + 	  else
    +-	    good &= logic_field(pamh, user, buffer, count, is_same);
    ++	       good &= logic_field(pamh, user, buffer, count, is_same);
    + 	  D(("with user: %s", good ? "passes":"fails" ));
    + 
    + 	  /* here we get the time field */
    +--- a/modules/pam_succeed_if/pam_succeed_if.c
    ++++ b/modules/pam_succeed_if/pam_succeed_if.c
    +@@ -231,18 +231,27 @@ evaluate_notingroup(pam_handle_t *pamh,
    + }
    + /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */
    + static int
    +-evaluate_innetgr(const char *host, const char *user, const char *group)
    ++evaluate_innetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
    + {
    ++#ifdef HAVE_INNETGR
    + 	if (innetgr(group, host, user, NULL) == 1)
    + 		return PAM_SUCCESS;
    ++#else
    ++        pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
    ++#endif
    ++
    + 	return PAM_AUTH_ERR;
    + }
    + /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */
    + static int
    +-evaluate_notinnetgr(const char *host, const char *user, const char *group)
    ++evaluate_notinnetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
    + {
    ++#ifdef HAVE_INNETGR
    + 	if (innetgr(group, host, user, NULL) == 0)
    + 		return PAM_SUCCESS;
    ++#else
    ++	pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
    ++#endif
    + 	return PAM_AUTH_ERR;
    + }
    + 
    +@@ -361,14 +370,14 @@ evaluate(pam_handle_t *pamh, int debug,
    + 		const void *rhost;
    + 		if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
    + 			rhost = NULL;
    +-		return evaluate_innetgr(rhost, user, right);
    ++		return evaluate_innetgr(pamh, rhost, user, right);
    + 	}
    + 	/* (Rhost, user) is not in this group. */
    + 	if (strcasecmp(qual, "notinnetgr") == 0) {
    + 		const void *rhost;
    + 		if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
    + 			rhost = NULL;
    +-		return evaluate_notinnetgr(rhost, user, right);
    ++		return evaluate_notinnetgr(pamh, rhost, user, right);
    + 	}
    + 	/* Fail closed. */
    + 	return PAM_SERVICE_ERR;
    diff --git a/libs/libpam/patches/001-no_nis.patch b/libs/libpam/patches/001-no_nis.patch
    new file mode 100644
    index 0000000..db49bdd
    --- /dev/null
    +++ b/libs/libpam/patches/001-no_nis.patch
    @@ -0,0 +1,68 @@
    +--- a/modules/pam_access/pam_access.c
    ++++ b/modules/pam_access/pam_access.c
    +@@ -44,7 +44,7 @@
    + #include 
    + #include 
    + #include 
    +-#ifdef HAVE_RPCSVC_YPCLNT_H
    ++#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
    + #include 
    + #endif
    + #ifdef HAVE_LIBAUDIT
    +--- a/modules/pam_unix/pam_unix_passwd.c
    ++++ b/modules/pam_unix/pam_unix_passwd.c
    +@@ -55,10 +55,10 @@
    + #include 
    + #include 
    + #include 
    +-#ifdef HAVE_RPCSVC_YP_PROT_H
    ++#ifdef HAVE_RPCSVC_YP_PROT_H && USE_NIS
    + #include 
    + #endif
    +-#ifdef HAVE_RPCSVC_YPCLNT_H
    ++#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
    + #include 
    + #endif
    + 
    +@@ -104,7 +104,7 @@ extern int getrpcport(const char *host,
    + 
    + static char *getNISserver(pam_handle_t *pamh, unsigned int ctrl)
    + {
    +-#if (defined(HAVE_YP_GET_DEFAULT_DOMAIN) || defined(HAVE_GETDOMAINNAME)) && defined(HAVE_YP_MASTER)
    ++#if (defined(HAVE_YP_GET_DEFAULT_DOMAIN) || defined(HAVE_GETDOMAINNAME)) && defined(HAVE_YP_MASTER) && defined(USE_NIS)
    + 	char *master;
    + 	char *domainname;
    + 	int port, err;
    +--- a/modules/pam_unix/support.c
    ++++ b/modules/pam_unix/support.c
    +@@ -19,7 +19,7 @@
    + #include 
    + #include 
    + #include 
    +-#ifdef HAVE_RPCSVC_YPCLNT_H
    ++#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
    + #include 
    + #endif
    + 
    +@@ -285,7 +285,7 @@ int _unix_getpwnam(pam_handle_t *pamh, c
    + 		}
    + 	}
    + 
    +-#if defined(HAVE_YP_GET_DEFAULT_DOMAIN) && defined (HAVE_YP_BIND) && defined (HAVE_YP_MATCH) && defined (HAVE_YP_UNBIND)
    ++#if defined(HAVE_YP_GET_DEFAULT_DOMAIN) && defined (HAVE_YP_BIND) && defined (HAVE_YP_MATCH) && defined (HAVE_YP_UNBIND) && (USE_NIS)
    + 	if (!matched && nis) {
    + 		char *userinfo = NULL, *domain = NULL;
    + 		int len = 0, i;
    +--- a/modules/pam_unix/yppasswd_xdr.c
    ++++ b/modules/pam_unix/yppasswd_xdr.c
    +@@ -13,6 +13,10 @@
    + #include "config.h"
    + 
    + #include 
    ++#ifdef USE_NIS
    ++#include 
    ++#include 
    ++#endif
    + #include "yppasswd.h"
    + 
    + bool_t
    diff --git a/libs/libpam/patches/002-no_yywrap.patch b/libs/libpam/patches/002-no_yywrap.patch
    new file mode 100644
    index 0000000..0d73e4b
    --- /dev/null
    +++ b/libs/libpam/patches/002-no_yywrap.patch
    @@ -0,0 +1,26 @@
    +--- a/conf/pam_conv1/pam_conv_l.c
    ++++ b/conf/pam_conv1/pam_conv_l.c
    +@@ -534,7 +534,9 @@ void yyset_lineno (int line_number  );
    + #ifdef __cplusplus
    + extern "C" int yywrap (void );
    + #else
    +-extern int yywrap (void );
    ++int yywrap (void ) {
    ++	return 1;
    ++}
    + #endif
    + #endif
    + 
    +--- a/doc/specs/parse_l.c
    ++++ b/doc/specs/parse_l.c
    +@@ -520,7 +520,9 @@ void yyset_lineno (int line_number  );
    + #ifdef __cplusplus
    + extern "C" int yywrap (void );
    + #else
    +-extern int yywrap (void );
    ++int yywrap (void ) {
    ++	return 1;
    ++}
    + #endif
    + #endif
    + 
    diff --git a/libs/libpam/patches/003-no_doc.patch b/libs/libpam/patches/003-no_doc.patch
    new file mode 100644
    index 0000000..020f74d
    --- /dev/null
    +++ b/libs/libpam/patches/003-no_doc.patch
    @@ -0,0 +1,36 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -5,9 +5,9 @@
    + AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 check-news
    + 
    + if STATIC_MODULES
    +-SUBDIRS = modules libpam libpamc libpam_misc tests po conf doc examples xtests
    ++SUBDIRS = modules libpam libpamc libpam_misc tests po conf examples xtests
    + else
    +-SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
    ++SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples xtests
    + endif
    + 
    + CLEANFILES = *~
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -74,7 +74,7 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-re
    +   distclean-recursive maintainer-clean-recursive
    + ETAGS = etags
    + CTAGS = ctags
    +-DIST_SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc \
    ++DIST_SUBDIRS = libpam tests libpamc libpam_misc modules po conf \
    + 	examples xtests
    + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    + distdir = $(PACKAGE)-$(VERSION)
    +@@ -253,8 +253,8 @@ top_build_prefix = @top_build_prefix@
    + top_builddir = @top_builddir@
    + top_srcdir = @top_srcdir@
    + AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 check-news
    +-@STATIC_MODULES_FALSE@SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
    +-@STATIC_MODULES_TRUE@SUBDIRS = modules libpam libpamc libpam_misc tests po conf doc examples xtests
    ++@STATIC_MODULES_FALSE@SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples xtests
    ++@STATIC_MODULES_TRUE@SUBDIRS = modules libpam libpamc libpam_misc tests po conf examples xtests
    + CLEANFILES = *~
    + M4_FILES = m4/gettext.m4 m4/iconv.m4 m4/intlmacosx.m4 \
    + 	m4/japhar_grep_cflags.m4 m4/jh_path_xml_catalog.m4 \
    diff --git a/libs/libpam/patches/004-fix_lib64.patch b/libs/libpam/patches/004-fix_lib64.patch
    new file mode 100644
    index 0000000..6c83d08
    --- /dev/null
    +++ b/libs/libpam/patches/004-fix_lib64.patch
    @@ -0,0 +1,16 @@
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -26,12 +26,7 @@ dnl If we use /usr as prefix, use /etc f
    +         fi
    + 	if test ${libdir} = '${exec_prefix}/lib'
    + 	then
    +-		case "`uname -m`" in
    +-		    x86_64|ppc64|s390x|sparc64)
    +-			libdir="/lib64" ;;
    +-		    *)
    +-			libdir="/lib" ;;
    +-		esac
    ++		libdir="/lib"
    + 	fi
    + 	if test ${sbindir} = '${exec_prefix}/sbin'
    +         then
    diff --git a/libs/libpar2/Makefile b/libs/libpar2/Makefile
    new file mode 100644
    index 0000000..fb92ac1
    --- /dev/null
    +++ b/libs/libpar2/Makefile
    @@ -0,0 +1,58 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libpar2
    +PKG_VERSION:=0.2
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/parchive
    +PKG_MD5SUM:=94c6df4e38efe08056ecde2a04e0be91
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libpar2
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libsigcxx
    +  TITLE:=A library for performing common tasks related to PAR recovery sets
    +  URL:=http://parchive.sourceforge.net/
    +endef
    +
    +define Package/libpar2/description
    +A library for performing common tasks related to PAR recovery sets
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--disable-static \
    +	--disable-nls \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/libpar2
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/libpar2/*.h \
    +		$(1)/usr/include/libpar2/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libpar2.{la,so*} \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/libpar2/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libpar2.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libpar2))
    diff --git a/libs/libpfm/Makefile b/libs/libpfm/Makefile
    new file mode 100644
    index 0000000..f9e25ee
    --- /dev/null
    +++ b/libs/libpfm/Makefile
    @@ -0,0 +1,63 @@
    +# 
    +# Copyright (C) 2006-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libpfm
    +PKG_VERSION:=3.6
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/perfmon2
    +PKG_MD5SUM:=5075fa45ddce4aa647b70e9f9446eacc
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libpfm
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Perfmon2 Kernel performance monitoring interface
    +  URL:=http://perfmon2.sourceforge.net/
    +  DEPENDS:=@BROKEN
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		ARCH=cell \
    +		CC=$(TARGET_CROSS)gcc \
    +		AR=$(TARGET_CROSS)ar \
    +		lib
    +endef
    +
    +define Build/InstallDev
    +	echo "Build/InstallDev"
    +	$(MAKE) -C $(PKG_BUILD_DIR)/include \
    +		ARCH=cell \
    +		DESTDIR=$(1) \
    +		INCDIR=/usr/include \
    +		CONFIG_PFMLIB_ARCH_POWERPC=y \
    +		install
    +#	$(MAKE) -C $(PKG_BUILD_DIR)/lib \
    +#		ARCH=cell \
    +#		CC=$(TARGET_CROSS)gcc \
    +#		DESTDIR=$(1) \
    +#		LIBDIR=/usr/lib \
    +#		CONFIG_PFMLIB_ARCH_POWERPC=y \
    +#		CONFIG_PFMLIB_CELL=y \
    +#		CONFIG_PFMLIB_SHARED=y \
    +#		install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP)	$(PKG_BUILD_DIR)/lib/libpfm* $(1)/usr/lib/
    +endef
    +
    +define Package/libpfm/install
    +	echo "Package/libpfm/install"
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/lib/libpfm* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libpfm))
    diff --git a/libs/libpng/Makefile b/libs/libpng/Makefile
    new file mode 100644
    index 0000000..fb7dc80
    --- /dev/null
    +++ b/libs/libpng/Makefile
    @@ -0,0 +1,64 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libpng
    +PKG_VERSION:=1.2.46
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/libpng
    +PKG_MD5SUM:=e8b43dc78ef95b3949af7f961d76874b
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/host-build.mk
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libpng
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+zlib
    +  TITLE:=A PNG format files handling library
    +  URL:=http://www.libpng.org/pub/png/libpng.html
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/libpng{,12}-config $(1)/usr/bin/
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
    +		$(1)/usr/bin/libpng{,12}-config
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/png{,conf}.h $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libpng12 $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.{a,la,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpng{,12}.pc $(1)/usr/lib/pkgconfig/
    +	$(INSTALL_DIR) $(2)/bin
    +	for f in libpng{,12}-config; do \
    +		$(LN) ../../usr/bin/$$$$f $(2)/bin/ ; \
    +	done
    +endef
    +
    +define Package/libpng/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call HostBuild))
    +$(eval $(call BuildPackage,libpng))
    diff --git a/libs/libpng/patches/100-config_fix.patch b/libs/libpng/patches/100-config_fix.patch
    new file mode 100644
    index 0000000..3cb6d8a
    --- /dev/null
    +++ b/libs/libpng/patches/100-config_fix.patch
    @@ -0,0 +1,10 @@
    +--- a/scripts/libpng-config-body.in
    ++++ b/scripts/libpng-config-body.in
    +@@ -83,6 +83,7 @@ while test $# -gt 0; do
    + 
    +     --static)
    +         R_opts=""
    ++        libs=${all_libs}
    +         ;;
    + 
    +     *)
    diff --git a/libs/libpthread-stubs/Makefile b/libs/libpthread-stubs/Makefile
    new file mode 100644
    index 0000000..16d5fcc
    --- /dev/null
    +++ b/libs/libpthread-stubs/Makefile
    @@ -0,0 +1,48 @@
    +#
    +# Copyright (C) 2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libpthread-stubs
    +PKG_VERSION:=0.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://xcb.freedesktop.org/dist/
    +PKG_MD5SUM:=774eabaf33440d534efe108ef9130a7d
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libpthread-stubs
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=libpthread-stubs
    +  URL:=http://xcb.freedesktop.org/
    +  BUILDONLY:=1
    +endef
    +
    +define Package/libpthread-stubs/description
    +This library provides weak aliases for pthread functions not provided in libc
    +or otherwise available by default.  Libraries like libxcb rely on pthread
    +stubs to use pthreads optionally, becoming thread-safe when linked to
    +libpthread, while avoiding any performance hit when running single-threaded.
    +libpthread-stubs supports this behavior even on platforms which do not supply
    +all the necessary pthread stubs.  On platforms which already supply all the
    +necessary pthread stubs, this package ships only the pkg-config file
    +pthread-stubs.pc, to allow libraries to unconditionally express a dependency
    +on pthread-stubs and still obtain correct behavior.
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +$(eval $(call BuildPackage,libpthread-stubs))
    diff --git a/libs/libptmalloc3/Makefile b/libs/libptmalloc3/Makefile
    new file mode 100644
    index 0000000..a591c7e
    --- /dev/null
    +++ b/libs/libptmalloc3/Makefile
    @@ -0,0 +1,44 @@
    +# Copyright (C) 2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +#
    +# Sample usage:
    +#   env LD_PRELOAD="/usr/lib/libptmalloc3.so" 
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libptmalloc3
    +PKG_VERSION:=20060531
    +PKG_RELEASE:=1
    +PKG_BUILD_DIR:=$(BUILD_DIR)/ptmalloc3
    +
    +PKG_SOURCE:=ptmalloc3-current.tar.gz
    +PKG_SOURCE_URL:=http://www.malloc.de/malloc/
    +PKG_MD5SUM:=c0b9dd5f16f8eae979166dc74b60015c
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libptmalloc3
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Efficient malloc implementation
    +  URL:=http://www.malloc.de/en/
    +endef
    +
    +# flags: taken from ptmalloc3/Makefile by combining
    +# 'linux-shared' and 'linux-nothreads' targets
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		SYS_FLAGS="$(TARGET_CFLAGS)" \
    +		linux-shared-nothreads
    +endef
    +
    +define Package/libptmalloc3/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libptmalloc3.so $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libptmalloc3))
    diff --git a/libs/libptmalloc3/patches/100-nothreads.patch b/libs/libptmalloc3/patches/100-nothreads.patch
    new file mode 100644
    index 0000000..d8682de
    --- /dev/null
    +++ b/libs/libptmalloc3/patches/100-nothreads.patch
    @@ -0,0 +1,20 @@
    +This patch adds an additional target to build a shared library without pthreads
    +(should this be the default? or is the ulibc malloc threadsafe? or should we
    +build two separate packages?)
    +
    +--- ptmalloc3/Makefile.orig	2007-11-08 09:10:46.000000000 +0000
    ++++ ptmalloc3/Makefile	2007-11-08 09:17:09.000000000 +0000
    +@@ -150,6 +150,13 @@
    +  INC_FLAGS='-Isysdeps/pthread -Isysdeps/generic -I.' M_FLAGS='$(M_FLAGS)' \
    +  LIB_MALLOC=libptmalloc3.so
    + 
    ++linux-shared-nothreads:
    ++	$(MAKE) SYS_FLAGS='-D_GNU_SOURCE=1 -fpic' \
    ++ WARN_FLAGS='-Wall -Wstrict-prototypes' \
    ++ OPT_FLAGS='$(OPT_FLAGS)' THR_FLAGS='' THR_LIBS='' \
    ++ INC_FLAGS='-Isysdeps/generic -I.' M_FLAGS='$(M_FLAGS)' \
    ++ LIB_MALLOC=libptmalloc3.so
    ++
    + sproc:
    + 	$(MAKE) THR_FLAGS='' THR_LIBS='' OPT_FLAGS='$(OPT_FLAGS)' CC='$(CC)' \
    + 	INC_FLAGS='-Isysdeps/sproc -Isysdeps/generic -I.' \
    diff --git a/libs/librpcsecgss/Makefile b/libs/librpcsecgss/Makefile
    new file mode 100644
    index 0000000..3a55a4b
    --- /dev/null
    +++ b/libs/librpcsecgss/Makefile
    @@ -0,0 +1,53 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=librpcsecgss
    +PKG_VERSION:=0.14
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=librpcsecgss-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.citi.umich.edu/projects/nfsv4/linux/librpcsecgss/
    +PKG_MD5SUM:=0d4cdee46a98731b1b71e30504589281
    +
    +PKG_BUILD_DEPENDS:=libgssapi
    +PKG_BUILD_PARALLEL:=1
    +PKG_INSTALL:=1
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/librpcsecgss
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=required libraries for the nfs-utils
    +  URL:=http://www.citi.umich.edu/projects/nfsv4/linux
    +endef
    +
    +define Package/librpcsecgss/description
    + Support libraries - for newer nfs mount command (nfs4)
    +endef
    +
    +TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib -I$(STAGING_DIR)/usr/include/gssglue/ $(FPIC)
    +
    +MAKE_FLAGS += \
    +	OPT="$(TARGET_CFLAGS)" \
    +	INSTALLSUID="install -m 4755" \
    +	DESTDIR="$(PKG_INSTALL_DIR)" \
    +        GSSAPI_LIBS="usr/lib/libgssapi.a"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/rpcsecgss/rpc
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/rpcsecgss/rpc/*.h $(1)/usr/include/rpcsecgss/rpc/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/librpcsecgss.{a,so*} $(1)/usr/lib
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/librpcsecgss.pc $(1)/usr/lib/pkgconfig
    +endef
    +
    +$(eval $(call BuildPackage,librpcsecgss))
    diff --git a/libs/librsync/Makefile b/libs/librsync/Makefile
    new file mode 100644
    index 0000000..bd96faa
    --- /dev/null
    +++ b/libs/librsync/Makefile
    @@ -0,0 +1,58 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=librsync
    +PKG_VERSION:=0.9.7
    +PKG_RELEASE:=4
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/librsync
    +PKG_MD5SUM:=24cdb6b78f45e0e83766903fd4f6bc84
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Package/librsync
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=implementation of the rolling-checksum algorithm
    +  URL:=http://librsync.sourceforge.net/
    +endef
    +
    +define Package/librsync/description
    +	librsync implements the rolling-checksum algorithm of remote file
    +	synchronization that was popularized by the rsync utility and is
    +	used in rproxy. This algorithm transfers the differences between 2
    +	files without needing both files on the same system.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +	);
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/librsync{,-config}.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/librsync.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/librsync/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/librsync.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,librsync))
    diff --git a/libs/librsync/patches/001-4gb_files.patch b/libs/librsync/patches/001-4gb_files.patch
    new file mode 100644
    index 0000000..3c0128e
    --- /dev/null
    +++ b/libs/librsync/patches/001-4gb_files.patch
    @@ -0,0 +1,31 @@
    +diff -urN librsync-0.9.7/mdfour.h librsync-0.9.7.new/mdfour.h
    +--- librsync-0.9.7/mdfour.h	2004-02-08 00:17:57.000000000 +0100
    ++++ librsync-0.9.7.new/mdfour.h	2009-08-08 16:08:57.000000000 +0200
    +@@ -24,7 +24,7 @@
    + #include "types.h"
    + 
    + struct rs_mdfour {
    +-    int                 A, B, C, D;
    ++    unsigned int                 A, B, C, D;
    + #if HAVE_UINT64
    +     uint64_t            totalN;
    + #else
    +diff -urN librsync-0.9.7/patch.c librsync-0.9.7.new/patch.c
    +--- librsync-0.9.7/patch.c	2004-09-17 23:35:50.000000000 +0200
    ++++ librsync-0.9.7.new/patch.c	2009-08-08 16:10:40.000000000 +0200
    +@@ -214,12 +214,12 @@
    +     void            *buf, *ptr;
    +     rs_buffers_t    *buffs = job->stream;
    + 
    +-    len = job->basis_len;
    +-    
    +     /* copy only as much as will fit in the output buffer, so that we
    +      * don't have to block or store the input. */
    +-    if (len > buffs->avail_out)
    ++    if (job->basis_len > buffs->avail_out)
    +         len = buffs->avail_out;
    ++    else
    ++	len = job->basis_len;
    + 
    +     if (!len)
    +         return RS_BLOCKED;
    diff --git a/libs/libsamplerate/Makefile b/libs/libsamplerate/Makefile
    new file mode 100644
    index 0000000..d8a32d8
    --- /dev/null
    +++ b/libs/libsamplerate/Makefile
    @@ -0,0 +1,53 @@
    +#
    +# Copyright (C) 2007-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libsamplerate
    +PKG_VERSION:=0.1.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.mega-nerd.com/SRC/
    +PKG_MD5SUM:=ad093e60ec44f0a60de8e29983ddbc0f
    +
    +PKG_FIXUP:=libtool autoreconf
    +PKG_REMOVE_FILES:=autogen.sh
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libsamplerate
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libsndfile
    +  TITLE:=Sample Rate Converter
    +  URL:=http://www.mega-nerd.com/SRC/index.html
    +endef
    +
    +define Package/libsamplerate/description
    + Secret Rabbit Code (aka libsamplerate) is a Sample Rate
    + Converter for audio.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--disable-fftw \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)
    +	$(CP) $(PKG_INSTALL_DIR)/* $(1)/
    +endef
    +
    +define Package/libsamplerate/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsamplerate.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libsamplerate))
    diff --git a/libs/libsamplerate/patches/001-fix-m4-loop.patch b/libs/libsamplerate/patches/001-fix-m4-loop.patch
    new file mode 100644
    index 0000000..e91499c
    --- /dev/null
    +++ b/libs/libsamplerate/patches/001-fix-m4-loop.patch
    @@ -0,0 +1,18 @@
    +--- a/acinclude.m4
    ++++ b/acinclude.m4
    +@@ -135,7 +135,6 @@ if test $ac_cv_c_byte_order = unknown ; 
    + 	fi
    + 
    + )
    +-]
    + 
    + if test $ac_cv_c_byte_order = big ; then
    + 	ac_cv_c_big_endian=1
    +@@ -154,6 +153,7 @@ else
    + 	AC_MSG_WARN([[*****************************************************************]])
    + 	fi
    + 
    ++]
    + )# AC_C_FIND_ENDIAN
    + 
    + 
    diff --git a/libs/libsdl/Makefile b/libs/libsdl/Makefile
    new file mode 100644
    index 0000000..07060d5
    --- /dev/null
    +++ b/libs/libsdl/Makefile
    @@ -0,0 +1,161 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=SDL
    +PKG_VERSION:=1.2.14
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.libsdl.org/release/
    +PKG_MD5SUM:=e52086d1b508fa0b76c52ee30b55bec4
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +PKG_CONFIG_DEPENDS:=CONFIG_AUDIO_SUPPORT
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libsdl
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Simple DirectMedia Layer
    +  URL:=http://www.libsdl.org
    +  DEPENDS:=+directfb +zlib +libpthread +AUDIO_SUPPORT:alsa-lib
    +endef
    +
    +define Package/libsdl/description
    + SDL is a library that allows programs portable low level access to a video
    + framebuffer, audio output, mouse, and keyboard.
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--enable-libc \
    +	--enable-video \
    +	--enable-events \
    +	--enable-joystick \
    +	--enable-cdrom \
    +	--enable-threads \
    +	--enable-timers \
    +	--enable-file \
    +	--enable-loadso \
    +	--enable-cpuinfo \
    +	--enable-assembly \
    +	--disable-oss \
    +	--disable-alsatest \
    +	--enable-alsa-shared \
    +	--disable-esd \
    +	--disable-esdtest \
    +	--enable-esd-shared \
    +	--disable-pulseaudio \
    +	--enable-pulseaudio-shared \
    +	--disable-arts \
    +	--enable-arts-shared \
    +	--disable-nas \
    +	--enable-nas-shared \
    +	--disable-diskaudio \
    +	--disable-dummyaudio \
    +	--disable-mintaudio \
    +	--disable-nasm \
    +	--disable-altivec \
    +	--disable-ipod \
    +	--disable-nanox \
    +	--disable-video-x11 \
    +	--enable-x11-shared \
    +	--enable-dga \
    +	--enable-video-dga \
    +	--enable-video-x11-dgamouse \
    +	--enable-video-x11-vm \
    +	--enable-video-x11-xv \
    +	--disable-video-x11-xinerama \
    +	--disable-video-x11-xme \
    +	--disable-video-x11-xrandr \
    +	--disable-video-photon \
    +	--disable-video-carbon \
    +	--disable-video-cocoa \
    +	--enable-video-fbcon \
    +	--enable-video-directfb \
    +	--disable-video-ps2gs \
    +	--disable-video-ps3 \
    +	--disable-video-ggi \
    +	--disable-video-svga \
    +	--disable-video-vgl \
    +	--disable-video-wscons \
    +	--disable-video-aalib \
    +	--disable-video-caca \
    +	--disable-video-qtopia \
    +	--disable-video-picogui \
    +	--disable-video-xbios \
    +	--disable-video-gem \
    +	--disable-video-dummy \
    +	--disable-video-opengl \
    +	--disable-osmesa-shared \
    +	--disable-screensaver \
    +	--enable-input-events \
    +	--disable-input-tslib \
    +	--enable-pth \
    +	--enable-pthreads \
    +	--enable-pthread-sem \
    +	--disable-stdio-redirect \
    +	--disable-directx \
    +	--enable-sdl-dlopen \
    +	--disable-atari-ldg \
    +	--disable-clock_gettime \
    +	--without-x \
    +	--disable-rpath \
    +
    +ifneq ($(CONFIG_AUDIO_SUPPORT),)
    +  CONFIGURE_ARGS+= \
    +	--enable-audio \
    +	--enable-alsa
    +else
    +  CONFIGURE_ARGS+= \
    +	--disable-audio \
    +	--disable-alsa
    +endif
    +
    +CONFIGURE_VARS+= \
    +		ac_cv_path_DIRECTFBCONFIG=no \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/SDL* \
    +		$(1)/usr/include/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libSDL*.{a,so*} \
    +		$(1)/usr/lib/
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
    +		$(1)/usr/lib/pkgconfig
    +
    +
    +	$(INSTALL_DIR) $(1)/usr/share/aclocal
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/share/aclocal/* \
    +		$(1)/usr/share/aclocal/
    +
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/sdl-config \
    +		$(1)/usr/bin/
    +
    +	$(SED) 's,^\(exec_prefix\|prefix\)=.*,\1=\"$(STAGING_DIR)/usr/\",g' \
    +		$(1)/usr/bin/sdl-config
    +
    +	$(INSTALL_DIR) $(1)/host/bin
    +	ln -sf ../../usr/bin/sdl-config $(1)/host/bin/
    +endef
    +
    +define Package/libsdl/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libSDL*.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libsdl))
    diff --git a/libs/libsdl/patches/001-automake-compat.patch b/libs/libsdl/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..0e8ac79
    --- /dev/null
    +++ b/libs/libsdl/patches/001-automake-compat.patch
    @@ -0,0 +1,5 @@
    +--- /dev/null
    ++++ b/Makefile.am
    +@@ -0,0 +1,2 @@
    ++SUBDIRS = .
    ++ACLOCAL_AMFLAGS = -I . -I acinclude
    diff --git a/libs/libsdl_mixer/Makefile b/libs/libsdl_mixer/Makefile
    new file mode 100644
    index 0000000..c7a74ec
    --- /dev/null
    +++ b/libs/libsdl_mixer/Makefile
    @@ -0,0 +1,77 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=SDL_mixer
    +PKG_VERSION:=1.2.11
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.libsdl.org/projects/SDL_mixer/release/
    +PKG_MD5SUM:=65ada3d997fe85109191a5fb083f248c
    +
    +PKG_FIXUP:=libtool
    +PKG_MACRO_PATHS:=acinclude
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +TARGET_LDFLAGS += -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
    +
    +define Package/libsdl-mixer
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Simple DirectMedia Layer Sound Mixer
    +  URL:=http://www.libsdl.org/projects/SDL_mixer/
    +  DEPENDS:=+libsdl +libmikmod +libvorbisidec
    +endef
    +
    +define Package/libsdl-mixer/description
    +  SDL_mixer is a sample multi-channel audio mixer library.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--disable-sdltest \
    +		--enable-music-cmd \
    +		--enable-music-wave \
    +		--enable-music-mod \
    +		--enable-music-mod-shared \
    +		--enable-music-midi \
    +		--disable-music-ogg \
    +		--enable-music-ogg-tremor \
    +		--enable-music-ogg-shared \
    +		--disable-music-flac \
    +		--enable-music-flag-shared \
    +		--disable-music-mp3 \
    +		--enable-music-mp3-shared \
    +		--disable-smpegtest \
    +		--disable-music-mp3-mad-gpl \
    +		--with-sdl-exec-prefix="$(STAGING_DIR)/usr" \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/SDL $(1)/usr/lib/pkgconfig
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/SDL/SDL_mixer.h \
    +		$(1)/usr/include/SDL/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libSDL_mixer*.{a,la,so*} \
    +		$(1)/usr/lib/
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libsdl-mixer/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libSDL_mixer*.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libsdl-mixer))
    diff --git a/libs/libsdl_mixer/files/sdl-config b/libs/libsdl_mixer/files/sdl-config
    new file mode 100755
    index 0000000..e496baf
    --- /dev/null
    +++ b/libs/libsdl_mixer/files/sdl-config
    @@ -0,0 +1,3 @@
    +#!/bin/sh
    +# Fake sdl-config
    +echo "-lSDL -ldirect -ldirectfb -lfusion"
    diff --git a/libs/libsdl_mixer/patches/001-automake-compat.patch b/libs/libsdl_mixer/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..8e879c3
    --- /dev/null
    +++ b/libs/libsdl_mixer/patches/001-automake-compat.patch
    @@ -0,0 +1,10 @@
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -1,6 +1,6 @@
    + dnl Process this file with autoconf to produce a configure script.
    + AC_INIT(README)
    +-AC_CONFIG_AUX_DIRS($srcdir/build-scripts)
    ++AC_CONFIG_AUX_DIR([build-scripts])
    + 
    + dnl Set various version strings - taken gratefully from the GTk sources
    + 
    diff --git a/libs/libsdl_mixer/patches/002-fix-linking.patch b/libs/libsdl_mixer/patches/002-fix-linking.patch
    new file mode 100644
    index 0000000..a7b1fb1
    --- /dev/null
    +++ b/libs/libsdl_mixer/patches/002-fix-linking.patch
    @@ -0,0 +1,17 @@
    +diff --git a/Makefile.in b/Makefile.in
    +index 76fdd3c..3ab4939 100644
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -75,10 +75,10 @@ $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
    + 	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
    + 
    + $(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
    +-	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
    ++	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
    + 
    + $(objects)/playmus$(EXE): $(objects)/playmus.lo $(objects)/$(TARGET)
    +-	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
    ++	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
    + 
    + install: all install-hdrs install-lib #install-bin
    + install-hdrs:
    diff --git a/libs/libsdl_sound/Makefile b/libs/libsdl_sound/Makefile
    new file mode 100644
    index 0000000..836b4fc
    --- /dev/null
    +++ b/libs/libsdl_sound/Makefile
    @@ -0,0 +1,62 @@
    +# 
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libsdl-sound
    +PKG_VERSION:=1.0.3
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=SDL_sound-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://icculus.org/SDL_sound/downloads/
    +PKG_MD5SUM:=aa09cd52df85d29bee87a664424c94b5
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/SDL_sound-$(PKG_VERSION)
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +TARGET_LDFLAGS += -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
    +
    +define Package/libsdl-sound
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Simple DirectMedia Layer Sound Decoder
    +  URL:=http://icculus.org/SDL_sound/
    +  DEPENDS:=+libsdl
    +endef
    +
    +define Package/libsdl-sound/description
    +  SDL_sound is a library that handles the decoding
    +  of several popular sound file formats, such as .WAV and .MP3.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--with-sdl-prefix="$(STAGING_DIR)/usr" \
    +	--disable-flac \
    +	--disable-mikmod \
    +	--disable-modplug \
    +	--disable-ogg \
    +	--disable-smpeg \
    +	--disable-speex \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/SDL $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/SDL/SDL_sound.h \
    +		$(1)/usr/include/SDL/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libSDL_sound*.{a,so*} \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/libsdl-sound/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libSDL_sound*.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libsdl-sound))
    diff --git a/libs/libshout/Makefile b/libs/libshout/Makefile
    new file mode 100644
    index 0000000..b7ef92e
    --- /dev/null
    +++ b/libs/libshout/Makefile
    @@ -0,0 +1,66 @@
    +#
    +# Copyright (C) 2008-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libshout
    +PKG_VERSION:=2.2.2
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/libshout/
    +PKG_MD5SUM:=4f75fc9901c724b712c371c9a1e782d3
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +TARGET_CFLAGS += $(FPIC) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
    +
    +define Package/libshout
    +  SECTION:=libs
    +  DEPENDS:= +libspeex +libtheora +libvorbis +libvorbisidec
    +  CATEGORY:=Libraries
    +  TITLE:=Library which can be used to write a source client like ices
    +  URL:=http://www.icecast.org/download.php
    +endef
    +
    +define Package/libshout/description
    +	libshout allows applications to easily communicate and broadcast
    +	to an Icecast streaming media server. It handles the socket connections,
    +	metadata communication, and data streaming for the calling application,
    +	and lets developers focus on feature sets instead of implementation
    +	details.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		VORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include/tremor/" \
    +		VORBIS_LIBS="$(TARGET_LDFLAGS) -lvorbis -lvorbisidec" \
    +		--enable-shared \
    +		--enable-static \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/shout
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/shout/shout.h $(1)/usr/include/shout
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libshout.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(SED) 's|/usr/include|$(STAGING_DIR)/usr/include|' \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/shout.pc
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/shout.pc $(1)/usr/lib/pkgconfig/		
    +endef
    +
    +define Package/libshout/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libshout.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libshout))
    diff --git a/libs/libshout/patches/100-ogg-c.patch b/libs/libshout/patches/100-ogg-c.patch
    new file mode 100644
    index 0000000..4313986
    --- /dev/null
    +++ b/libs/libshout/patches/100-ogg-c.patch
    @@ -0,0 +1,13 @@
    +Index: libshout-2.2.2/src/ogg.c
    +===================================================================
    +--- libshout-2.2.2.orig/src/ogg.c	2008-02-12 12:30:14.000000000 +0100
    ++++ libshout-2.2.2/src/ogg.c	2008-02-12 12:30:14.000000000 +0100
    +@@ -30,7 +30,7 @@
    + #include 
    + #endif
    + 
    +-#include 
    ++#include 
    + 
    + #include 
    + #include "shout_private.h"
    diff --git a/libs/libshout/patches/110-shout-ogg-c.patch b/libs/libshout/patches/110-shout-ogg-c.patch
    new file mode 100644
    index 0000000..d495570
    --- /dev/null
    +++ b/libs/libshout/patches/110-shout-ogg-c.patch
    @@ -0,0 +1,13 @@
    +Index: libshout-2.2.2/src/shout_ogg.h
    +===================================================================
    +--- libshout-2.2.2.orig/src/shout_ogg.h	2008-02-12 12:30:14.000000000 +0100
    ++++ libshout-2.2.2/src/shout_ogg.h	2008-02-12 12:30:14.000000000 +0100
    +@@ -28,7 +28,7 @@
    + 
    + #include 
    + 
    +-#include 
    ++#include 
    + 
    + typedef struct _ogg_codec_tag {
    + 	ogg_stream_state os;
    diff --git a/libs/libshout/patches/120-vorbis-c.patch b/libs/libshout/patches/120-vorbis-c.patch
    new file mode 100644
    index 0000000..ab5bcee
    --- /dev/null
    +++ b/libs/libshout/patches/120-vorbis-c.patch
    @@ -0,0 +1,13 @@
    +Index: libshout-2.2.2/src/vorbis.c
    +===================================================================
    +--- libshout-2.2.2.orig/src/vorbis.c	2008-02-12 12:30:14.000000000 +0100
    ++++ libshout-2.2.2/src/vorbis.c	2008-02-12 12:30:14.000000000 +0100
    +@@ -27,7 +27,7 @@
    + #include 
    + #endif
    + 
    +-#include 
    ++#include 
    + 
    + #include "shout_private.h"
    + #include "shout_ogg.h"
    diff --git a/libs/libshout/patches/140-no_example_doc_win32.patch b/libs/libshout/patches/140-no_example_doc_win32.patch
    new file mode 100644
    index 0000000..329a1b3
    --- /dev/null
    +++ b/libs/libshout/patches/140-no_example_doc_win32.patch
    @@ -0,0 +1,21 @@
    +Index: libshout-2.2.2/Makefile.in
    +===================================================================
    +--- libshout-2.2.2.orig/Makefile.in	2008-02-12 12:30:14.000000000 +0100
    ++++ libshout-2.2.2/Makefile.in	2008-02-12 12:30:15.000000000 +0100
    +@@ -246,14 +246,14 @@
    + target_alias = @target_alias@
    + AUTOMAKE_OPTIONS = 1.6 foreign
    + ACLOCAL_AMFLAGS = -I m4
    +-SUBDIRS = include src examples debian doc win32
    ++SUBDIRS = include src debian
    + EXTRA_DIST = INSTALL m4/shout.m4 m4/ac_config_libconfig_in.m4 m4/acx_pthread.m4 \
    + 	m4/ogg.m4 m4/vorbis.m4 m4/xiph_compiler.m4 m4/xiph_net.m4 \
    + 	m4/xiph_types.m4
    + 
    + DISTCLEANFILES = shout-config.in
    + docdir = $(datadir)/doc/$(PACKAGE)
    +-doc_DATA = COPYING NEWS README examples/example.c examples/nonblocking.c
    ++doc_DATA = COPYING NEWS README
    + m4datadir = $(datadir)/aclocal
    + m4data_DATA = m4/shout.m4
    + @HAVE_PKGCONFIG_TRUE@pkgconfigdir = $(libdir)/pkgconfig
    diff --git a/libs/libsigc++/Makefile b/libs/libsigc++/Makefile
    new file mode 100644
    index 0000000..45d101c
    --- /dev/null
    +++ b/libs/libsigc++/Makefile
    @@ -0,0 +1,61 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libsigc++
    +PKG_VERSION:=2.2.8
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@GNOME/libsigc++/2.2
    +PKG_MD5SUM:=1198425eab9fd605721a278c651b8dd8
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libsigcxx
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=typesafe callback system for standard C++
    +  URL:=http://libsigc.sourceforge.net/
    +  DEPENDS:=+libstdcpp
    +endef
    +
    +define Package/libsigcxx/description
    + It allows you to define signals and to connect those signals to any
    + callback function, either global or a member function, regardless of
    + whether it is static or virtual.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +TARGET_CPPFLAGS +=  \
    +	-fno-strict-aliasing -fno-inline \
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/sigc++-2.0 $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigc-2.0.{a,so*} $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/sigc++-2.0 $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sigc++-2.0.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libsigcxx/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigc-2.0.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libsigcxx))
    diff --git a/libs/libsigc++/patches/001-no_doc_tests_examples.patch b/libs/libsigc++/patches/001-no_doc_tests_examples.patch
    new file mode 100644
    index 0000000..fbfb3bb
    --- /dev/null
    +++ b/libs/libsigc++/patches/001-no_doc_tests_examples.patch
    @@ -0,0 +1,22 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -22,7 +22,7 @@ doc_subdirs = docs
    + else
    + doc_subdirs =
    + endif
    +-SUBDIRS = sigc++ tests examples $(doc_subdirs)
    ++SUBDIRS = sigc++
    + 
    + sigc_configdir = $(libdir)/$(SIGCXX_MODULE_NAME)/include
    + nodist_sigc_config_HEADERS = sigc++config.h
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -114,7 +114,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGE
    + 	distdir dist dist-all distcheck
    + ETAGS = etags
    + CTAGS = ctags
    +-DIST_SUBDIRS = sigc++ tests examples docs
    ++DIST_SUBDIRS = sigc++
    + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    + distdir = $(PACKAGE)-$(VERSION)
    + top_distdir = $(distdir)
    diff --git a/libs/libsndfile/Makefile b/libs/libsndfile/Makefile
    new file mode 100644
    index 0000000..6bbf155
    --- /dev/null
    +++ b/libs/libsndfile/Makefile
    @@ -0,0 +1,54 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libsndfile
    +PKG_VERSION:=1.0.21
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.mega-nerd.com/libsndfile/files/
    +PKG_MD5SUM:=880a40ec636ab2185b97f8927299b292
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libsndfile
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Library for reading/writing audio files
    +  URL:=http://www.mega-nerd.com/libsndfile/
    +  DEPENDS:=@!avr32
    +endef
    +
    +define Package/libsndfile/description
    + libsndfile is a library of C routines for reading and writing files 
    + containing sampled audio data.
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--disable-alsa \
    +	--disable-external-libs \
    +	--disable-sqlite \
    +	--disable-shave \
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)
    +	$(CP) $(PKG_INSTALL_DIR)/* $(1)/
    +endef
    +
    +define Package/libsndfile/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsndfile.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libsndfile))
    diff --git a/libs/libsndfile/patches/001-automake-compat.patch b/libs/libsndfile/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..2df32ae
    --- /dev/null
    +++ b/libs/libsndfile/patches/001-automake-compat.patch
    @@ -0,0 +1,10 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -1,5 +1,7 @@
    + ## Process this file with automake to produce Makefile.in
    + 
    ++ACLOCAL_AMFLAGS = -I M4
    ++
    + DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
    + 
    + if BUILD_OCTAVE_MOD
    diff --git a/libs/libsoup/Makefile b/libs/libsoup/Makefile
    new file mode 100644
    index 0000000..f56e1d6
    --- /dev/null
    +++ b/libs/libsoup/Makefile
    @@ -0,0 +1,64 @@
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libsoup
    +PKG_VERSION:=2.28.2
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.28
    +PKG_MD5SUM:=31d7ad416005eed4b78f07ac01b6b9f0
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +TARGET_LDFLAGS+=\
    +	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
    +
    +define Package/libsoup
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=libsoup
    +  URL:=http://live.gnome.org/LibSoup
    +  DEPENDS:=+glib2 +libxml2 +libgnutls
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-ssl \
    +		--disable-glibtest \
    +		--without-apache-httpd \
    +		--without-gnome \
    +	)
    +endef
    +
    +define package/libsoup/decription
    +Libsoup is an HTTP library implementation in C
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/libsoup-2.4/libsoup}
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libsoup-2.4.{so*,la,a} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
    +		$(1)/usr/lib/pkgconfig/
    +
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/libsoup-2.4/libsoup/*.h \
    +		$(1)/usr/include/libsoup-2.4/libsoup/
    +endef
    +
    +define Package/libsoup/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libsoup-2.4.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libsoup))
    diff --git a/libs/libsynce/Makefile b/libs/libsynce/Makefile
    new file mode 100644
    index 0000000..73ff1e5
    --- /dev/null
    +++ b/libs/libsynce/Makefile
    @@ -0,0 +1,65 @@
    +#
    +# Copyright (C) 2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libsynce
    +PKG_VERSION:=0.12
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/synce
    +PKG_MD5SUM:=fd473d3deceda7912af4427dede1736f
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +PKG_BUILD_PARALLEL:=1
    +PKG_INSTALL:=1
    +PKG_FIXUP:=libtool
    +
    +define Package/libsynce
    +  DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=SynCE library
    +  URL:=http://synce.sourceforge.net/
    +endef
    +
    +define Package/libsynce/description
    +The purpose of the SynCE project is to provide a means of communication with a
    +Windows CE or Pocket PC device from a computer running Linux, *BSD or other unices.
    +endef
    +
    +MAKE_FLAGS += \
    +	OPTIM="$(TARGET_CFLAGS)" \
    +	CFLAGS="$(TARGET_CFLAGS)" \
    +	DESTDIR="$(PKG_INSTALL_DIR)"
    +
    +CONFIGURE_ARGS += \
    +	--enable-hal-support=no \
    +	--enable-odccm-support=no
    +
    +CONFIGURE_VARS+= \
    +	CPPFLAGS="$$$$CPPFLAGS -I$(ICONV_PREFIX)/include" \
    +	CPPFLAGS="$$$$CPPFLAGS -I$(INTL_PREFIX)/include" \
    +	LDFLAGS="$$$$LDFLAGS -L$(ICONV_PREFIX)/lib" \
    +	LDFLAGS="$$$$LDFLAGS -L$(INTL_PREFIX)/lib" \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsynce.so* $(1)/usr/lib/
    +endef
    +
    +define Package/libsynce/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsynce.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libsynce))
    diff --git a/libs/libtasn1/Makefile b/libs/libtasn1/Makefile
    new file mode 100644
    index 0000000..e7f8f01
    --- /dev/null
    +++ b/libs/libtasn1/Makefile
    @@ -0,0 +1,63 @@
    +#
    +# Copyright (C) 2005-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libtasn1
    +PKG_VERSION:=1.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/libtasn1/ \
    +	ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/libtasn1/ \
    +	http://www.mirrors.wiretapped.net/security/network-security/gnutls/libtasn1/ \
    +	ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/libtasn1/ \
    +	http://josefsson.org/gnutls/releases/libtasn1/
    +PKG_MD5SUM:=a733ecdfed3517910e627d24e050979f
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libtasn1
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=An ASN.1 and DER structures manipulation library
    +  URL:=ftp://ftp.gnutls.org/pub/gnutls/libtasn1/
    +endef
    +
    +define Package/libtasn1/description
    + This is a library for Abstract Syntax Notation One (ASN.1) and 
    + Distinguish Encoding Rules (DER) manipulation.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +		--enable-shared \
    +		--enable-static
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libtasn1-config $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libtasn1.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtasn1.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtasn1*.pc $(1)/usr/lib/pkgconfig/
    +	$(SED) 's,-I$$$${prefix}/include,,g' $(1)/usr/bin/libtasn1-config
    +	$(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/libtasn1-config
    +endef
    +
    +define Package/libtasn1/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtasn1.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libtasn1))
    diff --git a/libs/libtheora/Makefile b/libs/libtheora/Makefile
    new file mode 100644
    index 0000000..c9b4848
    --- /dev/null
    +++ b/libs/libtheora/Makefile
    @@ -0,0 +1,64 @@
    +#
    +# Copyright (C) 2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libtheora
    +PKG_VERSION:=1.0
    +PKG_RELEASE:=3
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://downloads.xiph.org/releases/theora/
    +PKG_MD5SUM:=c963937053f45a7878954bed37ceb182
    +PKG_FIXUP:=libtool
    +
    +PKG_BUILD_DEPENDS:=libvorbis
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +PKG_INSTALL=1
    +
    +define Package/libtheora
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=libtheora
    +  URL:=http://xiph.org/theora/
    +  DEPENDS:=+libogg
    +endef
    +
    +define Package/libtheora/description
    +Theora is Xiph.Org's first publicly released video codec, intended
    +for use within the Foundation's Ogg multimedia streaming system.
    +Theora is derived directly from On2's VP3 codec; Currently the
    +encoders are nearly identical, but Theora will make use of new
    +features supported by the decoder to improve over what is
    +is possible with VP3.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--disable-examples \
    +		--disable-oggtest \
    +		--disable-vorbistest \
    +		--disable-sdltest \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/theora/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/theora/* $(1)/usr/include/theora/
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libtheora/install
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libtheora))
    diff --git a/libs/libtheora/patches/001-no_docs_tests.patch b/libs/libtheora/patches/001-no_docs_tests.patch
    new file mode 100644
    index 0000000..0de12cf
    --- /dev/null
    +++ b/libs/libtheora/patches/001-no_docs_tests.patch
    @@ -0,0 +1,45 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -8,7 +8,7 @@ else
    + EXAMPLES_DIR =
    + endif
    + 
    +-SUBDIRS = lib include doc tests m4 $(EXAMPLES_DIR)
    ++SUBDIRS = lib include m4 $(EXAMPLES_DIR)
    + 
    + 
    + # we include the whole debian/ dir in EXTRA_DIST because there's a problem
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -80,7 +80,7 @@ pkgconfigDATA_INSTALL = $(INSTALL_DATA)
    + DATA = $(pkgconfig_DATA)
    + ETAGS = etags
    + CTAGS = ctags
    +-DIST_SUBDIRS = lib include doc tests m4 examples
    ++DIST_SUBDIRS = lib include m4
    + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    + distdir = $(PACKAGE)-$(VERSION)
    + top_distdir = $(distdir)
    +@@ -262,7 +262,7 @@ target_vendor = @target_vendor@
    + AUTOMAKE_OPTIONS = foreign 1.6 dist-zip dist-bzip2
    + @THEORA_ENABLE_EXAMPLES_FALSE@EXAMPLES_DIR = 
    + @THEORA_ENABLE_EXAMPLES_TRUE@EXAMPLES_DIR = examples
    +-SUBDIRS = lib include doc tests m4 $(EXAMPLES_DIR)
    ++SUBDIRS = lib include m4 $(EXAMPLES_DIR)
    + 
    + # we include the whole debian/ dir in EXTRA_DIST because there's a problem
    + # with autotools and HFS+ MacOSX file systems that caused debian/Makefile.am
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -310,11 +310,6 @@ fi
    + dnl check for SDL
    + HAVE_SDL=no
    + 
    +-AM_PATH_SDL(,[
    +-  HAVE_SDL=yes
    +-  SDL_LIBS=`$SDL_CONFIG --libs`
    +-],AC_MSG_WARN([*** Unable to find SDL -- Not compiling example players ***]))
    +-
    + dnl check for OSS
    + HAVE_OSS=no
    + 
    diff --git a/libs/libtorrent/Makefile b/libs/libtorrent/Makefile
    new file mode 100644
    index 0000000..6a3d783
    --- /dev/null
    +++ b/libs/libtorrent/Makefile
    @@ -0,0 +1,70 @@
    +#
    +# Copyright (C) 2007-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libtorrent
    +PKG_VERSION:=0.12.6
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://libtorrent.rakshasa.no/downloads
    +PKG_MD5SUM:=037499ed708aaf72988cee60e5a8d96b
    +
    +PKG_FIXUP:=libtool
    +PKG_BUILD_PARALLEL:=1
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libtorrent
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Rakshasa's BitTorrent library
    +  URL:=http://libtorrent.rakshasa.no/
    +  DEPENDS:=+libopenssl +libsigcxx @!LINUX_2_4
    +  MAINTAINER:=Luka Perkov 
    +endef
    +
    +define Package/libtorrent/description
    + LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on
    + high performance and good code. The library differentiates itself from other
    + implementations by transfering directly from file pages to the network stack.
    + On high-bandwidth connections it is able to seed at 3 times the speed of the
    + official client.
    +endef
    +
    +TARGET_CPPFLAGS += -fno-strict-aliasing -fno-inline
    +TARGET_LDFLAGS += $(LIBGCC_S)
    +
    +CONFIGURE_ARGS+= \
    +	--enable-shared \
    +	--enable-static \
    +	--enable-aligned \
    +	--disable-debug \
    +	--enable-openssl \
    +
    +define Build/Configure
    +	( cd $(PKG_BUILD_DIR); ./autogen.sh );
    +	$(call Build/Configure/Default)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/torrent $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libtorrent/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libtorrent))
    diff --git a/libs/libtorrent/patches/100-fix_cross_compile.patch b/libs/libtorrent/patches/100-fix_cross_compile.patch
    new file mode 100644
    index 0000000..0fcae28
    --- /dev/null
    +++ b/libs/libtorrent/patches/100-fix_cross_compile.patch
    @@ -0,0 +1,35 @@
    +Index: libtorrent-0.12.6/scripts/checks.m4
    +===================================================================
    +--- libtorrent-0.12.6.orig/scripts/checks.m4
    ++++ libtorrent-0.12.6/scripts/checks.m4
    +@@ -96,7 +96,7 @@ AC_DEFUN([TORRENT_CHECK_KQUEUE], [
    + AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [
    +   AC_MSG_CHECKING(whether kqueue supports pipes and ptys)
    + 
    +-  AC_RUN_IFELSE(
    ++  AC_LINK_IFELSE(
    +     [[#include 
    +       #include 
    +       #include 
    +Index: libtorrent-0.12.6/scripts/common.m4
    +===================================================================
    +--- libtorrent-0.12.6.orig/scripts/common.m4
    ++++ libtorrent-0.12.6/scripts/common.m4
    +@@ -184,7 +184,7 @@ AC_DEFUN([TORRENT_CHECK_MADVISE], [
    + AC_DEFUN([TORRENT_CHECK_EXECINFO], [
    +   AC_MSG_CHECKING(for execinfo.h)
    + 
    +-  AC_RUN_IFELSE(
    ++  AC_LINK_IFELSE(
    +     [[#include 
    +       int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
    +     ]],
    +@@ -199,7 +199,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [
    + AC_DEFUN([TORRENT_CHECK_ALIGNED], [
    +   AC_MSG_CHECKING(the byte alignment)
    + 
    +-  AC_RUN_IFELSE(
    ++  AC_LINK_IFELSE(
    +     [[#include 
    +       int main() {
    +         char buf[8] = { 0, 0, 0, 0, 1, 0, 0, 0 };
    diff --git a/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.patch b/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.patch
    new file mode 100644
    index 0000000..cf64be7
    --- /dev/null
    +++ b/libs/libtorrent/patches/120-fix-ipv6_socket_datagram.patch
    @@ -0,0 +1,28 @@
    +Index: libtorrent-0.12.6/src/net/socket_datagram.cc
    +===================================================================
    +--- libtorrent-0.12.6.orig/src/net/socket_datagram.cc
    ++++ libtorrent-0.12.6/src/net/socket_datagram.cc
    +@@ -73,6 +73,23 @@ SocketDatagram::write_datagram(const voi
    +   int r;
    + 
    +   if (sa != NULL) {
    ++#ifdef RAK_USE_INET6
    ++    if (m_ipv6_socket && sa->family() == rak::socket_address::pf_inet) {
    ++      uint32_t addr32[4];
    ++      sockaddr_in6 mapped_addr;
    ++      memset(&mapped_addr, 0, sizeof(mapped_addr));
    ++      mapped_addr.sin6_family = AF_INET6;
    ++      addr32[0] = 0;
    ++      addr32[1] = 0;
    ++      addr32[2] = htonl(0xffff);
    ++      addr32[3] = sa->sa_inet()->address_n();
    ++      memcpy(mapped_addr.sin6_addr.s6_addr, addr32, sizeof(uint32_t) * 4);
    ++      mapped_addr.sin6_port = sa->sa_inet()->port_n();
    ++      r = ::sendto(m_fileDesc, buffer, length, 0, (sockaddr*)&mapped_addr, sizeof(mapped_addr));
    ++    } else if (m_ipv6_socket && sa->family() == rak::socket_address::pf_inet6) {
    ++      r = ::sendto(m_fileDesc, buffer, length, 0, sa->sa_inet6()->c_sockaddr(), sizeof(rak::socket_address_inet6));
    ++    } else
    ++#endif
    +     r = ::sendto(m_fileDesc, buffer, length, 0, sa->sa_inet()->c_sockaddr(), sizeof(rak::socket_address_inet));
    +   } else {
    +     r = ::send(m_fileDesc, buffer, length, 0);
    diff --git a/libs/libtwin/Makefile b/libs/libtwin/Makefile
    new file mode 100644
    index 0000000..91b66d5
    --- /dev/null
    +++ b/libs/libtwin/Makefile
    @@ -0,0 +1,69 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libtwin
    +PKG_VERSION:=0.0.3
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://ozlabs.org/~jk/projects/petitboot/downloads/
    +PKG_MD5SUM:=ebd7c5cca3c9e108208a7bf17b256a6c
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +PKG_INSTALL=1
    +
    +define Package/libtwin
    +	SECTION:=libs
    +	CATEGORY:=Libraries
    +	DEPENDS:=+zlib +libpng +libjpeg +libfreetype
    +	TITLE:=The tiny windowing system library
    +	URL:=http://ozlabs.org/~jk/projects/petitboot/
    +	MAINTAINER:=Geoff Levand 
    +endef
    +
    +define Package/libtwin/description
    +	Keith Packard's Tiny Windowing System Library
    +endef
    +
    +CONFIGURE_ARGS += --enable-shared --enable-static --disable-x11
    +
    +ifdef CONFIG_powerpc
    +  EXTRA_CFLAGS += -flax-vector-conversions
    +endif
    +
    +TARGET_LDFLAGS += \
    +	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/libtwin
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/libtwin/*.h \
    +		$(1)/usr/include/libtwin
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libtwin.{la,a,so*} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtwin.pc \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libtwin/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libtwin.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libtwin))
    diff --git a/libs/libtwin/patches/100-compile_fix.patch b/libs/libtwin/patches/100-compile_fix.patch
    new file mode 100644
    index 0000000..dd9f9f8
    --- /dev/null
    +++ b/libs/libtwin/patches/100-compile_fix.patch
    @@ -0,0 +1,11 @@
    +--- a/libtwin/twin_feature.c
    ++++ b/libtwin/twin_feature.c
    +@@ -55,7 +55,7 @@
    + }
    + 
    + #else
    +-#define _twin_have_altivec()
    ++#define _twin_have_altivec() 0
    + #endif /* HAVE_ALTIVEC */
    + 
    + int twin_has_feature(unsigned int feature)
    diff --git a/libs/libupnp/Makefile b/libs/libupnp/Makefile
    new file mode 100644
    index 0000000..83bdb5e
    --- /dev/null
    +++ b/libs/libupnp/Makefile
    @@ -0,0 +1,94 @@
    +# 
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libupnp
    +PKG_VERSION:=1.6.12
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/pupnp
    +PKG_MD5SUM:=d48938efe69d07142be8aaaeaa9a2d3e
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libupnp/Default
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  URL:=http://pupnp.sourceforge.net/
    +endef
    +
    +define Package/libupnp
    +  $(call Package/libupnp/Default)
    +  DEPENDS:=+libpthread
    +  TITLE:=UPnP SDK library
    +  MENU:=1
    +endef
    +
    +define Package/libupnp/description
    +The portable SDK for UPnP Devices (libupnp) provides developers with an API and
    +open source code for building control points, devices, and bridges that are
    +compliant with Version 1.0 of the  Universal Plug and Play Device Architecture
    +Specification.
    +endef
    +
    +define Package/libupnp-sample
    +  $(call Package/libupnp/Default)
    +  DEPENDS:=libupnp
    +  TITLE:=UPnP sample applications
    +endef
    +
    +define Package/libupnp-sample/description
    +TVcontrolpoint & tvdevice sample applications run inside /etc/upnp-tvdevice/
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +	);
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile/libupnp-sample
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		check
    +	$(MAKE) -C $(PKG_BUILD_DIR)/upnp/sample \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		upnp_tv_device upnp_tv_ctrlpt
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/upnp $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.{a,so*,la} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libupnp.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libupnp/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/libupnp-sample/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/upnp/sample/tv_device $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/upnp/sample/tv_ctrlpt $(1)/usr/bin
    +	$(INSTALL_DIR) $(1)/etc/upnp-tvdevice/web
    +	$(CP) $(PKG_BUILD_DIR)/upnp/sample/web/* $(1)/etc/upnp-tvdevice
    +endef
    +
    +$(eval $(call BuildPackage,libupnp))
    +$(eval $(call BuildPackage,libupnp-sample))
    diff --git a/libs/libusb-1.0/Makefile b/libs/libusb-1.0/Makefile
    new file mode 100644
    index 0000000..071a0fa
    --- /dev/null
    +++ b/libs/libusb-1.0/Makefile
    @@ -0,0 +1,51 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libusb-1.0
    +PKG_VERSION:=1.0.8
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=libusb-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-$(PKG_VERSION)
    +PKG_MD5SUM:=37d34e6eaa69a4b645a19ff4ca63ceef
    +PKG_BUILD_DIR:=$(BUILD_DIR)/libusb-$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libusb-1.0
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=libusb-1.0
    +  URL:=http://libusb.wiki.sourceforge.net/
    +endef
    +
    +define Package/libusb-1.0/description
    +libusb-1.0
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(MAKE) install
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(INSTALL_DIR) $(1)/usr/include/libusb-1.0
    +	$(CP) $(PKG_BUILD_DIR)/libusb/libusb.h $(1)/usr/include/libusb-1.0/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libusb/.libs/libusb*.{a,so*} $(1)/usr/lib/
    +	$(CP) $(PKG_BUILD_DIR)/libusb/libusb*.la $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_BUILD_DIR)/libusb*.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libusb-1.0/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libusb/.libs/libusb*.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libusb-1.0))
    diff --git a/libs/libusb-1.0/patches/001-timerfd.patch b/libs/libusb-1.0/patches/001-timerfd.patch
    new file mode 100644
    index 0000000..6b9fde9
    --- /dev/null
    +++ b/libs/libusb-1.0/patches/001-timerfd.patch
    @@ -0,0 +1,35 @@
    +commit cadb77d99e314e42c3eb02d016e9d90136ec6959
    +Author: Alexander Gordeev 
    +Date:   Thu Jan 27 06:39:16 2011 +0300
    +
    +    fix timerfd initialization
    +    
    +    sys/timerfd.h defines TFD_NONBLOCK as 0x800 but in kernel TFD_NONBLOCK
    +    is an alias for O_NONBLOCK which is defined in arch-specific fcntl.h.
    +    While it's still 0x800 for most of archs but for mips it's 0x80. So
    +    timerfd_create(..., TFD_NONBLOCK) returns -EINVAL because of that. Fix
    +    this by using O_NONBLOCK instead.
    +    
    +    Signed-off-by: Alexander Gordeev 
    +
    +diff --git a/libusb/io.c b/libusb/io.c
    +index 1379eb3..250b8dc 100644
    +--- a/libusb/io.c
    ++++ b/libusb/io.c
    +@@ -20,6 +20,7 @@
    + 
    + #include 
    + #include 
    ++#include 
    + #include 
    + #include 
    + #include 
    +@@ -1025,7 +1026,7 @@ int usbi_io_init(struct libusb_context *ctx)
    + 
    + #ifdef USBI_TIMERFD_AVAILABLE
    + 	ctx->timerfd = timerfd_create(usbi_backend->get_timerfd_clockid(),
    +-		TFD_NONBLOCK);
    ++		O_NONBLOCK);
    + 	if (ctx->timerfd >= 0) {
    + 		usbi_dbg("using timerfd for timeouts");
    + 		r = usbi_add_pollfd(ctx, ctx->timerfd, POLLIN);
    diff --git a/libs/libusb/Makefile b/libs/libusb/Makefile
    new file mode 100644
    index 0000000..436186b
    --- /dev/null
    +++ b/libs/libusb/Makefile
    @@ -0,0 +1,71 @@
    +#
    +# Copyright (C) 2006-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libusb
    +PKG_VERSION:=0.1.12
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/libusb
    +PKG_MD5SUM:=caf182cbc7565dac0fd72155919672e6
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +PKG_INSTALL=1
    +
    +define Package/libusb
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=A library for accessing Linux USB devices
    +  URL:=http://libusb.sourceforge.net/
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +	)
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/libusb-config \
    +		$(2)/bin/
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
    +		$(2)/bin/libusb-config
    +
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/usb.h \
    +		$(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libusb*.{la,so*,a} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb.pc \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libusb/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libusb*.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libusb))
    diff --git a/libs/libusb/patches/000-debian_packed.patch b/libs/libusb/patches/000-debian_packed.patch
    new file mode 100644
    index 0000000..169de31
    --- /dev/null
    +++ b/libs/libusb/patches/000-debian_packed.patch
    @@ -0,0 +1,52 @@
    +
    +---
    + usb.h.in |   10 +++++-----
    + 1 file changed, 5 insertions(+), 5 deletions(-)
    +
    +--- a/usb.h.in
    ++++ b/usb.h.in
    +@@ -66,14 +66,14 @@
    + struct usb_descriptor_header {
    + 	u_int8_t  bLength;
    + 	u_int8_t  bDescriptorType;
    +-};
    ++} __attribute__ ((packed));
    + 
    + /* String descriptor */
    + struct usb_string_descriptor {
    + 	u_int8_t  bLength;
    + 	u_int8_t  bDescriptorType;
    + 	u_int16_t wData[1];
    +-};
    ++} __attribute__ ((packed));
    + 
    + /* HID descriptor */
    + struct usb_hid_descriptor {
    +@@ -85,7 +85,7 @@
    + 	/* u_int8_t  bReportDescriptorType; */
    + 	/* u_int16_t wDescriptorLength; */
    + 	/* ... */
    +-};
    ++} __attribute__ ((packed));
    + 
    + /* Endpoint descriptor */
    + #define USB_MAXENDPOINTS	32
    +@@ -172,7 +172,7 @@
    + 	u_int8_t  iProduct;
    + 	u_int8_t  iSerialNumber;
    + 	u_int8_t  bNumConfigurations;
    +-};
    ++} __attribute__ ((packed));
    + 
    + struct usb_ctrl_setup {
    + 	u_int8_t  bRequestType;
    +@@ -180,7 +180,7 @@
    + 	u_int16_t wValue;
    + 	u_int16_t wIndex;
    + 	u_int16_t wLength;
    +-};
    ++} __attribute__ ((packed));
    + 
    + /*
    +  * Standard requests
    +
    diff --git a/libs/libusb/patches/001-debian_ansi_types.patch b/libs/libusb/patches/001-debian_ansi_types.patch
    new file mode 100644
    index 0000000..629ad9a
    --- /dev/null
    +++ b/libs/libusb/patches/001-debian_ansi_types.patch
    @@ -0,0 +1,194 @@
    +
    +---
    + usb.h.in |  118 ++++++++++++++++++++++++++++++++-------------------------------
    + 1 file changed, 60 insertions(+), 58 deletions(-)
    +
    +--- a/usb.h.in
    ++++ b/usb.h.in
    +@@ -13,8 +13,10 @@
    + 
    + #include 
    + #include 
    ++#include 
    + #include 
    + 
    ++#include 
    + #include 
    + 
    + /*
    +@@ -64,40 +66,40 @@
    + 
    + /* All standard descriptors have these 2 fields in common */
    + struct usb_descriptor_header {
    +-	u_int8_t  bLength;
    +-	u_int8_t  bDescriptorType;
    ++	uint8_t  bLength;
    ++	uint8_t  bDescriptorType;
    + } __attribute__ ((packed));
    + 
    + /* String descriptor */
    + struct usb_string_descriptor {
    +-	u_int8_t  bLength;
    +-	u_int8_t  bDescriptorType;
    +-	u_int16_t wData[1];
    ++	uint8_t  bLength;
    ++	uint8_t  bDescriptorType;
    ++	uint16_t wData[1];
    + } __attribute__ ((packed));
    + 
    + /* HID descriptor */
    + struct usb_hid_descriptor {
    +-	u_int8_t  bLength;
    +-	u_int8_t  bDescriptorType;
    +-	u_int16_t bcdHID;
    +-	u_int8_t  bCountryCode;
    +-	u_int8_t  bNumDescriptors;
    +-	/* u_int8_t  bReportDescriptorType; */
    +-	/* u_int16_t wDescriptorLength; */
    ++	uint8_t  bLength;
    ++	uint8_t  bDescriptorType;
    ++	uint16_t bcdHID;
    ++	uint8_t  bCountryCode;
    ++	uint8_t  bNumDescriptors;
    ++	/* uint8_t  bReportDescriptorType; */
    ++	/* uint16_t wDescriptorLength; */
    + 	/* ... */
    + } __attribute__ ((packed));
    + 
    + /* Endpoint descriptor */
    + #define USB_MAXENDPOINTS	32
    + struct usb_endpoint_descriptor {
    +-	u_int8_t  bLength;
    +-	u_int8_t  bDescriptorType;
    +-	u_int8_t  bEndpointAddress;
    +-	u_int8_t  bmAttributes;
    +-	u_int16_t wMaxPacketSize;
    +-	u_int8_t  bInterval;
    +-	u_int8_t  bRefresh;
    +-	u_int8_t  bSynchAddress;
    ++	uint8_t  bLength;
    ++	uint8_t  bDescriptorType;
    ++	uint8_t  bEndpointAddress;
    ++	uint8_t  bmAttributes;
    ++	uint16_t wMaxPacketSize;
    ++	uint8_t  bInterval;
    ++	uint8_t  bRefresh;
    ++	uint8_t  bSynchAddress;
    + 
    + 	unsigned char *extra;	/* Extra descriptors */
    + 	int extralen;
    +@@ -115,15 +117,15 @@
    + /* Interface descriptor */
    + #define USB_MAXINTERFACES	32
    + struct usb_interface_descriptor {
    +-	u_int8_t  bLength;
    +-	u_int8_t  bDescriptorType;
    +-	u_int8_t  bInterfaceNumber;
    +-	u_int8_t  bAlternateSetting;
    +-	u_int8_t  bNumEndpoints;
    +-	u_int8_t  bInterfaceClass;
    +-	u_int8_t  bInterfaceSubClass;
    +-	u_int8_t  bInterfaceProtocol;
    +-	u_int8_t  iInterface;
    ++	uint8_t  bLength;
    ++	uint8_t  bDescriptorType;
    ++	uint8_t  bInterfaceNumber;
    ++	uint8_t  bAlternateSetting;
    ++	uint8_t  bNumEndpoints;
    ++	uint8_t  bInterfaceClass;
    ++	uint8_t  bInterfaceSubClass;
    ++	uint8_t  bInterfaceProtocol;
    ++	uint8_t  iInterface;
    + 
    + 	struct usb_endpoint_descriptor *endpoint;
    + 
    +@@ -141,14 +143,14 @@
    + /* Configuration descriptor information.. */
    + #define USB_MAXCONFIG		8
    + struct usb_config_descriptor {
    +-	u_int8_t  bLength;
    +-	u_int8_t  bDescriptorType;
    +-	u_int16_t wTotalLength;
    +-	u_int8_t  bNumInterfaces;
    +-	u_int8_t  bConfigurationValue;
    +-	u_int8_t  iConfiguration;
    +-	u_int8_t  bmAttributes;
    +-	u_int8_t  MaxPower;
    ++	uint8_t  bLength;
    ++	uint8_t  bDescriptorType;
    ++	uint16_t wTotalLength;
    ++	uint8_t  bNumInterfaces;
    ++	uint8_t  bConfigurationValue;
    ++	uint8_t  iConfiguration;
    ++	uint8_t  bmAttributes;
    ++	uint8_t  MaxPower;
    + 
    + 	struct usb_interface *interface;
    + 
    +@@ -158,28 +160,28 @@
    + 
    + /* Device descriptor */
    + struct usb_device_descriptor {
    +-	u_int8_t  bLength;
    +-	u_int8_t  bDescriptorType;
    +-	u_int16_t bcdUSB;
    +-	u_int8_t  bDeviceClass;
    +-	u_int8_t  bDeviceSubClass;
    +-	u_int8_t  bDeviceProtocol;
    +-	u_int8_t  bMaxPacketSize0;
    +-	u_int16_t idVendor;
    +-	u_int16_t idProduct;
    +-	u_int16_t bcdDevice;
    +-	u_int8_t  iManufacturer;
    +-	u_int8_t  iProduct;
    +-	u_int8_t  iSerialNumber;
    +-	u_int8_t  bNumConfigurations;
    ++	uint8_t  bLength;
    ++	uint8_t  bDescriptorType;
    ++	uint16_t bcdUSB;
    ++	uint8_t  bDeviceClass;
    ++	uint8_t  bDeviceSubClass;
    ++	uint8_t  bDeviceProtocol;
    ++	uint8_t  bMaxPacketSize0;
    ++	uint16_t idVendor;
    ++	uint16_t idProduct;
    ++	uint16_t bcdDevice;
    ++	uint8_t  iManufacturer;
    ++	uint8_t  iProduct;
    ++	uint8_t  iSerialNumber;
    ++	uint8_t  bNumConfigurations;
    + } __attribute__ ((packed));
    + 
    + struct usb_ctrl_setup {
    +-	u_int8_t  bRequestType;
    +-	u_int8_t  bRequest;
    +-	u_int16_t wValue;
    +-	u_int16_t wIndex;
    +-	u_int16_t wLength;
    ++	uint8_t  bRequestType;
    ++	uint8_t  bRequest;
    ++	uint16_t wValue;
    ++	uint16_t wIndex;
    ++	uint16_t wLength;
    + } __attribute__ ((packed));
    + 
    + /*
    +@@ -250,7 +252,7 @@
    + 
    +   void *dev;		/* Darwin support */
    + 
    +-  u_int8_t devnum;
    ++  uint8_t devnum;
    + 
    +   unsigned char num_children;
    +   struct usb_device **children;
    +@@ -262,7 +264,7 @@
    +   char dirname[PATH_MAX + 1];
    + 
    +   struct usb_device *devices;
    +-  u_int32_t location;
    ++  uint32_t location;
    + 
    +   struct usb_device *root_dev;
    + };
    +
    diff --git a/libs/libusb/patches/002-no_libusbpp.patch b/libs/libusb/patches/002-no_libusbpp.patch
    new file mode 100644
    index 0000000..82116b7
    --- /dev/null
    +++ b/libs/libusb/patches/002-no_libusbpp.patch
    @@ -0,0 +1,106 @@
    +--- libusb-0.1.12/Makefile.in.old	2007-01-04 16:36:50.000000000 -0700
    ++++ libusb-0.1.12/Makefile.in	2007-01-04 16:42:55.000000000 -0700
    +@@ -17,7 +17,7 @@
    + 
    + 
    + 
    +-SOURCES = $(libusb_la_SOURCES) $(libusbpp_la_SOURCES)
    ++SOURCES = $(libusb_la_SOURCES)
    + 
    + srcdir = @srcdir@
    + top_srcdir = @top_srcdir@
    +@@ -73,8 +73,8 @@
    + am_libusb_la_OBJECTS = usb.lo error.lo descriptors.lo $(am__objects_1)
    + libusb_la_OBJECTS = $(am_libusb_la_OBJECTS)
    + libusbpp_la_LIBADD =
    +-am_libusbpp_la_OBJECTS = usbpp.lo
    +-libusbpp_la_OBJECTS = $(am_libusbpp_la_OBJECTS)
    ++am_libusbpp_la_OBJECTS =
    ++libusbpp_la_OBJECTS =
    + binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
    + SCRIPTS = $(bin_SCRIPTS)
    + DEFAULT_INCLUDES = 
    +@@ -82,8 +82,7 @@
    + am__depfiles_maybe = depfiles
    + @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/bsd.Plo ./$(DEPDIR)/darwin.Plo \
    + @AMDEP_TRUE@	./$(DEPDIR)/descriptors.Plo ./$(DEPDIR)/error.Plo \
    +-@AMDEP_TRUE@	./$(DEPDIR)/linux.Plo ./$(DEPDIR)/usb.Plo \
    +-@AMDEP_TRUE@	./$(DEPDIR)/usbpp.Plo
    ++@AMDEP_TRUE@	./$(DEPDIR)/linux.Plo ./$(DEPDIR)/usb.Plo
    + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
    + 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
    + LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
    +@@ -100,8 +99,8 @@
    + CXXLD = $(CXX)
    + CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
    + 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
    +-SOURCES = $(libusb_la_SOURCES) $(libusbpp_la_SOURCES)
    +-DIST_SOURCES = $(am__libusb_la_SOURCES_DIST) $(libusbpp_la_SOURCES)
    ++SOURCES = $(libusb_la_SOURCES)
    ++DIST_SOURCES = $(am__libusb_la_SOURCES_DIST)
    + RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
    + 	html-recursive info-recursive install-data-recursive \
    + 	install-exec-recursive install-info-recursive \
    +@@ -256,7 +255,7 @@
    + # require automake 1.4
    + # gnu strictness chokes on README being autogenerated
    + AUTOMAKE_OPTIONS = 1.4 foreign
    +-SUBDIRS = . tests doc
    ++SUBDIRS = .
    + AM_CFLAGS = -Werror $(AM_CFLAGS_EXT)
    + configincludedir = $(pkglibdir)/include
    + bin_SCRIPTS = libusb-config
    +@@ -265,7 +264,7 @@
    +              apidocs/footer.html apidocs/doxygen.css apidocs/doxygen.png libusb.pc.in
    + 
    + EXTRA_libusb_la_SOURCE = linux.c linux.h bsd.c darwin.c
    +-lib_LTLIBRARIES = libusb.la libusbpp.la
    ++lib_LTLIBRARIES = libusb.la
    + pkgconfig_DATA = libusb.pc
    + @BSD_API_FALSE@@DARWIN_API_FALSE@@LINUX_API_FALSE@OS_SUPPORT = 
    + @BSD_API_FALSE@@DARWIN_API_TRUE@@LINUX_API_FALSE@OS_SUPPORT = darwin.c
    +@@ -278,25 +277,19 @@
    + AM_CPPFLAGS = -I.
    + AM_CXXFLAGS = 
    + libusb_la_SOURCES = usb.c usbi.h error.c error.h descriptors.c $(OS_SUPPORT)
    +-libusbpp_la_SOURCES = usbpp.cpp usbpp.h
    ++libusbpp_la_SOURCES =
    + libusbpp_la_DEPENDENCIES = libusb.la
    + 
    + # Do not add usb.h to *_SOURCES, regardless of dependencies.
    + # It would be added to the dist tarball, which it shouldn't be.
    + nodist_include_HEADERS = usb.h
    +-include_HEADERS = usbpp.h
    ++include_HEADERS =
    + libusb_la_LDFLAGS = \
    + 	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
    + 	-release $(LT_RELEASE) \
    + 	-export-dynamic \
    + 	$(LDADDS) $(PREBIND_FLAGS)
    + 
    +-libusbpp_la_LDFLAGS = \
    +-	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
    +-	-release $(LT_RELEASE) \
    +-	-export-dynamic \
    +-	$(LDADDS) -lusb $(PREBIND_FLAGSPP)
    +-
    + all: config.h
    + 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
    + 
    +@@ -395,8 +388,6 @@
    + 	done
    + libusb.la: $(libusb_la_OBJECTS) $(libusb_la_DEPENDENCIES) 
    + 	$(LINK) -rpath $(libdir) $(libusb_la_LDFLAGS) $(libusb_la_OBJECTS) $(libusb_la_LIBADD) $(LIBS)
    +-libusbpp.la: $(libusbpp_la_OBJECTS) $(libusbpp_la_DEPENDENCIES) 
    +-	$(CXXLINK) -rpath $(libdir) $(libusbpp_la_LDFLAGS) $(libusbpp_la_OBJECTS) $(libusbpp_la_LIBADD) $(LIBS)
    + install-binSCRIPTS: $(bin_SCRIPTS)
    + 	@$(NORMAL_INSTALL)
    + 	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
    +@@ -429,7 +420,6 @@
    + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@
    + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux.Plo@am__quote@
    + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usb.Plo@am__quote@
    +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usbpp.Plo@am__quote@
    + 
    + .c.o:
    + @am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
    diff --git a/libs/libusb/patches/003-automake-compat.patch b/libs/libusb/patches/003-automake-compat.patch
    new file mode 100644
    index 0000000..eaae25a
    --- /dev/null
    +++ b/libs/libusb/patches/003-automake-compat.patch
    @@ -0,0 +1,10 @@
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -149,6 +149,7 @@ if test "x$enable_debug" = "xyes"; then
    + fi
    + 
    + # Checks for programs.
    ++AC_PROG_CXX
    + AC_LANG_CPLUSPLUS
    + AC_PROG_CC
    + AM_PROG_CC_C_O
    diff --git a/libs/libusb/patches/004-no_unused.patch b/libs/libusb/patches/004-no_unused.patch
    new file mode 100644
    index 0000000..8452d5b
    --- /dev/null
    +++ b/libs/libusb/patches/004-no_unused.patch
    @@ -0,0 +1,11 @@
    +--- a/Makefile.am	2006-03-04 03:52:46.000000000 +0100
    ++++ b/Makefile.am	2011-02-03 12:59:22.261341559 +0100
    +@@ -4,7 +4,7 @@
    + # gnu strictness chokes on README being autogenerated
    + AUTOMAKE_OPTIONS = 1.4 foreign
    +
    +-SUBDIRS = . tests doc
    ++SUBDIRS = .
    +
    + AM_CFLAGS = -Werror
    +
    diff --git a/libs/libv4l/Makefile b/libs/libv4l/Makefile
    new file mode 100644
    index 0000000..368aff1
    --- /dev/null
    +++ b/libs/libv4l/Makefile
    @@ -0,0 +1,75 @@
    +# 
    +# Copyright (C) 2009 David Cooper 
    +# Copyright (C) 2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libv4l
    +PKG_VERSION:=0.6.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://people.atrpms.net/~hdegoede/
    +PKG_MD5SUM:=0d0d96d77c98871d2e5466c10cb30a0a
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libv4l
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Video 4 Linux wrapper libraries
    +  URL:=http://people.atrpms.net/~hdegoede/
    +  DEPENDS:=+libpthread @!LINUX_2_4
    +endef
    +
    +define Package/libv4l/description
    +  libv4l is a collection of libraries which adds a thin abstraction layer on
    +  top of video4linux2 devices. The purpose of this (thin) layer is to make it
    +  easy for application writers to support a wide variety of devices without
    +  having to write separate code for different devices in the same class. libv4l
    +  consists of 3 different libraries: libv4lconvert, libv4l1 and libv4l2.
    +
    +  libv4l1 offers the (deprecated) v4l1 API on top of v4l2 devices, independent
    +  of the drivers for those devices supporting v4l1 compatibility (which many
    +  v4l2 drivers do not).
    +
    +  libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the
    +  application transparent libv4lconvert conversion where necessary.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" PREFIX="/usr" \
    +		$(CONFIGURE_VARS) \
    +		all install
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" PREFIX="/usr" \
    +		$(CONFIGURE_VARS) \
    +		LINKTYPE="static" \
    +		all install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libv4l{1,2,convert}.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libv4l{1,2,convert}.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libv4l/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.so.* $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/libv4l
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l/v4l{1compat,2convert}.so $(1)/usr/lib/libv4l
    +endef
    +
    +$(eval $(call BuildPackage,libv4l))
    +
    diff --git a/libs/libv4l/patches/001-no-shm_open-fix.patch b/libs/libv4l/patches/001-no-shm_open-fix.patch
    new file mode 100644
    index 0000000..96b0628
    --- /dev/null
    +++ b/libs/libv4l/patches/001-no-shm_open-fix.patch
    @@ -0,0 +1,48 @@
    +--- a/libv4lconvert/control/libv4lcontrol.c
    ++++ b/libv4lconvert/control/libv4lcontrol.c
    +@@ -338,7 +338,7 @@ static void v4lcontrol_init_flags(struct
    + 
    + struct v4lcontrol_data *v4lcontrol_create(int fd, int always_needs_conversion)
    + {
    +-  int shm_fd;
    ++  int shm_fd, fdflags;
    +   int i, rc, init = 0;
    +   char *s, shm_name[256], pwd_buf[1024];
    +   struct v4l2_capability cap;
    +@@ -392,25 +392,31 @@ struct v4lcontrol_data *v4lcontrol_creat
    +   }
    + 
    +   if (getpwuid_r(geteuid(), &pwd, pwd_buf, sizeof(pwd_buf), &pwd_p) == 0) {
    +-    snprintf(shm_name, 256, "/libv4l-%s:%s:%s", pwd.pw_name,
    ++    snprintf(shm_name, 256, "/dev/shm/libv4l-%s:%s:%s", pwd.pw_name,
    + 	     cap.bus_info, cap.card);
    +   } else {
    +     perror("libv4lcontrol: error getting username using uid instead");
    +-    snprintf(shm_name, 256, "/libv4l-%lu:%s:%s", (unsigned long)geteuid(),
    ++    snprintf(shm_name, 256, "/dev/shm/libv4l-%lu:%s:%s", (unsigned long)geteuid(),
    + 	     cap.bus_info, cap.card);
    +   }
    + 
    +   /* / is not allowed inside shm names */
    +-  for (i = 1; shm_name[i]; i++)
    ++  for (i = 9; shm_name[i]; i++) /* start after "/dev/shm", i = 9 */
    +     if (shm_name[i] == '/')
    +       shm_name[i] = '-';
    + 
    +   /* Open the shared memory object identified by shm_name */
    +-  if ((shm_fd = shm_open(shm_name, (O_CREAT | O_EXCL | O_RDWR),
    ++  if ((shm_fd = open(shm_name, (O_CREAT | O_EXCL | O_RDWR),
    + 			 (S_IREAD | S_IWRITE))) >= 0)
    +     init = 1;
    +   else
    +-    shm_fd = shm_open(shm_name, O_RDWR, (S_IREAD | S_IWRITE));
    ++    shm_fd = open(shm_name, O_RDWR, (S_IREAD | S_IWRITE));
    ++
    ++  /* This is all uClibc > 0.9.30 seems to do for shm_open() in librt/shm.c */
    ++  fdflags = fcntl(shm_fd, F_GETFD, 0);
    ++  
    ++  if (fdflags >= 0)
    ++    fdflags = fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC);
    + 
    +   if (shm_fd >= 0) {
    +     /* Set the shared memory size */
    diff --git a/libs/libvncserver/Makefile b/libs/libvncserver/Makefile
    new file mode 100644
    index 0000000..d757248
    --- /dev/null
    +++ b/libs/libvncserver/Makefile
    @@ -0,0 +1,59 @@
    +#
    +# Copyright (C) 2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=LibVNCServer
    +PKG_VERSION:=0.9.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/libvncserver
    +PKG_MD5SUM:=14af5bdae461df4666c18e5f83c150c4
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +PKG_INSTALL=1
    +
    +define Package/libvncserver
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+zlib $(ICONV_DEPENDS)
    +  TITLE:=VNC Server Library
    +  URL:=http://libvncserver.sourceforge.net/
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--without-xkeyboard \
    +	--without-xinerama \
    +	--without-xrandr \
    +	--without-xfixes \
    +	--without-xdamage \
    +	--without-xtrap \
    +	--without-xrecord \
    +	--without-fbpm \
    +	--without-dpms \
    +	--without-filetransfer \
    +	--without-macosx-native \
    +	--without-ssl \
    +	--without-avahi
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/{lib,include,bin}
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
    +endef
    +
    +define Package/libvncserver/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libvncserver))
    diff --git a/libs/libvncserver/patches/001-automake-compat.patch b/libs/libvncserver/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..eb8de73
    --- /dev/null
    +++ b/libs/libvncserver/patches/001-automake-compat.patch
    @@ -0,0 +1,6426 @@
    +--- a/acinclude.m4
    ++++ b/acinclude.m4
    +@@ -601,6401 +601,3 @@ AS_VAR_POPDEF([_PKG])dnl
    + AS_VAR_POPDEF([_DEF])dnl
    + AS_VAR_POPDEF([_OUT])dnl
    + ],[PACKAGE="$PACKAGE"])])
    +-
    +-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
    +-## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
    +-## Free Software Foundation, Inc.
    +-## Originally 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.
    +-
    +-# serial 48 AC_PROG_LIBTOOL
    +-
    +-
    +-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
    +-# -----------------------------------------------------------
    +-# If this macro is not defined by Autoconf, define it here.
    +-m4_ifdef([AC_PROVIDE_IFELSE],
    +-         [],
    +-         [m4_define([AC_PROVIDE_IFELSE],
    +-	         [m4_ifdef([AC_PROVIDE_$1],
    +-		           [$2], [$3])])])
    +-
    +-
    +-# AC_PROG_LIBTOOL
    +-# ---------------
    +-AC_DEFUN([AC_PROG_LIBTOOL],
    +-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
    +-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
    +-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
    +-  AC_PROVIDE_IFELSE([AC_PROG_CXX],
    +-    [AC_LIBTOOL_CXX],
    +-    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
    +-  ])])
    +-dnl And a similar setup for Fortran 77 support
    +-  AC_PROVIDE_IFELSE([AC_PROG_F77],
    +-    [AC_LIBTOOL_F77],
    +-    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
    +-])])
    +-
    +-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
    +-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
    +-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
    +-  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
    +-    [AC_LIBTOOL_GCJ],
    +-    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
    +-      [AC_LIBTOOL_GCJ],
    +-      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
    +-	[AC_LIBTOOL_GCJ],
    +-      [ifdef([AC_PROG_GCJ],
    +-	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
    +-       ifdef([A][M_PROG_GCJ],
    +-	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
    +-       ifdef([LT_AC_PROG_GCJ],
    +-	     [define([LT_AC_PROG_GCJ],
    +-		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
    +-])])# AC_PROG_LIBTOOL
    +-
    +-
    +-# _AC_PROG_LIBTOOL
    +-# ----------------
    +-AC_DEFUN([_AC_PROG_LIBTOOL],
    +-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
    +-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
    +-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
    +-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
    +-
    +-# This can be used to rebuild libtool when needed
    +-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
    +-
    +-# Always use our own libtool.
    +-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
    +-AC_SUBST(LIBTOOL)dnl
    +-
    +-# Prevent multiple expansion
    +-define([AC_PROG_LIBTOOL], [])
    +-])# _AC_PROG_LIBTOOL
    +-
    +-
    +-# AC_LIBTOOL_SETUP
    +-# ----------------
    +-AC_DEFUN([AC_LIBTOOL_SETUP],
    +-[AC_PREREQ(2.50)dnl
    +-AC_REQUIRE([AC_ENABLE_SHARED])dnl
    +-AC_REQUIRE([AC_ENABLE_STATIC])dnl
    +-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
    +-AC_REQUIRE([AC_CANONICAL_HOST])dnl
    +-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
    +-AC_REQUIRE([AC_PROG_CC])dnl
    +-AC_REQUIRE([AC_PROG_LD])dnl
    +-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
    +-AC_REQUIRE([AC_PROG_NM])dnl
    +-
    +-AC_REQUIRE([AC_PROG_LN_S])dnl
    +-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
    +-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
    +-AC_REQUIRE([AC_OBJEXT])dnl
    +-AC_REQUIRE([AC_EXEEXT])dnl
    +-dnl
    +-
    +-AC_LIBTOOL_SYS_MAX_CMD_LEN
    +-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
    +-AC_LIBTOOL_OBJDIR
    +-
    +-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
    +-_LT_AC_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.
    +-Xsed='sed -e 1s/^X//'
    +-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
    +-
    +-# Same as above, but do not quote variable references.
    +-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
    +-
    +-# 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 avoid accidental globbing in evaled expressions
    +-no_glob_subst='s/\*/\\\*/g'
    +-
    +-# Constants:
    +-rm="rm -f"
    +-
    +-# Global variables:
    +-default_ofile=libtool
    +-can_build_shared=yes
    +-
    +-# All known linkers require a `.a' archive for static linking (except MSVC,
    +-# which needs '.lib').
    +-libext=a
    +-ltmain="$ac_aux_dir/ltmain.sh"
    +-ofile="$default_ofile"
    +-with_gnu_ld="$lt_cv_prog_gnu_ld"
    +-
    +-AC_CHECK_TOOL(AR, ar, false)
    +-AC_CHECK_TOOL(RANLIB, ranlib, :)
    +-AC_CHECK_TOOL(STRIP, strip, :)
    +-
    +-old_CC="$CC"
    +-old_CFLAGS="$CFLAGS"
    +-
    +-# Set sane defaults for various variables
    +-test -z "$AR" && AR=ar
    +-test -z "$AR_FLAGS" && AR_FLAGS=cru
    +-test -z "$AS" && AS=as
    +-test -z "$CC" && CC=cc
    +-test -z "$LTCC" && LTCC=$CC
    +-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
    +-test -z "$DLLTOOL" && DLLTOOL=dlltool
    +-test -z "$LD" && LD=ld
    +-test -z "$LN_S" && LN_S="ln -s"
    +-test -z "$MAGIC_CMD" && MAGIC_CMD=file
    +-test -z "$NM" && NM=nm
    +-test -z "$SED" && SED=sed
    +-test -z "$OBJDUMP" && OBJDUMP=objdump
    +-test -z "$RANLIB" && RANLIB=:
    +-test -z "$STRIP" && STRIP=:
    +-test -z "$ac_objext" && ac_objext=o
    +-
    +-# Determine commands to create old-style static archives.
    +-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
    +-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_CC_BASENAME([$compiler])
    +-
    +-# Only perform the check for file, if the check method requires it
    +-case $deplibs_check_method in
    +-file_magic*)
    +-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
    +-    AC_PATH_MAGIC
    +-  fi
    +-  ;;
    +-esac
    +-
    +-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
    +-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
    +-enable_win32_dll=yes, enable_win32_dll=no)
    +-
    +-AC_ARG_ENABLE([libtool-lock],
    +-    [AC_HELP_STRING([--disable-libtool-lock],
    +-	[avoid locking (might break parallel builds)])])
    +-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
    +-
    +-AC_ARG_WITH([pic],
    +-    [AC_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=default
    +-
    +-# Use C for the default configuration in the libtool script
    +-tagname=
    +-AC_LIBTOOL_LANG_C_CONFIG
    +-_LT_AC_TAGCONFIG
    +-])# AC_LIBTOOL_SETUP
    +-
    +-
    +-# _LT_AC_SYS_COMPILER
    +-# -------------------
    +-AC_DEFUN([_LT_AC_SYS_COMPILER],
    +-[AC_REQUIRE([AC_PROG_CC])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_AC_SYS_COMPILER
    +-
    +-
    +-# _LT_CC_BASENAME(CC)
    +-# -------------------
    +-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
    +-AC_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_COMPILER_BOILERPLATE
    +-# ------------------------
    +-# Check for compiler boilerplate output or warnings with
    +-# the simple compiler test code.
    +-AC_DEFUN([_LT_COMPILER_BOILERPLATE],
    +-[ac_outfile=conftest.$ac_objext
    +-printf "$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.
    +-AC_DEFUN([_LT_LINKER_BOILERPLATE],
    +-[ac_outfile=conftest.$ac_objext
    +-printf "$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 conftest*
    +-])# _LT_LINKER_BOILERPLATE
    +-
    +-
    +-# _LT_AC_SYS_LIBPATH_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.
    +-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
    +-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
    +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
    +-}'`
    +-# 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 '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
    +-}'`; fi],[])
    +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
    +-])# _LT_AC_SYS_LIBPATH_AIX
    +-
    +-
    +-# _LT_AC_SHELL_INIT(ARG)
    +-# ----------------------
    +-AC_DEFUN([_LT_AC_SHELL_INIT],
    +-[ifdef([AC_DIVERSION_NOTICE],
    +-	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
    +-	 [AC_DIVERT_PUSH(NOTICE)])
    +-$1
    +-AC_DIVERT_POP
    +-])# _LT_AC_SHELL_INIT
    +-
    +-
    +-# _LT_AC_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.
    +-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
    +-[_LT_AC_SHELL_INIT([
    +-# Check that we are running under the correct shell.
    +-SHELL=${CONFIG_SHELL-/bin/sh}
    +-
    +-case X$ECHO in
    +-X*--fallback-echo)
    +-  # Remove one level of quotation (which was required for Make).
    +-  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
    +-  ;;
    +-esac
    +-
    +-echo=${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 </dev/null 2>&1 && unset CDPATH
    +-
    +-if test -z "$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 &&
    +-       echo_test_string=`eval $cmd` &&
    +-       (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.
    +-ECHO=$echo
    +-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
    +-   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
    +-fi
    +-
    +-AC_SUBST(ECHO)
    +-])])# _LT_AC_PROG_ECHO_BACKSLASH
    +-
    +-
    +-# _LT_AC_LOCK
    +-# -----------
    +-AC_DEFUN([_LT_AC_LOCK],
    +-[AC_ARG_ENABLE([libtool-lock],
    +-    [AC_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-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|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-*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-*linux*)
    +-          LD="${LD-ld} -m elf_x86_64"
    +-          ;;
    +-        ppc*-*linux*|powerpc*-*linux*)
    +-          LD="${LD-ld} -m elf64ppc"
    +-          ;;
    +-        s390*-*linux*)
    +-          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_TRY_LINK([],[],[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" ;;
    +-      *)    LD="${LD-ld} -64" ;;
    +-      esac
    +-      ;;
    +-    esac
    +-  fi
    +-  rm -rf conftest*
    +-  ;;
    +-
    +-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
    +-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
    +-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
    +-  AC_CHECK_TOOL(AS, as, false)
    +-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
    +-  ;;
    +-  ])
    +-esac
    +-
    +-need_locks="$enable_libtool_lock"
    +-
    +-])# _LT_AC_LOCK
    +-
    +-
    +-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
    +-#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
    +-# ----------------------------------------------------------------
    +-# Check whether the given compiler option works
    +-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
    +-[AC_REQUIRE([LT_AC_PROG_SED])
    +-AC_CACHE_CHECK([$1], [$2],
    +-  [$2=no
    +-  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
    +-   printf "$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
    +-    ifelse([$5], , :, [$5])
    +-else
    +-    ifelse([$6], , :, [$6])
    +-fi
    +-])# AC_LIBTOOL_COMPILER_OPTION
    +-
    +-
    +-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
    +-#                          [ACTION-SUCCESS], [ACTION-FAILURE])
    +-# ------------------------------------------------------------
    +-# Check whether the given compiler option works
    +-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
    +-[AC_CACHE_CHECK([$1], [$2],
    +-  [$2=no
    +-   save_LDFLAGS="$LDFLAGS"
    +-   LDFLAGS="$LDFLAGS $3"
    +-   printf "$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 conftest*
    +-   LDFLAGS="$save_LDFLAGS"
    +-])
    +-
    +-if test x"[$]$2" = xyes; then
    +-    ifelse([$4], , :, [$4])
    +-else
    +-    ifelse([$5], , :, [$5])
    +-fi
    +-])# AC_LIBTOOL_LINKER_OPTION
    +-
    +-
    +-# AC_LIBTOOL_SYS_MAX_CMD_LEN
    +-# --------------------------
    +-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
    +-[# 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*)
    +-    # 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
    +-    ;;
    +-  *)
    +-    # 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.
    +-    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
    +-    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
    +-	       = "XX$teststring") >/dev/null 2>&1 &&
    +-	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
    +-	    lt_cv_sys_max_cmd_len=$new_result &&
    +-	    test $i != 17 # 1/2 MB should be enough
    +-    do
    +-      i=`expr $i + 1`
    +-      teststring=$teststring$teststring
    +-    done
    +-    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`
    +-    ;;
    +-  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
    +-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
    +-
    +-
    +-# _LT_AC_CHECK_DLFCN
    +-# ------------------
    +-AC_DEFUN([_LT_AC_CHECK_DLFCN],
    +-[AC_CHECK_HEADERS(dlfcn.h)dnl
    +-])# _LT_AC_CHECK_DLFCN
    +-
    +-
    +-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
    +-#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
    +-# ---------------------------------------------------------------------
    +-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
    +-[AC_REQUIRE([_LT_AC_CHECK_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 <
    +-#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
    +-
    +-#ifdef __cplusplus
    +-extern "C" void exit (int);
    +-#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 ());
    +-
    +-    exit (status);
    +-}]
    +-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_AC_TRY_DLOPEN_SELF
    +-
    +-
    +-# AC_LIBTOOL_DLOPEN_SELF
    +-# ----------------------
    +-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
    +-[AC_REQUIRE([_LT_AC_CHECK_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*)
    +-    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="-dld"],
    +-	[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="-dld"])
    +-	      ])
    +-	    ])
    +-	  ])
    +-	])
    +-      ])
    +-    ;;
    +-  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_AC_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_AC_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
    +-])# AC_LIBTOOL_DLOPEN_SELF
    +-
    +-
    +-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
    +-# ---------------------------------
    +-# Check to see if options -c and -o are simultaneously supported by compiler
    +-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
    +-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
    +-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    +-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
    +-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
    +-   $rm -r conftest 2>/dev/null
    +-   mkdir conftest
    +-   cd conftest
    +-   mkdir out
    +-   printf "$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_AC_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 ..
    +-   rmdir conftest
    +-   $rm conftest*
    +-])
    +-])# AC_LIBTOOL_PROG_CC_C_O
    +-
    +-
    +-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
    +-# -----------------------------------------
    +-# Check to see if we can do hard links to lock some files if needed
    +-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
    +-[AC_REQUIRE([_LT_AC_LOCK])dnl
    +-
    +-hard_links="nottested"
    +-if test "$_LT_AC_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
    +-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
    +-
    +-
    +-# AC_LIBTOOL_OBJDIR
    +-# -----------------
    +-AC_DEFUN([AC_LIBTOOL_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
    +-])# AC_LIBTOOL_OBJDIR
    +-
    +-
    +-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
    +-# ----------------------------------------------
    +-# Check hardcoding attributes.
    +-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
    +-[AC_MSG_CHECKING([how to hardcode library paths into programs])
    +-_LT_AC_TAGVAR(hardcode_action, $1)=
    +-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
    +-   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
    +-   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
    +-
    +-  # We can hardcode non-existant directories.
    +-  if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
    +-     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
    +-    # Linking always hardcodes the temporary library directory.
    +-    _LT_AC_TAGVAR(hardcode_action, $1)=relink
    +-  else
    +-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
    +-    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
    +-  fi
    +-else
    +-  # We cannot hardcode anything, or else we can only hardcode existing
    +-  # directories.
    +-  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
    +-fi
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
    +-
    +-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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
    +-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
    +-
    +-
    +-# AC_LIBTOOL_SYS_LIB_STRIP
    +-# ------------------------
    +-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
    +-[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"
    +-         AC_MSG_RESULT([yes])
    +-       else
    +-  AC_MSG_RESULT([no])
    +-fi
    +-       ;;
    +-   *)
    +-  AC_MSG_RESULT([no])
    +-    ;;
    +-  esac
    +-fi
    +-])# AC_LIBTOOL_SYS_LIB_STRIP
    +-
    +-
    +-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
    +-# -----------------------------
    +-# PORTME Fill in your ld.so characteristics
    +-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
    +-[AC_MSG_CHECKING([dynamic linker characteristics])
    +-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"
    +-if test "$GCC" = yes; then
    +-  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 ';' >/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.
    +-    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
    +-else
    +-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
    +-fi
    +-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'
    +-  ;;
    +-
    +-aix4* | aix5*)
    +-  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*)
    +-  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'
    +-  ;;
    +-
    +-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*)
    +-  version_type=windows
    +-  shrext_cmds=".dll"
    +-  need_version=no
    +-  need_lib_prefix=no
    +-
    +-  case $GCC,$host_os in
    +-  yes,cygwin* | yes,mingw* | yes,pw32*)
    +-    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'
    +-    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*)
    +-      # 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}${versuffix}$shared_ext ${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`'
    +-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
    +-  if test "$GCC" = yes; then
    +-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
    +-  else
    +-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
    +-  fi
    +-  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
    +-  ;;
    +-
    +-kfreebsd*-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='GNU ld.so'
    +-  ;;
    +-
    +-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
    +-  version_type=freebsd-$objformat
    +-  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
    +-      ;;
    +-  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
    +-    ;;
    +-  freebsd*) # from 4.6 on
    +-    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'
    +-  ;;
    +-
    +-interix3*)
    +-  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*)
    +-  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
    +-  # 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)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;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'
    +-  ;;
    +-
    +-knetbsd*-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='GNU 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=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
    +-  ;;
    +-
    +-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"
    +-  ;;
    +-
    +-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
    +-      export_dynamic_flag_spec='${wl}-Blargedynsym'
    +-      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
    +-  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'
    +-    shlibpath_overrides_runpath=no
    +-  else
    +-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
    +-    shlibpath_overrides_runpath=yes
    +-    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'
    +-  ;;
    +-
    +-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
    +-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
    +-
    +-
    +-# _LT_AC_TAGCONFIG
    +-# ----------------
    +-AC_DEFUN([_LT_AC_TAGCONFIG],
    +-[AC_ARG_WITH([tags],
    +-    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
    +-        [include additional configurations @<:@automatic@:>@])],
    +-    [tagnames="$withval"])
    +-
    +-if test -f "$ltmain" && test -n "$tagnames"; then
    +-  if test ! -f "${ofile}"; then
    +-    AC_MSG_WARN([output file `$ofile' does not exist])
    +-  fi
    +-
    +-  if test -z "$LTCC"; then
    +-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
    +-    if test -z "$LTCC"; then
    +-      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
    +-    else
    +-      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
    +-    fi
    +-  fi
    +-  if test -z "$LTCFLAGS"; then
    +-    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
    +-  fi
    +-
    +-  # Extract list of available tagged configurations in $ofile.
    +-  # Note that this assumes the entire list is on one line.
    +-  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
    +-
    +-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
    +-  for tagname in $tagnames; do
    +-    IFS="$lt_save_ifs"
    +-    # Check whether tagname contains only valid characters
    +-    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
    +-    "") ;;
    +-    *)  AC_MSG_ERROR([invalid tag name: $tagname])
    +-	;;
    +-    esac
    +-
    +-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
    +-    then
    +-      AC_MSG_ERROR([tag name \"$tagname\" already exists])
    +-    fi
    +-
    +-    # Update the list of available tags.
    +-    if test -n "$tagname"; then
    +-      echo appending configuration tag \"$tagname\" to $ofile
    +-
    +-      case $tagname in
    +-      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_LIBTOOL_LANG_CXX_CONFIG
    +-	else
    +-	  tagname=""
    +-	fi
    +-	;;
    +-
    +-      F77)
    +-	if test -n "$F77" && test "X$F77" != "Xno"; then
    +-	  AC_LIBTOOL_LANG_F77_CONFIG
    +-	else
    +-	  tagname=""
    +-	fi
    +-	;;
    +-
    +-      GCJ)
    +-	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
    +-	  AC_LIBTOOL_LANG_GCJ_CONFIG
    +-	else
    +-	  tagname=""
    +-	fi
    +-	;;
    +-
    +-      RC)
    +-	AC_LIBTOOL_LANG_RC_CONFIG
    +-	;;
    +-
    +-      *)
    +-	AC_MSG_ERROR([Unsupported tag name: $tagname])
    +-	;;
    +-      esac
    +-
    +-      # Append the new tag name to the list of available tags.
    +-      if test -n "$tagname" ; then
    +-      available_tags="$available_tags $tagname"
    +-    fi
    +-    fi
    +-  done
    +-  IFS="$lt_save_ifs"
    +-
    +-  # Now substitute the updated list of available tags.
    +-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
    +-    mv "${ofile}T" "$ofile"
    +-    chmod +x "$ofile"
    +-  else
    +-    rm -f "${ofile}T"
    +-    AC_MSG_ERROR([unable to update list of available tagged configurations.])
    +-  fi
    +-fi
    +-])# _LT_AC_TAGCONFIG
    +-
    +-
    +-# AC_LIBTOOL_DLOPEN
    +-# -----------------
    +-# enable checks for dlopen support
    +-AC_DEFUN([AC_LIBTOOL_DLOPEN],
    +- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
    +-])# AC_LIBTOOL_DLOPEN
    +-
    +-
    +-# AC_LIBTOOL_WIN32_DLL
    +-# --------------------
    +-# declare package support for building win32 DLLs
    +-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
    +-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
    +-])# AC_LIBTOOL_WIN32_DLL
    +-
    +-
    +-# AC_ENABLE_SHARED([DEFAULT])
    +-# ---------------------------
    +-# implement the --enable-shared flag
    +-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
    +-AC_DEFUN([AC_ENABLE_SHARED],
    +-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
    +-AC_ARG_ENABLE([shared],
    +-    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
    +-	[build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT)
    +-])# AC_ENABLE_SHARED
    +-
    +-
    +-# AC_DISABLE_SHARED
    +-# -----------------
    +-# set the default shared flag to --disable-shared
    +-AC_DEFUN([AC_DISABLE_SHARED],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-AC_ENABLE_SHARED(no)
    +-])# AC_DISABLE_SHARED
    +-
    +-
    +-# AC_ENABLE_STATIC([DEFAULT])
    +-# ---------------------------
    +-# implement the --enable-static flag
    +-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
    +-AC_DEFUN([AC_ENABLE_STATIC],
    +-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
    +-AC_ARG_ENABLE([static],
    +-    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
    +-	[build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT)
    +-])# AC_ENABLE_STATIC
    +-
    +-
    +-# AC_DISABLE_STATIC
    +-# -----------------
    +-# set the default static flag to --disable-static
    +-AC_DEFUN([AC_DISABLE_STATIC],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-AC_ENABLE_STATIC(no)
    +-])# AC_DISABLE_STATIC
    +-
    +-
    +-# AC_ENABLE_FAST_INSTALL([DEFAULT])
    +-# ---------------------------------
    +-# implement the --enable-fast-install flag
    +-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
    +-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
    +-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
    +-AC_ARG_ENABLE([fast-install],
    +-    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
    +-    [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT)
    +-])# AC_ENABLE_FAST_INSTALL
    +-
    +-
    +-# AC_DISABLE_FAST_INSTALL
    +-# -----------------------
    +-# set the default to --disable-fast-install
    +-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-AC_ENABLE_FAST_INSTALL(no)
    +-])# AC_DISABLE_FAST_INSTALL
    +-
    +-
    +-# AC_LIBTOOL_PICMODE([MODE])
    +-# --------------------------
    +-# implement the --with-pic flag
    +-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
    +-AC_DEFUN([AC_LIBTOOL_PICMODE],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-pic_mode=ifelse($#,1,$1,default)
    +-])# AC_LIBTOOL_PICMODE
    +-
    +-
    +-# AC_PROG_EGREP
    +-# -------------
    +-# This is predefined starting with Autoconf 2.54, so this conditional
    +-# definition can be removed once we require Autoconf 2.54 or later.
    +-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
    +-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
    +-   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
    +-    then ac_cv_prog_egrep='grep -E'
    +-    else ac_cv_prog_egrep='egrep'
    +-    fi])
    +- EGREP=$ac_cv_prog_egrep
    +- AC_SUBST([EGREP])
    +-])])
    +-
    +-
    +-# AC_PATH_TOOL_PREFIX
    +-# -------------------
    +-# find a file program which can recognise shared library
    +-AC_DEFUN([AC_PATH_TOOL_PREFIX],
    +-[AC_REQUIRE([AC_PROG_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="ifelse([$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 <&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
    +-
    +-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
    +-])# AC_PATH_TOOL_PREFIX
    +-
    +-
    +-# AC_PATH_MAGIC
    +-# -------------
    +-# find a file program which can recognise a shared library
    +-AC_DEFUN([AC_PATH_MAGIC],
    +-[AC_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
    +-    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
    +-  else
    +-    MAGIC_CMD=:
    +-  fi
    +-fi
    +-])# AC_PATH_MAGIC
    +-
    +-
    +-# AC_PROG_LD
    +-# ----------
    +-# find the pathname to the GNU or non-GNU linker
    +-AC_DEFUN([AC_PROG_LD],
    +-[AC_ARG_WITH([gnu-ld],
    +-    [AC_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])
    +-AC_REQUIRE([LT_AC_PROG_SED])dnl
    +-AC_REQUIRE([AC_PROG_CC])dnl
    +-AC_REQUIRE([AC_CANONICAL_HOST])dnl
    +-AC_REQUIRE([AC_CANONICAL_BUILD])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; 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
    +-  ;;
    +-
    +-interix3*)
    +-  # 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*)
    +-  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=unknown
    +-  ;;
    +-
    +-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
    +-  ;;
    +-
    +-solaris*)
    +-  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
    +-  ;;
    +-
    +-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
    +-  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
    +-])# AC_DEPLIBS_CHECK_METHOD
    +-
    +-
    +-# AC_PROG_NM
    +-# ----------
    +-# find the pathname to a BSD-compatible name lister
    +-AC_DEFUN([AC_PROG_NM],
    +-[AC_CACHE_CHECK([for BSD-compatible 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
    +-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
    +-fi])
    +-NM="$lt_cv_path_NM"
    +-])# AC_PROG_NM
    +-
    +-
    +-# AC_CHECK_LIBM
    +-# -------------
    +-# check for math library
    +-AC_DEFUN([AC_CHECK_LIBM],
    +-[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_CHECK_LIBM
    +-
    +-
    +-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
    +-# -----------------------------------
    +-# sets LIBLTDL to the link flags for the libltdl convenience library and
    +-# LTDLINCL to the include flags for the libltdl header and adds
    +-# --enable-ltdl-convenience to the configure arguments.  Note that
    +-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
    +-# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
    +-# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
    +-# (note the single quotes!).  If your package is not flat and you're not
    +-# using automake, define top_builddir and top_srcdir appropriately in
    +-# the Makefiles.
    +-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-  case $enable_ltdl_convenience in
    +-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
    +-  "") enable_ltdl_convenience=yes
    +-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
    +-  esac
    +-  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
    +-  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
    +-  # For backwards non-gettext consistent compatibility...
    +-  INCLTDL="$LTDLINCL"
    +-])# AC_LIBLTDL_CONVENIENCE
    +-
    +-
    +-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
    +-# -----------------------------------
    +-# sets LIBLTDL to the link flags for the libltdl installable library and
    +-# LTDLINCL to the include flags for the libltdl header and adds
    +-# --enable-ltdl-install to the configure arguments.  Note that
    +-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
    +-# and an installed libltdl is not found, it is assumed to be `libltdl'.
    +-# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
    +-# '${top_srcdir}/' (note the single quotes!).  If your package is not
    +-# flat and you're not using automake, define top_builddir and top_srcdir
    +-# appropriately in the Makefiles.
    +-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
    +-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-  AC_CHECK_LIB(ltdl, lt_dlinit,
    +-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
    +-  [if test x"$enable_ltdl_install" = xno; then
    +-     AC_MSG_WARN([libltdl not installed, but installation disabled])
    +-   else
    +-     enable_ltdl_install=yes
    +-   fi
    +-  ])
    +-  if test x"$enable_ltdl_install" = x"yes"; then
    +-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
    +-    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
    +-    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
    +-  else
    +-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
    +-    LIBLTDL="-lltdl"
    +-    LTDLINCL=
    +-  fi
    +-  # For backwards non-gettext consistent compatibility...
    +-  INCLTDL="$LTDLINCL"
    +-])# AC_LIBLTDL_INSTALLABLE
    +-
    +-
    +-# AC_LIBTOOL_CXX
    +-# --------------
    +-# enable support for C++ libraries
    +-AC_DEFUN([AC_LIBTOOL_CXX],
    +-[AC_REQUIRE([_LT_AC_LANG_CXX])
    +-])# AC_LIBTOOL_CXX
    +-
    +-
    +-# _LT_AC_LANG_CXX
    +-# ---------------
    +-AC_DEFUN([_LT_AC_LANG_CXX],
    +-[AC_REQUIRE([AC_PROG_CXX])
    +-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
    +-])# _LT_AC_LANG_CXX
    +-
    +-# _LT_AC_PROG_CXXCPP
    +-# ------------------
    +-AC_DEFUN([_LT_AC_PROG_CXXCPP],
    +-[
    +-AC_REQUIRE([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
    +-fi
    +-])# _LT_AC_PROG_CXXCPP
    +-
    +-# AC_LIBTOOL_F77
    +-# --------------
    +-# enable support for Fortran 77 libraries
    +-AC_DEFUN([AC_LIBTOOL_F77],
    +-[AC_REQUIRE([_LT_AC_LANG_F77])
    +-])# AC_LIBTOOL_F77
    +-
    +-
    +-# _LT_AC_LANG_F77
    +-# ---------------
    +-AC_DEFUN([_LT_AC_LANG_F77],
    +-[AC_REQUIRE([AC_PROG_F77])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
    +-])# _LT_AC_LANG_F77
    +-
    +-
    +-# AC_LIBTOOL_GCJ
    +-# --------------
    +-# enable support for GCJ libraries
    +-AC_DEFUN([AC_LIBTOOL_GCJ],
    +-[AC_REQUIRE([_LT_AC_LANG_GCJ])
    +-])# AC_LIBTOOL_GCJ
    +-
    +-
    +-# _LT_AC_LANG_GCJ
    +-# ---------------
    +-AC_DEFUN([_LT_AC_LANG_GCJ],
    +-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
    +-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
    +-    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
    +-      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
    +-	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
    +-	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
    +-])# _LT_AC_LANG_GCJ
    +-
    +-
    +-# AC_LIBTOOL_RC
    +-# -------------
    +-# enable support for Windows resource files
    +-AC_DEFUN([AC_LIBTOOL_RC],
    +-[AC_REQUIRE([LT_AC_PROG_RC])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
    +-])# AC_LIBTOOL_RC
    +-
    +-
    +-# AC_LIBTOOL_LANG_C_CONFIG
    +-# ------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
    +-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
    +-[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_AC_TAGVAR(objext, $1)=$objext
    +-
    +-# Code to be used in simple compile tests
    +-lt_simple_compile_test_code="int some_variable = 0;\n"
    +-
    +-# Code to be used in simple link tests
    +-lt_simple_link_test_code='int main(){return(0);}\n'
    +-
    +-_LT_AC_SYS_COMPILER
    +-
    +-# 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...
    +-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    +-AC_LIBTOOL_SYS_LIB_STRIP
    +-AC_LIBTOOL_DLOPEN_SELF
    +-
    +-# 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
    +-  ;;
    +-
    +-aix4* | aix5*)
    +-  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])
    +-
    +-AC_LIBTOOL_CONFIG($1)
    +-
    +-AC_LANG_POP
    +-CC="$lt_save_CC"
    +-])# AC_LIBTOOL_LANG_C_CONFIG
    +-
    +-
    +-# AC_LIBTOOL_LANG_CXX_CONFIG
    +-# --------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
    +-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
    +-[AC_LANG_PUSH(C++)
    +-AC_REQUIRE([AC_PROG_CXX])
    +-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
    +-
    +-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
    +-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
    +-_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
    +-_LT_AC_TAGVAR(module_cmds, $1)=
    +-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
    +-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
    +-_LT_AC_TAGVAR(no_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
    +-
    +-# Dependencies to place before and after the object being linked:
    +-_LT_AC_TAGVAR(predep_objects, $1)=
    +-_LT_AC_TAGVAR(postdep_objects, $1)=
    +-_LT_AC_TAGVAR(predeps, $1)=
    +-_LT_AC_TAGVAR(postdeps, $1)=
    +-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
    +-
    +-# Source file extension for C++ test sources.
    +-ac_ext=cpp
    +-
    +-# Object file extension for compiled C++ test sources.
    +-objext=o
    +-_LT_AC_TAGVAR(objext, $1)=$objext
    +-
    +-# Code to be used in simple compile tests
    +-lt_simple_compile_test_code="int some_variable = 0;\n"
    +-
    +-# Code to be used in simple link tests
    +-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
    +-
    +-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
    +-_LT_AC_SYS_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_AC_TAGVAR(compiler, $1)=$CC
    +-_LT_CC_BASENAME([$compiler])
    +-
    +-# We don't want -fno-exception wen compiling C++ code, so set the
    +-# no_builtin_flag separately
    +-if test "$GXX" = yes; then
    +-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
    +-else
    +-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
    +-fi
    +-
    +-if test "$GXX" = yes; then
    +-  # Set up default GNU C++ configuration
    +-
    +-  AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-    _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
    +-    _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
    +-    else
    +-      _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=yes
    +-case $host_os in
    +-  aix3*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  aix4* | aix5*)
    +-    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]].*|aix5*)
    +-	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_AC_TAGVAR(archive_cmds, $1)=''
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-
    +-    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
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	else
    +-	  # We have old collect2
    +-	  _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-	  _LT_AC_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
    +-
    +-    # It seems that -bexpall does not export symbols beginning with
    +-    # underscore (_), so it is better to generate a list of symbols to export.
    +-    _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
    +-      # Determine the default libpath from the value encoded in an empty executable.
    +-      _LT_AC_SYS_LIBPATH_AIX
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
    +-
    +-      _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
    +-     else
    +-      if test "$host_cpu" = ia64; then
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
    +-	_LT_AC_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_AC_SYS_LIBPATH_AIX
    +-	_LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
    +-	# Exported symbols can be pulled into shared objects from archives
    +-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
    +-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-	# This is similar to how AIX traditionally builds its shared libraries.
    +-	_LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      # Joseph Beckenbach  says some releases of gcc
    +-      # support --undefined.  This deserves some investigation.  FIXME
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-    else
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    fi
    +-    ;;
    +-
    +-  chorus*)
    +-    case $cc_basename in
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    +-
    +-  cygwin* | mingw* | pw32*)
    +-    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
    +-    # as there is no search path for DLLs.
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-    _LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
    +-
    +-    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
    +-      _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-    fi
    +-  ;;
    +-      darwin* | rhapsody*)
    +-        case $host_os in
    +-        rhapsody* | darwin1.[[012]])
    +-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
    +-         ;;
    +-       *) # Darwin 1.3 on
    +-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
    +-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-         else
    +-           case ${MACOSX_DEPLOYMENT_TARGET} in
    +-             10.[[012]])
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-               ;;
    +-             10.*)
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
    +-               ;;
    +-           esac
    +-         fi
    +-         ;;
    +-        esac
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-
    +-    if test "$GXX" = yes ; then
    +-      lt_int_apple_cc_single_mod=no
    +-      output_verbose_link_cmd='echo'
    +-      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
    +-       lt_int_apple_cc_single_mod=yes
    +-      fi
    +-      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
    +-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
    +-      else
    +-          _LT_AC_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'
    +-        fi
    +-        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
    +-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          else
    +-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          fi
    +-            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-      else
    +-      case $cc_basename in
    +-        xlc*)
    +-         output_verbose_link_cmd='echo'
    +-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
    +-          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          ;;
    +-       *)
    +-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-          ;;
    +-      esac
    +-      fi
    +-        ;;
    +-
    +-  dgux*)
    +-    case $cc_basename in
    +-      ec++*)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      ghcx*)
    +-	# Green Hills C++ Compiler
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    +-  freebsd[[12]]*)
    +-    # C++ shared libraries reported to be fairly broken before switch to ELF
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  freebsd-elf*)
    +-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-    ;;
    +-  freebsd* | kfreebsd*-gnu | dragonfly*)
    +-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
    +-    # conventions
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
    +-    ;;
    +-  gnu*)
    +-    ;;
    +-  hpux9*)
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-    _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    +-    aCC*)
    +-      _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
    +-      ;;
    +-    *)
    +-      if test "$GXX" = yes; then
    +-        _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-    esac
    +-    ;;
    +-  hpux10*|hpux11*)
    +-    if test $with_gnu_ld = no; then
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-      case $host_cpu in
    +-      hppa*64*|ia64*)
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
    +-        ;;
    +-      *)
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-        ;;
    +-      esac
    +-    fi
    +-    case $host_cpu in
    +-    hppa*64*|ia64*)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-    *)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      aCC*)
    +-	case $host_cpu in
    +-	hppa*64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	  ;;
    +-	ia64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	  ;;
    +-	*)
    +-	  _LT_AC_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 $list'
    +-	;;
    +-      *)
    +-	if test "$GXX" = yes; then
    +-	  if test $with_gnu_ld = no; then
    +-	    case $host_cpu in
    +-	    hppa*64*)
    +-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	      ;;
    +-	    ia64*)
    +-	      _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  interix3*)
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-    _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-	  else
    +-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
    +-	  fi
    +-	fi
    +-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-	;;
    +-    esac
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-    ;;
    +-  linux*)
    +-    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_AC_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_AC_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 $list'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
    +-	_LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
    +-	;;
    +-      icpc*)
    +-	# 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-  	  _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	  _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
    +-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
    +-	;;
    +-      pgCC*)
    +-        # Portland Group C++ compiler
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
    +-  	_LT_AC_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'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
    +-	_LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
    +-	_LT_AC_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 $templist | $SED "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 $list'
    +-	;;
    +-    esac
    +-    ;;
    +-  lynxos*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  m88k*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  mvs*)
    +-    case $cc_basename in
    +-      cxx*)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    +-  netbsd*)
    +-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
    +-      wlarc=
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_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::"'
    +-    ;;
    +-  openbsd2*)
    +-    # C++ shared libraries are fairly broken
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  openbsd*)
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
    +-    _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
    +-    fi
    +-    output_verbose_link_cmd='echo'
    +-    ;;
    +-  osf3*)
    +-    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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-	# Archives containing C++ object files must be created using
    +-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
    +-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
    +-
    +-	;;
    +-      RCC*)
    +-	# Rational C++ 2.4.1
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      cxx*)
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-	_LT_AC_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 $templist | $SED "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 $list'
    +-	;;
    +-      *)
    +-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	  _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-	  _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-	# Archives containing C++ object files must be created using
    +-	# the KAI C++ compiler.
    +-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
    +-	;;
    +-      RCC*)
    +-	# Rational C++ 2.4.1
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      cxx*)
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_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 -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
    +-	  $rm $lib.exp'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
    +-	_LT_AC_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 $templist | $SED "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 $list'
    +-	;;
    +-      *)
    +-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	 _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-	  _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  psos*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  sunos4*)
    +-    case $cc_basename in
    +-      CC*)
    +-	# Sun C++ 4.x
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      lcc*)
    +-	# Lucid
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    +-  solaris*)
    +-    case $cc_basename in
    +-      CC*)
    +-	# Sun C++ 4.2, 5.x and Centerline C++
    +-        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
    +-	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	_LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-	case $host_os in
    +-	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
    +-	  *)
    +-	    # The C++ compiler is used as linker so we must use $wl
    +-	    # flag to pass the commands to the underlying system
    +-	    # linker. We must also pass each convience library through
    +-	    # to the system linker between allextract/defaultextract.
    +-	    # The C++ compiler will combine linker options so we
    +-	    # cannot just pass the convience library names through
    +-	    # without $wl.
    +-	    # Supported since Solaris 2.6 (maybe 2.5.1?)
    +-	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
    +-	    ;;
    +-	esac
    +-	_LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
    +-	;;
    +-      gcx*)
    +-	# Green Hills C++ Compiler
    +-	_LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
    +-	  if $CC --version | grep -v '^2\.7' > /dev/null; then
    +-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
    +-	    _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
    +-	    _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
    +-    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    runpath_var='LD_RUN_PATH'
    +-
    +-    case $cc_basename in
    +-      CC*)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_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.
    +-    # 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.
    +-    # So that behaviour is only enabled if SCOABSPATH is set to a
    +-    # non-empty value in the environment.  Most likely only useful for
    +-    # creating official distributions of packages.
    +-    # This is a hack until libtool officially supports absolute path
    +-    # names for shared libraries.
    +-    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
    +-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
    +-    runpath_var='LD_RUN_PATH'
    +-
    +-    case $cc_basename in
    +-      CC*)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    +-  vxworks*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  *)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-esac
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
    +-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
    +-
    +-_LT_AC_TAGVAR(GCC, $1)="$GXX"
    +-_LT_AC_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...
    +-AC_LIBTOOL_POSTDEP_PREDEP($1)
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    +-
    +-AC_LIBTOOL_CONFIG($1)
    +-
    +-AC_LANG_POP
    +-CC=$lt_save_CC
    +-LDCXX=$LD
    +-LD=$lt_save_LD
    +-GCC=$lt_save_GCC
    +-with_gnu_ldcxx=$with_gnu_ld
    +-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
    +-])# AC_LIBTOOL_LANG_CXX_CONFIG
    +-
    +-# AC_LIBTOOL_POSTDEP_PREDEP([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.
    +-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
    +-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...
    +-ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile"
    +-ifelse([$1], [],
    +-[#! $SHELL
    +-
    +-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
    +-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
    +-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
    +-#
    +-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
    +-# Free Software Foundation, Inc.
    +-#
    +-# This file is part of GNU Libtool:
    +-# Originally by Gordon Matzigkeit , 1996
    +-#
    +-# This program is free software; you can redistribute it and/or modify
    +-# it under the terms of the GNU General Public License as published by
    +-# the Free Software Foundation; either version 2 of the License, or
    +-# (at your option) any later version.
    +-#
    +-# This program is distributed in the hope that it will be useful, but
    +-# WITHOUT ANY WARRANTY; without even the implied warranty of
    +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +-# General Public License for more details.
    +-#
    +-# You should have received a copy of the GNU General Public License
    +-# along with this program; if not, write to the Free Software
    +-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    +-#
    +-# As a special exception to the GNU General Public License, if you
    +-# distribute this file as part of a program that contains a
    +-# configuration script generated by Autoconf, you may include it under
    +-# the same distribution terms that you use for the rest of that program.
    +-
    +-# A sed program that does not truncate output.
    +-SED=$lt_SED
    +-
    +-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
    +-Xsed="$SED -e 1s/^X//"
    +-
    +-# 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
    +-
    +-# The names of the tagged configurations supported by this script.
    +-available_tags=
    +-
    +-# ### BEGIN LIBTOOL CONFIG],
    +-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
    +-
    +-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
    +-
    +-# Shell to use when invoking shell scripts.
    +-SHELL=$lt_SHELL
    +-
    +-# Whether or not to build shared libraries.
    +-build_libtool_libs=$enable_shared
    +-
    +-# Whether or not to build static libraries.
    +-build_old_libs=$enable_static
    +-
    +-# Whether or not to add -lc for building shared libraries.
    +-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
    +-
    +-# Whether or not to disallow shared libs when runtime libs are static
    +-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
    +-
    +-# Whether or not to optimize for fast installation.
    +-fast_install=$enable_fast_install
    +-
    +-# The host system.
    +-host_alias=$host_alias
    +-host=$host
    +-host_os=$host_os
    +-
    +-# The build system.
    +-build_alias=$build_alias
    +-build=$build
    +-build_os=$build_os
    +-
    +-# An echo program that does not interpret backslashes.
    +-echo=$lt_echo
    +-
    +-# The archiver.
    +-AR=$lt_AR
    +-AR_FLAGS=$lt_AR_FLAGS
    +-
    +-# A C compiler.
    +-LTCC=$lt_LTCC
    +-
    +-# LTCC compiler flags.
    +-LTCFLAGS=$lt_LTCFLAGS
    +-
    +-# A language-specific compiler.
    +-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
    +-
    +-# Is the compiler the GNU C compiler?
    +-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
    +-
    +-# An ERE matcher.
    +-EGREP=$lt_EGREP
    +-
    +-# The linker used to build libraries.
    +-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
    +-
    +-# Whether we need hard or soft links.
    +-LN_S=$lt_LN_S
    +-
    +-# A BSD-compatible nm program.
    +-NM=$lt_NM
    +-
    +-# A symbol stripping program
    +-STRIP=$lt_STRIP
    +-
    +-# Used to examine libraries when file_magic_cmd begins "file"
    +-MAGIC_CMD=$MAGIC_CMD
    +-
    +-# Used on cygwin: DLL creation program.
    +-DLLTOOL="$DLLTOOL"
    +-
    +-# Used on cygwin: object dumper.
    +-OBJDUMP="$OBJDUMP"
    +-
    +-# Used on cygwin: assembler.
    +-AS="$AS"
    +-
    +-# The name of the directory that contains temporary libtool files.
    +-objdir=$objdir
    +-
    +-# How to create reloadable object files.
    +-reload_flag=$lt_reload_flag
    +-reload_cmds=$lt_reload_cmds
    +-
    +-# How to pass a linker flag through the compiler.
    +-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
    +-
    +-# Object file suffix (normally "o").
    +-objext="$ac_objext"
    +-
    +-# Old archive suffix (normally "a").
    +-libext="$libext"
    +-
    +-# Shared library suffix (normally ".so").
    +-shrext_cmds='$shrext_cmds'
    +-
    +-# Executable file suffix (normally "").
    +-exeext="$exeext"
    +-
    +-# Additional compiler flags for building library objects.
    +-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
    +-pic_mode=$pic_mode
    +-
    +-# What is the maximum length of a command?
    +-max_cmd_len=$lt_cv_sys_max_cmd_len
    +-
    +-# Does compiler simultaneously support -c and -o options?
    +-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
    +-
    +-# Must we lock files when doing compilation?
    +-need_locks=$lt_need_locks
    +-
    +-# Do we need the lib prefix for modules?
    +-need_lib_prefix=$need_lib_prefix
    +-
    +-# Do we need a version for libraries?
    +-need_version=$need_version
    +-
    +-# Whether dlopen is supported.
    +-dlopen_support=$enable_dlopen
    +-
    +-# Whether dlopen of programs is supported.
    +-dlopen_self=$enable_dlopen_self
    +-
    +-# Whether dlopen of statically linked programs is supported.
    +-dlopen_self_static=$enable_dlopen_self_static
    +-
    +-# Compiler flag to prevent dynamic linking.
    +-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
    +-
    +-# Compiler flag to turn off builtin functions.
    +-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
    +-
    +-# Compiler flag to allow reflexive dlopens.
    +-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
    +-
    +-# Compiler flag to generate shared objects directly from archives.
    +-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
    +-
    +-# Compiler flag to generate thread-safe objects.
    +-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
    +-
    +-# Library versioning type.
    +-version_type=$version_type
    +-
    +-# Format of library name prefix.
    +-libname_spec=$lt_libname_spec
    +-
    +-# 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.
    +-library_names_spec=$lt_library_names_spec
    +-
    +-# The coded name of the library, if different from the real name.
    +-soname_spec=$lt_soname_spec
    +-
    +-# Commands used to build and install an old-style archive.
    +-RANLIB=$lt_RANLIB
    +-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
    +-old_postinstall_cmds=$lt_old_postinstall_cmds
    +-old_postuninstall_cmds=$lt_old_postuninstall_cmds
    +-
    +-# Create an old-style archive from a shared archive.
    +-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
    +-
    +-# Create a temporary old-style archive to link instead of a shared archive.
    +-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
    +-
    +-# Commands used to build and install a shared archive.
    +-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
    +-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
    +-postinstall_cmds=$lt_postinstall_cmds
    +-postuninstall_cmds=$lt_postuninstall_cmds
    +-
    +-# Commands used to build a loadable module (assumed same as above if empty)
    +-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
    +-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
    +-
    +-# Commands to strip libraries.
    +-old_striplib=$lt_old_striplib
    +-striplib=$lt_striplib
    +-
    +-# Dependencies to place before the objects being linked to create a
    +-# shared library.
    +-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
    +-
    +-# Dependencies to place after the objects being linked to create a
    +-# shared library.
    +-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
    +-
    +-# Dependencies to place before the objects being linked to create a
    +-# shared library.
    +-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
    +-
    +-# Dependencies to place after the objects being linked to create a
    +-# shared library.
    +-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
    +-
    +-# The library search path used internally by the compiler when linking
    +-# a shared library.
    +-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
    +-
    +-# Method to check whether dependent libraries are shared objects.
    +-deplibs_check_method=$lt_deplibs_check_method
    +-
    +-# Command to use when deplibs_check_method == file_magic.
    +-file_magic_cmd=$lt_file_magic_cmd
    +-
    +-# Flag that allows shared libraries with undefined symbols to be built.
    +-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
    +-
    +-# Flag that forces no undefined symbols.
    +-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
    +-
    +-# Commands used to finish a libtool library installation in a directory.
    +-finish_cmds=$lt_finish_cmds
    +-
    +-# Same as above, but a single script fragment to be evaled but not shown.
    +-finish_eval=$lt_finish_eval
    +-
    +-# Take the output of nm and produce a listing of raw symbols and C names.
    +-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
    +-
    +-# Transform the output of nm in a proper C declaration
    +-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
    +-
    +-# Transform the output of nm in a C name address pair
    +-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
    +-
    +-# This is the shared library runtime path variable.
    +-runpath_var=$runpath_var
    +-
    +-# This is the shared library path variable.
    +-shlibpath_var=$shlibpath_var
    +-
    +-# Is shlibpath searched before the hard-coded library search path?
    +-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
    +-
    +-# How to hardcode a shared library path into an executable.
    +-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
    +-
    +-# Whether we should hardcode library paths into libraries.
    +-hardcode_into_libs=$hardcode_into_libs
    +-
    +-# Flag to hardcode \$libdir into a binary during linking.
    +-# This must work even if \$libdir does not exist.
    +-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $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.
    +-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
    +-
    +-# Whether we need a single -rpath flag with a separated argument.
    +-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
    +-
    +-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
    +-# resulting binary.
    +-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
    +-
    +-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
    +-# resulting binary.
    +-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
    +-
    +-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
    +-# the resulting binary.
    +-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
    +-
    +-# Set to yes if building a shared library automatically hardcodes DIR into the library
    +-# and all subsequent libraries and executables linked against it.
    +-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
    +-
    +-# Variables whose values should be saved in libtool wrapper scripts and
    +-# restored at relink time.
    +-variables_saved_for_relink="$variables_saved_for_relink"
    +-
    +-# Whether libtool must link a program against all its dependency libraries.
    +-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
    +-
    +-# Compile-time system search path for libraries
    +-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
    +-
    +-# Run-time system search path for libraries
    +-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
    +-
    +-# Fix the shell variable \$srcfile for the compiler.
    +-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
    +-
    +-# Set to yes if exported symbols are required.
    +-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
    +-
    +-# The commands to list exported symbols.
    +-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
    +-
    +-# The commands to extract the exported symbol list from a shared archive.
    +-extract_expsyms_cmds=$lt_extract_expsyms_cmds
    +-
    +-# Symbols that should not be listed in the preloaded symbols.
    +-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
    +-
    +-# Symbols that must always be exported.
    +-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
    +-
    +-ifelse([$1],[],
    +-[# ### END LIBTOOL CONFIG],
    +-[# ### END LIBTOOL TAG CONFIG: $tagname])
    +-
    +-__EOF__
    +-
    +-ifelse([$1],[], [
    +-  case $host_os in
    +-  aix3*)
    +-    cat <<\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
    +-EOF
    +-    ;;
    +-  esac
    +-
    +-  # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
    +-
    +-  mv -f "$cfgfile" "$ofile" || \
    +-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
    +-  chmod +x "$ofile"
    +-])
    +-else
    +-  # If there is no Makefile yet, we rely on a make rule to execute
    +-  # `config.status --recheck' to rerun these tests and create the
    +-  # libtool script then.
    +-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
    +-  if test -f "$ltmain_in"; then
    +-    test -f Makefile && make "$ltmain"
    +-  fi
    +-fi
    +-])# AC_LIBTOOL_CONFIG
    +-
    +-
    +-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
    +-# -------------------------------------------
    +-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
    +-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
    +-
    +-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
    +-
    +-if test "$GCC" = yes; then
    +-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
    +-
    +-  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
    +-    lt_cv_prog_compiler_rtti_exceptions,
    +-    [-fno-rtti -fno-exceptions], [],
    +-    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
    +-fi
    +-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
    +-
    +-
    +-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
    +-# ---------------------------------
    +-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
    +-[AC_REQUIRE([AC_CANONICAL_HOST])
    +-AC_REQUIRE([AC_PROG_NM])
    +-AC_REQUIRE([AC_OBJEXT])
    +-# 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]]*\)'
    +-
    +-# Transform an extracted symbol line into a proper C declaration
    +-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
    +-
    +-# Define system-specific variables.
    +-case $host_os in
    +-aix*)
    +-  symcode='[[BCDT]]'
    +-  ;;
    +-cygwin* | mingw* | pw32*)
    +-  symcode='[[ABCDGISTW]]'
    +-  ;;
    +-hpux*) # Its linker distinguishes data from code symbols
    +-  if test "$host_cpu" = ia64; then
    +-    symcode='[[ABCDEGRST]]'
    +-  fi
    +-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
    +-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
    +-  ;;
    +-linux*)
    +-  if test "$host_cpu" = ia64; then
    +-    symcode='[[ABCDGIRSTW]]'
    +-    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
    +-    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
    +-  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
    +-
    +-# 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
    +-
    +-# If we're using GNU nm, then use its standard symbol codes.
    +-case `$NM -V 2>&1` in
    +-*GNU* | *'with BFD'*)
    +-  symcode='[[ABCDGIRSTW]]' ;;
    +-esac
    +-
    +-# Try without a prefix undercore, 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.
    +-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    +-
    +-  # Check to see that the pipe works correctly.
    +-  pipe_works=no
    +-
    +-  rm -f conftest*
    +-  cat > conftest.$ac_ext < $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 < conftest.$ac_ext
    +-#ifdef __cplusplus
    +-extern "C" {
    +-#endif
    +-
    +-EOF
    +-	  # Now generate the symbol file.
    +-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
    +-
    +-	  cat <> conftest.$ac_ext
    +-#if defined (__STDC__) && __STDC__
    +-# define lt_ptr_t void *
    +-#else
    +-# define lt_ptr_t char *
    +-# define const
    +-#endif
    +-
    +-/* The mapping between symbol names and symbols. */
    +-const struct {
    +-  const char *name;
    +-  lt_ptr_t address;
    +-}
    +-lt_preloaded_symbols[[]] =
    +-{
    +-EOF
    +-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
    +-	  cat <<\EOF >> conftest.$ac_ext
    +-  {0, (lt_ptr_t) 0}
    +-};
    +-
    +-#ifdef __cplusplus
    +-}
    +-#endif
    +-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_AC_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 -f 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
    +-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
    +-
    +-
    +-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
    +-# ---------------------------------------
    +-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
    +-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
    +-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
    +-
    +-AC_MSG_CHECKING([for $compiler option to produce PIC])
    +- ifelse([$1],[CXX],[
    +-  # C++ specific cases for pic, static, wl, etc.
    +-  if test "$GXX" = yes; then
    +-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      fi
    +-      ;;
    +-    amigaos*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
    +-      ;;
    +-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    +-      # PIC is the default for these OSes.
    +-      ;;
    +-    mingw* | os2* | pw32*)
    +-      # 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).
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
    +-      ;;
    +-    *djgpp*)
    +-      # DJGPP does not support shared libraries at all
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-      ;;
    +-    interix3*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
    +-      fi
    +-      ;;
    +-    hpux*)
    +-      # 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*)
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    +-	;;
    +-      esac
    +-      ;;
    +-    *)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    +-      ;;
    +-    esac
    +-  else
    +-    case $host_os in
    +-      aix4* | aix5*)
    +-	# All AIX code is PIC.
    +-	if test "$host_cpu" = ia64; then
    +-	  # AIX 5 now supports IA64 processor
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	else
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
    +-	fi
    +-	;;
    +-      chorus*)
    +-	case $cc_basename in
    +-	cxch68*)
    +-	  # Green Hills C++ Compiler
    +-	  # _LT_AC_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
    +-	;;
    +-       darwin*)
    +-         # PIC is the default on this platform
    +-         # Common symbols not allowed in MH_DYLIB files
    +-         case $cc_basename in
    +-           xlc*)
    +-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
    +-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-           ;;
    +-         esac
    +-       ;;
    +-      dgux*)
    +-	case $cc_basename in
    +-	  ec++*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    ;;
    +-	  ghcx*)
    +-	    # Green Hills C++ Compiler
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      freebsd* | kfreebsd*-gnu | dragonfly*)
    +-	# FreeBSD uses GNU C++
    +-	;;
    +-      hpux9* | hpux10* | hpux11*)
    +-	case $cc_basename in
    +-	  CC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
    +-	    if test "$host_cpu" != ia64; then
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
    +-	    fi
    +-	    ;;
    +-	  aCC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
    +-	    case $host_cpu in
    +-	    hppa*64*|ia64*)
    +-	      # +Z the default
    +-	      ;;
    +-	    *)
    +-	      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-	    # CC pic flag -KPIC is the default.
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      linux*)
    +-	case $cc_basename in
    +-	  KCC*)
    +-	    # KAI C++ Compiler
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    +-	    ;;
    +-	  icpc* | ecpc*)
    +-	    # Intel C++
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
    +-	    ;;
    +-	  pgCC*)
    +-	    # Portland Group C++ compiler.
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
    +-	    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      lynxos*)
    +-	;;
    +-      m88k*)
    +-	;;
    +-      mvs*)
    +-	case $cc_basename in
    +-	  cxx*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      netbsd*)
    +-	;;
    +-      osf3* | osf4* | osf5*)
    +-	case $cc_basename in
    +-	  KCC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
    +-	    ;;
    +-	  RCC*)
    +-	    # Rational C++ 2.4.1
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    ;;
    +-	  cxx*)
    +-	    # Digital/Compaq C++
    +-	    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-	    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
    +-	    ;;
    +-	  gcx*)
    +-	    # Green Hills C++ Compiler
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      sunos4*)
    +-	case $cc_basename in
    +-	  CC*)
    +-	    # Sun C++ 4.x
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	    ;;
    +-	  lcc*)
    +-	    # Lucid
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      tandem*)
    +-	case $cc_basename in
    +-	  NCC*)
    +-	    # NonStop-UX NCC 3.20
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
    +-	case $cc_basename in
    +-	  CC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	    ;;
    +-	esac
    +-	;;
    +-      vxworks*)
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-	;;
    +-    esac
    +-  fi
    +-],
    +-[
    +-  if test "$GCC" = yes; then
    +-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      fi
    +-      ;;
    +-
    +-    amigaos*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
    +-      ;;
    +-
    +-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    +-      # PIC is the default for these OSes.
    +-      ;;
    +-
    +-    mingw* | pw32* | os2*)
    +-      # 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).
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
    +-      ;;
    +-
    +-    interix3*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-      enable_shared=no
    +-      ;;
    +-
    +-    sysv4*MP*)
    +-      if test -d /usr/nec; then
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
    +-      fi
    +-      ;;
    +-
    +-    hpux*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    +-	;;
    +-      esac
    +-      ;;
    +-
    +-    *)
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      if test "$host_cpu" = ia64; then
    +-	# AIX 5 now supports IA64 processor
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      else
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
    +-      fi
    +-      ;;
    +-      darwin*)
    +-        # PIC is the default on this platform
    +-        # Common symbols not allowed in MH_DYLIB files
    +-       case $cc_basename in
    +-         xlc*)
    +-         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
    +-         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-         ;;
    +-       esac
    +-       ;;
    +-
    +-    mingw* | pw32* | os2*)
    +-      # 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).
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
    +-      ;;
    +-
    +-    hpux9* | hpux10* | hpux11*)
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
    +-	;;
    +-      esac
    +-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
    +-      ;;
    +-
    +-    irix5* | irix6* | nonstopux*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      # PIC (with -KPIC) is the default.
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-      ;;
    +-
    +-    newsos6)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    +-
    +-    linux*)
    +-      case $cc_basename in
    +-      icc* | ecc*)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	_LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-        ;;
    +-      ccc*)
    +-        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-        # All Alpha code is PIC.
    +-        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-        ;;
    +-      esac
    +-      ;;
    +-
    +-    osf3* | osf4* | osf5*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      # All OSF/1 code is PIC.
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-      ;;
    +-
    +-    solaris*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      case $cc_basename in
    +-      f77* | f90* | f95*)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
    +-      *)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
    +-      esac
    +-      ;;
    +-
    +-    sunos4*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    +-
    +-    sysv4 | sysv4.2uw2* | sysv4.3*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    +-
    +-    sysv4*MP*)
    +-      if test -d /usr/nec ;then
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      fi
    +-      ;;
    +-
    +-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    +-
    +-    unicos*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-      ;;
    +-
    +-    uts4*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    +-
    +-    *)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-      ;;
    +-    esac
    +-  fi
    +-])
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
    +-
    +-#
    +-# Check to make sure the PIC flag actually works.
    +-#
    +-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
    +-  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
    +-    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
    +-    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
    +-     "" | " "*) ;;
    +-     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
    +-     esac],
    +-    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
    +-fi
    +-case $host_os in
    +-  # For platforms which do not support PIC, -DPIC is meaningless:
    +-  *djgpp*)
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-    ;;
    +-  *)
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
    +-    ;;
    +-esac
    +-
    +-#
    +-# Check to make sure the static flag actually works.
    +-#
    +-wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
    +-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
    +-  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
    +-  $lt_tmp_static_flag,
    +-  [],
    +-  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
    +-])
    +-
    +-
    +-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
    +-# ------------------------------------
    +-# See if the linker supports building shared libraries.
    +-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
    +-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
    +-ifelse([$1],[CXX],[
    +-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
    +-  case $host_os in
    +-  aix4* | aix5*)
    +-    # 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_AC_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_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
    +-  ;;
    +-  cygwin* | mingw*)
    +-    _LT_AC_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_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
    +-  ;;
    +-  esac
    +-],[
    +-  runpath_var=
    +-  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
    +-  _LT_AC_TAGVAR(archive_cmds, $1)=
    +-  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
    +-  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
    +-  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
    +-  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
    +-  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
    +-  _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
    +-  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
    +-  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
    +-  _LT_AC_TAGVAR(module_cmds, $1)=
    +-  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
    +-  _LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
    +-  # include_expsyms should be a list of space-separated symbols to be *always*
    +-  # included in the symbol list
    +-  _LT_AC_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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
    +-  # 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.
    +-  extract_expsyms_cmds=
    +-  # Just being paranoid about ensuring that cc_basename is set.
    +-  _LT_CC_BASENAME([$compiler])
    +-  case $host_os in
    +-  cygwin* | mingw* | pw32*)
    +-    # 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
    +-    _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
    +-      else
    +-  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-    fi
    +-    supports_anon_versioning=no
    +-    case `$LD -v 2>/dev/null` 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
    +-    aix3* | aix4* | aix5*)
    +-      # On AIX/PPC, the GNU linker is very broken
    +-      if test "$host_cpu" != ia64; then
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	cat <&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.
    +-
    +-EOF
    +-      fi
    +-      ;;
    +-
    +-    amigaos*)
    +-      _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-
    +-      # Samuel A. Falvo II  reports
    +-      # that the semantics of dynamic libraries on AmigaOS, at least up
    +-      # to version 4, is to share data among multiple programs linked
    +-      # with the same dynamic library.  Since this doesn't match the
    +-      # behavior of shared libraries on other platforms, we can't use
    +-      # them.
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    +-
    +-    beos*)
    +-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-	# Joseph Beckenbach  says some releases of gcc
    +-	# support --undefined.  This deserves some investigation.  FIXME
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-      else
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-
    +-    cygwin* | mingw* | pw32*)
    +-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
    +-      # as there is no search path for DLLs.
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      _LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
    +-      _LT_AC_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_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-
    +-    interix3*)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-      _LT_AC_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_AC_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_AC_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'
    +-      ;;
    +-
    +-    linux*)
    +-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	tmp_addflag=
    +-	case $cc_basename,$host_cpu in
    +-	pgcc*)				# Portland Group C compiler
    +-	  _LT_AC_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_AC_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' ;;
    +-	esac
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-
    +-	if test $supports_anon_versioning = yes; then
    +-	  _LT_AC_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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
    +-	fi
    +-      else
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-
    +-    netbsd*)
    +-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
    +-	wlarc=
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	cat <&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.
    +-
    +-EOF
    +-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_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_AC_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
    +-	;;
    +-	*)
    +-	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
    +-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
    +-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
    +-	  else
    +-	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	  fi
    +-	;;
    +-      esac
    +-      ;;
    +-
    +-    sunos4*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
    +-      wlarc=
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    *)
    +-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-    esac
    +-
    +-    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
    +-      runpath_var=
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-      _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
    +-      _LT_AC_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_AC_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_AC_TAGVAR(hardcode_direct, $1)=unsupported
    +-      fi
    +-      ;;
    +-
    +-    aix4* | aix5*)
    +-      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_AC_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_AC_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]].*|aix5*)
    +-	  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_AC_TAGVAR(archive_cmds, $1)=''
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-
    +-      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
    +-  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	  else
    +-  	  # We have old collect2
    +-  	  _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-  	  _LT_AC_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
    +-
    +-      # It seems that -bexpall does not export symbols beginning with
    +-      # underscore (_), so it is better to generate a list of symbols to export.
    +-      _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
    +-       # Determine the default libpath from the value encoded in an empty executable.
    +-       _LT_AC_SYS_LIBPATH_AIX
    +-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
    +-	_LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
    +-       else
    +-	if test "$host_cpu" = ia64; then
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
    +-	  _LT_AC_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_AC_SYS_LIBPATH_AIX
    +-	 _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
    +-	  # Exported symbols can be pulled into shared objects from archives
    +-	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
    +-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-	  # This is similar to how AIX traditionally builds its shared libraries.
    +-	  _LT_AC_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*)
    +-      _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      # see comment about different semantics on the GNU ld section
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    +-
    +-    bsdi[[45]]*)
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
    +-      ;;
    +-
    +-    cygwin* | mingw* | pw32*)
    +-      # 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
    +-      _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
    +-      # The linker will automatically build a .lib file if we build a DLL.
    +-      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
    +-      # FIXME: Should let the user specify the lib program.
    +-      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
    +-      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
    +-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
    +-      ;;
    +-
    +-    darwin* | rhapsody*)
    +-      case $host_os in
    +-        rhapsody* | darwin1.[[012]])
    +-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
    +-         ;;
    +-       *) # Darwin 1.3 on
    +-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
    +-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-         else
    +-           case ${MACOSX_DEPLOYMENT_TARGET} in
    +-             10.[[012]])
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-               ;;
    +-             10.*)
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
    +-               ;;
    +-           esac
    +-         fi
    +-         ;;
    +-      esac
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-    if test "$GCC" = yes ; then
    +-    	output_verbose_link_cmd='echo'
    +-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
    +-      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-    else
    +-      case $cc_basename in
    +-        xlc*)
    +-         output_verbose_link_cmd='echo'
    +-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
    +-         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          ;;
    +-       *)
    +-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-          ;;
    +-      esac
    +-    fi
    +-      ;;
    +-
    +-    dgux*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    freebsd1*)
    +-      _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
    +-    freebsd2*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
    +-    freebsd* | kfreebsd*-gnu | dragonfly*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    hpux9*)
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-
    +-      # hardcode_minus_L: Not really in the search PATH,
    +-      # but as the default location of the library.
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-      ;;
    +-
    +-    hpux10*)
    +-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	_LT_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	ia64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	*)
    +-	  _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	ia64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	*)
    +-	  _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-	case $host_cpu in
    +-	hppa*64*|ia64*)
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-	  ;;
    +-	*)
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	  _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-	  ;;
    +-	esac
    +-      fi
    +-      ;;
    +-
    +-    irix5* | irix6* | nonstopux*)
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-      ;;
    +-
    +-    netbsd*)
    +-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    newsos6)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    openbsd*)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-      else
    +-       case $host_os in
    +-	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
    +-	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
    +-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-	   ;;
    +-	 *)
    +-	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
    +-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	   ;;
    +-       esac
    +-      fi
    +-      ;;
    +-
    +-    os2*)
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
    +-      ;;
    +-
    +-    osf3*)
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-      else
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      ;;
    +-
    +-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      else
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_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~
    +-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
    +-
    +-	# Both c and cxx compiler support -rpath directly
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      ;;
    +-
    +-    solaris*)
    +-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
    +-      if test "$GCC" = yes; then
    +-	wlarc='${wl}'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
    +-      else
    +-	wlarc=''
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	_LT_AC_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'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      case $host_os in
    +-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
    +-      *)
    +- 	# The compiler driver will combine linker options so we
    +- 	# cannot just pass the convience library names through
    +- 	# without $wl, iff we do not link with $LD.
    +- 	# Luckily, gcc supports the same syntax we need for Sun Studio.
    +- 	# Supported since Solaris 2.6 (maybe 2.5.1?)
    +- 	case $wlarc in
    +- 	'')
    +- 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
    +- 	*)
    +- 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
    +- 	esac ;;
    +-      esac
    +-      _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    sysv4)
    +-      case $host_vendor in
    +-	sni)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
    +-	;;
    +-	siemens)
    +-	  ## LD is ld it makes a PLAMLIB
    +-	  ## CC just makes a GrossModule.
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
    +-	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-        ;;
    +-	motorola)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
    +-	;;
    +-      esac
    +-      runpath_var='LD_RUN_PATH'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    sysv4.3*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
    +-      ;;
    +-
    +-    sysv4*MP*)
    +-      if test -d /usr/nec; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-	runpath_var=LD_RUN_PATH
    +-	hardcode_runpath_var=yes
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
    +-      fi
    +-      ;;
    +-
    +-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
    +-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      runpath_var='LD_RUN_PATH'
    +-
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
    +-      runpath_var='LD_RUN_PATH'
    +-
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      fi
    +-      ;;
    +-
    +-    uts4*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    *)
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    +-    esac
    +-  fi
    +-])
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
    +-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
    +-
    +-#
    +-# Do we need to explicitly link libc?
    +-#
    +-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
    +-x|xyes)
    +-  # Assume -lc should be added
    +-  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-
    +-  if test "$enable_shared" = yes && test "$GCC" = yes; then
    +-    case $_LT_AC_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*
    +-      printf "$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_AC_TAGVAR(lt_prog_compiler_wl, $1)
    +-	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
    +-        compiler_flags=-v
    +-        linker_flags=-v
    +-        verstring=
    +-        output_objdir=.
    +-        libname=conftest
    +-        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
    +-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
    +-        then
    +-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-        else
    +-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-        fi
    +-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
    +-      else
    +-        cat conftest.err 1>&5
    +-      fi
    +-      $rm conftest*
    +-      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
    +-      ;;
    +-    esac
    +-  fi
    +-  ;;
    +-esac
    +-])# AC_LIBTOOL_PROG_LD_SHLIBS
    +-
    +-
    +-# _LT_AC_FILE_LTDLL_C
    +-# -------------------
    +-# Be careful that the start marker always follows a newline.
    +-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
    +-# /* ltdll.c starts here */
    +-# #define WIN32_LEAN_AND_MEAN
    +-# #include 
    +-# #undef WIN32_LEAN_AND_MEAN
    +-# #include 
    +-#
    +-# #ifndef __CYGWIN__
    +-# #  ifdef __CYGWIN32__
    +-# #    define __CYGWIN__ __CYGWIN32__
    +-# #  endif
    +-# #endif
    +-#
    +-# #ifdef __cplusplus
    +-# extern "C" {
    +-# #endif
    +-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
    +-# #ifdef __cplusplus
    +-# }
    +-# #endif
    +-#
    +-# #ifdef __CYGWIN__
    +-# #include 
    +-# DECLARE_CYGWIN_DLL( DllMain );
    +-# #endif
    +-# HINSTANCE __hDllInstance_base;
    +-#
    +-# BOOL APIENTRY
    +-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
    +-# {
    +-#   __hDllInstance_base = hInst;
    +-#   return TRUE;
    +-# }
    +-# /* ltdll.c ends here */
    +-])# _LT_AC_FILE_LTDLL_C
    +-
    +-
    +-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
    +-# ---------------------------------
    +-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
    +-
    +-
    +-# old names
    +-AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
    +-AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
    +-AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
    +-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
    +-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
    +-AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
    +-AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
    +-
    +-# This is just to silence aclocal about the macro not being used
    +-ifelse([AC_DISABLE_FAST_INSTALL])
    +-
    +-AC_DEFUN([LT_AC_PROG_GCJ],
    +-[AC_CHECK_TOOL(GCJ, gcj, no)
    +-  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
    +-  AC_SUBST(GCJFLAGS)
    +-])
    +-
    +-AC_DEFUN([LT_AC_PROG_RC],
    +-[AC_CHECK_TOOL(RC, windres, no)
    +-])
    +-
    +-############################################################
    +-# 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.                               #
    +-############################################################
    +-# LT_AC_PROG_SED
    +-# --------------
    +-# Check for a fully-functional sed program, that truncates
    +-# as few characters as possible.  Prefer GNU sed if found.
    +-AC_DEFUN([LT_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
    +-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_MSG_RESULT([$SED])
    +-])
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -241,19 +241,6 @@ all: rfbconfig.h
    + .SUFFIXES:
    + 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) --gnu '; \
    +-	      cd $(srcdir) && $(AUTOMAKE) --gnu  \
    +-		&& exit 0; \
    +-	      exit 1;; \
    +-	  esac; \
    +-	done; \
    +-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
    +-	cd $(top_srcdir) && \
    +-	  $(AUTOMAKE) --gnu  Makefile
    + .PRECIOUS: Makefile
    + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
    + 	@case '$?' in \
    diff --git a/libs/libvncserver/patches/100-noexamples.patch b/libs/libvncserver/patches/100-noexamples.patch
    new file mode 100644
    index 0000000..dc7d933
    --- /dev/null
    +++ b/libs/libvncserver/patches/100-noexamples.patch
    @@ -0,0 +1,43 @@
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -228,8 +228,8 @@ sysconfdir = @sysconfdir@
    + target_alias = @target_alias@
    + with_ffmpeg = @with_ffmpeg@
    + @WITH_X11VNC_TRUE@X11VNC = x11vnc
    +-SUBDIRS = libvncserver examples contrib libvncclient vncterm classes client_examples test $(X11VNC)
    +-DIST_SUBDIRS = libvncserver examples contrib libvncclient vncterm classes client_examples test
    ++SUBDIRS = libvncserver
    ++DIST_SUBDIRS = libvncserver
    + bin_SCRIPTS = libvncserver-config
    + #include_HEADERS=rfb.h rfbconfig.h rfbint.h rfbproto.h keysym.h rfbregion.h
    + include_HEADERS = rfb/rfb.h rfb/rfbconfig.h rfb/rfbint.h rfb/rfbproto.h \
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -748,14 +748,6 @@ AC_SUBST(RPMSOURCEDIR)
    + 
    + AC_CONFIG_FILES([Makefile
    + 	libvncserver/Makefile
    +-	contrib/Makefile
    +-	examples/Makefile
    +-	vncterm/Makefile
    +-	classes/Makefile
    +-	classes/ssl/Makefile
    +-	libvncclient/Makefile
    +-	client_examples/Makefile
    +-	test/Makefile
    + 	libvncserver-config
    + 	LibVNCServer.spec])
    + #
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -4,8 +4,8 @@ if WITH_X11VNC
    + X11VNC=x11vnc
    + endif
    + 
    +-SUBDIRS=libvncserver examples contrib libvncclient vncterm classes client_examples test $(X11VNC)
    +-DIST_SUBDIRS=libvncserver examples contrib libvncclient vncterm classes client_examples test
    ++SUBDIRS=libvncserver
    ++DIST_SUBDIRS=libvncserver
    + 
    + bin_SCRIPTS = libvncserver-config
    + 
    diff --git a/libs/libvorbis/Makefile b/libs/libvorbis/Makefile
    new file mode 100644
    index 0000000..20cb2e0
    --- /dev/null
    +++ b/libs/libvorbis/Makefile
    @@ -0,0 +1,61 @@
    +#
    +# Copyright (C) 2008-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libvorbis
    +PKG_VERSION:=1.2.3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.xiph.org/releases/vorbis/
    +PKG_MD5SUM:=5aa77f55c0e0aab8eb8ed982335daac8
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libvorbis
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=libvorbis
    +  URL:=http://xiph.org/vorbis/
    +  DEPENDS:=+libogg
    +endef
    +
    +define Package/libvorbis/description
    +Vorbis is a general purpose audio and music encoding format
    +contemporary to MPEG-4's AAC and TwinVQ, the next generation beyond
    +MPEG audio layer 3. Unlike the MPEG sponsored formats (and other
    +proprietary formats such as RealAudio G2 and Windows' flavor of the
    +month), the Vorbis CODEC specification belongs to the public domain.
    +All the technical details are published and documented, and any
    +software entity may make full use of the format without license
    +fee, royalty or patent concerns.
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--disable-oggtest \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/vorbis/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/vorbis/* $(1)/usr/include/vorbis/
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
    +	$(INSTALL_DIR) $(1)/usr/share/aclocal/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal/
    +endef
    +
    +define Package/libvorbis/install
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libvorbis))
    diff --git a/libs/libvorbis/patches/001-automake-compat.patch b/libs/libvorbis/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..29d85c1
    --- /dev/null
    +++ b/libs/libvorbis/patches/001-automake-compat.patch
    @@ -0,0 +1,10 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -1,6 +1,7 @@
    + ## Process this file with automake to produce Makefile.in
    + 
    + AUTOMAKE_OPTIONS = 1.6 foreign dist-zip dist-bzip2
    ++ACLOCAL_AMFLAGS = -I m4
    + 
    + SUBDIRS = m4 include vq lib examples test doc
    + 
    diff --git a/libs/libvorbisidec/Makefile b/libs/libvorbisidec/Makefile
    new file mode 100644
    index 0000000..a975bb7
    --- /dev/null
    +++ b/libs/libvorbisidec/Makefile
    @@ -0,0 +1,52 @@
    +# 
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libvorbisidec
    +PKG_VERSION:=1.0.2+svn14261
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
    +PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/libv/libvorbisidec/
    +PKG_MD5SUM:=bc617d4af1cd74b38d7c51451dd6eff0
    +
    +PKG_FIXUP:=autoreconf
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libvorbisidec
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=A fixed-point Ogg/Vorbis decoder library
    +  URL:=http://wiki.xiph.org/index.php/Tremor
    +endef
    +
    +define Package/libvorbisidec/description
    +	libvorbisidec is "tremor", a fixed-point implementation of libvorbis.
    +	It also has libogg built-in. It is suitable as a replacement for 
    +	libvorbis and libogg in tremor-aware applications.
    +	Tremor is a decoder only.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +CONFIGURE_ARGS += --enable-shared --enable-static
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/tremor $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbisidec.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libvorbisidec/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbisidec.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libvorbisidec))
    diff --git a/libs/libxapian/Makefile b/libs/libxapian/Makefile
    new file mode 100644
    index 0000000..f144a8c
    --- /dev/null
    +++ b/libs/libxapian/Makefile
    @@ -0,0 +1,80 @@
    +#
    +# Copyright (C) 2008-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=xapian-core
    +PKG_VERSION:=1.0.7
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://oligarchy.co.uk/xapian/$(PKG_VERSION)
    +PKG_MD5SUM:=b4acff50028120852d4a8d943065f6d2
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/libxapian
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=xapian
    +  URL:=http://xapian.org
    +  DEPENDS:=+libstdcpp +zlib
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/share/aclocal
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/share/aclocal/* \
    +		$(1)/usr/share/aclocal
    +
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/xapian.h \
    +		$(1)/usr/include
    +	$(INSTALL_DIR) $(1)/usr/include/xapian
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/xapian/* \
    +		$(1)/usr/include/xapian
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
    +		$(1)/usr/lib/
    +	$(INSTALL_DIR) $(2)/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/xapian-config \
    +		$(2)/bin
    +	$(SED) 's,prefix=",prefix="$(STAGING_DIR),g' $(2)/bin/xapian-config
    +
    +	#FIXME: Libtool should handle this
    +	if [ -f $(TOOLCHAIN_DIR)/usr/lib/libstdc++.la ]; then \
    +	  $(SED) \
    +		"s,$(STAGING_DIR)/usr/lib/libstdc++,$(TOOLCHAIN_DIR)/usr/lib/libstdc++,g" \
    +		$(1)/usr/lib/libxapian.la ; \
    +	else \
    +	  $(SED) \
    +		"s,$(STAGING_DIR)/usr/lib/libstdc++,$(TOOLCHAIN_DIR)/lib/libstdc++,g" \
    +		$(1)/usr/lib/libxapian.la ; \
    +	fi
    +endef
    +
    +define Package/libxapian/install
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
    +		$(1)/usr/lib
    +	$(INSTALL_DIR) $(1)/usr/bin/
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/* \
    +		$(1)/usr/bin
    +endef
    +
    +$(eval $(call BuildPackage,libxapian))
    diff --git a/libs/libxapian/patches/001-missing_includes.patch b/libs/libxapian/patches/001-missing_includes.patch
    new file mode 100644
    index 0000000..67f19fe
    --- /dev/null
    +++ b/libs/libxapian/patches/001-missing_includes.patch
    @@ -0,0 +1,63 @@
    +diff -urN xapian-core-1.0.7/backends/flint/flint_version.cc xapian-core-1.0.7.new/backends/flint/flint_version.cc
    +--- xapian-core-1.0.7/backends/flint/flint_version.cc	2008-07-16 06:42:34.000000000 +0200
    ++++ xapian-core-1.0.7.new/backends/flint/flint_version.cc	2010-03-29 09:59:58.000000000 +0200
    +@@ -19,6 +19,7 @@
    +  */
    + 
    + #include 
    ++#include 
    + 
    + #include "safeerrno.h"
    + 
    +diff -urN xapian-core-1.0.7/bin/quartzdump.cc xapian-core-1.0.7.new/bin/quartzdump.cc
    +--- xapian-core-1.0.7/bin/quartzdump.cc	2008-07-16 06:42:28.000000000 +0200
    ++++ xapian-core-1.0.7.new/bin/quartzdump.cc	2010-03-29 10:18:26.000000000 +0200
    +@@ -29,6 +29,7 @@
    + #include 
    + #include 
    + #include 
    ++#include 
    + 
    + #include "autoptr.h"
    + #include "gnu_getopt.h"
    +--- xapian-core-1.0.7/bin/xapian-progsrv.cc	2008-07-16 06:42:28.000000000 +0200
    ++++ xapian-core-1.0.7.new/bin/xapian-progsrv.cc	2010-03-29 10:31:16.000000000 +0200
    +@@ -19,6 +19,7 @@
    +  */
    + 
    + #include 
    ++#include 
    + 
    + #include "remoteserver.h"
    + 
    +--- xapian-core-1.0.7/bin/xapian-tcpsrv.cc	2008-07-16 06:42:28.000000000 +0200
    ++++ xapian-core-1.0.7.new/bin/xapian-tcpsrv.cc	2010-03-29 10:41:56.000000000 +0200
    +@@ -21,6 +21,7 @@
    +  */
    + 
    + #include 
    ++#include 
    + 
    + #include 
    + 
    +diff -urN xapian-core-1.0.7/examples/delve.cc xapian-core-1.0.7.new/examples/delve.cc
    +--- xapian-core-1.0.7/examples/delve.cc	2008-07-16 06:42:35.000000000 +0200
    ++++ xapian-core-1.0.7.new/examples/delve.cc	2010-03-29 11:14:26.000000000 +0200
    +@@ -21,6 +21,7 @@
    +  */
    + 
    + #include 
    ++#include 
    + 
    + #include 
    + 
    +--- xapian-core-1.0.7/examples/quest.cc	2008-07-16 06:42:35.000000000 +0200
    ++++ xapian-core-1.0.7.new/examples/quest.cc	2010-03-29 11:33:03.000000000 +0200
    +@@ -19,6 +19,7 @@
    +  */
    + 
    + #include 
    ++#include 
    + 
    + #include 
    + 
    diff --git a/libs/libxapian/patches/002-elif_else_replacement.patch b/libs/libxapian/patches/002-elif_else_replacement.patch
    new file mode 100644
    index 0000000..66938ac
    --- /dev/null
    +++ b/libs/libxapian/patches/002-elif_else_replacement.patch
    @@ -0,0 +1,12 @@
    +diff -urN xapian-core-1.0.7/common/serialise-double.cc xapian-core-1.0.7.new/common/serialise-double.cc
    +--- xapian-core-1.0.7/common/serialise-double.cc	2008-07-16 06:42:30.000000000 +0200
    ++++ xapian-core-1.0.7.new/common/serialise-double.cc	2010-03-29 10:07:02.000000000 +0200
    +@@ -56,7 +56,7 @@
    + # define MAX_MANTISSA_BYTES ((DBL_MANT_DIG + 1 + 1) / 2)
    + # define MAX_EXP ((DBL_MAX_EXP + 1) / 2)
    + # define MAX_MANTISSA (1 << ((DBL_MAX_EXP & 1) * 4))
    +-#elif
    ++#else
    + # error FLT_RADIX is a value not currently handled (not 2 or 16)
    + // # define MAX_MANTISSA_BYTES (sizeof(double) + 1)
    + #endif
    diff --git a/libs/libxapian/patches/003-no_docs_tests.patch b/libs/libxapian/patches/003-no_docs_tests.patch
    new file mode 100644
    index 0000000..5971115
    --- /dev/null
    +++ b/libs/libxapian/patches/003-no_docs_tests.patch
    @@ -0,0 +1,22 @@
    +--- xapian-core-1.0.7/Makefile.am	2008-07-16 06:42:35.000000000 +0200
    ++++ xapian-core-1.0.7.new/Makefile.am	2010-03-29 11:01:13.000000000 +0200
    +@@ -14,7 +14,7 @@
    + endif
    + 
    + # Order is relevant: when building, tests must be after ".".
    +-SUBDIRS = . docs tests
    ++SUBDIRS = .
    + 
    + noinst_HEADERS =
    + BUILT_SOURCES =
    +--- xapian-core-1.0.7/Makefile.in	2008-07-16 06:46:51.000000000 +0200
    ++++ xapian-core-1.0.7.new/Makefile.in	2010-03-29 11:01:24.000000000 +0200
    +@@ -847,7 +847,7 @@
    + 	$(am__append_1) $(am__append_25)
    + 
    + # Order is relevant: when building, tests must be after ".".
    +-SUBDIRS = . docs tests
    ++SUBDIRS = .
    + noinst_HEADERS = api/maptermlist.h api/editdistance.h $(am__append_9) \
    + 	$(am__append_12) backends/multi/multi_postlist.h \
    + 	backends/multi/multi_termlist.h $(am__append_15) \
    diff --git a/libs/libxapian/patches/004-xapian_config_no_ltlibs.patch b/libs/libxapian/patches/004-xapian_config_no_ltlibs.patch
    new file mode 100644
    index 0000000..cdcf5f5
    --- /dev/null
    +++ b/libs/libxapian/patches/004-xapian_config_no_ltlibs.patch
    @@ -0,0 +1,51 @@
    +Index: xapian-core-1.0.7/m4-macros/xapian.m4
    +===================================================================
    +--- xapian-core-1.0.7.orig/m4-macros/xapian.m4	2011-10-11 16:11:04.000000000 +0200
    ++++ xapian-core-1.0.7/m4-macros/xapian.m4	2011-10-11 16:12:00.000000000 +0200
    +@@ -47,14 +47,12 @@
    +       [$2])
    +   else
    +     AC_MSG_CHECKING([$XAPIAN_CONFIG works])
    +-    dnl check for --ltlibs but not --libs as "xapian-config --libs" will
    +-    dnl fail if xapian isn't installed...
    + 
    +     dnl run with exec to avoid leaking output on "real" bourne shells
    +-    if (exec >&5 2>&5 ; $XAPIAN_CONFIG --ltlibs --cxxflags; exit $?) then
    ++    if (exec >&5 2>&5 ; $XAPIAN_CONFIG --libs --cxxflags; exit $?) then
    +       AC_MSG_RESULT(yes)
    +     else
    +-      AC_MSG_ERROR([\`$XAPIAN_CONFIG --ltlibs --cxxflags' doesn't work, aborting])
    ++      AC_MSG_ERROR([\`$XAPIAN_CONFIG --libs --cxxflags' doesn't work, aborting])
    +     fi
    + 
    + dnl If LT_INIT, AC_PROG_LIBTOOL or the deprecated older version
    +@@ -64,11 +62,11 @@
    +     XAPIAN_VERSION=`$XAPIAN_CONFIG --version|sed 's/.* //;s/_svn[[0-9]]*$//'`
    +     XAPIAN_CXXFLAGS=`$XAPIAN_CONFIG --cxxflags`
    +     AC_PROVIDE_IFELSE([LT_INIT],
    +-      [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`],
    ++      [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`],
    +       [AC_PROVIDE_IFELSE([AC_PROG_LIBTOOL],
    +-	[XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`],
    ++	[XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`],
    + 	[AC_PROVIDE_IFELSE([AM_PROG_LIBTOOL],
    +-	  [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`],
    ++	  [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`],
    + 	  dnl Pass magic option so xapian-config knows we called it (so it
    + 	  dnl can choose a more appropriate error message if asked to link
    + 	  dnl with an uninstalled libxapian).  Also pass ac_top_srcdir
    +@@ -76,11 +74,11 @@
    + 	  dnl "configure.in" according to which is in use.
    + 	  [XAPIAN_LIBS=`ac_top_srcdir="$ac_top_srcdir" $XAPIAN_CONFIG --from-xo-lib-xapian --libs`
    + 	  define([LT_INIT], defn([LT_INIT])
    +-		 [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`])
    ++		 [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`])
    + 	  define([AC_PROG_LIBTOOL], defn([AC_PROG_LIBTOOL])
    +-		 [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`])
    ++		 [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`])
    + 	  define([AM_PROG_LIBTOOL], defn([AM_PROG_LIBTOOL])
    +-		 [XAPIAN_LIBS=`$XAPIAN_CONFIG --ltlibs`])])])])
    ++		 [XAPIAN_LIBS=`$XAPIAN_CONFIG --libs`])])])])
    +     ifelse([$1], , :, [$1])
    +   fi
    +   AC_SUBST(XAPIAN_CXXFLAGS)
    diff --git a/libs/libxml2/Makefile b/libs/libxml2/Makefile
    new file mode 100644
    index 0000000..c81e4cc
    --- /dev/null
    +++ b/libs/libxml2/Makefile
    @@ -0,0 +1,105 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libxml2
    +PKG_VERSION:=2.7.8
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://gd.tuwien.ac.at/languages/libxml/ \
    +	http://xmlsoft.org/sources/ \
    +	ftp://fr.rpmfind.net/pub/libxml/
    +PKG_MD5SUM:=8127a65e8c3b08856093099b52599c86
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libxml2
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Gnome XML library
    +  URL:=http://xmlsoft.org/
    +  DEPENDS:=+libpthread +zlib
    +endef
    +
    +define Package/libxml2/description
    +  A library for manipulating XML and HTML resources.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--with-c14n \
    +	--without-catalog \
    +	--with-debug \
    +	--without-docbook \
    +	--with-html \
    +	--without-ftp \
    +	--without-http \
    +	--without-iconv \
    +	--without-iso8859x \
    +	--without-legacy \
    +	--with-output \
    +	--without-pattern \
    +	--without-push \
    +	--without-python \
    +	--with-reader \
    +	--without-readline \
    +	--without-regexps \
    +	--with-sax1 \
    +	--with-schemas \
    +	--with-threads \
    +	--with-tree \
    +	--with-valid \
    +	--with-writer \
    +	--with-xinclude \
    +	--with-xpath \
    +	--with-xptr \
    +	--with-zlib \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(2)/bin/
    +	$(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(2)/bin/xml2-config
    +
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/libxml2 \
    +		$(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc \
    +		$(1)/usr/lib/pkgconfig/
    +
    +	$(INSTALL_DIR) $(2)/share/aclocal/
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/share/aclocal/* \
    +		$(2)/share/aclocal
    +endef
    +
    +define Package/libxml2/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* \
    +		$(1)/usr/lib/
    +endef
    +
    +
    +$(eval $(call BuildPackage,libxml2))
    diff --git a/libs/libxslt/Makefile b/libs/libxslt/Makefile
    new file mode 100644
    index 0000000..2623399
    --- /dev/null
    +++ b/libs/libxslt/Makefile
    @@ -0,0 +1,146 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=libxslt
    +PKG_VERSION:=1.1.26
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://xmlsoft.org/sources/ \
    +	ftp://fr.rpmfind.net/pub/libxml/
    +PKG_MD5SUM:=e61d0364a30146aaa3001296f853b2b9
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libxslt
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libxml2
    +  TITLE:=Gnome XSLT library
    +  URL:=http://xmlsoft.org/XSLT/
    +endef
    +
    +define Package/libxslt/description
    +	A library for XML transformation using XSLT.
    +endef
    +
    +define Package/libexslt
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libxslt
    +  TITLE:=Gnome XSLT library Extention
    +  URL:=http://xmlsoft.org/XSLT/EXSLT/
    +endef
    +
    +define Package/libexslt/description
    +	A extention for XSLT.
    +endef
    +
    +define Package/xsltproc
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+libxml2 +libxslt +libexslt
    +  TITLE:=Gnome XSLT xsltproc Utility
    +  URL:=http://xmlsoft.org/XSLT/
    +endef
    +
    +define Package/xsltproc/description
    +	XSLT XML transformation utility
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--enable-shared \
    +	--enable-static \
    +	--without-python \
    +	--without-crypto \
    +	--without-debug \
    +	--without-mem-debug \
    +	--without-debugger \
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev/Xslt
    +	$(INSTALL_DIR) $(1)/usr/bin $(2)/bin $(1)/usr/include/libxslt \
    +		$(1)/usr/include/libexslt $(1)/usr/lib \
    +		$(1)/usr/lib/pkgconfig $(2)/share/aclocal
    +
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/xslt-config \
    +		$(2)/bin/
    +
    +	ln -sf $(STAGING_DIR)/host/bin/xslt-config $(1)/usr/bin/xslt-config
    +
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
    +		$(2)/bin/xslt-config
    +
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/libxslt/* \
    +		$(1)/usr/include/libxslt/
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxslt.{la,a,so*} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxslt.pc \
    +		$(1)/usr/lib/pkgconfig/
    +
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/share/aclocal/* \
    +		$(2)/share/aclocal
    +endef
    +
    +define Build/InstallDev/Exslt
    +	$(INSTALL_DIR) $(1)/usr/include/libexslt $(1)/usr/lib/pkgconfig
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/libexslt/* \
    +		$(1)/usr/include/libexslt/
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libexslt.{la,a,so*} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libexslt.pc \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Build/InstallDev
    +	 $(if $(CONFIG_PACKAGE_libxslt),$(call Build/InstallDev/Xslt,$(1),$(2)))
    +	 $(if $(CONFIG_PACKAGE_libexslt),$(call Build/InstallDev/Exslt,$(1),$(2)))
    +endef
    +
    +define Package/libxslt/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxslt.so.* \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/libexslt/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libexslt.so.* \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/xsltproc/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/xsltproc \
    +		$(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,libxslt))
    +$(eval $(call BuildPackage,libexslt))
    +$(eval $(call BuildPackage,xsltproc))
    diff --git a/libs/libyaml/Makefile b/libs/libyaml/Makefile
    new file mode 100644
    index 0000000..920af1b
    --- /dev/null
    +++ b/libs/libyaml/Makefile
    @@ -0,0 +1,48 @@
    +#
    +# Copyright (C) 2008-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=yaml
    +PKG_VERSION:=0.1.3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://pyyaml.org/download/libyaml/
    +PKG_MD5SUM:=b8ab9064e8e0330423fe640de76608cd
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Package/libyaml
    +  SUBMENU:=Python
    +  SECTION:=lang
    +  CATEGORY:=Languages
    +  TITLE:=libyaml
    +  URL:=http://pyyaml.org/wiki/LibYAML
    +endef
    +
    +define Package/libyaml/description
    +  yaml library written in c
    +endef
    +
    +define Package/libyaml/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libyaml.so $(1)/usr/lib/
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libyaml.{a,la} $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libyaml))
    diff --git a/libs/lzo/Makefile b/libs/lzo/Makefile
    new file mode 100644
    index 0000000..3d47fb3
    --- /dev/null
    +++ b/libs/lzo/Makefile
    @@ -0,0 +1,60 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=lzo
    +PKG_VERSION:=2.04
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/lzo/download/
    +PKG_MD5SUM:=a383c7055a310e2a71b9ecd19cfea238
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/liblzo
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=A real-time data compression library
    +  URL:=http://www.oberhumer.com/opensource/lzo/
    +endef
    +
    +define Package/liblzo/description
    +LZO is a data compression library which is suitable for data de-/compression in
    +real-time. This means it favours speed over compression ratio.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +	)
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +MAKE_FLAGS += CFLAGS_O="$(TARGET_CFLAGS)"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/lzo $(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/liblzo/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo2.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,liblzo))
    diff --git a/libs/matrixssl/Makefile b/libs/matrixssl/Makefile
    new file mode 100644
    index 0000000..b3ae076
    --- /dev/null
    +++ b/libs/matrixssl/Makefile
    @@ -0,0 +1,57 @@
    +# 
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=matrixssl
    +PKG_VERSION:=1.2.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://nbd.vd-s.ath.cx/openwrt
    +PKG_MD5SUM:=771c1489488e62668d673478311d63ca
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
    +
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libmatrixssl
    +  SECTION:=libs
    +  SUBMENU:=SSL
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libpthread
    +  TITLE:=Embedded SSL implementation
    +  URL:=http://www.matrixssl.org/
    +endef
    +
    +define Build/Configure
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile
    +	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/src \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		DFLAGS="$(TARGET_CFLAGS) -Wall"
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/matrixSsl
    +	$(CP) $(PKG_BUILD_DIR)/matrixSsl.h $(1)/usr/include/matrixSsl/
    +	ln -sf matrixSsl/matrixSsl.h $(1)/usr/include/matrixSsl.h
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/src/libmatrixssl.so* $(1)/usr/lib/
    +endef
    +
    +define Package/libmatrixssl/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/src/libmatrixssl.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libmatrixssl))
    diff --git a/libs/matrixssl/patches/100-matrixssl_1.2.4.patch b/libs/matrixssl/patches/100-matrixssl_1.2.4.patch
    new file mode 100644
    index 0000000..b4a2bc9
    --- /dev/null
    +++ b/libs/matrixssl/patches/100-matrixssl_1.2.4.patch
    @@ -0,0 +1,1971 @@
    +diff -urN matrixssl.old/matrixSsl.h matrixssl/matrixSsl.h
    +--- matrixssl.old/matrixSsl.h	2005-02-23 22:43:10.000000000 +0100
    ++++ matrixssl/matrixSsl.h	2005-03-06 01:32:33.000000000 +0100
    +@@ -154,6 +154,29 @@
    + 
    + #define	SSL_OPTION_DELETE_SESSION		0
    + 
    ++
    ++#define SSL_MD5_DIGEST_LENGTH 16
    ++#define SSL_MD5_CONTEXT_DATA_SIZE 96
    ++
    ++typedef struct {
    ++	unsigned char data[SSL_MD5_CONTEXT_DATA_SIZE];
    ++} sslMd5Context_t;
    ++
    ++
    ++#define SSL_SHA1_DIGEST_LENGTH 20
    ++#define SSL_SHA1_CONTEXT_DATA_SIZE 96
    ++
    ++typedef struct {
    ++	unsigned char data[SSL_SHA1_CONTEXT_DATA_SIZE];
    ++} sslSha1Context_t;
    ++
    ++
    ++#define SSL_CIPHER_CONTEXT_DATA_SIZE 784
    ++
    ++typedef struct {
    ++	unsigned char data[SSL_CIPHER_CONTEXT_DATA_SIZE];
    ++} sslCipherContext_t;
    ++
    + /******************************************************************************/
    + /*
    + 	Explicitly import these apis on Windows.  If we're being included from the
    +@@ -220,6 +243,71 @@
    + 								char *privBuf, int32 privLen, char *privPass,
    + 								char *trustedCABuf, int32 trustedCALen);
    + 
    ++
    ++/*
    ++	ARC4 (RC4) API
    ++*/
    ++
    ++SSLPUBLIC void	matrixArc4Init(sslCipherContext_t *ctx, unsigned char *key, 
    ++						int keylen);
    ++
    ++SSLPUBLIC int	matrixArc4(sslCipherContext_t *ctx, unsigned char *in,
    ++						unsigned char *out, int len);
    ++
    ++/*
    ++	3DES (Triple-DES) API
    ++*/
    ++
    ++SSLPUBLIC int	matrix3desInit(sslCipherContext_t *ctx, unsigned char *IV,
    ++						unsigned char *key, int keylen);
    ++
    ++SSLPUBLIC int	matrix3desEncrypt(sslCipherContext_t *ctx, unsigned char *pt, 
    ++						unsigned char *ct, int len);
    ++
    ++SSLPUBLIC int	matrix3desDecrypt(sslCipherContext_t *ctx, unsigned char *ct,
    ++						unsigned char *pt, int len);
    ++
    ++/*
    ++	AES API
    ++*/
    ++
    ++SSLPUBLIC int	matrixAesInit(sslCipherContext_t *ctx, unsigned char *IV,
    ++						unsigned char *key, int keylen);
    ++
    ++SSLPUBLIC int	matrixAesEncrypt(sslCipherContext_t *ctx, unsigned char *pt,
    ++						unsigned char *ct, int len);
    ++
    ++SSLPUBLIC int	matrixAesDecrypt(sslCipherContext_t *ctx, unsigned char *ct,
    ++						unsigned char *pt, int len);
    ++
    ++/*
    ++	MD5 API
    ++*/
    ++
    ++SSLPUBLIC void	matrixMd5Init(sslMd5Context_t *ctx);
    ++
    ++SSLPUBLIC void	matrixMd5Update(sslMd5Context_t *ctx, const unsigned char *buf, 
    ++						unsigned long len);
    ++
    ++SSLPUBLIC int	matrixMd5Final(sslMd5Context_t *ctx, unsigned char *hash);
    ++
    ++SSLPUBLIC unsigned char *matrixMd5Digest(const unsigned char *buf, 
    ++						unsigned long len, unsigned char *hash);
    ++
    ++/*
    ++	SHA1 API
    ++*/
    ++
    ++SSLPUBLIC void	matrixSha1Init(sslSha1Context_t *ctx);
    ++
    ++SSLPUBLIC void	matrixSha1Update(sslSha1Context_t *ctx, const unsigned char *buf, 
    ++						unsigned long len);
    ++
    ++SSLPUBLIC int	matrixSha1Final(sslSha1Context_t *ctx, unsigned char *hash);
    ++
    ++SSLPUBLIC unsigned char *matrixSha1Digest(const unsigned char *buf, 
    ++						unsigned long len, unsigned char *hash);
    ++
    + /******************************************************************************/
    + 
    + #ifdef __cplusplus
    +diff -urN matrixssl.old/src/crypto/cryptoLayer.h matrixssl/src/crypto/cryptoLayer.h
    +--- matrixssl.old/src/crypto/cryptoLayer.h	2005-02-23 22:43:10.000000000 +0100
    ++++ matrixssl/src/crypto/cryptoLayer.h	2005-03-06 01:32:33.000000000 +0100
    +@@ -115,6 +115,7 @@
    + */
    + /* #define USE_FULL_CERT_PARSE */
    + /* #define USE_MD2 */
    ++#define USE_AES
    + 
    + /*
    + 	Now that we've set up the required defines, include the crypto layer header
    +diff -urN matrixssl.old/src/crypto/peersec/aes.c matrixssl/src/crypto/peersec/aes.c
    +--- matrixssl.old/src/crypto/peersec/aes.c	1970-01-01 01:00:00.000000000 +0100
    ++++ matrixssl/src/crypto/peersec/aes.c	2005-03-06 01:32:33.000000000 +0100
    +@@ -0,0 +1,1708 @@
    ++/*
    ++ *	aes.c
    ++ *
    ++ *	AES CBC block cipher implementation
    ++ */
    ++/*
    ++ *	Copyright (c) PeerSec Networks, 2002-2004. All Rights Reserved.
    ++ *	The latest version of this code is available at http://www.matrixssl.org
    ++ *
    ++ *	This software is open source; 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 General Public License does NOT permit incorporating this software 
    ++ *	into proprietary programs.  If you are unable to comply with the GPL, a 
    ++ *	commercial license for this software may be purchased from PeerSec Networks
    ++ *	at http://www.peersec.com
    ++ *	
    ++ *	This program is distributed in 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
    ++ *	http://www.gnu.org/copyleft/gpl.html
    ++ */
    ++/******************************************************************************/
    ++
    ++#include "../cryptoLayer.h"
    ++
    ++#ifdef USE_AES
    ++
    ++/* The precomputed tables for AES */
    ++/*
    ++Te0[x] = S [x].[02, 01, 01, 03];
    ++Te1[x] = S [x].[03, 02, 01, 01];
    ++Te2[x] = S [x].[01, 03, 02, 01];
    ++Te3[x] = S [x].[01, 01, 03, 02];
    ++Te4[x] = S [x].[01, 01, 01, 01];
    ++
    ++Td0[x] = Si[x].[0e, 09, 0d, 0b];
    ++Td1[x] = Si[x].[0b, 0e, 09, 0d];
    ++Td2[x] = Si[x].[0d, 0b, 0e, 09];
    ++Td3[x] = Si[x].[09, 0d, 0b, 0e];
    ++Td4[x] = Si[x].[01, 01, 01, 01];
    ++*/
    ++
    ++static const ulong32 TE0[256] = {
    ++    0xc66363a5UL, 0xf87c7c84UL, 0xee777799UL, 0xf67b7b8dUL,
    ++    0xfff2f20dUL, 0xd66b6bbdUL, 0xde6f6fb1UL, 0x91c5c554UL,
    ++    0x60303050UL, 0x02010103UL, 0xce6767a9UL, 0x562b2b7dUL,
    ++    0xe7fefe19UL, 0xb5d7d762UL, 0x4dababe6UL, 0xec76769aUL,
    ++    0x8fcaca45UL, 0x1f82829dUL, 0x89c9c940UL, 0xfa7d7d87UL,
    ++    0xeffafa15UL, 0xb25959ebUL, 0x8e4747c9UL, 0xfbf0f00bUL,
    ++    0x41adadecUL, 0xb3d4d467UL, 0x5fa2a2fdUL, 0x45afafeaUL,
    ++    0x239c9cbfUL, 0x53a4a4f7UL, 0xe4727296UL, 0x9bc0c05bUL,
    ++    0x75b7b7c2UL, 0xe1fdfd1cUL, 0x3d9393aeUL, 0x4c26266aUL,
    ++    0x6c36365aUL, 0x7e3f3f41UL, 0xf5f7f702UL, 0x83cccc4fUL,
    ++    0x6834345cUL, 0x51a5a5f4UL, 0xd1e5e534UL, 0xf9f1f108UL,
    ++    0xe2717193UL, 0xabd8d873UL, 0x62313153UL, 0x2a15153fUL,
    ++    0x0804040cUL, 0x95c7c752UL, 0x46232365UL, 0x9dc3c35eUL,
    ++    0x30181828UL, 0x379696a1UL, 0x0a05050fUL, 0x2f9a9ab5UL,
    ++    0x0e070709UL, 0x24121236UL, 0x1b80809bUL, 0xdfe2e23dUL,
    ++    0xcdebeb26UL, 0x4e272769UL, 0x7fb2b2cdUL, 0xea75759fUL,
    ++    0x1209091bUL, 0x1d83839eUL, 0x582c2c74UL, 0x341a1a2eUL,
    ++    0x361b1b2dUL, 0xdc6e6eb2UL, 0xb45a5aeeUL, 0x5ba0a0fbUL,
    ++    0xa45252f6UL, 0x763b3b4dUL, 0xb7d6d661UL, 0x7db3b3ceUL,
    ++    0x5229297bUL, 0xdde3e33eUL, 0x5e2f2f71UL, 0x13848497UL,
    ++    0xa65353f5UL, 0xb9d1d168UL, 0x00000000UL, 0xc1eded2cUL,
    ++    0x40202060UL, 0xe3fcfc1fUL, 0x79b1b1c8UL, 0xb65b5bedUL,
    ++    0xd46a6abeUL, 0x8dcbcb46UL, 0x67bebed9UL, 0x7239394bUL,
    ++    0x944a4adeUL, 0x984c4cd4UL, 0xb05858e8UL, 0x85cfcf4aUL,
    ++    0xbbd0d06bUL, 0xc5efef2aUL, 0x4faaaae5UL, 0xedfbfb16UL,
    ++    0x864343c5UL, 0x9a4d4dd7UL, 0x66333355UL, 0x11858594UL,
    ++    0x8a4545cfUL, 0xe9f9f910UL, 0x04020206UL, 0xfe7f7f81UL,
    ++    0xa05050f0UL, 0x783c3c44UL, 0x259f9fbaUL, 0x4ba8a8e3UL,
    ++    0xa25151f3UL, 0x5da3a3feUL, 0x804040c0UL, 0x058f8f8aUL,
    ++    0x3f9292adUL, 0x219d9dbcUL, 0x70383848UL, 0xf1f5f504UL,
    ++    0x63bcbcdfUL, 0x77b6b6c1UL, 0xafdada75UL, 0x42212163UL,
    ++    0x20101030UL, 0xe5ffff1aUL, 0xfdf3f30eUL, 0xbfd2d26dUL,
    ++    0x81cdcd4cUL, 0x180c0c14UL, 0x26131335UL, 0xc3ecec2fUL,
    ++    0xbe5f5fe1UL, 0x359797a2UL, 0x884444ccUL, 0x2e171739UL,
    ++    0x93c4c457UL, 0x55a7a7f2UL, 0xfc7e7e82UL, 0x7a3d3d47UL,
    ++    0xc86464acUL, 0xba5d5de7UL, 0x3219192bUL, 0xe6737395UL,
    ++    0xc06060a0UL, 0x19818198UL, 0x9e4f4fd1UL, 0xa3dcdc7fUL,
    ++    0x44222266UL, 0x542a2a7eUL, 0x3b9090abUL, 0x0b888883UL,
    ++    0x8c4646caUL, 0xc7eeee29UL, 0x6bb8b8d3UL, 0x2814143cUL,
    ++    0xa7dede79UL, 0xbc5e5ee2UL, 0x160b0b1dUL, 0xaddbdb76UL,
    ++    0xdbe0e03bUL, 0x64323256UL, 0x743a3a4eUL, 0x140a0a1eUL,
    ++    0x924949dbUL, 0x0c06060aUL, 0x4824246cUL, 0xb85c5ce4UL,
    ++    0x9fc2c25dUL, 0xbdd3d36eUL, 0x43acacefUL, 0xc46262a6UL,
    ++    0x399191a8UL, 0x319595a4UL, 0xd3e4e437UL, 0xf279798bUL,
    ++    0xd5e7e732UL, 0x8bc8c843UL, 0x6e373759UL, 0xda6d6db7UL,
    ++    0x018d8d8cUL, 0xb1d5d564UL, 0x9c4e4ed2UL, 0x49a9a9e0UL,
    ++    0xd86c6cb4UL, 0xac5656faUL, 0xf3f4f407UL, 0xcfeaea25UL,
    ++    0xca6565afUL, 0xf47a7a8eUL, 0x47aeaee9UL, 0x10080818UL,
    ++    0x6fbabad5UL, 0xf0787888UL, 0x4a25256fUL, 0x5c2e2e72UL,
    ++    0x381c1c24UL, 0x57a6a6f1UL, 0x73b4b4c7UL, 0x97c6c651UL,
    ++    0xcbe8e823UL, 0xa1dddd7cUL, 0xe874749cUL, 0x3e1f1f21UL,
    ++    0x964b4bddUL, 0x61bdbddcUL, 0x0d8b8b86UL, 0x0f8a8a85UL,
    ++    0xe0707090UL, 0x7c3e3e42UL, 0x71b5b5c4UL, 0xcc6666aaUL,
    ++    0x904848d8UL, 0x06030305UL, 0xf7f6f601UL, 0x1c0e0e12UL,
    ++    0xc26161a3UL, 0x6a35355fUL, 0xae5757f9UL, 0x69b9b9d0UL,
    ++    0x17868691UL, 0x99c1c158UL, 0x3a1d1d27UL, 0x279e9eb9UL,
    ++    0xd9e1e138UL, 0xebf8f813UL, 0x2b9898b3UL, 0x22111133UL,
    ++    0xd26969bbUL, 0xa9d9d970UL, 0x078e8e89UL, 0x339494a7UL,
    ++    0x2d9b9bb6UL, 0x3c1e1e22UL, 0x15878792UL, 0xc9e9e920UL,
    ++    0x87cece49UL, 0xaa5555ffUL, 0x50282878UL, 0xa5dfdf7aUL,
    ++    0x038c8c8fUL, 0x59a1a1f8UL, 0x09898980UL, 0x1a0d0d17UL,
    ++    0x65bfbfdaUL, 0xd7e6e631UL, 0x844242c6UL, 0xd06868b8UL,
    ++    0x824141c3UL, 0x299999b0UL, 0x5a2d2d77UL, 0x1e0f0f11UL,
    ++    0x7bb0b0cbUL, 0xa85454fcUL, 0x6dbbbbd6UL, 0x2c16163aUL,
    ++};
    ++
    ++static const ulong32 Te4[256] = {
    ++    0x63636363UL, 0x7c7c7c7cUL, 0x77777777UL, 0x7b7b7b7bUL,
    ++    0xf2f2f2f2UL, 0x6b6b6b6bUL, 0x6f6f6f6fUL, 0xc5c5c5c5UL,
    ++    0x30303030UL, 0x01010101UL, 0x67676767UL, 0x2b2b2b2bUL,
    ++    0xfefefefeUL, 0xd7d7d7d7UL, 0xababababUL, 0x76767676UL,
    ++    0xcacacacaUL, 0x82828282UL, 0xc9c9c9c9UL, 0x7d7d7d7dUL,
    ++    0xfafafafaUL, 0x59595959UL, 0x47474747UL, 0xf0f0f0f0UL,
    ++    0xadadadadUL, 0xd4d4d4d4UL, 0xa2a2a2a2UL, 0xafafafafUL,
    ++    0x9c9c9c9cUL, 0xa4a4a4a4UL, 0x72727272UL, 0xc0c0c0c0UL,
    ++    0xb7b7b7b7UL, 0xfdfdfdfdUL, 0x93939393UL, 0x26262626UL,
    ++    0x36363636UL, 0x3f3f3f3fUL, 0xf7f7f7f7UL, 0xccccccccUL,
    ++    0x34343434UL, 0xa5a5a5a5UL, 0xe5e5e5e5UL, 0xf1f1f1f1UL,
    ++    0x71717171UL, 0xd8d8d8d8UL, 0x31313131UL, 0x15151515UL,
    ++    0x04040404UL, 0xc7c7c7c7UL, 0x23232323UL, 0xc3c3c3c3UL,
    ++    0x18181818UL, 0x96969696UL, 0x05050505UL, 0x9a9a9a9aUL,
    ++    0x07070707UL, 0x12121212UL, 0x80808080UL, 0xe2e2e2e2UL,
    ++    0xebebebebUL, 0x27272727UL, 0xb2b2b2b2UL, 0x75757575UL,
    ++    0x09090909UL, 0x83838383UL, 0x2c2c2c2cUL, 0x1a1a1a1aUL,
    ++    0x1b1b1b1bUL, 0x6e6e6e6eUL, 0x5a5a5a5aUL, 0xa0a0a0a0UL,
    ++    0x52525252UL, 0x3b3b3b3bUL, 0xd6d6d6d6UL, 0xb3b3b3b3UL,
    ++    0x29292929UL, 0xe3e3e3e3UL, 0x2f2f2f2fUL, 0x84848484UL,
    ++    0x53535353UL, 0xd1d1d1d1UL, 0x00000000UL, 0xededededUL,
    ++    0x20202020UL, 0xfcfcfcfcUL, 0xb1b1b1b1UL, 0x5b5b5b5bUL,
    ++    0x6a6a6a6aUL, 0xcbcbcbcbUL, 0xbebebebeUL, 0x39393939UL,
    ++    0x4a4a4a4aUL, 0x4c4c4c4cUL, 0x58585858UL, 0xcfcfcfcfUL,
    ++    0xd0d0d0d0UL, 0xefefefefUL, 0xaaaaaaaaUL, 0xfbfbfbfbUL,
    ++    0x43434343UL, 0x4d4d4d4dUL, 0x33333333UL, 0x85858585UL,
    ++    0x45454545UL, 0xf9f9f9f9UL, 0x02020202UL, 0x7f7f7f7fUL,
    ++    0x50505050UL, 0x3c3c3c3cUL, 0x9f9f9f9fUL, 0xa8a8a8a8UL,
    ++    0x51515151UL, 0xa3a3a3a3UL, 0x40404040UL, 0x8f8f8f8fUL,
    ++    0x92929292UL, 0x9d9d9d9dUL, 0x38383838UL, 0xf5f5f5f5UL,
    ++    0xbcbcbcbcUL, 0xb6b6b6b6UL, 0xdadadadaUL, 0x21212121UL,
    ++    0x10101010UL, 0xffffffffUL, 0xf3f3f3f3UL, 0xd2d2d2d2UL,
    ++    0xcdcdcdcdUL, 0x0c0c0c0cUL, 0x13131313UL, 0xececececUL,
    ++    0x5f5f5f5fUL, 0x97979797UL, 0x44444444UL, 0x17171717UL,
    ++    0xc4c4c4c4UL, 0xa7a7a7a7UL, 0x7e7e7e7eUL, 0x3d3d3d3dUL,
    ++    0x64646464UL, 0x5d5d5d5dUL, 0x19191919UL, 0x73737373UL,
    ++    0x60606060UL, 0x81818181UL, 0x4f4f4f4fUL, 0xdcdcdcdcUL,
    ++    0x22222222UL, 0x2a2a2a2aUL, 0x90909090UL, 0x88888888UL,
    ++    0x46464646UL, 0xeeeeeeeeUL, 0xb8b8b8b8UL, 0x14141414UL,
    ++    0xdedededeUL, 0x5e5e5e5eUL, 0x0b0b0b0bUL, 0xdbdbdbdbUL,
    ++    0xe0e0e0e0UL, 0x32323232UL, 0x3a3a3a3aUL, 0x0a0a0a0aUL,
    ++    0x49494949UL, 0x06060606UL, 0x24242424UL, 0x5c5c5c5cUL,
    ++    0xc2c2c2c2UL, 0xd3d3d3d3UL, 0xacacacacUL, 0x62626262UL,
    ++    0x91919191UL, 0x95959595UL, 0xe4e4e4e4UL, 0x79797979UL,
    ++    0xe7e7e7e7UL, 0xc8c8c8c8UL, 0x37373737UL, 0x6d6d6d6dUL,
    ++    0x8d8d8d8dUL, 0xd5d5d5d5UL, 0x4e4e4e4eUL, 0xa9a9a9a9UL,
    ++    0x6c6c6c6cUL, 0x56565656UL, 0xf4f4f4f4UL, 0xeaeaeaeaUL,
    ++    0x65656565UL, 0x7a7a7a7aUL, 0xaeaeaeaeUL, 0x08080808UL,
    ++    0xbabababaUL, 0x78787878UL, 0x25252525UL, 0x2e2e2e2eUL,
    ++    0x1c1c1c1cUL, 0xa6a6a6a6UL, 0xb4b4b4b4UL, 0xc6c6c6c6UL,
    ++    0xe8e8e8e8UL, 0xddddddddUL, 0x74747474UL, 0x1f1f1f1fUL,
    ++    0x4b4b4b4bUL, 0xbdbdbdbdUL, 0x8b8b8b8bUL, 0x8a8a8a8aUL,
    ++    0x70707070UL, 0x3e3e3e3eUL, 0xb5b5b5b5UL, 0x66666666UL,
    ++    0x48484848UL, 0x03030303UL, 0xf6f6f6f6UL, 0x0e0e0e0eUL,
    ++    0x61616161UL, 0x35353535UL, 0x57575757UL, 0xb9b9b9b9UL,
    ++    0x86868686UL, 0xc1c1c1c1UL, 0x1d1d1d1dUL, 0x9e9e9e9eUL,
    ++    0xe1e1e1e1UL, 0xf8f8f8f8UL, 0x98989898UL, 0x11111111UL,
    ++    0x69696969UL, 0xd9d9d9d9UL, 0x8e8e8e8eUL, 0x94949494UL,
    ++    0x9b9b9b9bUL, 0x1e1e1e1eUL, 0x87878787UL, 0xe9e9e9e9UL,
    ++    0xcecececeUL, 0x55555555UL, 0x28282828UL, 0xdfdfdfdfUL,
    ++    0x8c8c8c8cUL, 0xa1a1a1a1UL, 0x89898989UL, 0x0d0d0d0dUL,
    ++    0xbfbfbfbfUL, 0xe6e6e6e6UL, 0x42424242UL, 0x68686868UL,
    ++    0x41414141UL, 0x99999999UL, 0x2d2d2d2dUL, 0x0f0f0f0fUL,
    ++    0xb0b0b0b0UL, 0x54545454UL, 0xbbbbbbbbUL, 0x16161616UL,
    ++};
    ++
    ++static const ulong32 TD0[256] = {
    ++    0x51f4a750UL, 0x7e416553UL, 0x1a17a4c3UL, 0x3a275e96UL,
    ++    0x3bab6bcbUL, 0x1f9d45f1UL, 0xacfa58abUL, 0x4be30393UL,
    ++    0x2030fa55UL, 0xad766df6UL, 0x88cc7691UL, 0xf5024c25UL,
    ++    0x4fe5d7fcUL, 0xc52acbd7UL, 0x26354480UL, 0xb562a38fUL,
    ++    0xdeb15a49UL, 0x25ba1b67UL, 0x45ea0e98UL, 0x5dfec0e1UL,
    ++    0xc32f7502UL, 0x814cf012UL, 0x8d4697a3UL, 0x6bd3f9c6UL,
    ++    0x038f5fe7UL, 0x15929c95UL, 0xbf6d7aebUL, 0x955259daUL,
    ++    0xd4be832dUL, 0x587421d3UL, 0x49e06929UL, 0x8ec9c844UL,
    ++    0x75c2896aUL, 0xf48e7978UL, 0x99583e6bUL, 0x27b971ddUL,
    ++    0xbee14fb6UL, 0xf088ad17UL, 0xc920ac66UL, 0x7dce3ab4UL,
    ++    0x63df4a18UL, 0xe51a3182UL, 0x97513360UL, 0x62537f45UL,
    ++    0xb16477e0UL, 0xbb6bae84UL, 0xfe81a01cUL, 0xf9082b94UL,
    ++    0x70486858UL, 0x8f45fd19UL, 0x94de6c87UL, 0x527bf8b7UL,
    ++    0xab73d323UL, 0x724b02e2UL, 0xe31f8f57UL, 0x6655ab2aUL,
    ++    0xb2eb2807UL, 0x2fb5c203UL, 0x86c57b9aUL, 0xd33708a5UL,
    ++    0x302887f2UL, 0x23bfa5b2UL, 0x02036abaUL, 0xed16825cUL,
    ++    0x8acf1c2bUL, 0xa779b492UL, 0xf307f2f0UL, 0x4e69e2a1UL,
    ++    0x65daf4cdUL, 0x0605bed5UL, 0xd134621fUL, 0xc4a6fe8aUL,
    ++    0x342e539dUL, 0xa2f355a0UL, 0x058ae132UL, 0xa4f6eb75UL,
    ++    0x0b83ec39UL, 0x4060efaaUL, 0x5e719f06UL, 0xbd6e1051UL,
    ++    0x3e218af9UL, 0x96dd063dUL, 0xdd3e05aeUL, 0x4de6bd46UL,
    ++    0x91548db5UL, 0x71c45d05UL, 0x0406d46fUL, 0x605015ffUL,
    ++    0x1998fb24UL, 0xd6bde997UL, 0x894043ccUL, 0x67d99e77UL,
    ++    0xb0e842bdUL, 0x07898b88UL, 0xe7195b38UL, 0x79c8eedbUL,
    ++    0xa17c0a47UL, 0x7c420fe9UL, 0xf8841ec9UL, 0x00000000UL,
    ++    0x09808683UL, 0x322bed48UL, 0x1e1170acUL, 0x6c5a724eUL,
    ++    0xfd0efffbUL, 0x0f853856UL, 0x3daed51eUL, 0x362d3927UL,
    ++    0x0a0fd964UL, 0x685ca621UL, 0x9b5b54d1UL, 0x24362e3aUL,
    ++    0x0c0a67b1UL, 0x9357e70fUL, 0xb4ee96d2UL, 0x1b9b919eUL,
    ++    0x80c0c54fUL, 0x61dc20a2UL, 0x5a774b69UL, 0x1c121a16UL,
    ++    0xe293ba0aUL, 0xc0a02ae5UL, 0x3c22e043UL, 0x121b171dUL,
    ++    0x0e090d0bUL, 0xf28bc7adUL, 0x2db6a8b9UL, 0x141ea9c8UL,
    ++    0x57f11985UL, 0xaf75074cUL, 0xee99ddbbUL, 0xa37f60fdUL,
    ++    0xf701269fUL, 0x5c72f5bcUL, 0x44663bc5UL, 0x5bfb7e34UL,
    ++    0x8b432976UL, 0xcb23c6dcUL, 0xb6edfc68UL, 0xb8e4f163UL,
    ++    0xd731dccaUL, 0x42638510UL, 0x13972240UL, 0x84c61120UL,
    ++    0x854a247dUL, 0xd2bb3df8UL, 0xaef93211UL, 0xc729a16dUL,
    ++    0x1d9e2f4bUL, 0xdcb230f3UL, 0x0d8652ecUL, 0x77c1e3d0UL,
    ++    0x2bb3166cUL, 0xa970b999UL, 0x119448faUL, 0x47e96422UL,
    ++    0xa8fc8cc4UL, 0xa0f03f1aUL, 0x567d2cd8UL, 0x223390efUL,
    ++    0x87494ec7UL, 0xd938d1c1UL, 0x8ccaa2feUL, 0x98d40b36UL,
    ++    0xa6f581cfUL, 0xa57ade28UL, 0xdab78e26UL, 0x3fadbfa4UL,
    ++    0x2c3a9de4UL, 0x5078920dUL, 0x6a5fcc9bUL, 0x547e4662UL,
    ++    0xf68d13c2UL, 0x90d8b8e8UL, 0x2e39f75eUL, 0x82c3aff5UL,
    ++    0x9f5d80beUL, 0x69d0937cUL, 0x6fd52da9UL, 0xcf2512b3UL,
    ++    0xc8ac993bUL, 0x10187da7UL, 0xe89c636eUL, 0xdb3bbb7bUL,
    ++    0xcd267809UL, 0x6e5918f4UL, 0xec9ab701UL, 0x834f9aa8UL,
    ++    0xe6956e65UL, 0xaaffe67eUL, 0x21bccf08UL, 0xef15e8e6UL,
    ++    0xbae79bd9UL, 0x4a6f36ceUL, 0xea9f09d4UL, 0x29b07cd6UL,
    ++    0x31a4b2afUL, 0x2a3f2331UL, 0xc6a59430UL, 0x35a266c0UL,
    ++    0x744ebc37UL, 0xfc82caa6UL, 0xe090d0b0UL, 0x33a7d815UL,
    ++    0xf104984aUL, 0x41ecdaf7UL, 0x7fcd500eUL, 0x1791f62fUL,
    ++    0x764dd68dUL, 0x43efb04dUL, 0xccaa4d54UL, 0xe49604dfUL,
    ++    0x9ed1b5e3UL, 0x4c6a881bUL, 0xc12c1fb8UL, 0x4665517fUL,
    ++    0x9d5eea04UL, 0x018c355dUL, 0xfa877473UL, 0xfb0b412eUL,
    ++    0xb3671d5aUL, 0x92dbd252UL, 0xe9105633UL, 0x6dd64713UL,
    ++    0x9ad7618cUL, 0x37a10c7aUL, 0x59f8148eUL, 0xeb133c89UL,
    ++    0xcea927eeUL, 0xb761c935UL, 0xe11ce5edUL, 0x7a47b13cUL,
    ++    0x9cd2df59UL, 0x55f2733fUL, 0x1814ce79UL, 0x73c737bfUL,
    ++    0x53f7cdeaUL, 0x5ffdaa5bUL, 0xdf3d6f14UL, 0x7844db86UL,
    ++    0xcaaff381UL, 0xb968c43eUL, 0x3824342cUL, 0xc2a3405fUL,
    ++    0x161dc372UL, 0xbce2250cUL, 0x283c498bUL, 0xff0d9541UL,
    ++    0x39a80171UL, 0x080cb3deUL, 0xd8b4e49cUL, 0x6456c190UL,
    ++    0x7bcb8461UL, 0xd532b670UL, 0x486c5c74UL, 0xd0b85742UL,
    ++};
    ++
    ++static const ulong32 Td4[256] = {
    ++    0x52525252UL, 0x09090909UL, 0x6a6a6a6aUL, 0xd5d5d5d5UL,
    ++    0x30303030UL, 0x36363636UL, 0xa5a5a5a5UL, 0x38383838UL,
    ++    0xbfbfbfbfUL, 0x40404040UL, 0xa3a3a3a3UL, 0x9e9e9e9eUL,
    ++    0x81818181UL, 0xf3f3f3f3UL, 0xd7d7d7d7UL, 0xfbfbfbfbUL,
    ++    0x7c7c7c7cUL, 0xe3e3e3e3UL, 0x39393939UL, 0x82828282UL,
    ++    0x9b9b9b9bUL, 0x2f2f2f2fUL, 0xffffffffUL, 0x87878787UL,
    ++    0x34343434UL, 0x8e8e8e8eUL, 0x43434343UL, 0x44444444UL,
    ++    0xc4c4c4c4UL, 0xdedededeUL, 0xe9e9e9e9UL, 0xcbcbcbcbUL,
    ++    0x54545454UL, 0x7b7b7b7bUL, 0x94949494UL, 0x32323232UL,
    ++    0xa6a6a6a6UL, 0xc2c2c2c2UL, 0x23232323UL, 0x3d3d3d3dUL,
    ++    0xeeeeeeeeUL, 0x4c4c4c4cUL, 0x95959595UL, 0x0b0b0b0bUL,
    ++    0x42424242UL, 0xfafafafaUL, 0xc3c3c3c3UL, 0x4e4e4e4eUL,
    ++    0x08080808UL, 0x2e2e2e2eUL, 0xa1a1a1a1UL, 0x66666666UL,
    ++    0x28282828UL, 0xd9d9d9d9UL, 0x24242424UL, 0xb2b2b2b2UL,
    ++    0x76767676UL, 0x5b5b5b5bUL, 0xa2a2a2a2UL, 0x49494949UL,
    ++    0x6d6d6d6dUL, 0x8b8b8b8bUL, 0xd1d1d1d1UL, 0x25252525UL,
    ++    0x72727272UL, 0xf8f8f8f8UL, 0xf6f6f6f6UL, 0x64646464UL,
    ++    0x86868686UL, 0x68686868UL, 0x98989898UL, 0x16161616UL,
    ++    0xd4d4d4d4UL, 0xa4a4a4a4UL, 0x5c5c5c5cUL, 0xccccccccUL,
    ++    0x5d5d5d5dUL, 0x65656565UL, 0xb6b6b6b6UL, 0x92929292UL,
    ++    0x6c6c6c6cUL, 0x70707070UL, 0x48484848UL, 0x50505050UL,
    ++    0xfdfdfdfdUL, 0xededededUL, 0xb9b9b9b9UL, 0xdadadadaUL,
    ++    0x5e5e5e5eUL, 0x15151515UL, 0x46464646UL, 0x57575757UL,
    ++    0xa7a7a7a7UL, 0x8d8d8d8dUL, 0x9d9d9d9dUL, 0x84848484UL,
    ++    0x90909090UL, 0xd8d8d8d8UL, 0xababababUL, 0x00000000UL,
    ++    0x8c8c8c8cUL, 0xbcbcbcbcUL, 0xd3d3d3d3UL, 0x0a0a0a0aUL,
    ++    0xf7f7f7f7UL, 0xe4e4e4e4UL, 0x58585858UL, 0x05050505UL,
    ++    0xb8b8b8b8UL, 0xb3b3b3b3UL, 0x45454545UL, 0x06060606UL,
    ++    0xd0d0d0d0UL, 0x2c2c2c2cUL, 0x1e1e1e1eUL, 0x8f8f8f8fUL,
    ++    0xcacacacaUL, 0x3f3f3f3fUL, 0x0f0f0f0fUL, 0x02020202UL,
    ++    0xc1c1c1c1UL, 0xafafafafUL, 0xbdbdbdbdUL, 0x03030303UL,
    ++    0x01010101UL, 0x13131313UL, 0x8a8a8a8aUL, 0x6b6b6b6bUL,
    ++    0x3a3a3a3aUL, 0x91919191UL, 0x11111111UL, 0x41414141UL,
    ++    0x4f4f4f4fUL, 0x67676767UL, 0xdcdcdcdcUL, 0xeaeaeaeaUL,
    ++    0x97979797UL, 0xf2f2f2f2UL, 0xcfcfcfcfUL, 0xcecececeUL,
    ++    0xf0f0f0f0UL, 0xb4b4b4b4UL, 0xe6e6e6e6UL, 0x73737373UL,
    ++    0x96969696UL, 0xacacacacUL, 0x74747474UL, 0x22222222UL,
    ++    0xe7e7e7e7UL, 0xadadadadUL, 0x35353535UL, 0x85858585UL,
    ++    0xe2e2e2e2UL, 0xf9f9f9f9UL, 0x37373737UL, 0xe8e8e8e8UL,
    ++    0x1c1c1c1cUL, 0x75757575UL, 0xdfdfdfdfUL, 0x6e6e6e6eUL,
    ++    0x47474747UL, 0xf1f1f1f1UL, 0x1a1a1a1aUL, 0x71717171UL,
    ++    0x1d1d1d1dUL, 0x29292929UL, 0xc5c5c5c5UL, 0x89898989UL,
    ++    0x6f6f6f6fUL, 0xb7b7b7b7UL, 0x62626262UL, 0x0e0e0e0eUL,
    ++    0xaaaaaaaaUL, 0x18181818UL, 0xbebebebeUL, 0x1b1b1b1bUL,
    ++    0xfcfcfcfcUL, 0x56565656UL, 0x3e3e3e3eUL, 0x4b4b4b4bUL,
    ++    0xc6c6c6c6UL, 0xd2d2d2d2UL, 0x79797979UL, 0x20202020UL,
    ++    0x9a9a9a9aUL, 0xdbdbdbdbUL, 0xc0c0c0c0UL, 0xfefefefeUL,
    ++    0x78787878UL, 0xcdcdcdcdUL, 0x5a5a5a5aUL, 0xf4f4f4f4UL,
    ++    0x1f1f1f1fUL, 0xddddddddUL, 0xa8a8a8a8UL, 0x33333333UL,
    ++    0x88888888UL, 0x07070707UL, 0xc7c7c7c7UL, 0x31313131UL,
    ++    0xb1b1b1b1UL, 0x12121212UL, 0x10101010UL, 0x59595959UL,
    ++    0x27272727UL, 0x80808080UL, 0xececececUL, 0x5f5f5f5fUL,
    ++    0x60606060UL, 0x51515151UL, 0x7f7f7f7fUL, 0xa9a9a9a9UL,
    ++    0x19191919UL, 0xb5b5b5b5UL, 0x4a4a4a4aUL, 0x0d0d0d0dUL,
    ++    0x2d2d2d2dUL, 0xe5e5e5e5UL, 0x7a7a7a7aUL, 0x9f9f9f9fUL,
    ++    0x93939393UL, 0xc9c9c9c9UL, 0x9c9c9c9cUL, 0xefefefefUL,
    ++    0xa0a0a0a0UL, 0xe0e0e0e0UL, 0x3b3b3b3bUL, 0x4d4d4d4dUL,
    ++    0xaeaeaeaeUL, 0x2a2a2a2aUL, 0xf5f5f5f5UL, 0xb0b0b0b0UL,
    ++    0xc8c8c8c8UL, 0xebebebebUL, 0xbbbbbbbbUL, 0x3c3c3c3cUL,
    ++    0x83838383UL, 0x53535353UL, 0x99999999UL, 0x61616161UL,
    ++    0x17171717UL, 0x2b2b2b2bUL, 0x04040404UL, 0x7e7e7e7eUL,
    ++    0xbabababaUL, 0x77777777UL, 0xd6d6d6d6UL, 0x26262626UL,
    ++    0xe1e1e1e1UL, 0x69696969UL, 0x14141414UL, 0x63636363UL,
    ++    0x55555555UL, 0x21212121UL, 0x0c0c0c0cUL, 0x7d7d7d7dUL,
    ++};
    ++
    ++#ifdef SMALL_CODE
    ++
    ++#define Te0(x) TE0[x]
    ++#define Te1(x) ROR(TE0[x], 8)
    ++#define Te2(x) ROR(TE0[x], 16)
    ++#define Te3(x) ROR(TE0[x], 24)
    ++
    ++#define Td0(x) TD0[x]
    ++#define Td1(x) ROR(TD0[x], 8)
    ++#define Td2(x) ROR(TD0[x], 16)
    ++#define Td3(x) ROR(TD0[x], 24)
    ++
    ++#define Te4_0 0x000000FF & Te4
    ++#define Te4_1 0x0000FF00 & Te4
    ++#define Te4_2 0x00FF0000 & Te4
    ++#define Te4_3 0xFF000000 & Te4
    ++
    ++#else /* SMALL_CODE */
    ++
    ++#define Te0(x) TE0[x]
    ++#define Te1(x) TE1[x]
    ++#define Te2(x) TE2[x]
    ++#define Te3(x) TE3[x]
    ++
    ++#define Td0(x) TD0[x]
    ++#define Td1(x) TD1[x]
    ++#define Td2(x) TD2[x]
    ++#define Td3(x) TD3[x]
    ++
    ++static const ulong32 TE1[256] = {
    ++    0xa5c66363UL, 0x84f87c7cUL, 0x99ee7777UL, 0x8df67b7bUL,
    ++    0x0dfff2f2UL, 0xbdd66b6bUL, 0xb1de6f6fUL, 0x5491c5c5UL,
    ++    0x50603030UL, 0x03020101UL, 0xa9ce6767UL, 0x7d562b2bUL,
    ++    0x19e7fefeUL, 0x62b5d7d7UL, 0xe64dababUL, 0x9aec7676UL,
    ++    0x458fcacaUL, 0x9d1f8282UL, 0x4089c9c9UL, 0x87fa7d7dUL,
    ++    0x15effafaUL, 0xebb25959UL, 0xc98e4747UL, 0x0bfbf0f0UL,
    ++    0xec41adadUL, 0x67b3d4d4UL, 0xfd5fa2a2UL, 0xea45afafUL,
    ++    0xbf239c9cUL, 0xf753a4a4UL, 0x96e47272UL, 0x5b9bc0c0UL,
    ++    0xc275b7b7UL, 0x1ce1fdfdUL, 0xae3d9393UL, 0x6a4c2626UL,
    ++    0x5a6c3636UL, 0x417e3f3fUL, 0x02f5f7f7UL, 0x4f83ccccUL,
    ++    0x5c683434UL, 0xf451a5a5UL, 0x34d1e5e5UL, 0x08f9f1f1UL,
    ++    0x93e27171UL, 0x73abd8d8UL, 0x53623131UL, 0x3f2a1515UL,
    ++    0x0c080404UL, 0x5295c7c7UL, 0x65462323UL, 0x5e9dc3c3UL,
    ++    0x28301818UL, 0xa1379696UL, 0x0f0a0505UL, 0xb52f9a9aUL,
    ++    0x090e0707UL, 0x36241212UL, 0x9b1b8080UL, 0x3ddfe2e2UL,
    ++    0x26cdebebUL, 0x694e2727UL, 0xcd7fb2b2UL, 0x9fea7575UL,
    ++    0x1b120909UL, 0x9e1d8383UL, 0x74582c2cUL, 0x2e341a1aUL,
    ++    0x2d361b1bUL, 0xb2dc6e6eUL, 0xeeb45a5aUL, 0xfb5ba0a0UL,
    ++    0xf6a45252UL, 0x4d763b3bUL, 0x61b7d6d6UL, 0xce7db3b3UL,
    ++    0x7b522929UL, 0x3edde3e3UL, 0x715e2f2fUL, 0x97138484UL,
    ++    0xf5a65353UL, 0x68b9d1d1UL, 0x00000000UL, 0x2cc1ededUL,
    ++    0x60402020UL, 0x1fe3fcfcUL, 0xc879b1b1UL, 0xedb65b5bUL,
    ++    0xbed46a6aUL, 0x468dcbcbUL, 0xd967bebeUL, 0x4b723939UL,
    ++    0xde944a4aUL, 0xd4984c4cUL, 0xe8b05858UL, 0x4a85cfcfUL,
    ++    0x6bbbd0d0UL, 0x2ac5efefUL, 0xe54faaaaUL, 0x16edfbfbUL,
    ++    0xc5864343UL, 0xd79a4d4dUL, 0x55663333UL, 0x94118585UL,
    ++    0xcf8a4545UL, 0x10e9f9f9UL, 0x06040202UL, 0x81fe7f7fUL,
    ++    0xf0a05050UL, 0x44783c3cUL, 0xba259f9fUL, 0xe34ba8a8UL,
    ++    0xf3a25151UL, 0xfe5da3a3UL, 0xc0804040UL, 0x8a058f8fUL,
    ++    0xad3f9292UL, 0xbc219d9dUL, 0x48703838UL, 0x04f1f5f5UL,
    ++    0xdf63bcbcUL, 0xc177b6b6UL, 0x75afdadaUL, 0x63422121UL,
    ++    0x30201010UL, 0x1ae5ffffUL, 0x0efdf3f3UL, 0x6dbfd2d2UL,
    ++    0x4c81cdcdUL, 0x14180c0cUL, 0x35261313UL, 0x2fc3ececUL,
    ++    0xe1be5f5fUL, 0xa2359797UL, 0xcc884444UL, 0x392e1717UL,
    ++    0x5793c4c4UL, 0xf255a7a7UL, 0x82fc7e7eUL, 0x477a3d3dUL,
    ++    0xacc86464UL, 0xe7ba5d5dUL, 0x2b321919UL, 0x95e67373UL,
    ++    0xa0c06060UL, 0x98198181UL, 0xd19e4f4fUL, 0x7fa3dcdcUL,
    ++    0x66442222UL, 0x7e542a2aUL, 0xab3b9090UL, 0x830b8888UL,
    ++    0xca8c4646UL, 0x29c7eeeeUL, 0xd36bb8b8UL, 0x3c281414UL,
    ++    0x79a7dedeUL, 0xe2bc5e5eUL, 0x1d160b0bUL, 0x76addbdbUL,
    ++    0x3bdbe0e0UL, 0x56643232UL, 0x4e743a3aUL, 0x1e140a0aUL,
    ++    0xdb924949UL, 0x0a0c0606UL, 0x6c482424UL, 0xe4b85c5cUL,
    ++    0x5d9fc2c2UL, 0x6ebdd3d3UL, 0xef43acacUL, 0xa6c46262UL,
    ++    0xa8399191UL, 0xa4319595UL, 0x37d3e4e4UL, 0x8bf27979UL,
    ++    0x32d5e7e7UL, 0x438bc8c8UL, 0x596e3737UL, 0xb7da6d6dUL,
    ++    0x8c018d8dUL, 0x64b1d5d5UL, 0xd29c4e4eUL, 0xe049a9a9UL,
    ++    0xb4d86c6cUL, 0xfaac5656UL, 0x07f3f4f4UL, 0x25cfeaeaUL,
    ++    0xafca6565UL, 0x8ef47a7aUL, 0xe947aeaeUL, 0x18100808UL,
    ++    0xd56fbabaUL, 0x88f07878UL, 0x6f4a2525UL, 0x725c2e2eUL,
    ++    0x24381c1cUL, 0xf157a6a6UL, 0xc773b4b4UL, 0x5197c6c6UL,
    ++    0x23cbe8e8UL, 0x7ca1ddddUL, 0x9ce87474UL, 0x213e1f1fUL,
    ++    0xdd964b4bUL, 0xdc61bdbdUL, 0x860d8b8bUL, 0x850f8a8aUL,
    ++    0x90e07070UL, 0x427c3e3eUL, 0xc471b5b5UL, 0xaacc6666UL,
    ++    0xd8904848UL, 0x05060303UL, 0x01f7f6f6UL, 0x121c0e0eUL,
    ++    0xa3c26161UL, 0x5f6a3535UL, 0xf9ae5757UL, 0xd069b9b9UL,
    ++    0x91178686UL, 0x5899c1c1UL, 0x273a1d1dUL, 0xb9279e9eUL,
    ++    0x38d9e1e1UL, 0x13ebf8f8UL, 0xb32b9898UL, 0x33221111UL,
    ++    0xbbd26969UL, 0x70a9d9d9UL, 0x89078e8eUL, 0xa7339494UL,
    ++    0xb62d9b9bUL, 0x223c1e1eUL, 0x92158787UL, 0x20c9e9e9UL,
    ++    0x4987ceceUL, 0xffaa5555UL, 0x78502828UL, 0x7aa5dfdfUL,
    ++    0x8f038c8cUL, 0xf859a1a1UL, 0x80098989UL, 0x171a0d0dUL,
    ++    0xda65bfbfUL, 0x31d7e6e6UL, 0xc6844242UL, 0xb8d06868UL,
    ++    0xc3824141UL, 0xb0299999UL, 0x775a2d2dUL, 0x111e0f0fUL,
    ++    0xcb7bb0b0UL, 0xfca85454UL, 0xd66dbbbbUL, 0x3a2c1616UL,
    ++};
    ++static const ulong32 TE2[256] = {
    ++    0x63a5c663UL, 0x7c84f87cUL, 0x7799ee77UL, 0x7b8df67bUL,
    ++    0xf20dfff2UL, 0x6bbdd66bUL, 0x6fb1de6fUL, 0xc55491c5UL,
    ++    0x30506030UL, 0x01030201UL, 0x67a9ce67UL, 0x2b7d562bUL,
    ++    0xfe19e7feUL, 0xd762b5d7UL, 0xabe64dabUL, 0x769aec76UL,
    ++    0xca458fcaUL, 0x829d1f82UL, 0xc94089c9UL, 0x7d87fa7dUL,
    ++    0xfa15effaUL, 0x59ebb259UL, 0x47c98e47UL, 0xf00bfbf0UL,
    ++    0xadec41adUL, 0xd467b3d4UL, 0xa2fd5fa2UL, 0xafea45afUL,
    ++    0x9cbf239cUL, 0xa4f753a4UL, 0x7296e472UL, 0xc05b9bc0UL,
    ++    0xb7c275b7UL, 0xfd1ce1fdUL, 0x93ae3d93UL, 0x266a4c26UL,
    ++    0x365a6c36UL, 0x3f417e3fUL, 0xf702f5f7UL, 0xcc4f83ccUL,
    ++    0x345c6834UL, 0xa5f451a5UL, 0xe534d1e5UL, 0xf108f9f1UL,
    ++    0x7193e271UL, 0xd873abd8UL, 0x31536231UL, 0x153f2a15UL,
    ++    0x040c0804UL, 0xc75295c7UL, 0x23654623UL, 0xc35e9dc3UL,
    ++    0x18283018UL, 0x96a13796UL, 0x050f0a05UL, 0x9ab52f9aUL,
    ++    0x07090e07UL, 0x12362412UL, 0x809b1b80UL, 0xe23ddfe2UL,
    ++    0xeb26cdebUL, 0x27694e27UL, 0xb2cd7fb2UL, 0x759fea75UL,
    ++    0x091b1209UL, 0x839e1d83UL, 0x2c74582cUL, 0x1a2e341aUL,
    ++    0x1b2d361bUL, 0x6eb2dc6eUL, 0x5aeeb45aUL, 0xa0fb5ba0UL,
    ++    0x52f6a452UL, 0x3b4d763bUL, 0xd661b7d6UL, 0xb3ce7db3UL,
    ++    0x297b5229UL, 0xe33edde3UL, 0x2f715e2fUL, 0x84971384UL,
    ++    0x53f5a653UL, 0xd168b9d1UL, 0x00000000UL, 0xed2cc1edUL,
    ++    0x20604020UL, 0xfc1fe3fcUL, 0xb1c879b1UL, 0x5bedb65bUL,
    ++    0x6abed46aUL, 0xcb468dcbUL, 0xbed967beUL, 0x394b7239UL,
    ++    0x4ade944aUL, 0x4cd4984cUL, 0x58e8b058UL, 0xcf4a85cfUL,
    ++    0xd06bbbd0UL, 0xef2ac5efUL, 0xaae54faaUL, 0xfb16edfbUL,
    ++    0x43c58643UL, 0x4dd79a4dUL, 0x33556633UL, 0x85941185UL,
    ++    0x45cf8a45UL, 0xf910e9f9UL, 0x02060402UL, 0x7f81fe7fUL,
    ++    0x50f0a050UL, 0x3c44783cUL, 0x9fba259fUL, 0xa8e34ba8UL,
    ++    0x51f3a251UL, 0xa3fe5da3UL, 0x40c08040UL, 0x8f8a058fUL,
    ++    0x92ad3f92UL, 0x9dbc219dUL, 0x38487038UL, 0xf504f1f5UL,
    ++    0xbcdf63bcUL, 0xb6c177b6UL, 0xda75afdaUL, 0x21634221UL,
    ++    0x10302010UL, 0xff1ae5ffUL, 0xf30efdf3UL, 0xd26dbfd2UL,
    ++    0xcd4c81cdUL, 0x0c14180cUL, 0x13352613UL, 0xec2fc3ecUL,
    ++    0x5fe1be5fUL, 0x97a23597UL, 0x44cc8844UL, 0x17392e17UL,
    ++    0xc45793c4UL, 0xa7f255a7UL, 0x7e82fc7eUL, 0x3d477a3dUL,
    ++    0x64acc864UL, 0x5de7ba5dUL, 0x192b3219UL, 0x7395e673UL,
    ++    0x60a0c060UL, 0x81981981UL, 0x4fd19e4fUL, 0xdc7fa3dcUL,
    ++    0x22664422UL, 0x2a7e542aUL, 0x90ab3b90UL, 0x88830b88UL,
    ++    0x46ca8c46UL, 0xee29c7eeUL, 0xb8d36bb8UL, 0x143c2814UL,
    ++    0xde79a7deUL, 0x5ee2bc5eUL, 0x0b1d160bUL, 0xdb76addbUL,
    ++    0xe03bdbe0UL, 0x32566432UL, 0x3a4e743aUL, 0x0a1e140aUL,
    ++    0x49db9249UL, 0x060a0c06UL, 0x246c4824UL, 0x5ce4b85cUL,
    ++    0xc25d9fc2UL, 0xd36ebdd3UL, 0xacef43acUL, 0x62a6c462UL,
    ++    0x91a83991UL, 0x95a43195UL, 0xe437d3e4UL, 0x798bf279UL,
    ++    0xe732d5e7UL, 0xc8438bc8UL, 0x37596e37UL, 0x6db7da6dUL,
    ++    0x8d8c018dUL, 0xd564b1d5UL, 0x4ed29c4eUL, 0xa9e049a9UL,
    ++    0x6cb4d86cUL, 0x56faac56UL, 0xf407f3f4UL, 0xea25cfeaUL,
    ++    0x65afca65UL, 0x7a8ef47aUL, 0xaee947aeUL, 0x08181008UL,
    ++    0xbad56fbaUL, 0x7888f078UL, 0x256f4a25UL, 0x2e725c2eUL,
    ++    0x1c24381cUL, 0xa6f157a6UL, 0xb4c773b4UL, 0xc65197c6UL,
    ++    0xe823cbe8UL, 0xdd7ca1ddUL, 0x749ce874UL, 0x1f213e1fUL,
    ++    0x4bdd964bUL, 0xbddc61bdUL, 0x8b860d8bUL, 0x8a850f8aUL,
    ++    0x7090e070UL, 0x3e427c3eUL, 0xb5c471b5UL, 0x66aacc66UL,
    ++    0x48d89048UL, 0x03050603UL, 0xf601f7f6UL, 0x0e121c0eUL,
    ++    0x61a3c261UL, 0x355f6a35UL, 0x57f9ae57UL, 0xb9d069b9UL,
    ++    0x86911786UL, 0xc15899c1UL, 0x1d273a1dUL, 0x9eb9279eUL,
    ++    0xe138d9e1UL, 0xf813ebf8UL, 0x98b32b98UL, 0x11332211UL,
    ++    0x69bbd269UL, 0xd970a9d9UL, 0x8e89078eUL, 0x94a73394UL,
    ++    0x9bb62d9bUL, 0x1e223c1eUL, 0x87921587UL, 0xe920c9e9UL,
    ++    0xce4987ceUL, 0x55ffaa55UL, 0x28785028UL, 0xdf7aa5dfUL,
    ++    0x8c8f038cUL, 0xa1f859a1UL, 0x89800989UL, 0x0d171a0dUL,
    ++    0xbfda65bfUL, 0xe631d7e6UL, 0x42c68442UL, 0x68b8d068UL,
    ++    0x41c38241UL, 0x99b02999UL, 0x2d775a2dUL, 0x0f111e0fUL,
    ++    0xb0cb7bb0UL, 0x54fca854UL, 0xbbd66dbbUL, 0x163a2c16UL,
    ++};
    ++static const ulong32 TE3[256] = {
    ++
    ++    0x6363a5c6UL, 0x7c7c84f8UL, 0x777799eeUL, 0x7b7b8df6UL,
    ++    0xf2f20dffUL, 0x6b6bbdd6UL, 0x6f6fb1deUL, 0xc5c55491UL,
    ++    0x30305060UL, 0x01010302UL, 0x6767a9ceUL, 0x2b2b7d56UL,
    ++    0xfefe19e7UL, 0xd7d762b5UL, 0xababe64dUL, 0x76769aecUL,
    ++    0xcaca458fUL, 0x82829d1fUL, 0xc9c94089UL, 0x7d7d87faUL,
    ++    0xfafa15efUL, 0x5959ebb2UL, 0x4747c98eUL, 0xf0f00bfbUL,
    ++    0xadadec41UL, 0xd4d467b3UL, 0xa2a2fd5fUL, 0xafafea45UL,
    ++    0x9c9cbf23UL, 0xa4a4f753UL, 0x727296e4UL, 0xc0c05b9bUL,
    ++    0xb7b7c275UL, 0xfdfd1ce1UL, 0x9393ae3dUL, 0x26266a4cUL,
    ++    0x36365a6cUL, 0x3f3f417eUL, 0xf7f702f5UL, 0xcccc4f83UL,
    ++    0x34345c68UL, 0xa5a5f451UL, 0xe5e534d1UL, 0xf1f108f9UL,
    ++    0x717193e2UL, 0xd8d873abUL, 0x31315362UL, 0x15153f2aUL,
    ++    0x04040c08UL, 0xc7c75295UL, 0x23236546UL, 0xc3c35e9dUL,
    ++    0x18182830UL, 0x9696a137UL, 0x05050f0aUL, 0x9a9ab52fUL,
    ++    0x0707090eUL, 0x12123624UL, 0x80809b1bUL, 0xe2e23ddfUL,
    ++    0xebeb26cdUL, 0x2727694eUL, 0xb2b2cd7fUL, 0x75759feaUL,
    ++    0x09091b12UL, 0x83839e1dUL, 0x2c2c7458UL, 0x1a1a2e34UL,
    ++    0x1b1b2d36UL, 0x6e6eb2dcUL, 0x5a5aeeb4UL, 0xa0a0fb5bUL,
    ++    0x5252f6a4UL, 0x3b3b4d76UL, 0xd6d661b7UL, 0xb3b3ce7dUL,
    ++    0x29297b52UL, 0xe3e33eddUL, 0x2f2f715eUL, 0x84849713UL,
    ++    0x5353f5a6UL, 0xd1d168b9UL, 0x00000000UL, 0xeded2cc1UL,
    ++    0x20206040UL, 0xfcfc1fe3UL, 0xb1b1c879UL, 0x5b5bedb6UL,
    ++    0x6a6abed4UL, 0xcbcb468dUL, 0xbebed967UL, 0x39394b72UL,
    ++    0x4a4ade94UL, 0x4c4cd498UL, 0x5858e8b0UL, 0xcfcf4a85UL,
    ++    0xd0d06bbbUL, 0xefef2ac5UL, 0xaaaae54fUL, 0xfbfb16edUL,
    ++    0x4343c586UL, 0x4d4dd79aUL, 0x33335566UL, 0x85859411UL,
    ++    0x4545cf8aUL, 0xf9f910e9UL, 0x02020604UL, 0x7f7f81feUL,
    ++    0x5050f0a0UL, 0x3c3c4478UL, 0x9f9fba25UL, 0xa8a8e34bUL,
    ++    0x5151f3a2UL, 0xa3a3fe5dUL, 0x4040c080UL, 0x8f8f8a05UL,
    ++    0x9292ad3fUL, 0x9d9dbc21UL, 0x38384870UL, 0xf5f504f1UL,
    ++    0xbcbcdf63UL, 0xb6b6c177UL, 0xdada75afUL, 0x21216342UL,
    ++    0x10103020UL, 0xffff1ae5UL, 0xf3f30efdUL, 0xd2d26dbfUL,
    ++    0xcdcd4c81UL, 0x0c0c1418UL, 0x13133526UL, 0xecec2fc3UL,
    ++    0x5f5fe1beUL, 0x9797a235UL, 0x4444cc88UL, 0x1717392eUL,
    ++    0xc4c45793UL, 0xa7a7f255UL, 0x7e7e82fcUL, 0x3d3d477aUL,
    ++    0x6464acc8UL, 0x5d5de7baUL, 0x19192b32UL, 0x737395e6UL,
    ++    0x6060a0c0UL, 0x81819819UL, 0x4f4fd19eUL, 0xdcdc7fa3UL,
    ++    0x22226644UL, 0x2a2a7e54UL, 0x9090ab3bUL, 0x8888830bUL,
    ++    0x4646ca8cUL, 0xeeee29c7UL, 0xb8b8d36bUL, 0x14143c28UL,
    ++    0xdede79a7UL, 0x5e5ee2bcUL, 0x0b0b1d16UL, 0xdbdb76adUL,
    ++    0xe0e03bdbUL, 0x32325664UL, 0x3a3a4e74UL, 0x0a0a1e14UL,
    ++    0x4949db92UL, 0x06060a0cUL, 0x24246c48UL, 0x5c5ce4b8UL,
    ++    0xc2c25d9fUL, 0xd3d36ebdUL, 0xacacef43UL, 0x6262a6c4UL,
    ++    0x9191a839UL, 0x9595a431UL, 0xe4e437d3UL, 0x79798bf2UL,
    ++    0xe7e732d5UL, 0xc8c8438bUL, 0x3737596eUL, 0x6d6db7daUL,
    ++    0x8d8d8c01UL, 0xd5d564b1UL, 0x4e4ed29cUL, 0xa9a9e049UL,
    ++    0x6c6cb4d8UL, 0x5656faacUL, 0xf4f407f3UL, 0xeaea25cfUL,
    ++    0x6565afcaUL, 0x7a7a8ef4UL, 0xaeaee947UL, 0x08081810UL,
    ++    0xbabad56fUL, 0x787888f0UL, 0x25256f4aUL, 0x2e2e725cUL,
    ++    0x1c1c2438UL, 0xa6a6f157UL, 0xb4b4c773UL, 0xc6c65197UL,
    ++    0xe8e823cbUL, 0xdddd7ca1UL, 0x74749ce8UL, 0x1f1f213eUL,
    ++    0x4b4bdd96UL, 0xbdbddc61UL, 0x8b8b860dUL, 0x8a8a850fUL,
    ++    0x707090e0UL, 0x3e3e427cUL, 0xb5b5c471UL, 0x6666aaccUL,
    ++    0x4848d890UL, 0x03030506UL, 0xf6f601f7UL, 0x0e0e121cUL,
    ++    0x6161a3c2UL, 0x35355f6aUL, 0x5757f9aeUL, 0xb9b9d069UL,
    ++    0x86869117UL, 0xc1c15899UL, 0x1d1d273aUL, 0x9e9eb927UL,
    ++    0xe1e138d9UL, 0xf8f813ebUL, 0x9898b32bUL, 0x11113322UL,
    ++    0x6969bbd2UL, 0xd9d970a9UL, 0x8e8e8907UL, 0x9494a733UL,
    ++    0x9b9bb62dUL, 0x1e1e223cUL, 0x87879215UL, 0xe9e920c9UL,
    ++    0xcece4987UL, 0x5555ffaaUL, 0x28287850UL, 0xdfdf7aa5UL,
    ++    0x8c8c8f03UL, 0xa1a1f859UL, 0x89898009UL, 0x0d0d171aUL,
    ++    0xbfbfda65UL, 0xe6e631d7UL, 0x4242c684UL, 0x6868b8d0UL,
    ++    0x4141c382UL, 0x9999b029UL, 0x2d2d775aUL, 0x0f0f111eUL,
    ++    0xb0b0cb7bUL, 0x5454fca8UL, 0xbbbbd66dUL, 0x16163a2cUL,
    ++};
    ++
    ++static const ulong32 Te4_0[] = {
    ++0x00000063UL, 0x0000007cUL, 0x00000077UL, 0x0000007bUL, 0x000000f2UL, 0x0000006bUL, 0x0000006fUL, 0x000000c5UL, 
    ++0x00000030UL, 0x00000001UL, 0x00000067UL, 0x0000002bUL, 0x000000feUL, 0x000000d7UL, 0x000000abUL, 0x00000076UL, 
    ++0x000000caUL, 0x00000082UL, 0x000000c9UL, 0x0000007dUL, 0x000000faUL, 0x00000059UL, 0x00000047UL, 0x000000f0UL, 
    ++0x000000adUL, 0x000000d4UL, 0x000000a2UL, 0x000000afUL, 0x0000009cUL, 0x000000a4UL, 0x00000072UL, 0x000000c0UL, 
    ++0x000000b7UL, 0x000000fdUL, 0x00000093UL, 0x00000026UL, 0x00000036UL, 0x0000003fUL, 0x000000f7UL, 0x000000ccUL, 
    ++0x00000034UL, 0x000000a5UL, 0x000000e5UL, 0x000000f1UL, 0x00000071UL, 0x000000d8UL, 0x00000031UL, 0x00000015UL, 
    ++0x00000004UL, 0x000000c7UL, 0x00000023UL, 0x000000c3UL, 0x00000018UL, 0x00000096UL, 0x00000005UL, 0x0000009aUL, 
    ++0x00000007UL, 0x00000012UL, 0x00000080UL, 0x000000e2UL, 0x000000ebUL, 0x00000027UL, 0x000000b2UL, 0x00000075UL, 
    ++0x00000009UL, 0x00000083UL, 0x0000002cUL, 0x0000001aUL, 0x0000001bUL, 0x0000006eUL, 0x0000005aUL, 0x000000a0UL, 
    ++0x00000052UL, 0x0000003bUL, 0x000000d6UL, 0x000000b3UL, 0x00000029UL, 0x000000e3UL, 0x0000002fUL, 0x00000084UL, 
    ++0x00000053UL, 0x000000d1UL, 0x00000000UL, 0x000000edUL, 0x00000020UL, 0x000000fcUL, 0x000000b1UL, 0x0000005bUL, 
    ++0x0000006aUL, 0x000000cbUL, 0x000000beUL, 0x00000039UL, 0x0000004aUL, 0x0000004cUL, 0x00000058UL, 0x000000cfUL, 
    ++0x000000d0UL, 0x000000efUL, 0x000000aaUL, 0x000000fbUL, 0x00000043UL, 0x0000004dUL, 0x00000033UL, 0x00000085UL, 
    ++0x00000045UL, 0x000000f9UL, 0x00000002UL, 0x0000007fUL, 0x00000050UL, 0x0000003cUL, 0x0000009fUL, 0x000000a8UL, 
    ++0x00000051UL, 0x000000a3UL, 0x00000040UL, 0x0000008fUL, 0x00000092UL, 0x0000009dUL, 0x00000038UL, 0x000000f5UL, 
    ++0x000000bcUL, 0x000000b6UL, 0x000000daUL, 0x00000021UL, 0x00000010UL, 0x000000ffUL, 0x000000f3UL, 0x000000d2UL, 
    ++0x000000cdUL, 0x0000000cUL, 0x00000013UL, 0x000000ecUL, 0x0000005fUL, 0x00000097UL, 0x00000044UL, 0x00000017UL, 
    ++0x000000c4UL, 0x000000a7UL, 0x0000007eUL, 0x0000003dUL, 0x00000064UL, 0x0000005dUL, 0x00000019UL, 0x00000073UL, 
    ++0x00000060UL, 0x00000081UL, 0x0000004fUL, 0x000000dcUL, 0x00000022UL, 0x0000002aUL, 0x00000090UL, 0x00000088UL, 
    ++0x00000046UL, 0x000000eeUL, 0x000000b8UL, 0x00000014UL, 0x000000deUL, 0x0000005eUL, 0x0000000bUL, 0x000000dbUL, 
    ++0x000000e0UL, 0x00000032UL, 0x0000003aUL, 0x0000000aUL, 0x00000049UL, 0x00000006UL, 0x00000024UL, 0x0000005cUL, 
    ++0x000000c2UL, 0x000000d3UL, 0x000000acUL, 0x00000062UL, 0x00000091UL, 0x00000095UL, 0x000000e4UL, 0x00000079UL, 
    ++0x000000e7UL, 0x000000c8UL, 0x00000037UL, 0x0000006dUL, 0x0000008dUL, 0x000000d5UL, 0x0000004eUL, 0x000000a9UL, 
    ++0x0000006cUL, 0x00000056UL, 0x000000f4UL, 0x000000eaUL, 0x00000065UL, 0x0000007aUL, 0x000000aeUL, 0x00000008UL, 
    ++0x000000baUL, 0x00000078UL, 0x00000025UL, 0x0000002eUL, 0x0000001cUL, 0x000000a6UL, 0x000000b4UL, 0x000000c6UL, 
    ++0x000000e8UL, 0x000000ddUL, 0x00000074UL, 0x0000001fUL, 0x0000004bUL, 0x000000bdUL, 0x0000008bUL, 0x0000008aUL, 
    ++0x00000070UL, 0x0000003eUL, 0x000000b5UL, 0x00000066UL, 0x00000048UL, 0x00000003UL, 0x000000f6UL, 0x0000000eUL, 
    ++0x00000061UL, 0x00000035UL, 0x00000057UL, 0x000000b9UL, 0x00000086UL, 0x000000c1UL, 0x0000001dUL, 0x0000009eUL, 
    ++0x000000e1UL, 0x000000f8UL, 0x00000098UL, 0x00000011UL, 0x00000069UL, 0x000000d9UL, 0x0000008eUL, 0x00000094UL, 
    ++0x0000009bUL, 0x0000001eUL, 0x00000087UL, 0x000000e9UL, 0x000000ceUL, 0x00000055UL, 0x00000028UL, 0x000000dfUL, 
    ++0x0000008cUL, 0x000000a1UL, 0x00000089UL, 0x0000000dUL, 0x000000bfUL, 0x000000e6UL, 0x00000042UL, 0x00000068UL, 
    ++0x00000041UL, 0x00000099UL, 0x0000002dUL, 0x0000000fUL, 0x000000b0UL, 0x00000054UL, 0x000000bbUL, 0x00000016UL
    ++};
    ++
    ++static const ulong32 Te4_1[] = {
    ++0x00006300UL, 0x00007c00UL, 0x00007700UL, 0x00007b00UL, 0x0000f200UL, 0x00006b00UL, 0x00006f00UL, 0x0000c500UL, 
    ++0x00003000UL, 0x00000100UL, 0x00006700UL, 0x00002b00UL, 0x0000fe00UL, 0x0000d700UL, 0x0000ab00UL, 0x00007600UL, 
    ++0x0000ca00UL, 0x00008200UL, 0x0000c900UL, 0x00007d00UL, 0x0000fa00UL, 0x00005900UL, 0x00004700UL, 0x0000f000UL, 
    ++0x0000ad00UL, 0x0000d400UL, 0x0000a200UL, 0x0000af00UL, 0x00009c00UL, 0x0000a400UL, 0x00007200UL, 0x0000c000UL, 
    ++0x0000b700UL, 0x0000fd00UL, 0x00009300UL, 0x00002600UL, 0x00003600UL, 0x00003f00UL, 0x0000f700UL, 0x0000cc00UL, 
    ++0x00003400UL, 0x0000a500UL, 0x0000e500UL, 0x0000f100UL, 0x00007100UL, 0x0000d800UL, 0x00003100UL, 0x00001500UL, 
    ++0x00000400UL, 0x0000c700UL, 0x00002300UL, 0x0000c300UL, 0x00001800UL, 0x00009600UL, 0x00000500UL, 0x00009a00UL, 
    ++0x00000700UL, 0x00001200UL, 0x00008000UL, 0x0000e200UL, 0x0000eb00UL, 0x00002700UL, 0x0000b200UL, 0x00007500UL, 
    ++0x00000900UL, 0x00008300UL, 0x00002c00UL, 0x00001a00UL, 0x00001b00UL, 0x00006e00UL, 0x00005a00UL, 0x0000a000UL, 
    ++0x00005200UL, 0x00003b00UL, 0x0000d600UL, 0x0000b300UL, 0x00002900UL, 0x0000e300UL, 0x00002f00UL, 0x00008400UL, 
    ++0x00005300UL, 0x0000d100UL, 0x00000000UL, 0x0000ed00UL, 0x00002000UL, 0x0000fc00UL, 0x0000b100UL, 0x00005b00UL, 
    ++0x00006a00UL, 0x0000cb00UL, 0x0000be00UL, 0x00003900UL, 0x00004a00UL, 0x00004c00UL, 0x00005800UL, 0x0000cf00UL, 
    ++0x0000d000UL, 0x0000ef00UL, 0x0000aa00UL, 0x0000fb00UL, 0x00004300UL, 0x00004d00UL, 0x00003300UL, 0x00008500UL, 
    ++0x00004500UL, 0x0000f900UL, 0x00000200UL, 0x00007f00UL, 0x00005000UL, 0x00003c00UL, 0x00009f00UL, 0x0000a800UL, 
    ++0x00005100UL, 0x0000a300UL, 0x00004000UL, 0x00008f00UL, 0x00009200UL, 0x00009d00UL, 0x00003800UL, 0x0000f500UL, 
    ++0x0000bc00UL, 0x0000b600UL, 0x0000da00UL, 0x00002100UL, 0x00001000UL, 0x0000ff00UL, 0x0000f300UL, 0x0000d200UL, 
    ++0x0000cd00UL, 0x00000c00UL, 0x00001300UL, 0x0000ec00UL, 0x00005f00UL, 0x00009700UL, 0x00004400UL, 0x00001700UL, 
    ++0x0000c400UL, 0x0000a700UL, 0x00007e00UL, 0x00003d00UL, 0x00006400UL, 0x00005d00UL, 0x00001900UL, 0x00007300UL, 
    ++0x00006000UL, 0x00008100UL, 0x00004f00UL, 0x0000dc00UL, 0x00002200UL, 0x00002a00UL, 0x00009000UL, 0x00008800UL, 
    ++0x00004600UL, 0x0000ee00UL, 0x0000b800UL, 0x00001400UL, 0x0000de00UL, 0x00005e00UL, 0x00000b00UL, 0x0000db00UL, 
    ++0x0000e000UL, 0x00003200UL, 0x00003a00UL, 0x00000a00UL, 0x00004900UL, 0x00000600UL, 0x00002400UL, 0x00005c00UL, 
    ++0x0000c200UL, 0x0000d300UL, 0x0000ac00UL, 0x00006200UL, 0x00009100UL, 0x00009500UL, 0x0000e400UL, 0x00007900UL, 
    ++0x0000e700UL, 0x0000c800UL, 0x00003700UL, 0x00006d00UL, 0x00008d00UL, 0x0000d500UL, 0x00004e00UL, 0x0000a900UL, 
    ++0x00006c00UL, 0x00005600UL, 0x0000f400UL, 0x0000ea00UL, 0x00006500UL, 0x00007a00UL, 0x0000ae00UL, 0x00000800UL, 
    ++0x0000ba00UL, 0x00007800UL, 0x00002500UL, 0x00002e00UL, 0x00001c00UL, 0x0000a600UL, 0x0000b400UL, 0x0000c600UL, 
    ++0x0000e800UL, 0x0000dd00UL, 0x00007400UL, 0x00001f00UL, 0x00004b00UL, 0x0000bd00UL, 0x00008b00UL, 0x00008a00UL, 
    ++0x00007000UL, 0x00003e00UL, 0x0000b500UL, 0x00006600UL, 0x00004800UL, 0x00000300UL, 0x0000f600UL, 0x00000e00UL, 
    ++0x00006100UL, 0x00003500UL, 0x00005700UL, 0x0000b900UL, 0x00008600UL, 0x0000c100UL, 0x00001d00UL, 0x00009e00UL, 
    ++0x0000e100UL, 0x0000f800UL, 0x00009800UL, 0x00001100UL, 0x00006900UL, 0x0000d900UL, 0x00008e00UL, 0x00009400UL, 
    ++0x00009b00UL, 0x00001e00UL, 0x00008700UL, 0x0000e900UL, 0x0000ce00UL, 0x00005500UL, 0x00002800UL, 0x0000df00UL, 
    ++0x00008c00UL, 0x0000a100UL, 0x00008900UL, 0x00000d00UL, 0x0000bf00UL, 0x0000e600UL, 0x00004200UL, 0x00006800UL, 
    ++0x00004100UL, 0x00009900UL, 0x00002d00UL, 0x00000f00UL, 0x0000b000UL, 0x00005400UL, 0x0000bb00UL, 0x00001600UL
    ++};
    ++
    ++static const ulong32 Te4_2[] = {
    ++0x00630000UL, 0x007c0000UL, 0x00770000UL, 0x007b0000UL, 0x00f20000UL, 0x006b0000UL, 0x006f0000UL, 0x00c50000UL, 
    ++0x00300000UL, 0x00010000UL, 0x00670000UL, 0x002b0000UL, 0x00fe0000UL, 0x00d70000UL, 0x00ab0000UL, 0x00760000UL, 
    ++0x00ca0000UL, 0x00820000UL, 0x00c90000UL, 0x007d0000UL, 0x00fa0000UL, 0x00590000UL, 0x00470000UL, 0x00f00000UL, 
    ++0x00ad0000UL, 0x00d40000UL, 0x00a20000UL, 0x00af0000UL, 0x009c0000UL, 0x00a40000UL, 0x00720000UL, 0x00c00000UL, 
    ++0x00b70000UL, 0x00fd0000UL, 0x00930000UL, 0x00260000UL, 0x00360000UL, 0x003f0000UL, 0x00f70000UL, 0x00cc0000UL, 
    ++0x00340000UL, 0x00a50000UL, 0x00e50000UL, 0x00f10000UL, 0x00710000UL, 0x00d80000UL, 0x00310000UL, 0x00150000UL, 
    ++0x00040000UL, 0x00c70000UL, 0x00230000UL, 0x00c30000UL, 0x00180000UL, 0x00960000UL, 0x00050000UL, 0x009a0000UL, 
    ++0x00070000UL, 0x00120000UL, 0x00800000UL, 0x00e20000UL, 0x00eb0000UL, 0x00270000UL, 0x00b20000UL, 0x00750000UL, 
    ++0x00090000UL, 0x00830000UL, 0x002c0000UL, 0x001a0000UL, 0x001b0000UL, 0x006e0000UL, 0x005a0000UL, 0x00a00000UL, 
    ++0x00520000UL, 0x003b0000UL, 0x00d60000UL, 0x00b30000UL, 0x00290000UL, 0x00e30000UL, 0x002f0000UL, 0x00840000UL, 
    ++0x00530000UL, 0x00d10000UL, 0x00000000UL, 0x00ed0000UL, 0x00200000UL, 0x00fc0000UL, 0x00b10000UL, 0x005b0000UL, 
    ++0x006a0000UL, 0x00cb0000UL, 0x00be0000UL, 0x00390000UL, 0x004a0000UL, 0x004c0000UL, 0x00580000UL, 0x00cf0000UL, 
    ++0x00d00000UL, 0x00ef0000UL, 0x00aa0000UL, 0x00fb0000UL, 0x00430000UL, 0x004d0000UL, 0x00330000UL, 0x00850000UL, 
    ++0x00450000UL, 0x00f90000UL, 0x00020000UL, 0x007f0000UL, 0x00500000UL, 0x003c0000UL, 0x009f0000UL, 0x00a80000UL, 
    ++0x00510000UL, 0x00a30000UL, 0x00400000UL, 0x008f0000UL, 0x00920000UL, 0x009d0000UL, 0x00380000UL, 0x00f50000UL, 
    ++0x00bc0000UL, 0x00b60000UL, 0x00da0000UL, 0x00210000UL, 0x00100000UL, 0x00ff0000UL, 0x00f30000UL, 0x00d20000UL, 
    ++0x00cd0000UL, 0x000c0000UL, 0x00130000UL, 0x00ec0000UL, 0x005f0000UL, 0x00970000UL, 0x00440000UL, 0x00170000UL, 
    ++0x00c40000UL, 0x00a70000UL, 0x007e0000UL, 0x003d0000UL, 0x00640000UL, 0x005d0000UL, 0x00190000UL, 0x00730000UL, 
    ++0x00600000UL, 0x00810000UL, 0x004f0000UL, 0x00dc0000UL, 0x00220000UL, 0x002a0000UL, 0x00900000UL, 0x00880000UL, 
    ++0x00460000UL, 0x00ee0000UL, 0x00b80000UL, 0x00140000UL, 0x00de0000UL, 0x005e0000UL, 0x000b0000UL, 0x00db0000UL, 
    ++0x00e00000UL, 0x00320000UL, 0x003a0000UL, 0x000a0000UL, 0x00490000UL, 0x00060000UL, 0x00240000UL, 0x005c0000UL, 
    ++0x00c20000UL, 0x00d30000UL, 0x00ac0000UL, 0x00620000UL, 0x00910000UL, 0x00950000UL, 0x00e40000UL, 0x00790000UL, 
    ++0x00e70000UL, 0x00c80000UL, 0x00370000UL, 0x006d0000UL, 0x008d0000UL, 0x00d50000UL, 0x004e0000UL, 0x00a90000UL, 
    ++0x006c0000UL, 0x00560000UL, 0x00f40000UL, 0x00ea0000UL, 0x00650000UL, 0x007a0000UL, 0x00ae0000UL, 0x00080000UL, 
    ++0x00ba0000UL, 0x00780000UL, 0x00250000UL, 0x002e0000UL, 0x001c0000UL, 0x00a60000UL, 0x00b40000UL, 0x00c60000UL, 
    ++0x00e80000UL, 0x00dd0000UL, 0x00740000UL, 0x001f0000UL, 0x004b0000UL, 0x00bd0000UL, 0x008b0000UL, 0x008a0000UL, 
    ++0x00700000UL, 0x003e0000UL, 0x00b50000UL, 0x00660000UL, 0x00480000UL, 0x00030000UL, 0x00f60000UL, 0x000e0000UL, 
    ++0x00610000UL, 0x00350000UL, 0x00570000UL, 0x00b90000UL, 0x00860000UL, 0x00c10000UL, 0x001d0000UL, 0x009e0000UL, 
    ++0x00e10000UL, 0x00f80000UL, 0x00980000UL, 0x00110000UL, 0x00690000UL, 0x00d90000UL, 0x008e0000UL, 0x00940000UL, 
    ++0x009b0000UL, 0x001e0000UL, 0x00870000UL, 0x00e90000UL, 0x00ce0000UL, 0x00550000UL, 0x00280000UL, 0x00df0000UL, 
    ++0x008c0000UL, 0x00a10000UL, 0x00890000UL, 0x000d0000UL, 0x00bf0000UL, 0x00e60000UL, 0x00420000UL, 0x00680000UL, 
    ++0x00410000UL, 0x00990000UL, 0x002d0000UL, 0x000f0000UL, 0x00b00000UL, 0x00540000UL, 0x00bb0000UL, 0x00160000UL
    ++};
    ++
    ++static const ulong32 Te4_3[] = {
    ++0x63000000UL, 0x7c000000UL, 0x77000000UL, 0x7b000000UL, 0xf2000000UL, 0x6b000000UL, 0x6f000000UL, 0xc5000000UL, 
    ++0x30000000UL, 0x01000000UL, 0x67000000UL, 0x2b000000UL, 0xfe000000UL, 0xd7000000UL, 0xab000000UL, 0x76000000UL, 
    ++0xca000000UL, 0x82000000UL, 0xc9000000UL, 0x7d000000UL, 0xfa000000UL, 0x59000000UL, 0x47000000UL, 0xf0000000UL, 
    ++0xad000000UL, 0xd4000000UL, 0xa2000000UL, 0xaf000000UL, 0x9c000000UL, 0xa4000000UL, 0x72000000UL, 0xc0000000UL, 
    ++0xb7000000UL, 0xfd000000UL, 0x93000000UL, 0x26000000UL, 0x36000000UL, 0x3f000000UL, 0xf7000000UL, 0xcc000000UL, 
    ++0x34000000UL, 0xa5000000UL, 0xe5000000UL, 0xf1000000UL, 0x71000000UL, 0xd8000000UL, 0x31000000UL, 0x15000000UL, 
    ++0x04000000UL, 0xc7000000UL, 0x23000000UL, 0xc3000000UL, 0x18000000UL, 0x96000000UL, 0x05000000UL, 0x9a000000UL, 
    ++0x07000000UL, 0x12000000UL, 0x80000000UL, 0xe2000000UL, 0xeb000000UL, 0x27000000UL, 0xb2000000UL, 0x75000000UL, 
    ++0x09000000UL, 0x83000000UL, 0x2c000000UL, 0x1a000000UL, 0x1b000000UL, 0x6e000000UL, 0x5a000000UL, 0xa0000000UL, 
    ++0x52000000UL, 0x3b000000UL, 0xd6000000UL, 0xb3000000UL, 0x29000000UL, 0xe3000000UL, 0x2f000000UL, 0x84000000UL, 
    ++0x53000000UL, 0xd1000000UL, 0x00000000UL, 0xed000000UL, 0x20000000UL, 0xfc000000UL, 0xb1000000UL, 0x5b000000UL, 
    ++0x6a000000UL, 0xcb000000UL, 0xbe000000UL, 0x39000000UL, 0x4a000000UL, 0x4c000000UL, 0x58000000UL, 0xcf000000UL, 
    ++0xd0000000UL, 0xef000000UL, 0xaa000000UL, 0xfb000000UL, 0x43000000UL, 0x4d000000UL, 0x33000000UL, 0x85000000UL, 
    ++0x45000000UL, 0xf9000000UL, 0x02000000UL, 0x7f000000UL, 0x50000000UL, 0x3c000000UL, 0x9f000000UL, 0xa8000000UL, 
    ++0x51000000UL, 0xa3000000UL, 0x40000000UL, 0x8f000000UL, 0x92000000UL, 0x9d000000UL, 0x38000000UL, 0xf5000000UL, 
    ++0xbc000000UL, 0xb6000000UL, 0xda000000UL, 0x21000000UL, 0x10000000UL, 0xff000000UL, 0xf3000000UL, 0xd2000000UL, 
    ++0xcd000000UL, 0x0c000000UL, 0x13000000UL, 0xec000000UL, 0x5f000000UL, 0x97000000UL, 0x44000000UL, 0x17000000UL, 
    ++0xc4000000UL, 0xa7000000UL, 0x7e000000UL, 0x3d000000UL, 0x64000000UL, 0x5d000000UL, 0x19000000UL, 0x73000000UL, 
    ++0x60000000UL, 0x81000000UL, 0x4f000000UL, 0xdc000000UL, 0x22000000UL, 0x2a000000UL, 0x90000000UL, 0x88000000UL, 
    ++0x46000000UL, 0xee000000UL, 0xb8000000UL, 0x14000000UL, 0xde000000UL, 0x5e000000UL, 0x0b000000UL, 0xdb000000UL, 
    ++0xe0000000UL, 0x32000000UL, 0x3a000000UL, 0x0a000000UL, 0x49000000UL, 0x06000000UL, 0x24000000UL, 0x5c000000UL, 
    ++0xc2000000UL, 0xd3000000UL, 0xac000000UL, 0x62000000UL, 0x91000000UL, 0x95000000UL, 0xe4000000UL, 0x79000000UL, 
    ++0xe7000000UL, 0xc8000000UL, 0x37000000UL, 0x6d000000UL, 0x8d000000UL, 0xd5000000UL, 0x4e000000UL, 0xa9000000UL, 
    ++0x6c000000UL, 0x56000000UL, 0xf4000000UL, 0xea000000UL, 0x65000000UL, 0x7a000000UL, 0xae000000UL, 0x08000000UL, 
    ++0xba000000UL, 0x78000000UL, 0x25000000UL, 0x2e000000UL, 0x1c000000UL, 0xa6000000UL, 0xb4000000UL, 0xc6000000UL, 
    ++0xe8000000UL, 0xdd000000UL, 0x74000000UL, 0x1f000000UL, 0x4b000000UL, 0xbd000000UL, 0x8b000000UL, 0x8a000000UL, 
    ++0x70000000UL, 0x3e000000UL, 0xb5000000UL, 0x66000000UL, 0x48000000UL, 0x03000000UL, 0xf6000000UL, 0x0e000000UL, 
    ++0x61000000UL, 0x35000000UL, 0x57000000UL, 0xb9000000UL, 0x86000000UL, 0xc1000000UL, 0x1d000000UL, 0x9e000000UL, 
    ++0xe1000000UL, 0xf8000000UL, 0x98000000UL, 0x11000000UL, 0x69000000UL, 0xd9000000UL, 0x8e000000UL, 0x94000000UL, 
    ++0x9b000000UL, 0x1e000000UL, 0x87000000UL, 0xe9000000UL, 0xce000000UL, 0x55000000UL, 0x28000000UL, 0xdf000000UL, 
    ++0x8c000000UL, 0xa1000000UL, 0x89000000UL, 0x0d000000UL, 0xbf000000UL, 0xe6000000UL, 0x42000000UL, 0x68000000UL, 
    ++0x41000000UL, 0x99000000UL, 0x2d000000UL, 0x0f000000UL, 0xb0000000UL, 0x54000000UL, 0xbb000000UL, 0x16000000UL
    ++};
    ++
    ++static const ulong32 TD1[256] = {
    ++    0x5051f4a7UL, 0x537e4165UL, 0xc31a17a4UL, 0x963a275eUL,
    ++    0xcb3bab6bUL, 0xf11f9d45UL, 0xabacfa58UL, 0x934be303UL,
    ++    0x552030faUL, 0xf6ad766dUL, 0x9188cc76UL, 0x25f5024cUL,
    ++    0xfc4fe5d7UL, 0xd7c52acbUL, 0x80263544UL, 0x8fb562a3UL,
    ++    0x49deb15aUL, 0x6725ba1bUL, 0x9845ea0eUL, 0xe15dfec0UL,
    ++    0x02c32f75UL, 0x12814cf0UL, 0xa38d4697UL, 0xc66bd3f9UL,
    ++    0xe7038f5fUL, 0x9515929cUL, 0xebbf6d7aUL, 0xda955259UL,
    ++    0x2dd4be83UL, 0xd3587421UL, 0x2949e069UL, 0x448ec9c8UL,
    ++    0x6a75c289UL, 0x78f48e79UL, 0x6b99583eUL, 0xdd27b971UL,
    ++    0xb6bee14fUL, 0x17f088adUL, 0x66c920acUL, 0xb47dce3aUL,
    ++    0x1863df4aUL, 0x82e51a31UL, 0x60975133UL, 0x4562537fUL,
    ++    0xe0b16477UL, 0x84bb6baeUL, 0x1cfe81a0UL, 0x94f9082bUL,
    ++    0x58704868UL, 0x198f45fdUL, 0x8794de6cUL, 0xb7527bf8UL,
    ++    0x23ab73d3UL, 0xe2724b02UL, 0x57e31f8fUL, 0x2a6655abUL,
    ++    0x07b2eb28UL, 0x032fb5c2UL, 0x9a86c57bUL, 0xa5d33708UL,
    ++    0xf2302887UL, 0xb223bfa5UL, 0xba02036aUL, 0x5ced1682UL,
    ++    0x2b8acf1cUL, 0x92a779b4UL, 0xf0f307f2UL, 0xa14e69e2UL,
    ++    0xcd65daf4UL, 0xd50605beUL, 0x1fd13462UL, 0x8ac4a6feUL,
    ++    0x9d342e53UL, 0xa0a2f355UL, 0x32058ae1UL, 0x75a4f6ebUL,
    ++    0x390b83ecUL, 0xaa4060efUL, 0x065e719fUL, 0x51bd6e10UL,
    ++    0xf93e218aUL, 0x3d96dd06UL, 0xaedd3e05UL, 0x464de6bdUL,
    ++    0xb591548dUL, 0x0571c45dUL, 0x6f0406d4UL, 0xff605015UL,
    ++    0x241998fbUL, 0x97d6bde9UL, 0xcc894043UL, 0x7767d99eUL,
    ++    0xbdb0e842UL, 0x8807898bUL, 0x38e7195bUL, 0xdb79c8eeUL,
    ++    0x47a17c0aUL, 0xe97c420fUL, 0xc9f8841eUL, 0x00000000UL,
    ++    0x83098086UL, 0x48322bedUL, 0xac1e1170UL, 0x4e6c5a72UL,
    ++    0xfbfd0effUL, 0x560f8538UL, 0x1e3daed5UL, 0x27362d39UL,
    ++    0x640a0fd9UL, 0x21685ca6UL, 0xd19b5b54UL, 0x3a24362eUL,
    ++    0xb10c0a67UL, 0x0f9357e7UL, 0xd2b4ee96UL, 0x9e1b9b91UL,
    ++    0x4f80c0c5UL, 0xa261dc20UL, 0x695a774bUL, 0x161c121aUL,
    ++    0x0ae293baUL, 0xe5c0a02aUL, 0x433c22e0UL, 0x1d121b17UL,
    ++    0x0b0e090dUL, 0xadf28bc7UL, 0xb92db6a8UL, 0xc8141ea9UL,
    ++    0x8557f119UL, 0x4caf7507UL, 0xbbee99ddUL, 0xfda37f60UL,
    ++    0x9ff70126UL, 0xbc5c72f5UL, 0xc544663bUL, 0x345bfb7eUL,
    ++    0x768b4329UL, 0xdccb23c6UL, 0x68b6edfcUL, 0x63b8e4f1UL,
    ++    0xcad731dcUL, 0x10426385UL, 0x40139722UL, 0x2084c611UL,
    ++    0x7d854a24UL, 0xf8d2bb3dUL, 0x11aef932UL, 0x6dc729a1UL,
    ++    0x4b1d9e2fUL, 0xf3dcb230UL, 0xec0d8652UL, 0xd077c1e3UL,
    ++    0x6c2bb316UL, 0x99a970b9UL, 0xfa119448UL, 0x2247e964UL,
    ++    0xc4a8fc8cUL, 0x1aa0f03fUL, 0xd8567d2cUL, 0xef223390UL,
    ++    0xc787494eUL, 0xc1d938d1UL, 0xfe8ccaa2UL, 0x3698d40bUL,
    ++    0xcfa6f581UL, 0x28a57adeUL, 0x26dab78eUL, 0xa43fadbfUL,
    ++    0xe42c3a9dUL, 0x0d507892UL, 0x9b6a5fccUL, 0x62547e46UL,
    ++    0xc2f68d13UL, 0xe890d8b8UL, 0x5e2e39f7UL, 0xf582c3afUL,
    ++    0xbe9f5d80UL, 0x7c69d093UL, 0xa96fd52dUL, 0xb3cf2512UL,
    ++    0x3bc8ac99UL, 0xa710187dUL, 0x6ee89c63UL, 0x7bdb3bbbUL,
    ++    0x09cd2678UL, 0xf46e5918UL, 0x01ec9ab7UL, 0xa8834f9aUL,
    ++    0x65e6956eUL, 0x7eaaffe6UL, 0x0821bccfUL, 0xe6ef15e8UL,
    ++    0xd9bae79bUL, 0xce4a6f36UL, 0xd4ea9f09UL, 0xd629b07cUL,
    ++    0xaf31a4b2UL, 0x312a3f23UL, 0x30c6a594UL, 0xc035a266UL,
    ++    0x37744ebcUL, 0xa6fc82caUL, 0xb0e090d0UL, 0x1533a7d8UL,
    ++    0x4af10498UL, 0xf741ecdaUL, 0x0e7fcd50UL, 0x2f1791f6UL,
    ++    0x8d764dd6UL, 0x4d43efb0UL, 0x54ccaa4dUL, 0xdfe49604UL,
    ++    0xe39ed1b5UL, 0x1b4c6a88UL, 0xb8c12c1fUL, 0x7f466551UL,
    ++    0x049d5eeaUL, 0x5d018c35UL, 0x73fa8774UL, 0x2efb0b41UL,
    ++    0x5ab3671dUL, 0x5292dbd2UL, 0x33e91056UL, 0x136dd647UL,
    ++    0x8c9ad761UL, 0x7a37a10cUL, 0x8e59f814UL, 0x89eb133cUL,
    ++    0xeecea927UL, 0x35b761c9UL, 0xede11ce5UL, 0x3c7a47b1UL,
    ++    0x599cd2dfUL, 0x3f55f273UL, 0x791814ceUL, 0xbf73c737UL,
    ++    0xea53f7cdUL, 0x5b5ffdaaUL, 0x14df3d6fUL, 0x867844dbUL,
    ++    0x81caaff3UL, 0x3eb968c4UL, 0x2c382434UL, 0x5fc2a340UL,
    ++    0x72161dc3UL, 0x0cbce225UL, 0x8b283c49UL, 0x41ff0d95UL,
    ++    0x7139a801UL, 0xde080cb3UL, 0x9cd8b4e4UL, 0x906456c1UL,
    ++    0x617bcb84UL, 0x70d532b6UL, 0x74486c5cUL, 0x42d0b857UL,
    ++};
    ++static const ulong32 TD2[256] = {
    ++    0xa75051f4UL, 0x65537e41UL, 0xa4c31a17UL, 0x5e963a27UL,
    ++    0x6bcb3babUL, 0x45f11f9dUL, 0x58abacfaUL, 0x03934be3UL,
    ++    0xfa552030UL, 0x6df6ad76UL, 0x769188ccUL, 0x4c25f502UL,
    ++    0xd7fc4fe5UL, 0xcbd7c52aUL, 0x44802635UL, 0xa38fb562UL,
    ++    0x5a49deb1UL, 0x1b6725baUL, 0x0e9845eaUL, 0xc0e15dfeUL,
    ++    0x7502c32fUL, 0xf012814cUL, 0x97a38d46UL, 0xf9c66bd3UL,
    ++    0x5fe7038fUL, 0x9c951592UL, 0x7aebbf6dUL, 0x59da9552UL,
    ++    0x832dd4beUL, 0x21d35874UL, 0x692949e0UL, 0xc8448ec9UL,
    ++    0x896a75c2UL, 0x7978f48eUL, 0x3e6b9958UL, 0x71dd27b9UL,
    ++    0x4fb6bee1UL, 0xad17f088UL, 0xac66c920UL, 0x3ab47dceUL,
    ++    0x4a1863dfUL, 0x3182e51aUL, 0x33609751UL, 0x7f456253UL,
    ++    0x77e0b164UL, 0xae84bb6bUL, 0xa01cfe81UL, 0x2b94f908UL,
    ++    0x68587048UL, 0xfd198f45UL, 0x6c8794deUL, 0xf8b7527bUL,
    ++    0xd323ab73UL, 0x02e2724bUL, 0x8f57e31fUL, 0xab2a6655UL,
    ++    0x2807b2ebUL, 0xc2032fb5UL, 0x7b9a86c5UL, 0x08a5d337UL,
    ++    0x87f23028UL, 0xa5b223bfUL, 0x6aba0203UL, 0x825ced16UL,
    ++    0x1c2b8acfUL, 0xb492a779UL, 0xf2f0f307UL, 0xe2a14e69UL,
    ++    0xf4cd65daUL, 0xbed50605UL, 0x621fd134UL, 0xfe8ac4a6UL,
    ++    0x539d342eUL, 0x55a0a2f3UL, 0xe132058aUL, 0xeb75a4f6UL,
    ++    0xec390b83UL, 0xefaa4060UL, 0x9f065e71UL, 0x1051bd6eUL,
    ++    0x8af93e21UL, 0x063d96ddUL, 0x05aedd3eUL, 0xbd464de6UL,
    ++    0x8db59154UL, 0x5d0571c4UL, 0xd46f0406UL, 0x15ff6050UL,
    ++    0xfb241998UL, 0xe997d6bdUL, 0x43cc8940UL, 0x9e7767d9UL,
    ++    0x42bdb0e8UL, 0x8b880789UL, 0x5b38e719UL, 0xeedb79c8UL,
    ++    0x0a47a17cUL, 0x0fe97c42UL, 0x1ec9f884UL, 0x00000000UL,
    ++    0x86830980UL, 0xed48322bUL, 0x70ac1e11UL, 0x724e6c5aUL,
    ++    0xfffbfd0eUL, 0x38560f85UL, 0xd51e3daeUL, 0x3927362dUL,
    ++    0xd9640a0fUL, 0xa621685cUL, 0x54d19b5bUL, 0x2e3a2436UL,
    ++    0x67b10c0aUL, 0xe70f9357UL, 0x96d2b4eeUL, 0x919e1b9bUL,
    ++    0xc54f80c0UL, 0x20a261dcUL, 0x4b695a77UL, 0x1a161c12UL,
    ++    0xba0ae293UL, 0x2ae5c0a0UL, 0xe0433c22UL, 0x171d121bUL,
    ++    0x0d0b0e09UL, 0xc7adf28bUL, 0xa8b92db6UL, 0xa9c8141eUL,
    ++    0x198557f1UL, 0x074caf75UL, 0xddbbee99UL, 0x60fda37fUL,
    ++    0x269ff701UL, 0xf5bc5c72UL, 0x3bc54466UL, 0x7e345bfbUL,
    ++    0x29768b43UL, 0xc6dccb23UL, 0xfc68b6edUL, 0xf163b8e4UL,
    ++    0xdccad731UL, 0x85104263UL, 0x22401397UL, 0x112084c6UL,
    ++    0x247d854aUL, 0x3df8d2bbUL, 0x3211aef9UL, 0xa16dc729UL,
    ++    0x2f4b1d9eUL, 0x30f3dcb2UL, 0x52ec0d86UL, 0xe3d077c1UL,
    ++    0x166c2bb3UL, 0xb999a970UL, 0x48fa1194UL, 0x642247e9UL,
    ++    0x8cc4a8fcUL, 0x3f1aa0f0UL, 0x2cd8567dUL, 0x90ef2233UL,
    ++    0x4ec78749UL, 0xd1c1d938UL, 0xa2fe8ccaUL, 0x0b3698d4UL,
    ++    0x81cfa6f5UL, 0xde28a57aUL, 0x8e26dab7UL, 0xbfa43fadUL,
    ++    0x9de42c3aUL, 0x920d5078UL, 0xcc9b6a5fUL, 0x4662547eUL,
    ++    0x13c2f68dUL, 0xb8e890d8UL, 0xf75e2e39UL, 0xaff582c3UL,
    ++    0x80be9f5dUL, 0x937c69d0UL, 0x2da96fd5UL, 0x12b3cf25UL,
    ++    0x993bc8acUL, 0x7da71018UL, 0x636ee89cUL, 0xbb7bdb3bUL,
    ++    0x7809cd26UL, 0x18f46e59UL, 0xb701ec9aUL, 0x9aa8834fUL,
    ++    0x6e65e695UL, 0xe67eaaffUL, 0xcf0821bcUL, 0xe8e6ef15UL,
    ++    0x9bd9bae7UL, 0x36ce4a6fUL, 0x09d4ea9fUL, 0x7cd629b0UL,
    ++    0xb2af31a4UL, 0x23312a3fUL, 0x9430c6a5UL, 0x66c035a2UL,
    ++    0xbc37744eUL, 0xcaa6fc82UL, 0xd0b0e090UL, 0xd81533a7UL,
    ++    0x984af104UL, 0xdaf741ecUL, 0x500e7fcdUL, 0xf62f1791UL,
    ++    0xd68d764dUL, 0xb04d43efUL, 0x4d54ccaaUL, 0x04dfe496UL,
    ++    0xb5e39ed1UL, 0x881b4c6aUL, 0x1fb8c12cUL, 0x517f4665UL,
    ++    0xea049d5eUL, 0x355d018cUL, 0x7473fa87UL, 0x412efb0bUL,
    ++    0x1d5ab367UL, 0xd25292dbUL, 0x5633e910UL, 0x47136dd6UL,
    ++    0x618c9ad7UL, 0x0c7a37a1UL, 0x148e59f8UL, 0x3c89eb13UL,
    ++    0x27eecea9UL, 0xc935b761UL, 0xe5ede11cUL, 0xb13c7a47UL,
    ++    0xdf599cd2UL, 0x733f55f2UL, 0xce791814UL, 0x37bf73c7UL,
    ++    0xcdea53f7UL, 0xaa5b5ffdUL, 0x6f14df3dUL, 0xdb867844UL,
    ++    0xf381caafUL, 0xc43eb968UL, 0x342c3824UL, 0x405fc2a3UL,
    ++    0xc372161dUL, 0x250cbce2UL, 0x498b283cUL, 0x9541ff0dUL,
    ++    0x017139a8UL, 0xb3de080cUL, 0xe49cd8b4UL, 0xc1906456UL,
    ++    0x84617bcbUL, 0xb670d532UL, 0x5c74486cUL, 0x5742d0b8UL,
    ++};
    ++static const ulong32 TD3[256] = {
    ++    0xf4a75051UL, 0x4165537eUL, 0x17a4c31aUL, 0x275e963aUL,
    ++    0xab6bcb3bUL, 0x9d45f11fUL, 0xfa58abacUL, 0xe303934bUL,
    ++    0x30fa5520UL, 0x766df6adUL, 0xcc769188UL, 0x024c25f5UL,
    ++    0xe5d7fc4fUL, 0x2acbd7c5UL, 0x35448026UL, 0x62a38fb5UL,
    ++    0xb15a49deUL, 0xba1b6725UL, 0xea0e9845UL, 0xfec0e15dUL,
    ++    0x2f7502c3UL, 0x4cf01281UL, 0x4697a38dUL, 0xd3f9c66bUL,
    ++    0x8f5fe703UL, 0x929c9515UL, 0x6d7aebbfUL, 0x5259da95UL,
    ++    0xbe832dd4UL, 0x7421d358UL, 0xe0692949UL, 0xc9c8448eUL,
    ++    0xc2896a75UL, 0x8e7978f4UL, 0x583e6b99UL, 0xb971dd27UL,
    ++    0xe14fb6beUL, 0x88ad17f0UL, 0x20ac66c9UL, 0xce3ab47dUL,
    ++    0xdf4a1863UL, 0x1a3182e5UL, 0x51336097UL, 0x537f4562UL,
    ++    0x6477e0b1UL, 0x6bae84bbUL, 0x81a01cfeUL, 0x082b94f9UL,
    ++    0x48685870UL, 0x45fd198fUL, 0xde6c8794UL, 0x7bf8b752UL,
    ++    0x73d323abUL, 0x4b02e272UL, 0x1f8f57e3UL, 0x55ab2a66UL,
    ++    0xeb2807b2UL, 0xb5c2032fUL, 0xc57b9a86UL, 0x3708a5d3UL,
    ++    0x2887f230UL, 0xbfa5b223UL, 0x036aba02UL, 0x16825cedUL,
    ++    0xcf1c2b8aUL, 0x79b492a7UL, 0x07f2f0f3UL, 0x69e2a14eUL,
    ++    0xdaf4cd65UL, 0x05bed506UL, 0x34621fd1UL, 0xa6fe8ac4UL,
    ++    0x2e539d34UL, 0xf355a0a2UL, 0x8ae13205UL, 0xf6eb75a4UL,
    ++    0x83ec390bUL, 0x60efaa40UL, 0x719f065eUL, 0x6e1051bdUL,
    ++    0x218af93eUL, 0xdd063d96UL, 0x3e05aeddUL, 0xe6bd464dUL,
    ++    0x548db591UL, 0xc45d0571UL, 0x06d46f04UL, 0x5015ff60UL,
    ++    0x98fb2419UL, 0xbde997d6UL, 0x4043cc89UL, 0xd99e7767UL,
    ++    0xe842bdb0UL, 0x898b8807UL, 0x195b38e7UL, 0xc8eedb79UL,
    ++    0x7c0a47a1UL, 0x420fe97cUL, 0x841ec9f8UL, 0x00000000UL,
    ++    0x80868309UL, 0x2bed4832UL, 0x1170ac1eUL, 0x5a724e6cUL,
    ++    0x0efffbfdUL, 0x8538560fUL, 0xaed51e3dUL, 0x2d392736UL,
    ++    0x0fd9640aUL, 0x5ca62168UL, 0x5b54d19bUL, 0x362e3a24UL,
    ++    0x0a67b10cUL, 0x57e70f93UL, 0xee96d2b4UL, 0x9b919e1bUL,
    ++    0xc0c54f80UL, 0xdc20a261UL, 0x774b695aUL, 0x121a161cUL,
    ++    0x93ba0ae2UL, 0xa02ae5c0UL, 0x22e0433cUL, 0x1b171d12UL,
    ++    0x090d0b0eUL, 0x8bc7adf2UL, 0xb6a8b92dUL, 0x1ea9c814UL,
    ++    0xf1198557UL, 0x75074cafUL, 0x99ddbbeeUL, 0x7f60fda3UL,
    ++    0x01269ff7UL, 0x72f5bc5cUL, 0x663bc544UL, 0xfb7e345bUL,
    ++    0x4329768bUL, 0x23c6dccbUL, 0xedfc68b6UL, 0xe4f163b8UL,
    ++    0x31dccad7UL, 0x63851042UL, 0x97224013UL, 0xc6112084UL,
    ++    0x4a247d85UL, 0xbb3df8d2UL, 0xf93211aeUL, 0x29a16dc7UL,
    ++    0x9e2f4b1dUL, 0xb230f3dcUL, 0x8652ec0dUL, 0xc1e3d077UL,
    ++    0xb3166c2bUL, 0x70b999a9UL, 0x9448fa11UL, 0xe9642247UL,
    ++    0xfc8cc4a8UL, 0xf03f1aa0UL, 0x7d2cd856UL, 0x3390ef22UL,
    ++    0x494ec787UL, 0x38d1c1d9UL, 0xcaa2fe8cUL, 0xd40b3698UL,
    ++    0xf581cfa6UL, 0x7ade28a5UL, 0xb78e26daUL, 0xadbfa43fUL,
    ++    0x3a9de42cUL, 0x78920d50UL, 0x5fcc9b6aUL, 0x7e466254UL,
    ++    0x8d13c2f6UL, 0xd8b8e890UL, 0x39f75e2eUL, 0xc3aff582UL,
    ++    0x5d80be9fUL, 0xd0937c69UL, 0xd52da96fUL, 0x2512b3cfUL,
    ++    0xac993bc8UL, 0x187da710UL, 0x9c636ee8UL, 0x3bbb7bdbUL,
    ++    0x267809cdUL, 0x5918f46eUL, 0x9ab701ecUL, 0x4f9aa883UL,
    ++    0x956e65e6UL, 0xffe67eaaUL, 0xbccf0821UL, 0x15e8e6efUL,
    ++    0xe79bd9baUL, 0x6f36ce4aUL, 0x9f09d4eaUL, 0xb07cd629UL,
    ++    0xa4b2af31UL, 0x3f23312aUL, 0xa59430c6UL, 0xa266c035UL,
    ++    0x4ebc3774UL, 0x82caa6fcUL, 0x90d0b0e0UL, 0xa7d81533UL,
    ++    0x04984af1UL, 0xecdaf741UL, 0xcd500e7fUL, 0x91f62f17UL,
    ++    0x4dd68d76UL, 0xefb04d43UL, 0xaa4d54ccUL, 0x9604dfe4UL,
    ++    0xd1b5e39eUL, 0x6a881b4cUL, 0x2c1fb8c1UL, 0x65517f46UL,
    ++    0x5eea049dUL, 0x8c355d01UL, 0x877473faUL, 0x0b412efbUL,
    ++    0x671d5ab3UL, 0xdbd25292UL, 0x105633e9UL, 0xd647136dUL,
    ++    0xd7618c9aUL, 0xa10c7a37UL, 0xf8148e59UL, 0x133c89ebUL,
    ++    0xa927eeceUL, 0x61c935b7UL, 0x1ce5ede1UL, 0x47b13c7aUL,
    ++    0xd2df599cUL, 0xf2733f55UL, 0x14ce7918UL, 0xc737bf73UL,
    ++    0xf7cdea53UL, 0xfdaa5b5fUL, 0x3d6f14dfUL, 0x44db8678UL,
    ++    0xaff381caUL, 0x68c43eb9UL, 0x24342c38UL, 0xa3405fc2UL,
    ++    0x1dc37216UL, 0xe2250cbcUL, 0x3c498b28UL, 0x0d9541ffUL,
    ++    0xa8017139UL, 0x0cb3de08UL, 0xb4e49cd8UL, 0x56c19064UL,
    ++    0xcb84617bUL, 0x32b670d5UL, 0x6c5c7448UL, 0xb85742d0UL,
    ++};
    ++
    ++static const ulong32 Tks0[] = {
    ++0x00000000UL, 0x0e090d0bUL, 0x1c121a16UL, 0x121b171dUL, 0x3824342cUL, 0x362d3927UL, 0x24362e3aUL, 0x2a3f2331UL, 
    ++0x70486858UL, 0x7e416553UL, 0x6c5a724eUL, 0x62537f45UL, 0x486c5c74UL, 0x4665517fUL, 0x547e4662UL, 0x5a774b69UL, 
    ++0xe090d0b0UL, 0xee99ddbbUL, 0xfc82caa6UL, 0xf28bc7adUL, 0xd8b4e49cUL, 0xd6bde997UL, 0xc4a6fe8aUL, 0xcaaff381UL, 
    ++0x90d8b8e8UL, 0x9ed1b5e3UL, 0x8ccaa2feUL, 0x82c3aff5UL, 0xa8fc8cc4UL, 0xa6f581cfUL, 0xb4ee96d2UL, 0xbae79bd9UL, 
    ++0xdb3bbb7bUL, 0xd532b670UL, 0xc729a16dUL, 0xc920ac66UL, 0xe31f8f57UL, 0xed16825cUL, 0xff0d9541UL, 0xf104984aUL, 
    ++0xab73d323UL, 0xa57ade28UL, 0xb761c935UL, 0xb968c43eUL, 0x9357e70fUL, 0x9d5eea04UL, 0x8f45fd19UL, 0x814cf012UL, 
    ++0x3bab6bcbUL, 0x35a266c0UL, 0x27b971ddUL, 0x29b07cd6UL, 0x038f5fe7UL, 0x0d8652ecUL, 0x1f9d45f1UL, 0x119448faUL, 
    ++0x4be30393UL, 0x45ea0e98UL, 0x57f11985UL, 0x59f8148eUL, 0x73c737bfUL, 0x7dce3ab4UL, 0x6fd52da9UL, 0x61dc20a2UL, 
    ++0xad766df6UL, 0xa37f60fdUL, 0xb16477e0UL, 0xbf6d7aebUL, 0x955259daUL, 0x9b5b54d1UL, 0x894043ccUL, 0x87494ec7UL, 
    ++0xdd3e05aeUL, 0xd33708a5UL, 0xc12c1fb8UL, 0xcf2512b3UL, 0xe51a3182UL, 0xeb133c89UL, 0xf9082b94UL, 0xf701269fUL, 
    ++0x4de6bd46UL, 0x43efb04dUL, 0x51f4a750UL, 0x5ffdaa5bUL, 0x75c2896aUL, 0x7bcb8461UL, 0x69d0937cUL, 0x67d99e77UL, 
    ++0x3daed51eUL, 0x33a7d815UL, 0x21bccf08UL, 0x2fb5c203UL, 0x058ae132UL, 0x0b83ec39UL, 0x1998fb24UL, 0x1791f62fUL, 
    ++0x764dd68dUL, 0x7844db86UL, 0x6a5fcc9bUL, 0x6456c190UL, 0x4e69e2a1UL, 0x4060efaaUL, 0x527bf8b7UL, 0x5c72f5bcUL, 
    ++0x0605bed5UL, 0x080cb3deUL, 0x1a17a4c3UL, 0x141ea9c8UL, 0x3e218af9UL, 0x302887f2UL, 0x223390efUL, 0x2c3a9de4UL, 
    ++0x96dd063dUL, 0x98d40b36UL, 0x8acf1c2bUL, 0x84c61120UL, 0xaef93211UL, 0xa0f03f1aUL, 0xb2eb2807UL, 0xbce2250cUL, 
    ++0xe6956e65UL, 0xe89c636eUL, 0xfa877473UL, 0xf48e7978UL, 0xdeb15a49UL, 0xd0b85742UL, 0xc2a3405fUL, 0xccaa4d54UL, 
    ++0x41ecdaf7UL, 0x4fe5d7fcUL, 0x5dfec0e1UL, 0x53f7cdeaUL, 0x79c8eedbUL, 0x77c1e3d0UL, 0x65daf4cdUL, 0x6bd3f9c6UL, 
    ++0x31a4b2afUL, 0x3fadbfa4UL, 0x2db6a8b9UL, 0x23bfa5b2UL, 0x09808683UL, 0x07898b88UL, 0x15929c95UL, 0x1b9b919eUL, 
    ++0xa17c0a47UL, 0xaf75074cUL, 0xbd6e1051UL, 0xb3671d5aUL, 0x99583e6bUL, 0x97513360UL, 0x854a247dUL, 0x8b432976UL, 
    ++0xd134621fUL, 0xdf3d6f14UL, 0xcd267809UL, 0xc32f7502UL, 0xe9105633UL, 0xe7195b38UL, 0xf5024c25UL, 0xfb0b412eUL, 
    ++0x9ad7618cUL, 0x94de6c87UL, 0x86c57b9aUL, 0x88cc7691UL, 0xa2f355a0UL, 0xacfa58abUL, 0xbee14fb6UL, 0xb0e842bdUL, 
    ++0xea9f09d4UL, 0xe49604dfUL, 0xf68d13c2UL, 0xf8841ec9UL, 0xd2bb3df8UL, 0xdcb230f3UL, 0xcea927eeUL, 0xc0a02ae5UL, 
    ++0x7a47b13cUL, 0x744ebc37UL, 0x6655ab2aUL, 0x685ca621UL, 0x42638510UL, 0x4c6a881bUL, 0x5e719f06UL, 0x5078920dUL, 
    ++0x0a0fd964UL, 0x0406d46fUL, 0x161dc372UL, 0x1814ce79UL, 0x322bed48UL, 0x3c22e043UL, 0x2e39f75eUL, 0x2030fa55UL, 
    ++0xec9ab701UL, 0xe293ba0aUL, 0xf088ad17UL, 0xfe81a01cUL, 0xd4be832dUL, 0xdab78e26UL, 0xc8ac993bUL, 0xc6a59430UL, 
    ++0x9cd2df59UL, 0x92dbd252UL, 0x80c0c54fUL, 0x8ec9c844UL, 0xa4f6eb75UL, 0xaaffe67eUL, 0xb8e4f163UL, 0xb6edfc68UL, 
    ++0x0c0a67b1UL, 0x02036abaUL, 0x10187da7UL, 0x1e1170acUL, 0x342e539dUL, 0x3a275e96UL, 0x283c498bUL, 0x26354480UL, 
    ++0x7c420fe9UL, 0x724b02e2UL, 0x605015ffUL, 0x6e5918f4UL, 0x44663bc5UL, 0x4a6f36ceUL, 0x587421d3UL, 0x567d2cd8UL, 
    ++0x37a10c7aUL, 0x39a80171UL, 0x2bb3166cUL, 0x25ba1b67UL, 0x0f853856UL, 0x018c355dUL, 0x13972240UL, 0x1d9e2f4bUL, 
    ++0x47e96422UL, 0x49e06929UL, 0x5bfb7e34UL, 0x55f2733fUL, 0x7fcd500eUL, 0x71c45d05UL, 0x63df4a18UL, 0x6dd64713UL, 
    ++0xd731dccaUL, 0xd938d1c1UL, 0xcb23c6dcUL, 0xc52acbd7UL, 0xef15e8e6UL, 0xe11ce5edUL, 0xf307f2f0UL, 0xfd0efffbUL, 
    ++0xa779b492UL, 0xa970b999UL, 0xbb6bae84UL, 0xb562a38fUL, 0x9f5d80beUL, 0x91548db5UL, 0x834f9aa8UL, 0x8d4697a3UL
    ++};
    ++
    ++static const ulong32 Tks1[] = {
    ++0x00000000UL, 0x0b0e090dUL, 0x161c121aUL, 0x1d121b17UL, 0x2c382434UL, 0x27362d39UL, 0x3a24362eUL, 0x312a3f23UL, 
    ++0x58704868UL, 0x537e4165UL, 0x4e6c5a72UL, 0x4562537fUL, 0x74486c5cUL, 0x7f466551UL, 0x62547e46UL, 0x695a774bUL, 
    ++0xb0e090d0UL, 0xbbee99ddUL, 0xa6fc82caUL, 0xadf28bc7UL, 0x9cd8b4e4UL, 0x97d6bde9UL, 0x8ac4a6feUL, 0x81caaff3UL, 
    ++0xe890d8b8UL, 0xe39ed1b5UL, 0xfe8ccaa2UL, 0xf582c3afUL, 0xc4a8fc8cUL, 0xcfa6f581UL, 0xd2b4ee96UL, 0xd9bae79bUL, 
    ++0x7bdb3bbbUL, 0x70d532b6UL, 0x6dc729a1UL, 0x66c920acUL, 0x57e31f8fUL, 0x5ced1682UL, 0x41ff0d95UL, 0x4af10498UL, 
    ++0x23ab73d3UL, 0x28a57adeUL, 0x35b761c9UL, 0x3eb968c4UL, 0x0f9357e7UL, 0x049d5eeaUL, 0x198f45fdUL, 0x12814cf0UL, 
    ++0xcb3bab6bUL, 0xc035a266UL, 0xdd27b971UL, 0xd629b07cUL, 0xe7038f5fUL, 0xec0d8652UL, 0xf11f9d45UL, 0xfa119448UL, 
    ++0x934be303UL, 0x9845ea0eUL, 0x8557f119UL, 0x8e59f814UL, 0xbf73c737UL, 0xb47dce3aUL, 0xa96fd52dUL, 0xa261dc20UL, 
    ++0xf6ad766dUL, 0xfda37f60UL, 0xe0b16477UL, 0xebbf6d7aUL, 0xda955259UL, 0xd19b5b54UL, 0xcc894043UL, 0xc787494eUL, 
    ++0xaedd3e05UL, 0xa5d33708UL, 0xb8c12c1fUL, 0xb3cf2512UL, 0x82e51a31UL, 0x89eb133cUL, 0x94f9082bUL, 0x9ff70126UL, 
    ++0x464de6bdUL, 0x4d43efb0UL, 0x5051f4a7UL, 0x5b5ffdaaUL, 0x6a75c289UL, 0x617bcb84UL, 0x7c69d093UL, 0x7767d99eUL, 
    ++0x1e3daed5UL, 0x1533a7d8UL, 0x0821bccfUL, 0x032fb5c2UL, 0x32058ae1UL, 0x390b83ecUL, 0x241998fbUL, 0x2f1791f6UL, 
    ++0x8d764dd6UL, 0x867844dbUL, 0x9b6a5fccUL, 0x906456c1UL, 0xa14e69e2UL, 0xaa4060efUL, 0xb7527bf8UL, 0xbc5c72f5UL, 
    ++0xd50605beUL, 0xde080cb3UL, 0xc31a17a4UL, 0xc8141ea9UL, 0xf93e218aUL, 0xf2302887UL, 0xef223390UL, 0xe42c3a9dUL, 
    ++0x3d96dd06UL, 0x3698d40bUL, 0x2b8acf1cUL, 0x2084c611UL, 0x11aef932UL, 0x1aa0f03fUL, 0x07b2eb28UL, 0x0cbce225UL, 
    ++0x65e6956eUL, 0x6ee89c63UL, 0x73fa8774UL, 0x78f48e79UL, 0x49deb15aUL, 0x42d0b857UL, 0x5fc2a340UL, 0x54ccaa4dUL, 
    ++0xf741ecdaUL, 0xfc4fe5d7UL, 0xe15dfec0UL, 0xea53f7cdUL, 0xdb79c8eeUL, 0xd077c1e3UL, 0xcd65daf4UL, 0xc66bd3f9UL, 
    ++0xaf31a4b2UL, 0xa43fadbfUL, 0xb92db6a8UL, 0xb223bfa5UL, 0x83098086UL, 0x8807898bUL, 0x9515929cUL, 0x9e1b9b91UL, 
    ++0x47a17c0aUL, 0x4caf7507UL, 0x51bd6e10UL, 0x5ab3671dUL, 0x6b99583eUL, 0x60975133UL, 0x7d854a24UL, 0x768b4329UL, 
    ++0x1fd13462UL, 0x14df3d6fUL, 0x09cd2678UL, 0x02c32f75UL, 0x33e91056UL, 0x38e7195bUL, 0x25f5024cUL, 0x2efb0b41UL, 
    ++0x8c9ad761UL, 0x8794de6cUL, 0x9a86c57bUL, 0x9188cc76UL, 0xa0a2f355UL, 0xabacfa58UL, 0xb6bee14fUL, 0xbdb0e842UL, 
    ++0xd4ea9f09UL, 0xdfe49604UL, 0xc2f68d13UL, 0xc9f8841eUL, 0xf8d2bb3dUL, 0xf3dcb230UL, 0xeecea927UL, 0xe5c0a02aUL, 
    ++0x3c7a47b1UL, 0x37744ebcUL, 0x2a6655abUL, 0x21685ca6UL, 0x10426385UL, 0x1b4c6a88UL, 0x065e719fUL, 0x0d507892UL, 
    ++0x640a0fd9UL, 0x6f0406d4UL, 0x72161dc3UL, 0x791814ceUL, 0x48322bedUL, 0x433c22e0UL, 0x5e2e39f7UL, 0x552030faUL, 
    ++0x01ec9ab7UL, 0x0ae293baUL, 0x17f088adUL, 0x1cfe81a0UL, 0x2dd4be83UL, 0x26dab78eUL, 0x3bc8ac99UL, 0x30c6a594UL, 
    ++0x599cd2dfUL, 0x5292dbd2UL, 0x4f80c0c5UL, 0x448ec9c8UL, 0x75a4f6ebUL, 0x7eaaffe6UL, 0x63b8e4f1UL, 0x68b6edfcUL, 
    ++0xb10c0a67UL, 0xba02036aUL, 0xa710187dUL, 0xac1e1170UL, 0x9d342e53UL, 0x963a275eUL, 0x8b283c49UL, 0x80263544UL, 
    ++0xe97c420fUL, 0xe2724b02UL, 0xff605015UL, 0xf46e5918UL, 0xc544663bUL, 0xce4a6f36UL, 0xd3587421UL, 0xd8567d2cUL, 
    ++0x7a37a10cUL, 0x7139a801UL, 0x6c2bb316UL, 0x6725ba1bUL, 0x560f8538UL, 0x5d018c35UL, 0x40139722UL, 0x4b1d9e2fUL, 
    ++0x2247e964UL, 0x2949e069UL, 0x345bfb7eUL, 0x3f55f273UL, 0x0e7fcd50UL, 0x0571c45dUL, 0x1863df4aUL, 0x136dd647UL, 
    ++0xcad731dcUL, 0xc1d938d1UL, 0xdccb23c6UL, 0xd7c52acbUL, 0xe6ef15e8UL, 0xede11ce5UL, 0xf0f307f2UL, 0xfbfd0effUL, 
    ++0x92a779b4UL, 0x99a970b9UL, 0x84bb6baeUL, 0x8fb562a3UL, 0xbe9f5d80UL, 0xb591548dUL, 0xa8834f9aUL, 0xa38d4697UL
    ++};
    ++
    ++static const ulong32 Tks2[] = {
    ++0x00000000UL, 0x0d0b0e09UL, 0x1a161c12UL, 0x171d121bUL, 0x342c3824UL, 0x3927362dUL, 0x2e3a2436UL, 0x23312a3fUL, 
    ++0x68587048UL, 0x65537e41UL, 0x724e6c5aUL, 0x7f456253UL, 0x5c74486cUL, 0x517f4665UL, 0x4662547eUL, 0x4b695a77UL, 
    ++0xd0b0e090UL, 0xddbbee99UL, 0xcaa6fc82UL, 0xc7adf28bUL, 0xe49cd8b4UL, 0xe997d6bdUL, 0xfe8ac4a6UL, 0xf381caafUL, 
    ++0xb8e890d8UL, 0xb5e39ed1UL, 0xa2fe8ccaUL, 0xaff582c3UL, 0x8cc4a8fcUL, 0x81cfa6f5UL, 0x96d2b4eeUL, 0x9bd9bae7UL, 
    ++0xbb7bdb3bUL, 0xb670d532UL, 0xa16dc729UL, 0xac66c920UL, 0x8f57e31fUL, 0x825ced16UL, 0x9541ff0dUL, 0x984af104UL, 
    ++0xd323ab73UL, 0xde28a57aUL, 0xc935b761UL, 0xc43eb968UL, 0xe70f9357UL, 0xea049d5eUL, 0xfd198f45UL, 0xf012814cUL, 
    ++0x6bcb3babUL, 0x66c035a2UL, 0x71dd27b9UL, 0x7cd629b0UL, 0x5fe7038fUL, 0x52ec0d86UL, 0x45f11f9dUL, 0x48fa1194UL, 
    ++0x03934be3UL, 0x0e9845eaUL, 0x198557f1UL, 0x148e59f8UL, 0x37bf73c7UL, 0x3ab47dceUL, 0x2da96fd5UL, 0x20a261dcUL, 
    ++0x6df6ad76UL, 0x60fda37fUL, 0x77e0b164UL, 0x7aebbf6dUL, 0x59da9552UL, 0x54d19b5bUL, 0x43cc8940UL, 0x4ec78749UL, 
    ++0x05aedd3eUL, 0x08a5d337UL, 0x1fb8c12cUL, 0x12b3cf25UL, 0x3182e51aUL, 0x3c89eb13UL, 0x2b94f908UL, 0x269ff701UL, 
    ++0xbd464de6UL, 0xb04d43efUL, 0xa75051f4UL, 0xaa5b5ffdUL, 0x896a75c2UL, 0x84617bcbUL, 0x937c69d0UL, 0x9e7767d9UL, 
    ++0xd51e3daeUL, 0xd81533a7UL, 0xcf0821bcUL, 0xc2032fb5UL, 0xe132058aUL, 0xec390b83UL, 0xfb241998UL, 0xf62f1791UL, 
    ++0xd68d764dUL, 0xdb867844UL, 0xcc9b6a5fUL, 0xc1906456UL, 0xe2a14e69UL, 0xefaa4060UL, 0xf8b7527bUL, 0xf5bc5c72UL, 
    ++0xbed50605UL, 0xb3de080cUL, 0xa4c31a17UL, 0xa9c8141eUL, 0x8af93e21UL, 0x87f23028UL, 0x90ef2233UL, 0x9de42c3aUL, 
    ++0x063d96ddUL, 0x0b3698d4UL, 0x1c2b8acfUL, 0x112084c6UL, 0x3211aef9UL, 0x3f1aa0f0UL, 0x2807b2ebUL, 0x250cbce2UL, 
    ++0x6e65e695UL, 0x636ee89cUL, 0x7473fa87UL, 0x7978f48eUL, 0x5a49deb1UL, 0x5742d0b8UL, 0x405fc2a3UL, 0x4d54ccaaUL, 
    ++0xdaf741ecUL, 0xd7fc4fe5UL, 0xc0e15dfeUL, 0xcdea53f7UL, 0xeedb79c8UL, 0xe3d077c1UL, 0xf4cd65daUL, 0xf9c66bd3UL, 
    ++0xb2af31a4UL, 0xbfa43fadUL, 0xa8b92db6UL, 0xa5b223bfUL, 0x86830980UL, 0x8b880789UL, 0x9c951592UL, 0x919e1b9bUL, 
    ++0x0a47a17cUL, 0x074caf75UL, 0x1051bd6eUL, 0x1d5ab367UL, 0x3e6b9958UL, 0x33609751UL, 0x247d854aUL, 0x29768b43UL, 
    ++0x621fd134UL, 0x6f14df3dUL, 0x7809cd26UL, 0x7502c32fUL, 0x5633e910UL, 0x5b38e719UL, 0x4c25f502UL, 0x412efb0bUL, 
    ++0x618c9ad7UL, 0x6c8794deUL, 0x7b9a86c5UL, 0x769188ccUL, 0x55a0a2f3UL, 0x58abacfaUL, 0x4fb6bee1UL, 0x42bdb0e8UL, 
    ++0x09d4ea9fUL, 0x04dfe496UL, 0x13c2f68dUL, 0x1ec9f884UL, 0x3df8d2bbUL, 0x30f3dcb2UL, 0x27eecea9UL, 0x2ae5c0a0UL, 
    ++0xb13c7a47UL, 0xbc37744eUL, 0xab2a6655UL, 0xa621685cUL, 0x85104263UL, 0x881b4c6aUL, 0x9f065e71UL, 0x920d5078UL, 
    ++0xd9640a0fUL, 0xd46f0406UL, 0xc372161dUL, 0xce791814UL, 0xed48322bUL, 0xe0433c22UL, 0xf75e2e39UL, 0xfa552030UL, 
    ++0xb701ec9aUL, 0xba0ae293UL, 0xad17f088UL, 0xa01cfe81UL, 0x832dd4beUL, 0x8e26dab7UL, 0x993bc8acUL, 0x9430c6a5UL, 
    ++0xdf599cd2UL, 0xd25292dbUL, 0xc54f80c0UL, 0xc8448ec9UL, 0xeb75a4f6UL, 0xe67eaaffUL, 0xf163b8e4UL, 0xfc68b6edUL, 
    ++0x67b10c0aUL, 0x6aba0203UL, 0x7da71018UL, 0x70ac1e11UL, 0x539d342eUL, 0x5e963a27UL, 0x498b283cUL, 0x44802635UL, 
    ++0x0fe97c42UL, 0x02e2724bUL, 0x15ff6050UL, 0x18f46e59UL, 0x3bc54466UL, 0x36ce4a6fUL, 0x21d35874UL, 0x2cd8567dUL, 
    ++0x0c7a37a1UL, 0x017139a8UL, 0x166c2bb3UL, 0x1b6725baUL, 0x38560f85UL, 0x355d018cUL, 0x22401397UL, 0x2f4b1d9eUL, 
    ++0x642247e9UL, 0x692949e0UL, 0x7e345bfbUL, 0x733f55f2UL, 0x500e7fcdUL, 0x5d0571c4UL, 0x4a1863dfUL, 0x47136dd6UL, 
    ++0xdccad731UL, 0xd1c1d938UL, 0xc6dccb23UL, 0xcbd7c52aUL, 0xe8e6ef15UL, 0xe5ede11cUL, 0xf2f0f307UL, 0xfffbfd0eUL, 
    ++0xb492a779UL, 0xb999a970UL, 0xae84bb6bUL, 0xa38fb562UL, 0x80be9f5dUL, 0x8db59154UL, 0x9aa8834fUL, 0x97a38d46UL
    ++};
    ++
    ++static const ulong32 Tks3[] = {
    ++0x00000000UL, 0x090d0b0eUL, 0x121a161cUL, 0x1b171d12UL, 0x24342c38UL, 0x2d392736UL, 0x362e3a24UL, 0x3f23312aUL, 
    ++0x48685870UL, 0x4165537eUL, 0x5a724e6cUL, 0x537f4562UL, 0x6c5c7448UL, 0x65517f46UL, 0x7e466254UL, 0x774b695aUL, 
    ++0x90d0b0e0UL, 0x99ddbbeeUL, 0x82caa6fcUL, 0x8bc7adf2UL, 0xb4e49cd8UL, 0xbde997d6UL, 0xa6fe8ac4UL, 0xaff381caUL, 
    ++0xd8b8e890UL, 0xd1b5e39eUL, 0xcaa2fe8cUL, 0xc3aff582UL, 0xfc8cc4a8UL, 0xf581cfa6UL, 0xee96d2b4UL, 0xe79bd9baUL, 
    ++0x3bbb7bdbUL, 0x32b670d5UL, 0x29a16dc7UL, 0x20ac66c9UL, 0x1f8f57e3UL, 0x16825cedUL, 0x0d9541ffUL, 0x04984af1UL, 
    ++0x73d323abUL, 0x7ade28a5UL, 0x61c935b7UL, 0x68c43eb9UL, 0x57e70f93UL, 0x5eea049dUL, 0x45fd198fUL, 0x4cf01281UL, 
    ++0xab6bcb3bUL, 0xa266c035UL, 0xb971dd27UL, 0xb07cd629UL, 0x8f5fe703UL, 0x8652ec0dUL, 0x9d45f11fUL, 0x9448fa11UL, 
    ++0xe303934bUL, 0xea0e9845UL, 0xf1198557UL, 0xf8148e59UL, 0xc737bf73UL, 0xce3ab47dUL, 0xd52da96fUL, 0xdc20a261UL, 
    ++0x766df6adUL, 0x7f60fda3UL, 0x6477e0b1UL, 0x6d7aebbfUL, 0x5259da95UL, 0x5b54d19bUL, 0x4043cc89UL, 0x494ec787UL, 
    ++0x3e05aeddUL, 0x3708a5d3UL, 0x2c1fb8c1UL, 0x2512b3cfUL, 0x1a3182e5UL, 0x133c89ebUL, 0x082b94f9UL, 0x01269ff7UL, 
    ++0xe6bd464dUL, 0xefb04d43UL, 0xf4a75051UL, 0xfdaa5b5fUL, 0xc2896a75UL, 0xcb84617bUL, 0xd0937c69UL, 0xd99e7767UL, 
    ++0xaed51e3dUL, 0xa7d81533UL, 0xbccf0821UL, 0xb5c2032fUL, 0x8ae13205UL, 0x83ec390bUL, 0x98fb2419UL, 0x91f62f17UL, 
    ++0x4dd68d76UL, 0x44db8678UL, 0x5fcc9b6aUL, 0x56c19064UL, 0x69e2a14eUL, 0x60efaa40UL, 0x7bf8b752UL, 0x72f5bc5cUL, 
    ++0x05bed506UL, 0x0cb3de08UL, 0x17a4c31aUL, 0x1ea9c814UL, 0x218af93eUL, 0x2887f230UL, 0x3390ef22UL, 0x3a9de42cUL, 
    ++0xdd063d96UL, 0xd40b3698UL, 0xcf1c2b8aUL, 0xc6112084UL, 0xf93211aeUL, 0xf03f1aa0UL, 0xeb2807b2UL, 0xe2250cbcUL, 
    ++0x956e65e6UL, 0x9c636ee8UL, 0x877473faUL, 0x8e7978f4UL, 0xb15a49deUL, 0xb85742d0UL, 0xa3405fc2UL, 0xaa4d54ccUL, 
    ++0xecdaf741UL, 0xe5d7fc4fUL, 0xfec0e15dUL, 0xf7cdea53UL, 0xc8eedb79UL, 0xc1e3d077UL, 0xdaf4cd65UL, 0xd3f9c66bUL, 
    ++0xa4b2af31UL, 0xadbfa43fUL, 0xb6a8b92dUL, 0xbfa5b223UL, 0x80868309UL, 0x898b8807UL, 0x929c9515UL, 0x9b919e1bUL, 
    ++0x7c0a47a1UL, 0x75074cafUL, 0x6e1051bdUL, 0x671d5ab3UL, 0x583e6b99UL, 0x51336097UL, 0x4a247d85UL, 0x4329768bUL, 
    ++0x34621fd1UL, 0x3d6f14dfUL, 0x267809cdUL, 0x2f7502c3UL, 0x105633e9UL, 0x195b38e7UL, 0x024c25f5UL, 0x0b412efbUL, 
    ++0xd7618c9aUL, 0xde6c8794UL, 0xc57b9a86UL, 0xcc769188UL, 0xf355a0a2UL, 0xfa58abacUL, 0xe14fb6beUL, 0xe842bdb0UL, 
    ++0x9f09d4eaUL, 0x9604dfe4UL, 0x8d13c2f6UL, 0x841ec9f8UL, 0xbb3df8d2UL, 0xb230f3dcUL, 0xa927eeceUL, 0xa02ae5c0UL, 
    ++0x47b13c7aUL, 0x4ebc3774UL, 0x55ab2a66UL, 0x5ca62168UL, 0x63851042UL, 0x6a881b4cUL, 0x719f065eUL, 0x78920d50UL, 
    ++0x0fd9640aUL, 0x06d46f04UL, 0x1dc37216UL, 0x14ce7918UL, 0x2bed4832UL, 0x22e0433cUL, 0x39f75e2eUL, 0x30fa5520UL, 
    ++0x9ab701ecUL, 0x93ba0ae2UL, 0x88ad17f0UL, 0x81a01cfeUL, 0xbe832dd4UL, 0xb78e26daUL, 0xac993bc8UL, 0xa59430c6UL, 
    ++0xd2df599cUL, 0xdbd25292UL, 0xc0c54f80UL, 0xc9c8448eUL, 0xf6eb75a4UL, 0xffe67eaaUL, 0xe4f163b8UL, 0xedfc68b6UL, 
    ++0x0a67b10cUL, 0x036aba02UL, 0x187da710UL, 0x1170ac1eUL, 0x2e539d34UL, 0x275e963aUL, 0x3c498b28UL, 0x35448026UL, 
    ++0x420fe97cUL, 0x4b02e272UL, 0x5015ff60UL, 0x5918f46eUL, 0x663bc544UL, 0x6f36ce4aUL, 0x7421d358UL, 0x7d2cd856UL, 
    ++0xa10c7a37UL, 0xa8017139UL, 0xb3166c2bUL, 0xba1b6725UL, 0x8538560fUL, 0x8c355d01UL, 0x97224013UL, 0x9e2f4b1dUL, 
    ++0xe9642247UL, 0xe0692949UL, 0xfb7e345bUL, 0xf2733f55UL, 0xcd500e7fUL, 0xc45d0571UL, 0xdf4a1863UL, 0xd647136dUL, 
    ++0x31dccad7UL, 0x38d1c1d9UL, 0x23c6dccbUL, 0x2acbd7c5UL, 0x15e8e6efUL, 0x1ce5ede1UL, 0x07f2f0f3UL, 0x0efffbfdUL, 
    ++0x79b492a7UL, 0x70b999a9UL, 0x6bae84bbUL, 0x62a38fb5UL, 0x5d80be9fUL, 0x548db591UL, 0x4f9aa883UL, 0x4697a38dUL
    ++};
    ++
    ++#endif /* SMALL CODE */
    ++
    ++static const ulong32 rcon[] = {
    ++    0x01000000UL, 0x02000000UL, 0x04000000UL, 0x08000000UL,
    ++    0x10000000UL, 0x20000000UL, 0x40000000UL, 0x80000000UL,
    ++    0x1B000000UL, 0x36000000UL, /* for 128-bit blocks, AES never uses more than 10 rcon values */
    ++};
    ++
    ++
    ++static int	aes_setup(const unsigned char *key, int keylen, int rounds, aes_CBC *skey);
    ++static void	aes_ecb_encrypt(const unsigned char *pt, unsigned char *ct, aes_CBC *skey);
    ++static void	aes_ecb_decrypt(const unsigned char *ct, unsigned char *pt, aes_CBC *skey);
    ++
    ++#ifdef CLEAN_STACK
    ++static void _aes_ecb_decrypt(const unsigned char *ct, unsigned char *pt, aes_CBC *skey);
    ++static void _aes_ecb_encrypt(const unsigned char *pt, unsigned char *ct, aes_CBC *skey);
    ++#endif
    ++
    ++int matrixAesInit(sslCipherContext_t *ctx, unsigned char *IV, unsigned char *key, int keylen)
    ++{
    ++	int		x, err;
    ++
    ++	if (IV == NULL || key == NULL || ctx == NULL) {
    ++		return -1;
    ++	}
    ++/*
    ++	setup cipher
    ++ */
    ++	if ((err = aes_setup(key, keylen, 0, &ctx->aes)) != CRYPT_OK) {
    ++		return -1;
    ++	}
    ++/*
    ++	copy IV
    ++ */
    ++	ctx->aes.blocklen = 16;
    ++	for (x = 0; x < ctx->aes.blocklen; x++) {
    ++		ctx->aes.IV[x] = IV[x];
    ++	}
    ++	return 0;
    ++}
    ++
    ++int matrixAesEncrypt(sslCipherContext_t *ctx, unsigned char *pt, unsigned char *ct, int len)
    ++{
    ++	int				x, i;
    ++	unsigned char	tmp[MAXBLOCKSIZE];
    ++
    ++	if (pt == NULL || ct == NULL || ctx == NULL || (len & 0x7) != 0) {
    ++		matrixStrDebugMsg("Bad parameters to matrixAesEncrypt\n", NULL);
    ++		return -1;
    ++	}
    ++
    ++/*
    ++	is blocklen valid?
    ++ */
    ++	if (ctx->aes.blocklen < 0 || ctx->aes.blocklen > 
    ++			(int)sizeof(ctx->aes.IV)) {
    ++		return -1;
    ++	}
    ++
    ++	for (i = 0; i < len; i += ctx->aes.blocklen) {
    ++/*
    ++		xor IV against plaintext
    ++ */
    ++		for (x = 0; x < ctx->aes.blocklen; x++) {
    ++			tmp[x] = pt[x] ^ ctx->aes.IV[x];
    ++		}
    ++/*
    ++		encrypt
    ++ */
    ++		aes_ecb_encrypt(tmp, ct, &ctx->aes);
    ++
    ++/*
    ++		store IV [ciphertext] for a future block
    ++ */
    ++		for (x = 0; x < ctx->aes.blocklen; x++) {
    ++			ctx->aes.IV[x] = ct[x];
    ++		}
    ++		ct += ctx->aes.blocklen;
    ++		pt += ctx->aes.blocklen;
    ++	}
    ++
    ++#ifdef CLEAN_STACK
    ++	zeromem(tmp, sizeof(tmp));
    ++#endif
    ++	return len;
    ++}
    ++
    ++int matrixAesDecrypt(sslCipherContext_t *ctx, unsigned char *ct, unsigned char *pt, int len)
    ++{
    ++	int				x, i;
    ++	unsigned char	tmp[MAXBLOCKSIZE], tmp2[MAXBLOCKSIZE];
    ++
    ++	if (pt == NULL || ct == NULL || ctx == NULL || (len & 0x7) != 0) {
    ++		matrixStrDebugMsg("Bad parameters to matrixAesDecrypt\n", NULL);
    ++		return -1;
    ++	}
    ++
    ++/*
    ++	is blocklen valid?
    ++ */
    ++	if (ctx->aes.blocklen < 0 || ctx->aes.blocklen > 
    ++		(int)sizeof(ctx->aes.IV)) {
    ++		return -1;
    ++	}
    ++	for (i = 0; i < len; i += ctx->aes.blocklen) {
    ++/*
    ++		decrypt the block from ct into tmp
    ++ */
    ++		aes_ecb_decrypt(ct, tmp, &ctx->aes);
    ++/*
    ++		xor IV against the plaintext of the previous step
    ++ */
    ++		for (x = 0; x < ctx->aes.blocklen; x++) { 
    ++/*
    ++			copy CT in case ct == pt
    ++ */
    ++			tmp2[x] = ct[x]; 
    ++/*
    ++			actually decrypt the byte
    ++ */
    ++			pt[x] =	tmp[x] ^ ctx->aes.IV[x]; 
    ++		}
    ++/*
    ++		replace IV with this current ciphertext
    ++ */
    ++		for (x = 0; x < ctx->aes.blocklen; x++) {
    ++			ctx->aes.IV[x] = tmp2[x];
    ++		}
    ++		ct += ctx->aes.blocklen;
    ++		pt += ctx->aes.blocklen;
    ++	}
    ++#ifdef CLEAN_STACK
    ++	zeromem(tmp, sizeof(tmp));
    ++	zeromem(tmp2, sizeof(tmp2));
    ++#endif
    ++	return len;
    ++}
    ++
    ++int aes_setup(const unsigned char *key, int keylen, int rounds, aes_CBC *skey)
    ++{
    ++	int			i, j;
    ++	ulong32		temp, *rk, *rrk;
    ++	
    ++	if (key == NULL || skey == NULL) {
    ++		return -1;
    ++	}
    ++	
    ++	if (keylen != 16 && keylen != 24 && keylen != 32) {
    ++		return CRYPT_INVALID_KEYSIZE;
    ++	}
    ++	
    ++	if (rounds != 0 && rounds != (10 + ((keylen/8)-2)*2)) {
    ++		return CRYPT_INVALID_ROUNDS;
    ++	}
    ++	
    ++	skey->key.Nr = 10 + ((keylen/8)-2)*2;
    ++		
    ++/*
    ++	setup the forward key
    ++ */
    ++	i				= 0;
    ++	rk				= skey->key.eK;
    ++	LOAD32H(rk[0], key	   );
    ++	LOAD32H(rk[1], key +  4);
    ++	LOAD32H(rk[2], key +  8);
    ++	LOAD32H(rk[3], key + 12);
    ++	if (keylen == 16) {
    ++		j = 44;
    ++		for (;;) {
    ++			temp  = rk[3];
    ++			rk[4] = rk[0] ^
    ++				(Te4_3[byte(temp, 2)]) ^
    ++				(Te4_2[byte(temp, 1)]) ^
    ++				(Te4_1[byte(temp, 0)]) ^
    ++				(Te4_0[byte(temp, 3)]) ^
    ++				rcon[i];
    ++			rk[5] = rk[1] ^ rk[4];
    ++			rk[6] = rk[2] ^ rk[5];
    ++			rk[7] = rk[3] ^ rk[6];
    ++			if (++i == 10) {
    ++				break;
    ++			}
    ++			rk += 4;
    ++		}
    ++	} else if (keylen == 24) {
    ++		j = 52;
    ++		LOAD32H(rk[4], key + 16);
    ++		LOAD32H(rk[5], key + 20);
    ++		for (;;) {
    ++		#ifdef _MSC_VER
    ++			temp = skey->key.eK[rk - skey->key.eK + 5];
    ++		#else
    ++			temp = rk[5];
    ++		#endif /* _MSC_VER */
    ++			rk[ 6] = rk[ 0] ^
    ++				(Te4_3[byte(temp, 2)]) ^
    ++				(Te4_2[byte(temp, 1)]) ^
    ++				(Te4_1[byte(temp, 0)]) ^
    ++				(Te4_0[byte(temp, 3)]) ^
    ++				rcon[i];
    ++			rk[ 7] = rk[ 1] ^ rk[ 6];
    ++			rk[ 8] = rk[ 2] ^ rk[ 7];
    ++			rk[ 9] = rk[ 3] ^ rk[ 8];
    ++			if (++i == 8) {
    ++				break;
    ++			}
    ++			rk[10] = rk[ 4] ^ rk[ 9];
    ++			rk[11] = rk[ 5] ^ rk[10];
    ++			rk += 6;
    ++		}
    ++	} else if (keylen == 32) {
    ++		j = 60;
    ++		LOAD32H(rk[4], key + 16);
    ++		LOAD32H(rk[5], key + 20);
    ++		LOAD32H(rk[6], key + 24);
    ++		LOAD32H(rk[7], key + 28);
    ++		for (;;) {
    ++		#ifdef _MSC_VER
    ++			temp = skey->key.eK[rk - skey->key.eK + 7];
    ++		#else
    ++			temp = rk[7];
    ++		#endif /* _MSC_VER */
    ++			rk[ 8] = rk[ 0] ^
    ++				(Te4_3[byte(temp, 2)]) ^
    ++				(Te4_2[byte(temp, 1)]) ^
    ++				(Te4_1[byte(temp, 0)]) ^
    ++				(Te4_0[byte(temp, 3)]) ^
    ++				rcon[i];
    ++			rk[ 9] = rk[ 1] ^ rk[ 8];
    ++			rk[10] = rk[ 2] ^ rk[ 9];
    ++			rk[11] = rk[ 3] ^ rk[10];
    ++			if (++i == 7) {
    ++				break;
    ++			}
    ++			temp = rk[11];
    ++			rk[12] = rk[ 4] ^
    ++				(Te4_3[byte(temp, 3)]) ^
    ++				(Te4_2[byte(temp, 2)]) ^
    ++				(Te4_1[byte(temp, 1)]) ^
    ++				(Te4_0[byte(temp, 0)]);
    ++			rk[13] = rk[ 5] ^ rk[12];
    ++			rk[14] = rk[ 6] ^ rk[13];
    ++			rk[15] = rk[ 7] ^ rk[14];
    ++			rk += 8;
    ++		}
    ++	} else {
    ++/*
    ++		this can't happen
    ++ */
    ++		j = 4;
    ++	}
    ++	
    ++/*
    ++	setup the inverse key now
    ++ */
    ++	rk		= skey->key.dK;
    ++	rrk		= skey->key.eK + j - 4; 
    ++	
    ++/*
    ++	apply the inverse MixColumn transform to all round keys but the first and the last:
    ++ */
    ++	/* copy first */
    ++	*rk++	= *rrk++;
    ++	*rk++	= *rrk++;
    ++	*rk++	= *rrk++;
    ++	*rk		= *rrk;
    ++	rk -= 3; rrk -= 3;
    ++	
    ++	for (i = 1; i < skey->key.Nr; i++) {
    ++		rrk	-= 4;
    ++		rk	+= 4;
    ++#ifdef SMALL_CODE
    ++		temp = rrk[0];
    ++		rk[0] =
    ++			Td0(255 & Te4[byte(temp, 3)]) ^
    ++			Td1(255 & Te4[byte(temp, 2)]) ^
    ++			Td2(255 & Te4[byte(temp, 1)]) ^
    ++			Td3(255 & Te4[byte(temp, 0)]);
    ++		temp = rrk[1];
    ++		rk[1] =
    ++			Td0(255 & Te4[byte(temp, 3)]) ^
    ++			Td1(255 & Te4[byte(temp, 2)]) ^
    ++			Td2(255 & Te4[byte(temp, 1)]) ^
    ++			Td3(255 & Te4[byte(temp, 0)]);
    ++		temp = rrk[2];
    ++		rk[2] =
    ++			Td0(255 & Te4[byte(temp, 3)]) ^
    ++			Td1(255 & Te4[byte(temp, 2)]) ^
    ++			Td2(255 & Te4[byte(temp, 1)]) ^
    ++			Td3(255 & Te4[byte(temp, 0)]);
    ++		temp = rrk[3];
    ++		rk[3] =
    ++			Td0(255 & Te4[byte(temp, 3)]) ^
    ++			Td1(255 & Te4[byte(temp, 2)]) ^
    ++			Td2(255 & Te4[byte(temp, 1)]) ^
    ++			Td3(255 & Te4[byte(temp, 0)]);
    ++#else /* SMALL CODE */
    ++		temp = rrk[0];
    ++		rk[0] =
    ++			Tks0[byte(temp, 3)] ^
    ++			Tks1[byte(temp, 2)] ^
    ++			Tks2[byte(temp, 1)] ^
    ++			Tks3[byte(temp, 0)];
    ++		temp = rrk[1];
    ++		rk[1] =
    ++			Tks0[byte(temp, 3)] ^
    ++			Tks1[byte(temp, 2)] ^
    ++			Tks2[byte(temp, 1)] ^
    ++			Tks3[byte(temp, 0)];
    ++		temp = rrk[2];
    ++		rk[2] =
    ++			Tks0[byte(temp, 3)] ^
    ++			Tks1[byte(temp, 2)] ^
    ++			Tks2[byte(temp, 1)] ^
    ++			Tks3[byte(temp, 0)];
    ++		temp = rrk[3];
    ++		rk[3] =
    ++			Tks0[byte(temp, 3)] ^
    ++			Tks1[byte(temp, 2)] ^
    ++			Tks2[byte(temp, 1)] ^
    ++			Tks3[byte(temp, 0)];
    ++#endif /* SMALL CODE */
    ++	}
    ++
    ++	/* copy last */
    ++	rrk	-= 4;
    ++	rk	+= 4;
    ++	*rk++ = *rrk++;
    ++	*rk++ = *rrk++;
    ++	*rk++ = *rrk++;
    ++	*rk	  = *rrk;
    ++
    ++	return CRYPT_OK;
    ++}
    ++
    ++#ifdef CLEAN_STACK
    ++void aes_ecb_encrypt(const unsigned char *pt, unsigned char *ct, aes_CBC *skey)
    ++{
    ++	_aes_ecb_encrypt(pt, ct, skey);
    ++	burn_stack(sizeof(unsigned long)*8 + sizeof(unsigned long*) + sizeof(int)*2);
    ++}
    ++#endif /* CLEAN_STACK */
    ++
    ++#ifdef CLEAN_STACK
    ++static void _aes_ecb_encrypt(const unsigned char *pt, unsigned char *ct, aes_CBC *skey)
    ++#else
    ++void aes_ecb_encrypt(const unsigned char *pt, unsigned char *ct, aes_CBC *skey)
    ++#endif /* CLEAN_STACK */
    ++{
    ++		ulong32		s0, s1, s2, s3, t0, t1, t2, t3, *rk;
    ++		int			Nr, r;
    ++
    ++	if (pt == NULL || ct == NULL || skey == NULL) {
    ++		return;
    ++	}
    ++	
    ++	Nr = skey->key.Nr;
    ++	rk = skey->key.eK;
    ++	
    ++/*
    ++	map byte array block to cipher state
    ++	and add initial round key:
    ++ */
    ++	LOAD32H(s0, pt     ); s0 ^= rk[0];
    ++	LOAD32H(s1, pt +  4); s1 ^= rk[1];
    ++	LOAD32H(s2, pt +  8); s2 ^= rk[2];
    ++	LOAD32H(s3, pt + 12); s3 ^= rk[3];
    ++
    ++/*
    ++	Nr - 1 full rounds:
    ++ */
    ++	r = Nr >> 1;
    ++	for (;;) {
    ++
    ++		t0 =
    ++			Te0(byte(s0, 3)) ^
    ++			Te1(byte(s1, 2)) ^
    ++			Te2(byte(s2, 1)) ^
    ++			Te3(byte(s3, 0)) ^
    ++			rk[4];
    ++		t1 =
    ++			Te0(byte(s1, 3)) ^
    ++			Te1(byte(s2, 2)) ^
    ++			Te2(byte(s3, 1)) ^
    ++			Te3(byte(s0, 0)) ^
    ++			rk[5];
    ++		t2 =
    ++			Te0(byte(s2, 3)) ^
    ++			Te1(byte(s3, 2)) ^
    ++			Te2(byte(s0, 1)) ^
    ++			Te3(byte(s1, 0)) ^
    ++			rk[6];
    ++		t3 =
    ++			Te0(byte(s3, 3)) ^
    ++			Te1(byte(s0, 2)) ^
    ++			Te2(byte(s1, 1)) ^
    ++			Te3(byte(s2, 0)) ^
    ++			rk[7];
    ++
    ++		rk += 8;
    ++		if (--r == 0) {
    ++			break;
    ++		}
    ++
    ++		s0 =
    ++			Te0(byte(t0, 3)) ^
    ++			Te1(byte(t1, 2)) ^
    ++			Te2(byte(t2, 1)) ^
    ++			Te3(byte(t3, 0)) ^
    ++			rk[0];
    ++		s1 =
    ++			Te0(byte(t1, 3)) ^
    ++			Te1(byte(t2, 2)) ^
    ++			Te2(byte(t3, 1)) ^
    ++			Te3(byte(t0, 0)) ^
    ++			rk[1];
    ++		s2 =
    ++			Te0(byte(t2, 3)) ^
    ++			Te1(byte(t3, 2)) ^
    ++			Te2(byte(t0, 1)) ^
    ++			Te3(byte(t1, 0)) ^
    ++			rk[2];
    ++		s3 =
    ++			Te0(byte(t3, 3)) ^
    ++			Te1(byte(t0, 2)) ^
    ++			Te2(byte(t1, 1)) ^
    ++			Te3(byte(t2, 0)) ^
    ++			rk[3];
    ++	}
    ++/*
    ++		apply last round and map cipher state to byte array block:
    ++ */
    ++	s0 =
    ++		(Te4_3[byte(t0, 3)]) ^
    ++		(Te4_2[byte(t1, 2)]) ^
    ++		(Te4_1[byte(t2, 1)]) ^
    ++		(Te4_0[byte(t3, 0)]) ^
    ++		rk[0];
    ++	STORE32H(s0, ct);
    ++	s1 =
    ++		(Te4_3[byte(t1, 3)]) ^
    ++		(Te4_2[byte(t2, 2)]) ^
    ++		(Te4_1[byte(t3, 1)]) ^
    ++		(Te4_0[byte(t0, 0)]) ^
    ++		rk[1];
    ++	STORE32H(s1, ct+4);
    ++	s2 =
    ++		(Te4_3[byte(t2, 3)]) ^
    ++		(Te4_2[byte(t3, 2)]) ^
    ++		(Te4_1[byte(t0, 1)]) ^
    ++		(Te4_0[byte(t1, 0)]) ^
    ++		rk[2];
    ++	STORE32H(s2, ct+8);
    ++	s3 =
    ++		(Te4_3[byte(t3, 3)]) ^
    ++		(Te4_2[byte(t0, 2)]) ^
    ++		(Te4_1[byte(t1, 1)]) ^
    ++		(Te4_0[byte(t2, 0)]) ^ 
    ++		rk[3];
    ++	STORE32H(s3, ct+12);
    ++}
    ++
    ++#ifdef CLEAN_STACK
    ++void aes_ecb_decrypt(const unsigned char *pt, unsigned char *ct, aes_CBC *skey)
    ++{
    ++	_aes_ecb_decrypt(pt, ct, skey);
    ++	burn_stack(sizeof(unsigned long)*8 + sizeof(unsigned long*) + sizeof(int)*2);
    ++}
    ++#endif /* CLEAN_STACK */
    ++
    ++#ifdef CLEAN_STACK
    ++static void _aes_ecb_decrypt(const unsigned char *ct, unsigned char *pt, aes_CBC *skey)
    ++#else
    ++void aes_ecb_decrypt(const unsigned char *ct, unsigned char *pt, aes_CBC *skey)
    ++#endif /* CLEAN_STACK */
    ++{
    ++	ulong32		s0, s1, s2, s3, t0, t1, t2, t3, *rk;
    ++	int			Nr, r;
    ++
    ++	if (pt == NULL || ct == NULL || skey == NULL) {
    ++		return;
    ++	}
    ++
    ++	Nr = skey->key.Nr;
    ++	rk = skey->key.dK;
    ++
    ++/*
    ++	map byte array block to cipher state and add initial round key:
    ++ */
    ++	LOAD32H(s0, ct		); s0 ^= rk[0];
    ++	LOAD32H(s1, ct	+  4); s1 ^= rk[1];
    ++	LOAD32H(s2, ct	+  8); s2 ^= rk[2];
    ++	LOAD32H(s3, ct	+ 12); s3 ^= rk[3];
    ++
    ++/*
    ++	Nr - 1 full rounds:
    ++ */
    ++	r = Nr >> 1;
    ++	for	(;;) {
    ++
    ++		t0 =
    ++			Td0(byte(s0, 3)) ^
    ++			Td1(byte(s3, 2)) ^
    ++			Td2(byte(s2, 1)) ^
    ++			Td3(byte(s1, 0)) ^
    ++			rk[4];
    ++		t1 =
    ++			Td0(byte(s1, 3)) ^
    ++			Td1(byte(s0, 2)) ^
    ++			Td2(byte(s3, 1)) ^
    ++			Td3(byte(s2, 0)) ^
    ++			rk[5];
    ++		t2 =
    ++			Td0(byte(s2, 3)) ^
    ++			Td1(byte(s1, 2)) ^
    ++			Td2(byte(s0, 1)) ^
    ++			Td3(byte(s3, 0)) ^
    ++			rk[6];
    ++		t3 =
    ++			Td0(byte(s3, 3)) ^
    ++			Td1(byte(s2, 2)) ^
    ++			Td2(byte(s1, 1)) ^
    ++			Td3(byte(s0, 0)) ^
    ++			rk[7];
    ++
    ++		rk += 8;
    ++		if (--r == 0) {
    ++			break;
    ++		}
    ++
    ++		s0 =
    ++			Td0(byte(t0, 3)) ^
    ++			Td1(byte(t3, 2)) ^
    ++			Td2(byte(t2, 1)) ^
    ++			Td3(byte(t1, 0)) ^
    ++			rk[0];
    ++		s1 =
    ++			Td0(byte(t1, 3)) ^
    ++			Td1(byte(t0, 2)) ^
    ++			Td2(byte(t3, 1)) ^
    ++			Td3(byte(t2, 0)) ^
    ++			rk[1];
    ++		s2 =
    ++			Td0(byte(t2, 3)) ^
    ++			Td1(byte(t1, 2)) ^
    ++			Td2(byte(t0, 1)) ^
    ++			Td3(byte(t3, 0)) ^
    ++			rk[2];
    ++		s3 =
    ++			Td0(byte(t3, 3)) ^
    ++			Td1(byte(t2, 2)) ^
    ++			Td2(byte(t1, 1)) ^
    ++			Td3(byte(t0, 0)) ^
    ++			rk[3];
    ++	}
    ++
    ++/*
    ++	apply last round and map cipher state to byte array block:
    ++ */
    ++	s0 =
    ++		(Td4[byte(t0, 3)] & 0xff000000) ^
    ++		(Td4[byte(t3, 2)] & 0x00ff0000) ^
    ++		(Td4[byte(t2, 1)] & 0x0000ff00) ^
    ++		(Td4[byte(t1, 0)] & 0x000000ff) ^
    ++		rk[0];
    ++	STORE32H(s0, pt);
    ++	s1 =
    ++		(Td4[byte(t1, 3)] & 0xff000000) ^
    ++		(Td4[byte(t0, 2)] & 0x00ff0000) ^
    ++		(Td4[byte(t3, 1)] & 0x0000ff00) ^
    ++		(Td4[byte(t2, 0)] & 0x000000ff) ^
    ++		rk[1];
    ++	STORE32H(s1, pt+4);
    ++	s2 =
    ++		(Td4[byte(t2, 3)] & 0xff000000) ^
    ++		(Td4[byte(t1, 2)] & 0x00ff0000) ^
    ++		(Td4[byte(t0, 1)] & 0x0000ff00) ^
    ++		(Td4[byte(t3, 0)] & 0x000000ff) ^
    ++		rk[2];
    ++	STORE32H(s2, pt+8);
    ++	s3 =
    ++		(Td4[byte(t3, 3)] & 0xff000000) ^
    ++		(Td4[byte(t2, 2)] & 0x00ff0000) ^
    ++		(Td4[byte(t1, 1)] & 0x0000ff00) ^
    ++		(Td4[byte(t0, 0)] & 0x000000ff) ^
    ++		rk[3];
    ++	STORE32H(s3, pt+12);
    ++}
    ++
    ++#ifdef CLEAN_STACK
    ++void aes(const unsigned char *ct, unsigned char *pt, aes_CBC *skey) 
    ++{
    ++	_aes_ecb_decrypt(ct, pt, skey);
    ++	burn_stack(sizeof(unsigned long)*8 + sizeof(unsigned long*) + sizeof(int)*2);
    ++}
    ++#endif /* CLEAN_STACK */
    ++
    ++
    ++#ifdef PEERSEC_TEST
    ++
    ++int matrixAesTest()
    ++{
    ++	int err;
    ++	static const struct {
    ++		int keylen;
    ++		unsigned char key[32], pt[16], ct[16];
    ++	} tests[] = {
    ++	{ 16,
    ++		{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
    ++			0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }, 
    ++		{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
    ++			0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
    ++		{ 0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30, 
    ++			0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a }
    ++		}, { 
    ++		24,
    ++		{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
    ++			0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
    ++			0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 },
    ++		{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
    ++			0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
    ++		{ 0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0, 
    ++			0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91 }
    ++		}, {
    ++		32,
    ++		{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
    ++			0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
    ++			0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 
    ++			0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
    ++		{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
    ++			0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
    ++		{ 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf, 
    ++			0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89 }
    ++		}
    ++	};
    ++
    ++	aes_CBC key;
    ++	unsigned char tmp[2][16];
    ++	int i, y;
    ++
    ++	for (i = 0; i < (int)(sizeof(tests)/sizeof(tests[0])); i++) {
    ++		zeromem(&key, sizeof(key));
    ++		if ((err = aes_setup(tests[i].key, tests[i].keylen, 0, &key)) != CRYPT_OK) { 
    ++			return err;
    ++		}
    ++
    ++		aes_ecb_encrypt(tests[i].pt, tmp[0], &key);
    ++		aes_ecb_decrypt(tmp[0], tmp[1], &key);
    ++		if (memcmp(tmp[0], tests[i].ct, 16) || memcmp(tmp[1], tests[i].pt, 16)) {
    ++#if 0
    ++			printf("\n\nTest %d failed\n", i);
    ++			if (memcmp(tmp[0], tests[i].ct, 16)) {
    ++				printf("CT: ");
    ++				for (i = 0; i < 16; i++) {
    ++					printf("%02x ", tmp[0][i]);
    ++				}
    ++				printf("\n");
    ++			} else {
    ++				printf("PT: ");
    ++				for (i = 0; i < 16; i++) {
    ++					printf("%02x ", tmp[1][i]);
    ++				}
    ++				printf("\n");
    ++			}
    ++#endif /* 0 */
    ++		return CRYPT_FAIL_TESTVECTOR;
    ++		}
    ++
    ++/* 
    ++		now see if we can encrypt all zero bytes 1000 times,
    ++		decrypt and come back where we started 
    ++ */
    ++		for (y = 0; y < 16; y++) tmp[0][y] = 0;
    ++		for (y = 0; y < 1000; y++) aes_ecb_encrypt(tmp[0], tmp[0], &key);
    ++		for (y = 0; y < 1000; y++) aes_ecb_decrypt(tmp[0], tmp[0], &key);
    ++		for (y = 0; y < 16; y++) if (tmp[0][y] != 0) return CRYPT_FAIL_TESTVECTOR;
    ++	}
    ++	return CRYPT_OK;
    ++}
    ++#endif /* PEERSEC_TEST */
    ++
    ++#endif /* USE_AES */
    ++/******************************************************************************/
    +diff -urN matrixssl.old/src/crypto/peersec/md5.c matrixssl/src/crypto/peersec/md5.c
    +--- matrixssl.old/src/crypto/peersec/md5.c	2005-02-23 22:43:10.000000000 +0100
    ++++ matrixssl/src/crypto/peersec/md5.c	2005-03-06 01:32:33.000000000 +0100
    +@@ -334,7 +334,7 @@
    + #ifdef CLEAN_STACK
    + 	psZeromem(md, sizeof(hash_state));
    + #endif /* CLEAN_STACK */
    +-	return 16;
    ++	return SSL_MD5_HASH_SIZE;
    + }
    + 
    + #ifdef PEERSEC_TEST
    +diff -urN matrixssl.old/src/crypto/peersec/pscrypto.h matrixssl/src/crypto/peersec/pscrypto.h
    +--- matrixssl.old/src/crypto/peersec/pscrypto.h	2005-02-23 22:43:10.000000000 +0100
    ++++ matrixssl/src/crypto/peersec/pscrypto.h	2005-03-06 01:32:33.000000000 +0100
    +@@ -40,7 +40,7 @@
    + 	PeerSec crypto-specific defines.
    +  */
    + #define SMALL_CODE
    +-#define CLEAN_STACK
    ++#undef CLEAN_STACK
    + /*
    + 	If Native 64 bit integers are not supported, we must set the 16 bit flag
    + 	to produce 32 bit mp_words in mpi.h
    +diff -urN matrixssl.old/src/crypto/peersec/sha1.c matrixssl/src/crypto/peersec/sha1.c
    +--- matrixssl.old/src/crypto/peersec/sha1.c	2005-02-23 22:43:10.000000000 +0100
    ++++ matrixssl/src/crypto/peersec/sha1.c	2005-03-06 01:32:33.000000000 +0100
    +@@ -273,7 +273,7 @@
    + #ifdef CLEAN_STACK
    + 	psZeromem(md, sizeof(hash_state));
    + #endif /* CLEAN_STACK */
    +-	return 20;
    ++	return SSL_SHA1_HASH_SIZE;
    + }
    + 
    + #ifdef PEERSEC_TEST
    +diff -urN matrixssl.old/src/Makefile matrixssl/src/Makefile
    +--- matrixssl.old/src/Makefile	2005-02-23 22:43:10.000000000 +0100
    ++++ matrixssl/src/Makefile	2005-03-06 01:39:06.000000000 +0100
    +@@ -15,7 +15,14 @@
    + E       =
    + 
    + LIBRARY	= libmatrixssl$(SO)
    +-STATIC	= libmatrixsslstatic$(A)
    ++
    ++SOVERSION_MAJ := 1
    ++SOVERSION_MIN := 2
    ++SOVERSION_REV := 4
    ++SONAME := $(LIBRARY).$(SOVERSION_MAJ)
    ++SOREAL := $(LIBRARY).$(SOVERSION_MAJ).$(SOVERSION_MIN).$(SOVERSION_REV)
    ++
    +++STATIC	= libmatrixsslstatic$(A)
    + 
    + OBJECTS	= \
    + 		cipherSuite$(O) \
    +@@ -24,6 +31,7 @@
    + 		sslEncode$(O) \
    + 		sslv3$(O) \
    + 		os/linux/linux$(O)	\
    ++		crypto/peersec/aes$(O) \
    + 		crypto/peersec/arc4$(O) \
    + 		crypto/peersec/asn1$(O) \
    + 		crypto/peersec/base64$(O) \
    +@@ -66,7 +74,7 @@
    + #
    + SHARED	= -shared
    + CFLAGS  = $(DFLAGS) -DLINUX -I./ -Icrypto/peersec
    +-LDFLAGS = -lc -lpthread -lcrypto
    ++LDFLAGS = -lc -lpthread -Wl,-soname,$(SONAME)
    + 
    + #
    + #	Override variables for compilation on Mac OS X (Darwin)
    +@@ -105,8 +113,9 @@
    + # Build the library
    + #
    + $(LIBRARY): $(OBJECTS)
    +-	$(CC) $(SHARED) -o $@ $^ $(LDFLAGS)
    +-	$(STRIP) $(LIBRARY)
    ++	$(CC) $(SHARED) -o $(SOREAL) $^ $(LDFLAGS)
    ++	ln -sf $(SOREAL) $(SONAME)
    ++	ln -sf $(SONAME) $(LIBRARY)
    + 
    + #
    + # Build the static library
    +@@ -119,4 +128,4 @@
    + #	Clean up all generated files
    + #
    + clean:
    +-	rm -f $(LIBRARY) $(OBJECTS) $(STATIC)
    ++	rm -f $(LIBRARY) $(OBJECTS) $(SONAME) $(SOREAL)
    +diff -urN matrixssl.old/src/matrixSsl.c matrixssl/src/matrixSsl.c
    +--- matrixssl.old/src/matrixSsl.c	2005-02-23 22:43:10.000000000 +0100
    ++++ matrixssl/src/matrixSsl.c	2005-03-06 01:37:41.000000000 +0100
    +@@ -950,6 +950,49 @@
    + 	sslAssert(ssl->hsPool == NULL);
    + }
    + 
    ++
    ++/******************************************************************************/
    ++/*
    ++	Compute an MD5 digest
    ++*/
    ++unsigned char *matrixMd5Digest(
    ++	const unsigned char *buf, unsigned long len, unsigned char *hash)
    ++{
    ++	sslMd5Context_t ctx;
    ++	static unsigned char hashBuf[SSL_MD5_HASH_SIZE];
    ++
    ++	if (hash == NULL) {
    ++		hash = hashBuf;
    ++	}
    ++
    ++	matrixMd5Init(&ctx);
    ++	matrixMd5Update(&ctx, buf, len);
    ++	matrixMd5Final(&ctx, hash);
    ++
    ++	return hash;
    ++}
    ++
    ++/******************************************************************************/
    ++/*
    ++	Compute an SHA1 digest
    ++*/
    ++unsigned char *matrixSha1Digest(
    ++	const unsigned char *buf, unsigned long len, unsigned char *hash)
    ++{
    ++	sslSha1Context_t ctx;
    ++	static unsigned char hashBuf[SSL_SHA1_HASH_SIZE];
    ++
    ++	if (hash == NULL) {
    ++		hash = hashBuf;
    ++	}
    ++
    ++	matrixSha1Init(&ctx);
    ++	matrixSha1Update(&ctx, buf, len);
    ++	matrixSha1Final(&ctx, hash);
    ++
    ++	return hash;
    ++}
    ++
    + /******************************************************************************/
    + /*
    + 	Debugging APIs
    diff --git a/libs/matrixssl/patches/200-compile-fixes.patch b/libs/matrixssl/patches/200-compile-fixes.patch
    new file mode 100644
    index 0000000..ab6a261
    --- /dev/null
    +++ b/libs/matrixssl/patches/200-compile-fixes.patch
    @@ -0,0 +1,64 @@
    +Index: matrixssl/src/os/linux/linux.c
    +===================================================================
    +--- matrixssl.orig/src/os/linux/linux.c	2010-11-02 21:01:53.702000002 +0100
    ++++ matrixssl/src/os/linux/linux.c	2010-11-02 21:02:37.657009753 +0100
    +@@ -39,8 +39,12 @@
    + 
    + #include "../osLayer.h"
    + 
    ++#ifndef CLK_TCK
    ++# define CLK_TCK	CLOCKS_PER_SEC
    ++#endif
    ++
    + #if defined(__i386__) || defined(RDTSC)
    +-#include 
    ++//#include 
    + /*
    + 	As defined in asm/timex.h for x386:
    + */
    +@@ -51,7 +55,7 @@
    + static sslTime_t	hiresStart; 	/* zero-time */
    + static sslTime_t	hiresFreq; 		/* tics per second */
    + #else /* __i386__ */
    +-static unsigned	int32 prevTicks; 		/* Check wrap */
    ++static uint32		prevTicks; 		/* Check wrap */
    + static sslTime_t	elapsedTime; 	/* Last elapsed time */
    + #endif
    + 
    +Index: matrixssl/src/Makefile
    +===================================================================
    +--- matrixssl.orig/src/Makefile	2010-11-02 21:02:42.312000001 +0100
    ++++ matrixssl/src/Makefile	2010-11-02 21:04:21.979001189 +0100
    +@@ -63,13 +63,6 @@
    + endif
    + 
    + #
    +-#	Override variables for compilation on x86-64 (AMD64, Nacona, etc)
    +-#
    +-ifeq ($(shell uname -m),x86_64)
    +-DFLAGS  += -march=k8 -fPIC -DFP_64BIT -DTFM_X86_64 -DRDTSC
    +-endif
    +-
    +-#
    + #	Compile options
    + #
    + SHARED	= -shared
    +@@ -77,18 +70,6 @@
    + LDFLAGS = -lc -lpthread -Wl,-soname,$(SONAME)
    + 
    + #
    +-#	Override variables for compilation on Mac OS X (Darwin)
    +-#
    +-ifeq ($(shell uname),Darwin)
    +-CC	= cc
    +-SO	= .dylib
    +-SHARED	= -dynamiclib
    +-CFLAGS += -DOSX -isystem -I/usr/include
    +-LDFLAGS = -flat_namespace -install_name @executable_path/../src/$(LIBRARY)
    +-STRIP = test
    +-endif
    +-
    +-#
    + #	Override variables for compilation on uClinux (example only)
    + #
    + ifdef UCLINUX
    diff --git a/libs/mxml/Makefile b/libs/mxml/Makefile
    new file mode 100644
    index 0000000..1123e55
    --- /dev/null
    +++ b/libs/mxml/Makefile
    @@ -0,0 +1,55 @@
    +#
    +# Copyright (C) 2010 Tobias Schneider
    +# Copyright (C) 2007 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=mxml
    +PKG_VERSION:=2.6
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://ftp.easysw.com/pub/mxml/$(PKG_VERSION)/
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/mxml
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=mini-xml
    +  URL:=http://www.minixml.org/
    +endef
    +
    +define Package/mxml/description
    +  A small xml library.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	mkdir -p $(1)/usr/include
    +	$(CP) $(PKG_BUILD_DIR)/mxml.h $(1)/usr/include/
    +	mkdir -p $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libmxml.so* $(1)/usr/lib/
    +	mkdir -p $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_BUILD_DIR)/mxml.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/mxml/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libmxml.so*  $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,mxml))
    diff --git a/libs/mxml/patches/001-targets.patch b/libs/mxml/patches/001-targets.patch
    new file mode 100644
    index 0000000..6d53249
    --- /dev/null
    +++ b/libs/mxml/patches/001-targets.patch
    @@ -0,0 +1,12 @@
    +diff -Nur mxml-2.6-orig/Makefile.in mxml-2.6/Makefile.in
    +--- mxml-2.6-orig/Makefile.in	2008-12-06 05:20:38.000000000 +0100
    ++++ mxml-2.6/Makefile.in	2010-05-28 01:58:37.000000000 +0200
    +@@ -88,7 +88,7 @@
    + 			mxml-node.o mxml-search.o mxml-set.o
    + LIBOBJS		=	$(PUBLIBOBJS) mxml-private.o mxml-string.o
    + OBJS		=	mxmldoc.o testmxml.o $(LIBOBJS)
    +-TARGETS		=	$(LIBMXML) mxmldoc testmxml mxml.xml doc/mxml.man
    ++TARGETS		=	$(LIBMXML)
    + 
    + 
    + #
    diff --git a/libs/mysql/Makefile b/libs/mysql/Makefile
    new file mode 100644
    index 0000000..3dcae75
    --- /dev/null
    +++ b/libs/mysql/Makefile
    @@ -0,0 +1,200 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=mysql
    +PKG_VERSION:=5.1.53
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=\
    +	http://mysql.planetmirror.com/Downloads/MySQL-5.1/ \
    +	http://mysql.he.net/Downloads/MySQL-5.1/ \
    +	http://www.linorg.usp.br/mysql/Downloads/MySQL-5.1/ \
    +	http://mysql.holywar.net/Downloads/MySQL-5.1/
    +PKG_MD5SUM:=e5e7c5b0b5c382489e6a66778703bc46
    +
    +PKG_BUILD_DEPENDS:=libncurses libreadline
    +PKG_BUILD_PARALLEL:=1
    +
    +PKG_FIXUP:=libtool no-autoreconf
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libmysqlclient/Default
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+zlib
    +  TITLE:=MySQL client library
    +  URL:=http://dev.mysql.com/
    +endef
    +
    +define Package/mysql-server/Default
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+zlib +libmysqlclient +uclibcxx
    +  TITLE:=MySQL Server
    +  URL:=http://dev.mysql.com/
    +  SUBMENU:=database
    +endef
    +
    +define Package/mysql-server
    +  $(call Package/mysql-server/Default)
    +endef
    +
    +define Package/libmysqlclient
    +  $(call Package/libmysqlclient/Default)
    +endef
    +
    +define Package/libmysqlclient_r
    +  $(call Package/libmysqlclient/Default)
    +  TITLE += threadsafe
    +endef
    +
    +TARGET_CXX=g++-uc
    +
    +CONFIGURE_VARS += \
    +        CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
    +        CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
    +        LDFLAGS="$$$$LDFLAGS" \
    +        LIBS="-nodefaultlibs -luClibc++ -lm $(LIBGCC_S)" \
    +        CLIENTCLIBS="-nodefaultlibs -luClibc++ -lm $(LIBGCC_S)" \
    +
    +
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR); touch \
    +		configure.in \
    +		aclocal.m4 \
    +		Makefile.in \
    +		config.h.in \
    +		configure \
    +	);
    +	$(CP) files/lex_hash.h $(PKG_BUILD_DIR)/sql/lex_hash.h
    +
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +		--enable-thread-safe-client \
    +		--disable-assembler \
    +		--with-pthread \
    +		--with-server \
    +		--without-mysqlmanager \
    +		--without-raid \
    +		--with-mysqld-user=root \
    +		--with-unix-socket-path=/tmp \
    +		--without-libwrap \
    +		--without-pstack \
    +		--with-low-memory \
    +		--without-embedded-server \
    +		--without-query-cache \
    +		--without-mysqlfs \
    +		--without-vio \
    +		--without-ssl \
    +		--without-docs \
    +		--without-man \
    +		--without-bench \
    +		--without-readline \
    +		--without-debug \
    +		--with-named-thread-libs=-lpthread \
    +		, \
    +		mysql_cv_compress=yes \
    +		mysql_cv_gethostname_style=glibc2 \
    +		ac_cv_c_stack_direction=-1 \
    +	);
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile
    +	$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
    +		SUBDIRS="include" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all
    +	$(MAKE) -C "$(PKG_BUILD_DIR)" \
    +		SUBDIRS="include" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		install
    +	$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)/libmysql" \
    +		CC="g++" \
    +		CFLAGS="$(HOST_CFLAGS)" \
    +		CPPFLAGS="$(HOST_CFLAGS)" \
    +		LDFLAGS="$(HOST_LDFLAGS)" \
    +		conf_to_src
    +	$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
    +		SUBDIRS="libmysql" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all
    +	$(MAKE) -C "$(PKG_BUILD_DIR)" \
    +		SUBDIRS="libmysql" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		install
    +	$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
    +		SUBDIRS="libmysql_r" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all
    +	$(MAKE) -C "$(PKG_BUILD_DIR)" \
    +		SUBDIRS="libmysql_r" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		install
    +	$(MAKE) -C "$(PKG_BUILD_DIR)" \
    +		SUBDIRS="scripts" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		bin_SCRIPTS="mysql_config" \
    +		install
    +	$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all
    +	$(MAKE) -C "$(PKG_BUILD_DIR)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		install
    +endef
    +
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(1)/usr/bin/
    +	ln -sf $(STAGING_DIR)/usr/bin/mysql_config $(2)/bin/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(1)/usr/include/
    +	# NOTE: needed for MySQL-Python
    +	$(CP) $(PKG_BUILD_DIR)/include/mysqld_error.h $(1)/usr/include/mysql/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql $(1)/usr/lib/
    +	rm -f $(1)/usr/lib/mysql/libmysqlclient.la
    +endef
    +
    +define Package/libmysqlclient/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql/libmysqlclient.so.* $(1)/usr/lib/
    +endef
    +define Package/libmysqlclient_r/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql/libmysqlclient_r.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/mysql-server/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/mysqld $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/myisamchk $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysqladmin $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysqldump $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_install_db $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/my_print_defaults $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/etc/init.d/
    +	$(INSTALL_BIN) files/mysqld.init $(1)/etc/init.d/mysqld
    +	$(INSTALL_CONF) conf/my.cnf $(1)/etc/
    +	$(INSTALL_DIR) $(1)/usr/share/mysql
    +	$(INSTALL_DIR) $(1)/usr/share/mysql/english
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/english/errmsg.sys $(1)/usr/share/mysql/english
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/fill_help_tables.sql $(1)/usr/share/mysql/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables.sql $(1)/usr/share/mysql/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables_data.sql $(1)/usr/share/mysql/
    +endef
    +
    +$(eval $(call BuildPackage,mysql-server))
    +$(eval $(call BuildPackage,libmysqlclient))
    +$(eval $(call BuildPackage,libmysqlclient_r))
    diff --git a/libs/mysql/conf/my.cnf b/libs/mysql/conf/my.cnf
    new file mode 100644
    index 0000000..ec2ade2
    --- /dev/null
    +++ b/libs/mysql/conf/my.cnf
    @@ -0,0 +1,54 @@
    +[client]
    +port		= 3306
    +socket		= /var/run/mysqld.sock
    +
    +[mysqld]
    +user		= root
    +socket		= /var/run/mysqld.sock
    +port		= 3306
    +basedir		= /usr
    +
    +############ Don't put this on the NAND #############
    +# Figure out where you are going to put the databases
    +# And run mysql_install_db --force
    +datadir		= /mnt/data/mysql/
    +
    +######### This should also not go on the NAND #######
    +tmpdir		= /mnt/data/tmp/
    +
    +skip-external-locking
    +
    +bind-address		= 127.0.0.1
    +
    +# Fine Tuning
    +key_buffer		= 16M
    +max_allowed_packet	= 16M
    +thread_stack		= 192K
    +thread_cache_size       = 8
    +
    +# Here you can see queries with especially long duration
    +#log_slow_queries	= /var/log/mysql/mysql-slow.log
    +#long_query_time = 2
    +#log-queries-not-using-indexes
    +
    +# The following can be used as easy to replay backup logs or for replication.
    +#server-id		= 1
    +#log_bin			= /var/log/mysql/mysql-bin.log
    +#expire_logs_days	= 10
    +#max_binlog_size         = 100M
    +#binlog_do_db		= include_database_name
    +#binlog_ignore_db	= include_database_name
    +
    +
    +[mysqldump]
    +quick
    +quote-names
    +max_allowed_packet	= 16M
    +
    +[mysql]
    +#no-auto-rehash	# faster start of mysql but no tab completition
    +
    +[isamchk]
    +key_buffer		= 16M
    +
    +
    diff --git a/libs/mysql/files/lex_hash.h b/libs/mysql/files/lex_hash.h
    new file mode 100644
    index 0000000..9425f93
    --- /dev/null
    +++ b/libs/mysql/files/lex_hash.h
    @@ -0,0 +1,6190 @@
    +/*
    +
    +  Do not edit this file directly!
    +
    +*/
    +/* Copyright 2001-2008 MySQL AB, 2008 Sun Microsystems, Inc.
    +
    +   This program is free software; you can redistribute it and/or modify
    +   it under the terms of the GNU General Public License as published by
    +   the Free Software Foundation; version 2 of the License.
    +
    +   This program is distributed in the hope that it will be useful,
    +   but WITHOUT ANY WARRANTY; without even the implied warranty of
    +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +   GNU General Public License for more details.
    +
    +   You should have received a copy of the GNU General Public License
    +   along with this program; see the file COPYING. If not, write to the
    +   Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston
    +   MA  02110-1301  USA. */
    +
    +/* Do not edit this file!  This is generated by gen_lex_hash.cc
    +that seeks for a perfect hash function */
    +
    +#include "lex.h"
    +
    +static uchar sql_functions_map[12604]= {
    +'<', '>', 29, 0,
    +'!', '|', 32, 0,
    +'<', 'X', 150, 0,
    +'B', 'Y', 43, 1,
    +'A', 'W', 208, 2,
    +'A', 'V', 61, 4,
    +'A', 'W', 156, 5,
    +'C', 'Z', 87, 7,
    +'A', 'V', 14, 9,
    +'A', 'Y', 188, 9,
    +'D', 'U', 136, 10,
    +'C', 'V', 202, 10,
    +'D', 'U', 72, 11,
    +'A', 'U', 104, 11,
    +'A', 'S', 173, 11,
    +'H', 'U', 231, 11,
    +'C', 'S', 245, 11,
    +'G', 'S', 26, 12,
    +'S', 'S', 39, 12,
    +'M', 'M', 61, 12,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   23, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   20, 1,
    +0,   0,   1, 0,
    +0,   0,   5, 0,
    +0,   0,   6, 0,
    +0,   0,   4, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   0, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'<', '>', 124, 0,
    +0,   0,   43, 2,
    +'=', '>', 127, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'S', 'T', 129, 0,
    +0,   0,   47, 0,
    +0,   0,   43, 2,
    +0,   0,   127, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'F', 'S', 131, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   61, 1,
    +'N', 'R', 145, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   241, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   38, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   42, 2,
    +0,   0,   8, 0,
    +0,   0,   2, 0,
    +0,   0,   3, 0,
    +0,   0,   7, 0,
    +0,   0,   9, 0,
    +0,   0,   23, 0,
    +0,   0,   27, 0,
    +0,   0,   197, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   200, 0,
    +0,   0,   222, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   225, 0,
    +0,   0,   72, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   80, 1,
    +0,   0,   10, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'D', 'V', 179, 0,
    +0,   0,   40, 0,
    +0,   0,   87, 0,
    +'A', 'I', 220, 0,
    +0,   0,   139, 0,
    +0,   0,   169, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'N', 'P', 229, 0,
    +0,   0,   43, 2,
    +0,   0,   231, 0,
    +0,   0,   43, 2,
    +'A', 'O', 232, 0,
    +'D', 'O', 2, 1,
    +'N', 'U', 18, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   154, 1,
    +'E', 'U', 26, 1,
    +0,   0,   43, 2,
    +0,   0,   10, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   37, 2,
    +0,   0,   13, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   17, 0,
    +0,   0,   43, 2,
    +'D', 'Y', 198, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   24, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   31, 0,
    +0,   0,   21, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   22, 0,
    +0,   0,   102, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   108, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   126, 0,
    +0,   0,   213, 0,
    +0,   0,   43, 2,
    +0,   0,   224, 0,
    +0,   0,   243, 255,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'D', 'N', 247, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 1,
    +0,   0,   242, 255,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   241, 255,
    +0,   0,   56, 1,
    +0,   0,   59, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'T', 'W', 14, 1,
    +0,   0,   65, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   240, 255,
    +0,   0,   73, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   82, 1,
    +0,   0,   172, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   188, 1,
    +0,   0,   43, 2,
    +0,   0,   208, 1,
    +0,   0,   237, 255,
    +0,   0,   230, 255,
    +'L', 'Y', 67, 1,
    +'A', 'U', 87, 1,
    +'A', 'U', 132, 1,
    +'A', 'X', 159, 1,
    +'A', 'U', 201, 1,
    +0,   0,   43, 2,
    +'A', 'O', 222, 1,
    +'N', 'N', 240, 1,
    +0,   0,   230, 0,
    +'E', 'I', 17, 2,
    +'A', 'O', 22, 2,
    +0,   0,   44, 1,
    +'A', 'U', 75, 2,
    +0,   0,   75, 1,
    +'A', 'R', 96, 2,
    +0,   0,   43, 2,
    +'E', 'O', 114, 2,
    +'H', 'T', 135, 2,
    +'E', 'Y', 148, 2,
    +'N', 'S', 187, 2,
    +0,   0,   31, 2,
    +'A', 'O', 193, 2,
    +0,   0,   36, 2,
    +0,   0,   39, 2,
    +0,   0,   41, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'O', 'T', 81, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   48, 0,
    +0,   0,   43, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   45, 0,
    +'L', 'S', 108, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   57, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   66, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   90, 0,
    +0,   0,   50, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'T', 116, 1,
    +0,   0,   53, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   251, 255,
    +'T', 'T', 153, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   116, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   123, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   129, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   130, 0,
    +'A', 'E', 154, 1,
    +0,   0,   96, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   100, 0,
    +0,   0,   134, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   135, 0,
    +0,   0,   43, 2,
    +'D', 'U', 183, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   152, 0,
    +0,   0,   140, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   143, 0,
    +0,   0,   158, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   162, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   174, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   175, 0,
    +0,   0,   186, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   188, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'S', 'U', 237, 1,
    +0,   0,   190, 0,
    +0,   0,   43, 2,
    +0,   0,   192, 0,
    +'T', 'T', 241, 1,
    +'1', 'O', 242, 1,
    +0,   0,   214, 0,
    +0,   0,   215, 0,
    +0,   0,   216, 0,
    +0,   0,   217, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   218, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   221, 0,
    +0,   0,   232, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   234, 0,
    +0,   0,   236, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'F', 'S', 37, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'K', 'S', 51, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'O', 60, 2,
    +0,   0,   240, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   241, 0,
    +0,   0,   243, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   248, 0,
    +0,   0,   249, 0,
    +0,   0,   43, 2,
    +0,   0,   253, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   0, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   1, 1,
    +0,   0,   4, 1,
    +0,   0,   52, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   60, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   64, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   67, 1,
    +0,   0,   88, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   99, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   103, 1,
    +'A', 'A', 125, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   155, 1,
    +'D', 'L', 126, 2,
    +0,   0,   116, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   120, 1,
    +0,   0,   174, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   182, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   213, 1,
    +0,   0,   231, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'E', 169, 2,
    +0,   0,   234, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'I', 'U', 174, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   248, 1,
    +0,   0,   232, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   233, 1,
    +0,   0,   227, 255,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   246, 1,
    +0,   0,   254, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   11, 2,
    +0,   0,   25, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   27, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   28, 2,
    +0,   0,   32, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   33, 2,
    +'F', 'S', 231, 2,
    +'E', 'T', 245, 2,
    +'A', 'R', 5, 3,
    +0,   0,   43, 2,
    +'V', 'V', 28, 3,
    +'A', 'O', 35, 3,
    +'R', 'R', 68, 3,
    +0,   0,   191, 0,
    +'N', 'N', 84, 3,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'O', 97, 3,
    +'A', 'U', 144, 3,
    +'A', 'C', 165, 3,
    +'R', 'W', 168, 3,
    +'H', 'U', 174, 3,
    +'U', 'U', 188, 3,
    +'A', 'T', 194, 3,
    +'H', 'W', 233, 3,
    +'A', 'Y', 249, 3,
    +'N', 'S', 18, 4,
    +0,   0,   18, 2,
    +'H', 'R', 45, 4,
    +0,   0,   14, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   19, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   25, 0,
    +0,   0,   35, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   42, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   46, 0,
    +0,   0,   49, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'E', 23, 3,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   64, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   250, 255,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   89, 0,
    +0,   0,   54, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   60, 0,
    +'E', 'E', 29, 3,
    +'N', 'R', 30, 3,
    +0,   0,   147, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   149, 0,
    +0,   0,   157, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   160, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'R', 'X', 50, 3,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'O', 'U', 57, 3,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'R', 'U', 64, 3,
    +0,   0,   163, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   164, 0,
    +0,   0,   165, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   168, 0,
    +0,   0,   170, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   172, 0,
    +'A', 'O', 69, 3,
    +0,   0,   182, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   184, 0,
    +'D', 'O', 85, 3,
    +0,   0,   201, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   205, 0,
    +0,   0,   208, 0,
    +'A', 'V', 108, 3,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'M', 'N', 130, 3,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'C', 'C', 132, 3,
    +0,   0,   238, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   242, 0,
    +0,   0,   244, 0,
    +0,   0,   246, 0,
    +'A', 'K', 133, 3,
    +0,   0,   250, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   254, 0,
    +0,   0,   22, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   35, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   47, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   51, 1,
    +0,   0,   53, 1,
    +0,   0,   43, 2,
    +0,   0,   58, 1,
    +0,   0,   81, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   83, 1,
    +0,   0,   43, 2,
    +0,   0,   85, 1,
    +0,   0,   94, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   97, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   111, 1,
    +'E', 'I', 189, 3,
    +0,   0,   113, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   114, 1,
    +0,   0,   115, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'S', 214, 3,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   149, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   150, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   157, 1,
    +0,   0,   119, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   142, 1,
    +0,   0,   173, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   178, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   209, 1,
    +0,   0,   220, 1,
    +0,   0,   43, 2,
    +0,   0,   222, 1,
    +0,   0,   224, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   249, 1,
    +'I', 'T', 24, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'I', 36, 4,
    +0,   0,   0, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   6, 2,
    +0,   0,   9, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   14, 2,
    +'E', 'I', 56, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   35, 2,
    +0,   0,   29, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   30, 2,
    +0,   0,   12, 0,
    +'A', 'I', 83, 4,
    +'H', 'U', 118, 4,
    +'E', 'O', 134, 4,
    +'L', 'X', 145, 4,
    +'A', 'L', 165, 4,
    +'L', 'R', 185, 4,
    +0,   0,   187, 0,
    +'G', 'S', 192, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'I', 219, 4,
    +'A', 'O', 224, 4,
    +0,   0,   43, 2,
    +'F', 'P', 249, 4,
    +'A', 'L', 4, 5,
    +0,   0,   43, 2,
    +'E', 'O', 16, 5,
    +'C', 'U', 48, 5,
    +0,   0,   225, 1,
    +'N', 'P', 149, 5,
    +0,   0,   19, 2,
    +0,   0,   33, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   34, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'G', 'T', 92, 4,
    +0,   0,   37, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'L', 106, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   253, 255,
    +0,   0,   38, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   39, 0,
    +0,   0,   55, 0,
    +0,   0,   62, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   63, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'L', 'M', 132, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   88, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   95, 0,
    +0,   0,   69, 0,
    +0,   0,   72, 0,
    +0,   0,   115, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   128, 0,
    +0,   0,   136, 0,
    +0,   0,   43, 2,
    +'A', 'G', 158, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   144, 0,
    +0,   0,   145, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   148, 0,
    +0,   0,   43, 2,
    +0,   0,   151, 0,
    +0,   0,   137, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   141, 0,
    +0,   0,   159, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   161, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'O', 'O', 177, 4,
    +'A', 'A', 178, 4,
    +'T', 'T', 179, 4,
    +'4', '8', 180, 4,
    +0,   0,   166, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   167, 0,
    +0,   0,   181, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   183, 0,
    +0,   0,   198, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   199, 0,
    +'F', 'S', 205, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   227, 0,
    +0,   0,   203, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   207, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   210, 0,
    +0,   0,   239, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   245, 0,
    +0,   0,   6, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'D', 'M', 239, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   39, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   46, 1,
    +0,   0,   30, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   34, 1,
    +0,   0,   70, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   78, 1,
    +0,   0,   87, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   95, 1,
    +'G', 'V', 27, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   152, 1,
    +0,   0,   127, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   132, 1,
    +0,   0,   133, 1,
    +0,   0,   134, 1,
    +0,   0,   43, 2,
    +'A', 'E', 43, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   145, 1,
    +0,   0,   146, 1,
    +0,   0,   43, 2,
    +0,   0,   148, 1,
    +0,   0,   136, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   140, 1,
    +0,   0,   160, 1,
    +0,   0,   43, 2,
    +'C', 'R', 67, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'G', 'M', 97, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'C', 'U', 104, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'R', 128, 5,
    +0,   0,   232, 255,
    +0,   0,   162, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   165, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'I', 'V', 83, 5,
    +0,   0,   168, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   171, 1,
    +0,   0,   176, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   177, 1,
    +0,   0,   181, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   183, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'N', 'R', 123, 5,
    +0,   0,   184, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   185, 1,
    +'R', 'T', 146, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   236, 255,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   216, 1,
    +0,   0,   211, 1,
    +0,   0,   43, 2,
    +0,   0,   212, 1,
    +'I', 'L', 152, 5,
    +0,   0,   43, 2,
    +0,   0,   7, 2,
    +0,   0,   1, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   3, 2,
    +'D', 'U', 179, 5,
    +'E', 'O', 197, 5,
    +'A', 'U', 234, 5,
    +'E', 'Y', 43, 6,
    +'N', 'X', 91, 6,
    +0,   0,   171, 0,
    +0,   0,   43, 2,
    +0,   0,   185, 0,
    +'N', 'T', 118, 6,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'O', 144, 6,
    +0,   0,   38, 1,
    +'A', 'U', 155, 6,
    +'P', 'U', 176, 6,
    +'A', 'R', 182, 6,
    +0,   0,   112, 1,
    +'E', 'O', 215, 6,
    +'C', 'Y', 245, 6,
    +'I', 'R', 37, 7,
    +'N', 'S', 47, 7,
    +'A', 'A', 56, 7,
    +0,   0,   34, 2,
    +0,   0,   255, 255,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   15, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   20, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   28, 0,
    +0,   0,   36, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'T', 'T', 208, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   44, 0,
    +'_', '_', 209, 5,
    +'A', 'X', 210, 5,
    +0,   0,   254, 255,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   252, 255,
    +0,   0,   51, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'A', 255, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'L', 'N', 5, 6,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'R', 'R', 25, 6,
    +'N', 'R', 0, 6,
    +0,   0,   56, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   59, 0,
    +'L', 'U', 8, 6,
    +'M', 'P', 18, 6,
    +'T', 'V', 22, 6,
    +0,   0,   67, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   70, 0,
    +0,   0,   71, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   74, 0,
    +0,   0,   83, 0,
    +0,   0,   43, 2,
    +0,   0,   86, 0,
    +'D', 'T', 26, 6,
    +0,   0,   249, 255,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   248, 255,
    +'C', 'L', 64, 6,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'S', 'S', 87, 6,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   133, 0,
    +'I', 'L', 74, 6,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'I', 78, 6,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   113, 0,
    +0,   0,   109, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   110, 0,
    +0,   0,   111, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   112, 0,
    +'A', 'C', 88, 6,
    +0,   0,   121, 0,
    +0,   0,   43, 2,
    +0,   0,   122, 0,
    +0,   0,   142, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   146, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'T', 102, 6,
    +0,   0,   150, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   154, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   245, 255,
    +'D', 'V', 125, 6,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   228, 0,
    +0,   0,   202, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   212, 0,
    +0,   0,   219, 0,
    +0,   0,   43, 2,
    +0,   0,   229, 0,
    +0,   0,   237, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   255, 0,
    +0,   0,   55, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   62, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   68, 1,
    +0,   0,   77, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   84, 1,
    +0,   0,   89, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   96, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   98, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'O', 200, 6,
    +0,   0,   101, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   104, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'C', 'F', 211, 6,
    +0,   0,   107, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   109, 1,
    +'B', 'T', 226, 6,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   153, 1,
    +0,   0,   121, 1,
    +0,   0,   122, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   131, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   138, 1,
    +0,   0,   141, 1,
    +0,   0,   43, 2,
    +0,   0,   143, 1,
    +0,   0,   147, 1,
    +0,   0,   161, 1,
    +0,   0,   43, 2,
    +0,   0,   170, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   186, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   214, 1,
    +'B', 'S', 12, 7,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   229, 255,
    +'D', 'J', 30, 7,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   221, 1,
    +0,   0,   233, 255,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   217, 1,
    +0,   0,   239, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   244, 1,
    +'I', 'K', 53, 7,
    +0,   0,   43, 2,
    +0,   0,   8, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   13, 2,
    +0,   0,   255, 1,
    +0,   0,   43, 2,
    +0,   0,   2, 2,
    +'R', 'R', 57, 7,
    +'C', '_', 58, 7,
    +0,   0,   21, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   24, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   225, 255,
    +'A', 'O', 111, 7,
    +'A', 'U', 150, 7,
    +'N', 'X', 218, 7,
    +'U', 'U', 229, 7,
    +0,   0,   178, 0,
    +0,   0,   43, 2,
    +'N', 'N', 233, 7,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'O', 241, 7,
    +'A', 'O', 21, 8,
    +'A', 'V', 49, 8,
    +'N', 'P', 71, 8,
    +'A', 'R', 74, 8,
    +0,   0,   43, 2,
    +'E', 'O', 103, 8,
    +'C', 'W', 130, 8,
    +'I', 'R', 151, 8,
    +'N', 'T', 203, 8,
    +'A', 'A', 245, 8,
    +0,   0,   26, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   41, 2,
    +0,   0,   52, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   61, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'N', 126, 7,
    +0,   0,   65, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'T', 'T', 140, 7,
    +'A', 'I', 141, 7,
    +0,   0,   82, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   84, 0,
    +'T', 'Y', 171, 7,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   117, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   124, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   131, 0,
    +'A', 'E', 177, 7,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   103, 0,
    +'B', 'F', 182, 7,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'T', '_', 187, 7,
    +0,   0,   97, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   99, 0,
    +0,   0,   101, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'S', 199, 7,
    +0,   0,   247, 255,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   246, 255,
    +0,   0,   138, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   155, 0,
    +'L', 'N', 230, 7,
    +0,   0,   176, 0,
    +0,   0,   43, 2,
    +0,   0,   177, 0,
    +'N', 'T', 234, 7,
    +0,   0,   206, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   220, 0,
    +0,   0,   235, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'N', 'N', 0, 8,
    +'G', 'G', 1, 8,
    +'B', 'T', 2, 8,
    +0,   0,   2, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   3, 1,
    +'X', 'X', 36, 8,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   42, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   45, 1,
    +'V', '_', 37, 8,
    +0,   0,   29, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'R', 'S', 47, 8,
    +0,   0,   25, 1,
    +0,   0,   26, 1,
    +0,   0,   54, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   69, 1,
    +0,   0,   74, 1,
    +0,   0,   43, 2,
    +0,   0,   76, 1,
    +0,   0,   93, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   239, 255,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'O', 92, 8,
    +0,   0,   102, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   110, 1,
    +'D', 'S', 114, 8,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   151, 1,
    +0,   0,   124, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   144, 1,
    +0,   0,   159, 1,
    +0,   0,   43, 2,
    +0,   0,   164, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   175, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   180, 1,
    +0,   0,   179, 1,
    +0,   0,   43, 2,
    +0,   0,   187, 1,
    +0,   0,   190, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   210, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   223, 1,
    +'N', 'N', 161, 8,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'U', 182, 8,
    +'Y', 'Y', 162, 8,
    +'B', 'T', 163, 8,
    +0,   0,   238, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   240, 1,
    +0,   0,   242, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   245, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   247, 1,
    +'D', 'S', 210, 8,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'C', 'C', 226, 8,
    +0,   0,   253, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   5, 2,
    +'_', '_', 227, 8,
    +'D', 'T', 228, 8,
    +0,   0,   15, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   16, 2,
    +'R', 'R', 246, 8,
    +'I', '_', 247, 8,
    +0,   0,   226, 255,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   224, 255,
    +'G', 'L', 36, 9,
    +0,   0,   43, 2,
    +'H', 'O', 42, 9,
    +'A', 'U', 53, 9,
    +0,   0,   153, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'O', 'S', 74, 9,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   251, 0,
    +'E', 'I', 79, 9,
    +0,   0,   63, 1,
    +0,   0,   43, 2,
    +'A', 'R', 84, 9,
    +0,   0,   43, 2,
    +'E', 'E', 129, 9,
    +'A', 'U', 134, 9,
    +'E', 'I', 158, 9,
    +'N', 'N', 171, 9,
    +'A', 'A', 178, 9,
    +0,   0,   16, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   18, 0,
    +0,   0,   58, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'L', 'N', 50, 9,
    +0,   0,   68, 0,
    +0,   0,   73, 0,
    +0,   0,   78, 0,
    +0,   0,   98, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   120, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   132, 0,
    +0,   0,   223, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   226, 0,
    +0,   0,   32, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   37, 1,
    +'C', 'R', 102, 9,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'O', 118, 9,
    +0,   0,   86, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   90, 1,
    +0,   0,   100, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   106, 1,
    +'A', 'D', 130, 9,
    +0,   0,   117, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   125, 1,
    +0,   0,   158, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'N', 'P', 155, 9,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   194, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   231, 255,
    +0,   0,   166, 1,
    +0,   0,   43, 2,
    +0,   0,   167, 1,
    +'M', 'M', 163, 9,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   235, 1,
    +'P', 'P', 164, 9,
    +'O', 'T', 165, 9,
    +0,   0,   228, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   229, 1,
    +'D', 'I', 172, 9,
    +0,   0,   251, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   4, 2,
    +'R', 'R', 179, 9,
    +'B', 'I', 180, 9,
    +0,   0,   20, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   23, 2,
    +'C', 'S', 213, 9,
    +0,   0,   43, 2,
    +'O', 'O', 230, 9,
    +'A', 'E', 14, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   180, 0,
    +0,   0,   43, 2,
    +0,   0,   196, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   247, 0,
    +'A', 'U', 28, 10,
    +0,   0,   57, 1,
    +0,   0,   79, 1,
    +'A', 'R', 72, 10,
    +0,   0,   43, 2,
    +'E', 'O', 90, 10,
    +'Q', 'T', 117, 10,
    +'A', 'E', 131, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   40, 2,
    +0,   0,   11, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   26, 0,
    +'M', 'N', 231, 9,
    +'P', 'P', 233, 9,
    +'C', 'S', 241, 9,
    +'L', 'R', 234, 9,
    +0,   0,   75, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   76, 0,
    +0,   0,   77, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   79, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'I', 'T', 2, 10,
    +0,   0,   80, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   81, 0,
    +'Y', 'Y', 19, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   107, 0,
    +'_', '_', 20, 10,
    +'M', 'S', 21, 10,
    +0,   0,   105, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   106, 0,
    +0,   0,   14, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'D', 'D', 49, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   49, 1,
    +'I', 'I', 50, 10,
    +'U', 'U', 51, 10,
    +'M', 'M', 52, 10,
    +'B', 'T', 53, 10,
    +0,   0,   31, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   33, 1,
    +0,   0,   92, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   105, 1,
    +'A', 'P', 101, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   156, 1,
    +0,   0,   118, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   126, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   135, 1,
    +0,   0,   137, 1,
    +'L', 'L', 121, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   235, 255,
    +'W', '_', 122, 10,
    +0,   0,   191, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   198, 1,
    +0,   0,   226, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   230, 1,
    +0,   0,   125, 0,
    +0,   0,   156, 0,
    +0,   0,   173, 0,
    +0,   0,   43, 2,
    +'O', 'O', 154, 10,
    +0,   0,   209, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'I', 165, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   108, 1,
    +0,   0,   43, 2,
    +0,   0,   139, 1,
    +'Q', 'Y', 193, 10,
    +0,   0,   243, 1,
    +0,   0,   250, 1,
    +'U', 'U', 155, 10,
    +'R', 'R', 156, 10,
    +'_', '_', 157, 10,
    +'M', 'S', 158, 10,
    +0,   0,   194, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   195, 0,
    +'S', 'S', 174, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   36, 1,
    +'T', 'T', 175, 10,
    +'E', 'E', 176, 10,
    +'R', 'R', 177, 10,
    +'_', '_', 178, 10,
    +'H', 'U', 179, 10,
    +0,   0,   8, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   12, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   21, 1,
    +0,   0,   203, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   234, 255,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   228, 255,
    +'O', 'U', 222, 10,
    +0,   0,   118, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   244, 255,
    +0,   0,   43, 2,
    +0,   0,   204, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   5, 1,
    +0,   0,   50, 1,
    +0,   0,   43, 2,
    +0,   0,   71, 1,
    +0,   0,   91, 1,
    +0,   0,   43, 2,
    +0,   0,   130, 1,
    +'E', 'U', 253, 10,
    +0,   0,   236, 1,
    +0,   0,   43, 2,
    +0,   0,   22, 2,
    +0,   0,   85, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'R', 'R', 229, 10,
    +'R', 'R', 230, 10,
    +'E', 'E', 231, 10,
    +'N', 'N', 232, 10,
    +'T', 'T', 233, 10,
    +'_', '_', 234, 10,
    +'D', 'U', 235, 10,
    +0,   0,   91, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   92, 0,
    +0,   0,   94, 0,
    +'R', 'S', 14, 11,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'L', 'L', 16, 11,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   218, 1,
    +0,   0,   169, 1,
    +0,   0,   238, 255,
    +'E', '_', 17, 11,
    +0,   0,   189, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'N', 'T', 44, 11,
    +0,   0,   196, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'S', 'S', 51, 11,
    +'I', 'I', 52, 11,
    +'_', '_', 53, 11,
    +'H', 'Y', 54, 11,
    +0,   0,   202, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   204, 1,
    +0,   0,   43, 2,
    +0,   0,   207, 1,
    +0,   0,   119, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   189, 0,
    +0,   0,   211, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'I', 90, 11,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   129, 1,
    +'Q', 'U', 99, 11,
    +0,   0,   237, 1,
    +0,   0,   17, 2,
    +0,   0,   15, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   41, 1,
    +0,   0,   205, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   215, 1,
    +0,   0,   219, 1,
    +'U', 'V', 125, 11,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   233, 0,
    +0,   0,   252, 0,
    +'A', 'A', 127, 11,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   128, 1,
    +'Q', 'Q', 141, 11,
    +0,   0,   227, 1,
    +0,   0,   12, 2,
    +0,   0,   29, 0,
    +0,   0,   32, 0,
    +'S', 'S', 128, 11,
    +'T', 'T', 129, 11,
    +'E', 'E', 130, 11,
    +'R', 'R', 131, 11,
    +'_', '_', 132, 11,
    +'L', 'S', 133, 11,
    +0,   0,   10, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   19, 1,
    +'L', 'L', 142, 11,
    +'_', '_', 143, 11,
    +'B', 'T', 144, 11,
    +0,   0,   192, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'S', 'S', 163, 11,
    +'I', 'I', 164, 11,
    +'_', '_', 165, 11,
    +'M', 'S', 166, 11,
    +0,   0,   201, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   200, 1,
    +0,   0,   30, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'E', 192, 11,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'U', 197, 11,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   206, 1,
    +0,   0,   104, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   114, 0,
    +'S', 'S', 218, 11,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   48, 1,
    +'T', 'T', 219, 11,
    +'E', 'E', 220, 11,
    +'R', 'R', 221, 11,
    +'_', '_', 222, 11,
    +'L', 'S', 223, 11,
    +0,   0,   9, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   11, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   17, 1,
    +0,   0,   193, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   13, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   123, 1,
    +0,   0,   197, 1,
    +0,   0,   43, 2,
    +0,   0,   252, 1,
    +0,   0,   93, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'A', 6, 12,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   193, 1,
    +'S', 'S', 7, 12,
    +'T', 'T', 8, 12,
    +'E', 'E', 9, 12,
    +'R', 'R', 10, 12,
    +'_', '_', 11, 12,
    +'S', 'S', 12, 12,
    +'S', 'S', 13, 12,
    +'L', 'L', 14, 12,
    +'_', '_', 15, 12,
    +'C', 'C', 16, 12,
    +'A', 'I', 17, 12,
    +0,   0,   16, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   18, 1,
    +0,   0,   179, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   40, 1,
    +0,   0,   66, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   163, 1,
    +'Q', 'Q', 40, 12,
    +'L', 'L', 41, 12,
    +'_', '_', 42, 12,
    +'C', 'T', 43, 12,
    +0,   0,   195, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   199, 1,
    +'A', 'A', 62, 12,
    +'S', 'X', 63, 12,
    +0,   0,   7, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'_', '_', 69, 12,
    +'Q', 'U', 70, 12,
    +0,   0,   24, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'P', 'S', 75, 12,
    +0,   0,   27, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   28, 1,
    +};
    +
    +static uchar symbols_map[11740]= {
    +'<', '>', 29, 0,
    +'!', '|', 32, 0,
    +'<', 'X', 150, 0,
    +'B', 'Y', 11, 1,
    +'A', 'W', 147, 2,
    +'A', 'V', 0, 4,
    +'A', 'W', 88, 5,
    +'C', 'Z', 201, 6,
    +'A', 'V', 72, 8,
    +'A', 'Y', 242, 8,
    +'D', 'U', 187, 9,
    +'C', 'V', 244, 9,
    +'D', 'U', 112, 10,
    +'A', 'U', 144, 10,
    +'A', 'S', 213, 10,
    +'H', 'U', 15, 11,
    +'C', 'S', 29, 11,
    +'G', 'S', 66, 11,
    +'S', 'S', 79, 11,
    +'M', 'M', 101, 11,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   23, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   20, 1,
    +0,   0,   1, 0,
    +0,   0,   5, 0,
    +0,   0,   6, 0,
    +0,   0,   4, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   0, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'<', '>', 124, 0,
    +0,   0,   43, 2,
    +'=', '>', 127, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'S', 'T', 129, 0,
    +0,   0,   47, 0,
    +0,   0,   43, 2,
    +0,   0,   127, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'F', 'S', 131, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   61, 1,
    +'N', 'R', 145, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   241, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   38, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   42, 2,
    +0,   0,   8, 0,
    +0,   0,   2, 0,
    +0,   0,   3, 0,
    +0,   0,   7, 0,
    +0,   0,   9, 0,
    +0,   0,   23, 0,
    +0,   0,   27, 0,
    +0,   0,   197, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   200, 0,
    +0,   0,   222, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   225, 0,
    +0,   0,   72, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   80, 1,
    +0,   0,   10, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'D', 'V', 179, 0,
    +0,   0,   40, 0,
    +0,   0,   87, 0,
    +'A', 'I', 220, 0,
    +0,   0,   139, 0,
    +0,   0,   169, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'N', 'P', 229, 0,
    +0,   0,   43, 2,
    +0,   0,   231, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 1,
    +'D', 'O', 232, 0,
    +'N', 'U', 244, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   154, 1,
    +'E', 'S', 252, 0,
    +0,   0,   43, 2,
    +0,   0,   10, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   37, 2,
    +0,   0,   13, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   17, 0,
    +0,   0,   43, 2,
    +'D', 'Y', 198, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   24, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   31, 0,
    +0,   0,   21, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   22, 0,
    +0,   0,   102, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   108, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   126, 0,
    +0,   0,   213, 0,
    +0,   0,   43, 2,
    +0,   0,   224, 0,
    +0,   0,   56, 1,
    +0,   0,   59, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   65, 1,
    +0,   0,   73, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   82, 1,
    +0,   0,   172, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   188, 1,
    +0,   0,   43, 2,
    +0,   0,   208, 1,
    +'L', 'Y', 35, 1,
    +'A', 'U', 55, 1,
    +'A', 'U', 84, 1,
    +'A', 'X', 111, 1,
    +'A', 'U', 153, 1,
    +0,   0,   43, 2,
    +'A', 'O', 174, 1,
    +'N', 'N', 192, 1,
    +0,   0,   230, 0,
    +'E', 'I', 225, 1,
    +'A', 'O', 230, 1,
    +0,   0,   44, 1,
    +'A', 'U', 27, 2,
    +0,   0,   75, 1,
    +'A', 'R', 48, 2,
    +0,   0,   43, 2,
    +'E', 'O', 66, 2,
    +'H', 'T', 87, 2,
    +'E', 'Y', 100, 2,
    +'N', 'S', 126, 2,
    +0,   0,   31, 2,
    +'A', 'O', 132, 2,
    +0,   0,   36, 2,
    +0,   0,   39, 2,
    +0,   0,   41, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'O', 'T', 49, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   48, 0,
    +0,   0,   43, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   45, 0,
    +'L', 'S', 76, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   57, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   66, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   90, 0,
    +0,   0,   50, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   53, 0,
    +'T', 'T', 105, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   116, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   123, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   129, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   130, 0,
    +'A', 'E', 106, 1,
    +0,   0,   96, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   100, 0,
    +0,   0,   134, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   135, 0,
    +0,   0,   43, 2,
    +'D', 'U', 135, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   152, 0,
    +0,   0,   140, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   143, 0,
    +0,   0,   158, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   162, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   174, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   175, 0,
    +0,   0,   186, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   188, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'S', 'U', 189, 1,
    +0,   0,   190, 0,
    +0,   0,   43, 2,
    +0,   0,   192, 0,
    +'T', 'T', 193, 1,
    +'1', 'O', 194, 1,
    +0,   0,   214, 0,
    +0,   0,   215, 0,
    +0,   0,   216, 0,
    +0,   0,   217, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   218, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   221, 0,
    +0,   0,   232, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   234, 0,
    +0,   0,   236, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'F', 'S', 245, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'K', 'S', 3, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'O', 12, 2,
    +0,   0,   240, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   241, 0,
    +0,   0,   243, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   248, 0,
    +0,   0,   249, 0,
    +0,   0,   43, 2,
    +0,   0,   253, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   0, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   1, 1,
    +0,   0,   4, 1,
    +0,   0,   52, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   60, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   64, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   67, 1,
    +0,   0,   88, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   99, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   103, 1,
    +'A', 'A', 77, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   155, 1,
    +'D', 'L', 78, 2,
    +0,   0,   116, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   120, 1,
    +0,   0,   174, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   182, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   213, 1,
    +0,   0,   231, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'E', 121, 2,
    +0,   0,   234, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   246, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   248, 1,
    +0,   0,   232, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   233, 1,
    +0,   0,   254, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   11, 2,
    +0,   0,   25, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   27, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   28, 2,
    +0,   0,   32, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   33, 2,
    +'F', 'S', 170, 2,
    +'E', 'T', 184, 2,
    +'A', 'R', 200, 2,
    +0,   0,   43, 2,
    +'V', 'V', 223, 2,
    +'A', 'O', 230, 2,
    +'R', 'R', 7, 3,
    +0,   0,   191, 0,
    +'N', 'N', 23, 3,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'O', 36, 3,
    +'A', 'U', 83, 3,
    +'A', 'C', 104, 3,
    +'R', 'W', 107, 3,
    +'H', 'U', 113, 3,
    +'U', 'U', 127, 3,
    +'A', 'T', 133, 3,
    +'H', 'W', 172, 3,
    +'A', 'Y', 188, 3,
    +'N', 'S', 213, 3,
    +0,   0,   18, 2,
    +'H', 'R', 240, 3,
    +0,   0,   14, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   19, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   25, 0,
    +0,   0,   35, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   42, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   46, 0,
    +0,   0,   49, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'E', 218, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   64, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   89, 0,
    +0,   0,   54, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   60, 0,
    +'E', 'E', 224, 2,
    +'N', 'R', 225, 2,
    +0,   0,   147, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   149, 0,
    +0,   0,   157, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   160, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'R', 'X', 245, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'O', 'U', 252, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'R', 'U', 3, 3,
    +0,   0,   163, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   164, 0,
    +0,   0,   165, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   168, 0,
    +0,   0,   170, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   172, 0,
    +'A', 'O', 8, 3,
    +0,   0,   182, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   184, 0,
    +'D', 'O', 24, 3,
    +0,   0,   201, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   205, 0,
    +0,   0,   208, 0,
    +'A', 'V', 47, 3,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'M', 'N', 69, 3,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'C', 'C', 71, 3,
    +0,   0,   238, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   242, 0,
    +0,   0,   244, 0,
    +0,   0,   246, 0,
    +'A', 'K', 72, 3,
    +0,   0,   250, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   254, 0,
    +0,   0,   22, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   35, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   47, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   51, 1,
    +0,   0,   53, 1,
    +0,   0,   43, 2,
    +0,   0,   58, 1,
    +0,   0,   81, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   83, 1,
    +0,   0,   43, 2,
    +0,   0,   85, 1,
    +0,   0,   94, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   97, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   111, 1,
    +'E', 'I', 128, 3,
    +0,   0,   113, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   114, 1,
    +0,   0,   115, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'S', 153, 3,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   149, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   150, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   157, 1,
    +0,   0,   119, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   142, 1,
    +0,   0,   173, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   178, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   209, 1,
    +0,   0,   220, 1,
    +0,   0,   43, 2,
    +0,   0,   222, 1,
    +0,   0,   224, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   249, 1,
    +'I', 'T', 219, 3,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'I', 231, 3,
    +0,   0,   0, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   6, 2,
    +0,   0,   9, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   14, 2,
    +'E', 'I', 251, 3,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   35, 2,
    +0,   0,   29, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   30, 2,
    +0,   0,   12, 0,
    +'A', 'I', 22, 4,
    +'H', 'U', 51, 4,
    +'E', 'O', 67, 4,
    +'L', 'X', 78, 4,
    +'A', 'L', 98, 4,
    +'L', 'R', 118, 4,
    +0,   0,   187, 0,
    +'G', 'S', 125, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'I', 152, 4,
    +'A', 'O', 157, 4,
    +0,   0,   43, 2,
    +'F', 'P', 182, 4,
    +'A', 'L', 193, 4,
    +0,   0,   43, 2,
    +'E', 'O', 205, 4,
    +'C', 'T', 237, 4,
    +0,   0,   225, 1,
    +'N', 'P', 81, 5,
    +0,   0,   19, 2,
    +0,   0,   33, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   34, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'G', 'N', 31, 4,
    +0,   0,   37, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'L', 39, 4,
    +0,   0,   38, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   39, 0,
    +0,   0,   55, 0,
    +0,   0,   62, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   63, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'L', 'M', 65, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   88, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   95, 0,
    +0,   0,   69, 0,
    +0,   0,   72, 0,
    +0,   0,   115, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   128, 0,
    +0,   0,   136, 0,
    +0,   0,   43, 2,
    +'A', 'G', 91, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   144, 0,
    +0,   0,   145, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   148, 0,
    +0,   0,   43, 2,
    +0,   0,   151, 0,
    +0,   0,   137, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   141, 0,
    +0,   0,   159, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   161, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'O', 'O', 110, 4,
    +'A', 'A', 111, 4,
    +'T', 'T', 112, 4,
    +'4', '8', 113, 4,
    +0,   0,   166, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   167, 0,
    +0,   0,   181, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   183, 0,
    +0,   0,   198, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   199, 0,
    +'F', 'S', 138, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   227, 0,
    +0,   0,   203, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   207, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   210, 0,
    +0,   0,   239, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   245, 0,
    +0,   0,   6, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'D', 'M', 172, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   39, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   46, 1,
    +0,   0,   30, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   34, 1,
    +0,   0,   70, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   78, 1,
    +0,   0,   87, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   95, 1,
    +'G', 'V', 216, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   152, 1,
    +0,   0,   127, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   132, 1,
    +0,   0,   133, 1,
    +0,   0,   134, 1,
    +0,   0,   43, 2,
    +'A', 'E', 232, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   145, 1,
    +0,   0,   146, 1,
    +0,   0,   43, 2,
    +0,   0,   148, 1,
    +0,   0,   136, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   140, 1,
    +0,   0,   160, 1,
    +0,   0,   43, 2,
    +'C', 'R', 255, 4,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'G', 'M', 29, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'C', 'U', 36, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'R', 60, 5,
    +0,   0,   162, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   165, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'I', 'V', 15, 5,
    +0,   0,   168, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   171, 1,
    +0,   0,   176, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   177, 1,
    +0,   0,   181, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   183, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'N', 'R', 55, 5,
    +0,   0,   184, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   185, 1,
    +'R', 'T', 78, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   216, 1,
    +0,   0,   211, 1,
    +0,   0,   43, 2,
    +0,   0,   212, 1,
    +'I', 'L', 84, 5,
    +0,   0,   43, 2,
    +0,   0,   7, 2,
    +0,   0,   1, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   3, 2,
    +'G', 'U', 111, 5,
    +'E', 'O', 126, 5,
    +'A', 'O', 137, 5,
    +'E', 'Y', 178, 5,
    +'N', 'X', 226, 5,
    +0,   0,   171, 0,
    +0,   0,   43, 2,
    +0,   0,   185, 0,
    +'N', 'T', 249, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'O', 19, 6,
    +0,   0,   38, 1,
    +'A', 'U', 30, 6,
    +'P', 'U', 51, 6,
    +'A', 'R', 57, 6,
    +0,   0,   112, 1,
    +'E', 'O', 90, 6,
    +'C', 'U', 120, 6,
    +'I', 'R', 157, 6,
    +'N', 'S', 167, 6,
    +'A', 'A', 176, 6,
    +0,   0,   34, 2,
    +0,   0,   15, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   20, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   28, 0,
    +0,   0,   36, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   44, 0,
    +0,   0,   51, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'A', 152, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'L', 'N', 158, 5,
    +'N', 'R', 153, 5,
    +0,   0,   56, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   59, 0,
    +'L', 'U', 161, 5,
    +'M', 'P', 171, 5,
    +'T', 'V', 175, 5,
    +0,   0,   67, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   70, 0,
    +0,   0,   71, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   74, 0,
    +0,   0,   83, 0,
    +0,   0,   43, 2,
    +0,   0,   86, 0,
    +'C', 'L', 199, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'S', 'S', 222, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   133, 0,
    +'I', 'L', 209, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'I', 213, 5,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   113, 0,
    +0,   0,   109, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   110, 0,
    +0,   0,   111, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   112, 0,
    +'A', 'C', 223, 5,
    +0,   0,   121, 0,
    +0,   0,   43, 2,
    +0,   0,   122, 0,
    +0,   0,   142, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   146, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'P', 237, 5,
    +0,   0,   150, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   154, 0,
    +'D', 'V', 0, 6,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   228, 0,
    +0,   0,   202, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   212, 0,
    +0,   0,   219, 0,
    +0,   0,   43, 2,
    +0,   0,   229, 0,
    +0,   0,   237, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   255, 0,
    +0,   0,   55, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   62, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   68, 1,
    +0,   0,   77, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   84, 1,
    +0,   0,   89, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   96, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   98, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'O', 75, 6,
    +0,   0,   101, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   104, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'C', 'F', 86, 6,
    +0,   0,   107, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   109, 1,
    +'B', 'T', 101, 6,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   153, 1,
    +0,   0,   121, 1,
    +0,   0,   122, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   131, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   138, 1,
    +0,   0,   141, 1,
    +0,   0,   43, 2,
    +0,   0,   143, 1,
    +0,   0,   147, 1,
    +0,   0,   161, 1,
    +0,   0,   43, 2,
    +0,   0,   170, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   186, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   214, 1,
    +'B', 'S', 139, 6,
    +0,   0,   217, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   221, 1,
    +0,   0,   239, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   244, 1,
    +'I', 'K', 173, 6,
    +0,   0,   43, 2,
    +0,   0,   8, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   13, 2,
    +0,   0,   255, 1,
    +0,   0,   43, 2,
    +0,   0,   2, 2,
    +'R', 'R', 177, 6,
    +'C', 'Y', 178, 6,
    +0,   0,   21, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   24, 2,
    +'A', 'O', 225, 6,
    +'A', 'U', 8, 7,
    +'N', 'X', 45, 7,
    +'U', 'U', 56, 7,
    +0,   0,   178, 0,
    +0,   0,   43, 2,
    +'N', 'N', 60, 7,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'O', 68, 7,
    +'A', 'O', 104, 7,
    +'A', 'V', 132, 7,
    +'N', 'P', 154, 7,
    +'A', 'R', 157, 7,
    +0,   0,   43, 2,
    +'E', 'O', 186, 7,
    +'C', 'W', 213, 7,
    +'I', 'R', 234, 7,
    +'N', 'T', 30, 8,
    +0,   0,   43, 2,
    +0,   0,   26, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   41, 2,
    +0,   0,   52, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   61, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'N', 240, 6,
    +0,   0,   65, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'T', 'T', 254, 6,
    +'A', 'I', 255, 6,
    +0,   0,   82, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   84, 0,
    +'T', 'Y', 29, 7,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   117, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   124, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   131, 0,
    +'A', 'E', 35, 7,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   103, 0,
    +'B', 'F', 40, 7,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   101, 0,
    +0,   0,   97, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   99, 0,
    +0,   0,   138, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   155, 0,
    +'L', 'N', 57, 7,
    +0,   0,   176, 0,
    +0,   0,   43, 2,
    +0,   0,   177, 0,
    +'N', 'T', 61, 7,
    +0,   0,   206, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   220, 0,
    +0,   0,   235, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'N', 'N', 83, 7,
    +'G', 'G', 84, 7,
    +'B', 'T', 85, 7,
    +0,   0,   2, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   3, 1,
    +'X', 'X', 119, 7,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   42, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   45, 1,
    +'V', '_', 120, 7,
    +0,   0,   29, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'R', 'S', 130, 7,
    +0,   0,   25, 1,
    +0,   0,   26, 1,
    +0,   0,   54, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   69, 1,
    +0,   0,   74, 1,
    +0,   0,   43, 2,
    +0,   0,   76, 1,
    +0,   0,   93, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'O', 175, 7,
    +0,   0,   102, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   110, 1,
    +'D', 'S', 197, 7,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   151, 1,
    +0,   0,   124, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   144, 1,
    +0,   0,   159, 1,
    +0,   0,   43, 2,
    +0,   0,   164, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   175, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   180, 1,
    +0,   0,   179, 1,
    +0,   0,   43, 2,
    +0,   0,   187, 1,
    +0,   0,   190, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   210, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   223, 1,
    +'N', 'N', 244, 7,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'U', 9, 8,
    +'Y', 'Y', 245, 7,
    +'B', 'T', 246, 7,
    +0,   0,   238, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   240, 1,
    +0,   0,   242, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   245, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   247, 1,
    +'D', 'S', 37, 8,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'C', 'C', 53, 8,
    +0,   0,   253, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   5, 2,
    +'_', '_', 54, 8,
    +'D', 'T', 55, 8,
    +0,   0,   15, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   16, 2,
    +'G', 'L', 94, 8,
    +0,   0,   43, 2,
    +'H', 'O', 100, 8,
    +'A', 'U', 111, 8,
    +0,   0,   153, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'O', 'S', 132, 8,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   251, 0,
    +'E', 'I', 137, 8,
    +0,   0,   63, 1,
    +0,   0,   43, 2,
    +'A', 'R', 142, 8,
    +0,   0,   43, 2,
    +'E', 'E', 187, 8,
    +'A', 'Q', 192, 8,
    +'E', 'I', 212, 8,
    +'N', 'N', 225, 8,
    +'A', 'A', 232, 8,
    +0,   0,   16, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   18, 0,
    +0,   0,   58, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'L', 'N', 108, 8,
    +0,   0,   68, 0,
    +0,   0,   73, 0,
    +0,   0,   78, 0,
    +0,   0,   98, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   120, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   132, 0,
    +0,   0,   223, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   226, 0,
    +0,   0,   32, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   37, 1,
    +'C', 'R', 160, 8,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'E', 'O', 176, 8,
    +0,   0,   86, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   90, 1,
    +0,   0,   100, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   106, 1,
    +'A', 'D', 188, 8,
    +0,   0,   117, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   125, 1,
    +0,   0,   158, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'N', 'P', 209, 8,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   194, 1,
    +0,   0,   166, 1,
    +0,   0,   43, 2,
    +0,   0,   167, 1,
    +'M', 'M', 217, 8,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   235, 1,
    +'P', 'P', 218, 8,
    +'O', 'T', 219, 8,
    +0,   0,   228, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   229, 1,
    +'D', 'I', 226, 8,
    +0,   0,   251, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   4, 2,
    +'R', 'R', 233, 8,
    +'B', 'I', 234, 8,
    +0,   0,   20, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   23, 2,
    +'C', 'S', 11, 9,
    +0,   0,   43, 2,
    +'O', 'O', 28, 9,
    +'A', 'E', 68, 9,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   180, 0,
    +0,   0,   43, 2,
    +0,   0,   196, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   247, 0,
    +'A', 'U', 82, 9,
    +0,   0,   57, 1,
    +0,   0,   79, 1,
    +'A', 'R', 126, 9,
    +0,   0,   43, 2,
    +'E', 'O', 144, 9,
    +'Q', 'Q', 171, 9,
    +'A', 'E', 182, 9,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   40, 2,
    +0,   0,   11, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   26, 0,
    +'M', 'N', 29, 9,
    +'P', 'P', 31, 9,
    +'C', 'S', 39, 9,
    +'L', 'R', 32, 9,
    +0,   0,   75, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   76, 0,
    +0,   0,   77, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   79, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'I', 'T', 56, 9,
    +0,   0,   80, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   81, 0,
    +'Y', 'Y', 73, 9,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   107, 0,
    +'_', '_', 74, 9,
    +'M', 'S', 75, 9,
    +0,   0,   105, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   106, 0,
    +0,   0,   14, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'D', 'D', 103, 9,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   49, 1,
    +'I', 'I', 104, 9,
    +'U', 'U', 105, 9,
    +'M', 'M', 106, 9,
    +'B', 'T', 107, 9,
    +0,   0,   31, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   33, 1,
    +0,   0,   92, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   105, 1,
    +'A', 'P', 155, 9,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   156, 1,
    +0,   0,   118, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   126, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   135, 1,
    +0,   0,   137, 1,
    +'L', 'L', 172, 9,
    +'W', '_', 173, 9,
    +0,   0,   191, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   198, 1,
    +0,   0,   226, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   230, 1,
    +0,   0,   125, 0,
    +0,   0,   156, 0,
    +0,   0,   173, 0,
    +0,   0,   43, 2,
    +'O', 'O', 205, 9,
    +0,   0,   209, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'I', 216, 9,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   108, 1,
    +0,   0,   43, 2,
    +0,   0,   139, 1,
    +0,   0,   203, 1,
    +0,   0,   243, 1,
    +0,   0,   250, 1,
    +'U', 'U', 206, 9,
    +'R', 'R', 207, 9,
    +'_', '_', 208, 9,
    +'M', 'S', 209, 9,
    +0,   0,   194, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   195, 0,
    +'S', 'S', 225, 9,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   36, 1,
    +'T', 'T', 226, 9,
    +'E', 'E', 227, 9,
    +'R', 'R', 228, 9,
    +'_', '_', 229, 9,
    +'H', 'U', 230, 9,
    +0,   0,   8, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   12, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   21, 1,
    +'O', 'U', 8, 10,
    +0,   0,   118, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   204, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   5, 1,
    +0,   0,   50, 1,
    +0,   0,   43, 2,
    +0,   0,   71, 1,
    +0,   0,   91, 1,
    +0,   0,   43, 2,
    +0,   0,   130, 1,
    +'E', 'U', 39, 10,
    +0,   0,   236, 1,
    +0,   0,   43, 2,
    +0,   0,   22, 2,
    +0,   0,   85, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'R', 'R', 15, 10,
    +'R', 'R', 16, 10,
    +'E', 'E', 17, 10,
    +'N', 'N', 18, 10,
    +'T', 'T', 19, 10,
    +'_', '_', 20, 10,
    +'D', 'U', 21, 10,
    +0,   0,   91, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   92, 0,
    +0,   0,   94, 0,
    +0,   0,   169, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'L', 'L', 56, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   218, 1,
    +'E', '_', 57, 10,
    +0,   0,   189, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'N', 'T', 84, 10,
    +0,   0,   196, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'S', 'S', 91, 10,
    +'I', 'I', 92, 10,
    +'_', '_', 93, 10,
    +'H', 'Y', 94, 10,
    +0,   0,   202, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   204, 1,
    +0,   0,   43, 2,
    +0,   0,   207, 1,
    +0,   0,   119, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   189, 0,
    +0,   0,   211, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'I', 130, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   129, 1,
    +'Q', 'U', 139, 10,
    +0,   0,   237, 1,
    +0,   0,   17, 2,
    +0,   0,   15, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   41, 1,
    +0,   0,   205, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   215, 1,
    +0,   0,   219, 1,
    +'U', 'V', 165, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   233, 0,
    +0,   0,   252, 0,
    +'A', 'A', 167, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   128, 1,
    +'Q', 'Q', 181, 10,
    +0,   0,   227, 1,
    +0,   0,   12, 2,
    +0,   0,   29, 0,
    +0,   0,   32, 0,
    +'S', 'S', 168, 10,
    +'T', 'T', 169, 10,
    +'E', 'E', 170, 10,
    +'R', 'R', 171, 10,
    +'_', '_', 172, 10,
    +'L', 'S', 173, 10,
    +0,   0,   10, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   19, 1,
    +'L', 'L', 182, 10,
    +'_', '_', 183, 10,
    +'B', 'T', 184, 10,
    +0,   0,   192, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'S', 'S', 203, 10,
    +'I', 'I', 204, 10,
    +'_', '_', 205, 10,
    +'M', 'S', 206, 10,
    +0,   0,   201, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   200, 1,
    +0,   0,   30, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'E', 232, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'U', 237, 10,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   206, 1,
    +0,   0,   104, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   114, 0,
    +'S', 'S', 2, 11,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   48, 1,
    +'T', 'T', 3, 11,
    +'E', 'E', 4, 11,
    +'R', 'R', 5, 11,
    +'_', '_', 6, 11,
    +'L', 'S', 7, 11,
    +0,   0,   9, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   11, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   17, 1,
    +0,   0,   193, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   13, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   123, 1,
    +0,   0,   197, 1,
    +0,   0,   43, 2,
    +0,   0,   252, 1,
    +0,   0,   93, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'A', 'A', 46, 11,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   193, 1,
    +'S', 'S', 47, 11,
    +'T', 'T', 48, 11,
    +'E', 'E', 49, 11,
    +'R', 'R', 50, 11,
    +'_', '_', 51, 11,
    +'S', 'S', 52, 11,
    +'S', 'S', 53, 11,
    +'L', 'L', 54, 11,
    +'_', '_', 55, 11,
    +'C', 'C', 56, 11,
    +'A', 'I', 57, 11,
    +0,   0,   16, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   18, 1,
    +0,   0,   179, 0,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   40, 1,
    +0,   0,   66, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   163, 1,
    +'Q', 'Q', 80, 11,
    +'L', 'L', 81, 11,
    +'_', '_', 82, 11,
    +'C', 'T', 83, 11,
    +0,   0,   195, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   199, 1,
    +'A', 'A', 102, 11,
    +'S', 'X', 103, 11,
    +0,   0,   7, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'_', '_', 109, 11,
    +'Q', 'U', 110, 11,
    +0,   0,   24, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +'P', 'S', 115, 11,
    +0,   0,   27, 1,
    +0,   0,   43, 2,
    +0,   0,   43, 2,
    +0,   0,   28, 1,
    +};
    +
    +static unsigned int sql_functions_max_len=29;
    +
    +static unsigned int symbols_max_len=29;
    +
    +static SYMBOL *get_hash_symbol(const char *s,
    +                               unsigned int len,bool function)
    +{
    +  register uchar *hash_map;
    +  register const char *cur_str= s;
    +
    +  if (len == 0) {
    +    DBUG_PRINT("warning", ("get_hash_symbol() received a request for a zero-length symbol, which is probably a mistake."));    return(NULL);
    +  }
    +  if (function){
    +    if (len>sql_functions_max_len) return 0;
    +    hash_map= sql_functions_map;
    +    register uint32 cur_struct= uint4korr(hash_map+((len-1)*4));
    +
    +    for (;;){
    +      register uchar first_char= (uchar)cur_struct;
    +
    +      if (first_char == 0)
    +      {
    +        register int16 ires= (int16)(cur_struct>>16);
    +        if (ires==array_elements(symbols)) return 0;
    +        register SYMBOL *res;
    +        if (ires>=0) 
    +          res= symbols+ires;
    +        else
    +          res= sql_functions-ires-1;
    +		  register uint count= (uint) (cur_str - s);
    +        return lex_casecmp(cur_str,res->name+count,len-count) ? 0 : res;
    +      }
    +
    +      register uchar cur_char= (uchar)to_upper_lex[(uchar)*cur_str];
    +      if (cur_char>=8;
    +      if (cur_char>(uchar)cur_struct) return 0;
    +
    +      cur_struct>>=8;
    +      cur_struct= uint4korr(hash_map+
    +                        (((uint16)cur_struct + cur_char - first_char)*4));
    +      cur_str++;
    +    }
    +  }else{
    +    if (len>symbols_max_len) return 0;
    +    hash_map= symbols_map;
    +    register uint32 cur_struct= uint4korr(hash_map+((len-1)*4));
    +
    +    for (;;){
    +      register uchar first_char= (uchar)cur_struct;
    +
    +      if (first_char==0){
    +        register int16 ires= (int16)(cur_struct>>16);
    +        if (ires==array_elements(symbols)) return 0;
    +        register SYMBOL *res= symbols+ires;
    +		register uint count= (uint) (cur_str - s);
    +        return lex_casecmp(cur_str,res->name+count,len-count)!=0 ? 0 : res;
    +      }
    +
    +      register uchar cur_char= (uchar)to_upper_lex[(uchar)*cur_str];
    +      if (cur_char>=8;
    +      if (cur_char>(uchar)cur_struct) return 0;
    +
    +      cur_struct>>=8;
    +      cur_struct= uint4korr(hash_map+
    +                        (((uint16)cur_struct + cur_char - first_char)*4));
    +      cur_str++;
    +    }
    +  }
    +}
    diff --git a/libs/mysql/files/mysqld.init b/libs/mysql/files/mysqld.init
    new file mode 100644
    index 0000000..693dade
    --- /dev/null
    +++ b/libs/mysql/files/mysqld.init
    @@ -0,0 +1,29 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2010 OpenWrt.org
    +
    +START=95
    +STOP=10
    +
    +PID=/var/run/mysqld.pid
    +CMD=/usr/bin/mysqld
    +
    +start() {
    +	local datadir=$(sed -n -e "s/^[[:space:]]*datadir[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" /etc/my.cnf)
    +	if [ ! -d "$datadir" ]; then
    +		echo "Error: datadir in /etc/my.cnf ($datadir) doesn't exist"
    +		return 1
    +	elif [ ! -f "$datadir/mysql/tables_priv.MYD" ]; then
    +		echo "Error: I didn't detect a privileges table, you might need to run mysql_install_db --force to initialize the system tables"
    +		return 1
    +	else
    +		echo -n "Starting MySQL daemon... "
    +		start-stop-daemon -x $CMD -b -S -- --pid-file=$PID
    +		echo "done"
    +	fi
    +}
    +
    +stop() {
    +	echo -n "Stopping MySQL daemon... "
    +	service_kill ${CMD##*/} $PID
    +	echo "done"
    +}
    diff --git a/libs/mysql/patches/500-cross_compile.patch b/libs/mysql/patches/500-cross_compile.patch
    new file mode 100644
    index 0000000..adbf266
    --- /dev/null
    +++ b/libs/mysql/patches/500-cross_compile.patch
    @@ -0,0 +1,1444 @@
    +--- a/configure
    ++++ b/configure
    +@@ -902,10 +902,6 @@ plugin_blackhole_static_target
    + plugin_blackhole_shared_target
    + plugin_archive_static_target
    + plugin_archive_shared_target
    +-plugin_ftexample_static_target
    +-plugin_ftexample_shared_target
    +-plugin_daemon_example_static_target
    +-plugin_daemon_example_shared_target
    + plugin_partition_shared_target
    + plugin_partition_static_target
    + HAVE_YASSL_FALSE
    +@@ -1946,10 +1942,9 @@ Optional Packages:
    +                           list of plugins.
    +                           Available configurations are: none max max-no-ndb
    +                           all.
    +-                          Available plugins are: partition daemon_example
    +-                          ftexample archive blackhole csv example federated
    +-                          heap ibmdb2i innobase innodb_plugin myisam myisammrg
    +-                          ndbcluster.
    ++                          Available plugins are: partition archive blackhole
    ++                          csv example federated heap ibmdb2i innobase
    ++                          innodb_plugin myisam myisammrg ndbcluster.
    +   --without-plugin-PLUGIN Disable the named plugin from being built.
    +                           Otherwise, for plugins which are not selected for
    +                           inclusion in mysqld will be built dynamically (if
    +@@ -2013,16 +2008,6 @@ Description of plugins:
    +   Supports build:   static
    +   Configurations:   max, max-no-ndb
    + 
    +-   === Daemon Example Plugin ===
    +-  Plugin Name:      daemon_example
    +-  Description:      This is an example plugin daemon.
    +-  Supports build:   dynamic
    +-
    +-   === Simple Parser ===
    +-  Plugin Name:      ftexample
    +-  Description:      Simple full-text parser plugin
    +-  Supports build:   dynamic
    +-
    +    === Archive Storage Engine ===
    +   Plugin Name:      archive
    +   Description:      Archive Storage Engine
    +@@ -4965,13 +4950,13 @@ if test "${lt_cv_nm_interface+set}" = se
    + else
    +   lt_cv_nm_interface="BSD nm"
    +   echo "int some_variable = 0;" > conftest.$ac_ext
    +-  (eval echo "\"\$as_me:4968: $ac_compile\"" >&5)
    ++  (eval echo "\"\$as_me:4953: $ac_compile\"" >&5)
    +   (eval "$ac_compile" 2>conftest.err)
    +   cat conftest.err >&5
    +-  (eval echo "\"\$as_me:4971: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
    ++  (eval echo "\"\$as_me:4956: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
    +   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
    +   cat conftest.err >&5
    +-  (eval echo "\"\$as_me:4974: output\"" >&5)
    ++  (eval echo "\"\$as_me:4959: output\"" >&5)
    +   cat conftest.out >&5
    +   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
    +     lt_cv_nm_interface="MS dumpbin"
    +@@ -6177,7 +6162,7 @@ ia64-*-hpux*)
    +   ;;
    + *-*-irix6*)
    +   # Find out which ABI we are using.
    +-  echo '#line 6180 "configure"' > conftest.$ac_ext
    ++  echo '#line 6165 "configure"' > conftest.$ac_ext
    +   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    +   (eval $ac_compile) 2>&5
    +   ac_status=$?
    +@@ -8030,11 +8015,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:8033: $lt_compile\"" >&5)
    ++   (eval echo "\"\$as_me:8018: $lt_compile\"" >&5)
    +    (eval "$lt_compile" 2>conftest.err)
    +    ac_status=$?
    +    cat conftest.err >&5
    +-   echo "$as_me:8037: \$? = $ac_status" >&5
    ++   echo "$as_me:8022: \$? = $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.
    +@@ -8369,11 +8354,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:8372: $lt_compile\"" >&5)
    ++   (eval echo "\"\$as_me:8357: $lt_compile\"" >&5)
    +    (eval "$lt_compile" 2>conftest.err)
    +    ac_status=$?
    +    cat conftest.err >&5
    +-   echo "$as_me:8376: \$? = $ac_status" >&5
    ++   echo "$as_me:8361: \$? = $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.
    +@@ -8474,11 +8459,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:8477: $lt_compile\"" >&5)
    ++   (eval echo "\"\$as_me:8462: $lt_compile\"" >&5)
    +    (eval "$lt_compile" 2>out/conftest.err)
    +    ac_status=$?
    +    cat out/conftest.err >&5
    +-   echo "$as_me:8481: \$? = $ac_status" >&5
    ++   echo "$as_me:8466: \$? = $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
    +@@ -8529,11 +8514,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:8532: $lt_compile\"" >&5)
    ++   (eval echo "\"\$as_me:8517: $lt_compile\"" >&5)
    +    (eval "$lt_compile" 2>out/conftest.err)
    +    ac_status=$?
    +    cat out/conftest.err >&5
    +-   echo "$as_me:8536: \$? = $ac_status" >&5
    ++   echo "$as_me:8521: \$? = $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
    +@@ -11329,7 +11314,7 @@ else
    +   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    +   lt_status=$lt_dlunknown
    +   cat > conftest.$ac_ext <<_LT_EOF
    +-#line 11332 "configure"
    ++#line 11317 "configure"
    + #include "confdefs.h"
    + 
    + #if HAVE_DLFCN_H
    +@@ -11425,7 +11410,7 @@ else
    +   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    +   lt_status=$lt_dlunknown
    +   cat > conftest.$ac_ext <<_LT_EOF
    +-#line 11428 "configure"
    ++#line 11413 "configure"
    + #include "confdefs.h"
    + 
    + #if HAVE_DLFCN_H
    +@@ -16938,11 +16923,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:16941: $lt_compile\"" >&5)
    ++   (eval echo "\"\$as_me:16926: $lt_compile\"" >&5)
    +    (eval "$lt_compile" 2>conftest.err)
    +    ac_status=$?
    +    cat conftest.err >&5
    +-   echo "$as_me:16945: \$? = $ac_status" >&5
    ++   echo "$as_me:16930: \$? = $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.
    +@@ -17037,11 +17022,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:17040: $lt_compile\"" >&5)
    ++   (eval echo "\"\$as_me:17025: $lt_compile\"" >&5)
    +    (eval "$lt_compile" 2>out/conftest.err)
    +    ac_status=$?
    +    cat out/conftest.err >&5
    +-   echo "$as_me:17044: \$? = $ac_status" >&5
    ++   echo "$as_me:17029: \$? = $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
    +@@ -17089,11 +17074,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:17092: $lt_compile\"" >&5)
    ++   (eval echo "\"\$as_me:17077: $lt_compile\"" >&5)
    +    (eval "$lt_compile" 2>out/conftest.err)
    +    ac_status=$?
    +    cat out/conftest.err >&5
    +-   echo "$as_me:17096: \$? = $ac_status" >&5
    ++   echo "$as_me:17081: \$? = $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
    +@@ -26456,120 +26441,6 @@ done
    + esac
    + 
    + 
    +-# System characteristics
    +-case $SYSTEM_TYPE in
    +-  *netware*) ;;
    +-  *)
    +-{ $as_echo "$as_me:$LINENO: checking for restartable system calls" >&5
    +-$as_echo_n "checking for restartable system calls... " >&6; }
    +-if test "${ac_cv_sys_restartable_syscalls+set}" = set; then
    +-  $as_echo_n "(cached) " >&6
    +-else
    +-  if test "$cross_compiling" = yes; then
    +-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
    +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    +-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
    +-See \`config.log' for more details." >&5
    +-$as_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.  */
    +-/* Exit 0 (true) if wait returns something other than -1,
    +-   i.e. the pid of the child, which means that wait was restarted
    +-   after getting the signal.  */
    +-
    +-$ac_includes_default
    +-#include 
    +-#ifdef HAVE_SYS_WAIT_H
    +-# include 
    +-#endif
    +-
    +-/* Some platforms explicitly require an extern "C" signal handler
    +-   when using C++. */
    +-#ifdef __cplusplus
    +-extern "C" void ucatch (int dummy) { }
    +-#else
    +-void ucatch (dummy) int dummy; { }
    +-#endif
    +-
    +-int
    +-main ()
    +-{
    +-  int i = fork (), status;
    +-
    +-  if (i == 0)
    +-    {
    +-      sleep (3);
    +-      kill (getppid (), SIGINT);
    +-      sleep (3);
    +-      return 0;
    +-    }
    +-
    +-  signal (SIGINT, ucatch);
    +-
    +-  status = wait (&i);
    +-  if (status == -1)
    +-    wait (&i);
    +-
    +-  return status == -1;
    +-}
    +-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    +-$as_echo "$ac_try_echo") >&5
    +-  (eval "$ac_link") 2>&5
    +-  ac_status=$?
    +-  $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    +-$as_echo "$ac_try_echo") >&5
    +-  (eval "$ac_try") 2>&5
    +-  ac_status=$?
    +-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    +-  (exit $ac_status); }; }; then
    +-  ac_cv_sys_restartable_syscalls=yes
    +-else
    +-  $as_echo "$as_me: program exited with status $ac_status" >&5
    +-$as_echo "$as_me: failed program was:" >&5
    +-sed 's/^/| /' conftest.$ac_ext >&5
    +-
    +-( exit $ac_status )
    +-ac_cv_sys_restartable_syscalls=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
    +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_restartable_syscalls" >&5
    +-$as_echo "$ac_cv_sys_restartable_syscalls" >&6; }
    +-if test $ac_cv_sys_restartable_syscalls = yes; then
    +-
    +-cat >>confdefs.h <<\_ACEOF
    +-#define HAVE_RESTARTABLE_SYSCALLS 1
    +-_ACEOF
    +-
    +-fi
    +-
    +-    ;;
    +-esac
    +-
    + # Build optimized or debug version ?
    + # First check for gcc and g++
    + if test "$GCC" = "yes"
    +@@ -26923,84 +26794,6 @@ $as_echo "$as_me: error: \"$with_atomic_
    +    { (exit 1); exit 1; }; } ;;
    + esac
    + 
    +-{ $as_echo "$as_me:$LINENO: checking whether the compiler provides atomic builtins" >&5
    +-$as_echo_n "checking whether the compiler provides atomic builtins... " >&6; }
    +-if test "${mysql_cv_gcc_atomic_builtins+set}" = set; then
    +-  $as_echo_n "(cached) " >&6
    +-else
    +-  if test "$cross_compiling" = yes; then
    +-  mysql_cv_gcc_atomic_builtins=no
    +-else
    +-  cat >conftest.$ac_ext <<_ACEOF
    +-/* confdefs.h.  */
    +-_ACEOF
    +-cat confdefs.h >>conftest.$ac_ext
    +-cat >>conftest.$ac_ext <<_ACEOF
    +-/* end confdefs.h.  */
    +-
    +-  int main()
    +-  {
    +-    int foo= -10; int bar= 10;
    +-    if (!__sync_fetch_and_add(&foo, bar) || foo)
    +-      return -1;
    +-    bar= __sync_lock_test_and_set(&foo, bar);
    +-    if (bar || foo != 10)
    +-      return -1;
    +-    bar= __sync_val_compare_and_swap(&bar, foo, 15);
    +-    if (bar)
    +-      return -1;
    +-    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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    +-$as_echo "$ac_try_echo") >&5
    +-  (eval "$ac_link") 2>&5
    +-  ac_status=$?
    +-  $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    +-$as_echo "$ac_try_echo") >&5
    +-  (eval "$ac_try") 2>&5
    +-  ac_status=$?
    +-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    +-  (exit $ac_status); }; }; then
    +-  mysql_cv_gcc_atomic_builtins=yes
    +-else
    +-  $as_echo "$as_me: program exited with status $ac_status" >&5
    +-$as_echo "$as_me: failed program was:" >&5
    +-sed 's/^/| /' conftest.$ac_ext >&5
    +-
    +-( exit $ac_status )
    +-mysql_cv_gcc_atomic_builtins=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
    +-{ $as_echo "$as_me:$LINENO: result: $mysql_cv_gcc_atomic_builtins" >&5
    +-$as_echo "$mysql_cv_gcc_atomic_builtins" >&6; }
    +-
    +-if test "x$mysql_cv_gcc_atomic_builtins" = xyes; then
    +-
    +-cat >>confdefs.h <<\_ACEOF
    +-#define HAVE_GCC_ATOMIC_BUILTINS 1
    +-_ACEOF
    +-
    +-fi
    +-
    + # Force static compilation to avoid linking problems/get more speed
    + 
    + # Check whether --with-mysqld-ldflags was given.
    +@@ -40520,100 +40313,6 @@ fi
    + 
    + 
    + 
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    + if test "${with_archive_storage_engine+set}" = set; then
    +   with_plugin_archive="$with_archive_storage_engine"
    + fi
    +@@ -42056,10 +41755,6 @@ fi
    + 
    + 
    + 
    +-
    +-
    +-
    +-
    + # Check whether --with-plugins was given.
    + if test "${with_plugins+set}" = set; then
    +   withval=$with_plugins; mysql_plugins="`echo $withval | tr ',.:;*' '       '`"
    +@@ -42072,7 +41767,7 @@ fi
    + 
    +   case "$mysql_plugins" in
    +   all )
    +-    mysql_plugins='partition daemon_example ftexample archive blackhole csv example federated heap ibmdb2i innobase innodb_plugin myisam myisammrg ndbcluster'
    ++    mysql_plugins='partition archive blackhole csv example federated heap ibmdb2i innobase innodb_plugin myisam myisammrg ndbcluster'
    +     ;;
    +   none )
    +     mysql_plugins=''
    +@@ -42124,36 +41819,6 @@ $as_echo "$as_me: error: bad plugin name
    + 
    + 
    + 
    +-    daemon_example )
    +-
    +-
    +-
    +-      { $as_echo "$as_me:$LINENO: WARNING: Daemon Example Plugin can only be built as a plugin" >&5
    +-$as_echo "$as_me: WARNING: Daemon Example Plugin can only be built as a plugin" >&2;}
    +-
    +-
    +-
    +-      ;;
    +-
    +-
    +-
    +-
    +-
    +-    ftexample )
    +-
    +-
    +-
    +-      { $as_echo "$as_me:$LINENO: WARNING: Simple Parser can only be built as a plugin" >&5
    +-$as_echo "$as_me: WARNING: Simple Parser can only be built as a plugin" >&2;}
    +-
    +-
    +-
    +-      ;;
    +-
    +-
    +-
    +-
    +-
    +     archive )
    + 
    + 
    +@@ -42343,10 +42008,6 @@ $as_echo "$as_me: WARNING: InnoDB Storag
    + 
    + 
    + 
    +-
    +-
    +-
    +-
    +     * )
    +       { { $as_echo "$as_me:$LINENO: error: unknown plugin: $plugin" >&5
    + $as_echo "$as_me: error: unknown plugin: $plugin" >&2;}
    +@@ -42419,16 +42080,6 @@ $as_echo "$as_me: error: unknown plugin:
    + 
    + 
    + 
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +    if test "X$mysql_plugin_ndbcluster" = Xyes -a \
    +            "X$with_plugin_ndbcluster" != Xno -o \
    +            "X$with_plugin_ndbcluster" = Xyes; then
    +@@ -42489,10 +42140,6 @@ $as_echo "$as_me: error: depends upon di
    + 
    + 
    + 
    +-
    +-
    +-
    +-
    +  { $as_echo "$as_me:$LINENO: checking whether to use Partition Support" >&5
    + $as_echo_n "checking whether to use Partition Support... " >&6; }
    +  mysql_use_plugin_dir=""
    +@@ -42561,236 +42208,6 @@ $as_echo "yes" >&6; }
    + 
    + 
    + 
    +- { $as_echo "$as_me:$LINENO: checking whether to use Daemon Example Plugin" >&5
    +-$as_echo_n "checking whether to use Daemon Example Plugin... " >&6; }
    +- mysql_use_plugin_dir=""
    +-
    +-
    +-  # Plugin is not disabled, determine if it should be built,
    +-  # or only distributed
    +-
    +-
    +-    if test ! -d "$srcdir/plugin/daemon_example"; then
    +-      # Plugin directory was removed after autoconf was run; treat
    +-      # this as a disabled plugin
    +-      if test "X$with_plugin_daemon_example" = Xyes; then
    +-        { $as_echo "$as_me:$LINENO: result: error" >&5
    +-$as_echo "error" >&6; }
    +-        { { $as_echo "$as_me:$LINENO: error: disabled" >&5
    +-$as_echo "$as_me: error: disabled" >&2;}
    +-   { (exit 1); exit 1; }; }
    +-      fi
    +-
    +-      # The result message will be printed below
    +-      with_plugin_daemon_example=no
    +-    fi
    +-
    +-
    +-
    +-   case "$with_mysqld_ldflags " in
    +-     *"-all-static "*)
    +-       # No need to build shared plugins when mysqld is linked with
    +-       # -all-static as it won't be able to load them.
    +-       if test "X$mysql_plugin_daemon_example" != Xyes -a \
    +-               "X$with_plugin_daemon_example" != Xyes; then
    +-	     with_plugin_daemon_example=no
    +-	   fi
    +-     ;;
    +-   esac
    +-
    +-
    +-
    +-  if test "X$with_plugin_daemon_example" = Xno; then
    +-    { $as_echo "$as_me:$LINENO: result: no" >&5
    +-$as_echo "no" >&6; }
    +-  else
    +-    with_plugin_daemon_example=''
    +-    if test "X$mysql_plugin_daemon_example" != Xyes -a \
    +-            "X$with_plugin_daemon_example" != Xyes; then
    +-
    +-
    +-         if test -d "$srcdir/plugin/daemon_example" ; then
    +-           mysql_use_plugin_dir="plugin/daemon_example"
    +-
    +-       plugin_daemon_example_shared_target="libdaemon_example.la"
    +-
    +-       plugin_daemon_example_static_target=""
    +-
    +-       with_plugin_daemon_example=yes
    +-       { $as_echo "$as_me:$LINENO: result: plugin" >&5
    +-$as_echo "plugin" >&6; }
    +-
    +-         else
    +-           mysql_plugin_daemon_example=no
    +-           { $as_echo "$as_me:$LINENO: result: no" >&5
    +-$as_echo "no" >&6; }
    +-         fi
    +-
    +-
    +-    else
    +-
    +-
    +-        { $as_echo "$as_me:$LINENO: result: error" >&5
    +-$as_echo "error" >&6; }
    +-        { { $as_echo "$as_me:$LINENO: error: Plugin daemon_example does not support static linking" >&5
    +-$as_echo "$as_me: error: Plugin daemon_example does not support static linking" >&2;}
    +-   { (exit 1); exit 1; }; }
    +-
    +-
    +-      mysql_plugin_defs="$mysql_plugin_defs, builtin_daemon_example_plugin"
    +-      with_plugin_daemon_example=yes
    +-      { $as_echo "$as_me:$LINENO: result: yes" >&5
    +-$as_echo "yes" >&6; }
    +-
    +-    fi
    +-  fi
    +-
    +-
    +-    if test -d "$srcdir/plugin/daemon_example"; then
    +-      # Even if we don't build a plugin, we bundle its source into the dist
    +-      # file.  So its Makefile (and Makefiles for any subdirs) must be
    +-      # generated for 'make dist' to work.
    +-
    +-
    +-          # autoconf doesn't provide an automatic way to configure DIST_SUBDIRS of
    +-          # a subdir; for our purposes, it's enough to just check for existing
    +-          # Makefile.am files and add them in here
    +-          ac_config_files="$ac_config_files plugin/daemon_example/Makefile"
    +-
    +-
    +-
    +-
    +-
    +-          mysql_pg_distdirs="$mysql_pg_distdirs daemon_example"
    +-          if test -n "$mysql_use_plugin_dir" ; then
    +-            mysql_pg_dirs="$mysql_pg_dirs daemon_example"
    +-            mysql_pg_unittest_dirs="$mysql_pg_unittest_dirs ../plugin/daemon_example"
    +-          fi
    +-    fi
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +- { $as_echo "$as_me:$LINENO: checking whether to use Simple Parser" >&5
    +-$as_echo_n "checking whether to use Simple Parser... " >&6; }
    +- mysql_use_plugin_dir=""
    +-
    +-
    +-  # Plugin is not disabled, determine if it should be built,
    +-  # or only distributed
    +-
    +-
    +-    if test ! -d "$srcdir/plugin/fulltext"; then
    +-      # Plugin directory was removed after autoconf was run; treat
    +-      # this as a disabled plugin
    +-      if test "X$with_plugin_ftexample" = Xyes; then
    +-        { $as_echo "$as_me:$LINENO: result: error" >&5
    +-$as_echo "error" >&6; }
    +-        { { $as_echo "$as_me:$LINENO: error: disabled" >&5
    +-$as_echo "$as_me: error: disabled" >&2;}
    +-   { (exit 1); exit 1; }; }
    +-      fi
    +-
    +-      # The result message will be printed below
    +-      with_plugin_ftexample=no
    +-    fi
    +-
    +-
    +-
    +-   case "$with_mysqld_ldflags " in
    +-     *"-all-static "*)
    +-       # No need to build shared plugins when mysqld is linked with
    +-       # -all-static as it won't be able to load them.
    +-       if test "X$mysql_plugin_ftexample" != Xyes -a \
    +-               "X$with_plugin_ftexample" != Xyes; then
    +-	     with_plugin_ftexample=no
    +-	   fi
    +-     ;;
    +-   esac
    +-
    +-
    +-
    +-  if test "X$with_plugin_ftexample" = Xno; then
    +-    { $as_echo "$as_me:$LINENO: result: no" >&5
    +-$as_echo "no" >&6; }
    +-  else
    +-    with_plugin_ftexample=''
    +-    if test "X$mysql_plugin_ftexample" != Xyes -a \
    +-            "X$with_plugin_ftexample" != Xyes; then
    +-
    +-
    +-         if test -d "$srcdir/plugin/fulltext" ; then
    +-           mysql_use_plugin_dir="plugin/fulltext"
    +-
    +-       plugin_ftexample_shared_target="mypluglib.la"
    +-
    +-       plugin_ftexample_static_target=""
    +-
    +-       with_plugin_ftexample=yes
    +-       { $as_echo "$as_me:$LINENO: result: plugin" >&5
    +-$as_echo "plugin" >&6; }
    +-
    +-         else
    +-           mysql_plugin_ftexample=no
    +-           { $as_echo "$as_me:$LINENO: result: no" >&5
    +-$as_echo "no" >&6; }
    +-         fi
    +-
    +-
    +-    else
    +-
    +-
    +-        { $as_echo "$as_me:$LINENO: result: error" >&5
    +-$as_echo "error" >&6; }
    +-        { { $as_echo "$as_me:$LINENO: error: Plugin ftexample does not support static linking" >&5
    +-$as_echo "$as_me: error: Plugin ftexample does not support static linking" >&2;}
    +-   { (exit 1); exit 1; }; }
    +-
    +-
    +-      mysql_plugin_defs="$mysql_plugin_defs, builtin_ftexample_plugin"
    +-      with_plugin_ftexample=yes
    +-      { $as_echo "$as_me:$LINENO: result: yes" >&5
    +-$as_echo "yes" >&6; }
    +-
    +-    fi
    +-  fi
    +-
    +-
    +-    if test -d "$srcdir/plugin/fulltext"; then
    +-      # Even if we don't build a plugin, we bundle its source into the dist
    +-      # file.  So its Makefile (and Makefiles for any subdirs) must be
    +-      # generated for 'make dist' to work.
    +-
    +-
    +-          # autoconf doesn't provide an automatic way to configure DIST_SUBDIRS of
    +-          # a subdir; for our purposes, it's enough to just check for existing
    +-          # Makefile.am files and add them in here
    +-          ac_config_files="$ac_config_files plugin/fulltext/Makefile"
    +-
    +-
    +-
    +-
    +-
    +-          mysql_pg_distdirs="$mysql_pg_distdirs fulltext"
    +-          if test -n "$mysql_use_plugin_dir" ; then
    +-            mysql_pg_dirs="$mysql_pg_dirs fulltext"
    +-            mysql_pg_unittest_dirs="$mysql_pg_unittest_dirs ../plugin/fulltext"
    +-          fi
    +-    fi
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    + 
    + 
    + 
    +@@ -44204,7 +43621,7 @@ $as_echo "yes" >&6; }
    +           # autoconf doesn't provide an automatic way to configure DIST_SUBDIRS of
    +           # a subdir; for our purposes, it's enough to just check for existing
    +           # Makefile.am files and add them in here
    +-          ac_config_files="$ac_config_files storage/ndb/docs/Makefile storage/ndb/include/Makefile storage/ndb/src/common/debugger/signaldata/Makefile storage/ndb/src/common/debugger/Makefile storage/ndb/src/common/logger/Makefile storage/ndb/src/common/mgmcommon/Makefile storage/ndb/src/common/portlib/Makefile storage/ndb/src/common/transporter/Makefile storage/ndb/src/common/util/Makefile storage/ndb/src/common/Makefile storage/ndb/src/cw/cpcd/Makefile storage/ndb/src/cw/Makefile storage/ndb/src/kernel/blocks/backup/Makefile storage/ndb/src/kernel/blocks/dbdict/Makefile storage/ndb/src/kernel/blocks/dbdih/Makefile storage/ndb/src/kernel/blocks/dblqh/Makefile storage/ndb/src/kernel/blocks/dbtup/Makefile storage/ndb/src/kernel/blocks/Makefile storage/ndb/src/kernel/error/Makefile storage/ndb/src/kernel/vm/Makefile storage/ndb/src/kernel/Makefile storage/ndb/src/mgmapi/Makefile storage/ndb/src/mgmclient/Makefile storage/ndb/src/mgmsrv/Makefile storage/ndb/src/ndbapi/Makefile storage/ndb/src/Makefile storage/ndb/test/ndbapi/bank/Makefile storage/ndb/test/ndbapi/Makefile storage/ndb/test/run-test/Makefile storage/ndb/test/src/Makefile storage/ndb/test/tools/Makefile storage/ndb/test/Makefile storage/ndb/tools/Makefile storage/ndb/Makefile"
    ++          ac_config_files="$ac_config_files storage/ndb/Makefile storage/ndb/test/Makefile storage/ndb/test/run-test/Makefile storage/ndb/test/tools/Makefile storage/ndb/test/src/Makefile storage/ndb/test/ndbapi/Makefile storage/ndb/test/ndbapi/bank/Makefile storage/ndb/docs/Makefile storage/ndb/tools/Makefile storage/ndb/include/Makefile storage/ndb/src/Makefile storage/ndb/src/mgmsrv/Makefile storage/ndb/src/cw/Makefile storage/ndb/src/cw/cpcd/Makefile storage/ndb/src/mgmclient/Makefile storage/ndb/src/mgmapi/Makefile storage/ndb/src/common/Makefile storage/ndb/src/common/mgmcommon/Makefile storage/ndb/src/common/portlib/Makefile storage/ndb/src/common/debugger/Makefile storage/ndb/src/common/debugger/signaldata/Makefile storage/ndb/src/common/logger/Makefile storage/ndb/src/common/util/Makefile storage/ndb/src/common/transporter/Makefile storage/ndb/src/kernel/Makefile storage/ndb/src/kernel/blocks/Makefile storage/ndb/src/kernel/blocks/dbdict/Makefile storage/ndb/src/kernel/blocks/dbtup/Makefile storage/ndb/src/kernel/blocks/dbdih/Makefile storage/ndb/src/kernel/blocks/dblqh/Makefile storage/ndb/src/kernel/blocks/backup/Makefile storage/ndb/src/kernel/error/Makefile storage/ndb/src/kernel/vm/Makefile storage/ndb/src/ndbapi/Makefile"
    + 
    + 
    + 
    +@@ -44251,10 +43668,6 @@ $as_echo "yes" >&6; }
    + 
    + 
    + 
    +-
    +-
    +-
    +-
    +   if test "X$with_plugin_partition" = Xyes; then
    +     if test "X$plugin_partition_static_target" = X -a \
    +             "X$plugin_partition_shared_target" = X; then
    +@@ -44273,42 +43686,6 @@ $as_echo "$as_me: error: that's strange,
    + 
    + 
    + 
    +-  if test "X$with_plugin_daemon_example" = Xyes; then
    +-    if test "X$plugin_daemon_example_static_target" = X -a \
    +-            "X$plugin_daemon_example_shared_target" = X; then
    +-      { { $as_echo "$as_me:$LINENO: error: that's strange, daemon_example failed sanity check" >&5
    +-$as_echo "$as_me: error: that's strange, daemon_example failed sanity check" >&2;}
    +-   { (exit 1); exit 1; }; }
    +-    fi
    +-
    +-
    +-  fi
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-  if test "X$with_plugin_ftexample" = Xyes; then
    +-    if test "X$plugin_ftexample_static_target" = X -a \
    +-            "X$plugin_ftexample_shared_target" = X; then
    +-      { { $as_echo "$as_me:$LINENO: error: that's strange, ftexample failed sanity check" >&5
    +-$as_echo "$as_me: error: that's strange, ftexample failed sanity check" >&2;}
    +-   { (exit 1); exit 1; }; }
    +-    fi
    +-
    +-
    +-  fi
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +-
    +   if test "X$with_plugin_archive" = Xyes; then
    +     if test "X$plugin_archive_static_target" = X -a \
    +             "X$plugin_archive_shared_target" = X; then
    +@@ -48250,198 +47627,6 @@ $as_echo "$as_me: error: unknown endiann
    +   esac
    + 
    + 
    +-  { $as_echo "$as_me:$LINENO: checking whether GCC atomic builtins are available" >&5
    +-$as_echo_n "checking whether GCC atomic builtins are available... " >&6; }
    +-  # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
    +-  if test "$cross_compiling" = yes; then
    +-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
    +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    +-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
    +-See \`config.log' for more details." >&5
    +-$as_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.  */
    +-
    +-      int main()
    +-      {
    +-	long	x;
    +-	long	y;
    +-	long	res;
    +-	char	c;
    +-
    +-	x = 10;
    +-	y = 123;
    +-	res = __sync_bool_compare_and_swap(&x, x, y);
    +-	if (!res || x != y) {
    +-          return(1);
    +-        }
    +-
    +-	x = 10;
    +-	y = 123;
    +-	res = __sync_bool_compare_and_swap(&x, x + 1, y);
    +-	if (res || x != 10) {
    +-          return(1);
    +-        }
    +-
    +-	x = 10;
    +-	y = 123;
    +-	res = __sync_add_and_fetch(&x, y);
    +-	if (res != 123 + 10 || x != 123 + 10) {
    +-	  return(1);
    +-	}
    +-
    +-	c = 10;
    +-	res = __sync_lock_test_and_set(&c, 123);
    +-	if (res != 10 || c != 123) {
    +-	  return(1);
    +-	}
    +-
    +-	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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    +-$as_echo "$ac_try_echo") >&5
    +-  (eval "$ac_link") 2>&5
    +-  ac_status=$?
    +-  $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    +-$as_echo "$ac_try_echo") >&5
    +-  (eval "$ac_try") 2>&5
    +-  ac_status=$?
    +-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    +-  (exit $ac_status); }; }; then
    +-
    +-
    +-cat >>confdefs.h <<\_ACEOF
    +-#define HAVE_IB_GCC_ATOMIC_BUILTINS 1
    +-_ACEOF
    +-
    +-      { $as_echo "$as_me:$LINENO: result: yes" >&5
    +-$as_echo "yes" >&6; }
    +-
    +-else
    +-  $as_echo "$as_me: program exited with status $ac_status" >&5
    +-$as_echo "$as_me: failed program was:" >&5
    +-sed 's/^/| /' conftest.$ac_ext >&5
    +-
    +-( exit $ac_status )
    +-
    +-      { $as_echo "$as_me:$LINENO: result: no" >&5
    +-$as_echo "no" >&6; }
    +-
    +-
    +-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
    +-
    +-
    +-
    +-  { $as_echo "$as_me:$LINENO: checking whether pthread_t can be used by GCC atomic builtins" >&5
    +-$as_echo_n "checking whether pthread_t can be used by GCC atomic builtins... " >&6; }
    +-  # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
    +-  if test "$cross_compiling" = yes; then
    +-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
    +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    +-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
    +-See \`config.log' for more details." >&5
    +-$as_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 
    +-
    +-      int main(int argc, char** argv) {
    +-        pthread_t       x1;
    +-        pthread_t       x2;
    +-        pthread_t       x3;
    +-
    +-	memset(&x1, 0x0, sizeof(x1));
    +-	memset(&x2, 0x0, sizeof(x2));
    +-	memset(&x3, 0x0, sizeof(x3));
    +-
    +-        __sync_bool_compare_and_swap(&x1, x2, x3);
    +-
    +-        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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    +-$as_echo "$ac_try_echo") >&5
    +-  (eval "$ac_link") 2>&5
    +-  ac_status=$?
    +-  $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    +-$as_echo "$ac_try_echo") >&5
    +-  (eval "$ac_try") 2>&5
    +-  ac_status=$?
    +-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    +-  (exit $ac_status); }; }; then
    +-
    +-
    +-cat >>confdefs.h <<\_ACEOF
    +-#define HAVE_IB_ATOMIC_PTHREAD_T_GCC 1
    +-_ACEOF
    +-
    +-      { $as_echo "$as_me:$LINENO: result: yes" >&5
    +-$as_echo "yes" >&6; }
    +-
    +-else
    +-  $as_echo "$as_me: program exited with status $ac_status" >&5
    +-$as_echo "$as_me: failed program was:" >&5
    +-sed 's/^/| /' conftest.$ac_ext >&5
    +-
    +-( exit $ac_status )
    +-
    +-      { $as_echo "$as_me:$LINENO: result: no" >&5
    +-$as_echo "no" >&6; }
    +-
    +-
    +-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
    +-
    +-
    +-
    +   { $as_echo "$as_me:$LINENO: checking whether Solaris libc atomic functions are available" >&5
    + $as_echo_n "checking whether Solaris libc atomic functions are available... " >&6; }
    +   # either define HAVE_IB_SOLARIS_ATOMICS or not
    +@@ -48560,103 +47745,6 @@ fi
    + done
    + 
    + 
    +-  { $as_echo "$as_me:$LINENO: checking whether pthread_t can be used by Solaris libc atomic functions" >&5
    +-$as_echo_n "checking whether pthread_t can be used by Solaris libc atomic functions... " >&6; }
    +-  # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
    +-  if test "$cross_compiling" = yes; then
    +-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
    +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    +-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
    +-See \`config.log' for more details." >&5
    +-$as_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 
    +-
    +-      int main(int argc, char** argv) {
    +-        pthread_t       x1;
    +-        pthread_t       x2;
    +-        pthread_t       x3;
    +-
    +-        memset(&x1, 0x0, sizeof(x1));
    +-        memset(&x2, 0x0, sizeof(x2));
    +-        memset(&x3, 0x0, sizeof(x3));
    +-
    +-        if (sizeof(pthread_t) == 4) {
    +-
    +-          atomic_cas_32(&x1, x2, x3);
    +-
    +-        } else if (sizeof(pthread_t) == 8) {
    +-
    +-          atomic_cas_64(&x1, x2, x3);
    +-
    +-        } else {
    +-
    +-          return(1);
    +-        }
    +-
    +-	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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    +-$as_echo "$ac_try_echo") >&5
    +-  (eval "$ac_link") 2>&5
    +-  ac_status=$?
    +-  $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    +-$as_echo "$ac_try_echo") >&5
    +-  (eval "$ac_try") 2>&5
    +-  ac_status=$?
    +-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    +-  (exit $ac_status); }; }; then
    +-
    +-
    +-cat >>confdefs.h <<\_ACEOF
    +-#define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS 1
    +-_ACEOF
    +-
    +-      { $as_echo "$as_me:$LINENO: result: yes" >&5
    +-$as_echo "yes" >&6; }
    +-
    +-else
    +-  $as_echo "$as_me: program exited with status $ac_status" >&5
    +-$as_echo "$as_me: failed program was:" >&5
    +-sed 's/^/| /' conftest.$ac_ext >&5
    +-
    +-( exit $ac_status )
    +-
    +-      { $as_echo "$as_me:$LINENO: result: no" >&5
    +-$as_echo "no" >&6; }
    +-
    +-
    +-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
    +-
    +-
    +-
    +   # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
    +   # to use in the source
    +   # The cast to long int works around a bug in the HP C Compiler
    +@@ -49573,10 +48661,6 @@ _ACEOF
    + 
    + 
    + 
    +-
    +-
    +-
    +-
    + # Only build client code?
    + 
    + # Check whether --with-server was given.
    +@@ -51544,8 +50628,6 @@ do
    +     "extra/yassl/taocrypt/test/Makefile") CONFIG_FILES="$CONFIG_FILES extra/yassl/taocrypt/test/Makefile" ;;
    +     "extra/yassl/src/Makefile") CONFIG_FILES="$CONFIG_FILES extra/yassl/src/Makefile" ;;
    +     "extra/yassl/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES extra/yassl/testsuite/Makefile" ;;
    +-    "plugin/daemon_example/Makefile") CONFIG_FILES="$CONFIG_FILES plugin/daemon_example/Makefile" ;;
    +-    "plugin/fulltext/Makefile") CONFIG_FILES="$CONFIG_FILES plugin/fulltext/Makefile" ;;
    +     "storage/archive/Makefile") CONFIG_FILES="$CONFIG_FILES storage/archive/Makefile" ;;
    +     "storage/blackhole/Makefile") CONFIG_FILES="$CONFIG_FILES storage/blackhole/Makefile" ;;
    +     "storage/csv/Makefile") CONFIG_FILES="$CONFIG_FILES storage/csv/Makefile" ;;
    +@@ -51557,40 +50639,40 @@ do
    +     "storage/innodb_plugin/Makefile") CONFIG_FILES="$CONFIG_FILES storage/innodb_plugin/Makefile" ;;
    +     "storage/myisam/Makefile") CONFIG_FILES="$CONFIG_FILES storage/myisam/Makefile" ;;
    +     "storage/myisammrg/Makefile") CONFIG_FILES="$CONFIG_FILES storage/myisammrg/Makefile" ;;
    ++    "storage/ndb/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/Makefile" ;;
    ++    "storage/ndb/test/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/test/Makefile" ;;
    ++    "storage/ndb/test/run-test/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/test/run-test/Makefile" ;;
    ++    "storage/ndb/test/tools/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/test/tools/Makefile" ;;
    ++    "storage/ndb/test/src/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/test/src/Makefile" ;;
    ++    "storage/ndb/test/ndbapi/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/test/ndbapi/Makefile" ;;
    ++    "storage/ndb/test/ndbapi/bank/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/test/ndbapi/bank/Makefile" ;;
    +     "storage/ndb/docs/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/docs/Makefile" ;;
    ++    "storage/ndb/tools/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/tools/Makefile" ;;
    +     "storage/ndb/include/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/include/Makefile" ;;
    +-    "storage/ndb/src/common/debugger/signaldata/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/common/debugger/signaldata/Makefile" ;;
    +-    "storage/ndb/src/common/debugger/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/common/debugger/Makefile" ;;
    +-    "storage/ndb/src/common/logger/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/common/logger/Makefile" ;;
    ++    "storage/ndb/src/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/Makefile" ;;
    ++    "storage/ndb/src/mgmsrv/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/mgmsrv/Makefile" ;;
    ++    "storage/ndb/src/cw/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/cw/Makefile" ;;
    ++    "storage/ndb/src/cw/cpcd/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/cw/cpcd/Makefile" ;;
    ++    "storage/ndb/src/mgmclient/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/mgmclient/Makefile" ;;
    ++    "storage/ndb/src/mgmapi/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/mgmapi/Makefile" ;;
    ++    "storage/ndb/src/common/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/common/Makefile" ;;
    +     "storage/ndb/src/common/mgmcommon/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/common/mgmcommon/Makefile" ;;
    +     "storage/ndb/src/common/portlib/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/common/portlib/Makefile" ;;
    +-    "storage/ndb/src/common/transporter/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/common/transporter/Makefile" ;;
    ++    "storage/ndb/src/common/debugger/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/common/debugger/Makefile" ;;
    ++    "storage/ndb/src/common/debugger/signaldata/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/common/debugger/signaldata/Makefile" ;;
    ++    "storage/ndb/src/common/logger/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/common/logger/Makefile" ;;
    +     "storage/ndb/src/common/util/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/common/util/Makefile" ;;
    +-    "storage/ndb/src/common/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/common/Makefile" ;;
    +-    "storage/ndb/src/cw/cpcd/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/cw/cpcd/Makefile" ;;
    +-    "storage/ndb/src/cw/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/cw/Makefile" ;;
    +-    "storage/ndb/src/kernel/blocks/backup/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/kernel/blocks/backup/Makefile" ;;
    ++    "storage/ndb/src/common/transporter/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/common/transporter/Makefile" ;;
    ++    "storage/ndb/src/kernel/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/kernel/Makefile" ;;
    ++    "storage/ndb/src/kernel/blocks/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/kernel/blocks/Makefile" ;;
    +     "storage/ndb/src/kernel/blocks/dbdict/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/kernel/blocks/dbdict/Makefile" ;;
    ++    "storage/ndb/src/kernel/blocks/dbtup/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/kernel/blocks/dbtup/Makefile" ;;
    +     "storage/ndb/src/kernel/blocks/dbdih/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/kernel/blocks/dbdih/Makefile" ;;
    +     "storage/ndb/src/kernel/blocks/dblqh/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/kernel/blocks/dblqh/Makefile" ;;
    +-    "storage/ndb/src/kernel/blocks/dbtup/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/kernel/blocks/dbtup/Makefile" ;;
    +-    "storage/ndb/src/kernel/blocks/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/kernel/blocks/Makefile" ;;
    ++    "storage/ndb/src/kernel/blocks/backup/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/kernel/blocks/backup/Makefile" ;;
    +     "storage/ndb/src/kernel/error/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/kernel/error/Makefile" ;;
    +     "storage/ndb/src/kernel/vm/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/kernel/vm/Makefile" ;;
    +-    "storage/ndb/src/kernel/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/kernel/Makefile" ;;
    +-    "storage/ndb/src/mgmapi/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/mgmapi/Makefile" ;;
    +-    "storage/ndb/src/mgmclient/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/mgmclient/Makefile" ;;
    +-    "storage/ndb/src/mgmsrv/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/mgmsrv/Makefile" ;;
    +     "storage/ndb/src/ndbapi/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/ndbapi/Makefile" ;;
    +-    "storage/ndb/src/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/Makefile" ;;
    +-    "storage/ndb/test/ndbapi/bank/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/test/ndbapi/bank/Makefile" ;;
    +-    "storage/ndb/test/ndbapi/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/test/ndbapi/Makefile" ;;
    +-    "storage/ndb/test/run-test/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/test/run-test/Makefile" ;;
    +-    "storage/ndb/test/src/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/test/src/Makefile" ;;
    +-    "storage/ndb/test/tools/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/test/tools/Makefile" ;;
    +-    "storage/ndb/test/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/test/Makefile" ;;
    +-    "storage/ndb/tools/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/tools/Makefile" ;;
    +-    "storage/ndb/Makefile") CONFIG_FILES="$CONFIG_FILES storage/ndb/Makefile" ;;
    +     "storage/ndb/src/libndb.ver") CONFIG_FILES="$CONFIG_FILES storage/ndb/src/libndb.ver" ;;
    +     "storage/ndb/include/ndb_version.h") CONFIG_FILES="$CONFIG_FILES storage/ndb/include/ndb_version.h" ;;
    +     "storage/ndb/include/ndb_global.h") CONFIG_FILES="$CONFIG_FILES storage/ndb/include/ndb_global.h" ;;
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -1611,14 +1611,6 @@ case "$with_mysqld_ldflags " in
    + esac
    + 
    + 
    +-# System characteristics
    +-case $SYSTEM_TYPE in
    +-  *netware*) ;;
    +-  *)
    +-AC_SYS_RESTARTABLE_SYSCALLS
    +-    ;;
    +-esac
    +-
    + # Build optimized or debug version ?
    + # First check for gcc and g++
    + if test "$GCC" = "yes"
    +--- a/storage/innodb_plugin/plug.in
    ++++ b/storage/innodb_plugin/plug.in
    +@@ -53,88 +53,6 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
    +   esac
    +   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
    + 
    +-  AC_MSG_CHECKING(whether GCC atomic builtins are available)
    +-  # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
    +-  AC_TRY_RUN(
    +-    [
    +-      int main()
    +-      {
    +-	long	x;
    +-	long	y;
    +-	long	res;
    +-	char	c;
    +-
    +-	x = 10;
    +-	y = 123;
    +-	res = __sync_bool_compare_and_swap(&x, x, y);
    +-	if (!res || x != y) {
    +-          return(1);
    +-        }
    +-
    +-	x = 10;
    +-	y = 123;
    +-	res = __sync_bool_compare_and_swap(&x, x + 1, y);
    +-	if (res || x != 10) {
    +-          return(1);
    +-        }
    +-
    +-	x = 10;
    +-	y = 123;
    +-	res = __sync_add_and_fetch(&x, y);
    +-	if (res != 123 + 10 || x != 123 + 10) {
    +-	  return(1);
    +-	}
    +-
    +-	c = 10;
    +-	res = __sync_lock_test_and_set(&c, 123);
    +-	if (res != 10 || c != 123) {
    +-	  return(1);
    +-	}
    +-
    +-	return(0);
    +-      }
    +-    ],
    +-    [
    +-      AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
    +-                [GCC atomic builtins are available])
    +-      AC_MSG_RESULT(yes)
    +-    ],
    +-    [
    +-      AC_MSG_RESULT(no)
    +-    ]
    +-  )
    +-
    +-  AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
    +-  # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
    +-  AC_TRY_RUN(
    +-    [
    +-      #include 
    +-      #include 
    +-
    +-      int main(int argc, char** argv) {
    +-        pthread_t       x1;
    +-        pthread_t       x2;
    +-        pthread_t       x3;
    +-
    +-	memset(&x1, 0x0, sizeof(x1));
    +-	memset(&x2, 0x0, sizeof(x2));
    +-	memset(&x3, 0x0, sizeof(x3));
    +-
    +-        __sync_bool_compare_and_swap(&x1, x2, x3);
    +-
    +-        return(0);
    +-      }
    +-    ],
    +-    [
    +-      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
    +-                [pthread_t can be used by GCC atomic builtins])
    +-      AC_MSG_RESULT(yes)
    +-    ],
    +-    [
    +-      AC_MSG_RESULT(no)
    +-    ]
    +-  )
    +-
    +   AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
    +   # either define HAVE_IB_SOLARIS_ATOMICS or not
    +   AC_CHECK_FUNCS(atomic_cas_ulong \
    +@@ -148,48 +66,6 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
    + 			    are available])
    +   )
    + 
    +-  AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
    +-  # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
    +-  AC_TRY_RUN(
    +-    [
    +-      #include 
    +-      #include 
    +-
    +-      int main(int argc, char** argv) {
    +-        pthread_t       x1;
    +-        pthread_t       x2;
    +-        pthread_t       x3;
    +-
    +-        memset(&x1, 0x0, sizeof(x1));
    +-        memset(&x2, 0x0, sizeof(x2));
    +-        memset(&x3, 0x0, sizeof(x3));
    +-
    +-        if (sizeof(pthread_t) == 4) {
    +-        
    +-          atomic_cas_32(&x1, x2, x3);
    +-        
    +-        } else if (sizeof(pthread_t) == 8) {
    +-        
    +-          atomic_cas_64(&x1, x2, x3);
    +-        
    +-        } else {
    +-        
    +-          return(1);
    +-        }
    +-
    +-	return(0);
    +-      }
    +-    ],
    +-    [
    +-      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
    +-                [pthread_t can be used by solaris atomics])
    +-      AC_MSG_RESULT(yes)
    +-    ],
    +-    [
    +-      AC_MSG_RESULT(no)
    +-    ]
    +-  )
    +-
    +   # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
    +   # to use in the source
    +   AC_CHECK_SIZEOF([pthread_t], [], [#include ])
    +--- a/libmysql/Makefile.in
    ++++ b/libmysql/Makefile.in
    +@@ -626,7 +626,7 @@ clean-noinstPROGRAMS:
    + 	done
    + conf_to_src$(EXEEXT): $(conf_to_src_OBJECTS) $(conf_to_src_DEPENDENCIES) 
    + 	@rm -f conf_to_src$(EXEEXT)
    +-	$(conf_to_src_LINK) $(conf_to_src_OBJECTS) $(conf_to_src_LDADD) $(LIBS)
    ++	$(conf_to_src_LINK) $(conf_to_src_OBJECTS) $(conf_to_src_LDADD)
    + 
    + mostlyclean-compile:
    + 	-rm -f *.$(OBJEXT)
    diff --git a/libs/mysql/patches/501-disable-pthread-and-tests.patch b/libs/mysql/patches/501-disable-pthread-and-tests.patch
    new file mode 100644
    index 0000000..e295e58
    --- /dev/null
    +++ b/libs/mysql/patches/501-disable-pthread-and-tests.patch
    @@ -0,0 +1,117 @@
    +--- a/sql/Makefile.am
    ++++ b/sql/Makefile.am
    +@@ -41,7 +41,6 @@ mysqld_DEPENDENCIES=	@mysql_plugin_libs@
    + LDADD = $(SUPPORTING_LIBS) @ZLIB_LIBS@ @NDB_SCI_LIBS@
    + mysqld_LDADD =		libndb.la \
    + 			@MYSQLD_EXTRA_LDFLAGS@ \
    +-			@pstack_libs@ \
    + 			@mysql_plugin_libs@ \
    + 			$(LDADD)  $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ \
    + 			$(yassl_libs) $(openssl_libs) @MYSQLD_EXTRA_LIBS@
    +@@ -174,10 +173,10 @@ link_sources:
    + # This generates lex_hash.h
    + # NOTE Built sources should depend on their sources not the tool
    + # this avoid the rebuild of the built files in a source dist
    +-lex_hash.h:	gen_lex_hash.cc lex.h
    +-		$(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
    +-		./gen_lex_hash$(EXEEXT) > $@-t
    +-		$(MV) $@-t $@
    ++#lex_hash.h:	gen_lex_hash.cc lex.h
    ++#		$(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
    ++#		./gen_lex_hash$(EXEEXT) > $@-t
    ++#		$(MV) $@-t $@
    + 
    + # For testing of udf_example.so
    + udf_example_la_SOURCES= udf_example.c
    +--- a/sql/Makefile.in
    ++++ b/sql/Makefile.in
    +@@ -486,8 +486,6 @@ plugin_partition_static_target = @plugin
    + prefix = @prefix@
    + program_transform_name = @program_transform_name@
    + psdir = @psdir@
    +-pstack_dir = @pstack_dir@
    +-pstack_libs = @pstack_libs@
    + readline_basedir = @readline_basedir@
    + readline_dir = @readline_dir@
    + readline_h_ln_cmd = @readline_h_ln_cmd@
    +@@ -541,7 +539,6 @@ mysqld_DEPENDENCIES = @mysql_plugin_libs
    + LDADD = $(SUPPORTING_LIBS) @ZLIB_LIBS@ @NDB_SCI_LIBS@
    + mysqld_LDADD = libndb.la \
    + 			@MYSQLD_EXTRA_LDFLAGS@ \
    +-			@pstack_libs@ \
    + 			@mysql_plugin_libs@ \
    + 			$(LDADD)  $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ \
    + 			$(yassl_libs) $(openssl_libs) @MYSQLD_EXTRA_LIBS@
    +@@ -1308,10 +1305,10 @@ link_sources:
    + # This generates lex_hash.h
    + # NOTE Built sources should depend on their sources not the tool
    + # this avoid the rebuild of the built files in a source dist
    +-lex_hash.h:	gen_lex_hash.cc lex.h
    +-		$(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
    +-		./gen_lex_hash$(EXEEXT) > $@-t
    +-		$(MV) $@-t $@
    ++#lex_hash.h:	gen_lex_hash.cc lex.h
    ++#		$(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
    ++#		./gen_lex_hash$(EXEEXT) > $@-t
    ++#		$(MV) $@-t $@
    + 
    + # We might have some stuff not built in this build, but that we want to install
    + install-exec-hook:
    +--- a/extra/Makefile.am
    ++++ b/extra/Makefile.am
    +@@ -29,16 +29,16 @@ DIST_SUBDIRS =		yassl
    + # This will build mysqld_error.h, mysqld_ername.h and sql_state.h
    + # NOTE Built files should depend on their sources to avoid
    + # the built files being rebuilt in source dist
    +-$(top_builddir)/include/mysqld_error.h: comp_err.c \
    +-			$(top_srcdir)/sql/share/errmsg.txt
    +-	$(MAKE) $(AM_MAKEFLAGS) comp_err$(EXEEXT)
    +-	$(top_builddir)/extra/comp_err$(EXEEXT) \
    +-	--charset=$(top_srcdir)/sql/share/charsets \
    +-	--out-dir=$(top_builddir)/sql/share/ \
    +-	--header_file=$(top_builddir)/include/mysqld_error.h \
    +-	--name_file=$(top_builddir)/include/mysqld_ername.h \
    +-	--state_file=$(top_builddir)/include/sql_state.h \
    +-	--in_file=$(top_srcdir)/sql/share/errmsg.txt
    ++#$(top_builddir)/include/mysqld_error.h: comp_err.c \
    ++#			$(top_srcdir)/sql/share/errmsg.txt
    ++#	$(MAKE) $(AM_MAKEFLAGS) comp_err$(EXEEXT)
    ++#	$(top_builddir)/extra/comp_err$(EXEEXT) \
    ++#	--charset=$(top_srcdir)/sql/share/charsets \
    ++#	--out-dir=$(top_builddir)/sql/share/ \
    ++#	--header_file=$(top_builddir)/include/mysqld_error.h \
    ++#	--name_file=$(top_builddir)/include/mysqld_ername.h \
    ++#	--state_file=$(top_builddir)/include/sql_state.h \
    ++#	--in_file=$(top_srcdir)/sql/share/errmsg.txt
    + $(top_builddir)/include/mysqld_ername.h: $(top_builddir)/include/mysqld_error.h
    + $(top_builddir)/include/sql_state.h: $(top_builddir)/include/mysqld_error.h
    + 
    +--- a/extra/Makefile.in
    ++++ b/extra/Makefile.in
    +@@ -938,16 +938,16 @@ uninstall-am: uninstall-binPROGRAMS unin
    + # This will build mysqld_error.h, mysqld_ername.h and sql_state.h
    + # NOTE Built files should depend on their sources to avoid
    + # the built files being rebuilt in source dist
    +-$(top_builddir)/include/mysqld_error.h: comp_err.c \
    +-			$(top_srcdir)/sql/share/errmsg.txt
    +-	$(MAKE) $(AM_MAKEFLAGS) comp_err$(EXEEXT)
    +-	$(top_builddir)/extra/comp_err$(EXEEXT) \
    +-	--charset=$(top_srcdir)/sql/share/charsets \
    +-	--out-dir=$(top_builddir)/sql/share/ \
    +-	--header_file=$(top_builddir)/include/mysqld_error.h \
    +-	--name_file=$(top_builddir)/include/mysqld_ername.h \
    +-	--state_file=$(top_builddir)/include/sql_state.h \
    +-	--in_file=$(top_srcdir)/sql/share/errmsg.txt
    ++#$(top_builddir)/include/mysqld_error.h: comp_err.c \
    ++#			$(top_srcdir)/sql/share/errmsg.txt
    ++#	$(MAKE) $(AM_MAKEFLAGS) comp_err$(EXEEXT)
    ++#	$(top_builddir)/extra/comp_err$(EXEEXT) \
    ++#	--charset=$(top_srcdir)/sql/share/charsets \
    ++#	--out-dir=$(top_builddir)/sql/share/ \
    ++#	--header_file=$(top_builddir)/include/mysqld_error.h \
    ++#	--name_file=$(top_builddir)/include/mysqld_ername.h \
    ++#	--state_file=$(top_builddir)/include/sql_state.h \
    ++#	--in_file=$(top_srcdir)/sql/share/errmsg.txt
    + $(top_builddir)/include/mysqld_ername.h: $(top_builddir)/include/mysqld_error.h
    + $(top_builddir)/include/sql_state.h: $(top_builddir)/include/mysqld_error.h
    + 
    diff --git a/libs/mysql/patches/502-fix-hostname.patch b/libs/mysql/patches/502-fix-hostname.patch
    new file mode 100644
    index 0000000..a35c3be
    --- /dev/null
    +++ b/libs/mysql/patches/502-fix-hostname.patch
    @@ -0,0 +1,11 @@
    +--- a/scripts/mysql_install_db.sh
    ++++ b/scripts/mysql_install_db.sh
    +@@ -317,7 +317,7 @@ then
    + fi
    + 
    + # Try to determine the hostname
    +-hostname=`@HOSTNAME@`
    ++hostname=`cat /proc/sys/kernel/hostname`
    + 
    + # Check if hostname is valid
    + if test "$cross_bootstrap" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0
    diff --git a/libs/nacl/Makefile b/libs/nacl/Makefile
    new file mode 100644
    index 0000000..546f071
    --- /dev/null
    +++ b/libs/nacl/Makefile
    @@ -0,0 +1,47 @@
    +#
    +# Copyright (C) 2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=nacl
    +PKG_VERSION:=20110221
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://hyperelliptic.org/nacl
    +PKG_MD5SUM:=7efb5715561c3d10dafd3fa97b4f2d20
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/nacl
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=NaCl Networking and Cryptography library
    +  URL:=http://nacl.cace-project.eu/
    +endef
    +
    +define Build/Compile
    +	cp do-openwrt $(PKG_BUILD_DIR)
    +	( \
    +		cd $(PKG_BUILD_DIR); \
    +		chmod +x do-openwrt; \
    +			CC="$(TARGET_CC)" \
    +			CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
    +			AR="$(TARGET_CROSS)ar" \
    +			RANLIB="$(TARGET_CROSS)ranlib" \
    +			./do-openwrt \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/nacl
    +	$(CP) $(PKG_BUILD_DIR)/build/include/*.h $(1)/usr/include/nacl/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/build/lib/libnacl.a $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,nacl))
    diff --git a/libs/nacl/do-openwrt b/libs/nacl/do-openwrt
    new file mode 100755
    index 0000000..65d9376
    --- /dev/null
    +++ b/libs/nacl/do-openwrt
    @@ -0,0 +1,206 @@
    +#!/bin/sh
    +set -e
    +
    +# nacl/do
    +# D. J. Bernstein
    +# Public domain.
    +
    +version=`cat version`
    +project=nacl
    +
    +top="`pwd`/build"
    +bin="$top/bin"
    +lib="$top/lib"
    +include="$top/include"
    +work="$top/work"
    +
    +
    +# and work around bug in GNU sort
    +LANG=C
    +export LANG
    +
    +rm -rf "$top"
    +mkdir -p "$top"
    +mkdir -p "$bin"
    +mkdir -p "$lib"
    +mkdir -p "$include"
    +
    +exec >"$top/log"
    +exec 2>&1
    +exec 5>"$top/data"
    +exec "
    +    echo ""
    +    echo "typedef ${target}_t crypto_${target};"
    +    echo ""
    +    echo "#endif"
    +  ) > "$include/crypto_$target.h"
    +done
    +
    +echo "=== `date` === building randombytes"
    +rm -rf "$work"
    +mkdir -p "$work"
    +cp -pr randombytes/* "$work"
    +(
    +  cd "$work"
    +  
    +  cp devurandom.c randombytes-impl.c
    +  cp devurandom.h randombytes-impl.h
    +  $CC $CFLAGS -c randombytes-impl.c
    +  mkdir -p lib
    +  mv randombytes-impl.o lib/randombytes.o
    +  mkdir -p include
    +  mv randombytes-impl.h include/randombytes.h
    +)
    +cp -pr "$work"/lib/* "$lib"
    +cp -pr "$work"/include/* "$include"
    +
    +rm -rf "$work"
    +mkdir -p "$work"
    +echo 'void crypto_'"$project"'_base(void) { ; }' > "$work/${project}_base.c"
    +( cd "$work" && $CC $CFLAGS -c ${project}_base.c )
    +$AR cr "$lib/lib${project}.a" "$work/${project}_base.o"
    +( $RANLIB "$lib/lib${project}.a" || exit 0 )
    +
    +# loop over operations
    +cat OPERATIONS \
    +| while read o
    +do
    +  [ -d "$o" ] || continue
    +
    +  # for each operation, loop over primitives
    +  ls "$o" \
    +  | sort \
    +  | while read p
    +  do
    +    [ -d "$o/$p" ] || continue
    +    op="${o}_${p}"
    +
    +    startdate=`date +%Y%m%d`
    +
    +    echo "=== `date` === $o/$p"
    +
    +    rm -rf "$work"
    +    mkdir -p "$work"
    +
    +    if [ -d "$o/$p/ref" ]; then
    +      implementationdir="$o/$p/ref"
    +    else
    +      implementationdir="$o/$p/portable"
    +    fi
    +
    +    opi=`echo "$implementationdir" | tr ./- ___`
    +    
    +    echo "=== `date` === $implementationdir"
    +
    +    cfiles=`ls "$implementationdir" | grep '\.c$' || :`
    +    sfiles=`ls "$implementationdir" | grep '\.[sS]$' || :`
    +    
    +    cp -p "$o"/*.c "$work"
    +
    +    cp -pr "$implementationdir"/* "$work"
    +
    +    cp -p MACROS "$work/MACROS"
    +    cp -p PROTOTYPES.c "$work/PROTOTYPES.c"
    +
    +    (
    +      cd "$work"
    +      (
    +	echo "#ifndef ${o}_H"
    +	echo "#define ${o}_H"
    +	echo ""
    +	echo "#include \"${op}.h\""
    +	echo ""
    +	egrep "${o}"'$|'"${o}"'\(|'"${o}"'_' < MACROS \
    +	  | sed "s/$o/$op/" | while read mop
    +	do
    +	  echo "#define ${mop} ${mop}" | sed "s/$op/$o/"
    +	done
    +	echo "#define ${o}_PRIMITIVE \"${p}\""
    +	echo "#define ${o}_IMPLEMENTATION ${op}_IMPLEMENTATION"
    +	echo "#define ${o}_VERSION ${op}_VERSION"
    +	echo ""
    +	echo "#endif"
    +      ) > "$o.h"
    +      (
    +	echo "#ifndef ${op}_H"
    +	echo "#define ${op}_H"
    +	echo ""
    +	sed 's/[ 	]CRYPTO_/ '"${opi}"'_/g' < api.h
    +	echo '#ifdef __cplusplus'
    +	  #echo '#include '
    +	  #egrep "${o}"'$|'"${o}"'\(|'"${o}"'_' < PROTOTYPES.cpp \
    +	  #    | sed "s/$o/$opi/"
    +	echo 'extern "C" {'
    +	echo '#endif'
    +	egrep "${o}"'$|'"${o}"'\(|'"${o}"'_' < PROTOTYPES.c \
    +	  | sed "s/$o/$opi/"
    +	echo '#ifdef __cplusplus'
    +	echo '}'
    +	echo '#endif'
    +	echo ""
    +	egrep "${o}"'$|'"${o}"'\(|'"${o}"'_' < MACROS \
    +	  | sed "s/$o/$opi/" | while read mopi
    +	do
    +	    echo "#define ${mopi} ${mopi}" | sed "s/$opi/$op/"
    +	done
    +	echo "#define ${op}_IMPLEMENTATION \"${implementationdir}\""
    +	echo "#ifndef ${opi}_VERSION"
    +	echo "#define ${opi}_VERSION \"-\""
    +	echo "#endif"
    +	echo "#define ${op}_VERSION ${opi}_VERSION"
    +	echo ""
    +	echo "#endif"
    +      ) > "$op.h"
    +
    +      echo "=== `date` === $implementationdir $CC $CFLAGS"
    +      for f in $cfiles $sfiles
    +      do
    +	ok=1
    +	$CC $CFLAGS \
    +	    -I. -I"$include" \
    +	    -c "$f" >errors 2>&1 || ok=0
    +	( if [ `wc -l < errors` -lt 25 ]
    +	  then
    +	    cat errors
    +	  else
    +	    head errors
    +	    echo ...
    +	    tail errors
    +	  fi
    +	) \
    +	| while read err
    +	do
    +	  echo "$version $startdate $o $p fromcompiler $implementationdir $f $err" >&5
    +	done
    +	
    +	[ "$ok" = 1 ]
    +      done
    +
    +      for f in *.o
    +      do
    +	mv "$f" "${opi}-$f"
    +      done
    +    )
    +  
    +    echo "=== `date` === $implementationdir $CC $CFLAGS finishing"
    +
    +    $AR cr "$lib/lib${project}.a" "$work"/*.o \
    +    && ( $RANLIB "$lib/lib${project}.a" || exit 0 ) \
    +    && cp -p "$work/$op.h" "$include/$op.h" \
    +    && [ -f "$o/$p/selected" ] \
    +    && cp -p "$work/$o.h" "$include/$o.h" \
    +    || :
    +  done
    +done
    +
    +echo "=== `date` === finishing"
    diff --git a/libs/neon/Makefile b/libs/neon/Makefile
    new file mode 100644
    index 0000000..10c390f
    --- /dev/null
    +++ b/libs/neon/Makefile
    @@ -0,0 +1,63 @@
    +#
    +# Copyright (C) 2007-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=neon
    +PKG_VERSION:=0.29.6
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.webdav.org/neon
    +PKG_MD5SUM:=591e0c82e6979e7e615211b386b8f6bc
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libneon
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=HTTP and WebDAV client library
    +  URL:=http://www.webdav.org/neon/
    +  DEPENDS:=+libopenssl +libexpat
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--with-expat \
    +	--with-ssl="openssl" \
    +	--without-egd \
    +	--without-libproxy \
    +
    +CONFIGURE_VARS += \
    +	LDFLAGS="$$$$LDFLAGS -lcrypto -lssl"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/neon-config $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/neon $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libneon.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/neon.pc $(1)/usr/lib/pkgconfig/
    +	$(SED) 's,-I$$$${includedir}/,-I$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/neon-config
    +	$(SED) 's,-L$$$${libdir},,g' $(1)/usr/bin/neon-config
    +endef
    +
    +define Package/libneon/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libneon.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libneon))
    diff --git a/libs/neon/patches/001-automake-compat.patch b/libs/neon/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..f6ffa0f
    --- /dev/null
    +++ b/libs/neon/patches/001-automake-compat.patch
    @@ -0,0 +1,5 @@
    +--- /dev/null
    ++++ b/Makefile.am
    +@@ -0,0 +1,2 @@
    ++SUBDIRS = .
    ++ACLOCAL_AMFLAGS = -I macros
    diff --git a/libs/newt/Makefile b/libs/newt/Makefile
    new file mode 100644
    index 0000000..858c6e2
    --- /dev/null
    +++ b/libs/newt/Makefile
    @@ -0,0 +1,74 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +# Copyright (C) 2011 SMBPhone Inc.
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=newt
    +PKG_VERSION:=0.52.12
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=https://fedorahosted.org/releases/n/e/newt/
    +PKG_MD5SUM:=51b04128d9e1bf000fa769c417b74486
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libnewt
    +  URL:=http://fedorahosted.org/newt/
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Not Erik's Windowing Toolkit
    +  DEPENDS:= +libslang2 +libpopt
    +endef
    +
    +define Package/libnewt/description
    +  Programming library for colour text mode widget-based user interfaces,
    +  based on S-Lang.
    +endef
    +
    +define Package/whiptail
    +  URL:=http://fedorahosted.org/newt/
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  TITLE:=Dialog boxes from shell scripts
    +  DEPENDS:= +libnewt
    +endef
    +
    +define Package/whiptail/description
    +  A lightweight replacement for the dialog command (dialog boxes from shell
    +  scripts), based on libnewt.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC) -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib
    +
    +CONFIGURE_ARGS += \
    +	--disable-nls \
    +	--without-tcl \
    +	--without-gpm-support
    +
    +define Package/libnewt/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libnewt.so* $(1)/usr/lib/
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_BUILD_DIR)/newt.h $(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libnewt.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/whiptail/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/whiptail $(1)/usr/bin/	
    +endef
    +
    +$(eval $(call BuildPackage,libnewt))
    +$(eval $(call BuildPackage,whiptail))
    +
    diff --git a/libs/newt/patches/100-compile-fix-broken-makefile.patch b/libs/newt/patches/100-compile-fix-broken-makefile.patch
    new file mode 100644
    index 0000000..5fc45b8
    --- /dev/null
    +++ b/libs/newt/patches/100-compile-fix-broken-makefile.patch
    @@ -0,0 +1,60 @@
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -4,7 +4,7 @@ LIBTCL = -ltcl8.4
    + CC = @CC@
    + CPP = @CPP@
    + CFLAGS = @CFLAGS@
    +-CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@ 
    ++CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
    + 
    + SHLIBFLAGS= -Wl,--version-script,newt.0.52.ver
    + VERSION = @VERSION@
    +@@ -53,19 +53,19 @@ endif
    + all:	$(TARGET) _snackmodule.so
    + 
    + test:	test.o $(LIBNEWT)
    +-	$(CC) -g -o test test.o $(LIBNEWT) $(LIBS)
    ++	$(CC) $(CFLAGS) -g -o test test.o $(LIBNEWT) $(LIBS)
    + 
    + testgrid:	testgrid.o $(LIBNEWT)
    +-	$(CC) -g -o testgrid testgrid.o $(LIBNEWT) $(LIBS)
    ++	$(CC) $(CFLAGS) -g -o testgrid testgrid.o $(LIBNEWT) $(LIBS)
    + 
    + testtree:	testtree.o $(LIBNEWT)
    +-	$(CC) -g -o testtree testtree.o $(LIBNEWT) $(LIBS)
    ++	$(CC) $(CFLAGS) -g -o testtree testtree.o $(LIBNEWT) $(LIBS)
    + 
    + showchars:	showchars.o $(LIBNEWT)
    +-	$(CC) -g -o showchars showchars.o $(LIBNEWT) $(LIBS)
    ++	$(CC) $(CFLAGS) -g -o showchars showchars.o $(LIBNEWT) $(LIBS)
    + 
    + showkey:	showkey.o $(LIBNEWT)
    +-	$(CC) -g -o showkey showkey.o $(LIBNEWT) $(LIBS)
    ++	$(CC) $(CFLAGS) -g -o showkey showkey.o $(LIBNEWT) $(LIBS)
    + 
    + _snackmodule.so:   snackmodule.c $(LIBNEWTSH)
    + 	for ver in $(PYTHONVERS) ; do \
    +@@ -76,7 +76,7 @@ _snackmodule.so:   snackmodule.c $(LIBNE
    + 	touch $@
    + 
    + whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
    +-	$(CC) -g -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) -lpopt
    ++	$(CC) $(CFLAGS) -g -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) -lpopt
    + 
    + whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
    + 	$(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt  $(LIBTCL) -lpopt
    +@@ -102,12 +102,12 @@ $(SHAREDDIR):
    + sharedlib: $(LIBNEWTSH)
    + 
    + $(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
    +-	$(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) -Wl,-soname,$(LIBNEWTSONAME) $(SHAREDOBJS) $(LIBS)
    ++	$(CC) $(CFLAGS) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) -Wl,-soname,$(LIBNEWTSONAME) $(SHAREDOBJS) $(LIBS)
    + 	ln -fs $(LIBNEWTSONAME) libnewt.so
    + 	ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
    + 
    + $(SHAREDDIR)/%.o : %.c
    +-	$(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
    ++	$(CC) $(CFLAGS) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
    + 
    + install: $(LIBNEWT) install-sh whiptail
    + 	[ -d $(instroot)/$(bindir) ] || install -m 755 -d $(instroot)/$(bindir)
    diff --git a/libs/newt/patches/110-disable-snackmodule-python.patch b/libs/newt/patches/110-disable-snackmodule-python.patch
    new file mode 100644
    index 0000000..d043555
    --- /dev/null
    +++ b/libs/newt/patches/110-disable-snackmodule-python.patch
    @@ -0,0 +1,45 @@
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -50,7 +50,7 @@ else
    + TARGET=depend $(PROGS)
    + endif
    + 
    +-all:	$(TARGET) _snackmodule.so
    ++all:	$(TARGET)
    + 
    + test:	test.o $(LIBNEWT)
    + 	$(CC) $(CFLAGS) -g -o test test.o $(LIBNEWT) $(LIBS)
    +@@ -67,14 +67,6 @@ showchars:	showchars.o $(LIBNEWT)
    + showkey:	showkey.o $(LIBNEWT)
    + 	$(CC) $(CFLAGS) -g -o showkey showkey.o $(LIBNEWT) $(LIBS)
    + 
    +-_snackmodule.so:   snackmodule.c $(LIBNEWTSH)
    +-	for ver in $(PYTHONVERS) ; do \
    +-	    	mkdir -p $$ver ;\
    +-	        $(CC) $(CFLAGS) -I/usr/include/$$ver $(SHCFLAGS) -c -o $$ver/snackmodule.o snackmodule.c ;\
    +-		$(CC) --shared $(SHCFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L .  -lnewt ;\
    +-	done
    +-	touch $@
    +-
    + whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
    + 	$(CC) $(CFLAGS) -g -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) -lpopt
    + 
    +@@ -121,17 +113,12 @@ install: $(LIBNEWT) install-sh whiptail
    + 	make -C po datadir=$(instroot)/$(datadir) install
    + 	install -m 644 -D libnewt.pc $(instroot)/$(pkgconfigdir)/libnewt.pc
    + 
    +-install-sh: sharedlib $(WHIPTCLSO) _snackmodule.so
    ++install-sh: sharedlib $(WHIPTCLSO)
    + 	[ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
    + 	install -m 755 $(LIBNEWTSH) $(instroot)/$(libdir)
    + 	ln -sf $(LIBNEWTSONAME) $(instroot)/$(libdir)/libnewt.so
    + 	ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/$(LIBNEWTSONAME)
    + 	[ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.so $(instroot)/$(libdir) || :
    +-	for ver in $(PYTHONVERS) ; do \
    +-	   [ -d $(instroot)/$(libdir)/$$ver/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/$$ver/site-packages ;\
    +-	   install -m 755 $$ver/_snackmodule.so $(instroot)/$(libdir)/$$ver/site-packages ;\
    +-	   install -m 644 snack.py $(instroot)/$(libdir)/$$ver/site-packages ;\
    +-	done
    + 
    + Makefile: newt.spec
    + 	echo "You need to rerun ./configure before continuing"
    diff --git a/libs/nmeap/Makefile b/libs/nmeap/Makefile
    new file mode 100644
    index 0000000..9978e4b
    --- /dev/null
    +++ b/libs/nmeap/Makefile
    @@ -0,0 +1,41 @@
    +# 
    +# Copyright (C) 2007 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=nmeap
    +PKG_VERSION:=0.3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/nmeap
    +PKG_MD5SUM:=cbcc9fdf5176f9d6c9e48f27db443c4f
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libnmeap
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=extensible NMEA-0183 parser written in standard C
    +  URL:=http://www.dmh2000.com/nmea/nmeap.shtml
    +endef
    +
    +define Package/libnmeap/description
    +The NMEAP parser is intended for use in applications that need to input NMEA-0183 
    +	data from a GPS (typically over a serial port). NMEAP is a linkable library written in portable 
    +	standard C and is suitable for both desktop and embedded applications. 
    +	It is licensed under the BSD open source license.
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_BUILD_DIR)/inc/nmeap{,_def}.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/lib/libnmeap.a $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libnmeap))
    diff --git a/libs/nmeap/patches/100-no_test.patch b/libs/nmeap/patches/100-no_test.patch
    new file mode 100644
    index 0000000..891e2a8
    --- /dev/null
    +++ b/libs/nmeap/patches/100-no_test.patch
    @@ -0,0 +1,21 @@
    +--- nmeap-0.3/Makefile		2005-05-06 19:57:39.000000000 +0200
    ++++ nmeap-0.3.new/Makefile	2007-07-25 15:26:47.000000000 +0200
    +@@ -5,18 +5,15 @@
    + # directories
    + BASE :=$(shell pwd)
    + export SRC=$(BASE)/src
    +-export TST=$(BASE)/tst
    + export INC=$(BASE)/inc
    + export LIB=$(BASE)/lib
    + 
    + all :
    + 	cd $(SRC) && $(MAKE) all
    +-	cd $(TST) && $(MAKE) all
    + 	
    + 
    + clean :
    + 	cd $(SRC) && $(MAKE) clean
    +-	cd $(TST) && $(MAKE) clean
    + 	
    + doc  :
    + 	doxygen
    diff --git a/libs/opal/Makefile b/libs/opal/Makefile
    new file mode 100644
    index 0000000..e9df445
    --- /dev/null
    +++ b/libs/opal/Makefile
    @@ -0,0 +1,68 @@
    +# 
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=opal
    +PKG_VERSION:=3.2.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.bz2
    +PKG_SOURCE_URL:=@SF/opalvoip
    +PKG_MD5SUM:=405ba3b03ec706b6e6f873de340937e2
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
    +
    +# Set location of ptlib (Which needs to have been built already)
    +export PTLIBDIR=$(BUILD_DIR)/ptlib
    +export PTLIBPLUGINDIR=$(BUILD_DIR)/ptlib/plugins/ptlib/
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libopal
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+ptlib +uclibcxx
    +  TITLE:=Open Phone Abstraction Library
    +  URL:=http://www.opalvoip.org/
    +endef
    +
    +define Package/libopal/description
    +	Open Phone Abstraction Library, implementation of the ITU H.323
    +	teleconferencing protocol, and successor of the openh323 library. It
    +	supports not only the H.323 protocol but also SIP and IAX2.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-audio \
    +	--disable-video \
    +	--enable-sip \
    +	--enable-h323 \
    +	--disable-iax \
    +	--disable-h224 \
    +	--disable-h450 \
    +	--disable-h460 \
    +	--disable-ivr \
    +	--disable-rfc4175 \
    +	--disable-versioncheck \
    +	--enable-localgsm
    +
    +CONFIGURE_VARS += \
    +	CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti" \
    +
    +MAKE_FLAGS += \
    +	CFLAGS="$(TARGET_CFLAGS)" \
    +	CCFLAGS="$(TARGET_CFLAGS)" \
    +	optnoshared
    +
    +define Build/InstallDev
    +	ln -sf $(PKG_NAME)_$(PKG_VERSION) $(BUILD_DIR)/$(PKG_NAME)
    +endef
    +
    +$(eval $(call BuildPackage,libopal))
    diff --git a/libs/opal/patches/010-fix-gcc_4_3-compile.patch b/libs/opal/patches/010-fix-gcc_4_3-compile.patch
    new file mode 100644
    index 0000000..15d80b4
    --- /dev/null
    +++ b/libs/opal/patches/010-fix-gcc_4_3-compile.patch
    @@ -0,0 +1,25 @@
    +diff --git a/plugins/video/common/trace.cxx b/plugins/video/common/trace.cxx
    +index 7262478..de641af 100644
    +--- a/plugins/video/common/trace.cxx
    ++++ b/plugins/video/common/trace.cxx
    +@@ -30,6 +30,7 @@
    + /*****************************************************************************/
    + 
    + #include "trace.h"
    ++#include 
    + 
    + #ifdef __MACOSX__
    + #include 
    +diff --git a/plugins/video/H.263-ffmpeg/h263ffmpeg.cxx b/plugins/video/H.263-ffmpeg/h263ffmpeg.cxx
    +index 4a17b2c..a2f051c 100644
    +--- a/plugins/video/H.263-ffmpeg/h263ffmpeg.cxx
    ++++ b/plugins/video/H.263-ffmpeg/h263ffmpeg.cxx
    +@@ -54,6 +54,8 @@
    + #define _CRT_NONSTDC_NO_WARNINGS
    + #define _CRT_SECURE_NO_DEPRECATE
    + #include 
    ++#include 
    ++#include 
    + 
    + #include 
    + #ifdef _WIN32
    diff --git a/libs/opencdk/Makefile b/libs/opencdk/Makefile
    new file mode 100644
    index 0000000..dedef40
    --- /dev/null
    +++ b/libs/opencdk/Makefile
    @@ -0,0 +1,76 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=opencdk
    +PKG_VERSION:=0.6.6
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/attic/opencdk
    +PKG_MD5SUM:=813d62d7afe7b2c2d8f3df0a6c9d9331
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +PKG_INSTALL=1
    +
    +define Package/libopencdk
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libgcrypt zlib
    +  TITLE:=The Open Crypto Development Kit library
    +  URL:=ftp://ftp.gnutls.org/pub/gnutls/attic/opencdk/
    +endef
    +
    +define Package/libopencdk/description
    +	This library provides basic parts of the OpenPGP message format.
    +	For reference, please read the rfc2440.txt in the doc/ directory.
    +	Due to some possible security problems, the library also implements 
    +	parts of draft-ietf-openpgp-rfc2440bis-08.txt. If you want to exchange 
    +	messages with earlier PGP version < 7, you should use the compat mode.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +		--with-libgcrypt-prefix="$(STAGING_DIR)/usr" \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/opencdk-config \
    +		$(2)/bin/
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
    +		$(2)/bin/opencdk-config
    +
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/opencdk.h \
    +		$(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libopencdk.{la,so*} \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/libopencdk/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libopencdk.so.* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libopencdk))
    diff --git a/libs/opencdk/patches/100-fix-tests-build b/libs/opencdk/patches/100-fix-tests-build
    new file mode 100644
    index 0000000..c4df1a0
    --- /dev/null
    +++ b/libs/opencdk/patches/100-fix-tests-build
    @@ -0,0 +1,22 @@
    +--- a/tests/Makefile.am
    ++++ b/tests/Makefile.am
    +@@ -34,7 +34,7 @@
    + 
    + CLEANFILES = plain-test
    + 
    +-LDADD = ../src/libopencdk.la
    ++LDADD = ../src/libopencdk.la $(LIBGCRYPT_LIBS)
    + 
    + if HAVE_W32_SYSTEM
    + # there is a problem with some tests and WINE
    +--- a/tests/Makefile.in
    ++++ b/tests/Makefile.in
    +@@ -258,7 +258,7 @@
    + AM_LDFLAGS = -no-install
    + AM_CPPFLAGS = $(LIBGCRYPT_CFLAGS)
    + CLEANFILES = plain-test
    +-LDADD = ../src/libopencdk.la
    ++LDADD = ../src/libopencdk.la $(LIBGCRYPT_LIBS)
    + noinst_HEADER = t-support.h
    + all: all-am
    + 
    diff --git a/libs/opencdk/patches/200-verify-clearsigned.patch b/libs/opencdk/patches/200-verify-clearsigned.patch
    new file mode 100644
    index 0000000..a222aa8
    --- /dev/null
    +++ b/libs/opencdk/patches/200-verify-clearsigned.patch
    @@ -0,0 +1,13 @@
    +--- opencdk-0.6.6/src/stream.c	2007-11-08 19:31:45.000000000 +0100
    ++++ opencdk-0.6.6-my/src/stream.c	2011-01-17 20:30:19.000000000 +0100
    +@@ -1384,7 +1384,9 @@
    +   while (!cdk_stream_eof (s) && count > 0)
    +     {
    +       c = cdk_stream_getc (s);
    +-      if (c == EOF || c == '\r' || c == '\n' ) 
    ++      if (c == '\r')
    ++        c = cdk_stream_getc (s);
    ++      if (c == EOF || c == '\n' )
    + 	{
    + 	  buf[i++] = '\0';
    + 	  break;
    diff --git a/libs/openh323/Makefile b/libs/openh323/Makefile
    new file mode 100644
    index 0000000..665fb0d
    --- /dev/null
    +++ b/libs/openh323/Makefile
    @@ -0,0 +1,48 @@
    +# 
    +# Copyright (C) 2006-2007 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=openh323
    +PKG_VERSION:=cvs-20051230
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://trash.uid0.hu/openwrt/
    +PKG_MD5SUM:=ba1ffd45016f533bec2bb1539b78e43a
    +
    +PKG_BUILD_DEPENDS:=pwlib
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libopenh323
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=OpenH323 library
    +  URL:=http://openh323.sourceforge.net/
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-minsize \
    +	--enable-audio \
    +	--disable-video \
    +
    +CONFIGURE_VARS += \
    +	CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti" \
    +
    +MAKE_FLAGS += \
    +	CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
    +	CCFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
    +	optnoshared
    +
    +define Build/InstallDev
    +	ln -sf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR)/$(PKG_NAME)
    +endef
    +
    +$(eval $(call BuildPackage,libopenh323))
    diff --git a/libs/openh323/patches/001-configure.patch b/libs/openh323/patches/001-configure.patch
    new file mode 100644
    index 0000000..04ed8c5
    --- /dev/null
    +++ b/libs/openh323/patches/001-configure.patch
    @@ -0,0 +1,122 @@
    +--- openh323-cvs-20051230.orig/configure	2005-08-30 03:12:38.000000000 +0200
    ++++ openh323-cvs-20051230/configure	2005-12-30 11:29:57.000000000 +0100
    +@@ -3080,10 +3080,10 @@
    + if eval "test \"\${$as_ac_File+set}\" = set"; then
    +   echo $ECHO_N "(cached) $ECHO_C" >&6
    + else
    +-  test "$cross_compiling" = yes &&
    +-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    +-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    +-   { (exit 1); exit 1; }; }
    ++#  test "$cross_compiling" = yes &&
    ++#  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    ++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    ++#   { (exit 1); exit 1; }; }
    + if test -r "${PWLIBDIR}/version.h"; then
    +   eval "$as_ac_File=yes"
    + else
    +@@ -3104,10 +3104,10 @@
    + if eval "test \"\${$as_ac_File+set}\" = set"; then
    +   echo $ECHO_N "(cached) $ECHO_C" >&6
    + else
    +-  test "$cross_compiling" = yes &&
    +-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    +-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    +-   { (exit 1); exit 1; }; }
    ++#  test "$cross_compiling" = yes &&
    ++#  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    ++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    ++#   { (exit 1); exit 1; }; }
    + if test -r "${OPENH323DIR}/../pwlib/version.h"; then
    +   eval "$as_ac_File=yes"
    + else
    +@@ -3129,10 +3129,10 @@
    + if eval "test \"\${$as_ac_File+set}\" = set"; then
    +   echo $ECHO_N "(cached) $ECHO_C" >&6
    + else
    +-  test "$cross_compiling" = yes &&
    +-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    +-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    +-   { (exit 1); exit 1; }; }
    ++#  test "$cross_compiling" = yes &&
    ++#  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    ++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    ++#   { (exit 1); exit 1; }; }
    + if test -r "${HOME}/pwlib/include/ptlib.h"; then
    +   eval "$as_ac_File=yes"
    + else
    +@@ -3153,10 +3153,10 @@
    + if test "${ac_cv_file__usr_local_include_ptlib_h+set}" = set; then
    +   echo $ECHO_N "(cached) $ECHO_C" >&6
    + else
    +-  test "$cross_compiling" = yes &&
    +-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    +-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    +-   { (exit 1); exit 1; }; }
    ++#  test "$cross_compiling" = yes &&
    ++#  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    ++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    ++#   { (exit 1); exit 1; }; }
    + if test -r "/usr/local/include/ptlib.h"; then
    +   ac_cv_file__usr_local_include_ptlib_h=yes
    + else
    +@@ -3215,10 +3215,10 @@
    + if test "${ac_cv_file__usr_include_ptlib_h+set}" = set; then
    +   echo $ECHO_N "(cached) $ECHO_C" >&6
    + else
    +-  test "$cross_compiling" = yes &&
    +-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    +-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    +-   { (exit 1); exit 1; }; }
    ++#  test "$cross_compiling" = yes &&
    ++#  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    ++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    ++#   { (exit 1); exit 1; }; }
    + if test -r "/usr/include/ptlib.h"; then
    +   ac_cv_file__usr_include_ptlib_h=yes
    + else
    +@@ -3985,10 +3985,10 @@
    + if test "${ac_cv_file__usr_local_include_ffmpeg_avcodec_h+set}" = set; then
    +   echo $ECHO_N "(cached) $ECHO_C" >&6
    + else
    +-  test "$cross_compiling" = yes &&
    +-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    +-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    +-   { (exit 1); exit 1; }; }
    ++#  test "$cross_compiling" = yes &&
    ++#  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    ++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    ++#   { (exit 1); exit 1; }; }
    + if test -r "/usr/local/include/ffmpeg/avcodec.h"; then
    +   ac_cv_file__usr_local_include_ffmpeg_avcodec_h=yes
    + else
    +@@ -4193,10 +4193,10 @@
    + if test "${ac_cv_file__usr_local_lib_libvich263_so+set}" = set; then
    +   echo $ECHO_N "(cached) $ECHO_C" >&6
    + else
    +-  test "$cross_compiling" = yes &&
    +-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    +-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    +-   { (exit 1); exit 1; }; }
    ++#  test "$cross_compiling" = yes &&
    ++#  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    ++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    ++#   { (exit 1); exit 1; }; }
    + if test -r "/usr/local/lib/libvich263.so"; then
    +   ac_cv_file__usr_local_lib_libvich263_so=yes
    + else
    +@@ -4219,10 +4219,10 @@
    + if test "${ac_cv_file__usr_local_include_vich263_encoder_h263_h+set}" = set; then
    +   echo $ECHO_N "(cached) $ECHO_C" >&6
    + else
    +-  test "$cross_compiling" = yes &&
    +-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    +-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    +-   { (exit 1); exit 1; }; }
    ++#  test "$cross_compiling" = yes &&
    ++#  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    ++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    ++#   { (exit 1); exit 1; }; }
    + if test -r "/usr/local/include/vich263/encoder-h263.h"; then
    +   ac_cv_file__usr_local_include_vich263_encoder_h263_h=yes
    + else
    diff --git a/libs/openldap/Makefile b/libs/openldap/Makefile
    new file mode 100644
    index 0000000..6165d1f
    --- /dev/null
    +++ b/libs/openldap/Makefile
    @@ -0,0 +1,149 @@
    +# 
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=openldap
    +PKG_VERSION:=2.4.23
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
    +PKG_SOURCE_URL:=ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/ \
    +	ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/openldap-release/ \
    +	ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/ \
    +	ftp://ftp.plig.org/pub/OpenLDAP/openldap-release/
    +PKG_MD5SUM:=90150b8c0d0192e10b30157e68844ddf
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/openldap/Default
    +  TITLE:=LDAP implementation
    +  URL:=http://www.openldap.org/
    +  MAINTAINER:=W. Michael Petullo 
    +endef
    +
    +define Package/libopenldap
    +  $(call Package/openldap/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libopenssl +libsasl2
    +  TITLE+= (libraries)
    +endef
    +
    +define Package/libopenldap/description
    +	OpenLDAP Software is an open source implementation of the 
    +	Lightweight Directory Access Protocol (LDAP).	
    +	This package contains the shared LDAP client libraries, needed by other programs.
    +endef
    +
    +define Package/libopenldap/conffiles
    +/etc/openldap/ldap.conf
    +endef
    +
    +define Package/openldap-utils
    +  $(call Package/openldap/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+libopenldap
    +  TITLE+= (utilities)
    +endef
    +
    +define Package/openldap-utils/description
    +	OpenLDAP Software is an open source implementation of the 
    +	Lightweight Directory Access Protocol (LDAP).	
    +	This package contains client programs required to access LDAP servers.
    +endef
    +
    +define Package/openldap-server
    +  $(call Package/openldap/Default)
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libopenldap
    +  TITLE+= (server)
    +endef
    +
    +define Package/openldap-server/description
    +	OpenLDAP Software is an open source implementation of the 
    +	Lightweight Directory Access Protocol (LDAP).	
    +	This package contains server programs required to provide LDAP services.
    +endef
    +
    +define Package/openldap-server/conffiles
    +/etc/openldap/slapd.conf
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--disable-debug \
    +	--enable-dynamic \
    +	--enable-syslog \
    +	--disable-local \
    +	--disable-slurpd \
    +	--with-cyrus-sasl \
    +	--without-fetch \
    +	--with-threads \
    +	--with-tls \
    +	--with-yielding_select="yes" \
    +	--without-cyrus-sasl \
    +	--without-threads \
    +	--without-tls \
    +	--enable-null \
    +	--disable-bdb \
    +	--disable-hdb \
    +	--disable-monitor \
    +	--disable-relay
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		HOSTCC="$(HOSTCC)" \
    +		depend all install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libopenldap/install
    +	$(INSTALL_DIR) $(1)/etc/openldap
    +	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(1)/etc/openldap/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(1)/usr/lib/
    +endef
    +	
    +define Package/openldap-utils/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(1)/usr/bin/
    +endef
    +	
    +define Package/openldap-server/install
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/ldap.init $(1)/etc/init.d/ldap
    +	$(INSTALL_DIR) $(1)/etc/openldap/ldif
    +	$(INSTALL_DIR) $(1)/etc/openldap/schema
    +	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/schema/* $(1)/etc/openldap/schema/
    +	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/slapd.conf $(1)/etc/openldap/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	# XXX: OpenLDAP installs slapd into libexecdir, not sbindir:
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/slapd $(1)/usr/sbin/
    +	# XXX: switch default backend to ldif, since bdb is disabled
    +	$(SED) 's|^\(database\)\([ \t]\+\)bdb|\1\2ldif|g' \
    +	    -e 's|^\(index\)|#\1|g' \
    +	    $(1)/etc/openldap/slapd.conf
    +endef
    +
    +$(eval $(call BuildPackage,libopenldap))
    +$(eval $(call BuildPackage,openldap-utils))
    +$(eval $(call BuildPackage,openldap-server))
    diff --git a/libs/openldap/files/ldap.init b/libs/openldap/files/ldap.init
    new file mode 100644
    index 0000000..dd14b21
    --- /dev/null
    +++ b/libs/openldap/files/ldap.init
    @@ -0,0 +1,14 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2009-2011 OpenWrt.org
    +
    +START=60
    +
    +start() {
    +	mkdir -p /var/openldap-data
    +	
    +	/usr/sbin/slapd
    +}
    +
    +stop() {
    +	killall slapd 2> /dev/null
    +}
    diff --git a/libs/openldap/patches/001-automake-compat.patch b/libs/openldap/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..4ab2622
    --- /dev/null
    +++ b/libs/openldap/patches/001-automake-compat.patch
    @@ -0,0 +1,312 @@
    +--- /dev/null
    ++++ b/Makefile.am
    +@@ -0,0 +1 @@
    ++SUBDIRS = include libraries clients servers tests doc
    +--- a/libraries/Makefile.in
    ++++ b/libraries/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SUBDIRS= \
    + 	liblutil \
    + 	liblber \
    +--- a/libraries/liblber/Makefile.in
    ++++ b/libraries/liblber/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + LIBRARY = liblber.la
    + 
    + NT_SRCS = nt_err.c
    +--- a/libraries/libldap/Makefile.in
    ++++ b/libraries/libldap/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + LIBRARY = libldap.la
    + 
    + PROGRAMS = apitest dntest ftest ltest urltest
    +--- a/libraries/libldap_r/Makefile.in
    ++++ b/libraries/libldap_r/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + LIBRARY = libldap_r.la
    + 
    + PROGRAMS = apitest ltest
    +--- a/libraries/liblunicode/Makefile.in
    ++++ b/libraries/liblunicode/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + LIBRARY = liblunicode.a
    + 
    + XXDIR = $(srcdir)/ucdata/
    +--- a/libraries/liblutil/Makefile.in
    ++++ b/libraries/liblutil/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + LIBRARY	= liblutil.a
    + PROGRAM = testavl
    + 
    +--- a/libraries/librewrite/Makefile.in
    ++++ b/libraries/librewrite/Makefile.in
    +@@ -16,6 +16,8 @@
    + ## Copyright 2000-2001 Pierangelo Masarati 
    + ##
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS = config.c context.c info.c ldapmap.c map.c params.c rule.c \
    + 	session.c subst.c var.c xmap.c \
    + 	parse.c rewrite.c
    +--- a/clients/tools/Makefile.in
    ++++ b/clients/tools/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS	= ldapsearch.c ldapmodify.c ldapdelete.c ldapmodrdn.c \
    + 		ldappasswd.c ldapwhoami.c ldapcompare.c \
    + 		ldapexop.c ldapurl.c common.c
    +--- a/servers/slapd/Makefile.in
    ++++ b/servers/slapd/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SLAPTOOLS=slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl slapschema
    + PROGRAMS=slapd $(SLAPTOOLS)
    + XPROGRAMS=sslapd libbackends.a .backend liboverlays.a
    +--- a/servers/slapd/overlays/Makefile.in
    ++++ b/servers/slapd/overlays/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS = overlays.c \
    + 	accesslog.c \
    + 	auditlog.c \
    +--- a/tests/progs/Makefile.in
    ++++ b/tests/progs/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + PROGRAMS = slapd-tester slapd-search slapd-read slapd-addel slapd-modrdn \
    + 		slapd-modify slapd-bind ldif-filter
    + 
    +--- a/servers/slapd/back-bdb/Makefile.in
    ++++ b/servers/slapd/back-bdb/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS = init.c tools.c config.c \
    + 	add.c bind.c compare.c delete.c modify.c modrdn.c search.c \
    + 	extended.c referral.c operational.c \
    +--- a/servers/slapd/back-dnssrv/Makefile.in
    ++++ b/servers/slapd/back-dnssrv/Makefile.in
    +@@ -18,6 +18,8 @@
    + #  The DNSSRV backend was written by Kurt D. Zeilenga.
    + #
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS	= init.c bind.c search.c config.c referral.c
    + OBJS	= init.lo bind.lo search.lo config.lo referral.lo
    + 
    +--- a/servers/slapd/back-hdb/Makefile.in
    ++++ b/servers/slapd/back-hdb/Makefile.in
    +@@ -15,6 +15,8 @@
    + #
    + ## Copyright 2003 Howard Chu @ Symas Corp. See master COPYRIGHT file for terms.
    + 
    ++SHELL = @SHELL@
    ++
    + XXDIR = $(srcdir)/../back-bdb
    + 
    + XXSRCS = init.c tools.c config.c \
    +--- a/servers/slapd/back-ldap/Makefile.in
    ++++ b/servers/slapd/back-ldap/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS	= init.c config.c search.c bind.c unbind.c add.c compare.c \
    + 		delete.c modify.c modrdn.c extended.c chain.c \
    + 		distproc.c monitor.c pbind.c
    +--- a/servers/slapd/back-ldif/Makefile.in
    ++++ b/servers/slapd/back-ldif/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS = ldif.c
    + OBJS = ldif.lo
    + 
    +--- a/servers/slapd/back-meta/Makefile.in
    ++++ b/servers/slapd/back-meta/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS	= init.c config.c search.c bind.c unbind.c add.c compare.c \
    + 		delete.c modify.c modrdn.c suffixmassage.c map.c \
    + 		conn.c candidates.c dncache.c
    +--- a/servers/slapd/back-monitor/Makefile.in
    ++++ b/servers/slapd/back-monitor/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS = init.c search.c compare.c modify.c bind.c \
    + 	operational.c \
    + 	cache.c entry.c \
    +--- a/servers/slapd/back-ndb/Makefile.in
    ++++ b/servers/slapd/back-ndb/Makefile.in
    +@@ -17,6 +17,8 @@
    + ## This work was initially developed by Howard Chu for inclusion
    + ## in OpenLDAP Software. This work was sponsored by MySQL.
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS = init.cpp tools.cpp config.cpp ndbio.cpp \
    + 	add.cpp bind.cpp compare.cpp delete.cpp modify.cpp modrdn.cpp search.cpp
    + 
    +--- a/servers/slapd/back-null/Makefile.in
    ++++ b/servers/slapd/back-null/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS = null.c
    + OBJS = null.lo
    + 
    +--- a/servers/slapd/back-passwd/Makefile.in
    ++++ b/servers/slapd/back-passwd/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS	= search.c config.c init.c
    + OBJS	= search.lo config.lo init.lo
    + 
    +--- a/servers/slapd/back-perl/Makefile.in
    ++++ b/servers/slapd/back-perl/Makefile.in
    +@@ -14,6 +14,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS	= init.c search.c close.c config.c bind.c compare.c \
    + 		modify.c add.c modrdn.c delete.c
    + OBJS	= init.lo search.lo close.lo config.lo bind.lo compare.lo \
    +--- a/servers/slapd/back-relay/Makefile.in
    ++++ b/servers/slapd/back-relay/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS	= init.c op.c
    + OBJS	= init.lo op.lo
    + 
    +--- a/servers/slapd/back-shell/Makefile.in
    ++++ b/servers/slapd/back-shell/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS	= init.c config.c fork.c search.c bind.c unbind.c add.c \
    + 		delete.c modify.c modrdn.c compare.c result.c
    + OBJS	= init.lo config.lo fork.lo search.lo bind.lo unbind.lo add.lo \
    +--- a/servers/slapd/back-sock/Makefile.in
    ++++ b/servers/slapd/back-sock/Makefile.in
    +@@ -17,6 +17,8 @@
    + ## This work was initially developed by Brian Candler for inclusion
    + ## in OpenLDAP Software.
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS	= init.c config.c opensock.c search.c bind.c unbind.c add.c \
    + 		delete.c modify.c modrdn.c compare.c result.c
    + OBJS	= init.lo config.lo opensock.lo search.lo bind.lo unbind.lo add.lo \
    +--- a/servers/slapd/back-sql/Makefile.in
    ++++ b/servers/slapd/back-sql/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + SRCS	= init.c config.c search.c bind.c compare.c operational.c \
    + 		entry-id.c schema-map.c sql-wrap.c modify.c util.c \
    + 		add.c delete.c modrdn.c api.c
    +--- a/servers/slapd/shell-backends/Makefile.in
    ++++ b/servers/slapd/shell-backends/Makefile.in
    +@@ -13,6 +13,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + PROGRAMS = passwd-shell
    + 
    + SRCS = passwd-shell.c shellutil.c
    +--- a/servers/slapd/slapi/Makefile.in
    ++++ b/servers/slapd/slapi/Makefile.in
    +@@ -14,6 +14,8 @@
    + ## top-level directory of the distribution or, alternatively, at
    + ## .
    + 
    ++SHELL = @SHELL@
    ++
    + LIBRARY = libslapi.la
    + 
    + #all-common: $(LIBRARY) $(PROGRAMS)
    diff --git a/libs/openldap/patches/020-autofs-schema.patch b/libs/openldap/patches/020-autofs-schema.patch
    new file mode 100644
    index 0000000..093270f
    --- /dev/null
    +++ b/libs/openldap/patches/020-autofs-schema.patch
    @@ -0,0 +1,26 @@
    +--- /dev/null
    ++++ b/servers/slapd/schema/autofs.schema
    +@@ -0,0 +1,23 @@
    ++attributetype ( 1.3.6.1.1.1.1.31 NAME 'automountMapName'
    ++	DESC 'Automount map name'
    ++	EQUALITY caseExactMatch
    ++	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
    ++			
    ++attributetype ( 1.3.6.1.1.1.1.32 NAME 'automountKey'
    ++	DESC 'Automount key value'
    ++	EQUALITY caseExactMatch
    ++	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
    ++			
    ++attributetype ( 1.3.6.1.1.1.1.33 NAME 'automountInformation'
    ++	DESC 'Automount information'
    ++	EQUALITY caseExactMatch
    ++	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
    ++			
    ++objectclass ( 1.3.6.1.1.1.2.16 NAME 'automountMap' SUP top STRUCTURAL
    ++	MUST ( automountMapName )
    ++	MAY ( description ) )
    ++					
    ++objectclass ( 1.3.6.1.1.1.2.17 NAME 'automount' SUP top STRUCTURAL
    ++	DESC 'Automount'
    ++	MUST ( automountKey $ automountInformation )
    ++	MAY description )
    diff --git a/libs/openldap/patches/750-no-strip.patch b/libs/openldap/patches/750-no-strip.patch
    new file mode 100644
    index 0000000..e771dcb
    --- /dev/null
    +++ b/libs/openldap/patches/750-no-strip.patch
    @@ -0,0 +1,22 @@
    +--- a/clients/tools/Makefile.in
    ++++ b/clients/tools/Makefile.in
    +@@ -122,7 +122,7 @@ install-local:	FORCE
    + 	-$(MKDIR) $(DESTDIR)$(bindir)
    + 	@(								\
    + 	    for prg in $(PROGRAMS); do					\
    +-		$(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 $$prg$(EXEEXT)	\
    ++		$(LTINSTALL) $(INSTALLFLAGS) -m 755 $$prg$(EXEEXT)	\
    + 		    $(DESTDIR)$(bindir);				\
    + 	    done							\
    + 	)
    +--- a/servers/slapd/Makefile.in
    ++++ b/servers/slapd/Makefile.in
    +@@ -377,7 +377,7 @@ install-local-srv: install-slapd install
    + install-slapd: FORCE
    + 	-$(MKDIR) $(DESTDIR)$(libexecdir)
    + 	-$(MKDIR) $(DESTDIR)$(localstatedir)/run
    +-	$(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 \
    ++	$(LTINSTALL) $(INSTALLFLAGS) -m 755 \
    + 		slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
    + 	@for i in $(SUBDIRS); do \
    + 	    if test -d $$i && test -f $$i/Makefile ; then \
    diff --git a/libs/orbit2/Makefile b/libs/orbit2/Makefile
    new file mode 100644
    index 0000000..300ec70
    --- /dev/null
    +++ b/libs/orbit2/Makefile
    @@ -0,0 +1,103 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=orbit2
    +PKG_VERSION:=2.14.16
    +PKG_RELEASE:=1
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/ORBit2-$(PKG_VERSION)
    +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/ORBit2-$(PKG_VERSION)
    +PKG_SOURCE:=ORBit2-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@GNOME/ORBit2/2.14
    +#PKG_MD5SUM:=d7fb9eb41e8196f1aacf2f08375ae555
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/host-build.mk
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +PKG_INSTALL:=1
    +
    +HOST_BUILD_DEPENDS:=libIDL2/host
    +PKG_BUILD_DEPENDS:=orbit2/host
    +
    +BIGENDIAN=no
    +ifeq ($(CONFIG_BIG_ENDIAN),y)
    +	BIGENDIAN:=yes
    +endif
    +
    +CONFIGURE_VARS += \
    +	ac_cv_c_bigendian=$(BIGENDIAN) \
    +	ac_cv_alignof_CORBA_octet=1 \
    +	ac_cv_alignof_CORBA_boolean=1 \
    +	ac_cv_alignof_CORBA_char=1 \
    +	ac_cv_alignof_CORBA_wchar=2 \
    +	ac_cv_alignof_CORBA_short=2 \
    +	ac_cv_alignof_CORBA_long=4 \
    +	ac_cv_alignof_CORBA_long_long=4 \
    +	ac_cv_alignof_CORBA_float=4 \
    +	ac_cv_alignof_CORBA_double=4 \
    +	ac_cv_alignof_CORBA_long_double=4 \
    +	ac_cv_alignof_CORBA_struct=1 \
    +	ac_cv_alignof_CORBA_pointer=4
    +
    +define Package/orbit2
    +  SECTION:=xorg-libraries
    +  CATEGORY:=Xorg
    +  SUBMENU:=libraries
    +  TITLE:=ORBit2
    +  URL:=http://www.gnome.org/projects/ORBit2/
    +  DEPENDS:=+glib2 +libIDL2
    +endef
    +
    +define Package/orbit2/description
    +ORBit2 is a CORBA 2.4-compliant Object Request Broker (ORB).
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default)
    +	find $(PKG_BUILD_DIR) -name Makefile -exec sed -i 's,IDL_COMPILER.*orbit-idl-2,IDL_COMPILER = $(STAGING_DIR_HOST)/bin/orbit-idl-2,g' {} \; # tell orbit2 to use the host-built idl-compiler
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/{include/orbit-2.0,lib/pkgconfig}
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
    +		$(1)/usr/lib/pkgconfig/
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/orbit-2.0/* \
    +		$(1)/usr/include/orbit-2.0/
    +
    +	$(INSTALL_DIR) $(1)/usr/share/aclocal
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/share/aclocal/* \
    +		$(1)/usr/share/aclocal/
    +
    +	$(INSTALL_DIR) $(1)/usr/share/idl/orbit-2.0
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/share/idl/orbit-2.0/* \
    +		$(1)/usr/share/idl/orbit-2.0/
    +endef
    +
    +define Package/orbit2/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libORBit*.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call HostBuild))
    +$(eval $(call BuildPackage,orbit2))
    diff --git a/libs/orbit2/patches/001-remove-libtool.patch b/libs/orbit2/patches/001-remove-libtool.patch
    new file mode 100644
    index 0000000..fe83674
    --- /dev/null
    +++ b/libs/orbit2/patches/001-remove-libtool.patch
    @@ -0,0 +1,6648 @@
    +--- a/aclocal.m4
    ++++ b/aclocal.m4
    +@@ -59,6645 +59,6 @@ AC_DEFUN([GTK_DOC_CHECK],
    +   AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
    + ])
    + 
    +-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
    +-
    +-# serial 52 AC_PROG_LIBTOOL
    +-
    +-
    +-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
    +-# -----------------------------------------------------------
    +-# If this macro is not defined by Autoconf, define it here.
    +-m4_ifdef([AC_PROVIDE_IFELSE],
    +-         [],
    +-         [m4_define([AC_PROVIDE_IFELSE],
    +-	         [m4_ifdef([AC_PROVIDE_$1],
    +-		           [$2], [$3])])])
    +-
    +-
    +-# AC_PROG_LIBTOOL
    +-# ---------------
    +-AC_DEFUN([AC_PROG_LIBTOOL],
    +-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
    +-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
    +-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
    +-  AC_PROVIDE_IFELSE([AC_PROG_CXX],
    +-    [AC_LIBTOOL_CXX],
    +-    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
    +-  ])])
    +-dnl And a similar setup for Fortran 77 support
    +-  AC_PROVIDE_IFELSE([AC_PROG_F77],
    +-    [AC_LIBTOOL_F77],
    +-    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
    +-])])
    +-
    +-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
    +-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
    +-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
    +-  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
    +-    [AC_LIBTOOL_GCJ],
    +-    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
    +-      [AC_LIBTOOL_GCJ],
    +-      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
    +-	[AC_LIBTOOL_GCJ],
    +-      [ifdef([AC_PROG_GCJ],
    +-	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
    +-       ifdef([A][M_PROG_GCJ],
    +-	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
    +-       ifdef([LT_AC_PROG_GCJ],
    +-	     [define([LT_AC_PROG_GCJ],
    +-		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
    +-])])# AC_PROG_LIBTOOL
    +-
    +-
    +-# _AC_PROG_LIBTOOL
    +-# ----------------
    +-AC_DEFUN([_AC_PROG_LIBTOOL],
    +-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
    +-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
    +-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
    +-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
    +-
    +-# This can be used to rebuild libtool when needed
    +-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
    +-
    +-# Always use our own libtool.
    +-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
    +-AC_SUBST(LIBTOOL)dnl
    +-
    +-# Prevent multiple expansion
    +-define([AC_PROG_LIBTOOL], [])
    +-])# _AC_PROG_LIBTOOL
    +-
    +-
    +-# AC_LIBTOOL_SETUP
    +-# ----------------
    +-AC_DEFUN([AC_LIBTOOL_SETUP],
    +-[AC_PREREQ(2.50)dnl
    +-AC_REQUIRE([AC_ENABLE_SHARED])dnl
    +-AC_REQUIRE([AC_ENABLE_STATIC])dnl
    +-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
    +-AC_REQUIRE([AC_CANONICAL_HOST])dnl
    +-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
    +-AC_REQUIRE([AC_PROG_CC])dnl
    +-AC_REQUIRE([AC_PROG_LD])dnl
    +-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
    +-AC_REQUIRE([AC_PROG_NM])dnl
    +-
    +-AC_REQUIRE([AC_PROG_LN_S])dnl
    +-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
    +-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
    +-AC_REQUIRE([AC_OBJEXT])dnl
    +-AC_REQUIRE([AC_EXEEXT])dnl
    +-dnl
    +-AC_LIBTOOL_SYS_MAX_CMD_LEN
    +-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
    +-AC_LIBTOOL_OBJDIR
    +-
    +-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
    +-_LT_AC_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.
    +-Xsed='sed -e 1s/^X//'
    +-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
    +-
    +-# Same as above, but do not quote variable references.
    +-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
    +-
    +-# 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 avoid accidental globbing in evaled expressions
    +-no_glob_subst='s/\*/\\\*/g'
    +-
    +-# Constants:
    +-rm="rm -f"
    +-
    +-# Global variables:
    +-default_ofile=libtool
    +-can_build_shared=yes
    +-
    +-# All known linkers require a `.a' archive for static linking (except MSVC,
    +-# which needs '.lib').
    +-libext=a
    +-ltmain="$ac_aux_dir/ltmain.sh"
    +-ofile="$default_ofile"
    +-with_gnu_ld="$lt_cv_prog_gnu_ld"
    +-
    +-AC_CHECK_TOOL(AR, ar, false)
    +-AC_CHECK_TOOL(RANLIB, ranlib, :)
    +-AC_CHECK_TOOL(STRIP, strip, :)
    +-
    +-old_CC="$CC"
    +-old_CFLAGS="$CFLAGS"
    +-
    +-# Set sane defaults for various variables
    +-test -z "$AR" && AR=ar
    +-test -z "$AR_FLAGS" && AR_FLAGS=cru
    +-test -z "$AS" && AS=as
    +-test -z "$CC" && CC=cc
    +-test -z "$LTCC" && LTCC=$CC
    +-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
    +-test -z "$DLLTOOL" && DLLTOOL=dlltool
    +-test -z "$LD" && LD=ld
    +-test -z "$LN_S" && LN_S="ln -s"
    +-test -z "$MAGIC_CMD" && MAGIC_CMD=file
    +-test -z "$NM" && NM=nm
    +-test -z "$SED" && SED=sed
    +-test -z "$OBJDUMP" && OBJDUMP=objdump
    +-test -z "$RANLIB" && RANLIB=:
    +-test -z "$STRIP" && STRIP=:
    +-test -z "$ac_objext" && ac_objext=o
    +-
    +-# 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_CC_BASENAME([$compiler])
    +-
    +-# Only perform the check for file, if the check method requires it
    +-case $deplibs_check_method in
    +-file_magic*)
    +-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
    +-    AC_PATH_MAGIC
    +-  fi
    +-  ;;
    +-esac
    +-
    +-_LT_REQUIRED_DARWIN_CHECKS
    +-
    +-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
    +-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
    +-enable_win32_dll=yes, enable_win32_dll=no)
    +-
    +-AC_ARG_ENABLE([libtool-lock],
    +-    [AC_HELP_STRING([--disable-libtool-lock],
    +-	[avoid locking (might break parallel builds)])])
    +-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
    +-
    +-AC_ARG_WITH([pic],
    +-    [AC_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=default
    +-
    +-# Use C for the default configuration in the libtool script
    +-tagname=
    +-AC_LIBTOOL_LANG_C_CONFIG
    +-_LT_AC_TAGCONFIG
    +-])# AC_LIBTOOL_SETUP
    +-
    +-
    +-# _LT_AC_SYS_COMPILER
    +-# -------------------
    +-AC_DEFUN([_LT_AC_SYS_COMPILER],
    +-[AC_REQUIRE([AC_PROG_CC])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_AC_SYS_COMPILER
    +-
    +-
    +-# _LT_CC_BASENAME(CC)
    +-# -------------------
    +-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
    +-AC_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_COMPILER_BOILERPLATE
    +-# ------------------------
    +-# Check for compiler boilerplate output or warnings with
    +-# the simple compiler test code.
    +-AC_DEFUN([_LT_COMPILER_BOILERPLATE],
    +-[AC_REQUIRE([LT_AC_PROG_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.
    +-AC_DEFUN([_LT_LINKER_BOILERPLATE],
    +-[AC_REQUIRE([LT_AC_PROG_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
    +-# --------------------------
    +-# Check for some things on darwin
    +-AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
    +-  case $host_os in
    +-    rhapsody* | darwin*)
    +-    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
    +-    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
    +-
    +-    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.
    +-   echo "int foo(void){return 1;}" > conftest.c
    +-   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
    +-     -dynamiclib ${wl}-single_module conftest.c
    +-   if test -f libconftest.dylib; then
    +-     lt_cv_apple_cc_single_mod=yes
    +-     rm -rf libconftest.dylib*
    +-   fi
    +-   rm conftest.c
    +-      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.[[0123]])
    +-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
    +-    darwin1.*)
    +-     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
    +-    darwin*)
    +-      # 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_AC_SYS_LIBPATH_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.
    +-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
    +-[AC_REQUIRE([LT_AC_PROG_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_AC_SYS_LIBPATH_AIX
    +-
    +-
    +-# _LT_AC_SHELL_INIT(ARG)
    +-# ----------------------
    +-AC_DEFUN([_LT_AC_SHELL_INIT],
    +-[ifdef([AC_DIVERSION_NOTICE],
    +-	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
    +-	 [AC_DIVERT_PUSH(NOTICE)])
    +-$1
    +-AC_DIVERT_POP
    +-])# _LT_AC_SHELL_INIT
    +-
    +-
    +-# _LT_AC_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.
    +-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
    +-[_LT_AC_SHELL_INIT([
    +-# Check that we are running under the correct shell.
    +-SHELL=${CONFIG_SHELL-/bin/sh}
    +-
    +-case X$ECHO in
    +-X*--fallback-echo)
    +-  # Remove one level of quotation (which was required for Make).
    +-  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
    +-  ;;
    +-esac
    +-
    +-echo=${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 </dev/null 2>&1 && unset CDPATH
    +-
    +-if test -z "$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 &&
    +-       echo_test_string=`eval $cmd` &&
    +-       (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.
    +-ECHO=$echo
    +-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
    +-   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
    +-fi
    +-
    +-AC_SUBST(ECHO)
    +-])])# _LT_AC_PROG_ECHO_BACKSLASH
    +-
    +-
    +-# _LT_AC_LOCK
    +-# -----------
    +-AC_DEFUN([_LT_AC_LOCK],
    +-[AC_ARG_ENABLE([libtool-lock],
    +-    [AC_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*|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*)
    +-      libsuff=64
    +-      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*)
    +-          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_TRY_LINK([],[],[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*
    +-  ;;
    +-
    +-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
    +-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
    +-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
    +-  AC_CHECK_TOOL(AS, as, false)
    +-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
    +-  ;;
    +-  ])
    +-esac
    +-
    +-need_locks="$enable_libtool_lock"
    +-
    +-])# _LT_AC_LOCK
    +-
    +-
    +-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
    +-#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
    +-# ----------------------------------------------------------------
    +-# Check whether the given compiler option works
    +-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
    +-[AC_REQUIRE([LT_AC_PROG_SED])
    +-AC_CACHE_CHECK([$1], [$2],
    +-  [$2=no
    +-  ifelse([$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
    +-    ifelse([$5], , :, [$5])
    +-else
    +-    ifelse([$6], , :, [$6])
    +-fi
    +-])# AC_LIBTOOL_COMPILER_OPTION
    +-
    +-
    +-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
    +-#                          [ACTION-SUCCESS], [ACTION-FAILURE])
    +-# ------------------------------------------------------------
    +-# Check whether the given compiler option works
    +-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
    +-[AC_REQUIRE([LT_AC_PROG_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
    +-    ifelse([$4], , :, [$4])
    +-else
    +-    ifelse([$5], , :, [$5])
    +-fi
    +-])# AC_LIBTOOL_LINKER_OPTION
    +-
    +-
    +-# AC_LIBTOOL_SYS_MAX_CMD_LEN
    +-# --------------------------
    +-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
    +-[# 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*)
    +-    # 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
    +-      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
    +-      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
    +-	       = "XX$teststring") >/dev/null 2>&1 &&
    +-	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
    +-	      lt_cv_sys_max_cmd_len=$new_result &&
    +-	      test $i != 17 # 1/2 MB should be enough
    +-      do
    +-        i=`expr $i + 1`
    +-        teststring=$teststring$teststring
    +-      done
    +-      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
    +-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
    +-
    +-
    +-# _LT_AC_CHECK_DLFCN
    +-# ------------------
    +-AC_DEFUN([_LT_AC_CHECK_DLFCN],
    +-[AC_CHECK_HEADERS(dlfcn.h)dnl
    +-])# _LT_AC_CHECK_DLFCN
    +-
    +-
    +-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
    +-#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
    +-# ---------------------------------------------------------------------
    +-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
    +-[AC_REQUIRE([_LT_AC_CHECK_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 <
    +-#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
    +-
    +-#ifdef __cplusplus
    +-extern "C" void exit (int);
    +-#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 ());
    +-
    +-    exit (status);
    +-}]
    +-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_AC_TRY_DLOPEN_SELF
    +-
    +-
    +-# AC_LIBTOOL_DLOPEN_SELF
    +-# ----------------------
    +-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
    +-[AC_REQUIRE([_LT_AC_CHECK_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*)
    +-    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_AC_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_AC_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
    +-])# AC_LIBTOOL_DLOPEN_SELF
    +-
    +-
    +-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
    +-# ---------------------------------
    +-# Check to see if options -c and -o are simultaneously supported by compiler
    +-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
    +-[AC_REQUIRE([LT_AC_PROG_SED])dnl
    +-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
    +-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    +-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
    +-  [_LT_AC_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_AC_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 ..
    +-   rmdir conftest
    +-   $rm conftest*
    +-])
    +-])# AC_LIBTOOL_PROG_CC_C_O
    +-
    +-
    +-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
    +-# -----------------------------------------
    +-# Check to see if we can do hard links to lock some files if needed
    +-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
    +-[AC_REQUIRE([_LT_AC_LOCK])dnl
    +-
    +-hard_links="nottested"
    +-if test "$_LT_AC_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
    +-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
    +-
    +-
    +-# AC_LIBTOOL_OBJDIR
    +-# -----------------
    +-AC_DEFUN([AC_LIBTOOL_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
    +-])# AC_LIBTOOL_OBJDIR
    +-
    +-
    +-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
    +-# ----------------------------------------------
    +-# Check hardcoding attributes.
    +-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
    +-[AC_MSG_CHECKING([how to hardcode library paths into programs])
    +-_LT_AC_TAGVAR(hardcode_action, $1)=
    +-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
    +-   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
    +-   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
    +-
    +-  # We can hardcode non-existant directories.
    +-  if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
    +-     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
    +-    # Linking always hardcodes the temporary library directory.
    +-    _LT_AC_TAGVAR(hardcode_action, $1)=relink
    +-  else
    +-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
    +-    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
    +-  fi
    +-else
    +-  # We cannot hardcode anything, or else we can only hardcode existing
    +-  # directories.
    +-  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
    +-fi
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
    +-
    +-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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
    +-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
    +-
    +-
    +-# AC_LIBTOOL_SYS_LIB_STRIP
    +-# ------------------------
    +-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
    +-[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
    +-])# AC_LIBTOOL_SYS_LIB_STRIP
    +-
    +-
    +-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
    +-# -----------------------------
    +-# PORTME Fill in your ld.so characteristics
    +-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
    +-[AC_REQUIRE([LT_AC_PROG_SED])dnl
    +-AC_MSG_CHECKING([dynamic linker characteristics])
    +-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"
    +-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])
    +-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*)
    +-  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'
    +-  ;;
    +-
    +-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*)
    +-  version_type=windows
    +-  shrext_cmds=".dll"
    +-  need_version=no
    +-  need_lib_prefix=no
    +-
    +-  case $GCC,$host_os in
    +-  yes,cygwin* | yes,mingw* | yes,pw32*)
    +-    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'
    +-    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*)
    +-      # 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}${versuffix}$shared_ext ${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
    +-  version_type=freebsd-$objformat
    +-  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
    +-      ;;
    +-  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
    +-  # 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
    +-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
    +-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
    +-
    +-  # 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="$sys_lib_dlsearch_path_spec $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=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
    +-  ;;
    +-
    +-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
    +-      export_dynamic_flag_spec='${wl}-Blargedynsym'
    +-      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
    +-  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'
    +-    shlibpath_overrides_runpath=no
    +-  else
    +-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
    +-    shlibpath_overrides_runpath=yes
    +-    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'
    +-  ;;
    +-
    +-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
    +-
    +-AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
    +-[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
    +-sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
    +-AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
    +-[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
    +-sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
    +-
    +-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
    +-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
    +-
    +-
    +-# _LT_AC_TAGCONFIG
    +-# ----------------
    +-AC_DEFUN([_LT_AC_TAGCONFIG],
    +-[AC_REQUIRE([LT_AC_PROG_SED])dnl
    +-AC_ARG_WITH([tags],
    +-    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
    +-        [include additional configurations @<:@automatic@:>@])],
    +-    [tagnames="$withval"])
    +-
    +-if test -f "$ltmain" && test -n "$tagnames"; then
    +-  if test ! -f "${ofile}"; then
    +-    AC_MSG_WARN([output file `$ofile' does not exist])
    +-  fi
    +-
    +-  if test -z "$LTCC"; then
    +-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
    +-    if test -z "$LTCC"; then
    +-      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
    +-    else
    +-      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
    +-    fi
    +-  fi
    +-  if test -z "$LTCFLAGS"; then
    +-    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
    +-  fi
    +-
    +-  # Extract list of available tagged configurations in $ofile.
    +-  # Note that this assumes the entire list is on one line.
    +-  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
    +-
    +-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
    +-  for tagname in $tagnames; do
    +-    IFS="$lt_save_ifs"
    +-    # Check whether tagname contains only valid characters
    +-    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
    +-    "") ;;
    +-    *)  AC_MSG_ERROR([invalid tag name: $tagname])
    +-	;;
    +-    esac
    +-
    +-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
    +-    then
    +-      AC_MSG_ERROR([tag name \"$tagname\" already exists])
    +-    fi
    +-
    +-    # Update the list of available tags.
    +-    if test -n "$tagname"; then
    +-      echo appending configuration tag \"$tagname\" to $ofile
    +-
    +-      case $tagname in
    +-      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_LIBTOOL_LANG_CXX_CONFIG
    +-	else
    +-	  tagname=""
    +-	fi
    +-	;;
    +-
    +-      F77)
    +-	if test -n "$F77" && test "X$F77" != "Xno"; then
    +-	  AC_LIBTOOL_LANG_F77_CONFIG
    +-	else
    +-	  tagname=""
    +-	fi
    +-	;;
    +-
    +-      GCJ)
    +-	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
    +-	  AC_LIBTOOL_LANG_GCJ_CONFIG
    +-	else
    +-	  tagname=""
    +-	fi
    +-	;;
    +-
    +-      RC)
    +-	AC_LIBTOOL_LANG_RC_CONFIG
    +-	;;
    +-
    +-      *)
    +-	AC_MSG_ERROR([Unsupported tag name: $tagname])
    +-	;;
    +-      esac
    +-
    +-      # Append the new tag name to the list of available tags.
    +-      if test -n "$tagname" ; then
    +-      available_tags="$available_tags $tagname"
    +-    fi
    +-    fi
    +-  done
    +-  IFS="$lt_save_ifs"
    +-
    +-  # Now substitute the updated list of available tags.
    +-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
    +-    mv "${ofile}T" "$ofile"
    +-    chmod +x "$ofile"
    +-  else
    +-    rm -f "${ofile}T"
    +-    AC_MSG_ERROR([unable to update list of available tagged configurations.])
    +-  fi
    +-fi
    +-])# _LT_AC_TAGCONFIG
    +-
    +-
    +-# AC_LIBTOOL_DLOPEN
    +-# -----------------
    +-# enable checks for dlopen support
    +-AC_DEFUN([AC_LIBTOOL_DLOPEN],
    +- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
    +-])# AC_LIBTOOL_DLOPEN
    +-
    +-
    +-# AC_LIBTOOL_WIN32_DLL
    +-# --------------------
    +-# declare package support for building win32 DLLs
    +-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
    +-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
    +-])# AC_LIBTOOL_WIN32_DLL
    +-
    +-
    +-# AC_ENABLE_SHARED([DEFAULT])
    +-# ---------------------------
    +-# implement the --enable-shared flag
    +-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
    +-AC_DEFUN([AC_ENABLE_SHARED],
    +-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
    +-AC_ARG_ENABLE([shared],
    +-    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
    +-	[build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT)
    +-])# AC_ENABLE_SHARED
    +-
    +-
    +-# AC_DISABLE_SHARED
    +-# -----------------
    +-# set the default shared flag to --disable-shared
    +-AC_DEFUN([AC_DISABLE_SHARED],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-AC_ENABLE_SHARED(no)
    +-])# AC_DISABLE_SHARED
    +-
    +-
    +-# AC_ENABLE_STATIC([DEFAULT])
    +-# ---------------------------
    +-# implement the --enable-static flag
    +-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
    +-AC_DEFUN([AC_ENABLE_STATIC],
    +-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
    +-AC_ARG_ENABLE([static],
    +-    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
    +-	[build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT)
    +-])# AC_ENABLE_STATIC
    +-
    +-
    +-# AC_DISABLE_STATIC
    +-# -----------------
    +-# set the default static flag to --disable-static
    +-AC_DEFUN([AC_DISABLE_STATIC],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-AC_ENABLE_STATIC(no)
    +-])# AC_DISABLE_STATIC
    +-
    +-
    +-# AC_ENABLE_FAST_INSTALL([DEFAULT])
    +-# ---------------------------------
    +-# implement the --enable-fast-install flag
    +-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
    +-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
    +-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
    +-AC_ARG_ENABLE([fast-install],
    +-    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
    +-    [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT)
    +-])# AC_ENABLE_FAST_INSTALL
    +-
    +-
    +-# AC_DISABLE_FAST_INSTALL
    +-# -----------------------
    +-# set the default to --disable-fast-install
    +-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-AC_ENABLE_FAST_INSTALL(no)
    +-])# AC_DISABLE_FAST_INSTALL
    +-
    +-
    +-# AC_LIBTOOL_PICMODE([MODE])
    +-# --------------------------
    +-# implement the --with-pic flag
    +-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
    +-AC_DEFUN([AC_LIBTOOL_PICMODE],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-pic_mode=ifelse($#,1,$1,default)
    +-])# AC_LIBTOOL_PICMODE
    +-
    +-
    +-# AC_PROG_EGREP
    +-# -------------
    +-# This is predefined starting with Autoconf 2.54, so this conditional
    +-# definition can be removed once we require Autoconf 2.54 or later.
    +-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
    +-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
    +-   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
    +-    then ac_cv_prog_egrep='grep -E'
    +-    else ac_cv_prog_egrep='egrep'
    +-    fi])
    +- EGREP=$ac_cv_prog_egrep
    +- AC_SUBST([EGREP])
    +-])])
    +-
    +-
    +-# AC_PATH_TOOL_PREFIX
    +-# -------------------
    +-# find a file program which can recognize shared library
    +-AC_DEFUN([AC_PATH_TOOL_PREFIX],
    +-[AC_REQUIRE([AC_PROG_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="ifelse([$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 <&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
    +-
    +-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
    +-])# AC_PATH_TOOL_PREFIX
    +-
    +-
    +-# AC_PATH_MAGIC
    +-# -------------
    +-# find a file program which can recognize a shared library
    +-AC_DEFUN([AC_PATH_MAGIC],
    +-[AC_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
    +-    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
    +-  else
    +-    MAGIC_CMD=:
    +-  fi
    +-fi
    +-])# AC_PATH_MAGIC
    +-
    +-
    +-# AC_PROG_LD
    +-# ----------
    +-# find the pathname to the GNU or non-GNU linker
    +-AC_DEFUN([AC_PROG_LD],
    +-[AC_ARG_WITH([gnu-ld],
    +-    [AC_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])
    +-AC_REQUIRE([LT_AC_PROG_SED])dnl
    +-AC_REQUIRE([AC_PROG_CC])dnl
    +-AC_REQUIRE([AC_CANONICAL_HOST])dnl
    +-AC_REQUIRE([AC_CANONICAL_BUILD])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
    +-  ;;
    +-
    +-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=unknown
    +-  ;;
    +-
    +-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
    +-  ;;
    +-
    +-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
    +-  ;;
    +-
    +-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
    +-  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
    +-])# AC_DEPLIBS_CHECK_METHOD
    +-
    +-
    +-# AC_PROG_NM
    +-# ----------
    +-# find the pathname to a BSD-compatible name lister
    +-AC_DEFUN([AC_PROG_NM],
    +-[AC_CACHE_CHECK([for BSD-compatible 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
    +-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
    +-fi])
    +-NM="$lt_cv_path_NM"
    +-])# AC_PROG_NM
    +-
    +-
    +-# AC_CHECK_LIBM
    +-# -------------
    +-# check for math library
    +-AC_DEFUN([AC_CHECK_LIBM],
    +-[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_CHECK_LIBM
    +-
    +-
    +-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
    +-# -----------------------------------
    +-# sets LIBLTDL to the link flags for the libltdl convenience library and
    +-# LTDLINCL to the include flags for the libltdl header and adds
    +-# --enable-ltdl-convenience to the configure arguments.  Note that
    +-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
    +-# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
    +-# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
    +-# (note the single quotes!).  If your package is not flat and you're not
    +-# using automake, define top_builddir and top_srcdir appropriately in
    +-# the Makefiles.
    +-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-  case $enable_ltdl_convenience in
    +-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
    +-  "") enable_ltdl_convenience=yes
    +-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
    +-  esac
    +-  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
    +-  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
    +-  # For backwards non-gettext consistent compatibility...
    +-  INCLTDL="$LTDLINCL"
    +-])# AC_LIBLTDL_CONVENIENCE
    +-
    +-
    +-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
    +-# -----------------------------------
    +-# sets LIBLTDL to the link flags for the libltdl installable library and
    +-# LTDLINCL to the include flags for the libltdl header and adds
    +-# --enable-ltdl-install to the configure arguments.  Note that
    +-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
    +-# and an installed libltdl is not found, it is assumed to be `libltdl'.
    +-# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
    +-# '${top_srcdir}/' (note the single quotes!).  If your package is not
    +-# flat and you're not using automake, define top_builddir and top_srcdir
    +-# appropriately in the Makefiles.
    +-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
    +-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
    +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    +-  AC_CHECK_LIB(ltdl, lt_dlinit,
    +-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
    +-  [if test x"$enable_ltdl_install" = xno; then
    +-     AC_MSG_WARN([libltdl not installed, but installation disabled])
    +-   else
    +-     enable_ltdl_install=yes
    +-   fi
    +-  ])
    +-  if test x"$enable_ltdl_install" = x"yes"; then
    +-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
    +-    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
    +-    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
    +-  else
    +-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
    +-    LIBLTDL="-lltdl"
    +-    LTDLINCL=
    +-  fi
    +-  # For backwards non-gettext consistent compatibility...
    +-  INCLTDL="$LTDLINCL"
    +-])# AC_LIBLTDL_INSTALLABLE
    +-
    +-
    +-# AC_LIBTOOL_CXX
    +-# --------------
    +-# enable support for C++ libraries
    +-AC_DEFUN([AC_LIBTOOL_CXX],
    +-[AC_REQUIRE([_LT_AC_LANG_CXX])
    +-])# AC_LIBTOOL_CXX
    +-
    +-
    +-# _LT_AC_LANG_CXX
    +-# ---------------
    +-AC_DEFUN([_LT_AC_LANG_CXX],
    +-[AC_REQUIRE([AC_PROG_CXX])
    +-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
    +-])# _LT_AC_LANG_CXX
    +-
    +-# _LT_AC_PROG_CXXCPP
    +-# ------------------
    +-AC_DEFUN([_LT_AC_PROG_CXXCPP],
    +-[
    +-AC_REQUIRE([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
    +-fi
    +-])# _LT_AC_PROG_CXXCPP
    +-
    +-# AC_LIBTOOL_F77
    +-# --------------
    +-# enable support for Fortran 77 libraries
    +-AC_DEFUN([AC_LIBTOOL_F77],
    +-[AC_REQUIRE([_LT_AC_LANG_F77])
    +-])# AC_LIBTOOL_F77
    +-
    +-
    +-# _LT_AC_LANG_F77
    +-# ---------------
    +-AC_DEFUN([_LT_AC_LANG_F77],
    +-[AC_REQUIRE([AC_PROG_F77])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
    +-])# _LT_AC_LANG_F77
    +-
    +-
    +-# AC_LIBTOOL_GCJ
    +-# --------------
    +-# enable support for GCJ libraries
    +-AC_DEFUN([AC_LIBTOOL_GCJ],
    +-[AC_REQUIRE([_LT_AC_LANG_GCJ])
    +-])# AC_LIBTOOL_GCJ
    +-
    +-
    +-# _LT_AC_LANG_GCJ
    +-# ---------------
    +-AC_DEFUN([_LT_AC_LANG_GCJ],
    +-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
    +-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
    +-    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
    +-      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
    +-	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
    +-	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
    +-])# _LT_AC_LANG_GCJ
    +-
    +-
    +-# AC_LIBTOOL_RC
    +-# -------------
    +-# enable support for Windows resource files
    +-AC_DEFUN([AC_LIBTOOL_RC],
    +-[AC_REQUIRE([LT_AC_PROG_RC])
    +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
    +-])# AC_LIBTOOL_RC
    +-
    +-
    +-# AC_LIBTOOL_LANG_C_CONFIG
    +-# ------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
    +-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
    +-[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_AC_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_AC_SYS_COMPILER
    +-
    +-# save warnings/boilerplate of simple test code
    +-_LT_COMPILER_BOILERPLATE
    +-_LT_LINKER_BOILERPLATE
    +-
    +-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    +-AC_LIBTOOL_SYS_LIB_STRIP
    +-AC_LIBTOOL_DLOPEN_SELF
    +-
    +-# 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])
    +-
    +-AC_LIBTOOL_CONFIG($1)
    +-
    +-AC_LANG_POP
    +-CC="$lt_save_CC"
    +-])# AC_LIBTOOL_LANG_C_CONFIG
    +-
    +-
    +-# AC_LIBTOOL_LANG_CXX_CONFIG
    +-# --------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
    +-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
    +-[AC_LANG_PUSH(C++)
    +-AC_REQUIRE([AC_PROG_CXX])
    +-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
    +-
    +-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
    +-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
    +-_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
    +-_LT_AC_TAGVAR(module_cmds, $1)=
    +-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
    +-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
    +-_LT_AC_TAGVAR(no_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
    +-
    +-# Dependencies to place before and after the object being linked:
    +-_LT_AC_TAGVAR(predep_objects, $1)=
    +-_LT_AC_TAGVAR(postdep_objects, $1)=
    +-_LT_AC_TAGVAR(predeps, $1)=
    +-_LT_AC_TAGVAR(postdeps, $1)=
    +-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
    +-_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
    +-
    +-# Source file extension for C++ test sources.
    +-ac_ext=cpp
    +-
    +-# Object file extension for compiled C++ test sources.
    +-objext=o
    +-_LT_AC_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(int, char *[[]]) { return(0); }'
    +-
    +-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
    +-_LT_AC_SYS_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_AC_TAGVAR(compiler, $1)=$CC
    +-_LT_CC_BASENAME([$compiler])
    +-
    +-# We don't want -fno-exception wen compiling C++ code, so set the
    +-# no_builtin_flag separately
    +-if test "$GXX" = yes; then
    +-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
    +-else
    +-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
    +-fi
    +-
    +-if test "$GXX" = yes; then
    +-  # Set up default GNU C++ configuration
    +-
    +-  AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-    _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
    +-    _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
    +-    else
    +-      _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=yes
    +-case $host_os in
    +-  aix3*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_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_AC_TAGVAR(archive_cmds, $1)=''
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-
    +-    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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-	  _LT_AC_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
    +-
    +-    # It seems that -bexpall does not export symbols beginning with
    +-    # underscore (_), so it is better to generate a list of symbols to export.
    +-    _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
    +-      # Determine the default libpath from the value encoded in an empty executable.
    +-      _LT_AC_SYS_LIBPATH_AIX
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
    +-
    +-      _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
    +-     else
    +-      if test "$host_cpu" = ia64; then
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
    +-	_LT_AC_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_AC_SYS_LIBPATH_AIX
    +-	_LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
    +-	# Exported symbols can be pulled into shared objects from archives
    +-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
    +-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-	# This is similar to how AIX traditionally builds its shared libraries.
    +-	_LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      # Joseph Beckenbach  says some releases of gcc
    +-      # support --undefined.  This deserves some investigation.  FIXME
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-    else
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    fi
    +-    ;;
    +-
    +-  chorus*)
    +-    case $cc_basename in
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    +-
    +-  cygwin* | mingw* | pw32*)
    +-    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
    +-    # as there is no search path for DLLs.
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-    _LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
    +-
    +-    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
    +-      _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-    fi
    +-  ;;
    +-      darwin* | rhapsody*)
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
    +-      if test "$GXX" = yes ; then
    +-      output_verbose_link_cmd='echo'
    +-      _LT_AC_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_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
    +-      _LT_AC_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_AC_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}"
    +-      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
    +-        _LT_AC_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_AC_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
    +-      case $cc_basename in
    +-        xlc*)
    +-         output_verbose_link_cmd='echo'
    +-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
    +-          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          ;;
    +-       *)
    +-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-          ;;
    +-      esac
    +-      fi
    +-        ;;
    +-
    +-  dgux*)
    +-    case $cc_basename in
    +-      ec++*)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      ghcx*)
    +-	# Green Hills C++ Compiler
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    +-  freebsd[[12]]*)
    +-    # C++ shared libraries reported to be fairly broken before switch to ELF
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  freebsd-elf*)
    +-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-    ;;
    +-  freebsd* | dragonfly*)
    +-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
    +-    # conventions
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
    +-    ;;
    +-  gnu*)
    +-    ;;
    +-  hpux9*)
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-    _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    +-    aCC*)
    +-      _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
    +-      ;;
    +-    *)
    +-      if test "$GXX" = yes; then
    +-        _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-    esac
    +-    ;;
    +-  hpux10*|hpux11*)
    +-    if test $with_gnu_ld = no; then
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-      case $host_cpu in
    +-      hppa*64*|ia64*) ;;
    +-      *)
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-        ;;
    +-      esac
    +-    fi
    +-    case $host_cpu in
    +-    hppa*64*|ia64*)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-    *)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      aCC*)
    +-	case $host_cpu in
    +-	hppa*64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	  ;;
    +-	ia64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	  ;;
    +-	*)
    +-	  _LT_AC_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 $list'
    +-	;;
    +-      *)
    +-	if test "$GXX" = yes; then
    +-	  if test $with_gnu_ld = no; then
    +-	    case $host_cpu in
    +-	    hppa*64*)
    +-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	      ;;
    +-	    ia64*)
    +-	      _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  interix[[3-9]]*)
    +-    _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-    _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-	  else
    +-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
    +-	  fi
    +-	fi
    +-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-	;;
    +-    esac
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-    ;;
    +-  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_AC_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_AC_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 $list'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
    +-	_LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
    +-	;;
    +-      icpc*)
    +-	# 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-  	  _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	  _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
    +-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
    +-	;;
    +-      pgCC* | pgcpp*)
    +-        # Portland Group C++ compiler
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
    +-  	_LT_AC_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'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
    +-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
    +-	_LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
    +-	_LT_AC_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 $templist | $SED "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 $list'
    +-	;;
    +-      *)
    +-	case `$CC -V 2>&1 | sed 5q` in
    +-	*Sun\ C*)
    +-	  # Sun C++ 5.9
    +-	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	  _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-	  _LT_AC_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'
    +-
    +-	  # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
    +-	  ;;
    +-	esac
    +-	;;
    +-    esac
    +-    ;;
    +-  lynxos*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  m88k*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  mvs*)
    +-    case $cc_basename in
    +-      cxx*)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    +-  netbsd*)
    +-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
    +-      wlarc=
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_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::"'
    +-    ;;
    +-  openbsd2*)
    +-    # C++ shared libraries are fairly broken
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  openbsd*)
    +-    if test -f /usr/libexec/ld.so; then
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
    +-      _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
    +-      fi
    +-      output_verbose_link_cmd='echo'
    +-    else
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    fi
    +-    ;;
    +-  osf3*)
    +-    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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-	# Archives containing C++ object files must be created using
    +-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
    +-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
    +-
    +-	;;
    +-      RCC*)
    +-	# Rational C++ 2.4.1
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      cxx*)
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-	_LT_AC_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 $templist | $SED "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 $list'
    +-	;;
    +-      *)
    +-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	  _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-	  _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-	# Archives containing C++ object files must be created using
    +-	# the KAI C++ compiler.
    +-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
    +-	;;
    +-      RCC*)
    +-	# Rational C++ 2.4.1
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      cxx*)
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_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 -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
    +-	  $rm $lib.exp'
    +-
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
    +-	_LT_AC_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 $templist | $SED "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 $list'
    +-	;;
    +-      *)
    +-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	 _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-	  _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	fi
    +-	;;
    +-    esac
    +-    ;;
    +-  psos*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  sunos4*)
    +-    case $cc_basename in
    +-      CC*)
    +-	# Sun C++ 4.x
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      lcc*)
    +-	# Lucid
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    +-  solaris*)
    +-    case $cc_basename in
    +-      CC*)
    +-	# Sun C++ 4.2, 5.x and Centerline C++
    +-        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
    +-	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    +-	_LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-	_LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
    +-	    ;;
    +-	esac
    +-	_LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
    +-	;;
    +-      gcx*)
    +-	# Green Hills C++ Compiler
    +-	_LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
    +-	  if $CC --version | grep -v '^2\.7' > /dev/null; then
    +-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
    +-	    _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
    +-	    _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
    +-	  case $host_os in
    +-	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
    +-	  *)
    +-	    _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    runpath_var='LD_RUN_PATH'
    +-
    +-    case $cc_basename in
    +-      CC*)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_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.
    +-    # 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.
    +-    # So that behaviour is only enabled if SCOABSPATH is set to a
    +-    # non-empty value in the environment.  Most likely only useful for
    +-    # creating official distributions of packages.
    +-    # This is a hack until libtool officially supports absolute path
    +-    # names for shared libraries.
    +-    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
    +-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
    +-    runpath_var='LD_RUN_PATH'
    +-
    +-    case $cc_basename in
    +-      CC*)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-      *)
    +-	# FIXME: insert proper C++ library support
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	;;
    +-    esac
    +-    ;;
    +-  vxworks*)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-  *)
    +-    # FIXME: insert proper C++ library support
    +-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-    ;;
    +-esac
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
    +-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
    +-
    +-_LT_AC_TAGVAR(GCC, $1)="$GXX"
    +-_LT_AC_TAGVAR(LD, $1)="$LD"
    +-
    +-AC_LIBTOOL_POSTDEP_PREDEP($1)
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    +-
    +-AC_LIBTOOL_CONFIG($1)
    +-
    +-AC_LANG_POP
    +-CC=$lt_save_CC
    +-LDCXX=$LD
    +-LD=$lt_save_LD
    +-GCC=$lt_save_GCC
    +-with_gnu_ldcxx=$with_gnu_ld
    +-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
    +-])# AC_LIBTOOL_LANG_CXX_CONFIG
    +-
    +-# AC_LIBTOOL_POSTDEP_PREDEP([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.
    +-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
    +-[AC_REQUIRE([LT_AC_PROG_SED])dnl
    +-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...
    +-ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&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_AC_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_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
    +-    fi
    +-    ;;
    +-  esac
    +-  ;;
    +-esac
    +-])
    +-case " $_LT_AC_TAGVAR(postdeps, $1) " in
    +-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
    +-esac
    +-])# AC_LIBTOOL_POSTDEP_PREDEP
    +-
    +-# AC_LIBTOOL_LANG_F77_CONFIG
    +-# --------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
    +-AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
    +-[AC_REQUIRE([AC_PROG_F77])
    +-AC_LANG_PUSH(Fortran 77)
    +-
    +-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
    +-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
    +-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
    +-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
    +-_LT_AC_TAGVAR(module_cmds, $1)=
    +-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
    +-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
    +-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
    +-_LT_AC_TAGVAR(no_undefined_flag, $1)=
    +-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-_LT_AC_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_AC_TAGVAR(objext, $1)=$objext
    +-
    +-# 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_AC_SYS_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"
    +-CC=${F77-"f77"}
    +-compiler=$CC
    +-_LT_AC_TAGVAR(compiler, $1)=$CC
    +-_LT_CC_BASENAME([$compiler])
    +-
    +-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_AC_TAGVAR(GCC, $1)="$G77"
    +-_LT_AC_TAGVAR(LD, $1)="$LD"
    +-
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    +-
    +-AC_LIBTOOL_CONFIG($1)
    +-
    +-AC_LANG_POP
    +-CC="$lt_save_CC"
    +-])# AC_LIBTOOL_LANG_F77_CONFIG
    +-
    +-
    +-# AC_LIBTOOL_LANG_GCJ_CONFIG
    +-# --------------------------
    +-# Ensure that the configuration vars for the C compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
    +-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
    +-[AC_LANG_SAVE
    +-
    +-# Source file extension for Java test sources.
    +-ac_ext=java
    +-
    +-# Object file extension for compiled Java test sources.
    +-objext=o
    +-_LT_AC_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_AC_SYS_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"
    +-CC=${GCJ-"gcj"}
    +-compiler=$CC
    +-_LT_AC_TAGVAR(compiler, $1)=$CC
    +-_LT_CC_BASENAME([$compiler])
    +-
    +-# GCJ did not exist at the time GCC didn't implicitly link libc in.
    +-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-
    +-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
    +-
    +-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
    +-AC_LIBTOOL_PROG_COMPILER_PIC($1)
    +-AC_LIBTOOL_PROG_CC_C_O($1)
    +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
    +-AC_LIBTOOL_PROG_LD_SHLIBS($1)
    +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
    +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
    +-
    +-AC_LIBTOOL_CONFIG($1)
    +-
    +-AC_LANG_RESTORE
    +-CC="$lt_save_CC"
    +-])# AC_LIBTOOL_LANG_GCJ_CONFIG
    +-
    +-
    +-# AC_LIBTOOL_LANG_RC_CONFIG
    +-# -------------------------
    +-# Ensure that the configuration vars for the Windows resource compiler are
    +-# suitably defined.  Those variables are subsequently used by
    +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
    +-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
    +-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
    +-[AC_LANG_SAVE
    +-
    +-# Source file extension for RC test sources.
    +-ac_ext=rc
    +-
    +-# Object file extension for compiled RC test sources.
    +-objext=o
    +-_LT_AC_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_AC_SYS_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"
    +-CC=${RC-"windres"}
    +-compiler=$CC
    +-_LT_AC_TAGVAR(compiler, $1)=$CC
    +-_LT_CC_BASENAME([$compiler])
    +-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
    +-
    +-AC_LIBTOOL_CONFIG($1)
    +-
    +-AC_LANG_RESTORE
    +-CC="$lt_save_CC"
    +-])# AC_LIBTOOL_LANG_RC_CONFIG
    +-
    +-
    +-# AC_LIBTOOL_CONFIG([TAGNAME])
    +-# ----------------------------
    +-# If TAGNAME is not passed, then 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
    +-# TAGNAME from the matching tagged config vars.
    +-AC_DEFUN([AC_LIBTOOL_CONFIG],
    +-[# The else clause should only fire when bootstrapping the
    +-# libtool distribution, otherwise you forgot to ship ltmain.sh
    +-# with your package, and you will get complaints that there are
    +-# no rules to generate ltmain.sh.
    +-if test -f "$ltmain"; then
    +-  # 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
    +-  # Now quote all the things that may contain metacharacters while being
    +-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
    +-  # variables and quote the copies for generation of the libtool script.
    +-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
    +-    SED SHELL STRIP \
    +-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
    +-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
    +-    deplibs_check_method reload_flag reload_cmds need_locks \
    +-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
    +-    lt_cv_sys_global_symbol_to_c_name_address \
    +-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
    +-    old_postinstall_cmds old_postuninstall_cmds \
    +-    _LT_AC_TAGVAR(compiler, $1) \
    +-    _LT_AC_TAGVAR(CC, $1) \
    +-    _LT_AC_TAGVAR(LD, $1) \
    +-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
    +-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
    +-    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
    +-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
    +-    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
    +-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
    +-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
    +-    _LT_AC_TAGVAR(old_archive_cmds, $1) \
    +-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
    +-    _LT_AC_TAGVAR(predep_objects, $1) \
    +-    _LT_AC_TAGVAR(postdep_objects, $1) \
    +-    _LT_AC_TAGVAR(predeps, $1) \
    +-    _LT_AC_TAGVAR(postdeps, $1) \
    +-    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
    +-    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
    +-    _LT_AC_TAGVAR(archive_cmds, $1) \
    +-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
    +-    _LT_AC_TAGVAR(postinstall_cmds, $1) \
    +-    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
    +-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
    +-    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
    +-    _LT_AC_TAGVAR(no_undefined_flag, $1) \
    +-    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
    +-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
    +-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
    +-    _LT_AC_TAGVAR(hardcode_automatic, $1) \
    +-    _LT_AC_TAGVAR(module_cmds, $1) \
    +-    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
    +-    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
    +-    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
    +-    _LT_AC_TAGVAR(exclude_expsyms, $1) \
    +-    _LT_AC_TAGVAR(include_expsyms, $1); do
    +-
    +-    case $var in
    +-    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
    +-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
    +-    _LT_AC_TAGVAR(archive_cmds, $1) | \
    +-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
    +-    _LT_AC_TAGVAR(module_cmds, $1) | \
    +-    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
    +-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
    +-    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
    +-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
    +-    postinstall_cmds | postuninstall_cmds | \
    +-    old_postinstall_cmds | old_postuninstall_cmds | \
    +-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
    +-      # Double-quote double-evaled strings.
    +-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
    +-      ;;
    +-    *)
    +-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
    +-      ;;
    +-    esac
    +-  done
    +-
    +-  case $lt_echo in
    +-  *'\[$]0 --fallback-echo"')
    +-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
    +-    ;;
    +-  esac
    +-
    +-ifelse([$1], [],
    +-  [cfgfile="${ofile}T"
    +-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
    +-  $rm -f "$cfgfile"
    +-  AC_MSG_NOTICE([creating $ofile])],
    +-  [cfgfile="$ofile"])
    +-
    +-  cat <<__EOF__ >> "$cfgfile"
    +-ifelse([$1], [],
    +-[#! $SHELL
    +-
    +-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
    +-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
    +-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
    +-#
    +-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
    +-# Free Software Foundation, Inc.
    +-#
    +-# This file is part of GNU Libtool:
    +-# Originally by Gordon Matzigkeit , 1996
    +-#
    +-# This program is free software; you can redistribute it and/or modify
    +-# it under the terms of the GNU General Public License as published by
    +-# the Free Software Foundation; either version 2 of the License, or
    +-# (at your option) any later version.
    +-#
    +-# This program is distributed in the hope that it will be useful, but
    +-# WITHOUT ANY WARRANTY; without even the implied warranty of
    +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +-# General Public License for more details.
    +-#
    +-# You should have received a copy of the GNU General Public License
    +-# along with this program; if not, write to the Free Software
    +-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    +-#
    +-# As a special exception to the GNU General Public License, if you
    +-# distribute this file as part of a program that contains a
    +-# configuration script generated by Autoconf, you may include it under
    +-# the same distribution terms that you use for the rest of that program.
    +-
    +-# A sed program that does not truncate output.
    +-SED=$lt_SED
    +-
    +-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
    +-Xsed="$SED -e 1s/^X//"
    +-
    +-# 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
    +-
    +-# The names of the tagged configurations supported by this script.
    +-available_tags=
    +-
    +-# ### BEGIN LIBTOOL CONFIG],
    +-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
    +-
    +-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
    +-
    +-# Shell to use when invoking shell scripts.
    +-SHELL=$lt_SHELL
    +-
    +-# Whether or not to build shared libraries.
    +-build_libtool_libs=$enable_shared
    +-
    +-# Whether or not to build static libraries.
    +-build_old_libs=$enable_static
    +-
    +-# Whether or not to add -lc for building shared libraries.
    +-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
    +-
    +-# Whether or not to disallow shared libs when runtime libs are static
    +-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
    +-
    +-# Whether or not to optimize for fast installation.
    +-fast_install=$enable_fast_install
    +-
    +-# The host system.
    +-host_alias=$host_alias
    +-host=$host
    +-host_os=$host_os
    +-
    +-# The build system.
    +-build_alias=$build_alias
    +-build=$build
    +-build_os=$build_os
    +-
    +-# An echo program that does not interpret backslashes.
    +-echo=$lt_echo
    +-
    +-# The archiver.
    +-AR=$lt_AR
    +-AR_FLAGS=$lt_AR_FLAGS
    +-
    +-# A C compiler.
    +-LTCC=$lt_LTCC
    +-
    +-# LTCC compiler flags.
    +-LTCFLAGS=$lt_LTCFLAGS
    +-
    +-# A language-specific compiler.
    +-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
    +-
    +-# Is the compiler the GNU C compiler?
    +-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
    +-
    +-# An ERE matcher.
    +-EGREP=$lt_EGREP
    +-
    +-# The linker used to build libraries.
    +-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
    +-
    +-# Whether we need hard or soft links.
    +-LN_S=$lt_LN_S
    +-
    +-# A BSD-compatible nm program.
    +-NM=$lt_NM
    +-
    +-# A symbol stripping program
    +-STRIP=$lt_STRIP
    +-
    +-# Used to examine libraries when file_magic_cmd begins "file"
    +-MAGIC_CMD=$MAGIC_CMD
    +-
    +-# Used on cygwin: DLL creation program.
    +-DLLTOOL="$DLLTOOL"
    +-
    +-# Used on cygwin: object dumper.
    +-OBJDUMP="$OBJDUMP"
    +-
    +-# Used on cygwin: assembler.
    +-AS="$AS"
    +-
    +-# The name of the directory that contains temporary libtool files.
    +-objdir=$objdir
    +-
    +-# How to create reloadable object files.
    +-reload_flag=$lt_reload_flag
    +-reload_cmds=$lt_reload_cmds
    +-
    +-# How to pass a linker flag through the compiler.
    +-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
    +-
    +-# Object file suffix (normally "o").
    +-objext="$ac_objext"
    +-
    +-# Old archive suffix (normally "a").
    +-libext="$libext"
    +-
    +-# Shared library suffix (normally ".so").
    +-shrext_cmds='$shrext_cmds'
    +-
    +-# Executable file suffix (normally "").
    +-exeext="$exeext"
    +-
    +-# Additional compiler flags for building library objects.
    +-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
    +-pic_mode=$pic_mode
    +-
    +-# What is the maximum length of a command?
    +-max_cmd_len=$lt_cv_sys_max_cmd_len
    +-
    +-# Does compiler simultaneously support -c and -o options?
    +-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
    +-
    +-# Must we lock files when doing compilation?
    +-need_locks=$lt_need_locks
    +-
    +-# Do we need the lib prefix for modules?
    +-need_lib_prefix=$need_lib_prefix
    +-
    +-# Do we need a version for libraries?
    +-need_version=$need_version
    +-
    +-# Whether dlopen is supported.
    +-dlopen_support=$enable_dlopen
    +-
    +-# Whether dlopen of programs is supported.
    +-dlopen_self=$enable_dlopen_self
    +-
    +-# Whether dlopen of statically linked programs is supported.
    +-dlopen_self_static=$enable_dlopen_self_static
    +-
    +-# Compiler flag to prevent dynamic linking.
    +-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
    +-
    +-# Compiler flag to turn off builtin functions.
    +-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
    +-
    +-# Compiler flag to allow reflexive dlopens.
    +-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
    +-
    +-# Compiler flag to generate shared objects directly from archives.
    +-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
    +-
    +-# Compiler flag to generate thread-safe objects.
    +-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
    +-
    +-# Library versioning type.
    +-version_type=$version_type
    +-
    +-# Format of library name prefix.
    +-libname_spec=$lt_libname_spec
    +-
    +-# 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.
    +-library_names_spec=$lt_library_names_spec
    +-
    +-# The coded name of the library, if different from the real name.
    +-soname_spec=$lt_soname_spec
    +-
    +-# Commands used to build and install an old-style archive.
    +-RANLIB=$lt_RANLIB
    +-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
    +-old_postinstall_cmds=$lt_old_postinstall_cmds
    +-old_postuninstall_cmds=$lt_old_postuninstall_cmds
    +-
    +-# Create an old-style archive from a shared archive.
    +-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
    +-
    +-# Create a temporary old-style archive to link instead of a shared archive.
    +-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
    +-
    +-# Commands used to build and install a shared archive.
    +-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
    +-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
    +-postinstall_cmds=$lt_postinstall_cmds
    +-postuninstall_cmds=$lt_postuninstall_cmds
    +-
    +-# Commands used to build a loadable module (assumed same as above if empty)
    +-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
    +-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
    +-
    +-# Commands to strip libraries.
    +-old_striplib=$lt_old_striplib
    +-striplib=$lt_striplib
    +-
    +-# Dependencies to place before the objects being linked to create a
    +-# shared library.
    +-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
    +-
    +-# Dependencies to place after the objects being linked to create a
    +-# shared library.
    +-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
    +-
    +-# Dependencies to place before the objects being linked to create a
    +-# shared library.
    +-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
    +-
    +-# Dependencies to place after the objects being linked to create a
    +-# shared library.
    +-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
    +-
    +-# The directories searched by this compiler when creating a shared
    +-# library
    +-compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
    +-
    +-# The library search path used internally by the compiler when linking
    +-# a shared library.
    +-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
    +-
    +-# Method to check whether dependent libraries are shared objects.
    +-deplibs_check_method=$lt_deplibs_check_method
    +-
    +-# Command to use when deplibs_check_method == file_magic.
    +-file_magic_cmd=$lt_file_magic_cmd
    +-
    +-# Flag that allows shared libraries with undefined symbols to be built.
    +-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
    +-
    +-# Flag that forces no undefined symbols.
    +-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
    +-
    +-# Commands used to finish a libtool library installation in a directory.
    +-finish_cmds=$lt_finish_cmds
    +-
    +-# Same as above, but a single script fragment to be evaled but not shown.
    +-finish_eval=$lt_finish_eval
    +-
    +-# Take the output of nm and produce a listing of raw symbols and C names.
    +-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
    +-
    +-# Transform the output of nm in a proper C declaration
    +-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
    +-
    +-# Transform the output of nm in a C name address pair
    +-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
    +-
    +-# This is the shared library runtime path variable.
    +-runpath_var=$runpath_var
    +-
    +-# This is the shared library path variable.
    +-shlibpath_var=$shlibpath_var
    +-
    +-# Is shlibpath searched before the hard-coded library search path?
    +-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
    +-
    +-# How to hardcode a shared library path into an executable.
    +-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
    +-
    +-# Whether we should hardcode library paths into libraries.
    +-hardcode_into_libs=$hardcode_into_libs
    +-
    +-# Flag to hardcode \$libdir into a binary during linking.
    +-# This must work even if \$libdir does not exist.
    +-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $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.
    +-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
    +-
    +-# Whether we need a single -rpath flag with a separated argument.
    +-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
    +-
    +-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
    +-# resulting binary.
    +-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
    +-
    +-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
    +-# resulting binary.
    +-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
    +-
    +-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
    +-# the resulting binary.
    +-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
    +-
    +-# Set to yes if building a shared library automatically hardcodes DIR into the library
    +-# and all subsequent libraries and executables linked against it.
    +-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
    +-
    +-# Variables whose values should be saved in libtool wrapper scripts and
    +-# restored at relink time.
    +-variables_saved_for_relink="$variables_saved_for_relink"
    +-
    +-# Whether libtool must link a program against all its dependency libraries.
    +-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
    +-
    +-# Compile-time system search path for libraries
    +-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
    +-
    +-# Run-time system search path for libraries
    +-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
    +-
    +-# Fix the shell variable \$srcfile for the compiler.
    +-fix_srcfile_path=$lt_fix_srcfile_path
    +-
    +-# Set to yes if exported symbols are required.
    +-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
    +-
    +-# The commands to list exported symbols.
    +-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
    +-
    +-# The commands to extract the exported symbol list from a shared archive.
    +-extract_expsyms_cmds=$lt_extract_expsyms_cmds
    +-
    +-# Symbols that should not be listed in the preloaded symbols.
    +-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
    +-
    +-# Symbols that must always be exported.
    +-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
    +-
    +-ifelse([$1],[],
    +-[# ### END LIBTOOL CONFIG],
    +-[# ### END LIBTOOL TAG CONFIG: $tagname])
    +-
    +-__EOF__
    +-
    +-ifelse([$1],[], [
    +-  case $host_os in
    +-  aix3*)
    +-    cat <<\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
    +-EOF
    +-    ;;
    +-  esac
    +-
    +-  # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
    +-
    +-  mv -f "$cfgfile" "$ofile" || \
    +-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
    +-  chmod +x "$ofile"
    +-])
    +-else
    +-  # If there is no Makefile yet, we rely on a make rule to execute
    +-  # `config.status --recheck' to rerun these tests and create the
    +-  # libtool script then.
    +-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
    +-  if test -f "$ltmain_in"; then
    +-    test -f Makefile && make "$ltmain"
    +-  fi
    +-fi
    +-])# AC_LIBTOOL_CONFIG
    +-
    +-
    +-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
    +-# -------------------------------------------
    +-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
    +-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
    +-
    +-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
    +-
    +-if test "$GCC" = yes; then
    +-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
    +-
    +-  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
    +-    lt_cv_prog_compiler_rtti_exceptions,
    +-    [-fno-rtti -fno-exceptions], [],
    +-    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
    +-fi
    +-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
    +-
    +-
    +-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
    +-# ---------------------------------
    +-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
    +-[AC_REQUIRE([AC_CANONICAL_HOST])
    +-AC_REQUIRE([LT_AC_PROG_SED])
    +-AC_REQUIRE([AC_PROG_NM])
    +-AC_REQUIRE([AC_OBJEXT])
    +-# 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]]*\)'
    +-
    +-# Transform an extracted symbol line into a proper C declaration
    +-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
    +-
    +-# Define system-specific variables.
    +-case $host_os in
    +-aix*)
    +-  symcode='[[BCDT]]'
    +-  ;;
    +-cygwin* | mingw* | pw32*)
    +-  symcode='[[ABCDGISTW]]'
    +-  ;;
    +-hpux*) # Its linker distinguishes data from code symbols
    +-  if test "$host_cpu" = ia64; then
    +-    symcode='[[ABCDEGRST]]'
    +-  fi
    +-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
    +-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
    +-  ;;
    +-linux* | k*bsd*-gnu)
    +-  if test "$host_cpu" = ia64; then
    +-    symcode='[[ABCDGIRSTW]]'
    +-    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
    +-    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
    +-  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
    +-
    +-# 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
    +-
    +-# If we're using GNU nm, then use its standard symbol codes.
    +-case `$NM -V 2>&1` in
    +-*GNU* | *'with BFD'*)
    +-  symcode='[[ABCDGIRSTW]]' ;;
    +-esac
    +-
    +-# Try without a prefix undercore, 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.
    +-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    +-
    +-  # Check to see that the pipe works correctly.
    +-  pipe_works=no
    +-
    +-  rm -f conftest*
    +-  cat > conftest.$ac_ext < $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 < conftest.$ac_ext
    +-#ifdef __cplusplus
    +-extern "C" {
    +-#endif
    +-
    +-EOF
    +-	  # Now generate the symbol file.
    +-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
    +-
    +-	  cat <> conftest.$ac_ext
    +-#if defined (__STDC__) && __STDC__
    +-# define lt_ptr_t void *
    +-#else
    +-# define lt_ptr_t char *
    +-# define const
    +-#endif
    +-
    +-/* The mapping between symbol names and symbols. */
    +-const struct {
    +-  const char *name;
    +-  lt_ptr_t address;
    +-}
    +-lt_preloaded_symbols[[]] =
    +-{
    +-EOF
    +-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
    +-	  cat <<\EOF >> conftest.$ac_ext
    +-  {0, (lt_ptr_t) 0}
    +-};
    +-
    +-#ifdef __cplusplus
    +-}
    +-#endif
    +-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_AC_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
    +-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
    +-
    +-
    +-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
    +-# ---------------------------------------
    +-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
    +-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
    +-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
    +-
    +-AC_MSG_CHECKING([for $compiler option to produce PIC])
    +- ifelse([$1],[CXX],[
    +-  # C++ specific cases for pic, static, wl, etc.
    +-  if test "$GXX" = yes; then
    +-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      fi
    +-      ;;
    +-    amigaos*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
    +-      ;;
    +-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    +-      # PIC is the default for these OSes.
    +-      ;;
    +-    mingw* | cygwin* | os2* | pw32*)
    +-      # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
    +-      ;;
    +-    *djgpp*)
    +-      # DJGPP does not support shared libraries at all
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
    +-      fi
    +-      ;;
    +-    hpux*)
    +-      # 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*)
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    +-	;;
    +-      esac
    +-      ;;
    +-    *)
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	else
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
    +-	fi
    +-	;;
    +-      chorus*)
    +-	case $cc_basename in
    +-	cxch68*)
    +-	  # Green Hills C++ Compiler
    +-	  # _LT_AC_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
    +-	;;
    +-       darwin*)
    +-         # PIC is the default on this platform
    +-         # Common symbols not allowed in MH_DYLIB files
    +-         case $cc_basename in
    +-           xlc*)
    +-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
    +-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-           ;;
    +-         esac
    +-       ;;
    +-      dgux*)
    +-	case $cc_basename in
    +-	  ec++*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    ;;
    +-	  ghcx*)
    +-	    # Green Hills C++ Compiler
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      freebsd* | dragonfly*)
    +-	# FreeBSD uses GNU C++
    +-	;;
    +-      hpux9* | hpux10* | hpux11*)
    +-	case $cc_basename in
    +-	  CC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
    +-	    if test "$host_cpu" != ia64; then
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
    +-	    fi
    +-	    ;;
    +-	  aCC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
    +-	    case $host_cpu in
    +-	    hppa*64*|ia64*)
    +-	      # +Z the default
    +-	      ;;
    +-	    *)
    +-	      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    +-	    ;;
    +-	  icpc* | ecpc*)
    +-	    # Intel C++
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
    +-	    ;;
    +-	  pgCC* | pgcpp*)
    +-	    # Portland Group C++ compiler.
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
    +-	    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-	    ;;
    +-	  *)
    +-	    case `$CC -V 2>&1 | sed 5q` in
    +-	    *Sun\ C*)
    +-	      # Sun C++ 5.9
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
    +-	      ;;
    +-	    esac
    +-	    ;;
    +-	esac
    +-	;;
    +-      lynxos*)
    +-	;;
    +-      m88k*)
    +-	;;
    +-      mvs*)
    +-	case $cc_basename in
    +-	  cxx*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      netbsd*)
    +-	;;
    +-      osf3* | osf4* | osf5*)
    +-	case $cc_basename in
    +-	  KCC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
    +-	    ;;
    +-	  RCC*)
    +-	    # Rational C++ 2.4.1
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    ;;
    +-	  cxx*)
    +-	    # Digital/Compaq C++
    +-	    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-	    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
    +-	    ;;
    +-	  gcx*)
    +-	    # Green Hills C++ Compiler
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      sunos4*)
    +-	case $cc_basename in
    +-	  CC*)
    +-	    # Sun C++ 4.x
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	    ;;
    +-	  lcc*)
    +-	    # Lucid
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      tandem*)
    +-	case $cc_basename in
    +-	  NCC*)
    +-	    # NonStop-UX NCC 3.20
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    ;;
    +-	  *)
    +-	    ;;
    +-	esac
    +-	;;
    +-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
    +-	case $cc_basename in
    +-	  CC*)
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	    ;;
    +-	esac
    +-	;;
    +-      vxworks*)
    +-	;;
    +-      *)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-	;;
    +-    esac
    +-  fi
    +-],
    +-[
    +-  if test "$GCC" = yes; then
    +-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      fi
    +-      ;;
    +-
    +-    amigaos*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
    +-      ;;
    +-
    +-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    +-      # PIC is the default for these OSes.
    +-      ;;
    +-
    +-    mingw* | cygwin* | pw32* | os2*)
    +-      # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
    +-      ;;
    +-
    +-    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_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-      enable_shared=no
    +-      ;;
    +-
    +-    sysv4*MP*)
    +-      if test -d /usr/nec; then
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
    +-      fi
    +-      ;;
    +-
    +-    hpux*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
    +-	;;
    +-      esac
    +-      ;;
    +-
    +-    *)
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      if test "$host_cpu" = ia64; then
    +-	# AIX 5 now supports IA64 processor
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      else
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
    +-      fi
    +-      ;;
    +-      darwin*)
    +-        # PIC is the default on this platform
    +-        # Common symbols not allowed in MH_DYLIB files
    +-       case $cc_basename in
    +-         xlc*)
    +-         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
    +-         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-         ;;
    +-       esac
    +-       ;;
    +-
    +-    mingw* | cygwin* | pw32* | os2*)
    +-      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
    +-      ;;
    +-
    +-    hpux9* | hpux10* | hpux11*)
    +-      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
    +-	;;
    +-      esac
    +-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
    +-      ;;
    +-
    +-    irix5* | irix6* | nonstopux*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      # PIC (with -KPIC) is the default.
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-      ;;
    +-
    +-    newsos6)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    +-
    +-    linux* | k*bsd*-gnu)
    +-      case $cc_basename in
    +-      icc* | ecc*)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	_LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-        ;;
    +-      ccc*)
    +-        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-        # All Alpha code is PIC.
    +-        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-        ;;
    +-      *)
    +-        case `$CC -V 2>&1 | sed 5q` in
    +-	*Sun\ C*)
    +-	  # Sun C 5.9
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-	  ;;
    +-	*Sun\ F*)
    +-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
    +-	  ;;
    +-	esac
    +-	;;
    +-      esac
    +-      ;;
    +-
    +-    osf3* | osf4* | osf5*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      # All OSF/1 code is PIC.
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-      ;;
    +-
    +-    rdos*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    +-      ;;
    +-
    +-    solaris*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      case $cc_basename in
    +-      f77* | f90* | f95*)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
    +-      *)
    +-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
    +-      esac
    +-      ;;
    +-
    +-    sunos4*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    +-
    +-    sysv4 | sysv4.2uw2* | sysv4.3*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    +-
    +-    sysv4*MP*)
    +-      if test -d /usr/nec ;then
    +-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
    +-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      fi
    +-      ;;
    +-
    +-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    +-
    +-    unicos*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-      ;;
    +-
    +-    uts4*)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
    +-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    +-      ;;
    +-
    +-    *)
    +-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
    +-      ;;
    +-    esac
    +-  fi
    +-])
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
    +-
    +-#
    +-# Check to make sure the PIC flag actually works.
    +-#
    +-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
    +-  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
    +-    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
    +-    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
    +-    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
    +-     "" | " "*) ;;
    +-     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
    +-     esac],
    +-    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
    +-fi
    +-case $host_os in
    +-  # For platforms which do not support PIC, -DPIC is meaningless:
    +-  *djgpp*)
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
    +-    ;;
    +-  *)
    +-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
    +-    ;;
    +-esac
    +-
    +-#
    +-# Check to make sure the static flag actually works.
    +-#
    +-wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
    +-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
    +-  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
    +-  $lt_tmp_static_flag,
    +-  [],
    +-  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
    +-])
    +-
    +-
    +-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
    +-# ------------------------------------
    +-# See if the linker supports building shared libraries.
    +-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
    +-[AC_REQUIRE([LT_AC_PROG_SED])dnl
    +-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
    +-ifelse([$1],[CXX],[
    +-  _LT_AC_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_AC_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_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
    +-  ;;
    +-  cygwin* | mingw*)
    +-    _LT_AC_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_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
    +-  ;;
    +-  esac
    +-  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
    +-],[
    +-  runpath_var=
    +-  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
    +-  _LT_AC_TAGVAR(archive_cmds, $1)=
    +-  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
    +-  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
    +-  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
    +-  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
    +-  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
    +-  _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
    +-  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
    +-  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
    +-  _LT_AC_TAGVAR(module_cmds, $1)=
    +-  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
    +-  _LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
    +-  # include_expsyms should be a list of space-separated symbols to be *always*
    +-  # included in the symbol list
    +-  _LT_AC_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_AC_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=
    +-  # Just being paranoid about ensuring that cc_basename is set.
    +-  _LT_CC_BASENAME([$compiler])
    +-  case $host_os in
    +-  cygwin* | mingw* | pw32*)
    +-    # 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
    +-    _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
    +-      else
    +-  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
    +-    fi
    +-    supports_anon_versioning=no
    +-    case `$LD -v 2>/dev/null` 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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	cat <&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.
    +-
    +-EOF
    +-      fi
    +-      ;;
    +-
    +-    amigaos*)
    +-      _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-
    +-      # Samuel A. Falvo II  reports
    +-      # that the semantics of dynamic libraries on AmigaOS, at least up
    +-      # to version 4, is to share data among multiple programs linked
    +-      # with the same dynamic library.  Since this doesn't match the
    +-      # behavior of shared libraries on other platforms, we can't use
    +-      # them.
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    +-
    +-    beos*)
    +-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-	# Joseph Beckenbach  says some releases of gcc
    +-	# support --undefined.  This deserves some investigation.  FIXME
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-      else
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-
    +-    cygwin* | mingw* | pw32*)
    +-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
    +-      # as there is no search path for DLLs.
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      _LT_AC_TAGVAR(always_export_symbols, $1)=no
    +-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
    +-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
    +-
    +-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
    +-        _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-
    +-    interix[[3-9]]*)
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-      _LT_AC_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_AC_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_AC_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* | k*bsd*-gnu)
    +-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	tmp_addflag=
    +-	case $cc_basename,$host_cpu in
    +-	pgcc*)				# Portland Group C compiler
    +-	  _LT_AC_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_AC_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' ;;
    +-	esac
    +-	case `$CC -V 2>&1 | sed 5q` in
    +-	*Sun\ C*)			# Sun C 5.9
    +-	  _LT_AC_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'
    +-	  tmp_sharedflag='-G' ;;
    +-	*Sun\ F*)			# Sun Fortran 8.3
    +-	  tmp_sharedflag='-G' ;;
    +-	*)
    +-	  tmp_sharedflag='-shared' ;;
    +-	esac
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-
    +-	if test $supports_anon_versioning = yes; then
    +-	  _LT_AC_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
    +-      else
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-
    +-    netbsd*)
    +-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
    +-	wlarc=
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-	cat <&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.
    +-
    +-EOF
    +-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_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_AC_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
    +-	;;
    +-	*)
    +-	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
    +-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
    +-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
    +-	  else
    +-	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-	  fi
    +-	;;
    +-      esac
    +-      ;;
    +-
    +-    sunos4*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
    +-      wlarc=
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    *)
    +-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    +-	_LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-    esac
    +-
    +-    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
    +-      runpath_var=
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
    +-      _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
    +-      _LT_AC_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_AC_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_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)=''
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-
    +-      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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-  	  _LT_AC_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
    +-
    +-      # It seems that -bexpall does not export symbols beginning with
    +-      # underscore (_), so it is better to generate a list of symbols to export.
    +-      _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
    +-       # Determine the default libpath from the value encoded in an empty executable.
    +-       _LT_AC_SYS_LIBPATH_AIX
    +-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
    +-	_LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
    +-       else
    +-	if test "$host_cpu" = ia64; then
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
    +-	  _LT_AC_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_AC_SYS_LIBPATH_AIX
    +-	 _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
    +-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
    +-	  # Exported symbols can be pulled into shared objects from archives
    +-	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
    +-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-	  # This is similar to how AIX traditionally builds its shared libraries.
    +-	  _LT_AC_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*)
    +-      _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      # see comment about different semantics on the GNU ld section
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    +-
    +-    bsdi[[45]]*)
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
    +-      ;;
    +-
    +-    cygwin* | mingw* | pw32*)
    +-      # 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
    +-      _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
    +-      # The linker will automatically build a .lib file if we build a DLL.
    +-      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
    +-      # FIXME: Should let the user specify the lib program.
    +-      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
    +-      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
    +-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
    +-      ;;
    +-
    +-    darwin* | rhapsody*)
    +-      case $host_os in
    +-        rhapsody* | darwin1.[[012]])
    +-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
    +-         ;;
    +-       *) # Darwin 1.3 on
    +-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
    +-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-         else
    +-           case ${MACOSX_DEPLOYMENT_TARGET} in
    +-             10.[[012]])
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
    +-               ;;
    +-             10.*)
    +-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
    +-               ;;
    +-           esac
    +-         fi
    +-         ;;
    +-      esac
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    +-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-    if test "$GCC" = yes ; then
    +-    	output_verbose_link_cmd='echo'
    +-        _LT_AC_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_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
    +-        _LT_AC_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_AC_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}"
    +-    else
    +-      case $cc_basename in
    +-        xlc*)
    +-         output_verbose_link_cmd='echo'
    +-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
    +-         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
    +-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
    +-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
    +-          ;;
    +-       *)
    +-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-          ;;
    +-      esac
    +-    fi
    +-      ;;
    +-
    +-    dgux*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    freebsd1*)
    +-      _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
    +-    freebsd2*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
    +-    freebsd* | dragonfly*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    hpux9*)
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-
    +-      # hardcode_minus_L: Not really in the search PATH,
    +-      # but as the default location of the library.
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-      ;;
    +-
    +-    hpux10*)
    +-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	_LT_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	ia64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	*)
    +-	  _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	ia64*)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
    +-	  ;;
    +-	*)
    +-	  _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
    +-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-
    +-	case $host_cpu in
    +-	hppa*64*|ia64*)
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-	  ;;
    +-	*)
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	  _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-	  ;;
    +-	esac
    +-      fi
    +-      ;;
    +-
    +-    irix5* | irix6* | nonstopux*)
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-      ;;
    +-
    +-    netbsd*)
    +-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    newsos6)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    openbsd*)
    +-      if test -f /usr/libexec/ld.so; then
    +-	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
    +-	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
    +-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
    +-	else
    +-	  case $host_os in
    +-	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
    +-	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
    +-	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-	     ;;
    +-	   *)
    +-	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
    +-	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
    +-	     ;;
    +-	  esac
    +-        fi
    +-      else
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      fi
    +-      ;;
    +-
    +-    os2*)
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
    +-      _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
    +-      ;;
    +-
    +-    osf3*)
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-      else
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      ;;
    +-
    +-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    +-      else
    +-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
    +-	_LT_AC_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~
    +-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
    +-
    +-	# Both c and cxx compiler support -rpath directly
    +-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
    +-      ;;
    +-
    +-    solaris*)
    +-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
    +-      if test "$GCC" = yes; then
    +-	wlarc='${wl}'
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
    +-      else
    +-	wlarc=''
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	_LT_AC_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'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    +-      _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
    +-	else
    +-	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
    +-	fi
    +-	;;
    +-      esac
    +-      _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
    +-      fi
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    sysv4)
    +-      case $host_vendor in
    +-	sni)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
    +-	;;
    +-	siemens)
    +-	  ## LD is ld it makes a PLAMLIB
    +-	  ## CC just makes a GrossModule.
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
    +-	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
    +-        ;;
    +-	motorola)
    +-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
    +-	;;
    +-      esac
    +-      runpath_var='LD_RUN_PATH'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    sysv4.3*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
    +-      ;;
    +-
    +-    sysv4*MP*)
    +-      if test -d /usr/nec; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-	runpath_var=LD_RUN_PATH
    +-	hardcode_runpath_var=yes
    +-	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
    +-      fi
    +-      ;;
    +-
    +-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
    +-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      runpath_var='LD_RUN_PATH'
    +-
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
    +-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
    +-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
    +-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
    +-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
    +-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
    +-      runpath_var='LD_RUN_PATH'
    +-
    +-      if test "$GCC" = yes; then
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      else
    +-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
    +-      fi
    +-      ;;
    +-
    +-    uts4*)
    +-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
    +-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
    +-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
    +-      ;;
    +-
    +-    *)
    +-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
    +-      ;;
    +-    esac
    +-  fi
    +-])
    +-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
    +-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
    +-
    +-#
    +-# Do we need to explicitly link libc?
    +-#
    +-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
    +-x|xyes)
    +-  # Assume -lc should be added
    +-  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-
    +-  if test "$enable_shared" = yes && test "$GCC" = yes; then
    +-    case $_LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)
    +-	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
    +-        compiler_flags=-v
    +-        linker_flags=-v
    +-        verstring=
    +-        output_objdir=.
    +-        libname=conftest
    +-        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
    +-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
    +-        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
    +-        then
    +-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
    +-        else
    +-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
    +-        fi
    +-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
    +-      else
    +-        cat conftest.err 1>&5
    +-      fi
    +-      $rm conftest*
    +-      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
    +-      ;;
    +-    esac
    +-  fi
    +-  ;;
    +-esac
    +-])# AC_LIBTOOL_PROG_LD_SHLIBS
    +-
    +-
    +-# _LT_AC_FILE_LTDLL_C
    +-# -------------------
    +-# Be careful that the start marker always follows a newline.
    +-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
    +-# /* ltdll.c starts here */
    +-# #define WIN32_LEAN_AND_MEAN
    +-# #include 
    +-# #undef WIN32_LEAN_AND_MEAN
    +-# #include 
    +-#
    +-# #ifndef __CYGWIN__
    +-# #  ifdef __CYGWIN32__
    +-# #    define __CYGWIN__ __CYGWIN32__
    +-# #  endif
    +-# #endif
    +-#
    +-# #ifdef __cplusplus
    +-# extern "C" {
    +-# #endif
    +-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
    +-# #ifdef __cplusplus
    +-# }
    +-# #endif
    +-#
    +-# #ifdef __CYGWIN__
    +-# #include 
    +-# DECLARE_CYGWIN_DLL( DllMain );
    +-# #endif
    +-# HINSTANCE __hDllInstance_base;
    +-#
    +-# BOOL APIENTRY
    +-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
    +-# {
    +-#   __hDllInstance_base = hInst;
    +-#   return TRUE;
    +-# }
    +-# /* ltdll.c ends here */
    +-])# _LT_AC_FILE_LTDLL_C
    +-
    +-
    +-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
    +-# ---------------------------------
    +-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
    +-
    +-
    +-# old names
    +-AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
    +-AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
    +-AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
    +-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
    +-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
    +-AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
    +-AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
    +-
    +-# This is just to silence aclocal about the macro not being used
    +-ifelse([AC_DISABLE_FAST_INSTALL])
    +-
    +-AC_DEFUN([LT_AC_PROG_GCJ],
    +-[AC_CHECK_TOOL(GCJ, gcj, no)
    +-  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
    +-  AC_SUBST(GCJFLAGS)
    +-])
    +-
    +-AC_DEFUN([LT_AC_PROG_RC],
    +-[AC_CHECK_TOOL(RC, windres, no)
    +-])
    +-
    +-
    +-# Cheap backport of AS_EXECUTABLE_P and required macros
    +-# from Autoconf 2.59; we should not use $as_executable_p directly.
    +-
    +-# _AS_TEST_PREPARE
    +-# ----------------
    +-m4_ifndef([_AS_TEST_PREPARE],
    +-[m4_defun([_AS_TEST_PREPARE],
    +-[if test -x / >/dev/null 2>&1; then
    +-  as_executable_p='test -x'
    +-else
    +-  as_executable_p='test -f'
    +-fi
    +-])])# _AS_TEST_PREPARE
    +-
    +-# AS_EXECUTABLE_P
    +-# ---------------
    +-# Check whether a file is executable.
    +-m4_ifndef([AS_EXECUTABLE_P],
    +-[m4_defun([AS_EXECUTABLE_P],
    +-[AS_REQUIRE([_AS_TEST_PREPARE])dnl
    +-$as_executable_p $1[]dnl
    +-])])# AS_EXECUTABLE_P
    +-
    +-# 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.                               #
    +-# LT_AC_PROG_SED
    +-# --------------
    +-# Check for a fully-functional sed program, that truncates
    +-# as few characters as possible.  Prefer GNU sed if found.
    +-AC_DEFUN([LT_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])
    +-])
    +-
    + # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
    + # 
    + # Copyright © 2004 Scott James Remnant .
    diff --git a/libs/orbit2/patches/010-dont-run-testprograms.patch b/libs/orbit2/patches/010-dont-run-testprograms.patch
    new file mode 100644
    index 0000000..a38e954
    --- /dev/null
    +++ b/libs/orbit2/patches/010-dont-run-testprograms.patch
    @@ -0,0 +1,38 @@
    +--- a/configure
    ++++ b/configure
    +@@ -24219,7 +24219,7 @@ if test "$cross_compiling" = yes; then
    + See \`config.log' for more details." >&5
    + $as_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.  */
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -196,24 +196,6 @@ dnl This generates warnings from autocon
    + AC_C_BIGENDIAN
    + 
    + 
    +-dnl
    +-dnl   So many people with broken linking setups asked about this
    +-dnl it turned out to be necessary to check for this.
    +-dnl
    +-dofus_save_libs="$LIBS"
    +-LIBS="$ORBIT_LIBS $LIBS"
    +-AC_TRY_RUN([ #include 
    +-             main ()
    +-             {
    +-               return 0;
    +-             } ],,
    +-           AC_MSG_ERROR([
    +-Linking is badly borked on your system. Please ensure your library path is correct
    +-Check config.log for details - check near the end of the log above 'failed program was'
    +-Alternatively ensure that your /etc/ld.so.conf (and/or LD_LIBRARY_PATH) includes the
    +-prefix you're compiling on: '${prefix}' ]))
    +-LIBS="$dofus_save_libs"
    +-
    + orig_CPPFLAGS=$CPPFLAGS
    + CPPFLAGS="$CPPFLAGS $ORBIT_CFLAGS"
    + AC_CHECK_ALIGNOF(CORBA_octet)
    diff --git a/libs/ortp/Makefile b/libs/ortp/Makefile
    new file mode 100644
    index 0000000..5799df2
    --- /dev/null
    +++ b/libs/ortp/Makefile
    @@ -0,0 +1,75 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ortp
    +PKG_VERSION:=0.16.3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:= \
    +	http://download.savannah.gnu.org/releases-noredirect/linphone/ortp/sources/ \
    +	http://www.very-clever.com/download/nongnu/linphone/ortp/sources/
    +PKG_MD5SUM:=2b0281600cb958d1c94e318a86b62fe3
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libortp
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Real-time Transport Protocol (RTP) library
    +  URL:=http://www.linphone.org/index.php/eng/code_review/ortp
    +  DEPENDS:= +libpthread
    +endef
    +
    +ifneq ($(CONFIG_avr32),)
    +  TARGET_CFLAGS += -fsigned-char
    +endif
    +
    +CONFIGURE_ARGS += \
    +	--disable-debug \
    +	--enable-ipv6 \
    +	--enable-perf \
    +	--disable-ssl-hmac \
    +	--disable-so-reuseaddr \
    +	--without-srtp \
    +
    +CONFIGURE_VARS += \
    +	ac_cv_header_srtp_srtp_h=no \
    +	ac_cv_lib_srtp_srtp_init=no \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/include/ortp \
    +		$(1)/usr/include/ \
    +	)
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/libortp.{a,so*} \
    +		$(1)/usr/lib/ \
    +	)
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/pkgconfig/ortp.pc \
    +		$(1)/usr/lib/pkgconfig/ \
    +	)
    +endef
    +
    +define Package/libortp/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/libortp.so.* \
    +		$(1)/usr/lib/ \
    +	)
    +endef
    +
    +$(eval $(call BuildPackage,libortp))
    diff --git a/libs/ossp-js/Makefile b/libs/ossp-js/Makefile
    new file mode 100644
    index 0000000..78ddb79
    --- /dev/null
    +++ b/libs/ossp-js/Makefile
    @@ -0,0 +1,119 @@
    +#
    +# Copyright (C) 2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=js
    +PKG_VERSION:=1.6.20070208
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=ftp://ftp.ossp.org/pkg/lib/js/
    +PKG_MD5SUM:=07f6cad7e03fd74a949588c3d4b333de
    +
    +PKG_FIXUP:=libtool
    +PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +PKG_INSTALL=1
    +
    +define Package/js/Default
    + TITLE:=Mozilla JavaScript Engine
    + URL:=http://www.ossp.org/pkg/lib/js/
    +endef
    +
    +define Package/js
    +$(call Package/js/Default)
    + SECTION:=lang
    + CATEGORY:=Languages
    + SUBMENU:=JavaScript
    + TITLE+= (interpreter)
    + DEPENDS+= +libjs +libreadline +libncurses
    +endef
    +
    +define Package/libjs
    +$(call Package/js/Default)
    + SECTION:=libs
    + CATEGORY:=Libraries
    + TITLE+= (library)
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--with-dso \
    +	--with-editline \
    +	--with-file \
    +	--without-perl
    +
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR); rm -f config.cache; \
    +		./configure \
    +			--prefix=/usr \
    +			--exec-prefix=/usr \
    +			--bindir=/usr/bin \
    +			--datadir=/usr/share \
    +			--includedir=/usr/include \
    +			--infodir=/usr/share/info \
    +			--libdir=/usr/lib \
    +			--libexecdir=/usr/lib \
    +			--localstatedir=/var \
    +			--mandir=/usr/share/man \
    +			--sbindir=/usr/sbin \
    +			--sysconfdir=/etc \
    +			$(DISABLE_NLS) \
    +			--disable-shared \
    +			--enable-static \
    +	);
    +	$(MAKE) -C $(PKG_BUILD_DIR) src/jsautocfg.h
    +	$(call Build/Configure/Default)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/js-config \
    +		$(2)/bin/
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
    +		$(2)/bin/js-config
    +
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/js \
    +		$(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libjs.{la,so*} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/js.pc \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/js/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/js \
    +		$(1)/usr/bin/
    +endef
    +
    +define Package/libjs/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libjs.so.* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,js))
    +$(eval $(call BuildPackage,libjs))
    diff --git a/libs/pcre/Makefile b/libs/pcre/Makefile
    new file mode 100644
    index 0000000..ae567b7
    --- /dev/null
    +++ b/libs/pcre/Makefile
    @@ -0,0 +1,86 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=pcre
    +PKG_VERSION:=8.11
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/pcre
    +PKG_MD5SUM:=ef907b8792ec7f90f0dcd773848f0b3b
    +
    +PKG_FIXUP:=autoreconf
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libpcre/default
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  URL:=http://www.pcre.org/
    +endef
    +
    +define Package/libpcre
    +  $(call Package/libpcre/default)
    +  TITLE:=A Perl Compatible Regular Expression library
    +endef
    +
    +define Package/libpcrecpp
    +  $(call Package/libpcre/default)
    +  TITLE:=C++ wrapper for Perl Compatible Regular Expression library
    +  DEPENDS:=+libpcre
    +endef
    +
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-utf8 \
    +	--enable-unicode-properties \
    +
    +ifneq ($(CONFIG_PACKAGE_libpcrecpp),)
    +  CONFIGURE_ARGS+= --enable-cpp
    +else
    +  CONFIGURE_ARGS+= --disable-cpp
    +endif
    +
    +MAKE_FLAGS += \
    +	CFLAGS="$(TARGET_CFLAGS)"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(1)/usr/bin/
    +
    +	$(INSTALL_DIR) $(2)/bin
    +	$(LN) $(STAGING_DIR)/usr/bin/pcre-config $(2)/bin
    +
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/pcre*.h $(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre*.{a,so*} $(1)/usr/lib//
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/
    +
    +endef
    +
    +define Package/libpcre/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/libpcrecpp/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcrecpp.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libpcre))
    +$(eval $(call BuildPackage,libpcrecpp))
    diff --git a/libs/pcre/patches/750-pcre_config_cross.patch b/libs/pcre/patches/750-pcre_config_cross.patch
    new file mode 100644
    index 0000000..1a5ab00
    --- /dev/null
    +++ b/libs/pcre/patches/750-pcre_config_cross.patch
    @@ -0,0 +1,26 @@
    +--- a/pcre-config.in
    ++++ b/pcre-config.in
    +@@ -24,6 +24,10 @@ case `uname -s` in
    +   libR=" -Wl,-R@libdir@"
    +   ;;
    + esac
    ++libS=
    ++if test @libdir@ != /usr/lib ; then
    ++  libS=-L@libdir@
    ++fi
    + 
    + while test $# -gt 0; do
    +   case "$1" in
    +@@ -58,10 +62,10 @@ while test $# -gt 0; do
    +       echo $includes @PCRE_STATIC_CFLAG@
    +       ;;
    +     --libs-posix)
    +-      echo -L@libdir@$libR -lpcreposix -lpcre
    ++      echo $libS$libR -lpcreposix -lpcre
    +       ;;
    +     --libs)
    +-      echo -L@libdir@$libR -lpcre
    ++      echo $libS$libR -lpcre
    +       ;;
    +     --libs-cpp)
    +       if test @enable_cpp@ = yes ; then
    diff --git a/libs/phidget21/Makefile b/libs/phidget21/Makefile
    new file mode 100644
    index 0000000..035ccfb
    --- /dev/null
    +++ b/libs/phidget21/Makefile
    @@ -0,0 +1,85 @@
    +#
    +# Copyright (C) 2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=phidget21
    +PKG_VERSION:=2.1.6.20091105
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=Phidgetlinux_$(PKG_VERSION).tar.gz
    +PKG_BUILD_DIR:=$(BUILD_DIR)/Phidgetlinux
    +PKG_SOURCE_URL:=http://www.phidgets.com/downloads/libraries/
    +PKG_MD5SUM:=eb48c7fc68ab189a0255c35e71d55ecd
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/phidget21
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Phidget API
    +  URL:=http://www.phidgets.com/
    +endef
    +
    +define Package/phidget21/description
    + The Phidget API library.
    +endef
    +
    +define Package/phidget-service
    +  SECTION:=misc
    +  CATEGORY:=Network
    +  TITLE:=Phidget Web Service
    +  URL:=http://www.phidgets.com/
    +  DEPENDS:=phidget21
    +endef
    +
    +define Package/phidget-service/description
    + The Phidget Web Service.
    +endef
    +
    +define Build/Configure
    +	$(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/include/
    +	$(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/lib/
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR)/phidget21 \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		CFLAGS="$(TARGET_CFLAGS) -Wall -Wno-strict-aliasing -fpic -D_LINUX -I. -Iutils" \
    +		INSTALLPREFIX="$(PKG_INSTALL_DIR)" LDCONFIG="" \
    +		all install
    +	$(MAKE) -C $(PKG_BUILD_DIR)/webservice \
    +		$(TARGET_CONFIGURE_OPTS) LDCONFIG="true" \
    +		CFLAGS="$(TARGET_CFLAGS) -Wall -Wno-strict-aliasing -fpic -D_LINUX -I. -Iutils" \
    +		phidget21internal.h
    +	$(MAKE) -C $(PKG_BUILD_DIR)/webservice \
    +		$(TARGET_CONFIGURE_OPTS) LDCONFIG="true" \
    +		LIBS="-lphidget21 -L../phidget21" \
    +		CFLAGS="$(TARGET_CFLAGS) -static -D_LINUX -I. -I../phidget21 -I../phidget21/utils" \
    +		webservice21
    +endef
    +
    +define Build/InstallDev
    +	ls $(PKG_INSTALL_DIR)
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/phidget21.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libphidget21.so $(1)/usr/lib/
    +endef
    +
    +define Package/phidget21/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libphidget21.so $(1)/usr/lib/
    +endef
    +
    +define Package/phidget-service/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/webservice/phidgetwebservice21 $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,phidget21))
    +$(eval $(call BuildPackage,phidget-service))
    diff --git a/libs/poco/Makefile b/libs/poco/Makefile
    new file mode 100644
    index 0000000..c681852
    --- /dev/null
    +++ b/libs/poco/Makefile
    @@ -0,0 +1,58 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=poco
    +PKG_VERSION:=1.3.6p2
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/poco/sources/poco-1.3.6
    +PKG_MD5SUM:=32d154ca5f34d20217c0baaffa432c1c
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/poco
    +  NAME:=poco
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Poco C++ libraries
    +  URL:=http://www.pocoproject.org/
    +  DEPENDS:=+libstdcpp
    +endef
    +
    +define Package/poco/description
    +  Modern, powerful open source C++ class libraries and frameworks for building
    +  network- and internet-based applications that run on desktop, server and
    +  embedded systems.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--config=Linux \
    +	--no-tests \
    +	--no-samples \
    +	--no-fpenvironment \
    +	--no-sharedmemory \
    +	--no-wstring
    +
    +define Package/poco/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libPoco{Foundation,XML,Net,Util}.so* $(1)/usr/lib/
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) -r $(PKG_INSTALL_DIR)/usr/include/Poco $(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libPoco{Foundation,XML,Net,Util}.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,poco))
    diff --git a/libs/poco/patches/100-sharedmemory.patch b/libs/poco/patches/100-sharedmemory.patch
    new file mode 100644
    index 0000000..811a964
    --- /dev/null
    +++ b/libs/poco/patches/100-sharedmemory.patch
    @@ -0,0 +1,26 @@
    +--- a/configure
    ++++ b/configure
    +@@ -50,6 +50,11 @@
    +     Useful if your C++ compiler has incomplete floating-point support
    +     (such as uClibc-based systems).
    + 
    ++  --no-sharedmemory
    ++    Compile with -DPOCO_NO_SHAREDMEMORY
    ++    Useful if your C++ compiler has incomplete shared memory support
    ++    (such as uClibc-based systems).
    ++
    +   --omit={,}
    +     Do not build the specified component(s).
    +     Example: --omit=Data/MySQL,Data/ODBC,Zip
    +@@ -140,6 +145,10 @@
    + 		flags="$flags -DPOCO_NO_FPENVIRONMENT"
    + 	fi
    + 
    ++	if [ "$1" = "--no-sharedmemory" ] ; then
    ++		flags="$flags -DPOCO_NO_SHAREDMEMORY"
    ++	fi
    ++
    + 	if [ "$1" = "--poquito" ] ; then
    + 		flags="$flags -DPOCO_NO_FILECHANNEL -DPOCO_NO_SPLITTERCHANNEL -DPOCO_NO_SYSLOGCHANNEL -DPOCO_UTIL_NO_INIFILECONFIGURATION -DPOCO_UTIL_NO_XMLCONFIGURATION"
    + 	fi
    +
    diff --git a/libs/polarssl/Makefile b/libs/polarssl/Makefile
    new file mode 100644
    index 0000000..df132e0
    --- /dev/null
    +++ b/libs/polarssl/Makefile
    @@ -0,0 +1,82 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=polarssl
    +PKG_VERSION:=0.14.3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
    +PKG_SOURCE_URL:=http://polarssl.org/code/releases
    +PKG_MD5SUM:=f1b2fe9087ab64d7ea40a276a3628583
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/polarssl/Default
    +  SUBMENU:=SSL
    +  TITLE:=Embedded SSL
    +  URL:=http://polarssl.org/
    +endef
    +
    +define Package/polarssl/Default/description
    +The aim of the PolarSSL project is to provide a quality, open-source
    +cryptographic library written in C and targeted at embedded systems.
    +endef
    +
    +define Package/libpolarssl
    +$(call Package/polarssl/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= (library)
    +endef
    +
    +define Package/libpolarssl/description
    +$(call Package/polarssl/Default/description)
    +This package contains the PolarSSL library.
    +endef
    +
    +define Package/polarssl-progs
    +$(call Package/polarssl/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+libpolarssl
    +  TITLE+= (programs)
    +endef
    +
    +define Package/polarssl-progs/description
    +$(call Package/polarssl/Default/description)
    +This package contains the PolarSSL programs.
    +endef
    +
    +PKG_INSTALL:=1
    +
    +define Build/Configure
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +MAKE_FLAGS += OFLAGS="$(TARGET_CFLAGS)"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/include/polarssl $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/lib/libpolarssl.{a,so} $(1)/usr/lib/
    +endef
    +
    +define Package/libpolarssl/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/libpolarssl.so $(1)/usr/lib/
    +endef
    +
    +define Package/polarssl-progs/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/polarssl_* $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,libpolarssl))
    +$(eval $(call BuildPackage,polarssl-progs))
    diff --git a/libs/polarssl/patches/100-shared.patch b/libs/polarssl/patches/100-shared.patch
    new file mode 100644
    index 0000000..d74d882
    --- /dev/null
    +++ b/libs/polarssl/patches/100-shared.patch
    @@ -0,0 +1,11 @@
    +--- a/library/Makefile
    ++++ b/library/Makefile
    +@@ -29,7 +29,7 @@ OBJS=	aes.o		arc4.o		base64.o	\
    + 
    + .SILENT:
    + 
    +-all: static
    ++all: static shared
    + 
    + static: libpolarssl.a
    + 
    diff --git a/libs/polarssl/patches/110-make.patch b/libs/polarssl/patches/110-make.patch
    new file mode 100644
    index 0000000..2137e0a
    --- /dev/null
    +++ b/libs/polarssl/patches/110-make.patch
    @@ -0,0 +1,20 @@
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -7,7 +7,7 @@ PREFIX=polarssl_
    + all:
    + 	cd library  && $(MAKE) all && cd ..
    + 	cd programs && $(MAKE) all && cd ..
    +-	cd tests && $(MAKE) all && cd ..
    ++	#cd tests && $(MAKE) all && cd ..
    + 
    + install:
    + 	mkdir -p $(DESTDIR)/include/polarssl
    +@@ -28,7 +28,7 @@ install:
    + clean:
    + 	cd library  && $(MAKE) clean && cd ..
    + 	cd programs && $(MAKE) clean && cd ..
    +-	cd tests && $(MAKE) clean && cd ..
    ++	#cd tests && $(MAKE) clean && cd ..
    + 
    + check:
    + 	( cd tests && $(MAKE) check )
    diff --git a/libs/popt/Makefile b/libs/popt/Makefile
    new file mode 100644
    index 0000000..2b9ab13
    --- /dev/null
    +++ b/libs/popt/Makefile
    @@ -0,0 +1,59 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=popt
    +PKG_VERSION:=1.7
    +PKG_RELEASE:=5
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
    +PKG_MD5SUM:=5988e7aeb0ae4dac8d83561265984cc9
    +
    +PKG_FIXUP:=libtool
    +PKG_REMOVE_FILES:=autogen.sh aclocal.m4
    +
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Package/libpopt
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=A command line option parsing library
    +  URL:=http://rpm5.org/files/popt/
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libpopt/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call RequireCommand,xgettext, \
    +	$(PKG_NAME) requires the GNU gettext development package installed on the local system to build. \
    +))
    +
    +$(eval $(call BuildPackage,libpopt))
    +
    diff --git a/libs/popt/patches/002-no-intl.patch b/libs/popt/patches/002-no-intl.patch
    new file mode 100644
    index 0000000..2f9a4e0
    --- /dev/null
    +++ b/libs/popt/patches/002-no-intl.patch
    @@ -0,0 +1,81 @@
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -64,25 +64,14 @@ else
    + 	AC_MSG_RESULT(no)
    + fi
    + 
    +-if test ! -f ../rpm.c
    +-then
    +-  AC_MSG_CHECKING(for GNU xgettext)
    +-  xgettext --version 2>&1 | grep 'GNU gettext' >/dev/null 2>&1 || AC_MSG_ERROR([
    +-  *** GNU gettext is required. The latest version
    +-  *** is always available from ftp://ftp.gnu.org/gnu/gettext/.])
    +-  AC_MSG_RESULT(yes)
    +-fi
    +-
    + AC_CHECK_FUNCS(strerror mtrace getuid geteuid)
    + AC_CHECK_FUNC(setreuid, [], [
    +     AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi])
    + ])
    + 
    +-AM_GNU_GETTEXT
    +-
    + POPT_SOURCE_PATH="`pwd`"
    + AC_DEFINE_UNQUOTED(POPT_SOURCE_PATH, "$POPT_SOURCE_PATH",
    + 	[Full path to popt top_sourcedir.])
    + AC_SUBST(POPT_SOURCE_PATH)
    + 
    +-AC_OUTPUT([Doxyfile Makefile intl/Makefile po/Makefile.in])
    ++AC_OUTPUT([Doxyfile Makefile])
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -4,10 +4,9 @@ AUTOMAKE_OPTIONS = 1.4 foreign
    + 
    + EXTRA_DIST = autogen.sh CHANGES $(man_MANS) popt.spec \
    + 	testit.sh test-poptrc \
    +-	po/*.in po/*.po po/popt.pot \
    + 	popt.ps
    + 
    +-SUBDIRS = intl po
    ++SUBDIRS =
    + 
    + INCLUDES = -I. -I$(top_srcdir)
    + 
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -124,7 +124,7 @@ EXTRA_DIST = autogen.sh CHANGES $(man_MA
    + 	popt.ps
    + 
    + 
    +-SUBDIRS = intl po
    ++SUBDIRS =
    + 
    + INCLUDES = -I. -I$(top_srcdir)
    + 
    +@@ -160,7 +160,7 @@ subdir = .
    + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
    + CONFIG_HEADER = config.h
    +-CONFIG_CLEAN_FILES = Doxyfile intl/Makefile
    ++CONFIG_CLEAN_FILES = Doxyfile
    + LTLIBRARIES = $(lib_LTLIBRARIES)
    + 
    + libpopt_la_LDFLAGS =
    +@@ -261,8 +261,6 @@ distclean-hdr:
    + 	-rm -f config.h stamp-h1
    + Doxyfile: $(top_builddir)/config.status Doxyfile.in
    + 	cd $(top_builddir) && $(SHELL) ./config.status $@
    +-intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in
    +-	cd $(top_builddir) && $(SHELL) ./config.status $@
    + libLTLIBRARIES_INSTALL = $(INSTALL)
    + install-libLTLIBRARIES: $(lib_LTLIBRARIES)
    + 	@$(NORMAL_INSTALL)
    +@@ -584,7 +582,7 @@ distcleancheck_listfiles = find . -type 
    + distdir: $(DISTFILES)
    + 	$(am__remove_distdir)
    + 	mkdir $(distdir)
    +-	$(mkinstalldirs) $(distdir)/. $(distdir)/intl $(distdir)/po
    ++	$(mkinstalldirs) $(distdir)/.
    + 	@list='$(DISTFILES)'; for file in $$list; do \
    + 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
    + 	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
    diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile
    new file mode 100644
    index 0000000..2120155
    --- /dev/null
    +++ b/libs/postgresql/Makefile
    @@ -0,0 +1,243 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=postgresql
    +PKG_VERSION:=9.0.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=\
    +	http://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/v$(PKG_VERSION) \
    +	http://ftp.be.postgresql.org/postgresql/source/v$(PKG_VERSION) \
    +	ftp://ftp-archives.postgresql.org/pub/source/v$(PKG_VERSION)
    +PKG_MD5SUM:=57ba57e43cfe29e16dacbf5789be98d1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libpq
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+zlib +libreadline +libncurses +coreutils-su
    +  TITLE:=PostgreSQL client library
    +  URL:=http://www.postgresql.org/
    +  SUBMENU:=database
    +endef
    +
    +define Package/libpq/description
    +PostgreSQL client library.
    +endef
    +
    +define Package/pgsql-cli
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+libpq
    +  TITLE:=Command Line Interface (CLI) to PostgreSQL databases
    +  URL:=http://www.postgresql.org/
    +  SUBMENU:=database
    +endef
    +
    +define Package/pgsql-cli/description
    +Command Line Interface (CLI) to PostgreSQL databases.
    +endef
    +
    +define Package/pgsql-server
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+libpq
    +  TITLE:=PostgreSQL databases Server
    +  URL:=http://www.postgresql.org/
    +  SUBMENU:=database
    +endef
    +
    +define Package/pgsql-server/description
    +PostgreSQL databases Server.
    +endef
    +
    +# Need a native ecpg ,pg_config, and zic for build
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR); rm -f config.cache; \
    +		./configure \
    +			--prefix=/usr \
    +			--exec-prefix=/usr \
    +			--bindir=/usr/bin \
    +			--datadir=/usr/share \
    +			--includedir=/usr/include \
    +			--infodir=/usr/share/info \
    +			--libdir=/usr/lib \
    +			--libexecdir=/usr/lib \
    +			--localstatedir=/var \
    +			--mandir=/usr/share/man \
    +			--sbindir=/usr/sbin \
    +			--sysconfdir=/etc \
    +			$(DISABLE_NLS) \
    +			--enable-shared \
    +			--enable-static \
    +			--disable-integer-datetimes \
    +			--disable-rpath \
    +			--without-java \
    +			--without-krb4 \
    +			--without-krb5 \
    +			--without-openssl \
    +			--without-pam \
    +			--without-perl \
    +			--without-python \
    +			--without-readline \
    +			--without-rendezvous \
    +			--without-tcl \
    +			--without-tk \
    +			--with-zlib="yes" \
    +			--enable-depend \
    +			--with-system-timezone=/tmp \
    +	);
    +	$(MAKE) -C $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc CC="$(HOSTCC)" CFLAGS+="-I../../libpq"
    +	mv $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg \
    +		$(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg.host
    +	$(MAKE) -C $(PKG_BUILD_DIR)/src/timezone CC="$(HOSTCC)"
    +	mv $(PKG_BUILD_DIR)/src/timezone/zic $(PKG_BUILD_DIR)/host-zic
    +	$(INSTALL_DIR) $(STAGING_DIR)/host/bin/
    +	$(CP) $(PKG_BUILD_DIR)/host-zic $(STAGING_DIR)/host/bin/zic
    +	$(MAKE) -C $(PKG_BUILD_DIR)/src/bin/pg_config CC="$(HOSTCC)"
    +	mv $(PKG_BUILD_DIR)/src/bin/pg_config/pg_config \
    +		$(PKG_BUILD_DIR)/src/bin/pg_config/pg_config.host
    +	$(MAKE) -C $(PKG_BUILD_DIR) distclean
    +
    +	(cd $(PKG_BUILD_DIR); rm -f config.cache; \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		CFLAGS="$(TARGET_CFLAGS)" \
    +		CPPFLAGS="$$$$CPPFLAGS $(TARGET_CPPFLAGS)" \
    +		LDFLAGS="$(TARGET_LDFLAGS)" \
    +		./configure \
    +			--target=$(GNU_TARGET_NAME) \
    +			--host=$(GNU_TARGET_NAME) \
    +			--build=$(GNU_HOST_NAME) \
    +			--program-prefix="" \
    +			--program-suffix="" \
    +			--prefix=/usr \
    +			--exec-prefix=/usr \
    +			--bindir=/usr/bin \
    +			--datadir=/usr/share \
    +			--includedir=/usr/include \
    +			--infodir=/usr/share/info \
    +			--libdir=/usr/lib \
    +			--libexecdir=/usr/lib \
    +			--localstatedir=/var \
    +			--mandir=/usr/share/man \
    +			--sbindir=/usr/sbin \
    +			--sysconfdir=/etc \
    +			$(DISABLE_NLS) \
    +			$(DISABLE_LARGEFILE) \
    +			--enable-shared \
    +			--enable-static \
    +			--disable-integer-datetimes \
    +			--disable-rpath \
    +			--without-java \
    +			--without-krb4 \
    +			--without-krb5 \
    +			--without-openssl \
    +			--without-pam \
    +			--without-perl \
    +			--without-python \
    +			--without-rendezvous \
    +			--without-tcl \
    +			--without-tk \
    +			--with-zlib="yes" \
    +			--enable-depend \
    +			$(if $(CONFIG_TARGET_avr32),--disable-spinlocks) \
    +	);
    +	$(SED) 's@ECPG = ../../preproc/ecpg@ECPG = ../../preproc/ecpg.host@' $(PKG_BUILD_DIR)/src/interfaces/ecpg/test/Makefile.regress
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile
    +	$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all
    +	$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		install
    +endef
    +
    +define Package/libpq/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpq.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/pgsql-cli/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/psql $(1)/usr/bin/
    +endef
    +
    +define Package/pgsql-server/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_DIR) $(1)/usr/share/postgresql
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
    +	ln -sf postgres $(1)/usr/bin/postmaster
    +
    +	$(INSTALL_BIN) ./files/postgresql.init $(1)/etc/init.d/postgresql
    +
    +	$(CP) -r $(PKG_INSTALL_DIR)/usr/share/postgresql/* \
    +		$(1)/usr/share/postgresql
    +
    +	$(INSTALL_DATA) ./files/postgresql.config $(1)/etc/config/postgresql
    +
    +	$(CP) -r \
    +		$(PKG_INSTALL_DIR)/usr/lib/postgresql \
    +		$(1)/usr/lib
    +endef
    +
    +define Package/pgsql-server/postinst
    +#!/bin/sh
    +grep -q '^postgres:' /etc/passwd && exit 0
    +group=$$(grep '^postgres:' /etc/group | cut -f3 -d:)
    +if [ -z "$${group}" ] ; then
    +	group=1000
    +	tst=$$(cat /etc/group | grep ":$${group}:")
    +	while [ -n "$${tst}" ] ; do
    +		group=$$(($${group}+1))
    +		tst=$$(cat /etc/group | grep ":$${group}:")
    +	done
    +	echo "postgres:x:$${group}:" >>/etc/group
    +fi
    +
    +user=$$(cat /etc/passwd | grep "^postgres:")
    +if [ -z "$${user}" ] ; then
    +	num="$${group}"
    +	tst=$$(cat /etc/passwd | grep ":.*:$${num}:")
    +	while [ -n "$${tst}" ] ; do
    +		num=$$(($${num}+1))
    +		tst=$$(cat /etc/passwd | grep ":.*:$${num}:")
    +	done
    +	echo "postgres:*:$${num}:$${group}:PostgreSQL administrator:/tmp:/bin/ash" >>/etc/passwd
    +fi
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/bin/pg_config/pg_config.host $(1)/usr/bin/pg_config
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libpq $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libpq-fe.h $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/pg_config.h $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/pg_config_manual.h $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/postgres_ext.h $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/postgresql $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpq.{a,so*} $(1)/usr/lib/
    +	$(CP) $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg.host $(1)/usr/bin/ecpg
    +	$(CP) $(PKG_BUILD_DIR)/host-zic $(1)/usr/bin/zic
    +endef
    +
    +$(eval $(call BuildPackage,libpq))
    +$(eval $(call BuildPackage,pgsql-cli))
    +$(eval $(call BuildPackage,pgsql-server))
    diff --git a/libs/postgresql/files/postgresql.config b/libs/postgresql/files/postgresql.config
    new file mode 100644
    index 0000000..df17c12
    --- /dev/null
    +++ b/libs/postgresql/files/postgresql.config
    @@ -0,0 +1,5 @@
    +config postgresql config
    +	option PGUSER	postgres
    +	option PGDATA	/var/postgresql/data
    +	option PGLOG	/var/postgresql/data/postgresql.log
    +	option PG_CTL	/usr/bin/pg_ctl
    diff --git a/libs/postgresql/files/postgresql.init b/libs/postgresql/files/postgresql.init
    new file mode 100644
    index 0000000..1e1c52f
    --- /dev/null
    +++ b/libs/postgresql/files/postgresql.init
    @@ -0,0 +1,93 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +EXTRA_COMMANDS="status reload"
    +
    +config_load "postgresql"
    +config_get pgdata config PGDATA
    +config_get pguser config PGUSER
    +config_get pgctl config PG_CTL
    +config_get pglog config PGLOG
    +
    +start() {
    +    if [ ! -e /usr/bin/su ]; then
    +        echo "The su command is requred to run postgres"
    +        exit 1
    +    fi
    +
    +    if [ ! -d ${pgdata} ]; then
    +        echo "Create the data directory (${pgdata}) and try again"
    +        exit 1
    +    fi
    +
    +    echo "starting postgres..."
    +    # make sure localhost (without a dot) is in /etc/hosts
    +    grep -q 'localhost$' /etc/hosts || echo '127.0.0.1 localhost' >> /etc/hosts
    +
    +    # for whatever reason, /dev/null gets wrong perms
    +    chmod a+w /dev/null
    +
    +    if [ -f ${pgdata}/postmaster.pid ]; then
    +        rm ${pgdata}/postmaster.pid
    +    fi
    +
    +    config_get pgopts config PGOPTS
    +    if [ -n "${pgopts}" ]; then
    +        pgopts="-o ${pgopts}"
    +    fi
    +    /usr/bin/su ${pguser} -c "/usr/bin/postmaster -D '${pgdata}' &" >> ${pglog} 2>&1
    +
    +    while :
    +    do
    +        cnt=$((${cnt} + 1))
    +        if [ -f "${pgdata}/postmaster.pid" ]; then
    +            ret=0
    +            break
    +        fi
    +
    +        if [ ${cnt} -eq 30 ]; then
    +            echo "Postgres failed to start.  See ${pglog} for details"
    +            ret=1
    +            break
    +        fi
    +        sleep 1
    +    done
    +
    +    echo "ok"
    +    return ${ret}
    +}
    +
    +stop() {
    +    echo "stopping postgres..."
    +    /usr/bin/su ${pguser} -c "${pgctl} stop -D '${pgdata}' -s -m fast"
    +    ret=$?
    +    if [ -f ${pgdata}/postmaster.pid ]; then
    +        rm ${pgdata}/postmaster.pid
    +    fi
    +    echo "ok"
    +    return ${ret}
    +}
    +
    +restart() {
    +    echo "restarting postgres..."
    +    /usr/bin/su ${pguser} -c "${pgctl} stop -D '${pgdata}' -s -m fast -w"
    +    if [ -f ${pgdata}/postmaster.pid ]; then
    +        rm ${pgdata}/postmaster.pid
    +    fi
    +    /usr/bin/su ${pguser} -c "/usr/bin/postmaster -D '${pgdata}' &" >> ${pglog} 2>&1
    +    echo "ok"
    +    return $?
    +}
    +
    +reload() {
    +    echo "reloading postgres..."
    +    /usr/bin/su ${pguser} -c "${pgctl} reload -D '${pgdata}' -s"
    +    echo "ok"
    +}
    +
    +status() {
    +    echo "status postgres..."
    +    /usr/bin/su ${pguser} -c "${pgctl} status -D '${pgdata}'"
    +    echo "ok"
    +}
    diff --git a/libs/postgresql/patches/200-ranlib.patch b/libs/postgresql/patches/200-ranlib.patch
    new file mode 100644
    index 0000000..1b68b83
    --- /dev/null
    +++ b/libs/postgresql/patches/200-ranlib.patch
    @@ -0,0 +1,10 @@
    +--- a/src/port/Makefile
    ++++ b/src/port/Makefile
    +@@ -53,6 +53,7 @@ uninstall:
    + 
    + libpgport.a: $(OBJS)
    + 	$(AR) $(AROPT) $@ $^
    ++	$(RANLIB) libpgport.a
    + 
    + # thread.o needs PTHREAD_CFLAGS (but thread_srv.o does not)
    + thread.o: thread.c
    diff --git a/libs/postgresql/patches/800-busybox-default-pager.patch b/libs/postgresql/patches/800-busybox-default-pager.patch
    new file mode 100644
    index 0000000..3cd2532
    --- /dev/null
    +++ b/libs/postgresql/patches/800-busybox-default-pager.patch
    @@ -0,0 +1,13 @@
    +--- a/src/bin/psql/print.h
    ++++ b/src/bin/psql/print.h
    +@@ -171,10 +171,6 @@ extern void printQuery(const PGresult *r
    + extern void setDecimalLocale(void);
    + extern const printTextFormat *get_line_style(const printTableOpt *opt);
    + 
    +-#ifndef __CYGWIN__
    +-#define DEFAULT_PAGER "more"
    +-#else
    + #define DEFAULT_PAGER "less"
    +-#endif
    + 
    + #endif   /* PRINT_H */
    diff --git a/libs/protobuf/Makefile b/libs/protobuf/Makefile
    new file mode 100644
    index 0000000..6436aba
    --- /dev/null
    +++ b/libs/protobuf/Makefile
    @@ -0,0 +1,74 @@
    +# 
    +# Copyright (C) 2007 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=protobuf
    +PKG_VERSION:=2.4.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://protobuf.googlecode.com/files
    +PKG_MD5SUM:=ed436802019c9e1f40cc750eaf78f318
    +
    +PKG_BUILD_DEPENDS:=protobuf/host
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/host-build.mk
    +
    +define Package/protobuf
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=A structured data encoding library
    +  URL:=http://code.google.com/p/protobuf/
    +  DEPENDS:=+zlib
    +  MAINTAINER:=Obinou 
    +endef
    +
    +define Package/protobuf/description
    + Protocol Buffers are a way of encoding structured data in an efficient
    + yet extensible format. Google uses Protocol Buffers for almost all
    + of its internal RPC protocols and file formats. 
    +endef
    +
    +CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOST)/bin/protoc
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) \
    +		$(1)/usr/lib \
    +		$(1)/usr/include
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/* \
    +		$(1)/usr/include/
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/* \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/protobuf/install
    +	$(INSTALL_DIR) \
    +		$(1)/usr/lib
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libprotoc.so*  \
    +		$(1)/usr/lib/
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
    +		$(1)/usr/lib/
    +	
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libprotobuf.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,protobuf))
    +$(eval $(call HostBuild))
    diff --git a/libs/pthsem/Makefile b/libs/pthsem/Makefile
    new file mode 100644
    index 0000000..4b5096c
    --- /dev/null
    +++ b/libs/pthsem/Makefile
    @@ -0,0 +1,58 @@
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=pthsem
    +PKG_VERSION:=2.0.8
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.auto.tuwien.ac.at/~mkoegler/pth/
    +PKG_MD5SUM:=9144b26dcc27e67498d63dd5456f934c
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
    +PKG_FIXUP:=libtool
    +PKG_BUILD_PARALLEL:=1
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/pthsem
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=GNU pth extended with semaphore support
    +  URL:=http://www.auto.tuwien.ac.at/~mkoegler/index.php/pth
    +endef
    +
    +define Package/pthsem/description
    +  GNU pth is a user mode multi threading library.
    +  pthsem is an extend version, with support for semaphores added. It can be installed parallel to a normal pth.
    +endef
    +
    +MAKE_FLAGS += \
    +        OPTIM="$(TARGET_CFLAGS)" \
    +        CFLAGS="$(TARGET_CFLAGS)" \
    +        DESTDIR="$(PKG_INSTALL_DIR)"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/pthsem-config \
    +		$(2)/bin/
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
    +		$(2)/bin/pthsem-config
    +
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP)   $(PKG_INSTALL_DIR)/usr/include/*.h \
    +		$(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP)   $(PKG_INSTALL_DIR)/usr/lib/libpthsem.{a,la,so*} \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/pthsem/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpthsem.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,pthsem))
    diff --git a/libs/ptlib/Makefile b/libs/ptlib/Makefile
    new file mode 100644
    index 0000000..bac7a2e
    --- /dev/null
    +++ b/libs/ptlib/Makefile
    @@ -0,0 +1,109 @@
    +# 
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ptlib
    +PKG_VERSION:=2.2.1
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.bz2
    +PKG_SOURCE_URL:=@SF/opalvoip
    +PKG_MD5SUM:=dc266ba315e130b304854592e6388725
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/ptlib
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libexpat
    +  TITLE:=Portable Tools library
    +  URL:=http://www.opalvoip.org/
    +endef
    +
    +define Package/ptlib/description
    + PTLib is a moderately large class library that has its genesis many years ago as
    + PWLib (portable Windows Library), a method to product applications to run on both
    + Microsoft Windows and Unix X-Windows systems. It also was to have a Macintosh port
    + as well but that never eventuated. The parts of the library relating to GUI
    + functions have long been removed as other class libraries such as wxWidgets were
    + much more advanced.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-minsize \
    +	--enable-opal \
    +	--enable-internalregex \
    +	--enable-audio \
    +	--disable-alsa \
    +	--disable-asn \
    +	--disable-avc \
    +	--enable-configfile \
    +	--disable-dc \
    +	--disable-dtmf \
    +	--enable-expat \
    +	--disable-ftp \
    +	--disable-http \
    +	--disable-httpsvc \
    +	--disable-jabber \
    +	--disable-odbc \
    +	--disable-openldap \
    +	--disable-openssl \
    +	--disable-oss \
    +	--disable-pipechan \
    +	--disable-plugins \
    +	--disable-pop3smtp \
    +	--disable-remconn \
    +	--enable-resolver \
    +	--enable-qos \
    +	--disable-sasl \
    +	--disable-sdl \
    +	--disable-serial \
    +	--disable-shm-video \
    +	--disable-snmp \
    +	--disable-soap \
    +	--disable-socks \
    +	--enable-stun \
    +	--disable-telnet \
    +	--disable-tts \
    +	--disable-v4l \
    +	--disable-v4l2 \
    +	--disable-bsdvideo \
    +	--disable-video \
    +	--disable-vxml \
    +	--enable-wavfile \
    +	--disable-xmlrpc \
    +
    +CONFIGURE_VARS += \
    +	CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti" \
    +
    +CONFIGURE_CMD = ./configure
    +
    +define Build/Configure/Default
    +        (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/$(strip $(3)); \
    +        if [ -x $(CONFIGURE_CMD) ]; then \
    +                $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/$(3)/ && \
    +                $(CONFIGURE_VARS) \
    +                $(2) \
    +                $(CONFIGURE_CMD) \
    +                $(CONFIGURE_ARGS) \
    +                $(1); \
    +        fi; \
    +        )
    +endef
    +
    +MAKE_FLAGS += optnoshared
    +
    +define Build/InstallDev
    +	ln -sf $(PKG_NAME)_$(PKG_VERSION) $(BUILD_DIR)/$(PKG_NAME)
    +	$(SED) 's|//\(#include \)|\1|' $(PKG_BUILD_DIR)/include/ptlib.h
    +endef
    +
    +$(eval $(call BuildPackage,ptlib))
    diff --git a/libs/ptlib/patches/010-fix-gcc_4_3-compile.patch b/libs/ptlib/patches/010-fix-gcc_4_3-compile.patch
    new file mode 100644
    index 0000000..2242794
    --- /dev/null
    +++ b/libs/ptlib/patches/010-fix-gcc_4_3-compile.patch
    @@ -0,0 +1,13 @@
    +diff --git a/src/ptclib/sockagg.cxx b/src/ptclib/sockagg.cxx
    +index a8f89d2..c1960f6 100644
    +--- a/src/ptclib/sockagg.cxx
    ++++ b/src/ptclib/sockagg.cxx
    +@@ -38,6 +38,7 @@
    + 
    + #include 
    + #include 
    +-
    ++#include 
    ++
    + #define new PNEW
    + 
    diff --git a/libs/pwlib/Makefile b/libs/pwlib/Makefile
    new file mode 100644
    index 0000000..36c4ae6
    --- /dev/null
    +++ b/libs/pwlib/Makefile
    @@ -0,0 +1,90 @@
    +# 
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=pwlib
    +PKG_VERSION:=1.11.1
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=ftp://peternixon.net/pub/voxgratia
    +PKG_MD5SUM:=e1102dfd2608e3a117a2e016d0db53e3
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/pwlib-$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/pwlib
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Portable Windows library
    +  URL:=http://www.voxgratia.org/
    +endef
    +
    +define Package/pwlib/description
    + PWLib is a moderately large class library that was created as a method to 
    + produce applications that run on both Microsoft Windows and the X Window 
    + System.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-minsize \
    +	--enable-openh323 \
    +	--enable-opal \
    +	--disable-internalregex \
    +	--disable-plugins \
    +	--enable-audio \
    +	--disable-alsa \
    +	--enable-asn \
    +	--disable-avc \
    +	--disable-dc \
    +	--disable-dtmf \
    +	--disable-expat \
    +	--disable-ftp \
    +	--enable-http \
    +	--disable-httpsvc \
    +	--disable-jabber \
    +	--disable-openldap \
    +	--disable-openssl \
    +	--disable-oss \
    +	--disable-pipechan \
    +	--disable-pop3smtp \
    +	--disable-remconn \
    +	--disable-resolver \
    +	--disable-qos \
    +	--disable-sasl \
    +	--disable-sdl \
    +	--disable-serial \
    +	--disable-shm-video \
    +	--disable-snmp \
    +	--disable-soap \
    +	--disable-socks \
    +	--enable-stun \
    +	--disable-telnet \
    +	--disable-tts \
    +	--disable-v4l \
    +	--disable-v4l2 \
    +	--disable-bsdvideo \
    +	--disable-video \
    +	--disable-vxml \
    +	--disable-wavfile \
    +	--disable-xmlrpc \
    +
    +CONFIGURE_VARS += \
    +	STDCXXFLAGS="$(TARGET_CFLAGS) -fno-builtin" \
    +
    +MAKE_FLAGS += optnoshared
    +
    +define Build/InstallDev
    +	ln -sf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR)/$(PKG_NAME)
    +	$(SED) 's|//\(#include \)|\1|' $(PKG_BUILD_DIR)/include/ptlib.h
    +endef
    +
    +$(eval $(call BuildPackage,pwlib))
    diff --git a/libs/pwlib/patches/002-lib_mak.patch b/libs/pwlib/patches/002-lib_mak.patch
    new file mode 100644
    index 0000000..43018bd
    --- /dev/null
    +++ b/libs/pwlib/patches/002-lib_mak.patch
    @@ -0,0 +1,11 @@
    +--- pwlib-cvs-20051227/make/lib.mak.orig	2005-09-25 12:51:23.000000000 +0200
    ++++ pwlib-cvs-20051227/make/lib.mak	2005-12-30 01:18:21.000000000 +0100
    +@@ -201,7 +201,7 @@
    +       LDSOOPTS += -Wl,--kill-at
    +     else
    +     ifneq ($(OSTYPE),Darwin)
    +-      LDSOOPTS += -Wl,-soname,$(LIB_SONAME)
    ++      LDSOOPTS += -soname,$(LIB_SONAME)
    +     endif
    +     endif
    +     LD = $(CPLUS)
    diff --git a/libs/radiusclient-ng/Makefile b/libs/radiusclient-ng/Makefile
    new file mode 100644
    index 0000000..5a2a6ff
    --- /dev/null
    +++ b/libs/radiusclient-ng/Makefile
    @@ -0,0 +1,96 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=radiusclient-ng
    +PKG_VERSION:=0.5.6
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://download.berlios.de/radiusclient-ng/
    +PKG_MD5SUM:=6fb7d4d0aefafaee7385831ac46a8e9c
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/radiusclient-ng/Default
    +  URL:=http://developer.berlios.de/projects/radiusclient-ng/
    +endef
    +
    +define Package/radiusclient-ng/Default/description
    + Purpose of this project is to build a portable, easy-to-use and 
    + standard compliant library suitable for developing free and commercial 
    + software that need support for RADIUS protocol (RFCs 2128 and 2139).
    +endef
    +
    +define Package/libradiusclient-ng
    +$(call Package/radiusclient-ng/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=RADIUS client library
    +endef
    +
    +define Package/libradiusclient-ng/description
    +$(call Package/radiusclient-ng/Default/description)
    + This package contains shared libraries, needed by other programs.
    +endef
    +
    +define Package/libradiusclient-ng/conffiles
    +/etc/radiusclient-ng/issue
    +/etc/radiusclient-ng/port-id-map
    +/etc/radiusclient-ng/radiusclient.conf
    +/etc/radiusclient-ng/servers
    +endef
    +
    +define Package/radiusclient-ng
    +  $(call Package/radiusclient-ng/Default)
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libradiusclient-ng
    +  TITLE:=RADIUS client
    +endef
    +
    +define Package/radiusclient-ng/description
    +$(call Package/radiusclient-ng/Default/description)
    + This package contains a RADIUS client.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/radiusclient-ng.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiusclient-ng.{a,so}* $(1)/usr/lib/
    +endef
    +
    +define Package/libradiusclient-ng/install
    +	$(INSTALL_DIR) $(1)/etc
    +	$(CP) $(PKG_INSTALL_DIR)/etc/radiusclient-ng $(1)/etc/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libradiusclient-ng.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/radiusclient-ng/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rad{acct,iusclient,login,status} $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,libradiusclient-ng))
    +$(eval $(call BuildPackage,radiusclient-ng))
    diff --git a/libs/radiusclient-ng/patches/001-cross_compile.patch b/libs/radiusclient-ng/patches/001-cross_compile.patch
    new file mode 100644
    index 0000000..3925563
    --- /dev/null
    +++ b/libs/radiusclient-ng/patches/001-cross_compile.patch
    @@ -0,0 +1,48 @@
    +--- a/configure
    ++++ b/configure
    +@@ -23332,8 +23332,7 @@ echo $ECHO_N "checking for field domainn
    +   { { 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; }; }
    ++See \`config.log' for more details." >&2;} }
    + else
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -104,32 +104,7 @@ AC_REPLACE_FUNCS(strdup strerror strcase
    + AC_CHECK_FUNCS(flock fcntl uname gethostname sysinfo getdomainname)
    + AC_CHECK_FUNCS(stricmp random rand snprintf vsnprintf)
    + 
    +-if test "$ac_cv_func_uname" = 'yes'
    +-then
    +-	AC_MSG_CHECKING([for field domainname in struct utsname])
    +-	AC_TRY_RUN([
    +-	#include 
    +-	
    +-	main(int argc, char **argv)
    +-	{
    +-		struct utsname uts;
    +-		uts.domainname[0] = '\0';
    +-	}
    +-	],
    +-	AC_MSG_RESULT(yes)
    +-	AC_DEFINE(HAVE_STRUCT_UTSNAME_DOMAINNAME),
    +-	AC_MSG_RESULT(no)
    +-	)
    +-fi
    +-
    +-AC_MSG_CHECKING([for /dev/urandom])
    +-if test -c /dev/urandom
    +-then
    +-	AC_MSG_RESULT(yes)
    +-	AC_DEFINE(HAVE_DEV_URANDOM)
    +-else
    +-	AC_MSG_RESULT(no)
    +-fi
    ++AC_DEFINE(HAVE_DEV_URANDOM)
    + 
    + dnl Determine PATH setting
    + echo $ac_n "using the following PATH setting for exec'ed programs... $ac_c" 1>&6
    diff --git a/libs/radlib/Makefile b/libs/radlib/Makefile
    new file mode 100644
    index 0000000..43c8583
    --- /dev/null
    +++ b/libs/radlib/Makefile
    @@ -0,0 +1,48 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=radlib
    +PKG_VERSION:=2.8.5
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/radlib
    +PKG_MD5SUM:=82ab0c702e55a860b69ad76e2aac748f
    +
    +ifeq ($(CONFIG_EXTERNAL_KERNEL_TREE),)
    +PATCH_DIR:=
    +else
    +PATCH_DIR:=./patches
    +endif
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/radlib
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Rapid Application Development Library
    +  URL:=http://www.radlib.teel.ws/
    +endef
    +
    +define Package/radlib/description
    +	radlib is a rapid application development library for unix multi-process applications
    +endef
    +
    +CONFIGURE_ARGS += \
    +		  --prefix="$(TOOLCHAIN_DIR)/usr"
    +
    +define Package/radlib/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/.libs/librad.so $(1)/usr/lib/
    +endef
    +
    +
    +$(eval $(call BuildPackage,radlib))
    diff --git a/libs/radlib/patches/001-cross_link_bug.patch b/libs/radlib/patches/001-cross_link_bug.patch
    new file mode 100644
    index 0000000..00dc1c4
    --- /dev/null
    +++ b/libs/radlib/patches/001-cross_link_bug.patch
    @@ -0,0 +1,44 @@
    +diff -urN radlib-2.8.4/debug/Makefile.am radlib-2.8.42/debug/Makefile.am
    +--- radlib-2.8.4/debug/Makefile.am	2009-02-05 06:10:01.000000000 +0100
    ++++ radlib-2.8.42/debug/Makefile.am	2009-10-04 16:40:08.000000000 +0200
    +@@ -43,5 +43,5 @@
    + endif
    + 
    + if CROSSCOMPILE
    +-raddebug_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
    ++#raddebug_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
    + endif
    +diff -urN radlib-2.8.4/debug/Makefile.in radlib-2.8.42/debug/Makefile.in
    +--- radlib-2.8.4/debug/Makefile.in	2009-08-15 16:03:37.000000000 +0200
    ++++ radlib-2.8.42/debug/Makefile.in	2009-10-04 16:40:17.000000000 +0200
    +@@ -43,7 +43,7 @@
    + @MYSQL_FALSE@@PGRESQL_TRUE@am__append_6 = -I$(prefix)/pgsql/include
    + @SQLITE_TRUE@am__append_7 = -L/usr/lib -L/usr/local/lib
    + @SQLITE_TRUE@am__append_8 = -I/usr/include -I/usr/local/include
    +-@CROSSCOMPILE_TRUE@am__append_9 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
    ++#@CROSSCOMPILE_TRUE@am__append_9 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
    + subdir = debug
    + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
    + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    +diff -urN radlib-2.8.4/msgRouter/Makefile.am radlib-2.8.42/msgRouter/Makefile.am
    +--- radlib-2.8.4/msgRouter/Makefile.am	2009-02-05 06:10:01.000000000 +0100
    ++++ radlib-2.8.42/msgRouter/Makefile.am	2009-10-04 16:31:24.000000000 +0200
    +@@ -44,5 +44,5 @@
    + endif
    + 
    + if CROSSCOMPILE
    +-radmrouted_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
    ++#radmrouted_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
    + endif
    +diff -urN radlib-2.8.4/msgRouter/Makefile.in radlib-2.8.42/msgRouter/Makefile.in
    +--- radlib-2.8.4/msgRouter/Makefile.in	2009-08-15 16:03:37.000000000 +0200
    ++++ radlib-2.8.42/msgRouter/Makefile.in	2009-10-04 16:36:01.000000000 +0200
    +@@ -43,7 +43,7 @@
    + @MYSQL_FALSE@@PGRESQL_TRUE@am__append_6 = -I$(prefix)/pgsql/include
    + @SQLITE_TRUE@am__append_7 = -L/usr/lib -L/usr/local/lib
    + @SQLITE_TRUE@am__append_8 = -I/usr/include -I/usr/local/include
    +-@CROSSCOMPILE_TRUE@am__append_9 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
    ++#@CROSSCOMPILE_TRUE@am__append_9 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
    + subdir = msgRouter
    + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
    + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    diff --git a/libs/rblibtorrent/Makefile b/libs/rblibtorrent/Makefile
    new file mode 100644
    index 0000000..760f185
    --- /dev/null
    +++ b/libs/rblibtorrent/Makefile
    @@ -0,0 +1,77 @@
    +#
    +# Copyright (C) 2007 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +# $Id: Makefile 9173 2007-10-07 03:20:26Z blogic $
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=rblibtorrent
    +PKG_VERSION:=0.14.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=libtorrent-rasterbar-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/libtorrent
    +PKG_MD5SUM:=6959f719245d82758235fd73d93373b2
    +PKG_BUILD_DIR:=$(BUILD_DIR)/libtorrent-rasterbar-$(PKG_VERSION)
    +PKG_BUILD_DEPENDS:=libtool
    +BOOSTPOSTFIX=mt
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/rblibtorrent
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Rasterbar BitTorrent library
    +  URL:=http://www.rasterbar.com/products/libtorrent/
    +  DEPENDS:=+boost +boost-python +boost-filesystem +boost-regex +boost-thread +boost-program_options +boost-system +libopenssl @BROKEN
    +endef
    +
    +define Package/rblibtorrent/description
    +Rasterbar libtorrent is a C++ library that aims to be a good alternative to
    +all the other bittorrent implementations around. It is a library and not a
    +full featured client, although it comes with a working example client.
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--enable-shared \
    +	--disable-debug \
    +	--enable-python-binding \
    +	--with-ssl=$(STAGING_DIR)/usr \
    +	--with-boost=$(STAGING_DIR)/usr/include \
    +	--with-boost-libdir=$(STAGING_DIR)/usr/lib \
    +	--with-zlib=detect \
    +	--with-boost-system=boost_system-$(BOOSTPOSTFIX) \
    +	--with-boost-filesystem=boost_filesystem-$(BOOSTPOSTFIX) \
    +	--with-boost-thread=boost_thread-$(BOOSTPOSTFIX) \
    +	--with-boost-regex=boost_regex-$(BOOSTPOSTFIX) \
    +	--with-boost-python=boost_python-$(BOOSTPOSTFIX) \
    +	--with-boost-program_options=boost_program_options-$(BOOSTPOSTFIX)
    +
    +CONFIGURE_VARS+=CC="$(TARGET_CXX)"
    +
    +EXTRA_LDFLAGS+=-lz -lpthread
    +
    +define Build/Compile
    +	$(call Build/Compile/Default)
    +	$(call Build/Install/Default)
    +endef
    +
    +define Build/InstallDev
    +	mkdir -p $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libtorrent $(1)/usr/include/
    +	mkdir -p $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
    +	mkdir -p $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent-rasterbar.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/rblibtorrent/install
    +	$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/lib/python2.6/site-packages/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.6/site-packages/*.so* $(1)/usr/lib/python2.6/site-packages/
    +endef
    +
    +$(eval $(call BuildPackage,rblibtorrent))
    diff --git a/libs/rblibtorrent/patches/enable-shared-linking.patch b/libs/rblibtorrent/patches/enable-shared-linking.patch
    new file mode 100644
    index 0000000..dec80cc
    --- /dev/null
    +++ b/libs/rblibtorrent/patches/enable-shared-linking.patch
    @@ -0,0 +1,11 @@
    +--- libtorrent-rasterbar-0.14.7/bindings/python/Makefile.in	2009-11-18 09:25:39.000000000 +0100
    ++++ libtorrent-rasterbar-0.14.7/bindings/python/Makefile.in	2010-02-26 13:27:58.000000000 +0100
    +@@ -408,7 +408,7 @@
    + 
    + 
    + @ENABLE_PYTHON_BINDING_TRUE@all-local:
    +-@ENABLE_PYTHON_BINDING_TRUE@	$(PYTHON) setup.py build
    ++@ENABLE_PYTHON_BINDING_TRUE@	CXX="$(CXX) -pthread -shared" $(PYTHON) setup.py build
    + 
    + @ENABLE_PYTHON_BINDING_TRUE@install-exec-local:
    + @ENABLE_PYTHON_BINDING_TRUE@	$(PYTHON) setup.py install @PYTHON_INSTALL_PARAMS@
    diff --git a/libs/re/Makefile b/libs/re/Makefile
    new file mode 100644
    index 0000000..13c0f27
    --- /dev/null
    +++ b/libs/re/Makefile
    @@ -0,0 +1,67 @@
    +#
    +# Makefile
    +#
    +# Copyright (C) 2010 Alfred E. Heggestad
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=re
    +PKG_VERSION:=0.2.0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.creytiv.com/pub
    +PKG_MD5SUM:=0aa00762fbee7694b9e5844675f5c57d
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libre
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libopenssl +libpthread @BROKEN
    +  TITLE:=Generic library for real-time communications with async IO support
    +  URL:=http://www.creytiv.com/
    +endef
    +
    +define Package/libre/description
    +	Generic library for real-time communications with async IO support.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		HAVE_LIBRESOLV= \
    +		CC="$(TARGET_CC)" \
    +		EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
    +		EXTRA_LFLAGS="-lm" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		SYSROOT="$(TOOLCHAIN_DIR)" \
    +		SYSROOT_ALT="$(STAGING_DIR)/usr" \
    +		RELEASE=1 \
    +		all install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/share/re
    +	$(CP) $(PKG_BUILD_DIR)/mk/re.mk $(1)/usr/share/re/
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/re $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Build/UninstallDev
    +	rm -rf \
    +		$(STAGING_DIR)/usr/share/re \
    +		$(STAGING_DIR)/usr/include/re \
    +		$(STAGING_DIR)/usr/lib/libre.{a,so*}
    +endef
    +
    +define Package/libre/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libre))
    diff --git a/libs/rrdtool-1.0.x/Makefile b/libs/rrdtool-1.0.x/Makefile
    new file mode 100644
    index 0000000..4e0eebc
    --- /dev/null
    +++ b/libs/rrdtool-1.0.x/Makefile
    @@ -0,0 +1,131 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=rrdtool1
    +PKG_VERSION:=1.0.50
    +PKG_RELEASE:=1
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/rrdtool-$(PKG_VERSION)
    +PKG_SOURCE:=rrdtool-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:= \
    +	http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.0.x \
    +	http://www.fastmirrors.org/rrdtool/rrdtool-1.0.x \
    +	ftp://ftp.sunet.se/pub/network/monitoring/rrdtool/rrdtool-1.0.x
    +PKG_MD5SUM:=c466e2e7df95fa8e318e46437da87686
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/rrdtool1/Default
    +  TITLE:=Round Robin Database (RRD)
    +  URL:=http://oss.oetiker.ch/rrdtool/
    +endef
    +
    +define Package/rrdtool1/description/Default
    + RRD is the Acronym for Round Robin Database. RRD is a system to store and
    + display time-series data (i.e. network bandwidth, machine-room temperature,
    + server load average). It stores the data in a very compact way that will
    + not expand over time, and it presents useful graphs by processing the data
    + to enforce a certain data density. It can be used either via simple wrapper
    + scripts (from shell or Perl) or via frontends that poll network devices and
    + put friendly user interface on it.
    +
    + This is version 1.0.x with cgilib-0.4, gd1.3 and libpng-1.0.9 linked into
    + librrd.so. The library is much smaller compared to the 1.2.x version with
    + separate dynamic linked libraries.
    +endef
    +
    +define Package/librrd1
    +$(call Package/rrdtool1/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+zlib
    +  TITLE+= management library
    +endef
    +
    +define Package/librrd1/description
    +$(call Package/rrdtool1/description/Default)
    + This package contains a shared library, used by other programs.
    +endef
    +
    +define Package/rrdcgi1
    +$(call Package/rrdtool1/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+librrd1
    +  TITLE+= CGI graphing tool
    +endef
    +
    +define Package/rrdcgi1/description
    +$(call Package/rrdtool1/description/Default)
    + This package contains the rrdcgi tool used to create web pages containing
    + RRD graphs based on templates.
    +endef
    +
    +define Package/rrdtool1
    +$(call Package/rrdtool1/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+librrd1
    +  TITLE+= management tools
    +endef
    +
    +define Package/rrdtool1/description
    +$(call Package/rrdtool1/description/Default)
    + This package contains command line tools used to manage RRDs.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC) --std=c99
    +
    +CONFIGURE_ARGS += \
    +	$(DISABLE_NLS) \
    +	--enable-shared=yes \
    +	--enable-static=yes \
    +	--disable-rpath \
    +	--with-gnu-ld \
    +	--enable-local-zlib
    +
    +CONFIGURE_VARS += \
    +	ac_cv_path_PERL=no \
    +	rd_cv_ieee_works=yes \
    +	shrext_cmds=".so"
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		shrext_cmds=".so" \
    +		all install
    +endef
    +
    +define Package/rrdtool1/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/rrd{tool,update} $(1)/usr/bin/
    +endef
    +
    +define Package/rrdcgi1/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(1)/usr/bin/
    +endef
    +
    +define Package/librrd1/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(1)/usr/lib/
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/lib/rrdtool-1.0/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(1)/usr/lib/rrdtool-1.0/include/
    +	$(INSTALL_DIR)  $(1)/usr/lib/rrdtool-1.0/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.{a,so*} $(1)/usr/lib/rrdtool-1.0/lib/
    +endef
    +
    +$(eval $(call BuildPackage,librrd1))
    +$(eval $(call BuildPackage,rrdcgi1))
    +$(eval $(call BuildPackage,rrdtool1))
    diff --git a/libs/rrdtool-1.0.x/patches/001-no_ordering_cd_joke.patch b/libs/rrdtool-1.0.x/patches/001-no_ordering_cd_joke.patch
    new file mode 100644
    index 0000000..442fe49
    --- /dev/null
    +++ b/libs/rrdtool-1.0.x/patches/001-no_ordering_cd_joke.patch
    @@ -0,0 +1,21 @@
    +diff -urN rrdtool-1.0.50/configure rrdtool-1.0.50.new/configure
    +--- rrdtool-1.0.50/configure	2005-04-25 22:48:09.000000000 +0200
    ++++ rrdtool-1.0.50.new/configure	2009-03-09 17:25:38.000000000 +0100
    +@@ -24873,17 +24873,12 @@
    + echo "${ECHO_T}and out again" >&6
    + 
    + echo $ECHO_N "ordering CD from http://people.ee.ethz.ch/~oetiker/wish $ac_c" 1>&6
    +-sleep 1
    + echo $ECHO_N ".$ac_c" 1>&6
    +-sleep 2
    + echo $ECHO_N ".$ac_c" 1>&6
    +-sleep 1
    + echo $ECHO_N ".$ac_c" 1>&6
    +-sleep 3
    + echo $ECHO_N ".$ac_c" 1>&6
    + echo $ECHO_N ".$ac_c" 1>&6
    + echo $ECHO_N ".$ac_c" 1>&6
    +-sleep 2
    + echo "$as_me:$LINENO: result:  just kidding ;-)" >&5
    + echo "${ECHO_T} just kidding ;-)" >&6
    + echo
    diff --git a/libs/rrdtool-1.0.x/patches/002-no_timezone.patch b/libs/rrdtool-1.0.x/patches/002-no_timezone.patch
    new file mode 100644
    index 0000000..07564b4
    --- /dev/null
    +++ b/libs/rrdtool-1.0.x/patches/002-no_timezone.patch
    @@ -0,0 +1,24 @@
    +--- a/src/rrd_tool.c
    ++++ b/src/rrd_tool.c
    +@@ -225,11 +225,8 @@
    + 	  struct rusage  myusage;
    + 	  struct timeval starttime;
    + 	  struct timeval currenttime;
    +-	  struct timezone tz;
    + 
    +-	    tz.tz_minuteswest =0;
    +-	    tz.tz_dsttime=0;
    +-	    gettimeofday(&starttime,&tz);
    ++	    gettimeofday(&starttime,NULL);
    + #endif
    + 
    + 	    while (fgets(aLine, sizeof(aLine)-1, stdin)){
    +@@ -252,7 +249,7 @@
    + 
    + #if HAVE_GETRUSAGE
    + 		getrusage(RUSAGE_SELF,&myusage);
    +-		gettimeofday(¤ttime,&tz);
    ++		gettimeofday(¤ttime,NULL);
    + 		printf("OK u:%1.2f s:%1.2f r:%1.2f\n",
    + 		       (double)myusage.ru_utime.tv_sec+
    + 		       (double)myusage.ru_utime.tv_usec/1000000.0,
    diff --git a/libs/sctp/Makefile b/libs/sctp/Makefile
    new file mode 100644
    index 0000000..7495b6e
    --- /dev/null
    +++ b/libs/sctp/Makefile
    @@ -0,0 +1,61 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=lksctp-tools
    +PKG_VERSION:=1.0.11
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/lksctp/
    +PKG_MD5SUM:=e9cf6c57402c9d4f1173a9529466e16d
    +
    +PKG_BUILD_DEPENDS:=binutils
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +#####
    +## lksctp library: provides sctp_* functions in user space
    +#####
    +
    +define Package/sctp
    +  SECTION:=libs
    +  CATEGORY:=Network
    +  TITLE:=SCTP user-land library
    +  URL:=http://lksctp.sourceforge.net
    +  DEPENDS:=+kmod-sctp
    +endef
    +
    +define Package/sctp/description
    + SCTP user-land library for sctp_* functions (when socket API is too limited).
    +endef
    +
    +TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
    +
    +define Package/sctp/install
    +	# Install the library in the router
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libsctp.so* \
    +		$(1)/usr/lib/
    +	# And also in staging for dependent packages
    +	$(INSTALL_DIR) $(STAGING_DIR)/usr/include/netinet
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/netinet/* \
    +		$(STAGING_DIR)/usr/include/netinet/
    +	$(INSTALL_DIR) $(STAGING_DIR)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libsctp.so* \
    +		$(STAGING_DIR)/usr/lib/
    +
    +endef
    +
    +$(eval $(call BuildPackage,sctp))
    +
    diff --git a/libs/serdisplib/Makefile b/libs/serdisplib/Makefile
    new file mode 100644
    index 0000000..4d9833e
    --- /dev/null
    +++ b/libs/serdisplib/Makefile
    @@ -0,0 +1,57 @@
    +# 
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=serdisplib
    +PKG_VERSION:=1.97.9
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/serdisplib
    +PKG_MD5SUM:=130552ec60d01e974712a60274f34de7
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/serdisplib
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=A display control library
    +  DEPENDS:=@!LINUX_2_4
    +  URL:=http://serdisplib.sourceforge.net/
    +endef
    +
    +define Package/serdisplib/description
    +	serdisplib is a library to drive serial and parallel displays 
    +	with built-in controllers.
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--enable-shared \
    +	--enable-static \
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		CFLAGS="$(TARGET_CFLAGS) -Wall -Wno-implicit -I../include -I.." \
    +		all
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_BUILD_DIR)/include/serdisplib $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/lib/libserdisp.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/serdisplib/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/lib/libserdisp.so.* $(1)/usr/lib
    +endef
    +
    +$(eval $(call BuildPackage,serdisplib))
    diff --git a/libs/slang2/Makefile b/libs/slang2/Makefile
    new file mode 100644
    index 0000000..96ef602
    --- /dev/null
    +++ b/libs/slang2/Makefile
    @@ -0,0 +1,97 @@
    +#
    +# Copyright (C) 2006-2011 Openwrt.org
    +# Copyright (C) 2011 SMBPhone Inc.
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=slang
    +PKG_VERSION:=2.2.3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=ftp://space.mit.edu/pub/davis/slang/v2.2 \
    +	ftp://space.mit.edu/pub/davis/slang/v2.2/OLD
    +PKG_MD5SUM:=17e1864de999ae9535a9f7350a010427
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libslang2
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=S-Lang v2.2
    +  URL:=http://www.jedsoft.org/slang
    +  DEPENDS:= +terminfo
    +endef
    +
    +define Package/libslang2/description
    +  Multi-platform programmer's library providing facilities for interactive
    +  applications.  Includes such things as display/screen management,
    +  keyboard input, keymaps, etc.  Includes the embeddable S-Lang interpreter.
    +endef
    +
    +define Package/slsh
    +  SECTION:=lang
    +  CATEGORY:=Languages
    +  TITLE:=S-Lang Shell
    +  URL:=http://www.jedsoft.org/slang/slsh.html
    +  DEPENDS:= +libslang2 
    +endef
    +
    +define Package/libslang2/description
    +  This is a shell which is mostly just a wrapper around the S-Lang Interpreter,
    +  which is part of the S-Lang Library.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +TARGET_LDFLAGS += -L../src/${ARCH}elfobjs
    +
    +CONFIGURE_ARGS += \
    +	--enable-largefile \
    +	--disable-warnings \
    +	--with-terminfo=default \
    +	--with-readline=slang \
    +	--without-x \
    +	--without-pcre \
    +	--without-onig \
    +	--without-png \
    +	--without-z \
    +	ac_cv_path_nc5config=$(PWD)/files/ncurses5-config
    +
    +define Build/Compile
    +	$(call Build/Compile/Default)
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		CFLAGS="$(TARGET_CFLAGS)" \
    +		LDFLAGS="$(TARGET_LDFLAGS)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		static install install-static
    +endef
    +
    +define Package/libslang2/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libslang.so* $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/slang/ $(1)/usr/lib/
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libslang.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/slsh/install
    + 	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/slsh $(1)/usr/bin
    +	$(INSTALL_DIR) $(1)/usr/share
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/slsh/ $(1)/usr/share/
    +endef
    +
    +$(eval $(call BuildPackage,libslang2))
    +$(eval $(call BuildPackage,slsh))
    diff --git a/libs/slang2/files/ncurses5-config b/libs/slang2/files/ncurses5-config
    new file mode 100755
    index 0000000..210d43f
    --- /dev/null
    +++ b/libs/slang2/files/ncurses5-config
    @@ -0,0 +1,6 @@
    +#!/bin/sh
    +
    +if [ "$1" == "--terminfo" ]; then
    +	echo "/usr/share/terminfo"
    +fi
    +
    diff --git a/libs/spandsp/Makefile b/libs/spandsp/Makefile
    new file mode 100644
    index 0000000..1b6ea59
    --- /dev/null
    +++ b/libs/spandsp/Makefile
    @@ -0,0 +1,47 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=spandsp
    +PKG_VERSION:=0.0.6
    +PKG_VERSION_SUFFIX:=pre17
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_VERSION_SUFFIX).tgz
    +PKG_SOURCE_URL:=http://www.soft-switch.org/downloads/spandsp/
    +PKG_MD5SUM:=cc860f77270cf3b881f8ccd42d2d0238
    +
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libspandsp
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=spandsp library
    +  DEPENDS:=+libtiff
    +endef
    +
    +CONFIGURE_ARGS+= LIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/{lib,include}
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libspandsp* $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
    +endef
    +
    +define Package/libspandsp/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libspandsp*so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libspandsp))
    diff --git a/libs/spandsp/patches/100-compile-fixes.patch b/libs/spandsp/patches/100-compile-fixes.patch
    new file mode 100644
    index 0000000..367dc95
    --- /dev/null
    +++ b/libs/spandsp/patches/100-compile-fixes.patch
    @@ -0,0 +1,13 @@
    +Index: spandsp-0.0.6/src/spandsp/fast_convert.h
    +===================================================================
    +--- spandsp-0.0.6.orig/src/spandsp/fast_convert.h	2010-10-24 12:20:25.000000000 +0200
    ++++ spandsp-0.0.6/src/spandsp/fast_convert.h	2010-10-24 12:21:39.000000000 +0200
    +@@ -197,7 +197,7 @@
    +     {
    +         return (long int) (x);
    +     }
    +-#elif defined(__ppc__)  ||   defined(__powerpc__)
    ++#elif defined(THISISNOTDEFINEDYADDAYADDA)
    +     static __inline__ long int lfastrint(register double x)
    +     {
    +         int res[2];
    diff --git a/libs/speex/Makefile b/libs/speex/Makefile
    new file mode 100644
    index 0000000..57fa983
    --- /dev/null
    +++ b/libs/speex/Makefile
    @@ -0,0 +1,104 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=speex
    +PKG_VERSION:=1.2rc1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/speex/
    +PKG_MD5SUM:=c4438b22c08e5811ff10e2b06ee9b9ae
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libspeex
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Open source speech compression codec library
    +  URL:=http://www.speex.org/
    +endef
    +
    +define Package/libspeexdsp
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Open source speech compression codec library output to DSP
    +  URL:=http://www.speex.org/
    +endef
    +
    +define Package/libspeex/description
    +	Open source patent-free speech compression codec library.
    +	Speex is an Open Source/Free Software patent-free audio compression 
    +	format designed for speech. The Speex Project aims to lower the 
    +	barrier of entry for voice applications by providing a free 
    +	alternative to expensive proprietary speech codecs. Moreover, Speex 
    +	is well-adapted to Internet applications and provides useful features 
    +	that are not present in most other codecs.
    +
    +	This package contains the shared codec library, needed by other programs.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Package/libspeexdsp/description
    +	Open source patent-free speech compression codec library.
    +	Speex is an Open Source/Free Software patent-free audio compression 
    +	format designed for speech. The Speex Project aims to lower the 
    +	barrier of entry for voice applications by providing a free 
    +	alternative to expensive proprietary speech codecs. Moreover, Speex 
    +	is well-adapted to Internet applications and provides useful features 
    +	that are not present in most other codecs.
    +
    +	This package contains the shared dsp library, needed by other programs.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +		--enable-fixed-point \
    +		--disable-oggtest \
    +		--disable-float-api \
    +		--disable-vbr \
    +		--with-ogg=$(STAGING_DIR)/usr \
    +	)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +	  	bin_PROGRAMS="" \
    +		all install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/speex $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.{a,so*} $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeexdsp.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/speex.pc $(1)/usr/lib/pkgconfig/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/speexdsp.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libspeex/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/libspeexdsp/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeexdsp.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libspeex))
    +$(eval $(call BuildPackage,libspeexdsp))
    +
    diff --git a/libs/sqlite2/Makefile b/libs/sqlite2/Makefile
    new file mode 100644
    index 0000000..5b5a000
    --- /dev/null
    +++ b/libs/sqlite2/Makefile
    @@ -0,0 +1,101 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=sqlite2
    +PKG_VERSION:=2.8.17
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=sqlite-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.sqlite.org/
    +PKG_MD5SUM:=838dbac20b56d2c4292e98848505a05b
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/sqlite-$(PKG_VERSION)
    +
    +PKG_BUILD_DEPENDS:=libncurses libreadline
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Package/sqlite2/Default
    +  SUBMENU:=database
    +  TITLE:=SQLite (v2.x) database engine
    +  URL:=http://www.sqlite.org/
    +endef
    +
    +define Package/libsqlite2
    +  $(call Package/sqlite2/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= (library)
    +endef
    +
    +define Package/libsqlite2/description
    +	SQLite is a small C library that implements a self-contained, embeddable, 
    +	zero-configuration SQL database engine.	
    +	This package contains the SQLite (v2.x) shared library, used by other programs.
    +endef
    +
    +define Package/sqlite2-cli
    +  $(call Package/sqlite2/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+libsqlite2 +libncurses +libreadline
    +  TITLE+= (cli)
    +  SUBMENU:=database
    +endef
    +
    +define Package/sqlite2-cli/description
    +	SQLite is a small C library that implements a self-contained, embeddable, 
    +	zero-configuration SQL database engine.	
    +	This package contains a terminal-based front-end to the SQLite (v2.x) library 
    +	that can evaluate queries interactively and display the results in 
    +	multiple formats.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--enable-shared \
    +		--enable-static \
    +		, \
    +		config_BUILD_CC="$(HOSTCC)" \
    +		config_BUILD_CFLAGS="-O2" \
    +		config_TARGET_CC="$(TARGET_CC)" \
    +		config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \
    +		config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \
    +		config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
    +		config_TARGET_TCL_INC="-DNO_TCL=1" \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libsqlite2/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/sqlite2-cli/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,libsqlite2))
    +$(eval $(call BuildPackage,sqlite2-cli))
    diff --git a/libs/sqlite3/Makefile b/libs/sqlite3/Makefile
    new file mode 100644
    index 0000000..a2101db
    --- /dev/null
    +++ b/libs/sqlite3/Makefile
    @@ -0,0 +1,101 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=sqlite
    +PKG_VERSION:=3070701
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.sqlite.org
    +PKG_MD5SUM:=554026fe7fac47b1cf61c18d5fe43419
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-autoconf-$(PKG_VERSION)
    +PKG_BUILD_DEPENDS:=libncurses libreadline
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/sqlite3/Default
    +  SUBMENU:=database
    +  TITLE:=SQLite (v3.x) database engine
    +  URL:=http://www.sqlite.org/
    +endef
    +
    +define Package/sqlite3/Default/description
    + SQLite is a small C library that implements a self-contained, embeddable,
    + zero-configuration SQL database engine.
    +endef
    +
    +define Package/libsqlite3
    +  $(call Package/sqlite3/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+libpthread
    +  TITLE+= (library)
    +endef
    +
    +define Package/libsqlite3/description
    +$(call Package/sqlite3/Default/description)
    + This package contains the SQLite (v3.x) shared library, used by other
    + programs.
    +endef
    +
    +define Package/sqlite3-cli
    +  $(call Package/sqlite3/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+libsqlite3 +libncurses +libreadline
    +  TITLE+= (cli)
    +endef
    +
    +define Package/sqlite3-cli/description
    +$(call Package/sqlite3/Default/description)
    + This package contains a terminal-based front-end to the SQLite (v3.x) library
    + that can evaluate queries interactively and display the results in multiple
    + formats.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +
    +CONFIGURE_VARS += \
    +	config_BUILD_CC="$(HOSTCC)" \
    +	config_BUILD_CFLAGS="-O2" \
    +	config_TARGET_CC="$(TARGET_CC)" \
    +	config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \
    +	config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \
    +	config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/libsqlite3/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/sqlite3-cli/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,libsqlite3))
    +$(eval $(call BuildPackage,sqlite3-cli))
    diff --git a/libs/st2205tool/Makefile b/libs/st2205tool/Makefile
    new file mode 100644
    index 0000000..81e120f
    --- /dev/null
    +++ b/libs/st2205tool/Makefile
    @@ -0,0 +1,59 @@
    +# 
    +# Copyright (C) 2008-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=st2205tool
    +PKG_VERSION:=1.4.3
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=st2205tool-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
    +PKG_MD5SUM:=827e3b719ebaf6bc537f2ce0ece3fccb
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/st2205tool
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=ST220xu powered photo-frames library
    +  DEPENDS:=+libgd
    +  URL:=http://picframe.spritesserver.nl/wiki/
    +endef
    +
    +define Package/st2205tool/description
    +  Library for hacked photo-frames based on st220xu chipset. You may use those photo-frames with
    +  mplayer or LCD4Linux
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +MAKE_FLAGS += \
    +	CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/libst2205/" \
    +	LDFLAGS="$(TARGET_LDFLAGS)" \
    +	SETPICLIBS="$(TARGET_LDFLAGS) -lgd -ljpeg -lpng -lz -L../libst2205 -lst2205" \
    +
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_BUILD_DIR)/libst2205/st2205.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libst2205/libst2205.{a,so*} $(1)/usr/lib/
    +endef
    +
    +
    +define Package/st2205tool/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/setpic/setpic $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libst2205/libst2205.so $(1)/usr/lib/libst2205.so.1
    +endef
    +
    +$(eval $(call BuildPackage,st2205tool))
    diff --git a/libs/st2205tool/patches/100-base-makefile.patch b/libs/st2205tool/patches/100-base-makefile.patch
    new file mode 100644
    index 0000000..854d040
    --- /dev/null
    +++ b/libs/st2205tool/patches/100-base-makefile.patch
    @@ -0,0 +1,45 @@
    +---
    + Makefile |   20 ++++++++++----------
    + 1 file changed, 10 insertions(+), 10 deletions(-)
    +
    +--- st2205tool.orig/Makefile
    ++++ st2205tool/Makefile
    +@@ -6,27 +6,27 @@ LIBS	=
    + all:	libst2205/libst2205.so setpic/setpic phack splice bgrep
    + 
    + install: all
    +-	make -C libst2205 install
    ++	$(MAKE) -C libst2205 install
    + 
    + libst2205/libst2205.so: 
    +-	make -C libst2205
    ++	$(MAKE) -C libst2205
    + 
    +-setpic/setpic:
    +-	make -C setpic
    ++setpic/setpic: libst2205/libst2205.so
    ++	$(MAKE) -C setpic
    + 
    + phack:	$(OBJ) $(SRC)
    +-	gcc -o $(@) $(OBJ) $(LIBS) $(FLAGS)
    ++	$(GCC) -o $(@) $(OBJ) $(LIBS) $(FLAGS)
    + 
    + splice:	splice.o splice.c
    +-	gcc -o splice splice.o
    ++	$(GCC) -o splice splice.o
    + 
    + bgrep:	bgrep.o bgrep.c
    +-	gcc -o bgrep bgrep.o
    ++	$(GCC) -o bgrep bgrep.o
    + 
    + clean:	
    +-	make -C libst2205 clean
    +-	make -C setpic clean
    ++	$(MAKE) -C libst2205 clean
    ++	$(MAKE) -C setpic clean
    + 	rm -f $(OBJ) phack splice splice.o bgrep bgrep.o
    + 
    + distclean: clean
    +-	rm -f fwimage.bak memimage.bak fwimage.bin
    +\ No newline at end of file
    ++	rm -f fwimage.bak memimage.bak fwimage.bin
    diff --git a/libs/st2205tool/patches/110-libst-makefile.patch b/libs/st2205tool/patches/110-libst-makefile.patch
    new file mode 100644
    index 0000000..96b95ae
    --- /dev/null
    +++ b/libs/st2205tool/patches/110-libst-makefile.patch
    @@ -0,0 +1,25 @@
    +--- st2205tool/libst2205/Makefile.orig	2009-08-19 17:05:54.000000000 +0200
    ++++ st2205tool/libst2205/Makefile	2009-08-19 17:06:27.000000000 +0200
    +@@ -7,15 +7,15 @@
    + all:	libst2205.so
    + 
    + libst2205.so:	$(OBJ) $(SRC) $(HEADERS) 
    +-	ar -rv libst2205.a $(OBJ) 
    +-	gcc -shared -Wl,-soname,libst2205.so.1 -o libst2205.so $(OBJ) $(LIBS)
    ++	$(AR) -rv libst2205.a $(OBJ) 
    ++	$(GCC) -shared -Wl,-soname,libst2205.so.1 -o libst2205.so $(OBJ) $(LIBS)
    + 
    + clean:	
    + 	rm -f $(OBJ) test *.a *.so
    + 
    + install: libst2205.so
    +-	test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
    +-	test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
    +-	install libst2205.so /usr/local/lib
    +-	install st2205.h /usr/local/include
    +-	ldconfig
    ++#	test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
    ++#	test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
    ++#	install libst2205.so /usr/local/lib
    ++#	install st2205.h /usr/local/include
    ++#	ldconfig
    diff --git a/libs/st2205tool/patches/120-setpic-makefile.patch b/libs/st2205tool/patches/120-setpic-makefile.patch
    new file mode 100644
    index 0000000..a3a0121
    --- /dev/null
    +++ b/libs/st2205tool/patches/120-setpic-makefile.patch
    @@ -0,0 +1,18 @@
    +--- st2205tool/setpic/Makefile.orig	2008-01-20 19:50:11.000000000 +0100
    ++++ st2205tool/setpic/Makefile	2008-04-22 16:06:40.000000000 +0200
    +@@ -1,12 +1,12 @@
    + SRC	=	main.c
    + OBJ	=	main.o
    +-CFLAGS	=	-g -Wall -I../libst2205
    +-LIBS	=	-lgd -L../libst2205 -lst2205 
    ++#CFLAGS	=	-g -Wall -I./../libst2205
    ++#LIBS	=	-lgd -lst2205 
    + 
    + all:	setpic
    + 
    + setpic:	$(OBJ) $(SRC)
    +-	gcc -o $(@) $(OBJ) $(LIBS) $(FLAGS)
    ++	$(GCC) -o $(@) $(OBJ) $(SETPICLIBS) $(CFLAGS)
    + 
    + clean:	
    + 	rm -f $(OBJ) setpic
    diff --git a/libs/sysfsutils/Makefile b/libs/sysfsutils/Makefile
    new file mode 100644
    index 0000000..cfad23c
    --- /dev/null
    +++ b/libs/sysfsutils/Makefile
    @@ -0,0 +1,70 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=sysfsutils
    +PKG_VERSION:=2.1.0
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/linux-diag
    +PKG_MD5SUM:=14e7dcd0436d2f49aa403f67e1ef7ddc
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libsysfs
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  SUBMENU:=Filesystem
    +  DEPENDS:=@!LINUX_2_4
    +  TITLE:=Sysfs library
    +  URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
    +endef
    +
    +define Package/sysfsutils
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  SUBMENU:=Filesystem
    +  DEPENDS:=@!LINUX_2_4 +libsysfs
    +  TITLE:=System Utilities Based on Sysfs
    +  URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
    +endef
    +
    +define Package/libsysfs/description
    +The library's purpose is to provide a consistant and stable interface for
    +querying system device information exposed through sysfs.
    +endef
    +
    +define Package/sysfsutils/description
    +A utility built upon libsysfs that lists devices by bus, class, and topology.
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/sysfs $(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsysfs.{a,so*,la} $(1)/usr/lib/
    +endef
    +
    +define Package/libsysfs/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsysfs.so* $(1)/usr/lib/
    +endef
    +
    +define Package/sysfsutils/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/systool $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,libsysfs))
    +$(eval $(call BuildPackage,sysfsutils))
    diff --git a/libs/sysfsutils/patches/200-mnt_path_check.patch b/libs/sysfsutils/patches/200-mnt_path_check.patch
    new file mode 100644
    index 0000000..8710578
    --- /dev/null
    +++ b/libs/sysfsutils/patches/200-mnt_path_check.patch
    @@ -0,0 +1,55 @@
    +--- a/lib/sysfs_utils.c
    ++++ b/lib/sysfs_utils.c
    +@@ -22,6 +22,7 @@
    +  */
    + #include "libsysfs.h"
    + #include "sysfs.h"
    ++#include 
    + 
    + /**
    +  * sysfs_remove_trailing_slash: Removes any trailing '/' in the given path
    +@@ -53,6 +54,9 @@ int sysfs_get_mnt_path(char *mnt_path, s
    + {
    + 	static char sysfs_path[SYSFS_PATH_MAX] = "";
    + 	const char *sysfs_path_env;
    ++	FILE *mnt;
    ++	struct mntent *mntent;
    ++	int ret;
    + 
    + 	if (len == 0 || mnt_path == NULL)
    + 		return -1;
    +@@ -64,12 +68,31 @@ int sysfs_get_mnt_path(char *mnt_path, s
    + 		if (sysfs_path_env != NULL) {
    + 			safestrcpymax(mnt_path, sysfs_path_env, len);
    + 			sysfs_remove_trailing_slash(mnt_path);
    +-			return 0;
    ++		} else {
    ++			safestrcpymax(mnt_path, SYSFS_MNT_PATH, len);
    + 		}
    +-		safestrcpymax(mnt_path, SYSFS_MNT_PATH, len);
    + 	}
    + 
    +-	return 0;
    ++	/* check that mount point is indeed mounted */
    ++	ret = -1;
    ++	if ((mnt = setmntent(SYSFS_PROC_MNTS, "r")) == NULL) {
    ++		dprintf("Error getting mount information\n");
    ++		return -1;
    ++	}
    ++	while ((mntent = getmntent(mnt)) != NULL) {
    ++		if (strcmp(mntent->mnt_type, SYSFS_FSTYPE_NAME) == 0 &&
    ++			strcmp(mntent->mnt_dir, mnt_path) == 0) {
    ++			ret = 0;
    ++			break;
    ++		}
    ++	}
    ++	
    ++	endmntent(mnt);
    ++
    ++	if (ret < 0)
    ++		errno = ENOENT;
    ++
    ++	return ret;
    + }
    + 
    + /**
    diff --git a/libs/taglib/Makefile b/libs/taglib/Makefile
    new file mode 100644
    index 0000000..c4f956a
    --- /dev/null
    +++ b/libs/taglib/Makefile
    @@ -0,0 +1,72 @@
    +#
    +# Copyright (C) 2007-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=taglib
    +PKG_VERSION:=1.6.3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://developer.kde.org/~wheeler/files/src/
    +PKG_MD5SUM:=ddf02f4e1d2dc30f76734df806e613eb
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/cmake.mk
    +
    +PKG_INSTALL:=1
    +
    +define Package/taglib
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:= +uclibcxx +zlib @!TARGET_avr32
    +  TITLE:=Audio output library
    +  URL:=http://developer.kde.org/~wheeler/taglib.html
    +endef
    +
    +define Package/taglibc
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  DEPENDS:=+taglib
    +  TITLE:=Audio output library
    +  URL:=http://developer.kde.org/~wheeler/taglib.html
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +CMAKE_OPTIONS += -DCMAKE_CXX_COMPILER="g++-uc"
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/taglib-config \
    +		$(2)/bin/
    +	$(SED) \
    +		's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
    +		$(2)/bin/taglib-config
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libtag{,_c}.so* \
    +		$(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/include/taglib
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/include/taglib/* \
    +		$(1)/usr/include/taglib/
    +endef
    +
    +define Package/taglib/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtag.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/taglibc/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtag_c.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,taglib))
    +$(eval $(call BuildPackage,taglibc))
    diff --git a/libs/taglib/patches/100-uclibc++-compat.patch b/libs/taglib/patches/100-uclibc++-compat.patch
    new file mode 100644
    index 0000000..69a175e
    --- /dev/null
    +++ b/libs/taglib/patches/100-uclibc++-compat.patch
    @@ -0,0 +1,49 @@
    +--- a/taglib/toolkit/tlist.h
    ++++ b/taglib/toolkit/tlist.h
    +@@ -226,6 +226,7 @@ namespace TagLib {
    +      * the same.
    +      */
    +     bool operator==(const List &l) const;
    ++    bool operator!=(const List &l) const;
    + 
    +   protected:
    +     /*
    +--- a/taglib/toolkit/tlist.tcc
    ++++ b/taglib/toolkit/tlist.tcc
    +@@ -300,6 +300,12 @@ bool List::operator==(const List &
    +   return d->list == l.d->list;
    + }
    + 
    ++template 
    ++bool List::operator!=(const List &l) const
    ++{
    ++  return !(operator==(l));
    ++}
    ++
    + ////////////////////////////////////////////////////////////////////////////////
    + // protected members
    + ////////////////////////////////////////////////////////////////////////////////
    +--- a/taglib/toolkit/tstring.cpp
    ++++ b/taglib/toolkit/tstring.cpp
    +@@ -546,6 +546,11 @@ bool String::operator==(const String &s)
    +   return d == s.d || d->data == s.d->data;
    + }
    + 
    ++bool String::operator!=(const String &s) const
    ++{
    ++  return !(operator==(s));
    ++}
    ++
    + String &String::operator+=(const String &s)
    + {
    +   detach();
    +--- a/taglib/toolkit/tstring.h
    ++++ b/taglib/toolkit/tstring.h
    +@@ -342,6 +342,7 @@ namespace TagLib {
    +      * returns true if the strings match.
    +      */
    +     bool operator==(const String &s) const;
    ++    bool operator!=(const String &s) const;
    + 
    +     /*!
    +      * Appends \a s to the end of the String.
    diff --git a/libs/tcp_wrappers/Makefile b/libs/tcp_wrappers/Makefile
    new file mode 100644
    index 0000000..ed46f00
    --- /dev/null
    +++ b/libs/tcp_wrappers/Makefile
    @@ -0,0 +1,61 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=tcp_wrappers
    +PKG_VERSION:=7.6
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=ftp://ftp.porcupine.org/pub/security
    +PKG_MD5SUM:=e6fa25f71226d090f34de3f6b122fb5a
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libwrap
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Security wrapper library for TCP services
    +  URL:=ftp://ftp.porcupine.org/pub/security/index.html
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile	
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		OPT_CFLAGS="$(TARGET_CFLAGS)" \
    +		LIBS=-lnsl \
    +		NETGROUP= \
    +		VSYSLOG= \
    +		BUGS= \
    +		EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 \
    +			-Dss_family=__ss_family -Dss_len=__ss_len" \
    +		FACILITY=LOG_DAEMON \
    +		SEVERITY=LOG_INFO \
    +		REAL_DAEMON_DIR=/usr/sbin \
    +		STYLE="-DPROCESS_OPTIONS" \
    +		tidy all
    +endef
    +
    +define Build/InstallDev	
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_BUILD_DIR)/tcpd.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/libwrap.a $(1)/usr/lib/
    +	$(CP) $(PKG_BUILD_DIR)/shared/libwrap.so* $(1)/usr/lib/
    +endef
    +
    +define Package/libwrap/install	
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_BUILD_DIR)/shared/libwrap.so.* $(1)/usr/lib/
    +endef
    +	
    +$(eval $(call BuildPackage,libwrap))
    diff --git a/libs/tcp_wrappers/patches/001-debian_subset.patch b/libs/tcp_wrappers/patches/001-debian_subset.patch
    new file mode 100644
    index 0000000..0b3ad2c
    --- /dev/null
    +++ b/libs/tcp_wrappers/patches/001-debian_subset.patch
    @@ -0,0 +1,936 @@
    +--- a/hosts_access.c
    ++++ b/hosts_access.c
    +@@ -240,6 +240,26 @@ struct request_info *request;
    +     }
    + }
    + 
    ++/* hostfile_match - look up host patterns from file */
    ++
    ++static int hostfile_match(path, host)
    ++char   *path;
    ++struct hosts_info *host;
    ++{
    ++    char    tok[BUFSIZ];
    ++    int     match = NO;
    ++    FILE   *fp;
    ++
    ++    if ((fp = fopen(path, "r")) != 0) {
    ++        while (fscanf(fp, "%s", tok) == 1 && !(match = host_match(tok, host)))
    ++            /* void */ ;
    ++        fclose(fp);
    ++    } else if (errno != ENOENT) {
    ++        tcpd_warn("open %s: %m", path);
    ++    }
    ++    return (match);
    ++}
    ++
    + /* host_match - match host name and/or address against pattern */
    + 
    + static int host_match(tok, host)
    +@@ -267,6 +287,8 @@ struct host_info *host;
    + 	tcpd_warn("netgroup support is disabled");	/* not tcpd_jump() */
    + 	return (NO);
    + #endif
    ++    } else if (tok[0] == '/') {                         /* /file hack */
    ++        return (hostfile_match(tok, host));
    +     } else if (STR_EQ(tok, "KNOWN")) {		/* check address and name */
    + 	char   *name = eval_hostname(host);
    + 	return (STR_NE(eval_hostaddr(host), unknown) && HOSTNAME_KNOWN(name));
    +--- a/tcpd.h
    ++++ b/tcpd.h
    +@@ -4,6 +4,25 @@
    +   * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
    +   */
    + 
    ++#ifndef _TCPWRAPPERS_TCPD_H
    ++#define _TCPWRAPPERS_TCPD_H
    ++
    ++/* someone else may have defined this */
    ++#undef  __P
    ++
    ++/* use prototypes if we have an ANSI C compiler or are using C++ */
    ++#if defined(__STDC__) || defined(__cplusplus)
    ++#define __P(args)       args
    ++#else
    ++#define __P(args)       ()
    ++#endif
    ++
    ++/* Need definitions of struct sockaddr_in and FILE. */
    ++#include 
    ++#include 
    ++
    ++__BEGIN_DECLS
    ++
    + /* Structure to describe one communications endpoint. */
    + 
    + #define STRING_LENGTH	128		/* hosts, users, processes */
    +@@ -25,10 +44,10 @@ struct request_info {
    +     char    pid[10];			/* access via eval_pid(request) */
    +     struct host_info client[1];		/* client endpoint info */
    +     struct host_info server[1];		/* server endpoint info */
    +-    void  (*sink) ();			/* datagram sink function or 0 */
    +-    void  (*hostname) ();		/* address to printable hostname */
    +-    void  (*hostaddr) ();		/* address to printable address */
    +-    void  (*cleanup) ();		/* cleanup function or 0 */
    ++    void  (*sink) __P((int));		/* datagram sink function or 0 */
    ++    void  (*hostname) __P((struct host_info *)); /* address to printable hostname */
    ++    void  (*hostaddr) __P((struct host_info *)); /* address to printable address */
    ++    void  (*cleanup) __P((struct request_info *)); /* cleanup function or 0 */
    +     struct netconfig *config;		/* netdir handle */
    + };
    + 
    +@@ -61,25 +80,30 @@ extern char paranoid[];
    + /* Global functions. */
    + 
    + #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
    +-extern void fromhost();			/* get/validate client host info */
    ++extern void fromhost __P((struct request_info *));	/* get/validate client host info */
    + #else
    + #define fromhost sock_host		/* no TLI support needed */
    + #endif
    + 
    +-extern int hosts_access();		/* access control */
    +-extern void shell_cmd();		/* execute shell command */
    +-extern char *percent_x();		/* do % expansion */
    +-extern void rfc931();			/* client name from RFC 931 daemon */
    +-extern void clean_exit();		/* clean up and exit */
    +-extern void refuse();			/* clean up and exit */
    +-extern char *xgets();			/* fgets() on steroids */
    +-extern char *split_at();		/* strchr() and split */
    +-extern unsigned long dot_quad_addr();	/* restricted inet_addr() */
    ++extern void shell_cmd __P((char *));	/* execute shell command */
    ++extern char *percent_x __P((char *, int, char *, struct request_info *)); /* do % expansion */
    ++extern void rfc931 __P((struct sockaddr_in *, struct sockaddr_in *, char *)); /* client name from RFC 931 daemon */
    ++extern void clean_exit __P((struct request_info *)); /* clean up and exit */
    ++extern void refuse __P((struct request_info *));	/* clean up and exit */
    ++extern char *xgets __P((char *, int, FILE *));	/* fgets() on steroids */
    ++extern char *split_at __P((char *, int));	/* strchr() and split */
    ++extern unsigned long dot_quad_addr __P((char *)); /* restricted inet_addr() */
    + 
    + /* Global variables. */
    + 
    ++#ifdef HAVE_WEAKSYMS
    ++extern int allow_severity __attribute__ ((weak)); /* for connection logging */
    ++extern int deny_severity __attribute__ ((weak)); /* for connection logging */
    ++#else
    + extern int allow_severity;		/* for connection logging */
    + extern int deny_severity;		/* for connection logging */
    ++#endif
    ++
    + extern char *hosts_allow_table;		/* for verification mode redirection */
    + extern char *hosts_deny_table;		/* for verification mode redirection */
    + extern int hosts_access_verbose;	/* for verbose matching mode */
    +@@ -92,9 +116,14 @@ extern int resident;			/* > 0 if residen
    +   */
    + 
    + #ifdef __STDC__
    ++extern int hosts_access(struct request_info *request);
    ++extern int hosts_ctl(char *daemon, char *client_name, char *client_addr, 
    ++                     char *client_user);
    + extern struct request_info *request_init(struct request_info *,...);
    + extern struct request_info *request_set(struct request_info *,...);
    + #else
    ++extern int hosts_access();
    ++extern int hosts_ctl();
    + extern struct request_info *request_init();	/* initialize request */
    + extern struct request_info *request_set();	/* update request structure */
    + #endif
    +@@ -117,27 +146,31 @@ extern struct request_info *request_set(
    +   * host_info structures serve as caches for the lookup results.
    +   */
    + 
    +-extern char *eval_user();		/* client user */
    +-extern char *eval_hostname();		/* printable hostname */
    +-extern char *eval_hostaddr();		/* printable host address */
    +-extern char *eval_hostinfo();		/* host name or address */
    +-extern char *eval_client();		/* whatever is available */
    +-extern char *eval_server();		/* whatever is available */
    ++extern char *eval_user __P((struct request_info *));	/* client user */
    ++extern char *eval_hostname __P((struct host_info *));	/* printable hostname */
    ++extern char *eval_hostaddr __P((struct host_info *));	/* printable host address */
    ++extern char *eval_hostinfo __P((struct host_info *));	/* host name or address */
    ++extern char *eval_client __P((struct request_info *));	/* whatever is available */
    ++extern char *eval_server __P((struct request_info *));	/* whatever is available */
    + #define eval_daemon(r)	((r)->daemon)	/* daemon process name */
    + #define eval_pid(r)	((r)->pid)	/* process id */
    + 
    + /* Socket-specific methods, including DNS hostname lookups. */
    + 
    +-extern void sock_host();		/* look up endpoint addresses */
    +-extern void sock_hostname();		/* translate address to hostname */
    +-extern void sock_hostaddr();		/* address to printable address */
    ++/* look up endpoint addresses */
    ++extern void sock_host __P((struct request_info *));
    ++/* translate address to hostname */
    ++extern void sock_hostname __P((struct host_info *));
    ++/* address to printable address */
    ++extern void sock_hostaddr __P((struct host_info *));
    ++
    + #define sock_methods(r) \
    + 	{ (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; }
    + 
    + /* The System V Transport-Level Interface (TLI) interface. */
    + 
    + #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
    +-extern void tli_host();			/* look up endpoint addresses etc. */
    ++extern void tli_host __P((struct request_info *));	/* look up endpoint addresses etc. */
    + #endif
    + 
    +  /*
    +@@ -178,7 +211,7 @@ extern struct tcpd_context tcpd_context;
    +   * behavior.
    +   */
    + 
    +-extern void process_options();		/* execute options */
    ++extern void process_options __P((char *, struct request_info *)); /* execute options */
    + extern int dry_run;			/* verification flag */
    + 
    + /* Bug workarounds. */
    +@@ -217,3 +250,7 @@ extern char *fix_strtok();
    + #define strtok	my_strtok
    + extern char *my_strtok();
    + #endif
    ++
    ++__END_DECLS
    ++
    ++#endif /* tcpd.h */
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -1,5 +1,10 @@
    ++GLIBC=$(shell grep -s -c __GLIBC__ /usr/include/features.h)
    ++
    + # @(#) Makefile 1.23 97/03/21 19:27:20
    + 
    ++# unset the HOSTNAME environment variable
    ++HOSTNAME =
    ++
    + what:
    + 	@echo
    + 	@echo "Usage: edit the REAL_DAEMON_DIR definition in the Makefile then:"
    +@@ -19,7 +24,7 @@ what:
    + 	@echo "	generic (most bsd-ish systems with sys5 compatibility)"
    + 	@echo "	386bsd aix alpha apollo bsdos convex-ultranet dell-gcc dgux dgux543"
    + 	@echo "	dynix epix esix freebsd hpux irix4 irix5 irix6 isc iunix"
    +-	@echo "	linux machten mips(untested) ncrsvr4 netbsd next osf power_unix_211"
    ++	@echo "	linux gnu machten mips(untested) ncrsvr4 netbsd next osf power_unix_211"
    + 	@echo "	ptx-2.x ptx-generic pyramid sco sco-nis sco-od2 sco-os5 sinix sunos4"
    + 	@echo "	sunos40 sunos5 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2"
    + 	@echo "	uts215 uxp"
    +@@ -43,8 +48,8 @@ what:
    + # Ultrix 4.x SunOS 4.x ConvexOS 10.x Dynix/ptx
    + #REAL_DAEMON_DIR=/usr/etc
    + #
    +-# SysV.4 Solaris 2.x OSF AIX
    +-#REAL_DAEMON_DIR=/usr/sbin
    ++# SysV.4 Solaris 2.x OSF AIX Linux
    ++REAL_DAEMON_DIR=/usr/sbin
    + #
    + # BSD 4.4
    + #REAL_DAEMON_DIR=/usr/libexec
    +@@ -141,10 +146,21 @@ freebsd:
    + 	LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
    + 	EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
    + 
    ++ifneq ($(GLIBC),0)
    ++MYLIB=-lnsl
    ++endif
    ++
    + linux:
    + 	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
    +-	LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
    +-	NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all
    ++	LIBS=$(MYLIB) RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
    ++	NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= all \
    ++	EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_WEAKSYMS -D_REENTRANT"
    ++
    ++gnu:
    ++	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
    ++	LIBS=$(MYLIB) RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
    ++	NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= all \
    ++	EXTRA_CFLAGS="-DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT"
    + 
    + # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
    + hpux hpux8 hpux9 hpux10:
    +@@ -391,7 +407,7 @@ AR	= ar
    + # the ones provided with this source distribution. The environ.c module
    + # implements setenv(), getenv(), and putenv().
    + 
    +-AUX_OBJ= setenv.o
    ++#AUX_OBJ= setenv.o
    + #AUX_OBJ= environ.o
    + #AUX_OBJ= environ.o strcasecmp.o
    + 
    +@@ -454,7 +470,8 @@ AUX_OBJ= setenv.o
    + # host name aliases. Compile with -DSOLARIS_24_GETHOSTBYNAME_BUG to work
    + # around this. The workaround does no harm on other Solaris versions.
    + 
    +-BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK
    ++BUGS =
    ++#BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK
    + #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DINET_ADDR_BUG
    + #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DSOLARIS_24_GETHOSTBYNAME_BUG
    + 
    +@@ -464,7 +481,7 @@ BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS
    + # If your system supports NIS or YP-style netgroups, enable the following
    + # macro definition. Netgroups are used only for host access control.
    + #
    +-#NETGROUP= -DNETGROUP
    ++NETGROUP= -DNETGROUP
    + 
    + ###############################################################
    + # System dependencies: whether or not your system has vsyslog()
    +@@ -491,7 +508,7 @@ VSYSLOG	= -Dvsyslog=myvsyslog
    + # Uncomment the next definition to turn on the language extensions
    + # (examples: allow, deny, banners, twist and spawn).
    + # 
    +-#STYLE	= -DPROCESS_OPTIONS	# Enable language extensions.
    ++STYLE	= -DPROCESS_OPTIONS	# Enable language extensions.
    + 
    + ################################################################
    + # Optional: Changing the default disposition of logfile records
    +@@ -514,7 +531,7 @@ VSYSLOG	= -Dvsyslog=myvsyslog
    + #
    + # The LOG_XXX names below are taken from the /usr/include/syslog.h file.
    + 
    +-FACILITY= LOG_MAIL	# LOG_MAIL is what most sendmail daemons use
    ++FACILITY= LOG_DAEMON	# LOG_MAIL is what most sendmail daemons use
    + 
    + # The syslog priority at which successful connections are logged.
    + 
    +@@ -610,7 +627,7 @@ TABLES	= -DHOSTS_DENY=\"/etc/hosts.deny\
    + # Paranoid mode implies hostname lookup. In order to disable hostname
    + # lookups altogether, see the next section.
    + 
    +-PARANOID= -DPARANOID
    ++#PARANOID= -DPARANOID
    + 
    + ########################################
    + # Optional: turning off hostname lookups
    +@@ -623,7 +640,7 @@ PARANOID= -DPARANOID
    + # In order to perform selective hostname lookups, disable paranoid
    + # mode (see previous section) and comment out the following definition.
    + 
    +-HOSTNAME= -DALWAYS_HOSTNAME
    ++#HOSTNAME= -DALWAYS_HOSTNAME
    + 
    + #############################################
    + # Optional: Turning on host ADDRESS checking
    +@@ -649,28 +666,46 @@ HOSTNAME= -DALWAYS_HOSTNAME
    + # source-routed traffic in the kernel. Examples: 4.4BSD derivatives,
    + # Solaris 2.x, and Linux. See your system documentation for details.
    + #
    +-# KILL_OPT= -DKILL_IP_OPTIONS
    ++KILL_OPT= -DKILL_IP_OPTIONS
    + 
    + ## End configuration options
    + ############################
    + 
    + # Protection against weird shells or weird make programs.
    + 
    ++CC	= gcc
    + SHELL	= /bin/sh
    +-.c.o:;	$(CC) $(CFLAGS) -c $*.c
    ++.c.o:;	$(CC) $(CFLAGS) -o $*.o -c $*.c
    ++
    ++SOMAJOR = 0
    ++SOMINOR = 7.6
    ++
    ++LIB	= libwrap.a
    ++SHLIB	= shared/libwrap.so.$(SOMAJOR).$(SOMINOR)
    ++SHLIBSOMAJ= shared/libwrap.so.$(SOMAJOR)
    ++SHLIBSO	= shared/libwrap.so
    ++SHLIBFLAGS = -Lshared -lwrap
    + 
    +-CFLAGS	= -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
    ++shared/%.o: %.c
    ++	$(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@
    ++
    ++CFLAGS	= -O2 -g -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
    + 	$(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
    + 	-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
    + 	-DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
    + 	$(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \
    + 	$(VSYSLOG) $(HOSTNAME)
    + 
    ++SHLINKFLAGS = -shared -Xlinker -soname -Xlinker libwrap.so.$(SOMAJOR) -lc $(LIBS)
    ++SHCFLAGS = -fPIC -shared -D_REENTRANT
    ++
    + LIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o eval.o \
    + 	hosts_ctl.o refuse.o percent_x.o clean_exit.o $(AUX_OBJ) \
    + 	$(FROM_OBJ) fix_options.o socket.o tli.o workarounds.o \
    + 	update.o misc.o diag.o percent_m.o myvsyslog.o
    + 
    ++SHLIB_OBJ= $(addprefix shared/, $(LIB_OBJ));
    ++
    + FROM_OBJ= fromhost.o
    + 
    + KIT	= README miscd.c tcpd.c fromhost.c hosts_access.c shell_cmd.c \
    +@@ -684,46 +719,78 @@ KIT	= README miscd.c tcpd.c fromhost.c h
    + 	refuse.c tcpdchk.8 setenv.c inetcf.c inetcf.h scaffold.c \
    + 	scaffold.h tcpdmatch.8 README.NIS
    + 
    +-LIB	= libwrap.a
    +-
    +-all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk
    ++all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk $(LIB)
    + 
    + # Invalidate all object files when the compiler options (CFLAGS) have changed.
    + 
    + config-check:
    + 	@set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; }
    +-	@set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \
    +-	if cmp cflags /tmp/cflags.$$$$ ; \
    +-	then rm /tmp/cflags.$$$$ ; \
    +-	else mv /tmp/cflags.$$$$ cflags ; \
    ++	@set +e; echo $(CFLAGS) >cflags.new ; \
    ++	if cmp cflags cflags.new ; \
    ++	then rm cflags.new ; \
    ++	else mv cflags.new cflags ; \
    + 	fi >/dev/null 2>/dev/null
    ++	@if [ ! -d shared ]; then mkdir shared; fi
    + 
    + $(LIB):	$(LIB_OBJ)
    + 	rm -f $(LIB)
    + 	$(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ)
    + 	-$(RANLIB) $(LIB)
    + 
    +-tcpd:	tcpd.o $(LIB)
    +-	$(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS)
    ++$(SHLIB): $(SHLIB_OBJ)
    ++	rm -f $(SHLIB)
    ++	$(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
    ++	ln -s $(notdir $(SHLIB)) $(SHLIBSOMAJ)
    ++	ln -s $(notdir $(SHLIBSOMAJ)) $(SHLIBSO)
    ++
    ++tcpd:	tcpd.o $(SHLIB)
    ++	$(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
    + 
    +-miscd:	miscd.o $(LIB)
    +-	$(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
    ++miscd:	miscd.o $(SHLIB)
    ++	$(CC) $(CFLAGS) -o $@ miscd.o $(SHLIBFLAGS)
    + 
    +-safe_finger: safe_finger.o $(LIB)
    +-	$(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS)
    ++safe_finger: safe_finger.o $(SHLIB)
    ++	$(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
    + 
    + TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o
    + 
    +-tcpdmatch: $(TCPDMATCH_OBJ) $(LIB)
    +-	$(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS)
    ++tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB)
    ++	$(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
    + 
    +-try-from: try-from.o fakelog.o $(LIB)
    +-	$(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS)
    ++try-from: try-from.o fakelog.o $(SHLIB)
    ++	$(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
    + 
    + TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o
    + 
    +-tcpdchk: $(TCPDCHK_OBJ) $(LIB)
    +-	$(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS)
    ++tcpdchk: $(TCPDCHK_OBJ) $(SHLIB)
    ++	$(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
    ++
    ++install: install-lib install-bin install-dev
    ++
    ++install-lib:
    ++	install -o root -g root -m 0644 $(SHLIB) ${DESTDIR}/lib/
    ++	ln -s $(notdir $(SHLIB)) ${DESTDIR}/lib/$(notdir $(SHLIBSOMAJ))
    ++
    ++install-bin:
    ++	install -o root -g root -m 0755 tcpd ${DESTDIR}/usr/sbin/
    ++	install -o root -g root -m 0755 tcpdchk ${DESTDIR}/usr/sbin/
    ++	install -o root -g root -m 0755 tcpdmatch ${DESTDIR}/usr/sbin/
    ++	install -o root -g root -m 0755 try-from ${DESTDIR}/usr/sbin/
    ++	install -o root -g root -m 0755 safe_finger ${DESTDIR}/usr/sbin/
    ++	install -o root -g root -m 0644 tcpd.8 ${DESTDIR}/usr/share/man/man8/
    ++	install -o root -g root -m 0644 tcpdchk.8 ${DESTDIR}/usr/share/man/man8/
    ++	install -o root -g root -m 0644 tcpdmatch.8 ${DESTDIR}/usr/share/man/man8/
    ++	install -o root -g root -m 0644 hosts_access.5 ${DESTDIR}/usr/share/man/man5/
    ++	install -o root -g root -m 0644 hosts_options.5 ${DESTDIR}/usr/share/man/man5/
    ++
    ++install-dev:
    ++	ln -s /lib/$(notdir $(SHLIBSOMAJ)) ${DESTDIR}/usr/lib/$(notdir $(SHLIBSO))
    ++	install -o root -g root -m 0644 hosts_access.3 ${DESTDIR}/usr/share/man/man3/
    ++	install -o root -g root -m 0644 tcpd.h ${DESTDIR}/usr/include/
    ++	install -o root -g root -m 0644 $(LIB) ${DESTDIR}/usr/lib/
    ++	ln -s hosts_access.3 ${DESTDIR}/usr/share/man/man3/hosts_ctl.3
    ++	ln -s hosts_access.3 ${DESTDIR}/usr/share/man/man3/request_init.3
    ++	ln -s hosts_access.3 ${DESTDIR}/usr/share/man/man3/request_set.3
    + 
    + shar:	$(KIT)
    + 	@shar $(KIT)
    +@@ -739,7 +806,8 @@ archive:
    + 
    + clean:
    + 	rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \
    +-	cflags
    ++	cflags libwrap*.so*
    ++	rm -rf shared
    + 
    + tidy:	clean
    + 	chmod -R a+r .
    +@@ -885,5 +953,6 @@ update.o: cflags
    + update.o: mystdarg.h
    + update.o: tcpd.h
    + vfprintf.o: cflags
    ++weak_symbols.o: tcpd.h
    + workarounds.o: cflags
    + workarounds.o: tcpd.h
    +--- a/hosts_access.5
    ++++ b/hosts_access.5
    +@@ -8,9 +8,9 @@ name, host name/address) patterns.  Exam
    + impatient reader is encouraged to skip to the EXAMPLES section for a
    + quick introduction.
    + .PP
    +-An extended version of the access control language is described in the
    +-\fIhosts_options\fR(5) document. The extensions are turned on at
    +-program build time by building with -DPROCESS_OPTIONS.
    ++The extended version of the access control language is described in the
    ++\fIhosts_options\fR(5) document. \fBNote that this language supersedes
    ++the meaning of \fIshell_command\fB as documented below.\fR
    + .PP
    + In the following text, \fIdaemon\fR is the the process name of a
    + network daemon process, and \fIclient\fR is the name and/or address of
    +@@ -40,7 +40,7 @@ A newline character is ignored when it i
    + character. This permits you to break up long lines so that they are
    + easier to edit.
    + .IP \(bu
    +-Blank lines or lines that begin with a `#\' character are ignored.
    ++Blank lines or lines that begin with a `#' character are ignored.
    + This permits you to insert comments and whitespace so that the tables
    + are easier to read.
    + .IP \(bu
    +@@ -69,26 +69,33 @@ checks are case insensitive.
    + .SH PATTERNS
    + The access control language implements the following patterns:
    + .IP \(bu
    +-A string that begins with a `.\' character. A host name is matched if
    ++A string that begins with a `.' character. A host name is matched if
    + the last components of its name match the specified pattern.  For
    +-example, the pattern `.tue.nl\' matches the host name
    +-`wzv.win.tue.nl\'.
    ++example, the pattern `.tue.nl' matches the host name
    ++`wzv.win.tue.nl'.
    + .IP \(bu
    +-A string that ends with a `.\' character. A host address is matched if
    ++A string that ends with a `.' character. A host address is matched if
    + its first numeric fields match the given string.  For example, the
    +-pattern `131.155.\' matches the address of (almost) every host on the
    ++pattern `131.155.' matches the address of (almost) every host on the
    + Eind\%hoven University network (131.155.x.x).
    + .IP \(bu
    +-A string that begins with an `@\' character is treated as an NIS
    ++A string that begins with an `@' character is treated as an NIS
    + (formerly YP) netgroup name. A host name is matched if it is a host
    + member of the specified netgroup. Netgroup matches are not supported
    + for daemon process names or for client user names.
    + .IP \(bu
    +-An expression of the form `n.n.n.n/m.m.m.m\' is interpreted as a
    +-`net/mask\' pair. A host address is matched if `net\' is equal to the
    +-bitwise AND of the address and the `mask\'. For example, the net/mask
    +-pattern `131.155.72.0/255.255.254.0\' matches every address in the
    +-range `131.155.72.0\' through `131.155.73.255\'.
    ++An expression of the form `n.n.n.n/m.m.m.m' is interpreted as a
    ++`net/mask' pair. A host address is matched if `net' is equal to the
    ++bitwise AND of the address and the `mask'. For example, the net/mask
    ++pattern `131.155.72.0/255.255.254.0' matches every address in the
    ++range `131.155.72.0' through `131.155.73.255'.
    ++.IP \(bu
    ++A string that begins with a `/' character is treated as a file
    ++name. A host name or address is matched if it matches any host name
    ++or address pattern listed in the named file. The file format is
    ++zero or more lines with zero or more host name or address patterns
    ++separated by whitespace.  A file name pattern can be used anywhere
    ++a host name or address pattern can be used.
    + .SH WILDCARDS
    + The access control language supports explicit wildcards:
    + .IP ALL
    +@@ -115,19 +122,19 @@ without -DPARANOID when you want more co
    + .ne 6
    + .SH OPERATORS
    + .IP EXCEPT
    +-Intended use is of the form: `list_1 EXCEPT list_2\'; this construct
    ++Intended use is of the form: `list_1 EXCEPT list_2'; this construct
    + matches anything that matches \fIlist_1\fR unless it matches
    + \fIlist_2\fR.  The EXCEPT operator can be used in daemon_lists and in
    + client_lists. The EXCEPT operator can be nested: if the control
    +-language would permit the use of parentheses, `a EXCEPT b EXCEPT c\'
    +-would parse as `(a EXCEPT (b EXCEPT c))\'.
    ++language would permit the use of parentheses, `a EXCEPT b EXCEPT c'
    ++would parse as `(a EXCEPT (b EXCEPT c))'.
    + .br
    + .ne 6
    + .SH SHELL COMMANDS
    + If the first-matched access control rule contains a shell command, that
    + command is subjected to % substitutions (see next section).
    + The result is executed by a \fI/bin/sh\fR child process with standard
    +-input, output and error connected to \fI/dev/null\fR.  Specify an `&\'
    ++input, output and error connected to \fI/dev/null\fR.  Specify an `&'
    + at the end of the command if you do not want to wait until it has
    + completed.
    + .PP
    +@@ -159,7 +166,7 @@ depending on how much information is ava
    + .IP %u
    + The client user name (or "unknown").
    + .IP %%
    +-Expands to a single `%\' character.
    ++Expands to a single `%' character.
    + .PP
    + Characters in % expansions that may confuse the shell are replaced by
    + underscores.
    +@@ -243,9 +250,9 @@ A positive IDENT lookup result (the clie
    + less trustworthy. It is possible for an intruder to spoof both the
    + client connection and the IDENT lookup, although doing so is much
    + harder than spoofing just a client connection. It may also be that
    +-the client\'s IDENT server is lying.
    ++the client's IDENT server is lying.
    + .PP
    +-Note: IDENT lookups don\'t work with UDP services. 
    ++Note: IDENT lookups don't work with UDP services. 
    + .SH EXAMPLES
    + The language is flexible enough that different types of access control
    + policy can be expressed with a minimum of fuss. Although the language
    +@@ -285,7 +292,7 @@ ALL: LOCAL @some_netgroup
    + .br
    + ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
    + .PP
    +-The first rule permits access from hosts in the local domain (no `.\'
    ++The first rule permits access from hosts in the local domain (no `.'
    + in the host name) and from members of the \fIsome_netgroup\fP
    + netgroup.  The second rule permits access from all hosts in the
    + \fIfoobar.edu\fP domain (notice the leading dot), with the exception of
    +@@ -322,8 +329,8 @@ in.tftpd: LOCAL, .my.domain
    + /etc/hosts.deny:
    + .in +3
    + .nf
    +-in.tftpd: ALL: (/some/where/safe_finger -l @%h | \\
    +-	/usr/ucb/mail -s %d-%h root) &
    ++in.tftpd: ALL: (/usr/sbin/safe_finger -l @%h | \\
    ++	/usr/bin/mail -s %d-%h root) &
    + .fi
    + .PP
    + The safe_finger command comes with the tcpd wrapper and should be
    +@@ -349,7 +356,7 @@ control rule; when the length of an acce
    + capacity of an internal buffer; when an access control rule is not
    + terminated by a newline character; when the result of %
    + expansion would overflow an internal buffer; when a system call fails
    +-that shouldn\'t.  All problems are reported via the syslog daemon.
    ++that shouldn't.  All problems are reported via the syslog daemon.
    + .SH FILES
    + .na
    + .nf
    +--- a/rfc931.c
    ++++ b/rfc931.c
    +@@ -33,7 +33,7 @@ static char sccsid[] = "@(#) rfc931.c 1.
    + 
    + int     rfc931_timeout = RFC931_TIMEOUT;/* Global so it can be changed */
    + 
    +-static jmp_buf timebuf;
    ++static sigjmp_buf timebuf;
    + 
    + /* fsocket - open stdio stream on top of socket */
    + 
    +@@ -62,7 +62,7 @@ int     protocol;
    + static void timeout(sig)
    + int     sig;
    + {
    +-    longjmp(timebuf, sig);
    ++    siglongjmp(timebuf, sig);
    + }
    + 
    + /* rfc931 - return remote user name, given socket structures */
    +@@ -99,7 +99,7 @@ char   *dest;
    + 	 * Set up a timer so we won't get stuck while waiting for the server.
    + 	 */
    + 
    +-	if (setjmp(timebuf) == 0) {
    ++	if (sigsetjmp(timebuf,1) == 0) {
    + 	    signal(SIGALRM, timeout);
    + 	    alarm(rfc931_timeout);
    + 
    +--- a/tcpd.8
    ++++ b/tcpd.8
    +@@ -94,7 +94,7 @@ configuration files.
    + .PP
    + The example assumes that the network daemons live in /usr/etc. On some
    + systems, network daemons live in /usr/sbin or in /usr/libexec, or have
    +-no `in.\' prefix to their name.
    ++no `in.' prefix to their name.
    + .SH EXAMPLE 2
    + This example applies when \fItcpd\fR expects that the network daemons
    + are left in their original place.
    +@@ -110,26 +110,26 @@ finger  stream  tcp  nowait  nobody  /us
    + becomes:
    + .sp
    + .ti +5
    +-finger  stream  tcp  nowait  nobody  /some/where/tcpd     in.fingerd
    ++finger  stream  tcp  nowait  nobody  /usr/sbin/tcpd       in.fingerd
    + .sp
    + .fi
    + .PP
    + The example assumes that the network daemons live in /usr/etc. On some
    + systems, network daemons live in /usr/sbin or in /usr/libexec, the
    +-daemons have no `in.\' prefix to their name, or there is no userid
    ++daemons have no `in.' prefix to their name, or there is no userid
    + field in the inetd configuration file.
    + .PP
    + Similar changes will be needed for the other services that are to be
    +-covered by \fItcpd\fR.  Send a `kill -HUP\' to the \fIinetd\fR(8)
    ++covered by \fItcpd\fR.  Send a `kill -HUP' to the \fIinetd\fR(8)
    + process to make the changes effective. AIX users may also have to
    +-execute the `inetimp\' command.
    ++execute the `inetimp' command.
    + .SH EXAMPLE 3
    + In the case of daemons that do not live in a common directory ("secret"
    + or otherwise), edit the \fIinetd\fR configuration file so that it
    + specifies an absolute path name for the process name field. For example:
    + .nf
    + .sp
    +-    ntalk  dgram  udp  wait  root  /some/where/tcpd  /usr/local/lib/ntalkd
    ++    ntalk  dgram  udp  wait  root  /usr/sbin/tcpd  /usr/sbin/in.ntalkd
    + .sp
    + .fi
    + .PP
    +--- a/hosts_access.3
    ++++ b/hosts_access.3
    +@@ -3,7 +3,7 @@
    + hosts_access, hosts_ctl, request_init, request_set \- access control library
    + .SH SYNOPSIS
    + .nf
    +-#include "tcpd.h"
    ++#include 
    + 
    + extern int allow_severity;
    + extern int deny_severity;
    +--- a/options.c
    ++++ b/options.c
    +@@ -473,6 +473,9 @@ static struct syslog_names log_fac[] = {
    + #ifdef LOG_CRON
    +     "cron", LOG_CRON,
    + #endif
    ++#ifdef LOG_FTP
    ++    "ftp", LOG_FTP,
    ++#endif
    + #ifdef LOG_LOCAL0
    +     "local0", LOG_LOCAL0,
    + #endif
    +--- a/fix_options.c
    ++++ b/fix_options.c
    +@@ -35,7 +35,12 @@ struct request_info *request;
    + #ifdef IP_OPTIONS
    +     unsigned char optbuf[BUFFER_SIZE / 3], *cp;
    +     char    lbuf[BUFFER_SIZE], *lp;
    ++#if !defined(__GLIBC__)
    +     int     optsize = sizeof(optbuf), ipproto;
    ++#else /* __GLIBC__ */
    ++    size_t  optsize = sizeof(optbuf);
    ++    int     ipproto;
    ++#endif /* __GLIBC__ */
    +     struct protoent *ip;
    +     int     fd = request->fd;
    +     unsigned int opt;
    +--- a/workarounds.c
    ++++ b/workarounds.c
    +@@ -163,7 +163,11 @@ int    *fromlen;
    + int     fix_getpeername(sock, sa, len)
    + int     sock;
    + struct sockaddr *sa;
    ++#if !defined(__GLIBC__)
    + int    *len;
    ++#else /* __GLIBC__ */
    ++size_t *len;
    ++#endif /* __GLIBC__ */
    + {
    +     int     ret;
    +     struct sockaddr_in *sin = (struct sockaddr_in *) sa;
    +--- a/socket.c
    ++++ b/socket.c
    +@@ -76,7 +76,11 @@ struct request_info *request;
    + {
    +     static struct sockaddr_in client;
    +     static struct sockaddr_in server;
    ++#if !defined (__GLIBC__)
    +     int     len;
    ++#else /* __GLIBC__ */
    ++    size_t  len;
    ++#endif /* __GLIBC__ */
    +     char    buf[BUFSIZ];
    +     int     fd = request->fd;
    + 
    +@@ -224,7 +228,11 @@ int     fd;
    + {
    +     char    buf[BUFSIZ];
    +     struct sockaddr_in sin;
    ++#if !defined(__GLIBC__)
    +     int     size = sizeof(sin);
    ++#else /* __GLIBC__ */
    ++    size_t  size = sizeof(sin);
    ++#endif /* __GLIBC__ */
    + 
    +     /*
    +      * Eat up the not-yet received datagram. Some systems insist on a
    +--- a/safe_finger.c
    ++++ b/safe_finger.c
    +@@ -26,21 +26,24 @@ static char sccsid[] = "@(#) safe_finger
    + #include 
    + #include 
    + #include 
    ++#include 
    + 
    + extern void exit();
    + 
    + /* Local stuff */
    + 
    +-char    path[] = "PATH=/bin:/usr/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc:/usr/sbin";
    ++char    path[] = "PATH=/bin:/usr/bin:/sbin:/usr/sbin";
    + 
    + #define	TIME_LIMIT	60		/* Do not keep listinging forever */
    + #define	INPUT_LENGTH	100000		/* Do not keep listinging forever */
    + #define	LINE_LENGTH	128		/* Editors can choke on long lines */
    + #define	FINGER_PROGRAM	"finger"	/* Most, if not all, UNIX systems */
    + #define	UNPRIV_NAME	"nobody"	/* Preferred privilege level */
    +-#define	UNPRIV_UGID	32767		/* Default uid and gid */
    ++#define	UNPRIV_UGID	65534		/* Default uid and gid */
    + 
    + int     finger_pid;
    ++int	allow_severity = SEVERITY;
    ++int	deny_severity = LOG_WARNING;
    + 
    + void    cleanup(sig)
    + int     sig;
    +--- a/hosts_options.5
    ++++ b/hosts_options.5
    +@@ -58,12 +58,12 @@ Notice the leading dot on the domain nam
    + Execute, in a child process, the specified shell command, after
    + performing the % expansions described in the hosts_access(5)
    + manual page.  The command is executed with stdin, stdout and stderr
    +-connected to the null device, so that it won\'t mess up the
    ++connected to the null device, so that it won't mess up the
    + conversation with the client host. Example:
    + .sp
    + .nf
    + .ti +3
    +-spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) &
    ++spawn (/usr/sbin/safe_finger -l @%h | /usr/bin/mail root) &
    + .fi
    + .sp
    + executes, in a background child process, the shell command "safe_finger
    +--- a/tcpdchk.c
    ++++ b/tcpdchk.c
    +@@ -350,6 +350,8 @@ char   *pat;
    + {
    +     if (pat[0] == '@') {
    + 	tcpd_warn("%s: daemon name begins with \"@\"", pat);
    ++    } else if (pat[0] == '/') {
    ++        tcpd_warn("%s: daemon name begins with \"/\"", pat);
    +     } else if (pat[0] == '.') {
    + 	tcpd_warn("%s: daemon name begins with dot", pat);
    +     } else if (pat[strlen(pat) - 1] == '.') {
    +@@ -382,6 +384,8 @@ char   *pat;
    + {
    +     if (pat[0] == '@') {			/* @netgroup */
    + 	tcpd_warn("%s: user name begins with \"@\"", pat);
    ++    } else if (pat[0] == '/') {
    ++        tcpd_warn("%s: user name begins with \"/\"", pat);
    +     } else if (pat[0] == '.') {
    + 	tcpd_warn("%s: user name begins with dot", pat);
    +     } else if (pat[strlen(pat) - 1] == '.') {
    +@@ -402,8 +406,13 @@ char   *pat;
    + static int check_host(pat)
    + char   *pat;
    + {
    ++    char    buf[BUFSIZ];
    +     char   *mask;
    +     int     addr_count = 1;
    ++    FILE   *fp;
    ++    struct tcpd_context saved_context;
    ++    char   *cp;
    ++    char   *wsp = " \t\r\n";
    + 
    +     if (pat[0] == '@') {			/* @netgroup */
    + #ifdef NO_NETGRENT
    +@@ -422,6 +431,21 @@ char   *pat;
    + 	tcpd_warn("netgroup support disabled");
    + #endif
    + #endif
    ++    } else if (pat[0] == '/') {                 /* /path/name */
    ++        if ((fp = fopen(pat, "r")) != 0) {
    ++            saved_context = tcpd_context;
    ++            tcpd_context.file = pat;
    ++            tcpd_context.line = 0;
    ++            while (fgets(buf, sizeof(buf), fp)) {
    ++                tcpd_context.line++;
    ++                for (cp = strtok(buf, wsp); cp; cp = strtok((char *) 0, wsp))
    ++                    check_host(cp);
    ++            }
    ++            tcpd_context = saved_context;
    ++            fclose(fp);
    ++        } else if (errno != ENOENT) {
    ++            tcpd_warn("open %s: %m", pat);
    ++        }
    +     } else if (mask = split_at(pat, '/')) {	/* network/netmask */
    + 	if (dot_quad_addr(pat) == INADDR_NONE
    + 	    || dot_quad_addr(mask) == INADDR_NONE)
    +--- a/percent_m.c
    ++++ b/percent_m.c
    +@@ -13,7 +13,7 @@ static char sccsid[] = "@(#) percent_m.c
    + #include 
    + 
    + extern int errno;
    +-#ifndef SYS_ERRLIST_DEFINED
    ++#if !defined(SYS_ERRLIST_DEFINED) && !defined(HAVE_STRERROR)
    + extern char *sys_errlist[];
    + extern int sys_nerr;
    + #endif
    +@@ -29,11 +29,15 @@ char   *ibuf;
    + 
    +     while (*bp = *cp)
    + 	if (*cp == '%' && cp[1] == 'm') {
    ++#ifdef HAVE_STRERROR
    ++            strcpy(bp, strerror(errno));
    ++#else
    + 	    if (errno < sys_nerr && errno > 0) {
    + 		strcpy(bp, sys_errlist[errno]);
    + 	    } else {
    + 		sprintf(bp, "Unknown error %d", errno);
    + 	    }
    ++#endif
    + 	    bp += strlen(bp);
    + 	    cp += 2;
    + 	} else {
    +--- a/scaffold.c
    ++++ b/scaffold.c
    +@@ -180,10 +180,12 @@ struct request_info *request;
    + 
    + /* ARGSUSED */
    + 
    +-void    rfc931(request)
    +-struct request_info *request;
    ++void    rfc931(rmt_sin, our_sin, dest)
    ++struct sockaddr_in *rmt_sin;
    ++struct sockaddr_in *our_sin;
    ++char   *dest;
    + {
    +-    strcpy(request->user, unknown);
    ++    strcpy(dest, unknown);
    + }
    + 
    + /* check_path - examine accessibility */
    +--- /dev/null
    ++++ b/weak_symbols.c
    +@@ -0,0 +1,11 @@
    ++ /*
    ++  * @(#) weak_symbols.h 1.5 99/12/29 23:50
    ++  * 
    ++  * Author: Anthony Towns 
    ++  */
    ++
    ++#ifdef HAVE_WEAKSYMS
    ++#include 
    ++int deny_severity = LOG_WARNING;
    ++int allow_severity = SEVERITY; 
    ++#endif
    diff --git a/libs/tcp_wrappers/patches/002-opt_cflags.patch b/libs/tcp_wrappers/patches/002-opt_cflags.patch
    new file mode 100644
    index 0000000..1f38eb3
    --- /dev/null
    +++ b/libs/tcp_wrappers/patches/002-opt_cflags.patch
    @@ -0,0 +1,12 @@
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -689,7 +689,8 @@ SHLIBFLAGS = -Lshared -lwrap
    + shared/%.o: %.c
    + 	$(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@
    + 
    +-CFLAGS	= -O2 -g -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
    ++OPT_CFLAGS = -O2 -g
    ++CFLAGS	= $(OPT_CFLAGS) -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
    + 	$(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
    + 	-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
    + 	-DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
    diff --git a/libs/tcp_wrappers/patches/003-scaffold_malloc.patch b/libs/tcp_wrappers/patches/003-scaffold_malloc.patch
    new file mode 100644
    index 0000000..ecda5ae
    --- /dev/null
    +++ b/libs/tcp_wrappers/patches/003-scaffold_malloc.patch
    @@ -0,0 +1,17 @@
    +--- a/scaffold.c
    ++++ b/scaffold.c
    +@@ -20,13 +20,12 @@ static char sccs_id[] = "@(#) scaffold.c
    + #include 
    + #include 
    + #include 
    ++#include 
    + 
    + #ifndef INADDR_NONE
    + #define	INADDR_NONE	(-1)		/* XXX should be 0xffffffff */
    + #endif
    + 
    +-extern char *malloc();
    +-
    + /* Application-specific. */
    + 
    + #include "tcpd.h"
    diff --git a/libs/tcp_wrappers/patches/004-ipv4_prefix.patch b/libs/tcp_wrappers/patches/004-ipv4_prefix.patch
    new file mode 100644
    index 0000000..29c9cef
    --- /dev/null
    +++ b/libs/tcp_wrappers/patches/004-ipv4_prefix.patch
    @@ -0,0 +1,72 @@
    +--- a/hosts_access.5
    ++++ b/hosts_access.5
    +@@ -90,6 +90,9 @@ bitwise AND of the address and the `mask
    + pattern `131.155.72.0/255.255.254.0' matches every address in the
    + range `131.155.72.0' through `131.155.73.255'.
    + .IP \(bu
    ++An expression of the form `n.n.n.n/m\' is interpreted as a
    ++`net/prefixlen\' pair, as below, for IPv4 addresses.
    ++.IP \(bu
    + A string that begins with a `/' character is treated as a file
    + name. A host name or address is matched if it matches any host name
    + or address pattern listed in the named file. The file format is
    +--- a/tcpd.h
    ++++ b/tcpd.h
    +@@ -93,6 +93,7 @@ extern void refuse __P((struct request_i
    + extern char *xgets __P((char *, int, FILE *));	/* fgets() on steroids */
    + extern char *split_at __P((char *, int));	/* strchr() and split */
    + extern unsigned long dot_quad_addr __P((char *)); /* restricted inet_addr() */
    ++extern unsigned long prefix_to_netmask __P((char *)); /* 0-32 prefix length */
    + 
    + /* Global variables. */
    + 
    +--- a/misc.c
    ++++ b/misc.c
    +@@ -14,6 +14,8 @@ static char sccsic[] = "@(#) misc.c 1.2
    + #include 
    + #include 
    + #include 
    ++#include 
    ++#include 
    + 
    + #include "tcpd.h"
    + 
    +@@ -85,3 +87,22 @@ char   *str;
    +     }
    +     return (runs == 4 ? inet_addr(str) : INADDR_NONE);
    + }
    ++
    ++/* prefix_to_netmask - convert prefix (0-32) to netmask */
    ++
    ++unsigned long prefix_to_netmask(str)
    ++char	*str;
    ++{
    ++    unsigned long prefix;
    ++    char *endptr;
    ++
    ++    if (!isdigit(str[0]))
    ++	return INADDR_NONE;
    ++
    ++    prefix = strtoul(str, &endptr, 10);
    ++    if ((endptr == str) || (*endptr != '\0') || (prefix > 32))
    ++	return INADDR_NONE;
    ++
    ++    return htonl(~0UL << (32 - prefix));
    ++}
    ++
    +--- a/hosts_access.c
    ++++ b/hosts_access.c
    +@@ -345,7 +345,12 @@ char   *string;
    +     if ((addr = dot_quad_addr(string)) == INADDR_NONE)
    + 	return (NO);
    +     if ((net = dot_quad_addr(net_tok)) == INADDR_NONE
    +-	|| (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) {
    ++	|| ((mask = dot_quad_addr(mask_tok)) == INADDR_NONE
    ++	    && strcmp(mask_tok, "255.255.255.255")
    ++	    && (mask = prefix_to_netmask(mask_tok)) == INADDR_NONE
    ++	    && strcmp(mask_tok, "32"))) {
    ++	/* 255.255.255.255 == INADDR_NONE, separate check needed. TJ. */
    ++	/* 32 == INADDR_NONE, separate check needed. philipp */
    + 	tcpd_warn("bad net/mask expression: %s/%s", net_tok, mask_tok);
    + 	return (NO);				/* not tcpd_jump() */
    +     }
    diff --git a/libs/tiff/Makefile b/libs/tiff/Makefile
    new file mode 100644
    index 0000000..7b4764e
    --- /dev/null
    +++ b/libs/tiff/Makefile
    @@ -0,0 +1,109 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +# blogic@openwrt.org
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=tiff
    +PKG_VERSION:=3.9.2
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://download.osgeo.org/libtiff
    +PKG_MD5SUM:=93e56e421679c591de7552db13384cb8
    +
    +PKG_FIXUP:=libtool-ucxx
    +PKG_REMOVE_FILES:=autogen.sh aclocal.m4
    +
    +PKG_INSTALL:=1
    +
    +PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_libtiffxx
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/tiff/Default
    +  TITLE:=TIFF
    +  URL:=http://www.remotesensing.org/libtiff/
    +endef
    +
    +define Package/libtiff
    +$(call Package/tiff/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= library
    +  DEPENDS:=+zlib +libjpeg
    +endef
    +
    +define Package/libtiffxx
    +$(call Package/tiff/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= library(c++ bindings)
    +  DEPENDS:=+libtiff +uclibcxx
    +endef
    +
    +define Package/tiff-utils
    +$(call Package/tiff/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  TITLE+= utilities
    +  DEPENDS:=+libtiff
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +MAKE_FLAGS += \
    +    CXX="g++-uc"
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		$(if $(CONFIG_PACKAGE_libtiffxx), \
    +			--enable-cxx, \
    +			--disable-cxx \
    +		) \
    +		--enable-ccitt \
    +		--enable-packbits \
    +		--enable-lzw \
    +		--enable-thunder \
    +		--enable-next \
    +		--enable-logluv \
    +		--enable-mdi \
    +		--enable-zlib \
    +		--enable-jpeg \
    +		--disable-old-jpeg \
    +		--disable-jbig \
    +		--without-x \
    +		--with-apple-opengl-framework \
    +		, \
    +		CXX="g++-uc" \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/{lib,include}
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
    +endef
    +
    +define Package/libtiff/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiff.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/libtiffxx/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiffxx.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/tiff-utils/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,libtiff))
    +$(eval $(call BuildPackage,libtiffxx))
    +$(eval $(call BuildPackage,tiff-utils))
    diff --git a/libs/tokyocabinet/Makefile b/libs/tokyocabinet/Makefile
    new file mode 100644
    index 0000000..2ddcb1b
    --- /dev/null
    +++ b/libs/tokyocabinet/Makefile
    @@ -0,0 +1,62 @@
    +# 
    +# Copyright (C) 2007-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=tokyocabinet
    +PKG_VERSION:=1.4.47
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://fallabs.com/tokyocabinet
    +PKG_MD5SUM:=3d94fe2aebf5d9ff0478ed895bc46fc9
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/tokyocabinet
    +  SUBMENU:=database
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=A library of routines to manage databases
    +  URL:=http://fallabs.com/tokyocabinet/
    +  DEPENDS:=+zlib +bzip2 +libpthread
    +  MAINTAINER:=Obinou 
    +endef
    +
    +define Package/tokyocabinet/description
    + Tokyo Cabinet is a library of routines for managing a database.
    + The database is a simple data file containing records, each
    + is a pair of a key and a value. Every key and value is serial bytes
    + with variable length. Both binary data and character string can be
    + used as a key and a value. There is neither concept of data tables
    + nor data types. Records are organized in hash table, B+ tree,
    + or fixed-length array.
    +
    + Tokyo Cabinet is developed as the successor of GDBM and QDBM on the
    + following purposes. They are achieved and Tokyo Cabinet replaces
    + conventional DBM products.
    +endef
    +
    +CONFIGURE_ARGS += --prefix=/usr
    +    
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR)
    +	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
    +endef
    +
    +define Build/InstallDev
    +	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(1)" install
    +endef
    +
    +define Package/tokyocabinet/install
    +	$(INSTALL_DIR)  $(1)/usr/lib
    +	$(CP)  $(PKG_INSTALL_DIR)/usr/lib/libtokyocabinet.so*  $(1)/usr/lib
    +	$(INSTALL_DIR)   $(1)/usr/share/tokyocabinet
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/tokyocabinet/tokyocabinet.idl $(1)/usr/share/tokyocabinet
    +endef
    +
    +$(eval $(call BuildPackage,tokyocabinet))
    diff --git a/libs/tokyocabinet/patches/100-remove_extra_paths_from_configure.patch b/libs/tokyocabinet/patches/100-remove_extra_paths_from_configure.patch
    new file mode 100644
    index 0000000..aa9ba24
    --- /dev/null
    +++ b/libs/tokyocabinet/patches/100-remove_extra_paths_from_configure.patch
    @@ -0,0 +1,75 @@
    +diff -ru tokyocabinet-1.4.47/configure tokyocabinet-1.4.47-new/configure
    +--- tokyocabinet-1.4.47/configure	2011-02-11 10:59:53.000000000 +0100
    ++++ tokyocabinet-1.4.47-new/configure	2011-06-01 16:54:33.082157954 +0200
    +@@ -2066,24 +2066,14 @@
    + 
    + # Building flags
    + MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char -O2"
    +-MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I$HOME/include -I/usr/local/include"
    ++MYCPPFLAGS="-I."
    + MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__"
    +-MYLDFLAGS="-L. -L\$(LIBDIR) -L$HOME/lib -L/usr/local/lib"
    ++MYLDFLAGS="-L."
    + MYCMDLDFLAGS=""
    + MYRUNPATH="\$(LIBDIR)"
    + MYLDLIBPATHENV="LD_LIBRARY_PATH"
    + MYPOSTCMD="true"
    + 
    +-# Building paths
    +-PATH="$PATH:$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
    +-PATH="$PATH:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/xpg4/bin:/usr/xpg6/bin:/usr/ucb"
    +-CPATH="$HOME/include:/usr/local/include:$CPATH"
    +-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
    +-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
    +-PKG_CONFIG_PATH="$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
    +-export PATH CPATH LIBRARY_PATH LD_LIBRARY_PATH PKG_CONFIG_PATH
    +-
    +-
    + 
    + #================================================================
    + # Options
    +diff -ru tokyocabinet-1.4.47/configure.in tokyocabinet-1.4.47-new/configure.in
    +--- tokyocabinet-1.4.47/configure.in	2010-08-15 16:14:53.000000000 +0200
    ++++ tokyocabinet-1.4.47-new/configure.in	2011-06-01 16:53:34.645989924 +0200
    +@@ -32,25 +32,14 @@
    + 
    + # Building flags
    + MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char -O2"
    +-MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I$HOME/include -I/usr/local/include"
    ++MYCPPFLAGS="-I."
    + MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__"
    +-MYLDFLAGS="-L. -L\$(LIBDIR) -L$HOME/lib -L/usr/local/lib"
    ++MYLDFLAGS="-L."
    + MYCMDLDFLAGS=""
    + MYRUNPATH="\$(LIBDIR)"
    + MYLDLIBPATHENV="LD_LIBRARY_PATH"
    + MYPOSTCMD="true"
    + 
    +-# Building paths
    +-PATH="$PATH:$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
    +-PATH="$PATH:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/xpg4/bin:/usr/xpg6/bin:/usr/ucb"
    +-CPATH="$HOME/include:/usr/local/include:$CPATH"
    +-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
    +-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
    +-PKG_CONFIG_PATH="$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
    +-export PATH CPATH LIBRARY_PATH LD_LIBRARY_PATH PKG_CONFIG_PATH
    +-
    +-
    +-
    + #================================================================
    + # Options
    + #================================================================
    +diff -ru tokyocabinet-1.4.47/Makefile.in tokyocabinet-1.4.47-new/Makefile.in
    +--- tokyocabinet-1.4.47/Makefile.in	2010-07-04 10:36:20.000000000 +0200
    ++++ tokyocabinet-1.4.47-new/Makefile.in	2011-06-01 15:02:19.383826342 +0200
    +@@ -54,8 +54,8 @@
    + LDFLAGS = @MYLDFLAGS@
    + CMDLDFLAGS = @MYCMDLDFLAGS@
    + LIBS = @LIBS@
    +-LDENV = LD_RUN_PATH=/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@:.
    +-RUNENV = @MYLDLIBPATHENV@=.:/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@
    ++LDENV = LD_RUN_PATH=$(LIBDIR):@MYRUNPATH@:.
    ++RUNENV = @MYLDLIBPATHENV@=.:$(LIBDIR):@MYRUNPATH@
    + POSTCMD = @MYPOSTCMD@
    + 
    + 
    diff --git a/libs/ucl/Makefile b/libs/ucl/Makefile
    new file mode 100644
    index 0000000..4c4bdd2
    --- /dev/null
    +++ b/libs/ucl/Makefile
    @@ -0,0 +1,57 @@
    +# 
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ucl
    +PKG_VERSION:=1.03
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/ucl/download/
    +PKG_MD5SUM:=852bd691d8abc75b52053465846fba34
    +
    +PKG_FIXUP:=libtool
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libucl
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Portable lossless data compression library
    +  URL:=http://www.oberhumer.com/opensource/ucl/
    +endef
    +
    +define Package/libucl/description
    +UCL is a portable lossless data compression library written in ANSI C. UCL
    +implements a number of compression algorithms that achieve an excellent
    +compression ratio while allowing *very* fast decompression. Decompression
    +requires no additional memory.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--enable-static \
    +	--enable-shared \
    +	--disable-asm
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/ucl
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/ucl/ucl{,conf}.h $(1)/usr/include/ucl/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libucl.{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/libucl/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libucl.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libucl))
    +
    diff --git a/libs/ucl/patches/001-autoconf-compat.patch b/libs/ucl/patches/001-autoconf-compat.patch
    new file mode 100644
    index 0000000..7dda83d
    --- /dev/null
    +++ b/libs/ucl/patches/001-autoconf-compat.patch
    @@ -0,0 +1,11 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -48,7 +48,7 @@ AC_CANONICAL_TARGET
    + AM_MAINTAINER_MODE
    + 
    + if test -z "$ac_abs_top_srcdir"; then
    +-    _AC_SRCPATHS(.)
    ++    _AC_SRCDIRS(.)
    + fi
    + if test -r .Conf.settings1; then
    +     . ./.Conf.settings1
    diff --git a/libs/uclibc++/Makefile b/libs/uclibc++/Makefile
    new file mode 100644
    index 0000000..503c12e
    --- /dev/null
    +++ b/libs/uclibc++/Makefile
    @@ -0,0 +1,87 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=uclibc++
    +PKG_VERSION:=0.2.2
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=uClibc++-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://cxx.uclibc.org/src/
    +PKG_MD5SUM:=1ceef3209cca88be8f1bd9de99735954
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/uClibc++-$(PKG_VERSION)
    +PKG_BUILD_PARALLEL:=1
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/uclibcxx
    +  NAME:=uclibc++
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=C++ library for embedded systems
    +  URL:=http://cxx.uclibc.org/src/
    +endef
    +
    +UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
    +	-e 's/i.86/i386/' \
    +	-e 's/sparc.*/sparc/' \
    +	-e 's/m68k.*/m68k/' \
    +	-e 's/ppc/powerpc/g' \
    +	-e 's/v850.*/v850/g' \
    +	-e 's/sh64/sh/' \
    +	-e 's/sh[234].*/sh/' \
    +	-e 's/mips.*/mips/' \
    +	-e 's/mipsel.*/mips/' \
    +	-e 's/cris.*/cris/' \
    +)
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +MAKE_FLAGS:= \
    +	TOPDIR="$(PKG_BUILD_DIR)/" \
    +	$(TARGET_CONFIGURE_OPTS) \
    +	CPU_CFLAGS="$(TARGET_CFLAGS)" \
    +	CROSS="$(TARGET_CROSS)" \
    +	CP="$(CP)" \
    +	GEN_LIBS="-lc $(LIBGCC_S)" \
    +	check_as_needed=
    +
    +# check_as_needed overrides dependency on libgcc_s
    +
    +define Build/Configure
    +	if [ -f ./files/config.$(UCLIBC_TARGET_ARCH) ]; then \
    +		cp ./files/config.$(UCLIBC_TARGET_ARCH) $(PKG_BUILD_DIR)/.config; \
    +	else \
    +		cp ./files/config.default $(PKG_BUILD_DIR)/.config; \
    +	fi
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin $(1)/usr/include/uClibc++ $(1)/usr/lib
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/g++-uc $(2)/bin/
    +	$(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include/uClibc++/
    +	$(CP) $(PKG_INSTALL_DIR)/lib/libuClibc++*.{a,so}* $(1)/usr/lib/
    +	$(SED) 's|-I/include/|-I$(STAGING_DIR)/usr/include/uClibc++/|g' $(2)/bin/g++-uc
    +	$(SED) 's|-L/lib/|-L$(STAGING_DIR)/usr/lib/|g' $(2)/bin/g++-uc
    +# add another wrapper which links against both uClibc++ and libstdc++ 
    +	$(INSTALL_BIN) $(2)/bin/g++-uc $(2)/bin/g++-uc+std
    +	$(SED) 's|^WRAPPER_INCLUDEDIR=.*||g' $(2)/bin/g++-uc+std
    +	$(SED) 's|-luClibc++|-Wl,-Bdynamic,-luClibc++,-Bstatic,-lstdc++,-Bdynamic|g' $(2)/bin/g++-uc+std
    +	$(SED) 's|-nostdinc++||g' $(2)/bin/g++-uc+std
    +endef
    +
    +define Package/uclibcxx/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/lib/libuClibc++.so.* $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/lib/libuClibc++-*.so $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,uclibcxx))
    diff --git a/libs/uclibc++/files/config.default b/libs/uclibc++/files/config.default
    new file mode 100644
    index 0000000..944e1a6
    --- /dev/null
    +++ b/libs/uclibc++/files/config.default
    @@ -0,0 +1,58 @@
    +#
    +# Automatically generated make config: don't edit
    +#
    +
    +#
    +# Target Features and Options
    +#
    +UCLIBCXX_HAS_FLOATS=y
    +# UCLIBCXX_HAS_LONG_DOUBLE is not set
    +# UCLIBCXX_HAS_TLS is not set
    +WARNINGS="-Wall"
    +BUILD_EXTRA_LIBRARIES=""
    +HAVE_DOT_CONFIG=y
    +
    +#
    +# String and I/O Stream Support
    +#
    +UCLIBCXX_HAS_WCHAR=y
    +UCLIBCXX_IOSTREAM_BUFSIZE=32
    +UCLIBCXX_HAS_LFS=y
    +UCLIBCXX_SUPPORT_CDIR=y
    +UCLIBCXX_SUPPORT_CIN=y
    +UCLIBCXX_SUPPORT_COUT=y
    +UCLIBCXX_SUPPORT_CERR=y
    +UCLIBCXX_SUPPORT_CLOG=y
    +UCLIBCXX_SUPPORT_WCIN=y
    +UCLIBCXX_SUPPORT_WCOUT=y
    +UCLIBCXX_SUPPORT_WCERR=y
    +UCLIBCXX_SUPPORT_WCLOG=y
    +
    +#
    +# STL and Code Expansion
    +#
    +UCLIBCXX_STL_BUFFER_SIZE=32
    +UCLIBCXX_CODE_EXPANSION=y
    +UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS=y
    +UCLIBCXX_EXPAND_STRING_CHAR=y
    +UCLIBCXX_EXPAND_VECTOR_BASIC=y
    +UCLIBCXX_EXPAND_IOS_CHAR=y
    +UCLIBCXX_EXPAND_STREAMBUF_CHAR=y
    +UCLIBCXX_EXPAND_ISTREAM_CHAR=y
    +UCLIBCXX_EXPAND_OSTREAM_CHAR=y
    +UCLIBCXX_EXPAND_FSTREAM_CHAR=y
    +UCLIBCXX_EXPAND_SSTREAM_CHAR=y
    +
    +#
    +# Library Installation Options
    +#
    +UCLIBCXX_RUNTIME_PREFIX=""
    +UCLIBCXX_RUNTIME_INCLUDE_SUBDIR="/include"
    +UCLIBCXX_RUNTIME_LIB_SUBDIR="/lib"
    +UCLIBCXX_RUNTIME_BIN_SUBDIR="/bin"
    +UCLIBCXX_EXCEPTION_SUPPORT=y
    +IMPORT_LIBSUP=y
    +# IMPORT_LIBGCC_EH is not set
    +BUILD_STATIC_LIB=y
    +# BUILD_ONLY_STATIC_LIB is not set
    +# DODEBUG is not set
    diff --git a/libs/uclibc++/patches/001-path_to_make.patch b/libs/uclibc++/patches/001-path_to_make.patch
    new file mode 100644
    index 0000000..840dac3
    --- /dev/null
    +++ b/libs/uclibc++/patches/001-path_to_make.patch
    @@ -0,0 +1,30 @@
    +diff -ur old/Makefile dev/Makefile
    +--- old/Makefile	Sat Oct 14 17:49:55 2006
    ++++ dev/Makefile	Sat Oct 14 17:50:18 2006
    +@@ -1,4 +1,3 @@
    +-MAKE    = make
    + SUBDIRS = bin include src
    + 
    + # User defines:
    +@@ -43,10 +42,10 @@
    + #Menu configuration system
    + 
    + extra/config/conf:
    +-	make -C extra/config conf
    ++	$(MAKE) -C extra/config conf
    + 
    + extra/config/mconf:
    +-	make -C extra/config ncurses mconf
    ++	$(MAKE) -C extra/config ncurses mconf
    + 
    + menuconfig: extra/config/mconf
    + 	@./extra/config/mconf extra/Configs/Config.in
    +@@ -71,7 +70,7 @@
    + 
    + include/system_configuration.h: .config
    + 	@if [ ! -x ./extra/config/conf ] ; then \
    +-		make -C extra/config conf; \
    ++		$(MAKE) -C extra/config conf; \
    + 	fi;
    + 	@./extra/config/conf -o extra/Configs/Config.in
    + 
    diff --git a/libs/uclibc++/patches/002-path_to_bash.patch b/libs/uclibc++/patches/002-path_to_bash.patch
    new file mode 100644
    index 0000000..46b793b
    --- /dev/null
    +++ b/libs/uclibc++/patches/002-path_to_bash.patch
    @@ -0,0 +1,12 @@
    +diff -ur old/bin/Makefile dev/bin/Makefile
    +--- old/bin/Makefile	Sat Oct 14 17:49:54 2006
    ++++ dev/bin/Makefile	Sat Oct 14 17:57:33 2006
    +@@ -13,7 +13,7 @@
    + 	$(INSTALL) -m 755 $(WRAPPER) $(PREFIX)$(UCLIBCXX_RUNTIME_BINDIR)
    + 
    + $(WRAPPER):
    +-	echo "#!/bin/bash" > $(WRAPPER)
    ++	echo "#!/usr/bin/env bash" > $(WRAPPER)
    + 	echo "" >> $(WRAPPER)
    + 	echo 'WRAPPER_INCLUDEDIR="$${WRAPPER_INCLUDEDIR:=-I$(UCLIBCXX_RUNTIME_INCLUDEDIR)}"' >> $(WRAPPER)
    + 	echo 'WRAPPER_LIBDIR="$${WRAPPER_LIBDIR:=-L$(UCLIBCXX_RUNTIME_LIBDIR)}"' >> $(WRAPPER)
    diff --git a/libs/uclibc++/patches/003-cp_command.patch b/libs/uclibc++/patches/003-cp_command.patch
    new file mode 100644
    index 0000000..53d0ed7
    --- /dev/null
    +++ b/libs/uclibc++/patches/003-cp_command.patch
    @@ -0,0 +1,19 @@
    +diff -ur old/src/Makefile dev/src/Makefile
    +--- old/src/Makefile	Sat Oct 14 17:49:54 2006
    ++++ dev/src/Makefile	Sat Oct 14 18:02:30 2006
    +@@ -25,12 +25,14 @@
    + 
    + all:	libgcc_eh libsupc $(EXOBJS) $(ALLBIN)
    + 
    ++CP = cp -fPR
    ++
    + install:
    + 	$(INSTALL) -d $(PREFIX)$(UCLIBCXX_RUNTIME_LIBDIR)
    + ifneq ($(BUILD_ONLY_STATIC_LIB),y)
    + 	$(INSTALL) -m 755 $(SHARED_FULLNAME) \
    + 		$(PREFIX)$(UCLIBCXX_RUNTIME_LIBDIR)
    +-	cp -fa $(SHARED_MAJORNAME) $(LIBNAME).so $(PREFIX)$(UCLIBCXX_RUNTIME_LIBDIR)
    ++	$(CP) $(SHARED_MAJORNAME) $(LIBNAME).so $(PREFIX)$(UCLIBCXX_RUNTIME_LIBDIR)
    + endif
    + ifeq ($(BUILD_STATIC_LIB),y)
    + 	$(INSTALL) -m 644 $(LIBNAME).a $(PREFIX)$(UCLIBCXX_RUNTIME_LIBDIR)
    diff --git a/libs/uclibc++/patches/004-ccache_fixes.patch b/libs/uclibc++/patches/004-ccache_fixes.patch
    new file mode 100644
    index 0000000..10ceb79
    --- /dev/null
    +++ b/libs/uclibc++/patches/004-ccache_fixes.patch
    @@ -0,0 +1,24 @@
    +diff -ruN uClibc++-0.2.2-old/src/abi/libgcc_eh/Makefile uClibc++-0.2.2-new/src/abi/libgcc_eh/Makefile
    +--- uClibc++-0.2.2-old/src/abi/libgcc_eh/Makefile	2007-06-04 00:51:13.000000000 +0200
    ++++ uClibc++-0.2.2-new/src/abi/libgcc_eh/Makefile	2007-09-03 21:51:07.000000000 +0200
    +@@ -16,7 +16,7 @@
    + #
    + #else
    + #	echo Binary
    +-	$(AR) x $(shell CC=$(CC) $(TOPDIR)/scripts/find_libgcc_eh.sh)
    ++	$(AR) x $(shell CC="$(CC)" $(TOPDIR)/scripts/find_libgcc_eh.sh)
    + #endif
    + #endif
    + 
    +diff -ruN uClibc++-0.2.2-old/src/abi/libsupc/Makefile uClibc++-0.2.2-new/src/abi/libsupc/Makefile
    +--- uClibc++-0.2.2-old/src/abi/libsupc/Makefile	2007-06-04 00:51:13.000000000 +0200
    ++++ uClibc++-0.2.2-new/src/abi/libsupc/Makefile	2007-09-03 21:51:17.000000000 +0200
    +@@ -14,7 +14,7 @@
    + #
    + #else
    + #	echo Binary
    +-	$(AR) x $(shell CC=$(CC) $(TOPDIR)/scripts/find_libsupc.sh)
    ++	$(AR) x $(shell CC="$(CC)" $(TOPDIR)/scripts/find_libsupc.sh)
    + 	$(RM) -f new_op*.o del_op*.o pure.o new_handler.o eh_alloc.o eh_globals.o
    + #
    + #endif
    diff --git a/libs/uclibc++/patches/005-wrapper.patch b/libs/uclibc++/patches/005-wrapper.patch
    new file mode 100644
    index 0000000..b526a90
    --- /dev/null
    +++ b/libs/uclibc++/patches/005-wrapper.patch
    @@ -0,0 +1,12 @@
    +diff -ruN uClibc++-0.2.2-old/bin/Makefile uClibc++-0.2.2-new/bin/Makefile
    +--- uClibc++-0.2.2-old/bin/Makefile	2007-09-23 13:46:10.000000000 +0200
    ++++ uClibc++-0.2.2-new/bin/Makefile	2007-09-23 13:47:03.000000000 +0200
    +@@ -25,7 +25,7 @@
    + 	echo 'while [ -n "$$1" ]' >> $(WRAPPER)
    + 	echo 'do' >> $(WRAPPER)
    + 	echo '	WRAPPER_OPTIONS="$$WRAPPER_OPTIONS $$1"' >> $(WRAPPER)
    +-	echo '	if [ "$$1" = "-c" -o "$$1" = "-E" -o "$$1" = "-S" ]' >> $(WRAPPER)
    ++	echo '	if [ "$$1" = "-c" -o "$$1" = "-E" -o "$$1" = "-S" -o "$$1" = "-MF" ]' >> $(WRAPPER)
    + 	echo '	then' >> $(WRAPPER)
    + 	echo '		WRAPPER_INCLIB="N"' >> $(WRAPPER)
    + 	echo '	fi' >> $(WRAPPER)
    diff --git a/libs/uclibc++/patches/006-eabi_fix.patch b/libs/uclibc++/patches/006-eabi_fix.patch
    new file mode 100644
    index 0000000..bc970a7
    --- /dev/null
    +++ b/libs/uclibc++/patches/006-eabi_fix.patch
    @@ -0,0 +1,42 @@
    +Index: uClibc++-0.2.2/include/typeinfo
    +===================================================================
    +--- uClibc++-0.2.2.orig/include/typeinfo	2008-02-13 00:37:04.000000000 +0100
    ++++ uClibc++-0.2.2/include/typeinfo	2008-02-13 00:37:34.000000000 +0100
    +@@ -44,6 +44,7 @@
    +   class __class_type_info;
    + } // namespace __cxxabiv1
    + 
    ++#ifndef __GXX_MERGED_TYPEINFO_NAMES
    + #if !__GXX_WEAK__
    +   // If weak symbols are not supported, typeinfo names are not merged.
    +   #define __GXX_MERGED_TYPEINFO_NAMES 0
    +@@ -51,6 +52,7 @@
    +   // On platforms that support weak symbols, typeinfo names are merged.
    +   #define __GXX_MERGED_TYPEINFO_NAMES 1
    + #endif
    ++#endif
    + 
    + namespace std 
    + {
    +Index: uClibc++-0.2.2/include/unwind-cxx.h
    +===================================================================
    +--- uClibc++-0.2.2.orig/include/unwind-cxx.h	2008-02-13 00:38:04.000000000 +0100
    ++++ uClibc++-0.2.2/include/unwind-cxx.h	2008-02-13 00:40:32.000000000 +0100
    +@@ -135,6 +135,7 @@
    + 
    + // This is the exception class we report -- "GNUCC++\0".
    + const _Unwind_Exception_Class __gxx_exception_class
    ++#ifndef __ARM_EABI_UNWINDER__
    + = ((((((((_Unwind_Exception_Class) 'G' 
    + 	 << 8 | (_Unwind_Exception_Class) 'N')
    + 	<< 8 | (_Unwind_Exception_Class) 'U')
    +@@ -143,6 +144,9 @@
    +      << 8 | (_Unwind_Exception_Class) '+')
    +     << 8 | (_Unwind_Exception_Class) '+')
    +    << 8 | (_Unwind_Exception_Class) '\0');
    ++#else
    ++= "GNUC++";
    ++#endif
    + 
    + // GNU C++ personality routine, Version 0.
    + extern "C" _Unwind_Reason_Code __gxx_personality_v0
    diff --git a/libs/uclibc++/patches/007-numeric_limits.patch b/libs/uclibc++/patches/007-numeric_limits.patch
    new file mode 100644
    index 0000000..1ed7d6c
    --- /dev/null
    +++ b/libs/uclibc++/patches/007-numeric_limits.patch
    @@ -0,0 +1,66 @@
    +Index: uClibc++-0.2.2/include/limits
    +===================================================================
    +--- uClibc++-0.2.2/include/limits	(revision 1877)
    ++++ uClibc++-0.2.2/include/limits	(revision 1878)
    +@@ -143,6 +143,53 @@
    + 	static T signaling_NaN();
    + };
    + 
    ++template <> class numeric_limits {
    ++public:
    ++	typedef bool T;
    ++	// General -- meaningful for all specializations.
    ++	static const bool is_specialized = true;
    ++	static T min(){
    ++		return false;
    ++	}
    ++	static T max(){
    ++		return true;
    ++	}
    ++	static const int radix = 2;
    ++	static const int digits = 1;
    ++	static const int digits10 = 0;
    ++	static const bool is_signed = false;
    ++	static const bool is_integer = true;
    ++	static const bool is_exact = true;
    ++	static const bool traps = false;
    ++	static const bool is_modulo = false;
    ++	static const bool is_bounded = true;
    ++
    ++	// Floating point specific.
    ++
    ++	static T epsilon(){
    ++		return 0;
    ++	}
    ++	static T round_error(){
    ++		return 0;
    ++	}
    ++	static const int min_exponent10 = 0;
    ++	static const int max_exponent10 = 0;
    ++	static const int min_exponent = 0;
    ++
    ++	static const int max_exponent = 0;
    ++	static const bool has_infinity = false;
    ++	static const bool has_quiet_NaN = false;
    ++	static const bool has_signaling_NaN = false;
    ++	static const bool is_iec559 = false;
    ++	static const bool has_denorm = false;
    ++	static const bool tinyness_before = false;
    ++	static const float_round_style round_style = round_indeterminate;
    ++	static T denorm_min();
    ++	static T infinity();
    ++	static T quiet_NaN();
    ++	static T signaling_NaN();
    ++};
    ++
    + template <> class numeric_limits {
    + public:
    + 	typedef unsigned char T;
    +@@ -567,6 +614,7 @@
    + };
    + 
    + template <> class numeric_limits {
    ++public:
    + 	typedef double numeric_type;
    + 
    + 	static const bool is_specialized = true;
    diff --git a/libs/uclibc++/patches/008-integer_width.patch b/libs/uclibc++/patches/008-integer_width.patch
    new file mode 100644
    index 0000000..c467e60
    --- /dev/null
    +++ b/libs/uclibc++/patches/008-integer_width.patch
    @@ -0,0 +1,314 @@
    +Index: uClibc++-0.2.2/include/ostream
    +===================================================================
    +--- uClibc++-0.2.2/include/ostream	(revision 708)
    ++++ uClibc++-0.2.2/include/ostream	(revision 709)
    +@@ -129,6 +129,18 @@
    + 			return *this;
    + 		}
    + 
    ++		_UCXXEXPORT void printout(const char_type* s, streamsize n)
    ++                {
    ++                  int extra = ios::width() - n;
    ++                  if ((ios::flags()&ios::adjustfield) == ios::right)
    ++                    while (extra-- > 0)
    ++                      put(ios::fill());
    ++                  write(s, n);
    ++                  if ((ios::flags()&ios::adjustfield) == ios::left)
    ++                    while (extra-- > 0)
    ++                      put(ios::fill());
    ++                }
    ++
    + 	protected:
    + 		basic_ostream(const basic_ostream &){ }
    + 		basic_ostream & operator=(const basic_ostream &){ return *this; }
    +@@ -142,15 +154,15 @@
    + 		sentry s(*this);
    + 		if( basic_ios::flags() & ios_base::boolalpha){
    + 			if(n){
    +-				write("true", 4);
    ++				printout("true", 4);
    + 			}else{
    +-				write("false", 5);
    ++				printout("false", 5);
    + 			}
    + 		}else{
    + 			if(n){
    +-				write("1", 1);
    ++				printout("1", 1);
    + 			}else{
    +-				write("0", 1);
    ++				printout("0", 1);
    + 			}
    + 		}
    + 		if(basic_ios::flags() & ios_base::unitbuf){
    +@@ -219,7 +231,7 @@
    + 	template  _UCXXEXPORT basic_ostream& basic_ostream::operator<<(void* p){
    + 		sentry s(*this);
    + 		char buffer[20];
    +-		write(buffer, snprintf(buffer, 20, "%p", p) );
    ++		printout(buffer, snprintf(buffer, 20, "%p", p) );
    + 		if(basic_ios::flags() & ios_base::unitbuf){
    + 			flush();
    + 		}
    +@@ -356,7 +368,7 @@
    + 		operator<<(basic_ostream& out, const charT* c)
    + 	{
    + 		typename basic_ostream::sentry s(out);
    +-		out.write(c, traits::length(c) );
    ++		out.printout(c, traits::length(c) );
    + 		return out;
    + 	}
    + 	
    +@@ -364,7 +376,7 @@
    + 		operator<<(basic_ostream& out, const char* c)
    + 	{
    + 		typename basic_ostream::sentry s(out);
    +-		out.write(c, char_traits::length(c) );
    ++		out.printout(c, char_traits::length(c) );
    + 		return out;
    + 	}
    + 
    +@@ -373,7 +385,7 @@
    + 		operator<<(basic_ostream& out, const char* c)
    + 	{
    + 		typename basic_ostream::sentry s(out);
    +-		out.write(c, traits::length(c));
    ++		out.printout(c, traits::length(c));
    + 		return out;
    + 	}
    + 
    +@@ -389,7 +401,7 @@
    + 			temp[i] = out.widen(c[i]);
    + 		}
    + 
    +-		out.write(temp, numChars);
    ++		out.printout(temp, numChars);
    + 		return out;
    + 	}
    + #endif
    +@@ -399,7 +411,7 @@
    + 		operator<<(basic_ostream& out, const signed char* c)
    + 	{
    + 		typename basic_ostream::sentry s(out);
    +-		out.write(reinterpret_cast(c), traits::length( reinterpret_cast(c)));
    ++		out.printout(reinterpret_cast(c), traits::length( reinterpret_cast(c)));
    + 		return out;
    + 	}
    + 	
    +@@ -407,7 +419,7 @@
    + 		operator<<(basic_ostream& out, const unsigned char* c)
    + 	{
    + 		typename basic_ostream::sentry s(out);
    +-		out.write(reinterpret_cast(c), traits::length( reinterpret_cast(c)));
    ++		out.printout(reinterpret_cast(c), traits::length( reinterpret_cast(c)));
    + 		return out;
    + 	}
    + 
    +Index: uClibc++-0.2.2/include/ostream_helpers
    +===================================================================
    +--- uClibc++-0.2.2/include/ostream_helpers	(revision 708)
    ++++ uClibc++-0.2.2/include/ostream_helpers	(revision 709)
    +@@ -88,7 +88,7 @@
    + 				}
    + 			}
    + 
    +-			stream.write(buffer, snprintf(buffer, 20, formatString, n) );
    ++			stream.printout(buffer, snprintf(buffer, 20, formatString, n) );
    + 
    + 			if(stream.flags() & ios_base::unitbuf){
    + 				stream.flush();
    +@@ -135,7 +135,7 @@
    + 				}
    + 			}
    + 
    +-			stream.write(buffer, snprintf(buffer, 20, formatString, n));
    ++			stream.printout(buffer, snprintf(buffer, 20, formatString, n));
    + 			if(stream.flags() & ios_base::unitbuf){
    + 				stream.flush();
    + 			}
    +@@ -182,7 +182,7 @@
    + 				}
    + 			}
    + 
    +-			stream.write(buffer, snprintf(buffer, 27, formatString, n) );
    ++			stream.printout(buffer, snprintf(buffer, 27, formatString, n) );
    + 
    + 			if(stream.flags() & ios_base::unitbuf){
    + 				stream.flush();
    +@@ -228,7 +228,7 @@
    + 				}
    + 			}
    + 
    +-			stream.write(buffer, snprintf(buffer, 27, formatString, n) );
    ++			stream.printout(buffer, snprintf(buffer, 27, formatString, n) );
    + 
    + 			if(stream.flags() & ios_base::unitbuf){
    + 				stream.flush();
    +@@ -256,7 +256,7 @@
    + 			} else {
    + 				length = snprintf(buffer, 32, "%*.*g",static_cast(stream.width()),static_cast(stream.precision()), f);
    + 			}
    +-			stream.write(buffer, length);
    ++			stream.printout(buffer, length);
    + 			if(stream.flags() & ios_base::unitbuf){
    + 				stream.flush();
    + 			}
    +@@ -280,7 +280,7 @@
    + 			} else {
    + 				length = snprintf(buffer, 32, "%*.*Lg", static_cast(stream.width()), static_cast(stream.precision()), f);
    + 			}
    +-			stream.write(buffer, length);
    ++			stream.printout(buffer, length);
    + 			if(stream.flags() & ios_base::unitbuf){
    + 				stream.flush();
    + 			}
    +@@ -295,25 +295,25 @@
    + 		{
    + 			wchar_t buffer[20];
    + 			if( stream.flags() & ios_base::dec){
    +-				stream.write(buffer, swprintf(buffer, 20, L"%ld", n));
    ++				stream.printout(buffer, swprintf(buffer, 20, L"%ld", n));
    + 			}else if( stream.flags() & ios_base::oct){
    + 				if( stream.flags() & ios_base::showbase){
    +-					stream.write(buffer, swprintf(buffer, 20, L"%#lo", n));
    ++					stream.printout(buffer, swprintf(buffer, 20, L"%#lo", n));
    + 				}else{
    +-					stream.write(buffer, swprintf(buffer, 20, L"%lo", n) );
    ++					stream.printout(buffer, swprintf(buffer, 20, L"%lo", n) );
    + 				}
    + 			}else if (stream.flags() & ios_base::hex){
    + 				if(stream.flags() & ios_base::showbase){
    + 					if(stream.flags() & ios_base::uppercase){
    +-						stream.write(buffer, swprintf(buffer, 20, L"%#lX", n) );
    ++						stream.printout(buffer, swprintf(buffer, 20, L"%#lX", n) );
    + 					}else{
    +-						stream.write(buffer, swprintf(buffer, 20, L"%#lx", n) );
    ++						stream.printout(buffer, swprintf(buffer, 20, L"%#lx", n) );
    + 					}
    + 				}else{
    + 					if(stream.flags() & ios_base::uppercase){
    +-						stream.write(buffer, swprintf(buffer, 20, L"%lX", n) );
    ++						stream.printout(buffer, swprintf(buffer, 20, L"%lX", n) );
    + 					}else{
    +-						stream.write(buffer, swprintf(buffer, 20, L"%lx", n) );
    ++						stream.printout(buffer, swprintf(buffer, 20, L"%lx", n) );
    + 					}
    + 				}
    + 			}
    +@@ -329,25 +329,25 @@
    + 		{
    + 			wchar_t buffer[20];
    + 			if( stream.flags() & ios_base::dec){
    +-				stream.write(buffer, swprintf(buffer, 20, L"%lu", n));
    ++				stream.printout(buffer, swprintf(buffer, 20, L"%lu", n));
    + 			}else if( stream.flags() & ios_base::oct){
    + 				if( stream.flags() & ios_base::showbase){
    +-					stream.write(buffer, swprintf(buffer, 20, L"%#lo", n));
    ++					stream.printout(buffer, swprintf(buffer, 20, L"%#lo", n));
    + 				}else{
    +-					stream.write(buffer, swprintf(buffer, 20, L"%lo", n) );
    ++					stream.printout(buffer, swprintf(buffer, 20, L"%lo", n) );
    + 				}
    + 			}else if (stream.flags() & ios_base::hex){
    + 				if(stream.flags() & ios_base::showbase){
    + 					if(stream.flags() & ios_base::uppercase){
    +-						stream.write(buffer, swprintf(buffer, 20, L"%#lX", n) );
    ++						stream.printout(buffer, swprintf(buffer, 20, L"%#lX", n) );
    + 					}else{
    +-						stream.write(buffer, swprintf(buffer, 20, L"%#lx", n) );
    ++						stream.printout(buffer, swprintf(buffer, 20, L"%#lx", n) );
    + 					}
    + 				}else{
    + 					if(stream.flags() & ios_base::uppercase){
    +-						stream.write(buffer, swprintf(buffer, 20, L"%lX", n) );
    ++						stream.printout(buffer, swprintf(buffer, 20, L"%lX", n) );
    + 					}else{
    +-						stream.write(buffer, swprintf(buffer, 20, L"%lx", n) );
    ++						stream.printout(buffer, swprintf(buffer, 20, L"%lx", n) );
    + 					}
    + 				}
    + 			}
    +@@ -365,25 +365,25 @@
    + 		{
    + 			wchar_t buffer[28];
    + 			if( stream.flags() & ios_base::dec){
    +-				stream.write(buffer, swprintf(buffer, 27, L"%lld", n));
    ++				stream.printout(buffer, swprintf(buffer, 27, L"%lld", n));
    + 			}else if( stream.flags() & ios_base::oct){
    + 				if( stream.flags() & ios_base::showbase){
    +-					stream.write(buffer, swprintf(buffer, 27, L"%#llo", n));
    ++					stream.printout(buffer, swprintf(buffer, 27, L"%#llo", n));
    + 				}else{
    +-					stream.write(buffer, swprintf(buffer, 27, L"%llo", n) );
    ++					stream.printout(buffer, swprintf(buffer, 27, L"%llo", n) );
    + 				}
    + 			}else if (stream.flags() & ios_base::hex){
    + 				if(stream.flags() & ios_base::showbase){
    + 					if(stream.flags() & ios_base::uppercase){
    +-						stream.write(buffer, swprintf(buffer, 27, L"%#llX", n) );
    ++						stream.printout(buffer, swprintf(buffer, 27, L"%#llX", n) );
    + 					}else{
    +-						stream.write(buffer, swprintf(buffer, 27, L"%#llx", n) );
    ++						stream.printout(buffer, swprintf(buffer, 27, L"%#llx", n) );
    + 					}
    + 				}else{
    + 					if(stream.flags() & ios_base::uppercase){
    +-						stream.write(buffer, swprintf(buffer, 27, L"%llX", n) );
    ++						stream.printout(buffer, swprintf(buffer, 27, L"%llX", n) );
    + 					}else{
    +-						stream.write(buffer, swprintf(buffer, 27, L"%llx", n) );
    ++						stream.printout(buffer, swprintf(buffer, 27, L"%llx", n) );
    + 					}
    + 				}
    + 			}
    +@@ -399,25 +399,25 @@
    + 		{
    + 			wchar_t buffer[28];
    + 			if( stream.flags() & ios_base::dec){
    +-				stream.write(buffer, swprintf(buffer, 27, L"%llu", n));
    ++				stream.printout(buffer, swprintf(buffer, 27, L"%llu", n));
    + 			}else if( stream.flags() & ios_base::oct){
    + 				if( stream.flags() & ios_base::showbase){
    +-					stream.write(buffer, swprintf(buffer, 27, L"%#llo", n));
    ++					stream.printout(buffer, swprintf(buffer, 27, L"%#llo", n));
    + 				}else{
    +-					stream.write(buffer, swprintf(buffer, 27, L"%llo", n) );
    ++					stream.printout(buffer, swprintf(buffer, 27, L"%llo", n) );
    + 				}
    + 			}else if (stream.flags() & ios_base::hex){
    + 				if(stream.flags() & ios_base::showbase){
    + 					if(stream.flags() & ios_base::uppercase){
    +-						stream.write(buffer, swprintf(buffer, 27, L"%#llX", n) );
    ++						stream.printout(buffer, swprintf(buffer, 27, L"%#llX", n) );
    + 					}else{
    +-						stream.write(buffer, swprintf(buffer, 27, L"%#llx", n) );
    ++						stream.printout(buffer, swprintf(buffer, 27, L"%#llx", n) );
    + 					}
    + 				}else{
    + 					if(stream.flags() & ios_base::uppercase){
    +-						stream.write(buffer, swprintf(buffer, 27, L"%llX", n) );
    ++						stream.printout(buffer, swprintf(buffer, 27, L"%llX", n) );
    + 					}else{
    +-						stream.write(buffer, swprintf(buffer, 27, L"%llx", n) );
    ++						stream.printout(buffer, swprintf(buffer, 27, L"%llx", n) );
    + 					}
    + 				}
    + 			}
    +@@ -447,7 +447,7 @@
    + 			} else {
    + 				swprintf(format_string, 32, L"%%%u.%ug", static_cast(stream.width()), static_cast(stream.precision()));
    + 			}
    +-			stream.write(buffer, swprintf(buffer, 32, format_string, f) );
    ++			stream.printout(buffer, swprintf(buffer, 32, format_string, f) );
    + 			if(stream.flags() & ios_base::unitbuf){
    + 				stream.flush();
    + 			}
    +@@ -471,7 +471,7 @@
    + 			} else {
    + 				swprintf(format_string, 32, L"%%%u.%uLg", static_cast(stream.width()), static_cast(stream.precision()));
    + 			}
    +-			stream.write(buffer, swprintf(buffer, 32, format_string, f) );
    ++			stream.printout(buffer, swprintf(buffer, 32, format_string, f) );
    + 			if(stream.flags() & ios_base::unitbuf){
    + 				stream.flush();
    + 			}
    diff --git a/libs/uclibc++/patches/009-compile_fixes.patch b/libs/uclibc++/patches/009-compile_fixes.patch
    new file mode 100644
    index 0000000..efcb9e6
    --- /dev/null
    +++ b/libs/uclibc++/patches/009-compile_fixes.patch
    @@ -0,0 +1,70 @@
    +--- a/include/associative_base
    ++++ b/include/associative_base
    +@@ -318,7 +318,7 @@ protected:
    + 	typedef std::list listtype;
    + 
    + 	typename listtype::iterator base_iter;
    +-	typedef _associative_citer _associative_citer;
    ++	typedef _associative_citer __associative_citer;
    + 
    + 	
    + public:
    +@@ -347,13 +347,13 @@ public:
    + 	bool operator==(const _associative_iter & m) const{
    + 		return m.base_iter == base_iter;
    + 	}
    +-	bool operator==(const _associative_citer & m) const{
    ++	bool operator==(const __associative_citer & m) const{
    + 		return m.base_iter == base_iter;
    + 	}
    + 	bool operator!=(const _associative_iter & m) const{
    + 		return m.base_iter != base_iter;
    + 	}
    +-	bool operator!=(const _associative_citer & m) const{
    ++	bool operator!=(const __associative_citer & m) const{
    + 		return m.base_iter != base_iter;
    + 	}
    + 	_associative_iter & operator++(){
    +@@ -378,8 +378,8 @@ public:
    + 		--base_iter;
    + 		return temp;
    + 	}
    +-	operator _associative_citer() const{
    +-		return _associative_citer(base_iter);
    ++	operator __associative_citer() const{
    ++		return __associative_citer(base_iter);
    + 	}
    + 	typename listtype::iterator base_iterator(){
    + 		return base_iter;
    +--- a/include/string
    ++++ b/include/string
    +@@ -1017,11 +1017,11 @@ template _UCXXEXPORT bool operator==(const string & lhs, const string & rhs);
    + template <> _UCXXEXPORT bool operator==(const char * lhs, const string & rhs);
    +-template <> _UCXXEXPORT bool operator==(const string & rhs, const char * rhs);
    ++template <> _UCXXEXPORT bool operator==(const string & lhs, const char * rhs);
    + 
    + template <> _UCXXEXPORT bool operator!=(const string & lhs, const string & rhs);
    + template <> _UCXXEXPORT bool operator!=(const char * lhs, const string & rhs);
    +-template <> _UCXXEXPORT bool operator!=(const string & rhs, const char * rhs);
    ++template <> _UCXXEXPORT bool operator!=(const string & lhs, const char * rhs);
    + 
    + template <> _UCXXEXPORT string operator+(const string & lhs, const char* rhs);
    + template <> _UCXXEXPORT string operator+(const char* lhs, const string & rhs);
    +--- a/src/string.cpp
    ++++ b/src/string.cpp
    +@@ -76,11 +76,11 @@ namespace std{
    + 
    + 	template _UCXXEXPORT bool operator==(const string & lhs, const string & rhs);
    + 	template _UCXXEXPORT bool operator==(const char * lhs, const string & rhs);
    +-	template _UCXXEXPORT bool operator==(const string & rhs, const char * rhs);
    ++	template _UCXXEXPORT bool operator==(const string & lhs, const char * rhs);
    + 
    + 	template _UCXXEXPORT bool operator!=(const string & lhs, const string & rhs);
    + 	template _UCXXEXPORT bool operator!=(const char * lhs, const string & rhs);
    +-	template _UCXXEXPORT bool operator!=(const string & rhs, const char * rhs);
    ++	template _UCXXEXPORT bool operator!=(const string & lhs, const char * rhs);
    + 
    + 	template _UCXXEXPORT string operator+(const string & lhs, const char* rhs);
    + 	template _UCXXEXPORT string operator+(const char* lhs, const string & rhs);
    diff --git a/libs/uclibc++/patches/900-dependent_exception.patch b/libs/uclibc++/patches/900-dependent_exception.patch
    new file mode 100644
    index 0000000..3a5cb7d
    --- /dev/null
    +++ b/libs/uclibc++/patches/900-dependent_exception.patch
    @@ -0,0 +1,68 @@
    +--- a/src/eh_alloc.cpp	2007-06-03 23:51:13.000000000 +0100
    ++++ b/src/eh_alloc.cpp	2009-07-13 09:42:39.000000000 +0100
    +@@ -42,4 +42,21 @@
    + 	free( (char *)(vptr) - sizeof(__cxa_exception) );
    + }
    + 
    ++#if __GNUC__ * 100 + __GNUC_MINOR__ >= 404
    ++extern "C" __cxa_dependent_exception* __cxa_allocate_dependent_exception() throw(){
    ++	__cxa_dependent_exception *retval;
    ++
    ++	retval = static_cast<__cxa_dependent_exception*>(malloc(sizeof(__cxa_dependent_exception)));
    ++	if(0 == retval){
    ++		std::terminate();
    ++	}
    ++	memset (retval, 0, sizeof(__cxa_dependent_exception));
    ++	return retval ;
    ++}
    ++
    ++extern "C" void __cxa_free_dependent_exception(__cxa_dependent_exception *vptr) throw(){
    ++	free( vptr );
    ++}
    ++#endif
    ++
    + }
    +--- a/include/unwind-cxx.h	2009-07-13 10:01:11.000000000 +0100
    ++++ b/include/unwind-cxx.h	2009-07-13 10:14:08.000000000 +0100
    +@@ -79,6 +79,41 @@
    +   _Unwind_Exception unwindHeader;
    + };
    + 
    ++#if __GNUC__ * 100 + __GNUC_MINOR__ >= 404
    ++// A dependent C++ exception object consists of a wrapper around an unwind
    ++// object header with additional C++ specific information, containing a pointer
    ++// to a primary exception object.
    ++
    ++struct __cxa_dependent_exception
    ++{
    ++  // The primary exception this thing depends on.
    ++  void *primaryException;
    ++
    ++  // The C++ standard has entertaining rules wrt calling set_terminate
    ++  // and set_unexpected in the middle of the exception cleanup process.
    ++  std::unexpected_handler unexpectedHandler;
    ++  std::terminate_handler terminateHandler;
    ++
    ++  // The caught exception stack threads through here.
    ++  __cxa_exception *nextException;
    ++
    ++  // How many nested handlers have caught this exception.  A negated
    ++  // value is a signal that this object has been rethrown.
    ++  int handlerCount;
    ++
    ++  // Cache parsed handler data from the personality routine Phase 1
    ++  // for Phase 2 and __cxa_call_unexpected.
    ++  int handlerSwitchValue;
    ++  const unsigned char *actionRecord;
    ++  const unsigned char *languageSpecificData;
    ++  _Unwind_Ptr catchTemp;
    ++  void *adjustedPtr;
    ++
    ++  // The generic exception header.  Must be last.
    ++  _Unwind_Exception unwindHeader;
    ++};
    ++
    ++#endif
    + // Each thread in a C++ program has access to a __cxa_eh_globals object.
    + struct __cxa_eh_globals
    + {
    diff --git a/libs/ustl/Makefile b/libs/ustl/Makefile
    new file mode 100644
    index 0000000..f467e97
    --- /dev/null
    +++ b/libs/ustl/Makefile
    @@ -0,0 +1,63 @@
    +# 
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ustl
    +PKG_VERSION:=0.8
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-0.8-0.tar.bz2
    +PKG_SOURCE_URL:=@SF/ustl
    +PKG_MD5SUM:=dd59483c327f1bd1356273bc5ae4dde0
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/ustl
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=C++ STL for embedded systems
    +  DEPENDS:=@!TARGET_avr32
    +  URL:=http://ustl.sourceforge.net/
    +endef
    +
    +define Package/ustl/description
    +	C++ Standard Template Library (STL) for embedded systems.\\\
    +    uSTL is a partial implementation of the STL (Standard Template \\\
    +    Library) that reduces code size by factoring memory management \\\
    +    code into a non-template base class and deriving containers \\\
    +    from it.
    +endef
    +
    +define Build/Configure
    +	$(CP) ./files/config.h $(PKG_BUILD_DIR)/
    +	$(CP) ./files/Common.mk $(PKG_BUILD_DIR)/
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		CROSS="$(TARGET_CROSS)" \
    +		OPTFLAGS="$(TARGET_CFLAGS)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Package/ustl/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.so.* $(1)/usr/lib/
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/ustl* $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.{a,so*} $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,ustl))
    diff --git a/libs/ustl/files/Common.mk b/libs/ustl/files/Common.mk
    new file mode 100644
    index 0000000..56f049d
    --- /dev/null
    +++ b/libs/ustl/files/Common.mk
    @@ -0,0 +1,74 @@
    +LIBNAME		= ustl
    +MAJOR		= 0
    +MINOR		= 8
    +BUILD		= 0
    +
    +CC		= $(CROSS)gcc 
    +CXX		= $(CROSS)g++ 
    +LD		= $(CROSS)gcc 
    +AR		= $(CROSS)ar
    +RANLIB		= $(CROSS)ranlib
    +DOXYGEN		= echo
    +INSTALL		= install
    +RM		= rm -f
    +LN		= ln -sf
    +
    +prefix		= /usr
    +exec_prefix	= /usr
    +BINDIR		= /usr/bin
    +INCDIR		= /usr/include
    +LIBDIR		= /usr/lib
    +
    +DESTDIR		=
    +
    +INSTALLDIR	= ${INSTALL} -d
    +INSTALLLIB	= ${INSTALL} -p -m 644
    +INSTALLEXE	= ${INSTALL} -p -m 755
    +INSTALLDATA	= ${INSTALL} -p -m 644
    +
    +CWARNOPTS	= -Wall -W -Wpointer-arith -Wno-cast-align \
    +		-Wcast-qual -Wwrite-strings -Wredundant-decls 
    +CXXWARNOPTS	= ${CWARNOPTS} -Wconversion -Wsign-promo -Wsynth -Woverloaded-virtual
    +PROCESSOR_OPTS	=
    +INLINE_OPTS	= -finline-limit=65535
    +CUSTOMINCDIR	=
    +CUSTOMLIBDIR	=
    +
    +BUILD_SHARED	= 1
    +BUILD_STATIC	= 1 
    +#DEBUG		= 1
    +#PROFILE	= 1
    +STANDALONE	= -nodefaultlibs 
    +
    +CFLAGS		=  \
    +		${CUSTOMINCDIR} ${OPTFLAGS} ${CWARNOPTS} ${STANDALONE}
    +CXXFLAGS	=  \
    +		${CUSTOMINCDIR} ${OPTFLAGS} ${INLINE_OPTS} \
    +		${CXXWARNOPTS} ${STANDALONE} -fno-builtin
    +LDFLAGS		= ${CUSTOMLIBDIR} ${STANDALONE}
    +OPTFLAGS	= ${PROCESSOR_OPTS}
    +ifdef DEBUG
    +    OPTFLAGS	+= -O0 -g
    +else
    +    OPTFLAGS	+= -O3 -DNDEBUG=1
    +endif
    +ifdef PROFILE
    +    OPTFLAGS	+= -pg
    +endif
    +ifdef STANDALONE
    +    LIBS	+= -lsupc++ -lgcc_s -lc
    +endif
    +ifdef BUILD_SHARED
    +    CFLAGS	+= -fPIC
    +    CXXFLAGS	+= -fPIC
    +endif
    +SHBLDFL		= -shared
    +
    +LIBA		= lib${LIBNAME}.a
    +LIBSO		= lib${LIBNAME}.so
    +ifdef MAJOR
    +LIBSOLNK	= ${LIBSO}.${MAJOR}.${MINOR}
    +LIBSOBLD	= ${LIBSO}.${MAJOR}.${MINOR}.${BUILD}
    +endif
    +TOCLEAN		+= ${LIBSO} ${LIBA} ${LIBSOBLD}
    +
    diff --git a/libs/ustl/files/config.h b/libs/ustl/files/config.h
    new file mode 100644
    index 0000000..903e225
    --- /dev/null
    +++ b/libs/ustl/files/config.h
    @@ -0,0 +1,286 @@
    +// config.h
    +//
    +// Autogenerated from config.h.in by bsconf.
    +//
    +
    +#ifndef CONFIG_H_01E33670634DAAC779EE5FF41CCBB36F
    +#define CONFIG_H_01E33670634DAAC779EE5FF41CCBB36F
    +
    +// Define to the one symbol short name of this package.
    +#define USTL_NAME	"ustl"
    +// Define to the full name and version of this package.
    +#define USTL_STRING	"ustl 0.8"
    +// Define to the version of this package.
    +#define USTL_VERSION	0x080
    +// Define to the address where bug reports for this package should be sent.
    +#define USTL_BUGREPORT	"Mike Sharov "
    +
    +/// Define to 1 if you want to build without libstdc++
    +#define WITHOUT_LIBSTDCPP 1
    +
    +/// Define to 1 if you want stream operations to throw exceptions on
    +/// insufficient data or insufficient space. All these errors should
    +/// be preventable in output code; the input code should verify the
    +/// data in a separate step. It slows down stream operations a lot,
    +/// but it's your call. By default only debug builds throw.
    +///
    +#undef WANT_STREAM_BOUNDS_CHECKING
    +
    +#if !defined(WANT_STREAM_BOUNDS_CHECKING) && !defined(NDEBUG) && !defined(WITHOUT_LIBSTDCPP)
    +    #define WANT_STREAM_BOUNDS_CHECKING 1
    +#endif
    +
    +/// Define to 1 if you don't want the standard streams.
    +/// You will not be able to run bvt tests if you do this.
    +///
    +#undef WITHOUT_CIN_COUT_CERR
    +
    +/// Define GNU extensions if unavailable.
    +#ifndef __GNUC__
    +    /// GCC (and some other compilers) define '__attribute__'; ustl is using this
    +    /// macro to alert the compiler to flag inconsistencies in printf/scanf-like
    +    /// function calls.  Just in case '__attribute__' isn't defined, make a dummy.
    +    /// 
    +    #ifndef __attribute__
    +	#define __attribute__(p)
    +    #endif
    +#endif
    +#if defined(__GNUC__) && (__GNUC__ >= 4)
    +    #define DLL_EXPORT		__attribute__((visibility("default")))
    +    #define DLL_LOCAL		__attribute__((visibility("hidden")))
    +#else
    +    #define DLL_EXPORT
    +    #define DLL_LOCAL
    +#endif
    +#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(__i386__)
    +    /// GCC 3+ supports the prefetch directive, which some CPUs use to improve caching
    +    #define prefetch(p,rw,loc)	__builtin_prefetch(p,rw,loc)
    +#else
    +    #define prefetch(p,rw,loc)
    +#endif
    +#if !defined(__GNUC__) || (__GNUC__ < 3)
    +    /// __alignof__ returns the recommended alignment for the type
    +    #define __alignof__(v)	min(sizeof(v), sizeof(void*))
    +#endif
    +
    +/// Define to 1 if you have the `atexit' function.
    +#define HAVE_ATEXIT 1
    +
    +/// Define to 1 if you have the  header file.
    +#define HAVE_ASSERT_H 1
    +
    +/// Define to 1 if you have the  header file.
    +#define HAVE_CTYPE_H 1
    +
    +/// Define to 1 if you have the  header file.
    +#define HAVE_ERRNO_H 1
    +
    +/// Define to 1 if you have the  header file.
    +#define HAVE_FCNTL_H 1
    +
    +/// Define to 1 if you have the  header file.
    +#define HAVE_FLOAT_H 1
    +
    +/// Define to 1 if you have the  header file.
    +#define HAVE_INTTYPES_H 1
    +
    +/// Define to 1 if you have the  header file.
    +#define HAVE_LIMITS_H 1
    +
    +/// Define to 1 if you have the  header file.
    +#define HAVE_LOCALE_H 1
    +
    +/// Define to 1 if your system has a working `malloc' function.
    +#define HAVE_MALLOC 1
    +
    +// Define to 1 if you have the  header file.
    +#define HAVE_MALLOC_H 1
    +
    +// Define to 1 if you have the  header file.
    +#define HAVE_ALLOCA_H 1
    +
    +// Define to 1 if you have the `memchr' function.
    +#define HAVE_MEMCHR 1
    +
    +// Define to 1 if you have the `memmove' function.
    +#define HAVE_MEMMOVE 1
    +
    +// Define to 1 if you have the  header file.
    +#define HAVE_MEMORY_H 1
    +
    +// Define to 1 if you have the `memset' function.
    +#define HAVE_MEMSET 1
    +
    +// Define to 1 if the system has the type `ptrdiff_t'.
    +#define HAVE_PTRDIFF_T 1
    +
    +// Define to 1 if you have the  header file.
    +#define HAVE_SIGNAL_H 1
    +
    +// Define to 1 if you have the __va_copy function
    +#define HAVE_VA_COPY 1
    +
    +// Define to 1 if `stat' has the bug that it succeeds when given the
    +// zero-length file name argument.
    +/* #undef HAVE_STAT_EMPTY_STRING_BUG */
    +
    +// Define to 1 if you have the  header file.
    +#define HAVE_STDARG_H 1
    +
    +// Define to 1 if you have the  header file.
    +#define HAVE_STDDEF_H 1
    +
    +// Define to 1 if you have the  header file.
    +#define HAVE_STDINT_H 1
    +
    +// Define to 1 if you have the  header file.
    +#define HAVE_STDIO_H 1
    +
    +// Define to 1 if you have the  header file.
    +#define HAVE_STDLIB_H 1
    +
    +// Define to 1 if you have the `strerror' function.
    +#define HAVE_STRERROR 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 `strrchr' function.
    +#define HAVE_STRRCHR 1
    +
    +// Define to 1 if you have the `strsignal' function.
    +#define HAVE_STRSIGNAL 1
    +
    +// Define to 1 if you have the `strtol' function.
    +#define HAVE_STRTOL 1
    +
    +// Define to 1 if you have the  header file.
    +#define HAVE_SYS_STAT_H 1
    +
    +// Define to 1 if you have the  header file.
    +#define HAVE_SYS_TYPES_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_TIME_H 1
    +
    +// Define to 1 if you have the  header file.
    +#define HAVE_UNISTD_H 1
    +
    +// Define to 1 if you have the  header file.
    +#define HAVE_MATH_H 1
    +
    +// Define to 1 if you have the rintf function. Will use rint otherwise.
    +#undef HAVE_RINTF
    +
    +// STDC_HEADERS is defined to 1 on sane systems.
    +#if defined(HAVE_ASSERT_H) && defined(HAVE_CTYPE_H) &&\
    +    defined(HAVE_ERRNO_H) && defined(HAVE_FLOAT_H) &&\
    +    defined(HAVE_LIMITS_H) && defined(HAVE_LOCALE_H) &&\
    +    defined(HAVE_MATH_H) && defined(HAVE_SIGNAL_H) &&\
    +    defined(HAVE_STDARG_H) && defined(HAVE_STDDEF_H) &&\
    +    defined(HAVE_STDIO_H) && defined(HAVE_STDLIB_H) &&\
    +    defined(HAVE_STRING_H) && defined(HAVE_TIME_H)
    +#define STDC_HEADERS 1
    +#endif
    +
    +// STDC_HEADERS is defined to 1 on unix systems.
    +#if defined(HAVE_FCNTL_H) && defined(HAVE_SYS_STAT_H) && defined(HAVE_UNISTD_H)
    +#define STDUNIX_HEADERS 1
    +#endif
    +
    +// Define to 1 if you have the  header file.
    +#if (__GNUC__ >= 3) // gcc 2.95 somehow doesn't recognize 'asm volatile' in libc byteswap.h
    +#define HAVE_BYTESWAP_H 1
    +#endif
    +
    +// Define to 1 if `lstat' dereferences a symlink specified with a trailing slash.
    +#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
    +
    +// Define to 1 if your compiler treats char as a separate type along with
    +// signed char and unsigned char. This will create overloads for char.
    +#define HAVE_THREE_CHAR_TYPES 1
    +
    +// Define as the return type of signal handlers (`int' or `void').
    +#define RETSIGTYPE void
    +
    +// Define to 1 if you have 64 bit types available
    +#define HAVE_INT64_T 1
    +
    +// Define to 1 if you have the long long type
    +#define HAVE_LONG_LONG 1
    +
    +// Define to 1 if you want unrolled specializations for fill and copy
    +#undef WANT_UNROLLED_COPY
    +
    +// Define to 1 if you want to use MMX/SSE/3dNow! processor instructions
    +#undef WANT_MMX
    +
    +// Define to byte sizes of types
    +#define SIZE_OF_CHAR 1
    +#define SIZE_OF_SHORT 2
    +#define SIZE_OF_INT 4
    +#define SIZE_OF_LONG 4
    +#define SIZE_OF_LONG_LONG 8
    +#define SIZE_OF_POINTER 4
    +#define SIZE_OF_SIZE_T 4
    +#define SIZE_OF_BOOL SIZE_OF_CHAR
    +#undef SIZE_T_IS_LONG
    +
    +// Byte order macros, converted in utypes.h
    +#define USTL_LITTLE_ENDIAN	4321
    +#define USTL_BIG_ENDIAN		1234
    +#define USTL_BYTE_ORDER		USTL_LITTLE_ENDIAN
    +
    +// Extended CPU capabilities
    +#define CPU_HAS_FPU 1
    +#define CPU_HAS_EXT_DEBUG 1
    +#define CPU_HAS_TIMESTAMPC 1
    +#define CPU_HAS_MSR 1
    +#define CPU_HAS_CMPXCHG8 1
    +#define CPU_HAS_APIC 1
    +#define CPU_HAS_SYSCALL 1
    +#define CPU_HAS_MTRR 1
    +#define CPU_HAS_CMOV 1
    +#define CPU_HAS_FCMOV 1
    +#if WANT_MMX
    +#undef CPU_HAS_MMX 1
    +#undef CPU_HAS_FXSAVE
    +#undef CPU_HAS_SSE 1
    +#undef CPU_HAS_SSE2 1
    +#undef CPU_HAS_SSE3
    +#undef CPU_HAS_EXT_3DNOW
    +#undef CPU_HAS_3DNOW
    +#endif
    +
    +// GCC vector extensions
    +#if defined(CPU_HAS_MMX) || defined(CPU_HAS_SSE)
    +    #undef HAVE_VECTOR_EXTENSIONS
    +#endif
    +
    +#if CPU_HAS_SSE && defined(__GNUC__)
    +    #define __sse_align	__attribute__((aligned(16)))
    +#else
    +    #define __sse_align	
    +#endif
    +
    +// Define to empty if `const' does not conform to ANSI C.
    +/* #define const */
    +
    +// Define as `__inline' if that's what the C compiler calls it, or to nothing
    +// if it is not supported.
    +/* #define inline __inline */
    +
    +// Define to `long' if  does not define.
    +/* typedef long off_t; */
    +
    +// Define to `unsigned' if  does not define.
    +/* typedef long size_t; */
    +
    +#endif	// CONFIG_H_01E33670634DAAC779EE5FF41CCBB36F
    +
    diff --git a/libs/ustl/patches/001-install-DESTDIR.patch b/libs/ustl/patches/001-install-DESTDIR.patch
    new file mode 100644
    index 0000000..ec3a959
    --- /dev/null
    +++ b/libs/ustl/patches/001-install-DESTDIR.patch
    @@ -0,0 +1,56 @@
    +diff -ruN ustl-0.8-old/Makefile ustl-0.8-new/Makefile
    +--- ustl-0.8-old/Makefile	2005-11-10 21:06:53.000000000 +0100
    ++++ ustl-0.8-new/Makefile	2005-12-08 13:57:07.000000000 +0100
    +@@ -39,35 +39,35 @@
    + .PHONY: install-static install-shared uninstall-static uninstall-shared
    + 
    + install-shared: ${LIBSOBLD} install-incs
    +-	@echo "Installing ${LIBSOBLD} to ${LIBDIR} ..."
    +-	@${INSTALLDIR} ${LIBDIR}
    +-	@${INSTALLLIB} ${LIBSOBLD} ${LIBDIR}
    +-	@(cd ${LIBDIR}; ${RM} ${LIBSO} ${LIBSOLNK}; ${LN} -sf ${LIBSOBLD} ${LIBSO}; ${LN} -sf ${LIBSOBLD} ${LIBSOLNK})
    ++	@echo "Installing ${LIBSOBLD} to ${DESTDIR}${LIBDIR} ..."
    ++	@${INSTALLDIR} ${DESTDIR}${LIBDIR}
    ++	@${INSTALLLIB} ${LIBSOBLD} ${DESTDIR}${LIBDIR}
    ++	@(cd ${DESTDIR}${LIBDIR}; ${RM} ${LIBSO} ${LIBSOLNK}; ${LN} -sf ${LIBSOBLD} ${LIBSO}; ${LN} -sf ${LIBSOBLD} ${LIBSOLNK})
    + 
    + uninstall-shared: uninstall-incs
    +-	@echo "Removing ${LIBSOBLD} from ${LIBDIR} ..."
    +-	@${RM} -f ${LIBDIR}/${LIBSO} ${LIBDIR}/${LIBSOLNK} ${LIBDIR}/${LIBSOBLD}
    ++	@echo "Removing ${LIBSOBLD} from ${DESTDIR}${LIBDIR} ..."
    ++	@${RM} -f ${DESTDIR}${LIBDIR}/${LIBSO} ${DESTDIR}${LIBDIR}/${LIBSOLNK} ${DESTDIR}${LIBDIR}/${LIBSOBLD}
    + 
    + install-static: ${LIBA} install-incs
    +-	@echo "Installing ${LIBA} to ${LIBDIR} ..."
    +-	@${INSTALLDIR} ${LIBDIR}
    +-	@${INSTALLLIB} ${LIBA} ${LIBDIR}
    ++	@echo "Installing ${LIBA} to ${DESTDIR}${LIBDIR} ..."
    ++	@${INSTALLDIR} ${DESTDIR}${LIBDIR}
    ++	@${INSTALLLIB} ${LIBA} ${DESTDIR}${LIBDIR}
    + 
    + uninstall-static: uninstall-incs
    +-	@echo "Removing ${LIBA} from ${LIBDIR} ..."
    +-	@${RM} -f ${LIBDIR}/${LIBA}
    ++	@echo "Removing ${LIBA} from ${DESTDIR}${LIBDIR} ..."
    ++	@${RM} -f ${DESTDIR}${LIBDIR}/${LIBA}
    + 
    + install-incs: ${INCS}
    +-	@echo "Installing headers to ${INCDIR} ..."
    +-	@${INSTALLDIR} ${INCDIR}/${LIBNAME}
    ++	@echo "Installing headers to ${DESTDIR}${INCDIR} ..."
    ++	@${INSTALLDIR} ${DESTDIR}${INCDIR}/${LIBNAME}
    + 	@for i in $(filter-out ${LIBNAME}.h,${INCS}); do	\
    +-	    ${INSTALLDATA} $$i ${INCDIR}/${LIBNAME}/$$i;	\
    ++	    ${INSTALLDATA} $$i ${DESTDIR}${INCDIR}/${LIBNAME}/$$i;	\
    + 	done;
    +-	@${INSTALLDATA} ${LIBNAME}.h ${INCDIR}
    ++	@${INSTALLDATA} ${LIBNAME}.h ${DESTDIR}${INCDIR}
    + 
    + uninstall-incs:
    +-	@echo "Removing headers from ${INCDIR} ..."
    +-	@${RM} -rf ${INCDIR}/${LIBNAME} ${INCDIR}/${LIBNAME}.h
    ++	@echo "Removing headers from ${DESTDIR}${INCDIR} ..."
    ++	@${RM} -rf ${DESTDIR}${INCDIR}/${LIBNAME} ${DESTDIR}${INCDIR}/${LIBNAME}.h
    + 
    + 
    + %.o:	%.cc
    diff --git a/libs/ustl/patches/002-install_path.patch b/libs/ustl/patches/002-install_path.patch
    new file mode 100644
    index 0000000..3a7cf8a
    --- /dev/null
    +++ b/libs/ustl/patches/002-install_path.patch
    @@ -0,0 +1,12 @@
    +diff -urN ustl.old/Common.mk.in ustl.dev/Common.mk.in
    +--- ustl.old/Common.mk.in	2005-11-10 21:06:53.000000000 +0100
    ++++ ustl.dev/Common.mk.in	2006-03-23 16:12:05.000000000 +0100
    +@@ -9,7 +9,7 @@
    + AR		= @AR@
    + RANLIB		= @RANLIB@
    + DOXYGEN		= @DOXYGEN@
    +-INSTALL		= @INSTALL@
    ++INSTALL		= install
    + RM		= @RM@
    + LN		= @LN@
    + 
    diff --git a/libs/ustl/patches/003-fix_stream_bounds_check_dep.patch b/libs/ustl/patches/003-fix_stream_bounds_check_dep.patch
    new file mode 100644
    index 0000000..6def743
    --- /dev/null
    +++ b/libs/ustl/patches/003-fix_stream_bounds_check_dep.patch
    @@ -0,0 +1,54 @@
    +--- a/config.h.in
    ++++ b/config.h.in
    +@@ -15,6 +15,9 @@
    + // Define to the address where bug reports for this package should be sent.
    + #define USTL_BUGREPORT	"@PACKAGE_BUGREPORT@"
    + 
    ++/// Define to 1 if you want to build without libstdc++
    ++#undef WITHOUT_LIBSTDCPP
    ++
    + /// Define to 1 if you want stream operations to throw exceptions on
    + /// insufficient data or insufficient space. All these errors should
    + /// be preventable in output code; the input code should verify the
    +@@ -23,13 +26,10 @@
    + ///
    + #undef WANT_STREAM_BOUNDS_CHECKING
    + 
    +-#if !defined(WANT_STREAM_BOUNDS_CHECKING) && !defined(NDEBUG)
    ++#if !defined(WANT_STREAM_BOUNDS_CHECKING) && !defined(NDEBUG) && !defined(WITHOUT_LIBSTDCPP)
    +     #define WANT_STREAM_BOUNDS_CHECKING 1
    + #endif
    + 
    +-/// Define to 1 if you want to build without libstdc++
    +-#undef WITHOUT_LIBSTDCPP
    +-
    + /// Define to 1 if you don't want the standard streams.
    + /// You will not be able to run bvt tests if you do this.
    + ///
    +--- a/mostream.h
    ++++ b/mostream.h
    +@@ -11,7 +11,9 @@
    + #include "memlink.h"
    + #include "uexception.h"
    + #include "utf8.h"
    ++#ifdef WANT_STREAM_BOUNDS_CHECKING
    + #include 
    ++#endif
    + 
    + namespace ustl {
    + 
    +--- a/uctrstrm.h
    ++++ b/uctrstrm.h
    +@@ -109,8 +109,12 @@
    +     size_type n;
    +     is >> n;
    +     const size_type expectedSize = n * stream_size_of(value_type());
    ++#ifdef WANT_STREAM_BOUNDS_CHECKING
    +     if (expectedSize > is.remaining())
    + 	throw stream_bounds_exception ("read", typeid(v).name(), is.pos(), expectedSize, is.remaining());
    ++#else
    ++    assert(expectedSize <= is.remaining());
    ++#endif
    +     v.resize (n);
    +     nr_container_read (is, v);
    +     is.align();
    diff --git a/libs/vips/Makefile b/libs/vips/Makefile
    new file mode 100644
    index 0000000..ec30c00
    --- /dev/null
    +++ b/libs/vips/Makefile
    @@ -0,0 +1,72 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=vips
    +PKG_VERSION:=7.24.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.vips.ecs.soton.ac.uk/supported/7.24/
    +PKG_MD5SUM:=7e9d34960c3453f3b8d1d4300fe4b7a0
    +PKG_FIXUP = libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +PKG_INSTALL=1
    +
    +define Package/vips/Default
    +  TITLE:=vips
    +  URL:=http://www.vips.ecs.soton.ac.uk/
    +endef
    +
    +define Package/vips
    +  $(call Package/vips/Default)
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  DEPENDS:=+libjpeg +glib2 +libxml2 +imagemagick +libfreetype $(INTL_DEPENDS)
    +endef
    +
    +define Package/vips/description
    +  An image manipulation library.
    +endef
    +
    +TARGET_LDFLAGS+= \
    +	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
    +
    +CONFIGURE_ARGS += \
    +	--disable-cxx \
    +	--disable-threads \
    +	--without-liboil
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/vips
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/* \
    +		$(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/vips/install
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,vips))
    diff --git a/libs/vips/patches/001-no_cpp.patch b/libs/vips/patches/001-no_cpp.patch
    new file mode 100644
    index 0000000..1511add
    --- /dev/null
    +++ b/libs/vips/patches/001-no_cpp.patch
    @@ -0,0 +1,146 @@
    +diff -u --recursive vips-7.24.1-vanilla/configure.in vips-7.24.1/configure.in
    +--- vips-7.24.1-vanilla/configure.in	2011-03-29 22:09:45.465282663 -0500
    ++++ vips-7.24.1/configure.in	2011-03-29 22:18:40.786482911 -0500
    +@@ -143,7 +143,6 @@
    + AC_PROG_AWK
    + AC_PROG_CC
    + AC_PROG_CC_STDC
    +-AC_PROG_CXX
    + AC_C_CONST
    + AC_C_RESTRICT
    + AC_PROG_RANLIB
    +@@ -615,7 +614,6 @@
    + # in AC_OUTPUT, but that seems to break for some combinations of sh/m4
    + AC_OUTPUT([
    + 	vips-7.24.pc
    +-	vipsCC-7.24.pc
    + 	Makefile 
    + 	libvips/include/vips/version.h 
    + 	libvips/include/Makefile 
    +@@ -624,7 +622,6 @@
    + 	libvips/acquire/Makefile 
    + 	libvips/arithmetic/Makefile 
    + 	libvips/boolean/Makefile 
    +-	libvips/cimg/Makefile 
    + 	libvips/colour/Makefile 
    + 	libvips/conversion/Makefile 
    + 	libvips/convolution/Makefile 
    +@@ -641,9 +638,6 @@
    + 	libvips/relational/Makefile 
    + 	libvips/resample/Makefile 
    + 	libvips/video/Makefile 
    +-	libvipsCC/include/Makefile 
    +-	libvipsCC/include/vips/Makefile 
    +-	libvipsCC/Makefile 
    + 	tools/Makefile 
    + 	tools/iofuncs/Makefile 
    + 	tools/mosaicing/Makefile 
    +@@ -655,7 +649,6 @@
    + 	tools/scripts/light_correct 
    + 	tools/scripts/shrink_width 
    + 	swig/Makefile 
    +-	swig/vipsCC/Makefile 
    + 	swig/python/setup.py 
    + 	man/Makefile
    + 	doc/Makefile
    +diff -u --recursive vips-7.24.1-vanilla/libvips/Makefile.am vips-7.24.1/libvips/Makefile.am
    +--- vips-7.24.1-vanilla/libvips/Makefile.am	2011-03-29 22:09:45.525280200 -0500
    ++++ vips-7.24.1/libvips/Makefile.am	2011-03-29 22:16:08.223081415 -0500
    +@@ -1,14 +1,3 @@
    +-# only build in the cimg dir if C++ is enabled
    +-if ENABLE_CXX
    +-C_COMPILE_DIR = cimg
    +-C_DIST_DIR =
    +-C_LIB = cimg/libcimg.la
    +-else
    +-C_COMPILE_DIR =
    +-C_DIST_DIR = cimg
    +-C_LIB = 
    +-endif
    +-
    + SUBDIRS = \
    + 	include \
    + 	acquire \
    +@@ -19,7 +8,6 @@
    + 	conversion \
    + 	deprecated \
    + 	convolution \
    +-	$(C_COMPILE_DIR) \
    + 	format \
    + 	freq_filt \
    + 	histograms_lut \
    +@@ -36,9 +24,6 @@
    + lib_LTLIBRARIES = libvips.la
    + 
    + libvips_la_SOURCES = dummy.c 
    +-if ENABLE_CXX
    +-libvips_la_SOURCES += dummy2.cc
    +-endif
    + 
    + # DLLs need dependant libs there too ... put @VIPS_LIBS@ at the end
    + libvips_la_LIBADD = \
    +@@ -50,7 +35,6 @@
    + 	conversion/libconversion.la \
    + 	convolution/libconvolution.la \
    + 	deprecated/libdeprecated.la \
    +-	$(C_LIB) \
    + 	format/libformat.la \
    + 	freq_filt/libfreq_filt.la \
    + 	histograms_lut/libhistograms_lut.la \
    +@@ -64,13 +48,6 @@
    + 	video/libvideo.la \
    + 	@VIPS_LIBS@
    + 
    +-if ENABLE_CXX
    +-libvips_la_LIBADD += @VIPS_CXX_LIBS@
    +-endif
    +-
    + libvips_la_LDFLAGS = \
    + 	-no-undefined \
    + 	-version-info @LIBRARY_CURRENT@:@LIBRARY_REVISION@:@LIBRARY_AGE@ 
    +-
    +-EXTRA_DIST = \
    +-	$(C_DIST_DIR)
    +diff -u --recursive vips-7.24.1-vanilla/libvips/resample/Makefile.am vips-7.24.1/libvips/resample/Makefile.am
    +--- vips-7.24.1-vanilla/libvips/resample/Makefile.am	2011-03-29 22:09:45.546279339 -0500
    ++++ vips-7.24.1/libvips/resample/Makefile.am	2011-03-29 22:16:28.918185323 -0500
    +@@ -2,23 +2,6 @@
    + # you'd think we could just define a couple of variables, but that seems to
    + # confuse libtool and make it link the library with g++
    + # instead, have two completely different paths
    +-if ENABLE_CXX
    +-
    +-libresample_la_SOURCES = \
    +-	im_affine.c \
    +-	interpolate.c \
    +-	im_shrink.c \
    +-	im_stretch3.c \
    +-	im_rightshift_size.c \
    +-	transform.c \
    +-	resample_dispatch.c \
    +-	bicubic.cpp \
    +-	lbb.cpp \
    +-	nohalo.cpp \
    +-	vsqbs.cpp \
    +-	templates.h 
    +-
    +-else
    + 
    + libresample_la_SOURCES = \
    + 	im_affine.c \
    +@@ -29,15 +12,6 @@
    + 	transform.c \
    + 	resample_dispatch.c 
    + 
    +-EXTRA_DIST = \
    +-	bicubic.cpp \
    +-	lbb.cpp \
    +-	nohalo.cpp \
    +-	vsqbs.cpp \
    +-	templates.h 
    +-
    +-endif
    +-
    + noinst_LTLIBRARIES = libresample.la
    + 
    + INCLUDES = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ 
    diff --git a/libs/wxbase/Makefile b/libs/wxbase/Makefile
    new file mode 100644
    index 0000000..1136c9f
    --- /dev/null
    +++ b/libs/wxbase/Makefile
    @@ -0,0 +1,133 @@
    +# 
    +# Copyright (C) 2007-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=wxbase
    +PKG_VERSION:=2.8.10
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=wxGTK-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/wxwindows
    +PKG_MD5SUM:=88b867bc118a183af56efc67014bdf27
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/wxGTK-$(PKG_VERSION)
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/libwxbase
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Cross-platform C++ framework
    +  URL:=http://www.wxwidgets.org/
    +  DEPENDS:=+libexpat +libstdcpp +zlib
    +endef
    +
    +define Package/libwxbase/description
    + wxBase contains most of the non-GUI classes from the wxWindows cross-
    + -platform C++ framework. There are 2 categories: generally useful portable 
    + code (date/time handling, command line parsing, regular expression support) 
    + and wrappers for the OS objects (files, directories, sockets, threads, 
    + etc.) allowing you to write portable programs easily.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +# XXX: aMule *needs* the following configure options to be enabled:
    +#	--enable-intl
    +#	--enable-largefile
    +#	--disable-no_rtti
    +#	--with-regex
    +#	--enable-unicode
    +CONFIGURE_ARGS+= \
    +	--enable-shared \
    +	--disable-rpath \
    +	--with-gnu-ld \
    +	--disable-gui \
    +	--disable-monolithic \
    +	--enable-plugins \
    +	--disable-universal \
    +	--disable-nanox \
    +	--disable-gtk2 \
    +	--disable-gpe \
    +	--disable-optimise \
    +	--disable-debug \
    +	--disable-stl \
    +	--disable-omf \
    +	--disable-debug_flag \
    +	--disable-debug_info \
    +	--disable-debug_gdb \
    +	--disable-debug_cntxt \
    +	--disable-mem_tracing \
    +	--disable-profile \
    +	--disable-no_rtti \
    +	--disable-no_exceptions \
    +	--disable-compat22 \
    +	--disable-compat24 \
    +	--enable-intl \
    +	--disable-backtrace \
    +	--enable-exceptions \
    +	--disable-sound \
    +	--enable-largefile \
    +	\
    +	--without-gtk \
    +	--without-motif \
    +	--without-mac \
    +	--without-cocoa \
    +	--without-wine \
    +	--without-msw \
    +	--without-pm \
    +	--without-mgl \
    +	--without-microwin \
    +	--without-x11 \
    +	--without-libpng \
    +	--without-libjpeg \
    +	--without-libtiff \
    +	--without-libxpm \
    +	--without-libmspack \
    +	--without-sdl \
    +	--without-gnomeprint \
    +	--without-opengl \
    +	--without-dmalloc \
    +	--with-regex="sys" \
    +	--with-zlib="sys" \
    +	--without-odbc \
    +	--with-expat="sys" \
    +	--without-gtk-prefix \
    +	--without-x \
    +	--without-libiconv-prefix \
    +	--without-sdl-prefix \
    +	--without-cppunit-prefix \
    +
    +UNICODE=yes
    +
    +ifeq ($(UNICODE),yes)
    +  CONFIGURE_ARGS+= --enable-unicode
    +  LIB_PFX:=u
    +else
    +  CONFIGURE_ARGS+= --disable-unicode
    +  LIB_PFX:=
    +endif
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include $(1)/usr/lib
    +	$(CP) -L $(PKG_BUILD_DIR)/wx-config $(1)/usr/bin/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/wx-2.8 $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwx_base$(LIB_PFX){,_net,_xml}-*.so* $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/wx $(1)/usr/lib/
    +	$(SED) 's,-I$$$${includedir}/wx-2.8,-I$(STAGING_DIR)/usr/include/wx-2.8,g' $(1)/usr/bin/wx-config
    +	$(SED) 's,-I$$$${libdir}/wx/include,-I$(STAGING_DIR)/usr/lib/wx/include,g' $(1)/usr/bin/wx-config
    +endef
    +
    +define Package/libwxbase/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwx_base$(LIB_PFX){,_net,_xml}-*.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,libwxbase))
    diff --git a/libs/xmlrpc-c/Makefile b/libs/xmlrpc-c/Makefile
    new file mode 100644
    index 0000000..fbff4a8
    --- /dev/null
    +++ b/libs/xmlrpc-c/Makefile
    @@ -0,0 +1,244 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=xmlrpc-c
    +PKG_REV:=2080
    +PKG_VERSION:=advanced_r$(PKG_REV)
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/advanced
    +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
    +PKG_SOURCE_VERSION:=$(PKG_REV)
    +PKG_SOURCE_PROTO:=svn
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=0
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/xmlrpc-c-common
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=XML-RPC library - common
    +  URL:=http://xmlrpc-c.sourceforge.net/
    +endef
    +
    +define Package/xmlrpc-c-internal
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=XML-RPC library - (ueses internal expat variant)
    +  URL:=http://xmlrpc-c.sourceforge.net/
    +  DEPENDS:=+xmlrpc-c-common
    +#  PROVIDES:=xmlrpc-c
    +  VARIANT:=internal
    +endef
    +
    +define Package/xmlrpc-c
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=XML-RPC library
    +  URL:=http://xmlrpc-c.sourceforge.net/
    +  DEPENDS:=+xmlrpc-c-internal
    +endef
    +
    +define Package/xmlrpc-c-libxml2
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=XML-RPC library - (uses libxml2)
    +  URL:=http://xmlrpc-c.sourceforge.net/
    +  DEPENDS:=+xmlrpc-c-common +libxml2 @BROKEN
    +#  PROVIDES:=xmlrpc-c
    +  VARIANT:=libxml2
    +endef
    +
    +define Package/xmlrpc-c-client
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=XML-RPC library - client
    +  URL:=http://xmlrpc-c.sourceforge.net/
    +  DEPENDS:=+xmlrpc-c +libcurl
    +endef
    +
    +define Package/xmlrpc-c-server
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=XML-RPC library - server
    +  URL:=http://xmlrpc-c.sourceforge.net/
    +  DEPENDS:=+xmlrpc-c
    +endef
    +
    +define Package/xmlrpc-c-abyss
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=XML-RPC library - abyss
    +  URL:=http://xmlrpc-c.sourceforge.net/
    +  DEPENDS:=+xmlrpc-c-common
    +endef
    +
    +define Package/xmlrpc-c-server-abyss
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=XML-RPC library - abyss server
    +  URL:=http://xmlrpc-c.sourceforge.net/
    +  DEPENDS:=+xmlrpc-c-server +xmlrpc-c-abyss
    +endef
    +
    +define Package/xmlrpc-c/description/Default
    +    Programming library for writing an XML-RPC server or client in C or C++.
    +    XML-RPC is a standard network protocol to allow a client program to make
    +    a simple remote procedure call (RPC) type request of a server.
    +endef
    +
    +Package/xmlrpc-c-common/description = $(Package/xmlrpc-c/description/Default)
    +Package/xmlrpc-c-libxml2/description = $(Package/xmlrpc-c/description/Default)
    +Package/xmlrpc-c-internal/description = $(Package/xmlrpc-c/description/Default)
    +
    +Package/xmlrpc-c-libxml2/description += Uses external libxml2 library (quite big)
    +Package/xmlrpc-c-internal/description += Uses internal expat variant (stripped down)
    +
    +CONFIGURE_ARGS+= \
    +	--disable-wininet-client \
    +	--disable-libwww-client \
    +	--enable-abyss-server \
    +	--disable-cplusplus \
    +	--disable-static \
    +	--disable-abyss-threads \
    +	--disable-cgi-server
    +
    +ifeq ($(BUILD_VARIANT),libxml2)
    +	CONFIGURE_ARGS += \
    +		--enable-libxml2-backend
    +endif
    +
    +ifeq ($(BUILD_VARIANT),internal)
    +	CONFIGURE_ARGS += \
    +		--disable-libxml2-backend
    +endif
    +
    +define Build/Compile
    +	( cd $(PKG_BUILD_DIR)/lib/expat/gennmtab && cc -I$(PKG_BUILD_DIR) -c gennmtab.c -o gennmtab.o && cc -o gennmtab  gennmtab.o )
    +	$(call Build/Compile/Default)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) \
    +		$(1)/usr/include \
    +		$(1)/usr/lib \
    +		$(1)/usr/bin \
    +		$(2)/bin
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/* \
    +		$(1)/usr/include/
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxmlrpc*.{a,so*} \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/bin/xmlrpc-c-config \
    +		$(2)/bin/
    +
    +	$(SED) \
    +		's,HEADERINST_DIR="/usr/include",HEADERINST_DIR="$(STAGING_DIR)/usr/include",g' \
    +		$(2)/bin/xmlrpc-c-config
    +
    +	$(SED) \
    +		's,LIBINST_DIR="/usr/lib",LIBINST_DIR="$(STAGING_DIR)/usr/lib",g' \
    +		$(2)/bin/xmlrpc-c-config
    +endef
    +
    +define Package/xmlrpc-c-libxml2/install
    +	$(INSTALL_DIR) \
    +		$(1)/usr/lib
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxmlrpc.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/xmlrpc-c-internal/install
    +	$(INSTALL_DIR) \
    +		$(1)/usr/lib
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxmlrpc.so* \
    +		$(1)/usr/lib/
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_xmltok.so* \
    +		$(1)/usr/lib/
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_xmlparse.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/xmlrpc-c-server/install
    +	$(INSTALL_DIR) \
    +		$(1)/usr/lib
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_server.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/xmlrpc-c-abyss/install
    +	$(INSTALL_DIR) \
    +		$(1)/usr/lib
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_abyss.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/xmlrpc-c-server-abyss/install
    +	$(INSTALL_DIR) \
    +		$(1)/usr/lib
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_server_abyss.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/xmlrpc-c-client/install
    +	$(INSTALL_DIR) \
    +		$(1)/usr/lib
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_client* \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/xmlrpc-c-common/install
    +	$(INSTALL_DIR) \
    +		$(1)/usr/lib
    +
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_util.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/xmlrpc-c/install
    +	true
    +endef
    +
    +
    +$(eval $(call BuildPackage,xmlrpc-c))
    +$(eval $(call BuildPackage,xmlrpc-c-common))
    +$(eval $(call BuildPackage,xmlrpc-c-libxml2))
    +$(eval $(call BuildPackage,xmlrpc-c-internal))
    +$(eval $(call BuildPackage,xmlrpc-c-server))
    +$(eval $(call BuildPackage,xmlrpc-c-abyss))
    +$(eval $(call BuildPackage,xmlrpc-c-server-abyss))
    +$(eval $(call BuildPackage,xmlrpc-c-client))
    diff --git a/libs/xmlrpc-c/patches/001-config.mk.in.patch b/libs/xmlrpc-c/patches/001-config.mk.in.patch
    new file mode 100644
    index 0000000..e190ebb
    --- /dev/null
    +++ b/libs/xmlrpc-c/patches/001-config.mk.in.patch
    @@ -0,0 +1,11 @@
    +--- a/config.mk.in
    ++++ b/config.mk.in
    +@@ -175,7 +175,7 @@ ifeq ($(patsubst linux-gnu%,linux-gnu,$(
    +   shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
    +   shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
    + #  SHLIB_CLIB = -lc
    +-  LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
    ++  LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB) $(LDFLAGS)
    +   CFLAGS_SHLIB=-fPIC
    + endif
    + 
    diff --git a/libs/xmlrpc-c/patches/002-automake-compat.patch b/libs/xmlrpc-c/patches/002-automake-compat.patch
    new file mode 100644
    index 0000000..7503b7c
    --- /dev/null
    +++ b/libs/xmlrpc-c/patches/002-automake-compat.patch
    @@ -0,0 +1,13 @@
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -230,9 +230,7 @@ dnl Checks for programs.
    + dnl =======================================================================
    + 
    + AC_PROG_CC
    +-if test x"$enable_cplusplus" != xno; then
    +-    AC_PROG_CXX
    +-fi
    ++AC_PROG_CXX
    + 
    + 
    + dnl =======================================================================
    diff --git a/libs/xmpp4r/Makefile b/libs/xmpp4r/Makefile
    new file mode 100644
    index 0000000..9e2ef4c
    --- /dev/null
    +++ b/libs/xmpp4r/Makefile
    @@ -0,0 +1,46 @@
    +# 
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v3.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=xmpp4r
    +PKG_VERSION:=0.5
    +PKG_RELEASE:=0
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
    +PKG_SOURCE_URL:=http://download.gna.org/xmpp4r
    +PKG_MD5SUM:=70eafe960727d750a43ec77ffc1856e9
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/xmpp4r
    +	TITLE:=XMPP/Jabber library for Ruby
    +	SECTION:=libs
    +	CATEGORY:=Libraries
    +	DEPENDS:=+ruby
    +  	MAINTAINER:=Giovanni Di Stasi 
    +  	URL:=http://home.gna.org/xmpp4r/
    +endef
    +
    +define Package/xmpp4r/description
    +	This package contains xmpp4r, an XMPP/Jabber library for Ruby.
    +endef
    +
    +define Build/Compile
    +	(cd $(PKG_BUILD_DIR); \
    +		ruby $(PKG_BUILD_DIR)/setup.rb config \
    +			--rbconfig=$(wildcard $(STAGING_DIR)/usr/lib/ruby/*.*/*-linux/rbconfig.rb); \
    +		ruby $(PKG_BUILD_DIR)/setup.rb install --prefix="$(PKG_INSTALL_DIR)"; \
    +	)
    +endef
    +
    +define Package/xmpp4r/install
    +	$(INSTALL_DIR) $(1)/usr/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib $(1)/usr
    +endef
    +
    +$(eval $(call BuildPackage,xmpp4r))
    diff --git a/libs/zaptel-1.4.x/Makefile b/libs/zaptel-1.4.x/Makefile
    new file mode 100644
    index 0000000..91f1958
    --- /dev/null
    +++ b/libs/zaptel-1.4.x/Makefile
    @@ -0,0 +1,172 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +include $(INCLUDE_DIR)/kernel.mk
    +
    +PKG_NAME:=zaptel
    +PKG_VERSION:=1.4.12.1
    +PKG_RELEASE:=4
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/zaptel/releases/ \
    +        http://ftp.digium.com/pub/zaptel/releases/
    +PKG_MD5SUM:=71e83a020b020fa60905edecf70e95a3
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/zaptel14/Default
    +  TITLE:=Zaptel
    +  URL:=http://ftp.digium.com/pub/zaptel/releases
    +endef
    +
    +define KernelPackage/zaptel14/Default
    +  TITLE:=Zaptel (kernel module)
    +  SUBMENU:=Other modules
    +endef
    +
    +define KernelPackage/zaptel14
    +  $(call KernelPackage/zaptel14/Default)
    +  TITLE:=Zaptel (kernel module)
    +  FILES:=$(PKG_BUILD_DIR)/kernel/zaptel.$(LINUX_KMOD_SUFFIX)
    +  AUTOLOAD:=$(call AutoLoad,70,zaptel)
    +endef
    +
    +define KernelPackage/zaptel14/description
    + This package contains the Zaptel core module.  No longer includes ztdummy
    + because it is not needed in all cases (and is in fact broken on x86).
    +endef
    +
    +
    +define KernelPackage/zaptel14-dummy
    +  $(call KernelPackage/zaptel14/Default)
    +  TITLE:=Zaptel Dummy (timer; kernel module)
    +  DEPENDS += +kmod-zaptel14 @TARGET_x86:@BROKEN
    +  FILES:=$(PKG_BUILD_DIR)/kernel/ztdummy.$(LINUX_KMOD_SUFFIX)
    +  AUTOLOAD:=$(call AutoLoad,71,ztdummy)
    +endef
    +
    +define KernelPackage/zaptel14/description
    + This package contains the Zaptel ztdummy driver.  Broken on x86 due to lack
    + of RTC on some hardware.
    +endef
    +
    +define KernelPackage/zaptel14-wcusb
    +  $(call KernelPackage/zaptel14/Default)
    +  DEPENDS += +kmod-zaptel14
    +  FILES:=$(PKG_BUILD_DIR)/kernel/wcusb.$(LINUX_KMOD_SUFFIX)
    +  AUTOLOAD:=$(call AutoLoad,72,wcusb)
    +endef
    +
    +define KernelPackage/zaptel14-wcusb/description
    + This package contains the Zaptel S100U usb driver.
    +endef
    +
    +define KernelPackage/zaptel14-wctdm
    +  $(call KernelPackage/zaptel14/Default)
    +  DEPENDS += +kmod-zaptel14
    +  FILES:=$(PKG_BUILD_DIR)/kernel/wctdm.$(LINUX_KMOD_SUFFIX)
    +  AUTOLOAD:=$(call AutoLoad,72,wctdm)
    +endef
    +
    +define KernelPackage/zaptel14-wctdm/description
    + This package contains the Zaptel wctdm driver.
    +endef
    +
    +define Package/zaptel14-util
    +  $(call Package/zaptel14/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  TITLE+= utils
    +  DEPENDS += +kmod-zaptel14 +zaptel14-libtonezone +libnewt
    +endef
    +
    +define Package/zaptel14-util/description
    + This package contains the zaptel utils.
    +endef
    +
    +define Package/zaptel14-libtonezone
    +  $(call Package/zaptel14/Default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= libtonezone (library)
    +  DEPENDS += +kmod-zaptel14
    +endef
    +
    +define Package/zaptel14-libtonezone/description
    + This package contains the libraries for accessing zaptel/dummy drivers.
    +endef
    +
    +CONFIGURE_VARS += \
    +	LDFLAGS="$$$$LDFLAGS -Wl,-rpath-link $(STAGING_DIR)/usr/lib"
    +
    +CONFIGURE_ARGS += \
    +	--with-newt="$(STAGING_DIR)/usr" \
    +	--without-curses \
    +	--without-ncurses 
    +
    +MAKE_FLAGS:= \
    +	ARCH="$(LINUX_KARCH)" \
    +	CC="$(TARGET_CC) $(TARGET_CFLAGS)" \
    +	LD="$(TARGET_CROSS)ld" \
    +	CROSS_COMPILE="$(TARGET_CROSS)" \
    +	KVERS="$(LINUX_VERSION)" \
    +	KSRC="$(LINUX_DIR)" \
    +	TOPDIR_MODULES="zaptel ztdummy wcusb wctdm" \
    +	SUBDIR_MODULES=""
    +
    +define Build/Compile/kmod
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		$(MAKE_FLAGS) \
    +		modules
    +endef
    +
    +define Build/Compile/user
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +	        ARCH="$(LINUX_KARCH)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		install-libs install-include zttest ztcfg zttool ztdiag fxotune ztmonitor ztscan ztspeed fxstest
    +endef
    +
    +define Build/Compile
    +	$(call Build/Compile/kmod)
    +	$(call Build/Compile/user)
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR)  $(STAGING_DIR)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/zaptel $(STAGING_DIR)/usr/include/
    +	$(INSTALL_DIR)  $(STAGING_DIR)/usr/lib
    +	$(CP)  $(PKG_INSTALL_DIR)/usr/lib/libtonezone.* $(STAGING_DIR)/usr/lib/
    +endef
    +
    +define Package/zaptel14-util/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/zttest $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ztcfg $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/zttool $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ztdiag $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/fxotune $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/fxstest $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ztmonitor $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ztscan $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ztspeed $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/etc/hotplug.d/zaptel
    +	$(INSTALL_DATA) ./files/10-create-device-node $(1)/etc/hotplug.d/zaptel/
    +endef
    +
    +define Package/zaptel14-libtonezone/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call KernelPackage,zaptel14))
    +$(eval $(call KernelPackage,zaptel14-dummy))
    +$(eval $(call KernelPackage,zaptel14-wcusb))
    +$(eval $(call KernelPackage,zaptel14-wctdm))
    +$(eval $(call BuildPackage,zaptel14-util))
    +$(eval $(call BuildPackage,zaptel14-libtonezone))
    diff --git a/libs/zaptel-1.4.x/files/10-create-device-node b/libs/zaptel-1.4.x/files/10-create-device-node
    new file mode 100644
    index 0000000..f49c6c1
    --- /dev/null
    +++ b/libs/zaptel-1.4.x/files/10-create-device-node
    @@ -0,0 +1,9 @@
    +#!/bin/sh
    + 
    +case "$ACTION" in
    +        add)
    +                /bin/mkdir -p /dev/zap
    +                /bin/mknod -m 0644 /dev/zap/${DEVICENAME#zap} c $MAJOR $MINOR
    +                ;;
    +esac
    +
    diff --git a/libs/zaptel-1.4.x/patches/002-upstream_hrtimer.patch b/libs/zaptel-1.4.x/patches/002-upstream_hrtimer.patch
    new file mode 100644
    index 0000000..5cc0a6e
    --- /dev/null
    +++ b/libs/zaptel-1.4.x/patches/002-upstream_hrtimer.patch
    @@ -0,0 +1,52 @@
    +---
    + kernel/ztdummy.c |   18 +++++++++++++++---
    + 1 file changed, 15 insertions(+), 3 deletions(-)
    +
    +--- zaptel-1.4.12.1.orig/kernel/ztdummy.c
    ++++ zaptel-1.4.12.1/kernel/ztdummy.c
    +@@ -54,7 +54,7 @@
    +  * the #define USE_RTC should be commented out.
    +  */
    + #if defined(__i386__) || defined(__x86_64__)
    +-#if LINUX_VERSION_CODE >= VERSION_CODE(2,6,13)
    ++#if LINUX_VERSION_CODE >= VERSION_CODE(2,6,15)
    + /* The symbol hrtimer_forward is only exported as of 2.6.22: */
    + #if defined(CONFIG_HIGH_RES_TIMERS) && LINUX_VERSION_CODE >= VERSION_CODE(2,6,22)
    + #define USE_HIGHRESTIMER
    +@@ -90,6 +90,18 @@
    + #endif
    + #include "ztdummy.h"
    + 
    ++#if defined(USE_HIGHRESTIMER) && ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) )
    ++/* compatibility with new hrtimer interface */
    ++static inline ktime_t hrtimer_get_expires(const struct hrtimer *timer)
    ++{
    ++       return timer->expires;
    ++}
    ++
    ++static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
    ++{
    ++       timer->expires = time;
    ++}
    ++#endif
    + 
    + static struct ztdummy *ztd;
    + 
    +@@ -199,7 +211,7 @@ static enum hrtimer_restart ztdummy_hr_i
    + 	 * expired.
    + 	 * We should worry if overrun is 2 or more; then we really missed 
    + 	 * a tick */
    +-	overrun = hrtimer_forward(&zaptimer, htmr->expires, 
    ++	overrun = hrtimer_forward(&zaptimer, hrtimer_get_expires(htmr),
    + 			ktime_set(0, ZAPTEL_TIME_NS));
    + 	if(overrun > 1) {
    + 		if(printk_ratelimit())
    +@@ -222,7 +234,7 @@ static enum hrtimer_restart ztdummy_hr_i
    + /* use kernel system tick timer if PC architecture RTC is not available */
    + static void ztdummy_timer(unsigned long param)
    + {
    +-	timer.expires = jiffies + 1;
    ++	hrtimer_set_expires(timer, jiffies + 1);
    + 	add_timer(&timer);
    + 
    + 	ztd->counter += ZAPTEL_TIME;
    diff --git a/libs/zaptel-1.4.x/patches/100-no_hrtimer_on_x86_only.patch b/libs/zaptel-1.4.x/patches/100-no_hrtimer_on_x86_only.patch
    new file mode 100644
    index 0000000..ba4dd76
    --- /dev/null
    +++ b/libs/zaptel-1.4.x/patches/100-no_hrtimer_on_x86_only.patch
    @@ -0,0 +1,22 @@
    +---
    + kernel/ztdummy.c |    2 --
    + 1 file changed, 2 deletions(-)
    +
    +--- zaptel-1.4.12.1.orig/kernel/ztdummy.c
    ++++ zaptel-1.4.12.1/kernel/ztdummy.c
    +@@ -53,7 +53,6 @@
    +  * If using an i386 architecture without a PC real-time clock,
    +  * the #define USE_RTC should be commented out.
    +  */
    +-#if defined(__i386__) || defined(__x86_64__)
    + #if LINUX_VERSION_CODE >= VERSION_CODE(2,6,15)
    + /* The symbol hrtimer_forward is only exported as of 2.6.22: */
    + #if defined(CONFIG_HIGH_RES_TIMERS) && LINUX_VERSION_CODE >= VERSION_CODE(2,6,22)
    +@@ -66,7 +65,6 @@
    + #define USE_RTC
    + #endif
    + #endif
    +-#endif
    + 
    + #include 
    + #include 
    diff --git a/libs/zaptel-1.4.x/patches/200-Makefile-pwd.patch b/libs/zaptel-1.4.x/patches/200-Makefile-pwd.patch
    new file mode 100644
    index 0000000..03c3c8a
    --- /dev/null
    +++ b/libs/zaptel-1.4.x/patches/200-Makefile-pwd.patch
    @@ -0,0 +1,14 @@
    +---
    + Makefile |    1 +
    + 1 file changed, 1 insertion(+)
    +
    +--- zaptel-1.4.12.1.orig/Makefile
    ++++ zaptel-1.4.12.1/Makefile
    +@@ -18,6 +18,7 @@ ifeq ($(MAKELEVEL),0)
    + PWD:=$(shell pwd)
    + export PWD
    + endif
    ++PWD:=`pwd`
    + 
    + ifeq ($(ARCH),)
    + ARCH:=$(shell uname -m | sed -e s/i.86/i386/)
    diff --git a/libs/zaptel-1.4.x/patches/330-uname_m.patch b/libs/zaptel-1.4.x/patches/330-uname_m.patch
    new file mode 100644
    index 0000000..8414deb
    --- /dev/null
    +++ b/libs/zaptel-1.4.x/patches/330-uname_m.patch
    @@ -0,0 +1,15 @@
    +---
    + Makefile |    2 +-
    + 1 file changed, 1 insertion(+), 1 deletion(-)
    +
    +--- zaptel-1.4.12.1.orig/Makefile
    ++++ zaptel-1.4.12.1/Makefile
    +@@ -25,7 +25,7 @@ ARCH:=$(shell uname -m | sed -e s/i.86/i
    + endif
    + 
    + ifeq ($(DEB_HOST_GNU_TYPE),)
    +-UNAME_M:=$(shell uname -m)
    ++UNAME_M:=$(ARCH)
    + else
    + UNAME_M:=$(DEB_HOST_GNU_TYPE)
    + endif
    diff --git a/libs/zaptel-1.4.x/patches/340-2.6.32.patch b/libs/zaptel-1.4.x/patches/340-2.6.32.patch
    new file mode 100644
    index 0000000..ea9e613
    --- /dev/null
    +++ b/libs/zaptel-1.4.x/patches/340-2.6.32.patch
    @@ -0,0 +1,16 @@
    +---
    + kernel/zaptel-base.c |    3 +++
    + 1 file changed, 3 insertions(+)
    +
    +--- zaptel-1.4.12.1.orig/kernel/zaptel-base.c
    ++++ zaptel-1.4.12.1/kernel/zaptel-base.c
    +@@ -59,6 +59,9 @@
    + #include 
    + #endif
    + #include 
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
    ++#include 
    ++#endif
    + 
    + #ifndef CONFIG_OLD_HDLC_API
    + #define NEW_HDLC_INTERFACE
    diff --git a/libs/zaptel-1.4.x/patches/350-2.6.34.patch b/libs/zaptel-1.4.x/patches/350-2.6.34.patch
    new file mode 100644
    index 0000000..a60589f
    --- /dev/null
    +++ b/libs/zaptel-1.4.x/patches/350-2.6.34.patch
    @@ -0,0 +1,14 @@
    +Index: zaptel-1.4.12.1/kernel/zconfig.h
    +===================================================================
    +--- zaptel-1.4.12.1.orig/kernel/zconfig.h	2010-06-13 08:51:02.000000000 +0200
    ++++ zaptel-1.4.12.1/kernel/zconfig.h	2010-06-13 08:53:22.000000000 +0200
    +@@ -22,6 +22,8 @@
    + #include 
    + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
    + #include 
    ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33))
    ++#include 
    + #else
    + #include 
    + #endif
    +
    diff --git a/libs/zaptel-1.4.x/patches/360-slab.patch b/libs/zaptel-1.4.x/patches/360-slab.patch
    new file mode 100644
    index 0000000..f7cd298
    --- /dev/null
    +++ b/libs/zaptel-1.4.x/patches/360-slab.patch
    @@ -0,0 +1,38 @@
    +Index: zaptel-1.4.12.1/kernel/wctdm.c
    +===================================================================
    +--- zaptel-1.4.12.1.orig/kernel/wctdm.c	2010-06-13 12:11:26.000000000 +0200
    ++++ zaptel-1.4.12.1/kernel/wctdm.c	2010-06-13 12:17:47.000000000 +0200
    +@@ -30,6 +30,8 @@
    + #include 
    + #include 
    + #include 
    ++#include 
    ++#include 
    + #include 
    + #include "proslic.h"
    + #include "wctdm.h"
    +Index: zaptel-1.4.12.1/kernel/wcusb.c
    +===================================================================
    +--- zaptel-1.4.12.1.orig/kernel/wcusb.c	2010-06-13 12:10:07.000000000 +0200
    ++++ zaptel-1.4.12.1/kernel/wcusb.c	2010-06-13 12:10:13.000000000 +0200
    +@@ -37,6 +37,7 @@
    + #include 
    + #include 
    + #include 
    ++#include 
    + 
    + #include 
    + #if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,19)
    +Index: zaptel-1.4.12.1/kernel/ztdummy.c
    +===================================================================
    +--- zaptel-1.4.12.1.orig/kernel/ztdummy.c	2010-06-13 08:58:02.000000000 +0200
    ++++ zaptel-1.4.12.1/kernel/ztdummy.c	2010-06-13 08:58:23.000000000 +0200
    +@@ -38,6 +38,7 @@
    +  */
    + 
    + #include 
    ++#include 
    + 
    + #ifndef VERSION_CODE
    + #  define VERSION_CODE(vers,rel,seq) ( ((vers)<<16) | ((rel)<<8) | (seq) )
    +
    diff --git a/libs/zaptel-1.4.x/patches/370-2.6.36.patch b/libs/zaptel-1.4.x/patches/370-2.6.36.patch
    new file mode 100644
    index 0000000..bff07ca
    --- /dev/null
    +++ b/libs/zaptel-1.4.x/patches/370-2.6.36.patch
    @@ -0,0 +1,39 @@
    +---
    + kernel/zaptel-base.c |   18 ++++++++++++++++++
    + 1 file changed, 18 insertions(+)
    +
    +--- zaptel-1.4.12.1.orig/kernel/zaptel-base.c
    ++++ zaptel-1.4.12.1/kernel/zaptel-base.c
    +@@ -5181,6 +5181,20 @@ static int zt_ioctl(struct inode *inode,
    + 	return zt_chan_ioctl(inode, file, cmd, data, unit);
    + }
    + 
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
    ++#include 
    ++static long zt_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long data)
    ++{
    ++	int ret;
    ++
    ++	lock_kernel();
    ++	ret = zt_ioctl(file->f_path.dentry->d_inode, file, cmd, data);
    ++	unlock_kernel();
    ++
    ++	return ret;
    ++}
    ++#endif
    ++
    + int zt_register(struct zt_span *span, int prefmaster)
    + {
    + 	int x;
    +@@ -7632,7 +7646,11 @@ static struct file_operations zt_fops =
    + 	llseek: NULL,
    + 	open: zt_open,
    + 	release: zt_release,
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
    ++	unlocked_ioctl: zt_ioctl_unlocked,
    ++#else
    + 	ioctl: zt_ioctl,
    ++#endif
    + 	read: zt_read,
    + 	write: zt_write,
    + 	poll: zt_poll,
    diff --git a/libs/zaptel/Makefile b/libs/zaptel/Makefile
    new file mode 100644
    index 0000000..cccc705
    --- /dev/null
    +++ b/libs/zaptel/Makefile
    @@ -0,0 +1,59 @@
    +# 
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=zaptel
    +PKG_VERSION:=1.2.27
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/zaptel/releases/
    +PKG_MD5SUM:=6e0ccf2a2a805054123b35bf8eb10ae9
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/kernel.mk
    +
    +define Package/zaptel-libtonezone
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=Zaptel tonezone library.
    +  URL:=http://downloads.asterisk.org/pub/telephony/zaptel/
    +endef
    +
    +define Build/Configure
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		HOSTCC="$(HOSTCC)" \
    +		CFLAGS="$(TARGET_CFLAGS) -I. -DBUILDING_TONEZONE" \
    +		KSRC="$(LINUX_DIR)" \
    +		KVERS="$(LINUX_VERSION)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		install-tonezone
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/linux
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/linux/zaptel.h $(1)/usr/include/linux/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/tonezone.h $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so* $(1)/usr/lib/
    +endef
    +
    +define Package/zaptel-libtonezone/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,zaptel-libtonezone))
    diff --git a/libs/zaptel/patches/110-Makefile-tonezone_install.patch b/libs/zaptel/patches/110-Makefile-tonezone_install.patch
    new file mode 100644
    index 0000000..2825bb2
    --- /dev/null
    +++ b/libs/zaptel/patches/110-Makefile-tonezone_install.patch
    @@ -0,0 +1,19 @@
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -501,6 +501,16 @@ install-include: zaptel.h torisa.h
    + 	install -d $(DESTDIR)$(INCLUDE_DIR)/linux
    + 	install -m 644 zaptel.h torisa.h $(DESTDIR)$(INCLUDE_DIR)/linux/
    + 
    ++install-tonezone: $(LIBTONEZONE_SO)
    ++	install -D -m 755 $(LIBTONEZONE_SO) $(DESTDIR)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER)
    ++	rm -f $(DESTDIR)/usr/lib/$(LIBTONEZONE_SO)
    ++	ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
    ++		$(DESTDIR)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER)
    ++	ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
    ++		$(DESTDIR)/usr/lib/$(LIBTONEZONE_SO)
    ++	install -D -m 644 zaptel.h $(DESTDIR)/usr/include/linux/zaptel.h
    ++	install -D -m 644 tonezone.h $(DESTDIR)/usr/include/tonezone.h
    ++
    + install-udev: devices
    + 
    + # FIRMWARE_DIR also implies HOTPLUG_FIRMWARE, unless set manually.
    diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile
    new file mode 100644
    index 0000000..614cc18
    --- /dev/null
    +++ b/mail/dovecot/Makefile
    @@ -0,0 +1,114 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=dovecot
    +PKG_VERSION:=1.2.13
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.dovecot.org/releases/1.2
    +PKG_MD5SUM:=aaee3b5fd59e01780305553248f686bc
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/dovecot
    +  SECTION:=mail
    +  CATEGORY:=Mail
    +  DEPENDS:=+libopenssl +librt
    +  TITLE:=An IMAP and POP3 daemon
    +  URL:=http://www.dovecot.org/
    +endef
    +
    +define Package/dovecot/description
    + Dovecot is a program which provides POP3 and IMAP services.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--without-gssapi \
    +	--without-pam \
    +	--with-moduledir=/usr/lib/dovecot/modules \
    +	--with-notify=dnotify \
    +
    +CONFIGURE_VARS += \
    +	RPCGEN= \
    +	i_cv_signed_size_t=no \
    +	i_cv_signed_time_t=no \
    +	i_cv_gmtime_max_time_t=32 \
    +	i_cv_mmap_plays_with_write=yes \
    +	i_cv_fd_passing=yes \
    +	i_cv_c99_vsnprintf=yes \
    +	lib_cv_va_copy=yes \
    +	lib_cv_va_copy=yes \
    +	lib_cv___va_copy=yes \
    +	lib_cv_va_val_copy=yes \
    +
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
    +		autoconf \
    +	);
    +	$(call Build/Configure/Default)
    +endef
    +
    +define Package/dovecot/install
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
    +	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/dovecot-example.conf $(1)/etc/dovecot.conf
    +	$(INSTALL_DIR) $(1)/usr/lib/dovecot
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
    +	find $(1)/usr/lib/dovecot/modules/ \
    +		-name "*.a" -o -name "*.la" | xargs rm
    +endef
    +
    +define Package/dovecot/conffiles
    +/etc/dovecot.conf
    +endef
    +
    +define Package/dovecot/postinst
    +#!/bin/sh
    +
    +id=59
    +name=dovecot
    +home=/var/run/dovecot
    +shell=/bin/false
    +
    +# do not change below
    +# check if we are on real system
    +if [ -z "$${IPKG_INSTROOT}" ]; then
    +        # create copies of passwd and group, if we use squashfs
    +        rootfs=`mount |awk '/root/ { print $$5 }'`
    +        if [ "$$rootfs" = "squashfs" ]; then
    +                if [ -h /etc/group ]; then
    +                        rm /etc/group
    +                        cp -p /rom/etc/group /etc/group
    +                fi
    +                if [ -h /etc/passwd ]; then
    +                        rm /etc/passwd
    +                        cp -p /rom/etc/passwd /etc/passwd
    +                fi
    +        fi
    +fi
    +
    +echo ""
    +if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then
    +        echo "adding group $$name to /etc/group"
    +        echo "$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc/group
    +fi
    +if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then
    +        echo "adding user $$name to /etc/passwd"
    +        echo "$${name}:x:$${id}:$${id}:$${name}:$${home}:$${shell}" >> $${IPKG_INSTROOT}/etc/passwd
    +fi
    +endef
    +
    +
    +$(eval $(call BuildPackage,dovecot))
    diff --git a/mail/dovecot/files/dovecot.init b/mail/dovecot/files/dovecot.init
    new file mode 100644
    index 0000000..00f0edb
    --- /dev/null
    +++ b/mail/dovecot/files/dovecot.init
    @@ -0,0 +1,20 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006-2008 OpenWrt.org
    +
    +START=99
    +
    +RUN_D=/var/run/dovecot
    +PID_F=$RUN_D/master.pid
    +
    +start() {
    +	mkdir -p $RUN_D
    +	dovecot
    +}
    +
    +stop() {
    +	[ -f $PID_F ] && kill $(cat $PID_F)
    +}
    +
    +reload() {
    +	[ -f $PID_F ] && kill -HUP $(cat $PID_F)
    +}
    diff --git a/mail/dovecot/patches/001-configure_in.patch b/mail/dovecot/patches/001-configure_in.patch
    new file mode 100644
    index 0000000..2192605
    --- /dev/null
    +++ b/mail/dovecot/patches/001-configure_in.patch
    @@ -0,0 +1,31 @@
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -398,9 +398,9 @@ have_ioloop=no
    + 
    + if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
    +   AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
    +-    AC_TRY_RUN([
    ++    AC_TRY_LINK([
    +       #include 
    +-  
    ++    ], [
    +       int main()
    +       {
    + 	return epoll_create(5) < 1;
    +@@ -559,7 +559,7 @@ AC_TRY_COMPILE([
    + dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
    + dnl * It may also be broken in AIX.
    + AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
    +-  AC_TRY_RUN([
    ++  AC_TRY_LINK([
    +     #define _XOPEN_SOURCE 600
    +     #include 
    +     #include 
    +@@ -568,6 +568,7 @@ AC_CACHE_CHECK([whether posix_fallocate(
    +     #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
    +       possibly broken posix_fallocate
    +     #endif
    ++  ], [
    +     int main() {
    +       int fd = creat("conftest.temp", 0600);
    +       int ret;
    diff --git a/mail/dovecot/patches/002-example_conf.patch b/mail/dovecot/patches/002-example_conf.patch
    new file mode 100644
    index 0000000..c2e98b4
    --- /dev/null
    +++ b/mail/dovecot/patches/002-example_conf.patch
    @@ -0,0 +1,87 @@
    +--- a/dovecot-example.conf
    ++++ b/dovecot-example.conf
    +@@ -537,20 +537,20 @@
    + 
    + protocol imap {
    +   # Login executable location.
    +-  #login_executable = /usr/libexec/dovecot/imap-login
    ++  #login_executable = /usr/lib/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 user's ~/dovecot.rawlog/, if it exists:
    +-  #   mail_executable = /usr/libexec/dovecot/rawlog /usr/libexec/dovecot/imap
    ++  #   mail_executable = /usr/lib/dovecot/rawlog /usr/lib/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/lib/dovecot/gdbhelper /usr/lib/dovecot/imap
    +   #
    +-  #mail_executable = /usr/libexec/dovecot/imap
    ++  #mail_executable = /usr/lib/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
    +@@ -614,11 +614,11 @@ protocol imap {
    + 
    + protocol pop3 {
    +   # Login executable location.
    +-  #login_executable = /usr/libexec/dovecot/pop3-login
    ++  #login_executable = /usr/lib/dovecot/pop3-login
    + 
    +   # POP3 executable location. See IMAP's mail_executable above for examples
    +   # how this could be changed.
    +-  #mail_executable = /usr/libexec/dovecot/pop3
    ++  #mail_executable = /usr/lib/dovecot/pop3
    + 
    +   # Don't try to set mails non-recent or seen with POP3 sessions. This is
    +   # mostly intended to reduce disk I/O. With maildir it doesn't move files
    +@@ -743,7 +743,7 @@ protocol lda {
    + ##
    + 
    + # Executable location
    +-#auth_executable = /usr/libexec/dovecot/dovecot-auth
    ++#auth_executable = /usr/lib/dovecot/dovecot-auth
    + 
    + # Set max. process size in megabytes.
    + #auth_process_size = 256
    +@@ -872,7 +872,7 @@ auth default {
    +   # 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 {
    ++  #passdb pam {
    +     # [session=yes] [setcred=yes] [failure_show_msg=yes] [max_requests=]
    +     # [cache_key=] []
    +     #
    +@@ -905,15 +905,15 @@ auth default {
    +     #   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 {
    ++  passdb passwd {
    +     # [blocking=yes] - See userdb passwd for explanation
    +     #args = 
    +-  #}
    ++  }
    + 
    +   # Shadow passwords for system users (NSS, /etc/shadow or similiar).
    +   # Deprecated by PAM nowadays.
    +@@ -1192,7 +1192,7 @@ plugin {
    +   # a dictionary so it can be quickly determined which mailboxes contain
    +   # expired mails. The actual expunging is done in a nightly cronjob, which
    +   # you must set up:
    +-  #   dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool
    ++  #   dovecot --exec-mail ext /usr/lib/dovecot/expire-tool
    +   #expire = Trash 7 Spam 30
    +   #expire_dict = proxy::expire
    + 
    diff --git a/mail/fetchmail/Makefile b/mail/fetchmail/Makefile
    new file mode 100644
    index 0000000..7702f4e
    --- /dev/null
    +++ b/mail/fetchmail/Makefile
    @@ -0,0 +1,83 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=fetchmail
    +PKG_VERSION:=6.3.20
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
    +PKG_SOURCE_URL:=http://download.berlios.de/fetchmail
    +PKG_MD5SUM:=76406dbb37471f911cbb483830afe068
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/fetchmail/Default
    +  SECTION:=mail
    +  CATEGORY:=Mail
    +  TITLE:=Remote mail retriever
    +  URL:=http://fetchmail.berlios.de/
    +endef
    +
    +define Package/fetchmail/Default/description
    + Retrieves remote mail via POP/IMAP.
    + Very useful in conjunction with mutt.
    +endef
    +
    +define Package/fetchmail
    +  $(call Package/fetchmail/Default)
    +  DEPENDS+= +libopenssl
    +  TITLE+= (with SSL support)
    +  VARIANT:=ssl
    +endef
    +
    +define Package/fetchmail/description
    + $(call Package/fetchmail/Default/description)
    + This package is built with SSL support.
    +endef
    +
    +define Package/fetchmail-nossl
    +  $(call Package/fetchmail/Default)
    +  TITLE+= (without SSL support)
    +  VARIANT:=nossl
    +endef
    +
    +define Package/fetchmail-nossl/description
    + $(call Package/fetchmail/Default/description)
    + This package is built without SSL support.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--enable-fallback=procmail \
    +	--without-hesiod
    +
    +ifeq ($(BUILD_VARIANT),ssl)
    +	CONFIGURE_ARGS += \
    +		--with-ssl="$(STAGING_DIR)/usr"
    +endif
    +
    +ifeq ($(BUILD_VARIANT),nossl)
    +	CONFIGURE_ARGS += \
    +		--without-ssl
    +endif
    +
    +CONFIGURE_VARS += \
    +	ac_cv_path_procmail=/usr/sbin/procmail
    +
    +define Package/fetchmail/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/fetchmail $(1)/usr/bin/
    +endef
    +
    +Package/fetchmail-nossl/install = $(Package/fetchmail/install)
    +
    +$(eval $(call BuildPackage,fetchmail))
    +$(eval $(call BuildPackage,fetchmail-nossl))
    diff --git a/mail/imapfilter/Makefile b/mail/imapfilter/Makefile
    new file mode 100644
    index 0000000..802e835
    --- /dev/null
    +++ b/mail/imapfilter/Makefile
    @@ -0,0 +1,69 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=imapfilter
    +PKG_VERSION:=2.2.2
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://imapfilter.hellug.gr/source/
    +PKG_MD5SUM:=09c6ffb085a5a244dc9f3e798259f341
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/imapfilter
    +  SECTION:=mail
    +  CATEGORY:=Mail
    +  DEPENDS:=+liblua +libopenssl +libpcre
    +  TITLE:=IMAP server based email filtering
    +  URL:=http://imapfilter.hellug.gr/
    +endef
    +
    +define Package/imapfilter/description
    +	IMAPFilter is a mail filtering utility. It connects to remote mail
    +	servers using the Internet Message Access Protocol (IMAP), sends
    +	searching queries to the server and processes mailboxes based on the
    +	results. It can be used to delete, copy, move, flag, etc. messages
    +	residing in mailboxes at the same or different mail servers. The 4rev1
    +	and 4 versions of the IMAP protocol are supported.
    +
    +	IMAPFilter uses the Lua programming language as a configuration and
    +	extension language.
    +endef
    +
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR); \
    +		./configure \
    +			-d /usr \
    +	);
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		INCDIRS="$(TARGET_CPPFLAGS)" \
    +		LIBDIRS="$(TARGET_LDFLAGS)" \
    +		MYCFLAGS="$(TARGET_CFLAGS) -std=gnu99" \
    +		MYLDFLAGS="-lcrypt" 
    +endef
    +
    +define Package/imapfilter/conffiles
    +/etc/imapfilter/config.lua
    +endef
    +
    +define Package/imapfilter/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/imapfilter $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/etc/imapfilter
    +	$(INSTALL_CONF) $(PKG_BUILD_DIR)/sample.config.lua $(1)/etc/imapfilter/config.lua
    +	$(INSTALL_DIR) $(1)/usr/share/imapfilter
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/{account,auxiliary,common,mailbox,message,options,regex,set,deprecated}.lua $(1)/usr/share/imapfilter/
    +endef
    +
    +$(eval $(call BuildPackage,imapfilter))
    diff --git a/mail/imapfilter/patches/010-pathnames.patch b/mail/imapfilter/patches/010-pathnames.patch
    new file mode 100644
    index 0000000..6e9a43f
    --- /dev/null
    +++ b/mail/imapfilter/patches/010-pathnames.patch
    @@ -0,0 +1,31 @@
    +--- a/pathnames.h
    ++++ b/pathnames.h
    +@@ -3,7 +3,7 @@
    + 
    + 
    + /* Program's home directory. */
    +-#define PATHNAME_HOME			".imapfilter"
    ++#define PATHNAME_HOME			"/etc/imapfilter"
    + 
    + /* Program's configuration file. */
    + #define PATHNAME_CONFIG			PATHNAME_HOME "/config.lua"
    +@@ -39,7 +39,7 @@
    + #define PATHNAME_CERTS			PATHNAME_HOME "/certificates"
    + 
    + /* Debug temporary file template. */
    +-#define PATHNAME_DEBUG			PATHNAME_HOME "/debug.XXXXXX"
    ++#define PATHNAME_DEBUG			"/tmp/imapfilterdebug.XXXXXX"
    + 
    + 
    + #endif				/* PATHNAMES_H */
    +--- a/imapfilter.c
    ++++ b/imapfilter.c
    +@@ -50,7 +50,7 @@
    + 	opts.config = NULL;
    + 	opts.oneline = NULL;
    + 
    +-	env.home = getenv("HOME");
    ++	env.home = "";
    + 	env.pathmax = -1;
    + 
    + 	while ((c = getopt(argc, argv, "Vc:de:il:v?")) != -1) {
    diff --git a/mail/mini_sendmail/Makefile b/mail/mini_sendmail/Makefile
    new file mode 100644
    index 0000000..8024f88
    --- /dev/null
    +++ b/mail/mini_sendmail/Makefile
    @@ -0,0 +1,48 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=mini-sendmail
    +PKG_VERSION:=1.3.6
    +PKG_RELEASE:=4
    +
    +PKG_SOURCE:=mini_sendmail-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.acme.com/software/mini_sendmail/
    +PKG_MD5SUM:=fb1585d2ad81c519a26d83bfd783dee8
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/mini_sendmail-$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/mini-sendmail
    +  SECTION:=mail
    +  CATEGORY:=Mail
    +  TITLE:=A small sendmail-compatible mail forwarder
    +  URL:=http://www.acme.com/software/mini_sendmail/
    +endef
    +
    +define Package/mini-sendmail/description
    + mini_sendmail reads its standard input up to an end-of-file and sends a
    + copy of the message found there to all of the addresses listed.
    + The message is sent by connecting to a local SMTP server. This means
    + mini_sendmail can be used to send email from inside a chroot(2) area.
    +endef
    +
    +MAKE_FLAGS += \
    +	OFLAGS="$(TARGET_CFLAGS)"
    +
    +define Package/mini-sendmail/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/mini_sendmail $(1)/usr/sbin/
    +endef
    +
    +define Package/mini-sendmail/postinst
    +	ln -sf mini_sendmail $${IPKG_INSTROOT}/usr/sbin/sendmail
    +endef
    +
    +$(eval $(call BuildPackage,mini-sendmail))
    diff --git a/mail/mini_sendmail/patches/200-fullname.patch b/mail/mini_sendmail/patches/200-fullname.patch
    new file mode 100644
    index 0000000..95e19a7
    --- /dev/null
    +++ b/mail/mini_sendmail/patches/200-fullname.patch
    @@ -0,0 +1,36 @@
    +Index: mini_sendmail-1.3.6/mini_sendmail.c
    +===================================================================
    +--- mini_sendmail-1.3.6.orig/mini_sendmail.c	2007-08-28 17:58:37.000000000 +0200
    ++++ mini_sendmail-1.3.6/mini_sendmail.c	2007-08-28 17:58:37.000000000 +0200
    +@@ -542,6 +542,7 @@
    + 	}
    + 
    +     /* Strip off any angle brackets. */
    ++/*
    +     while ( len > 0 && *recipient == '<' )
    + 	{
    + 	++recipient;
    +@@ -551,6 +552,23 @@
    + 	--len;
    + 
    +     (void) snprintf( buf, sizeof(buf), "RCPT TO:<%.*s>", len, recipient );
    ++*/
    ++    if (len > 0 && recipient[len-1] == '>' )
    ++    {
    ++        /* "" or: "Full Name " */
    ++        while (len > 0 && *recipient != '<' )
    ++	    {
    ++	    ++recipient;
    ++	    --len;
    ++	    }
    ++        (void) snprintf( buf, sizeof(buf), "RCPT TO:%.*s", len, recipient );
    ++    }
    ++    else
    ++    {
    ++        /* name@domain */
    ++        (void) snprintf( buf, sizeof(buf), "RCPT TO:<%.*s>", len, recipient );
    ++    }
    ++             
    +     send_command( buf );
    +     status = read_response();
    +     if ( status != 250  && status != 251 )
    diff --git a/mail/mini_sendmail/patches/500-flags.patch b/mail/mini_sendmail/patches/500-flags.patch
    new file mode 100644
    index 0000000..39b42b4
    --- /dev/null
    +++ b/mail/mini_sendmail/patches/500-flags.patch
    @@ -0,0 +1,17 @@
    +Index: mini_sendmail-1.3.6/Makefile
    +===================================================================
    +--- mini_sendmail-1.3.6.orig/Makefile	2007-08-28 17:58:37.000000000 +0200
    ++++ mini_sendmail-1.3.6/Makefile	2007-08-28 17:58:37.000000000 +0200
    +@@ -7,9 +7,10 @@
    + BINDIR =	/usr/local/sbin
    + MANDIR =	/usr/local/man
    + CC =		gcc
    +-CFLAGS =	-O
    ++OFLAGS =	-O
    ++CFLAGS =	$(OFLAGS)
    + #CFLAGS =	-g
    +-LDFLAGS =	-s -static
    ++LDFLAGS =
    + #LDFLAGS =	-g -static
    + LDLIBS =	$(SYSV_LIBS)
    + 
    diff --git a/mail/msmtp/Makefile b/mail/msmtp/Makefile
    new file mode 100644
    index 0000000..7d7fec8
    --- /dev/null
    +++ b/mail/msmtp/Makefile
    @@ -0,0 +1,107 @@
    +#
    +# Copyright (C) 2009 David Cooper 
    +# Copyright (C) 2009-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=msmtp
    +PKG_VERSION:=1.4.23
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/msmtp
    +PKG_MD5SUM:=5fb7ae88186624cdb125d3efad3fdc16
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/msmtp/Default
    +  SECTION:=mail
    +  CATEGORY:=Mail
    +  TITLE:=Simple sendmail SMTP forwarding
    +  URL:=http://msmtp.sourceforge.net/
    +endef
    +
    +define Package/msmtp/Default/description
    + msmtp is an SMTP client. In the default mode, it transmits a mail to
    + an SMTP server (for example at a free mail provider) which does the
    + delivery. To use this program with your mail user agent (MUA), create
    + a configuration file with your mail account(s) and tell your MUA to
    + call msmtp instead of /usr/sbin/sendmail.
    +endef
    +
    +define Package/msmtp
    +$(call Package/msmtp/Default)
    +  DEPENDS+= +libopenssl
    +  TITLE+= (with SSL support)
    +  VARIANT:=ssl
    +endef
    +
    +define Package/msmtp/conffiles
    +/etc/msmtprc
    +endef
    +
    +define Package/msmtp/description
    +$(call Package/msmtp/Default/description)
    + This package is built with SSL support.
    +endef
    +
    +define Package/msmtp-nossl
    +$(call Package/msmtp/Default)
    +  TITLE+= (without SSL support)
    +  VARIANT:=nossl
    +endef
    +
    +define Package/msmtp-nossl/description
    +$(call Package/msmtp/Default/description)
    + This package is built without SSL support.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--disable-rpath \
    +	--without-libssl32-prefix \
    +	--without-libintl-prefix \
    +	--without-libgsasl \
    +	--without-libidn
    +
    +MAKE_FLAGS :=
    +
    +ifeq ($(BUILD_VARIANT),ssl)
    +	CONFIGURE_ARGS += \
    +		--with-ssl=openssl \
    +		--with-libssl-prefix="$(STAGING_DIR)/usr/include"
    +endif
    +
    +ifeq ($(BUILD_VARIANT),nossl)
    +	CONFIGURE_ARGS += \
    +		--with-ssl=no
    +endif
    +
    +define Package/msmtp/install
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/msmtprc-system.example \
    +		$(1)/etc/msmtprc
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/msmtp $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-{en,list,run}queue.sh $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +endef
    +
    +define Package/msmtp/postinst
    +	ln -sf ../bin/msmtp $${IPKG_INSTROOT}/usr/sbin/sendmail
    +endef
    +
    +Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles)
    +Package/msmtp-nossl/install = $(Package/msmtp/install)
    +Package/msmtp-nossl/postinst = $(Package/msmtp/postinst)
    +
    +$(eval $(call BuildPackage,msmtp))
    +$(eval $(call BuildPackage,msmtp-nossl))
    diff --git a/mail/mutt/Makefile b/mail/mutt/Makefile
    new file mode 100644
    index 0000000..28df671
    --- /dev/null
    +++ b/mail/mutt/Makefile
    @@ -0,0 +1,48 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=mutt
    +PKG_VERSION:=1.5.21
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE_URL:=@SF/mutt
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_MD5SUM:=a29db8f1d51e2f10c070bf88e8a553fd
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/mutt
    +  SECTION:=mail
    +  CATEGORY:=Mail
    +  DEPENDS:=+libopenssl +libncurses
    +  TITLE:=Console mail client
    +  URL:=http://www.mutt.org/
    +endef
    +
    +define Package/mutt/description
    +	Mutt is a small but very powerful text-based mail client for Unix
    +	operating systems.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--includedir=$(PKG_BUILD_DIR)/. \
    +	--oldincludedir=$(PKG_BUILD_DIR)/. \
    +	--enable-pop \
    +	--enable-imap \
    +	--with-ssl \
    +	--without-idn
    +
    +define Package/mutt/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mutt $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,mutt))
    diff --git a/mail/mutt/patches/001-no_po_and_docs.patch b/mail/mutt/patches/001-no_po_and_docs.patch
    new file mode 100644
    index 0000000..a645993
    --- /dev/null
    +++ b/mail/mutt/patches/001-no_po_and_docs.patch
    @@ -0,0 +1,11 @@
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -342,7 +342,7 @@ top_srcdir = @top_srcdir@
    + AUTOMAKE_OPTIONS = 1.6 foreign
    + @BUILD_IMAP_TRUE@IMAP_SUBDIR = imap
    + @BUILD_IMAP_TRUE@IMAP_INCLUDES = -I$(top_srcdir)/imap
    +-SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR)
    ++SUBDIRS = m4 intl contrib $(IMAP_SUBDIR)
    + bin_SCRIPTS = muttbug flea @SMIMEAUX_TARGET@
    + @BUILD_HCACHE_TRUE@HCVERSION = hcversion.h
    + BUILT_SOURCES = keymap_defs.h patchlist.c reldate.h $(HCVERSION)
    diff --git a/mail/nullmailer/Makefile b/mail/nullmailer/Makefile
    new file mode 100644
    index 0000000..565d954
    --- /dev/null
    +++ b/mail/nullmailer/Makefile
    @@ -0,0 +1,55 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=nullmailer
    +PKG_VERSION:=1.05
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://untroubled.org/nullmailer/
    +PKG_MD5SUM:=35124cc05f893efba1310e2ec7c876ff
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/nullmailer
    +  SECTION:=mail
    +  CATEGORY:=Mail
    +  TITLE:=A minimal MTA for hosts which relay to a fixed set of smart relays
    +  URL:=http://untroubled.org/nullmailer/
    +endef
    +
    +define Package/nullmailer/description
    + This is nullmailer, a sendmail/qmail/etc replacement MTA for hosts
    + which relay to a fixed set of smart relays.  It is designed to be
    + simple to configure, secure, and easily extendable.
    +endef
    +
    +TARGET_CFLAGS += $(TARGET_CPPFLAGS)
    +
    +define Package/nullmailer/install
    +	$(INSTALL_DIR) $(1)/etc/nullmailer
    +	echo "# List of smart relays" > $(1)/etc/nullmailer/remotes
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mailq $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/nullmailer-inject $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/nullmailer-queue $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/nullmailer-send $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sendmail $(1)/usr/sbin/nullmailer-sendmail
    +	$(INSTALL_DIR) $(1)/usr/lib/nullmailer
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/protocols/qmqp $(1)/usr/lib/nullmailer/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/protocols/smtp $(1)/usr/lib/nullmailer/
    +endef
    +
    +define Package/nullmailer/postinst
    +	ln -sf ../sbin/sendmail $${IPKG_INSTROOT}/usr/lib/sendmail
    +	ln -sf nullmailer-sendmail $${IPKG_INSTROOT}/usr/sbin/sendmail
    +endef
    +
    +$(eval $(call BuildPackage,nullmailer))
    diff --git a/mail/procmail/Makefile b/mail/procmail/Makefile
    new file mode 100644
    index 0000000..18e2bcf
    --- /dev/null
    +++ b/mail/procmail/Makefile
    @@ -0,0 +1,44 @@
    +#
    +# Copyright (C) 2006-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=procmail
    +PKG_VERSION:=3.22
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE_URL:=http://www.procmail.org/
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_MD5SUM:=1678ea99b973eb77eda4ecf6acae53f1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/procmail
    +  SECTION:=mail
    +  CATEGORY:=Mail
    +  TITLE:=Mail processing tool
    +  URL:=http://www.procmail.org
    +endef
    +
    +define Package/procmail/description
    + Procmail is able to process and classify incoming mail into 
    + different mail boxes.
    + Very useful in conjunction with mutt.
    +endef
    +
    +define Build/Compile	
    +	$(MAKE) -C $(PKG_BUILD_DIR)/src -f ../Makefile.openwrt  \
    +		$(TARGET_CONFIGURE_OPTS)
    +endef
    +
    +define Package/procmail/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_BUILD_DIR)/src/procmail $(1)/usr/bin/ 
    +	$(CP) $(PKG_BUILD_DIR)/src/formail $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,procmail))
    diff --git a/mail/procmail/patches/001-procmail_openwrt.patch b/mail/procmail/patches/001-procmail_openwrt.patch
    new file mode 100644
    index 0000000..c33d826
    --- /dev/null
    +++ b/mail/procmail/patches/001-procmail_openwrt.patch
    @@ -0,0 +1,51 @@
    +This patch is required to make procmail cross compile - it tries to run some automatic tests which
    +obviously do not work in a cross compiled environment.
    +
    +
    +diff -Naur procmail-3.22_orig/autoconf.h procmail-3.22/autoconf.h
    +--- procmail-3.22_orig/autoconf.h	1970-01-01 10:00:00.000000000 +1000
    ++++ procmail-3.22/autoconf.h	2006-03-23 12:15:36.000000000 +1100
    +@@ -0,0 +1,21 @@
    ++/* This file was automagically generated by autoconf */
    ++
    ++/* 5 moves in 64 steps of size 16384 when reallocing */
    ++#define NOpw_class
    ++#define NOstrlcat
    ++#define NOsetrgid
    ++#define MAX_argc 7588
    ++/* Your system's strstr() is 1.12 times FASTER than my C-routine */
    ++#define UDP_protocolno 17
    ++#define BIFF_serviceport "512"
    ++#define IP_localhost {127,0,0,1}
    ++#define MAILSPOOLDIR "/var/spool/mail/"
    ++#define SENDMAIL "/usr/sbin/sendmail"
    ++#define CF_no_procmail_yet
    ++#define buggy_SENDMAIL
    ++#define defPATH "PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11"
    ++#define defSPATH "PATH=/bin:/usr/bin:/usr/local/bin:/usr/bin/X11"
    ++#define PM_VERSION "3.22"
    ++/* Hotwire LOCKINGTEST=100 */
    ++/* Procmail will lock via: dotlocking, fcntl() */
    ++/* autoconf completed */
    +diff -Naur procmail-3.22_orig/Makefile.openwrt procmail-3.22/Makefile.openwrt
    +--- procmail-3.22_orig/Makefile.openwrt	1970-01-01 10:00:00.000000000 +1000
    ++++ procmail-3.22/Makefile.openwrt	2006-03-23 12:15:36.000000000 +1100
    +@@ -0,0 +1,18 @@
    ++PM_OBJ=cstdio.o common.o exopen.o goodies.o locking.o \
    ++ mailfold.o foldinfo.o misc.o pipes.o regexp.o robust.o \
    ++ sublib.o acommon.o mcommon.o lastdirsep.o authenticate.o \
    ++ lmtp.o memblk.o variables.o from.o comsat.o
    ++
    ++FM_OBJ=common.o fields.o formisc.o sublib.o ecommon.o \
    ++ acommon.o
    ++
    ++LDFLAGS = -lm -lnsl -ldl -lc
    ++CFLAGS = -Os -DPROCMAIL
    ++
    ++all: procmail formail
    ++
    ++procmail: procmail.o $(PM_OBJ)
    ++	$(CC) $(CFLAGS) $@.o $(PM_OBJ) -o $@ $(LDFLAGS)
    ++
    ++formail: formail.o $(FM_OBJ)
    ++	$(CC) $(CFLAGS) $@.o $(FM_OBJ) -o $@ $(LDFLAGS)
    diff --git a/mail/ssmtp/Makefile b/mail/ssmtp/Makefile
    new file mode 100644
    index 0000000..4afd27f
    --- /dev/null
    +++ b/mail/ssmtp/Makefile
    @@ -0,0 +1,61 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ssmtp
    +PKG_VERSION:=2.64
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.bz2
    +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/s/ssmtp
    +PKG_MD5SUM:=65b4e0df4934a6cd08c506cabcbe584f
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +TARGET_CFLAGS += $(TARGET_CPPFLAGS)
    +
    +define Package/ssmtp
    +  SECTION:=mail
    +  CATEGORY:=Mail
    +  DEPENDS:=+libopenssl
    +  TITLE:=A minimal and secure mail sender
    +  URL:=http://packages.debian.org/ssmtp
    +endef
    +
    +define Package/ssmtp/description
    + A secure, effective and simple way of getting mail off a system to your
    + mail hub. It contains no suid-binaries or other dangerous things - no
    + mail spool to poke around in, and no daemons running in the background.
    + mail is simply forwarded to the configured mailhost. Extremely easy
    + configuration.
    +endef
    +
    +define Package/ssmtp/conffiles
    +/etc/ssmtp/ssmtp.conf
    +/etc/ssmtp/revaliases
    +endef
    +
    +CONFIGURE_VARS += \
    +	LIBS="$(TARGET_LDFLAGS) -lcrypto -lssl"
    +
    +CONFIGURE_ARGS += \
    +	--enable-ssl
    +
    +define Package/ssmtp/install
    +	$(INSTALL_DIR) $(1)/etc/ssmtp
    +	$(INSTALL_CONF) $(PKG_BUILD_DIR)/ssmtp.conf $(1)/etc/ssmtp/
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/revaliases $(1)/etc/ssmtp/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ssmtp $(1)/usr/sbin/
    +endef
    +
    +define Package/ssmtp/postinst
    +	ln -sf ssmtp $${IPKG_INSTROOT}/usr/sbin/sendmail
    +endef
    +
    +$(eval $(call BuildPackage,ssmtp))
    diff --git a/mail/xmail/Makefile b/mail/xmail/Makefile
    new file mode 100644
    index 0000000..8716e37
    --- /dev/null
    +++ b/mail/xmail/Makefile
    @@ -0,0 +1,56 @@
    +#
    +# Copyright (C) 2007-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=xmail
    +PKG_VERSION:=1.26
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.xmailserver.org/
    +PKG_MD5SUM:=26d35c2fc104d79ebb6397c7dece5b15
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/xmail
    +  SECTION:=mail
    +  CATEGORY:=Mail
    +  DEPENDS:=+uclibcxx +libopenssl +libpthread
    +  TITLE:=advanced, fast and reliable ESMTP/POP3 mail server
    +  URL:=http://www.xmailserver.org/
    +endef
    +
    +define Package/xmail/description
    + XMail is an Internet mail server featuring an SMTP, POP3 and finger server. 
    + It's incredibly easy to set up and has lots of features including : 
    + multiple domains, virtual users and spam protection.
    +endef
    +
    +define Build/Compile
    +	CFLAGS="$(TARGET_CFLAGS)" \
    +	$(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.lnx \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		LD="\$$$$(CC)" \
    +		CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++ -fno-builtin -fno-rtti -nostdinc++" \
    +		LDFLAGS="$(TARGET_LDFLAGS) -nodefaultlibs -lcrypto -lssl -luClibc++ -ldl -lm -lpthread $(LIBGCC_S)" \
    +		all
    +	tar -cjf $(PKG_BUILD_DIR)/MailRoot.tar.bz2 -C $(PKG_BUILD_DIR)/MailRoot --exclude bin .
    +endef
    +
    +define Package/xmail/install
    +	$(INSTALL_DIR) $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/* $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/MailRoot.tar.bz2 $(1)/etc/
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_DATA) ./files/xmail.config $(1)/etc/config/xmail
    +	$(INSTALL_DIR) $(1)/etc/init.d/
    +	$(INSTALL_BIN) ./files/xmail.init $(1)/etc/init.d/xmail
    +endef
    +
    +$(eval $(call BuildPackage,xmail))
    diff --git a/mail/xmail/files/xmail.config b/mail/xmail/files/xmail.config
    new file mode 100644
    index 0000000..b4d49a0
    --- /dev/null
    +++ b/mail/xmail/files/xmail.config
    @@ -0,0 +1,111 @@
    +# Configuration parameters for xmail
    +#
    +# To see what xmail command line parameters each parameter corresponds to,
    +# 	please see /etc/init.d/xmail
    +#
    +# The xmail configuration files are contained in /etc/MailRoot.tar.gz, and need
    +# 	to be installed in the MAIL_ROOT directory, set by default to
    +# 	/var/MailRoot below by:
    +# 	MAIL_ROOT=`grep "option.*mail_root.*'$" /etc/config/xmail | sed -e "s/'$//" -e "s/.*'//"`
    +# 	mkdir -p $MAIL_ROOT; cd $MAIL_ROOT; tar -xjf /etc/MailRoot.tar.bz2
    +# NOTE: On OpenWRT /var is a temporary filesystem, so change mail_root below,
    +# 	but it is probably not a good idea to install on a device's internal
    +# 	flash due to the amount of writing of the flash that will ensue.
    +#
    +# To see what settings are appropriate, please refer to:
    +# 	http://www.xmailserver.org/Readme.html
    +# which also documents the configuration files in mail_root
    +# ( please note that the values commented out are not real values )
    +# 
    +
    +config xmail
    +	option	mail_root	'/var/MailRoot'
    +#	option	debug		1
    +#	option	log_rotate	'3600'
    +#	option	split_level	'param-split_level'
    +#	option	rx_buffer	'param-rx_buffer'
    +#	option	tx_buffer	'param-tx_buffer'
    +#	option	maildir_delivery	1
    +#	option	mailbox_delivery	1
    +#	option	dns_cache_dirs	'param-dns_cache_dirs'
    +#	option	ipv4_only	1
    +#	option	ipv6_only	1
    +#	option	ipv4_then_ipv6	1
    +#	option	ipv6_then_ipv4	1
    +
    +config pop3
    +#	option	disable	1
    +#	option	ipv6	1
    +#	option	server_port	'param-server_port'
    +#	option	session_timeout	'param-session_timeout'
    +#	option	log	1
    +#	option	delay_timeout	'param-delay_timeout'
    +#	option	bad_login_hang	1
    +#	option	local_address	'param-local_address'
    +	option	num_threads	4
    +
    +config pop3s
    +	option	disable	1
    +#	option	ipv6	1
    +#	option	server_port	'param-server_port'
    +#	option	local_address	'param-local_address'
    +
    +config smtp
    +#	option	disable	1
    +#	option	ipv6	1
    +#	option	server_port	'param-server_port'
    +#	option	session_timeout	'param-session_timeout'
    +#	option	log	1
    +#	option	local_address	'param-local_address'
    +	option	num_threads	4
    +#	option	max_recipients	'param-max_recipients'
    +#	option	expire_timeout	'param-expire_timeout'
    +
    +config smtps
    +	option	disable	1
    +#	option	ipv6	1
    +#	option	server_port	'param-server_port'
    +#	option	local_address	'param-local_address'
    +
    +config smail
    +	option	num_threads	8
    +#	option	next_try_timeout	'param-next_try_timeout'
    +#	option	ratio	'param-ratio'
    +#	option	retries	'param-retries'
    +#	option	log	1
    +#	option	filters_timeout	'param-filters_timeout'
    +#	option	filter_log	1
    +
    +config psync
    +	option	disable	1
    +#	option	interval	'param-interval'
    +#	option	num_threads	'param-num_threads'
    +#	option	timeout	'param-timeout'
    +#	option	log	1
    +
    +config finger
    +	option	disable	1
    +#	option	ipv6	1
    +#	option	server_port	'param-server_port'
    +#	option	log	1
    +#	option	local_address	'param-local_address'
    +
    +config ctrl
    +#	option	disable	1
    +#	option	ipv6	1
    +#	option	server_port	'param-server_port'
    +#	option	session_timeout	'param-session_timeout'
    +#	option	log	1
    +#	option	local_address	'param-local_address'
    +#	option	num_threads	'param-num_threads'
    +
    +config ctrls
    +	option	disable	1
    +#	option	ipv6	1
    +#	option	server_port	'param-server_port'
    +#	option	session_timeout	'param-session_timeout'
    +
    +config lmail
    +	option	num_threads	4
    +#	option	sleep_timeout	'param-sleep_timeout'
    +#	option	log	1
    diff --git a/mail/xmail/files/xmail.init b/mail/xmail/files/xmail.init
    new file mode 100644
    index 0000000..2f5abd5
    --- /dev/null
    +++ b/mail/xmail/files/xmail.init
    @@ -0,0 +1,221 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2008 OpenWrt.org
    +
    +START=90
    +STOP=10
    +
    +MAIL_ROOT=
    +DAEMON=/usr/bin/XMail
    +NAME=XMail
    +
    +append_bool() {
    +	local section="$1"
    +	local option="$2"
    +	local value="$3"
    +	local _loctmp
    +	config_get_bool _loctmp "$section" "$option"
    +	[ "$_loctmp" -le 0 ] && return 0
    +	append args "$value"
    +}
    +
    +append_parm() {
    +	local section="$1"
    +	local option="$2"
    +	local switch="$3"
    +	local _loctmp
    +	config_get _loctmp "$section" "$option"
    +	[ -z "$_loctmp" ] && return 0
    +	append args "$switch $_loctmp"
    +}
    +
    +xmail() {
    +	local cfg="$1"
    +
    +	append_parm "$cfg" mail_root "-Ms"
    +	append_bool "$cfg" debug "-Md"
    +	append_parm "$cfg" log_rotate "-Mr"
    +	append_parm "$cfg" split_level "-Mx"
    +	append_parm "$cfg" rx_buffer "-MR"
    +	append_parm "$cfg" tx_buffer "-MS"
    +	append_bool "$cfg" maildir_delivery "-MM"
    +	append_bool "$cfg" mailbox_delivery "-Mm"
    +	append_parm "$cfg" dns_cache_dirs "-MD"
    +	append_bool "$cfg" ipv4_only "-M4"
    +	append_bool "$cfg" ipv6_only "-M6"
    +	append_bool "$cfg" ipv4_then_ipv6 "-M5"
    +	append_bool "$cfg" ipv6_then_ipv4 "-M7"
    +
    +	config_get mail_root $cfg mail_root
    +	[ -n "$mail_root" ] || return 0
    +	MAIL_ROOT=$mail_root
    +}
    +
    +pop3() {
    +	local cfg="$1"
    +
    +	append_bool "$cfg" disable "-P-"
    +	append_bool "$cfg" ipv6 "-P6"
    +	append_parm "$cfg" server_port "-Pp"
    +	append_parm "$cfg" session_timeout "-Pt"
    +	append_bool "$cfg" log "-Pl"
    +	append_parm "$cfg" delay_timeout "-Pw"
    +	append_bool "$cfg" bad_login_hang "-Ph"
    +	append_parm "$cfg" local_address "-PI"
    +	append_parm "$cfg" num_threads "-PX"
    +}
    +
    +pop3s() {
    +	local cfg="$1"
    +
    +	append_bool "$cfg" disable "-B-"
    +	append_bool "$cfg" ipv6 "-B6"
    +	append_parm "$cfg" server_port "-Bp"
    +	append_parm "$cfg" local_address "-BI"
    +}
    +
    +smtp() {
    +	local cfg="$1"
    +
    +	append_bool "$cfg" disable "-S-"
    +	append_bool "$cfg" ipv6 "-S6"
    +	append_parm "$cfg" server_port "-Sp"
    +	append_parm "$cfg" session_timeout "-St"
    +	append_bool "$cfg" log "-Sl"
    +	append_parm "$cfg" local_address "-SI"
    +	append_parm "$cfg" num_threads "-SX"
    +	append_parm "$cfg" max_recipients "-Sr"
    +	append_parm "$cfg" expire_timeout "-Se"
    +}
    +
    +smtps() {
    +	local cfg="$1"
    +
    +	append_bool "$cfg" disable "-X-"
    +	append_bool "$cfg" ipv6 "-X6"
    +	append_parm "$cfg" server_port "-Xp"
    +	append_parm "$cfg" local_address "-XI"
    +}
    +
    +smail() {
    +	local cfg="$1"
    +
    +	append_parm "$cfg" num_threads "-Qn"
    +	append_parm "$cfg" next_try_timeout "-Qt"
    +	append_parm "$cfg" ratio "-Qi"
    +	append_parm "$cfg" retries "-Qr"
    +	append_bool "$cfg" log "-Ql"
    +	append_parm "$cfg" filters_timeout "-QT"
    +	append_bool "$cfg" filter_log "-Qg"
    +}
    +
    +psync() {
    +	local cfg="$1"
    +
    +	append_bool "$cfg" disable "-Y-"
    +	append_parm "$cfg" interval "-Yi"
    +	append_parm "$cfg" num_threads "-Yt"
    +	append_parm "$cfg" timeout "-Yi"
    +	append_bool "$cfg" log "-Yl"
    +}
    +
    +finger() {
    +	local cfg="$1"
    +
    +	append_bool "$cfg" disable "-F-"
    +	append_bool "$cfg" ipv6 "-F6"
    +	append_parm "$cfg" server_port "-Fp"
    +	append_bool "$cfg" log "-Fl"
    +	append_parm "$cfg" local_address "-FI"
    +}
    +
    +ctrl() {
    +	local cfg="$1"
    +
    +	append_bool "$cfg" disable "-C-"
    +	append_bool "$cfg" ipv6 "-C6"
    +	append_parm "$cfg" server_port "-Cp"
    +	append_parm "$cfg" session_timeout "-Ct"
    +	append_bool "$cfg" log "-Cl"
    +	append_parm "$cfg" local_address "-CI"
    +	append_parm "$cfg" num_threads "-CX"
    +}
    +
    +ctrls() {
    +	local cfg="$1"
    +
    +	append_bool "$cfg" disable "-W-"
    +	append_bool "$cfg" ipv6 "-W6"
    +	append_parm "$cfg" server_port "-Wp"
    +	append_parm "$cfg" session_timeout "-Wt"
    +}
    +
    +lmail() {
    +	local cfg="$1"
    +
    +	append_parm "$cfg" num_threads "-Ln"
    +	append_parm "$cfg" sleep_timeout "-Lt"
    +	append_bool "$cfg" log "-Ll"
    +}
    +	
    +start() {
    +	test -f $DAEMON || exit 0
    +	
    +	set -e
    +	ulimit -c 10000
    +	ulimit -s 128
    +
    +	config_load xmail
    +
    +	args=""
    +
    +	config_foreach xmail xmail
    +	config_foreach pop3 pop3
    +	config_foreach pop3s pop3s
    +	config_foreach smtp smtp
    +	config_foreach smtps smtps
    +	config_foreach smail smail
    +	config_foreach psync psync
    +	config_foreach finger finger
    +	config_foreach ctrl ctrl
    +	config_foreach ctrls ctrls
    +	config_foreach lmail lmail
    +
    +	[ -z "$MAIL_ROOT" ] && exit 0
    +	[ -d $MAIL_ROOT ] || exit 0
    +
    +	export MAIL_ROOT
    +
    +	rm -f /var/run/$NAME.pid
    +
    +	$DAEMON $args
    +
    +	MAX_WAIT=20
    +	while [ ! -f /var/run/$NAME.pid -a $MAX_WAIT -gt 0 ]
    +	do
    +		sleep 1
    +		MAX_WAIT=`expr $MAX_WAIT - 1`
    +	done
    +}
    +
    +stop() {
    +	if [ -f /var/run/$NAME.pid ]
    +	then
    +		config_load xmail
    +		config_foreach xmail xmail
    +		[ -z "$MAIL_ROOT" ] || echo `date` > $MAIL_ROOT/.shutdown
    +		kill -INT `cat /var/run/$NAME.pid`
    +
    +		MAX_WAIT=20
    +		while [ -f $MAIL_ROOT/.shutdown -a $MAX_WAIT -gt 0 ]
    +		do
    +			sleep 1
    +			MAX_WAIT=`expr $MAX_WAIT - 1`
    +		done
    +	fi
    +}
    +
    +restart() {
    +	stop
    +	sleep 1
    +	start
    +}
    diff --git a/mail/xmail/patches/010-Makefile.common.patch b/mail/xmail/patches/010-Makefile.common.patch
    new file mode 100644
    index 0000000..af6aa70
    --- /dev/null
    +++ b/mail/xmail/patches/010-Makefile.common.patch
    @@ -0,0 +1,21 @@
    +--- a/Makefile.common
    ++++ b/Makefile.common
    +@@ -76,15 +76,15 @@
    + SENDMAILOBJS = SendMail.o
    + 
    + %.o : %.cpp
    +-	${CC} ${CPPFLAGS} ${CFLAGS} -c $*.cpp
    ++	${CXX} ${CPPFLAGS} ${CFLAGS} -c $*.cpp
    + 
    + all: ${OUTDIR} ${MKMACHDEPINC} ${MAILSVR} ${CRTLCLNT} ${XMCRYPT} ${MKUSERS} ${SENDMAIL}
    + 
    + ${OUTDIR}:
    + 	@mkdir ${OUTDIR}
    + 
    +-${MKMACHDEPINC}: ${MKMACHDEP}
    +-	./${MKMACHDEP} > ${MKMACHDEPINC}
    ++#${MKMACHDEPINC}: ${MKMACHDEP}
    ++#	./${MKMACHDEP} > ${MKMACHDEPINC}
    + 
    + ${MKMACHDEP}: ${MKMACHDEPOBJS}
    + 	${LD} -o ${MKMACHDEP} ${MKMACHDEPOBJS} ${LDFLAGS}
    diff --git a/mail/xmail/patches/020-Makefile.lnx.patch b/mail/xmail/patches/020-Makefile.lnx.patch
    new file mode 100644
    index 0000000..3f8866b
    --- /dev/null
    +++ b/mail/xmail/patches/020-Makefile.lnx.patch
    @@ -0,0 +1,15 @@
    +--- a/Makefile.lnx
    ++++ b/Makefile.lnx
    +@@ -19,9 +19,9 @@
    + #  Davide Libenzi 
    + #
    + SYSTYPE = linux
    +-CC = g++
    +-LD = g++
    +-STRIP = strip
    ++CC = $(CXX)
    ++LD = $(CXX)
    ++#STRIP = strip
    + 
    + ifneq ("$(WITH_SSL_INCLUDE)", "")
    +     CFLAGS := $(CFLAGS) -I$(WITH_SSL_INCLUDE)
    diff --git a/mail/xmail/patches/030-sysmachine.patch b/mail/xmail/patches/030-sysmachine.patch
    new file mode 100644
    index 0000000..b3704fb
    --- /dev/null
    +++ b/mail/xmail/patches/030-sysmachine.patch
    @@ -0,0 +1,28 @@
    +diff -urN xmail-1.25.orig/SysMachine.h xmail-1.25/SysMachine.h
    +--- xmail-1.25.orig/SysMachine.h	1970-01-01 01:00:00.000000000 +0100
    ++++ xmail-1.25/SysMachine.h	2008-07-28 10:16:47.000000000 +0200
    +@@ -0,0 +1,24 @@
    ++#ifndef _MACHDEFS_H
    ++#define _MACHDEFS_H
    ++
    ++
    ++#undef MACH_BIG_ENDIAN_WORDS
    ++
    ++#undef MACH_BIG_ENDIAN_BITFIELD
    ++
    ++typedef signed char MachInt8;
    ++typedef unsigned char MachUInt8;
    ++#define MACH_TYPE_8BIT char
    ++
    ++typedef signed short MachInt16;
    ++typedef unsigned short MachUInt16;
    ++#define MACH_TYPE_16BIT short
    ++
    ++typedef signed int MachInt32;
    ++typedef unsigned int MachUInt32;
    ++#define MACH_TYPE_32BIT int
    ++
    ++
    ++
    ++#endif
    ++
    diff --git a/mail/xmail/patches/040-honour_opt_flags.patch b/mail/xmail/patches/040-honour_opt_flags.patch
    new file mode 100644
    index 0000000..5170432
    --- /dev/null
    +++ b/mail/xmail/patches/040-honour_opt_flags.patch
    @@ -0,0 +1,15 @@
    +--- a/Makefile.common
    ++++ b/Makefile.common
    +@@ -24,10 +24,10 @@
    + endif
    + 
    + ifeq ($(XMAIL_DEBUG), 1)
    +-    CFLAGS := $(CFLAGS) -O0 -g
    ++    CFLAGS := -O0 -g $(CFLAGS)
    +     STRIP = touch
    + else
    +-    CFLAGS := $(CFLAGS) -O2
    ++    CFLAGS := -O2 $(CFLAGS)
    + endif
    + 
    + OUTDIR = bin
    diff --git a/multimedia/crtmpserver/Makefile b/multimedia/crtmpserver/Makefile
    new file mode 100644
    index 0000000..a101915
    --- /dev/null
    +++ b/multimedia/crtmpserver/Makefile
    @@ -0,0 +1,83 @@
    +# 
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=crtmpserver
    +PKG_REV:=346
    +PKG_VERSION:=r$(PKG_REV)
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=--username=anonymous --password= https://svn.rtmpd.com/crtmpserver/trunk
    +PKG_SOURCE_SUBDIR:=crtmpserver-$(PKG_VERSION)
    +PKG_SOURCE_VERSION:=$(PKG_REV)
    +PKG_SOURCE_PROTO:=svn
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/crtmpserver
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  DEPENDS:=+libopenssl +libstdcpp
    +  TITLE:=C++ RTMP Server
    +  URL:=http://www.rtmpd.com/
    +endef
    +
    +define Package/crtmpserver/description
    +C++ RTMP Server it is a high performance streaming server able to
    +stream (live or recorded) in the following technologies:
    + * To and from Flash (RTMP,RTMPE, RTMPS, RTMPT, RTMPTE)
    + * To and from embedded devices: iPhone, Android
    + * From surveillance cameras
    + * IP-TV using MPEG-TS and RTSP/RTCP/RTP protocols
    +                
    +Also, crtmpserver can be used as a high performance rendes-vous
    +server. For example, it enables you to do:
    + * Audio/Video conferencing
    + * Online gaming
    + * Online collaboration
    + * Simple/complex chat applications
    +endef
    +
    +# XXX: this hack handles the usr/bin vs bin difference of backfire and trunk
    +TS_BASE:=$(wildcard $(TOOLCHAIN_DIR)/bin/$(TARGET_CC))
    +TS_BASE:=$(dir $(if $(TS_BASE),$(TS_BASE),$(wildcard $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CC))))
    +
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR)/builders/make; \
    +		cp linux.mk linux-openwrt-uclibc.mk; \
    +		$(SED) 's,^TOOLCHAIN_BASE[[:space:]]*=.*,TOOLCHAIN_BASE=$(TS_BASE),' \
    +			-e 's,^TOOLCHAIN_PREFIX[[:space:]]*=.*,TOOLCHAIN_PREFIX=$(TARGET_CROSS),' \
    +			-e 's,^OPTIMIZATIONS[[:space:]]*=.*,OPTIMIZATIONS=-O2,' \
    +			-e 's,^SSL_BASE[[:space:]]*=.*,SSL_BASE=$(STAGING_DIR)/usr,' \
    +			linux-openwrt-uclibc.mk)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/builders/make \
    +		PLATFORM=linux-openwrt-uclibc
    +endef
    +
    +define Package/crtmpserver/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/rtmpserver $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/lib/rtmpserver
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/rtmpserver/
    +	$(foreach app,flvplayback samplefactory admin stresstest appselector vptests applestreamingclient proxypublish, \
    +		$(INSTALL_DIR) $(1)/usr/lib/rtmpserver/$(app); \
    +		$(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/applications/$(app)/lib$(app).so \
    +			$(1)/usr/lib/rtmpserver/$(app)/; \
    +	)
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/builders/make/output/dynamic/rtmpserver.lua $(1)/etc/
    +	$(INSTALL_DIR) $(1)/usr/share/rtmpserver/appselector
    +	$(INSTALL_DIR) $(1)/usr/share/rtmpserver/media
    +endef
    +
    +$(eval $(call BuildPackage,crtmpserver))
    +
    diff --git a/multimedia/crtmpserver/patches/010-link-crypt-for-lua.patch b/multimedia/crtmpserver/patches/010-link-crypt-for-lua.patch
    new file mode 100644
    index 0000000..6c6622c
    --- /dev/null
    +++ b/multimedia/crtmpserver/patches/010-link-crypt-for-lua.patch
    @@ -0,0 +1,11 @@
    +--- a/builders/make/compile.mk
    ++++ b/builders/make/compile.mk
    +@@ -65,7 +65,7 @@ LUA_OBJS = $(LUA_SRCS:.c=.lua.o)
    + 
    + #common
    + COMMON_INCLUDE=$(LUA_INCLUDE) $(SSL_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/common/include
    +-COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua
    ++COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -lcrypt
    + COMMON_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/common/src -type f -name "*.cpp")
    + COMMON_OBJS = $(COMMON_SRCS:.cpp=.common.o)
    + 
    diff --git a/multimedia/crtmpserver/patches/020-add-rpath.patch b/multimedia/crtmpserver/patches/020-add-rpath.patch
    new file mode 100644
    index 0000000..7b6d5f4
    --- /dev/null
    +++ b/multimedia/crtmpserver/patches/020-add-rpath.patch
    @@ -0,0 +1,15 @@
    +Index: crtmpserver-r219/builders/make/linux.mk
    +===================================================================
    +--- crtmpserver-r219.orig/builders/make/linux.mk
    ++++ crtmpserver-r219/builders/make/linux.mk
    +@@ -29,8 +29,8 @@ OPTIMIZATIONS = -O3
    + COMPILE_FLAGS = $(FPIC) $(OPTIMIZATIONS)
    + 
    + #linking flags
    +-dynamic_lib_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-soname,$(DYNAMIC_LIB_PREFIX)$(1)$(DYNAMIC_LIB_SUFIX) -Wl,-rpath,"\$$ORIGIN"
    +-dynamic_exec_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-rpath,"\$$ORIGIN"
    ++dynamic_lib_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-soname,$(DYNAMIC_LIB_PREFIX)$(1)$(DYNAMIC_LIB_SUFIX) -Wl,-rpath,/usr/lib/rtmpserver
    ++dynamic_exec_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-rpath,/usr/lib/rtmpserver
    + 
    + #compile switches
    + PLATFORM_DEFINES = \
    diff --git a/multimedia/crtmpserver/patches/030-default-config.patch b/multimedia/crtmpserver/patches/030-default-config.patch
    new file mode 100644
    index 0000000..f0fdc1a
    --- /dev/null
    +++ b/multimedia/crtmpserver/patches/030-default-config.patch
    @@ -0,0 +1,37 @@
    +--- a/builders/cmake/rtmpserver/rtmpserver.lua
    ++++ b/builders/cmake/rtmpserver/rtmpserver.lua
    +@@ -4,7 +4,7 @@ configuration=
    + {
    + 	-- if true, the server will run as a daemon.
    + 	-- NOTE: all console appenders will be ignored if this is a daemon
    +-	daemon=false,
    ++	daemon=true,
    + 	-- the OS's path separator. Used in composing paths
    + 	pathSeparator="/",
    + 	-- this is the async DNS resolver. This is a "clinet" connection
    +@@ -58,7 +58,7 @@ configuration=
    + 	{
    + 		-- this is the root directory of all applications
    + 		-- usually this is relative to the binary execuable
    +-		rootDirectory="applications",
    ++		rootDirectory="/usr/lib/rtmpserver",
    + 		
    + 		
    + 		--this is where the applications array starts
    +@@ -82,7 +82,7 @@ configuration=
    + 			-- this is the folder from where the current application gets it's content.
    + 			-- It is optional. If not specified, it will be defaulted to:
    + 			-- //mediaFolder
    +-			-- mediaFolder="/some/directory/where/media/files/are/stored"
    ++			mediaFolder="/usr/share/rtmpserver/appselector",
    + 			-- the application will also be known by that names. It is optional
    + 			--aliases=
    + 			--{
    +@@ -119,6 +119,7 @@ configuration=
    + 			description="FLV Playback Sample",
    + 			name="flvplayback",
    + 			protocol="dynamiclinklibrary",
    ++			mediaFolder="/usr/share/rtmpserver/media",
    + 			aliases=
    + 			{
    + 				"simpleLive",
    diff --git a/multimedia/crtmpserver/patches/040-use-select.patch b/multimedia/crtmpserver/patches/040-use-select.patch
    new file mode 100644
    index 0000000..42b3a28
    --- /dev/null
    +++ b/multimedia/crtmpserver/patches/040-use-select.patch
    @@ -0,0 +1,11 @@
    +--- a/builders/make/linux.mk
    ++++ b/builders/make/linux.mk
    +@@ -36,7 +36,7 @@ dynamic_exec_flags = $(FPIC) $(OPTIMIZAT
    + PLATFORM_DEFINES = \
    + 	-DLINUX \
    + 	-DLITTLE_ENDIAN_BYTE_ALIGNED \
    +-	-DNET_EPOLL
    ++	-DNET_SELECT
    + 
    + SSL_BASE=/usr/local
    + 
    diff --git a/multimedia/ffmpeg/Config.in b/multimedia/ffmpeg/Config.in
    new file mode 100644
    index 0000000..32665d8
    --- /dev/null
    +++ b/multimedia/ffmpeg/Config.in
    @@ -0,0 +1,325 @@
    +menu "Configuration"
    +	depends PACKAGE_libffmpeg
    +
    +config FFMPEG_IPV6
    +	bool "Enable IPv6"
    +	default IPV6
    +
    +config FFMPEG_PATENTED
    +	bool "Include patented codecs and technologies"
    +	default BUILD_PATENTED
    +
    +config FFMPEG_FFSERVER_SUPPORT
    +	bool "Include support for ffserver (FFmpeg streaming server)"
    +	select FFMPEG_MUXER_ffm
    +	select FFMPEG_DEMUXER_ffm
    +	select FFMPEG_DEMUXER_rtsp
    +	select FFMPEG_PROTOCOL_rtp
    +
    +config FFMPEG_LIBDLNA_SUPPORT
    +	bool "Include support for libdlna/ushare"
    +	depends FFMPEG_PATENTED
    +	select FFMPEG_DECODER_ac3
    +	select FFMPEG_DECODER_atrac3
    +	select FFMPEG_DECODER_h264
    +	select FFMPEG_DECODER_jpegls
    +	select FFMPEG_DECODER_mp3
    +	select FFMPEG_DECODER_mpeg1video
    +	select FFMPEG_DECODER_mpeg2video
    +	select FFMPEG_DECODER_mpeg4
    +	select FFMPEG_DECODER_mpeg4aac
    +	select FFMPEG_DECODER_mpegvideo
    +	select FFMPEG_DECODER_wmav1
    +	select FFMPEG_DECODER_wmav2
    +	select FFMPEG_DECODER_png
    +	select FFMPEG_DEMUXER_ac3
    +	select FFMPEG_DEMUXER_h264
    +	select FFMPEG_DEMUXER_mp3
    +	select FFMPEG_DEMUXER_mpegvideo
    +
    +config FFMPEG_MINIDLNA_SUPPORT
    +	bool "Include support for minidlna"
    +	depends FFMPEG_PATENTED
    +	select FFMPEG_DECODER_aac
    +	select FFMPEG_DECODER_ac3
    +	select FFMPEG_DECODER_flac
    +	select FFMPEG_DECODER_h264
    +	select FFMPEG_DECODER_jpegls
    +	select FFMPEG_DECODER_mp3
    +	select FFMPEG_DECODER_mpeg1video
    +	select FFMPEG_DECODER_mpeg2video
    +	select FFMPEG_DECODER_mpeg4
    +	select FFMPEG_DECODER_mpeg4aac
    +	select FFMPEG_DECODER_mpegvideo
    +	select FFMPEG_DECODER_wmav1
    +	select FFMPEG_DECODER_wmav2
    +	select FFMPEG_DECODER_png
    +	select FFMPEG_DEMUXER_aac
    +	select FFMPEG_DEMUXER_ac3
    +	select FFMPEG_DEMUXER_avi
    +	select FFMPEG_DEMUXER_flac
    +	select FFMPEG_DEMUXER_h264
    +	select FFMPEG_DEMUXER_matroska
    +	select FFMPEG_DEMUXER_mov
    +	select FFMPEG_DEMUXER_mp3
    +	select FFMPEG_DEMUXER_mpegvideo
    +	select FFMPEG_PROTOCOL_file
    +
    +comment "Encoders ---"
    +
    +config FFMPEG_ENCODER_ac3
    +	bool "AC3"
    +	depends FFMPEG_PATENTED
    +	select FFMPEG_PARSER_ac3
    +
    +config FFMPEG_ENCODER_jpegls
    +	bool "JPEG-LS"
    +
    +config FFMPEG_ENCODER_mpeg1video
    +	bool "MPEG-1 Video"
    +
    +config FFMPEG_ENCODER_mpeg2video
    +	bool "MPEG-2 Video"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_ENCODER_mpeg4
    +	bool "MPEG-4"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_ENCODER_pcm_s16be
    +	bool "PCM signed 16-bit big-endian"
    +
    +config FFMPEG_ENCODER_pcm_s16le
    +	bool "PCM signed 16-bit little-endian"
    +
    +config FFMPEG_ENCODER_png
    +	bool "PNG"
    +	select FFMPEG_ENCODER_zlib
    +
    +config FFMPEG_ENCODER_vorbis
    +	bool "Vorbis"
    +
    +config FFMPEG_ENCODER_zlib
    +	bool "Zlib"
    +
    +comment "Decoders ---"
    +
    +config FFMPEG_DECODER_aac
    +	bool "AAC (Advanced Audio Coding)"
    +	depends FFMPEG_PATENTED
    +	select FFMPEG_PARSER_aac
    +
    +config FFMPEG_DECODER_ac3
    +	bool "AC3"
    +	depends FFMPEG_PATENTED
    +	select FFMPEG_PARSER_ac3
    +
    +config FFMPEG_DECODER_atrac3
    +	bool "ATRAC3"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_DECODER_flac
    +	bool "FLAC"
    +
    +config FFMPEG_DECODER_gif
    +	bool "GIF"
    +
    +config FFMPEG_DECODER_h264
    +	bool "H.264"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_DECODER_jpegls
    +	bool "JPEG-LS"
    +
    +config FFMPEG_DECODER_mp2
    +	bool "MP2 (MPEG Audio Layer 2)"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_DECODER_mp3
    +	bool "MP3 (MPEG Audio Layer 2)"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_DECODER_mpegvideo
    +	bool "MPEG Video"
    +
    +config FFMPEG_DECODER_mpeg1video
    +	bool "MPEG-1 Video"
    +
    +config FFMPEG_DECODER_mpeg2video
    +	bool "MPEG-2 Video"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_DECODER_mpeg4
    +	bool "MPEG-4"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_DECODER_mpeg4aac
    +	bool "MPEG-4 (AAC)"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_DECODER_pcm_s16be
    +	bool "PCM signed 16-bit big-endian"
    +
    +config FFMPEG_DECODER_pcm_s16le
    +	bool "PCM signed 16-bit little-endian"
    +
    +config FFMPEG_DECODER_png
    +	bool "PNG"
    +	select FFMPEG_DECODER_zlib
    +
    +config FFMPEG_DECODER_vorbis
    +	bool "Vorbis"
    +
    +config FFMPEG_DECODER_wmav1
    +	bool "WMAv1"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_DECODER_wmav2
    +	bool "WMAv2"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_DECODER_zlib
    +	bool "Zlib"
    +
    +comment "Muxers ---"
    +
    +config FFMPEG_MUXER_ac3
    +	bool "AC3"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_MUXER_ffm
    +	bool "FFM (ffserver live feed)"
    +
    +config FFMPEG_MUXER_h264
    +	bool "H.264"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_MUXER_mp3
    +	bool "MP3 (MPEG Audio Layer 3)"
    +
    +config FFMPEG_MUXER_mp4
    +	bool "MP4"
    +
    +config FFMPEG_MUXER_mpeg1video
    +	bool "MPEG-1 Video"
    +
    +config FFMPEG_MUXER_mpeg2video
    +	bool "MPEG-2 Video"
    +
    +config FFMPEG_MUXER_mpegts
    +	bool "MPEG-2 (TS)"
    +
    +config FFMPEG_MUXER_ogg
    +	bool "Ogg"
    +
    +config FFMPEG_MUXER_oss
    +	bool "OSS (Open Sound System playback)"
    +
    +config FFMPEG_MUXER_rtp
    +	bool "RTP"
    +
    +comment "Demuxers ---"
    +
    +config FFMPEG_DEMUXER_aac
    +	bool "AAC"
    +
    +config FFMPEG_DEMUXER_avi
    +	bool "AVI (Audio Video Interleave)"
    +
    +config FFMPEG_DEMUXER_ac3
    +	bool "AC3"
    +
    +config FFMPEG_DEMUXER_flac
    +	bool "FLAC"
    +
    +config FFMPEG_DEMUXER_ffm
    +	bool "FFM (ffserver live feed)"
    +
    +config FFMPEG_DEMUXER_h264
    +	bool "H.264"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_DEMUXER_matroska
    +	bool "Matroska (MKA,MKV)"
    +	select FFMPEG_DECODER_zlib
    +
    +config FFMPEG_DEMUXER_mov
    +	bool "MOV/MP4/M4A/3GP/3G2/MJ2"
    +	select FFMPEG_DECODER_zlib
    +
    +config FFMPEG_DEMUXER_mp3
    +	bool "MP3 (MPEG Audio Layer 3)"
    +	select FFMPEG_PARSER_mpegaudio
    +
    +config FFMPEG_DEMUXER_mpegvideo
    +	bool "MPEG Video"
    +
    +config FFMPEG_DEMUXER_mpegps
    +	bool "MPEG-2 (PS)"
    +
    +config FFMPEG_DEMUXER_mpegts
    +	bool "MPEG-2 (TS)"
    +
    +config FFMPEG_DEMUXER_ogg
    +	bool "Ogg"
    +
    +config FFMPEG_DEMUXER_rm
    +	bool "RM"
    +	help
    +	  RealMedia format demuxer
    +
    +config FFMPEG_DEMUXER_rtsp
    +	bool "RTSP"
    +	select FFMPEG_DEMUXER_rm
    +	select FFMPEG_DEMUXER_sdp
    +
    +config FFMPEG_DEMUXER_sdp
    +	bool "SDP"
    +	select FFMPEG_DEMUXER_mpegts
    +
    +comment "Parsers ---"
    +
    +config FFMPEG_PARSER_aac
    +	bool "AAC (Advanced Audio Coding)"
    +	depends FFMPEG_PATENTED
    +
    +config FFMPEG_PARSER_ac3
    +	bool "AC3"
    +
    +config FFMPEG_PARSER_h264
    +	bool "H.264"
    +	depends FFMPEG_PATENTED
    +	select FFMPEG_DECODER_h264
    +
    +config FFMPEG_PARSER_mpegaudio
    +	bool "MPEG Audio"
    +
    +config FFMPEG_PARSER_mpegvideo
    +	bool "MPEG Video"
    +
    +config FFMPEG_PARSER_mpeg4video
    +	bool "MPEG-4 Video"
    +
    +comment "Protocols ---"
    +
    +config FFMPEG_PROTOCOL_file
    +	bool "file:"
    +
    +config FFMPEG_PROTOCOL_http
    +	bool "http:"
    +
    +config FFMPEG_PROTOCOL_pipe
    +	bool "pipe:"
    +
    +config FFMPEG_PROTOCOL_rtp
    +	bool "rtp:"
    +	select FFMPEG_PROTOCOL_udp
    +
    +config FFMPEG_PROTOCOL_tcp
    +	bool "tcp:"
    +
    +config FFMPEG_PROTOCOL_udp
    +	bool "udp:"
    +
    +endmenu
    +
    diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile
    new file mode 100644
    index 0000000..e2dc1f1
    --- /dev/null
    +++ b/multimedia/ffmpeg/Makefile
    @@ -0,0 +1,300 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ffmpeg
    +PKG_VERSION:=0.5.4
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://ffmpeg.org/releases/
    +PKG_MD5SUM:=87e771cd0f5d465fbf1a0a4824b7cc24
    +
    +FFMPEG_ENCODERS:= \
    +	ac3 \
    +	jpegls \
    +	mpeg1video \
    +	mpeg2video \
    +	mpeg4 \
    +	pcm_s16be \
    +	pcm_s16le \
    +	png \
    +	vorbis \
    +	zlib \
    +
    +FFMPEG_DECODERS:= \
    +	aac \
    +	ac3 \
    +	atrac3 \
    +	flac \
    +	gif \
    +	h264 \
    +	jpegls \
    +	mp2 \
    +	mp3 \
    +	mpeg1video \
    +	mpeg2video \
    +	mpeg4 \
    +	mpeg4aac \
    +	mpegvideo \
    +	pcm_s16be \
    +	pcm_s16le \
    +	png \
    +	vorbis \
    +	wmav1 \
    +	wmav2 \
    +	zlib \
    +
    +FFMPEG_MUXERS:= \
    +	ac3 \
    +	ffm \
    +	h264 \
    +	mp3 \
    +	mp4 \
    +	mpeg1video \
    +	mpeg2video \
    +	mpegts \
    +	ogg \
    +	oss \
    +	rtp \
    +
    +FFMPEG_DEMUXERS:= \
    +	aac \
    +	ac3 \
    +	avi \
    +	flac \
    +	ffm \
    +	h264 \
    +	matroska \
    +	mov \
    +	mp3 \
    +	mpegps \
    +	mpegts \
    +	mpegvideo \
    +	ogg \
    +	rm \
    +	rtsp \
    +	sdp \
    +	v4l2 \
    +
    +FFMPEG_PARSERS:= \
    +	aac \
    +	ac3 \
    +	h264 \
    +	mpegaudio \
    +	mpeg4video \
    +	mpegvideo \
    +
    +FFMPEG_PROTOCOLS:= \
    +	file http pipe rtp tcp udp
    +
    +PKG_CONFIG_DEPENDS:= \
    +	$(patsubst %,CONFIG_FFMPEG_ENCODER_%,$(FFMPEG_ENCODERS)) \
    +	$(patsubst %,CONFIG_FFMPEG_DECODER_%,$(FFMPEG_DECODERS)) \
    +	$(patsubst %,CONFIG_FFMPEG_MUXER_%,$(FFMPEG_DEMUXERS)) \
    +	$(patsubst %,CONFIG_FFMPEG_DEMUXER_%,$(FFMPEG_DEMUXERS)) \
    +	$(patsubst %,CONFIG_FFMPEG_PARSER_%,$(FFMPEG_PARSERS)) \
    +	$(patsubst %,CONFIG_FFMPEG_PROTOCOL_%,$(FFMPEG_PROTOCOLS))
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/ffmpeg/Default
    + TITLE:=FFmpeg
    + URL:=http://ffmpeg.mplayerhq.hu/
    +endef
    +
    +define Package/ffmpeg/Default/description
    + FFmpeg is a a software package that can record, convert and stream digital 
    + audio and video in numerous formats.
    +endef
    +
    +define Package/ffmpeg
    +$(call Package/ffmpeg/Default)
    + SECTION:=multimedia
    + CATEGORY:=Multimedia
    + TITLE+= program
    + DEPENDS+= +libpthread +libffmpeg +libpostproc +libswscale
    +endef
    +
    +define Package/ffmpeg/description
    +$(call Package/ffmpeg/Default/description)
    + .
    + This package contains the FFmpeg command line tool.
    +endef
    +
    +define Package/ffserver
    +$(call Package/ffserver/Default)
    + SECTION:=multimedia
    + CATEGORY:=Multimedia
    + TITLE+= streaming server
    + DEPENDS+= +libpthread +libffmpeg +@FFMPEG_FFSERVER_SUPPORT
    +endef
    +
    +define Package/ffserver/description
    +$(call Package/ffmpeg/Default/description)
    + .
    + This package contains the FFmpeg streaming server.
    +endef
    +
    +define Package/libffmpeg
    +$(call Package/ffmpeg/Default)
    + SECTION:=libs
    + CATEGORY:=Libraries
    + TITLE+= libraries
    + DEPENDS+= +libpthread +zlib
    + MENU:=1
    +endef
    +
    +define Package/libffmpeg/config
    +source "$(SOURCE)/Config.in"
    +endef
    +
    +define Package/libffmeg/description
    +$(call Package/ffmpeg/Default/description)
    + .
    + This package contains FFmpeg shared libraries.
    +endef
    +
    +define Package/libpostproc
    + SECTION:=libs
    + CATEGORY:=Libraries
    + TITLE:=libpostproc
    + URL:=http://ffmpeg.mplayerhq.hu/
    + DEPENDS:=+libffmpeg
    +endef
    +
    +define Package/libswscale
    + SECTION:=libs
    + CATEGORY:=Libraries
    + TITLE:=libswscale
    + URL:=http://ffmpeg.mplayerhq.hu/
    + DEPENDS:=+libffmpeg
    +endef
    +
    +FILTER_CONFIG= \
    +	$(foreach c, $(3), \
    +		$(if $(CONFIG_FFMPEG_$(1)_$(c)),--enable-$(2)="$(c)") \
    +	)
    +
    +FFMPEG_CONFIGURE_ENCODERS:=$(call FILTER_CONFIG,ENCODER,encoder,$(FFMPEG_ENCODERS))
    +FFMPEG_CONFIGURE_DECODERS:=$(call FILTER_CONFIG,DECODER,decoder,$(FFMPEG_DECODERS))
    +FFMPEG_CONFIGURE_MUXERS:=$(call FILTER_CONFIG,MUXER,muxer,$(FFMPEG_MUXERS))
    +FFMPEG_CONFIGURE_DEMUXERS:=$(call FILTER_CONFIG,DEMUXER,demuxer,$(FFMPEG_DEMUXERS))
    +FFMPEG_CONFIGURE_PARSERS:=$(call FILTER_CONFIG,PARSER,parser,$(FFMPEG_PARSERS))
    +FFMPEG_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(FFMPEG_PROTOCOLS))
    +
    +ifneq ($(CONFIG_TARGET_x86),)
    +  TARGET_CFLAGS += -fomit-frame-pointer
    +endif
    +
    +# XXX: add --disable-mmx & --disable-mmx2 to fix build failure on x86
    +# libpostproc/postprocess_template.c:2195: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
    +# libpostproc/postprocess_template.c:3124: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
    +# libpostproc/postprocess_template.c:3207: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
    +
    +define Build/Configure
    +	# this is *NOT* GNU configure
    +	( cd $(PKG_BUILD_DIR); \
    +		CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
    +		LDFLAGS="$(TARGET_LDFLAGS)" \
    +		./configure \
    +		--enable-cross-compile \
    +		--cross-prefix="$(TARGET_CROSS)" \
    +		--arch="$(ARCH)" \
    +		--target-os=linux \
    +		--prefix="/usr" \
    +		--enable-shared \
    +		--enable-static \
    +		--disable-debug \
    +		--enable-gpl \
    +		--disable-libfaad \
    +		--disable-amd3dnow \
    +		--disable-amd3dnowext \
    +		--disable-mmx \
    +		--disable-mmx2 \
    +		--enable-pthreads \
    +		--disable-optimizations \
    +		--enable-small \
    +		--disable-stripping \
    +		--disable-vhook \
    +		--enable-zlib \
    +		--enable-postproc \
    +		--enable-swscale \
    +		\
    +		$(if $(CONFIG_PACKAGE_ffmpeg),,--disable-ffmpeg) \
    +		$(if $(CONFIG_PACKAGE_ffserver),,--disable-ffserver) \
    +		$(if $(CONFIG_FFMPEG_IPV6),,--disable-ipv6) \
    +		\
    +		--disable-bsfs \
    +		--disable-devices \
    +		--disable-encoders \
    +		$(FFMPEG_CONFIGURE_ENCODERS) \
    +		--disable-decoders \
    +		$(FFMPEG_CONFIGURE_DECODERS) \
    +		--disable-muxers \
    +		$(FFMPEG_CONFIGURE_MUXERS) \
    +		--disable-demuxers \
    +		$(FFMPEG_CONFIGURE_DEMUXERS) \
    +		--disable-parsers \
    +		$(FFMPEG_CONFIGURE_PARSERS) \
    +		--disable-protocols \
    +		$(FFMPEG_CONFIGURE_PROTOCOLS) \
    +	)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libav{codec,device,format,util} $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libpostproc $(1)/usr/include/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/libswscale $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libav{codec,device,format,util}.{a,so*} $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.{a,so*} $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libswscale.{a,so*} $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libav{codec,device,format,util}.pc $(1)/usr/lib/pkgconfig/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpostproc.pc $(1)/usr/lib/pkgconfig/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libswscale.pc $(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/ffmpeg/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/ffmpeg $(1)/usr/bin/
    +endef
    +
    +define Package/ffserver/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/ffserver $(1)/usr/bin/
    +endef
    +
    +define Package/libffmpeg/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libav{codec,device,format,util}.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/libpostproc/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.so.* $(1)/usr/lib/
    +endef
    +
    +define Package/libswscale/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libswscale.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,ffmpeg))
    +$(eval $(call BuildPackage,ffserver))
    +$(eval $(call BuildPackage,libffmpeg))
    +$(eval $(call BuildPackage,libpostproc))
    +$(eval $(call BuildPackage,libswscale))
    diff --git a/multimedia/ffmpeg/patches/901-fix_libswscale_on_x86.patch b/multimedia/ffmpeg/patches/901-fix_libswscale_on_x86.patch
    new file mode 100644
    index 0000000..2fcee2f
    --- /dev/null
    +++ b/multimedia/ffmpeg/patches/901-fix_libswscale_on_x86.patch
    @@ -0,0 +1,35 @@
    +Index: ffmpeg-0.5.4/libswscale/rgb2rgb.c
    +===================================================================
    +--- ffmpeg-0.5.4.orig/libswscale/rgb2rgb.c	2011-03-17 13:10:27.000000000 +0100
    ++++ ffmpeg-0.5.4/libswscale/rgb2rgb.c	2011-10-10 03:35:15.000000000 +0200
    +@@ -149,7 +149,7 @@
    + #define RENAME(a) a ## _C
    + #include "rgb2rgb_template.c"
    + 
    +-#if ARCH_X86 && CONFIG_GPL
    ++#if ARCH_X86 && CONFIG_GPL && 0
    + 
    + //MMX versions
    + #undef RENAME
    +Index: ffmpeg-0.5.4/libswscale/swscale_template.c
    +===================================================================
    +--- ffmpeg-0.5.4.orig/libswscale/swscale_template.c	2011-10-10 03:33:19.000000000 +0200
    ++++ ffmpeg-0.5.4/libswscale/swscale_template.c	2011-10-10 03:38:37.000000000 +0200
    +@@ -2219,7 +2219,7 @@
    +     }
    +     else // fast bilinear upscale / crap downscale
    +     {
    +-#if ARCH_X86 && CONFIG_GPL
    ++#if ARCH_X86 && CONFIG_GPL && 0
    + #if HAVE_MMX2
    +         int i;
    + #if defined(PIC)
    +@@ -2492,7 +2492,7 @@
    +     }
    +     else // fast bilinear upscale / crap downscale
    +     {
    +-#if ARCH_X86 && CONFIG_GPL
    ++#if ARCH_X86 && CONFIG_GPL && 0
    + #if HAVE_MMX2
    +         int i;
    + #if defined(PIC)
    diff --git a/multimedia/fswebcam/Makefile b/multimedia/fswebcam/Makefile
    new file mode 100644
    index 0000000..cfd9201
    --- /dev/null
    +++ b/multimedia/fswebcam/Makefile
    @@ -0,0 +1,45 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=fswebcam
    +PKG_VERSION:=20100405
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.sanslogic.co.uk/fswebcam/files/
    +PKG_MD5SUM:=1ca864c8cef096fb4ace71cf14085424
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/fswebcam
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  TITLE:=fswebcam
    +  URL:=http://www.sanslogic.co.uk/fswebcam/
    +  DEPENDS:= @!LINUX_2_4 +libgd
    +endef
    +
    +define Package/fswebcam/description
    +  fswebcam is a neat and simple webcam app. It captures images from a V4L1/V4L2 compatible
    +  device or file, averages them to reduce noise and draws a caption using the GD Graphics
    +  Library which also handles compressing the image to PNG or JPEG. The resulting image
    +  is saved to a file or sent to stdio where it can be piped to something like ncftpput or scp.
    +endef
    +
    +EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
    +EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
    +
    +define Package/fswebcam/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/fswebcam $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,fswebcam))
    diff --git a/multimedia/ftpd-topfield/Makefile b/multimedia/ftpd-topfield/Makefile
    new file mode 100644
    index 0000000..6259d4d
    --- /dev/null
    +++ b/multimedia/ftpd-topfield/Makefile
    @@ -0,0 +1,38 @@
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ftpd-topfield
    +PKG_VERSION:=0.7.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/puppy
    +PKG_MD5SUM:=4a29f04fd41aaa5890e2f202d936e270
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/ftpd-topfield
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  DEPENDS:=@USB_SUPPORT +libusb
    +  TITLE:=Topfield PVR access via FTP
    +  URL:=http://puppy.sourceforge.net/
    +endef
    +
    +define Package/ftpd-topfield/description
    +FTP server to export the filesystem of a connected Topfield PVR
    +endef
    +
    +define Build/Configure
    +endef
    +
    +define Package/ftpd-topfield/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ftpd $(1)/usr/sbin/ftpd-topfield
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/ftpd-topfield.sh $(1)/etc/init.d/ftpd-topfield
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_DATA) ./files/ftpd-topfield.conf $(1)/etc/config/ftpd-topfield
    +endef
    +
    +$(eval $(call BuildPackage,ftpd-topfield))
    diff --git a/multimedia/ftpd-topfield/files/ftpd-topfield.conf b/multimedia/ftpd-topfield/files/ftpd-topfield.conf
    new file mode 100644
    index 0000000..ec5ef2e
    --- /dev/null
    +++ b/multimedia/ftpd-topfield/files/ftpd-topfield.conf
    @@ -0,0 +1,4 @@
    +config 'ftpd-topfield'
    +	option 'port' '21'
    +	option 'turbo' 'disabled'
    +	option 'elpf' 'disabled'
    diff --git a/multimedia/ftpd-topfield/files/ftpd-topfield.sh b/multimedia/ftpd-topfield/files/ftpd-topfield.sh
    new file mode 100644
    index 0000000..27c4825
    --- /dev/null
    +++ b/multimedia/ftpd-topfield/files/ftpd-topfield.sh
    @@ -0,0 +1,35 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +
    +START=50
    +
    +config_cb() {
    +	local cfg="$CONFIG_SECTION"
    +	local cfgt
    +	config_get cfgt "$cfg" TYPE
    +
    +	case "$cfgt" in
    +		ftpd-topfield)
    +			config_get turbo $cfg turbo
    +			config_get port $cfg port
    +			config_get elpf $cfg elpf
    +
    +			case "$turbo" in
    +				yes|on|enabled|1) turbo=1;;
    +			esac
    +			case "$elpf" in
    +				yes|on|enabled|1) elpf=1;;
    +			esac
    +			TOPFIELD_ARGS="-D ${turbo:+--turbo }${port:+-P $port }${elpf:+-E}"
    +		;;
    +	esac
    +}
    +                                                                                                                                                                                                            
    +start() {
    +	config_load ftpd-topfield
    +	/usr/sbin/ftpd-topfield $TOPFIELD_ARGS 
    +}
    +  
    +stop() {
    +    killall ftpd-topfield
    +}
    diff --git a/multimedia/ftpd-topfield/patches/001-kernel_header_rename.patch b/multimedia/ftpd-topfield/patches/001-kernel_header_rename.patch
    new file mode 100644
    index 0000000..dedfbba
    --- /dev/null
    +++ b/multimedia/ftpd-topfield/patches/001-kernel_header_rename.patch
    @@ -0,0 +1,14 @@
    +diff -up ftpd-topfield-0.7.4/libtopfield/usb_io.h.orig ftpd-topfield-0.7.4/libtopfield/usb_io.h
    +--- ftpd-topfield-0.7.4/libtopfield/usb_io.h.orig	2008-11-24 10:19:56.000000000 +0100
    ++++ ftpd-topfield-0.7.4/libtopfield/usb_io.h	2008-11-24 10:22:27.000000000 +0100
    +@@ -35,7 +35,9 @@
    + #include 
    + 
    + /* linux/usb_ch9.h wasn't separated out until 2.4.23 */
    +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,23)
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
    ++#include 
    ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,23)
    + #include 
    + #else
    + #include 
    diff --git a/multimedia/gmediaserver/Makefile b/multimedia/gmediaserver/Makefile
    new file mode 100644
    index 0000000..926edeb
    --- /dev/null
    +++ b/multimedia/gmediaserver/Makefile
    @@ -0,0 +1,63 @@
    +#
    +# Copyright (C) 2007 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gmediaserver
    +PKG_VERSION:=0.13.0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://savannah.nongnu.org/download/gmediaserver/
    +PKG_MD5SUM:=c422de386331e2a1a859d45f6fa270a3
    +
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/gmediaserver
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  DEPENDS:=+id3lib +libmagic +file +libupnp +libuuid +uclibcxx +zlib $(ICONV_DEPENDS)
    +  TITLE:=An UPnP music media server
    +  URL:=http://www.nongnu.org/gmediaserver/
    +endef
    +
    +define Package/gmediaserver/description
    + GMediaServer is a server for UPnP media players like the
    + Netgear MP101, Linksys WMLS11B etc. It exports one or more
    + directories using the UPnP protocol so the mediaserver can
    + browse through them and play audio or video files.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--disable-rpath \
    +	--enable-threads=posix \
    +	--with-libiconv-prefix="$(ICONV_PREFIX)" \
    +	--without-libintl-prefix \
    +	--with-id3lib="$(STAGING_DIR)/usr" \
    +	--with-libupnp="$(STAGING_DIR)/usr" \
    +	, \
    +	LIBS=" -luClibc++ -lz" \
    +
    +MAKE_FLAGS += \
    +	AR="$(TARGET_CROSS)ar" \
    +	LTLIBICONV="" \
    +	DESTDIR="$(PKG_INSTALL_DIR)"
    +
    +define Package/gmediaserver/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
    +endef
    +
    +$(eval $(call BuildPackage,gmediaserver))
    diff --git a/multimedia/gmediaserver/files/gmediaserver.config b/multimedia/gmediaserver/files/gmediaserver.config
    new file mode 100644
    index 0000000..ba1fc9f
    --- /dev/null
    +++ b/multimedia/gmediaserver/files/gmediaserver.config
    @@ -0,0 +1,3 @@
    +config gmediaserver
    +	option content_directory '/tmp'
    +	option interface         'br-lan'
    diff --git a/multimedia/gmediaserver/files/gmediaserver.init b/multimedia/gmediaserver/files/gmediaserver.init
    new file mode 100644
    index 0000000..4fc6067
    --- /dev/null
    +++ b/multimedia/gmediaserver/files/gmediaserver.init
    @@ -0,0 +1,27 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +BIN=gmediaserver
    +DEFAULT=/etc/default/$BIN
    +RUN_D=/var/run
    +PID_F=$RUN_D/$BIN.pid
    +
    +start() {
    +	mkdir -p $RUN_D
    +	config_load gmediaserver
    +	config_foreach start_service gmediaserver
    +}
    +
    +start_service() {
    +	local cfg="$1"
    +	config_get content_directory "$cfg" content_directory
    +	config_get interface         "$cfg" interface
    +
    +	$BIN --background --interface=${interface:-br-lan} --pid-file=$PID_F ${content_directory:-/tmp}
    +}
    +
    +stop() {
    +	[ -f $PID_F ] && kill $(cat $PID_F)
    +}
    +
    diff --git a/multimedia/gmediaserver/patches/010-compile-fixes.patch b/multimedia/gmediaserver/patches/010-compile-fixes.patch
    new file mode 100644
    index 0000000..3a11500
    --- /dev/null
    +++ b/multimedia/gmediaserver/patches/010-compile-fixes.patch
    @@ -0,0 +1,144 @@
    +--- a/src/upnp.c
    ++++ b/src/upnp.c
    +@@ -36,6 +36,7 @@
    + #include 
    + #include "intutil.h"
    + #include "gmediaserver.h"
    ++#include "webserver.h"
    + #include "schemas/MediaServer.h"
    + 
    + #define GMEDIASERVER_SSDP_PAUSE 100
    +@@ -265,7 +266,7 @@ handle_get_var_request(struct Upnp_State
    +     say(3, _("Event device UDN: %s\n"), quotearg(request->DevUDN));
    +     say(3, _("Event service ID: %s\n"), quotearg(request->ServiceID));
    +     say(3, _("Event variable name: %s\n"), quotearg(request->StateVarName));
    +-    say(3, _("Event source: %s\n"), inet_ntoa(request->CtrlPtIPAddr));
    ++    say(3, _("Event source: %s\n"), inet_ntoa((*(struct sockaddr_in *)&request->CtrlPtIPAddr).sin_addr));
    + 
    +     if (strcmp(request->DevUDN, device_udn) != 0) {
    +         say(1, _("Discarding event - event device UDN (%s) not recognized\n"), quotearg(request->DevUDN));
    +@@ -306,7 +307,7 @@ handle_action_request(struct Upnp_Action
    +     say(3, _("Event device UDN: %s\n"), quotearg(request->DevUDN));
    +     say(3, _("Event service ID: %s\n"), quotearg(request->ServiceID));
    +     say(3, _("Event action name: %s\n"), quotearg(request->ActionName));
    +-    say(3, _("Event source: %s\n"), inet_ntoa(request->CtrlPtIPAddr));
    ++    say(3, _("Event source: %s\n"), inet_ntoa((*(struct sockaddr_in *)&request->CtrlPtIPAddr).sin_addr));
    +     say_document(4, _("Event action request:\n"), request->ActionRequest);
    + 
    +     if (strcmp(request->DevUDN, device_udn) != 0) {
    +@@ -502,9 +503,24 @@ init_upnp(const char *listenip, uint16_t
    +     res = UpnpEnableWebserver(TRUE);
    +     if (res != UPNP_E_SUCCESS)
    +         die(_("cannot enable UPnP web server - %s\n"), upnp_errmsg(res));
    +-    res = UpnpSetVirtualDirCallbacks(&virtual_dir_callbacks);
    +-    if (res != UPNP_E_SUCCESS)
    +-        die(_("cannot set virtual directory callbacks - %s\n"), upnp_errmsg(res));
    ++
    ++#define upnp_set_callback(cb, func) \
    ++	do {															\
    ++		res = UpnpVirtualDir_set_##cb##Callback(func);				\
    ++		if (res != UPNP_E_SUCCESS)									\
    ++		{															\
    ++			die(_("cannot set virtual directory callbacks - %s\n"), \
    ++				upnp_errmsg(res));									\
    ++		}															\
    ++	} while(0)
    ++
    ++	upnp_set_callback(GetInfo, webserver_get_info);
    ++	upnp_set_callback(Open,    webserver_open);
    ++	upnp_set_callback(Read,    webserver_read);
    ++	upnp_set_callback(Seek,    webserver_seek);
    ++	upnp_set_callback(Write,   webserver_write);
    ++	upnp_set_callback(Close,   webserver_close);
    ++
    +     res = UpnpAddVirtualDir("/files");
    +     if (res != UPNP_E_SUCCESS)
    +         die(_("cannot add virtual directory for web server - %s\n"), upnp_errmsg(res));
    +--- a/src/webserver.c
    ++++ b/src/webserver.c
    +@@ -83,7 +83,7 @@ get_entry_from_url(const char *filename)
    +     return get_entry_by_id(id);
    + }
    + 
    +-static int
    ++int
    + webserver_get_info(const char *filename, struct File_Info *info)
    + {
    +     Entry *entry;
    +@@ -180,7 +180,7 @@ webserver_get_info(const char *filename,
    +     return -1;
    + }
    + 
    +-static UpnpWebFileHandle
    ++UpnpWebFileHandle
    + webserver_open(const char *filename, enum UpnpOpenFileMode mode)
    + {
    +     Entry *entry;
    +@@ -277,7 +277,7 @@ webserver_open(const char *filename, enu
    +     return NULL;
    + }
    + 
    +-static int
    ++int
    + webserver_read(UpnpWebFileHandle fh, char *buf, size_t buflen)
    + {
    +     WebServerFile *file = (WebServerFile *) fh;
    +@@ -307,7 +307,7 @@ webserver_read(UpnpWebFileHandle fh, cha
    +     return len;
    + }
    + 
    +-static int
    ++int
    + webserver_write(UpnpWebFileHandle fh, char *buf, size_t buflen)
    + {
    +     WebServerFile *file = (WebServerFile *) fh;
    +@@ -317,7 +317,7 @@ webserver_write(UpnpWebFileHandle fh, ch
    +     return -1;
    + }
    + 
    +-static int
    ++int
    + webserver_seek(UpnpWebFileHandle fh, off_t offset, int origin)
    + {
    +     WebServerFile *file = (WebServerFile *) fh;
    +@@ -396,7 +396,7 @@ webserver_seek(UpnpWebFileHandle fh, off
    +     return 0;
    + }
    + 
    +-static int
    ++int
    + webserver_close(UpnpWebFileHandle fh)
    + {
    +     WebServerFile *file = (WebServerFile *) fh;
    +@@ -419,12 +419,3 @@ webserver_close(UpnpWebFileHandle fh)
    + 
    +     return 0;
    + }
    +-
    +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks = {
    +-    webserver_get_info,
    +-    webserver_open,
    +-    webserver_read,
    +-    webserver_write,
    +-    webserver_seek,
    +-    webserver_close
    +-};
    +--- /dev/null
    ++++ b/src/webserver.h
    +@@ -0,0 +1,6 @@
    ++int webserver_get_info(const char *filename, struct File_Info *info);
    ++UpnpWebFileHandle webserver_open(const char *filename, enum UpnpOpenFileMode mode);
    ++int webserver_read(UpnpWebFileHandle fh, char *buf, size_t buflen);
    ++int webserver_write(UpnpWebFileHandle fh, char *buf, size_t buflen);
    ++int webserver_seek(UpnpWebFileHandle fh, off_t offset, int origin);
    ++int webserver_close(UpnpWebFileHandle fh);
    +--- a/src/contentdir.c
    ++++ b/src/contentdir.c
    +@@ -22,6 +22,7 @@
    + #include 		/* Gnulib/C99 */
    + #include 		/* ? */
    + #include 		/* POSIX */
    ++#include 
    + #include "gettext.h"		/* Gnulib/gettext */
    + #define _(s) gettext(s)
    + #define N_(s) gettext_noop(s)
    diff --git a/multimedia/gphoto2/Makefile b/multimedia/gphoto2/Makefile
    new file mode 100644
    index 0000000..0063a5a
    --- /dev/null
    +++ b/multimedia/gphoto2/Makefile
    @@ -0,0 +1,53 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gphoto2
    +PKG_VERSION:=2.4.9
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/gphoto
    +PKG_MD5SUM:=a08a93a425cde03ca8f9bade83bbd26a
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/gphoto2
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  TITLE:=Gphoto Digital Camera Control
    +  URL:=http://www.gphoto.org/
    +  DEPENDS:=+libgphoto2 +libpopt +libpthread
    +endef
    +
    +define Package/gphoto2/description
    + For downloading and controlling digital cameras
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--without-aalib \
    +	--without-libiconv-prefix \
    +	--without-libintl-prefix \
    +
    +CONFIGURE_VARS += \
    +	LIBGPHOTO2_CFLAGS="$$$$CFLAGS -I$(STAGING_DIR)/usr/include/gphoto2 $$$$CPPFLAGS" \
    +	LIBGPHOTO2_LIBS="$$$$LDFLAGS -lgphoto2 -lgphoto2_port -lltdl" \
    +	LIBEXIF_CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \
    +	LIBEXIF_LIBS="$$$$LDFLAGS -lexif" \
    +	POPT_CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \
    +	POPT_LIBS="$$$$LDFLAGS -lpopt" \
    +
    +define Package/gphoto2/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,gphoto2))
    diff --git a/multimedia/gphoto2/patches/001-automake-compat.patch b/multimedia/gphoto2/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..89cad74
    --- /dev/null
    +++ b/multimedia/gphoto2/patches/001-automake-compat.patch
    @@ -0,0 +1,10 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -66,7 +66,6 @@ GP_GETTEXT_HACK([],[Lutz Müller and oth
    + ALL_LINGUAS="az cs da de en_GB es eu fi fr hu id it ja nl pa pl pt_BR ro ru rw sk sr sv uk vi zh_CN zh_TW"
    + AM_GNU_GETTEXT_VERSION([0.14.1])
    + AM_GNU_GETTEXT([external])
    +-AM_PO_SUBDIRS()
    + AM_ICONV()
    + GP_GETTEXT_FLAGS()
    + 
    diff --git a/multimedia/gphoto2/patches/002-disable-docs-translations.patch b/multimedia/gphoto2/patches/002-disable-docs-translations.patch
    new file mode 100644
    index 0000000..6431b48
    --- /dev/null
    +++ b/multimedia/gphoto2/patches/002-disable-docs-translations.patch
    @@ -0,0 +1,45 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -62,12 +62,7 @@ GP_REFERENCES()dnl
    + dnl ---------------------------------------------------------------------------
    + dnl i18n support
    + dnl ---------------------------------------------------------------------------
    +-GP_GETTEXT_HACK([],[Lutz Müller and others],[${MAIL_GPHOTO_TRANSLATION}])
    +-ALL_LINGUAS="az cs da de en_GB es eu fi fr hu id it ja nl pa pl pt_BR ro ru rw sk sr sv uk vi zh_CN zh_TW"
    +-AM_GNU_GETTEXT_VERSION([0.14.1])
    +-AM_GNU_GETTEXT([external])
    + AM_ICONV()
    +-GP_GETTEXT_FLAGS()
    + 
    + dnl We cannot use AC_DEFINE_UNQUOTED() for these definitions, as
    + dnl we require make to do insert the proper $(datadir) value
    +@@ -352,11 +347,9 @@ AC_SUBST([AM_LDFLAGS])
    + # Create output files
    + # ---------------------------------------------------------------------------
    + AC_CONFIG_FILES([
    +-po/Makefile.in 
    + Makefile
    + gphoto2/Makefile
    + m4m/Makefile
    +-doc/Makefile
    + contrib/Makefile
    + packaging/Makefile
    + packaging/rpm/Makefile
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -1,3 +1,3 @@
    +-SUBDIRS = m4m contrib doc gphoto2 packaging po
    ++SUBDIRS = m4m contrib gphoto2 packaging
    + 
    + ACLOCAL_AMFLAGS = -I auto-m4 -I m4m
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -238,7 +238,7 @@ sysconfdir = @sysconfdir@
    + target_alias = @target_alias@
    + top_builddir = @top_builddir@
    + top_srcdir = @top_srcdir@
    +-SUBDIRS = m4m contrib doc gphoto2 packaging po
    ++SUBDIRS = m4m contrib gphoto2 packaging
    + ACLOCAL_AMFLAGS = -I auto-m4 -I m4m
    + all: config.h
    + 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
    diff --git a/multimedia/gphoto2/patches/100-gpdebug.patch b/multimedia/gphoto2/patches/100-gpdebug.patch
    new file mode 100644
    index 0000000..177fc09
    --- /dev/null
    +++ b/multimedia/gphoto2/patches/100-gpdebug.patch
    @@ -0,0 +1,11 @@
    +--- a/gphoto2/foreach.c
    ++++ b/gphoto2/foreach.c
    +@@ -31,6 +31,8 @@
    + 
    + #include 
    + 
    ++#define GP_DEBUG (void)
    ++
    + #define GP_ERROR_FRONTEND_BAD_ID -10000
    + #define CR(result) {int __r=(result); if(__r<0) return(__r);}
    + #define CL(result,list) {int __r=(result); if(__r<0) {gp_list_free(list);return(__r);}}
    diff --git a/multimedia/graphicsmagick/Makefile b/multimedia/graphicsmagick/Makefile
    new file mode 100644
    index 0000000..4d7e07e
    --- /dev/null
    +++ b/multimedia/graphicsmagick/Makefile
    @@ -0,0 +1,97 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=GraphicsMagick
    +PKG_VERSION:=1.3.8
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/graphicsmagick
    +PKG_MD5SUM:=c0428886ea07736b0f1872d256ab7ebd
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +export PATH:=$(PKG_BUILD_DIR)/bin:$(TARGET_PATH)
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +define Package/GraphicsMagick/Default
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  TITLE:=GraphicsMagick
    +  URL:=http://www.graphicsmagick.org/
    +endef
    +
    +define Package/GraphicsMagick
    +  $(call Package/GraphicsMagick/Default)
    +endef
    +
    +define Package/GraphicsMagick/description
    +  An image manipulation library.
    +endef
    +
    +define Package/GraphicsMagick-jpeg
    +  $(call Package/GraphicsMagick/Default)
    +  TITLE+= (jpeg)
    +  DEPENDS:=+GraphicsMagick +libjpeg +zlib
    +endef
    +
    +define Package/GraphicsMagick-jpeg/description
    +  GraphicsMagick JPEG module
    +endef
    +
    +CONFIGURE_ARGS += \
    +	  --with-modules \
    +	  --enable-shared \
    +	  --enable-static \
    +	  --without-xml \
    +	  --without-x \
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/GraphicsMagick/magick
    +	$(INSTALL_DIR) $(1)/usr/include/GraphicsMagick/wand
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/* \
    +		$(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/GraphicsMagick/install
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
    +		$(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/share/GraphicsMagick-$(PKG_VERSION)
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/share/GraphicsMagick-$(PKG_VERSION)/* \
    +		$(1)/usr/share/GraphicsMagick-$(PKG_VERSION)
    +endef
    +
    +define BuildPlugin
    +  define Package/GraphicsMagick-$(1)/install
    +	$(INSTALL_DIR) $$(1)/usr/lib/GraphicsMagick-$(PKG_VERSION)/modules-Q8/coders
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/GraphicsMagick-$(PKG_VERSION)/modules-Q8/coders/$(1).{so,la} \
    +		$$(1)/usr/lib/GraphicsMagick-$(PKG_VERSION)/modules-Q8/coders
    +  endef
    +
    +  $$(eval $$(call BuildPackage,GraphicsMagick-$(1)))
    +endef
    +
    +$(eval $(call BuildPackage,GraphicsMagick))
    +$(eval $(call BuildPlugin,jpeg))
    diff --git a/multimedia/gst-ffmpeg/Config.in b/multimedia/gst-ffmpeg/Config.in
    new file mode 100644
    index 0000000..9f579c7
    --- /dev/null
    +++ b/multimedia/gst-ffmpeg/Config.in
    @@ -0,0 +1,269 @@
    +menu "Configuration"
    +	depends PACKAGE_gst-ffmpeg
    +
    +config GST_FFMPEG_IPV6
    +	bool "Enable IPv6"
    +	default IPV6
    +
    +config GST_FFMPEG_PATENTED
    +	bool "Include patented codecs and technologies"
    +	default BUILD_PATENTED
    +
    +config GET_FFMPEG_LIBDLNA_SUPPORT
    +	bool "Include support for libdlna/ushare"
    +	depends GST_FFMPEG_PATENTED
    +	select GST_FFMPEG_DECODER_ac3
    +	select GST_FFMPEG_DECODER_atrac3
    +	select GST_FFMPEG_DECODER_h264
    +	select GST_FFMPEG_DECODER_jpegls
    +	select GST_FFMPEG_DECODER_mp3
    +	select GST_FFMPEG_DECODER_mpeg1video
    +	select GST_FFMPEG_DECODER_mpeg2video
    +	select GST_FFMPEG_DECODER_mpeg4
    +	select GST_FFMPEG_DECODER_mpeg4aac
    +	select GST_FFMPEG_DECODER_mpegvideo
    +	select GST_FFMPEG_DECODER_wmav1
    +	select GST_FFMPEG_DECODER_wmav2
    +	select GST_FFMPEG_DECODER_png
    +	select GST_FFMPEG_DEMUXER_ac3
    +	select GST_FFMPEG_DEMUXER_h264
    +	select GST_FFMPEG_DEMUXER_mp3
    +	select GST_FFMPEG_DEMUXER_mpegvideo
    +
    +comment "Encoders ---"
    +
    +config GST_FFMPEG_ENCODER_ac3
    +	bool "AC3"
    +	depends GST_FFMPEG_PATENTED
    +	select GST_FFMPEG_PARSER_ac3
    +
    +config GST_FFMPEG_ENCODER_jpegls
    +	bool "JPEG-LS"
    +
    +config GST_FFMPEG_ENCODER_mpeg1video
    +	bool "MPEG-1 Video"
    +
    +config GST_FFMPEG_ENCODER_mpeg2video
    +	bool "MPEG-2 Video"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_ENCODER_mpeg4
    +	bool "MPEG-4"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_ENCODER_pcm_s16be
    +	bool "PCM signed 16-bit big-endian"
    +
    +config GST_FFMPEG_ENCODER_pcm_s16le
    +	bool "PCM signed 16-bit little-endian"
    +
    +config GST_FFMPEG_ENCODER_png
    +	bool "PNG"
    +	select GST_FFMPEG_ENCODER_zlib
    +
    +config GST_FFMPEG_ENCODER_vorbis
    +	bool "Vorbis"
    +
    +config GST_FFMPEG_ENCODER_zlib
    +	bool "Zlib"
    +
    +comment "Decoders ---"
    +
    +config GST_FFMPEG_DECODER_aac
    +	bool "AAC (Advanced Audio Coding)"
    +	depends GST_FFMPEG_PATENTED
    +	select GST_FFMPEG_PARSER_aac
    +
    +config GST_FFMPEG_DECODER_ac3
    +	bool "AC3"
    +	depends GST_FFMPEG_PATENTED
    +	select GST_FFMPEG_PARSER_ac3
    +
    +config GST_FFMPEG_DECODER_atrac3
    +	bool "ATRAC3"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_DECODER_gif
    +	bool "GIF"
    +
    +config GST_FFMPEG_DECODER_h264
    +	bool "H.264"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_DECODER_jpegls
    +	bool "JPEG-LS"
    +
    +config GST_FFMPEG_DECODER_mp2
    +	bool "MP2 (MPEG Audio Layer 2)"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_DECODER_mp3
    +	bool "MP3 (MPEG Audio Layer 2)"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_DECODER_mpegvideo
    +	bool "MPEG Video"
    +
    +config GST_FFMPEG_DECODER_mpeg1video
    +	bool "MPEG-1 Video"
    +
    +config GST_FFMPEG_DECODER_mpeg2video
    +	bool "MPEG-2 Video"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_DECODER_mpeg4
    +	bool "MPEG-4"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_DECODER_mpeg4aac
    +	bool "MPEG-4 (AAC)"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_DECODER_pcm_s16be
    +	bool "PCM signed 16-bit big-endian"
    +
    +config GST_FFMPEG_DECODER_pcm_s16le
    +	bool "PCM signed 16-bit little-endian"
    +
    +config GST_FFMPEG_DECODER_png
    +	bool "PNG"
    +	select GST_FFMPEG_DECODER_zlib
    +
    +config GST_FFMPEG_DECODER_vorbis
    +	bool "Vorbis"
    +
    +config GST_FFMPEG_DECODER_wmav1
    +	bool "WMAv1"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_DECODER_wmav2
    +	bool "WMAv2"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_DECODER_zlib
    +	bool "Zlib"
    +
    +comment "Muxers ---"
    +
    +config GST_FFMPEG_MUXER_ac3
    +	bool "AC3"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_MUXER_ffm
    +	bool "FFM (ffserver live feed)"
    +
    +config GST_FFMPEG_MUXER_h264
    +	bool "H.264"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_MUXER_mp3
    +	bool "MP3 (MPEG Audio Layer 3)"
    +
    +config GST_FFMPEG_MUXER_mp4
    +	bool "MP4"
    +
    +config GST_FFMPEG_MUXER_mpeg1video
    +	bool "MPEG-1 Video"
    +
    +config GST_FFMPEG_MUXER_mpeg2video
    +	bool "MPEG-2 Video"
    +
    +config GST_FFMPEG_MUXER_mpegts
    +	bool "MPEG-2 (TS)"
    +
    +config GST_FFMPEG_MUXER_ogg
    +	bool "Ogg"
    +
    +config GST_FFMPEG_MUXER_oss
    +	bool "OSS (Open Sound System playback)"
    +
    +config GST_FFMPEG_MUXER_rtp
    +	bool "RTP"
    +
    +comment "Demuxers ---"
    +
    +config GST_FFMPEG_DEMUXER_ac3
    +	bool "AC3"
    +
    +config GST_FFMPEG_DEMUXER_ffm
    +	bool "FFM (ffserver live feed)"
    +
    +config GST_FFMPEG_DEMUXER_h264
    +	bool "H.264"
    +	depends FFMPEG_PATENTED
    +
    +config GST_FFMPEG_DEMUXER_mp3
    +	bool "MP3 (MPEG Audio Layer 3)"
    +
    +config GST_FFMPEG_DEMUXER_mpegvideo
    +	bool "MPEG Video"
    +
    +config GST_FFMPEG_DEMUXER_mpegps
    +	bool "MPEG-2 (PS)"
    +
    +config GST_FFMPEG_DEMUXER_mpegts
    +	bool "MPEG-2 (TS)"
    +
    +config GST_FFMPEG_DEMUXER_ogg
    +	bool "Ogg"
    +
    +config GST_FFMPEG_DEMUXER_rm
    +	bool "RM"
    +	help
    +	  RealMedia format demuxer
    +
    +config GST_FFMPEG_DEMUXER_rtsp
    +	bool "RTSP"
    +	select GST_FFMPEG_DEMUXER_rm
    +	select GST_FFMPEG_DEMUXER_sdp
    +
    +config GST_FFMPEG_DEMUXER_sdp
    +	bool "SDP"
    +	select GST_FFMPEG_DEMUXER_mpegts
    +
    +comment "Parsers ---"
    +
    +config GST_FFMPEG_PARSER_aac
    +	bool "AAC (Advanced Audio Coding)"
    +	depends GST_FFMPEG_PATENTED
    +
    +config GST_FFMPEG_PARSER_ac3
    +	bool "AC3"
    +
    +config GST_FFMPEG_PARSER_h264
    +	bool "H.264"
    +	depends GST_FFMPEG_PATENTED
    +	select GST_FFMPEG_DECODER_h264
    +
    +config GST_FFMPEG_PARSER_mpegaudio
    +	bool "MPEG Audio"
    +
    +config GST_FFMPEG_PARSER_mpegvideo
    +	bool "MPEG Video"
    +
    +config GST_FFMPEG_PARSER_mpeg4video
    +	bool "MPEG-4 Video"
    +
    +comment "Protocols ---"
    +
    +config GST_FFMPEG_PROTOCOL_file
    +	bool "file:"
    +
    +config GST_FFMPEG_PROTOCOL_http
    +	bool "http:"
    +
    +config GST_FFMPEG_PROTOCOL_pipe
    +	bool "pipe:"
    +
    +config GST_FFMPEG_PROTOCOL_rtp
    +	bool "rtp:"
    +	select GST_FFMPEG_PROTOCOL_udp
    +
    +config GST_FFMPEG_PROTOCOL_tcp
    +	bool "tcp:"
    +
    +config GST_FFMPEG_PROTOCOL_udp
    +	bool "udp:"
    +
    +endmenu
    +
    diff --git a/multimedia/gst-ffmpeg/Makefile b/multimedia/gst-ffmpeg/Makefile
    new file mode 100644
    index 0000000..3d6841a
    --- /dev/null
    +++ b/multimedia/gst-ffmpeg/Makefile
    @@ -0,0 +1,170 @@
    +# 
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gst-ffmpeg
    +PKG_RELEASE:=1
    +PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-ffmpeg
    +PKG_VERSION:=0.10.11
    +PKG_MD5SUM:=0d23197ba7ac06ea34fa66d38469ebe5
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +
    +PKG_FIXUP:=autoreconf
    +PKG_INSTALL:=1
    +
    +FFMPEG_ENCODERS:= \
    +	ac3 \
    +	jpegls \
    +	mpeg1video \
    +	mpeg2video \
    +	mpeg4 \
    +	pcm_s16be \
    +	pcm_s16le \
    +	png \
    +	vorbis \
    +	zlib \
    +
    +FFMPEG_DECODERS:= \
    +	aac \
    +	ac3 \
    +	atrac3 \
    +	gif \
    +	h264 \
    +	jpegls \
    +	mp2 \
    +	mp3 \
    +	mpeg1video \
    +	mpeg2video \
    +	mpeg4 \
    +	mpeg4aac \
    +	mpegvideo \
    +	pcm_s16be \
    +	pcm_s16le \
    +	png \
    +	vorbis \
    +	wmav1 \
    +	wmav2 \
    +	zlib \
    +
    +FFMPEG_MUXERS:= \
    +	ac3 \
    +	ffm \
    +	h264 \
    +	mp3 \
    +	mp4 \
    +	mpeg1video \
    +	mpeg2video \
    +	mpegts \
    +	ogg \
    +	oss \
    +	rtp \
    +
    +FFMPEG_DEMUXERS:= \
    +	ac3 \
    +	ffm \
    +	h264 \
    +	mp3 \
    +	mpegps \
    +	mpegts \
    +	mpegvideo \
    +	ogg \
    +	rm \
    +	rtsp \
    +	sdp \
    +	v4l2 \
    +
    +FFMPEG_PARSERS:= \
    +	aac \
    +	ac3 \
    +	h264 \
    +	mpegaudio \
    +	mpegvideo \
    +	mpeg4video \
    +
    +FFMPEG_PROTOCOLS:= \
    +	file http pipe rtp tcp udp
    +
    +PKG_CONFIG_DEPENDS:= \
    +	$(patsubst %,CONFIG_GST_FFMPEG_ENCODER_%,$(FFMPEG_ENCODERS)) \
    +	$(patsubst %,CONFIG_GST_FFMPEG_DECODER_%,$(FFMPEG_DECODERS)) \
    +	$(patsubst %,CONFIG_GST_FFMPEG_MUXER_%,$(FFMPEG_DEMUXERS)) \
    +	$(patsubst %,CONFIG_GST_FFMPEG_DEMUXER_%,$(FFMPEG_DEMUXERS)) \
    +	$(patsubst %,CONFIG_GST_FFMPEG_PARSER_%,$(FFMPEG_PARSERS)) \
    +	$(patsubst %,CONFIG_GST_FFMPEG_PROTOCOL_%,$(FFMPEG_PROTOCOLS))
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/gst-ffmpeg
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  TITLE:=GStreamer ffmpeg bindings
    +  URL:=http://www.gstreamer.net/modules/gst-ffmpeg.html
    +  MAINTAINER:=Okkel Klaver 
    +  DEPENDS:= +libgstreamer +gst-mod-alsa
    +endef
    +
    +define Package/gst-ffmpeg/description
    +  GStreamer ffmpeg bindings
    +endef
    +
    +define Package/gst-ffmpeg/config
    +source "$(SOURCE)/Config.in"
    +endef
    +
    +FILTER_CONFIG= \
    +	$(foreach c, $(3), \
    +		$(if $(CONFIG_GST_FFMPEG_$(1)_$(c)),--enable-$(2)='$(c)') \
    +	)
    +
    +FFMPEG_CONFIGURE_ENCODERS:=$(call FILTER_CONFIG,ENCODER,encoder,$(FFMPEG_ENCODERS))
    +FFMPEG_CONFIGURE_DECODERS:=$(call FILTER_CONFIG,DECODER,decoder,$(FFMPEG_DECODERS))
    +FFMPEG_CONFIGURE_MUXERS:=$(call FILTER_CONFIG,MUXER,muxer,$(FFMPEG_MUXERS))
    +FFMPEG_CONFIGURE_DEMUXERS:=$(call FILTER_CONFIG,DEMUXER,demuxer,$(FFMPEG_DEMUXERS))
    +FFMPEG_CONFIGURE_PARSERS:=$(call FILTER_CONFIG,PARSER,parser,$(FFMPEG_PARSERS))
    +FFMPEG_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(FFMPEG_PROTOCOLS))
    +
    +GST_VERSION:=0.10
    +
    +CONFIGURE_ARGS += \
    +	--with-ffmpeg-extra-configure="--target-os=linux \
    +		--disable-bsfs \
    +		--disable-devices \
    +		--disable-encoders \
    +		$(FFMPEG_CONFIGURE_ENCODERS) \
    +		--disable-decoders \
    +		$(FFMPEG_CONFIGURE_DECODERS) \
    +		--disable-muxers \
    +		$(FFMPEG_CONFIGURE_MUXERS) \
    +		--disable-demuxers \
    +		$(FFMPEG_CONFIGURE_DEMUXERS) \
    +		--disable-parsers \
    +		$(FFMPEG_CONFIGURE_PARSERS) \
    +		--disable-protocols \
    +		$(FFMPEG_CONFIGURE_PROTOCOLS)"
    +
    +# XXX: trick to force use of embedded FFmpeg headers
    +TARGET_CFLAGS += $(TARGET_CPPFLAGS)
    +TARGET_CPPFLAGS :=
    +
    +TARGET_LDFLAGS += $(FPIC)
    +
    +define Build/Prepare
    +$(call Build/Prepare/Default)
    +endef
    +
    +define Package/gst-ffmpeg/install
    +	$(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +                ./usr/lib/gstreamer-$(GST_VERSION)/libgstffmpeg.so* \
    +                $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
    +        )
    +endef
    +
    +$(eval $(call BuildPackage,gst-ffmpeg))
    diff --git a/multimedia/gst-plugins-bad/Makefile b/multimedia/gst-plugins-bad/Makefile
    new file mode 100644
    index 0000000..5cef2d9
    --- /dev/null
    +++ b/multimedia/gst-plugins-bad/Makefile
    @@ -0,0 +1,221 @@
    +#
    +# Copyright (C) 2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gst-plugins-bad
    +PKG_VERSION:=0.10.19
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-bad/
    +PKG_MD5SUM:=368f72e2a1c7a6e8fe60394e4315259b
    +
    +PKG_BUILD_DEPENDS:= gstreamer gst-plugins-base liboil
    +
    +PKG_FIXUP:=autoreconf
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/gstreamer/Default
    +  CATEGORY:=Multimedia
    +  SECTION:=multimedia
    +  TITLE:=GStreamer
    +  URL:=http://gstreamer.freedesktop.org/
    +  DEPENDS:= @!LINUX_2_4
    +endef
    +
    +define Package/gstreamer/description/Default
    + GStreamer open source multimedia framework
    +endef
    +
    +
    +define Package/gst-plugins-bad
    +$(call Package/gstreamer/Default)
    +  TITLE+= plugins collection (bad)
    +  DEPENDS+= $(GST_DEPENDS)
    +endef
    +
    +define Package/gts-plugins-bad/description
    +$(call Package/gstreamer/description/Default)
    + .
    + This meta package contains only dependencies to the other plugins from
    + the bad plugins collection.
    +endef
    +
    +
    +GST_VERSION:=0.10
    +
    +CONFIGURE_ARGS += \
    +	--disable-debug \
    +	--disable-examples \
    +	--disable-nls	\
    +	\
    +	--disable-directsound \
    +	--disable-directdraw \
    +	--disable-osx_video \
    +	--disable-quicktime \
    +	--disable-vcd \
    +	--disable-alsa \
    +	--disable-assrender \
    +	--disable-amrwb \
    +	--disable-apexsink \
    +	--disable-bz2 \
    +	--disable-cdaudio \
    +	--disable-celt \
    +	--disable-cog \
    +	--disable-dc1394 \
    +	--disable-directfb \
    +	--disable-dirac \
    +	--disable-dts \
    +	--disable-divx \
    +	--disable-resindvd \
    +	--disable-metadata \
    +	--disable-faac \
    +	--disable-faad \
    +	--disable-fbdev \
    +	--disable-flite \
    +	--disable-gsm \
    +	--disable-jack \
    +	--disable-jp2k \
    +	--disable-kate \
    +	--disable-ladspa \
    +	--disable-lv2 \
    +	--disable-modplug \
    +	--disable-mimic \
    +	--disable-mpeg2enc \
    +	--disable-mplex \
    +	--disable-musepack \
    +	--disable-musicbrainz \
    +	--disable-mythtv \
    +	--disable-nas \
    +	--disable-neon \
    +	--disable-ofa \
    +	--disable-rsvg \
    +	--disable-timidity \
    +	--disable-wildmidi \
    +	--disable-sdl \
    +	--disable-sdltest \
    +	--disable-sndfile \
    +	--disable-soundtouch \
    +	--disable-spc \
    +	--disable-gme \
    +	--disable-swfdec \
    +	--disable-theoradec \
    +	--disable-xvid \
    +	--disable-dvb \
    +	--disable-wininet \
    +	--disable-acm \
    +	--disable-vdpau \
    +	--disable-schro \
    +	--disable-zbar \
    +	--disable-vp8 \
    +	--disable-librfb \
    +	\
    +	--without-libiconv-prefix \
    +	--without-libintl-prefix \
    +	--without-x \
    +
    +EXTRA_LDFLAGS+= \
    +	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
    +
    +
    +define Package/gst-plugins-ugly/install
    +	/bin/true
    +endef
    +
    +
    +# 1: short name
    +# 2: description
    +# 3: dependencies on other gstreamer libraries (short name)
    +# 4: dependencies on other gstreamer plugins (short name)
    +# 5: dependencies on other packages
    +define GstBuildPlugin
    +
    +  GST_DEPENDS += +gst-mod-$(1)
    +
    +  define Package/gst-mod-$(1)
    +    $(call Package/gstreamer/Default)
    +    TITLE+= $(2) plugin (bad)
    +    DEPENDS+= +libgstreamer $$(foreach p,$(3),+libgst$$(p)) $$(foreach p,$(4),+gst-mod-$$(p)) $(5)
    +  endef
    +
    +  define Package/gst-mod-$(1)/description
    +   $(call Package/gstreamer/description/Default)
    +   .
    +   This package contains the GStreamer $(2) plugin.
    +  endef
    +
    +  define Package/gst-mod-$(1)/install
    +	$(INSTALL_DIR) $$(1)/usr/lib/gstreamer-$(GST_VERSION)
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/gstreamer-$(GST_VERSION)/libgst$(1).so* \
    +		$$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
    +	)
    +  endef
    +
    +  $$(eval $$(call BuildPackage,gst-mod-$(1)))
    +endef
    +
    +$(eval $(call GstBuildPlugin,adpcmdec,adpcm decoding support,,,))
    +$(eval $(call GstBuildPlugin,adpcmenc,adpcm encoding support,,,))
    +$(eval $(call GstBuildPlugin,aiff,aiff support,,,))
    +$(eval $(call GstBuildPlugin,asfmux,asf muxing support,,,))
    +$(eval $(call GstBuildPlugin,audioparsersbad,audioparsers support,,,))
    +$(eval $(call GstBuildPlugin,autoconvert,autoconvert support,,,))
    +$(eval $(call GstBuildPlugin,camerabin,camerabin support,,,))
    +$(eval $(call GstBuildPlugin,legacyresample,legacyresample support,,,))
    +$(eval $(call GstBuildPlugin,bayer,bayer support,,,))
    +$(eval $(call GstBuildPlugin,cdxaparse,cdxaparse support,,,))
    +$(eval $(call GstBuildPlugin,dataurisrc,dataurisrc support,,,))
    +$(eval $(call GstBuildPlugin,dccp,dccp support,,,))
    +$(eval $(call GstBuildPlugin,debugutilsbad,debugutils support,,,))
    +$(eval $(call GstBuildPlugin,dtmf,dtmf support,,,))
    +$(eval $(call GstBuildPlugin,dvdspu,dvdspu support,,,))
    +$(eval $(call GstBuildPlugin,festival,festival support,,,))
    +$(eval $(call GstBuildPlugin,freeze,freeze support,,,))
    +$(eval $(call GstBuildPlugin,frei0r,frei0r support,,,))
    +$(eval $(call GstBuildPlugin,h264parse,h264parse support,,,))
    +$(eval $(call GstBuildPlugin,hdvparse,hdvparse support,,,))
    +$(eval $(call GstBuildPlugin,id3tag,id3tag support,,,))
    +$(eval $(call GstBuildPlugin,invtelecine,invtelecine support,,,))
    +$(eval $(call GstBuildPlugin,jpegformat,jpegformat support,,,))
    +#$(eval $(call GstBuildPlugin,librfbsrc,librfb support,,,))
    +$(eval $(call GstBuildPlugin,liveadder,liveadder support,,,))
    +$(eval $(call GstBuildPlugin,mpegdemux,mpegdemux support,,,))
    +$(eval $(call GstBuildPlugin,mpegtsmux,mpegtsmux support,,,))
    +$(eval $(call GstBuildPlugin,mpegpsmux,mpegpsmux support,,,))
    +$(eval $(call GstBuildPlugin,mpeg4videoparse,mpeg4videoparse support,,,))
    +$(eval $(call GstBuildPlugin,mpegvideoparse,mpegvideoparse support,,,))
    +$(eval $(call GstBuildPlugin,mve,mve support,,,))
    +$(eval $(call GstBuildPlugin,mxf,mxf support,,,))
    +$(eval $(call GstBuildPlugin,nsf,nsf support,,,))
    +$(eval $(call GstBuildPlugin,nuvdemux,nuvdemux support,,,))
    +$(eval $(call GstBuildPlugin,pcapparse,pcapparse support,,,))
    +$(eval $(call GstBuildPlugin,pnm,pnm support,,,))
    +$(eval $(call GstBuildPlugin,qtmux,qtmux support,,,))
    +$(eval $(call GstBuildPlugin,rawparse,rawparse support,,,))
    +$(eval $(call GstBuildPlugin,rtpmux,rtpmux support,,,))
    +#$(eval $(call GstBuildPlugin,rfbsrc,rfb support,,,))
    +$(eval $(call GstBuildPlugin,scaletempoplugin,scaletempo support,,,))
    +$(eval $(call GstBuildPlugin,sdpelem,sdp support,,,))
    +$(eval $(call GstBuildPlugin,segmentclip,segmentclip support,,,))
    +$(eval $(call GstBuildPlugin,selector,selector support,,,))
    +$(eval $(call GstBuildPlugin,siren,siren support,,,))
    +$(eval $(call GstBuildPlugin,speed,speed support,,,))
    +$(eval $(call GstBuildPlugin,subenc,subenc support,,,))
    +$(eval $(call GstBuildPlugin,stereo,stereo support,,,))
    +$(eval $(call GstBuildPlugin,tta,tta support,,,))
    +$(eval $(call GstBuildPlugin,valve,valve support,,,))
    +$(eval $(call GstBuildPlugin,videomeasure,videomeasure support,,,))
    +$(eval $(call GstBuildPlugin,videosignal,videosignal support,,,))
    +$(eval $(call GstBuildPlugin,vmnc,vmnc support,,,))
    +$(eval $(call GstBuildPlugin,mms,mms support,,,+libmms))
    +
    +$(eval $(call BuildPackage,gst-plugins-bad))
    diff --git a/multimedia/gst-plugins-bad/patches/000-gettext.patch b/multimedia/gst-plugins-bad/patches/000-gettext.patch
    new file mode 100644
    index 0000000..b2c2d19
    --- /dev/null
    +++ b/multimedia/gst-plugins-bad/patches/000-gettext.patch
    @@ -0,0 +1,23 @@
    +diff -ur gst-plugins-bad-0.10.19.orig/configure.ac gst-plugins-bad-0.10.19/configure.ac
    +--- gst-plugins-bad-0.10.19.orig/configure.ac	2011-01-07 01:44:21.000000000 +0100
    ++++ gst-plugins-bad-0.10.19/configure.ac	2011-01-07 01:45:31.000000000 +0100
    +@@ -1772,7 +1772,6 @@
    + ext/vp8/Makefile
    + ext/xvid/Makefile
    + ext/zbar/Makefile
    +-po/Makefile.in
    + docs/Makefile
    + docs/plugins/Makefile
    + docs/version.entities
    +diff -ur gst-plugins-bad-0.10.19.orig/Makefile.am gst-plugins-bad-0.10.19/Makefile.am
    +--- gst-plugins-bad-0.10.19.orig/Makefile.am	2011-01-07 01:44:21.000000000 +0100
    ++++ gst-plugins-bad-0.10.19/Makefile.am	2011-01-07 01:46:17.000000000 +0100
    +@@ -2,7 +2,7 @@
    + 
    + SUBDIRS = \
    + 	gst-libs gst sys ext pkgconfig \
    +-	m4 common docs tests po tools
    ++	m4 common docs tests tools
    + 
    + DIST_SUBDIRS = \
    + 	gst gst-libs sys ext pkgconfig \
    diff --git a/multimedia/gst-plugins-base/Makefile b/multimedia/gst-plugins-base/Makefile
    new file mode 100644
    index 0000000..d867fd3
    --- /dev/null
    +++ b/multimedia/gst-plugins-base/Makefile
    @@ -0,0 +1,213 @@
    +#
    +# Copyright (C) 2008-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gst-plugins-base
    +PKG_VERSION:=0.10.29
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-base/
    +PKG_MD5SUM:=d07e251152cccbaa81807c14cf0fd8c0
    +
    +PKG_BUILD_DEPENDS:= gstreamer liboil
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +# -liconv crept in from pkg-config, to be revisited later
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/gstreamer/Default
    +  CATEGORY:=Multimedia
    +  SECTION:=multimedia
    +  TITLE:=GStreamer
    +  URL:=http://gstreamer.freedesktop.org/
    +  DEPENDS:= @!LINUX_2_4
    +endef
    +
    +define Package/gstreamer/description/Default
    + GStreamer open source multimedia framework
    +endef
    +
    +
    +define Package/gst-plugins-base
    +$(call Package/gstreamer/Default)
    +  TITLE+= plugins collection (base)
    +  DEPENDS+= $(GST_DEPENDS)
    +endef
    +
    +define Package/gts-plugins-base/description
    +$(call Package/gstreamer/description/Default)
    + .
    + This meta package contains only dependencies to the other libraries and
    + plugins from the base plugins collection.
    +endef
    +
    +
    +GST_VERSION:=0.10
    +
    +CONFIGURE_ARGS += \
    +	--disable-debug \
    +	--disable-examples \
    +	\
    +	--disable-cdparanoia \
    +	--disable-ffmpegcolorspace \
    +	--disable-freetypetest \
    +	--disable-gnome_vfs \
    +	--disable-gst_v4l \
    +	--disable-libvisual \
    +	--disable-oggtest \
    +	--disable-pango \
    +	--disable-subparse \
    +	--disable-videorate \
    +	--disable-videoscale \
    +	--disable-vorbistest \
    +	--disable-x \
    +	--disable-xshm \
    +	--disable-xvideo \
    +	\
    +	--without-libiconv-prefix \
    +	--without-libintl-prefix \
    +	--without-x \
    +	\
    +	--with-audioresample-format=int \
    +
    +EXTRA_LDFLAGS+= \
    +	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
    +
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/include/gstreamer-$(GST_VERSION)/* \
    +		$(1)/usr/include/gstreamer-$(GST_VERSION)/ \
    +	)
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/libgst*-$(GST_VERSION).{a,la,so*} \
    +		$(1)/usr/lib/ \
    +	)
    +	$(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/gstreamer-$(GST_VERSION)/libgst*.{la,so} \
    +		$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
    +	)
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
    +		$(1)/usr/lib/pkgconfig/ \
    +	)
    +endef
    +
    +
    +define Package/gst-plugins-base/install
    +	/bin/true
    +endef
    +
    +
    +# 1: short name
    +# 2: description
    +# 3: dependencies on other gstreamer libraries (short name)
    +# 4: dependencies on other packages
    +define GstBuildLibrary
    +
    +  GST_DEPENDS += +libgst$(1)
    +
    +  define Package/libgst$(1)
    +    $(call Package/gstreamer/Default)
    +    TITLE+= $(2) library (base)
    +    DEPENDS+= +libgstreamer $$(foreach p,$(3),+libgst$$(p)) $(4)
    +  endef
    +
    +  define Package/libgst$(1)/description
    +   $(call Package/gstreamer/description/Default)
    +   .
    +   This package contains the GStreamer $(2) library.
    +  endef
    +
    +  define Package/libgst$(1)/install
    +	$(INSTALL_DIR) $$(1)/usr/lib
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
    +		$$(1)/usr/lib/ \
    +	)
    +  endef
    +
    +  $$(eval $$(call BuildPackage,libgst$(1)))
    +endef
    +
    +$(eval $(call GstBuildLibrary,app,app,,))
    +$(eval $(call GstBuildLibrary,audio,audio,interfaces,))
    +$(eval $(call GstBuildLibrary,cdda,CDDA,,))
    +$(eval $(call GstBuildLibrary,fft,FFT,,))
    +$(eval $(call GstBuildLibrary,interfaces,interfaces,))
    +$(eval $(call GstBuildLibrary,netbuffer,network buffer,,))
    +$(eval $(call GstBuildLibrary,pbutils,utils,,))
    +$(eval $(call GstBuildLibrary,riff,RIFF media,audio tag,,))
    +$(eval $(call GstBuildLibrary,rtp,RTP,,))
    +$(eval $(call GstBuildLibrary,rtsp,RTSP,,))
    +$(eval $(call GstBuildLibrary,sdp,SDP,,))
    +$(eval $(call GstBuildLibrary,tag,tag support,,))
    +$(eval $(call GstBuildLibrary,video,video,,))
    +
    +
    +# 1: short name
    +# 2: description
    +# 3: dependencies on other gstreamer libraries (short name)
    +# 4: dependencies on other gstreamer plugins (short name)
    +# 5: dependencies on other packages
    +define GstBuildPlugin
    +
    +  GST_DEPENDS += +gst-mod-$(1)
    +
    +  define Package/gst-mod-$(1)
    +    $(call Package/gstreamer/Default)
    +    TITLE+= $(2) plugin (base)
    +    DEPENDS+= +libgstreamer $$(foreach p,$(3),+libgst$$(p)) $$(foreach p,$(4),+gst-mod-$$(p)) $(5)
    +  endef
    +
    +  define Package/gst-mod-$(1)/description
    +   $(call Package/gstreamer/description/Default)
    +   .
    +   This package contains the GStreamer $(2) plugin.
    +  endef
    +
    +  define Package/gst-mod-$(1)/install
    +	$(INSTALL_DIR) $$(1)/usr/lib/gstreamer-$(GST_VERSION)
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/gstreamer-$(GST_VERSION)/libgst$(1).so* \
    +		$$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
    +	)
    +  endef
    +
    +  $$(eval $$(call BuildPackage,gst-mod-$(1)))
    +endef
    +
    +$(eval $(call GstBuildPlugin,alsa,ALSA,audio,,+alsa-lib))
    +$(eval $(call GstBuildPlugin,app,app,app,,))
    +$(eval $(call GstBuildPlugin,audioconvert,audio format conversion,audio,,))
    +$(eval $(call GstBuildPlugin,audiorate,audio rate adjusting,,,))
    +$(eval $(call GstBuildPlugin,audioresample,audio resampling,,,))
    +$(eval $(call GstBuildPlugin,audiotestsrc,audio test,controller,,))
    +$(eval $(call GstBuildPlugin,decodebin,media decoder,pbutils,,))
    +$(eval $(call GstBuildPlugin,decodebin2,media decoder (v2),pbutils,,))
    +$(eval $(call GstBuildPlugin,gio,GIO,,,))
    +$(eval $(call GstBuildPlugin,ogg,Ogg,riff tag,,+libogg))
    +$(eval $(call GstBuildPlugin,playbin,playback,interfaces pbutils,,))
    +$(eval $(call GstBuildPlugin,tcp,TCP,dataprotocol,,))
    +$(eval $(call GstBuildPlugin,theora,Theora,tag,ogg,+libtheora))
    +$(eval $(call GstBuildPlugin,typefindfunctions,'typefind' functions,,,))
    +$(eval $(call GstBuildPlugin,videotestsrc,video test,,,+liboil))
    +$(eval $(call GstBuildPlugin,volume,volume,audio controller,,+liboil))
    +$(eval $(call GstBuildPlugin,vorbis,Vorbis,audio tag,ogg,+libvorbis))
    +
    +$(eval $(call BuildPackage,gst-plugins-base))
    diff --git a/multimedia/gst-plugins-base/patches/001-no_docs.patch b/multimedia/gst-plugins-base/patches/001-no_docs.patch
    new file mode 100644
    index 0000000..a2ca92e
    --- /dev/null
    +++ b/multimedia/gst-plugins-base/patches/001-no_docs.patch
    @@ -0,0 +1,34 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -12,14 +12,12 @@ SUBDIRS = 			\
    + 	gst sys $(SUBDIRS_EXT) 	\
    + 	tools 			\
    + 	tests 			\
    +-	docs			\
    + 	po 			\
    + 	common 			\
    + 	m4
    + 
    + DIST_SUBDIRS = 			\
    + 	pkgconfig		\
    +-	docs			\
    + 	gst-libs		\
    + 	gst sys ext		\
    + 	tools 			\
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -446,14 +446,12 @@ SUBDIRS = \
    + 	gst sys $(SUBDIRS_EXT) 	\
    + 	tools 			\
    + 	tests 			\
    +-	docs			\
    + 	po 			\
    + 	common 			\
    + 	m4
    + 
    + DIST_SUBDIRS = \
    + 	pkgconfig		\
    +-	docs			\
    + 	gst-libs		\
    + 	gst sys ext		\
    + 	tools 			\
    diff --git a/multimedia/gst-plugins-base/patches/002-no_tests.patch b/multimedia/gst-plugins-base/patches/002-no_tests.patch
    new file mode 100644
    index 0000000..c92135f
    --- /dev/null
    +++ b/multimedia/gst-plugins-base/patches/002-no_tests.patch
    @@ -0,0 +1,36 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -11,7 +11,6 @@ SUBDIRS = 			\
    + 	gst-libs 		\
    + 	gst sys $(SUBDIRS_EXT) 	\
    + 	tools 			\
    +-	tests 			\
    + 	po 			\
    + 	common 			\
    + 	m4
    +@@ -21,7 +20,6 @@ DIST_SUBDIRS = 			\
    + 	gst-libs		\
    + 	gst sys ext		\
    + 	tools 			\
    +-	tests 			\
    + 	po 			\
    + 	common 			\
    + 	m4
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -445,7 +445,6 @@ SUBDIRS = \
    + 	gst-libs 		\
    + 	gst sys $(SUBDIRS_EXT) 	\
    + 	tools 			\
    +-	tests 			\
    + 	po 			\
    + 	common 			\
    + 	m4
    +@@ -455,7 +454,6 @@ DIST_SUBDIRS = \
    + 	gst-libs		\
    + 	gst sys ext		\
    + 	tools 			\
    +-	tests 			\
    + 	po 			\
    + 	common 			\
    + 	m4
    diff --git a/multimedia/gst-plugins-base/patches/003-no_translations.patch b/multimedia/gst-plugins-base/patches/003-no_translations.patch
    new file mode 100644
    index 0000000..8654f8b
    --- /dev/null
    +++ b/multimedia/gst-plugins-base/patches/003-no_translations.patch
    @@ -0,0 +1,46 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -956,7 +956,6 @@ docs/design/Makefile
    + docs/libs/Makefile
    + docs/plugins/Makefile
    + docs/version.entities
    +-po/Makefile.in
    + common/Makefile
    + common/m4/Makefile
    + m4/Makefile
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -11,7 +11,6 @@ SUBDIRS = 			\
    + 	gst-libs 		\
    + 	gst sys $(SUBDIRS_EXT) 	\
    + 	tools 			\
    +-	po 			\
    + 	common 			\
    + 	m4
    + 
    +@@ -20,7 +19,6 @@ DIST_SUBDIRS = 			\
    + 	gst-libs		\
    + 	gst sys ext		\
    + 	tools 			\
    +-	po 			\
    + 	common 			\
    + 	m4
    + 
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -445,7 +445,6 @@ SUBDIRS = \
    + 	gst-libs 		\
    + 	gst sys $(SUBDIRS_EXT) 	\
    + 	tools 			\
    +-	po 			\
    + 	common 			\
    + 	m4
    + 
    +@@ -454,7 +453,6 @@ DIST_SUBDIRS = \
    + 	gst-libs		\
    + 	gst sys ext		\
    + 	tools 			\
    +-	po 			\
    + 	common 			\
    + 	m4
    + 
    diff --git a/multimedia/gst-plugins-good/Makefile b/multimedia/gst-plugins-good/Makefile
    new file mode 100644
    index 0000000..f382dd7
    --- /dev/null
    +++ b/multimedia/gst-plugins-good/Makefile
    @@ -0,0 +1,174 @@
    +## Copyright (C) 2009-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gst-plugins-good
    +PKG_VERSION:=0.10.23
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-good/
    +PKG_MD5SUM:=9cddbb0e7e90677f0cc05c23feffef5c
    +
    +PKG_BUILD_DEPENDS:= gstreamer gst-plugins-base liboil
    +
    +PKG_FIXUP:=autoreconf
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/gstreamer/Default
    +  CATEGORY:=Multimedia
    +  SECTION:=multimedia
    +  TITLE:=GStreamer
    +  URL:=http://gstreamer.freedesktop.org/
    +  DEPENDS:= @!LINUX_2_4
    +endef
    +
    +define Package/gstreamer/description/Default
    + GStreamer open source multimedia framework
    +endef
    +
    +
    +define Package/gst-plugins-good
    +$(call Package/gstreamer/Default)
    +  TITLE+= plugins collection (good)
    +  DEPENDS+= $(GST_DEPENDS)
    +endef
    +
    +define Package/gts-plugins-good/description
    +$(call Package/gstreamer/description/Default)
    + .
    + This meta package contains only dependencies to the other plugins from
    + the good plugins collection.
    +endef
    +
    +
    +GST_VERSION:=0.10
    +
    +CONFIGURE_ARGS += \
    +	--disable-debug \
    +	--disable-examples \
    +	\
    +	--disable-aalib \
    +	--disable-alpha \
    +	--disable-annodex \
    +	--disable-apetag \
    +	--disable-auparse \
    +	--disable-avi \
    +	--disable-bz2 \
    +	--disable-cairo \
    +	--disable-directsound \
    +	--disable-dv1394 \
    +	--disable-effectv \
    +	--disable-esd \
    +	--disable-flv \
    +	--disable-flx \
    +	--disable-gconf \
    +	--disable-gconftool \
    +	--disable-gdk_pixbuf \
    +	--disable-goom \
    +	--disable-goom2k1 \
    +	--disable-gst_v4l2 \
    +	--disable-hal \
    +	--disable-jpeg \
    +	--disable-law \
    +	--disable-libcaca \
    +	--disable-libdv \
    +	--disable-libpng \
    +	--disable-matroska \
    +	--disable-monoscope \
    +	--disable-osx_audio \
    +	--disable-osx_video \
    +	--disable-pulse \
    +	--disable-qtdemux \
    +	--disable-rtspmanager \
    +	--disable-smpte \
    +	--disable-shout2 \
    +	--disable-speex \
    +	--disable-sunaudio \
    +	--disable-taglib \
    +	--disable-videobox \
    +	--disable-videocrop \
    +	--disable-videofilter \
    +	--disable-videomixer \
    +	--disable-wavpack \
    +	--disable-x \
    +	--disable-xshm \
    +	--disable-xvideo \
    +	--disable-y4m \
    +	--disable-zlib \
    +	\
    +	--without-libiconv-prefix \
    +	--without-libintl-prefix \
    +	--without-x \
    +
    +EXTRA_LDFLAGS+= \
    +	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
    +
    +
    +define Package/gst-plugins-good/install
    +	/bin/true
    +endef
    +
    +
    +# 1: short name
    +# 2: description
    +# 3: dependencies on other gstreamer libraries (short name)
    +# 4: dependencies on other gstreamer plugins (short name)
    +# 5: dependencies on other packages
    +define GstBuildPlugin
    +
    +  GST_DEPENDS += +gst-mod-$(1)
    +
    +  define Package/gst-mod-$(1)
    +    $(call Package/gstreamer/Default)
    +    TITLE+= $(2) plugin (good)
    +    DEPENDS+= +libgstreamer $$(foreach p,$(3),+libgst$$(p)) $$(foreach p,$(4),+gst-mod-$$(p)) $(5)
    +  endef
    +
    +  define Package/gst-mod-$(1)/description
    +   $(call Package/gstreamer/description/Default)
    +   .
    +   This package contains the GStreamer $(2) plugin.
    +  endef
    +
    +  define Package/gst-mod-$(1)/install
    +	$(INSTALL_DIR) $$(1)/usr/lib/gstreamer-$(GST_VERSION)
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/gstreamer-$(GST_VERSION)/libgst$(1).so* \
    +		$$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
    +	)
    +  endef
    +
    +  $$(eval $$(call BuildPackage,gst-mod-$(1)))
    +endef
    +
    +$(eval $(call GstBuildPlugin,audiofx,audio effects,audio controller,,))
    +$(eval $(call GstBuildPlugin,autodetect,format auto-detection,,,))
    +$(eval $(call GstBuildPlugin,cutter,audio cutter,audio,,))
    +$(eval $(call GstBuildPlugin,debug,debugging,,,))
    +$(eval $(call GstBuildPlugin,equalizer,audio equalizer,audio controller,,))
    +$(eval $(call GstBuildPlugin,flac,FLAC codec,pbutils tag,,+libflac))
    +$(eval $(call GstBuildPlugin,id3demux,ID3v1/v2 demuxer,pbutils tag,,))
    +$(eval $(call GstBuildPlugin,icydemux,icy demuxer,audio,,))
    +$(eval $(call GstBuildPlugin,interleave,audio interleave,audio,,))
    +$(eval $(call GstBuildPlugin,level,audio level,audio,,))
    +$(eval $(call GstBuildPlugin,multifile,multiple files access,,,))
    +$(eval $(call GstBuildPlugin,multipart,multipart stream handling,,,))
    +$(eval $(call GstBuildPlugin,ossaudio,OSS audio support,audio,,))
    +$(eval $(call GstBuildPlugin,replaygain,volume normalization,pbutils,,))
    +$(eval $(call GstBuildPlugin,rtp,RTP,audio rtp tag,,))
    +$(eval $(call GstBuildPlugin,rtsp,RTSP,interfaces rtp rtsp sdp,,))
    +$(eval $(call GstBuildPlugin,souphttpsrc,soup input,audio,,+libsoup))
    +$(eval $(call GstBuildPlugin,spectrum,spectrum data output,audio fft,,))
    +$(eval $(call GstBuildPlugin,udp,UDP,netbuffer,,))
    +$(eval $(call GstBuildPlugin,wavenc,Wav encoder,,,))
    +$(eval $(call GstBuildPlugin,wavparse,Wav parser,audio riff tag,,))
    +
    +$(eval $(call BuildPackage,gst-plugins-good))
    diff --git a/multimedia/gst-plugins-good/patches/001-no_docs.patch b/multimedia/gst-plugins-good/patches/001-no_docs.patch
    new file mode 100644
    index 0000000..9a7f60b
    --- /dev/null
    +++ b/multimedia/gst-plugins-good/patches/001-no_docs.patch
    @@ -0,0 +1,20 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -9,7 +9,6 @@ endif
    + ALWAYS_SUBDIRS =		\
    + 	gst sys ext 		\
    + 	tests			\
    +-	docs			\
    + 	po			\
    + 	common			\
    + 	m4			\
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -476,7 +476,6 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk
    + ALWAYS_SUBDIRS = \
    + 	gst sys ext 		\
    + 	tests			\
    +-	docs			\
    + 	po			\
    + 	common			\
    + 	m4			\
    diff --git a/multimedia/gst-plugins-good/patches/002-no_tests.patch b/multimedia/gst-plugins-good/patches/002-no_tests.patch
    new file mode 100644
    index 0000000..2b67186
    --- /dev/null
    +++ b/multimedia/gst-plugins-good/patches/002-no_tests.patch
    @@ -0,0 +1,20 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -8,7 +8,6 @@ endif
    + 
    + ALWAYS_SUBDIRS =		\
    + 	gst sys ext 		\
    +-	tests			\
    + 	po			\
    + 	common			\
    + 	m4			\
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -475,7 +475,6 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk
    + @USE_GCONFTOOL_TRUE@GCONF_DIR = gconf
    + ALWAYS_SUBDIRS = \
    + 	gst sys ext 		\
    +-	tests			\
    + 	po			\
    + 	common			\
    + 	m4			\
    diff --git a/multimedia/gst-plugins-good/patches/003-no_translations.patch b/multimedia/gst-plugins-good/patches/003-no_translations.patch
    new file mode 100644
    index 0000000..453f6f1
    --- /dev/null
    +++ b/multimedia/gst-plugins-good/patches/003-no_translations.patch
    @@ -0,0 +1,30 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -1147,7 +1147,6 @@ sys/sunaudio/Makefile
    + sys/v4l2/Makefile
    + sys/waveform/Makefile
    + sys/ximage/Makefile
    +-po/Makefile.in
    + tests/Makefile
    + tests/check/Makefile
    + tests/examples/Makefile
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -8,7 +8,6 @@ endif
    + 
    + ALWAYS_SUBDIRS =		\
    + 	gst sys ext 		\
    +-	po			\
    + 	common			\
    + 	m4			\
    + 	pkgconfig
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -475,7 +475,6 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk
    + @USE_GCONFTOOL_TRUE@GCONF_DIR = gconf
    + ALWAYS_SUBDIRS = \
    + 	gst sys ext 		\
    +-	po			\
    + 	common			\
    + 	m4			\
    + 	pkgconfig
    diff --git a/multimedia/gst-plugins-ugly/Makefile b/multimedia/gst-plugins-ugly/Makefile
    new file mode 100644
    index 0000000..92d3e81
    --- /dev/null
    +++ b/multimedia/gst-plugins-ugly/Makefile
    @@ -0,0 +1,125 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gst-plugins-ugly
    +PKG_VERSION:=0.10.15
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-ugly/
    +PKG_MD5SUM:=21c034a762a5da252f91640e53bfe457
    +
    +PKG_BUILD_DEPENDS:= gstreamer gst-plugins-base liboil
    +
    +PKG_FIXUP:=autoreconf
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/gstreamer/Default
    +  CATEGORY:=Multimedia
    +  SECTION:=multimedia
    +  TITLE:=GStreamer
    +  URL:=http://gstreamer.freedesktop.org/
    +  DEPENDS:= @!LINUX_2_4
    +endef
    +
    +define Package/gstreamer/description/Default
    + GStreamer open source multimedia framework
    +endef
    +
    +
    +define Package/gst-plugins-ugly
    +$(call Package/gstreamer/Default)
    +  TITLE+= plugins collection (ugly)
    +  DEPENDS+= $(GST_DEPENDS)
    +endef
    +
    +define Package/gts-plugins-ugly/description
    +$(call Package/gstreamer/description/Default)
    + .
    + This meta package contains only dependencies to the other plugins from
    + the ugly plugins collection.
    +endef
    +
    +
    +GST_VERSION:=0.10
    +
    +CONFIGURE_ARGS += \
    +	--disable-debug \
    +	--disable-examples \
    +	\
    +	--disable-a52dec \
    +	--disable-amrnb \
    +	--disable-amrwb \
    +	--disable-cdio \
    +	--disable-dvdlpcmdec \
    +	--disable-dvdread \
    +	--disable-dvdsub \
    +	--disable-iec958 \
    +	--disable-mpeg2dec \
    +	--disable-mpegaudioparse \
    +	--disable-mpegstream \
    +	--disable-realmedia \
    +	--disable-sidplay \
    +	--disable-synaesthesia \
    +	--disable-twolame \
    +	--disable-x264 \
    +	\
    +	--without-libiconv-prefix \
    +	--without-libintl-prefix \
    +	--without-x \
    +
    +EXTRA_LDFLAGS+= \
    +	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
    +
    +
    +define Package/gst-plugins-ugly/install
    +	/bin/true
    +endef
    +
    +
    +# 1: short name
    +# 2: description
    +# 3: dependencies on other gstreamer libraries (short name)
    +# 4: dependencies on other gstreamer plugins (short name)
    +# 5: dependencies on other packages
    +define GstBuildPlugin
    +
    +  GST_DEPENDS += +gst-mod-$(1)
    +
    +  define Package/gst-mod-$(1)
    +    $(call Package/gstreamer/Default)
    +    TITLE+= $(2) plugin (ugly)
    +    DEPENDS+= +libgstreamer $$(foreach p,$(3),+libgst$$(p)) $$(foreach p,$(4),+gst-mod-$$(p)) $(5)
    +  endef
    +
    +  define Package/gst-mod-$(1)/description
    +   $(call Package/gstreamer/description/Default)
    +   .
    +   This package contains the GStreamer $(2) plugin.
    +  endef
    +
    +  define Package/gst-mod-$(1)/install
    +	$(INSTALL_DIR) $$(1)/usr/lib/gstreamer-$(GST_VERSION)
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/gstreamer-$(GST_VERSION)/libgst$(1).so* \
    +		$$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
    +	)
    +  endef
    +
    +  $$(eval $$(call BuildPackage,gst-mod-$(1)))
    +endef
    +
    +$(eval $(call GstBuildPlugin,lame,MP3 encoder (using LAME),,,+lame-lib))
    +$(eval $(call GstBuildPlugin,mad,MP3 decoder (using MAD),audio tag,,+libid3tag +libmad))
    +$(eval $(call GstBuildPlugin,asf,ASF demuxer,,,))
    +
    +$(eval $(call BuildPackage,gst-plugins-ugly))
    diff --git a/multimedia/gst-plugins-ugly/patches/001-no_docs.patch b/multimedia/gst-plugins-ugly/patches/001-no_docs.patch
    new file mode 100644
    index 0000000..1810542
    --- /dev/null
    +++ b/multimedia/gst-plugins-ugly/patches/001-no_docs.patch
    @@ -0,0 +1,22 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -1,7 +1,7 @@
    + DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
    + 
    + SUBDIRS = \
    +-	gst-libs gst ext docs m4 tests common po
    ++	gst-libs gst ext m4 tests common po
    + 
    + # include before EXTRA_DIST for win32 assignment
    + include $(top_srcdir)/common/win32.mak
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -395,7 +395,7 @@ top_builddir = @top_builddir@
    + top_srcdir = @top_srcdir@
    + DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
    + SUBDIRS = \
    +-	gst-libs gst ext docs m4 tests common po
    ++	gst-libs gst ext m4 tests common po
    + 
    + 
    + # the MANIFEST contains all win32 related files that should be disted
    diff --git a/multimedia/gst-plugins-ugly/patches/002-no_tests.patch b/multimedia/gst-plugins-ugly/patches/002-no_tests.patch
    new file mode 100644
    index 0000000..c7eed9d
    --- /dev/null
    +++ b/multimedia/gst-plugins-ugly/patches/002-no_tests.patch
    @@ -0,0 +1,22 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -1,7 +1,7 @@
    + DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
    + 
    + SUBDIRS = \
    +-	gst-libs gst ext m4 tests common po
    ++	gst-libs gst ext m4 common po
    + 
    + # include before EXTRA_DIST for win32 assignment
    + include $(top_srcdir)/common/win32.mak
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -395,7 +395,7 @@ top_builddir = @top_builddir@
    + top_srcdir = @top_srcdir@
    + DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
    + SUBDIRS = \
    +-	gst-libs gst ext m4 tests common po
    ++	gst-libs gst ext m4 common po
    + 
    + 
    + # the MANIFEST contains all win32 related files that should be disted
    diff --git a/multimedia/gst-plugins-ugly/patches/003-no_translations.patch b/multimedia/gst-plugins-ugly/patches/003-no_translations.patch
    new file mode 100644
    index 0000000..77015ff
    --- /dev/null
    +++ b/multimedia/gst-plugins-ugly/patches/003-no_translations.patch
    @@ -0,0 +1,32 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -495,7 +495,6 @@ docs/version.entities
    + tests/Makefile
    + tests/check/Makefile
    + m4/Makefile
    +-po/Makefile.in
    + gst-plugins-ugly.spec
    + )
    + 
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -1,7 +1,7 @@
    + DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
    + 
    + SUBDIRS = \
    +-	gst-libs gst ext m4 common po
    ++	gst-libs gst ext m4 common
    + 
    + # include before EXTRA_DIST for win32 assignment
    + include $(top_srcdir)/common/win32.mak
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -395,7 +395,7 @@ top_builddir = @top_builddir@
    + top_srcdir = @top_srcdir@
    + DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
    + SUBDIRS = \
    +-	gst-libs gst ext m4 common po
    ++	gst-libs gst ext m4 common
    + 
    + 
    + # the MANIFEST contains all win32 related files that should be disted
    diff --git a/multimedia/gstreamer/Makefile b/multimedia/gstreamer/Makefile
    new file mode 100644
    index 0000000..141c21f
    --- /dev/null
    +++ b/multimedia/gstreamer/Makefile
    @@ -0,0 +1,198 @@
    +#
    +# Copyright (C) 2008-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=gstreamer
    +PKG_VERSION:=0.10.29
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gstreamer/
    +PKG_MD5SUM:=c92d6bce4fc65fa9d5a3ad35cdd1a466
    +
    +PKG_FIXUP:=libtool
    +PKG_REMOVE_FILES:=autogen.sh aclocal.m4
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/gstreamer/Default
    +  CATEGORY:=Multimedia
    +  SECTION:=multimedia
    +  TITLE:=GStreamer
    +  URL:=http://gstreamer.freedesktop.org/
    +  DEPENDS:= @!LINUX_2_4
    +endef
    +
    +define Package/gstreamer/description/Default
    + GStreamer open source multimedia framework
    +endef
    +
    +
    +define Package/gstreamer
    +$(call Package/gstreamer/Default)
    +  TITLE+= framework
    +  DEPENDS+= +libgstreamer \
    +	+libgstcheck \
    +	+libgstcontroller \
    +	+libgstdataprotocol \
    +	+libgstnet
    +endef
    +
    +define Package/gstreamer/description
    +$(call Package/gstreamer/description/Default)
    + .
    + This meta package contains only dependencies on the other GStreamer
    + componenents.
    +endef
    +
    +
    +define Package/gstreamer-utils
    +$(call Package/gstreamer/Default)
    +  TITLE+= utilities
    +  DEPENDS+= +libgstreamer
    +endef
    +
    +define Package/gstreamer-utils/description
    +$(call Package/gstreamer/description/Default)
    + .
    + This package contains the GStreamer utilities.
    +endef
    +
    +
    +define Package/libgstreamer
    +$(call Package/gstreamer/Default)
    +  TITLE+= library (core)
    +  DEPENDS+= +glib2 +libpthread +libxml2
    +endef
    +
    +define Package/libgstreamer/description
    +$(call Package/gstreamer/description/Default)
    + .
    + This package contains the GStreamer core library.
    +endef
    +  
    +
    +GST_VERSION:=0.10
    +
    +CONFIGURE_ARGS += \
    +	--disable-debug \
    +	--disable-examples \
    +	--disable-tests \
    +	--disable-valgrind \
    +	\
    +	--disable-gst-debug \
    +	\
    +	--without-libiconv-prefix \
    +	--without-libintl-prefix \
    +	--without-x \
    +
    +EXTRA_LDFLAGS+= \
    +	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
    +	-L$(ICONV_PREFIX)/lib -L$(INTL_PREFIX)/lib
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/include/gstreamer-$(GST_VERSION)/* \
    +		$(1)/usr/include/gstreamer-$(GST_VERSION)/ \
    +	)
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/libgst*-$(GST_VERSION).{a,la,so*} \
    +		$(1)/usr/lib/ \
    +	)
    +	$(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/gstreamer-$(GST_VERSION)/libgst*.{la,so} \
    +		$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
    +	)
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
    +		$(1)/usr/lib/pkgconfig/ \
    +	)
    +	$(INSTALL_DIR) $(2)/share/aclocal
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/share/aclocal/* \
    +		$(2)/share/aclocal/ \
    +	)
    +endef
    +
    +define Package/gstreamer/install
    +	/bin/true
    +endef
    +
    +define Package/gstreamer-utils/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/bin/gst-feedback* \
    +		./usr/bin/gst-launch* \
    +		./usr/bin/gst-inspect* \
    +		./usr/bin/gst-typefind* \
    +		./usr/bin/gst-xmlinspect* \
    +		./usr/bin/gst-xmllaunch* \
    +		$(1)/usr/bin/ \
    +	)
    +endef
    +
    +define Package/libgstreamer/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/libgstbase-$(GST_VERSION).so.* \
    +		./usr/lib/libgstreamer-$(GST_VERSION).so.* \
    +		$(1)/usr/lib/ \
    +	)
    +	$(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
    +		$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
    +	)
    +endef
    +
    +
    +# 1: short name
    +# 2: description
    +# 3: dependencies on other gstreamer libraries (short name)
    +# 4: dependencies on other packages
    +define GstBuildLibrary
    +
    +  define Package/libgst$(1)
    +    $(call Package/gstreamer/Default)
    +    TITLE+= $(2) library (core)
    +    DEPENDS+= +libgstreamer $$(foreach p,$(3),+libgst$$(p)) $(4)
    +  endef
    +
    +  define Package/libgst$(1)/description
    +   $(call Package/gstreamer/description/Default)
    +   .
    +   This package contains the GStreamer $(2) library.
    +  endef
    +
    +  define Package/libgst$(1)/install
    +	$(INSTALL_DIR) $$(1)/usr/lib
    +	( cd $(PKG_INSTALL_DIR); $(CP) \
    +		./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
    +		$$(1)/usr/lib/ \
    +	)
    +  endef
    +
    +  $$(eval $$(call BuildPackage,libgst$(1)))
    +endef
    +
    +$(eval $(call GstBuildLibrary,check,check unit testing))
    +$(eval $(call GstBuildLibrary,controller,dynamic parameter control))
    +$(eval $(call GstBuildLibrary,dataprotocol,data protocol))
    +$(eval $(call GstBuildLibrary,net,network classes))
    +
    +$(eval $(call BuildPackage,gstreamer))
    +$(eval $(call BuildPackage,gstreamer-utils))
    +$(eval $(call BuildPackage,libgstreamer))
    +
    diff --git a/multimedia/gstreamer/patches/001-no_docs.patch b/multimedia/gstreamer/patches/001-no_docs.patch
    new file mode 100644
    index 0000000..e94fd00
    --- /dev/null
    +++ b/multimedia/gstreamer/patches/001-no_docs.patch
    @@ -0,0 +1,36 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -8,7 +8,6 @@ aclocal_DATA = gst-element-check-@GST_MA
    + 
    + SUBDIRS = pkgconfig \
    + 	gst libs plugins tools tests \
    +-	docs \
    + 	po \
    + 	m4 \
    + 	common
    +@@ -16,7 +15,6 @@ SUBDIRS = pkgconfig \
    + # These are all the possible subdirs
    + DIST_SUBDIRS = pkgconfig \
    + 	gst libs plugins tools tests \
    +-	docs \
    + 	po \
    + 	m4 \
    + 	common
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -445,7 +445,6 @@ aclocaldir = $(datadir)/aclocal
    + aclocal_DATA = gst-element-check-@GST_MAJORMINOR@.m4
    + SUBDIRS = pkgconfig \
    + 	gst libs plugins tools tests \
    +-	docs \
    + 	po \
    + 	m4 \
    + 	common
    +@@ -454,7 +453,6 @@ SUBDIRS = pkgconfig \
    + # These are all the possible subdirs
    + DIST_SUBDIRS = pkgconfig \
    + 	gst libs plugins tools tests \
    +-	docs \
    + 	po \
    + 	m4 \
    + 	common
    diff --git a/multimedia/gstreamer/patches/002-no_tests.patch b/multimedia/gstreamer/patches/002-no_tests.patch
    new file mode 100644
    index 0000000..6058a38
    --- /dev/null
    +++ b/multimedia/gstreamer/patches/002-no_tests.patch
    @@ -0,0 +1,39 @@
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -7,14 +7,14 @@ aclocaldir = $(datadir)/aclocal
    + aclocal_DATA = gst-element-check-@GST_MAJORMINOR@.m4
    + 
    + SUBDIRS = pkgconfig \
    +-	gst libs plugins tools tests \
    ++	gst libs plugins tools \
    + 	po \
    + 	m4 \
    + 	common
    + 
    + # These are all the possible subdirs
    + DIST_SUBDIRS = pkgconfig \
    +-	gst libs plugins tools tests \
    ++	gst libs plugins tools \
    + 	po \
    + 	m4 \
    + 	common
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -444,7 +444,7 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk
    + aclocaldir = $(datadir)/aclocal
    + aclocal_DATA = gst-element-check-@GST_MAJORMINOR@.m4
    + SUBDIRS = pkgconfig \
    +-	gst libs plugins tools tests \
    ++	gst libs plugins tools \
    + 	po \
    + 	m4 \
    + 	common
    +@@ -452,7 +452,7 @@ SUBDIRS = pkgconfig \
    + 
    + # These are all the possible subdirs
    + DIST_SUBDIRS = pkgconfig \
    +-	gst libs plugins tools tests \
    ++	gst libs plugins tools \
    + 	po \
    + 	m4 \
    + 	common
    diff --git a/multimedia/gstreamer/patches/003-no_translations.patch b/multimedia/gstreamer/patches/003-no_translations.patch
    new file mode 100644
    index 0000000..8090563
    --- /dev/null
    +++ b/multimedia/gstreamer/patches/003-no_translations.patch
    @@ -0,0 +1,45 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -695,7 +695,6 @@ libs/gst/net/Makefile
    + plugins/Makefile
    + plugins/indexers/Makefile
    + plugins/elements/Makefile
    +-po/Makefile.in
    + tests/Makefile
    + tests/benchmarks/Makefile
    + tests/check/Makefile
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -8,14 +8,12 @@ aclocal_DATA = gst-element-check-@GST_MA
    + 
    + SUBDIRS = pkgconfig \
    + 	gst libs plugins tools \
    +-	po \
    + 	m4 \
    + 	common
    + 
    + # These are all the possible subdirs
    + DIST_SUBDIRS = pkgconfig \
    + 	gst libs plugins tools \
    +-	po \
    + 	m4 \
    + 	common
    + 
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -445,7 +445,6 @@ aclocaldir = $(datadir)/aclocal
    + aclocal_DATA = gst-element-check-@GST_MAJORMINOR@.m4
    + SUBDIRS = pkgconfig \
    + 	gst libs plugins tools \
    +-	po \
    + 	m4 \
    + 	common
    + 
    +@@ -453,7 +452,6 @@ SUBDIRS = pkgconfig \
    + # These are all the possible subdirs
    + DIST_SUBDIRS = pkgconfig \
    + 	gst libs plugins tools \
    +-	po \
    + 	m4 \
    + 	common
    + 
    diff --git a/multimedia/hasciicam/Makefile b/multimedia/hasciicam/Makefile
    new file mode 100644
    index 0000000..e0fd9c2
    --- /dev/null
    +++ b/multimedia/hasciicam/Makefile
    @@ -0,0 +1,42 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=hasciicam
    +PKG_REV:=262f56eb307f9a0d4bee04d38e0adde7e4257d87
    +PKG_VERSION:=20080922
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=git://git.dyne.org/$(PKG_NAME).git
    +PKG_SOURCE_PROTO:=git
    +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
    +PKG_SOURCE_VERSION:=$(PKG_REV)
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/hasciicam
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  TITLE:=Live ASCII video feeds
    +  URL:=http://ascii.dyne.org/
    +  DEPENDS:= +libaa
    +endef
    +
    +
    +CONFIGURE_VARS += \
    +	LIBS="-lncurses" \
    +
    +define Package/hasciicam/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hasciicam $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,hasciicam))
    diff --git a/multimedia/icecast/Makefile b/multimedia/icecast/Makefile
    new file mode 100644
    index 0000000..684bede
    --- /dev/null
    +++ b/multimedia/icecast/Makefile
    @@ -0,0 +1,87 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=icecast
    +PKG_VERSION:=2.3.2
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/icecast/
    +PKG_MD5SUM:=ff516b3ccd2bcc31e68f460cd316093f
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +TREMOR_BUILD_DIR=$(PKG_BUILD_DIR)/libvorbisidec-1.2.0-dave
    +TREMOR_DIR=$(TREMOR_BUILD_DIR)/ipkg-install/usr
    +
    +define Package/icecast
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  DEPENDS:=+libcurl +libxml2 +libxslt +libogg
    +  TITLE:=A streaming media server for Ogg/Vorbis and MP3 audio streams
    +  URL:=http://www.icecast.org/
    +endef
    +
    +define Package/icecast/description
    +	Icecast is a streaming media server which currently supports Ogg 
    +	Vorbis and MP3 audio streams. It can be used to create an Internet 
    +	radio station or a privately running jukebox and many things in 
    +	between. It is very versatile in that new formats can be added 
    +	relatively easily and supports open standards for commuincation and 
    +	interaction.
    +endef
    +
    +define Build/Prepare
    +	$(Build/Prepare/Default)
    +	$(SUBMAKE) -f libvorbisidec.mk \
    +		BUILD_DIR="$(PKG_BUILD_DIR)" \
    +		V=99 \
    +		prepare
    +endef
    +
    +define Build/Configure
    +	$(MAKE) -f libvorbisidec.mk \
    +		BUILD_DIR="$(PKG_BUILD_DIR)" \
    +		V=99 \
    +		compile
    +	$(SED) 's,-lvorbis ,$(TREMOR_DIR)/lib/libvorbisidec.a -logg ,g' $(PKG_BUILD_DIR)/configure
    +	$(call Build/Configure/Default, \
    +		--enable-yp \
    +		--with-curl="yes" \
    +		--with-curl-config="$(STAGING_DIR)/usr/bin/curl-config" \
    +		--with-ogg="$(STAGING_DIR)/usr" \
    +		--with-speex="no" \
    +		--with-theora="no" \
    +		--with-vorbis="$(TREMOR_DIR)" \
    +		--with-xslt-config="$(STAGING_DIR)/usr/bin/xslt-config" \
    +		, \
    +		CPPFLAGS="-I$(TREMOR_DIR)/include -I$(STAGING_DIR)/usr/include/libxml2 $(TARGET_CPPFLAGS)" \
    +	)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		INCLUDES="-I$(PKG_BUILD_DIR)/src -I$(TREMOR_DIR)/include" \
    +		all install
    +endef
    +
    +define Package/icecast/install	
    +	$(INSTALL_DIR) $(1)/etc
    +	$(CP) $(PKG_INSTALL_DIR)/etc/icecast.xml $(1)/etc/
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icecast $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/share/icecast
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/admin $(1)/usr/share/icecast/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/web $(1)/usr/share/icecast/
    +endef
    +
    +$(eval $(call BuildPackage,icecast))
    diff --git a/multimedia/icecast/libvorbisidec.mk b/multimedia/icecast/libvorbisidec.mk
    new file mode 100644
    index 0000000..eda6e76
    --- /dev/null
    +++ b/multimedia/icecast/libvorbisidec.mk
    @@ -0,0 +1,41 @@
    +# 
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=icecast-libvorbisidec
    +PKG_VERSION:=1.2.0-dave
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=libvorbisidec-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://users.tpg.com.au/davico/openwrt/
    +PKG_MD5SUM:=cb8e51aab92ef164f8e0e8853f7164fa
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/libvorbisidec-$(PKG_VERSION)
    +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
    +PATCH_DIR=./patches-libvorbisidec
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--disable-shared \
    +		--enable-static \
    +	)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Build/InstallDev
    +	true
    +endef
    +
    +$(eval $(call Build/DefaultTargets))
    diff --git a/multimedia/icecast/patches/001-icecast-2.3.0-tremor.patch b/multimedia/icecast/patches/001-icecast-2.3.0-tremor.patch
    new file mode 100644
    index 0000000..a8cc267
    --- /dev/null
    +++ b/multimedia/icecast/patches/001-icecast-2.3.0-tremor.patch
    @@ -0,0 +1,159 @@
    +diff -urN icecast-2.3.2/src/format_flac.c icecast-2.3.2.new/src/format_flac.c
    +--- icecast-2.3.2/src/format_flac.c	2006-09-21 03:49:16.000000000 +0200
    ++++ icecast-2.3.2.new/src/format_flac.c	2008-09-29 19:43:54.000000000 +0200
    +@@ -18,7 +18,7 @@
    + #endif
    + 
    + #include 
    +-#include 
    ++#include 
    + #include 
    + 
    + typedef struct source_tag source_t;
    +diff -urN icecast-2.3.2/src/format_midi.c icecast-2.3.2.new/src/format_midi.c
    +--- icecast-2.3.2/src/format_midi.c	2006-09-21 03:49:16.000000000 +0200
    ++++ icecast-2.3.2.new/src/format_midi.c	2008-09-29 19:44:15.000000000 +0200
    +@@ -18,7 +18,7 @@
    + #endif
    + 
    + #include 
    +-#include 
    ++#include 
    + #include 
    + 
    + typedef struct source_tag source_t;
    +diff -urN icecast-2.3.2/src/format_ogg.c icecast-2.3.2.new/src/format_ogg.c
    +--- icecast-2.3.2/src/format_ogg.c	2008-04-19 15:45:30.000000000 +0200
    ++++ icecast-2.3.2.new/src/format_ogg.c	2008-09-29 19:44:32.000000000 +0200
    +@@ -24,7 +24,7 @@
    + #include 
    + #include 
    + 
    +-#include 
    ++#include 
    + 
    + #include "refbuf.h"
    + #include "source.h"
    +diff -urN icecast-2.3.2/src/format_ogg.h icecast-2.3.2.new/src/format_ogg.h
    +--- icecast-2.3.2/src/format_ogg.h	2006-09-21 03:49:16.000000000 +0200
    ++++ icecast-2.3.2.new/src/format_ogg.h	2008-09-29 19:44:38.000000000 +0200
    +@@ -18,7 +18,7 @@
    + #ifndef __FORMAT_OGG_H__
    + #define __FORMAT_OGG_H__
    + 
    +-#include 
    ++#include 
    + #include "refbuf.h"
    + #include "format.h"
    + 
    +diff -urN icecast-2.3.2/src/format_speex.c icecast-2.3.2.new/src/format_speex.c
    +--- icecast-2.3.2/src/format_speex.c	2007-10-04 04:07:57.000000000 +0200
    ++++ icecast-2.3.2.new/src/format_speex.c	2008-09-29 19:44:56.000000000 +0200
    +@@ -18,7 +18,7 @@
    + #endif
    + 
    + #include 
    +-#include 
    ++#include 
    + #include 
    + 
    + typedef struct source_tag source_t;
    +diff -urN icecast-2.3.2/src/format_theora.c icecast-2.3.2.new/src/format_theora.c
    +--- icecast-2.3.2/src/format_theora.c	2006-09-21 03:49:16.000000000 +0200
    ++++ icecast-2.3.2.new/src/format_theora.c	2008-09-29 19:46:36.000000000 +0200
    +@@ -18,7 +18,7 @@
    + #endif
    + 
    + #include 
    +-#include 
    ++#include 
    + #include 
    + 
    + typedef struct source_tag source_t;
    +diff -urN icecast-2.3.2/src/format_vorbis.c icecast-2.3.2.new/src/format_vorbis.c
    +--- icecast-2.3.2/src/format_vorbis.c	2007-09-13 00:40:55.000000000 +0200
    ++++ icecast-2.3.2.new/src/format_vorbis.c	2008-09-29 19:47:25.000000000 +0200
    +@@ -18,8 +18,8 @@
    + #endif
    + 
    + #include 
    +-#include 
    +-#include 
    ++#include 
    ++#include 
    + #include 
    + #include 
    + 
    +diff -urN icecast-2.3.2/src/source.c icecast-2.3.2.new/src/source.c
    +--- icecast-2.3.2/src/source.c	2008-05-15 15:25:04.000000000 +0200
    ++++ icecast-2.3.2.new/src/source.c	2008-09-29 19:47:40.000000000 +0200
    +@@ -19,7 +19,7 @@
    + #include 
    + #include 
    + #include 
    +-#include 
    ++#include 
    + #include 
    + 
    + #ifndef _WIN32
    +--- icecast-2.3.2/configure	2008-05-27 02:21:57.000000000 +0200
    ++++ icecast-2.3.2.new/configure	2008-09-29 20:05:43.000000000 +0200
    +@@ -22199,7 +22199,7 @@
    + if test "${xt_cv_lib_ogg+set}" = set; then
    +   echo $ECHO_N "(cached) $ECHO_C" >&6
    + else
    +-  OGG_LIBS="-logg"
    ++  OGG_LIBS="-lvorbisidec"
    + 
    + #
    + # check if the installed Ogg is sufficiently new.
    +@@ -22261,7 +22261,7 @@
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-#include 
    ++#include 
    + int
    + main ()
    + {
    +@@ -22410,9 +22410,9 @@
    + 
    + fi
    + 
    +-VORBIS_LIBS="-lvorbis"
    +-VORBISFILE_LIBS="-lvorbisfile"
    +-VORBISENC_LIBS="-lvorbisenc"
    ++VORBIS_LIBS="-lvorbisidec"
    ++VORBISFILE_LIBS="-lvorbisidec"
    ++VORBISENC_LIBS="-lvorbisidec"
    + 
    + xt_save_LIBS="$LIBS"
    + xt_save_LDFLAGS="$LDFLAGS"
    +@@ -22537,14 +22537,13 @@
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    + 
    +-#include 
    +-#include 
    ++#include 
    + 
    + int
    + main ()
    + {
    + 
    +-struct ovectl_ratemanage_arg a;
    ++/*struct ovectl_ratemanage_arg a;*/
    + 
    +   ;
    +   return 0;
    +--- icecast-2.3.2/src/format_kate.c	2008-04-18 18:29:28.000000000 +0200
    ++++ icecast-2.3.2.new/src/format_kate.c	2008-10-01 08:27:00.000000000 +0200
    +@@ -19,7 +19,7 @@
    + 
    + #include 
    + #include 
    +-#include 
    ++#include 
    + #ifdef HAVE_KATE
    + #include 
    + #endif
    diff --git a/multimedia/icecast/patches/010-fix_libcurl_test_crap.patch b/multimedia/icecast/patches/010-fix_libcurl_test_crap.patch
    new file mode 100644
    index 0000000..15bb534
    --- /dev/null
    +++ b/multimedia/icecast/patches/010-fix_libcurl_test_crap.patch
    @@ -0,0 +1,11 @@
    +--- a/m4/xiph_curl.m4
    ++++ b/m4/xiph_curl.m4
    +@@ -52,7 +52,7 @@
    + AC_MSG_CHECKING(for libcurl)
    + if test "$curl_ok" = "yes"
    + then
    +-    AC_RUN_IFELSE(AC_LANG_SOURCE([
    ++    AC_COMPILE_IFELSE(AC_LANG_SOURCE([
    + #include 
    + int main()
    + {
    diff --git a/multimedia/imagemagick/Makefile b/multimedia/imagemagick/Makefile
    new file mode 100644
    index 0000000..47c6b9f
    --- /dev/null
    +++ b/multimedia/imagemagick/Makefile
    @@ -0,0 +1,149 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=imagemagick
    +PKG_VERSION:=6.6.7
    +PKG_REVISION:=3
    +PKG_RELEASE:=1
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/ImageMagick-$(PKG_VERSION)-$(PKG_REVISION)
    +PKG_SOURCE:=ImageMagick-$(PKG_VERSION)-$(PKG_REVISION).tar.bz2
    +PKG_SOURCE_URL:=ftp://ftp.fifi.org/pub/ImageMagick/
    +PKG_MD5SUM:=
    +
    +PKG_FIXUP:=libtool
    +PKG_REMOVE_FILES:=aclocal.m4 m4/libtool.m4
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +PKG_INSTALL=1
    +
    +define Package/imagemagick/Default
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  TITLE:=imagemagick
    +  URL:=http://image_magick.veidrodis.com/
    +endef
    +
    +define Package/imagemagick
    +  $(call Package/imagemagick/Default)
    +endef
    +
    +define Package/imagemagick/description
    +  An image manipulation library.
    +endef
    +
    +define Package/imagemagick-jpeg
    +  $(call Package/imagemagick/Default)
    +  TITLE+= (jpeg)
    +  DEPENDS:=+imagemagick +libjpeg +zlib
    +endef
    +
    +define Package/imagemagick-jpeg/description
    +  imagemagick JPEG module
    +endef
    +
    +define Package/imagemagick-png
    +  $(call Package/imagemagick/Default)
    +  TITLE+= (png)
    +  DEPENDS:=+imagemagick +libpng +zlib
    +endef
    +
    +define Package/imagemagick-png/description
    +  imagemagick PNG module
    +endef
    +
    +define Package/imagemagick-tools
    +  $(call Package/imagemagick/Default)
    +  TITLE+= (tools)
    +  DEPENDS:=+imagemagick
    +endef
    +
    +define Package/imagemagick-png/description
    +  imagemagick tools (mogrify,convert)
    +endef
    +
    +define Package/imagemagick-tiff
    +  $(call Package/imagemagick/Default)
    +  TITLE+= (tiff)
    +  DEPENDS:=+imagemagick +libtiff +zlib
    +endef
    +
    +define Package/imagemagick-tiff/description
    +  imagemagick TIFF module
    +endef
    +
    +
    +CONFIGURE_ARGS += \
    +	  --with-modules \
    +	  --enable-shared \
    +	  --enable-static \
    +	  --without-xml \
    +	  --without-x
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		CC="$(TARGET_CC)" \
    +		CFLAGS="$(TARGET_CFLAGS) -Wall -I$(PKG_BUILD_DIR)/include/linux -I$(PKG_BUILD_DIR)/include"
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/magick
    +	$(INSTALL_DIR) $(1)/usr/include/Magick++
    +	$(INSTALL_DIR) $(1)/usr/include/wand
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/include/* \
    +		$(1)/usr/include/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
    +		$(1)/usr/lib/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
    +	$(INSTALL_DATA) \
    +		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
    +		$(1)/usr/lib/pkgconfig/
    +endef
    +
    +define Package/imagemagick/install
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/*.so* \
    +		$(1)/usr/lib/
    +endef
    +
    +define Package/imagemagick-tools/install
    +	$(INSTALL_DIR) $(1)/usr/bin/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/bin/mogrify \
    +		$(1)/usr/bin/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/bin/convert \
    +		$(1)/usr/bin/
    +endef
    +
    +define BuildPlugin
    +  define Package/imagemagick-$(1)/install
    +	$(INSTALL_DIR) $$(1)/usr/lib/ImageMagick-$(PKG_VERSION)/modules-Q16/coders
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/ImageMagick-$(PKG_VERSION)/modules-Q16/coders/$(1).so \
    +		$$(1)/usr/lib/ImageMagick-$(PKG_VERSION)/modules-Q16/coders
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/ImageMagick-$(PKG_VERSION)/modules-Q16/coders/$(1).la \
    +		$$(1)/usr/lib/ImageMagick-$(PKG_VERSION)/modules-Q16/coders
    +  endef
    +
    +  $$(eval $$(call BuildPackage,imagemagick-$(1)))
    +endef
    +
    +$(eval $(call BuildPackage,imagemagick))
    +$(eval $(call BuildPackage,imagemagick-tools))
    +$(eval $(call BuildPlugin,jpeg))
    +$(eval $(call BuildPlugin,png))
    +$(eval $(call BuildPlugin,tiff))
    +
    diff --git a/multimedia/kissdx/Makefile b/multimedia/kissdx/Makefile
    new file mode 100644
    index 0000000..854732f
    --- /dev/null
    +++ b/multimedia/kissdx/Makefile
    @@ -0,0 +1,55 @@
    +#
    +# Copyright (C) 2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=kissdx
    +PKG_VERSION:=0.14.0.b1a
    +PKG_RELEASE:=7
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
    +PKG_SOURCE_URL:=http://kissdx.vidartysse.net
    +PKG_MD5SUM:=ef213d2748f5a63b1c97ac7bfa942b2f
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/kissdx
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  DEPENDS:=+libjpeg +libdvdread $(ICONV_DEPENDS)
    +  TITLE:=PC-Link clone for KiSS media players
    +  URL:=http://kissdx.vidartysse.net
    +endef
    +
    +define Package/kissdx/description
    +	kissdx is a PC-Link clone for KiSS media players, based for
    +	the most part on kissd (which it now replaces), with added
    +	features for media playback, management, flexibility and more.
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		CFLAGS="$(TARGET_CFLAGS) -DLinux -DUSE_INTERNAL_SENDFILE -std=gnu99 -Wall -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DFILE_OFFSET_BITS=64 -D_GNU_SOURCE -I$(ICONV_PREFIX)/include -I$(STAGING_DIR)/usr/include/dvdread $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) -L$(ICONV_PREFIX)/lib" \
    +		LDFLAGS="-L$(ICONV_PREFIX)/lib $(TARGET_LDFLAGS)" \
    +		STRIP=$(STRIP) \
    +		CC="$(TARGET_CROSS)gcc" all
    +endef
    +
    +define Package/kissdx/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/kissdx $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_DATA) ./files/kissdx.config $(1)/etc/config/kissdx
    +	$(INSTALL_BIN) ./files/kissdx.init $(1)/etc/init.d/kissdx
    +endef
    +
    +$(eval $(call BuildPackage,kissdx))
    diff --git a/multimedia/kissdx/files/kissdx.config b/multimedia/kissdx/files/kissdx.config
    new file mode 100644
    index 0000000..5cce426
    --- /dev/null
    +++ b/multimedia/kissdx/files/kissdx.config
    @@ -0,0 +1,32 @@
    +config 'kissdx' 'server'
    +	option 'signature' 'kissdx {Version} ({VersionDate}) @ {ShortHostName} {ConfigReloadStatus}'
    +	option 'pidfile' '/var/run/kissdx.pid'
    +	option 'characterset' 'ISO-8859-1'
    +	option 'picturetargetwidth' '1280'
    +	option 'picturetargetheight' '720'
    +	option 'picturemaxzoompercent' '20'
    +	option 'enablehiddenfilestext' 'Show it all'
    +	option 'enablehiddenfilesminutes' '5'
    +	option 'listhiddenentries' 'no'
    +	option 'displaysequencenumbers' 'no'
    +	
    +config 'kissdx' 'paths'
    +	option 'audio' '/mnt/music'
    +	option 'video' '/mnt/movies'
    +	option 'picture' '/mnt/photos'
    +
    +config 'kissdx' 'files'
    +	option 'audio' 'mp3,ogg,wma,wav'
    +	option 'video' 'mpg,mpeg,vob,avi,wmv,ts,mp4,divx'
    +	option 'picture' 'jpg,jpeg,png,bmp'
    +	option 'iso' 'iso,img'
    +
    +config 'kissdx' 'subtitles'
    +	option 'filemapping' '*:{name}*.*'
    +
    +config 'kissdx' 'recentfiles'
    +	option 'foldername' '[Recently played]'
    +	option 'max' '30'
    +
    +config 'kissdx' 'kml'
    +	option 'forwardurl' 'http://tinystocks.com/k/kiss.php'
    diff --git a/multimedia/kissdx/files/kissdx.init b/multimedia/kissdx/files/kissdx.init
    new file mode 100755
    index 0000000..c3b5dcb
    --- /dev/null
    +++ b/multimedia/kissdx/files/kissdx.init
    @@ -0,0 +1,106 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2008 OpenWrt.org
    +
    +START=65
    +CFGFILE=/tmp/kissdx.conf
    +
    +create_configfile() {
    +	local signature pidfile characterset \
    +		picturetargetwidth picturetargetheight picturemaxzoompercent \
    +		enablehiddenfilestext enablehiddenfilesminutes \
    +		listhiddenentries displaysequencenumbers
    +	local path_audio path_video path_picture
    +	local files_audio files_video files_picture files_iso
    +	local subtitles_filemapping
    +	local recentfiles_foldername recentfiles_max
    +	local kml_forwardurl
    +
    +	echo '### AUTOGENERATED CONFIGURATION FILE - DO NOT EDIT ###' > $CFGFILE
    +	echo '### Edit /etc/config/kissdx to make changes to setup ###' >> $CFGFILE
    +	echo '' >> $CFGFILE
    +
    +	config_get signature server signature
    +	config_get pidfile server pidfile
    +	config_get characterset server characterset
    +	config_get picturetargetwidth server picturetargetwidth
    +	config_get picturetargetheight server picturetargetheight
    +	config_get picturemaxzoompercent server picturemaxzoompercent
    +	config_get enablehiddenfilestext server enablehiddenfilestext
    +	config_get enablehiddenfilesminutes server enablehiddenfilesminutes
    +	config_get listhiddenentries server listhiddenentries
    +	config_get displaysequencenumbers server displaysequencenumbers
    +
    +	config_get path_audio paths audio
    +	config_get path_video paths video
    +	config_get path_picture paths picture
    +
    +	config_get files_audio files audio
    +	config_get files_video files video
    +	config_get files_picture files picture
    +	config_get files_iso files iso
    +
    +	config_get subtitles_filemapping subtitles filemapping
    +
    +	config_get recentfiles_foldername recentfiles foldername
    +	config_get recentfiles_max recentfiles max
    +
    +	config_get kml_forwardurl kml forwardurl
    +
    +	echo 'serversignature		= ' $signature >> $CFGFILE
    +	echo '#listenaddress		= 192.168.1.2' >> $CFGFILE
    +	echo '#networktimeoutinterval	= 3600' >> $CFGFILE
    +	echo '#adminserver_port	= 8003' >> $CFGFILE
    +	echo 'configautoload		= no' >> $CFGFILE
    +	echo '#dvdaccessmethod	= libdvdnav' >> $CFGFILE
    +	echo '#renamefiletypes	= ts:mpg,wav:mp3' >> $CFGFILE
    +	echo 'pidfilepath		= ' $pidfile >> $CFGFILE
    +	echo '#persistentstoragepath	= /tmp/kissdx' >> $CFGFILE
    +	echo '#server_character_set	= CP850' >> $CFGFILE
    +	echo '#client_character_set	= ISO-8859-1' >> $CFGFILE
    +	echo 'config_character_set	= ' $characterset >> $CFGFILE
    +	echo 'playlist_character_set	= ' $characterset >> $CFGFILE
    +	echo 'displaysequencenumbers	= ' $displaysequencenumbers >> $CFGFILE
    +	echo '' >> $CFGFILE
    +	echo '# 0 = caching disabled, -1 = no limit or amount of pictures in cache' >> $CFGFILE
    +	echo 'picturecachesize 	= 0' >> $CFGFILE
    +	echo '#picturecachetrimminginterval = 10' >> $CFGFILE
    +	echo '' >> $CFGFILE
    +	echo 'audiopath		= ' $path_audio >> $CFGFILE
    +	echo 'videopath		= ' $path_video >>  $CFGFILE
    +	echo 'picturepath		= ' $path_picture >> $CFGFILE
    +	echo '' >> $CFGFILE
    +	echo 'audiofileextensions	= ' $files_audio >> $CFGFILE
    +	echo 'videofileextensions	= ' $files_video >> $CFGFILE
    +	echo 'picturefileextensions	= ' $files_picture >> $CFGFILE
    +	echo 'isofileextensions	= ' $files_iso >> $CFGFILE
    +	echo '' >> $CFGFILE
    +	echo 'listhiddenentries	= ' $listhiddenentries >> $CFGFILE
    +	echo 'enablehiddenfilestext	= ' $enablehiddenfilestext >> $CFGFILE
    +	echo 'enablehiddenfilesminutes = ' $enablehiddenfilesminutes >> $CFGFILE
    +	echo '' >> $CFGFILE
    +	echo 'picturetargetwidth	= ' $picturetargetwidth >> $CFGFILE
    +	echo 'picturetargetheight	= ' $picturetargetheight >> $CFGFILE
    +	echo 'picturemaxzoompercent	= ' $picturemaxzoompercent >> $CFGFILE
    +	echo '' >> $CFGFILE
    +	echo 'subtitlefilemapping	= ' $subtitles_filemapping >> $CFGFILE
    +	echo '' >> $CFGFILE
    +	echo 'recentlyusedfoldername	= ' $recentfiles_foldername >> $CFGFILE
    +	echo 'max_recent_files	= ' $recentfiles_max >> $CFGFILE
    +	echo '' >> $CFGFILE
    +	echo 'kmlforwardurl		= ' $kml_forwardurl >> $CFGFILE
    +	echo '' >> $CFGFILE
    +	echo '#pretrigger		= /usr/bin/kissd-pretrigger' >> $CFGFILE
    +	echo '#posttrigger		= /usr/bin/kissd-posttrigger' >> $CFGFILE
    +	echo '#directorypretrigger	= /usr/bin/kissddirpretrigger' >> $CFGFILE
    +	echo '#directoryposttrigger	= /usr/bin/kisdddirposttrigger' >> $CFGFILE	
    +}
    +
    +start () {
    +	config_load kissdx
    +	create_configfile
    +	/usr/bin/kissdx -c $CFGFILE -d
    +}
    +
    +stop() {
    +	killall -9 kissdx
    +}
    diff --git a/multimedia/kissdx/patches/001-cross_compile.patch b/multimedia/kissdx/patches/001-cross_compile.patch
    new file mode 100644
    index 0000000..55db9fc
    --- /dev/null
    +++ b/multimedia/kissdx/patches/001-cross_compile.patch
    @@ -0,0 +1,15 @@
    +diff -Naur kissdx-0.14.0.b1a.orig/Makefile kissdx-0.14.0.b1a/Makefile
    +--- kissdx-0.14.0.b1a.orig/Makefile	2007-10-24 00:13:33.000000000 +0300
    ++++ kissdx-0.14.0.b1a/Makefile	2009-03-05 22:53:51.000000000 +0200
    +@@ -27,9 +27,9 @@
    + 
    + kissdx: $(OBJS)
    + # remove -liconv below if your system has libiconv built in
    +-	$(CC) -o $@ $(OBJS) -ldvdread -liconv -ljpeg -lm $(EXTRA_LIBS) 
    ++	$(CC) -o $@ $(OBJS) -ldvdread -liconv -ljpeg -lm $(LDFLAGS) $(EXTRA_LIBS) 
    + #	$(CC) -o $@ $(OBJS) -ldvdread -ljpeg -lm $(EXTRA_LIBS) 
    +-	strip kissdx.exe
    ++	$(STRIP) kissdx
    + 
    + all: kissdx
    + 
    diff --git a/multimedia/linux-uvc/Makefile b/multimedia/linux-uvc/Makefile
    new file mode 100644
    index 0000000..1331abf
    --- /dev/null
    +++ b/multimedia/linux-uvc/Makefile
    @@ -0,0 +1,42 @@
    +#
    +# Copyright (C) 2007-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +include $(INCLUDE_DIR)/kernel.mk
    +
    +PKG_NAME:=linux-uvc
    +PKG_REV:=261
    +PKG_VERSION:=r$(PKG_REV)
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://svn.berlios.de/svnroot/repos/linux-uvc/linux-uvc/trunk/
    +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
    +PKG_SOURCE_VERSION:=$(PKG_REV)
    +PKG_SOURCE_PROTO:=svn
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define KernelPackage/video-uvc-obsolete
    +  SUBMENU:=Video Support
    +  TITLE:=USB Video Class (UVC) support (obsolete)
    +  URL:=http://linux-uvc.berlios.de/
    +  DEPENDS:=@LINUX_2_6_23||LINUX_2_6_24||LINUX_2_6_25 @USB_SUPPORT +kmod-usb-core +kmod-video-core
    +  FILES:=$(PKG_BUILD_DIR)/uvcvideo.$(LINUX_KMOD_SUFFIX)
    +  AUTOLOAD:=$(call AutoLoad,90,uvcvideo)
    +endef
    +
    +define Build/Compile
    +	echo "#define DRIVER_VERSION	\"SVN $(PKG_VERSION)\"" > "$(PKG_BUILD_DIR)/version.h"
    +	$(MAKE) -C $(LINUX_DIR) \
    +		ARCH="$(LINUX_KARCH)" \
    +		CROSS_COMPILE="$(TARGET_CROSS)" \
    +		SUBDIRS="$(PKG_BUILD_DIR)" \
    +		modules
    +endef
    +
    +$(eval $(call KernelPackage,video-uvc-obsolete))
    diff --git a/multimedia/minidlna/Makefile b/multimedia/minidlna/Makefile
    new file mode 100644
    index 0000000..e027dbf
    --- /dev/null
    +++ b/multimedia/minidlna/Makefile
    @@ -0,0 +1,55 @@
    +# 
    +# Copyright (C) 2010-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=minidlna
    +PKG_VERSION:=1.0.19
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_src.tar.gz
    +PKG_SOURCE_URL:=@SF/minidlna
    +PKG_MD5SUM:=8bb5f2c0abc009e16039d7deecf09cf6
    +
    +PKG_BUILD_PARALLEL:=0
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +MAKE_VARS += \
    +	ICONV_PREFIX="$(ICONV_PREFIX)" \
    +	INTL_PREFIX="$(INTL_PREFIX)"
    +
    +define Package/minidlna
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  TITLE:=UPnP A/V & DLNA Media Server
    +  URL:=http://minidlna.sourceforge.net/
    +  DEPENDS:= +libpthread +libexif +libjpeg +libsqlite3 +libffmpeg \
    +  	+@FFMPEG_MINIDLNA_SUPPORT +libid3tag +libflac +libvorbis +libuuid \
    +  	$(ICONV_DEPENDS) $(INTL_DEPENDS)
    +endef
    +
    +define Package/minidlna/description
    +  MiniDLNA (aka ReadyDLNA) is server software with the aim of
    +  being fully compliant with DLNA/UPnP-AV clients.
    +endef
    +
    +define Package/minidlna/conffiles
    +/etc/minidlna.conf
    +endef
    +
    +define Package/minidlna/install
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/minidlna.conf $(1)/etc/
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/minidlna $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/minidlna.init $(1)/etc/init.d/minidlna
    +endef
    +
    +$(eval $(call BuildPackage,minidlna))
    diff --git a/multimedia/minidlna/files/minidlna.init b/multimedia/minidlna/files/minidlna.init
    new file mode 100644
    index 0000000..2218f46
    --- /dev/null
    +++ b/multimedia/minidlna/files/minidlna.init
    @@ -0,0 +1,15 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2010 OpenWrt.org
    +
    +START=50
    +BIN=/usr/bin/minidlna
    +PID=/var/run/minidlna.pid
    +SSD=start-stop-daemon
    +
    +start() {
    +	$SSD -p $PID -S -x $BIN -- -P $PID -R
    +}
    +
    +stop() {
    +	$SSD -p $PID -K -s SIGINT
    +}
    diff --git a/multimedia/minidlna/patches/010-genconfig-checks.patch b/multimedia/minidlna/patches/010-genconfig-checks.patch
    new file mode 100644
    index 0000000..b3dd305
    --- /dev/null
    +++ b/multimedia/minidlna/patches/010-genconfig-checks.patch
    @@ -0,0 +1,41 @@
    +--- a/genconfig.sh
    ++++ b/genconfig.sh
    +@@ -41,22 +41,22 @@ ${RM} ${CONFIGFILE}
    + 
    + # Detect if there are missing headers
    + # NOTE: This check only works with a normal distro
    +-[ ! -e "/usr/include/sqlite3.h" ] && MISSING="libsqlite3 $MISSING"
    +-[ ! -e "/usr/include/jpeglib.h" ] && MISSING="libjpeg $MISSING"
    +-[ ! -e "/usr/include/libexif/exif-loader.h" ] && MISSING="libexif $MISSING"
    +-[ ! -e "/usr/include/id3tag.h" ] && MISSING="libid3tag $MISSING"
    +-[ ! -e "/usr/include/ogg/ogg.h" ] && MISSING="libogg $MISSING"
    +-[ ! -e "/usr/include/vorbis/codec.h" ] && MISSING="libvorbis $MISSING"
    +-[ ! -e "/usr/include/FLAC/metadata.h" ] && MISSING="libflac $MISSING"
    +-[ ! -e "/usr/include/ffmpeg/avutil.h" -a \
    +-  ! -e "/usr/include/libavutil/avutil.h" -a \
    +-  ! -e "/usr/include/ffmpeg/libavutil/avutil.h" ] && MISSING="libavutil $MISSING"
    +-[ ! -e "/usr/include/ffmpeg/avformat.h" -a \
    +-  ! -e "/usr/include/libavformat/avformat.h" -a \
    +-  ! -e "/usr/include/ffmpeg/libavformat/avformat.h" ] && MISSING="libavformat $MISSING"
    +-[ ! -e "/usr/include/ffmpeg/avcodec.h" -a \
    +-  ! -e "/usr/include/libavcodec/avcodec.h" -a \
    +-  ! -e "/usr/include/ffmpeg/libavcodec/avcodec.h" ] && MISSING="libavcodec $MISSING"
    ++[ ! -e "${STAGING_DIR}/usr/include/sqlite3.h" ] && MISSING="libsqlite3 $MISSING"
    ++[ ! -e "${STAGING_DIR}/usr/include/jpeglib.h" ] && MISSING="libjpeg $MISSING"
    ++[ ! -e "${STAGING_DIR}/usr/include/libexif/exif-loader.h" ] && MISSING="libexif $MISSING"
    ++[ ! -e "${STAGING_DIR}/usr/include/id3tag.h" ] && MISSING="libid3tag $MISSING"
    ++[ ! -e "${STAGING_DIR}/usr/include/ogg/ogg.h" ] && MISSING="libogg $MISSING"
    ++[ ! -e "${STAGING_DIR}/usr/include/vorbis/codec.h" ] && MISSING="libvorbis $MISSING"
    ++[ ! -e "${STAGING_DIR}/usr/include/FLAC/metadata.h" ] && MISSING="libflac $MISSING"
    ++[ ! -e "${STAGING_DIR}/usr/include/ffmpeg/avutil.h" -a \
    ++  ! -e "${STAGING_DIR}/usr/include/libavutil/avutil.h" -a \
    ++  ! -e "${STAGING_DIR}/usr/include/ffmpeg/libavutil/avutil.h" ] && MISSING="libavutil $MISSING"
    ++[ ! -e "${STAGING_DIR}/usr/include/ffmpeg/avformat.h" -a \
    ++  ! -e "${STAGING_DIR}/usr/include/libavformat/avformat.h" -a \
    ++  ! -e "${STAGING_DIR}/usr/include/ffmpeg/libavformat/avformat.h" ] && MISSING="libavformat $MISSING"
    ++[ ! -e "${STAGING_DIR}/usr/include/ffmpeg/avcodec.h" -a \
    ++  ! -e "${STAGING_DIR}/usr/include/libavcodec/avcodec.h" -a \
    ++  ! -e "${STAGING_DIR}/usr/include/ffmpeg/libavcodec/avcodec.h" ] && MISSING="libavcodec $MISSING"
    + if [ -n "$MISSING" ]; then
    + 	echo -e "\nERROR!  Cannot continue."
    + 	echo -e "The following required libraries are either missing, or are missing development headers:\n"
    diff --git a/multimedia/minidlna/patches/020-makefile-tweaks.patch b/multimedia/minidlna/patches/020-makefile-tweaks.patch
    new file mode 100644
    index 0000000..18d901c
    --- /dev/null
    +++ b/multimedia/minidlna/patches/020-makefile-tweaks.patch
    @@ -0,0 +1,46 @@
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -13,9 +13,22 @@
    + #CFLAGS = -Wall -O -D_GNU_SOURCE -g -DDEBUG
    + #CFLAGS = -Wall -g -Os -D_GNU_SOURCE
    + CFLAGS = -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
    +-	 -I/usr/include/ffmpeg \
    +-	 -I/usr/include/libavutil -I/usr/include/libavcodec -I/usr/include/libavformat \
    +-	 -I/usr/include/ffmpeg/libavutil -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavformat
    ++	 -I$(STAGING_DIR)/usr/include \
    ++	 -I$(STAGING_DIR)/usr/include/FLAC \
    ++	 -I$(STAGING_DIR)/usr/include/libavcodec \
    ++	 -I$(STAGING_DIR)/usr/include/libavformat \
    ++	 -I$(STAGING_DIR)/usr/include/libavutil \
    ++	 -I$(STAGING_DIR)/usr/include/libexif \
    ++	 -I$(STAGING_DIR)/usr/include/uuid \
    ++	 -I$(STAGING_DIR)/usr/include/vorbis \
    ++	 -I$(ICONV_PREFIX)/include \
    ++	 -I$(INTL_PREFIX)/include
    ++LDFLAGS = -L$(STAGING_DIR)/usr/lib \
    ++	 -L$(ICONV_PREFIX)/lib \
    ++	 -L$(INTL_PREFIX)/include \
    ++	 -Wl,-rpath=$(STAGING_DIR)/usr/lib \
    ++	 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
    ++
    + #STATIC_LINKING: CFLAGS += -DSTATIC
    + #STATIC_LINKING: LDFLAGS = -static
    + CC = gcc
    +@@ -37,7 +50,7 @@ BASEOBJS = minidlna.o upnphttp.o upnpdes
    + 
    + ALLOBJS = $(BASEOBJS) $(LNXOBJS)
    + 
    +-LIBS = -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lavutil -lavcodec -lid3tag -lFLAC -logg -lvorbis
    ++LIBS = -liconv -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lavutil -lavcodec -lid3tag -lFLAC -logg -lvorbis -luuid
    + #STATIC_LINKING: LIBS = -lvorbis -logg -lm -lsqlite3 -lpthread -lexif -ljpeg -lFLAC -lm -lid3tag -lz -lavformat -lavutil -lavcodec -lm
    + 
    + TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
    +@@ -62,7 +75,7 @@ install:	minidlna
    + 	$(INSTALL) -d $(ETCINSTALLDIR)
    + 	$(INSTALL) --mode=0644 minidlna.conf $(ETCINSTALLDIR)
    + 
    +-minidlna:	$(BASEOBJS) $(LNXOBJS) $(LIBS)
    ++minidlna:	$(BASEOBJS) $(LNXOBJS)
    + 	@echo Linking $@
    + 	@$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(BASEOBJS) $(LNXOBJS) $(LIBS)
    + 
    diff --git a/multimedia/minidlna/patches/030-missing-include.patch b/multimedia/minidlna/patches/030-missing-include.patch
    new file mode 100644
    index 0000000..a1491ba
    --- /dev/null
    +++ b/multimedia/minidlna/patches/030-missing-include.patch
    @@ -0,0 +1,10 @@
    +--- a/minidlna.c
    ++++ b/minidlna.c
    +@@ -58,6 +58,7 @@
    + #include 
    + #include 
    + #include 
    ++#include 
    + #include 
    + #include 
    + #include 
    diff --git a/multimedia/minidlna/patches/040-configuration-tweak.patch b/multimedia/minidlna/patches/040-configuration-tweak.patch
    new file mode 100644
    index 0000000..cb46849
    --- /dev/null
    +++ b/multimedia/minidlna/patches/040-configuration-tweak.patch
    @@ -0,0 +1,33 @@
    +--- a/minidlna.conf
    ++++ b/minidlna.conf
    +@@ -2,7 +2,7 @@
    + port=8200
    + 
    + # network interface to bind to (this is the only interface that will serve files)
    +-#network_interface=eth0
    ++network_interface=br-lan
    + 
    + # set this to the directory you want scanned.
    + # * if have multiple directories, you can have multiple media_dir= lines
    +@@ -11,10 +11,10 @@ port=8200
    + #   + "A" for audio  (eg. media_dir=A,/home/jmaggard/Music)
    + #   + "V" for video  (eg. media_dir=V,/home/jmaggard/Videos)
    + #   + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
    +-media_dir=/opt
    ++media_dir=/mnt
    + 
    + # set this if you want to customize the name that shows up on your clients
    +-#friendly_name=My DLNA Server
    ++friendly_name=My DLNA Server
    + 
    + # set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
    + #db_dir=/var/cache/minidlna
    +@@ -28,7 +28,7 @@ album_art_names=Cover.jpg/cover.jpg/Albu
    + 
    + # set this to no to disable inotify monitoring to automatically discover new files
    + # note: the default is yes
    +-inotify=yes
    ++inotify=no
    + 
    + # set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
    + enable_tivo=no
    diff --git a/multimedia/mjpg-streamer/Makefile b/multimedia/mjpg-streamer/Makefile
    new file mode 100644
    index 0000000..9578138
    --- /dev/null
    +++ b/multimedia/mjpg-streamer/Makefile
    @@ -0,0 +1,51 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=mjpg-streamer
    +PKG_REV:=136
    +PKG_VERSION:=r$(PKG_REV)
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=https://mjpg-streamer.svn.sourceforge.net/svnroot/mjpg-streamer/mjpg-streamer/
    +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
    +PKG_SOURCE_VERSION:=$(PKG_REV)
    +PKG_SOURCE_PROTO:=svn
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/mjpg-streamer
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  TITLE:=MJPG-streamer
    +  DEPENDS:=@!LINUX_2_4 +libpthread +libjpeg
    +  URL:=http://mjpg-streamer.wiki.sourceforge.net/
    +endef
    +
    +define Package/mjpg-streamer/description
    +	Streaming application for Linux-UVC compatible webcams
    +endef
    +
    +EXTRA_CFLAGS += $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)
    +
    +define Package/mjpg-streamer/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/mjpg_streamer $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(CP) ./files/mjpg-streamer.config $(1)/etc/config/mjpg-streamer
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/mjpg-streamer.init $(1)/etc/init.d/mjpg-streamer
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(foreach input_plugin,file uvc gspcav1,$(PKG_BUILD_DIR)/input_$(input_plugin).so) $(1)/usr/lib
    +	$(CP) $(foreach output_plugin,http file autofocus,$(PKG_BUILD_DIR)/output_$(output_plugin).so) $(1)/usr/lib
    +	$(INSTALL_DIR) $(1)/etc/hotplug.d/usb
    +	$(INSTALL_DATA) ./files/mjpg-streamer.hotplug $(1)/etc/hotplug.d/usb/20-mjpg-streamer
    +endef
    +
    +$(eval $(call BuildPackage,mjpg-streamer))
    diff --git a/multimedia/mjpg-streamer/files/mjpg-streamer.config b/multimedia/mjpg-streamer/files/mjpg-streamer.config
    new file mode 100644
    index 0000000..1b1f7d7
    --- /dev/null
    +++ b/multimedia/mjpg-streamer/files/mjpg-streamer.config
    @@ -0,0 +1,6 @@
    +config mjpg-streamer core
    +	option device		"/dev/video0"
    +	option resolution	"640x480"
    +	option fps		"5"
    +	option port		"8080"
    +	option enabled		"true"
    diff --git a/multimedia/mjpg-streamer/files/mjpg-streamer.hotplug b/multimedia/mjpg-streamer/files/mjpg-streamer.hotplug
    new file mode 100644
    index 0000000..c6f29cc
    --- /dev/null
    +++ b/multimedia/mjpg-streamer/files/mjpg-streamer.hotplug
    @@ -0,0 +1,11 @@
    +case "$ACTION" in
    +	add)
    +	        # start process
    +		/etc/init.d/mjpg-streamer start
    +	        ;;
    +	remove)
    +	        # stop process
    +		/etc/init.d/mjpg-streamer stop
    +	        ;;
    +esac
    +
    diff --git a/multimedia/mjpg-streamer/files/mjpg-streamer.init b/multimedia/mjpg-streamer/files/mjpg-streamer.init
    new file mode 100644
    index 0000000..7b92c89
    --- /dev/null
    +++ b/multimedia/mjpg-streamer/files/mjpg-streamer.init
    @@ -0,0 +1,23 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2009 OpenWrt.org
    +START=50
    +
    +SSD=start-stop-daemon
    +NAME=mjpg_streamer
    +PIDF=/var/run/$NAME.pid
    +PROG=/usr/bin/$NAME
    +
    +start() {
    +	config_load mjpg-streamer
    +	config_get device core device
    +	config_get resolution core resolution
    +	config_get fps core fps
    +	config_get port core port
    +	config_get_bool enabled core enabled
    +	[ $enabled -gt 0 -a -c $device ] && sleep 3 && $SSD -S -m -p $PIDF -q -x $PROG -- --input "input_uvc.so --device $device --fps $fps --resolution $resolution" --output "output_http.so --port $port" &
    +}
    +
    +stop() {
    +	$SSD -K -p $PIDF
    +}
    +
    diff --git a/multimedia/mocp/Makefile b/multimedia/mocp/Makefile
    new file mode 100644
    index 0000000..a95a64d
    --- /dev/null
    +++ b/multimedia/mocp/Makefile
    @@ -0,0 +1,52 @@
    +#
    +# Copyright (C) 2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=moc
    +PKG_VERSION:=2.4.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=ftp://ftp.daper.net/pub/soft/moc/stable/
    +
    +PKG_MD5SUM:=647c770a5542a4ae5437386807a89796
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/moc
    +  SECTION:=sound
    +  CATEGORY:=Sound
    +  DEPENDS:=+libcurl +BUILD_PATENTED:libmad +libvorbis $(ICONV_DEPENDS) +alsa-utils +libid3tag +libflac +libsamplerate +PACKAGE_libncursesw:libncursesw +!PACKAGE_libncursesw:libncurses +libffmpeg
    +  TITLE:=Music On Console
    +endef
    +
    +define Package/moc/description
    +	MOC (music on console) is a console audio player for LINUX/UNIX designed to be powerful and easy to use.
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		$(if $(CONFIG_BUILD_PATENTED),,--without-mp3) \
    +		--enable-shared \
    +		--disable-static \
    +		--disable-debug \
    +	)
    +endef
    +
    +define Package/moc/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mocp $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/lib/moc/decoder_plugins
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/moc/decoder_plugins/*.so $(1)/usr/lib/moc/decoder_plugins
    +endef
    +
    +$(eval $(call BuildPackage,moc))
    diff --git a/multimedia/motion/Makefile b/multimedia/motion/Makefile
    new file mode 100644
    index 0000000..867333f
    --- /dev/null
    +++ b/multimedia/motion/Makefile
    @@ -0,0 +1,49 @@
    +#
    +# Copyright (C) 2008-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=motion
    +PKG_VERSION:=3.2.11.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.lavrsen.dk/sources/motion-daily \
    +		@SF/motion
    +PKG_MD5SUM:=4e729f129d8f9b9abaed5121c3cd0037
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/motion
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  DEPENDS:=+libjpeg +libpthread
    +  TITLE:=webcam motion sensing and logging
    +  URL:=http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
    +endef
    +
    +define Package/motion/conffiles
    +/etc/motion.conf
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--without-ffmpeg \
    +	--without-jpeg-mmx \
    +	--without-mysql \
    +	--without-pgsql \
    +
    +define Package/motion/install
    +	$(INSTALL_DIR) $(1)/etc
    +	$(CP) $(PKG_INSTALL_DIR)/etc/motion-dist.conf $(1)/etc/motion.conf
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/motion $(1)/usr/bin/
    +
    +endef
    +
    +$(eval $(call BuildPackage,motion))
    diff --git a/multimedia/motion/patches/002-honor_cppflags.patch b/multimedia/motion/patches/002-honor_cppflags.patch
    new file mode 100644
    index 0000000..ac10f1e
    --- /dev/null
    +++ b/multimedia/motion/patches/002-honor_cppflags.patch
    @@ -0,0 +1,19 @@
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -31,6 +31,7 @@ examplesdir = $(datadir)/@PACKAGE_NAME@-
    + # install.                                                                     #
    + ################################################################################
    + CFLAGS       = @CFLAGS@ -Wall -DVERSION=\"@PACKAGE_VERSION@\" -Dsysconfdir=\"$(sysconfdir)\" 
    ++CPPFLAGS     = @CPPFLAGS@
    + LDFLAGS      = @LDFLAGS@
    + LIBS         = @LIBS@ 
    + VIDEO_OBJ    = @VIDEO@
    +@@ -118,7 +119,7 @@ endif
    + ################################################################################
    + $(DEPEND_FILE): *.h $(SRC)
    + 	@echo "Generating dependencies, please wait..."
    +-	@$(CC) $(CFLAGS) -M $(SRC) > .tmp
    ++	@$(CC) $(CFLAGS) $(CPPFLAGS) -M $(SRC) > .tmp
    + 	@mv -f .tmp $(DEPEND_FILE)
    + 	@echo
    + 
    diff --git a/multimedia/nw802-2.4/Makefile b/multimedia/nw802-2.4/Makefile
    new file mode 100644
    index 0000000..15ede6d
    --- /dev/null
    +++ b/multimedia/nw802-2.4/Makefile
    @@ -0,0 +1,44 @@
    +# 
    +# Copyright (C) 2006-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +include $(INCLUDE_DIR)/kernel.mk
    +
    +PKG_NAME:=nw802-2.4
    +PKG_VERSION:=0.0.99
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/nw802
    +PKG_MD5SUM:=bf3512efaa48cfa972b16318011c1963
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define KernelPackage/video-nw8xx
    +  SUBMENU:=Video Support
    +  TITLE:=NW8xx based USB webcam support
    +  URL:=http://nw802.sourceforge.net/
    +  DEPENDS:=@LINUX_2_6_25||LINUX_2_6_27||LINUX_2_6_28 @USB_SUPPORT +kmod-usb-video +kmod-video-core
    +  FILES:=$(PKG_BUILD_DIR)/nw8xx.$(LINUX_KMOD_SUFFIX)
    +  AUTOLOAD:=$(call AutoLoad,70,nw8xx)
    +endef
    +
    +define KernelPackage/video-nw8xx/description
    + Kernel support for NW8xx based USB cameras.
    +endef
    +
    +define Build/Compile
    +	ln -sf $(LINUX_DIR)/drivers/media/video/usbvideo/usbvideo.h \
    +		$(PKG_BUILD_DIR)/
    +	$(MAKE) -C $(LINUX_DIR) \
    +		ARCH="$(LINUX_KARCH)" \
    +		CROSS_COMPILE="$(TARGET_CROSS)" \
    +		SUBDIRS="$(PKG_BUILD_DIR)" \
    +		modules
    +endef
    +
    +$(eval $(call KernelPackage,video-nw8xx))
    diff --git a/multimedia/nw802-2.4/patches/001-linux_2_6_cvs.patch b/multimedia/nw802-2.4/patches/001-linux_2_6_cvs.patch
    new file mode 100644
    index 0000000..694d62e
    --- /dev/null
    +++ b/multimedia/nw802-2.4/patches/001-linux_2_6_cvs.patch
    @@ -0,0 +1,2980 @@
    +diff -Naur nw802-2.4-0.0.99/cvideopro.init nw802-2.4/cvideopro.init
    +--- nw802-2.4-0.0.99/cvideopro.init	1970-01-01 01:00:00.000000000 +0100
    ++++ nw802-2.4/cvideopro.init	2003-10-21 18:29:27.000000000 +0200
    +@@ -0,0 +1,107 @@
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0x04 } },
    ++	{ 0x0000, 0x0000, 0x0040,
    ++		{ 0x54, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x4c,
    ++		  0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
    ++		  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
    ++		  0x00, 0x0b, 0x00, 0x1b, 0x00, 0xc8, 0x00, 0xf4,
    ++		  0x05, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,
    ++		  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01 } },
    ++	{ 0x0040, 0x0000, 0x0040,
    ++		{ 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,
    ++		  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,
    ++		  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,
    ++		  0x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,
    ++		  0x00, 0x5d, 0x00, 0xc7, 0x00, 0x7e, 0x00, 0x30 } },
    ++	{ 0x0080, 0x0000, 0x001f,
    ++		{ 0x98, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,
    ++		  0x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
    ++		  0x00, 0x0c, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,
    ++		  0x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0012,
    ++		{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    ++		  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
    ++		  0x40, 0x20 } },
    ++	{ 0x0300, 0x0000, 0x0003,
    ++		{ 0x03, 0x00, 0x00 } },
    ++	{ 0x0400, 0x0000, 0x0007,
    ++		{ 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00 } },
    ++	{ 0x0600, 0x0000, 0x0002,
    ++		{ 0x09, 0x99 } },
    ++	{ 0x0800, 0x0000, 0x0015,
    ++		{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++	{ 0x1000, 0x0000, 0x0040,
    ++		{ 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
    ++		  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,
    ++		  0x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
    ++		  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
    ++		  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
    ++		  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80 } },
    ++	{ 0x1040, 0x0000, 0x0040,
    ++		{ 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
    ++		  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
    ++		  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    ++		  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    ++		  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
    ++		  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    ++		  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
    ++		  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3 } },
    ++	{ 0x1080, 0x0000, 0x001b,
    ++		{ 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x05, 0x82,
    ++		  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
    ++		  0x01, 0xf0, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0011,
    ++		{ 0x3c, 0x50, 0x8c, 0x3c, 0x50, 0x00, 0x00, 0x00,
    ++		  0x00, 0x78, 0x3f, 0x3f, 0x06, 0xf2, 0x8f, 0xf0,
    ++		  0x40 } },
    ++	{ 0x101a, 0x0000, 0x0001,
    ++		{ 0x03 } },
    ++	{ 0x1000, 0x0000, 0x0001,
    ++		{ 0xac } },
    ++	{ 0x1085, 0x0000, 0x0008,
    ++		{ 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00 } },
    ++	{ 0x101b, 0x0000, 0x0002,
    ++		{ 0x3b, 0x01 } },
    ++	{ 0x1011, 0x0000, 0x0008,
    ++		{ 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00 } },
    ++	{ 0x101f, 0x0000, 0x0006,
    ++		{ 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00 } },
    ++	{ 0x101d, 0x0000, 0x0002,
    ++		{ 0x40, 0x06 } },
    ++	{ 0x100e, 0x0000, 0x0001,
    ++		{ 0x08 } },
    ++	{ 0x1041, 0x0000, 0x0011,
    ++		{ 0x00, 0x0f, 0x46, 0x62, 0x76, 0x86, 0x94, 0xa0,
    ++		  0xab, 0xb6, 0xbf, 0xc8, 0xcf, 0xd7, 0xdc, 0xdc,
    ++		  0xdc } },
    ++	{ 0x1003, 0x0000, 0x0001,
    ++		{ 0x00 } },
    ++	{ 0x100f, 0x0000, 0x0002,
    ++		{ 0x12, 0x12 } },
    ++	{ 0x1003, 0x0000, 0x0001,
    ++		{ 0x0c } },
    ++	{ 0x1041, 0x0000, 0x0011,
    ++		{ 0x00, 0x0f, 0x46, 0x62, 0x76, 0x86, 0x94, 0xa0,
    ++		  0xab, 0xb6, 0xbf, 0xc8, 0xcf, 0xd7, 0xdc, 0xdc,
    ++		  0xdc } },
    ++	{ 0x100b, 0x0000, 0x0001,
    ++		{ 0x09 } },
    ++	{ 0x100d, 0x0000, 0x0001,
    ++		{ 0x10 } }, // Exposure
    ++	{ 0x100c, 0x0000, 0x0001,
    ++		{ 0x2f } },
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0x03 } },
    ++	{ 0x0404, 0x0000, 0x0001,
    ++		{ 0x00 } }
    ++
    +diff -Naur nw802-2.4-0.0.99/d-link-350c.init nw802-2.4/d-link-350c.init
    +--- nw802-2.4-0.0.99/d-link-350c.init	1970-01-01 01:00:00.000000000 +0100
    ++++ nw802-2.4/d-link-350c.init	2003-09-23 20:15:30.000000000 +0200
    +@@ -0,0 +1,107 @@
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0x04 } },
    ++	{ 0x0000, 0x0000, 0x0040,
    ++		{ 0x10, 0x00, 0x00, 0x92, 0x03, 0x10, 0x00, 0x4d,
    ++		  0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
    ++		  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19, 
    ++		  0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,
    ++		  0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
    ++		  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
    ++		  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01 } },
    ++	{ 0x0040, 0x0000, 0x0040,
    ++		{ 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++		  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++		  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
    ++		  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
    ++		  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e } },
    ++	{ 0x0080, 0x0000, 0x001f,
    ++		{ 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x68, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11, 
    ++		  0x00, 0x0c, 0x02, 0x01, 0x00, 0x16, 0x00, 0x94,
    ++		  0x00, 0x10, 0x06, 0x10, 0x00, 0x36, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0012,
    ++		{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    ++		  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
    ++		  0x40, 0x20 } },
    ++	{ 0x0300, 0x0000, 0x0003,
    ++		{ 0x03, 0x00, 0x00 } },
    ++	{ 0x0400, 0x0000, 0x0007,
    ++		{ 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00 } },
    ++	{ 0x0600, 0x0000, 0x0002,
    ++		{ 0x09, 0x99 } },
    ++	{ 0x0800, 0x0000, 0x0015,
    ++		{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++	{ 0x1000, 0x0000, 0x0040,
    ++		{ 0xa1, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
    ++		  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x49, 0x13, 0x00, 0x00, 0xc0, 0x00, 0x14,
    ++		  0x02, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00,
    ++		  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
    ++		  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
    ++		  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80 } },
    ++	{ 0x1040, 0x0000, 0x0040,
    ++		{ 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
    ++		  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
    ++		  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    ++		  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    ++		  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
    ++		  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    ++		  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
    ++		  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3 } },
    ++	{ 0x1080, 0x0000, 0x001b,
    ++		{ 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x82,
    ++		  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
    ++		  0x01, 0xf0, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0011,
    ++		{ 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
    ++		  0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
    ++		  0x40 } },
    ++	{ 0x101a, 0x0000, 0x0001,
    ++		{ 0x00 } },
    ++	{ 0x1000, 0x0000, 0x0001,
    ++		{ 0xad } },
    ++	{ 0x0000, 0x0000, 0x0001,
    ++		{ 0x08 } },
    ++	{ 0x1085, 0x0000, 0x0008,
    ++		{ 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00 } },
    ++	{ 0x101b, 0x0000, 0x0002,
    ++		{ 0x00, 0x00 } },
    ++	{ 0x1011, 0x0000, 0x0008,
    ++		{ 0x51, 0x00, 0xf0, 0x00, 0x3d, 0x00, 0xb4, 0x00 } },
    ++	{ 0x101d, 0x0000, 0x0008,
    ++		{ 0x40, 0x06, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00 } },
    ++	{ 0x100e, 0x0000, 0x0001,
    ++		{ 0x20 } },
    ++	{ 0x1041, 0x0000, 0x0011,
    ++		{ 0x00, 0x07, 0x1e, 0x38, 0x4d, 0x60, 0x70, 0x7f,
    ++		  0x8e, 0x9b, 0xa8, 0xb4, 0xbf, 0xca, 0xd5, 0xdf,
    ++		  0xea } },
    ++	{ 0x1003, 0x0000, 0x0001,
    ++		{ 0x00 } },
    ++	{ 0x100f, 0x0000, 0x0002,
    ++		{ 0x11, 0x11 } },
    ++	{ 0x1003, 0x0000, 0x0001,
    ++		{ 0x10 } },
    ++	{ 0x1041, 0x0000, 0x0011,
    ++		{ 0x00, 0x07, 0x1e, 0x38, 0x4d, 0x60, 0x70, 0x7f,
    ++		  0x8e, 0x9b, 0xa8, 0xb4, 0xbf, 0xca, 0xd5, 0xdf,
    ++		  0xea } },
    ++	{ 0x100b, 0x0000, 0x0001,
    ++		{ 0x19 } },
    ++	{ 0x100d, 0x0000, 0x0001,
    ++		{ 0x10 } },
    ++	{ 0x100c, 0x0000, 0x0001,
    ++		{ 0x1e } },
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0x03 } },
    ++	{ 0x0404, 0x0000, 0x0001,
    ++		{ 0x00 } }
    ++
    +diff -Naur nw802-2.4-0.0.99/DS3303u.init nw802-2.4/DS3303u.init
    +--- nw802-2.4-0.0.99/DS3303u.init	1970-01-01 01:00:00.000000000 +0100
    ++++ nw802-2.4/DS3303u.init	2003-11-13 22:48:31.000000000 +0100
    +@@ -0,0 +1,108 @@
    ++	{ 0x0506, 0x0000, 0x0001,
    ++		{ 0x04 } },
    ++	{ 0x0000, 0x0000, 0x0040,
    ++		{ 0x16, 0x00, 0x00, 0xf9, 0x02, 0x11, 0x00, 0x0e,
    ++		  0x01, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
    ++		  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
    ++		  0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,
    ++		  0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
    ++		  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
    ++		  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01 } },
    ++	{ 0x0040, 0x0000, 0x0040,
    ++		{ 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++		  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++		  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
    ++		  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
    ++		  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e } },
    ++	{ 0x0080, 0x0000, 0x0022,
    ++		{ 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x08, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0xa9, 0xa8, 0x1f, 0x00,
    ++		  0x0d, 0x02, 0x07, 0x00, 0x01, 0x00, 0x19, 0x00,
    ++		  0xf2, 0x00, 0x18, 0x06, 0x10, 0x06, 0x10, 0x00,
    ++		  0x36, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0012,
    ++		{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    ++		  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0x50,
    ++		  0x40, 0x20 } },
    ++	{ 0x0300, 0x0000, 0x0003,
    ++		{ 0x03, 0x00, 0x00 } },
    ++	{ 0x0500, 0x0000, 0x0007,
    ++		{ 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00 } },
    ++	{ 0x0600, 0x0000, 0x0002,
    ++		{ 0x09, 0x99 } },
    ++	{ 0x0800, 0x0000, 0x0015,
    ++		{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++	{ 0x1000, 0x0000, 0x0040,
    ++		{ 0x2f, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x10, 0x1f, 0x10, 0x08, 0x0a,
    ++		  0x0a, 0x51, 0x00, 0xf1, 0x00, 0x3c, 0x00, 0xb4,
    ++		  0x00, 0x01, 0x15, 0xfd, 0x07, 0x3d, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x8c, 0x04, 0x01, 0x20,
    ++		  0x02, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00,
    ++		  0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x03,
    ++		  0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06, 0xf7 } },
    ++	{ 0x1040, 0x0000, 0x0040,
    ++		{ 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80, 0x80,
    ++		  0x00, 0x2d, 0x46, 0x58, 0x67, 0x74, 0x7f, 0x88,
    ++		  0x94, 0x9d, 0xa6, 0xae, 0xb5, 0xbd, 0xc4, 0xcb,
    ++		  0xd1, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54, 0x64,
    ++		  0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2, 0xe2,
    ++		  0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    ++		  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    ++		  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43 } },
    ++	{ 0x1080, 0x0000, 0x0022,
    ++		{ 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    ++		  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x3f, 0x01,
    ++		  0x00, 0x00, 0xef, 0x00, 0x02, 0x0a, 0x82, 0x02,
    ++		  0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40, 0x01,
    ++		  0xf0, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0011,
    ++		{ 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
    ++		  0x00, 0x78, 0x3f, 0x3f, 0x00, 0xf2, 0x8f, 0x81,
    ++		  0x40 } },
    ++	{ 0x101a, 0x0000, 0x0001,
    ++		{ 0x15 } },
    ++	{ 0x1000, 0x0000, 0x0001,
    ++		{ 0x2f } },
    ++	{ 0x108c, 0x0000, 0x0008,
    ++		{ 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00 } },
    ++	{ 0x101b, 0x0000, 0x0002,
    ++		{ 0x00, 0x00 } },
    ++	{ 0x1011, 0x0000, 0x0008,
    ++		{ 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00 } },
    ++	{ 0x1026, 0x0000, 0x0006,
    ++		{ 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00 } },
    ++	{ 0x1024, 0x0000, 0x0002,
    ++		{ 0x40, 0x06 } },
    ++	{ 0x100e, 0x0000, 0x0001,
    ++		{ 0x08 } },
    ++	{ 0x1048, 0x0000, 0x0011,
    ++		{ 0x00, 0x15, 0x40, 0x67, 0x84, 0x9d, 0xb2, 0xc6,
    ++		  0xd6, 0xe7, 0xf6, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
    ++		  0xf9 } },
    ++	{ 0x1003, 0x0000, 0x0001,
    ++		{ 0x00 } },
    ++	{ 0x100f, 0x0000, 0x0002,
    ++		{ 0x16, 0x16 } },
    ++	{ 0x1003, 0x0000, 0x0001,
    ++		{ 0x0c } },
    ++	{ 0x1048, 0x0000, 0x0011,
    ++		{ 0x00, 0x15, 0x40, 0x67, 0x84, 0x9d, 0xb2, 0xc6,
    ++		  0xd6, 0xe7, 0xf6, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
    ++		  0xf9 } },
    ++	{ 0x100b, 0x0000, 0x0001,
    ++		{ 0x26 } },
    ++	{ 0x100d, 0x0000, 0x0001,
    ++		{ 0x10 } },
    ++	{ 0x100c, 0x0000, 0x0001,
    ++		{ 0x1c } },
    ++	{ 0x0506, 0x0000, 0x0001,
    ++		{ 0x03 } },
    ++	{ 0x0504, 0x0000, 0x0001,
    ++		{ 0x00 } },
    +diff -Naur nw802-2.4-0.0.99/kr651us.init nw802-2.4/kr651us.init
    +--- nw802-2.4-0.0.99/kr651us.init	1970-01-01 01:00:00.000000000 +0100
    ++++ nw802-2.4/kr651us.init	2007-01-03 21:13:23.000000000 +0100
    +@@ -0,0 +1,106 @@
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0x04 } },
    ++	{ 0x0000, 0x0000, 0x0040,
    ++		{ 0x44, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x48,
    ++		  0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
    ++		  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
    ++		  0x00, 0x0b, 0x00, 0x1b, 0x00, 0xc8, 0x00, 0xf4,
    ++		  0x05, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,
    ++		  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01 } },
    ++	{ 0x0040, 0x0000, 0x0040,
    ++		{ 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,
    ++		  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,
    ++		  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,
    ++		  0x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,
    ++		  0x00, 0x5d, 0x00, 0xc7, 0x00, 0x7e, 0x00, 0x30 } },
    ++	{ 0x0080, 0x0000, 0x001f,
    ++		{ 0x18, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,
    ++		  0x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
    ++		  0x00, 0x0c, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,
    ++		  0x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0012,
    ++		{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    ++		  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
    ++		  0x40, 0x20 } },
    ++	{ 0x0300, 0x0000, 0x0003,
    ++		{ 0x02, 0x00, 0x00 } },
    ++	{ 0x0400, 0x0000, 0x0007,
    ++		{ 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00 } },
    ++	{ 0x0600, 0x0000, 0x0002,
    ++		{ 0x09, 0x99 } },
    ++	{ 0x0800, 0x0000, 0x0015,
    ++		{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++	{ 0x1000, 0x0000, 0x0040,
    ++		{ 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
    ++		  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,
    ++		  0x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
    ++		  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
    ++		  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
    ++		  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80 } },
    ++	{ 0x1040, 0x0000, 0x0040,
    ++		{ 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
    ++		  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
    ++		  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    ++		  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    ++		  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
    ++		  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    ++		  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
    ++		  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3 } },
    ++	{ 0x1080, 0x0000, 0x001b,
    ++		{ 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x05, 0x82,
    ++		  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
    ++		  0x01, 0xf0, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0011,
    ++		{ 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
    ++		  0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
    ++		  0x40 } },
    ++	{ 0x101a, 0x0000, 0x0001,
    ++		{ 0x03 } },
    ++	{ 0x1000, 0x0000, 0x0001,
    ++		{ 0xac } },
    ++	{ 0x1085, 0x0000, 0x0008,
    ++		{ 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00 } },
    ++	{ 0x101b, 0x0000, 0x0002,
    ++		{ 0x00, 0x00 } },
    ++	{ 0x1011, 0x0000, 0x0008,
    ++		{ 0x29, 0x00, 0x18, 0x01, 0x1f, 0x00, 0xd2, 0x00 } },
    ++	{ 0x101d, 0x0000, 0x0006,
    ++		{ 0xe0, 0x00, 0x0c, 0x00, 0x52, 0x00 } },
    ++	{ 0x101d, 0x0000, 0x0002,
    ++		{ 0x28, 0x01 } },
    ++	{ 0x100e, 0x0000, 0x0001,
    ++		{ 0x08 } },
    ++	{ 0x1041, 0x0000, 0x0011,
    ++		{ 0x00, 0x11, 0x3c, 0x5c, 0x74, 0x88, 0x99, 0x8a,
    ++		  0xb7, 0xc4, 0xd0, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc,
    ++		  0xdc } },
    ++	{ 0x1003, 0x0000, 0x0001,
    ++		{ 0x00 } },
    ++	{ 0x100f, 0x0000, 0x0002,
    ++		{ 0x0c, 0x0c } },
    ++	{ 0x1003, 0x0000, 0x0001,
    ++		{ 0x0c } },
    ++	{ 0x1041, 0x0000, 0x0011,
    ++		{ 0x00, 0x11, 0x3c, 0x5c, 0x74, 0x88, 0x99, 0x8a,
    ++		  0xb7, 0xc4, 0xd0, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc,
    ++		  0xdc } },
    ++	{ 0x100b, 0x0000, 0x0001,
    ++		{ 0x10 } },
    ++	{ 0x100d, 0x0000, 0x0001,
    ++		{ 0x10 } },
    ++	{ 0x100c, 0x0000, 0x0001,
    ++		{ 0x2b } },
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0x03 } },
    ++	{ 0x0404, 0x0000, 0x0001,
    ++		{ 0x00 } }
    +diff -Naur nw802-2.4-0.0.99/kritter.init nw802-2.4/kritter.init
    +--- nw802-2.4-0.0.99/kritter.init	1970-01-01 01:00:00.000000000 +0100
    ++++ nw802-2.4/kritter.init	2004-03-06 20:28:40.000000000 +0100
    +@@ -0,0 +1,107 @@
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0x06 } },
    ++	{ 0x0000, 0x0000, 0x0040,
    ++		{ 0x44, 0x96, 0x98, 0x94, 0x03, 0x18, 0x00, 0x48,
    ++		  0x0f, 0x1e, 0x00, 0x0c, 0x02, 0x01, 0x00, 0x19,
    ++		  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
    ++		  0x00, 0x0b, 0x00, 0x1b, 0x00, 0x0a, 0x01, 0x28,
    ++		  0x07, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,
    ++		  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01 } },
    ++	{ 0x0040, 0x0000, 0x0040,
    ++		{ 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,
    ++		  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,
    ++		  0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,
    ++		  0x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,
    ++		  0x00, 0x5d, 0x00, 0x0e, 0x00, 0x7e, 0x00, 0x30 } },
    ++	{ 0x0080, 0x0000, 0x001f,
    ++		{ 0x18, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,
    ++		  0x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
    ++		  0x00, 0x0b, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,
    ++		  0x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0012,
    ++		{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    ++		  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
    ++		  0x40, 0x20 } },
    ++	{ 0x0300, 0x0000, 0x0003,
    ++		{ 0x02, 0x00, 0x00 } },
    ++	{ 0x0400, 0x0000, 0x0007,
    ++		{ 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00 } },
    ++	{ 0x0600, 0x0000, 0x0002,
    ++		{ 0x09, 0x99 } },
    ++	{ 0x0800, 0x0000, 0x0015,
    ++		{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++	{ 0x1000, 0x0000, 0x0040,
    ++		{ 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
    ++		  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,
    ++		  0x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
    ++		  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
    ++		  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
    ++		  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80 } },
    ++	{ 0x1040, 0x0000, 0x0040,
    ++		{ 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
    ++		  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
    ++		  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    ++		  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    ++		  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
    ++		  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    ++		  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
    ++		  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3 } },
    ++	{ 0x1080, 0x0000, 0x001b,
    ++		{ 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x82,
    ++		  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
    ++		  0x01, 0xf0, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0011,
    ++		{ 0x3c, 0x50, 0x8c, 0x3c, 0x50, 0x00, 0x00, 0x00,
    ++		  0x00, 0x78, 0x3f, 0x3f, 0x06, 0xf2, 0x8f, 0xf0,
    ++		  0x40 } },
    ++	{ 0x101a, 0x0000, 0x0001,
    ++		{ 0x03 } },
    ++	{ 0x1000, 0x0000, 0x0001,
    ++		{ 0xaf } },
    ++	{ 0x1085, 0x0000, 0x0008,
    ++		{ 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00 } },
    ++	{ 0x101b, 0x0000, 0x0002,
    ++		{ 0x3b, 0x01 } },
    ++	{ 0x1011, 0x0000, 0x0008,
    ++		{ 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00 } },
    ++	{ 0x101d, 0x0000, 0x0006,
    ++		{ 0xe0, 0x00, 0x0c, 0x00, 0x52, 0x00 } },
    ++	{ 0x101d, 0x0000, 0x0002,
    ++		{ 0x00, 0x00 } },
    ++	{ 0x100e, 0x0000, 0x0001,
    ++		{ 0x08 } },
    ++	{ 0x1041, 0x0000, 0x0011,
    ++		{ 0x00, 0x0d, 0x36, 0x4e, 0x60, 0x6f, 0x7b, 0x86,
    ++		  0x90, 0x98, 0xa1, 0xa9, 0xb1, 0xb7, 0xbe, 0xc4,
    ++		  0xcb } },
    ++	{ 0x1003, 0x0000, 0x0001,
    ++		{ 0x00 } },
    ++	{ 0x100f, 0x0000, 0x0002,
    ++		{ 0x0d, 0x0d } },
    ++	{ 0x1003, 0x0000, 0x0001,
    ++		{ 0x02 } },
    ++	{ 0x1041, 0x0000, 0x0011,
    ++		{ 0x00, 0x0d, 0x36, 0x4e, 0x60, 0x6f, 0x7b, 0x86,
    ++		  0x90, 0x98, 0xa1, 0xa9, 0xb1, 0xb7, 0xbe, 0xc4,
    ++		  0xcb } },
    ++	{ 0x100b, 0x0000, 0x0001,
    ++		{ 0x17 } },
    ++	{ 0x100d, 0x0000, 0x0001,
    ++		{ 0x10 } },
    ++	{ 0x100c, 0x0000, 0x0001,
    ++		{ 0x1e } },
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0x03 } },
    ++	{ 0x0404, 0x0000, 0x0001,
    ++		{ 0x00 } }
    ++
    +diff -Naur nw802-2.4-0.0.99/LICENSE nw802-2.4/LICENSE
    +--- nw802-2.4-0.0.99/LICENSE	2003-08-20 23:34:39.000000000 +0200
    ++++ nw802-2.4/LICENSE	2004-07-06 09:43:53.000000000 +0200
    +@@ -55,7 +55,7 @@
    + 
    +   The precise terms and conditions for copying, distribution and
    + modification follow.
    +-
    ++
    + 		    GNU GENERAL PUBLIC LICENSE
    +    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
    + 
    +@@ -110,7 +110,7 @@
    +     License.  (Exception: if the Program itself is interactive but
    +     does not normally print such an announcement, your work based on
    +     the Program is not required to print an announcement.)
    +-
    ++
    + These requirements apply to the modified work as a whole.  If
    + identifiable sections of that work are not derived from the Program,
    + and can be reasonably considered independent and separate works in
    +@@ -168,7 +168,7 @@
    + access to copy the source code from the same place counts as
    + distribution of the source code, even though third parties are not
    + compelled to copy the source along with the object code.
    +-
    ++
    +   4. You may not copy, modify, sublicense, or distribute the Program
    + except as expressly provided under this License.  Any attempt
    + otherwise to copy, modify, sublicense or distribute the Program is
    +@@ -225,7 +225,7 @@
    + 
    + This section is intended to make thoroughly clear what is believed to
    + be a consequence of the rest of this License.
    +-
    ++
    +   8. If the distribution and/or use of the Program is restricted in
    + certain countries either by patents or by copyrighted interfaces, the
    + original copyright holder who places the Program under this License
    +@@ -278,7 +278,7 @@
    + 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
    +diff -Naur nw802-2.4-0.0.99/Makefile nw802-2.4/Makefile
    +--- nw802-2.4-0.0.99/Makefile	2003-08-20 23:34:39.000000000 +0200
    ++++ nw802-2.4/Makefile	2007-09-05 23:43:35.000000000 +0200
    +@@ -1,29 +1,4 @@
    +-# GCC stuff
    +-GCCLIB=`dirname \`gcc -print-libgcc-file-name\``
    +-INCLUDES=-nostdinc -I /usr/src/linux/include -I ${GCCLIB}/include/ -include /usr/src/linux/include/linux/modversions.h
    +-#CFLAGS=-O2 -D__KERNEL__ -DMODULE -Wall -DMODVERSIONS -nostdinc -ggdb 
    +-CFLAGS=-O3 -D__KERNEL__ -DMODULE -Wall -DMODVERSIONS -funroll-loops -frerun-cse-after-loop -funroll-all-loops -fomit-frame-pointer
    +-#CFLAGS=-O3 -D__KERNEL__ -DMODULE -Wall -DMODVERSIONS -nostdinc -march=pentium4 -msse -msse2 -m3dnow -mmmx -mfpmath=sse -funroll-loops -frerun-cse-after-loop -funroll-all-loops -fomit-frame-pointer
    +-CC=gcc
    ++KERNEL_SOURCE ?= /lib/modules/`uname -r`/build
    + 
    +-OBJ=nw802.o usbvideo.o nw8xx_regedit
    +-
    +-# Build rules
    +-
    +-all: $(OBJ)
    +-
    +-usbvideo.o: usbvideo.c usbvideo.h
    +-	$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< 
    +-
    +-nw8xx_jpgl.o: nw8xx_jpgl.c nw8xx_jpgl.h
    +-	$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< 
    +-	
    +-nw802.o: nw802.c usbvideo.o nw8xx_jpgl.o nw802.init nw801.init nw800.init
    +-	$(CC) $(CFLAGS) $(INCLUDES) -c -o nw802_core.o $< 
    +-	$(LD) -r -o $@ nw802_core.o nw8xx_jpgl.o
    +-
    +-nw8xx_regedit: nw8xx_regedit.c
    +-	$(CC) $(CFLAGS) `pkg-config gtk+-2.0 --cflags --libs` -o $@ $<
    +-
    +-clean:
    +-	rm -f *.so *.o *~ *.swp $(OBJ)
    ++obj-m := nw8xx.o
    ++nw8xx-objs := nw8xx_jpgl.o nw802.o
    +diff -Naur nw802-2.4-0.0.99/mustek_300_mini.init nw802-2.4/mustek_300_mini.init
    +--- nw802-2.4-0.0.99/mustek_300_mini.init	1970-01-01 01:00:00.000000000 +0100
    ++++ nw802-2.4/mustek_300_mini.init	2004-11-08 23:16:42.000000000 +0100
    +@@ -0,0 +1,106 @@
    ++{ 0x0406, 0x0000, 0x0001,
    ++	{ 0x04 } },
    ++{ 0x0000, 0x0000, 0x0040,
    ++	{ 0x10, 0x00, 0x00, 0x92, 0x03, 0x10, 0x00, 0x4d,
    ++	  0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
    ++	  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19, 
    ++	  0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,
    ++	  0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
    ++	  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
    ++	  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
    ++	  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01 } },
    ++{ 0x0040, 0x0000, 0x0040,
    ++	{ 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++	  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++	  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++	  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++	  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
    ++	  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    ++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
    ++	  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e } },
    ++{ 0x0080, 0x0000, 0x001f,
    ++	{ 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x68, 0x00,
    ++	  0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11, 
    ++	  0x00, 0x0c, 0x02, 0x01, 0x00, 0x16, 0x00, 0x94,
    ++	  0x00, 0x10, 0x06, 0xfc, 0x05, 0x0c, 0x06 } },
    ++{ 0x0200, 0x0000, 0x0012,
    ++	{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    ++	  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
    ++	  0x40, 0x20 } },
    ++{ 0x0300, 0x0000, 0x0003,
    ++	{ 0x03, 0x00, 0x00 } },
    ++{ 0x0400, 0x0000, 0x0007,
    ++	{ 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00 } },
    ++{ 0x0600, 0x0000, 0x0002,
    ++	{ 0x09, 0x99 } },
    ++{ 0x0800, 0x0000, 0x0015,
    ++	{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++	  0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++{ 0x1000, 0x0000, 0x0040,
    ++	{ 0xa1, 0x02, 0x80, 0x00, 0x13, 0x00, 0x00, 0x00,
    ++	  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
    ++	  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++	  0x00, 0x49, 0x13, 0x00, 0x00, 0xc0, 0x00, 0x14,
    ++	  0x02, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00,
    ++	  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
    ++	  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
    ++	  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80 } },
    ++{ 0x1040, 0x0000, 0x0040,
    ++	{ 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
    ++	  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
    ++	  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    ++	  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    ++	  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
    ++	  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    ++	  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
    ++	  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3 } },
    ++{ 0x1080, 0x0000, 0x001b,
    ++	{ 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
    ++	  0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x01, 0x82,
    ++	  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
    ++	  0x01, 0xf0, 0x00 } },
    ++{ 0x0200, 0x0000, 0x0011,
    ++	{ 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
    ++	  0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
    ++	  0x40 } },
    ++{ 0x101a, 0x0000, 0x0001,
    ++	{ 0x00 } },
    ++{ 0x1000, 0x0000, 0x0001,
    ++	{ 0xad } },
    ++{ 0x0000, 0x0000, 0x0001,
    ++	{ 0x08 } },
    ++{ 0x1085, 0x0000, 0x0008,
    ++	{ 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00 } },
    ++{ 0x101b, 0x0000, 0x0002,
    ++	{ 0x00, 0x00 } },
    ++{ 0x1011, 0x0000, 0x0008,
    ++	{ 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00 } },
    ++{ 0x101d, 0x0000, 0x0008,
    ++	{ 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20 } },
    ++{ 0x100e, 0x0000, 0x0001,
    ++	{ 0x0f } },
    ++{ 0x1041, 0x0000, 0x0011,
    ++	{ 0x00, 0x0f, 0x29, 0x4a, 0x64, 0x7a, 0x8c, 0x9e,
    ++	  0xad, 0xba, 0xc7, 0xd3, 0xde, 0xe8, 0xf1, 0xf9,
    ++	  0xff } },
    ++{ 0x100f, 0x0000, 0x0002,
    ++	{ 0x11, 0x11 } },
    ++{ 0x1003, 0x0000, 0x0001,
    ++	{ 0x0c } },
    ++{ 0x1041, 0x0000, 0x0011,
    ++	{ 0x00, 0x0f, 0x29, 0x4a, 0x64, 0x7a, 0x8c, 0x9e,
    ++	  0xad, 0xba, 0xc7, 0xd3, 0xde, 0xe8, 0xf1, 0xf9,
    ++	  0xff } },
    ++{ 0x100b, 0x0000, 0x0001,
    ++	{ 0x1c } },
    ++{ 0x100d, 0x0000, 0x0001,
    ++	{ 0x1a } },
    ++{ 0x100c, 0x0000, 0x0001,
    ++	{ 0x34 } },
    ++{ 0x0405, 0x0000, 0x0001,
    ++	{ 0x61 } },
    ++{ 0x0404, 0x0000, 0x0001,
    ++	{ 0x40 } },
    ++{ 0x0406, 0x0000, 0x0001,
    ++	{ 0x03 } }
    +diff -Naur nw802-2.4-0.0.99/nw800.init nw802-2.4/nw800.init
    +--- nw802-2.4-0.0.99/nw800.init	2003-08-20 23:34:39.000000000 +0200
    ++++ nw802-2.4/nw800.init	2004-10-30 11:48:13.000000000 +0200
    +@@ -1,219 +1,219 @@
    +-		{ 0x0500, 0x0000, 0x0001, 
    +-			{ 0x55 } },
    +-		{ 0x109b, 0x0000, 0x0001,
    +-			{ 0xaa } },
    +-		{ 0x0502, 0x0000, 0x0001,
    +-			{ 0x02 } },
    +-		{ 0x0600, 0x0000, 0x0002,
    +-		 	{ 0x04, 0xd9 } },
    +-		{ 0x0505, 0x0000, 0x0001,
    +-			{ 0x00 } },
    +-		{ 0x0505, 0x0000, 0x0001,
    +-			{ 0x01 } },
    +-		{ 0x0406, 0x0000, 0x0001,
    +-			{ 0x04 } },
    +-		{ 0x0406, 0x0000, 0x0001,
    +-			{ 0xc0 } },
    +-		{ 0x0000, 0x0000, 0x0040,
    +-			{ 0x10, 0x43, 0x00, 0xb4, 0x01, 0x10, 0x00, 0x4f,
    +-			  0xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,
    +-			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
    +-			  0x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,
    +-			  0x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
    +-			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
    +-			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
    +-			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01 } },
    +-		{ 0x0040, 0x0000, 0x0040,
    +-			{ 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    +-			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    +-			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    +-			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    +-			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
    +-			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
    +-			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e } },
    +-		{ 0x0080, 0x0000, 0x001f,
    +-			{ 0xa0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,
    +-			  0x00, 0x32, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
    +-			  0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00 } },
    +-		{ 0x0200, 0x0000, 0x0012,
    +-			{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    +-			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
    +-			  0x40, 0x20 } },
    +-		{ 0x0300, 0x0000, 0x0003,
    +-			{ 0x03, 0x00, 0x00 } },
    +-		{ 0x0400, 0x0000, 0x0007,
    +-			{ 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0xc0 } },
    +-		{ 0x0500, 0x0000, 0x0006,
    +-			{ 0xe8, 0x00, 0x00, 0x00, 0x20, 0x20 } },
    +-		{ 0x0600, 0x0000, 0x001b,
    +-			{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00 } },
    +-		{ 0x0800, 0x0000, 0x0015,
    +-			{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00 } },
    +-		{ 0x1000, 0x0000, 0x0040,
    +-			{ 0x83, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
    +-			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
    +-			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
    +-			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
    +-			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80 } },
    +-		{ 0x1040, 0x0000, 0x0040,
    +-			{ 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
    +-			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
    +-			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    +-			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    +-			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
    +-			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    +-			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
    +-			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3 } },
    +-		{ 0x1080, 0x0000, 0x001d,
    +-			{ 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,
    +-			  0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
    +-			  0x01, 0x60, 0x01, 0x00, 0x00 } },
    +-		{ 0x0404, 0x0000, 0x0001,
    +-			{ 0xff } },
    +-		{ 0x0406, 0x0000, 0x0001,
    +-			{ 0xc4 } },
    +-		{ 0x0406, 0x0000, 0x0001,
    +-			{ 0xc0 } },
    +-		{ 0x0000, 0x0000, 0x0040,
    +-			{ 0x10, 0x43, 0x00, 0xb4, 0x01, 0x10, 0x00, 0x4f,
    +-			  0xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,
    +-			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
    +-			  0x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,
    +-			  0x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
    +-			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
    +-			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
    +-			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01 } },
    +-		{ 0x0040, 0x0000, 0x0040,
    +-			{ 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    +-			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    +-			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    +-			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    +-			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
    +-			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
    +-			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e } },
    +-		{ 0x0080, 0x0000, 0x001f,
    +-			{ 0xa0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,
    +-			  0x00, 0x32, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
    +-			  0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00 } },
    +-		{ 0x0200, 0x0000, 0x0012, 
    +-			{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    +-			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
    +-			  0x40, 0x20 } },
    +-		{ 0x0300, 0x0000, 0x0003,
    +-			{ 0x03, 0x00, 0x00 } },
    +-		{ 0x0400, 0x0000, 0x0007,
    +-			{ 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0xc0 } },
    +-		{ 0x0500, 0x0000, 0x0006,
    +-			{ 0xe8, 0x00, 0x00, 0x00, 0x20, 0x20 } },
    +-		{ 0x0600, 0x0000, 0x001b,
    +-			{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00 } },
    +-		{ 0x0800, 0x0000, 0x0015,
    +-			{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00 } },
    +-		{ 0x1000, 0x0000, 0x0040,
    +-			{ 0x83, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
    +-			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
    +-			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
    +-			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
    +-			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80 } },
    +-		{ 0x1040, 0x0000, 0x0040,
    +-			{ 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
    +-			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
    +-			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    +-			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    +-			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
    +-			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    +-			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
    +-			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3 } },
    +-		{ 0x1080, 0x0000, 0x001d,
    +-			{ 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
    +-			  0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,
    +-			  0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
    +-			  0x01, 0x60, 0x01, 0x00, 0x00 } },
    +-		{ 0x0200, 0x0000, 0x0011,
    +-			{ 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,
    +-			  0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,
    +-			  0x40 } },
    +-		{ 0x0080, 0x0000, 0x0001,
    +-			{ 0xa0 } },
    +-		{ 0x101a, 0x0000, 0x0001,
    +-			{ 0x00 } },
    +-		{ 0x0091, 0x0000, 0x0002,
    +-			{ 0x6c, 0x01 } },
    +-		{ 0x0003, 0x0000, 0x0002,
    +-			{ 0xc8, 0x01 } },
    +-		{ 0x101a, 0x0000, 0x0001,
    +-			{ 0x00 } },
    +-		{ 0x1000, 0x0000, 0x0001,
    +-			{ 0x83 } },
    +-		{ 0x108f, 0x0000, 0x000c,
    +-			{ 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
    +-			  0x20, 0x01, 0x60, 0x01 } },
    +-		{ 0x1085, 0x0000, 0x0008,
    +-			{ 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01 } },
    +-		{ 0x101b, 0x0000, 0x0002,
    +-			{ 0x69, 0x00 } },
    +-		{ 0x1011, 0x0000, 0x0008,
    +-			{ 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01 } },
    +-		{ 0x0502, 0x0000, 0x0001,
    +-			{ 0x02 } },
    +-		{ 0x0600, 0x0000, 0x0002,
    +-			{ 0x04, 0xd9 } },
    +-		{ 0x0505, 0x0000, 0x0001,
    +-			{ 0x20 } },
    +-		{ 0x0505, 0x0000, 0x0001,
    +-			{ 0x21 } },
    +-		{ 0x100e, 0x0000, 0x0001,
    +-			{ 0x08 } },
    +-		{ 0x1041, 0x0000, 0x0011,
    +-			{ 0x00, 0x08, 0x21, 0x3d, 0x52, 0x63, 0x75, 0x83,
    +-			  0x91, 0x9e, 0xaa, 0xb6, 0xc1, 0xcc, 0xd6, 0xe0,
    +-			  0xea } },
    +-		{ 0x1003, 0x0000, 0x0001,
    +-			{ 0x00 } },
    +-		{ 0x100f, 0x0000, 0x0002,
    +-			{ 0x13, 0x13 } },
    +-		{ 0x1003, 0x0000, 0x0001,
    +-			{ 0x14 } },
    +-		{ 0x1041, 0x0000, 0x0011,
    +-			{ 0x00, 0x08, 0x21, 0x3d, 0x52, 0x63, 0x75, 0x83,
    +-			  0x91, 0x9e, 0xaa, 0xb6, 0xc1, 0xcc, 0xd6, 0xe0,
    +-			  0xea } },
    +-		{ 0x100b, 0x0000, 0x0001,
    +-			{ 0x14 } },
    +-		{ 0x100d, 0x0000, 0x0001,
    +-			{ 0x20 } },
    +-		{ 0x100c, 0x0000, 0x0001,
    +-			{ 0x34 } },
    +-		{ 0x0406, 0x0000, 0x0001,
    +-			{ 0xc3 } },
    +-		{ 0x0404, 0x0000, 0x0001,
    +-			{ 0x00 } },
    +-		{ 0x0502, 0x0000, 0x0001,
    +-			{ 0x02 } },
    +-		{ 0x0600, 0x0000, 0x0002,
    +-			{ 0x00, 0x48 } },
    +-		{ 0x0505, 0x0000, 0x0001,
    +-			{ 0x20 } },
    +-		{ 0x0505, 0x0000, 0x0001,
    +-			{ 0x21 } }
    ++	{ 0x0500, 0x0000, 0x0001, 
    ++		{ 0x55 } },
    ++	{ 0x109b, 0x0000, 0x0001,
    ++		{ 0xaa } },
    ++	{ 0x0502, 0x0000, 0x0001,
    ++		{ 0x02 } },
    ++	{ 0x0600, 0x0000, 0x0002,
    ++		{ 0x04, 0xd9 } },
    ++	{ 0x0505, 0x0000, 0x0001,
    ++		{ 0x00 } },
    ++	{ 0x0505, 0x0000, 0x0001,
    ++		{ 0x01 } },
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0x04 } },
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0xc0 } },
    ++	{ 0x0000, 0x0000, 0x0040,
    ++		{ 0x10, 0x43, 0x00, 0xb4, 0x01, 0x10, 0x00, 0x4f,
    ++		0xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,
    ++		0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
    ++		0x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,
    ++		0x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
    ++		0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
    ++		0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
    ++		0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01 } },
    ++	{ 0x0040, 0x0000, 0x0040,
    ++		{ 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++		0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++		0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++		0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++		0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
    ++		0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    ++		0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
    ++		0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e } },
    ++	{ 0x0080, 0x0000, 0x001f,
    ++		{ 0xa0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,
    ++		0x00, 0x32, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
    ++		0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0012,
    ++		{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    ++		0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
    ++		0x40, 0x20 } },
    ++	{ 0x0300, 0x0000, 0x0003,
    ++		{ 0x03, 0x00, 0x00 } },
    ++	{ 0x0400, 0x0000, 0x0007,
    ++		{ 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0xc0 } },
    ++	{ 0x0500, 0x0000, 0x0006,
    ++		{ 0xe8, 0x00, 0x00, 0x00, 0x20, 0x20 } },
    ++	{ 0x0600, 0x0000, 0x001b,
    ++		{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00 } },
    ++	{ 0x0800, 0x0000, 0x0015,
    ++		{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++	{ 0x1000, 0x0000, 0x0040,
    ++		{ 0x83, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
    ++		0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
    ++		0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
    ++		0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
    ++		0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80 } },
    ++	{ 0x1040, 0x0000, 0x0040,
    ++		{ 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
    ++		0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
    ++		0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    ++		0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    ++		0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
    ++		0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    ++		0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
    ++		0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3 } },
    ++	{ 0x1080, 0x0000, 0x001d,
    ++		{ 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,
    ++		0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
    ++		0x01, 0x60, 0x01, 0x00, 0x00 } },
    ++	{ 0x0404, 0x0000, 0x0001,
    ++		{ 0xff } },
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0xc4 } },
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0xc0 } },
    ++	{ 0x0000, 0x0000, 0x0040,
    ++		{ 0x10, 0x43, 0x00, 0xb4, 0x01, 0x10, 0x00, 0x4f,
    ++		0xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,
    ++		0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
    ++		0x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,
    ++		0x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
    ++		0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
    ++		0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
    ++		0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01 } },
    ++	{ 0x0040, 0x0000, 0x0040,
    ++		{ 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++		0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++		0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++		0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++		0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
    ++		0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    ++		0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
    ++		0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e } },
    ++	{ 0x0080, 0x0000, 0x001f,
    ++		{ 0xa0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,
    ++		0x00, 0x32, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
    ++		0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0012, 
    ++		{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    ++		0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
    ++		0x40, 0x20 } },
    ++	{ 0x0300, 0x0000, 0x0003,
    ++		{ 0x03, 0x00, 0x00 } },
    ++	{ 0x0400, 0x0000, 0x0007,
    ++		{ 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0xc0 } },
    ++	{ 0x0500, 0x0000, 0x0006,
    ++		{ 0xe8, 0x00, 0x00, 0x00, 0x20, 0x20 } },
    ++	{ 0x0600, 0x0000, 0x001b,
    ++		{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00 } },
    ++	{ 0x0800, 0x0000, 0x0015,
    ++		{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++	{ 0x1000, 0x0000, 0x0040,
    ++		{ 0x83, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
    ++		0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
    ++		0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
    ++		0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
    ++		0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80 } },
    ++	{ 0x1040, 0x0000, 0x0040,
    ++		{ 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
    ++		0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
    ++		0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    ++		0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    ++		0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
    ++		0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    ++		0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
    ++		0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3 } },
    ++	{ 0x1080, 0x0000, 0x001d,
    ++		{ 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
    ++		0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,
    ++		0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
    ++		0x01, 0x60, 0x01, 0x00, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0011,
    ++		{ 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,
    ++		0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,
    ++		0x40 } },
    ++	{ 0x0080, 0x0000, 0x0001,
    ++		{ 0xa0 } },
    ++	{ 0x101a, 0x0000, 0x0001,
    ++		{ 0x00 } },
    ++	{ 0x0091, 0x0000, 0x0002,
    ++		{ 0x6c, 0x01 } },
    ++	{ 0x0003, 0x0000, 0x0002,
    ++		{ 0xc8, 0x01 } },
    ++	{ 0x101a, 0x0000, 0x0001,
    ++		{ 0x00 } },
    ++	{ 0x1000, 0x0000, 0x0001,
    ++		{ 0x83 } },
    ++	{ 0x108f, 0x0000, 0x000c,
    ++		{ 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
    ++		0x20, 0x01, 0x60, 0x01 } },
    ++	{ 0x1085, 0x0000, 0x0008,
    ++		{ 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01 } },
    ++	{ 0x101b, 0x0000, 0x0002,
    ++		{ 0x69, 0x00 } },
    ++	{ 0x1011, 0x0000, 0x0008,
    ++		{ 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01 } },
    ++	{ 0x0502, 0x0000, 0x0001,
    ++		{ 0x02 } },
    ++	{ 0x0600, 0x0000, 0x0002,
    ++		{ 0x04, 0xd9 } },
    ++	{ 0x0505, 0x0000, 0x0001,
    ++		{ 0x20 } },
    ++	{ 0x0505, 0x0000, 0x0001,
    ++		{ 0x21 } },
    ++	{ 0x100e, 0x0000, 0x0001,
    ++		{ 0x08 } },
    ++	{ 0x1041, 0x0000, 0x0011,
    ++		{ 0x00, 0x08, 0x21, 0x3d, 0x52, 0x63, 0x75, 0x83,
    ++		0x91, 0x9e, 0xaa, 0xb6, 0xc1, 0xcc, 0xd6, 0xe0,
    ++		0xea } },
    ++	{ 0x1003, 0x0000, 0x0001,
    ++		{ 0x00 } },
    ++	{ 0x100f, 0x0000, 0x0002,
    ++		{ 0x13, 0x13 } },
    ++	{ 0x1003, 0x0000, 0x0001,
    ++		{ 0x14 } },
    ++	{ 0x1041, 0x0000, 0x0011,
    ++		{ 0x00, 0x08, 0x21, 0x3d, 0x52, 0x63, 0x75, 0x83,
    ++		0x91, 0x9e, 0xaa, 0xb6, 0xc1, 0xcc, 0xd6, 0xe0,
    ++		0xea } },
    ++	{ 0x100b, 0x0000, 0x0001,
    ++		{ 0x14 } },
    ++	{ 0x100d, 0x0000, 0x0001,
    ++		{ 0x20 } },
    ++	{ 0x100c, 0x0000, 0x0001,
    ++		{ 0x34 } },
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0xc3 } },
    ++	{ 0x0404, 0x0000, 0x0001,
    ++		{ 0x00 } },
    ++	{ 0x0502, 0x0000, 0x0001,
    ++		{ 0x02 } },
    ++	{ 0x0600, 0x0000, 0x0002,
    ++		{ 0x00, 0x48 } },
    ++	{ 0x0505, 0x0000, 0x0001,
    ++		{ 0x20 } },
    ++	{ 0x0505, 0x0000, 0x0001,
    ++		{ 0x21 } }
    +diff -Naur nw802-2.4-0.0.99/nw801.init nw802-2.4/nw801.init
    +--- nw802-2.4-0.0.99/nw801.init	2003-08-20 23:34:39.000000000 +0200
    ++++ nw802-2.4/nw801.init	2003-08-25 22:22:26.000000000 +0200
    +@@ -66,7 +66,7 @@
    + 		{ 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
    + 		  0x00, 0x78, 0x18, 0x0b, 0x06, 0xa2, 0x86, 0x78 } },
    + 	{ 0x020f, 0x0000, 0x0001,
    +-		{ 0x78 } },
    ++		{ 0x6b } },
    + 	{ 0x101a, 0x0000, 0x0001,
    + 		{ 0x15 } },
    + 	{ 0x0000, 0x0000, 0x0001,
    +@@ -82,29 +82,15 @@
    + 	{ 0x1019, 0x0000, 0x0001,
    + 		{ 0x09 } },
    + 	{ 0x1024, 0x0000, 0x0006,
    +-		{ 0xc0, 0x00, 0x3f, 0x02, 0x00, 0x01 } },
    +-	{ 0x0003, 0x0000, 0x0002,
    +-		{ 0x92, 0x03 } },
    +-	{ 0x001d, 0x0000, 0x0004,
    +-		{ 0xf2, 0x00, 0x24, 0x07 } },
    +-	{ 0x007b, 0x0000, 0x0001,
    +-		{ 0xcf } },
    +-	{ 0x1094, 0x0000, 0x0001,
    +-		{ 0x07 } },
    ++		{ 0xc0, 0x00, 0x24, 0x02, 0x00, 0x01 } },
    + 	{ 0x0505, 0x0000, 0x0001,
    + 		{ 0x01 } },
    + 	{ 0x0504, 0x0000, 0x0001,
    + 		{ 0x01 } },
    + 	{ 0x100e, 0x0000, 0x0001,
    +-		{ 0x08 } },
    +-	{ 0x1048, 0x0000, 0x0011,
    +-		{ 0x00, 0x37, 0x55, 0x6b, 0x7d, 0x8d, 0x9b, 0xa8,
    +-		  0xb4, 0xbf, 0xca, 0xd4, 0xdd, 0xe6, 0xef, 0xf0,
    +-		  0xf0 } },
    +-	{ 0x1003, 0x0000, 0x0001,
    +-		{ 0x00 } },
    ++		{ 0x18 } },
    + 	{ 0x100f, 0x0000, 0x0002,
    +-		{ 0x0c, 0x0c } },
    ++		{ 0x12, 0x12 } },
    + 	{ 0x1003, 0x0000, 0x0001,
    + 		{ 0x08 } },
    + 	{ 0x1048, 0x0000, 0x0011,
    +@@ -112,11 +98,10 @@
    + 		  0xb4, 0xbf, 0xca, 0xd4, 0xdd, 0xe6, 0xef, 0xf0,
    + 		  0xf0 } },
    + 	{ 0x100b, 0x0000, 0x0001,
    +-		{ 0x0a } },
    ++		{ 0x12 } },
    + 	{ 0x100d, 0x0000, 0x0001,
    +-		{ 0x0b } },
    ++		{ 0x10 } },
    + 	{ 0x100c, 0x0000, 0x0001,
    +-		{ 0x1c } },
    ++		{ 0x15 } },
    + 	{ 0x0506, 0x0000, 0x0001,
    + 		{ 0x03 } },
    +-
    +diff -Naur nw802-2.4-0.0.99/nw802.c nw802-2.4/nw802.c
    +--- nw802-2.4-0.0.99/nw802.c	2003-08-21 23:13:37.000000000 +0200
    ++++ nw802-2.4/nw802.c	2007-09-05 23:29:52.000000000 +0200
    +@@ -23,11 +23,12 @@
    + //
    + //  [ sources bestview with tabstop=4 ]
    + //
    +- 
    ++
    + #include 
    +-#include 
    + #include 
    ++#include 
    + #include 
    ++#include 
    + 
    + #include "usbvideo.h"
    + #include "nw8xx_jpgl.h"
    +@@ -77,21 +78,14 @@
    + typedef struct	// This structure lives in struct uvd->user field.
    + {
    + 	unsigned char veio_buf[MAX_VEIO_LEN];	// Buffer for vendor usb I/O
    +-	int type;								// Type of the cam
    +-} nw802_t;
    +-
    +-typedef struct	// Represent a supported device
    +-{
    +-	unsigned short int idVendor;
    +-	unsigned short int idProduct;
    + 	enum
    + 	{
    +-		NW800 = 0,
    +-		NW801 = 1,
    +-		NW802 = 2
    +-	} model;
    +-	char *name;
    +-} supportedDevice_t;
    ++		BRIDGE_UNKNOW = 0x00,
    ++		BRIDGE_NW800,
    ++		BRIDGE_NW801,
    ++		BRIDGE_NW802
    ++	} bridge_type;							// Model of the bridge
    ++} nw802_t;
    + 
    + typedef struct
    + {
    +@@ -112,6 +106,17 @@
    + 	SIZE_END
    + };
    + 
    ++
    ++/* support for a /dev/nw8xx entry */
    ++/* presently only used to get/set registers */
    ++
    ++struct uvd *nw8xx_uvd=NULL;
    ++
    ++static unsigned int reg_addr;
    ++static unsigned char reg_val;
    ++
    ++#define NW8XX_IS_OPEN 0x01
    ++static unsigned long nw8xx_status = 0;
    + // ============================================================================
    + // Supported camera lists
    + // ============================================================================
    +@@ -119,7 +124,7 @@
    + // TODO Data must be repeated twice ... Once in one of our structure, the other
    + // in a kernel standard structure ... I should find a way to 'unify' this !
    + 
    +-static __devinitdata struct usb_device_id nw802_usb_ids[] =
    ++static struct usb_device_id nw802_usb_ids[] =
    + 	{
    + 		{ USB_DEVICE( 0x046d, 0xd001 ) },	// Logitech Quickam Pro USB
    + 											//  (dark focus ring)
    +@@ -138,16 +143,6 @@
    + 
    + MODULE_DEVICE_TABLE( usb, nw802_usb_ids );
    + 
    +-static supportedDevice_t nw802_supported_devs [] =
    +-	{
    +-		{ 0x046d, 0xd001, NW801, "Logitech Quickam Pro USB (dark focus ring)" },
    +-		{ 0x052b, 0xd001, NW802, "Ezonics EZCam Pro USB" },
    +-		{ 0x055f, 0xd001, NW802, "Mustek WCam 300 / PCLine PCL-W300" },
    +-		{ 0x06a5, 0xd001, NW802, "Generic DivIO NW802" },
    +-		{ 0x06a5, 0x0000, NW800, "Generic DivIO NW800" },
    +-		{} // End entry ( a null name indicate the end )
    +-	};
    +-
    + 
    + // ============================================================================
    + // Global vars
    +@@ -159,7 +154,7 @@
    + static int debug_uv = 0;	// The debugging level of USB video
    + #endif
    + 
    +-static int size = SIZE_END;
    ++static int size = SIZE_320x240;
    + 
    + 
    + // Internal vars
    +@@ -174,13 +169,13 @@
    + // ============================================================================
    + 
    + #ifdef ENABLE_DEBUG
    +-MODULE_PARM(debug, "i");
    ++module_param(debug, int, 0);
    + MODULE_PARM_DESC(debug, "Debug level: 0-5 (default=0)");
    +-MODULE_PARM(debug_uv, "i");
    ++module_param(debug_uv, int, 0);
    + MODULE_PARM_DESC(debug_uv, "Debug level of USB Video: 0-2 (default=0)");
    + #endif
    + 
    +-MODULE_PARM(size, "i");
    ++module_param(size, int, 0);
    + MODULE_PARM_DESC(size, "Video size: 0=160x120 1=176x144 2=320x240 3=352x288 4=640x480 (default=2)" );
    + 
    + 
    +@@ -188,7 +183,7 @@
    + // Module options related funcs
    + // ============================================================================
    + 
    +-static void nw802_validate_params( int cam_type )
    ++static void nw802_validate_params( int bridge_type )
    + {
    + 	#ifdef ENABLE_DEBUG
    + 	RESTRICT_TO_RANGE( debug, 0, 5 );
    +@@ -197,7 +192,7 @@
    + 
    + 
    + 	if ( size == SIZE_END )
    +-		size = nw802_supported_devs[cam_type].model == NW800 ? 
    ++		size = bridge_type == BRIDGE_NW800 ? 
    + 			SIZE_352x288 : SIZE_320x240;
    + 	else
    + 		RESTRICT_TO_RANGE( size, 0, SIZE_END - 1 );
    +@@ -276,6 +271,43 @@
    + 	return rv;
    + }
    + 
    ++static int nw802_test_reg( struct uvd *uvd, int regaddr, unsigned char pattern )
    ++{
    ++	// Vars
    ++	initURB_t urb;
    ++	
    ++	// Prepare to send the byte
    ++	urb.len = 1;
    ++	urb.value = 0;
    ++	urb.data[0] = pattern;
    ++	urb.index = regaddr;
    ++	
    ++	// Send it
    ++	nw802_vendor_send( uvd, &urb);
    ++	
    ++	// Reread the value
    ++	nw802_vendor_read( uvd, regaddr, &urb.data[0], 1 ); 
    ++
    ++	// Is it ok
    ++	return urb.data[0] == pattern;
    ++}
    ++
    ++static int nw802_autodetect_bridge( struct uvd *uvd )
    ++{
    ++	// Autodetect sequence inspired from some log.
    ++	// We try to detect what registers exists or not.
    ++	// If 0x0500 does not exist => NW802
    ++	// If it does, test 0x109B. If it doesn't exists,
    ++	// then it's a NW801. Else, a NW800
    ++
    ++	if ( !nw802_test_reg(uvd, 0x0500, 0x55) )
    ++		return BRIDGE_NW802;
    ++	
    ++	if ( !nw802_test_reg(uvd, 0x109B, 0xAA) )
    ++		return BRIDGE_NW801;
    ++	
    ++	return BRIDGE_NW800;
    ++}
    + 
    + static int nw802_init_camera( struct uvd *uvd )
    + {
    +@@ -291,7 +323,7 @@
    + 		
    + 	};
    + 
    +-	#define NW801_INIT_LEN 38
    ++	#define NW801_INIT_LEN 32
    + 	static const
    + 	initURB_t nw801_init[NW801_INIT_LEN] = {
    + 		
    +@@ -311,26 +343,29 @@
    + 	usb_set_interface( uvd->dev, 0x00, uvd->ifaceAltActive );
    + 
    + 	// Send all the packets 
    +-	switch ( nw802_supported_devs[NW802_T(uvd)->type].model ) {
    ++	switch ( NW802_T(uvd)->bridge_type ) {
    + 
    +-		case NW800:
    ++		case BRIDGE_NW800:
    + 			for ( i=0 ; i < NW800_INIT_LEN ; i++ )
    + 				if ( nw802_vendor_send( uvd, &nw800_init[i] ) < 0 )
    + 					return -1;
    + 			break;
    + 
    +-		case NW801:
    ++		case BRIDGE_NW801:
    + 			for ( i=0 ; i < NW801_INIT_LEN ; i++ )
    + 				if ( nw802_vendor_send( uvd, &nw801_init[i] ) < 0 )
    + 					return -1;
    + 			break;
    + 			
    +-		case NW802:
    ++		case BRIDGE_NW802:
    + 			for ( i=0 ; i < NW802_INIT_LEN ; i++ )
    + 				if ( nw802_vendor_send( uvd, &nw802_init[i] ) < 0 )
    + 				return -1;
    + 			break;
    + 
    ++		default:
    ++			ERR( "How the hell I'm I supposed to init that bridge ?" );
    ++
    + 	}
    + 
    + 	return 0;
    +@@ -355,7 +390,7 @@
    + 
    + 	// Video capabilities & channel setting
    + 	memset( &uvd->vcap, 0, sizeof(uvd->vcap) );
    +-	strcpy( uvd->vcap.name, nw802_supported_devs[NW802_T(uvd)->type].name );
    ++	strcpy( uvd->vcap.name, "DivIO NW8xx camera" );
    + 	        
    + 	uvd->vcap.type = VID_TYPE_CAPTURE;
    + 	uvd->vcap.channels = 1;
    +@@ -375,7 +410,6 @@
    + 	uvd->vchan.type = VIDEO_TYPE_CAMERA;
    + }
    + 
    +-
    + // Call backs
    + 
    + static void nw802_processIsocData(struct uvd *uvd, struct usbvideo_frame *frame)
    +@@ -384,7 +418,6 @@
    + 	
    + 	DEBUG( 5, "nw802_processIsocData" );
    + 
    +-
    + 	// Try to find first header
    + 	rv = jpgl_findHeader( &uvd->dp, canvasX, canvasY, 0 );
    + 		
    +@@ -402,22 +435,24 @@
    + 		// a frame waiting for decoding
    + 		DEBUG( 4, "Frame ready for decoding" );
    + 			
    +-		if ( !jpgl_processFrame(&uvd->dp, frame->data) )
    ++		if ( !jpgl_processFrame(&uvd->dp, frame->data, canvasX, canvasY) )
    + 		{
    + 			// Frame processing was sucessful
    + 			frame->frameState = FrameState_Done;
    + 			uvd->curframe = -1;
    + 			uvd->stats.frame_num++;
    + 			
    +-			// Overlay stats
    ++/*
    + 			#ifdef ENABLE_DEBUG
    + 			if ( debug_uv > 0 )
    + 				usbvideo_OverlayStats(uvd, frame);
    + 			#endif
    ++*/
    + 		}
    + 		else
    + 			DEBUG(3, "Invalid frame detected !");
    + 	}
    ++	frame->flags |= USBVIDEO_FRAME_FLAG_SOFTWARE_CONTRAST;
    + }
    + 
    + static int nw802_setupOnOpen(struct uvd *uvd)
    +@@ -445,74 +480,63 @@
    + 	// I don't know how to stop it ...
    + }
    + 
    +-static void *nw802_probe( struct usb_device *dev,
    +-			  unsigned int ifnum,
    ++static int nw802_probe( struct usb_interface *intf,
    + 			  const struct usb_device_id *devid )
    + {
    + 	struct uvd *uvd = NULL;
    +-	int nas, i, type;
    ++	struct usb_device *dev = interface_to_usbdev(intf);
    ++	int nas, i;
    ++	__u8 ifnum = intf->altsetting->desc.bInterfaceNumber;
    + 	int actSetting = -1;
    + 	int inactSetting = -1;
    + 	int maxPS = 0;
    + 	unsigned char video_ep = 0;
    + 	
    +-	DEBUG( 1, "nw802_probe(...)" );
    +-
    + 	// We don't want multiple configuration camera
    + 	if ( dev->descriptor.bNumConfigurations != 1 )
    +-		return NULL;
    ++		return -ENODEV;
    ++	DEBUG( 1, "nw802_probe(...)" );
    + 	
    +-	// Check Vendor & Product ID
    +-	for ( i=0 ; nw802_supported_devs[i].name ; i++ )
    +-		if ( ( dev->descriptor.idVendor == nw802_supported_devs[i].idVendor ) &&
    +-		     ( dev->descriptor.idProduct == nw802_supported_devs[i].idProduct ) )
    +-	    	 break;
    +-		
    +-	if ( ! nw802_supported_devs[i].name )
    +-		return NULL;
    +-	
    +-	// Ok it's a supported cam ( at least seems to )
    +-	type = i;
    +-	INFO( "Compatible DivIO NW80x based webcam found ! [%s]", nw802_supported_devs[type].name );
    ++	INFO( "Potentially NW8xx supported cam found ( supported vendor/product IDs )" );
    + 	
    + 	// Let's find endpoint, altsettings, ... and validate all this !
    +-	nas = dev->actconfig->interface[ifnum].num_altsetting;
    ++	nas = dev->actconfig->interface[ifnum]->num_altsetting;
    + 	DEBUG( 2, "Number of alternate settings : %d", nas );
    + 	
    + 	for ( i=0 ; iactconfig->interface[ifnum].altsetting[i];
    +-		if ( interface->bNumEndpoints != 3 )
    ++		interface = &dev->actconfig->interface[ifnum]->altsetting[i];
    ++		if ( interface->desc.bNumEndpoints != 3 )
    + 		{
    + 			ERR( "Interface %u Alt %i has %i endpoints!", 
    +-			     ifnum, i, interface->bNumEndpoints );
    +-			return NULL;
    ++			     ifnum, i, interface->desc.bNumEndpoints );
    ++			return -ENODEV;
    + 		}
    + 		
    +-		endpoint = &interface->endpoint[1];
    ++		endpoint = &interface->endpoint[1].desc;
    + 		
    + 		if ( video_ep == 0 )
    + 			video_ep = endpoint->bEndpointAddress;
    + 		else if ( video_ep != endpoint->bEndpointAddress )
    + 		{
    + 			ERR( "Alternate settings have different endpoint addresses!");
    +-			return NULL;	
    ++			return -ENODEV;	
    + 		}		
    + 		
    + 		if ( ( endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK ) !=
    + 		     USB_ENDPOINT_XFER_ISOC )
    + 		{
    + 			ERR( "Interface %u Alt %i has non-ISO endpoint 0!", ifnum, i );
    +-			return NULL;    	
    ++			return -ENODEV;    	
    + 		}
    + 		
    + 		if ( ( endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK ) == USB_DIR_OUT )
    + 		{
    + 			ERR( "Interface %u Alt %i has ISO OUT endpoint 0!", ifnum, i );
    +-			return NULL;    	
    ++			return -ENODEV;    	
    + 		}
    + 
    + 		if ( endpoint->wMaxPacketSize == 0 )
    +@@ -522,7 +546,7 @@
    + 			else
    + 			{
    + 				ERR( "More thant one inactive alt. setting!" );
    +-				return NULL;	
    ++				return -ENODEV;	
    + 			}
    + 		}
    + 		else
    +@@ -546,14 +570,10 @@
    + 	if ( ( maxPS == 0 ) || ( actSetting < 0 ) || ( inactSetting < 0 ) )
    + 	{
    + 		ERR( "No suitable endpoints! Failed to recognize camera!" );
    +-		return NULL;
    ++		return -ENODEV;
    + 	}
    +-	
    +-	// Check the module options
    +-	nw802_validate_params( type );
    +-
    ++		
    + 	// All is Ok, let's register a video device
    +-	MOD_INC_USE_COUNT;	// Code below may sleep, use this as a lock
    + 	
    + 	uvd = usbvideo_AllocateDevice(nw802_cams);
    + 	if ( uvd )
    +@@ -575,13 +595,34 @@
    + 		uvd->iso_packet_len = maxPS;
    + 		uvd->paletteBits = 1L << VIDEO_PALETTE_RGB24;
    + 		uvd->defaultPalette = VIDEO_PALETTE_RGB24;
    ++		
    ++		// Autodetect the bridge type
    ++		NW802_T(uvd)->bridge_type = nw802_autodetect_bridge(uvd);
    ++		switch (NW802_T(uvd)->bridge_type) {
    ++			case BRIDGE_NW800:
    ++				INFO( "Detected bridge type : DivIO NW800" );
    ++				break;
    ++			case BRIDGE_NW801:
    ++				INFO( "Detected bridge type : DivIO NW801" );
    ++				break;
    ++			case BRIDGE_NW802:
    ++				INFO( "Detected bridge type : DivIO NW802" );
    ++				break;
    ++			default:
    ++				INFO( "Detected bridge type : Martian ..." );
    ++				break;
    ++		}
    ++	
    ++		// Check the module options
    ++		nw802_validate_params( NW802_T(uvd)->bridge_type );
    ++	
    ++		// Store the size
    + 		uvd->canvas = nw802_size_to_videosize( size );
    + 		uvd->videosize = uvd->canvas;
    + 		
    + 		// Init the nw802 specific part of uvd & global var
    + 		canvasX = VIDEOSIZE_X( uvd->canvas );
    + 		canvasY = VIDEOSIZE_Y( uvd->canvas );
    +-		NW802_T(uvd)->type = type;
    + 		
    + 		// Configure video & register video device
    + 		nw802_configure_video( uvd );
    +@@ -595,82 +636,113 @@
    + 	else
    + 		ERR( "Failed to allocate usbvideo device!" );
    + 		
    +-	MOD_DEC_USE_COUNT;	// Release the 'lock'
    +-	
    +-	return uvd;
    ++	usb_set_intfdata (intf, uvd);
    ++	nw8xx_uvd=uvd;
    ++	return 0;
    + }
    + 
    +-static unsigned int reg_addr;
    +-static unsigned char reg_val;
    ++static int nw8xx_open(struct inode *inode, struct file *file)
    ++{
    ++        if(nw8xx_status & NW8XX_IS_OPEN)
    ++                goto out_busy;
    ++
    ++        nw8xx_status |= NW8XX_IS_OPEN;
    ++        return 0;
    + 
    +-static int nw8xx_procfs_read(char *page,char **start,off_t off,int count,int *eof,void *data) {
    +-    char *out = page;
    +-    int len;
    ++out_busy:
    ++        return -EBUSY;
    ++}
    ++
    ++static int nw8xx_release(struct inode *inode, struct file *file)
    ++{
    ++        nw8xx_status &= ~NW8XX_IS_OPEN;
    ++        return 0;
    ++}
    ++
    ++#define OUTDEVLEN 20
    ++static ssize_t nw8xx_read(struct file *file, char *buf, size_t count, loff_t *ppos)
    ++{
    ++	char out[OUTDEVLEN];
    ++	int len;
    + 
    + 	/* Read the register */
    +-	nw802_vendor_read( data, reg_addr, ®_val, 1 ); 
    ++	nw802_vendor_read( nw8xx_uvd, reg_addr, ®_val, 1 ); 
    +                   
    +-    /* Stay under PAGE_SIZE or else */
    +-    out += sprintf(out, "Register %04X = %02X\n", reg_addr, reg_val );
    +-    len = out - page;
    +-    len -= off;
    +-    if (len < count) {
    +-        *eof = 1;
    +-        if (len <= 0)
    +-            return 0;
    +-    } else
    +-        len = count;
    +-    *start = page + off;
    +-    return len;
    +-}
    ++    len = sprintf(out, "Register %04X = %02X\n", reg_addr&0xffff, reg_val&0xff );
    ++	out[OUTDEVLEN-1]=0;
    + 
    +-static int nw8xx_procfs_write(struct file *file,const char *buffer,unsigned long count,void *data) {
    ++	if (copy_to_user(buf, out, OUTDEVLEN))
    ++	*ppos+=OUTDEVLEN;
    ++    return OUTDEVLEN;
    ++}
    + 
    +-	char mybuf[16];
    ++static ssize_t nw8xx_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
    ++{
    ++	char mybuf[255];
    + 	initURB_t urb;
    ++	unsigned int ui,ud;
    + 
    +-	// Copy in a string
    +-	if ( count > 15 )
    +-		return -EINVAL;
    +-
    +-	memcpy( mybuf, buffer, count );
    +-
    +-	// Scan it
    +-	if ( mybuf[4] == '=' ) {
    +-		// Write request
    +-		sscanf(mybuf,"%04x=%02x", &urb.index, &urb.data[0]);
    +-		urb.len = 1;
    +-		urb.value = 0;
    +-		nw802_vendor_send( data, &urb);
    +-	} else {
    +-		// Change monitored reg
    ++	if (count<6) { /* set a new register to monitor */
    ++		if (copy_from_user(mybuf, buf, count)) {
    ++                return -EFAULT;
    ++		}
    + 		sscanf(mybuf,"%04x", ®_addr);
    +-	}		
    +-
    ++		*ppos +=count;
    ++		return(count);
    ++	}
    ++	if ((count>5)&&(count<9)) { /* Write request */
    ++		if (copy_from_user(mybuf, buf, count))
    ++                return -EFAULT;
    ++		if (2==sscanf(mybuf,"%04x=%02x", &ui, &ud)) {
    ++			urb.index=ui;
    ++			urb.data[0]=ud;
    ++			urb.len = 1;
    ++			urb.value = 0;
    ++			nw802_vendor_send( nw8xx_uvd, &urb);
    ++		}
    ++		*ppos +=count;
    ++		return(count);
    ++	}
    + 	return count;
    + }
    +- 
    + 
    ++static struct file_operations nw8xx_fops = {
    ++	.owner		= THIS_MODULE,
    ++	.open		= nw8xx_open,
    ++	.read		= nw8xx_read,
    ++	.write		= nw8xx_write,
    ++	.release	= nw8xx_release,
    ++
    ++};
    ++
    ++static struct miscdevice nw8xx_device = {
    ++	MISC_DYNAMIC_MINOR,
    ++	"nw8xx",
    ++	&nw8xx_fops
    ++};
    + 
    + // ============================================================================
    + // Kernel Module init & exit
    + // ============================================================================
    + 
    +-static int __init nw802_init()
    ++static int __init nw802_init(void)
    + {
    + 	int rv;
    +-	
    +-	// Setup callbacks
    + 	struct usbvideo_cb cbTbl;
    ++	
    ++	rv = misc_register(&nw8xx_device);
    ++        if(rv < 0) {
    ++                return rv;
    ++	}
    ++
    + 	memset( &cbTbl, 0, sizeof(cbTbl) );
    + 
    ++	// Setup callbacks
    + 	cbTbl.probe = nw802_probe;
    + 	cbTbl.setupOnOpen = nw802_setupOnOpen;
    + 	cbTbl.videoStart = nw802_videoStart;
    + 	cbTbl.videoStop = nw802_videoStop;
    + 	cbTbl.processData = nw802_processIsocData;
    +-	cbTbl.procfs_read = nw8xx_procfs_read;
    +-	cbTbl.procfs_write = nw8xx_procfs_write;
    + 	
    + 	// Register usbvideo driver
    + 	rv = usbvideo_register( &nw802_cams,
    +@@ -693,8 +765,9 @@
    + 	return rv;
    + }
    + 
    +-static void __exit nw802_exit()
    ++static void __exit nw802_exit(void)
    + {
    ++	misc_deregister(&nw8xx_device);
    + 	usbvideo_Deregister( &nw802_cams );
    + 	INFO( "Module unloaded" );
    + }
    +diff -Naur nw802-2.4-0.0.99/nw8xx_jpgl.c nw802-2.4/nw8xx_jpgl.c
    +--- nw802-2.4-0.0.99/nw8xx_jpgl.c	2003-08-20 23:34:39.000000000 +0200
    ++++ nw802-2.4/nw8xx_jpgl.c	2004-07-06 09:43:54.000000000 +0200
    +@@ -96,9 +96,10 @@
    + //
    + 
    + // Variable Lenght Coding related tables, used for AC coefficient decoding
    +-static char vlcTbl_len[1<<10];	// Meaningful bit count
    +-static char vlcTbl_run[1<<10];	// Run
    +-static char vlcTbl_amp[1<<10];	// Amplitude ( without the sign )
    ++// TODO Check that 7 bits is enough !
    ++static signed char vlcTbl_len[1<<10];	// Meaningful bit count
    ++static signed char vlcTbl_run[1<<10];	// Run
    ++static signed char vlcTbl_amp[1<<10];	// Amplitude ( without the sign )
    + 
    + // YUV->RGB conversion table
    + static int yuvTbl_y[256];
    +@@ -125,7 +126,7 @@
    + #endif
    + 
    + // Code to initialize those tables
    +-static void vlcTbl_init()
    ++static void vlcTbl_init(void)
    + {
    + 	// Bases tables used to compute the bigger one
    + 	// To understands theses, look at the VLC doc in the
    +@@ -173,7 +174,7 @@
    + 	}
    + }
    + 
    +-static void yuvTbl_init()
    ++static void yuvTbl_init(void)
    + {
    + 	// These tables are just pre-multiplied and pre-offseted
    + 	// YUV by the book
    +@@ -194,7 +195,7 @@
    + }
    + 
    + #ifndef SAFE_CLAMP
    +-static void clampTbl_init()
    ++static void clampTbl_init(void)
    + {
    + 	// Instead of doing if(...) to test for overrange, we use
    + 	// a clamping table
    +@@ -430,7 +431,7 @@
    + // jpgl_findHeader ). A complete frame MUST BE available !
    + // Return 0 if the frame is valid.
    + // Another code is an error code
    +-int jpgl_processFrame( struct RingQueue *rq, unsigned char *fb )
    ++int jpgl_processFrame( struct RingQueue *rq, unsigned char *fb, unsigned int good_img_width, unsigned int good_img_height )
    + {
    + 	// Vars
    + 	struct rqBitReader br;
    +@@ -461,8 +462,13 @@
    + 	img_height = RING_QUEUE_PEEK(rq,2);
    + 	RING_QUEUE_DEQUEUE_BYTES(rq,8);
    + 
    +-	printk("Frame decoding: fb=%08X W=%d H=%d\n", fb, img_width, img_height);
    +-
    ++	// Safety **** HACK/QUICKFIX ALERT ****
    ++	if ( (img_width != good_img_width) || (img_height != (good_img_height>>2)) ) {
    ++		img_width = good_img_width;
    ++		img_height = good_img_height >> 2;
    ++		printk(KERN_NOTICE "Incoherency corrected. SHOULD NOT HAPPEN !!!! But it does ...");
    ++	}
    ++	
    + 	// Prepare a bit-by-bit reader
    + 	rqBR_init(&br, rq);
    + 
    +@@ -583,7 +589,7 @@
    + 				*(fb++) = *(Yline++);
    + 				*(fb++)= ( Uline[0] + 3*Uline[1] ) >> 2;
    + 				*(fb++) = ( Vline[0] + 3*Vline[1] ) >> 2;
    +-		#else	
    ++			#else	
    + 				// First pixel
    + 				yc = yuvTbl_y[*(Yline++)];
    + 				uc = Uline[0];
    +@@ -635,7 +641,7 @@
    + #ifdef _JPGL_TEST_
    + 				fb++;
    + #endif
    +-				#endif
    ++			#endif
    + 
    + 				// Adjust pointers
    + 				Uline++;
    +@@ -696,7 +702,7 @@
    + }
    + 
    + // Init the decoder. Should only be called once
    +-void jpgl_initDecoder()
    ++void jpgl_initDecoder(void)
    + {
    + 	vlcTbl_init();
    + 	yuvTbl_init();
    +diff -Naur nw802-2.4-0.0.99/nw8xx_jpgl.h nw802-2.4/nw8xx_jpgl.h
    +--- nw802-2.4-0.0.99/nw8xx_jpgl.h	2003-08-20 23:34:39.000000000 +0200
    ++++ nw802-2.4/nw8xx_jpgl.h	2004-07-06 09:43:54.000000000 +0200
    +@@ -47,7 +47,7 @@
    + // jpgl_findHeader ). A complete frame MUST BE available !
    + // Return 0 if the frame is valid.
    + // Another code is an error code
    +-int jpgl_processFrame( struct RingQueue *rq, unsigned char *fb );
    ++int jpgl_processFrame( struct RingQueue *rq, unsigned char *fb, unsigned int good_img_width, unsigned int good_img_height );
    + 
    + 
    + // Find a valid header and return the offset to skip to correctly align
    +@@ -58,7 +58,7 @@
    + 
    + 
    + // Init the decoder. Should only be called once
    +-void jpgl_initDecoder();
    ++void jpgl_initDecoder(void);
    + 
    + 
    + #endif //  __NW8XX_JPGL_H__
    +diff -Naur nw802-2.4-0.0.99/nw8xx_regedit.c nw802-2.4/nw8xx_regedit.c
    +--- nw802-2.4-0.0.99/nw8xx_regedit.c	2003-08-20 23:34:39.000000000 +0200
    ++++ nw802-2.4/nw8xx_regedit.c	2004-07-06 09:43:54.000000000 +0200
    +@@ -25,8 +25,8 @@
    + #define U_GAIN_REG 0x100F
    + #define V_GAIN_REG 0x1010
    + 
    +-#define SHUT1_REG 0x100C
    +-#define SHUT2_REG 0x100D
    ++#define SHUT1_REG 0x101B
    ++#define SHUT2_REG 0x101C
    + #endif
    + 
    + #ifdef NW801_MODEL
    +@@ -42,8 +42,13 @@
    + #define U_GAIN_REG 0x100F
    + #define V_GAIN_REG 0x1010
    + 
    +-#define SHUT1_REG 0x100C
    +-#define SHUT2_REG 0x100D
    ++#define SHUT1_REG 0x101B //?
    ++#define SHUT2_REG 0x101C //?
    ++
    ++#define CLK_REG 0x1019
    ++#define CLK_REG_MASK 0x08
    ++
    ++#define BP_REG 0x1026
    + #endif
    + 
    + 
    +@@ -56,14 +61,14 @@
    + 	int raddr, value;
    + 	int procfd = -1;
    + 
    +-	procfd=open(procpath, O_RDWR);	
    +-	
    ++	procfd=open(procpath, O_RDWR);
    ++
    + 	if ( procfd < 0 ) {
    + 		perror("open");
    + 		g_error("Can't open the driver proc interface\n");
    + 		return 0;
    + 	}
    +-	
    ++
    + 	snprintf(buffer, 19, "%04x", addr);
    + 	write( procfd, buffer, 4 );
    + 	read( procfd, buffer, 18 );
    +@@ -79,8 +84,8 @@
    + 	char buffer[8];
    + 	int procfd = -1;
    + 
    +-	procfd=open(procpath, O_RDWR);	
    +-	
    ++	procfd=open(procpath, O_RDWR);
    ++
    + 	if ( procfd < 0 ) {
    + 		perror("open");
    + 		g_error("Can't open the driver proc interface\n");
    +@@ -107,6 +112,25 @@
    + 	writeReg(addr, (unsigned char)(value));
    + }
    + 
    ++#ifdef NW801_MODEL
    ++
    ++static void IndoorToggled( GtkWidget *widget, gpointer data ) {
    ++	unsigned char value;
    ++	int addr;
    ++
    ++	addr =  CLK_REG ;
    ++	value = readReg( CLK_REG );
    ++
    ++	if ( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) )
    ++		value |= CLK_REG_MASK;
    ++	else
    ++		value &= ~CLK_REG_MASK;
    ++
    ++	writeReg(addr, (unsigned char)(value));
    ++}
    ++
    ++#endif
    ++
    + static void SliderChanged( GtkWidget *widget, gpointer data ) {
    + 	gdouble value;
    + 	int addr;
    +@@ -143,27 +167,27 @@
    + void create_gui() {
    + 
    + 	// Vars
    +-	
    ++
    + 		// Temps
    + 	int i, j;
    + 	GtkWidget *dummy;
    +-	
    ++
    + 		// Main layout
    + 	GtkWidget *window;
    + 	GtkWidget *vbox1, *vbox2;
    + 	GtkWidget *hbox1, *hbox2;
    +-	
    ++
    + 	GtkWidget *RGBControls_frame;
    + 	GtkWidget *YUVControls_frame;
    + 	GtkWidget *ShutControls_frame;
    + 	GtkWidget *MiscControls_frame;
    + 	GtkWidget *LUTTables_frame;
    +-	
    ++
    + 		// LUT Frame
    + 	GtkWidget *lutf_vbox, *lutf_nbook;
    +-	
    +-	
    +-	
    ++
    ++
    ++
    + 	// Create a window
    + 	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    + 
    +@@ -182,7 +206,7 @@
    + 	gtk_container_add (GTK_CONTAINER (window), vbox1);
    + 
    + 
    +-	// On the top, put 
    ++	// On the top, put
    + 	//  - RGB Gain/ofs
    + 	//  - YUV Gain/ofs
    + 	//  - Shutter control
    +@@ -194,7 +218,7 @@
    + 	RGBControls_frame = gtk_frame_new("RGB Gain/Ofs");
    + 	gtk_widget_show(RGBControls_frame);
    + 	gtk_box_pack_start(GTK_BOX(hbox1), RGBControls_frame, TRUE, TRUE, 0);
    +-	
    ++
    + 	YUVControls_frame = gtk_frame_new("YUV Gain/Ofs");
    + 	gtk_widget_show(YUVControls_frame);
    + 	gtk_box_pack_start(GTK_BOX(hbox1), YUVControls_frame, TRUE, TRUE, 0);
    +@@ -239,11 +263,11 @@
    + 		gtk_widget_show(hbox2);
    + 		gtk_container_add(GTK_CONTAINER(RGBControls_frame), hbox2);
    + 
    +-		createslider(R_GAIN_REG,63,hbox2);	
    +-		createslider(G_GAIN_REG,63,hbox2);	
    +-		createslider(B_GAIN_REG,63,hbox2);	
    ++		createslider(R_GAIN_REG,63,hbox2);
    ++		createslider(G_GAIN_REG,63,hbox2);
    ++		createslider(B_GAIN_REG,63,hbox2);
    ++
    + 
    +-		
    + 
    + 		// YUV Offset & Gain
    + 		// -----------------
    +@@ -251,10 +275,10 @@
    + 		gtk_widget_show(hbox2);
    + 		gtk_container_add(GTK_CONTAINER(YUVControls_frame), hbox2);
    + 
    +-		createslider(Y_GAIN_REG,63,hbox2);	
    +-		createslider(U_GAIN_REG,63,hbox2);	
    +-		createslider(V_GAIN_REG,63,hbox2);	
    +-		
    ++		createslider(Y_GAIN_REG,63,hbox2);
    ++		createslider(U_GAIN_REG,63,hbox2);
    ++		createslider(V_GAIN_REG,63,hbox2);
    ++
    + 
    + 		// Shutter control
    + 		// ---------------
    +@@ -262,12 +286,27 @@
    + 		gtk_widget_show(hbox2);
    + 		gtk_container_add(GTK_CONTAINER(ShutControls_frame), hbox2);
    + 
    +-		createslider(SHUT1_REG,255,hbox2);	
    +-		createslider(SHUT2_REG,255,hbox2);	
    ++		createslider(SHUT1_REG,255,hbox2);
    ++		createslider(SHUT2_REG,255,hbox2);
    + 
    + 		// Misc
    + 		// ----
    ++#ifdef NW801_MODEL
    ++
    ++		hbox2 = gtk_hbox_new(TRUE,0);
    ++		gtk_widget_show(hbox2);
    ++		gtk_container_add(GTK_CONTAINER(MiscControls_frame), hbox2);
    + 
    ++		createslider(BP_REG,159,hbox2);
    ++
    ++		dummy = gtk_check_button_new_with_label("Outdoor");
    ++		gtk_widget_show(dummy);
    ++		gtk_box_pack_start(GTK_BOX(hbox2), dummy, FALSE, FALSE, 0);
    ++		g_signal_connect(G_OBJECT(dummy), "toggled",
    ++		G_CALLBACK (IndoorToggled), NULL);
    ++		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dummy), readReg(CLK_REG) & CLK_REG_MASK);
    ++
    ++#endif
    + 		// LUT Tables
    + 		// ----------
    + 	lutf_vbox = gtk_vbox_new(FALSE,1);
    +diff -Naur nw802-2.4-0.0.99/proscope.init nw802-2.4/proscope.init
    +--- nw802-2.4-0.0.99/proscope.init	1970-01-01 01:00:00.000000000 +0100
    ++++ nw802-2.4/proscope.init	2003-10-03 15:44:18.000000000 +0200
    +@@ -0,0 +1,105 @@
    ++	{ 0x0405, 0x0000, 0x0001,
    ++		{ 0x21 } },
    ++	{ 0x0404, 0x0000, 0x0001,
    ++		{ 0x01 } },
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0x04 } },
    ++	{ 0x0000, 0x0000, 0x0040,
    ++		{ 0x10, 0x01, 0x00, 0xf9, 0x02, 0x10, 0x00, 0x04,
    ++		  0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
    ++		  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
    ++		  0x00, 0x08, 0x00, 0x17, 0x00, 0xce, 0x00, 0xf4,
    ++		  0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
    ++		  0x00, 0xce, 0x00, 0xf8, 0x03, 0x3e, 0x00, 0x86,
    ++		  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
    ++		  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01 } },
    ++	{ 0x0040, 0x0000, 0x0040,
    ++		{ 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0xb6,
    ++		  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++		  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++		  0x00, 0xf6, 0x03, 0x34, 0x04, 0xf6, 0x03, 0x34,
    ++		  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xe8,
    ++		  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e } },
    ++	{ 0x0080, 0x0000, 0x001f,
    ++		{ 0xb4, 0x6f, 0x1f, 0x0f, 0x08, 0x20, 0xa8, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
    ++		  0x00, 0x0c, 0x02, 0x01, 0x00, 0x19, 0x00, 0x94,
    ++		  0x00, 0x10, 0x06, 0x10, 0x00, 0x36, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0012,
    ++		{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    ++		  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
    ++		  0x40, 0x20 } },
    ++	{ 0x0300, 0x0000, 0x0003,
    ++		{ 0x03, 0x00, 0x00 } },
    ++	{ 0x0400, 0x0000, 0x0007,
    ++		{ 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00 } },
    ++	{ 0x0600, 0x0000, 0x0002,
    ++		{ 0x09, 0x99 } },
    ++	{ 0x0800, 0x0000, 0x0015,
    ++		{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++	{ 0x1000, 0x0000, 0x0040,
    ++		{ 0xad, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
    ++		  0x00, 0x00, 0x00, 0x10, 0x1f, 0x10, 0x08, 0x0a,
    ++		  0x0a, 0x51, 0x00, 0xf1, 0x00, 0x3c, 0x00, 0xb4,
    ++		  0x00, 0x49, 0x13, 0x00, 0x00, 0x8c, 0x04, 0x01,
    ++		  0x20, 0x02, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00,
    ++		  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
    ++		  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
    ++		  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80 } },
    ++	{ 0x1040, 0x0000, 0x0040,
    ++		{ 0x80, 0x00, 0x2d, 0x46, 0x58, 0x67, 0x74, 0x7f,
    ++		  0x88, 0x94, 0x9d, 0xa6, 0xae, 0xb5, 0xbd, 0xc4,
    ++		  0xcb, 0xd1, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    ++		  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    ++		  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
    ++		  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    ++		  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
    ++		  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3 } },
    ++	{ 0x1080, 0x0000, 0x001b,
    ++		{ 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x3f,
    ++		  0x01, 0x00, 0x00, 0xef, 0x00, 0x09, 0x05, 0x82,
    ++		  0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
    ++		  0x01, 0xf0, 0x00 } },
    ++	{ 0x0200, 0x0000, 0x0011,
    ++		{ 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
    ++		  0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
    ++		  0x40 } },
    ++	{ 0x101a, 0x0000, 0x0001,
    ++		{ 0x06 } },
    ++	{ 0x0003, 0x0000, 0x0001,
    ++		{ 0xf9, 0x02 } },
    ++	{ 0x1085, 0x0000, 0x0008,
    ++		{ 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00 } },
    ++	{ 0x101b, 0x0000, 0x0002,
    ++		{ 0x00, 0x00 } },
    ++	{ 0x1011, 0x0000, 0x0008,
    ++		{ 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00 } },
    ++	{ 0x101d, 0x0000, 0x0008,
    ++		{ 0xc0, 0x0d, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00 } },
    ++	{ 0x100e, 0x0000, 0x0001,
    ++		{ 0x10 } },
    ++	{ 0x100f, 0x0000, 0x0002,
    ++		{ 0x0c, 0x0c } },
    ++	{ 0x1003, 0x0000, 0x0001,
    ++		{ 0x0c } },
    ++	{ 0x1041, 0x0000, 0x0011,
    ++		{ 0x00, 0x10, 0x51, 0x6e, 0x83, 0x93, 0xa1, 0xae,
    ++		  0xb9, 0xc3, 0xcc, 0xd4, 0xdd, 0xe4, 0xeb, 0xf2,
    ++		  0xf9 } },
    ++	{ 0x100b, 0x0000, 0x0001,
    ++		{ 0x0b } },
    ++	{ 0x100d, 0x0000, 0x0001,
    ++		{ 0x10 } }, // Exposure
    ++	{ 0x100c, 0x0000, 0x0001,
    ++		{ 0x1b } },
    ++	{ 0x0406, 0x0000, 0x0001,
    ++		{ 0x03 } },
    ++	{ 0x0405, 0x0000, 0x0001,
    ++		{ 0x21 } },
    ++	{ 0x0404, 0x0000, 0x0001,
    ++		{ 0x00 } }
    ++
    +diff -Naur nw802-2.4-0.0.99/README nw802-2.4/README
    +--- nw802-2.4-0.0.99/README	2003-08-20 23:34:39.000000000 +0200
    ++++ nw802-2.4/README	2007-01-03 21:13:24.000000000 +0100
    +@@ -20,6 +20,98 @@
    +  # insmod nw802.o
    + * Launch xawtv ( or any V4L compatible app. Since the driver currently ignores quite a lot of V4L request like videosize, format, ... the app may give warning or refuses to work at all ... xawtv works, newer version of gnomemeeting don't ... )
    + 
    ++The original init files do not support all cam's, so if you don't get any picture, see if you have one of this cams.
    ++
    ++If you have a Plustek Opticam 500U ( or ProLink DS3303u WebCam).
    ++----------------------------------------
    ++Rename the nw801.init to something else ( nw801.init.old for example).
    ++Then rename the DS3303u.init to nw801.init.
    ++Open the nw802.c in a editor. Go to line 314.
    ++
    ++It looks like this:
    ++#define NW801_INIT_LEN 32
    ++
    ++Change it to this:
    ++#define NW801_INIT_LEN 31
    ++
    ++Save the nw802.c.
    ++Compile as described above under 'How to use it ?'.
    ++
    ++
    ++If you have a Panasonic GP-KR651US.
    ++----------------------------------------
    ++Rename the nw802.init to something else ( nw802.init.old for example).
    ++Then rename the kr651us.init to nw802.init.
    ++Compile as described above under 'How to use it ?'.
    ++
    ++If you have a iRez Kritter cam.
    ++----------------------------------------
    ++Rename the nw802.init to something else ( nw802.init.old for example).
    ++Then rename the kritter.init to nw802.init.
    ++Compile as described above under 'How to use it ?'.
    ++
    ++
    ++If you have a D-link dru-350c cam.
    ++----------------------------------------
    ++Rename the nw802.init to something else ( nw802.init.old for example).
    ++Then rename the d-link-350c.init to nw802.init.
    ++Compile as described above under 'How to use it ?'.
    ++
    ++
    ++If you have a The Scope USB Microscope M2 (ProScope).
    ++----------------------------------------
    ++Rename the nw802.init to something else ( nw802.init.old for example).
    ++Then rename the proscope.init to nw802.init.
    ++Compile as described above under 'How to use it ?'.
    ++
    ++
    ++If you have a Conceptronic Video Pro 'CVIDEOPRO  USB Webcam CCD'.
    ++----------------------------------------
    ++Rename the nw802.init to something else ( nw802.init.old for example).
    ++Then rename the cvideopro.init to nw802.init.
    ++Compile as described above under 'How to use it ?'.
    ++
    ++
    ++If you have a Trust SpaceCam120 or SpaceCam100 PORTABLE.
    ++----------------------------------------
    ++Rename the nw800.init to something else ( nw800.init.old for example).
    ++Then rename the SpaceCam.init to nw800.init.
    ++Open the nw802.c in a editor.
    ++Go to line 127. It looks like this:
    ++{ USB_DEVICE( 0x06a5, 0x0000 ) },		// Generic NW800
    ++
    ++Change it to this:
    ++{ USB_DEVICE( 0x06a5, 0xd800 ) },		// Generic NW800
    ++
    ++Go to line 322. It looks like this:
    ++#define NW800_INIT_LEN 65
    ++
    ++Change it to this:
    ++#define NW800_INIT_LEN 82
    ++
    ++Save the nw802.c.
    ++Compile as described above under 'How to use it ?'.
    ++
    ++If your led goes out and no picture. Try the trust_space.init
    ++and repeat the above. But set NW800_INIT_LEN 36 .
    ++
    ++
    ++If you have a TwinkleCam.
    ++----------------------------------------
    ++Rename the nw800.init to something else ( nw800.init.old for example).
    ++Then rename the Twinkle.init to nw800.init.
    ++Open the nw802.c in a editor. Go to line 322.
    ++
    ++It looks like this:
    ++#define NW800_INIT_LEN 65
    ++
    ++Change it to this:
    ++#define NW800_INIT_LEN 95
    ++
    ++Save the nw802.c.
    ++Compile as described above under 'How to use it ?'.
    ++
    ++
    + 
    + Something is wrong ...
    + ----------------------
    +@@ -45,13 +137,13 @@
    +  - Better cam support with automatic chip/cds/ccd detection
    +  - Image control + Auto white balance + Auto exposure
    +  - ...
    +- 
    ++
    + 
    + FAQ :
    + ----
    + 
    +  * I don't have a 2.4.x kernel !
    +- 
    ++
    +    If you use a 2.0 or 2.2 ... Upgrade ! If you use 2.6 ... Well this current version, it's not supported. I don't intent to add it ( so don't send patches, some people already did it and it's being included in the new driver ).
    + 
    +  * When will the new driver be ready ?
    +diff -Naur nw802-2.4-0.0.99/SpaceCam.init nw802-2.4/SpaceCam.init
    +--- nw802-2.4-0.0.99/SpaceCam.init	1970-01-01 01:00:00.000000000 +0100
    ++++ nw802-2.4/SpaceCam.init	2003-10-28 00:25:17.000000000 +0100
    +@@ -0,0 +1,214 @@
    ++		{ 0x0405, 0x0000, 0x0001,
    ++			{ 0x61 } },
    ++		{ 0x404, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0406, 0x0000, 0x0001,
    ++			{ 0x04 } },
    ++		{ 0x0404, 0x0000, 0x0003,
    ++		 	{ 0x00, 0x00, 0x00 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x00 } },
    ++		{ 0x0406, 0x0000, 0x0001,
    ++			{ 0x44 } },
    ++		{ 0x0406, 0x0000, 0x0001,
    ++			{ 0x00 } },
    ++		{ 0x0000, 0x0000, 0x0040,
    ++			{ 0x14, 0x83, 0x00, 0xba, 0x01, 0x10, 0x00, 0x4f,
    ++			  0xef, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x19,
    ++			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
    ++			  0x00, 0x01, 0x00, 0x19, 0x00, 0x06, 0x00, 0xfc,
    ++			  0x01, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
    ++			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
    ++			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
    ++			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01 } },
    ++		{ 0x0040, 0x0000, 0x0040,
    ++			{ 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
    ++			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
    ++			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e } },
    ++		{ 0x0080, 0x0000, 0x001f,
    ++			{ 0xb8, 0x48, 0x0f, 0x04, 0x88, 0x14, 0x68, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x03,
    ++			  0x00, 0x24, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
    ++			  0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00 } },
    ++		{ 0x0200, 0x0000, 0x0012,
    ++			{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    ++			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
    ++			  0x40, 0x20 } },
    ++		{ 0x0300, 0x0000, 0x0003,
    ++			{ 0x03, 0x00, 0x00 } },
    ++		{ 0x0400, 0x0000, 0x0007,
    ++			{ 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0x00 } },
    ++		{ 0x0500, 0x0000, 0x0006,
    ++			{ 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++		{ 0x0600, 0x0000, 0x001b,
    ++			{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00 } },
    ++		{ 0x0800, 0x0000, 0x0015,
    ++			{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++		{ 0x1000, 0x0000, 0x0040,
    ++			{ 0x80, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
    ++			  0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
    ++			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
    ++			  0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
    ++			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80 } },
    ++		{ 0x1040, 0x0000, 0x0040,
    ++			{ 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
    ++			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
    ++			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    ++			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    ++			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
    ++			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    ++			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
    ++			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3 } },
    ++		{ 0x1080, 0x0000, 0x001d,
    ++			{ 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62,
    ++			  0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
    ++			  0x01, 0x60, 0x01, 0x00, 0x00 } },
    ++		{ 0x1085, 0x0000, 0x0008,
    ++			{ 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01 } },
    ++		{ 0x0404, 0x0000, 0x0001,
    ++			{ 0x40 } },
    ++		{ 0x0404, 0x0000, 0x0001,
    ++			{ 0x00 } },
    ++		{ 0x0600, 0x0000, 0x000b,
    ++			{ 0xc0, 0x12, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00,
    ++			   0x00, 0x05, 0x05 } },
    ++		{ 0x0600, 0x0000, 0x000c,
    ++			{ 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x05,
    ++			   0x00, 0x00, 0x05, 0x05 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x0c, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x06 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x11, 0x06 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x00 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x14, 0x00 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x13, 0x01 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0200, 0x0000, 0x0011,
    ++			{ 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,
    ++			  0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,
    ++			  0x40 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x0c } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x02, 0x0c } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x00 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x0f, 0x00 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x13, 0x01 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x1000, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x108f, 0x0000, 0x000c,
    ++			{ 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
    ++			  0x20, 0x01, 0x60, 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x0f } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x05, 0x0f } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x13, 0x01 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0006,
    ++			{ 0x0b, 0x0f, 0x05, 0x05, 0x0f, 0x00 } },
    ++		{ 0x0600, 0x0000, 0x0007,
    ++			{ 0x09, 0x0b, 0x0f, 0x05, 0x05, 0x0f, 0x00 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x07, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x04, 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0003,
    ++			{ 0x12, 0x04, 0x01 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x03, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x1011, 0x0000, 0x0008,
    ++			{ 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01 } },
    ++		{ 0x100e, 0x0000, 0x0001,
    ++			{ 0x08 } },
    ++		{ 0x1041, 0x0000, 0x0011,
    ++			{ 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
    ++			  0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
    ++			  0xf9 } },
    ++		{ 0x1003, 0x0000, 0x0001,
    ++			{ 0x00 } },
    ++		{ 0x100f, 0x0000, 0x0002,
    ++			{ 0x13, 0x13 } },
    ++		{ 0x1003, 0x0000, 0x0001,
    ++			{ 0x06 } },
    ++		{ 0x1041, 0x0000, 0x0011,
    ++			{ 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
    ++			  0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
    ++			  0xf9 } },
    ++		{ 0x100b, 0x0000, 0x0001,
    ++			{ 0x11 } },
    ++		{ 0x100d, 0x0000, 0x0001,
    ++			{ 0x10 } },
    ++		{ 0x100c, 0x0000, 0x0001,
    ++			{ 0x14 } },
    ++		{ 0x0406, 0x0000, 0x0001,
    ++			{ 0x03 } },
    ++		{ 0x0405, 0x0000, 0x0001,
    ++			{ 0x61 } },
    ++		{ 0x0404, 0x0000, 0x0001,
    ++			{ 0x00 } },
    +diff -Naur nw802-2.4-0.0.99/trust_space.init nw802-2.4/trust_space.init
    +--- nw802-2.4-0.0.99/trust_space.init	1970-01-01 01:00:00.000000000 +0100
    ++++ nw802-2.4/trust_space.init	2004-12-22 17:56:17.000000000 +0100
    +@@ -0,0 +1,121 @@
    ++// Trust Spacecam 120 ..item nr 13177.  8 713439 131772
    ++{ 0x0405, 0x0000, 0x0001, 
    ++	{ 0x01 } },
    ++{ 0x0404, 0x0000, 0x0001,
    ++	{ 0x01 } },
    ++{ 0x0406, 0x0000, 0x0001,
    ++	{ 0x04 } },
    ++{ 0x0600, 0x0000, 0x0002,
    ++	{ 0x04, 0xd9 } },
    ++{ 0x0404, 0x0000, 0x0003,
    ++	{ 0x00, 0x00, 0x00 } },
    ++{ 0x0505, 0x0000, 0x0001,
    ++	{ 0x00 } },
    ++{ 0x0406, 0x0000, 0x0001,
    ++	{ 0x44 } },
    ++{ 0x0000, 0x0000, 0x0040,
    ++	{ 0x10, 0x43, 0x00, 0xc6, 0x01, 0x10, 0x00, 0x4f,
    ++	0xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,
    ++	0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
    ++	0x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,
    ++	0x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
    ++	0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
    ++	0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
    ++	0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01 } },
    ++{ 0x0040, 0x0000, 0x0040,
    ++	{ 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++	0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++	0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++	0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++	0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
    ++	0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    ++	0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
    ++	0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e } },
    ++{ 0x0080, 0x0000, 0x001f,
    ++	{ 0xb0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,
    ++	0x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,
    ++	0x00, 0x9c, 0x03, 0x01, 0x00, 0x16, 0x00, 0x04,
    ++	0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00 } },
    ++{ 0x0200, 0x0000, 0x0012,
    ++	{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    ++	0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
    ++	0x40, 0x20 } },
    ++{ 0x0300, 0x0000, 0x0003,
    ++	{ 0x03, 0x00, 0x00 } },
    ++{ 0x0400, 0x0000, 0x0007,
    ++	{ 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++{ 0x0500, 0x0000, 0x0006,
    ++	{ 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++{ 0x0600, 0x0000, 0x001b,
    ++	{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++	0x00, 0x00, 0x00 } },
    ++{ 0x0800, 0x0000, 0x0015,
    ++	{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++	0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++{ 0x1000, 0x0000, 0x0040,
    ++	{ 0x83, 0x02, 0x20, 0x00, 0x11, 0x00, 0x00, 0x00,
    ++	0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
    ++	0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++	0x00, 0x49, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++	0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
    ++	0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
    ++	0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
    ++	0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80 } },
    ++{ 0x1040, 0x0000, 0x0040,
    ++	{ 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
    ++	0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
    ++	0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    ++	0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    ++	0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
    ++	0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    ++	0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
    ++	0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3 } },
    ++{ 0x1080, 0x0000, 0x001d,
    ++	{ 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
    ++	0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,
    ++	0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
    ++	0x01, 0x60, 0x01, 0x00, 0x00 } },
    ++{ 0x0406, 0x0000, 0x0001,
    ++	{ 0xc0 } },
    ++{ 0x1085, 0x0000, 0x0008,
    ++	{ 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00 } },
    ++{ 0x0200, 0x0000, 0x0011,
    ++	{ 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,
    ++	  0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,
    ++	  0x40 } },
    ++{ 0x108f, 0x0000, 0x000c,
    ++	{ 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
    ++	0x20, 0x01, 0x60, 0x01 } },
    ++{ 0x1011, 0x0000, 0x0008,
    ++	{ 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x3f, 0x01 } },
    ++{ 0x100e, 0x0000, 0x0001,
    ++	{ 0x08 } },
    ++{ 0x1041, 0x0000, 0x0011,
    ++	{ 0x00, 0x40, 0x62, 0x7b, 0x91, 0xa3, 0xb3, 0xc2,
    ++	0xd0, 0xdd, 0xe9, 0xf5, 0xf9, 0xf9, 0xf9, 0xf9,
    ++	0xf9 } },
    ++{ 0x1003, 0x0000, 0x0001,
    ++	{ 0x00 } },
    ++{ 0x100f, 0x0000, 0x0002,
    ++	{ 0x0c, 0x0c } },
    ++{ 0x1003, 0x0000, 0x0001,
    ++	{ 0x06 } },
    ++{ 0x1041, 0x0000, 0x0011,
    ++	{ 0x00, 0x40, 0x62, 0x7b, 0x91, 0xa3, 0xb3, 0xc2,
    ++	0xd0, 0xdd, 0xe9, 0xf5, 0xf9, 0xf9, 0xf9, 0xf9,
    ++	0xf9 } },
    ++{ 0x100b, 0x0000, 0x0001,
    ++	{ 0x0e } },
    ++{ 0x100d, 0x0000, 0x0001,
    ++	{ 0x16 } },
    ++{ 0x100c, 0x0000, 0x0001,
    ++	{ 0x10 } },
    ++{ 0x0406, 0x0000, 0x0001,
    ++	{ 0xc3 } },
    ++{ 0x0405, 0x0000, 0x0001,
    ++	{ 0x41 } },
    ++{ 0x0404, 0x0000, 0x0001,  // INIT_LENGT 36
    ++	{ 0x40 } },
    +diff -Naur nw802-2.4-0.0.99/Twinkle.init nw802-2.4/Twinkle.init
    +--- nw802-2.4-0.0.99/Twinkle.init	1970-01-01 01:00:00.000000000 +0100
    ++++ nw802-2.4/Twinkle.init	2003-11-15 22:21:15.000000000 +0100
    +@@ -0,0 +1,240 @@
    ++		{ 0x0405, 0x0000, 0x0001,
    ++			{ 0x61 } },
    ++		{ 0x404, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0406, 0x0000, 0x0001,
    ++			{ 0x04 } },
    ++		{ 0x0404, 0x0000, 0x0003,
    ++		 	{ 0x00, 0x00, 0x00 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x00 } },
    ++		{ 0x0406, 0x0000, 0x0001,
    ++			{ 0x44 } },
    ++		{ 0x0406, 0x0000, 0x0001,
    ++			{ 0x00 } },
    ++		{ 0x0000, 0x0000, 0x0040,
    ++			{ 0x14, 0x83, 0x00, 0xba, 0x01, 0x10, 0x00, 0x4f,
    ++			  0xef, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x19,
    ++			  0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
    ++			  0x00, 0x01, 0x00, 0x19, 0x00, 0x06, 0x00, 0xfc,
    ++			  0x01, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
    ++			  0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
    ++			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
    ++			  0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01 } },
    ++		{ 0x0040, 0x0000, 0x0040,
    ++			{ 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++			  0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
    ++			  0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
    ++			  0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
    ++			  0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
    ++			  0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e } },
    ++		{ 0x0080, 0x0000, 0x001f,
    ++			{ 0xb8, 0x48, 0x0f, 0x04, 0x88, 0x14, 0x68, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x03,
    ++			  0x00, 0x24, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
    ++			  0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00 } },
    ++		{ 0x0200, 0x0000, 0x0012,
    ++			{ 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
    ++			  0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
    ++			  0x40, 0x20 } },
    ++		{ 0x0300, 0x0000, 0x0003,
    ++			{ 0x03, 0x00, 0x00 } },
    ++		{ 0x0400, 0x0000, 0x0007,
    ++			{ 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0x00 } },
    ++		{ 0x0500, 0x0000, 0x0006,
    ++			{ 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++		{ 0x0600, 0x0000, 0x001b,
    ++			{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00 } },
    ++		{ 0x0800, 0x0000, 0x0015,
    ++			{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00 } },
    ++		{ 0x1000, 0x0000, 0x0040,
    ++			{ 0x80, 0x02, 0x20, 0x00, 0x11, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x08,
    ++			  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
    ++			  0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
    ++			  0x03, 0x00, 0x00, 0x10, 0x00, 0x20, 0x10, 0x06,
    ++			  0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x00, 0x80 } },
    ++		{ 0x1040, 0x0000, 0x0040,
    ++			{ 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
    ++			  0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
    ++			  0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
    ++			  0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
    ++			  0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
    ++			  0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
    ++			  0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
    ++			  0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3 } },
    ++		{ 0x1080, 0x0000, 0x001d,
    ++			{ 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
    ++			  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62,
    ++			  0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
    ++			  0x01, 0x60, 0x01, 0x00, 0x00 } },
    ++		{ 0x1085, 0x0000, 0x0008,
    ++			{ 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01 } },
    ++		{ 0x0404, 0x0000, 0x0001,
    ++			{ 0x10 } },
    ++		{ 0x0404, 0x0000, 0x0001,
    ++			{ 0x00 } },
    ++		{ 0x0405, 0x0000, 0x0001,
    ++			{ 0x61 } },
    ++		{ 0x0404, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x000b,
    ++			{ 0xc0, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
    ++			   0x00, 0x00, 0x0a } },
    ++		{ 0x0600, 0x0000, 0x000c,
    ++			{ 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00,
    ++			   0x00, 0x00, 0x00, 0x0a } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x0c, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x06 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x11, 0x06 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x00 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x14, 0x00 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x13, 0x01 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x07, 0x01 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0200, 0x0000, 0x0011,
    ++			{ 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,
    ++			  0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,
    ++			  0x40 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x0c } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x02, 0x0c } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x13, 0x01 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x1000, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x108f, 0x0000, 0x000c,
    ++			{ 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
    ++			  0x20, 0x01, 0x60, 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x0f } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x05, 0x0f } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x13, 0x01 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0006,
    ++			{ 0x04, 0x0b, 0x01, 0x01, 0x02, 0x17 } },
    ++		{ 0x0600, 0x0000, 0x0007,
    ++			{ 0x08, 0x04, 0x0b, 0x01, 0x01, 0x02, 0x17 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x08, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x00, 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0003,
    ++			{ 0x12, 0x00, 0x01 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x03, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x1011, 0x0000, 0x0008,
    ++			{ 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x00 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x12, 0x00 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x00 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x0e, 0x00 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x0600, 0x0000, 0x0001,
    ++			{ 0x06 } },
    ++		{ 0x0600, 0x0000, 0x0002,
    ++			{ 0x11, 0x06 } },
    ++		{ 0x0502, 0x0000, 0x0002,
    ++			{ 0x02, 0x40 } },
    ++		{ 0x0505, 0x0000, 0x0001,
    ++			{ 0x01 } },
    ++		{ 0x1041, 0x0000, 0x0011,
    ++			{ 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
    ++			  0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
    ++			  0xf9 } },
    ++		{ 0x1003, 0x0000, 0x0001,
    ++			{ 0x00 } },
    ++		{ 0x100f, 0x0000, 0x0002,
    ++			{ 0x0c, 0x0c } },
    ++		{ 0x1003, 0x0000, 0x0001,
    ++			{ 0x06 } },
    ++		{ 0x1041, 0x0000, 0x0011,
    ++			{ 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
    ++			  0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
    ++			  0xf9 } },
    ++		{ 0x100b, 0x0000, 0x0001,
    ++			{ 0x19 } },
    ++		{ 0x100d, 0x0000, 0x0001,
    ++			{ 0x10 } },
    ++		{ 0x100c, 0x0000, 0x0001,
    ++			{ 0x0d } },
    ++		{ 0x0406, 0x0000, 0x0001,
    ++			{ 0x03 } },
    ++		{ 0x0405, 0x0000, 0x0001,
    ++			{ 0x61 } },
    ++		{ 0x0404, 0x0000, 0x0001,
    ++			{ 0x41 } },
    diff --git a/multimedia/nw802-2.4/patches/100-compile_fix.patch b/multimedia/nw802-2.4/patches/100-compile_fix.patch
    new file mode 100644
    index 0000000..1f3d20c
    --- /dev/null
    +++ b/multimedia/nw802-2.4/patches/100-compile_fix.patch
    @@ -0,0 +1,134 @@
    +--- a/nw8xx_jpgl.c
    ++++ b/nw8xx_jpgl.c
    +@@ -111,18 +111,18 @@
    + // Clamping table
    + #define SAFE_CLAMP
    + #ifdef SAFE_CLAMP
    +-inline unsigned char clamp(int x) {
    ++inline unsigned char nw8xx_clamp(int x) {
    + 	if ( x > 255 )
    + 		return 255;
    + 	if ( x < 0 )
    + 		return 0;
    + 	return x;
    + }
    +-#define clamp_adjust(x) clamp(x+128)
    ++#define nw8xx_clamp_adjust(x) nw8xx_clamp(x+128)
    + #else
    +-#define clamp(x) clampTbl[(x)+512]
    +-#define clamp_adjust(x) clampTbl[(x)+640]
    +-static char clampTbl[1280];
    ++#define nw8xx_clamp(x) nw8xx_clampTbl[(x)+512]
    ++#define nw8xx_clamp_adjust(x) nw8xx_clampTbl[(x)+640]
    ++static char nw8xx_clampTbl[1280];
    + #endif
    + 
    + // Code to initialize those tables
    +@@ -195,19 +195,19 @@
    + }
    + 
    + #ifndef SAFE_CLAMP
    +-static void clampTbl_init(void)
    ++static void nw8xx_clampTbl_init(void)
    + {
    + 	// Instead of doing if(...) to test for overrange, we use
    +-	// a clamping table
    ++	// a nw8xx_clamping table
    + 	
    + 	int i;
    + 
    + 	for (i=0 ; i < 512 ; i++)
    +-		clampTbl[i] = 0;
    ++		nw8xx_clampTbl[i] = 0;
    + 	for (i=512 ; i < 768 ; i++ )
    +-		clampTbl[i] = i - 512;
    ++		nw8xx_clampTbl[i] = i - 512;
    + 	for (i=768 ; i < 1280 ; i++ )
    +-		clampTbl[i] = 255;
    ++		nw8xx_clampTbl[i] = 255;
    + 
    + }
    + #endif
    +@@ -521,16 +521,16 @@
    + 				for ( x=0 ; x<4 ; x++ )
    + 				{
    + 					// Y block
    +-					Yline[ 0] = clamp_adjust(block_y[block_idx   ]);
    +-					Yline[ 4] = clamp_adjust(block_y[block_idx+16]);
    +-					Yline[ 8] = clamp_adjust(block_y[block_idx+32]);
    +-					Yline[12] = clamp_adjust(block_y[block_idx+48]);
    ++					Yline[ 0] = nw8xx_clamp_adjust(block_y[block_idx   ]);
    ++					Yline[ 4] = nw8xx_clamp_adjust(block_y[block_idx+16]);
    ++					Yline[ 8] = nw8xx_clamp_adjust(block_y[block_idx+32]);
    ++					Yline[12] = nw8xx_clamp_adjust(block_y[block_idx+48]);
    + 
    + 					// U block
    +-					*Uline = clamp_adjust(block_u[block_idx]);
    ++					*Uline = nw8xx_clamp_adjust(block_u[block_idx]);
    + 
    + 					// V block
    +-					*Vline = clamp_adjust(block_v[block_idx]);
    ++					*Vline = nw8xx_clamp_adjust(block_v[block_idx]);
    + 
    + 					// Ajust pointers & index
    + 					block_idx++;
    +@@ -596,9 +596,9 @@
    + 				vc = Vline[0];
    + 
    + 					// B G R
    +-				*(fb++) = clamp(( yc + yuvTbl_v2[vc] ) >> 16);
    +-				*(fb++) = clamp(( yc - yuvTbl_u2[uc] - yuvTbl_v1[vc] ) >> 16);
    +-				*(fb++) = clamp(( yc + yuvTbl_u1[uc] ) >> 16);
    ++				*(fb++) = nw8xx_clamp(( yc + yuvTbl_v2[vc] ) >> 16);
    ++				*(fb++) = nw8xx_clamp(( yc - yuvTbl_u2[uc] - yuvTbl_v1[vc] ) >> 16);
    ++				*(fb++) = nw8xx_clamp(( yc + yuvTbl_u1[uc] ) >> 16);
    + #ifdef _JPGL_TEST_
    + 				fb++;
    + #endif
    +@@ -609,9 +609,9 @@
    + 				vc = ( 3*Vline[0] + Vline[1] ) >> 2;
    + 				
    + 					// B G R
    +-				*(fb++) = clamp(( yc + yuvTbl_v2[vc] ) >> 16);
    +-				*(fb++) = clamp(( yc - yuvTbl_u2[uc] - yuvTbl_v1[vc] ) >> 16);
    +-				*(fb++) = clamp(( yc + yuvTbl_u1[uc] ) >> 16);
    ++				*(fb++) = nw8xx_clamp(( yc + yuvTbl_v2[vc] ) >> 16);
    ++				*(fb++) = nw8xx_clamp(( yc - yuvTbl_u2[uc] - yuvTbl_v1[vc] ) >> 16);
    ++				*(fb++) = nw8xx_clamp(( yc + yuvTbl_u1[uc] ) >> 16);
    + #ifdef _JPGL_TEST_
    + 				fb++;
    + #endif
    +@@ -622,9 +622,9 @@
    + 				vc = ( Vline[0] + Vline[1] ) >> 1;
    + 
    + 					// B G R
    +-				*(fb++) = clamp(( yc + yuvTbl_v2[vc] ) >> 16);
    +-				*(fb++) = clamp(( yc - yuvTbl_u2[uc] - yuvTbl_v1[vc] ) >> 16);
    +-				*(fb++) = clamp(( yc + yuvTbl_u1[uc] ) >> 16);
    ++				*(fb++) = nw8xx_clamp(( yc + yuvTbl_v2[vc] ) >> 16);
    ++				*(fb++) = nw8xx_clamp(( yc - yuvTbl_u2[uc] - yuvTbl_v1[vc] ) >> 16);
    ++				*(fb++) = nw8xx_clamp(( yc + yuvTbl_u1[uc] ) >> 16);
    + #ifdef _JPGL_TEST_
    + 				fb++;
    + #endif
    +@@ -635,9 +635,9 @@
    + 				vc = ( Vline[0] + 3*Vline[1] ) >> 2;
    + 
    + 					// B G R
    +-				*(fb++) = clamp(( yc + yuvTbl_v2[vc] ) >> 16);
    +-				*(fb++) = clamp(( yc - yuvTbl_u2[uc] - yuvTbl_v1[vc] ) >> 16);
    +-				*(fb++) = clamp(( yc + yuvTbl_u1[uc] ) >> 16);
    ++				*(fb++) = nw8xx_clamp(( yc + yuvTbl_v2[vc] ) >> 16);
    ++				*(fb++) = nw8xx_clamp(( yc - yuvTbl_u2[uc] - yuvTbl_v1[vc] ) >> 16);
    ++				*(fb++) = nw8xx_clamp(( yc + yuvTbl_u1[uc] ) >> 16);
    + #ifdef _JPGL_TEST_
    + 				fb++;
    + #endif
    +@@ -707,6 +707,6 @@
    + 	vlcTbl_init();
    + 	yuvTbl_init();
    + #ifndef SAFE_CLAMP
    +-	clampTbl_init();
    ++	nw8xx_clampTbl_init();
    + #endif
    + }
    diff --git a/multimedia/ov51x-jpeg/Makefile b/multimedia/ov51x-jpeg/Makefile
    new file mode 100644
    index 0000000..e8071bb
    --- /dev/null
    +++ b/multimedia/ov51x-jpeg/Makefile
    @@ -0,0 +1,75 @@
    +#
    +# Copyright (C) 2007-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +include $(INCLUDE_DIR)/kernel.mk
    +
    +PKG_NAME:=ov51x-jpeg
    +PKG_VERSION:=1.5.9
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.rastageeks.org/downloads/ov51x-jpeg/ \
    +	http://www.rastageeks.org/downloads/ov51x-jpeg/old-releases/
    +PKG_MD5SUM:=95041de8e908f1548df3d4e1f6ed2a94
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/ov51x-jpeg/Default
    +  URL:=http://www.rastageeks.org/ov51x-jpeg/
    +endef
    +
    +define Package/ov51x-jpeg-utils
    +$(call Package/ov51x-jpeg/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  TITLE:=OV51x based USB webcam utilities
    +  DEPENDS:=+kmod-video-ov51x-jpeg
    +endef
    +
    +define Package/ov51x-jpeg-utils/description
    + Utility programs for the video-ov51x kernel module
    +endef
    +
    +define KernelPackage/video-ov51x-jpeg
    +$(call Package/ov51x-jpeg/Default)
    +  SUBMENU:=Video Support
    +  TITLE:=OV51x based USB webcam support (JPEG)
    +  DEPENDS:=@LINUX_2_6_25||LINUX_2_6_27||LINUX_2_6_28 @USB_SUPPORT +kmod-usb-core +kmod-video-core
    +  FILES:=$(PKG_BUILD_DIR)/ov51x-jpeg.$(LINUX_KMOD_SUFFIX)
    +  AUTOLOAD:=$(call AutoLoad,70,ov51x-jpeg)
    +endef
    +
    +define KernelPackage/video-ov51x-jpeg/description
    + Kernel module for OV51x based USB cameras, with in-driver JPEG support.
    +endef
    +
    +ifneq ($(CONFIG_PACKAGE_kmod-video-ov51x-jpeg),)
    +  define Build/Compile/kmod
    +	$(MAKE) -C $(LINUX_DIR) \
    +		ARCH="$(LINUX_KARCH)" \
    +		CROSS_COMPILE="$(TARGET_CROSS)" \
    +		SUBDIRS="$(PKG_BUILD_DIR)" \
    +		modules
    +  endef
    +endif
    +
    +define Build/Compile
    +	$(call Build/Compile/kmod)
    +	$(MAKE) -C $(PKG_BUILD_DIR)/test \
    +		CFLAGS="$(TARGET_CFLAGS)" \
    +		CC="$(TARGET_CC)" \
    +		getjpeg
    +endef
    +
    +define Package/ov51x-jpeg-utils/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/test/getjpeg $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,ov51x-jpeg-utils))
    +$(eval $(call KernelPackage,video-ov51x-jpeg))
    diff --git a/multimedia/ov51x-jpeg/patches/100-compile_fix.patch b/multimedia/ov51x-jpeg/patches/100-compile_fix.patch
    new file mode 100644
    index 0000000..56bdf90
    --- /dev/null
    +++ b/multimedia/ov51x-jpeg/patches/100-compile_fix.patch
    @@ -0,0 +1,20 @@
    +--- a/ov51x-jpeg-core.c
    ++++ b/ov51x-jpeg-core.c
    +@@ -753,7 +753,7 @@
    + 	 * -claudio
    + 	 */
    + 
    +-	ov51x_jpeg_proc_entry = create_proc_entry("ov51x-jpeg", S_IFDIR, &proc_root);
    ++	ov51x_jpeg_proc_entry = create_proc_entry("ov51x-jpeg", S_IFDIR, NULL);
    + 	if (ov51x_jpeg_proc_entry)
    + 		ov51x_jpeg_proc_entry->owner = THIS_MODULE;
    + 	else
    +@@ -771,7 +771,7 @@
    + 
    + 	/* Destroy proc entry */
    + 	PDEBUG(4, "destroying /proc/ov51x-jpeg");
    +-	remove_proc_entry("ov51x-jpeg", &proc_root);
    ++	remove_proc_entry("ov51x-jpeg", NULL);
    + 	ov51x_jpeg_proc_entry = NULL;
    + 
    + }
    diff --git a/multimedia/palantir/Makefile b/multimedia/palantir/Makefile
    new file mode 100644
    index 0000000..d80ac50
    --- /dev/null
    +++ b/multimedia/palantir/Makefile
    @@ -0,0 +1,62 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=palantir
    +PKG_VERSION:=2.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
    +PKG_SOURCE_URL:=http://www.fastpath.it/products/palantir/pub/
    +PKG_MD5SUM:=3a5b1fb340857f6d8e357bf39b77583e
    +
    +PKG_BUILD_DEPENDS:=libjpeg
    +
    +define Package/palantir
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  DEPENDS:=+libjpeg +libpthread
    +  TITLE:=A multichannel interactive streaming solution
    +  URL:=http://www.fastpath.it/products/palantir/
    +endef
    +
    +define Package/palantir/description
    +	Palantir is a Linux-based streaming system designed to transmit live
    +	video, audio and data over a TCP/IP network, as well as to control
    +	remote devices.
    +endef
    +
    +define Package/palantir/conffiles
    +/etc/palantir.conf
    +endef
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +export CPPFLAGS=$(TARGET_CPPFLAGS)
    +export LDFLAGS=$(TARGET_LDFLAGS)
    +
    +define Build/Compile	
    +	$(MAKE) -C $(PKG_BUILD_DIR)/server/libgsm \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		CCINC="$(TARGET_CPPFLAGS)" \
    +		COPTS="$(TARGET_CFLAGS)" \
    +		lib/libgsm.a
    +	$(MAKE) -C $(PKG_BUILD_DIR)/server \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		COPTS="$(TARGET_CFLAGS)" \
    +		palantir
    +endef
    +
    +define Package/palantir/install	
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/server/palantir-mips.conf.sample $(1)/etc/palantir.conf
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/server/palantir $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,palantir))
    diff --git a/multimedia/palantir/patches/001-opt_flags.patch b/multimedia/palantir/patches/001-opt_flags.patch
    new file mode 100644
    index 0000000..1707ecb
    --- /dev/null
    +++ b/multimedia/palantir/patches/001-opt_flags.patch
    @@ -0,0 +1,26 @@
    +Index: palantir-2.7/server/libgsm/Makefile
    +===================================================================
    +--- palantir-2.7.orig/server/libgsm/Makefile	2008-04-07 22:35:39.000000000 +0200
    ++++ palantir-2.7/server/libgsm/Makefile	2008-04-07 22:35:39.000000000 +0200
    +@@ -53,7 +53,7 @@
    + endif
    + 
    + CC		+= -ansi -pedantic
    +-CCFLAGS 	= -c -O2 -DNeedFunctionPrototypes=1
    ++CCFLAGS 	= -c $(COPTS) -DNeedFunctionPrototypes=1
    + 
    + LD 		= $(CC)
    + 
    +Index: palantir-2.7/server/Makefile
    +===================================================================
    +--- palantir-2.7.orig/server/Makefile	2008-04-07 22:35:39.000000000 +0200
    ++++ palantir-2.7/server/Makefile	2008-04-07 22:35:39.000000000 +0200
    +@@ -47,7 +47,7 @@
    + .PHONY : tools man
    + 
    + 
    +-CFLAGS= -Wall -D_REENTRANT -O2 -g
    ++CFLAGS= -Wall -D_REENTRANT $(COPTS)
    + # -O3
    + CC= gcc
    + libjpeg= -ljpeg
    diff --git a/multimedia/peercast/Makefile b/multimedia/peercast/Makefile
    new file mode 100644
    index 0000000..dc16a93
    --- /dev/null
    +++ b/multimedia/peercast/Makefile
    @@ -0,0 +1,63 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=peercast
    +PKG_VERSION:=0.1214
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.cti.ecp.fr/~beauxir5/peercast
    +PKG_MD5SUM:=4e8449cde7135ad97f788e67e1bd64ee
    +
    +PKG_FIXUP:=libtool
    +PKG_REMOVE_FILES:=aclocal.m4 acinclude.m4
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/peercast
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  DEPENDS:=+libpthread +uclibcxx
    +  TITLE:=P2P audio and video streaming server
    +  URL:=http://www.peercast.org/
    +endef
    +
    +define Package/peercast/conffiles
    +/etc/peercast.ini
    +endef
    +
    +define Package/peercast/description
    + PeerCast is a fresh new P2P streaming server. It can stream music and 
    + video from a broad variety of formats. Many audio players can listen to 
    + peercast streams, as it's been built to remain compatible with Nullsoft 
    + Shoutcast.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--enable-staticbin \
    +
    +CONFIGURE_VARS += \
    +	CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
    +	CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
    +	LIBS="-nodefaultlibs -luClibc++ -lpthread" \
    +
    +define Package/peercast/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/peercast $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/usr/share/peercast/html
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/peercast/html/en $(1)/usr/share/peercast/html/
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_DATA) ./files/peercast.ini $(1)/etc/
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/peercast.init $(1)/etc/init.d/peercast
    +endef
    +
    +$(eval $(call BuildPackage,peercast))
    diff --git a/multimedia/peercast/files/peercast.ini b/multimedia/peercast/files/peercast.ini
    new file mode 100644
    index 0000000..f703c6e
    --- /dev/null
    +++ b/multimedia/peercast/files/peercast.ini
    @@ -0,0 +1,81 @@
    +
    +[Server]
    +serverPort = 7144
    +autoServe = Yes
    +forceIP = 
    +isRoot = No
    +maxBitrateOut = 0
    +maxRelays = 1
    +maxDirect = 0
    +maxRelaysPerChannel = 0
    +firewallTimeout = 30
    +forceNormal = No
    +rootMsg = 
    +authType = cookie
    +cookiesExpire = session
    +htmlPath = html/en
    +minPGNUIncoming = 10
    +maxPGNUIncoming = 20
    +maxServIn = 50
    +chanLog = 
    +networkID = 00000000000000000000000000000000
    +
    +[Broadcast]
    +broadcastMsgInterval = 10
    +broadcastMsg = 
    +icyMetaInterval = 8192
    +broadcastID = 898145B5C0427118B595AF7D9E110000
    +hostUpdateInterval = 180
    +maxControlConnections = 3
    +rootHost = yp.peercast.org
    +
    +[Client]
    +refreshHTML = 5
    +relayBroadcast = 30
    +minBroadcastTTL = 1
    +maxBroadcastTTL = 7
    +pushTries = 5
    +pushTimeout = 60
    +maxPushHops = 8
    +autoQuery = 0
    +queryTTL = 7
    +
    +[Privacy]
    +password = hackme
    +maxUptime = 0
    +
    +[Filter]
    +ip = 255.255.255.255
    +private = No
    +ban = No
    +network = Yes
    +direct = Yes
    +[End]
    +
    +[Notify]
    +PeerCast = Yes
    +Broadcasters = Yes
    +TrackInfo = Yes
    +[End]
    +
    +[Server1]
    +allowHTML = Yes
    +allowBroadcast = Yes
    +allowNetwork = Yes
    +allowDirect = Yes
    +[End]
    +
    +[Server2]
    +allowHTML = No
    +allowBroadcast = Yes
    +allowNetwork = No
    +allowDirect = No
    +[End]
    +
    +[Debug]
    +logDebug = No
    +logErrors = No
    +logNetwork = No
    +logChannel = No
    +pauseLog = No
    +idleSleepTime = 10
    diff --git a/multimedia/peercast/files/peercast.init b/multimedia/peercast/files/peercast.init
    new file mode 100644
    index 0000000..033beb0
    --- /dev/null
    +++ b/multimedia/peercast/files/peercast.init
    @@ -0,0 +1,14 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +PID_F=/var/run/peercast.pid
    +
    +start() {
    +	peercast -d -i /etc/peercast.ini -l /var/log/peercast.log -p $PID_F
    +}
    +
    +stop() {
    +	[ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1
    +}
    +
    diff --git a/multimedia/puppy/Makefile b/multimedia/puppy/Makefile
    new file mode 100644
    index 0000000..c17434d
    --- /dev/null
    +++ b/multimedia/puppy/Makefile
    @@ -0,0 +1,36 @@
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=puppy
    +PKG_VERSION:=1.14
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=puppy_$(PKG_VERSION)_src.tar.bz2
    +PKG_SOURCE_URL:=@SF/puppy
    +PKG_MD5SUM:=a7a53da5b8ba4fdb15e2fc8e1531b82c
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/puppy_$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/puppy
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  DEPENDS:=@USB_SUPPORT
    +  TITLE:=Topfield PVR file transfer client
    +  URL:=http://puppy.sourceforge.net/
    +endef
    +
    +define Package/puppy/description
    +Client to access Topfield PVRs via the USB port
    +endef
    +
    +define Build/Configure
    +endef
    +
    +define Package/puppy/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/puppy $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,puppy))
    diff --git a/multimedia/qc-usb/Makefile b/multimedia/qc-usb/Makefile
    new file mode 100644
    index 0000000..6f6f0bd
    --- /dev/null
    +++ b/multimedia/qc-usb/Makefile
    @@ -0,0 +1,91 @@
    +# 
    +# Copyright (C) 2006-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +include $(INCLUDE_DIR)/kernel.mk
    +
    +PKG_NAME:=qc-usb
    +PKG_VERSION:=0.6.6
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/qce-ga
    +PKG_MD5SUM:=9eab8fb3a75326d1565d59b0c7256075
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/qc-usb/Default
    +  URL:=http://qce-ga.sourceforge.net/
    +endef
    +
    +define Package/qc-usb-utils
    +$(call Package/qc-usb/Default)
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  TITLE:=Utility programs for the qc-usb kernel module
    +endef
    +
    +define Package/qc-usb-utils/description
    + Utilities to tweak parameters of your QuickCam Express or similar webcam. 
    + These programs are completely useless without a qc-usb-modules package.
    +endef
    +
    +define KernelPackage/video-quickcam
    +$(call Package/qc-usb/Default)
    +  SUBMENU:=Video Support
    +  TITLE:=QuickCam Express USB webcam support
    +  DEPENDS:=@USB_SUPPORT @LINUX_2_4||LINUX_2_6_25||LINUX_2_6_27||LINUX_2_6_28 +kmod-usb-core +kmod-video-core
    +  FILES:=$(PKG_BUILD_DIR)/quickcam.$(LINUX_KMOD_SUFFIX)
    +  AUTOLOAD:=$(call AutoLoad,90,quickcam)
    +endef
    +
    +define KernelPackage/video-quickcam/description
    + Kernel support for Logitech's QuickCam Express webcam and other webcams 
    + with similar chipsets.
    +endef
    +
    +ifeq ($(KERNEL),2.4)
    +  ifeq ($(LINUX_KARCH),i386)
    +    KERNEL_C_OPTS:= -Os -mpreferred-stack-boundary=2 -march=i486 -fno-unit-at-a-time
    +  endif
    +  ifeq ($(LINUX_KARCH),mips)
    +    KERNEL_C_OPTS:= -Os -G 0 -mlong-calls -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap
    +  endif
    +endif
    +
    +ifneq ($(CONFIG_PACKAGE_kmod-video-quickcam),)
    +  define Build/Compile/kmod
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		LINUX_DIR="$(LINUX_DIR)" \
    +		ARCH="$(LINUX_KARCH)" \
    +		CROSS_COMPILE="$(TARGET_CROSS)" \
    +		CC="$(TARGET_CC)" \
    +		LD="$(TARGET_CC) -nodefaultlibs -nostartfiles" \
    +		USER_OPT="$(KERNEL_C_OPTS)" \
    +		quickcam.$(LINUX_KMOD_SUFFIX)
    +  endef
    +endif
    +
    +define Build/Compile/user
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		CC="$(TARGET_CC)" \
    +		CFLAGS="$(TARGET_CFLAGS)" \
    +		qcset
    +endef
    +
    +define Build/Compile
    +	$(call Build/Compile/kmod)
    +	$(call Build/Compile/user)
    +endef
    +
    +define Package/qc-usb-utils/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/qcset $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,qc-usb-utils))
    +$(eval $(call KernelPackage,video-quickcam))
    diff --git a/multimedia/qc-usb/patches/001-linux_2_6.patch b/multimedia/qc-usb/patches/001-linux_2_6.patch
    new file mode 100644
    index 0000000..0de4186
    --- /dev/null
    +++ b/multimedia/qc-usb/patches/001-linux_2_6.patch
    @@ -0,0 +1,44 @@
    +--- a/qc-driver.c
    ++++ b/qc-driver.c
    +@@ -821,7 +821,9 @@ static int qc_i2c_init(struct quickcam *
    + 	if (!cr) goto fail2;
    + 	urb->transfer_buffer = kmalloc(qc_i2c_maxbufsize*sizeof(u8), GFP_KERNEL);	/* Allocate maximum ever needed */
    + 	if (!urb->transfer_buffer) goto fail3;
    ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
    + 	spin_lock_init(&urb->lock);
    ++#endif
    + 	urb->complete = qc_i2c_handler;
    + 	urb->context  = qc;
    + #if (LINUX_VERSION_CODE= KERNEL_VERSION(2,6,0)
    + 	release:	qc_v4l_release,
    +--- a/qc-memory.c
    ++++ b/qc-memory.c
    +@@ -78,15 +78,19 @@ static inline int qc_remap_page_range(un
    + #endif
    + 
    + #if LINUX_VERSION_CODE>=KERNEL_VERSION(2,5,3) || defined(pte_offset_map)
    ++#ifndef pte_offset
    + #define pte_offset(pmd,adr)	pte_offset_map(pmd,adr)	/* Emulation for a kernel using the new rmap-vm */
    ++#endif
    + #endif							/* Fix by Michele Balistreri  */
    + 
    ++#ifndef SETPAGEFLAG
    + #ifndef SetPageReserved
    + #define SetPageReserved(p)	mem_map_reserve(p)
    + #endif
    + #ifndef ClearPageReserved
    + #define ClearPageReserved(p)	mem_map_unreserve(p)
    + #endif
    ++#endif /* SETPAGEFLAG */
    + /* }}} */
    + 
    + /* {{{ [fold] kvirt_to_pa(): obtain physical address from virtual address obtained by vmalloc() */
    diff --git a/multimedia/qc-usb/patches/002-qc_set_cross_compile.patch b/multimedia/qc-usb/patches/002-qc_set_cross_compile.patch
    new file mode 100644
    index 0000000..a1a4a10
    --- /dev/null
    +++ b/multimedia/qc-usb/patches/002-qc_set_cross_compile.patch
    @@ -0,0 +1,11 @@
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -183,7 +183,7 @@ install: $(MODULE_NAME)
    + 	-$(DEPMOD) -a
    + 
    + qcset: qcset.c quickcam.h
    +-	gcc -Wall -O2 -s qcset.c -o qcset -lm
    ++	$(CC) -Wall -O2 -s qcset.c -o qcset -lm
    + 
    + .PHONY: patch
    + patch: kernel-patch kernel-files
    diff --git a/multimedia/qc-usb/patches/003-linux_2_6_27.patch b/multimedia/qc-usb/patches/003-linux_2_6_27.patch
    new file mode 100644
    index 0000000..c7ee993
    --- /dev/null
    +++ b/multimedia/qc-usb/patches/003-linux_2_6_27.patch
    @@ -0,0 +1,25 @@
    +---
    +--- a/qc-driver.c
    ++++ b/qc-driver.c
    +@@ -2528,7 +2528,11 @@ static int qc_v4l_ioctl(struct video_dev
    + 			if (qcdebug&QC_DEBUGUSER) PDEBUG("VIDIOCGCAP");
    + 			memset(&b, 0, sizeof(b));
    + 			strcpy(b.name, "Logitech QuickCam USB");	/* Max 31 characters */
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
    ++			b.type      = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE;
    ++#else
    + 			b.type      = qc->vdev.type;
    ++#endif
    + 			b.channels  = 1;
    + 			b.audios    = 0;
    + 			b.maxwidth  = qc->sensor_data.maxwidth;
    +@@ -3007,7 +3011,9 @@ static struct file_operations qc_v4l_fop
    + 
    + static struct video_device qc_v4l_template = {
    + 	name:		"QuickCam USB",
    ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
    + 	type:		VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE,
    ++#endif
    + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
    + 	hardware:	VID_HARDWARE_QCAM_USB,
    + #endif
    diff --git a/multimedia/qc-usb/patches/004-linux_2_6_28.patch b/multimedia/qc-usb/patches/004-linux_2_6_28.patch
    new file mode 100644
    index 0000000..851af75
    --- /dev/null
    +++ b/multimedia/qc-usb/patches/004-linux_2_6_28.patch
    @@ -0,0 +1,108 @@
    +The following upstream commit renders qc-usb FTBS:
    +
    +Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=601e9444f249d219009ec05674268d90f6f1cdcb
    +Commit:     601e9444f249d219009ec05674268d90f6f1cdcb
    +Parent:     e138c592b50370621653fd962b2bc3f4e25dfe78
    +Author:     Hans Verkuil 
    +AuthorDate: Sat Aug 23 07:24:07 2008 -0300
    +Committer:  Mauro Carvalho Chehab 
    +CommitDate: Sun Oct 12 09:36:54 2008 -0200
    +
    +    V4L/DVB (8786): v4l2: remove the priv field, use dev_get_drvdata instead
    +    
    +    Remove the priv field and let video_get/set_drvdata use dev_get_drvdata
    +    and dev_set_drvdata instead.
    +    
    +    Convert all drivers that still used priv directly.
    +    
    +    Signed-off-by: Hans Verkuil 
    +    Signed-off-by: Mauro Carvalho Chehab 
    +
    +Copyright (C) 2008 Stefan Lippers-Hollmann 
    +
    +--- a/qc-driver.c
    ++++ b/qc-driver.c
    +@@ -2255,7 +2255,11 @@ static unsigned int qc_v4l_poll(struct v
    + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    + 	struct video_device *dev = video_devdata(file);
    + #endif
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
    ++	struct quickcam *qc = (struct quickcam *)video_get_drvdata(dev);
    ++#else
    + 	struct quickcam *qc = (struct quickcam *)dev->priv;
    ++#endif
    + 	struct qc_frame_data *fd = &qc->frame_data;
    + 	int mask;
    + 
    +@@ -2307,7 +2311,11 @@ static int qc_v4l_open(struct video_devi
    + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    + 	struct video_device *dev = video_devdata(file);
    + #endif
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
    ++	struct quickcam *qc = video_get_drvdata(dev);
    ++#else
    + 	struct quickcam *qc = dev->priv;
    ++#endif
    + 	int r;
    + 
    + 	if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGUSER) PDEBUG("qc_v4l_open(qc=%p)", qc);
    +@@ -2375,7 +2383,11 @@ static void qc_v4l_close(struct video_de
    + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    + 	struct video_device *dev = video_devdata(file);
    + #endif
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
    ++	struct quickcam *qc = (struct quickcam *)video_get_drvdata(dev);
    ++#else
    + 	struct quickcam *qc = (struct quickcam *)dev->priv;
    ++#endif
    + 	if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGUSER) PDEBUG("qc_v4l_close(dev=%p,qc=%p)",dev,qc);
    + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    + 	TEST_BUGR_MSG(qc==NULL, "qc==NULL");
    +@@ -2423,7 +2435,11 @@ static long qc_v4l_read(struct video_dev
    + 	struct video_device *dev = video_devdata(file);
    + 	int noblock = file->f_flags & O_NONBLOCK;
    + #endif
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
    ++	struct quickcam *qc = (struct quickcam *)video_get_drvdata(dev);
    ++#else
    + 	struct quickcam *qc = (struct quickcam *)dev->priv;
    ++#endif
    + 	int frame_len;
    + 	unsigned char *frame;
    + 	long r = 0;
    +@@ -2478,7 +2494,11 @@ static int qc_v4l_mmap(
    + 	const void *start = (void *)vma->vm_start;
    + 	unsigned long size  = vma->vm_end - vma->vm_start;
    + #endif
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
    ++	struct quickcam *qc = (struct quickcam *)video_get_drvdata(dev);
    ++#else
    + 	struct quickcam *qc = (struct quickcam *)dev->priv;
    ++#endif
    + 	unsigned char *frame;
    + 	int ret = 0,  frame_size;
    + #if !HAVE_VMA && LINUX_VERSION_CODE= KERNEL_VERSION(2,6,28)
    ++	struct quickcam *qc = (struct quickcam *)video_get_drvdata(dev);
    ++#else
    + 	struct quickcam *qc = (struct quickcam *)dev->priv;
    ++#endif
    + 	int i, retval = 0;
    + 
    + 	if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGUSER) PDEBUG("qc_v4l_ioctl(dev=%p,cmd=%u,arg=%p,qc=%p)",dev,cmd,argp,qc);
    +@@ -3165,7 +3189,11 @@ PDEBUG("poisoning qc in qc_usb_init");
    + 
    + 		/* Register V4L video device */
    + 		memcpy(&qc->vdev, &qc_v4l_template, sizeof(qc_v4l_template));
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
    ++		video_set_drvdata(&qc->vdev, qc);
    ++#else
    + 		qc->vdev.priv = qc;
    ++#endif
    + 		r = video_register_device(&qc->vdev, VFL_TYPE_GRABBER, video_nr);
    + 		if (r<0) goto fail3;
    + 		PRINTK(KERN_INFO, "Registered device: /dev/video%i", qc->vdev.minor);
    diff --git a/multimedia/spca5xx-le/Makefile b/multimedia/spca5xx-le/Makefile
    new file mode 100644
    index 0000000..eb19de5
    --- /dev/null
    +++ b/multimedia/spca5xx-le/Makefile
    @@ -0,0 +1,40 @@
    +# 
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +include $(INCLUDE_DIR)/kernel.mk
    +
    +PKG_NAME:=spca5xx-le
    +PKG_VERSION:=1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME).tar.bz2
    +PKG_SOURCE_URL:=http://www.acmesystems.it/download/owrt/
    +PKG_MD5SUM:=
    +
    +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define KernelPackage/video-spca5xx-le
    +  SUBMENU:=Video Support
    +  TITLE:=SPCA5xx based USB webcam support (Light Edition)
    +  URL:=http://mxhaard.free.fr/
    +  DEPENDS:=@LINUX_2_6_23||LINUX_2_6_24||LINUX_2_6_25 @USB_SUPPORT +kmod-usb-core +kmod-video-core
    +  FILES:=$(PKG_BUILD_DIR)/spca5xx.$(LINUX_KMOD_SUFFIX)
    +  AUTOLOAD:=$(call AutoLoad,90,spca5xx)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(LINUX_DIR) \
    +		ARCH="$(LINUX_KARCH)" \
    +		CROSS_COMPILE="$(TARGET_CROSS)" \
    +		SUBDIRS="$(PKG_BUILD_DIR)" \
    +		modules
    +endef
    +
    +$(eval $(call KernelPackage,video-spca5xx-le))
    diff --git a/multimedia/spca5xx-le/patches/100-compile_pud_shift.patch b/multimedia/spca5xx-le/patches/100-compile_pud_shift.patch
    new file mode 100644
    index 0000000..91913a7
    --- /dev/null
    +++ b/multimedia/spca5xx-le/patches/100-compile_pud_shift.patch
    @@ -0,0 +1,21 @@
    +diff -Naur spca5xx-le/spca_core.c spca5xx-le-new/spca_core.c
    +--- spca5xx-le/spca_core.c	2007-06-03 21:30:29.000000000 +0100
    ++++ spca5xx-le-new/spca_core.c	2008-01-06 12:48:08.000000000 +0000
    +@@ -535,7 +535,7 @@
    + 
    +   if (!pgd_none (*pgd))
    +     {
    +-#if PUD_SHIFT
    ++#ifdef PUD_SHIFT
    +       pud_t *pud = pud_offset (pgd, adr);
    +       if (!pud_none (*pud))
    + 	{
    +@@ -552,7 +552,7 @@
    + 	      ret = (unsigned long) page_address (pte_page (pte));
    + 	      ret |= (adr & (PAGE_SIZE - 1));
    + 	    }
    +-#if PUD_SHIFT
    ++#ifdef PUD_SHIFT
    + 	}
    + #endif
    +     }
    diff --git a/multimedia/spca5xx-le/patches/101-linux_2_6.patch b/multimedia/spca5xx-le/patches/101-linux_2_6.patch
    new file mode 100644
    index 0000000..be0679f
    --- /dev/null
    +++ b/multimedia/spca5xx-le/patches/101-linux_2_6.patch
    @@ -0,0 +1,13 @@
    +diff -ruN spca5xx-le-orig/spca_core.c spca5xx-le/spca_core.c
    +--- spca5xx-le-orig/spca_core.c	2008-04-12 18:09:57.000000000 +0200
    ++++ spca5xx-le/spca_core.c	2008-04-12 18:16:45.000000000 +0200
    +@@ -2799,7 +2799,9 @@
    +   .owner = THIS_MODULE,
    +   .name = "SPCA5XX USB Camera",
    +   .type = VID_TYPE_CAPTURE,
    ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
    +   .hardware = VID_HARDWARE_SPCA5XX,
    ++#endif
    +   .fops = &spca5xx_fops,
    + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    +   .release = video_device_release,
    diff --git a/multimedia/spca5xx-view/Makefile b/multimedia/spca5xx-view/Makefile
    new file mode 100644
    index 0000000..336d4ae
    --- /dev/null
    +++ b/multimedia/spca5xx-view/Makefile
    @@ -0,0 +1,50 @@
    +# 
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=spca5xx-view
    +PKG_VERSION:=1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=spca5xx-view.tar.bz2
    +PKG_SOURCE_URL:=http://www.acmesystems.it/download/owrt
    +PKG_MD5SUM:=113357f8fbc3b994424ae37644529d55
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/spca5xx-view
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  TITLE:=spca5xx streaming applicaton
    +  DEPENDS:=+kmod-video-spca5xx-le +libpthread
    +  URL:=http://www.acmesystems.it/
    +endef
    +
    +define Package/spca5xx-view/description
    + This package contains a streaming daemon for spca5xx based webcams 
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR)/servfox/ CFLAGS="$(TARTGET_CFLAGS)" CC="$(TARGET_CC)" all
    +	$(MAKE) -C $(PKG_BUILD_DIR)/servfox/ PREFIX="$(PKG_INSTALL_DIR)" install
    +endef
    +
    +define Package/spca5xx-view/install
    +	$(INSTALL_DIR) $(1)/
    +	$(CP) $(PKG_INSTALL_DIR)/* $(1)
    +	$(INSTALL_DIR) $(1)/www/
    +	$(CP) $(PKG_BUILD_DIR)/html-files/* $(1)/www/
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_DATA) ./files/servfox.config $(1)/etc/config/servfox
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/servfox.init $(1)/etc/init.d/servfox
    +endef
    +
    +$(eval $(call BuildPackage,spca5xx-view))
    diff --git a/multimedia/spca5xx-view/files/servfox.config b/multimedia/spca5xx-view/files/servfox.config
    new file mode 100644
    index 0000000..3138bba
    --- /dev/null
    +++ b/multimedia/spca5xx-view/files/servfox.config
    @@ -0,0 +1,4 @@
    +config servfox
    +	option Device       '/dev/video0'
    +	option Port         '7070'
    +	option Resolution   '640x480'
    diff --git a/multimedia/spca5xx-view/files/servfox.init b/multimedia/spca5xx-view/files/servfox.init
    new file mode 100644
    index 0000000..072e595
    --- /dev/null
    +++ b/multimedia/spca5xx-view/files/servfox.init
    @@ -0,0 +1,31 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=90
    +
    +config_cb() {
    +	local cfg="$CONFIG_SECTION"
    +	local res
    +	local dev
    +	local port 
    +	local cfgt
    +	config_get cfgt "$cfg" TYPE
    +
    +	case "$cfgt" in
    +		servfox)
    +			config_get res $cfg Resolution
    +			config_get dev $cfg Device
    +			config_get port $cfg Port
    +
    +			SERVFOX_ARGS="${dev:+-d $dev} ${res:+-s $res} ${port:+-w $port}"
    +		;;
    +	esac
    +}
    +
    +start() {
    +	config_load servfox 
    +	/bin/servfox $SERVFOX_ARGS &
    +}
    +
    +stop() {
    +	killall servfox 
    +}
    diff --git a/multimedia/spcaview/Makefile b/multimedia/spcaview/Makefile
    new file mode 100644
    index 0000000..f92e49f
    --- /dev/null
    +++ b/multimedia/spcaview/Makefile
    @@ -0,0 +1,40 @@
    +# 
    +# Copyright (C) 2006-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=spcaview
    +PKG_VERSION:=20071224
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/
    +PKG_MD5SUM:=12e46424844b937dd55eab28f74bcd8d
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/spcacat
    +  SECTION:=multimedia
    +  CATEGORY:=Multimedia
    +  TITLE:=SPCA5xx webcam spcacat utility
    +  DEPENDS:=+libpthread
    +  URL:=http://mxhaard.free.fr/spca50x
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		CC="$(TARGET_CC)" \
    +		SERVFLAGS="$(TARGET_CFLAGS) -DLINUX" \
    +		spcacat
    +endef
    +
    +define Package/spcacat/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_BUILD_DIR)/spcacat $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,spcacat))
    diff --git a/multimedia/spcaview/patches/001-gcc.patch b/multimedia/spcaview/patches/001-gcc.patch
    new file mode 100644
    index 0000000..a226c5c
    --- /dev/null
    +++ b/multimedia/spcaview/patches/001-gcc.patch
    @@ -0,0 +1,16 @@
    +diff -Naur spcaview-20061208-orig/Makefile spcaview-20061208/Makefile
    +--- spcaview-20061208-orig/Makefile	2005-09-24 22:57:52.000000000 +0200
    ++++ spcaview-20061208/Makefile	2007-09-08 23:32:25.000000000 +0200
    +@@ -59,10 +59,10 @@
    + 	chmod 755 $(APP_BINARY)
    + 
    + spcaserv: $(OBJSERVER)
    +-	gcc $(SERVFLAGS) -o spcaserv $(OBJSERVER) $(SERVLIBS)
    ++	$(CC) $(SERVFLAGS) -o spcaserv $(OBJSERVER) $(SERVLIBS)
    + 	
    + spcacat: $(OBJCAT)
    +-	gcc $(SERVFLAGS) -o spcacat $(OBJCAT) $(SERVLIBS)
    ++	$(CC) $(SERVFLAGS) -o spcacat $(OBJCAT) $(SERVLIBS)
    + 	
    + spcaview.o: spcaview.c  jconfig.h dpsh.h utils.h SDL_audioin.h
    + 
    diff --git a/multimedia/ushare/Makefile b/multimedia/ushare/Makefile
    new file mode 100644
    index 0000000..471f5cf
    --- /dev/null
    +++ b/multimedia/ushare/Makefile
    @@ -0,0 +1,74 @@
    +#
    +# Copyright (C) 2008-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ushare
    +PKG_VERSION:=1.1a
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://ushare.geexbox.org/releases/
    +PKG_MD5SUM:=5bbcdbf1ff85a9710fa3d4e82ccaa251
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/ushare
    + SECTION:=multimedia
    + CATEGORY:=Multimedia
    + TITLE:= UPnP A/V & DLNA Media Server
    + URL:=http://ushare.geexbox.org/
    + DEPENDS:=+libdlna +libupnp
    +endef
    +
    +define Package/ushare/description
    + uShare is a UPnP (TM) A/V & DLNA Media Server. It implements the server 
    + component that provides UPnP media devices with information on available 
    + multimedia files.
    +endef
    +
    +MAKE_INSTALL_FLAGS+= \
    +	INSTALL="install" \
    +
    +define Build/Configure
    +	# this is *NOT* GNU configure
    +	( cd $(PKG_BUILD_DIR); \
    +		CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
    +		LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib" \
    +		PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
    +		PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
    +		./configure \
    +		--cross-compile \
    +		--cross-prefix="$(TARGET_CROSS)" \
    +		--prefix="/usr" \
    +		--sysconfdir="/etc" \
    +		--enable-dlna \
    +		--disable-nls \
    +		--disable-debug \
    +		--disable-optimize \
    +		--disable-strip \
    +	)
    +endef
    +
    +define Package/ushare/conffiles
    +/etc/ushare.conf
    +endef
    +
    +define Package/ushare/install
    +	$(INSTALL_DIR) $(1)/etc
    +	$(CP) $(PKG_INSTALL_DIR)/etc/ushare.conf $(1)/etc/
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/ushare $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
    +endef
    +
    +$(eval $(call BuildPackage,ushare))
    diff --git a/multimedia/ushare/files/ushare.config b/multimedia/ushare/files/ushare.config
    new file mode 100644
    index 0000000..b220eb2
    --- /dev/null
    +++ b/multimedia/ushare/files/ushare.config
    @@ -0,0 +1,9 @@
    +config 'ushare'
    +	option 'username' 'nobody'
    +	option 'servername' 'OpenWrt'
    +	option 'interface' 'br-lan'
    +	option 'options' ''
    +	option 'content_directories' '/tmp'
    +	option 'disable_telnet' '1'
    +	option 'disable_webif' '1'
    +	option 'enabled' '0'
    diff --git a/multimedia/ushare/files/ushare.init b/multimedia/ushare/files/ushare.init
    new file mode 100644
    index 0000000..457f582
    --- /dev/null
    +++ b/multimedia/ushare/files/ushare.init
    @@ -0,0 +1,58 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2008 OpenWrt.org
    +START=50
    +
    +BIN=/usr/bin/ushare
    +SSD=start-stop-daemon
    +
    +append_bool() {
    +	local section="$1"
    +	local option="$2"
    +	local value="$3"
    +	local _val
    +	config_get_bool _val "$section" "$option" '0'
    +	[ "$_val" -gt 0 ] && append args "$3"
    +}
    +
    +append_string() {
    +	local section="$1"
    +	local option="$2"
    +	local value="$3"
    +	local _val
    +	config_get _val "$section" "$option"
    +	[ -n "$_val" ] && append args "$3 $_val"
    +}
    +
    +start_service() {
    +	local section="$1"
    +	args=""
    +	config_get username		"$section" "username"
    +	config_get servername		"$section" "servername"
    +	config_get interface		"$section" "interface"
    +	config_get options		"$section" "options"
    +	config_get content_directories	"$section" "content_directories"
    +	append_bool                     "$section" "disable_webif" "-w"
    +	append_bool                     "$section" "disable_telnet" "-t"
    +	config_get_bool "enabled"	"$section" "enabled" '1'
    +
    +	[ "$enabled" -gt 0 ] && $SSD -x $BIN -c ${username:-nobody} -S -b -p /var/run/ushare.pid -m -- -n "${servername:-OpenWrt}" -i ${interface:-br-lan} -c ${content_directories:-/tmp} $args ${options} &
    +}
    +
    +stop_service() {
    +	local section="$1"
    +	args=""
    +	config_get username		"$section" "username"
    +
    +	$SSD -K -x $BIN -c ${username:-nobody} -s 2 -p /var/run/ushare.pid
    +}
    +
    +start() {
    +	config_load ushare
    +	config_foreach start_service ushare
    +}
    +
    +stop() {
    +	config_load ushare
    +	config_foreach stop_service ushare
    +}
    +
    diff --git a/multimedia/ushare/patches/100-configure_grep_fix.patch b/multimedia/ushare/patches/100-configure_grep_fix.patch
    new file mode 100644
    index 0000000..0bfb161
    --- /dev/null
    +++ b/multimedia/ushare/patches/100-configure_grep_fix.patch
    @@ -0,0 +1,12 @@
    +diff -ruN ushare-1.1a-orig/configure ushare-1.1a/configure
    +--- ushare-1.1a-orig/configure	2007-12-09 14:03:36.000000000 +0100
    ++++ ushare-1.1a/configure	2008-04-19 22:48:35.000000000 +0200
    +@@ -130,7 +130,7 @@
    +     var=$1
    +     shift
    +     for f in $@; do
    +-      if eval echo \$$var | grep -qv -e "$f"; then
    ++      if eval echo \$$var | grep -qv -e "$(echo $f | sed -e 's|\.|\\\.|g')"; then
    +         eval "$var=\"\$$var $f\""
    +       fi
    +     done
    diff --git a/multimedia/ushare/patches/200-compile-fixes.patch b/multimedia/ushare/patches/200-compile-fixes.patch
    new file mode 100644
    index 0000000..dc38465
    --- /dev/null
    +++ b/multimedia/ushare/patches/200-compile-fixes.patch
    @@ -0,0 +1,202 @@
    +--- a/src/cds.c
    ++++ b/src/cds.c
    +@@ -20,6 +20,8 @@
    +  */
    + 
    + #include 
    ++#include 
    ++#include 
    + #include 
    + #include 
    + 
    +--- a/src/http.c
    ++++ b/src/http.c
    +@@ -25,6 +25,7 @@
    + #include 
    + #include 
    + #include 
    ++#include 
    + #include 
    + #include 
    + 
    +@@ -77,8 +78,7 @@ set_info_file (struct File_Info *info, c
    +   info->content_type = ixmlCloneDOMString (content_type);
    + }
    + 
    +-static int
    +-http_get_info (const char *filename, struct File_Info *info)
    ++int http_get_info (const char *filename, struct File_Info *info)
    + {
    +   extern struct ushare_t *ut;
    +   struct upnp_entry_t *entry = NULL;
    +@@ -197,8 +197,7 @@ get_file_memory (const char *fullpath, c
    +   return ((UpnpWebFileHandle) file);
    + }
    + 
    +-static UpnpWebFileHandle
    +-http_open (const char *filename, enum UpnpOpenFileMode mode)
    ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode)
    + {
    +   extern struct ushare_t *ut;
    +   struct upnp_entry_t *entry = NULL;
    +@@ -251,8 +250,7 @@ http_open (const char *filename, enum Up
    +   return ((UpnpWebFileHandle) file);
    + }
    + 
    +-static int
    +-http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
    ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
    + {
    +   struct web_file_t *file = (struct web_file_t *) fh;
    +   ssize_t len = -1;
    +@@ -286,8 +284,7 @@ http_read (UpnpWebFileHandle fh, char *b
    +   return len;
    + }
    + 
    +-static int
    +-http_write (UpnpWebFileHandle fh __attribute__((unused)),
    ++int http_write (UpnpWebFileHandle fh __attribute__((unused)),
    +             char *buf __attribute__((unused)),
    +             size_t buflen __attribute__((unused)))
    + {
    +@@ -296,8 +293,7 @@ http_write (UpnpWebFileHandle fh __attri
    +   return 0;
    + }
    + 
    +-static int
    +-http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
    ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
    + {
    +   struct web_file_t *file = (struct web_file_t *) fh;
    +   off_t newpos = -1;
    +@@ -371,8 +367,7 @@ http_seek (UpnpWebFileHandle fh, off_t o
    +   return 0;
    + }
    + 
    +-static int
    +-http_close (UpnpWebFileHandle fh)
    ++int http_close (UpnpWebFileHandle fh)
    + {
    +   struct web_file_t *file = (struct web_file_t *) fh;
    + 
    +@@ -402,13 +397,3 @@ http_close (UpnpWebFileHandle fh)
    + 
    +   return 0;
    + }
    +-
    +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks =
    +-  {
    +-    http_get_info,
    +-    http_open,
    +-    http_read,
    +-    http_write,
    +-    http_seek,
    +-    http_close
    +-  };
    +--- a/src/http.h
    ++++ b/src/http.h
    +@@ -25,6 +25,18 @@
    + #include 
    + #include 
    + 
    +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks;
    ++int http_get_info (const char *filename, struct File_Info *info);
    ++
    ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode);
    ++
    ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen);
    ++
    ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin);
    ++
    ++int http_write (UpnpWebFileHandle fh __attribute__((unused)),
    ++	char *buf __attribute__((unused)),
    ++	size_t buflen __attribute__((unused)));
    ++
    ++int http_close (UpnpWebFileHandle fh);
    + 
    + #endif /* _HTTP_H_ */
    +--- a/src/ushare.c
    ++++ b/src/ushare.c
    +@@ -188,7 +188,7 @@ handle_action_request (struct Upnp_Actio
    +   if (strcmp (request->DevUDN + 5, ut->udn))
    +     return;
    + 
    +-  ip = request->CtrlPtIPAddr.s_addr;
    ++  ip = (*(struct sockaddr_in *)&request->CtrlPtIPAddr).sin_addr.s_addr;
    +   ip = ntohl (ip);
    +   sprintf (val, "%d.%d.%d.%d",
    +            (ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF);
    +@@ -348,13 +348,23 @@ init_upnp (struct ushare_t *ut)
    + 
    +   UpnpEnableWebserver (TRUE);
    + 
    +-  res = UpnpSetVirtualDirCallbacks (&virtual_dir_callbacks);
    +-  if (res != UPNP_E_SUCCESS)
    +-  {
    +-    log_error (_("Cannot set virtual directory callbacks\n"));
    +-    free (description);
    +-    return -1;
    +-  }
    ++#define upnp_set_callback(cb, func) \
    ++  do {                                                            \
    ++    res = UpnpVirtualDir_set_##cb##Callback(func);                \
    ++    if (res != UPNP_E_SUCCESS)                                    \
    ++    {                                                             \
    ++      log_error (_("Cannot set virtual directory callbacks\n"));  \
    ++      free (description);                                         \
    ++      return -1;                                                  \
    ++    }                                                             \
    ++  } while(0)
    ++
    ++  upnp_set_callback(GetInfo, http_get_info);
    ++  upnp_set_callback(Open,    http_open);
    ++  upnp_set_callback(Read,    http_read);
    ++  upnp_set_callback(Seek,    http_seek);
    ++  upnp_set_callback(Write,   http_write);
    ++  upnp_set_callback(Close,   http_close);
    + 
    +   res = UpnpAddVirtualDir (VIRTUAL_DIR);
    +   if (res != UPNP_E_SUCCESS)
    +--- a/src/cms.c
    ++++ b/src/cms.c
    +@@ -20,6 +20,8 @@
    +  */
    + 
    + #include 
    ++#include 
    ++#include 
    + #include 
    + #include 
    + 
    +--- a/src/mime.c
    ++++ b/src/mime.c
    +@@ -20,6 +20,7 @@
    +  */
    + 
    + #include 
    ++#include 
    + #include 
    + 
    + #include "mime.h"
    +--- a/src/presentation.c
    ++++ b/src/presentation.c
    +@@ -19,6 +19,8 @@
    +  */
    + 
    + #include 
    ++#include 
    ++#include 
    + 
    + #if HAVE_LANGINFO_CODESET
    + # include 
    +--- a/src/services.c
    ++++ b/src/services.c
    +@@ -20,6 +20,8 @@
    +  */
    + 
    + #include 
    ++#include 
    ++#include 
    + #include 
    + #include 
    + 
    diff --git a/net/aircrack-ng/Makefile b/net/aircrack-ng/Makefile
    new file mode 100644
    index 0000000..e912dfe
    --- /dev/null
    +++ b/net/aircrack-ng/Makefile
    @@ -0,0 +1,52 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=aircrack-ng
    +PKG_VERSION:=1.1
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://download.aircrack-ng.org/ \
    +	http://archive.aircrack-ng.org/aircrack-ng/$(PKG_VERSION)/
    +PKG_MD5SUM:=f7a24ed8fad122c4187d06bfd6f998b4
    +
    +PKG_BUILD_PARALLEL:=0
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/aircrack-ng
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libpthread +libopenssl +libpcap
    +  TITLE:=next generation of aircrack with new features
    +  URL:=http://www.aircrack-ng.org/
    +  SUBMENU:=wireless
    +endef
    +
    +define Package/aircrack-ng/description
    +Aircrack-ng is the next generation of aircrack with new features
    +endef
    +
    +MAKE_FLAGS += \
    +	CFLAGS="$(TARGET_CFLAGS) -Wall -Iinclude/ $(TARGET_CPPFLAGS) -D_REVISION=0" \
    +	LDFLAGS="$(TARGET_LDFLAGS)" \
    +	OSNAME=Linux \
    +	prefix="/usr" \
    +	sqlite="false" \
    +	unstable="true"
    +
    +define Package/aircrack-ng/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,aircrack-ng))
    diff --git a/net/aircrack-ng/patches/100-add-ignore-channel-negative-1.patch b/net/aircrack-ng/patches/100-add-ignore-channel-negative-1.patch
    new file mode 100644
    index 0000000..394a300
    --- /dev/null
    +++ b/net/aircrack-ng/patches/100-add-ignore-channel-negative-1.patch
    @@ -0,0 +1,52 @@
    +--- a/src/aireplay-ng.c
    ++++ b/src/aireplay-ng.c
    +@@ -200,7 +200,9 @@ char usage[] =
    + "\n"
    + "  Miscellaneous options:\n"
    + "\n"
    +-"      -R        : disable /dev/rtc usage\n"
    ++"      -R                    : disable /dev/rtc usage\n"
    ++"      --ignore-negative-one : if the interface's channel can't be determined,\n"
    ++"                              ignore the mismatch, needed for unpatched cfg80211\n"
    + "\n"
    + "  Attack modes (numbers can still be used):\n"
    + "\n"
    +@@ -268,6 +270,7 @@ struct options
    +     int bittest;
    + 
    +     int nodetect;
    ++    int ignore_negative_one;
    +     int rtc;
    + }
    + opt;
    +@@ -715,6 +718,13 @@ int attack_check(uchar* bssid, char* ess
    + 
    +     iface_chan = wi_get_channel(wi);
    + 
    ++    if(iface_chan == -1 && !opt.ignore_negative_one)
    ++    {
    ++        PCT; printf("Couldn't determine current channel for %s, you should either force the operation with --ignore-negative-one or apply a kernel patch\n",
    ++                wi_get_ifname(wi));
    ++        return -1;
    ++    }
    ++
    +     if(bssid != NULL)
    +     {
    +         ap_chan = wait_for_beacon(bssid, capa, essid);
    +@@ -723,7 +733,7 @@ int attack_check(uchar* bssid, char* ess
    +             PCT; printf("No such BSSID available.\n");
    +             return -1;
    +         }
    +-        if(ap_chan != iface_chan)
    ++        if((ap_chan != iface_chan) && (iface_chan != -1 || !opt.ignore_negative_one))
    +         {
    +             PCT; printf("%s is on channel %d, but the AP uses channel %d\n", wi_get_ifname(wi), iface_chan, ap_chan);
    +             return -1;
    +@@ -5765,6 +5775,7 @@ int main( int argc, char *argv[] )
    +             {"help",        0, 0, 'H'},
    +             {"fast",        0, 0, 'F'},
    +             {"bittest",     0, 0, 'B'},
    ++            {"ignore-negative-one", 0, &opt.ignore_negative_one, 1},
    +             {0,             0, 0,  0 }
    +         };
    + 
    diff --git a/net/aircrack-ptw/Makefile b/net/aircrack-ptw/Makefile
    new file mode 100644
    index 0000000..5dacde1
    --- /dev/null
    +++ b/net/aircrack-ptw/Makefile
    @@ -0,0 +1,45 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=aircrack-ptw
    +PKG_VERSION:=1.0.0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.cdc.informatik.tu-darmstadt.de/aircrack-ptw/download
    +PKG_MD5SUM:=1d7d84d1e69189bc1397db3f565c183a
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/aircrack-ptw
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libpcap
    +  TITLE:=A tool using a new method for breaking WEP Keys
    +  URL:=http://www.cdc.informatik.tu-darmstadt.de/aircrack-ptw/
    +  SUBMENU:=wireless
    +endef
    +
    +define Build/Configure
    +endef
    +
    +define Build/Compile
    +	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \
    +		$(TARGET_LDFLAGS) \
    +		-lpcap -o $(PKG_BUILD_DIR)/aircrack-ptw \
    +		$(PKG_BUILD_DIR)/aircrack-ptw.c \
    +		$(PKG_BUILD_DIR)/aircrack-ptw-lib.c 
    +endef
    +
    +define Package/aircrack-ptw/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_BUILD_DIR)/aircrack-ptw $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,aircrack-ptw))
    diff --git a/net/aircrack-ptw/patches/001-smaller.patch b/net/aircrack-ptw/patches/001-smaller.patch
    new file mode 100644
    index 0000000..9dbf14b
    --- /dev/null
    +++ b/net/aircrack-ptw/patches/001-smaller.patch
    @@ -0,0 +1,12 @@
    +diff -purN aircrack-ptw-1.0.0/aircrack-ptw.c aircrack-ptw-1.0.0_patch/aircrack-ptw.c
    +--- aircrack-ptw-1.0.0/aircrack-ptw.c	2007-04-03 08:50:42.000000000 -0400
    ++++ aircrack-ptw-1.0.0_patch/aircrack-ptw.c	2007-04-07 16:50:38.000000000 -0400
    +@@ -6,7 +6,7 @@
    + 
    + #include "aircrack-ptw-lib.h"
    + 
    +-#define KEYLIMIT (1000000)
    ++#define KEYLIMIT (10000)
    + #define BSSIDLEN (6)
    + 
    + typedef struct {
    diff --git a/net/airpwn/Makefile b/net/airpwn/Makefile
    new file mode 100644
    index 0000000..eda60f6
    --- /dev/null
    +++ b/net/airpwn/Makefile
    @@ -0,0 +1,70 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=airpwn
    +PKG_RELEASE:=1
    +PKG_VERSION:=1.3
    +
    +PKG_SOURCE:=airpwn-$(PKG_VERSION).tgz
    +PKG_SOURCE_URL:=@SF/airpwn
    +PKG_MD5SUM:=15b6f1cd287b4bb20dd586bb6c83628d
    +
    +PKG_BUILD_DEPENDS:=libnet1 libopenssl libpcap libpcre
    +
    +PKG_FIXUP:=libtool
    +PKG_LIBTOOL_PATHS:=. lorcon
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/airpwn
    +	SECTION:=net
    +	CATEGORY:=Network
    +        SUBMENU:=wireless
    +	TITLE:=Packet injection pwnage
    +	DEPENDS:=+libnet1 +libopenssl +libpcap +libpcre
    +	URL:=http://airpwn.sourceforge.net/Airpwn.html
    +endef
    +
    +define Package/airpwn/description
    +  Airpwn is a framework for 802.11 (wireless) packet injection.
    +  Airpwn listens to incoming wireless packets, and if the data
    +  matches a pattern specified in the config files, custom content
    +  is injected "spoofed" from the wireless access point. From the
    +  perspective of the wireless client, airpwn becomes the server.
    +endef
    +
    +CONFIGURE_VARS:= \
    +	CC="$(TARGET_CC)" \
    +	LD="$(TARGET_LD)" \
    +	CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/lib/libnet-1.1.x/include -I$(STAGING_DIR)/usr/include -I$(PKG_BUILD_DIR)/lorcon" \
    +	LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libnet-1.1.x/lib -L$(PKG_BUILD_DIR)/lorcon/.libs -lcrypto -lssl" \
    +	LIBTOOL="$(STAGING_DIR)/host/bin/libtool"
    +
    +define Build/Configure
    +	( cd $(PKG_BUILD_DIR); tar -xzf lorcon-current.tgz; cd lorcon; \
    +	$(CONFIGURE_VARS) ./configure $(CONFIGURE_ARGS); \
    +	$(MAKE) -C $(PKG_BUILD_DIR)/lorcon $(CONFIGURE_VARS); cd ..; \
    +	$(CONFIGURE_VARS) ./configure $(CONFIGURE_ARGS) )
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) $(CONFIGURE_VARS)
    +endef
    +
    +define Package/airpwn/install
    +	$(INSTALL_DIR) $(1)/etc/airpwn
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/* $(1)/etc/airpwn/
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/airpwn $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/lorcon/.libs/liborcon-1.0.0.so $(1)/usr/lib/
    +	( cd $(1)/usr/lib; ln -s liborcon-1.0.0.so liborcon.so )
    +endef
    +
    +$(eval $(call BuildPackage,airpwn))
    diff --git a/net/amule/Makefile b/net/amule/Makefile
    new file mode 100644
    index 0000000..ab1f8f1
    --- /dev/null
    +++ b/net/amule/Makefile
    @@ -0,0 +1,86 @@
    +#
    +# Copyright (C) 2007-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=aMule
    +PKG_VERSION:=2.2.6
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/amule
    +PKG_MD5SUM:=530d9b48187e36f78fc21bb19e94326d
    +
    +PKG_BUILD_DEPENDS:=libgd
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/amule
    +  SUBMENU:=P2P
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=A multi-platform eMule-like ed2k client
    +  URL:=http://www.amule.org/
    +  DEPENDS:=+libpng +libpthread +libncurses +libreadline +libwxbase +libcryptoxx
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--enable-shared \
    +	--disable-static \
    +	--disable-rpath \
    +	--with-gnu-ld \
    +	--disable-ccache \
    +	--disable-debug \
    +	--disable-optimize \
    +	--disable-profile \
    +	--disable-monolithic \
    +	--enable-amule-daemon \
    +	--enable-amulecmd \
    +	--disable-amulecmdgui \
    +	--enable-webserver \
    +	--disable-webservergui \
    +	--disable-amule-gui \
    +	--disable-cas \
    +	--disable-wxcas \
    +	--disable-ed2k \
    +	--disable-alc \
    +	--disable-alcc \
    +	--disable-systray \
    +	--disable-utf8-systray \
    +	--enable-embedded-crypto \
    +	--enable-gsocket \
    +	--disable-gtktest \
    +	--disable-crypto \
    +	\
    +	--with-zlib="$(STAGING_DIR)/usr" \
    +	--with-gdlib-prefix="$(STAGING_DIR)/usr" \
    +	--with-libpng-prefix="$(STAGING_DIR)/usr" \
    +	--with-wx-prefix="$(STAGING_DIR)/usr" \
    +	--with-crypto-prefix="$(STAGING_DIR)/usr" \
    +	--with-libiconv-prefix="$(ICONV_PREFIX)" \
    +	--with-libintl-prefix="$(INTL_PREFIX)" \
    +	--without-x \
    +
    +TARGET_LDFLAGS += \
    +	-liconv
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		HOSTCC="$(HOSTCC)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Package/amule/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amule{cmd,d,web} $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/share
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/amule $(1)/usr/share/
    +endef
    +
    +$(eval $(call BuildPackage,amule))
    diff --git a/net/amule/patches/001-no_backtrace.patch b/net/amule/patches/001-no_backtrace.patch
    new file mode 100644
    index 0000000..eb0d957
    --- /dev/null
    +++ b/net/amule/patches/001-no_backtrace.patch
    @@ -0,0 +1,11 @@
    +--- a/src/libs/common/MuleDebug.cpp
    ++++ b/src/libs/common/MuleDebug.cpp
    +@@ -168,7 +168,7 @@ wxString get_backtrace(unsigned n)
    + 	return walker.m_trace;
    + }
    + 
    +-#elif defined(__LINUX__)
    ++#elif defined(__LINUX__) && !defined(__UCLIBC__)
    + 
    + #ifdef HAVE_BFD
    + 
    diff --git a/net/amwall/Makefile b/net/amwall/Makefile
    new file mode 100644
    index 0000000..8d94454
    --- /dev/null
    +++ b/net/amwall/Makefile
    @@ -0,0 +1,52 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=amwall
    +PKG_VERSION:=0.1.0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=ftp://ftp.amselinux.net/source/
    +PKG_MD5SUM:=a8b6438e7fd9ccadc9f68824ae62349c
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/amwall
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libamsel
    +  TITLE:=PF to iptables
    +  URL:=http://www.amselinux.net/
    +  SUBMENU:=Firewall
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		V= \
    +		LDIR="$(PKG_BUILD_DIR)" \
    +		AMSEL_INCLUDE="$(STAGING_DIR)/usr/include" \
    +		OPT_LDFLAGS="$(TARGET_LDFLAGS)" \
    +		PREFIX="/usr" \
    +		CONFIG="$(PKG_BUILD_DIR)/etc/amsel" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		SHELL="/bin/bash" \
    +		all install
    +endef
    +
    +define Package/amwall/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc/amsel
    +	$(CP) $(PKG_INSTALL_DIR)/etc/amsel* $(1)/etc/
    +endef
    +
    +$(eval $(call BuildPackage,amwall))
    diff --git a/net/amwall/patches/010-compile_fix.patch b/net/amwall/patches/010-compile_fix.patch
    new file mode 100644
    index 0000000..caa0b42
    --- /dev/null
    +++ b/net/amwall/patches/010-compile_fix.patch
    @@ -0,0 +1,21 @@
    +diff -ur amwall.old/grammar_en.y amwall.dev/grammar_en.y
    +--- amwall.old/grammar_en.y	Sun May 23 17:17:54 2004
    ++++ amwall.dev/grammar_en.y	Sat Oct 14 17:21:28 2006
    +@@ -651,7 +651,7 @@
    + {
    + 	AMWALL_ADD_RULE("CONTINUE");
    + }
    +-
    ++				;
    + dnat            : DNAT
    + {
    + 	switch(chain_type) {
    +@@ -667,7 +667,7 @@
    + 
    + 	AMWALL_ADD_RULE("DNAT");
    + }
    +-
    ++				;
    + drop            : DROP
    + {
    + 	AMWALL_ADD_RULE("DROP");
    diff --git a/net/aodv-uu/Makefile b/net/aodv-uu/Makefile
    new file mode 100644
    index 0000000..4a7cd96
    --- /dev/null
    +++ b/net/aodv-uu/Makefile
    @@ -0,0 +1,104 @@
    +#
    +# Copyright (C) 2006-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +include $(INCLUDE_DIR)/kernel.mk
    +
    +PKG_NAME:=aodv-uu
    +PKG_VERSION:=0.9.3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://core.it.uu.se/core/files/
    +PKG_MD5SUM:=05460543054449cb4b170252a7168c65
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/aodv-uu/Default
    +  TITLE:=Ad-hoc On-demand Distance Vector Routing
    +  DEPENDS:=@BROKEN
    +  URL:=http://core.it.uu.se/core/index.php/AODV-UU
    +endef
    +
    +define Package/aodv-uu/Default/description
    + AODV is the Ad-hoc On-demand Distance Vector routing protocol
    + implementation created at Uppsala University.
    +endef
    +
    +define Package/aodv-uu
    +$(call Package/aodv-uu/Default)
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE+= (daemon)
    +endef
    +
    +define Package/aodv-uu/description
    +$(call Package/aodv-uu/Default/description)
    + This package contains the AODV userland daemon.
    +endef
    +
    +define KernelPackage/aodv-uu
    +$(call Package/aodv-uu/Default)
    +  TITLE+= (kernel module)
    +  FILES:=$(PKG_BUILD_DIR)/lnx/kaodv.$(LINUX_KMOD_SUFFIX)
    +  SUBMENU:=Network Support
    +  AUTOLOAD:=$(call AutoLoad,80,$(shell cat ./files/aodv-uu.modules))
    +endef
    +
    +define KernelPackage/aodv-uu/description
    +$(call Package/aodv-uu/Default/description)
    + This package contains the AODV kernel module.
    +endef
    +
    +ifneq ($(CONFIG_LINUX_2_4),y)
    +  define Build/Compile/linux26
    +	$(MAKE) -C $(LINUX_DIR) \
    +		ARCH="$(LINUX_KARCH)" \
    +		CROSS_COMPILE="$(TARGET_CROSS)" \
    +		PATCHLEVEL="$(LINUX_VERSION)" \
    +		KERNDIR="$(LINUX_DIR)" \
    +		SUBDIRS="$(PKG_BUILD_DIR)/lnx" \
    +                modules
    +  endef
    +else
    +  # We assume 2.4 builds are only for brcm-2.4 yet
    +  define Build/Compile/linux24-brcm
    +	$(call Build/Compile/Default,\
    +		KERNEL_DIR="$(LINUX_DIR)" \
    +		KCC="$(TARGET_CC)" \
    +		CFLAGS="$(TARGET_CFLAGS)" \
    +		kaodv-mips \
    +	)
    +	cp $(PKG_BUILD_DIR)/lnx/kaodv-mips.$(LINUX_KMOD_SUFFIX) $(PKG_BUILD_DIR)/lnx/kaodv.$(LINUX_KMOD_SUFFIX)
    +  endef
    +endif
    +
    +define Build/Compile
    +	$(call Build/Compile/linux26)
    +	$(call Build/Compile/linux24-brcm)
    +	$(call Build/Compile/Default,\
    +		KERNEL_DIR="$(LINUX_DIR)" \
    +		KCC="$(TARGET_CC)" \
    +		CFLAGS="$(TARGET_CFLAGS)" \
    +		aodvd \
    +	)
    +endef
    +
    +define Package/aodv-uu/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/aodvd $(1)/usr/sbin
    +endef
    +
    +define Package/kmod-aodv-uu/install
    +	$(INSTALL_DIR) $(1)/etc/modules.d
    +	$(INSTALL_DATA) ./files/aodv-uu.modules $(1)/etc/modules.d/80-aodv-uu
    +	$(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION)
    +	$(CP) $(PKG_BUILD_DIR)/lnx/kaodv.$(LINUX_KMOD_SUFFIX) $(1)/lib/modules/$(LINUX_VERSION)/
    +endef
    +
    +$(eval $(call BuildPackage,aodv-uu))
    +$(eval $(call KernelPackage,aodv-uu))
    diff --git a/net/aodv-uu/files/aodv-uu.modules b/net/aodv-uu/files/aodv-uu.modules
    new file mode 100644
    index 0000000..809c4da
    --- /dev/null
    +++ b/net/aodv-uu/files/aodv-uu.modules
    @@ -0,0 +1 @@
    +kaodv
    diff --git a/net/aodv-uu/patches/001-normalize.patch b/net/aodv-uu/patches/001-normalize.patch
    new file mode 100644
    index 0000000..bdc6fda
    --- /dev/null
    +++ b/net/aodv-uu/patches/001-normalize.patch
    @@ -0,0 +1,64 @@
    +Index: aodv-uu-0.9.3/lnx/Makefile
    +===================================================================
    +--- aodv-uu-0.9.3.orig/lnx/Makefile	2007-06-04 13:22:19.859836128 +0200
    ++++ aodv-uu-0.9.3/lnx/Makefile	2007-06-04 13:22:19.932825032 +0200
    +@@ -30,7 +30,7 @@
    + KCFLAGS=-Wall -Wno-strict-aliasing -O2 $(KDEFS) $(KINC) $(XDEFS)
    + KCFLAGS_ARM=-Wall -O2 -D__KERNEL__ -DMODULE -nostdinc $(shell $(ARM_CC) -print-search-dirs | sed -ne 's/install: \(.*\)/-I \1include/gp') -I$(KERNEL_INC)
    + KCFLAGS_MIPS=-Wall -mips2 -O2 -fno-pic -mno-abicalls -mlong-calls -G0 -msoft-float -D__KERNEL__ -DMODULE -nostdinc $(shell $(MIPS_CC) -print-search-dirs | sed -ne 's/install: \(.*\)/-I \1include/gp') -I$(KERNEL_INC) $(XDEFS)
    +-
    ++endif
    + .PHONY: clean clean-2.4 clean-2.6 indent default
    + 
    + # Check for kernel version
    +@@ -89,5 +89,3 @@
    + 	etags *.c *.h
    + indent:
    + 	indent -kr -i8 -ts8 -sob -l80 -ss -ncs *.c *.h 
    +-endif
    +-
    +Index: aodv-uu-0.9.3/Makefile
    +===================================================================
    +--- aodv-uu-0.9.3.orig/Makefile	2007-06-04 13:22:19.866835064 +0200
    ++++ aodv-uu-0.9.3/Makefile	2007-06-04 13:22:19.932825032 +0200
    +@@ -87,7 +87,7 @@
    + mips: aodvd-mips kaodv-mips
    + 
    + endian.h:
    +-	$(CC) $(CFLAGS) -o endian endian.c
    ++	gcc -o endian endian.c
    + 	./endian > endian.h
    + 
    + $(OBJS): %.o: %.c Makefile
    +@@ -143,19 +143,18 @@
    + 	@makedepend -Y./ -- $(DEFS) -- $(SRC) &>/dev/null
    + 	@makedepend -a -Y./ -- $(KDEFS) kaodv.c &>/dev/null
    + 
    +-install: default
    +-	install -s -m 755 aodvd /usr/sbin/aodvd
    +-	@if [ ! -d /lib/modules/$(KERNEL)/aodv ]; then \
    +-		mkdir /lib/modules/$(KERNEL)/aodv; \
    +-	fi
    +-
    +-	@echo "Installing kernel module in /lib/modules/$(KERNEL)/aodv/";
    +-	@if [ -f ./kaodv.ko ]; then \
    +-		install -m 644 kaodv.ko /lib/modules/$(KERNEL)/aodv/kaodv.ko; \
    +-	else \
    +-		install -m 644 kaodv.o /lib/modules/$(KERNEL)/aodv/kaodv.o; \
    +-	fi
    +-	/sbin/depmod -a
    ++install: install-aodvd install-kaodv
    ++
    ++install-aodvd:
    ++	@echo "Installing aodv in $(DESTDIR)/usr/sbin";
    ++	install -d -m0755 $(DESTDIR)/usr/sbin/
    ++	install -m0755 aodvd $(DESTDIR)/usr/sbin/aodvd
    ++
    ++install-kaodv:
    ++	@echo "Installing kernel module in $(DESTDIR)/lib/modules/$(KERNEL)/";
    ++	install -d -m0644 $(DESTDIR)/lib/modules/$(KERNEL)/
    ++	install -m 644 lnx/kaodv.$(KMOD_SUFFIX) $(DESTDIR)/lib/modules/$(KERNEL)/kaodv.$(KMOD_SUFFIX);
    ++
    + uninstall:
    + 	rm -f /usr/sbin/aodvd
    + 	rm -rf /lib/modules/$(KERNEL)/aodv
    diff --git a/net/aodv-uu/patches/002-linux_2.6.19_ip_route_me_harder_change.patch b/net/aodv-uu/patches/002-linux_2.6.19_ip_route_me_harder_change.patch
    new file mode 100644
    index 0000000..638de87
    --- /dev/null
    +++ b/net/aodv-uu/patches/002-linux_2.6.19_ip_route_me_harder_change.patch
    @@ -0,0 +1,49 @@
    +Index: aodv-uu-0.9.3/lnx/kaodv-mod.c
    +===================================================================
    +--- aodv-uu-0.9.3.orig/lnx/kaodv-mod.c	2007-06-04 13:22:19.830840536 +0200
    ++++ aodv-uu-0.9.3/lnx/kaodv-mod.c	2007-06-04 13:22:20.130794936 +0200
    +@@ -19,7 +19,7 @@
    +  * Author: Erik Nordström, 
    +  * 
    +  *****************************************************************************/
    +-#include 
    ++#include 
    + #include 
    + 
    + #ifdef KERNEL26
    +@@ -258,7 +258,11 @@
    + 			if (!(*skb))
    + 				return NF_STOLEN;
    + 			
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
    ++			ip_route_me_harder(skb, RTN_UNSPEC);
    ++#else
    + 			ip_route_me_harder(skb);
    ++#endif
    + 		}
    + 		break;
    + 	case NF_IP_POST_ROUTING:
    +Index: aodv-uu-0.9.3/lnx/kaodv-queue.c
    +===================================================================
    +--- aodv-uu-0.9.3.orig/lnx/kaodv-queue.c	2007-06-04 13:22:19.837839472 +0200
    ++++ aodv-uu-0.9.3/lnx/kaodv-queue.c	2007-06-04 13:22:20.130794936 +0200
    +@@ -29,6 +29,7 @@
    + #include 
    + #include 
    + #include 
    ++#include 
    + #include 
    + #include 
    + #include 
    +@@ -246,7 +247,11 @@
    + 				if (!entry->skb)
    + 					goto next;
    + 			}
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
    ++			ip_route_me_harder(&entry->skb, RTN_UNSPEC);
    ++#else
    + 			ip_route_me_harder(&entry->skb);
    ++#endif
    + 
    + 			pkts++;
    + 
    diff --git a/net/aodv-uu/patches/003-linux_2.6.19_security_netlink_recv_change.patch b/net/aodv-uu/patches/003-linux_2.6.19_security_netlink_recv_change.patch
    new file mode 100644
    index 0000000..53d9064
    --- /dev/null
    +++ b/net/aodv-uu/patches/003-linux_2.6.19_security_netlink_recv_change.patch
    @@ -0,0 +1,16 @@
    +Index: aodv-uu-0.9.3/lnx/kaodv-netlink.c
    +===================================================================
    +--- aodv-uu-0.9.3.orig/lnx/kaodv-netlink.c	2007-06-04 13:22:19.810843576 +0200
    ++++ aodv-uu-0.9.3/lnx/kaodv-netlink.c	2007-06-04 13:22:20.326765144 +0200
    +@@ -284,7 +284,11 @@
    + /* 		RCV_SKB_FAIL(-EINVAL); */
    + 
    + #ifdef KERNEL26
    ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)	
    ++	if (security_netlink_recv(skb, CAP_NET_ADMIN))
    ++# else	
    + 	if (security_netlink_recv(skb))
    ++# endif
    + 		RCV_SKB_FAIL(-EPERM);
    + #endif
    + 	//write_lock_bh(&queue_lock);
    diff --git a/net/aodv-uu/patches/004-linux_2.6.19_includes.patch b/net/aodv-uu/patches/004-linux_2.6.19_includes.patch
    new file mode 100644
    index 0000000..8dc1adf
    --- /dev/null
    +++ b/net/aodv-uu/patches/004-linux_2.6.19_includes.patch
    @@ -0,0 +1,28 @@
    +Index: aodv-uu-0.9.3/main.c
    +===================================================================
    +--- aodv-uu-0.9.3.orig/main.c	2007-06-04 13:22:19.782847832 +0200
    ++++ aodv-uu-0.9.3/main.c	2007-06-04 13:22:20.513736720 +0200
    +@@ -26,6 +26,8 @@
    + #include 
    + #include 
    + #include 
    ++#include 
    ++#include 
    + #include 
    + #include 
    + #include 
    +Index: aodv-uu-0.9.3/nl.c
    +===================================================================
    +--- aodv-uu-0.9.3.orig/nl.c	2007-06-04 13:22:19.789846768 +0200
    ++++ aodv-uu-0.9.3/nl.c	2007-06-04 13:22:20.513736720 +0200
    +@@ -33,6 +33,10 @@
    + #include 
    + #include 
    + #include 
    ++#include 
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
    ++#include 
    ++#endif
    + 
    + #include "defs.h"
    + #include "lnx/kaodv-netlink.h"
    diff --git a/net/aodv-uu/patches/005-linux_2.6.22_skbuff.patch b/net/aodv-uu/patches/005-linux_2.6.22_skbuff.patch
    new file mode 100644
    index 0000000..0831c5f
    --- /dev/null
    +++ b/net/aodv-uu/patches/005-linux_2.6.22_skbuff.patch
    @@ -0,0 +1,164 @@
    +Index: aodv-uu-0.9.3/lnx/kaodv-compat.h
    +===================================================================
    +--- /dev/null	1970-01-01 00:00:00.000000000 +0000
    ++++ aodv-uu-0.9.3/lnx/kaodv-compat.h	2007-06-17 02:49:46.844217144 +0200
    +@@ -0,0 +1,15 @@
    ++#ifndef __KAODV_COMPAT_H
    ++#define __KAODV_COMPAT_H
    ++
    ++#include 
    ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
    ++
    ++#define ip_hdr(_skb) (_skb)->nh.iph
    ++#define skb_reset_network_header(_skb) do { \
    ++		_skb->nh.iph = (struct iphdr *)_skb->data; \
    ++	} while (0);
    ++
    ++
    ++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) */
    ++
    ++#endif
    +Index: aodv-uu-0.9.3/lnx/kaodv-ipenc.c
    +===================================================================
    +--- aodv-uu-0.9.3.orig/lnx/kaodv-ipenc.c	2007-06-17 02:31:56.448941960 +0200
    ++++ aodv-uu-0.9.3/lnx/kaodv-ipenc.c	2007-06-17 02:45:50.420159064 +0200
    +@@ -64,7 +64,7 @@
    +     if (skb->sk != NULL)
    + 	skb_set_owner_w(nskb, skb->sk);
    + 
    +-    iph = skb->nh.iph;
    ++    iph = ip_hdr(skb);
    + 
    +     skb_put(nskb, sizeof(struct min_ipenc_hdr));
    +     
    +@@ -78,7 +78,8 @@
    +     skb = nskb;
    +     
    +     /* Update pointers */
    +-    iph = skb->nh.iph = (struct iphdr *)skb->data;
    ++	skb_reset_network_header(skb);
    ++    iph = (struct iphdr *)skb->data;
    + 
    +     ipe = (struct min_ipenc_hdr *)(skb->data + (iph->ihl << 2));
    +     
    +@@ -99,8 +100,8 @@
    + 
    +     ip_send_check(iph);
    + 
    +-    if (skb->nh.iph->id == 0)
    +-	ip_select_ident(skb->nh.iph, skb->dst, NULL);
    ++    if (ip_hdr(skb)->id == 0)
    ++	ip_select_ident(ip_hdr(skb), skb->dst, NULL);
    +         
    +     return skb;
    + }
    +@@ -108,9 +109,7 @@
    + struct sk_buff *ip_pkt_decapsulate(struct sk_buff *skb)
    + {
    +     struct min_ipenc_hdr *ipe;
    +-    /* skb->nh.iph is probably not set yet */
    +-    struct iphdr *iph = skb->nh.iph;
    +-
    ++    struct iphdr *iph = ip_hdr(skb);
    + 
    +     ipe = (struct min_ipenc_hdr *)((char *)iph + (iph->ihl << 2));
    + 
    +@@ -123,8 +122,9 @@
    + 	    skb->len - (iph->ihl << 2) - sizeof(struct min_ipenc_hdr));
    +     
    +     skb_trim(skb, skb->len - sizeof(struct min_ipenc_hdr));
    +-    
    +-    skb->nh.iph = iph = (struct iphdr *)skb->data;
    ++
    ++	skb_reset_network_header(skb);
    ++    iph = (struct iphdr *)skb->data;
    + 
    +     iph->tot_len = htons((ntohs(iph->tot_len) - sizeof(struct min_ipenc_hdr))); 
    +     ip_send_check(iph);
    +Index: aodv-uu-0.9.3/lnx/kaodv-ipenc.h
    +===================================================================
    +--- aodv-uu-0.9.3.orig/lnx/kaodv-ipenc.h	2007-06-17 02:44:13.881835120 +0200
    ++++ aodv-uu-0.9.3/lnx/kaodv-ipenc.h	2007-06-17 02:44:16.549429584 +0200
    +@@ -27,6 +27,7 @@
    + #include 
    + #include 
    + #include 
    ++#include "kaodv-compat.h"
    + 
    + #define IPPROTO_MIPE 55
    + 
    +Index: aodv-uu-0.9.3/lnx/kaodv-mod.c
    +===================================================================
    +--- aodv-uu-0.9.3.orig/lnx/kaodv-mod.c	2007-06-17 02:43:33.776931992 +0200
    ++++ aodv-uu-0.9.3/lnx/kaodv-mod.c	2007-06-17 02:43:39.008136728 +0200
    +@@ -120,7 +120,7 @@
    + 			       const struct net_device *out,
    + 			       int (*okfn) (struct sk_buff *))
    + {
    +-	struct iphdr *iph = (*skb)->nh.iph;
    ++	struct iphdr *iph = ip_hdr(*skb);
    + 	struct expl_entry e;
    + 	struct in_addr ifaddr, bcaddr;
    + 	int res = 0;
    +@@ -188,7 +188,7 @@
    + 		if (is_gateway && iph->protocol == IPPROTO_MIPE &&
    + 		    iph->daddr == ifaddr.s_addr) {
    + 			ip_pkt_decapsulate(*skb);
    +-			iph = (*skb)->nh.iph;
    ++			iph = ip_hdr(*skb);
    + 			return NF_ACCEPT;
    + 		}
    + 		/* Ignore packets generated locally or that are for this
    +Index: aodv-uu-0.9.3/lnx/kaodv-mod.h
    +===================================================================
    +--- aodv-uu-0.9.3.orig/lnx/kaodv-mod.h	2007-06-17 02:44:32.498005032 +0200
    ++++ aodv-uu-0.9.3/lnx/kaodv-mod.h	2007-06-17 02:44:34.662675952 +0200
    +@@ -5,6 +5,7 @@
    + #include 
    + #include 
    + #include 
    ++#include "kaodv-compat.h"
    + 
    + /* Interface information */
    + struct if_info {
    +Index: aodv-uu-0.9.3/lnx/kaodv-queue.c
    +===================================================================
    +--- aodv-uu-0.9.3.orig/lnx/kaodv-queue.c	2007-06-17 02:45:01.513593992 +0200
    ++++ aodv-uu-0.9.3/lnx/kaodv-queue.c	2007-06-17 02:45:11.534070648 +0200
    +@@ -152,7 +152,7 @@
    + {
    + 	int status = -EINVAL;
    + 	struct kaodv_queue_entry *entry;
    +-	struct iphdr *iph = skb->nh.iph;
    ++	struct iphdr *iph = ip_hdr(skb);
    + 
    + 	entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
    + 
    +Index: aodv-uu-0.9.3/lnx/kaodv-queue.h
    +===================================================================
    +--- aodv-uu-0.9.3.orig/lnx/kaodv-queue.h	2007-06-17 02:44:50.537262648 +0200
    ++++ aodv-uu-0.9.3/lnx/kaodv-queue.h	2007-06-17 02:44:53.629792512 +0200
    +@@ -21,6 +21,7 @@
    +  *****************************************************************************/
    + #ifndef _KAODV_QUEUE_H
    + #define _KAODV_QUEUE_H
    ++#include "kaodv-compat.h"
    + 
    + #define KAODV_QUEUE_DROP 1
    + #define KAODV_QUEUE_SEND 2
    +Index: aodv-uu-0.9.3/lnx/kaodv-netlink.c
    +===================================================================
    +--- aodv-uu-0.9.3.orig/lnx/kaodv-netlink.c	2007-06-17 02:47:48.927143264 +0200
    ++++ aodv-uu-0.9.3/lnx/kaodv-netlink.c	2007-06-17 02:49:11.604574384 +0200
    +@@ -338,8 +338,10 @@
    + 	netlink_register_notifier(&kaodv_nl_notifier);
    + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14))
    + 	kaodvnl = netlink_kernel_create(NETLINK_AODV, kaodv_netlink_rcv_sk);
    +-#else
    ++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))
    + 	kaodvnl = netlink_kernel_create(NETLINK_AODV, AODVGRP_MAX, kaodv_netlink_rcv_sk, THIS_MODULE);
    ++#else
    ++	kaodvnl = netlink_kernel_create(NETLINK_AODV, AODVGRP_MAX, kaodv_netlink_rcv_sk, NULL, THIS_MODULE);
    + #endif
    + 	if (kaodvnl == NULL) {
    + 		printk(KERN_ERR "kaodv_netlink: failed to create netlink socket\n");
    diff --git a/net/aoetools/Makefile b/net/aoetools/Makefile
    new file mode 100644
    index 0000000..f2f7756
    --- /dev/null
    +++ b/net/aoetools/Makefile
    @@ -0,0 +1,47 @@
    +#
    +# Copyright (C) 2007-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=aoetools
    +PKG_VERSION:=32
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/aoetools
    +PKG_MD5SUM:=62c8b5664d413019d0008f27ab5dc4d1
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/aoetools
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=ATA over Ethernet tools
    +  URL:=http://aoetools.sourceforge.net/
    +  DEPENDS:=+kmod-aoe +libpthread
    +endef
    +
    +define Package/aoetools/description
    +	The aoetools are programs for users of the ATA over Ethernet (AoE)
    +	network storage protocol, a simple protocol for using storage over an
    +	ethernet LAN. The vblade program (storage target) exports a block
    +	device using AoE.
    +endef
    +
    +CONFIGURE_ARGS +=  NPERSHELF=16
    +
    +define Package/$(PKG_NAME)/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/sbin/aoe-{discover,flush,interfaces,mkdevs,mkshelf,revalidate,sancheck,stat,version} \
    +		$(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/aoe{cfg,ping} $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,$(PKG_NAME)))
    diff --git a/net/apache/Makefile b/net/apache/Makefile
    new file mode 100644
    index 0000000..fa16417
    --- /dev/null
    +++ b/net/apache/Makefile
    @@ -0,0 +1,164 @@
    +#
    +# Copyright (C) 2007-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=apache
    +PKG_VERSION:=2.2.15
    +PKG_RELEASE:=3
    +PKG_SOURCE_NAME:=httpd
    +
    +PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://ftp.uni-erlangen.de/pub/mirrors/apache/httpd/ \
    +		http://apache.imsam.info/httpd/
    +PKG_MD5SUM:=016cec97337eccead2aad6a7c27f2e14
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/apache/Default
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Web Servers/Proxies
    +  TITLE:=The Apache Web Server
    +  URL:=http://httpd.apache.org/
    +endef
    +
    +define Package/apache/Default/description
    + The Apache Web Server is a powerful and flexible HTTP/1.1 compliant
    + web server.  Originally designed as a replacement for the NCSA HTTP
    + Server, it has grown to be the most popular web server on the Internet.
    +endef
    +
    +define Package/apache
    +$(call Package/apache/Default)
    +  DEPENDS:=+libapr +libaprutil +libpcre +libopenssl
    +endef
    +
    +define Package/apache/description
    +$(call Package/apache/Default/description)
    + .
    + This package contains the Apache web server and utility programs.
    + .
    + Take care that you don't include apache at the moment into your image
    + please select it only as module because busybox will override
    + /usr/sbin/httpd. It'll be solved soon. If you need to include this
    + package in the image anyway, remove httpd from busybox
    + (Base system --> Configuration --> Networking Utilities --> httpd).
    + Also you should take care for the initscripts, apache's httpd isn't
    + compatible with the one from busybox, so if you want to use apache
    + for running your webif, you'll need to change the parameters in the
    + scripts and configure the rest in /etc/httpd.conf.
    +endef
    +
    +define Package/apache/conffiles
    +/etc/apache/httpd.conf
    +/etc/apache/extra/httpd-autoindex.conf
    +/etc/apache/extra/httpd-dav.conf
    +/etc/apache/extra/httpd-default.conf
    +/etc/apache/extra/httpd-info.conf
    +/etc/apache/extra/httpd-languages.conf
    +/etc/apache/extra/httpd-manual.conf
    +/etc/apache/extra/httpd-mpm.conf
    +/etc/apache/extra/httpd-multilang-errordoc.conf
    +/etc/apache/extra/httpd-ssl.conf
    +/etc/apache/extra/httpd-userdir.conf
    +/etc/apache/extra/httpd-vhosts.conf
    +/etc/apache/magic
    +/etc/apache/mime.types
    +endef
    +
    +define Package/apache-icons
    +$(call Package/apache/Default)
    +  TITLE:=Icons from Apache
    +  DEPENDS:=apache
    +endef
    +
    +define Package/apache-icons/description
    +$(call Package/apache/Default/description)
    + .
    + This package contains the icons from Apache.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
    +		--with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
    +		--with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
    +		--enable-http \
    +		--enable-ssl \
    +		--enable-proxy \
    +		--disable-disk-cache \
    +		--enable-maintainer-mode \
    +		--enable-mime-magic \
    +		--without-suexec-bin \
    +		--sysconfdir=/etc/apache \
    +		ap_cv_void_ptr_lt_long=no \
    +		logfiledir="/var/log" \
    +		runtimedir="/var/run" \
    +	)
    +endef
    +
    +define Build/InstallDev
    +	rm -rf	$(PKG_INSTALL_DIR)/usr/man/ \
    +		$(PKG_INSTALL_DIR)/usr/share/manual/
    +	# if you need docs take a look into the build-dir :)
    +	$(INSTALL_DIR) $(1)/etc
    +	$(CP)   $(PKG_INSTALL_DIR)/etc/* \
    +		$(1)/etc
    +	$(INSTALL_DIR) $(1)/usr/include/apache
    +	$(CP)	$(PKG_INSTALL_DIR)/usr/include/* \
    +		$(1)/usr/include/apache
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP)   $(PKG_INSTALL_DIR)/usr/lib/httpd.exp \
    +		$(1)/usr/lib
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(CP)   $(PKG_INSTALL_DIR)/usr/sbin/* \
    +		$(1)/usr/sbin
    +	$(INSTALL_DIR) $(1)/usr/share
    +	$(CP)   $(PKG_INSTALL_DIR)/usr/share/* \
    +		$(1)/usr/share
    +endef
    +
    +define Package/apache/preinst
    +	rm /usr/sbin/httpd
    +	echo -e "You should take a look in the initscripts, busybox's httpd \n\
    +	uses some parameters which are maybe unsupported by apache."
    +endef
    +
    +define Package/apache/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	# we don't need apxs on the router, it's just for building apache modules.
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{ab,apachectl,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/share
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/{error,htdocs,cgi-bin,build} $(1)/usr/share/
    +	$(INSTALL_DIR) $(1)/etc/apache
    +	$(CP) $(PKG_INSTALL_DIR)/etc/apache/{httpd.conf,magic,mime.types,extra} $(1)/etc/apache/
    +endef
    +
    +define Package/apache/postrm
    +	rm -rf /usr/sbin/httpd
    +	ln -s /bin/busybox /usr/sbin/httpd
    +	echo -e "You may need to change your initscripts back for the use \n\
    +		with busybox's httpd."
    +endef
    +
    +define Package/apache-icons/install
    +	$(INSTALL_DIR) $(1)/usr/share
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/icons $(1)/usr/share/
    +endef
    +
    +$(eval $(call BuildPackage,apache))
    +$(eval $(call BuildPackage,apache-icons))
    diff --git a/net/apache/patches/001-Makefile_in.patch b/net/apache/patches/001-Makefile_in.patch
    new file mode 100644
    index 0000000..0bccfd3
    --- /dev/null
    +++ b/net/apache/patches/001-Makefile_in.patch
    @@ -0,0 +1,14 @@
    +--- a/server/Makefile.in
    ++++ b/server/Makefile.in
    +@@ -26,7 +26,10 @@ gen_test_char: $(gen_test_char_OBJECTS)
    + 	$(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
    + 
    + test_char.h: gen_test_char
    +-	./gen_test_char > test_char.h
    ++	true
    ++#	./gen_test_char > test_char.h
    ++#	doesn't matter if you run it on the buildhost or on an wl500gd,
    ++#	same output on both, so i just patched in the test_char.h :).
    + 
    + util.lo: test_char.h
    + 
    diff --git a/net/apache/patches/002-test_char_h.patch b/net/apache/patches/002-test_char_h.patch
    new file mode 100644
    index 0000000..e8ea3cd
    --- /dev/null
    +++ b/net/apache/patches/002-test_char_h.patch
    @@ -0,0 +1,26 @@
    +--- /dev/null
    ++++ b/server/test_char.h
    +@@ -0,0 +1,23 @@
    ++/* this file is automatically generated by gen_test_char, do not edit */
    ++#define T_ESCAPE_SHELL_CMD     (1)
    ++#define T_ESCAPE_PATH_SEGMENT  (2)
    ++#define T_OS_ESCAPE_PATH       (4)
    ++#define T_HTTP_TOKEN_STOP      (8)
    ++#define T_ESCAPE_LOGITEM       (16)
    ++#define T_ESCAPE_FORENSIC      (32)
    ++
    ++static const unsigned char test_char_table[256] = {
    ++    32,62,62,62,62,62,62,62,62,62,63,62,62,62,62,62,62,62,62,62,
    ++    62,62,62,62,62,62,62,62,62,62,62,62,14,0,23,6,1,38,1,1,
    ++    9,9,1,0,8,0,0,10,0,0,0,0,0,0,0,0,0,0,40,15,
    ++    15,8,15,15,8,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,15,31,15,7,0,7,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,15,39,15,1,62,54,54,54,54,54,54,54,54,54,54,54,54,
    ++    54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
    ++    54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
    ++    54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
    ++    54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
    ++    54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
    ++    54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54
    ++};
    diff --git a/net/apache/patches/003-logdir_fix.patch b/net/apache/patches/003-logdir_fix.patch
    new file mode 100644
    index 0000000..635c65c
    --- /dev/null
    +++ b/net/apache/patches/003-logdir_fix.patch
    @@ -0,0 +1,33 @@
    +--- a/build/mkconfNW.awk
    ++++ b/build/mkconfNW.awk
    +@@ -24,7 +24,7 @@ BEGIN {
    +     A["sysconfdir"] = "conf"
    +     A["iconsdir"] = "icons"
    +     A["manualdir"] = "manual"
    +-    A["runtimedir"] = "logs"
    ++    A["runtimedir"] = "log"
    +     A["errordir"] = "error"
    +     A["proxycachedir"] = "proxy"
    + 
    +--- a/config.layout
    ++++ b/config.layout
    +@@ -28,8 +28,8 @@
    +     cgidir:        ${datadir}/cgi-bin
    +     includedir:    ${prefix}/include
    +     localstatedir: ${prefix}
    +-    runtimedir:    ${localstatedir}/logs
    +-    logfiledir:    ${localstatedir}/logs
    ++    runtimedir:    ${localstatedir}/log
    ++    logfiledir:    ${localstatedir}/log
    +     proxycachedir: ${localstatedir}/proxy
    + 
    + 
    +@@ -150,7 +150,7 @@
    +     includedir:    ${prefix}/include
    +     localstatedir: /var${prefix}
    +     runtimedir:    ${localstatedir}/run
    +-    logfiledir:    ${localstatedir}/logs
    ++    logfiledir:    ${localstatedir}/log
    +     proxycachedir: ${localstatedir}/proxy
    + 
    + 
    diff --git a/net/apache/patches/004-pidfile_fix.patch b/net/apache/patches/004-pidfile_fix.patch
    new file mode 100644
    index 0000000..e9f0b6d
    --- /dev/null
    +++ b/net/apache/patches/004-pidfile_fix.patch
    @@ -0,0 +1,11 @@
    +--- a/include/scoreboard.h
    ++++ b/include/scoreboard.h
    +@@ -42,7 +42,7 @@ extern "C" {
    + 
    + /* Scoreboard file, if there is one */
    + #ifndef DEFAULT_SCOREBOARD
    +-#define DEFAULT_SCOREBOARD "logs/apache_runtime_status"
    ++#define DEFAULT_SCOREBOARD "log/apache_runtime_status"
    + #endif
    + 
    + /* Scoreboard info on a process is, for now, kept very brief --- 
    diff --git a/net/apache/patches/005-httpd_conf.patch b/net/apache/patches/005-httpd_conf.patch
    new file mode 100644
    index 0000000..60f0dca
    --- /dev/null
    +++ b/net/apache/patches/005-httpd_conf.patch
    @@ -0,0 +1,60 @@
    +--- a/docs/conf/httpd.conf.in
    ++++ b/docs/conf/httpd.conf.in
    +@@ -51,7 +51,6 @@ Listen @@Port@@
    + # Example:
    + # LoadModule foo_module modules/mod_foo.so
    + #
    +-@@LoadModule@@
    + 
    + 
    + 
    +@@ -63,8 +62,8 @@ Listen @@Port@@
    + # It is usually good practice to create a dedicated user and group for
    + # running httpd, as with most system services.
    + #
    +-User daemon
    +-Group daemon
    ++User nobody
    ++Group nogroup
    + 
    + 
    + 
    +@@ -191,7 +190,7 @@ ErrorLog "@rel_logfiledir@/error_log"
    + # Possible values include: debug, info, notice, warn, error, crit,
    + # alert, emerg.
    + #
    +-LogLevel warn
    ++LogLevel debug
    + 
    + 
    +     #
    +@@ -336,7 +335,7 @@ DefaultType text/plain
    + # contents of the file itself to determine its type.  The MIMEMagicFile
    + # directive tells the module where the hint definitions are located.
    + #
    +-#MIMEMagicFile @rel_sysconfdir@/magic
    ++MIMEMagicFile @rel_sysconfdir@/magic
    + 
    + #
    + # Customizable error responses come in three flavors:
    +@@ -358,7 +357,7 @@ DefaultType text/plain
    + # broken on your system.
    + #
    + #EnableMMAP off
    +-#EnableSendfile off
    ++EnableSendfile off
    + 
    + # Supplemental configuration
    + #
    +@@ -404,7 +403,7 @@ DefaultType text/plain
    + #       starting without SSL on platforms with no /dev/random equivalent
    + #       but a statically compiled-in mod_ssl.
    + #
    +-
    +-SSLRandomSeed startup builtin
    +-SSLRandomSeed connect builtin
    +-
    ++#
    ++#SSLRandomSeed startup builtin
    ++#SSLRandomSeed connect builtin
    ++#
    diff --git a/net/apcupsd/Makefile b/net/apcupsd/Makefile
    new file mode 100644
    index 0000000..9ce3cd8
    --- /dev/null
    +++ b/net/apcupsd/Makefile
    @@ -0,0 +1,64 @@
    +# 
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=apcupsd
    +PKG_VERSION:=3.14.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/apcupsd
    +PKG_MD5SUM:=bb2f8e4fc6b2f5d7b3e236eb57b81640
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/apcupsd
    +  SECTION:=utils
    +  CATEGORY:=Utilities
    +  DEPENDS:=+libpthread +libusb
    +  TITLE:=UPS control software
    +  URL:=http://www.apcupsd.org/
    +endef
    +
    +define Build/Configure
    +	$(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/
    +	$(call Build/Configure/Default, \
    +		--with-distname=unknown \
    +		--sysconfdir=/etc/apcupsd \
    +		--enable-usb \
    +		--without-x \
    +	)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		LD="$(TARGET_CC)" \
    +		all install
    +endef
    +
    +define Package/apcupsd/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/apcupsd $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smtp $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/apctest $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/apcaccess $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc/apcupsd
    +	$(INSTALL_CONF) ./files/apcupsd.conf $(1)/etc/apcupsd/
    +	$(INSTALL_CONF) ./files/apcupsd_mail.conf $(1)/etc/apcupsd/
    +	$(INSTALL_BIN) ./files/changeme $(1)/etc/apcupsd/
    +	$(INSTALL_BIN) ./files/commfailure $(1)/etc/apcupsd/
    +	$(INSTALL_BIN) ./files/commok $(1)/etc/apcupsd/
    +	$(INSTALL_BIN) ./files/offbattery $(1)/etc/apcupsd/
    +	$(INSTALL_BIN) ./files/onbattery $(1)/etc/apcupsd/
    +	$(INSTALL_BIN) ./files/apccontrol $(1)/etc/apcupsd/
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN)	./files/apcupsd.init $(1)/etc/init.d/apcupsd
    +endef
    +
    +$(eval $(call BuildPackage,apcupsd))
    diff --git a/net/apcupsd/files/apccontrol b/net/apcupsd/files/apccontrol
    new file mode 100644
    index 0000000..2549354
    --- /dev/null
    +++ b/net/apcupsd/files/apccontrol
    @@ -0,0 +1,146 @@
    +#!/bin/sh
    +#
    +# Copyright (C) 1999-2002 Riccardo Facchetti 
    +#
    +#  for apcupsd release 3.14.1 (04 May 2007) - unknown
    +#
    +# platforms/apccontrol.  Generated from apccontrol.in by configure.
    +#
    +#  Note, this is a generic file that can be used by most
    +#   systems. If a particular system needs to have something
    +#   special, start with this file, and put a copy in the
    +#   platform subdirectory.
    +#
    +
    +#
    +# These variables are needed for set up the autoconf other variables.
    +#
    +prefix=/usr
    +exec_prefix=/usr
    +
    +APCPID=/var/run/apcupsd.pid
    +APCUPSD=/usr/sbin/apcupsd
    +SHUTDOWN=/sbin/shutdown
    +SCRIPTSHELL=/bin/sh
    +SCRIPTDIR=/etc/apcupsd
    +WALL=true
    +
    +#
    +# Concatenate all output from this script to the events file
    +#  Note, the following kills the script in a power fail situation
    +#   where the disks are mounted read-only.
    +# exec >>/var/log/apcupsd.events 2>&1
    +
    +#
    +# This piece is to substitute the default behaviour with your own script,
    +# perl, or C program.
    +# You can customize every single command creating an executable file (may be a
    +# script or a compiled program) and calling it the same as the $1 parameter
    +# passed by apcupsd to this script.
    +#
    +# After executing your script, apccontrol continues with the default action.
    +# If you do not want apccontrol to continue, exit your script with exit 
    +# code 99. E.g. "exit 99".
    +#
    +# WARNING: the apccontrol file will be overwritten every time you update your
    +# apcupsd, doing `make install'. Your own customized scripts will _not_ be
    +# overwritten. If you wish to make changes to this file (discouraged), you
    +# should change apccontrol.sh.in and then rerun the configure process.
    +#
    +if [ -f ${SCRIPTDIR}/${1} -a -x ${SCRIPTDIR}/${1} ]
    +then
    +    ${SCRIPTDIR}/${1} ${2} ${3} ${4}
    +    # exit code 99 means he does not want us to do default action
    +    if [ $? = 99 ] ; then
    +	exit 0
    +    fi
    +fi
    +
    +case "$1" in
    +    killpower)
    +	echo "Apccontrol doing: ${APCUPSD} --killpower on UPS ${2}"
    +	sleep 10
    +	${APCUPSD} --killpower
    +	echo "Apccontrol has done: ${APCUPSD} --killpower on UPS ${2}" | ${WALL}
    +    ;;
    +    commfailure)
    +	echo "Warning communications lost with UPS ${2}" | ${WALL}
    +    ;;
    +    commok)
    +	echo "Communications restored with UPS ${2}" | ${WALL}
    +    ;;
    +#
    +# powerout, onbattery, offbattery, mainsback events occur
    +#   in that order.
    +#
    +    powerout)
    +	echo "Warning power loss detected on UPS ${2}" | ${WALL}
    +    ;;
    +    onbattery)
    +	echo "Power failure on UPS ${2}. Running on batteries." | ${WALL}
    +    ;;
    +    offbattery)
    +    ;;
    +    mainsback)
    +	echo "Power has returned on UPS ${2}..." | ${WALL}
    +	if [ -f /etc/powerfail ] ; then
    +	   printf "Continuing with shutdown."  | ${WALL}
    +	fi
    +    ;;
    +    failing)
    +	echo "Battery power exhaused on UPS ${2}. Doing shutdown." | ${WALL}
    +    ;;
    +    timeout)
    +	echo "Battery time limit exceeded on UPS ${2}. Doing shutdown." | ${WALL}
    +    ;;
    +    loadlimit)
    +	echo "Remaining battery charge below limit on UPS ${2}. Doing shutdown." | ${WALL}
    +    ;;
    +    runlimit)
    +	echo "Remaining battery runtime below limit on UPS ${2}. Doing shutdown." | ${WALL}
    +    ;;
    +    doreboot)
    +	echo "UPS ${2} initiating Reboot Sequence" | ${WALL}
    +	${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot"
    +    ;;
    +    doshutdown)
    +	echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}
    +	${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown"
    +    ;;
    +    annoyme)
    +	echo "Power problems with UPS ${2}. Please logoff." | ${WALL}
    +    ;;
    +    emergency)
    +	echo "Emergency Shutdown. Possible battery failure on UPS ${2}." | ${WALL}
    +    ;;
    +    changeme)
    +	echo "Emergency! Batteries have failed on UPS ${2}. Change them NOW" | ${WALL}
    +    ;;
    +    remotedown)
    +	echo "Remote Shutdown. Beginning Shutdown Sequence." | ${WALL}
    +    ;;
    +    restartme)
    +	echo -n "Restarting APCUPSD Power Management: "
    +	THEPID=`cat ${APCPID}`
    +	kill ${THEPID}
    +	rm -f ${APCPID}
    +	rm -f /etc/powerfail
    +	rm -f /etc/nologin
    +	sleep 5
    +	`${APCUPSD}`
    +	echo "apcupsd"
    +    ;;
    +    startselftest)
    +    ;;
    +    endselftest)
    +    ;;
    +    battdetach)
    +    ;;
    +    battattach)
    +    ;;
    +    *)	echo "Usage: ${0##*/} command"
    +	echo "	     warning: this script is intended to be launched by"
    +	echo "	     apcupsd and should never be launched by users."
    +	exit 1
    +    ;;
    +esac
    diff --git a/net/apcupsd/files/apcupsd.conf b/net/apcupsd/files/apcupsd.conf
    new file mode 100644
    index 0000000..b9acd61
    --- /dev/null
    +++ b/net/apcupsd/files/apcupsd.conf
    @@ -0,0 +1,322 @@
    +## apcupsd.conf v1.1 ##
    +# 
    +#  for apcupsd release 3.14.1 (04 May 2007) - unknown
    +#
    +# "apcupsd" POSIX config file
    +
    +#
    +# ========= General configuration parameters ============
    +#
    +
    +# UPSNAME xxx
    +#   Use this to give your UPS a name in log files and such. This
    +#   is particulary useful if you have multiple UPSes. This does not
    +#   set the EEPROM. It should be 8 characters or less.
    +UPSNAME ups1
    +
    +# UPSCABLE 
    +#   Defines the type of cable connecting the UPS to your computer.
    +#
    +#   Possible generic choices for  are:
    +#     simple, smart, ether, usb
    +#
    +#   Or a specific cable model number may be used:
    +#     940-0119A, 940-0127A, 940-0128A, 940-0020B,
    +#     940-0020C, 940-0023A, 940-0024B, 940-0024C,
    +#     940-1524C, 940-0024G, 940-0095A, 940-0095B,
    +#     940-0095C, M-04-02-2000
    +#
    +UPSCABLE smart
    +
    +# To get apcupsd to work, in addition to defining the cable
    +# above, you must also define a UPSTYPE, which corresponds to
    +# the type of UPS you have (see the Description for more details).
    +# You must also specify a DEVICE, sometimes referred to as a port.
    +# For USB UPSes, please leave the DEVICE directive blank. For
    +# other UPS types, you must specify an appropriate port or address.
    +#
    +# UPSTYPE   DEVICE           Description
    +# apcsmart  /dev/tty**       Newer serial character device,
    +#                            appropriate for SmartUPS models using
    +#                            a serial cable (not USB).
    +#
    +# usb                 Most new UPSes are USB. A blank DEVICE
    +#                            setting enables autodetection, which is
    +#                            the best choice for most installations.
    +#
    +# net       hostname:port    Network link to a master apcupsd
    +#                            through apcupsd's Network Information
    +#                            Server. This is used if you don't have
    +#                            a UPS directly connected to your computer.
    +#
    +# snmp      hostname:port:vendor:community
    +#                            SNMP Network link to an SNMP-enabled
    +#                            UPS device. Vendor is the MIB used by
    +#                            the UPS device: can be "APC", "APC_NOTRAP"
    +#                            or "RFC" where APC is the powernet MIB,
    +#                            "APC_NOTRAP" is powernet with SNMP trap
    +#                            catching disabled, and RFC is the IETF's 
    +#                            rfc1628 UPS-MIB. You usually want "APC".
    +#                            Port is usually 161. Community is usually
    +#                            "private".
    +#
    +# dumb      /dev/tty**       Old serial character device for use 
    +#                            with simple-signaling UPSes.
    +#
    +# pcnet    ipaddr:username:passphrase
    +#                            PowerChute Network Shutdown protocol
    +#                            which can be used as an alternative to SNMP
    +#                            with AP9617 family of smart slot cards.
    +#                            ipaddr is the IP address of the UPS mgmt
    +#                            card. username and passphrase are the
    +#                            credentials for which the card has been
    +#                            configured.
    +#
    +UPSTYPE apcsmart
    +DEVICE /dev/ttyS0
    +
    +
    +# LOCKFILE 
    +#   Path for device lock file. Not used on Win32.
    +LOCKFILE /var/lock
    +
    +# SCRIPTDIR 
    +#   Directory in which apccontrol and event scripts are located.
    +SCRIPTDIR /etc/apcupsd
    +
    +# PWRFAILDIR 
    +#   Directory in which to write the powerfail flag file. This file
    +#   is created when apcupsd initiates a system shutdown and is
    +#   checked in the OS halt scripts to determine if a killpower
    +#   (turning off UPS output power) is required.
    +PWRFAILDIR /etc
    +
    +# NOLOGINDIR 
    +#   Directory in which to write the nologin file. The existence
    +#   of this flag file tells the OS to disallow new logins.
    +NOLOGINDIR /etc
    +
    +
    +#
    +# ======== Configuration parameters used during power failures ==========
    +#
    +
    +# The ONBATTERYDELAY is the time in seconds from when a power failure
    +#   is detected until we react to it with an onbattery event.
    +#
    +#   This means that, apccontrol will be called with the powerout argument
    +#   immediately when a power failure is detected.  However, the
    +#   onbattery argument is passed to apccontrol only after the 
    +#   ONBATTERYDELAY time.  If you don't want to be annoyed by short
    +#   powerfailures, make sure that apccontrol powerout does nothing
    +#   i.e. comment out the wall.
    +#ONBATTERYDELAY 6
    +
    +# 
    +# Note: BATTERYLEVEL, MINUTES, and TIMEOUT work in conjunction, so
    +# the first that occurs will cause the initation of a shutdown.
    +#
    +
    +# If during a power failure, the remaining battery percentage
    +# (as reported by the UPS) is below or equal to BATTERYLEVEL, 
    +# apcupsd will initiate a system shutdown.
    +BATTERYLEVEL 5
    +
    +# If during a power failure, the remaining runtime in minutes 
    +# (as calculated internally by the UPS) is below or equal to MINUTES,
    +# apcupsd, will initiate a system shutdown.
    +MINUTES 3
    +
    +# If during a power failure, the UPS has run on batteries for TIMEOUT
    +# many seconds or longer, apcupsd will initiate a system shutdown.
    +# A value of 0 disables this timer.
    +#
    +#  Note, if you have a Smart UPS, you will most likely want to disable
    +#    this timer by setting it to zero. That way, you UPS will continue
    +#    on batteries until either the % charge remaing drops to or below BATTERYLEVEL,
    +#    or the remaining battery runtime drops to or below MINUTES.  Of course,
    +#    if you are testing, setting this to 60 causes a quick system shutdown
    +#    if you pull the power plug.   
    +#  If you have an older dumb UPS, you will want to set this to less than
    +#    the time you know you can run on batteries.
    +TIMEOUT 0
    +
    +#  Time in seconds between annoying users to signoff prior to
    +#  system shutdown. 0 disables.
    +ANNOY 300
    +
    +# Initial delay after power failure before warning users to get
    +# off the system.
    +ANNOYDELAY 60
    +
    +# The condition which determines when users are prevented from
    +# logging in during a power failure.
    +# NOLOGON  [ disable | timeout | percent | minutes | always ]
    +NOLOGON disable
    +
    +# If KILLDELAY is non-zero, apcupsd will continue running after a
    +# shutdown has been requested, and after the specified time in
    +# seconds attempt to kill the power. This is for use on systems
    +# where apcupsd cannot regain control after a shutdown.
    +# KILLDELAY   0 disables
    +KILLDELAY 0
    +
    +#
    +# ==== Configuration statements for Network Information Server ====
    +#
    +
    +# NETSERVER [ on | off ] on enables, off disables the network
    +#  information server. If netstatus is on, a network information
    +#  server process will be started for serving the STATUS and
    +#  EVENT data over the network (used by CGI programs).
    +NETSERVER on
    +
    +# NISIP 
    +#  IP address on which NIS server will listen for incoming connections.
    +#  This is useful if your server is multi-homed (has more than one
    +#  network interface and IP address). Default value is 0.0.0.0 which
    +#  means any incoming request will be serviced. Alternatively, you can
    +#  configure this setting to any specific IP address of your server and 
    +#  NIS will listen for connections only on that interface. Use the
    +#  loopback address (127.0.0.1) to accept connections only from the
    +#  local machine.
    +NISIP 0.0.0.0
    +
    +# NISPORT  default is 3551 as registered with the IANA
    +#  port to use for sending STATUS and EVENTS data over the network.
    +#  It is not used unless NETSERVER is on. If you change this port,
    +#  you will need to change the corresponding value in the cgi directory
    +#  and rebuild the cgi programs.
    +NISPORT 3551
    +
    +# If you want the last few EVENTS to be available over the network
    +# by the network information server, you must define an EVENTSFILE.
    +EVENTSFILE /var/log/apcupsd.events
    +
    +# EVENTSFILEMAX 
    +#  By default, the size of the EVENTSFILE will be not be allowed to exceed
    +#  10 kilobytes.  When the file grows beyond this limit, older EVENTS will
    +#  be removed from the beginning of the file (first in first out).  The
    +#  parameter EVENTSFILEMAX can be set to a different kilobyte value, or set
    +#  to zero to allow the EVENTSFILE to grow without limit.
    +EVENTSFILEMAX 10
    +
    +#
    +# ========== Configuration statements used if sharing =============
    +#            a UPS with more than one machine
    +
    +# NETTIME 
    +#   Interval (in seconds) at which the NIS client polls the server.
    +#   Used only when this apcupsd is a network client (UPSTYPE net).
    +#NETTIME 60
    +
    +#
    +# Remaining items are for ShareUPS (APC expansion card) ONLY
    +#
    +
    +# UPSCLASS [ standalone | shareslave | sharemaster ]
    +#   Normally standalone unless you share an UPS using an APC ShareUPS
    +#   card.
    +UPSCLASS standalone
    +
    +# UPSMODE [ disable | share ]
    +#   Normally disable unless you share an UPS using an APC ShareUPS card.
    +UPSMODE disable
    +
    +#
    +# ===== Configuration statements to control apcupsd system logging ========
    +#
    +
    +# Time interval in seconds between writing the STATUS file; 0 disables
    +STATTIME 0
    +
    +# Location of STATUS file (written to only if STATTIME is non-zero)
    +STATFILE /var/log/apcupsd.status
    +
    +# LOGSTATS [ on | off ] on enables, off disables
    +# Note! This generates a lot of output, so if         
    +#       you turn this on, be sure that the
    +#       file defined in syslog.conf for LOG_NOTICE is a named pipe.
    +#  You probably do not want this on.
    +LOGSTATS off
    +
    +# Time interval in seconds between writing the DATA records to
    +#   the log file. 0 disables.
    +DATATIME 0
    +
    +# FACILITY defines the logging facility (class) for logging to syslog. 
    +#          If not specified, it defaults to "daemon". This is useful 
    +#          if you want to separate the data logged by apcupsd from other
    +#          programs.
    +#FACILITY DAEMON
    +
    +#
    +# ========== Configuration statements used in updating the UPS EPROM =========
    +#
    +
    +#
    +# These statements are used only by apctest when choosing "Set EEPROM with conf
    +# file values" from the EEPROM menu. THESE STATEMENTS HAVE NO EFFECT ON APCUPSD.
    +#
    +
    +# UPS name, max 8 characters 
    +#UPSNAME UPS_IDEN
    +
    +# Battery date - 8 characters
    +#BATTDATE mm/dd/yy
    +
    +# Sensitivity to line voltage quality (H cause faster transfer to batteries)  
    +# SENSITIVITY H M L        (default = H)
    +#SENSITIVITY H
    +
    +# UPS delay after power return (seconds)
    +# WAKEUP 000 060 180 300   (default = 0)
    +#WAKEUP 60
    +
    +# UPS Grace period after request to power off (seconds)
    +# SLEEP 020 180 300 600    (default = 20)
    +#SLEEP 180
    +
    +# Low line voltage causing transfer to batteries
    +# The permitted values depend on your model as defined by last letter 
    +#  of FIRMWARE or APCMODEL. Some representative values are:
    +#    D 106 103 100 097
    +#    M 177 172 168 182
    +#    A 092 090 088 086
    +#    I 208 204 200 196     (default = 0 => not valid)
    +#LOTRANSFER  208
    +
    +# High line voltage causing transfer to batteries
    +# The permitted values depend on your model as defined by last letter 
    +#  of FIRMWARE or APCMODEL. Some representative values are:
    +#    D 127 130 133 136
    +#    M 229 234 239 224
    +#    A 108 110 112 114
    +#    I 253 257 261 265     (default = 0 => not valid)
    +#HITRANSFER 253
    +
    +# Battery charge needed to restore power
    +# RETURNCHARGE 00 15 50 90 (default = 15)
    +#RETURNCHARGE 15
    +
    +# Alarm delay 
    +# 0 = zero delay after pwr fail, T = power fail + 30 sec, L = low battery, N = never
    +# BEEPSTATE 0 T L N        (default = 0)
    +#BEEPSTATE T
    +
    +# Low battery warning delay in minutes
    +# LOWBATT 02 05 07 10      (default = 02)
    +#LOWBATT 2
    +
    +# UPS Output voltage when running on batteries
    +# The permitted values depend on your model as defined by last letter 
    +#  of FIRMWARE or APCMODEL. Some representative values are:
    +#    D 115
    +#    M 208
    +#    A 100
    +#    I 230 240 220 225     (default = 0 => not valid)
    +#OUTPUTVOLTS 230
    +
    +# Self test interval in hours 336=2 weeks, 168=1 week, ON=at power on
    +# SELFTEST 336 168 ON OFF  (default = 336)
    +#SELFTEST 336
    diff --git a/net/apcupsd/files/apcupsd.init b/net/apcupsd/files/apcupsd.init
    new file mode 100644
    index 0000000..5454377
    --- /dev/null
    +++ b/net/apcupsd/files/apcupsd.init
    @@ -0,0 +1,12 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +STOP=50
    +
    +start() {
    +	/usr/sbin/apcupsd -f /etc/apcupsd/apcupsd.conf
    +}
    +
    +stop() {
    +	kill $(cat /var/run/apcupsd.pid)
    +}
    diff --git a/net/apcupsd/files/apcupsd_mail.conf b/net/apcupsd/files/apcupsd_mail.conf
    new file mode 100644
    index 0000000..51206c7
    --- /dev/null
    +++ b/net/apcupsd/files/apcupsd_mail.conf
    @@ -0,0 +1,7 @@
    +#!/bin/sh
    +
    +MAILPROG="/usr/sbin/smtp"
    +MAILHOST="mail:25"
    +FROM="OpenWrt"
    +TO="apcups@example.com"
    +HOSTNAME="OpenWrt"
    \ No newline at end of file
    diff --git a/net/apcupsd/files/changeme b/net/apcupsd/files/changeme
    new file mode 100644
    index 0000000..bcf448a
    --- /dev/null
    +++ b/net/apcupsd/files/changeme
    @@ -0,0 +1,17 @@
    +#!/bin/sh
    +#
    +# This shell script if placed in /etc/apcupsd
    +# will be called by /etc/apcupsd/apccontrol when apcupsd
    +# detects that the battery should be replaced.
    +# We send an email message to root to notify him.
    +#
    +. /etc/apcupsd/apcupsd_mail.conf
    +
    +MSG="$HOSTNAME UPS battery needs changing NOW."
    +#
    +(
    +   echo "$MSG"
    +   echo " "
    +   /usr/sbin/apcaccess status
    +) | $MAILPROG -h $MAILHOST -f $FROM -s "$MSG" $TO
    +exit 0
    diff --git a/net/apcupsd/files/commfailure b/net/apcupsd/files/commfailure
    new file mode 100644
    index 0000000..b899195
    --- /dev/null
    +++ b/net/apcupsd/files/commfailure
    @@ -0,0 +1,17 @@
    +#!/bin/sh
    +#
    +# This shell script if placed in /etc/apcupsd
    +# will be called by /etc/apcupsd/apccontrol when apcupsd
    +# loses contact with the UPS (i.e. the serial connection is not responding).
    +# We send an email message to root to notify him.
    +#
    +. /etc/apcupsd/apcupsd_mail.conf
    +
    +MSG="$HOSTNAME Communications with UPS lost"
    +#
    +(
    +   echo "$MSG"
    +   echo " "
    +   /usr/sbin/apcaccess status
    +) | $MAILPROG -h $MAILHOST -f $FROM -s "$MSG" $TO
    +exit 0
    diff --git a/net/apcupsd/files/commok b/net/apcupsd/files/commok
    new file mode 100644
    index 0000000..cd5d1c6
    --- /dev/null
    +++ b/net/apcupsd/files/commok
    @@ -0,0 +1,17 @@
    +#!/bin/sh
    +#
    +# This shell script if placed in /etc/apcupsd
    +# will be called by /etc/apcupsd/apccontrol when apcupsd
    +# restores contact with the UPS (i.e. the serial connection is restored).
    +# We send an email message to root to notify him.
    +#
    +. /etc/apcupsd/apcupsd_mail.conf
    +
    +MSG="$HOSTNAME Communications with UPS restored"
    +#
    +(
    +   echo "$MSG"
    +   echo " "
    +   /usr/sbin/apcaccess status
    +) | $MAILPROG -h $MAILHOST -f $FROM -s "$MSG" $TO
    +exit 0
    diff --git a/net/apcupsd/files/offbattery b/net/apcupsd/files/offbattery
    new file mode 100644
    index 0000000..22c0b98
    --- /dev/null
    +++ b/net/apcupsd/files/offbattery
    @@ -0,0 +1,17 @@
    +#!/bin/sh
    +#
    +# This shell script if placed in /etc/apcupsd
    +# will be called by /etc/apcupsd/apccontrol when the    
    +# UPS goes back on to the mains after a power failure.
    +# We send an email message to root to notify him.
    +#
    +. /etc/apcupsd/apcupsd_mail.conf
    +
    +MSG="$HOSTNAME Power has returned"
    +#
    +(
    +   echo "$MSG"
    +   echo " "
    +   /usr/sbin/apcaccess status
    +) | $MAILPROG -h $MAILHOST -f $FROM -s "$MSG" $TO
    +exit 0
    diff --git a/net/apcupsd/files/onbattery b/net/apcupsd/files/onbattery
    new file mode 100644
    index 0000000..ee5f653
    --- /dev/null
    +++ b/net/apcupsd/files/onbattery
    @@ -0,0 +1,17 @@
    +#!/bin/sh
    +#
    +# This shell script if placed in /etc/apcupsd
    +# will be called by /etc/apcupsd/apccontrol when the UPS
    +# goes on batteries.
    +# We send an email message to root to notify him.
    +#
    +. /etc/apcupsd/apcupsd_mail.conf
    +
    +MSG="$HOSTNAME Power Failure !!!"
    +#
    +(
    +   echo "$MSG"
    +   echo " "
    +   /usr/sbin/apcaccess status
    +) | $MAILPROG -h $MAILHOST -f $FROM -s "$MSG" $TO
    +exit 0
    diff --git a/net/apcupsd/patches/010-fix-include-paths.patch b/net/apcupsd/patches/010-fix-include-paths.patch
    new file mode 100644
    index 0000000..2151544
    --- /dev/null
    +++ b/net/apcupsd/patches/010-fix-include-paths.patch
    @@ -0,0 +1,13 @@
    +diff --git a/autoconf/variables.mak.in b/autoconf/variables.mak.in
    +index b67e467..6022434 100644
    +--- a/autoconf/variables.mak.in
    ++++ b/autoconf/variables.mak.in
    +@@ -65,7 +65,7 @@ DRVLIBS = @PTHREAD_LFLAGS@ @DRVLIBS@
    + X_LIBS = @X_LIBS@
    + X_EXTRA_LIBS = @X_EXTRA_LIBS@
    + 
    +-CPPFLAGS = @CPPFLAGS@ -I$(topdir)/include $(EXTRAINCS)
    ++CPPFLAGS = -I$(topdir)/include @CPPFLAGS@ $(EXTRAINCS)
    + CFLAGS = $(CPPFLAGS) @CFLAGS@ @PTHREAD_CFLAGS@
    + CXXFLAGS = $(CPPFLAGS) @CXXFLAGS@ @PTHREAD_CFLAGS@
    + LDFLAGS = @LDFLAGS@
    diff --git a/net/apf/Makefile b/net/apf/Makefile
    new file mode 100644
    index 0000000..46a2979
    --- /dev/null
    +++ b/net/apf/Makefile
    @@ -0,0 +1,41 @@
    +#
    +# Copyright (C) 2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=apf
    +PKG_VERSION:=0.8.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://gray-world.net/projects/af/
    +PKG_MD5SUM:=4411785b05ec59e955152fe4e61705b1
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +CONFIGURE_VARS += \
    +	LDFLAGS="$$$$LDFLAGS -lcrypto -lssl -lz"
    +
    +define Package/apf
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=Active port forwarder
    +  URL:=http://gray-world.net/pr_af.shtml
    +  DEPENDS:=+libopenssl
    +endef
    +
    +define Package/apf/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/af{client,server} $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/afclient_example.conf $(1)/etc/afclient.conf
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/afserver_example.conf $(1)/etc/afserver.conf
    +endef
    +
    +$(eval $(call BuildPackage,apf))
    diff --git a/net/appweb/Makefile b/net/appweb/Makefile
    new file mode 100644
    index 0000000..d52e7ae
    --- /dev/null
    +++ b/net/appweb/Makefile
    @@ -0,0 +1,72 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +# Copyright (C) 2009 Embedthis Software
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +# Commercial and other licenses are available from http://www.embedthis.com/.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=appweb
    +PKG_RELEASE:=1
    +
    +#
    +#	Build stable
    +#
    +PKG_VERSION:=3.2.2-1
    +PKG_SOURCE:=$(PKG_NAME)-src-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.appwebserver.org/software/
    +PKG_MD5SUM:=060d43c8194fa6a119cada966fc807a7
    +
    +#
    +#	Build the latest snapshot from the default trunk
    +#
    +#PKG_VERSION:=default
    +#PKG_SOURCE:=tip.tar.gz
    +#PKG_SOURCE_URL:= http://hg.embedthis.com/appweb/archive/
    +#PKG_MD5SUM:=
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/appweb
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Web Servers/Proxies
    +  TITLE:=Appweb Web Server
    +  URL:=http://www.appwebserver.org/
    +  DEPENDS:=@!avr32 +libpthread
    +endef
    +
    +define Package/appweb/description
    + Appweb is a powerful, compact embedded web server designed for dynamic web
    + applications.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	-q --defaults=release --shared --tune=size --without-php \
    +	--without-ssl --disable-angel --disable-samples --disable-access-log \
    +	--disable-complete-native --disable-complete-cross --webdir=/www \
    +	--logdir=/var/log --port=8000 --sslPort=8443 --config=flat
    +
    +define Build/Prepare
    +	tar xzf "$(DL_DIR)/$(PKG_SOURCE)" --strip-components 1 -C "$(PKG_BUILD_DIR)"
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS)
    +endef
    +
    +define Package/appweb/install
    +	( cd $(PKG_BUILD_DIR) ; $(PKG_BUILD_DIR)/build/bin/makeInstall \
    +		--root=$(1) --install --with-openwrt=1 binary )
    +	rm -rf $(1)/var
    +endef
    +
    +$(eval $(call BuildPackage,appweb))
    diff --git a/net/aprx/Makefile b/net/aprx/Makefile
    new file mode 100644
    index 0000000..6a38e75
    --- /dev/null
    +++ b/net/aprx/Makefile
    @@ -0,0 +1,48 @@
    +#
    +# Copyright (C) 2008-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=aprx
    +PKG_REV:=421
    +PKG_VERSION:=2.00_r$(PKG_REV)
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://repo.ham.fi/svn/aprx/trunk/
    +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
    +PKG_SOURCE_VERSION:=$(PKG_REV)
    +PKG_SOURCE_PROTO:=svn
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/aprx
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=APRS RX only I-gate
    +  URL:=http://ham.zmailer.org/oh2mqk/aprx/
    +endef
    +
    +define Package/aprx/description
    +	This daemon listens for traffic on the specified serial interfaces.
    +	It then forwards appropriate packets to APRS-IS servers.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--with-embedded \
    +
    +define Package/aprx/install
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/aprx.init $(1)/etc/init.d/aprx
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_CONF) $(PKG_BUILD_DIR)/aprx.conf $(1)/etc/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/aprx $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/aprx-stat $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,aprx))
    diff --git a/net/aprx/files/aprx.init b/net/aprx/files/aprx.init
    new file mode 100644
    index 0000000..e2dcd89
    --- /dev/null
    +++ b/net/aprx/files/aprx.init
    @@ -0,0 +1,23 @@
    +#!/bin/sh /etc/rc.common
    +#Init script for aprx
    +
    +START=99
    +APRX_BIN="/usr/sbin/aprx"
    +APRX_LOG_DIR="/var/log/aprx"
    +
    +system_config() {
    +	local cfg="$1"
    +
    +	config_get hostname "$cfg" hostname
    +}
    +
    +
    +start() {
    +	[ -x "$APRX_BIN" ] || return 1
    +	[ -d "$APRX_LOG_DIR" ] || mkdir -p $APRX_LOG_DIR
    +	$APRX_BIN
    +	}
    +
    +stop() {
    +	killall aprx
    +}
    diff --git a/net/aprx/patches/100-Makefile_in.patch b/net/aprx/patches/100-Makefile_in.patch
    new file mode 100644
    index 0000000..cb06f79
    --- /dev/null
    +++ b/net/aprx/patches/100-Makefile_in.patch
    @@ -0,0 +1,27 @@
    +diff -ruN aprx-2.00_r421.orig/Makefile.in aprx-2.00_r421/Makefile.in
    +--- aprx-2.00_r421.orig/Makefile.in	2010-06-19 15:13:47.000000000 +0000
    ++++ aprx-2.00_r421/Makefile.in	2010-08-22 00:14:35.000000000 +0000
    +@@ -27,8 +27,9 @@
    + CFLAGS=		@CFLAGS@
    + 
    + # Linker and flags
    +-LD=		@LD@
    ++LD=		@CC@
    + LDFLAGS=	@LDFLAGS@ $(PROF)
    ++datarootdir = @datarootdir@
    + 
    + INSTALL=	$(srcdir)/install-sh
    + INSTALL_PROGRAM=$(INSTALL)  -m 755
    +@@ -89,10 +90,10 @@
    + 
    + 
    + $(PROGAPRX):	$(OBJSAPRX) VERSION Makefile
    +-		$(LD) $(LDFLAGS) -o $@ $(OBJSAPRX) $(LIBS)
    ++		$(CC) $(CFLAGS) -o $@ $(OBJSAPRX) $(LIBS)
    + 
    + $(PROGSTAT):	$(OBJSSTAT) VERSION Makefile
    +-		$(LD) $(LDFLAGS) -o $@ $(OBJSSTAT) $(LIBS)
    ++		$(CC) $(CFLAGS) -o $@ $(OBJSSTAT) $(LIBS)
    + 
    + .PHONY:		man
    + man:		$(MAN)
    diff --git a/net/arpd/Makefile b/net/arpd/Makefile
    new file mode 100644
    index 0000000..8cf7327
    --- /dev/null
    +++ b/net/arpd/Makefile
    @@ -0,0 +1,54 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=arpd
    +PKG_VERSION:=0.2
    +PKG_RELEASE:=2
    +
    +PKG_MD5SUM:=e2911fa9de1b92ef50deda1489ae944d
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://niels.xtdnet.nl/honeyd
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/arpd
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libpcap +libdnet +libevent +librt
    +  TITLE:=A daemon to fake ARP replies
    +  URL:=http://niels.xtdnet.nl/honeyd/
    +endef
    +
    +define Build/Configure
    +        (cd $(PKG_BUILD_DIR); touch \
    +		stamp-h.in \
    +		config.h.in \
    +	);
    +	$(call Build/Configure/Default, \
    +		--with-libdnet="$(STAGING_DIR)/usr" \
    +		--with-libevent="$(STAGING_DIR)/usr" \
    +		--with-libpcap="$(STAGING_DIR)/usr" \
    +	)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		CCOPT="$(TARGET_CFLAGS)" \
    +		INCLS="-I. $(TARGET_CPPFLAGS)" \
    +		LIBS="$(TARGET_LDFLAGS) -lpcap -ldnet -levent"
    +endef
    +
    +define Package/arpd/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/arpd $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,arpd))
    diff --git a/net/arpd/patches/001-configure_no_bpf.patch b/net/arpd/patches/001-configure_no_bpf.patch
    new file mode 100644
    index 0000000..7113b45
    --- /dev/null
    +++ b/net/arpd/patches/001-configure_no_bpf.patch
    @@ -0,0 +1,12 @@
    +--- a/configure
    ++++ b/configure
    +@@ -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/net/arpd/patches/002-function_string.patch b/net/arpd/patches/002-function_string.patch
    new file mode 100644
    index 0000000..c2a3b41
    --- /dev/null
    +++ b/net/arpd/patches/002-function_string.patch
    @@ -0,0 +1,42 @@
    +--- a/arpd.c
    ++++ b/arpd.c
    +@@ -265,7 +265,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 +282,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 +291,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 +423,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 */
    diff --git a/net/arpd/patches/003-pcap_and_arg.patch b/net/arpd/patches/003-pcap_and_arg.patch
    new file mode 100644
    index 0000000..c48b8f4
    --- /dev/null
    +++ b/net/arpd/patches/003-pcap_and_arg.patch
    @@ -0,0 +1,76 @@
    +--- a/arpd.c
    ++++ b/arpd.c
    +@@ -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);
    +@@ -465,14 +469,15 @@ 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;
    ++	and_pcap_exp = 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 +485,9 @@ main(int argc, char *argv[])
    + 		case 'i':
    + 			dev = optarg;
    + 			break;
    ++		case 'a':
    ++			and_pcap_exp = optarg;
    ++			break;
    + 		default:
    + 			usage();
    + 			break;
    +@@ -489,9 +497,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/net/arpd/patches/004-no_dnet_config_check.patch b/net/arpd/patches/004-no_dnet_config_check.patch
    new file mode 100644
    index 0000000..c3ebc12
    --- /dev/null
    +++ b/net/arpd/patches/004-no_dnet_config_check.patch
    @@ -0,0 +1,12 @@
    +--- a/configure
    ++++ b/configure
    +@@ -2170,8 +2170,7 @@ echo "${ECHO_T}$withval" >&6
    +         DNETLIB="`$withval/bin/dnet-config --libs`"
    +      else
    +         { { echo "$as_me:2172: error: dnet-config not found in $withval/bin" >&5
    +-echo "$as_me: error: dnet-config not found in $withval/bin" >&2;}
    +-   { (exit 1); exit 1; }; }
    ++echo "$as_me: error: dnet-config not found in $withval/bin" >&2;} }
    +      fi
    +      ;;
    +   esac
    diff --git a/net/arpd/patches/005-remove-dropped-libevent-features.patch b/net/arpd/patches/005-remove-dropped-libevent-features.patch
    new file mode 100644
    index 0000000..0936345
    --- /dev/null
    +++ b/net/arpd/patches/005-remove-dropped-libevent-features.patch
    @@ -0,0 +1,29 @@
    +--- a/arpd.c
    ++++ b/arpd.c
    +@@ -449,9 +449,6 @@ arpd_recv(int fd, short type, void *ev)
    + void
    + terminate_handler(int sig)
    + {
    +-	extern int event_gotsig;
    +-
    +-	event_gotsig = 1;
    + 	arpd_sig = sig;
    + }
    + 
    +@@ -468,7 +465,6 @@ int
    + main(int argc, char *argv[])
    + {
    + 	struct event recv_ev;
    +-	extern int (*event_sigcb)(void);
    + 	char *dev, *and_pcap_exp;
    + 	int c, debug;
    + 	FILE *fp;
    +@@ -532,8 +528,6 @@ main(int argc, char *argv[])
    + 		perror("signal");
    + 		return (-1);
    + 	}
    +-	event_sigcb = arpd_signal;
    +-	
    + 	event_dispatch();
    + 
    + 	return (0);
    diff --git a/net/arpwatch/Makefile b/net/arpwatch/Makefile
    new file mode 100644
    index 0000000..fe981fe
    --- /dev/null
    +++ b/net/arpwatch/Makefile
    @@ -0,0 +1,62 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=arpwatch
    +PKG_VERSION:=2.1a15
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=ftp://ftp.free.fr/.mirrors1/ftp.gentoo.org/distfiles/
    +PKG_MD5SUM:=cebfeb99c4a7c2a6cee2564770415fe7
    +
    +# use a subdirectory to prevent configure for finding libpcap build dir
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/arpwatch
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libpcap
    +  TITLE:=Ethernet station activity monitor
    +  URL:=http://www-nrg.ee.lbl.gov/
    +endef
    +
    +define Package/arpwatch/description
    +	Ethernet monitor program for keeping track of ethernet/ip address
    +	pairings.
    +endef
    +
    +define Package/arpwatch/conffiles
    +/etc/arpwatch/arp.dat
    +endef
    +
    +define Build/Prepare
    +	$(call Build/Prepare/Default)
    +	chmod -R u+w $(PKG_BUILD_DIR)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		ARPDIR=/etc/arpwatch \
    +		CCOPT="$(TARGET_CFLAGS)" \
    +		INCLS="-I. $(TARGET_CPPFLAGS)" \
    +		LIBS="$(TARGET_LDFLAGS) -lpcap"
    +endef
    +
    +define Package/arpwatch/install
    +	$(INSTALL_DIR) $(1)/etc/arpwatch
    +	$(CP) $(PKG_BUILD_DIR)/arp.dat $(1)/etc/arpwatch/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/arp{watch,snmp} $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/arpwatch.init $(1)/etc/init.d/arpwatch
    +endef
    +
    +$(eval $(call BuildPackage,arpwatch))
    diff --git a/net/arpwatch/files/arpwatch.init b/net/arpwatch/files/arpwatch.init
    new file mode 100644
    index 0000000..56d13e3
    --- /dev/null
    +++ b/net/arpwatch/files/arpwatch.init
    @@ -0,0 +1,10 @@
    +#!/bin/sh /etc/rc.common
    +START=90
    +
    +start () {
    +	arpwatch -f /etc/arpwatch/arp.dat -i br-lan
    +}
    +
    +stop() {
    +	killall arpwatch
    +}
    diff --git a/net/asterisk-1.8.x/Makefile b/net/asterisk-1.8.x/Makefile
    new file mode 100644
    index 0000000..8da1ac6
    --- /dev/null
    +++ b/net/asterisk-1.8.x/Makefile
    @@ -0,0 +1,564 @@
    +#
    +# Copyright (C) 2008-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=asterisk18
    +PKG_VERSION:=1.8.7.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/
    +PKG_MD5SUM:=a732a608ce60fd523646be618e9da616
    +
    +PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/asterisk18/Default
    +  SUBMENU:=Telephony
    +  SECTION:=net
    +  CATEGORY:=Network
    +  URL:=http://www.asterisk.org/
    +  MAINTAINER:=Hans Zandbelt 
    +endef
    +
    +define Package/asterisk18/Default/description
    + Asterisk is a complete PBX in software. It provides all of the features
    + you would expect from a PBX and more. Asterisk does voice over IP in three
    + protocols, and can interoperate with almost all standards-based telephony
    + equipment using relatively inexpensive hardware.
    +endef
    +
    +
    +define Package/asterisk18
    +$(call Package/asterisk18/Default)
    +  TITLE:=Complete open source PBX, v1.8x
    +  MENU:=1
    +  DEPENDS:= +libopenssl +libncurses +libpopt +libpthread +zlib @!TARGET_avr32
    +endef
    +
    +define Package/asterisk18/description
    +$(call Package/asterisk18/Default/description)
    +endef
    +
    +define Package/asterisk18-sounds
    +$(call Package/asterisk18/Default)
    +  TITLE:=Sound files
    +  DEPENDS:= asterisk18
    +endef
    +
    +define Package/asterisk18-sounds/description
    +$(call Package/asterisk18/Default/description)
    + This package contains sound files for Asterisk.
    +endef
    +
    +
    +define Package/asterisk18-voicemail
    +$(call Package/asterisk18/Default)
    +  TITLE:=Voicemail support
    +  DEPENDS:= asterisk18
    +endef
    +
    +define Package/asterisk18-voicemail/description
    +$(call Package/asterisk18/Default/description)
    + This package contains voicemail related modules for Asterisk.
    +endef
    +
    +define Package/asterisk18-app-meetme
    +$(call Package/asterisk18/Default)
    +  TITLE:=conferencing support
    +  DEPENDS:= asterisk18 +dahdi-tools-libtonezone +kmod-dahdi-linux
    +endef
    +
    +define Package/asterisk18-app-meetme/description
    +$(call Package/asterisk18/Default/description)
    + This package provides the MeetMe application driver Conferencing support to
    + Asterisk.
    +endef
    +
    +define Package/asterisk18-chan-iax2
    +$(call Package/asterisk18/Default)
    +  TITLE:=IAX support
    +  DEPENDS:= asterisk18 +asterisk18-res-crypto
    +endef
    +
    +define Package/asterisk18-chan-iax2/description
    +$(call Package/asterisk18/Default/description)
    + This package provides IAX support to
    + Asterisk.
    +endef
    +
    +define Package/asterisk18-cdr
    +$(call Package/asterisk18/Default)
    +  TITLE:=CDR support
    +  DEPENDS:= asterisk18
    +endef
    +
    +define Package/asterisk18-cdr/description
    +$(call Package/asterisk18/Default/description)
    + This package provides Call Detail Record support to
    + Asterisk.
    +endef
    +
    +define Package/asterisk18-res-musiconhold
    +$(call Package/asterisk18/Default)
    +  TITLE:=MOH support
    +  DEPENDS:= asterisk18
    +endef
    +
    +define Package/asterisk18-res-musiconhold/description
    +$(call Package/asterisk18/Default/description)
    + This package provides Music On Hold support to
    + Asterisk.
    +endef
    +
    +define Package/asterisk18-chan-gtalk
    +$(call Package/asterisk18/Default)
    +  TITLE:=GTalk support
    +  DEPENDS:= asterisk18 +libiksemel
    +endef
    +
    +define Package/asterisk18-chan-gtalk/description
    +$(call Package/asterisk18/Default/description)
    + This package provides the channel chan_gtalk and res_jabber for GTalk
    + support to Asterisk.
    +endef
    +
    +define Package/asterisk18-chan-mobile
    +$(call Package/asterisk18/Default)
    +  TITLE:=Mobile channel support
    +  DEPENDS:= asterisk18 +bluez-libs
    +endef
    +
    +define Package/asterisk18-chan-mobile/description
    +$(call Package/asterisk18/Default/description)
    + This package provides the channel chan_mobile support to Asterisk.
    +endef
    +
    +define Package/asterisk18-chan-mgcp
    +$(call Package/asterisk18/Default)
    +  TITLE:=MGCP channel support
    +  DEPENDS:= asterisk18
    +endef
    +
    +define Package/asterisk18-chan-mgcp/description
    +$(call Package/asterisk18/Default/description)
    + This package provides the channel chan_mgcp support to Asterisk.
    +endef
    +
    +define Package/asterisk18-chan-skinny
    +$(call Package/asterisk18/Default)
    +  TITLE:=Skinny channel support
    +  DEPENDS:= asterisk18
    +endef
    +
    +define Package/asterisk18-chan-skinny/description
    +$(call Package/asterisk18/Default/description)
    + This package provides the channel chan_skinny support to Asterisk.
    +endef
    +
    +define Package/asterisk18-curl
    +$(call Package/asterisk18/Default)
    +  TITLE:=CURL support
    +  DEPENDS:= asterisk18 +libcurl
    +endef
    +
    +define Package/asterisk18-curl/description
    +$(call Package/asterisk18/Default/description)
    + This package provides CURL
    + support to Asterisk.
    +endef
    +
    +define Package/asterisk18-mysql
    +$(call Package/asterisk18/Default)
    +  TITLE:=MySQL support
    +  DEPENDS:= asterisk18 +PACKAGE_asterisk18-mysql:libmysqlclient
    +endef
    +
    +define Package/asterisk18-mysql/description
    +$(call Package/asterisk18/Default/description)
    + This package provides MySQL
    + support to Asterisk.
    +endef
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-app-meetme),)
    +  CONFIGURE_ARGS+= \
    +	--with-dahdi="$(STAGING_DIR)/usr"
    +else
    +  CONFIGURE_ARGS+= \
    +	--without-dahdi
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-chan-gtalk),)
    +  CONFIGURE_ARGS+= \
    +	--with-gnutls="$(STAGING_DIR)/usr" \
    +	--with-iksemel="$(STAGING_DIR)/usr"
    +  SITE_VARS+= \
    +	ac_cv_lib_iksemel_iks_start_sasl=yes \
    +	ac_cv_lib_gnutls_gnutls_bye=yes
    +else
    +  CONFIGURE_ARGS+= \
    +	--without-gnutls \
    +	--without-iksemel
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-curl),)
    +  CONFIGURE_ARGS+= \
    +	--with-curl="$(STAGING_DIR)/usr"
    +else
    +  CONFIGURE_ARGS+= \
    +	--without-curl
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mysql),)
    +  CONFIGURE_ARGS+= \
    +	--with-mysqlclient="$(STAGING_DIR)/usr/bin"
    +else
    +  CONFIGURE_ARGS+= \
    +	--without-mysqlclient
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-chan-mobile),)
    +  CONFIGURE_ARGS+= \
    +	--with-bluetooth="$(STAGING_DIR)/usr"
    +else
    +  CONFIGURE_ARGS+= \
    +	--without-bluetooth
    +endif
    +
    +CONFIGURE_ARGS+= \
    +	--without-curses \
    +	--with-gsm=internal \
    +	--without-gtk \
    +	--without-gtk2 \
    +	--without-isdnnet \
    +	--without-kde \
    +	--without-misdn \
    +	--without-nbs \
    +	--with-ncurses="$(STAGING_DIR)/usr" \
    +	--without-netsnmp \
    +	--without-newt \
    +	--without-odbc \
    +	--without-ogg \
    +	--without-osptk \
    +	--with-popt="$(STAGING_DIR)/usr" \
    +	--without-pri \
    +	--without-qt \
    +	--without-radius \
    +	--without-sdl \
    +	--without-spandsp \
    +	--without-suppserv \
    +	--without-tds \
    +	--without-termcap \
    +	--without-tinfo \
    +	--without-vorbis \
    +	--without-vpb \
    +	--with-z="$(STAGING_DIR)/usr" \
    +	--with-sounds-cache="$(DL_DIR)" \
    +	--disable-xmldoc
    +
    +EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
    +EXTRA_LDFLAGS+= $(TARGET_LDFLAGS)
    +
    +define Build/Configure
    +	$(call Build/Configure/Default,,$(SITE_VARS))
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C "$(PKG_BUILD_DIR)" \
    +		include/asterisk/version.h \
    +		include/asterisk/buildopts.h defaults.h \
    +		makeopts.embed_rules
    +	ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
    +	ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
    +	$(MAKE) -C "$(PKG_BUILD_DIR)" \
    +		ASTVARLIBDIR="/usr/lib/asterisk" \
    +		ASTDATADIR="/usr/lib/asterisk" \
    +		ASTKEYDIR="/usr/lib/asterisk" \
    +		ASTDBDIR="/usr/lib/asterisk" \
    +		NOISY_BUILD="1" \
    +		DEBUG="" \
    +		OPTIMIZE="" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all install samples
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/asterisk-1.8/include/asterisk/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk-1.8/include/asterisk/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/asterisk-1.8/include/
    +endef
    +
    +define Package/asterisk18/conffiles
    +/etc/asterisk/asterisk.conf
    +/etc/asterisk/modules.conf
    +/etc/asterisk/extensions.conf
    +/etc/asterisk/sip.conf
    +/etc/asterisk/sip_notify.conf
    +/etc/asterisk/features.conf
    +/etc/asterisk/indications.conf
    +/etc/asterisk/logger.conf
    +/etc/asterisk/manager.conf
    +/etc/asterisk/rtp.conf
    +/etc/default/asterisk
    +/etc/init.d/asterisk
    +endef
    +
    +define Package/asterisk18/install
    +	$(INSTALL_DIR) $(1)/etc/asterisk
    +	for f in asterisk extensions features \
    +		indications logger manager modules \
    +		sip sip_notify rtp; do \
    +		$(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$$$f.conf $(1)/etc/asterisk/ ; \
    +	done
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
    +	for f in app_dial app_echo app_playback app_macro \
    +		chan_sip res_rtp_asterisk res_rtp_multicast \
    +		codec_ulaw codec_gsm \
    +		format_gsm format_pcm format_wav format_wav_gsm \
    +		pbx_config \
    +		func_strings func_timeout func_callerid func_logic; do \
    +		$(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$$$f.so $(1)/usr/lib/asterisk/modules/ ; \
    +	done
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc/default
    +	$(INSTALL_DATA)  ./files/asterisk.default $(1)/etc/default/asterisk
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN)  ./files/asterisk.init $(1)/etc/init.d/asterisk
    +endef
    +
    +define Package/asterisk18-sounds/install
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/* $(1)/usr/lib/asterisk/sounds/
    +	rm -f $(1)/usr/lib/asterisk/sounds/vm-*
    +	rm -f $(1)/usr/lib/asterisk/sounds/conf-*
    +endef
    +
    +
    +define Package/asterisk18-voicemail/conffiles
    +/etc/asterisk/voicemail.conf
    +endef
    +
    +define Package/asterisk18-voicemail/install
    +	$(INSTALL_DIR) $(1)/etc/asterisk
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/voicemail.conf $(1)/etc/asterisk/
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*voicemail.so $(1)/usr/lib/asterisk/modules/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_adsi.so $(1)/usr/lib/asterisk/modules/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_smdi.so $(1)/usr/lib/asterisk/modules/
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/vm-*.gsm $(1)/usr/lib/asterisk/sounds/
    +endef
    +
    +define Package/asterisk18-app-meetme/conffiles
    +/etc/asterisk/meetme.conf
    +endef
    +
    +define Package/asterisk18-app-meetme/install
    +	$(INSTALL_DIR) $(1)/etc/asterisk
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/meetme.conf $(1)/etc/asterisk/
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_meetme.so $(1)/usr/lib/asterisk/modules/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_dahdi.so $(1)/usr/lib/asterisk/modules/
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/conf-*.gsm $(1)/usr/lib/asterisk/sounds/
    +endef
    +
    +define Package/asterisk18-chan-iax2/conffiles
    +/etc/asterisk/iax.conf
    +/etc/asterisk/iaxprov.conf
    +endef
    +
    +define Package/asterisk18-cdr/conffiles
    +/etc/asterisk/cdr.conf
    +/etc/asterisk/cdr_custom.conf
    +/etc/asterisk/cdr_manager.conf
    +/etc/asterisk/cdr_odbc.conf
    +/etc/asterisk/cdr_pgsql.conf
    +/etc/asterisk/cdr_tds.conf
    +endef
    +
    +define Package/asterisk18-res-musiconhold/conffiles
    +/etc/asterisk/musiconhold.conf
    +endef
    +
    +define Package/asterisk18-chan-iax2/install
    +	$(INSTALL_DIR) $(1)/etc/asterisk
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iax.conf $(1)/etc/asterisk/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iaxprov.conf $(1)/etc/asterisk/
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_iax2.so $(1)/usr/lib/asterisk/modules/
    +endef
    +
    +define Package/asterisk18-cdr/install
    +	$(INSTALL_DIR) $(1)/etc/asterisk
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/cdr*.conf $(1)/etc/asterisk/
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*cdr*.so $(1)/usr/lib/asterisk/modules/
    +endef
    +
    +define Package/asterisk18-res-musiconhold/install
    +	$(INSTALL_DIR) $(1)/etc/asterisk
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf $(1)/etc/asterisk/
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_musiconhold.so $(1)/usr/lib/asterisk/modules/
    +endef
    +
    +define Package/asterisk18-chan-gtalk/conffiles
    +/etc/asterisk/gtalk.conf
    +/etc/asterisk/jabber.conf
    +endef
    +
    +define Package/asterisk18-chan-gtalk/install
    +	$(INSTALL_DIR) $(1)/etc/asterisk
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/gtalk.conf $(1)/etc/asterisk/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/jabber.conf $(1)/etc/asterisk/
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_gtalk.so $(1)/usr/lib/asterisk/modules/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_jabber.so $(1)/usr/lib/asterisk/modules/
    +endef
    +
    +define Package/asterisk18-chan-mobile/conffiles
    +/etc/asterisk/chan_mobile.conf
    +endef
    +
    +define Package/asterisk18-chan-mobile/install
    +	$(INSTALL_DIR) $(1)/etc/asterisk
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/chan_mobile.conf $(1)/etc/asterisk/
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mobile.so $(1)/usr/lib/asterisk/modules/
    +endef
    +
    +define Package/asterisk18-chan-mgcp/conffiles
    +/etc/asterisk/mgcp.conf
    +endef
    +
    +define Package/asterisk18-chan-mgcp/install
    +	$(INSTALL_DIR) $(1)/etc/asterisk
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/mgcp.conf $(1)/etc/asterisk/
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mgcp.so $(1)/usr/lib/asterisk/modules/
    +endef
    +
    +define Package/asterisk18-chan-skinny/conffiles
    +/etc/asterisk/skinny.conf
    +endef
    +
    +define Package/asterisk18-chan-skinny/install
    +	$(INSTALL_DIR) $(1)/etc/asterisk
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/skinny.conf $(1)/etc/asterisk/
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_skinny.so $(1)/usr/lib/asterisk/modules/
    +endef
    +
    +define Package/asterisk18-curl/install
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/func_curl.so $(1)/usr/lib/asterisk/modules/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_curl.so $(1)/usr/lib/asterisk/modules/
    +endef
    +
    +define Package/asterisk18-mysql/conffiles
    +/etc/asterisk/app_mysql.conf
    +/etc/asterisk/res_config_mysql.conf
    +/etc/asterisk/cdr_mysql.conf
    +endef
    +
    +define Package/asterisk18-mysql/install
    +	$(INSTALL_DIR) $(1)/etc/asterisk
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/app_mysql.conf $(1)/etc/asterisk/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/res_config_mysql.conf $(1)/etc/asterisk/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/cdr_mysql.conf $(1)/etc/asterisk/
    +	$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_mysql.so $(1)/usr/lib/asterisk/modules/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/cdr_mysql.so $(1)/usr/lib/asterisk/modules/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_config_mysql.so $(1)/usr/lib/asterisk/modules/
    +endef
    +
    +define Buildasterisk18ModuleTemplate
    +
    +  define Package/asterisk18-$(subst _,-,$(1))
    +  $$(call Package/asterisk18/Default)
    +    TITLE:=$(2) support
    +    DEPENDS:= asterisk18 $(4)
    +  endef
    +
    +  define Package/asterisk18-$(subst _,-,$(1))/description
    +  $$(call Package/asterisk18/Default/description)
    +    This package provides support $(3) in Asterisk.
    +  endef
    +
    +  define Package/asterisk18-$(subst _,-,$(1))/install
    +	$(INSTALL_DIR) $$(1)/usr/lib/asterisk/modules
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$(1).so $$(1)/usr/lib/asterisk/modules/
    +  endef
    +
    +  $$(eval $$(call BuildPackage,asterisk18-$(subst _,-,$(1))))
    +endef
    +
    +$(eval $(call BuildPackage,asterisk18))
    +$(eval $(call BuildPackage,asterisk18-voicemail))
    +$(eval $(call BuildPackage,asterisk18-sounds))
    +#$(eval $(call BuildPackage,asterisk18-app-meetme))
    +$(eval $(call BuildPackage,asterisk18-chan-iax2))
    +$(eval $(call BuildPackage,asterisk18-cdr))
    +$(eval $(call BuildPackage,asterisk18-res-musiconhold))
    +$(eval $(call BuildPackage,asterisk18-chan-gtalk))
    +$(eval $(call BuildPackage,asterisk18-chan-mobile))
    +$(eval $(call BuildPackage,asterisk18-chan-mgcp))
    +$(eval $(call BuildPackage,asterisk18-chan-skinny))
    +$(eval $(call BuildPackage,asterisk18-curl))
    +$(eval $(call BuildPackage,asterisk18-mysql))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_authenticate,Authenticate,support for executing arbitrary authenticate commands))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_chanisavail,Channel availability check,support for checking if a channel is available))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_chanspy,Channel listen in,support for listening in on any channel))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_directed_pickup,Directed call pickup,support for directed call pickup))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_exec,Exec application,support for application execution))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_minivm,Minimal voicemail system,a voicemail system in small building blocks working together based on the Comedian Mail voicemail system))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_readexten,Extension to variable,a trivial application to read an extension into a variable))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_read,Variable read,a trivial application to read a variable))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_sayunixtime,Say Unix time,an application to say Unix time))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_sms,SMS,SMS support (ETSI ES 201 912 protocol 1)))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_stack,Stack applications, stack applications Gosub Return etc., +asterisk18-res-agi))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_system,System exec,support for executing system commands))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_talkdetect,File playback with audio detect,for file playback with audio detect))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_waituntil,Sleep,support sleeping until the given epoch))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_while,While loop,a while loop implementation))
    +$(eval $(call Buildasterisk18ModuleTemplate,chan_agent,Agents proxy channel, an implementation of agents proxy channel))
    +$(eval $(call Buildasterisk18ModuleTemplate,chan_local,Local proxy channel, an implementation of local proxy channel))
    +$(eval $(call Buildasterisk18ModuleTemplate,codec_alaw,Signed linear to alaw translation,translation between signed linear and alaw codecs))
    +$(eval $(call Buildasterisk18ModuleTemplate,codec_a_mu,Alaw to ulaw translation,translation between alaw and ulaw codecs))
    +$(eval $(call Buildasterisk18ModuleTemplate,codec_g722,G.722,a high bit rate 48/56/64Kbps ITU standard codec))
    +$(eval $(call Buildasterisk18ModuleTemplate,codec_g726,Signed linear to G.726 translation,translation between signed linear and ITU G.726-32kbps codecs))
    +$(eval $(call Buildasterisk18ModuleTemplate,format_g726,G.726,support for headerless G.726 16/24/32/40kbps data format))
    +$(eval $(call Buildasterisk18ModuleTemplate,format_g729,G.729,support for raw headerless G729 data))
    +$(eval $(call Buildasterisk18ModuleTemplate,format_sln,Raw slinear format,support for raw slinear format))
    +$(eval $(call Buildasterisk18ModuleTemplate,format_sln16,Raw slinear 16 format,support for Raw slinear 16 format))
    +$(eval $(call Buildasterisk18ModuleTemplate,func_db,Database interaction,functions for interaction with the database))
    +$(eval $(call Buildasterisk18ModuleTemplate,func_devstate,Blinky lights control,functions for manually controlled blinky lights))
    +$(eval $(call Buildasterisk18ModuleTemplate,func_vmcount,vmcount dialplan,a vmcount dialplan function))
    +$(eval $(call Buildasterisk18ModuleTemplate,func_extstate,Hinted extension state,retrieving the state of a hinted extension for dialplan control))
    +$(eval $(call Buildasterisk18ModuleTemplate,func_global,Global variable,global variable dialplan functions))
    +$(eval $(call Buildasterisk18ModuleTemplate,func_shell,Shell,support for shell execution))
    +$(eval $(call Buildasterisk18ModuleTemplate,pbx_ael,Asterisk Extension Logic,support for symbolic Asterisk Extension Logic))
    +$(eval $(call Buildasterisk18ModuleTemplate,res_ael_share,Shareable AEL code,support for shareable AEL code mainly between internal and external modules))
    +$(eval $(call Buildasterisk18ModuleTemplate,pbx_spool,Call Spool,outgoing call spool support))
    +$(eval $(call Buildasterisk18ModuleTemplate,res_agi,Asterisk Gateway Interface,support for the Asterisk Gateway Interface extension))
    +$(eval $(call Buildasterisk18ModuleTemplate,res_crypto,Provide Crypto,Cryptographic Signature capability))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_alarmreceiver,Alarm receiver,Central Station Alarm receiver for Ademco Contact ID))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_setcallerid,Set callerid,support for setting callerid))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_verbose,Verbose logging,Verbose logging application))
    +$(eval $(call Buildasterisk18ModuleTemplate,func_channel,Channel info,Channel info dialplan function))
    +$(eval $(call Buildasterisk18ModuleTemplate,func_blacklist,Blacklist on callerid,looking up the callerid number and see if it is blacklisted))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_originate,Originate a call,originating an outbound call and connecting it to a specified extension or application))
    +$(eval $(call Buildasterisk18ModuleTemplate,func_uri,URI encoding and decoding,Encodes and decodes URI-safe strings))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_disa,Direct Inward System Access,Direct Inward System Access))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_senddtmf,Send DTMF digits,Sends arbitrary DTMF digits))
    +$(eval $(call Buildasterisk18ModuleTemplate,func_cut,CUT function,CUT function))
    +$(eval $(call Buildasterisk18ModuleTemplate,res_clioriginate,Calls via CLI,Originate calls via the CLI))
    +$(eval $(call Buildasterisk18ModuleTemplate,app_mixmonitor,Record a call and mix the audio,record a call and mix the audio during the recording))
    diff --git a/net/asterisk-1.8.x/files/asterisk.default b/net/asterisk-1.8.x/files/asterisk.default
    new file mode 100644
    index 0000000..9d046c4
    --- /dev/null
    +++ b/net/asterisk-1.8.x/files/asterisk.default
    @@ -0,0 +1,4 @@
    +## startup options for /etc/init.d/asterisk
    +
    +ENABLE_ASTERISK="yes"
    +OPTIONS=""
    diff --git a/net/asterisk-1.8.x/files/asterisk.init b/net/asterisk-1.8.x/files/asterisk.init
    new file mode 100644
    index 0000000..53bf4af
    --- /dev/null
    +++ b/net/asterisk-1.8.x/files/asterisk.init
    @@ -0,0 +1,21 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2008 OpenWrt.org
    +START=50 
    +
    +DEST=
    +DEFAULT=$DEST/etc/default/asterisk
    +OPTIONS=""
    +
    +start() {
    +	[ -f $DEFAULT ] && . $DEFAULT
    +	[ -d $DEST/var/run/asterisk ] || mkdir -p $DEST/var/run/asterisk
    +	[ -d $DEST/var/log/asterisk ] || mkdir -p $DEST/var/log/asterisk
    +	[ -d $DEST/var/spool/asterisk ] || mkdir -p $DEST/var/spool/asterisk
    +        [ -d /var/spool/asterisk ] || mkdir -p /var/spool/asterisk
    +        [ -h $DEST/usr/lib/asterisk/astdb ] || ln -sf /var/spool/asterisk/astdb $DEST/usr/lib/asterisk/astdb
    +	$DEST/usr/sbin/asterisk $OPTIONS
    +}
    +
    +stop() {
    +	[ -f $DEST/var/run/asterisk/asterisk.pid ] && kill $(cat $DEST/var/run/asterisk/asterisk.pid) >/dev/null 2>&1
    +}
    diff --git a/net/asterisk-1.8.x/patches/100-build_tools-iconv.patch b/net/asterisk-1.8.x/patches/100-build_tools-iconv.patch
    new file mode 100644
    index 0000000..d3cad82
    --- /dev/null
    +++ b/net/asterisk-1.8.x/patches/100-build_tools-iconv.patch
    @@ -0,0 +1,11 @@
    +--- a/build_tools/menuselect-deps.in
    ++++ b/build_tools/menuselect-deps.in
    +@@ -16,7 +16,7 @@ GTK2=@PBX_GTK2@
    + H323=@PBX_H323@
    + HOARD=@PBX_HOARD@
    + ICAL=@PBX_ICAL@
    +-ICONV=@PBX_ICONV@
    ++ICONV=0
    + IKSEMEL=@PBX_IKSEMEL@
    + IMAP_TK=@PBX_IMAP_TK@
    + IODBC=@PBX_IODBC@
    diff --git a/net/asterisk-1.8.x/patches/200-addons-defaultenable.patch b/net/asterisk-1.8.x/patches/200-addons-defaultenable.patch
    new file mode 100644
    index 0000000..bae44fe
    --- /dev/null
    +++ b/net/asterisk-1.8.x/patches/200-addons-defaultenable.patch
    @@ -0,0 +1,66 @@
    +--- a/addons/app_mysql.c
    ++++ b/addons/app_mysql.c
    +@@ -25,7 +25,7 @@
    + 
    + /*** MODULEINFO
    + 	mysqlclient
    +-	no
    ++	yes
    + 	deprecated
    + 	func_odbc
    +  ***/
    +--- a/addons/app_saycountpl.c
    ++++ b/addons/app_saycountpl.c
    +@@ -21,7 +21,7 @@
    +  */
    + 
    + /*** MODULEINFO
    +-	no
    ++	yes
    + 	deprecated
    + 	say.conf
    +  ***/
    +--- a/addons/cdr_mysql.c
    ++++ b/addons/cdr_mysql.c
    +@@ -35,7 +35,7 @@
    + 
    + /*** MODULEINFO
    + 	mysqlclient
    +-	no
    ++	yes
    + 	deprecated
    + 	cdr_adaptive_odbc
    +  ***/
    +--- a/addons/chan_mobile.c
    ++++ b/addons/chan_mobile.c
    +@@ -27,7 +27,7 @@
    + 
    + /*** MODULEINFO
    + 	bluetooth
    +-	no
    ++	yes
    + 	extended
    +  ***/
    + 
    +--- a/addons/chan_ooh323.c
    ++++ b/addons/chan_ooh323.c
    +@@ -18,7 +18,7 @@
    + 
    + 
    + /*** MODULEINFO
    +-	no
    ++	yes
    + 	extended
    +  ***/
    + 
    +--- a/addons/res_config_mysql.c
    ++++ b/addons/res_config_mysql.c
    +@@ -24,7 +24,7 @@
    + 
    + /*** MODULEINFO
    + 	mysqlclient
    +-	no
    ++	yes
    + 	extended
    +  ***/
    + 
    diff --git a/net/asterisk-1.8.x/patches/300-word_alignment_arm.patch b/net/asterisk-1.8.x/patches/300-word_alignment_arm.patch
    new file mode 100644
    index 0000000..cc638b3
    --- /dev/null
    +++ b/net/asterisk-1.8.x/patches/300-word_alignment_arm.patch
    @@ -0,0 +1,20 @@
    +--- a/main/utils.c
    ++++ b/main/utils.c
    +@@ -1666,7 +1666,7 @@ ast_string_field __ast_string_field_allo
    + 	}
    + 
    + 	result = (*pool_head)->base + (*pool_head)->used;
    +-#ifdef __sparc__
    ++#if defined(__sparc__) || defined(__arm__)
    + 	/* SPARC requires that the allocation field be aligned. */
    + 	if ((long) result % sizeof(ast_string_field_allocation)) {
    + 		result++;
    +@@ -1747,7 +1747,7 @@ void __ast_string_field_ptr_build_va(str
    + 		}
    + 	} else {
    + 		target = (*pool_head)->base + (*pool_head)->used + sizeof(ast_string_field_allocation);
    +-#ifdef __sparc__
    ++#if defined(__sparc__) || defined(__arm__)
    + 		if ((long) target % sizeof(ast_string_field_allocation)) {
    + 			target++;
    + 			space--;
    diff --git a/net/asterisk-1.8.x/patches/400-gtalk.patch b/net/asterisk-1.8.x/patches/400-gtalk.patch
    new file mode 100644
    index 0000000..d5dbfc9
    --- /dev/null
    +++ b/net/asterisk-1.8.x/patches/400-gtalk.patch
    @@ -0,0 +1,12 @@
    +--- a/channels/chan_gtalk.c
    ++++ b/channels/chan_gtalk.c
    +@@ -481,7 +481,8 @@ static int gtalk_ringing_ack(void *data,
    + 				break;
    + 			}
    + 			if (!strcasecmp(name, "error") &&
    +-				(redirect = iks_find_cdata(traversenodes, "redirect")) &&
    ++				( (redirect = iks_find_cdata(traversenodes, "redirect")) ||
    ++				  (redirect = iks_find_cdata(traversenodes, "sta:redirect")) ) &&
    + 				(redirect = strstr(redirect, "xmpp:"))) {
    + 				redirect += 5;
    + 				ast_log(LOG_DEBUG, "redirect %s\n", redirect);
    diff --git a/net/atftp/Makefile b/net/atftp/Makefile
    new file mode 100644
    index 0000000..e56a5f6
    --- /dev/null
    +++ b/net/atftp/Makefile
    @@ -0,0 +1,60 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=atftp
    +PKG_VERSION:=0.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/
    +PKG_MD5SUM:=3b27365772d918050b2251d98a9c7c82
    +
    +PKG_BUILD_DEPENDS:=libncurses libpcre libreadline
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/atftp/Default
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=TFTP
    +  SUBMENU:=File Transfer
    +endef
    +
    +define Package/atftp
    +  $(call Package/atftp/Default)
    +  DEPENDS:=+libreadline +libncurses
    +  TITLE+= client
    +endef
    +
    +define Package/atftpd
    +  $(call Package/atftp/Default)
    +  DEPENDS:=+libpcre +libpthread
    +  TITLE+= server
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--disable-libwrap 
    +
    +MAKE_FLAGS += \
    +	CFLAGS="$(TARGET_CFLAGS) -Wall -D_REENTRANT" \
    +	all
    +
    +define Package/atftp/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/atftp $(1)/usr/sbin/
    +endef
    +
    +define Package/atftpd/install
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/atftpd $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,atftp))
    +$(eval $(call BuildPackage,atftpd))
    diff --git a/net/atftp/patches/100-mconfig.patch b/net/atftp/patches/100-mconfig.patch
    new file mode 100644
    index 0000000..01c1e36
    --- /dev/null
    +++ b/net/atftp/patches/100-mconfig.patch
    @@ -0,0 +1,21 @@
    +Index: atftp-0.7/MCONFIG
    +===================================================================
    +--- /dev/null	1970-01-01 00:00:00.000000000 +0000
    ++++ atftp-0.7/MCONFIG	2007-08-02 23:04:23.000000000 +0200
    +@@ -0,0 +1,16 @@
    ++# Generated by configure (confgen version 2) on Sun Jun 19 21:13:24 CEST 2005
    ++#
    ++
    ++BINDIR=/usr/bin
    ++SBINDIR=/usr/sbin
    ++MANDIR=/usr/man
    ++BINMODE=755
    ++DAEMONMODE=755
    ++MANMODE=644
    ++PREFIX=/usr
    ++EXECPREFIX=/usr
    ++INSTALLROOT=
    ++CC=
    ++CFLAGS=
    ++LDFLAGS=
    ++LIBS=
    diff --git a/net/atftp/patches/110-services.patch b/net/atftp/patches/110-services.patch
    new file mode 100644
    index 0000000..ab3e1fb
    --- /dev/null
    +++ b/net/atftp/patches/110-services.patch
    @@ -0,0 +1,79 @@
    +Index: atftp-0.7/tftp.c
    +===================================================================
    +--- atftp-0.7.orig/tftp.c	2007-08-02 23:04:23.000000000 +0200
    ++++ atftp-0.7/tftp.c	2007-08-02 23:04:23.000000000 +0200
    +@@ -409,7 +409,7 @@
    + 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 @@
    +           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 @@
    +           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 @@
    +      /* 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;
    +Index: atftp-0.7/tftpd.c
    +===================================================================
    +--- atftp-0.7.orig/tftpd.c	2007-08-02 23:04:23.000000000 +0200
    ++++ atftp-0.7/tftpd.c	2007-08-02 23:04:23.000000000 +0200
    +@@ -230,14 +230,8 @@
    + 
    +           /* 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/net/atftp/patches/120-retry_setting.patch b/net/atftp/patches/120-retry_setting.patch
    new file mode 100644
    index 0000000..548090c
    --- /dev/null
    +++ b/net/atftp/patches/120-retry_setting.patch
    @@ -0,0 +1,121 @@
    +Index: atftp-0.7/tftp.c
    +===================================================================
    +--- atftp-0.7.orig/tftp.c	2007-08-02 23:04:23.000000000 +0200
    ++++ atftp-0.7/tftp.c	2007-08-02 23:04:23.000000000 +0200
    +@@ -967,6 +967,7 @@
    +           { "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'},
    +@@ -986,11 +987,16 @@
    +      };
    + 
    +      /* 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))
    +Index: atftp-0.7/tftp_def.c
    +===================================================================
    +--- atftp-0.7.orig/tftp_def.c	2007-08-02 23:04:23.000000000 +0200
    ++++ atftp-0.7/tftp_def.c	2007-08-02 23:04:23.000000000 +0200
    +@@ -37,6 +37,7 @@
    +      { "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}
    + };
    + 
    +Index: atftp-0.7/tftp_def.h
    +===================================================================
    +--- atftp-0.7.orig/tftp_def.h	2007-08-02 23:04:23.000000000 +0200
    ++++ atftp-0.7/tftp_def.h	2007-08-02 23:04:23.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
    +Index: atftp-0.7/tftp_file.c
    +===================================================================
    +--- atftp-0.7.orig/tftp_file.c	2007-08-02 23:04:23.000000000 +0200
    ++++ atftp-0.7/tftp_file.c	2007-08-02 23:04:23.000000000 +0200
    +@@ -123,6 +123,7 @@
    +      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 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 @@
    +                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 @@
    +                     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 @@
    +      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 @@
    +                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 @@
    +                     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/net/atftp/patches/130-missing_include.patch b/net/atftp/patches/130-missing_include.patch
    new file mode 100644
    index 0000000..d607d0e
    --- /dev/null
    +++ b/net/atftp/patches/130-missing_include.patch
    @@ -0,0 +1,21 @@
    +--- a/stats.c
    ++++ b/stats.c
    +@@ -18,6 +18,7 @@
    + 
    + #include 
    + #include 
    ++#include 
    + #include "tftp_def.h"
    + #include "stats.h"
    + #include "logger.h"
    +@@ -157,8 +158,8 @@
    + 
    +      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/net/autossh/Makefile b/net/autossh/Makefile
    new file mode 100644
    index 0000000..c207ffe
    --- /dev/null
    +++ b/net/autossh/Makefile
    @@ -0,0 +1,46 @@
    +#
    +# Copyright (C) 2006-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=autossh
    +PKG_VERSION:=1.4b
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
    +PKG_SOURCE_URL:=http://www.harding.motd.ca/autossh/
    +PKG_MD5SUM:=8f9aa006f6f69e912d3c2f504622d6f7
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/autossh
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=Autossh client
    +  URL:=http://www.harding.motd.ca/autossh/
    +  SUBMENU:=SSH
    +endef
    +
    +define Build/Compile
    +	$(call Build/Compile/Default, -f Makefile \
    +		CFLAGS="$(TARGET_CFLAGS) -Wall -D\"SSH_PATH=\\\"\$$$$(SSH)\\\"\" -D\"VER=\\\"\$$$$(VER)\\\"\"" \
    +		all \
    +	)
    +endef
    +
    +define Package/autossh/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/autossh $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/autossh.init $(1)/etc/init.d/autossh
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_DATA) ./files/autossh.config $(1)/etc/config/autossh
    +	$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
    +	$(INSTALL_DATA) ./files/autossh.hotplug $(1)/etc/hotplug.d/iface/20-autossh
    +endef
    +
    +$(eval $(call BuildPackage,autossh))
    diff --git a/net/autossh/files/autossh.config b/net/autossh/files/autossh.config
    new file mode 100644
    index 0000000..2e430a0
    --- /dev/null
    +++ b/net/autossh/files/autossh.config
    @@ -0,0 +1,4 @@
    +config autossh
    +	option ssh	'-i /etc/dropbear/id_rsa -N -T -R 2222:localhost:22 user@host'
    +	option monitorport	'20000'
    +	option poll	'600'
    diff --git a/net/autossh/files/autossh.hotplug b/net/autossh/files/autossh.hotplug
    new file mode 100644
    index 0000000..4f695f4
    --- /dev/null
    +++ b/net/autossh/files/autossh.hotplug
    @@ -0,0 +1,14 @@
    +#!/bin/sh
    +# Copyright (C) 2007 OpenWrt.org
    +
    +/etc/init.d/autossh enabled && {
    +
    +	[ "$ACTION" = "ifup" ] && {
    +		/etc/init.d/autossh start
    +	}
    +
    +	[ "$ACTION" = "ifdown" ] && {
    +		/etc/init.d/autossh stop
    +	}
    +	
    +}
    diff --git a/net/autossh/files/autossh.init b/net/autossh/files/autossh.init
    new file mode 100644
    index 0000000..e873de8
    --- /dev/null
    +++ b/net/autossh/files/autossh.init
    @@ -0,0 +1,25 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2007 OpenWrt.org
    +START=80
    +
    +start_service () {
    +	local section="$1"
    +	config_get ssh "$section" ssh
    +	config_get monitorport "$section" monitorport
    +	config_get poll "$section" poll
    +
    +	AUTOSSH_POLL=${poll:-"600"} autossh -M ${monitorport:-"20000"} -f ${ssh}
    +}
    +
    +boot() {
    +	return
    +}
    +
    +start() {
    +	config_load "autossh"
    +	config_foreach start_service autossh
    +}
    +
    +stop() {
    +	killall autossh
    +}
    diff --git a/net/axel/Makefile b/net/axel/Makefile
    new file mode 100644
    index 0000000..fe00f32
    --- /dev/null
    +++ b/net/axel/Makefile
    @@ -0,0 +1,56 @@
    +#
    +# Copyright (C) 2010 Gianluigi Tiesi 
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=axel
    +PKG_VERSION:=2.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://alioth.debian.org/frs/download.php/3015
    +PKG_MD5SUM:=a2a762fce0c96781965c8f9786a3d09d
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/axel
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=File Transfer
    +  TITLE:=Axel Download Accelerator
    +  DEPENDS:=+libpthread
    +  URL:=http://axel.alioth.debian.org/
    +  MAINTAINER:=Gianluigi Tiesi 
    +endef
    +
    +define Package/axel/description
    +  Axel tries to accelerate HTTP/FTP downloading process by using multiple connections for one file.
    +  It can use multiple mirrors for a download. Axel has no dependencies and is lightweight,
    +  so it might be useful as a wget clone on byte-critical systems.
    +endef
    +
    +# notes:
    +#  - I'm using = and not += because it is not a standard configure script
    +#  - I ask not to strip, because it should be handled by the toolchain
    +CONFIGURE_ARGS =	\
    +	--prefix=/usr	\
    +	--etcdir=/etc	\
    +	--debug=0		\
    +	--i18n=0		\
    +	--strip=0
    +
    +define Package/axel/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/axel $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/axelrc.example $(1)/etc/axelrc
    +	echo "alternate_output = 1" >> $(1)/etc/axelrc
    +endef
    +
    +$(eval $(call BuildPackage,axel))
    diff --git a/net/babel/Makefile b/net/babel/Makefile
    new file mode 100644
    index 0000000..0eb8d2d
    --- /dev/null
    +++ b/net/babel/Makefile
    @@ -0,0 +1,59 @@
    +#
    +# Copyright (C) 2007-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=babeld
    +PKG_VERSION:=1.1.0
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/
    +PKG_MD5SUM:=0627cdc9a5ce77a032c4399c3fa64bd1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/babeld
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Routing and Redirection
    +  TITLE:=A loop-free distance-vector routing protocol
    +  URL:=http://www.pps.jussieu.fr/~jch/software/babel/
    +  MAINTAINER:=Gabriel Kerneis 
    +  DEPENDS:=+kmod-ipv6 +librt
    +endef
    +
    +define Package/babeld/description
    + Babel is a loop-avoiding distance-vector routing protocol roughly based
    + on DSDV and AODV, but with provisions for link cost estimation and
    + redistribution of routes from other routing protocols.
    + While it is optimised for wireless mesh networks, Babel will also work
    + efficiently on wired networks. It will generate between 1.2 and 2.4 times
    + the amount of routing traffic that RIPng would generate, while
    + never counting to infinity.
    +endef
    +
    +define Package/babeld/conffiles
    +/etc/babeld.conf
    +/etc/config/babeld
    +endef
    +
    +MAKE_FLAGS+= \
    +	CFLAGS="$(TARGET_CFLAGS)" \
    +
    +define Package/babeld/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/babeld $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_CONF) ./files/babeld.conf $(1)/etc/
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_CONF) ./files/babeld.config $(1)/etc/config/babeld
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/babeld.init $(1)/etc/init.d/babeld
    +endef
    +
    +$(eval $(call BuildPackage,babeld))
    diff --git a/net/babel/files/babeld.conf b/net/babel/files/babeld.conf
    new file mode 100644
    index 0000000..fd488f9
    --- /dev/null
    +++ b/net/babel/files/babeld.conf
    @@ -0,0 +1,40 @@
    +# babel config file
    +# Copyright (C) 2008-2010 Juliusz Chroboczek, L. Aaron Kaplan
    +#    , 
    +#
    +# This config file simply documents sample entries. 
    +# "redistribute" means: redistribute routes from other routing protocols
    +# into babel. "local" means addresses assigned to local interfaces.
    +#
    +# You do not need to edit this file: you can use /etc/config/babeld
    +# instead (sections "interface" and "filter").  Both files can be used
    +# simultaneously (the rules of this file are executed first).
    +
    +# the default rules are:
    +#
    +## redistribute local 
    +## redistribute deny
    +#
    +# this says, redistribute local addresses but no other routes
    +
    +
    +# redistribute IPv4 default route into babel 
    +## redistribute local ip 0.0.0.0/0 le 0 metric 128
    +
    +# same but for IPv6
    +## redistribute local ip ::/0 le 0 metric 128
    +
    +
    +# don't redistribute all local addresses, only selected ones
    +# after the first line, the "deny" rules kicks in. After the "deny"
    +# no redistribute local rules are going to match
    +## redistribute local ip 192.160.4.0/24 
    +## redistribute local deny
    +
    +
    +# Babel refuses to redistribute routes with a protocol number of "boot";
    +# this is standard practice, and means that you cannot easily
    +# redistribute the default route installed by dhcp.  It is however
    +# possible to redistribute such route by explicitly specifying "proto 3"
    +# on the redistribute line.
    +## redistribute ip 0.0.0.0/0 le 0 proto 3 metric 128
    diff --git a/net/babel/files/babeld.config b/net/babel/files/babeld.config
    new file mode 100644
    index 0000000..acc9e8a
    --- /dev/null
    +++ b/net/babel/files/babeld.config
    @@ -0,0 +1,70 @@
    +package babeld
    +
    +config general
    +	# option 'multicast_address' 'ff02:0:0:0:0:0:1:6'
    +	# option 'port' '6697'
    +	# option 'state_file' '/var/lib/babel-state'
    +	# option 'hello_interval' '4'
    +	# option 'wired_hello_interval' '20'
    +	# Enable  detection of idle networks.  This functonality is
    +	# experimental, don't use it unless you know what you are doing.
    +	## option 'idle_hello_interval' '0'
    +	# option 'kernel_priority' '0'
    +	# Do not use this option unless you know what you are doing, as it can
    +	# cause persistent route flapping.
    +	## option 'duplication_priority' '0'
    +	# option 'carrier_sense' 'false'
    +	# option 'assume_wireless' 'false'
    +	# option 'no_split_horizon' 'false'
    +	# option 'parasitic' 'false'
    +	# option 'debug' '0'
    +	# Listen for connections from a front-end, e.g. on port 33123.
    +	## option 'local_server' '33123'
    +	# Use the given kernel routing table for routes inserted by babeld.
    +	## option 'export_table' '0'
    +	# Export routes from the given kernel routing table.
    +	## option 'import_table' '0'
    +	# The configuration file is not necessary since you can do everything
    +	# from this file.
    +	# option 'conf_file' '/etc/babeld.conf'
    +	# option 'log_file' '/var/log/babeld.log'
    +
    +# You can use aliases (like lan, wlan) or real names (like eth0.0).
    +# If you use an alias, it must be already defined when babeld starts.
    +# Otherwise, the name is taken literally and the interface can be
    +# brought up later (useful for tunnels for instance).
    +config interface wlan
    +	# Remove this line to enable babeld on this interface
    +	option 'ignore' 'true'
    +	# option 'wired' 'auto'
    +	# option 'link_quality' 'auto'
    +	# option 'split_horizon' 'auto'
    +	# The default is 96 for wired interfaces, and 256 for wireless ones
    +	## option 'rxcost' '256'
    +	# The  default  is  specified with the -h and -H command-line flags.
    +	## option 'hello_interval' '4'
    +	# This can be set to a  fairly  large  value,  unless significant
    +	# packet loss is expected.  The default is four times the hello
    +	# interval.
    +	## option 'update_interval' '16'
    +
    +config interface lan
    +	option 'ignore' 'true'
    +
    +# A filter consists in a type ('in', 'out' or 'redistribute'), an action
    +# ('allow', 'deny' or 'metric xxx') and a set of selectors ('ip', 'eq',
    +# etc.).  See /etc/babeld.conf for more details.
    +# Here is a sample filter wich redistributes the default route if its
    +# protocol number is "boot", e.g. when it installed by dhcp.  It is
    +# disabled by default.
    +config filter
    +	option 'ignore' 'true'
    +	# Type
    +	option 'type' 'redistribute'
    +	# Selectors: ip, eq, le, ge, neigh, id, proto, local, if
    +	option 'ip' '0.0.0.0/0' 
    +	option 'le' '0'
    +	option 'proto' '3'
    +	# Action 
    +	option 'action' 'metric 128'
    +
    diff --git a/net/babel/files/babeld.init b/net/babel/files/babeld.init
    new file mode 100755
    index 0000000..d6cd0d3
    --- /dev/null
    +++ b/net/babel/files/babeld.init
    @@ -0,0 +1,136 @@
    +#!/bin/sh /etc/rc.common
    +
    +START=70
    +
    +PID_F='/var/run/babeld.pid'
    +EXTRA_COMMANDS="status"
    +EXTRA_HELP="        status Dump Babel's table to the log file."
    +
    +listen_ifname() {
    +	local ifname=$(uci_get_state network "$1" ifname "$1")
    +	local switch="$2"
    +	append args "$switch $ifname"
    +	append interfaces "$ifname"
    +}
    +
    +append_ifname() {
    +	local section="$1"
    +	local option="$2"
    +	local switch="$3"
    +	local _name
    +	config_get _name "$section" "$option"
    +	[ -z "$_name" ] && return 0
    +	local ifname=$(uci_get_state network "$_name" ifname "$_name")
    +	append args "$switch $ifname"
    +}
    +
    +append_bool() {
    +	local section="$1"
    +	local option="$2"
    +	local value="$3"
    +	local _loctmp
    +	config_get_bool _loctmp "$section" "$option" 0
    +	[ "$_loctmp" -gt 0 ] && append args "$value"
    +}
    +
    +append_parm() {
    +	local section="$1"
    +	local option="$2"
    +	local switch="$3"
    +	local _loctmp
    +	config_get _loctmp "$section" "$option"
    +	[ -z "$_loctmp" ] && return 0
    +	append args "$switch $_loctmp"
    +}
    +
    +babel_filter() {
    +	local cfg="$1"
    +	local _loctmp
    +
    +	local _ignored
    +	config_get_bool _ignored "$cfg" 'ignore' 0
    +	[ "$_ignored" -eq 1 ] && return 0
    +	
    +	append args "-C '"
    +
    +	append_parm "$cfg" 'type' ''
    +
    +	append_bool "$cfg" 'local' 'local'
    +
    +	append_parm "$cfg" 'ip' 'ip'
    +	append_parm "$cfg" 'eq' 'eq'
    +	append_parm "$cfg" 'le' 'le'
    +	append_parm "$cfg" 'ge' 'ge'
    +	append_parm "$cfg" 'neigh' 'neigh'
    +	append_parm "$cfg" 'id' 'id'
    +	append_parm "$cfg" 'proto' 'proto'
    +
    +	append_ifname "$cfg" 'if' 'if'
    +
    +	append_parm "$cfg" 'action' ''
    +
    +	append args ' ' "'"
    +}
    +
    +babel_addif() {
    +	local cfg="$1"
    +
    +	local _ignored
    +	config_get_bool _ignored "$cfg" 'ignore' 0
    +	[ "$_ignored" -eq 1 ] && return 0
    +	
    +	listen_ifname "$cfg" "-C 'interface"
    +
    +	append_parm "$cfg" 'wired' 'wired'
    +	append_parm "$cfg" 'link_quality' 'link-quality'
    +	append_parm "$cfg" 'split_horizon' 'split-horizon'
    +	append_parm "$cfg" 'rxcost' 'rxcost'
    +	append_parm "$cfg" 'hello_interval' 'hello-interval'
    +	append_parm "$cfg" 'update_interval' 'update-interval'
    +
    +	append args ' ' "'"
    +}
    +
    +babel_config() {
    +	local cfg="$1"
    +
    +	append_bool "$cfg" 'carrier_sense' '-l'
    +	append_bool "$cfg" 'assume_wireless' '-w'
    +	append_bool "$cfg" 'no_split_horizon' '-s'
    +	append_bool "$cfg" 'parasitic' '-P'
    +
    +	append_parm "$cfg" 'multicast_address' '-m'
    +	append_parm "$cfg" 'port' '-p'
    +	append_parm "$cfg" 'state_file' '-S'
    +	append_parm "$cfg" 'hello_interval' '-h'
    +	append_parm "$cfg" 'wired_hello_interval' '-H'
    +	append_parm "$cfg" 'idle_hello_interval' '-i'
    +	append_parm "$cfg" 'kernel_priority' '-k'
    +	append_parm "$cfg" 'duplication_priority' '-A'
    +	append_parm "$cfg" 'debug' '-d'
    +	append_parm "$cfg" 'local_server' '-g'
    +	append_parm "$cfg" 'export_table' '-t'
    +	append_parm "$cfg" 'import_table' '-T'
    +	append_parm "$cfg" 'conf_file' '-c'
    +	append_parm "$cfg" 'log_file' '-L'
    +}
    +
    +start() {
    +	mkdir -p /var/lib
    +	config_load babeld
    +	unset args
    +	unset interfaces
    +	config_foreach babel_config general
    +	config_foreach babel_addif interface
    +	config_foreach babel_filter filter
    +	[ -z "$interfaces" ] && return 0
    +	eval "/usr/sbin/babeld -D -I $PID_F $args $interfaces"
    +}
    +
    +stop() {
    +	[ -f $PID_F ] && kill $(cat $PID_F)
    +}
    +
    +status() {
    +	[ -f $PID_F ] && kill -USR1 $(cat $PID_F)
    +}
    diff --git a/net/babel/patches/001-fix-local_notify_route.patch b/net/babel/patches/001-fix-local_notify_route.patch
    new file mode 100644
    index 0000000..0a52c5e
    --- /dev/null
    +++ b/net/babel/patches/001-fix-local_notify_route.patch
    @@ -0,0 +1,18 @@
    +Sat Mar  5 19:13:54 CET 2011  Gabriel Kerneis 
    +  * Fix unique id in local_notify_route
    +diff -rN -u old-babeld/local.c new-babeld/local.c
    +--- old-babeld/local.c	2011-03-14 14:37:03.000000000 +0100
    ++++ new-babeld/local.c	2011-03-14 14:37:03.000000000 +0100
    +@@ -197,11 +197,10 @@
    +         return;
    + 
    +     rc = snprintf(buf, 512,
    +-                  "%s route %s-%s-%lx prefix %s installed %s "
    ++                  "%s route %s-%lx prefix %s installed %s "
    +                   "id %s metric %d refmetric %d via %s if %s\n",
    +                   local_kind(kind),
    +                   format_prefix(route->src->prefix, route->src->plen),
    +-                  format_eui64(route->src->id),
    +                   (unsigned long)route->neigh,
    +                   format_prefix(route->src->prefix, route->src->plen),
    +                   route->installed ? "yes" : "no",
    diff --git a/net/bahamut/Makefile b/net/bahamut/Makefile
    new file mode 100644
    index 0000000..a0a8be4
    --- /dev/null
    +++ b/net/bahamut/Makefile
    @@ -0,0 +1,58 @@
    +#
    +# Copyright (C) 2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=bahamut
    +PKG_VERSION:=1.8.6
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-release.tar.gz
    +PKG_SOURCE_URL:=http://bahamut.dal.net/download
    +PKG_MD5SUM:=a814a4e0ff1fabcf026ea8574b4a1e20
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/bahamut
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libopenssl +zlib
    +  SUBMENU:=Instant Messaging
    +  TITLE:=Bahamut IRC server
    +  URL:=http://bahamut.dal.net
    +endef
    +
    +TARGET_CFLAGS += \
    +	-DSYS_ERRLIST_DECLARED
    +
    +define Build/Configure
    +	$(call Build/Configure/Default,\
    +		--with-maxconnections=64 \
    +		--with-openssl="$(STAGING_DIR)/usr/lib" \
    +		,\
    +		ac_cv_func_dn_skipname=yes \
    +		ZLIB_HOME="$(STAGING_DIR)/usr" \
    +	)
    +endef
    +
    +define Build/Compile
    +	$(call Build/Compile/Default,\
    +		prefix="$(PKG_INSTALL_DIR)/usr" \
    +		INSTALL_DIR="$(PKG_INSTALL_DIR)" \
    +		STAGING_DIR="$(STAGING_DIR)" \
    +		all \
    +	)
    +endef
    +
    +define Package/bahamut/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ircd $(1)/usr/sbin
    +	$(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/*.{txt,conf} $(1)/etc/$(PKG_NAME)
    +endef
    +
    +$(eval $(call BuildPackage,bahamut))
    diff --git a/net/bahamut/patches/001-cross_compile.patch b/net/bahamut/patches/001-cross_compile.patch
    new file mode 100644
    index 0000000..ee398b0
    --- /dev/null
    +++ b/net/bahamut/patches/001-cross_compile.patch
    @@ -0,0 +1,71 @@
    +--- a/Makefile.in
    ++++ b/Makefile.in
    +@@ -22,8 +22,8 @@ MV=@MV@
    + ENGINE=@SENGINE@
    + 
    + SHELL=/bin/sh
    +-SUBDIRS=src doc tools
    +-INSTDIRS=src doc tools
    ++SUBDIRS=src
    ++INSTDIRS=src doc
    + CLEANSUBDIRS=src tools
    + 
    + CC=@CC@
    +--- a/configure
    ++++ b/configure
    +@@ -7057,8 +7057,7 @@ echo $ECHO_N "checking for epoll_create 
    +   { { 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; }; }
    ++See \`config.log' for more details." >&2;} }
    + else
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    +--- a/src/Makefile.in
    ++++ b/src/Makefile.in
    +@@ -1,8 +1,8 @@
    + CC=@CC@
    + RM=@RM@
    + MV=@MV@
    +-IRCDLIBS=@LIBS@ 
    +-INCLUDEDIR=-I../include
    ++IRCDLIBS=-lresolv -lz @LIBS@ -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib
    ++INCLUDEDIR=-I../include -I$(STAGING_DIR)/usr/include
    + OPENSSLINC=@SSL_INCLUDES@
    + ENGINE=@SENGINE@
    + CRYPTO=@ENCRYPT_SRC@
    +@@ -11,10 +11,10 @@ INSTALL_BIN=@INSTALL_PROGRAM@
    + INSTALL_DIR=@INSTALL_DIR@
    + CFLAGS=@CFLAGS@ -fno-strict-aliasing
    + 
    +-RES_SRC =
    ++#RES_SRC =
    + 
    + #This is only for very old systems that NEED this
    +-#RES_SRC = res_mkquery.c res_init.c res_comp.c
    ++RES_SRC = res_mkquery.c res_init.c res_comp.c
    + 
    + SOURCES = blalloc.c bsd.c channel.c clientlist.c clones.c confparse.c \
    +           fdlist.c fds.c hash.c hide.c inet_addr.c ircd.c ircsprintf.c \
    +@@ -22,7 +22,7 @@ SOURCES = blalloc.c bsd.c channel.c clie
    +           m_who.c match.c memcount.c modules.c packet.c parse.c pcre.c \
    +           probability.c res.c s_auth.c s_bsd.c s_conf.c s_debug.c s_err.c \
    +           s_misc.c s_numeric.c s_serv.c s_user.c sbuf.c scache.c send.c \
    +-          struct.c support.c throttle.c userban.c whowas.c zlink.c \
    ++          struct.c support.c throttle.c userban.c whowas.c zlink.c $(RES_SRC) \
    +           $(ENGINE) $(CRYPTO)
    + 
    + OBJECTS = $(SOURCES:.c=.o) version.o
    +--- a/src/res_comp.c
    ++++ b/src/res_comp.c
    +@@ -229,7 +229,7 @@ dn_skipname(u_char *comp_dn, u_char *eom
    +  * the first name on the list, not the pointer to the start of the
    +  * message.
    +  */
    +-int staticdn_find(u_char *exp_dn, u_char *msg, u_char **dnptrs, 
    ++static int dn_find(u_char *exp_dn, u_char *msg, u_char **dnptrs,
    + 		  u_char **lastdnptr)
    + {
    +     u_char *dn, *cp, **cpp;
    diff --git a/net/bahamut/patches/002-glibc_fix.patch b/net/bahamut/patches/002-glibc_fix.patch
    new file mode 100644
    index 0000000..400caed
    --- /dev/null
    +++ b/net/bahamut/patches/002-glibc_fix.patch
    @@ -0,0 +1,37 @@
    +--- a/include/resolv.h
    ++++ b/include/resolv.h
    +@@ -60,7 +60,7 @@
    + #if ((__GNU_LIBRARY__ == 6) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 3))
    + # define MAXRESOLVSORT		10	/* number of net to sort on */
    + 
    +-struct __res_state {
    ++struct state {
    + 	int	retrans;	 	/* retransmition time interval */
    + 	int	retry;			/* number of times to retransmit */
    + 	u_long	options;		/* option flags - see below. */
    +@@ -79,12 +79,9 @@ struct __res_state {
    + 		struct in_addr	addr;
    + 		u_int32_t	mask;
    + 	} sort_list[MAXRESOLVSORT];
    ++    unsigned short order[MAXSERVICES + 1];	/* search service order */
    + };
    + 
    +-typedef struct __res_state *res_state;
    +-
    +-extern struct __res_state *__res_state(void) __attribute__ ((__const__));
    +-#define _res (*__res_state())
    + 
    + #else
    + 
    +@@ -101,9 +98,10 @@ struct state {
    +     unsigned short order[MAXSERVICES + 1];	/* search service order */
    + };
    + 
    +-extern struct state _res;
    + #endif
    + 
    ++extern struct state _res;
    ++
    + extern char *p_cdname(), *p_rr(), *p_type(), *p_class(), *p_time();
    + 
    + #if ((__GNU_LIBRARY__ == 6) && (__GLIBC__ >=2) && (__GLIBC_MINOR__ >= 2))
    diff --git a/net/bahamut/patches/010-dont-use-host-zlib.patch b/net/bahamut/patches/010-dont-use-host-zlib.patch
    new file mode 100644
    index 0000000..ef8029c
    --- /dev/null
    +++ b/net/bahamut/patches/010-dont-use-host-zlib.patch
    @@ -0,0 +1,16 @@
    +diff --git a/configure b/configure
    +index 4ef7659..c774c65 100755
    +--- a/configure
    ++++ b/configure
    +@@ -8009,11 +8009,6 @@ fi
    + # zlib test
    + # ripped from http://autoconf-archive.cryp.to/check_zlib.html
    + #
    +-ZLIB_HOME=/usr/local
    +-if test ! -f "${ZLIB_HOME}/include/zlib.h"
    +-then
    +-        ZLIB_HOME=/usr
    +-fi
    + if test -n "${ZLIB_HOME}"
    + then
    +         ZLIB_OLD_LDFLAGS=$LDFLAGS
    diff --git a/net/baresip/Config.in b/net/baresip/Config.in
    new file mode 100644
    index 0000000..419fd21
    --- /dev/null
    +++ b/net/baresip/Config.in
    @@ -0,0 +1,66 @@
    +menu "Configuration"
    +	depends PACKAGE_baresip
    +
    +
    +comment "Audio drivers ---"
    +
    +config BARESIP_MODULE_ALSA
    +	bool "Alsa module"
    +	depends PACKAGE_baresip && PACKAGE_alsa-lib
    +	default n
    +
    +config BARESIP_MODULE_OSS
    +	bool "OSS module"
    +	depends PACKAGE_baresip
    +	default y
    +
    +
    +comment "Audio codecs ---"
    +
    +config BARESIP_MODULE_G711
    +	bool "G.711 audio codec"
    +	depends PACKAGE_baresip
    +	default y
    +
    +config BARESIP_MODULE_G722
    +	bool "G.722 audio codec"
    +	depends PACKAGE_baresip && PACKAGE_libspandsp
    +	default n
    +
    +config BARESIP_MODULE_SPEEX
    +	bool "Speex audio codec"
    +	depends PACKAGE_baresip && PACKAGE_libspeex
    +	default n
    +
    +
    +
    +comment "Video codecs ---"
    +
    +config BARESIP_MODULE_AVCODEC
    +	bool "FFmpeg avcodec module (H.263, H.264, MPEG4)"
    +	depends PACKAGE_baresip && PACKAGE_libffmpeg
    +	default n
    +
    +
    +comment "Video source modules ---"
    +
    +config BARESIP_MODULE_V4L
    +	bool "Video4Linux module"
    +	depends PACKAGE_baresip
    +	default n
    +
    +config BARESIP_MODULE_V4L2
    +	bool "Video4Linux2 module"
    +	depends PACKAGE_baresip && PACKAGE_libv4l
    +	default n
    +
    +
    +comment "Video display modules ---"
    +
    +config BARESIP_MODULE_SDL
    +	bool "SDL module"
    +	depends PACKAGE_baresip && PACKAGE_libsdl
    +	default n
    +
    +
    +endmenu
    diff --git a/net/baresip/Makefile b/net/baresip/Makefile
    new file mode 100644
    index 0000000..6c63730
    --- /dev/null
    +++ b/net/baresip/Makefile
    @@ -0,0 +1,97 @@
    +#
    +# Makefile
    +#
    +# Copyright (C) 2010 Alfred E. Heggestad
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=baresip
    +PKG_VERSION:=0.2.0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.creytiv.com/pub/
    +PKG_MD5SUM:=c4e160463b2bfb2e326e916089da1c4f
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +EXTRA_DEPS :=
    +
    +
    +BARESIP_MODULES :=
    +
    +
    +define Package/baresip/config
    +	source "$(SOURCE)/Config.in"
    +endef
    +
    +
    +ifneq ($(CONFIG_BARESIP_MODULE_ALSA),)
    +BARESIP_MODULES += USE_ALSA=1
    +endif
    +ifneq ($(CONFIG_BARESIP_MODULE_AVCODEC),)
    +BARESIP_MODULES += USE_FFMPEG=1 USE_FFMPEG_AVFORMAT=
    +endif
    +ifneq ($(CONFIG_BARESIP_MODULE_G711),)
    +BARESIP_MODULES += USE_G711=1
    +endif
    +ifneq ($(CONFIG_BARESIP_MODULE_G722),)
    +BARESIP_MODULES += USE_G722=1
    +endif
    +ifneq ($(CONFIG_BARESIP_MODULE_OSS),)
    +BARESIP_MODULES += USE_OSS=1
    +endif
    +ifneq ($(CONFIG_BARESIP_MODULE_SDL),)
    +BARESIP_MODULES += USE_SDL=1
    +endif
    +ifneq ($(CONFIG_BARESIP_MODULE_SPEEX),)
    +BARESIP_MODULES += USE_SPEEX=1
    +endif
    +ifneq ($(CONFIG_BARESIP_MODULE_V4L),)
    +BARESIP_MODULES += USE_V4L=1
    +endif
    +ifneq ($(CONFIG_BARESIP_MODULE_V4L2),)
    +BARESIP_MODULES += USE_V4L2=1
    +endif
    +
    +
    +define Package/baresip
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Telephony
    +  DEPENDS:=+libre +libpthread $(EXTRA_DEPS)
    +  TITLE:=baresip Barebone SIP useragent
    +  URL:=http://www.creytiv.com/
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		LIBRE_MK=../re-$(PKG_VERSION)/mk/re.mk \
    +		LIBRE_INC=../re-$(PKG_VERSION)/include \
    +		LIBRE_SO=$(STAGING_DIR)/usr/lib/libre.so \
    +		MOD_AUTODETECT= \
    +		USE_STDIO=1 USE_CONS=1 USE_EVDEV=1 \
    +		$(BARESIP_MODULES) \
    +		CC="$(TARGET_CC)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
    +		$(PKG_MAKE_OPTS) \
    +		SYSROOT="$(TOOLCHAIN_DIR)" \
    +		SYSROOT_ALT="$(STAGING_DIR)/usr" \
    +		RELEASE=1 \
    +		all install
    +endef
    +
    +define Package/baresip/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/baresip $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/lib/baresip/modules
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/baresip/modules/*.so $(1)/usr/lib/baresip/modules/.
    +	$(INSTALL_DIR) $(1)/usr/share/baresip
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/baresip/* $(1)/usr/share/baresip/.
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/baresip.init $(1)/etc/init.d/baresip
    +endef
    +
    +$(eval $(call BuildPackage,baresip))
    diff --git a/net/baresip/files/baresip.init b/net/baresip/files/baresip.init
    new file mode 100644
    index 0000000..dd84a50
    --- /dev/null
    +++ b/net/baresip/files/baresip.init
    @@ -0,0 +1,19 @@
    +#!/bin/sh /etc/rc.common
    +#
    +# Copyright (C) 2010 Alfred E. Heggestad
    +#
    +
    +START=92
    +BIN=baresip
    +DEFAULT=/etc/default/$BIN
    +OPTIONS=-d
    +
    +start() {
    +       [ -f $DEFAULT ] && . $DEFAULT
    +       $BIN $OPTIONS
    +}
    +
    +stop() {
    +       killall $BIN
    +}
    +
    diff --git a/net/batman-adv/Config.in b/net/batman-adv/Config.in
    new file mode 100644
    index 0000000..ad11d3a
    --- /dev/null
    +++ b/net/batman-adv/Config.in
    @@ -0,0 +1,13 @@
    +
    +config KMOD_BATMAN_ADV_DEBUG_LOG
    +	bool "enable verbose debug logging"
    +	depends PACKAGE_kmod-batman-adv
    +	default n
    +config KMOD_BATMAN_ADV_BATCTL
    +	bool "enable batctl"
    +	depends PACKAGE_kmod-batman-adv
    +	default y
    +	help
    +	  batctl is a more intuitive managment utility for B.A.T.M.A.N.-Advanced.
    +	  It is an easier method for configuring batman-adv and
    +	  provides some additional tools for debugging as well.
    diff --git a/net/batman-adv/Makefile b/net/batman-adv/Makefile
    new file mode 100644
    index 0000000..53d724e
    --- /dev/null
    +++ b/net/batman-adv/Makefile
    @@ -0,0 +1,121 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=batman-adv
    +
    +PKG_VERSION:=2011.2.0
    +PKG_MD5SUM:=1ef45406201913cc08ac01e47ad2d034
    +BATCTL_MD5SUM:=69e7fe915f2c1867b74e6efe7c627dd5
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)
    +PKG_TOOL_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/batctl-$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/kernel.mk
    +
    +define KernelPackage/batman-adv
    +  URL:=http://www.open-mesh.org/
    +  MAINTAINER:=Marek Lindner 
    +  SUBMENU:=Network Support
    +  DEPENDS:=@!LINUX_2_4
    +  TITLE:=B.A.T.M.A.N. Adv
    +  FILES:=$(PKG_BUILD_DIR)/batman-adv.$(LINUX_KMOD_SUFFIX)
    +  AUTOLOAD:=$(call AutoLoad,50,batman-adv)
    +endef
    +
    +define KernelPackage/batman-adv/description
    +B.A.T.M.A.N. advanced is a kernel module which allows to
    +build layer 2 mesh networks. This package contains the
    +version $(PKG_VERSION) of the kernel module plus its user space
    +configuration & managerment tool batctl.
    +endef
    +
    +define KernelPackage/batman-adv/config
    +	source "$(SOURCE)/Config.in"
    +endef
    +
    +MAKE_BATMAN_ADV_ARGS += \
    +	CROSS_COMPILE="$(TARGET_CROSS)" \
    +	ARCH="$(LINUX_KARCH)" \
    +	PATH="$(TARGET_PATH)" \
    +	$(if $(CONFIG_KMOD_BATMAN_ADV_DEBUG_LOG),EXTRA_CFLAGS="-DCONFIG_BATMAN_ADV_DEBUG") \
    +	SUBDIRS="$(PKG_BUILD_DIR)" \
    +	LINUX_VERSION="$(LINUX_VERSION)" \
    +	REVISION="" modules
    +
    +MAKE_BATCTL_ARGS += \
    +	CFLAGS="$(TARGET_CFLAGS)" \
    +	CCFLAGS="$(TARGET_CFLAGS)" \
    +	OFLAGS="$(TARGET_CFLAGS)" \
    +	REVISION="" \
    +	CC="$(TARGET_CC)" \
    +	NODEBUG=1 \
    +	UNAME="Linux" \
    +	INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
    +	STRIP="/bin/true" \
    +	batctl install
    +
    +ifneq ($(DEVELOPER)$(CONFIG_KMOD_BATMAN_ADV_BATCTL),)
    +define Download/batctl
    +  FILE:=batctl-$(PKG_VERSION).tar.gz
    +  URL:=$(PKG_SOURCE_URL)
    +  MD5SUM:=$(BATCTL_MD5SUM)
    +endef
    +$(eval $(call Download,batctl))
    +
    +EXTRACT_BATCTL = tar xzf "$(DL_DIR)/batctl-$(PKG_VERSION).tar.gz" -C "$(BUILD_DIR)/$(PKG_NAME)"
    +PATCH_BATCTL = $(call Build/DoPatch,"$(PKG_BATCTL_BUILD_DIR)","$(PATCH_DIR)","*batctl*")
    +BUILD_BATCTL = $(MAKE) -C $(PKG_TOOL_BUILD_DIR) $(MAKE_BATCTL_ARGS)
    +endif
    +
    +define Build/DoPatch
    +	@if [ -d "$(2)" ]; then \
    +		if [ "$$$$(ls $(2) | grep -Ec $(3))" -gt 0 ]; then \
    +			$(PATCH) "$(1)" "$(2)" "$(3)"; \
    +		fi; \
    +	fi
    +endef
    +
    +define Build/Patch
    +	$(call Build/DoPatch,"$(PKG_BUILD_DIR)","$(PATCH_DIR)","*batman*")
    +	$(EXTRACT_BATCTL)
    +	$(PATCH_BATCTL)
    +endef
    +
    +define Build/Compile
    +	cp $(PKG_BUILD_DIR)/Makefile.kbuild $(PKG_BUILD_DIR)/Makefile
    +	$(MAKE) -C "$(LINUX_DIR)" $(MAKE_BATMAN_ADV_ARGS)
    +	$(BUILD_BATCTL)
    +endef
    +
    +define Build/Clean
    +        rm -rf $(BUILD_DIR)/$(PKG_NAME)/
    +endef
    +
    +ifneq ($(DEVELOPER)$(CONFIG_KMOD_BATMAN_ADV_BATCTL),)
    +define KernelPackage/batman-adv/install
    +	$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/etc/init.d/batman-adv $(1)/etc/init.d
    +	$(INSTALL_DATA) ./files/etc/config/batman-adv $(1)/etc/config
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/batctl $(1)/usr/sbin/
    +endef
    +else
    +define KernelPackage/batman-adv/install
    +	$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/etc/init.d/batman-adv $(1)/etc/init.d
    +	$(INSTALL_DATA) ./files/etc/config/batman-adv $(1)/etc/config
    +endef
    +endif
    +
    +$(eval $(call KernelPackage,batman-adv))
    diff --git a/net/batman-adv/files/etc/config/batman-adv b/net/batman-adv/files/etc/config/batman-adv
    new file mode 100644
    index 0000000..31ef797
    --- /dev/null
    +++ b/net/batman-adv/files/etc/config/batman-adv
    @@ -0,0 +1,13 @@
    +
    +config 'mesh' 'bat0'
    +	option 'interfaces' 'mesh'
    +	option 'aggregated_ogms'
    +	option 'bonding'
    +	option 'fragmentation'
    +	option 'gw_bandwidth'
    +	option 'gw_mode'
    +	option 'gw_sel_class'
    +	option 'log_level'
    +	option 'orig_interval'
    +	option 'vis_mode'
    +
    diff --git a/net/batman-adv/files/etc/init.d/batman-adv b/net/batman-adv/files/etc/init.d/batman-adv
    new file mode 100644
    index 0000000..a6a8500
    --- /dev/null
    +++ b/net/batman-adv/files/etc/init.d/batman-adv
    @@ -0,0 +1,124 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2011 OpenWrt.org
    +
    +START=90
    +
    +is_module_loaded() {
    +
    +	if [ ! -d "/sys/module/batman_adv" ]; then
    +		echo "batman-adv module directory not found - was the kernel module loaded ?" >&2
    +		return 0
    +	fi
    +
    +	return 1
    +}
    +
    +start_mesh () {
    +	local meshif="$1"
    +	local interfaces aggregated_ogms bonding fragmentation gw_bandwidth gw_mode gw_sel_class log_level orig_interval vis_mode
    +
    +	is_module_loaded
    +	[ $? -ne 1 ] && return
    +
    +	config_get interfaces "$meshif" interfaces
    +	config_get aggregated_ogms "$meshif" aggregated_ogms
    +	config_get bonding "$meshif" bonding
    +	config_get fragmentation "$meshif" fragmentation
    +	config_get gw_bandwidth "$meshif" gw_bandwidth
    +	config_get gw_mode "$meshif" gw_mode
    +	config_get gw_sel_class "$meshif" gw_sel_class
    +	config_get log_level "$meshif" log_level
    +	config_get orig_interval "$meshif" orig_interval
    +	config_get vis_mode "$meshif" vis_mode
    +
    +	if [ "$interfaces" = "" ]; then
    +		echo Error, you must specify at least a network interface
    +		return
    +	fi
    +	
    +	for interface in $interfaces
    +	   do
    +	      ifname=$(uci -P /var/state get network.$interface.ifname 2>&-)
    +	      [ ! -f "/sys/class/net/$ifname/batman_adv/mesh_iface" ] && {
    +	         ifname=${interface}
    +	         [ ! -f "/sys/class/net/$ifname/batman_adv/mesh_iface" ] && echo "Can't add interface $ifname - ignoring" && continue
    +	      }
    +
    +	      echo $meshif > /sys/class/net/$ifname/batman_adv/mesh_iface
    +	   done
    +
    +	if [ $orig_interval ]; then
    +		echo $orig_interval > /sys/class/net/$meshif/mesh/orig_interval
    +	fi
    +
    +	if [ $log_level ]; then
    +		echo $log_level > /sys/class/net/$meshif/mesh/log_level 2>&-
    +	fi
    +
    +	if [ $aggregated_ogms ]; then
    +		echo $aggregated_ogms > /sys/class/net/$meshif/mesh/aggregated_ogms
    +	fi
    +	
    +	if [ $bonding ]; then
    +		echo $bonding > /sys/class/net/$meshif/mesh/bonding
    +	fi
    +	
    +	if [ $fragmentation ]; then
    +		echo $fragmentation > /sys/class/net/$meshif/mesh/fragmentation
    +	fi
    +	
    +	if [ $gw_bandwidth ]; then
    +		echo $gw_bandwidth > /sys/class/net/$meshif/mesh/gw_bandwidth
    +	fi
    +	
    +	if [ $gw_mode ]; then 
    +		echo $gw_mode > /sys/class/net/$meshif/mesh/gw_mode
    +	fi
    +	
    +	if [ $gw_sel_class ]; then
    +		echo $gw_sel_class > /sys/class/net/$meshif/mesh/gw_sel_class
    +	fi
    +
    +	if [ $vis_mode ]; then
    +		echo $vis_mode > /sys/class/net/$meshif/mesh/vis_mode
    +	fi
    +}
    +
    +stop_mesh() {
    +	local meshif="$1"
    +
    +	is_module_loaded
    +	[ $? -ne 1 ] && return
    +
    +	for iface in $(ls /sys/class/net/*)
    +	   do
    +		 [ ! -f "$iface/batman_adv/mesh_iface" ] && continue
    +		 [ "$(head -1 $iface/batman_adv/mesh_iface)" != "$meshif" ] && continue
    +
    +		 echo "none" > $iface/batman_adv/mesh_iface
    +	   done
    +}
    +
    +# can also be used with "batman-adv start bat0"
    +start() {
    +	config_load batman-adv
    +
    +	if [ -n "$1" ]; then
    +		start_mesh $1
    +	else
    +		config_foreach start_mesh mesh
    +	fi
    +}
    +
    +# can also be used with "batman-adv stop bat0"
    +stop () {
    +	config_load batman-adv
    +
    +	if [ -n "$1" ]; then
    +		stop_mesh $1
    +	else
    +		config_foreach stop_mesh mesh
    +	fi
    +}
    +
    +
    diff --git a/net/batman/Makefile b/net/batman/Makefile
    new file mode 100644
    index 0000000..b17818a
    --- /dev/null
    +++ b/net/batman/Makefile
    @@ -0,0 +1,144 @@
    +#
    +# Copyright (C) 2008-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +include $(INCLUDE_DIR)/kernel.mk
    +
    +PKG_NAME:=batmand
    +PKG_REV:=1439
    +PKG_VERSION:=r$(PKG_REV)
    +PKG_RELEASE:=1
    +PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\"
    +
    +PKG_SOURCE_PROTO:=svn
    +PKG_SOURCE_VERSION:=$(PKG_REV)
    +PKG_SOURCE_SUBDIR:=$(if $(PKG_BRANCH),$(PKG_BRANCH),$(PKG_NAME))-$(PKG_VERSION)
    +PKG_SOURCE_URL:=http://downloads.open-mesh.org/svn/batman/trunk/
    +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
    +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
    +
    +PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/batman/linux/modules
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/batmand/Default
    +  URL:=http://www.open-mesh.org/
    +  MAINTAINER:=Marek Lindner 
    +endef
    +
    +define Package/batmand
    +$(call Package/batmand/Default)
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Routing and Redirection
    +  DEPENDS:=+libpthread +kmod-tun
    +  TITLE:=B.A.T.M.A.N. layer 3 routing daemon
    +endef
    +
    +define Package/batmand/description
    +B.A.T.M.A.N. layer 3 routing daemon
    +endef
    +
    +define Package/vis
    +$(call Package/batmand/Default)
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Routing and Redirection
    +  DEPENDS:=+libpthread
    +  TITLE:=visualization server for B.A.T.M.A.N. layer 3
    +endef
    +        
    +define Package/vis/description
    +visualization server for B.A.T.M.A.N. layer 3
    +endef
    +
    +define KernelPackage/batgat
    +$(call Package/batmand/Default)
    +  SUBMENU:=Network Support
    +  DEPENDS:=+batmand
    +  TITLE:=B.A.T.M.A.N. gateway module
    +  FILES:=$(PKG_KMOD_BUILD_DIR)/batgat.$(LINUX_KMOD_SUFFIX)
    +  AUTOLOAD:=$(call AutoLoad,50,batgat)
    +endef
    +
    +
    +define KernelPackage/batgat/description
    +Kernel gateway module for B.A.T.M.A.N. for better tunnel performance
    +endef
    +
    +MAKE_BATMAND_ARGS += \
    +	EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \
    +	CCFLAGS="$(TARGET_CFLAGS)" \
    +	OFLAGS="$(TARGET_CFLAGS)" \
    +	REVISION="$(PKG_REV)" \
    +	CC="$(TARGET_CC)" \
    +	NODEBUG=1 \
    +	UNAME="Linux" \
    +	INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
    +	STRIP="/bin/true" \
    +	batmand install
    +	
    +MAKE_VIS_ARGS += \
    +	EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \
    +	CCFLAGS="$(TARGET_CFLAGS)" \
    +	OFLAGS="$(TARGET_CFLAGS)" \
    +	REVISION="$(PKG_REV)" \
    +	CC="$(TARGET_CC)" \
    +	NODEBUG=1 \
    +	UNAME="Linux" \
    +	INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
    +	STRIP="/bin/true" \
    +	vis install
    +
    +MAKE_BATGAT_ARGS += \
    +	CROSS_COMPILE="$(TARGET_CROSS)" \
    +	ARCH="$(LINUX_KARCH)" \
    +	PATH="$(TARGET_PATH)" \
    +	SUBDIRS="$(PKG_KMOD_BUILD_DIR)" \
    +	LINUX_VERSION="$(LINUX_VERSION)" \
    +	REVISION="$(PKG_REV)" modules	
    +
    +
    +define Build/Configure
    +endef
    +
    +ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_batmand),)
    +	BUILD_BATMAND := $(MAKE) -C $(PKG_BUILD_DIR)/batman $(MAKE_BATMAND_ARGS)
    +endif
    +
    +ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_vis),)
    +	BUILD_VIS := $(MAKE) -C $(PKG_BUILD_DIR)/vis $(MAKE_VIS_ARGS)
    +endif
    +	
    +ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_kmod-batgat),)
    +	BUILD_BATGAT := $(MAKE) -C "$(LINUX_DIR)" $(MAKE_BATGAT_ARGS)
    +endif
    +	        
    +define Build/Compile
    +	$(BUILD_BATMAND)
    +	$(BUILD_VIS)
    +	cp $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild $(PKG_KMOD_BUILD_DIR)/Makefile
    +	$(BUILD_BATGAT)
    +endef
    +
    +define Package/batmand/install
    +	$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/
    +	$(INSTALL_BIN) ./files/etc/init.d/batmand $(1)/etc/init.d
    +	$(INSTALL_DATA) ./files/etc/config/batmand $(1)/etc/config
    +endef
    +
    +define Package/vis/install
    +	$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/vis $(1)/usr/sbin/
    +	$(INSTALL_BIN) ./files/etc/init.d/vis $(1)/etc/init.d
    +	$(INSTALL_DATA) ./files/etc/config/vis $(1)/etc/config
    +endef
    +
    +$(eval $(call BuildPackage,batmand))
    +$(eval $(call BuildPackage,vis))
    +$(eval $(call KernelPackage,batgat))
    diff --git a/net/batman/files/etc/config/batmand b/net/batman/files/etc/config/batmand
    new file mode 100644
    index 0000000..6d1f3be
    --- /dev/null
    +++ b/net/batman/files/etc/config/batmand
    @@ -0,0 +1,12 @@
    +config batmand general
    +	option interface		ath0
    +	option hna			
    +	option gateway_class		
    +	option originator_interval
    +	option preferred_gateway	
    +	option routing_class
    +	option visualisation_srv
    +	option policy_routing_script
    +	option disable_client_nat
    +	option disable_aggregation
    +	
    diff --git a/net/batman/files/etc/config/vis b/net/batman/files/etc/config/vis
    new file mode 100644
    index 0000000..6d30023
    --- /dev/null
    +++ b/net/batman/files/etc/config/vis
    @@ -0,0 +1,3 @@
    +config vis general
    +	option interface		ath0
    +	
    diff --git a/net/batman/files/etc/init.d/batmand b/net/batman/files/etc/init.d/batmand
    new file mode 100644
    index 0000000..403e9f3
    --- /dev/null
    +++ b/net/batman/files/etc/init.d/batmand
    @@ -0,0 +1,66 @@
    +#!/bin/sh /etc/rc.common
    +START=90
    +
    +start () {
    +	interface=$(uci get batmand.general.interface)
    +	if [ "$interface" = "" ]; then
    +		echo $1 Error, you must specify at least a network interface
    +		exit
    +	fi
    +	hnas=$(uci get batmand.general.hna)
    +	gateway_class=$(uci get batmand.general.gateway_class)
    +	originator_interval=$(uci get batmand.general.originator_interval)
    +	preferred_gateway=$(uci get batmand.general.preferred_gateway)
    +	routing_class=$(uci get batmand.general.routing_class)
    +	visualisation_srv=$(uci get batmand.general.visualisation_srv)
    +	policy_routing_script=$(uci get batmand.general.policy_routing_script)
    +	disable_client_nat=$(uci get batmand.general.disable_client_nat)
    +	disable_aggregation=$(uci get batmand.general.disable_aggregation)
    +	batman_args=""
    +
    +	for hna in $hnas
    +	   do
    +	      batman_args=${batman_args}'-a '$hna' '
    +	   done
    +
    +	if [ $gateway_class ]; then
    +		batman_args=${batman_args}'-g '$gateway_class' '
    +	fi
    +
    +	if [ $originator_interval ]; then
    +		batman_args=${batman_args}'-o '$originator_interval' '
    +	fi
    +
    +	if [ $preferred_gateway ]; then
    +		batman_args=${batman_args}'-p '$preferred_gateway' '
    +	fi
    +
    +	if [ $routing_class ]; then
    +		batman_args=${batman_args}'-r '$routing_class' '
    +	fi
    +		
    +	if [ $visualisation_srv ]; then
    +		batman_args=${batman_args}'-s '$visualisation_srv' '
    +	fi
    +	
    +	if [ $policy_routing_script ]; then
    +		batman_args=${batman_args}'--policy-routing-script '$policy_routing_script' '
    +	fi
    +	
    +	if [ $disable_client_nat ]; then
    +		batman_args=${batman_args}'--disable-client-nat '
    +	fi
    +	
    +	if [ $disable_aggregation ]; then
    +		batman_args=${batman_args}'--disable-aggregation '
    +	fi
    +
    +	batman_args=${batman_args}$interface
    +	batmand $batman_args >/dev/null 2>&1
    +}
    +
    +stop () {
    +        killall batmand
    +}
    +
    +        
    diff --git a/net/batman/files/etc/init.d/vis b/net/batman/files/etc/init.d/vis
    new file mode 100644
    index 0000000..ef18eb7
    --- /dev/null
    +++ b/net/batman/files/etc/init.d/vis
    @@ -0,0 +1,19 @@
    +#!/bin/sh /etc/rc.common
    +START=90
    +
    +start () {
    +	interface=$(uci get vis.general.interface)
    +	if [ "$interface" = "" ]; then
    +		echo $1 Error, you must specify at least a network interface
    +		exit
    +	fi
    +	vis_args=$interface
    +
    +	vis $vis_args >/dev/null 2>&1
    +}
    +
    +stop () {
    +        killall vis
    +}
    +
    +        
    diff --git a/net/batman/patches/100-2.6.36.patch b/net/batman/patches/100-2.6.36.patch
    new file mode 100644
    index 0000000..566c23b
    --- /dev/null
    +++ b/net/batman/patches/100-2.6.36.patch
    @@ -0,0 +1,47 @@
    +---
    + batman/linux/modules/gateway.c |   19 +++++++++++++++++++
    + 1 file changed, 19 insertions(+)
    +
    +--- batmand-r1439.orig/batman/linux/modules/gateway.c
    ++++ batmand-r1439/batman/linux/modules/gateway.c
    +@@ -29,6 +29,7 @@ static struct class *batman_class;
    + static int batgat_open(struct inode *inode, struct file *filp);
    + static int batgat_release(struct inode *inode, struct file *file);
    + static int batgat_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg );
    ++static long batgat_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long arg );
    + 
    + 
    + static void udp_data_ready(struct sock *sk, int len);
    +@@ -53,7 +54,11 @@ static int proc_clients_read(char *buf,
    + static struct file_operations fops = {
    + 	.open = batgat_open,
    + 	.release = batgat_release,
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
    ++	.unlocked_ioctl = batgat_ioctl_unlocked,
    ++#else
    + 	.ioctl = batgat_ioctl,
    ++#endif
    + };
    + 
    + 
    +@@ -166,6 +171,20 @@ static int batgat_release(struct inode *
    + }
    + 
    + 
    ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
    ++#include 
    ++static long batgat_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long arg )
    ++{
    ++	int ret;
    ++
    ++	lock_kernel();
    ++	ret = batgat_ioctl(file->f_path.dentry->d_inode, file, cmd, arg);
    ++	unlock_kernel();
    ++
    ++	return ret;
    ++}
    ++#endif
    ++
    + static int batgat_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg )
    + {
    + 	uint8_t tmp_ip[4];
    diff --git a/net/bind/Makefile b/net/bind/Makefile
    new file mode 100644
    index 0000000..cd46948
    --- /dev/null
    +++ b/net/bind/Makefile
    @@ -0,0 +1,176 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=bind
    +PKG_VERSION:=9.7.2-P3
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:= \
    +	ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION) \
    +	http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION)
    +PKG_MD5SUM:=b4537cbae38b2daef36775bf49f33db9
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/bind/Default
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+bind-libs +libopenssl
    +  TITLE:=bind
    +  URL:=https://www.isc.org/software/bind
    +  SUBMENU:=IP Addresses and Names
    +endef
    +
    +define Package/bind-libs
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE:=bind shared libraries
    +  URL:=http://www.isc.org/sw/bind/
    +endef
    +
    +define Package/bind-server
    +  $(call Package/bind/Default)
    +  TITLE+= DNS server
    +endef
    +
    +define Package/bind-client
    +  $(call Package/bind/Default)
    +  TITLE+= dynamic DNS client
    +endef
    +
    +define Package/bind-tools
    +  $(call Package/bind/Default)
    +  TITLE+= administration tools (all)
    +endef
    +
    +define Package/bind-rndc
    +  $(call Package/bind/Default)
    +  TITLE+= administration tools (rndc and rndc-confgen only)
    +endef
    +
    +define Package/bind-check
    +  $(call Package/bind/Default)
    +  TITLE+= administration tools (named-checkconf and named-checkzone only)
    +endef
    +
    +define Package/bind-dnssec
    +  $(call Package/bind/Default)
    +  TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
    +endef
    +
    +define Package/bind-host
    +  $(call Package/bind/Default)
    +  TITLE+= simple DNS client
    +endef
    +
    +define Package/bind-dig
    +  $(call Package/bind/Default)
    +  TITLE+= DNS excavation tool
    +endef
    +
    +export BUILD_CC="$(TARGET_CC)"
    +
    +CONFIGURE_ARGS += \
    +	--enable-shared \
    +	--enable-static \
    +	--with-randomdev="/dev/urandom" \
    +	--disable-threads \
    +	--with-openssl="$(STAGING_DIR)/usr" \
    +	--with-libtool \
    +	--with-libxml2=no \
    +	--enable-epoll=yes \
    +
    +CONFIGURE_VARS += \
    +	BUILD_CC="$(TARGET_CC)" \
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
    +		BUILD_CC="$(HOSTCC)" \
    +		CC="$(HOSTCC)" \
    +		CFLAGS="-O2" \
    +		LIBS="" \
    +		gen
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Package/bind-libs/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
    +endef
    +
    +define Package/bind-server/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc
    +	$(CP) ./files/bind $(1)/etc/
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
    +	find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
    +endef
    +
    +define Package/bind-client/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
    +endef
    +
    +define Package/bind-tools/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
    +endef
    +
    +define Package/bind-rndc/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
    +endef
    +
    +define Package/bind-check/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
    +endef
    +
    +define Package/bind-dnssec/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
    +endef
    +
    +define Package/bind-host/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
    +endef
    +
    +define Package/bind-dig/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,bind-libs))
    +$(eval $(call BuildPackage,bind-server))
    +$(eval $(call BuildPackage,bind-client))
    +$(eval $(call BuildPackage,bind-tools))
    +$(eval $(call BuildPackage,bind-rndc))
    +$(eval $(call BuildPackage,bind-check))
    +$(eval $(call BuildPackage,bind-dnssec))
    +$(eval $(call BuildPackage,bind-host))
    +$(eval $(call BuildPackage,bind-dig))
    diff --git a/net/bind/files/bind/db.0 b/net/bind/files/bind/db.0
    new file mode 100644
    index 0000000..e3aabdb
    --- /dev/null
    +++ b/net/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/net/bind/files/bind/db.127 b/net/bind/files/bind/db.127
    new file mode 100644
    index 0000000..cd05bef
    --- /dev/null
    +++ b/net/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/net/bind/files/bind/db.255 b/net/bind/files/bind/db.255
    new file mode 100644
    index 0000000..e3aabdb
    --- /dev/null
    +++ b/net/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/net/bind/files/bind/db.local b/net/bind/files/bind/db.local
    new file mode 100644
    index 0000000..66b4892
    --- /dev/null
    +++ b/net/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/net/bind/files/bind/db.root b/net/bind/files/bind/db.root
    new file mode 100644
    index 0000000..0eb52af
    --- /dev/null
    +++ b/net/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	199.7.83.42
    +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/net/bind/files/bind/named.conf.example b/net/bind/files/bind/named.conf.example
    new file mode 100644
    index 0000000..1624549
    --- /dev/null
    +++ b/net/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/net/bind/files/named.init b/net/bind/files/named.init
    new file mode 100644
    index 0000000..986e5fe
    --- /dev/null
    +++ b/net/bind/files/named.init
    @@ -0,0 +1,40 @@
    +#!/bin/sh /etc/rc.common
    +START=50
    +
    +config_file=/etc/bind/named.conf
    +pid_file=/var/run/named/named.pid
    +
    +start() {
    +  if [ -e $pid_file ]
    +  then
    +     echo "  named already running with PID `cat $pid_file`"
    +     return 1
    +  fi
    +  echo Starting isc-bind
    +
    +  /usr/sbin/named -c $config_file
    +
    +  if [ $? -ne 0 ]
    +  then
    +    echo "  isc-bind failed to start"
    +  fi
    +}
    +
    +stop() {
    +  echo "Stopping isc-bind"
    +  if [ -e $pid_file ]
    +  then
    +    kill `cat $pid_file`
    +
    +    if [ $? -ne 0 ]
    +    then
    +      echo "  PID " `cat $pid_file` not found
    +      echo "  Is the named server running?"
    +    fi
    +
    +    rm -f $pid_file
    +
    +    else
    +    echo "  $pid_file not found"
    +  fi
    +}
    diff --git a/net/bind/patches/001-automake-cross.patch b/net/bind/patches/001-automake-cross.patch
    new file mode 100644
    index 0000000..e8cb67f
    --- /dev/null
    +++ b/net/bind/patches/001-automake-cross.patch
    @@ -0,0 +1,186 @@
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -1759,56 +1759,10 @@ AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF)
    + # which provides some (all?) of the desired functions.
    + #
    + 
    +-AC_MSG_CHECKING([for inet_ntop with IPv6 support])
    +-AC_TRY_RUN([
    +-#include 
    +-#include 
    +-#include 
    +-#include 
    +-main() {
    +-char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}],
    +-	[AC_MSG_RESULT(yes)
    +-	ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
    +-
    +-	[AC_MSG_RESULT(no)
    +-	ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
    +-	ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
    +-	ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"],
    +-	[AC_MSG_RESULT(assuming inet_ntop needed)
    +-	ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
    +-	ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
    +-	ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"])
    +-
    +-
    +-# On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
    +-# addresses with less than four octets, like "1.2.3".  Also leading
    +-# zeros should also be rejected.
    +-
    +-AC_MSG_CHECKING([for working inet_pton with IPv6 support])
    +-AC_TRY_RUN([
    +-#include 
    +-#include 
    +-#include 
    +-#include 
    +-main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
    +-			     inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : 
    +-			     (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }],
    +-	[AC_MSG_RESULT(yes)
    +-	ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
    +-	[AC_MSG_RESULT(no)
    +-	ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
    +-	ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
    +-	ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
    +-	[AC_MSG_RESULT(assuming target platform has working inet_pton)
    +-	ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
    +-	[AC_MSG_RESULT(assuming inet_pton needed)
    +-	ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
    +-	ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
    +-	ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
    +-	[AC_MSG_RESULT(assuming target platform has working inet_pton)
    +-	ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"])
    +-
    ++ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"
    + AC_SUBST(ISC_PLATFORM_NEEDNTOP)
    ++
    ++ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"
    + AC_SUBST(ISC_PLATFORM_NEEDPTON)
    + 
    + #
    +@@ -2186,28 +2140,11 @@ AC_SUBST(DST_EXTRA_SRCS)
    + # Win32 uses "%I64d", but that's defined elsewhere since we don't use
    + # configure on Win32.
    + #
    +-AC_MSG_CHECKING(printf format modifier for 64-bit integers)
    +-AC_TRY_RUN([
    +-#include 
    +-main() {
    +-	long long int j = 0;
    +-	char buf[100];
    +-	buf[0] = 0;
    +-	sprintf(buf, "%lld", j);
    +-	exit((sizeof(long long int) != sizeof(long int))? 0 :
    +-	     (strcmp(buf, "0") != 0));
    +-} 
    +-],
    +-	[AC_MSG_RESULT(ll)
    +-	ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
    +-	LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'],
    +-	[AC_MSG_RESULT(l)
    +-	ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'
    +-	LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "l"'],
    +-	[AC_MSG_RESULT(assuming target platform uses ll)
    +-	ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
    +-	LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'])
    ++
    ++ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
    + AC_SUBST(ISC_PLATFORM_QUADFORMAT)
    ++
    ++LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'
    + AC_SUBST(LWRES_PLATFORM_QUADFORMAT)
    + 
    + #
    +@@ -2272,47 +2209,8 @@ AC_DEFINE(NEED_OPTARG, 1, [Defined if ex
    + #
    + # BSD/OS, and perhaps some others, don't define rlim_t.
    + #
    +-AC_MSG_CHECKING(for type rlim_t)
    +-AC_TRY_COMPILE([
    +-#include 
    +-#include 
    +-#include ],
    +-[rlim_t rl = 19671212; return (0);],
    +-[AC_MSG_RESULT(yes)
    +- ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t"],
    +-[AC_MSG_RESULT(no)
    + 
    +-AC_MSG_CHECKING(type of rlim_cur)
    +-AC_TRY_RUN([
    +-#include 
    +-#include 
    +-#include 
    +-main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}],
    +-[AC_MSG_RESULT(int)
    +-ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"],
    +-[
    +-AC_TRY_RUN([
    +-#include 
    +-#include 
    +-#include 
    +-main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}],
    +-[AC_MSG_RESULT(long int)
    +-ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"],
    +-[
    +-AC_TRY_RUN([
    +-#include 
    +-#include 
    +-#include 
    +-main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}],
    +-[AC_MSG_RESULT(long long int)
    +-ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
    +-[AC_MSG_ERROR([unable to determine sizeof rlim_cur])
    +-],[AC_MSG_ERROR(this cannot happen)])
    +-],[AC_MSG_ERROR(this cannot happen)])
    +-],[
    +-ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"
    +-AC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming long long int)])
    +-])
    ++ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"
    + AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
    + 
    + #
    +@@ -2520,27 +2418,22 @@ if test "$use_atomic" = "yes"; then
    + 	[i[3456]86-*])
    + 		# XXX: some old x86 architectures actually do not support
    + 		#      (some of) these operations.  Do we need stricter checks?
    +-AC_TRY_RUN([
    +-main() {
    +-	exit((sizeof(void *) == 8) ? 0 : 1);
    +-}
    +-],
    +-		[arch=x86_64
    +-		have_xaddq=yes],
    +-		[arch=x86_32],
    +-		[arch=x86_32])
    ++AC_CHECK_SIZEOF([void *])
    ++		if test $ac_cv_sizeof_void_p = 8; then
    ++			arch=x86_64
    ++			have_xaddq=yes
    ++		else
    ++			arch=x86_32
    ++		fi
    + 	;;
    + 	x86_64-*|amd64-*)
    +-AC_TRY_RUN([
    +-main() {
    +-       exit((sizeof(void *) == 8) ? 0 : 1);
    +-}
    +-],
    +-	       [arch=x86_64
    +-	       have_xaddq=yes],
    +-	       [arch=x86_32],
    +-	       [arch=x86_64
    +-	       have_xaddq=yes])
    ++AC_CHECK_SIZEOF([void *])
    ++		if test $ac_cv_sizeof_void_p = 8; then
    ++			arch=x86_64
    ++			have_xaddq=yes
    ++		else
    ++			arch=x86_32
    ++		fi
    + 	;;
    + 	alpha*-*)
    + 		arch=alpha
    diff --git a/net/bind/patches/100-cross_compile.patch b/net/bind/patches/100-cross_compile.patch
    new file mode 100644
    index 0000000..5c51312
    --- /dev/null
    +++ b/net/bind/patches/100-cross_compile.patch
    @@ -0,0 +1,96 @@
    +--- a/configure
    ++++ b/configure
    +@@ -22418,8 +22418,7 @@ $as_echo_n "checking epoll support... "
    +   { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
    + See \`config.log' for more details." >&5
    + $as_echo "$as_me: error: cannot run test program while cross compiling
    +-See \`config.log' for more details." >&2;}
    +-   { (exit 1); exit 1; }; }
    ++See \`config.log' for more details." >&2;} }
    + else
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    +@@ -24275,8 +24274,7 @@ if { as_var=$as_ac_File; eval "test \"\$
    + else
    +   test "$cross_compiling" = yes &&
    +   { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
    +-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    +-   { (exit 1); exit 1; }; }
    ++$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} }
    + if test -r "$devrandom"; then
    +   eval "$as_ac_File=yes"
    + else
    +@@ -27949,73 +27947,6 @@ rm -f core conftest.err conftest.$ac_obj
    + # which provides some (all?) of the desired functions.
    + #
    + 
    +-{ $as_echo "$as_me:$LINENO: checking for inet_ntop with IPv6 support" >&5
    +-$as_echo_n "checking for inet_ntop with IPv6 support... " >&6; }
    +-if test "$cross_compiling" = yes; then
    +-  { $as_echo "$as_me:$LINENO: result: assuming inet_ntop needed" >&5
    +-$as_echo "assuming inet_ntop needed" >&6; }
    +-	ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
    +-	ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
    +-	ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 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 
    +-#include 
    +-#include 
    +-main() {
    +-char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    +-$as_echo "$ac_try_echo") >&5
    +-  (eval "$ac_link") 2>&5
    +-  ac_status=$?
    +-  $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    +-$as_echo "$ac_try_echo") >&5
    +-  (eval "$ac_try") 2>&5
    +-  ac_status=$?
    +-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    +-  (exit $ac_status); }; }; then
    +-  { $as_echo "$as_me:$LINENO: result: yes" >&5
    +-$as_echo "yes" >&6; }
    +-	ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"
    +-else
    +-  $as_echo "$as_me: program exited with status $ac_status" >&5
    +-$as_echo "$as_me: failed program was:" >&5
    +-sed 's/^/| /' conftest.$ac_ext >&5
    +-
    +-( exit $ac_status )
    +-{ $as_echo "$as_me:$LINENO: result: no" >&5
    +-$as_echo "no" >&6; }
    +-	ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
    +-	ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
    +-	ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"
    +-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
    +-
    +-
    +-
    +-
    + # On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
    + # addresses with less than four octets, like "1.2.3".  Also leading
    + # zeros should also be rejected.
    diff --git a/net/bing/Makefile b/net/bing/Makefile
    new file mode 100644
    index 0000000..c271e8f
    --- /dev/null
    +++ b/net/bing/Makefile
    @@ -0,0 +1,41 @@
    +#
    +# Copyright (C) 2006-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=bing
    +PKG_VERSION:=1.3.5
    +PKG_RELEASE:=0
    +
    +PKG_SOURCE:=$(PKG_NAME)_src-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://fgouget.free.fr/bing/
    +PKG_MD5SUM:=60aaee55277672d0cc163bf3f0b3d53f
    +TAR_OPTIONS += || true
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/bing
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=bing bandwidth measuring utility
    +  URL:=http://fgouget.free.fr/bing/
    +endef
    +
    +define Package/bing/description
    +	bing evaluates the raw bandwidth of a link (PSTN, xDSL, Cable ...)
    +endef
    +
    +define Build/Compile
    +	$(call Build/Compile/Default,bing)
    +endef
    +
    +define Package/bing/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/bing $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,bing))
    diff --git a/net/bird/Makefile b/net/bird/Makefile
    new file mode 100644
    index 0000000..fa12dac
    --- /dev/null
    +++ b/net/bird/Makefile
    @@ -0,0 +1,155 @@
    +# 
    +# Copyright (C) 2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=bird
    +PKG_VERSION:=1.3.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=bird-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=ftp://bird.network.cz/pub/bird
    +PKG_MD5SUM:=d11f53b79c7371b76e5c93209dbe2a10
    +PKG_BUILD_DEPENDS:=libncurses libreadline
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/bird/Default
    +  TITLE:=The BIRD Internet Routing Daemon
    +  URL:=http://bird.network.cz/
    +endef
    +
    +define Package/birdc/Default
    +  TITLE:=The BIRD command-line client
    +  URL:=http://bird.network.cz/
    +  DEPENDS:= +libreadline +libncurses
    +endef
    +
    +define Package/bird/Default/description1
    +BIRD is an internet routing daemon which manages TCP/IP routing tables
    +with support of modern routing protocols, easy to use configuration
    +interface and powerful route filtering language. It is lightweight and
    +efficient and therefore appropriate for small embedded routers.
    +
    +endef
    +
    +define Package/bird/Default/description2
    +In BGP, BIRD supports communities, multiprotocol extensions, MD5
    +authentication, 32bit AS numbers and could act as a route server or a
    +route reflector. BIRD also supports multiple RIBs, multiple kernel
    +routing tables and redistribution between the protocols with a powerful
    +configuration syntax.
    +
    +endef
    +
    +define Package/bird/Default/description3
    +This is a BIRD command-line client. It is used to send commands to BIRD,
    +commands can perform simple actions such as enabling/disabling of
    +protocols, telling BIRD to show various information, telling it to show
    +a routing table filtered by a filter, or asking BIRD to reconfigure.
    +
    +Unless you can't afford dependency on ncurses and readline, you
    +should install BIRD command-line client together with BIRD.
    +
    +endef
    +
    +define Package/bird4
    +$(call Package/bird/Default)
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Routing and Redirection
    +  TITLE+= (IPv4)
    +endef
    +
    +define Package/birdc4
    +$(call Package/birdc/Default)
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Routing and Redirection
    +  TITLE+= (IPv4)
    +  DEPENDS+= +bird4
    +endef
    +
    +define Package/bird6
    +$(call Package/bird/Default)
    +  SECTION:=ipv6
    +  CATEGORY:=IPv6
    +  TITLE+= (IPv6)
    +endef
    +
    +define Package/birdc6
    +$(call Package/birdc/Default)
    +  SECTION:=ipv6
    +  CATEGORY:=IPv6
    +  TITLE+= (IPv6)
    +  DEPENDS+= +bird6
    +endef
    +
    +define Package/bird4/description
    +$(call Package/bird/Default/description1)
    +This is IPv4 version of BIRD, it supports OSPFv2, RIPv2 and BGP
    +protocols.
    +
    +$(call Package/bird/Default/description2)
    +endef
    +
    +define Package/birdc4/description
    +$(call Package/bird/Default/description1)
    +$(call Package/bird/Default/description3)
    +endef
    +
    +define Package/bird6/description
    +$(call Package/bird/Default/description1)
    +This is IPv6 version of BIRD, it supports OSPFv3, RIPng and BGP
    +protocols.
    +
    +$(call Package/bird/Default/description2)
    +endef
    +
    +define Package/birdc6/description
    +$(call Package/bird/Default/description1)
    +$(call Package/bird/Default/description3)
    +endef
    +
    +CONFIGURE_ARGS += --with-linux-headers="$(LINUX_DIR)"
    +
    +define Build/Template
    +
    +$(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
    +	$(call Build/Configure/Default,$(3))
    +	$(call Build/Compile/Default,)
    +	( cd $(PKG_BUILD_DIR); mv -f bird bird$(2); mv -f birdc birdc$(2) )
    +	-$(MAKE) -C $(PKG_BUILD_DIR) clean
    +	touch $$@
    +
    +$(STAMP_BUILT): $(STAMP_BUILT)-$(2)
    +
    +define Package/bird$(2)/install
    +	$(INSTALL_DIR)  $$(1)/usr/sbin
    +	$(INSTALL_BIN)  $$(PKG_BUILD_DIR)/bird$(2) $$(1)/usr/sbin/
    +	$(INSTALL_BIN)  ./files/bird$(2)loop $$(1)/usr/sbin/
    +	$(INSTALL_DIR)  $$(1)/etc
    +	$(INSTALL_DATA) ./files/bird$(2).conf $$(1)/etc/
    +	$(INSTALL_DIR)  $$(1)/etc/init.d
    +	$(INSTALL_BIN)  ./files/bird$(2).init $$(1)/etc/init.d/bird$(2)
    +
    +endef
    +
    +define Package/birdc$(2)/install
    +	$(INSTALL_DIR) $$(1)/usr/sbin
    +	$(INSTALL_BIN) $$(PKG_BUILD_DIR)/birdc$(2) $$(1)/usr/sbin/
    +endef
    +
    +endef
    +
    +
    +$(eval $(call Build/Template,bird4,4, --disable-ipv6))
    +$(eval $(call Build/Template,bird6,6, --enable-ipv6))
    +
    +$(eval $(call BuildPackage,bird4))
    +$(eval $(call BuildPackage,birdc4))
    +$(eval $(call BuildPackage,bird6))
    +$(eval $(call BuildPackage,birdc6))
    diff --git a/net/bird/files/bird4.conf b/net/bird/files/bird4.conf
    new file mode 100644
    index 0000000..8616a0a
    --- /dev/null
    +++ b/net/bird/files/bird4.conf
    @@ -0,0 +1,121 @@
    +
    +# THIS CONFIG FILE IS NOT A COMPLETE DOCUMENTATION
    +# PLEASE LOOK IN THE BIRD DOCUMENTATION FOR MORE INFO
    +
    +# However, most of options used here are just for example
    +# and will be removed in real-life configs.
    +
    +log syslog all;
    +
    +# Override router ID
    +#router id 192.168.0.1;
    +
    +# Turn on global debugging of all protocols
    +#debug protocols all;
    +
    +
    +# Define a route filter...
    +# filter test_filter {
    +#	if net ~ 10.0.0.0/16 then accept;
    +#	else reject;
    +# }
    +
    +# The direct protocol automatically generates device routes to all network
    +# interfaces. Can exist in as many instances as you wish if you want to
    +# populate multiple routing tables with device routes. Because device routes
    +# are handled by Linux kernel, this protocol is  usually not needed.
    +# protocol direct {
    +#	interface "*";	# Restrict network interfaces it works with
    +# }
    +
    +# This pseudo-protocol performs synchronization between BIRD's routing
    +# tables and the kernel. You can run multiple instances of the kernel
    +# protocol and synchronize different kernel tables with different BIRD tables.
    +protocol kernel {
    +#	learn;			# Learn all alien routes from the kernel
    +#	persist;		# Don't remove routes on bird shutdown
    +	scan time 20;		# Scan kernel routing table every 20 seconds
    +#	import none;		# Default is import all
    +#	export all;		# Default is export none
    +}
    +
    +# This pseudo-protocol watches all interface up/down events.
    +protocol device {
    +	scan time 10;		# Scan interfaces every 10 seconds
    +}
    +
    +# Static routes (again, there can be multiple instances, so that you
    +# can disable/enable various groups of static routes on the fly).
    +protocol static {
    +#	export all;		# Default is export none
    +#	route 0.0.0.0/0 via 62.168.0.13;
    +#	route 10.0.0.0/8 reject;
    +#	route 192.168.0.0/16 reject;
    +}
    +
    +
    +#protocol rip {
    +#	disabled;
    +#	import all;
    +#	export all;
    +#	export filter test_filter;
    +
    +#	port 1520;
    +#	period 7;
    +#	infinity 16;
    +#	garbage time 60;
    +#	interface "*" { mode broadcast; };
    +#	honor neighbor;
    +#	honor always;
    +#	honor never;
    +#	authentication none;
    +#}
    +
    +
    +#protocol ospf {
    +#	disabled;
    +#	import all;
    +#	export all;
    +#	export where source = RTS_STATIC;
    +
    +#	area 0 {
    +#		interface "eth*" {
    +#			cost 10;
    +#			hello 3;
    +#			retransmit 2;
    +#			wait 5;
    +#			dead 20;
    +#			type broadcast;
    +#			authentication simple;
    +#			password "pass";
    +#		};
    +#	};
    +#}
    +
    +
    +#protocol bgp {
    +#	disabled;
    +#	import all;
    +#	export all;
    +#	export where source = RTS_STATIC;
    +
    +#	local as 65000;
    +#	neighbor 192.168.1.1 as 65001;
    +#	multihop 20 via 192.168.2.1;
    +
    +#	hold time 240;
    +#	startup hold time 240;
    +#	connect retry time 120;
    +#	keepalive time 80;	# defaults to hold time / 3
    +#	start delay time 5;	# How long do we wait before initial connect
    +#	error wait time 60, 300;# Minimum and maximum time we wait after an error (when consecutive
    +#				# errors occur, we increase the delay exponentially ...
    +#	error forget time 300;	# ... until this timeout expires)
    +#	disable after error;	# Disable the protocol automatically when an error occurs
    +#	next hop self;		# Disable next hop processing and always advertise our local address as nexthop
    +#	source address 62.168.0.14;	# What local address we use for the TCP connection
    +#	password "secret"	# Password used for MD5 authentication
    +#	rr client;		# I am a route reflector and the neighor is my client
    +#	rr cluster id 1.0.0.1	# Use this value for cluster id instead of my router id 
    +#	};
    +#}
    diff --git a/net/bird/files/bird4.init b/net/bird/files/bird4.init
    new file mode 100644
    index 0000000..d0e0876
    --- /dev/null
    +++ b/net/bird/files/bird4.init
    @@ -0,0 +1,22 @@
    +#!/bin/sh /etc/rc.common
    +
    +START=50
    +
    +# Birdloop is used to restart BIRD if it crashed. Unfortunately, it also
    +# hides and handles in the same manner start-time errors (like parse error
    +# in config file). Therefore, it is not used by default. If you want to
    +# use it, comment the first line and uncomment the second line in start().
    +
    +start() {
    +	/usr/sbin/bird4
    +#	/usr/sbin/bird4loop
    +}
    +
    +stop() {
    +	killall bird4
    +	sleep 1
    +}
    +
    +reload() {
    +	killall -HUP bird4
    +}
    diff --git a/net/bird/files/bird4loop b/net/bird/files/bird4loop
    new file mode 100644
    index 0000000..9d9b80d
    --- /dev/null
    +++ b/net/bird/files/bird4loop
    @@ -0,0 +1,12 @@
    +#!/bin/sh
    +
    +BIRD=/usr/sbin/bird4
    +
    +$BIRD -p
    +
    +( until $BIRD -d "$@"
    +do
    +	logger error BIRD4 died!
    +	sleep 2
    +done; ) /dev/null 2> /dev/null &
    +
    diff --git a/net/bird/files/bird6.conf b/net/bird/files/bird6.conf
    new file mode 100644
    index 0000000..8616a0a
    --- /dev/null
    +++ b/net/bird/files/bird6.conf
    @@ -0,0 +1,121 @@
    +
    +# THIS CONFIG FILE IS NOT A COMPLETE DOCUMENTATION
    +# PLEASE LOOK IN THE BIRD DOCUMENTATION FOR MORE INFO
    +
    +# However, most of options used here are just for example
    +# and will be removed in real-life configs.
    +
    +log syslog all;
    +
    +# Override router ID
    +#router id 192.168.0.1;
    +
    +# Turn on global debugging of all protocols
    +#debug protocols all;
    +
    +
    +# Define a route filter...
    +# filter test_filter {
    +#	if net ~ 10.0.0.0/16 then accept;
    +#	else reject;
    +# }
    +
    +# The direct protocol automatically generates device routes to all network
    +# interfaces. Can exist in as many instances as you wish if you want to
    +# populate multiple routing tables with device routes. Because device routes
    +# are handled by Linux kernel, this protocol is  usually not needed.
    +# protocol direct {
    +#	interface "*";	# Restrict network interfaces it works with
    +# }
    +
    +# This pseudo-protocol performs synchronization between BIRD's routing
    +# tables and the kernel. You can run multiple instances of the kernel
    +# protocol and synchronize different kernel tables with different BIRD tables.
    +protocol kernel {
    +#	learn;			# Learn all alien routes from the kernel
    +#	persist;		# Don't remove routes on bird shutdown
    +	scan time 20;		# Scan kernel routing table every 20 seconds
    +#	import none;		# Default is import all
    +#	export all;		# Default is export none
    +}
    +
    +# This pseudo-protocol watches all interface up/down events.
    +protocol device {
    +	scan time 10;		# Scan interfaces every 10 seconds
    +}
    +
    +# Static routes (again, there can be multiple instances, so that you
    +# can disable/enable various groups of static routes on the fly).
    +protocol static {
    +#	export all;		# Default is export none
    +#	route 0.0.0.0/0 via 62.168.0.13;
    +#	route 10.0.0.0/8 reject;
    +#	route 192.168.0.0/16 reject;
    +}
    +
    +
    +#protocol rip {
    +#	disabled;
    +#	import all;
    +#	export all;
    +#	export filter test_filter;
    +
    +#	port 1520;
    +#	period 7;
    +#	infinity 16;
    +#	garbage time 60;
    +#	interface "*" { mode broadcast; };
    +#	honor neighbor;
    +#	honor always;
    +#	honor never;
    +#	authentication none;
    +#}
    +
    +
    +#protocol ospf {
    +#	disabled;
    +#	import all;
    +#	export all;
    +#	export where source = RTS_STATIC;
    +
    +#	area 0 {
    +#		interface "eth*" {
    +#			cost 10;
    +#			hello 3;
    +#			retransmit 2;
    +#			wait 5;
    +#			dead 20;
    +#			type broadcast;
    +#			authentication simple;
    +#			password "pass";
    +#		};
    +#	};
    +#}
    +
    +
    +#protocol bgp {
    +#	disabled;
    +#	import all;
    +#	export all;
    +#	export where source = RTS_STATIC;
    +
    +#	local as 65000;
    +#	neighbor 192.168.1.1 as 65001;
    +#	multihop 20 via 192.168.2.1;
    +
    +#	hold time 240;
    +#	startup hold time 240;
    +#	connect retry time 120;
    +#	keepalive time 80;	# defaults to hold time / 3
    +#	start delay time 5;	# How long do we wait before initial connect
    +#	error wait time 60, 300;# Minimum and maximum time we wait after an error (when consecutive
    +#				# errors occur, we increase the delay exponentially ...
    +#	error forget time 300;	# ... until this timeout expires)
    +#	disable after error;	# Disable the protocol automatically when an error occurs
    +#	next hop self;		# Disable next hop processing and always advertise our local address as nexthop
    +#	source address 62.168.0.14;	# What local address we use for the TCP connection
    +#	password "secret"	# Password used for MD5 authentication
    +#	rr client;		# I am a route reflector and the neighor is my client
    +#	rr cluster id 1.0.0.1	# Use this value for cluster id instead of my router id 
    +#	};
    +#}
    diff --git a/net/bird/files/bird6.init b/net/bird/files/bird6.init
    new file mode 100644
    index 0000000..69b39ff
    --- /dev/null
    +++ b/net/bird/files/bird6.init
    @@ -0,0 +1,22 @@
    +#!/bin/sh /etc/rc.common
    +
    +START=50
    +
    +# Birdloop is used to restart BIRD if it crashed. Unfortunately, it also
    +# hides and handles in the same manner start-time errors (like parse error
    +# in config file). Therefore, it is not used by default. If you want to
    +# use it, comment the first line and uncomment the second line in start().
    +
    +start() {
    +	/usr/sbin/bird6
    +#	/usr/sbin/bird6loop
    +}
    +
    +stop() {
    +	killall bird6
    +	sleep 1
    +}
    +
    +reload() {
    +	killall -HUP bird6
    +}
    diff --git a/net/bird/files/bird6loop b/net/bird/files/bird6loop
    new file mode 100644
    index 0000000..5692125
    --- /dev/null
    +++ b/net/bird/files/bird6loop
    @@ -0,0 +1,12 @@
    +#!/bin/sh
    +
    +BIRD=/usr/sbin/bird6
    +
    +$BIRD -p
    +
    +( until $BIRD -d "$@"
    +do
    +	logger error BIRD6 died!
    +	sleep 2
    +done; ) /dev/null 2> /dev/null &
    +
    diff --git a/net/bird/patches/0001-change_config_name.patch b/net/bird/patches/0001-change_config_name.patch
    new file mode 100644
    index 0000000..98532f7
    --- /dev/null
    +++ b/net/bird/patches/0001-change_config_name.patch
    @@ -0,0 +1,20 @@
    +diff --git a/sysdep/config.h b/sysdep/config.h
    +index 03399bd..bc5eb77 100644
    +--- a/sysdep/config.h
    ++++ b/sysdep/config.h
    +@@ -46,11 +46,11 @@ typedef u16 word;
    + #  endif
    + #else
    + #  ifdef DEBUGGING
    +-#    define PATH_CONFIG "bird.conf"
    +-#    define PATH_CONTROL_SOCKET "bird.ctl"
    ++#    define PATH_CONFIG "bird4.conf"
    ++#    define PATH_CONTROL_SOCKET "bird4.ctl"
    + #  else
    +-#    define PATH_CONFIG PATH_CONFIG_DIR "/bird.conf"
    +-#    define PATH_CONTROL_SOCKET PATH_CONTROL_SOCKET_DIR "/bird.ctl"
    ++#    define PATH_CONFIG PATH_CONFIG_DIR "/bird4.conf"
    ++#    define PATH_CONTROL_SOCKET PATH_CONTROL_SOCKET_DIR "/bird4.ctl"
    + #  endif
    + #endif
    + 
    diff --git a/net/bitchx/Makefile b/net/bitchx/Makefile
    new file mode 100644
    index 0000000..9857bee
    --- /dev/null
    +++ b/net/bitchx/Makefile
    @@ -0,0 +1,70 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=bitchx
    +PKG_VERSION:=1.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=ircii-pana-$(PKG_VERSION)-final.tar.gz
    +PKG_SOURCE_URL:=http://bitchx.org/files/source/
    +PKG_MD5SUM:=611d2dda222f00c10140236f4c331572
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/BitchX
    +
    +PKG_BUILD_DEPENDS:=libncurses
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/bitchx
    +  SUBMENU:=Instant Messaging
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libncurses
    +  TITLE:=popular IRC client
    +  URL:=http://www.bitchx.org
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all
    +	mkdir -p $(PKG_INSTALL_DIR)/tmp
    +	mkdir -p $(PKG_INSTALL_DIR)/etc/init.d
    +	mkdir -p $(PKG_INSTALL_DIR)/usr/bin
    +	mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx
    +	mkdir -p $(PKG_INSTALL_DIR)/usr/share/man/man1
    +	mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx/translation
    +	mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx/plugins
    +	mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx/help
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/BitchX $(PKG_INSTALL_DIR)/usr/bin/BitchX-1.1-final
    +	rm -f $(PKG_INSTALL_DIR)/usr/bin/BitchX
    +	ln -s /usr/bin/BitchX-1.1-final $(PKG_INSTALL_DIR)/usr/bin/BitchX 
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/BitchX.help $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.help
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/BitchX.ircnames $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.ircnames
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/BitchX.quit $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.quit
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/BitchX.reasons $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.kick
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/source/wserv $(PKG_INSTALL_DIR)/usr/lib/bx/wserv
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/scr-bx $(PKG_INSTALL_DIR)/usr/bin/scr-bx
    +	$(CP) $(PKG_BUILD_DIR)/script $(PKG_INSTALL_DIR)/usr/lib/bx/
    +	$(CP) $(PKG_BUILD_DIR)/translation $(PKG_INSTALL_DIR)/usr/lib/bx/
    +	bzip2 $(PKG_INSTALL_DIR)/usr/lib/bx/translation/*
    +	$(CP) ./files/bitchxrc $(PKG_INSTALL_DIR)/tmp/.bitchxrc
    +	$(CP) ./files/bitchxrc.init $(PKG_INSTALL_DIR)/etc/init.d/bitchxrc
    +endef
    +
    +define Package/bitchx/install
    +	$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/etc/init.d $(1)/tmp
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/init.d/bitchxrc $(1)/etc/init.d/
    +	$(CP) $(PKG_INSTALL_DIR)/tmp/.bitchxrc $(1)/tmp
    +endef
    +
    +$(eval $(call BuildPackage,bitchx))
    diff --git a/net/bitchx/files/bitchxrc b/net/bitchx/files/bitchxrc
    new file mode 100644
    index 0000000..6e2b271
    --- /dev/null
    +++ b/net/bitchx/files/bitchxrc
    @@ -0,0 +1,2 @@
    +IRCUSER OpenWrt
    +IRCNAME OpenWrt User!
    diff --git a/net/bitchx/files/bitchxrc.init b/net/bitchx/files/bitchxrc.init
    new file mode 100644
    index 0000000..e5966d3
    --- /dev/null
    +++ b/net/bitchx/files/bitchxrc.init
    @@ -0,0 +1,11 @@
    +#!/bin/sh /etc/rc.common
    +
    +START=98
    +start() {
    +	# make /tmp/.bitchxrc as many servers ban root
    +	if [ ! -e /tmp/.bitchxrc ]
    +	then
    +		echo "IRCUSER OpenWrt" >/tmp/.bitchxrc
    +		echo "IRCNAME OpenWrt User!" >>/tmp/.bitchxrc
    +	fi
    +}
    diff --git a/net/bitchx/patches/001-fix_declarations.patch b/net/bitchx/patches/001-fix_declarations.patch
    new file mode 100644
    index 0000000..b6766da
    --- /dev/null
    +++ b/net/bitchx/patches/001-fix_declarations.patch
    @@ -0,0 +1,24 @@
    +diff -urN BitchX/include/ctcp.h BitchX.new/include/ctcp.h
    +--- BitchX/include/ctcp.h	2003-04-11 03:09:07.000000000 +0200
    ++++ BitchX.new/include/ctcp.h	2006-03-29 13:19:21.170693168 +0200
    +@@ -56,7 +56,7 @@
    + extern CtcpEntryDll *dll_ctcp;
    + 
    + 
    +-extern		char	*ctcp_type[];
    ++//extern		char	*ctcp_type[]; /* already declared in ctcp.c
    + extern		int	sed;
    + extern		int	in_ctcp_flag;
    + 
    +diff -urN BitchX/include/struct.h BitchX.new/include/struct.h
    +--- BitchX/include/struct.h	2003-04-11 03:09:07.000000000 +0200
    ++++ BitchX.new/include/struct.h	2006-03-29 13:19:26.653859600 +0200
    +@@ -1064,7 +1064,7 @@
    + 	int	delete;
    + }	TimerList;
    + 
    +-extern TimerList *PendingTimers;
    ++//extern TimerList *PendingTimers;
    + typedef struct nicktab_stru
    + {
    + 	struct nicktab_stru *next;
    diff --git a/net/bitchx/patches/002-tparm.patch b/net/bitchx/patches/002-tparm.patch
    new file mode 100644
    index 0000000..18bd7bf
    --- /dev/null
    +++ b/net/bitchx/patches/002-tparm.patch
    @@ -0,0 +1,10 @@
    +--- BitchX/source/term.c.orig	2006-03-05 15:01:46.000000000 +1000
    ++++ BitchX/source/term.c	2006-03-05 15:01:53.000000000 +1000
    +@@ -92,7 +92,6 @@
    + #endif
    + 
    + extern  char    *getenv();
    +-extern	char	*tparm();
    + 
    + /*
    +  * The old code assumed termcap. termcap is almost always present, but on
    diff --git a/net/bitlbee/Makefile b/net/bitlbee/Makefile
    new file mode 100644
    index 0000000..912bed6
    --- /dev/null
    +++ b/net/bitlbee/Makefile
    @@ -0,0 +1,88 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=bitlbee
    +PKG_VERSION:=1.0.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=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
    +PKG_MD5SUM:=a4d7daa9b64898dd41a3a6d104692d9a
    +
    +PKG_BUILD_DEPENDS:=libopenssl glib1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/bitlbee
    +  SUBMENU:=Instant Messaging
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libopenssl +glib1 $(ICONV_DEPENDS)
    +  TITLE:=IRC gateway to IM chat networks
    +  URL:=http://www.bitlbee.org/
    +endef
    +
    +define Package/bitlbee/conffiles
    +/etc/bitlbee/motd.txt
    +/etc/bitlbee/bitlbee.conf
    +endef
    +
    +define Build/Configure
    +	# it's not GNU autoconf stuff
    +	(cd $(PKG_BUILD_DIR); \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		CFLAGS="$(TARGET_CFLAGS)" \
    +		CPPFLAGS="$(TARGET_CPPFLAGS)" \
    +		LDFLAGS="$(TARGET_LDFLAGS)" \
    +		STAGING_DIR="$(STAGING_DIR)" \
    +		STRIP="$(STRIP)" \
    +		./configure \
    +			--prefix=/usr/ \
    +			--bindir=/usr/sbin/ \
    +			--etcdir=/etc/bitlbee/ \
    +			--datadir=/usr/share/bitlbee/ \
    +			--config=/var/lib/bitlbee/ \
    +			--arch=OpenWrt \
    +			--cpu="$(ARCH)" \
    +			--debug=0 \
    +			--strip=1 \
    +			--sizeopt=1 \
    +			--ipv6=1 \
    +			--ssl=openssl \
    +			--glib1=1 \
    +			--glib1prefix="$(STAGING_DIR)/usr" \
    +	);
    +	$(SED) 's,^CFLAGS=.*,CFLAGS=$(TARGET_CFLAGS),g'\
    +		$(PKG_BUILD_DIR)/Makefile.settings
    +	@echo 'CFLAGS+=-I$(ICONV_PREFIX)/include' >> \
    +		$(PKG_BUILD_DIR)/Makefile.settings
    +	@echo 'LFLAGS+=$(TARGET_LDFLAGS)' >> \
    +		$(PKG_BUILD_DIR)/Makefile.settings
    +	@echo 'LFLAGS+=-L$(ICONV_PREFIX)/lib' >> \
    +		$(PKG_BUILD_DIR)/Makefile.settings
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR)
    +endef
    +
    +define Package/bitlbee/install
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		DESTDIR="$(1)" install-etc install-bin 
    +	$(MAKE) -C $(PKG_BUILD_DIR)/doc/user-guide \
    +		DESTDIR="$(1)" install 
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/bitlbee.init $(1)/etc/init.d/bitlbee
    +endef
    +
    +$(eval $(call BuildPackage,bitlbee))
    diff --git a/net/bitlbee/files/bitlbee.init b/net/bitlbee/files/bitlbee.init
    new file mode 100644
    index 0000000..d89ef3c
    --- /dev/null
    +++ b/net/bitlbee/files/bitlbee.init
    @@ -0,0 +1,12 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +start() {
    +	mkdir -p /var/lib/bitlbee
    +	bitlbee -D
    +}
    +
    +stop() {
    +	killall bitlbee
    +}
    diff --git a/net/bitlbee/patches/100-cross_compile_configure_fix b/net/bitlbee/patches/100-cross_compile_configure_fix
    new file mode 100644
    index 0000000..3ba17d2
    --- /dev/null
    +++ b/net/bitlbee/patches/100-cross_compile_configure_fix
    @@ -0,0 +1,98 @@
    +diff -Nur bitlbee-1.0.1-orig/configure bitlbee-1.0.1/configure
    +--- bitlbee-1.0.1-orig/configure	2006-01-14 16:14:05.000000000 +0100
    ++++ bitlbee-1.0.1/configure	2006-03-06 18:30:19.000000000 +0100
    +@@ -21,9 +21,12 @@
    + 
    + debug=0
    + strip=1
    ++sizeopt=0
    + ipv6=1
    + ssl=auto
    + 
    ++glib1=0
    ++
    + arch=`uname -s`
    + cpu=`uname -m`
    + 
    +@@ -52,11 +55,18 @@
    + 
    + --debug=0/1	Disable/enable debugging		$debug
    + --strip=0/1	Disable/enable binary stripping		$strip
    ++--sizeopt=0/1	Disable/enable size optimization        $sizeopt
    ++
    ++--arch=...	Describe Operating System ?!		$arch
    ++--cpu=...	Describe CPU				$cpu
    + 
    + --ipv6=0/1	IPv6 socket support			$ipv6
    + 
    + --ssl=...	SSL library to use (gnutls, nss, openssl, bogus, auto)
    + 							$ssl
    ++--glib1=0/1	Force usage of glib1 even if glib2 is present
    ++--glib1prefix=...
    ++
    + EOF
    + 		exit;
    + 	fi
    +@@ -110,8 +120,13 @@
    + 	echo 'CFLAGS=-g' >> Makefile.settings
    + 	echo 'DEBUG=1' >> Makefile.settings
    + 	echo '#define DEBUG' >> config.h
    ++	if [ "$sizeopt" = "1" ]; then
    ++		echo "Warning: won't optimize for size since debug is on."
    ++	fi
    ++elif [ "$sizeopt" = "1" ]; then
    ++	echo 'CFLAGS=-Os' >> Makefile.settings
    + else
    +-	echo 'CFLAGS=-O3' >> Makefile.settings
    ++	echo 'CFLAGS=-O2' >> Makefile.settings
    + fi
    + 
    + echo CFLAGS+=-I`pwd` -I`pwd`/protocols -I. >> Makefile.settings
    +@@ -138,24 +153,33 @@
    + 	exit 1;
    + fi
    + 
    +-if type pkg-config > /dev/null 2>/dev/null && pkg-config glib-2.0; then
    ++if [ "$glib1" != "1" ] && \
    ++   type pkg-config > /dev/null 2>/dev/null && pkg-config glib-2.0; then
    + 	cat<>Makefile.settings
    + EFLAGS+=`pkg-config --libs glib-2.0`
    + CFLAGS+=`pkg-config --cflags glib-2.0`
    + EOF
    + 	echo '#define GLIB2' >> config.h
    +-elif type glib-config > /dev/null 2> /dev/null; then
    ++elif [ "x$glib1prefix" = "x" ] && \
    ++     type glib-config > /dev/null 2> /dev/null; then
    + 	cat<>Makefile.settings
    + EFLAGS+=`glib-config --libs`
    + CFLAGS+=`glib-config --cflags`
    + EOF
    + 	echo '#define GLIB1' >> config.h
    ++elif [ "x$glib1prefix" != "x" ] && \
    ++     type "$glib1prefix/bin/glib-config" > /dev/null 2> /dev/null; then
    ++	cat<>Makefile.settings
    ++EFLAGS+=`$glib1prefix/bin/glib-config --prefix=$glib1prefix --libs`
    ++CFLAGS+=`$glib1prefix/bin/glib-config --prefix=$glib1prefix --cflags`
    ++EOF
    ++	echo '#define GLIB1' >> config.h
    + else
    + 	echo 'Cannot find glib development libraries, aborting. (Install libglib-dev?)'
    + 	exit 1;
    + fi
    + 
    +-if [ -r /usr/include/iconv.h ]; then
    ++if [ -r "$STAGING_DIR/usr/include/iconv.h" ]; then
    + 	:;
    + elif [ -r /usr/local/include/iconv.h ]; then
    + 	echo CFLAGS+=-I/usr/local/include >> Makefile.settings;
    +@@ -360,6 +384,10 @@
    + CYGWIN* )
    + 	echo 'Cygwin is not officially supported.'
    + ;;
    ++OpenWrt )
    ++	echo 'EFLAGS+=-liconv' >> Makefile.settings;
    ++	echo "CFLAGS+=\"-I$STAGING_DIR/usr/include\"" >> Makefile.settings;
    ++;;
    + * )
    + 	echo 'We haven'\''t tested BitlBee on many platforms yet, yours is untested. YMMV.'
    + 	echo 'Please report any problems at http://bugs.bitlbee.org/.'
    diff --git a/net/bmon/Makefile b/net/bmon/Makefile
    new file mode 100644
    index 0000000..6235265
    --- /dev/null
    +++ b/net/bmon/Makefile
    @@ -0,0 +1,49 @@
    +#
    +# Copyright (C) 2007 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=bmon
    +PKG_VERSION:=2.1.0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://people.suug.ch/~tgr/bmon/files/
    +PKG_MD5SUM:=3111a027907016c0902d67350c619df6
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/bmon
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libncurses
    +  TITLE:=bmon is a portable bandwidth monitor
    +  URL:=http://people.suug.ch/~tgr/bmon/
    +endef
    +
    +define Package/bmon/description
    +	bmon is a portable bandwidth monitor 
    +	and rate estimator running on various 
    +	operating systems. It supports various 
    +	input methods for different architectures.
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--disable-cnt-workaround \
    +	--disable-dbi \
    +	--disable-rrd \
    +	--disable-asound \
    +
    +CONFIGURE_VARS += \
    +	ac_cv_lib_nl_nl_connect=no \
    +
    +define Package/bmon/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/bmon $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,bmon))
    diff --git a/net/bmon/patches/001-bugfixes.patch b/net/bmon/patches/001-bugfixes.patch
    new file mode 100644
    index 0000000..fcb9306
    --- /dev/null
    +++ b/net/bmon/patches/001-bugfixes.patch
    @@ -0,0 +1,26 @@
    +Index: bmon-2.1.0/src/out_audio.c
    +===================================================================
    +--- bmon-2.1.0.orig/src/out_audio.c	2007-11-20 17:25:54.000000000 +0100
    ++++ bmon-2.1.0/src/out_audio.c	2007-11-20 17:25:54.000000000 +0100
    +@@ -141,7 +141,7 @@
    + 	.om_draw = audio_draw,
    + 	.om_set_opts = audio_set_opts,
    + 	.om_probe = audio_probe,
    +-	.om_shutdown audio_shutdown,
    ++	.om_shutdown = audio_shutdown,
    + };
    + 
    + static void __init audio_init(void)
    +Index: bmon-2.1.0/src/out_xml_event.c
    +===================================================================
    +--- bmon-2.1.0.orig/src/out_xml_event.c	2007-11-20 17:25:54.000000000 +0100
    ++++ bmon-2.1.0/src/out_xml_event.c	2007-11-20 17:25:54.000000000 +0100
    +@@ -127,7 +127,7 @@
    + 	.om_draw = xml_event_draw,
    + 	.om_set_opts = xml_event_set_opts,
    + 	.om_probe = xml_event_probe,
    +-	.om_shutdown xml_event_shutdown,
    ++	.om_shutdown = xml_event_shutdown,
    + };
    + 
    + static void __init xml_event_init(void)
    diff --git a/net/bmx6/Makefile b/net/bmx6/Makefile
    new file mode 100644
    index 0000000..bdcdbbf
    --- /dev/null
    +++ b/net/bmx6/Makefile
    @@ -0,0 +1,102 @@
    +#
    +# Copyright (C) 2011 OpenWrt.org, bmx6.net
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +# $Id$
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=bmx6
    +
    +
    +PKG_SOURCE_PROTO:=git
    +PKG_SOURCE_URL:=git://git.bmx6.net/bmx6.git
    +PKG_REV:=c3ef7d76292a765c5e578bd4113030dc34ee3b9a
    +
    +PKG_VERSION:=r2011031602
    +
    +#PKG_RELEASE:=1
    +#PKG_INSTALL:=1  # this tries to install straight to /usr/sbin/bmx6
    +
    +PKG_SOURCE_VERSION:=$(PKG_REV)
    +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
    +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +#-DNO_TRAFFIC_DUMP -DNO_DYN_PLUGIN -DNO_DEBUG_DUMP -DNO_DEBUG_ALL -DNO_DEBUG_TRACK -DNO_DEBUG_SYS
    +
    +MAKE_ARGS += \
    +	EXTRA_CFLAGS="$(TARGET_CFLAGS) -I. -I$(STAGING_DIR)/usr/include -DNO_DEBUG_ALL -DNO_DEBUG_DUMP" \
    +	EXTRA_LDFLAGS="-L$(STAGING_DIR)/usr/lib " \
    +	REVISION_VERSION="$(PKG_REV)" \
    +	CC="$(TARGET_CC)" \
    +	INSTALL_DIR="$(PKG_INSTALL_DIR)" \
    +	STRIP="/bin/true" \
    +	build_all
    +
    +
    +define Package/bmx6/Default
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Routing and Redirection
    +  TITLE:=BMX6 layer 3 routing daemon
    +  URL:=http://bmx6.net/
    +  MAINTAINER:=Axel Neumann 
    +endef
    +
    +define Package/bmx6/description
    +BMX6 layer 3 routing daemon supporting IPv4, IPv6, and IPv4 over IPv6 -  http://www.bmx6.net
    +endef
    +
    +define Package/bmx6
    +  $(call Package/bmx6/Default)
    +  MENU:=1
    +endef
    +
    +define Package/bmx6-uci-config
    +  $(call Package/bmx6/Default)
    +  DEPENDS:=bmx6 +libuci
    +  TITLE:=configuration plugin based on uci (recommended!)
    +endef
    +
    +
    +
    +
    +define Build/Configure
    +	mkdir -p $(PKG_INSTALL_DIR)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS)
    +endef
    +
    +
    +define Package/bmx6/install
    +	$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/bmx6 $(1)/usr/sbin/bmx6
    +endef
    +
    +
    +define Package/bmx6-uci-config/conffiles
    +/etc/config/bmx6
    +endef
    +
    +
    +define Package/bmx6-uci-config/install
    +	$(INSTALL_DIR) $(1)/usr/lib $(1)/etc/config $(1)/etc/init.d
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_uci_config/bmx6_config.so $(1)/usr/lib/bmx6_config.so
    +	$(INSTALL_BIN) ./files/etc/init.d/bmx6 $(1)/etc/init.d/bmx6
    +	$(INSTALL_DATA) ./files/etc/config/bmx6 $(1)/etc/config/bmx6
    +endef
    +
    +
    +$(eval $(call BuildPackage,bmx6))
    +$(eval $(call BuildPackage,bmx6-uci-config))
    +
    diff --git a/net/bmx6/files/etc/config/bmx6 b/net/bmx6/files/etc/config/bmx6
    new file mode 100644
    index 0000000..d593e74
    --- /dev/null
    +++ b/net/bmx6/files/etc/config/bmx6
    @@ -0,0 +1,23 @@
    +# for more options execute: bmx6 --help
    +
    +config 'bmx6' 'general'
    +#       option 'runtime_dir' '/var/run/bmx6'
    +#       option 'niit_source' '10.202.0.116'
    +
    +#config 'ip_version' 'ip_version'
    +#       option 'ip_version' '6'   # default is 4
    +#       option 'throw_rules' '0'
    +
    +config 'dev' 'mesh_1'
    +        option 'dev' 'eth0.12'
    +
    +config 'dev' 'mesh_2'
    +        option 'dev' 'ath0.12'
    +
    +#config 'unicast_hna' 'my_global_prefix'
    +#       option 'unicast_hna' '2012:0:0:74:0:0:0:0/64'
    +
    +#config 'unicast_hna' 'niit6to4'
    +#       option 'unicast_hna' '0:0:0:0:0:ffff:10.202.0.116/128'
    +
    +
    diff --git a/net/bmx6/files/etc/init.d/bmx6 b/net/bmx6/files/etc/init.d/bmx6
    new file mode 100644
    index 0000000..c584718
    --- /dev/null
    +++ b/net/bmx6/files/etc/init.d/bmx6
    @@ -0,0 +1,20 @@
    +#!/bin/sh /etc/rc.common
    +START=91
    +
    +BIN=/usr/sbin/bmx6
    +CONF=/etc/config/bmx6
    +PID=/var/run/bmx6/pid
    +
    +
    +start() {
    +	#$BIN -f $CONF -d0 > /dev/null &
    +	start-stop-daemon -b -x $BIN -S -- -f $CONF
    +}
    +
    +stop() {
    +	start-stop-daemon -p $PID -K
    +}
    +
    +restart() {
    +	stop; sleep 3; start
    +}
    diff --git a/net/bmxd/Makefile b/net/bmxd/Makefile
    new file mode 100644
    index 0000000..c182d8e
    --- /dev/null
    +++ b/net/bmxd/Makefile
    @@ -0,0 +1,75 @@
    +#
    +# Copyright (C) 2008 Freifunk Leipzig
    +# Copyright (C) 2008-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=bmxd
    +
    +PKG_SOURCE_PROTO:=git
    +PKG_SOURCE_URL:=git://git.bmx6.net/bmxd.git
    +PKG_REV:=0f8bd1285741d709cfbfbdf4ee443e3c2e03da4c
    +PKG_VERSION:=r2011012201
    +#PKG_RELEASE:=1
    +PKG_SOURCE_VERSION:=$(PKG_REV)
    +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
    +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
    +
    +PKG_EXTRA_CFLAGS:=-DNODEBUGALL
    +
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/bmxd/Default
    +  URL:=http://www.bmx6.net/
    +  MAINTAINER:=Axel Neumann 
    +endef
    +
    +define Package/bmxd
    +$(call Package/bmxd/Default)
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Routing and Redirection
    +  DEPENDS:=+kmod-tun
    +  TITLE:=B.a.t.M.a.n. eXperimental (BMX) layer 3 routing daemon
    +endef
    +
    +define Package/bmxd/conffiles
    +/etc/config/bmxd
    +endef
    +
    +
    +define Package/bmxd/description
    +B.a.t.M.a.n. eXperimental (BMX) layer 3 routing daemon
    +endef
    +
    +MAKE_ARGS += \
    +	EXTRA_CFLAGS="$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)" \
    +	CCFLAGS="$(TARGET_CFLAGS)" \
    +	OFLAGS="$(TARGET_CFLAGS)" \
    +	REVISION="$(PKG_REV)" \
    +	CC="$(TARGET_CC)" \
    +	NODEBUG=1 \
    +	UNAME="Linux" \
    +	INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
    +	STRIP="/bin/true" \
    +	bmxd install
    +
    +define Build/Compile
    +	mkdir -p $(PKG_INSTALL_DIR)/usr/sbin
    +	$(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS)
    +endef
    +
    +define Package/bmxd/install
    +	$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bmxd $(1)/usr/sbin/bmxd
    +	$(INSTALL_BIN) ./files/etc/init.d/bmxd $(1)/etc/init.d
    +	$(INSTALL_DATA) ./files/etc/config/bmxd $(1)/etc/config
    +endef
    +
    +$(eval $(call BuildPackage,bmxd))
    diff --git a/net/bmxd/files/etc/config/bmxd b/net/bmxd/files/etc/config/bmxd
    new file mode 100644
    index 0000000..c8619e9
    --- /dev/null
    +++ b/net/bmxd/files/etc/config/bmxd
    @@ -0,0 +1,9 @@
    +config bmxd general
    +	option interface		'ath0'
    +#	option announce			
    +#	option gateway_class		
    +#	option originator_interval	
    +#	option preferred_gateway	
    +#	option routing_class		
    +#	option visualisation_srv	
    +#	option misc			'base-port=14305'	
    diff --git a/net/bmxd/files/etc/init.d/bmxd b/net/bmxd/files/etc/init.d/bmxd
    new file mode 100644
    index 0000000..d23b4c8
    --- /dev/null
    +++ b/net/bmxd/files/etc/init.d/bmxd
    @@ -0,0 +1,51 @@
    +#!/bin/sh /etc/rc.common
    +START=91
    +. /lib/config/uci.sh
    +uci_load bmxd
    +start () {
    +	interface="$(uci get bmxd.general.interface)"
    +	if [ "$interface" = "" ]; then
    +		echo $1 Error, you must specify at least a network interface
    +		exit
    +	fi
    +	announce=$(uci get bmxd.general.announce)
    +	gateway_class=$(uci get bmxd.general.gateway_class)
    +	originator_interval=$(uci get bmxd.general.originator_interval)
    +	preferred_gateway=$(uci get bmxd.general.preferred_gateway)
    +	routing_class=$(uci get bmxd.general.routing_class)
    +	visualisation_srv=$(uci get bmxd.general.visualisation_srv)
    +	misc="$(uci get bmxd.general.misc)"
    +	bmx_args=""
    +
    +	if [ $announce ]; then
    +		bmx_args=${bmx_args}'-a '$announce' '
    +	fi
    +
    +	if [ $gateway_class ]; then
    +		bmx_args=${bmx_args}'-g '$gateway_class' '
    +	fi
    +
    +	if [ $originator_interval ]; then
    +		bmx_args=${bmx_args}'-o '$originator_interval' '
    +	fi
    +
    +	if [ $preferred_gateway ]; then
    +		bmx_args=${bmx_args}'-p '$preferred_gateway' '
    +	fi
    +
    +	if [ $routing_class ]; then
    +		bmx_args=${bmx_args}'-r '$routing_class' '
    +	fi
    +		
    +	if [ $visualisation_srv ]; then
    +		bmx_args=${bmx_args}'-s '$visualisation_srv' '
    +	fi
    +	
    +
    +	bmx_args="$misc ${bmx_args} $interface"
    +	bmxd $bmx_args >/dev/null 2>&1
    +}
    +
    +stop () {
    +	killall bmxd
    +}
    diff --git a/net/btpd/Makefile b/net/btpd/Makefile
    new file mode 100644
    index 0000000..14830d6
    --- /dev/null
    +++ b/net/btpd/Makefile
    @@ -0,0 +1,58 @@
    +#
    +# Copyright (C) 2009-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=btpd
    +PKG_VERSION:=0.16
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=https://github.com/downloads/btpd/btpd
    +PKG_MD5SUM:=fe042aae8d7c515ecd855673d1c2b33e
    +
    +PKG_FIXUP:=autoreconf
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/btpd
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libpthread
    +  SUBMENU:=BitTorrent
    +  TITLE:=btpd - BitTorrent Protocol Daemon
    +  URL:=https://github.com/btpd/btpd/wiki/
    +endef
    +
    +define Package/btpd/description
    +	BTPD is a bittorrent client consisting of a daemon and client commands,
    +	which can be used to read and/or manipulate the daemon state.
    +	The daemon is capable of running several torrents simultaneously and
    +	only uses one tcp port.
    +	It's fairly low on resource usage and should be perfect for file
    +	distribution sites.
    +	Efficient downloads and ease of use makes this client a good choice for
    +	the casual user as well.
    +endef
    +
    +define Package/btpd/conffiles
    +/etc/config/btpd
    +endef
    +
    +CONFIGURE_ARGS += -C --with-evloop-method=poll
    +
    +define Package/btpd/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bt{cli,info,pd} $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/btpd.init $(1)/etc/init.d/btpd
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_CONF) ./files/btpd.config $(1)/etc/config/btpd
    +endef
    +
    +$(eval $(call BuildPackage,btpd))
    diff --git a/net/btpd/files/btpd.config b/net/btpd/files/btpd.config
    new file mode 100644
    index 0000000..9650fc9
    --- /dev/null
    +++ b/net/btpd/files/btpd.config
    @@ -0,0 +1,7 @@
    +config 'btpd'
    +	option 'directory' '/usb/btpd'
    +	option 'maxkbin' '1000'
    +	option 'maxkbout' '40'
    +	option 'maxpeers' '140'
    +	option 'maxuploads' '50'
    +	option 'port' '47194'
    diff --git a/net/btpd/files/btpd.init b/net/btpd/files/btpd.init
    new file mode 100644
    index 0000000..8f266c6
    --- /dev/null
    +++ b/net/btpd/files/btpd.init
    @@ -0,0 +1,67 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006-2010 OpenWrt.org
    +START=99
    +
    +append_bool() {
    +	local section="$1"
    +	local option="$2"
    +	local value="$3"
    +	local _loctmp
    +	config_get_bool _loctmp "$section" "$option" 0
    +	[ "$_loctmp" -gt 0 ] && append args "$value"
    +}
    +
    +append_parm() {
    +	local section="$1"
    +	local option="$2"
    +	local switch="$3"
    +	local _loctmp
    +	config_get _loctmp "$section" "$option"
    +	[ -z "$_loctmp" ] && return 0
    +	append args "$switch $_loctmp"
    +}
    +
    +directory=""
    +
    +btpd() {
    +	local cfg="$1"
    +	append_bool "$cfg" useipv4 "-4"
    +	append_bool "$cfg" useipv6 "-6"
    +	append_bool "$cfg" emptystart "--empty-start"
    +	append_parm "$cfg" port "-p"
    +	append_parm "$cfg" directory "-d"
    +	append_parm "$cfg" maxpeers "--max-peers"
    +	append_parm "$cfg" maxuploads "--max-uploads"
    +	append_parm "$cfg" maxkbin "--bw-in"
    +	append_parm "$cfg" maxkbout "--bw-out"
    +	config_get directory "$cfg" directory
    +}
    +
    +start() {
    +	include /lib/network
    +	config_load btpd
    +	args=""
    +	config_foreach btpd btpd
    +	/usr/bin/btpd $args
    +}
    +
    +stop() {
    +	include /lib/network
    +	config_load btpd
    +	args=""
    +	config_foreach btpd btpd
    +	
    +	[ -d $directory ] && args="-d $directory "
    +	echo -n "stop btpd "
    +	
    +	while btcli $args kill ; do
    +		echo -n .
    +		sleep 3
    +	done 2>/dev/null
    +	
    +	killall /usr/bin/btpd > /dev/null 2>&1
    +	
    +	echo " done"
    +	return 0
    +}
    +
    diff --git a/net/btpd/patches/000-sha1.diff b/net/btpd/patches/000-sha1.diff
    new file mode 100644
    index 0000000..a6d8640
    --- /dev/null
    +++ b/net/btpd/patches/000-sha1.diff
    @@ -0,0 +1,731 @@
    +--- a/btpd/btpd.c
    ++++ b/btpd/btpd.c
    +@@ -1,6 +1,6 @@
    + #include "btpd.h"
    + 
    +-#include 
    ++#include "sha1.h"
    + #include 
    + 
    + static uint8_t m_peer_id[20];
    +@@ -114,7 +114,7 @@ btpd_init(void)
    +     idcon[sizeof(idcon) - 1] = '\0';
    +     n = strlen(idcon);
    + 
    +-    SHA1(idcon, n, m_peer_id);
    ++    sha1_buffer(idcon, n, m_peer_id);
    +     bcopy(m_peer_id, &seed, sizeof(seed));
    +     bcopy(BTPD_VERSION, m_peer_id, sizeof(BTPD_VERSION) - 1);
    +     m_peer_id[sizeof(BTPD_VERSION) - 1] = '|';
    +--- a/btpd/content.c
    ++++ b/btpd/content.c
    +@@ -1,6 +1,6 @@
    + #include "btpd.h"
    + 
    +-#include 
    ++#include "sha1.h"
    + #include 
    + 
    + struct content {
    +@@ -60,16 +60,16 @@ static struct timeout m_workev;
    + static int
    + test_hash(struct torrent *tp, uint8_t *hash, uint32_t piece)
    + {
    +-    char piece_hash[SHA_DIGEST_LENGTH];
    ++    char piece_hash[SHA1_DIGEST_SIZE];
    +     tlib_read_hash(tp->tl, tp->pieces_off, piece, piece_hash);
    +-    return bcmp(hash, piece_hash, SHA_DIGEST_LENGTH);
    ++    return bcmp(hash, piece_hash, SHA1_DIGEST_SIZE);
    + }
    + 
    + static int
    + test_piece(struct torrent *tp, uint32_t piece, int *ok)
    + {
    +     int err;
    +-    uint8_t hash[SHA_DIGEST_LENGTH];
    ++    uint8_t hash[SHA1_DIGEST_SIZE];
    +     if ((err = bts_sha(tp->cm->rds, piece * tp->piece_length,
    +              torrent_piece_size(tp, piece), hash)) != 0) {
    +         btpd_log(BTPD_L_ERROR, "io error on '%s' (%s).\n",
    +--- a/btpd/download_subr.c
    ++++ b/btpd/download_subr.c
    +@@ -21,7 +21,7 @@
    + 
    + #include "btpd.h"
    + 
    +-#include 
    ++#include "sha1.h"
    + #include 
    + 
    + static void
    +@@ -42,7 +42,7 @@ piece_log_hashes(struct piece *pc)
    +     for (unsigned i = 0; i < pc->nblocks; i++) {
    +         uint32_t bsize = torrent_block_size(tp, pc->index, pc->nblocks, i);
    +         cm_get_bytes(tp, pc->index, i * PIECE_BLOCKLEN, bsize, &buf);
    +-        SHA1(buf, bsize, &log->hashes[i * 20]);
    ++        sha1_buffer(buf, bsize, &log->hashes[i * 20]);
    +         free(buf);
    +     }
    + }
    +--- a/btpd/torrent.c
    ++++ b/btpd/torrent.c
    +@@ -1,7 +1,5 @@
    + #include "btpd.h"
    + 
    +-#include 
    +-
    + #define SAVE_INTERVAL 300
    + 
    + static unsigned m_nghosts;
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -29,13 +29,6 @@ rm -f conftest.c conftest.$OBJEXT
    + rm -f conftest.c conftest.$OBJEXT
    + [$3]))
    + 
    +-AC_ARG_WITH(openssl,
    +-[  --with-openssl=dir      use openssl installed in dir],
    +-[
    +-    AC_SUBST(openssl_LDFLAGS,["-L${withval}/lib -Wl,-R,${withval}/lib"])
    +-    AC_SUBST(openssl_CPPFLAGS,"-I${withval}/include")
    +-])
    +-
    + AC_ARG_WITH(evloop-method,
    + [  --with-evloop-method    select evloop method (epoll,poll,kqueue)],
    +     evloop_methods=$withval,
    +@@ -76,11 +69,6 @@ CC_ARGS_OK_IFELSE(-Wno-pointer-sign,
    + ,
    +     AC_MSG_RESULT(no))
    + 
    +-old_LDFLAGS="$LDFLAGS"
    +-LDFLAGS="$LDFLAGS $openssl_LDFLAGS"
    +-AC_CHECK_LIB(crypto, SHA1_Final,:,AC_MSG_FAILURE(btpd needs openssl's libraries and headers))
    +-LDFLAGS=$old_LDFLAGS
    +-
    + for m in $evloop_methods; do
    +     case $m in
    +     epoll)
    +--- a/misc/metainfo.c
    ++++ b/misc/metainfo.c
    +@@ -6,8 +6,7 @@
    + #include 
    + #include 
    + 
    +-#include 
    +-
    ++#include "sha1.h"
    + #include "benc.h"
    + #include "metainfo.h"
    + #include "subr.h"
    +@@ -159,7 +158,7 @@ mi_info_hash(const char *p, uint8_t *has
    +     if (hash == NULL)
    +         if ((hash = malloc(20)) == NULL)
    +             return NULL;
    +-    return SHA1(info, benc_length(info), hash);
    ++    return (uint8_t *)sha1_buffer(info, benc_length(info), hash);
    + }
    + 
    + char *
    +--- /dev/null
    ++++ b/misc/sha1.c
    +@@ -0,0 +1,428 @@
    ++/* sha1.c - Functions to compute SHA1 message digest of files or
    ++   memory blocks according to the NIST specification FIPS-180-1.
    ++
    ++   Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2008, 2009, 2010 Free
    ++   Software Foundation, Inc.
    ++
    ++   This program is free software; you can redistribute it and/or modify it
    ++   under the terms of the GNU General Public License as published by the
    ++   Free Software Foundation; either version 2, or (at your option) any
    ++   later version.
    ++
    ++   This program is distributed in the hope that it will be useful,
    ++   but WITHOUT ANY WARRANTY; without even the implied warranty of
    ++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    ++   GNU General Public License for more details.
    ++
    ++   You should have received a copy of the GNU General Public License
    ++   along with this program; if not, write to the Free Software Foundation,
    ++   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
    ++
    ++/* Written by Scott G. Miller
    ++   Credits:
    ++      Robert Klep   -- Expansion function fix
    ++*/
    ++
    ++#include 
    ++
    ++#include "sha1.h"
    ++
    ++#include 
    ++#include 
    ++#include 
    ++
    ++#if USE_UNLOCKED_IO
    ++# include "unlocked-io.h"
    ++#endif
    ++
    ++#ifdef WORDS_BIGENDIAN
    ++# define SWAP(n) (n)
    ++#else
    ++# define SWAP(n) \
    ++    (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
    ++#endif
    ++
    ++#define BLOCKSIZE 32768
    ++#if BLOCKSIZE % 64 != 0
    ++# error "invalid BLOCKSIZE"
    ++#endif
    ++
    ++/* This array contains the bytes used to pad the buffer to the next
    ++   64-byte boundary.  (RFC 1321, 3.1: Step 1)  */
    ++static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ...  */ };
    ++
    ++
    ++/* Take a pointer to a 160 bit block of data (five 32 bit ints) and
    ++   initialize it to the start constants of the SHA1 algorithm.  This
    ++   must be called before using hash in the call to sha1_hash.  */
    ++void
    ++sha1_init_ctx (struct sha1_ctx *ctx)
    ++{
    ++  ctx->A = 0x67452301;
    ++  ctx->B = 0xefcdab89;
    ++  ctx->C = 0x98badcfe;
    ++  ctx->D = 0x10325476;
    ++  ctx->E = 0xc3d2e1f0;
    ++
    ++  ctx->total[0] = ctx->total[1] = 0;
    ++  ctx->buflen = 0;
    ++}
    ++
    ++/* Copy the 4 byte value from v into the memory location pointed to by *cp,
    ++   If your architecture allows unaligned access this is equivalent to
    ++   * (uint32_t *) cp = v  */
    ++static inline void
    ++set_uint32 (char *cp, uint32_t v)
    ++{
    ++  memcpy (cp, &v, sizeof v);
    ++}
    ++
    ++/* Put result from CTX in first 20 bytes following RESBUF.  The result
    ++   must be in little endian byte order.  */
    ++void *
    ++sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf)
    ++{
    ++  char *r = resbuf;
    ++  set_uint32 (r + 0 * sizeof ctx->A, SWAP (ctx->A));
    ++  set_uint32 (r + 1 * sizeof ctx->B, SWAP (ctx->B));
    ++  set_uint32 (r + 2 * sizeof ctx->C, SWAP (ctx->C));
    ++  set_uint32 (r + 3 * sizeof ctx->D, SWAP (ctx->D));
    ++  set_uint32 (r + 4 * sizeof ctx->E, SWAP (ctx->E));
    ++
    ++  return resbuf;
    ++}
    ++
    ++/* Process the remaining bytes in the internal buffer and the usual
    ++   prolog according to the standard and write the result to RESBUF.  */
    ++void *
    ++sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf)
    ++{
    ++  /* Take yet unprocessed bytes into account.  */
    ++  uint32_t bytes = ctx->buflen;
    ++  size_t size = (bytes < 56) ? 64 / 4 : 64 * 2 / 4;
    ++
    ++  /* Now count remaining bytes.  */
    ++  ctx->total[0] += bytes;
    ++  if (ctx->total[0] < bytes)
    ++    ++ctx->total[1];
    ++
    ++  /* Put the 64-bit file length in *bits* at the end of the buffer.  */
    ++  ctx->buffer[size - 2] = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29));
    ++  ctx->buffer[size - 1] = SWAP (ctx->total[0] << 3);
    ++
    ++  memcpy (&((char *) ctx->buffer)[bytes], fillbuf, (size - 2) * 4 - bytes);
    ++
    ++  /* Process last bytes.  */
    ++  sha1_process_block (ctx->buffer, size * 4, ctx);
    ++
    ++  return sha1_read_ctx (ctx, resbuf);
    ++}
    ++
    ++/* Compute SHA1 message digest for bytes read from STREAM.  The
    ++   resulting message digest number will be written into the 16 bytes
    ++   beginning at RESBLOCK.  */
    ++int
    ++sha1_stream (FILE *stream, void *resblock)
    ++{
    ++  struct sha1_ctx ctx;
    ++  size_t sum;
    ++
    ++  char *buffer = malloc (BLOCKSIZE + 72);
    ++  if (!buffer)
    ++    return 1;
    ++
    ++  /* Initialize the computation context.  */
    ++  sha1_init_ctx (&ctx);
    ++
    ++  /* Iterate over full file contents.  */
    ++  while (1)
    ++    {
    ++      /* We read the file in blocks of BLOCKSIZE bytes.  One call of the
    ++         computation function processes the whole buffer so that with the
    ++         next round of the loop another block can be read.  */
    ++      size_t n;
    ++      sum = 0;
    ++
    ++      /* Read block.  Take care for partial reads.  */
    ++      while (1)
    ++        {
    ++          n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
    ++
    ++          sum += n;
    ++
    ++          if (sum == BLOCKSIZE)
    ++            break;
    ++
    ++          if (n == 0)
    ++            {
    ++              /* Check for the error flag IFF N == 0, so that we don't
    ++                 exit the loop after a partial read due to e.g., EAGAIN
    ++                 or EWOULDBLOCK.  */
    ++              if (ferror (stream))
    ++                {
    ++                  free (buffer);
    ++                  return 1;
    ++                }
    ++              goto process_partial_block;
    ++            }
    ++
    ++          /* We've read at least one byte, so ignore errors.  But always
    ++             check for EOF, since feof may be true even though N > 0.
    ++             Otherwise, we could end up calling fread after EOF.  */
    ++          if (feof (stream))
    ++            goto process_partial_block;
    ++        }
    ++
    ++      /* Process buffer with BLOCKSIZE bytes.  Note that
    ++                        BLOCKSIZE % 64 == 0
    ++       */
    ++      sha1_process_block (buffer, BLOCKSIZE, &ctx);
    ++    }
    ++
    ++ process_partial_block:;
    ++
    ++  /* Process any remaining bytes.  */
    ++  if (sum > 0)
    ++    sha1_process_bytes (buffer, sum, &ctx);
    ++
    ++  /* Construct result in desired memory.  */
    ++  sha1_finish_ctx (&ctx, resblock);
    ++  free (buffer);
    ++  return 0;
    ++}
    ++
    ++/* Compute SHA1 message digest for LEN bytes beginning at BUFFER.  The
    ++   result is always in little endian byte order, so that a byte-wise
    ++   output yields to the wanted ASCII representation of the message
    ++   digest.  */
    ++void *
    ++sha1_buffer (const char *buffer, size_t len, void *resblock)
    ++{
    ++  struct sha1_ctx ctx;
    ++
    ++  /* Initialize the computation context.  */
    ++  sha1_init_ctx (&ctx);
    ++
    ++  /* Process whole buffer but last len % 64 bytes.  */
    ++  sha1_process_bytes (buffer, len, &ctx);
    ++
    ++  /* Put result in desired memory area.  */
    ++  return sha1_finish_ctx (&ctx, resblock);
    ++}
    ++
    ++void
    ++sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx)
    ++{
    ++  /* When we already have some bits in our internal buffer concatenate
    ++     both inputs first.  */
    ++  if (ctx->buflen != 0)
    ++    {
    ++      size_t left_over = ctx->buflen;
    ++      size_t add = 128 - left_over > len ? len : 128 - left_over;
    ++
    ++      memcpy (&((char *) ctx->buffer)[left_over], buffer, add);
    ++      ctx->buflen += add;
    ++
    ++      if (ctx->buflen > 64)
    ++        {
    ++          sha1_process_block (ctx->buffer, ctx->buflen & ~63, ctx);
    ++
    ++          ctx->buflen &= 63;
    ++          /* The regions in the following copy operation cannot overlap.  */
    ++          memcpy (ctx->buffer,
    ++                  &((char *) ctx->buffer)[(left_over + add) & ~63],
    ++                  ctx->buflen);
    ++        }
    ++
    ++      buffer = (const char *) buffer + add;
    ++      len -= add;
    ++    }
    ++
    ++  /* Process available complete blocks.  */
    ++  if (len >= 64)
    ++    {
    ++#if !_STRING_ARCH_unaligned
    ++# define alignof(type) offsetof (struct { char c; type x; }, x)
    ++# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0)
    ++      if (UNALIGNED_P (buffer))
    ++        while (len > 64)
    ++          {
    ++            sha1_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx);
    ++            buffer = (const char *) buffer + 64;
    ++            len -= 64;
    ++          }
    ++      else
    ++#endif
    ++        {
    ++          sha1_process_block (buffer, len & ~63, ctx);
    ++          buffer = (const char *) buffer + (len & ~63);
    ++          len &= 63;
    ++        }
    ++    }
    ++
    ++  /* Move remaining bytes in internal buffer.  */
    ++  if (len > 0)
    ++    {
    ++      size_t left_over = ctx->buflen;
    ++
    ++      memcpy (&((char *) ctx->buffer)[left_over], buffer, len);
    ++      left_over += len;
    ++      if (left_over >= 64)
    ++        {
    ++          sha1_process_block (ctx->buffer, 64, ctx);
    ++          left_over -= 64;
    ++          memcpy (ctx->buffer, &ctx->buffer[16], left_over);
    ++        }
    ++      ctx->buflen = left_over;
    ++    }
    ++}
    ++
    ++/* --- Code below is the primary difference between md5.c and sha1.c --- */
    ++
    ++/* SHA1 round constants */
    ++#define K1 0x5a827999
    ++#define K2 0x6ed9eba1
    ++#define K3 0x8f1bbcdc
    ++#define K4 0xca62c1d6
    ++
    ++/* Round functions.  Note that F2 is the same as F4.  */
    ++#define F1(B,C,D) ( D ^ ( B & ( C ^ D ) ) )
    ++#define F2(B,C,D) (B ^ C ^ D)
    ++#define F3(B,C,D) ( ( B & C ) | ( D & ( B | C ) ) )
    ++#define F4(B,C,D) (B ^ C ^ D)
    ++
    ++/* Process LEN bytes of BUFFER, accumulating context into CTX.
    ++   It is assumed that LEN % 64 == 0.
    ++   Most of this code comes from GnuPG's cipher/sha1.c.  */
    ++
    ++void
    ++sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx)
    ++{
    ++  const uint32_t *words = buffer;
    ++  size_t nwords = len / sizeof (uint32_t);
    ++  const uint32_t *endp = words + nwords;
    ++  uint32_t x[16];
    ++  uint32_t a = ctx->A;
    ++  uint32_t b = ctx->B;
    ++  uint32_t c = ctx->C;
    ++  uint32_t d = ctx->D;
    ++  uint32_t e = ctx->E;
    ++
    ++  /* First increment the byte count.  RFC 1321 specifies the possible
    ++     length of the file up to 2^64 bits.  Here we only compute the
    ++     number of bytes.  Do a double word increment.  */
    ++  ctx->total[0] += len;
    ++  if (ctx->total[0] < len)
    ++    ++ctx->total[1];
    ++
    ++#define rol(x, n) (((x) << (n)) | ((uint32_t) (x) >> (32 - (n))))
    ++
    ++#define M(I) ( tm =   x[I&0x0f] ^ x[(I-14)&0x0f] \
    ++                    ^ x[(I-8)&0x0f] ^ x[(I-3)&0x0f] \
    ++               , (x[I&0x0f] = rol(tm, 1)) )
    ++
    ++#define R(A,B,C,D,E,F,K,M)  do { E += rol( A, 5 )     \
    ++                                      + F( B, C, D )  \
    ++                                      + K             \
    ++                                      + M;            \
    ++                                 B = rol( B, 30 );    \
    ++                               } while(0)
    ++
    ++  while (words < endp)
    ++    {
    ++      uint32_t tm;
    ++      int t;
    ++      for (t = 0; t < 16; t++)
    ++        {
    ++          x[t] = SWAP (*words);
    ++          words++;
    ++        }
    ++
    ++      R( a, b, c, d, e, F1, K1, x[ 0] );
    ++      R( e, a, b, c, d, F1, K1, x[ 1] );
    ++      R( d, e, a, b, c, F1, K1, x[ 2] );
    ++      R( c, d, e, a, b, F1, K1, x[ 3] );
    ++      R( b, c, d, e, a, F1, K1, x[ 4] );
    ++      R( a, b, c, d, e, F1, K1, x[ 5] );
    ++      R( e, a, b, c, d, F1, K1, x[ 6] );
    ++      R( d, e, a, b, c, F1, K1, x[ 7] );
    ++      R( c, d, e, a, b, F1, K1, x[ 8] );
    ++      R( b, c, d, e, a, F1, K1, x[ 9] );
    ++      R( a, b, c, d, e, F1, K1, x[10] );
    ++      R( e, a, b, c, d, F1, K1, x[11] );
    ++      R( d, e, a, b, c, F1, K1, x[12] );
    ++      R( c, d, e, a, b, F1, K1, x[13] );
    ++      R( b, c, d, e, a, F1, K1, x[14] );
    ++      R( a, b, c, d, e, F1, K1, x[15] );
    ++      R( e, a, b, c, d, F1, K1, M(16) );
    ++      R( d, e, a, b, c, F1, K1, M(17) );
    ++      R( c, d, e, a, b, F1, K1, M(18) );
    ++      R( b, c, d, e, a, F1, K1, M(19) );
    ++      R( a, b, c, d, e, F2, K2, M(20) );
    ++      R( e, a, b, c, d, F2, K2, M(21) );
    ++      R( d, e, a, b, c, F2, K2, M(22) );
    ++      R( c, d, e, a, b, F2, K2, M(23) );
    ++      R( b, c, d, e, a, F2, K2, M(24) );
    ++      R( a, b, c, d, e, F2, K2, M(25) );
    ++      R( e, a, b, c, d, F2, K2, M(26) );
    ++      R( d, e, a, b, c, F2, K2, M(27) );
    ++      R( c, d, e, a, b, F2, K2, M(28) );
    ++      R( b, c, d, e, a, F2, K2, M(29) );
    ++      R( a, b, c, d, e, F2, K2, M(30) );
    ++      R( e, a, b, c, d, F2, K2, M(31) );
    ++      R( d, e, a, b, c, F2, K2, M(32) );
    ++      R( c, d, e, a, b, F2, K2, M(33) );
    ++      R( b, c, d, e, a, F2, K2, M(34) );
    ++      R( a, b, c, d, e, F2, K2, M(35) );
    ++      R( e, a, b, c, d, F2, K2, M(36) );
    ++      R( d, e, a, b, c, F2, K2, M(37) );
    ++      R( c, d, e, a, b, F2, K2, M(38) );
    ++      R( b, c, d, e, a, F2, K2, M(39) );
    ++      R( a, b, c, d, e, F3, K3, M(40) );
    ++      R( e, a, b, c, d, F3, K3, M(41) );
    ++      R( d, e, a, b, c, F3, K3, M(42) );
    ++      R( c, d, e, a, b, F3, K3, M(43) );
    ++      R( b, c, d, e, a, F3, K3, M(44) );
    ++      R( a, b, c, d, e, F3, K3, M(45) );
    ++      R( e, a, b, c, d, F3, K3, M(46) );
    ++      R( d, e, a, b, c, F3, K3, M(47) );
    ++      R( c, d, e, a, b, F3, K3, M(48) );
    ++      R( b, c, d, e, a, F3, K3, M(49) );
    ++      R( a, b, c, d, e, F3, K3, M(50) );
    ++      R( e, a, b, c, d, F3, K3, M(51) );
    ++      R( d, e, a, b, c, F3, K3, M(52) );
    ++      R( c, d, e, a, b, F3, K3, M(53) );
    ++      R( b, c, d, e, a, F3, K3, M(54) );
    ++      R( a, b, c, d, e, F3, K3, M(55) );
    ++      R( e, a, b, c, d, F3, K3, M(56) );
    ++      R( d, e, a, b, c, F3, K3, M(57) );
    ++      R( c, d, e, a, b, F3, K3, M(58) );
    ++      R( b, c, d, e, a, F3, K3, M(59) );
    ++      R( a, b, c, d, e, F4, K4, M(60) );
    ++      R( e, a, b, c, d, F4, K4, M(61) );
    ++      R( d, e, a, b, c, F4, K4, M(62) );
    ++      R( c, d, e, a, b, F4, K4, M(63) );
    ++      R( b, c, d, e, a, F4, K4, M(64) );
    ++      R( a, b, c, d, e, F4, K4, M(65) );
    ++      R( e, a, b, c, d, F4, K4, M(66) );
    ++      R( d, e, a, b, c, F4, K4, M(67) );
    ++      R( c, d, e, a, b, F4, K4, M(68) );
    ++      R( b, c, d, e, a, F4, K4, M(69) );
    ++      R( a, b, c, d, e, F4, K4, M(70) );
    ++      R( e, a, b, c, d, F4, K4, M(71) );
    ++      R( d, e, a, b, c, F4, K4, M(72) );
    ++      R( c, d, e, a, b, F4, K4, M(73) );
    ++      R( b, c, d, e, a, F4, K4, M(74) );
    ++      R( a, b, c, d, e, F4, K4, M(75) );
    ++      R( e, a, b, c, d, F4, K4, M(76) );
    ++      R( d, e, a, b, c, F4, K4, M(77) );
    ++      R( c, d, e, a, b, F4, K4, M(78) );
    ++      R( b, c, d, e, a, F4, K4, M(79) );
    ++
    ++      a = ctx->A += a;
    ++      b = ctx->B += b;
    ++      c = ctx->C += c;
    ++      d = ctx->D += d;
    ++      e = ctx->E += e;
    ++    }
    ++}
    +--- /dev/null
    ++++ b/misc/sha1.h
    +@@ -0,0 +1,92 @@
    ++/* Declarations of functions and data types used for SHA1 sum
    ++   library functions.
    ++   Copyright (C) 2000, 2001, 2003, 2005, 2006, 2008, 2009, 2010 Free Software
    ++   Foundation, Inc.
    ++
    ++   This program is free software; you can redistribute it and/or modify it
    ++   under the terms of the GNU General Public License as published by the
    ++   Free Software Foundation; either version 2, or (at your option) any
    ++   later version.
    ++
    ++   This program is distributed in the hope that it will be useful,
    ++   but WITHOUT ANY WARRANTY; without even the implied warranty of
    ++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    ++   GNU General Public License for more details.
    ++
    ++   You should have received a copy of the GNU General Public License
    ++   along with this program; if not, write to the Free Software Foundation,
    ++   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
    ++
    ++#ifndef SHA1_H
    ++# define SHA1_H 1
    ++
    ++# include 
    ++# include 
    ++
    ++# ifdef __cplusplus
    ++extern "C" {
    ++# endif
    ++
    ++#define SHA1_DIGEST_SIZE 20
    ++
    ++/* Structure to save state of computation between the single steps.  */
    ++struct sha1_ctx
    ++{
    ++  uint32_t A;
    ++  uint32_t B;
    ++  uint32_t C;
    ++  uint32_t D;
    ++  uint32_t E;
    ++
    ++  uint32_t total[2];
    ++  uint32_t buflen;
    ++  uint32_t buffer[32];
    ++};
    ++
    ++
    ++/* Initialize structure containing state of computation. */
    ++extern void sha1_init_ctx (struct sha1_ctx *ctx);
    ++
    ++/* Starting with the result of former calls of this function (or the
    ++   initialization function update the context for the next LEN bytes
    ++   starting at BUFFER.
    ++   It is necessary that LEN is a multiple of 64!!! */
    ++extern void sha1_process_block (const void *buffer, size_t len,
    ++                                struct sha1_ctx *ctx);
    ++
    ++/* Starting with the result of former calls of this function (or the
    ++   initialization function update the context for the next LEN bytes
    ++   starting at BUFFER.
    ++   It is NOT required that LEN is a multiple of 64.  */
    ++extern void sha1_process_bytes (const void *buffer, size_t len,
    ++                                struct sha1_ctx *ctx);
    ++
    ++/* Process the remaining bytes in the buffer and put result from CTX
    ++   in first 20 bytes following RESBUF.  The result is always in little
    ++   endian byte order, so that a byte-wise output yields to the wanted
    ++   ASCII representation of the message digest.  */
    ++extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf);
    ++
    ++
    ++/* Put result from CTX in first 20 bytes following RESBUF.  The result is
    ++   always in little endian byte order, so that a byte-wise output yields
    ++   to the wanted ASCII representation of the message digest.  */
    ++extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf);
    ++
    ++
    ++/* Compute SHA1 message digest for bytes read from STREAM.  The
    ++   resulting message digest number will be written into the 20 bytes
    ++   beginning at RESBLOCK.  */
    ++extern int sha1_stream (FILE *stream, void *resblock);
    ++
    ++/* Compute SHA1 message digest for LEN bytes beginning at BUFFER.  The
    ++   result is always in little endian byte order, so that a byte-wise
    ++   output yields to the wanted ASCII representation of the message
    ++   digest.  */
    ++extern void *sha1_buffer (const char *buffer, size_t len, void *resblock);
    ++
    ++# ifdef __cplusplus
    ++}
    ++# endif
    ++
    ++#endif
    +--- a/misc/stream.c
    ++++ b/misc/stream.c
    +@@ -5,7 +5,7 @@
    + #include 
    + #include 
    + 
    +-#include 
    ++#include "sha1.h"
    + 
    + #include "metainfo.h"
    + #include "subr.h"
    +@@ -161,21 +161,21 @@ bts_put(struct bt_stream *bts, off_t off
    + int
    + bts_sha(struct bt_stream *bts, off_t start, off_t length, uint8_t *hash)
    + {
    +-    SHA_CTX ctx;
    ++    struct sha1_ctx ctx;
    +     char buf[SHAFILEBUF];
    +     size_t wantread;
    +     int err = 0;
    + 
    +-    SHA1_Init(&ctx);
    ++    sha1_init_ctx(&ctx);
    +     while (length > 0) {
    +         wantread = min(length, SHAFILEBUF);
    +         if ((err = bts_get(bts, start, buf, wantread)) != 0)
    +             break;
    +         length -= wantread;
    +         start += wantread;
    +-        SHA1_Update(&ctx, buf, wantread);
    ++        sha1_process_bytes(buf, wantread, &ctx);
    +     }
    +-    SHA1_Final(hash, &ctx);
    ++    sha1_finish_ctx(&ctx, hash);
    +     return err;
    + }
    + 
    +--- a/Makefile.am
    ++++ b/Makefile.am
    +@@ -1,6 +1,6 @@
    + AM_CFLAGS=-std=c99 -Wall @WARNNPS@
    +-AM_CPPFLAGS=-D_FILE_OFFSET_BITS=64 -D@EVLOOP_METHOD@ -I$(top_srcdir)/misc -I$(top_srcdir)/evloop @openssl_CPPFLAGS@
    +-AM_LDFLAGS=@openssl_LDFLAGS@
    ++AM_CPPFLAGS=-D_FILE_OFFSET_BITS=64 -D@EVLOOP_METHOD@ -I$(top_srcdir)/misc -I$(top_srcdir)/evloop
    ++AM_LDFLAGS=
    + 
    + bin_PROGRAMS=btpd/btpd cli/btcli cli/btinfo
    + noinst_LIBRARIES=misc/libmisc.a evloop/libevloop.a
    +@@ -25,15 +25,15 @@ btpd_btpd_SOURCES=\
    + 	btpd/upload.c btpd/upload.h\
    + 	btpd/util.c
    + btpd_btpd_CFLAGS=@TD_CFLAGS@ $(AM_CFLAGS)
    +-btpd_btpd_LDADD=@TD_LIBS@ misc/libmisc.a evloop/libevloop.a -lcrypto -lm @CLOCKLIB@ @INETLIBS@
    ++btpd_btpd_LDADD=@TD_LIBS@ misc/libmisc.a evloop/libevloop.a -lm @CLOCKLIB@ @INETLIBS@
    + 
    + # btinfo
    + cli_btinfo_SOURCES=cli/btinfo.c
    +-cli_btinfo_LDADD=misc/libmisc.a -lcrypto -lm
    ++cli_btinfo_LDADD=misc/libmisc.a -lm
    + 
    + # btcli
    + cli_btcli_SOURCES=cli/btcli.c cli/btcli.h cli/add.c cli/del.c cli/list.c cli/kill.c cli/start.c cli/stop.c cli/stat.c
    +-cli_btcli_LDADD=misc/libmisc.a -lcrypto -lm @INETLIBS@
    ++cli_btcli_LDADD=misc/libmisc.a -lm @INETLIBS@
    + 
    + # libmisc
    + misc_libmisc_a_SOURCES=\
    +@@ -45,7 +45,8 @@ misc_libmisc_a_SOURCES=\
    + 	misc/iobuf.c misc/iobuf.h\
    + 	misc/queue.h\
    + 	misc/stream.c misc/stream.h\
    +-	misc/subr.c misc/subr.h
    ++	misc/subr.c misc/subr.h\
    ++	misc/sha1.c misc/sha1.h
    + 
    + # evloop
    + EXTRA_evloop_libevloop_a_SOURCES=evloop/epoll.c evloop/kqueue.c evloop/poll.c
    diff --git a/net/btpd/patches/001-gettime.patch b/net/btpd/patches/001-gettime.patch
    new file mode 100644
    index 0000000..012b95d
    --- /dev/null
    +++ b/net/btpd/patches/001-gettime.patch
    @@ -0,0 +1,11 @@
    +--- a/evloop/timer.c
    ++++ b/evloop/timer.c
    +@@ -14,7 +14,7 @@
    + int
    + evtimer_gettime(struct timespec *ts)
    + {
    +-    return clock_gettime(TIMER_CLOCK, ts);
    ++    return clock_gettime(CLOCK_REALTIME, ts);
    + }
    + 
    + #elif defined(HAVE_MACH_ABSOLUTE_TIME)
    diff --git a/net/btpd/patches/002-config.h.patch b/net/btpd/patches/002-config.h.patch
    new file mode 100644
    index 0000000..1950030
    --- /dev/null
    +++ b/net/btpd/patches/002-config.h.patch
    @@ -0,0 +1,13 @@
    +--- a/misc/sha1.c
    ++++ b/misc/sha1.c
    +@@ -23,7 +23,9 @@
    +       Robert Klep   -- Expansion function fix
    + */
    + 
    +-#include 
    ++#ifdef HAVE_CONFIG_H
    ++# include 
    ++#endif
    + 
    + #include "sha1.h"
    + 
    diff --git a/net/btpd/patches/100-clock.diff b/net/btpd/patches/100-clock.diff
    new file mode 100644
    index 0000000..223ef06
    --- /dev/null
    +++ b/net/btpd/patches/100-clock.diff
    @@ -0,0 +1,4 @@
    +--- /dev/null
    ++++ b/config.cache
    +@@ -0,0 +1 @@
    ++ac_cv_func_clock_gettime=no
    diff --git a/net/bwm/Makefile b/net/bwm/Makefile
    new file mode 100644
    index 0000000..17d2c30
    --- /dev/null
    +++ b/net/bwm/Makefile
    @@ -0,0 +1,38 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=bwm
    +PKG_VERSION:=1.1.0
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
    +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/b/bwm
    +PKG_MD5SUM:=51021a036acb92d2bda0c0c0483f9552
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/bwm
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=A very tiny bandwidth monitor
    +  URL:=http://ftp.debian.org/debian/pool/main/b/bwm
    +endef
    +
    +define Build/Compile
    +	$(TARGET_CC) $(TARGET_CFLAGS) $(PKG_BUILD_DIR)/bwm.c -o $(PKG_BUILD_DIR)/bwm
    +endef
    +
    +define Package/bwm/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/bwm $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,bwm))
    diff --git a/net/bwm/patches/001-debian.patch b/net/bwm/patches/001-debian.patch
    new file mode 100644
    index 0000000..043d862
    --- /dev/null
    +++ b/net/bwm/patches/001-debian.patch
    @@ -0,0 +1,45 @@
    +--- a/bwm.c
    ++++ b/bwm.c
    +@@ -57,7 +57,8 @@ int main(int argc, char *argv[])
    +   char buffer[256];
    +   char *buffer_pointer;
    + 
    +-  int inum;
    ++  int inum = -1;
    ++  int oldinum = -1;
    +   int field_number;
    +   int total_counter;
    +   int sleep_time = 2;
    +@@ -90,7 +91,13 @@ int main(int argc, char *argv[])
    + 
    +   while(1)
    +   {
    +-    printf("%c[H",27);
    ++    if (inum==oldinum)
    ++    {
    ++      printf("%c[H",27);
    ++    } else {
    ++      printf("%c[H%c[J",27,27);
    ++      oldinum = inum;
    ++    }
    +     printf("Bandwidth Monitor 1.1.0\n\n");
    +     printf("       Iface        RX(KB/sec)   TX(KB/sec)   Total(KB/sec)\n\n");
    + 
    +@@ -138,7 +145,7 @@ int main(int argc, char *argv[])
    + 
    +               interface[inum].rx_kbytes_dif =
    +                (interface[inum].rx_bytes_new -
    +-                interface[inum].rx_bytes_old) * 1000 / 1024;
    ++                interface[inum].rx_bytes_old) / 1024 * 1000;
    + 
    +               interface[inum].rx_rate_whole = 
    +                interface[inum].rx_kbytes_dif / 
    +@@ -157,7 +164,7 @@ int main(int argc, char *argv[])
    + 
    +               interface[inum].tx_kbytes_dif =
    +                (interface[inum].tx_bytes_new -
    +-                interface[inum].tx_bytes_old) * 1000 / 1024;
    ++                interface[inum].tx_bytes_old) / 1024 * 1000;
    + 
    +               interface[inum].tx_rate_whole = 
    +                interface[inum].tx_kbytes_dif / 
    diff --git a/net/bwping/Makefile b/net/bwping/Makefile
    new file mode 100644
    index 0000000..c63c46a
    --- /dev/null
    +++ b/net/bwping/Makefile
    @@ -0,0 +1,41 @@
    +#
    +# Copyright (C) 2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=bwping
    +PKG_VERSION:=1.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/bwping
    +PKG_MD5SUM:=e5d2de8cf61791ad16713bd86609368f
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/bwping
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=Open Source bandwidth measurement tool
    +  URL:=http://bwping.sourceforge.net
    +endef
    +
    +define Package/bwping/description
    +  BWPing is a bandwidth measurement tool based on ICMP echo
    +  request/reply.  It is especially well suited for lossy links. BWPing
    +  does not not require any special software on the remote host (only
    +  the ability to respond on ICMP echo request messages).
    +endef
    +
    +define Package/bwping/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,bwping))
    diff --git a/net/cbtt/Makefile b/net/cbtt/Makefile
    new file mode 100644
    index 0000000..f299acc
    --- /dev/null
    +++ b/net/cbtt/Makefile
    @@ -0,0 +1,83 @@
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=cbtt
    +PKG_VERSION:=20060727
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)80-$(PKG_VERSION)-src.tar.gz
    +PKG_SOURCE_URL:=@SF/bnbtusermods 
    +PKG_MD5SUM:=d6edf0a11d7e68fa3d121e91308f22f5
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)80-$(PKG_VERSION)-src
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/cbtt/Default
    +  SUBMENU:=BitTorrent
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libpthread +uclibcxx +zlib
    +  TITLE:=Bittorrent tracker
    +  URL:=http://bnbtusermods.sourceforge.net/
    +endef
    +
    +define Package/cbtt
    +$(call Package/cbtt/Default)
    +endef
    +
    +define Package/cbtt-mysql
    +$(call Package/cbtt/Default)
    +  DEPENDS+= +libmysqlclient
    +  TITLE+= (with mysql support)
    +endef
    +
    +
    +define Build/Template
    +
    +$(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++ -fno-builtin -nostdinc++" \
    +		LFLAGS="$(TARGET_LDFLAGS) -L. -nodefaultlibs $(4) -lz -luClibc++ -lm -lpthread $(LIBGCC_S)" \
    +		$(3)
    +	touch $$@
    +
    +$(STAMP_BUILT): $(STAMP_BUILT)-$(2)
    +
    +define Package/$(1)/install
    +	$(INSTALL_DIR) $$(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(3) $$(1)/usr/bin/
    +endef
    +
    +endef
    +
    +define Build/Configure
    +endef
    +
    +define Build/Compile
    +endef
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_cbtt),)
    +  define Build/without-mysql
    +    $(call Build/Template,cbtt,without-mysql,bnbt,)
    +  endef
    +endif
    +$(eval $(Build/without-mysql))
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_cbtt-mysql),)
    +  define Build/with-mysql
    +    $(call Build/Template,cbtt-mysql,with-mysql,bnbtmysql, \
    +	-L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient \
    +    )
    +  endef
    +endif
    +$(eval $(Build/with-mysql))
    +
    +$(eval $(call BuildPackage,cbtt))
    +$(eval $(call BuildPackage,cbtt-mysql))
    diff --git a/net/cbtt/patches/100-compile.patch b/net/cbtt/patches/100-compile.patch
    new file mode 100644
    index 0000000..4181d8d
    --- /dev/null
    +++ b/net/cbtt/patches/100-compile.patch
    @@ -0,0 +1,35 @@
    +Index: cbtt80-20060727-src/Makefile
    +===================================================================
    +--- cbtt80-20060727-src.orig/Makefile	2007-08-27 23:41:22.000000000 +0200
    ++++ cbtt80-20060727-src/Makefile	2007-08-27 23:41:22.000000000 +0200
    +@@ -1,6 +1,5 @@
    + SHELL = /bin/sh
    + SYSTEM = $(shell uname)
    +-C++ = g++
    + DFLAGS =
    + OFLAGS = -O2 -w
    + LFLAGS = -L. -lz
    +@@ -42,19 +41,19 @@
    + all: $(OBJS) $(OBJS_BNBT) $(OBJS_BNBTMYSQL) $(PROGS)
    + 
    + ./bnbt: $(OBJS) $(OBJS_BNBT)
    +-	$(C++) -o ./bnbt $(OBJS) $(OBJS_BNBT) $(LFLAGS)
    ++	$(CXX) -o ./bnbt $(OBJS) $(OBJS_BNBT) $(LFLAGS)
    + 
    + ./bnbtmysql: $(OBJS) $(OBJS_BNBTMYSQL)
    +-	$(C++) -o ./bnbtmysql $(OBJS) $(OBJS_BNBTMYSQL) $(LFLAGS) -L/usr/lib/mysql -lmysqlclient
    ++	$(CXX) -o ./bnbtmysql $(OBJS) $(OBJS_BNBTMYSQL) $(LFLAGS)
    + 
    + clean:
    + 	rm -f $(OBJS) $(OBJS_BNBT) $(OBJS_BNBTMYSQL) $(PROGS)
    + 
    + %.o: %.cpp
    +-	$(C++) -o $@ $(CFLAGS) -c $<
    ++	$(CXX) -o $@ $(CFLAGS) -c $<
    + 
    + %.mysql.o: %.cpp
    +-	$(C++) -o $@ $(CFLAGS) -DBNBT_MYSQL -c $<
    ++	$(CXX) -o $@ $(CFLAGS) -DBNBT_MYSQL -c $<
    + 
    + ./bnbt: $(OBJS) $(OBJS_BNBT)
    + 
    diff --git a/net/cdp/Makefile b/net/cdp/Makefile
    new file mode 100644
    index 0000000..676a3b6
    --- /dev/null
    +++ b/net/cdp/Makefile
    @@ -0,0 +1,52 @@
    +# 
    +# Copyright (C) 2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=cdp-tools
    +PKG_VERSION:=20070302
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=cdp-tools.tar.gz
    +PKG_SOURCE_URL:=http://gpl.internetconnection.net/files/
    +PKG_MD5SUM:=94e3a355a5c82a2a5b14114d1f9b0599
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +PKG_BUILD_DEPENDS:=+libpcap +libnet1
    +
    +
    +define Package/cdp-tools
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=CDP tools (CISCO)
    +  URL:=http://gpl.internetconnection.net
    +  DEPENDS:=+libpcap
    +endef
    +
    +define Package/dhcpcd/description
    +	Tools to work with the Cisco Discovery Protocol (CDP)
    +endef
    +
    +define Build/Compile
    +	CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/pcap -I$(STAGING_DIR)/usr/lib/libnet-1.1.x/include" \
    +	LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libnet-1.1.x/lib" \
    +	CFLAGS="$(TARGET_CFLAGS)" \
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +	$(TARGET_CONFIGURE_OPTS) \
    +	all
    +endef
    +
    +
    +define Package/cdp-tools/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/{cdp-send,cdp-listen,cdp-routemgr} $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,cdp-tools))
    diff --git a/net/cdp/patches/001-compile_fixes.patch b/net/cdp/patches/001-compile_fixes.patch
    new file mode 100644
    index 0000000..90be6df
    --- /dev/null
    +++ b/net/cdp/patches/001-compile_fixes.patch
    @@ -0,0 +1,13 @@
    +--- a/Makefile.orig	2006-10-26 20:58:35.000000000 +0300
    ++++ b/Makefile	2009-05-22 18:20:44.000000000 +0300
    +@@ -1,7 +1,6 @@
    +-CFLAGS += $(shell libnet-config --cflags --defines)
    +-all: cdp-listen cdp-send
    ++all: cdp-send cdp-listen
    + 
    +-cdp-listen: cdp-listen.o -lpcap
    +-cdp-send: cdp-send.o $(shell libnet-config --libs)
    ++cdp-listen: cdp-listen.o $(STAGING_DIR)/usr/lib/libpcap.so
    ++cdp-send: cdp-send.o $(STAGING_DIR)/usr/lib/libnet-1.1.x/lib/libnet.a
    + 
    + clean:; rm -f cdp-send.o cdp-send cdp-listen.o cdp-listen
    diff --git a/net/chaosvpn/Makefile b/net/chaosvpn/Makefile
    new file mode 100644
    index 0000000..5b602ad
    --- /dev/null
    +++ b/net/chaosvpn/Makefile
    @@ -0,0 +1,47 @@
    +# Copyright (C) 2010 OpenWrt.org
    +# All rights reserved.
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=chaosvpn
    +PKG_VERSION:=2.0
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
    +PKG_SOURCE_URL:=http://github.com/downloads/ryd/chaosvpn/
    +PKG_MD5SUM:=4263202d65bf4ab0d1356b149d7c53af
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/chaosvpn
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=Config generator for chaos vpn
    +  SUBMENU:=VPN
    +  DEPENDS:=+ip +tinc +kmod-tun +libopenssl
    +  URL:=https://wiki.hamburg.ccc.de/index.php/ChaosVPN::DebianHowto
    +  MAINTAINER:=Christopher J. Pilkington 
    +endef
    +
    +define Package/chaosvpn/description
    +	Configure tincd for the chaosvpn network
    +endef
    +
    +MAKE_FLAGS += \
    +	COPT="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)"
    +
    +define Package/chaosvpn/install
    +	$(INSTALL_DIR) $(1)/etc/tinc/chaos/ $(1)/usr/sbin/ $(1)/etc/init.d/ $(1)/etc/hotplug.d/iface/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/chaosvpn $(1)/usr/sbin/
    +	#$(INSTALL_DATA) $(PKG_BUILD_DIR)/chaosvpn.conf $(1)/etc/tinc/
    +	sed -e 's/"\/sbin\/ip /"\/usr\/sbin\/ip /' <$(PKG_BUILD_DIR)/chaosvpn.conf >$(1)/etc/tinc/chaosvpn.conf
    +	$(INSTALL_BIN) ./files/chaosvpn_config.sh $(1)/usr/sbin/
    +	$(INSTALL_BIN) ./files/chaosvpn.init $(1)/etc/init.d/chaosvpn
    +	$(INSTALL_BIN) ./files/chaosvpn.hotplug $(1)/etc/hotplug.d/iface/40-chaosvpn
    +endef
    +
    +$(eval $(call BuildPackage,chaosvpn))
    +
    diff --git a/net/chaosvpn/files/chaosvpn.hotplug b/net/chaosvpn/files/chaosvpn.hotplug
    new file mode 100644
    index 0000000..3044e53
    --- /dev/null
    +++ b/net/chaosvpn/files/chaosvpn.hotplug
    @@ -0,0 +1,3 @@
    +[ "$INTERFACE" == "wan" ] || return
    +[ "$ACTION" == "ifup" ] && /etc/init.d/chaosvpn restart
    +
    diff --git a/net/chaosvpn/files/chaosvpn.init b/net/chaosvpn/files/chaosvpn.init
    new file mode 100644
    index 0000000..0862638
    --- /dev/null
    +++ b/net/chaosvpn/files/chaosvpn.init
    @@ -0,0 +1,17 @@
    +#!/bin/sh /etc/rc.common
    +START=99
    +
    +start()
    +{
    +	/usr/sbin/chaosvpn_config.sh
    +	[ $? = 0 ] || {
    +		logger "not starting chaosvpn, check your config"
    +		exit 1
    +	}
    +	/usr/sbin/chaosvpn -f -c /etc/tinc/chaosvpn.conf >/dev/null 2>&1 &
    +}
    +
    +stop()
    +{
    +	killall chaosvpn
    +}
    diff --git a/net/chaosvpn/files/chaosvpn_config.sh b/net/chaosvpn/files/chaosvpn_config.sh
    new file mode 100644
    index 0000000..6b3b273
    --- /dev/null
    +++ b/net/chaosvpn/files/chaosvpn_config.sh
    @@ -0,0 +1,14 @@
    +#!/bin/sh
    +
    +[ -f "/etc/tinc/chaos/rsa_key.pub" -a -f "/etc/tinc/chaos/rsa_key.priv" ] || {
    +	echo "please generate rsa key pair"
    +	echo "tincd -n chaos --generate-keys=2048"
    +	exit 1
    +}
    +
    +C=`grep unconfigured_please_change_me /etc/tinc/chaosvpn.conf  | wc -l`
    +[ "$C" = "0" ] || {
    +	echo "/etc/tinc/chaosvpn.conf is not configured yet"
    +	exit 1
    +}
    +exit 0
    diff --git a/net/chaosvpn/patches/001-dist-makefile.patch b/net/chaosvpn/patches/001-dist-makefile.patch
    new file mode 100644
    index 0000000..00b1d88
    --- /dev/null
    +++ b/net/chaosvpn/patches/001-dist-makefile.patch
    @@ -0,0 +1,30 @@
    +--- a/Makefile	2010-07-17 14:20:07.000000000 -0400
    ++++ b/Makefile	2010-07-17 18:50:30.000000000 -0400
    +@@ -1,10 +1,7 @@
    +-CC?=gcc
    +-INCLUDES?=-I/usr/local/include
    +-LIBDIRS?=-L/usr/local/lib
    +-CFLAGS?=-std=c99 -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wall -g $(INCLUDES)
    +-LIB?=-lz -lcrypto
    +-LEX?=flex
    +-YACC?=yacc
    ++CC := gcc
    ++LIBS := -lssl -lz -lcrypto
    ++LEX := flex
    ++YACC := yacc
    + 
    + PREFIX?=/usr
    + TINCDIR?=/etc/tinc
    +@@ -21,10 +18,10 @@
    + GITDEBVERSION=$(shell debian/scripts/calcdebversion )
    + 
    + $(NAME): main.o $(OBJ) $(HEADERS)
    +-	$(CC) -o $@ main.o $(OBJ) $(LIB) $(LIBDIRS)
    ++	$(CC) $(COPT) -o $@ main.o $(OBJ) $(LIBS) $(LIB)
    + 
    + %.o: %.c $(HEADERS)
    +-	$(CC) $(CFLAGS) -o $(patsubst %.c,%.o,$<) -c $<
    ++	$(CC) $(COPT) -o $(patsubst %.c,%.o,$<) -c $<
    + 
    + lex.yy.o: lex.yy.c y.tab.h
    + 
    diff --git a/net/chillispot/Makefile b/net/chillispot/Makefile
    new file mode 100644
    index 0000000..f552530
    --- /dev/null
    +++ b/net/chillispot/Makefile
    @@ -0,0 +1,57 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=chillispot
    +PKG_VERSION:=1.1.0
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.chillispot.info/download
    +PKG_MD5SUM:=9d2597756af3fa14d7331b4a3651fc9b
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/chillispot
    +  SUBMENU:=Captive Portals
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+kmod-tun
    +  TITLE:=Wireless LAN HotSpot controller
    +  URL:=http://www.chillispot.info/
    +endef
    +
    +define Package/chillispot/description
    +	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.
    +endef
    +
    +define Package/chillispot/conffiles
    +/etc/chilli.conf
    +endef
    +
    +# uses GNU configure
    +
    +define Package/chillispot/install
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/chilli
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/chilli.conf $(1)/etc/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chilli $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,chillispot))
    diff --git a/net/chillispot/files/chillispot.init b/net/chillispot/files/chillispot.init
    new file mode 100644
    index 0000000..bf0e3f6
    --- /dev/null
    +++ b/net/chillispot/files/chillispot.init
    @@ -0,0 +1,19 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +RUN_D=/var/run
    +PID_F=$RUN_D/chilli.pid
    +
    +start() {
    +	include /lib/network
    +	scan_interfaces
    +	/sbin/insmod tun >/dev/null 2>&1
    +	[ -d $RUN_D ] || mkdir -p $RUN_D
    +	config_get ipaddr lan ipaddr
    +	/usr/sbin/chilli --dns1="$ipaddr"
    +}
    +
    +stop() {
    +	[ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1
    +}
    diff --git a/net/chillispot/patches/001-endian_fix.patch b/net/chillispot/patches/001-endian_fix.patch
    new file mode 100644
    index 0000000..7bc100e
    --- /dev/null
    +++ b/net/chillispot/patches/001-endian_fix.patch
    @@ -0,0 +1,135 @@
    +Index: chillispot-1.1.0/src/dhcp.c
    +===================================================================
    +--- chillispot-1.1.0.orig/src/dhcp.c	2006-09-24 19:48:25.000000000 +0200
    ++++ chillispot-1.1.0/src/dhcp.c	2007-09-25 15:35:12.521055038 +0200
    +@@ -116,6 +116,24 @@
    + #endif
    + 
    + 
    ++/*
    ++ *    BrainSlayer: 
    ++ *    wrapper for fixing the big endian bugs within dhcp server code.its surelly not the best.
    ++ *    all dhcp packet fields must be handled in little endian
    ++ */
    ++
    ++static uint16_t swap16(uint16_t word) {
    ++#if __BYTE_ORDER == __BIG_ENDIAN
    ++  unsigned char low = word>>8;
    ++  unsigned char high = word&0xff;
    ++  return ((uint16_t)(high<<8))|low;
    ++#elif __BYTE_ORDER == __LITTLE_ENDIAN
    ++  return word;
    ++#else
    ++#error "Could not determine the system's endianness"
    ++#endif
    ++}
    ++
    + /**
    +  * dhcp_ip_check()
    +  * Generates an IPv4 header checksum.
    +@@ -125,11 +143,11 @@
    +   uint32_t sum = 0;
    +   pack->iph.check = 0;
    +   for (i=0; i<(pack->iph.ihl * 2); i++) {
    +-    sum += ((uint16_t*) &pack->iph)[i];
    ++    sum += swap16(((uint16_t*) &pack->iph)[i]); /* brainslayer */
    +   }
    +   while (sum>>16)
    +     sum = (sum & 0xFFFF)+(sum >> 16);
    +-  pack->iph.check = ~sum;
    ++  pack->iph.check = swap16(~sum); /* brainslayer */
    +   return 0;
    + }
    + 
    +@@ -152,27 +170,28 @@
    +   }
    + 
    +   /* Sum UDP header and payload */
    ++		
    +   for (i=0; i<(udp_len/2); i++) {
    +-    sum += ((uint16_t*) &pack->udph)[i];
    ++    sum += swap16(((uint16_t*) &pack->udph)[i]); /* brainslayer */
    +   }
    + 
    +-  /* Sum any uneven payload octet */
    ++
    +   if (udp_len & 0x01) {
    +     sum += ((uint8_t*) &pack->udph)[udp_len-1];
    +   }
    + 
    +   /* Sum both source and destination address */
    +   for (i=0; i<4; i++) {
    +-    sum += ((uint16_t*) &pack->iph.saddr)[i];
    ++    sum += swap16(((uint16_t*) &pack->iph.saddr)[i]); /* brainslayer */
    +   }
    + 
    +   /* Sum both protocol and udp_len (again) */
    +-  sum = sum + pack->udph.len + ((pack->iph.protocol<<8)&0xFF00);
    ++  sum = sum + swap16(pack->udph.len) + ((pack->iph.protocol<<8)&0xFF00); /* brainslayer */
    + 
    +   while (sum>>16)
    +     sum = (sum & 0xFFFF)+(sum >> 16);
    + 
    +-  pack->udph.check = ~sum;
    ++  pack->udph.check = swap16(~sum); /* brainslayer */
    + 
    +   return 0;
    + }
    +@@ -201,7 +220,7 @@
    + 
    +   /* Sum TCP header and payload */
    +   for (i=0; i<(tcp_len/2); i++) {
    +-    sum += ((uint16_t*) pack->payload)[i];
    ++    sum += swap16(((uint16_t*) pack->payload)[i]); /* brainslayer */
    +   }
    + 
    +   /* Sum any uneven payload octet */
    +@@ -211,16 +230,16 @@
    + 
    +   /* Sum both source and destination address */
    +   for (i=0; i<4; i++) {
    +-    sum += ((uint16_t*) &pack->iph.saddr)[i];
    ++    sum += swap16(((uint16_t*) &pack->iph.saddr)[i]); /* brainslayer */
    +   }
    + 
    +   /* Sum both protocol and tcp_len */
    +-  sum = sum + htons(tcp_len) + ((pack->iph.protocol<<8)&0xFF00);
    ++  sum = sum + swap16(htons(tcp_len)) + ((pack->iph.protocol<<8)&0xFF00); /* brainslayer */
    + 
    +   while (sum>>16)
    +     sum = (sum & 0xFFFF)+(sum >> 16);
    + 
    +-  tcph->check = ~sum;
    ++  tcph->check = swap16(~sum); /* brainslayer */
    + 
    +   return 0;
    + }
    +Index: chillispot-1.1.0/src/dhcp.h
    +===================================================================
    +--- chillispot-1.1.0.orig/src/dhcp.h	2006-09-24 19:48:25.000000000 +0200
    ++++ chillispot-1.1.0/src/dhcp.h	2007-09-25 15:35:12.533055724 +0200
    +@@ -119,6 +119,8 @@
    +   uint16_t prot;
    + };
    + 
    ++#include 
    ++
    + /* Constants for IP packet */
    + #define DHCP_IP_ALEN   4
    + #define DHCP_IP_HLEN  20
    +@@ -127,8 +129,15 @@
    + #define DHCP_IP_UDP   17 /* UDP Protocol number */
    + 
    + struct dhcp_iphdr_t {
    ++#if __BYTE_ORDER == __LITTLE_ENDIAN  /* nbd fix for swapped version and length field */
    +   uint8_t  ihl:4;
    +   uint8_t  version:4;
    ++#elif __BYTE_ORDER == __BIG_ENDIAN
    ++  uint8_t  version:4;
    ++  uint8_t  ihl:4;
    ++#else
    ++#error "Could not determine the system's endianness"
    ++#endif
    +   uint8_t  tos;
    +   uint16_t tot_len;
    +   uint16_t id;
    diff --git a/net/chillispot/patches/102-less_memory-footprint.patch b/net/chillispot/patches/102-less_memory-footprint.patch
    new file mode 100644
    index 0000000..b0a6c9c
    --- /dev/null
    +++ b/net/chillispot/patches/102-less_memory-footprint.patch
    @@ -0,0 +1,12 @@
    +diff -baurN --exclude='*~' --exclude='.#*' --exclude='.svn*' --exclude='.conf*' --exclude=dl --exclude=bin --exclude=build_mipsel --exclude=staging_dir_mipsel --exclude=toolchain_build_mipsel --exclude=package/config --exclude=autom4te.cache --exclude='*.tgz' --exclude='*.zip' --exclude='*.tar' --exclude='*.gz' --exclude='.tmp*' chillispot-1.1.0.orig/src/chilli.h chillispot-1.1.0/src/chilli.h
    +--- chillispot-1.1.0.orig/src/chilli.h	2006-10-19 00:01:55.000000000 +0100
    ++++ chillispot-1.1.0/src/chilli.h	2006-12-19 00:02:16.000000000 +0100
    +@@ -53,7 +53,7 @@
    + /* #define COUNT_DOWNLINK_DROP 1 */
    + /* #define COUNT_UPLINK_DROP 1 */
    + 
    +-#define APP_NUM_CONN 1024
    ++#define APP_NUM_CONN 128
    + #define EAP_LEN 2048            /* TODO: Rather large */
    + 
    + #define MACOK_MAX 16
    diff --git a/net/chillispot/patches/110-macallowed_fix.patch b/net/chillispot/patches/110-macallowed_fix.patch
    new file mode 100644
    index 0000000..8567fc8
    --- /dev/null
    +++ b/net/chillispot/patches/110-macallowed_fix.patch
    @@ -0,0 +1,21 @@
    +diff -r -u chillispot-1.1.0/src/chilli.c chillispot-1.1.0-macallowed/src/chilli.c
    +--- chillispot-1.1.0/src/chilli.c       2006-09-24 19:48:25.000000000 +0200
    ++++ chillispot-1.1.0-macallowed/src/chilli.c    2008-07-18 07:58:03.000000000 +0200
    +@@ -534,6 +534,8 @@
    +     }
    +   }
    +   free(p3);
    ++
    ++  return 0;
    + }
    +
    + int static process_options(int argc, char **argv, int firsttime) {
    +@@ -2991,7 +2993,7 @@
    +
    +   /* Get Service Type */
    +   if (!radius_getattr(pack, &stateattr, RADIUS_ATTR_SERVICE_TYPE, 0, 0, 0)) {
    +-    if(ntohl(attr->v.i) == RADIUS_SERVICE_TYPE_CHILLISPOT_AUTHORIZE_ONLY) {
    ++    if(ntohl(stateattr->v.i) == RADIUS_SERVICE_TYPE_CHILLISPOT_AUTHORIZE_ONLY) {
    +       sys_err(LOG_ERR, __FILE__, __LINE__, 0,
    +              "Chillispot-Authorize-Only Service-Type in Access-Accept");
    +       return dnprot_reject(appconn);
    diff --git a/net/chillispot/patches/120-fix_bufferoverflow.patch b/net/chillispot/patches/120-fix_bufferoverflow.patch
    new file mode 100644
    index 0000000..abc293b
    --- /dev/null
    +++ b/net/chillispot/patches/120-fix_bufferoverflow.patch
    @@ -0,0 +1,11 @@
    +--- a/src/radius.c
    ++++ b/src/radius.c
    +@@ -1002,7 +1002,7 @@ int radius_pwencode(struct radius_t *thi
    +   }
    + 
    +   /* Copy first 128 octets of src into dst */
    +-  if (srclen <= 128) 
    ++  if (srclen > 128)
    +     memcpy(dst, src, 128);
    +   else
    +     memcpy(dst, src, srclen);
    diff --git a/net/chillispot/patches/150-chillispot-rmtctrl.patch b/net/chillispot/patches/150-chillispot-rmtctrl.patch
    new file mode 100644
    index 0000000..db5df95
    --- /dev/null
    +++ b/net/chillispot/patches/150-chillispot-rmtctrl.patch
    @@ -0,0 +1,1529 @@
    +--- a/src/chilli.c
    ++++ b/src/chilli.c
    +@@ -102,6 +102,7 @@
    + #include "dhcp.h"
    + #include "cmdline.h"
    + #include "chilli.h"
    ++#include "remotectrl.h"
    + 
    + struct options_t options;
    + 
    +@@ -127,6 +128,12 @@ static int do_sighup = 0;
    + /* Forward declarations */
    + int static acct_req(struct app_conn_t *conn, int status_type);
    + int static config_radius();
    ++void admin_disconnect(struct app_conn_t *appconn, int terminateCause);
    ++void admin_authorize(struct app_conn_t *appconn);
    ++int send_acct_head( struct rmt_socket_t *client, struct app_conn_t *appconn);
    ++int send_Connection( struct rmt_socket_t *client, struct app_conn_t *appconn );
    ++int send_Acct_Setting ( struct rmt_socket_t *client, struct app_conn_t *appconn );
    ++int send_Accounting( struct rmt_socket_t *client, struct app_conn_t *appconn );
    + 
    + /* Fireman catches falling childs and eliminates zombies */
    + void static fireman(int signum) { 
    +@@ -180,19 +187,18 @@ int static leaky_bucket(struct app_conn_
    +   struct timeval timenow;
    +   uint64_t timediff; /* In microseconds */
    +   int result = 0;
    +-
    +  
    +   gettimeofday(&timenow, NULL);
    + 
    +   timediff = (timenow.tv_sec - conn->last_time.tv_sec) * ((uint64_t) 1000000);
    +   timediff += (timenow.tv_usec - conn->last_time.tv_usec);
    + 
    +-  /*  if (options.debug) printf("Leaky bucket timediff: %lld, bucketup: %d, bucketdown: %d %d %d\n", 
    +-			    timediff, conn->bucketup, conn->bucketdown, 
    +-			    octetsup, octetsdown);*/
    +-
    +-  if (conn->bandwidthmaxup) {
    ++/*    if (options.debug) 
    ++			printf("Leaky bucket timediff: %lld, bucketup: %d, bucketdown: %d %d %d\n",
    ++					timediff, conn->bucketup, conn->bucketdown, octetsup, octetsdown);
    ++*/
    + 
    ++	if (conn->bandwidthmaxup) {
    +     /* Subtract what the leak since last time we visited */
    +     if (conn->bucketup > ((timediff * conn->bandwidthmaxup)/8000000)) {
    +       conn->bucketup -= (timediff * conn->bandwidthmaxup) / 8000000;
    +@@ -200,9 +206,9 @@ int static leaky_bucket(struct app_conn_
    +     else {
    +       conn->bucketup = 0;
    +     }
    +-    
    ++//    printf("octetsup: %d -> conn->bucketup+octetsup: %d > conn->bucketupsize: %d \n", octetsup, conn->bucketup + octetsup, conn->bucketupsize);
    +     if ((conn->bucketup + octetsup) > conn->bucketupsize) {
    +-      /*if (options.debug) printf("Leaky bucket deleting uplink packet\n");*/
    ++      if (options.debug) printf("Leaky bucket deleting uplink packet\n");
    +       result = -1;
    +     }
    +     else {
    +@@ -217,9 +223,10 @@ int static leaky_bucket(struct app_conn_
    +     else {
    +       conn->bucketdown = 0;
    +     }
    ++//    printf("octetsdown: %d -> conn->bucketdown+octetsdown: %d > conn->bucketdownsize: %d \n", octetsdown, conn->bucketdown + octetsdown, conn->bucketdownsize);
    +     
    +     if ((conn->bucketdown + octetsdown) > conn->bucketdownsize) {
    +-      /*if (options.debug) printf("Leaky bucket deleting downlink packet\n");*/
    ++      if (options.debug) printf("Leaky bucket deleting downlink packet\n");
    +       result = -1;
    +     }
    +     else {
    +@@ -233,6 +240,7 @@ int static leaky_bucket(struct app_conn_
    + }
    + #endif /* ifndef NO_LEAKY_BUCKET */
    + 
    ++
    + /* Run external script */
    + 
    + int set_env(char *name, char *value, int len, struct in_addr *addr,
    +@@ -550,7 +558,7 @@ int static process_options(int argc, cha
    +     return -1;
    +   }
    + 
    +-  if (cmdline_parser_configfile (args_info.conf_arg, &args_info, 0, 0, 0)) {
    ++	if (cmdline_parser_configfile (args_info.conf_arg, &args_info, 0, 0, 0)) {
    +     sys_err(LOG_ERR, __FILE__, __LINE__, 0,
    + 	    "Failed to parse configuration file: %s!", 
    + 	    args_info.conf_arg);
    +@@ -1056,7 +1064,21 @@ int static process_options(int argc, cha
    + 		       strlen(args_info.macallowed_arg[numargs]))) 
    +       return -1;
    +   }
    +-
    ++  /* remote monitor                                                    */
    ++  /* Defaults to net plus 1                                       */
    ++  if (!args_info.rmtlisten_arg)
    ++    options.rmtlisten.s_addr = options.uamlisten.s_addr;
    ++  else 
    ++		if (!inet_aton(args_info.rmtlisten_arg, &options.rmtlisten)){
    ++			sys_err(LOG_ERR, __FILE__, __LINE__, 0,
    ++	    "Invalid Remote monitor IP address: %s!", args_info.rmtlisten_arg);
    ++			return -1;
    ++		}
    ++  /* rmtport                                                      */
    ++  options.rmtport = args_info.rmtport_arg;
    ++  options.rmtpasswd = args_info.rmtpasswd_arg;
    ++  options.bandwidthmaxup = args_info.bandwidthmaxup_arg;
    ++  options.bandwidthmaxdown = args_info.bandwidthmaxdown_arg;
    + 
    +   /* foreground                                                   */
    +   /* If flag not given run as a daemon                            */
    +@@ -1095,7 +1117,6 @@ void static reprocess_options(int argc, 
    +     memcpy(&options, &options2, sizeof(options));
    +     return;
    +   }
    +-
    +   /* Options which we do not allow to be affected */
    +   /* fg, conf and statedir are not stored in options */
    +   options.net = options2.net; /* net */
    +@@ -1123,6 +1144,13 @@ void static reprocess_options(int argc, 
    +   options.eapolenable = options2.eapolenable; /* eapolenable */
    +   options.pidfile = options2.pidfile; /* pidfile */
    + 
    ++  options.rmtlisten = options2.rmtlisten; /* remote listen */
    ++  options.rmtport = options2.rmtport; /* remote port */
    ++  options.rmtpasswd = options2.rmtpasswd; /* remote password */
    ++
    ++//  options.bandwidthmaxup = options2.bandwidthmaxup; /* remote password */
    ++//  options.bandwidthmaxdown = options2.bandwidthmaxdown; /* remote password */
    ++
    +   /* Reinit DHCP parameters */
    +   (void) dhcp_set(dhcp, (options.debug & DEBUG_DHCP),
    + 		  options.uamserver, options.uamserverlen, options.uamanydns,
    +@@ -3099,9 +3127,8 @@ int cb_radius_auth_conf(struct radius_t 
    +       appconn->bucketupsize = BUCKET_SIZE_MIN;
    + #endif
    +   }
    +-  else {
    ++  else
    +     appconn->bandwidthmaxup = 0;
    +-  }
    +   
    +   /* Bandwidth down */
    +   if (!radius_getattr(pack, &attr, RADIUS_ATTR_VENDOR_SPECIFIC,
    +@@ -3116,9 +3143,8 @@ int cb_radius_auth_conf(struct radius_t 
    +       appconn->bucketdownsize = BUCKET_SIZE_MIN;
    + #endif
    +   }
    +-  else {
    ++  else
    +     appconn->bandwidthmaxdown = 0;
    +-  }
    + 
    + #ifdef RADIUS_ATTR_CHILLISPOT_BANDWIDTH_MAX_UP
    +   /* Bandwidth up */
    +@@ -3623,7 +3649,7 @@ int cb_dhcp_data_ind(struct dhcp_conn_t 
    +     appconn->input_octets +=len;
    + #ifndef NO_LEAKY_BUCKET
    + #ifdef COUNT_UPLINK_DROP
    +-    if (leaky_bucket(appconn, len, 0)) return 0;
    ++    if (leaky_bucket(appconn, len, 0)==-1) return 0;
    + #endif /* ifdef COUNT_UPLINK_DROP */
    + #endif /* ifndef NO_LEAKY_BUCKET */
    +   }
    +@@ -3889,6 +3915,10 @@ int main(int argc, char **argv)
    +   struct sigaction act;
    +   struct itimerval itval;
    + 
    ++	struct rmt_socket_t srv;
    ++	struct rmt_socket_t client[MAX_CLIENTS];
    ++	int activeClients = 0;			/* Número clientes conectados */
    ++
    +   /* open a connection to the syslog daemon */
    +   /*openlog(PACKAGE, LOG_PID, LOG_DAEMON);*/
    +   openlog(PACKAGE, (LOG_PID | LOG_PERROR), LOG_DAEMON);
    +@@ -4046,6 +4076,8 @@ int main(int argc, char **argv)
    +   if (options.debug) 
    +     printf("Waiting for client request...\n");
    + 
    ++	
    ++	srv = rmtctrl_initSrv(options.rmtlisten, options.rmtport);
    + 
    +   /******************************************************************/
    +   /* Main select loop                                               */
    +@@ -4053,6 +4085,8 @@ int main(int argc, char **argv)
    + 
    +   while (keep_going) {
    + 
    ++		rmtctrl_srv(srv,client,&activeClients);
    ++
    +     if (do_timeouts) {
    +       /*if (options.debug) printf("Do timeouts!\n");*/
    +       (void) radius_timeout(radius);
    +@@ -4178,3 +4212,487 @@ int main(int argc, char **argv)
    +   return 0;
    +   
    + }
    ++
    ++void rmtctrl_msg_proccess(struct rmt_socket_t *client)
    ++{
    ++	msg_head_t header;
    ++	char *msg=NULL;
    ++	char *reg=NULL;
    ++	struct app_conn_t *appconn;
    ++	struct dhcp_conn_t *dhcpconn;
    ++	char str[2048];
    ++	int found=0;
    ++	int rslt=0;
    ++	int n;
    ++	uint64_t l;
    ++	rslt = rmtctrl_read_msg(client,&header,&msg);
    ++	if (rslt > 0)
    ++	{
    ++		switch (header.id)
    ++		{
    ++			case QRY_CONNECTED_LIST:
    ++				rslt += send_srvData(client);
    ++				rslt += rmtctrl_write_msg(client,MSG_START,0, "\n" );
    ++				rslt += rmtctrl_write_msg(client,MSG_PART,0, "Ord ---------- User Name ----------- -- MAC Address -- -- IP Address - -- Input - - Output - Sta\n" );
    ++				for (n=0; ninuse != 0)){
    ++						dhcpconn = (struct dhcp_conn_t*) appconn->dnlink;
    ++						found++;
    ++						l = found;
    ++						rslt += send_number(client, MSG_PART, 0, "%3s ", l);
    ++						rslt += send_line(client,MSG_PART,0, "%-32s ",appconn->proxyuser);
    ++						rslt += send_mac(client,MSG_PART,0, "%17s ",appconn->hismac);
    ++						rslt += send_line(client,MSG_PART,0, "%15s ",inet_ntoa(appconn->hisip));
    ++						rslt += send_number(client,MSG_PART,0, "%10s ",appconn->input_octets);
    ++						rslt += send_number(client,MSG_PART,0, "%10s ",appconn->output_octets);
    ++						rslt += send_number(client, MSG_PART, 0, " %s ",appconn->authenticated);
    ++						rslt += send_number(client, MSG_PART, 0, " %s \n",dhcpconn->authstate);
    ++					}
    ++				}
    ++				rslt += send_number(client,MSG_END,found, "Total of connected device(s) %s\n",found);
    ++			break;
    ++			case QRY_CONNECTED_FULL_LIST:
    ++				rslt += send_srvData(client);
    ++				rslt += rmtctrl_write_msg(client,MSG_START,0, "\n" );
    ++				for (n=0; ninuse != 0)){
    ++						found++;
    ++						l = found;
    ++						rslt += send_number(client, MSG_PART, 0, "Connection : %s\n{\n", l);
    ++						rslt += send_acct_head( client, appconn);
    ++						rslt += send_line(client, MSG_PART, 0, "%s\n", "}");
    ++					}
    ++				}
    ++				rslt += send_number(client, MSG_END, found, "Total of connected device(s) %s\n",found);
    ++			break;
    ++			case QRY_STATUS:
    ++				///
    ++				rslt += send_Status(client, appconn);
    ++			break;
    ++			case CMD_AUTHORIZE:
    ++				for (n=0; ninuse != 0) && (appconn->authenticated == 0))
    ++					{
    ++						switch (header.extra)
    ++						{
    ++							case EXTRA_MAC_OP:
    ++								if ( strcmp(msg,mac2str(appconn->hismac)) == 0)
    ++								{
    ++									found++;
    ++									l=1;
    ++									break;
    ++								}
    ++							break;
    ++							case EXTRA_IP_OP:
    ++								if ( strcmp(msg,inet_ntoa(appconn->hisip)) == 0)
    ++								{
    ++									found++;
    ++									l=1;
    ++									break;
    ++								}
    ++							break;
    ++							case EXTRA_USER_OP:
    ++								if ( strcmp(msg,appconn->proxyuser) == 0)
    ++								{
    ++									found++;
    ++									l=1;
    ++									break;
    ++								}
    ++							break;
    ++							default:
    ++								found++;
    ++								l=1;
    ++							break;
    ++						}
    ++						if ( l == 1 ){
    ++							admin_authorize(appconn);
    ++							rslt += send_srvData( client );
    ++							rslt += rmtctrl_write_msg(client,MSG_PART,0, " \n" );
    ++							rslt += send_acct_head( client, appconn);
    ++							sys_err(LOG_NOTICE, __FILE__, __LINE__, 0,
    ++								"Admin Authorize MAC=%s IP=%s",
    ++								mac2str(appconn->hismac), inet_ntoa(appconn->hisip));
    ++						}
    ++					}
    ++				}
    ++				if (found == 0)
    ++					rslt += rmtctrl_write_msg(client,MSG_END,0, "Not device found to Authorze\n" );
    ++				else 
    ++				{
    ++					rslt += send_number(client, MSG_END, found, "Autorized %s device(s)\n",found);
    ++				}
    ++			break;
    ++			case CMD_DISCONNECT:
    ++				for (n=0; ninuse != 0) && (appconn->authenticated == 1))
    ++					{
    ++						if (dhcpconn = (struct dhcp_conn_t*) appconn->dnlink) {
    ++							switch (header.extra)
    ++							{
    ++								case EXTRA_MAC_OP:
    ++									if ( strcmp(msg,mac2str(appconn->hismac)) == 0)
    ++									{
    ++										found++;
    ++										l=1;
    ++										break;
    ++									}
    ++								break;
    ++								case EXTRA_IP_OP:
    ++									if ( strcmp(msg,inet_ntoa(appconn->hisip)) == 0)
    ++									{
    ++										found++;
    ++										l=1;
    ++										break;
    ++									}
    ++								break;
    ++								case EXTRA_USER_OP:
    ++									if ( strcmp(msg,appconn->proxyuser) == 0)
    ++									{
    ++										found++;
    ++										l=1;
    ++										break;
    ++									}
    ++								break;
    ++								default:
    ++									found++;
    ++									l=1;
    ++								break;
    ++							}
    ++							if ( l == 1 ) {
    ++								rslt += send_srvData( client );
    ++								rslt += rmtctrl_write_msg(client,MSG_PART,0, " \n" );
    ++								rslt += send_acct_head( client, appconn);
    ++								admin_disconnect(appconn, RADIUS_TERMINATE_CAUSE_ADMIN_RESET);
    ++								sys_err(LOG_NOTICE, __FILE__, __LINE__, 0,
    ++									"Admin Disconnect username=%s IP=%s",
    ++									appconn->user, inet_ntoa(appconn->hisip));
    ++							}
    ++						}
    ++					}
    ++				}
    ++				if (found == 0)
    ++					rslt += rmtctrl_write_msg(client,MSG_END,0, "Not decice found to Disconnect\n" );
    ++				else 
    ++				{
    ++					rslt += send_number(client, MSG_END, found, "Disconnect %s device(s)\n",found);
    ++				}
    ++			break;
    ++			default:
    ++					rslt += rmtctrl_write_msg(client,MSG_END,0, "Unknow command.\n" );
    ++			break;
    ++		}
    ++	}
    ++	else
    ++	{
    ++		printf("Desde %s se recibieron %d bytes y se enviaron %d bytes\n",inet_ntoa(client->addr.sin_addr),client->Rx,client->Tx);
    ++		close(client->fd); /* cierra fd_rmt_client */
    ++		printf("Client cerro conexión desde %s\n",inet_ntoa(client->addr.sin_addr) ); 
    ++		client->fd = -1;
    ++	}
    ++	if(msg)
    ++		free(msg);
    ++}
    ++
    ++void admin_authorize(struct app_conn_t *appconn)
    ++{
    ++  struct radius_packet_t radius_pack;
    ++	strcpy(appconn->user,"Admin-Authorize");
    ++	strcpy(appconn->proxyuser,"Admin-Authorize");
    ++	appconn->proxyuserlen = strlen(appconn->proxyuser);
    ++	appconn->interim_interval = 600;
    ++	appconn->terminate_cause = 0;
    ++	appconn->idletimeout = 300;
    ++
    ++	radius_default_pack(radius, &radius_pack, RADIUS_CODE_ACCESS_REQUEST);
    ++  radius_pack.code = RADIUS_CODE_ACCESS_REQUEST;
    ++//  (void) radius_addattr(radius, &radius_pack, RADIUS_ATTR_USER_NAME, 0, 0, 0,
    ++//			(uint8_t*) appconn->proxyuser, appconn->proxyuserlen);
    ++
    ++	if ( options.bandwidthmaxup > 0 ){
    ++		appconn->bandwidthmaxup = options.bandwidthmaxup * 1024;
    ++    appconn->bucketupsize = BUCKET_TIME * appconn->bandwidthmaxup / 8000;
    ++    if (appconn->bucketupsize < BUCKET_SIZE_MIN) 
    ++      appconn->bucketupsize = BUCKET_SIZE_MIN;
    ++	}
    ++	if ( options.bandwidthmaxdown > 0 ){
    ++		appconn->bandwidthmaxdown = options.bandwidthmaxdown * 1024;
    ++    appconn->bucketdownsize = BUCKET_TIME * appconn->bandwidthmaxdown / 8000;
    ++    if (appconn->bucketdownsize < BUCKET_SIZE_MIN) 
    ++      appconn->bucketdownsize = BUCKET_SIZE_MIN;
    ++	}
    ++	dnprot_accept(appconn);
    ++}
    ++
    ++void admin_disconnect(struct app_conn_t *appconn, int terminateCause)
    ++{
    ++	dnprot_terminate(appconn);
    ++	(void) acct_req(appconn, RADIUS_STATUS_TYPE_STOP);
    ++	set_sessionid(appconn);
    ++}
    ++
    ++int send_acct_head( struct rmt_socket_t *client, struct app_conn_t *appconn)
    ++{
    ++	int rslt;
    ++	rslt += send_Connection( client, appconn );
    ++	rslt += send_Acct_Setting( client, appconn );
    ++	rslt += send_Accounting( client, appconn );
    ++	return rslt;
    ++}
    ++
    ++int send_Connection( struct rmt_socket_t *client, struct app_conn_t *appconn )
    ++{
    ++	int rslt;
    ++	uint64_t l;
    ++	rslt += send_line(client, MSG_PART, 0, "\tSession-Id = %s\n",appconn->sessionid);
    ++	rslt += send_line(client, MSG_PART, 0, "\tUser-Name = %s\n",appconn->user);
    ++//	rslt = send_line(client, MSG_PART, 0, "\tnasip=%s\n",appconn->nasip);
    ++	rslt += send_mac(client, MSG_PART, 0, "\tClient-Mac-Address = %s\n",appconn->hismac);
    ++	rslt += send_mac(client, MSG_PART, 0, "\tNas-Mac-Address = %s\n",appconn->ourmac);
    ++//	rslt += send_line(client, MSG_PART, 0, "\tourip=%s\n",inet_ntoa(appconn->ourip));
    ++	rslt += send_line(client, MSG_PART, 0, "\tClient-Ip = %s\n",inet_ntoa(appconn->hisip));
    ++	rslt += send_line(client, MSG_PART, 0, "\tClient-Require-Ip = %s\n",inet_ntoa(appconn->reqip));
    ++	rslt += send_number(client, MSG_PART, 0, "\tAutheticated = %s\n",appconn->authenticated);
    ++	l = appconn->uamtime;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tUAM-Time = %s\n",l);
    ++	if (strlen(appconn->userurl)>0)
    ++		rslt = send_line(client, MSG_PART, 0, "\tUser-URL = %s\n",appconn->userurl);
    ++	return rslt;
    ++}
    ++
    ++int send_Acct_Setting ( struct rmt_socket_t *client, struct app_conn_t *appconn )
    ++{
    ++	int rslt = 0;
    ++	uint64_t l;
    ++	if (appconn->authenticated == 0 ) return 0;
    ++	/* Account Settings */
    ++	l = appconn->sessionterminatetime;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tSession-Terminate-Time = %s\n",l);
    ++	l = appconn->sessiontimeout;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tSession-Timeout = %s\n",l);
    ++	l = appconn->idletimeout;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tIdle-Timeout = %s\n",l);
    ++	l = appconn->bandwidthmaxup;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tBandwidth-Max-Up = %s\n",l);
    ++	l = appconn->bandwidthmaxdown;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tBandwidth-Max-Down = %s\n",l);
    ++	l = appconn->maxinputoctets;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tMax-Input-Octets = %s\n",l);
    ++	l = appconn->maxoutputoctets;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tMax-Output-Octets = %s\n",l);
    ++	l = appconn->maxtotaloctets;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tMax-Total-Octets = %s\n",l);
    ++	return rslt;
    ++}
    ++
    ++int send_Accounting( struct rmt_socket_t *client, struct app_conn_t *appconn )
    ++{
    ++	if (appconn->authenticated == 0 ) return 0;
    ++	int rslt = 0;
    ++	uint64_t l;
    ++	l = appconn->start_time.tv_sec;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tStart-Time = %s\n",l);
    ++	l = appconn->interim_time.tv_sec;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tInterim-Time = %s\n",l);
    ++	l = appconn->interim_interval;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tInterim-Interval = %s\n",l);
    ++	l = appconn->last_time.tv_sec;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tLast-Time = %s\n",l);
    ++	l = appconn->input_packets;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tInput-Packets = %s\n",l);
    ++	l = appconn->output_packets;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tOutput-Packets = %s\n",l);
    ++	l = appconn->input_octets;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tInput-Octets = %s\n",l);
    ++	l = appconn->output_octets;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tOutput-Octets = %s\n",l);
    ++	l = appconn->terminate_cause;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tTerminate-Cause = %s\n",l);
    ++	l = appconn->bucketup;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tBucket-Up = %s\n",l);
    ++	l = appconn->bucketdown;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tBucket-Down = %s\n",l);
    ++	l = appconn->bucketupsize;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tBucket-Up-Size = %s\n",l);
    ++	l = appconn->bucketdownsize;
    ++	if (l > 0)
    ++		rslt += send_number(client, MSG_PART, 0, "\tBucket-Down-Size = %s\n",l);
    ++	return rslt;
    ++}
    ++
    ++int send_srvData( struct rmt_socket_t *client)
    ++{
    ++	int rslt=0;
    ++	rslt += send_line(client, MSG_PART, 0, "%s\n",options.radiusnasid);
    ++	if (options.radiuslocationid)
    ++		rslt += send_line(client, MSG_PART, 0, "\tLOCATION ID:%s\n",options.radiuslocationid);
    ++	if (options.radiuslocationname)
    ++		rslt += send_line(client, MSG_PART, 0, "\tLOCATION NAME:%s\n",options.radiuslocationname);
    ++//	rslt += send_line(client, MSG_PART, 0, "\tDEVICE: %s ",tun->devname);
    ++//	rslt += send_line(client, MSG_PART, 0, "INTERFACE: %s\n",options.dhcpif);
    ++//	rslt += send_line(client, MSG_PART, 0, "\tIP ADDR: %s ",inet_ntoa(options.dhcplisten));
    ++//	rslt += send_line(client, MSG_PART, 0, "NETWORK: %s ",inet_ntoa(options.net));
    ++//	rslt += send_line(client, MSG_PART, 0, "MASK: %s\n",inet_ntoa(options.mask));
    ++	if (options.dns1.s_addr)
    ++		rslt += send_line(client, MSG_PART, 0, "\tDNS SERVERS: %s - ",inet_ntoa(options.dns1));
    ++	if (options.dns2.s_addr)
    ++		rslt += send_line(client, MSG_PART, 0, "%s\n",inet_ntoa(options.dns2));
    ++	rslt += send_line(client, MSG_PART, 0, "\tRADIUS SERVERS: %s - ",inet_ntoa(options.radiusserver1));
    ++	rslt += send_line(client, MSG_PART, 0, "%s\n",inet_ntoa(options.radiusserver2));
    ++	return rslt;
    ++}
    ++
    ++int send_Status( struct rmt_socket_t *client, struct app_conn_t *appconn )
    ++{
    ++	int rslt = 0;
    ++	int n;
    ++	uint64_t l;
    ++	l = options.debug;
    ++	rslt += send_number(client, MSG_PART, 0, "\tdebug=%s\n",l);
    ++	/* conf */
    ++	l = options.interval;
    ++	rslt += send_number(client, MSG_PART, 0, "\tinterval=%s\n",l);
    ++	rslt += send_line(client, MSG_PART, 0, "\tpidfile=%s\n",options.pidfile);
    ++	/* TUN parameters */
    ++	rslt += send_line(client, MSG_PART, 0, "\tnet=%s\n",inet_ntoa(options.net)); /* Network IP address */
    ++	rslt += send_line(client, MSG_PART, 0, "\tmask=%s\n",inet_ntoa(options.mask)); /* Network mask */
    ++	rslt += send_line(client, MSG_PART, 0, "\tnetc=%s\n",options.netc);
    ++	rslt += send_line(client, MSG_PART, 0, "\tmaskc=%s\n",options.maskc);
    ++	l = options.allowdyn;
    ++	rslt += send_number(client, MSG_PART, 0, "\tallowdyn=%s\n",l); /* Allow dynamic address allocation */
    ++	rslt += send_line(client, MSG_PART, 0, "\tdynip=%s\n",options.dynip); /* Dynamic IP address pool */
    ++
    ++	l = options.allowstat;
    ++	rslt += send_number(client, MSG_PART, 0, "\tallowstat=%s\n",l); /* Allow static address allocation */
    ++	rslt += send_line(client, MSG_PART, 0, "\tstatip=%s\n",options.statip); /* Static IP address pool */
    ++
    ++	rslt += send_line(client, MSG_PART, 0, "\tdns1=%s\n",inet_ntoa(options.dns1)); /* Primary DNS server IP address */
    ++	rslt += send_line(client, MSG_PART, 0, "\tdns2=%s\n",inet_ntoa(options.dns2)); /* Secondary DNS server IP address */
    ++	rslt += send_line(client, MSG_PART, 0, "\tdomain=%s\n",options.domain); /* Domain to use for DNS lookups */
    ++	rslt += send_line(client, MSG_PART, 0, "\tipup=%s\n",options.ipup); /* Script to run after link-up */
    ++	rslt += send_line(client, MSG_PART, 0, "\tipdown=%s\n",options.ipdown); /* Script to run after link-down */
    ++	rslt += send_line(client, MSG_PART, 0, "\tconup=%s\n",options.conup); /* Script to run after user logon */
    ++	rslt += send_line(client, MSG_PART, 0, "\tcondown=%s\n",options.condown); /* Script to run after user logoff */
    ++	/* Radius parameters */
    ++	rslt += send_line(client, MSG_PART, 0, "\tradiuslisten=%s\n",inet_ntoa(options.radiuslisten)); /* IP address to listen to */
    ++	rslt += send_line(client, MSG_PART, 0, "\tradiusserver1=%s\n",inet_ntoa(options.radiusserver1)); /* IP address of radius server 1 */
    ++	rslt += send_line(client, MSG_PART, 0, "\tradiusserver2=%s\n",inet_ntoa(options.radiusserver2)); /* IP address of radius server 2 */
    ++	l = options.radiusauthport;
    ++	rslt += send_number(client, MSG_PART, 0, "\tradiusauthport=%s\n",l); /* Authentication UDP port */
    ++	l = options.radiusacctport;
    ++	rslt += send_number(client, MSG_PART, 0, "\tradiusacctport=%s\n",l); /* Accounting UDP port */
    ++	rslt += send_line(client, MSG_PART, 0, "\tradiussecret=%s\n",options.radiussecret); /* Radius shared secret */
    ++	rslt += send_line(client, MSG_PART, 0, "\tradiusnasid=%s\n",options.radiusnasid); /* Radius NAS-Identifier */
    ++	rslt += send_line(client, MSG_PART, 0, "\tradiuscalled=%s\n",options.radiuscalled); /* Radius Called-Station-ID */
    ++	rslt += send_line(client, MSG_PART, 0, "\tradiusnasip=%s\n",inet_ntoa(options.radiusnasip)); /* Radius NAS-IP-Address */
    ++	rslt += send_line(client, MSG_PART, 0, "\tradiuslocationid=%s\n",options.radiuslocationid); /* WISPr location ID */
    ++	rslt += send_line(client, MSG_PART, 0, "\tradiuslocationname=%s\n",options.radiuslocationname); /* WISPr location name */
    ++	l = options.radiusnasporttype;
    ++	rslt += send_number(client, MSG_PART, 0, "\tradiusnasporttype=%s\n",l); /* NAS-Port-Type */
    ++	l = options.coaport;
    ++	rslt += send_number(client, MSG_PART, 0, "\tcoaport=%s\n",l); /* UDP port to listen to */
    ++	l = options.coanoipcheck;
    ++	rslt += send_number(client, MSG_PART, 0, "\tcoaipcheck=%s\n",l); /* Allow disconnect from any IP */
    ++	/* Radius proxy parameters */
    ++	rslt += send_line(client, MSG_PART, 0, "\tproxylisten=%s\n",inet_ntoa(options.proxylisten)); /* IP address to listen to */
    ++	l = options.proxyport;
    ++	rslt += send_number(client, MSG_PART, 0, "\tproxyport=%s\n",l); /* UDP port to listen to */
    ++	rslt += send_line(client, MSG_PART, 0, "\tproxyaddr=%s\n",inet_ntoa(options.proxyaddr)); /* IP address of proxy client(s) */
    ++	rslt += send_line(client, MSG_PART, 0, "\tproxymask=%s\n",inet_ntoa(options.proxymask)); /* IP mask of proxy client(s) */
    ++	rslt += send_line(client, MSG_PART, 0, "\tproxysecret=%s\n",options.proxysecret); /* Proxy shared secret */
    ++	/* Radius configuration management parameters */
    ++	rslt += send_line(client, MSG_PART, 0, "\tconfusername=%s\n",options.confusername); /* Username for remote config */
    ++	rslt += send_line(client, MSG_PART, 0, "\tconfpassword=%s\n",options.confpassword); /* Password for remote config */
    ++	/* DHCP parameters */
    ++	l = options.nodhcp;
    ++	rslt += send_number(client, MSG_PART, 0, "\tnodhcp=%s\n",l); /* Do not use DHCP */
    ++	rslt += send_line(client, MSG_PART, 0, "\tdhcpif=%s\n",options.dhcpif); /* Interface: eth0 */
    ++	rslt += send_mac(client, MSG_PART, 0, "\tdhcpmac=%s\n",options.dhcpmac); /* Interface MAC address */
    ++	l = options.dhcpusemac;
    ++	rslt += send_number(client, MSG_PART, 0, "\tdhcpusemac=%s\n",l); /* Use given MAC or interface default */
    ++	rslt += send_line(client, MSG_PART, 0, "\tdhcplisten=%s\n",inet_ntoa(options.dhcplisten)); /* IP address to listen to */
    ++	l = options.lease;
    ++	rslt += send_number(client, MSG_PART, 0, "\tlease=%s\n",l); /* DHCP lease time */
    ++	/* EAPOL parameters */
    ++	l = options.eapolenable;
    ++	rslt += send_number(client, MSG_PART, 0, "\teapolenable=%s\n",l); /* Use eapol */
    ++	/* UAM parameters */
    ++	l = options.uamserverlen;
    ++	rslt += send_number(client, MSG_PART, 0, "\tuamserverlen=%s\n",l); /* Number of UAM servers */
    ++	for (n = 0; n < options.uamserverlen; n++){
    ++		rslt += send_number(client, MSG_PART, 0, "\tuamokip[%s]=",n);
    ++		rslt += send_line(client, MSG_PART, 0, "%s\n",inet_ntoa(options.uamserver[n])); /* IP address of UAM server */
    ++	}
    ++	l = options.uamserverport;
    ++	rslt += send_number(client, MSG_PART, 0, "\tuamserverport=%s\n",l); /* Port of UAM server */
    ++	rslt += send_line(client, MSG_PART, 0, "\tuamsecret=%s\n",options.uamsecret); /* Shared secret */
    ++	rslt += send_line(client, MSG_PART, 0, "\tuamurl=%s\n",options.uamurl); /* URL of authentication server */
    ++	rslt += send_line(client, MSG_PART, 0, "\tuamhomepage=%s\n",options.uamhomepage); /* URL of redirection homepage */
    ++	l = options.uamhomepageport;
    ++	rslt += send_number(client, MSG_PART, 0, "\tuamhomepageport=%s\n",l); /* Port of redirection homepage */
    ++	rslt += send_line(client, MSG_PART, 0, "\tuamlisten=%s\n",inet_ntoa(options.uamlisten)); /* IP address of local authentication */
    ++	l = options.uamport;
    ++	rslt += send_number(client, MSG_PART, 0, "\tuamport=%s\n",l); /* TCP port to listen to */
    ++	l = options.uamokiplen;
    ++	rslt += send_number(client, MSG_PART, 0, "\tuamokiplen=%s\n",l); /* Number of allowed IP addresses */
    ++	for (n=0; n < options.uamokiplen; n++){
    ++		rslt += send_number(client, MSG_PART, 0, "\tuamokip[%s]=",n);
    ++		rslt = send_line(client, MSG_PART, 0, "%s\n",inet_ntoa(options.uamokip[n])); /* List of allowed IP addresses */
    ++	}
    ++	l = options.uamoknetlen;
    ++	rslt += send_number(client, MSG_PART, 0, "\tuamoknetlen=%s\n",l); /* Number of networks */
    ++	for (n=0; n < options.uamoknetlen; n++){
    ++		rslt += send_number(client, MSG_PART, 0, "\tuamoknet[%s]=",n);
    ++		rslt += send_line(client, MSG_PART, 0, "%s/",inet_ntoa(options.uamokaddr[n])); /* List of allowed network IP */
    ++		rslt += send_line(client, MSG_PART, 0, "%s\n",inet_ntoa(options.uamokmask[n])); /* List of allowed network mask */
    ++	}
    ++	l = options.uamanydns;
    ++	rslt += send_number(client, MSG_PART, 0, "\tuamanydns=%s\n",l); /* Allow client to use any DNS server */
    ++	/* MAC Authentication */
    ++	l = options.macauth;
    ++	rslt += send_number(client, MSG_PART, 0, "\tmacauth=%s\n",l); /* Use MAC authentication */
    ++	l = options.macoklen; 
    ++	rslt += send_number(client, MSG_PART, 0, "\tmacoklen=%s\n",l); /* Number of MAC addresses */
    ++	for (n=0; n < options.macoklen; n++){
    ++		rslt += send_number(client, MSG_PART, 0, "\tmacok[%s]=",n);
    ++		rslt += send_mac(client, MSG_PART, 0, "\%s\n",options.macok[n]); /* Allowed MACs */
    ++	}
    ++	rslt += send_line(client, MSG_PART, 0, "\tmacsuffix=%s\n",options.macsuffix);
    ++	rslt += send_line(client, MSG_PART, 0, "\tmacpasswd=%s\n",options.macpasswd);
    ++
    ++	rslt += send_line(client, MSG_PART, 0, "\trmtlisten=%s\n",inet_ntoa(options.rmtlisten));
    ++	l = options.rmtport; 
    ++	rslt += send_number(client, MSG_PART, 0, "\trmtport=%s\n",l); /* Number of MAC addresses */
    ++	rslt += send_line(client, MSG_PART, 0, "\trmtpasswd=%s\n",options.rmtpasswd);
    ++	rslt += send_number(client, MSG_PART, 0, "\tbandwidthmaxup=%s\n",options.bandwidthmaxup);
    ++	rslt += send_number(client, MSG_PART, 0, "\tbandwidthmaxdown=%s\n",options.bandwidthmaxdown);
    ++	rslt += rmtctrl_write_msg(client,MSG_END,0, "End of configuration\n");
    ++}
    +--- a/src/chilli.h
    ++++ b/src/chilli.h
    +@@ -50,8 +50,8 @@
    + /* If the constants below are defined packets which have been dropped
    +    by the traffic shaper will be counted towards accounting and
    +    volume limitation */
    +-/* #define COUNT_DOWNLINK_DROP 1 */
    +-/* #define COUNT_UPLINK_DROP 1 */
    ++#define COUNT_DOWNLINK_DROP 1 
    ++#define COUNT_UPLINK_DROP 1 
    + 
    + #define APP_NUM_CONN 128
    + #define EAP_LEN 2048            /* TODO: Rather large */
    +@@ -68,7 +68,7 @@
    + #define CHALLENGESIZE 24 /* From chap.h MAX_CHALLENGE_LENGTH */
    + #define USERURLSIZE 256  /* Max length of URL requested by user */
    + 
    +-#define BUCKET_SIZE  300000 /* Size of leaky bucket (~200 packets) */
    ++//#define BUCKET_SIZE  300000 /* Size of leaky bucket (~200 packets) */
    + 
    + /* Time length of leaky bucket in milliseconds */
    + /* Bucket size = BUCKET_TIME * Bandwidth-Max radius attribute */
    +@@ -194,12 +194,14 @@ struct app_conn_t {
    +   struct in_addr dns1;
    +   struct in_addr dns2;
    +   struct timeval last_time; /* Last time a packet was received or sent */
    ++  struct timeval last_up_time; /* Last time a packet was received or sent */
    ++  struct timeval last_down_time; /* Last time a packet was received or sent */
    + 
    +   /* Leaky bucket */
    +-  uint32_t bucketup;
    +-  uint32_t bucketdown;
    +-  uint32_t bucketupsize;
    +-  uint32_t bucketdownsize;
    ++  uint64_t bucketup;
    ++  uint64_t bucketdown;
    ++  uint64_t bucketupsize;
    ++  uint64_t bucketdownsize;
    + 
    +   /* UAM information */
    +   uint8_t uamchal[REDIR_MD5LEN];
    +@@ -305,6 +307,11 @@ struct options_t {
    +   int macoklen;                   /* Number of MAC addresses */
    +   char* macsuffix;               /* Suffix to add to MAC address */
    +   char* macpasswd;               /* Password to use for MAC authentication */  
    ++  struct in_addr rmtlisten;      /* IP address of remote monitor and config */
    ++  int rmtport;                   /* TCP port to listen to monitor and config*/
    ++  char* rmtpasswd;               /* Password to use for MAC authentication */  
    ++	int bandwidthmaxup;            /* Default Max Up Bandwith setting */
    ++	int bandwidthmaxdown;          /* Default Max Up Bandwith setting */
    + };
    + 
    + extern struct app_conn_t connection[APP_NUM_CONN];
    +--- a/src/cmdline.c
    ++++ b/src/cmdline.c
    +@@ -113,6 +113,11 @@ void clear_given (struct gengetopt_args_
    +   args_info->macallowed_given = 0 ;
    +   args_info->macsuffix_given = 0 ;
    +   args_info->macpasswd_given = 0 ;
    ++  args_info->rmtlisten_given = 0 ;
    ++  args_info->rmtport_given = 0 ;
    ++  args_info->rmtpasswd_given = 0 ;
    ++  args_info->bandwidthmaxup_given = 0 ;
    ++  args_info->bandwidthmaxdown_given = 0 ;
    + }
    + 
    + static
    +@@ -216,7 +221,19 @@ void clear_args (struct gengetopt_args_i
    +   args_info->macsuffix_orig = NULL;
    +   args_info->macpasswd_arg = gengetopt_strdup ("password");
    +   args_info->macpasswd_orig = NULL;
    +-  
    ++  args_info->rmtport_arg = 3991;
    ++  args_info->rmtport_orig = NULL;
    ++  args_info->rmtlisten_arg = gengetopt_strdup("127.0.0.1");
    ++	args_info->rmtlisten_orig = NULL;
    ++  args_info->rmtport_orig = NULL;
    ++  args_info->rmtpasswd_arg = NULL;
    ++  args_info->rmtpasswd_orig = NULL;
    ++
    ++  args_info->bandwidthmaxup_arg = 0;
    ++  args_info->bandwidthmaxup_orig = NULL;
    ++  args_info->bandwidthmaxdown_arg = 0;
    ++  args_info->bandwidthmaxdown_orig = NULL;
    ++	
    + }
    + 
    + void
    +@@ -284,7 +301,12 @@ cmdline_parser_print_help (void)
    +   printf("%s\n","      --macauth                 Authenticate based on MAC address  \n                                  (default=off)");
    +   printf("%s\n","      --macallowed=STRING       List of allowed MAC addresses");
    +   printf("%s\n","      --macsuffix=STRING        Suffix to add to the MAC address");
    +-  printf("%s\n","      --macpasswd=STRING        Password used when performing MAC \n                                  authentication  (default=`password')");
    ++  printf("%s\n","      --macpasswd=STRING        Password used when performing MAC       \n                                  authentication  (default='password')");
    ++  printf("%s\n","      --rmtlisten=STRING        IP address to listen to for monitor and \n                                  configuration (default=`127.0.0.1')");
    ++  printf("%s\n","      --rmtport=INT             TCP port to bind to for monitor and     \n                                  configuration (default=`3991')");
    ++  printf("%s\n","      --rmtpasswd=STRING        Password used for remote monitor and    \n                                  configuration\n");
    ++  printf("%s\n","      --bandwidthmaxup=INT      Deafaul Max Up Setting in Kilobits\n");
    ++  printf("%s\n","      --bandwidthmaxdown=INT    Deafaul Max Down Setting in Kilobits\n");
    +   
    + }
    + 
    +@@ -675,6 +697,11 @@ cmdline_parser_release (struct gengetopt
    +       free (args_info->uamport_orig); /* free previous argument */
    +       args_info->uamport_orig = 0;
    +     }
    ++  if (args_info->macpasswd_orig)
    ++    {
    ++      free (args_info->macpasswd_orig); /* free previous argument */
    ++      args_info->macpasswd_orig = 0;
    ++    }
    +   if (args_info->uamallowed_arg)
    +     {
    +       for (i = 0; i < args_info->uamallowed_given; ++i)
    +@@ -739,6 +766,34 @@ cmdline_parser_release (struct gengetopt
    +       free (args_info->macpasswd_orig); /* free previous argument */
    +       args_info->macpasswd_orig = 0;
    +     }
    ++  if (args_info->rmtlisten_orig)
    ++    {
    ++      free (args_info->rmtlisten_orig); /* free previous argument */
    ++      args_info->rmtlisten_orig = 0;
    ++    }
    ++  if (args_info->rmtport_orig)
    ++    {
    ++      free (args_info->rmtport_orig); /* free previous argument */
    ++      args_info->rmtport_orig = 0;
    ++    }
    ++
    ++  if (args_info->rmtpasswd_orig)
    ++    {
    ++      free (args_info->rmtpasswd_orig); // free previous argument 
    ++      args_info->rmtpasswd_orig = 0;
    ++    }
    ++  
    ++  if (args_info->bandwidthmaxup_orig)
    ++    {
    ++      free (args_info->bandwidthmaxup_orig); // free previous argument 
    ++      args_info->bandwidthmaxup_orig = 0;
    ++    }
    ++  
    ++  if (args_info->bandwidthmaxdown_orig)
    ++    {
    ++      free (args_info->bandwidthmaxdown_orig); // free previous argument 
    ++      args_info->bandwidthmaxdown_orig = 0;
    ++    }
    +   
    +   clear_given (args_info);
    + }
    +@@ -1109,7 +1164,41 @@ cmdline_parser_file_save(const char *fil
    +       fprintf(outfile, "%s\n", "macpasswd");
    +     }
    +   }
    +-  
    ++  if (args_info->rmtlisten_given) {
    ++    if (args_info->rmtlisten_orig) {
    ++      fprintf(outfile, "%s=\"%s\"\n", "rmtlisten", args_info->rmtlisten_orig);
    ++    } else {
    ++      fprintf(outfile, "%s\n", "rmtlisten");
    ++    }
    ++  }
    ++  if (args_info->rmtport_given) {
    ++    if (args_info->rmtport_orig) {
    ++      fprintf(outfile, "%s=\"%s\"\n", "rmtport", args_info->rmtport_orig);
    ++    } else {
    ++      fprintf(outfile, "%s\n", "rmtport");
    ++    }
    ++  }
    ++  if (args_info->rmtpasswd_given) {
    ++    if (args_info->rmtpasswd_orig) {
    ++      fprintf(outfile, "%s=\"%s\"\n", "rmtpasswd", args_info->rmtpasswd_orig);
    ++    } else {
    ++      fprintf(outfile, "%s\n", "rmtpasswd");
    ++    }
    ++  }
    ++  if (args_info->bandwidthmaxup_given) {
    ++    if (args_info->bandwidthmaxup_orig) {
    ++      fprintf(outfile, "%s=\"%s\"\n", "bandwidthmaxup", args_info->bandwidthmaxup_orig);
    ++    } else {
    ++      fprintf(outfile, "%s\n", "bandwidthmaxup");
    ++    }
    ++  }
    ++  if (args_info->bandwidthmaxdown_given) {
    ++    if (args_info->bandwidthmaxdown_orig) {
    ++      fprintf(outfile, "%s=\"%s\"\n", "bandwidthmaxdown", args_info->bandwidthmaxdown_orig);
    ++    } else {
    ++      fprintf(outfile, "%s\n", "bandwidthmaxdown");
    ++    }
    ++  }
    +   fclose (outfile);
    + 
    +   i = EXIT_SUCCESS;
    +@@ -1221,6 +1310,7 @@ cmdline_parser_internal (int argc, char 
    + {
    +   int c;	/* Character of the parsed option.  */
    +   char *multi_token, *multi_next; /* for multiple options */
    ++	char quehace[100];
    + 
    +   int i;        /* Counter */
    + 
    +@@ -1299,6 +1389,11 @@ cmdline_parser_internal (int argc, char 
    +         { "macallowed",	1, NULL, 0 },
    +         { "macsuffix",	1, NULL, 0 },
    +         { "macpasswd",	1, NULL, 0 },
    ++        { "rmtport",	1, NULL, 0 },
    ++        { "rmtlisten",	1, NULL, 0 },
    ++        { "rmtpasswd",	1, NULL, 0 },
    ++        { "bandwidthmaxup",	1, NULL, 0 },
    ++        { "bandwidthmaxdown",	1, NULL, 0 },
    +         { NULL,	0, NULL, 0 }
    +       };
    + 
    +@@ -1380,8 +1475,6 @@ cmdline_parser_internal (int argc, char 
    +             free (args_info->net_orig); /* free previous string */
    +           args_info->net_orig = gengetopt_strdup (optarg);
    +           break;
    +-
    +-
    +         case 0:	/* Long option with no short option */
    +           /* Which modules to print debug messages for.  */
    +           if (strcmp (long_options[option_index].name, "debugfacility") == 0)
    +@@ -2273,7 +2366,93 @@ cmdline_parser_internal (int argc, char 
    +               free (args_info->macpasswd_orig); /* free previous string */
    +             args_info->macpasswd_orig = gengetopt_strdup (optarg);
    +           }
    +-          
    ++          /* IP address to listen to for remote monitor and config.  */
    ++          else if (strcmp (long_options[option_index].name, "rmtlisten") == 0)
    ++          {
    ++            if (local_args_info.rmtlisten_given)
    ++              {
    ++                fprintf (stderr, "%s: `--rmtlisten' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
    ++                goto failure;
    ++              }
    ++            if (args_info->rmtlisten_given && ! override)
    ++              continue;
    ++            local_args_info.rmtlisten_given = 1;
    ++            args_info->rmtlisten_given = 1;
    ++            if (args_info->rmtlisten_arg)
    ++              free (args_info->rmtlisten_arg); /* free previous string */
    ++            args_info->rmtlisten_arg = gengetopt_strdup (optarg);
    ++            if (args_info->rmtlisten_orig)
    ++              free (args_info->rmtlisten_orig); /* free previous string */
    ++            args_info->rmtlisten_orig = gengetopt_strdup (optarg);
    ++          }
    ++          /* TCP port to bind to for authentication requests.  */
    ++          else if (strcmp (long_options[option_index].name, "rmtport") == 0)
    ++          {
    ++            if (local_args_info.rmtport_given)
    ++              {
    ++                fprintf (stderr, "%s: `--rmtport' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
    ++                goto failure;
    ++              }
    ++            if (args_info->rmtport_given && ! override)
    ++              continue;
    ++            local_args_info.rmtport_given = 1;
    ++            args_info->rmtport_given = 1;
    ++            args_info->rmtport_arg = strtol (optarg,&stop_char,0);
    ++            if (args_info->rmtport_orig)
    ++              free (args_info->rmtport_orig); /* free previous string */
    ++            args_info->rmtport_orig = gengetopt_strdup (optarg);
    ++          }
    ++          /* Password used when performing remote config.  */
    ++          else if (strcmp (long_options[option_index].name, "rmtpasswd") == 0)
    ++          {
    ++            if (local_args_info.rmtpasswd_given)
    ++              {
    ++                fprintf (stderr, "%s: `--rmtpasswd' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
    ++                goto failure;
    ++              }
    ++            if (args_info->rmtpasswd_given && ! override)
    ++              continue;
    ++            local_args_info.rmtpasswd_given = 1;
    ++            args_info->rmtpasswd_given = 1;
    ++            if (args_info->rmtpasswd_arg)
    ++              free (args_info->rmtpasswd_arg); // free previous string 
    ++            args_info->rmtpasswd_arg = gengetopt_strdup (optarg);
    ++            if (args_info->rmtpasswd_orig)
    ++              free (args_info->rmtpasswd_orig); // free previous string 
    ++            args_info->rmtpasswd_orig = gengetopt_strdup (optarg);
    ++          }
    ++          else if (strcmp (long_options[option_index].name, "bandwidthmaxup") == 0)
    ++          {
    ++            if (local_args_info.bandwidthmaxup_given)
    ++              {
    ++                fprintf (stderr, "%s: `--bandwidthmaxup' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
    ++                goto failure;
    ++              }
    ++            if (args_info->bandwidthmaxup_given && ! override)
    ++              continue;
    ++            local_args_info.bandwidthmaxup_given = 1;
    ++            args_info->bandwidthmaxup_given = 1;
    ++            args_info->bandwidthmaxup_arg = strtol (optarg,&stop_char,0);
    ++            if (args_info->bandwidthmaxup_orig)
    ++              free (args_info->bandwidthmaxup_orig); /* free previous string */
    ++            args_info->bandwidthmaxup_orig = gengetopt_strdup (optarg);
    ++          }
    ++          else if (strcmp (long_options[option_index].name, "bandwidthmaxdown") == 0)
    ++          {
    ++            if (local_args_info.bandwidthmaxdown_given)
    ++              {
    ++                fprintf (stderr, "%s: `--bandwidthmaxdown' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
    ++                goto failure;
    ++              }
    ++            if (args_info->bandwidthmaxdown_given && ! override)
    ++              continue;
    ++            local_args_info.bandwidthmaxdown_given = 1;
    ++            args_info->bandwidthmaxdown_given = 1;
    ++            args_info->bandwidthmaxdown_arg = strtol (optarg,&stop_char,0);
    ++            if (args_info->bandwidthmaxdown_orig)
    ++              free (args_info->bandwidthmaxdown_orig); /* free previous string */
    ++            args_info->bandwidthmaxdown_orig = gengetopt_strdup (optarg);
    ++          }
    +           break;
    +         case '?':	/* Invalid option.  */
    +           /* `getopt_long' already printed an error message.  */
    +--- a/src/cmdline.ggo
    ++++ b/src/cmdline.ggo
    +@@ -119,3 +119,12 @@ option "macallowed"  - "List of allowed 
    + option "macsuffix"   - "Suffix to add to the MAC address" string no
    + option "macpasswd"   - "Password used when performing MAC authentication" string default="password" no
    + 
    ++# Remote Monitor and Config
    ++option "rmtlisten"   - "IP address to listen to for authentication requests" string default="127.0.0.1" no
    ++option "rmtport"     - "TCP port to bind to for authentication requests" int default="3991" no
    ++option "rmtpasswd"   - "Password used when performing MAC authentication" string no
    ++
    ++# Extra settings
    ++option "bandwidthmaxup" - "Default bandwidth control to apply when account don't have setting" int no
    ++option "bandwidthmaxdown" - "Default bandwidth control to apply when account don't have setting" int no
    ++
    +--- a/src/cmdline.h
    ++++ b/src/cmdline.h
    +@@ -122,6 +122,17 @@ struct gengetopt_args_info
    +   char * macsuffix_orig;	/* Suffix to add to the MAC address original value given at command line.  */
    +   char * macpasswd_arg;	/* Password used when performing MAC authentication (default='password').  */
    +   char * macpasswd_orig;	/* Password used when performing MAC authentication original value given at command line.  */
    ++  int rmtport_arg;	/* TCP port to bind to for remote monitor and config (default='3991').  */
    ++  char * rmtport_orig;	/* TCP port to bind to for remote monitor and config original value given at command line.  */
    ++  char * rmtlisten_arg;	/* IP address to listen to for remote monitor and config.  */
    ++  char * rmtlisten_orig;	/* IP address to listen to for remote monitor and config original value given at command line.  */
    ++  char * rmtpasswd_arg;	/* Password for remote monitor and config.  */
    ++  char * rmtpasswd_orig;	/* Password for remote monitor and config original value given at command line.  */
    ++  int bandwidthmaxup_arg;	/* Default Bandwidth Max Up.  */
    ++  char *bandwidthmaxup_orig;	/* Default Bandwidth Max Up value given at command line.  */
    ++  int bandwidthmaxdown_arg;	/* Default Bandwidth Max Down.  */
    ++  char *bandwidthmaxdown_orig;	/* Default Bandwidth Max Down value given at command line.  */
    ++
    +   
    +   int help_given ;	/* Whether help was given.  */
    +   int version_given ;	/* Whether version was given.  */
    +@@ -177,7 +188,11 @@ struct gengetopt_args_info
    +   unsigned int macallowed_given ;	/* Whether macallowed was given.  */
    +   int macsuffix_given ;	/* Whether macsuffix was given.  */
    +   int macpasswd_given ;	/* Whether macpasswd was given.  */
    +-
    ++  int rmtport_given ;	/* Whether uamport was given.  */
    ++  int rmtlisten_given ;	/* Whether uamlisten was given.  */
    ++  int rmtpasswd_given ;	/* Whether confpassword was given.  */
    ++	int bandwidthmaxup_given ;
    ++	int bandwidthmaxdown_given ;
    + } ;
    + 
    + int cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info);
    +--- a/src/Makefile
    ++++ b/src/Makefile
    +@@ -54,7 +54,7 @@ PROGRAMS = $(sbin_PROGRAMS)
    + am_chilli_OBJECTS = chilli.$(OBJEXT) tun.$(OBJEXT) cmdline.$(OBJEXT) \
    + 	ippool.$(OBJEXT) radius.$(OBJEXT) md5.$(OBJEXT) \
    + 	redir.$(OBJEXT) dhcp.$(OBJEXT) syserr.$(OBJEXT) \
    +-	iphash.$(OBJEXT) lookup.$(OBJEXT)
    ++	iphash.$(OBJEXT) lookup.$(OBJEXT)  remotectrl.$(OBJEXT)
    + chilli_OBJECTS = $(am_chilli_OBJECTS)
    + chilli_LDADD = $(LDADD)
    + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
    +@@ -172,7 +172,7 @@ target_alias = 
    + 
    + # add -pg to enable gprof
    + AM_CFLAGS = -D_GNU_SOURCE -fno-builtin -DSBINDIR='"$(sbindir)"' 
    +-chilli_SOURCES = chilli.c defs.h tun.c tun.h cmdline.c cmdline.h ippool.c ippool.h radius.h radius.c md5.c md5.h redir.h redir.c dhcp.c dhcp.h syserr.c syserr.h iphash.c iphash.h lookup.c lookup.h
    ++chilli_SOURCES = chilli.c defs.h tun.c tun.h cmdline.c cmdline.h ippool.c ippool.h radius.h radius.c md5.c md5.h redir.h redir.c dhcp.c dhcp.h syserr.c syserr.h iphash.c iphash.h lookup.c lookup.h remotectrl.c remotectrl.h
    + all: all-am
    + 
    + .SUFFIXES:
    +--- a/src/Makefile.in
    ++++ b/src/Makefile.in
    +@@ -54,7 +54,7 @@ PROGRAMS = $(sbin_PROGRAMS)
    + am_chilli_OBJECTS = chilli.$(OBJEXT) tun.$(OBJEXT) cmdline.$(OBJEXT) \
    + 	ippool.$(OBJEXT) radius.$(OBJEXT) md5.$(OBJEXT) \
    + 	redir.$(OBJEXT) dhcp.$(OBJEXT) syserr.$(OBJEXT) \
    +-	iphash.$(OBJEXT) lookup.$(OBJEXT)
    ++	iphash.$(OBJEXT) lookup.$(OBJEXT)  remotectrl.$(OBJEXT)
    + chilli_OBJECTS = $(am_chilli_OBJECTS)
    + chilli_LDADD = $(LDADD)
    + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
    +@@ -172,7 +172,7 @@ target_alias = @target_alias@
    + 
    + # add -pg to enable gprof
    + AM_CFLAGS = -D_GNU_SOURCE -fno-builtin -DSBINDIR='"$(sbindir)"' 
    +-chilli_SOURCES = chilli.c defs.h tun.c tun.h cmdline.c cmdline.h ippool.c ippool.h radius.h radius.c md5.c md5.h redir.h redir.c dhcp.c dhcp.h syserr.c syserr.h iphash.c iphash.h lookup.c lookup.h
    ++chilli_SOURCES = chilli.c defs.h tun.c tun.h cmdline.c cmdline.h ippool.c ippool.h radius.h radius.c md5.c md5.h redir.h redir.c dhcp.c dhcp.h syserr.c syserr.h iphash.c iphash.h lookup.c lookup.h remotectrl.c remotectrl.h
    + all: all-am
    + 
    + .SUFFIXES:
    +--- /dev/null
    ++++ b/src/remotectrl.c
    +@@ -0,0 +1,340 @@
    ++#include           
    ++#include 
    ++#include 
    ++#include 
    ++#include 
    ++
    ++#include "remotectrl.h"
    ++
    ++/*
    ++char *vstrcat(char *first, ...)
    ++{
    ++	size_t len = 0;
    ++	char *retbuf;
    ++	va_list argp;
    ++	char *p;
    ++	char *tmp="";
    ++	if(first == NULL)
    ++		first=tmp;
    ++//		return NULL;
    ++	
    ++	len = strlen(first);
    ++		
    ++	va_start(argp, first);
    ++
    ++	while((p = va_arg(argp, char *)) != NULL)
    ++		len += strlen(p);
    ++
    ++	va_end(argp);
    ++	retbuf = (char *)malloc(len + 1);	// +1 for trailing \0 
    ++
    ++	if(retbuf == NULL)
    ++		return NULL;		// error 
    ++
    ++	(void)strcpy(retbuf, first);
    ++
    ++	va_start(argp, first);
    ++
    ++	while((p = va_arg(argp, char *)) != NULL)
    ++		(void)strcat(retbuf, p);
    ++
    ++	va_end(argp);
    ++
    ++	return retbuf;
    ++}
    ++*/
    ++
    ++int rmtctrl_write_msg( struct rmt_socket_t *sckHnd, uint32_t id, uint32_t extra, char *message ){
    ++	msg_head_t header;
    ++	int rslt;
    ++	header.id    = id;
    ++	header.len   = strlen(message);
    ++	header.extra = extra;
    ++  rslt = send(sckHnd->fd,&header,sizeof(struct msg_head_t),0);
    ++	if (rslt != -1 && header.len > 0) {
    ++		sckHnd->Tx += rslt;
    ++		rslt = send(sckHnd->fd, message, header.len, 0);
    ++		if (rslt > 0)
    ++		{
    ++			sckHnd->Tx += rslt;
    ++			rslt += sizeof(struct msg_head_t);
    ++		}
    ++	}
    ++	return rslt;
    ++}
    ++
    ++int rmtctrl_read_msg( struct rmt_socket_t *sckHnd, msg_head_t *head, char **message )
    ++{
    ++//	msg_head_t header;
    ++	int rslt;
    ++	char *buffer;
    ++	int reading = 0;
    ++	int aux = 0;
    ++  rslt = recv(sckHnd->fd, head, sizeof(struct msg_head_t), 0);
    ++	if (rslt == sizeof(struct msg_head_t) ) {
    ++		sckHnd->Rx += rslt;
    ++		*message = (char *)malloc(head->len+1);
    ++		memset(*message,'\0', head->len+1);
    ++		while ( reading < head->len ){
    ++			aux = recv(sckHnd->fd, *message, head->len, 0);
    ++			switch ( aux ) 
    ++			{
    ++				case -1:
    ++					switch (errno)
    ++					{
    ++						case EINTR:
    ++						case EAGAIN:
    ++							usleep (100);
    ++							break;
    ++						default:
    ++							return -1;
    ++					}
    ++				break;
    ++				case 0: // mean socket was closed
    ++					sckHnd->Rx += reading;
    ++					return reading;
    ++					break;
    ++				break;
    ++				default:
    ++					reading+=aux;
    ++				break;
    ++			}
    ++		}
    ++/*
    ++		buffer = (char *)malloc(head->len+1);
    ++		while ( reading < head->len ){
    ++			memset(buffer,'\0', head->len+1);
    ++			aux = recv(sckHnd->fd, buffer, head->len, 0);
    ++			switch ( aux ) {
    ++				case -1:
    ++					switch (errno){
    ++						case EINTR:
    ++						case EAGAIN:
    ++							usleep (100);
    ++							break;
    ++						default:
    ++							return -1;
    ++					}
    ++				break;
    ++				case 0: // mean socket was closed
    ++					sckHnd->Rx += reading;
    ++					return reading;
    ++					break;
    ++				break;
    ++				default:
    ++					if (reading == 0) 
    ++						*message=(char *)malloc(aux+1);
    ++					else
    ++						*message=(char*)realloc(*message,(reading+aux+1)*sizeof(char));
    ++//						strcat(*message, buffer);
    ++					memcpy(*message+reading, buffer, aux);
    ++					reading += aux;
    ++					*message[reading]=0;
    ++			}
    ++		}
    ++		free(buffer);
    ++*/
    ++		sckHnd->Rx += reading;
    ++		reading += rslt;
    ++		return reading;
    ++	}
    ++	return rslt;
    ++}
    ++
    ++void rmtctrl_newClient(struct rmt_socket_t srv, struct rmt_socket_t *client, int *activeClients)
    ++{
    ++	int rslt;
    ++	int cli = (*activeClients);
    ++	rmtctrl_accept(srv,&client[cli]);
    ++	if (client[(*activeClients)].fd != -1)
    ++	{
    ++		(*activeClients)++;
    ++	}
    ++	if ((*activeClients) >= MAX_CLIENTS)
    ++	{
    ++		(*activeClients)--;
    ++		rslt = rmtctrl_write_msg(&client[(*activeClients)],MSG_END,0, "Sorry Server is too Busy\n	Try more late\n" );
    ++		if (rslt > 0) client[(*activeClients)].Tx += rslt;
    ++		rmtctrl_close(&client[(*activeClients)]);
    ++	}
    ++}
    ++
    ++void rmtctrl_close ( struct rmt_socket_t *client )
    ++{
    ++	printf("Desde %s se recibieron %d bytes y se enviaron %d bytes\n",inet_ntoa(client->addr.sin_addr),client->Rx,client->Tx);
    ++	close(client->fd); /* cierra fd_rmt_client */
    ++	printf("Se cerro conexión desde %s\n",inet_ntoa(client->addr.sin_addr) ); 
    ++	client->fd = -1;
    ++}
    ++
    ++void rmtctrl_accept (struct rmt_socket_t srv, struct rmt_socket_t *client ) 
    ++{
    ++	int sin_size=sizeof(struct sockaddr_in);
    ++	int int_Send;
    ++	struct sockaddr_in addr;
    ++	
    ++	if ((client->fd = accept(srv.fd,(struct sockaddr *)&client->addr,&sin_size))!=-1) 
    ++	{
    ++		client->Rx = 0;
    ++		client->Tx = 0;
    ++		unsigned char c = sizeof(uint32_t);
    ++		int_Send = send(client->fd, &c, 1, 0);
    ++		if (int_Send > 0) client->Tx += int_Send;
    ++		printf("Se abrió una conexión desde %s\n", inet_ntoa(client->addr.sin_addr)); 
    ++	}
    ++}
    ++
    ++//void cleanClients (int *table, int *n)
    ++void rmtctrl_cleanClients (struct rmt_socket_t *client, int *n)
    ++{
    ++	int i,j;
    ++
    ++	if ((client == NULL) || ((*n) == 0))
    ++		return;
    ++
    ++	j=0;
    ++	for (i=0; i<(*n); i++)
    ++	{
    ++		if (client[i].fd != -1)
    ++		{
    ++			client[j].fd = client[i].fd;
    ++			client[j].addr = client[i].addr;
    ++			client[j].Rx = client[i].Rx;
    ++			client[j].Tx = client[i].Tx;
    ++			j++;
    ++		}
    ++	}
    ++	
    ++	*n = j;
    ++}
    ++
    ++int rmtctrl_maxValue (struct rmt_socket_t *client, int n)
    ++{
    ++	int i;
    ++	int max;
    ++
    ++	if ((client == NULL) || (n<1))
    ++		return 0;
    ++		
    ++	max = client[0].fd;
    ++	for (i=0; i max)
    ++			max = client[i].fd;
    ++
    ++	return max;
    ++}
    ++
    ++struct rmt_socket_t rmtctrl_initSrv(struct in_addr rmtlisten, int rmtport){
    ++	struct rmt_socket_t srv;
    ++	if ((srv.fd=socket(AF_INET, SOCK_STREAM, 0)) == -1 ) {  
    ++		printf("error en socket()\n");
    ++		exit(1);
    ++	}
    ++	srv.addr.sin_family = AF_INET;
    ++	srv.addr.sin_port = htons(rmtport); 
    ++	srv.addr.sin_addr.s_addr = rmtlisten.s_addr;
    ++	memset(&(srv.addr.sin_zero), 0, 8); 
    ++
    ++	if(bind(srv.fd,(struct sockaddr*)&srv.addr,sizeof(struct sockaddr))==-1) {
    ++		printf("error en bind() \n");
    ++		exit(-1);
    ++	}     
    ++
    ++	if(listen(srv.fd,BACKLOG) == -1) {
    ++		printf("error en listen()\n");
    ++		exit(-1);
    ++	}
    ++	return srv;
    ++}
    ++
    ++void rmtctrl_srv(struct rmt_socket_t srv, struct rmt_socket_t *client, int *activeClients)
    ++{
    ++	fd_set fdRead;
    ++	int maxHnd;
    ++	int i;
    ++	struct timeval  nowait; 
    ++	memset((char *)&nowait,0,sizeof(nowait)); 
    ++
    ++	rmtctrl_cleanClients(client, activeClients);
    ++	FD_ZERO (&fdRead);
    ++	FD_SET (srv.fd, &fdRead);
    ++
    ++	for (i=0; i<*activeClients; i++)
    ++		FD_SET (client[i].fd, &fdRead);
    ++
    ++	maxHnd = rmtctrl_maxValue (client, *activeClients);
    ++		
    ++	if (maxHnd < srv.fd)
    ++		maxHnd = srv.fd;
    ++
    ++	select (maxHnd + 1, &fdRead, NULL, NULL,&nowait);
    ++	for (i=0; i<*activeClients; i++)
    ++	{
    ++		if (FD_ISSET (client[i].fd, &fdRead))
    ++		{
    ++				rmtctrl_msg_proccess(&client[i]);
    ++		}
    ++	}
    ++	if (FD_ISSET (srv.fd, &fdRead))
    ++		rmtctrl_newClient(srv,client, &(*activeClients));
    ++}
    ++
    ++int send_line( struct rmt_socket_t *client, int msg_type, int msg_extra, char *fmt, char *data)
    ++{
    ++	char str[2048];
    ++	memset(str,'\0',2048);
    ++	sprintf(str,fmt,data);
    ++	return rmtctrl_write_msg(client,msg_type,msg_extra, str);
    ++}
    ++
    ++int send_octets( struct rmt_socket_t *client, int msg_type, int msg_extra, char *fmt, uint64_t value)
    ++{
    ++	char *Buffer = (char *)octets2str(value);
    ++	int ret = send_line( client, msg_type, msg_extra, fmt, Buffer);
    ++	free(Buffer);
    ++	return ret;
    ++}
    ++
    ++int send_mac( struct rmt_socket_t *client, int msg_type, int msg_extra, char *fmt, uint8_t *value)
    ++{
    ++	char *Buffer = (char*)mac2str(value);
    ++	int ret = send_line( client, msg_type, msg_extra, fmt, Buffer);
    ++	free(Buffer);
    ++	return ret;
    ++}
    ++
    ++int send_number( struct rmt_socket_t *client, int msg_type, int msg_extra, char *fmt, uint64_t value)
    ++{
    ++	char Buffer[64];
    ++	sprintf(Buffer,"%d", value);
    ++	return send_line( client, msg_type, msg_extra, fmt, Buffer);
    ++}
    ++
    ++const char * mac2str(uint8_t *mac)
    ++{
    ++	char *buffer;
    ++	buffer=(char*)malloc(18*sizeof(char));
    ++	memset(buffer,'\0',18);
    ++	(void) sprintf(buffer,"%.2X-%.2X-%.2X-%.2X-%.2X-%.2X",
    ++		    mac[0], mac[1],
    ++		    mac[2], mac[3],
    ++		    mac[4], mac[5]);
    ++	return buffer;
    ++}
    ++
    ++const char * octets2str(uint64_t value)
    ++{
    ++	char *buffer;
    ++	buffer=(char*)malloc(13*sizeof(char));
    ++	memset(buffer,'\0',13);
    ++	if (value/8 > 1073741824){ // gigas
    ++		sprintf(buffer,"%.1f(GiB)",((value/8.0)/1073741824.0));
    ++	}else if (value/8 > 1048576){ // megas
    ++		sprintf(buffer,"%.1f(MiB)",((value/8.0)/1048576.0));
    ++	}else if (value/8 > 1024){ // KiloBytes
    ++		sprintf(buffer,"%.1f(KiB)",((value/8.0)/1024.0));
    ++	}else // Bytes
    ++		sprintf(buffer,"%.1f(B)",(value/8));
    ++	return buffer;
    ++}
    ++
    +--- /dev/null
    ++++ b/src/remotectrl.h
    +@@ -0,0 +1,86 @@
    ++#include 
    ++#ifndef _RMTCTRL_H
    ++#define _RMTCTRL_H
    ++
    ++enum 
    ++{
    ++	MSG_OK              = 0,
    ++	MSG_START           = 1,
    ++	MSG_PART            = 2,
    ++	MSG_END             = 3,
    ++	QRY_STATUS          = 100,
    ++	QRY_CONNECTED_LIST	= 101,
    ++	QRY_CONNECTED_FULL_LIST	= 102,
    ++	QRY_MACADDR         = 103,
    ++	QRY_IPADDR          = 104,
    ++	QRY_USERNAME        = 105,
    ++
    ++	CMD_AUTHORIZE				= 200,
    ++	CMD_DISCONNECT			= 201,
    ++	
    ++	EXTRA_ALL_OP				= 300,
    ++	EXTRA_MAC_OP				= 301,
    ++	EXTRA_IP_OP					= 302,
    ++	EXTRA_USER_OP				= 303,
    ++};
    ++
    ++enum
    ++{
    ++	STRING,
    ++	IP_ADDR,
    ++	MAC_ADDR,
    ++	NUMBER,
    ++	OCTETS,
    ++};
    ++
    ++#define PORT 15557 /* El puerto que ser? abierto */
    ++#define BACKLOG 2 /* El n?mero de conexiones permitidas */
    ++#define MAX_CLIENTS 10
    ++static char CONVERT_BUFF[1024];
    ++
    ++typedef struct msg_head_t {
    ++	uint32_t id;
    ++	uint32_t extra;
    ++	uint32_t len;
    ++} msg_head_t;
    ++
    ++typedef struct rmt_socket_t {
    ++	int fd;
    ++	struct sockaddr_in addr;
    ++	int Rx;
    ++	int Tx;
    ++} rmt_socket_t;
    ++
    ++//char *vstrcat(char *first, ...);
    ++
    ++	
    ++int rmtctrl_write_msg( struct rmt_socket_t *sckHnd, uint32_t id, uint32_t extra, char *message );
    ++int rmtctrl_read_msg( struct rmt_socket_t *sckHnd, msg_head_t *head, char **message );
    ++void rmtctrl_newClient(struct rmt_socket_t srv, struct rmt_socket_t *client, int *activeClients);
    ++void rmtctrl_close ( struct rmt_socket_t *client );
    ++void rmtctrl_accept (struct rmt_socket_t srv, struct rmt_socket_t *client );
    ++void rmtctrl_cleanClients (struct rmt_socket_t *client, int *n);
    ++
    ++//inicializa las variables y arranca el servidor
    ++struct rmt_socket_t rmtctrl_initSrv(struct in_addr rmtlisten, int rmtport);
    ++//esta funcion es la que va dentro del loop del programa que lo utiliza
    ++void rmtctrl_srv(struct rmt_socket_t srv, struct rmt_socket_t *client, int *activeClients);
    ++//En esta funcion es donde se define como se procesan los mensajes
    ++void rmtctrl_msg_proccess(struct rmt_socket_t *client);
    ++
    ++//char * pepe(char *dest, char *sep, char *src);
    ++
    ++//char * send_value(char *name, char *value, int len, struct in_addr *addr,
    ++//	    uint8_t *mac, long int *integer);
    ++//int addfield(char* reg, char *field, char sep);
    ++//int addfield1(char** reg,int rlen, char *field, int flen, char sep);
    ++//int sendConnectedInfo(struct app_conn_t *appconn, struct rmt_socket_t *client); 
    ++//const char * value2str( int type, void *value);
    ++const char * octets2str(uint64_t value);
    ++const char * mac2str(uint8_t *mac);
    ++int send_line( struct rmt_socket_t *client, int msg_type, int msg_extra, char *fmt, char *data);
    ++int send_octets( struct rmt_socket_t *client, int msg_type, int msg_extra, char *fmt, uint64_t value);
    ++int send_mac( struct rmt_socket_t *client, int msg_type, int msg_extra, char *fmt, uint8_t *value);
    ++int send_number( struct rmt_socket_t *client, int msg_type, int msg_extra, char *fmt, uint64_t value);
    ++
    ++#endif	/* !_RMTCTRL_H */
    +--- a/src/Makefile.am
    ++++ b/src/Makefile.am
    +@@ -3,7 +3,7 @@ sbin_PROGRAMS = chilli
    + # add -pg to enable gprof
    + AM_CFLAGS = -D_GNU_SOURCE -fno-builtin -DSBINDIR='"$(sbindir)"' 
    + 
    +-chilli_SOURCES = chilli.c defs.h tun.c tun.h cmdline.c cmdline.h ippool.c ippool.h radius.h radius.c md5.c md5.h redir.h redir.c dhcp.c dhcp.h syserr.c syserr.h iphash.c iphash.h lookup.c lookup.h
    ++chilli_SOURCES = chilli.c defs.h tun.c tun.h cmdline.c cmdline.h ippool.c ippool.h radius.h radius.c md5.c md5.h redir.h redir.c dhcp.c dhcp.h syserr.c syserr.h iphash.c iphash.h lookup.c lookup.h remotectrl.c remotectrl.h
    + 
    + # chilli_LDFLAGS = -lcrypt
    + 
    diff --git a/net/chillispot/patches/200-gcc_fix.patch b/net/chillispot/patches/200-gcc_fix.patch
    new file mode 100644
    index 0000000..a819216
    --- /dev/null
    +++ b/net/chillispot/patches/200-gcc_fix.patch
    @@ -0,0 +1,57 @@
    +diff -Naur chillispot-1.1.0/src/tun.c chillispot-1.1.0.patched/src/tun.c
    +--- chillispot-1.1.0/src/tun.c	2006-09-24 20:48:25.000000000 +0300
    ++++ chillispot-1.1.0.patched/src/tun.c	2009-10-20 02:08:49.000000000 +0300
    +@@ -366,7 +366,7 @@
    +   this->addrs++;
    +   return 0;
    + 
    +-#elif defined (__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
    ++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
    + 
    +   int fd;
    +   struct ifaliasreq      areq;
    +@@ -445,7 +445,7 @@
    + #if defined(__linux__)
    +   ifr.ifr_netmask.sa_family = AF_INET;
    + 
    +-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
    ++#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
    +   ((struct sockaddr_in *) &ifr.ifr_addr)->sin_len = 
    +     sizeof (struct sockaddr_in);
    +   ((struct sockaddr_in *) &ifr.ifr_dstaddr)->sin_len = 
    +@@ -497,7 +497,7 @@
    +     ((struct sockaddr_in *) &ifr.ifr_netmask)->sin_addr.s_addr = 
    +       netmask->s_addr;
    + 
    +-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
    ++#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
    +     ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr = 
    +       netmask->s_addr;
    + 
    +@@ -585,7 +585,7 @@
    +   close(fd);
    +   return 0;
    +   
    +-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
    ++#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
    + 
    + struct {
    +   struct rt_msghdr rt;
    +@@ -674,7 +674,7 @@
    + #if defined(__linux__)
    +   struct ifreq ifr;
    + 
    +-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
    ++#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
    +   char devname[IFNAMSIZ+5]; /* "/dev/" + ifname */
    +   int devnum;
    +   struct ifaliasreq areq;
    +@@ -722,7 +722,7 @@
    +   ioctl((*tun)->fd, TUNSETNOCSUM, 1); /* Disable checksums */
    +   return 0;
    +   
    +-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
    ++#elif defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
    + 
    +   /* Find suitable device */
    +   for (devnum = 0; devnum < 255; devnum++) { /* TODO 255 */ 
    diff --git a/net/chrony/Makefile b/net/chrony/Makefile
    new file mode 100644
    index 0000000..21e5d84
    --- /dev/null
    +++ b/net/chrony/Makefile
    @@ -0,0 +1,71 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=chrony
    +PKG_VERSION:=1.23
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:= ftp://download.tuxfamily.org/projects/chrony/ \
    +	http://download.tuxfamily.org/chrony/
    +PKG_MD5SUM:=ffce77695e55d8efda19ab0b78309c23
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/chrony
    +  SUBMENU:=Time Synchronization
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libreadline +libncurses @!TARGET_avr32 @!powerpc
    +  TITLE:=NTP client/server for on-demand connections
    +  URL:=http://chrony.sunsite.dk/
    +endef
    +
    +define Package/chrony/description
    +	A NTP implementation that has been specifically written to work
    +	well in the case of an intermittent (e.g. dial-on-demand)
    +	connection to the network where your NTP servers are.
    +endef
    +
    +define Package/chrony/conffiles
    +/etc/chrony/chrony.conf
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +			--target=$(GNU_TARGET_NAME) \
    +			--prefix=/usr \
    +			--with-readline-includes=$(STAGING_DIR)/usr/include \
    +			--with-readline-library=$(STAGING_DIR)/usr/lib \
    +	)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		prefix="$(PKG_INSTALL_DIR)/usr"
    +endef
    +
    +define Package/chrony/install
    +	$(INSTALL_DIR) $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyd $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyc $(1)/usr/bin
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_DIR) $(1)/etc/chrony
    +	$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
    +	$(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
    +	$(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
    +	$(INSTALL_CONF) ./files/ntpd.config $(1)/etc/config/ntpd
    +	$(INSTALL_CONF) ./files/chrony.conf $(1)/etc/chrony/chrony.conf
    +	$(INSTALL_CONF) ./files/chrony.keys $(1)/etc/chrony/chrony.keys
    +endef
    +
    +$(eval $(call BuildPackage,chrony))
    diff --git a/net/chrony/files/chrony.conf b/net/chrony/files/chrony.conf
    new file mode 100644
    index 0000000..508fdfb
    --- /dev/null
    +++ b/net/chrony/files/chrony.conf
    @@ -0,0 +1,17 @@
    +# Chrony configuration
    +
    +# Note: time servers and ntp client access is configured in /etc/config/ntpd 
    +# and automatically set at startup
    +
    +# Log clock errors above 0.5 seconds
    +logchange 0.5
    +
    +# Allow command access only from localhost
    +cmdallow localhost
    +cmddeny
    +
    +# Password config for chronyc
    +# Note: Using a command key other than "1" will break 
    +# /etc/init.d/ntpd and /etc/hotplug.d/iface/20-ntpd
    +keyfile /etc/chrony/chrony.keys
    +commandkey 1
    diff --git a/net/chrony/files/chrony.keys b/net/chrony/files/chrony.keys
    new file mode 100644
    index 0000000..c2d429e
    --- /dev/null
    +++ b/net/chrony/files/chrony.keys
    @@ -0,0 +1 @@
    +1 chronyc
    diff --git a/net/chrony/files/ntpd.config b/net/chrony/files/ntpd.config
    new file mode 100644
    index 0000000..7a3b6fd
    --- /dev/null
    +++ b/net/chrony/files/ntpd.config
    @@ -0,0 +1,6 @@
    +# Generic NTP configuration
    +# Time servers and network(s) that may access the time service
    +
    +config ntpd
    +	option TimeServers	"0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org 2.openwrt.pool.ntp.org 3.openwrt.pool.ntp.org"
    +	option ClientAccessFrom	"lan"
    diff --git a/net/chrony/files/ntpd.hotplug b/net/chrony/files/ntpd.hotplug
    new file mode 100644
    index 0000000..e2e5adf
    --- /dev/null
    +++ b/net/chrony/files/ntpd.hotplug
    @@ -0,0 +1,21 @@
    +COMMAND=/usr/bin/chronyc
    +CHRONY_KEY=$(awk '/^1 / { print $2; }' /etc/chrony/chrony.keys)
    +
    +chrony_control() {
    +$COMMAND << EOF
    +password $CHRONY_KEY
    +$1
    +EOF
    +}
    +
    +[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
    +	[ -x $COMMAND ] && [ -n "$CHRONY_KEY" ] &&{
    +		chrony_control online
    +	}
    +}
    +
    +[ "$ACTION" = "ifdown" -a "$INTERFACE" = "wan" ] && {
    +	[ -x $COMMAND ] && [ -n "$CHRONY_KEY" ] &&{
    +		chrony_control offline
    +	}
    +}
    diff --git a/net/chrony/files/ntpd.init b/net/chrony/files/ntpd.init
    new file mode 100644
    index 0000000..dae0184
    --- /dev/null
    +++ b/net/chrony/files/ntpd.init
    @@ -0,0 +1,65 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +
    +START=60
    +
    +start() {
    +	[ ! -f /var/run/chronyd.pid ] && (
    +		/usr/sbin/chronyd -f /etc/chrony/chrony.conf
    +
    +		local NTP_SERVERS
    +		local NTP_SERVER
    +		local CLIENT_NETWORKS
    +		local NETNAME
    +		config_load ntpd
    +		config_get NTP_SERVERS $CONFIG_SECTION TimeServers
    +		config_get CLIENT_NETWORKS $CONFIG_SECTION ClientAccessFrom
    +		CHRONY_KEY=$(awk '/^1 / { print $2; }' /etc/chrony/chrony.keys)
    +		include /lib/network
    +		scan_interfaces
    +
    +		# Define servers and do a rapid series of time measurements
    +		# to get up to date
    +		(
    +			echo password $CHRONY_KEY
    +			for NTP_SERVER in $NTP_SERVERS; do
    +				echo add server $NTP_SERVER
    +			done
    +			echo burst 5/5
    +		) | chronyc > /dev/null 2>&1
    +		# ... wait until a reference ID is found ...
    +		while chronyc tracking | grep 'Reference ID.*0.0.0.0' >/dev/null ; do sleep 1; done
    +		# ... and finally, adjust the time in a single step
    +		# and allow clients to access the server
    +		(
    +			echo password $CHRONY_KEY
    +			echo makestep
    +			for NETNAME in $CLIENT_NETWORKS; do
    +				local INTERFACE
    +				local IP
    +				local NETMASK
    +				local BROADCAST
    +				local NETWORK
    +				local PREFIX
    +
    +				config_get INTERFACE "$NETNAME" ifname
    +				if [ -n "$INTERFACE" ] ; then
    +					eval $(ifconfig $INTERFACE | grep inet | sed -e 's/.*addr:/IP=/' -e 's/ .*Mask:/; NETMASK=/')
    +					eval $(ipcalc.sh $IP $NETMASK)
    +					echo allow $NETWORK/$PREFIX
    +				fi
    +			done
    +		) | chronyc > /dev/null 2>&1
    +	)
    +}
    +
    +stop() {
    +	[ -r /var/run/chronyd.pid ] && PID=$(cat /var/run/chronyd.pid)
    +	[ -n "$PID" ] && kill $PID
    +}
    +
    +restart() {
    +	stop
    +	while [ -r /var/run/chronyd.pid ] ; do sleep 1; done
    +	start
    +}
    diff --git a/net/chrony/patches/001-crosscompile.patch b/net/chrony/patches/001-crosscompile.patch
    new file mode 100644
    index 0000000..cdc5939
    --- /dev/null
    +++ b/net/chrony/patches/001-crosscompile.patch
    @@ -0,0 +1,25 @@
    +--- a/configure
    ++++ b/configure
    +@@ -187,6 +187,13 @@
    +     --prefix=* | --install_prefix=* )
    +       INSTALL_PREFIX=`echo $option | sed -e 's/[^=]*=//;'`
    +     ;;
    ++    --target=* )
    ++      TARGET=`echo $option | sed -e 's/[^=]*=//;'`
    ++      OPERATINGSYSTEM=`echo $TARGET | sed -e 's/.*-//;'`
    ++      MACHINE=`echo $TARGET | sed -e 's/-.*//;'`
    ++      VERSION=""
    ++      SYSTEM=${OPERATINGSYSTEM}-${MACHINE}
    ++    ;;
    +     --trace )
    +       EXTRA_DEFS="-DTRACEON"
    +     ;;
    +@@ -242,7 +249,7 @@
    +         ;;
    +     esac
    +     ;;
    +-    Linux* )
    ++    Linux* | linux* )
    +         EXTRA_OBJECTS="sys_linux.o wrap_adjtimex.o"
    +         if [ $feat_rtc -eq 1 ] ; then
    +             EXTRA_OBJECTS+=" rtc_linux.o"
    diff --git a/net/click/Makefile b/net/click/Makefile
    new file mode 100644
    index 0000000..ef48d79
    --- /dev/null
    +++ b/net/click/Makefile
    @@ -0,0 +1,75 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=click
    +PKG_VERSION:=20101020
    +PKG_RELEASE:=1
    +PKG_REV:=8f521a2dcd58ea8205b3b6070be605a21fb9154b
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=git://read.cs.ucla.edu/git/click
    +PKG_SOURCE_PROTO:=git
    +PKG_SOURCE_VERSION:=$(PKG_REV)
    +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
    +PKG_MD5SUM:=c3cba1c923d0a034cc518720b5ba7b40
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/click
    +	SECTION:=net
    +	CATEGORY:=Network
    +	DEPENDS:=@BROKEN
    +	TITLE:=Click Modular Router
    +	URL:=http://read.cs.ucla.edu/click
    +endef
    +
    +define Package/click/Description
    +	The Click Modular Router userspace package
    +endef
    +
    +TARGET_CFLAGS += "-static -O2 -MD"
    +TARGET_CXXFLAGS += "-static -O2 -MD"
    +
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR); \
    +		rm -rf config.{cache,status} ; \
    +		./configure \
    +			--prefix=/usr \
    +			--target=$(GNU_TARGET_NAME) \
    +			--host=$(GNU_HOST_NAME) \
    +			--build=$(GNU_BUILD_NAME) \
    +			--enable-tools=mixed \
    +			--enable-userlevel \
    +			--enable-wifi \
    +			--enable-fixincludes \
    +			--disable-linuxmodule \
    +	)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		tools elementmap.xml
    +	(cd $(PKG_BUILD_DIR)/userlevel; \
    +		../tools/click-mkmindriver/click-mkmindriver -p $(PKG_NAME) -C .. \
    +		-f $(PKG_BUILD_DIR)/conf/wifi/dump.click \
    +		-A --all -E Discard -E Print; \
    +	)
    +	$(MAKE) -C $(PKG_BUILD_DIR) MINDRIVER=$(PKG_NAME)
    +endef
    +
    +define Package/click/install
    +	$(INSTALL_DIR) $(1)/usr
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_DIR) $(1)/usr/share/click
    +	$(CP) $(PKG_BUILD_DIR)/userlevel/$(PKG_NAME)click $(1)/usr/bin/click
    +	$(CP) $(PKG_BUILD_DIR)/tools/click-align/click-align $(1)/usr/bin/click-align
    +	$(CP) $(PKG_BUILD_DIR)/elementmap.xml $(1)/usr/share/click/elementmap.xml
    +endef
    +
    +$(eval $(call BuildPackage,click))
    diff --git a/net/click/files/roofnet.init b/net/click/files/roofnet.init
    new file mode 100644
    index 0000000..bc36394
    --- /dev/null
    +++ b/net/click/files/roofnet.init
    @@ -0,0 +1,15 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +start() {
    +	killall -q click
    +	cp /usr/bin/srcr.click /tmp
    +	sh /usr/bin/gen_config_roofnet.sh > /tmp/unaligned.click
    +	click-align /tmp/unaligned.click > /tmp/roofnet.click
    +	/usr/bin/click /tmp/roofnet.click > /tmp/roofnet.log 2>&1 &
    +}
    +
    +stop() {
    +	killall click
    +}
    diff --git a/net/click/patches/100-compile_fix.patch b/net/click/patches/100-compile_fix.patch
    new file mode 100644
    index 0000000..f798254
    --- /dev/null
    +++ b/net/click/patches/100-compile_fix.patch
    @@ -0,0 +1,22 @@
    +--- a/tools/click-mkmindriver/Makefile.in
    ++++ b/tools/click-mkmindriver/Makefile.in
    +@@ -60,7 +60,7 @@ DEPCFLAGS = @DEPCFLAGS@
    + DEFS = @DEFS@
    + INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
    + 	-I$(top_srcdir)/tools/lib -I$(srcdir)
    +-LDFLAGS = @LDFLAGS@
    ++LDFLAGS = @LDFLAGS@ -lrt
    + LIBS = @LIBS@ @POSIX_CLOCK_LIBS@ $(DL_LIBS)
    + 
    + CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) $(DEPCFLAGS)
    +--- a/configure
    ++++ b/configure
    +@@ -7135,7 +7135,7 @@ fi
    + $as_echo "$ac_cv_va_list_addr" >&6; }
    +     if test "x$ac_cv_va_list_addr" = xyes; then
    + 
    +-$as_echo "#define HAVE_ADDRESSABLE_VA_LIST 1" >>confdefs.h
    ++$as_echo "#define HAVE_ADDRESSABLE_VA_LIST 0" >>confdefs.h
    + 
    +     fi
    + 
    diff --git a/net/click/patches/110-multithread_fix.patch b/net/click/patches/110-multithread_fix.patch
    new file mode 100644
    index 0000000..b875758
    --- /dev/null
    +++ b/net/click/patches/110-multithread_fix.patch
    @@ -0,0 +1,12 @@
    +--- a/lib/master.cc
    ++++ b/lib/master.cc
    +@@ -409,7 +409,9 @@ Master::process_pending(RouterThread *th
    +     while (Task *t = Task::pending_to_task(my_pending)) {
    + 	my_pending = t->_pending_nextptr;
    + 	t->_pending_nextptr = 0;
    ++# if HAVE_MULTITHREAD
    + 	click_master_mb();
    ++# endif
    + 	t->process_pending(thread);
    +     }
    + }
    diff --git a/net/cmdftp/Makefile b/net/cmdftp/Makefile
    new file mode 100644
    index 0000000..8e99238
    --- /dev/null
    +++ b/net/cmdftp/Makefile
    @@ -0,0 +1,46 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=cmdftp
    +PKG_VERSION:=0.9.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://download.savannah.nongnu.org/releases/$(PKG_NAME)
    +PKG_MD5SUM:=9bd0741bbb1f218be95c089dc06b2777
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/cmdftp
    +  SUBMENU:=File Transfer
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=cmdftp is a tiny command line FTP client for Unix systems
    +  URL:=http://www.nongnu.org/cmdftp/
    +endef
    +
    +define Package/cmdftp/description
    +	Features include passive mode for all data transfers, shell
    +	like transparent syntax for local and remote modes, multiple
    +	and recursive file transfers using wildcards, recursive copy and
    +	move commands, remote and local text file viewing and editing,
    +	network errors detection and resuming of currently executing
    +	command, partial download resuming (if server accepts REST
    +	command), tab completion for both local and remote names,
    +	autologin using classic ~/.netrc approach, large file support.
    +
    +	cmdftp is aimed at being small and simple.
    +endef
    +
    +define Package/cmdftp/install	
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,cmdftp))
    diff --git a/net/conntrack-tools/Makefile b/net/conntrack-tools/Makefile
    new file mode 100644
    index 0000000..942b7fa
    --- /dev/null
    +++ b/net/conntrack-tools/Makefile
    @@ -0,0 +1,59 @@
    +#
    +# Copyright (C) 2009-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=conntrack-tools
    +PKG_VERSION:=1.0.0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:= \
    +	http://www.netfilter.org/projects/conntrack-tools/files \
    +	ftp://ftp.netfilter.org/pub/conntrack-tools \
    +	http://mirrors.evolva.ro/netfilter.org/conntrack-tools
    +PKG_MD5SUM:=5add24d4761baf17af630d5627a71752
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/conntrack-tools
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libnetfilter-conntrack
    +  SUBMENU:=Firewall
    +  TITLE:=Connection tracking userspace tools
    +  URL:=http://conntrack-tools.netfilter.org/
    +endef
    +
    +define Package/conntrack-tools/description
    + The conntrack-tools are a set of free software userspace tools for Linux
    + that allow system administrators interact with the Connection Tracking
    + System, which is the module that provides stateful packet inspection for
    + iptables. The conntrack-tools are the userspace daemon conntrackd and the
    + command line interface conntrack.
    +endef
    +
    +define Package/conntrack-tools/conffiles
    +/etc/conntrackd/conntrackd.conf
    +endef
    +
    +define Package/conntrack-tools/install
    +	$(INSTALL_DIR) $(1)/etc/conntrackd
    +	$(INSTALL_CONF) \
    +		$(PKG_BUILD_DIR)/doc/stats/conntrackd.conf \
    +		$(1)/etc/conntrackd/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/sbin/conntrack \
    +		$(PKG_INSTALL_DIR)/usr/sbin/conntrackd \
    +		$(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,conntrack-tools))
    diff --git a/net/coova-chilli/Makefile b/net/coova-chilli/Makefile
    new file mode 100644
    index 0000000..50b2a80
    --- /dev/null
    +++ b/net/coova-chilli/Makefile
    @@ -0,0 +1,57 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=coova-chilli
    +PKG_VERSION:=1.2.5
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://ap.coova.org/chilli
    +PKG_MD5SUM:=1b890cb043b4340e1f15c2b2cff742d3
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/coova-chilli
    +  SUBMENU:=Captive Portals
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+kmod-tun +librt
    +  TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version)
    +  URL:=http://www.coova.org/CoovaChilli
    +endef
    +
    +define Package/coova-chilli/description
    +	CoovaChilli is an open source access controller for wireless LAN
    +	access points and is based on ChilliSpot. It is used for authenticating
    +	users of a wireless (or wired) LAN. It supports web based login (UAM)
    +	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.
    +endef
    +
    +define Package/coova-chilli/conffiles
    +/etc/chilli.conf
    +endef
    +
    +define Package/coova-chilli/install
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/chilli.conf $(1)/etc/
    +	$(INSTALL_DIR) $(1)/etc/chilli
    +	$(CP) $(PKG_INSTALL_DIR)/etc/chilli/* $(1)/etc/chilli/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chilli* $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,coova-chilli))
    diff --git a/net/corkscrew/Makefile b/net/corkscrew/Makefile
    new file mode 100644
    index 0000000..7cc697a
    --- /dev/null
    +++ b/net/corkscrew/Makefile
    @@ -0,0 +1,37 @@
    +# 
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=corkscrew
    +PKG_VERSION:=2.0
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.agroman.net/corkscrew/
    +PKG_MD5SUM:=35df77e7f0e59c0ec4f80313be52c10a
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/corkscrew
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=SSH
    +  TITLE:=Tunneling SSH through HTTP proxies.
    +  URL:=http://www.agroman.net/corkscrew/
    +endef
    +
    +define Build/Configure
    +  $(call Build/Configure/Default,)
    +endef
    +
    +define Package/corkscrew/install
    +        $(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_BUILD_DIR)/corkscrew $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,corkscrew))
    diff --git a/net/crowdcontrol/Makefile b/net/crowdcontrol/Makefile
    new file mode 100644
    index 0000000..941f31e
    --- /dev/null
    +++ b/net/crowdcontrol/Makefile
    @@ -0,0 +1,48 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=crowdcontrol
    +PKG_VERSION:=0.4b
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
    +PKG_MD5SUM:=a0991ae3d1f1a361558bed1a4aa66a9c
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/crowdcontrol
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Web Servers/Proxies
    +  TITLE:=The extra-light http proxy server
    +  URL:=http://sourceforge.net/projects/crowdcontrol/
    +endef
    +
    +define Package/crowdcontrol/description
    +	Crowd Control is an small, cross-platform HTTP proxy (a fork of the elhttp project) 
    +	designed for systems with little RAM, such as a home router. It can filter URLs using 
    +	SquidGuard blocklists, and has the unique ability to filter HTTPS domains as well.
    +endef
    +
    +define Build/Configure
    +endef
    +
    +define Build/Compile
    +	$(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/crowdcontrol $(PKG_BUILD_DIR)/crowdcontrol.c
    +endef
    +
    +define Package/crowdcontrol/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_DIR) $(1)/etc/crowdcontrol
    +	$(CP) $(PKG_BUILD_DIR)/crowdcontrol $(1)/usr/sbin
    +	$(CP) $(PKG_BUILD_DIR)/*-{domains,expressions,urls} $(1)/etc/crowdcontrol/
    +endef
    +
    +$(eval $(call BuildPackage,crowdcontrol))
    diff --git a/net/ctorrent/Makefile b/net/ctorrent/Makefile
    new file mode 100644
    index 0000000..522fea5
    --- /dev/null
    +++ b/net/ctorrent/Makefile
    @@ -0,0 +1,85 @@
    +#
    +# Copyright (C) 2006-2008 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ctorrent
    +PKG_VERSION:=dnh3.3.2
    +PKG_RELEASE:=5
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/dtorrent \
    +	http://www.rahul.net/dholmes/ctorrent/
    +PKG_MD5SUM:=59b23dd05ff70791cd6449effa7fc3b6
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/ctorrent/Default
    +  SUBMENU:=BitTorrent
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+uclibcxx
    +  TITLE:=console-based BitTorrent client
    +  MAINTAINER:=Peter Wagner 
    +  URL:=http://www.rahul.net/dholmes/ctorrent/
    +endef
    +
    +define Package/ctorrent/Default/description
    +	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.
    +endef
    +
    +define Package/ctorrent
    +$(call Package/ctorrent/Default)
    +  TITLE+= (with OpenSSL support)
    +  DEPENDS+=+libopenssl
    +  VARIANT:=ssl
    +endef
    +
    +define Package/ctorrent/description
    +$(call Package/ctorrent/Default/description)
    + This package is built with OpenSSL support.
    +endef
    +
    +define Package/ctorrent-nossl
    +$(call Package/ctorrent/Default)
    +  TITLE+= (with builtin SHA-1)
    +  VARIANT:=nossl
    +endef
    +
    +define Package/ctorrent-nossl/description
    +$(call Package/ctorrent/Default/description)
    + This package is built with builtin (Steve Reid's public-domain) SHA-1 support
    +endef
    +
    +CONFIGURE_VARS += \
    +	CXX="g++-uc" \
    +	CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
    +	LIBS="-nodefaultlibs -luClibc++ $(LIBGCC_S) -lc"
    +
    +ifeq ($(BUILD_VARIANT),ssl)
    +	CONFIGURE_ARGS += \
    +		--with-ssl="$(STAGING_DIR)/usr"
    +endif
    +
    +ifeq ($(BUILD_VARIANT),nossl)
    +	CONFIGURE_ARGS += \
    +		--with-ssl=no
    +endif
    +
    +define Package/ctorrent/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME)
    +endef
    +
    +Package/ctorrent-nossl/install = $(Package/ctorrent/install)
    +
    +$(eval $(call BuildPackage,ctorrent))
    +$(eval $(call BuildPackage,ctorrent-nossl))
    diff --git a/net/ctorrent/patches/100-CVE-2009-1759.patch b/net/ctorrent/patches/100-CVE-2009-1759.patch
    new file mode 100644
    index 0000000..86ae1d7
    --- /dev/null
    +++ b/net/ctorrent/patches/100-CVE-2009-1759.patch
    @@ -0,0 +1,364 @@
    +Patch for CVE-2009-1759.
    +Source: Upstream SVN, rev 302 from the dtorrent-3 branch.
    +
    +Index: a/bencode.h
    +===================================================================
    +--- a/bencode.h	(revision 300)
    ++++ b/bencode.h	(revision 302)
    +@@ -25,7 +25,7 @@
    + size_t decode_list(const char *b,size_t len,const char *keylist);
    + size_t decode_rev(const char *b,size_t len,const char *keylist);
    + size_t decode_query(const char *b,size_t len,const char *keylist,const char **ps,size_t *pi,int64_t *pl,int method);
    +-size_t decode_list2path(const char *b, size_t n, char *pathname);
    ++size_t decode_list2path(const char *b, size_t n, char *pathname, size_t maxlen);
    + size_t bencode_buf(const char *str,size_t len,FILE *fp);
    + size_t bencode_str(const char *str, FILE *fp);
    + size_t bencode_int(const uint64_t integer, FILE *fp);
    +Index: a/bencode.cpp
    +===================================================================
    +--- a/bencode.cpp	(revision 300)
    ++++ b/bencode.cpp	(revision 302)
    +@@ -233,22 +233,28 @@
    +   return bencode_end_dict_list(fp);
    + }
    + 
    +-size_t decode_list2path(const char *b, size_t n, char *pathname)
    ++size_t decode_list2path(const char *b, size_t n, char *pathname, size_t maxlen)
    + {
    +   const char *pb = b;
    +   const char *s = (char *) 0;
    ++  const char *endmax = pathname + maxlen - 1;
    +   size_t r,q;
    + 
    +   if( 'l' != *pb ) return 0;
    +   pb++;
    +   n--;
    +   if( !n ) return 0;
    +-  for(; n;){
    ++  while( n && pathname < endmax ){
    +     if(!(r = buf_str(pb, n, &s, &q)) ) return 0;
    ++    if( q >= maxlen ) return 0;
    +     memcpy(pathname, s, q);
    +     pathname += q;
    +-    pb += r; n -= r; 
    +-    if( 'e' != *pb ){*pathname = PATH_SP, pathname++;} else break;
    ++    maxlen -= q;
    ++    pb += r;
    ++    n -= r; 
    ++    if( 'e' == *pb ) break;
    ++    if( pathname >= endmax ) return 0;
    ++    *pathname++ = PATH_SP;
    +   }
    +   *pathname = '\0';
    +   return (pb - b + 1);
    +Index: a/btfiles.cpp
    +===================================================================
    +--- a/btfiles.cpp	(revision 300)
    ++++ b/btfiles.cpp	(revision 302)
    +@@ -449,7 +449,8 @@
    +   return 0;
    + }
    + 
    +-int btFiles::BuildFromMI(const char *metabuf, const size_t metabuf_len, const char *saveas)
    ++int btFiles::BuildFromMI(const char *metabuf, const size_t metabuf_len,
    ++  const char *saveas, unsigned char exam_only)
    + {
    +   char path[MAXPATHLEN];
    +   const char *s, *p;
    +@@ -458,11 +459,19 @@
    +   int f_warned = 0;
    + 
    +   if( !decode_query(metabuf, metabuf_len, "info|name", &s, &q, (int64_t*)0,
    +-      QUERY_STR) || MAXPATHLEN <= q )
    ++        QUERY_STR) || MAXPATHLEN <= q ){
    ++    errno = EINVAL;
    +     return -1;
    ++  }
    + 
    +   memcpy(path, s, q);
    +   path[q] = '\0';
    ++  if( !exam_only &&
    ++      (PATH_SP == path[0] || '/' == path[0] || 0==strncmp("..", path, 2)) ){
    ++    CONSOLE.Warning(1, "error, unsafe path \"%s\" in torrent data", path);
    ++    errno = EINVAL;
    ++    return -1;
    ++  }
    + 
    +   r = decode_query(metabuf, metabuf_len, "info|files", (const char**)0, &q,
    +                    (int64_t*)0, QUERY_POS);
    +@@ -471,21 +480,31 @@
    +     BTFILE *pbf_last = (BTFILE*) 0; 
    +     BTFILE *pbf = (BTFILE*) 0;
    +     size_t dl;
    ++    unsigned long nfiles = 0;
    ++
    +     if( decode_query(metabuf,metabuf_len,"info|length",
    +-                    (const char**) 0,(size_t*) 0,(int64_t*) 0,QUERY_LONG) )
    ++                    (const char**) 0,(size_t*) 0,(int64_t*) 0,QUERY_LONG) ){
    ++      errno = EINVAL;
    +       return -1;
    ++    }
    + 
    +     if( saveas ){
    +       m_directory = new char[strlen(saveas) + 1];
    + #ifndef WINDOWS
    +-      if(!m_directory) return -1;
    ++      if( !m_directory ){
    ++        errno = ENOMEM;
    ++        return -1;
    ++      }
    + #endif
    +       strcpy(m_directory,saveas);
    +     }else{
    +       int f_conv;
    +       char *tmpfn = new char[strlen(path)*2+5];
    + #ifndef WINDOWS
    +-      if( !tmpfn ) return -1;
    ++      if( !tmpfn ){
    ++        errno = ENOMEM;
    ++        return -1;
    ++      }
    + #endif
    +       if( f_conv = ConvertFilename(tmpfn, path, strlen(path)*2+5) ){
    +         if( arg_flg_convert_filenames ){
    +@@ -493,6 +512,7 @@
    + #ifndef WINDOWS
    +           if( !m_directory ){
    +             delete []tmpfn;
    ++            errno = ENOMEM;
    +             return -1;
    +           }
    + #endif
    +@@ -507,7 +527,10 @@
    +       if( !f_conv || !arg_flg_convert_filenames ){
    +         m_directory = new char[strlen(path) + 1];
    + #ifndef WINDOWS
    +-        if( !m_directory ) return -1;
    ++        if( !m_directory ){
    ++          errno = ENOMEM;
    ++          return -1;
    ++        }
    + #endif
    +         strcpy(m_directory,path);
    +       }
    +@@ -517,24 +540,50 @@
    +     p = metabuf + r + 1; 
    +     q--;
    +     for(; q && 'e' != *p; p += dl, q -= dl){
    +-      if(!(dl = decode_dict(p, q, (const char*) 0)) ) return -1;
    +-      if( !decode_query(p, dl, "length", (const char**) 0,
    +-                       (size_t*) 0,&t,QUERY_LONG) ) return -1;
    ++      if( !(dl = decode_dict(p, q, (const char*) 0)) ||
    ++          !decode_query(p, dl, "length", (const char**) 0, (size_t*) 0, &t,
    ++                        QUERY_LONG) ){
    ++        errno = EINVAL;
    ++        return -1;
    ++      }
    +       pbf = _new_bfnode();
    + #ifndef WINDOWS
    +-      if( !pbf ) return -1;
    ++      if( !pbf ){
    ++        errno = ENOMEM;
    ++        return -1;
    ++      }
    + #endif
    ++      nfiles++;
    +       pbf->bf_length = t;
    +       m_total_files_length += t;
    +       r = decode_query(p, dl, "path", (const char **)0, &n, (int64_t*)0,
    +                        QUERY_POS);
    +-      if( !r ) return -1;
    +-      if(!decode_list2path(p + r, n, path)) return -1;
    ++      if( !r || !decode_list2path(p + r, n, path, sizeof(path)) ){
    ++        CONSOLE.Warning(1,
    ++          "error, invalid path in torrent data for file %lu at offset %llu",
    ++          nfiles, m_total_files_length - t);
    ++        delete pbf;
    ++        errno = EINVAL;
    ++        return -1;
    ++      }
    ++      if( !exam_only &&
    ++          (PATH_SP == path[0] || '/' == path[0] || 0==strncmp("..", path, 2)) ){
    ++        CONSOLE.Warning(1,
    ++          "error, unsafe path \"%s\" in torrent data for file %lu",
    ++          path, nfiles);
    ++        delete pbf;
    ++        errno = EINVAL;
    ++        return -1;
    ++      }
    + 
    ++
    +       int f_conv;
    +       char *tmpfn = new char[strlen(path)*2+5];
    + #ifndef WINDOWS
    +-      if( !tmpfn ) return -1;
    ++      if( !tmpfn ){
    ++        errno = ENOMEM;
    ++        return -1;
    ++      }
    + #endif
    +       if( f_conv = ConvertFilename(tmpfn, path, strlen(path)*2+5) ){
    +         if( arg_flg_convert_filenames ){
    +@@ -542,6 +591,7 @@
    + #ifndef WINDOWS
    +           if( !pbf->bf_filename ){
    +             delete []tmpfn;
    ++            errno = ENOMEM;
    +             return -1;
    +           }
    + #endif
    +@@ -556,7 +606,10 @@
    +       if( !f_conv || !arg_flg_convert_filenames ){
    +         pbf->bf_filename = new char[strlen(path) + 1];
    + #ifndef WINDOWS
    +-        if( !pbf->bf_filename ) return -1;
    ++        if( !pbf->bf_filename ){
    ++          errno = ENOMEM;
    ++          return -1;
    ++        }
    + #endif
    +         strcpy(pbf->bf_filename, path);
    +       }
    +@@ -564,30 +617,42 @@
    +       pbf_last = pbf;
    +     }
    +   }else{
    +-    if( !decode_query(metabuf,metabuf_len,"info|length",
    +-                     (const char**) 0,(size_t*) 0,&t,QUERY_LONG) )
    ++    if( !decode_query(metabuf,metabuf_len, "info|length",
    ++                      (const char**)0, (size_t*) 0, &t, QUERY_LONG) ){
    ++      errno = EINVAL;
    +       return -1;
    ++    }
    +     m_btfhead = _new_bfnode();
    + #ifndef WINDOWS
    +-    if( !m_btfhead) return -1;
    ++    if( !m_btfhead ){
    ++      errno = ENOMEM;
    ++      return -1;
    ++    }
    + #endif
    +     m_btfhead->bf_length = m_total_files_length = t;
    +     if( saveas ){
    +       m_btfhead->bf_filename = new char[strlen(saveas) + 1];
    + #ifndef WINDOWS
    +-      if(!m_btfhead->bf_filename ) return -1;
    ++      if( !m_btfhead->bf_filename ){
    ++        errno = ENOMEM;
    ++        return -1;
    ++      }
    + #endif
    +       strcpy(m_btfhead->bf_filename, saveas);
    +     }else if( arg_flg_convert_filenames ){
    +       char *tmpfn = new char[strlen(path)*2+5];
    + #ifndef WINDOWS
    +-      if( !tmpfn ) return -1;
    ++      if( !tmpfn ){
    ++        errno = ENOMEM;
    ++        return -1;
    ++      }
    + #endif
    +       ConvertFilename(tmpfn, path, strlen(path)*2+5);
    +       m_btfhead->bf_filename = new char[strlen(tmpfn) + 1];
    + #ifndef WINDOWS
    +       if( !m_btfhead->bf_filename ){
    +         delete []tmpfn;
    ++        errno = ENOMEM;
    +         return -1;
    +       }
    + #endif
    +@@ -596,7 +661,10 @@
    +     }else{
    +       m_btfhead->bf_filename = new char[strlen(path) + 1];
    + #ifndef WINDOWS
    +-      if(!m_btfhead->bf_filename ) return -1;
    ++      if( !m_btfhead->bf_filename ){
    ++        errno = ENOMEM;
    ++        return -1;
    ++      }
    + #endif
    +       strcpy(m_btfhead->bf_filename, path);
    +     }
    +@@ -694,6 +762,32 @@
    + size_t btFiles::FillMetaInfo(FILE* fp)
    + {
    +   BTFILE *p;
    ++  const char *refname, *s;
    ++  char path[MAXPATHLEN];
    ++
    ++  refname = m_directory ? m_directory : m_btfhead->bf_filename;
    ++  while( (s = strchr(refname, PATH_SP)) && *(s + 1) ){
    ++    refname = s + 1;
    ++  }
    ++  if( m_directory && '.' == *refname ){
    ++    char dir[MAXPATHLEN];
    ++    if( getcwd(dir, sizeof(dir)) && 0==chdir(m_directory) ){
    ++      if( getcwd(path, sizeof(path)) ){
    ++        refname = path;
    ++        while( (s = strchr(refname, PATH_SP)) && *(s + 1) ){
    ++          refname = s + 1;
    ++        }
    ++      }
    ++      chdir(dir);
    ++    }
    ++  }
    ++  if( '/' == *refname || '\0' == *refname || '.' == *refname ){
    ++    CONSOLE.Warning(1, "error, inappropriate file or directory name \"%s\"",
    ++      m_directory ? m_directory : m_btfhead->bf_filename);
    ++    errno = EINVAL;
    ++    return 0;
    ++  }
    ++
    +   if( m_directory ){
    +     // multi files
    +     if( bencode_str("files", fp) != 1 ) return 0;
    +@@ -715,16 +809,15 @@
    +     if(bencode_end_dict_list(fp) != 1 ) return 0;
    +     
    +     if(bencode_str("name", fp) != 1) return 0;
    +-    return bencode_str(m_directory, fp);
    +-    
    ++    return bencode_str(refname, fp);
    +   }else{
    +     if( bencode_str("length", fp) != 1 ) return 0;
    +     if( bencode_int(m_btfhead->bf_length, fp) != 1) return 0;
    +     
    +     if( bencode_str("name", fp) != 1 ) return 0;
    +-    return bencode_str(m_btfhead->bf_filename, fp);
    ++    return bencode_str(refname, fp);
    +   }
    +-  return 1;
    ++  return 0;
    + }
    + 
    + 
    +Index: a/btcontent.cpp
    +===================================================================
    +--- a/btcontent.cpp	(revision 300)
    ++++ b/btcontent.cpp	(revision 302)
    +@@ -357,7 +357,11 @@
    + 
    +   cfg_req_queue_length = (m_piece_length / cfg_req_slice_size) * 2 - 1;
    + 
    +-  if( m_btfiles.BuildFromMI(b, flen, saveas) < 0 ) ERR_RETURN();
    ++  if( m_btfiles.BuildFromMI(b, flen, saveas, arg_flg_exam_only) < 0 ){
    ++    if( EINVAL == errno )
    ++      CONSOLE.Warning(1, "Torrent metainfo file data is invalid or unusable.");
    ++    ERR_RETURN();
    ++  }
    + 
    +   delete []b;
    +   b = (char *)0;
    +Index: a/btfiles.h
    +===================================================================
    +--- a/btfiles.h	(revision 300)
    ++++ b/btfiles.h	(revision 302)
    +@@ -61,7 +61,7 @@
    +   
    +   int BuildFromFS(const char *pathname);
    +   int BuildFromMI(const char *metabuf, const size_t metabuf_len,
    +-                  const char *saveas);
    ++                  const char *saveas, unsigned char exam_only);
    + 
    +   char *GetDataName() const;
    +   uint64_t GetTotalLength() const { return m_total_files_length; }
    diff --git a/net/cups-bjnp/Makefile b/net/cups-bjnp/Makefile
    new file mode 100644
    index 0000000..4a85829
    --- /dev/null
    +++ b/net/cups-bjnp/Makefile
    @@ -0,0 +1,47 @@
    +# 
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=cups-bjnp
    +PKG_VERSION:=0.5.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/cups-bjnp
    +PKG_MD5SUM:=4f29dd69a487a90ac7603b5be5cb030f
    +
    +PKG_BUILD_DEPENDS:=cups
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/cups-bjnp
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=BJNP protocol backend for CUPS
    +  URL:=http://sourceforge.net/projects/cups-bjnp/
    +  DEPENDS:=cups
    +endef
    +
    +define Package/cups-bjnp/description
    +CUPS backend for the canon printers using the proprietary USB over
    +IP BJNP protocol. This backend allows Cups to print over the network
    +to a Canon printer. It currently supports Cups 1.2 and Cups 1.3 and
    +is designed by reverse engineering.
    +endef
    +
    +CONFIGURE_ARGS += --with-cupsbackenddir=$(STAGING_DIR)/usr/include/cups
    +
    +TARGET_CFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
    +
    +define Package/cups-bjnp/install
    +	$(INSTALL_DIR) $(1)/usr/lib/cups/backend
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/bjnp $(1)/usr/lib/cups/backend
    +endef
    +
    +
    +$(eval $(call BuildPackage,cups-bjnp))
    diff --git a/net/cups/Makefile b/net/cups/Makefile
    new file mode 100644
    index 0000000..fad3994
    --- /dev/null
    +++ b/net/cups/Makefile
    @@ -0,0 +1,119 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=cups
    +PKG_VERSION:=1.4.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.bz2
    +PKG_SOURCE_URL:= \
    +	http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/$(PKG_VERSION) \
    +	ftp://ftp.easysw.com/pub/cups/$(PKG_VERSION) \
    +	ftp://ftp3.easysw.com/pub/cups/$(PKG_VERSION)
    +PKG_MD5SUM:=8776403ad60fea9e85eab9c04d88560d
    +
    +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/cups
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+zlib +libpthread +libpng +libjpeg +libstdcpp
    +  TITLE:=Common UNIX Printing System
    +  URL:=http://www.cups.org/
    +endef
    +
    +define Package/cups/description
    +	A printer spooling system for devices with USB or LP support.
    +endef
    +
    +define Package/cups/conffiles
    +/etc/cups/classes.conf
    +/etc/cups/client.conf
    +/etc/cups/cupsd.conf
    +/etc/cups/printers.conf
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--with-cups-user="nobody" \
    +		--with-cups-group="nogroup" \
    +		--without-perl \
    +		--without-python \
    +		--without-php \
    +		--enable-shared \
    +		--enable-image \
    +		--disable-dbus \
    +		--disable-dnssd \
    +		--disable-launchd \
    +		--disable-ldap \
    +		--disable-pam \
    +		--disable-slp \
    +		--disable-gnutls \
    +		--disable-openssl \
    +		--disable-cdsassl \
    +		--disable-ssl \
    +		--disable-gssapi \
    +		--disable-tiff, \
    +		UNAME="Linux" \
    +		LIBS="$(TARGET_LDFLAGS) -lz -lpng -ljpeg" \
    +	)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		DSTROOT="$(PKG_INSTALL_DIR)" \
    +		STRIP="/bin/true" \
    +		all install
    +endef
    +
    +define Package/cups/install
    +	rm -rf $(1)/etc/cups
    +	$(INSTALL_DIR) $(1)/etc/cups
    +	$(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(1)/etc/cups/
    +	rm -rf $(1)/etc/cups/certs
    +	ln -sf /tmp $(1)/etc/cups/certs
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
    +	rm -f $(1)/usr/bin/cups-config
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups*.so* $(1)/usr/lib/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/cups $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/share/cups/templates
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(1)/usr/share/cups/templates/
    +	$(INSTALL_DIR) $(1)/usr/share/cups/mime
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/cups/mime/* $(1)/usr/share/cups/mime/
    +	$(INSTALL_DIR) $(1)/usr/share/doc/cups
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(1)/usr/share/doc/cups/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/*.css $(1)/usr/share/doc/cups/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(1)/usr/share/doc/cups/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) \
    +		$(PKG_INSTALL_DIR)/usr/sbin/{accept,cupsaddsmb,cupsctl,cupsd,cupsfilter,lpadmin,lpc,lpinfo,lpmove} \
    +		$(1)/usr/sbin/
    +	(cd $(1)/usr/sbin; ln -sf accept reject; ln -sf accept cupsenable; ln -sf accept cupsdisable;)
    +	# overwrite default config with our own
    +	$(CP) ./files/etc/cups/* $(1)/etc/cups/
    +	# install initscript with priority 60
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/cupsd.init $(1)/etc/init.d/cupsd
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(2)/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(2)/bin/
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups*.so* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,cups))
    diff --git a/net/cups/files/cupsd.init b/net/cups/files/cupsd.init
    new file mode 100644
    index 0000000..ebbda23
    --- /dev/null
    +++ b/net/cups/files/cupsd.init
    @@ -0,0 +1,14 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +start() {
    +	mkdir -p /var/cache/cups
    +	mkdir -p /var/cups
    +	mkdir -p /var/spool/cups/tmp
    +	/usr/sbin/cupsd
    +}
    +
    +stop() {
    +	killall cupsd
    +}
    diff --git a/net/cups/files/etc/cups/classes.conf b/net/cups/files/etc/cups/classes.conf
    new file mode 100644
    index 0000000..15afda7
    --- /dev/null
    +++ b/net/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/net/cups/files/etc/cups/client.conf b/net/cups/files/etc/cups/client.conf
    new file mode 100644
    index 0000000..c8d9f91
    --- /dev/null
    +++ b/net/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/net/cups/files/etc/cups/cupsd.conf b/net/cups/files/etc/cups/cupsd.conf
    new file mode 100644
    index 0000000..79ad944
    --- /dev/null
    +++ b/net/cups/files/etc/cups/cupsd.conf
    @@ -0,0 +1,47 @@
    +########################################################################
    +#                                                                      #
    +# This is the CUPS configuration file.  If you are familiar with       #
    +# Apache or any of the other popular web servers, we've followed the   #
    +# same format.  Any configuration variable used here has the same      #
    +# semantics as the corresponding variable in Apache.  If we need       #
    +# different functionality then a different name is used to avoid       #
    +# confusion...                                                         #
    +#                                                                      #
    +########################################################################
    +
    +
    +AccessLog syslog
    +ErrorLog syslog
    +LogLevel info
    +PageLog syslog
    +PreserveJobHistory No
    +PreserveJobFiles No
    +AutoPurgeJobs Yes
    +MaxJobs 25
    +MaxPrinterHistory 10
    +#Printcap /etc/printcap
    +#PrintcapFormat BSD
    +RequestRoot /var/cups
    +#RemoteRoot remroot
    +User nobody
    +Group nogroup
    +RIPCache 512k
    +TempDir /var/cups
    +Port 631
    +HostNameLookups Off
    +KeepAlive On
    +Browsing On
    +BrowseProtocols cups
    +
    +
    +Order Deny,Allow
    +Allow From 127.0.0.1
    +Allow From 192.168.1.0/24
    +
    +
    +
    +AuthType Basic
    +AuthClass System
    +Order Allow,Deny
    +Allow From All
    +
    diff --git a/net/cups/files/etc/cups/printers.conf b/net/cups/files/etc/cups/printers.conf
    new file mode 100644
    index 0000000..88bba1b
    --- /dev/null
    +++ b/net/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/net/cups/patches/100-makefile-targets.patch b/net/cups/patches/100-makefile-targets.patch
    new file mode 100644
    index 0000000..5d80aaa
    --- /dev/null
    +++ b/net/cups/patches/100-makefile-targets.patch
    @@ -0,0 +1,13 @@
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -19,8 +19,8 @@ include Makedefs
    + # Directories to make...
    + #
    + 
    +-DIRS	=	cups filter backend berkeley cgi-bin driver locale man monitor \
    +-		notifier ppdc scheduler systemv test \
    ++DIRS	=	cups filter backend berkeley cgi-bin driver monitor \
    ++		ppdc scheduler systemv \
    + 		$(PHPDIR) \
    + 		conf data doc examples $(FONTS) templates
    + 
    diff --git a/net/cups/patches/140-uname.patch b/net/cups/patches/140-uname.patch
    new file mode 100644
    index 0000000..dca3fcb
    --- /dev/null
    +++ b/net/cups/patches/140-uname.patch
    @@ -0,0 +1,11 @@
    +--- a/configure
    ++++ b/configure
    +@@ -1926,7 +1926,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
    + 
    + 
    + 
    +-uname=`uname`
    ++uname=${UNAME:-`uname`}
    + uversion=`uname -r | sed -e '1,$s/^[^0-9]*\([0-9]*\)\.\([0-9]*\).*/\1\2/'`
    + uarch=`uname -m`
    + 
    diff --git a/net/cups/patches/150-64bit_host_fix.patch b/net/cups/patches/150-64bit_host_fix.patch
    new file mode 100644
    index 0000000..bd6db19
    --- /dev/null
    +++ b/net/cups/patches/150-64bit_host_fix.patch
    @@ -0,0 +1,64 @@
    +--- a/cups-config.in
    ++++ b/cups-config.in
    +@@ -53,7 +53,7 @@ else
    + 	CFLAGS="$CFLAGS -I$includedir"
    +     fi
    + 
    +-    if test $libdir != /usr/lib -a $libdir != /usr/lib32 -a $libdir != /usr/lib64; then
    ++    if test $libdir != /usr/lib -a $libdir != /usr/lib -a $libdir != /usr/lib; then
    + 	LDFLAGS="$LDFLAGS -L$libdir"
    +     fi
    + fi
    +--- a/config-scripts/cups-3264.m4
    ++++ b/config-scripts/cups-3264.m4
    +@@ -108,7 +108,7 @@ case "$uname" in
    + 			LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
    + 			LIB64DIR="$exec_prefix/lib"
    + 			if test -d /usr/lib64; then
    +-				LIB64DIR="${LIB64DIR}64"
    ++				LIB64DIR="${LIB64DIR}"
    + 			fi
    + 			UNINSTALL64="uninstall64bit"
    + 		fi
    +--- a/config-scripts/cups-directories.m4
    ++++ b/config-scripts/cups-directories.m4
    +@@ -107,7 +107,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*)
    +--- a/configure
    ++++ b/configure
    +@@ -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*)
    +@@ -9792,9 +9792,6 @@ case "$uname" in
    + 			LIB32CUPS="32bit/libcups.so.2"
    + 			LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
    + 			LIB32DIR="$exec_prefix/lib"
    +-			if test -d /usr/lib32; then
    +-				LIB32DIR="${LIB32DIR}32"
    +-			fi
    + 			UNINSTALL32="uninstall32bit"
    + 		fi
    + 
    +@@ -9804,9 +9801,6 @@ case "$uname" in
    + 			LIB64CUPS="64bit/libcups.so.2"
    + 			LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
    + 			LIB64DIR="$exec_prefix/lib"
    +-			if test -d /usr/lib64; then
    +-				LIB64DIR="${LIB64DIR}64"
    +-			fi
    + 			UNINSTALL64="uninstall64bit"
    + 		fi
    + 		;;
    diff --git a/net/cups/patches/160-ppdc.patch b/net/cups/patches/160-ppdc.patch
    new file mode 100644
    index 0000000..54efbe9
    --- /dev/null
    +++ b/net/cups/patches/160-ppdc.patch
    @@ -0,0 +1,16 @@
    +--- cups-1.4.2.orig/ppdc/Makefile	2010-01-28 18:06:41.000000000 +0100
    ++++ cups-1.4.2/ppdc/Makefile	2010-01-28 20:25:09.000000000 +0100
    +@@ -239,12 +239,7 @@
    + 
    + genstrings:		genstrings.o libcupsppdc.a ../cups/libcups.a \
    + 			sample.drv ../data/media.defs
    +-	echo Linking $@...
    +-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
    +-		libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \
    +-		$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
    +-	echo Generating localization strings...
    +-	./genstrings >sample.c
    ++	echo Not Linking $@...
    + 
    + 
    + #
    diff --git a/net/curlftpfs/Makefile b/net/curlftpfs/Makefile
    new file mode 100644
    index 0000000..67fc0ed
    --- /dev/null
    +++ b/net/curlftpfs/Makefile
    @@ -0,0 +1,49 @@
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=curlftpfs
    +PKG_VERSION:=0.9.2
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/curlftpfs
    +PKG_MD5SUM:=b452123f755114cd4461d56c648d9f12
    +
    +PKG_BUILD_DEPENDS:=libiconv
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/curlftpfs
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Filesystem
    +  DEPENDS:=+libcurl +libfuse +glib2
    +  TITLE:=CurlFtpFS
    +  URL:=http://curlftpfs.sourceforge.net/
    +endef
    +
    +define Package/curlftpfs/description
    +  CurlFtpFS is a filesystem for accessing FTP hosts
    +  based on FUSE and libcurl.
    +endef
    +
    +EXTRA_CFLAGS += \
    +	-I$(ICONV_PREFIX)/include \
    +	-I$(STAGING_DIR)/usr/include/fuse \
    +	-DICONV_CONST=const
    +
    +EXTRA_LDFLAGS += \
    +	-L$(INTL_PREFIX)/lib \
    +	-L$(ICONV_PREFIX)/lib
    +
    +define Package/curlftpfs/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/curlftpfs $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,curlftpfs))
    +
    diff --git a/net/curlftpfs/patches/001-uclibc_mod.patch b/net/curlftpfs/patches/001-uclibc_mod.patch
    new file mode 100644
    index 0000000..8eb1556
    --- /dev/null
    +++ b/net/curlftpfs/patches/001-uclibc_mod.patch
    @@ -0,0 +1,37 @@
    +diff -cr curlftpfs-0.9.2/ftpfs-ls.c curlftpfs-0.9.2-1/ftpfs-ls.c
    +*** curlftpfs-0.9.2/ftpfs-ls.c	2008-04-23 12:55:41.000000000 +0200
    +--- curlftpfs-0.9.2-1/ftpfs-ls.c	2009-09-24 23:19:03.000000000 +0200
    +***************
    +*** 58,64 ****
    +                 "%5s"  "%*c"
    +                 "%1023c",
    +                 mode, &nlink, user, group, &size, month, day, year, file);
    +!   if (res < 9) {
    +      res = sscanf(line,
    +                   "%11s"
    +                   "%32s" SPACES
    +--- 58,64 ----
    +                 "%5s"  "%*c"
    +                 "%1023c",
    +                 mode, &nlink, user, group, &size, month, day, year, file);
    +!   if (res < 8) {
    +      res = sscanf(line,
    +                   "%11s"
    +                   "%32s" SPACES
    +***************
    +*** 69,75 ****
    +                   "%5s"  "%*c"
    +                   "%1023c",
    +                   mode, user, group, &size, month, day, year, file);
    +!     if (res < 8) {
    +        return 0;
    +      }
    +    }
    +--- 69,75 ----
    +                   "%5s"  "%*c"
    +                   "%1023c",
    +                   mode, user, group, &size, month, day, year, file);
    +!     if (res < 7) {
    +        return 0;
    +      }
    +    }
    diff --git a/net/cutter/Makefile b/net/cutter/Makefile
    new file mode 100644
    index 0000000..e10171b
    --- /dev/null
    +++ b/net/cutter/Makefile
    @@ -0,0 +1,42 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=cutter
    +PKG_VERSION:=1.03
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
    +PKG_SOURCE_URL:=http://www.lowth.com/cutter/software/
    +PKG_MD5SUM:=50093db9b64277643969ee75b83ebbd1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/cutter
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=allows an user to abort TCP/IP connections
    +  URL:=http://www.lowth.com/cutter/
    +endef
    +
    +define Package/cutter/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.
    +endef
    +	
    +define Build/Compile
    +	$(TARGET_CC) $(PKG_BUILD_DIR)/cutter.c -o $(PKG_BUILD_DIR)/cutter
    +endef
    +	
    +define Package/cutter/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/cutter $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,cutter))
    diff --git a/net/dansguardian/Makefile b/net/dansguardian/Makefile
    new file mode 100644
    index 0000000..59aadec
    --- /dev/null
    +++ b/net/dansguardian/Makefile
    @@ -0,0 +1,63 @@
    +#
    +# Copyright (C) 2008-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=dansguardian
    +PKG_VERSION:=2.10.1.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://dansguardian.org/downloads/2/Stable
    +PKG_MD5SUM:=0987a1c9bfbdf398118386f10279611a
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/dansguardian
    +  SECTION:=net
    +  DEPENDS:=+libpthread +uclibcxx +zlib
    +  CATEGORY:=Network
    +  SUBMENU:=Web Servers/Proxies
    +  TITLE:=DansGuardian
    +  URL:=http://dansguardian.org
    +endef
    +
    +define Package/dansguardian/conffiles
    +/etc/dansguardian/dansguardian.conf
    +endef
    +
    +CONFIGURE_VARS += \
    +	INCLUDES="" \
    +	CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
    +	CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
    +	LDFLAGS="$$$$LDFLAGS" \
    +	LIBS="-nodefaultlibs -luClibc++ -lpthread $(LIBGCC_S)" \
    +
    +define Build/Configure
    +	$(call Build/Configure/Default,\
    +		--disable-clamav \
    +		--with-sysconfsubdir=dansguardian \
    +		--with-proxyuser=root \
    +		--with-proxygroup=root \
    +		--disable-pcre \
    +	)
    +endef
    +
    +define Package/dansguardian/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dansguardian $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc
    +	$(CP) $(PKG_INSTALL_DIR)/etc/dansguardian $(1)/etc/
    +	$(INSTALL_DIR) $(1)/usr/share/dansguardian
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/dansguardian/transparent1x1.gif $(1)/usr/share/dansguardian/
    +	$(INSTALL_DIR) $(1)/usr/share/dansguardian/languages/ukenglish
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/dansguardian/languages/ukenglish/* $(1)/usr/share/dansguardian/languages/ukenglish/
    +endef
    +
    +$(eval $(call BuildPackage,dansguardian))
    diff --git a/net/dansguardian/patches/001-include_dir.patch b/net/dansguardian/patches/001-include_dir.patch
    new file mode 100644
    index 0000000..8a619f0
    --- /dev/null
    +++ b/net/dansguardian/patches/001-include_dir.patch
    @@ -0,0 +1,29 @@
    +--- a/configure
    ++++ b/configure
    +@@ -861,7 +861,7 @@ sysconfdir='${prefix}/etc'
    + sharedstatedir='${prefix}/com'
    + localstatedir='${prefix}/var'
    + includedir='${prefix}/include'
    +-oldincludedir='/usr/include'
    ++oldincludedir='${prefix}/usr/include'
    + docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
    + infodir='${datarootdir}/info'
    + htmldir='${docdir}'
    +@@ -6317,7 +6317,7 @@ $as_echo_n "checking for zlib... " >&6; 
    + # Check whether --with-zlib was given.
    + if test "${with_zlib+set}" = set; then
    +   withval=$with_zlib;  # check for header & func (in library) in given prefix
    +-	CPPFLAGS="${CPPFLAGS} -I${withval}/include"
    ++	CPPFLAGS="${CPPFLAGS}"
    + 	if test "x$staticzlib" = "xtrue"; then
    + 		LIBS="-Bstatic -L${withval} -lz -Bdynamic ${LIBS}"
    + 	else
    +@@ -10042,7 +10042,7 @@ _ACEOF
    + if test "${with_libiconv+set}" = set; then
    +   withval=$with_libiconv;  # check for header & func (in library) in given prefix
    + 			if test "x$withval" != "x"; then
    +-				CPPFLAGS="${CPPFLAGS} -I${withval}/include"
    ++				CPPFLAGS="${CPPFLAGS}"
    + 				LIBS="-L${withval}/lib -liconv ${LIBS}"
    + 			else
    + 				LIBS="-liconv ${LIBS}"
    diff --git a/net/dante/Makefile b/net/dante/Makefile
    new file mode 100644
    index 0000000..252b275
    --- /dev/null
    +++ b/net/dante/Makefile
    @@ -0,0 +1,108 @@
    +#
    +# Copyright (C) 2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=dante
    +PKG_VERSION:=1.2.2
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.inet.no/dante/files/
    +PKG_MD5SUM:=69b9d6234154d7d6a91fcbd98c68e62a
    +
    +PKG_FIXUP:=autoreconf
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +TARGET_CFLAGS += -D_GNU_SOURCE
    +CONFIGURE_ARGS += --without-upnp --without-pam
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include
    +	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{a,so*,la} $(1)/usr/lib/
    +endef
    +
    +
    +define Package/dante/default
    +  TITLE:=Dante SOCKS
    +  URL:=http://www.inet.no/dante/
    +endef
    +
    +define Package/dante/default/description
    +Dante is a circuit-level firewall/proxy that can be used to provide convenient
    +and secure network connectivity, requiring only that the server Dante runs on
    +has external network connectivity. Dante is used daily by Fortune 100 companies
    +and large international organizations, either as a standard SOCKS server or as
    +a "reverse proxy". 
    +endef
    +
    +define Package/libsocks
    +  $(call Package/dante/default)
    +  SECTION:=libs
    +  CATEGORY:=Libraries
    +  TITLE+= Library
    +endef
    +
    +define Package/libsocks/description
    +$(call Package/dante/default/description)
    +This package provides the shared libsocks library.
    +endef
    +
    +define Package/libsocks/install
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsocks.so* $(1)/usr/lib/
    +endef
    +
    +
    +define Package/sockd
    +  $(call Package/dante/default)
    +  SUBMENU:=Web Servers/Proxies
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE+= Daemon
    +endef
    +
    +define Package/sockd/description
    +$(call Package/dante/default/description)
    +This package provides the Dante sockd daemon.
    +endef
    +
    +define Package/sockd/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/sockd $(1)/usr/sbin/
    +endef
    +
    +
    +define Package/socksify
    +  $(call Package/dante/default)
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Web Servers/Proxies
    +  TITLE+= Client
    +endef
    +
    +define Package/socksify/description
    +$(call Package/dante/default/description)
    +This package provides the Dante socksify client.
    +endef
    +
    +define Package/socksify/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/socksify $(1)/usr/bin/
    +
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdsocks.so* $(1)/usr/lib/
    +endef
    +
    +
    +$(eval $(call BuildPackage,libsocks))
    +$(eval $(call BuildPackage,sockd))
    +$(eval $(call BuildPackage,socksify))
    diff --git a/net/dante/patches/001-automake-compat.patch b/net/dante/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..4349a4b
    --- /dev/null
    +++ b/net/dante/patches/001-automake-compat.patch
    @@ -0,0 +1,482 @@
    +--- a/configure.ac
    ++++ b/configure.ac
    +@@ -16,7 +16,7 @@ echo "Configuring Dante ${version}${pren
    + 
    + AM_INIT_AUTOMAKE(dante, ${version}${prename})
    + AC_CONFIG_SRCDIR(include/common.h)
    +-AM_CONFIG_HEADER(include/autoconf.h)
    ++AM_CONFIG_HEADER(autoconfig-is-soo-stupid.h include/autoconf.h)
    + 
    + AC_DEFINE(BAREFOOTD, 0, [we are Dante])
    + 
    +@@ -38,17 +38,6 @@ AC_PROG_CPP
    + 
    + AM_CONDITIONAL(PRERELEASE, test x$prerelease != x)
    + 
    +-#known keywords for --enable/disable-foo(=yes/no)?
    +-LTINTERNAL="dlopen|dlopen_self|dlopen_self_static|fast_install|libtool_lock|win32_dll|shared_with_static_runtimes|shared_with_static_runtimes_CXX|shared_with_static_runtimes_F77"
    +-KNOWN_KEYWORDS="$LTINTERNAL|shared|static|debug|warnings|diagnostic|profiling|linting|libwrap|preload|serverdl|clientdl|internal|pidfile|drt_fallback"
    +-for keyword in `set | egrep '^enable_' | sed -e 's/^enable_\(.*\)=.*/\1/'`; do
    +-    echo $keyword | egrep "^(${KNOWN_KEYWORDS})$" > /dev/null
    +-    if test $? -ne 0; then
    +-	AC_MSG_WARN([unknown option '$keyword', ignoring ...])
    +-	sleep 10;
    +-    fi
    +-done
    +-
    + case $host in
    +     *-*-osf*)
    +       	AC_MSG_WARN([OSF support might be removed in the near future.])
    +@@ -175,31 +164,6 @@ case $host in
    +     #XXX make sure compiling with compiler options works
    + esac
    + 
    +-AC_MSG_CHECKING([for support for -pipe compiler flag])
    +-oCFLAGS=$CFLAGS
    +-CFLAGS="$CFLAGS -pipe"
    +-AC_TRY_RUN([
    +-int main()
    +-{
    +-	return 0;
    +-}], [AC_MSG_RESULT([yes])
    +-     comp_flags="${comp_flags} -pipe"],
    +-    AC_MSG_RESULT([no]))
    +-CFLAGS="$oCFLAGS"
    +-
    +-AC_MSG_CHECKING([for support for -Wbounded compiler flag])
    +-oCFLAGS=$CFLAGS
    +-CFLAGS="$CFLAGS -Wbounded"
    +-AC_TRY_RUN([
    +-int main()
    +-{
    +-        return 0;
    +-}], [AC_MSG_RESULT([yes])
    +-     comp_flags="${comp_flags} -Wbounded"],
    +-    [AC_MSG_RESULT([no])
    +-     AC_DEFINE(__bounded__(a,b,c), , [empty __bounded__ macro])])
    +-CFLAGS="$oCFLAGS"
    +-
    + AC_MSG_CHECKING([for compilation with debugging])
    + AC_ARG_ENABLE(debug,
    + [  --enable-debug          compile with debugging support],
    +@@ -608,43 +572,6 @@ else
    + fi], [AC_MSG_RESULT(no)
    +       AC_MSG_WARN([performance in the server might be degraded without support for the SO_SNDLOWAT socket option])])
    + 
    +-AC_MSG_CHECKING([whether realloc with a NULL pointer calls malloc])
    +-AC_TRY_RUN([
    +-#include 
    +-#ifndef NULL
    +-#define NULL (char *)0
    +-#endif
    +-
    +-int main()
    +-{
    +-	/* will assume this test doesn\'t fail because of lack of memory */
    +-	if (realloc(NULL, 1) == NULL)
    +-		return 1;
    +-	else
    +-		return 0;
    +-}], [AC_MSG_RESULT(yes)],
    +-    [AC_DEFINE(HAVE_NOMALLOC_REALLOC, 1, [realloc never calls malloc])
    +-     AC_MSG_RESULT(no)])
    +-
    +-AC_MSG_CHECKING([whether free can be called with NULL])
    +-AC_TRY_RUN([
    +-#include 
    +-#ifndef NULL
    +-#define NULL (char *)0
    +-#endif
    +-
    +-int main()
    +-{
    +-	/* will assume core dump/seg fault if it doesn\'t work */
    +-	free(NULL);
    +-	return 0;
    +-}], [AC_MSG_RESULT(yes)],
    +-    [AC_DEFINE(HAVE_NONULL_FREE, 1, [free does not accept NULL parameter])
    +-     AC_MSG_RESULT(no)])
    +-
    +-#A good time to save the cache (preload code might fail)
    +-AC_CACHE_SAVE
    +-
    + m4_include(preload.m4)
    + 
    + #construct SUBDIRS variable
    +@@ -722,31 +649,8 @@ case $host in
    + 	;;
    + esac
    + 
    +-AC_MSG_CHECKING([for CMSG_SPACE in sys/socket.h])
    +-AC_TRY_RUN([
    +-#include 
    +-#include 
    +-int main()
    +-{
    +-   int d = CMSG_SPACE(4);
    +-   return 0;
    +-}
    +-], [AC_MSG_RESULT(yes)
    +-    AC_DEFINE(HAVE_CMSG_SPACE, 1, CMSG_SPACE exists)],
    +-   [AC_MSG_RESULT(no)])
    +-
    +-AC_MSG_CHECKING([for CMSG_LEN in sys/socket.h])
    +-AC_TRY_RUN([
    +-#include 
    +-#include 
    +-
    +-int main()
    +-{
    +-   int d = CMSG_LEN(4);
    +-   return 0;
    +-}], [AC_MSG_RESULT(yes)
    +-    AC_DEFINE(HAVE_CMSG_LEN, 1, [CMSG_LEN exists])],
    +-   [AC_MSG_RESULT(no)])
    ++AC_DEFINE(HAVE_CMSG_SPACE, 1, [CMSG_SPACE exists])
    ++AC_DEFINE(HAVE_CMSG_LEN, 1, [CMSG_LEN exists])
    + 
    + AC_MSG_CHECKING([for sa_len in sockaddr])
    + AC_TRY_COMPILE([
    +@@ -913,10 +817,6 @@ else
    +     AC_MSG_RESULT([yes])
    + fi
    + 
    +-dnl determine GSSAPI support
    +-no_gssapi=t
    +-m4_include(gssapi.m4)
    +-
    + dnl compatibility library tests
    + m4_include(libscompat.m4)
    + 
    +@@ -978,15 +878,6 @@ global:
    + fi
    + AC_SUBST(MAPOPT)
    + 
    +-#expected select behaviour?
    +-unset nb_select_err
    +-L_UNCON_SELECT([],
    +- [nb_select_err=t])
    +-
    +-if test x"${nb_select_err}" = xt; then
    +-   AC_MSG_WARN([operations on nonblocking sockets might fail on this platform])
    +-fi
    +-
    + AC_MSG_CHECKING([direct route fallback in client enabled])
    + with_drtfallback=t
    + AC_ARG_ENABLE(drt-fallback,
    +--- a/acinclude.m4
    ++++ b/acinclude.m4
    +@@ -180,63 +180,7 @@ selectcheck(s)
    +     [AC_MSG_RESULT(no)
    +      [$2]])])
    + 
    +-#can it really be this simple?
    +-#nope, doesn't handle coff files which also have no underscore
    +-AC_DEFUN([L_SYMBOL_UNDERSCORE],
    +-[AC_MSG_CHECKING(for object file type)
    +-AH_TEMPLATE([HAVE_NO_SYMBOL_UNDERSCORE], [platform symbol type])
    +-AC_TRY_RUN([
    +-/* look for ELF identification header at the start of argv[0] */
    +-
    +-#include 
    +-#include 
    +-#include 
    +-
    +-/*
    +- * ELF header, from ELF standard (Portable Formats Specification,
    +- *  Version 1.1).
    +- */
    +-char elfheader[] = { 0x7f, 'E', 'L', 'F' };
    +-
    +-int
    +-main (argc, argv)
    +-	int argc;
    +-	char *argv[];
    +-{
    +-	int fd;
    +-	int len = sizeof(elfheader);
    +-	char header[len];
    +-
    +-	if ((fd = open(argv[0], O_RDONLY, 0)) == -1) {
    +-		perror("open");
    +-		exit(1);
    +-	}
    +-	if (read(fd, header, len) != len) {
    +-		perror("read");
    +-		exit(1);
    +-	}
    +-	if (memcmp(header, elfheader, len) == 0)
    +-		exit(0); /* pointy ears */
    +-	else
    +-		exit(1);
    +-}
    +-], [AC_MSG_RESULT(elf)
    +-    AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE)],
    +-   [
    +-	#XXX exceptions for coff platforms, should be detected automatically
    +-	case $host in
    +-		alpha*-dec-osf*)
    +-			AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE)
    +-			AC_MSG_RESULT(coff)
    +-			;;
    +-		*-*-hpux*) #XXX apparently does not use underscore
    +-			AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE)
    +-			AC_MSG_RESULT(a.out?)
    +-			;;
    +-		*)
    +-			AC_MSG_RESULT(a.out)
    +-			;;
    +-	esac])])
    ++AC_DEFUN([L_SYMBOL_UNDERSCORE], [AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE, [1], [Automake sucks])])
    + 
    + 
    + dnl addproto - generate AC_DEFINE statements
    +--- a/preload.m4
    ++++ b/preload.m4
    +@@ -517,91 +517,6 @@ AC_DEFINE_UNQUOTED(LIBRARY_LIBC, "${LIBC
    + 
    + L_SYMBOL_UNDERSCORE()
    + 
    +-AC_MSG_CHECKING([for working dlsym])
    +-AC_TRY_RUN([
    +-#include 
    +-#include 
    +-
    +-#include "include/symbols.h"
    +-
    +-int main()
    +-{
    +-	void *lib;
    +-	void *sym;
    +-
    +-	if ((lib = dlopen(LIBRARY_CONNECT, DL_LAZY)) == NULL) {
    +-		fprintf(stderr, "dlopen: %s", dlerror());
    +-		return 1;
    +-	}
    +-	(void)dlerror();
    +-	if ((sym = dlsym(lib, SYMBOL_CONNECT)) == NULL) {
    +-		fprintf(stderr, "dlsym: %s", dlerror());
    +-		return 1;
    +-	}
    +-	return 0;
    +-}], [AC_MSG_RESULT(yes)],
    +-    [AC_MSG_RESULT(no)
    +-     no_preload_client=t
    +-     no_preload_server=t
    +-     no_preload=t])
    +-
    +-AC_MSG_CHECKING([for working RTLD_NEXT])
    +-AC_TRY_RUN([
    +-#define _GNU_SOURCE
    +-#include 
    +-#include 
    +-
    +-#include "include/symbols.h"
    +-
    +-int main()
    +-{
    +-	void *sym;
    +-
    +-	if ((sym = dlsym(RTLD_NEXT, SYMBOL_READ)) == NULL) {
    +-		fprintf(stderr, "dlsym: %s", dlerror());
    +-		return 1;
    +-	}
    +-	return 0;
    +-}], [AC_MSG_RESULT(yes)
    +-     AC_DEFINE(HAVE_RTLD_NEXT, 1, [have working dlsym RTLD_NEXT])],
    +-    [AC_MSG_RESULT(no)
    +-     AC_DEFINE(HAVE_RTLD_NEXT, 0, [no working dlsym RTLD_NEXT])])
    +-
    +-#solaris might block preloading
    +-AC_MSG_CHECKING([libc preload blocking])
    +-AC_TRY_RUN([
    +-#include 
    +-#include 
    +-#include                                                              
    +-int
    +-main(int argc, char *argv[])
    +-{
    +-   char buf[1024];
    +-  
    +-   strcpy(buf, "lari -V ");
    +-   strcat(buf, argv[0]);
    +-   strcat(buf, " | grep read | grep protected > /dev/null");
    +-
    +-   /*
    +-    * return error if 'protected'
    +-    * (ignore errors, not indicative of blocking) */ 
    +-   if (system(buf) == 0)
    +-        return 1;
    +-   else
    +-        return 0;
    +-}
    +-
    +-ssize_t
    +-read(d, buf, nbytes)
    +-   int d;
    +-   void *buf;
    +-   size_t nbytes;
    +-{
    +-   return 0;
    +-}
    +-], [AC_MSG_RESULT(no)],
    +-   [AC_MSG_RESULT(yes)
    +-    AC_MSG_WARN([this platform blocks preloading of libraries])
    +-    blocked_preload=t])
    ++AC_DEFINE(HAVE_RTLD_NEXT, 1, [have working dlsym RTLD_NEXT])
    + 
    + AC_CONFIG_FILES(bin/socksify)
    +--- a/libscompat.m4
    ++++ b/libscompat.m4
    +@@ -1,70 +1,6 @@
    + dnl libscompat.m4 - tests related to replacement code in libscompat directory
    + 
    +-AC_MSG_CHECKING([for __attribute__ support])
    +-AC_TRY_RUN([
    +-#include 
    +-
    +-void errfunc(void) __attribute((noreturn));
    +-
    +-void errfunc(void)
    +-{
    +-    exit(0);
    +-}
    +-
    +-int main()
    +-{
    +-    errfunc();
    +-}], [AC_MSG_RESULT([yes])],
    +-    [AC_MSG_RESULT([no])
    +-     AC_DEFINE(__attribute__(a), , [empty __attribute__ macro])])
    +-
    +-AC_MSG_CHECKING([for __printf__ attribute support])
    +-if test x"$have_suncc" = xt; then
    +-    AC_MSG_RESULT([disabled for sun cc])
    +-    AC_DEFINE(format(a,b,c), , [empty format attribute macro])
    +-else
    +-    AC_TRY_RUN([
    +-#include 
    +-
    +-void func(const char *fmt, ...)
    +-   __attribute__((format(__printf__, 1, 2)));
    +-
    +-void func(const char *fmt, ...) {
    +-     (void)fmt;
    +-     return;
    +-}
    +-
    +-int main()
    +-{
    +-    func("foo");
    +-    return 0;
    +-}], [AC_MSG_RESULT([yes])],
    +-    [AC_MSG_RESULT([no])
    +-     AC_DEFINE(format(a,b,c), , [empty format attribute macro])])
    +-fi
    +-
    +-AC_MSG_CHECKING([for timer macros])
    +-AC_TRY_RUN([
    +-#include 
    +-
    +-int main()
    +-{
    +-    struct timeval tv, tv2, tv3;
    +-
    +-    tv.tv_sec = 0;
    +-    tv.tv_usec = 0;
    +-    tv2.tv_sec = 0;
    +-    tv2.tv_usec = 0;
    +-    tv3.tv_sec = 0;
    +-    tv3.tv_usec = 0;
    +-
    +-    timeradd(&tv, &tv2, &tv3);
    +-    timersub(&tv3, &tv2, &tv);
    +-
    +-    return 0; }],
    +-[AC_MSG_RESULT(yes)
    +- AC_DEFINE(HAVE_TIMER_MACROS, 1, [timeradd(), timersub etc. exist in sys/time.h])],
    +-[AC_MSG_RESULT(no)])
    ++AC_DEFINE(HAVE_TIMER_MACROS, 1, [timeradd(), timersub etc. exist in sys/time.h])
    + 
    + AC_CHECK_FUNCS(daemon difftime getifaddrs freeifaddrs hstrerror inet_aton)
    + AC_CHECK_FUNCS(inet_pton issetugid memmove seteuid setegid)
    +@@ -72,53 +8,7 @@ AC_CHECK_FUNCS(setproctitle sockatmark s
    + AC_CHECK_FUNCS(bzero)
    + #inet_ntoa - only checked for incorrect behavior
    + 
    +-#try to detect gcc bug (irix 64 problem, affects among others inet_ntoa)
    +-AC_MSG_CHECKING([for incorrect inet_ntoa behaviour])
    +-AC_TRY_RUN([
    +-#include 
    +-#include 
    +-#include 
    +-#include 
    +-int main(void)
    +-{
    +-    struct sockaddr_in addr;
    +-    char *a, *b = "195.195.195.195";
    +-    addr.sin_addr.s_addr = inet_addr(b);
    +-    a = inet_ntoa(addr.sin_addr);
    +-    if (strcmp(a, b) == 0)
    +-	return 1;
    +-    else
    +-	return 0;
    +-}
    +-], [AC_DEFINE(HAVE_BROKEN_INET_NTOA, 1, [platform bug])
    +-    AC_MSG_RESULT(yes)
    +-    ac_cv_func_inet_ntoa=no],
    +-    AC_MSG_RESULT(no))
    +-
    +-if test x${ac_cv_func_sockatmark} = xyes; then
    +-   AC_MSG_CHECKING([for working sockatmark])
    +-   AC_TRY_RUN([
    +-#include 
    +-#include 
    +-
    +-int
    +-main()
    +-{
    +-    int s;
    +-    int r;
    +-
    +-    if ((s = socket(PF_UNIX, SOCK_STREAM, 0)) == -1)
    +-	return 1;
    +-    if ((r = sockatmark(s)) == -1)
    +-	return 1;
    +-    if (r == 0)
    +-	return 0;
    +-    else
    +-	return 1; /* would likely indicate an error */
    +-}], [AC_MSG_RESULT(yes)],
    +-    [AC_MSG_RESULT(no)
    +-     ac_cv_func_sockatmark=no])
    +-fi
    ++ac_cv_func_sockatmark=no
    + 
    + #only compile files that are needed
    + unset LIBSCSRC
    +@@ -139,24 +29,3 @@ AC_SUBST([LIBSCSRC])
    + if test x${ac_cv_func_bzero} = xno; then
    +     AC_DEFINE(bzero(b, len), memset((b), 0, (len)), [bzero replacement])
    + fi
    +-
    +-#causes problems with packaging, allow test to be turned off
    +-AC_ARG_WITH(glibc-secure,
    +-[  --without-glibc-secure  disable libc_enable_secure check @<:@default=detect@:>@],
    +-[GLIBCSEC=$withval])
    +-
    +-if test "${GLIBCSEC}" != no; then
    +-    AC_MSG_CHECKING([for __libc_enable_secure])
    +-    AC_TRY_RUN([
    +-extern int __libc_enable_secure;
    +-
    +-int main()
    +-{
    +-    if (__libc_enable_secure == 0)
    +-	return 0;
    +-
    +-	return 1;
    +-}],[AC_MSG_RESULT([yes])
    +-    AC_DEFINE(HAVE_LIBC_ENABLE_SECURE, 1, [linux version of issetugid()])],
    +-    AC_MSG_RESULT([no]))
    +-fi
    diff --git a/net/dante/patches/100-do-not-use-defdname.patch b/net/dante/patches/100-do-not-use-defdname.patch
    new file mode 100644
    index 0000000..37b91a9
    --- /dev/null
    +++ b/net/dante/patches/100-do-not-use-defdname.patch
    @@ -0,0 +1,42 @@
    +--- a/lib/addressmatch.c
    ++++ b/lib/addressmatch.c
    +@@ -399,18 +399,6 @@ addrmatch(rule, address, protocol, alias
    +          if (hostareeq(rule->addr.domain, hostent->h_name)
    +          ||  hostisinlist(rule->addr.domain, (const char **)hostent->h_aliases))
    +             matched = 1;
    +-#if !HAVE_NO_RESOLVESTUFF
    +-         else if (strchr(hostent->h_name, '.') == NULL) {
    +-            /* if hostname we got is non-qualified, try to qualify it. */
    +-            char fqdn[MAXHOSTNAMELEN];
    +-
    +-            snprintf(fqdn, sizeof(fqdn), "%s.%s",
    +-            hostent->h_name, _res.defdname);
    +-
    +-            if (hostareeq(rule->addr.domain, fqdn))
    +-               matched = 1;
    +-         }
    +-#endif /* !HAVE_NO_RESOLVESTUFF */
    +       }
    + 
    +       if (!matched && alias) {
    +@@ -465,20 +453,6 @@ addrmatch(rule, address, protocol, alias
    +                   matched = 1;
    +                   break;
    +                }
    +-#if !HAVE_NO_RESOLVESTUFF
    +-               else if (strchr(ip->h_name, '.') == NULL) {
    +-                  /* if hostname we got is non-qualified, try to qualify it. */
    +-                  char fqdn[MAXHOSTNAMELEN];
    +-
    +-                  snprintf(fqdn, sizeof(fqdn), "%s.%s",
    +-                  ip->h_name, _res.defdname);
    +-
    +-                  if (hostareeq(rule->addr.domain, fqdn)) {
    +-                     matched = 1;
    +-                     break;
    +-                  }
    +-               }
    +-#endif /* !HAVE_NO_RESOLVESTUFF */
    +             }
    + 
    +             hostentfree(host);
    diff --git a/net/dante/patches/200-fix-RTLD_NEXT.patch b/net/dante/patches/200-fix-RTLD_NEXT.patch
    new file mode 100644
    index 0000000..7281ba6
    --- /dev/null
    +++ b/net/dante/patches/200-fix-RTLD_NEXT.patch
    @@ -0,0 +1,36 @@
    +--- a/lib/address.c
    ++++ b/lib/address.c
    +@@ -45,11 +45,12 @@
    + 
    + #include "interposition.h"
    + 
    +-#ifndef __USE_GNU
    +-#define __USE_GNU /* XXX for RTLD_NEXT on Linux */
    +-#endif /* !__USE_GNU */
    + #include 
    + 
    ++#ifndef RTLD_NEXT
    ++#define RTLD_NEXT  ((void *) -1l)
    ++#endif
    ++
    + static const char rcsid[] =
    + "$Id: address.c,v 1.177.2.2 2010/05/24 16:38:36 karls Exp $";
    + 
    +--- a/dlib/interposition.c
    ++++ b/dlib/interposition.c
    +@@ -66,11 +66,12 @@ sendto(HAVE_PROT_SENDTO_1, HAVE_PROT_SEN
    +     HAVE_PROT_SENDTO_4, HAVE_PROT_SENDTO_5, HAVE_PROT_SENDTO_6);
    + #endif
    + 
    +-#ifndef __USE_GNU
    +-#define __USE_GNU /* XXX for RTLD_NEXT on Linux */
    +-#endif /* !__USE_GNU */
    + #include 
    + 
    ++#ifndef RTLD_NEXT
    ++#define RTLD_NEXT  ((void *) -1l)
    ++#endif
    ++
    + #undef accept
    + #undef bind
    + #undef bindresvport
    diff --git a/net/darkstat/Makefile b/net/darkstat/Makefile
    new file mode 100644
    index 0000000..99eb137
    --- /dev/null
    +++ b/net/darkstat/Makefile
    @@ -0,0 +1,61 @@
    +#
    +# Copyright (C) 2007-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=darkstat
    +PKG_VERSION:=3.0.714
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://dmr.ath.cx/net/darkstat
    +PKG_MD5SUM:=eef385fadc8dbb611d3d4c4d8fa94817
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/darkstat
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libpcap +zlib
    +  TITLE:=Network bandwidth monitor
    +  URL:=http://dmr.ath.cx/net/darkstat/
    +endef
    +
    +define Package/darkstat/description
    +darkstat is a packet sniffer that runs as a background process on a cable/DSL
    +router, gathers all sorts of statistics about network usage, and serves them
    +over HTTP.
    +endef
    +
    +define Package/darkstat/conffiles
    +/etc/config/darkstat
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--disable-debug \
    +	--with-chroot-dir=/var/empty
    +
    +TARGET_CFLAGS += -std=gnu99
    +
    +define Build/Compile
    +	$(HOSTCC) $(PKG_BUILD_DIR)/static/c-ify.c \
    +		-o $(PKG_BUILD_DIR)/c-ify
    +	$(call Build/Compile/Default)
    +endef
    +
    +define Package/darkstat/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/darkstat $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/darkstat.init $(1)/etc/init.d/darkstat
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_CONF) ./files/darkstat.conf $(1)/etc/config/darkstat
    +endef
    +
    +$(eval $(call BuildPackage,darkstat))
    diff --git a/net/darkstat/files/darkstat.conf b/net/darkstat/files/darkstat.conf
    new file mode 100644
    index 0000000..f83760e
    --- /dev/null
    +++ b/net/darkstat/files/darkstat.conf
    @@ -0,0 +1,4 @@
    +config darkstat
    +	option interface 'lan'
    +#	option httpaddr  '0.0.0.0'
    +#	option httpport  '667'
    diff --git a/net/darkstat/files/darkstat.init b/net/darkstat/files/darkstat.init
    new file mode 100644
    index 0000000..93bee6b
    --- /dev/null
    +++ b/net/darkstat/files/darkstat.init
    @@ -0,0 +1,35 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2007-2011 OpenWrt.org
    +
    +START=60
    +RUN_D=/var/empty
    +PID_F=$RUN_D/darkstat.pid
    +
    +start() {
    +	mkdir -p $RUN_D
    +	include /lib/network
    +	scan_interfaces
    +	config_load darkstat
    +	config_foreach start_darkstat darkstat
    +}
    +
    +start_darkstat() {
    +	local cfg="$1"
    +	config_get interface "$cfg" interface
    +	config_get httpaddr "$cfg" httpaddr
    +	config_get httpport "$cfg" httpport
    +
    +	config_get ifname "$interface" ifname
    +
    +	/usr/sbin/darkstat --verbose \
    +		-i "$ifname" \
    +		${httpaddr:+-b "$httpaddr"} \
    +		${httpport:+-p "$httpport"} \
    +		--chroot $RUN_D \
    +		--pidfile $PID_F
    +}
    +
    +stop() {
    +	service_kill darkstat $PID_F
    +	rm -f $PID_F
    +}
    diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile
    new file mode 100644
    index 0000000..15eb0ec
    --- /dev/null
    +++ b/net/ddns-scripts/Makefile
    @@ -0,0 +1,42 @@
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ddns-scripts
    +PKG_VERSION:=1.0.0
    +PKG_RELEASE:=17
    +
    +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/ddns-scripts
    +	SECTION:=net
    +	CATEGORY:=Network
    +        SUBMENU:=IP Addresses and Names
    +	TITLE:=Dynamic DNS Scripts
    +	PKGARCH:=all
    +endef
    +
    +define Package/ddns-scripts/description
    +	A highly configurable set of scripts for doing
    +	dynamic dns updates
    +endef
    +
    +define Build/Prepare
    +endef
    +
    +define Build/Configure
    +endef
    +
    +define Build/Compile
    +endef
    +
    +define Package/ddns-scripts/conffiles
    +/etc/config/ddns
    +endef
    +
    +define Package/ddns-scripts/install
    +	$(INSTALL_DIR) $(1)
    +	$(CP) ./files/* $(1)/
    +endef
    +
    +$(eval $(call BuildPackage,ddns-scripts))
    diff --git a/net/ddns-scripts/files/etc/config/ddns b/net/ddns-scripts/files/etc/config/ddns
    new file mode 100644
    index 0000000..db84aae
    --- /dev/null
    +++ b/net/ddns-scripts/files/etc/config/ddns
    @@ -0,0 +1,92 @@
    +#################################################################
    +# In order to enable dynamic dns you need at least one section,
    +# and in that seciton the "enabled" option must be set to one
    +# 
    +# Each section represents an update to a different service
    +#
    +# You specify your domain name, your username and your password
    +# with the optins "domain", "username" and "password" respectively
    +#
    +# Next you need to specify the name of the service you are 
    +# connecting to "eg. dyndns.org".  The format of the update
    +# urls for several different dynamic dns services is specified
    +# in the /usr/lib/ddns/services file.  This list is hardly complete
    +# as there are many, many different dynamic dns services.  If your
    +# service is on the list you can merely specify it with the 
    +# "service_name" option.  Otherwise you will need to determine
    +# the format of the url to update with.  You can either add an
    +# entry to the /usr/lib/ddns/services file or specify this with
    +# the "update_url" option.
    +#
    +# We also need to specify the source of the ip address to associate with
    +# your domain.  The "ip_source" option can be "network", "interface"
    +# or "web", with "network" as the default.  
    +#
    +# If "ip_source" is "network" you specify a network section in your 
    +# /etc/network config file (e.g. "wan", which is the default) with
    +# the "ip_network" option.  If you specify "wan", you will update
    +# with whatever the ip for your wan is.
    +# 
    +# If "ip_source" is "interface" you specify a hardware interface 
    +# (e.g. "eth1") and whatever the current ip of this interface is
    +# will be associated with the domain when an update is performed.
    +#
    +# If "ip_source" is "script" you specify a script to obtain ip address.
    +# The "ip_script" option should contain path to your script.
    +#
    +# The last possibility is that "ip_source" is "web", which means
    +# that in order to obtain our ip address we will connect to a 
    +# website, and the first valid ip address listed on that page
    +# will be assumed to be ours.  If you are behind another firewall
    +# this is the best option since none of the local networks or 
    +# interfaces will have the external ip.  The website to connect
    +# to is specified by the "ip_url" option.  You may specify multiple
    +# urls in the option, separated by whitespace.
    +#
    +# Finally we need to specify how often to check whether we need
    +# to check whether the ip address has changed (and if so update
    +# it) and how often we need to force an update ( many services
    +# will expire your domain if you don't connect and do an update
    +# every so often).  Use the "check_interval" to specify how
    +# often to check whether an update is necessary, and the 
    +# "force_interval" option to specify how often to force an
    +# update.  Specify the units for these values with the "check_unit"
    +# and the "force_unit" options.  Units can be "days", "hours",
    +# "minutes" or "seconds".  The default force_unit is hours and the
    +# default check_unit is seconds.  The default check_interval is
    +# 600 seconds, or ten minutes.  The default force_interval is 
    +# 72 hours or 3 days.
    +#
    +#
    +#########################################################
    +
    +config service "myddns"
    +	option enabled		"0"
    +	option interface	"wan"
    +
    +	option service_name	"dyndns.org"
    +	option domain		"mypersonaldomain.dyndns.org"
    +	option username		"myusername"
    +	option password		"mypassword"
    +
    +	option ip_source	"network" 
    +	option ip_network	"wan"
    +	
    +
    +	option force_interval	"72"
    +	option force_unit	"hours"
    +	option check_interval	"10"
    +	option check_unit	"minutes"
    +
    +	#option ip_source	"interface"
    +	#option ip_interface	"eth0.1"
    +
    +	#option ip_source	"script"
    +	#option	ip_script	"path to your scrip"
    +
    +	#option ip_source	"web"
    +	#option ip_url		"http://www.whatismyip.com/automation/n09230945.asp"
    +
    +	#option update_url	"http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
    +
    +
    diff --git a/net/ddns-scripts/files/etc/hotplug.d/iface/25-ddns b/net/ddns-scripts/files/etc/hotplug.d/iface/25-ddns
    new file mode 100644
    index 0000000..4495b5d
    --- /dev/null
    +++ b/net/ddns-scripts/files/etc/hotplug.d/iface/25-ddns
    @@ -0,0 +1,9 @@
    +#!/bin/sh
    +
    +. /usr/lib/ddns/dynamic_dns_functions.sh
    +
    +if [ "$ACTION" = "ifup" ]; then
    +	start_daemon_for_all_ddns_sections "$INTERFACE"
    +fi
    +
    +
    diff --git a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh
    new file mode 100644
    index 0000000..ba18c8b
    --- /dev/null
    +++ b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh
    @@ -0,0 +1,136 @@
    +# /usr/lib/dynamic_dns/dynamic_dns_functions.sh
    +#
    +# Written by Eric Paul Bishop, Janary 2008
    +# Distributed under the terms of the GNU General Public License (GPL) version 2.0
    +#
    +# This script is (loosely) based on the one posted by exobyte in the forums here:
    +# http://forum.openwrt.org/viewtopic.php?id=14040
    +
    +
    +
    +. /etc/functions.sh
    +include /lib/network
    +
    +
    +#loads all options for a given package and section
    +#also, sets all_option_variables to a list of the variable names
    +load_all_config_options()
    +{
    +	pkg_name="$1"
    +	section_id="$2"
    +
    +	ALL_OPTION_VARIABLES=""
    +	# this callback loads all the variables
    +	# in the section_id section when we do
    +	# config_load. We need to redefine
    +	# the option_cb for different sections
    +	# so that the active one isn't still active
    +	# after we're done with it.  For reference
    +	# the $1 variable is the name of the option
    +	# and $2 is the name of the section
    +	config_cb()
    +	{
    +		if [ ."$2" = ."$section_id" ]; then
    +			option_cb()
    +			{
    +				ALL_OPTION_VARIABLES="$ALL_OPTION_VARIABLES $1"
    +			}
    +		else
    +			option_cb() { return 0; }
    +		fi
    +	}
    +
    +
    +	config_load "$pkg_name"
    +	for var in $ALL_OPTION_VARIABLES
    +	do
    +		config_get "$var" "$section_id" "$var"
    +	done
    +}
    +
    +
    +get_current_ip()
    +{
    +
    +	#if ip source is not defined, assume we want to get ip from wan 
    +	if [ "$ip_source" != "interface" ] && [ "$ip_source" != "web" ] && [ "$ip_source" != "script" ]
    +	then
    +		ip_source="network"
    +	fi
    +
    +	if [ "$ip_source" = "network" ]
    +	then
    +		if [ -z "$ip_network" ]
    +		then
    +			ip_network="wan"
    +		fi
    +		scan_interfaces
    +		config_load /var/state/network
    +		config_get ip_interface $ip_network ifname
    +	fi
    +
    +	current_ip='';
    +	if [ "$ip_source" = "network" ] || [ "$ip_source" = "interface" ]
    +	then
    +		current_ip=$(ifconfig $ip_interface | grep -o 'inet addr:[0-9.]*' | grep -o "$ip_regex")
    +	elif [ "$ip_source" = "script" ]
    +	then
    +		# get ip from script
    +		current_ip=$($ip_script)
    +	else
    +		# get ip from web
    +		# we check each url in order in ip_url variable, and if no ips are found we use dyndns ip checker
    +		# ip is set to FIRST expression in page that matches the ip_regex regular expression
    +		for addr in $ip_url
    +		do
    +			if [ -z "$current_ip" ]
    +			then
    +				current_ip=$(echo $( wget -O - $addr 2>/dev/null) | grep -o "$ip_regex")
    +			fi
    +		done
    +
    +		#here we hard-code the dyndns checkip url in case no url was specified
    +		if [ -z "$current_ip" ]
    +		then
    +			current_ip=$(echo $( wget -O - http://checkip.dyndns.org 2>/dev/null) | grep -o "$ip_regex")
    +		fi
    +	fi
    +
    +	echo "$current_ip"
    +}
    +
    +
    +verbose_echo()
    +{
    +	if [ "$verbose_mode" = 1 ]
    +	then
    +		echo $1
    +	fi
    +}
    +
    +start_daemon_for_all_ddns_sections()
    +{
    +	local event_interface="$1"
    +
    +	SECTIONS=""
    +	config_cb() 
    +	{
    +		SECTIONS="$SECTIONS $2"
    +	}
    +	config_load "ddns"
    +
    +	for section in $SECTIONS
    +	do
    +		local iface
    +		config_get iface "$section" interface "wan"
    +		[ "$iface" = "$event_interface" ] || continue
    +		/usr/lib/ddns/dynamic_dns_updater.sh $section 0 > /dev/null 2>&1 &
    +	done
    +}
    +
    +monotonic_time()
    +{
    +	local uptime
    +	read uptime < /proc/uptime
    +	echo "${uptime%%.*}"
    +}
    diff --git a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh
    new file mode 100755
    index 0000000..e8e08e7
    --- /dev/null
    +++ b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh
    @@ -0,0 +1,324 @@
    +#!/bin/sh
    +# /usr/lib/dynamic_dns/dynamic_dns_updater.sh
    +#
    +# Written by Eric Paul Bishop, Janary 2008
    +# Distributed under the terms of the GNU General Public License (GPL) version 2.0
    +#
    +# This script is (loosely) based on the one posted by exobyte in the forums here:
    +# http://forum.openwrt.org/viewtopic.php?id=14040
    +#
    +
    +. /usr/lib/ddns/dynamic_dns_functions.sh
    +
    +
    +service_id=$1
    +if [ -z "$service_id" ]
    +then
    +	echo "ERRROR: You must specify a service id (the section name in the /etc/config/ddns file) to initialize dynamic DNS."
    +	return 1
    +fi
    +
    +#default mode is verbose_mode, but easily turned off with second parameter
    +verbose_mode="1"
    +if [ -n "$2" ]
    +then
    +	verbose_mode="$2"
    +fi
    +
    +###############################################################
    +# Leave this comment here, to clearly document variable names
    +# that are expected/possible
    +#
    +# Now use load_all_config_options to load config
    +# options, which is a much more flexible solution.
    +#
    +#
    +#config_load "ddns"
    +#
    +#config_get enabled $service_id enabled
    +#config_get service_name $service_id service_name
    +#config_get update_url $service_id update_url
    +#
    +#
    +#config_get username $service_id username
    +#config_get password $service_id password
    +#config_get domain $service_id domain
    +#
    +#
    +#config_get use_https $service_id use_https
    +#config_get cacert $service_id cacert
    +#
    +#config_get ip_source $service_id ip_source
    +#config_get ip_interface $service_id ip_interface
    +#config_get ip_network $service_id ip_network
    +#config_get ip_url $service_id ip_url
    +#
    +#config_get force_interval $service_id force_interval
    +#config_get force_unit $service_id force_unit
    +#
    +#config_get check_interval $service_id check_interval
    +#config_get check_unit $service_id check_unit
    +#########################################################
    +load_all_config_options "ddns" "$service_id"
    +
    +
    +#some defaults
    +if [ -z "$check_interval" ]
    +then
    +	check_interval=600
    +fi
    +
    +if [ -z "$check_unit" ]
    +then
    +	check_unit="seconds"
    +fi
    +
    +
    +if [ -z "$force_interval" ]
    +then
    +	force_interval=72
    +fi
    +
    +if [ -z "$force_unit" ]
    +then
    +	force_unit="hours"
    +fi
    +
    +if [ -z "$use_https" ]
    +then
    +	use_https=0
    +fi
    +
    +
    +
    +#some constants
    +
    +if [ "x$use_https" = "x1" ]
    +then
    +	retrieve_prog="/usr/bin/curl "
    +	if [ -f "$cacert" ]
    +	then
    +		retrieve_prog="${retrieve_prog}--cacert $cacert "
    +	elif [ -d "$cacert" ]
    +	then
    +		retrieve_prog="${retrieve_prog}--capath $cacert "
    +	fi
    +else
    +	retrieve_prog="/usr/bin/wget -O - ";
    +fi
    +
    +service_file="/usr/lib/ddns/services"
    +
    +ip_regex="[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}"
    +
    +NEWLINE_IFS='
    +'
    +
    +
    +#determine what update url we're using if the service_name is supplied
    +if [ -n "$service_name" ]
    +then
    +	#remove any lines not containing data, and then make sure fields are enclosed in double quotes
    +	quoted_services=$(cat $service_file |  grep "^[\t ]*[^#]" |  awk ' gsub("\x27", "\"") { if ($1~/^[^\"]*$/) $1="\""$1"\"" }; { if ( $NF~/^[^\"]*$/) $NF="\""$NF"\""  }; { print $0 }' )
    +
    +
    +	#echo "quoted_services = $quoted_services"
    +	OLD_IFS=$IFS
    +	IFS=$NEWLINE_IFS
    +	for service_line in $quoted_services
    +	do
    +		#grep out proper parts of data and use echo to remove quotes
    +		next_name=$(echo $service_line | grep -o "^[\t ]*\"[^\"]*\"" | xargs -r -n1 echo)
    +		next_url=$(echo $service_line | grep -o "\"[^\"]*\"[\t ]*$" | xargs -r -n1 echo)
    +
    +		if [ "$next_name" = "$service_name" ]
    +		then
    +			update_url=$next_url
    +		fi
    +	done
    +	IFS=$OLD_IFS
    +fi
    +
    +if [ "x$use_https" = x1 ]
    +then
    +	update_url=$(echo $update_url | sed -e 's/^http:/https:/')
    +fi
    +
    +
    +verbose_echo "update_url=$update_url"
    +
    +
    +
    +#if this service isn't enabled then quit
    +if [ "$enabled" != "1" ] 
    +then
    +	return 0
    +fi
    +
    +
    +
    +
    +
    +#compute update interval in seconds
    +case "$force_unit" in
    +	"days" )
    +		force_interval_seconds=$(($force_interval*60*60*24))
    +		;;
    +	"hours" )
    +		force_interval_seconds=$(($force_interval*60*60))
    +		;;
    +	"minutes" )
    +		force_interval_seconds=$(($force_interval*60))
    +		;;
    +	"seconds" )
    +		force_interval_seconds=$force_interval
    +		;;
    +	* )
    +		#default is hours
    +		force_interval_seconds=$(($force_interval*60*60))
    +		;;
    +esac
    +
    +
    +
    +#compute check interval in seconds
    +case "$check_unit" in
    +	"days" )
    +		check_interval_seconds=$(($check_interval*60*60*24))
    +		;;
    +	"hours" )
    +		check_interval_seconds=$(($check_interval*60*60))
    +		;;
    +	"minutes" )
    +		check_interval_seconds=$(($check_interval*60))
    +		;;
    +	"seconds" )
    +		check_interval_seconds=$check_interval
    +		;;
    +	* )
    +		#default is seconds
    +		check_interval_seconds=$check_interval
    +		;;
    +esac
    +
    +
    +
    +verbose_echo "force seconds = $force_interval_seconds"
    +verbose_echo "check seconds = $check_interval_seconds"
    +
    +#kill old process if it exists & set new pid file
    +if [ -d /var/run/dynamic_dns ]
    +then
    +	#if process is already running, stop it
    +	if [ -e "/var/run/dynamic_dns/$service_id.pid" ]
    +	then
    +		old_pid=$(cat /var/run/dynamic_dns/$service_id.pid)
    +		test_match=$(ps | grep "^[\t ]*$old_pid")
    +		verbose_echo "old process id (if it exists) = \"$test_match\""
    +		if [ -n  "$test_match" ]
    +		then
    +			kill $old_pid
    +		fi
    +	fi
    +
    +else
    +	#make dir since it doesn't exist
    +	mkdir /var/run/dynamic_dns
    +fi
    +echo $$ > /var/run/dynamic_dns/$service_id.pid
    +
    +
    +
    +
    +#determine when the last update was
    +current_time=$(monotonic_time)
    +last_update=$(( $current_time - (2*$force_interval_seconds) ))
    +if [ -e "/var/run/dynamic_dns/$service_id.update" ]
    +then
    +	last_update=$(cat /var/run/dynamic_dns/$service_id.update)
    +fi
    +time_since_update=$(($current_time - $last_update))
    +
    +
    +human_time_since_update=$(( $time_since_update / ( 60 * 60 ) ))
    +verbose_echo "time_since_update = $human_time_since_update hours"
    +
    +
    +
    +
    +registered_ip=$(echo $(nslookup "$domain" 2>/dev/null) |  grep -o "Name:.*" | grep -o "$ip_regex")
    +
    +
    +#do update and then loop endlessly, checking ip every check_interval and forcing an updating once every force_interval
    +
    +while [ true ]
    +do
    +	current_ip=$(get_current_ip)
    +
    +
    +	current_time=$(monotonic_time)
    +	time_since_update=$(($current_time - $last_update))
    +
    +
    +	verbose_echo "Running IP check..."
    +	verbose_echo "current system ip = $current_ip"
    +	verbose_echo "registered domain ip = $registered_ip"
    +
    +
    +	if [ "$current_ip" != "$registered_ip" ]  || [ $force_interval_seconds -lt $time_since_update ]
    +	then
    +		verbose_echo "update necessary, performing update ..."
    +
    +		#do replacement
    +		final_url=$update_url
    +		for option_var in $ALL_OPTION_VARIABLES
    +		do
    +			if [ "$option_var" != "update_url" ]
    +			then
    +				replace_name=$(echo "\[$option_var\]" | tr 'a-z' 'A-Z')
    +				replace_value=$(eval echo "\$$option_var")
    +				replace_value=$(echo $replace_value | sed -f /usr/lib/ddns/url_escape.sed)
    +				final_url=$(echo $final_url | sed s^"$replace_name"^"$replace_value"^g )
    +			fi
    +		done
    +		final_url=$(echo $final_url | sed s/"\[HTTPAUTH\]"/"$username${password:+:$password}"/g )
    +		final_url=$(echo $final_url | sed s/"\[IP\]"/"$current_ip"/g )
    +
    +
    +		verbose_echo "updating with url=\"$final_url\""
    +
    +		#here we actually connect, and perform the update
    +		update_output=$( $retrieve_prog "$final_url" )
    +
    +		verbose_echo "Update Output:"
    +		verbose_echo "$update_output"
    +		verbose_echo ""
    +
    +		#save the time of the update
    +		current_time=$(monotonic_time)
    +		last_update=$current_time
    +		time_since_update='0'
    +		registered_ip=$current_ip
    +
    +		human_time=$(date)
    +		verbose_echo "update complete, time is: $human_time"
    +
    +		echo "$last_update" > "/var/run/dynamic_dns/$service_id.update"
    +	else
    +		human_time=$(date)
    +		human_time_since_update=$(( $time_since_update / ( 60 * 60 ) ))
    +		verbose_echo "update unnecessary"
    +		verbose_echo "time since last update = $human_time_since_update hours"
    +		verbose_echo "the time is now $human_time"
    +	fi
    +
    +	#sleep for 10 minutes, then re-check ip && time since last update
    +	sleep $check_interval_seconds
    +done
    +
    +#should never get here since we're a daemon, but I'll throw it in anyway
    +return 0
    +
    +
    +
    +
    diff --git a/net/ddns-scripts/files/usr/lib/ddns/services b/net/ddns-scripts/files/usr/lib/ddns/services
    new file mode 100644
    index 0000000..70104cd
    --- /dev/null
    +++ b/net/ddns-scripts/files/usr/lib/ddns/services
    @@ -0,0 +1,42 @@
    +# This file contains the update urls for various dynamic dns services.
    +# Column one contains the service name, column two contains the update url.
    +# within the update url there are 4 variables you can use: [USERNAME], 
    +# [PASSWORD], [DOMAIN] and [IP].  These are substituted for the username, 
    +# password, and domain name specified in the /etc/config/ddns file when an 
    +# update is performed.  The IP is substituted for the current ip address of the
    +# router.  These variables are case sensitive, while urls generally are not, so 
    +# if you need to enter the same text in the url (which seems very unlikely) put 
    +# that text in lowercase, while the variables should remain in uppercase
    +
    +"dyndns.org"		"http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
    +"changeip.com"		"http://[USERNAME]:[PASSWORD]@nic.changeip.com/nic/update?u=[USERNAME]&p=[PASSWORD]&cmd=update&hostname=[DOMAIN]&ip=[IP]"
    +"zoneedit.com"		"http://[USERNAME]:[PASSWORD]@dynamic.zoneedit.com/auth/dynamic.html?host=[DOMAIN]&dnsto=[IP]"
    +"free.editdns.net"	"http://dyndns-free.editdns.net/api/dynLinux.php?p=[PASSWORD]&r=[DOMAIN]"
    +
    +#noip is an alias of no-ip, so allow both names for the same service
    +"no-ip.com"		"http://[USERNAME]:[PASSWORD]@dynupdate.no-ip.com/nic/update?hostname=[DOMAIN]&myip=[IP]"
    +"noip.com"		"http://[USERNAME]:[PASSWORD]@dynupdate.no-ip.com/nic/update?hostname=[DOMAIN]&myip=[IP]"
    +
    +#freedns.afraid.org is weird, you just need an update code, for which we use the password variable
    +"freedns.afraid.org"	"http://freedns.afraid.org/dynamic/update.php?[PASSWORD]"
    +
    +#### ADD YOURS HERE! ######################################################################################
    +#                                                                                                         #
    +# There are TONS of dynamic dns services out there. There's a huge list of them at:                       #
    +# http://www.dmoz.org/Computers/Software/Internet/Servers/Address_Management/Dynamic_DNS_Services/        #
    +# If anyone has time they could update this file to be compatible with a bunch of them                    #
    +#                                                                                                         #
    +###########################################################################################################
    +
    +# DNS Max and resellers' update urls
    +"dnsmax.com"	"http://update.dnsmax.com/update/?username=[USERNAME]&password=[PASSWORD]&resellerid=1&clientname=openwrt&clientversion=8.09&protocolversion=2.0&updatehostname=[DOMAIN]&ip=[IP]"
    +"thatip.com"	"http://update.dnsmax.com/update/?username=[USERNAME]&password=[PASSWORD]&resellerid=2&clientname=openwrt&clientversion=8.09&protocolversion=2.0&updatehostname=[DOMAIN]&ip=[IP]"
    +
    +# Hurricane Electric Dynamic DNS
    +"he.net"		"http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]" 
    +
    +# DNSdynamic.org
    +"dnsdynamic.org"	"http://[USERNAME]:[PASSWORD]@www.dnsdynamic.org/api/?hostname=[DOMAIN]&myip=[IP]"
    +
    +# dnsExit.com free dynamic DNS update url
    +"dnsexit.com"		"http://www.dnsexit.com/RemoteUpdate.sv?login=[USERNAME]&password=[PASSWORD]&host=[DOMAIN]&myip=[IP]"
    diff --git a/net/ddns-scripts/files/usr/lib/ddns/url_escape.sed b/net/ddns-scripts/files/usr/lib/ddns/url_escape.sed
    new file mode 100644
    index 0000000..eac4002
    --- /dev/null
    +++ b/net/ddns-scripts/files/usr/lib/ddns/url_escape.sed
    @@ -0,0 +1,25 @@
    +# sed url escaping
    +s:%:%25:g
    +s: :%20:g
    +s:<:%3C:g
    +s:>:%3E:g
    +s:#:%23:g
    +s:{:%7B:g
    +s:}:%7D:g
    +s:|:%7C:g
    +s:\\:%5C:g
    +s:\^:%5E:g
    +s:~:%7E:g
    +s:\[:%5B:g
    +s:\]:%5D:g
    +s:`:%60:g
    +s:;:%3B:g
    +s:/:%2F:g
    +s:?:%3F:g
    +s^:^%3A^g
    +s:@:%40:g
    +s:=:%3D:g
    +s:&:%26:g
    +s:\$:%24:g
    +s:\!:%21:g
    +s:\*:%2A:g
    diff --git a/net/deluge/Makefile b/net/deluge/Makefile
    new file mode 100644
    index 0000000..bf3bba4
    --- /dev/null
    +++ b/net/deluge/Makefile
    @@ -0,0 +1,111 @@
    +#
    +# Copyright (C) 2008-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=deluge
    +PKG_VERSION:=1.2.0
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://download.deluge-torrent.org/source/
    +PKG_MD5SUM:=cec6b48f0abd79ea2cff3815a1124192
    +
    +PKG_BUILD_DEPENDS:=distribute/host
    +
    +include $(INCLUDE_DIR)/package.mk
    +$(call include_mk, python-package.mk)
    +
    +define Package/deluge/Default
    +  SUBMENU:=BitTorrent
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=A lightweight BitTorrent client
    +  URL:=http://deluge-torrent.org/
    +endef
    +
    +define Package/deluge
    +$(call Package/deluge/Default)
    +  TITLE+= (console UI & daemon)
    +  DEPENDS+=+python +rblibtorrent +python2-chardet +pyxdg +twisted +twisted-web +pyopenssl
    +endef
    +
    +define Package/deluge-ui-gtk
    +$(call Package/deluge/Default)
    +  TITLE+= (GTK+ UI)
    +  DEPENDS+=deluge +python-gtk
    +endef
    +
    +define Package/deluge-ui-web
    +$(call Package/deluge/Default)
    +  TITLE+= (Web UI)
    +  DEPENDS+=deluge +mako
    +endef
    +
    +define Package/deluge/description
    +  BitTorrent client with a client/server model.
    +endef
    +
    +define Package/deluge/conffiles
    +/etc/config/deluge
    +endef
    +
    +define Build/Compile
    +	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
    +
    +	$(SED) 's,#!$(STAGING_DIR)/host/bin/$(PYTHON),#!/usr/bin/$(PYTHON),' $(PKG_INSTALL_DIR)/usr/bin/*
    +endef
    +
    +define Package/deluge/install
    +	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
    +	$(CP) \
    +	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
    +	    $(1)$(PYTHON_PKG_DIR)/
    +	rm -rf $(1)$(PYTHON_PKG_DIR)/deluge/ui/gtkui
    +	rm -rf $(1)$(PYTHON_PKG_DIR)/deluge/ui/web
    +
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) \
    +	    $(PKG_INSTALL_DIR)/usr/bin/* \
    +	    $(1)/usr/bin/
    +	rm -rf $(1)/usr/bin/deluge-gtk
    +	rm -rf $(1)/usr/bin/deluge-web
    +
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_CONF) ./files/deluge.config $(1)/etc/config/deluge
    +
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/deluge.init $(1)/etc/init.d/deluge
    +endef
    +
    +define Package/deluge-ui-gtk/install
    +	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/deluge/ui
    +	$(CP) \
    +	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/deluge/ui/gtkui \
    +	    $(1)$(PYTHON_PKG_DIR)/deluge/ui/
    +
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) \
    +	    $(PKG_INSTALL_DIR)/usr/bin/deluge-gtk \
    +	    $(1)/usr/bin/
    +endef
    +
    +define Package/deluge-ui-web/install
    +	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/deluge/ui
    +	$(CP) \
    +	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/deluge/ui/web \
    +	    $(1)$(PYTHON_PKG_DIR)/deluge/ui/
    +
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) \
    +	    $(PKG_INSTALL_DIR)/usr/bin/deluge-web \
    +	    $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,deluge))
    +$(eval $(call BuildPackage,deluge-ui-gtk))
    +$(eval $(call BuildPackage,deluge-ui-web))
    diff --git a/net/deluge/files/deluge.config b/net/deluge/files/deluge.config
    new file mode 100644
    index 0000000..576379f
    --- /dev/null
    +++ b/net/deluge/files/deluge.config
    @@ -0,0 +1,5 @@
    +config global deluged
    +	option 'user' 'deluge:deluge'
    +	option 'home' ''
    +	option 'options' ''
    +	option 'enabled' 1
    diff --git a/net/deluge/files/deluge.init b/net/deluge/files/deluge.init
    new file mode 100644
    index 0000000..234a13d
    --- /dev/null
    +++ b/net/deluge/files/deluge.init
    @@ -0,0 +1,60 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2010 OpenWrt.org
    +# Copyright (C) 2010 Alexander Sulfrian
    +
    +NAME=deluge
    +PIDFILE=/var/run/deluged.pid
    +START=50
    +STOP=50
    +
    +load_config()
    +{
    +	config_get_bool enabled $1 enabled 0
    +	[ "${enabled}" -eq 0 ] && return 1
    +
    +	config_get user $1 user
    +	if [ "${user}" == "" ]; then
    +		echo "Please check your uci config. User for '$1' should not be empty."
    +		return 1
    +	fi
    +
    +	username=$(echo ${user} | cut -d ':' -f 1)
    +	group=$(echo ${user} | cut -d ':' -f 2)
    +
    +	if ! $(cut -d ':' -f 1 /etc/passwd | grep -sq "${username}"); then
    +		echo "Please check your uci config. User for '$1' should exist."
    +		return 1
    +	fi
    +
    +	if [ "${group}" != "" ]; then
    +		if ! $(cut -d ':' -f 1 /etc/passwd | grep -sq "${group}"); then
    +			echo "Please check your uci config. Group for '$1' should exist."
    +	                return 1
    +		fi
    +	fi
    +}
    +
    +start()
    +{
    +	config_load "${NAME}"
    +	load_config deluged || return $?
    +
    +	config_get options deluged options
    +
    +	config_get home deluged home
    +	if [ "${home}" == "" ]; then
    +		home=$(grep "^${username}:" /etc/passwd | cut -d ':' -f 6)
    +	fi
    +
    +	HOME="${home}" /sbin/start-stop-daemon -S -u "${username}" \
    +		-p "${PIDFILE}" -b -m -x "/usr/bin/python2.6" -a deluged \
    +		-c "${user}" -- --do-not-daemonize ${options}
    +}
    +
    +stop()
    +{
    +	config_load "${NAME}"
    +	load_config deluged || return $?
    +
    +	/sbin/start-stop-daemon -K -u "${username}" -n deluged -p "${PIDFILE}"
    +}
    diff --git a/net/dhcp-forwarder/Makefile b/net/dhcp-forwarder/Makefile
    new file mode 100644
    index 0000000..be5fe38
    --- /dev/null
    +++ b/net/dhcp-forwarder/Makefile
    @@ -0,0 +1,53 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=dhcp-forwarder
    +PKG_VERSION:=0.8
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://savannah.nongnu.org/download/dhcp-fwd
    +PKG_MD5SUM:=fb3670dee9f71af1e55ac5dcd64e213e
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +CONFIGURE_ARGS += \
    +  --disable-dietlibc
    +
    +define Package/dhcp-forwarder
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=IP Addresses and Names
    +  TITLE:=DHCP relay agent
    +  URL:=http://www.nongnu.org/dhcp-fwd/
    +endef
    +
    +define Package/dhcp-forwarder/conffiles
    +/etc/dhcp-fwd.conf
    +endef
    +
    +# uses GNU configure
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		cfg_filename="/etc/dhcp-fwd.conf" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Package/dhcp-forwarder/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/dhcp-fwd.conf $(1)/etc/
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/dhcp-fwd.init $(1)/etc/init.d/dhcp-fwd
    +endef
    +
    +$(eval $(call BuildPackage,dhcp-forwarder))
    diff --git a/net/dhcp-forwarder/files/dhcp-fwd.init b/net/dhcp-forwarder/files/dhcp-fwd.init
    new file mode 100644
    index 0000000..6b66c0f
    --- /dev/null
    +++ b/net/dhcp-forwarder/files/dhcp-fwd.init
    @@ -0,0 +1,18 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +LOG_D=/var/log
    +RUN_D=/var/run
    +PID_F=$RUN_D/dhcp-fwd.pid
    +
    +start() {
    +	[ -d $LOG_D ] || mkdir -p $LOG_D
    +	[ -d $RUN_D ] || mkdir -p $RUN_D
    +	dhcp-fwd
    +}
    +
    +stop() {
    +	[ -f $PID_F ] && kill $(cat $PID_F)
    +}
    +
    diff --git a/net/dhcp/Makefile b/net/dhcp/Makefile
    new file mode 100644
    index 0000000..374ec6f
    --- /dev/null
    +++ b/net/dhcp/Makefile
    @@ -0,0 +1,78 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=dhcp
    +PKG_VERSION:=3.1.0
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/
    +PKG_MD5SUM:=27d179a3c3fbef576566b456a1168246
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/dhcp/Default
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=IP Addresses and Names
    +  TITLE:=ISC's DHCP
    +  URL:=https://www.isc.org/software/dhcp
    +endef
    +
    +define Package/dhcp-relay
    +  $(call Package/dhcp/Default)
    +  TITLE+= relay
    +endef
    +
    +define Package/dhcp-server
    +  $(call Package/dhcp/Default)
    +  TITLE+= server
    +endef
    +
    +
    +define Build/Configure
    +	# it's not GNU autoconf stuff
    +	(cd $(PKG_BUILD_DIR) ; \
    +		UNAME_S=Linux \
    +		UNAME_M=$(ARCH) \
    +		UNAME_R=2.6.23 \
    +		./configure \
    +			--copts "$(TARGET_CFLAGS)" \
    +	);
    +endef
    +
    +define Build/Compile
    +	UNAME_S=Linux \
    +	UNAME_M=$(ARCH) \
    +	UNAME_R=2.6.23 \
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +
    +define Package/dhcp-relay/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin/
    +endef
    +
    +define Package/dhcp-server/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_DIR) $(1)/usr/local/lib
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/omshell $(1)/usr/bin/
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/local/lib/*.a $(1)/usr/local/lib
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/dhcpd.init $(1)/etc/init.d/dhcpd
    +endef
    +
    +$(eval $(call BuildPackage,dhcp-relay))
    +$(eval $(call BuildPackage,dhcp-server))
    diff --git a/net/dhcp/files/dhcpd.init b/net/dhcp/files/dhcpd.init
    new file mode 100644
    index 0000000..308f3aa
    --- /dev/null
    +++ b/net/dhcp/files/dhcpd.init
    @@ -0,0 +1,101 @@
    +#!/bin/sh /etc/rc.common
    +START=60
    +
    +lease_file=/tmp/dhcpd.leases
    +config_file=/etc/dhcpd.conf
    +pid_file=/var/run/dhcpd.pid
    +hosts_file=/tmp/dhcpd.hosts
    +dhcp_ifs=""
    +
    +append_interface() {
    +	local ifname=$(uci_get_state network "$1" device)
    +	if [ "$(uci_get_state network "$1" type)" = "bridge" ]; then
    +		ifname=$(uci_get_state network "$1" ifname); fi
    +
    +	if [ -z "$dhcp_ifs" ]; then
    +		dhcp_ifs="$ifname"
    +	else
    +		dhcp_ifs="$dhcp_ifs $ifname"
    +	fi
    +}
    +
    +parse_dhcp() {
    +	local cfg="$1"
    +	config_get net "$cfg" interface
    +	[ -n "$net" ] || return 0
    +
    +	config_get_bool ignore "$1" ignore 0
    +	if [ "$ignore" -eq 1 ]; then return 0; fi
    +
    +	append_interface $net
    +}
    +
    +parse_host_entry() {
    +		local cfg="$1"
    +
    +		config_get name "$cfg" name
    +
    +		config_get ip "$cfg" ip
    +		[ -n "$ip" ] || return 0
    +
    +	local i=0
    +		config_get mac "$cfg" mac
    +		for m in $mac; do
    +		local hostid="$name"
    +		if [ $i -ne 0 ]; then hostid="$name"_"$i"; fi
    +
    +		echo "host $hostid {" >> "$hosts_file"
    +		echo "hardware ethernet $m;" >> "$hosts_file"
    +		echo "fixed-address $ip;" >> "$hosts_file"
    +		echo "}" >> $hosts_file
    +
    +		i=$((i+1))
    +	done
    +}
    +
    +init_config() {
    +	echo " #Automatically generated by dhcpd initscript, any modifications will be overwritten" > "$hosts_file"
    +
    +	include /lib/network
    +	scan_interfaces
    +	config_load dhcp
    +
    +	config_foreach parse_host_entry	host
    +	config_foreach parse_dhcp dhcp
    +}
    +
    +start() {
    +	if [ -e $pid_file ] ; then
    +            echo "  dhcpd already running with PID `cat $pid_file`"
    +    	    return 1
    +        fi
    +
    +	echo Starting isc-dhcpd
    +
    +	if [ ! -e $lease_file ]; then
    +		echo "  Creating $lease_file"
    +		touch $lease_file
    +	fi
    +	
    +	/usr/sbin/dhcpd -q -cf $config_file -lf $lease_file
    +	
    +	if [ $? -ne 0 ]; then
    +		echo "  isc-dhcpd failed to start"
    +	fi
    +}
    +
    +stop() {
    +	echo "Stopping isc-dhcpd"
    +	if [ -e $pid_file ]; then
    +		kill -KILL `cat $pid_file`
    +
    +		if [ $? -ne 0 ]; then
    +			echo "  PID " `cat $pid_file` not found
    +			echo "  Is the DHCP server running?"
    +		fi
    +	
    +		rm -f $pid_file
    +	else
    +		echo "  $pid_file not found"
    +	fi
    +}
    diff --git a/net/dhcp/patches/100-portability.patch b/net/dhcp/patches/100-portability.patch
    new file mode 100644
    index 0000000..f768143
    --- /dev/null
    +++ b/net/dhcp/patches/100-portability.patch
    @@ -0,0 +1,22 @@
    +--- dhcp.old/configure	2007-04-01 17:16:14.000000000 +0200
    ++++ dhcp.dev/configure	2007-04-01 17:16:54.000000000 +0200
    +@@ -26,8 +26,8 @@
    +   shift
    + done
    + 
    +-uname=`uname -s`
    +-machine=`uname -m`
    ++uname=${UNAME_S:-`uname -s`}
    ++machine=${UNAME_M:-`uname -m`}
    + 
    + if [ "$sysname" = "" ]; then
    +   case $uname in
    +@@ -92,7 +92,7 @@
    + 	fi
    +       fi;;
    +     Linux)
    +-      release=`uname -r`
    ++      release=${UNAME_R:-`uname -r`}
    +       minor=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'`
    +       major=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
    +       
    diff --git a/net/dhcp/patches/110-omit-docs.patch b/net/dhcp/patches/110-omit-docs.patch
    new file mode 100644
    index 0000000..be078c0
    --- /dev/null
    +++ b/net/dhcp/patches/110-omit-docs.patch
    @@ -0,0 +1,159 @@
    +diff -urN dhcp-3.1.0.orig/client/Makefile.dist dhcp-3.1.0/client/Makefile.dist
    +--- dhcp-3.1.0.orig/client/Makefile.dist	2005-03-17 12:14:55.000000000 -0800
    ++++ dhcp-3.1.0/client/Makefile.dist	2008-06-12 01:12:58.000000000 -0700
    +@@ -35,7 +35,7 @@
    + CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS) \
    + 		-DCLIENT_PATH=${CLIENT_PATH}
    + 
    +-all:	$(PROG) $(CATMANPAGES)
    ++all:	$(PROG)
    + 
    + install: all
    + 	for dir in $(CLIENTBINDIR) $(ETC) $(FFMANDIR) $(ADMMANDIR) $(VARDB); \
    +@@ -58,14 +58,6 @@
    + 				$(DESTDIR)$(CLIENTBINDIR)/dhclient-script; \
    + 	  $(CHMOD) 700 $(DESTDIR)$(CLIENTBINDIR)/dhclient-script; \
    + 	fi
    +-	$(MANINSTALL) $(MANFROM) dhclient.$(MANCAT)8 $(MANTO) \
    +-			$(DESTDIR)$(ADMMANDIR)/dhclient$(ADMMANEXT)
    +-	$(MANINSTALL) $(MANFROM) dhclient-script.$(MANCAT)8 $(MANTO) \
    +-			$(DESTDIR)$(ADMMANDIR)/dhclient-script$(ADMMANEXT)
    +-	$(MANINSTALL) $(MANFROM) dhclient.conf.$(MANCAT)5 $(MANTO) \
    +-			$(DESTDIR)$(FFMANDIR)/dhclient.conf$(FFMANEXT)
    +-	$(MANINSTALL) $(MANFROM) dhclient.leases.$(MANCAT)5 $(MANTO) \
    +-			$(DESTDIR)$(FFMANDIR)/dhclient.leases$(FFMANEXT)
    + 
    + depend:
    + 	$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRCS)
    +diff -urN dhcp-3.1.0.orig/common/Makefile.dist dhcp-3.1.0/common/Makefile.dist
    +--- dhcp-3.1.0.orig/common/Makefile.dist	2005-03-17 12:14:56.000000000 -0800
    ++++ dhcp-3.1.0/common/Makefile.dist	2008-06-12 01:12:58.000000000 -0700
    +@@ -35,7 +35,7 @@
    + INCLUDES = -I$(TOP) $(BINDINC) -I$(TOP)/includes
    + CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
    + 
    +-all:	libdhcp.a $(CATMANPAGES)
    ++all:	libdhcp.a
    + 
    + libdhcp.a:	$(OBJ)
    + 	rm -f libdhcp.a
    +@@ -53,10 +53,6 @@
    + 	    fi; \
    + 	  done; \
    + 	done
    +-	$(MANINSTALL) $(MANFROM) dhcp-options.$(MANCAT)5 $(MANTO) \
    +-				$(DESTDIR)$(FFMANDIR)/dhcp-options$(FFMANEXT)
    +-	$(MANINSTALL) $(MANFROM) dhcp-eval.$(MANCAT)5 $(MANTO) \
    +-				$(DESTDIR)$(FFMANDIR)/dhcp-eval$(FFMANEXT)
    + 
    + depend:
    + 	$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
    +diff -urN dhcp-3.1.0.orig/dhcpctl/Makefile.dist dhcp-3.1.0/dhcpctl/Makefile.dist
    +--- dhcp-3.1.0.orig/dhcpctl/Makefile.dist	2005-03-17 12:15:02.000000000 -0800
    ++++ dhcp-3.1.0/dhcpctl/Makefile.dist	2008-06-12 01:13:51.000000000 -0700
    +@@ -34,7 +34,7 @@
    + DHCPCTLLIBS = libdhcpctl.a ../common/libdhcp.a $(BINDLIB) \
    + 		../omapip/libomapi.a ../dst/libdst.a
    + 
    +-all:	libdhcpctl.a omshell cltest $(CATMANPAGES)
    ++all:	libdhcpctl.a omshell cltest
    + 
    + omshell:	omshell.o $(DHCPCTLLIBS)
    + 	$(CC) $(DEBUG) $(LFLAGS) -o omshell omshell.o $(DHCPCTLLIBS) $(LIBS)
    +@@ -47,7 +47,7 @@
    + 	ar cruv libdhcpctl.a $(OBJ)
    + 	$(RANLIB) libdhcpctl.a
    + 
    +-install: all $(CATMANPAGES)
    ++install: all
    + 	for dir in $(LIBDIR) $(LIBMANDIR) $(INCDIR) $(USRMANDIR) \
    + 		$(USERBINDIR); do \
    + 	  foo=""; \
    +@@ -63,16 +63,8 @@
    + 	$(CHMOD) 644 $(DESTDIR)$(LIBDIR)/libdhcpctl.a
    + 	$(INSTALL) dhcpctl.h $(DESTDIR)$(INCDIR)
    + 	$(CHMOD) 644 $(DESTDIR)$(INCDIR)/dhcpctl.h
    +-	for man in $(MAN); do \
    +-	  prefix=`echo $$man |sed -e 's/\.[0-9]$$//'`; \
    +-	  suffix=`echo $$man |sed -e 's/.*\.\([0-9]\)$$/\1/'`; \
    +-	  $(MANINSTALL) $(MANFROM) $${prefix}.$(MANCAT)$${suffix} $(MANTO) \
    +-			$(DESTDIR)$(LIBMANDIR)/$${prefix}$(LIBMANEXT); \
    +-	done
    + 	$(INSTALL) omshell $(DESTDIR)$(USERBINDIR)
    + 	$(CHMOD) 755 $(DESTDIR)$(USERBINDIR)/omshell
    +-	$(MANINSTALL) $(MANFROM) omshell.$(MANCAT)1 $(MANTO) \
    +-				$(DESTDIR)$(USRMANDIR)/omshell$(USRMANEXT)
    + 
    + depend:
    + 	$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
    +diff -urN dhcp-3.1.0.orig/omapip/Makefile.dist dhcp-3.1.0/omapip/Makefile.dist
    +--- dhcp-3.1.0.orig/omapip/Makefile.dist	2005-03-17 12:15:20.000000000 -0800
    ++++ dhcp-3.1.0/omapip/Makefile.dist	2008-06-12 01:12:58.000000000 -0700
    +@@ -40,7 +40,7 @@
    + INCLUDES = $(BINDINC) -I$(TOP)/includes
    + CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
    + 
    +-all:	libomapi.a svtest $(CATMANPAGES)
    ++all:	libomapi.a svtest
    + 
    + svtest:	test.o libomapi.a $(BINDLIB) ../dst/libdst.a
    + 	$(CC) $(DEBUG) $(LFLAGS) -o svtest test.o $(BINDLIB) \
    +@@ -75,12 +75,6 @@
    + 						$(DESTDIR)$(INCDIR)/isc-dhcp; \
    + 	  $(CHMOD) 644 $(DESTDIR)$(INCDIR)/isc-dhcp/$$file; \
    + 	done
    +-	for man in $(MAN); do \
    +-	  prefix=`echo $$man |sed -e 's/\.[0-9]$$//'`; \
    +-	  suffix=`echo $$man |sed -e 's/.*\.\([0-9]\)$$/\1/'`; \
    +-	  $(MANINSTALL) $(MANFROM) $${prefix}.$(MANCAT)$${suffix} $(MANTO) \
    +-			$(DESTDIR)$(LIBMANDIR)/$${prefix}$(LIBMANEXT); \
    +-	done
    + 
    + depend:
    + 	$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
    +diff -urN dhcp-3.1.0.orig/relay/Makefile.dist dhcp-3.1.0/relay/Makefile.dist
    +--- dhcp-3.1.0.orig/relay/Makefile.dist	2005-03-17 12:15:24.000000000 -0800
    ++++ dhcp-3.1.0/relay/Makefile.dist	2008-06-12 01:12:58.000000000 -0700
    +@@ -33,7 +33,7 @@
    + DHCPLIB = ../common/libdhcp.a $(BINDLIB) ../omapip/libomapi.a ../dst/libdst.a
    + CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
    + 
    +-all:	$(PROG) $(CATMANPAGES)
    ++all:	$(PROG)
    + 
    + install: all
    + 	for dir in $(BINDIR) $(ADMMANDIR); do \
    +@@ -48,8 +48,6 @@
    + 	done
    + 	$(INSTALL) dhcrelay $(DESTDIR)$(BINDIR)
    + 	$(CHMOD) 755 $(DESTDIR)$(BINDIR)/dhcrelay
    +-	$(MANINSTALL) $(MANFROM) dhcrelay.$(MANCAT)8 $(MANTO) \
    +-				$(DESTDIR)$(ADMMANDIR)/dhcrelay$(ADMMANEXT)
    + 
    + depend:
    + 	$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRCS)
    +diff -urN dhcp-3.1.0.orig/server/Makefile.dist dhcp-3.1.0/server/Makefile.dist
    +--- dhcp-3.1.0.orig/server/Makefile.dist	2006-07-25 06:26:00.000000000 -0700
    ++++ dhcp-3.1.0/server/Makefile.dist	2008-06-12 01:12:58.000000000 -0700
    +@@ -35,7 +35,7 @@
    + DHCPLIB = ../common/libdhcp.a $(BINDLIB) ../omapip/libomapi.a ../dst/libdst.a
    + CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
    + 
    +-all:	$(PROG) $(CATMANPAGES)
    ++all:	$(PROG)
    + 
    + install: all
    + 	for dir in $(BINDIR) $(ADMMANDIR) $(FFMANDIR) $(VARDB); do \
    +@@ -50,12 +50,6 @@
    + 	done
    + 	$(INSTALL) dhcpd $(DESTDIR)$(BINDIR)
    + 	$(CHMOD) 755 $(DESTDIR)$(BINDIR)/dhcpd
    +-	$(MANINSTALL) $(MANFROM) dhcpd.$(MANCAT)8 $(MANTO) \
    +-			$(DESTDIR)$(ADMMANDIR)/dhcpd$(ADMMANEXT)
    +-	$(MANINSTALL) $(MANFROM) dhcpd.conf.$(MANCAT)5 $(MANTO) \
    +-			$(DESTDIR)$(FFMANDIR)/dhcpd.conf$(FFMANEXT)
    +-	$(MANINSTALL) $(MANFROM) dhcpd.leases.$(MANCAT)5 $(MANTO) \
    +-			$(DESTDIR)$(FFMANDIR)/dhcpd.leases$(FFMANEXT)
    + 	$(TOUCH) $(DESTDIR)$(VARDB)/dhcpd.leases
    + 	# Note file mode is hardcoded to mode 0664 in server/db.c (889).
    + 	$(CHMOD) 664 $(DESTDIR)$(VARDB)/dhcpd.leases
    diff --git a/net/dhcpcd/Makefile b/net/dhcpcd/Makefile
    new file mode 100644
    index 0000000..572f9a3
    --- /dev/null
    +++ b/net/dhcpcd/Makefile
    @@ -0,0 +1,41 @@
    +#
    +# Copyright (C) 2007-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=dhcpcd
    +PKG_VERSION:=3.0.17
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://download.berlios.de/dhcpcd/
    +PKG_MD5SUM:=e9100e53f64ca1f9fb0d392c3a623738
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/dhcpcd
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=IP Addresses and Names
    +  TITLE:=DHCP client for automatically configuring IPv4 networking
    +  URL:=http://roy.marples.name/projects/dhcpcd
    +endef
    +
    +define Package/dhcpcd/description
    +	Simple configuration: supports executions of a script when the
    +	IP address changes.
    +endef
    +
    +define Package/dhcpcd/install
    +	$(INSTALL_DIR) $(1)/sbin
    +	$(CP) $(PKG_INSTALL_DIR)/sbin/* $(1)/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,dhcpcd))
    +
    diff --git a/net/dhcpcd/patches/001-run_dir.patch b/net/dhcpcd/patches/001-run_dir.patch
    new file mode 100644
    index 0000000..cbb26ff
    --- /dev/null
    +++ b/net/dhcpcd/patches/001-run_dir.patch
    @@ -0,0 +1,11 @@
    +--- dhcpcd-3.0.17/pathnames.h.orig	2007-05-31 15:28:04.000000000 -0700
    ++++ dhcpcd-3.0.17/pathnames.h	2007-05-31 15:28:16.000000000 -0700
    +@@ -48,7 +48,7 @@
    + #define STATEDIR            "/var"
    + #define PIDFILE             STATEDIR "/run/" PACKAGE "-%s.pid"
    + 
    +-#define CONFIGDIR           STATEDIR "/lib/" PACKAGE
    ++#define CONFIGDIR           STATEDIR "/run/" PACKAGE
    + #define INFOFILE            CONFIGDIR "/" PACKAGE "-%s.info"
    + 
    + #endif
    diff --git a/net/dircproxy/Makefile b/net/dircproxy/Makefile
    new file mode 100644
    index 0000000..6896637
    --- /dev/null
    +++ b/net/dircproxy/Makefile
    @@ -0,0 +1,37 @@
    +#
    +# Copyright (C) 2006,2007 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=dircproxy
    +PKG_VERSION:=1.2.0-RC1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://dircproxy.googlecode.com/files/
    +PKG_MD5SUM:=4fe2e82619c7b575599bfb236adbd872
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/dircproxy
    +  SUBMENU:=Instant Messaging
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=An IRC proxy server
    +  URL:=http://dircproxy.googlecode.com/
    +endef
    +
    +# uses Build/Configure/Default
    +
    +define Package/dircproxy/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dircproxy{,-crypt} $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,dircproxy))
    diff --git a/net/ditg/Makefile b/net/ditg/Makefile
    new file mode 100644
    index 0000000..bed7b96
    --- /dev/null
    +++ b/net/ditg/Makefile
    @@ -0,0 +1,62 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ditg
    +PKG_VERSION:=2.7.0
    +PKG_RELEASE:=Beta2
    +
    +PKG_SOURCE:=D-ITG-${PKG_VERSION}-${PKG_RELEASE}.zip
    +PKG_SOURCE_URL:=http://www.grid.unina.it/software/ITG/codice/
    +PKG_MD5SUM:=6cf5f1a16283cff8297521ec4093df7f
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/D-ITG-${PKG_VERSION}-${PKG_RELEASE}
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/ditg/Default
    +  TITLE:=D-ITG (Distributed Internet Traffic Generator)
    +  SECTION:=net
    +  CATEGORY:=Network
    +  URL:=http://www.grid.unina.it/software/ITG/
    +  MAINTAINER:=Giovanni Di Stasi 
    +  DEPENDS:= +libpcap +libstdcpp
    +endef
    +
    +define Package/ditg/Default/description
    +  D-ITG (Distributed Internet Traffic Generator) is a platform capable
    +  to produce traffic at packet level accurately replicating appropriate
    +  stochastic processes for both IDT (Inter Departure Time) and PS
    +  (Packet Size) random variables (exponential, uniform, cauchy, normal,
    +  pareto, ...). D-ITG supports both IPv4 and IPv6 traffic generation and
    +  it is capable to generate traffic at network, transport, and
    +  application layer. We believe that D-ITG shows interesting properties
    +  when compared to other traffic generators.
    +endef
    +
    +define Package/ditg
    +  $(call Package/ditg/Default)
    +endef
    +
    +# uncomment for arm targets
    +#EXTRA_FLAGS=" arm=on "
    +
    +define Build/Compile
    +	$(MAKE) \
    +		CXX="$(TARGET_CXX)" \
    +		CXXOPT="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
    +		-C $(PKG_BUILD_DIR)/src $(EXTRA_CFLAGS)
    +endef
    +
    +define Package/ditg/install
    +	$(INSTALL_DIR) $(1)/usr/bin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{ITGSend,ITGRecv,ITGLog,ITGDec}  \
    +		       $(1)/usr/bin
    +endef
    +
    +$(eval $(call BuildPackage,ditg))
    diff --git a/net/ditg/patches/001-no_stropts.h b/net/ditg/patches/001-no_stropts.h
    new file mode 100644
    index 0000000..442f83a
    --- /dev/null
    +++ b/net/ditg/patches/001-no_stropts.h
    @@ -0,0 +1,11 @@
    +--- D-ITG-2.7.0-Beta2/src/common/serial.cpp	2009-05-24 10:48:18.000000000 +0200
    ++++ D-ITG-2.7.0-Beta2.new/src/common/serial.cpp	2010-03-21 17:22:54.000000000 +0100
    +@@ -84,7 +84,7 @@
    + #include 
    + #include 
    + #if !defined(BSD) && !defined(ARM)
    +-#include 
    ++//#include 
    + #endif
    + #include 
    + #include 
    diff --git a/net/djbdns/Changelog b/net/djbdns/Changelog
    new file mode 100644
    index 0000000..2fcd471
    --- /dev/null
    +++ b/net/djbdns/Changelog
    @@ -0,0 +1,43 @@
    +#Changelog for the djbdns port for OpenWRT
    +
    +5 20090522 jhalfmoon
    +enhancement - added patch: dnsroots_updated
    +enhancement - added patch: tinydns_one_second
    +enhancement - added patch: srv-records-and-axfrget
    +enhancement - added patch: dnscache_less_chatty_log
    +enhancement - added patch: tinydns_mmap_leak
    +enhancement - added patch: dnscache_dpos_tcp_servfail
    +enhancement - added patch: dnscache_negative_ttls
    +enhancement - added patch: dnscache_sigpipe_fix
    +enhancement - added patch: dnscache_big_udp_packets
    +enhancement - added patch: dnscache_ignoreip2 (Note: disabled in config by default!)
    +enhancement - added HIDETTL config option
    +change - Corrected a typo in the axfrdns description in the Makefile.
    +change - Cleaned up some lines in the Makefile
    +change - dnsroots.global now gets copied from the djbdns source folder instead of from the package/files folder.
    +change - The dnscache-multiple-ip patch was removed as it served no purpose
    +change - Renamed a few patches to be more consistent with the other patches
    +change - Updated the README file to reflect the changes 
    +
    +4 20090418 jhalfmoon
    +bugfix - The dnscache postinst script had a bug that prevented djbdns from being compiled into a firmware image.
    +bugfix - The dnscache startup script now uses /dev/urandom instead of /dev/random as a source of randomness. Using /dev/random does not work on 2.6 kernels.
    +bugfix - dnscache no longer tries to use /tmp/resolv.conf.auto but /etc/resolv.conf instead. This only applies when useresolvconf==1.
    +change - In menuconfig: djbdns moved from network to network/DNS 
    +change - Removed the dnscache postinst script to the dnscache startup script. The script configures dnscache to accept connections from certain local network adresses.
    +change - The dnscache startup script was cleaned up a bit. 
    +change - default logging level is now info instead of notice.
    +enhancement - Added option to add list of resolvers to UCI config for use in forwardonly mode. Two OpenDNS example addresses are added as a default.
    +
    +3 20090409 jhalfmoon
    +bugfix - The restart routines of all scripts were broken causing restart to fail
    +bugfix - dnsqrx was broken, script accidentally relied on bash instead of sh
    +
    +2 20090406 jhalfmoon
    +bugfix - dnscache init script did not correctly handle /tmp/resolv.conf.auto
    +enhancement - Addded the dnsqr command from http://homepages.tesco.net/~J.deBoynePollard/Softwares/djbdns/dnsqrx
    +change - Default dnscache CACHESIZE was set too low, was 200KB, is now 1MB
    +change - Added list of patches and made some overall adjustments to the README
    +
    +1 20090404 jhalfmoon
    +Initial release
    diff --git a/net/djbdns/Makefile b/net/djbdns/Makefile
    new file mode 100644
    index 0000000..2dae095
    --- /dev/null
    +++ b/net/djbdns/Makefile
    @@ -0,0 +1,204 @@
    +# Copyright (C) 2007 OpenWrt.org
    +# Original port by FreeWRT project.
    +#
    +# 2007     Alexander Tsvyashchenko  Adapted FreeWRT port for OpenWRT (Trac ticket 2497)
    +# 2008     Some Danish guy          Created a port for OpenWRT 7.09
    +# 20090403 jhalfmoon                Modified and augmented existing packages to work on OpenWRT buildroot (v8.09)
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=djbdns
    +PKG_VERSION:=1.05
    +PKG_RELEASE:=5
    +
    +PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
    +PKG_SOURCE_URL:=http://cr.yp.to/djbdns/
    +PKG_MD5SUM:=3147c5cd56832aa3b41955c7a51cbeb2
    +PKG_BUILD_DEPENDS:=daemontools ucspi-tcp
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/djbdns/Default
    +  SECTION:=net
    +  CATEGORY:=Network
    +  URL:=http://cr.yp.to/djbdns.html
    +  SUBMENU:=IP Addresses and Names
    +#  SUBMENU:=djbdns
    +endef
    +
    +define Package/djbdns-base
    +  $(call Package/djbdns/Default)
    +  TITLE:=djbdns base configuration file
    +endef
    +
    +define Package/djbdns-dnscache
    +  $(call Package/djbdns/Default)
    +  TITLE:=Recursive and forwarding caching name server
    +  DEPENDS:= +djbdns-base
    +endef
    +
    +define Package/djbdns-tinydns
    +  $(call Package/djbdns/Default)
    +  TITLE:=Authoritative name server
    +  DEPENDS:= +djbdns-base
    +endef
    +
    +define Package/djbdns-axfrdns
    +  $(call Package/djbdns/Default)
    +  TITLE:=Zone transfer server
    +  DEPENDS:= +djbdns-base +djbdns-tinydns +ucspi-tcp
    +endef
    +
    +define Package/djbdns-rbldns
    +  $(call Package/djbdns/Default)
    +  TITLE:=Real-time Block List name server
    +  DEPENDS:= +djbdns-base
    +endef
    +
    +define Package/djbdns-walldns
    +  $(call Package/djbdns/Default)
    +  TITLE:=Reverse DNS wall
    +  DEPENDS:= +djbdns-base
    +endef
    +
    +define Package/djbdns-tools
    +  $(call Package/djbdns/Default)
    +  TITLE:=Tools for testing and debugging DNS issues
    +endef
    +
    +define Package/djdbns/description
    +	djbdns is a collection of Domain Name System tools.
    +       	It includes software for all the fundamental DNS operations: 
    +	* DNS server: publishing addresses of Internet hosts.
    +	* DNS cache: finding addresses of Internet hosts.
    +	* DNS client: talking to a DNS cache.
    +	        
    +	Also included is a DNS client C library, several command-line
    +       	DNS client utilities, several DNS debugging tools.
    +endef
    +
    +define Package/djbdns-base/description
    +	The shared config file for the djbdns daemons.
    +endef
    +
    +define Package/djbdns-dnscache/description
    +	dnscache is a DNS cache.
    +       	It accepts recursive DNS queries from local clients such as web
    +       	browsers and mail transfer agents. It collects responses from
    +	remote DNS servers. It caches the responses to save time later. 
    +endef
    +
    +define Package/djbdns-tinydns/description
    +	tinydns is a DNS server.
    +	It accepts iterative DNS queries from hosts around the Internet
    +       	and responds with locally configured information. 
    +endef
    +
    +define Package/djbdns-axfrdns/description
    +	axfrdns is a DNS zone-transfer server.
    +	It reads a zone-transfer request in DNS-over-TCP format
    +       	from its standard input and responds with locally configured
    +	information. 
    +endef
    +
    +define Package/djbdns-rbldns/description
    +	rbldns is an IP-address-listing DNS server.
    +	It accepts iterative DNS queries from hosts around the Internet asking
    +       	about various IP addresses. It provides responses showing whether the
    +	addresses are on a locally configured list, such as RBL or DUL. 
    +endef
    +
    +define Package/djbdns-walldns/description
    +	walldns is a reverse DNS wall.
    +	It accepts iterative DNS queries for in-addr.arpa domains from hosts
    +       	around the Internet and supplies generic responses that avoid
    +	revealing local host information. 
    +endef
    +
    +define Package/djbdns-tools/description
    +	Several command-line DNS client utilities and DNS debugging tools.
    +endef
    +
    +define Build/Compile
    +	TARGET_CC="$(TARGET_CC)" \
    +	TARGET_CFLAGS="$(TARGET_CFLAGS)" \
    +	TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
    +	TARGET_RANLIB="$(TARGET_CROSS)ranlib" \
    +	$(MAKE) -C $(PKG_BUILD_DIR)
    +endef
    +
    +define Package/djbdns-base/install
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_DATA) ./files/djbdns.conf $(1)/etc/config/djbdns
    +endef
    +
    +define Package/djbdns-dnscache/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	(cd $(PKG_BUILD_DIR); \
    +	$(INSTALL_BIN) dnscache pickdns pickdns-data $(1)/usr/bin)
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/dnscache.init $(1)/etc/init.d/dnscache
    +	$(CP) -r ./files/dnscache $(1)/etc/
    +	$(CP) $(PKG_BUILD_DIR)/dnsroots.global $(1)/etc/dnscache/
    +	$(INSTALL_DIR) $(1)/etc/dnscache/ip
    +	$(INSTALL_DIR) $(1)/etc/dnscache/servers
    +	$(CP) $(PKG_BUILD_DIR)/dnsroots.global $(1)/etc/dnscache/servers/@
    +endef
    +
    +define Package/djbdns-tinydns/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	(cd $(PKG_BUILD_DIR); \
    +	$(INSTALL_BIN) tinydns tinydns-data tinydns-edit tinydns-get $(1)/usr/bin)
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/tinydns.init $(1)/etc/init.d/tinydns
    +	$(CP) -r ./files/tinydns $(1)/etc/
    +endef
    +
    +define Package/djbdns-axfrdns/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	(cd $(PKG_BUILD_DIR); \
    +	$(INSTALL_BIN) axfrdns axfr-get $(1)/usr/bin)
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/axfrdns.init $(1)/etc/init.d/axfrdns
    +	$(CP) -r ./files/axfrdns $(1)/etc/
    +endef
    +
    +define Package/djbdns-rbldns/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	(cd $(PKG_BUILD_DIR); \
    +	$(INSTALL_BIN) rbldns rbldns-data $(1)/usr/bin)
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/rbldns.init $(1)/etc/init.d/rbldns
    +	$(CP) -r ./files/rbldns $(1)/etc/
    +endef
    +
    +define Package/djbdns-walldns/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	(cd $(PKG_BUILD_DIR); \
    +	$(INSTALL_BIN) walldns $(1)/usr/bin)
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/walldns.init $(1)/etc/init.d/walldns
    +endef
    +
    +define Package/djbdns-tools/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	(cd $(PKG_BUILD_DIR); \
    +	$(INSTALL_BIN) dnsfilter dnsip dnsipq dnsmx dnsname dnsnamex dnsq \
    +                       dnsqr dnstrace dnstracesort dnstxt random-ip \
    +	$(1)/usr/bin)
    +	$(INSTALL_BIN) ./files/dnsroots-update $(1)/usr/bin/
    +	$(INSTALL_BIN) ./files/dnsqrx $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,djbdns-base))
    +$(eval $(call BuildPackage,djbdns-tinydns))
    +$(eval $(call BuildPackage,djbdns-dnscache))
    +$(eval $(call BuildPackage,djbdns-axfrdns))
    +$(eval $(call BuildPackage,djbdns-rbldns))
    +$(eval $(call BuildPackage,djbdns-walldns))
    +$(eval $(call BuildPackage,djbdns-tools))
    +
    diff --git a/net/djbdns/README b/net/djbdns/README
    new file mode 100644
    index 0000000..a6e5921
    --- /dev/null
    +++ b/net/djbdns/README
    @@ -0,0 +1,319 @@
    +
    +# 20090409 jhalfmoon@milksnot.com - Don't hesitate to let me know if you decide to use it and/or what you think of it.
    +
    +This is a port of djbdns for OpenWRT (>= v8.09). Features:
    +
    +- works with the most current buildroot
    +- makes use of the UCI configuration system
    +- components are seperately packaged to minimize package footprint
    +- most of the popular and necessary available patches are applied
    +- documentation available (you're reading it)
    +
    +The djbdns package is a set of compact, reliable and fast DNS daemons and tools. This port is based on the work done by a few other people:
    +
    +- The FreeWRT project
    +- Alexander Tsvyashchenko - https://dev.openwrt.org/ticket/2497
    +- Some anonymous (Danish?) person - https://dev.openwrt.org/ticket/3837
    +
    +Using the previous work as a base, time went into rewriting the Make file, adding patches, adding the config system and writing this documentation. The ucspi-tcp and daemontools packages were not touched; they work just fine in the state they were found on OpenWRT TRAC.
    +
    +The following document meant to give some useful information about this package. You do not need to know all of the following to install or compile this package; it is only meant as an addition to help potential users on their way. An installation could theoretically be as simple as: "opkg install dnscache.ipk ; /etc/init.d/dnscache start". To find more about the workings of djbdns, visit:
    +
    +http://cr.yp.to/djbdns.html
    +
    +On the following sites you can find even more info, including text about the patches included in this package:
    +
    +http://www.lifewithdjbdns.com/
    +http://www.thedjbway.org/djbdns/resources.html
    +http://www.fefe.de/djbdns/
    +http://homepages.tesco.net/~J.deBoynePollard/FGA/#DNS
    +http://binarios.com/miscnotes/djbdns.html
    +http://web.archive.org/web/20061013054303/http://ezine.daemonnews.org/200210/ezdjbdns.html
    +
    +Some info about the bugfixes:
    +
    +http://www.securityfocus.com/archive/1/501294/30/0/threaded
    +http://www.your.org/dnscache/
    +
    +How to build
    +============
    +- copy the folders djbdns, ucspi-tcp (and optionally daemontools) to your buildroot/package directory 
    +- make menuconfig
    +- select the packages under network/DNS/djbdns and network/ucspi-tcp (and optionally network/daemontools)
    +- make
    +- after compilation, the package can be found at bin/packages/
    +- now do what you normally do to install self-compiled packages on your OpenWRT machine
    +
    +If you wish to tinker with the code, then here are some useful commands to run in the buildroot:
    +    rm -rf build_dir//djbdns-1.05
    +    make package/cleanup
    +    make package/djbdns/compile V=99
    +    make package/index
    +Once you have done a "make menuconfig;make" you can use these commands to quickly rebuild only the djbdns package.
    +
    +Usage pointers
    +==============
    +- After installation, you can make the servers start automatically on boot by running "/etc/init.d/ enable" . The script will then appear in the /etc/rc.d directory. This is standard OpenWRT functionality.
    +- All djbdns parameters are stored in the UCI configuration system. Run "uci show djbdns" to see the settings. Data files are not implemented in the UCI system, so these files must be manually backed up when and if you intend to do a sysupgrade (=reflash the firmware). Those files include: dnscache dnsroot.global, dnscache @ file, tinydns data file, axfrdns tcp file, rbldns data file, each in their individual directories in /etc.
    +- Each package is ready to run out-of-the-box, once installed. The default settings allow you to start playing immediately. The defaults are reasonably secure, but do not take my word for it. Verify it. Note: dnscache has two default example resolver IP addresses. The two default addresses are the OpenDNS resolvers, which might work at the moment, but this may change in the future.
    +- You will most likely want to customize the settings for each seperate service you wish to use. Read the docs on the weblinks listed above for pointers on how to do so.
    +- The ucspi-tcp package is only needed if you wish to install and run axfrdns.
    +- The daemontools package is strictly optional. It is in no way linked to the djbdns package (yet). It is just there for you to play with.
    +- Starting the init.d scripts from the command line with the environment variable DEBUG set to 1 will prevent the servers from daemonizing and show the servers's log dumped to stdout / stderr instead of /dev/null. Example: "DEBUG=1 /etc/init.d/dnscache start"
    +- By default, all logging is disabled. Each daemon has a seperate option to activate logging. When logging activated the daemon logs to syslog using facility local1.info.
    +- Each djbdns server requires an IP address on which to listen on. This port of djbdns allows you to define an interface on which to listen instead of an IP address. The advantage of this is that an interface can get a different IP address assigned, the djbdns stuff will not break. The dnscache server has a patch applied so that it is possible to define multiple interfaces on which to listen, separated by slashes. Example: wan/lan .
    +- By default, dnscache acts as a recursive name server. If you wish to operate in forwardonly mode, then you need to set the forwardonly flag to '1'. Then you need to do either one of the following: Put the ip addresses of the name servers you wish to use as resolvers in the UCI config (djbdns.dnscache.resolver) or alternatively you can set the useresolvconf flag which will cause the dns servers assigned by dhcp to be used. That last option is a so called set-and-forget mode which will work quite well in most home environments.
    +- If you want your OpenWRT machine to make use of its own dnscache, then you must make /etc/resolv.conf reflect this. One way of doin this is as follows: uci set network.wan.dns=127.0.0.1 . If you have dnscache listening on some other interface, you would naturally replace 127.0.0.1 by the address of that interface.
    +- OpenWRT has several applications that can do DNS serving in one way or another (dnsmasq, Maradns, Bind). Make sure you have none of these apps running when you start running a djbdns name server because having two DNS apps listening on the same address is not something you would usually want. A patch for the dnsmasq configuration script and its config file is included with this package. The patch will allow you to configure dnsmasq to listen only on certain interfaces, instead of on all them as it does by default on OpenWRT. Alternatively, you could completely disable and / or remove dnsmasq, if you do not intend to use any of its functionality (which is serving DNS and DHCP).
    +- The ignoreip patch also has a script supplied along with it, with which you can update the ignorelist. The script contains an explanation of why you might want to do this.
    +- The ignoreip functionality is disabled by default. If you want to activate it, you need to set the flag 'useignore' flag to '1' in the config. You might also want to check if you are really blocking what you want to block. Be careful with this feature. Think twice before using it.
    +
    +To apply the dnsmasq patch
    +==========================
    +NOTE: This patch has been incorporated into OpenWRT trunk per 20090409 as seen in https://dev.openwrt.org/ticket/4900 and https://dev.openwrt.org/changeset/15172.
    +
    +This is a patch to allow you to use dnsmasq alongside dnscache. It will allow you to configure dnsmasq to listen only on certain interfaces, instead of on all them as it does by default on OpenWRT. It only patches the startup script and configuration file of dnsmasq, not dnsmasq itself. If you need or desire to apply the patch yourself, then there are two possible ways to go about it:
    +
    +Patch the dnsmasq package source:
    +- cd to svn/openwrt/branches/8.09/packages/dnsmasq/files
    +- do 'patch < dnsmasq.patch
    +- if all went well you can now compile the package as you nomally would
    +- you can now either reinstall dnsmasq on your router or re-flash the firmware image. If you reinstall the dnsmasq package then you waste some flash memory, as dnsmasq is usually already included as a part of the firmware image. One way to reinstall the dnsmasq package is to use SSH to upload the image to the router and do: opkg update ; opgk install -force-reinstall dnsmasq.ipk . Or you could configure your OpenWRT build machine as an http server that serves OpenWRT packages and then configure opkg to use your server as an ipkg repository. This is generally a pretty good idea if you are building your own firmware and packages.
    +
    +Alternatively, you can patch the dnsmasq files on the router itself:
    +Look at the patch file and manually patch the files on the router. There are only four lines to modify, so it is not hard.
    +
    +NOTE: The dnsmasq paramaters added by this patch are not shown on the Luci webinterface. You will manually have to configure dnsmasq. An example of how to make dnsmasq serve DNS and DHCP only on the lan:
    +uci set dhcp.@dnsmasq[0].nonwildcard=1
    +uci set dhcp.@dnsmasq[0].interfaces=br-lan
    +uci commit
    +This will prevent dnsmasq from binding to the wildcard IP address and instead make it listen on the designated (lan) interface. You are then free to run a DNS server on, for example, the loopback and/or the wan interface.
    +
    +Assorted notes
    +==============
    +- This port was put together with reasonable care. It is not a dirty hack, but that is ofcourse a very subjective statement.
    +- It was created on and for Kamikaze 8.09 with both a 2.4 and a 2.6 kernel. It was not tested to work on older versions of OpenWRT, but it might.
    +- This package will build into several packages. Most of the packages rely on the package djbdnsbase. It contains the shared config data for all daemons. It should automatically get installed along with the daemons by opkg.
    +- The ucspi-tcp package is a requirement for installing axfrdns. If you don't user afrxdns, you won't need to install ucspi-tcp.
    +- The daemontool package is supplied as a part of this port, but it is not needed or used by anything in the djbdns packages. It is included in case anyone feels the want or need to make use of it.
    +- Among the applied patches are the latest (as of the 2nd of april 2009) notorious bug fixes for dnscache.
    +- Most patches are vanilla, ie. unmodified as they can be found on the net. The only patch modified is the djbdns-1.05-slogging patch, which was merged with the server-1.05-nxdomain-logging patch.
    +- The dnscache gets a patch applied to be able to listen on multiple IP addresses. Tinydns is not patched to have that functionality, although the patch for that is available on the net.
    +- dnscache is also patched to deliver additional statistics in its log files, including hits/misses and what types of records were queried. These can be used to monitor and/or graph the behaviour of your dnscache server.
    +- The dnscache package gets configured to listen to 127.0.0.1 and the lan subnet by default. See "ls /etc/dnscache/ip" and  "uci show djbdns|grep dnscache" .
    +- tinydns, axfrdns and rbldns include example data files that are installed by default. Their purpose is to ease installation and testing of the packages and to act as a guide to people who are not familiar with these applications. 
    +- The dnstools part of this package contains a script called dnsroots-update with which you can update the global root file. This is quite useful because IP addresses of the root servers change now and then, although not very often. I seems that few people actually bother to update the global roots file once they have installed dnscache. It is important to run the update script every now and them, or at least at installation time. Do the following to update the list: dnsroots-update > /etc/dnscache/dnsroots.global and then copy the file dnsroots.global to /etc/dnscache/server/@ . The dnstools package is quite large (400K installed) for an embedded system. What you could do instead of running the update script on the router, is to install the djbdns package on some big machine and run the script on there and then copy the output to the dnsroots file on the router. The dnsroots.global file included in this package is up to date as per the date of this writing (2nd of april 2009).
    +
    +Testing the installation
    +========================
    +The following may ease any debugging you might wish/need to do:
    +- Set the syslog buffer to something like 64K or more and make it log to IP address localhost (reboot to activate the changes):
    +    uci set system.@system[0].log_ip=127.0.0.1
    +    uci set system.@system[0].log_size=64
    +    uci commit
    +- Use "logread|less" to browse through the buffered syslog output.
    +- For realtime log monitoring: Install netcat and make it listen to the syslog output:
    +    opkg install netcat
    +    netcat -ulp 514
    +
    +This paragraph gives a few brief pointers on how to test your installation. The general idea is as follows: Log in to the OpenWRT machine using two seperate SSH sessions or a single session and then use 'screen' to gain multiple sessions. In the first session you have to start the daemon you wish to test. In the second session you run the diagnostic commands. In the following examples, for each daemon and each diagnostic tool, I have supplied the commandline and the expected, approximate output.
    +
    +NOTE1: Make sure no other DNS servers are running. Check with "netstat -an|grep 53" and/or do a "killall dnsmasq" just to be sure.
    +NOTE2: dnscache requires an active internet connection it to work
    +NOTE3: In the following examples, the servers were running on IP address 10.1.1.2
    +NOTE4: Most of these tests require the dnstools package to be installed
    +
    +-dnscache
    +session1 "DEBUG=1 /etc/init.d/dnscache start"
    +        Starting Caching nameserver: dnscachelistening on 0a010102
    +        starting
    +        
    +session2 "DNSCACHEIP=$yourwanip dnsqr a example.com"  (note: you do no have to modify /etc/resolv.conf to use this command)
    +        1 example.com:
    +        45 bytes, 1+1+0+0 records, response, noerror
    +        query: 1 example.com
    +        answer: example.com 172800 A 208.77.188.166
    +session2 "dnsip example.com" (note: /etc/resolv.conf must point to the address on which dnscache is listening)
    +        208.77.188.166
    +session2 "nslookup example.com" (note: /etc/resolv.conf must point to the address on which dnscache is listening)
    +        Server:    10.1.1.2
    +        Address 1: 10.1.1.2
    +        Name:      example.com
    +        Address 1: 208.77.188.166 www.example.com
    +
    +-tinydns
    +session1 "DEBUG=1 /etc/init.d/tinydns start"
    +        Starting Authoritative nameserver: tinydnsstarting tinydns
    +        0a010102:4eee:fdd8 + 0001 example.net
    +        stats 1 1 0 0 0 0 0
    +session2 "dnsq a example.net $yourwanip"
    +        1 example.net:
    +        79 bytes, 1+0+1+0 records, response, authoritative, noerror
    +        query: 1 example.net
    +        authority: example.net 2560 SOA ns.example.net hostmaster.example.net 1238703484 16384 2048 1048576 2560
    +
    +-axfrdns
    +session1 "DEBUG=1 /etc/init.d/axfrdns start"
    +        Starting Zone transfer name server: tcpservertcpserver: status: 0/10
    +        tcpserver: status: 1/10
    +        tcpserver: pid 1140 from 10.1.1.2
    +        tcpserver: ok 1140 0:10.1.1.2:53 :10.1.1.2::1034
    +        0a010102:040a:0000 0006 example.net
    +        tcpserver: end 1140 status 0
    +        tcpserver: status: 0/10
    +session2 "tcpclient -RHl0 $yourwanip 53 axfr-get example.net /tmp/zone /tmp/zone.tmp"
    +        The file /tmp/zone should now contain the example.net zone in tinydns-data format.
    +
    +-rbldns
    +session1 "DEBUG=1 /etc/init.d/rbldns start"
    +        Starting Reverse DNS wall: rbldnsstarting rbldns
    +        0a010102:881d:01ca + 0010 8.4.2.1.test
    +        stats 1 1 0 0 0 0 0
    +        0a010102:674a:e70f N 0010 9.4.2.1.test
    +session2 "dnsq txt 8.4.2.1.test $yourwanip"
    +        16 8.4.2.1.test:
    +        59 bytes, 1+1+0+0 records, response, authoritative, noerror
    +        query: 16 8.4.2.1.test
    +        answer: 8.4.2.1.test 2048 16 \020www.somesite.com
    +session2 "dnsq txt 9.4.2.1.test $yourwanip"
    +        16 9.4.2.1.test:
    +        30 bytes, 1+0+0+0 records, response, authoritative, nxdomain
    +        query: 16 9.4.2.1.test
    +
    +-walldns
    +session1 "DEBUG=1 /etc/init.d/walldns start"
    +        Starting Reverse DNS wall: walldnsstarting walldns
    +        0a010102:7b76:3d97 + 0001 4.3.2.1.in-addr.arpa
    +        stats 1 1 0 0 0 0 0
    +session2 "dnsq a 4.3.2.1.in-addr.arpa $yourwanip"
    +        1 4.3.2.1.in-addr.arpa:
    +        54 bytes, 1+1+0+0 records, response, authoritative, noerror
    +        query: 1 4.3.2.1.in-addr.arpa
    +        answer: 4.3.2.1.in-addr.arpa 655360 A 1.2.3.4
    +
    +axfrdns defaults
    +================
    +axfrdns is run using tcpserver from the ucspi-tcp package. The following parameters are used to start the tcpserver daemon (which runs as root BTW):
    +-D: Never delay sending data; enable TCP_NODELAY.
    +-R: Do not attempt to obtain $TCPREMOTEINFO from the remote host. To avoid loops, you must use this option for servers on TCP ports 53 and 113.
    +-H: Do not look up the remote host name in DNS; remove the environment variable $TCPREMOTEHOST. To avoid loops, you must use this option for servers on TCP port 53. 
    +-l localname: Do not look up the local host name in DNS; use localname for the environment variable $TCPLOCALHOST. A common choice for localname is 0. To avoid loops, you must use this option for servers on TCP port 53. 
    +-c n (=40): Do not handle more than n simultaneous connections. If there are n simultaneous copies of prog running, defer acceptance of a new connection until one copy finishes. n must be a positive integer. Default: 40. 
    +-b n (=10): Allow a backlog of approximately n TCP SYNs. On some systems, n is silently limited to 5. On systems supporting SYN cookies, the backlog is irrelevant. 
    +
    +In debug mode and when logging is activated, the following parameter is also active:
    +-v: Verbose. Print error messages and status messages.
    +
    +Applied patches
    +===============
    +crosscompile.patch
    +https://dev.openwrt.org/ticket/2497
    +Patch to make djbdns compile correctly for OpenWRT. I understand that the original patch comes from FreeWRT and was adapted for OpenWRT by Alexander Tsvyashchenko.
    +
    +dnsroots-update.patch
    +Update the dnsroots.global file to be current.
    +
    +srv-records-and-axfrget.patch
    +http://sol.truespace.ca/Files/djbdns/srv.patch
    +Adds native support for srv records (not really necessary) and also patches axfr-get to decompose SRV and PTR records and write them out in native format, rather than opaque. This last thing is needed to fix a possible problem with tinydns-data.
    +
    +dnscache_less_chatty_log
    +http://sol.truespace.ca/Files/djbdns/log.patch
    +Makes dnscache log "stat" entries no more than once per 5 seconds.
    +
    +tinydns_mmap_leak
    +http://marc.info/?l=djbdns&m=116399640808774&w=2
    +This fixes the following: In the original code if cdb_read encountered an error it returned an error code and the calling function exited without closing the cdb data file resulting in an fd leak, eventually leading to a 'too many files open' error.
    +
    +dnscache_big_udp_packets
    +http://marc.info/?l=djbdns&m=122368590802063&w=2
    +Patch to support oversized UDP packets up to 4096 bytes in length, while still correctly truncating responses over 512 bytes when sending them to stub resolvers.
    +
    +dnscache_dpos_tcp_servfail
    +http://marc.info/?l=djbdns&m=119998909915985&w=3
    +Fixes broken tcp dns queries in certain situations. For example: A vanilla 1.05 will fail on "dnstxt aol.com aol.com".
    +
    +dnscache-cache-negatives
    +http://sol.truespace.ca/Files/djbdns/nxdomain.patch
    +Add support for caching of unsuccessful lookup results.
    +
    +tinydns_one_second
    +http://www.tinydns.org/one-second.patch
    +Causes tinydns to keep its mmap() of the data.cdb file open for at most one second, instead of the default one hundred queries. This improves throughput on high traffic machines.
    +
    +dnscache-cachestats.patch
    +http://romana.now.ie/#djbdns-cachestats
    +This patch modifies the dnscache program to keep a counter of cache hits and cache misses. Two new fields are added to the stats output line: the fifth number is the number of cache hits; the sixth number is the number of cache misses.
    +
    +compiler-temporary-filename.patch
    +http://homepages.tesco.net/~J.deBoynePollard/Softwares/djbdns/#compiler-temporary-filename
    +A bit of a nit-picky patch that adjusts the names of generated temorary files to be more 'correct'. A bit silly really.
    +
    +dnscache-multiple-ip.patch
    +http://danp.net/djbdns/patches.html
    +When applied, dnscache will accept a /-delimited list of IP address in $IP and bind to each in turn. NOTE: This patch is only really useful on embedded systems with very limited memory. On big systems, ther are other ways to achieve listening on multiple IP adresses. You can read more on that over here: http://www.faqts.com/knowledge_base/view.phtml/aid/9644/fid/699
    +
    +dnsnamex-extra-command.patch
    +http://homepages.tesco.net/~J.deBoynePollard/Softwares/djbdns/#dnsnamex
    +Not really a patch, but an extra command. dnsnamex prints all of the domain names that the IP address supplied to it maps to, on a single line.
    +
    +dnscache-cname-handling.patch
    +http://homepages.tesco.net/~J.deBoynePollard/FGA/#DNS
    +Fixes mis-handling of client-side aliases
    +
    +dnscache-strict-forwardonly.patch
    +http://homepages.tesco.net/~J.deBoynePollard/Softwares/djbdns/#dnscache-strict-forwardonly
    +This patch modifies the behaviour of dnscache such that "forwardonly" mode is fully enforced.
    +
    +dnscacheip-space-separator.patch
    +http://homepages.tesco.net/~J.deBoynePollard/FGA/djbdns-problems.html#dnscacheip-separator-character
    +Patch to change the separator in ${DNSCACHEIP} to the space character
    +
    +tinydns-data-semantic-error.patch
    +http://homepages.tesco.net/~J.deBoynePollard/FGA/djbdns-problems.html#tinydns-data-semantic-error
    +Fixes the fact that stock tinydns-data doesn't handle semantic errors in its input
    +
    +tinydns-alias-chain-truncation.patch
    +http://homepages.tesco.net/~J.deBoynePollard/FGA/djbdns-problems.html#tinydns-alias-chain-truncation
    +Fixes truncation of alias chains by tinydns and axfrdns
    +
    +dnscache-slogging.patch
    +http://www.ohse.de/uwe/patches.html
    +Patch to enable statistics logging of queried resource records.
    +This patch is merged with the patch server-1.05-nxdomain-logging.patch that logs nxdomain queries.
    +http://danp.net/djbdns/
    +
    +dnsfilter-replace.patch
    +http://www.ohse.de/uwe/patches.html
    +This patch adds an option to the dnsfilter program (-r). It's use makes dnsfilter simply replace the IP address by the host name if possible. If the IP address cannot be determined for whatever reason then it will be left alone. -r stands for replace. 
    +
    +dnscache_sigpipe_fix
    +http://marc.info/?l=djbdns&m=104804013229536&w=2
    +This patch tells dnscache to ignore the SIGPIPE signal.
    +
    +ignoreip2.patch
    +http://tinydns.org/djbdns-1.05-ignoreip2.patch
    +This patch change djbdns's dnscache so that it will ignore thex IP addresses given in the ignoreip file. This patch was made to boycott Verisign, amongst others, who decided to start supplying replies to non-existant and wildcard domains. NOTE: This feature is disabled in the config file by default. Be careful with this one.
    +
    +bugfix-dnscache-dempsky-poison.patch
    +http://www.securityfocus.com/archive/1/501294/30/0/threaded
    +Patch to fix a potential cache-poisoning attack. This bug only affects domains that serve DNS content using tinydns and axfrdns (only for DNS queries over TCP; clients do not need AXFR permissions) from djbdns 1.05 and allow untrusted users to include arbitrary records.
    +
    +bugfix-dnscache-merge-outgoing-requests.patch
    +http://www.your.org/dnscache/
    +This patch prevents a class of poisoning attack by combining identical requests from clients into one outgoing query. Without this patch, an attacker can coerce dnscache into launching hundreds of identical queries at once, making a specific type of attack several orders of magnitude easier. 
    +
    +bugfix-dnscache-cache-soa-records.patch
    +http://www.your.org/dnscache/
    +This patch allows dnscache to store the responses of "SOA" type queries in its cache. SOA responses are the only type of response unconditionally uncached. dnscache uses its internal cache to prevent certain classes of poisoning attack. Attackers may choose to send floods of SOA requests to bypass these protections. 
    +
    +dnrqx
    +http://homepages.tesco.net/~J.deBoynePollard/Softwares/djbdns/dnsqrx
    +Not really a patch, but a handy script to make dnsq query a given name server instead of the one in /etc/resolv.conf.
    +
    +Possible future enhancements to this package
    +============================================
    +- add a Luci webinterface
    +- add scripts to make the DNS daemons run using daemontools to increase the reliability of the services
    +- ipv6 support
    + 
    diff --git a/net/djbdns/files/axfrdns.init b/net/djbdns/files/axfrdns.init
    new file mode 100644
    index 0000000..b797141
    --- /dev/null
    +++ b/net/djbdns/files/axfrdns.init
    @@ -0,0 +1,74 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2007 OpenWrt.org
    +#
    +# version 20090401 jhalfmoon
    +
    +START=47
    +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    +DAEMON=/usr/bin/tcpserver
    +NAME=tcpserver
    +DESC="Zone transfer name server"
    +
    +APP=/usr/bin/axfrdns
    +ROOT=/tmp/tinydns
    +
    +if [ ! -e /etc/tinydns/data ] ; then
    +    echo Error: Dependency tinydns not found.
    +    exit 111
    +fi
    +
    +start() {
    +    echo "Starting $DESC: $NAME"
    +    config_load djbdns
    +    mkdir -p $ROOT
    +    ln -sf /etc/tinydns/data $ROOT/data
    +    cd $ROOT
    +    tinydns-data
    +    chown -R $UID:$GID $ROOT
    +    tcprules $ROOT/tcp.cdb $ROOT/tcp.cdb.tmp < /etc/axfrdns/tcp
    +    config_foreach get_userids global
    +    config_foreach start_daemon axfrdns
    +}
    +
    +get_userids() {
    +    local cfg="$1"
    +    config_get UID "$cfg" runasuser
    +    config_get GID "$cfg" runasgroup
    +    UID=`id -u $UID`
    +    GID=`id -g $GID`
    +}
    +
    +start_daemon() {
    +    local cfg="$1"
    +    config_get logging  "$cfg" logging
    +    config_get iface    "$cfg" interface
    +    config_get AXFR     "$cfg" allowedzones
    +# Unset AXFR if it is empty
    +    [ -z $AXFR ] && export -n AXFR
    +# Translate listening interfaces to ip addresses
    +    include /lib/network
    +    scan_interfaces
    +    config_get IP "$iface" ipaddr
    +    export ROOT
    +    if [ "$DEBUG" == 1 ] ; then
    +        $DAEMON -vDRHl0 -c40 -b10 -x $ROOT/tcp.cdb -- $IP 53 $APP
    +    elif [ "$logging" == '1' ] ; then
    +        $DAEMON -vDRHl0 -c40 -b10 -x $ROOT/tcp.cdb -- $IP 53 $APP 2>&1 | logger -p local1.info -t $NAME &    
    +    else
    +        $DAEMON -DRHl0 -c40 -b10 -x $ROOT/tcp.cdb -- $IP 53 $APP > /dev/null 2>&1 &
    +    fi
    +}
    +
    +stop() {
    +    echo -n "Stopping $DESC: $NAME"
    +    kill `pidof $NAME|sed "s/$$//g"` > /dev/null 2>&1
    +    echo " ."
    +}
    +
    +restart() {
    +    echo "Restarting $DESC: $NAME... "
    +    stop
    +    sleep 2
    +    start
    +}
    +
    diff --git a/net/djbdns/files/axfrdns/tcp b/net/djbdns/files/axfrdns/tcp
    new file mode 100644
    index 0000000..1dc715b
    --- /dev/null
    +++ b/net/djbdns/files/axfrdns/tcp
    @@ -0,0 +1,5 @@
    +#Example rules for djb's tcpserver
    +127.0.0.:allow
    +10.1.1.:allow
    +192.168.1.:allow
    +:deny
    diff --git a/net/djbdns/files/djbdns.conf b/net/djbdns/files/djbdns.conf
    new file mode 100644
    index 0000000..9541142
    --- /dev/null
    +++ b/net/djbdns/files/djbdns.conf
    @@ -0,0 +1,41 @@
    +
    +config 'global'
    +	option 'runasuser' 'nobody'
    +	option 'runasgroup' 'nobody'
    +
    +config 'dnscache'
    +	option 'interface' 'wan'
    +	option 'interfacesend' 'wan'
    +	option 'defaultallowif' 'lan wan'
    +	option 'cachesize' '1000000'
    +	option 'hidettl' '0'
    +	option 'forwardonly' '1'
    +	option 'useresolvconf' '1'
    +	list 'resolver' '208.67.222.222'
    +	list 'resolver' '208.67.220.220'
    +	option 'useignore' '0'
    +	list 'ignoreip' '203.119.4.28'
    +	list 'ignoreip' '212.181.91.6'
    +	list 'ignoreip' '62.4.64.119'
    +	list 'ignoreip' '64.70.19.33'
    +	list 'ignoreip' '69.25.75.72'
    +	option 'logging' '0'
    +
    +config 'tinydns'
    +	option 'interface' 'wan'
    +	option 'logging' '0'
    +
    +config 'axfrdns'
    +	option 'interface' 'wan'
    +	option 'allowedzones' ''
    +	option 'logging' '0'
    +
    +config 'rbldns'
    +	option 'interface' 'wan'
    +	option 'base' 'test'
    +	option 'logging' '0'
    +
    +config 'walldns'
    +	option 'interface' 'wan'
    +	option 'logging' '0'
    +
    diff --git a/net/djbdns/files/dnscache.init b/net/djbdns/files/dnscache.init
    new file mode 100644
    index 0000000..8ba9645
    --- /dev/null
    +++ b/net/djbdns/files/dnscache.init
    @@ -0,0 +1,123 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2007 OpenWrt.org
    +
    +# Preferably start dnscache after udhcpd/dnsmasq, to be sure /etc/resolv.conf is set correctly. dnsmasq is at S60, so dnscache is put at S65 as seen below. If /etc/resolv.conf is not used, then dnscache may be started at S47, just after the firewall has been set up.
    +START=65
    +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    +DAEMON=/usr/bin/dnscache
    +NAME=dnscache
    +DESC="Caching name server"
    +
    +ROOT="/tmp/dnscache"
    +resolvfile="/etc/resolv.conf"
    +
    +start() {
    +    echo "Starting $DESC: $NAME"
    +    config_load djbdns
    +    config_foreach get_userids global
    +    mkdir -p $ROOT
    +    cp -fa /etc/dnscache/* $ROOT
    +    rm -f $ROOT/resolvers
    +    rm -f $ROOT/ignoreip
    +    chown -R $UID:$GID $ROOT
    +    config_foreach start_dnscache dnscache
    +}
    +
    +get_userids() {
    +    local cfg="$1"
    +    config_get UID "$cfg" runasuser
    +    config_get GID "$cfg" runasgroup
    +    UID=`id -u $UID`
    +    GID=`id -g $GID`
    +}
    +
    +append_server() {
    +    echo $1 >> $ROOT/resolvers
    +}
    +
    +append_ignore() {
    +    echo $1 >> $ROOT/ignoreip
    +}
    +
    +start_dnscache() {
    +    local cfg="$1"
    +    config_get logging        "$cfg" logging
    +    config_get useresolvconf  "$cfg" useresolvconf
    +    config_get iface          "$cfg" interface
    +    config_get ifacesend      "$cfg" interfacesend
    +    config_get defaultallowif "$cfg" defaultallowif
    +    config_get CACHESIZE      "$cfg" cachesize
    +    config_get FORWARDONLY    "$cfg" forwardonly
    +    config_get HIDETTL        "$cfg" hidettl
    +    config_list_foreach       "$cfg" "resolver" append_server
    +    config_get useignore      "$cfg" useignore
    +    if [ "$useignore" == "1" ] ; then
    +        config_list_foreach   "$cfg" "ignoreip" append_ignore
    +    fi
    +# Add some interface network addresses to list of allowed IP addresses (assumes /24 networks)
    +    include /lib/network
    +    scan_interfaces
    +    if [ -n "$defaultallowif" ] ; then
    +        for myinterface in `echo $defaultallowif`; do
    +            config_get addr $myinterface ipaddr
    +            # the next line strips the last octet from the ip address
    +            addr=`echo $addr|sed 's/.[0-9]\+$//'`
    +            touch $ROOT/ip/$addr
    +            echo Adding $ROOT/ip/$addr
    +        done
    +    fi
    +# Translate listen interface names to IP addresses
    +    config_get IP "$iface" ipaddr
    +# Translante send interface name to an IP address
    +    config_get IPSEND "$ifacesend" ipaddr
    +# Unset HIDETTL if equal to 0
    +    if [ "$HIDETTL" == "0" ] ; then
    +        export -n HIDETTL
    +    fi
    +# If forwardingonly set then activate list of resolvers
    +    if [ "$FORWARDONLY" == "0" ] ; then
    +        # Unset FORWARDONLY if equal to '0'
    +        export -n FORWARDONLY
    +    else
    +# Use either fixed list of dnsservers or resolv.conf data
    +        if [ "$useresolvconf" == "1" ] ; then
    +            if [ -s "$resolvfile" ] ; then
    +               cat $resolvfile|grep nameserver|sed 's/nameserver //g' > $ROOT/resolvers
    +            else
    +               echo Error: $resolvfile does not exist.
    +               exit 1
    +            fi
    +        fi
    +        if [ ! "`cat $ROOT/resolvers|wc -L`" == "0" ] ; then
    +            cp -f $ROOT/resolvers $ROOT/servers/@ > /dev/null 2>&1
    +        else
    +            echo Error: No resolvers are defined.
    +            exit 1
    +        fi
    +     fi
    +    export IP 
    +    export ROOT
    +# dnscache likes to receive a 128 byte random seed
    +    dd if=/dev/urandom of=$ROOT/randomseed bs=128 count=1  > /dev/null 2>&1
    +    if [ "$DEBUG" == 1 ] ; then
    +        $DAEMON < /$ROOT/randomseed
    +    elif [ "$logging" == '1' ] ; then
    +        $DAEMON 2>&1 < /$ROOT/randomseed | logger -p local1.info -t $NAME &
    +    else
    +        $DAEMON > /dev/null 2>&1 < /$ROOT/randomseed &
    +    fi
    +}
    +
    +stop() {
    +    echo -n "Stopping $DESC: $NAME"
    +    kill `pidof $NAME|sed "s/$$//g"` > /dev/null 2>&1
    +    echo " ."
    +}
    +
    +restart() {
    +    echo "Restarting $DESC: $NAME... "
    +    stop
    +    sleep 2
    +    start
    +}
    +
    diff --git a/net/djbdns/files/dnscache/dnsroots.global b/net/djbdns/files/dnscache/dnsroots.global
    new file mode 100644
    index 0000000..e69de29
    diff --git a/net/djbdns/files/dnscache/ignoreip-update b/net/djbdns/files/dnscache/ignoreip-update
    new file mode 100644
    index 0000000..98a2c38
    --- /dev/null
    +++ b/net/djbdns/files/dnscache/ignoreip-update
    @@ -0,0 +1,95 @@
    +#!/bin/sh
    +# 
    +# update-ignoreip version 0.1
    +# Written by J.P. Larocque, , OpenPGP 0x0c14cdda
    +# This software is in the public domain.
    +# 
    +# This script is intended for djbdns users that have applied Russell
    +# Nelson's patch to circumvent wildcard A records in TLDs:
    +#
    +#     http://tinydns.org/djbdns-1.05-ignoreip2.patch
    +#
    +# This script will try the wildcard name for each TLD in the
    +# 'stupid_tlds' variable (eg, '*.com', '*.cx', etc.).  For those
    +# addresses that resolve, they get added to your dnscache
    +# 'root/ignoreip' file, and dnscache is restarted.
    +# 
    +# Run this script from your dnscache directory.  This script depends
    +# on a proper PATH.  Old 'root/ignoreips' entries are kept (and dups
    +# removed), so you can add this program to a cron job to keep ahead
    +# of new bogus redirection addresses added by Verisign and other TLD
    +# operators.
    +# 
    +# Adding this script to a cron job was its intended purpose, but
    +# please don't do so without understanding how it works and what could
    +# happen if it breaks.
    +# 
    +# The latest version of this program can be found at the URL:
    +#       http://ely.ath.cx/~piranha/software/ignoreip-update/
    +# This program has been signed with my public key.  Its fingerprint is:
    +#       810B A0AC A7F7 2899 46D2  F2F6 3E7D 5279 0C14 CDDA
    +# The detached signature can be found at the URL:
    +#       http://ely.ath.cx/~piranha/software/ignoreip-update/ignoreip-update-0.1.asc
    +# 
    +# Changelog:
    +#   version 0.1 (2003/Sep/17)
    +#       Initially written and released.
    +
    +stupid_tlds='ac cc com cx museum net nu ph sh tm ws'
    +ignoreip='root/ignoreip'
    +
    +set -e
    +
    +me="`basename "$0"`"
    +
    +if [ ! -d 'root' ]; then
    +	echo "$me: run me from the dnscache directory" >&2
    +	exit 1
    +fi
    +
    +# I originally implemented this with random names, then realized all
    +# the current $stupid_tlds answer to "*.$stupid_tld" just like any
    +# other random name.  This code may be useful in the future, if an
    +# arms race of sorts develops.  (Sigh.)
    +
    +if which md5sum > /dev/null 2>&1; then
    +	hash_prog=md5sum
    +elif which md5 > /dev/null 2>&1; then
    +	hash_prog=md5
    +else    
    +	echo "$me: can't find a suitable hash program" >&2
    +	exit 1
    +fi
    +
    +[ "$1" = '-v' ] && verbose=1 || verbose=''
    +
    +temp1="`mktemp "ignoreip-update-$$-1-XXXXXX"`"
    +temp2="`mktemp "ignoreip-update-$$-2-XXXXXX"`"
    +trap 'rm -f "$temp1" "$temp2"' EXIT
    +
    +## Generate random name
    +#rand="`dd if=/dev/urandom bs=16 count=1 2> /dev/null | "$hash_prog"`"
    +
    +# Do lookups on random addresses; break into one addres/line; remove
    +# empty lines
    +for stupid_tld in $stupid_tlds; do
    +	dnsip "$rand.$stupid_tld"
    +	#dnsip "*.$stupid_tld"
    +done | xargs -n 1 echo | grep '.' > "$temp1"
    +
    +# Abort if there were no new bogus addresses
    +[ ! -s "$temp1" ] && exit
    +
    +# Remove duplicates (from old list and, eg, .sh/.tm)
    +touch "$ignoreip"
    +sort "$ignoreip" "$temp1" | uniq > "$temp2"
    +
    +if [ "$verbose" ]; then
    +	diff -u "$ignoreip" "$temp2" || true
    +fi
    +
    +# Update list and restart dnscache
    +chmod 644 "$temp2"
    +mv "$temp2" "$ignoreip"
    +#svc -t .
    +
    diff --git a/net/djbdns/files/dnscache/servers/@ b/net/djbdns/files/dnscache/servers/@
    new file mode 100644
    index 0000000..e69de29
    diff --git a/net/djbdns/files/dnsqrx b/net/djbdns/files/dnsqrx
    new file mode 100644
    index 0000000..3202e94
    --- /dev/null
    +++ b/net/djbdns/files/dnsqrx
    @@ -0,0 +1,9 @@
    +#!/bin/sh
    +# (c) Copyright 2003-2003 Jonathan de Boyne Pollard. All rights reserved. "Moral" rights asserted.
    +# Permission is hereby granted to distribute this script unmodified.
    +# This script requires the patch that changes the ${DNSCACHEIP} separator, which can be found at .
    +t=${1?Missing type}
    +n=${2?Missing name}
    +s=${3?Missing server}
    +i=`dnsip $s`
    +DNSCACHEIP=${i:?Bad server name} dnsqr $t $n
    diff --git a/net/djbdns/files/dnsroots-update b/net/djbdns/files/dnsroots-update
    new file mode 100644
    index 0000000..29ffc16
    --- /dev/null
    +++ b/net/djbdns/files/dnsroots-update
    @@ -0,0 +1,9 @@
    +#!/bin/sh
    +
    +# This is a script that outputs the current list of active DNS
    +# root servers. To run, it requires an active internet connection
    +# and a working resolving DNS server. It also requires that the
    +# djbdns dnstools be installed, or at least the tools dnsqr and
    +# dnsip.
    +
    +dnsqr ns .|grep answer|cut -f 5 -d " "|sort|while read server; do dnsip $server; done
    diff --git a/net/djbdns/files/rbldns.init b/net/djbdns/files/rbldns.init
    new file mode 100644
    index 0000000..0c259c6
    --- /dev/null
    +++ b/net/djbdns/files/rbldns.init
    @@ -0,0 +1,68 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2007 OpenWrt.org
    +#
    +# version 20090401 jhalfmoon
    +
    +START=46
    +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    +DAEMON=/usr/bin/rbldns
    +NAME=rbldns
    +DESC="Reverse DNS wall"
    +
    +ROOT=/tmp/rbldns
    +
    +start() {
    +    echo "Starting $DESC: $NAME"
    +    config_load djbdns
    +    config_foreach get_userids global
    +    rm -rf $ROOT
    +    mkdir -p $ROOT
    +    ln -fs /etc/rbldns/data $ROOT/data
    +    cd $ROOT
    +    rbldns-data
    +    chown -R $UID:$GID $ROOT
    +    config_foreach start_daemon rbldns
    +}
    +
    +get_userids() {
    +    local cfg="$1"
    +    config_get UID "$cfg" runasuser
    +    config_get GID "$cfg" runasgroup
    +    UID=`id -u $UID`
    +    GID=`id -g $GID`
    +}
    +
    +start_daemon() {
    +    local cfg="$1"
    +    config_get logging "$cfg" logging
    +    config_get iface   "$cfg" interface
    +    config_get BASE    "$cfg" base
    +# Unset BASE if it is empty
    +    [ -z $BASE ] && export -n BASE
    +# Translate listening interfaces to ip addresses
    +    include /lib/network
    +    scan_interfaces
    +    config_get IP "$iface" ipaddr
    +    export ROOT
    +    if [ "$DEBUG" == 1 ] ; then
    +            $DAEMON
    +    elif [ "$logging" == '1' ] ; then
    +        $DAEMON 2>&1 | logger -p local1.info -t $NAME &
    +    else
    +        $DAEMON > /dev/null 2>&1 &
    +    fi
    +}
    +
    +stop() {
    +    echo -n "Stopping $DESC: $NAME"
    +    kill `pidof $NAME|sed "s/$$//g"` > /dev/null 2>&1
    +    echo " ."
    +}
    +
    +restart() {
    +    echo "Restarting $DESC: $NAME... "
    +    stop
    +    sleep 2
    +    start
    +}
    +
    diff --git a/net/djbdns/files/rbldns/data b/net/djbdns/files/rbldns/data
    new file mode 100644
    index 0000000..85aae01
    --- /dev/null
    +++ b/net/djbdns/files/rbldns/data
    @@ -0,0 +1,5 @@
    +#example rdldns data file
    +1.2.4.8
    +10.0.0.1
    +192.168.0.0/16
    +:127.0.0.1:www.somesite.com
    diff --git a/net/djbdns/files/tinydns.init b/net/djbdns/files/tinydns.init
    new file mode 100644
    index 0000000..30c5d6f
    --- /dev/null
    +++ b/net/djbdns/files/tinydns.init
    @@ -0,0 +1,64 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2007 OpenWrt.org
    +#
    +# version 20090401 jhalfmoon
    +
    +START=46
    +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    +DAEMON=/usr/bin/tinydns
    +NAME=tinydns
    +DESC="Authoritative nameserver"
    +
    +ROOT=/tmp/tinydns
    +
    +start() {
    +    echo "Starting $DESC: $NAME"
    +    config_load djbdns
    +    config_foreach get_userids global
    +    mkdir -p $ROOT
    +    ln -sf /etc/tinydns/data $ROOT/data
    +    cd $ROOT
    +    tinydns-data
    +    chown -R $UID:$GID $ROOT
    +    config_foreach start_daemon tinydns
    +}
    +
    +get_userids() {
    +    local cfg="$1"
    +    config_get UID "$cfg" runasuser
    +    config_get GID "$cfg" runasgroup
    +    UID=`id -u $UID`
    +    GID=`id -g $GID`
    +}
    +
    +start_daemon() {
    +    local cfg="$1"
    +    config_get logging "$cfg" logging
    +    config_get iface   "$cfg" interface
    +    include /lib/network
    +    scan_interfaces
    +# Translate listening interfaces to ip addresses
    +    config_get IP "$iface" ipaddr
    +    export ROOT
    +    if [ "$DEBUG" == 1 ] ; then
    +        $DAEMON
    +    elif [ "$logging" == '1' ] ; then
    +        $DAEMON 2>&1 | logger -p local1.info -t $NAME &
    +    else
    +        $DAEMON > /dev/null 2>&1 &
    +    fi
    +}
    +
    +stop() {
    +    echo -n "Stopping $DESC: $NAME"
    +    kill `pidof $NAME|sed "s/$$//g"` > /dev/null 2>&1
    +    echo " ."
    +}
    +
    +restart() {
    +    echo "Restarting $DESC: $NAME... "
    +    stop
    +    sleep 2
    +    start
    +}
    +
    diff --git a/net/djbdns/files/tinydns/add-alias b/net/djbdns/files/tinydns/add-alias
    new file mode 100644
    index 0000000..eada7a0
    --- /dev/null
    +++ b/net/djbdns/files/tinydns/add-alias
    @@ -0,0 +1,2 @@
    +#!/bin/sh
    +exec /usr/local/bin/tinydns-edit data data.new add alias ${1+"$@"}
    diff --git a/net/djbdns/files/tinydns/add-childns b/net/djbdns/files/tinydns/add-childns
    new file mode 100644
    index 0000000..4114b3e
    --- /dev/null
    +++ b/net/djbdns/files/tinydns/add-childns
    @@ -0,0 +1,2 @@
    +#!/bin/sh
    +exec /usr/local/bin/tinydns-edit data data.new add childns ${1+"$@"}
    diff --git a/net/djbdns/files/tinydns/add-host b/net/djbdns/files/tinydns/add-host
    new file mode 100644
    index 0000000..9c61b4e
    --- /dev/null
    +++ b/net/djbdns/files/tinydns/add-host
    @@ -0,0 +1,2 @@
    +#!/bin/sh
    +exec /usr/local/bin/tinydns-edit data data.new add host ${1+"$@"}
    diff --git a/net/djbdns/files/tinydns/add-mx b/net/djbdns/files/tinydns/add-mx
    new file mode 100644
    index 0000000..c31a37f
    --- /dev/null
    +++ b/net/djbdns/files/tinydns/add-mx
    @@ -0,0 +1,2 @@
    +#!/bin/sh
    +exec /usr/local/bin/tinydns-edit data data.new add mx ${1+"$@"}
    diff --git a/net/djbdns/files/tinydns/add-ns b/net/djbdns/files/tinydns/add-ns
    new file mode 100644
    index 0000000..b35d2b0
    --- /dev/null
    +++ b/net/djbdns/files/tinydns/add-ns
    @@ -0,0 +1,2 @@
    +#!/bin/sh
    +exec /usr/local/bin/tinydns-edit data data.new add ns ${1+"$@"}
    diff --git a/net/djbdns/files/tinydns/data b/net/djbdns/files/tinydns/data
    new file mode 100644
    index 0000000..001311e
    --- /dev/null
    +++ b/net/djbdns/files/tinydns/data
    @@ -0,0 +1,59 @@
    +# example verbose tinydns data file
    +# from http://www.pjvenda.org/linux/doc/tinydns/
    +# Copyright (C) 2001-2009 by Pedro Venda
    +# licensed under a Creative Commons Attribution 2.5 License
    +#
    +# REVERSE ZONE
    +#
    +# (reverse) dns servers: primary and secondary
    +Z45.168.192.in-addr.arpa:ns.example.net:hostmaster.example.net::::::::
    +
    +# NS records
    +&45.168.192.in-addr.arpa::ns.example.net:::
    +&45.168.192.in-addr.arpa::ns2.example.net:::
    +
    +# MX handlers
    +@45.168.192.in-addr.arpa::relay.example.net:10
    +@45.168.192.in-addr.arpa::relay2.example.net:20
    +
    +#
    +# FORWARD ZONE:
    +#
    +# SOA record: primary nameserver is ns.example.net and hostmaster
    +#             mail address is hostmaster@example.net
    +#             (the 'Z' configuration line is the only one that
    +#             allows specifying the hostmaster mail address)
    +Zexample.net:ns.example.net:hostmaster.example.net::::::::
    +
    +# NS records: primary and secondary nameservers
    +&example.net::ns.example.net:::
    +&example.net::ns2.example.net:::
    +
    +# MX records: relay.example.net, distance = 10
    +#             relay2.example.net, distance = 20
    +@example.net::relay.example.net:10
    +@example.net::relay2.example.net:20
    +
    +# A records: ns.example.net, ns2.example.net
    +=ns.example.net:192.168.45.1:::
    +=ns2.example.net:192.168.45.2:::
    +
    +# PTR records: relays are in the same hosts as dns servers
    ++relay.example.net:192.168.45.1:::
    ++relay2.example.net:192.168.45.2:::
    +
    +# more A records: gateway.example.net
    +=gateway.example.net:192.168.45.254:::
    +
    +# CNAME record: nscache.example.net is alias to gateway.example.net
    +Cnscache.example.net:gateway.example.net:::
    +
    +#
    +# SUB DOMAIN DELEGATION
    +#
    +
    +# NS record
    +&dmz.example.net::ns.dmz.example.net:::
    +
    +# A/PTR record for nameserver
    +=ns.dmz.example.net:192.168.90.1:::
    diff --git a/net/djbdns/files/walldns.init b/net/djbdns/files/walldns.init
    new file mode 100644
    index 0000000..d5d714f
    --- /dev/null
    +++ b/net/djbdns/files/walldns.init
    @@ -0,0 +1,62 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2007 OpenWrt.org
    +#
    +# version 20090401 jhalfmoon
    +
    +START=46
    +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    +DAEMON=/usr/bin/walldns
    +NAME=walldns
    +DESC="Reverse DNS wall"
    +
    +ROOT=/tmp/walldns
    +
    +start() {
    +    echo "Starting $DESC: $NAME"
    +    config_load djbdns
    +    config_foreach get_userids global
    +    rm -rf $ROOT
    +    mkdir -p $ROOT
    +    chown -R $UID:$GID $ROOT
    +    config_foreach start_daemon walldns
    +}
    +
    +get_userids() {
    +    local cfg="$1"
    +    config_get UID "$cfg" runasuser
    +    config_get GID "$cfg" runasgroup
    +    UID=`id -u $UID`
    +    GID=`id -g $GID`
    +}
    +
    +start_daemon() {
    +    local cfg="$1"
    +    config_get logging "$cfg" logging
    +    config_get iface   "$cfg" interface
    +# Translate listening interfaces to ip addresses
    +    include /lib/network
    +    scan_interfaces
    +    config_get IP "$iface" ipaddr
    +    export ROOT
    +    if [ "$DEBUG" == 1 ] ; then
    +        $DAEMON
    +    elif [ "$logging" == '1' ] ; then
    +        $DAEMON 2>&1 | logger -p local1.info -t $NAME &
    +    else
    +        $DAEMON > /dev/null 2>&1 &
    +    fi
    +}
    +
    +stop() {
    +    echo -n "Stopping $DESC: $NAME"
    +    kill `pidof $NAME|sed "s/$$//g"` > /dev/null 2>&1
    +    echo " ."
    +}
    +
    +restart() {
    +    echo "Restarting $DESC: $NAME... "
    +    stop
    +    sleep 2
    +    start
    +}
    +
    diff --git a/net/djbdns/patches/010-crosscompile.patch b/net/djbdns/patches/010-crosscompile.patch
    new file mode 100644
    index 0000000..68ce1c3
    --- /dev/null
    +++ b/net/djbdns/patches/010-crosscompile.patch
    @@ -0,0 +1,170 @@
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -29,10 +29,6 @@ auto-str.o: \
    + compile auto-str.c buffer.h exit.h
    + 	./compile auto-str.c
    + 
    +-auto_home.c: \
    +-auto-str conf-home
    +-	./auto-str auto_home `head -1 conf-home` > auto_home.c
    +-
    + auto_home.o: \
    + compile auto_home.c
    + 	./compile auto_home.c
    +@@ -221,10 +217,6 @@ compile dd.c dns.h stralloc.h gen_alloc.
    + uint64.h taia.h dd.h
    + 	./compile dd.c
    + 
    +-direntry.h: \
    +-choose compile trydrent.c direntry.h1 direntry.h2
    +-	./choose c trydrent direntry.h1 direntry.h2 > direntry.h
    +-
    + dns.a: \
    + makelib dns_dfd.o dns_domain.o dns_dtda.o dns_ip.o dns_ipq.o dns_mx.o \
    + dns_name.o dns_nd.o dns_packet.o dns_random.o dns_rcip.o dns_rcrw.o \
    +@@ -508,12 +500,6 @@ systype hasdevtcp.h1 hasdevtcp.h2
    + 	  *) cat hasdevtcp.h1 ;; \
    + 	esac ) > hasdevtcp.h
    + 
    +-hasshsgr.h: \
    +-choose compile load tryshsgr.c hasshsgr.h1 hasshsgr.h2 chkshsgr \
    +-warn-shsgr
    +-	./chkshsgr || ( cat warn-shsgr; exit 1 )
    +-	./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h
    +-
    + hier.o: \
    + compile hier.c auto_home.h
    + 	./compile hier.c
    +@@ -534,10 +520,6 @@ instcheck.o: \
    + compile instcheck.c strerr.h error.h exit.h
    + 	./compile instcheck.c
    + 
    +-iopause.h: \
    +-choose compile load trypoll.c iopause.h1 iopause.h2
    +-	./choose clr trypoll iopause.h1 iopause.h2 > iopause.h
    +-
    + iopause.o: \
    + compile iopause.c taia.h tai.h uint64.h select.h iopause.h taia.h
    + 	./compile iopause.c
    +@@ -590,7 +572,7 @@ warn-auto.sh systype
    + 	dgux-*) ;; \
    + 	hp-ux-*) ;; \
    + 	sco*) ;; \
    +-	*) echo 'ranlib "$$main"' ;; \
    ++	*) echo '$(if $(TARGET_RANLIB),$(TARGET_RANLIB),ranlib) "$$main"' ;; \
    + 	esac \
    + 	) > makelib
    + 	chmod 755 makelib
    +@@ -766,10 +748,6 @@ seek_set.o: \
    + compile seek_set.c seek.h
    + 	./compile seek_set.c
    + 
    +-select.h: \
    +-choose compile trysysel.c select.h1 select.h2
    +-	./choose c trysysel select.h1 select.h2 > select.h
    +-
    + server.o: \
    + compile server.c byte.h case.h env.h buffer.h strerr.h ip4.h uint16.h \
    + ndelay.h socket.h uint16.h droproot.h qlog.h uint16.h response.h \
    +@@ -1060,10 +1038,6 @@ uint32_unpack.o: \
    + compile uint32_unpack.c uint32.h
    + 	./compile uint32_unpack.c
    + 
    +-uint64.h: \
    +-choose compile load tryulong64.c uint64.h1 uint64.h2
    +-	./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h
    +-
    + unix.a: \
    + makelib buffer_read.o buffer_write.o error.o error_str.o ndelay_off.o \
    + ndelay_on.o open_read.o open_trunc.o openreadclose.o readclose.o \
    +--- /dev/null
    ++++ b/auto_home.c
    +@@ -0,0 +1,3 @@
    ++const char auto_home[] = "\
    ++\057\165\163\162\
    ++";
    +--- a/conf-cc
    ++++ b/conf-cc
    +@@ -1,3 +1,3 @@
    +-gcc -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings
    ++$TARGET_CC $TARGET_CFLAGS -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -include errno.h
    + 
    + This will be used to compile .c files.
    +--- a/conf-home
    ++++ b/conf-home
    +@@ -1,4 +1,4 @@
    +-/usr/local
    ++/usr
    + 
    + This is the dnscache home directory. Programs will be installed in
    + .../bin.
    +--- a/conf-ld
    ++++ b/conf-ld
    +@@ -1,3 +1,3 @@
    +-gcc -s
    ++$TARGET_CC -s $TARGET_LDFLAGS
    + 
    + This will be used to link .o files into an executable.
    +--- /dev/null
    ++++ b/direntry.h
    +@@ -0,0 +1,10 @@
    ++#ifndef DIRENTRY_H
    ++#define DIRENTRY_H
    ++
    ++/* sysdep: +dirent */
    ++
    ++#include 
    ++#include 
    ++#define direntry struct dirent
    ++
    ++#endif
    +--- /dev/null
    ++++ b/hasshsgr.h
    +@@ -0,0 +1 @@
    ++/* sysdep: -shortsetgroups */
    +--- /dev/null
    ++++ b/iopause.h
    +@@ -0,0 +1,18 @@
    ++#ifndef IOPAUSE_H
    ++#define IOPAUSE_H
    ++
    ++/* sysdep: +poll */
    ++#define IOPAUSE_POLL
    ++
    ++#include 
    ++#include 
    ++
    ++typedef struct pollfd iopause_fd;
    ++#define IOPAUSE_READ POLLIN
    ++#define IOPAUSE_WRITE POLLOUT
    ++
    ++#include "taia.h"
    ++
    ++extern void iopause(iopause_fd *,unsigned int,struct taia *,struct taia *);
    ++
    ++#endif
    +--- /dev/null
    ++++ b/select.h
    +@@ -0,0 +1,11 @@
    ++#ifndef SELECT_H
    ++#define SELECT_H
    ++
    ++/* sysdep: +sysselect */
    ++
    ++#include 
    ++#include 
    ++#include 
    ++extern int select();
    ++
    ++#endif
    +--- /dev/null
    ++++ b/uint64.h
    +@@ -0,0 +1,8 @@
    ++#ifndef UINT64_H
    ++#define UINT64_H
    ++
    ++/* sysdep: -ulong64 */
    ++
    ++typedef unsigned long long uint64;
    ++
    ++#endif
    diff --git a/net/djbdns/patches/020-dnsroots-update.patch b/net/djbdns/patches/020-dnsroots-update.patch
    new file mode 100644
    index 0000000..ce5b863
    --- /dev/null
    +++ b/net/djbdns/patches/020-dnsroots-update.patch
    @@ -0,0 +1,19 @@
    +--- a/dnsroots.global
    ++++ b/dnsroots.global
    +@@ -1,5 +1,5 @@
    + 198.41.0.4
    +-128.9.0.107
    ++192.228.79.201
    + 192.33.4.12
    + 128.8.10.90
    + 192.203.230.10
    +@@ -7,7 +7,7 @@
    + 192.112.36.4
    + 128.63.2.53
    + 192.36.148.17
    +-198.41.0.10
    ++192.58.128.30
    + 193.0.14.129
    +-198.32.64.12
    ++199.7.83.42
    + 202.12.27.33
    diff --git a/net/djbdns/patches/030-srv-records-and-axfrget.patch b/net/djbdns/patches/030-srv-records-and-axfrget.patch
    new file mode 100644
    index 0000000..1d16380
    --- /dev/null
    +++ b/net/djbdns/patches/030-srv-records-and-axfrget.patch
    @@ -0,0 +1,135 @@
    +From: Michael Handler 
    +To: dns@list.cr.yp.to
    +Subject: tinydns-data SRV & axfr-get SRV/PTR patches
    +Date: Thu, 14 Sep 2000 20:37:50 -0400
    +
    +Here's a combined patch that:
    +
    +a) adds a native SRV type to tinydns-data
    +
    +Sfqdn:ip:x:port:weight:priority:ttl:timestamp
    +
    +Standard rules for ip, x, ttl, and timestamp apply. Port, weight, and
    +priority all range from 0-65535. Weight and priority are optional; they
    +default to zero if not provided.
    +
    +Sconsole.zoinks.example.com:1.2.3.4:rack102-con1:2001:69:7:300:
    +
    +b) makes axfr-get decompose SRV and PTR records and write them out in
    +native format, rather than opaque. Again, this is necessary because if the
    +DNAME fields in the records reference the same zone as fqdn, they can have
    +compression pointers that are bogus outside the context of that specific
    +packet, and which can't be correctly loaded into data.cdb by tinydns-data.
    +
    +--michael
    +
    +Laurent G. Bercot  updated it for djbdns-1.05:
    +
    +--- a/axfr-get.c
    ++++ b/axfr-get.c
    +@@ -209,6 +209,26 @@ unsigned int doit(char *buf,unsigned int
    +     if (!stralloc_cats(&line,".:")) return 0;
    +     if (!stralloc_catulong0(&line,dist,0)) return 0;
    +   }
    ++  else if (byte_equal(data,2,DNS_T_SRV)) {
    ++    uint16 dist, weight, port;
    ++    if (!stralloc_copys(&line,"S")) return 0;
    ++    if (!dns_domain_todot_cat(&line,d1)) return 0;
    ++    if (!stralloc_cats(&line,"::")) return 0;
    ++    pos = x_copy(buf,len,pos,data,2);
    ++    uint16_unpack_big(data,&dist);
    ++    pos = x_copy(buf,len,pos,data,2);
    ++    uint16_unpack_big(data,&weight);
    ++    pos = x_copy(buf,len,pos,data,2);
    ++    uint16_unpack_big(data,&port);
    ++    x_getname(buf,len,pos,&d1);
    ++    if (!dns_domain_todot_cat(&line,d1)) return 0;
    ++    if (!stralloc_cats(&line,".:")) return 0;
    ++    if (!stralloc_catulong0(&line,dist,0)) return 0;
    ++    if (!stralloc_cats(&line,":")) return 0;
    ++    if (!stralloc_catulong0(&line,weight,0)) return 0;
    ++    if (!stralloc_cats(&line,":")) return 0;
    ++    if (!stralloc_catulong0(&line,port,0)) return 0;
    ++  }
    +   else if (byte_equal(data,2,DNS_T_A) && (dlen == 4)) {
    +     char ipstr[IP4_FMT];
    +     if (!stralloc_copys(&line,"+")) return 0;
    +@@ -217,6 +237,14 @@ unsigned int doit(char *buf,unsigned int
    +     x_copy(buf,len,pos,data,4);
    +     if (!stralloc_catb(&line,ipstr,ip4_fmt(ipstr,data))) return 0;
    +   }
    ++  else if (byte_equal(data,2,DNS_T_PTR)) {
    ++    if (!stralloc_copys(&line,"^")) return 0;
    ++    if (!dns_domain_todot_cat(&line,d1)) return 0;
    ++    if (!stralloc_cats(&line,":")) return 0;
    ++    x_getname(buf,len,pos,&d1);
    ++    if (!dns_domain_todot_cat(&line,d1)) return 0;
    ++    if (!stralloc_cats(&line,".")) return 0;
    ++  }
    +   else {
    +     unsigned char ch;
    +     unsigned char ch2;
    +--- a/dns.h
    ++++ b/dns.h
    +@@ -20,6 +20,7 @@
    + #define DNS_T_SIG "\0\30"
    + #define DNS_T_KEY "\0\31"
    + #define DNS_T_AAAA "\0\34"
    ++#define DNS_T_SRV "\0\41"
    + #define DNS_T_AXFR "\0\374"
    + #define DNS_T_ANY "\0\377"
    + 
    +--- a/tinydns-data.c
    ++++ b/tinydns-data.c
    +@@ -196,6 +196,7 @@ int main()
    +   char type[2];
    +   char soa[20];
    +   char buf[4];
    ++  char srv[6];
    + 
    +   umask(022);
    + 
    +@@ -369,6 +370,43 @@ int main()
    + 	  rr_finish(d2);
    + 	}
    + 	break;
    ++	
    ++      case 'S':
    ++	if (!dns_domain_fromdot(&d1,f[0].s,f[0].len)) nomem();
    ++	if (!stralloc_0(&f[6])) nomem();
    ++	if (!scan_ulong(f[6].s,&ttl)) ttl = TTL_POSITIVE;
    ++	ttdparse(&f[7],ttd);
    ++	locparse(&f[8],loc);
    ++
    ++	if (!stralloc_0(&f[1])) nomem();
    ++
    ++	if (byte_chr(f[2].s,f[2].len,'.') >= f[2].len) {
    ++	  if (!stralloc_cats(&f[2],".srv.")) nomem();
    ++	  if (!stralloc_catb(&f[2],f[0].s,f[0].len)) nomem();
    ++	}
    ++	if (!dns_domain_fromdot(&d2,f[2].s,f[2].len)) nomem();
    ++
    ++	if (!stralloc_0(&f[4])) nomem();
    ++	if (!scan_ulong(f[4].s,&u)) u = 0;
    ++	uint16_pack_big(srv,u);
    ++	if (!stralloc_0(&f[5])) nomem();
    ++	if (!scan_ulong(f[5].s,&u)) u = 0;
    ++	uint16_pack_big(srv + 2,u);
    ++	if (!stralloc_0(&f[3])) nomem();
    ++	if (!scan_ulong(f[3].s,&u)) nomem();
    ++	uint16_pack_big(srv + 4,u);
    ++
    ++	rr_start(DNS_T_SRV,ttl,ttd,loc);
    ++	rr_add(srv,6);
    ++	rr_addname(d2);
    ++	rr_finish(d1);
    ++
    ++	if (ip4_scan(f[1].s,ip)) {
    ++	  rr_start(DNS_T_A,ttl,ttd,loc);
    ++	  rr_add(ip,4);
    ++	  rr_finish(d2);
    ++	}
    ++	break;
    + 
    +       case '^': case 'C':
    + 	if (!dns_domain_fromdot(&d1,f[0].s,f[0].len)) nomem();
    diff --git a/net/djbdns/patches/040-dnscache-less-chatty-log.patch b/net/djbdns/patches/040-dnscache-less-chatty-log.patch
    new file mode 100644
    index 0000000..9a881c9
    --- /dev/null
    +++ b/net/djbdns/patches/040-dnscache-less-chatty-log.patch
    @@ -0,0 +1,39 @@
    +--- a/log.h
    ++++ b/log.h
    +@@ -1,6 +1,8 @@
    + #ifndef LOG_H
    + #define LOG_H
    + 
    ++#define STATS_DISPLAY_INTERVAL 5
    ++
    + #include "uint64.h"
    + 
    + extern void log_startup(void);
    +--- a/log.c
    ++++ b/log.c
    +@@ -1,6 +1,7 @@
    + #include "buffer.h"
    + #include "uint32.h"
    + #include "uint16.h"
    ++#include "time.h"
    + #include "error.h"
    + #include "byte.h"
    + #include "log.h"
    +@@ -274,11 +275,17 @@ void log_rrsoa(const char server[4],cons
    + 
    + void log_stats(void)
    + {
    ++  static time_t prev = 0;
    ++  time_t cur = time(NULL);
    +   extern uint64 numqueries;
    +   extern uint64 cache_motion;
    +   extern int uactive;
    +   extern int tactive;
    + 
    ++  if(prev == 0) prev = time(NULL);
    ++  if(cur - prev < STATS_DISPLAY_INTERVAL) return;
    ++  prev = cur;
    ++
    +   string("stats ");
    +   number(numqueries); space();
    +   number(cache_motion); space();
    diff --git a/net/djbdns/patches/050-tinydns-mmap-leak.patch b/net/djbdns/patches/050-tinydns-mmap-leak.patch
    new file mode 100644
    index 0000000..1885612
    --- /dev/null
    +++ b/net/djbdns/patches/050-tinydns-mmap-leak.patch
    @@ -0,0 +1,22 @@
    +--- a/tdlookup.c
    ++++ b/tdlookup.c
    +@@ -298,9 +298,17 @@ int respond(char *q,char qtype[2],char i
    +   if (!r) r = cdb_find(&c,key,4);
    +   if (!r) r = cdb_find(&c,key,3);
    +   if (!r) r = cdb_find(&c,key,2);
    +-  if (r == -1) return 0;
    ++  if (r == -1) {
    ++    cdb_free(&c);
    ++    close(fd);
    ++    return 0;
    ++  }
    +   if (r && (cdb_datalen(&c) == 2))
    +-    if (cdb_read(&c,clientloc,2,cdb_datapos(&c)) == -1) return 0;
    ++    if (cdb_read(&c,clientloc,2,cdb_datapos(&c)) == -1) {
    ++      cdb_free(&c);
    ++      close(fd);
    ++      return 0;
    ++    }
    + 
    +   r = doit(q,qtype);
    + 
    diff --git a/net/djbdns/patches/060-dnscache-big-udp-packets.patch b/net/djbdns/patches/060-dnscache-big-udp-packets.patch
    new file mode 100644
    index 0000000..8f2c142
    --- /dev/null
    +++ b/net/djbdns/patches/060-dnscache-big-udp-packets.patch
    @@ -0,0 +1,11 @@
    +--- a/dns_transmit.c
    ++++ b/dns_transmit.c
    +@@ -240,7 +240,7 @@ void dns_transmit_io(struct dns_transmit
    + 
    + int dns_transmit_get(struct dns_transmit *d,const iopause_fd *x,const struct taia *when)
    + {
    +-  char udpbuf[513];
    ++  char udpbuf[4097];
    +   unsigned char ch;
    +   int r;
    +   int fd;
    diff --git a/net/djbdns/patches/070-dnscache-dpos-tcp-servfail.patch b/net/djbdns/patches/070-dnscache-dpos-tcp-servfail.patch
    new file mode 100644
    index 0000000..8d30d5e
    --- /dev/null
    +++ b/net/djbdns/patches/070-dnscache-dpos-tcp-servfail.patch
    @@ -0,0 +1,10 @@
    +--- a/dns_transmit.c
    ++++ b/dns_transmit.c
    +@@ -166,6 +166,7 @@ static int thistcp(struct dns_transmit *
    +       taia_uint(&d->deadline,10);
    +       taia_add(&d->deadline,&d->deadline,&now);
    +       if (socket_connect4(d->s1 - 1,ip,53) == 0) {
    ++        d->pos = 0;
    +         d->tcpstate = 2;
    +         return 0;
    +       }
    diff --git a/net/djbdns/patches/080-dnscache-cache-negatives.patch b/net/djbdns/patches/080-dnscache-cache-negatives.patch
    new file mode 100644
    index 0000000..793ac87
    --- /dev/null
    +++ b/net/djbdns/patches/080-dnscache-cache-negatives.patch
    @@ -0,0 +1,41 @@
    +--- a/query.c
    ++++ b/query.c
    +@@ -193,6 +193,7 @@ static int doit(struct query *z,int stat
    +   int k;
    +   int p;
    +   int q;
    ++  uint32 cachettl;
    + 
    +   errno = error_io;
    +   if (state == 1) goto HAVEPACKET;
    +@@ -470,6 +471,7 @@ static int doit(struct query *z,int stat
    +   rcode = header[3] & 15;
    +   if (rcode && (rcode != 3)) goto DIE; /* impossible; see irrelevant() */
    + 
    ++  cachettl = 0;
    +   flagout = 0;
    +   flagcname = 0;
    +   flagreferral = 0;
    +@@ -512,6 +514,11 @@ static int doit(struct query *z,int stat
    + 
    +     uint16_unpack_big(header + 8,&datalen);
    +     pos += datalen;
    ++
    ++    if (flagsoa && (pos <= len)) {
    ++      cachettl = ttlget(buf + pos - 4);
    ++      if (soattl < cachettl) cachettl = soattl;
    ++    }
    +   }
    +   posglue = pos;
    + 
    +@@ -689,8 +696,8 @@ static int doit(struct query *z,int stat
    +   }
    + 
    +   if (rcode == 3) {
    +-    log_nxdomain(whichserver,d,soattl);
    +-    cachegeneric(DNS_T_ANY,d,"",0,soattl);
    ++    log_nxdomain(whichserver,d,cachettl);
    ++    cachegeneric(DNS_T_ANY,d,"",0,cachettl);
    + 
    +     NXDOMAIN:
    +     if (z->level) goto LOWERLEVEL;
    diff --git a/net/djbdns/patches/090-tinydns-one-second.patch b/net/djbdns/patches/090-tinydns-one-second.patch
    new file mode 100644
    index 0000000..660bbcb
    --- /dev/null
    +++ b/net/djbdns/patches/090-tinydns-one-second.patch
    @@ -0,0 +1,40 @@
    +--- a/tdlookup.c
    ++++ b/tdlookup.c
    +@@ -280,15 +280,24 @@ static int doit(char *q,char qtype[2])
    + 
    + int respond(char *q,char qtype[2],char ip[4])
    + {
    +-  int fd;
    ++  static struct tai cdb_valid = { 0 };
    ++  static int fd = -1;
    ++  struct tai one_second;
    +   int r;
    +   char key[6];
    + 
    +   tai_now(&now);
    +-  fd = open_read("data.cdb");
    +-  if (fd == -1) return 0;
    +-  cdb_init(&c,fd);
    +-
    ++  if (tai_less(&cdb_valid, &now)) {
    ++    if (fd != -1) {
    ++      cdb_free(&c);
    ++      close(fd);
    ++    }
    ++    fd = open_read("data.cdb");
    ++    if (fd == -1) return 0;
    ++    cdb_init(&c,fd);
    ++    tai_uint(&one_second, 1);
    ++    tai_add(&cdb_valid, &now, &one_second);
    ++  }
    +   byte_zero(clientloc,2);
    +   key[0] = 0;
    +   key[1] = '%';
    +@@ -312,7 +321,5 @@ int respond(char *q,char qtype[2],char i
    + 
    +   r = doit(q,qtype);
    + 
    +-  cdb_free(&c);
    +-  close(fd);
    +   return r;
    + }
    diff --git a/net/djbdns/patches/110-dnscache-cachestats.patch b/net/djbdns/patches/110-dnscache-cachestats.patch
    new file mode 100644
    index 0000000..5404719
    --- /dev/null
    +++ b/net/djbdns/patches/110-dnscache-cachestats.patch
    @@ -0,0 +1,89 @@
    +#
    +# This patch to djbdns 1.05 modifies the dnscache program to keep a
    +# counter of cache hits and cache misses.
    +#
    +# Two new fields are added to the ``stats'' output line:
    +#  . the fifth number is the number of cache hits
    +#  . the sixth number is the number of cache misses
    +# e.g.
    +#  @400000003fa92ccc317d70f4 stats 3 1201 1 0 21 49
    +# indicates 21 hits and 49 misses.
    +#
    +# James Raftery   6 Nov. 2003
    +#
    +--- a/cache.c
    ++++ b/cache.c
    +@@ -7,6 +7,11 @@
    + 
    + uint64 cache_motion = 0;
    + 
    ++/* record cache stats */
    ++/* James Raftery  6 Nov. 2003 */
    ++uint64 cache_hit = 0;
    ++uint64 cache_miss = 0;
    ++
    + static char *x = 0;
    + static uint32 size;
    + static uint32 hsize;
    +@@ -112,15 +117,20 @@ char *cache_get(const char *key,unsigned
    +         if (u > size - pos - 20 - keylen) cache_impossible();
    +         *datalen = u;
    + 
    ++        cache_hit++;
    +         return x + pos + 20 + keylen;
    +       }
    +     }
    +     nextpos = prevpos ^ get4(pos);
    +     prevpos = pos;
    +     pos = nextpos;
    +-    if (++loop > 100) return 0; /* to protect against hash flooding */
    ++    if (++loop > 100) { /* to protect against hash flooding */
    ++      cache_miss++;
    ++      return 0;
    ++    }
    +   }
    + 
    ++  cache_miss++;
    +   return 0;
    + }
    + 
    +--- a/cache.h
    ++++ b/cache.h
    +@@ -5,6 +5,12 @@
    + #include "uint64.h"
    + 
    + extern uint64 cache_motion;
    ++
    ++/* record cache stats */
    ++/* James Raftery  6 Nov. 2003 */
    ++extern uint64 cache_hit;
    ++extern uint64 cache_miss;
    ++
    + extern int cache_init(unsigned int);
    + extern void cache_set(const char *,unsigned int,const char *,unsigned int,uint32);
    + extern char *cache_get(const char *,unsigned int,unsigned int *,uint32 *);
    +--- a/log.c
    ++++ b/log.c
    +@@ -279,6 +279,12 @@ void log_stats(void)
    +   time_t cur = time(NULL);
    +   extern uint64 numqueries;
    +   extern uint64 cache_motion;
    ++
    ++  /* record cache stats */
    ++  /* James Raftery  6 Nov. 2003 */
    ++  extern uint64 cache_hit;
    ++  extern uint64 cache_miss;
    ++
    +   extern int uactive;
    +   extern int tactive;
    + 
    +@@ -290,6 +296,8 @@ void log_stats(void)
    +   number(numqueries); space();
    +   number(cache_motion); space();
    +   number(uactive); space();
    +-  number(tactive);
    ++  number(tactive); space();
    ++  number(cache_hit); space();
    ++  number(cache_miss);
    +   line();
    + }
    diff --git a/net/djbdns/patches/120-compiler-temporary-filename.patch b/net/djbdns/patches/120-compiler-temporary-filename.patch
    new file mode 100644
    index 0000000..324116d
    --- /dev/null
    +++ b/net/djbdns/patches/120-compiler-temporary-filename.patch
    @@ -0,0 +1,93 @@
    +--- a/pickdns-data.c
    ++++ b/pickdns-data.c
    +@@ -123,7 +123,7 @@ void syntaxerror(const char *why)
    + }
    + void die_datatmp(void)
    + {
    +-  strerr_die2sys(111,FATAL,"unable to create data.tmp: ");
    ++  strerr_die2sys(111,FATAL,"unable to create data.cdb.tmp: ");
    + }
    + 
    + int main()
    +@@ -142,7 +142,7 @@ int main()
    +   if (fd == -1) strerr_die2sys(111,FATAL,"unable to open data: ");
    +   buffer_init(&b,buffer_unixread,fd,bspace,sizeof bspace);
    + 
    +-  fdcdb = open_trunc("data.tmp");
    ++  fdcdb = open_trunc("data.cdb.tmp");
    +   if (fdcdb == -1) die_datatmp();
    +   if (cdb_make_start(&cdb,fdcdb) == -1) die_datatmp();
    + 
    +@@ -223,8 +223,8 @@ int main()
    +   if (cdb_make_finish(&cdb) == -1) die_datatmp();
    +   if (fsync(fdcdb) == -1) die_datatmp();
    +   if (close(fdcdb) == -1) die_datatmp(); /* NFS stupidity */
    +-  if (rename("data.tmp","data.cdb") == -1)
    +-    strerr_die2sys(111,FATAL,"unable to move data.tmp to data.cdb: ");
    ++  if (rename("data.cdb.tmp","data.cdb") == -1)
    ++    strerr_die2sys(111,FATAL,"unable to move data.cdb.tmp to data.cdb: ");
    + 
    +   _exit(0);
    + }
    +--- a/rbldns-data.c
    ++++ b/rbldns-data.c
    +@@ -42,7 +42,7 @@ void syntaxerror(const char *why)
    + }
    + void die_datatmp(void)
    + {
    +-  strerr_die2sys(111,FATAL,"unable to create data.tmp: ");
    ++  strerr_die2sys(111,FATAL,"unable to create data.cdb.tmp: ");
    + }
    + 
    + int main()
    +@@ -59,7 +59,7 @@ int main()
    +   if (fd == -1) strerr_die2sys(111,FATAL,"unable to open data: ");
    +   buffer_init(&b,buffer_unixread,fd,bspace,sizeof bspace);
    + 
    +-  fdcdb = open_trunc("data.tmp");
    ++  fdcdb = open_trunc("data.cdb.tmp");
    +   if (fdcdb == -1) die_datatmp();
    +   if (cdb_make_start(&cdb,fdcdb) == -1) die_datatmp();
    + 
    +@@ -121,8 +121,8 @@ int main()
    +   if (cdb_make_finish(&cdb) == -1) die_datatmp();
    +   if (fsync(fdcdb) == -1) die_datatmp();
    +   if (close(fdcdb) == -1) die_datatmp(); /* NFS stupidity */
    +-  if (rename("data.tmp","data.cdb") == -1)
    +-    strerr_die2sys(111,FATAL,"unable to move data.tmp to data.cdb: ");
    ++  if (rename("data.cdb.tmp","data.cdb") == -1)
    ++    strerr_die2sys(111,FATAL,"unable to move data.cdb.tmp to data.cdb: ");
    + 
    +   _exit(0);
    + }
    +--- a/tinydns-data.c
    ++++ b/tinydns-data.c
    +@@ -27,7 +27,7 @@
    + 
    + void die_datatmp(void)
    + {
    +-  strerr_die2sys(111,FATAL,"unable to create data.tmp: ");
    ++  strerr_die2sys(111,FATAL,"unable to create data.cdb.tmp: ");
    + }
    + void nomem(void)
    + {
    +@@ -207,7 +207,7 @@ int main()
    + 
    +   buffer_init(&b,buffer_unixread,fddata,bspace,sizeof bspace);
    + 
    +-  fdcdb = open_trunc("data.tmp");
    ++  fdcdb = open_trunc("data.cdb.tmp");
    +   if (fdcdb == -1) die_datatmp();
    +   if (cdb_make_start(&cdb,fdcdb) == -1) die_datatmp();
    + 
    +@@ -487,8 +487,8 @@ int main()
    +   if (cdb_make_finish(&cdb) == -1) die_datatmp();
    +   if (fsync(fdcdb) == -1) die_datatmp();
    +   if (close(fdcdb) == -1) die_datatmp(); /* NFS stupidity */
    +-  if (rename("data.tmp","data.cdb") == -1)
    +-    strerr_die2sys(111,FATAL,"unable to move data.tmp to data.cdb: ");
    ++  if (rename("data.cdb.tmp","data.cdb") == -1)
    ++    strerr_die2sys(111,FATAL,"unable to move data.cdb.tmp to data.cdb: ");
    + 
    +   _exit(0);
    + }
    diff --git a/net/djbdns/patches/140-dnsnamex-extra-command.patch b/net/djbdns/patches/140-dnsnamex-extra-command.patch
    new file mode 100644
    index 0000000..6a8cafe
    --- /dev/null
    +++ b/net/djbdns/patches/140-dnsnamex-extra-command.patch
    @@ -0,0 +1,156 @@
    +--- /dev/null
    ++++ b/dnsnamex.c
    +@@ -0,0 +1,34 @@
    ++#include "buffer.h"
    ++#include "exit.h"
    ++#include "strerr.h"
    ++#include "ip4.h"
    ++#include "dns.h"
    ++
    ++#define FATAL "dnsnamex: fatal: "
    ++
    ++static char seed[128];
    ++
    ++char ip[4];
    ++static stralloc out;
    ++
    ++int main(int argc,char **argv)
    ++{
    ++  dns_random_init(seed);
    ++
    ++  if (*argv) ++argv;
    ++
    ++  while (*argv) {
    ++    if (!ip4_scan(*argv,ip))
    ++      strerr_die3x(111,FATAL,"unable to parse IP address ",*argv);
    ++    if (dns_name4_multi(&out,ip) == -1)
    ++      strerr_die4sys(111,FATAL,"unable to find host name for ",*argv,": ");
    ++
    ++    buffer_put(buffer_1,out.s,out.len);
    ++    buffer_puts(buffer_1,"\n");
    ++
    ++    ++argv;
    ++  }
    ++
    ++  buffer_flush(buffer_1);
    ++  _exit(0);
    ++}
    +--- /dev/null
    ++++ b/dns_namex.c
    +@@ -0,0 +1,48 @@
    ++#include "stralloc.h"
    ++#include "uint16.h"
    ++#include "byte.h"
    ++#include "dns.h"
    ++
    ++static char *q = 0;
    ++
    ++int dns_name_packet_multi(stralloc *out,const char *buf,unsigned int len)
    ++{
    ++  unsigned int pos;
    ++  char header[12];
    ++  uint16 numanswers;
    ++  uint16 datalen;
    ++
    ++  if (!stralloc_copys(out,"")) return -1;
    ++
    ++  pos = dns_packet_copy(buf,len,0,header,12); if (!pos) return -1;
    ++  uint16_unpack_big(header + 6,&numanswers);
    ++  pos = dns_packet_skipname(buf,len,pos); if (!pos) return -1;
    ++  pos += 4;
    ++
    ++  while (numanswers--) {
    ++    pos = dns_packet_skipname(buf,len,pos); if (!pos) return -1;
    ++    pos = dns_packet_copy(buf,len,pos,header,10); if (!pos) return -1;
    ++    uint16_unpack_big(header + 8,&datalen);
    ++    if (byte_equal(header,2,DNS_T_PTR))
    ++      if (byte_equal(header + 2,2,DNS_C_IN)) {
    ++	if (!dns_packet_getname(buf,len,pos,&q)) return -1;
    ++	if (!dns_domain_todot_cat(out,q)) return -1;
    ++	if (!stralloc_cats(out, " ")) return -1 ; 
    ++      }
    ++    pos += datalen;
    ++  }
    ++
    ++  return 0;
    ++}
    ++
    ++int dns_name4_multi(stralloc *out,const char ip[4])
    ++{
    ++  char name[DNS_NAME4_DOMAIN];
    ++
    ++  dns_name4_domain(name,ip);
    ++  if (dns_resolve(name,DNS_T_PTR) == -1) return -1;
    ++  if (dns_name_packet_multi(out,dns_resolve_tx.packet,dns_resolve_tx.packetlen) == -1) return -1;
    ++  dns_transmit_free(&dns_resolve_tx);
    ++  dns_domain_free(&q);
    ++  return 0;
    ++}
    +--- a/dns.h
    ++++ b/dns.h
    +@@ -70,9 +70,11 @@ extern struct dns_transmit dns_resolve_t
    + extern int dns_ip4_packet(stralloc *,const char *,unsigned int);
    + extern int dns_ip4(stralloc *,const stralloc *);
    + extern int dns_name_packet(stralloc *,const char *,unsigned int);
    ++extern int dns_name_packet_multi(stralloc *,const char *,unsigned int);
    + extern void dns_name4_domain(char *,const char *);
    + #define DNS_NAME4_DOMAIN 31
    + extern int dns_name4(stralloc *,const char *);
    ++extern int dns_name4_multi(stralloc *,const char *);
    + extern int dns_txt_packet(stralloc *,const char *,unsigned int);
    + extern int dns_txt(stralloc *,const stralloc *);
    + extern int dns_mx_packet(stralloc *,const char *,unsigned int);
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -219,10 +219,10 @@ uint64.h taia.h dd.h
    + 
    + dns.a: \
    + makelib dns_dfd.o dns_domain.o dns_dtda.o dns_ip.o dns_ipq.o dns_mx.o \
    +-dns_name.o dns_nd.o dns_packet.o dns_random.o dns_rcip.o dns_rcrw.o \
    ++dns_name.o dns_namex.o dns_nd.o dns_packet.o dns_random.o dns_rcip.o dns_rcrw.o \
    + dns_resolve.o dns_sortip.o dns_transmit.o dns_txt.o
    + 	./makelib dns.a dns_dfd.o dns_domain.o dns_dtda.o dns_ip.o \
    +-	dns_ipq.o dns_mx.o dns_name.o dns_nd.o dns_packet.o \
    ++	dns_ipq.o dns_mx.o dns_name.o dns_namex.o dns_nd.o dns_packet.o \
    + 	dns_random.o dns_rcip.o dns_rcrw.o dns_resolve.o \
    + 	dns_sortip.o dns_transmit.o dns_txt.o
    + 
    +@@ -261,6 +261,11 @@ compile dns_name.c stralloc.h gen_alloc.
    + stralloc.h iopause.h taia.h tai.h uint64.h taia.h
    + 	./compile dns_name.c
    + 
    ++dns_namex.o: \
    ++compile dns_namex.c stralloc.h gen_alloc.h uint16.h byte.h dns.h \
    ++stralloc.h iopause.h taia.h tai.h uint64.h taia.h
    ++	./compile dns_namex.c
    ++
    + dns_nd.o: \
    + compile dns_nd.c byte.h fmt.h dns.h stralloc.h gen_alloc.h iopause.h \
    + taia.h tai.h uint64.h taia.h
    +@@ -394,6 +399,17 @@ compile dnsname.c buffer.h exit.h strerr
    + gen_alloc.h iopause.h taia.h tai.h uint64.h taia.h
    + 	./compile dnsname.c
    + 
    ++dnsnamex: \
    ++load dnsnamex.o iopause.o dns.a env.a libtai.a alloc.a buffer.a unix.a \
    ++byte.a socket.lib
    ++	./load dnsnamex iopause.o dns.a env.a libtai.a alloc.a \
    ++	buffer.a unix.a byte.a  `cat socket.lib`
    ++
    ++dnsnamex.o: \
    ++compile dnsnamex.c buffer.h exit.h strerr.h ip4.h dns.h stralloc.h \
    ++gen_alloc.h iopause.h taia.h tai.h uint64.h taia.h
    ++	./compile dnsnamex.c
    ++
    + dnsq: \
    + load dnsq.o iopause.o printrecord.o printpacket.o parsetype.o dns.a \
    + env.a libtai.a buffer.a alloc.a unix.a byte.a socket.lib
    +@@ -658,7 +674,7 @@ prog: \
    + dnscache-conf dnscache walldns-conf walldns rbldns-conf rbldns \
    + rbldns-data pickdns-conf pickdns pickdns-data tinydns-conf tinydns \
    + tinydns-data tinydns-get tinydns-edit axfr-get axfrdns-conf axfrdns \
    +-dnsip dnsipq dnsname dnstxt dnsmx dnsfilter random-ip dnsqr dnsq \
    ++dnsip dnsipq dnsname dnsnamex dnstxt dnsmx dnsfilter random-ip dnsqr dnsq \
    + dnstrace dnstracesort cachetest utime rts
    + 
    + prot.o: \
    diff --git a/net/djbdns/patches/200-dnscache-cname-handling.patch b/net/djbdns/patches/200-dnscache-cname-handling.patch
    new file mode 100644
    index 0000000..ed96ac9
    --- /dev/null
    +++ b/net/djbdns/patches/200-dnscache-cname-handling.patch
    @@ -0,0 +1,226 @@
    +--- a/query.c
    ++++ b/query.c
    +@@ -91,6 +91,21 @@ static void cleanup(struct query *z)
    +   }
    + }
    + 
    ++static int move_name_to_alias(struct query *z,uint32 ttl)
    ++{
    ++  int j ;
    ++
    ++  if (z->alias[QUERY_MAXALIAS - 1]) return 0 ;
    ++  for (j = QUERY_MAXALIAS - 1;j > 0;--j)
    ++    z->alias[j] = z->alias[j - 1];
    ++  for (j = QUERY_MAXALIAS - 1;j > 0;--j)
    ++    z->aliasttl[j] = z->aliasttl[j - 1];
    ++  z->alias[0] = z->name[0];
    ++  z->aliasttl[0] = ttl;
    ++  z->name[0] = 0;
    ++  return 1 ;
    ++}
    ++
    + static int rqa(struct query *z)
    + {
    +   int i;
    +@@ -123,7 +138,6 @@ static int globalip(char *d,char ip[4])
    + static char *t1 = 0;
    + static char *t2 = 0;
    + static char *t3 = 0;
    +-static char *cname = 0;
    + static char *referral = 0;
    + static unsigned int *records = 0;
    + 
    +@@ -179,15 +193,14 @@ static int doit(struct query *z,int stat
    +   uint16 datalen;
    +   char *control;
    +   char *d;
    ++  char *owner_name = 0 ;
    +   const char *dtype;
    +   unsigned int dlen;
    +   int flagout;
    +-  int flagcname;
    +   int flagreferral;
    +   int flagsoa;
    +   uint32 ttl;
    +   uint32 soattl;
    +-  uint32 cnamettl;
    +   int i;
    +   int j;
    +   int k;
    +@@ -253,7 +266,10 @@ static int doit(struct query *z,int stat
    + 
    +     byte_copy(key,2,DNS_T_CNAME);
    +     cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
    +-    if (cached) {
    ++    /* A previous explicit query might have caused an empty RRSet to have been
    ++    ** cached.  Take care to ignore such a thing. 
    ++    */
    ++    if (cached && cachedlen) {
    +       if (typematch(DNS_T_CNAME,dtype)) {
    +         log_cachedanswer(d,DNS_T_CNAME);
    +         if (!rqa(z)) goto DIE;
    +@@ -262,8 +278,11 @@ static int doit(struct query *z,int stat
    + 	return 1;
    +       }
    +       log_cachedcname(d,cached);
    +-      if (!dns_domain_copy(&cname,cached)) goto DIE;
    +-      goto CNAME;
    ++      if (!z->level) {
    ++	if (!move_name_to_alias(z,ttl)) goto DIE ;
    ++      }
    ++      if (!dns_domain_copy(&z->name[z->level],cached)) goto DIE;
    ++      goto NEWNAME;
    +     }
    + 
    +     if (typematch(DNS_T_NS,dtype)) {
    +@@ -352,7 +371,7 @@ static int doit(struct query *z,int stat
    +       }
    +     }
    + 
    +-    if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype)) {
    ++    if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype)) {
    +       byte_copy(key,2,dtype);
    +       cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
    +       if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) {
    +@@ -473,29 +492,31 @@ static int doit(struct query *z,int stat
    + 
    +   cachettl = 0;
    +   flagout = 0;
    +-  flagcname = 0;
    +   flagreferral = 0;
    +   flagsoa = 0;
    +   soattl = 0;
    +-  cnamettl = 0;
    ++  if (!dns_domain_copy(&owner_name,d)) goto DIE;
    ++  /* This code assumes that the CNAME chain is presented in the correct 
    ++  ** order.  The example algorithm in RFC 1034 will actually result in this
    ++  ** being the case, but the words do not require it to be so.
    ++  */
    +   for (j = 0;j < numanswers;++j) {
    +     pos = dns_packet_getname(buf,len,pos,&t1); if (!pos) goto DIE;
    +     pos = dns_packet_copy(buf,len,pos,header,10); if (!pos) goto DIE;
    + 
    +-    if (dns_domain_equal(t1,d))
    ++    if (dns_domain_equal(t1,owner_name))
    +       if (byte_equal(header + 2,2,DNS_C_IN)) { /* should always be true */
    +         if (typematch(header,dtype))
    +           flagout = 1;
    +         else if (typematch(header,DNS_T_CNAME)) {
    +-          if (!dns_packet_getname(buf,len,pos,&cname)) goto DIE;
    +-          flagcname = 1;
    +-	  cnamettl = ttlget(header + 4);
    ++          if (!dns_packet_getname(buf,len,pos,&owner_name)) goto DIE;
    +         }
    +       }
    +   
    +     uint16_unpack_big(header + 8,&datalen);
    +     pos += datalen;
    +   }
    ++  dns_domain_free(&owner_name) ;
    +   posauthority = pos;
    + 
    +   for (j = 0;j < numauthority;++j) {
    +@@ -522,15 +543,6 @@ static int doit(struct query *z,int stat
    +   }
    +   posglue = pos;
    + 
    +-
    +-  if (!flagcname && !rcode && !flagout && flagreferral && !flagsoa)
    +-    if (dns_domain_equal(referral,control) || !dns_domain_suffix(referral,control)) {
    +-      log_lame(whichserver,control,referral);
    +-      byte_zero(whichserver,4);
    +-      goto HAVENS;
    +-    }
    +-
    +-
    +   if (records) { alloc_free(records); records = 0; }
    + 
    +   k = numanswers + numauthority + numglue;
    +@@ -677,24 +689,36 @@ static int doit(struct query *z,int stat
    + 
    +   alloc_free(records); records = 0;
    + 
    ++  if (byte_diff(DNS_T_CNAME,2,dtype)) {
    ++    /* This code assumes that the CNAME chain is presented in the correct 
    ++    ** order.  The example algorithm in RFC 1034 will actually result in this
    ++    ** being the case, but the words do not require it to be so.
    ++    */
    ++    pos = posanswers;
    ++    for (j = 0;j < numanswers;++j) {
    ++      pos = dns_packet_getname(buf,len,pos,&t1); if (!pos) goto DIE;
    ++      pos = dns_packet_copy(buf,len,pos,header,10); if (!pos) goto DIE;
    ++
    ++      if (dns_domain_equal(t1,d))
    ++	if (byte_equal(header + 2,2,DNS_C_IN)) { /* should always be true */
    ++	  if (typematch(header,DNS_T_CNAME)) {
    ++	    ttl = ttlget(header + 4);
    ++	    if (z->level == 0) {
    ++	      if (!move_name_to_alias(z,ttl)) goto DIE ;
    ++	    }
    ++	    if (!dns_packet_getname(buf,len,pos,&z->name[z->level])) goto DIE;
    ++	    d = z->name[z->level];
    ++	    if (!dns_domain_suffix(d,control) || !roots_same(d,control))
    ++	      goto NEWNAME ;  /* Cannot trust the chain further - restart using current name */
    ++	  }
    ++	}
    + 
    +-  if (flagcname) {
    +-    ttl = cnamettl;
    +-    CNAME:
    +-    if (!z->level) {
    +-      if (z->alias[QUERY_MAXALIAS - 1]) goto DIE;
    +-      for (j = QUERY_MAXALIAS - 1;j > 0;--j)
    +-        z->alias[j] = z->alias[j - 1];
    +-      for (j = QUERY_MAXALIAS - 1;j > 0;--j)
    +-        z->aliasttl[j] = z->aliasttl[j - 1];
    +-      z->alias[0] = z->name[0];
    +-      z->aliasttl[0] = ttl;
    +-      z->name[0] = 0;
    ++      uint16_unpack_big(header + 8,&datalen);
    ++      pos += datalen;
    +     }
    +-    if (!dns_domain_copy(&z->name[z->level],cname)) goto DIE;
    +-    goto NEWNAME;
    +   }
    + 
    ++  /* A "no such name" error applies to the end of any CNAME chain, not to the start. */
    +   if (rcode == 3) {
    +     log_nxdomain(whichserver,d,cachettl);
    +     cachegeneric(DNS_T_ANY,d,"",0,cachettl);
    +@@ -707,10 +731,26 @@ static int doit(struct query *z,int stat
    +     return 1;
    +   }
    + 
    ++  /* We check for a lame server _after_ we have cached any records that it
    ++  ** might have returned to us.  This copes better with the incorrect
    ++  ** behaviour of one content DNS server software that doesn't return
    ++  ** complete CNAME chains but instead returns only the first link in a
    ++  ** chain followed by a lame delegation to the same server.
    ++  ** Also: We check for a lame server _after_ following the CNAME chain.  The
    ++  ** delegation in a referral answer applies to the _end_ of the chain, not
    ++  ** to the beginning.
    ++  */
    ++  if (!rcode && !flagout && flagreferral && !flagsoa)
    ++    if (dns_domain_equal(referral,control) || !dns_domain_suffix(referral,control)) {
    ++      log_lame(whichserver,control,referral);
    ++      byte_zero(whichserver,4);
    ++      goto HAVENS;
    ++    }
    ++
    +   if (!flagout && flagsoa)
    ++    /* Don't save empty RRSets for those types that we use as special markers. */
    +     if (byte_diff(DNS_T_ANY,2,dtype))
    +-      if (byte_diff(DNS_T_AXFR,2,dtype))
    +-        if (byte_diff(DNS_T_CNAME,2,dtype)) {
    ++      if (byte_diff(DNS_T_AXFR,2,dtype)) {
    +           save_start();
    +           save_finish(dtype,d,soattl);
    + 	  log_nodata(whichserver,d,dtype,soattl);
    +@@ -822,6 +862,7 @@ static int doit(struct query *z,int stat
    +   DIE:
    +   cleanup(z);
    +   if (records) { alloc_free(records); records = 0; }
    ++  dns_domain_free(&owner_name) ;
    +   return -1;
    + }
    + 
    diff --git a/net/djbdns/patches/210-dnscache-strict-forwardonly.patch b/net/djbdns/patches/210-dnscache-strict-forwardonly.patch
    new file mode 100644
    index 0000000..b64e4a4
    --- /dev/null
    +++ b/net/djbdns/patches/210-dnscache-strict-forwardonly.patch
    @@ -0,0 +1,47 @@
    +--- a/log.h
    ++++ b/log.h
    +@@ -25,6 +25,7 @@ extern void log_nxdomain(const char *,co
    + extern void log_nodata(const char *,const char *,const char *,unsigned int);
    + extern void log_servfail(const char *);
    + extern void log_lame(const char *,const char *,const char *);
    ++extern void log_ignore_referral(const char *,const char *,const char *);
    + 
    + extern void log_rr(const char *,const char *,const char *,const char *,unsigned int,unsigned int);
    + extern void log_rrns(const char *,const char *,const char *,unsigned int);
    +--- a/log.c
    ++++ b/log.c
    +@@ -197,6 +197,13 @@ void log_lame(const char server[4],const
    +   line();
    + }
    + 
    ++void log_ignore_referral(const char server[4],const char * control, const char *referral)
    ++{
    ++  string("ignored referral "); ip(server); space();
    ++  name(control); space(); name(referral);
    ++  line();
    ++}
    ++
    + void log_servfail(const char *dn)
    + {
    +   const char *x = error_str(errno);
    +--- a/query.c
    ++++ b/query.c
    +@@ -828,6 +828,18 @@ static int doit(struct query *z,int stat
    + 
    + 
    +   if (!dns_domain_suffix(d,referral)) goto DIE;
    ++
    ++  /* In strict "forwardonly" mode, we don't, as the manual states,
    ++  ** contact a chain of servers according to "NS" resource records.
    ++  ** We don't obey any referral responses, therefore.  Instead, we
    ++  ** eliminate the server from the list and try the next one.
    ++  */
    ++  if (flagforwardonly) {
    ++      log_ignore_referral(whichserver,control,referral);
    ++      byte_zero(whichserver,4);
    ++      goto HAVENS;
    ++  }
    ++
    +   control = d + dns_domain_suffixpos(d,referral);
    +   z->control[z->level] = control;
    +   byte_zero(z->servers[z->level],64);
    diff --git a/net/djbdns/patches/220-dnscacheip-space-separator.patch b/net/djbdns/patches/220-dnscacheip-space-separator.patch
    new file mode 100644
    index 0000000..2e73ffe
    --- /dev/null
    +++ b/net/djbdns/patches/220-dnscacheip-space-separator.patch
    @@ -0,0 +1,11 @@
    +--- a/dns_rcip.c
    ++++ b/dns_rcip.c
    +@@ -17,7 +17,7 @@ static int init(char ip[64])
    +   x = env_get("DNSCACHEIP");
    +   if (x)
    +     while (iplen <= 60) {
    +-      if (*x == '.')
    ++      if (*x == ' ' || *x == '\t' || *x == '\n')
    + 	++x;
    +       else {
    +         i = ip4_scan(x,ip + iplen);
    diff --git a/net/djbdns/patches/230-tinydns-data-semantic-error.patch b/net/djbdns/patches/230-tinydns-data-semantic-error.patch
    new file mode 100644
    index 0000000..69b9441
    --- /dev/null
    +++ b/net/djbdns/patches/230-tinydns-data-semantic-error.patch
    @@ -0,0 +1,194 @@
    +--- a/tinydns-data.c
    ++++ b/tinydns-data.c
    +@@ -25,6 +25,14 @@
    + 
    + #define FATAL "tinydns-data: fatal: "
    + 
    ++void die_semantic2(const char * s1, const char * s2)
    ++{
    ++  strerr_die3x(111,FATAL,s1,s2) ;
    ++}
    ++void die_semantic4(const char * s1, const char * s2,const char * s3, const char * s4)
    ++{
    ++  strerr_die5x(111,FATAL,s1,s2,s3,s4) ;
    ++}
    + void die_datatmp(void)
    + {
    +   strerr_die2sys(111,FATAL,"unable to create data.cdb.tmp: ");
    +@@ -34,20 +42,39 @@ void nomem(void)
    +   strerr_die1sys(111,FATAL);
    + }
    + 
    ++void ttlparse(stralloc *sa,unsigned long * ttl, unsigned long defttl, const char * ltype)
    ++{
    ++    int ttllen ;
    ++
    ++    if (sa->len > 0) {
    ++	if (!stralloc_0(sa)) nomem();
    ++	ttllen = scan_ulong(sa->s,ttl) ;
    ++	if (ttllen + 1 != sa->len)
    ++	    die_semantic4("unparseable TTL in ",ltype," line: ", sa->s) ;
    ++    } else
    ++	*ttl = defttl;
    ++}
    ++
    + void ttdparse(stralloc *sa,char ttd[8])
    + {
    +   unsigned int i;
    +   char ch;
    + 
    +   byte_zero(ttd,8);
    +-  for (i = 0;(i < 16) && (i < sa->len);++i) {
    ++  for (i = 0;i < sa->len;++i) {
    ++    if (i >= 16) {
    ++      if (!stralloc_0(sa)) nomem() ;
    ++      die_semantic2("timestamp is too long: ", sa->s) ;
    ++    }
    +     ch = sa->s[i];
    +     if ((ch >= '0') && (ch <= '9'))
    +       ch -= '0';
    +     else if ((ch >= 'a') && (ch <= 'f'))
    +       ch -= 'a' - 10;
    +-    else
    +-      ch = 0;
    ++    else {
    ++      if (!stralloc_0(sa)) nomem() ;
    ++      die_semantic2("timestamp contains an invalid character: ", sa->s) ;
    ++    }
    +     if (!(i & 1)) ch <<= 4;
    +     ttd[i >> 1] |= ch;
    +   }
    +@@ -55,6 +82,10 @@ void ttdparse(stralloc *sa,char ttd[8])
    + 
    + void locparse(stralloc *sa,char loc[2])
    + {
    ++  if (sa->len > 2) {
    ++    if (!stralloc_0(sa)) nomem() ;
    ++    die_semantic2("location code longer than two characters: ", sa->s) ;
    ++  }
    +   loc[0] = (sa->len > 0) ? sa->s[0] : 0;
    +   loc[1] = (sa->len > 1) ? sa->s[1] : 0;
    + }
    +@@ -187,6 +218,7 @@ int main()
    +   int i;
    +   int j;
    +   int k;
    ++  int iplen ;
    +   char ch;
    +   unsigned long ttl;
    +   char ttd[8];
    +@@ -267,8 +299,7 @@ int main()
    + 	if (!scan_ulong(f[7].s,&u)) uint32_unpack_big(defaultsoa + 16,&u);
    + 	uint32_pack_big(soa + 16,u);
    + 
    +-	if (!stralloc_0(&f[8])) nomem();
    +-	if (!scan_ulong(f[8].s,&ttl)) ttl = TTL_NEGATIVE;
    ++	ttlparse(&f[8],&ttl,TTL_NEGATIVE,"Z");
    + 	ttdparse(&f[9],ttd);
    + 	locparse(&f[10],loc);
    + 
    +@@ -283,8 +314,7 @@ int main()
    + 
    +       case '.': case '&':
    + 	if (!dns_domain_fromdot(&d1,f[0].s,f[0].len)) nomem();
    +-	if (!stralloc_0(&f[3])) nomem();
    +-	if (!scan_ulong(f[3].s,&ttl)) ttl = TTL_NS;
    ++	ttlparse(&f[3],&ttl,TTL_NS,". or &");
    + 	ttdparse(&f[4],ttd);
    + 	locparse(&f[5],loc);
    + 
    +@@ -309,24 +339,26 @@ int main()
    + 	rr_addname(d2);
    + 	rr_finish(d1);
    + 
    +-	if (ip4_scan(f[1].s,ip)) {
    ++	iplen = ip4_scan(f[1].s,ip) ;
    ++	if (iplen != 0 && iplen + 1 == f[1].len) {
    + 	  rr_start(DNS_T_A,ttl,ttd,loc);
    + 	  rr_add(ip,4);
    + 	  rr_finish(d2);
    +-	}
    ++	} else if (f[1].len > 1)
    ++	  die_semantic4("unparseable IP address in ","& or ."," line: ", f[1].s) ;
    + 
    + 	break;
    + 
    +       case '+': case '=':
    + 	if (!dns_domain_fromdot(&d1,f[0].s,f[0].len)) nomem();
    +-	if (!stralloc_0(&f[2])) nomem();
    +-	if (!scan_ulong(f[2].s,&ttl)) ttl = TTL_POSITIVE;
    ++	ttlparse(&f[2],&ttl,TTL_POSITIVE,"+ or =");
    + 	ttdparse(&f[3],ttd);
    + 	locparse(&f[4],loc);
    + 
    + 	if (!stralloc_0(&f[1])) nomem();
    + 
    +-	if (ip4_scan(f[1].s,ip)) {
    ++	iplen = ip4_scan(f[1].s,ip) ;
    ++	if (iplen != 0 && iplen + 1 == f[1].len) {
    + 	  rr_start(DNS_T_A,ttl,ttd,loc);
    + 	  rr_add(ip,4);
    + 	  rr_finish(d1);
    +@@ -337,13 +369,15 @@ int main()
    + 	    rr_addname(d1);
    + 	    rr_finish(dptr);
    + 	  }
    +-	}
    ++	} else if (f[1].len > 1)
    ++	  die_semantic4("unparseable IP address in ","+ or ="," line: ", f[1].s) ;
    ++	else
    ++	  die_semantic4("missing IP address in ","+ or ="," line: ", f[1].s) ;
    + 	break;
    + 
    +       case '@':
    + 	if (!dns_domain_fromdot(&d1,f[0].s,f[0].len)) nomem();
    +-	if (!stralloc_0(&f[4])) nomem();
    +-	if (!scan_ulong(f[4].s,&ttl)) ttl = TTL_POSITIVE;
    ++	ttlparse(&f[4],&ttl,TTL_POSITIVE,"@");
    + 	ttdparse(&f[5],ttd);
    + 	locparse(&f[6],loc);
    + 
    +@@ -401,18 +435,19 @@ int main()
    + 	rr_addname(d2);
    + 	rr_finish(d1);
    + 
    +-	if (ip4_scan(f[1].s,ip)) {
    ++	iplen = ip4_scan(f[1].s,ip) ;
    ++	if (iplen != 0 && iplen + 1 == f[1].len) {
    + 	  rr_start(DNS_T_A,ttl,ttd,loc);
    + 	  rr_add(ip,4);
    + 	  rr_finish(d2);
    +-	}
    ++	} else if (f[1].len > 1)
    ++	  die_semantic4("unparseable IP address in ","@"," line: ", f[1].s) ;
    + 	break;
    + 
    +       case '^': case 'C':
    + 	if (!dns_domain_fromdot(&d1,f[0].s,f[0].len)) nomem();
    + 	if (!dns_domain_fromdot(&d2,f[1].s,f[1].len)) nomem();
    +-	if (!stralloc_0(&f[2])) nomem();
    +-	if (!scan_ulong(f[2].s,&ttl)) ttl = TTL_POSITIVE;
    ++	ttlparse(&f[2],&ttl,TTL_POSITIVE,"^ or C");
    + 	ttdparse(&f[3],ttd);
    + 	locparse(&f[4],loc);
    + 
    +@@ -426,8 +461,7 @@ int main()
    + 
    +       case '\'':
    + 	if (!dns_domain_fromdot(&d1,f[0].s,f[0].len)) nomem();
    +-	if (!stralloc_0(&f[2])) nomem();
    +-	if (!scan_ulong(f[2].s,&ttl)) ttl = TTL_POSITIVE;
    ++	ttlparse(&f[2],&ttl,TTL_POSITIVE,"\'");
    + 	ttdparse(&f[3],ttd);
    + 	locparse(&f[4],loc);
    + 
    +@@ -449,8 +483,7 @@ int main()
    + 
    +       case ':':
    + 	if (!dns_domain_fromdot(&d1,f[0].s,f[0].len)) nomem();
    +-	if (!stralloc_0(&f[3])) nomem();
    +-	if (!scan_ulong(f[3].s,&ttl)) ttl = TTL_POSITIVE;
    ++	ttlparse(&f[3],&ttl,TTL_POSITIVE,":");
    + 	ttdparse(&f[4],ttd);
    + 	locparse(&f[5],loc);
    + 
    diff --git a/net/djbdns/patches/240-tinydns-alias-chain-truncation.patch b/net/djbdns/patches/240-tinydns-alias-chain-truncation.patch
    new file mode 100644
    index 0000000..f94399e
    --- /dev/null
    +++ b/net/djbdns/patches/240-tinydns-alias-chain-truncation.patch
    @@ -0,0 +1,87 @@
    +--- a/tdlookup.c
    ++++ b/tdlookup.c
    +@@ -103,12 +103,13 @@ static int doname(void)
    +   return response_addname(d1);
    + }
    + 
    +-static int doit(char *q,char qtype[2])
    ++static int doit1(char **pqname,char qtype[2])
    + {
    +   unsigned int bpos;
    +   unsigned int anpos;
    +   unsigned int aupos;
    +   unsigned int arpos;
    ++  char *q;
    +   char *control;
    +   char *wild;
    +   int flaggavesoa;
    +@@ -122,6 +123,12 @@ static int doit(char *q,char qtype[2])
    +   int addrnum;
    +   uint32 addrttl;
    +   int i;
    ++  int loop = 0 ;
    ++
    ++RESTART:
    ++  if (loop++ >= 100) return 0 ;
    ++
    ++  q = *pqname ;
    + 
    +   anpos = response_len;
    + 
    +@@ -136,7 +143,14 @@ static int doit(char *q,char qtype[2])
    +       if (byte_equal(type,2,DNS_T_NS)) flagns = 1;
    +     }
    +     if (flagns) break;
    +-    if (!*control) return 0; /* q is not within our bailiwick */
    ++    if (!*control) { /* q is not within our bailiwick */
    ++      if (loop <= 1)
    ++        return 0 ;
    ++      else {
    ++        response[2] &= ~4;
    ++        goto DONE; /* The administrator has issued contradictory instructions */
    ++      }
    ++    }
    +     control += *control;
    +     control += 1;
    +   }
    +@@ -172,9 +186,17 @@ static int doit(char *q,char qtype[2])
    + 	continue;
    +       }
    +       if (!response_rstart(q,type,ttl)) return 0;
    +-      if (byte_equal(type,2,DNS_T_NS) || byte_equal(type,2,DNS_T_CNAME) || byte_equal(type,2,DNS_T_PTR)) {
    ++      if (byte_equal(type,2,DNS_T_NS) || byte_equal(type,2,DNS_T_PTR)) {
    + 	if (!doname()) return 0;
    +       }
    ++      else if (byte_equal(type,2,DNS_T_CNAME)) {
    ++	if (!doname()) return 0;
    ++        if (byte_diff(type,2,qtype)) {
    ++	  response_rfinish(RESPONSE_ANSWER);
    ++	  if (!dns_domain_copy(pqname,d1)) return 0 ;
    ++	  goto RESTART ;
    ++	}
    ++      }
    +       else if (byte_equal(type,2,DNS_T_MX)) {
    + 	if (!dobytes(2)) return 0;
    + 	if (!doname()) return 0;
    +@@ -275,9 +297,21 @@ static int doit(char *q,char qtype[2])
    +     }
    +   }
    + 
    ++DONE:
    +   return 1;
    + }
    + 
    ++static int doit(char *qname,char qtype[2])
    ++{
    ++  int r ;
    ++  char * q = 0 ;
    ++
    ++  if (!dns_domain_copy(&q, qname)) return 0 ;
    ++  r = doit1(&q, qtype) ;
    ++  dns_domain_free(&q) ;
    ++  return r ;
    ++}
    ++
    + int respond(char *q,char qtype[2],char ip[4])
    + {
    +   static struct tai cdb_valid = { 0 };
    diff --git a/net/djbdns/patches/250-dnscache-slogging.patch b/net/djbdns/patches/250-dnscache-slogging.patch
    new file mode 100644
    index 0000000..5a2eaa1
    --- /dev/null
    +++ b/net/djbdns/patches/250-dnscache-slogging.patch
    @@ -0,0 +1,122 @@
    +--- a/server.c
    ++++ b/server.c
    +@@ -25,12 +25,63 @@ static int len;
    + 
    + static char *q;
    + 
    ++static uint64 stats_numq;
    ++static uint64 stats_plus;
    ++static uint64 stats_minus;
    ++static uint64 stats_nx;
    ++static uint64 stats_notimp;
    ++static uint64 stats_weird;
    ++static uint64 stats_noq;
    ++
    ++/* work around gcc 2.95.2 bug */
    ++#define number(x) ( (u64 = (x)), u64_print() )
    ++static uint64 u64;
    ++static void u64_print(void)
    ++{
    ++  char ubuf[20];
    ++  unsigned int pos;
    ++
    ++  pos = sizeof ubuf;
    ++  do {
    ++    if (!pos) break;
    ++    ubuf[--pos] = '0' + (u64 % 10);
    ++    u64 /= 10;
    ++  } while(u64);
    ++
    ++  buffer_put(buffer_2,ubuf + pos,sizeof ubuf - pos);
    ++}
    ++
    ++static void string(const char *s)
    ++{
    ++  buffer_puts(buffer_2,s);
    ++}
    ++
    ++static void line(void)
    ++{
    ++  string("\n");
    ++  buffer_flush(buffer_2);
    ++}
    ++
    ++static void log_stats(void)
    ++{
    ++  string("stats ");
    ++  number(stats_numq); string(" ");
    ++  number(stats_plus); string(" ");
    ++  number(stats_minus); string(" ");
    ++  number(stats_nx); string(" ");
    ++  number(stats_notimp); string(" ");
    ++  number(stats_weird); string(" ");
    ++  number(stats_noq);
    ++  line();
    ++}
    ++
    + static int doit(void)
    + {
    +   unsigned int pos;
    +   char header[12];
    +   char qtype[2];
    +   char qclass[2];
    ++  stats_numq++;
    + 
    +   if (len >= sizeof buf) goto NOQ;
    +   pos = dns_packet_copy(buf,len,0,header,12); if (!pos) goto NOQ;
    +@@ -56,25 +107,37 @@ static int doit(void)
    + 
    +   case_lowerb(q,dns_domain_length(q));
    +   if (!respond(q,qtype,ip)) {
    ++    stats_minus++;
    +     qlog(ip,port,header,q,qtype," - ");
    +     return 0;
    +   }
    +-  qlog(ip,port,header,q,qtype," + ");
    ++
    ++  if ((response[2] & 4) && (response[3] & 3)) {
    ++    stats_nx++;
    ++    qlog(ip,port,header,q,qtype," N ");
    ++  }
    ++  else {
    ++    stats_plus++;
    ++    qlog(ip,port,header,q,qtype," + ");
    ++  }
    +   return 1;
    + 
    +   NOTIMP:
    ++  stats_notimp++;
    +   response[3] &= ~15;
    +   response[3] |= 4;
    +   qlog(ip,port,header,q,qtype," I ");
    +   return 1;
    + 
    +   WEIRDCLASS:
    ++  stats_weird++;
    +   response[3] &= ~15;
    +   response[3] |= 1;
    +   qlog(ip,port,header,q,qtype," C ");
    +   return 1;
    + 
    +   NOQ:
    ++  stats_noq++;
    +   qlog(ip,port,"\0\0","","\0\0"," / ");
    +   return 0;
    + }
    +@@ -83,6 +146,7 @@ int main()
    + {
    +   char *x;
    +   int udp53;
    ++  unsigned char flag=0;
    + 
    +   x = env_get("IP");
    +   if (!x)
    +@@ -106,6 +170,8 @@ int main()
    +   buffer_putsflush(buffer_2,starting);
    + 
    +   for (;;) {
    ++    if ((flag++)%32==1)
    ++      log_stats();
    +     len = socket_recv4(udp53,buf,sizeof buf,ip,&port);
    +     if (len < 0) continue;
    +     if (!doit()) continue;
    diff --git a/net/djbdns/patches/260-dnsfilter-replace.patch b/net/djbdns/patches/260-dnsfilter-replace.patch
    new file mode 100644
    index 0000000..b352f1c
    --- /dev/null
    +++ b/net/djbdns/patches/260-dnsfilter-replace.patch
    @@ -0,0 +1,71 @@
    +--- a/dnsfilter.c
    ++++ b/dnsfilter.c
    +@@ -41,6 +41,7 @@ int inbuflen = 0;
    + iopause_fd *inio;
    + int flag0 = 1;
    + 
    ++int opt_replace = 0;
    + iopause_fd *io;
    + int iolen;
    + 
    +@@ -51,12 +52,16 @@ char name[DNS_NAME4_DOMAIN];
    + void errout(int i)
    + {
    +   int j;
    +-
    +-  if (!stralloc_copys(&x[i].middle,":")) nomem();
    +-  if (!stralloc_cats(&x[i].middle,error_str(errno))) nomem();
    +-  for (j = 0;j < x[i].middle.len;++j)
    +-    if (x[i].middle.s[j] == ' ')
    +-      x[i].middle.s[j] = '-';
    ++ 
    ++  if (opt_replace) 
    ++    x[i].middle.len=0;
    ++  else {
    ++    if (!stralloc_copys(&x[i].middle,":")) nomem();
    ++    if (!stralloc_cats(&x[i].middle,error_str(errno))) nomem();
    ++    for (j = 0;j < x[i].middle.len;++j)
    ++      if (x[i].middle.s[j] == ' ')
    ++        x[i].middle.s[j] = '-';
    ++  }
    + }
    + 
    + int main(int argc,char **argv)
    +@@ -69,7 +74,7 @@ int main(int argc,char **argv)
    +   int j;
    +   int r;
    + 
    +-  while ((opt = getopt(argc,argv,"c:l:")) != opteof)
    ++  while ((opt = getopt(argc,argv,"c:l:r")) != opteof)
    +     switch(opt) {
    +       case 'c':
    + 	scan_ulong(optarg,&u);
    +@@ -83,8 +88,11 @@ int main(int argc,char **argv)
    + 	if (u > 1000000) u = 1000000;
    + 	xmax = u;
    + 	break;
    ++      case 'r':
    ++	opt_replace = 1;	  
    ++	break;
    +       default:
    +-	strerr_die1x(111,"dnsfilter: usage: dnsfilter [ -c concurrency ] [ -l lines ]");
    ++	strerr_die1x(111,"dnsfilter: usage: dnsfilter [ -c concurrency ] [ -l lines ] [-r]");
    +     }
    + 
    +   x = (struct line *) alloc(xmax * sizeof(struct line));
    +@@ -140,8 +148,13 @@ int main(int argc,char **argv)
    + 	else if (r == 1) {
    + 	  if (dns_name_packet(&x[i].middle,x[i].dt.packet,x[i].dt.packetlen) == -1)
    + 	    errout(i);
    +-	  if (x[i].middle.len)
    +-	    if (!stralloc_cats(&x[i].left,"=")) nomem();
    ++	  if (x[i].middle.len) {
    ++	    if (opt_replace) {
    ++	      if (!stralloc_copys(&x[i].left, "")) nomem();
    ++	    } else {
    ++	      if (!stralloc_cats(&x[i].left, "=")) nomem();
    ++	    }
    ++	  }
    + 	  x[i].flagactive = 0;
    + 	  --numactive;
    + 	}
    diff --git a/net/djbdns/patches/270-dnscache-sigpipe-fix.patch b/net/djbdns/patches/270-dnscache-sigpipe-fix.patch
    new file mode 100644
    index 0000000..17a739a
    --- /dev/null
    +++ b/net/djbdns/patches/270-dnscache-sigpipe-fix.patch
    @@ -0,0 +1,16 @@
    +--- a/dnscache.c
    ++++ b/dnscache.c
    +@@ -1,4 +1,5 @@
    + #include 
    ++#include 
    + #include "env.h"
    + #include "exit.h"
    + #include "scan.h"
    +@@ -391,6 +392,7 @@ int main()
    +   char *x;
    +   unsigned long cachesize;
    + 
    ++  signal(SIGPIPE, SIG_IGN);
    +   x = env_get("IP");
    +   if (!x)
    +     strerr_die2x(111,FATAL,"$IP not set");
    diff --git a/net/djbdns/patches/280-dnscache-ignoreip2.patch b/net/djbdns/patches/280-dnscache-ignoreip2.patch
    new file mode 100644
    index 0000000..0a8bfad
    --- /dev/null
    +++ b/net/djbdns/patches/280-dnscache-ignoreip2.patch
    @@ -0,0 +1,117 @@
    +This patch change djbdns's dnscache program so that it will ignore the
    +IP address given in the ignoreip file.  I wrote this patch because of
    +Verisign's oh-so helpful wildcard A record for *.COM and *.NET.
    +
    +If you have djbdns-1.05-ignoreip.patch installed, back it out like this:
    +    cd /usr/local/src/djbdns-1.05
    +    patch -R /service/dnscache/root/ignoreip
    +    svc -t /service/dnscache
    +
    +Configure it to ignore all the cretins like this:
    +awk '{print $2}' </service/dnscache/root/ignoreip
    +         *.ac            194.205.62.122
    +         *.cc            206.253.214.102
    +         *.com           64.94.110.11
    +         *.cx            219.88.106.80
    +         *.museum        195.7.77.20
    +         *.net           64.94.110.11
    +         *.nu            64.55.105.9
    +                   and   212.181.91.6
    +         *.ph            203.119.4.6
    +         *.sh            194.205.62.62
    +         *.tm            194.205.62.62
    +         *.ws            216.35.187.246
    +EOF
    +    svc -t /service/dnscache
    +
    +J.P. Larocque contributes a script which updates root/ignoreip:
    +    http://ely.ath.cx/~piranha/software/ignoreip-update/ignoreip-update-0.1
    +
    +If root/ignoreip is not present, no addresses will be ignored.
    +
    +--
    +--My blog is at angry-economist.russnelson.com  | Free markets express in the
    +Crynwr sells support for free software  | PGPok | practical world our belief
    +521 Pleasant Valley Rd. | +1 315 268 1925 voice | that there is that of God
    +Potsdam, NY 13676-3213  | +1 315 268 9201 FAX   | in all people. -Chris V.
    +
    +
    +--- a/dnscache.c
    ++++ b/dnscache.c
    +@@ -24,6 +24,8 @@
    + #include "okclient.h"
    + #include "droproot.h"
    + 
    ++stralloc ignoreip = {0};
    ++
    + static int packetquery(char *buf,unsigned int len,char **q,char qtype[2],char qclass[2],char id[2])
    + {
    +   unsigned int pos;
    +@@ -390,6 +392,7 @@ char seed[128];
    + int main()
    + {
    +   char *x;
    ++  unsigned int i, j, k;
    +   unsigned long cachesize;
    + 
    +   signal(SIGPIPE, SIG_IGN);
    +@@ -433,6 +436,20 @@ int main()
    +   if (!cache_init(cachesize))
    +     strerr_die3x(111,FATAL,"not enough memory for cache of size ",x);
    + 
    ++  if (openreadclose("ignoreip",&ignoreip,64) < 0) 
    ++    strerr_die2x(111,FATAL,"trouble reading ignoreip");
    ++  for(j = k = i = 0; i < ignoreip.len; i++)
    ++    if (ignoreip.s[i] == '\n')  {
    ++      ignoreip.s[i] = '\0';
    ++      if (j + 4 > i)
    ++        strerr_die3x(111,FATAL,"badly malformed ip4 address ",ignoreip.s+k);
    ++      if (!ip4_scan(ignoreip.s+k,ignoreip.s+j))
    ++        strerr_die3x(111,FATAL,"unable to parse address in ignoreip ",ignoreip.s+k);
    ++      j += 4;
    ++      k = i + 1;
    ++    }
    ++  ignoreip.len = j;
    ++
    +   if (env_get("HIDETTL"))
    +     response_hidettl();
    +   if (env_get("FORWARDONLY"))
    +--- a/query.c
    ++++ b/query.c
    +@@ -13,6 +13,8 @@
    + #include "response.h"
    + #include "query.h"
    + 
    ++extern stralloc ignoreip;
    ++
    + static int flagforwardonly = 0;
    + 
    + void query_forwardonly(void)
    +@@ -173,6 +175,7 @@ static int smaller(char *buf,unsigned in
    + 
    + static int doit(struct query *z,int state)
    + {
    ++  unsigned int ii;
    +   char key[257];
    +   char *cached;
    +   unsigned int cachedlen;
    +@@ -662,6 +665,9 @@ static int doit(struct query *z,int stat
    +         pos = dns_packet_copy(buf,len,pos,header,10); if (!pos) goto DIE;
    +         if (byte_equal(header + 8,2,"\0\4")) {
    +           pos = dns_packet_copy(buf,len,pos,header,4); if (!pos) goto DIE;
    ++          if (ignoreip.len)
    ++	    for(ii = 0; ii < ignoreip.len; ii+= 4)
    ++	      if (byte_equal(header,4,ignoreip.s+ii)) goto NXDOMAIN;
    +           save_data(header,4);
    +           log_rr(whichserver,t1,DNS_T_A,header,4,ttl);
    +         }
    diff --git a/net/djbdns/patches/300-bugfix-dnscache-dempsky-poison.patch b/net/djbdns/patches/300-bugfix-dnscache-dempsky-poison.patch
    new file mode 100644
    index 0000000..23d8e9f
    --- /dev/null
    +++ b/net/djbdns/patches/300-bugfix-dnscache-dempsky-poison.patch
    @@ -0,0 +1,11 @@
    +--- a/response.c
    ++++ b/response.c
    +@@ -34,7 +34,7 @@ int response_addname(const char *d)
    +         uint16_pack_big(buf,49152 + name_ptr[i]);
    +         return response_addbytes(buf,2);
    +       }
    +-    if (dlen <= 128)
    ++    if ((dlen <= 128) && (response_len < 16384))
    +       if (name_num < NAMES) {
    + 	byte_copy(name[name_num],dlen,d);
    + 	name_ptr[name_num] = response_len;
    diff --git a/net/djbdns/patches/310-bugfix-dnscache-merge-outgoing-requests.patch b/net/djbdns/patches/310-bugfix-dnscache-merge-outgoing-requests.patch
    new file mode 100644
    index 0000000..bb3a4e2
    --- /dev/null
    +++ b/net/djbdns/patches/310-bugfix-dnscache-merge-outgoing-requests.patch
    @@ -0,0 +1,328 @@
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -315,11 +315,11 @@ stralloc.h iopause.h taia.h tai.h uint64
    + 	./compile dns_txt.c
    + 
    + dnscache: \
    +-load dnscache.o droproot.o okclient.o log.o cache.o query.o \
    ++load dnscache.o droproot.o okclient.o log.o cache.o query.o qmerge.o \
    + response.o dd.o roots.o iopause.o prot.o dns.a env.a alloc.a buffer.a \
    + libtai.a unix.a byte.a socket.lib
    + 	./load dnscache droproot.o okclient.o log.o cache.o \
    +-	query.o response.o dd.o roots.o iopause.o prot.o dns.a \
    ++	query.o qmerge.o response.o dd.o roots.o iopause.o prot.o dns.a \
    + 	env.a alloc.a buffer.a libtai.a unix.a byte.a  `cat \
    + 	socket.lib`
    + 
    +@@ -340,7 +340,7 @@ compile dnscache.c env.h exit.h scan.h s
    + uint16.h uint64.h socket.h uint16.h dns.h stralloc.h gen_alloc.h \
    + iopause.h taia.h tai.h uint64.h taia.h taia.h byte.h roots.h fmt.h \
    + iopause.h query.h dns.h uint32.h alloc.h response.h uint32.h cache.h \
    +-uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h
    ++uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h maxclient.h
    + 	./compile dnscache.c
    + 
    + dnsfilter: \
    +@@ -685,11 +685,16 @@ qlog.o: \
    + compile qlog.c buffer.h qlog.h uint16.h
    + 	./compile qlog.c
    + 
    ++qmerge.o: \
    ++compile qmerge.c qmerge.h dns.h stralloc.h gen_alloc.h iopause.h \
    ++taia.h tai.h uint64.h log.h maxclient.h
    ++	./compile qmerge.c
    ++
    + query.o: \
    + compile query.c error.h roots.h log.h uint64.h case.h cache.h \
    + uint32.h uint64.h byte.h dns.h stralloc.h gen_alloc.h iopause.h \
    + taia.h tai.h uint64.h taia.h uint64.h uint32.h uint16.h dd.h alloc.h \
    +-response.h uint32.h query.h dns.h uint32.h
    ++response.h uint32.h query.h dns.h uint32.h qmerge.h
    + 	./compile query.c
    + 
    + random-ip: \
    +--- a/dnscache.c
    ++++ b/dnscache.c
    +@@ -20,6 +20,7 @@
    + #include "response.h"
    + #include "cache.h"
    + #include "ndelay.h"
    ++#include "maxclient.h"
    + #include "log.h"
    + #include "okclient.h"
    + #include "droproot.h"
    +@@ -57,7 +58,6 @@ uint64 numqueries = 0;
    + 
    + static int udp53;
    + 
    +-#define MAXUDP 200
    + static struct udpclient {
    +   struct query q;
    +   struct taia start;
    +@@ -134,7 +134,6 @@ void u_new(void)
    + 
    + static int tcp53;
    + 
    +-#define MAXTCP 20
    + struct tcpclient {
    +   struct query q;
    +   struct taia start;
    +--- a/log.c
    ++++ b/log.c
    +@@ -151,6 +151,13 @@ void log_tx(const char *q,const char qty
    +   line();
    + }
    + 
    ++void log_tx_piggyback(const char *q, const char qtype[2], const char *control)
    ++{
    ++  string("txpb ");
    ++  logtype(qtype); space(); name(q); space(); name(control);
    ++  line();
    ++}
    ++
    + void log_cachedanswer(const char *q,const char type[2])
    + {
    +   string("cached "); logtype(type); space();
    +--- a/log.h
    ++++ b/log.h
    +@@ -20,6 +20,7 @@ extern void log_cachednxdomain(const cha
    + extern void log_cachedns(const char *,const char *);
    + 
    + extern void log_tx(const char *,const char *,const char *,const char *,unsigned int);
    ++extern void log_tx_piggyback(const char *,const char *,const char *);
    + 
    + extern void log_nxdomain(const char *,const char *,unsigned int);
    + extern void log_nodata(const char *,const char *,const char *,unsigned int);
    +--- /dev/null
    ++++ b/maxclient.h
    +@@ -0,0 +1,7 @@
    ++#ifndef MAXCLIENT_H
    ++#define MAXCLIENT_H
    ++
    ++#define MAXUDP 200
    ++#define MAXTCP 20
    ++
    ++#endif /* MAXCLIENT_H */
    +--- /dev/null
    ++++ b/qmerge.c
    +@@ -0,0 +1,115 @@
    ++#include "qmerge.h"
    ++#include "byte.h"
    ++#include "log.h"
    ++#include "maxclient.h"
    ++
    ++#define QMERGE_MAX (MAXUDP+MAXTCP)
    ++struct qmerge inprogress[QMERGE_MAX];
    ++
    ++static
    ++int qmerge_key_init(struct qmerge_key *qmk, const char *q, const char qtype[2],
    ++    const char *control)
    ++{
    ++  if (!dns_domain_copy(&qmk->q, q)) return 0;
    ++  byte_copy(qmk->qtype, 2, qtype);
    ++  if (!dns_domain_copy(&qmk->control, control)) return 0;
    ++  return 1;
    ++}
    ++
    ++static
    ++int qmerge_key_equal(struct qmerge_key *a, struct qmerge_key *b)
    ++{
    ++  return
    ++    byte_equal(a->qtype, 2, b->qtype) &&
    ++    dns_domain_equal(a->q, b->q) &&
    ++    dns_domain_equal(a->control, b->control);
    ++}
    ++
    ++static
    ++void qmerge_key_free(struct qmerge_key *qmk)
    ++{
    ++  dns_domain_free(&qmk->q);
    ++  dns_domain_free(&qmk->control);
    ++}
    ++
    ++void qmerge_free(struct qmerge **x)
    ++{
    ++  struct qmerge *qm;
    ++
    ++  qm = *x;
    ++  *x = 0;
    ++  if (!qm || !qm->active) return;
    ++
    ++  qm->active--;
    ++  if (!qm->active) {
    ++    qmerge_key_free(&qm->key);
    ++    dns_transmit_free(&qm->dt);
    ++  }
    ++}
    ++
    ++int qmerge_start(struct qmerge **qm, const char servers[64], int flagrecursive,
    ++    const char *q, const char qtype[2], const char localip[4],
    ++    const char *control)
    ++{
    ++  struct qmerge_key k;
    ++  int i;
    ++  int r;
    ++
    ++  qmerge_free(qm);
    ++
    ++  byte_zero(&k, sizeof k);
    ++  if (!qmerge_key_init(&k, q, qtype, control)) return -1;
    ++  for (i = 0; i < QMERGE_MAX; i++) {
    ++    if (!inprogress[i].active) continue;
    ++    if (!qmerge_key_equal(&k, &inprogress[i].key)) continue;
    ++    log_tx_piggyback(q, qtype, control);
    ++    inprogress[i].active++;
    ++    *qm = &inprogress[i];
    ++    qmerge_key_free(&k);
    ++    return 0;
    ++  }
    ++
    ++  for (i = 0; i < QMERGE_MAX; i++)
    ++    if (!inprogress[i].active)
    ++      break;
    ++  if (i == QMERGE_MAX) return -1;
    ++
    ++  log_tx(q, qtype, control, servers, 0);
    ++  r = dns_transmit_start(&inprogress[i].dt, servers, flagrecursive, q, qtype, localip);
    ++  if (r == -1) { qmerge_key_free(&k); return -1; }
    ++  inprogress[i].active++;
    ++  inprogress[i].state = 0;
    ++  qmerge_key_free(&inprogress[i].key);
    ++  byte_copy(&inprogress[i].key, sizeof k, &k);
    ++  *qm = &inprogress[i];
    ++  return 0;
    ++}
    ++
    ++void qmerge_io(struct qmerge *qm, iopause_fd *io, struct taia *deadline)
    ++{
    ++  if (qm->state == 0) {
    ++    dns_transmit_io(&qm->dt, io, deadline);
    ++    qm->state = 1;
    ++  }
    ++  else {
    ++    io->fd = -1;
    ++    io->events = 0;
    ++  }
    ++}
    ++
    ++int qmerge_get(struct qmerge **x, const iopause_fd *io, const struct taia *when)
    ++{
    ++  int r;
    ++  struct qmerge *qm;
    ++
    ++  qm = *x;
    ++  if (qm->state == -1) return -1; /* previous error */
    ++  if (qm->state == 0) return 0; /* no packet */
    ++  if (qm->state == 2) return 1; /* already got packet */
    ++
    ++  r = dns_transmit_get(&qm->dt, io, when);
    ++  if (r == -1) { qm->state = -1; return -1; } /* error */
    ++  if (r == 0) { qm->state = 0; return 0; } /* must wait for i/o */
    ++  if (r == 1) { qm->state = 2; return 1; } /* got packet */
    ++  return -1; /* bug */
    ++}
    +--- /dev/null
    ++++ b/qmerge.h
    +@@ -0,0 +1,24 @@
    ++#ifndef QMERGE_H
    ++#define QMERGE_H
    ++
    ++#include "dns.h"
    ++
    ++struct qmerge_key {
    ++  char *q;
    ++  char qtype[2];
    ++  char *control;
    ++};
    ++
    ++struct qmerge {
    ++  int active;
    ++  struct qmerge_key key;
    ++  struct dns_transmit dt;
    ++  int state; /* -1 = error, 0 = need io, 1 = need get, 2 = got packet */
    ++};
    ++
    ++extern int qmerge_start(struct qmerge **,const char *,int,const char *,const char *,const char *,const char *);
    ++extern void qmerge_io(struct qmerge *,iopause_fd *,struct taia *);
    ++extern int qmerge_get(struct qmerge **,const iopause_fd *,const struct taia *);
    ++extern void qmerge_free(struct qmerge **);
    ++
    ++#endif /* QMERGE_H */
    +--- a/query.c
    ++++ b/query.c
    +@@ -83,7 +83,7 @@ static void cleanup(struct query *z)
    +   int j;
    +   int k;
    + 
    +-  dns_transmit_free(&z->dt);
    ++  qmerge_free(&z->qm);
    +   for (j = 0;j < QUERY_MAXALIAS;++j)
    +     dns_domain_free(&z->alias[j]);
    +   for (j = 0;j < QUERY_MAXLEVEL;++j) {
    +@@ -452,14 +452,8 @@ static int doit(struct query *z,int stat
    +   if (j == 64) goto SERVFAIL;
    + 
    +   dns_sortip(z->servers[z->level],64);
    +-  if (z->level) {
    +-    log_tx(z->name[z->level],DNS_T_A,z->control[z->level],z->servers[z->level],z->level);
    +-    if (dns_transmit_start(&z->dt,z->servers[z->level],flagforwardonly,z->name[z->level],DNS_T_A,z->localip) == -1) goto DIE;
    +-  }
    +-  else {
    +-    log_tx(z->name[0],z->type,z->control[0],z->servers[0],0);
    +-    if (dns_transmit_start(&z->dt,z->servers[0],flagforwardonly,z->name[0],z->type,z->localip) == -1) goto DIE;
    +-  }
    ++  dtype = z->level ? DNS_T_A : z->type;
    ++  if (qmerge_start(&z->qm,z->servers[z->level],flagforwardonly,z->name[z->level],dtype,z->localip,z->control[z->level]) == -1) goto DIE;
    +   return 0;
    + 
    + 
    +@@ -473,10 +467,10 @@ static int doit(struct query *z,int stat
    + 
    +   HAVEPACKET:
    +   if (++z->loop == 100) goto DIE;
    +-  buf = z->dt.packet;
    +-  len = z->dt.packetlen;
    ++  buf = z->qm->dt.packet;
    ++  len = z->qm->dt.packetlen;
    + 
    +-  whichserver = z->dt.servers + 4 * z->dt.curserver;
    ++  whichserver = z->qm->dt.servers + 4 * z->qm->dt.curserver;
    +   control = z->control[z->level];
    +   d = z->name[z->level];
    +   dtype = z->level ? DNS_T_A : z->type;
    +@@ -902,7 +896,7 @@ int query_start(struct query *z,char *dn
    + 
    + int query_get(struct query *z,iopause_fd *x,struct taia *stamp)
    + {
    +-  switch(dns_transmit_get(&z->dt,x,stamp)) {
    ++  switch(qmerge_get(&z->qm,x,stamp)) {
    +     case 1:
    +       return doit(z,1);
    +     case -1:
    +@@ -913,5 +907,5 @@ int query_get(struct query *z,iopause_fd
    + 
    + void query_io(struct query *z,iopause_fd *x,struct taia *deadline)
    + {
    +-  dns_transmit_io(&z->dt,x,deadline);
    ++  qmerge_io(z->qm,x,deadline);
    + }
    +--- a/query.h
    ++++ b/query.h
    +@@ -1,7 +1,7 @@
    + #ifndef QUERY_H
    + #define QUERY_H
    + 
    +-#include "dns.h"
    ++#include "qmerge.h"
    + #include "uint32.h"
    + 
    + #define QUERY_MAXLEVEL 5
    +@@ -20,7 +20,7 @@ struct query {
    +   char localip[4];
    +   char type[2];
    +   char class[2];
    +-  struct dns_transmit dt;
    ++  struct qmerge *qm;
    + } ;
    + 
    + extern int query_start(struct query *,char *,char *,char *,char *);
    diff --git a/net/djbdns/patches/320-bugfix-dnscache-cache-soa-records.patch b/net/djbdns/patches/320-bugfix-dnscache-cache-soa-records.patch
    new file mode 100644
    index 0000000..f2b72a3
    --- /dev/null
    +++ b/net/djbdns/patches/320-bugfix-dnscache-cache-soa-records.patch
    @@ -0,0 +1,67 @@
    +--- a/query.c
    ++++ b/query.c
    +@@ -342,6 +342,29 @@ static int doit(struct query *z,int stat
    +       }
    +     }
    + 
    ++    if (typematch(DNS_T_SOA,dtype)) {
    ++      byte_copy(key,2,DNS_T_SOA);
    ++      cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
    ++      if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) {
    ++        log_cachedanswer(d,DNS_T_SOA);
    ++        if (!rqa(z)) goto DIE;
    ++        pos = 0;
    ++        while (pos = dns_packet_copy(cached,cachedlen,pos,misc,20)) {
    ++          pos = dns_packet_getname(cached,cachedlen,pos,&t2);
    ++          if (!pos) break;
    ++          pos = dns_packet_getname(cached,cachedlen,pos,&t3);
    ++          if (!pos) break;
    ++          if (!response_rstart(d,DNS_T_SOA,ttl)) goto DIE;
    ++          if (!response_addname(t2)) goto DIE;
    ++          if (!response_addname(t3)) goto DIE;
    ++          if (!response_addbytes(misc,20)) goto DIE;
    ++          response_rfinish(RESPONSE_ANSWER);
    ++        }
    ++        cleanup(z);
    ++        return 1;
    ++      }
    ++    }
    ++
    +     if (typematch(DNS_T_A,dtype)) {
    +       byte_copy(key,2,DNS_T_A);
    +       cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
    +@@ -374,7 +397,7 @@ static int doit(struct query *z,int stat
    +       }
    +     }
    + 
    +-    if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype)) {
    ++    if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype) && !typematch(DNS_T_SOA,dtype)) {
    +       byte_copy(key,2,dtype);
    +       cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
    +       if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) {
    +@@ -601,15 +624,24 @@ static int doit(struct query *z,int stat
    +     else if (byte_equal(type,2,DNS_T_AXFR))
    +       ;
    +     else if (byte_equal(type,2,DNS_T_SOA)) {
    ++      int non_authority = 0;
    ++      save_start();
    +       while (i < j) {
    +         pos = dns_packet_skipname(buf,len,records[i]); if (!pos) goto DIE;
    +         pos = dns_packet_getname(buf,len,pos + 10,&t2); if (!pos) goto DIE;
    +         pos = dns_packet_getname(buf,len,pos,&t3); if (!pos) goto DIE;
    +         pos = dns_packet_copy(buf,len,pos,misc,20); if (!pos) goto DIE;
    +-        if (records[i] < posauthority)
    ++        if (records[i] < posauthority) {
    +           log_rrsoa(whichserver,t1,t2,t3,misc,ttl);
    ++          save_data(misc,20);
    ++          save_data(t2,dns_domain_length(t2));
    ++          save_data(t3,dns_domain_length(t3));
    ++          non_authority++;
    ++        }
    +         ++i;
    +       }
    ++      if (non_authority)
    ++        save_finish(DNS_T_SOA,t1,ttl);
    +     }
    +     else if (byte_equal(type,2,DNS_T_CNAME)) {
    +       pos = dns_packet_skipname(buf,len,records[j - 1]); if (!pos) goto DIE;
    diff --git a/net/dmapd/Makefile b/net/dmapd/Makefile
    new file mode 100644
    index 0000000..a16e737
    --- /dev/null
    +++ b/net/dmapd/Makefile
    @@ -0,0 +1,61 @@
    +#
    +# Copyright (C) 2009-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=dmapd
    +PKG_VERSION:=0.0.42
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.flyn.org/projects/dmapd
    +PKG_MD5SUM:=f343b09d2e3e0da589c11e07abb6e879
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/dmapd
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libdmapsharing +libdb47 +vips
    +  TITLE:= dmapd
    +  URL:=http://www.flyn.org/projects/dmapd/
    +  MAINTAINER:=W. Michael Petullo 
    +endef
    +
    +define Package/dmapd/decription
    +	Dmapd is a DMAP server
    +endef
    +
    +define Package/dmapd/conffiles
    +/etc/dmapd.conf
    +endef
    +
    +TARGET_LDFLAGS+=\
    +	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
    +
    +define Package/dmapd/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_CONF) $(PKG_BUILD_DIR)/distro/dmapd.conf $(1)/etc/
    +	$(INSTALL_BIN) ./files/dmapd.init $(1)/etc/init.d/dmapd
    +	$(INSTALL_DIR) $(1)/usr/lib/dmapd/$(PKG_VERSION)/modules
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/sbin/dmapd \
    +		$(1)/usr/sbin/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/libdmapd.so* \
    +		$(1)/usr/lib/
    +	$(CP) \
    +		$(PKG_INSTALL_DIR)/usr/lib/dmapd/$(PKG_VERSION)/modules/*.so \
    +		$(1)/usr/lib/dmapd/$(PKG_VERSION)/modules/
    +endef
    +
    +$(eval $(call BuildPackage,dmapd))
    diff --git a/net/dmapd/files/dmapd.init b/net/dmapd/files/dmapd.init
    new file mode 100644
    index 0000000..b2f17c7
    --- /dev/null
    +++ b/net/dmapd/files/dmapd.init
    @@ -0,0 +1,16 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2009-2010 OpenWrt.org
    +
    +START=60
    +
    +start() {
    +	mkdir -p /var/cache/dmapd/
    +	mkdir -p /var/run/dmapd/
    +	mkdir -p /var/lock/subsys/
    +
    +	DMAPD_DB_MODULE=bdb /usr/sbin/dmapd --vips-disc-threshold 64k
    +}
    +
    +stop() {
    +	killall dmapd 2> /dev/null
    +}
    diff --git a/net/dmapd/patches/001-dmapd_conf.patch b/net/dmapd/patches/001-dmapd_conf.patch
    new file mode 100644
    index 0000000..8300fee
    --- /dev/null
    +++ b/net/dmapd/patches/001-dmapd_conf.patch
    @@ -0,0 +1,10 @@
    +--- a/distro/dmapd.conf
    ++++ b/distro/dmapd.conf
    +@@ -1,6 +1,6 @@
    + [General]
    + # Name that will be used to identify share:
    +-Share-Name=dmapd
    ++Share-Name=OpenWrt
    + 
    + # User that dmapd will run as, current user if undefined:
    + # User=dmapd
    diff --git a/net/dsl-qos-queue/Makefile b/net/dsl-qos-queue/Makefile
    new file mode 100644
    index 0000000..174ef14
    --- /dev/null
    +++ b/net/dsl-qos-queue/Makefile
    @@ -0,0 +1,49 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=dsl_qos_queue
    +PKG_VERSION:=0.9.3
    +PKG_RELEASE:=3
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.sonicspike.net/software/download/
    +PKG_MD5SUM:=ccbe8d28c3508c67f669fe98532533be
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/dsl-qos-queue
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+iptables +kmod-ipt-queue +iptables-mod-ipopt +libipq @!LINUX_2_6_25 @!LINUX_2_6_26 @!LINUX_2_6_27 @!LINUX_2_6_28
    +  TITLE:=ADSL/ATM Bandwith management
    +  URL:=http://www.sonicspike.net/software/
    +endef
    +
    +define Build/Configure
    +endef
    +
    +define Build/Compile
    +	$(call Build/Compile/Default, \
    +		CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libipq $(TARGET_CPPFLAGS)" \
    +		LDFLAGS="$(TARGET_LDFLAGS)" \
    +		LIBIPQ="-lipq" \
    +		all \
    +	)
    +endef
    +
    +define Package/dsl-qos-queue/install	
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/dsl_qos_train $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ipt_rules $(1)/usr/sbin
    +endef
    +
    +$(eval $(call BuildPackage,dsl-qos-queue))
    diff --git a/net/dsl-qos-queue/patches/001-cross_compile.patch b/net/dsl-qos-queue/patches/001-cross_compile.patch
    new file mode 100644
    index 0000000..43a9094
    --- /dev/null
    +++ b/net/dsl-qos-queue/patches/001-cross_compile.patch
    @@ -0,0 +1,40 @@
    +--- a/dsl_qos_queue.c
    ++++ b/dsl_qos_queue.c
    +@@ -552,12 +552,12 @@
    +   
    +   syslog(LOG_INFO, "setup()");
    +   
    +-  rval=system("modprobe ip_queue");
    ++/*  rval=system("modprobe ip_queue");
    +   if (WEXITSTATUS(rval)!=0)
    +   {
    +     printf("Unable to install ip_queue module.\n");
    +     exit(1);
    +-  }
    ++  }*/
    +   
    +   for (i=0;i
    +-#include 
    + #include 
    + #include 
    + #include 
    +@@ -25,6 +23,8 @@
    + #include 
    + #include 
    + #include 
    ++#include 
    ++#include 
    + 
    + #include "daemon.h"
    + 
    diff --git a/net/dsl-qos-queue/patches/010-ports_fix.patch b/net/dsl-qos-queue/patches/010-ports_fix.patch
    new file mode 100644
    index 0000000..4280a11
    --- /dev/null
    +++ b/net/dsl-qos-queue/patches/010-ports_fix.patch
    @@ -0,0 +1,22 @@
    +--- a/ipt_rules
    ++++ b/ipt_rules
    +@@ -26,14 +26,14 @@ iptables -t mangle -A MYSHAPER-OUT -p tc
    + iptables -t mangle -A MYSHAPER-OUT -p icmp -j MARK --set-mark 20               # ICMP (ping) - high prio, impress friends
    + iptables -t mangle -A MYSHAPER-OUT -p udp --dport 123 -j MARK --set-mark 20    # NTP should be low-lag
    + iptables -t mangle -A MYSHAPER-OUT -p udp --dport 53 -j MARK --set-mark 21     # DNS name resolution (small packets)
    +-iptables -t mangle -A MYSHAPER-OUT -p tcp --dport ssh -j MARK --set-mark 22    # secure shell
    +-iptables -t mangle -A MYSHAPER-OUT -p tcp --sport ssh -j MARK --set-mark 22    # secure shell
    +-iptables -t mangle -A MYSHAPER-OUT -p tcp --dport telnet -j MARK --set-mark 22 # telnet (ew...)
    +-iptables -t mangle -A MYSHAPER-OUT -p tcp --sport telnet -j MARK --set-mark 22 # telnet (ew...)
    ++iptables -t mangle -A MYSHAPER-OUT -p tcp --dport 22 -j MARK --set-mark 22    # secure shell
    ++iptables -t mangle -A MYSHAPER-OUT -p tcp --sport 22 -j MARK --set-mark 22    # secure shell
    ++iptables -t mangle -A MYSHAPER-OUT -p tcp --dport 23 -j MARK --set-mark 22 # telnet (ew...)
    ++iptables -t mangle -A MYSHAPER-OUT -p tcp --sport 23 -j MARK --set-mark 22 # telnet (ew...)
    + iptables -t mangle -A MYSHAPER-OUT -p ipv6-crypt -j MARK --set-mark 24         # IPSec - we dont know what the payload is though...
    + iptables -t mangle -A MYSHAPER-OUT -p udp --dport 10000 -j MARK --set-mark 24  # IPSec (udp tunnel) - we dont know what the payload is though...
    + 
    +-iptables -t mangle -A MYSHAPER-OUT -p tcp --sport http -j MARK --set-mark 25   # Local web server
    ++iptables -t mangle -A MYSHAPER-OUT -p tcp --sport 80 -j MARK --set-mark 25   # Local web server
    + iptables -t mangle -A MYSHAPER-OUT -p tcp -m length --length :64 -j MARK --set-mark 21 # small packets (probably just ACKs)
    + iptables -t mangle -A MYSHAPER-OUT -p tcp --sport 3389 -j MARK --set-mark 23   # windows remote computer connection
    + iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -j MARK --set-mark 26      # redundant- mark any unmarked packets as 26 (low pri
    diff --git a/net/dsl-qos-queue/patches/020-fix_shebang_line.patch b/net/dsl-qos-queue/patches/020-fix_shebang_line.patch
    new file mode 100644
    index 0000000..1a95300
    --- /dev/null
    +++ b/net/dsl-qos-queue/patches/020-fix_shebang_line.patch
    @@ -0,0 +1,8 @@
    +--- a/ipt_rules
    ++++ b/ipt_rules
    +@@ -1,4 +1,4 @@
    +-#!/bin/bash
    ++#!/bin/sh
    + # add MYSHAPER-OUT chain to the mangle table in iptables - this sets up the table we'll use
    + #                                                      to filter and mark packets.
    + 
    diff --git a/net/dsniff/Makefile b/net/dsniff/Makefile
    new file mode 100644
    index 0000000..a26f6fe
    --- /dev/null
    +++ b/net/dsniff/Makefile
    @@ -0,0 +1,62 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=dsniff
    +PKG_VERSION:=2.4b1
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.monkey.org/~dugsong/dsniff/beta
    +PKG_MD5SUM:=2f761fa3475682a7512b0b43568ee7d6
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-2.4
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/dsniff
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libpcap +libnids +libnet0 +libopenssl +libgdbm $(LIBRPC_DEPENDS)
    +  TITLE:=A collection of tools for network auditing and penetration testing
    +  URL:=http://www.monkey.org/~dugsong/dsniff/
    +endef
    +
    +define Package/dsniff/description
    +	A collection of tools for network auditing and penetration testing.
    +endef
    +
    +TARGET_LDFLAGS += $(LIBRPC)
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--with-gdbm="$(STAGING_DIR)/usr" \
    +		--with-libnids="$(STAGING_DIR)/usr" \
    +		--with-libpcap="$(STAGING_DIR)/usr" \
    +		--with-libnet="$(STAGING_DIR)/usr/lib/libnet-1.0.x" \
    +		--with-openssl="$(STAGING_DIR)/usr" \
    +		--without-db \
    +		--without-x \
    +	)
    +endef
    +
    +define Build/Compile	
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		$(TARGET_CONFIGURE_OPTS) \
    +		install_prefix="$(PKG_INSTALL_DIR)" \
    +		all install
    +endef
    +
    +define Package/dsniff/install	
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP)  $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
    +endef
    +
    +$(eval $(call BuildPackage,dsniff))
    diff --git a/net/dsniff/patches/001-arpspoof_fix.patch b/net/dsniff/patches/001-arpspoof_fix.patch
    new file mode 100644
    index 0000000..fd29227
    --- /dev/null
    +++ b/net/dsniff/patches/001-arpspoof_fix.patch
    @@ -0,0 +1,53 @@
    +diff -urN dsniff.old/arp.c dsniff.dev/arp.c
    +--- dsniff.old/arp.c	2001-03-15 09:32:58.000000000 +0100
    ++++ dsniff.dev/arp.c	2006-03-03 01:41:10.000000000 +0100
    +@@ -39,7 +39,7 @@
    + 
    + #ifdef BSD
    + int
    +-arp_cache_lookup(in_addr_t ip, struct ether_addr *ether)
    ++arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif)
    + {
    + 	int mib[6];
    + 	size_t len;
    +@@ -91,7 +91,7 @@
    + #endif
    + 
    + int
    +-arp_cache_lookup(in_addr_t ip, struct ether_addr *ether)
    ++arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif)
    + {
    + 	int sock;
    + 	struct arpreq ar;
    +@@ -99,7 +99,7 @@
    + 	
    + 	memset((char *)&ar, 0, sizeof(ar));
    + #ifdef __linux__
    +-	strncpy(ar.arp_dev, "eth0", sizeof(ar.arp_dev));   /* XXX - *sigh* */
    ++	strncpy(ar.arp_dev, lif, strlen(lif));
    + #endif
    + 	sin = (struct sockaddr_in *)&ar.arp_pa;
    + 	sin->sin_family = AF_INET;
    +diff -urN dsniff.old/arp.h dsniff.dev/arp.h
    +--- dsniff.old/arp.h	2001-03-15 09:27:08.000000000 +0100
    ++++ dsniff.dev/arp.h	2006-03-03 01:42:23.000000000 +0100
    +@@ -11,6 +11,6 @@
    + #ifndef _ARP_H_
    + #define _ARP_H_
    + 
    +-int	arp_cache_lookup(in_addr_t ip, struct ether_addr *ether);
    ++int	arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif);
    + 
    + #endif /* _ARP_H_ */
    +diff -urN dsniff.old/arpspoof.c dsniff.dev/arpspoof.c
    +--- dsniff.old/arpspoof.c	2001-03-15 09:32:58.000000000 +0100
    ++++ dsniff.dev/arpspoof.c	2006-03-03 01:42:00.000000000 +0100
    +@@ -113,7 +113,7 @@
    + 	int i = 0;
    + 
    + 	do {
    +-		if (arp_cache_lookup(ip, mac) == 0)
    ++		if (arp_cache_lookup(ip, mac, intf) == 0)
    + 			return (1);
    + #ifdef __linux__
    + 		/* XXX - force the kernel to arp. feh. */
    diff --git a/net/dsniff/patches/001-dns.patch b/net/dsniff/patches/001-dns.patch
    new file mode 100644
    index 0000000..e5cf8b2
    --- /dev/null
    +++ b/net/dsniff/patches/001-dns.patch
    @@ -0,0 +1,704 @@
    +diff -Nur dsniff-2.3/dns.c dsniff-2.3.patched/dns.c
    +--- dsniff-2.3/dns.c	1970-01-01 01:00:00.000000000 +0100
    ++++ dsniff-2.3.patched/dns.c	2005-06-09 14:06:36.000000000 +0200
    +@@ -0,0 +1,677 @@
    ++/*
    ++ * Copyright (c) 1985, 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.
    ++ * 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.
    ++ */
    ++
    ++/*
    ++ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
    ++ * 
    ++ * Permission to use, copy, modify, and distribute this software for any
    ++ * purpose with or without fee is hereby granted, provided that the above
    ++ * copyright notice and this permission notice appear in all copies, and that
    ++ * the name of Digital Equipment Corporation not be used in advertising or
    ++ * publicity pertaining to distribution of the document or software without
    ++ * specific, written prior permission.
    ++ * 
    ++ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
    ++ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
    ++ * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
    ++ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
    ++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
    ++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
    ++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
    ++ * SOFTWARE.
    ++ */
    ++
    ++/*
    ++ * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
    ++ *
    ++ * Permission to use, copy, modify, and distribute this software for any
    ++ * purpose with or without fee is hereby granted, provided that the above
    ++ * copyright notice and this permission notice appear in all copies.
    ++ *
    ++ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
    ++ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
    ++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
    ++ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
    ++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
    ++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
    ++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
    ++ * SOFTWARE.
    ++ */
    ++
    ++/*
    ++ * Copyright (c) 1996,1999 by Internet Software Consortium.
    ++ *
    ++ * Permission to use, copy, modify, and distribute this software for any
    ++ * purpose with or without fee is hereby granted, provided that the above
    ++ * copyright notice and this permission notice appear in all copies.
    ++ *
    ++ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
    ++ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
    ++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
    ++ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
    ++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
    ++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
    ++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
    ++ * SOFTWARE.
    ++ */
    ++
    ++/*
    ++ *
    ++ * DNS helper functions not implemented in uclibc
    ++ *
    ++ */
    ++
    ++
    ++#include 
    ++#include 
    ++#include 
    ++#include 
    ++#include 
    ++#include 
    ++#include 
    ++#include 
    ++#include 
    ++
    ++static const char	digits[] = "0123456789";
    ++
    ++/* Forward. */
    ++
    ++static int		special(int);
    ++static int		printable(int);
    ++static int		dn_find(const u_char *, const u_char *,
    ++				const u_char * const *,
    ++				const u_char * const *);
    ++
    ++
    ++/*
    ++ * ns_name_ntop(src, dst, dstsiz)
    ++ *	Convert an encoded domain name to printable ascii as per RFC1035.
    ++ * return:
    ++ *	Number of bytes written to buffer, or -1 (with errno set)
    ++ * notes:
    ++ *	The root is returned as "."
    ++ *	All other domains are returned in non absolute form
    ++ */
    ++int
    ++ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) {
    ++	const u_char *cp;
    ++	char *dn, *eom;
    ++	u_char c;
    ++	u_int n;
    ++
    ++	cp = src;
    ++	dn = dst;
    ++	eom = dst + dstsiz;
    ++
    ++	while ((n = *cp++) != 0) {
    ++		if ((n & NS_CMPRSFLGS) != 0) {
    ++			/* Some kind of compression pointer. */
    ++			return (-1);
    ++		}
    ++		if (dn != dst) {
    ++			if (dn >= eom) {
    ++				return (-1);
    ++			}
    ++			*dn++ = '.';
    ++		}
    ++		if (dn + n >= eom) {
    ++			return (-1);
    ++		}
    ++		for ((void)NULL; n > 0; n--) {
    ++			c = *cp++;
    ++			if (special(c)) {
    ++				if (dn + 1 >= eom) {
    ++					return (-1);
    ++				}
    ++				*dn++ = '\\';
    ++				*dn++ = (char)c;
    ++			} else if (!printable(c)) {
    ++				if (dn + 3 >= eom) {
    ++					return (-1);
    ++				}
    ++				*dn++ = '\\';
    ++				*dn++ = digits[c / 100];
    ++				*dn++ = digits[(c % 100) / 10];
    ++				*dn++ = digits[c % 10];
    ++			} else {
    ++				if (dn >= eom) {
    ++					return (-1);
    ++				}
    ++				*dn++ = (char)c;
    ++			}
    ++		}
    ++	}
    ++	if (dn == dst) {
    ++		if (dn >= eom) {
    ++			return (-1);
    ++		}
    ++		*dn++ = '.';
    ++	}
    ++	if (dn >= eom) {
    ++		return (-1);
    ++	}
    ++	*dn++ = '\0';
    ++	return (dn - dst);
    ++}
    ++
    ++/*
    ++ * ns_name_pton(src, dst, dstsiz)
    ++ *	Convert a ascii string into an encoded domain name as per RFC1035.
    ++ * return:
    ++ *	-1 if it fails
    ++ *	1 if string was fully qualified
    ++ *	0 is string was not fully qualified
    ++ * notes:
    ++ *	Enforces label and domain length limits.
    ++ */
    ++
    ++int
    ++ns_name_pton(const char *src, u_char *dst, size_t dstsiz) {
    ++	u_char *label, *bp, *eom;
    ++	int c, n, escaped;
    ++	char *cp;
    ++
    ++	escaped = 0;
    ++	bp = dst;
    ++	eom = dst + dstsiz;
    ++	label = bp++;
    ++
    ++	while ((c = *src++) != 0) {
    ++		if (escaped) {
    ++			if ((cp = strchr(digits, c)) != NULL) {
    ++				n = (cp - digits) * 100;
    ++				if ((c = *src++) == 0 ||
    ++				    (cp = strchr(digits, c)) == NULL) {
    ++					return (-1);
    ++				}
    ++				n += (cp - digits) * 10;
    ++				if ((c = *src++) == 0 ||
    ++				    (cp = strchr(digits, c)) == NULL) {
    ++					return (-1);
    ++				}
    ++				n += (cp - digits);
    ++				if (n > 255) {
    ++					return (-1);
    ++				}
    ++				c = n;
    ++			}
    ++			escaped = 0;
    ++		} else if (c == '\\') {
    ++			escaped = 1;
    ++			continue;
    ++		} else if (c == '.') {
    ++			c = (bp - label - 1);
    ++			if ((c & NS_CMPRSFLGS) != 0) {	/* Label too big. */
    ++				return (-1);
    ++			}
    ++			if (label >= eom) {
    ++				return (-1);
    ++			}
    ++			*label = c;
    ++			/* Fully qualified ? */
    ++			if (*src == '\0') {
    ++				if (c != 0) {
    ++					if (bp >= eom) {
    ++						return (-1);
    ++					}
    ++					*bp++ = '\0';
    ++				}
    ++				if ((bp - dst) > MAXCDNAME) {
    ++					return (-1);
    ++				}
    ++				return (1);
    ++			}
    ++			if (c == 0 || *src == '.') {
    ++				return (-1);
    ++			}
    ++			label = bp++;
    ++			continue;
    ++		}
    ++		if (bp >= eom) {
    ++			return (-1);
    ++		}
    ++		*bp++ = (u_char)c;
    ++	}
    ++	c = (bp - label - 1);
    ++	if ((c & NS_CMPRSFLGS) != 0) {		/* Label too big. */
    ++		return (-1);
    ++	}
    ++	if (label >= eom) {
    ++		return (-1);
    ++	}
    ++	*label = c;
    ++	if (c != 0) {
    ++		if (bp >= eom) {
    ++			return (-1);
    ++		}
    ++		*bp++ = 0;
    ++	}
    ++	if ((bp - dst) > MAXCDNAME) {	/* src too big */
    ++		return (-1);
    ++	}
    ++	return (0);
    ++}
    ++
    ++/*
    ++ * ns_name_ntol(src, dst, dstsiz)
    ++ *	Convert a network strings labels into all lowercase.
    ++ * return:
    ++ *	Number of bytes written to buffer, or -1 (with errno set)
    ++ * notes:
    ++ *	Enforces label and domain length limits.
    ++ */
    ++
    ++int
    ++ns_name_ntol(const u_char *src, u_char *dst, size_t dstsiz) {
    ++	const u_char *cp;
    ++	u_char *dn, *eom;
    ++	u_char c;
    ++	u_int n;
    ++
    ++	cp = src;
    ++	dn = dst;
    ++	eom = dst + dstsiz;
    ++
    ++	while ((n = *cp++) != 0) {
    ++		if ((n & NS_CMPRSFLGS) != 0) {
    ++			/* Some kind of compression pointer. */
    ++			return (-1);
    ++		}
    ++		*dn++ = n;
    ++		if (dn + n >= eom) {
    ++			return (-1);
    ++		}
    ++		for ((void)NULL; n > 0; n--) {
    ++			c = *cp++;
    ++			if (isupper(c))
    ++				*dn++ = tolower(c);
    ++			else
    ++				*dn++ = c;
    ++		}
    ++	}
    ++	*dn++ = '\0';
    ++	return (dn - dst);
    ++}
    ++
    ++/*
    ++ * ns_name_unpack(msg, eom, src, dst, dstsiz)
    ++ *	Unpack a domain name from a message, source may be compressed.
    ++ * return:
    ++ *	-1 if it fails, or consumed octets if it succeeds.
    ++ */
    ++int
    ++ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src,
    ++	       u_char *dst, size_t dstsiz)
    ++{
    ++	const u_char *srcp, *dstlim;
    ++	u_char *dstp;
    ++	int n, len, checked;
    ++
    ++	len = -1;
    ++	checked = 0;
    ++	dstp = dst;
    ++	srcp = src;
    ++	dstlim = dst + dstsiz;
    ++	if (srcp < msg || srcp >= eom) {
    ++		return (-1);
    ++	}
    ++	/* Fetch next label in domain name. */
    ++	while ((n = *srcp++) != 0) {
    ++		/* Check for indirection. */
    ++		switch (n & NS_CMPRSFLGS) {
    ++		case 0:
    ++			/* Limit checks. */
    ++			if (dstp + n + 1 >= dstlim || srcp + n >= eom) {
    ++				return (-1);
    ++			}
    ++			checked += n + 1;
    ++			*dstp++ = n;
    ++			memcpy(dstp, srcp, n);
    ++			dstp += n;
    ++			srcp += n;
    ++			break;
    ++
    ++		case NS_CMPRSFLGS:
    ++			if (srcp >= eom) {
    ++				return (-1);
    ++			}
    ++			if (len < 0)
    ++				len = srcp - src + 1;
    ++			srcp = msg + (((n & 0x3f) << 8) | (*srcp & 0xff));
    ++			if (srcp < msg || srcp >= eom) {  /* Out of range. */
    ++				return (-1);
    ++			}
    ++			checked += 2;
    ++			/*
    ++			 * Check for loops in the compressed name;
    ++			 * if we've looked at the whole message,
    ++			 * there must be a loop.
    ++			 */
    ++			if (checked >= eom - msg) {
    ++				return (-1);
    ++			}
    ++			break;
    ++
    ++		default:
    ++			return (-1);			/* flag error */
    ++		}
    ++	}
    ++	*dstp = '\0';
    ++	if (len < 0)
    ++		len = srcp - src;
    ++	return (len);
    ++}
    ++
    ++/*
    ++ * ns_name_pack(src, dst, dstsiz, dnptrs, lastdnptr)
    ++ *	Pack domain name 'domain' into 'comp_dn'.
    ++ * return:
    ++ *	Size of the compressed name, or -1.
    ++ * notes:
    ++ *	'dnptrs' is an array of pointers to previous compressed names.
    ++ *	dnptrs[0] is a pointer to the beginning of the message. The array
    ++ *	ends with NULL.
    ++ *	'lastdnptr' is a pointer to the end of the array pointed to
    ++ *	by 'dnptrs'.
    ++ * Side effects:
    ++ *	The list of pointers in dnptrs is updated for labels inserted into
    ++ *	the message as we compress the name.  If 'dnptr' is NULL, we don't
    ++ *	try to compress names. If 'lastdnptr' is NULL, we don't update the
    ++ *	list.
    ++ */
    ++int
    ++ns_name_pack(const u_char *src, u_char *dst, int dstsiz,
    ++	     const u_char **dnptrs, const u_char **lastdnptr)
    ++{
    ++	u_char *dstp;
    ++	const u_char **cpp, **lpp, *eob, *msg;
    ++	const u_char *srcp;
    ++	int n, l, first = 1;
    ++
    ++	srcp = src;
    ++	dstp = dst;
    ++	eob = dstp + dstsiz;
    ++	lpp = cpp = NULL;
    ++	if (dnptrs != NULL) {
    ++		if ((msg = *dnptrs++) != NULL) {
    ++			for (cpp = dnptrs; *cpp != NULL; cpp++)
    ++				(void)NULL;
    ++			lpp = cpp;	/* end of list to search */
    ++		}
    ++	} else
    ++		msg = NULL;
    ++
    ++	/* make sure the domain we are about to add is legal */
    ++	l = 0;
    ++	do {
    ++		n = *srcp;
    ++		if ((n & NS_CMPRSFLGS) != 0) {
    ++			return (-1);
    ++		}
    ++		l += n + 1;
    ++		if (l > MAXCDNAME) {
    ++			return (-1);
    ++		}
    ++		srcp += n + 1;
    ++	} while (n != 0);
    ++
    ++	/* from here on we need to reset compression pointer array on error */
    ++	srcp = src;
    ++	do {
    ++		/* Look to see if we can use pointers. */
    ++		n = *srcp;
    ++		if (n != 0 && msg != NULL) {
    ++			l = dn_find(srcp, msg, (const u_char * const *)dnptrs,
    ++				    (const u_char * const *)lpp);
    ++			if (l >= 0) {
    ++				if (dstp + 1 >= eob) {
    ++					goto cleanup;
    ++				}
    ++				*dstp++ = (l >> 8) | NS_CMPRSFLGS;
    ++				*dstp++ = l % 256;
    ++				return (dstp - dst);
    ++			}
    ++			/* Not found, save it. */
    ++			if (lastdnptr != NULL && cpp < lastdnptr - 1 &&
    ++			    (dstp - msg) < 0x4000 && first) {
    ++				*cpp++ = dstp;
    ++				*cpp = NULL;
    ++				first = 0;
    ++			}
    ++		}
    ++		/* copy label to buffer */
    ++		if (n & NS_CMPRSFLGS) {		/* Should not happen. */
    ++			goto cleanup;
    ++		}
    ++		if (dstp + 1 + n >= eob) {
    ++			goto cleanup;
    ++		}
    ++		memcpy(dstp, srcp, n + 1);
    ++		srcp += n + 1;
    ++		dstp += n + 1;
    ++	} while (n != 0);
    ++
    ++	if (dstp > eob) {
    ++cleanup:
    ++		if (msg != NULL)
    ++			*lpp = NULL;
    ++		return (-1);
    ++	} 
    ++	return (dstp - dst);
    ++}
    ++
    ++/*
    ++ * ns_name_uncompress(msg, eom, src, dst, dstsiz)
    ++ *	Expand compressed domain name to presentation format.
    ++ * return:
    ++ *	Number of bytes read out of `src', or -1 (with errno set).
    ++ * note:
    ++ *	Root domain returns as "." not "".
    ++ */
    ++int
    ++ns_name_uncompress(const u_char *msg, const u_char *eom, const u_char *src,
    ++		   char *dst, size_t dstsiz)
    ++{
    ++	u_char tmp[NS_MAXCDNAME];
    ++	int n;
    ++	
    ++	if ((n = ns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1)
    ++		return (-1);
    ++	if (ns_name_ntop(tmp, dst, dstsiz) == -1)
    ++		return (-1);
    ++	return (n);
    ++}
    ++
    ++/*
    ++ * ns_name_compress(src, dst, dstsiz, dnptrs, lastdnptr)
    ++ *	Compress a domain name into wire format, using compression pointers.
    ++ * return:
    ++ *	Number of bytes consumed in `dst' or -1 (with errno set).
    ++ * notes:
    ++ *	'dnptrs' is an array of pointers to previous compressed names.
    ++ *	dnptrs[0] is a pointer to the beginning of the message.
    ++ *	The list ends with NULL.  'lastdnptr' is a pointer to the end of the
    ++ *	array pointed to by 'dnptrs'. Side effect is to update the list of
    ++ *	pointers for labels inserted into the message as we compress the name.
    ++ *	If 'dnptr' is NULL, we don't try to compress names. If 'lastdnptr'
    ++ *	is NULL, we don't update the list.
    ++ */
    ++int
    ++ns_name_compress(const char *src, u_char *dst, size_t dstsiz,
    ++		 const u_char **dnptrs, const u_char **lastdnptr)
    ++{
    ++	u_char tmp[NS_MAXCDNAME];
    ++
    ++	if (ns_name_pton(src, tmp, sizeof tmp) == -1)
    ++		return (-1);
    ++	return (ns_name_pack(tmp, dst, dstsiz, dnptrs, lastdnptr));
    ++}
    ++
    ++/*
    ++ * special(ch)
    ++ *	Thinking in noninternationalized USASCII (per the DNS spec),
    ++ *	is this characted special ("in need of quoting") ?
    ++ * return:
    ++ *	boolean.
    ++ */
    ++static int
    ++special(int ch) {
    ++	switch (ch) {
    ++	case 0x22: /* '"' */
    ++	case 0x2E: /* '.' */
    ++	case 0x3B: /* ';' */
    ++	case 0x5C: /* '\\' */
    ++	/* Special modifiers in zone files. */
    ++	case 0x40: /* '@' */
    ++	case 0x24: /* '$' */
    ++		return (1);
    ++	default:
    ++		return (0);
    ++	}
    ++}
    ++
    ++/*
    ++ * printable(ch)
    ++ *	Thinking in noninternationalized USASCII (per the DNS spec),
    ++ *	is this character visible and not a space when printed ?
    ++ * return:
    ++ *	boolean.
    ++ */
    ++static int
    ++printable(int ch) {
    ++	return (ch > 0x20 && ch < 0x7f);
    ++}
    ++
    ++/*
    ++ *	Thinking in noninternationalized USASCII (per the DNS spec),
    ++ *	convert this character to lower case if it's upper case.
    ++ */
    ++static int
    ++mklower(int ch) {
    ++	if (ch >= 0x41 && ch <= 0x5A)
    ++		return (ch + 0x20);
    ++	return (ch);
    ++}
    ++
    ++/*
    ++ * dn_find(domain, msg, dnptrs, lastdnptr)
    ++ *	Search for the counted-label name in an array of compressed names.
    ++ * return:
    ++ *	offset from msg if found, or -1.
    ++ * notes:
    ++ *	dnptrs is the pointer to the first name on the list,
    ++ *	not the pointer to the start of the message.
    ++ */
    ++static int
    ++dn_find(const u_char *domain, const u_char *msg,
    ++	const u_char * const *dnptrs,
    ++	const u_char * const *lastdnptr)
    ++{
    ++	const u_char *dn, *cp, *sp;
    ++	const u_char * const *cpp;
    ++	u_int n;
    ++
    ++	for (cpp = dnptrs; cpp < lastdnptr; cpp++) {
    ++		sp = *cpp;
    ++		/*
    ++		 * terminate search on:
    ++		 * root label
    ++		 * compression pointer
    ++		 * unusable offset
    ++		 */
    ++		while (*sp != 0 && (*sp & NS_CMPRSFLGS) == 0 &&
    ++		       (sp - msg) < 0x4000) {
    ++			dn = domain;
    ++			cp = sp;
    ++			while ((n = *cp++) != 0) {
    ++				/*
    ++				 * check for indirection
    ++				 */
    ++				switch (n & NS_CMPRSFLGS) {
    ++				case 0:		/* normal case, n == len */
    ++					if (n != *dn++)
    ++						goto next;
    ++					for ((void)NULL; n > 0; n--)
    ++						if (mklower(*dn++) !=
    ++						    mklower(*cp++))
    ++							goto next;
    ++					/* Is next root for both ? */
    ++					if (*dn == '\0' && *cp == '\0')
    ++						return (sp - msg);
    ++					if (*dn)
    ++						continue;
    ++					goto next;
    ++
    ++				case NS_CMPRSFLGS:	/* indirection */
    ++					cp = msg + (((n & 0x3f) << 8) | *cp);
    ++					break;
    ++
    ++				default:	/* illegal type */
    ++					return (-1);
    ++				}
    ++			}
    ++ next:
    ++			sp += *sp + 1;
    ++		}
    ++	}
    ++	return (-1);
    ++}
    ++
    ++/*
    ++ * Expand compressed domain name 'comp_dn' to full domain name.
    ++ * 'msg' is a pointer to the begining of the message,
    ++ * 'eomorig' points to the first location after the message,
    ++ * 'exp_dn' is a pointer to a buffer of size 'length' for the result.
    ++ * Return size of compressed name or -1 if there was an error.
    ++ */
    ++int
    ++dn_expand(const u_char *msg, const u_char *eom, const u_char *src,
    ++	  char *dst, int dstsiz)
    ++{
    ++	int n = ns_name_uncompress(msg, eom, src, dst, (size_t)dstsiz);
    ++
    ++	if (n > 0 && dst[0] == '.')
    ++		dst[0] = '\0';
    ++	return (n);
    ++}
    ++
    ++/*
    ++ * Pack domain name 'exp_dn' in presentation form into 'comp_dn'.
    ++ * Return the size of the compressed name or -1.
    ++ * 'length' is the size of the array pointed to by 'comp_dn'.
    ++ */
    ++int
    ++dn_comp(const char *src, u_char *dst, int dstsiz,
    ++	u_char **dnptrs, u_char **lastdnptr)
    ++{
    ++	return (ns_name_compress(src, dst, (size_t)dstsiz,
    ++				 (const u_char **)dnptrs,
    ++				 (const u_char **)lastdnptr));
    ++}
    ++
    +diff -Nur dsniff-2.3/Makefile.in dsniff-2.3.patched/Makefile.in
    +--- dsniff-2.3/Makefile.in	2000-12-15 21:03:26.000000000 +0100
    ++++ dsniff-2.3.patched/Makefile.in	2005-06-09 14:03:18.000000000 +0200
    +@@ -51,7 +51,7 @@
    + 	  pathnames.h pcaputil.h record.h rpc.h tcp_raw.h trigger.h \
    + 	  version.h vroot.h
    + 
    +-SRCS	= asn1.c base64.c buf.c hex.c magic.c mount.c pcaputil.c rpc.c \
    ++SRCS	= asn1.c base64.c buf.c dns.c hex.c magic.c mount.c pcaputil.c rpc.c \
    + 	  tcp_raw.c trigger.c record.c dsniff.c decode.c decode_aim.c \
    + 	  decode_citrix.c decode_cvs.c decode_ftp.c decode_hex.c \
    + 	  decode_http.c decode_icq.c decode_imap.c decode_irc.c \
    +@@ -99,8 +99,8 @@
    + arpspoof: arpspoof.o arp.o
    + 	$(CC) $(LDFLAGS) -o $@ arpspoof.o arp.o $(LIBS) $(PCAPLIB) $(LNETLIB)
    + 
    +-dnsspoof: dnsspoof.o pcaputil.o
    +-	$(CC) $(LDFLAGS) -o $@ dnsspoof.o pcaputil.o $(LIBS) $(PCAPLIB) $(LNETLIB)
    ++dnsspoof: dnsspoof.o pcaputil.o dns.o
    ++	$(CC) $(LDFLAGS) -o $@ dnsspoof.o pcaputil.o dns.o $(LIBS) $(PCAPLIB) $(LNETLIB)
    + 
    + filesnarf: nfs_prot.o filesnarf.o pcaputil.o rpc.o
    + 	$(CC) $(LDFLAGS) -o $@ filesnarf.o nfs_prot.o pcaputil.o rpc.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB)
    diff --git a/net/dsniff/patches/003-gdbm.patch b/net/dsniff/patches/003-gdbm.patch
    new file mode 100644
    index 0000000..67be3e5
    --- /dev/null
    +++ b/net/dsniff/patches/003-gdbm.patch
    @@ -0,0 +1,206 @@
    +Index: dsniff-2.4/configure
    +===================================================================
    +--- dsniff-2.4.orig/configure	2010-11-03 23:42:49.466000001 +0100
    ++++ dsniff-2.4/configure	2010-11-03 23:42:52.921000006 +0100
    +@@ -16,6 +16,8 @@
    + ac_help="$ac_help
    +   --with-db=DIR           use Berkeley DB (with --enable-compat185) in DIR"
    + ac_help="$ac_help
    ++  --with-gdbm=DIR         use GNU DBM in DIR"
    ++ac_help="$ac_help
    +   --with-libpcap=DIR      use libpcap in DIR"
    + ac_help="$ac_help
    +   --with-libnet=DIR       use libnet in DIR"
    +@@ -3059,7 +3061,40 @@
    + 
    + fi
    + 
    ++echo $ac_n "checking for libgdbm""... $ac_c" 1>&6
    ++echo "configure:3059: checking for libgdbm" >&5
    ++# Check whether --with-gdbm or --without-gdbm was given.
    ++if test "${with_gdbm+set}" = set; then
    ++  withval="$with_gdbm"
    ++   case "$withval" in
    ++  yes|no)
    ++     echo "$ac_t""no" 1>&6
    ++     ;;
    ++  *)
    ++     echo "$ac_t""$withval" 1>&6
    ++     if test -f $withval/include/gdbm.h -a -f $withval/lib/libgdbm.a; then
    ++        owd=`pwd`
    ++        if cd $withval; then withval=`pwd`; cd $owd; fi
    ++	DBINC="-I$withval/include"
    ++	DBLIB="-L$withval/lib -lgdbm"
    ++     else
    ++        { echo "configure: error: gdbm.h or libgdbm.a not found in $withval" 1>&2; exit 1; }
    ++     fi
    ++     ;;
    ++  esac 
    ++else
    ++   if test -f ${prefix}/include/gdbm.h; then
    ++     LNETINC="-I${prefix}/include"
    ++     LNETLIB="-L${prefix}/lib -lgdbm"
    ++  elif test -f /usr/include/gdbm.h; then
    ++     LNETLIB="-lgdbm"
    ++  else
    ++     echo "$ac_t""no" 1>&6
    ++     { echo "configure: error: libgdbm not found" 1>&2; exit 1; }
    ++  fi
    ++  echo "$ac_t""yes" 1>&6 
    + 
    ++fi
    + 
    + 
    + echo $ac_n "checking for libnet""... $ac_c" 1>&6
    +Index: dsniff-2.4/record.c
    +===================================================================
    +--- dsniff-2.4.orig/record.c	2010-11-03 23:42:49.471000001 +0100
    ++++ dsniff-2.4/record.c	2010-11-03 23:42:52.922000005 +0100
    +@@ -15,12 +15,7 @@
    + #include 
    + #include 
    + #include 
    +-#ifdef HAVE_DB_185_H
    +-#define DB_LIBRARY_COMPATIBILITY_API
    +-#include 
    +-#elif HAVE_DB_H
    +-#include 
    +-#endif
    ++#include 
    + #include 
    + 
    + #include "options.h"
    +@@ -37,7 +32,7 @@
    + 	struct netobj	data;
    + };
    + 	
    +-static DB *db;
    ++GDBM_FILE dbf;
    + 
    + static int
    + xdr_rec(XDR *xdrs, struct rec *rec)
    +@@ -64,7 +59,6 @@
    + 	
    + 	tm = localtime(&rec->time);
    + 	strftime(tstr, sizeof(tstr), "%x %X", tm);
    +-	
    + 	srcp = libnet_host_lookup(rec->src, Opt_dns);
    + 	dstp = libnet_host_lookup(rec->dst, Opt_dns);
    + 
    +@@ -89,10 +83,10 @@
    + 	fflush(stdout);
    + }
    + 
    +-static DBT *
    ++static datum
    + record_hash(struct rec *rec)
    + {
    +-	static DBT key;
    ++	static datum key;
    + 	static u_char hash[16];
    + 	MD5_CTX ctx;
    + 
    +@@ -105,16 +99,16 @@
    + 	MD5Update(&ctx, rec->data.n_bytes, rec->data.n_len);
    + 	MD5Final(hash, &ctx);
    + 
    +-	key.data = hash;
    +-	key.size = sizeof(hash);
    ++	key.dptr = hash;
    ++	key.dsize = sizeof(hash);
    + 	
    +-	return (&key);
    ++	return (key);
    + }
    + 
    + static int
    + record_save(struct rec *rec)
    + {
    +-	DBT *key, data;
    ++	datum key, data;
    + 	XDR xdrs;
    + 	u_char buf[2048];
    + 	
    +@@ -123,15 +117,15 @@
    + 	if (!xdr_rec(&xdrs, rec))
    + 		return (0);
    + 	
    +-	data.data = buf;
    +-	data.size = xdr_getpos(&xdrs);
    ++	data.dptr = buf;
    ++	data.dsize = xdr_getpos(&xdrs);
    + 	
    + 	xdr_destroy(&xdrs);
    + 
    + 	key = record_hash(rec);
    + 	
    +-	if (db->put(db, key, &data, R_NOOVERWRITE) == 0)
    +-		db->sync(db, 0);
    ++	if (gdbm_store(dbf, key, data, GDBM_INSERT) == 0)
    ++		gdbm_sync(dbf);
    + 	
    + 	return (1);
    + }
    +@@ -139,18 +133,22 @@
    + void
    + record_dump(void)
    + {
    +-	DBT key, data;
    ++	datum nextkey, key, content;
    + 	XDR xdrs;
    + 	struct rec rec;
    + 	
    +-	while (db->seq(db, &key, &data, R_NEXT) == 0) {	
    ++	key = gdbm_firstkey(dbf);
    ++	while (key.dptr) {	
    ++		nextkey = gdbm_nextkey(dbf, key);
    ++		content = gdbm_fetch(dbf, key);
    + 		memset(&rec, 0, sizeof(rec));
    +-		xdrmem_create(&xdrs, data.data, data.size, XDR_DECODE);
    +-		
    ++		xdrmem_create(&xdrs, content.dptr, content.dsize, XDR_DECODE);
    + 		if (xdr_rec(&xdrs, &rec)) {
    + 			record_print(&rec);
    + 		}
    + 		xdr_destroy(&xdrs);
    ++		free(key.dptr);
    ++		key = nextkey;
    + 	}
    + }
    + 
    +@@ -158,16 +156,23 @@
    + record_init(char *file)
    + {
    + 	int flags, mode;
    +-	
    ++	// needed for gdbm_open, which does not have the option to create
    ++	// a database in memory
    ++	if(file == NULL) {
    ++		char *record_file = "/tmp/.dsniff.db";
    ++		file = record_file;
    ++	}
    ++
    + 	if (Opt_read) {
    +-		flags = O_RDONLY;
    ++		flags = GDBM_READER;
    + 		mode = 0;
    + 	}
    + 	else {
    +-		flags = O_RDWR|O_CREAT;
    ++		flags = GDBM_WRCREAT;
    + 		mode = S_IRUSR|S_IWUSR;
    + 	}
    +-	if ((db = dbopen(file, flags, mode, DB_BTREE, NULL)) == NULL)
    ++
    ++	if ((dbf = gdbm_open(file, 1024, flags, mode, NULL)) == NULL)
    + 		return (0);
    + 
    + 	return (1);
    +@@ -206,6 +211,6 @@
    + void
    + record_close(void)
    + {
    +-	db->close(db);
    ++	gdbm_close(dbf);
    + }
    + 
    diff --git a/net/dsniff/patches/004-no_yp.patch b/net/dsniff/patches/004-no_yp.patch
    new file mode 100644
    index 0000000..774e04e
    --- /dev/null
    +++ b/net/dsniff/patches/004-no_yp.patch
    @@ -0,0 +1,45 @@
    +Index: dsniff-2.4/decode.c
    +===================================================================
    +--- dsniff-2.4.orig/decode.c	2010-11-03 23:42:49.419000001 +0100
    ++++ dsniff-2.4/decode.c	2010-11-03 23:42:56.481000002 +0100
    +@@ -51,8 +51,6 @@
    + extern int decode_portmap(u_char *, int, u_char *, int);
    + extern int decode_mountd(u_char *, int, u_char *, int);
    + extern int decode_vrrp(u_char *, int, u_char *, int);
    +-extern int decode_ypserv(u_char *, int, u_char *, int);
    +-extern int decode_yppasswd(u_char *, int, u_char *, int);
    + 
    + static struct decode decodes[] = {
    + 	{ "hex",	decode_hex },
    +@@ -88,8 +86,6 @@
    + 	{ "irc",	decode_irc },
    + 	{ "portmap",	decode_portmap },
    + 	{ "mountd",	decode_mountd },
    +-	{ "ypserv",	decode_ypserv },
    +-	{ "yppasswd",	decode_yppasswd },
    + 	{ NULL }
    + };
    + 
    +Index: dsniff-2.4/dsniff.services
    +===================================================================
    +--- dsniff-2.4.orig/dsniff.services	2010-11-03 23:42:49.429000001 +0100
    ++++ dsniff-2.4/dsniff.services	2010-11-03 23:42:56.481000002 +0100
    +@@ -66,5 +66,3 @@
    + aim		9898/tcp
    + pcanywhere	65301/tcp
    + mountd		100005/rpc
    +-ypserv		100004/rpc
    +-yppasswd	100009/rpc
    +Index: dsniff-2.4/Makefile.in
    +===================================================================
    +--- dsniff-2.4.orig/Makefile.in	2010-11-03 23:42:51.736998874 +0100
    ++++ dsniff-2.4/Makefile.in	2010-11-03 23:42:56.481000002 +0100
    +@@ -60,7 +60,7 @@
    + 	  decode_pop.c decode_portmap.c decode_postgresql.c decode_pptp.c \
    + 	  decode_rip.c decode_rlogin.c decode_smb.c decode_smtp.c \
    + 	  decode_sniffer.c decode_snmp.c decode_socks.c decode_tds.c \
    +-	  decode_telnet.c decode_vrrp.c decode_yp.c decode_x11.c
    ++	  decode_telnet.c decode_vrrp.c decode_x11.c
    + 
    + GEN	= mount.h mount.c nfs_prot.h nfs_prot.c
    + 
    diff --git a/net/dsniff/patches/005-openssl_fix.patch b/net/dsniff/patches/005-openssl_fix.patch
    new file mode 100644
    index 0000000..1b2f9e7
    --- /dev/null
    +++ b/net/dsniff/patches/005-openssl_fix.patch
    @@ -0,0 +1,11 @@
    +--- dsniff-2.4b1.orig/sshcrypto.c
    ++++ dsniff-2.4b1/sshcrypto.c
    +@@ -14,6 +14,8 @@
    + 
    + #include 
    + #include 
    ++#include 
    ++#include 
    + 
    + #include 
    + #include 
    diff --git a/net/dsniff/patches/006-pcap_header.patch b/net/dsniff/patches/006-pcap_header.patch
    new file mode 100644
    index 0000000..6836557
    --- /dev/null
    +++ b/net/dsniff/patches/006-pcap_header.patch
    @@ -0,0 +1,13 @@
    +Index: dsniff-2.4/configure
    +===================================================================
    +--- dsniff-2.4.orig/configure	2010-11-03 23:42:52.921000006 +0100
    ++++ dsniff-2.4/configure	2010-11-03 23:43:00.504000001 +0100
    +@@ -3033,7 +3033,7 @@
    + 	PCAPINC="-I$withval -I$withval/bpf"
    + 	PCAPLIB="-L$withval -lpcap"
    +      elif test -f $withval/include/pcap.h -a \
    +-	       -f $withval/include/net/bpf.h -a \
    ++	       -f $withval/include/pcap-bpf.h -a \
    + 	       -f $withval/lib/libpcap.a; then
    + 	owd=`pwd`
    + 	if cd $withval; then withval=`pwd`; cd $owd; fi
    diff --git a/net/dsniff/patches/007-time_h.patch b/net/dsniff/patches/007-time_h.patch
    new file mode 100644
    index 0000000..280b8c1
    --- /dev/null
    +++ b/net/dsniff/patches/007-time_h.patch
    @@ -0,0 +1,22 @@
    +diff -urNad --exclude=CVS --exclude=.svn dsniff-2.4b1/msgsnarf.c dsniff-2.4b1/msgsnarf.c
    +--- dsniff-2.4b1/msgsnarf.c	2001-03-15 08:33:04.000000000 +0000
    ++++ dsniff-2.4b1/msgsnarf.c	2005-07-11 20:15:50.000000000 +0000
    +@@ -23,6 +23,7 @@
    + #include 
    + #include 
    + #include 
    ++#include 
    + 
    + #include "buf.h"
    + #include "decode.h"
    +diff -urNad --exclude=CVS --exclude=.svn dsniff-2.4b1/sshow.c dsniff-2.4b1/sshow.c
    +--- dsniff-2.4b1/sshow.c	2005-07-11 20:14:19.000000000 +0000
    ++++ dsniff-2.4b1/sshow.c	2005-07-11 20:15:26.000000000 +0000
    +@@ -15,6 +15,7 @@
    + 
    + #include 
    + #include 
    ++#include 
    + 
    + #include 
    + #include 
    diff --git a/net/dsniff/patches/008-md5_include.patch b/net/dsniff/patches/008-md5_include.patch
    new file mode 100644
    index 0000000..f8d3829
    --- /dev/null
    +++ b/net/dsniff/patches/008-md5_include.patch
    @@ -0,0 +1,13 @@
    +Index: dsniff-2.4/record.c
    +===================================================================
    +--- dsniff-2.4.orig/record.c	2010-11-03 23:43:14.268000004 +0100
    ++++ dsniff-2.4/record.c	2010-11-03 23:43:16.947000004 +0100
    +@@ -14,7 +14,7 @@
    + 
    + #include 
    + #include 
    +-#include 
    ++#include "missing/md5.h"
    + #include 
    + #include 
    + 
    diff --git a/net/dsniff/patches/010-clk-tck-fix.patch b/net/dsniff/patches/010-clk-tck-fix.patch
    new file mode 100644
    index 0000000..cc15bef
    --- /dev/null
    +++ b/net/dsniff/patches/010-clk-tck-fix.patch
    @@ -0,0 +1,15 @@
    +Index: dsniff-2.4/sshow.c
    +===================================================================
    +--- dsniff-2.4.orig/sshow.c	2010-11-03 23:41:56.335999997 +0100
    ++++ dsniff-2.4/sshow.c	2010-11-03 23:42:10.981000001 +0100
    +@@ -42,6 +42,10 @@
    + 
    + #define HISTORY_SIZE			16
    + 
    ++#ifndef CLK_TCK
    ++# define CLK_TCK	CLOCKS_PER_SEC
    ++#endif
    ++
    + typedef struct {
    + 	u_int min, max;
    + } range;
    diff --git a/net/dudders/Makefile b/net/dudders/Makefile
    new file mode 100644
    index 0000000..a9721c6
    --- /dev/null
    +++ b/net/dudders/Makefile
    @@ -0,0 +1,66 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=dudders
    +PKG_VERSION:=1.04
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/$(PKG_NAME)
    +PKG_MD5SUM:=1d368a86f3c284e95d260a94767a8ded
    +
    +PKG_BUILD_DEPENDS:=+libopenssl +libgcrypt
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/dudders
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=IP Addresses and Names
    +  TITLE:=DNS Update SIG(0) client
    +  MAINTAINER:=Dean Scarff 
    +  URL:=http://dudders.sourceforge.net/
    +endef
    +
    +define Package/dudders/description
    +  Dudders is a utility for updating DNS records.  It points
    +  a domain name to a given IP address, using the RFC2136 DNS
    +  UPDATE protocol and a SIG(0) signature.  It is designed with
    +  embedded systems in mind.
    +
    +  You must have either libopenssl or libgcrypt installed to
    +  use this package.
    +endef
    +
    +define Package/dudders/conffiles
    +/etc/config/dudders
    +endef
    +
    +EXTRA_CFLAGS:= -DNDEBUG -std=gnu99
    +
    +CONFIGURE_ARGS+= \
    +	--with-libgcrypt-prefix="$(STAGING_DIR)/usr"
    +
    +define Package/dudders/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dudders $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/lib/dudders
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/dudders/crypt_gcrypt.so \
    +		       $(1)/usr/lib/dudders/
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/dudders/crypt_openssl.so \
    +		       $(1)/usr/lib/dudders/
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_CONF) ./files/dudders.conf $(1)/etc/config/dudders
    +	$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
    +	$(INSTALL_BIN) ./files/dudders.hotplug $(1)/etc/hotplug.d/iface/50-dudders
    +endef
    +
    +$(eval $(call BuildPackage,dudders))
    diff --git a/net/dudders/files/dudders.conf b/net/dudders/files/dudders.conf
    new file mode 100644
    index 0000000..27dc4b6
    --- /dev/null
    +++ b/net/dudders/files/dudders.conf
    @@ -0,0 +1,7 @@
    +config dudders
    +        option enabled  'no'
    +        option tcp      'yes'
    +        option keyfile '/tmp/dudders.private'
    +        option keyname  'owner.example.com'
    +        option hostname 'test.example.com'
    +       option ttl       86400
    diff --git a/net/dudders/files/dudders.hotplug b/net/dudders/files/dudders.hotplug
    new file mode 100644
    index 0000000..9a85a01
    --- /dev/null
    +++ b/net/dudders/files/dudders.hotplug
    @@ -0,0 +1,46 @@
    +#!/bin/sh
    +
    +. /etc/functions.sh
    +
    +config_cb() {
    +       local cfg="$CONFIG_SECTION"
    +       local cfgtype
    +       config_get cfgtype "$cfg" TYPE
    +       dudders=/usr/bin/dudders
    +
    +       case "$cfgtype" in
    +               dudders)
    +                       config_get enabled  $cfg enabled
    +                       [ "$enabled" = "yes" ] || return 0
    +
    +                       config_get tcp      $cfg tcp
    +                       config_get keyname  $cfg keyname
    +                       config_get mname    $cfg mname
    +                       config_get zone     $cfg zone
    +                       config_get keyfile  $cfg keyfile
    +                       config_get hostname $cfg hostname
    +                       config_get ttl      $cfg ttl
    +
    +                       [ -r "$keyfile" ] || return 1
    +                       sleep 1
    +                       interface=$(route -n 2>&- \
    +                         |grep '^0.0.0.0' \
    +                         |sed -e 's/.* \([^ ]\+\)$/\1/')
    +                       [ -z "$interface" ] && return 0
    +                       [ "$DEVICE" = "$interface" -o \
    +                         "$IFNAME" = "$interface" -o \
    +                         "$PPP_IFACE" = "$interface" ] || return 0
    +                       ipaddr=${PPP_LOCAL:-${IPLOCAL:-$(ifconfig "$interface" \
    +                           |grep -o 'addr:[^ ]\+' \
    +                           |sed -e 's/addr://')}}
    +                       OPTS=${keyname:+" -k '$keyname'"}
    +                       [ "$tcp" = "yes" ] && OPTS=$OPTS" -T"
    +                       OPTS=$OPTS${mname:+" -m '$mname'"}
    +                       OPTS=$OPTS${zone:+" -z '$zone'"}
    +                       eval $dudders -k $keyfile $OPTS $hostname $ttl $ipaddr
    +               ;;
    +       esac
    +}
    +case "${ACTION:-ifup}" in
    +       ifup) config_load dudders ;;
    +esac
    diff --git a/net/e169-stats/Makefile b/net/e169-stats/Makefile
    new file mode 100644
    index 0000000..cac9d12
    --- /dev/null
    +++ b/net/e169-stats/Makefile
    @@ -0,0 +1,37 @@
    +#
    +# Copyright (C) 2010-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=e169-stats
    +PKG_VERSION:=0.6
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.mavetju.org/download
    +PKG_MD5SUM:=2f6f5b984faeec368a867e59cd2cc36d
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/e169-stats
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=Huawei USB modem statistics
    +  URL:=http://www.mavetju.org/weblog/html/00282.html
    +  DEPENDS:=+libncurses
    +endef
    +
    +define Package/e169-stats/description
    +  Huawei E169 statistics, works with other Huawei's devices.
    +endef
    +
    +define Package/e169-stats/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/e169-stats $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,e169-stats))
    diff --git a/net/e169-stats/patches/01-make.patch b/net/e169-stats/patches/01-make.patch
    new file mode 100644
    index 0000000..28a56c5
    --- /dev/null
    +++ b/net/e169-stats/patches/01-make.patch
    @@ -0,0 +1,11 @@
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -1,7 +1,7 @@
    + all: e169-stats
    + 
    + e169-stats: e169-stats.c
    +-	gcc -Wall -o e169-stats e169-stats.c -lcurses
    ++	$(CC) -Wall -o e169-stats e169-stats.c -lcurses -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib
    + 
    + clean:
    + 	-rm e169-stats *.core
    diff --git a/net/ekg/Makefile b/net/ekg/Makefile
    new file mode 100644
    index 0000000..772e811
    --- /dev/null
    +++ b/net/ekg/Makefile
    @@ -0,0 +1,51 @@
    +#
    +# Copyright (C) 2009-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ekg
    +PKG_VERSION:=1.7
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://ekg.chmurka.net/
    +PKG_MD5SUM:=2aa92b56517fdf09d75519a105772b74
    +
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/ekg
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Instant Messaging
    +  TITLE:=Eksperymentalny Klient Gadu-Gadu (Polish IM)
    +  URL:=http://ekg.chmurka.net
    +  DEPENDS:=+zlib +libncurses
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--without-c99-vsnprintf \
    +	--without-bind \
    +	--without-libgsm \
    +	--without-libjpeg \
    +	--without-libungif \
    +	--without-openssl \
    +	--disable-libgadu-openssl \
    +	--enable-ui-ncurses \
    +	--disable-ui-readline \
    +
    +CONFIGURE_VARS+= \
    +	CFLAGS="$$$$CFLAGS $(TARGET_CPPFLAGS)" \
    +	CFLAGS_LIBGADU="$$$$CFLAGS $(TARGET_CPPFLAGS)" \
    +
    +define Package/ekg/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/ekg $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,ekg))
    diff --git a/net/ekg/patches/100-compile-fixes.patch b/net/ekg/patches/100-compile-fixes.patch
    new file mode 100644
    index 0000000..2f9ccbd
    --- /dev/null
    +++ b/net/ekg/patches/100-compile-fixes.patch
    @@ -0,0 +1,62 @@
    +Index: ekg-1.7/Makefile.in
    +===================================================================
    +--- ekg-1.7.orig/Makefile.in	2010-11-02 16:55:11.021994526 +0100
    ++++ ekg-1.7/Makefile.in	2010-11-02 16:59:57.189994991 +0100
    +@@ -15,29 +15,31 @@
    + 
    + #
    + 
    +-all:	configure libgadu @ekg@ @make_ekgwap@
    ++libgadu:=lib/libgadu.a
    + 
    +-libgadu:
    +-	cd lib && $(MAKE) all
    ++all: @ekg@ @make_ekgwap@
    + 
    +-ekg:	
    +-	cd src && $(MAKE) all
    ++$(libgadu): dep
    ++	$(MAKE) -C lib
    + 
    +-make-ekgwap:
    +-	cd ekgwap && $(MAKE) all
    ++ekg: $(libgadu)
    ++	$(MAKE) -C src
    + 
    +-examples:
    +-	cd examples && $(MAKE) all
    ++make-ekgwap: $(libgadu)
    ++	$(MAKE) -C ekgwap
    ++
    ++examples: $(libgadu)
    ++	$(MAKE) -C examples
    + 
    + #
    + 
    + dep:	dep-libgadu @dep_ekg@
    + 
    +-dep-libgadu:
    +-	cd lib && $(MAKE) dep
    ++dep-libgadu: configure
    ++	$(MAKE) -C lib dep
    + 
    +-dep-ekg:
    +-	cd src && $(MAKE) dep
    ++dep-ekg: configure
    ++	$(MAKE) -C src dep
    + 
    + #
    + 
    +@@ -49,10 +51,10 @@
    + install:	all install-libgadu @install_ekg@ @install_ekgwap@
    + 
    + install-libgadu:
    +-	cd lib && $(MAKE) install
    ++	$(MAKE) -C lib install
    + 
    + install-ekg:	install-ekg-data install-ekg-man
    +-	cd src && $(MAKE) install
    ++	$(MAKE) -C src install
    + 
    + install-ekg-data:
    + 	$(INSTALL) -d $(DESTDIR)$(datadir)/ekg/themes
    diff --git a/net/elinks/Makefile b/net/elinks/Makefile
    new file mode 100644
    index 0000000..af26ac1
    --- /dev/null
    +++ b/net/elinks/Makefile
    @@ -0,0 +1,92 @@
    +#
    +# Copyright (C) 2006-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=elinks
    +PKG_VERSION:=0.11.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://elinks.or.cz/download
    +PKG_MD5SUM:=fcd087a6d2415cd4c6fd1db53dceb646
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/elinks
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libopenssl
    +  TITLE:=A text based web browser
    +  URL:=http://elinks.or.cz/
    +endef
    +
    +define Package/elinks/description
    +An advanced text based web browser
    +endef
    +
    +SHVAR_TRANS:= \
    +	$(STAGING_DIR_HOST)/bin/sed -e \
    +	'y%*+%pp%;s%[^_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]%_%g'
    +
    +define Build/Configure
    + (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
    +                x=`echo ac_cv_file_./features.conf | $(SHVAR_TRANS)` && export $$$${x}=yes && \
    +                x=`echo ac_cv_file_$(abspath $(PKG_BUILD_DIR)/features.conf) | $(SHVAR_TRANS)` && export $$$${x}=yes && \
    +                $(TARGET_CONFIGURE_OPTS) \
    +                CFLAGS="$(TARGET_CFLAGS)" \
    +                CPPFLAGS="$(TARGET_CPPFLAGS)" \
    +                LDFLAGS="$(TARGET_LDFLAGS)" \
    +                ./configure \
    +                        --target=$(GNU_TARGET_NAME) \
    +                        --host=$(GNU_TARGET_NAME) \
    +                        --build=$(GNU_HOST_NAME) \
    +                        --program-prefix="" \
    +                        --program-suffix="" \
    +                        --prefix=/usr \
    +                        --exec-prefix=/usr \
    +                        --bindir=/usr/bin \
    +                        --datadir=/usr/share \
    +                        --includedir=/usr/include \
    +                        --infodir=/usr/share/info \
    +                        --libdir=/usr/lib \
    +                        --libexecdir=/usr/lib \
    +                        --localstatedir=/var \
    +                        --mandir=/usr/share/man \
    +                        --sbindir=/usr/sbin \
    +                        --sysconfdir=/etc \
    +                        $(DISABLE_NLS) \
    +                        --enable-small\
    +                        --enable-256-colors\
    +                        --disable-backtrace\
    +                        --disable-data\
    +                        --disable-formhist\
    +                        --disable-leds \
    +                        --disable-mailcap\
    +                        --disable-mouse \
    +                        --disable-smb \
    +                        --disable-uri-rewrite\
    +                        --disable-xbel \
    +                        --without-bzlib \
    +                        --without-gpm \
    +                        --without-idn \
    +                        --without-gnutls \
    +                        --without-libiconv \
    +                        --without-lua \
    +                        --with-openssl="$(STAGING_DIR)/usr" \
    +                        --without-spidermonkey\
    +                        --without-x\
    +                        --without-zlib \
    + 	);
    +endef
    +
    +define Package/elinks/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/elinks $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,elinks))
    diff --git a/net/elinks/patches/002-fix_avr32_compile b/net/elinks/patches/002-fix_avr32_compile
    new file mode 100644
    index 0000000..99a8874
    --- /dev/null
    +++ b/net/elinks/patches/002-fix_avr32_compile
    @@ -0,0 +1,20 @@
    +--- a/config/config.sub
    ++++ b/config/config.sub
    +@@ -239,7 +239,7 @@ case $basic_machine in
    + 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
    + 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
    + 	| am33_2.0 \
    +-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
    ++	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
    + 	| bfin \
    + 	| c4x | clipper \
    + 	| d10v | d30v | dlx | dsp16xx \
    +@@ -313,7 +313,7 @@ case $basic_machine in
    + 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
    + 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
    + 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
    +-	| avr-* \
    ++	| avr-* | avr32-* \
    + 	| bfin-* | bs2000-* \
    + 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
    + 	| clipper-* | craynv-* | cydra-* \
    diff --git a/net/et131x/Makefile b/net/et131x/Makefile
    new file mode 100644
    index 0000000..8b3f91d
    --- /dev/null
    +++ b/net/et131x/Makefile
    @@ -0,0 +1,58 @@
    +include $(TOPDIR)/rules.mk
    +include $(INCLUDE_DIR)/kernel.mk
    +
    +PKG_NAME:=et131x
    +ifdef CONFIG_LINUX_2_6_25
    +  PKG_VERSION:=1.2.3-3
    +  PKG_RELEASE:=1
    +
    +  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +  PKG_SOURCE_URL:=@SF/et131x
    +  PKG_MD5SUM:=9496422c7d218f27bae1be42a04d122e
    +endif
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +ifdef CONFIG_LINUX_2_6_25
    +  MODULE:=$(PKG_BUILD_DIR)/et131x.$(LINUX_KMOD_SUFFIX)
    +  KMOD_BUILD_DIR=$(PKG_BUILD_DIR)
    +else
    +  MODULE:=$(LINUX_DIR)/drivers/staging/et131x/et131x.$(LINUX_KMOD_SUFFIX)
    +  KMOD_BUILD_DIR=$(LINUX_DIR)/drivers/staging/et131x
    +endif
    +
    +define KernelPackage/et131x
    +  SUBMENU:=Network Devices
    +  TITLE:=Agere ET131x Gigabit Ethernet driver
    +  URL:=http://sourceforge.net/projects/et131x
    +  FILES:=$(MODULE)
    +  KCONFIG:= \
    +  	CONFIG_ET131X=m \
    +	CONFIG_ET131X_DEBUG=n
    +  DEPENDS:=@!LINUX_2_4 @PCI_SUPPORT
    +  AUTOLOAD:=$(call AutoLoad,70,et131x)
    +endef
    +
    +define KernelPackage/et131x/description
    +  This package contains the et131x kernel module.
    +endef
    +
    +ifndef CONFIG_LINUX_2_6_25
    +  define Build/Prepare
    +    # nothing to do
    +  endef
    +  define Build/Configure
    +    # nothing to do
    +  endef
    +endif
    +
    +define Build/Compile
    +	$(MAKE) -C "$(LINUX_DIR)" \
    +		ARCH="$(LINUX_KARCH)" \
    +		CROSS_COMPILE="$(TARGET_CROSS)" \
    +		SUBDIRS="$(KMOD_BUILD_DIR)" \
    +		CONFIG_ET131X=m
    +endef
    +
    +$(eval $(call KernelPackage,et131x))
    +
    diff --git a/net/etherpuppet/Makefile b/net/etherpuppet/Makefile
    new file mode 100644
    index 0000000..f85f9d2
    --- /dev/null
    +++ b/net/etherpuppet/Makefile
    @@ -0,0 +1,50 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=etherpuppet
    +PKG_REV:=90decf83d1d4
    +PKG_VERSION:=0.3_r$(PKG_REV)
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=http://hg.secdev.org/etherpuppet
    +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
    +PKG_SOURCE_VERSION:=$(PKG_REV)
    +PKG_SOURCE_PROTO:=hg
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/etherpuppet
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+kmod-tun
    +  TITLE:=A voodoo doll for an Ethernet interface
    +  URL:=http://www.secdev.org/projects/etherpuppet/
    +  SUBMENU:=VPN
    +endef
    +
    +define Package/etherpuppet/description
    +  Etherpuppet is a small program for Linux that will create a virtual interface
    +  (TUN/TAP) on one machine from the ethernet interface of another machine
    +  through a TCP connection.
    +endef
    +
    +define Build/Configure
    +endef
    +
    +define Build/Compile
    +  $(TARGET_CC) $(TARGET_CFLAGS) $(PKG_BUILD_DIR)/$(PKG_NAME).c -o $(PKG_BUILD_DIR)/$(PKG_NAME)
    +endef
    +
    +define Package/etherpuppet/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,etherpuppet))
    diff --git a/net/etherwake/Makefile b/net/etherwake/Makefile
    new file mode 100644
    index 0000000..7cea0ff
    --- /dev/null
    +++ b/net/etherwake/Makefile
    @@ -0,0 +1,50 @@
    +#
    +# Copyright (C) 2007-2009 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=etherwake
    +PKG_VERSION:=1.09
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
    +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/e/etherwake
    +PKG_MD5SUM:=628e8b2a28d47f262e4c26c989402a59
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/etherwake
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=WoL client for magic packets via ethernet frames
    +  URL:=http://ftp.debian.org/debian/pool/main/e/etherwake
    +endef
    +
    +define Package/etherwake/description
    +	You can wake up WOL compliant Computers which have been powered down to 
    +	sleep mode or start WOL compliant Computers with a BIOS feature.
    +	WOL is an abbreviation for Wake-on-LAN. It is a standard that allows you 
    +	to turn on a computer from another location over a network connection.
    +	ether-wake also supports WOL passwords.
    +endef
    +
    +define Build/Compile
    +	$(TARGET_CC) $(TARGET_CFLAGS) -D__UCLIBC__ $(PKG_BUILD_DIR)/ether-wake.c -o $(PKG_BUILD_DIR)/etherwake
    +endef
    +
    +define Package/etherwake/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/etherwake $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_DATA) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
    +endef
    +
    +$(eval $(call BuildPackage,etherwake))
    diff --git a/net/etherwake/files/etherwake.config b/net/etherwake/files/etherwake.config
    new file mode 100644
    index 0000000..3d8e515
    --- /dev/null
    +++ b/net/etherwake/files/etherwake.config
    @@ -0,0 +1,28 @@
    +config 'etherwake' 'setup'
    +	# possible program pathes
    +	option 'pathes' '/usr/bin/etherwake /usr/bin/ether-wake'
    +	# use sudo, defaults to off
    +	option 'sudo' 'off'
    +	# interface, defaults to 'eth0'
    +	# -i 
    +	option 'interface' ''
    +	# send wake-up packet to the broadcast address, defaults to off
    +	# -b
    +	option 'broadcast' 'off'
    +
    +config 'target'
    +	# name for the target
    +	option 'name' 'example'
    +	# mac address to wake up
    +	option 'mac' '11:22:33:44:55:66'
    +	# password in hex without any delimiters
    +	option 'password' 'AABBCCDDEEFF'
    +	# wake up on system start, defaults to off
    +	option 'wakeonboot' 'off'
    +
    +# To add a new target use:
    +#  uci add etherwake target
    +#  uci set etherwake.@target[-1].name=example
    +#  uci set etherwake.@target[-1].mac=11:22:33:44:55:66
    +#  uci set etherwake.@target[-1].password=AABBCCDDEEFF
    +#  uci set etherwake.@target[-1].wakeonboot=off
    diff --git a/net/etherwake/files/etherwake.init b/net/etherwake/files/etherwake.init
    new file mode 100644
    index 0000000..0504cf1
    --- /dev/null
    +++ b/net/etherwake/files/etherwake.init
    @@ -0,0 +1,132 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2009 OpenWrt.org
    +
    +NAME='etherwake'
    +START=60
    +PROGRAM=''
    +
    +start()
    +{
    +	local searchlist=''
    +	local section=''
    +	local value=''
    +
    +	config_load "${NAME}"
    +
    +	# check for available program
    +	config_get searchlist 'setup' 'pathes'
    +	PROGRAM=$(search_program "${searchlist}")
    +	[ -z "${PROGRAM}" ] && {
    +		echo "${initscript}: No ${NAME} program installed. Check: opkg list | grep ${NAME}"
    +		exit 1
    +	}
    +
    +	# sudo
    +	config_get_bool value 'setup' 'sudo' '0'
    +	[ "${value}" -ne 0 ] && PROGRAM="sudo ${PROGRAM}"
    +
    +	# interface
    +	config_get value 'setup' 'interface'
    +	[ -n "${value}" ] && append PROGRAM "-i ${value}"
    +
    +	# broadcast
    +	config_get_bool value 'setup' 'broadcast' '0'
    +	[ "${value}" -ne 0 ] && append PROGRAM '-b'
    +
    +	# wake up targets
    +	config_foreach etherwake_start target $*
    +}
    +
    +etherwake_start()
    +{
    +	local section="$1"
    +	shift
    +
    +	local names="$*"
    +
    +	local value=''
    +	local target=''
    +
    +	if [ -z "${names}" ]
    +	 then
    +		# check if boot target
    +		config_get_bool value "${section}" 'wakeonboot' '0'
    +		[ "${value}" -eq 0 ] && return 0
    +
    +		# wake up target
    +		do_etherwake "${section}"
    +		return $?
    +	else
    +		# name
    +		config_get value "${section}" 'name'
    +		[ -z "${value}" ] && return 0
    +
    +		for target in ${names}
    +		 do
    +			[ "${value}" != "${target}" ] && continue
    +
    +			# wake up target
    +			do_etherwake "${section}"
    +			return $?
    +		done
    +	fi
    +}
    +
    +# execute etherwake command for target
    +do_etherwake()
    +{
    +	local section="$1"
    +	local value=''
    +	local password=''
    +	local args=''
    +
    +	# password
    +	config_get value "${section}" 'password'
    +	[ -n "${value}" ] && {
    +		password=$(etherwake_password "${value}")
    +		append args "-p ${password}"
    +	}
    +
    +	# mac address
    +	config_get value "${section}" 'mac'
    +	[ -z "${value}" ] && { echo "${initscript}: Target ${section} has no MAC address"; return 1; }
    +	append args "${value}"
    +
    +	# name
    +	config_get value "${section}" 'name'
    +	[ -z "${value}" ] && value="{section}"
    +
    +	# execute command
    +	echo "${initscript}: Waking up ${value} via ${PROGRAM}${args:+ ${args}}"
    +	${PROGRAM} ${args}
    +	return $?
    +}
    +
    +
    +# find first available program from searchlist
    +search_program()
    +{
    +	local searchlist="$1"
    +	local test=''
    +	local program=''
    +
    +	for test in ${searchlist} ; do
    +		[ -x "${test}" ] && {
    +			program="${test}"
    +			break;
    +		}
    +	done
    +
    +	[ -n "${program}" ] && echo "${program}"
    +
    +	return
    +}
    +
    +# prepare hex password
    +etherwake_password()
    +{
    +	local delimiter=':'
    +	local password=`echo "$1" | sed "s/../&${delimiter}/g"`
    +	echo "${password%${delimiter}}"
    +	return
    +}
    diff --git a/net/etherwake/patches/100-no_ether_hostton.patch b/net/etherwake/patches/100-no_ether_hostton.patch
    new file mode 100644
    index 0000000..e33c06b
    --- /dev/null
    +++ b/net/etherwake/patches/100-no_ether_hostton.patch
    @@ -0,0 +1,37 @@
    +--- etherwake-1.09.orig/ether-wake.c	2005-07-10 20:44:25.000000000 +0200
    ++++ etherwake-1.09.orig.no_ether_hostton/ether-wake.c	2007-04-29 19:03:41.000000000 +0200
    +@@ -15,7 +15,11 @@
    + "	an optional password appended.\n"
    + "\n"
    + "	The single required parameter is the Ethernet MAC (station) address\n"
    ++#if !defined(__UCLIBC__)
    + "	of the machine to wake or a host ID with known NSS 'ethers' entry.\n"
    ++#else
    ++"	of the machine to wake.\n"
    ++#endif
    + "	The MAC address may be found with the 'arp' program while the target\n"
    + "	machine is awake.\n"
    + "\n"
    +@@ -289,16 +293,22 @@
    + 		if (debug)
    + 			fprintf(stderr, "The target station address is %s.\n",
    + 					ether_ntoa(eaddr));
    ++#if !defined(__UCLIBC__)
    + 	} else if (ether_hostton(hostid, eaddr) == 0) {
    + 		if (debug)
    + 			fprintf(stderr, "Station address for hostname %s is %s.\n",
    + 					hostid, ether_ntoa(eaddr));
    ++#endif
    + 	} else {
    + 		(void)fprintf(stderr,
    + 					  "ether-wake: The Magic Packet host address must be "
    + 					  "specified as\n"
    ++#if !defined(__UCLIBC__)
    + 					  "  - a station address, 00:11:22:33:44:55, or\n"
    + 					  "  - a hostname with a known 'ethers' entry.\n");
    ++#else
    ++					  "  - a station address, 00:11:22:33:44:55\n");
    ++#endif
    + 		return -1;
    + 	}
    + 	return 0;
    diff --git a/net/ethtool/Makefile b/net/ethtool/Makefile
    new file mode 100644
    index 0000000..8cded28
    --- /dev/null
    +++ b/net/ethtool/Makefile
    @@ -0,0 +1,41 @@
    +#
    +# Copyright (C) 2006-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ethtool
    +PKG_VERSION:=2.6.38
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@KERNEL/software/network/ethtool
    +PKG_MD5SUM:=4cc35c59e4fd0defff768f9f59fa41ad
    +
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/ethtool
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=Display or change ethernet card settings
    +  URL:=http://www.kernel.org/pub/software/network/ethtool/
    +  MAINTAINER:=Luka Perkov 
    +endef
    +
    +define Package/ethtool/description
    + ethtool is a small utility for examining and tuning your ethernet-based
    + network interface.
    +endef
    +
    +define Package/ethtool/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethtool $(1)/usr/sbin/
    +endef
    +
    +$(eval $(call BuildPackage,ethtool))
    diff --git a/net/ethtool/patches/110-ixp4xx.patch b/net/ethtool/patches/110-ixp4xx.patch
    new file mode 100644
    index 0000000..3209816
    --- /dev/null
    +++ b/net/ethtool/patches/110-ixp4xx.patch
    @@ -0,0 +1,198 @@
    +--- ethtool-2.6.38/ethtool.c	2011-02-21 20:06:00.000000000 +0100
    ++++ ethtool-2.6.38/ethtool.c	2011-03-31 23:30:20.433874703 +0200
    +@@ -1680,6 +1680,7 @@
    + 	{ "igb", igb_dump_regs },
    + 	{ "ixgb", ixgb_dump_regs },
    + 	{ "ixgbe", ixgbe_dump_regs },
    ++	{ "ixp4xx_mac", ixp4xx_dump_regs },
    + 	{ "natsemi", natsemi_dump_regs },
    + 	{ "e100", e100_dump_regs },
    + 	{ "amd8111e", amd8111e_dump_regs },
    +--- ethtool-2.6.38/ethtool-util.h	2011-02-21 19:23:37.000000000 +0100
    ++++ ethtool-2.6.38/ethtool-util.h	2011-03-31 23:34:06.130541369 +0200
    +@@ -100,7 +100,10 @@
    + int sfc_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
    + 
    + /* STMMAC embedded ethernet controller */
    +-int st_mac100_dump_regs(struct ethtool_drvinfo *info,
    +-			struct ethtool_regs *regs);
    ++int st_mac100_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
    + int st_gmac_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
    ++
    ++/* Intel IXP4xx internal MAC */
    ++int ixp4xx_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
    ++
    + #endif
    +--- ethtool-2.6.38/ixp4xx.c	1970-01-01 01:00:00.000000000 +0100
    ++++ ethtool-2.6.38/ixp4xx.c	2011-03-31 23:30:37.267208035 +0200
    +@@ -0,0 +1,131 @@
    ++/*
    ++ * Copyright (c) 2006 Christian Hohnstaed 
    ++ * This file is released under the GPLv2
    ++ */
    ++
    ++#include 
    ++#include "ethtool-util.h"
    ++
    ++#ifndef BIT
    ++#define BIT(x) (1<data;
    ++
    ++	fprintf(stdout,
    ++		"TXctrl:          0x%02x:0x%02x\n"
    ++		"    Enable:      %s\n"
    ++		"    Duplex:      %s\n"
    ++		"    Retry:       %s (%d)\n"
    ++		"    Padding:     %s\n"
    ++		"    Frame check: %s\n"
    ++		"    TX deferral: %s\n"
    ++		"    Connection:  %s\n"
    ++		"\n",
    ++		data[0], data[1],
    ++		data[0] & TX_CNTRL1_TX_EN   ? "yes"      : "no",
    ++		data[0] & TX_CNTRL1_DUPLEX  ? "half"     : "full",
    ++		data[0] & TX_CNTRL1_RETRY   ? "enabled"  : "disabled",
    ++		data[1] & TX_CNTRL2_RETRIES_MASK,
    ++		data[0] & TX_CNTRL1_PAD_EN  ? "enabled"  : "disabled",
    ++		data[0] & TX_CNTRL1_FCS_EN  ? "enabled"  : "disabled",
    ++		data[0] & TX_CNTRL1_2DEFER  ? "two-part" : "one-part",
    ++		data[0] & TX_CNTRL1_RMII    ? "RMII"     : "Full MII"
    ++	);
    ++
    ++	fprintf(stdout,
    ++		"RXctrl:          0x%02x\n"
    ++		"    Enable:      %s\n"
    ++		"    Pad strip:   %s\n"
    ++		"    CRC check:   %s\n"
    ++		"    Pause:       %s\n"
    ++		"    Loop:        %s\n"
    ++		"    Promiscous:  %s\n"
    ++		"    Runt frames: %s\n"
    ++		"    Broadcast:   %s\n"
    ++		"\n",
    ++		data[2],
    ++		data[2] & RX_CNTRL1_RX_EN        ? "yes"      : "no",
    ++		data[2] & RX_CNTRL1_PADSTRIP_EN  ? "enabled"  : "disabled",
    ++		data[2] & RX_CNTRL1_CRC_EN       ? "enabled"  : "disabled",
    ++		data[2] & RX_CNTRL1_PAUSE_EN     ? "enabled"  : "disabled",
    ++		data[2] & RX_CNTRL1_LOOP_EN      ? "enabled"  : "disabled",
    ++		data[2] & RX_CNTRL1_ADDR_FLTR_EN ? "disabled" : "enabled",
    ++		data[2] & RX_CNTRL1_RX_RUNT_EN   ? "forward"  : "discard",
    ++		data[2] & RX_CNTRL1_BCAST_DIS    ? "disabled" : "enabled"
    ++	);
    ++	fprintf(stdout,
    ++		"Core control:    0x%02x\n"
    ++		"    Core state:  %s\n"
    ++		"    RX fifo:     %s\n"
    ++		"    TX fifo:     %s\n"
    ++		"    Send jam:    %s\n"
    ++		"    MDC clock    %s\n"
    ++		"\n",
    ++		data[32],
    ++		data[32] & CORE_RESET          ? "reset"  : "normal operation",
    ++		data[32] & CORE_RX_FIFO_FLUSH  ? "flush"  : "ok",
    ++		data[32] & CORE_TX_FIFO_FLUSH  ? "flush"  : "ok",
    ++		data[32] & CORE_SEND_JAM       ? "yes"    : "no",
    ++		data[32] & CORE_MDC_EN         ? "output" : "input"
    ++	);
    ++	fprintf(stdout,
    ++		"MAC addresses: \n"
    ++		"  Multicast mask:     " MAC "\n"
    ++		"  Multicast address:  " MAC "\n"
    ++		"  Unicast address:    " MAC "\n"
    ++		"\n",
    ++		MAC_DATA(data+13), MAC_DATA(data+19), MAC_DATA(data+26)
    ++	);
    ++	fprintf(stdout,
    ++		"Random seed:      0x%02x\n"
    ++		"Threshold empty:   %3d\n"
    ++		"Threshold full:    %3d\n"
    ++		"TX buffer size:    %3d\n"
    ++		"TX deferral:       %3d\n"
    ++		"RX deferral:       %3d\n"
    ++		"TX two deferral 1: %3d\n"
    ++		"TX two deferral 2: %3d\n"
    ++		"Slot time:         %3d\n"
    ++		"Internal clock:    %3d\n"
    ++		"\n",
    ++		data[4], data[5], data[6], data[7], data[8], data[9],
    ++		data[10], data[11], data[12], data[25]
    ++	);
    ++
    ++	return 0;
    ++}
    ++
    +--- ethtool-2.6.38/Makefile.am	2011-01-14 21:23:57.000000000 +0100
    ++++ ethtool-2.6.38/Makefile.am	2011-03-31 23:37:15.913874702 +0200
    +@@ -8,7 +8,7 @@
    + 		  amd8111e.c de2104x.c e100.c e1000.c igb.c	\
    + 		  fec_8xx.c ibm_emac.c ixgb.c ixgbe.c natsemi.c	\
    + 		  pcnet32.c realtek.c tg3.c marvell.c vioc.c	\
    +-		  smsc911x.c at76c50x-usb.c sfc.c stmmac.c
    ++		  smsc911x.c at76c50x-usb.c sfc.c stmmac.c ixp4xx.c
    + 
    + dist-hook:
    + 	cp $(top_srcdir)/ethtool.spec $(distdir)
    +--- ethtool-2.6.38/Makefile.in	2011-03-15 18:18:58.000000000 +0100
    ++++ ethtool-2.6.38/Makefile.in	2011-03-31 23:39:01.823874703 +0200
    +@@ -57,7 +57,7 @@
    + 	ixgbe.$(OBJEXT) natsemi.$(OBJEXT) pcnet32.$(OBJEXT) \
    + 	realtek.$(OBJEXT) tg3.$(OBJEXT) marvell.$(OBJEXT) \
    + 	vioc.$(OBJEXT) smsc911x.$(OBJEXT) at76c50x-usb.$(OBJEXT) \
    +-	sfc.$(OBJEXT) stmmac.$(OBJEXT)
    ++	sfc.$(OBJEXT) stmmac.$(OBJEXT) ixp4xx.$(OBJEXT)
    + ethtool_OBJECTS = $(am_ethtool_OBJECTS)
    + ethtool_LDADD = $(LDADD)
    + DEFAULT_INCLUDES = -I.@am__isrc@
    +@@ -201,7 +201,7 @@
    + 		  amd8111e.c de2104x.c e100.c e1000.c igb.c	\
    + 		  fec_8xx.c ibm_emac.c ixgb.c ixgbe.c natsemi.c	\
    + 		  pcnet32.c realtek.c tg3.c marvell.c vioc.c	\
    +-		  smsc911x.c at76c50x-usb.c sfc.c stmmac.c
    ++		  smsc911x.c at76c50x-usb.c sfc.c stmmac.c ixp4xx.c
    + 
    + all: ethtool-config.h
    + 	$(MAKE) $(AM_MAKEFLAGS) all-am
    +@@ -321,6 +321,7 @@
    + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/igb.Po@am__quote@
    + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixgb.Po@am__quote@
    + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixgbe.Po@am__quote@
    ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixp4xx.Po@am__quote@
    + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/marvell.Po@am__quote@
    + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/natsemi.Po@am__quote@
    + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcnet32.Po@am__quote@
    diff --git a/net/ettercap/Makefile b/net/ettercap/Makefile
    new file mode 100644
    index 0000000..5c70c2d
    --- /dev/null
    +++ b/net/ettercap/Makefile
    @@ -0,0 +1,75 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ettercap
    +PKG_VERSION:=NG-0.7.3
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/ettercap
    +PKG_MD5SUM:=28fb15cd024162c55249888fe1b97820
    +
    +PKG_FIXUP:=libtool
    +PKG_INSTALL:=1
    +PKG_BUILD_PARALLEL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +include $(INCLUDE_DIR)/nls.mk
    +
    +define Package/ettercap
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libpcap +libnet1 +libopenssl +libpcre +libncurses +libltdl +libpthread +zlib
    +  TITLE:=Ettercap is a suite for man in the middle attacks on LAN.
    +  URL:=http://ettercap.sourceforge.net
    +endef
    +
    +define Package/ettercap/description
    +	It features sniffing of live connections, content filtering on the fly 
    +	and many other interesting tricks. 
    +	It supports active and passive dissection of many protocols (even 
    +	ciphered ones) and includes many feature for network and host analysis.
    +endef
    +
    +define Package/ettercap/conffiles
    +/etc/etter.conf
    +endef
    +
    +define Build/Prepare
    +	$(call Build/Prepare/Default)
    +	# remove default optimization flags set by configure
    +	$(SED) 's,DEBUG_FLAGS=.*,DEBUG_FLAGS=,g' $(PKG_BUILD_DIR)/configure
    +endef
    +
    +CONFIGURE_ARGS += \
    +	--with-libpcap="$(STAGING_DIR)/usr" \
    +	--with-libnet="$(STAGING_DIR)/usr/lib/libnet-1.1.x" \
    +	--with-openssl="$(STAGING_DIR)/usr" \
    +	--with-libpcre="$(STAGING_DIR)/usr" \
    +	--with-iconv="$(ICONV_PREFIX)" \
    +	--with-libncurses="$(STAGING_DIR)/usr" \
    +	--disable-gtk \
    +	--disable-debug \
    +	--enable-plugins
    +
    +MAKE_FLAGS += \
    +	DESTDIR="$(PKG_INSTALL_DIR)"
    +
    +define Package/ettercap/install
    +	$(INSTALL_DIR) $(1)/etc
    +	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/etter.conf $(1)/etc/
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/etter{cap,filter,log} $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/lib/ettercap
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ettercap/*.so $(1)/usr/lib/ettercap/
    +	$(INSTALL_DIR) $(1)/usr/share/ettercap
    +	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ettercap/* $(1)/usr/share/ettercap/
    +endef
    +
    +$(eval $(call BuildPackage,ettercap))
    diff --git a/net/ettercap/patches/001-cross_compiling.patch b/net/ettercap/patches/001-cross_compiling.patch
    new file mode 100644
    index 0000000..8c95397
    --- /dev/null
    +++ b/net/ettercap/patches/001-cross_compiling.patch
    @@ -0,0 +1,23 @@
    +diff -urN ettercap-NG-0.7.3/configure ettercap-NG-0.7.3.new/configure
    +--- ettercap-NG-0.7.3/configure	2005-05-27 17:11:45.000000000 +0200
    ++++ ettercap-NG-0.7.3.new/configure	2006-08-21 20:15:07.000000000 +0200
    +@@ -27354,6 +27354,7 @@
    + 
    +    echo "$as_me:$LINENO: checking for NS_GET32" >&5
    + echo $ECHO_N "checking for NS_GET32... $ECHO_C" >&6
    ++cross_compiling=no
    +    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
    +diff -urN ettercap-NG-0.7.3/configure.in ettercap-NG-0.7.3.new/configure.in
    +--- ettercap-NG-0.7.3/configure.in	2005-01-13 10:24:28.000000000 +0100
    ++++ ettercap-NG-0.7.3.new/configure.in	2006-08-21 20:13:29.000000000 +0200
    +@@ -236,7 +236,7 @@
    + AC_CHECK_HEADERS(sys/poll.h poll.h sys/select.h)
    + AC_CHECK_HEADERS(sys/cdefs.h)
    + dnl nameser NS_GET32 and so on...
    +-EC_NS_GET()
    ++#EC_NS_GET()
    + 
    + dnl ==================================================================
    + dnl   Checks for typedefs, structures, and compiler characteristics.
    diff --git a/net/ettercap/patches/002-libnet_check_honor_ldflags.patch b/net/ettercap/patches/002-libnet_check_honor_ldflags.patch
    new file mode 100644
    index 0000000..55b00a7
    --- /dev/null
    +++ b/net/ettercap/patches/002-libnet_check_honor_ldflags.patch
    @@ -0,0 +1,24 @@
    +diff -ruN ettercap-NG-0.7.3-old/configure ettercap-NG-0.7.3-new/configure
    +--- ettercap-NG-0.7.3-old/configure	2006-10-03 18:24:09.000000000 +0200
    ++++ ettercap-NG-0.7.3-new/configure	2006-10-03 18:28:57.000000000 +0200
    +@@ -31759,7 +31759,7 @@
    + 
    +    OLDLDFLAGS="${LDFLAGS}"
    +    OLDLIBS="${LIBS}"
    +-   LDFLAGS="$LNETLIB"
    ++   LDFLAGS="$LDFLAGS $LNETLIB"
    +    LIBS="$LIBS"
    + 
    + echo "$as_me:$LINENO: checking for libnet_adv_free_packet in -lnet" >&5
    +diff -ruN ettercap-NG-0.7.3-old/configure.in ettercap-NG-0.7.3-new/configure.in
    +--- ettercap-NG-0.7.3-old/configure.in	2006-10-03 18:24:09.000000000 +0200
    ++++ ettercap-NG-0.7.3-new/configure.in	2006-10-03 18:26:45.000000000 +0200
    +@@ -500,7 +500,7 @@
    + ]
    + )
    + 
    +-EC_CHECK_FUNC(net, libnet_adv_free_packet, $LNETLIB, $LIBS,, AC_MSG_ERROR([Incorrect libnet version. libnet >= 1.1.2.1 required]))
    ++EC_CHECK_FUNC(net, libnet_adv_free_packet, $LDFLAGS $LNETLIB, $LIBS,, AC_MSG_ERROR([Incorrect libnet version. libnet >= 1.1.2.1 required]))
    + 
    + dnl ------------------
    + dnl Checks for openssl
    diff --git a/net/ettercap/patches/003-automake-compat.patch b/net/ettercap/patches/003-automake-compat.patch
    new file mode 100644
    index 0000000..eea45f2
    --- /dev/null
    +++ b/net/ettercap/patches/003-automake-compat.patch
    @@ -0,0 +1,34 @@
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -197,6 +197,9 @@ dnl ========================
    + dnl   Libtool related...
    + dnl ========================
    + 
    ++LT_INIT
    ++LTDL_INIT
    ++LT_CONFIG_LTDL_DIR([libltdl])
    + AC_DISABLE_STATIC
    + AC_LIBTOOL_WIN32_DLL
    + AC_LIBTOOL_DLOPEN
    +--- a/include/ec_os_mingw.h
    ++++ b/include/ec_os_mingw.h
    +@@ -163,7 +163,7 @@ EC_API_EXTERN const char *ec_win_get_ec_
    +  */
    + #if !defined(HAVE_DLOPEN)
    +    #define RTLD_NOW 0
    +-   #define LTDL_SHLIB_EXT       "*.dll"
    ++   #define LT_MODULE_EXT       ".dll"
    + 
    +    #define dlopen(dll,flg)      ec_win_dlopen (dll, flg)
    +    #define lt_dlopen(dll)       ec_win_dlopen (dll, 0)
    +--- a/src/ec_plugins.c
    ++++ b/src/ec_plugins.c
    +@@ -131,7 +131,7 @@ int plugin_filter(struct dirent *d)
    + int plugin_filter(const struct dirent *d)
    + #endif
    + {
    +-   if ( match_pattern(d->d_name, PLUGIN_PATTERN LTDL_SHLIB_EXT) )
    ++   if ( match_pattern(d->d_name, PLUGIN_PATTERN LT_MODULE_EXT) )
    +       return 1;
    + 
    +    return 0;
    diff --git a/net/ez-ipupdate/Makefile b/net/ez-ipupdate/Makefile
    new file mode 100644
    index 0000000..d95bb2d
    --- /dev/null
    +++ b/net/ez-ipupdate/Makefile
    @@ -0,0 +1,44 @@
    +# 
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=ez-ipupdate
    +PKG_VERSION:=3.0.11b8
    +PKG_RELEASE:=5
    +
    +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
    +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/e/ez-ipupdate \
    +	http://ftp.de.debian.org/debian/pool/main/e/ez-ipupdate
    +PKG_MD5SUM:=000211add4c4845ffa4211841bff4fb0
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/ez-ipupdate
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=IP Addresses and Names
    +  TITLE:=Dynamic DNS services client
    +  URL:=http://ez-ipupdate.com/
    +endef
    +
    +# uses GNU configure
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR)
    +endef
    +
    +define Package/ez-ipupdate/install
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ez-ipupdate $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc/config/
    +	$(INSTALL_CONF) ./files/ez-ipupdate.config $(1)/etc/config/ddns
    +	$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
    +	$(INSTALL_BIN) ./files/ez-ipupdate.hotplug $(1)/etc/hotplug.d/iface/30-ez-ipupdate
    +endef
    +
    +$(eval $(call BuildPackage,ez-ipupdate))
    diff --git a/net/ez-ipupdate/files/ez-ipupdate.config b/net/ez-ipupdate/files/ez-ipupdate.config
    new file mode 100644
    index 0000000..bc9ee6f
    --- /dev/null
    +++ b/net/ez-ipupdate/files/ez-ipupdate.config
    @@ -0,0 +1,14 @@
    +
    +config ddns
    +       option enabled 0
    +       option interface wan
    +       option program ez-ipupdate
    +       option service zoneedit
    +       option username myname
    +       option password mypassword
    +       option hostname mydomain.com       
    +
    +# config ddns
    +#       option interface wan
    +#       option program ez-ipupdate
    +#       option config /etc/ez-ipupdate.conf
    diff --git a/net/ez-ipupdate/files/ez-ipupdate.hotplug b/net/ez-ipupdate/files/ez-ipupdate.hotplug
    new file mode 100644
    index 0000000..f07542f
    --- /dev/null
    +++ b/net/ez-ipupdate/files/ez-ipupdate.hotplug
    @@ -0,0 +1,83 @@
    +NAME=ez-ipupdate
    +COMMAND=/usr/sbin/$NAME
    +
    +case "$ACTION" in
    +    ifup|ifdown)
    +    	cleanup() {
    +	    [ -e $1 ] && {
    +		kill -9 $(cat $1)
    +		rm $1
    +	    }
    +	}
    +
    +	ddns() {
    +	    local cfg="$1"
    +	    config_get program $cfg program
    +	    [ "$program" = "$NAME" ] && {
    +		config_get interface $cfg interface
    +		[ "$interface" = "$INTERFACE" ] && {
    +		    config_get dev "$INTERFACE" ifname
    +
    +		    config_get enabled $cfg enabled
    +		    enabled=${enabled:-1}
    +
    +		    config_get service  $cfg service
    +
    +		    config_get pidfile $cfg pidfile
    +		    pidfile=${pidfile:-/var/run/$NAME-$service-$dev.pid}
    +
    +		    case "$ACTION" in
    +			ifdown)
    +			    cleanup $pidfile
    +			    ;;
    +			*)
    +			    case "$enabled" in
    +				1|yes|true)
    +				    [ ! -e $pidfile ] && {
    +					config_get cache $cfg cache
    +					[ -z "$cache" ] && cache=/tmp/$NAME-$service-$dev.cache
    +
    +					config_get config $cfg config
    +					[ -z "$config" ] && {
    +					    config=/var/run/$NAME-$service-$dev.conf
    +					    config_get username $cfg username
    +					    config_get password $cfg password
    +					    config_get hostname $cfg hostname
    +					    service=${service:-"dyndns"}
    +					    config_get server	$cfg server
    +					    server_line=""
    +					    [ -n "$server" ] && {
    +						server_line="server=$server"
    +					    }
    +					    cat > $config <&1 | logger -t $NAME &
    +				    }
    +				    ;;
    +				*)
    +				    cleanup $pidfile
    +				    ;;
    +			    esac
    +		    esac
    +		}
    +	    }
    +	}
    +
    +
    +	include /lib/network
    +	scan_interfaces
    +	config_load ddns
    +
    +	config_foreach ddns ddns
    +	;;
    +esac
    diff --git a/net/ez-ipupdate/files/ez-ipupdate.init b/net/ez-ipupdate/files/ez-ipupdate.init
    new file mode 100644
    index 0000000..0cea301
    --- /dev/null
    +++ b/net/ez-ipupdate/files/ez-ipupdate.init
    @@ -0,0 +1,18 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +BIN=ez-ipupdate
    +CONF=/etc/$BIN.conf
    +RUN_D=/var/run
    +PID_F=$RUN_D/$BIN.pid
    +
    +start() {
    +	[ -f $CONF ] || exit
    +	mkdir -p $RUN_D
    +	$BIN -c $CONF
    +}
    +
    +stop() {
    +	[ -f $PID_F ] && kill $(cat $PID_F)
    +}
    diff --git a/net/ez-ipupdate/patches/001-debian_subset.patch b/net/ez-ipupdate/patches/001-debian_subset.patch
    new file mode 100644
    index 0000000..c24b3ea
    --- /dev/null
    +++ b/net/ez-ipupdate/patches/001-debian_subset.patch
    @@ -0,0 +1,568 @@
    +--- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c
    ++++ ez-ipupdate-3.0.11b8/ez-ipupdate.c
    +@@ -139,6 +139,9 @@
    + #if HAVE_SIGNAL_H
    + #  include 
    + #endif
    ++#if HAVE_TIME_H
    ++#  include 
    ++#endif
    + #if HAVE_SYS_TIME_H
    + #  include 
    + #endif
    +@@ -165,7 +168,7 @@
    + #endif
    + 
    + 
    +-#if __linux__ || __SVR4 || __OpenBSD__ || __FreeBSD__ || __NetBSD__
    ++#if __GLIBC__ || __SVR4 || __OpenBSD__ || __FreeBSD__ || __NetBSD__
    + #  define IF_LOOKUP 1
    + #  include 
    + #  include 
    +@@ -640,7 +643,7 @@
    +   fprintf(stdout, "  -q, --quiet \t\t\tbe quiet\n");
    +   fprintf(stdout, "  -r, --retrys \t\tnumber of trys (default: 1)\n");
    +   fprintf(stdout, "  -R, --run-as-user \tchange to  for running, be ware\n\t\t\t\tthat this can cause problems with handeling\n\t\t\t\tSIGHUP properly if that user can't read the\n\t\t\t\tconfig file. also it can't write it's pid file \n\t\t\t\tto a root directory\n");
    +-  fprintf(stdout, "  -Q, --run-as-euser \tchange to effective  for running, \n\t\t\t\tthis is NOT secure but it does solve the \n\t\t\t\tproblems with run-as-user and config files and \n\t\t\t\tpid files.\n");
    ++  fprintf(stdout, "  -Q, --run-as-euser \tchange to effective  for running, \n\t\t\t\tthis is NOT secure but it does solve the \n\t\t\t\tproblems with run-as-user and config files and \n\t\t\t\tpid files\n");
    +   fprintf(stdout, "  -s, --server \tthe server to connect to\n");
    +   fprintf(stdout, "  -S, --service-type \tthe type of service that you are using\n");
    +   width = fprintf(stdout, "\t\t\t\ttry one of: ") + 4*7;
    +@@ -682,7 +685,7 @@
    + 
    + void print_signalhelp( void )
    + {
    +-  fprintf(stdout, "\nsignals are only really used when in daemon mode.\n\n");
    ++  fprintf(stdout, "\nsignals are only really used when in daemon mode\n\n");
    +   fprintf(stdout, "signals: \n");
    +   fprintf(stdout, "  HUP\t\tcauses it to re-read its config file\n");
    +   fprintf(stdout, "  TERM\t\twake up and possibly perform an update\n");
    +@@ -693,7 +696,7 @@
    + #if HAVE_SIGNAL_H
    + RETSIGTYPE sigint_handler(int sig)
    + {
    +-  char message[] = "interupted.\n";
    ++  char message[] = "interrupted\n";
    +   close(client_sockfd);
    +   write(2, message, sizeof(message)-1);
    + 
    +@@ -704,6 +707,10 @@
    +   }
    + #endif
    + 
    ++#if HAVE_SYSLOG_H
    ++  closelog();
    ++#endif
    ++
    +   exit(1);
    + }
    + RETSIGTYPE generic_sig_handler(int sig)
    +@@ -798,7 +805,7 @@
    +     sprintf(buf, "message incomplete because your OS sucks: %s\n", fmt);
    + #endif
    + 
    +-    syslog(LOG_NOTICE, buf);
    ++    syslog(LOG_NOTICE, "%s", buf);
    +   }
    +   else
    +   {
    +@@ -1439,7 +1446,7 @@
    +   if(!(options & OPT_QUIET))
    +   {
    +     fprintf(stderr,
    +-        "connected to %s (%s) on port %d.\n",
    ++        "connected to %s (%s) on port %d\n",
    +         host,
    +         inet_ntoa(address.sin_addr),
    +         ntohs(address.sin_port));
    +@@ -1683,7 +1690,7 @@
    +       close(client_sockfd);
    +       return(-1);
    +     }
    +-    if(strstr(buf, "\r\n") > 0)
    ++    if(strstr(buf, "\n") != NULL)
    +     {
    +       break;
    +     }
    +@@ -1702,8 +1709,8 @@
    + 
    +   if(options & OPT_DAEMON)
    +   {
    +-    fprintf(stderr, "no compile time default service was set therefor you must "
    +-        "specify a service type.\n");
    ++    fprintf(stderr, "no compile time default service was set, you must "
    ++        "specify a service type\n");
    + 
    +     return(-1);
    +   }
    +@@ -2039,7 +2046,7 @@
    +         }
    +         else if(strstr(buf, "\nnumhost") != NULL)
    +         {
    +-          show_message("Too many or too few hosts found\n");
    ++          show_message("too many or too few hosts found\n");
    +           retval = UPDATERES_SHUTDOWN;
    +         }
    +         else if(strstr(buf, "\ndnserr") != NULL)
    +@@ -2051,17 +2058,17 @@
    +         }
    +         else if(strstr(buf, "\n911") != NULL)
    +         {
    +-          show_message("Ahhhh! call 911!\n");
    ++          show_message("ahhhh! call 911!\n");
    +           retval = UPDATERES_SHUTDOWN;
    +         }
    +         else if(strstr(buf, "\n999") != NULL)
    +         {
    +-          show_message("Ahhhh! call 999!\n");
    ++          show_message("ahhhh! call 999!\n");
    +           retval = UPDATERES_SHUTDOWN;
    +         }
    +         else if(strstr(buf, "\n!donator") != NULL)
    +         {
    +-          show_message("a feature requested is only available to donators, please donate.\n", host);
    ++          show_message("a feature requested is only available to donators, please donate\n", host);
    +           retval = UPDATERES_OK;
    +         }
    +         // this one should be last as it is a stupid string to signify waits
    +@@ -2095,9 +2102,9 @@
    +             sprintf(reason, "problem parsing reason for wait response");
    +           }
    + 
    +-          show_message("Wait response received, waiting for %s before next update.\n",
    ++          show_message("wait response received, waiting for %s before next update\n",
    +               format_time(howlong));
    +-          show_message("Wait response reason: %d\n", N_STR(reason));
    ++          show_message("wait response reason: %d\n", N_STR(reason));
    +           sleep(howlong);
    +           retval = UPDATERES_ERROR;
    +         }
    +@@ -3370,7 +3377,7 @@
    +   {
    +     if(!(options & OPT_QUIET))
    +     {
    +-      fprintf(stderr, "warning: for GNUDIP the \"address\" parpameter is only used if set to \"0.0.0.0\" thus making an offline request.\n");
    ++      fprintf(stderr, "warning: for GNUDIP the \"address\" parameter is only used if set to \"0.0.0.0\" thus making an offline request\n");
    +     }
    +   }
    + 
    +@@ -3392,7 +3399,7 @@
    + 
    +   // send an offline request if address 0.0.0.0 is used
    +   // otherwise, we ignore the address and send an update request
    +-  gnudip_request[0] = strcmp(address, "0.0.0.0") == 0 ? '1' : '0';
    ++  gnudip_request[0] = address && strcmp(address, "0.0.0.0") == 0 ? '1' : '0';
    +   gnudip_request[1] = '\0';
    + 
    +   // find domainname
    +@@ -3943,22 +3950,22 @@
    +           break;
    + 
    +         case 201:
    +-          show_message("Last update was less than %d seconds ago.\n", 300);
    ++          show_message("last update was less than %d seconds ago\n", 300);
    +           return(UPDATERES_ERROR);
    +           break;
    + 
    +         case 202:
    +-          show_message("Server error.\n");
    ++          show_message("server error\n");
    +           return(UPDATERES_ERROR);
    +           break;
    + 
    +         case 203:
    +-          show_message("Failure because account is frozen (by admin).\n");
    ++          show_message("failure because account is frozen (by admin)\n");
    +           return(UPDATERES_SHUTDOWN);
    +           break;
    + 
    +         case 204:
    +-          show_message("Failure because account is locked (by user).\n");
    ++          show_message("failure because account is locked (by user)\n");
    +           return(UPDATERES_SHUTDOWN);
    +           break;
    + 
    +@@ -4215,8 +4222,6 @@
    + 
    +   switch(ret)
    +   {
    +-    char *p;
    +-
    +     case -1:
    +       if(!(options & OPT_QUIET))
    +       {
    +@@ -4349,7 +4354,7 @@
    +     case SIGHUP:
    +       if(config_file)
    +       {
    +-        show_message("SIGHUP recieved, re-reading config file\n");
    ++        show_message("SIGHUP received, re-reading config file\n");
    +         if(parse_conf_file(config_file, conf_commands) != 0)
    +         {
    +           show_message("error parsing config file \"%s\"\n", config_file);
    +@@ -4384,6 +4389,7 @@
    + 
    + int main(int argc, char **argv)
    + {
    ++  char *tmp;
    +   int ifresolve_warned = 0;
    +   int i;
    +   int retval = 1;
    +@@ -4395,9 +4401,10 @@
    +   mcheck(NULL);
    + #endif
    + 
    +-  dprintf((stderr, "staring...\n"));
    ++  dprintf((stderr, "starting...\n"));
    + 
    +-  program_name = argv[0];
    ++  tmp = strrchr(argv[0], '/');
    ++  program_name = tmp ? tmp + 1 : argv[0];
    +   options = 0;
    +   *user = '\0';
    +   timeout.tv_sec = DEFAULT_TIMEOUT;
    +@@ -4417,7 +4424,7 @@
    + 
    +   if(!(options & OPT_QUIET) && !(options & OPT_DAEMON))
    +   {
    +-    fprintf(stderr, "ez-ipupdate Version %s\nCopyright (C) 1998-2001 Angus Mackay.\n", VERSION);
    ++    fprintf(stderr, "%s Version %s\nCopyright (C) 1998-2001 Angus Mackay\n", program_name, VERSION);
    +   }
    + 
    +   dprintf((stderr, "options: 0x%04X\n", options));
    +@@ -4434,7 +4441,7 @@
    +   {
    +     if(service->check_info() != 0)
    +     {
    +-      fprintf(stderr, "invalid data to perform requested action.\n");
    ++      fprintf(stderr, "invalid data to perform requested action\n");
    +       exit(1);
    +     }
    +   }
    +@@ -4456,13 +4463,13 @@
    +     dprintf((stderr, "user_name: %s\n", user_name));
    +     dprintf((stderr, "password: %s\n", password));
    +   }
    +-  if(*user_name == '\0')
    ++  if(*user_name == '\0' && !(options & OPT_DAEMON))
    +   {
    +     printf("user name: ");
    +     fgets(user_name, sizeof(user_name), stdin);
    +     chomp(user_name);
    +   }
    +-  if(*password == '\0')
    ++  if(*password == '\0' && !(options & OPT_DAEMON))
    +   {
    +     strncpy(password, getpass("password: "), sizeof(password));
    +   }
    +@@ -4480,7 +4487,7 @@
    + 
    +   if(service->check_info() != 0)
    +   {
    +-    fprintf(stderr, "invalid data to perform requested action.\n");
    ++    fprintf(stderr, "invalid data to perform requested action\n");
    +     exit(1);
    +   }
    + 
    +@@ -4503,7 +4510,7 @@
    + 
    +     if(interface == NULL) 
    +     { 
    +-      fprintf(stderr, "invalid data to perform requested action.\n");
    ++      fprintf(stderr, "invalid data to perform requested action\n");
    +       fprintf(stderr, "you must provide an interface for daemon mode");
    +       exit(1);
    +     }
    +@@ -4519,23 +4526,25 @@
    +       if(fork() > 0) { exit(0); } /* parent */
    +     }
    + 
    ++#  if HAVE_SYSLOG_H
    ++    openlog(program_name, LOG_PID, LOG_DAEMON );
    ++    //options |= OPT_QUIET;
    ++#  endif
    ++    show_message("version %s, interface %s, host %s, server %s, service %s\n",
    ++        VERSION, N_STR(interface), N_STR(host), server, service->title);
    ++
    + #if HAVE_GETPID
    +     if(pid_file && pid_file_create(pid_file) != 0)
    +     {
    +-      fprintf(stderr, "exiting...\n");
    ++      show_message("could not create pid file %s (%s), exiting\n",
    ++                   pid_file, strerror(errno));
    ++#if HAVE_SYSLOG_H
    ++      closelog();
    ++#endif
    +       exit(1);
    +     }
    + #endif
    + 
    +-#  if HAVE_SYSLOG_H
    +-    openlog(program_name, LOG_PID, LOG_USER );
    +-    options |= OPT_QUIET;
    +-#  endif
    +-    show_message("ez-ipupdate Version %s, Copyright (C) 1998-2001 Angus Mackay.\n", 
    +-        VERSION);
    +-    show_message("%s started for interface %s host %s using server %s and service %s\n",
    +-        program_name, N_STR(interface), N_STR(host), server, service->title);
    +-
    +     memset(&sin, 0, sizeof(sin));
    + 
    +     if(cache_file)
    +@@ -4560,7 +4569,7 @@
    +           strftime(timebuf, sizeof(timebuf), "%Y/%m/%d %H:%M", ts);
    +           show_message("got last update %s on %s from cache file\n", ipstr, timebuf);
    +         }
    +-        else
    ++        else if(ipstr||ipdate)
    +         {
    +           show_message("malformed cache file: %s\n", cache_file);
    +         }
    +@@ -4647,7 +4656,7 @@
    +           }
    +           else
    +           {
    +-            show_message("failure to update %s->%s (%s)\n",
    ++            show_message("failed to update %s->%s (%s)\n",
    +                 interface, inet_ntoa(sin.sin_addr), N_STR(host));
    +             memset(&sin, 0, sizeof(sin));
    + 
    +@@ -4671,7 +4680,7 @@
    +             dprintf((stderr, "updateres: %d\n", updateres));
    +             if(updateres == UPDATERES_SHUTDOWN)
    +             {
    +-              show_message("shuting down updater for %s due to fatal error\n", 
    ++              show_message("shutting down updater for %s due to fatal error\n",
    +                   N_STR(host));
    + 
    +               if(notify_email && *notify_email != '\0')
    +@@ -4711,7 +4720,7 @@
    + #endif
    + 
    + #else
    +-    fprintf(stderr, "sorry, this mode is only available on platforms that the ");
    ++    fprintf(stderr, "sorry, this mode is only available on platforms where the ");
    +     fprintf(stderr, "IP address \ncan be determined. feel free to hack the code");
    +     fprintf(stderr, " though.\n");
    +     exit(1);
    +@@ -4799,7 +4808,7 @@
    +         }
    +         else
    +         {
    +-          show_message("could not resolve ip address for %s.\n", interface);
    ++          show_message("could not resolve ip address for %s\n", interface);
    +           exit(1);
    +         }
    +         close(sock);
    +--- ez-ipupdate-3.0.11b8.orig/example.conf
    ++++ ez-ipupdate-3.0.11b8/example.conf
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/ez-ipupdate -c
    ++#!/usr/sbin/ez-ipupdate -c
    + #
    + # example config file for ez-ipupdate
    + #
    +--- ez-ipupdate-3.0.11b8.orig/example-pgpow.conf
    ++++ ez-ipupdate-3.0.11b8/example-pgpow.conf
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/ez-ipupdate -c
    ++#!/usr/sbin/ez-ipupdate -c
    + #
    + # example config file for ez-ipupdate
    + #
    +@@ -10,8 +10,8 @@
    + host=mydomain.penguinpowered.com
    + interface=eth1
    + 
    +-# if you use run-as ensure the user has permission to write this file
    +-cache-file=/tmp/ez-ipupdate.cache
    ++run-as-user=ez-ipupd
    ++cache-file=/var/cache/ez-ipupdate/default-cache
    + 
    + # uncomment this once you have everything working how you want and you are
    + # ready to have ez-ipupdate running in the background all the time. to stop it
    +--- ez-ipupdate-3.0.11b8.orig/example-dhs.conf
    ++++ ez-ipupdate-3.0.11b8/example-dhs.conf
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/ez-ipupdate -c
    ++#!/usr/sbin/ez-ipupdate -c
    + #
    + # example config file for ez-ipupdate
    + #
    +@@ -10,8 +10,8 @@
    + host=mydomain.whatever.com
    + interface=eth1
    + 
    +-# if you use run-as ensure the user has permission to write this file
    +-cache-file=/tmp/ez-ipupdate.cache
    ++run-as-user=ez-ipupd
    ++cache-file=/var/cache/ez-ipupdate/default-cache
    + 
    + # uncomment this once you have everything working how you want and you are
    + # ready to have ez-ipupdate running in the background all the time. to stop it
    +--- ez-ipupdate-3.0.11b8.orig/example-dyndns.conf
    ++++ ez-ipupdate-3.0.11b8/example-dyndns.conf
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/ez-ipupdate -c
    ++#!/usr/sbin/ez-ipupdate -c
    + #
    + # example config file for ez-ipupdate
    + #
    +@@ -12,14 +12,9 @@
    + interface=eth1
    + max-interval=2073600
    + 
    +-# please create this file and ensure that the user that ez-ipupdate is running
    +-# as has write permissions to it then uncomment this line, if you don't your
    +-# dyndns account will probably get banned. if you run ez-ipupdate as root (bad
    +-# idea, use "run-as-user") then you can just uncomment this line.
    +-#cache-file=/etc/ez-ipupdate.cache.eth1
    +-
    +-# for the mean time we'll just use a cache file in the temp directory
    +-cache-file=/tmp/ez-ipupdate.cache
    ++# if you don't use a cache file your dyndns account will probably get banned.
    ++run-as-user=ez-ipupd
    ++cache-file=/var/cache/ez-ipupdate/default-cache
    + 
    + # uncomment this once you have everything working how you want and you are
    + # ready to have ez-ipupdate running in the background all the time. to stop it
    +--- ez-ipupdate-3.0.11b8.orig/example-ods.conf
    ++++ ez-ipupdate-3.0.11b8/example-ods.conf
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/ez-ipupdate -c
    ++#!/usr/sbin/ez-ipupdate -c
    + #
    + # example config file for ez-ipupdate
    + #
    +@@ -10,8 +10,8 @@
    + host=mydomain.ods.org
    + interface=eth1
    + 
    +-# if you use run-as ensure the user has permission to write this file
    +-cache-file=/tmp/ez-ipupdate.cache
    ++run-as-user=ez-ipupd
    ++cache-file=/var/cache/ez-ipupdate/default-cache
    + 
    + # uncomment this once you have everything working how you want and you are
    + # ready to have ez-ipupdate running in the background all the time. to stop it
    +--- ez-ipupdate-3.0.11b8.orig/example-tzo.conf
    ++++ ez-ipupdate-3.0.11b8/example-tzo.conf
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/ez-ipupdate -c
    ++#!/usr/sbin/ez-ipupdate -c
    + #
    + # example config file for ez-ipupdate
    + #
    +@@ -14,8 +14,8 @@
    + max-interval=2073600
    + interface=eth1
    + 
    +-# if you use run-as ensure the user has permission to write this file
    +-cache-file=/tmp/ez-ipupdate.cache
    ++run-as-user=ez-ipupd
    ++cache-file=/var/cache/ez-ipupdate/default-cache
    + 
    + # uncomment this once you have everything working how you want and you are
    + # ready to have ez-ipupdate running in the background all the time. to stop it
    +--- ez-ipupdate-3.0.11b8.orig/example-gnudip.conf
    ++++ ez-ipupdate-3.0.11b8/example-gnudip.conf
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/ez-ipupdate -c
    ++#!/usr/sbin/ez-ipupdate -c
    + #
    + # example config file for ez-ipupdate
    + #
    +@@ -14,8 +14,8 @@
    + # any other value is ignored
    + #address=0.0.0.0
    + 
    +-# if you use run-as ensure the user has permission to write this file
    +-cache-file=/tmp/ez-ipupdate.cache
    ++run-as-user=ez-ipupd
    ++cache-file=/var/cache/ez-ipupdate/default-cache
    + 
    + # uncomment this once you have everything working how you want and you are
    + # ready to have ez-ipupdate running in the background all the time. to stop it
    +--- ez-ipupdate-3.0.11b8.orig/example-easydns.conf
    ++++ ez-ipupdate-3.0.11b8/example-easydns.conf
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/ez-ipupdate -c
    ++#!/usr/sbin/ez-ipupdate -c
    + #
    + # example config file for ez-ipupdate
    + #
    +@@ -10,8 +10,8 @@
    + host=mydomain.whatever.com
    + interface=eth1
    + 
    +-# if you use run-as ensure the user has permission to write this file
    +-cache-file=/tmp/ez-ipupdate.cache
    ++run-as-user=ez-ipupd
    ++cache-file=/var/cache/ez-ipupdate/default-cache
    + 
    + # uncomment this once you have everything working how you want and you are
    + # ready to have ez-ipupdate running in the background all the time. to stop it
    +--- ez-ipupdate-3.0.11b8.orig/example-justlinux.conf
    ++++ ez-ipupdate-3.0.11b8/example-justlinux.conf
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/ez-ipupdate -c
    ++#!/usr/sbin/ez-ipupdate -c
    + #
    + # example config file for ez-ipupdate
    + #
    +@@ -10,8 +10,8 @@
    + host=mydomain.penguinpowered.com
    + interface=eth1
    + 
    +-# if you use run-as ensure the user has permission to write this file
    +-cache-file=/tmp/ez-ipupdate.cache
    ++run-as-user=ez-ipupd
    ++cache-file=/var/cache/ez-ipupdate/default-cache
    + 
    + # uncomment this once you have everything working how you want and you are
    + # ready to have ez-ipupdate running in the background all the time. to stop it
    +--- ez-ipupdate-3.0.11b8.orig/example-dyns.conf
    ++++ ez-ipupdate-3.0.11b8/example-dyns.conf
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/ez-ipupdate -c
    ++#!/usr/sbin/ez-ipupdate -c
    + #
    + # example config file for ez-ipupdate
    + #
    +@@ -10,8 +10,8 @@
    + host=myhost
    + #interface=eth1
    + 
    +-# if you use run-as ensure the user has permission to write this file
    +-#cache-file=/tmp/ez-ipupdate.cache
    ++run-as-user=ez-ipupd
    ++cache-file=/var/cache/ez-ipupdate/default-cache
    + 
    + # uncomment this once you have everything working how you want and you are
    + # ready to have ez-ipupdate running in the background all the time. to stop it
    +--- ez-ipupdate-3.0.11b8.orig/example-heipv6tb.conf
    ++++ ez-ipupdate-3.0.11b8/example-heipv6tb.conf
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/ez-ipupdate -c
    ++#!/usr/sbin/ez-ipupdate -c
    + #
    + # example config file for ez-ipupdate
    + #
    +@@ -11,14 +11,9 @@
    + interface=eth1
    + max-interval=2073600
    + 
    +-# please create this file and ensure that the user that ez-ipupdate is running
    +-# as has write permissions to it then uncomment this line, if you don't your
    +-# dyndns account will probably get banned. if you run ez-ipupdate as root (bad
    +-# idea, use "run-as-user") then you can just uncomment this line.
    +-#cache-file=/etc/ez-ipupdate.cache.eth1
    +-
    +-# for the mean time we'll just use a cache file in the temp directory
    +-cache-file=/tmp/ez-ipupdate.cache
    ++# if you don't use a cache file your account will probably get banned.
    ++run-as-user=ez-ipupd
    ++cache-file=/var/cache/ez-ipupdate/default-cache
    + 
    + # uncomment this once you have everything working how you want and you are
    + # ready to have ez-ipupdate running in the background all the time. to stop it
    diff --git a/net/ez-ipupdate/patches/002-ez_ipupdate_everydns.patch b/net/ez-ipupdate/patches/002-ez_ipupdate_everydns.patch
    new file mode 100644
    index 0000000..74bce56
    --- /dev/null
    +++ b/net/ez-ipupdate/patches/002-ez_ipupdate_everydns.patch
    @@ -0,0 +1,209 @@
    +diff -ur ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c ez-ipupdate-3.0.11b8/ez-ipupdate.c
    +--- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c	2009-03-29 22:37:09.000000000 +0200
    ++++ ez-ipupdate-3.0.11b8/ez-ipupdate.c	2009-03-29 22:37:20.000000000 +0200
    +@@ -103,6 +103,11 @@
    + #define HEIPV6TB_DEFAULT_PORT "80"
    + #define HEIPV6TB_REQUEST "/index.cgi"
    + 
    ++#define EVERYDNS_DEFAULT_SERVER "dyn.everydns.net"
    ++#define EVERYDNS_DEFAULT_PORT "80"
    ++#define EVERYDNS_REQUEST "/index.php"
    ++#define EVERYDNS_VERSION "0.1"
    ++
    + #define DEFAULT_TIMEOUT 120
    + #define DEFAULT_UPDATE_PERIOD 120
    + #define DEFAULT_RESOLV_PERIOD 30
    +@@ -344,6 +349,10 @@
    + int HEIPV6TB_check_info(void);
    + static char *HEIPV6TB_fields_used[] = { "server", "user", NULL };
    + 
    ++int EVERYDNS_update_entry(void);
    ++int EVERYDNS_check_info(void);
    ++static char *EVERYDNS_fields_used[] = { "server", "user", "host", "address", NULL };
    ++
    + struct service_t services[] = {
    +   { "NULL",
    +     { "null", "NULL", 0, },
    +@@ -517,6 +526,16 @@
    +     HEIPV6TB_DEFAULT_PORT,
    +     HEIPV6TB_REQUEST
    +   },
    ++  { "everydns",
    ++    { "everydns", 0, 0, },
    ++    NULL,
    ++    EVERYDNS_update_entry,
    ++    EVERYDNS_check_info,
    ++    EVERYDNS_fields_used,
    ++    EVERYDNS_DEFAULT_SERVER,
    ++    EVERYDNS_DEFAULT_PORT,
    ++    EVERYDNS_REQUEST
    ++  },
    + };
    + 
    + static struct service_t *service = NULL;
    +@@ -4251,6 +4270,165 @@
    +   return(UPDATERES_OK);
    + }
    + 
    ++int EVERYDNS_check_info(void)
    ++{
    ++  warn_fields(service->fields_used);
    ++
    ++  return 0;
    ++}
    ++
    ++int EVERYDNS_update_entry(void)
    ++{
    ++  char buf[BUFFER_SIZE+1];
    ++  char *bp = buf;
    ++  int bytes;
    ++  int btot;
    ++  int ret;
    ++
    ++  buf[BUFFER_SIZE] = '\0';
    ++
    ++  if(do_connect((int*)&client_sockfd, server, port) != 0)
    ++  {
    ++    if(!(options & OPT_QUIET))
    ++    {
    ++      show_message("error connecting to %s:%s\n", server, port);
    ++    }
    ++    return(UPDATERES_ERROR);
    ++  }
    ++
    ++  snprintf(buf, BUFFER_SIZE, "GET %s?ver=%s&", request, EVERYDNS_VERSION);
    ++  output(buf);
    ++  if(address)
    ++  {
    ++    snprintf(buf, BUFFER_SIZE, "%s=%s&", "ip", address);
    ++    output(buf);
    ++  }
    ++  if((host != NULL) && (*host == '\0'))
    ++  {
    ++    snprintf(buf, BUFFER_SIZE, "%s=%s&", "domain", host);
    ++    output(buf);
    ++  }
    ++  snprintf(buf, BUFFER_SIZE, " HTTP/1.0\015\012");
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, "Authorization: Basic %s\015\012", auth);
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, "User-Agent: %s-%s %s [%s] (%s)\015\012", 
    ++      "ez-update", VERSION, OS, (options & OPT_DAEMON) ? "daemon" : "", "by Angus Mackay");
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, "Host: %s\015\012", server);
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, "\015\012");
    ++  output(buf);
    ++
    ++  bp = buf;
    ++  bytes = 0;
    ++  btot = 0;
    ++  while((bytes=read_input(bp, BUFFER_SIZE-btot)) > 0)
    ++  {
    ++    bp += bytes;
    ++    btot += bytes;
    ++    dprintf((stderr, "btot: %d\n", btot));
    ++  }
    ++  close(client_sockfd);
    ++  buf[btot] = '\0';
    ++
    ++  dprintf((stderr, "server output: %s\n", buf));
    ++
    ++  if(sscanf(buf, " HTTP/1.%*c %3d", &ret) != 1)
    ++  {
    ++    ret = -1;
    ++  }
    ++
    ++  switch(ret)
    ++  {
    ++    char *p;
    ++
    ++    case -1:
    ++      if(!(options & OPT_QUIET))
    ++      {
    ++        show_message("strange server response, are you connecting to the right server?\n");
    ++      }
    ++      return(UPDATERES_ERROR);
    ++      break;
    ++
    ++    case 200:
    ++      ret = -1;
    ++      if((p=strstr(buf, "Exit code: ")) != NULL)
    ++      {
    ++         sscanf(p, "Exit code: %d", &ret);
    ++      }
    ++
    ++      /*
    ++       * 0 - Successfully Updated
    ++       */
    ++      switch(ret)
    ++      {
    ++        case -1:
    ++          if(!(options & OPT_QUIET))
    ++          {
    ++            show_message("strange server response, are you connecting to the right server?\n");
    ++          }
    ++          return(UPDATERES_ERROR);
    ++          break;
    ++
    ++        case 0:
    ++          if(!(options & OPT_QUIET))
    ++          {
    ++            printf("request successful\n");
    ++          }
    ++          break;
    ++
    ++        case 2:
    ++          if(!(options & OPT_QUIET))
    ++          {
    ++            show_message("Bad Username/password\n");
    ++          }
    ++          return(UPDATERES_SHUTDOWN);
    ++          break;
    ++          
    ++        case 5:
    ++          if(!(options & OPT_QUIET))
    ++          {
    ++            show_message("Last update too recent, please wait...\n");
    ++          }
    ++          return(UPDATERES_ERROR);
    ++          break;
    ++          
    ++        default:
    ++          if(!(options & OPT_QUIET))
    ++          {
    ++            show_message("unknown return code: %d\n", ret);
    ++            fprintf(stderr, "server response: %s\n", buf);
    ++          }
    ++          return(UPDATERES_ERROR);
    ++          break;
    ++      }
    ++      break;
    ++
    ++    case 401:
    ++      if(!(options & OPT_QUIET))
    ++      {
    ++        show_message("authentication failure\n");
    ++      }
    ++      return(UPDATERES_SHUTDOWN);
    ++      break;
    ++
    ++    default:
    ++      if(!(options & OPT_QUIET))
    ++      {
    ++        // reuse the auth buffer
    ++        *auth = '\0';
    ++        sscanf(buf, " HTTP/1.%*c %*3d %255[^\r\n]", auth);
    ++        show_message("unknown return code: %d\n", ret);
    ++        fprintf(stderr, "server response: %s\n", auth);
    ++      }
    ++      return(UPDATERES_ERROR);
    ++      break;
    ++  }
    ++
    ++  return(UPDATERES_OK);
    ++}
    ++
    + static int is_in_list(char *needle, char **haystack)
    + {
    +   char **p;
    diff --git a/net/ez-ipupdate/patches/003-dnsexit.patch b/net/ez-ipupdate/patches/003-dnsexit.patch
    new file mode 100644
    index 0000000..edfd61d
    --- /dev/null
    +++ b/net/ez-ipupdate/patches/003-dnsexit.patch
    @@ -0,0 +1,263 @@
    +diff -Nur ez-ipupdate-3.0.11b8.orig/example-dnsexit.conf ez-ipupdate-3.0.11b8/example-dnsexit.conf
    +--- ez-ipupdate-3.0.11b8.orig/example-dnsexit.conf	1970-01-01 01:00:00.000000000 +0100
    ++++ ez-ipupdate-3.0.11b8/example-dnsexit.conf	2009-03-29 22:40:07.000000000 +0200
    +@@ -0,0 +1,20 @@
    ++#!/usr/sbin/ez-ipupdate -c
    ++#
    ++# example config file for ez-ipupdate
    ++#
    ++# this file is actually executable!
    ++#
    ++
    ++service-type=dnsexit
    ++user=loginname:password
    ++host=www.yourdomain.com
    ++interface=eth0
    ++
    ++# please ensure the user has permission to write this file
    ++cache-file=/tmp/ez-ipupdate.cache
    ++
    ++run-as-user=ez-ipupd
    ++# uncomment this once you have everything working how you want and you are
    ++# ready to have ez-ipupdate running in the background all the time. to stop it
    ++# you can use "killall -QUIT ez-ipupdate" under linux.
    ++#daemon
    +diff -Nur ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c ez-ipupdate-3.0.11b8/ez-ipupdate.c
    +--- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c	2009-03-29 22:39:46.000000000 +0200
    ++++ ez-ipupdate-3.0.11b8/ez-ipupdate.c	2009-03-29 22:40:07.000000000 +0200
    +@@ -108,6 +108,10 @@
    + #define EVERYDNS_REQUEST "/index.php"
    + #define EVERYDNS_VERSION "0.1"
    + 
    ++#define DNSEXIT_DEFAULT_SERVER "www.dnsexit.com"
    ++#define DNSEXIT_DEFAULT_PORT "80"
    ++#define DNSEXIT_REQUEST "/RemoteUpdate.sv"
    ++
    + #define DEFAULT_TIMEOUT 120
    + #define DEFAULT_UPDATE_PERIOD 120
    + #define DEFAULT_RESOLV_PERIOD 30
    +@@ -353,6 +357,11 @@
    + int EVERYDNS_check_info(void);
    + static char *EVERYDNS_fields_used[] = { "server", "user", "host", "address", NULL };
    + 
    ++int DNSEXIT_update_entry(void);
    ++int DNSEXIT_check_info(void);
    ++static char *DNSEXIT_fields_used[] = { "server", "user", "address", "wildcard", "mx", "host", NULL };
    ++
    ++
    + struct service_t services[] = {
    +   { "NULL",
    +     { "null", "NULL", 0, },
    +@@ -536,6 +545,16 @@
    +     EVERYDNS_DEFAULT_PORT,
    +     EVERYDNS_REQUEST
    +   },
    ++  { "dnsexit",
    ++	{ "dnsexit", 0, 0, },
    ++	NULL,
    ++	DNSEXIT_update_entry,
    ++	DNSEXIT_check_info,
    ++	DNSEXIT_fields_used,
    ++	DNSEXIT_DEFAULT_SERVER,
    ++	DNSEXIT_DEFAULT_PORT,
    ++	DNSEXIT_REQUEST
    ++  },	  
    + };
    + 
    + static struct service_t *service = NULL;
    +@@ -4429,6 +4448,195 @@
    +   return(UPDATERES_OK);
    + }
    + 
    ++int DNSEXIT_check_info(void)
    ++{
    ++  char buf[BUFSIZ+1];
    ++
    ++  if((host == NULL) || (*host == '\0'))
    ++  {
    ++    if(options & OPT_DAEMON)
    ++    {
    ++      return(-1);
    ++    }
    ++    if(host) { free(host); }
    ++    printf("host: ");
    ++    *buf = '\0';
    ++    fgets(buf, BUFSIZ, stdin);
    ++    host = strdup(buf);
    ++    chomp(host);
    ++  }
    ++
    ++  if(interface == NULL && address == NULL)
    ++  {
    ++    if(options & OPT_DAEMON)
    ++    {
    ++      fprintf(stderr, "you must provide either an interface or an address\n");
    ++      return(-1);
    ++    }
    ++    if(interface) { free(interface); }
    ++    printf("interface: ");
    ++    *buf = '\0';
    ++    fgets(buf, BUFSIZ, stdin);
    ++    chomp(buf);
    ++    option_handler(CMD_interface, buf);
    ++  }
    ++
    ++  warn_fields(service->fields_used);
    ++
    ++  return 0;
    ++}
    ++
    ++int DNSEXIT_update_entry(void)
    ++{
    ++  char buf[BUFFER_SIZE+1];
    ++  char *bp = buf;
    ++  int bytes;
    ++  int btot;
    ++  int ret;
    ++
    ++  buf[BUFFER_SIZE] = '\0';
    ++
    ++  if(do_connect((int*)&client_sockfd, server, port) != 0)
    ++  {
    ++    if(!(options & OPT_QUIET))
    ++    {
    ++      show_message("error connecting to %s:%s\n", server, port);
    ++    }
    ++    return(UPDATERES_ERROR);
    ++  }
    ++
    ++  snprintf(buf, BUFFER_SIZE, "GET %s?action=edit&", request);
    ++  output(buf);
    ++  if(address != NULL && *address != '\0')
    ++  {
    ++    snprintf(buf, BUFFER_SIZE, "%s=%s&", "myip", address);
    ++    output(buf);
    ++  }
    ++  snprintf(buf, BUFFER_SIZE, "%s=%s&", "wildcard", wildcard ? "ON" : "OFF");
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, "%s=%s&", "mx", mx);
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, "%s=%s&", "backmx", *mx == '\0' ? "NO" : "YES");
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, "%s=%s&", "host", host);
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, "%s=%s&", "login", user_name);
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, "%s=%s&", "password", password);
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, " HTTP/1.0\015\012");
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, "Authorization: Basic %s\015\012", auth);
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, "User-Agent: %s-%s %s [%s] (%s)\015\012",
    ++      "ez-update", VERSION, OS, (options & OPT_DAEMON) ? "daemon" : "", "by Angus Mackay");
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, "Host: %s\015\012", server);
    ++  output(buf);
    ++  snprintf(buf, BUFFER_SIZE, "\015\012");
    ++  output(buf);
    ++
    ++  bp = buf;
    ++  bytes = 0;
    ++  btot = 0;
    ++  while((bytes=read_input(bp, BUFFER_SIZE-btot)) > 0)
    ++  {
    ++    bp += bytes;
    ++    btot += bytes;
    ++    dprintf((stderr, "btot: %d\n", btot));
    ++  }
    ++  close(client_sockfd);
    ++  buf[btot] = '\0';
    ++
    ++  dprintf((stderr, "server output: %s\n", buf));
    ++
    ++  if(sscanf(buf, " HTTP/1.%*c %3d", &ret) != 1)
    ++  {
    ++    ret = -1;
    ++  }
    ++
    ++  switch(ret)
    ++  {
    ++    case -1:
    ++      if(!(options & OPT_QUIET))
    ++      {
    ++        show_message("strange server response, are you connecting to the right server?\n");
    ++      }
    ++      return(UPDATERES_ERROR);
    ++      break;
    ++
    ++    case 200:
    ++
    ++      if(strstr(buf, "0=Success") != NULL)
    ++      {
    ++        if(!(options & OPT_QUIET))
    ++        {
    ++          printf("Request successful\n");
    ++        }
    ++      }
    ++      else if(strstr(buf, "1=IP is the same as the IP on the system") != NULL)
    ++      {
    ++        if(!(options & OPT_QUIET))
    ++        {
    ++          printf("Request successful but the IP is the same as previous update\n");
    ++        }
    ++      }
    ++      else if(strstr(buf, "2=Invalid passwords") != NULL)
    ++      {
    ++        if(!(options & OPT_QUIET))
    ++        {
    ++          printf("Invalid Password\n");
    ++        }
    ++      }
    ++      else if(strstr(buf, "3=User not found") != NULL)
    ++      {
    ++        if(!(options & OPT_QUIET))
    ++        {
    ++          printf("Username not found\n");
    ++        }
    ++      }
    ++      else if(strstr(buf, "4=Update too often") != NULL)
    ++      {
    ++        if(!(options & OPT_QUIET))
    ++        {
    ++          printf("Updatting too often\n");
    ++        }
    ++      }
    ++      else
    ++      {
    ++        show_message("Errors return from server\n");
    ++        if(!(options & OPT_QUIET))
    ++        {
    ++          fprintf(stderr, "server output: %s\n", buf);
    ++        }
    ++        return(UPDATERES_ERROR);
    ++      }
    ++      break;
    ++
    ++    case 401:
    ++      if(!(options & OPT_QUIET))
    ++      {
    ++        show_message("authentication failure\n");
    ++      }
    ++      return(UPDATERES_SHUTDOWN);
    ++      break;
    ++
    ++    default:
    ++      if(!(options & OPT_QUIET))
    ++      {
    ++        // reuse the auth buffer
    ++        *auth = '\0';
    ++        sscanf(buf, " HTTP/1.%*c %*3d %255[^\r\n]", auth);
    ++        show_message("unknown return code: %d\n", ret);
    ++        show_message("server response: %s\n", auth);
    ++      }
    ++      return(UPDATERES_ERROR);
    ++      break;
    ++  }
    ++
    ++  return(UPDATERES_OK);
    ++}
    ++
    + static int is_in_list(char *needle, char **haystack)
    + {
    +   char **p;
    diff --git a/net/ez-ipupdate/patches/004-zoneedit.patch b/net/ez-ipupdate/patches/004-zoneedit.patch
    new file mode 100644
    index 0000000..acc2b5f
    --- /dev/null
    +++ b/net/ez-ipupdate/patches/004-zoneedit.patch
    @@ -0,0 +1,12 @@
    +--- ez-ipupdate-3.0.11b8.orig/ez-ipupdate.c
    ++++ ez-ipupdate-3.0.11b8/ez-ipupdate.c
    +@@ -95,7 +95,7 @@
    + #define HN_DEFAULT_PORT "80"
    + #define HN_REQUEST "/vanity/update"
    +
    +-#define ZONEEDIT_DEFAULT_SERVER "www.zoneedit.com"
    ++#define ZONEEDIT_DEFAULT_SERVER "dynamic.zoneedit.com"
    + #define ZONEEDIT_DEFAULT_PORT "80"
    + #define ZONEEDIT_REQUEST "/auth/dynamic.html"
    +
    +
    diff --git a/net/faifa/Makefile b/net/faifa/Makefile
    new file mode 100644
    index 0000000..c096607
    --- /dev/null
    +++ b/net/faifa/Makefile
    @@ -0,0 +1,58 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=faifa
    +PKG_REV:=82
    +PKG_VERSION:=r$(PKG_REV)
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=https://svn.open-plc.org/trunk/
    +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
    +PKG_SOURCE_VERSION:=$(PKG_REV)
    +PKG_SOURCE_PROTO:=svn
    +
    +PKG_INSTALL:=1
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/faifa
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libpthread +libopenssl +libpcap
    +  TITLE:=configure HomePlug 1.0/AV PLC devices
    +  URL:=http://open-plc.org/
    +endef
    +
    +define Package/faifa/description
    +Faifa can configure any Intellon-based Power Line Communication device using
    +Intellon INT5000 and INT6000 series chips (6000 and 6300 chips). It supports all
    +Intellon-specific management and control frames as well as standard management
    +frames.
    +endef
    +
    +TARGET_CFLAGS += $(FPIC)
    +
    +MAKE_FLAGS += \
    +	OS=LINUX \
    +	SVN_REV=$(PKG_REV) \
    +	CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
    +	LDFLAGS="$(TARGET_LDFLAGS)"
    +
    +define Build/Configure
    +	(cd $(PKG_BUILD_DIR); ./autogen.sh)
    +	$(call Build/Configure/Default)
    +endef
    +
    +define Package/faifa/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/faifa $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,faifa))
    diff --git a/net/flow-tools/Makefile b/net/flow-tools/Makefile
    new file mode 100644
    index 0000000..6323c93
    --- /dev/null
    +++ b/net/flow-tools/Makefile
    @@ -0,0 +1,43 @@
    +#
    +# Copyright (C) 2007 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=flow-tools
    +PKG_VERSION:=0.68
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=ftp://ftp.eng.oar.net/pub/flow-tools/
    +PKG_MD5SUM:=c9e0a8b53c79611b6bffcb9d510a5a38
    +
    +PKG_BUILD_DEPENDS:=+zlib
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/flow-tools
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=flow-tools
    +  URL:=http://www.splintered.net/sw/flow-tools/
    +endef
    +
    +define Package/flow-tools/description
    +	Flow-tools is a software package for collecting and processing 
    +	NetFlow data from Cisco and Juniper routers.
    +endef
    +
    +define Build/Compile
    +	$(call Build/Compile/Default,all)
    +endef
    +
    +define Package/flow-tools/install	
    +	$(INSTALL_DIR) $(1)/usr/bin/
    +	$(CP) $(PKG_BUILD_DIR)/src/flow-* $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,flow-tools))
    diff --git a/net/flow-tools/patches/001-cross_compile_configure_fix.patch b/net/flow-tools/patches/001-cross_compile_configure_fix.patch
    new file mode 100644
    index 0000000..01a3724
    --- /dev/null
    +++ b/net/flow-tools/patches/001-cross_compile_configure_fix.patch
    @@ -0,0 +1,11 @@
    +-- flow-tools-0.68.orig/configure      2007-02-08 07:21:42.000000000 -0500
    ++++ flow-tools-0.68/configure   2007-02-08 07:53:42.000000000 -0500
    +@@ -6308,7 +6308,7 @@
    + 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
    + #line $LINENO "configure"
    diff --git a/net/flow-tools/patches/002-flex_lib.patch b/net/flow-tools/patches/002-flex_lib.patch
    new file mode 100644
    index 0000000..f6b9877
    --- /dev/null
    +++ b/net/flow-tools/patches/002-flex_lib.patch
    @@ -0,0 +1,46 @@
    +--- flow-tools-0.68.orig/Makefile.in	2007-02-08 07:21:42.000000000 -0500
    ++++ flow-tools-0.68/Makefile.in	2007-02-08 08:18:36.000000000 -0500
    +@@ -70,7 +70,7 @@
    + DEPDIR = @DEPDIR@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LEX = @LEX@
    +-LEXLIB = @LEXLIB@
    ++LEXLIB =
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    + MYSQLCFLAGS = @MYSQLCFLAGS@
    + MYSQLINCLUDE = @MYSQLINCLUDE@
    +--- flow-tools-0.68.orig/src/Makefile.in	2007-02-08 07:21:42.000000000 -0500
    ++++ flow-tools-0.68/src/Makefile.in	2007-02-08 08:18:31.000000000 -0500
    +@@ -70,7 +70,7 @@
    + DEPDIR = @DEPDIR@
    + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    + LEX = @LEX@
    +-LEXLIB = @LEXLIB@
    ++LEXLIB =
    + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
    + MYSQLCFLAGS = @MYSQLCFLAGS@
    + MYSQLINCLUDE = @MYSQLINCLUDE@
    +--- flow-tools-0.68.orig/src/acllex.c	2007-02-08 07:21:42.000000000 -0500
    ++++ flow-tools-0.68/src/acllex.c	2007-02-08 08:25:10.000000000 -0500
    +@@ -503,7 +503,9 @@
    + #ifdef __cplusplus
    + extern "C" int yywrap YY_PROTO(( void ));
    + #else
    +-extern int yywrap YY_PROTO(( void ));
    ++int yywrap (void ) {
    ++    return 1;
    ++}
    + #endif
    + #endif
    + 
    +--- flow-tools-0.68.orig/configure	2007-02-08 07:21:42.000000000 -0500
    ++++ flow-tools-0.68/configure	2007-02-08 08:19:30.000000000 -0500
    +@@ -2952,7 +2952,7 @@
    +   echo $ECHO_N "(cached) $ECHO_C" >&6
    + else
    +   ac_check_lib_save_LIBS=$LIBS
    +-LIBS="-lfl  $LIBS"
    ++LIBS="$LIBS"
    + cat >conftest.$ac_ext <<_ACEOF
    + #line $LINENO "configure"
    + /* confdefs.h.  */
    diff --git a/net/flow-tools/patches/010-python_script_location_fix.patch b/net/flow-tools/patches/010-python_script_location_fix.patch
    new file mode 100644
    index 0000000..5806732
    --- /dev/null
    +++ b/net/flow-tools/patches/010-python_script_location_fix.patch
    @@ -0,0 +1,30 @@
    +diff --git a/bin/flow-log2rrd b/bin/flow-log2rrd
    +index 0567ba5..db4fdda 100755
    +--- a/bin/flow-log2rrd
    ++++ b/bin/flow-log2rrd
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/python
    ++#!/bin/env python
    + 
    + import getopt
    + import os
    +diff --git a/bin/flow-rpt2rrd b/bin/flow-rpt2rrd
    +index 72a74c7..7698f2b 100755
    +--- a/bin/flow-rpt2rrd
    ++++ b/bin/flow-rpt2rrd
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/python
    ++#!/bin/env python
    + 
    + import getopt
    + import os
    +diff --git a/bin/flow-rptfmt b/bin/flow-rptfmt
    +index 047d1ba..f663fae 100755
    +--- a/bin/flow-rptfmt
    ++++ b/bin/flow-rptfmt
    +@@ -1,4 +1,4 @@
    +-#!/usr/local/bin/python
    ++#!/bin/env python
    + 
    + import sys
    + import string
    diff --git a/net/flow-tools/patches/020-invalid_lvalue_in_assignment.patch b/net/flow-tools/patches/020-invalid_lvalue_in_assignment.patch
    new file mode 100644
    index 0000000..aeda139
    --- /dev/null
    +++ b/net/flow-tools/patches/020-invalid_lvalue_in_assignment.patch
    @@ -0,0 +1,171 @@
    +diff --git a/lib/ftchash.c b/lib/ftchash.c
    +index 9cc7efa..28bafbf 100644
    +--- a/lib/ftchash.c
    ++++ b/lib/ftchash.c
    +@@ -326,7 +326,7 @@ void *ftchash_foreach(struct ftchash *ft
    +       (char*)ftch->traverse_chunk->base+ftch->traverse_chunk->next) {
    + 
    +       ret = ftch->traverse_rec;
    +-      (char*)ftch->traverse_rec += ftch->d_size;
    ++      ftch->traverse_rec = vpadd(ftch->traverse_rec, ftch->d_size);
    +       return ret;
    + 
    +     } else {
    +diff --git a/lib/ftio.c b/lib/ftio.c
    +index f6c739c..1082416 100644
    +--- a/lib/ftio.c
    ++++ b/lib/ftio.c
    +@@ -2267,7 +2267,7 @@ int readn(register int fd, register void
    +         break;
    + 
    +       nleft -= nread;
    +-      (char*)ptr += nread;
    ++      ptr = vpadd(ptr, nread);
    +   }
    +   return (nbytes - nleft);
    + } /* readn */
    +@@ -2292,7 +2292,7 @@ int writen(register int fd, register voi
    +       return(nwritten); /* error */
    + 
    +     nleft -= nwritten;
    +-    (char*)ptr += nwritten;
    ++    ptr =  vpadd(ptr,nwritten);
    +   }
    +   return(nbytes - nleft);
    + } /* writen */
    +diff --git a/lib/ftlib.h b/lib/ftlib.h
    +index f91ad0a..66bf2f3 100644
    +--- a/lib/ftlib.h
    ++++ b/lib/ftlib.h
    +@@ -152,7 +152,6 @@ #define FT_PDU_V8_11_MAXFLOWS 44  /* max
    + #define FT_PDU_V8_12_MAXFLOWS 44  /* max records in V8 DST_PREFIX_TOS packet */
    + #define FT_PDU_V8_13_MAXFLOWS 35  /* max records in V8 PREFIX_TOS packet */
    + #define FT_PDU_V8_14_MAXFLOWS 35  /* max records in V8 PREFIX_PORT_TOS packet */
    +-
    + #define FT_PDU_V8_1_VERSION    2  /* version of AS packet */
    + #define FT_PDU_V8_2_VERSION    2  /* version of PROTO PORT packet */
    + #define FT_PDU_V8_3_VERSION    2  /* version of SRC PREFIX packet */
    +@@ -3029,6 +3028,8 @@ #ifndef IN_CLASSD_SSM
    + #define IN_CLASSD_SSM(i) (((u_int32_t)(i) & 0xff000000) == 0xe8000000)
    + #endif /* IN_CLASSD_SSM */
    + 
    ++void *vpadd(const void* v, const int change);
    ++
    + /* MACHINE DEPENDANT */
    + #define fmt_uint fmt_uint32
    + 
    +diff --git a/lib/fttlv.c b/lib/fttlv.c
    +index 7035813..330a783 100644
    +--- a/lib/fttlv.c
    ++++ b/lib/fttlv.c
    +@@ -68,10 +68,10 @@ int fttlv_enc_uint32(void *buf, int buf_
    +   }
    + 
    +   bcopy(&t, buf, 2);
    +-  (char*)buf+= 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(&len, buf, 2);
    +-  (char*)buf+= 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(&v, buf, 4);
    + 
    +@@ -107,10 +107,10 @@ int fttlv_enc_uint16(void *buf, int buf_
    +   }
    + 
    +   bcopy(&t, buf, 2);
    +-  (char*)buf+= 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(&len, buf, 2);
    +-  (char*)buf+= 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(&v, buf, 2);
    + 
    +@@ -145,10 +145,10 @@ int fttlv_enc_uint8(void *buf, int buf_s
    +   }
    + 
    +   bcopy(&t, buf, 2);
    +-  (char*)buf+= 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(&len, buf, 2);
    +-  (char*)buf+= 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(&v, buf, 1);
    + 
    +@@ -183,10 +183,10 @@ int fttlv_enc_str(void *buf, int buf_siz
    +   }
    + 
    +   bcopy(&t, buf, 2);
    +-  (char*)buf+= 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(&len, buf, 2);
    +-  (char*)buf+= 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(v, buf, len);
    + 
    +@@ -230,16 +230,16 @@ int fttlv_enc_ifname(void *buf, int buf_
    +     return -1;
    + 
    +   bcopy(&t, buf, 2);
    +-  (char*)buf+= 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(&len, buf, 2);
    +-  (char*)buf+= 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(&ip, buf, 4);
    +-  (char*)buf += 4;
    ++  buf = vpadd(buf, 4);
    + 
    +   bcopy(&ifIndex, buf, 2);
    +-  (char*)buf += 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(name, buf, n);
    + 
    +@@ -287,19 +287,19 @@ int fttlv_enc_ifalias(void *buf, int buf
    +   }
    + 
    +   bcopy(&t, buf, 2);
    +-  (char*)buf+= 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(&len, buf, 2);
    +-  (char*)buf+= 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(&ip, buf, 4);
    +-  (char*)buf += 4;
    ++  buf = vpadd(buf, 4);
    + 
    +   bcopy(&entries, buf, 2);
    +-  (char*)buf += 2;
    ++  buf = vpadd(buf, 2);
    + 
    +   bcopy(ifIndex_list, buf, esize);
    +-  (char*)buf += esize;
    ++  buf = vpadd(buf, esize);
    + 
    +   bcopy(name, buf, n);
    + 
    +diff --git a/lib/support.c b/lib/support.c
    +index a32ffe7..2e1db9f 100644
    +--- a/lib/support.c
    ++++ b/lib/support.c
    +@@ -736,3 +736,8 @@ int udp_cksum(struct ip *ip, struct udph
    +   return sum;
    + } /* udp_cksum */
    + 
    ++// void pointer add
    ++
    ++void * vpadd(const void *v, const int change) {
    ++  return (void *) (((char*) v) + change);
    ++}
    diff --git a/net/flow-tools/patches/030-avoid_external_debug_var.patch b/net/flow-tools/patches/030-avoid_external_debug_var.patch
    new file mode 100644
    index 0000000..6ca5740
    --- /dev/null
    +++ b/net/flow-tools/patches/030-avoid_external_debug_var.patch
    @@ -0,0 +1,13 @@
    +diff --git a/lib/ftfile.c b/lib/ftfile.c
    +index 2f3ae76..f25e849 100644
    +--- a/lib/ftfile.c
    ++++ b/lib/ftfile.c
    +@@ -53,7 +53,7 @@ #endif
    + 
    + int load_dir(char *prefix, struct ftfile_entries *fte, int flags, int *depth);
    + 
    +-extern int debug;
    ++#define debug 0
    + 
    + /*
    +  * function: ftfile_entry_new
    diff --git a/net/flow-tools/patches/050-fix-64bit_temp_time_t.patch b/net/flow-tools/patches/050-fix-64bit_temp_time_t.patch
    new file mode 100644
    index 0000000..99a06f7
    --- /dev/null
    +++ b/net/flow-tools/patches/050-fix-64bit_temp_time_t.patch
    @@ -0,0 +1,41 @@
    +diff --git a/lib/ftfile.c b/lib/ftfile.c
    +index f25e849..ec17771 100644
    +--- a/lib/ftfile.c
    ++++ b/lib/ftfile.c
    +@@ -413,16 +413,17 @@ void ftfile_pathname(char *buf, int bsiz
    +  int done, u_int32 ftime)
    + {
    +   struct tm *tm;
    ++  time_t _t = (time_t) ftime;
    +   char *prefix, dbuf[64];
    +   long gmt_val;
    +   char gmt_sign;
    +   int tm_gmtoff;
    +   
    +-  if (!(tm = localtime ((time_t*)&ftime))) {
    ++  if (!(tm = localtime (&_t))) {
    +     snprintf(buf, bsize, ".");
    +   }
    + 
    +-  tm_gmtoff = get_gmtoff(ftime);
    ++  tm_gmtoff = get_gmtoff(_t);
    + 
    +   /* compute GMT offset */
    +   if (tm_gmtoff >= 0) {
    +@@ -502,6 +503,7 @@ void ftfile_pathname(char *buf, int bsiz
    + int ftfile_mkpath(u_int32 ftime, int nest)
    + {
    +   struct tm *tm;
    ++  time_t _t = (time_t) ftime;
    +   char buf[32];
    + 
    +   /* no directories */
    +@@ -512,7 +514,7 @@ int ftfile_mkpath(u_int32 ftime, int nes
    +   if ((nest > 3) || (nest < -3))
    +     return -1;
    + 
    +-  if (!(tm = localtime ((time_t*)&ftime)))
    ++  if (!(tm = localtime (&_t)))
    +     return -1;
    + 
    +   if (nest == -1)
    diff --git a/net/flow-tools/patches/060-fix_uninitialized_var_in_flow_send.patch b/net/flow-tools/patches/060-fix_uninitialized_var_in_flow_send.patch
    new file mode 100644
    index 0000000..2240537
    --- /dev/null
    +++ b/net/flow-tools/patches/060-fix_uninitialized_var_in_flow_send.patch
    @@ -0,0 +1,13 @@
    +diff --git a/src/flow-send.c b/src/flow-send.c
    +index 83ca926..ad87024 100644
    +--- a/src/flow-send.c
    ++++ b/src/flow-send.c
    +@@ -76,7 +76,7 @@ int main(int argc, char **argv)
    +   u_int32 privacy_mask;
    +   unsigned int v1, v2, one;
    +   int i, n, ret, tx_delay, udp_sock;
    +-  int src_ip_spoof, hdr_len;
    ++  int src_ip_spoof, hdr_len = 0;
    +   void *rec;
    + 
    +   /* init fterr */
    diff --git a/net/flow-tools/patches/070-extra_ftpdu_verify_debugging.patch b/net/flow-tools/patches/070-extra_ftpdu_verify_debugging.patch
    new file mode 100644
    index 0000000..911d369
    --- /dev/null
    +++ b/net/flow-tools/patches/070-extra_ftpdu_verify_debugging.patch
    @@ -0,0 +1,49 @@
    +diff --git a/lib/ftdecode.c b/lib/ftdecode.c
    +index ff6b0cf..8884db9 100644
    +--- a/lib/ftdecode.c
    ++++ b/lib/ftdecode.c
    +@@ -122,8 +122,10 @@ int ftpdu_verify(struct ftpdu *ftpdu)
    +   ret = -1;
    + 
    +   /* enough bytes to decode the count and version? */
    +-  if (ftpdu->bused < 4)
    ++  if (ftpdu->bused < 4) {
    ++    fterr_warnx("not enough bytes to decode the count and version.");
    +     goto ftpdu_verify_out_quick;
    ++  }
    + 
    +   ph = (struct ftpdu_header*)&ftpdu->buf;
    + 
    +@@ -158,15 +160,22 @@ #endif /* LITTLE_ENDIAN */
    +     case 5:
    + 
    +       /* max PDU's in record */
    +-      if (ph->count > FT_PDU_V5_MAXFLOWS)
    ++      if (ph->count > FT_PDU_V5_MAXFLOWS) {
    ++	fterr_warnx("too many pdus (%d) in record, max %d", ph->count,
    ++		FT_PDU_V5_MAXFLOWS);
    +         goto ftpdu_verify_out;
    ++      }
    ++
    + 
    +       size = offsetof(struct ftpdu_v5, records) +
    +              ph->count * sizeof (struct ftrec_v5);
    + 
    +       /* PDU received size == PDU expected size? */
    +-      if (size != ftpdu->bused)
    ++      if (size != ftpdu->bused) {
    ++        fterr_warnx("pdu received size was wrong.  expected %d got %d",
    ++                ftpdu->bused, size);
    +         goto ftpdu_verify_out;
    ++      }
    + 
    +       ftpdu->ftv.d_version = 5;
    +       ftpdu->decodef = fts3rec_pdu_v5_decode;
    +@@ -516,6 +525,7 @@ #endif /* LITTLE_ENDIAN */
    +       break; /* 8 */
    + 
    +       default:
    ++	  fterr_warnx("ftpdu version not set.");
    +           goto ftpdu_verify_out;
    + 
    +   } /* switch ph->version */
    diff --git a/net/flow-tools/patches/080-fix_uninitialized_var_in_flow_export.patch b/net/flow-tools/patches/080-fix_uninitialized_var_in_flow_export.patch
    new file mode 100644
    index 0000000..bd88403
    --- /dev/null
    +++ b/net/flow-tools/patches/080-fix_uninitialized_var_in_flow_export.patch
    @@ -0,0 +1,13 @@
    +diff --git a/src/flow-export.c b/src/flow-export.c
    +index 52ae4d2..22b0330 100644
    +--- a/src/flow-export.c
    ++++ b/src/flow-export.c
    +@@ -961,7 +961,7 @@ #endif /* PGSQL */
    + 
    + int fmt_xfields_type(char *buf, u_int64 xfield)
    + {
    +-  int comma;
    ++  int comma = 0;
    + 
    +   buf[0] = 0;
    + 
    diff --git a/net/fping/Makefile b/net/fping/Makefile
    new file mode 100644
    index 0000000..93f1bc5
    --- /dev/null
    +++ b/net/fping/Makefile
    @@ -0,0 +1,61 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=fping
    +PKG_VERSION:=2.4b2_to-ipv6
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=http://www.fping.com/download/
    +PKG_MD5SUM:=3ad516765514249a40d3c5b6caab812a
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/fping
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=A program to ping multiple hosts in parallel
    +  URL:=http://www.fping.com
    +endef
    +
    +define Package/fping/description
    +	fping is a ping(1) like program which uses the Internet Control Message Protocol 
    +	(ICMP) echo request to determine if a host is up. fping is different from ping in 
    +	that you can specify any number of hosts on the command line, or specify a file 
    +	containing the lists of hosts to ping. Instead of trying one host until it timeouts 
    +	or replies, fping will send out a ping packet and move on to the next host in a 
    +	round-robin fashion. If a host replies, it is noted and removed from the list of 
    +	hosts to check. If a host does not respond within a certain time limit and/or retry 
    +	limit it will be considered unreachable.
    +endef
    +  
    +define Build/Configure
    +        (cd $(PKG_BUILD_DIR); touch \
    +		configure \
    +		stamp-h.in \
    +		config.h.in \
    +	);
    +	$(call Build/Configure/Default,)
    +endef
    +
    +define Build/Compile	
    +	$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) clean $(PKG_NAME)
    +	mv $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME)4
    +	$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -DIPV6=1" -C $(PKG_BUILD_DIR) clean $(PKG_NAME)
    +	mv $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME)6
    +endef
    +
    +define Package/fping/install	
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_BUILD_DIR)/fping4 $(1)/usr/bin/
    +	$(CP) $(PKG_BUILD_DIR)/fping6 $(1)/usr/bin/
    +	ln -sf fping4 $(1)/usr/bin/fping
    +endef
    +
    +$(eval $(call BuildPackage,fping))
    diff --git a/net/fping/patches/001-debian.patch b/net/fping/patches/001-debian.patch
    new file mode 100644
    index 0000000..a24dabb
    --- /dev/null
    +++ b/net/fping/patches/001-debian.patch
    @@ -0,0 +1,165 @@
    +--- fping-2.4b2-to-ipv6.orig/fping.8
    ++++ fping-2.4b2-to-ipv6/fping.8
    +@@ -1,4 +1,4 @@
    +-.TH fping l
    ++.TH fping 8
    + .SH NAME
    + fping \- send ICMP ECHO_REQUEST packets to network hosts
    + .SH SYNOPSIS
    +@@ -152,7 +152,7 @@
    + example none the less. 
    + .nf
    + 
    +-#!/usr/local/bin/perl
    ++#!/usr/bin/perl
    + require 'open2.pl';
    + 
    + $MAILTO = "root";
    +@@ -178,7 +178,7 @@
    + that are currently reachable.
    + .nf
    + 
    +-#!/usr/local/bin/perl
    ++#!/usr/bin/perl
    + 
    + $hosts_to_backup = `cat /etc/hosts.backup | fping -a`;
    + 
    +--- fping-2.4b2-to-ipv6.orig/fping.c
    ++++ fping-2.4b2-to-ipv6/fping.c
    +@@ -42,7 +42,6 @@
    +  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    +  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    +  */
    +-#define IPV6 1						/* This should be a compiler option, or even better be done from the Makefile... ;) */
    + 
    + #ifndef _NO_PROTO
    + #if !__STDC__ && !defined( __cplusplus ) && !defined( FUNCPROTO ) \
    +@@ -101,13 +100,8 @@
    + #endif
    + #include 
    + 
    +-/* Linux has bizarre ip.h and ip_icmp.h */
    +-#if defined( __linux__ )
    +-#include "linux.h"
    +-#else
    + #include 
    + #include 
    +-#endif /* defined(__linux__) */
    + 
    + #include 
    + #include 
    +@@ -150,7 +144,11 @@
    + #define MIN_PING_DATA	sizeof( PING_DATA )
    + #define	MAX_IP_PACKET	65536	/* (theoretical) max IP packet size */
    + #define SIZE_IP_HDR		20
    ++#ifndef IPV6
    + #define SIZE_ICMP_HDR	ICMP_MINLEN		/* from ip_icmp.h */
    ++#else
    ++#define SIZE_ICMP_HDR	sizeof(FPING_ICMPHDR)
    ++#endif
    + #define MAX_PING_DATA	( MAX_IP_PACKET - SIZE_IP_HDR - SIZE_ICMP_HDR )
    + 
    + /* sized so as to be like traditional ping */
    +@@ -474,6 +472,35 @@
    + 		    sizeof(opton)))
    + 			err(1, "setsockopt(IPV6_RTHDR)");
    + #endif
    ++#ifndef USE_SIN6_SCOPE_ID
    ++#ifdef IPV6_RECVPKTINFO
    ++		if (setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &opton,
    ++		    sizeof(opton)))
    ++			err(1, "setsockopt(IPV6_RECVPKTINFO)");
    ++#else  /* old adv. API */
    ++		if (setsockopt(s, IPPROTO_IPV6, IPV6_PKTINFO, &opton,
    ++		    sizeof(opton)))
    ++			err(1, "setsockopt(IPV6_PKTINFO)");
    ++#endif
    ++#endif /* USE_SIN6_SCOPE_ID */
    ++#ifdef IPV6_RECVHOPLIMIT
    ++		if (setsockopt(s, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &opton,
    ++		    sizeof(opton)))
    ++			err(1, "setsockopt(IPV6_RECVHOPLIMIT)");
    ++#else  /* old adv. API */
    ++		if (setsockopt(s, IPPROTO_IPV6, IPV6_HOPLIMIT, &opton,
    ++		    sizeof(opton)))
    ++			err(1, "setsockopt(IPV6_HOPLIMIT)");
    ++#endif
    ++#ifdef IPV6_CHECKSUM
    ++#ifndef SOL_RAW
    ++#define SOL_RAW IPPROTO_IPV6
    ++#endif
    ++		opton = 2;
    ++		if (setsockopt(s, SOL_RAW, IPV6_CHECKSUM, &opton,
    ++		    sizeof(opton)))
    ++			err(1, "setsockopt(SOL_RAW,IPV6_CHECKSUM)");
    ++#endif
    + #endif
    + 
    + 	if( ( uid = getuid() ) )
    +@@ -1112,7 +1139,7 @@
    + 		/* but allow time for the last one to come in */
    + 		if( count_flag )
    + 		{
    +-			if( ( cursor->num_sent >= count ) && ( ht > cursor->timeout ) )
    ++			if( ( cursor->num_sent >= count ) && ( cursor->num_recv >= count || ht > cursor->timeout ) )
    + 			{
    + 				remove_job( cursor );
    + 				continue;
    +@@ -1382,15 +1409,15 @@
    + 		if( h->num_recv_i <= h->num_sent_i )
    + 		{
    + 			fprintf( stderr, " xmt/rcv/%%loss = %d/%d/%d%%",
    +-				h->num_sent_i, h->num_recv_i,
    +-				( ( h->num_sent_i - h->num_recv_i ) * 100 ) / h->num_sent_i );
    ++				h->num_sent_i, h->num_recv_i, h->num_sent_i > 0 ?
    ++				( ( h->num_sent_i - h->num_recv_i ) * 100 ) / h->num_sent_i : 0 );
    + 
    + 		}/* IF */
    + 		else
    + 		{
    + 			fprintf( stderr, " xmt/rcv/%%return = %d/%d/%d%%",
    +-				h->num_sent_i, h->num_recv_i,
    +-				( ( h->num_recv_i * 100 ) / h->num_sent_i ) );
    ++				h->num_sent_i, h->num_recv_i, h->num_sent_i > 0 ?
    ++				( ( h->num_recv_i * 100 ) / h->num_sent_i ) : 0 );
    + 
    + 		}/* ELSE */
    + 
    +@@ -2165,20 +2192,33 @@
    + 	struct addrinfo		*res, hints;
    + 	int						ret_ga;
    + 	char						*hostname;
    ++	size_t len;
    + 
    + 	/* getaddrinfo */
    + 	bzero(&hints, sizeof(struct addrinfo));
    +-	hints.ai_flags = AI_CANONNAME;
    ++	hints.ai_flags = name_flag ? AI_CANONNAME : 0;
    + 	hints.ai_family = AF_INET6;
    + 	hints.ai_socktype = SOCK_RAW;
    + 	hints.ai_protocol = IPPROTO_ICMPV6;
    + 
    + 	ret_ga = getaddrinfo(name, NULL, &hints, &res);
    +-	if (ret_ga) errx(1, "%s", gai_strerror(ret_ga));
    ++	if (ret_ga) {
    ++		if(!quiet_flag)
    ++			warnx("%s", gai_strerror(ret_ga));
    ++		num_noaddress++;
    ++		return; 
    ++	}
    + 	if (res->ai_canonname) hostname = res->ai_canonname;
    + 	else hostname = name;
    +-	if (!res->ai_addr) errx(1, "getaddrinfo failed");
    +-	(void)memcpy(&dst, res->ai_addr, sizeof(FPING_SOCKADDR)); /*res->ai_addrlen);*/
    ++	if (!res->ai_addr) {
    ++		if(!quiet_flag)
    ++			warnx("getaddrinfo failed");
    ++		num_noaddress++;
    ++		return; 
    ++	}
    ++	len = res->ai_addrlen;
    ++	if (len > sizeof(FPING_SOCKADDR)) len = sizeof(FPING_SOCKADDR);
    ++	(void)memcpy(&dst, res->ai_addr, len);
    + 	add_addr(name, name, &dst);
    + #endif
    + } /* add_name() */
    diff --git a/net/fprobe-ulog/Makefile b/net/fprobe-ulog/Makefile
    new file mode 100644
    index 0000000..64c02fb
    --- /dev/null
    +++ b/net/fprobe-ulog/Makefile
    @@ -0,0 +1,50 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=fprobe-ulog
    +PKG_VERSION:=1.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/fprobe
    +PKG_MD5SUM:=cdb2e4edc47e8a3d5479eeabfb979ebc
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/fprobe-ulog
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libpthread
    +  TITLE:=NetFlow probe (ulog-based)
    +  URL:=http://fprobe.sourceforge.net
    +endef
    +
    +define Package/fprobe-ulog/description
    +	A NetFlow probe obtaining packets through linux netfilter code 
    +	(iptables ULOG target).
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--with-piddir=/var \
    +		--with-membulk=index8 \
    +		--with-hash=xor8 \
    +	)
    +endef
    +
    +define Build/Compile	
    +	$(MAKE) -C $(PKG_BUILD_DIR)
    +endef
    +
    +define Package/fprobe-ulog/install	
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/fprobe-ulog $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,fprobe-ulog))
    diff --git a/net/fprobe/Makefile b/net/fprobe/Makefile
    new file mode 100644
    index 0000000..f6be152
    --- /dev/null
    +++ b/net/fprobe/Makefile
    @@ -0,0 +1,47 @@
    +#
    +# Copyright (C) 2006 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=fprobe
    +PKG_VERSION:=1.1
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=@SF/fprobe
    +PKG_MD5SUM:=65850d0470078269b33eee58cba77ac2
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/fprobe
    +  SECTION:=net
    +  CATEGORY:=Network
    +  DEPENDS:=+libpcap +libpthread
    +  TITLE:=NetFlow probe (libpcap-based)
    +  URL:=http://fprobe.sourceforge.net/
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default, \
    +		--with-piddir=/var \
    +		--with-pcap="$(STAGING_DIR)/usr/include" \
    +		--with-libpcap="$(STAGING_DIR)/usr/lib" \
    +		--with-membulk=index8 \
    +		--with-hash=xor8 \
    +	)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR)
    +endef
    +
    +define Package/fprobe/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/fprobe $(1)/usr/bin/
    +endef
    +
    +$(eval $(call BuildPackage,fprobe))
    diff --git a/net/freepops/Makefile b/net/freepops/Makefile
    new file mode 100644
    index 0000000..440aeea
    --- /dev/null
    +++ b/net/freepops/Makefile
    @@ -0,0 +1,67 @@
    +#
    +# Copyright (C) 2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=freepops
    +PKG_VERSION:=0.2.4
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    +PKG_SOURCE_URL:=@SF/freepops
    +PKG_MD5SUM:=d18848b903ceb68a53ded6b6d9e33047
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
    +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/freepops
    +  SECTION:=net
    +  CATEGORY:=Network
    +  TITLE:=POP3 interface to several webmails
    +  DEPENDS:=+libpthread +liblua +luafilesystem +luacurl +luaexpat @BROKEN
    +  URL:=http://www.freepops.org
    +endef
    +
    +define Package/freepops/description
    +	FreePOPs is a POP3 daemon that translates local POP3 commands
    +	to remote HTTP requests to the supported webmail sites.
    +
    +	FreePOPs can also be used as RSS aggregator and POP3 forwarder.
    +endef
    +
    +define Build/Configure
    +	cd $(PKG_BUILD_DIR) && \
    +	$(TARGET_CONFIGURE_OPTS) \
    +	CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) -DHAVE_CONFIG_H -I$(PKG_BUILD_DIR)" \
    +	LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS) -llua -llua-filesystem -llua-curl -llua-expat" \
    +	PKGCONFIG=true \
    +	./configure.sh openwrt -lua -luafilesystem -luacurl -luaexpat
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) WHERE=/usr/ all
    +	$(TARGET_CROSS)strip $(PKG_BUILD_DIR)/src/freepopsd
    +endef
    +
    +define Package/freepops/install
    +	$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR)/ WHERE=/usr/ install
    +	mkdir -p $(PKG_INSTALL_DIR)/etc/init.d
    +	$(CP) $(PKG_BUILD_DIR)/buildfactory/openwrt/S50freepopsd \
    +		$(PKG_INSTALL_DIR)/etc/init.d 
    +	chmod a+x $(PKG_INSTALL_DIR)/etc/init.d/*
    +	rm -rf $(PKG_INSTALL_DIR)/usr/share/doc
    +	rm -rf $(PKG_INSTALL_DIR)/usr/share/man
    +	rm -rf $(PKG_INSTALL_DIR)/usr/bin/freepops-updater-dialog
    +	rm -rf $(PKG_INSTALL_DIR)/usr/share/freepops/lua/foo.lua
    +	rm -rf $(PKG_INSTALL_DIR)/usr/share/freepops/lua/skeleton.lua
    +	cp -r $(PKG_INSTALL_DIR)/* $(1)
    +endef
    +
    +$(eval $(call BuildPackage,freepops))
    diff --git a/net/freeradius/Makefile b/net/freeradius/Makefile
    new file mode 100644
    index 0000000..c967c9f
    --- /dev/null
    +++ b/net/freeradius/Makefile
    @@ -0,0 +1,405 @@
    +#
    +# Copyright (C) 2006-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=freeradius
    +PKG_VERSION:=1.1.8
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/radius/old/ \
    +	http://freeradius.portal-to-web.de/ \
    +	ftp://ftp.uk.freeradius.org/pub/radius/
    +PKG_MD5SUM:=d367452a837bbe8d9c8731e21dc43593
    +
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/freeradius/Default
    +  SECTION:=net
    +  CATEGORY:=Network
    +  URL:=http://freeradius.org/
    +endef
    +
    +define Package/freeradius
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=+libltdl +libopenssl +libpthread +libreadline
    +  TITLE:=A flexible RADIUS server
    +  MENU:=1
    +endef
    +
    +define Package/freeradius/conffiles
    +/etc/freeradius/clients.conf
    +/etc/freeradius/radiusd.conf
    +endef
    +
    +define Package/freeradius-democerts
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=Demo certificates to test the server
    +endef
    +
    +define Package/freeradius-mod-chap
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=CHAP module
    +endef
    +
    +define Package/freeradius-mod-detail
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=Detailed accounting module
    +endef
    +
    +define Package/freeradius-mod-eap
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=Base EAP module
    +endef
    +
    +define Package/freeradius-mod-eap/conffiles
    +/etc/freeradius/eap.conf
    +endef
    +
    +define Package/freeradius-mod-eap-gtc
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius-mod-eap
    +  TITLE:=EAP/GTC module
    +endef
    +
    +define Package/freeradius-mod-eap-md5
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius-mod-eap
    +  TITLE:=EAP/MD5 module
    +endef
    +
    +define Package/freeradius-mod-eap-mschapv2
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius-mod-eap
    +  TITLE:=EAP/MS-CHAPv2 module
    +endef
    +
    +define Package/freeradius-mod-eap-peap
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius-mod-eap
    +  TITLE:=EAP/PEAP module
    +endef
    +
    +define Package/freeradius-mod-eap-tls
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius-mod-eap
    +  TITLE:=EAP/TLS module
    +endef
    +
    +define Package/freeradius-mod-eap-ttls
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius-mod-eap-tls
    +  TITLE:=EAP/TTLS module
    +endef
    +
    +define Package/freeradius-mod-exec
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=EXEC module
    +endef
    +
    +define Package/freeradius-mod-attr-rewrite
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=ATTR rewrite module
    +endef
    +
    +define Package/freeradius-mod-files
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=Module using local files for authorization
    +endef
    +
    +define Package/freeradius-mod-files/conffiles
    +/etc/freeradius/acct_users
    +/etc/freeradius/preproxy_users
    +/etc/freeradius/users
    +endef
    +
    +define Package/freeradius-mod-ldap
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius +libopenldap
    +  TITLE:=LDAP module
    +endef
    +
    +define Package/freeradius-mod-ldap/conffiles
    +/etc/freeradius/ldap.attrmap
    +endef
    +
    +define Package/freeradius-mod-mschap
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=MS-CHAP and MS-CHAPv2 module
    +endef
    +
    +define Package/freeradius-mod-pap
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=PAP module
    +endef
    +
    +define Package/freeradius-mod-preprocess
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=Request pre-processing module
    +endef
    +
    +define Package/freeradius-mod-preprocess/conffiles
    +/etc/freeradius/hints
    +/etc/freeradius/huntgroups
    +endef
    +
    +define Package/freeradius-mod-realm
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=Realms handling module
    +endef
    +
    +define Package/freeradius-mod-realm/conffiles
    +/etc/freeradius/proxy.conf
    +endef
    +
    +define Package/freeradius-mod-sql
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=Base SQL module
    +endef
    +
    +define Package/freeradius-mod-sql-mysql
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius-mod-sql +libmysqlclient
    +  TITLE:=MySQL module
    +endef
    +
    +define Package/freeradius-mod-sql-pgsql
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius-mod-sql +libpq
    +  TITLE:=PostgreSQL module
    +endef
    +
    +define Package/freeradius-mod-sqlcounter
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius-mod-sql
    +  TITLE:=Generic SQL Counter module
    +endef
    +
    +define Package/freeradius-mod-radutmp
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=Radius UTMP module
    +endef
    +
    +define Package/freeradius-utils
    +  $(call Package/freeradius/Default)
    +  DEPENDS:=freeradius
    +  TITLE:=Misc. client utilities
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--libdir=/usr/lib/freeradius \
    +	--libexecdir=/usr/lib/freeradius \
    +	--enable-shared \
    +	--disable-static \
    +	--disable-developer \
    +	--with-openssl-includes="$(STAGING_DIR)/usr/include" \
    +	--with-openssl-libraries="$(STAGING_DIR)/usr/lib" \
    +	--with-system-libtool \
    +	--disable-ltdl-install \
    +	--enable-strict-dependencies \
    +	--with-raddbdir=/etc/freeradius \
    +	--without-edir \
    +	--without-snmp \
    +	--with-experimental-modules \
    +	--without-rlm_checkval \
    +	--without-rlm_counter \
    +	--without-rlm_dbm \
    +	--with-rlm_eap \
    +	--without-rlm_eap_sim \
    +	--without-rlm_example \
    +	--without-rlm_ippool \
    +	--without-rlm_krb5 \
    +	--without-rlm_otp \
    +	--without-rlm_pam \
    +	--without-rlm_perl \
    +	--without-rlm_python \
    +	--without-rlm_smb \
    +	--with-rlm_sql \
    +	--with-rlm_sqlcounter \
    +	--without-rlm_sqlhpwippool \
    +	--without-rlm_sqlippool \
    +	--without-rlm_sql_db2 \
    +	--without-rlm_sql_firebird \
    +	--without-rlm_sql_freetds \
    +	--without-rlm_sql_iodbc \
    +	--without-rlm_sql_oracle \
    +	--without-rlm_sql_sybase \
    +	--without-rlm_sql_unixodbc \
    +	--without-rlm_sql_log \
    +	--without-rlm_unix \
    +
    +PKG_DICTIONARIES:= \
    +	freeradius freeradius.internal \
    +	rfc2865 rfc2866 rfc2867 rfc2868 rfc2869 rfc3162 rfc3576 rfc3580 \
    +	rfc4372 rfc4675 rfc4679 \
    +	microsoft \
    +	wispr \
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius-mod-ldap),)
    +  CONFIGURE_ARGS+= \
    +		--with-rlm_ldap-include-dir="$(STAGING_DIR)/usr/include" \
    +		--with-rlm_ldap-lib-dir="$(STAGING_DIR)/usr/lib"
    +  CONFIGURE_LIBS+= -lcrypto -lssl
    +else
    +  CONFIGURE_ARGS+= --without-rlm_ldap
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius-mod-sql-mysql),)
    +  CONFIGURE_ARGS+= \
    +		--with-mysql-include-dir="$(STAGING_DIR)/usr/include" \
    +		--with-mysql-lib-dir="$(STAGING_DIR)/usr/lib/mysql" \
    +		--without-threads
    +  CONFIGURE_LIBS+= -lz
    +else
    +  CONFIGURE_ARGS+= --without-rlm_sql_mysql
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius-mod-sql-pgsql),)
    +  CONFIGURE_ARGS+= \
    +		--with-rlm_sql_postgresql-include-dir="$(STAGING_DIR)/usr/include" \
    +		--with-rlm_sql_postgresql-lib-dir="$(STAGING_DIR)/usr/lib"
    +else
    +  CONFIGURE_ARGS+= --without-rlm_sql_postgresql
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius-mod-eap-peap),)
    +  CONFIGURE_ARGS+= --with-rlm_eap_peap
    +  CONFIGURE_LIBS+= -lcrypto -lssl
    +else
    +  CONFIGURE_ARGS+= --without-rlm_eap_peap
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius-mod-eap-tls),)
    +  CONFIGURE_ARGS+= --with-rlm_eap_tls
    +  CONFIGURE_LIBS+= -lcrypto -lssl
    +else
    +  CONFIGURE_ARGS+= --without-rlm_eap_tls
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius-mod-eap-ttls),)
    +  CONFIGURE_ARGS+= --with-rlm_eap_ttls
    +  CONFIGURE_LIBS+= -lcrypto -lssl
    +else
    +  CONFIGURE_ARGS+= --without-rlm_eap_ttls
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius-mod-attr-rewrite),)
    +  CONFIGURE_ARGS+= --with-rlm_attr-rewrite
    +else
    +  CONFIGURE_ARGS+= --without-rlm_attr-rewrite
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius-mod-radutmp),)
    +  CONFIGURE_ARGS+= --with-rlm_radutmp
    +else
    +  CONFIGURE_ARGS+= --without-rlm_radutmp
    +endif
    +
    +CONFIGURE_VARS+= \
    +	LDFLAGS="$$$$LDFLAGS -L$(PKG_INSTALL_DIR)/usr/lib/freeradius" \
    +	LIBS="$(CONFIGURE_LIBS)" \
    +	MYSQL_CONFIG="no" \
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		R="$(PKG_INSTALL_DIR)" \
    +		INSTALLSTRIP="" \
    +		all install
    +endef
    +
    +define Package/freeradius/install
    +	$(INSTALL_DIR) $(1)/etc/freeradius
    +	for f in clients.conf dictionary radiusd.conf; do \
    +		$(CP) $(PKG_INSTALL_DIR)/etc/freeradius/$$$${f} $(1)/etc/freeradius/ ; \
    +	done
    +	$(INSTALL_DIR) $(1)/usr/share/freeradius
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary $(1)/usr/share/freeradius/
    +	$(SED) "s,^\(\$$$$INCLUDE\),#\1,g" $(1)/usr/share/freeradius/dictionary
    +	for f in $(PKG_DICTIONARIES); do \
    +		$(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary.$$$${f} $(1)/usr/share/freeradius/ ; \
    +		$(SED) "s,^#\(\$$$$INCLUDE dictionary\.$$$${f}\),\1,g" $(1)/usr/share/freeradius/dictionary ; \
    +	done
    +	$(INSTALL_DIR) $(1)/usr/lib/freeradius
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius/libradius{,-*}.so $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radiusd $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/radiusd.init $(1)/etc/init.d/radiusd
    +endef
    +
    +define Package/freeradius-democerts/install
    +	$(INSTALL_DIR) $(1)/etc/freeradius
    +	$(CP) $(PKG_INSTALL_DIR)/etc/freeradius/certs $(1)/etc/freeradius/
    +	rm -rf $(1)/etc/freeradius/certs/README
    +	rm -rf $(1)/etc/freeradius/certs/new*
    +	rm -rf $(1)/etc/freeradius/certs/demoCA/index*
    +	rm -rf $(1)/etc/freeradius/certs/demoCA/serial*
    +endef
    +
    +define Package/freeradius-utils/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	for f in radclient radeapclient; do \
    +		$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$${f} $(1)/usr/bin/ ; \
    +	done
    +endef
    +
    +define BuildPlugin
    +  define Package/$(1)/install
    +	[ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib
    +	for m in $(2); do \
    +		$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius/$$$$$$$${m}{,-*}.so $$(1)/usr/lib/ ; \
    +	done
    +	[ -z "$(3)" ] || $(INSTALL_DIR) $$(1)/etc/freeradius
    +	for f in $(3); do \
    +		$(CP) $(PKG_INSTALL_DIR)/etc/freeradius/$$$$$$$${f} $$(1)/etc/freeradius/ ; \
    +	done
    +  endef
    +
    +  $$(eval $$(call BuildPackage,$(1)))
    +endef
    +
    +$(eval $(call BuildPackage,freeradius))
    +$(eval $(call BuildPackage,freeradius-democerts))
    +$(eval $(call BuildPlugin,freeradius-mod-chap,rlm_chap,))
    +$(eval $(call BuildPlugin,freeradius-mod-detail,rlm_detail,))
    +$(eval $(call BuildPlugin,freeradius-mod-eap,libeap rlm_eap,eap.conf))
    +$(eval $(call BuildPlugin,freeradius-mod-eap-gtc,rlm_eap_gtc,))
    +$(eval $(call BuildPlugin,freeradius-mod-eap-md5,rlm_eap_md5,))
    +$(eval $(call BuildPlugin,freeradius-mod-eap-mschapv2,rlm_eap_mschapv2,))
    +$(eval $(call BuildPlugin,freeradius-mod-eap-peap,rlm_eap_peap,))
    +$(eval $(call BuildPlugin,freeradius-mod-eap-tls,rlm_eap_tls,))
    +$(eval $(call BuildPlugin,freeradius-mod-eap-ttls,rlm_eap_ttls,))
    +$(eval $(call BuildPlugin,freeradius-mod-exec,rlm_exec,))
    +$(eval $(call BuildPlugin,freeradius-mod-attr-rewrite,rlm_attr_rewrite))
    +$(eval $(call BuildPlugin,freeradius-mod-files,rlm_files,acct_users preproxy_users users))
    +$(eval $(call BuildPlugin,freeradius-mod-ldap,rlm_ldap,ldap.attrmap))
    +$(eval $(call BuildPlugin,freeradius-mod-mschap,rlm_mschap,))
    +$(eval $(call BuildPlugin,freeradius-mod-pap,rlm_pap,))
    +$(eval $(call BuildPlugin,freeradius-mod-preprocess,rlm_preprocess,hints huntgroups))
    +$(eval $(call BuildPlugin,freeradius-mod-realm,rlm_realm,proxy.conf))
    +$(eval $(call BuildPlugin,freeradius-mod-sql,rlm_sql,sql.conf))
    +$(eval $(call BuildPlugin,freeradius-mod-sql-mysql,rlm_sql_mysql,))
    +$(eval $(call BuildPlugin,freeradius-mod-sql-pgsql,rlm_sql_postgresql,))
    +$(eval $(call BuildPlugin,freeradius-mod-sqlcounter,rlm_sqlcounter,))
    +$(eval $(call BuildPlugin,freeradius-mod-radutmp,rlm_radutmp,))
    +$(eval $(call BuildPackage,freeradius-utils))
    diff --git a/net/freeradius/files/radiusd.init b/net/freeradius/files/radiusd.init
    new file mode 100644
    index 0000000..df49069
    --- /dev/null
    +++ b/net/freeradius/files/radiusd.init
    @@ -0,0 +1,19 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +DEFAULT=/etc/default/radiusd
    +LOG_D=/var/log/radius
    +RUN_D=/var/run
    +PID_F=$RUN_D/radiusd.pid
    +
    +start() {
    +	[ -f $DEFAULT ] && . $DEFAULT
    +	mkdir -p $LOG_D
    +	mkdir -p $RUN_D
    +	radiusd $OPTIONS
    +}
    +
    +stop() {
    +	[ -f $PID_F ] && kill $(cat $PID_F)
    +}
    diff --git a/net/freeradius/patches/001-automake-compat.patch b/net/freeradius/patches/001-automake-compat.patch
    new file mode 100644
    index 0000000..e84ee1f
    --- /dev/null
    +++ b/net/freeradius/patches/001-automake-compat.patch
    @@ -0,0 +1,633 @@
    +--- /dev/null
    ++++ b/acinclude.m4
    +@@ -0,0 +1,626 @@
    ++# aclocal.m4
    ++# This line will prevent autoreconf from running aclocal again.
    ++# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
    ++
    ++dnl See whether we need a declaration for a function.
    ++dnl RADIUSD_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
    ++AC_DEFUN(RADIUSD_NEED_DECLARATION,
    ++[AC_MSG_CHECKING([whether $1 must be declared])
    ++AC_CACHE_VAL(radius_cv_decl_needed_$1,
    ++[AC_TRY_COMPILE([
    ++#include 
    ++#include 
    ++#ifdef HAVE_UNISTD_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_CRYPT_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_ERRNO_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_RESOURCE_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_GETOPT_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_MALLOC_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_UTMP_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_UTMPX_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_SYS_SELECT_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_DLFCN_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_REGEX_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_SYSLOG_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_INTTYPES_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_STDINT_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_ARPA_INET_H
    ++#include 
    ++#endif
    ++$2],
    ++[char *(*pfn) = (char *(*)) $1],
    ++eval "radius_cv_decl_needed_$1=no", eval "radius_cv_decl_needed_$1=yes")])
    ++if eval "test \"`echo '$radius_cv_decl_needed_'$1`\" = yes"; then
    ++  AC_MSG_RESULT(yes)
    ++  radius_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    ++  AC_DEFINE_UNQUOTED($radius_tr_decl)
    ++else
    ++  AC_MSG_RESULT(no)
    ++fi
    ++])dnl
    ++
    ++dnl Check multiple functions to see whether each needs a declaration.
    ++dnl RADIUSD_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
    ++AC_DEFUN(RADIUSD_NEED_DECLARATIONS,
    ++[for ac_func in $1
    ++do
    ++RADIUSD_NEED_DECLARATION($ac_func, $2)
    ++done
    ++])
    ++
    ++dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
    ++dnl The program must properly implement --version.
    ++AC_DEFUN(AM_MISSING_PROG,
    ++[AC_MSG_CHECKING(for working $2)
    ++# Run test in a subshell; some versions of sh will print an error if
    ++# an executable is not found, even if stderr is redirected.
    ++# Redirect stdin to placate older versions of autoconf.  Sigh.
    ++if ($2 --version) < /dev/null > /dev/null 2>&1; then
    ++   $1=$2
    ++   AC_MSG_RESULT(found)
    ++else
    ++   $1="$3/missing $2"
    ++   AC_MSG_RESULT(missing)
    ++fi
    ++AC_SUBST($1)])
    ++
    ++
    ++dnl Checks to see if this is SUNPro we're building with
    ++dnl Usage:
    ++dnl AC_PROG_CC_SUNPRO
    ++AC_DEFUN(AC_PROG_CC_SUNPRO,
    ++[AC_CACHE_CHECK(whether we are using SUNPro C, ac_cv_prog_suncc,
    ++[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
    ++cat > conftest.c </dev/null 2>&1; then
    ++  ac_cv_prog_suncc=yes
    ++else
    ++  ac_cv_prog_suncc=no
    ++fi])])
    ++
    ++dnl #
    ++dnl # AC_CHECK_TYPE_INCLUDE([#includes ...], type, default-C-types)
    ++dnl #
    ++dnl # This function is like AC_CHECK_TYPE, but you can give this one
    ++dnl # a list of include files to check.
    ++dnl #
    ++AC_DEFUN(AC_CHECK_TYPE_INCLUDE,
    ++[
    ++  AC_CACHE_CHECK(for $2, ac_cv_type_$2,
    ++    [ ac_cv_type_$2=no
    ++      AC_TRY_COMPILE($1,
    ++        [$2 foo],
    ++        ac_cv_type_$2=yes,
    ++      )
    ++    ]
    ++  )
    ++
    ++  if test "$ac_cv_type_$2" != "yes"; then
    ++         AC_DEFINE($2, $3)
    ++  fi
    ++])
    ++
    ++dnl #######################################################################
    ++dnl #
    ++dnl #  Look for SNMP in a variety of places.
    ++dnl #
    ++AC_DEFUN(SNMP_CHECKS, [
    ++	AC_SUBST(SNMP_LIBS)
    ++	AC_SUBST(SNMP_INCLUDE)
    ++
    ++AC_MSG_CHECKING([for asn1.h,snmp.h,snmp_impl.h])
    ++
    ++dnl #
    ++dnl #  First, see if we can build it WITHOUT using any special includes and in ucd-snmp
    ++dnl #
    ++AC_TRY_COMPILE([
    ++#ifdef HAVE_SYS_TYPES_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_STDINT_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_STDIO_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_NETDB_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_UNISTD_H
    ++#include 
    ++#endif
    ++#include 
    ++#include 
    ++#include 
    ++#include ],
    ++               [ int a = 1;],
    ++               SNMP_INCLUDE="";ucdsnmp=yes,
    ++               ucdsnmp=)
    ++
    ++dnl #
    ++dnl #  If not, look for it in a number of directories and in ucd-snmp.
    ++dnl #
    ++if test "x$ucdsnmp" = "x"; then
    ++  old_CFLAGS="$CFLAGS"
    ++  for try in /usr/include /usr/local/include $with_snmp_include_dir; do
    ++    CFLAGS="$old_CFLAGS -I$try"
    ++    AC_TRY_COMPILE([
    ++#ifdef HAVE_SYS_TYPES_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_STDINT_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_STDIO_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_NETDB_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_UNISTD_H
    ++#include 
    ++#endif
    ++#include 
    ++#include 
    ++#include 
    ++#include ],
    ++                   [ int a = 1;],
    ++                   SNMP_INCLUDE="-I$try";ucdsnmp=yes,
    ++                   ucdsnmp=)
    ++    if test "x$ucdsnmp" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  CFLAGS="$old_CFLAGS"
    ++fi
    ++
    ++if test "x$ucdsnmp" = "x"; then
    ++  old_CFLAGS="$CFLAGS"
    ++  for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $with_snmp_include_dir; do
    ++    CFLAGS="$old_CFLAGS -I$try"
    ++dnl #
    ++dnl #  First, see if we can build it WITHOUT using any special includes and without ucd-snmp
    ++dnl #
    ++AC_TRY_COMPILE([
    ++#ifdef HAVE_SYS_TYPES_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_STDINT_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_STDIO_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_NETDB_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_UNISTD_H
    ++#include 
    ++#endif
    ++#include 
    ++#include 
    ++#include ],
    ++               [ int a = 1;],
    ++               SNMP_INCLUDE="";ucdsnmp=no,
    ++               ucdsnmp=)
    ++    if test "x$ucdsnmp" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  CFLAGS="$old_CFLAGS"
    ++fi
    ++
    ++dnl #
    ++dnl #  If not, look for it in a number of directories and without ucd-snmp
    ++dnl #
    ++if test "x$ucdsnmp" = "x"; then
    ++  old_CFLAGS="$CFLAGS"
    ++  for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $with_snmp_include_dir; do
    ++    CFLAGS="$old_CFLAGS -I$try"
    ++    AC_TRY_COMPILE([
    ++#ifdef HAVE_SYS_TYPES_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_STDINT_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_STDIO_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_NETDB_H
    ++#include 
    ++#endif
    ++#ifdef HAVE_UNISTD_H
    ++#include 
    ++#endif
    ++#include 
    ++#include 
    ++#include ],
    ++                   [ int a = 1;],
    ++                   SNMP_INCLUDE="-I$try";ucdsnmp=no,
    ++                   ucdsnmp=)
    ++    if test "x$ucdsnmp" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  CFLAGS="$old_CFLAGS"
    ++fi
    ++
    ++if test "x$ucdsnmp" = "x"; then
    ++  AC_MSG_RESULT(no)
    ++else
    ++  if test "x$ucdsnmp" = "xyes"; then
    ++    AC_MSG_RESULT((ucd-snmp)yes)
    ++    AC_DEFINE(HAVE_UCD_SNMP_ASN1_SNMP_SNMPIMPL_H)
    ++  else
    ++    AC_MSG_RESULT(yes)
    ++    AC_DEFINE(HAVE_ASN1_SNMP_SNMPIMPL_H)
    ++  fi
    ++dnl #
    ++dnl #  Now do the same thing, looking for the SNMP library directory
    ++dnl #
    ++  AC_MSG_CHECKING([for snmp_build_var_op in -lsnmp])
    ++
    ++dnl #
    ++dnl #  First, see if we can build it WITHOUT using any special includes
    ++dnl #
    ++  old_LIBS="$LIBS"
    ++  LIBS="$old_LIBS -lsnmp"
    ++  AC_TRY_LINK([extern char snmp_build_var_op();],
    ++              [ snmp_build_var_op()],
    ++              SNMP_LIBS="-lsnmp",
    ++              SNMP_LIBS=)
    ++
    ++  if test "x$SNMP_LIBS" = "x"; then
    ++    for try in /usr/lib /usr/local/lib /usr/local/snmp/lib $with_snmp_lib_dir; do
    ++      LIBS="$old_LIBS -L$try -lsnmp"
    ++      AC_TRY_LINK([extern char snmp_build_var_op();],
    ++                  [ snmp_build_var_op()],
    ++                  SNMP_LIBS="-L$try -lsnmp",
    ++                  SNMP_LIBS=)
    ++      if test "x$SNMP_LIBS" != "x"; then
    ++        break;
    ++      fi
    ++dnl   #
    ++dnl   #  That didn't work.  Try adding the '-lcrypto' line.
    ++dnl   #  Some SNMP libraries are linked against SSL...
    ++dnl   #
    ++      LIBS="$old_LIBS -L$try -lsnmp -lcrypto"
    ++      AC_TRY_LINK([extern char snmp_build_var_op();],
    ++                  [ snmp_build_var_op()],
    ++                  SNMP_LIBS="-L$try -lsnmp -lcrypto",
    ++                  SNMP_LIBS=)
    ++      if test "x$SNMP_LIBS" != "x"; then
    ++        break;
    ++      fi
    ++dnl   #
    ++dnl   #  That didn't work.  Try adding the '-lkstat' line.
    ++dnl   #  Some SNMP libraries are linked against Kernel Statistics,
    ++dnl   #  in particular, Solaris 9...
    ++dnl   #
    ++      LIBS="$old_LIBS -L$try -lsnmp -lcrypto -lkstat"
    ++      AC_TRY_LINK([extern char snmp_build_var_op();],
    ++                  [ snmp_build_var_op()],
    ++                  SNMP_LIBS="-L$try -lsnmp -lcrypto -lkstat",
    ++                  SNMP_LIBS=)
    ++      if test "x$SNMP_LIBS" != "x"; then
    ++        break;
    ++      fi
    ++    done
    ++  fi
    ++  LIBS="$old_LIBS"
    ++
    ++  dnl #
    ++  dnl #  If one or the other isn't found, disable them both..
    ++  dnl #  If both are found, enable them both.
    ++  dnl #
    ++  CFLAGS="$old_CFLAGS"
    ++  if test "x$SNMP_LIBS" = "x"; then
    ++    AC_MSG_RESULT(no)
    ++    SNMP_INCLUDE=
    ++  else
    ++    AC_MSG_RESULT(yes)
    ++    AC_DEFINE(WITH_SNMP)
    ++    AC_DEFINE(HAVE_LIBSNMP)
    ++  fi
    ++fi
    ++])
    ++
    ++
    ++dnl #
    ++dnl #  Locate the directory in which a particular file is found.
    ++dnl #
    ++dnl #  Usage: AC_LOCATE_DIR(MYSQLLIB_DIR, libmysqlclient.a)
    ++dnl #
    ++dnl #    Defines the variable MYSQLLIB_DIR to be the directory(s) in
    ++dnl #    which the file libmysqlclient.a is to be found.
    ++dnl #
    ++dnl #
    ++AC_DEFUN(AC_LOCATE_DIR,
    ++[
    ++dnl # If we have the program 'locate', then the problem of finding a
    ++dnl # particular file becomes MUCH easier.
    ++dnl #
    ++
    ++dnl #
    ++dnl #  No 'locate' defined, do NOT do anything.
    ++dnl #
    ++if test "x$LOCATE" != "x"; then
    ++  dnl #
    ++  dnl #  Root through a series of directories, looking for the given file.
    ++  dnl #
    ++  DIRS=
    ++  file=$2
    ++
    ++  for x in `${LOCATE} $file 2>/dev/null`; do
    ++    dnl #
    ++    dnl #  When asked for 'foo', locate will also find 'foo_bar', which we
    ++    dnl #  don't want.  We want that EXACT filename.
    ++    dnl #
    ++    dnl #  We ALSO want to be able to look for files like 'mysql/mysql.h',
    ++    dnl #  and properly match them, too.  So we try to strip off the last
    ++    dnl #  part of the filename, using the name of the file we're looking
    ++    dnl #  for.  If we CANNOT strip it off, then the name will be unchanged.
    ++    dnl #
    ++    base=`echo $x | sed "s%/${file}%%"`
    ++    if test "x$x" = "x$base"; then
    ++      continue;
    ++    fi
    ++
    ++    dir=`${DIRNAME} $x 2>/dev/null`
    ++    dnl #
    ++    dnl #  Exclude a number of directories.
    ++    dnl #
    ++    exclude=`echo ${dir} | ${GREP} /home`
    ++    if test "x$exclude" != "x"; then
    ++      continue
    ++    fi
    ++
    ++    dnl #
    ++    dnl #  OK, we have an exact match.  Let's be sure that we only find ONE
    ++    dnl #  matching directory.
    ++    dnl #
    ++    already=`echo \$$1 ${DIRS} | ${GREP} ${dir}`
    ++    if test "x$already" = "x"; then
    ++      DIRS="$DIRS $dir"
    ++    fi
    ++  done
    ++fi
    ++
    ++dnl #
    ++dnl #  And remember the directory in which we found the file.
    ++dnl #
    ++eval "$1=\"\$$1 $DIRS\""
    ++])
    ++
    ++
    ++dnl #######################################################################
    ++dnl #
    ++dnl #  Look for a library in a number of places.
    ++dnl #
    ++dnl #  AC_SMART_CHECK_LIB(library, function)
    ++dnl #
    ++AC_DEFUN(AC_SMART_CHECK_LIB, [
    ++
    ++sm_lib_safe=`echo "$1" | sed 'y%./+-%__p_%'`
    ++sm_func_safe=`echo "$2" | sed 'y%./+-%__p_%'`
    ++AC_MSG_CHECKING([for $2 in -l$1])
    ++
    ++old_LIBS="$LIBS"
    ++smart_lib=
    ++smart_lib_dir=
    ++
    ++dnl #
    ++dnl #  Try first any user-specified directory, otherwise we may pick up
    ++dnl #  the wrong version.
    ++dnl #
    ++if test "x$smart_try_dir" != "x"; then
    ++  for try in $smart_try_dir; do
    ++    LIBS="-L$try -l$1 $old_LIBS"
    ++    AC_TRY_LINK([extern char $2();],
    ++		[ $2()],
    ++		smart_lib="-L$try -l$1")
    ++    if test "x$smart_lib" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  LIBS="$old_LIBS"
    ++fi
    ++
    ++dnl #
    ++dnl #  Try using the default library path.
    ++dnl #
    ++if test "x$smart_lib" = "x"; then
    ++  LIBS="-l$1 $old_LIBS"
    ++  AC_TRY_LINK([extern char $2();],
    ++	      [ $2()],
    ++	      smart_lib="-l$1")
    ++  LIBS="$old_LIBS"
    ++fi
    ++
    ++dnl #
    ++dnl #  Try to guess possible locations.
    ++dnl #
    ++if test "x$smart_lib" = "x"; then
    ++  AC_LOCATE_DIR(smart_lib_dir,[lib$1${libltdl_cv_shlibext}])
    ++  AC_LOCATE_DIR(smart_lib_dir,[lib$1.a])
    ++
    ++  for try in $smart_lib_dir /usr/local/lib /opt/lib; do
    ++    LIBS="-L$try -l$1 $old_LIBS"
    ++    AC_TRY_LINK([extern char $2();],
    ++		[ $2()],
    ++		smart_lib="-L$try -l$1")
    ++    if test "x$smart_lib" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  LIBS="$old_LIBS"
    ++fi
    ++
    ++dnl #
    ++dnl #  Found it, set the appropriate variable.
    ++dnl #
    ++if test "x$smart_lib" != "x"; then
    ++  AC_MSG_RESULT(yes)
    ++  eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
    ++  LIBS="$smart_lib $old_LIBS"
    ++  SMART_LIBS="$smart_lib $SMART_LIBS"
    ++else
    ++  AC_MSG_RESULT(no)
    ++fi
    ++])
    ++
    ++dnl #######################################################################
    ++dnl #
    ++dnl #  Look for a header file in a number of places.
    ++dnl #
    ++dnl #  AC_SMART_CHECK_INCLUDE(foo.h, [ #include  ])
    ++dnl #
    ++AC_DEFUN(AC_SMART_CHECK_INCLUDE, [
    ++
    ++ac_safe=`echo "$1" | sed 'y%./+-%__pm%'`
    ++AC_MSG_CHECKING([for $1])
    ++
    ++old_CFLAGS="$CFLAGS"
    ++smart_include=
    ++smart_include_dir=
    ++
    ++dnl #
    ++dnl #  Try first any user-specified directory, otherwise we may pick up
    ++dnl #  the wrong version.
    ++dnl #
    ++if test "x$smart_try_dir" != "x"; then
    ++  for try in $smart_try_dir; do
    ++    CFLAGS="$old_CFLAGS -I$try"
    ++    AC_TRY_COMPILE([$2
    ++		    #include <$1>],
    ++		   [ int a = 1;],
    ++		   smart_include="-I$try",
    ++		   smart_include=)
    ++    if test "x$smart_include" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  CFLAGS="$old_CFLAGS"
    ++fi
    ++
    ++dnl #
    ++dnl #  Try using the default includes
    ++dnl #
    ++if test "x$smart_include" = "x"; then
    ++  AC_TRY_COMPILE([$2
    ++		  #include <$1>],
    ++		 [ int a = 1;],
    ++		 smart_include=" ",
    ++		 smart_include=)
    ++fi
    ++
    ++dnl #
    ++dnl #  Try to guess possible locations.
    ++dnl #
    ++if test "x$smart_include" = "x"; then
    ++  AC_LOCATE_DIR(smart_include_dir,$1)
    ++
    ++  for try in $smart_include_dir /usr/local/include /opt/include; do
    ++    CFLAGS="$old_CFLAGS -I$try"
    ++    AC_TRY_COMPILE([$2
    ++		    #include <$1>],
    ++		   [ int a = 1;],
    ++		   smart_include="-I$try",
    ++		   smart_include=)
    ++    if test "x$smart_include" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  CFLAGS="$old_CFLAGS"
    ++fi
    ++
    ++dnl #
    ++dnl #  Found it, set the appropriate variable.
    ++dnl #
    ++if test "x$smart_include" != "x"; then
    ++  AC_MSG_RESULT(yes)
    ++  eval "ac_cv_header_$ac_safe=yes"
    ++  CFLAGS="$old_CFLAGS $smart_include"
    ++  SMART_CFLAGS="$SMART_CFLAGS $smart_include"
    ++else
    ++  AC_MSG_RESULT(no)
    ++fi
    ++])
    ++
    ++dnl #######################################################################
    ++dnl #
    ++dnl #  Look for a header file in a number of places.
    ++dnl #
    ++dnl #  Usage:  AC_CHECK_STRUCT_HAS_MEMBER([#include ], [struct foo], member)
    ++dnl #  If the member is defined, then the variable
    ++dnl #     ac_cv_type_struct_foo_has_member is set to 'yes'
    ++dnl #
    ++AC_DEFUN(AC_CHECK_STRUCT_HAS_MEMBER, [
    ++  AC_MSG_CHECKING([for $3 in $2])
    ++
    ++dnl BASED on 'offsetof':
    ++dnl #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
    ++dnl
    ++
    ++  AC_TRY_COMPILE([
    ++$1
    ++#ifndef offsetof
    ++#define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
    ++#endif
    ++],
    ++                 [ int foo = offsetof($2, $3) ],
    ++                 has_element=" ",
    ++                 has_element=)
    ++
    ++  ac_safe_type=`echo "$2" | sed 'y% %_%'`
    ++  if test "x$has_element" != "x"; then
    ++    AC_MSG_RESULT(yes)
    ++    eval "ac_cv_type_${ac_safe_type}_has_$3=yes"
    ++  else
    ++    AC_MSG_RESULT(no) 
    ++    eval "ac_cv_type_${ac_safe_type}_has_$3="
    ++ fi
    ++])
    ++
    ++dnl Autoconf 2.61 breaks the support for chained configure scripts
    ++dnl in combination with config.cache
    ++m4_pushdef([AC_OUTPUT],
    ++[
    ++  unset ac_cv_env_LIBS_set
    ++  unset ac_cv_env_LIBS_value
    ++  m4_popdef([AC_OUTPUT])
    ++  AC_OUTPUT([$1],[$2],[$3])
    ++])
    +--- /dev/null
    ++++ b/Makefile.am
    +@@ -0,0 +1 @@
    ++SUBDIRS = libltdl src raddb scripts doc
    diff --git a/net/freeradius/patches/002-config.patch b/net/freeradius/patches/002-config.patch
    new file mode 100644
    index 0000000..83c7d0b
    --- /dev/null
    +++ b/net/freeradius/patches/002-config.patch
    @@ -0,0 +1,300 @@
    +--- a/raddb/eap.conf
    ++++ b/raddb/eap.conf
    +@@ -73,8 +73,8 @@
    + 		#  User-Password, or the NT-Password attributes.
    + 		#  'System' authentication is impossible with LEAP.
    + 		#
    +-		leap {
    +-		}
    ++#		leap {
    ++#		}
    + 
    + 		#  Generic Token Card.
    + 		#
    +@@ -87,7 +87,7 @@
    + 		#  the users password will go over the wire in plain-text,
    + 		#  for anyone to see.
    + 		#
    +-		gtc {
    ++#		gtc {
    + 			#  The default challenge, which many clients
    + 			#  ignore..
    + 			#challenge = "Password: "
    +@@ -104,8 +104,8 @@
    + 			#  configured for the request, and do the
    + 			#  authentication itself.
    + 			#
    +-			auth_type = PAP
    +-		}
    ++#			auth_type = PAP
    ++#		}
    + 
    + 		## EAP-TLS
    + 		#
    +@@ -336,7 +336,7 @@
    + 		#  of MS-CHAPv2 in EAP by Cisco, which FreeRADIUS does not
    + 		#  currently support.
    + 		#
    +-		mschapv2 {
    +-		}
    ++#		mschapv2 {
    ++#		}
    + 	}
    + 
    +--- a/raddb/radiusd.conf.in
    ++++ b/raddb/radiusd.conf.in
    +@@ -31,13 +31,13 @@ radacctdir = @radacctdir@
    + 
    + #  Location of config and logfiles.
    + confdir = ${raddbdir}
    +-run_dir = ${localstatedir}/run/radiusd
    ++run_dir = ${localstatedir}/run
    + 
    + #
    + #  The logging messages for the server are appended to the
    + #  tail of this file.
    + #
    +-log_file = ${logdir}/radius.log
    ++log_file = ${logdir}/radiusd.log
    + 
    + #
    + # libdir: Where to find the rlm_* modules.
    +@@ -353,7 +353,7 @@ nospace_user = no
    + nospace_pass = no
    + 
    + #  The program to execute to do concurrency checks.
    +-checkrad = ${sbindir}/checkrad
    ++#checkrad = ${sbindir}/checkrad
    + 
    + # SECURITY CONFIGURATION
    + #
    +@@ -425,8 +425,8 @@ security {
    + #
    + #  allowed values: {no, yes}
    + #
    +-proxy_requests  = yes
    +-$INCLUDE  ${confdir}/proxy.conf
    ++proxy_requests  = no
    ++#$INCLUDE  ${confdir}/proxy.conf
    + 
    + 
    + # CLIENTS CONFIGURATION
    +@@ -454,7 +454,7 @@ $INCLUDE  ${confdir}/clients.conf
    + #  'snmp' attribute to 'yes'
    + #
    + snmp	= no
    +-$INCLUDE  ${confdir}/snmp.conf
    ++#$INCLUDE  ${confdir}/snmp.conf
    + 
    + 
    + # THREAD POOL CONFIGURATION
    +@@ -665,7 +665,7 @@ modules {
    + 	#  For all EAP related authentications.
    + 	#  Now in another file, because it is very large.
    + 	#
    +-$INCLUDE ${confdir}/eap.conf
    ++#$INCLUDE ${confdir}/eap.conf
    + 
    + 	# Microsoft CHAP authentication
    + 	#
    +@@ -1066,8 +1066,8 @@ $INCLUDE ${confdir}/eap.conf
    + 	#
    + 	files {
    + 		usersfile = ${confdir}/users
    +-		acctusersfile = ${confdir}/acct_users
    +-		preproxy_usersfile = ${confdir}/preproxy_users
    ++#		acctusersfile = ${confdir}/acct_users
    ++#		preproxy_usersfile = ${confdir}/preproxy_users
    + 
    + 		#  If you want to use the old Cistron 'users' file
    + 		#  with FreeRADIUS, you should change the next line
    +@@ -1253,7 +1253,7 @@ $INCLUDE ${confdir}/eap.conf
    + 	#  For MS-SQL, use:	 	${confdir}/mssql.conf
    + 	#  For Oracle, use:	 	${confdir}/oraclesql.conf
    + 	#
    +-	$INCLUDE  ${confdir}/sql.conf
    ++#	$INCLUDE  ${confdir}/sql.conf
    + 
    + 
    + 	#  For Cisco VoIP specific accounting with Postgresql,
    +@@ -1756,7 +1756,7 @@ instantiate {
    + 	#  The entire command line (and output) must fit into 253 bytes.
    + 	#
    + 	#  e.g. Framed-Pool = `%{exec:/bin/echo foo}`
    +-	exec
    ++#	exec
    + 
    + 	#
    + 	#  The expression module doesn't do authorization,
    +@@ -1769,7 +1769,7 @@ instantiate {
    + 	#  listed in any other section.  See 'doc/rlm_expr' for
    + 	#  more information.
    + 	#
    +-	expr
    ++#	expr
    + 
    + 	#
    + 	# We add the counter module here so that it registers
    +@@ -1796,7 +1796,7 @@ authorize {
    + 	#  'raddb/huntgroups' files.
    + 	#
    + 	#  It also adds the %{Client-IP-Address} attribute to the request.
    +-	preprocess
    ++#	preprocess
    + 
    + 	#
    + 	#  If you want to have a log of authentication requests,
    +@@ -1809,7 +1809,7 @@ authorize {
    + 	#
    + 	#  The chap module will set 'Auth-Type := CHAP' if we are
    + 	#  handling a CHAP request and Auth-Type has not already been set
    +-	chap
    ++#	chap
    + 
    + 	#
    + 	#  If the users are logging in with an MS-CHAP-Challenge
    +@@ -1837,7 +1837,7 @@ authorize {
    + 	#  Otherwise, when the first style of realm doesn't match,
    + 	#  the other styles won't be checked.
    + 	#
    +-	suffix
    ++#	suffix
    + #	ntdomain
    + 
    + 	#
    +@@ -1846,11 +1846,11 @@ authorize {
    + 	#
    + 	#  It also sets the EAP-Type attribute in the request
    + 	#  attribute list to the EAP type from the packet.
    +-	eap
    ++#	eap
    + 
    + 	#
    + 	#  Read the 'users' file
    +-	files
    ++#	files
    + 
    + 	#
    + 	#  Look in an SQL database.  The schema of the database
    +@@ -1909,24 +1909,24 @@ authenticate {
    + 	#  PAP authentication, when a back-end database listed
    + 	#  in the 'authorize' section supplies a password.  The
    + 	#  password can be clear-text, or encrypted.
    +-	Auth-Type PAP {
    +-		pap
    +-	}
    ++#	Auth-Type PAP {
    ++#		pap
    ++#	}
    + 
    + 	#
    + 	#  Most people want CHAP authentication
    + 	#  A back-end database listed in the 'authorize' section
    + 	#  MUST supply a CLEAR TEXT password.  Encrypted passwords
    + 	#  won't work.
    +-	Auth-Type CHAP {
    +-		chap
    +-	}
    ++#	Auth-Type CHAP {
    ++#		chap
    ++#	}
    + 
    + 	#
    + 	#  MSCHAP authentication.
    +-	Auth-Type MS-CHAP {
    +-		mschap
    +-	}
    ++#	Auth-Type MS-CHAP {
    ++#		mschap
    ++#	}
    + 
    + 	#
    + 	#  If you have a Cisco SIP server authenticating against
    +@@ -1944,7 +1944,7 @@ authenticate {
    + 	#  containing CHAP-Password attributes CANNOT be authenticated
    + 	#  against /etc/passwd!  See the FAQ for details.
    + 	#  
    +-	unix
    ++#	unix
    + 
    + 	# Uncomment it if you want to use ldap for authentication
    + 	#
    +@@ -1957,7 +1957,7 @@ authenticate {
    + 
    + 	#
    + 	#  Allow EAP authentication.
    +-	eap
    ++#	eap
    + }
    + 
    + 
    +@@ -1965,12 +1965,12 @@ authenticate {
    + #  Pre-accounting.  Decide which accounting type to use.
    + #
    + preacct {
    +-	preprocess
    ++#	preprocess
    + 
    + 	#
    + 	#  Ensure that we have a semi-unique identifier for every
    + 	#  request, and many NAS boxes are broken.
    +-	acct_unique
    ++#	acct_unique
    + 
    + 	#
    + 	#  Look for IPASS-style 'realm/', and if not found, look for
    +@@ -1980,12 +1980,12 @@ preacct {
    + 	#  Accounting requests are generally proxied to the same
    + 	#  home server as authentication requests.
    + #	IPASS
    +-	suffix
    ++#	suffix
    + #	ntdomain
    + 
    + 	#
    + 	#  Read the 'acct_users' file
    +-	files
    ++#	files
    + }
    + 
    + #
    +@@ -1996,20 +1996,20 @@ accounting {
    + 	#  Create a 'detail'ed log of the packets.
    + 	#  Note that accounting requests which are proxied
    + 	#  are also logged in the detail file.
    +-	detail
    ++#	detail
    + #	daily
    + 
    + 	#  Update the wtmp file
    + 	#
    + 	#  If you don't use "radlast", you can delete this line.
    +-	unix
    ++#	unix
    + 
    + 	#
    + 	#  For Simultaneous-Use tracking.
    + 	#
    + 	#  Due to packet losses in the network, the data here
    + 	#  may be incorrect.  There is little we can do about it.
    +-	radutmp
    ++#	radutmp
    + #	sradutmp
    + 
    + 	#  Return an address to the IP Pool when we see a stop record.
    +@@ -2038,7 +2038,7 @@ accounting {
    + #  or rlm_sql module can handle this.
    + #  The rlm_sql module is *much* faster
    + session {
    +-	radutmp
    ++#	radutmp
    + 
    + 	#
    + 	#  See "Simultaneous Use Checking Querie" in sql.conf
    +@@ -2142,5 +2142,5 @@ post-proxy {
    + 	#  hidden inside of the EAP packet, and the end server will
    + 	#  reject the EAP request.
    + 	#
    +-	eap
    ++#	eap
    + }
    diff --git a/net/freeradius/patches/004-ldap_configure.patch b/net/freeradius/patches/004-ldap_configure.patch
    new file mode 100644
    index 0000000..217f504
    --- /dev/null
    +++ b/net/freeradius/patches/004-ldap_configure.patch
    @@ -0,0 +1,4152 @@
    +--- a/src/modules/rlm_ldap/configure
    ++++ b/src/modules/rlm_ldap/configure
    +@@ -1,10 +1,10 @@
    + #! /bin/sh
    +-# From configure.in Revision: 1.10.2.4 .
    ++# From configure.in Revision.
    + # Guess values for system-dependent variables and create Makefiles.
    +-# Generated by GNU Autoconf 2.61.
    ++# Generated by GNU Autoconf 2.63.
    + #
    + # 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.
    + ## --------------------- ##
    +@@ -16,7 +16,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
    +@@ -38,17 +38,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.
    +@@ -64,8 +92,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.
    +@@ -88,7 +114,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
    + 
    +@@ -101,17 +127,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 &&
    +@@ -133,7 +152,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
    +@@ -159,7 +178,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)
    + }
    +@@ -241,7 +260,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
    +@@ -262,7 +281,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
    +@@ -342,10 +361,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
    + 
    + 
    +@@ -414,9 +433,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.
    + }
    + 
    + 
    +@@ -452,7 +472,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
    +@@ -480,7 +500,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
    +@@ -493,19 +512,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
    +@@ -530,10 +552,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
    +@@ -578,57 +600,65 @@ PACKAGE_STRING=
    + PACKAGE_BUGREPORT=
    + 
    + ac_unique_file="rlm_ldap.c"
    +-ac_subst_vars='SHELL
    +-PATH_SEPARATOR
    +-PACKAGE_NAME
    +-PACKAGE_TARNAME
    +-PACKAGE_VERSION
    +-PACKAGE_STRING
    +-PACKAGE_BUGREPORT
    +-exec_prefix
    +-prefix
    +-program_transform_name
    +-bindir
    +-sbindir
    +-libexecdir
    +-datarootdir
    +-datadir
    +-sysconfdir
    +-sharedstatedir
    +-localstatedir
    +-includedir
    +-oldincludedir
    +-docdir
    +-infodir
    +-htmldir
    +-dvidir
    +-pdfdir
    +-psdir
    +-libdir
    +-localedir
    +-mandir
    +-DEFS
    +-ECHO_C
    +-ECHO_N
    +-ECHO_T
    +-LIBS
    +-build_alias
    +-host_alias
    +-target_alias
    +-CC
    +-CFLAGS
    +-LDFLAGS
    +-CPPFLAGS
    +-ac_ct_CC
    +-EXEEXT
    +-OBJEXT
    +-edir
    +-ldap_ldflags
    +-ldap_cflags
    +-targetname
    ++ac_subst_vars='LTLIBOBJS
    + LIBOBJS
    +-LTLIBOBJS'
    ++targetname
    ++ldap_cflags
    ++ldap_ldflags
    ++edir
    ++OBJEXT
    ++EXEEXT
    ++ac_ct_CC
    ++CPPFLAGS
    ++LDFLAGS
    ++CFLAGS
    ++CC
    ++target_alias
    ++host_alias
    ++build_alias
    ++LIBS
    ++ECHO_T
    ++ECHO_N
    ++ECHO_C
    ++DEFS
    ++mandir
    ++localedir
    ++libdir
    ++psdir
    ++pdfdir
    ++dvidir
    ++htmldir
    ++infodir
    ++docdir
    ++oldincludedir
    ++includedir
    ++localstatedir
    ++sharedstatedir
    ++sysconfdir
    ++datadir
    ++datarootdir
    ++libexecdir
    ++sbindir
    ++bindir
    ++program_transform_name
    ++prefix
    ++exec_prefix
    ++PACKAGE_BUGREPORT
    ++PACKAGE_STRING
    ++PACKAGE_VERSION
    ++PACKAGE_TARNAME
    ++PACKAGE_NAME
    ++PATH_SEPARATOR
    ++SHELL'
    + ac_subst_files=''
    ++ac_user_opts='
    ++enable_option_checking
    ++with_rlm_ldap_lib_dir
    ++with_rlm_ldap_include_dir
    ++enable_shared
    ++with_threads
    ++with_edir
    ++'
    +       ac_precious_vars='build_alias
    + host_alias
    + target_alias
    +@@ -642,6 +672,8 @@ CPPFLAGS'
    + # 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
    +@@ -740,13 +772,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 ;;
    +@@ -759,13 +799,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- \
    +@@ -956,22 +1004,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.
    +@@ -991,7 +1055,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; }; }
    +     ;;
    +@@ -1000,16 +1064,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}
    +     ;;
    + 
    +@@ -1018,22 +1082,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
    + 
    +@@ -1048,7 +1128,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
    +@@ -1064,10 +1144,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; }; }
    + 
    + 
    +@@ -1075,12 +1155,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
    +@@ -1107,12 +1187,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=.
    +@@ -1161,9 +1241,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
    +@@ -1173,25 +1253,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
    +@@ -1203,6 +1283,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]
    +   --enable-shared[=PKGS]  build shared libraries [default=yes]
    +@@ -1234,15 +1315,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/ ;;
    +@@ -1278,7 +1361,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
    +@@ -1288,10 +1371,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.63
    + 
    + 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
    +@@ -1302,7 +1385,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.63.  Invocation command line was
    + 
    +   $ $0 $@
    + 
    +@@ -1338,7 +1421,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
    + 
    +@@ -1373,7 +1456,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'" ;;
    +@@ -1425,11 +1508,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
    +@@ -1459,9 +1543,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
    + 
    +@@ -1476,9 +1560,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
    +@@ -1494,8 +1578,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 &&
    +@@ -1537,21 +1621,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
    +@@ -1561,16 +1648,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
    + 
    +@@ -1584,29 +1671,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
    +@@ -1616,10 +1712,12 @@ 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: in \`$ac_pwd':" >&5
    ++$as_echo "$as_me: error: in \`$ac_pwd':" >&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
    + 
    +@@ -1662,10 +1760,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.
    +@@ -1678,7 +1776,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
    +@@ -1689,11 +1787,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
    + 
    + 
    +@@ -1702,10 +1800,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.
    +@@ -1718,7 +1816,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
    +@@ -1729,11 +1827,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
    +@@ -1741,12 +1839,8 @@ fi
    +   else
    +     case $cross_compiling:$ac_tool_warned in
    + yes:)
    +-{ 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
    +-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;}
    ++{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
    ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    + ac_tool_warned=yes ;;
    + esac
    +     CC=$ac_ct_CC
    +@@ -1759,10 +1853,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.
    +@@ -1775,7 +1869,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
    +@@ -1786,11 +1880,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
    + 
    + 
    +@@ -1799,10 +1893,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.
    +@@ -1820,7 +1914,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
    +@@ -1843,11 +1937,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
    + 
    + 
    +@@ -1858,10 +1952,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.
    +@@ -1874,7 +1968,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
    +@@ -1885,11 +1979,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
    + 
    + 
    +@@ -1902,10 +1996,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.
    +@@ -1918,7 +2012,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
    +@@ -1929,11 +2023,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
    + 
    + 
    +@@ -1945,12 +2039,8 @@ done
    +   else
    +     case $cross_compiling:$ac_tool_warned in
    + yes:)
    +-{ 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
    +-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;}
    ++{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
    ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    + ac_tool_warned=yes ;;
    + esac
    +     CC=$ac_ct_CC
    +@@ -1960,44 +2050,50 @@ 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: in \`$ac_pwd':" >&5
    ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    ++{ { $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; }; }
    ++   { (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
    +@@ -2016,27 +2112,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
    +@@ -2047,10 +2138,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'
    +@@ -2061,7 +2153,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
    +@@ -2088,25 +2180,27 @@ 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: in \`$ac_pwd':" >&5
    ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    ++{ { $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; }; }
    ++   { (exit 77); exit 77; }; }; }
    + fi
    + 
    + 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
    +@@ -2115,49 +2209,53 @@ 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: in \`$ac_pwd':" >&5
    ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    ++{ { $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; }; }
    ++   { (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
    +@@ -2166,31 +2264,33 @@ 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: in \`$ac_pwd':" >&5
    ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    ++{ { $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; }; }
    ++   { (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.  */
    +@@ -2213,40 +2313,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_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: in \`$ac_pwd':" >&5
    ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    ++{ { $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; }; }
    ++   { (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.  */
    +@@ -2272,20 +2375,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
    +@@ -2295,15 +2399,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
    +@@ -2330,20 +2438,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=""
    +@@ -2368,20 +2477,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
    +@@ -2407,20 +2517,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
    + 
    + 
    +@@ -2435,8 +2546,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
    +@@ -2452,10 +2563,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
    +@@ -2526,20 +2637,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
    + 
    + 
    +@@ -2555,15 +2667,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
    + 
    + 
    +@@ -2581,8 +2693,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
    + if test "${with_rlm_ldap_lib_dir+set}" = set; then
    +   withval=$with_rlm_ldap_lib_dir;  case "$withval" in
    + 	    no)
    +-		{ { echo "$as_me:$LINENO: error: Need rlm-ldap-lib-dir" >&5
    +-echo "$as_me: error: Need rlm-ldap-lib-dir" >&2;}
    ++		{ { $as_echo "$as_me:$LINENO: error: Need rlm-ldap-lib-dir" >&5
    ++$as_echo "$as_me: error: Need rlm-ldap-lib-dir" >&2;}
    +    { (exit 1); exit 1; }; }
    + 		;;
    + 	    yes)
    +@@ -2601,8 +2713,8 @@ fi
    + if test "${with_rlm_ldap_include_dir+set}" = set; then
    +   withval=$with_rlm_ldap_include_dir;  case "$withval" in
    + 	    no)
    +-		{ { echo "$as_me:$LINENO: error: Need rlm-ldap-include-dir" >&5
    +-echo "$as_me: error: Need rlm-ldap-include-dir" >&2;}
    ++		{ { $as_echo "$as_me:$LINENO: error: Need rlm-ldap-include-dir" >&5
    ++$as_echo "$as_me: error: Need rlm-ldap-include-dir" >&2;}
    +    { (exit 1); exit 1; }; }
    + 		;;
    + 	    yes)
    +@@ -2641,8 +2753,8 @@ fi
    + 
    + 
    + 				if test "x$enable_shared" = "xno"; then
    +-		{ echo "$as_me:$LINENO: WARNING: Static linking with libldap will probably result in unresolved symbols." >&5
    +-echo "$as_me: WARNING: Static linking with libldap will probably result in unresolved symbols." >&2;}
    ++		{ $as_echo "$as_me:$LINENO: WARNING: Static linking with libldap will probably result in unresolved symbols." >&5
    ++$as_echo "$as_me: WARNING: Static linking with libldap will probably result in unresolved symbols." >&2;}
    + 	fi
    + 
    + 		rlm_ldap_with_threads=yes
    +@@ -2661,10 +2773,10 @@ fi
    + 
    + 
    + 			if test "x$rlm_ldap_with_threads" = "xyes"; then
    +-	    { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
    +-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
    ++	    { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
    ++$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
    + if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
    +-  echo $ECHO_N "(cached) $ECHO_C" >&6
    ++  $as_echo_n "(cached) " >&6
    + else
    +   ac_check_lib_save_LIBS=$LIBS
    + LIBS="-lpthread  $LIBS"
    +@@ -2696,39 +2808,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_pthread_pthread_create=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_pthread_pthread_create=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_pthread_pthread_create" >&5
    +-echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
    +-if test $ac_cv_lib_pthread_pthread_create = yes; then
    ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
    ++$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
    ++if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then
    +    LIBS="-lpthread $LIBS"
    + else
    +-  { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
    +-echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
    ++  { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
    ++$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
    + if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
    +-  echo $ECHO_N "(cached) $ECHO_C" >&6
    ++  $as_echo_n "(cached) " >&6
    + else
    +   ac_check_lib_save_LIBS=$LIBS
    + LIBS="-lc_r  $LIBS"
    +@@ -2761,33 +2877,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
    +   ac_cv_lib_c_r_pthread_create=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_c_r_pthread_create=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_c_r_pthread_create" >&5
    +-echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
    +-if test $ac_cv_lib_c_r_pthread_create = yes; then
    ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
    ++$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
    ++if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then
    +    LIBS="-lc_r $LIBS"
    + else
    +    rlm_ldap_with_threads="no"
    +@@ -2800,13 +2920,13 @@ fi
    + 	fi
    + 
    + 				smart_try_dir=$rlm_ldap_lib_dir
    +-	if test "x$rlm_ldap_with_threads" = "xyes"; then
    + 
    + 
    +-sm_lib_safe=`echo "ldap_r" | sed 'y%./+-%__p_%'`
    +-sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
    +-{ echo "$as_me:$LINENO: checking for ldap_init in -lldap_r" >&5
    +-echo $ECHO_N "checking for ldap_init in -lldap_r... $ECHO_C" >&6; }
    ++
    ++sm_lib_safe=`echo "sasl" | sed 'y%./+-%__p_%'`
    ++sm_func_safe=`echo "sasl_encode" | sed 'y%./+-%__p_%'`
    ++{ $as_echo "$as_me:$LINENO: checking for sasl_encode in -lsasl" >&5
    ++$as_echo_n "checking for sasl_encode in -lsasl... " >&6; }
    + 
    + old_LIBS="$LIBS"
    + smart_lib=
    +@@ -2814,18 +2934,18 @@ smart_lib_dir=
    + 
    + if test "x$smart_try_dir" != "x"; then
    +   for try in $smart_try_dir; do
    +-    LIBS="-L$try -lldap_r $old_LIBS"
    ++    LIBS="-L$try -lsasl $old_LIBS"
    +     cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-extern char ldap_init();
    ++extern char sasl_encode();
    + int
    + main ()
    + {
    +- ldap_init()
    ++ sasl_encode()
    +   ;
    +   return 0;
    + }
    +@@ -2836,26 +2956,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
    +-  smart_lib="-L$try -lldap_r"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -lsasl"
    + 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 "x$smart_lib" != "x"; then
    +@@ -2866,18 +2990,18 @@ rm -f core conftest.err conftest.$ac_obj
    + fi
    + 
    + if test "x$smart_lib" = "x"; then
    +-  LIBS="-lldap_r $old_LIBS"
    ++  LIBS="-lsasl $old_LIBS"
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-extern char ldap_init();
    ++extern char sasl_encode();
    + int
    + main ()
    + {
    +- ldap_init()
    ++ sasl_encode()
    +   ;
    +   return 0;
    + }
    +@@ -2888,26 +3012,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
    +-  smart_lib="-lldap_r"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-lsasl"
    + 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
    +   LIBS="$old_LIBS"
    +@@ -2918,7 +3046,7 @@ if test "x$smart_lib" = "x"; then
    + 
    + if test "x$LOCATE" != "x"; then
    +         DIRS=
    +-  file=libldap_r${libltdl_cv_shlibext}
    ++  file=libsasl${libltdl_cv_shlibext}
    + 
    +   for x in `${LOCATE} $file 2>/dev/null`; do
    +                                         base=`echo $x | sed "s%/${file}%%"`
    +@@ -2945,7 +3073,7 @@ eval "smart_lib_dir=\"\$smart_lib_dir $D
    + 
    + if test "x$LOCATE" != "x"; then
    +         DIRS=
    +-  file=libldap_r.a
    ++  file=libsasl.a
    + 
    +   for x in `${LOCATE} $file 2>/dev/null`; do
    +                                         base=`echo $x | sed "s%/${file}%%"`
    +@@ -2970,18 +3098,18 @@ eval "smart_lib_dir=\"\$smart_lib_dir $D
    + 
    + 
    +   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
    +-    LIBS="-L$try -lldap_r $old_LIBS"
    ++    LIBS="-L$try -lsasl $old_LIBS"
    +     cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-extern char ldap_init();
    ++extern char sasl_encode();
    + int
    + main ()
    + {
    +- ldap_init()
    ++ sasl_encode()
    +   ;
    +   return 0;
    + }
    +@@ -2992,26 +3120,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
    +-  smart_lib="-L$try -lldap_r"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -lsasl"
    + 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 "x$smart_lib" != "x"; then
    +@@ -3022,26 +3154,22 @@ rm -f core conftest.err conftest.$ac_obj
    + fi
    + 
    + if test "x$smart_lib" != "x"; 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; }
    +   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
    +   LIBS="$smart_lib $old_LIBS"
    +   SMART_LIBS="$smart_lib $SMART_LIBS"
    + 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_cv_lib_ldap_r_ldap_init" != "xyes"; then
    +-		fail="$fail libldap_r"
    +-	    fi
    +-	else
    + 
    + 
    +-sm_lib_safe=`echo "ldap" | sed 'y%./+-%__p_%'`
    +-sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
    +-{ echo "$as_me:$LINENO: checking for ldap_init in -lldap" >&5
    +-echo $ECHO_N "checking for ldap_init in -lldap... $ECHO_C" >&6; }
    ++sm_lib_safe=`echo "lber" | sed 'y%./+-%__p_%'`
    ++sm_func_safe=`echo "ber_init" | sed 'y%./+-%__p_%'`
    ++{ $as_echo "$as_me:$LINENO: checking for ber_init in -llber" >&5
    ++$as_echo_n "checking for ber_init in -llber... " >&6; }
    + 
    + old_LIBS="$LIBS"
    + smart_lib=
    +@@ -3049,18 +3177,18 @@ smart_lib_dir=
    + 
    + if test "x$smart_try_dir" != "x"; then
    +   for try in $smart_try_dir; do
    +-    LIBS="-L$try -lldap $old_LIBS"
    ++    LIBS="-L$try -llber $old_LIBS"
    +     cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-extern char ldap_init();
    ++extern char ber_init();
    + int
    + main ()
    + {
    +- ldap_init()
    ++ ber_init()
    +   ;
    +   return 0;
    + }
    +@@ -3071,26 +3199,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
    +-  smart_lib="-L$try -lldap"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -llber"
    + 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 "x$smart_lib" != "x"; then
    +@@ -3101,18 +3233,18 @@ rm -f core conftest.err conftest.$ac_obj
    + fi
    + 
    + if test "x$smart_lib" = "x"; then
    +-  LIBS="-lldap $old_LIBS"
    ++  LIBS="-llber $old_LIBS"
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-extern char ldap_init();
    ++extern char ber_init();
    + int
    + main ()
    + {
    +- ldap_init()
    ++ ber_init()
    +   ;
    +   return 0;
    + }
    +@@ -3123,26 +3255,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
    +-  smart_lib="-lldap"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-llber"
    + 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
    +   LIBS="$old_LIBS"
    +@@ -3153,7 +3289,7 @@ if test "x$smart_lib" = "x"; then
    + 
    + if test "x$LOCATE" != "x"; then
    +         DIRS=
    +-  file=libldap${libltdl_cv_shlibext}
    ++  file=liblber${libltdl_cv_shlibext}
    + 
    +   for x in `${LOCATE} $file 2>/dev/null`; do
    +                                         base=`echo $x | sed "s%/${file}%%"`
    +@@ -3180,7 +3316,7 @@ eval "smart_lib_dir=\"\$smart_lib_dir $D
    + 
    + if test "x$LOCATE" != "x"; then
    +         DIRS=
    +-  file=libldap.a
    ++  file=liblber.a
    + 
    +   for x in `${LOCATE} $file 2>/dev/null`; do
    +                                         base=`echo $x | sed "s%/${file}%%"`
    +@@ -3205,18 +3341,18 @@ eval "smart_lib_dir=\"\$smart_lib_dir $D
    + 
    + 
    +   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
    +-    LIBS="-L$try -lldap $old_LIBS"
    ++    LIBS="-L$try -llber $old_LIBS"
    +     cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-extern char ldap_init();
    ++extern char ber_init();
    + int
    + main ()
    + {
    +- ldap_init()
    ++ ber_init()
    +   ;
    +   return 0;
    + }
    +@@ -3227,26 +3363,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
    +-  smart_lib="-L$try -lldap"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -llber"
    + 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 "x$smart_lib" != "x"; then
    +@@ -3257,136 +3397,144 @@ rm -f core conftest.err conftest.$ac_obj
    + fi
    + 
    + if test "x$smart_lib" != "x"; 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; }
    +   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
    +   LIBS="$smart_lib $old_LIBS"
    +   SMART_LIBS="$smart_lib $SMART_LIBS"
    + 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_cv_lib_ldap_ldap_init" != "xyes"; then
    +-		fail="$fail libldap"
    +-	    fi
    +-	fi
    +-
    + 
    +-	smart_try_dir=$rlm_ldap_include_dir
    ++	if test "x$rlm_ldap_with_threads" = "xyes"; then
    + 
    + 
    +-ac_safe=`echo "ldap.h" | sed 'y%./+-%__pm%'`
    +-{ echo "$as_me:$LINENO: checking for ldap.h" >&5
    +-echo $ECHO_N "checking for ldap.h... $ECHO_C" >&6; }
    ++sm_lib_safe=`echo "ldap_r" | sed 'y%./+-%__p_%'`
    ++sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
    ++{ $as_echo "$as_me:$LINENO: checking for ldap_init in -lldap_r" >&5
    ++$as_echo_n "checking for ldap_init in -lldap_r... " >&6; }
    + 
    +-old_CFLAGS="$CFLAGS"
    +-smart_include=
    +-smart_include_dir=
    ++old_LIBS="$LIBS"
    ++smart_lib=
    ++smart_lib_dir=
    + 
    + if test "x$smart_try_dir" != "x"; then
    +   for try in $smart_try_dir; do
    +-    CFLAGS="$old_CFLAGS -I$try"
    ++    LIBS="-L$try -lldap_r $old_LIBS"
    +     cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-
    +-		    #include 
    ++extern char ldap_init();
    + int
    + main ()
    + {
    +- int a = 1;
    ++ ldap_init()
    +   ;
    +   return 0;
    + }
    + _ACEOF
    +-rm -f conftest.$ac_objext
    +-if { (ac_try="$ac_compile"
    ++rm -f conftest.$ac_objext conftest$ac_exeext
    ++if { (ac_try="$ac_link"
    + case "(($ac_try" in
    +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    +   *) ac_try_echo=$ac_try;;
    + esac
    +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    +-  (eval "$ac_compile") 2>conftest.er1
    ++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_objext; then
    +-  smart_include="-I$try"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -lldap_r"
    + else
    +-  echo "$as_me: failed program was:" >&5
    ++  $as_echo "$as_me: failed program was:" >&5
    + sed 's/^/| /' conftest.$ac_ext >&5
    + 
    +-	smart_include=
    ++
    + fi
    + 
    +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    +-    if test "x$smart_include" != "x"; then
    ++rm -rf conftest.dSYM
    ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
    ++      conftest$ac_exeext conftest.$ac_ext
    ++    if test "x$smart_lib" != "x"; then
    +       break;
    +     fi
    +   done
    +-  CFLAGS="$old_CFLAGS"
    ++  LIBS="$old_LIBS"
    + fi
    + 
    +-if test "x$smart_include" = "x"; then
    ++if test "x$smart_lib" = "x"; then
    ++  LIBS="-lldap_r $old_LIBS"
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-
    +-		  #include 
    ++extern char ldap_init();
    + int
    + main ()
    + {
    +- int a = 1;
    ++ ldap_init()
    +   ;
    +   return 0;
    + }
    + _ACEOF
    +-rm -f conftest.$ac_objext
    +-if { (ac_try="$ac_compile"
    ++rm -f conftest.$ac_objext conftest$ac_exeext
    ++if { (ac_try="$ac_link"
    + case "(($ac_try" in
    +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    +   *) ac_try_echo=$ac_try;;
    + esac
    +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    +-  (eval "$ac_compile") 2>conftest.er1
    ++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_objext; then
    +-  smart_include=" "
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-lldap_r"
    + else
    +-  echo "$as_me: failed program was:" >&5
    ++  $as_echo "$as_me: failed program was:" >&5
    + sed 's/^/| /' conftest.$ac_ext >&5
    + 
    +-	smart_include=
    ++
    + fi
    + 
    +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ++rm -rf conftest.dSYM
    ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
    ++      conftest$ac_exeext conftest.$ac_ext
    ++  LIBS="$old_LIBS"
    + fi
    + 
    +-if test "x$smart_include" = "x"; then
    ++if test "x$smart_lib" = "x"; then
    + 
    + 
    + if test "x$LOCATE" != "x"; then
    +         DIRS=
    +-  file=ldap.h
    ++  file=libldap_r${libltdl_cv_shlibext}
    + 
    +   for x in `${LOCATE} $file 2>/dev/null`; do
    +                                         base=`echo $x | sed "s%/${file}%%"`
    +@@ -3400,20 +3548,506 @@ if test "x$LOCATE" != "x"; then
    +       continue
    +     fi
    + 
    +-                    already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
    ++                    already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
    +     if test "x$already" = "x"; then
    +       DIRS="$DIRS $dir"
    +     fi
    +   done
    + fi
    + 
    +-eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
    ++eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
    + 
    + 
    +-  for try in $smart_include_dir /usr/local/include /opt/include; do
    +-    CFLAGS="$old_CFLAGS -I$try"
    +-    cat >conftest.$ac_ext <<_ACEOF
    +-/* confdefs.h.  */
    ++
    ++if test "x$LOCATE" != "x"; then
    ++        DIRS=
    ++  file=libldap_r.a
    ++
    ++  for x in `${LOCATE} $file 2>/dev/null`; do
    ++                                        base=`echo $x | sed "s%/${file}%%"`
    ++    if test "x$x" = "x$base"; then
    ++      continue;
    ++    fi
    ++
    ++    dir=`${DIRNAME} $x 2>/dev/null`
    ++                exclude=`echo ${dir} | ${GREP} /home`
    ++    if test "x$exclude" != "x"; then
    ++      continue
    ++    fi
    ++
    ++                    already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
    ++    if test "x$already" = "x"; then
    ++      DIRS="$DIRS $dir"
    ++    fi
    ++  done
    ++fi
    ++
    ++eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
    ++
    ++
    ++  for try in $smart_lib_dir /usr/local/lib /opt/lib; do
    ++    LIBS="-L$try -lldap_r $old_LIBS"
    ++    cat >conftest.$ac_ext <<_ACEOF
    ++/* confdefs.h.  */
    ++_ACEOF
    ++cat confdefs.h >>conftest.$ac_ext
    ++cat >>conftest.$ac_ext <<_ACEOF
    ++/* end confdefs.h.  */
    ++extern char ldap_init();
    ++int
    ++main ()
    ++{
    ++ ldap_init()
    ++  ;
    ++  return 0;
    ++}
    ++_ACEOF
    ++rm -f conftest.$ac_objext conftest$ac_exeext
    ++if { (ac_try="$ac_link"
    ++case "(($ac_try" in
    ++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    ++  *) ac_try_echo=$ac_try;;
    ++esac
    ++eval ac_try_echo="\"\$as_me:$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
    ++  $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 && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -lldap_r"
    ++else
    ++  $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 "x$smart_lib" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  LIBS="$old_LIBS"
    ++fi
    ++
    ++if test "x$smart_lib" != "x"; then
    ++  { $as_echo "$as_me:$LINENO: result: yes" >&5
    ++$as_echo "yes" >&6; }
    ++  eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
    ++  LIBS="$smart_lib $old_LIBS"
    ++  SMART_LIBS="$smart_lib $SMART_LIBS"
    ++else
    ++  { $as_echo "$as_me:$LINENO: result: no" >&5
    ++$as_echo "no" >&6; }
    ++fi
    ++
    ++	    if test "x$ac_cv_lib_ldap_r_ldap_init" != "xyes"; then
    ++		fail="$fail libldap_r"
    ++	    fi
    ++	else
    ++
    ++
    ++sm_lib_safe=`echo "ldap" | sed 'y%./+-%__p_%'`
    ++sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
    ++{ $as_echo "$as_me:$LINENO: checking for ldap_init in -lldap" >&5
    ++$as_echo_n "checking for ldap_init in -lldap... " >&6; }
    ++
    ++old_LIBS="$LIBS"
    ++smart_lib=
    ++smart_lib_dir=
    ++
    ++if test "x$smart_try_dir" != "x"; then
    ++  for try in $smart_try_dir; do
    ++    LIBS="-L$try -lldap $old_LIBS"
    ++    cat >conftest.$ac_ext <<_ACEOF
    ++/* confdefs.h.  */
    ++_ACEOF
    ++cat confdefs.h >>conftest.$ac_ext
    ++cat >>conftest.$ac_ext <<_ACEOF
    ++/* end confdefs.h.  */
    ++extern char ldap_init();
    ++int
    ++main ()
    ++{
    ++ ldap_init()
    ++  ;
    ++  return 0;
    ++}
    ++_ACEOF
    ++rm -f conftest.$ac_objext conftest$ac_exeext
    ++if { (ac_try="$ac_link"
    ++case "(($ac_try" in
    ++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    ++  *) ac_try_echo=$ac_try;;
    ++esac
    ++eval ac_try_echo="\"\$as_me:$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
    ++  $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 && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -lldap"
    ++else
    ++  $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 "x$smart_lib" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  LIBS="$old_LIBS"
    ++fi
    ++
    ++if test "x$smart_lib" = "x"; then
    ++  LIBS="-lldap $old_LIBS"
    ++  cat >conftest.$ac_ext <<_ACEOF
    ++/* confdefs.h.  */
    ++_ACEOF
    ++cat confdefs.h >>conftest.$ac_ext
    ++cat >>conftest.$ac_ext <<_ACEOF
    ++/* end confdefs.h.  */
    ++extern char ldap_init();
    ++int
    ++main ()
    ++{
    ++ ldap_init()
    ++  ;
    ++  return 0;
    ++}
    ++_ACEOF
    ++rm -f conftest.$ac_objext conftest$ac_exeext
    ++if { (ac_try="$ac_link"
    ++case "(($ac_try" in
    ++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    ++  *) ac_try_echo=$ac_try;;
    ++esac
    ++eval ac_try_echo="\"\$as_me:$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
    ++  $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 && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-lldap"
    ++else
    ++  $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
    ++  LIBS="$old_LIBS"
    ++fi
    ++
    ++if test "x$smart_lib" = "x"; then
    ++
    ++
    ++if test "x$LOCATE" != "x"; then
    ++        DIRS=
    ++  file=libldap${libltdl_cv_shlibext}
    ++
    ++  for x in `${LOCATE} $file 2>/dev/null`; do
    ++                                        base=`echo $x | sed "s%/${file}%%"`
    ++    if test "x$x" = "x$base"; then
    ++      continue;
    ++    fi
    ++
    ++    dir=`${DIRNAME} $x 2>/dev/null`
    ++                exclude=`echo ${dir} | ${GREP} /home`
    ++    if test "x$exclude" != "x"; then
    ++      continue
    ++    fi
    ++
    ++                    already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
    ++    if test "x$already" = "x"; then
    ++      DIRS="$DIRS $dir"
    ++    fi
    ++  done
    ++fi
    ++
    ++eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
    ++
    ++
    ++
    ++if test "x$LOCATE" != "x"; then
    ++        DIRS=
    ++  file=libldap.a
    ++
    ++  for x in `${LOCATE} $file 2>/dev/null`; do
    ++                                        base=`echo $x | sed "s%/${file}%%"`
    ++    if test "x$x" = "x$base"; then
    ++      continue;
    ++    fi
    ++
    ++    dir=`${DIRNAME} $x 2>/dev/null`
    ++                exclude=`echo ${dir} | ${GREP} /home`
    ++    if test "x$exclude" != "x"; then
    ++      continue
    ++    fi
    ++
    ++                    already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
    ++    if test "x$already" = "x"; then
    ++      DIRS="$DIRS $dir"
    ++    fi
    ++  done
    ++fi
    ++
    ++eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
    ++
    ++
    ++  for try in $smart_lib_dir /usr/local/lib /opt/lib; do
    ++    LIBS="-L$try -lldap $old_LIBS"
    ++    cat >conftest.$ac_ext <<_ACEOF
    ++/* confdefs.h.  */
    ++_ACEOF
    ++cat confdefs.h >>conftest.$ac_ext
    ++cat >>conftest.$ac_ext <<_ACEOF
    ++/* end confdefs.h.  */
    ++extern char ldap_init();
    ++int
    ++main ()
    ++{
    ++ ldap_init()
    ++  ;
    ++  return 0;
    ++}
    ++_ACEOF
    ++rm -f conftest.$ac_objext conftest$ac_exeext
    ++if { (ac_try="$ac_link"
    ++case "(($ac_try" in
    ++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    ++  *) ac_try_echo=$ac_try;;
    ++esac
    ++eval ac_try_echo="\"\$as_me:$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
    ++  $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 && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -lldap"
    ++else
    ++  $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 "x$smart_lib" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  LIBS="$old_LIBS"
    ++fi
    ++
    ++if test "x$smart_lib" != "x"; then
    ++  { $as_echo "$as_me:$LINENO: result: yes" >&5
    ++$as_echo "yes" >&6; }
    ++  eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
    ++  LIBS="$smart_lib $old_LIBS"
    ++  SMART_LIBS="$smart_lib $SMART_LIBS"
    ++else
    ++  { $as_echo "$as_me:$LINENO: result: no" >&5
    ++$as_echo "no" >&6; }
    ++fi
    ++
    ++	    if test "x$ac_cv_lib_ldap_ldap_init" != "xyes"; then
    ++		fail="$fail libldap"
    ++	    fi
    ++	fi
    ++
    ++
    ++	smart_try_dir=$rlm_ldap_include_dir
    ++
    ++
    ++ac_safe=`echo "ldap.h" | sed 'y%./+-%__pm%'`
    ++{ $as_echo "$as_me:$LINENO: checking for ldap.h" >&5
    ++$as_echo_n "checking for ldap.h... " >&6; }
    ++
    ++old_CFLAGS="$CFLAGS"
    ++smart_include=
    ++smart_include_dir=
    ++
    ++if test "x$smart_try_dir" != "x"; then
    ++  for try in $smart_try_dir; do
    ++    CFLAGS="$old_CFLAGS -I$try"
    ++    cat >conftest.$ac_ext <<_ACEOF
    ++/* confdefs.h.  */
    ++_ACEOF
    ++cat confdefs.h >>conftest.$ac_ext
    ++cat >>conftest.$ac_ext <<_ACEOF
    ++/* end confdefs.h.  */
    ++
    ++		    #include 
    ++int
    ++main ()
    ++{
    ++ int a = 1;
    ++  ;
    ++  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 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
    ++  $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
    ++  smart_include="-I$try"
    ++else
    ++  $as_echo "$as_me: failed program was:" >&5
    ++sed 's/^/| /' conftest.$ac_ext >&5
    ++
    ++	smart_include=
    ++fi
    ++
    ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ++    if test "x$smart_include" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  CFLAGS="$old_CFLAGS"
    ++fi
    ++
    ++if test "x$smart_include" = "x"; then
    ++  cat >conftest.$ac_ext <<_ACEOF
    ++/* confdefs.h.  */
    ++_ACEOF
    ++cat confdefs.h >>conftest.$ac_ext
    ++cat >>conftest.$ac_ext <<_ACEOF
    ++/* end confdefs.h.  */
    ++
    ++		  #include 
    ++int
    ++main ()
    ++{
    ++ int a = 1;
    ++  ;
    ++  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 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
    ++  $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
    ++  smart_include=" "
    ++else
    ++  $as_echo "$as_me: failed program was:" >&5
    ++sed 's/^/| /' conftest.$ac_ext >&5
    ++
    ++	smart_include=
    ++fi
    ++
    ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ++fi
    ++
    ++if test "x$smart_include" = "x"; then
    ++
    ++
    ++if test "x$LOCATE" != "x"; then
    ++        DIRS=
    ++  file=ldap.h
    ++
    ++  for x in `${LOCATE} $file 2>/dev/null`; do
    ++                                        base=`echo $x | sed "s%/${file}%%"`
    ++    if test "x$x" = "x$base"; then
    ++      continue;
    ++    fi
    ++
    ++    dir=`${DIRNAME} $x 2>/dev/null`
    ++                exclude=`echo ${dir} | ${GREP} /home`
    ++    if test "x$exclude" != "x"; then
    ++      continue
    ++    fi
    ++
    ++                    already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
    ++    if test "x$already" = "x"; then
    ++      DIRS="$DIRS $dir"
    ++    fi
    ++  done
    ++fi
    ++
    ++eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
    ++
    ++
    ++  for try in $smart_include_dir /usr/local/include /opt/include; do
    ++    CFLAGS="$old_CFLAGS -I$try"
    ++    cat >conftest.$ac_ext <<_ACEOF
    ++/* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    +@@ -3434,20 +4068,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
    +   smart_include="-I$try"
    + else
    +-  echo "$as_me: failed program was:" >&5
    ++  $as_echo "$as_me: failed program was:" >&5
    + sed 's/^/| /' conftest.$ac_ext >&5
    + 
    + 	smart_include=
    +@@ -3462,14 +4097,14 @@ rm -f core conftest.err conftest.$ac_obj
    + fi
    + 
    + if test "x$smart_include" != "x"; 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; }
    +   eval "ac_cv_header_$ac_safe=yes"
    +   CFLAGS="$old_CFLAGS $smart_include"
    +   SMART_CFLAGS="$SMART_CFLAGS $smart_include"
    + 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 "$ac_cv_header_ldap_h" != "yes"; then
    +@@ -3478,10 +4113,10 @@ fi
    + 
    + 
    + 	if test "x$fail" = "x"; then
    +-	    { echo "$as_me:$LINENO: checking for ldap_start_tls_s" >&5
    +-echo $ECHO_N "checking for ldap_start_tls_s... $ECHO_C" >&6; }
    ++	    { $as_echo "$as_me:$LINENO: checking for ldap_start_tls_s" >&5
    ++$as_echo_n "checking for ldap_start_tls_s... " >&6; }
    + if test "${ac_cv_func_ldap_start_tls_s+set}" = set; then
    +-  echo $ECHO_N "(cached) $ECHO_C" >&6
    ++  $as_echo_n "(cached) " >&6
    + else
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    +@@ -3534,39 +4169,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_func_ldap_start_tls_s=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_ldap_start_tls_s=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_ldap_start_tls_s" >&5
    +-echo "${ECHO_T}$ac_cv_func_ldap_start_tls_s" >&6; }
    +-if test $ac_cv_func_ldap_start_tls_s = yes; then
    ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_ldap_start_tls_s" >&5
    ++$as_echo "$ac_cv_func_ldap_start_tls_s" >&6; }
    ++if test "x$ac_cv_func_ldap_start_tls_s" = x""yes; then
    +    SMART_CFLAGS="$SMART_CFLAGS -DHAVE_LDAP_START_TLS"
    + fi
    + 
    +-	    { echo "$as_me:$LINENO: checking for ldap_initialize" >&5
    +-echo $ECHO_N "checking for ldap_initialize... $ECHO_C" >&6; }
    ++	    { $as_echo "$as_me:$LINENO: checking for ldap_initialize" >&5
    ++$as_echo_n "checking for ldap_initialize... " >&6; }
    + if test "${ac_cv_func_ldap_initialize+set}" = set; then
    +-  echo $ECHO_N "(cached) $ECHO_C" >&6
    ++  $as_echo_n "(cached) " >&6
    + else
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    +@@ -3619,39 +4258,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_func_ldap_initialize=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_ldap_initialize=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_ldap_initialize" >&5
    +-echo "${ECHO_T}$ac_cv_func_ldap_initialize" >&6; }
    +-if test $ac_cv_func_ldap_initialize = yes; then
    ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_ldap_initialize" >&5
    ++$as_echo "$ac_cv_func_ldap_initialize" >&6; }
    ++if test "x$ac_cv_func_ldap_initialize" = x""yes; then
    +    SMART_CFLAGS="$SMART_CFLAGS -DHAVE_LDAP_INITIALIZE"
    + fi
    + 
    +-	    { echo "$as_me:$LINENO: checking for ldap_int_tls_config" >&5
    +-echo $ECHO_N "checking for ldap_int_tls_config... $ECHO_C" >&6; }
    ++	    { $as_echo "$as_me:$LINENO: checking for ldap_int_tls_config" >&5
    ++$as_echo_n "checking for ldap_int_tls_config... " >&6; }
    + if test "${ac_cv_func_ldap_int_tls_config+set}" = set; then
    +-  echo $ECHO_N "(cached) $ECHO_C" >&6
    ++  $as_echo_n "(cached) " >&6
    + else
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    +@@ -3704,32 +4347,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_func_ldap_int_tls_config=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_ldap_int_tls_config=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_ldap_int_tls_config" >&5
    +-echo "${ECHO_T}$ac_cv_func_ldap_int_tls_config" >&6; }
    +-if test $ac_cv_func_ldap_int_tls_config = yes; then
    ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_ldap_int_tls_config" >&5
    ++$as_echo "$ac_cv_func_ldap_int_tls_config" >&6; }
    ++if test "x$ac_cv_func_ldap_int_tls_config" = x""yes; then
    +    SMART_CFLAGS="$SMART_CFLAGS -DHAVE_LDAP_INT_TLS_CONFIG"
    + fi
    + 
    +@@ -3743,21 +4390,21 @@ fi
    + 
    + if test x"$fail" != x""; then
    + 	if test x"${enable_strict_dependencies}" = x"yes"; then
    +-		{ { echo "$as_me:$LINENO: error: set --without-rlm_ldap to disable it explicitly." >&5
    +-echo "$as_me: error: set --without-rlm_ldap to disable it explicitly." >&2;}
    ++		{ { $as_echo "$as_me:$LINENO: error: set --without-rlm_ldap to disable it explicitly." >&5
    ++$as_echo "$as_me: error: set --without-rlm_ldap to disable it explicitly." >&2;}
    +    { (exit 1); exit 1; }; }
    + 	else
    +-		{ echo "$as_me:$LINENO: WARNING: silently not building rlm_ldap." >&5
    +-echo "$as_me: WARNING: silently not building rlm_ldap." >&2;}
    +-		{ echo "$as_me:$LINENO: WARNING: FAILURE: rlm_ldap requires: $fail." >&5
    +-echo "$as_me: WARNING: FAILURE: rlm_ldap requires: $fail." >&2;}
    ++		{ $as_echo "$as_me:$LINENO: WARNING: silently not building rlm_ldap." >&5
    ++$as_echo "$as_me: WARNING: silently not building rlm_ldap." >&2;}
    ++		{ $as_echo "$as_me:$LINENO: WARNING: FAILURE: rlm_ldap requires: $fail." >&5
    ++$as_echo "$as_me: WARNING: FAILURE: rlm_ldap requires: $fail." >&2;}
    + 		if test x"$headersuggestion" != x; then
    +-			{ echo "$as_me:$LINENO: WARNING: $headersuggestion" >&5
    +-echo "$as_me: WARNING: $headersuggestion" >&2;}
    ++			{ $as_echo "$as_me:$LINENO: WARNING: $headersuggestion" >&5
    ++$as_echo "$as_me: WARNING: $headersuggestion" >&2;}
    + 		fi
    + 		if test x"$libsuggestion" != x; then
    +-			{ echo "$as_me:$LINENO: WARNING: $libsuggestion" >&5
    +-echo "$as_me: WARNING: $libsuggestion" >&2;}
    ++			{ $as_echo "$as_me:$LINENO: WARNING: $libsuggestion" >&5
    ++$as_echo "$as_me: WARNING: $libsuggestion" >&2;}
    + 		fi
    + 		targetname=""
    + 	fi
    +@@ -3785,7 +4432,11 @@ ldap_cflags="$SMART_CFLAGS -DLDAP_DEPREC
    + 
    + 
    + 
    +-ac_config_files="$ac_config_files Makefile"
    ++
    ++  unset ac_cv_env_LIBS_set
    ++  unset ac_cv_env_LIBS_value
    ++
    ++  ac_config_files="$ac_config_files Makefile"
    + 
    + cat >confcache <<\_ACEOF
    + # This file is a shell script that caches the results of configure
    +@@ -3814,11 +4465,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
    +@@ -3851,12 +4503,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
    +@@ -3873,6 +4525,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
    +@@ -3902,7 +4560,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"
    +@@ -3915,11 +4573,12 @@ LTLIBOBJS=$ac_ltlibobjs
    + 
    + 
    + : ${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.
    +@@ -3932,7 +4591,7 @@ ac_cs_silent=false
    + SHELL=\${CONFIG_SHELL-$SHELL}
    + _ACEOF
    + 
    +-cat >>$CONFIG_STATUS <<\_ACEOF
    ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    + ## --------------------- ##
    + ## M4sh Initialization.  ##
    + ## --------------------- ##
    +@@ -3942,7 +4601,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
    +@@ -3964,17 +4623,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.
    +@@ -3990,8 +4677,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.
    +@@ -4014,7 +4699,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
    + 
    +@@ -4027,17 +4712,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 &&
    +@@ -4059,7 +4737,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
    +@@ -4110,7 +4788,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
    +@@ -4138,7 +4816,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
    +@@ -4151,19 +4828,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
    +@@ -4188,10 +4868,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
    +@@ -4214,7 +4894,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.63.  Invocation command line was
    + 
    +   CONFIG_FILES    = $CONFIG_FILES
    +   CONFIG_HEADERS  = $CONFIG_HEADERS
    +@@ -4227,26 +4907,33 @@ on `(hostname || uname -n) 2>/dev/null |
    + 
    + _ACEOF
    + 
    +-cat >>$CONFIG_STATUS <<_ACEOF
    ++case $ac_config_files in *"
    ++"*) set x $ac_config_files; shift; ac_config_files=$*;;
    ++esac
    ++
    ++
    ++
    ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
    + # Files that config.status was made for.
    + config_files="$ac_config_files"
    + 
    + _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.
    + 
    +-Usage: $0 [OPTIONS] [FILE]...
    ++Usage: $0 [OPTION]... [FILE]...
    + 
    +   -h, --help       print this help, then exit
    +   -V, --version    print version number and configuration settings, then exit
    +-  -q, --quiet      do not print progress messages
    ++  -q, --quiet, --silent
    ++                   do not print progress messages
    +   -d, --debug      don't remove temporary files
    +       --recheck    update $as_me by reconfiguring in the same conditions
    +-  --file=FILE[:TEMPLATE]
    +-		   instantiate the configuration file FILE
    ++      --file=FILE[:TEMPLATE]
    ++                   instantiate the configuration file FILE
    + 
    + Configuration files:
    + $config_files
    +@@ -4254,23 +4941,23 @@ $config_files
    + 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.63,
    ++  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'
    ++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
    +@@ -4292,21 +4979,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; }; } ;;
    + 
    +@@ -4325,30 +5015,32 @@ 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
    + _ACEOF
    + 
    +-cat >>$CONFIG_STATUS <<\_ACEOF
    ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    + 
    + # Handling of arguments.
    + for ac_config_target in $ac_config_targets
    +@@ -4356,8 +5048,8 @@ do
    +   case $ac_config_target in
    +     "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
    +@@ -4396,114 +5088,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_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
    ++
    ++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
    +-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
    +-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
    +-edir!$edir$ac_delim
    +-ldap_ldflags!$ldap_ldflags$ac_delim
    +-ldap_cflags!$ldap_cflags$ac_delim
    +-targetname!$targetname$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` = 50; then
    ++  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
    ++  if test $ac_delim_n = $ac_delim_num; then
    +     break
    +   elif $ac_last_try; then
    +-    { { 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
    +-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
    +-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
    +-_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
    ++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 = ""
    + 
    ++}
    ++{
    ++  line = $ 0
    ++  nfields = split(line, field, "@")
    ++  substed = 0
    ++  len = length(field[1])
    ++  for (i = 2; i < nfields; i++) {
    ++    key = field[i]
    ++    keylen = length(key)
    ++    if (S_is_set[key]) {
    ++      value = S[key]
    ++      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
    ++      len += length(value) + length(field[++i])
    ++      substed = 1
    ++    } else
    ++      len += 1 + keylen
    ++  }
    ++
    ++  print line
    ++}
    ++
    ++_ACAWK
    ++_ACEOF
    ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    ++if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
    ++  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
    ++else
    ++  cat
    ++fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
    ++  || { { $as_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
    +@@ -4520,19 +5241,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
    ++eval set X "  :F $CONFIG_FILES      "
    ++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;;
    +@@ -4561,26 +5284,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
    +@@ -4590,7 +5325,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
    +@@ -4616,7 +5351,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"
    +@@ -4625,7 +5360,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
    +@@ -4646,17 +5381,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/ ;;
    +@@ -4692,12 +5427,13 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_
    + 
    + _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
    + }
    +@@ -4706,13 +5442,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
    +@@ -4726,15 +5463,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
    +@@ -4743,21 +5481,28 @@ s&@builddir@&$ac_builddir&;t t
    + s&@abs_builddir@&$ac_abs_builddir&;t t
    + s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
    + $ac_datarootdir_hack
    +-" $ac_file_inputs | sed -f "$tmp/subs-1.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; }; }
    +  ;;
    + 
    + 
    +@@ -4772,6 +5517,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.
    +@@ -4793,4 +5543,9 @@ 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
    ++
    + 
    +--- a/src/modules/rlm_ldap/configure.in
    ++++ b/src/modules/rlm_ldap/configure.in
    +@@ -90,6 +90,10 @@ if test x$with_[]modname != xno; then
    + 	dnl Static linking will probably not work, but nobody ever
    + 	dnl complained about it.
    + 	smart_try_dir=$rlm_ldap_lib_dir
    ++
    ++	AC_SMART_CHECK_LIB(sasl, sasl_encode)
    ++	AC_SMART_CHECK_LIB(lber, ber_init)
    ++
    + 	if test "x$rlm_ldap_with_threads" = "xyes"; then
    + 	    AC_SMART_CHECK_LIB(ldap_r, ldap_init)
    + 	    if test "x$ac_cv_lib_ldap_r_ldap_init" != "xyes"; then
    diff --git a/net/freeradius/patches/005-create_libdir_at_install.patch b/net/freeradius/patches/005-create_libdir_at_install.patch
    new file mode 100644
    index 0000000..30f92fa
    --- /dev/null
    +++ b/net/freeradius/patches/005-create_libdir_at_install.patch
    @@ -0,0 +1,10 @@
    +--- a/Makefile
    ++++ b/Makefile
    +@@ -42,6 +42,7 @@ export DESTDIR := $(R)
    + install:
    + 	$(INSTALL) -d -m 755	$(R)$(sbindir)
    + 	$(INSTALL) -d -m 755	$(R)$(bindir)
    ++	$(INSTALL) -d -m 755	$(R)$(libdir)
    + 	$(INSTALL) -d -m 755	$(R)$(raddbdir)
    + 	$(INSTALL) -d -m 755	$(R)$(mandir)
    + 	$(INSTALL) -d -m 755	$(R)$(RUNDIR)
    diff --git a/net/freeradius/patches/007-no_openssl_engine_check.patch b/net/freeradius/patches/007-no_openssl_engine_check.patch
    new file mode 100644
    index 0000000..d44772c
    --- /dev/null
    +++ b/net/freeradius/patches/007-no_openssl_engine_check.patch
    @@ -0,0 +1,22 @@
    +--- a/configure
    ++++ b/configure
    +@@ -21579,7 +21579,7 @@ for ac_header in \
    + 	openssl/ssl.h \
    + 	openssl/crypto.h \
    + 	openssl/err.h \
    +-	openssl/engine.h
    ++	
    + do
    + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
    +--- a/configure.in
    ++++ b/configure.in
    +@@ -644,7 +644,7 @@ if test "x$WITH_OPENSSL" = xyes; then
    + 	openssl/ssl.h \
    + 	openssl/crypto.h \
    + 	openssl/err.h \
    +-	openssl/engine.h,
    ++	, 
    + 	[],
    + 	OPENSSL_LIBS=
    +     )
    diff --git a/net/freeradius/patches/008-honor_ccpflags.patch b/net/freeradius/patches/008-honor_ccpflags.patch
    new file mode 100644
    index 0000000..68f1f50
    --- /dev/null
    +++ b/net/freeradius/patches/008-honor_ccpflags.patch
    @@ -0,0 +1,15 @@
    +--- a/src/modules/rules.mak
    ++++ b/src/modules/rules.mak
    +@@ -62,10 +62,10 @@ $(LT_OBJS): $(SERVER_HEADERS)
    + #
    + #######################################################################
    + %.lo: %.c
    +-	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(RLM_CFLAGS) -c $<
    ++	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(CPPFLAGS) $(RLM_CFLAGS) -c $<
    + 
    + %.lo: %.cpp
    +-	$(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) $(RLM_CFLAGS) -c $<
    ++	$(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) $(CPPFLAGS) $(RLM_CFLAGS) -c $<
    + 
    + ifneq ($(TARGET),)
    + #######################################################################
    diff --git a/net/freeradius/patches/009-no_pie.patch b/net/freeradius/patches/009-no_pie.patch
    new file mode 100644
    index 0000000..c1b619d
    --- /dev/null
    +++ b/net/freeradius/patches/009-no_pie.patch
    @@ -0,0 +1,11 @@
    +--- a/src/main/Makefile.in
    ++++ b/src/main/Makefile.in
    +@@ -61,7 +61,7 @@ $(SERVER_OBJS): $(INCLUDES)
    + 
    + radiusd: $(SERVER_OBJS) $(MODULE_OBJS) ../lib/libradius.la
    + 	$(LIBTOOL) --mode=link $(CC) -export-dynamic -dlopen self \
    +-		$(LDFLAGS) -pie $(LINK_MODE) -o $@ $(SERVER_OBJS)      \
    ++		$(LDFLAGS) $(LINK_MODE) -o $@ $(SERVER_OBJS)      \
    + 		$(MODULE_LIBS) $(LIBS) $(SNMP_LIBS) $(PTHREADLIB) \
    + 		$(LIBLTDL) $(OPENSSL_LIBS)
    + 
    diff --git a/net/freeradius2/Makefile b/net/freeradius2/Makefile
    new file mode 100644
    index 0000000..1ed6e1d
    --- /dev/null
    +++ b/net/freeradius2/Makefile
    @@ -0,0 +1,577 @@
    +#
    +# Copyright (C) 2008-2010 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=freeradius2
    +PKG_VERSION:=2.1.10
    +PKG_RELEASE:=2
    +
    +PKG_SOURCE:=freeradius-server-$(PKG_VERSION).tar.bz2
    +PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/freeradius/
    +PKG_MD5SUM:=8ea2bd39460a06212decf2c14fdf3fb8
    +
    +PKG_BUILD_DIR:=$(BUILD_DIR)/freeradius-server-$(PKG_VERSION)
    +PKG_FIXUP:=libtool
    +
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/freeradius2/Default
    +  SECTION:=net
    +  CATEGORY:=Network
    +  URL:=http://freeradius.org/
    +endef
    +
    +define Package/freeradius2
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=+libltdl +libopenssl +libpthread +libreadline
    +  TITLE:=A flexible RADIUS server (version 2)
    +  MENU:=1
    +endef
    +
    +define Package/freeradius2/conffiles
    +/etc/freeradius2/clients.conf
    +/etc/freeradius2/radiusd.conf
    +/etc/freeradius2/sites/default
    +endef
    +
    +define Package/freeradius2-democerts
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=Demo certificates to test the server
    +endef
    +
    +define Package/freeradius2-mod-chap
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=CHAP module
    +endef
    +
    +define Package/freeradius2-mod-chap/conffiles
    +/etc/freeradius2/modules/chap
    +endef
    +
    +define Package/freeradius2-mod-detail
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=Detailed accounting module
    +endef
    +
    +define Package/freeradius2-mod-detail/conffiles
    +/etc/freeradius2/modules/detail
    +endef
    +
    +define Package/freeradius2-mod-eap
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=Base EAP module
    +endef
    +
    +define Package/freeradius2-mod-eap/conffiles
    +/etc/freeradius2/eap.conf
    +endef
    +
    +define Package/freeradius2-mod-eap-gtc
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2-mod-eap
    +  TITLE:=EAP/GTC module
    +endef
    +
    +define Package/freeradius2-mod-eap-md5
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2-mod-eap
    +  TITLE:=EAP/MD5 module
    +endef
    +
    +define Package/freeradius2-mod-eap-mschapv2
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2-mod-eap
    +  TITLE:=EAP/MS-CHAPv2 module
    +endef
    +
    +define Package/freeradius2-mod-eap-peap
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2-mod-eap
    +  TITLE:=EAP/PEAP module
    +endef
    +
    +define Package/freeradius2-mod-eap-tls
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2-mod-eap
    +  TITLE:=EAP/TLS module
    +endef
    +
    +define Package/freeradius2-mod-eap-ttls
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2-mod-eap-tls
    +  TITLE:=EAP/TTLS module
    +endef
    +
    +define Package/freeradius2-mod-exec
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=EXEC module
    +endef
    +
    +define Package/freeradius2-mod-exec/conffiles
    +/etc/freeradius2/modules/exec
    +endef
    +
    +define Package/freeradius2-mod-expiration
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=Expiration module
    +endef
    +
    +define Package/freeradius2-mod-expiration/conffiles
    +/etc/freeradius2/modules/expiration
    +endef
    +
    +define Package/freeradius2-mod-always
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=Always module
    +endef
    +
    +define Package/freeradius2-mod-always/conffiles
    +/etc/freeradius2/modules/always
    +endef
    +
    +define Package/freeradius2-mod-expr
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=EXPR module
    +endef
    +
    +define Package/freeradius2-mod-expr/conffiles
    +/etc/freeradius2/modules/expr
    +endef
    +
    +define Package/freeradius2-mod-attr-filter
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=ATTR filter module
    +endef
    +
    +define Package/freeradius2-mod-attr-filter/conffiles
    +/etc/freeradius2/modules/attr_filter
    +/etc/freeradius2/attrs
    +/etc/freeradius2/attrs.access_reject
    +/etc/freeradius2/attrs.accounting_response
    +/etc/freeradius2/attrs.pre-proxy
    +endef
    +
    +define Package/freeradius2-mod-attr-rewrite
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=ATTR rewrite module
    +endef
    +
    +define Package/freeradius2-mod-attr-rewrite/conffiles
    +/etc/freeradius2/modules/attr_rewrite
    +endef
    +
    +define Package/freeradius2-mod-files
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=Module using local files for authorization
    +endef
    +
    +define Package/freeradius2-mod-files/conffiles
    +/etc/freeradius2/acct_users
    +/etc/freeradius2/preproxy_users
    +/etc/freeradius2/users
    +/etc/freeradius2/modules/files
    +endef
    +
    +define Package/freeradius2-mod-passwd
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=Rlm passwd module
    +endef
    +
    +define Package/freeradius2-mod-passwd/conffiles
    +/etc/freeradius2/modules/passwd
    +endef
    +
    +define Package/freeradius2-mod-ldap
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2 +libopenldap
    +  TITLE:=LDAP module
    +endef
    +
    +define Package/freeradius2-mod-ldap/conffiles
    +/etc/freeradius2/ldap.attrmap
    +/etc/freeradius2/modules/ldap
    +endef
    +
    +define Package/freeradius2-mod-logintime
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=Logintime module
    +endef
    +
    +define Package/freeradius2-mod-logintime/conffiles
    +/etc/freeradius2/modules/logintime
    +endef
    +
    +define Package/freeradius2-mod-mschap
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=MS-CHAP and MS-CHAPv2 module
    +endef
    +
    +define Package/freeradius2-mod-mschap/conffiles
    +/etc/freeradius2/modules/mschap
    +endef
    +
    +define Package/freeradius2-mod-pap
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=PAP module
    +endef
    +
    +define Package/freeradius2-mod-pap/conffiles
    +/etc/freeradius2/modules/pap
    +endef
    +
    +define Package/freeradius2-mod-preprocess
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=Request pre-processing module
    +endef
    +
    +define Package/freeradius2-mod-preprocess/conffiles
    +/etc/freeradius2/hints
    +/etc/freeradius2/huntgroups
    +/etc/freeradius2/modules/preprocess
    +endef
    +
    +define Package/freeradius2-mod-realm
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=Realms handling module
    +endef
    +
    +define Package/freeradius2-mod-realm/conffiles
    +/etc/freeradius2/proxy.conf
    +/etc/freeradius2/modules/realm
    +endef
    +
    +define Package/freeradius2-mod-sql
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=Base SQL module
    +endef
    +
    +define Package/freeradius2-mod-sql/conffiles
    +/etc/freeradius2/sql.conf
    +endef
    +
    +define Package/freeradius2-mod-sql-mysql
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2-mod-sql \
    +  	+PACKAGE_freeradius2-mod-sql-mysql:libmysqlclient_r
    +  TITLE:=MySQL module
    +endef
    +
    +define Package/freeradius2-mod-sql-pgsql
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2-mod-sql \
    +  	+PACKAGE_freeradius2-mod-sql-pgsql:libpq
    +  TITLE:=PostgreSQL module
    +endef
    +
    +define Package/freeradius2-mod-sql-sqlite
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2-mod-sql \
    +  	+PACKAGE_freeradius2-mod-sql-sqlite:libsqlite3
    +  TITLE:=SQLite module
    +endef
    +
    +define Package/freeradius2-mod-sqlcounter
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2-mod-sql
    +  TITLE:=Generic SQL Counter module
    +endef
    +
    +define Package/freeradius2-mod-radutmp
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=Radius UTMP module
    +endef
    +
    +define Package/freeradius2-mod-radutmp/conffiles
    +/etc/freeradius2/modules/radutmp
    +/etc/freeradius2/modules/sradutmp
    +endef
    +
    +define Package/freeradius2-utils
    +  $(call Package/freeradius2/Default)
    +  DEPENDS:=freeradius2
    +  TITLE:=Misc. client utilities
    +endef
    +
    +CONFIGURE_ARGS+= \
    +	--libdir=/usr/lib/freeradius2 \
    +	--libexecdir=/usr/lib/freeradius2 \
    +	--enable-shared \
    +	--disable-static \
    +	--disable-developer \
    +	--with-threads \
    +	--with-openssl-includes="$(STAGING_DIR)/usr/include" \
    +	--with-openssl-libraries="$(STAGING_DIR)/usr/lib" \
    +	--with-system-libtool \
    +	--with-system-libltdl \
    +	--enable-strict-dependencies \
    +	--with-raddbdir=/etc/freeradius2 \
    +	--with-radacctdir=/var/db/radacct \
    +	--with-logdir=/var/log \
    +	--without-edir \
    +	--without-snmp \
    +	--without-rlm_checkval \
    +	--without-rlm_dbm \
    +	--without-rlm_counter \
    +	--with-rlm_expr \
    +	--with-rlm_eap \
    +	--without-rlm_eap_sim \
    +	--without-rlm_example \
    +	--without-rlm_ippool \
    +	--without-rlm_krb5 \
    +	--without-rlm_otp \
    +	--without-rlm_smsotp \
    +	--without-rlm_pam \
    +	--without-rlm_perl \
    +	--without-rlm_python \
    +	--without-rlm_smb \
    +	--with-rlm_sql \
    +	--with-rlm_sqlcounter \
    +	--without-rlm_sqlhpwippool \
    +	--without-rlm_sqlippool \
    +	--without-rlm_sql_db2 \
    +	--without-rlm_sql_firebird \
    +	--without-rlm_sql_freetds \
    +	--without-rlm_sql_iodbc \
    +	--without-rlm_sql_oracle \
    +	--without-rlm_sql_sybase \
    +	--without-rlm_sql_unixodbc \
    +	--without-rlm_sql_log \
    +	--without-rlm_unix \
    +	--without-rlm_eap_tnc \
    +	--without-rlm_eap_ikev2 \
    +	--without-rlm_opendirectory \
    +	--without-rlm_wimax \
    +	--without-rlm_ruby \
    +
    +PKG_DICTIONARIES:= \
    +	freeradius freeradius.internal \
    +	rfc2865 rfc2866 rfc2867 rfc2868 rfc2869 rfc3162 rfc3576 rfc3580 \
    +	rfc4372 rfc4675 rfc4679 \
    +	microsoft \
    +	wispr \
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-ldap),)
    +  CONFIGURE_ARGS+= \
    +		--with-rlm_ldap-include-dir="$(STAGING_DIR)/usr/include" \
    +		--with-rlm_ldap-lib-dir="$(STAGING_DIR)/usr/lib"
    +  CONFIGURE_LIBS+= -lcrypto -lssl
    +else
    +  CONFIGURE_ARGS+= --without-rlm_ldap
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-sql-mysql),)
    +  CONFIGURE_ARGS+= \
    +		--with-mysql-include-dir="$(STAGING_DIR)/usr/include" \
    +		--with-mysql-lib-dir="$(STAGING_DIR)/usr/lib/mysql"
    +  CONFIGURE_LIBS+= -lz
    +  CONFIGURE_VARS+= ac_cv_lib_mysqlclient_r_mysql_init=yes
    +else
    +  CONFIGURE_ARGS+= --without-rlm_sql_mysql
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-sql-pgsql),)
    +  CONFIGURE_ARGS+= \
    +		--with-rlm_sql_postgresql-include-dir="$(STAGING_DIR)/usr/include" \
    +		--with-rlm_sql_postgresql-lib-dir="$(STAGING_DIR)/usr/lib"
    +else
    +  CONFIGURE_ARGS+= --without-rlm_sql_postgresql
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-sql-sqlite),)
    +  CONFIGURE_ARGS+= \
    +	--with-rlm_sql_sqlite \
    +	--with-experimental-modules \
    +	--with-sqlite-include-dir="$(STAGING_DIR)/usr/include" \
    +	--with-sqlite-lib-dir="$(STAGING_DIR)/usr/lib"
    +else
    +  CONFIGURE_ARGS+= --without-rlm_sql_sqlite
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-eap-peap),)
    +  CONFIGURE_ARGS+= \
    +  		--with-rlm_eap_peap \
    +		--with-rlm_eap_peap-include-dir="$(STAGING_DIR)/usr/include" \
    +		--with-rlm_eap_peap-lib-dir="$(STAGING_DIR)/usr/lib"
    +  CONFIGURE_LIBS+= -lcrypto -lssl
    +else
    +  CONFIGURE_ARGS+= --without-rlm_eap_peap
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-eap-tls),)
    +  CONFIGURE_ARGS+= \
    +  		--with-rlm_eap_tls \
    +		--with-rlm_eap_tls-include-dir="$(STAGING_DIR)/usr/include" \
    +		--with-rlm_eap_tls-lib-dir="$(STAGING_DIR)/usr/lib"
    +  CONFIGURE_LIBS+= -lcrypto -lssl
    +else
    +  CONFIGURE_ARGS+= --without-rlm_eap_tls
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-eap-ttls),)
    +  CONFIGURE_ARGS+= \
    +  		--with-rlm_eap_ttls \
    +		--with-rlm_eap_ttls-include-dir="$(STAGING_DIR)/usr/include" \
    +		--with-rlm_eap_ttls-lib-dir="$(STAGING_DIR)/usr/lib"
    +  CONFIGURE_LIBS+= -lcrypto -lssl
    +else
    +  CONFIGURE_ARGS+= --without-rlm_eap_ttls
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-attr-rewrite),)
    +  CONFIGURE_ARGS+= --with-rlm_attr-rewrite
    +else
    +  CONFIGURE_ARGS+= --without-rlm_attr-rewrite
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-radutmp),)
    +  CONFIGURE_ARGS+= --with-rlm_radutmp
    +else
    +  CONFIGURE_ARGS+= --without-rlm_radutmp
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-logintime),)
    +  CONFIGURE_ARGS+= --with-rlm_logintime
    +else
    +  CONFIGURE_ARGS+= --without-rlm_logintime
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-expiration),)
    +  CONFIGURE_ARGS+= --with-rlm_expiration
    +else
    +  CONFIGURE_ARGS+= --without-rlm_expiration
    +endif
    +
    +ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-always),)
    +  CONFIGURE_ARGS+= --with-rlm_always
    +else
    +  CONFIGURE_ARGS+= --without-rlm_always
    +endif
    +
    +CONFIGURE_VARS+= \
    +	LDFLAGS="$$$$LDFLAGS" \
    +	LIBS="$(CONFIGURE_LIBS)" \
    +	MYSQL_CONFIG="no" \
    +	ac_cv_lib_readline=no \
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		R="$(PKG_INSTALL_DIR)" \
    +		INSTALLSTRIP="" \
    +		all certs install
    +endef
    +
    +define Package/freeradius2/install
    +	$(INSTALL_DIR) $(1)/etc/freeradius2
    +	$(INSTALL_DIR) $(1)/etc/freeradius2/modules
    +	$(INSTALL_DIR) $(1)/etc/freeradius2/sites
    +	chmod 771 $(1)/etc/freeradius2
    +	for f in clients.conf dictionary radiusd.conf policy.conf; do \
    +		$(CP) $(PKG_INSTALL_DIR)/etc/freeradius2/$$$${f} $(1)/etc/freeradius2/ ; \
    +	done
    +	$(CP) $(PKG_INSTALL_DIR)/etc/freeradius2/sites-available/default $(1)/etc/freeradius2/sites/default
    +	$(INSTALL_DIR) $(1)/usr/share/freeradius2
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary $(1)/usr/share/freeradius2/
    +	$(SED) "s,^\(\$$$$INCLUDE\),#\1,g" $(1)/usr/share/freeradius2/dictionary
    +	for f in $(PKG_DICTIONARIES); do \
    +		$(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary.$$$${f} $(1)/usr/share/freeradius2/ ; \
    +		$(SED) "s,^#\(\$$$$INCLUDE dictionary\.$$$${f}\),\1,g" $(1)/usr/share/freeradius2/dictionary ; \
    +	done
    +	$(INSTALL_DIR) $(1)/usr/lib/freeradius2
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius2/libfreeradius-radius{,-*}.so $(1)/usr/lib/freeradius2
    +	ln -s freeradius2/libfreeradius-radius-$(PKG_VERSION).so $(1)/usr/lib/
    +	ln -s freeradius2/libfreeradius-eap-$(PKG_VERSION).so $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/sbin
    +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radiusd $(1)/usr/sbin/
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/radiusd.init $(1)/etc/init.d/radiusd
    +endef
    +
    +define Package/freeradius2-democerts/install
    +	$(INSTALL_DIR) $(1)/etc/freeradius2/certs
    +	$(CP) \
    +		$(PKG_BUILD_DIR)/raddb/certs/ca.pem \
    +		$(PKG_BUILD_DIR)/raddb/certs/dh \
    +		$(PKG_BUILD_DIR)/raddb/certs/random \
    +		$(PKG_BUILD_DIR)/raddb/certs/server.pem \
    +		$(1)/etc/freeradius2/certs/
    +endef
    +
    +define Package/freeradius2-utils/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	for f in radclient radeapclient radwho; do \
    +		$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$${f} $(1)/usr/bin/ ; \
    +	done
    +endef
    +
    +define BuildPlugin
    +  define Package/$(1)/install
    +	[ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/freeradius2
    +	for m in $(2); do \
    +		$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius2/$$$$$$$${m}{,-*}.so $$(1)/usr/lib/freeradius2 ; \
    +	done
    +	[ -z "$(3)" ] || $(INSTALL_DIR) $$(1)/etc/freeradius2
    +	[ -z "$(4)" ] || $(INSTALL_DIR) $$(1)/etc/freeradius2/$(4)
    +	for f in $(3); do \
    +		$(CP) $(PKG_INSTALL_DIR)/etc/freeradius2/$$$$$$$${f} $$(1)/etc/freeradius2/$$$$$$$${f} ; \
    +	done
    +  endef
    +
    +  $$(eval $$(call BuildPackage,$(1)))
    +endef
    +
    +$(eval $(call BuildPackage,freeradius2))
    +$(eval $(call BuildPackage,freeradius2-democerts))
    +$(eval $(call BuildPlugin,freeradius2-mod-chap,rlm_chap,modules/chap,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-detail,rlm_detail,modules/detail,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-eap,libfreeradius-eap rlm_eap,eap.conf))
    +$(eval $(call BuildPlugin,freeradius2-mod-eap-gtc,rlm_eap_gtc,))
    +$(eval $(call BuildPlugin,freeradius2-mod-eap-md5,rlm_eap_md5,))
    +$(eval $(call BuildPlugin,freeradius2-mod-eap-mschapv2,rlm_eap_mschapv2,))
    +$(eval $(call BuildPlugin,freeradius2-mod-eap-peap,rlm_eap_peap,))
    +$(eval $(call BuildPlugin,freeradius2-mod-eap-tls,rlm_eap_tls,))
    +$(eval $(call BuildPlugin,freeradius2-mod-eap-ttls,rlm_eap_ttls,))
    +$(eval $(call BuildPlugin,freeradius2-mod-exec,rlm_exec,modules/exec modules/echo ,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-attr-rewrite,rlm_attr_rewrite,modules/attr_rewrite,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-files,rlm_files,acct_users preproxy_users users modules/files,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-passwd,rlm_passwd,modules/passwd,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-ldap,rlm_ldap,ldap.attrmap modules/ldap,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-mschap,rlm_mschap,modules/mschap,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-pap,rlm_pap,modules/pap,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-preprocess,rlm_preprocess,hints huntgroups modules/preprocess,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-realm,rlm_realm,proxy.conf modules/realm modules/inner-eap,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-sql,rlm_sql,sql.conf,))
    +$(eval $(call BuildPlugin,freeradius2-mod-sql-mysql,rlm_sql_mysql,))
    +$(eval $(call BuildPlugin,freeradius2-mod-sql-pgsql,rlm_sql_postgresql,))
    +$(eval $(call BuildPlugin,freeradius2-mod-sql-sqlite,rlm_sql_sqlite,))
    +$(eval $(call BuildPlugin,freeradius2-mod-sqlcounter,rlm_sqlcounter,))
    +$(eval $(call BuildPlugin,freeradius2-mod-radutmp,rlm_radutmp,modules/radutmp modules/sradutmp,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-logintime,rlm_logintime,modules/logintime,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-expr,rlm_expr,modules/expr,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-attr-filter,rlm_attr_filter,modules/attr_filter attrs attrs.access_reject attrs.accounting_response attrs.pre-proxy,modules,,))
    +$(eval $(call BuildPlugin,freeradius2-mod-expiration,rlm_expiration,modules/expiration,modules,))
    +$(eval $(call BuildPlugin,freeradius2-mod-always,rlm_always,modules/always,modules,))
    +$(eval $(call BuildPackage,freeradius2-utils))
    diff --git a/net/freeradius2/files/radiusd.init b/net/freeradius2/files/radiusd.init
    new file mode 100644
    index 0000000..27f75c6
    --- /dev/null
    +++ b/net/freeradius2/files/radiusd.init
    @@ -0,0 +1,22 @@
    +#!/bin/sh /etc/rc.common
    +# Copyright (C) 2006 OpenWrt.org
    +START=50
    +
    +DEFAULT=/etc/default/radiusd
    +LOG_D=/var/log
    +RUN_D=/var/run
    +PID_F=$RUN_D/radiusd.pid
    +RADACCT_D=/var/db/radacct
    +IPADDR=$(ifconfig br-lan | sed -n 's/.*dr:\(.*\)Bc.*/\1/p')
    +
    +start() {
    +	[ -f $DEFAULT ] && . $DEFAULT
    +	mkdir -p $LOG_D
    +	mkdir -p $RUN_D
    +	mkdir -p $RADACCT_D
    +	radiusd -i $IPADDR -p 1812,1813 $OPTIONS
    +}
    +
    +stop() {
    +	[ -f $PID_F ] && kill $(cat $PID_F)
    +}
    diff --git a/net/freeradius2/patches/002-config.patch b/net/freeradius2/patches/002-config.patch
    new file mode 100644
    index 0000000..6a7e21e
    --- /dev/null
    +++ b/net/freeradius2/patches/002-config.patch
    @@ -0,0 +1,588 @@
    +--- a/raddb/dictionary.in
    ++++ b/raddb/dictionary.in
    +@@ -11,7 +11,7 @@
    + #
    + #	The filename given here should be an absolute path. 
    + #
    +-$INCLUDE	@prefix@/share/freeradius/dictionary
    ++$INCLUDE	@prefix@/share/freeradius2/dictionary
    + 
    + #
    + #	Place additional attributes or $INCLUDEs here.  They will
    +--- a/raddb/eap.conf
    ++++ b/raddb/eap.conf
    +@@ -27,7 +27,7 @@
    + 		#  then that EAP type takes precedence over the
    + 		#  default type configured here.
    + 		#
    +-		default_eap_type = md5
    ++		default_eap_type = peap
    + 
    + 		#  A list is maintained to correlate EAP-Response
    + 		#  packets with EAP-Request packets.  After a
    +@@ -72,8 +72,8 @@
    + 		#  for wireless connections.  It is insecure, and does
    + 		#  not provide for dynamic WEP keys.
    + 		#
    +-		md5 {
    +-		}
    ++#		md5 {
    ++#		}
    + 
    + 		# Cisco LEAP
    + 		#
    +@@ -87,8 +87,8 @@
    + 		#  User-Password, or the NT-Password attributes.
    + 		#  'System' authentication is impossible with LEAP.
    + 		#
    +-		leap {
    +-		}
    ++#		leap {
    ++#		}
    + 
    + 		#  Generic Token Card.
    + 		#
    +@@ -101,7 +101,7 @@
    + 		#  the users password will go over the wire in plain-text,
    + 		#  for anyone to see.
    + 		#
    +-		gtc {
    ++#		gtc {
    + 			#  The default challenge, which many clients
    + 			#  ignore..
    + 			#challenge = "Password: "
    +@@ -118,8 +118,8 @@
    + 			#  configured for the request, and do the
    + 			#  authentication itself.
    + 			#
    +-			auth_type = PAP
    +-		}
    ++#			auth_type = PAP
    ++#		}
    + 
    + 		## EAP-TLS
    + 		#
    +@@ -205,7 +205,7 @@
    + 			#  In these cases, fragment size should be
    + 			#  1024 or less.
    + 			#
    +-		#	fragment_size = 1024
    ++			fragment_size = 1024
    + 
    + 			#  include_length is a flag which is
    + 			#  by default set to yes If set to
    +@@ -215,7 +215,7 @@
    + 			#  message is included ONLY in the
    + 			#  First packet of a fragment series.
    + 			#
    +-		#	include_length = yes
    ++			include_length = yes
    + 
    + 			#  Check the Certificate Revocation List
    + 			#
    +@@ -271,7 +271,7 @@
    + 			#  configuration.  It is here ONLY to make
    + 			#  initial deployments easier.
    + 			#
    +-			make_cert_command = "${certdir}/bootstrap"
    ++		#	make_cert_command = "${certdir}/bootstrap"
    + 
    + 			#
    + 			#  Session resumption / fast reauthentication
    +@@ -299,7 +299,7 @@
    + 			#  You probably also want "use_tunneled_reply = yes"
    + 			#  when using fast session resumption.
    + 			#
    +-			cache {
    ++		#	cache {
    + 			      #
    + 			      #  Enable it.  The default is "no".
    + 			      #  Deleting the entire "cache" subsection
    +@@ -315,14 +315,14 @@
    + 			      #  enable resumption for just one user
    + 			      #  by setting the above attribute to "yes".
    + 			      #
    +-			      enable = no
    ++		#	      enable = no
    + 
    + 			      #
    + 			      #  Lifetime of the cached entries, in hours.
    + 			      #  The sessions will be deleted after this
    + 			      #  time.
    + 			      #
    +-			      lifetime = 24 # hours
    ++		#	      lifetime = 24 # hours
    + 
    + 			      #
    + 			      #  The maximum number of entries in the
    +@@ -331,8 +331,8 @@
    + 			      #  This could be set to the number of users
    + 			      #  who are logged in... which can be a LOT.
    + 			      #
    +-			      max_entries = 255
    +-			}
    ++		#	      max_entries = 255
    ++		#	}
    + 
    + 			#
    + 			#  As of version 2.1.10, client certificates can be
    +@@ -394,7 +394,7 @@
    + 		#
    + 		#  in the control items for a request.
    + 		#
    +-		ttls {
    ++#		ttls {
    + 			#  The tunneled EAP session needs a default
    + 			#  EAP type which is separate from the one for
    + 			#  the non-tunneled EAP module.  Inside of the
    +@@ -402,7 +402,7 @@
    + 			#  If the request does not contain an EAP
    + 			#  conversation, then this configuration entry
    + 			#  is ignored.
    +-			default_eap_type = md5
    ++#			default_eap_type = mschapv2
    + 
    + 			#  The tunneled authentication request does
    + 			#  not usually contain useful attributes
    +@@ -418,7 +418,7 @@
    + 			#  is copied to the tunneled request.
    + 			#
    + 			# allowed values: {no, yes}
    +-			copy_request_to_tunnel = no
    ++#			copy_request_to_tunnel = yes
    + 
    + 			#  The reply attributes sent to the NAS are
    + 			#  usually based on the name of the user
    +@@ -431,7 +431,7 @@
    + 			#  the tunneled request.
    + 			#
    + 			# allowed values: {no, yes}
    +-			use_tunneled_reply = no
    ++#			use_tunneled_reply = no
    + 
    + 			#
    + 			#  The inner tunneled request can be sent
    +@@ -443,13 +443,13 @@
    + 			#  the virtual server that processed the
    + 			#  outer requests.
    + 			#
    +-			virtual_server = "inner-tunnel"
    ++#			virtual_server = "inner-tunnel"
    + 
    + 			#  This has the same meaning as the
    + 			#  same field in the "tls" module, above.
    + 			#  The default value here is "yes".
    + 		#	include_length = yes
    +-		}
    ++#		}
    + 
    + 		##################################################
    + 		#
    +@@ -518,14 +518,14 @@
    + 
    + 			#  the PEAP module also has these configuration
    + 			#  items, which are the same as for TTLS.
    +-			copy_request_to_tunnel = no
    +-			use_tunneled_reply = no
    ++			copy_request_to_tunnel = yes
    ++			use_tunneled_reply = yes
    + 
    + 			#  When the tunneled session is proxied, the
    + 			#  home server may not understand EAP-MSCHAP-V2.
    + 			#  Set this entry to "no" to proxy the tunneled
    + 			#  EAP-MSCHAP-V2 as normal MSCHAPv2.
    +-		#	proxy_tunneled_request_as_eap = yes
    ++			proxy_tunneled_request_as_eap = no
    + 
    + 			#
    + 			#  The inner tunneled request can be sent
    +@@ -537,7 +537,8 @@
    + 			#  the virtual server that processed the
    + 			#  outer requests.
    + 			#
    +-			virtual_server = "inner-tunnel"
    ++		#	virtual_server = "inner-tunnel"
    ++			EAP-TLS-Require-Client-Cert = no
    + 		}
    + 
    + 		#
    +--- a/raddb/modules/counter
    ++++ b/raddb/modules/counter
    +@@ -69,7 +69,7 @@
    + #  'check-name' attribute.
    + #
    + counter daily {
    +-	filename = ${db_dir}/db.daily
    ++	filename = ${radacctdir}/db.daily
    + 	key = User-Name
    + 	count-attribute = Acct-Session-Time
    + 	reset = daily
    +--- a/raddb/modules/pap
    ++++ b/raddb/modules/pap
    +@@ -14,5 +14,5 @@
    + #  with the correct value.  It will also automatically handle
    + #  Base-64 encoded data, hex strings, and binary data.
    + pap {
    +-	auto_header = no
    ++	auto_header = yes
    + }
    +--- a/raddb/modules/radutmp
    ++++ b/raddb/modules/radutmp
    +@@ -12,7 +12,7 @@ radutmp {
    + 	#  Where the file is stored.  It's not a log file,
    + 	#  so it doesn't need rotating.
    + 	#
    +-	filename = ${logdir}/radutmp
    ++	filename = ${radacctdir}/radutmp
    + 
    + 	#  The field in the packet to key on for the
    + 	#  'user' name,  If you have other fields which you want
    +--- a/raddb/modules/sradutmp
    ++++ b/raddb/modules/sradutmp
    +@@ -10,7 +10,7 @@
    + # then name "sradutmp" to identify it later in the "accounting"
    + # section.
    + radutmp sradutmp {
    +-	filename = ${logdir}/sradutmp
    ++	filename = ${radacctdir}/sradutmp
    + 	perm = 0644
    + 	callerid = "no"
    + }
    +--- a/raddb/radiusd.conf.in
    ++++ b/raddb/radiusd.conf.in
    +@@ -66,7 +66,7 @@ name = radiusd
    + 
    + #  Location of config and logfiles.
    + confdir = ${raddbdir}
    +-run_dir = ${localstatedir}/run/${name}
    ++run_dir = ${localstatedir}/run
    + 
    + # Should likely be ${localstatedir}/lib/radiusd
    + db_dir = ${raddbdir}
    +@@ -290,7 +290,7 @@ listen {
    + 	#  If your system does not support this feature, you will
    + 	#  get an error if you try to use it.
    + 	#
    +-#	interface = eth0
    ++	interface = br-lan
    + 
    + 	#  Per-socket lists of clients.  This is a very useful feature.
    + 	#
    +@@ -317,7 +317,7 @@ listen {
    + #	ipv6addr = ::
    + 	port = 0
    + 	type = acct
    +-#	interface = eth0
    ++	interface = br-lan
    + #	clients = per_socket_clients
    + }
    + 
    +@@ -541,8 +541,8 @@ security {
    + #
    + #  allowed values: {no, yes}
    + #
    +-proxy_requests  = yes
    +-$INCLUDE proxy.conf
    ++proxy_requests  = no
    ++#$INCLUDE proxy.conf
    + 
    + 
    + # CLIENTS CONFIGURATION
    +@@ -722,7 +722,7 @@ instantiate {
    + 	#  The entire command line (and output) must fit into 253 bytes.
    + 	#
    + 	#  e.g. Framed-Pool = `%{exec:/bin/echo foo}`
    +-	exec
    ++#	exec
    + 
    + 	#
    + 	#  The expression module doesn't do authorization,
    +@@ -735,15 +735,15 @@ instantiate {
    + 	#  listed in any other section.  See 'doc/rlm_expr' for
    + 	#  more information.
    + 	#
    +-	expr
    ++#	expr
    + 
    + 	#
    + 	# We add the counter module here so that it registers
    + 	# the check-name attribute before any module which sets
    + 	# it
    + #	daily
    +-	expiration
    +-	logintime
    ++#	expiration
    ++#	logintime
    + 
    + 	# subsections here can be thought of as "virtual" modules.
    + 	#
    +@@ -767,7 +767,7 @@ instantiate {
    + #	to multiple times.
    + #
    + ######################################################################
    +-$INCLUDE policy.conf
    ++#$INCLUDE policy.conf
    + 
    + ######################################################################
    + #
    +@@ -777,9 +777,9 @@ $INCLUDE policy.conf
    + #	match the regular expression: /[a-zA-Z0-9_.]+/
    + #
    + #	It allows you to define new virtual servers simply by placing
    +-#	a file into the raddb/sites-enabled/ directory.
    ++#	a file into the /etc/freeradius2/sites/ directory.
    + #
    +-$INCLUDE sites-enabled/
    ++$INCLUDE sites/
    + 
    + ######################################################################
    + #
    +@@ -787,7 +787,7 @@ $INCLUDE sites-enabled/
    + #	"authenticate {}", "accounting {}", have been moved to the
    + #	the file:
    + #
    +-#		raddb/sites-available/default
    ++#		/etc/freeradius2/sites/default
    + #
    + #	This is the "default" virtual server that has the same
    + #	configuration as in version 1.0.x and 1.1.x.  The default
    +--- a/raddb/sites-available/default
    ++++ b/raddb/sites-available/default
    +@@ -67,7 +67,7 @@ authorize {
    + 	#
    + 	#  It takes care of processing the 'raddb/hints' and the
    + 	#  'raddb/huntgroups' files.
    +-	preprocess
    ++#	preprocess
    + 
    + 	#
    + 	#  If you want to have a log of authentication requests,
    +@@ -78,7 +78,7 @@ authorize {
    + 	#
    + 	#  The chap module will set 'Auth-Type := CHAP' if we are
    + 	#  handling a CHAP request and Auth-Type has not already been set
    +-	chap
    ++#	chap
    + 
    + 	#
    + 	#  If the users are logging in with an MS-CHAP-Challenge
    +@@ -86,13 +86,13 @@ authorize {
    + 	#  the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
    + 	#  to the request, which will cause the server to then use
    + 	#  the mschap module for authentication.
    +-	mschap
    ++#	mschap
    + 
    + 	#
    + 	#  If you have a Cisco SIP server authenticating against
    + 	#  FreeRADIUS, uncomment the following line, and the 'digest'
    + 	#  line in the 'authenticate' section.
    +-	digest
    ++#	digest
    + 
    + 	#
    + 	#  The WiMAX specification says that the Calling-Station-Id
    +@@ -115,7 +115,7 @@ authorize {
    + 	#  Otherwise, when the first style of realm doesn't match,
    + 	#  the other styles won't be checked.
    + 	#
    +-	suffix
    ++#	suffix
    + #	ntdomain
    + 
    + 	#
    +@@ -177,8 +177,8 @@ authorize {
    + 	# Use the checkval module
    + #	checkval
    + 
    +-	expiration
    +-	logintime
    ++#	expiration
    ++#	logintime
    + 
    + 	#
    + 	#  If no other module has claimed responsibility for
    +@@ -259,7 +259,7 @@ authenticate {
    + 	#  If you have a Cisco SIP server authenticating against
    + 	#  FreeRADIUS, uncomment the following line, and the 'digest'
    + 	#  line in the 'authorize' section.
    +-	digest
    ++#	digest
    + 
    + 	#
    + 	#  Pluggable Authentication Modules.
    +@@ -276,7 +276,7 @@ authenticate {
    + 	#  be used for authentication ONLY for compatibility with legacy
    + 	#  FreeRADIUS configurations.
    + 	#
    +-	unix
    ++#	unix
    + 
    + 	# Uncomment it if you want to use ldap for authentication
    + 	#
    +@@ -312,8 +312,8 @@ authenticate {
    + #
    + #  Pre-accounting.  Decide which accounting type to use.
    + #
    +-preacct {
    +-	preprocess
    ++#preacct {
    ++#	preprocess
    + 
    + 	#
    + 	#  Session start times are *implied* in RADIUS.
    +@@ -336,7 +336,7 @@ preacct {
    + 	#
    + 	#  Ensure that we have a semi-unique identifier for every
    + 	#  request, and many NAS boxes are broken.
    +-	acct_unique
    ++#	acct_unique
    + 
    + 	#
    + 	#  Look for IPASS-style 'realm/', and if not found, look for
    +@@ -346,13 +346,13 @@ preacct {
    + 	#  Accounting requests are generally proxied to the same
    + 	#  home server as authentication requests.
    + #	IPASS
    +-	suffix
    ++#	suffix
    + #	ntdomain
    + 
    + 	#
    + 	#  Read the 'acct_users' file
    +-	files
    +-}
    ++#	files
    ++#}
    + 
    + #
    + #  Accounting.  Log the accounting data.
    +@@ -362,7 +362,7 @@ accounting {
    + 	#  Create a 'detail'ed log of the packets.
    + 	#  Note that accounting requests which are proxied
    + 	#  are also logged in the detail file.
    +-	detail
    ++#	detail
    + #	daily
    + 
    + 	#  Update the wtmp file
    +@@ -414,7 +414,7 @@ accounting {
    + 	exec
    + 
    + 	#  Filter attributes from the accounting response.
    +-	attr_filter.accounting_response
    ++	#attr_filter.accounting_response
    + 
    + 	#
    + 	#  See "Autz-Type Status-Server" for how this works.
    +@@ -440,7 +440,7 @@ session {
    + #  Post-Authentication
    + #  Once we KNOW that the user has been authenticated, there are
    + #  additional steps we can take.
    +-post-auth {
    ++#post-auth {
    + 	#  Get an address from the IP Pool.
    + #	main_pool
    + 
    +@@ -470,7 +470,7 @@ post-auth {
    + #	ldap
    + 
    + 	# For Exec-Program and Exec-Program-Wait
    +-	exec
    ++#	exec
    + 
    + 	#
    + 	#  Calculate the various WiMAX keys.  In order for this to work,
    +@@ -540,12 +540,12 @@ post-auth {
    + 	#  Add the ldap module name (or instance) if you have set 
    + 	#  'edir_account_policy_check = yes' in the ldap module configuration
    + 	#
    +-	Post-Auth-Type REJECT {
    +-		# log failed authentications in SQL, too.
    ++#	Post-Auth-Type REJECT {
    ++#		# log failed authentications in SQL, too.
    + #		sql
    +-		attr_filter.access_reject
    +-	}
    +-}
    ++#		attr_filter.access_reject
    ++#	}
    ++#}
    + 
    + #
    + #  When the server decides to proxy a request to a home server,
    +@@ -555,7 +555,7 @@ post-auth {
    + #
    + #  Only a few modules currently have this method.
    + #
    +-pre-proxy {
    ++#pre-proxy {
    + #	attr_rewrite
    + 
    + 	#  Uncomment the following line if you want to change attributes
    +@@ -571,14 +571,14 @@ pre-proxy {
    + 	#  server, un-comment the following line, and the
    + 	#  'detail pre_proxy_log' section, above.
    + #	pre_proxy_log
    +-}
    ++#}
    + 
    + #
    + #  When the server receives a reply to a request it proxied
    + #  to a home server, the request may be massaged here, in the
    + #  post-proxy stage.
    + #
    +-post-proxy {
    ++#post-proxy {
    + 
    + 	#  If you want to have a log of replies from a home server,
    + 	#  un-comment the following line, and the 'detail post_proxy_log'
    +@@ -602,7 +602,7 @@ post-proxy {
    + 	#  hidden inside of the EAP packet, and the end server will
    + 	#  reject the EAP request.
    + 	#
    +-	eap
    ++#	eap
    + 
    + 	#
    + 	#  If the server tries to proxy a request and fails, then the
    +@@ -624,5 +624,5 @@ post-proxy {
    + #	Post-Proxy-Type Fail {
    + #			detail
    + #	}
    +-}
    ++#}
    + 
    +--- a/raddb/users
    ++++ b/raddb/users
    +@@ -169,22 +169,22 @@
    + #	by the terminal server in which case there may not be a "P" suffix.
    + #	The terminal server sends "Framed-Protocol = PPP" for auto PPP.
    + #
    +-DEFAULT	Framed-Protocol == PPP
    +-	Framed-Protocol = PPP,
    +-	Framed-Compression = Van-Jacobson-TCP-IP
    ++#DEFAULT	Framed-Protocol == PPP
    ++#	Framed-Protocol = PPP,
    ++#	Framed-Compression = Van-Jacobson-TCP-IP
    + 
    + #
    + # Default for CSLIP: dynamic IP address, SLIP mode, VJ-compression.
    + #
    +-DEFAULT	Hint == "CSLIP"
    +-	Framed-Protocol = SLIP,
    +-	Framed-Compression = Van-Jacobson-TCP-IP
    ++#DEFAULT	Hint == "CSLIP"
    ++#	Framed-Protocol = SLIP,
    ++#	Framed-Compression = Van-Jacobson-TCP-IP
    + 
    + #
    + # Default for SLIP: dynamic IP address, SLIP mode.
    + #
    +-DEFAULT	Hint == "SLIP"
    +-	Framed-Protocol = SLIP
    ++#DEFAULT	Hint == "SLIP"
    ++#	Framed-Protocol = SLIP
    + 
    + #
    + # Last default: rlogin to our main server.
    diff --git a/net/freeradius2/patches/004-ldap_configure.patch b/net/freeradius2/patches/004-ldap_configure.patch
    new file mode 100644
    index 0000000..7f3e240
    --- /dev/null
    +++ b/net/freeradius2/patches/004-ldap_configure.patch
    @@ -0,0 +1,4253 @@
    +--- a/src/modules/rlm_ldap/configure
    ++++ b/src/modules/rlm_ldap/configure
    +@@ -1,10 +1,10 @@
    + #! /bin/sh
    + # From configure.in Revision.
    + # Guess values for system-dependent variables and create Makefiles.
    +-# Generated by GNU Autoconf 2.61.
    ++# Generated by GNU Autoconf 2.63.
    + #
    + # 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.
    + ## --------------------- ##
    +@@ -16,7 +16,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
    +@@ -38,17 +38,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.
    +@@ -64,8 +92,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.
    +@@ -88,7 +114,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
    + 
    +@@ -101,17 +127,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 &&
    +@@ -133,7 +152,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
    +@@ -159,7 +178,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)
    + }
    +@@ -241,7 +260,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
    +@@ -262,7 +281,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
    +@@ -342,10 +361,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
    + 
    + 
    +@@ -414,9 +433,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.
    + }
    + 
    + 
    +@@ -452,7 +472,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
    +@@ -480,7 +500,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
    +@@ -493,19 +512,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
    +@@ -530,10 +552,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
    +@@ -578,57 +600,65 @@ PACKAGE_STRING=
    + PACKAGE_BUGREPORT=
    + 
    + ac_unique_file="rlm_ldap.c"
    +-ac_subst_vars='SHELL
    +-PATH_SEPARATOR
    +-PACKAGE_NAME
    +-PACKAGE_TARNAME
    +-PACKAGE_VERSION
    +-PACKAGE_STRING
    +-PACKAGE_BUGREPORT
    +-exec_prefix
    +-prefix
    +-program_transform_name
    +-bindir
    +-sbindir
    +-libexecdir
    +-datarootdir
    +-datadir
    +-sysconfdir
    +-sharedstatedir
    +-localstatedir
    +-includedir
    +-oldincludedir
    +-docdir
    +-infodir
    +-htmldir
    +-dvidir
    +-pdfdir
    +-psdir
    +-libdir
    +-localedir
    +-mandir
    +-DEFS
    +-ECHO_C
    +-ECHO_N
    +-ECHO_T
    +-LIBS
    +-build_alias
    +-host_alias
    +-target_alias
    +-CC
    +-CFLAGS
    +-LDFLAGS
    +-CPPFLAGS
    +-ac_ct_CC
    +-EXEEXT
    +-OBJEXT
    +-edir
    +-ldap_ldflags
    +-ldap_cflags
    +-targetname
    ++ac_subst_vars='LTLIBOBJS
    + LIBOBJS
    +-LTLIBOBJS'
    ++targetname
    ++ldap_cflags
    ++ldap_ldflags
    ++edir
    ++OBJEXT
    ++EXEEXT
    ++ac_ct_CC
    ++CPPFLAGS
    ++LDFLAGS
    ++CFLAGS
    ++CC
    ++target_alias
    ++host_alias
    ++build_alias
    ++LIBS
    ++ECHO_T
    ++ECHO_N
    ++ECHO_C
    ++DEFS
    ++mandir
    ++localedir
    ++libdir
    ++psdir
    ++pdfdir
    ++dvidir
    ++htmldir
    ++infodir
    ++docdir
    ++oldincludedir
    ++includedir
    ++localstatedir
    ++sharedstatedir
    ++sysconfdir
    ++datadir
    ++datarootdir
    ++libexecdir
    ++sbindir
    ++bindir
    ++program_transform_name
    ++prefix
    ++exec_prefix
    ++PACKAGE_BUGREPORT
    ++PACKAGE_STRING
    ++PACKAGE_VERSION
    ++PACKAGE_TARNAME
    ++PACKAGE_NAME
    ++PATH_SEPARATOR
    ++SHELL'
    + ac_subst_files=''
    ++ac_user_opts='
    ++enable_option_checking
    ++with_rlm_ldap_lib_dir
    ++with_rlm_ldap_include_dir
    ++enable_shared
    ++with_threads
    ++with_edir
    ++'
    +       ac_precious_vars='build_alias
    + host_alias
    + target_alias
    +@@ -642,6 +672,8 @@ CPPFLAGS'
    + # 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
    +@@ -740,13 +772,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 ;;
    +@@ -759,13 +799,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- \
    +@@ -956,22 +1004,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.
    +@@ -991,7 +1055,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; }; }
    +     ;;
    +@@ -1000,16 +1064,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}
    +     ;;
    + 
    +@@ -1018,22 +1082,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
    + 
    +@@ -1048,7 +1128,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
    +@@ -1064,10 +1144,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; }; }
    + 
    + 
    +@@ -1075,12 +1155,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
    +@@ -1107,12 +1187,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=.
    +@@ -1161,9 +1241,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
    +@@ -1173,25 +1253,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
    +@@ -1203,6 +1283,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]
    +   --enable-shared[=PKGS]  build shared libraries [default=yes]
    +@@ -1234,15 +1315,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/ ;;
    +@@ -1278,7 +1361,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
    +@@ -1288,10 +1371,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.63
    + 
    + 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
    +@@ -1302,7 +1385,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.63.  Invocation command line was
    + 
    +   $ $0 $@
    + 
    +@@ -1338,7 +1421,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
    + 
    +@@ -1373,7 +1456,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'" ;;
    +@@ -1425,11 +1508,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
    +@@ -1459,9 +1543,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
    + 
    +@@ -1476,9 +1560,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
    +@@ -1494,8 +1578,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 &&
    +@@ -1537,21 +1621,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
    +@@ -1561,16 +1648,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
    + 
    +@@ -1584,29 +1671,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
    +@@ -1616,10 +1712,12 @@ 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: in \`$ac_pwd':" >&5
    ++$as_echo "$as_me: error: in \`$ac_pwd':" >&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
    + 
    +@@ -1662,10 +1760,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.
    +@@ -1678,7 +1776,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
    +@@ -1689,11 +1787,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
    + 
    + 
    +@@ -1702,10 +1800,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.
    +@@ -1718,7 +1816,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
    +@@ -1729,11 +1827,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
    +@@ -1741,12 +1839,8 @@ fi
    +   else
    +     case $cross_compiling:$ac_tool_warned in
    + yes:)
    +-{ 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
    +-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;}
    ++{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
    ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    + ac_tool_warned=yes ;;
    + esac
    +     CC=$ac_ct_CC
    +@@ -1759,10 +1853,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.
    +@@ -1775,7 +1869,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
    +@@ -1786,11 +1880,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
    + 
    + 
    +@@ -1799,10 +1893,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.
    +@@ -1820,7 +1914,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
    +@@ -1843,11 +1937,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
    + 
    + 
    +@@ -1858,10 +1952,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.
    +@@ -1874,7 +1968,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
    +@@ -1885,11 +1979,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
    + 
    + 
    +@@ -1902,10 +1996,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.
    +@@ -1918,7 +2012,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
    +@@ -1929,11 +2023,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
    + 
    + 
    +@@ -1945,12 +2039,8 @@ done
    +   else
    +     case $cross_compiling:$ac_tool_warned in
    + yes:)
    +-{ 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
    +-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;}
    ++{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
    ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    + ac_tool_warned=yes ;;
    + esac
    +     CC=$ac_ct_CC
    +@@ -1960,44 +2050,50 @@ 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: in \`$ac_pwd':" >&5
    ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    ++{ { $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; }; }
    ++   { (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
    +@@ -2016,27 +2112,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
    +@@ -2047,10 +2138,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'
    +@@ -2061,7 +2153,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
    +@@ -2088,25 +2180,27 @@ 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: in \`$ac_pwd':" >&5
    ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    ++{ { $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; }; }
    ++   { (exit 77); exit 77; }; }; }
    + fi
    + 
    + 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
    +@@ -2115,49 +2209,53 @@ 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: in \`$ac_pwd':" >&5
    ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    ++{ { $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; }; }
    ++   { (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
    +@@ -2166,31 +2264,33 @@ 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: in \`$ac_pwd':" >&5
    ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    ++{ { $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; }; }
    ++   { (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.  */
    +@@ -2213,40 +2313,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_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: in \`$ac_pwd':" >&5
    ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    ++{ { $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; }; }
    ++   { (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.  */
    +@@ -2272,20 +2375,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
    +@@ -2295,15 +2399,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
    +@@ -2330,20 +2438,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=""
    +@@ -2368,20 +2477,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
    +@@ -2407,20 +2517,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
    + 
    + 
    +@@ -2435,8 +2546,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
    +@@ -2452,10 +2563,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
    +@@ -2526,20 +2637,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
    + 
    + 
    +@@ -2555,15 +2667,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
    + 
    + 
    +@@ -2581,8 +2693,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
    + if test "${with_rlm_ldap_lib_dir+set}" = set; then
    +   withval=$with_rlm_ldap_lib_dir;  case "$withval" in
    + 	    no)
    +-		{ { echo "$as_me:$LINENO: error: Need rlm-ldap-lib-dir" >&5
    +-echo "$as_me: error: Need rlm-ldap-lib-dir" >&2;}
    ++		{ { $as_echo "$as_me:$LINENO: error: Need rlm-ldap-lib-dir" >&5
    ++$as_echo "$as_me: error: Need rlm-ldap-lib-dir" >&2;}
    +    { (exit 1); exit 1; }; }
    + 		;;
    + 	    yes)
    +@@ -2601,8 +2713,8 @@ fi
    + if test "${with_rlm_ldap_include_dir+set}" = set; then
    +   withval=$with_rlm_ldap_include_dir;  case "$withval" in
    + 	    no)
    +-		{ { echo "$as_me:$LINENO: error: Need rlm-ldap-include-dir" >&5
    +-echo "$as_me: error: Need rlm-ldap-include-dir" >&2;}
    ++		{ { $as_echo "$as_me:$LINENO: error: Need rlm-ldap-include-dir" >&5
    ++$as_echo "$as_me: error: Need rlm-ldap-include-dir" >&2;}
    +    { (exit 1); exit 1; }; }
    + 		;;
    + 	    yes)
    +@@ -2641,8 +2753,8 @@ fi
    + 
    + 
    + 				if test "x$enable_shared" = "xno"; then
    +-		{ echo "$as_me:$LINENO: WARNING: Static linking with libldap will probably result in unresolved symbols." >&5
    +-echo "$as_me: WARNING: Static linking with libldap will probably result in unresolved symbols." >&2;}
    ++		{ $as_echo "$as_me:$LINENO: WARNING: Static linking with libldap will probably result in unresolved symbols." >&5
    ++$as_echo "$as_me: WARNING: Static linking with libldap will probably result in unresolved symbols." >&2;}
    + 	fi
    + 
    + 		rlm_ldap_with_threads=yes
    +@@ -2661,10 +2773,10 @@ fi
    + 
    + 
    + 			if test "x$rlm_ldap_with_threads" = "xyes"; then
    +-	    { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
    +-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
    ++	    { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
    ++$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
    + if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
    +-  echo $ECHO_N "(cached) $ECHO_C" >&6
    ++  $as_echo_n "(cached) " >&6
    + else
    +   ac_check_lib_save_LIBS=$LIBS
    + LIBS="-lpthread  $LIBS"
    +@@ -2696,39 +2808,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_pthread_pthread_create=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_pthread_pthread_create=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_pthread_pthread_create" >&5
    +-echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
    +-if test $ac_cv_lib_pthread_pthread_create = yes; then
    ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
    ++$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
    ++if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then
    +    LIBS="-lpthread $LIBS"
    + else
    +-  { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
    +-echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
    ++  { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
    ++$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
    + if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
    +-  echo $ECHO_N "(cached) $ECHO_C" >&6
    ++  $as_echo_n "(cached) " >&6
    + else
    +   ac_check_lib_save_LIBS=$LIBS
    + LIBS="-lc_r  $LIBS"
    +@@ -2761,33 +2877,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
    +   ac_cv_lib_c_r_pthread_create=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_c_r_pthread_create=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_c_r_pthread_create" >&5
    +-echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
    +-if test $ac_cv_lib_c_r_pthread_create = yes; then
    ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
    ++$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
    ++if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then
    +    LIBS="-lc_r $LIBS"
    + else
    +    rlm_ldap_with_threads="no"
    +@@ -2799,14 +2919,12 @@ fi
    + 
    + 	fi
    + 
    +-				smart_try_dir=$rlm_ldap_lib_dir
    +-	if test "x$rlm_ldap_with_threads" = "xyes"; then
    + 
    + 
    +-sm_lib_safe=`echo "ldap_r" | sed 'y%./+-%__p_%'`
    +-sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
    +-{ echo "$as_me:$LINENO: checking for ldap_init in -lldap_r" >&5
    +-echo $ECHO_N "checking for ldap_init in -lldap_r... $ECHO_C" >&6; }
    ++sm_lib_safe=`echo "sasl" | sed 'y%./+-%__p_%'`
    ++sm_func_safe=`echo "sasl_encode" | sed 'y%./+-%__p_%'`
    ++{ $as_echo "$as_me:$LINENO: checking for sasl_encode in -lsasl" >&5
    ++$as_echo_n "checking for sasl_encode in -lsasl... " >&6; }
    + 
    + old_LIBS="$LIBS"
    + smart_lib=
    +@@ -2814,18 +2932,18 @@ smart_lib_dir=
    + 
    + if test "x$smart_try_dir" != "x"; then
    +   for try in $smart_try_dir; do
    +-    LIBS="-L$try -lldap_r $old_LIBS"
    ++    LIBS="-L$try -lsasl $old_LIBS"
    +     cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-extern char ldap_init();
    ++extern char sasl_encode();
    + int
    + main ()
    + {
    +- ldap_init()
    ++ sasl_encode()
    +   ;
    +   return 0;
    + }
    +@@ -2836,26 +2954,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
    +-  smart_lib="-L$try -lldap_r"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -lsasl"
    + 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 "x$smart_lib" != "x"; then
    +@@ -2866,18 +2988,18 @@ rm -f core conftest.err conftest.$ac_obj
    + fi
    + 
    + if test "x$smart_lib" = "x"; then
    +-  LIBS="-lldap_r $old_LIBS"
    ++  LIBS="-lsasl $old_LIBS"
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-extern char ldap_init();
    ++extern char sasl_encode();
    + int
    + main ()
    + {
    +- ldap_init()
    ++ sasl_encode()
    +   ;
    +   return 0;
    + }
    +@@ -2888,26 +3010,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
    +-  smart_lib="-lldap_r"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-lsasl"
    + 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
    +   LIBS="$old_LIBS"
    +@@ -2918,7 +3044,7 @@ if test "x$smart_lib" = "x"; then
    + 
    + if test "x$LOCATE" != "x"; then
    +         DIRS=
    +-  file=libldap_r${libltdl_cv_shlibext}
    ++  file=libsasl${libltdl_cv_shlibext}
    + 
    +   for x in `${LOCATE} $file 2>/dev/null`; do
    +                                         base=`echo $x | sed "s%/${file}%%"`
    +@@ -2945,7 +3071,7 @@ eval "smart_lib_dir=\"\$smart_lib_dir $D
    + 
    + if test "x$LOCATE" != "x"; then
    +         DIRS=
    +-  file=libldap_r.a
    ++  file=libsasl.a
    + 
    +   for x in `${LOCATE} $file 2>/dev/null`; do
    +                                         base=`echo $x | sed "s%/${file}%%"`
    +@@ -2970,18 +3096,18 @@ eval "smart_lib_dir=\"\$smart_lib_dir $D
    + 
    + 
    +   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
    +-    LIBS="-L$try -lldap_r $old_LIBS"
    ++    LIBS="-L$try -lsasl $old_LIBS"
    +     cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-extern char ldap_init();
    ++extern char sasl_encode();
    + int
    + main ()
    + {
    +- ldap_init()
    ++ sasl_encode()
    +   ;
    +   return 0;
    + }
    +@@ -2992,26 +3118,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
    +-  smart_lib="-L$try -lldap_r"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -lsasl"
    + 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 "x$smart_lib" != "x"; then
    +@@ -3022,26 +3152,22 @@ rm -f core conftest.err conftest.$ac_obj
    + fi
    + 
    + if test "x$smart_lib" != "x"; 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; }
    +   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
    +   LIBS="$smart_lib $old_LIBS"
    +   SMART_LIBS="$smart_lib $SMART_LIBS"
    + 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_cv_lib_ldap_r_ldap_init" != "xyes"; then
    +-		fail="$fail libldap_r"
    +-	    fi
    +-	else
    + 
    + 
    +-sm_lib_safe=`echo "ldap" | sed 'y%./+-%__p_%'`
    +-sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
    +-{ echo "$as_me:$LINENO: checking for ldap_init in -lldap" >&5
    +-echo $ECHO_N "checking for ldap_init in -lldap... $ECHO_C" >&6; }
    ++sm_lib_safe=`echo "lber" | sed 'y%./+-%__p_%'`
    ++sm_func_safe=`echo "ber_init" | sed 'y%./+-%__p_%'`
    ++{ $as_echo "$as_me:$LINENO: checking for ber_init in -llber" >&5
    ++$as_echo_n "checking for ber_init in -llber... " >&6; }
    + 
    + old_LIBS="$LIBS"
    + smart_lib=
    +@@ -3049,18 +3175,18 @@ smart_lib_dir=
    + 
    + if test "x$smart_try_dir" != "x"; then
    +   for try in $smart_try_dir; do
    +-    LIBS="-L$try -lldap $old_LIBS"
    ++    LIBS="-L$try -llber $old_LIBS"
    +     cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-extern char ldap_init();
    ++extern char ber_init();
    + int
    + main ()
    + {
    +- ldap_init()
    ++ ber_init()
    +   ;
    +   return 0;
    + }
    +@@ -3071,26 +3197,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
    +-  smart_lib="-L$try -lldap"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -llber"
    + 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 "x$smart_lib" != "x"; then
    +@@ -3101,18 +3231,18 @@ rm -f core conftest.err conftest.$ac_obj
    + fi
    + 
    + if test "x$smart_lib" = "x"; then
    +-  LIBS="-lldap $old_LIBS"
    ++  LIBS="-llber $old_LIBS"
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-extern char ldap_init();
    ++extern char ber_init();
    + int
    + main ()
    + {
    +- ldap_init()
    ++ ber_init()
    +   ;
    +   return 0;
    + }
    +@@ -3123,26 +3253,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
    +-  smart_lib="-lldap"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-llber"
    + 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
    +   LIBS="$old_LIBS"
    +@@ -3153,7 +3287,7 @@ if test "x$smart_lib" = "x"; then
    + 
    + if test "x$LOCATE" != "x"; then
    +         DIRS=
    +-  file=libldap${libltdl_cv_shlibext}
    ++  file=liblber${libltdl_cv_shlibext}
    + 
    +   for x in `${LOCATE} $file 2>/dev/null`; do
    +                                         base=`echo $x | sed "s%/${file}%%"`
    +@@ -3180,7 +3314,7 @@ eval "smart_lib_dir=\"\$smart_lib_dir $D
    + 
    + if test "x$LOCATE" != "x"; then
    +         DIRS=
    +-  file=libldap.a
    ++  file=liblber.a
    + 
    +   for x in `${LOCATE} $file 2>/dev/null`; do
    +                                         base=`echo $x | sed "s%/${file}%%"`
    +@@ -3205,18 +3339,18 @@ eval "smart_lib_dir=\"\$smart_lib_dir $D
    + 
    + 
    +   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
    +-    LIBS="-L$try -lldap $old_LIBS"
    ++    LIBS="-L$try -llber $old_LIBS"
    +     cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-extern char ldap_init();
    ++extern char ber_init();
    + int
    + main ()
    + {
    +- ldap_init()
    ++ ber_init()
    +   ;
    +   return 0;
    + }
    +@@ -3227,26 +3361,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
    +-  smart_lib="-L$try -lldap"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -llber"
    + 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 "x$smart_lib" != "x"; then
    +@@ -3257,136 +3395,145 @@ rm -f core conftest.err conftest.$ac_obj
    + fi
    + 
    + if test "x$smart_lib" != "x"; 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; }
    +   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
    +   LIBS="$smart_lib $old_LIBS"
    +   SMART_LIBS="$smart_lib $SMART_LIBS"
    + 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_cv_lib_ldap_ldap_init" != "xyes"; then
    +-		fail="$fail libldap"
    +-	    fi
    +-	fi
    +-
    + 
    +-	smart_try_dir=$rlm_ldap_include_dir
    ++				smart_try_dir=$rlm_ldap_lib_dir
    ++	if test "x$rlm_ldap_with_threads" = "xyes"; then
    + 
    + 
    +-ac_safe=`echo "ldap.h" | sed 'y%./+-%__pm%'`
    +-{ echo "$as_me:$LINENO: checking for ldap.h" >&5
    +-echo $ECHO_N "checking for ldap.h... $ECHO_C" >&6; }
    ++sm_lib_safe=`echo "ldap_r" | sed 'y%./+-%__p_%'`
    ++sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
    ++{ $as_echo "$as_me:$LINENO: checking for ldap_init in -lldap_r" >&5
    ++$as_echo_n "checking for ldap_init in -lldap_r... " >&6; }
    + 
    +-old_CFLAGS="$CFLAGS"
    +-smart_include=
    +-smart_include_dir=
    ++old_LIBS="$LIBS"
    ++smart_lib=
    ++smart_lib_dir=
    + 
    + if test "x$smart_try_dir" != "x"; then
    +   for try in $smart_try_dir; do
    +-    CFLAGS="$old_CFLAGS -I$try"
    ++    LIBS="-L$try -lldap_r $old_LIBS"
    +     cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-
    +-		    #include 
    ++extern char ldap_init();
    + int
    + main ()
    + {
    +- int a = 1;
    ++ ldap_init()
    +   ;
    +   return 0;
    + }
    + _ACEOF
    +-rm -f conftest.$ac_objext
    +-if { (ac_try="$ac_compile"
    ++rm -f conftest.$ac_objext conftest$ac_exeext
    ++if { (ac_try="$ac_link"
    + case "(($ac_try" in
    +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    +   *) ac_try_echo=$ac_try;;
    + esac
    +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    +-  (eval "$ac_compile") 2>conftest.er1
    ++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_objext; then
    +-  smart_include="-I$try"
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -lldap_r"
    + else
    +-  echo "$as_me: failed program was:" >&5
    ++  $as_echo "$as_me: failed program was:" >&5
    + sed 's/^/| /' conftest.$ac_ext >&5
    + 
    +-	smart_include=
    ++
    + fi
    + 
    +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    +-    if test "x$smart_include" != "x"; then
    ++rm -rf conftest.dSYM
    ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
    ++      conftest$ac_exeext conftest.$ac_ext
    ++    if test "x$smart_lib" != "x"; then
    +       break;
    +     fi
    +   done
    +-  CFLAGS="$old_CFLAGS"
    ++  LIBS="$old_LIBS"
    + fi
    + 
    +-if test "x$smart_include" = "x"; then
    ++if test "x$smart_lib" = "x"; then
    ++  LIBS="-lldap_r $old_LIBS"
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    + cat >>conftest.$ac_ext <<_ACEOF
    + /* end confdefs.h.  */
    +-
    +-		  #include 
    ++extern char ldap_init();
    + int
    + main ()
    + {
    +- int a = 1;
    ++ ldap_init()
    +   ;
    +   return 0;
    + }
    + _ACEOF
    +-rm -f conftest.$ac_objext
    +-if { (ac_try="$ac_compile"
    ++rm -f conftest.$ac_objext conftest$ac_exeext
    ++if { (ac_try="$ac_link"
    + case "(($ac_try" in
    +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    +   *) ac_try_echo=$ac_try;;
    + esac
    +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    +-  (eval "$ac_compile") 2>conftest.er1
    ++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_objext; then
    +-  smart_include=" "
    ++       } && test -s conftest$ac_exeext && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-lldap_r"
    + else
    +-  echo "$as_me: failed program was:" >&5
    ++  $as_echo "$as_me: failed program was:" >&5
    + sed 's/^/| /' conftest.$ac_ext >&5
    + 
    +-	smart_include=
    ++
    + fi
    + 
    +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ++rm -rf conftest.dSYM
    ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
    ++      conftest$ac_exeext conftest.$ac_ext
    ++  LIBS="$old_LIBS"
    + fi
    + 
    +-if test "x$smart_include" = "x"; then
    ++if test "x$smart_lib" = "x"; then
    + 
    + 
    + if test "x$LOCATE" != "x"; then
    +         DIRS=
    +-  file=ldap.h
    ++  file=libldap_r${libltdl_cv_shlibext}
    + 
    +   for x in `${LOCATE} $file 2>/dev/null`; do
    +                                         base=`echo $x | sed "s%/${file}%%"`
    +@@ -3400,19 +3547,505 @@ if test "x$LOCATE" != "x"; then
    +       continue
    +     fi
    + 
    +-                    already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
    ++                    already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
    +     if test "x$already" = "x"; then
    +       DIRS="$DIRS $dir"
    +     fi
    +   done
    + fi
    + 
    +-eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
    ++eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
    + 
    + 
    +-  for try in $smart_include_dir /usr/local/include /opt/include; do
    +-    CFLAGS="$old_CFLAGS -I$try"
    +-    cat >conftest.$ac_ext <<_ACEOF
    ++
    ++if test "x$LOCATE" != "x"; then
    ++        DIRS=
    ++  file=libldap_r.a
    ++
    ++  for x in `${LOCATE} $file 2>/dev/null`; do
    ++                                        base=`echo $x | sed "s%/${file}%%"`
    ++    if test "x$x" = "x$base"; then
    ++      continue;
    ++    fi
    ++
    ++    dir=`${DIRNAME} $x 2>/dev/null`
    ++                exclude=`echo ${dir} | ${GREP} /home`
    ++    if test "x$exclude" != "x"; then
    ++      continue
    ++    fi
    ++
    ++                    already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
    ++    if test "x$already" = "x"; then
    ++      DIRS="$DIRS $dir"
    ++    fi
    ++  done
    ++fi
    ++
    ++eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
    ++
    ++
    ++  for try in $smart_lib_dir /usr/local/lib /opt/lib; do
    ++    LIBS="-L$try -lldap_r $old_LIBS"
    ++    cat >conftest.$ac_ext <<_ACEOF
    ++/* confdefs.h.  */
    ++_ACEOF
    ++cat confdefs.h >>conftest.$ac_ext
    ++cat >>conftest.$ac_ext <<_ACEOF
    ++/* end confdefs.h.  */
    ++extern char ldap_init();
    ++int
    ++main ()
    ++{
    ++ ldap_init()
    ++  ;
    ++  return 0;
    ++}
    ++_ACEOF
    ++rm -f conftest.$ac_objext conftest$ac_exeext
    ++if { (ac_try="$ac_link"
    ++case "(($ac_try" in
    ++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    ++  *) ac_try_echo=$ac_try;;
    ++esac
    ++eval ac_try_echo="\"\$as_me:$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
    ++  $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 && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -lldap_r"
    ++else
    ++  $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 "x$smart_lib" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  LIBS="$old_LIBS"
    ++fi
    ++
    ++if test "x$smart_lib" != "x"; then
    ++  { $as_echo "$as_me:$LINENO: result: yes" >&5
    ++$as_echo "yes" >&6; }
    ++  eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
    ++  LIBS="$smart_lib $old_LIBS"
    ++  SMART_LIBS="$smart_lib $SMART_LIBS"
    ++else
    ++  { $as_echo "$as_me:$LINENO: result: no" >&5
    ++$as_echo "no" >&6; }
    ++fi
    ++
    ++	    if test "x$ac_cv_lib_ldap_r_ldap_init" != "xyes"; then
    ++		fail="$fail libldap_r"
    ++	    fi
    ++	else
    ++
    ++
    ++sm_lib_safe=`echo "ldap" | sed 'y%./+-%__p_%'`
    ++sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
    ++{ $as_echo "$as_me:$LINENO: checking for ldap_init in -lldap" >&5
    ++$as_echo_n "checking for ldap_init in -lldap... " >&6; }
    ++
    ++old_LIBS="$LIBS"
    ++smart_lib=
    ++smart_lib_dir=
    ++
    ++if test "x$smart_try_dir" != "x"; then
    ++  for try in $smart_try_dir; do
    ++    LIBS="-L$try -lldap $old_LIBS"
    ++    cat >conftest.$ac_ext <<_ACEOF
    ++/* confdefs.h.  */
    ++_ACEOF
    ++cat confdefs.h >>conftest.$ac_ext
    ++cat >>conftest.$ac_ext <<_ACEOF
    ++/* end confdefs.h.  */
    ++extern char ldap_init();
    ++int
    ++main ()
    ++{
    ++ ldap_init()
    ++  ;
    ++  return 0;
    ++}
    ++_ACEOF
    ++rm -f conftest.$ac_objext conftest$ac_exeext
    ++if { (ac_try="$ac_link"
    ++case "(($ac_try" in
    ++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    ++  *) ac_try_echo=$ac_try;;
    ++esac
    ++eval ac_try_echo="\"\$as_me:$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
    ++  $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 && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -lldap"
    ++else
    ++  $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 "x$smart_lib" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  LIBS="$old_LIBS"
    ++fi
    ++
    ++if test "x$smart_lib" = "x"; then
    ++  LIBS="-lldap $old_LIBS"
    ++  cat >conftest.$ac_ext <<_ACEOF
    ++/* confdefs.h.  */
    ++_ACEOF
    ++cat confdefs.h >>conftest.$ac_ext
    ++cat >>conftest.$ac_ext <<_ACEOF
    ++/* end confdefs.h.  */
    ++extern char ldap_init();
    ++int
    ++main ()
    ++{
    ++ ldap_init()
    ++  ;
    ++  return 0;
    ++}
    ++_ACEOF
    ++rm -f conftest.$ac_objext conftest$ac_exeext
    ++if { (ac_try="$ac_link"
    ++case "(($ac_try" in
    ++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    ++  *) ac_try_echo=$ac_try;;
    ++esac
    ++eval ac_try_echo="\"\$as_me:$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
    ++  $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 && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-lldap"
    ++else
    ++  $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
    ++  LIBS="$old_LIBS"
    ++fi
    ++
    ++if test "x$smart_lib" = "x"; then
    ++
    ++
    ++if test "x$LOCATE" != "x"; then
    ++        DIRS=
    ++  file=libldap${libltdl_cv_shlibext}
    ++
    ++  for x in `${LOCATE} $file 2>/dev/null`; do
    ++                                        base=`echo $x | sed "s%/${file}%%"`
    ++    if test "x$x" = "x$base"; then
    ++      continue;
    ++    fi
    ++
    ++    dir=`${DIRNAME} $x 2>/dev/null`
    ++                exclude=`echo ${dir} | ${GREP} /home`
    ++    if test "x$exclude" != "x"; then
    ++      continue
    ++    fi
    ++
    ++                    already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
    ++    if test "x$already" = "x"; then
    ++      DIRS="$DIRS $dir"
    ++    fi
    ++  done
    ++fi
    ++
    ++eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
    ++
    ++
    ++
    ++if test "x$LOCATE" != "x"; then
    ++        DIRS=
    ++  file=libldap.a
    ++
    ++  for x in `${LOCATE} $file 2>/dev/null`; do
    ++                                        base=`echo $x | sed "s%/${file}%%"`
    ++    if test "x$x" = "x$base"; then
    ++      continue;
    ++    fi
    ++
    ++    dir=`${DIRNAME} $x 2>/dev/null`
    ++                exclude=`echo ${dir} | ${GREP} /home`
    ++    if test "x$exclude" != "x"; then
    ++      continue
    ++    fi
    ++
    ++                    already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
    ++    if test "x$already" = "x"; then
    ++      DIRS="$DIRS $dir"
    ++    fi
    ++  done
    ++fi
    ++
    ++eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
    ++
    ++
    ++  for try in $smart_lib_dir /usr/local/lib /opt/lib; do
    ++    LIBS="-L$try -lldap $old_LIBS"
    ++    cat >conftest.$ac_ext <<_ACEOF
    ++/* confdefs.h.  */
    ++_ACEOF
    ++cat confdefs.h >>conftest.$ac_ext
    ++cat >>conftest.$ac_ext <<_ACEOF
    ++/* end confdefs.h.  */
    ++extern char ldap_init();
    ++int
    ++main ()
    ++{
    ++ ldap_init()
    ++  ;
    ++  return 0;
    ++}
    ++_ACEOF
    ++rm -f conftest.$ac_objext conftest$ac_exeext
    ++if { (ac_try="$ac_link"
    ++case "(($ac_try" in
    ++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    ++  *) ac_try_echo=$ac_try;;
    ++esac
    ++eval ac_try_echo="\"\$as_me:$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
    ++  $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 && {
    ++	 test "$cross_compiling" = yes ||
    ++	 $as_test_x conftest$ac_exeext
    ++       }; then
    ++  smart_lib="-L$try -lldap"
    ++else
    ++  $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 "x$smart_lib" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  LIBS="$old_LIBS"
    ++fi
    ++
    ++if test "x$smart_lib" != "x"; then
    ++  { $as_echo "$as_me:$LINENO: result: yes" >&5
    ++$as_echo "yes" >&6; }
    ++  eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
    ++  LIBS="$smart_lib $old_LIBS"
    ++  SMART_LIBS="$smart_lib $SMART_LIBS"
    ++else
    ++  { $as_echo "$as_me:$LINENO: result: no" >&5
    ++$as_echo "no" >&6; }
    ++fi
    ++
    ++	    if test "x$ac_cv_lib_ldap_ldap_init" != "xyes"; then
    ++		fail="$fail libldap"
    ++	    fi
    ++	fi
    ++
    ++
    ++	smart_try_dir=$rlm_ldap_include_dir
    ++
    ++
    ++ac_safe=`echo "ldap.h" | sed 'y%./+-%__pm%'`
    ++{ $as_echo "$as_me:$LINENO: checking for ldap.h" >&5
    ++$as_echo_n "checking for ldap.h... " >&6; }
    ++
    ++old_CFLAGS="$CFLAGS"
    ++smart_include=
    ++smart_include_dir=
    ++
    ++if test "x$smart_try_dir" != "x"; then
    ++  for try in $smart_try_dir; do
    ++    CFLAGS="$old_CFLAGS -I$try"
    ++    cat >conftest.$ac_ext <<_ACEOF
    ++/* confdefs.h.  */
    ++_ACEOF
    ++cat confdefs.h >>conftest.$ac_ext
    ++cat >>conftest.$ac_ext <<_ACEOF
    ++/* end confdefs.h.  */
    ++
    ++		    #include 
    ++int
    ++main ()
    ++{
    ++ int a = 1;
    ++  ;
    ++  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 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
    ++  $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
    ++  smart_include="-I$try"
    ++else
    ++  $as_echo "$as_me: failed program was:" >&5
    ++sed 's/^/| /' conftest.$ac_ext >&5
    ++
    ++	smart_include=
    ++fi
    ++
    ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ++    if test "x$smart_include" != "x"; then
    ++      break;
    ++    fi
    ++  done
    ++  CFLAGS="$old_CFLAGS"
    ++fi
    ++
    ++if test "x$smart_include" = "x"; then
    ++  cat >conftest.$ac_ext <<_ACEOF
    ++/* confdefs.h.  */
    ++_ACEOF
    ++cat confdefs.h >>conftest.$ac_ext
    ++cat >>conftest.$ac_ext <<_ACEOF
    ++/* end confdefs.h.  */
    ++
    ++		  #include 
    ++int
    ++main ()
    ++{
    ++ int a = 1;
    ++  ;
    ++  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 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
    ++  $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
    ++  smart_include=" "
    ++else
    ++  $as_echo "$as_me: failed program was:" >&5
    ++sed 's/^/| /' conftest.$ac_ext >&5
    ++
    ++	smart_include=
    ++fi
    ++
    ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ++fi
    ++
    ++if test "x$smart_include" = "x"; then
    ++
    ++
    ++if test "x$LOCATE" != "x"; then
    ++        DIRS=
    ++  file=ldap.h
    ++
    ++  for x in `${LOCATE} $file 2>/dev/null`; do
    ++                                        base=`echo $x | sed "s%/${file}%%"`
    ++    if test "x$x" = "x$base"; then
    ++      continue;
    ++    fi
    ++
    ++    dir=`${DIRNAME} $x 2>/dev/null`
    ++                exclude=`echo ${dir} | ${GREP} /home`
    ++    if test "x$exclude" != "x"; then
    ++      continue
    ++    fi
    ++
    ++                    already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
    ++    if test "x$already" = "x"; then
    ++      DIRS="$DIRS $dir"
    ++    fi
    ++  done
    ++fi
    ++
    ++eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
    ++
    ++
    ++  for try in $smart_include_dir /usr/local/include /opt/include; do
    ++    CFLAGS="$old_CFLAGS -I$try"
    ++    cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    + _ACEOF
    + cat confdefs.h >>conftest.$ac_ext
    +@@ -3434,20 +4067,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
    +   smart_include="-I$try"
    + else
    +-  echo "$as_me: failed program was:" >&5
    ++  $as_echo "$as_me: failed program was:" >&5
    + sed 's/^/| /' conftest.$ac_ext >&5
    + 
    + 	smart_include=
    +@@ -3462,14 +4096,14 @@ rm -f core conftest.err conftest.$ac_obj
    + fi
    + 
    + if test "x$smart_include" != "x"; 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; }
    +   eval "ac_cv_header_$ac_safe=yes"
    +   CFLAGS="$old_CFLAGS $smart_include"
    +   SMART_CFLAGS="$SMART_CFLAGS $smart_include"
    + 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 "$ac_cv_header_ldap_h" != "yes"; then
    +@@ -3478,10 +4112,10 @@ fi
    + 
    + 
    + 	if test "x$fail" = "x"; then
    +-	    { echo "$as_me:$LINENO: checking for ldap_start_tls_s" >&5
    +-echo $ECHO_N "checking for ldap_start_tls_s... $ECHO_C" >&6; }
    ++	    { $as_echo "$as_me:$LINENO: checking for ldap_start_tls_s" >&5
    ++$as_echo_n "checking for ldap_start_tls_s... " >&6; }
    + if test "${ac_cv_func_ldap_start_tls_s+set}" = set; then
    +-  echo $ECHO_N "(cached) $ECHO_C" >&6
    ++  $as_echo_n "(cached) " >&6
    + else
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    +@@ -3534,39 +4168,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_func_ldap_start_tls_s=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_ldap_start_tls_s=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_ldap_start_tls_s" >&5
    +-echo "${ECHO_T}$ac_cv_func_ldap_start_tls_s" >&6; }
    +-if test $ac_cv_func_ldap_start_tls_s = yes; then
    ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_ldap_start_tls_s" >&5
    ++$as_echo "$ac_cv_func_ldap_start_tls_s" >&6; }
    ++if test "x$ac_cv_func_ldap_start_tls_s" = x""yes; then
    +    SMART_CFLAGS="$SMART_CFLAGS -DHAVE_LDAP_START_TLS"
    + fi
    + 
    +-	    { echo "$as_me:$LINENO: checking for ldap_initialize" >&5
    +-echo $ECHO_N "checking for ldap_initialize... $ECHO_C" >&6; }
    ++	    { $as_echo "$as_me:$LINENO: checking for ldap_initialize" >&5
    ++$as_echo_n "checking for ldap_initialize... " >&6; }
    + if test "${ac_cv_func_ldap_initialize+set}" = set; then
    +-  echo $ECHO_N "(cached) $ECHO_C" >&6
    ++  $as_echo_n "(cached) " >&6
    + else
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    +@@ -3619,39 +4257,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_func_ldap_initialize=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_ldap_initialize=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_ldap_initialize" >&5
    +-echo "${ECHO_T}$ac_cv_func_ldap_initialize" >&6; }
    +-if test $ac_cv_func_ldap_initialize = yes; then
    ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_ldap_initialize" >&5
    ++$as_echo "$ac_cv_func_ldap_initialize" >&6; }
    ++if test "x$ac_cv_func_ldap_initialize" = x""yes; then
    +    SMART_CFLAGS="$SMART_CFLAGS -DHAVE_LDAP_INITIALIZE"
    + fi
    + 
    +-	    { echo "$as_me:$LINENO: checking for ldap_int_tls_config" >&5
    +-echo $ECHO_N "checking for ldap_int_tls_config... $ECHO_C" >&6; }
    ++	    { $as_echo "$as_me:$LINENO: checking for ldap_int_tls_config" >&5
    ++$as_echo_n "checking for ldap_int_tls_config... " >&6; }
    + if test "${ac_cv_func_ldap_int_tls_config+set}" = set; then
    +-  echo $ECHO_N "(cached) $ECHO_C" >&6
    ++  $as_echo_n "(cached) " >&6
    + else
    +   cat >conftest.$ac_ext <<_ACEOF
    + /* confdefs.h.  */
    +@@ -3704,32 +4346,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_func_ldap_int_tls_config=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_ldap_int_tls_config=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_ldap_int_tls_config" >&5
    +-echo "${ECHO_T}$ac_cv_func_ldap_int_tls_config" >&6; }
    +-if test $ac_cv_func_ldap_int_tls_config = yes; then
    ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_ldap_int_tls_config" >&5
    ++$as_echo "$ac_cv_func_ldap_int_tls_config" >&6; }
    ++if test "x$ac_cv_func_ldap_int_tls_config" = x""yes; then
    +    SMART_CFLAGS="$SMART_CFLAGS -DHAVE_LDAP_INT_TLS_CONFIG"
    + fi
    + 
    +@@ -3738,11 +4384,11 @@ fi
    + 
    + for ac_func in ldap_set_rebind_proc
    + 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.  */
    +@@ -3795,44 +4441,51 @@ 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; }
    ++as_val=`eval 'as_val=${'$as_ac_var'}
    ++		 $as_echo "$as_val"'`
    ++   if test "x$as_val" = x""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
    + done
    + 
    +-        { echo "$as_me:$LINENO: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
    +-echo $ECHO_N "checking whether ldap_set_rebind_proc takes 3 arguments... $ECHO_C" >&6; }
    ++        { $as_echo "$as_me:$LINENO: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
    ++$as_echo_n "checking whether ldap_set_rebind_proc takes 3 arguments... " >&6; }
    + if test "${ac_cv_ldap_set_rebind_proc+set}" = set; then
    +-  echo $ECHO_N "(cached) $ECHO_C" >&6
    ++  $as_echo_n "(cached) " >&6
    + else
    + 
    +         cat >conftest.$ac_ext <<_ACEOF
    +@@ -3858,20 +4511,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_ldap_set_rebind_proc=3
    + else
    +-  echo "$as_me: failed program was:" >&5
    ++  $as_echo "$as_me: failed program was:" >&5
    + sed 's/^/| /' conftest.$ac_ext >&5
    + 
    + 	ac_cv_ldap_set_rebind_proc=2
    +@@ -3879,8 +4533,8 @@ fi
    + 
    + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    + fi
    +-{ echo "$as_me:$LINENO: result: $ac_cv_ldap_set_rebind_proc" >&5
    +-echo "${ECHO_T}$ac_cv_ldap_set_rebind_proc" >&6; }
    ++{ $as_echo "$as_me:$LINENO: result: $ac_cv_ldap_set_rebind_proc" >&5
    ++$as_echo "$ac_cv_ldap_set_rebind_proc" >&6; }
    + 	fi
    + 
    + 	targetname=rlm_ldap
    +@@ -3891,21 +4545,21 @@ fi
    + 
    + if test x"$fail" != x""; then
    + 	if test x"${enable_strict_dependencies}" = x"yes"; then
    +-		{ { echo "$as_me:$LINENO: error: set --without-rlm_ldap to disable it explicitly." >&5
    +-echo "$as_me: error: set --without-rlm_ldap to disable it explicitly." >&2;}
    ++		{ { $as_echo "$as_me:$LINENO: error: set --without-rlm_ldap to disable it explicitly." >&5
    ++$as_echo "$as_me: error: set --without-rlm_ldap to disable it explicitly." >&2;}
    +    { (exit 1); exit 1; }; }
    + 	else
    +-		{ echo "$as_me:$LINENO: WARNING: silently not building rlm_ldap." >&5
    +-echo "$as_me: WARNING: silently not building rlm_ldap." >&2;}
    +-		{ echo "$as_me:$LINENO: WARNING: FAILURE: rlm_ldap requires: $fail." >&5
    +-echo "$as_me: WARNING: FAILURE: rlm_ldap requires: $fail." >&2;}
    ++		{ $as_echo "$as_me:$LINENO: WARNING: silently not building rlm_ldap." >&5
    ++$as_echo "$as_me: WARNING: silently not building rlm_ldap." >&2;}
    ++		{ $as_echo "$as_me:$LINENO: WARNING: FAILURE: rlm_ldap requires: $fail." >&5
    ++$as_echo "$as_me: WARNING: FAILURE: rlm_ldap requires: $fail." >&2;}
    + 		if test x"$headersuggestion" != x; then
    +-			{ echo "$as_me:$LINENO: WARNING: $headersuggestion" >&5
    +-echo "$as_me: WARNING: $headersuggestion" >&2;}
    ++			{ $as_echo "$as_me:$LINENO: WARNING: $headersuggestion" >&5
    ++$as_echo "$as_me: WARNING: $headersuggestion" >&2;}
    + 		fi
    + 		if test x"$libsuggestion" != x; then
    +-			{ echo "$as_me:$LINENO: WARNING: $libsuggestion" >&5
    +-echo "$as_me: WARNING: $libsuggestion" >&2;}
    ++			{ $as_echo "$as_me:$LINENO: WARNING: $libsuggestion" >&5
    ++$as_echo "$as_me: WARNING: $libsuggestion" >&2;}
    + 		fi
    + 		targetname=""
    + 	fi
    +@@ -3966,11 +4620,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
    +@@ -4003,12 +4658,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
    +@@ -4025,6 +4680,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
    +@@ -4054,7 +4715,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"
    +@@ -4067,11 +4728,12 @@ LTLIBOBJS=$ac_ltlibobjs
    + 
    + 
    + : ${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.
    +@@ -4084,7 +4746,7 @@ ac_cs_silent=false
    + SHELL=\${CONFIG_SHELL-$SHELL}
    + _ACEOF
    + 
    +-cat >>$CONFIG_STATUS <<\_ACEOF
    ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    + ## --------------------- ##
    + ## M4sh Initialization.  ##
    + ## --------------------- ##
    +@@ -4094,7 +4756,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
    +@@ -4116,17 +4778,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.
    +@@ -4142,8 +4832,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.
    +@@ -4166,7 +4854,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
    + 
    +@@ -4179,17 +4867,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 &&
    +@@ -4211,7 +4892,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
    +@@ -4262,7 +4943,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
    +@@ -4290,7 +4971,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
    +@@ -4303,19 +4983,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
    +@@ -4340,10 +5023,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
    +@@ -4366,7 +5049,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.63.  Invocation command line was
    + 
    +   CONFIG_FILES    = $CONFIG_FILES
    +   CONFIG_HEADERS  = $CONFIG_HEADERS
    +@@ -4379,26 +5062,33 @@ on `(hostname || uname -n) 2>/dev/null |
    + 
    + _ACEOF
    + 
    +-cat >>$CONFIG_STATUS <<_ACEOF
    ++case $ac_config_files in *"
    ++"*) set x $ac_config_files; shift; ac_config_files=$*;;
    ++esac
    ++
    ++
    ++
    ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
    + # Files that config.status was made for.
    + config_files="$ac_config_files"
    + 
    + _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.
    + 
    +-Usage: $0 [OPTIONS] [FILE]...
    ++Usage: $0 [OPTION]... [FILE]...
    + 
    +   -h, --help       print this help, then exit
    +   -V, --version    print version number and configuration settings, then exit
    +-  -q, --quiet      do not print progress messages
    ++  -q, --quiet, --silent
    ++                   do not print progress messages
    +   -d, --debug      don't remove temporary files
    +       --recheck    update $as_me by reconfiguring in the same conditions
    +-  --file=FILE[:TEMPLATE]
    +-		   instantiate the configuration file FILE
    ++      --file=FILE[:TEMPLATE]
    ++                   instantiate the configuration file FILE
    + 
    + Configuration files:
    + $config_files
    +@@ -4406,23 +5096,23 @@ $config_files
    + 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.63,
    ++  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'
    ++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
    +@@ -4444,21 +5134,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; }; } ;;
    + 
    +@@ -4477,30 +5170,32 @@ 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
    + _ACEOF
    + 
    +-cat >>$CONFIG_STATUS <<\_ACEOF
    ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    + 
    + # Handling of arguments.
    + for ac_config_target in $ac_config_targets
    +@@ -4508,8 +5203,8 @@ do
    +   case $ac_config_target in
    +     "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
    +@@ -4548,114 +5243,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_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
    ++
    ++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
    +-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
    +-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
    +-edir!$edir$ac_delim
    +-ldap_ldflags!$ldap_ldflags$ac_delim
    +-ldap_cflags!$ldap_cflags$ac_delim
    +-targetname!$targetname$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` = 50; then
    ++  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
    ++  if test $ac_delim_n = $ac_delim_num; then
    +     break
    +   elif $ac_last_try; then
    +-    { { 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
    +-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
    +-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
    +-_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
    ++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 = ""
    + 
    ++}
    ++{
    ++  line = $ 0
    ++  nfields = split(line, field, "@")
    ++  substed = 0
    ++  len = length(field[1])
    ++  for (i = 2; i < nfields; i++) {
    ++    key = field[i]
    ++    keylen = length(key)
    ++    if (S_is_set[key]) {
    ++      value = S[key]
    ++      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
    ++      len += length(value) + length(field[++i])
    ++      substed = 1
    ++    } else
    ++      len += 1 + keylen
    ++  }
    ++
    ++  print line
    ++}
    ++
    ++_ACAWK
    ++_ACEOF
    ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    ++if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
    ++  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
    ++else
    ++  cat
    ++fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
    ++  || { { $as_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
    +@@ -4672,19 +5396,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
    ++eval set X "  :F $CONFIG_FILES      "
    ++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;;
    +@@ -4713,26 +5439,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
    +@@ -4742,7 +5480,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
    +@@ -4768,7 +5506,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"
    +@@ -4777,7 +5515,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
    +@@ -4798,17 +5536,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/ ;;
    +@@ -4844,12 +5582,13 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_
    + 
    + _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
    + }
    +@@ -4858,13 +5597,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
    +@@ -4878,15 +5618,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
    +@@ -4895,21 +5636,28 @@ s&@builddir@&$ac_builddir&;t t
    + s&@abs_builddir@&$ac_abs_builddir&;t t
    + s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
    + $ac_datarootdir_hack
    +-" $ac_file_inputs | sed -f "$tmp/subs-1.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; }; }
    +  ;;
    + 
    + 
    +@@ -4924,6 +5672,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.
    +@@ -4945,5 +5698,9 @@ 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
    + 
    + 
    +--- a/src/modules/rlm_ldap/configure.in
    ++++ b/src/modules/rlm_ldap/configure.in
    +@@ -87,6 +87,9 @@ if test x$with_[]modname != xno; then
    + 			 )
    + 	fi
    + 
    ++	FR_SMART_CHECK_LIB(sasl, sasl_encode)
    ++	FR_SMART_CHECK_LIB(lber, ber_init)
    ++
    + 	dnl Try only "-lldap_r" or "-lldap"
    + 	dnl Static linking will probably not work, but nobody ever
    + 	dnl complained about it.
    diff --git a/net/freeradius2/patches/008-honor_ccpflags.patch b/net/freeradius2/patches/008-honor_ccpflags.patch
    new file mode 100644
    index 0000000..bb5f81a
    --- /dev/null
    +++ b/net/freeradius2/patches/008-honor_ccpflags.patch
    @@ -0,0 +1,15 @@
    +--- a/src/modules/rules.mak
    ++++ b/src/modules/rules.mak
    +@@ -63,10 +63,10 @@ $(LT_OBJS): $(SERVER_HEADERS)
    + #
    + #######################################################################
    + %.lo: %.c
    +-	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(RLM_CFLAGS) -c $<
    ++	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(CPPFLAGS) $(RLM_CFLAGS) -c $<
    + 
    + %.lo: %.cpp
    +-	$(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) $(RLM_CFLAGS) -c $<
    ++	$(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) $(CPPFLAGS) $(RLM_CFLAGS) -c $<
    + 
    + ifneq ($(TARGET),)
    + #######################################################################
    diff --git a/net/freeradius2/patches/009-sql_sqlite_c.patch b/net/freeradius2/patches/009-sql_sqlite_c.patch
    new file mode 100644
    index 0000000..7e72eaa
    --- /dev/null
    +++ b/net/freeradius2/patches/009-sql_sqlite_c.patch
    @@ -0,0 +1,14 @@
    +--- a/src/modules/rlm_sql/drivers/rlm_sql_sqlite/sql_sqlite.c
    ++++ b/src/modules/rlm_sql/drivers/rlm_sql_sqlite/sql_sqlite.c
    +@@ -138,10 +138,7 @@ static int sql_query(SQLSOCK * sqlsocket
    + static int sql_select_query(SQLSOCK *sqlsocket, SQL_CONFIG *config,
    + 			    char *querystr)
    + {
    +-	if (strstr(querystr, "nas") != NULL)
    +-		return sql_query(sqlsocket, config, querystr);
    +-		
    +-	return 0;
    ++	return sql_query(sqlsocket, config, querystr);
    + }
    + 
    + 
    diff --git a/net/freeswitch/Makefile b/net/freeswitch/Makefile
    new file mode 100644
    index 0000000..405babb
    --- /dev/null
    +++ b/net/freeswitch/Makefile
    @@ -0,0 +1,644 @@
    +#
    +# Copyright (C) 2009-2011 OpenWrt.org
    +#
    +# This is free software, licensed under the GNU General Public License v2.
    +# See /LICENSE for more information.
    +#
    +
    +include $(TOPDIR)/rules.mk
    +
    +PKG_NAME:=freeswitch
    +PKG_VERSION:=1.0.7
    +PKG_RELEASE:=1
    +
    +PKG_SOURCE_PROTO:=git
    +PKG_SOURCE_URL:=git://git.$(PKG_NAME).org/$(PKG_NAME).git
    +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
    +PKG_REV:=0128bce4ac222c6e0ee17ee9f89b63678ff8cf97
    +PKG_SOURCE_VERSION:=$(PKG_REV)
    +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
    +
    +PKG_FIXUP:=libtool
    +
    +FS_MOD_AVAILABLE:= \
    +	alsa \
    +	amr \
    +	amrwb \
    +	avmd \
    +	bv \
    +	callcenter \
    +	cdr-csv \
    +	cdr-pg-csv \
    +	cdr-sqlite \
    +	celt \
    +	cepstral \
    +	cidlookup \
    +	cluechoo \
    +	codec2 \
    +	commands \
    +	conference \
    +	console \
    +	curl \
    +	dahdi-codec \
    +	db \
    +	dialplan-asterisk \
    +	dialplan-directory \
    +	dialplan-xml \
    +	dingaling \
    +	directory \
    +	distributor \
    +	dptools \
    +	easyroute \
    +	enum \
    +	erlang-event \
    +	esf \
    +	event-multicast \
    +	event-socket \
    +	event-zmq \
    +	expr \
    +	fifo \
    +	file-string \
    +	flite \
    +	fsv \
    +	g723-1 \
    +	g729 \
    +	h26x \
    +	h323 \
    +	hash \
    +	ilbc \
    +	java \
    +	lcr \
    +	ldap \
    +	local-stream \
    +	logfile \
    +	loopback \
    +	lua \
    +	managed \
    +	memcache \
    +	mp4 \
    +	native-file \
    +	nibblebill \
    +	opal \
    +	openzap \
    +	perl \
    +	pocketsphinx \
    +	portaudio \
    +	portaudio-stream \
    +	python \
    +	radius-cdr \
    +	rss \
    +	rtmp \
    +	say-de \
    +	say-en \
    +	say-es \
    +	say-fr \
    +	say-hu \
    +	say-it \
    +	say-nl \
    +	say-pt \
    +	say-ru \
    +	say-th \
    +	say-zh \
    +	shell-stream \
    +	shout \
    +	silk \
    +	siren \
    +	skinny \
    +	skypopen \
    +	sangoma-codec \
    +	snapshot \
    +	snipe-hunt \
    +	sndfile \
    +	snom \
    +	sofia \
    +	spandsp \
    +	speex \
    +	spidermonkey \
    +	spidermonkey-core-db \
    +	spidermonkey-curl \
    +	spidermonkey-odbc \
    +	spidermonkey-socket \
    +	spidermonkey-teletone \
    +	spy \
    +	stress \
    +	syslog \
    +	tone-stream \
    +	tts-commandline \
    +	unimrcp \
    +	valet-parking \
    +	vmd \
    +	voicemail \
    +	xml-cdr \
    +	xml-curl \
    +	xml-ldap \
    +	xml-rpc \
    +	yaml \
    +
    +PKG_CONFIG_DEPENDS:= \
    +	$(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-mod-%,$(FS_MOD_AVAILABLE)) \
    +
    +include $(INCLUDE_DIR)/host-build.mk
    +include $(INCLUDE_DIR)/package.mk
    +
    +define Package/$(PKG_NAME)/Default
    +  SECTION:=net
    +  CATEGORY:=Network
    +  SUBMENU:=Telephony
    +  URL:=http://www.$(PKG_NAME).org/
    +  MAINTAINER:=Mazilo 
    +endef
    +
    +
    +define Package/$(PKG_NAME)
    +$(call Package/$(PKG_NAME)/Default)
    +  TITLE:=FreeSWITCH open source telephony platform
    +  DEPENDS:= +libopenssl +libreadline +libncurses +libpthread +libstdcpp
    +  MENU:=1
    +endef
    +
    +define Package/$(PKG_NAME)/description
    +  FreeSWITCH is an open source telephony platform designed to 
    +  facilitate the creation of voice and chat driven products scaling 
    +  from a soft-phone up to a soft-switch.  See http://wiki.$(PKG_NAME).org
    +endef
    +
    +define Package/$(PKG_NAME)-example-config
    +$(call Package/$(PKG_NAME)/Default)
    +  TITLE:=FreeSWITCH example config (commented)
    +  DEPENDS:= $(PKG_NAME)
    +endef
    +
    +define Package/$(PKG_NAME)-example-config/description
    +  The default configuration included with FreeSWITCH. It is not intended to be
    +  a final product, and is thus moved to /usr/share/$(PKG_NAME)/examples/conf to
    +  be an example of how FreeSWITCH can be configured.
    +endef
    +
    +define Package/$(PKG_NAME)-config-upstream-defaults
    +$(call Package/$(PKG_NAME)/Default)
    +  TITLE:=FreeSWITCH upstream config
    +  DEPENDS:= $(PKG_NAME)
    +endef
    +
    +define Package/$(PKG_NAME)-config-upstream-defaults/description
    +  The default configuration included with FreeSWITCH. It is not intended to be
    +  a final product, and but is included for those who don't want to use the 
    +  OpenWRT configuration and/or want to try things as prepared by upstream.
    +endef
    +
    +define Package/$(PKG_NAME)-config-minimal
    +$(call Package/$(PKG_NAME)/Default)
    +  TITLE:=FreeSWITCH a minimal FS config
    +  DEPENDS:= $(PKG_NAME)
    +endef
    +
    +define Package/$(PKG_NAME)-config-minimal/description
    +  A minimal configuration of FreeSWITCH for OpenWRT devices.  Is what the UCI 
    +  configuration began with.
    +endef
    +
    +define Package/$(PKG_NAME)-collection-upstream-defaults
    +$(call Package/$(PKG_NAME)/Default)
    +  TITLE:=FreeSWITCH upstream default (sample) config
    +  DEPENDS:= $(PKG_NAME) \
    +		+$(PKG_NAME)-config-upstream-defaults \
    +		+$(PKG_NAME)-mod-callcenter \
    +		+$(PKG_NAME)-mod-codec2 \
    +		+$(PKG_NAME)-mod-commands \
    +		+$(PKG_NAME)-mod-conference \
    +		+$(PKG_NAME)-mod-curl \
    +		+$(PKG_NAME)-mod-dialplan-xml \
    +		+$(PKG_NAME)-mod-dingaling \
    +		+$(PKG_NAME)-mod-dptools \
    +		+$(PKG_NAME)-mod-event-socket \
    +		+$(PKG_NAME)-mod-g723-1 \
    +		+$(PKG_NAME)-mod-g729 \
    +		+$(PKG_NAME)-mod-hash \
    +		+$(PKG_NAME)-mod-ilbc \
    +		+$(PKG_NAME)-mod-local-stream \
    +		+$(PKG_NAME)-mod-lua \
    +		+$(PKG_NAME)-mod-native-file \
    +		+$(PKG_NAME)-mod-siren \
    +		+$(PKG_NAME)-mod-sndfile \
    +		+$(PKG_NAME)-mod-sofia \
    +		+$(PKG_NAME)-mod-spandsp \
    +		+$(PKG_NAME)-mod-speex \
    +		+$(PKG_NAME)-mod-syslog \
    +		+$(PKG_NAME)-mod-tone-stream \
    +		+$(PKG_NAME)-mod-xml-curl \
    +		+$(PKG_NAME)-mod-xml-rpc \
    +		+$(PKG_NAME)-tools
    +endef
    +
    +define Package/$(PKG_NAME)-collection-minimal
    +$(call Package/$(PKG_NAME)/Default)
    +  TITLE:=A FreeSWITCH minimal package collection
    +  DEPENDS:= $(PKG_NAME) \
    +		+$(PKG_NAME)-config-minimal \
    +		+$(PKG_NAME)-mod-codec2 \
    +		+$(PKG_NAME)-mod-commands \
    +		+$(PKG_NAME)-mod-dialplan-xml \
    +		+$(PKG_NAME)-mod-dptools \
    +		+$(PKG_NAME)-mod-event-socket \
    +		+$(PKG_NAME)-mod-hash \
    +		+$(PKG_NAME)-mod-local-stream \
    +		+$(PKG_NAME)-mod-sndfile \
    +		+$(PKG_NAME)-mod-sofia \
    +		+$(PKG_NAME)-mod-syslog \
    +		+$(PKG_NAME)-mod-tone-stream \
    +		+$(PKG_NAME)-tools
    +endef
    +
    +define Package/$(PKG_NAME)-sounds-en
    +$(call Package/$(PKG_NAME)/Default)
    +  TITLE:=FreeSWITCH english sounds
    +  DEPENDS:= $(PKG_NAME)
    +endef
    +
    +
    +define Package/$(PKG_NAME)-sounds-moh
    +$(call Package/$(PKG_NAME)/Default)
    +  TITLE:=FreeSWITCH music-on-hold sounds
    +  DEPENDS:= $(PKG_NAME)
    +endef
    +
    +
    +define Package/$(PKG_NAME)-tools
    +$(call Package/$(PKG_NAME)/Default)
    +  TITLE:=FreeSWITCH control tools
    +  DEPENDS:= $(PKG_NAME)
    +endef
    +
    +
    +define Download/files
    + define Download/$(1)
    +  FILE:=$(2)
    +  URL:=http://files.$(PKG_NAME).org/$(4)
    +  MD5SUM:=$(3)
    + endef
    + define Prepare/$(1)
    +  $(LN) $(DL_DIR)/$(2) $(PKG_BUILD_DIR)/$(5)
    + endef
    + $$(eval $$(call Download,$(1)))
    +endef
    +
    +MAKE_INSTALL_TARGETS:=install
    +
    +ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-celt),)
    + $(eval $(call Download/files,celt,celt-0.10.0.tar.gz,a656f6176e9be84027c0e51ceedd710f,downloads/libs/,libs/))
    +endif
    +
    +ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-curl),)
    + $(eval $(call Download/files,json-c,json-c-0.9.tar.gz,4653b3b9c568bb9c782178abfaac128d,downloads/libs/,libs/))
    +endif
    +
    +ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-flite),)
    + $(eval $(call Download/files,flite,flite-1.3.99-latest.tar.gz,365b60881715c5e13c0d8bc37d9be6ff,downloads/libs/,libs/))
    +endif
    +
    +ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en),)
    + $(eval $(call Download/files,sounds-en,$(PKG_NAME)-sounds-en-us-callie-8000-1.0.16.tar.gz,bde0883eb75fe06f39bde11f50a1f858,,))
    +	MAKE_INSTALL_TARGETS+= sounds-install
    +endif
    +
    +ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-moh),)
    + $(eval $(call Download/files,sounds-moh,$(PKG_NAME)-sounds-music-8000-1.0.8.tar.gz,f63ef3cc3507af079ae5c7b8b8a01e42,,))
    +	MAKE_INSTALL_TARGETS+= moh-install
    +endif
    +
    +# XXX: -fgnu89-inline is not supported on all compiler versions, so only enable it on avr32 where it solves build issues
    +ifneq ($(CONFIG_avr32),)
    +  TARGET_CFLAGS += -fgnu89-inline
    +  TARGET_CXXFLAGS += -fgnu89-inline
    +endif
    +
    +ifneq ($(CONFIG_USE_EGLIBC),)
    +  ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),)
    +    TARGET_CFLAGS += -DNO_GETLOGIN
    +  endif
    +endif
    +
    +FS_TARGET_CFLAGS:= ${TARGET_CFLAGS} -DLUA_USE_LINUX $(FPIC) -std=gnu99 -Wno-format
    +FS_TARGET_CXXFLAGS:= ${TARGET_CXXFLAGS} -DLUA_USE_LINUX $(FPIC) -Wno-format
    +FS_TARGET_CPPFLAGS:= -I. -I./lua ${TARGET_CPPFLAGS}
    +
    +
    +CONFIGURE_ARGS+= \
    +	--prefix="/usr/share/$(PKG_NAME)" \
    +	--bindir="/usr/bin" \
    +	--libdir="/usr/lib" \
    +	--sysconfdir="/etc/$(PKG_NAME)" \
    +	--with-modinstdir="/usr/lib/$(PKG_NAME)" \
    +	--enable-ipv6 \
    +	--enable-optimization \
    +	--with-random="/dev/urandom" \
    +	$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-celt),--with-ogg="$(STAGING_DIR)/usr",--without-iogg) \
    +	$(if ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-curl)|$(CONFIG_PACKAGE_$(PKG_NAME)-mod-xml-cdr)|$(CONFIG_PACKAGE_$(PKG_NAME)-mod-xml-curl)),--with-libcurl="$(STAGING_DIR)/usr",--without-libcurl) \
    +	$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-dingaling),--with-openssl="$(STAGING_DIR)/usr",--without-openssl) \
    +	$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-java),--with-java="$(STAGING_DIR)/usr",--without-java) \
    +	$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-spandsp),--enable-builtin-tiff,) \
    +
    +
    +CONFIGURE_VARS+= \
    +	config_TARGET_CC="${TARGET_CC}" \
    +	config_TARGET_CFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CFLAGS}" \
    +	config_TARGET_CXX="${TARGET_CXX}" \
    +	config_TARGET_CXXFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CXXFLAGS}" \
    +	config_TARGET_CPPFLAGS="${FS_TARGET_CPPFLAGS}" \
    +	config_BUILD_CC="${HOSTCC}" \
    +	config_TARGET_READLINE_INC="${FS_TARGET_CPPFLAGS}" \
    +	config_TARGET_READLINE_LIBS="${TARGET_LDFLAGS} -lreadline -lncurses" \
    +	config_TARGET_LIBS="${TARGET_LDFLAGS} -lpthread" \
    +	CC_FOR_BUILD="${HOSTCC}" \
    +	LDFLAGS_FOR_BUILD="${HOST_LDFLAGS}" \
    +	CC="${TARGET_CC}" \
    +	CXX="${TARGET_CXX}" \
    +	CFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CFLAGS}" \
    +	CXXFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CXXFLAGS}" \
    +	CPPFLAGS="${FS_TARGET_CPPFLAGS}" \
    +	LDFLAGS="${TARGET_LDFLAGS} -Wl,-rpath-link=\"${STAGING_DIR}/usr/lib\"" \
    +	ac_cv_dev_urandom="yes" \
    +	ac_cv_file_dbd_apr_dbd_mysql_c="no" \
    +	ac_cv_file__dev_random="no" \
    +	ac_cv_file__dev_urandom="yes" \
    +	ac_cv_file___dev_urandom_="yes" \
    +	ac_cv_func_mmap_fixed_mapped="yes" \
    +	ac_cv_func_pthread_rwlock_init="yes" \
    +	ac_cv_struct_rlimit="yes" \
    +	apr_cv_mutex_recursive="yes" \
    +	apr_cv_process_shared_works="no" \
    +	apr_cv_tcp_nodelay_with_cork="yes" \
    +	apr_cv_type_rwlock_t="yes" \
    +	ac_cv_path_LIBGNUTLS_CONFIG="no" \
    +
    +
    +define Build/Prepare
    +	$(call Build/Prepare/Default)
    +	$(call Prepare/celt)
    +	$(call Prepare/flite)
    +	$(call Prepare/json-c)
    +	$(call Prepare/sounds-en)
    +	$(call Prepare/sounds-moh)
    +	(cd $(PKG_BUILD_DIR); [ -h noreg ] || touch noreg)	# Just to shut up Cluecon reg. msg.
    +	(cd $(PKG_BUILD_DIR); $(AM_TOOL_PATHS) ./bootstrap.sh)
    +endef
    +
    +define Build/Configure
    +	$(call Build/Configure/Default,)
    +	$(foreach m,$(FS_MOD_AVAILABLE),
    +		$(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(m)),
    +			$(SED) 's|^[ #]*\([^#]*/mod_$(subst -,_,$(m))\)$$$$|\1|g' $(PKG_BUILD_DIR)/modules.conf
    +		,
    +			$(SED) 's|^\([^#]*/mod_$(subst -,_,$(m))\)$$$$|#\1|g' $(PKG_BUILD_DIR)/modules.conf
    +		)
    +	)
    +endef
    +
    +define Build/Compile
    +	$(MAKE) -C $(PKG_BUILD_DIR) \
    +		AR="$(TARGET_CROSS)ar" \
    +		RANLIB="$(TARGET_CROSS)ranlib" \
    +		CC="$(TARGET_CC)" \
    +		CXX="$(TARGET_CXX)" \
    +		DESTDIR="$(PKG_INSTALL_DIR)" \
    +		LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
    +		all $(MAKE_INSTALL_TARGETS)
    +	$(SED) 's|^\([ \t]*\)\(.*\)"mod_console"\(.*\)$$$$|\1|' $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
    +	$(SED) 's|^\([ \t]*\)\(.*\)$$$$|\1\2"mod_syslog"\3\4|' $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
    +endef
    +
    +define Build/InstallDev
    +	$(INSTALL_DIR) $(1)/usr/include/$(PKG_NAME)
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/include/* $(1)/usr/include/$(PKG_NAME)/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).{a,so*} $(1)/usr/lib/
    +endef
    +
    +define Package/$(PKG_NAME)/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
    +	$(INSTALL_DIR) $(1)/usr/lib
    +	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so.* $(1)/usr/lib/
    +	$(INSTALL_DIR) $(1)/usr/lib/$(PKG_NAME)
    +	$(INSTALL_DIR) $(1)/etc/default
    +	$(INSTALL_DATA) ./files/$(PKG_NAME).default $(1)/etc/default/$(PKG_NAME)
    +	$(INSTALL_DIR) $(1)/etc/init.d
    +	$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
    +	$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
    +	$(INSTALL_DATA) ./files/$(PKG_NAME).hotplug $(1)/etc/hotplug.d/iface/90-$(PKG_NAME)
    +	$(INSTALL_DIR) $(1)/etc/config
    +	$(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
    +endef
    +
    +define Package/$(PKG_NAME)-collection-upstream-defaults/install
    +	$(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
    +endef
    +
    +define Package/$(PKG_NAME)-example-config/install
    +	$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/examples/conf
    +	$(CP) $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/* $(1)/usr/share/$(PKG_NAME)/examples/conf/
    +endef
    +
    +define Package/$(PKG_NAME)-config-upstream-defaults/install
    +	$(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
    +	$(CP) $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/* $(1)/etc/$(PKG_NAME)/
    +endef
    +
    +define Package/$(PKG_NAME)-collection-minimal/install
    +	$(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
    +endef
    +
    +define Package/$(PKG_NAME)-collection-uci-minimal/install
    +	$(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
    +endef
    +
    +define Package/$(PKG_NAME)-config-minimal/install
    +	$(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
    +	$(CP) ./files/etc.minimal/* $(1)/etc/$(PKG_NAME)/
    +endef
    +
    +define Package/$(PKG_NAME)-sounds-en/install
    +	$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/en $(1)/usr/share/$(PKG_NAME)/sounds/
    +endef
    +
    +define Package/$(PKG_NAME)-sounds-moh/install
    +	$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds
    +	$(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/music $(1)/usr/share/$(PKG_NAME)/sounds/
    +endef
    +
    +define Package/$(PKG_NAME)-tools/install
    +	$(INSTALL_DIR) $(1)/usr/bin
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_cli $(1)/usr/bin/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_encode $(1)/usr/bin/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_ivrd $(1)/usr/bin/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/fsxs $(1)/usr/bin/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/gentls_cert $(1)/usr/bin/
    +	$(CP) $(PKG_INSTALL_DIR)/usr/bin/tone2wav $(1)/usr/bin/
    +endef
    +
    +# 1. Name
    +# 2. Title
    +# 3. Files
    +# 4. Inter Depends
    +# 5. Extra Depends
    +define BuildPlugin
    +  define Package/$(PKG_NAME)-mod-$(1)
    +    $$(call Package/$(PKG_NAME)/Default)
    +    TITLE:= FS $(2) module
    +    DEPENDS:= $(PKG_NAME) $$(foreach m,$(4),+$(PKG_NAME)-mod-$$m) $(5)
    +  endef
    +
    +  define Package/$(PKG_NAME)-mod-$(1)/install
    +	[ -z "$(3)" ] || $(INSTALL_DIR) $$(1)/usr/lib/$(PKG_NAME)
    +	for f in $(3); do \
    +		$(CP) \
    +			$(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)/$$$$$$$${f}.so \
    +			$$(1)/usr/lib/$(PKG_NAME)/ ; \
    +	done
    +	if [ -d "./files/etc.packages/$(1)" ]; then \
    +		$(INSTALL_DIR) $$(1)/etc/$(PKG_NAME) ; \
    +		$(CP) \
    +			./files/etc.packages/$(1)/* \
    +			$$(1)/etc/$(PKG_NAME)/ ; \
    +	fi
    +  endef
    +
    +  define Package/$(PKG_NAME)-mod-$(1)/postinst
    +#!/bin/sh
    +sed -i -e 's|^\([ \t]*\)\(.*\)$$$$|\1\2"mod_$(subst -,_,$(1))"\3\4|' $$$${IPKG_INSTROOT}/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
    +  endef
    +
    +  define Package/$(PKG_NAME)-mod-$(1)/postrm
    +#!/bin/sh
    +sed -i -e 's|^\([ \t]*\)\(.*\)"mod_$(subst -,_,$(1))"\(.*\)$$$$|\1|' $$$${IPKG_INSTROOT}/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
    +  endef
    +
    +  $$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(1)))
    +endef
    +
    +$(eval $(call BuildPackage,$(PKG_NAME)))
    +$(eval $(call BuildPackage,$(PKG_NAME)-collection-upstream-defaults))
    +$(eval $(call BuildPackage,$(PKG_NAME)-collection-minimal))
    +$(eval $(call BuildPackage,$(PKG_NAME)-sounds-en))
    +$(eval $(call BuildPackage,$(PKG_NAME)-sounds-moh))
    +$(eval $(call BuildPackage,$(PKG_NAME)-tools))
    +$(eval $(call BuildPackage,$(PKG_NAME)-example-config))
    +$(eval $(call BuildPackage,$(PKG_NAME)-config-upstream-defaults))
    +$(eval $(call BuildPackage,$(PKG_NAME)-config-minimal))
    +
    +#$(eval $(call BuildPlugin,Name,Title,Files,Depends))
    +$(eval $(call BuildPlugin,alsa,Alsa endpoint,mod_alsa,,))
    +$(eval $(call BuildPlugin,amr,GSM-AMR codec,mod_amr,,))
    +$(eval $(call BuildPlugin,amrwb,GSM-AMRWB,mod_amrwb,,))
    +$(eval $(call BuildPlugin,avmd,Advanced Voice Mail Detection,mod_avmd,,))
    +$(eval $(call BuildPlugin,bv,codec mod_bv,mod_bv,,))
    +$(eval $(call BuildPlugin,callcenter,Call Center,mod_callcenter,,))
    +$(eval $(call BuildPlugin,cdr-csv,CSV-CDR handler,mod_cdr_csv,,))
    +$(eval $(call BuildPlugin,cdr-pg-csv,Postgress CDR handler,mod_cdr_pg_csv,,+libpq))
    +$(eval $(call BuildPlugin,cdr-sqlite,SQLite3 CDR handler,mod_cdr_sqlite,,+libsqlite3))
    +$(eval $(call BuildPlugin,celt,CELT ultra-low delay codec,mod_celt,,+libogg))
    +$(eval $(call BuildPlugin,cepstral,Cepstral interface,mod_cepstral,,@BROKEN)) # needs 
    +$(eval $(call BuildPlugin,cidlookup,applications mod_cidlookup,mod_cidlookup,,))
    +$(eval $(call BuildPlugin,cluechoo,Framework Demo,mod_cluechoo,,))
    +$(eval $(call BuildPlugin,codec2,CoDec 2,mod_codec2,,))
    +$(eval $(call BuildPlugin,commands,API commands,mod_commands,,))
    +$(eval $(call BuildPlugin,conference,Conference room,mod_conference,,))
    +$(eval $(call BuildPlugin,console,Console logger,mod_console,,))
    +$(eval $(call BuildPlugin,curl,HTTP request,mod_curl,,+libcurl))
    +$(eval $(call BuildPlugin,dahdi-codec,DAHDI codecs,mod_dahdi_codec,,))
    +$(eval $(call BuildPlugin,db,Database backend,mod_db,,))
    +$(eval $(call BuildPlugin,dialplan-asterisk,Asterisk dialplan parser,mod_dialplan_asterisk,,))
    +$(eval $(call BuildPlugin,dialplan-directory,Dialplan-Directory interface,mod_dialplan_directory,,))
    +$(eval $(call BuildPlugin,dialplan-xml,Dialplan-XML interface,mod_dialplan_xml,,))
    +$(eval $(call BuildPlugin,dingaling,Jabber interface,mod_dingaling,,+libgnutls-openssl)) 
    +$(eval $(call BuildPlugin,directory,application mod_directory,mod_directory,,))
    +$(eval $(call BuildPlugin,distributor,application mod_distributor,mod_distributor,,))
    +$(eval $(call BuildPlugin,dptools,Dialplan tools,mod_dptools,,))
    +$(eval $(call BuildPlugin,easyroute,DID routing,mod_easyroute,,))
    +$(eval $(call BuildPlugin,enum,ENUM routing,mod_enum,,))
    +$(eval $(call BuildPlugin,erlang-event,Erlang event handler,mod_erlang_event,,+erlang @BROKEN)) # fails to build
    +$(eval $(call BuildPlugin,esf,Extra SIP Functionality,mod_esf,,))
    +$(eval $(call BuildPlugin,event-multicast,Multicast event handler,mod_event_multicast,,))
    +$(eval $(call BuildPlugin,event-socket,Socket event handler,mod_event_socket,,))
    +$(eval $(call BuildPlugin,event-zmq,Socket event handler by Zero MQ,mod_event_zmq,, @BROKEN)) # needs ZeroMQ
    +$(eval $(call BuildPlugin,expr,Expression evaluation,mod_expr,,))
    +$(eval $(call BuildPlugin,fifo,FIFO,mod_fifo,,))
    +$(eval $(call BuildPlugin,file-string,File streaming,mod_file_string,,@OBSOLETE)) # merged into dptools
    +$(eval $(call BuildPlugin,flite,Festival TTS,mod_flite,,@(!(armeb||avr32)||BROKEN)))
    +$(eval $(call BuildPlugin,fsv,Video,mod_fsv,,))
    +$(eval $(call BuildPlugin,g723-1,G.723.1 codec,mod_g723_1,,))
    +$(eval $(call BuildPlugin,g729,G.729 codec,mod_g729,,))
    +$(eval $(call BuildPlugin,h26x,H26X linear codec,mod_h26x,,))
    +$(eval $(call BuildPlugin,h323,h323 endpoint,mod_h323,,@BROKEN)) # missing header files (other packages needed)
    +$(eval $(call BuildPlugin,hash,API for manipulating a hash table,mod_hash,,))
    +$(eval $(call BuildPlugin,ilbc,ILBC codec,mod_ilbc,,))
    +$(eval $(call BuildPlugin,java,Java language interface,mod_java,,@BROKEN)) # needs java
    +$(eval $(call BuildPlugin,lcr,Least Cost Routing,mod_lcr,,))
    +$(eval $(call BuildPlugin,ldap,LDAP interface,mod_ldap,,@BROKEN)) # fails in openldap
    +$(eval $(call BuildPlugin,local-stream,Local streaming,mod_local_stream,,))
    +$(eval $(call BuildPlugin,logfile,File logger,mod_logfile,,))
    +$(eval $(call BuildPlugin,loopback,Loopback endpoint,mod_loopback,,))
    +$(eval $(call BuildPlugin,lua,Lua language interface,mod_lua,,+libstdcpp))
    +$(eval $(call BuildPlugin,managed,language mod_managed,mod_managed,,@BROKEN)) # needs Mono
    +$(eval $(call BuildPlugin,memcache,MemCached interface,mod_memcache,,@BROKEN)) # fails in libmemcached
    +$(eval $(call BuildPlugin,mp4,MP4 File Format support for video apps,mod_mp4,,@BROKEN)) # needs libmp4v2
    +$(eval $(call BuildPlugin,native-file,Native files,mod_native_file,,))
    +$(eval $(call BuildPlugin,nibblebill,Billing,mod_nibblebill,,))
    +$(eval $(call BuildPlugin,opal,Multi-Protocol endpoint,mod_opal,,@BROKEN)) # needs Opal
    +$(eval $(call BuildPlugin,openzap,Zaptel hardware interface,mod_openzap ozmod_analog ozmod_analog_em ozmod_isdn ozmod_skel ozmod_zt,,+libpcap))
    +$(eval $(call BuildPlugin,perl,Perl language interface,mod_perl,,+perl @BROKEN)) # needs Perl
    +$(eval $(call BuildPlugin,pocketsphinx,PocketSphinx SR,mod_pocketsphinx,,@BROKEN)) # fails in sphinxbase
    +$(eval $(call BuildPlugin,portaudio,Local audio endpoint,mod_portaudio,,+alsa-lib))
    +$(eval $(call BuildPlugin,portaudio-stream,format mod_portaudio_stream,mod_portaudio_stream,,))
    +$(eval $(call BuildPlugin,python,Python language interface,mod_python,,@BROKEN)) # needs Python
    +$(eval $(call BuildPlugin,radius-cdr,Radius-CDR interface,mod_radius_cdr,,@BROKEN)) # fails in freeradius-client
    +$(eval $(call BuildPlugin,rss,RRS feeds via TTS,mod_rss,,))
    +$(eval $(call BuildPlugin,rtmp,RTMP Protocol Handler,mod_rtmp,,))
    +$(eval $(call BuildPlugin,say-de,German say,mod_say_de,,))
    +$(eval $(call BuildPlugin,say-en,English say,mod_say_en,,))
    +$(eval $(call BuildPlugin,say-es,Spanish say,mod_say_es,,))
    +$(eval $(call BuildPlugin,say-fr,French say,mod_say_fr,,))
    +$(eval $(call BuildPlugin,say-hu,Hungarian say,mod_say_hu,,))
    +$(eval $(call BuildPlugin,say-it,Italian say,mod_say_it,,))
    +$(eval $(call BuildPlugin,say-nl,Dutch say,mod_say_nl,,))
    +$(eval $(call BuildPlugin,say-pt,Portugeese say,mod_say_pt,,))
    +$(eval $(call BuildPlugin,say-ru,Russian say,mod_say_ru,,))
    +$(eval $(call BuildPlugin,say-th,Thai say,mod_say_th,,))
    +$(eval $(call BuildPlugin,say-zh,Chineese say,mod_say_zh,,))
    +$(eval $(call BuildPlugin,shell-stream,Shell stream,mod_shell_stream,,))
    +$(eval $(call BuildPlugin,shout,MP3 and Shoutcast stream,mod_shout,,@BROKEN)) # needs Ogg/Vorbis
    +$(eval $(call BuildPlugin,silk,codec mod_silk,mod_silk,,))
    +$(eval $(call BuildPlugin,siren,G.722.1 codec,mod_siren,,))
    +$(eval $(call BuildPlugin,skinny,endpoint mod_skinny,mod_skinny,,))
    +$(eval $(call BuildPlugin,skypopen,Skype compatible endpoint,mod_skypopen,,@BROKEN)) # needs 
    +$(eval $(call BuildPlugin,sangoma-codec,codec sangoma-codec,mod_sangoma_codec,,@BROKEN)) # Untested
    +$(eval $(call BuildPlugin,snapshot,application mod_snapshot,mod_snapshot,,))
    +$(eval $(call BuildPlugin,sndfile,Multi-Format file transcoder,mod_sndfile,,))
    +$(eval $(call BuildPlugin,snipe-hunt,application mod_snipe_hunt,mod_snipe_hunt,,))
    +$(eval $(call BuildPlugin,snom,SNOM specific features,mod_snom,,))
    +$(eval $(call BuildPlugin,sofia,SIP,mod_sofia,,))
    +$(eval $(call BuildPlugin,spandsp,Span DSP,mod_spandsp,,+libjpeg @BROKEN)) # fails to build because of -Werror
    +$(eval $(call BuildPlugin,speex,Speex codec,mod_speex,,))
    +$(eval $(call BuildPlugin,spidermonkey,JavaScript,mod_spidermonkey,,@BROKEN)) # fails in js
    +$(eval $(call BuildPlugin,spidermonkey-core_db,JavaScript DB,mod_spidermonkey_core_db,,@BROKEN))
    +$(eval $(call BuildPlugin,spidermonkey-curl,JavaScript Curl,mod_spidermonkey_curl,,@BROKEN))
    +$(eval $(call BuildPlugin,spidermonkey-odbc,JavaScript ODBC,mod_spidermonkey_odbc,,@BROKEN))
    +$(eval $(call BuildPlugin,spidermonkey-socket,JavaScript socket,mod_spidermonkey_socket,,@BROKEN))
    +$(eval $(call BuildPlugin,spidermonkey-teletone,JavaScript teletone,mod_spidermonkey_teletone,,@BROKEN))
    +$(eval $(call BuildPlugin,spy,User spy,mod_spy,,))
    +$(eval $(call BuildPlugin,stress,application mod_stress,mod_stress,,))
    +$(eval $(call BuildPlugin,syslog,SysLog logger,mod_syslog,,))
    +$(eval $(call BuildPlugin,tone-stream,Tone generation stream,mod_tone_stream,,))
    +$(eval $(call BuildPlugin,tts-commandline,ASR TTS cli,mod_tts_commandline,,))
    +$(eval $(call BuildPlugin,unimrcp,MRCP interface,mod_unimrcp,,@BROKEN))
    +$(eval $(call BuildPlugin,valet-parking,application mod_valet_parking,mod_valet_parking,,))
    +$(eval $(call BuildPlugin,vmd,VoiceMail beep detection,mod_vmd,,))
    +$(eval $(call BuildPlugin,voicemail,VoiceMail,mod_voicemail,,))
    +$(eval $(call BuildPlugin,xml-cdr,XML-CDR handler,mod_xml_cdr,,+libcurl))
    +$(eval $(call BuildPlugin,xml-curl,XML-Curl gateway,mod_xml_curl,,+libcurl))
    +$(eval $(call BuildPlugin,xml-ldap,LDAP-XML gateway,mod_xml_ldap,,@BROKEN)) # fails in openldap
    +$(eval $(call BuildPlugin,xml-rpc,XML-RPC interface,mod_xml_rpc,,))
    +$(eval $(call BuildPlugin,yaml,YAML dialplans,mod_yaml,,))
    +
    diff --git a/net/freeswitch/files/etc.minimal/autoload_configs/acl.conf.xml b/net/freeswitch/files/etc.minimal/autoload_configs/acl.conf.xml
    new file mode 100644
    index 0000000..0c117d0
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/autoload_configs/acl.conf.xml
    @@ -0,0 +1,32 @@
    +
    +  
    +    
    +
    +    
    +      
    +      
    +    
    +
    +    
    +    
    +      
    +      
    +      
    +      
    +    
    +
    +  
    +
    +
    diff --git a/net/freeswitch/files/etc.minimal/autoload_configs/callcenter.conf.xml b/net/freeswitch/files/etc.minimal/autoload_configs/callcenter.conf.xml
    new file mode 100644
    index 0000000..a069413
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/autoload_configs/callcenter.conf.xml
    @@ -0,0 +1,38 @@
    +
    +  
    +    
    +    
    +  
    +
    +  
    +
    +    
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +    
    +
    +  
    +
    +
    +
    +
    +  
    +    
    +  
    +  
    +    
    +    
    +  
    +
    + 
    diff --git a/net/freeswitch/files/etc.minimal/autoload_configs/console.conf.xml b/net/freeswitch/files/etc.minimal/autoload_configs/console.conf.xml
    new file mode 100644
    index 0000000..2d9e3e8
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/autoload_configs/console.conf.xml
    @@ -0,0 +1,56 @@
    +
    +  
    +  
    +  
    +    
    +    
    +    
    +    
    +  
    +  
    +    
    +    
    +    
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/autoload_configs/event_socket.conf.xml b/net/freeswitch/files/etc.minimal/autoload_configs/event_socket.conf.xml
    new file mode 100644
    index 0000000..5ea2e09
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/autoload_configs/event_socket.conf.xml
    @@ -0,0 +1,9 @@
    +
    +  
    +    
    +    
    +    
    +    
    +    
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/autoload_configs/local_stream.conf.xml b/net/freeswitch/files/etc.minimal/autoload_configs/local_stream.conf.xml
    new file mode 100644
    index 0000000..94a5665
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/autoload_configs/local_stream.conf.xml
    @@ -0,0 +1,49 @@
    +
    +  
    +  
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +  
    +
    +  
    +    
    +    
    +    
    +    
    +    
    +  
    +
    +  
    +    
    +    
    +    
    +    
    +    
    +  
    +
    +  
    +    
    +    
    +    
    +    
    +    
    +  
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/autoload_configs/lua.conf.xml b/net/freeswitch/files/etc.minimal/autoload_configs/lua.conf.xml
    new file mode 100644
    index 0000000..1eb594f
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/autoload_configs/lua.conf.xml
    @@ -0,0 +1,30 @@
    +
    +  
    +
    +    
    +    
    +    
    +
    +    
    +    
    +    
    +
    +    
    +    
    +
    +    
    +    
    +    
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/autoload_configs/modules.conf.xml b/net/freeswitch/files/etc.minimal/autoload_configs/modules.conf.xml
    new file mode 100644
    index 0000000..e73a07c
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/autoload_configs/modules.conf.xml
    @@ -0,0 +1,126 @@
    +
    +  
    +    
    +    
    +    
    +    
    +    
    +
    +    
    +
    +    
    +    
    +    
    +
    +    
    +    
    +    
    +    
    +
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +
    +    
    +    
    +
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +
    +    
    +    
    +
    +    
    +    
    +
    +    
    +    
    +    
    +    
    +
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +
    +    
    +    
    +    
    +
    +    
    +    
    +
    +    
    +    
    +    
    +
    +    
    +    
    +
    +    
    +    
    +    
    +    
    +    
    +    
    +
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +
    +    
    +    
    +
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/autoload_configs/post_load_modules.conf.xml b/net/freeswitch/files/etc.minimal/autoload_configs/post_load_modules.conf.xml
    new file mode 100644
    index 0000000..8f4e132
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/autoload_configs/post_load_modules.conf.xml
    @@ -0,0 +1,4 @@
    +
    +  
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/autoload_configs/sofia.conf.xml b/net/freeswitch/files/etc.minimal/autoload_configs/sofia.conf.xml
    new file mode 100644
    index 0000000..24252d0
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/autoload_configs/sofia.conf.xml
    @@ -0,0 +1,18 @@
    +
    +
    +  
    +    
    +    
    +    
    +  
    +
    +  
    +  
    +    
    +  
    +
    +
    diff --git a/net/freeswitch/files/etc.minimal/autoload_configs/spandsp.conf.xml b/net/freeswitch/files/etc.minimal/autoload_configs/spandsp.conf.xml
    new file mode 100644
    index 0000000..aed847f
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/autoload_configs/spandsp.conf.xml
    @@ -0,0 +1,73 @@
    +
    +   
    +
    +     
    +     
    +
    +     
    +     
    +       
    +         
    +       
    +       
    +         
    +         
    +         
    +       
    +       
    +         
    +         
    +       
    +       
    +         
    +         
    +       
    +     
    +
    +     
    +     
    +       
    +         
    +       
    +       
    +         
    +         
    +         
    +       
    +       
    +         
    +         
    +         
    +         
    +       
    +       
    +         
    +         
    +         
    +         
    +       
    +     
    +
    +     
    +     
    +       
    +         
    +       
    +       
    +         
    +         
    +         
    +       
    +       
    +         
    +         
    +       
    +       
    +         
    +         
    +       
    +     
    +   
    +
    +
    +
    diff --git a/net/freeswitch/files/etc.minimal/autoload_configs/switch.conf.xml b/net/freeswitch/files/etc.minimal/autoload_configs/switch.conf.xml
    new file mode 100644
    index 0000000..b0f0c53
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/autoload_configs/switch.conf.xml
    @@ -0,0 +1,123 @@
    +
    +
    +  
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +   
    +  
    +  
    +    
    +    
    +  
    +  
    +  
    +    
    +    
    +
    +    
    +    
    +
    +    
    +    
    +
    +    
    +    
    +    
    +    
    +
    +    
    +    
    +
    +    
    +    
    +    
    +    
    +    
    +    
    +	
    +    
    +	
    +    
    +	
    +    
    +        
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +  
    +
    +
    +
    diff --git a/net/freeswitch/files/etc.minimal/autoload_configs/timezones.conf.xml b/net/freeswitch/files/etc.minimal/autoload_configs/timezones.conf.xml
    new file mode 100644
    index 0000000..85c805f
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/autoload_configs/timezones.conf.xml
    @@ -0,0 +1,551 @@
    +
    +    
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +	
    +	
    +	
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +	
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +	
    +	
    +
    +	
    +	
    +	
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +    
    +
    diff --git a/net/freeswitch/files/etc.minimal/dialplan/default.xml b/net/freeswitch/files/etc.minimal/dialplan/default.xml
    new file mode 100644
    index 0000000..a368ee5
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/dialplan/default.xml
    @@ -0,0 +1,162 @@
    +
    +
    +
    +
    +  
    +
    +    
    +      
    +      
    +	
    +      
    +    
    +
    +    
    +      
    +	
    +      
    +    
    +
    +    
    +      
    +	
    +      
    +      
    +	
    +	
    +	
    +      
    +    
    +
    +    
    +    
    +
    +    
    +      
    +	
    +      
    +    
    +
    +    
    +      
    +	
    +	
    +	
    +      
    +    
    +
    +    
    +      
    +        
    +        
    +      
    +                 
    +
    +    
    +    
    +      
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +      
    +    
    +
    +    
    +      
    +	
    +	
    +	
    +	
    +      
    +    
    +
    +    
    +      
    +	
    +	
    +      
    +    
    +
    +    
    +      
    +	
    +	
    +      
    +    
    +
    +    
    +      
    +	
    +	
    +      
    +    
    +
    +    
    +      
    +	
    +	
    +      
    +    
    +
    +    
    +      
    +	
    +	
    +      
    +    
    +    
    +    
    +      
    +      
    +        
    +      
    +    
    +
    +    
    +    
    +    
    +    
    +
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/dialplan/default/PLACEHOLDER b/net/freeswitch/files/etc.minimal/dialplan/default/PLACEHOLDER
    new file mode 100644
    index 0000000..e69de29
    diff --git a/net/freeswitch/files/etc.minimal/dialplan/public.xml b/net/freeswitch/files/etc.minimal/dialplan/public.xml
    new file mode 100644
    index 0000000..b54aff9
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/dialplan/public.xml
    @@ -0,0 +1,68 @@
    +
    +
    +
    +
    +  
    +
    +    
    +      
    +      
    +	
    +      
    +    
    +    
    +    
    +      
    +	
    +	
    +      
    +    
    +
    +    
    +      
    +	
    +      
    +    
    +
    +    
    +      
    +	
    +      
    +    
    +    
    +    
    +    
    +    
    +    
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/dialplan/public/PLACEHOLDER b/net/freeswitch/files/etc.minimal/dialplan/public/PLACEHOLDER
    new file mode 100644
    index 0000000..e69de29
    diff --git a/net/freeswitch/files/etc.minimal/directory/default.xml b/net/freeswitch/files/etc.minimal/directory/default.xml
    new file mode 100644
    index 0000000..fd46fc9
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/directory/default.xml
    @@ -0,0 +1,43 @@
    +
    +
    +
    +  
    +  
    +    
    +      
    +    
    +
    +    
    +      
    +      
    +      
    +      
    +    
    +
    +    
    +      
    +	
    +	  
    +	
    +      
    +    
    +
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/directory/default/1000.xml b/net/freeswitch/files/etc.minimal/directory/default/1000.xml
    new file mode 100644
    index 0000000..9bee406
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/directory/default/1000.xml
    @@ -0,0 +1,18 @@
    +
    +  
    +    
    +      
    +      
    +    
    +    
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +    
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/directory/default/1001.xml b/net/freeswitch/files/etc.minimal/directory/default/1001.xml
    new file mode 100644
    index 0000000..97c1931
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/directory/default/1001.xml
    @@ -0,0 +1,18 @@
    +
    +  
    +    
    +      
    +      
    +    
    +    
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +    
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/directory/default/1002.xml b/net/freeswitch/files/etc.minimal/directory/default/1002.xml
    new file mode 100644
    index 0000000..d33691d
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/directory/default/1002.xml
    @@ -0,0 +1,18 @@
    +
    +  
    +    
    +      
    +      
    +    
    +    
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +    
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/directory/default/1003.xml b/net/freeswitch/files/etc.minimal/directory/default/1003.xml
    new file mode 100644
    index 0000000..f8b5926
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/directory/default/1003.xml
    @@ -0,0 +1,18 @@
    +
    +  
    +    
    +      
    +      
    +    
    +    
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +    
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/directory/default/1004.xml b/net/freeswitch/files/etc.minimal/directory/default/1004.xml
    new file mode 100644
    index 0000000..c3e7da5
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/directory/default/1004.xml
    @@ -0,0 +1,18 @@
    +
    +  
    +    
    +      
    +      
    +    
    +    
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +      
    +    
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/directory/default/default.xml b/net/freeswitch/files/etc.minimal/directory/default/default.xml
    new file mode 100644
    index 0000000..5db6011
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/directory/default/default.xml
    @@ -0,0 +1,26 @@
    +
    +   
    +    
    +    
    +      
    +      
    +      
    +      
    +      
    +    
    +  
    +
    diff --git a/net/freeswitch/files/etc.minimal/freeswitch.xml b/net/freeswitch/files/etc.minimal/freeswitch.xml
    new file mode 100644
    index 0000000..f520617
    --- /dev/null
    +++ b/net/freeswitch/files/etc.minimal/freeswitch.xml
    @@ -0,0 +1,70 @@
    +
    +
    +
    +  
    +  
    +  
    +
    +  
    + +
    + +
    + +
    + + + +
    + +
    + +
    + + + + + + +
    + +
    + + diff --git a/net/freeswitch/files/etc.minimal/fur_elise.ttml b/net/freeswitch/files/etc.minimal/fur_elise.ttml new file mode 100644 index 0000000..6e6ef03 --- /dev/null +++ b/net/freeswitch/files/etc.minimal/fur_elise.ttml @@ -0,0 +1,83 @@ +%(167, 0, 659) +%(167, 0, 622) +%(167, 0, 659) +%(167, 0, 622) +%(167, 0, 659) +%(167, 0, 494) +%(167, 0, 554) +%(167, 0, 523) +%(333, 0, 440) +%(167, 0, 0) +%(167, 0, 262) +%(167, 0, 330) +%(167, 0, 440) +%(333, 0, 494) +%(167, 0, 0) +%(167, 0, 330) +%(167, 0, 415) +%(167, 0, 494) +%(333, 0, 523) +%(167, 0, 0) +%(167, 0, 330) +%(167, 0, 659) +%(167, 0, 622) +%(167, 0, 659) +%(167, 0, 622) +%(167, 0, 659) +%(167, 0, 494) +%(167, 0, 554) +%(167, 0, 523) +%(333, 0, 440) +%(167, 0, 0) +%(167, 0, 262) +%(167, 0, 330) +%(167, 0, 440) +%(333, 0, 494) +%(167, 0, 0) +%(167, 0, 330) +%(167, 0, 523) +%(167, 0, 494) +%(167, 0, 440) +%(167, 0, 0) +%(167, 0, 494) +%(167, 0, 523) +%(167, 0, 587) +%(333, 0, 659) +%(167, 0, 0) +%(167, 0, 392) +%(167, 0, 698) +%(167, 0, 784) +%(333, 0, 587) +%(167, 0, 0) +%(167, 0, 349) +%(167, 0, 659) +%(167, 0, 587) +%(333, 0, 523) +%(167, 0, 0) +%(167, 0, 330) +%(167, 0, 587) +%(167, 0, 523) +%(333, 0, 494) +%(167, 0, 0) +%(167, 0, 330) +%(167, 0, 659) +%(167, 0, 330) +%(167, 0, 659) +%(167, 0, 659) +%(167, 0, 1319) +%(167, 0, 622) +%(167, 0, 659) +%(167, 0, 622) +%(167, 0, 659) +%(167, 0, 622) +%(167, 0, 659) +%(167, 0, 622) +%(167, 0, 659) +%(167, 0, 622) +%(167, 0, 659) +%(167, 0, 622) +%(167, 0, 659) +%(167, 0, 494) +%(167, 0, 554) +%(167, 0, 523) +%(333, 0, 440) diff --git a/net/freeswitch/files/etc.minimal/jingle_profiles/client.xml b/net/freeswitch/files/etc.minimal/jingle_profiles/client.xml new file mode 100644 index 0000000..cac7069 --- /dev/null +++ b/net/freeswitch/files/etc.minimal/jingle_profiles/client.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.minimal/jingle_profiles/server.xml b/net/freeswitch/files/etc.minimal/jingle_profiles/server.xml new file mode 100644 index 0000000..b60dc27 --- /dev/null +++ b/net/freeswitch/files/etc.minimal/jingle_profiles/server.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.minimal/mime.types b/net/freeswitch/files/etc.minimal/mime.types new file mode 100644 index 0000000..34d5fc9 --- /dev/null +++ b/net/freeswitch/files/etc.minimal/mime.types @@ -0,0 +1,983 @@ +# This is a comment. I love comments. + +# This file controls what Internet media types are sent to the client for +# given file extension(s). Sending the correct media type to the client +# is important so they know how to handle the content of the file. +# Extra types can either be added here or by using an AddType directive +# in your config files. For more information about Internet media types, +# please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type +# registry is at . + +# MIME type Extensions +application/activemessage +application/andrew-inset ez +application/applefile +application/atom+xml atom +application/atomcat+xml atomcat +application/atomicmail +application/atomsvc+xml atomsvc +application/auth-policy+xml +application/batch-smtp +application/beep+xml +application/cals-1840 +application/ccxml+xml ccxml +application/cellml+xml +application/cnrp+xml +application/commonground +application/conference-info+xml +application/cpl+xml +application/csta+xml +application/cstadata+xml +application/cybercash +application/davmount+xml davmount +application/dca-rft +application/dec-dx +application/dialog-info+xml +application/dicom +application/dns +application/dvcs +application/ecmascript ecma +application/edi-consent +application/edi-x12 +application/edifact +application/epp+xml +application/eshop +application/fastinfoset +application/fastsoap +application/fits +application/font-tdpfr pfr +application/h224 +application/http +application/hyperstudio stk +application/iges +application/im-iscomposing+xml +application/index +application/index.cmd +application/index.obj +application/index.response +application/index.vnd +application/iotp +application/ipp +application/isup +application/javascript js +application/json json +application/kpml-request+xml +application/kpml-response+xml +application/mac-binhex40 hqx +application/mac-compactpro cpt +application/macwriteii +application/marc mrc +application/mathematica ma nb mb +application/mathml+xml mathml +application/mbms-associated-procedure-description+xml +application/mbms-deregister+xml +application/mbms-envelope+xml +application/mbms-msk+xml +application/mbms-msk-response+xml +application/mbms-protection-description+xml +application/mbms-reception-report+xml +application/mbms-register+xml +application/mbms-register-response+xml +application/mbms-user-service-description+xml +application/mbox mbox +application/mediaservercontrol+xml mscml +application/mikey +application/mp4 mp4s +application/mpeg4-generic +application/mpeg4-iod +application/mpeg4-iod-xmt +application/msword doc dot +application/mxf mxf +application/nasdata +application/news-message-id +application/news-transmission +application/nss +application/ocsp-request +application/ocsp-response +application/octet-stream bin dms lha lzh class so iso dmg dist distz pkg bpk dump elc +application/oda oda +application/oebps-package+xml +application/ogg ogg +application/parityfec +application/pdf pdf +application/pgp-encrypted pgp +application/pgp-keys +application/pgp-signature asc sig +application/pics-rules prf +application/pidf+xml +application/pkcs10 p10 +application/pkcs7-mime p7m p7c +application/pkcs7-signature p7s +application/pkix-cert cer +application/pkix-crl crl +application/pkix-pkipath pkipath +application/pkixcmp pki +application/pls+xml pls +application/poc-settings+xml +application/postscript ai eps ps +application/prs.alvestrand.titrax-sheet +application/prs.cww cww +application/prs.nprend +application/prs.plucker +application/qsig +application/rdf+xml rdf +application/reginfo+xml rif +application/relax-ng-compact-syntax rnc +application/remote-printing +application/resource-lists+xml rl +application/riscos +application/rlmi+xml +application/rls-services+xml rs +application/rsd+xml rsd +application/rss+xml rss +application/rtf rtf +application/rtx +application/samlassertion+xml +application/samlmetadata+xml +application/sbml+xml sbml +application/sdp sdp +application/set-payment +application/set-payment-initiation setpay +application/set-registration +application/set-registration-initiation setreg +application/sgml +application/sgml-open-catalog +application/shf+xml shf +application/sieve +application/simple-filter+xml +application/simple-message-summary +application/simplesymbolcontainer +application/slate +application/smil +application/smil+xml smi smil +application/soap+fastinfoset +application/soap+xml +application/spirits-event+xml +application/srgs gram +application/srgs+xml grxml +application/ssml+xml ssml +application/timestamp-query +application/timestamp-reply +application/tve-trigger +application/vemmi +application/vividence.scriptfile +application/vnd.3gpp.bsf+xml +application/vnd.3gpp.pic-bw-large plb +application/vnd.3gpp.pic-bw-small psb +application/vnd.3gpp.pic-bw-var pvb +application/vnd.3gpp.sms +application/vnd.3gpp2.bcmcsinfo+xml +application/vnd.3gpp2.sms +application/vnd.3m.post-it-notes pwn +application/vnd.accpac.simply.aso aso +application/vnd.accpac.simply.imp imp +application/vnd.acucobol acu +application/vnd.acucorp atc acutc +application/vnd.adobe.xdp+xml xdp +application/vnd.adobe.xfdf xfdf +application/vnd.aether.imp +application/vnd.amiga.ami ami +application/vnd.anser-web-certificate-issue-initiation cii +application/vnd.anser-web-funds-transfer-initiation fti +application/vnd.antix.game-component atx +application/vnd.apple.installer+xml mpkg +application/vnd.audiograph aep +application/vnd.autopackage +application/vnd.avistar+xml +application/vnd.blueice.multipass mpm +application/vnd.bmi bmi +application/vnd.businessobjects rep +application/vnd.cab-jscript +application/vnd.canon-cpdl +application/vnd.canon-lips +application/vnd.cendio.thinlinc.clientconf +application/vnd.chemdraw+xml cdxml +application/vnd.chipnuts.karaoke-mmd mmd +application/vnd.cinderella cdy +application/vnd.cirpack.isdn-ext +application/vnd.claymore cla +application/vnd.clonk.c4group c4g c4d c4f c4p c4u +application/vnd.commerce-battelle +application/vnd.commonspace csp cst +application/vnd.contact.cmsg cdbcmsg +application/vnd.cosmocaller cmc +application/vnd.crick.clicker clkx +application/vnd.crick.clicker.keyboard clkk +application/vnd.crick.clicker.palette clkp +application/vnd.crick.clicker.template clkt +application/vnd.crick.clicker.wordbank clkw +application/vnd.criticaltools.wbs+xml wbs +application/vnd.ctc-posml pml +application/vnd.cups-pdf +application/vnd.cups-postscript +application/vnd.cups-ppd ppd +application/vnd.cups-raster +application/vnd.cups-raw +application/vnd.curl curl +application/vnd.cybank +application/vnd.data-vision.rdz rdz +application/vnd.denovo.fcselayout-link fe_launch +application/vnd.dna dna +application/vnd.dolby.mlp mlp +application/vnd.dpgraph dpg +application/vnd.dreamfactory dfac +application/vnd.dvb.esgcontainer +application/vnd.dvb.ipdcesgaccess +application/vnd.dxr +application/vnd.ecdis-update +application/vnd.ecowin.chart mag +application/vnd.ecowin.filerequest +application/vnd.ecowin.fileupdate +application/vnd.ecowin.series +application/vnd.ecowin.seriesrequest +application/vnd.ecowin.seriesupdate +application/vnd.enliven nml +application/vnd.epson.esf esf +application/vnd.epson.msf msf +application/vnd.epson.quickanime qam +application/vnd.epson.salt slt +application/vnd.epson.ssf ssf +application/vnd.ericsson.quickcall +application/vnd.eszigno3+xml es3 et3 +application/vnd.eudora.data +application/vnd.ezpix-album ez2 +application/vnd.ezpix-package ez3 +application/vnd.fdf fdf +application/vnd.ffsns +application/vnd.fints +application/vnd.flographit gph +application/vnd.fluxtime.clip ftc +application/vnd.framemaker fm frame maker +application/vnd.frogans.fnc fnc +application/vnd.frogans.ltf ltf +application/vnd.fsc.weblaunch fsc +application/vnd.fujitsu.oasys oas +application/vnd.fujitsu.oasys2 oa2 +application/vnd.fujitsu.oasys3 oa3 +application/vnd.fujitsu.oasysgp fg5 +application/vnd.fujitsu.oasysprs bh2 +application/vnd.fujixerox.art-ex +application/vnd.fujixerox.art4 +application/vnd.fujixerox.hbpl +application/vnd.fujixerox.ddd ddd +application/vnd.fujixerox.docuworks xdw +application/vnd.fujixerox.docuworks.binder xbd +application/vnd.fut-misnet +application/vnd.fuzzysheet fzs +application/vnd.genomatix.tuxedo txd +application/vnd.google-earth.kml+xml kml +application/vnd.google-earth.kmz kmz +application/vnd.grafeq gqf gqs +application/vnd.gridmp +application/vnd.groove-account gac +application/vnd.groove-help ghf +application/vnd.groove-identity-message gim +application/vnd.groove-injector grv +application/vnd.groove-tool-message gtm +application/vnd.groove-tool-template tpl +application/vnd.groove-vcard vcg +application/vnd.handheld-entertainment+xml zmm +application/vnd.hbci hbci +application/vnd.hcl-bireports +application/vnd.hhe.lesson-player les +application/vnd.hp-hpgl hpgl +application/vnd.hp-hpid hpid +application/vnd.hp-hps hps +application/vnd.hp-jlyt jlt +application/vnd.hp-pcl pcl +application/vnd.hp-pclxl pclxl +application/vnd.httphone +application/vnd.hzn-3d-crossword x3d +application/vnd.ibm.afplinedata +application/vnd.ibm.electronic-media +application/vnd.ibm.minipay mpy +application/vnd.ibm.modcap afp listafp list3820 +application/vnd.ibm.rights-management irm +application/vnd.ibm.secure-container sc +application/vnd.igloader igl +application/vnd.immervision-ivp ivp +application/vnd.immervision-ivu ivu +application/vnd.informedcontrol.rms+xml +application/vnd.intercon.formnet xpw xpx +application/vnd.intertrust.digibox +application/vnd.intertrust.nncp +application/vnd.intu.qbo qbo +application/vnd.intu.qfx qfx +application/vnd.ipunplugged.rcprofile rcprofile +application/vnd.irepository.package+xml irp +application/vnd.is-xpr xpr +application/vnd.jam jam +application/vnd.japannet-directory-service +application/vnd.japannet-jpnstore-wakeup +application/vnd.japannet-payment-wakeup +application/vnd.japannet-registration +application/vnd.japannet-registration-wakeup +application/vnd.japannet-setstore-wakeup +application/vnd.japannet-verification +application/vnd.japannet-verification-wakeup +application/vnd.jcp.javame.midlet-rms rms +application/vnd.jisp jisp +application/vnd.kahootz ktz ktr +application/vnd.kde.karbon karbon +application/vnd.kde.kchart chrt +application/vnd.kde.kformula kfo +application/vnd.kde.kivio flw +application/vnd.kde.kontour kon +application/vnd.kde.kpresenter kpr kpt +application/vnd.kde.kspread ksp +application/vnd.kde.kword kwd kwt +application/vnd.kenameaapp htke +application/vnd.kidspiration kia +application/vnd.kinar kne knp +application/vnd.koan skp skd skt skm +application/vnd.liberty-request+xml +application/vnd.llamagraphics.life-balance.desktop lbd +application/vnd.llamagraphics.life-balance.exchange+xml lbe +application/vnd.lotus-1-2-3 123 +application/vnd.lotus-approach apr +application/vnd.lotus-freelance pre +application/vnd.lotus-notes nsf +application/vnd.lotus-organizer org +application/vnd.lotus-screencam scm +application/vnd.lotus-wordpro lwp +application/vnd.macports.portpkg portpkg +application/vnd.marlin.drm.actiontoken+xml +application/vnd.marlin.drm.conftoken+xml +application/vnd.marlin.drm.mdcf +application/vnd.mcd mcd +application/vnd.medcalcdata mc1 +application/vnd.mediastation.cdkey cdkey +application/vnd.meridian-slingshot +application/vnd.mfer mwf +application/vnd.mfmp mfm +application/vnd.micrografx.flo flo +application/vnd.micrografx.igx igx +application/vnd.mif mif +application/vnd.minisoft-hp3000-save +application/vnd.mitsubishi.misty-guard.trustweb +application/vnd.mobius.daf daf +application/vnd.mobius.dis dis +application/vnd.mobius.mbk mbk +application/vnd.mobius.mqy mqy +application/vnd.mobius.msl msl +application/vnd.mobius.plc plc +application/vnd.mobius.txf txf +application/vnd.mophun.application mpn +application/vnd.mophun.certificate mpc +application/vnd.motorola.flexsuite +application/vnd.motorola.flexsuite.adsi +application/vnd.motorola.flexsuite.fis +application/vnd.motorola.flexsuite.gotap +application/vnd.motorola.flexsuite.kmr +application/vnd.motorola.flexsuite.ttc +application/vnd.motorola.flexsuite.wem +application/vnd.mozilla.xul+xml xul +application/vnd.ms-artgalry cil +application/vnd.ms-asf asf +application/vnd.ms-cab-compressed cab +application/vnd.ms-excel xls xlm xla xlc xlt xlw +application/vnd.ms-fontobject eot +application/vnd.ms-htmlhelp chm +application/vnd.ms-ims ims +application/vnd.ms-lrm lrm +application/vnd.ms-playready.initiator+xml +application/vnd.ms-powerpoint ppt pps pot +application/vnd.ms-project mpp mpt +application/vnd.ms-tnef +application/vnd.ms-wmdrm.lic-chlg-req +application/vnd.ms-wmdrm.lic-resp +application/vnd.ms-wmdrm.meter-chlg-req +application/vnd.ms-wmdrm.meter-resp +application/vnd.ms-works wps wks wcm wdb +application/vnd.ms-wpl wpl +application/vnd.ms-xpsdocument xps +application/vnd.mseq mseq +application/vnd.msign +application/vnd.music-niff +application/vnd.musician mus +application/vnd.ncd.control +application/vnd.nervana +application/vnd.netfpx +application/vnd.neurolanguage.nlu nlu +application/vnd.noblenet-directory nnd +application/vnd.noblenet-sealer nns +application/vnd.noblenet-web nnw +application/vnd.nokia.catalogs +application/vnd.nokia.conml+wbxml +application/vnd.nokia.conml+xml +application/vnd.nokia.isds-radio-presets +application/vnd.nokia.iptv.config+xml +application/vnd.nokia.landmark+wbxml +application/vnd.nokia.landmark+xml +application/vnd.nokia.landmarkcollection+xml +application/vnd.nokia.n-gage.ac+xml +application/vnd.nokia.n-gage.data ngdat +application/vnd.nokia.n-gage.symbian.install n-gage +application/vnd.nokia.ncd +application/vnd.nokia.pcd+wbxml +application/vnd.nokia.pcd+xml +application/vnd.nokia.radio-preset rpst +application/vnd.nokia.radio-presets rpss +application/vnd.novadigm.edm edm +application/vnd.novadigm.edx edx +application/vnd.novadigm.ext ext +application/vnd.oasis.opendocument.chart odc +application/vnd.oasis.opendocument.chart-template otc +application/vnd.oasis.opendocument.formula odf +application/vnd.oasis.opendocument.formula-template otf +application/vnd.oasis.opendocument.graphics odg +application/vnd.oasis.opendocument.graphics-template otg +application/vnd.oasis.opendocument.image odi +application/vnd.oasis.opendocument.image-template oti +application/vnd.oasis.opendocument.presentation odp +application/vnd.oasis.opendocument.presentation-template otp +application/vnd.oasis.opendocument.spreadsheet ods +application/vnd.oasis.opendocument.spreadsheet-template ots +application/vnd.oasis.opendocument.text odt +application/vnd.oasis.opendocument.text-master otm +application/vnd.oasis.opendocument.text-template ott +application/vnd.oasis.opendocument.text-web oth +application/vnd.obn +application/vnd.olpc-sugar xo +application/vnd.oma-scws-config +application/vnd.oma-scws-http-request +application/vnd.oma-scws-http-response +application/vnd.oma.bcast.associated-procedure-parameter+xml +application/vnd.oma.bcast.drm-trigger+xml +application/vnd.oma.bcast.imd+xml +application/vnd.oma.bcast.notification+xml +application/vnd.oma.bcast.sgboot +application/vnd.oma.bcast.sgdd+xml +application/vnd.oma.bcast.sgdu +application/vnd.oma.bcast.simple-symbol-container +application/vnd.oma.bcast.smartcard-trigger+xml +application/vnd.oma.bcast.sprov+xml +application/vnd.oma.dd2+xml dd2 +application/vnd.oma.drm.risd+xml +application/vnd.oma.group-usage-list+xml +application/vnd.oma.poc.groups+xml +application/vnd.oma.xcap-directory+xml +application/vnd.omads-email+xml +application/vnd.omads-file+xml +application/vnd.omads-folder+xml +application/vnd.omaloc-supl-init +application/vnd.openofficeorg.extension oxt +application/vnd.osa.netdeploy +application/vnd.osgi.dp dp +application/vnd.otps.ct-kip+xml +application/vnd.palm prc pdb pqa oprc +application/vnd.paos.xml +application/vnd.pg.format str +application/vnd.pg.osasli ei6 +application/vnd.piaccess.application-licence +application/vnd.picsel efif +application/vnd.poc.group-advertisement+xml +application/vnd.pocketlearn plf +application/vnd.powerbuilder6 pbd +application/vnd.powerbuilder6-s +application/vnd.powerbuilder7 +application/vnd.powerbuilder7-s +application/vnd.powerbuilder75 +application/vnd.powerbuilder75-s +application/vnd.preminet +application/vnd.previewsystems.box box +application/vnd.proteus.magazine mgz +application/vnd.publishare-delta-tree qps +application/vnd.pvi.ptid1 ptid +application/vnd.pwg-multiplexed +application/vnd.pwg-xhtml-print+xml +application/vnd.qualcomm.brew-app-res +application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb +application/vnd.rapid +application/vnd.recordare.musicxml mxl +application/vnd.recordare.musicxml+xml +application/vnd.renlearn.rlprint +application/vnd.rn-realmedia rm +application/vnd.ruckus.download +application/vnd.s3sms +application/vnd.scribus +application/vnd.sealed.3df +application/vnd.sealed.csf +application/vnd.sealed.doc +application/vnd.sealed.eml +application/vnd.sealed.mht +application/vnd.sealed.net +application/vnd.sealed.ppt +application/vnd.sealed.tiff +application/vnd.sealed.xls +application/vnd.sealedmedia.softseal.html +application/vnd.sealedmedia.softseal.pdf +application/vnd.seemail see +application/vnd.sema sema +application/vnd.semd semd +application/vnd.semf semf +application/vnd.shana.informed.formdata ifm +application/vnd.shana.informed.formtemplate itp +application/vnd.shana.informed.interchange iif +application/vnd.shana.informed.package ipk +application/vnd.simtech-mindmapper twd twds +application/vnd.smaf mmf +application/vnd.solent.sdkm+xml sdkm sdkd +application/vnd.spotfire.dxp dxp +application/vnd.spotfire.sfs sfs +application/vnd.sss-cod +application/vnd.sss-dtf +application/vnd.sss-ntf +application/vnd.street-stream +application/vnd.sun.wadl+xml +application/vnd.sus-calendar sus susp +application/vnd.svd svd +application/vnd.swiftview-ics +application/vnd.syncml+xml xsm +application/vnd.syncml.dm+wbxml bdm +application/vnd.syncml.dm+xml xdm +application/vnd.syncml.ds.notification +application/vnd.tao.intent-module-archive tao +application/vnd.tmobile-livetv tmo +application/vnd.trid.tpt tpt +application/vnd.triscape.mxs mxs +application/vnd.trueapp tra +application/vnd.truedoc +application/vnd.ufdl ufd ufdl +application/vnd.uiq.theme utz +application/vnd.umajin umj +application/vnd.unity unityweb +application/vnd.uoml+xml uoml +application/vnd.uplanet.alert +application/vnd.uplanet.alert-wbxml +application/vnd.uplanet.bearer-choice +application/vnd.uplanet.bearer-choice-wbxml +application/vnd.uplanet.cacheop +application/vnd.uplanet.cacheop-wbxml +application/vnd.uplanet.channel +application/vnd.uplanet.channel-wbxml +application/vnd.uplanet.list +application/vnd.uplanet.list-wbxml +application/vnd.uplanet.listcmd +application/vnd.uplanet.listcmd-wbxml +application/vnd.uplanet.signal +application/vnd.vcx vcx +application/vnd.vd-study +application/vnd.vectorworks +application/vnd.vidsoft.vidconference +application/vnd.visio vsd vst vss vsw +application/vnd.visionary vis +application/vnd.vividence.scriptfile +application/vnd.vsf vsf +application/vnd.wap.sic +application/vnd.wap.slc +application/vnd.wap.wbxml wbxml +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/vnd.webturbo wtb +application/vnd.wfa.wsc +application/vnd.wordperfect wpd +application/vnd.wqd wqd +application/vnd.wrq-hp3000-labelled +application/vnd.wt.stf stf +application/vnd.wv.csp+wbxml +application/vnd.wv.csp+xml +application/vnd.wv.ssp+xml +application/vnd.xara xar +application/vnd.xfdl xfdl +application/vnd.xmpie.cpkg +application/vnd.xmpie.dpkg +application/vnd.xmpie.plan +application/vnd.xmpie.ppkg +application/vnd.xmpie.xlim +application/vnd.yamaha.hv-dic hvd +application/vnd.yamaha.hv-script hvs +application/vnd.yamaha.hv-voice hvp +application/vnd.yamaha.smaf-audio saf +application/vnd.yamaha.smaf-phrase spf +application/vnd.yellowriver-custom-menu cmp +application/vnd.zzazz.deck+xml zaz +application/voicexml+xml vxml +application/watcherinfo+xml +application/whoispp-query +application/whoispp-response +application/winhlp hlp +application/wita +application/wordperfect5.1 +application/wsdl+xml wsdl +application/wspolicy+xml wspolicy +application/x-ace-compressed ace +application/x-bcpio bcpio +application/x-bittorrent torrent +application/x-bzip bz +application/x-bzip2 bz2 boz +application/x-cdlink vcd +application/x-chat chat +application/x-chess-pgn pgn +application/x-compress +application/x-cpio cpio +application/x-csh csh +application/x-director dcr dir dxr fgd +application/x-dvi dvi +application/x-futuresplash spl +application/x-gtar gtar +application/x-gzip +application/x-hdf hdf +application/x-latex latex +application/x-ms-wmd wmd +application/x-ms-wmz wmz +application/x-msaccess mdb +application/x-msbinder obd +application/x-mscardfile crd +application/x-msclip clp +application/x-msdownload exe dll com bat msi +application/x-msmediaview mvb m13 m14 +application/x-msmetafile wmf +application/x-msmoney mny +application/x-mspublisher pub +application/x-msschedule scd +application/x-msterminal trm +application/x-mswrite wri +application/x-netcdf nc cdf +application/x-pkcs12 p12 pfx +application/x-pkcs7-certificates p7b spc +application/x-pkcs7-certreqresp p7r +application/x-rar-compressed rar +application/x-sh sh +application/x-shar shar +application/x-shockwave-flash swf +application/x-stuffit sit +application/x-stuffitx sitx +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-tar tar +application/x-tcl tcl +application/x-tex tex +application/x-texinfo texinfo texi +application/x-ustar ustar +application/x-wais-source src +application/x-x509-ca-cert der crt +application/x400-bp +application/xcap-att+xml +application/xcap-caps+xml +application/xcap-el+xml +application/xcap-error+xml +application/xcap-ns+xml +application/xenc+xml xenc +application/xhtml+xml xhtml xht +application/xml xml xsl +application/xml-dtd dtd +application/xml-external-parsed-entity +application/xmpp+xml +application/xop+xml xop +application/xslt+xml xslt +application/xspf+xml xspf +application/xv+xml mxml xhvml xvml xvm +application/zip zip +audio/32kadpcm +audio/3gpp +audio/3gpp2 +audio/ac3 +audio/amr +audio/amr-wb +audio/amr-wb+ +audio/asc +audio/basic au snd +audio/bv16 +audio/bv32 +audio/clearmode +audio/cn +audio/dat12 +audio/dls +audio/dsr-es201108 +audio/dsr-es202050 +audio/dsr-es202211 +audio/dsr-es202212 +audio/dvi4 +audio/eac3 +audio/evrc +audio/evrc-qcp +audio/evrc0 +audio/evrc1 +audio/evrcb +audio/evrcb0 +audio/evrcb1 +audio/g722 +audio/g7221 +audio/g723 +audio/g726-16 +audio/g726-24 +audio/g726-32 +audio/g726-40 +audio/g728 +audio/g729 +audio/g7291 +audio/g729d +audio/g729e +audio/gsm +audio/gsm-efr +audio/ilbc +audio/l16 +audio/l20 +audio/l24 +audio/l8 +audio/lpc +audio/midi mid midi kar rmi +audio/mobile-xmf +audio/mp4 mp4a +audio/mp4a-latm +audio/mpa +audio/mpa-robust +audio/mpeg mpga mp2 mp2a mp3 m2a m3a +audio/mpeg4-generic +audio/parityfec +audio/pcma +audio/pcmu +audio/prs.sid +audio/qcelp +audio/red +audio/rtp-enc-aescm128 +audio/rtp-midi +audio/rtx +audio/smv +audio/smv0 +audio/smv-qcp +audio/sp-midi +audio/t140c +audio/t38 +audio/telephone-event +audio/tone +audio/vdvi +audio/vmr-wb +audio/vnd.3gpp.iufp +audio/vnd.4sb +audio/vnd.audiokoz +audio/vnd.celp +audio/vnd.cisco.nse +audio/vnd.cmles.radio-events +audio/vnd.cns.anp1 +audio/vnd.cns.inf1 +audio/vnd.digital-winds eol +audio/vnd.dlna.adts +audio/vnd.dolby.mlp +audio/vnd.everad.plj +audio/vnd.hns.audio +audio/vnd.lucent.voice lvp +audio/vnd.nokia.mobile-xmf +audio/vnd.nortel.vbk +audio/vnd.nuera.ecelp4800 ecelp4800 +audio/vnd.nuera.ecelp7470 ecelp7470 +audio/vnd.nuera.ecelp9600 ecelp9600 +audio/vnd.octel.sbc +audio/vnd.qcelp +audio/vnd.rhetorex.32kadpcm +audio/vnd.sealedmedia.softseal.mpeg +audio/vnd.vmx.cvsd +audio/wav wav +audio/x-aiff aif aiff aifc +audio/x-mpegurl m3u +audio/x-ms-wax wax +audio/x-ms-wma wma +audio/x-pn-realaudio ram ra +audio/x-pn-realaudio-plugin rmp +audio/x-wav wav +chemical/x-cdx cdx +chemical/x-cif cif +chemical/x-cmdf cmdf +chemical/x-cml cml +chemical/x-csml csml +chemical/x-pdb pdb +chemical/x-xyz xyz +image/bmp bmp +image/cgm cgm +image/fits +image/g3fax g3 +image/gif gif +image/ief ief +image/jp2 +image/jpeg jpeg jpg jpe +image/jpm +image/jpx +image/naplps +image/png png +image/prs.btif btif +image/prs.pti +image/svg+xml svg svgz +image/t38 +image/tiff tiff tif +image/tiff-fx +image/vnd.adobe.photoshop psd +image/vnd.cns.inf2 +image/vnd.djvu djvu djv +image/vnd.dwg dwg +image/vnd.dxf dxf +image/vnd.fastbidsheet fbs +image/vnd.fpx fpx +image/vnd.fst fst +image/vnd.fujixerox.edmics-mmr mmr +image/vnd.fujixerox.edmics-rlc rlc +image/vnd.globalgraphics.pgb +image/vnd.microsoft.icon ico +image/vnd.mix +image/vnd.ms-modi mdi +image/vnd.net-fpx npx +image/vnd.sealed.png +image/vnd.sealedmedia.softseal.gif +image/vnd.sealedmedia.softseal.jpg +image/vnd.svf +image/vnd.wap.wbmp wbmp +image/vnd.xiff xif +image/x-cmu-raster ras +image/x-cmx cmx +image/x-icon +image/x-pcx pcx +image/x-pict pic pct +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd +message/cpim +message/delivery-status +message/disposition-notification +message/external-body +message/http +message/news +message/partial +message/rfc822 eml mime +message/s-http +message/sip +message/sipfrag +message/tracking-status +model/iges igs iges +model/mesh msh mesh silo +model/vnd.dwf dwf +model/vnd.flatland.3dml +model/vnd.gdl gdl +model/vnd.gs.gdl +model/vnd.gtw gtw +model/vnd.moml+xml +model/vnd.mts mts +model/vnd.parasolid.transmit.binary +model/vnd.parasolid.transmit.text +model/vnd.vtu vtu +model/vrml wrl vrml +multipart/alternative +multipart/appledouble +multipart/byteranges +multipart/digest +multipart/encrypted +multipart/form-data +multipart/header-set +multipart/mixed +multipart/parallel +multipart/related +multipart/report +multipart/signed +multipart/voice-message +text/calendar ics ifb +text/css css +text/csv csv +text/directory +text/dns +text/enriched +text/html html htm +text/parityfec +text/plain txt text conf def list log in +text/prs.fallenstein.rst +text/prs.lines.tag dsc +text/red +text/rfc822-headers +text/richtext rtx +text/rtf +text/rtp-enc-aescm128 +text/rtx +text/sgml sgml sgm +text/t140 +text/tab-separated-values tsv +text/troff t tr roff man me ms +text/uri-list uri uris urls +text/vnd.abc +text/vnd.curl +text/vnd.dmclientscript +text/vnd.esmertec.theme-descriptor +text/vnd.fly fly +text/vnd.fmi.flexstor flx +text/vnd.in3d.3dml 3dml +text/vnd.in3d.spot spot +text/vnd.iptc.newsml +text/vnd.iptc.nitf +text/vnd.latex-z +text/vnd.motorola.reflex +text/vnd.ms-mediapackage +text/vnd.net2phone.commcenter.command +text/vnd.sun.j2me.app-descriptor jad +text/vnd.trolltech.linguist +text/vnd.wap.si +text/vnd.wap.sl +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/x-asm s asm +text/x-c c cc cxx cpp h hh dic +text/x-fortran f for f77 f90 +text/x-pascal p pas +text/x-java-source java +text/x-setext etx +text/x-uuencode uu +text/x-vcalendar vcs +text/x-vcard vcf +text/xml +text/xml-external-parsed-entity +video/3gpp 3gp +video/3gpp-tt +video/3gpp2 3g2 +video/bmpeg +video/bt656 +video/celb +video/dv +video/h261 h261 +video/h263 h263 +video/h263-1998 +video/h263-2000 +video/h264 h264 +video/jpeg jpgv +video/jpm jpm jpgm +video/mj2 mj2 mjp2 +video/mp1s +video/mp2p +video/mp2t +video/mp4 mp4 mp4v mpg4 +video/mp4v-es +video/mpeg mpeg mpg mpe m1v m2v +video/mpeg4-generic +video/mpv +video/nv +video/parityfec +video/pointer +video/quicktime qt mov +video/raw +video/rtp-enc-aescm128 +video/rtx +video/smpte292m +video/vc1 +video/vnd.dlna.mpeg-tts +video/vnd.fvt fvt +video/vnd.hns.video +video/vnd.motorola.video +video/vnd.motorola.videop +video/vnd.mpegurl mxu m4u +video/vnd.nokia.interleaved-multimedia +video/vnd.nokia.videovoip +video/vnd.objectvideo +video/vnd.sealed.mpeg1 +video/vnd.sealed.mpeg4 +video/vnd.sealed.swf +video/vnd.sealedmedia.softseal.mov +video/vnd.vivo viv +video/x-fli fli +video/x-ms-asf asf asx +video/x-ms-wm wm +video/x-ms-wmv wmv +video/x-ms-wmx wmx +video/x-ms-wvx wvx +video/x-msvideo avi +video/x-sgi-movie movie +x-conference/x-cooltalk ice diff --git a/net/freeswitch/files/etc.minimal/sip_profiles/external.xml b/net/freeswitch/files/etc.minimal/sip_profiles/external.xml new file mode 100644 index 0000000..8f10763 --- /dev/null +++ b/net/freeswitch/files/etc.minimal/sip_profiles/external.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.minimal/sip_profiles/external/example.xml b/net/freeswitch/files/etc.minimal/sip_profiles/external/example.xml new file mode 100644 index 0000000..63508fb --- /dev/null +++ b/net/freeswitch/files/etc.minimal/sip_profiles/external/example.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.minimal/sip_profiles/internal.xml b/net/freeswitch/files/etc.minimal/sip_profiles/internal.xml new file mode 100644 index 0000000..eda2486 --- /dev/null +++ b/net/freeswitch/files/etc.minimal/sip_profiles/internal.xml @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.minimal/sip_profiles/internal/example.xml b/net/freeswitch/files/etc.minimal/sip_profiles/internal/example.xml new file mode 100644 index 0000000..220df0d --- /dev/null +++ b/net/freeswitch/files/etc.minimal/sip_profiles/internal/example.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.minimal/tetris.ttml b/net/freeswitch/files/etc.minimal/tetris.ttml new file mode 100644 index 0000000..2e33a5d --- /dev/null +++ b/net/freeswitch/files/etc.minimal/tetris.ttml @@ -0,0 +1,69 @@ +%(428,0,659,494) +%(214,0,494,415) +%(214,0,523,440) +%(214,0,587,494) +%(107,0,659,494) +%(107,0,587,494) +%(214,0,523,440) +%(214,0,494,415) +%(428,0,330,440) +%(214,0,330,440) +%(214,0,523,440) +%(428,0,659,523) +%(214,0,587,494) +%(214,0,523,440) +%(214,0,494,415) +%(214,0,494,440) +%(214,0,494,415) +%(214,0,523,440) +%(428,0,587,494) +%(428,0,659,523) +%(428,0,523,440) +%(428,0,330,440) +%(857,0,330,440) +%(214,0,0,0) +%(428,0,587,349) +%(214,0,698,440) +%(214,0,880,523) +%(107,0,880,523) +%(107,0,880,523) +%(214,0,784,494) +%(214,0,698,440) +%(642,0,659,392) +%(214,0,523,330) +%(214,0,659,392) +%(107,0,659,440) +%(107,0,659,392) +%(214,0,587,349) +%(214,0,523,330) +%(214,0,494,415) +%(214,0,494,330) +%(214,0,494,415) +%(214,0,523,440) +%(214,0,587,494) +%(214,0,587,415) +%(214,0,659,523) +%(214,0,659,415) +%(214,0,523,440) +%(214,0,523,330) +%(428,0,440,330) +%(428,0,440,330) +%(428,0,0,0) +%(857,0,330,262) +%(857,0,262,220) +%(857,0,294,247) +%(857,0,247,208) +%(857,0,262,220) +%(857,0,220,165) +%(857,0,208,165) +%(428,0,247,208) +%(428,0,0,0) +%(857,0,330,262) +%(857,0,262,220) +%(857,0,294,247) +%(857,0,208,165) +%(428,0,262,220) +%(428,0,330,262) +%(857,0,440,330) +%(857,0,415,294) +%(857,0,0,0) diff --git a/net/freeswitch/files/etc.minimal/tones.conf b/net/freeswitch/files/etc.minimal/tones.conf new file mode 100644 index 0000000..36db1d4 --- /dev/null +++ b/net/freeswitch/files/etc.minimal/tones.conf @@ -0,0 +1,63 @@ +[us] +generate-dial => v=-7;%(1000,0,350,440) +detect-dial => 350,440 + +generate-ring => v=-7;%(2000,4000,440,480) +detect-ring => 440,480 + +generate-busy => v=-7;%(500,500,480,620) +detect-busy => 480,620 + +generate-attn => v=0;%(100,100,1400,2060,2450,2600) +detect-attn => 1400,2060,2450,2600 + +generate-callwaiting-sas => v=0;%(300,0,440) +detect-callwaiting-sas => 440 + +generate-callwaiting-cas => v=0;%(80,0,2750,2130) +detect-callwaiting-cas => 2750,2130 + +detect-fail1 => 913.8 +detect-fail2 => 1370.6 +detect-fail3 => 1776.7 + + +[sg] +generate-dial => v=-7;%(1000,0,425) +detect-dial => 425 + +generate-ring => v=-7;%(2000,4000,425) +detect-ring => 425 + +generate-busy => v=-7;%(750,750,425) +detect-busy => 425 + +generate-attn => v=0;%(100,100,1400,2060,2450,2600) +detect-attn => 1400,2060,2450,2600 + +generate-callwaiting-sas => v=0;%(300,0,440) +detect-callwaiting-sas => 440 + +generate-callwaiting-cas => v=0;%(80,0,2750,2130) +detect-callwaiting-cas => 2750,2130 + +detect-fail1 => 913.8 +detect-fail2 => 1370.6 +detect-fail3 => 1776.7 + +[ru] +generate-dial => v=-7;%(1000,425) +detect-dial => 0 +generate-ring => v=-7;%(800,5000,425,0) +detect-ring => 425,0 +generate-busy => v=-7;%(350,350,425,0) +detect-busy => 425,0 +generate-attn => v=0;%(100,100,1400,2060,2450,2600) +detect-attn => 1400,2060,2450,2600 +generate-callwaiting-sas => v=0;%(300,0,440) +detect-callwaiting-sas => 440,480 +generate-callwaiting-cas => v=0;%(80,0,2750,2130) +detect-callwaiting-cas => 2750,2130 +detect-fail1 => 913.8 +detect-fail2 => 1370.6 +detect-fail3 => 1776.7 diff --git a/net/freeswitch/files/etc.minimal/vars.xml b/net/freeswitch/files/etc.minimal/vars.xml new file mode 100644 index 0000000..de1186a --- /dev/null +++ b/net/freeswitch/files/etc.minimal/vars.xml @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/cdr_csv/autoload_configs/cdr_csv.conf.xml b/net/freeswitch/files/etc.packages/cdr_csv/autoload_configs/cdr_csv.conf.xml new file mode 100644 index 0000000..bcefd46 --- /dev/null +++ b/net/freeswitch/files/etc.packages/cdr_csv/autoload_configs/cdr_csv.conf.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/cdr_pg_csv/autoload_configs/cdr_pg_csv.conf.xml b/net/freeswitch/files/etc.packages/cdr_pg_csv/autoload_configs/cdr_pg_csv.conf.xml new file mode 100644 index 0000000..4fec817 --- /dev/null +++ b/net/freeswitch/files/etc.packages/cdr_pg_csv/autoload_configs/cdr_pg_csv.conf.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/logfile/autoload_configs/logfile.conf.xml b/net/freeswitch/files/etc.packages/logfile/autoload_configs/logfile.conf.xml new file mode 100644 index 0000000..57f276c --- /dev/null +++ b/net/freeswitch/files/etc.packages/logfile/autoload_configs/logfile.conf.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/rtmp/autoload_configs/rtmp.conf.xml b/net/freeswitch/files/etc.packages/rtmp/autoload_configs/rtmp.conf.xml new file mode 100644 index 0000000..d5d2788 --- /dev/null +++ b/net/freeswitch/files/etc.packages/rtmp/autoload_configs/rtmp.conf.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-de/lang/de/de.xml b/net/freeswitch/files/etc.packages/say-de/lang/de/de.xml new file mode 100644 index 0000000..5239489 --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-de/lang/de/de.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-de/lang/de/demo/demo.xml b/net/freeswitch/files/etc.packages/say-de/lang/de/demo/demo.xml new file mode 100644 index 0000000..61582b2 --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-de/lang/de/demo/demo.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-de/lang/de/vm/tts.xml b/net/freeswitch/files/etc.packages/say-de/lang/de/vm/tts.xml new file mode 100644 index 0000000..7a8f18c --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-de/lang/de/vm/tts.xml @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-en/lang/en/demo/demo-ivr.xml b/net/freeswitch/files/etc.packages/say-en/lang/en/demo/demo-ivr.xml new file mode 100644 index 0000000..ec7d7bc --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-en/lang/en/demo/demo-ivr.xml @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-en/lang/en/demo/demo.xml b/net/freeswitch/files/etc.packages/say-en/lang/en/demo/demo.xml new file mode 100644 index 0000000..e3e6f02 --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-en/lang/en/demo/demo.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-en/lang/en/dir/sounds.xml b/net/freeswitch/files/etc.packages/say-en/lang/en/dir/sounds.xml new file mode 100644 index 0000000..02d6b36 --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-en/lang/en/dir/sounds.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-en/lang/en/dir/tts.xml b/net/freeswitch/files/etc.packages/say-en/lang/en/dir/tts.xml new file mode 100644 index 0000000..67ae5ab --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-en/lang/en/dir/tts.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-en/lang/en/en.xml b/net/freeswitch/files/etc.packages/say-en/lang/en/en.xml new file mode 100644 index 0000000..6bd5a7d --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-en/lang/en/en.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-en/lang/en/vm/sounds.xml b/net/freeswitch/files/etc.packages/say-en/lang/en/vm/sounds.xml new file mode 100644 index 0000000..63c9cd7 --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-en/lang/en/vm/sounds.xml @@ -0,0 +1,381 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-en/lang/en/vm/tts.xml b/net/freeswitch/files/etc.packages/say-en/lang/en/vm/tts.xml new file mode 100644 index 0000000..1fc877d --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-en/lang/en/vm/tts.xml @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-fr/lang/fr/demo/demo.xml b/net/freeswitch/files/etc.packages/say-fr/lang/fr/demo/demo.xml new file mode 100644 index 0000000..8066020 --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-fr/lang/fr/demo/demo.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-fr/lang/fr/dir/sounds.xml b/net/freeswitch/files/etc.packages/say-fr/lang/fr/dir/sounds.xml new file mode 100644 index 0000000..02d6b36 --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-fr/lang/fr/dir/sounds.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-fr/lang/fr/dir/tts.xml b/net/freeswitch/files/etc.packages/say-fr/lang/fr/dir/tts.xml new file mode 100644 index 0000000..1f5b0ca --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-fr/lang/fr/dir/tts.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-fr/lang/fr/fr.xml b/net/freeswitch/files/etc.packages/say-fr/lang/fr/fr.xml new file mode 100644 index 0000000..12bec06 --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-fr/lang/fr/fr.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-fr/lang/fr/vm/sounds.xml b/net/freeswitch/files/etc.packages/say-fr/lang/fr/vm/sounds.xml new file mode 100644 index 0000000..55190a6 --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-fr/lang/fr/vm/sounds.xml @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/net/freeswitch/files/etc.packages/say-ru/lang/ru/demo/demo-ivr.xml b/net/freeswitch/files/etc.packages/say-ru/lang/ru/demo/demo-ivr.xml new file mode 100644 index 0000000..8c6f3f8 --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-ru/lang/ru/demo/demo-ivr.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-ru/lang/ru/demo/demo.xml b/net/freeswitch/files/etc.packages/say-ru/lang/ru/demo/demo.xml new file mode 100644 index 0000000..7e450fb --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-ru/lang/ru/demo/demo.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-ru/lang/ru/dir/sounds.xml b/net/freeswitch/files/etc.packages/say-ru/lang/ru/dir/sounds.xml new file mode 100644 index 0000000..02d6b36 --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-ru/lang/ru/dir/sounds.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-ru/lang/ru/dir/tts.xml b/net/freeswitch/files/etc.packages/say-ru/lang/ru/dir/tts.xml new file mode 100644 index 0000000..67ae5ab --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-ru/lang/ru/dir/tts.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-ru/lang/ru/ru.xml b/net/freeswitch/files/etc.packages/say-ru/lang/ru/ru.xml new file mode 100644 index 0000000..25d63b6 --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-ru/lang/ru/ru.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-ru/lang/ru/vm/sounds.xml b/net/freeswitch/files/etc.packages/say-ru/lang/ru/vm/sounds.xml new file mode 100644 index 0000000..ffd9ec5 --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-ru/lang/ru/vm/sounds.xml @@ -0,0 +1,365 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/say-ru/lang/ru/vm/tts.xml b/net/freeswitch/files/etc.packages/say-ru/lang/ru/vm/tts.xml new file mode 100644 index 0000000..1fc877d --- /dev/null +++ b/net/freeswitch/files/etc.packages/say-ru/lang/ru/vm/tts.xml @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/syslog/autoload_configs/syslog.conf.xml b/net/freeswitch/files/etc.packages/syslog/autoload_configs/syslog.conf.xml new file mode 100644 index 0000000..636a12c --- /dev/null +++ b/net/freeswitch/files/etc.packages/syslog/autoload_configs/syslog.conf.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/tts_commandline/autoload_configs/tts_commandline.conf.xml b/net/freeswitch/files/etc.packages/tts_commandline/autoload_configs/tts_commandline.conf.xml new file mode 100644 index 0000000..eb81643 --- /dev/null +++ b/net/freeswitch/files/etc.packages/tts_commandline/autoload_configs/tts_commandline.conf.xml @@ -0,0 +1,15 @@ + + + + + + diff --git a/net/freeswitch/files/etc.packages/voicemail/autoload_configs/voicemail.conf.xml b/net/freeswitch/files/etc.packages/voicemail/autoload_configs/voicemail.conf.xml new file mode 100644 index 0000000..31b8937 --- /dev/null +++ b/net/freeswitch/files/etc.packages/voicemail/autoload_configs/voicemail.conf.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/etc.packages/xml-cdr/autoload_configs/xml_cdr.conf.xml b/net/freeswitch/files/etc.packages/xml-cdr/autoload_configs/xml_cdr.conf.xml new file mode 100644 index 0000000..6f8ef0d --- /dev/null +++ b/net/freeswitch/files/etc.packages/xml-cdr/autoload_configs/xml_cdr.conf.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net/freeswitch/files/freeswitch.config b/net/freeswitch/files/freeswitch.config new file mode 100644 index 0000000..9b4ab84 --- /dev/null +++ b/net/freeswitch/files/freeswitch.config @@ -0,0 +1,11 @@ + +config 'global' 'state' + option 'started' '0' + +config 'profile_top' 'internal_top' + +config 'profile_top' 'external_top' + +config 'external_gateway' 'external_example' + + diff --git a/net/freeswitch/files/freeswitch.default b/net/freeswitch/files/freeswitch.default new file mode 100644 index 0000000..079c314 --- /dev/null +++ b/net/freeswitch/files/freeswitch.default @@ -0,0 +1,11 @@ +#FS_DIR="/opt" +FS_DIR_ETC="$FS_DIR/etc/freeswitch" +FS_DIR_MOD="$FS_DIR/usr/lib/freeswitch" +FS_DIR_DB="$FS_DIR/tmp/freeswitch/db" +FS_DIR_LOG="$FS_DIR/tmp/freeswitch/log" +FS_DIR_SCRIPTS="$FS_DIR/usr/share/freeswitch/scripts" +FS_DIR_HTDOCS="$FS_DIR/usr/share/freeswitch/htdocs" +FS_DIR_RECORDINGS="/var/lib/freeswitch/recordings" # NOTE: must be changed in config as well +FS_DIR_VM_STORAGE="/var/lib/freeswitch/storage" # NOTE: must be changed in config as well + +OPTIONS="-conf $FS_DIR_ETC -log $FS_DIR_LOG -db $FS_DIR_DB -mod $FS_DIR_MOD -htdocs $FS_DIR_HTDOCS -scripts $FS_DIR_SCRIPTS" diff --git a/net/freeswitch/files/freeswitch.hotplug b/net/freeswitch/files/freeswitch.hotplug new file mode 100644 index 0000000..5080738 --- /dev/null +++ b/net/freeswitch/files/freeswitch.hotplug @@ -0,0 +1,65 @@ +#!/bin/sh + +. /etc/functions.sh +LOAD_STATE=1 + +if [ "$ACTION" = "ifup" ]; then + /etc/init.d/freeswitch enabled && { + local not_all_up="$(sh -c ' + . /etc/functions.sh + + LOAD_STATE=1 + local if_is_down=0 + local network_ignore="" + + check_if_down () { + local cfg="$1" + local up + local proto + config_get_bool up "$1" up 0 + config_get proto "$1" proto + if [ "$proto" != "none" ] && [ "$up" -ne 1 ]; then + local new_down=1 + local oIFS="$IFS" + local ignore + IFS=" " + for ignore in $network_ignore; do + [ "$cfg" = "$ignore" ] && new_down=0 + done + IFS="$oIFS" + [ "$new_down" = "1" ] && if_is_down=1 + fi + } + + append_ignore() { + local cfg="$1" + local network + config_get network "$1" network + append network_ignore "$network" + } + + LOAD_STATE=1 + config_load freeswitch + config_foreach append_ignore network_ignore + config_load network + config_foreach check_if_down interface + + echo "$if_is_down" + ')" + [ "$not_all_up" = "0" ] && { + local started + { + mkdir -p /tmp/freeswitch + lock /tmp/freeswitch/.start.lck + config_load freeswitch + config_get started "state" started + [ "$started" != "1" ] && { + /etc/init.d/freeswitch start + uci_set_state freeswitch global state started 1 + } + lock -u /tmp/freeswitch/.start.lck + } & + } + } +fi + diff --git a/net/freeswitch/files/freeswitch.init b/net/freeswitch/files/freeswitch.init new file mode 100644 index 0000000..4476b47 --- /dev/null +++ b/net/freeswitch/files/freeswitch.init @@ -0,0 +1,40 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=90 + +DEFAULT=/etc/default/freeswitch +OPTIONS="" + +boot() { + # Do nothing on boot + exit 0 +} + +start() { + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $FS_DIR_DB + mkdir -p $FS_DIR_LOG + mkdir -p $FS_DIR_RECORDINGS + mkdir -p $FS_DIR_VM_STORAGE + ulimit -s 240 + $FS_DIR/usr/bin/freeswitch $OPTIONS -nc +} + +stop() { + [ -f $DEFAULT ] && . $DEFAULT + $FS_DIR/usr/bin/freeswitch $OPTIONS -stop +} + +restart() { + # stopping freeswitch is non-blocking, so we wait until freeswitch's + # event socket is down, and then wait an additional ten seconds so that + # freeswitch should be completely shutdown before we start it again + local retval + stop + fs_cli -x status >/dev/null 2>&1 + retval=$? + while [ $retval -eq 0 ]; do sleep 1; fs_cli -x status >/dev/null 2>&1; retval=$?; done + sleep 10 + start +} + diff --git a/net/freeswitch/patches/001-Makefile.am.patch b/net/freeswitch/patches/001-Makefile.am.patch new file mode 100644 index 0000000..85da299 --- /dev/null +++ b/net/freeswitch/patches/001-Makefile.am.patch @@ -0,0 +1,20 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -295,7 +295,7 @@ endif + ## + fs_encode_SOURCES = src/fs_encode.c + fs_encode_CFLAGS = $(AM_CFLAGS) +-fs_encode_LDFLAGS = $(AM_LDFLAGS) $(CORE_LIBS) ++fs_encode_LDFLAGS = $(AM_LDFLAGS) -lpthread $(CORE_LIBS) + fs_encode_LDADD = libfreeswitch.la + + ## +@@ -303,7 +303,7 @@ fs_encode_LDADD = libfreeswitch.la + ## + tone2wav_SOURCES = src/tone2wav.c + tone2wav_CFLAGS = $(AM_CFLAGS) +-tone2wav_LDFLAGS = $(AM_LDFLAGS) $(CORE_LIBS) ++tone2wav_LDFLAGS = $(AM_LDFLAGS) -lpthread $(CORE_LIBS) + tone2wav_LDADD = libfreeswitch.la + + ## diff --git a/net/freeswitch/patches/002-libs-esl-Makefile.patch b/net/freeswitch/patches/002-libs-esl-Makefile.patch new file mode 100644 index 0000000..9af1338 --- /dev/null +++ b/net/freeswitch/patches/002-libs-esl-Makefile.patch @@ -0,0 +1,22 @@ +--- a/libs/esl/Makefile ++++ b/libs/esl/Makefile +@@ -7,7 +7,7 @@ PICKY=-O2 -ffast-math -Wall -Werror -Wun + CFLAGS=$(BASE_FLAGS) $(PICKY) + CXXFLAGS=$(BASE_FLAGS) -Wall -Werror -Wno-unused-variable + MYLIB=libesl.a +-LIBS=-lncurses -lpthread -lesl -lm ++LIBS=-L$(STAGING_DIR)/usr/lib -lncurses -lpthread -lesl -lm + LDFLAGS=-L. + OBJS=src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o src/esl_json.o src/esl_buffer.o + SRC=src/esl.c src/esl_json.c src/esl_event.c src/esl_threadmutex.c src/esl_config.c src/esl_oop.cpp src/esl_json.c src/esl_buffer.c +@@ -19,8 +19,8 @@ OBJS += src/esl_oop.o + all: $(MYLIB) fs_cli testclient testserver ivrd + + $(MYLIB): $(OBJS) $(HEADERS) $(SRC) +- ar rcs $(MYLIB) $(OBJS) +- ranlib $(MYLIB) ++ $(AR) rcs $(MYLIB) $(OBJS) ++ $(RANLIB) $(MYLIB) + + testserver: $(MYLIB) testserver.c + $(CC) $(CC_CFLAGS) $(CFLAGS) testserver.c -o testserver $(LDFLAGS) $(LIBS) diff --git a/net/freeswitch/patches/003-src-mod-event_handlers-mod_event_zmq-Makefile.patch b/net/freeswitch/patches/003-src-mod-event_handlers-mod_event_zmq-Makefile.patch new file mode 100644 index 0000000..54dade4 --- /dev/null +++ b/net/freeswitch/patches/003-src-mod-event_handlers-mod_event_zmq-Makefile.patch @@ -0,0 +1,10 @@ +--- a/src/mod/event_handlers/mod_event_zmq/Makefile ++++ b/src/mod/event_handlers/mod_event_zmq/Makefile +@@ -1,6 +1,6 @@ + BASE=../../../.. + +-ZMQ=zeromq-2.1.4 ++ZMQ=zeromq-2.1.7 + + ZMQ_BASEURL=http://download.zeromq.org + diff --git a/net/freeswitch/patches/004-build-modules_conf_in.patch b/net/freeswitch/patches/004-build-modules_conf_in.patch new file mode 100644 index 0000000..4c57ab2 --- /dev/null +++ b/net/freeswitch/patches/004-build-modules_conf_in.patch @@ -0,0 +1,10 @@ +--- a/build/modules.conf.in ++++ b/build/modules.conf.in +@@ -38,6 +38,7 @@ applications/mod_valet_parking + #applications/mod_fsk + #applications/mod_ladspa + #applications/mod_mongo ++#applications/mod_mp4 + codecs/mod_g723_1 + codecs/mod_amr + #codecs/mod_amrwb diff --git a/net/freeswitch/patches/005-src-mod-applications-mod_mp4-mp4_helper_hpp.patch b/net/freeswitch/patches/005-src-mod-applications-mod_mp4-mp4_helper_hpp.patch new file mode 100644 index 0000000..ac81dd0 --- /dev/null +++ b/net/freeswitch/patches/005-src-mod-applications-mod_mp4-mp4_helper_hpp.patch @@ -0,0 +1,13 @@ +--- a/src/mod/applications/mod_mp4/mp4_helper.hpp ++++ b/src/mod/applications/mod_mp4/mp4_helper.hpp +@@ -22,8 +22,9 @@ the Initial Developer. All Rights Reserv + #ifndef MP4_HELPER_HPP_ + #define MP4_HELPER_HPP_ + ++#include ++#include + #include +-#include + #include + #include + diff --git a/net/frickin/Makefile b/net/frickin/Makefile new file mode 100644 index 0000000..2265c4e --- /dev/null +++ b/net/frickin/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=frickin +PKG_VERSION:=1.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/frickin +PKG_MD5SUM:=5b2e98da2310c71c703d4617b88a173f + +include $(INCLUDE_DIR)/package.mk + +define Package/frickin + SECTION:=net + CATEGORY:=Network + TITLE:=PPTP (Point-to-Point Tunneling Protocol) proxy + URL:=http://sourceforge.net/projects/frickin/ + SUBMENU:=VPN +endef + +define Package/frickin/description + Frickin PPTP Proxy allows a Point-to-Point Tunneling Protocol (PPTP) + client to connect to a PPTP server through Network Address + Translation (NAT). +endef + +define Package/frickin/conffiles +/etc/default/frickin +endef + +define Build/Configure + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + all +endef + +define Package/frickin/install + $(INSTALL_DIR) $(1)/etc/default + $(INSTALL_DATA) ./files/frickin.default $(1)/etc/default/frickin + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/frickin.init $(1)/etc/init.d/frickin + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/frickin $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,frickin)) diff --git a/net/frickin/files/frickin.default b/net/frickin/files/frickin.default new file mode 100644 index 0000000..9f55d5b --- /dev/null +++ b/net/frickin/files/frickin.default @@ -0,0 +1,16 @@ +# ip address of the server the proxy should connect to +TARGET_IP=192.168.1.2 + +# ip address the proxy should listen to for incoming connections +#LISTEN_IP=192.168.1.1 + +# maximum number of simultaneous connections +#PROXY_CONN_MAX=20 + +# user the proxy should run as +#PROXY_USER=root + +[ -n "$TARGET_IP" ] && OPTIONS="$OPTIONS -s $TARGET_IP" +[ -n "$LISTEN_IP" ] && OPTIONS="$OPTIONS -l $LISTEN_IP" +[ -n "$PROXY_CONN_MAX" ] && OPTIONS="$OPTIONS -c $PROXY_CONN_MAX" +[ -n "$PROXY_USER" ] && OPTIONS="$OPTIONS -u $PROXY_USER" diff --git a/net/frickin/files/frickin.init b/net/frickin/files/frickin.init new file mode 100644 index 0000000..c6fbb48 --- /dev/null +++ b/net/frickin/files/frickin.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=frickin +DEFAULT=/etc/default/$BIN +[ -f $DEFAULT ] && . $DEFAULT + +start() { + $BIN $OPTIONS & +} + +stop() { + killall $BIN +} + diff --git a/net/gesftpserver/Makefile b/net/gesftpserver/Makefile new file mode 100644 index 0000000..eb5b830 --- /dev/null +++ b/net/gesftpserver/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sftpserver +PKG_REV:=228 +PKG_VERSION:=r$(PKG_REV) +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.greenend.org.uk/rjk/bzr/sftpserver.dev +PKG_SOURCE_PROTO:=bzr +PKG_SOURCE_SUBDIR:=$(PKG_NAME) +PKG_SOURCE_VERSION:=$(PKG_REV) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/gesftpserver + SECTION:=net + CATEGORY:=Network + SUBMENU:=SSH + DEPENDS:=+libpthread $(ICONV_DEPENDS) + TITLE:=SFTP server + URL:=http://www.greenend.org.uk/rjk/sftpserver/ +endef + +define Package/gesftpserver/description +This is an experimental free SFTP server. It is currently still under development +(so don't trust it with critical data). It should be possible to use it as a +drop-in replacement for the widely-used OpenSSH SFTP server. It does not include +an SSH server, but rather runs as a subsystem of one. +endef + +CONFIGURE_CMD:=./prepare + +TAR_CMD:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components 1 $(TAR_OPTIONS) + +TARGET_LDFLAGS+=-lpthread + +define Package/gesftpserver/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gesftpserver $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,gesftpserver)) diff --git a/net/git/Makefile b/net/git/Makefile new file mode 100644 index 0000000..8ea4106 --- /dev/null +++ b/net/git/Makefile @@ -0,0 +1,70 @@ +# +# Copyright (C) 2009-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=git +PKG_VERSION:=1.7.5.2 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@KERNEL/software/scm/git +PKG_MD5SUM:=f79ab8fe79b35346b499f131cbf381a4 + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/git + SECTION:=net + CATEGORY:=Network + SUBMENU:=Version Control Systems + DEPENDS:=+libopenssl +libpthread + TITLE:=The fast version control system + URL:=http://git-scm.com + MAINTAINER:=Luka Perkov +endef + +define Package/git/description + Git is a free & open source, distributed version control system + designed to handle everything from small to very large projects + with speed and efficiency. +endef + +MAKE_FLAGS := \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + NO_PERL="YesPlease" \ + NO_EXPAT="YesPlease" \ + NO_WISH="YesPlease" \ + NO_ICONV="YesPlease" \ + NO_NSEC="YesPlease" \ + NO_CURL="YesPlease" \ + NO_TCLTK="YesPlease" \ + NO_MKSTEMPS="YesPlease" \ + NO_PYTHON="YesPlease" \ + +define Build/Configure + $(MAKE) -C $(PKG_BUILD_DIR) \ + configure + + ( cd $(PKG_BUILD_DIR); \ + ./configure --prefix=/usr \ + ); +endef + +define Package/git/install + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ + ln -s /usr/bin/git $(1)/usr/libexec/git-core/git +endef + +$(eval $(call BuildPackage,git)) diff --git a/net/git/patches/110-convert_builtin.patch b/net/git/patches/110-convert_builtin.patch new file mode 100644 index 0000000..f2f233a --- /dev/null +++ b/net/git/patches/110-convert_builtin.patch @@ -0,0 +1,276 @@ +--- /dev/null ++++ b/builtin/daemon.c +@@ -0,0 +1 @@ ++#include "../daemon.c" +--- /dev/null ++++ b/builtin/fast-import.c +@@ -0,0 +1 @@ ++#include "../fast-import.c" +--- /dev/null ++++ b/builtin/http-backend.c +@@ -0,0 +1 @@ ++#include "../http-backend.c" +--- /dev/null ++++ b/builtin/imap-send.c +@@ -0,0 +1 @@ ++#include "../imap-send.c" +--- /dev/null ++++ b/builtin/shell.c +@@ -0,0 +1 @@ ++#include "../shell.c" +--- /dev/null ++++ b/builtin/upload-pack.c +@@ -0,0 +1 @@ ++#include "../upload-pack.c" +--- a/builtin.h ++++ b/builtin.h +@@ -143,5 +143,11 @@ extern int cmd_verify_pack(int argc, con + extern int cmd_show_ref(int argc, const char **argv, const char *prefix); + extern int cmd_pack_refs(int argc, const char **argv, const char *prefix); + extern int cmd_replace(int argc, const char **argv, const char *prefix); ++extern int cmd_shell(int argc, char **argv, const char *prefix); ++extern int cmd_upload_pack(int argc, char **argv, const char *prefix); ++extern int cmd_http_backend(int argc, char **argv, const char *prefix); ++extern int cmd_daemon(int argc, char **argv, const char *prefix); ++extern int cmd_imap_send(int argc, char **argv, const char *prefix); ++extern int cmd_fast_import(int argc, const char **argv, const char *prefix); + + #endif +--- a/daemon.c ++++ b/daemon.c +@@ -1043,7 +1043,7 @@ static int serve(struct string_list *lis + return service_loop(&socklist); + } + +-int main(int argc, char **argv) ++int cmd_daemon(int argc, char **argv, const char *prefix) + { + int listen_port = 0; + struct string_list listen_addr = STRING_LIST_INIT_NODUP; +--- a/fast-import.c ++++ b/fast-import.c +@@ -3242,7 +3242,7 @@ static void parse_argv(void) + read_marks(); + } + +-int main(int argc, const char **argv) ++int cmd_fast_import(int argc, const char **argv, const char *prefix) + { + unsigned int i; + +--- a/git.c ++++ b/git.c +@@ -251,11 +251,11 @@ const char git_version_string[] = GIT_VE + + struct cmd_struct { + const char *cmd; +- int (*fn)(int, const char **, const char *); ++ int (*fn)(int, char **, const char *); + int option; + }; + +-static int run_builtin(struct cmd_struct *p, int argc, const char **argv) ++static int run_builtin(struct cmd_struct *p, int argc, char **argv) + { + int status, help; + struct stat st; +@@ -308,7 +308,7 @@ static int run_builtin(struct cmd_struct + return 0; + } + +-static void handle_internal_command(int argc, const char **argv) ++static void handle_internal_command(int argc, char **argv) + { + const char *cmd = argv[0]; + static struct cmd_struct commands[] = { +@@ -322,10 +322,9 @@ static void handle_internal_command(int + { "bundle", cmd_bundle, RUN_SETUP_GENTLY }, + { "cat-file", cmd_cat_file, RUN_SETUP }, + { "check-attr", cmd_check_attr, RUN_SETUP }, +- { "check-ref-format", cmd_check_ref_format }, + { "checkout", cmd_checkout, RUN_SETUP | NEED_WORK_TREE }, +- { "checkout-index", cmd_checkout_index, +- RUN_SETUP | NEED_WORK_TREE}, ++ { "checkout-index", cmd_checkout_index, RUN_SETUP | NEED_WORK_TREE}, ++ { "check-ref-format", cmd_check_ref_format }, + { "cherry", cmd_cherry, RUN_SETUP }, + { "cherry-pick", cmd_cherry_pick, RUN_SETUP | NEED_WORK_TREE }, + { "clean", cmd_clean, RUN_SETUP | NEED_WORK_TREE }, +@@ -334,12 +333,14 @@ static void handle_internal_command(int + { "commit-tree", cmd_commit_tree, RUN_SETUP }, + { "config", cmd_config, RUN_SETUP_GENTLY }, + { "count-objects", cmd_count_objects, RUN_SETUP }, ++ { "daemon", cmd_daemon }, + { "describe", cmd_describe, RUN_SETUP }, + { "diff", cmd_diff }, + { "diff-files", cmd_diff_files, RUN_SETUP | NEED_WORK_TREE }, + { "diff-index", cmd_diff_index, RUN_SETUP }, + { "diff-tree", cmd_diff_tree, RUN_SETUP }, + { "fast-export", cmd_fast_export, RUN_SETUP }, ++ { "fast-import", cmd_fast_import }, + { "fetch", cmd_fetch, RUN_SETUP }, + { "fetch-pack", cmd_fetch_pack, RUN_SETUP }, + { "fmt-merge-msg", cmd_fmt_merge_msg, RUN_SETUP }, +@@ -352,6 +353,8 @@ static void handle_internal_command(int + { "grep", cmd_grep, RUN_SETUP_GENTLY }, + { "hash-object", cmd_hash_object }, + { "help", cmd_help }, ++ { "http-backend", cmd_http_backend }, ++ { "imap-send", cmd_imap_send }, + { "index-pack", cmd_index_pack, RUN_SETUP_GENTLY }, + { "init", cmd_init_db }, + { "init-db", cmd_init_db }, +@@ -361,8 +364,8 @@ static void handle_internal_command(int + { "ls-tree", cmd_ls_tree, RUN_SETUP }, + { "mailinfo", cmd_mailinfo }, + { "mailsplit", cmd_mailsplit }, +- { "merge", cmd_merge, RUN_SETUP | NEED_WORK_TREE }, + { "merge-base", cmd_merge_base, RUN_SETUP }, ++ { "merge", cmd_merge, RUN_SETUP | NEED_WORK_TREE }, + { "merge-file", cmd_merge_file, RUN_SETUP_GENTLY }, + { "merge-index", cmd_merge_index, RUN_SETUP }, + { "merge-ours", cmd_merge_ours, RUN_SETUP }, +@@ -395,14 +398,15 @@ static void handle_internal_command(int + { "repo-config", cmd_repo_config, RUN_SETUP_GENTLY }, + { "rerere", cmd_rerere, RUN_SETUP }, + { "reset", cmd_reset, RUN_SETUP }, ++ { "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE }, + { "rev-list", cmd_rev_list, RUN_SETUP }, + { "rev-parse", cmd_rev_parse }, +- { "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE }, + { "rm", cmd_rm, RUN_SETUP }, + { "send-pack", cmd_send_pack, RUN_SETUP }, ++ { "shell", cmd_shell }, + { "shortlog", cmd_shortlog, RUN_SETUP_GENTLY | USE_PAGER }, +- { "show", cmd_show, RUN_SETUP }, + { "show-branch", cmd_show_branch, RUN_SETUP }, ++ { "show", cmd_show, RUN_SETUP }, + { "show-ref", cmd_show_ref, RUN_SETUP }, + { "stage", cmd_add, RUN_SETUP | NEED_WORK_TREE }, + { "status", cmd_status, RUN_SETUP | NEED_WORK_TREE }, +@@ -416,6 +420,7 @@ static void handle_internal_command(int + { "update-ref", cmd_update_ref, RUN_SETUP }, + { "update-server-info", cmd_update_server_info, RUN_SETUP }, + { "upload-archive", cmd_upload_archive }, ++ { "upload-pack", cmd_upload_pack }, + { "var", cmd_var, RUN_SETUP_GENTLY }, + { "verify-pack", cmd_verify_pack }, + { "verify-tag", cmd_verify_tag, RUN_SETUP }, +--- a/http-backend.c ++++ b/http-backend.c +@@ -540,7 +540,7 @@ static struct service_cmd { + {"POST", "/git-receive-pack$", service_rpc} + }; + +-int main(int argc, char **argv) ++int cmd_http_backend(int argc, char **argv, const char *prefix) + { + char *method = getenv("REQUEST_METHOD"); + char *dir; +--- a/imap-send.c ++++ b/imap-send.c +@@ -1528,7 +1528,7 @@ static int git_imap_config(const char *k + return 0; + } + +-int main(int argc, char **argv) ++int cmd_imap_send(int argc, char **argv, const char *prefix) + { + struct msg_data all_msgs, msg; + struct store *ctx = NULL; +--- a/Makefile ++++ b/Makefile +@@ -407,13 +407,7 @@ EXTRA_PROGRAMS = + # ... and all the rest that could be moved out of bindir to gitexecdir + PROGRAMS += $(EXTRA_PROGRAMS) + +-PROGRAM_OBJS += daemon.o +-PROGRAM_OBJS += fast-import.o +-PROGRAM_OBJS += imap-send.o +-PROGRAM_OBJS += shell.o + PROGRAM_OBJS += show-index.o +-PROGRAM_OBJS += upload-pack.o +-PROGRAM_OBJS += http-backend.o + + PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS)) + +@@ -771,6 +765,12 @@ BUILTIN_OBJS += builtin/var.o + BUILTIN_OBJS += builtin/verify-pack.o + BUILTIN_OBJS += builtin/verify-tag.o + BUILTIN_OBJS += builtin/write-tree.o ++BUILTIN_OBJS += builtin/shell.o ++BUILTIN_OBJS += builtin/upload-pack.o ++BUILTIN_OBJS += builtin/http-backend.o ++BUILTIN_OBJS += builtin/daemon.o ++BUILTIN_OBJS += builtin/imap-send.o ++BUILTIN_OBJS += builtin/fast-import.o + + GITLIBS = $(LIB_FILE) $(XDIFF_LIB) + EXTLIBS = +@@ -1289,7 +1289,7 @@ endif + EXTLIBS += -lz + + ifndef NO_OPENSSL +- OPENSSL_LIBSSL = -lssl ++ EXTLIBS += -lssl + ifdef OPENSSLDIR + BASIC_CFLAGS += -I$(OPENSSLDIR)/include + OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib) +@@ -1975,10 +1975,6 @@ endif + git-%$X: %.o $(GITLIBS) + $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) + +-git-imap-send$X: imap-send.o $(GITLIBS) +- $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ +- $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO) +- + git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o $(GITLIBS) + $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ + $(LIBS) $(CURL_LIBCURL) +@@ -2193,22 +2189,20 @@ endif + bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ + execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \ + { test "$$bindir/" = "$$execdir/" || \ +- for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \ ++ for p in $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \ + $(RM) "$$execdir/$$p" && \ + test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \ +- ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \ ++ ln -s git "$$execdir/$$p" 2>/dev/null || \ + cp "$$bindir/$$p" "$$execdir/$$p" || exit; \ + done; \ + } && \ + for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \ + $(RM) "$$bindir/$$p" && \ +- ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \ + ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \ + cp "$$bindir/git$X" "$$bindir/$$p" || exit; \ + done && \ + for p in $(BUILT_INS); do \ + $(RM) "$$execdir/$$p" && \ +- ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \ + ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \ + cp "$$execdir/git$X" "$$execdir/$$p" || exit; \ + done && \ +--- a/shell.c ++++ b/shell.c +@@ -129,7 +129,7 @@ static struct commands { + { NULL }, + }; + +-int main(int argc, char **argv) ++int cmd_shell(int argc, char **argv, const char *prefix) + { + char *prog; + const char **user_argv; +--- a/upload-pack.c ++++ b/upload-pack.c +@@ -697,7 +697,7 @@ static void upload_pack(void) + } + } + +-int main(int argc, char **argv) ++int cmd_upload_pack(int argc, char **argv, const char *prefix) + { + char *dir; + int i; diff --git a/net/gpsd/Makefile b/net/gpsd/Makefile new file mode 100644 index 0000000..234af7b --- /dev/null +++ b/net/gpsd/Makefile @@ -0,0 +1,74 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gpsd +PKG_VERSION:=2.94 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://download.berlios.de/gpsd/ +PKG_MD5SUM:=ce70bcd707ac1df861d4c72f503c09d1 + +PKG_INSTALL:=1 +PKG_FIXUP:=libtool +PKG_REMOVE_FILES:=aclocal.m4 ltmain.sh + +PKG_BUILD_DEPENDS:=libncurses + +include $(INCLUDE_DIR)/package.mk + +define Package/gpsd + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpthread +libusb-1.0 + TITLE:=An interface daemon for GPS receivers + URL:=http://gpsd.berlios.de/ +endef + +CONFIGURE_CMD =./autogen.sh + +CONFIGURE_ARGS += \ + --disable-dbus \ + --disable-tsip \ + --disable-fv18 \ + --disable-tripmate \ + --disable-earthmate \ + --disable-itrax \ + --disable-navcom \ + --disable-ubx \ + --disable-evermore \ + --disable-ntrip \ + --disable-libgpsmm \ + --without-x \ + +EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/libusb-1.0 + +EXTRA_LDFLAGS:=-lusb-1.0 + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.{a,so*} $(1)/usr/lib/ +endef + +define Package/gpsd/install + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd + $(INSTALL_DIR) $(1)/etc/hotplug.d/usb + $(INSTALL_DATA) ./files/gpsd.hotplug $(1)/etc/hotplug.d/usb/20-gpsd + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,gpsd)) diff --git a/net/gpsd/files/gpsd.config b/net/gpsd/files/gpsd.config new file mode 100644 index 0000000..8c7e51a --- /dev/null +++ b/net/gpsd/files/gpsd.config @@ -0,0 +1,4 @@ +config gpsd core + option device "/dev/ttyUSB0" + option port "2947" + option enabled "true" diff --git a/net/gpsd/files/gpsd.hotplug b/net/gpsd/files/gpsd.hotplug new file mode 100644 index 0000000..fc15dda --- /dev/null +++ b/net/gpsd/files/gpsd.hotplug @@ -0,0 +1,16 @@ +case "$ACTION" in + add) + # start process + # only pl2303 devices are handled + if [ "$PRODUCT" = "67b/2303/300" ] && [ "$TYPE" = "0/0/0" ] && [ "$INTERFACE" = "255/0/0" ]; then + sleep 3 && /etc/init.d/gpsd start + fi + ;; + remove) + # stop process + # only pl2303 devices are handled + if [ "$PRODUCT" = "67b/2303/300" ] && [ "$TYPE" = "0/0/0" ] && [ "$INTERFACE" = "255/0/0" ]; then + /etc/init.d/gpsd stop + fi + ;; +esac diff --git a/net/gpsd/files/gpsd.init b/net/gpsd/files/gpsd.init new file mode 100644 index 0000000..d0a1a30 --- /dev/null +++ b/net/gpsd/files/gpsd.init @@ -0,0 +1,30 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009 OpenWrt.org +START=50 + +NAME=gpsd +PIDF=/var/run/$NAME.pid +PROG=/usr/sbin/$NAME + +start() { + config_load gpsd + config_get device core device + config_get port core port + config_get_bool enabled core enabled + [ "$enabled" != "1" ] && exit + logger -t "$NAME" "Starting..." + [ ! -c "$device" ] && { + logger -t "$NAME" "Unable to find device $device. Exiting." + exit 1 + } + $PROG -n -P $PIDF -S $port $device +} + +stop() { + logger -t "$NAME" "Stopping..." + [ -f "$PIDF" ] && { + read PID < "$PIDF" + kill -9 $PID + rm $PIDF + } +} diff --git a/net/gpsd/patches/100-cross-compile.patch b/net/gpsd/patches/100-cross-compile.patch new file mode 100644 index 0000000..95e7027 --- /dev/null +++ b/net/gpsd/patches/100-cross-compile.patch @@ -0,0 +1,54 @@ +Index: gpsd-2.94/configure.ac +=================================================================== +--- gpsd-2.94.orig/configure.ac 2010-04-20 19:55:08.000000000 +0200 ++++ gpsd-2.94/configure.ac 2011-01-27 15:34:47.002000063 +0100 +@@ -233,30 +233,10 @@ + AC_DEFINE([HAVE_LIBPTHREAD], [], [pthread libraries are present])]) + AC_SUBST(LIBPTHREAD) + +-# +-# We want libusb-1.x or later. Checking for this is messy in 2010 +-# since many Linux systems ship with .0,1.x versions and that's +-# what you get if you check naively for -lusb. +-# +-# We use the fact that the obsolete versions put their include file in +-# /usr/include/usb.h, while the newer ones have it in +-# /usr/include/libusb-*/libusb.h +-# + AC_MSG_CHECKING([for libusb version >= 1.0.0]) +-if test -f /usr/include/libusb-*/libusb.h ; +-then +- usb=$(basename /usr/lib/libusb-*.so | sed -e s/\.so// -e s/^lib//) +- AC_DEFINE([HAVE_LIBUSB], [], [will link with -l$usb; ]) +- LIBUSB=-l${usb} +- INCUSB=-I/usr/include/lib${usb} +- ac_libusb=yes +- AC_MSG_RESULT([found.]) +-else +- ac_libusb=yes +- AC_MSG_RESULT([not found.]) +-fi +-AC_SUBST(LIBUSB) +-AC_SUBST(INCUSB) ++AC_DEFINE([HAVE_LIBUSB], [], [will link with -lusb-1.0; ]) ++ac_libusb=yes ++AC_MSG_RESULT([OpenWRT: Crosscompile]) + + AH_VERBATIM([_GNU_SOURCE], + [/* Some libc's don't have strlcat/strlcpy. Local copies are provided */ +Index: gpsd-2.94/Makefile.am +=================================================================== +--- gpsd-2.94.orig/Makefile.am 2010-04-20 11:37:21.000000000 +0200 ++++ gpsd-2.94/Makefile.am 2011-01-27 15:34:08.125000006 +0100 +@@ -245,9 +245,9 @@ + # Warning: This overrides autoconf's normal link-line generation process + if LIBGPSMM_ENABLE + libgps_la_SOURCES += libgpsmm.cpp +-libgps_la_LINK = /bin/sh ./libtool --tag=CXX --mode=link g++ $(libgps_la_LDFLAGS) -o $@ ++libgps_la_LINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(libgps_la_LDFLAGS) -o $@ + else +-libgps_la_LINK = /bin/sh ./libtool --tag=CC --mode=link gcc $(libgps_la_LDFLAGS) -o $@ ++libgps_la_LINK = $(LIBTOOL) --tag=CC --mode=link $(CC) $(libgps_la_LDFLAGS) -o $@ + endif + + nodist_libgpsd_la_SOURCES = packet_names.h ais_json.i diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile new file mode 100644 index 0000000..ce6b152 --- /dev/null +++ b/net/haproxy/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2010 OpenWrt.org +# Copyright (C) 2009-2010 Thomas Heil +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=haproxy +PKG_VERSION:=1.4.15 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.4/src +PKG_MD5SUM:=c1b4fc6028c6d8e23dde8c91ff47eabe + +include $(INCLUDE_DIR)/package.mk + +define Package/haproxy + SUBMENU:=Web Servers/Proxies + SECTION:=net + CATEGORY:=Network + TITLE:=The Reliable, High Performance TCP/HTTP Load Balancer + URL:=http://haproxy.1wt.eu/ + DEPENDS:=+libpcre +libltdl +endef + +define Package/haproxy/conffiles +/etc/haproxy.cfg +endef + +define Package/haproxy/description + Open source High Performance TCP/HTTP Load Balancer +endef + +define Build/Compile + $(MAKE) TARGET=$(if $(CONFIG_LINUX_2_4),linux24,linux26) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LD="$(TARGET_CC)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=8192 -DSYSTEM_MAXCONN=65530" USE_LINUX_TPROXY=1 \ + all install +endef + +define Package/haproxy/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/haproxy $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) ./files/haproxy.cfg $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/haproxy.init $(1)/etc/init.d/haproxy + $(INSTALL_DIR) $(1)/etc/hotplug.d/net + $(INSTALL_BIN) ./files/haproxy.hotplug $(1)/etc/hotplug.d/net/90-haproxy +endef + +$(eval $(call BuildPackage,haproxy)) diff --git a/net/haproxy/files/haproxy.cfg b/net/haproxy/files/haproxy.cfg new file mode 100644 index 0000000..1c56884 --- /dev/null +++ b/net/haproxy/files/haproxy.cfg @@ -0,0 +1,99 @@ +# Example configuration file for HAProxy 1.3, refer to the url below for +# a full documentation and examples for configuration: +# http://haproxy.1wt.eu/download/1.3/doc/configuration.txt + + +# Global parameters +global + + # Log events to a remote syslog server at given address using the + # specified facility and verbosity level. Multiple log options + # are allowed. + #log 10.0.0.1 daemon info + + # Specifiy the maximum number of allowed connections. + maxconn 32000 + + # Raise the ulimit for the maximum allowed number of open socket + # descriptors per process. This is usually at least twice the + # number of allowed connections (maxconn * 2 + nb_servers + 1) . + ulimit-n 65535 + + # Drop privileges (setuid, setgid), default is "root" on OpenWrt. + uid 0 + gid 0 + + # Perform chroot into the specified directory. + #chroot /var/run/haproxy/ + + # Daemonize on startup + daemon + + # Enable debugging + #debug + + # Spawn given number of processes and distribute load among them, + # used for multi-core environments or to circumvent per-process + # limits like number of open file descriptors. Default is 1. + #nbproc 2 + + +# Example HTTP proxy listener +listen my_http_proxy + + # Bind to port 80 and 443 on all interfaces (0.0.0.0) + bind :80,:443 + + # We're proxying HTTP here... + mode http + + # Simple HTTP round robin over two servers using the specified + # source ip 192.168.1.1 . + balance roundrobin + server server01 192.168.1.10:80 source 192.168.1.1 + server server02 192.168.1.20:80 source 192.168.1.1 + + # Serve an internal statistics page on /stats: + stats enable + stats uri /stats + + # Enable HTTP basic auth for the statistics: + stats realm HA_Stats + stats auth username:password + + +# Example SMTP proxy listener +listen my_smtp_proxy + + # Disable this instance without commenting out the section. + disabled + + # Bind to port 25 and 587 on localhost + bind 127.0.0.1:25,127.0.0.1:587 + + # This is a TCP proxy + mode tcp + + # Round robin load balancing over two servers on port 123 forcing + # the address 192.168.1.1 and port 25 as source. + balance roundrobin + #use next line for transparent proxy, so the servers can see the + #original ip-address and remove source keyword in server definition + #source 0.0.0.0 usesrc clientip + server server01 192.168.1.10:123 source 192.168.1.1:25 + server server02 192.168.1.20:123 source 192.168.1.1:25 + + +# Special health check listener for integration with external load +# balancers. +listen local_health_check + + # Listen on port 60000 + bind :60000 + + # This is a health check + mode health + + # Enable HTTP-style responses: "HTTP/1.0 200 OK" + # else just print "OK". + #option httpchk diff --git a/net/haproxy/files/haproxy.hotplug b/net/haproxy/files/haproxy.hotplug new file mode 100644 index 0000000..d14b5bf --- /dev/null +++ b/net/haproxy/files/haproxy.hotplug @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ "$ACTION" = add ]; then + + /etc/init.d/haproxy enabled && \ + /etc/init.d/haproxy start +fi + diff --git a/net/haproxy/files/haproxy.init b/net/haproxy/files/haproxy.init new file mode 100644 index 0000000..73a21e7 --- /dev/null +++ b/net/haproxy/files/haproxy.init @@ -0,0 +1,31 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009-2010 OpenWrt.org + +START=99 +STOP=80 + +HAPROXY_BIN="/usr/sbin/haproxy" +HAPROXY_CONFIG="/etc/haproxy.cfg" +HAPROXY_PID="/var/run/haproxy.pid" + +boot() { + + #Do nothing on boot + exit 0 +} + +start() { + [ -x "$HAPROXY_BIN" ] || return 1 + + start-stop-daemon -S -x $HAPROXY_BIN -- \ + -f "$HAPROXY_CONFIG" -V -D -p "$HAPROXY_PID" +} + +stop() { + service_kill ${HAPROXY_BIN##*/} $HAPROXY_PID + rm -f $HAPROXY_PID +} + +reload() { + $HAPROXY_BIN -f $HAPROXY_CONFIG -D -V -p $HAPROXY_PID -sf $(cat $HAPROXY_PID) +} diff --git a/net/hiawatha/Makefile b/net/hiawatha/Makefile new file mode 100644 index 0000000..adc48f3 --- /dev/null +++ b/net/hiawatha/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=hiawatha +PKG_VERSION:=7.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.hiawatha-webserver.org/files/ +PKG_MD5SUM:=52fd6bf798c07298e12ff69b882f3d76 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/hiawatha + CATEGORY:=Network + SECTION:=net + SUBMENU:=Web Servers/Proxies + TITLE:=A very lightweight web server + URL:=http://www.hiawatha-webserver.org/ + MAINTAINER:=Raphaël HUCK + DEPENDS:=+libpthread +endef + +define Package/hiawatha/description +Hiawatha is an open source webserver with a focus on security. +endef + +CONFIGURE_ARGS+= \ + --disable-cache \ + --disable-monitor \ + --disable-ssl \ + --disable-xslt + +CONFIGURE_VARS+= \ + ac_cv_file__dev_urandom=yes \ + webrootdir=/www + +define Package/hiawatha/conffiles +/etc/hiawatha/hiawatha.conf +/etc/hiawatha/mimetype.conf +endef + +define Package/hiawatha/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/hiawatha $(1)/usr/sbin/ + + $(INSTALL_DIR) $(1)/etc/hiawatha + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/hiawatha/{hiawatha,mimetype}.conf $(1)/etc/hiawatha/ +endef + +$(eval $(call BuildPackage,hiawatha)) diff --git a/net/horst/Makefile b/net/horst/Makefile new file mode 100644 index 0000000..1f3f740 --- /dev/null +++ b/net/horst/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=horst +PKG_VERSION:=2.0-rc1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip +PKG_SOURCE_URL:=http://br1.einfach.org/horst_dl/ +PKG_MD5SUM:=7eb6f7ae819722b1fcdd86df98f7884d + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/horst + SECTION:=net + CATEGORY:=Network + SUBMENU:=wireless + DEPENDS:=+libncurses + MAINTAINER:=Bruno Randolf + TITLE:=Highly Optimized 802.11 Radio Scanning Tool + URL:=http://br1.einfach.org/horst/ +endef + +define Package/horst/description + [horst] is a scanning and analysis tool for 802.11 wireless networks + and especially IBSS (ad-hoc) mode and mesh networks (OLSR). +endef + +define Package/horst/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/horst $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/horst.sh $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,horst)) diff --git a/net/horst/patches/001-endian_fixes.patch b/net/horst/patches/001-endian_fixes.patch new file mode 100644 index 0000000..0c37c16 --- /dev/null +++ b/net/horst/patches/001-endian_fixes.patch @@ -0,0 +1,96 @@ +--- a/protocol_parser.c ++++ b/protocol_parser.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include "prism_header.h" + #include "ieee80211_radiotap.h" +@@ -166,6 +167,7 @@ parse_radiotap_header(unsigned char** bu + __le32 present; /* the present bitmap */ + unsigned char* b; /* current byte */ + int i; ++ int rt_len; + + DEBUG("RADIOTAP HEADER\n"); + +@@ -176,21 +178,22 @@ parse_radiotap_header(unsigned char** bu + + rh = (struct ieee80211_radiotap_header*)*buf; + b = *buf + sizeof(struct ieee80211_radiotap_header); +- present = rh->it_present; ++ present = __le32_to_cpu(rh->it_present); + + DEBUG("%08x\n", present); + ++ rt_len = __le16_to_cpu(rh->it_len); + /* check for header extension - ignore for now, just advance current position */ +- while (present & 0x80000000 && b - *buf < rh->it_len) { ++ while (present & 0x80000000 && b - *buf < rt_len) { + DEBUG("extension\n"); + b = b + 4; +- present = *(__le32*)b; ++ present = __le32_to_cpu(*(__le32*)b); + } +- present = rh->it_present; // in case it moved ++ present = __le32_to_cpu(rh->it_present); // in case it moved + + /* radiotap bitmap has 32 bit, but we are only interrested until + * bit 12 (IEEE80211_RADIOTAP_DB_ANTSIGNAL) => i<13 */ +- for (i = 0; i < 13 && b - *buf < rh->it_len; i++) { ++ for (i = 0; i < 13 && b - *buf < rt_len; i++) { + if ((present >> i) & 1) { + DEBUG("1"); + switch (i) { +@@ -252,7 +255,7 @@ parse_radiotap_header(unsigned char** bu + break; + case IEEE80211_RADIOTAP_CHANNEL: + /* channel & channel type */ +- current_packet.phy_freq = *(u_int16_t*)b; ++ current_packet.phy_freq = __le16_to_cpu(*(u_int16_t*)b); + DEBUG("[chan %d ", current_packet.phy_freq); + b = b + 2; + if (*(u_int16_t*)b & IEEE80211_CHAN_A) { +@@ -298,8 +301,8 @@ parse_radiotap_header(unsigned char** bu + DEBUG("noise: %d\n", current_packet.noise); + DEBUG("snr: %d\n", current_packet.snr); + +- *buf = *buf + rh->it_len; +- return len - rh->it_len; ++ *buf = *buf + rt_len; ++ return len - rt_len; + } + + +@@ -312,22 +315,25 @@ parse_80211_header(unsigned char** buf, + u8* sa = NULL; + u8* da = NULL; + u8* bssid = NULL; ++ u16 fc; + + if (len < 2) /* not even enough space for fc */ + return -1; + + wh = (struct ieee80211_hdr*)*buf; +- hdrlen = ieee80211_get_hdrlen(wh->frame_control); ++ fc = __le16_to_cpu(wh->frame_control); ++ hdrlen = ieee80211_get_hdrlen(fc); + + if (len < hdrlen) + return -1; + + current_packet.len = len; +- current_packet.wlan_type = (wh->frame_control & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)); ++ current_packet.wlan_type = (fc & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)); + +- DEBUG("wlan_type %x - type %x - stype %x\n", wh->frame_control, wh->frame_control & IEEE80211_FCTL_FTYPE, wh->frame_control & IEEE80211_FCTL_STYPE ); ++ DEBUG("wlan_type %x - type %x - stype %x\n", fc, ++ fc & IEEE80211_FCTL_FTYPE, fc & IEEE80211_FCTL_STYPE ); + +- DEBUG("%s\n", get_packet_type_name(wh->frame_control)); ++ DEBUG("%s\n", get_packet_type_name(fc)); + + bssid = ieee80211_get_bssid(wh, len); + diff --git a/net/horst/patches/100-compile-fixes.patch b/net/horst/patches/100-compile-fixes.patch new file mode 100644 index 0000000..7893a71 --- /dev/null +++ b/net/horst/patches/100-compile-fixes.patch @@ -0,0 +1,23 @@ +Index: horst-2.0-rc1/Makefile +=================================================================== +--- horst-2.0-rc1.orig/Makefile 2010-11-02 16:26:44.449999688 +0100 ++++ horst-2.0-rc1/Makefile 2010-11-02 16:27:13.640982158 +0100 +@@ -28,9 +28,7 @@ + LIBS+=-lpcap + endif + +-buildstamp=.build_debug$(DEBUG)pcap$(PCAP) +- +-all: $(buildstamp) $(NAME) ++all: $(NAME) + + # include dependencies + protocol_parser.o: protocol_parser.h ieee80211.h ieee80211_radiotap.h ieee80211_util.h \ +@@ -48,7 +46,3 @@ + -rm -f *.o *~ + -rm -f $(NAME) + -rm -f .build_* +- +-$(buildstamp): +- make clean +- touch $@ diff --git a/net/hping3/Makefile b/net/hping3/Makefile new file mode 100644 index 0000000..a947d74 --- /dev/null +++ b/net/hping3/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=hping3 +PKG_VERSION:=20051105 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.hping.org/ +PKG_MD5SUM:=ca4ea4e34bcc2162aedf25df8b2d1747 + +include $(INCLUDE_DIR)/package.mk + +define Package/hping3 + SECTION:=net + CATEGORY:=Network + TITLE:=TCP/IP packet assembler/analyzer + URL:=http://www.hping.org/ + DEPENDS:=+libpcap +libpthread +endef + +define Package/hping3/description + hping is a command-line oriented TCP/IP packet assembler/analyzer. The interface is + inspired to the ping(8) unix command, but hping isn't only able to send ICMP echo + requests. It supports TCP, UDP, ICMP and RAW-IP protocols, has a traceroute mode, the + ability to send files between a covered channel, and many other features. +endef + +define Build/Configure +endef + +define Package/hping3/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hping3 $(1)/usr/sbin/hping3 +endef + +$(eval $(call BuildPackage,hping3)) diff --git a/net/hping3/patches/100-makefile.patch b/net/hping3/patches/100-makefile.patch new file mode 100644 index 0000000..abf3a0d --- /dev/null +++ b/net/hping3/patches/100-makefile.patch @@ -0,0 +1,48 @@ +--- a/Makefile ++++ b/Makefile +@@ -6,15 +6,15 @@ + # $date: Sun Jul 25 17:56:15 MET DST 1999$ + # $rev: 3$ + +-CC= gcc +-AR=/usr/bin/ar +-RANLIB=/usr/bin/ranlib +-CCOPT= -O2 -Wall -I/usr/include/tcl8.4 -DUSE_TCL +-DEBUG= -g ++#CC= gcc ++#AR=/usr/bin/ar ++#RANLIB=/usr/bin/ranlib ++#CCOPT= -O2 -Wall ++#DEBUG= -g + #uncomment the following if you need libpcap based build under linux + #(not raccomanded) + COMPILE_TIME= +-INSTALL_MANPATH=/usr/local/man ++#INSTALL_MANPATH=/usr/local/man + PCAP=-lpcap + + ARSOBJ = ars.o apd.o split.o rapd.o +@@ -50,20 +50,16 @@ libars.a: $(ARSOBJ) + $(RANLIB) $@ + + hping3: byteorder.h $(OBJ) +- $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) -ltcl8.4 -lm -lpthread +- @echo +- ./hping3 -v +- @echo "use \`make strip' to strip hping3 binary" +- @echo "use \`make install' to install hping3" ++ $(CC) -o hping3 $(CFLAGS) $(LDFLAGS) $(DEBUG) $(OBJ) $(PCAP) -lm -lpthread + + hping3-static: byteorder.h $(OBJ) +- $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) -ltcl8.4 -lm -lpthread -ldl ++ $(CC) -static -o hping3-static $(CFLAGS) $(LDFLAGS) $(DEBUG) $(OBJ) $(PCAP) -lm -lpthread -ldl + + byteorder.h: + ./configure + + .c.o: +- $(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $< ++ $(CC) -c $(CFLAGS) $(LDFLAGS) $(DEBUG) $(COMPILE_TIME) $< + + clean: + rm -rf hping3 *.o libars.a diff --git a/net/hping3/patches/101-endianness.patch b/net/hping3/patches/101-endianness.patch new file mode 100644 index 0000000..2666647 --- /dev/null +++ b/net/hping3/patches/101-endianness.patch @@ -0,0 +1,52 @@ +--- a/hping2.h ++++ b/hping2.h +@@ -13,6 +13,7 @@ + #ifndef _HPING2_H + #define _HPING2_H + ++#include + #include + #include + #include +@@ -248,10 +249,10 @@ + * IP header + */ + struct myiphdr { +-#if defined(__LITTLE_ENDIAN_BITFIELD) ++#if __BYTE_ORDER == __LITTLE_ENDIAN + __u8 ihl:4, + version:4; +-#elif defined (__BIG_ENDIAN_BITFIELD) ++#elif __BYTE_ORDER == __BIG_ENDIAN + __u8 version:4, + ihl:4; + #else +@@ -287,10 +288,10 @@ struct mytcphdr { + __u16 th_dport; /* destination port */ + __u32 th_seq; /* sequence number */ + __u32 th_ack; /* acknowledgement number */ +-#if defined (__LITTLE_ENDIAN_BITFIELD) ++#if __BYTE_ORDER == __LITTLE_ENDIAN + __u8 th_x2:4, /* (unused) */ + th_off:4; /* data offset */ +-#elif defined (__BIG_ENDIAN_BITFIELD) ++#elif __BYTE_ORDER == __BIG_ENDIAN + __u8 th_off:4, /* data offset */ + th_x2:4; /* (unused) */ + #else +--- a/bytesex.h ++++ b/bytesex.h +@@ -9,9 +9,12 @@ + + #if defined(__i386__) \ + || defined(__alpha__) \ ++ || (defined(__arm__) && (defined(ARMEL) || defined(__ARMEL__))) \ + || (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__))) + #define BYTE_ORDER_LITTLE_ENDIAN +-#elif defined(__mc68000__) \ ++#elif defined(__mc68000__) \ ++ || (defined(__arm__) && (defined(ARMEB) || defined(__ARMEB__))) \ ++ || defined (__avr32__) \ + || defined (__sparc__) \ + || defined (__sparc) \ + || defined (__PPC__) \ diff --git a/net/hping3/patches/102-lib_rename.patch b/net/hping3/patches/102-lib_rename.patch new file mode 100644 index 0000000..c5d102c --- /dev/null +++ b/net/hping3/patches/102-lib_rename.patch @@ -0,0 +1,11 @@ +--- a/libpcap_stuff.c ++++ b/libpcap_stuff.c +@@ -17,7 +17,7 @@ + #include + #include + #include +-#include ++#include + + #include "globals.h" + diff --git a/net/htpdate/Makefile b/net/htpdate/Makefile new file mode 100644 index 0000000..8c1e9e3 --- /dev/null +++ b/net/htpdate/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=htpdate +PKG_VERSION:=1.0.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.clevervest.com/htp/archive/c/ +PKG_MD5SUM:=a13ec89839c33965794ebf53c4e690db + +include $(INCLUDE_DIR)/package.mk + +define Package/htpdate + SUBMENU:=Time Synchronization + SECTION:=net + CATEGORY:=Network + TITLE:=an HTP (Hypertext Time Protocol) implementation + URL:=http://www.clevervest.com/htp/ +endef + +define Package/htpdate/description + The HTTP Time Protocol (HTP) is used to synchronize a computer's time + with web servers as reference time source. Htpdate will synchronize your + computer's time by extracting timestamps from HTTP headers found + in web server responses. Htpdate can be used as a daemon, to keep your + computer synchronized. +endef + +define Package/htpdate/conffiles +/etc/default/htpdate +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" +endef + +define Package/htpdate/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/htpdate $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/default/ + $(INSTALL_CONF) ./files/htpdate.default $(1)/etc/default/htpdate + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/htpdate.init $(1)/etc/init.d/htpdate +endef + +$(eval $(call BuildPackage,htpdate)) + diff --git a/net/htpdate/files/htpdate.default b/net/htpdate/files/htpdate.default new file mode 100644 index 0000000..94674fd --- /dev/null +++ b/net/htpdate/files/htpdate.default @@ -0,0 +1 @@ +OPTIONS="www.google.com www.yahoo.com www.linux.org www.freebsd.org" diff --git a/net/htpdate/files/htpdate.init b/net/htpdate/files/htpdate.init new file mode 100644 index 0000000..1409321 --- /dev/null +++ b/net/htpdate/files/htpdate.init @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=49 +BIN=htpdate +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $RUN_D + $BIN -l -s -t $OPTIONS && $BIN -D $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + diff --git a/net/htpdate/patches/100-adjtimex.patch b/net/htpdate/patches/100-adjtimex.patch new file mode 100644 index 0000000..ec7c8a9 --- /dev/null +++ b/net/htpdate/patches/100-adjtimex.patch @@ -0,0 +1,20 @@ +--- a/htpdate.c ++++ b/htpdate.c +@@ -359,7 +359,7 @@ static int htpdate_adjtimex( double drif + + /* Read current kernel frequency */ + tmx.modes = 0; +- ntp_adjtime(&tmx); ++ adjtimex(&tmx); + + /* Calculate new frequency */ + freq = (long)(65536e6 * drift); +@@ -377,7 +377,7 @@ static int htpdate_adjtimex( double drif + printlog( 1, "seteuid()" ); + exit(1); + } else { +- return( ntp_adjtime(&tmx) ); ++ return( adjtimex(&tmx) ); + } + + } diff --git a/net/httping/Makefile b/net/httping/Makefile new file mode 100644 index 0000000..0a11935 --- /dev/null +++ b/net/httping/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=httping +PKG_VERSION:=1.4.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://www.vanheusden.com/httping +PKG_MD5SUM:=e36bb30bd758c766d7260bdde6fe6450 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/httping + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libopenssl + TITLE:=Httping is like 'ping' but for http-requests + URL:=http://www.vanheusden.com/httping/ +endef + +define Package/httping/description + Give it an url, and it'll show you how long it takes to connect, send a + request and retrieve the reply (only the headers). Be aware that the + transmission across the network also takes time! +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + +define Package/httping/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/httping $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,httping)) diff --git a/net/httping/patches/001-extra_flags.patch b/net/httping/patches/001-extra_flags.patch new file mode 100644 index 0000000..c259dc9 --- /dev/null +++ b/net/httping/patches/001-extra_flags.patch @@ -0,0 +1,20 @@ +--- a/Makefile ++++ b/Makefile +@@ -18,7 +18,7 @@ TARGET=httping + + WFLAGS=-Wall -W + OFLAGS=-O2 +-CFLAGS+=$(WFLAGS) $(OFLAGS) -DVERSION=\"$(VERSION)\" ++CFLAGS+=$(EXTRA_CFLAGS) $(WFLAGS) $(OFLAGS) -DVERSION=\"$(VERSION)\" + + PACKAGE=$(TARGET)-$(VERSION) + PREFIX=/usr +@@ -47,7 +47,7 @@ ifeq ($(SSL),no) + CFLAGS+=-DNO_SSL + else + OBJS+=mssl.o +-LDFLAGS+=-lssl -lcrypto ++LDFLAGS+=$(EXTRA_LDFLAGS) -lssl -lcrypto + endif + + ifeq ($(DEBUG),yes) diff --git a/net/httping/patches/002-version.patch b/net/httping/patches/002-version.patch new file mode 100644 index 0000000..ed5553b --- /dev/null +++ b/net/httping/patches/002-version.patch @@ -0,0 +1,29 @@ +--- a/main.c ++++ b/main.c +@@ -41,6 +41,8 @@ + #include "utils.h" + #include "error.h" + ++#define VERSION "1.4.4" ++ + static volatile int stop = 0; + + int quiet = 0; +@@ -52,7 +54,7 @@ char last_error[ERROR_BUFFER_SIZE]; + + void version(void) + { +- fprintf(stderr, "HTTPing v" VERSION ", (C) 2003-2010 folkert@vanheusden.com\n"); ++ fprintf(stderr, "HTTPing v%s (C) 2003-2010 folkert@vanheusden.com\n", VERSION); + #ifndef NO_SSL + fprintf(stderr, "SSL support included\n"); + #endif +@@ -606,7 +608,7 @@ int main(int argc, char *argv[]) + if (useragent) + sprintf(&request[strlen(request)], "User-Agent: %s\r\n", useragent); + else +- sprintf(&request[strlen(request)], "User-Agent: HTTPing v" VERSION "\r\n"); ++ sprintf(&request[strlen(request)], "User-Agent: HTTPing v%s\r\n", VERSION); + sprintf(&request[strlen(request)], "Host: %s\r\n", hostname); + if (referer) + sprintf(&request[strlen(request)], "Referer: %s\r\n", referer); diff --git a/net/httptunnel/Makefile b/net/httptunnel/Makefile new file mode 100644 index 0000000..4cebdd4 --- /dev/null +++ b/net/httptunnel/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=httptunnel +PKG_VERSION:=3.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.nocrew.org/pub/nocrew/unix/ +PKG_MD5SUM:=493cc0f5f21e9955db27ee9cd9a976d5 + +include $(INCLUDE_DIR)/package.mk + +define Package/httptunnel + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libopenssl + SUBMENU:=Firewall Tunnel + TITLE:=bidirectional tunnel in HTTP requests + URL:=http://www.nocrew.org/software/httptunnel.html +endef + +define Package/httptunnel/description + httptunnel creates a bidirectional virtual data connection tunnelled in HTTP requests. + The HTTP requests can be sent via an HTTP proxy if so desired. +endef + +define Package/httptunnel/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hts $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/htc $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/httptunnel.init $(1)/etc/init.d/httptunnel + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/httptunnel.conf $(1)/etc/config/httptunnel +endef + +$(eval $(call BuildPackage,httptunnel)) diff --git a/net/httptunnel/files/httptunnel.conf b/net/httptunnel/files/httptunnel.conf new file mode 100644 index 0000000..fb5a5dd --- /dev/null +++ b/net/httptunnel/files/httptunnel.conf @@ -0,0 +1,4 @@ +config httptunnel + option destination 'localhost:443' + option sourceport '80' + diff --git a/net/httptunnel/files/httptunnel.init b/net/httptunnel/files/httptunnel.init new file mode 100644 index 0000000..6c84618 --- /dev/null +++ b/net/httptunnel/files/httptunnel.init @@ -0,0 +1,27 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org +START=70 +BIN=hts + +start_httptunnel() { + local section="$1" + + config_get destination "$section" destination + config_get sourceport "$section" sourceport + + echo start httptunnel: dest: "$destination", src: "$sourceport" + + $BIN --forward-port "$destination" "$sourceport" +} + + +start() { + config_load httptunnel + config_foreach start_httptunnel httptunnel +} + +stop() { + ps aux | grep hts | awk '{print }' | \ + xargs kill 2> /dev/null +} + \ No newline at end of file diff --git a/net/icmptx/Makefile b/net/icmptx/Makefile new file mode 100644 index 0000000..2622de3 --- /dev/null +++ b/net/icmptx/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=icmptx +PKG_REV:=33e0b826f99df290ee792f6aa587af273d674309 +PKG_VERSION:=0.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=git://github.com/jakkarth/icmptx.git +PKG_SOURCE_VERSION:=$(PKG_REV) + +include $(INCLUDE_DIR)/package.mk + +define Package/icmptx + SECTION:=net + CATEGORY:=Network + SUBMENU:=Firewall Tunnel + TITLE:=IP-over-ICMP tunnel + URL:=http://github.com/jakkarth/icmptx +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + OPT_FLAGS="$(TARGET_CFLAGS)" \ + icmptx +endef + +define Package/icmptx/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/icmptx $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,icmptx)) diff --git a/net/icmptx/patches/001-cross_compile.patch b/net/icmptx/patches/001-cross_compile.patch new file mode 100644 index 0000000..c048d56 --- /dev/null +++ b/net/icmptx/patches/001-cross_compile.patch @@ -0,0 +1,24 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,15 +1,17 @@ +-flags=-g3 -Wall -ansi -pedantic -D_GNU_SOURCE ++OPT_FLAGS=-g3 ++ ++flags=$(OPT_FLAGS) -Wall -ansi -pedantic -D_GNU_SOURCE + + all: icmptx + + icmptx: it.o icmptx.c tun_dev.o +- gcc $(flags) -o icmptx icmptx.c it.o tun_dev.o ++ $(CC) $(flags) -o icmptx icmptx.c it.o tun_dev.o + + it.o: it.c tun_dev.h +- gcc $(flags) -c it.c ++ $(CC) $(flags) -c it.c + + tun_dev.o: tun_dev.c +- gcc $(flags) -c tun_dev.c ++ $(CC) $(flags) -c tun_dev.c + + clean: + rm -f tun_dev.o it.o icmptx diff --git a/net/ifstat/Makefile b/net/ifstat/Makefile new file mode 100644 index 0000000..0e54542 --- /dev/null +++ b/net/ifstat/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ifstat +PKG_VERSION:=1.1 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://gael.roualland.free.fr/ifstat +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=b655642c33a626cfe976792fbcd9b6e1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ifstat + SECTION:=net + CATEGORY:=Network + TITLE:=Network interface bandwidth usage + URL:=http://gael.roualland.free.fr/ifstat/ +endef + +define Package/ifstat/description + Network interface bandwidth usage, with support for snmp targets +endef + +CONFIGURE_ARGS += \ + --with-proc=yes \ + --with-snmp=no \ + +define Build/Configure + (cd $(PKG_BUILD_DIR); touch \ + config.h.in \ + configure \ + ); + $(call Build/Configure/Default) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) all +endef + +define Package/ifstat/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ifstat $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,ifstat)) diff --git a/net/ifstat/patches/001-configure_cross.patch b/net/ifstat/patches/001-configure_cross.patch new file mode 100644 index 0000000..053b055 --- /dev/null +++ b/net/ifstat/patches/001-configure_cross.patch @@ -0,0 +1,913 @@ +diff -ruN ifstat-1.1-old/configure ifstat-1.1-new/configure +--- ifstat-1.1-old/configure 2004-01-01 20:18:14.000000000 +0100 ++++ ifstat-1.1-new/configure 2007-09-06 12:20:40.000000000 +0200 +@@ -1387,34 +1387,39 @@ + esac + echo $ac_n "checking for proc interface in $file""... $ac_c" 1>&6 + echo "configure:1390: checking for proc interface in $file" >&5 +- if grep -q Inter- $file 2>/dev/null; then +- cat >> confdefs.h <<\EOF ++ if test "$cross_compiling" = yes; then ++ with_proc=cross ++ elif grep -q Inter- $file 2>/dev/null; then ++ with_proc=yes ++ else ++ with_proc=no ++ fi ++ echo "$ac_t""$with_proc" 1>&6 ++fi ++if test "x$with_proc" != "xno"; then ++ cat >> confdefs.h <<\EOF + #define USE_PROC 1 + EOF + +- cat >> confdefs.h <> confdefs.h <&6 ++ with_proc=yes ++ with_ioctl=yes ++ local=yes + fi + + # checking for kstat (Solaris) + test "x$with_kstat" = "xauto" -a "x$local" = "xyes" && with_kstat=no + if test "x$with_kstat" != "xno"; then + echo $ac_n "checking for kstat_open""... $ac_c" 1>&6 +-echo "configure:1413: checking for kstat_open" >&5 ++echo "configure:1418: checking for kstat_open" >&5 + if eval "test \"`echo '$''{'ac_cv_func_kstat_open'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_kstat_open=yes" + else +@@ -1461,7 +1466,7 @@ + case "x$LIBS" in + *-lkstat*) ;; + *) echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 +-echo "configure:1465: checking for kstat_open in -lkstat" >&5 ++echo "configure:1470: checking for kstat_open in -lkstat" >&5 + ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1469,7 +1474,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lkstat $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1507,17 +1512,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:1511: checking for $ac_hdr" >&5 ++echo "configure:1516: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1557,17 +1562,17 @@ + if test "x$with_ifmib" != "xno"; then + ac_safe=`echo "net/if_mib.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for net/if_mib.h""... $ac_c" 1>&6 +-echo "configure:1561: checking for net/if_mib.h" >&5 ++echo "configure:1566: checking for net/if_mib.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1584,12 +1589,12 @@ + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for sysctl""... $ac_c" 1>&6 +-echo "configure:1588: checking for sysctl" >&5 ++echo "configure:1593: checking for sysctl" >&5 + if eval "test \"`echo '$''{'ac_cv_func_sysctl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_sysctl=yes" + else +@@ -1642,17 +1647,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:1646: checking for $ac_hdr" >&5 ++echo "configure:1651: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1679,13 +1684,13 @@ + done + + echo $ac_n "checking for working ifmib sysctl""... $ac_c" 1>&6 +-echo "configure:1683: checking for working ifmib sysctl" >&5 ++echo "configure:1688: checking for working ifmib sysctl" >&5 + # try run since interface is available on darwin but doesn't work + if test "$cross_compiling" = yes; then + with_ifmib=maybe + else + cat > conftest.$ac_ext < + #include +@@ -1706,7 +1711,7 @@ + int size; + int main() { return sysctl(ifcount, 5, NULL, &size, NULL, NULL); } + EOF +-if { (eval echo configure:1710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:1715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + with_ifmib=yes + else +@@ -1733,9 +1738,9 @@ + test "x$with_ifdata" = "xauto" -a "x$local" = "xyes" && with_ifdata=no + if test "x$with_ifdata" != "xno"; then + echo $ac_n "checking for SIOCGIFDATA and ifdatareq""... $ac_c" 1>&6 +-echo "configure:1737: checking for SIOCGIFDATA and ifdatareq" >&5 ++echo "configure:1742: checking for SIOCGIFDATA and ifdatareq" >&5 + cat > conftest.$ac_ext < + #include +@@ -1753,7 +1758,7 @@ + ifd.ifd_ifd.ifi_ibytes = ifd.ifd_ifd.ifi_obytes; + ; return 0; } + EOF +-if { (eval echo configure:1757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + with_ifdata=yes + else +@@ -1768,9 +1773,9 @@ + fi + if test "x$with_ifdata" = "xcheckifr"; then + echo $ac_n "checking for SIOCGIFDATA and ifreq.ifr_data""... $ac_c" 1>&6 +-echo "configure:1772: checking for SIOCGIFDATA and ifreq.ifr_data" >&5 ++echo "configure:1777: checking for SIOCGIFDATA and ifreq.ifr_data" >&5 + cat > conftest.$ac_ext < + #include +@@ -1789,7 +1794,7 @@ + ifd.ifi_ibytes = ifd.ifi_obytes; + ; return 0; } + EOF +-if { (eval echo configure:1793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + with_ifdata=yes + cat >> confdefs.h <<\EOF +@@ -1821,17 +1826,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:1825: checking for $ac_hdr" >&5 ++echo "configure:1830: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1858,12 +1863,12 @@ + done + + echo $ac_n "checking for sysctl""... $ac_c" 1>&6 +-echo "configure:1862: checking for sysctl" >&5 ++echo "configure:1867: checking for sysctl" >&5 + if eval "test \"`echo '$''{'ac_cv_func_sysctl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_sysctl=yes" + else +@@ -1908,9 +1913,9 @@ + + if test "x$with_route" = "xyes"; then + echo $ac_n "checking for route info sysctl""... $ac_c" 1>&6 +-echo "configure:1912: checking for route info sysctl" >&5 ++echo "configure:1917: checking for route info sysctl" >&5 + cat > conftest.$ac_ext < + #include +@@ -1935,7 +1940,7 @@ + ifm.ifm_data.ifi_ibytes; + ; return 0; } + EOF +-if { (eval echo configure:1939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + with_route=yes + else +@@ -1960,12 +1965,12 @@ + test "x$with_kvm" = "xauto" -a "x$local" = "xyes" && with_kvm=no + if test "x$with_kvm" != "xno"; then + echo $ac_n "checking for kvm_openfiles""... $ac_c" 1>&6 +-echo "configure:1964: checking for kvm_openfiles" >&5 ++echo "configure:1969: checking for kvm_openfiles" >&5 + if eval "test \"`echo '$''{'ac_cv_func_kvm_openfiles'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_kvm_openfiles=yes" + else +@@ -2012,7 +2017,7 @@ + case "x$LIBS" in + *-lkvm*) ;; + *) echo $ac_n "checking for kvm_openfiles in -lkvm""... $ac_c" 1>&6 +-echo "configure:2016: checking for kvm_openfiles in -lkvm" >&5 ++echo "configure:2021: checking for kvm_openfiles in -lkvm" >&5 + ac_lib_var=`echo kvm'_'kvm_openfiles | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2020,7 +2025,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lkvm $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2059,17 +2064,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2063: checking for $ac_hdr" >&5 ++echo "configure:2068: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -2093,12 +2098,12 @@ + for ac_func in knlist + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:2097: checking for $ac_func" >&5 ++echo "configure:2102: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -2142,16 +2147,16 @@ + + with_kvm=yes + echo $ac_n "checking whether knlist takes 3 arguments""... $ac_c" 1>&6 +-echo "configure:2146: checking whether knlist takes 3 arguments" >&5 ++echo "configure:2151: checking whether knlist takes 3 arguments" >&5 + cat > conftest.$ac_ext < + int main() { + knlist((struct nlist *) 0, 0, 10); + ; return 0; } + EOF +-if { (eval echo configure:2155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + knlist3=yes + else +@@ -2172,12 +2177,12 @@ + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for nlist""... $ac_c" 1>&6 +-echo "configure:2176: checking for nlist" >&5 ++echo "configure:2181: checking for nlist" >&5 + if eval "test \"`echo '$''{'ac_cv_func_nlist'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_nlist=yes" + else +@@ -2232,12 +2237,12 @@ + for ac_func in readx + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:2236: checking for $ac_func" >&5 ++echo "configure:2241: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -2288,17 +2293,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2292: checking for $ac_hdr" >&5 ++echo "configure:2297: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -2330,17 +2335,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2334: checking for $ac_hdr" >&5 ++echo "configure:2339: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -2373,9 +2378,9 @@ + fi + if test "x$with_kvm" = "xyes"; then + echo $ac_n "checking whether struct ifnet has needed interface data""... $ac_c" 1>&6 +-echo "configure:2377: checking whether struct ifnet has needed interface data" >&5 ++echo "configure:2382: checking whether struct ifnet has needed interface data" >&5 + cat > conftest.$ac_ext < + #include +@@ -2388,7 +2393,7 @@ + in.if_type = in.if_flags + ; return 0; } + EOF +-if { (eval echo configure:2392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + with_kvm=yes + else +@@ -2402,9 +2407,9 @@ + fi + if test "x$with_kvm" = "xyes"; then + echo $ac_n "checking for struct ifnet if_xname member""... $ac_c" 1>&6 +-echo "configure:2406: checking for struct ifnet if_xname member" >&5 ++echo "configure:2411: checking for struct ifnet if_xname member" >&5 + cat > conftest.$ac_ext < + #include +@@ -2416,7 +2421,7 @@ + struct ifnet in; in.if_xname[0] = 'a'; + ; return 0; } + EOF +-if { (eval echo configure:2420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ifxname=yes + else +@@ -2433,9 +2438,9 @@ + echo "$ac_t""$ifxname" 1>&6 + + echo $ac_n "checking for struct ifnet if_next member""... $ac_c" 1>&6 +-echo "configure:2437: checking for struct ifnet if_next member" >&5 ++echo "configure:2442: checking for struct ifnet if_next member" >&5 + cat > conftest.$ac_ext < + #include +@@ -2447,7 +2452,7 @@ + struct ifnet in; in.if_next; + ; return 0; } + EOF +-if { (eval echo configure:2451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ifnext=yes + else +@@ -2465,9 +2470,9 @@ + + else + echo $ac_n "checking for struct ifnet if_link member""... $ac_c" 1>&6 +-echo "configure:2469: checking for struct ifnet if_link member" >&5 ++echo "configure:2474: checking for struct ifnet if_link member" >&5 + cat > conftest.$ac_ext < + #include +@@ -2479,7 +2484,7 @@ + struct ifnet in; in.if_link; + ; return 0; } + EOF +-if { (eval echo configure:2483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + iflink=yes + else +@@ -2512,17 +2517,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2516: checking for $ac_hdr" >&5 ++echo "configure:2521: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -2549,9 +2554,9 @@ + done + + echo $ac_n "checking for dlpi streams interface""... $ac_c" 1>&6 +-echo "configure:2553: checking for dlpi streams interface" >&5 ++echo "configure:2558: checking for dlpi streams interface" >&5 + cat > conftest.$ac_ext < +@@ -2573,7 +2578,7 @@ + struct strbuf ctlptr; putmsg(0, &ctlptr, NULL, 0); + ; return 0; } + EOF +-if { (eval echo configure:2577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + with_dlpi=yes + else +@@ -2596,11 +2601,11 @@ + test "x$with_win32" = "xauto" -a "x$local" = "xyes" && with_win32=no + if test "x$with_win32" != "xno"; then + echo $ac_n "checking for win32 GetIfTable interface""... $ac_c" 1>&6 +-echo "configure:2600: checking for win32 GetIfTable interface" >&5 ++echo "configure:2605: checking for win32 GetIfTable interface" >&5 + OLIBS="$LIBS" + LIBS="$LIBS -liphlpapi" + cat > conftest.$ac_ext < + #include +@@ -2608,7 +2613,7 @@ + GetIfTable(NULL, NULL, 0); + ; return 0; } + EOF +-if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + with_win32=yes + else +@@ -2636,12 +2641,12 @@ + EOF + + echo $ac_n "checking for socket""... $ac_c" 1>&6 +-echo "configure:2640: checking for socket" >&5 ++echo "configure:2645: checking for socket" >&5 + if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_socket=yes" + else +@@ -2688,7 +2693,7 @@ + case "x$LIBS" in + *-lsocket*);; + *) echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +-echo "configure:2692: checking for socket in -lsocket" >&5 ++echo "configure:2697: checking for socket in -lsocket" >&5 + ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2696,7 +2701,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2737,12 +2742,12 @@ + esac + fi + echo $ac_n "checking for if_nameindex""... $ac_c" 1>&6 +-echo "configure:2741: checking for if_nameindex" >&5 ++echo "configure:2746: checking for if_nameindex" >&5 + if eval "test \"`echo '$''{'ac_cv_func_if_nameindex'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_if_nameindex=yes" + else +@@ -2789,7 +2794,7 @@ + case "x$LIBS" in + *-lnsl*);; + *) echo $ac_n "checking for if_nameindex in -lnsl""... $ac_c" 1>&6 +-echo "configure:2793: checking for if_nameindex in -lnsl" >&5 ++echo "configure:2798: checking for if_nameindex in -lnsl" >&5 + ac_lib_var=`echo nsl'_'if_nameindex | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2797,7 +2802,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2832,9 +2837,9 @@ + fi + if test "x$ifnameindex" != "xyes"; then + echo $ac_n "checking for sockaddr sa_len member""... $ac_c" 1>&6 +-echo "configure:2836: checking for sockaddr sa_len member" >&5 ++echo "configure:2841: checking for sockaddr sa_len member" >&5 + cat > conftest.$ac_ext < +@@ -2843,7 +2848,7 @@ + struct sockaddr sa; sa.sa_len = 1; + ; return 0; } + EOF +-if { (eval echo configure:2847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + salen=yes + else +@@ -2875,7 +2880,7 @@ + # Extract the first word of "net-snmp-config", so it can be a program name with args. + set dummy net-snmp-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:2879: checking for $ac_word" >&5 ++echo "configure:2884: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_netsnmpconfig'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -2912,16 +2917,16 @@ + CPPFLAGS="$CPPFLAGS `$netsnmpconfig --base-cflags 2>/dev/null`" + LDFLAGS="$LDFLAGS `$netsnmpconfig --libs 2>/dev/null`" + echo $ac_n "checking whether net-snmp-config hints compiles and links fine""... $ac_c" 1>&6 +-echo "configure:2916: checking whether net-snmp-config hints compiles and links fine" >&5 ++echo "configure:2921: checking whether net-snmp-config hints compiles and links fine" >&5 + cat > conftest.$ac_ext < + int main() { + snmp_sess_init((void *) 0); + ; return 0; } + EOF +-if { (eval echo configure:2925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + snmp_ok=yes + else +@@ -2948,17 +2953,17 @@ + fi + ac_safe=`echo "net-snmp/net-snmp-config.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for net-snmp/net-snmp-config.h""... $ac_c" 1>&6 +-echo "configure:2952: checking for net-snmp/net-snmp-config.h" >&5 ++echo "configure:2957: checking for net-snmp/net-snmp-config.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -2979,17 +2984,17 @@ + echo "$ac_t""no" 1>&6 + ac_safe=`echo "ucd-snmp/ucd-snmp-config.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for ucd-snmp/ucd-snmp-config.h""... $ac_c" 1>&6 +-echo "configure:2983: checking for ucd-snmp/ucd-snmp-config.h" >&5 ++echo "configure:2988: checking for ucd-snmp/ucd-snmp-config.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -3040,18 +3045,18 @@ + for lib in $SNMPLIBALONE "$libsnmp -lcrypto" ; do + if test "x$with_snmp" != "xyes" ; then + echo $ac_n "checking for snmp support in $lib""... $ac_c" 1>&6 +-echo "configure:3044: checking for snmp support in $lib" >&5 ++echo "configure:3049: checking for snmp support in $lib" >&5 + OLIBS="$LIBS" + LIBS="$LIBS $lib" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + with_snmp=yes + else +diff -ruN ifstat-1.1-old/configure.in ifstat-1.1-new/configure.in +--- ifstat-1.1-old/configure.in 2003-11-22 02:27:51.000000000 +0100 ++++ ifstat-1.1-new/configure.in 2007-09-06 12:20:21.000000000 +0200 +@@ -59,17 +59,22 @@ + *) file=/proc/net/dev ;; + esac + AC_MSG_CHECKING([for proc interface in $file]) +- if grep -q Inter- $file 2>/dev/null; then +- AC_DEFINE([USE_PROC], 1, [Define if you want to use /proc to get stats]) +- AC_DEFINE_UNQUOTED([PROC_FILE], ["$file"], [Proc file to poll for stats]) ++ if test "$cross_compiling" = yes; then ++ with_proc=cross ++ elif grep -q Inter- $file 2>/dev/null; then + with_proc=yes +- with_ioctl=yes +- local=yes + else + with_proc=no + fi + AC_MSG_RESULT([$with_proc]) + fi ++if test "x$with_proc" != "xno"; then ++ AC_DEFINE([USE_PROC], 1, [Define if you want to use /proc to get stats]) ++ AC_DEFINE_UNQUOTED([PROC_FILE], ["$file"], [Proc file to poll for stats]) ++ with_proc=yes ++ with_ioctl=yes ++ local=yes ++fi + + # checking for kstat (Solaris) + test "x$with_kstat" = "xauto" -a "x$local" = "xyes" && with_kstat=no diff --git a/net/iftop/Makefile b/net/iftop/Makefile new file mode 100644 index 0000000..9bd0461 --- /dev/null +++ b/net/iftop/Makefile @@ -0,0 +1,40 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=iftop +PKG_VERSION:=0.17 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.ex-parrot.com/~pdw/iftop/download +PKG_MD5SUM:=062bc8fb3856580319857326e0b8752d + +include $(INCLUDE_DIR)/package.mk + +define Package/iftop + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap +libncurses +libpthread + TITLE:=display bandwith usage on an interface + URL:=http://www.ex-parrot.com/~pdw/iftop/ +endef + +define Package/iftop/description + iftop does for network usage what top(1) does for CPU usage. It + listens to network traffic on a named interface and displays a + table of current bandwidth usage by pairs of hosts. Handy for + answering the question 'why is our ADSL link so slow?'. +endef + +define Package/iftop/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/iftop $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,iftop)) diff --git a/net/iftop/patches/001-debian_armeb.patch b/net/iftop/patches/001-debian_armeb.patch new file mode 100644 index 0000000..8abd92e --- /dev/null +++ b/net/iftop/patches/001-debian_armeb.patch @@ -0,0 +1,11 @@ +--- a/ether.h ++++ b/ether.h +@@ -12,7 +12,7 @@ struct ether_header { + u_int8_t ether_dhost[ETHER_ADDR_LEN]; + u_int8_t ether_shost[ETHER_ADDR_LEN]; + u_int16_t ether_type; +-}; ++} __attribute__((packed)); + + struct vlan_8021q_header { + u_int16_t priority_cfi_vid; diff --git a/net/iftop/patches/002-debian_frozen_order.patch b/net/iftop/patches/002-debian_frozen_order.patch new file mode 100644 index 0000000..c622036 --- /dev/null +++ b/net/iftop/patches/002-debian_frozen_order.patch @@ -0,0 +1,10 @@ +--- a/ui.c ++++ b/ui.c +@@ -446,6 +446,7 @@ void screen_hash_clear() { + hash_node_type* n = NULL; + while(hash_next_item(screen_hash, &n) == HASH_STATUS_OK) { + host_pair_line* hpl = (host_pair_line*)n->rec; ++ hpl->total_recv = hpl->total_sent = 0; + memset(hpl->recv, 0, sizeof(hpl->recv)); + memset(hpl->sent, 0, sizeof(hpl->sent)); + } diff --git a/net/iftop/patches/003-debian_arm.patch b/net/iftop/patches/003-debian_arm.patch new file mode 100644 index 0000000..090ea1c --- /dev/null +++ b/net/iftop/patches/003-debian_arm.patch @@ -0,0 +1,15 @@ +--- a/cfgfile.c ++++ b/cfgfile.c +@@ -45,9 +45,9 @@ stringmap config; + extern options_t options ; + + int is_cfgdirective_valid(const char *s) { +- char **t; +- for (t = config_directives; *t != NULL; ++t) +- if (strcmp(s, *t) == 0) return 1; ++ int t; ++ for (t = 0; config_directives[t] != NULL; t++) ++ if (strcmp(s, config_directives[t]) == 0) return 1; + return 0; + } + diff --git a/net/iftop/patches/004-debian_bar_display.patch b/net/iftop/patches/004-debian_bar_display.patch new file mode 100644 index 0000000..7efaa2b --- /dev/null +++ b/net/iftop/patches/004-debian_bar_display.patch @@ -0,0 +1,11 @@ +--- a/options.c ++++ b/options.c +@@ -302,7 +302,7 @@ void options_read_args(int argc, char ** + break; + + case 'b': +- config_set_string("show-bars", "true"); ++ config_set_string("show-bars", "false"); + break; + + case 'B': diff --git a/net/iftop/patches/005-debian_bar_bytes.patch b/net/iftop/patches/005-debian_bar_bytes.patch new file mode 100644 index 0000000..b9ecc26 --- /dev/null +++ b/net/iftop/patches/005-debian_bar_bytes.patch @@ -0,0 +1,11 @@ +--- a/ui.c ++++ b/ui.c +@@ -263,7 +263,7 @@ static void draw_bar_scale(int* y) { + char s[40], *p; + int x; + /* This 1024 vs 1000 stuff is just plain evil */ +- readable_size(i, s, sizeof s, options.log_scale ? 1000 : 1024, 0); ++ readable_size(i, s, sizeof s, options.log_scale ? 1000 : 1024, options.bandwidth_in_bytes); + p = s + strspn(s, " "); + x = get_bar_length(i * 8); + mvaddch(*y + 1, x, ACS_BTEE); diff --git a/net/igmpproxy/Makefile b/net/igmpproxy/Makefile new file mode 100644 index 0000000..b420fc5 --- /dev/null +++ b/net/igmpproxy/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=igmpproxy +PKG_VERSION:=0.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/igmpproxy +PKG_MD5SUM:=c56f41ec195bc1fe016369bf74efc5a1 + +include $(INCLUDE_DIR)/package.mk + +define Package/igmpproxy + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + TITLE:=Multicast Routing Daemon + URL:=http://sourceforge.net/projects/igmpproxy +endef + +define Package/igmpproxy/description + IGMPproxy is a simple dynamic Multicast Routing Daemon using + only IGMP signalling (Internet Group Management Protocol). +endef + +define Package/igmpproxy/conffiles +/etc/igmpproxy.conf +endef + +TARGET_CFLAGS += -Dlog=igmpproxy_log + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/src \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -std=gnu99" +endef + +define Package/igmpproxy/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) ./files/igmpproxy.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/igmpproxy.init $(1)/etc/init.d/igmpproxy + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/igmpproxy $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,igmpproxy)) diff --git a/net/igmpproxy/files/igmpproxy.conf b/net/igmpproxy/files/igmpproxy.conf new file mode 100644 index 0000000..cffc80f --- /dev/null +++ b/net/igmpproxy/files/igmpproxy.conf @@ -0,0 +1,43 @@ +######################################################## +# +# Example configuration file for the IgmpProxy +# -------------------------------------------- +# +# The configuration file must define one upstream +# interface, and one or more downstream interfaces. +# +# If multicast traffic originates outside the +# upstream subnet, the "altnet" option can be +# used in order to define legal multicast sources. +# (Se example...) +# +# The "quickleave" should be used to avoid saturation +# of the upstream link. The option should only +# be used if it's absolutely nessecary to +# accurately imitate just one Client. +# +######################################################## + +##------------------------------------------------------ +## Enable Quickleave mode (Sends Leave instantly) +##------------------------------------------------------ +quickleave + + +##------------------------------------------------------ +## Configuration for eth0 (Upstream Interface) +##------------------------------------------------------ +phyint vlan0 upstream ratelimit 0 threshold 1 + altnet 192.168.1.0/24 + + +##------------------------------------------------------ +## Configuration for eth1 (Downstream Interface) +##------------------------------------------------------ +phyint vlan1 downstream ratelimit 0 threshold 1 + + +##------------------------------------------------------ +## Configuration for eth2 (Disabled Interface) +##------------------------------------------------------ +phyint eth2 disabled diff --git a/net/igmpproxy/files/igmpproxy.init b/net/igmpproxy/files/igmpproxy.init new file mode 100644 index 0000000..5565d31 --- /dev/null +++ b/net/igmpproxy/files/igmpproxy.init @@ -0,0 +1,33 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2010 OpenWrt.org + +START=99 +STOP=10 + +# igmpproxy supports both a debug mode and verbosity, which are very useful +# when something isn't working. +# +# Debug mode will print everything to stdout instead of syslog. Generally +# verbosity should NOT be set as it will quickly fill your syslog. +# +# Put any debug or verbosity options into IGMP_OPTS +# +# Examples: +# IGMP_OPTS="-d -v -v" - debug mode and very verbose, this will land in +# stdout and not in syslog +# IGMP_OPTS="-v" - be verbose, this will write aditional information to syslog + +IGMP_OPTS="" +IGMP_BIN="/usr/sbin/igmpproxy" +IGMP_CNF="/etc/igmpproxy.conf" +PID_F="/var/run/igmpproxy.pid" + +start() { + echo "Starting igmpproxy" + start-stop-daemon -S -x $IGMP_BIN -p $PID_F -b -m -- $IGMP_OPTS $IGMP_CNF +} + +stop() { + echo "Stopping igmpporxy" + start-stop-daemon -K -x $IGMP_BIN -p $PID_F -q +} diff --git a/net/imsnif/Makefile b/net/imsnif/Makefile new file mode 100644 index 0000000..c705af4 --- /dev/null +++ b/net/imsnif/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# $ Id:$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=imsnif +PKG_VERSION:=0.04 +PKG_RELEASE:=2 +PKG_MD5SUM:=689c456f8edb77b9b4199a25514ac683 + +PKG_SOURCE_URL:=@SF/im-snif +PKG_SOURCE:=$(PKG_NAME)f_$(PKG_VERSION).tgz + +include $(INCLUDE_DIR)/package.mk + +PKG_UNPACK:=gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR) -C $(PKG_BUILD_DIR) -xvf - + +define Package/imsnif + SECTION:=net + CATEGORY:=Network + SUBMENU:=Instant Messaging + DEPENDS:=+libpcap +uclibcxx + TITLE:=MSN Messenger sniffer + URL:=http://sourceforge.net/projects/im-snif +endef + +define Package/imsnif/description + IMsnif is a simple program to log Instant Message activity + on the network. It uses libpcap to capture packets and + analyzes them, logging conversation, contact lists, etc. +endef + +define Build/Compile + $(TARGET_CROSS)g++ $(TARGET_CPPFLAGS) -fno-builtin -fno-rtti -nostdinc++ \ + -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include \ + -o $(PKG_BUILD_DIR)/src/imsnif \ + $(PKG_BUILD_DIR)/src/imsniff.cpp \ + $(PKG_BUILD_DIR)/src/util.cpp \ + $(PKG_BUILD_DIR)/src/msn_conntrack.cpp \ + $(PKG_BUILD_DIR)/src/msn_handlers.cpp \ + -L$(STAGING_DIR)/usr/lib -nodefaultlibs -luClibc++ $(LIBGCC_S) -lpcap \ + $(PKG_BUILD_DIR)/src/pcap_stuff.cpp +endef + +define Package/imsnif/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/docs/imsniff.conf.sample $(1)/etc/imsnif.conf + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/imsnif $(1)/etc/init.d + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/imsnif $(1)/usr/bin +endef + +$(eval $(call BuildPackage,imsnif)) diff --git a/net/imsnif/files/imsnif b/net/imsnif/files/imsnif new file mode 100755 index 0000000..12c2f28 --- /dev/null +++ b/net/imsnif/files/imsnif @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +#Copyright (C) 2007 RoadRunner.cx +START=85 + +start() { + [ -f /etc/imsnif.conf ] && /usr/bin/imsnif || { + cat <tm_year, stm->tm_mon, stm->tm_mday); ++ sprintf (fn, "%s/imsnif_%04d-%02d-%02d.log", debuglogdir, stm->tm_year, stm->tm_mon, stm->tm_mday); + #else + struct tm stm; + localtime_r (&now, &stm); +- sprintf (fn, "%s/imsniff_%04d-%02d-%02d.log", debuglogdir, stm.tm_year, stm.tm_mon, stm.tm_mday); ++ sprintf (fn, "%s/imsnif_%04d-%02d-%02d.log", debuglogdir, stm.tm_year, stm.tm_mon, stm.tm_mday); + #endif + FILE *o=fopen (fn, "a+t"); + if (o!=NULL) diff --git a/net/imspector/Makefile b/net/imspector/Makefile new file mode 100644 index 0000000..2e0f869 --- /dev/null +++ b/net/imspector/Makefile @@ -0,0 +1,85 @@ +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# +# Author: Carlos Cesario + +include $(TOPDIR)/rules.mk + +PKG_NAME:=imspector +PKG_VERSION:=0.9 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.imspector.org/downloads +PKG_MD5SUM:=626abf7c2b8f15d56df679ad66624575 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/imspector + SECTION:=net + CATEGORY:=Network + SUBMENU:=Instant Messaging + TITLE:=IMSpector is an Instant Messenger proxy + URL:=http://www.imspector.org + DEPENDS:=+libopenssl +libstdcpp +libmysqlclient +libsqlite3 +libpq \ + +libpthread $(ICONV_DEPENDS) +endef + +define Package/imspector/description + IMSpector is an Instant Messenger proxy with monitoring and blocking, + and content-filtering capabilities. +endef + +define Package/imspector/conffiles +/etc/config/imspector +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); \ + sed -ie 's/#ADD_PLUGINS/ADD_PLUGINS/' Makefile \ + ); +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + $(TARGET_CONFIGURE_OPTS) \ + SSL_DIR="$(STAGING_DIR)/usr" \ + SSL_LIBS="$(TARGET_LDFLAGS) -lssl -lcrypto" \ + SSL_FLAGS="$(TARGET_CPPFLAGS) -DHAVE_SSL" \ + SSL_OBJS=sslstate.o \ + PREFIX="$(STAGING_DIR)/usr" \ + CXX=$(TARGET_CXX) \ + CXXFLAGS="$(TARGET_CXXFLAGS) $(TARGET_CFLAGS) $(FPIC) $(TARGET_CPPFLAGS) \ + -I$(ICONV_PREFIX)/include \ + $(TARGET_LDFLAGS) -DHAVE_SSL" \ + all +endef + +define Build/Install + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install +endef + +define Package/imspector/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/imspector $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libimspector.so $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/$(PKG_NAME) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)/*.so $(1)/usr/lib/$(PKG_NAME)/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/imspector.config $(1)/etc/config/imspector + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/imspector.init $(1)/etc/init.d/imspector + $(INSTALL_DIR) $(1)/etc/$(PKG_NAME) + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/etc/$(PKG_NAME)/badwords.txt $(1)/etc/$(PKG_NAME)/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/etc/$(PKG_NAME)/acl.txt $(1)/etc/$(PKG_NAME)/ +endef + +$(eval $(call BuildPackage,imspector)) diff --git a/net/imspector/files/imspector.config b/net/imspector/files/imspector.config new file mode 100644 index 0000000..4eb687a --- /dev/null +++ b/net/imspector/files/imspector.config @@ -0,0 +1,112 @@ +config imspector + # Enable the proxy + option enable 1 + + # The listening ip address for redirected connections + option listenaddr 0.0.0.0 + + # The listening port for redirected connections + option port 16667 + + # The HTTP CONNECT proxy port + option http_port 18080 + + #Sets the PID filename. The PID file is created before optionally dropping privs. + option pidfilename /var/run/imspector.pid + + # This is the default location of protocol and logging plugins. + option plugin_dir /usr/lib/imspector/ + + # For dropping privs - you probably want to do this. + option user root + option group root + + # SSL support? + # Create SSL Certs with the following command + # openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 \ + # -keyout /etc/imspector/serverkey.pem \ + # -out /etc/imspector/servercert.pem + + #option ssl on + #option ssl_key "/etc/imspector/serverkey.pem" + + # Fixed cert? + #option ssl_cert "/etc/imspector/servercert.pem" + + # Or certs created on-the-fly and signed against a CA + #option ssl_ca_key "/etc/imspector/cakey.pem" + #option ssl_ca_cert "/etc/imspector/cacert.pem" + + # And finally a directory to store the created certs + #option ssl_cert_dir "/usr/lib/imspector" + + # Directory of CA certs for IM server cert validation + #option ssl_verify_dir "/usr/lib/ssl/certs" + + # Drop connection when the IM server has a bad cert + #option ssl_verify "block" + + # Prefix and postfix to all responses using all responder plugins + #option response_prefix "Message from IMSpector: -=" + #option response_postfix "=-" + + # SQLite DB filename for automated responses + #option responder_filename "/etc/imspector/sqlitedb_responder" + # Inform parties that chats are monitored every N days (default is never) + #option notice_days 7 + # Customised notice text + #option notice_response "Your activities are being logged" + # Inform of a blocked event, but upto a max of every N mins (default is never) + #option filtered_mins 15 + # Customised filtered text (message text or filename follows in response) + #option filtered_response "The message or action was blocked" + + # Will load enabled plugins in plugin_dir + option icq_protocol on + option irc_protocol on + option msn_protocol on + option yahoo_protocol on + option gg_protocol on + option jabber_protocol on + + # MSN via HTTP proxy needs https + option https_protocol on + + # Log typing events? + option log_typing_events off + + # Location where the file logging plugin will start from. + option file_logging_dir "/var/log/imspector" + + # MySQL logging plugin stuff + #option mysql_server "localhost" + #option mysql_database "imspector" + #option mysql_username "imspector" + #option mysql_password "password" + + # SQLite logging plugin stuff + #option sqlite_file "/etc/imspector/sqlitedb" + + # PostgreSQL logging plugin stuff + #option pgsql_connect "host=localhost dbname=imspector user=dbuser password=Password" + + # Bad words filtering + option badwords_filename "/etc/imspector/badwords.txt" + option badwords_replace_character "*" + option badwords_block_count 1 + + # ACL + option acl_filename "/etc/imspector/acl.txt" + + # SQLite-backed filter + #option db_filter_filename "/etc/imspector/sqlitedb_filter" + + # Block all filetransfers? + option block_files off + + # Block webcams? + option block_webcams off + + # Socket-API for filtering + #option censord off + diff --git a/net/imspector/files/imspector.init b/net/imspector/files/imspector.init new file mode 100644 index 0000000..99d4798 --- /dev/null +++ b/net/imspector/files/imspector.init @@ -0,0 +1,65 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=50 + +DAEMON=/usr/sbin/imspector +CFG_D=/var/etc +CFGFILE=$CFG_D/imspector.conf +LOG_D=/var/log/imspector + +start() { + [ -d $CFG_D ] || mkdir -p $CFG_D + [ -d $LOG_D ] || mkdir -p $LOG_D + + config_load imspector + config_foreach start_imspector imspector +} + +stop() { + start-stop-daemon -q -x "$DAEMON" -K + rm -f $CFGFILE +} + +restart() { + stop + sleep 2 + start +} + +start_imspector() { + config_get_bool enable "$1" enable + [ "$enable" -eq "1" ] || return 0 + + echo '### AUTOGENERATED CONFIGURATION' > $CFGFILE + echo '### DO NOT EDIT' >> $CFGFILE + echo '### SEE /etc/config/imspector INSTEAD' >> $CFGFILE + echo '' >> $CFGFILE + + imspector_options='listenaddr port http_port pidfilename plugin_dir + user group ssl ssl_key ssl_cert ssl_ca_key ssl_ca_cert + ssl_cert_dir ssl_verify_dir ssl_verify response_prefix + response_postfix responder_filename notice_days notice_response + filtered_mins filtered_response icq_protocol irc_protocol + msn_protocol yahoo_protocol gg_protocol jabber_protocol + https_protocol log_typing_events file_logging_dir mysql_server + mysql_database mysql_username mysql_password sqlite_file + pgsql_connect badwords_filename badwords_replace_character + badwords_block_count acl_filename db_filter_filename + block_files block_webcams censord' + + for option in $imspector_options; do + imspector_atom "$1" "$option" '"' >> $CFGFILE + done + + start-stop-daemon -S -q -x "$DAEMON" -- -c "$CFGFILE" +} + +imspector_atom() { + local SECTION=$1 + local OPTION=$2 + + config_get _value "$SECTION" "$OPTION" + [ -n "$_value" -o "$EMPTY_DISABLED" -eq "1" ] && { + echo "$OPTION=${_value}" + } +} diff --git a/net/imspector/patches/010-openssl-1.0.0-compat.patch b/net/imspector/patches/010-openssl-1.0.0-compat.patch new file mode 100644 index 0000000..d8002a1 --- /dev/null +++ b/net/imspector/patches/010-openssl-1.0.0-compat.patch @@ -0,0 +1,14 @@ +--- a/sslstate.h ++++ b/sslstate.h +@@ -29,7 +29,11 @@ class SSLState + int sslverify; + + bool localdebugmode; ++#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++ const SSL_METHOD *method; ++#else + SSL_METHOD *method; ++#endif + SSL_CTX *connectctx; + SSL_CTX *ctx; + diff --git a/net/iodine/Makefile b/net/iodine/Makefile new file mode 100644 index 0000000..05e4743 --- /dev/null +++ b/net/iodine/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=iodine +PKG_VERSION:=0.6.0-rc1 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://code.kryo.se/iodine/ +PKG_MD5SUM:=a15bb4faba020d217016fde6e231074a + +include $(INCLUDE_DIR)/package.mk + +define Package/iodine/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Firewall Tunnel + DEPENDS:= +kmod-tun +zlib + TITLE:=IP over DNS tunneling + URL:=http://code.kryo.se/iodine/ +endef + +define Package/iodine + $(call Package/iodine/Default) + TITLE+= client version +endef + +define Package/iodine/description + iodine client version +endef + +define Package/iodined + $(call Package/iodine/Default) + TITLE+= server version +endef + +define Package/iodined/description + iodine server version +endef + +define Build/Configure +endef + +define Package/iodine/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/iodine $(1)/usr/sbin +endef + +define Package/iodined/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/iodined.init $(1)/etc/init.d/iodined + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/iodined.config $(1)/etc/config/iodined + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/iodined $(1)/usr/sbin +endef + +$(eval $(call BuildPackage,iodine)) +$(eval $(call BuildPackage,iodined)) diff --git a/net/iodine/files/iodined.config b/net/iodine/files/iodined.config new file mode 100644 index 0000000..f95549d --- /dev/null +++ b/net/iodine/files/iodined.config @@ -0,0 +1,5 @@ +config iodined + option address '' + option password '' + option tunnelip '10.0.0.1' + option tld '' diff --git a/net/iodine/files/iodined.init b/net/iodine/files/iodined.init new file mode 100644 index 0000000..1eac807 --- /dev/null +++ b/net/iodine/files/iodined.init @@ -0,0 +1,22 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start_service () { + local section="$1" + config_get address "$section" address + config_get password "$section" password + config_get tunnelip "$section" tunnelip + config_get tld "$section" tld + + iodined -l $address -P $password $tunnelip $tld +} + +start() { + config_load "iodined" + config_foreach start_service iodined +} + +stop() { + killall iodined +} diff --git a/net/iodine/patches/010-cross-compile.patch b/net/iodine/patches/010-cross-compile.patch new file mode 100644 index 0000000..5ee860a --- /dev/null +++ b/net/iodine/patches/010-cross-compile.patch @@ -0,0 +1,22 @@ +--- a/src/osflags ++++ b/src/osflags +@@ -16,9 +16,6 @@ link) + windows32) + echo '-lws2_32 -liphlpapi'; + ;; +- Linux) +- [ -e /usr/include/selinux/selinux.h ] && echo '-lselinux'; +- ;; + esac + ;; + cflags) +@@ -26,9 +23,6 @@ cflags) + BeOS) + echo '-Dsocklen_t=int'; + ;; +- Linux) +- [ -e /usr/include/selinux/selinux.h ] && echo '-DHAVE_SETCON'; +- ;; + esac + ;; + *) diff --git a/net/ipcad/Makefile b/net/ipcad/Makefile new file mode 100644 index 0000000..1d541f9 --- /dev/null +++ b/net/ipcad/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ipcad +PKG_VERSION:=3.7.3 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/ipcad +PKG_MD5SUM:=125605249958894148ec26d3c88189f5 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ipcad + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap $(LIBRPC_DEPENDS) + TITLE:=listens for traffic on the specified interfaces + URL:=http://lionet.info/ipcad/ +endef + +define Package/ipcad/description + This daemon listens for traffic on the specified interfaces. + It has the built-in RSH and NetFlow engines to allow exporting + the accounting data the same way as Cisco routers do. +endef + +define Package/ipcad/conffiles/ +/etc/ipcad.conf +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --disable-static \ + --with-psrc=pcap \ + --with-pcap-include="$(STAGING_DIR)/usr/include" \ + --with-pcap-libraries="$(STAGING_DIR)/usr/lib" \ + +# XXX: don't detect/use netfilter QUEUE/ULOG captures +CONFIGURE_VARS += \ + ac_cv_func_getifaddrs=no \ + ac_cv_header_ifaddrs_h=no \ + ac_cv_header_linux_netfilter_ipv4_ip_queue_h=no \ + ac_cv_header_linux_netfilter_ipv4_ipt_ULOG_h=no \ + +TARGET_LDFLAGS += $(LIBRPC) + +define Package/ipcad/install + $(INSTALL_DIR) $(1)/etc + $(CP) $(PKG_INSTALL_DIR)/etc/ipcad.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ipcad $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,ipcad)) diff --git a/net/ipcad/patches/001-honor_cppflags.patch b/net/ipcad/patches/001-honor_cppflags.patch new file mode 100644 index 0000000..41d532d --- /dev/null +++ b/net/ipcad/patches/001-honor_cppflags.patch @@ -0,0 +1,10 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -9,6 +9,7 @@ + LDFLAGS+= @LDFLAGS@ + LIBS+= @LIBS@ + CFLAGS+= @CFLAGS@ @DEFS@ -W -Wall ++CPPFLAGS+= @CPPFLAGS@ + CPPFLAGS+=-DIPCAD_VERSION=\"@IPCAD_VERSION@\" + CPPFLAGS+=-DCONFIG_FILE=\"${sysconfdir}/ipcad.conf\" + CPPFLAGS+=@DEFS@ -D_REENTRANT -D_THREAD_SAFE diff --git a/net/ipcad/patches/010-no-host-includes.patch b/net/ipcad/patches/010-no-host-includes.patch new file mode 100644 index 0000000..4cac2ce --- /dev/null +++ b/net/ipcad/patches/010-no-host-includes.patch @@ -0,0 +1,16 @@ +diff --git a/configure b/configure +index b2ef966..b675ca8 100755 +--- a/configure ++++ b/configure +@@ -2691,11 +2691,6 @@ fi + + fi + +-LDFLAGS="$LDFLAGS -L${ac_default_prefix}/lib" +-CFLAGS="$CFLAGS -I${ac_default_prefix}/include" +-CPPFLAGS="$CPPFLAGS -I${ac_default_prefix}/include" +- +- + for ac_func in pthread_detach + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` diff --git a/net/iperf/Makefile b/net/iperf/Makefile new file mode 100644 index 0000000..b1bd59f --- /dev/null +++ b/net/iperf/Makefile @@ -0,0 +1,85 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=iperf +PKG_VERSION:=2.0.5 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=44b5536b67719f4250faed632a3cd016 + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/iperf/Default + SECTION:=net + CATEGORY:=Network + DEPENDS:= +uclibcxx + TITLE:=Internet Protocol bandwidth measuring tool + URL:=http://sourceforge.net/projects/iperf/ +endef + +define Package/iperf/Default/description + Iperf is a modern alternative for measuring TCP and UDP bandwidth + performance, allowing the tuning of various parameters and + characteristics. +endef + +define Package/iperf +$(call Package/iperf/Default) + TITLE+= (with single thread support) + VARIANT:=single +endef + +define Package/iperf/description +$(call Package/iperf/Default/description) + This package is built with single thread support. +endef + +define Package/iperf-mt +$(call Package/iperf/Default) + DEPENDS+= +libpthread + TITLE+= (with multithread support) + VARIANT:=mt +endef + +define Package/iperf-mt/description +$(call Package/iperf/Default/description) + This package is built with multithread support. +endef + +CONFIGURE_ARGS += --disable-multicast +CONFIGURE_VARS += ac_cv_func_malloc_0_nonnull=yes + +ifeq ($(BUILD_VARIANT),single) + CONFIGURE_ARGS += --disable-threads +else + CONFIGURE_ARGS += --enable-threads=posix + CONFIGURE_VARS += ac_cv_func_pthread_cancel=no +endif + +TARGET_CXX=g++-uc + +CONFIGURE_VARS += CXXFLAGS="$$$$CXXFLAGS -fno-rtti" + +ifeq ($(BUILD_VARIANT),mt) + CONFIGURE_VARS += LIBS="-lpthread" +endif + +define Package/iperf/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iperf $(1)/usr/bin/iperf +endef +Package/iperf-mt/install = $(Package/iperf/install) + +$(eval $(call BuildPackage,iperf)) +$(eval $(call BuildPackage,iperf-mt)) diff --git a/net/iperf/patches/001-set-report-next-time-in-single-thread-mode.patch b/net/iperf/patches/001-set-report-next-time-in-single-thread-mode.patch new file mode 100644 index 0000000..c61c754 --- /dev/null +++ b/net/iperf/patches/001-set-report-next-time-in-single-thread-mode.patch @@ -0,0 +1,14 @@ +--- a/src/Reporter.c ++++ b/src/Reporter.c +@@ -308,6 +308,11 @@ ReportHeader* InitReport( thread_Setting + #else + // set start time + gettimeofday( &(reporthdr->report.startTime), NULL ); ++ ++ // set next time ++ reporthdr->report.nextTime = reporthdr->report.startTime; ++ TimeAdd( reporthdr->report.nextTime, reporthdr->report.intervalTime ); ++ + /* + * Process the report in this thread + */ diff --git a/net/ipkungfu/Makefile b/net/ipkungfu/Makefile new file mode 100644 index 0000000..867a732 --- /dev/null +++ b/net/ipkungfu/Makefile @@ -0,0 +1,80 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ipkungfu +PKG_VERSION:=0.6.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.linuxkungfu.org/ipkungfu +PKG_MD5SUM:=89f6bc0df356dd4ee650882c54ec9074 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ipkungfu + SECTION:=net + CATEGORY:=Network + TITLE:=IPKungFu is an iptables-based Linux firewall + URL:=http://www.linuxkungfu.org/ + SUBMENU:=Firewall + DEPENDS:=+bash +endef + +define Package/ipkungfu/description + IPKungFu is an iptables-based Linux firewall. + It aims to simplify the configuration of Internet + connection sharing, port forwarding, and packet filtering. +endef + +define Package/ipkungfu/conffiles +/etc/ipkungfu/accept_hosts.conf +/etc/ipkungfu/custom.conf +/etc/ipkungfu/forward.conf +/etc/ipkungfu/log.conf +/etc/ipkungfu/pre.conf +/etc/ipkungfu/services.conf +/etc/ipkungfu/advanced.conf +/etc/ipkungfu/deny_hosts.conf +/etc/ipkungfu/ipkungfu.conf +/etc/ipkungfu/post.conf +/etc/ipkungfu/redirect.conf +/etc/ipkungfu/vhosts.conf +endef + +define Package/ipkungfu/postrm +#!/bin/sh +rm -rf /etc/ipkungfu/cache +rmdir /etc/ipkungfu 2>/dev/null || true +endef + +# uses GNU configure +CONFIGURE_VARS+= \ + ac_cv_path_IPTABLES="/usr/sbin/iptables" \ + ac_cv_path_MD5SUM="/usr/bin/md5sum" \ + ac_cv_path_MODPROBE="/sbin/insmod" \ + ac_cv_path_RMMOD="/sbin/rmmode" \ + ac_cv_path_DEPMOD="/bin/true" \ + ac_cv_path_LSMOD="/sbin/lsmod" \ + ac_cv_path_CUT="/usr/bincut" \ + ac_cv_path_TR="/usr/bintr" \ + ac_cv_path_GREP="/bin/grep" \ + ac_cv_path_SED="/bin/sed" \ + ac_cv_path_AWK="/usr/bin/awk" \ + +define Package/ipkungfu/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dummy_server $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipkungfu $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/ipkungfu/ + $(CP) $(PKG_BUILD_DIR)/files/conf/* $(1)/etc/ipkungfu/ +endef + +$(eval $(call BuildPackage,ipkungfu)) diff --git a/net/ipkungfu/patches/001-replace-modprobe-with-insmod.patch b/net/ipkungfu/patches/001-replace-modprobe-with-insmod.patch new file mode 100644 index 0000000..477c258 --- /dev/null +++ b/net/ipkungfu/patches/001-replace-modprobe-with-insmod.patch @@ -0,0 +1,22 @@ +Index: ipkungfu-0.6.1/ipkungfu.in +=================================================================== +--- ipkungfu-0.6.1.orig/ipkungfu.in 2007-01-21 19:47:04.000000000 -0800 ++++ ipkungfu-0.6.1/ipkungfu.in 2008-08-03 11:41:13.000000000 -0700 +@@ -618,7 +618,7 @@ + # they're built in. + DEFAULT_MODULES_LIST="ip_nat_irc ip_conntrack_ftp ip_nat_ftp ip_conntrack_irc" + for default_module in $DEFAULT_MODULES_LIST; do +- if [ -f $($MODPROBE -la | grep ${default_module}) ]; then ++ if [ -f $(find /lib/modules/$(uname -r) -name "${default_module}*") ]; then + $MODPROBE ${default_module} 2>&1 | logError + fi + done +@@ -627,7 +627,7 @@ + MODULES_ARRAY=(${MODULES_LIST}) + + for module in ${MODULES_ARRAY[@]}; do +- if [ -e /lib/modules/`uname -r`/kernel/net/ipv4/netfilter/${module}* ]; then ++ if [ -e /lib/modules/`uname -r`/${module}* ]; then + if [ -z "`${LSMOD} | grep ${module}`" ] ; then + if [ $INIT != 1 ] ; then + echo -n -e "Loading ${BRIGHT_COLOUR}${module}${CLOSE_COLOUR} module..." diff --git a/net/ipsec-tools/Makefile b/net/ipsec-tools/Makefile new file mode 100644 index 0000000..caece38 --- /dev/null +++ b/net/ipsec-tools/Makefile @@ -0,0 +1,90 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=ipsec-tools +PKG_VERSION:=0.7.3 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/ipsec-tools +PKG_MD5SUM:=821bd84e8d4ad5a93bf594b8b3d66e1e + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ipsec-tools + SECTION:=net + CATEGORY:=Network + SUBMENU:=VPN + DEPENDS:=@!LINUX_2_4 +libopenssl +kmod-ipsec + TITLE:=IPsec management tools + URL:=http://ipsec-tools.sourceforge.net/ +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --with-kernel-headers="$(LINUX_DIR)/include" \ + --without-readline \ + --with-openssl="$(STAGING_DIR)/usr" \ + --without-libradius \ + --without-libpam \ + --enable-dpd \ + --enable-hybrid \ + --enable-security-context=no \ + --enable-natt \ + --enable-adminport \ + $(call autoconf_bool,CONFIG_IPV6,ipv6) + +# override CFLAGS holding "-Werror" that break builds on compile warnings +MAKE_FLAGS+=\ + CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" + +define Build/Prepare + $(call Build/Prepare/Default) + chmod -R u+w $(PKG_BUILD_DIR) +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); touch \ + configure.ac \ + aclocal.m4 \ + Makefile.in \ + config.h.in \ + configure \ + ); + $(call Build/Configure/Default) + echo "#undef HAVE_SHADOW_H" >> $(PKG_BUILD_DIR)/config.h +endef + +define Package/ipsec-tools/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(1)/etc/ + $(SED) 's|@sysconfdir_x@|/etc|g' $(1)/etc/racoon.conf + $(INSTALL_DIR) $(1)/etc/racoon + $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/racoon/samples/psk.txt $(1)/etc/racoon/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(1)/usr/sbin/ +endef + +define Package/ipsec-tools/conffiles +/etc/racoon.conf +/etc/racoon/psk.txt +endef + +$(eval $(call BuildPackage,ipsec-tools)) diff --git a/net/ipsec-tools/patches/001-no_libfl.patch b/net/ipsec-tools/patches/001-no_libfl.patch new file mode 100644 index 0000000..b56b596 --- /dev/null +++ b/net/ipsec-tools/patches/001-no_libfl.patch @@ -0,0 +1,22 @@ +--- a/src/racoon/cftoken.l ++++ b/src/racoon/cftoken.l +@@ -104,6 +104,8 @@ static struct include_stack { + static int incstackp = 0; + + static int yy_first_time = 1; ++ ++int yywrap(void) { return 1; } + %} + + /* common seciton */ +--- a/src/setkey/token.l ++++ b/src/setkey/token.l +@@ -86,6 +86,8 @@ + #if defined(SADB_X_EALG_AES) && ! defined(SADB_X_EALG_AESCBC) + #define SADB_X_EALG_AESCBC SADB_X_EALG_AES + #endif ++ ++int yywrap(void) { return 1; } + %} + + /* common section */ diff --git a/net/ipsec-tools/patches/003-linux_2.6.19_rtnetlink_changes.diff b/net/ipsec-tools/patches/003-linux_2.6.19_rtnetlink_changes.diff new file mode 100644 index 0000000..e94b11f --- /dev/null +++ b/net/ipsec-tools/patches/003-linux_2.6.19_rtnetlink_changes.diff @@ -0,0 +1,20 @@ +--- a/src/racoon/grabmyaddr.c ++++ b/src/racoon/grabmyaddr.c +@@ -80,10 +80,17 @@ + #ifdef __linux__ + #include + #include ++#include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) ++# include ++#endif + #ifndef HAVE_GETIFADDRS + #define HAVE_GETIFADDRS + #define NEED_LINUX_GETIFADDRS + #endif ++#ifndef IFA_RTA ++# define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) ++#endif + #endif + + #ifndef HAVE_GETIFADDRS diff --git a/net/ipsec-tools/patches/004-opennhrp.patch b/net/ipsec-tools/patches/004-opennhrp.patch new file mode 100644 index 0000000..aa76f9f --- /dev/null +++ b/net/ipsec-tools/patches/004-opennhrp.patch @@ -0,0 +1,1659 @@ +Index: ipsec-tools-0.7.3/src/racoon/admin.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/admin.c 2009-04-20 15:32:57.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/admin.c 2010-03-28 17:07:57.000000000 +0200 +@@ -76,6 +76,7 @@ + #include "evt.h" + #include "pfkey.h" + #include "ipsec_doi.h" ++#include "policy.h" + #include "admin.h" + #include "admin_var.h" + #include "isakmp_inf.h" +@@ -147,16 +148,18 @@ + goto end; + } + +- if (com.ac_cmd == ADMIN_RELOAD_CONF) { +- /* reload does not work at all! */ +- signal_handler(SIGHUP); +- goto end; +- } ++ plog(LLV_DEBUG, LOCATION, NULL, ++ "[%d] admin connection established\n", so2); + + error = admin_process(so2, combuf); + +- end: +- (void)close(so2); ++end: ++ if (error != -2) { ++ plog(LLV_DEBUG, LOCATION, NULL, ++ "[%d] admin connection closed\n", so2); ++ (void)close(so2); ++ } ++ + if (combuf) + racoon_free(combuf); + +@@ -177,6 +180,8 @@ + vchar_t *key = NULL; + int idtype = 0; + int error = -1; ++ int send_events = 0; ++ struct evt_listener_list *event_list = NULL; + + com->ac_errno = 0; + +@@ -208,9 +213,7 @@ + } + + case ADMIN_SHOW_EVT: +- /* It's not really an error, don't force racoonctl to quit */ +- if ((buf = evt_dump()) == NULL) +- com->ac_errno = 0; ++ send_events = 1; + break; + + case ADMIN_SHOW_SA: +@@ -393,17 +396,17 @@ + /* FALLTHROUGH */ + case ADMIN_ESTABLISH_SA: + { ++ struct admin_com_indexes *ndx; + struct sockaddr *dst; + struct sockaddr *src; +- src = (struct sockaddr *) +- &((struct admin_com_indexes *) +- ((caddr_t)com + sizeof(*com)))->src; +- dst = (struct sockaddr *) +- &((struct admin_com_indexes *) +- ((caddr_t)com + sizeof(*com)))->dst; ++ ++ ndx = (struct admin_com_indexes *) ((caddr_t)com + sizeof(*com)); ++ src = (struct sockaddr *) &ndx->src; ++ dst = (struct sockaddr *) &ndx->dst; + + switch (com->ac_proto) { + case ADMIN_PROTO_ISAKMP: { ++ struct ph1handle *ph1; + struct remoteconf *rmconf; + struct sockaddr *remote = NULL; + struct sockaddr *local = NULL; +@@ -411,6 +414,17 @@ + + com->ac_errno = -1; + ++ /* connected already? */ ++ ph1 = getph1byaddrwop(src, dst); ++ if (ph1 != NULL) { ++ event_list = &ph1->evt_listeners; ++ if (ph1->status == PHASE1ST_ESTABLISHED) ++ com->ac_errno = EEXIST; ++ else ++ com->ac_errno = 0; ++ break; ++ } ++ + /* search appropreate configuration */ + rmconf = getrmconf(dst); + if (rmconf == NULL) { +@@ -461,9 +475,11 @@ + "%s\n", saddrwop2str(remote)); + + /* begin ident mode */ +- if (isakmp_ph1begin_i(rmconf, remote, local) < 0) ++ ph1 = isakmp_ph1begin_i(rmconf, remote, local); ++ if (ph1 == NULL) + goto out1; + ++ event_list = &ph1->evt_listeners; + com->ac_errno = 0; + out1: + if (local != NULL) +@@ -473,8 +489,105 @@ + break; + } + case ADMIN_PROTO_AH: +- case ADMIN_PROTO_ESP: ++ case ADMIN_PROTO_ESP: { ++ struct ph2handle *iph2; ++ struct secpolicy *sp_out = NULL, *sp_in = NULL; ++ struct policyindex spidx; ++ ++ com->ac_errno = -1; ++ ++ /* got outbound policy */ ++ memset(&spidx, 0, sizeof(spidx)); ++ spidx.dir = IPSEC_DIR_OUTBOUND; ++ memcpy(&spidx.src, src, sizeof(spidx.src)); ++ memcpy(&spidx.dst, dst, sizeof(spidx.dst)); ++ spidx.prefs = ndx->prefs; ++ spidx.prefd = ndx->prefd; ++ spidx.ul_proto = ndx->ul_proto; ++ ++ sp_out = getsp_r(&spidx); ++ if (sp_out) { ++ plog(LLV_DEBUG, LOCATION, NULL, ++ "suitable outbound SP found: %s.\n", ++ spidx2str(&sp_out->spidx)); ++ } else { ++ com->ac_errno = ENOENT; ++ plog(LLV_NOTIFY, LOCATION, NULL, ++ "no outbound policy found: %s\n", ++ spidx2str(&spidx)); ++ break; ++ } ++ ++ iph2 = getph2byid(src, dst, sp_out->id); ++ if (iph2 != NULL) { ++ event_list = &iph2->evt_listeners; ++ if (iph2->status == PHASE2ST_ESTABLISHED) ++ com->ac_errno = EEXIST; ++ else ++ com->ac_errno = 0; ++ break; ++ } ++ ++ /* get inbound policy */ ++ memset(&spidx, 0, sizeof(spidx)); ++ spidx.dir = IPSEC_DIR_INBOUND; ++ memcpy(&spidx.src, dst, sizeof(spidx.src)); ++ memcpy(&spidx.dst, src, sizeof(spidx.dst)); ++ spidx.prefs = ndx->prefd; ++ spidx.prefd = ndx->prefs; ++ spidx.ul_proto = ndx->ul_proto; ++ ++ sp_in = getsp_r(&spidx); ++ if (sp_in) { ++ plog(LLV_DEBUG, LOCATION, NULL, ++ "suitable inbound SP found: %s.\n", ++ spidx2str(&sp_in->spidx)); ++ } else { ++ com->ac_errno = ENOENT; ++ plog(LLV_NOTIFY, LOCATION, NULL, ++ "no inbound policy found: %s\n", ++ spidx2str(&spidx)); ++ break; ++ } ++ ++ /* allocate a phase 2 */ ++ iph2 = newph2(); ++ if (iph2 == NULL) { ++ plog(LLV_ERROR, LOCATION, NULL, ++ "failed to allocate phase2 entry.\n"); ++ break; ++ } ++ iph2->side = INITIATOR; ++ iph2->satype = admin2pfkey_proto(com->ac_proto); ++ iph2->spid = sp_out->id; ++ iph2->seq = pk_getseq(); ++ iph2->status = PHASE2ST_STATUS2; ++ ++ /* set end addresses of SA */ ++ iph2->dst = dupsaddr(dst); ++ iph2->src = dupsaddr(src); ++ if (iph2->dst == NULL || iph2->src == NULL) { ++ delph2(iph2); ++ break; ++ } ++ ++ if (isakmp_get_sainfo(iph2, sp_out, sp_in) < 0) { ++ delph2(iph2); ++ break; ++ } ++ ++ insph2(iph2); ++ if (isakmp_post_acquire(iph2) < 0) { ++ unbindph12(iph2); ++ remph2(iph2); ++ delph2(iph2); ++ break; ++ } ++ ++ event_list = &iph2->evt_listeners; ++ com->ac_errno = 0; + break; ++ } + default: + /* ignore */ + com->ac_errno = -1; +@@ -491,7 +604,8 @@ + if ((error = admin_reply(so2, com, buf)) != 0) + goto out; + +- error = 0; ++ if (send_events || event_list != NULL) ++ error = evt_subscribe(event_list, so2); + out: + if (buf != NULL) + vfree(buf); +Index: ipsec-tools-0.7.3/src/racoon/evt.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/evt.c 2006-09-09 18:22:09.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/evt.c 2010-03-28 17:07:57.000000000 +0200 +@@ -46,113 +46,219 @@ + #include "plog.h" + #include "misc.h" + #include "admin.h" ++#include "handler.h" + #include "gcmalloc.h" + #include "evt.h" + + #ifdef ENABLE_ADMINPORT +-struct evtlist evtlist = TAILQ_HEAD_INITIALIZER(evtlist); +-int evtlist_len = 0; ++static EVT_LISTENER_LIST(evt_listeners); ++static EVT_LISTENER_LIST(evt_fds); + +-void +-evt_push(src, dst, type, optdata) +- struct sockaddr *src; +- struct sockaddr *dst; ++struct evtdump { ++ struct admin_com adm; ++ struct evt_common evt; ++}; ++ ++static struct evtdump * ++evtdump_create(type, optdata) + int type; + vchar_t *optdata; + { +- struct evtdump *evtdump; +- struct evt *evt; ++ struct evtdump *e; + size_t len; + +- /* If admin socket is disabled, silently discard anything */ +- if (adminsock_path == NULL) ++ len = sizeof(struct admin_com) + sizeof(struct evt_common); ++ if (optdata != NULL) ++ len += optdata->l; ++ ++ if ((e = racoon_malloc(len)) == NULL) { ++ plog(LLV_ERROR, LOCATION, NULL, "Cannot allocate event: %s\n", ++ strerror(errno)); ++ return NULL; ++ } ++ ++ memset(e, 0, sizeof(struct evtdump)); ++ e->adm.ac_len = len; ++ e->adm.ac_cmd = ADMIN_SHOW_EVT; ++ e->adm.ac_errno = 0; ++ e->adm.ac_proto = 0; ++ e->evt.ec_type = type; ++ time(&e->evt.ec_timestamp); ++ if (optdata != NULL) ++ memcpy(e + 1, optdata->v, optdata->l); ++ ++ return e; ++} ++ ++static void ++evt_unsubscribe(l) ++ struct evt_listener *l; ++{ ++ plog(LLV_DEBUG, LOCATION, NULL, ++ "[%d] admin connection released\n", l->fd); ++ ++ LIST_REMOVE(l, ll_chain); ++ LIST_REMOVE(l, fd_chain); ++ close(l->fd); ++ racoon_free(l); ++} ++ ++static void ++evtdump_broadcast(ll, e) ++ const struct evt_listener_list *ll; ++ struct evtdump *e; ++{ ++ struct evt_listener *l, *nl; ++ ++ for (l = LIST_FIRST(ll); l != NULL; l = nl) { ++ nl = LIST_NEXT(l, ll_chain); ++ ++ if (send(l->fd, e, e->adm.ac_len, ++ MSG_NOSIGNAL | MSG_DONTWAIT) < 0) { ++ plog(LLV_DEBUG, LOCATION, NULL, "Cannot send event to fd: %s\n", ++ strerror(errno)); ++ evt_unsubscribe(l); ++ } ++ ++ } ++ ++} ++ ++void ++evt_generic(type, optdata) ++ int type; ++ vchar_t *optdata; ++{ ++ struct evtdump *e; ++ ++ ++ if ((e = evtdump_create(type, optdata)) == NULL) + return; + +- /* If we are above the limit, don't record anything */ +- if (evtlist_len > EVTLIST_MAX) { +- plog(LLV_DEBUG, LOCATION, NULL, +- "Cannot record event: event queue overflowed\n"); ++ evtdump_broadcast(&evt_listeners, e); ++ ++ racoon_free(e); ++} ++ ++void ++evt_phase1(ph1, type, optdata) ++ const struct ph1handle *ph1; ++ int type; ++ vchar_t *optdata; ++{ ++ struct evtdump *e; ++ ++ if ((e = evtdump_create(type, optdata)) == NULL) ++ return; ++ ++ if (ph1->local) ++ memcpy(&e->evt.ec_ph1src, ph1->local, sysdep_sa_len(ph1->local)); ++ if (ph1->remote) ++ memcpy(&e->evt.ec_ph1dst, ph1->remote, sysdep_sa_len(ph1->remote)); ++ ++ evtdump_broadcast(&ph1->evt_listeners, e); ++ evtdump_broadcast(&evt_listeners, e); ++ ++ racoon_free(e); ++ } ++ ++void ++evt_phase2(ph2, type, optdata) ++ const struct ph2handle *ph2; ++ int type; ++ vchar_t *optdata; ++{ ++ struct evtdump *e; ++ struct ph1handle *ph1 = ph2->ph1; ++ ++ if ((e = evtdump_create(type, optdata)) == NULL) + return; ++ ++ if (ph1) { ++ if (ph1->local) ++ memcpy(&e->evt.ec_ph1src, ph1->local, sysdep_sa_len(ph1->local)); ++ if (ph1->remote) ++ memcpy(&e->evt.ec_ph1dst, ph1->remote, sysdep_sa_len(ph1->remote)); + } ++ e->evt.ec_ph2msgid = ph2->msgid; + +- /* If we hit the limit, record an overflow event instead */ +- if (evtlist_len == EVTLIST_MAX) { +- plog(LLV_ERROR, LOCATION, NULL, +- "Cannot record event: event queue overflow\n"); +- src = NULL; +- dst = NULL; +- type = EVTT_OVERFLOW; +- optdata = NULL; +- } +- +- len = sizeof(*evtdump); +- if (optdata) +- len += optdata->l; +- +- if ((evtdump = racoon_malloc(len)) == NULL) { +- plog(LLV_ERROR, LOCATION, NULL, "Cannot record event: %s\n", +- strerror(errno)); +- return; ++ evtdump_broadcast(&ph2->evt_listeners, e); ++ if (ph1) ++ evtdump_broadcast(&ph1->evt_listeners, e); ++ evtdump_broadcast(&evt_listeners, e); ++ ++ racoon_free(e); + } + +- if ((evt = racoon_malloc(sizeof(*evt))) == NULL) { +- plog(LLV_ERROR, LOCATION, NULL, "Cannot record event: %s\n", +- strerror(errno)); +- racoon_free(evtdump); +- return; ++int ++evt_subscribe(list, fd) ++ struct evt_listener_list *list; ++ int fd; ++{ ++ struct evt_listener *l; ++ ++ if ((l = racoon_malloc(sizeof(*l))) == NULL) { ++ plog(LLV_ERROR, LOCATION, NULL, ++ "Cannot allocate event listener: %s\n", ++ strerror(errno)); ++ return errno; + } + +- if (src) +- memcpy(&evtdump->src, src, sysdep_sa_len(src)); +- if (dst) +- memcpy(&evtdump->dst, dst, sysdep_sa_len(dst)); +- evtdump->len = len; +- evtdump->type = type; +- time(&evtdump->timestamp); ++ if (list == NULL) ++ list = &evt_listeners; + +- if (optdata) +- memcpy(evtdump + 1, optdata->v, optdata->l); ++ LIST_INSERT_HEAD(list, l, ll_chain); ++ LIST_INSERT_HEAD(&evt_fds, l, fd_chain); ++ l->fd = fd; + +- evt->dump = evtdump; +- TAILQ_INSERT_TAIL(&evtlist, evt, next); ++ plog(LLV_DEBUG, LOCATION, NULL, ++ "[%d] admin connection is polling events\n", fd); + +- evtlist_len++; ++ return -2; ++} + +- return; ++void ++evt_list_init(list) ++ struct evt_listener_list *list; ++{ ++ LIST_INIT(list); + } + +-struct evtdump * +-evt_pop(void) { +- struct evtdump *evtdump; +- struct evt *evt; + +- if ((evt = TAILQ_FIRST(&evtlist)) == NULL) +- return NULL; ++void ++evt_list_cleanup(list) ++ struct evt_listener_list *list; ++{ ++ while (!LIST_EMPTY(list)) ++ evt_unsubscribe(LIST_FIRST(list)); ++} + +- evtdump = evt->dump; +- TAILQ_REMOVE(&evtlist, evt, next); +- racoon_free(evt); +- evtlist_len--; +- +- return evtdump; +-} +- +-vchar_t * +-evt_dump(void) { +- struct evtdump *evtdump; +- vchar_t *buf = NULL; +- +- if ((evtdump = evt_pop()) != NULL) { +- if ((buf = vmalloc(evtdump->len)) == NULL) { +- plog(LLV_ERROR, LOCATION, NULL, +- "evt_dump failed: %s\n", strerror(errno)); +- return NULL; +- } +- memcpy(buf->v, evtdump, evtdump->len); +- racoon_free(evtdump); ++int ++evt_get_fdmask(nfds, fdset) ++ int nfds; ++ fd_set *fdset; ++{ ++ struct evt_listener *l; ++ LIST_FOREACH(l, &evt_fds, fd_chain) { ++ FD_SET(l->fd, fdset); ++ if (l->fd + 1 > nfds) ++ nfds = l->fd + 1; + } ++ return nfds; ++} + +- return buf; ++void ++evt_handle_fdmask(fdset) ++ fd_set *fdset; ++{ ++ struct evt_listener *l, *nl; ++ ++ for (l = LIST_FIRST(&evt_fds); l != NULL; l = nl) { ++ nl = LIST_NEXT(l, ll_chain); ++ ++ if (FD_ISSET(l->fd, fdset)) ++ evt_unsubscribe(l); ++ } + } + + #endif /* ENABLE_ADMINPORT */ +Index: ipsec-tools-0.7.3/src/racoon/evt.h +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/evt.h 2006-09-09 18:22:09.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/evt.h 2010-03-28 17:07:57.000000000 +0200 +@@ -34,12 +34,27 @@ + #ifndef _EVT_H + #define _EVT_H + +-struct evtdump { +- size_t len; +- struct sockaddr_storage src; +- struct sockaddr_storage dst; +- time_t timestamp; +- int type; ++#ifdef ENABLE_ADMINPORT ++ ++struct evt_listener { ++ LIST_ENTRY(evt_listener) ll_chain; ++ LIST_ENTRY(evt_listener) fd_chain; ++ int fd; ++}; ++LIST_HEAD(evt_listener_list, evt_listener); ++#define EVT_LISTENER_LIST(x) struct evt_listener_list x; ++ ++struct ph1handle; ++struct ph2handle; ++ ++struct evt_common { ++ uint32_t ec_type; ++ time_t ec_timestamp; ++ ++ struct sockaddr_storage ec_ph1src; ++ struct sockaddr_storage ec_ph1dst; ++ u_int32_t ec_ph2msgid; ++ + /* + * Optionnal list of struct isakmp_data + * for type EVTT_ISAKMP_CFG_DONE +@@ -47,42 +62,46 @@ + }; + + /* type */ +-#define EVTT_UNSEPC 0 +-#define EVTT_PHASE1_UP 1 +-#define EVTT_PHASE1_DOWN 2 +-#define EVTT_XAUTH_SUCCESS 3 +-#define EVTT_ISAKMP_CFG_DONE 4 +-#define EVTT_PHASE2_UP 5 +-#define EVTT_PHASE2_DOWN 6 +-#define EVTT_DPD_TIMEOUT 7 +-#define EVTT_PEER_NO_RESPONSE 8 +-#define EVTT_PEER_DELETE 9 +-#define EVTT_RACOON_QUIT 10 +-#define EVTT_XAUTH_FAILED 11 +-#define EVTT_OVERFLOW 12 /* Event queue overflowed */ +-#define EVTT_PEERPH1AUTH_FAILED 13 +-#define EVTT_PEERPH1_NOPROP 14 /* NO_PROPOSAL_CHOSEN & friends */ +-#define EVTT_NO_ISAKMP_CFG 15 /* no need to wait for mode_cfg */ +- +-struct evt { +- struct evtdump *dump; +- TAILQ_ENTRY(evt) next; +-}; +- +-TAILQ_HEAD(evtlist, evt); +- +-#define EVTLIST_MAX 32 ++#define EVTT_RACOON_QUIT 0x0001 ++#define EVTT_PHASE1_UP 0x0100 ++#define EVTT_PHASE1_DOWN 0x0101 ++#define EVTT_PHASE1_NO_RESPONSE 0x0102 ++#define EVTT_PHASE1_NO_PROPOSAL 0x0103 ++#define EVTT_PHASE1_AUTH_FAILED 0x0104 ++#define EVTT_PHASE1_DPD_TIMEOUT 0x0105 ++#define EVTT_PHASE1_PEER_DELETED 0x0106 ++#define EVTT_PHASE1_MODE_CFG 0x0107 ++#define EVTT_PHASE1_XAUTH_SUCCESS 0x0108 ++#define EVTT_PHASE1_XAUTH_FAILED 0x0109 ++ ++#define EVTT_PHASE2_NO_PHASE1 0x0200 ++#define EVTT_PHASE2_UP 0x0201 ++#define EVTT_PHASE2_DOWN 0x0202 ++#define EVTT_PHASE2_NO_RESPONSE 0x0203 ++ ++void evt_generic __P((int type, vchar_t *optdata)); ++void evt_phase1 __P((const struct ph1handle *ph1, int type, vchar_t *optdata)); ++void evt_phase2 __P((const struct ph2handle *ph2, int type, vchar_t *optdata)); ++ ++int evt_subscribe __P((struct evt_listener_list *list, int fd)); ++void evt_list_init __P((struct evt_listener_list *list)); ++void evt_list_cleanup __P((struct evt_listener_list *list)); ++int evt_get_fdmask __P((int nfds, fd_set *fdset)); ++void evt_handle_fdmask __P((fd_set *fdset)); ++ ++#else + +-#ifdef ENABLE_ADMINPORT +-struct evtdump *evt_pop(void); +-vchar_t *evt_dump(void); +-void evt_push(struct sockaddr *, struct sockaddr *, int, vchar_t *); +-#endif ++#define EVT_LISTENER_LIST(x) ++#define evt_generic(type, optdata) ; ++#define evt_phase1(ph1, type, optdata) ; ++#define evt_phase2(ph2, type, optdata) ; ++ ++#define evt_subscribe(eventlist, fd) ; ++#define evt_list_init(eventlist) ; ++#define evt_list_cleanup(eventlist) ; ++#define evt_get_fdmask(nfds, fdset) nfds ++#define evt_handle_fdmask(fdset) ; + +-#ifdef ENABLE_ADMINPORT +-#define EVT_PUSH(src, dst, type, optdata) evt_push(src, dst, type, optdata); +-#else +-#define EVT_PUSH(src, dst, type, optdata) ; +-#endif ++#endif /* ENABLE_ADMINPORT */ + + #endif /* _EVT_H */ +Index: ipsec-tools-0.7.3/src/racoon/handler.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/handler.c 2009-04-20 15:25:27.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/handler.c 2010-03-28 17:07:57.000000000 +0200 +@@ -289,8 +289,7 @@ + + /* SA down shell script hook */ + script_hook(iph1, SCRIPT_PHASE1_DOWN); +- +- EVT_PUSH(iph1->local, iph1->remote, EVTT_PHASE1_DOWN, NULL); ++ evt_list_cleanup(&iph1->evt_listeners); + + #ifdef ENABLE_NATT + if (iph1->natt_flags & NAT_KA_QUEUED) +Index: ipsec-tools-0.7.3/src/racoon/handler.h +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/handler.h 2008-01-11 15:12:01.000000000 +0100 ++++ ipsec-tools-0.7.3/src/racoon/handler.h 2010-03-28 17:07:57.000000000 +0200 +@@ -41,6 +41,7 @@ + + #include "isakmp_var.h" + #include "oakley.h" ++#include "evt.h" + + /* Phase 1 handler */ + /* +@@ -211,7 +212,7 @@ + #ifdef ENABLE_HYBRID + struct isakmp_cfg_state *mode_cfg; /* ISAKMP mode config state */ + #endif +- ++ EVT_LISTENER_LIST(evt_listeners); + }; + + /* Phase 2 handler */ +@@ -320,6 +321,7 @@ + + LIST_ENTRY(ph2handle) chain; + LIST_ENTRY(ph2handle) ph1bind; /* chain to ph1handle */ ++ EVT_LISTENER_LIST(evt_listeners); + }; + + /* +Index: ipsec-tools-0.7.3/src/racoon/isakmp_agg.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/isakmp_agg.c 2006-09-30 23:49:37.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/isakmp_agg.c 2010-03-28 17:07:57.000000000 +0200 +@@ -587,8 +587,7 @@ + /* message printed inner oakley_validate_auth() */ + goto end; + } +- EVT_PUSH(iph1->local, iph1->remote, +- EVTT_PEERPH1AUTH_FAILED, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_AUTH_FAILED, NULL); + isakmp_info_send_n1(iph1, ptype, NULL); + goto end; + } +@@ -1486,8 +1485,7 @@ + /* message printed inner oakley_validate_auth() */ + goto end; + } +- EVT_PUSH(iph1->local, iph1->remote, +- EVTT_PEERPH1AUTH_FAILED, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_AUTH_FAILED, NULL); + isakmp_info_send_n1(iph1, ptype, NULL); + goto end; + } +Index: ipsec-tools-0.7.3/src/racoon/isakmp_base.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/isakmp_base.c 2006-10-02 23:51:33.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/isakmp_base.c 2010-03-28 17:07:57.000000000 +0200 +@@ -716,8 +716,7 @@ + /* message printed inner oakley_validate_auth() */ + goto end; + } +- EVT_PUSH(iph1->local, iph1->remote, +- EVTT_PEERPH1AUTH_FAILED, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_AUTH_FAILED, NULL); + isakmp_info_send_n1(iph1, ptype, NULL); + goto end; + } +@@ -1242,8 +1241,7 @@ + /* message printed inner oakley_validate_auth() */ + goto end; + } +- EVT_PUSH(iph1->local, iph1->remote, +- EVTT_PEERPH1AUTH_FAILED, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_AUTH_FAILED, NULL); + isakmp_info_send_n1(iph1, ptype, NULL); + goto end; + } +Index: ipsec-tools-0.7.3/src/racoon/isakmp.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/isakmp.c 2008-09-25 11:34:39.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/isakmp.c 2010-03-28 17:10:11.000000000 +0200 +@@ -88,6 +88,9 @@ + #include "pfkey.h" + #include "crypto_openssl.h" + #include "policy.h" ++#include "algorithm.h" ++#include "proposal.h" ++#include "sainfo.h" + #include "isakmp_ident.h" + #include "isakmp_agg.h" + #include "isakmp_base.h" +@@ -1015,7 +1018,7 @@ + } + + /* new negotiation of phase 1 for initiator */ +-int ++struct ph1handle * + isakmp_ph1begin_i(rmconf, remote, local) + struct remoteconf *rmconf; + struct sockaddr *remote, *local; +@@ -1028,7 +1031,7 @@ + /* get new entry to isakmp status table. */ + iph1 = newph1(); + if (iph1 == NULL) +- return -1; ++ return NULL; + + iph1->status = PHASE1ST_START; + iph1->rmconf = rmconf; +@@ -1043,7 +1046,7 @@ + #ifdef ENABLE_HYBRID + if ((iph1->mode_cfg = isakmp_cfg_mkstate()) == NULL) { + delph1(iph1); +- return -1; ++ return NULL; + } + #endif + #ifdef ENABLE_FRAG +@@ -1059,7 +1062,7 @@ + /* XXX copy remote address */ + if (copy_ph1addresses(iph1, rmconf, remote, local) < 0) { + delph1(iph1); +- return -1; ++ return NULL; + } + + (void)insph1(iph1); +@@ -1095,7 +1098,7 @@ + remph1(iph1); + delph1(iph1); + +- return -1; ++ return NULL; + } + + #ifdef ENABLE_STATS +@@ -1106,7 +1109,7 @@ + timedelta(&start, &end)); + #endif + +- return 0; ++ return iph1; + } + + /* new negotiation of phase 1 for responder */ +@@ -1887,8 +1890,7 @@ + plog(LLV_ERROR, LOCATION, NULL, + "phase1 negotiation failed due to time up. %s\n", + isakmp_pindex(&iph1->index, iph1->msgid)); +- EVT_PUSH(iph1->local, iph1->remote, +- EVTT_PEER_NO_RESPONSE, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_NO_RESPONSE, NULL); + + return -1; + } +@@ -1897,8 +1899,7 @@ + plog(LLV_ERROR, LOCATION, NULL, + "phase1 negotiation failed due to send error. %s\n", + isakmp_pindex(&iph1->index, iph1->msgid)); +- EVT_PUSH(iph1->local, iph1->remote, +- EVTT_PEER_NO_RESPONSE, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_NO_RESPONSE, NULL); + return -1; + } + +@@ -1947,7 +1948,7 @@ + plog(LLV_ERROR, LOCATION, NULL, + "phase2 negotiation failed due to time up. %s\n", + isakmp_pindex(&iph2->ph1->index, iph2->msgid)); +- EVT_PUSH(iph2->src, iph2->dst, EVTT_PEER_NO_RESPONSE, NULL); ++ evt_phase2(iph2, EVTT_PHASE2_NO_RESPONSE, NULL); + unbindph12(iph2); + return -1; + } +@@ -1956,8 +1957,7 @@ + plog(LLV_ERROR, LOCATION, NULL, + "phase2 negotiation failed due to send error. %s\n", + isakmp_pindex(&iph2->ph1->index, iph2->msgid)); +- EVT_PUSH(iph2->src, iph2->dst, EVTT_PEER_NO_RESPONSE, NULL); +- ++ evt_phase2(iph2, EVTT_PHASE2_NO_RESPONSE, NULL); + return -1; + } + +@@ -2048,7 +2048,7 @@ + plog(LLV_INFO, LOCATION, NULL, + "ISAKMP-SA deleted %s-%s spi:%s\n", + src, dst, isakmp_pindex(&iph1->index, 0)); +- EVT_PUSH(iph1->local, iph1->remote, EVTT_PHASE1_DOWN, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_DOWN, NULL); + racoon_free(src); + racoon_free(dst); + +@@ -2195,7 +2195,7 @@ + saddrwop2str(iph2->dst)); + + /* start phase 1 negotiation as a initiator. */ +- if (isakmp_ph1begin_i(rmconf, iph2->dst, iph2->src) < 0) { ++ if (isakmp_ph1begin_i(rmconf, iph2->dst, iph2->src) == NULL) { + SCHED_KILL(sc); + return -1; + } +@@ -2228,6 +2228,71 @@ + return 0; + } + ++int ++isakmp_get_sainfo(iph2, sp_out, sp_in) ++ struct ph2handle *iph2; ++ struct secpolicy *sp_out, *sp_in; ++{ ++ int remoteid=0; ++ ++ plog(LLV_DEBUG, LOCATION, NULL, ++ "new acquire %s\n", spidx2str(&sp_out->spidx)); ++ ++ /* get sainfo */ ++ { ++ vchar_t *idsrc, *iddst; ++ ++ idsrc = ipsecdoi_sockaddr2id((struct sockaddr *)&sp_out->spidx.src, ++ sp_out->spidx.prefs, sp_out->spidx.ul_proto); ++ if (idsrc == NULL) { ++ plog(LLV_ERROR, LOCATION, NULL, ++ "failed to get ID for %s\n", ++ spidx2str(&sp_out->spidx)); ++ return -1; ++ } ++ iddst = ipsecdoi_sockaddr2id((struct sockaddr *)&sp_out->spidx.dst, ++ sp_out->spidx.prefd, sp_out->spidx.ul_proto); ++ if (iddst == NULL) { ++ plog(LLV_ERROR, LOCATION, NULL, ++ "failed to get ID for %s\n", ++ spidx2str(&sp_out->spidx)); ++ vfree(idsrc); ++ return -1; ++ } ++ { ++ struct remoteconf *conf; ++ conf = getrmconf(iph2->dst); ++ if (conf != NULL) ++ remoteid=conf->ph1id; ++ else{ ++ plog(LLV_DEBUG, LOCATION, NULL, "Warning: no valid rmconf !\n"); ++ remoteid=0; ++ } ++ } ++ iph2->sainfo = getsainfo(idsrc, iddst, NULL, remoteid); ++ vfree(idsrc); ++ vfree(iddst); ++ if (iph2->sainfo == NULL) { ++ plog(LLV_ERROR, LOCATION, NULL, ++ "failed to get sainfo.\n"); ++ return -1; ++ /* XXX should use the algorithm list from register message */ ++ } ++ ++ plog(LLV_DEBUG, LOCATION, NULL, ++ "selected sainfo: %s\n", sainfo2str(iph2->sainfo)); ++ } ++ ++ if (set_proposal_from_policy(iph2, sp_out, sp_in) < 0) { ++ plog(LLV_ERROR, LOCATION, NULL, ++ "failed to create saprop.\n"); ++ return -1; ++ } ++ ++ return 0; ++} ++ ++ + /* + * receive GETSPI from kernel. + */ +@@ -2931,9 +2996,9 @@ + src, dst, + isakmp_pindex(&iph1->index, 0)); + +- EVT_PUSH(iph1->local, iph1->remote, EVTT_PHASE1_UP, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_UP, NULL); + if(!iph1->rmconf->mode_cfg) +- EVT_PUSH(iph1->local, iph1->remote, EVTT_NO_ISAKMP_CFG, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_MODE_CFG, NULL); + + racoon_free(src); + racoon_free(dst); +Index: ipsec-tools-0.7.3/src/racoon/isakmp_cfg.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/isakmp_cfg.c 2008-11-27 16:25:20.000000000 +0100 ++++ ipsec-tools-0.7.3/src/racoon/isakmp_cfg.c 2010-03-28 17:07:57.000000000 +0200 +@@ -473,8 +473,7 @@ + "Cannot allocate memory: %s\n", strerror(errno)); + } else { + memcpy(buf->v, attrpl + 1, buf->l); +- EVT_PUSH(iph1->local, iph1->remote, +- EVTT_ISAKMP_CFG_DONE, buf); ++ evt_phase1(iph1, EVTT_PHASE1_MODE_CFG, buf); + vfree(buf); + } + } +Index: ipsec-tools-0.7.3/src/racoon/isakmp_ident.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/isakmp_ident.c 2006-10-02 23:41:59.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/isakmp_ident.c 2010-03-28 17:07:57.000000000 +0200 +@@ -788,8 +788,7 @@ + /* msg printed inner oakley_validate_auth() */ + goto end; + } +- EVT_PUSH(iph1->local, iph1->remote, +- EVTT_PEERPH1AUTH_FAILED, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_AUTH_FAILED, NULL); + isakmp_info_send_n1(iph1, type, NULL); + goto end; + } +@@ -1537,8 +1536,7 @@ + /* msg printed inner oakley_validate_auth() */ + goto end; + } +- EVT_PUSH(iph1->local, iph1->remote, +- EVTT_PEERPH1AUTH_FAILED, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_AUTH_FAILED, NULL); + isakmp_info_send_n1(iph1, type, NULL); + goto end; + } +Index: ipsec-tools-0.7.3/src/racoon/isakmp_inf.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/isakmp_inf.c 2009-05-18 19:07:46.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/isakmp_inf.c 2010-03-28 17:07:57.000000000 +0200 +@@ -510,8 +510,7 @@ + del_ph1=getph1byindex((isakmp_index *)(delete + 1)); + if(del_ph1 != NULL){ + +- EVT_PUSH(del_ph1->local, del_ph1->remote, +- EVTT_PEERPH1_NOPROP, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_PEER_DELETED, NULL); + if (del_ph1->scr) + SCHED_KILL(del_ph1->scr); + +@@ -532,8 +531,6 @@ + delete->spi_size, delete->proto_id); + return 0; + } +- EVT_PUSH(iph1->local, iph1->remote, +- EVTT_PEER_DELETE, NULL); + purge_ipsec_spi(iph1->remote, delete->proto_id, + (u_int32_t *)(delete + 1), num_spi); + break; +@@ -1630,7 +1627,7 @@ + "DPD: remote (ISAKMP-SA spi=%s) seems to be dead.\n", + isakmp_pindex(&iph1->index, 0)); + +- EVT_PUSH(iph1->local, iph1->remote, EVTT_DPD_TIMEOUT, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_DPD_TIMEOUT, NULL); + purge_remote(iph1); + + /* Do not reschedule here: phase1 is deleted, +Index: ipsec-tools-0.7.3/src/racoon/isakmp_var.h +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/isakmp_var.h 2007-02-20 10:08:49.000000000 +0100 ++++ ipsec-tools-0.7.3/src/racoon/isakmp_var.h 2010-03-28 17:07:57.000000000 +0200 +@@ -35,6 +35,7 @@ + #define _ISAKMP_VAR_H + + #include "vmbuf.h" ++#include "policy.h" + + #define PORT_ISAKMP 500 + #define PORT_ISAKMP_NATT 4500 +@@ -62,8 +63,8 @@ + struct isakmp_pl_nonce; /* XXX */ + + extern int isakmp_handler __P((int)); +-extern int isakmp_ph1begin_i __P((struct remoteconf *, struct sockaddr *, +- struct sockaddr *)); ++extern struct ph1handle *isakmp_ph1begin_i __P((struct remoteconf *, ++ struct sockaddr *, struct sockaddr *)); + + extern vchar_t *isakmp_parsewoh __P((int, struct isakmp_gen *, int)); + extern vchar_t *isakmp_parse __P((vchar_t *)); +@@ -87,6 +88,7 @@ + extern void isakmp_ph2delete_stub __P((void *)); + extern void isakmp_ph2delete __P((struct ph2handle *)); + ++extern int isakmp_get_sainfo __P((struct ph2handle *, struct secpolicy *, struct secpolicy *)); + extern int isakmp_post_acquire __P((struct ph2handle *)); + extern int isakmp_post_getspi __P((struct ph2handle *)); + extern void isakmp_chkph1there_stub __P((void *)); +Index: ipsec-tools-0.7.3/src/racoon/isakmp_xauth.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/isakmp_xauth.c 2009-04-20 15:35:36.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/isakmp_xauth.c 2010-03-28 17:07:57.000000000 +0200 +@@ -1568,13 +1568,11 @@ + plog(LLV_ERROR, LOCATION, NULL, + "Xauth authentication failed\n"); + +- EVT_PUSH(iph1->local, iph1->remote, +- EVTT_XAUTH_FAILED, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_XAUTH_FAILED, NULL); + + iph1->mode_cfg->flags |= ISAKMP_CFG_DELETE_PH1; + } else { +- EVT_PUSH(iph1->local, iph1->remote, +- EVTT_XAUTH_SUCCESS, NULL); ++ evt_phase1(iph1, EVTT_PHASE1_XAUTH_SUCCESS, NULL); + } + + +Index: ipsec-tools-0.7.3/src/racoon/pfkey.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/pfkey.c 2008-03-05 23:14:24.000000000 +0100 ++++ ipsec-tools-0.7.3/src/racoon/pfkey.c 2010-03-28 17:07:57.000000000 +0200 +@@ -92,6 +92,7 @@ + #include "algorithm.h" + #include "sainfo.h" + #include "admin.h" ++#include "evt.h" + #include "privsep.h" + #include "strnames.h" + #include "backupsa.h" +@@ -1266,6 +1267,7 @@ + + /* update status */ + iph2->status = PHASE2ST_ESTABLISHED; ++ evt_phase2(iph2, EVTT_PHASE2_UP, NULL); + + #ifdef ENABLE_STATS + gettimeofday(&iph2->end, NULL); +@@ -1636,7 +1638,6 @@ + struct ph2handle *iph2[MAXNESTEDSA]; + struct sockaddr *src, *dst; + int n; /* # of phase 2 handler */ +- int remoteid=0; + #ifdef HAVE_SECCTX + struct sadb_x_sec_ctx *m_sec_ctx; + #endif /* HAVE_SECCTX */ +@@ -1825,63 +1826,11 @@ + return -1; + } + +- plog(LLV_DEBUG, LOCATION, NULL, +- "new acquire %s\n", spidx2str(&sp_out->spidx)); +- +- /* get sainfo */ +- { +- vchar_t *idsrc, *iddst; +- +- idsrc = ipsecdoi_sockaddr2id((struct sockaddr *)&sp_out->spidx.src, +- sp_out->spidx.prefs, sp_out->spidx.ul_proto); +- if (idsrc == NULL) { +- plog(LLV_ERROR, LOCATION, NULL, +- "failed to get ID for %s\n", +- spidx2str(&sp_out->spidx)); +- delph2(iph2[n]); +- return -1; +- } +- iddst = ipsecdoi_sockaddr2id((struct sockaddr *)&sp_out->spidx.dst, +- sp_out->spidx.prefd, sp_out->spidx.ul_proto); +- if (iddst == NULL) { +- plog(LLV_ERROR, LOCATION, NULL, +- "failed to get ID for %s\n", +- spidx2str(&sp_out->spidx)); +- vfree(idsrc); +- delph2(iph2[n]); +- return -1; +- } +- { +- struct remoteconf *conf; +- conf = getrmconf(iph2[n]->dst); +- if (conf != NULL) +- remoteid=conf->ph1id; +- else{ +- plog(LLV_DEBUG, LOCATION, NULL, "Warning: no valid rmconf !\n"); +- remoteid=0; +- } +- } +- iph2[n]->sainfo = getsainfo(idsrc, iddst, NULL, remoteid); +- vfree(idsrc); +- vfree(iddst); +- if (iph2[n]->sainfo == NULL) { +- plog(LLV_ERROR, LOCATION, NULL, +- "failed to get sainfo.\n"); ++ if (isakmp_get_sainfo(iph2[n], sp_out, sp_in) < 0) { + delph2(iph2[n]); + return -1; +- /* XXX should use the algorithm list from register message */ + } + +- plog(LLV_DEBUG, LOCATION, NULL, +- "selected sainfo: %s\n", sainfo2str(iph2[n]->sainfo)); +- } +- +- if (set_proposal_from_policy(iph2[n], sp_out, sp_in) < 0) { +- plog(LLV_ERROR, LOCATION, NULL, +- "failed to create saprop.\n"); +- delph2(iph2[n]); +- return -1; +- } + #ifdef HAVE_SECCTX + if (m_sec_ctx) { + set_secctx_in_proposal(iph2[n], spidx); +Index: ipsec-tools-0.7.3/src/racoon/racoonctl.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/racoonctl.c 2009-04-20 15:32:57.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/racoonctl.c 2010-03-28 17:07:57.000000000 +0200 +@@ -135,26 +135,24 @@ + struct evtmsg { + int type; + char *msg; +- enum { UNSPEC, ERROR, INFO } level; + } evtmsg[] = { +- { EVTT_PHASE1_UP, "Phase 1 established", INFO }, +- { EVTT_PHASE1_DOWN, "Phase 1 deleted", INFO }, +- { EVTT_XAUTH_SUCCESS, "Xauth exchange passed", INFO }, +- { EVTT_ISAKMP_CFG_DONE, "ISAKMP mode config done", INFO }, +- { EVTT_PHASE2_UP, "Phase 2 established", INFO }, +- { EVTT_PHASE2_DOWN, "Phase 2 deleted", INFO }, +- { EVTT_DPD_TIMEOUT, "Peer not reachable anymore", ERROR }, +- { EVTT_PEER_NO_RESPONSE, "Peer not responding", ERROR }, +- { EVTT_PEER_DELETE, "Peer terminated security association", ERROR }, +- { EVTT_RACOON_QUIT, "Raccon terminated", ERROR }, +- { EVTT_OVERFLOW, "Event queue overflow", ERROR }, +- { EVTT_XAUTH_FAILED, "Xauth exchange failed", ERROR }, +- { EVTT_PEERPH1AUTH_FAILED, "Peer failed phase 1 authentication " +- "(certificate problem?)", ERROR }, +- { EVTT_PEERPH1_NOPROP, "Peer failed phase 1 initiation " +- "(proposal problem?)", ERROR }, +- { 0, NULL, UNSPEC }, +- { EVTT_NO_ISAKMP_CFG, "No need for ISAKMP mode config ", INFO }, ++ { EVTT_RACOON_QUIT, "Racoon terminated" }, ++ ++ { EVTT_PHASE1_UP, "Phase 1 established" }, ++ { EVTT_PHASE1_DOWN, "Phase 1 deleted" }, ++ { EVTT_PHASE1_NO_RESPONSE, "Phase 1 error: peer not responding" }, ++ { EVTT_PHASE1_NO_PROPOSAL, "Phase 1 error: no proposal chosen" }, ++ { EVTT_PHASE1_AUTH_FAILED, ++ "Phase 1 error: authentication failed (bad certificate?)" }, ++ { EVTT_PHASE1_DPD_TIMEOUT, "Phase 1 error: dead peer detected" }, ++ { EVTT_PHASE1_MODE_CFG, "Phase 1 mode configuration done" }, ++ { EVTT_PHASE1_XAUTH_SUCCESS, "Phase 1 Xauth succeeded" }, ++ { EVTT_PHASE1_XAUTH_FAILED, "Phase 1 Xauth failed" }, ++ ++ { EVTT_PHASE2_NO_PHASE1, "Phase 2 error: no suitable phase 1" }, ++ { EVTT_PHASE2_UP, "Phase 2 established" }, ++ { EVTT_PHASE2_DOWN, "Phase 2 deleted" }, ++ { EVTT_PHASE2_NO_RESPONSE, "Phase 2 error: no response" }, + }; + + static int get_proto __P((char *)); +@@ -184,6 +182,7 @@ + { IPPROTO_ICMP, "icmp" }, + { IPPROTO_TCP, "tcp" }, + { IPPROTO_UDP, "udp" }, ++ { IPPROTO_GRE, "gre" }, + { 0, NULL }, + }; + +@@ -193,31 +192,13 @@ + + char *pname; + int long_format = 0; +- +-#define EVTF_NONE 0x0000 /* Ignore any events */ +-#define EVTF_LOOP 0x0001 /* Loop awaiting for new events */ +-#define EVTF_CFG_STOP 0x0002 /* Stop after ISAKMP mode config */ +-#define EVTF_CFG 0x0004 /* Print ISAKMP mode config info */ +-#define EVTF_ALL 0x0008 /* Print any events */ +-#define EVTF_PURGE 0x0010 /* Print all available events */ +-#define EVTF_PH1DOWN_STOP 0x0020 /* Stop when phase 1 SA gets down */ +-#define EVTF_PH1DOWN 0x0040 /* Print that phase 1 SA got down */ +-#define EVTF_ERR 0x0080 /* Print any error */ +-#define EVTF_ERR_STOP 0x0100 /* Stop on any error */ +- +-int evt_filter = EVTF_NONE; +-time_t evt_start; ++int evt_quit_event = 0; + + void dump_isakmp_sa __P((char *, int)); + void dump_internal __P((char *, int)); + char *pindex_isakmp __P((isakmp_index *)); + void print_schedule __P((caddr_t, int)); +-void print_evt __P((caddr_t, int)); +-void print_cfg __P((caddr_t, int)); +-void print_err __P((caddr_t, int)); +-void print_ph1down __P((caddr_t, int)); +-void print_ph1up __P((caddr_t, int)); +-int evt_poll __P((void)); ++void print_evt __P((struct evt_common *)); + char * fixed_addr __P((char *, char *, int)); + + static void +@@ -226,13 +207,15 @@ + printf( + "Usage:\n" + " %s reload-config\n" ++" %s show-schedule\n" + " %s [-l [-l]] show-sa [protocol]\n" + " %s flush-sa [protocol]\n" + " %s delete-sa \n" +-" %s establish-sa [-u identity] \n" ++" %s establish-sa [-u identity] [-w] \n" + " %s vpn-connect [-u identity] vpn_gateway\n" + " %s vpn-disconnect vpn_gateway\n" +-"\n" ++" %s show-event\n" ++" %s logout-user login\n""\n" + " : \"isakmp\", \"esp\" or \"ah\".\n" + " In the case of \"show-sa\" or \"flush-sa\", you can use \"ipsec\".\n" + "\n" +@@ -240,8 +223,8 @@ + " : {\"esp\",\"ah\"} \n" + " \n" + " : \"inet\" or \"inet6\"\n" +-" : \"icmp\", \"tcp\", \"udp\" or \"any\"\n", +- pname, pname, pname, pname, pname, pname, pname); ++" : \"icmp\", \"tcp\", \"udp\", \"gre\" or \"any\"\n", ++ pname, pname, pname, pname, pname, pname, pname, pname, pname, pname); + } + + /* +@@ -312,53 +295,24 @@ + + vfree(combuf); + +- if (com_recv(&combuf) != 0) +- goto bad; +- if (handle_recv(combuf) != 0) +- goto bad; +- +- vfree(combuf); ++ do { ++ if (com_recv(&combuf) != 0) ++ goto bad; ++ if (handle_recv(combuf) != 0) ++ goto bad; ++ vfree(combuf); ++ } while (evt_quit_event != 0); + +- if (evt_filter != EVTF_NONE) +- if (evt_poll() != 0) +- goto bad; +- ++ close(so); + exit(0); + +- bad: ++bad: ++ close(so); ++ if (errno == EEXIST) ++ exit(0); + exit(1); + } + +-int +-evt_poll(void) { +- struct timeval tv; +- vchar_t *recvbuf; +- vchar_t *sendbuf; +- +- if ((sendbuf = f_getevt(0, NULL)) == NULL) +- errx(1, "Cannot make combuf"); +- +- +- while (evt_filter & (EVTF_LOOP|EVTF_PURGE)) { +- /* handle_recv closes the socket time, so open it each time */ +- com_init(); +- +- if (com_send(sendbuf) != 0) +- errx(1, "Cannot send combuf"); +- +- if (com_recv(&recvbuf) == 0) { +- handle_recv(recvbuf); +- vfree(recvbuf); +- } +- +- tv.tv_sec = 0; +- tv.tv_usec = 10; +- (void)select(0, NULL, NULL, NULL, &tv); +- } +- +- vfree(sendbuf); +- return 0; +-} + + /* %%% */ + /* +@@ -422,20 +376,8 @@ + vchar_t *buf; + struct admin_com *head; + +- /* +- * There are 3 ways of getting here +- * 1) racoonctl vc => evt_filter = (EVTF_LOOP|EVTF_CFG| ... ) +- * 2) racoonctl es => evt_filter = EVTF_NONE +- * 3) racoonctl es -l => evt_filter = EVTF_LOOP +- * Catch the second case: show-event is here to purge all +- */ +- if (evt_filter == EVTF_NONE) +- evt_filter = (EVTF_ALL|EVTF_PURGE); +- +- if ((ac >= 1) && (strcmp(av[0], "-l") == 0)) +- evt_filter |= EVTF_LOOP; +- +- if (ac >= 2) ++ evt_quit_event = -1; ++ if (ac >= 1) + errx(1, "too many arguments"); + + buf = vmalloc(sizeof(*head)); +@@ -653,6 +595,7 @@ + char *id = NULL; + char *key = NULL; + struct admin_com_psk *acp; ++ int wait = 0; + + if (ac < 1) + errx(1, "insufficient arguments"); +@@ -673,6 +616,12 @@ + ac -= 2; + } + ++ if (ac >= 1 && strcmp(av[0], "-w") == 0) { ++ wait = 1; ++ av++; ++ ac--; ++ } ++ + /* need protocol */ + if (ac < 1) + errx(1, "insufficient arguments"); +@@ -687,12 +636,16 @@ + index = get_index(ac, av); + if (index == NULL) + return NULL; ++ if (wait) ++ evt_quit_event = EVTT_PHASE1_MODE_CFG; + break; + case ADMIN_PROTO_AH: + case ADMIN_PROTO_ESP: + index = get_index(ac, av); + if (index == NULL) + return NULL; ++ if (wait) ++ evt_quit_event = EVTT_PHASE2_UP; + break; + default: + errno = EPROTONOSUPPORT; +@@ -749,8 +702,7 @@ + if (ac < 1) + errx(1, "insufficient arguments"); + +- evt_filter = (EVTF_LOOP|EVTF_CFG|EVTF_CFG_STOP|EVTF_ERR|EVTF_ERR_STOP); +- time(&evt_start); ++ evt_quit_event = EVTT_PHASE1_MODE_CFG; + + /* Optional -u identity */ + if (strcmp(av[0], "-u") == 0) { +@@ -814,8 +766,7 @@ + if (ac > 1) + warnx("Extra arguments"); + +- evt_filter = +- (EVTF_PH1DOWN|EVTF_PH1DOWN_STOP|EVTF_LOOP|EVTF_ERR|EVTF_ERR_STOP); ++ evt_quit_event = EVTT_PHASE1_DOWN; + + nav[nac++] = isakmp; + nav[nac++] = inet; +@@ -1337,84 +1288,32 @@ + + + void +-print_evt(buf, len) +- caddr_t buf; +- int len; ++print_evt(evtdump) ++ struct evt_common *evtdump; + { +- struct evtdump *evtdump = (struct evtdump *)buf; + int i; + char *srcstr; + char *dststr; + +- for (i = 0; evtmsg[i].msg; i++) +- if (evtmsg[i].type == evtdump->type) +- break; +- +- if (evtmsg[i].msg == NULL) +- printf("Event %d: ", evtdump->type); ++ for (i = 0; i < sizeof(evtmsg) / sizeof(evtmsg[0]); i++) ++ if (evtmsg[i].type == evtdump->ec_type) ++ break; ++ ++ if (evtmsg[i].msg == NULL) ++ printf("Event %d: ", evtdump->ec_type); + else + printf("%s : ", evtmsg[i].msg); + +- if ((srcstr = saddr2str((struct sockaddr *)&evtdump->src)) == NULL) ++ if ((srcstr = saddr2str((struct sockaddr *)&evtdump->ec_ph1src)) == NULL) + printf("unknown"); + else + printf("%s", srcstr); + printf(" -> "); +- if ((dststr = saddr2str((struct sockaddr *)&evtdump->dst)) == NULL) ++ if ((dststr = saddr2str((struct sockaddr *)&evtdump->ec_ph1dst)) == NULL) + printf("unknown"); + else + printf("%s", dststr); + printf("\n"); +- +- return; +-} +- +-void +-print_err(buf, len) +- caddr_t buf; +- int len; +-{ +- struct evtdump *evtdump = (struct evtdump *)buf; +- int i; +- +- +- for (i = 0; evtmsg[i].msg; i++) +- if (evtmsg[i].type == evtdump->type) +- break; +- +- if (evtmsg[i].level != ERROR) +- return; +- +- if (evtmsg[i].msg == NULL) +- printf("Error: Event %d\n", evtdump->type); +- else +- printf("Error: %s\n", evtmsg[i].msg); +- +- if (evt_filter & EVTF_ERR_STOP) +- evt_filter &= ~EVTF_LOOP; +- +- return; +-} +- +-/* +- * Print a message when phase 1 SA goes down +- */ +-void +-print_ph1down(buf, len) +- caddr_t buf; +- int len; +-{ +- struct evtdump *evtdump = (struct evtdump *)buf; +- +- if (evtdump->type != EVTT_PHASE1_DOWN) +- return; +- +- printf("VPN connexion terminated\n"); +- +- if (evt_filter & EVTF_PH1DOWN_STOP) +- evt_filter &= ~EVTF_LOOP; +- +- return; + } + + /* +@@ -1425,15 +1324,14 @@ + caddr_t buf; + int len; + { +- struct evtdump *evtdump = (struct evtdump *)buf; ++ struct evt_common *evtdump = (struct evt_common *)buf; + struct isakmp_data *attr; + char *banner = NULL; + struct in_addr addr4; + + memset(&addr4, 0, sizeof(addr4)); + +- if (evtdump->type != EVTT_ISAKMP_CFG_DONE && +- evtdump->type != EVTT_NO_ISAKMP_CFG) ++ if (evtdump->ec_type != EVTT_PHASE1_MODE_CFG) + return; + + len -= sizeof(*evtdump); +@@ -1487,7 +1385,7 @@ + } + } + +- if (evtdump->type == EVTT_ISAKMP_CFG_DONE) ++ if (len > 0) + printf("Bound to address %s\n", inet_ntoa(addr4)); + else + printf("VPN connexion established\n"); +@@ -1508,11 +1406,6 @@ + printf("\n"); + racoon_free(banner); + } +- +- if (evt_filter & EVTF_CFG_STOP) +- evt_filter &= ~EVTF_LOOP; +- +- return; + } + + +@@ -1563,32 +1456,28 @@ + break; + + case ADMIN_SHOW_EVT: { +- struct evtdump *evtdump; ++ struct evt_common *ec; + +- /* We got no event */ +- if (len == 0) { +- /* If we were purging the queue, it is now done */ +- if (evt_filter & EVTF_PURGE) +- evt_filter &= ~EVTF_PURGE; ++ /* We got no event? */ ++ if (len == 0) + break; +- } ++ if (len < sizeof(struct evt_common)) ++ errx(1, "Short buffer\n"); + +- if (len < sizeof(struct evtdump)) +- errx(1, "Short buffer\n"); +- +- /* Toss outdated events */ +- evtdump = (struct evtdump *)buf; +- if (evtdump->timestamp < evt_start) +- break; +- +- if (evt_filter & EVTF_ALL) +- print_evt(buf, len); +- if (evt_filter & EVTF_ERR) +- print_err(buf, len); +- if (evt_filter & EVTF_CFG) +- print_cfg(buf, len); +- if (evt_filter & EVTF_PH1DOWN) +- print_ph1down(buf, len); ++ ec = (struct evt_common *) buf; ++ if (evt_quit_event <= 0) ++ print_evt(ec); ++ else if (evt_quit_event == ec->ec_type) { ++ switch (ec->ec_type) { ++ case EVTT_PHASE1_MODE_CFG: ++ print_cfg(ec, len); ++ break; ++ default: ++ print_evt(ec); ++ break; ++ }; ++ evt_quit_event = 0; ++ } + break; + } + +@@ -1645,10 +1534,8 @@ + break; + } + +- close(so); + return 0; + +- bad: +- close(so); ++bad: + return -1; + } +Index: ipsec-tools-0.7.3/src/racoon/session.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/session.c 2007-08-01 13:52:22.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/session.c 2010-03-28 17:07:57.000000000 +0200 +@@ -192,6 +192,7 @@ + /* scheduling */ + timeout = schedular(); + ++ nfds = evt_get_fdmask(nfds, &rfds); + error = select(nfds, &rfds, (fd_set *)0, (fd_set *)0, timeout); + if (error < 0) { + switch (errno) { +@@ -211,6 +212,7 @@ + (FD_ISSET(lcconf->sock_admin, &rfds))) + admin_handler(); + #endif ++ evt_handle_fdmask(&rfds); + + for (p = lcconf->myaddrs; p; p = p->next) { + if (!p->addr) +@@ -451,7 +453,7 @@ + case SIGTERM: + plog(LLV_INFO, LOCATION, NULL, + "caught signal %d\n", sig); +- EVT_PUSH(NULL, NULL, EVTT_RACOON_QUIT, NULL); ++ evt_generic(EVTT_RACOON_QUIT, NULL); + pfkey_send_flush(lcconf->sock_pfkey, + SADB_SATYPE_UNSPEC); + #ifdef ENABLE_FASTQUIT diff --git a/net/iptables-snmp/Makefile b/net/iptables-snmp/Makefile new file mode 100644 index 0000000..4e3cd2b --- /dev/null +++ b/net/iptables-snmp/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=iptables-snmp +PKG_VERSION:=0.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.nobiscuit.com/iptables-snmp +PKG_MD5SUM:=8370d2f0c899461a053da491400119d1 + +include $(INCLUDE_DIR)/package.mk + +define Package/iptables-snmp + SECTION:=net + CATEGORY:=Network + DEPENDS:=+snmpd +libiptc + TITLE:=An snmpd plugin to access iptables rules + URL:=http://www.nobiscuit.com/iptables-snmp/ + SUBMENU:=Firewall +endef + +define Package/iptables-snmp/description + This is a plugin that makes iptables rules accessable from snmpd. +endef + +define Build/Compile + $(call Build/Compile/Default, \ + INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + all install \ + ) +endef + +define Package/iptables-snmp/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables-snmp.so $(1)/usr/lib +endef + +$(eval $(call BuildPackage,iptables-snmp)) diff --git a/net/iptables-snmp/patches/001-use_libiptc.patch b/net/iptables-snmp/patches/001-use_libiptc.patch new file mode 100644 index 0000000..a142237 --- /dev/null +++ b/net/iptables-snmp/patches/001-use_libiptc.patch @@ -0,0 +1,25 @@ +diff -urN iptables-snmp-0.1/Makefile.in iptables-snmp-0.1.new/Makefile.in +--- iptables-snmp-0.1/Makefile.in 2005-11-02 13:00:10.000000000 +0100 ++++ iptables-snmp-0.1.new/Makefile.in 2009-08-02 01:13:40.000000000 +0200 +@@ -67,7 +67,7 @@ + + all: iptables-snmp.so + +-iptables-snmp.so: $(OBJS) libiptc.a Makefile ++iptables-snmp.so: $(OBJS) Makefile + $(CC) $(CFLAGS) $(OTHER) $(DFLAGS) -shared -o $@ $(OBJS) $(LDFLAGS) + + libiptc.a: $(LIBIPTC_OBJS) Makefile +diff -urN iptables-snmp-0.1/iptables-snmp.c iptables-snmp-0.1.new/iptables-snmp.c +--- iptables-snmp-0.1/iptables-snmp.c 2005-11-02 12:10:54.000000000 +0100 ++++ iptables-snmp-0.1.new/iptables-snmp.c 2009-08-02 01:13:30.000000000 +0200 +@@ -37,6 +37,9 @@ + + #include "libiptc/libiptc.h" + ++/* For backward compatibility */ ++typedef struct iptc_handle *iptc_handle_t; ++ + static oid agent_version_oid[] = { + BASE_OID, 1, 0, AGENT_VERSION_INDEX + }; diff --git a/net/iptraf/Makefile b/net/iptraf/Makefile new file mode 100644 index 0000000..99439ef --- /dev/null +++ b/net/iptraf/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=iptraf +PKG_VERSION:=3.0.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://iptraf.seul.org/pub/iptraf/ \ + ftp://the.wiretapped.net/pub/security/network-monitoring/iptraf/ +PKG_MD5SUM:=004c2c005a1b78739e22bc49d33e244d + +include $(INCLUDE_DIR)/package.mk + +define Package/iptraf + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libncurses + TITLE:=A console-based network monitoring program + URL:=http://iptraf.seul.org/ +endef + +define Package/iptraf/description + IPTraf is a console-based network statistics utility for Linux. It gathers a + variety of figures such as TCP connection packet and byte counts, interface + statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN + station packet and byte counts. +endef + +define Package/iptraf/postinst +#!/bin/sh +if [ -z "$${IPKG_INSTROOT}" ]; then + mkdir -p $${IPKG_INSTROOT}/var/log/iptraf \ + $${IPKG_INSTROOT}/var/run/iptraf \ + $${IPKG_INSTROOT}/var/lib/iptraf +fi +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/src \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + DEBUG="" \ + INCLUDEDIR="-I../support $(TARGET_CPPFLAGS)" \ + LDOPTS="$(TARGET_LDFLAGS)" \ + PLATFORM="-DPLATFORM=\\\"Linux/$(ARCH)\\\"" \ + TARGET="/usr/bin" \ + WORKDIR="/var/lib/iptraf" \ + all +endef + +define Package/iptraf/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iptraf $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,iptraf)) diff --git a/net/iptraf/patches/001-cross_compile.patch b/net/iptraf/patches/001-cross_compile.patch new file mode 100644 index 0000000..3be7570 --- /dev/null +++ b/net/iptraf/patches/001-cross_compile.patch @@ -0,0 +1,23 @@ +--- a/support/Makefile ++++ b/support/Makefile +@@ -3,16 +3,14 @@ INCLUDEDIR = -I/usr/include/ncurses + OBJS = input.o menurt.o listbox.o winops.o labels.o \ + msgboxes.o txbox.o + +-all: libtextbox.a +- + libtextbox.a: $(OBJS) + rm -rf libtextbox.a +- ar cq libtextbox.a $(OBJS) +- ranlib libtextbox.a +-# gcc -shared -o libtextbox.so $(OBJS) ++ $(AR) cq libtextbox.a $(OBJS) ++ $(RANLIB) libtextbox.a ++# $(CC) -shared -o libtextbox.so $(OBJS) + + %.o: %.c *.h +- gcc -O2 -g -Wall -fPIC $(INCLUDEDIR) -c -o $*.o $< ++ $(CC) $(CFLAGS) -Wall -fPIC $(INCLUDEDIR) -c -o $*.o $< + + clean: + rm -rf *.o *~ libtextbox.a libtextbox.so diff --git a/net/iptraf/patches/002-ifaces.patch b/net/iptraf/patches/002-ifaces.patch new file mode 100644 index 0000000..e4b0b1c --- /dev/null +++ b/net/iptraf/patches/002-ifaces.patch @@ -0,0 +1,281 @@ +--- a/src/dirs.h ++++ b/src/dirs.h +@@ -155,7 +155,6 @@ + */ + + #define ETHFILE get_path(T_WORKDIR, "ethernet.desc") +-#define FDDIFILE get_path(T_WORKDIR, "fddi.desc") + + /* + * The rvnamed program file +--- a/src/hostmon.c ++++ b/src/hostmon.c +@@ -31,7 +31,6 @@ details. + #include + #include + #include +-#include + #include + #include + #include +@@ -294,8 +293,6 @@ void printethent(struct ethtab *table, s + wprintw(table->tabwin, "Ethernet"); + else if (entry->un.desc.linktype == LINK_PLIP) + wprintw(table->tabwin, "PLIP"); +- else if (entry->un.desc.linktype == LINK_FDDI) +- wprintw(table->tabwin, "FDDI"); + + wprintw(table->tabwin, " HW addr: %s", entry->un.desc.ascaddr); + +@@ -723,7 +720,7 @@ void hostmon(const struct OPTIONS *optio + unsigned long long updtime_usec = 0; + + struct desclist elist; /* Ethernet description list */ +- struct desclist flist; /* FDDI description list */ ++ struct desclist flist; /* Other links description list */ + struct desclist *list = NULL; + + FILE *logfile = NULL; +@@ -787,7 +784,6 @@ void hostmon(const struct OPTIONS *optio + + initethtab(&table, options->actmode); + loaddesclist(&elist, LINK_ETHERNET, WITHETCETHERS); +- loaddesclist(&flist, LINK_FDDI, WITHETCETHERS); + + if (logging) { + if (strcmp(current_logfile, "") == 0) { +@@ -901,9 +897,7 @@ void hostmon(const struct OPTIONS *optio + if (pkt_result != PACKET_OK) + continue; + +- if ((linktype == LINK_ETHERNET) || (linktype == LINK_FDDI) +- || (linktype == LINK_PLIP) || (linktype == LINK_TR) || +- (linktype == LINK_VLAN)) { ++ if ((linktype == LINK_ETHERNET) || (linktype == LINK_PLIP) || (linktype == LINK_TR) || (linktype == LINK_VLAN)) { + + if (fromaddr.sll_protocol == htons(ETH_P_IP)) + is_ip = 1; +@@ -921,12 +915,6 @@ void hostmon(const struct OPTIONS *optio + memcpy(scratch_daddr, ((struct ethhdr *) buf)->h_dest, + ETH_ALEN); + list = &elist; +- } else if (linktype == LINK_FDDI) { +- memcpy(scratch_saddr, ((struct fddihdr *) buf)->saddr, +- FDDI_K_ALEN); +- memcpy(scratch_daddr, ((struct fddihdr *) buf)->daddr, +- FDDI_K_ALEN); +- list = &flist; + } else if (linktype == LINK_TR) { + memcpy(scratch_saddr, ((struct trh_hdr *) buf)->saddr, + TR_ALEN); +--- a/src/ifaces.c ++++ b/src/ifaces.c +@@ -37,7 +37,7 @@ extern int accept_unsupported_interfaces + extern int daemonized; + + char ifaces[][6] = +- { "lo", "eth", "sl", "ppp", "ippp", "plip", "fddi", "isdn", "dvb", ++ { "lo", "eth", "sl", "ppp", "ippp", "plip", "isdn", "dvb", + "pvc", "hdlc", "ipsec", "sbni", "tr", "wvlan", "wlan", "sm2", "sm3", + "pent", "lec", "brg", "tun", "tap", "cipcb", "tunl", "vlan" + }; +--- a/src/landesc.c ++++ b/src/landesc.c +@@ -83,8 +83,6 @@ void loaddesclist(struct desclist *list, + + if (linktype == LINK_ETHERNET) + fd = fopen(ETHFILE, "r"); +- else if (linktype == LINK_FDDI) +- fd = fopen(FDDIFILE, "r"); + + if (fd == NULL) { + return; +@@ -205,8 +203,6 @@ void savedesclist(struct desclist *list, + + if (linktype == LINK_ETHERNET) + fd = fopen(ETHFILE, "w"); +- else if (linktype == LINK_FDDI) +- fd = fopen(FDDIFILE, "w"); + + if (fd < 0) { + etherr(); +--- a/src/links.h ++++ b/src/links.h +@@ -6,7 +6,6 @@ + #define LINK_ISDN_RAWIP 6 + #define LINK_ISDN_CISCOHDLC 7 + #define LINK_CISCOHDLC 7 +-#define LINK_FDDI 8 + #define LINK_FRAD 9 + #define LINK_DLCI 10 + #define LINK_TR 11 +--- a/src/log.c ++++ b/src/log.c +@@ -491,8 +491,6 @@ void writeethlog(struct ethtabent *list, + ptmp->un.desc.ascaddr); + else if (ptmp->un.desc.linktype == LINK_PLIP) + fprintf(fd, "\nPLIP address: %s", ptmp->un.desc.ascaddr); +- else if (ptmp->un.desc.linktype == LINK_FDDI) +- fprintf(fd, "\nFDDI address: %s", ptmp->un.desc.ascaddr); + + if (ptmp->un.desc.withdesc) + fprintf(fd, " (%s)", ptmp->un.desc.desc); +--- a/src/options.c ++++ b/src/options.c +@@ -68,8 +68,6 @@ void makeoptionmenu(struct MENU *menu) + tx_additem(menu, NULL, NULL); + tx_additem(menu, " ^E^thernet/PLIP host descriptions...", + "Manages descriptions for Ethernet and PLIP addresses"); +- tx_additem(menu, " ^F^DDI/Token Ring host descriptions...", +- "Manages descriptions for FDDI and FDDI addresses"); + tx_additem(menu, NULL, NULL); + tx_additem(menu, " E^x^it configuration", "Returns to main menu"); + } +@@ -371,9 +369,6 @@ void setoptions(struct OPTIONS *options, + case 14: + ethdescmgr(LINK_ETHERNET); + break; +- case 15: +- ethdescmgr(LINK_FDDI); +- break; + } + + indicatesetting(row, options, statwin); +--- a/src/othptab.c ++++ b/src/othptab.c +@@ -22,7 +22,6 @@ details. + #include + #include + #include +-#include + #include + #include "arphdr.h" + #include "options.h" +@@ -142,11 +141,6 @@ struct othptabent *add_othp_entry(struct + new_entry->smacaddr); + convmacaddr(((struct ethhdr *) packet)->h_dest, + new_entry->dmacaddr); +- } else if (linkproto == LINK_FDDI) { +- convmacaddr(((struct fddihdr *) packet)->saddr, +- new_entry->smacaddr); +- convmacaddr(((struct fddihdr *) packet)->daddr, +- new_entry->dmacaddr); + } else if (linkproto == LINK_TR) { + convmacaddr(((struct trh_hdr *) packet)->saddr, + new_entry->smacaddr); +@@ -376,8 +370,7 @@ void printothpentry(struct othptable *ta + strcat(msgstring, scratchpad); + + if ((entry->linkproto == LINK_ETHERNET) || +- (entry->linkproto == LINK_PLIP) || +- (entry->linkproto == LINK_FDDI)) { ++ (entry->linkproto == LINK_PLIP)) { + sprintf(scratchpad, " from %s to %s on %s", + entry->smacaddr, entry->dmacaddr, entry->iface); + +--- a/src/packet.c ++++ b/src/packet.c +@@ -35,7 +35,6 @@ details. + #include + #include + #include +-#include + #include + #include + #include +@@ -81,8 +80,6 @@ unsigned short getlinktype(unsigned shor + result = LINK_ETHERNET; + else if (strncmp(ifname, "plip", 4) == 0) + result = LINK_PLIP; +- else if (strncmp(ifname, "fddi", 4) == 0) /* For some Ethernet- */ +- result = LINK_ETHERNET; /* emulated FDDI ifaces */ + else if (strncmp(ifname, "dvb", 3) == 0) + result = LINK_ETHERNET; + else if (strncmp(ifname, "sbni", 4) == 0) +@@ -136,9 +133,6 @@ unsigned short getlinktype(unsigned shor + case ARPHRD_PPP: + result = LINK_PPP; + break; +- case ARPHRD_FDDI: +- result = LINK_FDDI; +- break; + case ARPHRD_IEEE802: + case ARPHRD_IEEE802_TR: + result = LINK_TR; +@@ -194,19 +188,6 @@ void adjustpacket(char *tpacket, unsigne + *packet = tpacket + 4; + *readlen -= 4; + break; +- case LINK_FDDI: +- *packet = tpacket + sizeof(struct fddihdr); +- *readlen -= sizeof(struct fddihdr); +- +- /* +- * Move IP data into an aligned buffer. 96 bytes should be sufficient +- * for IP and TCP headers with reasonable numbers of options and some +- * data. +- */ +- +- memmove(aligned_buf, *packet, min(SNAPSHOT_LEN, *readlen)); +- *packet = aligned_buf; +- break; + case LINK_TR: + /* + * Token Ring patch supplied by Tomas Dvorak +--- a/src/promisc.c ++++ b/src/promisc.c +@@ -81,8 +81,8 @@ void init_promisc_list(struct promisc_st + */ + + if ((strncmp(buf, "eth", 3) == 0) || +- (strncmp(buf, "fddi", 4) == 0) || + (strncmp(buf, "tr", 2) == 0) || ++ (strncmp(buf, "vlan", 4) == 0) || + (strncmp(ptmp->params.ifname, "wvlan", 4) == 0) || + (strncmp(ptmp->params.ifname, "lec", 3) == 0) || + (accept_unsupported_interfaces)) { +@@ -195,7 +195,7 @@ void srpromisc(int mode, struct promisc_ + + while (ptmp != NULL) { + if (((strncmp(ptmp->params.ifname, "eth", 3) == 0) || +- (strncmp(ptmp->params.ifname, "fddi", 4) == 0) || ++ (strncmp(ptmp->params.ifname, "vlan", 4) == 0) || + (strncmp(ptmp->params.ifname, "tr", 2) == 0) || + (strncmp(ptmp->params.ifname, "wvlan", 4) == 0) || + (strncmp(ptmp->params.ifname, "lec", 3) == 0)) && +--- a/src/rvnamed.h ++++ b/src/rvnamed.h +@@ -1,9 +1,9 @@ + #include + #include + +-#define CHILDSOCKNAME "/dev/rvndcldcomsk" +-#define PARENTSOCKNAME "/dev/rvndpntcomsk" +-#define IPTSOCKNAME "/dev/rvndiptcomsk" ++#define CHILDSOCKNAME "/tmp/rvndcldcomsk" ++#define PARENTSOCKNAME "/tmp/rvndpntcomsk" ++#define IPTSOCKNAME "/tmp/rvndiptcomsk" + + #define SOCKET_PREFIX "isock" + +--- a/src/tcptable.c ++++ b/src/tcptable.c +@@ -600,8 +600,6 @@ void updateentry(struct tcptable *table, + + if ((linkproto == LINK_ETHERNET) || (linkproto == LINK_PLIP)) { + convmacaddr(((struct ethhdr *) packet)->h_source, newmacaddr); +- } else if (linkproto == LINK_FDDI) { +- convmacaddr(((struct fddihdr *) packet)->saddr, newmacaddr); + } else if (linkproto == LINK_TR) { + convmacaddr(((struct trh_hdr *) packet)->saddr, newmacaddr); + } +--- a/src/tcptable.h ++++ b/src/tcptable.h +@@ -23,7 +23,6 @@ + #include + #include + #include +-#include + #include + // #include + #include diff --git a/net/iptraf/patches/003-exit_menu.patch b/net/iptraf/patches/003-exit_menu.patch new file mode 100644 index 0000000..6429a95 --- /dev/null +++ b/net/iptraf/patches/003-exit_menu.patch @@ -0,0 +1,11 @@ +--- a/src/options.c ++++ b/src/options.c +@@ -372,7 +372,7 @@ void setoptions(struct OPTIONS *options, + } + + indicatesetting(row, options, statwin); +- } while (row != 17); ++ } while (row != 16); + + tx_destroymenu(&menu); + del_panel(statpanel); diff --git a/net/iptraf/patches/004-includes_fix.patch b/net/iptraf/patches/004-includes_fix.patch new file mode 100644 index 0000000..50d218b --- /dev/null +++ b/net/iptraf/patches/004-includes_fix.patch @@ -0,0 +1,20 @@ +--- a/src/othptab.c ++++ b/src/othptab.c +@@ -18,6 +18,7 @@ details. + + #include + #include ++#include + #include + #include + #include +--- a/src/tr.c ++++ b/src/tr.c +@@ -7,6 +7,7 @@ + */ + + #include ++#include + #include + #include + diff --git a/net/iptraf/patches/005-atheros.patch b/net/iptraf/patches/005-atheros.patch new file mode 100644 index 0000000..7e9bcc9 --- /dev/null +++ b/net/iptraf/patches/005-atheros.patch @@ -0,0 +1,40 @@ +--- a/src/ifaces.c 2009-11-28 18:45:44.000000000 +0000 ++++ b/src/ifaces.c 2009-11-28 18:47:46.000000000 +0000 +@@ -32,14 +32,14 @@ + #include "error.h" + + extern int accept_unsupported_interfaces; +-#define NUM_SUPPORTED_IFACES 26 ++#define NUM_SUPPORTED_IFACES 27 + + extern int daemonized; + + char ifaces[][6] = + { "lo", "eth", "sl", "ppp", "ippp", "plip", "isdn", "dvb", + "pvc", "hdlc", "ipsec", "sbni", "tr", "wvlan", "wlan", "sm2", "sm3", +- "pent", "lec", "brg", "tun", "tap", "cipcb", "tunl", "vlan" ++ "pent", "lec", "brg", "tun", "tap", "cipcb", "tunl", "vlan", "ath" + }; + + char *ltrim(char *buf) +--- a/src/packet.c 2009-11-28 18:45:44.000000000 +0000 ++++ b/src/packet.c 2009-11-28 18:48:06.000000000 +0000 +@@ -104,6 +104,8 @@ + result = LINK_ETHERNET; + else if (strncmp(ifname, "tap", 3) == 0) + result = LINK_ETHERNET; ++ else if (strncmp(ifname, "ath", 3) == 0) ++ result = LINK_ETHERNET; + else if ((strncmp(ifname, "isdn", 4) == 0) && (isdn_fd != -1)) { + isdnent = isdn_table_lookup(isdnlist, ifname, isdn_fd); + +--- a/src/promisc.c 2009-11-28 18:45:44.000000000 +0000 ++++ b/src/promisc.c 2009-11-28 18:48:28.000000000 +0000 +@@ -82,6 +82,7 @@ + + if ((strncmp(buf, "eth", 3) == 0) || + (strncmp(buf, "tr", 2) == 0) || ++ (strncmp(buf, "ath", 3) == 0) || + (strncmp(buf, "vlan", 4) == 0) || + (strncmp(ptmp->params.ifname, "wvlan", 4) == 0) || + (strncmp(ptmp->params.ifname, "lec", 3) == 0) || diff --git a/net/iptraf/patches/005-no_size_cmd.patch b/net/iptraf/patches/005-no_size_cmd.patch new file mode 100644 index 0000000..1307835 --- /dev/null +++ b/net/iptraf/patches/005-no_size_cmd.patch @@ -0,0 +1,11 @@ +--- a/src/Makefile ++++ b/src/Makefile +@@ -106,8 +106,6 @@ error.o log.o mode.o getpath.o bar.o par + BINS = iptraf rvnamed rawtime + + all: $(BINS) +- @echo +- @size $(BINS) + + iptraf: $(OBJS) textlib + $(CC) $(LDOPTS) $(PROF) -o iptraf $(OBJS) $(LIBS) diff --git a/net/ipupdate/Makefile b/net/ipupdate/Makefile new file mode 100644 index 0000000..1137581 --- /dev/null +++ b/net/ipupdate/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ipupdate +PKG_VERSION:=1.1.1 +PKG_RELEASE:=0 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/ipupdate +PKG_MD5SUM:=88ad3ac097190055db4ba816b9d26d13 + + +include $(INCLUDE_DIR)/package.mk + +define Package/ipupdate + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + TITLE:=IPUpdate-Daemon + URL:=http://ipupdate.sourceforge.net +endef + +define Package/ipupdate/description + Lightweight remote DNS update-daemon which implements RFC 2136 dynamic updates. + Compatible with BIND, Simple DNS, and Microsoft DNS Server. +endef + + +define Build/Configure +$(call Build/Configure/Default,, \ + UNAME_S="Linux" \ + UNAME_R="$(LINUX_VERSION)" \ + UNAME_M="$(ARCH)" \ +) +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR)/usr + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CC="$(TARGET_CC) $(TARGET_CFLAGS) -s" \ + PRECOMPILED_FILTER=1 \ + STAGING_DIR="$(STAGING_DIR)" \ + DESTDIR="$(PKG_INSTALL_DIR)/usr" \ + all +endef + +define Package/ipupdate/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipupdate $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/ipupdate + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dollardns $(1)/etc/ipupdate/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/failover $(1)/etc/ipupdate/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ifip $(1)/etc/ipupdate/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/whatismyip $(1)/etc/ipupdate/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/ipupdate.conf $(1)/etc/ +endef + +$(eval $(call BuildPackage,ipupdate)) diff --git a/net/ipupdate/patches/100-name_conflict.patch b/net/ipupdate/patches/100-name_conflict.patch new file mode 100644 index 0000000..b0b1c93 --- /dev/null +++ b/net/ipupdate/patches/100-name_conflict.patch @@ -0,0 +1,115 @@ +--- a/include/array.c ++++ b/include/array.c +@@ -1,7 +1,7 @@ + #include "array.h" + + /* +-** split ++** array_split + ** + ** Accepts a string argument converting all delimeters to nulls + ** Returns an allocated array pointer or NULL +@@ -14,7 +14,7 @@ + ** str is not to be deallocated while using this array + */ + +-char** split(char* str, const char* del, int* cnt) ++char** array_split(char* str, const char* del, int* cnt) + { + char** args = NULL; + int inc; +@@ -53,7 +53,7 @@ char** split(char* str, const char* del, + } + + /* +-** splice ++** array_splice + ** + ** remove length elements from array starting at offset + ** All trailing elements will be left aligned +@@ -70,7 +70,7 @@ char** split(char* str, const char* del, + ** Returns the number of elements removed + */ + +-int splice(void** array, int cnt, int offset, int length) ++int array_splice(void** array, int cnt, int offset, int length) + { + int t; + +--- a/include/array.h ++++ b/include/array.h +@@ -1,5 +1,5 @@ + #include + #include + +-char** split(char*, const char*, int*); +-int splice(void**, int, int, int); ++char** array_split(char*, const char*, int*); ++int array_splice(void**, int, int, int); +--- a/ipupdate.c ++++ b/ipupdate.c +@@ -295,7 +295,7 @@ int DoUpdate(int check) + free(zone->keyname); + free(server->zones[j]); + +- server->zonec -= splice((void**)server->zones, server->zonec, j, 1); ++ server->zonec -= array_splice((void**)server->zones, server->zonec, j, 1); + continue; + } + +@@ -317,7 +317,7 @@ int DoUpdate(int check) + free(server->zones); + free(cfg.servers[i]); + +- cfg.serverc -= splice((void**)cfg.servers, cfg.serverc, i, 1); ++ cfg.serverc -= array_splice((void**)cfg.servers, cfg.serverc, i, 1); + continue; + } + i++; +@@ -414,7 +414,7 @@ int checkcname(int *s, struct server *se + asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]); + PostMsgFree(msg); + +- zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1); ++ zone->hostc -= array_splice((void**)zone->hosts, zone->hostc, i, 1); + continue; + } + +@@ -446,7 +446,7 @@ int checkcname(int *s, struct server *se + asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]); + PostMsgFree(msg); + +- zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1); ++ zone->hostc -= array_splice((void**)zone->hosts, zone->hostc, i, 1); + continue; + } + //append the record to the packet +@@ -488,7 +488,7 @@ int checkcname(int *s, struct server *se + asprintf(&msg, "checkcname: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]); + PostMsgFree(msg); + +- zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1); ++ zone->hostc -= array_splice((void**)zone->hosts, zone->hostc, i, 1); + continue; + } + +@@ -561,7 +561,7 @@ int checkip(int *s, struct server *serve + asprintf(&msg, "checkip: server %s: zone %s: host %s: host disabled", server->name, zone->name, zone->hosts[i]); + PostMsgFree(msg); + +- if (zone->hostc -= splice((void**)zone->hosts, zone->hostc, i, 1)) ++ if (zone->hostc -= array_splice((void**)zone->hosts, zone->hostc, i, 1)) + { + *((unsigned short*)&pkt.data[8]) = htons(zone->hostc); + continue; +--- a/config.c ++++ b/config.c +@@ -873,7 +873,7 @@ void cfg_zone(struct server *server, str + switch (cfg_readblock(data, &term, &ptr)) { + case CFG_QUOTED: + zone->hostp = term; +- zone->hosts = split(zone->hostp, ", \t\r\n", &zone->hostc); ++ zone->hosts = array_split(zone->hostp, ", \t\r\n", &zone->hostc); + if (zone->hostc > 32767) + { + asprintf(&msg, "getconfig: zone \"%s\": there may not be more than 32767 hosts", zone->name); diff --git a/net/ipupdate/patches/200-byteorder.patch b/net/ipupdate/patches/200-byteorder.patch new file mode 100644 index 0000000..48cb9c6 --- /dev/null +++ b/net/ipupdate/patches/200-byteorder.patch @@ -0,0 +1,11 @@ +--- a/include/dns.c ++++ b/include/dns.c +@@ -127,7 +127,7 @@ int dns_t2wtsig(char *pktdata, unsigned + tsig.hitime = 0; + tsig.lotime = htonl(signtime); + tsig.fudge = htons(fudge); +- tsig.macsize = 0x1000; //16 ++ tsig.macsize = htons(16); + memset(tsig.mac, 0, 16); + memcpy(&tsig.id, pktdata, 2); + tsig.error = 0; diff --git a/net/iputils/Makefile b/net/iputils/Makefile new file mode 100644 index 0000000..712076b --- /dev/null +++ b/net/iputils/Makefile @@ -0,0 +1,179 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=iputils +PKG_VERSION:=20101006 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-s$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.skbuff.net/iputils +PKG_MD5SUM:=a36c25e9ec17e48be514dc0485e7376c + +PKG_BUILD_DEPENDS:=sysfsutils +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-s$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + + +define Package/iputils/Default + SECTION:=net + CATEGORY:=Network + URL:=http://www.skbuff.net/iputils + DEPENDS:= @!LINUX_2_4 +endef + + +define Package/iputils-arping +$(call Package/iputils/Default) + TITLE:=iputils - arping + DEPENDS+= +libsysfs +endef + +define Package/iputils-arping/description + Program arping from iputils. + Sends ARP REQUEST to a neighbour host. +endef + + +define Package/iputils-clockdiff +$(call Package/iputils/Default) + TITLE:=iputils - clockdiff +endef + +define Package/iputils-clockdiff/description + Program clockdiff from iputils. + Measures clock difference between hosts. +endef + + +define Package/iputils-ping +$(call Package/iputils/Default) + TITLE:=iputils - ping +endef + +define Package/iputils-ping/description + Program ping from iputils. + Sends ICMP ECHO_REQUEST to network hosts (IPv4). +endef + + +define Package/iputils-ping6 +$(call Package/iputils/Default) + TITLE:=iputils - ping6 + DEPENDS+= @IPV6 +endef + +define Package/iputils-ping6/description + Program ping6 from iputils. + Sends ICMP ECHO_REQUEST to network hosts (IPv6). +endef + + +define Package/iputils-tftpd +$(call Package/iputils/Default) + TITLE:=iputils - tftpd +endef + +define Package/iputils-tftpd/description + Program tftpd from iputils + Trivial File Transfer Protocol server. +endef + + +define Package/iputils-tracepath +$(call Package/iputils/Default) + TITLE:=iputils - tracepath +endef + +define Package/iputils-tracepath/description + Program tracepath from iputils. + Traces path to a network host discovering MTU along this path (IPv4). +endef + + +define Package/iputils-tracepath6 +$(call Package/iputils/Default) + TITLE:=iputils - tracepath6 + DEPENDS+= @IPV6 +endef + +define Package/iputils-tracepath6/description + Program tracepath6 from iputils. + Traces path to a network host discovering MTU along this path (IPv6). +endef + + +define Package/iputils-traceroute6 +$(call Package/iputils/Default) + TITLE:=iputils - traceroute6 + DEPENDS+= @IPV6 +endef + +define Package/iputils-traceroute6/description + Program traceroute6 from iputils. + Traces path to a network host (IPv6). +endef + +ifeq ($(BOARD),brcm47xx) + TARGET_CFLAGS += -O2 +endif + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \ + CONFIG_IPV6="$(CONFIG_IPV6)" \ + CONFIG_USE_UCLIBC="$(CONFIG_USE_UCLIBC)" \ + +define Package/iputils-arping/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/arping $(1)/usr/bin/ +endef + +define Package/iputils-clockdiff/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/clockdiff $(1)/usr/bin/ +endef + +define Package/iputils-ping/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ping $(1)/usr/bin/ +endef + +define Package/iputils-ping6/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ping6 $(1)/usr/bin/ +endef + +define Package/iputils-tftpd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tftpd $(1)/usr/sbin/ +endef + +define Package/iputils-tracepath/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tracepath $(1)/usr/bin/ +endef + +define Package/iputils-tracepath6/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tracepath6 $(1)/usr/bin/ +endef + +define Package/iputils-traceroute6/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/traceroute6 $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,iputils-arping)) +$(eval $(call BuildPackage,iputils-clockdiff)) +$(eval $(call BuildPackage,iputils-ping)) +$(eval $(call BuildPackage,iputils-tftpd)) +$(eval $(call BuildPackage,iputils-tracepath)) +$(eval $(call BuildPackage,iputils-ping6)) +$(eval $(call BuildPackage,iputils-tracepath6)) +$(eval $(call BuildPackage,iputils-traceroute6)) diff --git a/net/iputils/patches/001-iputils.patch b/net/iputils/patches/001-iputils.patch new file mode 100644 index 0000000..e57db13 --- /dev/null +++ b/net/iputils/patches/001-iputils.patch @@ -0,0 +1,14 @@ +diff -ur a/Makefile b/Makefile +--- a/Makefile 2002-09-20 18:23:55.000000000 +0000 ++++ b/Makefile 2007-05-17 13:59:55.000000000 +0000 +@@ -16,8 +16,8 @@ + CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g + CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES) + +-IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd +-IPV6_TARGETS=tracepath6 traceroute6 ping6 ++IPV4_TARGETS=tracepath ping clockdiff arping tftpd ++IPV6_TARGETS=tracepath6 traceroute6 ping6 + TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS) + + LASTTAG:=`git describe HEAD | sed -e 's/-.*//'` diff --git a/net/iputils/patches/002-fix-ipv6.patch b/net/iputils/patches/002-fix-ipv6.patch new file mode 100644 index 0000000..4411ca7 --- /dev/null +++ b/net/iputils/patches/002-fix-ipv6.patch @@ -0,0 +1,14 @@ +--- a/Makefile ++++ b/Makefile +@@ -18,7 +18,10 @@ CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES) + + IPV4_TARGETS=tracepath ping clockdiff arping tftpd + IPV6_TARGETS=tracepath6 traceroute6 ping6 +-TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS) ++TARGETS=$(IPV4_TARGETS) ++ifeq ($(CONFIG_IPV6),y) ++ TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS) ++endif + + LASTTAG:=`git describe HEAD | sed -e 's/-.*//'` + TAG:=`date +s%Y%m%d` diff --git a/net/iputils/patches/003-fix-makefile.patch b/net/iputils/patches/003-fix-makefile.patch new file mode 100644 index 0000000..926c685 --- /dev/null +++ b/net/iputils/patches/003-fix-makefile.patch @@ -0,0 +1,18 @@ +--- a/Makefile ++++ b/Makefile +@@ -30,9 +30,13 @@ all: $(TARGETS) + + + tftpd: tftpd.o tftpsubs.o +-arping: arping.o -lsysfs ++arping: arping.o ++ $(CC) $(CFLAGS) -o $@ arping.o -lsysfs + ping: ping.o ping_common.o +-ping6: ping6.o ping_common.o -lresolv -lcrypto ++ping6: ping6.o ping_common.o ++ifneq ($(CONFIG_USE_UCLIBC),y) ++ $(CC) $(CFLAGS) -o $@ ping6.o ping_common.o -lresolv -lcrypto ++endif + ping.o ping6.o ping_common.o: ping_common.h + tftpd.o tftpsubs.o: tftp.h + diff --git a/net/iputils/patches/010-ping6_uclibc_resolv.patch b/net/iputils/patches/010-ping6_uclibc_resolv.patch new file mode 100644 index 0000000..6955803 --- /dev/null +++ b/net/iputils/patches/010-ping6_uclibc_resolv.patch @@ -0,0 +1,200 @@ +diff --git a/ping6.c b/ping6.c +index c5ff881..ef2243f 100644 +--- a/ping6.c ++++ b/ping6.c +@@ -71,9 +71,11 @@ char copyright[] = + #include + #include + #include ++#ifndef __UCLIBC__ + #include + + #include "ping6_niquery.h" ++#endif /* __UCLIBC__ */ + + #ifndef SOL_IPV6 + #define SOL_IPV6 IPPROTO_IPV6 +@@ -154,6 +156,7 @@ int pmtudisc=-1; + + static int icmp_sock; + ++#ifndef __UCLIBC__ + #include + + /* Node Information query */ +@@ -165,6 +168,7 @@ int ni_subject_type = 0; + char *ni_group; + + __u8 ni_nonce[8]; ++#endif /* __UCLIBC__ */ + + static struct in6_addr in6_anyaddr; + static __inline__ int ipv6_addr_any(struct in6_addr *addr) +@@ -223,6 +227,7 @@ unsigned int if_name2index(const char *ifname) + return i; + } + ++#ifndef __UCLIBC__ + struct niquery_option { + char *name; + int namelen; +@@ -512,6 +517,7 @@ char *ni_groupaddr(const char *name) + strcat(nigroup_buf, q); + return nigroup_buf; + } ++#endif /* __UCLIBC__ */ + + int main(int argc, char *argv[]) + { +@@ -595,12 +601,14 @@ int main(int argc, char *argv[]) + case 'V': + printf("ping6 utility, iputils-ss%s\n", SNAPSHOT); + exit(0); ++#ifndef __UCLIBC__ + case 'N': + if (niquery_option_handler(optarg) < 0) { + usage(); + break; + } + break; ++#endif /* __UCLIBC__ */ + COMMON_OPTIONS + common_options(ch); + break; +@@ -663,6 +671,7 @@ int main(int argc, char *argv[]) + argc--; + } + ++#ifndef __UCLIBC__ + if (ni_query >= 0) { + int i; + for (i = 0; i < 8; i++) +@@ -674,15 +683,20 @@ int main(int argc, char *argv[]) + ni_subject_type = NI_SUBJ_IPV6; + } + } ++#endif /* __UCLIBC__ */ + + if (argc > 1) + usage(); + else if (argc == 1) { + target = *argv; + } else { ++#ifndef __UCLIBC__ + if (ni_query < 0 && ni_subject_type != NI_SUBJ_NAME) ++#endif /* __UCLIBC__ */ + usage(); ++#ifndef __UCLIBC__ + target = ni_group; ++#endif /* __UCLIBC__ */ + } + + memset(&hints, 0, sizeof(hints)); +@@ -817,7 +831,11 @@ int main(int argc, char *argv[]) + exit(2); + } + ++#ifndef __UCLIBC__ + if (datalen >= sizeof(struct timeval) && (ni_query < 0)) { ++#else ++ if (datalen >= sizeof(struct timeval)) { ++#endif /* __UCLIBC__ */ + /* can we time transfer */ + timing = 1; + } +@@ -866,9 +884,11 @@ int main(int argc, char *argv[]) + ICMP6_FILTER_SETPASS(ICMP6_PARAM_PROB, &filter); + } + ++#ifndef __UCLIBC__ + if (ni_query >= 0) + ICMP6_FILTER_SETPASS(ICMPV6_NI_REPLY, &filter); + else ++#endif /* __UCLIBC__ */ + ICMP6_FILTER_SETPASS(ICMP6_ECHO_REPLY, &filter); + + err = setsockopt(icmp_sock, IPPROTO_ICMPV6, ICMP6_FILTER, &filter, +@@ -1100,6 +1120,7 @@ int build_echo(__u8 *_icmph) + return cc; + } + ++#ifndef __UCLIBC__ + int build_niquery(__u8 *_nih) + { + struct ni_hdr *nih; +@@ -1125,6 +1146,7 @@ int build_niquery(__u8 *_nih) + + return cc; + } ++#endif /* __UCLIBC__ */ + + int send_probe(void) + { +@@ -1132,9 +1154,11 @@ int send_probe(void) + + CLR((ntransmitted+1) % mx_dup_ck); + ++#ifndef __UCLIBC__ + if (ni_query >= 0) + len = build_niquery(outpack); + else ++#endif /* __UCLIBC__ */ + len = build_echo(outpack); + + if (cmsglen == 0) { +@@ -1176,6 +1200,7 @@ static void putchar_safe(char c) + printf("\\%03o", c); + } + ++#ifndef __UCLIBC__ + void pr_niquery_reply_name(struct ni_hdr *nih, int len) + { + __u8 *h = (__u8 *)(nih + 1); +@@ -1304,6 +1329,7 @@ void pr_niquery_reply(__u8 *_nih, int len) + } + putchar(';'); + } ++#endif /* __UCLIBC__ */ + + /* + * parse_reply -- +@@ -1353,6 +1379,7 @@ parse_reply(struct msghdr *msg, int cc, void *addr, struct timeval *tv) + hops, 0, tv, pr_addr(&from->sin6_addr), + pr_echo_reply)) + return 0; ++#ifndef __UCLIBC__ + } else if (icmph->icmp6_type == ICMPV6_NI_REPLY) { + struct ni_hdr *nih = (struct ni_hdr *)icmph; + __u16 seq = ntohs(*(__u16 *)nih->ni_nonce); +@@ -1363,6 +1390,7 @@ parse_reply(struct msghdr *msg, int cc, void *addr, struct timeval *tv) + hops, 0, tv, pr_addr(&from->sin6_addr), + pr_niquery_reply)) + return 0; ++#endif /* __UCLIBC__ */ + } else { + int nexthdr; + struct ip6_hdr *iph1 = (struct ip6_hdr*)(icmph+1); +@@ -1557,7 +1585,9 @@ void usage(void) + "Usage: ping6 [-LUdfnqrvVaAD] [-c count] [-i interval] [-w deadline]\n" + " [-p pattern] [-s packetsize] [-t ttl] [-I interface]\n" + " [-M pmtudisc-hint] [-S sndbuf] [-F flowlabel] [-Q tclass]\n" ++#ifndef __UCLIBC__ + " [[-N nodeinfo-option] ...]\n" ++#endif /* __UCLIBC__ */ + " [hop1 ...] destination\n"); + exit(2); + } +diff --git a/ping6_niquery.h b/ping6_niquery.h +index 61a5cfa..34c31f8 100644 +--- a/ping6_niquery.h ++++ b/ping6_niquery.h +@@ -1,3 +1,4 @@ ++#ifndef __UCLIBC__ + #include + + /* Node Information Query */ +@@ -45,3 +46,4 @@ struct ni_hdr { + #define NI_IPV4ADDR_F_TRUNCATE NI_IPV6ADDR_F_TRUNCATE + #define NI_IPV4ADDR_F_ALL NI_IPV6ADDR_F_ALL + ++#endif /* __UCLIBC__ */ diff --git a/net/iputils/patches/011-ping6_use_gnu_source.patch b/net/iputils/patches/011-ping6_use_gnu_source.patch new file mode 100644 index 0000000..dc61b8c --- /dev/null +++ b/net/iputils/patches/011-ping6_use_gnu_source.patch @@ -0,0 +1,11 @@ +--- a/ping6.c ++++ b/ping6.c +@@ -66,6 +66,8 @@ char copyright[] = + * More statistics could always be gathered. + * This program has to run SUID to ROOT to access the ICMP socket. + */ ++ ++#define _GNU_SOURCE + #include "ping_common.h" + + #include diff --git a/net/irssi-glib1/Makefile b/net/irssi-glib1/Makefile new file mode 100644 index 0000000..9752fe6 --- /dev/null +++ b/net/irssi-glib1/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=irssi-glib1 +PKG_VERSION:=0.8.10 +PKG_RELEASE:=3 + +PKG_SOURCE:=irssi-$(PKG_VERSION)a.tar.bz2 +PKG_SOURCE_URL:=http://irssi.org/files/ +PKG_MD5SUM:=38e616bccb6a34ff6d91690317c2fa19 + +PKG_BUILD_DIR:=$(BUILD_DIR)/irssi-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/irssi-glib1 + SUBMENU:=Instant Messaging + SECTION:=net + CATEGORY:=Network + DEPENDS:=+glib1 +libncurses + TITLE:=glib1 console irc client + URL:=http://irssi.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --with-perl=no \ + --with-glib1 \ + --with-glib-prefix="$(STAGING_DIR)/usr" \ + --with-textui \ + --without-terminfo \ + --without-bot \ + --without-file-offset-size \ + --without-ssl \ + --disable-ssl \ + --disable-proxy \ + ) +endef + +define Package/irssi-glib1/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/fe-text/irssi $(1)/usr/bin/irssi-glib1 +endef + +$(eval $(call BuildPackage,irssi-glib1)) diff --git a/net/irssi-glib1/patches/100-cross_compiling_fix.patch b/net/irssi-glib1/patches/100-cross_compiling_fix.patch new file mode 100644 index 0000000..17a60f3 --- /dev/null +++ b/net/irssi-glib1/patches/100-cross_compiling_fix.patch @@ -0,0 +1,61 @@ +--- a/configure ++++ b/configure +@@ -21848,13 +21848,6 @@ _ACEOF + + echo "$as_me:$LINENO: checking size of off_t" >&5 + echo $ECHO_N "checking size of off_t... $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 +@@ -21872,35 +21865,8 @@ cat >>conftest.$ac_ext <<_ACEOF + } + + _ACEOF +-rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- +- sizeof_off_t=`cat conftestval` +- rm -f conftestval +- +-else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +- +- { { echo "$as_me:$LINENO: error: Unsupported off_t size" >&5 +-echo "$as_me: error: Unsupported off_t size" >&2;} +- { (exit 1); exit 1; }; } +- +-fi ++ sizeof_off_t=8 + rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi + echo "$as_me:$LINENO: result: $sizeof_off_t" >&5 + echo "${ECHO_T}$sizeof_off_t" >&6 + +@@ -22905,6 +22871,7 @@ _ACEOF + echo "*** you can just unpack it to Irssi's source directory and" + echo "*** Irssi will automatically compile and use it." + echo ++ exit 1 + + glib_url=ftp://ftp.gtk.org/pub/gtk/v2.8/ + glib_file=glib-2.8.3.tar.gz diff --git a/net/irssi/Makefile b/net/irssi/Makefile new file mode 100644 index 0000000..67e6954 --- /dev/null +++ b/net/irssi/Makefile @@ -0,0 +1,92 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=irssi +PKG_VERSION:=0.8.15 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://irssi.org/files/ +PKG_MD5SUM:=1dcb3f511b88df94b0c996f36668c7da + +PKG_FIXUP:=libtool + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/irssi/Default + SUBMENU:=Instant Messaging + SECTION:=net + CATEGORY:=Network + DEPENDS:=+glib2 +libncurses +libpthread + TITLE:=Console IRC client + MAINTAINER:=Peter Wagner + URL:=http://irssi.org/ +endef + +define Package/irssi/Default/description + Irssi is a terminal based IRC client for UNIX systems. +endef + +define Package/irssi +$(call Package/irssi/Default) + TITLE+= (with OpenSSL support) + DEPENDS+= +libopenssl + VARIANT:=ssl +endef + +define Package/irssi/description +$(call Package/irssi/Default/description) + This package is built with OpenSSL support. +endef + +define Package/irssi-nossl +$(call Package/irssi/Default) + TITLE+= (without OpenSSL support) + VARIANT:=nossl +endef + +define Package/irssi-nossl/description +$(call Package/irssi/Default/description) + This package is built without OpenSSL support. +endef + +CONFIGURE_ARGS += \ + --with-perl=no \ + --with-glib-prefix="$(STAGING_DIR)/usr" \ + --with-textui \ + --without-terminfo \ + --without-bot \ + --disable-proxy + +EXTRA_CFLAGS+=$(TARGET_CPPFLAGS) +EXTRA_LDFLAGS+=-lncurses + +ifeq ($(BUILD_VARIANT),ssl) + CONFIGURE_ARGS += \ + --with-ssl="$(STAGING_DIR)/usr" +endif + +ifeq ($(BUILD_VARIANT),nossl) + CONFIGURE_ARGS += \ + --without-ssl \ + --disable-ssl +endif + +define Package/irssi/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/fe-text/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME) +endef + +Package/irssi-nossl/install = $(Package/irssi/install) + +$(eval $(call BuildPackage,irssi)) +$(eval $(call BuildPackage,irssi-nossl)) diff --git a/net/isakmpd/Makefile b/net/isakmpd/Makefile new file mode 100644 index 0000000..af8f4cf --- /dev/null +++ b/net/isakmpd/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=isakmpd +PKG_VERSION:=20041012 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/i/isakmpd/ +PKG_MD5SUM:=e6d25a9e232fb186e1a48dc06453bd57 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk + +define Package/isakmpd + SECTION:=net + CATEGORY:=Network + SUBMENU:=VPN + DEPENDS:=@!LINUX_2_4 +libopenssl +keynote +libgmp + TITLE:=IPsec management tools + URL:=http://isakmpd.sourceforge.net/ +endef + +define Build/Compile + CFLAGS="$(TARGET_CFLAGS)" \ + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + LINUX_DIR="$(LINUX_DIR)" \ + EXTRA_CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/openssl -I$(STAGING_DIR)/usr/include/keynote" \ + EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" + + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + INSTALL="install -c" \ + install-bin +endef + +define Package/isakmpd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +$(eval $(call BuildPackage,isakmpd)) diff --git a/net/isakmpd/patches/010-debian_3.patch b/net/isakmpd/patches/010-debian_3.patch new file mode 100644 index 0000000..0f50cf9 --- /dev/null +++ b/net/isakmpd/patches/010-debian_3.patch @@ -0,0 +1,1753 @@ +Index: isakmpd-20041012.orig/dpd.c +=================================================================== +--- isakmpd-20041012.orig.orig/dpd.c 2007-06-04 13:22:39.088912864 +0200 ++++ isakmpd-20041012.orig/dpd.c 2007-06-04 13:22:39.282883376 +0200 +@@ -26,6 +26,7 @@ + + #include + #include ++#include + + #include "sysdep.h" + +@@ -174,6 +175,7 @@ + } + break; + default: ++ ; + } + + /* Mark handled. */ +@@ -223,6 +225,7 @@ + dpd_check_event, sa, &tv); + break; + default: ++ ; + } + if (!sa->dpd_event) + log_print("dpd_timer_reset: timer_add_event failed"); +Index: isakmpd-20041012.orig/ipsec.c +=================================================================== +--- isakmpd-20041012.orig.orig/ipsec.c 2007-06-04 13:22:39.093912104 +0200 ++++ isakmpd-20041012.orig/ipsec.c 2007-06-04 13:22:39.283883224 +0200 +@@ -1020,6 +1020,52 @@ + } + } + ++/* ++ * deal with a NOTIFY of INVALID_SPI ++ */ ++static void ++ipsec_invalid_spi (struct message *msg, struct payload *p) ++{ ++ struct sockaddr *dst; ++ int invspisz, off; ++ u_int32_t spi; ++ u_int16_t totsiz; ++ u_int8_t spisz; ++ ++ /* Any notification that make us do something should be protected */ ++ if(!TAILQ_FIRST (&msg->payload[ISAKMP_PAYLOAD_HASH])) ++ { ++ LOG_DBG ((LOG_SA, 40, ++ "ipsec_invalid_spi: missing HASH payload in INVALID_SPI" ++ " notification")); ++ return; ++ } ++ ++ /* ++ * get the invalid spi out of the variable sized notification data ++ * field, which is after the variable sized SPI field [which specifies ++ * the receiving entity's phase-1 SPI, not the invalid spi] ++ */ ++ totsiz = GET_ISAKMP_GEN_LENGTH (p->p); ++ spisz = GET_ISAKMP_NOTIFY_SPI_SZ (p->p); ++ off = ISAKMP_NOTIFY_SPI_OFF + spisz; ++ invspisz = totsiz - off; ++ ++ if (invspisz != sizeof spi) ++ { ++ LOG_DBG ((LOG_SA, 40, ++ "ipsec_invalid_spi: SPI size %d in INVALID_SPI " ++ "payload unsupported", spisz)); ++ return; ++ } ++ memcpy (&spi, p->p + off, sizeof spi); ++ ++ msg->transport->vtbl->get_dst (msg->transport, &dst); ++ ++ /* delete matching SPI's from this peer */ ++ ipsec_delete_spi_list (dst, 0, (u_int8_t *)&spi, 1, "INVALID_SPI"); ++} ++ + static int + ipsec_responder(struct message *msg) + { +@@ -1205,7 +1251,9 @@ + return dv != IPSEC_ENCAP_TUNNEL + && dv != IPSEC_ENCAP_TRANSPORT + && dv != IPSEC_ENCAP_UDP_ENCAP_TUNNEL +- && dv != IPSEC_ENCAP_UDP_ENCAP_TRANSPORT; ++ && dv != IPSEC_ENCAP_UDP_ENCAP_TRANSPORT ++ && dv != IPSEC_ENCAP_UDP_ENCAP_TUNNEL_DRAFT ++ && dv != IPSEC_ENCAP_UDP_ENCAP_TRANSPORT_DRAFT; + #else + return dv < IPSEC_ENCAP_TUNNEL + || dv > IPSEC_ENCAP_TRANSPORT; +@@ -1837,7 +1885,7 @@ + ipsec_get_id(char *section, int *id, struct sockaddr **addr, + struct sockaddr **mask, u_int8_t *tproto, u_int16_t *port) + { +- char *type, *address, *netmask; ++ char *type, *address, *netmask; + + type = conf_get_str(section, "ID-type"); + if (!type) { +Index: isakmpd-20041012.orig/GNUmakefile +=================================================================== +--- isakmpd-20041012.orig.orig/GNUmakefile 2007-06-04 13:22:39.099911192 +0200 ++++ isakmpd-20041012.orig/GNUmakefile 2007-06-04 13:22:39.283883224 +0200 +@@ -40,12 +40,12 @@ + # integrated, freebsd/netbsd means FreeBSD/NetBSD with KAME IPsec. + # darwin means MacOS X 10.2 and later with KAME IPsec. linux means Linux-2.5 + # and later with native IPSec support. +-OS= openbsd ++#OS= openbsd + #OS= netbsd + #OS= freebsd + #OS= freeswan + #OS= darwin +-#OS= linux ++OS= linux + + .CURDIR:= $(shell pwd) + VPATH= ${.CURDIR}/sysdep/${OS} +@@ -55,9 +55,10 @@ + ifndef BINDIR + BINDIR= /sbin + endif +-ifndef LDSTATIC +-LDSTATIC= -static +-endif ++ ++#ifndef LDSTATIC ++#LDSTATIC= -static ++#endif + + SRCS= app.c attribute.c cert.c connection.c \ + constants.c conf.c cookie.c crypto.c dh.c doi.c exchange.c \ +@@ -131,11 +132,14 @@ + ifneq ($(findstring install,$(MAKECMDGOALS)),install) + # Skip 'regress' until the regress/ structure has gmake makefiles for it. + #SUBDIR:= regress +-SUBDIR:= ++#SUBDIR:= apps/certpatch + mksubdirs: + $(foreach DIR, ${SUBDIR}, \ +- cd ${DIR}; ${MAKE} ${MAKEFLAGS} CFLAGS="${CFLAGS}" \ +- MKDEP="${MKDEP}" ${MAKECMDGOALS}) ++ cd ${.CURDIR}/${DIR}; ${MAKE} ${MAKECMDGOALS};) ++ ++# $(foreach DIR, ${SUBDIR}, \ ++# cd ${DIR}; ${MAKE} CFLAGS="${CFLAGS}" \ ++# MKDEP="${MKDEP}" ${MAKECMDGOALS}) + else + mksubdirs: + endif +@@ -173,7 +177,7 @@ + endif + + SRCS+= ${IPSEC_SRCS} ${X509} ${POLICY} ${EC} ${AGGRESSIVE} ${DNSSEC} \ +- $(ISAKMP_CFG) ++ $(ISAKMP_CFG) ${DPD} ${NAT_TRAVERSAL} + CFLAGS+= ${IPSEC_CFLAGS} + LDADD+= ${DESLIB} + DPADD+= ${DESLIBDEP} +Index: isakmpd-20041012.orig/exchange.h +=================================================================== +--- isakmpd-20041012.orig.orig/exchange.h 2007-06-04 13:22:39.104910432 +0200 ++++ isakmpd-20041012.orig/exchange.h 2007-06-04 13:22:39.283883224 +0200 +@@ -221,6 +221,8 @@ + #define EXCHANGE_FLAG_NAT_T_ENABLE 0x10 /* We are doing NAT-T. */ + #define EXCHANGE_FLAG_NAT_T_KEEPALIVE 0x20 /* We are the NAT:ed peer. */ + #define EXCHANGE_FLAG_DPD_CAP_PEER 0x40 /* Peer is DPD capable. */ ++#define EXCHANGE_FLAG_NAT_T_RFC 0x0080 /* Peer does RFC NAT-T. */ ++#define EXCHANGE_FLAG_NAT_T_DRAFT 0x0100 /* Peer does draft NAT-T.*/ + + extern int exchange_add_certs(struct message *); + extern void exchange_finalize(struct message *); +Index: isakmpd-20041012.orig/log.c +=================================================================== +--- isakmpd-20041012.orig.orig/log.c 2007-06-04 13:22:39.110909520 +0200 ++++ isakmpd-20041012.orig/log.c 2007-06-04 13:22:39.284883072 +0200 +@@ -79,7 +79,6 @@ + + struct packhdr { + struct pcap_pkthdr pcap;/* pcap file packet header */ +- u_int32_t sa_family; /* address family */ + union { + struct ip ip4; /* IPv4 header (w/o options) */ + struct ip6_hdr ip6; /* IPv6 header */ +@@ -97,7 +96,7 @@ + static u_int8_t *packet_buf = NULL; + + static int udp_cksum(struct packhdr *, const struct udphdr *, +- u_int16_t *); ++ u_int16_t *, int); + static u_int16_t in_cksum(const u_int16_t *, int); + #endif /* USE_DEBUG */ + +@@ -539,11 +538,9 @@ + udp.uh_ulen = htons(datalen); + + /* ip */ +- hdr.sa_family = htonl(src->sa_family); + switch (src->sa_family) { + default: + /* Assume IPv4. XXX Can 'default' ever happen here? */ +- hdr.sa_family = htonl(AF_INET); + hdr.ip.ip4.ip_src.s_addr = 0x02020202; + hdr.ip.ip4.ip_dst.s_addr = 0x01010101; + /* The rest of the setup is common to AF_INET. */ +@@ -584,9 +581,7 @@ + } + + /* Calculate UDP checksum. */ +- udp.uh_sum = udp_cksum(&hdr, &udp, (u_int16_t *) packet_buf); +- hdrlen += sizeof hdr.sa_family; +- ++ udp.uh_sum = udp_cksum(&hdr, &udp, (u_int16_t *) packet_buf, src->sa_family); + /* pcap file packet header */ + gettimeofday(&tv, 0); + hdr.pcap.ts.tv_sec = tv.tv_sec; +@@ -610,7 +605,7 @@ + + /* Copied from tcpdump/print-udp.c, mostly rewritten. */ + static int +-udp_cksum(struct packhdr *hdr, const struct udphdr *u, u_int16_t *d) ++udp_cksum(struct packhdr *hdr, const struct udphdr *u, u_int16_t *d, int af) + { + struct ip *ip4; + struct ip6_hdr *ip6; +@@ -639,7 +634,7 @@ + + /* Setup pseudoheader. */ + memset(phu.pa, 0, sizeof phu); +- switch (ntohl(hdr->sa_family)) { ++ switch (af) { + case AF_INET: + ip4 = &hdr->ip.ip4; + memcpy(&phu.ip4p.src, &ip4->ip_src, sizeof(struct in_addr)); +@@ -664,7 +659,7 @@ + + /* IPv6 wants a 0xFFFF checksum "on error", not 0x0. */ + if (tlen < 0) +- return (ntohl(hdr->sa_family) == AF_INET ? 0 : 0xFFFF); ++ return (af == AF_INET ? 0 : 0xFFFF); + + sum = 0; + for (i = 0; i < hdrlen; i += 2) +Index: isakmpd-20041012.orig/nat_traversal.c +=================================================================== +--- isakmpd-20041012.orig.orig/nat_traversal.c 2007-06-04 13:22:39.115908760 +0200 ++++ isakmpd-20041012.orig/nat_traversal.c 2007-06-04 13:22:39.284883072 +0200 +@@ -1,4 +1,4 @@ +-/* $OpenBSD: nat_traversal.c,v 1.7 2004/08/08 19:11:06 deraadt Exp $ */ ++/* $OpenBSD: nat_traversal.c,v 1.17 2006/06/14 14:03:33 hshoexer Exp $ */ + + /* + * Copyright (c) 2004 Håkan Olsson. All rights reserved. +@@ -48,40 +48,40 @@ + #include "util.h" + #include "virtual.h" + ++int disable_nat_t = 0; ++ + /* +- * XXX According to draft-ietf-ipsec-nat-t-ike-07.txt, the NAT-T +- * capability of the other peer is determined by a particular vendor ID +- * sent as the first message. This vendor ID string is supposed to be a +- * MD5 hash of "RFC XXXX", where XXXX is the future RFC number. ++ * NAT-T capability of the other peer is determined by a particular vendor ++ * ID sent in the first message. This vendor ID string is supposed to be a ++ * MD5 hash of "RFC 3947". + * + * These seem to be the "well" known variants of this string in use by + * products today. + */ +-static const char *isakmp_nat_t_cap_text[] = { +- "draft-ietf-ipsec-nat-t-ike-00", /* V1 (XXX: may be obsolete) */ +- "draft-ietf-ipsec-nat-t-ike-02\n", /* V2 */ +- "draft-ietf-ipsec-nat-t-ike-03", /* V3 */ +-#ifdef notyet +- "RFC XXXX", +-#endif ++ ++static struct nat_t_cap isakmp_nat_t_cap[] = { ++ { VID_DRAFT_V2_N, EXCHANGE_FLAG_NAT_T_DRAFT, ++ "draft-ietf-ipsec-nat-t-ike-02\n", NULL, 0 }, ++ { VID_DRAFT_V3, EXCHANGE_FLAG_NAT_T_DRAFT, ++ "draft-ietf-ipsec-nat-t-ike-03", NULL, 0 }, ++ { VID_RFC3947, EXCHANGE_FLAG_NAT_T_RFC, ++ "RFC 3947", NULL, 0 }, + }; + ++#define NUMNATTCAP (sizeof isakmp_nat_t_cap / sizeof isakmp_nat_t_cap[0]) ++ + /* In seconds. Recommended in draft-ietf-ipsec-udp-encaps-09. */ + #define NAT_T_KEEPALIVE_INTERVAL 20 + +-/* The MD5 hashes of the above strings is put in this array. */ +-static char **nat_t_hashes; +-static size_t nat_t_hashsize; +- + static int nat_t_setup_hashes(void); +-static int nat_t_add_vendor_payload(struct message *, char *); ++static int nat_t_add_vendor_payload(struct message *, struct nat_t_cap *); + static int nat_t_add_nat_d(struct message *, struct sockaddr *); + static int nat_t_match_nat_d_payload(struct message *, struct sockaddr *); + + void + nat_t_init(void) + { +- nat_t_hashes = (char **)NULL; ++ nat_t_setup_hashes(); + } + + /* Generate the NAT-T capability marker hashes. Executed only once. */ +@@ -89,7 +89,7 @@ + nat_t_setup_hashes(void) + { + struct hash *hash; +- int n = sizeof isakmp_nat_t_cap_text / sizeof isakmp_nat_t_cap_text[0]; ++ int n = NUMNATTCAP; + int i; + + /* The draft says to use MD5. */ +@@ -100,56 +100,49 @@ + "could not find MD5 hash structure!"); + return -1; + } +- nat_t_hashsize = hash->hashsize; + +- /* Allocate one more than is necessary, i.e NULL terminated. */ +- nat_t_hashes = (char **)calloc((size_t)(n + 1), sizeof(char *)); +- if (!nat_t_hashes) { +- log_error("nat_t_setup_hashes: calloc (%lu,%lu) failed", +- (unsigned long)n, (unsigned long)sizeof(char *)); +- return -1; +- } +- +- /* Populate with hashes. */ ++ /* Populate isakmp_nat_t_cap with hashes. */ + for (i = 0; i < n; i++) { +- nat_t_hashes[i] = (char *)malloc(nat_t_hashsize); +- if (!nat_t_hashes[i]) { ++ isakmp_nat_t_cap[i].hashsize = hash->hashsize; ++ isakmp_nat_t_cap[i].hash = (char *)malloc(hash->hashsize); ++ if (!isakmp_nat_t_cap[i].hash) { + log_error("nat_t_setup_hashes: malloc (%lu) failed", +- (unsigned long)nat_t_hashsize); ++ (unsigned long)hash->hashsize); + goto errout; + } + + hash->Init(hash->ctx); + hash->Update(hash->ctx, +- (unsigned char *)isakmp_nat_t_cap_text[i], +- strlen(isakmp_nat_t_cap_text[i])); +- hash->Final(nat_t_hashes[i], hash->ctx); ++ (unsigned char *)isakmp_nat_t_cap[i].text, ++ strlen(isakmp_nat_t_cap[i].text)); ++ hash->Final(isakmp_nat_t_cap[i].hash, hash->ctx); + + LOG_DBG((LOG_EXCHANGE, 50, "nat_t_setup_hashes: " +- "MD5(\"%s\") (%lu bytes)", isakmp_nat_t_cap_text[i], +- (unsigned long)nat_t_hashsize)); ++ "MD5(\"%s\") (%lu bytes)", isakmp_nat_t_cap[i].text, ++ (unsigned long)hash->hashsize)); + LOG_DBG_BUF((LOG_EXCHANGE, 50, "nat_t_setup_hashes", +- nat_t_hashes[i], nat_t_hashsize)); ++ isakmp_nat_t_cap[i].hash, hash->hashsize)); + } + + return 0; + +- errout: ++errout: + for (i = 0; i < n; i++) +- if (nat_t_hashes[i]) +- free(nat_t_hashes[i]); +- free(nat_t_hashes); +- nat_t_hashes = NULL; ++ if (isakmp_nat_t_cap[i].hash) ++ free(isakmp_nat_t_cap[i].hash); + return -1; + } + + /* Add one NAT-T VENDOR payload. */ + static int +-nat_t_add_vendor_payload(struct message *msg, char *hash) ++nat_t_add_vendor_payload(struct message *msg, struct nat_t_cap *cap) + { +- size_t buflen = nat_t_hashsize + ISAKMP_GEN_SZ; ++ size_t buflen = cap->hashsize + ISAKMP_GEN_SZ; + u_int8_t *buf; + ++ if (disable_nat_t) ++ return 0; ++ + buf = malloc(buflen); + if (!buf) { + log_error("nat_t_add_vendor_payload: malloc (%lu) failed", +@@ -158,12 +151,11 @@ + } + + SET_ISAKMP_GEN_LENGTH(buf, buflen); +- memcpy(buf + ISAKMP_VENDOR_ID_OFF, hash, nat_t_hashsize); ++ memcpy(buf + ISAKMP_VENDOR_ID_OFF, cap->hash, cap->hashsize); + if (message_add_payload(msg, ISAKMP_PAYLOAD_VENDOR, buf, buflen, 1)) { + free(buf); + return -1; + } +- + return 0; + } + +@@ -171,16 +163,14 @@ + int + nat_t_add_vendor_payloads(struct message *msg) + { +- int i = 0; ++ int i; + +- if (!nat_t_hashes) +- if (nat_t_setup_hashes()) +- return 0; /* XXX should this be an error? */ ++ if (disable_nat_t) ++ return 0; + +- while (nat_t_hashes[i]) +- if (nat_t_add_vendor_payload(msg, nat_t_hashes[i++])) ++ for (i = 0; i < NUMNATTCAP; i++) ++ if (nat_t_add_vendor_payload(msg, &isakmp_nat_t_cap[i])) + return -1; +- + return 0; + } + +@@ -192,36 +182,31 @@ + { + u_int8_t *pbuf = p->p; + size_t vlen; +- int i = 0; ++ int i; + +- /* Already checked? */ +- if (p->flags & PL_MARK || +- msg->exchange->flags & EXCHANGE_FLAG_NAT_T_CAP_PEER) ++ if (disable_nat_t) + return; + +- if (!nat_t_hashes) +- if (nat_t_setup_hashes()) +- return; +- + vlen = GET_ISAKMP_GEN_LENGTH(pbuf) - ISAKMP_GEN_SZ; +- if (vlen != nat_t_hashsize) { +- LOG_DBG((LOG_EXCHANGE, 50, "nat_t_check_vendor_payload: " +- "bad size %lu != %lu", (unsigned long)vlen, +- (unsigned long)nat_t_hashsize)); +- return; +- } + +- while (nat_t_hashes[i]) +- if (memcmp(nat_t_hashes[i++], pbuf + ISAKMP_GEN_SZ, ++ for (i = 0; i < NUMNATTCAP; i++) { ++ if (vlen != isakmp_nat_t_cap[i].hashsize) { ++ LOG_DBG((LOG_EXCHANGE, 50, "nat_t_check_vendor_payload: " ++ "bad size %lu != %lu", (unsigned long)vlen, ++ (unsigned long)isakmp_nat_t_cap[i].hashsize)); ++ continue; ++ } ++ if (memcmp(isakmp_nat_t_cap[i].hash, pbuf + ISAKMP_GEN_SZ, + vlen) == 0) { + /* This peer is NAT-T capable. */ + msg->exchange->flags |= EXCHANGE_FLAG_NAT_T_CAP_PEER; ++ msg->exchange->flags |= isakmp_nat_t_cap[i].flags; + LOG_DBG((LOG_EXCHANGE, 10, + "nat_t_check_vendor_payload: " + "NAT-T capable peer detected")); + p->flags |= PL_MARK; +- return; + } ++ } + + return; + } +@@ -233,10 +218,8 @@ + { + struct ipsec_exch *ie = (struct ipsec_exch *)msg->exchange->data; + struct hash *hash; +- struct prf *prf; + u_int8_t *res; + in_port_t port; +- int prf_type = PRF_HMAC; /* XXX */ + + hash = hash_get(ie->hash->type); + if (hash == NULL) { +@@ -244,31 +227,25 @@ + return NULL; + } + +- prf = prf_alloc(prf_type, hash->type, msg->exchange->cookies, +- ISAKMP_HDR_COOKIES_LEN); +- if(!prf) { +- log_print("nat_t_generate_nat_d_hash: prf_alloc failed"); +- return NULL; +- } ++ *hashlen = hash->hashsize; + +- *hashlen = prf->blocksize; + res = (u_int8_t *)malloc((unsigned long)*hashlen); + if (!res) { + log_print("nat_t_generate_nat_d_hash: malloc (%lu) failed", + (unsigned long)*hashlen); +- prf_free(prf); + *hashlen = 0; + return NULL; + } + + port = sockaddr_port(sa); +- memset(res, 0, *hashlen); +- +- prf->Update(prf->prfctx, sockaddr_addrdata(sa), sockaddr_addrlen(sa)); +- prf->Update(prf->prfctx, (unsigned char *)&port, sizeof port); +- prf->Final(res, prf->prfctx); +- prf_free (prf); ++ bzero(res, *hashlen); + ++ hash->Init(hash->ctx); ++ hash->Update(hash->ctx, msg->exchange->cookies, ++ sizeof msg->exchange->cookies); ++ hash->Update(hash->ctx, sockaddr_addrdata(sa), sockaddr_addrlen(sa)); ++ hash->Update(hash->ctx, (unsigned char *)&port, sizeof port); ++ hash->Final(res, hash->ctx); + return res; + } + +@@ -276,6 +253,7 @@ + static int + nat_t_add_nat_d(struct message *msg, struct sockaddr *sa) + { ++ int ret; + u_int8_t *hbuf, *buf; + size_t hbuflen, buflen; + +@@ -298,11 +276,19 @@ + memcpy(buf + ISAKMP_NAT_D_DATA_OFF, hbuf, hbuflen); + free(hbuf); + +- if (message_add_payload(msg, ISAKMP_PAYLOAD_NAT_D, buf, buflen, 1)) { ++ if (msg->exchange->flags & EXCHANGE_FLAG_NAT_T_RFC) ++ ret = message_add_payload(msg, ISAKMP_PAYLOAD_NAT_D, buf, ++ buflen, 1); ++ else if (msg->exchange->flags & EXCHANGE_FLAG_NAT_T_DRAFT) ++ ret = message_add_payload(msg, ISAKMP_PAYLOAD_NAT_D_DRAFT, ++ buf, buflen, 1); ++ else ++ ret = -1; ++ ++ if (ret) { + free(buf); + return -1; + } +- + return 0; + } + +@@ -312,14 +298,14 @@ + { + struct sockaddr *sa; + +- msg->transport->vtbl->get_src(msg->transport, &sa); ++ /* Remote address first. */ ++ msg->transport->vtbl->get_dst(msg->transport, &sa); + if (nat_t_add_nat_d(msg, sa)) + return -1; + +- msg->transport->vtbl->get_dst(msg->transport, &sa); ++ msg->transport->vtbl->get_src(msg->transport, &sa); + if (nat_t_add_nat_d(msg, sa)) + return -1; +- + return 0; + } + +@@ -336,8 +322,8 @@ + * If there are no NAT-D payloads in the message, return "found" + * as this will avoid NAT-T (see nat_t_exchange_check_nat_d()). + */ +- p = payload_first(msg, ISAKMP_PAYLOAD_NAT_D); +- if (!p) ++ if ((p = payload_first(msg, ISAKMP_PAYLOAD_NAT_D_DRAFT)) == NULL && ++ (p = payload_first(msg, ISAKMP_PAYLOAD_NAT_D)) == NULL) + return 1; + + hbuf = nat_t_generate_nat_d_hash(msg, sa, &hbuflen); +Index: isakmpd-20041012.orig/udp_encap.c +=================================================================== +--- isakmpd-20041012.orig.orig/udp_encap.c 2007-06-04 13:22:39.121907848 +0200 ++++ isakmpd-20041012.orig/udp_encap.c 2007-06-04 13:22:39.284883072 +0200 +@@ -61,6 +61,11 @@ + + #define UDP_SIZE 65536 + ++#if defined(USE_NAT_TRAVERSAL) && defined (LINUX_IPSEC) ++#include ++#include ++#endif ++ + /* If a system doesn't have SO_REUSEPORT, SO_REUSEADDR will have to do. */ + #ifndef SO_REUSEPORT + #define SO_REUSEPORT SO_REUSEADDR +@@ -134,6 +139,18 @@ + if (sysdep_cleartext(s, laddr->sa_family) == -1) + goto err; + ++#if defined(USE_NAT_TRAVERSAL) && defined (LINUX_IPSEC) ++ { ++#ifndef SOL_UDP ++#define SOL_UDP 17 ++#endif ++ int option = UDP_ENCAP_ESPINUDP; ++ if(setsockopt(s, SOL_UDP, UDP_ENCAP, &option, ++ sizeof (option)) < 0) ++ goto err; ++ } ++#endif ++ + /* Wildcard address ? */ + switch (laddr->sa_family) { + case AF_INET: +Index: isakmpd-20041012.orig/apps/Makefile +=================================================================== +--- isakmpd-20041012.orig.orig/apps/Makefile 2007-06-04 13:22:39.126907088 +0200 ++++ isakmpd-20041012.orig/apps/Makefile 2007-06-04 13:22:39.285882920 +0200 +@@ -31,4 +31,4 @@ + + SUBDIR= certpatch + +-.include ++#.include +Index: isakmpd-20041012.orig/apps/certpatch/GNUmakefile +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ isakmpd-20041012.orig/apps/certpatch/GNUmakefile 2007-06-04 13:22:39.285882920 +0200 +@@ -0,0 +1,55 @@ ++# $OpenBSD: Makefile,v 1.7 2003/06/03 14:35:00 ho Exp $ ++# $EOM: Makefile,v 1.6 2000/03/28 21:22:06 ho Exp $ ++ ++# ++# Copyright (c) 1999 Niels Provos. All rights reserved. ++# Copyright (c) 2001 Niklas Hallqvist. All rights reserved. ++# ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions ++# are met: ++# 1. Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# 2. Redistributions in binary form must reproduce the above copyright ++# notice, this list of conditions and the following disclaimer in the ++# documentation and/or other materials provided with the distribution. ++# ++# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++# ++ ++# ++# This code was written under funding by Ericsson Radio Systems. ++# ++ ++PROG= certpatch ++SRCS= certpatch.c ++BINDIR?= /usr/sbin ++TOPSRC= ${.CURDIR}../.. ++TOPOBJ!= cd ${TOPSRC}; printf "all:\n\t@pwd\n" |${MAKE} -f- ++OS= linux ++FEATURES!= awk '/^FEATURES=/ { print $$0 }' ${.CURDIR}/../../Makefile | sed 's/FEATURES=.//' ++.PATH: ${TOPSRC} ${TOPSRC}/sysdep/${OS} ${TOPOBJ} ++CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/${OS} -I${TOPOBJ} -Wall ++LDFLAGS+= -lcrypto -lssl -lgmp ++MAN= certpatch.8 ++ ++CFLAGS+= -DMP_FLAVOUR=MP_FLAVOUR_GMP ++LDADD+= -lgmp ++DPADD+= ${LIBGMP} ++ ++# Override LIBSYSDEPDIR definition from Makefile.sysdep ++LIBSYSDEPDIR= ${TOPSRC}/sysdep/common/libsysdep ++ ++all: ${PROG} ++ ++clean: ++ rm -f ${PROG} +Index: isakmpd-20041012.orig/pf_key_v2.c +=================================================================== +--- isakmpd-20041012.orig.orig/pf_key_v2.c 2007-06-04 13:22:39.137905416 +0200 ++++ isakmpd-20041012.orig/pf_key_v2.c 2007-06-04 13:22:39.287882616 +0200 +@@ -1055,6 +1055,10 @@ + #endif + #if defined (USE_NAT_TRAVERSAL) && defined (SADB_X_EXT_UDPENCAP) + struct sadb_x_udpencap udpencap; ++#elif defined (USE_NAT_TRAVERSAL) && defined (SADB_X_EXT_NAT_T_TYPE) ++ struct sadb_x_nat_t_type nat_t_type; ++ struct sadb_x_nat_t_port nat_t_sport; ++ struct sadb_x_nat_t_port nat_t_dport; + #endif + #ifdef USE_DEBUG + char *addr_str; +@@ -1273,10 +1277,15 @@ + log_print("pf_key_v2_set_spi: invalid proto %d", proto->proto); + goto cleanup; + } +- if (incoming) ++ if (incoming) { + sa->transport->vtbl->get_src(sa->transport, &dst); +- else ++ sa->transport->vtbl->get_dst(sa->transport, &src); ++ } ++ else { + sa->transport->vtbl->get_dst(sa->transport, &dst); ++ sa->transport->vtbl->get_src(sa->transport, &src); ++ } ++ + #ifdef KAME + msg.sadb_msg_seq = (incoming ? + pf_key_v2_seq_by_sa(proto->spi[incoming], sizeof ssa.sadb_sa_spi, +@@ -1319,12 +1328,13 @@ + ssa.sadb_sa_flags = 0; + #ifdef SADB_X_SAFLAGS_TUNNEL + if (iproto->encap_mode == IPSEC_ENCAP_TUNNEL || +- iproto->encap_mode == IPSEC_ENCAP_UDP_ENCAP_TUNNEL) ++ iproto->encap_mode == IPSEC_ENCAP_UDP_ENCAP_TUNNEL || ++ iproto->encap_mode == IPSEC_ENCAP_UDP_ENCAP_TUNNEL_DRAFT) + ssa.sadb_sa_flags = SADB_X_SAFLAGS_TUNNEL; + #endif + +-#if defined (USE_NAT_TRAVERSAL) && defined (SADB_X_EXT_UDPENCAP) + if (isakmp_sa->flags & SA_FLAG_NAT_T_ENABLE) { ++#if defined (USE_NAT_TRAVERSAL) && defined (SADB_X_EXT_UDPENCAP) + memset(&udpencap, 0, sizeof udpencap); + ssa.sadb_sa_flags |= SADB_X_SAFLAGS_UDPENCAP; + udpencap.sadb_x_udpencap_exttype = SADB_X_EXT_UDPENCAP; +@@ -1334,8 +1344,40 @@ + if (pf_key_v2_msg_add(update, (struct sadb_ext *)&udpencap, 0) + == -1) + goto cleanup; +- } ++#elif defined (USE_NAT_TRAVERSAL) && defined (SADB_X_EXT_NAT_T_TYPE) ++#ifndef UDP_ENCAP_ESPINUDP ++#define UDP_ENCAP_ESPINUDP 2 ++#endif ++ memset(&nat_t_type, 0, sizeof nat_t_type); ++ memset(&nat_t_sport, 0, sizeof nat_t_sport); ++ memset(&nat_t_dport, 0, sizeof nat_t_dport); ++ ++ /* type = draft-udp-encap-06 */ ++ nat_t_type.sadb_x_nat_t_type_len = sizeof nat_t_type / PF_KEY_V2_CHUNK; ++ nat_t_type.sadb_x_nat_t_type_exttype = SADB_X_EXT_NAT_T_TYPE; ++ nat_t_type.sadb_x_nat_t_type_type = UDP_ENCAP_ESPINUDP; ++ if(pf_key_v2_msg_add(update, (struct sadb_ext *)&nat_t_type, 0) == -1) ++ goto cleanup; ++ ++ /* source port */ ++ nat_t_sport.sadb_x_nat_t_port_len = sizeof nat_t_sport / ++ PF_KEY_V2_CHUNK; ++ nat_t_sport.sadb_x_nat_t_port_exttype = SADB_X_EXT_NAT_T_SPORT; ++ nat_t_sport.sadb_x_nat_t_port_port = sockaddr_port(src); ++ if(pf_key_v2_msg_add(update, (struct sadb_ext *)&nat_t_sport, 0) == -1) ++ goto cleanup; ++ ++ /* destination port */ ++ nat_t_dport.sadb_x_nat_t_port_len = sizeof nat_t_dport / ++ PF_KEY_V2_CHUNK; ++ nat_t_dport.sadb_x_nat_t_port_exttype = SADB_X_EXT_NAT_T_DPORT; ++ nat_t_dport.sadb_x_nat_t_port_port = sockaddr_port(dst); ++ if(pf_key_v2_msg_add(update, (struct sadb_ext *)&nat_t_dport, 0) == -1) ++ goto cleanup; ++ ++ /* original address (transport mode checksum missing info) goes here */ + #endif ++ } + + if (pf_key_v2_msg_add(update, (struct sadb_ext *)&ssa, 0) == -1) + goto cleanup; +@@ -1395,10 +1437,6 @@ + /* + * Setup the ADDRESS extensions. + */ +- if (incoming) +- sa->transport->vtbl->get_dst(sa->transport, &src); +- else +- sa->transport->vtbl->get_src(sa->transport, &src); + len = sizeof *addr + PF_KEY_V2_ROUND(sysdep_sa_len(src)); + addr = calloc(1, len); + if (!addr) +@@ -2167,7 +2205,7 @@ + pf_key_v2_msg_free(ret); + return -1; + +-#elif defined (SADB_X_SPDADD) && defined (SADB_X_SPDDELETE) ++#elif defined (SADB_X_SPDUPDATE) && defined (SADB_X_SPDDELETE) + struct sadb_msg msg; + struct sadb_x_policy *policy = 0; + struct sadb_x_ipsecrequest *ipsecrequest; +@@ -2181,7 +2219,7 @@ + struct sockaddr_in *ip4_sa; + struct sockaddr_in6 *ip6_sa; + +- msg.sadb_msg_type = delete ? SADB_X_SPDDELETE : SADB_X_SPDADD; ++ msg.sadb_msg_type = delete ? SADB_X_SPDDELETE : SADB_X_SPDUPDATE; + msg.sadb_msg_satype = SADB_SATYPE_UNSPEC; + msg.sadb_msg_seq = 0; + flow = pf_key_v2_msg_new(&msg, 0); +Index: isakmpd-20041012.orig/isakmp_num.cst +=================================================================== +--- isakmpd-20041012.orig.orig/isakmp_num.cst 2007-06-04 13:22:39.143904504 +0200 ++++ isakmpd-20041012.orig/isakmp_num.cst 2007-06-04 13:22:39.287882616 +0200 +@@ -57,15 +57,18 @@ + KD 17 # RFC 3547, Key Download + SEQ 18 # RFC 3547, Sequence Number + POP 19 # RFC 3547, Proof of possession +- RESERVED_MIN 20 ++ NAT_D 20 # RFC 3947, NAT Discovery payload ++ NAT_OA 21 # RFC 3947, NAT Original Address payload ++ RESERVED_MIN 22 + RESERVED_MAX 127 + PRIVATE_MIN 128 + # XXX values from draft-ietf-ipsec-nat-t-ike-01,02,03. Later drafts specify + # XXX NAT_D as payload 15 and NAT_OA as 16, but these are allocated by RFC + # XXX 3547 as seen above. +- NAT_D 130 # NAT Discovery payload +- NAT_OA 131 # NAT Original Address payload ++ NAT_D_DRAFT 130 # NAT Discovery payload ++ NAT_OA_DRAFT 131 # NAT Original Address payload + PRIVATE_MAX 255 ++ MAX 255 + . + + # ISAKMP exchange types. +Index: isakmpd-20041012.orig/ipsec_num.cst +=================================================================== +--- isakmpd-20041012.orig.orig/ipsec_num.cst 2007-06-04 13:22:39.149903592 +0200 ++++ isakmpd-20041012.orig/ipsec_num.cst 2007-06-04 13:22:39.287882616 +0200 +@@ -62,10 +62,10 @@ + IPSEC_ENCAP + TUNNEL 1 + TRANSPORT 2 +- FUTURE_UDP_ENCAP_TUNNEL 3 # XXX Not yet assigned +- FUTURE_UDP_ENCAP_TRANSPORT 4 # XXX Not yet assigned +- UDP_ENCAP_TUNNEL 61443 # draft-ietf-ipsec-nat-t-ike +- UDP_ENCAP_TRANSPORT 61443 # draft-ietf-ipsec-nat-t-ike ++ UDP_ENCAP_TUNNEL 3 ++ UDP_ENCAP_TRANSPORT 4 ++ UDP_ENCAP_TUNNEL_DRAFT 61443 # draft-ietf-ipsec-nat-t-ike ++ UDP_ENCAP_TRANSPORT_DRAFT 61443 # draft-ietf-ipsec-nat-t-ike + . + + # IPSEC authentication algorithm. +Index: isakmpd-20041012.orig/nat_traversal.h +=================================================================== +--- isakmpd-20041012.orig.orig/nat_traversal.h 2007-06-04 13:22:39.154902832 +0200 ++++ isakmpd-20041012.orig/nat_traversal.h 2007-06-04 13:22:39.287882616 +0200 +@@ -1,4 +1,4 @@ +-/* $OpenBSD: nat_traversal.h,v 1.2 2004/06/21 23:27:10 ho Exp $ */ ++/* $OpenBSD: nat_traversal.h,v 1.4 2005/07/25 15:03:47 hshoexer Exp $ */ + + /* + * Copyright (c) 2004 Håkan Olsson. All rights reserved. +@@ -27,6 +27,24 @@ + #ifndef _NAT_TRAVERSAL_H_ + #define _NAT_TRAVERSAL_H_ + ++#define VID_DRAFT_V2 0 ++#define VID_DRAFT_V2_N 1 ++#define VID_DRAFT_V3 2 ++#define VID_RFC3947 3 ++ ++struct nat_t_cap { ++ int id; ++ u_int32_t flags; ++ const char *text; ++ char *hash; ++ size_t hashsize; ++}; ++ ++/* ++ * Set if -T is given on the command line to disable NAT-T support. ++ */ ++extern int disable_nat_t; ++ + void nat_t_init(void); + int nat_t_add_vendor_payloads(struct message *); + void nat_t_check_vendor_payload(struct message *, struct payload *); +Index: isakmpd-20041012.orig/message.c +=================================================================== +--- isakmpd-20041012.orig.orig/message.c 2007-06-04 13:22:39.160901920 +0200 ++++ isakmpd-20041012.orig/message.c 2007-06-04 13:22:39.288882464 +0200 +@@ -112,6 +112,7 @@ + message_validate_hash, message_validate_sig, message_validate_nonce, + message_validate_notify, message_validate_delete, + message_validate_vendor, message_validate_attribute, ++ message_validate_nat_d, message_validate_nat_oa, + message_validate_nat_d, message_validate_nat_oa + }; + +@@ -120,7 +121,7 @@ + isakmp_id_fld, isakmp_cert_fld, isakmp_certreq_fld, isakmp_hash_fld, + isakmp_sig_fld, isakmp_nonce_fld, isakmp_notify_fld, isakmp_delete_fld, + isakmp_vendor_fld, isakmp_attribute_fld, isakmp_nat_d_fld, +- isakmp_nat_oa_fld ++ isakmp_nat_oa_fld, isakmp_nat_d_fld, isakmp_nat_oa_fld + }; + + /* +@@ -138,7 +139,8 @@ + ISAKMP_PAYLOAD_SAK, ISAKMP_PAYLOAD_SAT, ISAKMP_PAYLOAD_KD, + ISAKMP_PAYLOAD_SEQ, ISAKMP_PAYLOAD_POP + #endif +- ISAKMP_PAYLOAD_NAT_D, ISAKMP_PAYLOAD_NAT_OA ++ ISAKMP_PAYLOAD_NAT_D, ISAKMP_PAYLOAD_NAT_OA, ++ ISAKMP_PAYLOAD_NAT_D_DRAFT, ISAKMP_PAYLOAD_NAT_OA_DRAFT + }; + + static u_int8_t payload_map[256]; +@@ -347,8 +349,8 @@ + } + /* Ignore most private payloads. */ + if (next >= ISAKMP_PAYLOAD_PRIVATE_MIN && +- next != ISAKMP_PAYLOAD_NAT_D && +- next != ISAKMP_PAYLOAD_NAT_OA) { ++ next != ISAKMP_PAYLOAD_NAT_D_DRAFT && ++ next != ISAKMP_PAYLOAD_NAT_OA_DRAFT) { + LOG_DBG((LOG_MESSAGE, 30, "message_parse_payloads: " + "private next payload type %s in payload of " + "type %d ignored", +@@ -460,8 +462,10 @@ + return ISAKMP_ATTRIBUTE_SZ; + #if defined (USE_NAT_TRAVERSAL) + case ISAKMP_PAYLOAD_NAT_D: ++ case ISAKMP_PAYLOAD_NAT_D_DRAFT: + return ISAKMP_NAT_D_SZ; + case ISAKMP_PAYLOAD_NAT_OA: ++ case ISAKMP_PAYLOAD_NAT_OA_DRAFT: + return ISAKMP_NAT_OA_SZ; + #endif + /* Not yet supported and any other unknown payloads. */ +Index: isakmpd-20041012.orig/policy.c +=================================================================== +--- isakmpd-20041012.orig.orig/policy.c 2007-06-04 13:22:39.165901160 +0200 ++++ isakmpd-20041012.orig/policy.c 2007-06-04 13:22:39.289882312 +0200 +@@ -511,7 +511,10 @@ + break; + } + #if defined (USE_NAT_TRAVERSAL) +- else if (decode_16(value) == IPSEC_ENCAP_UDP_ENCAP_TUNNEL) ++ else if (decode_16(value) == ++ IPSEC_ENCAP_UDP_ENCAP_TUNNEL || ++ decode_16(value) == ++ IPSEC_ENCAP_UDP_ENCAP_TUNNEL_DRAFT) + switch (proto->proto) { + case IPSEC_PROTO_IPSEC_AH: + ah_encapsulation = "udp-encap-tunnel"; +@@ -1932,7 +1935,7 @@ + void + policy_init(void) + { +- char *ptr, *policy_file; ++ char *ptr, *policy_file, *use_keynote; + char **asserts; + size_t sz, len; + int fd, i; +@@ -1940,10 +1943,11 @@ + LOG_DBG((LOG_POLICY, 30, "policy_init: initializing")); + + /* Do we want to use the policy modules? */ +- if (ignore_policy || +- strncmp("yes", conf_get_str("General", "Use-Keynote"), 3)) +- return; +- ++ use_keynote = conf_get_str("General", "Use-Keynote"); ++ if (ignore_policy || ++ (use_keynote && strncmp("yes", use_keynote, 3))) ++ return; ++ + /* Get policy file from configuration. */ + policy_file = conf_get_str("General", "Policy-file"); + if (!policy_file) +Index: isakmpd-20041012.orig/ike_phase_1.c +=================================================================== +--- isakmpd-20041012.orig.orig/ike_phase_1.c 2007-06-04 13:22:39.170900400 +0200 ++++ isakmpd-20041012.orig/ike_phase_1.c 2007-06-04 13:22:39.290882160 +0200 +@@ -1040,9 +1040,9 @@ + + /* Compare expected/desired and received remote ID */ + if (bcmp(rid, payload->p + ISAKMP_ID_DATA_OFF, sz)) { +- free(rid); + log_print("ike_phase_1_recv_ID: " +- "received remote ID other than expected %s", p); ++ "received remote ID other than expected %s - %s", p, payload->p); ++ free(rid); + return -1; + } + free(rid); +Index: isakmpd-20041012.orig/x509.c +=================================================================== +--- isakmpd-20041012.orig.orig/x509.c 2007-06-04 13:22:39.176899488 +0200 ++++ isakmpd-20041012.orig/x509.c 2007-06-04 13:22:39.290882160 +0200 +@@ -910,7 +910,11 @@ + X509_STORE_CTX_init(&csc, x509_cas, cert, NULL); + #if OPENSSL_VERSION_NUMBER >= 0x00907000L + /* XXX See comment in x509_read_crls_from_dir. */ ++#if OPENSSL_VERSION_NUMBER >= 0x00908000L ++ if (x509_cas->param->flags & X509_V_FLAG_CRL_CHECK) { ++#else + if (x509_cas->flags & X509_V_FLAG_CRL_CHECK) { ++#endif + X509_STORE_CTX_set_flags(&csc, X509_V_FLAG_CRL_CHECK); + X509_STORE_CTX_set_flags(&csc, X509_V_FLAG_CRL_CHECK_ALL); + } +Index: isakmpd-20041012.orig/sysdep/linux/sysdep.c +=================================================================== +--- isakmpd-20041012.orig.orig/sysdep/linux/sysdep.c 2007-06-04 13:22:39.182898576 +0200 ++++ isakmpd-20041012.orig/sysdep/linux/sysdep.c 2007-06-04 13:22:39.291882008 +0200 +@@ -169,22 +169,22 @@ + return 0; + + if (!(af == AF_INET || af == AF_INET6)) +- { ++ { + log_print ("sysdep_cleartext: unsupported protocol family %d", af); + return -1; + } + + if (setsockopt (fd, af == AF_INET ? IPPROTO_IP : IPPROTO_IPV6, +- af == AF_INET ? IP_IPSEC_POLICY : IPV6_IPSEC_POLICY, +- &pol_in, sizeof pol_in) < 0 || ++ af == AF_INET ? IP_IPSEC_POLICY : IPV6_IPSEC_POLICY, ++ &pol_in, sizeof pol_in) < 0 || + setsockopt (fd, af == AF_INET ? IPPROTO_IP : IPPROTO_IPV6, +- af == AF_INET ? IP_IPSEC_POLICY : IPV6_IPSEC_POLICY, +- &pol_out, sizeof pol_out) < 0) +- { ++ af == AF_INET ? IP_IPSEC_POLICY : IPV6_IPSEC_POLICY, ++ &pol_out, sizeof pol_out) < 0) ++ { + log_error ("sysdep_cleartext: " +- "setsockopt (%d, IPPROTO_IP%s, IP%s_IPSEC_POLICY, ...) " +- "failed", fd, af == AF_INET ? "" : "V6", +- af == AF_INET ? "" : "V6"); ++ "setsockopt (%d, IPPROTO_IP%s, IP%s_IPSEC_POLICY, ...) " ++ "failed", fd, af == AF_INET ? "" : "V6", ++ af == AF_INET ? "" : "V6"); + return -1; + } + return 0; +Index: isakmpd-20041012.orig/sysdep/linux/GNUmakefile.sysdep +=================================================================== +--- isakmpd-20041012.orig.orig/sysdep/linux/GNUmakefile.sysdep 2007-06-04 13:22:39.187897816 +0200 ++++ isakmpd-20041012.orig/sysdep/linux/GNUmakefile.sysdep 2007-06-04 13:22:39.291882008 +0200 +@@ -33,13 +33,13 @@ + LDADD+= -lgmp ${LIBSYSDEP} ${LIBCRYPTO} + DPADD+= ${LIBGMP} ${LIBSYSDEP} + +-CFLAGS+= -DUSE_OLD_SOCKADDR -DHAVE_PCAP \ +- -DNEED_SYSDEP_APP -DMP_FLAVOUR=MP_FLAVOUR_GMP \ +- -I/usr/src/linux/include -I${.CURDIR}/sysdep/common \ ++CFLAGS+= -DHAVE_GETNAMEINFO -DUSE_OLD_SOCKADDR -DHAVE_PCAP \ ++ -DNEED_SYSDEP_APP -DMP_FLAVOUR=MP_FLAVOUR_GMP -DUSE_AES \ ++ -I${.CURDIR}/sysdep/linux/include -I${.CURDIR}/sysdep/common \ + -I/usr/include/openssl + + FEATURES= debug tripledes blowfish cast ec aggressive x509 policy +-FEATURES+= des aes ++FEATURES+= dpd nat_traversal isakmp_cfg des aes + + IPSEC_SRCS= pf_key_v2.c + IPSEC_CFLAGS= -DUSE_PF_KEY_V2 +@@ -51,7 +51,7 @@ + # hack libsysdep.a dependenc + ${LIBSYSDEPDIR}/.depend ${LIBSYSDEP}: + cd ${LIBSYSDEPDIR} && \ +- ${MAKE} --no-print-directory ${MAKEFLAGS} \ ++ ${MAKE} --no-print-directory \ + CFLAGS="${CFLAGS}" MKDEP="${MKDEP}" ${MAKECMDGOALS} + + ifeq ($(findstring clean,$(MAKECMDGOALS)),clean) +Index: isakmpd-20041012.orig/sysdep/linux/include/bitstring.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ isakmpd-20041012.orig/sysdep/linux/include/bitstring.h 2007-06-04 13:22:39.291882008 +0200 +@@ -0,0 +1,132 @@ ++/* $OpenBSD: bitstring.h,v 1.4 2002/06/19 02:50:10 millert Exp $ */ ++/* $NetBSD: bitstring.h,v 1.5 1997/05/14 15:49:55 pk 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 ++ * Paul Vixie. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. All advertising materials mentioning features or use of this software ++ * must display the following acknowledgement: ++ * This product includes software developed by the University of ++ * California, Berkeley and its contributors. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ++ * @(#)bitstring.h 8.1 (Berkeley) 7/19/93 ++ */ ++ ++#ifndef _BITSTRING_H_ ++#define _BITSTRING_H_ ++ ++/* modified for SV/AT and bitstring bugfix by M.R.Murphy, 11oct91 ++ * bitstr_size changed gratuitously, but shorter ++ * bit_alloc spelling error fixed ++ * the following were efficient, but didn't work, they've been made to ++ * work, but are no longer as efficient :-) ++ * bit_nclear, bit_nset, bit_ffc, bit_ffs ++ */ ++typedef unsigned char bitstr_t; ++ ++/* internal macros */ ++ /* byte of the bitstring bit is in */ ++#define _bit_byte(bit) \ ++ ((bit) >> 3) ++ ++ /* mask for the bit within its byte */ ++#define _bit_mask(bit) \ ++ (1 << ((bit)&0x7)) ++ ++/* external macros */ ++ /* bytes in a bitstring of nbits bits */ ++#define bitstr_size(nbits) \ ++ (((nbits) + 7) >> 3) ++ ++ /* allocate a bitstring */ ++#define bit_alloc(nbits) \ ++ (bitstr_t *)calloc((size_t)bitstr_size(nbits), sizeof(bitstr_t)) ++ ++ /* allocate a bitstring on the stack */ ++#define bit_decl(name, nbits) \ ++ ((name)[bitstr_size(nbits)]) ++ ++ /* is bit N of bitstring name set? */ ++#define bit_test(name, bit) \ ++ ((name)[_bit_byte(bit)] & _bit_mask(bit)) ++ ++ /* set bit N of bitstring name */ ++#define bit_set(name, bit) \ ++ ((name)[_bit_byte(bit)] |= _bit_mask(bit)) ++ ++ /* clear bit N of bitstring name */ ++#define bit_clear(name, bit) \ ++ ((name)[_bit_byte(bit)] &= ~_bit_mask(bit)) ++ ++ /* clear bits start ... stop in bitstring */ ++#define bit_nclear(name, start, stop) do { \ ++ register bitstr_t *_name = name; \ ++ register int _start = start, _stop = stop; \ ++ while (_start <= _stop) { \ ++ bit_clear(_name, _start); \ ++ _start++; \ ++ } \ ++} while(0) ++ ++ /* set bits start ... stop in bitstring */ ++#define bit_nset(name, start, stop) do { \ ++ register bitstr_t *_name = name; \ ++ register int _start = start, _stop = stop; \ ++ while (_start <= _stop) { \ ++ bit_set(_name, _start); \ ++ _start++; \ ++ } \ ++} while(0) ++ ++ /* find first bit clear in name */ ++#define bit_ffc(name, nbits, value) do { \ ++ register bitstr_t *_name = name; \ ++ register int _bit, _nbits = nbits, _value = -1; \ ++ for (_bit = 0; _bit < _nbits; ++_bit) \ ++ if (!bit_test(_name, _bit)) { \ ++ _value = _bit; \ ++ break; \ ++ } \ ++ *(value) = _value; \ ++} while(0) ++ ++ /* find first bit set in name */ ++#define bit_ffs(name, nbits, value) do { \ ++ register bitstr_t *_name = name; \ ++ register int _bit, _nbits = nbits, _value = -1; \ ++ for (_bit = 0; _bit < _nbits; ++_bit) \ ++ if (bit_test(_name, _bit)) { \ ++ _value = _bit; \ ++ break; \ ++ } \ ++ *(value) = _value; \ ++} while(0) ++ ++#endif /* !_BITSTRING_H_ */ +Index: isakmpd-20041012.orig/sysdep/linux/include/sys/queue.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ isakmpd-20041012.orig/sysdep/linux/include/sys/queue.h 2007-06-04 13:22:39.292881856 +0200 +@@ -0,0 +1,453 @@ ++/* ++ * Copyright (c) 1991, 1993 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. All advertising materials mentioning features or use of this software ++ * must display the following acknowledgement: ++ * This product includes software developed by the University of ++ * California, Berkeley and its contributors. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ++ * @(#)queue.h 8.5 (Berkeley) 8/20/94 ++ * $FreeBSD: src/sys/sys/queue.h,v 1.45 2001/12/11 11:49:58 sheldonh Exp $ ++ */ ++ ++#ifndef _SYS_QUEUE_H_ ++#define _SYS_QUEUE_H_ ++ ++//#include /* for __offsetof */ ++ ++/* ++ * This file defines four types of data structures: singly-linked lists, ++ * singly-linked tail queues, lists and tail queues. ++ * ++ * A singly-linked list is headed by a single forward pointer. The elements ++ * are singly linked for minimum space and pointer manipulation overhead at ++ * the expense of O(n) removal for arbitrary elements. New elements can be ++ * added to the list after an existing element or at the head of the list. ++ * Elements being removed from the head of the list should use the explicit ++ * macro for this purpose for optimum efficiency. A singly-linked list may ++ * only be traversed in the forward direction. Singly-linked lists are ideal ++ * for applications with large datasets and few or no removals or for ++ * implementing a LIFO queue. ++ * ++ * A singly-linked tail queue is headed by a pair of pointers, one to the ++ * head of the list and the other to the tail of the list. The elements are ++ * singly linked for minimum space and pointer manipulation overhead at the ++ * expense of O(n) removal for arbitrary elements. New elements can be added ++ * to the list after an existing element, at the head of the list, or at the ++ * end of the list. Elements being removed from the head of the tail queue ++ * should use the explicit macro for this purpose for optimum efficiency. ++ * A singly-linked tail queue may only be traversed in the forward direction. ++ * Singly-linked tail queues are ideal for applications with large datasets ++ * and few or no removals or for implementing a FIFO queue. ++ * ++ * A list is headed by a single forward pointer (or an array of forward ++ * pointers for a hash table header). The elements are doubly linked ++ * so that an arbitrary element can be removed without a need to ++ * traverse the list. New elements can be added to the list before ++ * or after an existing element or at the head of the list. A list ++ * may only be traversed in the forward direction. ++ * ++ * A tail queue is headed by a pair of pointers, one to the head of the ++ * list and the other to the tail of the list. The elements are doubly ++ * linked so that an arbitrary element can be removed without a need to ++ * traverse the list. New elements can be added to the list before or ++ * after an existing element, at the head of the list, or at the end of ++ * the list. A tail queue may be traversed in either direction. ++ * ++ * For details on the use of these macros, see the queue(3) manual page. ++ * ++ * ++ * SLIST LIST STAILQ TAILQ ++ * _HEAD + + + + ++ * _HEAD_INITIALIZER + + + + ++ * _ENTRY + + + + ++ * _INIT + + + + ++ * _EMPTY + + + + ++ * _FIRST + + + + ++ * _NEXT + + + + ++ * _PREV - - - + ++ * _LAST - - + + ++ * _FOREACH + + + + ++ * _FOREACH_REVERSE - - - + ++ * _INSERT_HEAD + + + + ++ * _INSERT_BEFORE - + - + ++ * _INSERT_AFTER + + + + ++ * _INSERT_TAIL - - + + ++ * _REMOVE_HEAD + - + - ++ * _REMOVE + + + + ++ * ++ */ ++ ++/* ++ * Singly-linked List declarations. ++ */ ++#define SLIST_HEAD(name, type) \ ++struct name { \ ++ struct type *slh_first; /* first element */ \ ++} ++ ++#define SLIST_HEAD_INITIALIZER(head) \ ++ { NULL } ++ ++#define SLIST_ENTRY(type) \ ++struct { \ ++ struct type *sle_next; /* next element */ \ ++} ++ ++/* ++ * Singly-linked List functions. ++ */ ++#define SLIST_EMPTY(head) ((head)->slh_first == NULL) ++ ++#define SLIST_FIRST(head) ((head)->slh_first) ++ ++#define SLIST_FOREACH(var, head, field) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var); \ ++ (var) = SLIST_NEXT((var), field)) ++ ++#define SLIST_INIT(head) do { \ ++ SLIST_FIRST((head)) = NULL; \ ++} while (0) ++ ++#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ ++ SLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field); \ ++ SLIST_NEXT((slistelm), field) = (elm); \ ++} while (0) ++ ++#define SLIST_INSERT_HEAD(head, elm, field) do { \ ++ SLIST_NEXT((elm), field) = SLIST_FIRST((head)); \ ++ SLIST_FIRST((head)) = (elm); \ ++} while (0) ++ ++#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) ++ ++#define SLIST_REMOVE(head, elm, type, field) do { \ ++ if (SLIST_FIRST((head)) == (elm)) { \ ++ SLIST_REMOVE_HEAD((head), field); \ ++ } \ ++ else { \ ++ struct type *curelm = SLIST_FIRST((head)); \ ++ while (SLIST_NEXT(curelm, field) != (elm)) \ ++ curelm = SLIST_NEXT(curelm, field); \ ++ SLIST_NEXT(curelm, field) = \ ++ SLIST_NEXT(SLIST_NEXT(curelm, field), field); \ ++ } \ ++} while (0) ++ ++#define SLIST_REMOVE_HEAD(head, field) do { \ ++ SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \ ++} while (0) ++ ++/* ++ * Singly-linked Tail queue declarations. ++ */ ++#define STAILQ_HEAD(name, type) \ ++struct name { \ ++ struct type *stqh_first;/* first element */ \ ++ struct type **stqh_last;/* addr of last next element */ \ ++} ++ ++#define STAILQ_HEAD_INITIALIZER(head) \ ++ { NULL, &(head).stqh_first } ++ ++#define STAILQ_ENTRY(type) \ ++struct { \ ++ struct type *stqe_next; /* next element */ \ ++} ++ ++/* ++ * Singly-linked Tail queue functions. ++ */ ++#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) ++ ++#define STAILQ_FIRST(head) ((head)->stqh_first) ++ ++#define STAILQ_FOREACH(var, head, field) \ ++ for((var) = STAILQ_FIRST((head)); \ ++ (var); \ ++ (var) = STAILQ_NEXT((var), field)) ++ ++#define STAILQ_INIT(head) do { \ ++ STAILQ_FIRST((head)) = NULL; \ ++ (head)->stqh_last = &STAILQ_FIRST((head)); \ ++} while (0) ++ ++#define STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \ ++ if ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\ ++ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ ++ STAILQ_NEXT((tqelm), field) = (elm); \ ++} while (0) ++ ++#define STAILQ_INSERT_HEAD(head, elm, field) do { \ ++ if ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL) \ ++ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ ++ STAILQ_FIRST((head)) = (elm); \ ++} while (0) ++ ++#define STAILQ_INSERT_TAIL(head, elm, field) do { \ ++ STAILQ_NEXT((elm), field) = NULL; \ ++ *(head)->stqh_last = (elm); \ ++ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ ++} while (0) ++ ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY(head) ? \ ++ NULL : \ ++ ((struct type *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ ++#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) ++ ++#define STAILQ_REMOVE(head, elm, type, field) do { \ ++ if (STAILQ_FIRST((head)) == (elm)) { \ ++ STAILQ_REMOVE_HEAD(head, field); \ ++ } \ ++ else { \ ++ struct type *curelm = STAILQ_FIRST((head)); \ ++ while (STAILQ_NEXT(curelm, field) != (elm)) \ ++ curelm = STAILQ_NEXT(curelm, field); \ ++ if ((STAILQ_NEXT(curelm, field) = \ ++ STAILQ_NEXT(STAILQ_NEXT(curelm, field), field)) == NULL)\ ++ (head)->stqh_last = &STAILQ_NEXT((curelm), field);\ ++ } \ ++} while (0) ++ ++#define STAILQ_REMOVE_HEAD(head, field) do { \ ++ if ((STAILQ_FIRST((head)) = \ ++ STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL) \ ++ (head)->stqh_last = &STAILQ_FIRST((head)); \ ++} while (0) ++ ++#define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do { \ ++ if ((STAILQ_FIRST((head)) = STAILQ_NEXT((elm), field)) == NULL) \ ++ (head)->stqh_last = &STAILQ_FIRST((head)); \ ++} while (0) ++ ++/* ++ * List declarations. ++ */ ++#define LIST_HEAD(name, type) \ ++struct name { \ ++ struct type *lh_first; /* first element */ \ ++} ++ ++#define LIST_HEAD_INITIALIZER(head) \ ++ { NULL } ++ ++#define LIST_ENTRY(type) \ ++struct { \ ++ struct type *le_next; /* next element */ \ ++ struct type **le_prev; /* address of previous next element */ \ ++} ++ ++/* ++ * List functions. ++ */ ++ ++#define LIST_EMPTY(head) ((head)->lh_first == NULL) ++ ++#define LIST_FIRST(head) ((head)->lh_first) ++ ++#define LIST_FOREACH(var, head, field) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var); \ ++ (var) = LIST_NEXT((var), field)) ++ ++#define LIST_INIT(head) do { \ ++ LIST_FIRST((head)) = NULL; \ ++} while (0) ++ ++#define LIST_INSERT_AFTER(listelm, elm, field) do { \ ++ if ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\ ++ LIST_NEXT((listelm), field)->field.le_prev = \ ++ &LIST_NEXT((elm), field); \ ++ LIST_NEXT((listelm), field) = (elm); \ ++ (elm)->field.le_prev = &LIST_NEXT((listelm), field); \ ++} while (0) ++ ++#define LIST_INSERT_BEFORE(listelm, elm, field) do { \ ++ (elm)->field.le_prev = (listelm)->field.le_prev; \ ++ LIST_NEXT((elm), field) = (listelm); \ ++ *(listelm)->field.le_prev = (elm); \ ++ (listelm)->field.le_prev = &LIST_NEXT((elm), field); \ ++} while (0) ++ ++#define LIST_INSERT_HEAD(head, elm, field) do { \ ++ if ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL) \ ++ LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\ ++ LIST_FIRST((head)) = (elm); \ ++ (elm)->field.le_prev = &LIST_FIRST((head)); \ ++} while (0) ++ ++#define LIST_NEXT(elm, field) ((elm)->field.le_next) ++ ++#define LIST_REMOVE(elm, field) do { \ ++ if (LIST_NEXT((elm), field) != NULL) \ ++ LIST_NEXT((elm), field)->field.le_prev = \ ++ (elm)->field.le_prev; \ ++ *(elm)->field.le_prev = LIST_NEXT((elm), field); \ ++} while (0) ++ ++/* ++ * Tail queue declarations. ++ */ ++#define TAILQ_HEAD(name, type) \ ++struct name { \ ++ struct type *tqh_first; /* first element */ \ ++ struct type **tqh_last; /* addr of last next element */ \ ++} ++ ++#define TAILQ_HEAD_INITIALIZER(head) \ ++ { NULL, &(head).tqh_first } ++ ++#define TAILQ_ENTRY(type) \ ++struct { \ ++ struct type *tqe_next; /* next element */ \ ++ struct type **tqe_prev; /* address of previous next element */ \ ++} ++ ++/* ++ * Tail queue functions. ++ */ ++#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) ++ ++#define TAILQ_FIRST(head) ((head)->tqh_first) ++ ++#define TAILQ_FOREACH(var, head, field) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var); \ ++ (var) = TAILQ_NEXT((var), field)) ++ ++#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var); \ ++ (var) = TAILQ_PREV((var), headname, field)) ++ ++#define TAILQ_INIT(head) do { \ ++ TAILQ_FIRST((head)) = NULL; \ ++ (head)->tqh_last = &TAILQ_FIRST((head)); \ ++} while (0) ++ ++#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ ++ if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\ ++ TAILQ_NEXT((elm), field)->field.tqe_prev = \ ++ &TAILQ_NEXT((elm), field); \ ++ else \ ++ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ ++ TAILQ_NEXT((listelm), field) = (elm); \ ++ (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \ ++} while (0) ++ ++#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ ++ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ ++ TAILQ_NEXT((elm), field) = (listelm); \ ++ *(listelm)->field.tqe_prev = (elm); \ ++ (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \ ++} while (0) ++ ++#define TAILQ_INSERT_HEAD(head, elm, field) do { \ ++ if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL) \ ++ TAILQ_FIRST((head))->field.tqe_prev = \ ++ &TAILQ_NEXT((elm), field); \ ++ else \ ++ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ ++ TAILQ_FIRST((head)) = (elm); \ ++ (elm)->field.tqe_prev = &TAILQ_FIRST((head)); \ ++} while (0) ++ ++#define TAILQ_INSERT_TAIL(head, elm, field) do { \ ++ TAILQ_NEXT((elm), field) = NULL; \ ++ (elm)->field.tqe_prev = (head)->tqh_last; \ ++ *(head)->tqh_last = (elm); \ ++ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ ++} while (0) ++ ++#define TAILQ_LAST(head, headname) \ ++ (*(((struct headname *)((head)->tqh_last))->tqh_last)) ++ ++#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) ++ ++#define TAILQ_PREV(elm, headname, field) \ ++ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) ++ ++#define TAILQ_REMOVE(head, elm, field) do { \ ++ if ((TAILQ_NEXT((elm), field)) != NULL) \ ++ TAILQ_NEXT((elm), field)->field.tqe_prev = \ ++ (elm)->field.tqe_prev; \ ++ else \ ++ (head)->tqh_last = (elm)->field.tqe_prev; \ ++ *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \ ++} while (0) ++ ++ ++#ifdef _KERNEL ++ ++/* ++ * XXX insque() and remque() are an old way of handling certain queues. ++ * They bogusly assumes that all queue heads look alike. ++ */ ++ ++struct quehead { ++ struct quehead *qh_link; ++ struct quehead *qh_rlink; ++}; ++ ++#ifdef __GNUC__ ++ ++static __inline void ++insque(void *a, void *b) ++{ ++ struct quehead *element = (struct quehead *)a, ++ *head = (struct quehead *)b; ++ ++ element->qh_link = head->qh_link; ++ element->qh_rlink = head; ++ head->qh_link = element; ++ element->qh_link->qh_rlink = element; ++} ++ ++static __inline void ++remque(void *a) ++{ ++ struct quehead *element = (struct quehead *)a; ++ ++ element->qh_link->qh_rlink = element->qh_rlink; ++ element->qh_rlink->qh_link = element->qh_link; ++ element->qh_rlink = 0; ++} ++ ++#else /* !__GNUC__ */ ++ ++void insque __P((void *a, void *b)); ++void remque __P((void *a)); ++ ++#endif /* __GNUC__ */ ++ ++#endif /* _KERNEL */ ++ ++#endif /* !_SYS_QUEUE_H_ */ +Index: isakmpd-20041012.orig/sysdep/common/pcap.h +=================================================================== +--- isakmpd-20041012.orig.orig/sysdep/common/pcap.h 2007-06-04 13:22:39.203895384 +0200 ++++ isakmpd-20041012.orig/sysdep/common/pcap.h 2007-06-04 13:22:39.292881856 +0200 +@@ -55,8 +55,13 @@ + u_int32_t linktype; /* data link type (DLT_*) */ + }; + ++struct pcap_timeval { ++ int32_t tv_sec; /* seconds */ ++ int32_t tv_usec; /* microseconds */ ++}; ++ + struct pcap_pkthdr { +- struct timeval ts; /* time stamp */ ++ struct pcap_timeval ts; /* time stamp */ + u_int32_t caplen; /* length of portion present */ + u_int32_t len; /* length this packet (off wire) */ + }; +Index: isakmpd-20041012.orig/sysdep/common/libsysdep/arc4random.c +=================================================================== +--- isakmpd-20041012.orig.orig/sysdep/common/libsysdep/arc4random.c 2007-06-04 13:22:39.211894168 +0200 ++++ isakmpd-20041012.orig/sysdep/common/libsysdep/arc4random.c 2007-06-04 13:22:39.292881856 +0200 +@@ -78,7 +78,7 @@ + static void + arc4_stir(struct arc4_stream *as) + { +- int fd; ++ int fd, i; + struct { + struct timeval tv; + u_int8_t rnd[128 - sizeof(struct timeval)]; +Index: isakmpd-20041012.orig/x509v3.cnf +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ isakmpd-20041012.orig/x509v3.cnf 2007-06-04 13:22:39.293881704 +0200 +@@ -0,0 +1,26 @@ ++# default settings ++CERTPATHLEN = 1 ++CERTUSAGE = digitalSignature,keyCertSign ++CERTIP = 0.0.0.0 ++CERTFQDN = nohost.nodomain ++ ++# This section should be referenced when building an x509v3 CA ++# Certificate. ++# The default path length and the key usage can be overriden ++# modified by setting the CERTPATHLEN and CERTUSAGE environment ++# variables. ++[x509v3_CA] ++basicConstraints=critical,CA:true,pathlen:$ENV::CERTPATHLEN ++keyUsage=$ENV::CERTUSAGE ++ ++# This section should be referenced to add an IP Address ++# as an alternate subject name, needed by isakmpd ++# The address must be provided in the CERTIP environment variable ++[x509v3_IPAddr] ++subjectAltName=IP:$ENV::CERTIP ++ ++# This section should be referenced to add a FQDN hostname ++# as an alternate subject name, needed by isakmpd ++# The address must be provided in the CERTFQDN environment variable ++[x509v3_FQDN] ++subjectAltName=DNS:$ENV::CERTFQDN diff --git a/net/isakmpd/patches/020-standardize.patch b/net/isakmpd/patches/020-standardize.patch new file mode 100644 index 0000000..435782b --- /dev/null +++ b/net/isakmpd/patches/020-standardize.patch @@ -0,0 +1,154 @@ +Index: isakmpd-20041012.orig/GNUmakefile +=================================================================== +--- isakmpd-20041012.orig.orig/GNUmakefile 2007-06-04 13:22:39.283883224 +0200 ++++ isakmpd-20041012.orig/GNUmakefile 2007-06-04 13:22:39.722816496 +0200 +@@ -168,7 +168,6 @@ + X509= x509.c + CFLAGS+= -DUSE_LIBCRYPTO + LDADD+= -lcrypto +-DPADD+= ${LIBCRYPTO} + endif + + ifdef USE_RAWKEY +@@ -242,3 +241,16 @@ + + realcleandepend: + rm -f .depend tags ++ ++# Install rules ++install: install-bin install-man ++ ++install-bin: isakmpd ++ -mkdir -p $(DESTDIR)$(BINDIR) ++ $(INSTALL) $(INSTALL_OPTS) -m 755 isakmpd $(DESTDIR)$(BINDIR) ++ ++install-man: ++ -mkdir -p $(DESTDIR)$(MANDIR)/man8 ++ $(INSTALL) $(INSTALL_OPTS) -m 444 isakmpd.8 $(DESTDIR)$(MANDIR)/man8 ++ -mkdir -p $(DESTDIR)$(MANDIR)/man5 ++ $(INSTALL) $(INSTALL_OPTS) -m 444 isakmpd.conf.5 isakmpd.policy.5 $(DESTDIR)$(MANDIR)/man5 +Index: isakmpd-20041012.orig/samples/Makefile +=================================================================== +--- isakmpd-20041012.orig.orig/samples/Makefile 2007-06-04 13:22:39.015923960 +0200 ++++ isakmpd-20041012.orig/samples/Makefile 2007-06-04 13:22:39.722816496 +0200 +@@ -26,7 +26,7 @@ + # + + FILES= VPN-* policy singlehost-* +-TARGETDIR= /usr/share/ipsec/isakmpd ++TARGETDIR= /usr/share/isakmpd/samples + + # The mkdir below is for installation on OpenBSD pre 2.7 + install: +Index: isakmpd-20041012.orig/sysdep/linux/GNUmakefile.sysdep +=================================================================== +--- isakmpd-20041012.orig.orig/sysdep/linux/GNUmakefile.sysdep 2007-06-04 13:22:39.291882008 +0200 ++++ isakmpd-20041012.orig/sysdep/linux/GNUmakefile.sysdep 2007-06-04 13:22:39.722816496 +0200 +@@ -25,18 +25,18 @@ + # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + +-LIBGMP:= /usr/lib/libgmp.a +-LIBCRYPTO:= /usr/lib/libcrypto.a ++LIBGMP:= ++LIBCRYPTO:= -lcrypto + LIBSYSDEPDIR:= ${.CURDIR}/sysdep/common/libsysdep + LIBSYSDEP:= ${LIBSYSDEPDIR}/libsysdep.a + +-LDADD+= -lgmp ${LIBSYSDEP} ${LIBCRYPTO} ++LDADD+= $(EXTRA_LDFLAGS) -lgmp ${LIBSYSDEP} ${LIBCRYPTO} + DPADD+= ${LIBGMP} ${LIBSYSDEP} + + CFLAGS+= -DHAVE_GETNAMEINFO -DUSE_OLD_SOCKADDR -DHAVE_PCAP \ + -DNEED_SYSDEP_APP -DMP_FLAVOUR=MP_FLAVOUR_GMP -DUSE_AES \ + -I${.CURDIR}/sysdep/linux/include -I${.CURDIR}/sysdep/common \ +- -I/usr/include/openssl ++ $(EXTRA_CPPFLAGS) + + FEATURES= debug tripledes blowfish cast ec aggressive x509 policy + FEATURES+= dpd nat_traversal isakmp_cfg des aes +Index: isakmpd-20041012.orig/Makefile +=================================================================== +--- isakmpd-20041012.orig.orig/Makefile 2007-06-04 13:22:39.028921984 +0200 ++++ isakmpd-20041012.orig/Makefile 2007-06-04 13:22:39.723816344 +0200 +@@ -147,7 +147,6 @@ + .ifdef USE_LIBCRYPTO + CFLAGS+= -DUSE_LIBCRYPTO + LDADD+= -lcrypto +-DPADD+= ${LIBCRYPTO} + .endif + + .ifdef USE_LIBDES +Index: isakmpd-20041012.orig/apps/certpatch/Makefile +=================================================================== +--- isakmpd-20041012.orig.orig/apps/certpatch/Makefile 2007-06-04 13:22:39.035920920 +0200 ++++ isakmpd-20041012.orig/apps/certpatch/Makefile 2007-06-04 13:22:39.723816344 +0200 +@@ -40,7 +40,6 @@ + .PATH: ${TOPSRC} ${TOPSRC}/sysdep/${OS} ${TOPOBJ} + CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/${OS} -I${TOPOBJ} -Wall + LDADD+= -lcrypto +-DPADD+= ${LIBCRYPTO} + MAN= certpatch.8 + + .if ${FEATURES:Mgmp} == "gmp" +Index: isakmpd-20041012.orig/regress/crypto/Makefile +=================================================================== +--- isakmpd-20041012.orig.orig/regress/crypto/Makefile 2007-06-04 13:22:39.041920008 +0200 ++++ isakmpd-20041012.orig/regress/crypto/Makefile 2007-06-04 13:22:39.723816344 +0200 +@@ -13,7 +13,7 @@ + -DUSE_TRIPLEDES -DUSE_CAST -DUSE_BLOWFISH -DUSE_DES \ + -DUSE_AES + LDADD+= -lcrypto -ldes +-DPADD+= ${LIBCRYPTO} ${LIBDES} ++DPADD+= ${LIBDES} + NOMAN= + DEBUG= -g + +Index: isakmpd-20041012.orig/regress/dh/Makefile +=================================================================== +--- isakmpd-20041012.orig.orig/regress/dh/Makefile 2007-06-04 13:22:39.048918944 +0200 ++++ isakmpd-20041012.orig/regress/dh/Makefile 2007-06-04 13:22:39.726815888 +0200 +@@ -15,7 +15,6 @@ + -DUSE_EC + NOMAN= + LDADD+= -lcrypto +-DPADD+= ${LIBCRYPTO} + DEBUG= -g + + .if ${FEATURES:Mgmp} == "gmp" +Index: isakmpd-20041012.orig/regress/group/Makefile +=================================================================== +--- isakmpd-20041012.orig.orig/regress/group/Makefile 2007-06-04 13:22:39.054918032 +0200 ++++ isakmpd-20041012.orig/regress/group/Makefile 2007-06-04 13:22:39.727815736 +0200 +@@ -15,7 +15,6 @@ + -DUSE_EC + NOMAN= + LDADD+= -lcrypto +-DPADD+= ${LIBCRYPTO} + DEBUG= -g + + .if ${FEATURES:Mgmp} == "gmp" +Index: isakmpd-20041012.orig/regress/rsakeygen/Makefile +=================================================================== +--- isakmpd-20041012.orig.orig/regress/rsakeygen/Makefile 2007-06-04 13:22:39.060917120 +0200 ++++ isakmpd-20041012.orig/regress/rsakeygen/Makefile 2007-06-04 13:22:39.727815736 +0200 +@@ -62,7 +62,6 @@ + .ifdef USE_LIBCRYPTO + CFLAGS+= -DUSE_LIBCRYPTO + LDADD+= -lcrypto +-DPADD+= ${LIBCRYPTO} + .endif + + .if !defined (HAVE_DLOPEN) && !defined (USE_LIBCRYPTO) +Index: isakmpd-20041012.orig/regress/x509/Makefile +=================================================================== +--- isakmpd-20041012.orig.orig/regress/x509/Makefile 2007-06-04 13:22:39.068915904 +0200 ++++ isakmpd-20041012.orig/regress/x509/Makefile 2007-06-04 13:22:39.727815736 +0200 +@@ -78,7 +78,6 @@ + X509= x509.c + CFLAGS+= -DUSE_LIBCRYPTO + LDADD+= -lcrypto ${LIBLWRES} +-DPADD+= ${LIBCRYPTO} + .endif + + .if !defined (HAVE_DLOPEN) && !defined (USE_LIBCRYPTO) || !defined (USE_KEYNOTE) diff --git a/net/isakmpd/patches/030-openssl_hashes.patch b/net/isakmpd/patches/030-openssl_hashes.patch new file mode 100644 index 0000000..f50afc5 --- /dev/null +++ b/net/isakmpd/patches/030-openssl_hashes.patch @@ -0,0 +1,161 @@ +Index: isakmpd-20041012.orig/GNUmakefile +=================================================================== +--- isakmpd-20041012.orig.orig/GNUmakefile 2007-06-04 13:22:39.722816496 +0200 ++++ isakmpd-20041012.orig/GNUmakefile 2007-06-04 13:22:40.000774240 +0200 +@@ -76,13 +76,14 @@ + isakmp_fld.c isakmp_fld.h + MAN= isakmpd.8 isakmpd.conf.5 isakmpd.policy.5 + +-CFLAGS+= -O2 ${DEBUG} -Wall -DNEED_SYSDEP_APP \ ++CFLAGS+= ${DEBUG} -Wall -DNEED_SYSDEP_APP \ + -I${.CURDIR} -I${.CURDIR}/sysdep/${OS} -I. \ + + # Different debugging & profiling suggestions + + # Include symbolic debugging info + DEBUG= -g ++CFLAGS+= -g + + # Do execution time profiles + #CFLAGS+= -pg +@@ -175,6 +176,14 @@ + CFLAGS+= -DUSE_RAWKEY + endif + ++ifdef USE_OPENSSL_MD5 ++CFLAGS+= -DUSE_OPENSSL_MD5 ++endif ++ ++ifdef USE_OPENSSL_SHA1 ++CFLAGS+= -DUSE_OPENSSL_SHA1 ++endif ++ + SRCS+= ${IPSEC_SRCS} ${X509} ${POLICY} ${EC} ${AGGRESSIVE} ${DNSSEC} \ + $(ISAKMP_CFG) ${DPD} ${NAT_TRAVERSAL} + CFLAGS+= ${IPSEC_CFLAGS} +Index: isakmpd-20041012.orig/sysdep/common/libsysdep/GNUmakefile +=================================================================== +--- isakmpd-20041012.orig.orig/sysdep/common/libsysdep/GNUmakefile 2007-06-04 13:22:38.959932472 +0200 ++++ isakmpd-20041012.orig/sysdep/common/libsysdep/GNUmakefile 2007-06-04 13:22:40.000774240 +0200 +@@ -31,10 +31,18 @@ + .CURDIR:= $(shell pwd) + + LIB= sysdep +-SRCS= arc4random.c blowfish.c cast.c md5.c sha1.c strlcat.c strlcpy.c ++SRCS= arc4random.c blowfish.c cast.c strlcat.c strlcpy.c + NOMAN= + CFLAGS+= -I${.CURDIR}/.. -I/usr/include/machine + ++ifeq (,$(findstring USE_OPENSSL_MD5,$(CFLAGS))) ++SRCS+=md5.c ++endif ++ ++ifeq (,$(findstring USE_OPENSSL_SHA1,$(CFLAGS))) ++SRCS+=sha1.c ++endif ++ + lib${LIB}.a: ${SRCS:%.c=%.o} + ar cq $@ ${SRCS:%.c=%.o} + +Index: isakmpd-20041012.orig/sysdep/common/libsysdep/md5.c +=================================================================== +--- isakmpd-20041012.orig.orig/sysdep/common/libsysdep/md5.c 2007-06-04 13:22:38.964931712 +0200 ++++ isakmpd-20041012.orig/sysdep/common/libsysdep/md5.c 2007-06-04 13:22:40.000774240 +0200 +@@ -5,6 +5,8 @@ + * changes to accommodate it in the kernel by ji. + */ + ++#ifndef USE_OPENSSL_MD5 ++ + /* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm + */ + +@@ -390,3 +392,4 @@ + #endif + #endif + ++#endif /* USE_OPENSSL_MD5 */ +Index: isakmpd-20041012.orig/sysdep/common/libsysdep/sha1.c +=================================================================== +--- isakmpd-20041012.orig.orig/sysdep/common/libsysdep/sha1.c 2007-06-04 13:22:38.970930800 +0200 ++++ isakmpd-20041012.orig/sysdep/common/libsysdep/sha1.c 2007-06-04 13:22:40.001774088 +0200 +@@ -1,5 +1,7 @@ + /* $OpenBSD: sha1.c,v 1.2 2001/01/28 22:38:48 niklas Exp $ */ + ++#ifndef USE_OPENSSL_SHA1 ++ + /* + SHA-1 in C + By Steve Reid +@@ -171,3 +173,5 @@ + SHA1Transform(context->state, context->buffer); + #endif + } ++ ++#endif /* USE_OPENSSL_SHA1 */ +Index: isakmpd-20041012.orig/sysdep/common/md5.h +=================================================================== +--- isakmpd-20041012.orig.orig/sysdep/common/md5.h 2007-06-04 13:22:38.976929888 +0200 ++++ isakmpd-20041012.orig/sysdep/common/md5.h 2007-06-04 13:22:40.001774088 +0200 +@@ -1,5 +1,15 @@ + /* $OpenBSD: md5.h,v 1.2 2001/01/28 22:38:47 niklas Exp $ */ + ++#ifdef USE_OPENSSL_MD5 ++ ++#include ++ ++#define MD5Init MD5_Init ++#define MD5Update MD5_Update ++#define MD5Final MD5_Final ++ ++#else /* USE_OPENSSL_MD5 */ ++ + /* GLOBAL.H - RSAREF types and constants + */ + +@@ -71,3 +81,5 @@ + void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *)); + + #define _MD5_H_ ++ ++#endif /* USE_OPENSSL_MD5 */ +Index: isakmpd-20041012.orig/sysdep/common/sha1.h +=================================================================== +--- isakmpd-20041012.orig.orig/sysdep/common/sha1.h 2007-06-04 13:22:38.982928976 +0200 ++++ isakmpd-20041012.orig/sysdep/common/sha1.h 2007-06-04 13:22:40.001774088 +0200 +@@ -1,5 +1,16 @@ + /* $OpenBSD: sha1.h,v 1.2 2001/01/28 22:38:47 niklas Exp $ */ + ++#ifdef USE_OPENSSL_SHA1 ++ ++#include ++ ++typedef SHA_CTX SHA1_CTX; ++#define SHA1Init SHA1_Init ++#define SHA1Update SHA1_Update ++#define SHA1Final SHA1_Final ++ ++#else /* USE_OPENSSL_SHA1 */ ++ + /* + SHA-1 in C + By Steve Reid +@@ -16,3 +27,5 @@ + void SHA1Init(SHA1_CTX* context); + void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len); + void SHA1Final(unsigned char digest[20], SHA1_CTX* context); ++ ++#endif /* USE_OPENSSL_SHA1 */ +Index: isakmpd-20041012.orig/sysdep/linux/GNUmakefile.sysdep +=================================================================== +--- isakmpd-20041012.orig.orig/sysdep/linux/GNUmakefile.sysdep 2007-06-04 13:22:39.722816496 +0200 ++++ isakmpd-20041012.orig/sysdep/linux/GNUmakefile.sysdep 2007-06-04 13:22:40.001774088 +0200 +@@ -47,6 +47,8 @@ + USE_LIBCRYPO= defined + HAVE_DLOPEN= defined + USE_KEYNOTE= defined ++USE_OPENSSL_MD5= defined ++USE_OPENSSL_SHA1= defined + + # hack libsysdep.a dependenc + ${LIBSYSDEPDIR}/.depend ${LIBSYSDEP}: diff --git a/net/isakmpd/patches/040-security_fix.patch b/net/isakmpd/patches/040-security_fix.patch new file mode 100644 index 0000000..d70a722 --- /dev/null +++ b/net/isakmpd/patches/040-security_fix.patch @@ -0,0 +1,18 @@ +Index: isakmpd-20041012.orig/ipsec.c +=================================================================== +--- isakmpd-20041012.orig.orig/ipsec.c 2007-06-04 13:22:39.283883224 +0200 ++++ isakmpd-20041012.orig/ipsec.c 2007-06-04 13:22:40.247736696 +0200 +@@ -2176,9 +2176,10 @@ + { + struct ipsec_proto *iproto = proto->data; + +- if (proto->sa->phase == 2 && section) +- iproto->replay_window = conf_get_num(section, "ReplayWindow", +- DEFAULT_REPLAY_WINDOW); ++ if (proto->sa->phase == 2) ++ iproto->replay_window = section ? conf_get_num(section, ++ "ReplayWindow", DEFAULT_REPLAY_WINDOW) : ++ DEFAULT_REPLAY_WINDOW; + } + + /* diff --git a/net/isakmpd/patches/050-ar_cross.patch b/net/isakmpd/patches/050-ar_cross.patch new file mode 100644 index 0000000..2bac048 --- /dev/null +++ b/net/isakmpd/patches/050-ar_cross.patch @@ -0,0 +1,13 @@ +Index: isakmpd-20041012.orig/sysdep/common/libsysdep/GNUmakefile +=================================================================== +--- isakmpd-20041012.orig.orig/sysdep/common/libsysdep/GNUmakefile 2007-06-04 13:22:40.000774240 +0200 ++++ isakmpd-20041012.orig/sysdep/common/libsysdep/GNUmakefile 2007-06-04 13:22:40.431708728 +0200 +@@ -44,7 +44,7 @@ + endif + + lib${LIB}.a: ${SRCS:%.c=%.o} +- ar cq $@ ${SRCS:%.c=%.o} ++ $(AR) cq $@ ${SRCS:%.c=%.o} + + clean: + rm -f lib${LIB}.a ${SRCS:%.c=%.o} diff --git a/net/jtg/Makefile b/net/jtg/Makefile new file mode 100644 index 0000000..4498e85 --- /dev/null +++ b/net/jtg/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=jtg +PKG_VERSION:=1.95 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.netlab.tkk.fi/~jmanner/jtg + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/jtg + TITLE:=Jugi's Traffic Generator + SECTION:=net + CATEGORY:=Network + MAINTAINER:=Roberto Riggio + URL:=https://hoslab.cs.helsinki.fi/savane/projects/jtg/ +endef + +define Package/wing/Description + The JTG generator is a simple, yet powerful and, if required, accurate + traffic generator. jtg differs from other traffic generators in that one + instance of a jtg process only sends one stream (e.g. MGEN can send tens + of streams) and the characteristics of the stream are given only with + command line arguments. On the other hand, a receiving jtg process can + be set to loop and receive several streams but, again, only one at a + time. The received packets can be logged and the log files can be + analyzed with jtg_calc (see later in this file for instructions). jtg6 + is the binary for IPv6 networks. +endef + +define Build/Compile + $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + -C $(PKG_BUILD_DIR) +endef + +define Package/jtg/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/jtg $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,jtg)) diff --git a/net/kamailio/Makefile b/net/kamailio/Makefile new file mode 100644 index 0000000..757fc9c --- /dev/null +++ b/net/kamailio/Makefile @@ -0,0 +1,267 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=kamailio +PKG_VERSION:=1.5.2 +PKG_RELEASE:=1 +PKG_VARIANT:=-tls + +PKG_SOURCE_URL:=http://www.kamailio.org/pub/kamailio/1.5.2/src/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz +PKG_MD5SUM:=26b0d0d3c67c2d981bee86a803cca51f + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)$(PKG_VARIANT) + +PKG_BUILD_DEPENDS:=curl expat libxml2 mysql openldap openssl pcre postgresql radiusclient-ng + +include $(INCLUDE_DIR)/package.mk + +TARGET_CFLAGS += $(FPIC) + +define Package/kamailio/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Telephony + URL:=http://www.kamailio.org/ +endef + + +define Package/kamailio +$(call Package/kamailio/Default) + TITLE:=Mature and flexible open source SIP server + MENU:=1 +endef + +define Package/kamailio-example +$(call Package/kamailio/Default) + TITLE:=Kamailio example config + DEPENDS:=kamailio \ + +kamailio-mod-acc \ + +kamailio-mod-maxfwd \ + +kamailio-mod-mi-fifo \ + +kamailio-mod-pv \ + +kamailio-mod-registrar \ + +kamailio-mod-rr \ + +kamailio-mod-sl \ + +kamailio-mod-siputils \ + +kamailio-mod-textops \ + +kamailio-mod-tm \ + +kamailio-mod-uri-db \ + +kamailio-mod-usrloc \ + +kamailio-mod-xlog +endef + +define Package/kamailio-example/conffiles +/etc/default/kamailio +/etc/kamailio/kamailio.cfg +endef + + +define Package/kamailio-tools +$(call Package/kamailio/Default) + TITLE:=Kamailio control tools + DEPENDS:=kamailio +endef + +define Package/kamailio-tools/conffiles +/etc/kamailio/kamctlrc +endef + + +PKG_EXCL_MODULES:= \ + auth_diameter \ + carrierroute \ + db_berkeley \ + db_oracle \ + db_unixodbc \ + mediaproxy \ + mi_xmlrpc \ + osp \ + perl \ + perlvdb \ + purple \ + snmpstats \ + +PKG_MAKE_ARGS:= \ + cfg-dir="etc/kamailio/" \ + bin-dir="usr/sbin/" \ + data-dir="var/lib/kamailio/" \ + lib-dir="usr/lib/kamailio/" \ + modules-dir="usr/lib/kamailio/modules/" \ + exclude_modules="$(PKG_EXCL_MODULES)" \ + + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) \ + prefix=/ \ + extra_defs="-DUSE_PTHREAD_MUTEX " \ + CC="$(TARGET_CC)" \ + ARCH="$(ARCH)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + ISSMP="no" \ + LOCALBASE="$(STAGING_DIR)/usr" \ + SYSBASE="$(STAGING_DIR)/usr" \ + PCREDEFS:="$(TARGET_CPPFLAGS)" \ + PCRELIBS:="$(TARGET_LDFLAGS)" \ + all + $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install +endef + +define Package/kamailio/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) \ + $(PKG_INSTALL_DIR)/usr/sbin/kamailio \ + $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/kamailio/modules +endef + +define Package/kamailio-example/install + $(INSTALL_DIR) $(1)/etc/kamailio + $(CP) \ + $(PKG_INSTALL_DIR)/etc/kamailio/kamailio.cfg \ + $(1)/etc/kamailio/ + $(SED) 's,$(PKG_INSTALL_DIR),,g' \ + $(1)/etc/kamailio/kamailio.cfg + $(INSTALL_DIR) $(1)/etc/default + $(INSTALL_DATA) ./files/kamailio.default $(1)/etc/default/kamailio + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/kamailio.init $(1)/etc/init.d/kamailio +endef + +define Package/kamailio-tools/install + $(INSTALL_DIR) $(1)/etc/kamailio + $(CP) \ + $(PKG_INSTALL_DIR)/etc/kamailio/kamctlrc \ + $(1)/etc/kamailio/ + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) \ + $(PKG_INSTALL_DIR)/usr/sbin/kam{ctl,dbctl,unix} \ + $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/kamailio + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/kamailio/kamctl \ + $(1)/usr/lib/kamailio/ + $(SED) 's,/bin/bash,/bin/sh,g' \ + -e 's,$(PKG_INSTALL_DIR),,g' \ + $(1)/usr/sbin/kam{ctl,dbctl} +endef + +define BuildPlugin + define Package/kamailio-mod-$(1) + $$(call Package/kamailio/Default) + TITLE:= kamailio $(3) module + DEPENDS:=kamailio $$(foreach m,$(4),+kamailio-mod-$$m) $(5) + endef + + define Package/kamailio-mod-$(1)/install + [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/kamailio/modules/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/kamailio/modules/$(2).so \ + $$(1)/usr/lib/kamailio/modules/ ; + endef + + $$(eval $$(call BuildPackage,kamailio-mod-$(1))) +endef + +$(eval $(call BuildPackage,kamailio)) +$(eval $(call BuildPackage,kamailio-example)) +$(eval $(call BuildPackage,kamailio-tools)) +$(eval $(call BuildPlugin,acc,acc,Accounting,tm,)) +$(eval $(call BuildPlugin,alias-db,alias_db,Database-backend aliases,,)) +$(eval $(call BuildPlugin,auth,auth,Authentication Framework,,)) +$(eval $(call BuildPlugin,auth-db,auth_db,Database-backend authentication,auth,)) +#$(eval $(call BuildPlugin,auth-diameter,auth_diameter,Diameter-backend authentication,sl,)) +$(eval $(call BuildPlugin,auth-radius,auth_radius,RADIUS-backend authentication,auth,+libradiusclient-ng)) +$(eval $(call BuildPlugin,avpops,avpops,AVP operation,,)) +$(eval $(call BuildPlugin,benchmark,benchmark,Config benchmark,,)) +#$(eval $(call BuildPlugin,carrierroute,carrierroute,Carrier Routing,,+libconfuse)) +$(eval $(call BuildPlugin,cfgutils,cfgutils,Config utilities,,)) +$(eval $(call BuildPlugin,cpl-c,cpl-c,Call Processing language interpreter,tm sl usrloc,+libxml2)) +#$(eval $(call BuildPlugin,db-berkeley,db_berkeley,Berkeley DB Database-backend,,)) +$(eval $(call BuildPlugin,db-flatstore,db_flatstore,Fast writing-only text database-backed,,)) +$(eval $(call BuildPlugin,db-mysql,db_mysql,MySQL database-backend,,+libmysqlclient)) +#$(eval $(call BuildPlugin,db-oracle,db_oracle,Oracle Database-backend,,)) +$(eval $(call BuildPlugin,db-postgres,db_postgres,PostgreSQL Database-backend,,+libpq)) +$(eval $(call BuildPlugin,db-text,db_text,Text database-backend,,)) +#$(eval $(call BuildPlugin,db-unixodbc,db_unixodbc,UnixODBC Database-backend,,)) +$(eval $(call BuildPlugin,dialog,dialog,Dialog support,rr tm,)) +$(eval $(call BuildPlugin,dialplan,dialplan,Dialplan management,,+libpcre)) +$(eval $(call BuildPlugin,dispatcher,dispatcher,Dispatcher,,)) +$(eval $(call BuildPlugin,diversion,diversion,Diversion header insertion,,)) +$(eval $(call BuildPlugin,domain,domain,Multi-domain support,,)) +$(eval $(call BuildPlugin,domainpolicy,domainpolicy,Domain policy,,)) +$(eval $(call BuildPlugin,enum,enum,ENUM lookup,,)) +$(eval $(call BuildPlugin,exec,exec,External exec,,)) +$(eval $(call BuildPlugin,group,group,Database-backend user-groups,,)) +$(eval $(call BuildPlugin,h350,h350,H.350,ldap,+libopenldap)) +$(eval $(call BuildPlugin,htable,htable,Hash Table,,)) +$(eval $(call BuildPlugin,imc,imc,IM conferencing,db-mysql tm,)) +$(eval $(call BuildPlugin,jabber,jabber,Jabber,tm,+libexpat)) +$(eval $(call BuildPlugin,lcr,lcr,Least Cost Routing,tm,+libpcre)) +$(eval $(call BuildPlugin,ldap,ldap,LDAP connector,,+libopenldap)) +$(eval $(call BuildPlugin,maxfwd,maxfwd,Max-Forward processor,,)) +$(eval $(call BuildPlugin,mi-datagram,mi_datagram,Datagram support for Management Interface,,)) +$(eval $(call BuildPlugin,mi-fifo,mi_fifo,FIFO support for Management Interface,,)) +#$(eval $(call BuildPlugin,mi-xmlrpc,mi_xmlrpc,XML-RPC support for Management Interface,,+xmlrpc-c)) +#$(eval $(call BuildPlugin,mediaproxy,mediaproxy,NAT traversal,,+mediaproxy)) +$(eval $(call BuildPlugin,misc_radius,misc_radius,Generic RADIUS,,+libradiusclient-ng)) +$(eval $(call BuildPlugin,msilo,msilo,SIP message silo,tm,)) +$(eval $(call BuildPlugin,nat_traversal,nat_traversal,NAT traversal,dialog sl tm,)) +$(eval $(call BuildPlugin,nathelper,nathelper,NAT traversal helper,,+rtpproxy)) +#$(eval $(call BuildPlugin,osp,osp,OSP peering,auth rr sl tm textops,+libosp)) +$(eval $(call BuildPlugin,path,path,SIP path insertion,rr,)) +$(eval $(call BuildPlugin,pdt,pdt,Prefix-to-Domain translator,,)) +$(eval $(call BuildPlugin,peering,peering,Perring,,+libradiusclient-ng)) +#$(eval $(call BuildPlugin,perl,perl,Perl,sl,+perl)) +#$(eval $(call BuildPlugin,perlvdb,perlvdb,Perl Virtual DB,perl,)) +$(eval $(call BuildPlugin,permissions,permissions,Permissions control,,)) +$(eval $(call BuildPlugin,pike,pike,Flood detector,,)) +$(eval $(call BuildPlugin,presence,presence,Presence server,sl tm,+libxml2)) +$(eval $(call BuildPlugin,presence-dialoginfo,presence_dialoginfo,Dialog Event presence,presence,)) +$(eval $(call BuildPlugin,presence-mwi,presence_mwi,Message Waiting Indication presence,presence,)) +$(eval $(call BuildPlugin,presence-xml,presence_xml,XCAP presence,presence xcap-client,)) +$(eval $(call BuildPlugin,pua,pua,Presence User Agent,tm,+libxml2)) +$(eval $(call BuildPlugin,pua-bla,pua_bla,Bridged Line Appearence PUA,presence pua usrloc,)) +$(eval $(call BuildPlugin,pua-dialoginfo,pua_dialoginfo,Dialog Event PUA,dialog pua,)) +$(eval $(call BuildPlugin,pua-mi,pua_mi,PUA Management Interface,pua,)) +$(eval $(call BuildPlugin,pua-usrloc,pua_usrloc,PUA User Location,pua usrloc,)) +$(eval $(call BuildPlugin,pua-xmpp,pua_xmpp,PUA XMPP,presence pua xmpp,)) +#$(eval $(call BuildPlugin,purple,purple,Multi-protocol IM gateway,presence pua,+libpurple)) +$(eval $(call BuildPlugin,pv,pv,Pseudo-Variables,,)) +$(eval $(call BuildPlugin,qos,qos,QoS control,dialog,)) +$(eval $(call BuildPlugin,ratelimit,ratelimit,Traffic shapping,,)) +$(eval $(call BuildPlugin,regex,regex,Regular Expression,,+libpcre)) +$(eval $(call BuildPlugin,registrar,registrar,SIP Registrar,usrloc,)) +$(eval $(call BuildPlugin,rls,rls,Resource List Server,presence pua tm,+libxml2)) +$(eval $(call BuildPlugin,rr,rr,Record-Route and Route,,)) +$(eval $(call BuildPlugin,rtimer,rtimer,Routing Timer,,)) +$(eval $(call BuildPlugin,sanity,sanity,SIP sanity checks,sl,)) +#$(eval $(call BuildPlugin,seas,seas,SIP Express Application Server,tm,)) +$(eval $(call BuildPlugin,siptrace,siptrace,SIP trace,,)) +$(eval $(call BuildPlugin,siputils,siputils,SIP utilities,sl,)) +$(eval $(call BuildPlugin,sl,sl,Stateless replier,,)) +$(eval $(call BuildPlugin,sms,sms,SIP-to-SMS IM gateway,tm,)) +#$(eval $(call BuildPlugin,snmpstats,snmpstats,SNMP,presence usrloc,+libnetsnmp)) +$(eval $(call BuildPlugin,speeddial,speeddial,Per-user speed-dial controller,,)) +$(eval $(call BuildPlugin,sqlops,sqlops,SQL operations,,)) +$(eval $(call BuildPlugin,statistics,statistics,Script statistics,,)) +$(eval $(call BuildPlugin,sst,sst,SIP Session Timer,dialog sl,)) +$(eval $(call BuildPlugin,textops,textops,Text operations,,)) +$(eval $(call BuildPlugin,tlsops,tlsops,TLS operations,,+libopenssl)) +$(eval $(call BuildPlugin,tm,tm,Transaction,,)) +$(eval $(call BuildPlugin,uac,uac,User Agent Client,tm,)) +$(eval $(call BuildPlugin,uac-redirect,uac_redirect,User Agent Client redirection,tm,)) +$(eval $(call BuildPlugin,uri-db,uri_db,Database-backend SIP URI checking,,)) +$(eval $(call BuildPlugin,userblacklist,userblacklist,User blacklists,,)) +$(eval $(call BuildPlugin,usrloc,usrloc,User location,,)) +$(eval $(call BuildPlugin,utils,utils,Misc utilities,,+libcurl)) +$(eval $(call BuildPlugin,xcap-client,xcap_client,XCAP Client,,+libcurl)) +$(eval $(call BuildPlugin,xlog,xlog,Advanced logger,,)) +$(eval $(call BuildPlugin,xmpp,xmpp,SIP-to-XMPP Gateway,tm,+libexpat)) diff --git a/net/kamailio/files/kamailio.default b/net/kamailio/files/kamailio.default new file mode 100644 index 0000000..a61617b --- /dev/null +++ b/net/kamailio/files/kamailio.default @@ -0,0 +1,13 @@ +# OPTIONS +# -n COUNT +# Specifies the number of children processes forked per interface +# -N COUNT +# Specifies the number of children processes forked to handle tcp incoming connections +# -m SIZE +# Size of the shared memory which will be allocated (in Megabytes). +# -u UID +# Changes the user id under which +# -g GID +# Changes the group id under which + +OPTIONS="-n 4 -m 4 - m 8" diff --git a/net/kamailio/files/kamailio.init b/net/kamailio/files/kamailio.init new file mode 100755 index 0000000..1f42a9e --- /dev/null +++ b/net/kamailio/files/kamailio.init @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009 OpenWrt.org +START=50 + +BIN=kamailio +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $RUN_D + $BIN -P $PID_F $OPTIONS >/dev/null 2>&1 +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + diff --git a/net/kamailio/patches/005-config_h.patch b/net/kamailio/patches/005-config_h.patch new file mode 100644 index 0000000..a641b3a --- /dev/null +++ b/net/kamailio/patches/005-config_h.patch @@ -0,0 +1,20 @@ +--- a/config.h ++++ b/config.h +@@ -48,7 +48,7 @@ + + #define MAX_LISTEN 16 /*!< maximum number of addresses on which we will listen */ + +-#define CHILD_NO 8 /*!< default number of child processes started */ ++#define CHILD_NO 4 /*!< default number of child processes started */ + + #ifndef RT_NO + #define RT_NO 80 /*!< routing tables number */ +@@ -119,7 +119,7 @@ + #define PKG_MEM_POOL_SIZE 4*1024*1024 /*!< Used only if PKG_MALLOC is defined*/ + #endif + +-#define SHM_MEM_SIZE 32 /*!< Used if SH_MEM is defined*/ ++#define SHM_MEM_SIZE 8 /*!< Used if SH_MEM is defined*/ + + #define TIMER_TICK 1 /*!< one second */ + #define UTIMER_TICK 100*1000 /*!< 100 miliseconds*/ diff --git a/net/kamailio/patches/007-modules_build.patch b/net/kamailio/patches/007-modules_build.patch new file mode 100644 index 0000000..3fac163 --- /dev/null +++ b/net/kamailio/patches/007-modules_build.patch @@ -0,0 +1,137 @@ +--- a/modules/carrierroute/Makefile ++++ b/modules/carrierroute/Makefile +@@ -12,10 +12,8 @@ NAME=carrierroute.so + BUILDER = $(shell which confuse-config) + + ifeq ($(BUILDER),) +- CONFUSEDEFS=-I$(LOCALBASE)/include -I/usr/local/include -I/opt/include \ +- -I/usr/sfw/include +- CONFUSELIBS=-L$(LOCALBASE)/lib -L/usr/local/lib -L/usr/sfw/lib \ +- -L/opt/lib -lconfuse ++ CONFUSEDEFS=-I$(LOCALBASE)/include ++ CONFUSELIBS=-L$(LOCALBASE)/lib + else + CONFUSEDEFS = $(shell confuse-config --cflags) + CONFUSELIBS = $(shell confuse-config --libs) +--- a/modules/h350/Makefile ++++ b/modules/h350/Makefile +@@ -9,7 +9,8 @@ include ../../Makefile.defs + + auto_gen= + NAME=h350.so +-LIBS= ++ + DEFS+=-I$(LOCALBASE)/include ++LIBS=-L$(LOCALBASE)/lib -lldap + + include ../../Makefile.modules +--- a/modules/ldap/Makefile ++++ b/modules/ldap/Makefile +@@ -12,8 +12,8 @@ include ../../Makefile.defs + auto_gen= + NAME=ldap.so + +-LIBS=-L$(LOCALBASE)/lib -lldap + DEFS+=-I$(LOCALBASE)/include ++LIBS=-L$(LOCALBASE)/lib -lldap + + ifeq ($(OS),solaris) + DEFS+=-I$(LOCALBASE)/include -I/usr/sfw/include -I/usr/local/include -I/opt/sfw/include -I/opt/csw/include +--- a/modules/pua_bla/Makefile ++++ b/modules/pua_bla/Makefile +@@ -9,8 +9,8 @@ include ../../Makefile.defs + auto_gen= + NAME=pua_bla.so + LIBS= +-DEFS+=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 -I$(LOCALBASE)/include +-LIBS+=-L/usr/include/lib -L$(LOCALBASE)/lib -lxml2 ++DEFS+=-I$(LOCALBASE)/include/libxml2 -I$(LOCALBASE)/include ++LIBS+=-L$(LOCALBASE)/lib -lxml2 + + include ../../Makefile.modules + +--- a/modules/pua_xmpp/Makefile ++++ b/modules/pua_xmpp/Makefile +@@ -10,7 +10,7 @@ auto_gen= + NAME= pua_xmpp.so + LIBS= + +-DEFS+=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 -I$(LOCALBASE)/include +-LIBS+=-L/usr/include/lib -L$(LOCALBASE)/lib -lxml2 ++DEFS+=-I$(LOCALBASE)/include/libxml2 -I$(LOCALBASE)/include ++LIBS+=-L$(LOCALBASE)/lib -lxml2 + + include ../../Makefile.modules +--- a/modules/regex/Makefile ++++ b/modules/regex/Makefile +@@ -7,10 +7,8 @@ NAME=regex.so + BUILDER = $(shell which pcre-config) + + ifeq ($(BUILDER),) +- PCREDEFS=-I$(LOCALBASE)/include -I/usr/local/include -I/opt/include \ +- -I/usr/sfw/include +- PCRELIBS=-L$(LOCALBASE)/lib -L/usr/local/lib -L/usr/sfw/lib \ +- -L/opt/lib -lpcre ++ PCREDEFS=-I$(LOCALBASE)/include ++ PCRELIBS=-L$(LOCALBASE)/lib -lpcre + else + PCREDEFS = $(shell pcre-config --cflags) + PCRELIBS = $(shell pcre-config --libs) +--- a/modules/tlsops/Makefile ++++ b/modules/tlsops/Makefile +@@ -7,8 +7,8 @@ auto_gen= + NAME=tlsops.so + LIBS= + +-DEFS+= -I$(LOCALBASE)/ssl/include +-LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto ++DEFS+= -I$(LOCALBASE)/include ++LIBS+= -L$(LOCALBASE)/lib -lssl -lcrypto + + include ../../Makefile.modules + +--- a/modules/dialplan/Makefile ++++ b/modules/dialplan/Makefile +@@ -9,10 +9,8 @@ NAME=dialplan.so + BUILDER = $(shell which pcre-config) + + ifeq ($(BUILDER),) +- PCREDEFS=-I$(LOCALBASE)/include -I/usr/local/include -I/opt/include \ +- -I/usr/sfw/include +- PCRELIBS=-L$(LOCALBASE)/lib -L/usr/local/lib -L/usr/sfw/lib \ +- -L/opt/lib -lpcre ++ PCREDEFS=-I$(LOCALBASE)/include ++ PCRELIBS=-L$(LOCALBASE)/lib -lpcre + else + PCREDEFS = $(shell pcre-config --cflags) + PCRELIBS = $(shell pcre-config --libs) +--- a/modules/lcr/Makefile ++++ b/modules/lcr/Makefile +@@ -11,10 +11,8 @@ NAME=lcr.so + BUILDER = $(shell which pcre-config) + + ifeq ($(BUILDER),) +- PCREDEFS=-I$(LOCALBASE)/include -I/usr/local/include -I/opt/include \ +- -I/usr/sfw/include +- PCRELIBS=-L$(LOCALBASE)/lib -L/usr/local/lib -L/usr/sfw/lib \ +- -L/opt/lib -lpcre ++ PCREDEFS=-I$(LOCALBASE)/include ++ PCRELIBS=-L$(LOCALBASE)/lib -lpcre + else + PCREDEFS = $(shell pcre-config --cflags) + PCRELIBS = $(shell pcre-config --libs) +--- a/modules/purple/Makefile ++++ b/modules/purple/Makefile +@@ -3,9 +3,9 @@ auto_gen= + NAME=purple.so + LIBS= + +-DEFS+=-I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 \ +- -I/usr/include/libxml2 +-LIBS+=-lglib-2.0 -lpurple -lxml2 ++DEFS+=-I$(LOCALBASE)/include/glib-2.0/include -I$(LOCALBASE)/include/glib-2.0 \ ++ -I$(LOCALBASE)/incldue/libxml2 ++LIBS+=-L$(LOCALBASE)/lib -lglib-2.0 -lpurple -lxml2 + + + include ../../Makefile.modules diff --git a/net/karma/Makefile b/net/karma/Makefile new file mode 100644 index 0000000..ad8f05d --- /dev/null +++ b/net/karma/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=karma +PKG_VERSION:=20060124 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://theta44.org/software/ +PKG_MD5SUM:=e9d4ccbda89b4b1cd70eefb1db339d0a + +include $(INCLUDE_DIR)/package.mk + +define Package/karma + SECTION:=net + CATEGORY:=Network + SUBMENU:=wireless + DEPENDS:=+kmod-madwifi +ruby +libpcap +libncurses + TITLE:=set of tools for assessing the security of wireless clients + URL:=http://theta44.org/karma/index.html +endef + +define Package/karma/description + KARMA is a set of tools for assessing the security of wireless clients + at multiple layers. Wireless sniffing tools discover clients and their + preferred/trusted networks by passively listening for 802.11 Probe Request + frames. +endef + +define Package/karma/conffiles +/etc/karma-lan.xml +/etc/karma-scan.xml +/etc/karma.xml +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/src/ \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDLIBS="$(TARGET_LDFLAGS) -lpcap -lncurses" +endef + +define Package/karma/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/karma $(1)/usr/sbin/karma-ruby + $(CP) $(PKG_BUILD_DIR)/src/karma $(1)/usr/sbin/karma + $(INSTALL_DIR) $(1)/etc + $(CP) $(PKG_BUILD_DIR)/etc/* $(1)/etc/ +endef + +$(eval $(call BuildPackage,karma)) diff --git a/net/keepalived/Makefile b/net/keepalived/Makefile new file mode 100644 index 0000000..4ff0673 --- /dev/null +++ b/net/keepalived/Makefile @@ -0,0 +1,69 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=keepalived +PKG_VERSION:=1.1.19 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:= http://www.keepalived.org/software +PKG_MD5SUM:=a35b8d9d462810f7650d292bd7457523 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk + +define Package/keepalived + SECTION:=net + CATEGORY:=Network + TITLE:=Failover and monitoring daemon for LVS clusters + URL:=http://www.keepalived.org/ + DEPENDS:=+libpopt +libopenssl +endef + +define Package/keepalived/description + Failover and monitoring daemon for Linux Virtual Server (LVS) clusters. +endef + +define Package/keepalived/conffiles +/etc/keepalived/keepalived.conf +endef + +acvar=$(subst -,_,$(subst .,_,$(subst /,_,$(1)))) + +CONFIGURE_ARGS+= \ + --enable-shared \ + --disable-static \ + --disable-debug \ + --disable-strip \ + --disable-lvs \ + --disable-lvs-syncd \ + --with-kernel-dir="$(LINUX_DIR)" + +CONFIGURE_VARS+= \ + ac_cv_file_$(call acvar,$(LINUX_DIR)/net/core/link_watch.c)=yes + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + STRIP="/bin/true" \ + all install +endef + +define Package/keepalived/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/keepalived $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/genhash $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/keepalived + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/keepalived/keepalived.conf $(1)/etc/keepalived/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/keepalived.init $(1)/etc/init.d/keepalived +endef + +$(eval $(call BuildPackage,keepalived)) diff --git a/net/keepalived/files/keepalived.init b/net/keepalived/files/keepalived.init new file mode 100644 index 0000000..723947c --- /dev/null +++ b/net/keepalived/files/keepalived.init @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007-2008 OpenWrt.org + +START=70 + +start() { + [ -f /etc/keepalived/keepalived.conf ] && /usr/sbin/keepalived +} + +stop() { + killall keepalived +} + diff --git a/net/kismet/Makefile b/net/kismet/Makefile new file mode 100644 index 0000000..ebeb0ff --- /dev/null +++ b/net/kismet/Makefile @@ -0,0 +1,127 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=kismet +PKG_VERSION:=2010-07-R1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.kismetwireless.net/code +PKG_MD5SUM:=85e59186eb529889118b5635f35cf57d + +PKG_BUILD_DEPENDS:=libpcap libncurses uclibcxx libpcre libnl-tiny + +include $(INCLUDE_DIR)/package.mk + +define Package/kismet/Default + SECTION:=net + CATEGORY:=Network + TITLE:=Kismet + DEPENDS:= +uclibcxx +libnl-tiny + URL:=http://www.kismetwireless.net/ + SUBMENU:=wireless +endef + +define Package/kismet/Default/description + An 802.11 layer2 wireless network detector, sniffer, and intrusion + detection system. +endef + +define Package/kismet-client +$(call Package/kismet/Default) + TITLE+= client + DEPENDS+= +libncurses +endef + +define Package/kismet-client/conffiles +/etc/kismet/kismet.conf +endef + +define Package/kismet-client/description +$(call Package/kismet/Default/description) + This package contains the kismet text interface client. +endef + +define Package/kismet-drone +$(call Package/kismet/Default) + DEPENDS+= +libpcap +libpcre + TITLE+= drone +endef + +define Package/kismet-drone/conffiles +/etc/kismet/kismet_drone.conf +endef + +define Package/kismet-drone/description +$(call Package/kismet/Default/description) + This package contains the kismet remote sniffing.and monitoring drone. +endef + +define Package/kismet-server +$(call Package/kismet/Default) + DEPENDS+= +libpcap +libpcre + TITLE+= server +endef + +define Package/kismet-server/conffiles +/etc/kismet/kismet.conf +endef + +define Package/kismet-server/description +$(call Package/kismet/Default/description) + This package contains the kismet server. +endef + +CONFIGURE_ARGS += \ + --sysconfdir=/etc/kismet \ + +CONFIGURE_VARS += \ + CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \ + LDFLAGS="$$$$LDFLAGS" \ + LIBS="-nodefaultlibs -luClibc++ -lm $(LIBGCC_S)" \ + CLIENTCLIBS="-nodefaultlibs -luClibc++ -lm $(LIBGCC_S)" \ + libnl1_LIBS="-libnl-tiny" + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + LD="$(TARGET_CXX)" \ + all +endef + +#FIXME: remove this package? +define Package/kismet/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/kismet $(1)/usr/bin/kismet +endef + +define Package/kismet-client/install + $(INSTALL_DIR) $(1)/etc/kismet/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet.conf $(1)/etc/kismet/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_client $(1)/usr/bin/ +endef + +define Package/kismet-drone/install + $(INSTALL_DIR) $(1)/etc/kismet/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet_drone.conf $(1)/etc/kismet/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_drone $(1)/usr/bin/ +endef + +define Package/kismet-server/install + $(INSTALL_DIR) $(1)/etc/kismet/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet.conf $(1)/etc/kismet/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_server $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,kismet-client)) +$(eval $(call BuildPackage,kismet-drone)) +$(eval $(call BuildPackage,kismet-server)) diff --git a/net/kismet/files/ap_manuf b/net/kismet/files/ap_manuf new file mode 100644 index 0000000..c77edfa --- /dev/null +++ b/net/kismet/files/ap_manuf @@ -0,0 +1,240 @@ +00:00:0C:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:00:74:00:00:00/FF:FF:FF:00:00:00 Ricoh Unknown 0 +00:00:92:00:00:00/FF:FF:FF:00:00:00 Cogent Unknown 0 +00:00:AA:00:00:00/FF:FF:FF:00:00:00 Xerox Unknown 0 +00:00:C5:00:00:00/FF:FF:FF:00:00:00 FarallonCo Unknown 0 +00:00:CE:00:00:00/FF:FF:FF:00:00:00 Megadata Unknown 0 +00:00:DE:00:00:00/FF:FF:FF:00:00:00 Unigraph Unknown 0 +00:01:03:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 +00:01:24:00:00:00/FF:FF:FF:00:00:00 SMC Unknown default 6 192.168.2.1 +00:01:24:24:00:00/FF:FF:FF:FF:00:00 SMC SMC7004AWBR default 6 192.168.2.1 +00:01:38:00:00:00/FF:FF:FF:00:00:00 XaviTechno Unknown 0 +00:01:95:00:00:00/FF:FF:FF:00:00:00 Sena Unknown 0 +00:01:E6:00:00:00/FF:FF:FF:00:00:00 Hewlett-Pa Unknown 0 +00:01:F4:00:00:00/FF:FF:FF:00:00:00 EnterasysN Unknown 0 +00:02:2D:00:00:00/FF:FF:FF:00:00:00 Lucent Unknown 0 +00:02:44:00:00:00/FF:FF:FF:00:00:00 Surecom Unknown 0 +00:02:6F:00:00:00/FF:FF:FF:00:00:00 Senao Unknown 0 +00:02:72:00:00:00/FF:FF:FF:00:00:00 Cc&C Unknown 0 +00:02:8A:00:00:00/FF:FF:FF:00:00:00 AmbitMicro Unknown 0 +00:02:A5:00:00:00/FF:FF:FF:00:00:00 Compaq Unknown 0 +00:02:B3:00:00:00/FF:FF:FF:00:00:00 Intel Unknown 0 +00:03:0A:00:00:00/FF:FF:FF:00:00:00 Argus Unknown 0 +00:03:2F:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown 0 +00:03:52:00:00:00/FF:FF:FF:00:00:00 Colubris Unknown 0 +00:03:93:00:00:00/FF:FF:FF:00:00:00 AppleCompu Unknown 0 +00:04:23:00:00:00/FF:FF:FF:00:00:00 Intel Unknown 0 +00:04:3A:3A:00:00/FF:FF:FF:FF:00:00 Avaya ad-01444 0 +00:04:5A:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:04:5A:0E:00:00/FF:FF:FF:FF:00:00 Linksys WAP11 linksys 6 192.168.1.1 +00:04:5A:2E:00:00/FF:FF:FF:FF:00:00 Linksys BEFW11S4 linksys 6 192.168.1.1 +00:04:5A:5A:00:00/FF:FF:FF:FF:00:00 Linksys BEFW11S4 linksys 6 192.168.1.1 +00:04:75:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 +00:04:75:75:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE20096A AP2000 Version 1 3Com 0 169.254.0.1 +00:04:76:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 +00:04:DB:00:00:00/FF:FF:FF:00:00:00 TellusGrou Unknown 0 +00:04:E2:00:00:00/FF:FF:FF:00:00:00 SMC Unknown 0 +00:04:E2:00:00:00/FF:FF:FF:00:00:00 SMC Unknown SMC 6 192.168.2.1 +00:04:E2:E2:00:00/FF:FF:FF:FF:00:00 SMC 7004AWBR default 6 192.168.2.1 +00:05:3C:00:00:00/FF:FF:FF:00:00:00 Xircom Unknown 0 +00:05:4E:00:00:00/FF:FF:FF:00:00:00 PhilipsCom Unknown 0 +00:05:5D:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown default 6 +00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-1000AP default 6 +00:05:87:00:00:00/FF:FF:FF:00:00:00 Locus Unknown 0 +00:06:25:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:06:25:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:06:25:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys-g 6 192.168.1.1 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys BEFW11S4 v2 linksys 6 192.168.1.1 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WET11 linksys 6 192.168.1.225 +00:06:B1:00:00:00/FF:FF:FF:00:00:00 Sonicwall Unknown 0 +00:07:0E:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:07:13:00:00:00/FF:FF:FF:00:00:00 IpOne Unknown 0 +00:07:40:00:00:00/FF:FF:FF:00:00:00 Melco Unknown 0 +00:07:50:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:07:85:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:07:EB:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:08:21:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:08:A1:00:00:00/FF:FF:FF:00:00:00 CnetTechno Unknown 0 +00:09:43:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:09:5B:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown 0 +00:09:5B:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown NETGEAR 11 192.168.0.1 +00:09:5B:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown Wireless 11 192.168.0.2 +00:09:5B:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown NETGEAR 11 192.168.0.1 +00:09:7C:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:09:92:92:00:00/FF:FF:FF:FF:00:00 Sweex LC000010 wireless 11 192.168.0.1 +00:09:B7:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:09:E8:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0A:04:00:00:00/FF:FF:FF:00:00:00 3comEurope Unknown 0 +00:0A:41:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0A:8A:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0A:8A:8A:00:00/FF:FF:FF:FF:00:00 Cisco AIR-AP1200 0 +00:0A:95:00:00:00/FF:FF:FF:00:00:00 AppleCompu Unknown 0 +00:0A:B7:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0A:E9:00:00:00/FF:FF:FF:00:00:00 Airvast Unknown 0 +00:0B:5F:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0B:6B:00:00:00/FF:FF:FF:00:00:00 WistronNew Unknown 0 +00:0B:6C:00:00:00/FF:FF:FF:00:00:00 Sychip Unknown 0 +00:0B:7D:00:00:00/FF:FF:FF:00:00:00 SolomonExt Unknown 0 +00:0B:85:00:00:00/FF:FF:FF:00:00:00 Airespace Unknown 0 +00:0B:86:00:00:00/FF:FF:FF:00:00:00 Aruba Unknown 0 +00:0B:AC:00:00:00/FF:FF:FF:00:00:00 3comEurope Unknown 0 +00:0B:BE:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0B:CD:00:00:00/FF:FF:FF:00:00:00 CompaqHp Unknown 0 +00:0B:FD:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0C:30:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0C:41:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:0C:85:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0C:CE:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0C:E5:00:00:00/FF:FF:FF:00:00:00 MotorolaBc Unknown 0 +00:0C:F1:00:00:00/FF:FF:FF:00:00:00 Intel Unknown 0 +00:0D:0B:00:00:00/FF:FF:FF:00:00:00 Melco Unknown 0 +00:0D:14:00:00:00/FF:FF:FF:00:00:00 VtechInnov Unknown 0 +00:0D:28:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0D:29:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0D:3A:00:00:00/FF:FF:FF:00:00:00 Microsoft Unknown 0 +00:0D:54:00:00:00/FF:FF:FF:00:00:00 3comEurope Unknown 0 +00:0D:65:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0D:72:00:00:00/FF:FF:FF:00:00:00 2wire Unknown 0 +00:0D:88:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown default 6 192.168.0.1 +00:0D:93:00:00:00/FF:FF:FF:00:00:00 AppleCompu Unknown 0 +00:0D:97:00:00:00/FF:FF:FF:00:00:00 Tropos Unknown 0 +00:0D:9D:00:00:00/FF:FF:FF:00:00:00 HewlettPac Unknown 0 +00:0D:BD:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0D:ED:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0E:35:00:00:00/FF:FF:FF:00:00:00 Intel Unknown 0 +00:0E:38:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0E:3B:00:00:00/FF:FF:FF:00:00:00 HawkingTec Unknown 0 +00:0E:58:00:00:00/FF:FF:FF:00:00:00 RinconNetw Unknown 0 +00:0E:6A:00:00:00/FF:FF:FF:00:00:00 3comEurope Unknown 0 +00:0E:7F:00:00:00/FF:FF:FF:00:00:00 HewlettPac Unknown 0 +00:0E:83:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0E:84:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0E:9B:00:00:00/FF:FF:FF:00:00:00 Private Unknown 0 +00:0E:A6:00:00:00/FF:FF:FF:00:00:00 AsustekCom Unknown 0 +00:0E:D7:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:23:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:24:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:34:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:3D:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown default 6 192.168.0.1 +00:0F:66:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:0F:8F:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:90:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:B5:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown NETGEAR 11 192.168.0.1 +00:0F:EA:00:00:00/FF:FF:FF:00:00:00 GigaByte Unknown 0 +00:0F:F7:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:F8:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:10:C6:00:00:00/FF:FF:FF:00:00:00 Usi Unknown 0 +00:10:E7:00:00:00/FF:FF:FF:00:00:00 Breezecom Unknown 0 +00:11:09:00:00:00/FF:FF:FF:00:00:00 Micro-Star Unknown 0 +00:11:0A:00:00:00/FF:FF:FF:00:00:00 HewlettPac Unknown 0 +00:11:20:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:11:21:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:11:24:00:00:00/FF:FF:FF:00:00:00 AppleCompu Unknown 0 +00:11:2F:00:00:00/FF:FF:FF:00:00:00 AsustekCom Unknown 0 +00:11:50:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown 0 +00:17:3F:00:00:00/FF:FF:FF:00:00:00 Belkin54g Unknown 0 +00:11:5C:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:11:88:00:00:00/FF:FF:FF:00:00:00 Enterasys Unknown 0 +00:11:92:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:11:93:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:11:95:00:00:00/FF:FF:FF:00:00:00 AlphaNetwo Unknown 0 +00:11:BB:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:11:D8:00:00:00/FF:FF:FF:00:00:00 AsustekCom Unknown 0 +00:11:F5:00:00:00/FF:FF:FF:00:00:00 Askey Unknown 0 +00:12:00:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:01:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:17:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:12:25:00:00:00/FF:FF:FF:00:00:00 MotorolaBc Unknown 0 +00:12:43:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:7F:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:80:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:88:00:00:00/FF:FF:FF:00:00:00 2wire Unknown 0 +00:12:D9:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:DA:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:F0:00:00:00/FF:FF:FF:00:00:00 IntelCorpo Unknown 0 +00:13:10:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:13:19:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:13:1A:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:13:46:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown 0 +00:13:60:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:13:7F:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:13:80:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:13:C4:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:20:00:00:00:00/FF:FF:FF:00:00:00 LexmarkInt Unknown 0 +00:20:A6:00:00:00/FF:FF:FF:00:00:00 Proxim Unknown 0 +00:20:D8:00:00:00/FF:FF:FF:00:00:00 Nortel Unknown 0 +00:20:E0:00:00:00/FF:FF:FF:00:00:00 Actiontec Unknown 0 +00:30:1A:00:00:00/FF:FF:FF:00:00:00 Smartbridge Unknown 0 +00:30:65:00:00:00/FF:FF:FF:00:00:00 Apple Unknown 0 +00:30:65:65:00:00/FF:FF:FF:FF:00:00 Apple Snow Base Station 1 +00:30:6E:00:00:00/FF:FF:FF:00:00:00 HP Unknown 0 +00:30:AB:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown 0 +00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MR314NA Wireless 1 192.168.0.1 +00:18:4D:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown 0 +00:30:BD:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown 0 +00:30:BD:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown WLAN 11 0.0.0.0 +00:30:BD:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown belkin54g 11 0.0.0.0 +00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6230-3 0 +00:30:F1:00:00:00/FF:FF:FF:00:00:00 AcctonTech Unknown 0 +00:40:01:00:00:00/FF:FF:FF:00:00:00 Zyxel Unknown 0 +00:40:05:00:00:00/FF:FF:FF:00:00:00 ANI Unknown default 6 192.168.0.1 +00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DI-614+ default 6 192.168.0.1 +00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DWL-900AP+ default 6 192.168.0.50 +00:40:26:00:00:00/FF:FF:FF:00:00:00 Buffalo Unknown 0 +00:40:26:26:00:00/FF:FF:FF:FF:00:00 Buffalo WLAR-L11G-L 0 +00:40:33:00:00:00/FF:FF:FF:00:00:00 Addtron Unknown 0 +00:40:36:00:00:00/FF:FF:FF:00:00:00 TribeCompu Unknown 0 +00:40:96:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown tsunami 6 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-AP342E2R tsunami 6 192.168.1.1 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AP-350 tsunami 7 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco Aironet 350 tsunami 6 +00:50:08:00:00:00/FF:FF:FF:00:00:00 Compaq Unknown 0 +00:50:18:00:00:00/FF:FF:FF:00:00:00 Amit Unknown 0 +00:50:8B:8B:00:00/FF:FF:FF:FF:00:00 Compaq WL400 - ETSI region compaq 11 +00:50:DA:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 +00:50:DA:DA:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE747A 0 +00:50:F2:00:00:00/FF:FF:FF:00:00:00 Microsoft Unknown MSHOME 6 192.168.2.1 +00:50:F2:F2:00:00/FF:FF:FF:FF:00:00 Microsoft MN-500 MSHOME 6 192.168.0.1 +00:50:FC:00:00:00/FF:FF:FF:00:00:00 Edimax Unknown 0 +00:60:01:00:00:00/FF:FF:FF:00:00:00 Lucent Unknown 0 +00:60:1D:00:00:00/FF:FF:FF:00:00:00 Orinoco Unknown 0 +00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Orinoco RG1000 0 +00:60:6D:00:00:00/FF:FF:FF:00:00:00 Cabletron Unknown 0 +00:60:B3:00:00:00/FF:FF:FF:00:00:00 Proxim Unknown 0 +00:80:37:37:00:00/FF:FF:FF:FF:00:00 Ericsson A11 (AP-4121-105M-ER-EU) 0 +00:80:48:00:00:00/FF:FF:FF:00:00:00 Compex Unknown 0 +00:80:C6:00:00:00/FF:FF:FF:00:00:00 SOHOware Unknown +00:80:C6:C6:00:00/FF:FF:FF:FF:00:00 SOHOware NetBlaster II +00:80:C8:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown default 6 192.168.0.1 +00:90:0E:00:00:00/FF:FF:FF:00:00:00 Handlink Unknown 0 +00:90:4B:4B:00:00/FF:FF:FF:FF:00:00 Linksys BEFW11S4 linksys 6 192.168.1.1 +00:90:4B:00:00:00/FF:FF:FF:00:00:00 Motorola Unknown 0 +00:90:4C:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown NETGEAR 11 192.168.0.1 +00:90:96:00:00:00/FF:FF:FF:00:00:00 Askey Unknown 0 +00:90:D1:00:00:00/FF:FF:FF:00:00:00 SMC Unknown WLAN 11 +00:90:D1:D1:00:00/FF:FF:FF:FF:00:00 SMC SMC2652W WLAN 11 +00:90:D1:D1:00:00/FF:FF:FF:FF:00:00 SMC SMC2682W BRIDGE 11 +00:A0:04:00:00:00/FF:FF:FF:00:00:00 3Com Unknown +00:A0:04:04:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE51196 +00:A0:C5:00:00:00/FF:FF:FF:00:00:00 Zyxel Unknown 0 +00:A0:F8:00:00:00/FF:FF:FF:00:00:00 Symbol Unknown +00:B0:64:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:C0:02:00:00:00/FF:FF:FF:00:00:00 Sercomm Unknown 0 +00:C0:49:00:00:00/FF:FF:FF:00:00:00 USRobotics Unknown 0 +00:D0:59:00:00:00/FF:FF:FF:00:00:00 AmbitMicro Unknown 0 +00:E0:00:00:00:00/FF:FF:FF:00:00:00 Fujitsu Unknown 0 +00:E0:29:00:00:00/FF:FF:FF:00:00:00 OEM Unknown +00:E0:63:00:00:00/FF:FF:FF:00:00:00 Cabletron Unknown 0 +00:E0:98:00:00:00/FF:FF:FF:00:00:00 Trend Unknown 0 +00:E0:B8:00:00:00/FF:FF:FF:00:00:00 Gateway2000 Unknown 0 +08:00:46:00:00:00/FF:FF:FF:00:00:00 Sony Unknown +00:14:BF:00:00:00/FF:FF:FF:00:00:00 linksys Unknown linksys 6 192.168.1.1 +00:14:6C:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown NETGEAR 11 192.168.0.1 +00:16:B6:00:00:00/FF:FF:FF:00:00:00 linksys Unknown linksys 6 192.168.1.1 +00:18:39:00:00:00/FF:FF:FF:00:00:00 linksys Unknown linksys 6 192.168.1.1 +00:18:F8:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown 0 +02:13:CE:00:00:00/FF:FF:FF:00:00:00 hpsetup Unknown 0 +00:15:E9:00:00:00/FF:FF:FF:00:00:00 dlink Unknown 0 +00:14:51:00:00:00/FF:FF:FF:00:00:00 AppleCompu Unknown 0 +00:C0:A8:00:00:00/FF:FF:FF:00:00:00 AMX Unknown 0 +00:16:CB:00:00:00/FF:FF:FF:00:00:00 Apple Macbook Pro 0 diff --git a/net/kismet/files/client_manuf b/net/kismet/files/client_manuf new file mode 100644 index 0000000..07a9bec --- /dev/null +++ b/net/kismet/files/client_manuf @@ -0,0 +1,455 @@ +00:00:22:22:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Silver 0 +00:00:8F:8F:00:00/FF:FF:FF:FF:00:00 BreezeCOM Breezenet Pro SA-PC 0 +00:01:03:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 +00:01:03:03:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE62092A +00:01:03:03:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE777A 0 +00:01:24:00:00:00/FF:FF:FF:00:00:00 SMC Unknown default 6 192.168.2.1 +00:01:F4:F4:00:00/FF:FF:FF:FF:00:00 Entrasys CSIBD-AB-S Roamabout 0 +00:02:2D:00:00:00/FF:FF:FF:00:00:00 Lucent Unknown 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Agere Orinoco Gold +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Agere PC24E-H-FC 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Avaya PC24E-H-ET +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Avaya PC24E-H-FC 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Avaya World Card Silver +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Buffalo WLI-PCM-L11 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Buffalo WLI-PCM-L11 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Buffalo WLI-PCM-L11GP 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Dell TrueMobile 1150 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Dell TrueMobile 1150 Mini-PCI 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Dell Truemobile 1150 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Dell true mobile 1150 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Gold +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Silver +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Silver +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Silver +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Silver +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent PC24E-H-FC 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent PC24E-H-FC 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent PC24E-H-FC 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN Silver 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN Silver (PC24E-H-FC) 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN-Silver +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN/IEEE Version 01.01 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco MiniPCI Card (embedded in Sony Laptop) 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Orinoco Gold wireless 3 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Orinoco Gold +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Orinoco Mini PCI Card 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco PC Card T2 Extended ORiNOCO Europe 128RC4 Kit Gold 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco PC24E-H-ET +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco PC24E-H-FC 0 +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Silver +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Silver +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Silver +00:02:2D:2D:00:00/FF:FF:FF:FF:00:00 Orinoco Silver +00:02:6F:00:00:00/FF:FF:FF:00:00:00 Senao Unknown 0 +00:02:6F:6F:00:00/FF:FF:FF:FF:00:00 Senao SL-2011 CD +00:02:6F:6F:00:00/FF:FF:FF:FF:00:00 Senao SL-2011CD 0 +00:02:6F:6F:00:00/FF:FF:FF:FF:00:00 Senao SL-2011CD +00:02:6F:6F:00:00/FF:FF:FF:FF:00:00 Senao SL-2511CD PLUS EXT2(F200) 0 +00:02:A5:00:00:00/FF:FF:FF:00:00:00 Compaq Unknown 0 +00:02:A5:A5:00:00/FF:FF:FF:FF:00:00 Compaq WL110 +00:02:A5:A5:00:00/FF:FF:FF:FF:00:00 Compaq WL110 REV.0A 0 +00:02:B3:B3:00:00/FF:FF:FF:FF:00:00 Intel WPC-2011BWW 0 +00:03:2F:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown 0 +00:03:2F:2F:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 0 +00:03:2F:2F:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 +00:03:2F:2F:00:00/FF:FF:FF:FF:00:00 Repotec GL241101 +00:04:5A:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown 0 +00:04:5A:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown Linksys 6 192.168.1.1 +00:04:5A:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:04:5A:5A:00:00/FF:FF:FF:FF:00:00 Linksys BEFW11S4 linksys 0 +00:04:5A:5A:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 +00:04:5A:5A:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 +00:04:5A:5A:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 +00:04:5A:5A:00:00/FF:FF:FF:FF:00:00 Linksys WUSB11 +00:04:75:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 +00:04:75:75:00:00/FF:FF:FF:FF:00:00 3Com 3CRSHPW696 0 +00:04:75:75:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE62092B 0 +00:04:75:75:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE62092B +00:04:DB:DB:00:00/FF:FF:FF:FF:00:00 Tellus TWL-C11 0 +00:04:E2:00:00:00/FF:FF:FF:00:00:00 SMC Unknown 0 +00:04:E2:E2:00:00/FF:FF:FF:FF:00:00 SMC SMC2632W 0 +00:04:E2:E2:00:00/FF:FF:FF:FF:00:00 SMC SMC2632W +00:04:E2:E2:00:00/FF:FF:FF:FF:00:00 SMC SMC2632W +00:04:E2:E2:00:00/FF:FF:FF:FF:00:00 SMC SMC2632W +00:04:E2:E2:00:00/FF:FF:FF:FF:00:00 SMC SMC2632W +00:05:3C:3C:00:00/FF:FF:FF:FF:00:00 Intel Intel MiniPCI High Rate Wireless (ISL3874A) 0 +00:05:5D:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown 0 +00:05:5D:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown default 6 +00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 Compaq HNW-100 0 +00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DCF-650W +00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 0 +00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 0 +00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 0 +00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 +00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 +00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 +00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 +00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 +00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650H +00:05:5D:5D:00:00/FF:FF:FF:FF:00:00 D-Link DWL-660 H/W:A1 F/W:4.04 0 +00:06:25:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown 0 +00:06:25:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 0 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 D-Link DCF-650W +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Dell True Mobile 1150 6 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys BEFW11S4 v2 linksys 6 192.168.1.1 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WCF11 0 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WCF11 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WCF12 0 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WCF12 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WCF12 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WMP11 0 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WMP11 v2.5 0 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 V.3 0 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v2.5 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v2.5 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 0 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 0 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 v3.0 0 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WPC11 ver.3 (FCC-ID: PKW-WPC11-V31[suggests V3.1]) 0 +00:06:25:25:00:00/FF:FF:FF:FF:00:00 Linksys WUSB11 v2.6 0 +00:07:0E:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:07:0E:0E:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 +00:07:0E:0E:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 +00:07:50:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:07:50:50:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 +00:07:50:50:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM350 0 +00:08:21:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:08:21:21:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 +00:08:21:21:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 +00:08:21:21:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 +00:08:21:21:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 +00:09:43:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:09:43:43:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 +00:09:5B:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown 0 +00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear MA401 0 +00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear MA401RA 0 +00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear MA401RA +00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear MA701 0 +00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear MA701 +00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear ma101 0 +00:09:5B:5B:00:00/FF:FF:FF:FF:00:00 Netgear wab501 0 +00:09:7C:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:09:7C:7C:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 +00:09:7C:7C:00:00/FF:FF:FF:FF:00:00 Cisco Cisco Aironet 352 802.11b pcmcia card 0 +00:09:92:92:00:00/FF:FF:FF:FF:00:00 Sweex LC500010 ATMEL PCMCIA FastVNET (502A-D) 0 +00:09:B7:B7:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 0 +00:09:B7:B7:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 0 +00:09:E8:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:09:E8:E8:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 +00:0A:41:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0A:41:41:00:00/FF:FF:FF:FF:00:00 Cisco AIR-LMC352 0 +00:0A:41:41:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 0 +00:0A:41:41:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 0 +00:0A:41:41:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 +00:0A:41:41:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 +00:0A:8A:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0A:8A:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0A:8A:8A:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 +00:0B:5F:5F:00:00/FF:FF:FF:FF:00:00 Cisco AIR-CB20A-A-K9 0 +00:20:A6:A6:00:00/FF:FF:FF:FF:00:00 Proxim Symphony (PC Card 4430) 0 +00:20:D6:D6:00:00/FF:FF:FF:FF:00:00 BreezeCOM Breezenet Pro.11 SA-PCR 0 +00:30:65:00:00:00/FF:FF:FF:00:00:00 Apple Unknown 0 +00:30:65:00:00:00/FF:FF:FF:00:00:00 Apple Unknown 0 +00:30:65:65:00:00/FF:FF:FF:FF:00:00 Apple Airport Card 2002 +00:16:CB:00:00:00/FF:FF:FF:00:00:00 Apple Macbook Pro 0 +00:30:AB:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown 0 +00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MA401 0 +00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MA401 +00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MA401 +00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MA401 +00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MA401 +00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear MR314 Wireless 1 192.168.0.1 +00:30:AB:AB:00:00/FF:FF:FF:FF:00:00 Netgear Netgear ma401 0 +00:30:BD:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown 0 +00:30:BD:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown 0 +00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6020 0 +00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6020 0 +00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6020 +00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6020 +00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6020 (Version 01.02) 0 +00:30:BD:BD:00:00/FF:FF:FF:FF:00:00 Belkin F5D6020u 0 +00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DI-614+ default 6 192.168.0.1 +00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DI-614+ 22Mbps router/AP/switch default 6 192.168.0.1 +00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DWL-520+ 0 +00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 0 +00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650 internet 8 +00:40:05:05:00:00/FF:FF:FF:FF:00:00 D-Link DWL-650+ wireless 6 192.168.0.1 +00:40:26:00:00:00/FF:FF:FF:00:00:00 Buffalo Unknown 0 +00:40:96:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:40:96:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown tsunami 6 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco 350 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PC4800 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 0 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 0 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM340 (Dell Rebrand) 0 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco AIR-PCM352 +00:40:96:96:00:00/FF:FF:FF:FF:00:00 Cisco PC 4800 DS PCI Adapter 0 +00:50:08:00:00:00/FF:FF:FF:00:00:00 Compaq Unknown 0 +00:50:08:08:00:00/FF:FF:FF:FF:00:00 Compaq WL100 0 +00:50:08:08:00:00/FF:FF:FF:FF:00:00 Compaq WL100 +00:50:8B:8B:00:00/FF:FF:FF:FF:00:00 Compaq Compaq WL100 compaq 0 +00:50:8B:8B:00:00/FF:FF:FF:FF:00:00 Compaq WL200 - ETSI region 0 +00:50:DA:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 +00:50:DA:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 +00:50:DA:DA:00:00/FF:FF:FF:FF:00:00 3Com 3CRWE73796B +00:50:F2:F2:00:00/FF:FF:FF:FF:00:00 Microsoft MN-510 0 +00:50:F2:F2:00:00/FF:FF:FF:FF:00:00 Microsoft Wireless Notebook Adapter MN-520 0 +00:60:01:00:00:00/FF:FF:FF:00:00:00 Lucent Unknown 0 +00:60:01:01:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN Silver +00:60:1D:00:00:00/FF:FF:FF:00:00:00 Lucent Unknown 0 +00:60:1D:00:00:00/FF:FF:FF:00:00:00 Orinoco Unknown 0 +00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent Lucent WaveLAN Turbo - Bronze, P/N: 011498/A 0 +00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent Orinoco Gold +00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent PC24E-00-FC 0 +00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent Silver +00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN Bronze +00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent WaveLAN Gold +00:60:1D:1D:00:00/FF:FF:FF:FF:00:00 Lucent Wavelan Turbo Bronze 0 +00:60:6D:00:00:00/FF:FF:FF:00:00:00 Cabletron Unknown 0 +00:60:6D:6D:00:00/FF:FF:FF:FF:00:00 Cabletron CSIBB-AA +00:60:6D:6D:00:00/FF:FF:FF:FF:00:00 Cabletron CSIBB-AA +00:60:6D:6D:00:00/FF:FF:FF:FF:00:00 Cabletron RoamAbout 802.11DS 0 +00:60:B3:00:00:00/FF:FF:FF:00:00:00 Proxim Unknown 0 +00:60:B3:6F:00:00/FF:FF:FF:FF:00:00 WMATA WashingtonMetroAreaTA 0 +00:60:B3:B3:00:00/FF:FF:FF:FF:00:00 3Com XI-815 0 +00:60:B3:B3:00:00/FF:FF:FF:FF:00:00 3Com Zcom WL2000D 0 +00:60:B3:B3:00:00/FF:FF:FF:FF:00:00 Proxim RangeLAN DS 0 +00:60:B3:B3:00:00/FF:FF:FF:FF:00:00 Proxim RangeLan DS 8430 +00:60:B3:B3:00:00/FF:FF:FF:FF:00:00 SMC SMC2642W +00:80:37:37:00:00/FF:FF:FF:FF:00:00 Ericsson C11 (LA-4121-102M-ER-EU) 0 +00:80:C6:00:00:00/FF:FF:FF:00:00:00 SOHOware Unknown 0 +00:90:4B:4B:00:00/FF:FF:FF:FF:00:00 Dell 1180 True Mobile PCI 0 +00:90:96:96:00:00/FF:FF:FF:FF:00:00 Yakumo WLAN PCMCIA Card 11 Mbps 0 +00:90:D1:00:00:00/FF:FF:FF:00:00:00 LeArtery Unknown 0 +00:90:D1:00:00:00/FF:FF:FF:00:00:00 SMC Unknown WLAN 11 +00:90:D1:D1:00:00/FF:FF:FF:FF:00:00 LeArtery SyncByAir LN101 +00:90:D1:D1:00:00/FF:FF:FF:FF:00:00 SMC 2662W 0 +00:90:D1:D1:00:00/FF:FF:FF:FF:00:00 SMC SMC2632W 0 +00:A0:04:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 +00:A0:65:65:00:00/FF:FF:FF:FF:00:00 Nexland Zcom XI-300 0 +00:A0:F8:00:00:00/FF:FF:FF:00:00:00 Symbol Unknown 0 +00:A0:F8:F8:00:00/FF:FF:FF:FF:00:00 Symbol Spectrum 24 High Rate 11MBps wireless LAN adapter 0 +00:A0:F8:F8:00:00/FF:FF:FF:FF:00:00 Symbol Spectrum24 +00:C0:49:49:00:00/FF:FF:FF:FF:00:00 US Robotics USR1120 0 +00:E0:29:00:00:00/FF:FF:FF:00:00:00 OEM Unknown 0 +00:E0:29:29:00:00/FF:FF:FF:FF:00:00 OEM OEM +00:E0:29:29:00:00/FF:FF:FF:FF:00:00 SMC 2632W 0 +00:E0:29:29:00:00/FF:FF:FF:FF:00:00 SMC EZ-Connect Wireless 0 +08:00:46:00:00:00/FF:FF:FF:00:00:00 Sony Unknown 0 +08:00:46:46:00:00/FF:FF:FF:FF:00:00 Sony PCWA-C100 +00:00:0C:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:00:74:00:00:00/FF:FF:FF:00:00:00 Ricoh Unknown 0 +00:00:92:00:00:00/FF:FF:FF:00:00:00 Cogent Unknown 0 +00:00:AA:00:00:00/FF:FF:FF:00:00:00 Xerox Unknown 0 +00:00:C5:00:00:00/FF:FF:FF:00:00:00 FarallonCo Unknown 0 +00:00:CE:00:00:00/FF:FF:FF:00:00:00 Megadata Unknown 0 +00:00:DE:00:00:00/FF:FF:FF:00:00:00 Unigraph Unknown 0 +00:01:03:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 +00:01:24:00:00:00/FF:FF:FF:00:00:00 SMC Unknown default 6 192.168.2.1 +00:01:38:00:00:00/FF:FF:FF:00:00:00 XaviTechno Unknown 0 +00:01:95:00:00:00/FF:FF:FF:00:00:00 Sena Unknown 0 +00:01:E6:00:00:00/FF:FF:FF:00:00:00 Hewlett-Pa Unknown 0 +00:01:F4:00:00:00/FF:FF:FF:00:00:00 EnterasysN Unknown 0 +00:02:2D:00:00:00/FF:FF:FF:00:00:00 Lucent Unknown 0 +00:02:44:00:00:00/FF:FF:FF:00:00:00 Surecom Unknown 0 +00:02:6F:00:00:00/FF:FF:FF:00:00:00 Senao Unknown 0 +00:02:72:00:00:00/FF:FF:FF:00:00:00 Cc&C Unknown 0 +00:02:8A:00:00:00/FF:FF:FF:00:00:00 AmbitMicro Unknown 0 +00:02:A5:00:00:00/FF:FF:FF:00:00:00 Compaq Unknown 0 +00:02:B3:00:00:00/FF:FF:FF:00:00:00 Intel Unknown 0 +00:03:0A:00:00:00/FF:FF:FF:00:00:00 Argus Unknown 0 +00:03:2F:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown 0 +00:03:52:00:00:00/FF:FF:FF:00:00:00 Colubris Unknown 0 +00:03:93:00:00:00/FF:FF:FF:00:00:00 AppleCompu Unknown 0 +00:04:23:00:00:00/FF:FF:FF:00:00:00 Intel Unknown 0 +00:04:5A:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:04:75:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 +00:04:76:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 +00:04:DB:00:00:00/FF:FF:FF:00:00:00 TellusGrou Unknown 0 +00:04:E2:00:00:00/FF:FF:FF:00:00:00 SMC Unknown 0 +00:04:E2:00:00:00/FF:FF:FF:00:00:00 SMC Unknown SMC 6 192.168.2.1 +00:05:3C:00:00:00/FF:FF:FF:00:00:00 Xircom Unknown 0 +00:05:4E:00:00:00/FF:FF:FF:00:00:00 PhilipsCom Unknown 0 +00:05:5D:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown default 6 +00:05:87:00:00:00/FF:FF:FF:00:00:00 Locus Unknown 0 +00:06:25:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:06:25:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:06:25:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys-g 6 192.168.1.1 +00:06:B1:00:00:00/FF:FF:FF:00:00:00 Sonicwall Unknown 0 +00:07:0E:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:07:13:00:00:00/FF:FF:FF:00:00:00 IpOne Unknown 0 +00:07:40:00:00:00/FF:FF:FF:00:00:00 Melco Unknown 0 +00:07:50:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:07:85:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:07:EB:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:08:21:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:08:A1:00:00:00/FF:FF:FF:00:00:00 CnetTechno Unknown 0 +00:09:43:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:09:5B:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown 0 +00:09:5B:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown NETGEAR 11 192.168.0.1 +00:09:5B:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown Wireless 11 192.168.0.2 +00:09:5B:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown NETGEAR 11 192.168.0.1 +00:09:7C:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:09:B7:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:09:E8:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0A:04:00:00:00/FF:FF:FF:00:00:00 3comEurope Unknown 0 +00:0A:41:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0A:8A:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0A:95:00:00:00/FF:FF:FF:00:00:00 AppleCompu Unknown 0 +00:0A:B7:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0A:E9:00:00:00/FF:FF:FF:00:00:00 Airvast Unknown 0 +00:0B:5F:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0B:6B:00:00:00/FF:FF:FF:00:00:00 WistronNew Unknown 0 +00:0B:6C:00:00:00/FF:FF:FF:00:00:00 Sychip Unknown 0 +00:0B:7D:00:00:00/FF:FF:FF:00:00:00 SolomonExt Unknown 0 +00:0B:85:00:00:00/FF:FF:FF:00:00:00 Airespace Unknown 0 +00:0B:86:00:00:00/FF:FF:FF:00:00:00 Aruba Unknown 0 +00:0B:AC:00:00:00/FF:FF:FF:00:00:00 3comEurope Unknown 0 +00:0B:BE:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0B:CD:00:00:00/FF:FF:FF:00:00:00 CompaqHp Unknown 0 +00:0B:FD:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0C:30:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0C:41:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:0C:85:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0C:CE:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0C:E5:00:00:00/FF:FF:FF:00:00:00 MotorolaBc Unknown 0 +00:0C:F1:00:00:00/FF:FF:FF:00:00:00 Intel Unknown 0 +00:0D:0B:00:00:00/FF:FF:FF:00:00:00 Melco Unknown 0 +00:0D:14:00:00:00/FF:FF:FF:00:00:00 VtechInnov Unknown 0 +00:0D:28:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0D:29:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0D:3A:00:00:00/FF:FF:FF:00:00:00 Microsoft Unknown 0 +00:0D:54:00:00:00/FF:FF:FF:00:00:00 3comEurope Unknown 0 +00:0D:65:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0D:72:00:00:00/FF:FF:FF:00:00:00 2wire Unknown 0 +00:0D:88:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown default 6 192.168.0.1 +00:0D:93:00:00:00/FF:FF:FF:00:00:00 AppleCompu Unknown 0 +00:0D:97:00:00:00/FF:FF:FF:00:00:00 Tropos Unknown 0 +00:0D:9D:00:00:00/FF:FF:FF:00:00:00 HewlettPac Unknown 0 +00:0D:BD:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0D:ED:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0E:35:00:00:00/FF:FF:FF:00:00:00 Intel Unknown 0 +00:0E:38:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0E:3B:00:00:00/FF:FF:FF:00:00:00 HawkingTec Unknown 0 +00:0E:58:00:00:00/FF:FF:FF:00:00:00 RinconNetw Unknown 0 +00:0E:6A:00:00:00/FF:FF:FF:00:00:00 3comEurope Unknown 0 +00:0E:7F:00:00:00/FF:FF:FF:00:00:00 HewlettPac Unknown 0 +00:0E:83:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0E:84:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0E:9B:00:00:00/FF:FF:FF:00:00:00 Private Unknown 0 +00:0E:A6:00:00:00/FF:FF:FF:00:00:00 AsustekCom Unknown 0 +00:0E:D7:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:23:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:24:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:34:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:3D:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown default 6 192.168.0.1 +00:0F:66:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:0F:8F:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:90:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:B5:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown NETGEAR 11 192.168.0.1 +00:0F:EA:00:00:00/FF:FF:FF:00:00:00 GigaByte Unknown 0 +00:0F:F7:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:0F:F8:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:10:C6:00:00:00/FF:FF:FF:00:00:00 Usi Unknown 0 +00:10:E7:00:00:00/FF:FF:FF:00:00:00 Breezecom Unknown 0 +00:11:09:00:00:00/FF:FF:FF:00:00:00 Micro-Star Unknown 0 +00:11:0A:00:00:00/FF:FF:FF:00:00:00 HewlettPac Unknown 0 +00:11:20:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:11:21:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:11:24:00:00:00/FF:FF:FF:00:00:00 AppleCompu Unknown 0 +00:11:2F:00:00:00/FF:FF:FF:00:00:00 AsustekCom Unknown 0 +00:11:50:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown 0 +00:11:5C:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:11:88:00:00:00/FF:FF:FF:00:00:00 Enterasys Unknown 0 +00:11:92:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:11:93:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:11:95:00:00:00/FF:FF:FF:00:00:00 AlphaNetwo Unknown 0 +00:11:BB:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:11:D8:00:00:00/FF:FF:FF:00:00:00 AsustekCom Unknown 0 +00:11:F5:00:00:00/FF:FF:FF:00:00:00 Askey Unknown 0 +00:12:00:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:01:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:17:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:12:25:00:00:00/FF:FF:FF:00:00:00 MotorolaBc Unknown 0 +00:12:43:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:7F:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:80:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:88:00:00:00/FF:FF:FF:00:00:00 2wire Unknown 0 +00:12:D9:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:DA:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:12:F0:00:00:00/FF:FF:FF:00:00:00 IntelCorpo Unknown 0 +00:13:10:00:00:00/FF:FF:FF:00:00:00 Linksys Unknown linksys 6 192.168.1.1 +00:13:19:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:13:1A:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:13:46:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown 0 +00:13:60:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:13:7F:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:13:80:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:13:C4:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:20:00:00:00:00/FF:FF:FF:00:00:00 LexmarkInt Unknown 0 +00:20:A6:00:00:00/FF:FF:FF:00:00:00 Proxim Unknown 0 +00:20:D8:00:00:00/FF:FF:FF:00:00:00 Nortel Unknown 0 +00:20:E0:00:00:00/FF:FF:FF:00:00:00 Actiontec Unknown 0 +00:30:1A:00:00:00/FF:FF:FF:00:00:00 Smartbridge Unknown 0 +00:30:65:00:00:00/FF:FF:FF:00:00:00 Apple Unknown 0 +00:30:6E:00:00:00/FF:FF:FF:00:00:00 HP Unknown 0 +00:30:AB:00:00:00/FF:FF:FF:00:00:00 Netgear Unknown 0 +00:30:BD:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown 0 +00:30:BD:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown WLAN 11 0.0.0.0 +00:30:BD:00:00:00/FF:FF:FF:00:00:00 Belkin Unknown belkin54g 11 0.0.0.0 +00:30:F1:00:00:00/FF:FF:FF:00:00:00 AcctonTech Unknown 0 +00:40:01:00:00:00/FF:FF:FF:00:00:00 Zyxel Unknown 0 +00:40:05:00:00:00/FF:FF:FF:00:00:00 ANI Unknown default 6 192.168.0.1 +00:40:26:00:00:00/FF:FF:FF:00:00:00 Buffalo Unknown 0 +00:40:33:00:00:00/FF:FF:FF:00:00:00 Addtron Unknown 0 +00:40:36:00:00:00/FF:FF:FF:00:00:00 TribeCompu Unknown 0 +00:40:96:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown tsunami 6 +00:50:08:00:00:00/FF:FF:FF:00:00:00 Compaq Unknown 0 +00:50:18:00:00:00/FF:FF:FF:00:00:00 Amit Unknown 0 +00:50:DA:00:00:00/FF:FF:FF:00:00:00 3Com Unknown 0 +00:50:F2:00:00:00/FF:FF:FF:00:00:00 Microsoft Unknown MSHOME 6 192.168.2.1 +00:50:FC:00:00:00/FF:FF:FF:00:00:00 Edimax Unknown 0 +00:60:01:00:00:00/FF:FF:FF:00:00:00 Lucent Unknown 0 +00:60:1D:00:00:00/FF:FF:FF:00:00:00 Orinoco Unknown 0 +00:60:6D:00:00:00/FF:FF:FF:00:00:00 Cabletron Unknown 0 +00:60:B3:00:00:00/FF:FF:FF:00:00:00 Proxim Unknown 0 +00:80:48:00:00:00/FF:FF:FF:00:00:00 Compex Unknown 0 +00:80:C6:00:00:00/FF:FF:FF:00:00:00 SOHOware Unknown +00:80:C8:00:00:00/FF:FF:FF:00:00:00 D-Link Unknown default 6 192.168.0.1 +00:90:0E:00:00:00/FF:FF:FF:00:00:00 Handlink Unknown 0 +00:90:4C:00:00:00/FF:FF:FF:00:00:00 Netgear/Epigram Unknown NETGEAR 11 192.168.0.1 +00:90:96:00:00:00/FF:FF:FF:00:00:00 Askey Unknown 0 +00:90:D1:00:00:00/FF:FF:FF:00:00:00 SMC Unknown WLAN 11 +00:A0:04:00:00:00/FF:FF:FF:00:00:00 3Com Unknown +00:A0:C5:00:00:00/FF:FF:FF:00:00:00 Zyxel Unknown 0 +00:A0:F8:00:00:00/FF:FF:FF:00:00:00 Symbol Unknown +00:B0:64:00:00:00/FF:FF:FF:00:00:00 Cisco Unknown 0 +00:C0:02:00:00:00/FF:FF:FF:00:00:00 Sercomm Unknown 0 +00:C0:49:00:00:00/FF:FF:FF:00:00:00 USRobotics Unknown 0 +00:D0:59:00:00:00/FF:FF:FF:00:00:00 AmbitMicro Unknown 0 +00:E0:00:00:00:00/FF:FF:FF:00:00:00 Fujitsu Unknown 0 +00:E0:29:00:00:00/FF:FF:FF:00:00:00 OEM Unknown +00:E0:63:00:00:00/FF:FF:FF:00:00:00 Cabletron Unknown 0 +00:E0:98:00:00:00/FF:FF:FF:00:00:00 Trend Unknown 0 +00:E0:B8:00:00:00/FF:FF:FF:00:00:00 Gateway2000 Unknown 0 +08:00:46:00:00:00/FF:FF:FF:00:00:00 Sony Unknown +00:14:BF:00:00:00/FF:FF:FF:00:00:00 linksys Unknown 0 +00:14:6C:00:00:00/FF:FF:FF:00:00:00 NETGEAR Unknown 0 +00:16:B6:00:00:00/FF:FF:FF:00:00:00 linksys Unknown linksys 6 192.168.1.1 +02:12:F0:00:00:00/FF:FF:FF:00:00:00 hpsetup Unknown 0 +02:13:CE:00:00:00/FF:FF:FF:00:00:00 hpsetup Unknown 0 +00:15:E9:00:00:00/FF:FF:FF:00:00:00 dlink Unknown 0 +00:17:9A:00:00:00/FF:FF:FF:00:00:00 dlink Unknown 0 +00:13:F7:00:00:00/FF:FF:FF:00:00:00 SMC Unknown 0 diff --git a/net/kismet/files/kismet.conf b/net/kismet/files/kismet.conf new file mode 100644 index 0000000..3a11720 --- /dev/null +++ b/net/kismet/files/kismet.conf @@ -0,0 +1,287 @@ +# Kismet config file +# Most of the "static" configs have been moved to here -- the command line +# config was getting way too crowded and cryptic. We want functionality, +# not continually reading --help! + +# Version of Kismet config +version=2005.01.R1 + +# Name of server (Purely for organiational purposes) +servername=Kismet + +# User to setid to (should be your normal user) +suiduser=nobody + +# Sources are defined as: +# source=cardtype,interface,name[,initialchannel] +# Card types and required drivers are listed in the README. +# The initial channel is optional, if hopping is not enabled it can be used +# to set the channel the interface listens on. +# YOU MUST CHANGE THIS TO BE THE SOURCE YOU WANT TO USE +source=wrt54g,eth1,wireless +# For v1 hardware uncomment this: +# source=wrt54g,eth2,wireless + +# Comma-separated list of sources to enable. This is only needed if you defined +# multiple sources and only want to enable some of them. By default, all defined +# sources are enabled. +# For example: +# enablesources=prismsource,ciscosource + +# Do we channelhop? +channelhop=true + +# How many channels per second do we hop? (1-10) +channelvelocity=5 + +# By setting the dwell time for channel hopping we override the channelvelocity +# setting above and dwell on each channel for the given number of seconds. +#channeldwell=10 + +# Do we split channels between cards on the same spectrum? This means if +# multiple 802.11b capture sources are defined, they will be offset to cover +# the most possible spectrum at a given time. This also controls splitting +# fine-tuned sourcechannels lines which cover multiple interfaces (see below) +channelsplit=true + +# Basic channel hopping control: +# These define the channels the cards hop through for various frequency ranges +# supported by Kismet. More finegrain control is available via the +# "sourcechannels" configuration option. +# +# Don't change the IEEE80211 identifiers or channel hopping won't work. + +# Users outside the US might want to use this list: +# defaultchannels=IEEE80211b:1,7,13,2,8,3,14,9,4,10,5,11,6,12 +defaultchannels=IEEE80211b:1,6,11,2,7,3,8,4,9,5,10 + +# 802.11g uses the same channels as 802.11b... +defaultchannels=IEEE80211g:1,6,11,2,7,3,8,4,9,5,10 + +# 802.11a channels are non-overlapping so sequential is fine. You may want to +# adjust the list depending on the channels your card actually supports. +# defaultchannels=IEEE80211a:36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,184,188,192,196,200,204,208,212,216 +defaultchannels=IEEE80211a:36,40,44,48,52,56,60,64 + +# Combo cards like Atheros use both 'a' and 'b/g' channels. Of course, you +# can also explicitly override a given source. You can use the script +# extras/listchan.pl to extract all the channels your card supports. +defaultchannels=IEEE80211ab:1,6,11,2,7,3,8,4,9,5,10,36,40,44,48,52,56,60,64 + +# Fine-tuning channel hopping control: +# The sourcechannels option can be used to set the channel hopping for +# specific interfaces, and to control what interfaces share a list of +# channels for split hopping. This can also be used to easily lock +# one card on a single channel while hopping with other cards. +# Any card without a sourcechannel definition will use the standard hopping +# list. +# sourcechannels=sourcename[,sourcename]:ch1,ch2,ch3,...chN + +# ie, for us channels on the source 'prism2source' (same as normal channel +# hopping behavior): +# sourcechannels=prism2source:1,6,11,2,7,3,8,4,9,5,10 + +# Given two capture sources, "prism2a" and "prism2b", we want prism2a to stay +# on channel 6 and prism2b to hop normally. By not setting a sourcechannels +# line for prism2b, it will use the standard hopping. +# sourcechannels=prism2a:6 + +# To assign the same custom hop channel to multiple sources, or to split the +# same custom hop channel over two sources (if splitchannels is true), list +# them all on the same sourcechannels line: +# sourcechannels=prism2a,prism2b,prism2c:1,6,11 + +# Port to serve GUI data +tcpport=2501 +# People allowed to connect, comma seperated IP addresses or network/mask +# blocks. Netmasks can be expressed as dotted quad (/255.255.255.0) or as +# numbers (/24) +allowedhosts=127.0.0.1 +# Maximum number of concurrent GUI's +maxclients=5 + +# Do we have a GPS? +gps=false +# Host:port that GPSD is running on. This can be localhost OR remote! +gpshost=localhost:2947 +# Do we lock the mode? This overrides coordinates of lock "0", which will +# generate some bad information until you get a GPS lock, but it will +# fix problems with GPS units with broken NMEA that report lock 0 +gpsmodelock=false + +# Packet filtering options: +# filter_tracker - Packets filtered from the tracker are not processed or +# recorded in any way. +# filter_dump - Packets filtered at the dump level are tracked, displayed, +# and written to the csv/xml/network/etc files, but not +# recorded in the packet dump +# filter_export - Controls what packets influence the exported CSV, network, +# xml, gps, etc files. +# All filtering options take arguments containing the type of address and +# addresses to be filtered. Valid address types are 'ANY', 'BSSID', +# 'SOURCE', and 'DEST'. Filtering can be inverted by the use of '!' before +# the address. For example, +# filter_tracker=ANY(!00:00:DE:AD:BE:EF) +# has the same effect as the previous mac_filter config file option. +# filter_tracker=... +# filter_dump=... +# filter_export=... + +# Alerts to be reported and the throttling rates. +# alert=name,throttle/unit,burst +# The throttle/unit describes the number of alerts of this type that are +# sent per time unit. Valid time units are second, minute, hour, and day. +# Burst describes the number of alerts sent before throttling takes place. +# For example: +# alert=FOO,10/min,5 +# Would allow 5 alerts through before throttling is enabled, and will then +# limit the number of alerts to 10 per minute. +# A throttle rate of 0 disables throttling of the alert. +# See the README for a list of alert types. +alert=NETSTUMBLER,5/min,2 +alert=WELLENREITER,5/min,2 +alert=LUCENTTEST,5/min,2 +alert=DEAUTHFLOOD,5/min,4 +alert=BCASTDISCON,5/min,4 +alert=CHANCHANGE,5/min,4 +alert=AIRJACKSSID,5/min,2 +alert=PROBENOJOIN,5/min,2 +alert=DISASSOCTRAFFIC,5/min,2 +alert=NULLPROBERESP,5/min,5 +alert=BSSTIMESTAMP,5/min,5 +alert=MSFBCOMSSID,10/min,1/sec +alert=LONGSSID,10/min,1/sec +alert=MSFDLINKRATE,10/min,1/sec +alert=MSFNETGEARBEACON,10/min,1/sec +alert=DISCONCODEINVALID,10/min,1/sec +alert=DEAUTHCODEINVALID,10/min,1/sec + +# Known WEP keys to decrypt, bssid,hexkey. This is only for networks where +# the keys are already known, and it may impact throughput on slower hardware. +# Multiple wepkey lines may be used for multiple BSSIDs. +# wepkey=00:DE:AD:C0:DE:00,FEEDFACEDEADBEEF01020304050607080900 + +# Is transmission of the keys to the client allowed? This may be a security +# risk for some. If you disable this, you will not be able to query keys from +# a client. +allowkeytransmit=true + +# How often (in seconds) do we write all our data files (0 to disable) +writeinterval=300 + +# Where do we get our manufacturer fingerprints from? Assumed to be in the +# default config directory if an absolute path is not given. +ap_manuf=ap_manuf +client_manuf=client_manuf + +# Use metric measurements in the output? +metric=false + +# Do we write waypoints for gpsdrive to load? Note: This is NOT related to +# recent versions of GPSDrive's native support of Kismet. +waypoints=false +# GPSMap waypoint file. This WILL be truncated. +waypointdata=%h/.gpsdrive/way_kismet.txt + +# How many alerts do we backlog for new clients? Only change this if you have +# a -very- low memory system and need those extra bytes, or if you have a high +# memory system and a huge number of alert conditions. +alertbacklog=50 + +# File types to log, comma seperated +# dump - raw packet dump +# network - plaintext detected networks +# csv - plaintext detected networks in CSV format +# xml - XML formatted network and cisco log +# weak - weak packets (in airsnort format) +# cisco - cisco equipment CDP broadcasts +# gps - gps coordinates +logtypes=dump,network,csv,xml,weak,cisco,gps + +# Do we track probe responses and merge probe networks into their owners? +# This isn't always desireable, depending on the type of monitoring you're +# trying to do. +trackprobenets=true + +# Do we log "noise" packets that we can't decipher? I tend to not, since +# they don't have anything interesting at all in them. +noiselog=false + +# Do we log corrupt packets? Corrupt packets have enough header information +# to see what they are, but someting is wrong with them that prevents us from +# completely dissecting them. Logging these is usually not a bad idea. +corruptlog=true + +# Do we log beacon packets or do we filter them out of the dumpfile +beaconlog=true + +# Do we log PHY layer packets or do we filter them out of the dumpfile +phylog=true + +# Do we mangle packets if we can decrypt them or if they're fuzzy-detected +mangledatalog=true + +# Do we do "fuzzy" crypt detection? (byte-based detection instead of 802.11 +# frame headers) +# valid option: Comma seperated list of card types to perform fuzzy detection +# on, or 'all' +fuzzycrypt=wtapfile,wlanng,wlanng_legacy,wlanng_avs,hostap,wlanng_wext + +# What type of dump do we generate? +# valid option: "wiretap" +dumptype=wiretap +# Do we limit the size of dump logs? Sometimes ethereal can't handle big ones. +# 0 = No limit +# Anything else = Max number of packets to log to a single file before closing +# and opening a new one. +dumplimit=0 + +# Do we write data packets to a FIFO for an external data-IDS (such as Snort)? +# See the docs before enabling this. +#fifo=/tmp/kismet_dump + +# Default log title +logdefault=Kismet + +# logtemplate - Filename logging template. +# This is, at first glance, really nasty and ugly, but you'll hardly ever +# have to touch it so don't complain too much. +# +# %n is replaced by the logging instance name +# %d is replaced by the current date as Mon-DD-YYYY +# %D is replaced by the current date as YYYYMMDD +# %t is replaced by the starting log time +# %i is replaced by the increment log in the case of multiple logs +# %l is replaced by the log type (dump, status, crypt, etc) +# %h is replaced by the home directory +# ie, "netlogs/%n-%d-%i.dump" called with a logging name of "Pok" could expand +# to something like "netlogs/Pok-Dec-20-01-1.dump" for the first instance and +# "netlogs/Pok-Dec-20-01-2.%l" for the second logfile generated. +# %h/netlots/%n-%d-%i.dump could expand to +# /home/foo/netlogs/Pok-Dec-20-01-2.dump +# +# Other possibilities: Sorting by directory +# logtemplate=%l/%n-%d-%i +# Would expand to, for example, +# dump/Pok-Dec-20-01-1 +# crypt/Pok-Dec-20-01-1 +# and so on. The "dump", "crypt", etc, dirs must exist before kismet is run +# in this case. +logtemplate=%n-%d-%i.%l + +# Where do we store the pid file of the server? +piddir=/var/run/ + +# Where state info, etc, is stored. You shouldnt ever need to change this. +# This is a directory. +configdir=%h/.kismet/ + +# cloaked SSID file. You shouldn't ever need to change this. +ssidmap=ssid_map + +# Group map file. You shouldn't ever need to change this. +groupmap=group_map + +# IP range map file. You shouldn't ever need to change this. +ipmap=ip_map + diff --git a/net/kismet/files/kismet_drone.conf b/net/kismet/files/kismet_drone.conf new file mode 100644 index 0000000..901b5b8 --- /dev/null +++ b/net/kismet/files/kismet_drone.conf @@ -0,0 +1,121 @@ +# Kismet drone config file + +version=2005.04.R1 + +# Name of server (Purely for organiational purposes) +servername=Kismet + +# User to setid to (should be your normal user) +suiduser=nobody + +# Port to serve packet data... This probably shouldn't be the same as the port +# you configured kismet_server for, or else you'll have problems running them +# on the same system. +tcpport=3501 +# People allowed to connect, comma seperated IP addresses or network/mask +# blocks. Netmasks can be expressed as dotted quad (/255.255.255.0) or as +# numbers (/24) +allowedhosts=127.0.0.1 +# Maximum number of concurrent stream attachments +maxclients=5 + +# Packet sources: +# source=capture_cardtype,capture_interface,capture_name +# Card type - Specifies the type of device. It can be one of: +# cisco - Cisco card with Linux Kernel drivers +# cisco_cvs - Cisco card with CVS Linux drivers +# cisco_bsd - Cisco on *BSD +# prism2 - Prism2 using wlan-ng drivers with pcap support (all +# current versions support pcap) +# prism2_hostap - Prism2 using hostap drivers +# prism2_legacy - Prism2 using wlan-ng drivers without pcap support (0.1.9) +# prism2_bsd - Prism2 on *BSD +# orinoco - Orinoco cards using Snax's patched driers +# generic - Generic card with no specific support. You will have +# to put this into monitor mode yourself! +# wsp100 - WSP100 embedded remote sensor. +# wtapfile - Saved file of packets readable by libwiretap +# ar5k - ar5k 802.11a using the vt_ar5k drivers +# Capture interface - Specifies the network interface Kismet will watch for +# packets to come in on. Typically "ethX" or "wlanX". For the WSP100 capture +# engine, the WSP100 device sends packets via a UDP stream, so the capture +# interface should be in the form of host:port where 'host' is the WSP100 and +# 'port' is the local UDP port that it will send data to. +# Capture Name - The name Kismet uses for this capture source. This is the +# name used to specify what sources to enable. +# +# To enable multiple sources, specify a source line for each and then use the +# enablesources line to enable them. For example: +# source=prism2,wlan0,prism +# source=cisco,eth0,cisco +source=wrt54g,eth1,wireless +# For v1 hardware uncomment this: +# source=wrt54g,eth2,wireless + +# Comma-separated list of sources to enable. This is only needed if you wish +# to selectively enable multiple sources. +# enablesources=prism,cisco + +# Do we channelhop? +channelhop=true + +# How many channels per second do we hop? (1-10) +channelvelocity=5 + +# By setting the dwell time for channel hopping we override the channelvelocity +# setting above and dwell on each channel for the given number of seconds. +#channeldwell=10 + +# Do we split channels between cards on the same spectrum? This means if +# multiple 802.11b capture sources are defined, they will be offset to cover +# the most possible spectrum at a given time. This also controls splitting +# fine-tuned sourcechannels lines which cover multiple interfaces (see below) +splitchannels=true + +# Basic channel hopping control: +# These define the channels the cards hop through for various frequency ranges +# supported by Kismet. More finegrain control is available via the +# "sourcechannels" configuration option. +# +# Don't change the IEEE80211 identifiers or channel hopping won't work. + +# Users outside the US might want to use this list: +# defaultchannels=IEEE80211b:1,7,13,2,8,3,14,9,4,10,5,11,6,12 +defaultchannels=IEEE80211b:1,6,11,2,7,3,8,4,9,5,10 + +# 802.11g uses the same channels as 802.11b... +defaultchannels=IEEE80211g:1,6,11,2,7,3,8,4,9,5,10 + +# 802.11a channels are non-overlapping so sequential is fine. You may want to +# adjust the list depending on the channels your card actually supports. +# defaultchannels=IEEE80211a:36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,184,188,192,196,200,204,208,212,216 +defaultchannels=IEEE80211a:36,40,44,48,52,56,60,64 + +# Combo cards like Atheros use both 'a' and 'b/g' channels. Of course, you +# can also explicitly override a given source. You can use the script +# extras/listchan.pl to extract all the channels your card supports. +defaultchannels=IEEE80211ab:1,6,11,2,7,3,8,4,9,5,10,36,40,44,48,52,56,60,64 + +# Fine-tuning channel hopping control: +# The sourcechannels option can be used to set the channel hopping for +# specific interfaces, and to control what interfaces share a list of +# channels for split hopping. This can also be used to easily lock +# one card on a single channel while hopping with other cards. +# Any card without a sourcechannel definition will use the standard hopping +# list. +# sourcechannels=sourcename[,sourcename]:ch1,ch2,ch3,...chN + +# ie, for us channels on the source 'prism2source' (same as normal channel +# hopping behavior): +# sourcechannels=prism2source:1,6,11,2,7,3,8,4,9,5,10 + +# Given two capture sources, "prism2a" and "prism2b", we want prism2a to stay +# on channel 6 and prism2b to hop normally. By not setting a sourcechannels +# line for prism2b, it will use the standard hopping. +# sourcechannels=prism2a:6 + +# To assign the same custom hop channel to multiple sources, or to split the +# same custom hop channel over two sources (if splitchannels is true), list +# them all on the same sourcechannels line: +# sourcechannels=prism2a,prism2b,prism2c:1,6,11 + diff --git a/net/kismet/files/kismet_ui.conf b/net/kismet/files/kismet_ui.conf new file mode 100644 index 0000000..e704b37 --- /dev/null +++ b/net/kismet/files/kismet_ui.conf @@ -0,0 +1,61 @@ +# Kismet GUI config file + +# Version of Kismet config +version=2005.04.R1 + +# Do we show the intro window? +showintro=false + +# Gui type to use +# Valid types: curses, panel +gui=panel +# Server to connect to (host:port) +host=localhost:2501 +# Network traffic decay (active/recent/inactive) and packet click rate - increase +# this if you are doing prism2 channel hopping. +decay=3 +# What columns do we display? Comma seperated. Read the documentation for what +# columns are valid. +columns=decay,name,type,wep,channel,packets,flags,ip,size +# What columns do we display for clients? Comma seperated. +clientcolumns=decay,type,mac,manuf,data,crypt,size,ip,signal,quality,noise + +# Do we auotmatically make a group for probed networks or do we show them +# amidst other networks? +autogroup_probe=true +# Do we autogroup data-only networks? +autogroup_data=true + +# Display battery status? +apm=false + +# Simple borders (use - and | instead of smooth vertical and horizontal +# lines. This is required on Zaurus, and might be needed elsewhere if your +# terminal doesn't display the border characters correctly. +simpleborders=false + +# Colors (front, back) of text in the panel front. Valid colors are: +# black, red, yellow, green, blue, magenta, cyan, white +# optionally prefixed with "hi-" for bold/bright colors, ie +# hi-red, hi-yellow, hi-green, etc. + +# Enable colors? +color=true +# Background +backgroundcolor=black +# Default text +textcolor=white +# Window borders +bordercolor=green +# Titles +titlecolor=hi-white +# GPS and APM info +monitorcolor=hi-white +# WEP network color +wepcolor=hi-green +# Factory network color +factorycolor=hi-red +# Open color +opencolor=hi-yellow +# Decloaked network color +cloakcolor=hi-blue diff --git a/net/kismet/patches/010-dont-add-host-include-paths.patch b/net/kismet/patches/010-dont-add-host-include-paths.patch new file mode 100644 index 0000000..23a87bd --- /dev/null +++ b/net/kismet/patches/010-dont-add-host-include-paths.patch @@ -0,0 +1,14 @@ +diff --git a/configure b/configure +index 6936a47..9a85269 100755 +--- a/configure ++++ b/configure +@@ -6980,9 +6980,6 @@ else + fi + + +-# Add additional cflags since some distros bury panel.h +-CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses" +- + termcontrol="none"; + + if test "$wantclient" = "yes"; then diff --git a/net/knock/Makefile b/net/knock/Makefile new file mode 100644 index 0000000..62866fd --- /dev/null +++ b/net/knock/Makefile @@ -0,0 +1,92 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=knock +PKG_VERSION:=0.5 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.zeroflux.org/proj/knock/files/ +PKG_MD5SUM:=ca09d61458974cff90a700aba6120891 + +include $(INCLUDE_DIR)/package.mk + +define Package/knock/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Firewall + DEPENDS:=+libpcap + TITLE:=Port-knocking + URL:=http://www.zeroflux.org/projects/knock +endef + +define Package/knock + $(call Package/knock/Default) + TITLE+= (client) +endef + +define Package/knock/Default/description + It listens to all traffic on an ethernet (or PPP) interface, + looking for special "knock" sequences of port-hits. A client + makes these port-hits by sending a TCP (or UDP) packet to a + port on the server. This port need not be open -- since + knockd listens at the link-layer level, it sees all traffic + even if it's destined for a closed port. When the server + detects a specific sequence of port-hits, it runs a command + defined in its configuration file. This can be used to open + up holes in a firewall for quick access. +endef + +define Package/knock/description + $(call Package/knock/Default/description) + This package contains the port-knocking client. +endef + +define Package/knockd + $(call Package/knock/Default) + TITLE+= (server) +endef + +define Package/knockd/description + $(call Package/knock/Default/description) + This package contains the port-knocking server. +endef + +define Package/knockd/conffiles +/etc/knockd.conf +endef + +define Build/Configure + $(call Build/Configure/Default, \ + , \ + CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \ + ac_cv_lib_pcap_pcap_open_live=yes \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Package/knock/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/knock $(1)/usr/bin/ +endef + +define Package/knockd/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/knockd.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/knockd $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,knock)) +$(eval $(call BuildPackage,knockd)) diff --git a/net/krb5/Makefile b/net/krb5/Makefile new file mode 100644 index 0000000..2482c16 --- /dev/null +++ b/net/krb5/Makefile @@ -0,0 +1,127 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=krb5 +PKG_VERSION:=1.8 +PKG_RELEASE:=2 + +PKG_SOURCE:=krb5-$(PKG_VERSION)-signed.tar +PKG_SOURCE_URL:=http://web.mit.edu/kerberos/dist/krb5/$(PKG_VERSION)/ +PKG_MD5SUM:=74257d68373a8df8b9391fc093d594be + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +MAKE_PATH:=src + +define Package/krb5/Default + SECTION:=net + CATEGORY:=Network + TITLE:=Kerberos + URL:=http://web.mit.edu/kerberos/ + MAINTAINER:=W. Michael Petullo +endef + +define Package/krb5-libs + SECTION:=net + CATEGORY:=Network + TITLE:=Kerberos + DEPENDS:=+libncurses + TITLE:=Kerberos 5 Shared Libraries + URL:=http://web.mit.edu/kerberos/ + MAINTAINER:=W. Michael Petullo +endef + +define Package/krb5-server + $(call Package/krb5/Default) + DEPENDS:=+krb5-libs +libpthread + TITLE:=Kerberos 5 Server +endef + +define Package/krb5-client + $(call Package/krb5/Default) + TITLE:=Kerberos 5 Client +endef + +define Package/krb5/decription + Kerberos +endef + +define Build/Prepare + # Krb5 tarball contains signature and a second tarball + # containing source code. + tar xf "$(DL_DIR)/$(PKG_SOURCE)" -C "$(BUILD_DIR)" + tar xzf "$(BUILD_DIR)/krb5-$(PKG_VERSION).tar.gz" -C "$(BUILD_DIR)" + patch -p1 -d "$(PKG_BUILD_DIR)" < "$(PATCH_DIR)/001-krb5kdc-dir-to-etc.patch" + patch -p1 -d "$(PKG_BUILD_DIR)" < "$(PATCH_DIR)/002-MITKRB5-SA-2011-002.patch" +endef + +CONFIGURE_PATH = ./src + +CONFIGURE_VARS += \ + cross_compiling=yes \ + krb5_cv_attr_constructor_destructor=yes,yes \ + ac_cv_func_regcomp=yes \ + ac_cv_printf_positional=yes \ + ac_cv_file__etc_environment=no \ + ac_cv_file__etc_TIMEZONE=no + +CONFIGURE_ARGS += \ + --enable-thread-support \ + --without-krb4 \ + --without-tcl \ + --disable-ipv6 + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include \ + $(PKG_INSTALL_DIR)/usr/lib \ + $(1)/usr/ +endef + +define Package/krb5-libs/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/lib/krb5 + $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins + $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins/kdb + $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins/libkrb5 + $(CP) $(PKG_INSTALL_DIR)/usr/lib/krb5/plugins/kdb/db2.so $(1)/usr/lib/krb5/plugins/kdb + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib +endef + +define Package/krb5-client/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kdestroy $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kinit $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/klist $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kpasswd $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ksu $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kvno $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5-send-pr $(1)/usr/sbin +endef + +# Removed some server-side software to reduce package size. This should be +# put in a separate package if needed. +define Package/krb5-server/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/krb5kdc $(1)/etc/init.d/krb5kdc + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sclient $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmin.local $(1)/usr/sbin +# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdb5_util $(1)/usr/sbin +# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin +# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5kdc $(1)/usr/sbin +# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sim_server $(1)/usr/sbin +endef + +$(eval $(call BuildPackage,krb5-libs)) +$(eval $(call BuildPackage,krb5-server)) +$(eval $(call BuildPackage,krb5-client)) diff --git a/net/krb5/files/krb5kdc b/net/krb5/files/krb5kdc new file mode 100644 index 0000000..5962683 --- /dev/null +++ b/net/krb5/files/krb5kdc @@ -0,0 +1,17 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009 OpenWrt.org + +START=60 + +start() { + mkdir -p /var/tmp + mkdir -p /etc/krb5kdc + + [ -f /etc/krb5kdc/principal ] || ( echo; echo ) | kdb5_util create -s + + /usr/sbin/krb5kdc +} + +stop() { + killall krb5kdc 2> /dev/null +} diff --git a/net/krb5/patches/001-krb5kdc-dir-to-etc.patch b/net/krb5/patches/001-krb5kdc-dir-to-etc.patch new file mode 100644 index 0000000..a017125 --- /dev/null +++ b/net/krb5/patches/001-krb5kdc-dir-to-etc.patch @@ -0,0 +1,51 @@ +diff -u --recursive krb5-1.8-vanilla/src/include/osconf.hin krb5-1.8/src/include/osconf.hin +--- krb5-1.8-vanilla/src/include/osconf.hin 2010-04-01 16:28:29.408661301 -0500 ++++ krb5-1.8/src/include/osconf.hin 2010-04-01 16:30:52.235467788 -0500 +@@ -61,14 +61,14 @@ + #define DEFAULT_LNAME_FILENAME "@PREFIX/lib/krb5.aname" + #endif /* _WINDOWS */ + +-#define DEFAULT_KDB_FILE "@LOCALSTATEDIR/krb5kdc/principal" +-#define DEFAULT_KEYFILE_STUB "@LOCALSTATEDIR/krb5kdc/.k5." +-#define KRB5_DEFAULT_ADMIN_ACL "@LOCALSTATEDIR/krb5kdc/krb5_adm.acl" ++#define DEFAULT_KDB_FILE "/etc/krb5kdc/principal" ++#define DEFAULT_KEYFILE_STUB "/etc/krb5kdc/.k5." ++#define KRB5_DEFAULT_ADMIN_ACL "/etc/krb5kdc/krb5_adm.acl" + /* Used by old admin server */ +-#define DEFAULT_ADMIN_ACL "@LOCALSTATEDIR/krb5kdc/kadm_old.acl" ++#define DEFAULT_ADMIN_ACL "/etc/krb5kdc/kadm_old.acl" + + /* Location of KDC profile */ +-#define DEFAULT_KDC_PROFILE "@LOCALSTATEDIR/krb5kdc/kdc.conf" ++#define DEFAULT_KDC_PROFILE "/etc/krb5kdc/kdc.conf" + #define KDC_PROFILE_ENV "KRB5_KDC_PROFILE" + + #if TARGET_OS_MAC +@@ -97,8 +97,8 @@ + /* + * Defaults for the KADM5 admin system. + */ +-#define DEFAULT_KADM5_KEYTAB "@LOCALSTATEDIR/krb5kdc/kadm5.keytab" +-#define DEFAULT_KADM5_ACL_FILE "@LOCALSTATEDIR/krb5kdc/kadm5.acl" ++#define DEFAULT_KADM5_KEYTAB "/etc/krb5kdc/kadm5.keytab" ++#define DEFAULT_KADM5_ACL_FILE "/etc/krb5kdc/kadm5.acl" + #define DEFAULT_KADM5_PORT 749 /* assigned by IANA */ + + #define KRB5_DEFAULT_SUPPORTED_ENCTYPES \ +@@ -123,13 +123,13 @@ + * krb5 slave support follows + */ + +-#define KPROP_DEFAULT_FILE "@LOCALSTATEDIR/krb5kdc/slave_datatrans" +-#define KPROPD_DEFAULT_FILE "@LOCALSTATEDIR/krb5kdc/from_master" ++#define KPROP_DEFAULT_FILE "/etc/krb5kdc/slave_datatrans" ++#define KPROPD_DEFAULT_FILE "/etc/krb5kdc/from_master" + #define KPROPD_DEFAULT_KDB5_UTIL "@SBINDIR/kdb5_util" + #define KPROPD_DEFAULT_KDB5_EDIT "@SBINDIR/kdb5_edit" + #define KPROPD_DEFAULT_KPROP "@SBINDIR/kprop" + #define KPROPD_DEFAULT_KRB_DB DEFAULT_KDB_FILE +-#define KPROPD_ACL_FILE "@LOCALSTATEDIR/krb5kdc/kpropd.acl" ++#define KPROPD_ACL_FILE "/etc/krb5kdc/kpropd.acl" + + /* + * GSS mechglue diff --git a/net/krb5/patches/002-MITKRB5-SA-2011-002.patch b/net/krb5/patches/002-MITKRB5-SA-2011-002.patch new file mode 100644 index 0000000..5e0da20 --- /dev/null +++ b/net/krb5/patches/002-MITKRB5-SA-2011-002.patch @@ -0,0 +1,112 @@ +diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h +index 1ca09b4..60caf3d 100644 +--- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h ++++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h +@@ -102,14 +102,18 @@ extern void prepend_err_str (krb5_context ctx, const char *s, krb5_error_code er + #define LDAP_SEARCH(base, scope, filter, attrs) LDAP_SEARCH_1(base, scope, filter, attrs, CHECK_STATUS) + + #define LDAP_SEARCH_1(base, scope, filter, attrs, status_check) \ +- do { \ +- st = ldap_search_ext_s(ld, base, scope, filter, attrs, 0, NULL, NULL, &timelimit, LDAP_NO_LIMIT, &result); \ +- if (translate_ldap_error(st, OP_SEARCH) == KRB5_KDB_ACCESS_ERROR) { \ +- tempst = krb5_ldap_rebind(ldap_context, &ldap_server_handle); \ +- if (ldap_server_handle) \ +- ld = ldap_server_handle->ldap_handle; \ +- } \ +- }while (translate_ldap_error(st, OP_SEARCH) == KRB5_KDB_ACCESS_ERROR && tempst == 0); \ ++ tempst = 0; \ ++ st = ldap_search_ext_s(ld, base, scope, filter, attrs, 0, NULL, \ ++ NULL, &timelimit, LDAP_NO_LIMIT, &result); \ ++ if (translate_ldap_error(st, OP_SEARCH) == KRB5_KDB_ACCESS_ERROR) { \ ++ tempst = krb5_ldap_rebind(ldap_context, &ldap_server_handle); \ ++ if (ldap_server_handle) \ ++ ld = ldap_server_handle->ldap_handle; \ ++ if (tempst == 0) \ ++ st = ldap_search_ext_s(ld, base, scope, filter, attrs, 0, \ ++ NULL, NULL, &timelimit, \ ++ LDAP_NO_LIMIT, &result); \ ++ } \ + \ + if (status_check != IGNORE_STATUS) { \ + if (tempst != 0) { \ +diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c +index 82b0333..84e80ee 100644 +--- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c ++++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c +@@ -302,6 +302,7 @@ krb5_ldap_rebind(krb5_ldap_context *ldap_context, + { + krb5_ldap_server_handle *handle = *ldap_server_handle; + ++ ldap_unbind_ext_s(handle->ldap_handle, NULL, NULL); + if ((ldap_initialize(&handle->ldap_handle, handle->server_info->server_name) != LDAP_SUCCESS) + || (krb5_ldap_bind(ldap_context, handle) != LDAP_SUCCESS)) + return krb5_ldap_request_next_handle_from_pool(ldap_context, ldap_server_handle); +diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c +index f549e23..b70940f 100644 +--- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c ++++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c +@@ -446,12 +446,11 @@ is_principal_in_realm(krb5_ldap_context *ldap_context, + * portion, then the first portion of the principal name SHOULD be + * "krbtgt". All this check is done in the immediate block. + */ +- if (searchfor->length == 2) +- if ((strncasecmp(searchfor->data[0].data, "krbtgt", +- FIND_MAX(searchfor->data[0].length, strlen("krbtgt"))) == 0) && +- (strncasecmp(searchfor->data[1].data, defrealm, +- FIND_MAX(searchfor->data[1].length, defrealmlen)) == 0)) ++ if (searchfor->length == 2) { ++ if (data_eq_string(searchfor->data[0], "krbtgt") && ++ data_eq_string(searchfor->data[1], defrealm)) + return 0; ++ } + + /* first check the length, if they are not equal, then they are not same */ + if (strlen(defrealm) != searchfor->realm.length) +diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c +index 7ad31da..626ed1f 100644 +--- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c ++++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c +@@ -103,10 +103,10 @@ krb5_ldap_get_principal(krb5_context context, krb5_const_principal searchfor, + unsigned int flags, krb5_db_entry *entries, + int *nentries, krb5_boolean *more) + { +- char *user=NULL, *filter=NULL, **subtree=NULL; ++ char *user=NULL, *filter=NULL, *filtuser=NULL; + unsigned int tree=0, ntrees=1, princlen=0; + krb5_error_code tempst=0, st=0; +- char **values=NULL, *cname=NULL; ++ char **values=NULL, **subtree=NULL, *cname=NULL; + LDAP *ld=NULL; + LDAPMessage *result=NULL, *ent=NULL; + krb5_ldap_context *ldap_context=NULL; +@@ -142,12 +142,18 @@ krb5_ldap_get_principal(krb5_context context, krb5_const_principal searchfor, + if ((st=krb5_ldap_unparse_principal_name(user)) != 0) + goto cleanup; + +- princlen = strlen(FILTER) + strlen(user) + 2 + 1; /* 2 for closing brackets */ ++ filtuser = ldap_filter_correct(user); ++ if (filtuser == NULL) { ++ st = ENOMEM; ++ goto cleanup; ++ } ++ ++ princlen = strlen(FILTER) + strlen(filtuser) + 2 + 1; /* 2 for closing brackets */ + if ((filter = malloc(princlen)) == NULL) { + st = ENOMEM; + goto cleanup; + } +- snprintf(filter, princlen, FILTER"%s))", user); ++ snprintf(filter, princlen, FILTER"%s))", filtuser); + + if ((st = krb5_get_subtree_info(ldap_context, &subtree, &ntrees)) != 0) + goto cleanup; +@@ -231,6 +237,9 @@ cleanup: + if (user) + free(user); + ++ if (filtuser) ++ free(filtuser); ++ + if (cname) + free(cname); + diff --git a/net/l2tpd/Makefile b/net/l2tpd/Makefile new file mode 100644 index 0000000..c503580 --- /dev/null +++ b/net/l2tpd/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=l2tpd +PKG_VERSION:=0.70pre +PKG_UPSTREAM_VERSION:=0.70-pre20031121 +PKG_RELEASE:=4.1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_UPSTREAM_VERSION).orig.tar.gz +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/l/l2tpd +PKG_MD5SUM:=3f2707b6e16a8cb72e7bf64f574202fa + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).orig + +include $(INCLUDE_DIR)/package.mk + +define Package/l2tpd + SECTION:=net + CATEGORY:=Network + TITLE:=An L2TP (Layer 2 Tunneling Protocol) daemon + URL:=http://l2tpd.sourceforge.net/ + SUBMENU:=VPN +endef + +define Package/l2tpd/description + l2tpd is the open source implementation of the L2TP tunneling + protocol (RFC2661). It does implement both LAC and LNS role + in a L2TP networking architecture. The main goal of this protocol is + to tunnel PPP frame trough an ip network. +endef + +define Package/l2tpd/conffiles +/etc/l2tpd/l2tpd.conf +/etc/ppp/options.l2tpd +endef + +define Build/Compile + $(call Build/Compile/Default, \ + CFLAGS="$(TARGET_CFLAGS) -I. -DLINUX -DSANITY -DIP_ALLOCATION" \ + ) +endef + +define Package/l2tpd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/l2tpd + $(INSTALL_DATA) ./files/l2tpd.conf $(1)/etc/l2tpd/ + $(INSTALL_DIR) $(1)/etc/ppp + $(INSTALL_DATA) ./files/options.l2tpd $(1)/etc/ppp/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/l2tpd.init $(1)/etc/init.d/l2tpd +endef + +$(eval $(call BuildPackage,l2tpd)) + diff --git a/net/l2tpd/files/l2tpd.conf b/net/l2tpd/files/l2tpd.conf new file mode 100644 index 0000000..2a9ba1c --- /dev/null +++ b/net/l2tpd/files/l2tpd.conf @@ -0,0 +1,29 @@ +; +; This is a minimal sample l2tpd configuration file for use +; with L2TP over IPsec. +; +; The idea is to provide an L2TP daemon to which remote Windows L2TP/IPsec +; clients connect. In this example, the internal (protected) network +; is 192.168.1.0/24. A special IP range within this network is reserved +; for the remote clients: 192.168.1.128/25 +; (i.e. 192.168.1.128 ... 192.168.1.254) +; +; The listen-addr parameter can be used if you want to bind the L2TP daemon +; to a specific IP address instead of to all interfaces. For instance, +; you could bind it to the interface of the internal LAN (e.g. 192.168.1.98 +; in the example below). Yet another IP address (local ip, e.g. 192.168.1.99) +; will be used by l2tpd as its address on pppX interfaces. + +[global] +; listen-addr = 192.168.1.98 + +[lns default] +ip range = 192.168.1.128-192.168.1.254 +local ip = 192.168.1.99 +require chap = yes +refuse pap = yes +require authentication = yes +name = LinuxVPNserver +ppp debug = yes +pppoptfile = /etc/ppp/options.l2tpd +length bit = yes diff --git a/net/l2tpd/files/l2tpd.init b/net/l2tpd/files/l2tpd.init new file mode 100644 index 0000000..7549c19 --- /dev/null +++ b/net/l2tpd/files/l2tpd.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=60 +BIN=l2tpd +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + diff --git a/net/l2tpd/files/options.l2tpd b/net/l2tpd/files/options.l2tpd new file mode 100644 index 0000000..425a56e --- /dev/null +++ b/net/l2tpd/files/options.l2tpd @@ -0,0 +1,17 @@ +ipcp-accept-local +ipcp-accept-remote +ms-dns 192.168.1.1 +ms-dns 192.168.1.3 +ms-wins 192.168.1.2 +ms-wins 192.168.1.4 +noccp +auth +crtscts +idle 1800 +mtu 1410 +mru 1410 +nodefaultroute +debug +lock +proxyarp +connect-delay 5000 diff --git a/net/l2tpd/patches/001-debian-2.patch b/net/l2tpd/patches/001-debian-2.patch new file mode 100644 index 0000000..8a6e204 --- /dev/null +++ b/net/l2tpd/patches/001-debian-2.patch @@ -0,0 +1,3394 @@ +--- l2tpd-0.70-pre20031121.orig/Makefile ++++ l2tpd-0.70-pre20031121/Makefile +@@ -28,7 +28,8 @@ + # become runtime options) debugging flags + # + #DFLAGS= -g -O2 -DDEBUG_PPPD +-DFLAGS= -g -O2 -DDEBUG_PPPD -DDEBUG_CONTROL -DDEBUG_ENTROPY ++#DFLAGS= -g -O2 -Wall -DDEBUG_PPPD -DDEBUG_CONTROL -DDEBUG_ENTROPY ++DFLAGS= -ggdb -Wall -DDEBUG_PPPD -DDEBUG_CONTROL -DDEBUG_ENTROPY + # + # Uncomment the next line for Linux + # +@@ -58,7 +59,7 @@ + + FFLAGS= -DIP_ALLOCATION + +-CFLAGS= $(DFLAGS) -Wall -DSANITY $(OSFLAGS) $(FFLAGS) ++CFLAGS= $(DFLAGS) -Wall -DSANITY $(OSFLAGS) $(FFLAGS) + HDRS=l2tp.h avp.h misc.h control.h call.h scheduler.h file.h aaa.h md5.h + OBJS=l2tpd.o pty.o misc.o control.o avp.o call.o network.o avpsend.o scheduler.o file.o aaa.o md5.o + LIBS= $(OSLIB) # -lefence # efence for malloc checking +--- l2tpd-0.70-pre20031121.orig/control.c ++++ l2tpd-0.70-pre20031121/control.c +@@ -227,7 +227,7 @@ + add_bearer_caps_avp (buf, t->ourbc); + /* FIXME: Tie breaker */ + add_firmware_avp (buf); +- add_hostname_avp (buf); ++ add_hostname_avp (buf, t); + add_vendor_avp (buf); + add_tunnelid_avp (buf, t->ourtid); + if (t->ourrws >= 0) +@@ -346,7 +346,6 @@ + "%s: Peer did not specify assigned tunnel ID. Closing.\n", + __FUNCTION__); + set_error (c, VENDOR_ERROR, "Specify your assigned tunnel ID"); +- c->needclose = -1; + return -EINVAL; + } + if (!(t->lns = get_lns (t))) +@@ -356,7 +355,6 @@ + "%s: Denied connection to unauthorized peer %s\n", + __FUNCTION__, IPADDY (t->peer.sin_addr)); + set_error (c, VENDOR_ERROR, "No Authorization"); +- c->needclose = -1; + return -EINVAL; + } + t->ourrws = t->lns->tun_rws; +@@ -368,7 +366,6 @@ + "%s: Peer did not specify framing capability. Closing.\n", + __FUNCTION__); + set_error (c, VENDOR_ERROR, "Specify framing capability"); +- c->needclose = -1; + return -EINVAL; + } + /* FIXME: Do we need to be sure they specified a version number? +@@ -380,7 +377,6 @@ + if (DEBUG) log(LOG_DEBUG, + "%s: Peer did not specify bearer capability. Closing.\n",__FUNCTION__); + set_error(c, VENDOR_ERROR, "Specify bearer capability"); +- c->needclose = -1; + return -EINVAL; + } */ + if ((!strlen (t->hostname)) && ((t->chal_us.state) || ((t->lns->challenge)))) +@@ -390,7 +386,6 @@ + "%s: Peer did not specify hostname. Closing.\n", + __FUNCTION__); + set_error (c, VENDOR_ERROR, "Specify your hostname"); +- c->needclose = -1; + return -EINVAL; + } + y = tunnels.head; +@@ -427,7 +422,7 @@ + add_frame_caps_avp (buf, t->ourfc); + add_bearer_caps_avp (buf, t->ourbc); + add_firmware_avp (buf); +- add_hostname_avp (buf); ++ add_hostname_avp (buf, t); + add_vendor_avp (buf); + add_tunnelid_avp (buf, t->ourtid); + if (t->ourrws >= 0) +@@ -481,7 +476,6 @@ + "%s: Peer did not specify framing capability. Closing.\n", + __FUNCTION__); + set_error (c, VENDOR_ERROR, "Specify framing capability"); +- c->needclose = -1; + return -EINVAL; + } + /* FIXME: Do we need to be sure they specified a version number? +@@ -493,7 +487,6 @@ + if (DEBUG) log(LOG_DEBUG, + "%s: Peer did not specify bearer capability. Closing.\n",__FUNCTION__); + set_error(c, VENDOR_ERROR, "Specify bearer capability"); +- c->needclose = -1; + return -EINVAL; + } */ + if ((!strlen (t->hostname)) && ((t->chal_them.state) || ((t->chal_us.state)))) +@@ -503,7 +496,6 @@ + "%s: Peer did not specify hostname. Closing.\n", + __FUNCTION__); + set_error (c, VENDOR_ERROR, "Specify your hostname"); +- c->needclose = -1; + return -EINVAL; + } + if (t->tid <= 0) +@@ -513,7 +505,6 @@ + "%s: Peer did not specify assigned tunnel ID. Closing.\n", + __FUNCTION__); + set_error (c, VENDOR_ERROR, "Specify your assigned tunnel ID"); +- c->needclose = -1; + return -EINVAL; + } + if (t->chal_them.state) +@@ -524,7 +515,6 @@ + set_error (c, VENDOR_ERROR, "No secret key on our side"); + log (LOG_WARN, "%s: No secret key for authenticating '%s'\n", + __FUNCTION__, t->hostname); +- c->needclose = -1; + return -EINVAL; + } + if (memcmp +@@ -534,7 +524,6 @@ + "Invalid challenge authentication"); + log (LOG_DEBUG, "%s: Invalid authentication for host '%s'\n", + __FUNCTION__, t->hostname); +- c->needclose = -1; + return -EINVAL; + } + } +@@ -546,7 +535,6 @@ + log (LOG_WARN, "%s: No secret for authenticating to '%s'\n", + __FUNCTION__, t->hostname); + set_error (c, VENDOR_ERROR, "No secret key on our end"); +- c->needclose = -1; + return -EINVAL; + }; + } +@@ -606,7 +594,6 @@ + "Invalid challenge authentication"); + log (LOG_DEBUG, "%s: Invalid authentication for host '%s'\n", + __FUNCTION__, t->hostname); +- c->needclose = -1; + return -EINVAL; + } + } +@@ -1584,6 +1571,14 @@ + wbuf[pos++] = e; + for (x = 0; x < buf->len; x++) + { ++ // we must at least still have 4 bytes left in the worst case scenario: ++ // 1 for a possible escape, 1 for the value and 1 to end the PPP stream. ++ if(pos >= (sizeof(wbuf) - 4)) { ++ if(DEBUG) ++ log(LOG_CRIT, "%s: rx packet is too big after PPP encoding (size %u, max is %u)\n", ++ __FUNCTION__, buf->len, MAX_RECV_SIZE); ++ return -EINVAL; ++ } + e = *((char *) buf->start + x); + if ((e < 0x20) || (e == PPP_ESCAPE) || (e == PPP_FLAG)) + { +@@ -1592,7 +1587,6 @@ + wbuf[pos++] = PPP_ESCAPE; + } + wbuf[pos++] = e; +- + } + wbuf[pos++] = PPP_FLAG; + x = write (c->fd, wbuf, pos); +--- l2tpd-0.70-pre20031121.orig/misc.h ++++ l2tpd-0.70-pre20031121/misc.h +@@ -80,4 +80,11 @@ + extern void safe_copy (char *, char *, int); + extern void opt_destroy (struct ppp_opts *); + extern struct ppp_opts *add_opt (struct ppp_opts *, char *, ...); ++extern u_int16_t get16(u_int8_t *); ++extern u_int32_t get32(u_int8_t *); ++extern u_int64_t get64(u_int8_t *); ++extern void set16(u_int8_t *, u_int16_t); ++extern void set32(u_int8_t *, u_int32_t); ++extern void set64(u_int8_t *, u_int64_t); ++ + #endif +--- l2tpd-0.70-pre20031121.orig/avp.h ++++ l2tpd-0.70-pre20031121/avp.h +@@ -19,22 +19,35 @@ + + struct avp_hdr + { +- _u16 length; +- _u16 vendorid; +- _u16 attr; ++ u_int16_t length; ++ u_int16_t vendorid; ++ u_int16_t attr; + }; + ++#define AVP_F_MANDATORY 0x1 ++#define AVP_F_FIXLEN 0x2 ++#define AVP_F_ASCII 0x4 ++ + struct avp + { +- int num; /* Number of AVP */ +- int m; /* Set M? */ +- int (*handler) (struct tunnel *, struct call *, void *, int); +- /* This should handle the AVP +- taking a tunnel, call, the data, +- and the length of the AVP as +- parameters. Should return 0 +- upon success */ +- char *description; /* A name, for debugging */ ++ u_int32_t num; /* Number of AVP */ ++ u_int32_t flags; ++ u_int32_t sz; /* expected avp payload size as ++ * (AVP_F_FIXLEN) ? (==) : (!>=) ++ * note: size checked is performed ++ * after unhiding */ ++ u_int8_t allowed_states[8]; /* List of allowed message types for ++ * a particular avp. Fixed len for ++ * alignement issues. */ ++ ++ /* This should handle the AVP taking a tunnel, call, ++ * the data, and the length of the AVP as parameters. ++ * Should return 0 upon success */ ++ int (*handle) (struct tunnel *, struct call *, void *, int); ++ ++ /* This should handle avp specifics sanity checks */ ++ int (*validate) (int, struct tunnel *, struct call *, void *, int); ++ char *description; /* A name, for debugging */ + }; + + extern int handle_avps (struct buffer *buf, struct tunnel *t, struct call *c); +@@ -84,8 +97,56 @@ + #define RESULT_CLEAR 1 + #define RESULT_ERROR 2 + #define RESULT_EXISTS 3 ++ ++/* avp id's */ ++#define MESSAGE_TYPE_AVP 0 ++#define RESULT_CODE_AVP 1 ++#define PROTOCOL_VERSION_AVP 2 ++#define FRAMING_CAP_AVP 3 ++#define BEARER_CAP_AVP 4 ++#define TIE_BREAKER_AVP 5 ++#define FIRMWARE_REV_AVP 6 ++#define HOSTNAME_AVP 7 ++#define VENDOR_NAME_AVP 8 ++#define ASSIGNED_TUN_ID_AVP 9 ++#define RX_WIN_SIZE_AVP 10 ++#define CHALLENGE_AVP 11 ++#define CHALLENGE_RESP_AVP 12 ++#define CAUSE_ERROR_AVP 13 ++#define ASSIGNED_SES_ID_AVP 14 ++#define SERIAL_NUMBER_AVP 15 ++#define MIN_BPS_AVP 16 ++#define MAX_BPS_AVP 17 ++#define BEARER_TYPE_AVP 18 ++#define FRAMING_TYPE_AVP 19 ++#define PACKET_DELAY_AVP 20 ++#define CALLED_NUMBER_AVP 21 ++#define CALLING_NUMBER_AVP 22 ++#define SUB_ADDRESS_AVP 23 ++#define TX_CONNECT_SPEED_AVP 24 ++#define PHYS_CHAN_ID_AVP 25 ++#define INIT_RX_LCP_AVP 26 ++#define LAST_TX_LCP_AVP 27 ++#define LAST_RX_LCP_AVP 28 ++#define PROXY_AUTH_TYPE_AVP 29 ++#define PROXY_AUTH_NAME_AVP 30 ++#define PROXY_AUTH_CHAL_AVP 31 ++#define PROXY_AUTH_ID_AVP 32 ++#define PROXY_AUTH_CHAL_RESP_AVP 33 ++#define CALL_ERROR_AVP 34 ++#define ACCM_AVP 35 ++#define RANDOM_VECTOR_AVP 36 ++#define PRIV_GROUP_ID_AVP 37 ++#define RX_CONNECT_SPEED_AVP 38 ++#define SEQ_REQUIRED_AVP 39 ++#define AVP_MAX SEQ_REQUIRED_AVP ++ ++extern int validate_msgtype_avp(int, struct tunnel *, struct call *, void *, int); ++extern int validate_gen_avp(int, struct tunnel *, struct call *, void *, int); ++ + extern void encrypt_avp (struct buffer *, _u16, struct tunnel *); + extern int decrypt_avp (char *, struct tunnel *); ++ + extern int message_type_avp (struct tunnel *, struct call *, void *, int); + extern int protocol_version_avp (struct tunnel *, struct call *, void *, int); + extern int framing_caps_avp (struct tunnel *, struct call *, void *, int); +@@ -97,12 +158,12 @@ + extern int receive_window_size_avp (struct tunnel *, struct call *, void *, + int); + extern int result_code_avp (struct tunnel *, struct call *, void *, int); +-extern int assigned_call_avp (struct tunnel *, struct call *, void *, int); ++extern int assigned_session_avp (struct tunnel *, struct call *, void *, int); + extern int call_serno_avp (struct tunnel *, struct call *, void *, int); + extern int bearer_type_avp (struct tunnel *, struct call *, void *, int); + extern int call_physchan_avp (struct tunnel *, struct call *, void *, int); +-extern int dialed_number_avp (struct tunnel *, struct call *, void *, int); +-extern int dialing_number_avp (struct tunnel *, struct call *, void *, int); ++extern int called_number_avp (struct tunnel *, struct call *, void *, int); ++extern int calling_number_avp (struct tunnel *, struct call *, void *, int); + extern int sub_address_avp (struct tunnel *, struct call *, void *, int); + extern int frame_type_avp (struct tunnel *, struct call *, void *, int); + extern int rx_speed_avp (struct tunnel *, struct call *, void *, int); +@@ -118,7 +179,7 @@ + extern int add_avp_rws (struct buffer *, _u16); + extern int add_tunnelid_avp (struct buffer *, _u16); + extern int add_vendor_avp (struct buffer *); +-extern int add_hostname_avp (struct buffer *); ++extern int add_hostname_avp (struct buffer *, struct tunnel*); + extern int add_firmware_avp (struct buffer *); + extern int add_bearer_caps_avp (struct buffer *buf, _u16 caps); + extern int add_frame_caps_avp (struct buffer *buf, _u16 caps); +--- l2tpd-0.70-pre20031121.orig/network.c ++++ l2tpd-0.70-pre20031121/network.c +@@ -214,6 +214,8 @@ + t->self->needclose = -1; + } + } ++ free(buf->rstart); ++ free(buf); + } + else + { +@@ -371,7 +373,9 @@ + if (debug_network) + { + log (LOG_DEBUG, "%s: recv packet from %s, size = %d," \ +-"tunnel = %d, call = %d\n", __FUNCTION__, inet_ntoa (from.sin_addr), recvsize, tunnel, call); ++ "tunnel = %d, call = %d\n", __func__, ++ inet_ntoa (from.sin_addr), recvsize, ++ tunnel, call); + } + if (packet_dump) + { +--- l2tpd-0.70-pre20031121.orig/aaa.c ++++ l2tpd-0.70-pre20031121/aaa.c +@@ -209,9 +209,11 @@ + __FUNCTION__, u, t, s); + #endif + strncpy (secret, s, size); ++ fclose(f); + return -1; + } + } ++ fclose(f); + return 0; + } + +--- l2tpd-0.70-pre20031121.orig/l2tpd.c ++++ l2tpd-0.70-pre20031121/l2tpd.c +@@ -266,6 +266,9 @@ + /* erase pid file */ + unlink (gconfig.pidfile); + ++ /* erase control pipe */ ++ unlink(CONTROL_PIPE); ++ + exit (1); + } + +@@ -333,13 +336,17 @@ + tcgetattr (c->fd, &ptyconf); + *(c->oldptyconf) = ptyconf; + ptyconf.c_cflag &= ~(ICANON | ECHO); +- ptyconf.c_lflag &= ~ECHO; ++ ptyconf.c_lflag &= ~ECHO; + tcsetattr (c->fd, TCSANOW, &ptyconf); + + snprintf (tty, sizeof (tty), "/dev/tty%c%c", a, b); + fd2 = open (tty, O_RDWR); +- stropt[pos++] = strdup(tty); +- stropt[pos] = NULL; ++ if(!fd2) ++ log(LOG_WARN, "unable to open tty %s", tty); ++ ++ /* XXX JEF: CHECK ME */ ++ stropt[pos++] = strdup(tty); ++ stropt[pos] = NULL; + + #ifdef USE_KERNEL + } +@@ -623,7 +630,13 @@ + { + struct lac *lac; + lac = (struct lac *) data; +- if (!lac->active) ++ ++ if (!lac) ++ { ++ log (LOG_WARN, "%s : called on NULL lac!\n", __FUNCTION__); ++ return; ++ } ++ if (!lac->active) + { + log (LOG_DEBUG, "%s: LAC %s not active", __FUNCTION__, lac->entname); + return; +@@ -635,11 +648,6 @@ + log (LOG_LOG, "%s: maximum retries exceeded.\n", __FUNCTION__); + return; + } +- if (!lac) +- { +- log (LOG_WARN, "%s : called on NULL lac!\n", __FUNCTION__); +- return; +- } + if (!lac->t) + { + #ifdef DEGUG_MAGIC +@@ -774,12 +782,7 @@ + void do_control () + { + char buf[1024]; +- char *host; +- char *tunstr; +- char *callstr; +- +- char *sub_str; /* jz: use by the strtok function */ +- char *tmp_ptr; /* jz: use by the strtok function */ ++ char *host, *tunstr, *callstr, *tmpstr; + struct lac *lac; + int call; + int tunl; +@@ -792,24 +795,39 @@ + if (buf[cnt - 1] == '\n') + buf[--cnt] = 0; + #ifdef DEBUG_CONTROL +- log (LOG_DEBUG, "%s: Got message %s (%d bytes long)\n", ++ log (LOG_DEBUG, "%s: Got message \"%s\" (%d bytes long)\n", + __FUNCTION__, buf, cnt); + #endif + switch (buf[0]) + { + case 't': +- host = strchr (buf, ' ') + 1; ++ host = strchr (buf, ' '); ++ if(!host) ++ goto out; ++ host++; + #ifdef DEBUG_CONTROL + log (LOG_DEBUG, "%s: Attempting to tunnel to %s\n", + __FUNCTION__, host); + #endif + l2tp_call (host, UDP_LISTEN_PORT, NULL, NULL); + break; +- case 'c': +- +- switch_io = 1; /* jz: Switch for Incoming - Outgoing Calls */ +- +- tunstr = strchr (buf, ' ') + 1; ++ case 'c': /* option 'c' for incoming call */ ++ case 'o': /* option 'o' for outgoing call */ ++ tunstr = strchr (buf, ' '); ++ if(!tunstr) ++ goto out; ++ tunstr++; ++ ++ if(buf[0] == 'c') ++ switch_io = 1; /* Switch for Incoming Calls */ ++ else { ++ switch_io = 0; /* Switch for Outgoing Calls */ ++ tmpstr = strchr(tunstr, ' '); ++ if(!tmpstr) ++ goto out; ++ strncpy(dial_no_tmp,tmpstr, sizeof(*dial_no_tmp)); ++ } ++ + lac = laclist; + while (lac) + { +@@ -842,52 +860,12 @@ + #endif + lac_call (tunl, NULL, NULL); + break; +- +- case 'o': /* jz: option 'o' for doing a outgoing call */ +- +- switch_io = 0; /* jz: Switch for incoming - outgoing Calls */ +- +- sub_str = strchr (buf, ' ') + 1; +- +- tunstr = strtok (sub_str, " "); /* jz: using strtok function to get */ +- tmp_ptr = strtok (NULL, " "); /* params out of the pipe */ +- strcpy (dial_no_tmp, tmp_ptr); +- +- lac = laclist; +- while (lac) +- { +- if (!strcasecmp (lac->entname, tunstr)) +- { +- lac->active = -1; +- lac->rtries = 0; +- if (!lac->c) +- magic_lac_dial (lac); +- else +- log (LOG_DEBUG, +- "%s: Session '%s' already active!\n", +- __FUNCTION__, lac->entname); +- break; +- } +- lac = lac->next; +- } +- if (lac) +- break; +- tunl = atoi (tunstr); +- if (!tunl) +- { +- log (LOG_DEBUG, "%s: No such tunnel '%s'\n", __FUNCTION__, +- tunstr); +- break; +- } +-#ifdef DEBUG_CONTROL +- log (LOG_DEBUG, "%s: Attempting to call on tunnel %d\n", +- __FUNCTION__, tunl); +-#endif +- lac_call (tunl, NULL, NULL); +- break; +- + case 'h': +- callstr = strchr (buf, ' ') + 1; ++ callstr = strchr (buf, ' '); ++ if(!callstr) ++ goto out; ++ callstr++; ++ + call = atoi (callstr); + #ifdef DEBUG_CONTROL + log (LOG_DEBUG, "%s: Attempting to call %d\n", __FUNCTION__, +@@ -896,7 +874,11 @@ + lac_hangup (call); + break; + case 'd': +- tunstr = strchr (buf, ' ') + 1; ++ tunstr = strchr (buf, ' '); ++ if(!tunstr) ++ goto out; ++ tunstr++; ++ + lac = laclist; + while (lac) + { +@@ -937,6 +919,8 @@ + } + } + } ++ ++out: + /* Otherwise select goes nuts */ + close (control_fd); + control_fd = open (CONTROL_PIPE, O_RDONLY | O_NONBLOCK, 0600); +@@ -1002,7 +986,6 @@ + int pid=0; + int i,l; + char buf[STRLEN]; +- int pidfilewritten=0; + + if((pid = fork()) < 0) { + log(LOG_LOG, "%s: Unable to fork ()\n",__FUNCTION__); +@@ -1012,56 +995,52 @@ + else if (pid) + exit(0); + +- close(0); +- close(1); +- close(2); ++ ++ close(0); ++ close(1); ++ close(2); ++ dup2(open("/dev/null", O_RDONLY), 0); ++ dup2(open("/dev/null", O_RDONLY), 1); ++ dup2(open("/dev/null", O_RDONLY), 2); + + /* Read previous pid file. */ +- if ((i = open(gconfig.pidfile,O_RDONLY)) > 0) { +- l=read(i,buf,sizeof(buf)-1); +- if (i < 0) { +- log(LOG_LOG, "%s: Unable to read pid file [%s]\n", +- __FUNCTION__, gconfig.pidfile); +- } +- buf[i] = '\0'; +- pid = atoi(buf); +- +- /* If the previous server process is not still running, +- write a new pid file immediately. */ +- if (pid && (pid == getpid () || kill (pid, 0) < 0)) { +- unlink (gconfig.pidfile); +- if ((i = open (gconfig.pidfile, O_WRONLY | O_CREAT, 0640)) >= 0) +- { +- snprintf (buf, sizeof(buf), "%d\n", (int)getpid()); +- write (i, buf, strlen(buf)); +- close (i); +- pidfilewritten = 1; +- } ++ if((i = open(gconfig.pidfile,O_RDONLY)) > 0) { ++ l=read(i,buf,sizeof(buf)-1); ++ if (l >= 0) { ++ buf[l] = '\0'; ++ pid = atoi(buf); + } +- else +- { ++ close(i); ++ ++ /* if pid is read and process exist exit */ ++ if(pid && !kill(pid, 0)) { + log(LOG_LOG, "%s: There's already a l2tpd server running.\n", + __FUNCTION__); + close(server_socket); + exit(1); + } ++ ++ /* remove stalled pid file */ ++ unlink(gconfig.pidfile); + } + + pid = setsid(); + +- if(! pidfilewritten) { +- unlink(gconfig.pidfile); +- if ((i = open (gconfig.pidfile, O_WRONLY | O_CREAT, 0640)) >= 0) { +- snprintf (buf, strlen(buf), "%d\n", (int)getpid()); +- write (i, buf, strlen(buf)); +- close (i); +- pidfilewritten = 1; +- } +- } ++ /* create new pid file */ ++ if ((i = open (gconfig.pidfile, O_WRONLY | O_CREAT, 0644)) >= 0) { ++ snprintf (buf, sizeof(buf), "%d", (int)getpid()); ++ write (i, buf, strlen(buf)); ++ close (i); ++ } ++ else { ++ log(LOG_LOG, "%s: could not write pid file %s error %d", ++ __FUNCTION__, gconfig.pidfile, i); ++ close(server_socket); ++ exit(1); ++ } + } + + +- + void init (int argc,char *argv[]) + { + struct lac *lac; +@@ -1103,10 +1082,6 @@ + } + log (LOG_LOG, "l2tpd version " SERVER_VERSION " started on %s PID:%d\n", + hostname, getpid ()); +- log (LOG_LOG, +- "Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc.\n"); +- log (LOG_LOG, "Forked by Scott Balmos and David Stipp, (C) 2001\n"); +- log (LOG_LOG, "Inherited by Jeff McAdams, (C) 2002\n"); + listenaddr.s_addr = gconfig.listenaddr; + log (LOG_LOG, "%s version %s on a %s, listening on IP address %s, port %d\n", uts.sysname, + uts.release, uts.machine, inet_ntoa(listenaddr), gconfig.port); +--- l2tpd-0.70-pre20031121.orig/misc.c ++++ l2tpd-0.70-pre20031121/misc.c +@@ -301,3 +301,42 @@ + return -1; + } + } ++ ++u_int16_t get16(u_int8_t *p) { ++ return p[0] << 8 | p[1]; ++} ++ ++u_int32_t get32(u_int8_t *p) { ++ return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3]; ++} ++ ++u_int64_t get64(u_int8_t *p) { ++ return (u_int64_t)p[0] << 56 | (u_int64_t)p[1] << 48 | ++ (u_int64_t)p[2] << 40 | (u_int64_t)p[3] << 32 | ++ (u_int64_t)p[4] << 24 | (u_int64_t)p[5] << 16 | ++ (u_int64_t)p[6] << 8 | (u_int64_t)p[7]; ++} ++ ++void set16(u_int8_t *cp, u_int16_t x) { ++ *cp++ = x >> 8; ++ *cp = x & 0xff; ++} ++ ++void set32(u_int8_t *cp, u_int32_t x) { ++ *cp++ = x >> 24; ++ *cp++ = (x >> 16) & 0xff; ++ *cp++ = (x >> 8) & 0xff; ++ *cp = x & 0xff; ++} ++ ++void set64(u_int8_t *cp, u_int64_t x) { ++ *cp++ = x >> 56; ++ *cp++ = (x >> 48) & 0xff; ++ *cp++ = (x >> 40) & 0xff; ++ *cp++ = (x >> 32) & 0xff; ++ *cp++ = (x >> 24) & 0xff; ++ *cp++ = (x >> 16) & 0xff; ++ *cp++ = (x >> 8) & 0xff; ++ *cp = x & 0xff; ++} ++ +--- l2tpd-0.70-pre20031121.orig/avp.c ++++ l2tpd-0.70-pre20031121/avp.c +@@ -4,9 +4,12 @@ + * Layer Two Tunnelling Protocol Daemon + * Copyright (C) 1998 Adtran, Inc. + * Copyright (C) 2002 Jeff McAdams ++ * Copyright (C) 2003 Jean-Francois Dive + * + * Mark Spencer + * ++ * 12/2003 parsing sanitization, Jean-Francois Dive ++ * + * This software is distributed under the terms + * of the GPL, which you should have received + * along with this source. +@@ -20,50 +23,53 @@ + #include + #include "l2tp.h" + +-#define AVP_MAX 39 ++/* TODO: ++ * - Tie breaker. ++ * - Clean Proxy Authentication solution. ++ */ + ++/*****************************************************************************/ + struct avp avps[] = { +- +- {0, 1, &message_type_avp, "Message Type"}, +- {1, 1, &result_code_avp, "Result Code"}, +- {2, 1, &protocol_version_avp, "Protocol Version"}, +- {3, 1, &framing_caps_avp, "Framing Capabilities"}, +- {4, 1, &bearer_caps_avp, "Bearer Capabilities"}, +- {5, 0, NULL, "Tie Breaker"}, +- {6, 0, &firmware_rev_avp, "Firmware Revision"}, +- {7, 0, &hostname_avp, "Host Name"}, +- {8, 1, &vendor_avp, "Vendor Name"}, +- {9, 1, &assigned_tunnel_avp, "Assigned Tunnel ID"}, +- {10, 1, &receive_window_size_avp, "Receive Window Size"}, +- {11, 1, &challenge_avp, "Challenge"}, +- {12, 0, NULL, "Q.931 Cause Code"}, +- {13, 1, &chalresp_avp, "Challenge Response"}, +- {14, 1, &assigned_call_avp, "Assigned Call ID"}, +- {15, 1, &call_serno_avp, "Call Serial Number"}, +- {16, 1, NULL, "Minimum BPS"}, +- {17, 1, NULL, "Maximum BPS"}, +- {18, 1, &bearer_type_avp, "Bearer Type"}, +- {19, 1, &frame_type_avp, "Framing Type"}, +- {20, 1, &packet_delay_avp, "Packet Processing Delay"}, +- {21, 1, &dialed_number_avp, "Dialed Number"}, +- {22, 1, &dialing_number_avp, "Dialing Number"}, +- {23, 1, &sub_address_avp, "Sub-Address"}, +- {24, 1, &tx_speed_avp, "Transmit Connect Speed"}, +- {25, 1, &call_physchan_avp, "Physical channel ID"}, +- {26, 0, NULL, "Initial Received LCP Confreq"}, +- {27, 0, NULL, "Last Sent LCP Confreq"}, +- {28, 0, NULL, "Last Received LCP Confreq"}, +- {29, 1, &ignore_avp, "Proxy Authen Type"}, +- {30, 0, &ignore_avp, "Proxy Authen Name"}, +- {31, 0, &ignore_avp, "Proxy Authen Challenge"}, +- {32, 0, &ignore_avp, "Proxy Authen ID"}, +- {33, 1, &ignore_avp, "Proxy Authen Response"}, +- {34, 1, NULL, "Call Errors"}, +- {35, 1, &ignore_avp, "ACCM"}, +- {36, 1, &rand_vector_avp, "Random Vector"}, +- {37, 1, NULL, "Private Group ID"}, +- {38, 0, &rx_speed_avp, "Receive Connect Speed"}, +- {39, 1, &seq_reqd_avp, "Sequencing Required"} ++ {0, AVP_F_MANDATORY|AVP_F_FIXLEN, 2, {0}, &message_type_avp, &validate_msgtype_avp, "Message Type"}, ++ {1, AVP_F_MANDATORY, MAXSTRLEN, {CDN, StopCCN}, &result_code_avp, &validate_gen_avp, "Result Code"}, ++ {2, AVP_F_MANDATORY|AVP_F_FIXLEN, 2, {SCCRP, SCCRQ}, &protocol_version_avp, &validate_gen_avp, "Protocol Version"}, ++ {3, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {SCCRP, SCCRQ}, &framing_caps_avp, &validate_gen_avp, "Framing Capabilities"}, ++ {4, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {SCCRP, SCCRQ}, &bearer_caps_avp, &validate_gen_avp, "Bearer Capabilities"}, ++ {5, 0, 0, {0}, NULL, NULL, "Tie Breaker"}, ++ {6, AVP_F_FIXLEN, 2, {SCCRP, SCCRQ}, &firmware_rev_avp, &validate_gen_avp, "Firmware Revision"}, ++ {7, AVP_F_ASCII, MAXSTRLEN, {SCCRP, SCCRQ}, &hostname_avp, &validate_gen_avp, "Host Name"}, ++ {8, AVP_F_MANDATORY|AVP_F_ASCII, MAXSTRLEN, {SCCRP, SCCRQ}, &vendor_avp, &validate_gen_avp, "Vendor Name"}, ++ {9, AVP_F_MANDATORY|AVP_F_FIXLEN, 2, {SCCRP, SCCRQ, StopCCN}, &assigned_tunnel_avp, &validate_gen_avp, "Assigned Tunnel ID"}, ++ {10, AVP_F_MANDATORY|AVP_F_FIXLEN, 2,{SCCRP, SCCRQ, OCRP, OCCN, StopCCN}, &receive_window_size_avp, &validate_gen_avp, "Receive Window Size"}, ++ {11, AVP_F_MANDATORY, 128, {SCCRP, SCCRQ}, &challenge_avp, &validate_gen_avp, "Challenge"}, ++ {12, 0, 0, {0}, NULL, NULL, "Q.931 Cause Code"}, ++ {13, AVP_F_MANDATORY, MD_SIG_SIZE, {SCCRP, SCCCN}, &chalresp_avp, &validate_gen_avp, "Challenge Response"}, ++ {14, AVP_F_MANDATORY|AVP_F_FIXLEN, 2, {CDN, ICRP, ICRQ, OCRP, OCRQ}, &assigned_session_avp, &validate_gen_avp, "Assigned Session ID"}, ++ {15, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {ICRQ, OCRQ}, &call_serno_avp, &validate_gen_avp, "Call Serial Number"}, ++ {16, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {0}, NULL, NULL, "Minimum BPS"}, ++ {17, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {0}, NULL, NULL, "Maximum BPS"}, ++ {18, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {ICRQ, OCRQ}, &bearer_type_avp, &validate_gen_avp, "Bearer Type"}, ++ {19, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {ICCN, OCRQ, OCCN}, &frame_type_avp, &validate_gen_avp, "Framing Type"}, ++ {20, AVP_F_MANDATORY|AVP_F_FIXLEN, 2, {ICRP, OCRQ, ICCN, OCRP, OCCN}, &packet_delay_avp, &validate_gen_avp, "Packet Processing Delay"}, ++ {21, AVP_F_MANDATORY|AVP_F_ASCII, MAXSTRLEN, {ICRQ, OCRQ}, &called_number_avp, &validate_gen_avp, "Called Number"}, ++ {22, AVP_F_MANDATORY|AVP_F_ASCII, MAXSTRLEN, {ICRQ}, &calling_number_avp, &validate_gen_avp, "Calling Number"}, ++ {23, AVP_F_MANDATORY|AVP_F_ASCII, MAXSTRLEN, {OCRP, ICRQ}, &sub_address_avp, &validate_gen_avp, "Sub-Address"}, ++ {24, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {ICCN, OCCN, OCRP}, &tx_speed_avp, &validate_gen_avp, "Transmit Connect Speed"}, ++ {25, AVP_F_MANDATORY|AVP_F_FIXLEN, 4, {ICRQ, OCRQ, OCRP, OCCN}, &call_physchan_avp, &validate_gen_avp, "Physical channel ID"}, ++ {26, 0, 0, {0}, NULL, NULL, "Initial Received LCP Confreq"}, ++ {27, 0, 0, {0}, NULL, NULL, "Last Sent LCP Confreq"}, ++ {28, 0, 0, {0}, NULL, NULL, "Last Received LCP Confreq"}, ++ {29, AVP_F_MANDATORY, 0, {0}, &ignore_avp, NULL, "Proxy Authen Type"}, ++ {30, 0, 0, {0}, &ignore_avp, NULL, "Proxy Authen Name"}, ++ {31, 0, 0, {0}, &ignore_avp, NULL, "Proxy Authen Challenge"}, ++ {32, 0, 0, {0}, &ignore_avp, NULL, "Proxy Authen ID"}, ++ {33, AVP_F_MANDATORY, 0, {0}, &ignore_avp, NULL, "Proxy Authen Response"}, ++ {34, AVP_F_MANDATORY|AVP_F_FIXLEN, 26, {0}, NULL, NULL, "Call Errors"}, ++ {35, AVP_F_MANDATORY|AVP_F_FIXLEN, 10, {0}, &ignore_avp, NULL, "ACCM"}, ++ {36, AVP_F_MANDATORY, 1024, {0}, &rand_vector_avp, &validate_gen_avp, "Random Vector"}, ++ {37, AVP_F_MANDATORY, 0, {0}, NULL, NULL, "Private Group ID"}, ++ {38, AVP_F_FIXLEN, 4, {ICCN, OCCN, OCRP}, &rx_speed_avp, &validate_gen_avp, "Receive Connect Speed"}, ++ {39, AVP_F_MANDATORY, 0, {ICCN, OCCN, OCRP}, &seq_reqd_avp, &validate_gen_avp, "Sequencing Required"} + }; + + char *msgtypes[] = { +@@ -111,6 +117,7 @@ + "Call was connected but no appropriate framing was detect" + }; + ++/*****************************************************************************/ + void wrong_length (struct call *c, char *field, int expected, int found, + int min) + { +@@ -126,12 +133,9 @@ + c->needclose = -1; + } + +-/* +- * t, c, data, and datalen may be assumed to be defined for all avp's +- */ +- +-int message_type_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++/*****************************************************************************/ ++int validate_msgtype_avp(int attr, struct tunnel *t, struct call *c, ++ void *data, int datalen) + { + /* + * This will be with every control message. It is critical that this +@@ -139,28 +143,9 @@ + * (assuming sanity check) + */ + +- _u16 *raw = data; +- c->msgtype = ntohs (raw[3]); +- if (datalen != 8) +- { +- if (DEBUG) +- log (LOG_DEBUG, "%s: wrong size (%d != 8)\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Message Type", 8, datalen, 0); +- return -EINVAL; +- } +- if ((c->msgtype > MAX_MSG) || (!msgtypes[c->msgtype])) +- { +- if (DEBUG) +- log (LOG_DEBUG, "%s: unknown message type %d\n", __FUNCTION__, +- c->msgtype); +- return -EINVAL; +- } +- if (debug_avp) +- if (DEBUG) +- log (LOG_DEBUG, "%s: message type %d (%s)\n", __FUNCTION__, +- c->msgtype, msgtypes[c->msgtype]); +-#ifdef SANITY ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ c->msgtype = get16(p); ++ + if (t->sanity) + { + /* +@@ -172,11 +157,11 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: attempting to negotiate tunnel inside a call!\n", +- __FUNCTION__); ++ __func__); + return -EINVAL; + } + +- switch (c->msgtype) ++ switch (get16(p)) + { + case SCCRQ: + if ((t->state != 0) && (t->state != SCCRQ)) +@@ -189,7 +174,7 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: attempting to negotiate SCCRQ with state != 0\n", +- __FUNCTION__); ++ __func__); + return -EINVAL; + } + break; +@@ -199,7 +184,7 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: attempting to negotiate SCCRP with state != SCCRQ!\n", +- __FUNCTION__); ++ __func__); + return -EINVAL; + } + break; +@@ -209,7 +194,7 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: attempting to negotiate SCCCN with state != SCCRP!\n", +- __FUNCTION__); ++ __func__); + return -EINVAL; + } + break; +@@ -219,7 +204,7 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: attempting to negotiate ICRQ when state != SCCCN\n", +- __FUNCTION__); ++ __func__); + return -EINVAL; + } + if (c != t->self) +@@ -227,7 +212,7 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: attempting to negotiate ICRQ on a call!\n", +- __FUNCTION__); ++ __func__); + return -EINVAL; + } + break; +@@ -237,7 +222,7 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: attempting to negotiate ICRP on tunnel!=SCCCN\n", +- __FUNCTION__); ++ __func__); + return -EINVAL; + } + if (c->state != ICRQ) +@@ -245,7 +230,7 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: attempting to negotiate ICRP when state != ICRQ\n", +- __FUNCTION__); ++ __func__); + return -EINVAL; + } + break; +@@ -255,7 +240,7 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: attempting to negotiate ICCN when state != ICRP\n", +- __FUNCTION__); ++ __func__); + return -EINVAL; + } + break; +@@ -265,7 +250,7 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: attempting to negotiate SLI when state != ICCN\n", +- __FUNCTION__); ++ __func__); + return -EINVAL; + } + break; +@@ -275,7 +260,7 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: attempting to negotiate OCRP on tunnel!=SCCCN\n", +- __FUNCTION__); ++ __func__); + return -EINVAL; + } + if (c->state != OCRQ) +@@ -283,7 +268,7 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: attempting to negotiate OCRP when state != OCRQ\n", +- __FUNCTION__); ++ __func__); + return -EINVAL; + } + break; +@@ -294,7 +279,7 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: attempting to negotiate OCCN when state != OCRQ\n", +- __FUNCTION__); ++ __func__); + return -EINVAL; + } + break; +@@ -303,72 +288,33 @@ + case Hello: + break; + default: +- log (LOG_WARN, "%s: i don't know how to handle %s messages\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return -EINVAL; +- } +- } +-#endif +- if (c->msgtype == ICRQ) +- { +- struct call *tmp; +- if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, "%s: new incoming call\n", __FUNCTION__); +- } +- tmp = new_call (t); +- if (!tmp) +- { +- log (LOG_WARN, "%s: unable to create new call\n", __FUNCTION__); ++ log (LOG_WARN, "%s: unknown messages type %d\n", ++ __func__, get16(p)); + return -EINVAL; + } +- tmp->next = t->call_head; +- t->call_head = tmp; +- t->count++; +- /* +- * Is this still safe to assume that the head will always +- * be the most recent call being negotiated? +- * Probably... FIXME anyway... +- */ +- + } +- return 0; ++ return 0; + } + +-int rand_vector_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) +-{ +- int size; +- _u16 *raw = (_u16 *) data; +- size = (raw[0] & 0x0FFF) - 6; +- if (t->sanity) +- { +- if (size < 0) +- { +- if (DEBUG) +- log (LOG_DEBUG, "%s: Random vector too small (%d < 0)\n", +- __FUNCTION__, size); +- wrong_length (c, "Random Vector", 6, datalen, 1); +- return -EINVAL; +- } +- if (size > MAX_VECTOR_SIZE) +- { +- if (DEBUG) +- log (LOG_DEBUG, "%s: Random vector too large (%d > %d)\n", +- __FUNCTION__, datalen, MAX_VECTOR_SIZE); +- wrong_length (c, "Random Vector", 6, datalen, 1); +- return -EINVAL; +- } +- } +- if (debug_avp) +- log (LOG_DEBUG, "%s: Random Vector of %d octets\n", __FUNCTION__, +- size); +- t->chal_us.vector = (unsigned char *) &raw[3]; +- t->chal_us.vector_len = size; +- return 0; ++/*****************************************************************************/ ++int validate_gen_avp(int attr, struct tunnel *t, struct call *c, ++ void *data, int datalen) { ++ (void)data; (void)datalen; ++ int i = 0, found = 0; ++ ++ if(t->sanity) { ++ for(i = 0; i < 8; i++) { ++ if(c->msgtype == avps[attr].allowed_states[i]) ++ found++; ++ } ++ if(!found) ++ return -EINVAL; ++ } ++ return 0; + } + ++/* t, c, data, and datalen may be assumed to be defined for all avp's */ ++/*****************************************************************************/ + int ignore_avp (struct tunnel *t, struct call *c, void *data, int datalen) + { + /* +@@ -383,94 +329,88 @@ + * + */ + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, "%s : Ignoring AVP\n", __FUNCTION__); +- } ++ log (LOG_DEBUG, "%s : Ignoring AVP\n", __func__); + return 0; + } + +-int seq_reqd_avp (struct tunnel *t, struct call *c, void *data, int datalen) ++/*****************************************************************************/ ++int message_type_avp (struct tunnel *t, struct call *c, void *data, ++ int avplen) + { +-#ifdef SANITY +- if (t->sanity) ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ ++ if(!c->msgtype) ++ c->msgtype = get16(p); ++ ++ if ((c->msgtype > MAX_MSG) || (!msgtypes[c->msgtype])) + { +- if (datalen != 6) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is incorrect size. %d != 6\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Sequencing Required", 6, datalen, 1); +- return -EINVAL; +- } +- switch (c->msgtype) ++ log (LOG_DEBUG, "%s: unknown message type %d\n", __func__, ++ c->msgtype); ++ return -EINVAL; ++ } ++ if (debug_avp) ++ log (LOG_DEBUG, "%s: message type %d (%s)\n", __func__, ++ c->msgtype, msgtypes[c->msgtype]); ++ if (c->msgtype == ICRQ) ++ { ++ struct call *tmp; ++ if (debug_avp) ++ log (LOG_DEBUG, "%s: new incoming call\n", __func__); ++ tmp = new_call (t); ++ if (!tmp) + { +- case ICCN: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: sequencing required not appropriate for %s!\n", +- __FUNCTION__, msgtypes[c->msgtype]); ++ log (LOG_WARN, "%s: unable to create new call\n", __func__); + return -EINVAL; + } ++ tmp->next = t->call_head; ++ t->call_head = tmp; ++ t->count++; ++ /* ++ * Is this still safe to assume that the head will always ++ * be the most recent call being negotiated? ++ * Probably... FIXME anyway... ++ */ + } +-#endif ++ return 0; ++} ++ ++/*****************************************************************************/ ++int rand_vector_avp (struct tunnel *t, struct call *c, void *data, ++ int avplen) ++{ ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ int datalen = avplen - sizeof(struct avp_hdr); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, "%s: peer requires sequencing.\n", __FUNCTION__); +- } ++ log (LOG_DEBUG, "%s: random vector len %d\n", __func__, datalen); ++ t->chal_us.vector = (unsigned char *)p; ++ t->chal_us.vector_len = datalen; ++ return 0; ++} ++ ++/*****************************************************************************/ ++int seq_reqd_avp (struct tunnel *t, struct call *c, void *data, int datalen) ++{ ++ if (debug_avp) ++ log (LOG_DEBUG, "%s: peer requires sequencing.\n", __func__); + c->seq_reqd = -1; + return 0; + } + ++/*****************************************************************************/ + int result_code_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++ int avplen) + { +- /* +- * Find out what version of l2tp the other side is using. +- * I'm not sure what we're supposed to do with this but whatever.. +- */ ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ int datalen = avplen - sizeof(struct avp_hdr); ++ u_int16_t result = get16(p); ++ u_int16_t error = get16(p + 2); + +- int error; +- int result; +- _u16 *raw = data; +-#ifdef SANITY +- if (t->sanity) +- { +- if (datalen < 10) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is incorrect size. %d < 10\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Result Code", 10, datalen, 1); +- return -EINVAL; +- } +- switch (c->msgtype) +- { +- case CDN: +- case StopCCN: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: result code not appropriate for %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- } +-#endif +- result = ntohs (raw[3]); +- error = ntohs (raw[4]); + if ((c->msgtype == StopCCN) && ((result > 7) || (result < 1))) + { + if (DEBUG) + log (LOG_DEBUG, +- "%s: result code out of range (%d %d %d). Ignoring.\n", +- __FUNCTION__, result, error, datalen); ++ "%s: (StopCCN) result code out of range ! (1 < %d < 7)\n", ++ __func__, result); + return 0; + } + +@@ -478,1112 +418,348 @@ + { + if (DEBUG) + log (LOG_DEBUG, +- "%s: result code out of range (%d %d %d). Ignoring.\n", +- __FUNCTION__, result, error, datalen); ++ "%s: (CDN) result code out of range !(1 < %d < 11)\n", ++ __func__, result); + return 0; + } + + c->error = error; + c->result = result; +- safe_copy (c->errormsg, (char *) &raw[5], datalen - 10); ++ memcpy(c->errormsg, (char*)p + 4, datalen - 4); ++ c->errormsg[datalen - 4] = '\0'; ++ + if (debug_avp) + { +- if (DEBUG && (c->msgtype == StopCCN)) ++ if(c->msgtype == StopCCN) + { + log (LOG_DEBUG, + "%s: peer closing for reason %d (%s), error = %d (%s)\n", +- __FUNCTION__, result, stopccn_result_codes[result], error, ++ __func__, result, stopccn_result_codes[result], error, + c->errormsg); + } + else + { + log (LOG_DEBUG, + "%s: peer closing for reason %d (%s), error = %d (%s)\n", +- __FUNCTION__, result, cdn_result_codes[result], error, ++ __func__, result, cdn_result_codes[result], error, + c->errormsg); + } + } + return 0; + } + ++/*****************************************************************************/ + int protocol_version_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++ int avplen) + { +- /* +- * Find out what version of l2tp the other side is using. +- * I'm not sure what we're supposed to do with this but whatever.. +- */ ++ u_int8_t *p = data + sizeof(struct avp_hdr); + +- int ver; +- _u16 *raw = data; +-#ifdef SANITY +- if (t->sanity) +- { +- if (datalen != 8) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is incorrect size. %d != 8\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Protocol Version", 8, datalen, 1); +- return -EINVAL; +- } +- switch (c->msgtype) +- { +- case SCCRP: +- case SCCRQ: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: protocol version not appropriate for %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- } +-#endif +- ver = ntohs (raw[3]); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: peer is using version %d, revision %d.\n", __FUNCTION__, +- (ver >> 8), ver & 0xFF); +- } ++ log (LOG_DEBUG, "%s: peer is using version %d, revision %d.\n", ++ __func__,*p, *(p+1)); + return 0; + } + ++/*****************************************************************************/ + int framing_caps_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++ int avplen) + { +- /* +- * Retrieve the framing capabilities +- * from the peer +- */ +- +- int caps; +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ u_int16_t caps = get16(p + 2); + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case SCCRP: +- case SCCRQ: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: framing capabilities not appropriate for %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen != 10) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is incorrect size. %d != 10\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Framming Capabilities", 10, datalen, 0); +- return -EINVAL; +- } +- } +-#endif +- caps = ntohs (raw[4]); + if (debug_avp) +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: supported peer frames:%s%s\n", __FUNCTION__, +- caps & ASYNC_FRAMING ? " async" : "", +- caps & SYNC_FRAMING ? " sync" : ""); ++ log (LOG_DEBUG, "%s: supported peer frames:%s %s\n", __func__, ++ caps & ASYNC_FRAMING ? "async" : "", ++ caps & SYNC_FRAMING ? "sync" : ""); ++ + t->fc = caps & (ASYNC_FRAMING | SYNC_FRAMING); + return 0; + } + ++/*****************************************************************************/ + int bearer_caps_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++ int avplen) + { +- /* +- * What kind of bearer channels does our peer support? +- */ +- int caps; +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ u_int16_t caps = get16(p + 2); + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case SCCRP: +- case SCCRQ: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: bearer capabilities not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen != 10) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is incorrect size. %d != 10\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Bearer Capabilities", 10, datalen, 0); +- return -EINVAL; +- } +- } +-#endif +- caps = ntohs (raw[4]); + if (debug_avp) +- { +- if (DEBUG) +- { +- log (LOG_DEBUG, +- "%s: supported peer bearers:%s%s\n", +- __FUNCTION__, +- caps & ANALOG_BEARER ? " analog" : "", +- caps & DIGITAL_BEARER ? " digital" : ""); +- } ++ log (LOG_DEBUG, "%s: supported peer bearers:%s %s\n", ++ __func__, ++ caps & ANALOG_BEARER ? "analog" : "", ++ caps & DIGITAL_BEARER ? "digital" : ""); + +- } + t->bc = caps & (ANALOG_BEARER | DIGITAL_BEARER); + return 0; + } + +- +-/* FIXME: I need to handle tie breakers eventually */ +- ++/*****************************************************************************/ + int firmware_rev_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++ int avplen) + { +- /* +- * Report and record remote firmware version +- */ +- int ver; +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case SCCRP: +- case SCCRQ: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: firmware revision not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen != 8) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is incorrect size. %d != 8\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Firmware Revision", 8, datalen, 0); +- return -EINVAL; +- } +- } +-#endif +- ver = ntohs (raw[3]); ++ t->firmware = get16(p); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: peer reports firmware version %d (0x%.4x)\n", +- __FUNCTION__, ver, ver); +- } +- t->firmware = ver; ++ log (LOG_DEBUG, "%s: peer reports firmware version %d (0x%.4X)\n", ++ __func__, t->firmware, t->firmware); + return 0; + } + ++/*****************************************************************************/ + int bearer_type_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++ int avplen) + { +- /* +- * What kind of bearer channel is the call on? +- */ +- int b; +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case ICRQ: +- case OCRQ: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: bearer type not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen != 10) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is incorrect size. %d != 10\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Bearer Type", 10, datalen, 0); +- return -EINVAL; +- } +- } +-#endif +- b = ntohs (raw[4]); ++ t->call_head->bearer = get16(p + 2); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: peer bears:%s\n", __FUNCTION__, +- b & ANALOG_BEARER ? " analog" : "digital"); +- } +- t->call_head->bearer = b; ++ log (LOG_DEBUG, "%s: peer bears: %s\n", __func__, ++ (t->call_head->bearer & ANALOG_BEARER) ? "analog" : "digital"); + return 0; + } + +-int frame_type_avp (struct tunnel *t, struct call *c, void *data, int datalen) ++/*****************************************************************************/ ++int frame_type_avp (struct tunnel *t, struct call *c, void *data, int avplen) + { +- /* +- * What kind of frame channel is the call on? +- */ +- int b; +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case ICCN: +- case OCRQ: +- case OCCN: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: frame type not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen != 10) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is incorrect size. %d != 10\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Frame Type", 10, datalen, 0); +- return -EINVAL; +- } +- } +-#endif +- b = ntohs (raw[4]); ++ c->frame = get16(p + 2); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: peer uses:%s frames\n", __FUNCTION__, +- b & ASYNC_FRAMING ? " async" : "sync"); +- } +- c->frame = b; ++ log (LOG_DEBUG, "%s: peer uses:%s frames\n", __func__, ++ (c->frame & ASYNC_FRAMING) ? "async" : "sync"); + return 0; + } + +-int hostname_avp (struct tunnel *t, struct call *c, void *data, int datalen) ++/*****************************************************************************/ ++int hostname_avp (struct tunnel *t, struct call *c, void *data, int avplen) + { +- /* +- * What is the peer's name? +- */ +- int size; +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ int datalen = avplen - sizeof(struct avp_hdr); ++ ++ memcpy(t->hostname, p, datalen); ++ t->hostname[datalen] = '\0'; + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case SCCRP: +- case SCCRQ: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: hostname not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen < 6) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is too small. %d < 6\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Hostname", 6, datalen, 1); +- return -EINVAL; +- } +- } +-#endif +- size = raw[0] & 0x0FFF; +- if (size > MAXSTRLEN - 1) +- { +- if (DEBUG) +- log (LOG_DEBUG, "%s: truncating reported hostname (size is %d)\n", +- __FUNCTION__, size); +- size = MAXSTRLEN - 1; +- } +- safe_copy (t->hostname, (char *) &raw[3], size - 6); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: peer reports hostname '%s'\n", __FUNCTION__, +- t->hostname); +- } ++ log (LOG_DEBUG, "%s: peer reports hostname '%s'\n", __func__, ++ t->hostname); ++ + return 0; + } + +-int dialing_number_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++/*****************************************************************************/ ++int calling_number_avp (struct tunnel *t, struct call *c, void *data, ++ int avplen) + { +- /* +- * What is the peer's name? +- */ +- int size; +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ int datalen = avplen - sizeof(struct avp_hdr); ++ ++ memcpy(t->call_head->dialing, p, datalen); ++ t->call_head->dialing[datalen] = '\0'; + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case ICRQ: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: dialing number not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen < 6) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is too small. %d < 6\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Dialing Number", 6, datalen, 1); +- return -EINVAL; +- } +- } +-#endif +- size = raw[0] & 0x0FFF; +- if (size > MAXSTRLEN - 1) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: truncating reported dialing number (size is %d)\n", +- __FUNCTION__, size); +- size = MAXSTRLEN - 1; +- } +- safe_copy (t->call_head->dialing, (char *) &raw[3], size); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: peer reports dialing number '%s'\n", __FUNCTION__, +- t->call_head->dialing); +- } ++ log (LOG_DEBUG, "%s: peer reports dialing number '%s'\n", __func__, ++ t->call_head->dialing); ++ + return 0; + } + +-int dialed_number_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++/*****************************************************************************/ ++int called_number_avp (struct tunnel *t, struct call *c, void *data, ++ int avplen) + { +- /* +- * What is the peer's name? +- */ +- int size; +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ int datalen = avplen - sizeof(struct avp_hdr); ++ ++ memcpy(t->call_head->dialed, p, datalen); ++ t->call_head->dialed[datalen] = '\0'; + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case OCRQ: +- case ICRQ: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: dialed number not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen < 6) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is too small. %d < 6\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Dialed Number", 6, datalen, 1); +- return -EINVAL; +- } +- } +-#endif +- size = raw[0] & 0x0FFF; +- if (size > MAXSTRLEN - 1) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: truncating reported dialed number (size is %d)\n", +- __FUNCTION__, size); +- size = MAXSTRLEN - 1; +- } +- safe_copy (t->call_head->dialed, (char *) &raw[3], size); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: peer reports dialed number '%s'\n", __FUNCTION__, +- t->call_head->dialed); +- } ++ log (LOG_DEBUG, "%s: peer reports dialed number '%s'\n", __func__, ++ t->call_head->dialed); ++ + return 0; + } + ++/*****************************************************************************/ + int sub_address_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++ int avplen) + { +- /* +- * What is the peer's name? +- */ +- int size; +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ int datalen = avplen - sizeof(struct avp_hdr); ++ ++ memcpy(t->call_head->subaddy, p, datalen); ++ t->call_head->subaddy[datalen] = '\0'; + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case OCRP: +- case ICRQ: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: sub_address not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen < 6) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is too small. %d < 6\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Sub-address", 6, datalen, 1); +- return -EINVAL; +- } +- } +-#endif +- size = raw[0] & 0x0FFF; +- if (size > MAXSTRLEN - 1) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: truncating reported sub address (size is %d)\n", +- __FUNCTION__, size); +- size = MAXSTRLEN - 1; +- } +- safe_copy (t->call_head->subaddy, (char *) &raw[3], size); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: peer reports subaddress '%s'\n", __FUNCTION__, +- t->call_head->subaddy); +- } ++ log (LOG_DEBUG, "%s: peer reports subaddress '%s'\n", __func__, ++ t->call_head->subaddy); + return 0; + } + +-int vendor_avp (struct tunnel *t, struct call *c, void *data, int datalen) ++/*****************************************************************************/ ++int vendor_avp (struct tunnel *t, struct call *c, void *data, int avplen) + { +- /* +- * What vendor makes the other end? +- */ +- int size; +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ int datalen = avplen - sizeof(struct avp_hdr); ++ ++ memcpy(t->vendor, p, datalen); ++ t->vendor[datalen] = '\0'; + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case SCCRP: +- case SCCRQ: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: vendor not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen < 6) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is too small. %d < 6\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Vendor", 6, datalen, 1); +- return -EINVAL; +- } +- } +-#endif +- size = raw[0] & 0x0FFF; +- if (size > MAXSTRLEN - 1) +- { +- if (DEBUG) +- log (LOG_DEBUG, "%s: truncating reported vendor (size is %d)\n", +- __FUNCTION__, size); +- size = MAXSTRLEN - 1; +- } +- safe_copy (t->vendor, (char *) &raw[3], size); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: peer reports vendor '%s'\n", __FUNCTION__, t->vendor); +- } ++ log (LOG_DEBUG, "%s: peer reports vendor '%s'\n", __func__, t->vendor); + return 0; + } + +-int challenge_avp (struct tunnel *t, struct call *c, void *data, int datalen) ++/*****************************************************************************/ ++int challenge_avp (struct tunnel *t, struct call *c, void *data, int avplen) + { +- /* +- * We are sent a challenge +- */ +- _u16 *raw = data; +- int size; +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case SCCRP: +- case SCCRQ: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: challenge not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen < 6) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is too small. %d < 6\n", __FUNCTION__, +- datalen); +- wrong_length (c, "challenge", 6, datalen, 1); +- return -EINVAL; +- } +- } +-#endif +- /* size = raw[0] & 0x0FFF; */ +- /* length field of AVP's is only 10 bits long, not 12 */ +- size = raw[0] & 0x03FF; +- size -= sizeof (struct avp_hdr); +- /* if (size != MD_SIG_SIZE) +- { +- log (LOG_DEBUG, "%s: Challenge is not the right length (%d != %d)\n", +- __FUNCTION__, size, MD_SIG_SIZE); +- return -EINVAL; +- } */ +- t->chal_us.challenge = malloc(size+1); +- if (t->chal_us.challenge == NULL) +- { ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ int datalen = avplen - sizeof(struct avp_hdr); ++ ++ t->chal_us.challenge = calloc(datalen, 1); ++ if (!t->chal_us.challenge) + return -ENOMEM; +- } +- memset(t->chal_us.challenge, 0, size+1); +- bcopy (&raw[3], (t->chal_us.challenge), size); ++ memcpy(t->chal_us.challenge, p, datalen); + t->chal_us.state = STATE_CHALLENGED; ++ + if (debug_avp) +- { +- log (LOG_DEBUG, "%s: challenge avp found\n", __FUNCTION__); +- } ++ log (LOG_DEBUG, "%s: challenge avp found\n", __func__); ++ + return 0; + } + +-int chalresp_avp (struct tunnel *t, struct call *c, void *data, int datalen) ++/*****************************************************************************/ ++int chalresp_avp (struct tunnel *t, struct call *c, void *data, int avplen) + { +- /* +- * We are sent a challenge +- */ +- _u16 *raw = data; +- int size; +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case SCCRP: +- case SCCCN: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: challenge response not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen < 6) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is too small. %d < 6\n", __FUNCTION__, +- datalen); +- wrong_length (c, "challenge", 6, datalen, 1); +- return -EINVAL; +- } +- } +-#endif +- size = raw[0] & 0x0FFF; +- size -= sizeof (struct avp_hdr); +- if (size != MD_SIG_SIZE) +- { +- log (LOG_DEBUG, "%s: Challenge is not the right length (%d != %d)\n", +- __FUNCTION__, size, MD_SIG_SIZE); +- return -EINVAL; +- } ++ u_int8_t *p = data + sizeof(struct avp_hdr); + +- bcopy (&raw[3], t->chal_them.reply, MD_SIG_SIZE); +- if (debug_avp) +- { +- log (LOG_DEBUG, "%s: Challenge reply found\n", __FUNCTION__); +- } ++ memcpy(t->chal_them.reply, p, MD_SIG_SIZE); ++ if(debug_avp) ++ log(LOG_DEBUG, "%s: Challenge reply found\n", __func__); + return 0; + } + ++/*****************************************************************************/ + int assigned_tunnel_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++ int avplen) + { +- /* +- * What is their TID that we must use from now on? +- */ +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ u_int16_t id = get16(p); + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case SCCRP: +- case SCCRQ: +- case StopCCN: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: tunnel ID not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen != 8) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is wrong size. %d != 8\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Assigned Tunnel ID", 8, datalen, 0); +- return -EINVAL; +- } +- } +-#endif + if (c->msgtype == StopCCN) +- { +- t->qtid = ntohs (raw[3]); +- } ++ t->qtid = id; + else +- { +- t->tid = ntohs (raw[3]); +- } ++ t->tid = id; + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: using peer's tunnel %d\n", __FUNCTION__, +- ntohs (raw[3])); +- } ++ log (LOG_DEBUG, "%s: using peer's tunnel %d\n", __func__, id); + return 0; + } + +-int assigned_call_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++/*****************************************************************************/ ++int assigned_session_avp (struct tunnel *t, struct call *c, void *data, ++ int avplen) + { +- /* +- * What is their CID that we must use from now on? +- */ +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); ++ u_int16_t id = get16(p); ++ ++ switch(c->msgtype) { ++ case CDN: ++ case ICRP: ++ case OCRP: ++ c->cid = id; ++ break; ++ case ICRQ: ++ t->call_head->cid = id; ++ break; ++ }; + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case CDN: +- case ICRP: +- case ICRQ: +- case OCRP: /* jz: deleting the debug message */ +- break; +- case OCRQ: +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: call ID not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen != 8) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is wrong size. %d != 8\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Assigned Call ID", 8, datalen, 0); +- return -EINVAL; +- } +- } +-#endif +- if (c->msgtype == CDN) +- { +- c->qcid = ntohs (raw[3]); +- } +- else if (c->msgtype == ICRQ) +- { +- t->call_head->cid = ntohs (raw[3]); +- } +- else if (c->msgtype == ICRP) +- { +- c->cid = ntohs (raw[3]); +- } +- else if (c->msgtype == OCRP) +- { /* jz: copy callid to c->cid */ +- c->cid = ntohs (raw[3]); +- } +- else +- { +- log (LOG_DEBUG, "%s: Dunno what to do when it's state %s!\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- } + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: using peer's call %d\n", __FUNCTION__, ntohs (raw[3])); +- } ++ log (LOG_DEBUG, "%s: assigned session id: %d\n", __func__, id); + return 0; + } + ++/*****************************************************************************/ + int packet_delay_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++ int avplen) + { +- /* +- * What is their CID that we must use from now on? +- */ +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case ICRP: +- case OCRQ: +- case ICCN: +- case OCRP: +- case OCCN: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: packet delay not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen != 8) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is wrong size. %d != 8\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Assigned Call ID", 8, datalen, 0); +- return -EINVAL; +- } +- } +-#endif +- c->ppd = ntohs (raw[3]); ++ c->ppd = get16(p); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: peer's delay is %d 1/10's of a second\n", __FUNCTION__, +- ntohs (raw[3])); +- } ++ log (LOG_DEBUG, "%s: peer's delay is %d 1/10's of a second\n", __func__, ++ c->ppd); + return 0; + } + +-int call_serno_avp (struct tunnel *t, struct call *c, void *data, int datalen) ++/*****************************************************************************/ ++int call_serno_avp (struct tunnel *t, struct call *c, void *data, int avplen) + { + /* + * What is the serial number of the call? + */ +- _u16 *raw = data; +- +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case ICRQ: +- case OCRQ: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: call ID not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen != 10) +- { +-#ifdef STRICT +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is wrong size. %d != 10\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Serial Number", 10, datalen, 0); +- return -EINVAL; +-#else +- log (LOG_DEBUG, +- "%s: peer is using old style serial number. Will be invalid.\n", +- __FUNCTION__); +-#endif ++ u_int8_t *p = data + sizeof(struct avp_hdr); + +- } +- } +-#endif +- t->call_head->serno = (((unsigned int) ntohs (raw[3])) << 16) | +- ((unsigned int) ntohs (raw[4])); ++ t->call_head->serno = get32(p); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: serial number is %d\n", __FUNCTION__, +- t->call_head->serno); +- } ++ log (LOG_DEBUG, "%s: serial number is %d\n", __func__, ++ t->call_head->serno); + return 0; + } + +-int rx_speed_avp (struct tunnel *t, struct call *c, void *data, int datalen) ++/*****************************************************************************/ ++int rx_speed_avp (struct tunnel *t, struct call *c, void *data, int avplen) + { +- /* +- * What is the received baud rate of the call? +- */ +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case ICCN: +- case OCCN: +- case OCRP: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: rx connect speed not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen != 10) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is wrong size. %d != 10\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Connect Speed (RX)", 10, datalen, 0); +- return -EINVAL; +- } +- } +-#endif +- c->rxspeed = (((unsigned int) ntohs (raw[3])) << 16) | +- ((unsigned int) ntohs (raw[4])); +- if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: receive baud rate is %d\n", __FUNCTION__, c->rxspeed); +- } ++ c->rxspeed = get32(p); ++ if(debug_avp) ++ log(LOG_DEBUG, "%s: receive baud rate is %d\n", __func__, c->rxspeed); + return 0; + } + +-int tx_speed_avp (struct tunnel *t, struct call *c, void *data, int datalen) ++/*****************************************************************************/ ++int tx_speed_avp (struct tunnel *t, struct call *c, void *data, int avplen) + { +- /* +- * What is the tranmsit baud rate of the call? +- */ +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case ICCN: +- case OCCN: +- case OCRP: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: tx connect speed not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen != 10) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is wrong size. %d != 10\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Connect Speed (tx)", 10, datalen, 0); +- return -EINVAL; +- } +- } +-#endif +- c->txspeed = (((unsigned int) ntohs (raw[3])) << 16) | +- ((unsigned int) ntohs (raw[4])); ++ c->txspeed = get32(p); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: transmit baud rate is %d\n", __FUNCTION__, c->txspeed); +- } ++ log (LOG_DEBUG, "%s: transmit baud rate is %d\n", ++ __func__, c->txspeed); + return 0; + } ++ ++/*****************************************************************************/ + int call_physchan_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++ int avplen) + { +- /* +- * What is the physical channel? +- */ +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case ICRQ: +- case OCRQ: +- case OCRP: +- case OCCN: +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: physical channel not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen != 10) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is wrong size. %d != 10\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Physical Channel", 10, datalen, 0); +- return -EINVAL; +- } +- } +-#endif +- t->call_head->physchan = (((unsigned int) ntohs (raw[3])) << 16) | +- ((unsigned int) ntohs (raw[4])); ++ t->call_head->physchan = get32(p); + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: physical channel is %d\n", __FUNCTION__, +- t->call_head->physchan); +- } ++ log(LOG_DEBUG, "%s: physical channel is %d\n", __func__, ++ t->call_head->physchan); + return 0; + } + ++/*****************************************************************************/ + int receive_window_size_avp (struct tunnel *t, struct call *c, void *data, +- int datalen) ++ int avplen) + { +- /* +- * What is their RWS? +- */ +- _u16 *raw = data; ++ u_int8_t *p = data + sizeof(struct avp_hdr); + +-#ifdef SANITY +- if (t->sanity) +- { +- switch (c->msgtype) +- { +- case SCCRP: +- case SCCRQ: +- case OCRP: /* jz */ +- case OCCN: /* jz */ +- case StopCCN: +-/* case ICRP: +- case ICCN: */ +- break; +- default: +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: RWS not appropriate for message %s. Ignoring.\n", +- __FUNCTION__, msgtypes[c->msgtype]); +- return 0; +- } +- if (datalen != 8) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: avp is wrong size. %d != 8\n", __FUNCTION__, +- datalen); +- wrong_length (c, "Receive Window Size", 8, datalen, 0); +- return -EINVAL; +- } +- } +-#endif +- t->rws = ntohs (raw[3]); ++ t->rws = get16(p); + /* if (c->rws >= 0) + c->fbit = FBIT; */ + if (debug_avp) +- { +- if (DEBUG) +- log (LOG_DEBUG, +- "%s: peer wants RWS of %d. Will use flow control.\n", +- __FUNCTION__, t->rws); +- } ++ log (LOG_DEBUG, "%s: peer wants RWS of %d. Will use flow control.\n", ++ __func__, t->rws); + return 0; + } + + ++/*****************************************************************************/ + int handle_avps (struct buffer *buf, struct tunnel *t, struct call *c) + { + /* +@@ -1594,82 +770,100 @@ + + struct avp_hdr *avp; + int len = buf->len - sizeof (struct control_hdr); ++ u_int16_t rlen = 0; ++ u_int16_t attr = 0; + int firstavp = -1; +- int hidlen; ++ int hidlen = 0; + char *data = buf->start + sizeof (struct control_hdr); + avp = (struct avp_hdr *) data; ++ + if (debug_avp) + log (LOG_DEBUG, "%s: handling avp's for tunnel %d, call %d\n", +- __FUNCTION__, t->ourtid, c->ourcid); ++ __func__, t->ourtid, c->ourcid); ++ ++ if(len < 6) { ++ log (LOG_WARN, "%s: packet too small\n", __func__); ++ set_error(c, ERROR_LENGTH, "Invalid message length"); ++ return -EINVAL; ++ } ++ + while (len > 0) + { +- /* Go ahead and byte-swap the header */ +- swaps (avp, sizeof (struct avp_hdr)); +- if (avp->attr > AVP_MAX) ++ rlen = get16((u_int8_t*)&avp->length); ++ attr = get16((u_int8_t*)&avp->attr); ++ ++ /* AVP header checks */ ++ if (attr > AVP_MAX) + { +- if (AMBIT (avp->length)) ++ if (AMBIT(rlen)) + { + log (LOG_WARN, +- "%s: dont know how to handle mandatory attribute %d. Closing %s.\n" +- __FUNCTION__, avp->attr, +- (c != t->self) ? "call" : "tunnel"); +- set_error (c, VENDOR_ERROR, +- "mandatory attribute %d cannot be handled", +- avp->attr); +- c->needclose = -1; ++ "%s: unhandeled mandatory attribute %d. Closing %s.\n", ++ __func__, attr, (c != t->self) ? "call" : "tunnel"); ++ set_error (c, VENDOR_ERROR, ++ "mandatory attribute %d cannot be handled", attr); + return -EINVAL; + } + else + { + if (DEBUG) + log (LOG_WARN, +- "%s: dont know how to handle atribute %d.\n", +- __FUNCTION__, avp->attr); ++ "%s: handeled attribute %d.\n", ++ __func__, attr); + goto next; + } + } +- if (ALENGTH (avp->length) > len) ++ if (ALENGTH (rlen) > len) + { + log (LOG_WARN, +- "%s: AVP received with length > remaining packet length!\n", +- __FUNCTION__); ++ "%s: AVP reported length > remaining packet length\n", ++ __func__); + set_error (c, ERROR_LENGTH, "Invalid AVP length"); +- c->needclose = -1; + return -EINVAL; + } +- if (avp->attr && firstavp) ++ if (ALENGTH (rlen) < sizeof (struct avp_hdr)) + { +- log (LOG_WARN, "%s: First AVP was not message type.\n", +- __FUNCTION__); +- set_error (c, VENDOR_ERROR, "First AVP must be message type"); +- c->needclose = -1; ++ log (LOG_WARN, "%s: AVP reported length too small (%d).\n", ++ __func__, ALENGTH (rlen)); ++ set_error (c, ERROR_LENGTH, "AVP too small"); + return -EINVAL; + } +- if (ALENGTH (avp->length) < sizeof (struct avp_hdr)) ++ if (avps[attr].sz) { ++ if((avps[attr].flags & AVP_F_FIXLEN) ? ++ (ALENGTH(rlen) - sizeof(struct avp_hdr)) != avps[attr].sz : ++ (ALENGTH(rlen) - sizeof(struct avp_hdr)) > avps[attr].sz) { ++ log (LOG_DEBUG, "%s: %s avp size mismatch (%d %s %d)\n", ++ __func__, ++ avps[attr].description, ++ (avps[attr].flags & AVP_F_FIXLEN) ? "!=" : "<", ++ ALENGTH(rlen), avps[attr].sz); ++ set_error (c, ERROR_LENGTH, "AVP size check failed"); ++ return -EINVAL; ++ } ++ } ++ if (attr && firstavp) + { +- log (LOG_WARN, "%s: AVP with too small of size (%d).\n", +- __FUNCTION__, ALENGTH (avp->length)); +- set_error (c, ERROR_LENGTH, "AVP too small"); +- c->needclose = -1; ++ log (LOG_WARN, "%s: First AVP was not message type.\n", ++ __func__); ++ set_error (c, VENDOR_ERROR, "First AVP must be message type"); + return -EINVAL; + } +- if (AZBITS (avp->length)) ++ if (AZBITS (rlen)) + { +- log (LOG_WARN, "%s: %sAVP has reserved bits set.\n", __FUNCTION__, +- AMBIT (avp->length) ? "Mandatory " : ""); +- if (AMBIT (avp->length)) ++ log (LOG_WARN, "%s: %sAVP has reserved bits set.\n", __func__, ++ AMBIT (rlen) ? "Mandatory " : ""); ++ if (AMBIT (rlen)) + { + set_error (c, ERROR_RESERVED, "reserved bits set in AVP"); +- c->needclose = -1; + return -EINVAL; + } + goto next; + } +- if (AHBIT (avp->length)) ++ ++ /* decryption */ ++ if (AHBIT (rlen)) + { +-#ifdef DEBUG_HIDDEN +- log (LOG_DEBUG, "%s: Hidden bit set on AVP.\n", __FUNCTION__); +-#endif ++ log (LOG_DEBUG, "%s: Hidden bit set on AVP.\n", __func__); + /* We want to rewrite the AVP as an unhidden AVP + and then pass it along as normal. Remeber how + long the AVP was in the first place though! */ +@@ -1678,12 +872,11 @@ + { + if (debug_avp) + log (LOG_WARN, "%s: Unable to handle hidden %sAVP\n:", +- __FUNCTION__, +- (AMBIT (avp->length) ? "mandatory " : "")); +- if (AMBIT (avp->length)) ++ __func__, ++ (AMBIT (rlen) ? "mandatory " : "")); ++ if (AMBIT (rlen)) + { + set_error (c, VENDOR_ERROR, "Invalid Hidden AVP"); +- c->needclose = -1; + return -EINVAL; + } + goto next; +@@ -1696,17 +889,43 @@ + } + else + hidlen = 0; +- if (avps[avp->attr].handler) ++ ++ /* validate */ ++ if (avps[attr].validate) ++ { ++ if(avps[attr].validate(attr, t, c, avp, ALENGTH (rlen))) { ++ if (AMBIT (rlen)) ++ { ++ log (LOG_WARN, ++ "%s: verification of AVP %d (%s) failed.\n", ++ __func__, attr, ++ avps[attr].description); ++ set_error (c, VENDOR_ERROR, "processing failed on mandatory AVP"); ++ return -EINVAL; ++ } ++ else ++ { ++ if (DEBUG) ++ log (LOG_DEBUG, ++ "%s: Bad exit status handling attribute %d (%s).\n", ++ __func__, attr, ++ avps[attr].description); ++ } ++ } ++ } ++ ++ /* handling */ ++ if (avps[attr].handle) + { +- if (avps[avp->attr].handler (t, c, avp, ALENGTH (avp->length))) ++ if (avps[attr].handle(t, c, avp, ALENGTH (rlen))) + { +- if (AMBIT (avp->length)) ++ if (AMBIT (rlen)) + { + log (LOG_WARN, +- "%s: Bad exit status handling attribute %d (%s) on mandatory packet.\n", +- __FUNCTION__, avp->attr, +- avps[avp->attr].description); +- c->needclose = -1; ++ "%s: Bad exit status handling mandatory attribute %d (%s).\n", ++ __func__, attr, ++ avps[attr].description); ++ set_error (c, VENDOR_ERROR, "processing failed on mandatory AVP"); + return -EINVAL; + } + else +@@ -1714,29 +933,31 @@ + if (DEBUG) + log (LOG_DEBUG, + "%s: Bad exit status handling attribute %d (%s).\n", +- __FUNCTION__, avp->attr, +- avps[avp->attr].description); ++ __func__, attr, ++ avps[attr].description); + } + } + } + else + { +- if (AMBIT (avp->length)) ++ if (AMBIT (rlen)) + { + log (LOG_WARN, + "%s: No handler for mandatory attribute %d (%s). Closing %s.\n", +- __FUNCTION__, avp->attr, avps[avp->attr].description, ++ __func__, attr, ++ avps[attr].description, + (c != t->self) ? "call" : "tunnel"); + set_error (c, VENDOR_ERROR, "No handler for attr %d (%s)\n", +- avp->attr, avps[avp->attr].description); ++ attr, ++ avps[attr].description); + return -EINVAL; + } + else + { + if (DEBUG) + log (LOG_WARN, "%s: no handler for atribute %d (%s).\n", +- __FUNCTION__, avp->attr, +- avps[avp->attr].description); ++ __func__, attr, ++ avps[attr].description); + } + } + next: +@@ -1748,16 +969,17 @@ + } + else + { +- len -= ALENGTH (avp->length); +- data += ALENGTH (avp->length); /* Next AVP, please */ ++ len -= ALENGTH (rlen); ++ data += ALENGTH (rlen); /* Next AVP, please */ + } + avp = (struct avp_hdr *) data; + firstavp = 0; + } + if (len != 0) + { +- log (LOG_WARN, "%s: negative overall packet length\n", __FUNCTION__); ++ log (LOG_WARN, "%s: negative overall packet length\n", __func__); + return -EINVAL; + } ++ + return 0; + } +--- l2tpd-0.70-pre20031121.orig/avpsend.c ++++ l2tpd-0.70-pre20031121/avpsend.c +@@ -1,11 +1,5 @@ + /* +- * $Id$ +- * +- * Layer Two Tunnelling Protocol Daemon +- * Copyright (C) 1998 Adtran, Inc. +- * Copyright (C) 2002 Jeff McAdams +- * +- * Mark Spencer ++ * Copyright (C) 2004 Jean-Francois Dive + * + * This software is distributed under the terms + * of the GPL, which you should have received +@@ -14,337 +8,288 @@ + * Attribute Value Pair creating routines + */ + ++/* TODO: Handle Tie break */ ++/* TODO: Get real hostname / config */ ++/* TODO: There should be an overflow check on ++ * the buffer size. (safe for now as ++ * packet size = 4k ++ */ ++ + #include + #include +-#include ++#include + #include "l2tp.h" + +-/* +- * These routines should add avp's to a buffer +- * to be sent +- */ ++extern struct avp avps[]; + ++/* We could add here padding support which would allow ++ * to keep alignemnt straight */ ++static int add_avp(struct buffer *buf, u_int32_t avpid, unsigned char *v, ++ u_int32_t sz, u_int8_t setpayload) { ++ u_int8_t *p = buf->start + buf->len; ++ ++ if(avpid > AVP_MAX || !avps[avpid].flags) { ++ log(LOG_DEBUG, "%s: invalid avp id %d\n", __func__, avpid); ++ return 1; ++ } ++ ++ set16(p, (sz + 6) | (avps[avpid].flags & AVP_F_MANDATORY ? MBIT : 0)); ++ set16(p + 2, VENDOR_ID); ++ set16(p + 4, avpid); ++ if(setpayload) ++ memcpy(p + 6, v, sz); + +-/* FIXME: If SANITY is on, we should check for buffer overruns */ ++ buf->len += (sz + 6); ++ return 0; ++} + +-/* FIXME: Can't this be condensed alot? */ ++/*****************************************************************************/ ++int add_message_type_avp(struct buffer *buf, _u16 type) { ++ u_int8_t t[2]; ++ set16(t, type); ++ if(add_avp(buf, MESSAGE_TYPE_AVP, t, 2, 1)) ++ return 1; ++ return 0; ++} + +-int add_message_type_avp (struct buffer *buf, _u16 type) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0x8 | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = 0; +- raw[3] = htons (type); +- buf->len += 8; ++/*****************************************************************************/ ++int add_protocol_avp(struct buffer *buf) { ++ u_int8_t t[2]; ++ set16(t, OUR_L2TP_VERSION); ++ if(add_avp(buf, PROTOCOL_VERSION_AVP, t, 2, 1)) ++ return 1; + return 0; + } + +-int add_protocol_avp (struct buffer *buf) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0x8 | MBIT); /* Length and M bit */ +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x2); /* Value of our AVP */ +- raw[3] = htons (OUR_L2TP_VERSION); +- buf->len += 8; ++/*****************************************************************************/ ++int add_frame_caps_avp(struct buffer *buf, _u16 caps) { ++ u_int8_t t[4]; ++ t[0] = 0; ++ t[1] = 0; ++ set16(&t[2], caps); ++ if(add_avp(buf, FRAMING_CAP_AVP, t, 4, 1)) ++ return 1; + return 0; + } + +-int add_frame_caps_avp (struct buffer *buf, _u16 caps) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0xA | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x3); +- raw[3] = 0; +- raw[4] = htons (caps); +- buf->len += 10; ++/*****************************************************************************/ ++int add_bearer_caps_avp(struct buffer *buf, _u16 caps) { ++ u_int8_t t[4]; ++ t[0] = 0; ++ t[1] = 0; ++ set16(&t[2], caps); ++ if(add_avp(buf, BEARER_CAP_AVP, t, 4, 1)) ++ return 1; + return 0; + } + +-int add_bearer_caps_avp (struct buffer *buf, _u16 caps) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0xA | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x4); +- raw[3] = 0; +- raw[4] = htons (caps); +- buf->len += 10; ++/*****************************************************************************/ ++int add_firmware_avp(struct buffer *buf) { ++ u_int8_t t[2]; ++ set16(t, OUR_L2TP_VERSION); ++ if(add_avp(buf, FIRMWARE_REV_AVP, t, 2, 1)) ++ return 1; + return 0; + } + +-/* FIXME: I need to send tie breaker AVP's */ +- +-int add_firmware_avp (struct buffer *buf) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0x8); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x6); +- raw[3] = htons (FIRMWARE_REV); +- buf->len += 8; ++/*****************************************************************************/ ++int add_hostname_avp(struct buffer *buf, struct tunnel *t) { ++ char n[STRLEN]; ++ int sz = 0; ++ if(t->lac && t->lac->hostname[0]) { ++ strncpy(n,t->lac->hostname, sizeof(n)); ++ sz = strnlen(t->lac->hostname, sizeof(t->lac->hostname)); ++ } ++ else if(t->lns && t->lns->hostname[0]) { ++ strncpy(n,t->lns->hostname, sizeof(n)); ++ sz = strnlen(t->lns->hostname, sizeof(t->lns->hostname)); ++ } ++ else { ++ if(gethostname(n, STRLEN)) { ++ strcpy(n,"eriwan"); ++ sz = 6; ++ } ++ else ++ sz = strnlen(n, sizeof(n)); ++ } ++ if(add_avp(buf, HOSTNAME_AVP, n, sz, 1)) ++ return 1; + return 0; + } + +-/* +-int add_hostname_avp(struct buffer *buf) { +- _u16 *raw = (_u16 *)(buf->start + buf->len); +- raw[0] = htons((0x6 + strlen(hostname)) | MBIT); +- raw[1] = htons(VENDOR_ID); +- raw[2] = htons(0x7); +- strcpy((char *)(&raw[3]), hostname); +- buf->len += 6 + strlen(hostname); +- return 0; ++/*****************************************************************************/ ++int add_vendor_avp(struct buffer *buf) { ++ if(add_avp(buf, VENDOR_NAME_AVP, VENDOR_NAME, strlen(VENDOR_NAME), 1)) ++ return 1; ++ return 0; + } +-*/ + +-int add_hostname_avp (struct buffer *buf) +-{ +- char names[6] = "eriwan"; +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0xC | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x7); +- strcpy ((char *) (&raw[3]), names); +- buf->len += 12; +- return 0; +-} +- +-int add_vendor_avp (struct buffer *buf) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0x6 + strlen (VENDOR_NAME)); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x8); +- strcpy ((char *) (&raw[3]), VENDOR_NAME); +- buf->len += 6 + strlen (VENDOR_NAME); +- return 0; +-} +- +-int add_tunnelid_avp (struct buffer *buf, _u16 tid) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0x8 | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x9); +- raw[3] = htons (tid); +- buf->len += 8; +- return 0; +-} +- +-int add_avp_rws (struct buffer *buf, _u16 rws) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0x8 | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0xA); +- raw[3] = htons (rws); +- buf->len += 8; +- return 0; +-} +- +-int add_challenge_avp (struct buffer *buf, char *c, int len) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons ((0x6 + len) | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0xB); +- bcopy (c, (char *) (&raw[3]), len); +- buf->len += 6 + len; +- return 0; +-} +- +-int add_chalresp_avp (struct buffer *buf, char *c, int len) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons ((0x6 + len) | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0xD); +- bcopy (c, (char *) (&raw[3]), len); +- buf->len += 6 + len; +- return 0; +-} +- +-int add_randvect_avp (struct buffer *buf, char *c, int len) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons ((0x6 + len) | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x24); +- bcopy (c, (char *) (&raw[3]), len); +- buf->len += 6 + len; +- return 0; +-} +- +-int add_result_code_avp (struct buffer *buf, _u16 result, _u16 error, +- char *msg, int len) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons ((0xA + len) | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x1); +- raw[3] = htons (result); +- raw[4] = htons (error); +- bcopy (msg, (char *) &raw[5], len); +- buf->len += (10 + len); ++/*****************************************************************************/ ++int add_tunnelid_avp(struct buffer *buf, _u16 tid) { ++ u_int8_t t[2]; ++ set16(t, tid); ++ if(add_avp(buf, ASSIGNED_TUN_ID_AVP, t, 2, 1)) ++ return 1; + return 0; + } + ++/*****************************************************************************/ ++int add_avp_rws(struct buffer *buf, _u16 rws) { ++ u_int8_t t[2]; ++ set16(t, rws); ++ if(add_avp(buf, RX_WIN_SIZE_AVP, t, 2, 1)) ++ return 1; ++ return 0; ++} ++ ++/*****************************************************************************/ ++int add_challenge_avp(struct buffer *buf, char *c, int len) { ++ if(add_avp(buf, CHALLENGE_AVP, c, len, 1)) ++ return 1; ++ return 0; ++} ++ ++/*****************************************************************************/ ++int add_chalresp_avp(struct buffer *buf, char *c, int len) { ++ if(add_avp(buf, CHALLENGE_RESP_AVP, c, len, 1)) ++ return 1; ++ return 0; ++} ++ ++/*****************************************************************************/ ++int add_randvect_avp(struct buffer *buf, char *c, int len) { ++ if(add_avp(buf, RANDOM_VECTOR_AVP, c, len, 1)) ++ return 1; ++ return 0; ++} ++ ++/*****************************************************************************/ ++int add_result_code_avp(struct buffer *buf, _u16 result, _u16 error, ++ char *msg, int len) { ++ u_int8_t t[4]; ++ set16(t, result); ++ set16(&t[2], error); ++ memcpy((u_int8_t*)(buf->start + buf->len + 10), msg, len); ++ memcpy((u_int8_t*)(buf->start + buf->len + 6), t, 4); ++ if(add_avp(buf, RESULT_CODE_AVP, 0, 4 + len, 0)) ++ return 1; ++ return 0; ++} ++ ++/*****************************************************************************/ + #ifdef TEST_HIDDEN +-int add_callid_avp (struct buffer *buf, _u16 callid, struct tunnel *t) +-{ +-#else +-int add_callid_avp (struct buffer *buf, _u16 callid) +-{ +-#endif +- _u16 *raw = (_u16 *) (buf->start + buf->len); +-#ifdef TEST_HIDDEN ++int add_callid_avp(struct buffer *buf, _u16 callid, struct tunnel *t) { ++ u_int8_t t[2]; + if (t->hbit) + raw++; +-#endif +- raw[0] = htons (0x8 | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0xE); +- raw[3] = htons (callid); +- buf->len += 8; +-#ifdef TEST_HIDDEN ++ set16(t, callid); ++ if(add_avp(buf, ASSIGNED_SES_ID_AVP, t, 2, 1)) ++ return 1; + if (t->hbit) + encrypt_avp (buf, 8, t); ++ return 0; ++} ++#else ++int add_callid_avp(struct buffer *buf, _u16 callid) { ++ u_int8_t t[2]; ++ set16(t, callid); ++ if(add_avp(buf, ASSIGNED_SES_ID_AVP, t, 2, 1)) ++ return 1; ++ return 0; ++} + #endif ++ ++/*****************************************************************************/ ++int add_serno_avp(struct buffer *buf, unsigned int serno) { ++ u_int8_t t[4]; ++ set32(t, serno); ++ if(add_avp(buf, SERIAL_NUMBER_AVP, t, 4, 1)) ++ return 1; ++ return 0; ++} ++ ++/*****************************************************************************/ ++int add_bearer_avp(struct buffer *buf, int bearer) { ++ u_int8_t t[4]; ++ set32(t, bearer); ++ if(add_avp(buf, BEARER_TYPE_AVP, t, 4, 1)) ++ return 1; ++ return 0; ++} ++ ++/*****************************************************************************/ ++int add_frame_avp(struct buffer *buf, int frame) { ++ u_int8_t t[4]; ++ set32(t, frame); ++ if(add_avp(buf, FRAMING_TYPE_AVP, t, 4, 1)) ++ return 1; ++ return 0; ++} ++ ++/*****************************************************************************/ ++int add_txspeed_avp(struct buffer *buf, int speed) { ++ u_int8_t t[4]; ++ set32(t, speed); ++ if(add_avp(buf, TX_CONNECT_SPEED_AVP, t, 4, 1)) ++ return 1; ++ return 0; ++} ++ ++/*****************************************************************************/ ++int add_rxspeed_avp(struct buffer *buf, int speed) { ++ u_int8_t t[4]; ++ set32(t, speed); ++ if(add_avp(buf, RX_CONNECT_SPEED_AVP, t, 4, 1)) ++ return 1; ++ return 0; ++} ++ ++/*****************************************************************************/ ++int add_physchan_avp(struct buffer *buf, unsigned int physchan) { ++ u_int8_t t[4]; ++ set32(t, physchan); ++ if(add_avp(buf, PHYS_CHAN_ID_AVP, t, 4, 1)) ++ return 1; ++ return 0; ++} ++ ++/*****************************************************************************/ ++int add_ppd_avp(struct buffer *buf, _u16 ppd) { ++ u_int8_t t[2]; ++ set16(t, ppd); ++ if(add_avp(buf, PACKET_DELAY_AVP, t, 2, 1)) ++ return 1; ++ return 0; ++} ++ ++/*****************************************************************************/ ++int add_seqreqd_avp(struct buffer *buf) { ++ if(add_avp(buf, SEQ_REQUIRED_AVP, 0, 0, 0)) ++ return 1; ++ return 0; ++} ++ ++/*****************************************************************************/ ++int add_minbps_avp(struct buffer *buf, int speed) { ++ u_int8_t t[4]; ++ set32(t, speed); ++ if(add_avp(buf, MIN_BPS_AVP, t, 4, 1)) ++ return 1; + return 0; + } + +-int add_serno_avp (struct buffer *buf, unsigned int serno) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0xA | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0xF); +- raw[3] = htons ((serno >> 16) & 0xFFFF); +- raw[4] = htons (serno & 0xFFFF); +- buf->len += 10; +- return 0; +-} +- +-int add_bearer_avp (struct buffer *buf, int bearer) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0xA | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x12); +- raw[3] = htons ((bearer >> 16) & 0xFFFF); +- raw[4] = htons (bearer & 0xFFFF); +- buf->len += 10; +- return 0; +-} +- +-int add_frame_avp (struct buffer *buf, int frame) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0xA | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x13); +- raw[3] = htons ((frame >> 16) & 0xFFFF); +- raw[4] = htons (frame & 0xFFFF); +- buf->len += 10; +- return 0; +-} +- +-int add_txspeed_avp (struct buffer *buf, int speed) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0xA | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x18); +- raw[3] = htons ((speed >> 16) & 0xFFFF); +- raw[4] = htons (speed & 0xFFFF); +- buf->len += 10; +- return 0; +-} +- +-int add_rxspeed_avp (struct buffer *buf, int speed) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0xA | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x26); +- raw[3] = htons ((speed >> 16) & 0xFFFF); +- raw[4] = htons (speed & 0xFFFF); +- buf->len += 10; +- return 0; +-} +- +-int add_physchan_avp (struct buffer *buf, unsigned int physchan) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0x8 | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x19); +- raw[3] = htons ((physchan >> 16) & 0xFFFF); +- raw[4] = htons (physchan & 0xFFFF); +- buf->len += 10; +- return 0; +-} +- +-int add_ppd_avp (struct buffer *buf, _u16 ppd) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0x8 | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x14); +- raw[3] = htons (ppd); +- buf->len += 8; +- return 0; +-} +- +-int add_seqreqd_avp (struct buffer *buf) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0x6 | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x27); +- buf->len += 6; +- return 0; +-} +- +-/* jz: options dor the outgoing call */ +- +-/* jz: Minimum BPS - 16 */ +-int add_minbps_avp (struct buffer *buf, int speed) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0xA | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x10); +- raw[3] = htons ((speed >> 16) & 0xFFFF); +- raw[4] = htons (speed & 0xFFFF); +- buf->len += 10; +- return 0; +-} +- +-/* jz: Maximum BPS - 17 */ +-int add_maxbps_avp (struct buffer *buf, int speed) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons (0xA | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x11); +- raw[3] = htons ((speed >> 16) & 0xFFFF); +- raw[4] = htons (speed & 0xFFFF); +- buf->len += 10; +- return 0; +-} +- +-/* jz: Dialed Number 21 */ +-int add_number_avp (struct buffer *buf, char *no) +-{ +- _u16 *raw = (_u16 *) (buf->start + buf->len); +- raw[0] = htons ((0x6 + strlen (no)) | MBIT); +- raw[1] = htons (VENDOR_ID); +- raw[2] = htons (0x15); +- strncpy ((char *) (&(raw[3])), no, strlen (no)); +- buf->len += 6 + strlen (no); ++/*****************************************************************************/ ++int add_maxbps_avp(struct buffer *buf, int speed) { ++ u_int8_t t[4]; ++ set32(t, speed); ++ if(add_avp(buf, MAX_BPS_AVP, t, 4, 1)) ++ return 1; + return 0; + } ++ ++/*****************************************************************************/ ++int add_number_avp(struct buffer *buf, char *no) { ++ if(add_avp(buf, CALLED_NUMBER_AVP, no, strlen(no), 1)) ++ return 1; ++ return 0; ++} diff --git a/net/l2tpd/patches/002-debian-2-pty-rev.patch b/net/l2tpd/patches/002-debian-2-pty-rev.patch new file mode 100644 index 0000000..135e17e --- /dev/null +++ b/net/l2tpd/patches/002-debian-2-pty-rev.patch @@ -0,0 +1,21 @@ +diff -ruN l2tpd-0.70pre-old/l2tpd.c l2tpd-0.70pre-new/l2tpd.c +--- l2tpd-0.70pre-old/l2tpd.c 2005-12-16 12:02:02.000000000 +0100 ++++ l2tpd-0.70pre-new/l2tpd.c 2005-12-16 12:14:24.000000000 +0100 +@@ -336,17 +336,10 @@ + tcgetattr (c->fd, &ptyconf); + *(c->oldptyconf) = ptyconf; + ptyconf.c_cflag &= ~(ICANON | ECHO); +- ptyconf.c_lflag &= ~ECHO; + tcsetattr (c->fd, TCSANOW, &ptyconf); + + snprintf (tty, sizeof (tty), "/dev/tty%c%c", a, b); + fd2 = open (tty, O_RDWR); +- if(!fd2) +- log(LOG_WARN, "unable to open tty %s", tty); +- +- /* XXX JEF: CHECK ME */ +- stropt[pos++] = strdup(tty); +- stropt[pos] = NULL; + + #ifdef USE_KERNEL + } diff --git a/net/l2tpd/patches/003-jacco-pty.patch b/net/l2tpd/patches/003-jacco-pty.patch new file mode 100644 index 0000000..67169b8 --- /dev/null +++ b/net/l2tpd/patches/003-jacco-pty.patch @@ -0,0 +1,1194 @@ +diff -ruN l2tpd-0.70pre-old/l2tpd.c l2tpd-0.70pre-new/l2tpd.c +--- l2tpd-0.70pre-old/l2tpd.c 2005-12-16 12:34:12.000000000 +0100 ++++ l2tpd-0.70pre-new/l2tpd.c 2005-12-16 12:34:54.000000000 +0100 +@@ -16,6 +16,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -274,8 +275,8 @@ + + int start_pppd (struct call *c, struct ppp_opts *opts) + { +- char a, b; +- char tty[80]; ++ /* char a, b; */ ++ char *tty; + char *stropt[80]; + struct ppp_opts *p; + #ifdef USE_KERNEL +@@ -324,12 +325,45 @@ + else + { + #endif +- if ((c->fd = getPtyMaster (&a, &b)) < 0) ++ c->fd = open("/dev/ptmx", O_RDWR); ++ if (c->fd == -1) ++ { ++ log (LOG_WARN, "%s: unable to open /dev/ptmx to allocate pty\n", ++ __FUNCTION__); ++ return -EINVAL; ++ } else ++ { ++ if (grantpt(c->fd)) ++ { ++ log (LOG_WARN, "%s: unable to grantpt() on pty\n", ++ __FUNCTION__); ++ close(c->fd); ++ return -EINVAL; ++ } ++ if (unlockpt(c->fd)) ++ { ++ log (LOG_WARN, "%s: unable to unlockpt() on pty\n", ++ __FUNCTION__); ++ close(c->fd); ++ return -EINVAL; ++ } ++ tty = ptsname(c->fd); ++ if (tty == NULL) ++ { ++ log (LOG_WARN, "%s: unable to obtain name of slave tty\n", ++ __FUNCTION__); ++ close(c->fd); ++ return -EINVAL; ++ } ++ } ++ ++ ++ /* if ((c->fd = getPtyMaster (&a, &b)) < 0) + { + log (LOG_WARN, "%s: unable to allocate pty, abandoning!\n", + __FUNCTION__); + return -EINVAL; +- } ++ } */ + + /* set fd opened above to not echo so we don't see read our own packets + back of the file descriptor that we just wrote them to */ +@@ -338,8 +372,14 @@ + ptyconf.c_cflag &= ~(ICANON | ECHO); + tcsetattr (c->fd, TCSANOW, &ptyconf); + +- snprintf (tty, sizeof (tty), "/dev/tty%c%c", a, b); ++/* snprintf (tty, sizeof (tty), "/dev/tty%c%c", a, b); */ + fd2 = open (tty, O_RDWR); ++ if (fd2 == -1) ++ { ++ log (LOG_WARN, "%s: unable to open slave tty %s\n", __FUNCTION__, tty); ++ close(c->fd); ++ return -EINVAL; ++ } + + #ifdef USE_KERNEL + } +diff -ruN l2tpd-0.70pre-old/l2tpd.c.orig l2tpd-0.70pre-new/l2tpd.c.orig +--- l2tpd-0.70pre-old/l2tpd.c.orig 1970-01-01 01:00:00.000000000 +0100 ++++ l2tpd-0.70pre-new/l2tpd.c.orig 2005-12-16 12:14:24.000000000 +0100 +@@ -0,0 +1,1104 @@ ++/* ++ * $Id$ ++ * ++ * Layer Two Tunnelling Protocol Daemon ++ * Copyright (C) 1998 Adtran, Inc. ++ * Copyright (C) 2002 Jeff McAdams ++ * ++ * Mark Spencer ++ * ++ * This software is distributed under the terms ++ * of the GPL, which you should have received ++ * along with this source. ++ * ++ * Main Daemon source. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#if (__GLIBC__ < 2) ++# if defined(FREEBSD) ++# include ++# elif defined(LINUX) ++# include ++# elif defined(SOLARIS) ++# include ++# endif ++#else ++# include ++#endif ++#include ++#include ++#include ++#include ++#include ++#ifdef USE_KERNEL ++#include ++#endif ++#include "l2tp.h" ++ ++struct tunnel_list tunnels; ++int max_tunnels = DEF_MAX_TUNNELS; ++struct utsname uts; ++int ppd = 1; /* Packet processing delay */ ++int control_fd; /* descriptor of control area */ ++char *args; ++ ++char *dial_no_tmp; /* jz: Dialnumber for Outgoing Call */ ++int switch_io = 0; /* jz: Switch for Incoming or Outgoing Call */ ++ ++void init_tunnel_list (struct tunnel_list *t) ++{ ++ t->head = NULL; ++ t->count = 0; ++ t->calls = 0; ++} ++ ++/* Now sends to syslog instead - MvO */ ++void show_status (void) ++{ ++ struct schedule_entry *se; ++ struct tunnel *t; ++ struct call *c; ++ struct lns *tlns; ++ struct lac *tlac; ++ struct host *h; ++ int s = 0; ++ log (LOG_WARN, "====== l2tpd statistics ========\n"); ++ log (LOG_WARN, " Scheduler entries:\n"); ++ se = events; ++ while (se) ++ { ++ s++; ++ t = (struct tunnel *) se->data; ++ tlac = (struct lac *) se->data; ++ c = (struct call *) se->data; ++ if (se->func == &hello) ++ { ++ log (LOG_WARN, "%d: HELLO to %d\n", s, t->tid); ++ } ++ else if (se->func == &magic_lac_dial) ++ { ++ log (LOG_WARN, "%d: Magic dial on %s\n", s, tlac->entname); ++ } ++ else if (se->func == &send_zlb) ++ { ++ log (LOG_WARN, "%d: Send payload ZLB on call %d:%d\n", s, ++ c->container->tid, c->cid); ++ } ++ else if (se->func == &dethrottle) ++ { ++ log (LOG_WARN, "%d: Dethrottle call %d:%d\n", s, c->container->tid, ++ c->cid); ++ } ++ else ++ log (LOG_WARN, "%d: Unknown event\n", s); ++ se = se->next; ++ }; ++ log (LOG_WARN, "Total Events scheduled: %d\n", s); ++ log (LOG_WARN, "Number of tunnels open: %d\n", tunnels.count); ++ t = tunnels.head; ++ while (t) ++ { ++ log (LOG_WARN, "Tunnel %s, ID = %d (local), %d (remote) to %s:%d\n" ++ " control_seq_num = %d, control_rec_seq_num = %d,\n" ++ " cLr = %d\n", ++ (t->lac ? t->lac->entname : (t->lns ? t->lns->entname : "")), ++ t->ourtid, t->tid, IPADDY (t->peer.sin_addr), ++ ntohs (t->peer.sin_port), t->control_seq_num, ++ t->control_rec_seq_num, t->cLr); ++ c = t->call_head; ++ while (c) ++ { ++ log (LOG_WARN, ++ "Call %s, ID = %d (local), %d (remote), serno = %u,\n" ++ " data_seq_num = %d, data_rec_seq_num = %d,\n" ++ " pLr = %d, tx = %u bytes (%u), rx= %u bytes (%u)\n", ++ (c->lac ? c->lac-> ++ entname : (c->lns ? c->lns->entname : "")), c->ourcid, ++ c->cid, c->serno, c->data_seq_num, c->data_rec_seq_num, ++ c->pLr, c->tx_bytes, c->tx_pkts, c->rx_bytes, c->rx_pkts); ++ c = c->next; ++ } ++ t = t->next; ++ } ++ log (LOG_WARN, "==========Config File===========\n"); ++ tlns = lnslist; ++ while (tlns) ++ { ++ log (LOG_WARN, "LNS entry %s\n", ++ tlns->entname[0] ? tlns->entname : "(unnamed)"); ++ tlns = tlns->next; ++ }; ++ tlac = laclist; ++ while (tlac) ++ { ++ log (LOG_WARN, "LAC entry %s, LNS is/are:", ++ tlac->entname[0] ? tlac->entname : "(unnamed)"); ++ h = tlac->lns; ++ if (h) ++ { ++ while (h) ++ { ++ log (LOG_WARN, " %s", h->hostname); ++ h = h->next; ++ } ++ } ++ else ++ log (LOG_WARN, " [none]"); ++ log (LOG_WARN, "\n"); ++ tlac = tlac->next; ++ }; ++ log (LOG_WARN, "================================\n"); ++} ++ ++void null_handler(int sig) ++{ ++ /* FIXME ++ * A sighup is received when a call is terminated, unknown origine .. ++ * I catch it and ll looks good, but .. ++ */ ++} ++ ++void status_handler (int sig) ++{ ++ show_status (); ++} ++ ++void child_handler (int signal) ++{ ++ /* ++ * Oops, somebody we launched was killed. ++ * It's time to reap them and close that call. ++ * But first, we have to find out what PID died. ++ * unfortunately, pppd will ++ */ ++ struct tunnel *t; ++ struct call *c; ++ pid_t pid; ++ int status; ++ t = tunnels.head; ++ /* Keep looping until all are cleared */ ++ for(;;) ++ { ++ pid = waitpid (-1, &status, WNOHANG); ++ if (pid < 1) ++ { ++ /* ++ * Oh well, nobody there. Maybe we reaped it ++ * somewhere else already ++ */ ++ return; ++ } ++ while (t) ++ { ++ c = t->call_head; ++ while (c) ++ { ++ if (c->pppd == pid) ++ { ++ if ( WIFEXITED( status ) ) ++ { ++ log (LOG_DEBUG, "%s : pppd exited for call %d with code %d\n", __FUNCTION__, ++ c->cid, WEXITSTATUS( status ) ); ++ } ++ else if( WIFSIGNALED( status ) ) ++ { ++ log (LOG_DEBUG, "%s : pppd terminated for call %d by signal %d\n", __FUNCTION__, ++ c->cid, WTERMSIG( status ) ); ++ } ++ else ++ { ++ log (LOG_DEBUG, "%s : pppd exited for call %d for unknown reason\n", __FUNCTION__, ++ c->cid ); ++ } ++ c->needclose = -1; ++ /* ++ * OK...pppd died, we can go ahead and close the pty for ++ * it ++ */ ++ close (c->fd); ++ c->fd = -1; ++ return; ++ } ++ c = c->next; ++ } ++ t = t->next; ++ } ++ } ++} ++ ++void death_handler (int signal) ++{ ++ /* ++ * If we get here, somebody terminated us with a kill or a control-c. ++ * we call call_close on each tunnel twice to get a StopCCN out ++ * for each one (we can't pause to make sure it's received. ++ * Then we close the connections ++ */ ++ struct tunnel *st, *st2; ++ int sec; ++ log (LOG_CRIT, "%s: Fatal signal %d received\n", __FUNCTION__, signal); ++ st = tunnels.head; ++ while (st) ++ { ++ st2 = st->next; ++ strcpy (st->self->errormsg, "Server closing"); ++ sec = st->self->closing; ++ if (st->lac) ++ st->lac->redial = 0; ++ call_close (st->self); ++ if (!sec) ++ { ++ st->self->closing = -1; ++ call_close (st->self); ++ } ++ st = st2; ++ } ++ ++ /* erase pid file */ ++ unlink (gconfig.pidfile); ++ ++ /* erase control pipe */ ++ unlink(CONTROL_PIPE); ++ ++ exit (1); ++} ++ ++int start_pppd (struct call *c, struct ppp_opts *opts) ++{ ++ char a, b; ++ char tty[80]; ++ char *stropt[80]; ++ struct ppp_opts *p; ++#ifdef USE_KERNEL ++ struct l2tp_call_opts co; ++#endif ++ int pos = 1; ++ int fd2; ++#ifdef DEBUG_PPPD ++ int x; ++#endif ++ struct termios ptyconf; ++ char *str; ++ p = opts; ++ stropt[0] = strdup (PPPD); ++ while (p) ++ { ++ stropt[pos] = (char *) malloc (strlen (p->option) + 1); ++ strncpy (stropt[pos], p->option, strlen (p->option) + 1); ++ pos++; ++ p = p->next; ++ } ++ stropt[pos] = NULL; ++ if (c->pppd > 0) ++ { ++ log (LOG_WARN, "%s: PPP already started on call!\n", __FUNCTION__); ++ return -EINVAL; ++ } ++ if (c->fd > -1) ++ { ++ log (LOG_WARN, "%s: file descriptor already assigned!\n", ++ __FUNCTION__); ++ return -EINVAL; ++ } ++#ifdef USE_KERNEL ++ if (kernel_support) ++ { ++ co.ourtid = c->container->ourtid; ++ co.ourcid = c->ourcid; ++ ioctl (server_socket, L2TPIOCGETCALLOPTS, &co); ++ stropt[pos++] = strdup ("channel"); ++ stropt[pos] = (char *) malloc (10); ++ snprintf (stropt[pos], 10, "%d", co.id); ++ pos++; ++ stropt[pos] = NULL; ++ } ++ else ++ { ++#endif ++ if ((c->fd = getPtyMaster (&a, &b)) < 0) ++ { ++ log (LOG_WARN, "%s: unable to allocate pty, abandoning!\n", ++ __FUNCTION__); ++ return -EINVAL; ++ } ++ ++ /* set fd opened above to not echo so we don't see read our own packets ++ back of the file descriptor that we just wrote them to */ ++ tcgetattr (c->fd, &ptyconf); ++ *(c->oldptyconf) = ptyconf; ++ ptyconf.c_cflag &= ~(ICANON | ECHO); ++ tcsetattr (c->fd, TCSANOW, &ptyconf); ++ ++ snprintf (tty, sizeof (tty), "/dev/tty%c%c", a, b); ++ fd2 = open (tty, O_RDWR); ++ ++#ifdef USE_KERNEL ++ } ++#endif ++ str = stropt[0]; ++#ifdef DEBUG_PPPD ++ log (LOG_DEBUG, "%s: I'm running: ", __FUNCTION__); ++ for (x = 0; stropt[x]; x++) ++ { ++ log (LOG_DEBUG, "\"%s\" ", stropt[x]); ++ }; ++ log (LOG_DEBUG, "\n"); ++#endif ++ c->pppd = fork (); ++ if (c->pppd < 0) ++ { ++ log (LOG_WARN, "%s: unable to fork(), abandoning!\n", __FUNCTION__); ++ return -EINVAL; ++ } ++ else if (!c->pppd) ++ { ++ struct call *sc; ++ struct tunnel *st; ++ ++ close (0); ++ close (1); ++ close (2); ++#ifdef USE_KERNEL ++ if (!kernel_support && (fd2 < 0)) ++#else ++ if (fd2 < 0) ++#endif ++ { ++ log (LOG_WARN, "%s: Unable to open %s to launch pppd!\n", ++ __FUNCTION__, tty); ++ exit (1); ++ } ++ dup2 (fd2, 0); ++ dup2 (fd2, 1); ++ ++ ++ /* close all the calls pty fds */ ++ st = tunnels.head; ++ while (st) ++ { ++ sc = st->call_head; ++ while (sc) ++ { ++ close (sc->fd); ++ sc = sc->next; ++ } ++ st = st->next; ++ } ++ ++ /* close the UDP socket fd */ ++ close (server_socket); ++ ++ /* close the control pipe fd */ ++ close (control_fd); ++ ++ if( c->dialing[0] ) ++ { ++ setenv( "CALLER_ID", c->dialing, 1 ); ++ } ++ execv (PPPD, stropt); ++ log (LOG_WARN, "%s: Exec of %s failed!\n", __FUNCTION__, PPPD); ++ exit (1); ++ }; ++ close (fd2); ++ pos = 0; ++ while (stropt[pos]) ++ { ++ free (stropt[pos]); ++ pos++; ++ }; ++ return 0; ++} ++ ++void destroy_tunnel (struct tunnel *t) ++{ ++ /* ++ * Immediately destroy a tunnel (and all its calls) ++ * and free its resources. This may be called ++ * by the tunnel itself,so it needs to be ++ * "suicide safe" ++ */ ++ ++ struct call *c, *me; ++ struct tunnel *p; ++ struct timeval tv; ++ if (!t) ++ return; ++ ++ /* ++ * Save ourselves until the very ++ * end, since we might be calling this ourselves. ++ * We must divorce ourself from the tunnel ++ * structure, however, to avoid recursion ++ * because of the logic of the destroy_call ++ */ ++ me = t->self; ++ ++ /* ++ * Destroy all the member calls ++ */ ++ c = t->call_head; ++ while (c) ++ { ++ destroy_call (c); ++ c = c->next; ++ }; ++ /* ++ * Remove ourselves from the list of tunnels ++ */ ++ ++ if (tunnels.head == t) ++ { ++ tunnels.head = t->next; ++ tunnels.count--; ++ } ++ else ++ { ++ p = tunnels.head; ++ if (p) ++ { ++ while (p->next && (p->next != t)) ++ p = p->next; ++ if (p->next) ++ { ++ p->next = t->next; ++ tunnels.count--; ++ } ++ else ++ { ++ log (LOG_WARN, ++ "%s: unable to locate tunnel in tunnel list\n", ++ __FUNCTION__); ++ } ++ } ++ else ++ { ++ log (LOG_WARN, "%s: tunnel list is empty!\n", __FUNCTION__); ++ } ++ } ++ if (t->lac) ++ { ++ t->lac->t = NULL; ++ if (t->lac->redial && (t->lac->rtimeout > 0) && !t->lac->rsched && ++ t->lac->active) ++ { ++ log (LOG_LOG, "%s: Will redial in %d seconds\n", __FUNCTION__, ++ t->lac->rtimeout); ++ tv.tv_sec = t->lac->rtimeout; ++ tv.tv_usec = 0; ++ t->lac->rsched = schedule (tv, magic_lac_dial, t->lac); ++ } ++ } ++ /* XXX L2TP/IPSec: remove relevant SAs here? NTB 20011010 ++ * XXX But what if another tunnel is using same SA? ++ */ ++ if (t->lns) ++ t->lns->t = NULL; ++ free (t); ++ free (me); ++} ++ ++struct tunnel *l2tp_call (char *host, int port, struct lac *lac, ++ struct lns *lns) ++{ ++ /* ++ * Establish a tunnel from us to host ++ * on port port ++ */ ++ struct call *tmp = NULL; ++ struct hostent *hp; ++ unsigned int addr; ++ port = htons (port); ++ hp = gethostbyname (host); ++ if (!hp) ++ { ++ log (LOG_WARN, "%s: gethostbyname() failed for %s.\n", __FUNCTION__, ++ host); ++ return NULL; ++ } ++ bcopy (hp->h_addr, &addr, hp->h_length); ++ /* Force creation of a new tunnel ++ and set it's tid to 0 to cause ++ negotiation to occur */ ++ /* XXX L2TP/IPSec: Set up SA to addr:port here? NTB 20011010 ++ */ ++ tmp = get_call (0, 0, addr, port); ++ if (!tmp) ++ { ++ log (LOG_WARN, "%s: Unable to create tunnel to %s.\n", __FUNCTION__, ++ host); ++ return NULL; ++ } ++ tmp->container->tid = 0; ++ tmp->container->lac = lac; ++ tmp->container->lns = lns; ++ tmp->lac = lac; ++ tmp->lns = lns; ++ if (lac) ++ lac->t = tmp->container; ++ if (lns) ++ lns->t = tmp->container; ++ /* ++ * Since our state is 0, we will establish a tunnel now ++ */ ++ log (LOG_LOG, "%s:Connecting to host %s, port %d\n", __FUNCTION__, host, ++ ntohs (port)); ++ control_finish (tmp->container, tmp); ++ return tmp->container; ++} ++ ++void magic_lac_tunnel (void *data) ++{ ++ struct lac *lac; ++ lac = (struct lac *) data; ++ if (!lac) ++ { ++ log (LOG_WARN, "%s: magic_lac_tunnel: called on NULL lac!\n", ++ __FUNCTION__); ++ return; ++ } ++ if (lac->lns) ++ { ++ /* FIXME: I should try different LNS's if I get failures */ ++ l2tp_call (lac->lns->hostname, lac->lns->port, lac, NULL); ++ return; ++ } ++ else if (deflac && deflac->lns) ++ { ++ l2tp_call (deflac->lns->hostname, deflac->lns->port, lac, NULL); ++ return; ++ } ++ else ++ { ++ log (LOG_WARN, "%s: Unable to find hostname to dial for '%s'\n", ++ __FUNCTION__, lac->entname); ++ return; ++ } ++} ++ ++struct call *lac_call (int tid, struct lac *lac, struct lns *lns) ++{ ++ struct tunnel *t = tunnels.head; ++ struct call *tmp; ++ while (t) ++ { ++ if (t->ourtid == tid) ++ { ++ tmp = new_call (t); ++ if (!tmp) ++ { ++ log (LOG_WARN, "%s: unable to create new call\n", ++ __FUNCTION__); ++ return NULL; ++ } ++ tmp->next = t->call_head; ++ t->call_head = tmp; ++ t->count++; ++ tmp->cid = 0; ++ tmp->lac = lac; ++ tmp->lns = lns; ++ if (lac) ++ lac->c = tmp; ++ log (LOG_LOG, "%s: Calling on tunnel %d\n", __FUNCTION__, tid); ++ strcpy (tmp->dial_no, dial_no_tmp); /* jz: copy dialnumber to tmp->dial_no */ ++ control_finish (t, tmp); ++ return tmp; ++ } ++ t = t->next; ++ }; ++ log (LOG_DEBUG, "%s: No such tunnel %d to generate call.\n", __FUNCTION__, ++ tid); ++ return NULL; ++} ++ ++void magic_lac_dial (void *data) ++{ ++ struct lac *lac; ++ lac = (struct lac *) data; ++ ++ if (!lac) ++ { ++ log (LOG_WARN, "%s : called on NULL lac!\n", __FUNCTION__); ++ return; ++ } ++ if (!lac->active) ++ { ++ log (LOG_DEBUG, "%s: LAC %s not active", __FUNCTION__, lac->entname); ++ return; ++ } ++ lac->rsched = NULL; ++ lac->rtries++; ++ if (lac->rmax && (lac->rtries > lac->rmax)) ++ { ++ log (LOG_LOG, "%s: maximum retries exceeded.\n", __FUNCTION__); ++ return; ++ } ++ if (!lac->t) ++ { ++#ifdef DEGUG_MAGIC ++ log (LOG_DEBUG, "%s : tunnel not up! Connecting!\n", __FUNCTION__); ++#endif ++ magic_lac_tunnel (lac); ++ return; ++ } ++ lac_call (lac->t->ourtid, lac, NULL); ++} ++ ++void lac_hangup (int cid) ++{ ++ struct tunnel *t = tunnels.head; ++ struct call *tmp; ++ while (t) ++ { ++ tmp = t->call_head; ++ while (tmp) ++ { ++ if (tmp->ourcid == cid) ++ { ++ log (LOG_LOG, ++ "%s :Hanging up call %d, Local: %d, Remote: %d\n", ++ __FUNCTION__, tmp->serno, tmp->ourcid, tmp->cid); ++ strcpy (tmp->errormsg, "Goodbye!"); ++/* tmp->needclose = -1; */ ++ kill (tmp->pppd, SIGTERM); ++ return; ++ } ++ tmp = tmp->next; ++ } ++ t = t->next; ++ }; ++ log (LOG_DEBUG, "%s : No such call %d to hang up.\n", __FUNCTION__, cid); ++ return; ++} ++ ++void lac_disconnect (int tid) ++{ ++ struct tunnel *t = tunnels.head; ++ while (t) ++ { ++ if (t->ourtid == tid) ++ { ++ log (LOG_LOG, ++ "%s: Disconnecting from %s, Local: %d, Remote: %d\n", ++ __FUNCTION__, IPADDY (t->peer.sin_addr), t->ourtid, t->tid); ++ t->self->needclose = -1; ++ strcpy (t->self->errormsg, "Goodbye!"); ++ call_close (t->self); ++ return; ++ } ++ t = t->next; ++ }; ++ log (LOG_DEBUG, "%s: No such tunnel %d to hang up.\n", __FUNCTION__, tid); ++ return; ++} ++ ++struct tunnel *new_tunnel () ++{ ++ struct tunnel *tmp = malloc (sizeof (struct tunnel)); ++ char entropy_buf[2] = "\0"; ++ if (!tmp) ++ return NULL; ++ tmp->control_seq_num = 0; ++ tmp->control_rec_seq_num = 0; ++ tmp->cLr = 0; ++ tmp->call_head = NULL; ++ tmp->next = NULL; ++ tmp->debug = -1; ++ tmp->tid = -1; ++ tmp->hello = NULL; ++#ifndef TESTING ++/* while(get_call((tmp->ourtid = rand() & 0xFFFF),0,0,0)); */ ++#ifdef USE_KERNEL ++ if (kernel_support) ++ tmp->ourtid = ioctl (server_socket, L2TPIOCADDTUNNEL, 0); ++ else ++#endif ++/* tmp->ourtid = rand () & 0xFFFF; */ ++ /* get_entropy((char *)&tmp->ourtid, 2); */ ++ get_entropy(entropy_buf, 2); ++ { ++ int *temp; ++ temp = (int *)entropy_buf; ++ tmp->ourtid = *temp & 0xFFFF; ++#ifdef DEBUG_ENTROPY ++ log(LOG_DEBUG, "ourtid = %u, entropy_buf = %hx\n", tmp->ourtid, *temp); ++#endif ++ } ++#else ++ tmp->ourtid = 0x6227; ++#endif ++ tmp->nego = 0; ++ tmp->count = 0; ++ tmp->state = 0; /* Nothing */ ++ tmp->peer.sin_family = AF_INET; ++ tmp->peer.sin_port = 0; ++ bzero (&(tmp->peer.sin_addr), sizeof (tmp->peer.sin_addr)); ++ tmp->sanity = -1; ++ tmp->qtid = -1; ++ tmp->ourfc = ASYNC_FRAMING | SYNC_FRAMING; ++ tmp->ourbc = 0; ++ tmp->ourtb = (((_u64) rand ()) << 32) | ((_u64) rand ()); ++ tmp->fc = -1; /* These really need to be specified by the peer */ ++ tmp->bc = -1; /* And we want to know if they forgot */ ++ tmp->hostname[0] = 0; ++ tmp->vendor[0] = 0; ++ tmp->secret[0] = 0; ++ if (!(tmp->self = new_call (tmp))) ++ { ++ free (tmp); ++ return NULL; ++ }; ++ tmp->ourrws = DEFAULT_RWS_SIZE; ++ tmp->self->ourfbit = FBIT; ++ tmp->lac = NULL; ++ tmp->lns = NULL; ++ tmp->chal_us.state = 0; ++ tmp->chal_us.secret[0] = 0; ++ memset (tmp->chal_us.reply, 0, MD_SIG_SIZE); ++ tmp->chal_them.state = 0; ++ tmp->chal_them.secret[0] = 0; ++ memset (tmp->chal_them.reply, 0, MD_SIG_SIZE); ++ tmp->chal_them.vector = (unsigned char *) malloc (VECTOR_SIZE); ++ tmp->chal_us.vector = NULL; ++ tmp->hbit = 0; ++ return tmp; ++} ++ ++void do_control () ++{ ++ char buf[1024]; ++ char *host, *tunstr, *callstr, *tmpstr; ++ struct lac *lac; ++ int call; ++ int tunl; ++ int cnt = -1; ++ while (cnt) ++ { ++ cnt = read (control_fd, buf, sizeof (buf)); ++ if (cnt > 0) ++ { ++ if (buf[cnt - 1] == '\n') ++ buf[--cnt] = 0; ++#ifdef DEBUG_CONTROL ++ log (LOG_DEBUG, "%s: Got message \"%s\" (%d bytes long)\n", ++ __FUNCTION__, buf, cnt); ++#endif ++ switch (buf[0]) ++ { ++ case 't': ++ host = strchr (buf, ' '); ++ if(!host) ++ goto out; ++ host++; ++#ifdef DEBUG_CONTROL ++ log (LOG_DEBUG, "%s: Attempting to tunnel to %s\n", ++ __FUNCTION__, host); ++#endif ++ l2tp_call (host, UDP_LISTEN_PORT, NULL, NULL); ++ break; ++ case 'c': /* option 'c' for incoming call */ ++ case 'o': /* option 'o' for outgoing call */ ++ tunstr = strchr (buf, ' '); ++ if(!tunstr) ++ goto out; ++ tunstr++; ++ ++ if(buf[0] == 'c') ++ switch_io = 1; /* Switch for Incoming Calls */ ++ else { ++ switch_io = 0; /* Switch for Outgoing Calls */ ++ tmpstr = strchr(tunstr, ' '); ++ if(!tmpstr) ++ goto out; ++ strncpy(dial_no_tmp,tmpstr, sizeof(*dial_no_tmp)); ++ } ++ ++ lac = laclist; ++ while (lac) ++ { ++ if (!strcasecmp (lac->entname, tunstr)) ++ { ++ lac->active = -1; ++ lac->rtries = 0; ++ if (!lac->c) ++ magic_lac_dial (lac); ++ else ++ log (LOG_DEBUG, ++ "%s: Session '%s' already active!\n", ++ __FUNCTION__, lac->entname); ++ break; ++ } ++ lac = lac->next; ++ } ++ if (lac) ++ break; ++ tunl = atoi (tunstr); ++ if (!tunl) ++ { ++ log (LOG_DEBUG, "%s: No such tunnel '%s'\n", __FUNCTION__, ++ tunstr); ++ break; ++ } ++#ifdef DEBUG_CONTROL ++ log (LOG_DEBUG, "%s: Attempting to call on tunnel %d\n", ++ __FUNCTION__, tunl); ++#endif ++ lac_call (tunl, NULL, NULL); ++ break; ++ case 'h': ++ callstr = strchr (buf, ' '); ++ if(!callstr) ++ goto out; ++ callstr++; ++ ++ call = atoi (callstr); ++#ifdef DEBUG_CONTROL ++ log (LOG_DEBUG, "%s: Attempting to call %d\n", __FUNCTION__, ++ call); ++#endif ++ lac_hangup (call); ++ break; ++ case 'd': ++ tunstr = strchr (buf, ' '); ++ if(!tunstr) ++ goto out; ++ tunstr++; ++ ++ lac = laclist; ++ while (lac) ++ { ++ if (!strcasecmp (lac->entname, tunstr)) ++ { ++ lac->active = 0; ++ lac->rtries = 0; ++ if (lac->t) ++ lac_disconnect (lac->t->ourtid); ++ else ++ log (LOG_DEBUG, "%s: Session '%s' not up\n", ++ __FUNCTION__, lac->entname); ++ break; ++ } ++ lac = lac->next; ++ } ++ if (lac) ++ break; ++ tunl = atoi (tunstr); ++ if (!tunl) ++ { ++ log (LOG_DEBUG, "%s: No such tunnel '%s'\n", __FUNCTION__, ++ tunstr); ++ break; ++ } ++#ifdef DEBUG_CONTROL ++ log (LOG_DEBUG, "%s: Attempting to disconnect tunnel %d\n", ++ __FUNCTION__, tunl); ++#endif ++ lac_disconnect (tunl); ++ break; ++ case 's': ++ show_status (); ++ break; ++ default: ++ log (LOG_DEBUG, "%s: Unknown command %c\n", __FUNCTION__, ++ buf[0]); ++ } ++ } ++ } ++ ++out: ++ /* Otherwise select goes nuts */ ++ close (control_fd); ++ control_fd = open (CONTROL_PIPE, O_RDONLY | O_NONBLOCK, 0600); ++} ++ ++void usage(void) { ++ printf("Usage: l2tpd -D -c [config file] -s [secret file] -p [pid file]\n"); ++ printf("\n"); ++ exit(1); ++} ++ ++void init_args(int argc, char *argv[]) { ++ int i=0; ++ gconfig.daemon=1; ++ memset(gconfig.altauthfile,0,STRLEN); ++ memset(gconfig.altconfigfile,0,STRLEN); ++ memset(gconfig.authfile,0,STRLEN); ++ memset(gconfig.configfile,0,STRLEN); ++ memset(gconfig.pidfile,0,STRLEN); ++ strncpy(gconfig.altauthfile,ALT_DEFAULT_AUTH_FILE, ++ sizeof(gconfig.altauthfile) - 1); ++ strncpy(gconfig.altconfigfile,ALT_DEFAULT_CONFIG_FILE, ++ sizeof(gconfig.altconfigfile) - 1); ++ strncpy(gconfig.authfile,DEFAULT_AUTH_FILE, ++ sizeof(gconfig.authfile) - 1); ++ strncpy(gconfig.configfile,DEFAULT_CONFIG_FILE, ++ sizeof(gconfig.configfile) - 1); ++ strncpy(gconfig.pidfile,DEFAULT_PID_FILE, ++ sizeof(gconfig.pidfile) - 1); ++ for (i = 1; i < argc; i++) { ++ if(! strncmp(argv[i],"-c",2)) { ++ if(++i == argc) ++ usage(); ++ else ++ strncpy(gconfig.configfile,argv[i], ++ sizeof(gconfig.configfile) - 1); ++ } ++ else if (! strncmp(argv[i],"-D",2)) { ++ gconfig.daemon=0; ++ } ++ else if (! strncmp(argv[i],"-s",2)) { ++ if(++i == argc) ++ usage(); ++ else ++ strncpy(gconfig.authfile,argv[i], ++ sizeof(gconfig.authfile) - 1); ++ } ++ else if (! strncmp(argv[i],"-p",2)) { ++ if(++i == argc) ++ usage(); ++ else ++ strncpy(gconfig.pidfile,argv[i], ++ sizeof(gconfig.pidfile) - 1); ++ } ++ else { ++ usage(); ++ } ++ } ++} ++ ++ ++void daemonize() { ++ int pid=0; ++ int i,l; ++ char buf[STRLEN]; ++ ++ if((pid = fork()) < 0) { ++ log(LOG_LOG, "%s: Unable to fork ()\n",__FUNCTION__); ++ close(server_socket); ++ exit(1); ++ } ++ else if (pid) ++ exit(0); ++ ++ ++ close(0); ++ close(1); ++ close(2); ++ dup2(open("/dev/null", O_RDONLY), 0); ++ dup2(open("/dev/null", O_RDONLY), 1); ++ dup2(open("/dev/null", O_RDONLY), 2); ++ ++ /* Read previous pid file. */ ++ if((i = open(gconfig.pidfile,O_RDONLY)) > 0) { ++ l=read(i,buf,sizeof(buf)-1); ++ if (l >= 0) { ++ buf[l] = '\0'; ++ pid = atoi(buf); ++ } ++ close(i); ++ ++ /* if pid is read and process exist exit */ ++ if(pid && !kill(pid, 0)) { ++ log(LOG_LOG, "%s: There's already a l2tpd server running.\n", ++ __FUNCTION__); ++ close(server_socket); ++ exit(1); ++ } ++ ++ /* remove stalled pid file */ ++ unlink(gconfig.pidfile); ++ } ++ ++ pid = setsid(); ++ ++ /* create new pid file */ ++ if ((i = open (gconfig.pidfile, O_WRONLY | O_CREAT, 0644)) >= 0) { ++ snprintf (buf, sizeof(buf), "%d", (int)getpid()); ++ write (i, buf, strlen(buf)); ++ close (i); ++ } ++ else { ++ log(LOG_LOG, "%s: could not write pid file %s error %d", ++ __FUNCTION__, gconfig.pidfile, i); ++ close(server_socket); ++ exit(1); ++ } ++} ++ ++ ++void init (int argc,char *argv[]) ++{ ++ struct lac *lac; ++ struct in_addr listenaddr; ++ ++ init_args (argc,argv); ++ srand( time(NULL) ); ++ rand_source = 0; ++ init_addr (); ++ if (init_config ()) ++ { ++ log (LOG_CRIT, "%s: Unable to load config file\n", __FUNCTION__); ++ exit (1); ++ } ++ if (uname (&uts)) ++ { ++ log (LOG_CRIT, "%s : Unable to determine host system\n", ++ __FUNCTION__); ++ exit (1); ++ } ++ init_tunnel_list (&tunnels); ++ if (init_network ()) ++ exit (1); ++ if (gconfig.daemon) ++ daemonize (); ++ signal (SIGTERM, &death_handler); ++ signal (SIGINT, &death_handler); ++ signal (SIGCHLD, &child_handler); ++ signal (SIGUSR1, &status_handler); ++ signal (SIGHUP, &null_handler); ++ init_scheduler (); ++ mkfifo (CONTROL_PIPE, 0600); ++ control_fd = open (CONTROL_PIPE, O_RDONLY | O_NONBLOCK, 0600); ++ if (control_fd < 0) ++ { ++ log (LOG_CRIT, "%s: Unable to open " CONTROL_PIPE " for reading.", ++ __FUNCTION__); ++ exit (1); ++ } ++ log (LOG_LOG, "l2tpd version " SERVER_VERSION " started on %s PID:%d\n", ++ hostname, getpid ()); ++ listenaddr.s_addr = gconfig.listenaddr; ++ log (LOG_LOG, "%s version %s on a %s, listening on IP address %s, port %d\n", uts.sysname, ++ uts.release, uts.machine, inet_ntoa(listenaddr), gconfig.port); ++ lac = laclist; ++ while (lac) ++ { ++ if (lac->autodial) ++ { ++#ifdef DEBUG_MAGIC ++ log (LOG_DEBUG, "%s: Autodialing '%s'\n", __FUNCTION__, ++ lac->entname[0] ? lac->entname : "(unnamed)"); ++#endif ++ lac->active = -1; ++ switch_io = 1; /* If we're a LAC, autodials will be ICRQ's */ ++ magic_lac_dial (lac); ++ } ++ lac = lac->next; ++ } ++} ++ ++int main (int argc, char *argv[]) ++{ ++ init(argc,argv); ++ dial_no_tmp = calloc (128, sizeof (char)); ++ network_thread (); ++ return 0; ++} diff --git a/net/l2tpd/patches/004-gcc4.patch b/net/l2tpd/patches/004-gcc4.patch new file mode 100644 index 0000000..c4a906e --- /dev/null +++ b/net/l2tpd/patches/004-gcc4.patch @@ -0,0 +1,12 @@ +diff -urN ../tmp-orig/l2tpd-0.70-pre20031121/aaa.c ./aaa.c +--- ../tmp-orig/l2tpd-0.70-pre20031121/aaa.c 2004-12-09 09:54:10.159417376 +0100 ++++ ./aaa.c 2004-12-09 09:54:01.918670160 +0100 +@@ -27,7 +27,7 @@ + + /* FIXME: Accounting? */ + +-static struct addr_ent *uaddr[ADDR_HASH_SIZE]; ++struct addr_ent *uaddr[ADDR_HASH_SIZE]; + + void init_addr () + { diff --git a/net/l2tpd/patches/004-nonblock.patch b/net/l2tpd/patches/004-nonblock.patch new file mode 100644 index 0000000..7fc2226 --- /dev/null +++ b/net/l2tpd/patches/004-nonblock.patch @@ -0,0 +1,26 @@ +--- l2tpd-0.70-pre20031121.orig/l2tpd.c.orig 2006-04-05 13:28:36.000000000 +0100 ++++ l2tpd-0.70-pre20031121.orig/l2tpd.c 2006-04-05 13:33:39.000000000 +0100 +@@ -289,6 +289,8 @@ + #endif + struct termios ptyconf; + char *str; ++ int flags; ++ + p = opts; + stropt[0] = strdup (PPPD); + while (p) +@@ -347,6 +349,14 @@ + close(c->fd); + return -EINVAL; + } ++ flags = fcntl(c->fd, F_GETFL); ++ if (flags < 0 || fcntl(c->fd, F_SETFL, flags | O_NONBLOCK) < 0) ++ { ++ log (LOG_WARN, "%s: unable to fcntl(O_NONBLOCK) on pty\n", ++ __FUNCTION__); ++ close(c->fd); ++ return -EINVAL; ++ } + tty = ptsname(c->fd); + if (tty == NULL) + { diff --git a/net/l2tpd/patches/005-df-disable.patch b/net/l2tpd/patches/005-df-disable.patch new file mode 100644 index 0000000..806c48d --- /dev/null +++ b/net/l2tpd/patches/005-df-disable.patch @@ -0,0 +1,25 @@ +Patch to stop l2tpd setting the DF bit on each of the packets it sends. +Apart from not being useful with L2TP, this also prevents interoperating +with Cisco IOS over IPSEC. + +--- l2tpd-0.70-pre20031121.orig/network.c.orig 2006-04-11 08:50:38.000000000 +0100 ++++ l2tpd-0.70-pre20031121.orig/network.c 2006-04-11 08:58:18.000000000 +0100 +@@ -56,6 +56,18 @@ + __FUNCTION__); + return -EINVAL; + }; ++#ifdef IP_MTU_DISCOVER ++#ifdef IP_PMTUDISC_DONT ++ { ++ /* Don't set DF bit on outbound packets */ ++ int val = IP_PMTUDISC_DONT; ++ if (setsockopt(server_socket, IPPROTO_IP, IP_MTU_DISCOVER, &val, sizeof(val)) < 0) ++ { ++ log (LOG_LOG, "Failed to disable PMTU discovery\n"); ++ } ++ } ++#endif ++#endif + /* L2TP/IPSec: Set up SA for listening port here? NTB 20011015 + */ + if (bind (server_socket, (struct sockaddr *) &server, sizeof (server))) diff --git a/net/l2tpns/Makefile b/net/l2tpns/Makefile new file mode 100644 index 0000000..c64378d --- /dev/null +++ b/net/l2tpns/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=l2tpns +PKG_VERSION:=2.1.21 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/l2tpns +PKG_MD5SUM:=385c58055723ebc6c38062acd2db9c2c + +include $(INCLUDE_DIR)/package.mk + +define Package/l2tpns + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libcli + TITLE:=An L2TP enhanced server + URL:=http://sourceforge.net/projects/l2tpns + SUBMENU:=VPN +endef + +define Package/l2tpns/description + l2tpns is a layer 2 tunneling protocol network server (LNS). + it supports up to 65535 concurrent sessions per server/cluster + plus ISP features such as rate limiting, walled garden, usage + accounting, and more. +endef + +define Package/l2tpns/conffiles +/etc/l2tpns/ip_pool +/etc/l2tpns/startup-config +/etc/l2tpns/users +endef + +define Build/Compile + $(call Build/Compile/Default, \ + LD="$(TARGET_CC)" \ + OPTIM="$(TARGET_CFLAGS)" \ + STAGING_DIR="$(STAGING_DIR)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install \ + ) +endef + +define Package/l2tpns/install + $(INSTALL_DIR) $(1)/etc/l2tpns + $(CP) $(PKG_INSTALL_DIR)/etc/l2tpns/* $(1)/etc/l2tpns/ + $(INSTALL_DIR) $(1)/usr/lib/l2tpns + $(CP) $(PKG_INSTALL_DIR)/usr/lib/l2tpns/* $(1)/usr/lib/l2tpns/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,l2tpns)) diff --git a/net/l2tpns/patches/001-honor_includes_no_fifo_scheduler.patch b/net/l2tpns/patches/001-honor_includes_no_fifo_scheduler.patch new file mode 100644 index 0000000..470538b --- /dev/null +++ b/net/l2tpns/patches/001-honor_includes_no_fifo_scheduler.patch @@ -0,0 +1,51 @@ +--- a/Makefile ++++ b/Makefile +@@ -11,17 +11,14 @@ + DEFINES += -DETCDIR='"$(etcdir)"' + + OPTIM = +-OPTIM += -g + OPTIM += -O3 + +-CC = gcc +-LD = gcc +-INCLUDES = -I. ++INCLUDES = -I. -I$(STAGING_DIR)/usr/include + CPPFLAGS = $(INCLUDES) $(DEFINES) + CFLAGS = -Wall -Wformat-security -Wno-format-zero-length $(OPTIM) +-LDFLAGS = ++LDFLAGS = -L$(STAGING_DIR)/usr/lib + LDLIBS = +-INSTALL = install -c -D -o root -g root ++INSTALL = install -c -D + + l2tpns.LIBS = -lm -lcli -ldl + +--- a/l2tpns.c ++++ b/l2tpns.c +@@ -4239,23 +4239,8 @@ + struct sched_param params = {0}; + params.sched_priority = 1; + +- if (get_nprocs() < 2) +- { +- LOG(0, 0, 0, "Not using FIFO scheduler, there is only 1 processor in the system.\n"); +- config->scheduler_fifo = 0; +- } +- else +- { +- if ((ret = sched_setscheduler(0, SCHED_FIFO, ¶ms)) == 0) +- { +- LOG(1, 0, 0, "Using FIFO scheduler. Say goodbye to any other processes running\n"); +- } +- else +- { +- LOG(0, 0, 0, "Error setting scheduler to FIFO: %s\n", strerror(errno)); +- config->scheduler_fifo = 0; +- } +- } ++ LOG(0, 0, 0, "Not using FIFO scheduler, there is only 1 processor in the system.\n"); ++ config->scheduler_fifo = 0; + } + + /* Set up the cluster communications port. */ diff --git a/net/l7-protocols/Makefile b/net/l7-protocols/Makefile new file mode 100644 index 0000000..5ae2891 --- /dev/null +++ b/net/l7-protocols/Makefile @@ -0,0 +1,77 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=l7-protocols +PKG_VERSION:=2009-05-28 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/l7-filter +PKG_MD5SUM:=91be154d12134dcdbc560cc7aa7fe4ce + +include $(INCLUDE_DIR)/package.mk + +define Package/l7-protocols + SECTION:=net + CATEGORY:=Network + TITLE:=Protocols for layer7 filtering + URL:=http://l7-filter.sourceforge.net/ + SUBMENU:=Firewall + DEPENDS:=iptables-mod-filter +endef + +define Package/l7-protocols/description + l7-filter classifies packets based on patterns in application + layer data. This allows correct classification of P2P traffic that + uses unpredictable ports as well as standard protocols running on + non-standard ports. +endef + +define Package/l7-protocols-testing + $(call Package/l7-protocols) + TITLE:=testing utilities for layer7 + DEPENDS+=l7-protocols +uclibcxx +endef + +define Package/l7-protocols-testing/description + testing utilities for layer 7 patterns +endef + +define Build/Configure +endef + +ifneq ($(SDK)$(CONFIG_PACKAGE_l7-protocols-testing),) + define Build/Compile + cd $(PKG_BUILD_DIR)/testing && $(MAKE) $(TARGET_CONFIGURE_OPTS) CXX="$(STAGING_DIR)/host/bin/g++-uc" + endef +else + define Build/Compile + endef +endif + +define Package/l7-protocols/install + $(INSTALL_DIR) $(1)/etc/l7-protocols + $(CP) $(PKG_BUILD_DIR)/example_traffic \ + $(PKG_BUILD_DIR)/extra \ + $(PKG_BUILD_DIR)/file_types \ + $(PKG_BUILD_DIR)/groups.sh \ + $(PKG_BUILD_DIR)/malware \ + $(PKG_BUILD_DIR)/protocols \ + $(1)/etc/l7-protocols +endef + +define Package/l7-protocols-testing/install + $(INSTALL_DIR) $(1)/etc/l7-protocols/testing + $(CP) $(PKG_BUILD_DIR)/testing/data \ + $(1)/etc/l7-protocols/testing + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/testing/rand{chars,printable} \ + $(PKG_BUILD_DIR)/testing/test_speed-{kernel,userspace} \ + $(PKG_BUILD_DIR)/testing/match_kernel \ + $(PKG_BUILD_DIR)/testing/doallspeeds.sh \ + $(PKG_BUILD_DIR)/testing/test_match.sh \ + $(PKG_BUILD_DIR)/testing/timeit.sh \ + $(1)/etc/l7-protocols/testing +endef + +$(eval $(call BuildPackage,l7-protocols)) +$(eval $(call BuildPackage,l7-protocols-testing)) diff --git a/net/l7-protocols/patches/100-testing_crosscompile.patch b/net/l7-protocols/patches/100-testing_crosscompile.patch new file mode 100644 index 0000000..70ee2d1 --- /dev/null +++ b/net/l7-protocols/patches/100-testing_crosscompile.patch @@ -0,0 +1,27 @@ +--- a/testing/Makefile ++++ b/testing/Makefile +@@ -1,19 +1,19 @@ + all: randchars randprintable test_speed-kernel test_speed-userspace match_kernel + + randchars: randchars.c +- gcc -O2 -o randchars randchars.c ++ $(CC) -O2 -o randchars randchars.c + + randprintable: randprintable.c +- gcc -O2 -o randprintable randprintable.c ++ $(CC) -O2 -o randprintable randprintable.c + + test_speed-kernel: test_speed-kernel.c +- gcc -o test_speed-kernel test_speed-kernel.c ++ $(CC) -o test_speed-kernel test_speed-kernel.c + + test_speed-userspace: test_speed-userspace.cpp l7-parse-patterns.cpp l7-parse-patterns.h +- g++ -Wall -o test_speed-userspace test_speed-userspace.cpp l7-parse-patterns.cpp ++ $(CXX) -Wall -o test_speed-userspace test_speed-userspace.cpp l7-parse-patterns.cpp + + match_kernel: match-kernel.c +- gcc -O2 -o match_kernel match-kernel.c ++ $(CC) -O2 -o match_kernel match-kernel.c + + clean: + rm -f randprintable randchars test_speed-kernel test_speed-userspace match_kernel diff --git a/net/l7-protocols/patches/101-testing-timeit.patch b/net/l7-protocols/patches/101-testing-timeit.patch new file mode 100644 index 0000000..6656889 --- /dev/null +++ b/net/l7-protocols/patches/101-testing-timeit.patch @@ -0,0 +1,102 @@ +--- a/testing/timeit.sh ++++ b/testing/timeit.sh +@@ -1,11 +1,8 @@ + #!/bin/bash + +-# "man 1 time" for details +-export TIME="%U seconds" +- + add() + { +- if ! dc -e ""; then ++ if ! dc p >/dev/null 2>&1; then + echo you do not have dc, so I cannot add these numbers... + exit 1 + fi +@@ -14,7 +11,7 @@ add() + tot=0 + + while read n; do +- tot=`dc -e "$n $tot + pop" 2> /dev/null` ++ tot=`dc $n $tot + p 2> /dev/null` + done + + echo $tot seconds +@@ -34,7 +31,7 @@ extract() + + if [ ! $3 ] || [ $2 == "-h" ] || [ $2 == "--help" ]; then + echo +- echo Syntax: ./timeit.sh patternfile kernel\|userspace all\|print\|real [data_files] ++ echo Syntax: .//usr/bin/timeit.sh patternfile kernel\|userspace all\|print\|real [data_files] + echo + echo \"kernel\" uses the kernel pattern and library + echo \"userspace\" uses userspace pattern and library +@@ -72,12 +69,12 @@ echo Timing $1 + if [ $3 == "all" ]; then + echo Using all characters + if [ $2 == "kernel" ]; then +- if ! ./randchars | time $speedprog "`extract $1`" verbose; then ++ if ! ./randchars | /usr/bin/time $speedprog "`extract $1`" verbose 2>&1 >/dev/null | grep user | cut -d\ -f2; then + echo $speedprog failed. > /dev/stderr + exit 1 + fi + else +- if ! ./randchars | time $speedprog -f "$1" -v; then ++ if ! ./randchars | /usr/bin/time $speedprog -f "$1" -v 2>&1 >/dev/null | grep user | cut -d\ -f2; then + echo $speedprog failed. > /dev/stderr + exit 1 + fi +@@ -85,12 +82,12 @@ if [ $3 == "all" ]; then + elif [ $3 == "print" ]; then + echo Using only printable characters + if [ $2 == "kernel" ]; then +- if ! ./randprintable | time $speedprog "`extract $1`" verbose; then ++ if ! ./randprintable | /usr/bin/time $speedprog "`extract $1`" verbose 2>&1 >/dev/null | grep user | cut -d\ -f2; then + echo $speedprog failed. > /dev/stderr + exit 1 + fi + else +- if ! ./randprintable | time $speedprog -f "$1" -v; then ++ if ! ./randprintable | /usr/bin/time $speedprog -f "$1" -v 2>&1 >/dev/null | grep user | cut -d\ -f2; then + echo $speedprog failed. > /dev/stderr + exit 1 + fi +@@ -107,12 +104,12 @@ elif [ $3 == "real" ]; then + printf $f\\t + #echo `extract $1` + if [ $2 == "kernel" ]; then +- if ! cat $f | time $speedprog "`extract $1`" 2> /dev/stdout | tee -a tmp.$$; then ++ if ! cat $f | /usr/bin/time $speedprog "`extract $1`" 2>&1 >/dev/null | grep user | cut -d\ -f2 | tee -a tmp.$$; then + echo $speedprog failed. > /dev/stderr + exit 1 + fi + else +- if ! cat $f | time $speedprog -f "$1" 2> /dev/stdout | tee -a tmp.$$; then ++ if ! cat $f | /usr/bin/time $speedprog -f "$1" 2>&1 >/dev/null | grep user | cut -d\ -f2 | tee -a tmp.$$; then + echo $speedprog failed. > /dev/stderr + exit 1 + fi +@@ -123,12 +120,12 @@ elif [ $3 == "real" ]; then + for f in data/*; do + printf $f\\t + if [ $2 == "kernel" ]; then +- if ! cat $f | time $speedprog "`extract $1`" 2> /dev/stdout | tee -a tmp.$$; then ++ if ! cat $f | /usr/bin/time $speedprog "`extract $1`" 2>&1 >/dev/null | grep user | cut -d\ -f2 | tee -a tmp.$$; then + echo $speedprog failed. > /dev/stderr + exit 1 + fi + else +- if ! cat $f | time $speedprog -f "$1" 2> /dev/stdout | tee -a tmp.$$; then ++ if ! cat $f | /usr/bin/time $speedprog -f "$1" 2>&1 >/dev/null | grep user | cut -d\ -f2 | tee -a tmp.$$; then + echo $speedprog failed. > /dev/stderr + exit 1 + fi +@@ -137,7 +134,7 @@ elif [ $3 == "real" ]; then + fi + + printf Total:\ +- cat tmp.$$ | cut -d\ -f 2 | add ++ cat tmp.$$ | cut -ds -f 1| add + + rm tmp.$$ + else diff --git a/net/l7-protocols/patches/102-testing-doallspeeds.patch b/net/l7-protocols/patches/102-testing-doallspeeds.patch new file mode 100644 index 0000000..850a1d6 --- /dev/null +++ b/net/l7-protocols/patches/102-testing-doallspeeds.patch @@ -0,0 +1,16 @@ +--- a/testing/doallspeeds.sh ++++ b/testing/doallspeeds.sh +@@ -25,11 +25,11 @@ for f in ../*/*.pat; do + printf `basename $f .pat` + + if [ $userspace ]; then +- gtime=`./timeit.sh $f userspace real | grep Total | cut -d\ -f 2` ++ gtime=`./timeit.sh $f userspace real | grep Total | cut -d\ -f 2 | awk '{print $1}'` + printf \\t$gtime + fi + if [ $kernel ]; then +- htime=`./timeit.sh $f kernel real | grep Total | cut -d\ -f 2` ++ htime=`./timeit.sh $f kernel real | grep Total | cut -d\ -f 2 | awk '{print $1}'` + printf \\t$htime + fi + printf \\n diff --git a/net/leafnode/Makefile b/net/leafnode/Makefile new file mode 100644 index 0000000..aaae163 --- /dev/null +++ b/net/leafnode/Makefile @@ -0,0 +1,94 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=leafnode +PKG_VERSION:=1.11.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/leafnode +PKG_MD5SUM:=a3edafeb854efaa3fbb0f7951d02160f + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +CONFIGURE_ARGS+=--sysconfdir=/etc/leafnode +CONFIGURE_VARS+=LIBS=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) + +EXTRA_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/leafnode/Default + SUBMENU:=NNTP + SECTION:=net + CATEGORY:=Network + URL:=http://leafnode.sourceforge.net +endef + +define Package/leafnode + $(call Package/leafnode/Default) + DEPENDS:=+libpcre +xinetd + TITLE:=Leafnode store-and-forward NNTP proxy +endef + +define Package/leafnode/description + This package contains the "leafnode", "fetchnews" and + "texpire" programs and the necessary configuration files + for the leafnode proxy +endef + +define Package/leafnode-extra + $(call Package/leafnode/Default) + DEPENDS:=leafnode + TITLE:=Leafnode extra programs +endef + +define Package/leafnode-extra/description + This package contains the more rarely used "checkgroups", + "applyfilter" and "leafnode-version" programs from the + leafnode suite +endef + +define Package/leafnode/conffiles +/etc/leafnode/config.example +/etc/xinetd.d/nntp +/etc/crontabs/news +endef + +define Package/leafnode/postinst +#!/bin/sh +grep -q '^news:' $${IPKG_INSTROOT}/etc/passwd 2>/dev/null +[ $$? -ne 0 ] && echo "news:*:31:31:news:/var/spool/news:/bin/true" >>$${IPKG_INSTROOT}/etc/passwd && echo "news:x:31:" >>$${IPKG_INSTROOT}/etc/group || exit 0 +endef + +define Package/leafnode/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/leafnode $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fetchnews $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/texpire $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/leafnode + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/leafnode/config.example $(1)/etc/leafnode/ + $(INSTALL_DIR) $(1)/etc/xinetd.d + $(INSTALL_DATA) ./files/nntp $(1)/etc/xinetd.d/ + $(INSTALL_DIR) $(1)/etc/crontabs + $(INSTALL_DATA) ./files/news $(1)/etc/crontabs/ +endef + +define Package/leafnode-extra/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/checkgroups $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/applyfilter $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/leafnode-version $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,leafnode)) +$(eval $(call BuildPackage,leafnode-extra)) diff --git a/net/leafnode/files/news b/net/leafnode/files/news new file mode 100644 index 0000000..7e1fd79 --- /dev/null +++ b/net/leafnode/files/news @@ -0,0 +1,2 @@ +45 * * * * fetchnews +15 3 * * * texpire diff --git a/net/leafnode/files/nntp b/net/leafnode/files/nntp new file mode 100644 index 0000000..7f0c4bd --- /dev/null +++ b/net/leafnode/files/nntp @@ -0,0 +1,10 @@ +service nntp +{ + disable = no + flags = REUSE + socket_type = stream + wait = no + user = news + server = /usr/sbin/leafnode + log_on_failure += USERID +} diff --git a/net/lft/Makefile b/net/lft/Makefile new file mode 100644 index 0000000..1c946b2 --- /dev/null +++ b/net/lft/Makefile @@ -0,0 +1,71 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lft +PKG_VERSION:=3.32 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pwhois.org/get +PKG_MD5SUM:=5f09c9ad2475cb237b8277a2d69c569c + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lft/Default + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap + TITLE:=The alternative traceroute and whois tools for network engineers + URL:=http://pwhois.org/lft +endef + +define Package/lft/Default/description + LFT, short for Layer Four Traceroute, is a sort of 'traceroute' that + often works much faster (than the commonly-used Van Jacobson method) + and goes through many configurations of packet-filters (firewalls). + More importantly, LFT implements numerous other features including AS + number lookups through several reliable sources, loose source routing, + netblock name lookups, et al. +endef + +define Package/lft + $(call Package/lft/Default) +endef + +define Package/lft/description + $(call Package/lft/Default/description) + This package contains the lft 'traceroute' program. +endef + +define Package/whob + $(call Package/lft/Default) +endef + +define Package/whob/description + $(call Package/lft/Default/description) + This package contains the whob 'whois' program. +endef + +CONFIGURE_ARGS += \ + --with-pcap="$(STAGING_DIR)/usr" + +define Package/lft/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lft $(1)/usr/bin/ +endef + +define Package/whob/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/whob $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,lft)) +$(eval $(call BuildPackage,whob)) diff --git a/net/lft/patches/001-no_strip.patch b/net/lft/patches/001-no_strip.patch new file mode 100644 index 0000000..f58fbda --- /dev/null +++ b/net/lft/patches/001-no_strip.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -50,8 +50,6 @@ whob: whois.o + + install: lft lft.8 whob whob.8 + @echo "LFT and WhoB" +- @echo " \_Stripping binaries" +- @strip lft whob + @echo " \_Copying files to their intended destinations" + @test -d $(DESTDIR)$(bindir)/. || $(MKDIR) $(DESTDIR)$(bindir) + $(INSTALL) lft $(DESTDIR)$(bindir)/lft diff --git a/net/lftp/Makefile b/net/lftp/Makefile new file mode 100644 index 0000000..5a56211 --- /dev/null +++ b/net/lftp/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lftp +PKG_VERSION:=4.3.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=http://lftp.cybermirror.org \ + http://lftp.cybermirror.org/old +PKG_MD5SUM:=ccef0f84416fc964b7b8a5e3f2e87631 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lftp + SUBMENU:=File Transfer + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libncurses +libopenssl +libreadline +uclibcxx +libexpat + TITLE:=lftp + URL:=http://lftp.yar.ru/ +endef + +define Package/lftp/description + lftp is sophisticated file transfer program with command line interface. It + supports FTP, HTTP, FISH, SFTP and FILE (local FS) protocols. GNU Readline + library is used for input. BitTorrent protocol is supported as built-in + `torrent' command. +endef + +CONFIGURE_ARGS += \ + --without-libiconv-prefix \ + --without-libintl-prefix \ + --without-gnutls \ + --without-libresolv \ + --with-openssl="$(STAGING_DIR)/usr" \ + --disable-static + +CONFIGURE_VARS += \ + CXX="$(STAGING_DIR)/host/bin/g++-uc" \ + CXXFLAGS="$$$$CXXFLAGS -fno-builtin -I$(STAGING_DIR)/usr/include/uClibc++ -nostdinc++" \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \ + LDFLAGS="$$$$LDFLAGS" \ + LIBS="-nodefaultlibs -lz -lutil -lc -luClibc++ -lcurses $(LIBGCC_S) -ldl" \ + i_cv_posix_fallocate_works=no + +MAKE_VARS += \ + LD="\$$$$(CC)" + +define Package/lftp/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lftp $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,lftp)) diff --git a/net/lftp/patches/001-libintl.patch b/net/lftp/patches/001-libintl.patch new file mode 100644 index 0000000..42f3f42 --- /dev/null +++ b/net/lftp/patches/001-libintl.patch @@ -0,0 +1,18 @@ +--- a/lib/gettext.h ++++ b/lib/gettext.h +@@ -23,7 +23,6 @@ + #if ENABLE_NLS + + /* Get declarations of GNU message catalog functions. */ +-# include + + /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by + the gettext() and ngettext() macros. This is an alternative to calling +@@ -55,7 +54,6 @@ + #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) + # include + # if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H +-# include + # endif + #endif + diff --git a/net/lighttpd/Makefile b/net/lighttpd/Makefile new file mode 100644 index 0000000..450f269 --- /dev/null +++ b/net/lighttpd/Makefile @@ -0,0 +1,312 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lighttpd +PKG_VERSION:=1.4.28 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://download.lighttpd.net/lighttpd/releases-1.4.x/ +PKG_MD5SUM:=586eb535d31ac299652495b058dd87c4 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lighttpd/Default + SUBMENU:=Web Servers/Proxies + SECTION:=net + CATEGORY:=Network + URL:=http://www.lighttpd.net/ +endef + +define Package/lighttpd + $(call Package/lighttpd/Default) + MENU:=1 + DEPENDS:=+libopenssl +libpcre +libpthread + TITLE:=A flexible and lightweight web server +endef + +define Package/lighttpd-mod-access + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Access restrictions module +endef + +define Package/lighttpd-mod-accesslog + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Access logging module +endef + +define Package/lighttpd-mod-alias + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Directory alias module +endef + +define Package/lighttpd-mod-auth + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Authentication module +endef + +define Package/lighttpd-mod-cgi + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=CGI module +endef + +define Package/lighttpd-mod-cml + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Cache Meta Language module +endef + +define Package/lighttpd-mod-compress + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd +zlib + TITLE:=Compress output module +endef + +define Package/lighttpd-mod-evasive + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Evasive module +endef + +define Package/lighttpd-mod-evhost + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Exnhanced Virtual-Hosting module +endef + +define Package/lighttpd-mod-expire + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Expire module +endef + +define Package/lighttpd-mod-extforward + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Extract client IP module +endef + +define Package/lighttpd-mod-fastcgi + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=FastCGI module +endef + +define Package/lighttpd-mod-flv-streaming + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=flv streaming module +endef + +define Package/lighttpd-mod-magnet + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=magnet module +endef + +define Package/lighttpd-mod-mysql-vhost + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd +libmysqlclient + TITLE:=Mysql virtual hosting module +endef + +define Package/lighttpd-mod-proxy + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Proxy module +endef + +define Package/lighttpd-mod-redirect + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd +libpcre + TITLE:=URL redirection module +endef + +define Package/lighttpd-mod-rewrite + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd +libpcre + TITLE:=URL rewriting module +endef + +define Package/lighttpd-mod-rrdtool + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=rrdtool module +endef + +define Package/lighttpd-mod-scgi + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=SCGI module +endef + +define Package/lighttpd-mod-secdownload + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Secure and fast download module +endef + +define Package/lighttpd-mod-setenv + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Environment variable setting module +endef + +define Package/lighttpd-mod-simple-vhost + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Simple virtual hosting module +endef + +define Package/lighttpd-mod-ssi + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd +libpcre + TITLE:=SSI module +endef + +define Package/lighttpd-mod-status + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=Server status display module +endef + +define Package/lighttpd-mod-trigger-b4-dl + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd +libpcre + TITLE:=Trigger before download module +endef + +define Package/lighttpd-mod-userdir + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=User directory module +endef + +define Package/lighttpd-mod-usertrack + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd + TITLE:=User tracking module +endef + +define Package/lighttpd-mod-webdav + $(call Package/lighttpd/Default) + DEPENDS:=lighttpd +libsqlite3 +libuuid +libxml2 + TITLE:=WebDAV module +endef + +CONFIGURE_ARGS+= \ + --libdir=/usr/lib/lighttpd \ + --sysconfdir=/etc/lighttpd \ + --enable-shared \ + --enable-static \ + --disable-rpath \ + --without-attr \ + --without-bzip2 \ + --without-fam \ + --without-gdbm \ + --without-ldap \ + --without-lua \ + --without-memcache \ + --without-mysql \ + --with-openssl="$(STAGING_DIR)/usr" \ + --with-pcre \ + --without-valgrind \ + $(call autoconf_bool,CONFIG_IPV6,ipv6) + +CONFIGURE_VARS+= \ + PCRE_LIB="-lpcre" \ + +ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-webdav),) + CONFIGURE_ARGS+= \ + --with-webdav-locks \ + --with-webdav-props + # XXX: needed by sqlite3 to prevent segfaults in mod_webdav.so + CONFIGURE_VARS+= \ + LIBS="-lpthread" +else + CONFIGURE_ARGS+= \ + --without-webdav-locks \ + --without-webdav-props +endif + +define Build/Configure +$(call Build/Configure/Default) + # XXX: override pcre (mis)detection by ./configure when cross-compiling + echo "#define HAVE_LIBPCRE 1" >>$(PKG_BUILD_DIR)/config.h + echo "#define HAVE_PCRE_H 1" >>$(PKG_BUILD_DIR)/config.h +endef + +define Package/lighttpd/conffiles +/etc/lighttpd/lighttpd.conf +/etc/default/lighttpd +endef + +define Package/lighttpd/install + $(INSTALL_DIR) $(1)/etc/lighttpd + $(INSTALL_DATA) ./files/lighttpd.conf $(1)/etc/lighttpd/ + $(INSTALL_DIR) $(1)/etc/default + $(INSTALL_DATA) ./files/lighttpd.default $(1)/etc/default/lighttpd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/lighttpd.init $(1)/etc/init.d/lighttpd + $(INSTALL_DIR) $(1)/usr/lib/lighttpd + for m in dirlisting indexfile staticfile; do \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$$${m}.so $(1)/usr/lib/lighttpd/ ; \ + done + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lighttpd $(1)/usr/sbin/ +endef + +define BuildPlugin + define Package/$(1)/install + [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/lighttpd + for m in $(2); do \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$$$$$$${m}.so $$(1)/usr/lib/lighttpd/ ; \ + done + endef + + $$(eval $$(call BuildPackage,$(1))) +endef + +$(eval $(call BuildPackage,lighttpd)) +$(eval $(call BuildPlugin,lighttpd-mod-access,access)) +$(eval $(call BuildPlugin,lighttpd-mod-accesslog,accesslog)) +$(eval $(call BuildPlugin,lighttpd-mod-alias,alias)) +$(eval $(call BuildPlugin,lighttpd-mod-auth,auth)) +$(eval $(call BuildPlugin,lighttpd-mod-cgi,cgi)) +$(eval $(call BuildPlugin,lighttpd-mod-cml,cml)) +$(eval $(call BuildPlugin,lighttpd-mod-compress,compress)) +$(eval $(call BuildPlugin,lighttpd-mod-evasive,evasive)) +$(eval $(call BuildPlugin,lighttpd-mod-evhost,evhost)) +$(eval $(call BuildPlugin,lighttpd-mod-expire,expire)) +$(eval $(call BuildPlugin,lighttpd-mod-extforward,extforward)) +$(eval $(call BuildPlugin,lighttpd-mod-fastcgi,fastcgi)) +$(eval $(call BuildPlugin,lighttpd-mod-flv-streaming,flv_streaming)) +$(eval $(call BuildPlugin,lighttpd-mod-magnet,magnet)) +$(eval $(call BuildPlugin,lighttpd-mod-proxy,proxy)) +$(eval $(call BuildPlugin,lighttpd-mod-redirect,redirect)) +$(eval $(call BuildPlugin,lighttpd-mod-rewrite,rewrite)) +$(eval $(call BuildPlugin,lighttpd-mod-rrdtool,rrdtool)) +$(eval $(call BuildPlugin,lighttpd-mod-scgi,scgi)) +$(eval $(call BuildPlugin,lighttpd-mod-secdownload,secdownload)) +$(eval $(call BuildPlugin,lighttpd-mod-setenv,setenv)) +$(eval $(call BuildPlugin,lighttpd-mod-simple-vhost,simple_vhost)) +$(eval $(call BuildPlugin,lighttpd-mod-ssi,ssi)) +$(eval $(call BuildPlugin,lighttpd-mod-status,status)) +$(eval $(call BuildPlugin,lighttpd-mod-trigger-b4-dl,trigger_b4_dl)) +$(eval $(call BuildPlugin,lighttpd-mod-userdir,userdir)) +$(eval $(call BuildPlugin,lighttpd-mod-usertrack,usertrack)) +$(eval $(call BuildPlugin,lighttpd-mod-webdav,webdav)) diff --git a/net/lighttpd/files/lighttpd.conf b/net/lighttpd/files/lighttpd.conf new file mode 100644 index 0000000..269f546 --- /dev/null +++ b/net/lighttpd/files/lighttpd.conf @@ -0,0 +1,231 @@ +# lighttpd configuration file +# +## modules to load +# all other module should only be loaded if really neccesary +# - saves some time +# - saves memory +#server.modules = ( +# "mod_rewrite", +# "mod_redirect", +# "mod_alias", +# "mod_auth", +# "mod_status", +# "mod_setenv", +# "mod_fastcgi", +# "mod_proxy", +# "mod_simple_vhost", +# "mod_cgi", +# "mod_ssi", +# "mod_usertrack", +# "mod_expire", +# "mod_webdav" +#) + +# force use of the "write" backend (closes: #2401) +server.network-backend = "write" + +## a static document-root, for virtual-hosting take look at the +## server.virtual-* options +server.document-root = "/www/" + +## where to send error-messages to +#server.errorlog = "/var/log/lighttpd/error.log" + +## files to check for if .../ is requested +index-file.names = ( "index.html", "default.html", "index.htm", "default.htm" ) + +## mimetype mapping +mimetype.assign = ( + ".pdf" => "application/pdf", + ".class" => "application/octet-stream", + ".pac" => "application/x-ns-proxy-autoconfig", + ".swf" => "application/x-shockwave-flash", + ".wav" => "audio/x-wav", + ".gif" => "image/gif", + ".jpg" => "image/jpeg", + ".jpeg" => "image/jpeg", + ".png" => "image/png", + ".svg" => "image/svg+xml", + ".css" => "text/css", + ".html" => "text/html", + ".htm" => "text/html", + ".js" => "text/javascript", + ".txt" => "text/plain", + ".dtd" => "text/xml", + ".xml" => "text/xml" + ) + +## Use the "Content-Type" extended attribute to obtain mime type if possible +#mimetypes.use-xattr = "enable" + +## send a different Server: header +## be nice and keep it at lighttpd +#server.tag = "lighttpd" + +$HTTP["url"] =~ "\.pdf$" { + server.range-requests = "disable" +} + +## +# which extensions should not be handle via static-file transfer +# +# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi +static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) + +######### Options that are good to be but not neccesary to be changed ####### + +## bind to port (default: 80) +#server.port = 81 + +## bind to localhost (default: all interfaces) +#server.bind = "localhost" + +## error-handler for status 404 +#server.error-handler-404 = "/error-handler.html" +#server.error-handler-404 = "/error-handler.php" + +## to help the rc.scripts +server.pid-file = "/var/run/lighttpd.pid" + + +###### virtual hosts +## +## If you want name-based virtual hosting add the next three settings and load +## mod_simple_vhost +## +## document-root = +## virtual-server-root + virtual-server-default-host + virtual-server-docroot or +## virtual-server-root + http-host + virtual-server-docroot +## +#simple-vhost.server-root = "/home/weigon/wwwroot/servers/" +#simple-vhost.default-host = "grisu.home.kneschke.de" +#simple-vhost.document-root = "/pages/" + + +## +## Format: .html +## -> ..../status-404.html for 'File not found' +#server.errorfile-prefix = "/www/error-" + +## virtual directory listings +#server.dir-listing = "enable" + +## send unhandled HTTP-header headers to error-log +#debug.dump-unknown-headers = "enable" + +### only root can use these options +# +# chroot() to directory (default: no chroot() ) +#server.chroot = "/" + +## change uid to (default: don't care) +#server.username = "nobody" +# +server.upload-dirs = ( "/tmp" ) + +## change uid to (default: don't care) +#server.groupname = "nobody" + +#### compress module +#compress.cache-dir = "/dev/null/" +#compress.filetype = ("text/plain", "text/html") + +#### proxy module +## read proxy.txt for more info +#proxy.server = ( +# ".php" => ( +# "localhost" => ( +# "host" => "192.168.0.101", +# "port" => 80 +# ) +# ) +#) + +#### fastcgi module +## read fastcgi.txt for more info +#fastcgi.server = ( +# ".php" => ( +# "localhost" => ( +# "socket" => "/tmp/php-fastcgi.socket", +# "bin-path" => "/usr/local/bin/php" +# ) +# ) +#) + +#### CGI module +#cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" ) + +#### SSL engine +#ssl.engine = "enable" +#ssl.pemfile = "server.pem" + +#### status module +#status.status-url = "/server-status" +#status.config-url = "/server-config" + +#### auth module +## read authentification.txt for more info +#auth.backend = "plain" +#auth.backend.plain.userfile = "lighttpd.user" +#auth.backend.plain.groupfile = "lighttpd.group" +#auth.require = ( +# "/server-status" => ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "group=www|user=jan|host=192.168.2.10" +# ), +# "/server-info" => ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "group=www|user=jan|host=192.168.2.10" +# ) +#) + +#### url handling modules (rewrite, redirect, access) +#url.rewrite = ( "^/$" => "/server-status" ) +#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" ) + +#### both rewrite/redirect support back reference to regex conditional using %n +#$HTTP["host"] =~ "^www\.(.*)" { +# url.redirect = ( "^/(.*)" => "http://%1/$1" ) +#} + +#### expire module +#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes") + +#### ssi +#ssi.extension = ( ".shtml" ) + +#### setenv +#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" ) +#setenv.add-response-header = ( "X-Secret-Message" => "42" ) + +#### variable usage: +## variable name without "." is auto prefixed by "var." and becomes "var.bar" +#bar = 1 +#var.mystring = "foo" + +## integer add +#bar += 1 +## string concat, with integer cast as string, result: "www.foo1.com" +#server.name = "www." + mystring + var.bar + ".com" +## array merge +#index-file.names = (foo + ".php") + index-file.names +#index-file.names += (foo + ".php") + +#### include +#include /etc/lighttpd/lighttpd-inc.conf +## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf" +#include "lighttpd-inc.conf" + +#### include_shell +#include_shell "echo var.a=1" +## the above is same as: +#var.a=1 + +#### webdav +#$HTTP["url"] =~ "^/webdav($|/)" { +# webdav.activate = "enable" +# webdav.is-readonly = "enable" +# webdav.sqlite-db-name = "/var/run/lighttpd-webdav-lock.db" +#} diff --git a/net/lighttpd/files/lighttpd.default b/net/lighttpd/files/lighttpd.default new file mode 100644 index 0000000..340a1d2 --- /dev/null +++ b/net/lighttpd/files/lighttpd.default @@ -0,0 +1 @@ +OPTIONS="-f /etc/lighttpd/lighttpd.conf" diff --git a/net/lighttpd/files/lighttpd.init b/net/lighttpd/files/lighttpd.init new file mode 100644 index 0000000..550d5ad --- /dev/null +++ b/net/lighttpd/files/lighttpd.init @@ -0,0 +1,21 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=lighttpd +DEFAULT=/etc/default/$BIN +LOG_D=/var/log/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $LOG_D + mkdir -p $RUN_D + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + diff --git a/net/linuxigd/Makefile b/net/linuxigd/Makefile new file mode 100644 index 0000000..6fc5c15 --- /dev/null +++ b/net/linuxigd/Makefile @@ -0,0 +1,68 @@ +# +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006 loswillios +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=linuxigd +PKG_VERSION:=1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/linux-igd +PKG_MD5SUM:=929f5c4878c91d534613b7c7070215d9 + +PKG_BUILD_DEPENDS:=iptables libupnp + +include $(INCLUDE_DIR)/package.mk + +define Package/linuxigd + SECTION:=net + CATEGORY:=Network + TITLE:=UPnP daemon + SUBMENU:=Firewall + DEPENDS:=+libiptc +libupnp +libpthread @!LINUX_2_4 + URL:=http://linux-igd.sourceforge.net/ +endef + +define Package/linuxigd/description + It implements the UPnP Internet Gateway Device specification (IGD) + and allows UPnP aware clients, such as MSN Messenger, Azureus or + Miranda to work properly from behind a NAT firewall. + + Please edit /etc/upnpd.conf before using upnpd! +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -DIPTABLES_143 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib" \ + BINDIR="/usr/sbin" \ + MANDIR="/usr/man" \ + HAVE_LIBIPTC=1 \ + LIBIPTC_PREFIX="$(STAGING_DIR)/usr" \ + LIBUPNP_PREFIX="$(STAGING_DIR)/usr" \ + all +endef + +define Package/linuxigd/conffiles +/etc/upnpd.conf +endef + +define Package/linuxigd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/upnpd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/linuxigd + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/*.gif $(1)/etc/linuxigd/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/*.xml $(1)/etc/linuxigd/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/upnpd.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/upnpd.init $(1)/etc/init.d/upnpd +endef + +$(eval $(call BuildPackage,linuxigd)) diff --git a/net/linuxigd/files/upnpd.conf b/net/linuxigd/files/upnpd.conf new file mode 100644 index 0000000..4d67407 --- /dev/null +++ b/net/linuxigd/files/upnpd.conf @@ -0,0 +1,71 @@ +# +# The full path and name of the iptables executable, +# (enclosed in quotes). +# +iptables_location = "/usr/sbin/iptables" + +# +# Daemon debug level. Messages are logged via syslog to debug. +# 0 - no debug messages +# 1 - log errors +# 2 - log errors and basic info +# 3 - log errors and verbose info +# default = 0 +debug_mode = 2 + +# +# Should the daemon insert rules in the forward chain +# This is necessary if your firewall has a drop or reject +# policy in your forward chain. +# allowed values: yes,no +# default = no +insert_forward_rules = yes + +# +# The name of the chain to put the forward rules in. +# This directive is only activ if "insert_forward_rules = yes" +# above. +# allowed values: a-z, A-Z, _, - +# default = FORWARD +forward_chain_name = forwarding_wan + +# +# The name of the chain to put prerouting rules in. +# allowed values: a-z, A-Z, _, - +# default = PREROUTING +prerouting_chain_name = prerouting_wan + +# +# The internet line upstream bit rate reported from +# the daemon. Value in bits per second +# default = 0 +upstream_bitrate = 512000 + +# +# The internet line downstream bit rate reported from +# the daemon. Value in bits per second +# default = 0 +downstream_bitrate = 512000 + +# +# The default duration of port mappings, used when the client +# doesn't specify a duration. +# Can have the following values: +# 0 - no default duration specified +# seconds | HH:MM - duration from the time of addition +# @seconds | @HH:MM - expire mapping at the specified time of day +# default = 0 +duration = 0 + +# The name of the igd device xml description document +# default = gatedesc.xml +description_document_name = gatedesc.xml + +# The path to the xml documents +# Do not include the trailing "/" +# default = /etc/linuxigd +# WARNING! The make install does put the xml files +# in /etc/linuxigd, if you change this variable +# you have to make sure the xml docs are in the +# right place +xml_document_path = /etc/linuxigd diff --git a/net/linuxigd/files/upnpd.init b/net/linuxigd/files/upnpd.init new file mode 100644 index 0000000..e250305 --- /dev/null +++ b/net/linuxigd/files/upnpd.init @@ -0,0 +1,29 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006 loswillios +START=65 + +include /lib/network +scan_interfaces +config_get WAN wan ifname +config_get LAN lan ifname + +start() { + echo -n "Starting UPnP: " + route add -net 239.0.0.0 netmask 255.0.0.0 $LAN + upnpd $WAN $LAN + echo "OK" +} + +stop() { + echo -n "Stopping UPnP: " + route del -net 239.0.0.0 netmask 255.0.0.0 $LAN + killall upnpd + echo "OK" +} + +restart() { + stop + sleep 5 + start +} diff --git a/net/linuxigd/patches/001-iptables_defs.patch b/net/linuxigd/patches/001-iptables_defs.patch new file mode 100644 index 0000000..0cee3c0 --- /dev/null +++ b/net/linuxigd/patches/001-iptables_defs.patch @@ -0,0 +1,73 @@ +diff -urN linuxigd-1.0/iptc.c linuxigd-1.0.new/iptc.c +--- linuxigd-1.0/iptc.c 2006-09-11 17:55:48.000000000 +0200 ++++ linuxigd-1.0.new/iptc.c 2007-06-02 12:24:34.000000000 +0200 +@@ -22,9 +22,9 @@ + struct ipt_entry_match *get_udp_match(const char *sports, const char *dports, unsigned int *nfcache); + struct ipt_entry_target *get_dnat_target(const char *input, unsigned int *nfcache); + +-static u_int16_t parse_port(const char *port); +-static void parse_ports(const char *portstring, u_int16_t *ports); +-static int service_to_port(const char *name); ++static u_int16_t igd_parse_port(const char *port); ++void parse_ports(const char *portstring, u_int16_t *ports); ++static int igd_service_to_port(const char *name); + + static void parse_range(const char *input, struct ip_nat_range *range); + static struct ipt_natinfo *append_range(struct ipt_natinfo *info, const struct ip_nat_range *range); +@@ -336,13 +336,12 @@ + } + + /* Copied and modified from libipt_tcp.c and libipt_udp.c */ +- + static u_int16_t +-parse_port(const char *port) ++igd_parse_port(const char *port) + { + unsigned int portnum; + +- if ((portnum = service_to_port(port)) != -1) { ++ if ((portnum = igd_service_to_port(port)) != -1) { + return (u_int16_t)portnum; + } + else { +@@ -350,7 +349,7 @@ + } + } + +-static void ++void + parse_ports(const char *portstring, u_int16_t *ports) + { + char *buffer; +@@ -358,19 +357,18 @@ + + buffer = strdup(portstring); + if ((cp = strchr(buffer, ':')) == NULL) +- ports[0] = ports[1] = parse_port(buffer); ++ ports[0] = ports[1] = igd_parse_port(buffer); + else { + *cp = '\0'; + cp++; + +- ports[0] = buffer[0] ? parse_port(buffer) : 0; +- ports[1] = cp[0] ? parse_port(cp) : 0xFFFF; ++ ports[0] = buffer[0] ? igd_parse_port(buffer) : 0; ++ ports[1] = cp[0] ? igd_parse_port(cp) : 0xFFFF; + } + free(buffer); + } +- + static int +-service_to_port(const char *name) ++igd_service_to_port(const char *name) + { + struct servent *service; + +@@ -382,7 +380,6 @@ + + + +- + /* Copied and modified from libipt_DNAT.c */ + + static void diff --git a/net/linuxigd/patches/002-netfilter_nat_headers.patch b/net/linuxigd/patches/002-netfilter_nat_headers.patch new file mode 100644 index 0000000..abbc11e --- /dev/null +++ b/net/linuxigd/patches/002-netfilter_nat_headers.patch @@ -0,0 +1,16 @@ +diff -urN linuxigd-1.0/iptc.c linuxigd-1.0.new/iptc.c +--- linuxigd-1.0/iptc.c 2006-09-11 17:55:48.000000000 +0200 ++++ linuxigd-1.0.new/iptc.c 2007-07-13 14:50:23.000000000 +0200 +@@ -6,7 +6,12 @@ + #include + #include + #include ++#include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) ++#include ++#else + #include ++#endif + #include /* inet_addr */ + #include "globals.h" + #include "util.h" diff --git a/net/linuxigd/patches/003-Makefile-fix.patch b/net/linuxigd/patches/003-Makefile-fix.patch new file mode 100644 index 0000000..25a1c54 --- /dev/null +++ b/net/linuxigd/patches/003-Makefile-fix.patch @@ -0,0 +1,13 @@ +Index: linuxigd-1.0/Makefile +=================================================================== +--- linuxigd-1.0.orig/Makefile 2008-02-27 10:45:26.000000000 +0100 ++++ linuxigd-1.0/Makefile 2008-02-27 10:45:54.000000000 +0100 +@@ -27,7 +27,7 @@ + @echo "make $@ finished on `date`" + + %.o: %.c +- $(CC) $(CFLAGS) $(INCLUDES) -c $< ++ $(CC) $(CFLAGS) $(INCLUDES) -D_GNU_SOURCE -c $< + + clean: + rm -f *.o upnpd diff --git a/net/linuxigd/patches/004-iptables-1.4.3.2-compat.patch b/net/linuxigd/patches/004-iptables-1.4.3.2-compat.patch new file mode 100644 index 0000000..b982761 --- /dev/null +++ b/net/linuxigd/patches/004-iptables-1.4.3.2-compat.patch @@ -0,0 +1,101 @@ +diff -ur linuxigd-1.0.orig/iptc.c linuxigd-1.0/iptc.c +--- linuxigd-1.0.orig/iptc.c 2009-05-05 14:01:59.000000000 +0200 ++++ linuxigd-1.0/iptc.c 2009-05-05 14:05:48.000000000 +0200 +@@ -7,16 +7,24 @@ + #include + #include + #include +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) +-#include ++#ifdef IPTABLES_143 ++# include ++# define ip_nat_multi_range nf_nat_multi_range_compat ++# define ip_nat_range nf_nat_range + #else +-#include ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) ++# include ++# else ++# include ++# endif + #endif + #include /* inet_addr */ + #include "globals.h" + #include "util.h" + #include "iptc.h" + ++#define IPTC_HANDLE struct iptc_handle * ++ + struct ipt_natinfo + { + struct ipt_entry_target t; +@@ -49,7 +57,7 @@ + const char *dnat_to, + const int append) + { +- iptc_handle_t handle; ++ IPTC_HANDLE handle; + struct ipt_entry *chain_entry; + struct ipt_entry_match *entry_match = NULL; + struct ipt_entry_target *entry_target = NULL; +@@ -126,15 +134,15 @@ + return; + } + if (append) +- result = iptc_append_entry(labelit, chain_entry, &handle); ++ result = iptc_append_entry(labelit, chain_entry, handle); + else +- result = iptc_insert_entry(labelit, chain_entry, 0, &handle); ++ result = iptc_insert_entry(labelit, chain_entry, 0, handle); + + if (!result) { + trace(1, "libiptc error: Can't add, %s", iptc_strerror(errno)); + return; + } +- result = iptc_commit(&handle); ++ result = iptc_commit(handle); + if (!result) { + trace(1, "libiptc error: Commit error, %s", iptc_strerror(errno)); + return; +@@ -159,7 +167,7 @@ + const char *target, + const char *dnat_to) + { +- iptc_handle_t handle; ++ IPTC_HANDLE handle; + const struct ipt_entry *e; + ipt_chainlabel labelit; + int i, result; +@@ -182,7 +190,7 @@ + } + + /* check through rules to find match */ +- for (e = iptc_first_rule(chain, &handle), i=0; e; e = iptc_next_rule(e, &handle), i++) { ++ for (e = iptc_first_rule(chain, handle), i=0; e; e = iptc_next_rule(e, handle), i++) { + if (s_src != INADDR_NONE && e->ip.src.s_addr != s_src) continue; + if (s_dest != INADDR_NONE && e->ip.dst.s_addr != s_dest) continue; + if (iniface && strcmp(e->ip.iniface, iniface) != 0) continue; +@@ -190,7 +198,7 @@ + if (protocol && strcmp(protocol, "TCP") == 0 && e->ip.proto != IPPROTO_TCP) continue; + if (protocol && strcmp(protocol, "UDP") == 0 && e->ip.proto != IPPROTO_UDP) continue; + if ((srcports || destports) && IPT_MATCH_ITERATE(e, matchcmp, srcports, destports) == 0) continue; +- if (target && strcmp(target, iptc_get_target(e, &handle)) != 0) continue; ++ if (target && strcmp(target, iptc_get_target(e, handle)) != 0) continue; + if (dnat_to && strcmp(target, "DNAT") == 0) { + struct ipt_entry_target *t; + struct ip_nat_multi_range *mr; +@@ -214,12 +222,12 @@ + break; + } + if (!e) return; +- result = iptc_delete_num_entry(chain, i, &handle); ++ result = iptc_delete_num_entry(chain, i, handle); + if (!result) { + trace(1, "libiptc error: Delete error, %s", iptc_strerror(errno)); + return; + } +- result = iptc_commit(&handle); ++ result = iptc_commit(handle); + if (!result) { + trace(1, "libiptc error: Commit error, %s", iptc_strerror(errno)); + return; diff --git a/net/linuxigd/patches/005-includes.patch b/net/linuxigd/patches/005-includes.patch new file mode 100644 index 0000000..586f650 --- /dev/null +++ b/net/linuxigd/patches/005-includes.patch @@ -0,0 +1,30 @@ +--- a/gatedevice.c ++++ b/gatedevice.c +@@ -1,5 +1,6 @@ + #include + #include ++#include + #include + #include + #include +--- a/main.c ++++ b/main.c +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + #include "globals.h" + #include "config.h" + #include "gatedevice.h" +--- a/pmlist.c ++++ b/pmlist.c +@@ -2,6 +2,8 @@ + #include + #include + #include ++#include ++#include + #include "globals.h" + #include "config.h" + #include "pmlist.h" diff --git a/net/lldpd/Makefile b/net/lldpd/Makefile new file mode 100644 index 0000000..a4e6241 --- /dev/null +++ b/net/lldpd/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lldpd +PKG_VERSION:=0.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.luffy.cx/lldpd/ +PKG_MD5SUM:=317e1144ec7d2781ff123ec16845a2fc + +include $(INCLUDE_DIR)/package.mk + +define Package/lldpd + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + TITLE:=Link Layer Discovery Protocol damon + DEPENDS:=@!LINUX_2_4 + URL:=https://trac.luffy.cx/lldpd/ +endef + +define Package/lldpd/description + LLDP (Link Layer Discovery Protocol) is an industry standard protocol designed + to supplant proprietary Link-Layer protocols such as + Extreme's EDP (Extreme Discovery Protocol) and + CDP (Cisco Discovery Protocol). + The goal of LLDP is to provide an inter-vendor compatible mechanism to deliver + Link-Layer notifications to adjacent network devices. +endef + +CONFIGURE_ARGS += \ + --enable-cdp \ + --enable-fdp \ + --enable-edp \ + --enable-lldpmed \ + --enable-dot1 \ + --enable-dot3 \ + +CONFIGURE_VARS += \ + ac_cv_lib_nl_nl_connect=no + +define Package/lldpd/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lldpd $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lldpctl $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/lldpd.init $(1)/etc/init.d/lldpd + $(INSTALL_DATA) ./files/lldpd.config $(1)/etc/config/lldpd +endef + +$(eval $(call BuildPackage,lldpd)) diff --git a/net/lldpd/files/lldpd.config b/net/lldpd/files/lldpd.config new file mode 100644 index 0000000..14ba02f --- /dev/null +++ b/net/lldpd/files/lldpd.config @@ -0,0 +1,8 @@ +config lldpd config + option enable_cdp 1 + option enable_fdp 1 + option enable_sonmp 1 + option enable_edp 1 + + option lldp_class 4 + option lldp_location "2:FR:6:Commercial Rd:3:Roseville:19:4" diff --git a/net/lldpd/files/lldpd.init b/net/lldpd/files/lldpd.init new file mode 100644 index 0000000..195a027 --- /dev/null +++ b/net/lldpd/files/lldpd.init @@ -0,0 +1,35 @@ +#!/bin/sh /etc/rc.common + +START=90 + +start() { + local enable_cdp + local enable_fdp + local enable_sonmp + local enable_edp + local lldp_class + local lldp_location + local args="-d" + + config_load lldpd + config_get_bool enable_cdp config enable_cdp + config_get_bool enable_fdp config enable_fdp + config_get_bool enable_sonmp config enable_sonmp + config_get_bool enable_edp config enable_edp + config_get lldp_class config lldp_class + config_get lldp_location config lldp_location + + [ "$enable_cdp" == 1 ] && append args "-c" + [ "$enable_fdp" == 1 ] && append args "-f" + [ "$enable_sonmp" == 1 ] && append args "-s" + [ "$enable_edp" == 1 ] && append args "-e" + [ -n "$lldp_location" ] && append args "-L '$lldp_location'" + append args "-M ${lldp_class:-4}" + + eval start-stop-daemon -S -x lldpd -b -q -- $args +} + +stop() { + start-stop-daemon -K -q -x lldpd + rm -f /var/run/lldpd.socket +} diff --git a/net/lldpd/patches/001-no-multiuser.patch b/net/lldpd/patches/001-no-multiuser.patch new file mode 100644 index 0000000..965dd0d --- /dev/null +++ b/net/lldpd/patches/001-no-multiuser.patch @@ -0,0 +1,41 @@ +diff -urb lldpd-0.3.orig/src/priv.c lldpd-0.3/src/priv.c +--- lldpd-0.3.orig/src/priv.c 2008-12-30 07:35:28.000000000 +0100 ++++ lldpd-0.3/src/priv.c 2008-12-30 07:40:55.000000000 +0100 +@@ -522,12 +522,14 @@ + fatal("[priv]: unable to create socket pair for privilege separation"); + + /* Get users */ ++ /* + if ((user = getpwnam(PRIVSEP_USER)) == NULL) + fatal("[priv]: no " PRIVSEP_USER " user for privilege separation"); + uid = user->pw_uid; + if ((group = getgrnam(PRIVSEP_GROUP)) == NULL) + fatal("[priv]: no " PRIVSEP_GROUP " group for privilege separation"); + gid = group->gr_gid; ++ */ + + /* Spawn off monitor */ + if ((monitored = fork()) < 0) +@@ -535,17 +537,17 @@ + switch (monitored) { + case 0: + /* We are in the children, drop privileges */ +- if (chroot(chrootdir) == -1) +- fatal("[priv]: unable to chroot"); +- if (chdir("/") != 0) ++ /*if (chroot(chrootdir) == -1) ++ fatal("[priv]: unable to chroot");*/ ++ if (chdir("/tmp") != 0) + fatal("[priv]: unable to chdir"); + gidset[0] = gid; +- if (setresgid(gid, gid, gid) == -1) ++ /*if (setresgid(gid, gid, gid) == -1) + fatal("[priv]: setresgid() failed"); + if (setgroups(1, gidset) == -1) + fatal("[priv]: setgroups() failed"); + if (setresuid(uid, uid, uid) == -1) +- fatal("[priv]: setresuid() failed"); ++ fatal("[priv]: setresuid() failed");*/ + remote = pair[0]; + close(pair[1]); + priv_ping(); diff --git a/net/lsm/Makefile b/net/lsm/Makefile new file mode 100644 index 0000000..8efbe4c --- /dev/null +++ b/net/lsm/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lsm +PKG_VERSION:=0.60 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://lsm.foobar.fi/download +PKG_MD5SUM:=f4748308c0a1caa98d7e756778954116 + +include $(INCLUDE_DIR)/package.mk + +PKG_UNPACK += && rmdir $(PKG_BUILD_DIR) && mv $(BUILD_DIR)/lsm $(PKG_BUILD_DIR) + +define Package/lsm + SECTION:=net + CATEGORY:=Network + DEPENDS:=+ssmtp + TITLE:=A link state monitor + URL:=http://lsm.foobar.fi/ +endef + +define Package/lsm/description + lsm is a link state monitor for carrying out actions when a link + transistions from the up to down state or vice versa. +endef + +define Package/lsm/conffiles +/etc/lsm/lsm.conf +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) CC="$(TARGET_CC)" +endef + +define Package/lsm/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lsm $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/lsm + $(INSTALL_DIR) $(1)/etc/lsm/script.d + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_DATA) ./files/lsm.conf $(1)/etc/lsm/lsm.conf + $(INSTALL_BIN) ./files/lsm_script $(1)/etc/lsm/script + $(INSTALL_BIN) ./files/lsm.init $(1)/etc/init.d/lsm +endef + +$(eval $(call BuildPackage,lsm)) diff --git a/net/lsm/files/lsm.conf b/net/lsm/files/lsm.conf new file mode 100644 index 0000000..16f9d04 --- /dev/null +++ b/net/lsm/files/lsm.conf @@ -0,0 +1,43 @@ + +# +# (C) 2009 Mika Ilmaranta +# +# License: GPLv2 +# + +# +# Debug level: 0 .. 8 are normal, 9 gives lots of stuff and 100 doesn't +# bother to detach +# +#debug=10 +#debug=9 +debug=8 +reopen_on_enodev=1 + +# +# Defaults for the connection entries +# +defaults { + name=defaults + checkip=127.0.0.1 + eventscript=/etc/lsm/script + max_packet_loss=15 + max_successive_pkts_lost=7 + min_packet_loss=5 + min_successive_pkts_rcvd=10 + interval_ms=2000 + timeout_ms=2000 + warn_email=root + check_arp=0 + sourceip= +# if using ping probes for monitoring only then defaults should +# not define a default device for packets to autodiscover their path +# to destination +# device=eth0 +# use system default ttl + ttl=0 +} + +include /etc/lsm/connections.conf + +#EOF diff --git a/net/lsm/files/lsm.init b/net/lsm/files/lsm.init new file mode 100644 index 0000000..d1ca4ff --- /dev/null +++ b/net/lsm/files/lsm.init @@ -0,0 +1,44 @@ +#!/bin/sh /etc/rc.common +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +NAME=lsm +PROG=/usr/sbin/$NAME +DESC="Link State Monitor" +PIDFILE=/var/run/lsm.pid +START=45 + +test -x $PROG || exit 0 +set -e + +start() { + echo -n "Starting $DESC: $NAME" + start-stop-daemon -q -S -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf $PIDFILE + + echo "." +} + +stop() { + echo -n "Stopping $DESC: $NAME" + start-stop-daemon -q -K -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf $PIDFILE + echo "." +} + +restart() { + echo -n "Restarting $DESC: $NAME... " + start-stop-daemon -q -K -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf $PIDFILE + sleep 1 + start-stop-daemon -q -S -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf $PIDFILE + echo "done." +} + +reload() { + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + echo -n "Reloading $DESC configuration... " + start-stop-daemon -q -K -s HUP -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf $PIDFILE + echo "done." +} diff --git a/net/lsm/files/lsm_script b/net/lsm/files/lsm_script new file mode 100644 index 0000000..61895b2 --- /dev/null +++ b/net/lsm/files/lsm_script @@ -0,0 +1,66 @@ +#!/bin/sh +# +# (C) 2009 Mika Ilmaranta +# +# License: GPLv2 +# + +# +# default event handling script +# + +DATE=$(/bin/date) + +STATE=${1} +NAME=${2} +CHECKIP=${3} +DEVICE=${4} +WARN_EMAIL=${5} +REPLIED=${6} +WAITING=${7} +TIMEOUT=${8} +REPLY_LATE=${9} +CONS_RCVD=${10} +CONS_WAIT=${11} +CONS_MISS=${12} +AVG_RTT=${13} + +cat < +endef + +define Package/mac-to-devinfo/description + Scripts to take a mac address (or ip if the ip is in the arp cache) + and translate it into device information (mostly OUI owner, from the + IEEE data files, but more information may be available for specific + devices/vendors). +endef + +define Package/smap-to-devinfo + SECTION:=net + CATEGORY:=Network + SUBMENU:=Telephony + DEPENDS:=mac-to-devinfo +smap +httping + TITLE:=SIP Device Information from Scan +endef + +define Package/smap-to-devinfo/description + A script to use smap to discover all SIP devices on the networks + (provided ICMP and SIP are allowed to the network from the host) and + translate (through the ip then mac) into the device information. +endef + +define Package/netdiscover-to-devinfo + SECTION:=net + CATEGORY:=Network + DEPENDS:=mac-to-devinfo +netdiscover + TITLE:=Device Information from Scan for MAC addresses +endef + +define Package/netdiscover-to-devinfo/description + A script to use netdiscover to discover all devices on the specified + arp-able networks and translate into the device information. +endef + +define Build/Prepare +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/mac-to-devinfo/conffiles +/etc/config/mactodevinfo +endef + +define Package/mac-to-devinfo/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) ./files/mac-to-devinfo $(1)/usr/bin + $(INSTALL_BIN) ./files/ip-to-devinfo $(1)/usr/bin + $(INSTALL_BIN) ./files/prep-devinfo $(1)/usr/bin + $(INSTALL_BIN) ./files/clean-devinfo $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/lib/mac-to-devinfo + $(INSTALL_BIN) ./files/devinfo-functions.sh $(1)/usr/lib/mac-to-devinfo + $(INSTALL_DIR) $(1)/usr/share/mac-to-devinfo + $(CP) ./files/macdevdb $(1)/usr/share/mac-to-devinfo + $(INSTALL_DIR) $(1)/etc/config + $(CP) ./files/mactodevinfo $(1)/etc/config +endef + +define Package/smap-to-devinfo/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) ./files/smap-to-devinfo $(1)/usr/bin + $(INSTALL_BIN) ./files/netsmap-to-devinfo $(1)/usr/bin +endef + +define Package/netdiscover-to-devinfo/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) ./files/netdiscover-to-devinfo $(1)/usr/bin +endef + +$(eval $(call BuildPackage,mac-to-devinfo)) +$(eval $(call BuildPackage,smap-to-devinfo)) +$(eval $(call BuildPackage,netdiscover-to-devinfo)) diff --git a/net/mac-to-devinfo/files/clean-devinfo b/net/mac-to-devinfo/files/clean-devinfo new file mode 100644 index 0000000..a34411a --- /dev/null +++ b/net/mac-to-devinfo/files/clean-devinfo @@ -0,0 +1,26 @@ +#!/bin/sh +# clean-devinfo - clean up after MAC IEEE and custom information +# Copyright (C) 2009 Daniel Dickinson + +# 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. + +OUIDIR=/var/cache/mac-to-devinfo + +rm -rf $OUIDIR +#!/bin/sh + +OUIDIR=/var/cache/mac-to-devinfo + +rm -rf $OUIDIR diff --git a/net/mac-to-devinfo/files/devinfo-functions.sh b/net/mac-to-devinfo/files/devinfo-functions.sh new file mode 100644 index 0000000..fc29334 --- /dev/null +++ b/net/mac-to-devinfo/files/devinfo-functions.sh @@ -0,0 +1,122 @@ +#!/bin/sh +# Shell script compatibility wrappers for /sbin/uci +# +# Copyright (C) 2008 Felix Fietkau +# Copyright (C) 2009 Daniel Dickinson +# +# 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 + +# $UCI and $UCISTATE must be set + +CONFIG_APPEND= +_C=0 +LOAD_STATE=1 +LIST_SEP=" " + +config_load() { + local PACKAGE="$1" + local DATA + local RET + + _C=0 + + if [ -z "$CONFIG_APPEND" ]; then + CONFIG_SECTIONS= + CONFIG_NUM_SECTIONS=0 + CONFIG_SECTION= + fi + export NO_EXPORT= + DATA="$($UCI -P $UCISTATE -S -n export "$PACKAGE" 2>/dev/null)" + RET="$?" + [ "$RET" != 0 -o -z "$DATA" ] || eval "$DATA" + unset DATA + + ${CONFIG_SECTION:+config_cb} + return "$RET" +} + +reset_cb() { + config_cb() { return 0; } + option_cb() { return 0; } + list_cb() { return 0; } +} +reset_cb +config () { + local cfgtype="$1" + local name="$2" + + CONFIG_NUM_SECTIONS=$(($CONFIG_NUM_SECTIONS + 1)) + name="${name:-cfg$CONFIG_NUM_SECTIONS}" + append CONFIG_SECTIONS "$name" + [ -n "$NO_CALLBACK" ] || config_cb "$cfgtype" "$name" + CONFIG_SECTION="$name" + eval "CONFIG_${CONFIG_SECTION}_TYPE=\"$cfgtype\"" +} + +option () { + local varname="$1"; shift + local value="$*" + + eval "CONFIG_${CONFIG_SECTION}_${varname}=\"$value\"" + [ -n "$NO_CALLBACK" ] || option_cb "$varname" "$*" +} + +list() { + local varname="$1"; shift + local value="$*" + local len + + config_get len "$CONFIG_SECTION" "${varname}_LENGTH" + len="$((${len:-0} + 1))" + config_set "$CONFIG_SECTION" "${varname}_ITEM$len" "$value" + config_set "$CONFIG_SECTION" "${varname}_LENGTH" "$len" + append "CONFIG_${CONFIG_SECTION}_${varname}" "$value" "$LIST_SEP" + list_cb "$varname" "$*" +} + +config_get() { + case "$3" in + "") eval "echo \"\${CONFIG_${1}_${2}}\"";; + *) eval "$1=\${CONFIG_${2}_${3}}";; + esac +} + +config_foreach() { + local function="$1" + [ "$#" -ge 1 ] && shift + local type="$1" + [ "$#" -ge 1 ] && shift + local section cfgtype + + [ -z "$CONFIG_SECTIONS" ] && return 0 + for section in ${CONFIG_SECTIONS}; do + config_get cfgtype "$section" TYPE + [ -n "$type" -a "x$cfgtype" != "x$type" ] && continue + $function "$section" "$@" + done +} + +package() { + return 0 +} + +append() { + local var="$1" + local value="$2" + local sep="${3:- }" + + eval "$var=\${$var:+\${$var}\${value:+\$sep}}\$value" +} + diff --git a/net/mac-to-devinfo/files/ip-to-devinfo b/net/mac-to-devinfo/files/ip-to-devinfo new file mode 100644 index 0000000..eb4d851 --- /dev/null +++ b/net/mac-to-devinfo/files/ip-to-devinfo @@ -0,0 +1,80 @@ +#!/bin/sh +# ip-to-devinfo - IP (through arping or ping and arp cache) to MAC IEEE and +# custom information +# Copyright (C) 2009 Daniel Dickinson + +# 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. + +ARP=arp +MACTODEV=mac-to-devinfo + +usage() { + echo "Usage: $0 [-i interface] [-x port] IP-address" +} + +if [ "$1" == "-i" ]; then + INTERFACE="$2" + if [ -z "$INTERFACE" ]; then + echo "-i without interface" + usage + exit 1 + fi + shift + shift +fi + +if [ "$1" == "-x" ]; then + PORT="-x $2" + if [ -z "$PORT" ]; then + echo "-x without the port" + usage + exit 1 + fi + shift + shift +fi + +IP="$1" +shift + +if [ -z "$IP" ]; then + echo "Must specify IP address" + usage + exit 1 +fi + + +if [ ! -x "$(which $ARP)" ]; then + do_arp() { + cat /proc/net/arp + } + ARPMACFIELD=4 +else + do_arp() { + $ARP -n + } + ARPMACFIELD=3 +fi + +if [ -z "$INTERFACE" ]; then + ping -q -c 2 $IP >/dev/null + MAC=$(do_arp|grep "$IP "|tr -s \ | cut -f$ARPMACFIELD -d\ ) +else + MAC=$(arping -f -c 5 -I $INTERFACE $IP | grep 'Unicast reply from' | cut -f2 -d \[ | cut -f1 -d\]) +fi + +$MACTODEV $PORT $MAC + + diff --git a/net/mac-to-devinfo/files/mac-to-devinfo b/net/mac-to-devinfo/files/mac-to-devinfo new file mode 100644 index 0000000..cce253a --- /dev/null +++ b/net/mac-to-devinfo/files/mac-to-devinfo @@ -0,0 +1,197 @@ +#!/bin/sh +# mac-to-devinfo - MAC IEEE and custom information +# Copyright (C) 2009 Daniel Dickinson + +# 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. + +UCIBIN=uci +UCIFUNC=/usr/lib/mac-to-devinfo/devinfo-functions.sh +OVERRIDETABLE=mactodevinfo +DEVDB=macdevdb +UCICONFIG=/etc/config + +OUIURL=http://standards.ieee.org/regauth/oui/oui.txt +IABURL=http://standards.ieee.org/regauth/oui/iab.txt + +OUIDIR=/var/cache/mac-to-devinfo + +OUIFILE=$OUIDIR/oui.txt +IABFILE=$OUIDIR/iab.txt + +UCIDEVDB=/usr/share/mac-to-devinfo +UCISTATE="$(mktemp -t)" + +. $UCIFUNC + + +if [ "$1" == "-x" ]; then + PORT="$2" + if [ -z "$PORT" ]; then + echo "-x without the port" + echo "Usage: $0 [-x port] MAC-address" + exit 1 + fi + shift + shift +fi + +MAC="$1" + +if [ -z "$MAC" ]; then + echo "Unknown MAC address | Unknown | unknown | unknown | unknown" + exit 1 +fi + +MAC=$(echo $MAC | sed -e 's/^\([0-9]\):/0\1:/g' | sed -e 's/:\([0-9]\)$/:0\1/g' | sed -e 's/:\([0-9]\):/:0\1:/g') + +parse_override() { + local cfg="$1" + config_get name "$cfg" name + config_get maclow "$cfg" maclow + config_get machigh "$cfg" machigh + config_get vendor "$cfg" vendor + config_get devtype "$cfg" devtype + config_get model "$cfg" model + config_get ouiowneroverride "$cfg" ouiowner + LOW=$(echo $maclow | sed -e 's/://g') + HIGH=$(echo $machigh | sed -e 's/://g') + if [ -z "$LOW" ] || [ -z "$HIGH" ] || [ -n "$(echo $LOW | grep -E -v '^[0-9A-Fa-f]{12}$')" ] || [ -n "$(echo $HIGH | grep -E -v '^[0-9A-Fa-f]{12}$')" ]; then + echo "Invalid mac range for $name: $ouiowneroverride $vendor $devtype $model : $LOW-$HIGH" >&2 + return 1 + fi + + LOWMSB=$(expr substr "$LOW" 1 6) + LOWLSB=$(expr substr "$LOW" 7 6) + HIGHMSB=$(expr substr "$HIGH" 1 6) + HIGHLSB=$(expr substr "$HIGH" 7 6) + + if [ -z "$LOWMSB" ] || [ -z "$LOWLSB" ] || [ -z "$HIGHMSB" ] || [ -z "$HIGHLSB" ]; then + echo "Error splitting database address strings" + return 1 + fi + + MACMSB=$(expr substr "$MACNUM" 1 6) + MACLSB=$(expr substr "$MACNUM" 7 6) + + if [ -z "$MACMSB" ] || [ -z "$MACLSB" ]; then + echo "Error spliiting mac address string" + return 1 + fi + + if [ -n "$ouiowneroverride" ]; then + OUIOWNER="$ouiowneroverride" + fi + if [ $((0x$MACMSB)) -ge $((0x$LOWMSB)) ] && [ $((0x$MACMSB)) -le $((0x$HIGHMSB)) ]; then + if [ $((0x$MACLSB)) -ge $((0x$LOWLSB)) ] && [ $((0x$MACLSB)) -le $((0x$HIGHLSB)) ]; then + if [ "$PORT" == "5060" ]; then + if [ "$vendor" == "Vertical Communications" ]; then + devtype="VoIP Phone" + model="IP200x" + fi + fi + if [ "$PORT" == "6060" ]; then + if [ "$vendor" == "Vertical Communications" ]; then + devtype="VoIP PBX" + model="Xcelerator IP" + fi + fi + if [ -n "$OUTSTRING" ]; then + echo "ERROR: We already have found information '$OUTSTRING'" >&2 + echo -n "and now we have: " >&2 + echo "$MAC | $OUIOWNER | $vendor | $devtype | $model" >&2 + return 1 + else + echo "$MAC | $OUIOWNER | $vendor | $devtype | $model" + return 0 + fi + fi + fi + return 0 +} + +if [ ! -r "$OUIFILE" ] || [ ! -r "$IABFILE" ]; then + echo "Missing IEEE Registration Authority Database. Please run prep-devinfo" + exit 1 +fi + +OUI="$(echo $MAC | cut -f1-3 -d: | sed -e 's/:/-/g' | tr abcdef ABCDEF )" + +OUIOWNER="$(cat $OUIFILE | grep $OUI | tr -s '\t' | cut -f2- -d"$(printf '\t')" )" + +if [ -z "$OUIOWNER" ] || [ "$OUIOWNER" = "IEEE REGISTRATION AUTHORITY" ]; then + if [ -n "$(cat $IABFILE | grep $OUI)" ]; then + LOWRANGE="$(echo $MAC | cut -f4-6 -d: | sed -e 's/://g' | tr abcdef ABCDEF )" + for range in $(cat $IABFILE |grep -E '[0-9A-F]{6}\-[0-9A-F]{6}' |cut -f1 -d"$(printf '\t')" ); do + LOW="$(echo $range | cut -f1 -d- )" + HIGH="$(echo $range | cut -f2 -d- )" + if [ -z "$LOW" ] || [ -z "$HIGH" ]; then + echo "Error parsing IAB table" + exit 1 + + fi + LOWMSB=$(expr substr "$LOW" 1 6) + LOWLSB=$(expr substr "$LOW" 7 6) + HIGHMSB=$(expr substr "$HIGH" 1 6) + HIGHLSB=$(expr substr "$HIGH" 7 6) + + if [ -z "$LOWMSB" ] || [ -z "$LOWLSB" ] || [ -z "$HIGHMSB" ] || [ -z "$HIGHLSB" ]; then + echo "Error splitting registration authority IAB address strings" + exit 1 + fi + + MACMSB=$(expr substr "$LOWRANGE" 1 6) + MACLSB=$(expr substr "$LOWRANGE" 7 6) + + if [ -z "$MACMSB" ] || [ -z "$MACLSB" ]; then + echo "Error splitting mac address string" + exit 1 + fi + if [ $((0x$MACMSB)) -ge $((0x$LOWMSB)) ] && [ $((0x$MACMSB)) -le $((0x$HIGHMSB)) ]; then + if [ $((0x$MACLSB)) -ge $((0x$LOWLSB)) ] && [ $((0x$MACLSB)) -le $((0x$HIGHLSB)) ]; then + OUIOWNER="$(cat $IABFILE | grep "$LOW-$HIGH" | tr -s '\t' | cut -f3- -d"$(printf '\t')" )" + break; + fi + fi + done + fi +fi + +if [ -z "$OUIOWNER" ]; then + OUIOWNER="Unknown Organization" +fi + +MACNUM="$(echo $MAC |sed -e 's/://g' | tr ABCDEF abcdef )" + +UCI="$UCIBIN -c $UCIDEVDB" +config_load $DEVDB +DEVSTRING=$(config_foreach parse_override mactodevinfo) + +SAVEDEVSTRING="$DEVSTRING" + +UCI="$UCIBIN -c $UCICONFIG" +config_load $OVERRIDETABLE +DEVSTRING=$(config_foreach parse_override mactodevinfo) + +if [ -z "$DEVSTRING" ]; then + if [ -z "$SAVEDEVSTRING" ]; then + echo "$MAC | $OUIOWNER | unknown | unknown | unknown" + else + echo "$SAVEDEVSTRING" + fi +else + echo "$DEVSTRING" +fi + +rm -f $UCISTATE diff --git a/net/mac-to-devinfo/files/macdevdb b/net/mac-to-devinfo/files/macdevdb new file mode 100644 index 0000000..8bb8873 --- /dev/null +++ b/net/mac-to-devinfo/files/macdevdb @@ -0,0 +1,8 @@ + +config 'mactodevinfo' + option 'maclow' '00:19:15:00:00:00' + option 'machigh' '00:19:15:ff:ff:ff' + option 'vendor' 'Vertical Communications' + option 'devtype' 'SIP devices' + option 'model' 'varies' + diff --git a/net/mac-to-devinfo/files/mactodevinfo b/net/mac-to-devinfo/files/mactodevinfo new file mode 100644 index 0000000..9cd0e5e --- /dev/null +++ b/net/mac-to-devinfo/files/mactodevinfo @@ -0,0 +1,2 @@ +package mactodevinfo + diff --git a/net/mac-to-devinfo/files/netdiscover-to-devinfo b/net/mac-to-devinfo/files/netdiscover-to-devinfo new file mode 100644 index 0000000..c460dc1 --- /dev/null +++ b/net/mac-to-devinfo/files/netdiscover-to-devinfo @@ -0,0 +1,67 @@ +#!/bin/sh +# netdiscover-to-devinfo - netdiscover to MAC IEEE and custom information +# Copyright (C) 2009 Daniel Dickinson + +# 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. + +MACTODEV=mac-to-devinfo + +if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then + echo "Usage: netdiscover-to-devinfo IP-range Interface Timeout [-r repeats] [-s sleep_between_arp_requests]" + exit 1 +fi + +prep-devinfo +IFS=' +' + +IPRANGE=$1 +IFACE=$2 +TIMEOUT=$3 + +shift 3 + +while getopts "r:s:h" param; do + case "$param" in + h) + usage + exit 1 + ;; + r) + REPEATS=" -c $OPTARG" + ;; + s) + SLEEPREQ="-s $OPTARG" + ;; + ?|*) + usage + exit 1 + break + ;; + + esac +done + + +for line in $(sh -c "netdiscover -t $TIMEOUT-k -m -i $IFACE -r $IPRANGE $REPEATS $SLEEPREQ 2>/dev/null" | grep -E '[0-9]([0-9]?[0-9])?.[0-9]([0-9]?[0-9])?.[0-9]([0-9]?[0-9])?.[0-9]([0-9]?[0-9])?.[0-9]([0-9]?[0-9])?'); do + unset IFS + IP=$(echo $line | tr -s \ | cut -f1 -d\ ) + MAC=$(echo $line | tr -s \ | cut -f2 -d\ ) + echo "$IP"" | ""$($MACTODEV $MAC)" + IFS=' +' +done + +unset IFS diff --git a/net/mac-to-devinfo/files/netsmap-to-devinfo b/net/mac-to-devinfo/files/netsmap-to-devinfo new file mode 100644 index 0000000..11a7e41 --- /dev/null +++ b/net/mac-to-devinfo/files/netsmap-to-devinfo @@ -0,0 +1,156 @@ +#!/bin/sh +# netsmap-to-devinfo - netdisovered then smap'ed IP addresses to MAC IEEE +# and custom information +# Copyright (C) 2009 Daniel Dickinson + +# 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. + +MACTODEV=mac-to-devinfo +IPTODEV=ip-to-devinfo + +usage() { + echo "$0: -i interferace -r ip-range [options]" + echo "" + echo "-r ip-range range to probe (CIDR, e.g. 192.168.2.0/24)" + echo "-i interface interface to use in scan" + echo "-t timeout time to rate for arp responses for device detection" + echo "-p port[,port...] command-separated lists of ports to scan for SIP responses" + echo "-c repeat_count Number of times to send each request (default 1)" + echo "-s sleepreq ms to wait between sending arp requests" + echo "-x Assume we're running on an Xcelerator IP" + echo "-h help" +} + + +while getopts "r:i:t:p:c:s:xh" param; do + case "$param" in + h) + usage + exit 1 + ;; + r) + IPRANGE=$OPTARG + ;; + i) + INTERFACE=$OPTARG + ;; + t) + TIMEOUT=$OPTARG + ;; + p) + PORTARG=$OPTARG + ;; + c) + REPEATCOUNT=$OPTARG + ;; + s) + SLEEPREQ="-s $OPTARG" + ;; + x) + XIP=TRUE + ;; + ?|*) + usage + exit 1 + break + ;; + + esac +done + +if [ "$IPRANGE" = "" ]; then + echo "Must specify an ip range" + usage + exit 1 +fi + +if [ "$INTERFACE" = "" ]; then + echo "Must speciy the interface" + usage + exit 1 +fi + +if [ "$TIMEOUT" = "" ]; then + TIMEOUT=20 + usage +fi + +unset PORTS + +if [ -n "$PORTARG" ]; then + PORTLIST="$PORTARG" + + if [ -z "$(echo $PORTLIST | grep ',')" ]; then + PORTS="$PORTLIST" + else + FIELD=1 + oldcurport="" + curport="$(echo $PORTLIST | cut -f$FIELD -d, )" + while [ "$curport" != "$oldcurport" ]; do + PORTS="$curport $PORTS" + FIELD=$(($FIELD + 1)) + oldcurport="$(echo $PORTLIST | cut -f$FIELD -d, )" + curport="$(echo $PORTLIST | cut -f$FIELD -d, )" + done + fi +fi + + +prep-devinfo + +IFS=' +' + +if [ -n "$REPEATCOUNT" ]; then + REPEAT="-c $REPEATCOUNT" +fi + +for line in $(sh -c "netdiscover -t $TIMEOUT -k -m -i $INTERFACE -r $IPRANGE $REPEAT $SLEEPREQ 2>/dev/null" | grep -E '[0-9]([0-9]?[0-9])?.[0-9]([0-9]?[0-9])?.[0-9]([0-9]?[0-9])?.[0-9]([0-9]?[0-9])?.[0-9]([0-9]?[0-9])?'); do + unset IFS + IP=$(echo $line | tr -s \ | cut -f1 -d\ ) + MAC=$(echo $line | tr -s \ | cut -f2 -d\ ) + + if [ -n "$PORTS" ]; then + for port in $PORTS; do + + if [ "$XIP" = "TRUE" ]; then + XIP_PORT="-x $port" + fi + for sip_device in $(smap -p $port $IP rng-32bit-tables.h diff --git a/net/matrixtunnel/Makefile b/net/matrixtunnel/Makefile new file mode 100644 index 0000000..819f1aa --- /dev/null +++ b/net/matrixtunnel/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=matrixtunnel +PKG_VERSION:=0.2 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://znerol.ch/files +PKG_MD5SUM:=af169751efc7d87d500716a48d74ddc5 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +MAKE_PATH:=src + +define Package/matrixtunnel + SECTION:=net + CATEGORY:=Network + SUBMENU:=VPN + DEPENDS:=+libmatrixssl + TITLE:=SSL tunnel based on matrixssl + URL:=http://znerol.ch/svn/matrixtunnel/trunk/ +endef + +define Package/matrixtunnel/description + matrixtunnel is a stripped down version of stunnel + based on matrixssl library. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --without-libiconv-prefix \ + --without-libintl-prefix \ + --with-matrixssl-src="$(BUILD_DIR)/matrixssl" \ + ) +endef + +define Package/matrixtunnel/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/matrixtunnel $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,matrixtunnel)) diff --git a/net/mdk3/Makefile b/net/mdk3/Makefile new file mode 100644 index 0000000..735523e --- /dev/null +++ b/net/mdk3/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mdk3 +PKG_VERSION:=v6 +PKG_RELEASE:=1 +PKG_MD5SUM:=67705a814ded2a2e6f70522ca0dc6da9 + +PKG_BUILD_DIR:=$(BUILD_DIR)/mdk3-$(PKG_VERSION) +PKG_SOURCE_URL:=http://homepages.tu-darmstadt.de/~p_larbig/wlan/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/mdk3 + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpthread + TITLE:= MDK3 + URL:=http://homepages.tu-darmstadt.de/~p_larbig/wlan/ + SUBMENU:=wireless +endef + +define Package/mdk3/description + Tool to exploit wireless vulnerabilities +endef + +define Package/mdk3/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/mdk3 $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,mdk3)) diff --git a/net/mdk3/patches/001-radiotap_needs_types_h.patch b/net/mdk3/patches/001-radiotap_needs_types_h.patch new file mode 100644 index 0000000..77a155a --- /dev/null +++ b/net/mdk3/patches/001-radiotap_needs_types_h.patch @@ -0,0 +1,11 @@ +diff -urN mdk3-v6/osdep/radiotap/radiotap-parser.c mdk3-v6.new/osdep/radiotap/radiotap-parser.c +--- mdk3-v6/osdep/radiotap/radiotap-parser.c 2009-08-16 18:16:14.000000000 +0200 ++++ mdk3-v6.new/osdep/radiotap/radiotap-parser.c 2009-11-01 10:30:08.000000000 +0100 +@@ -18,6 +18,7 @@ + + #include + #include ++#include + + #include "radiotap-parser.h" + diff --git a/net/mdk3/patches/010-fix-dependencies.patch b/net/mdk3/patches/010-fix-dependencies.patch new file mode 100644 index 0000000..fe8d7aa --- /dev/null +++ b/net/mdk3/patches/010-fix-dependencies.patch @@ -0,0 +1,17 @@ +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- mdk3-v6.orig/Makefile ++++ mdk3-v6/Makefile +@@ -18,8 +18,8 @@ osd: + $(LIBOSD): + $(MAKE) -C $(OSD) + +-mdk3: mdk3.c $(OSD)/libosdep.a +- $(CC) $(CFLAGS) $(LINKFLAGS) $^ -o $@ $(LIBS) ++mdk3: $(LIBOSD) mdk3.c ++ $(CC) $(CFLAGS) $(LINKFLAGS) mdk3.c $(OSD)/lib$(OSD).a -o $@ $(LIBS) + + install: mdk3 + $(MAKE) -C $(OSD) install diff --git a/net/mdnsresponder/Makefile b/net/mdnsresponder/Makefile new file mode 100644 index 0000000..3f6c926 --- /dev/null +++ b/net/mdnsresponder/Makefile @@ -0,0 +1,99 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mDNSResponder +PKG_VERSION:=214.3.2 +PKG_RELEASE:=1 +PKG_INSTALL:=1 +PKG_SOURCE:=mDNSResponder-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://opensource.apple.com/tarballs/mDNSResponder/ +PKG_MD5SUM:=05d39f40767ccece4b740c5afad14a23 + +PKG_BUILD_DIR:=$(BUILD_DIR)/mDNSResponder-$(PKG_VERSION) + +PKG_BUILD_PARALLEL:=0 + +include $(INCLUDE_DIR)/package.mk + +define Package/mdnsresponder + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + TITLE:=mDNSResponder + URL:=http://developer.apple.com/networking/bonjour/ +endef + +define Package/mdnsresponder/decription + Bonjour, also known as zero-configuration networking, enables + automatic discovery of computers, devices, and services on + IP networks. +endef + +define Build/Configure + $(call Build/Configure/Default) +endef + +# I have no idea why -lc is required, but without it, C library symbols are +# not found: +MAKE_FLAGS += \ + LINKOPTS=-lc \ + LDCONFIG= \ + ETCBASE="$(PKG_INSTALL_DIR)/etc" \ + INSTBASE="$(PKG_INSTALL_DIR)/usr" \ + NSSINSTPATH="$(PKG_INSTALL_DIR)/lib" \ + MANPATH="$(PKG_INSTALL_DIR)/usr/man" \ + STARTUPSCRIPTDIR="$(PKG_INSTALL_DIR)/etc/init.d" \ + RUNLEVELSCRIPTSDIR="$(PKG_INSTALL_DIR)/etc/rc.d" \ + os=linux-uclibc +MAKE_PATH = mDNSPosix + +define Build/Compile + $(call Build/Compile/Default) + # mDNSResponder's "make install" does not seem to create: + mkdir -p $(PKG_INSTALL_DIR)/lib/ + mkdir -p $(PKG_INSTALL_DIR)/usr/bin/ + mkdir -p $(PKG_INSTALL_DIR)/usr/sbin/ + mkdir -p $(PKG_INSTALL_DIR)/usr/lib/ + mkdir -p $(PKG_INSTALL_DIR)/usr/man/man5/ + mkdir -p $(PKG_INSTALL_DIR)/usr/man/man8/ + mkdir -p $(PKG_INSTALL_DIR)/usr/include/ + mkdir -p $(PKG_INSTALL_DIR)/etc/ + mkdir -p $(PKG_INSTALL_DIR)/etc/init.d/ + mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/ + mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc2.d/ + mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc3.d/ + mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc4.d/ + mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc5.d/ + mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc0.d/ + mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc6.d/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/ + $(CP) $(PKG_BUILD_DIR)/mDNSShared/dns_sd.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) \ + $(PKG_BUILD_DIR)/mDNSPosix/build/prod/*.so* \ + $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/sbin/ +endef + +define Package/mdnsresponder/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/mDNSResponder.init $(1)/etc/init.d/mDNSResponder + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdns_sd.so.1 $(1)/usr/lib/ + # Note: mDNSResponder's makefile creates the following link incorrectly: + ln -s libdns_sd.so.1 $(1)/usr/lib/libdns_sd.so + $(INSTALL_DIR) $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mdnsd $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSResponderPosix $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,mdnsresponder)) diff --git a/net/mdnsresponder/files/mDNSResponder.init b/net/mdnsresponder/files/mDNSResponder.init new file mode 100644 index 0000000..9702061 --- /dev/null +++ b/net/mdnsresponder/files/mDNSResponder.init @@ -0,0 +1,14 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009 OpenWrt.org + +START=60 + +start() { + /usr/sbin/mDNSResponderPosix -b -f /etc/mdns.conf + /usr/sbin/mdnsd +} + +stop() { + killall mDNSResponderPosix 2> /dev/null + killall mdnsd 2> /dev/null +} diff --git a/net/mdnsresponder/patches/001-cross_compile.patch b/net/mdnsresponder/patches/001-cross_compile.patch new file mode 100644 index 0000000..3903fee --- /dev/null +++ b/net/mdnsresponder/patches/001-cross_compile.patch @@ -0,0 +1,125 @@ +diff -u --recursive mDNSResponder-214.3.2-vanilla/Clients/Makefile mDNSResponder-214.3.2/Clients/Makefile +--- mDNSResponder-214.3.2-vanilla/Clients/Makefile 2010-10-15 08:38:44.817282399 -0500 ++++ mDNSResponder-214.3.2/Clients/Makefile 2010-10-15 08:40:09.696672081 -0500 +@@ -62,6 +62,8 @@ + + ############################################################################# + ++CC = @cc ++ + # On OS X the dns_sd library functions are included in libSystem, which is implicitly linked with every executable + # If /usr/lib/libSystem.dylib exists, then we're on OS X, so we don't need also to link the "dns_sd" shared library + ifneq "$(wildcard /usr/lib/libSystem.dylib)" "" +@@ -81,10 +83,10 @@ + mkdir build + + build/dns-sd: build dns-sd.c ClientCommon.c +- cc $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ ++ $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ + + build/dns-sd64: build dns-sd.c ClientCommon.c +- cc $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64 ++ $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64 + + # Note, we can make a 'fat' version of dns-sd using 'lipo', as shown below, but we + # don't, because we don't want or need a 'fat' version of dns-sd, because it will +diff -u --recursive mDNSResponder-214.3.2-vanilla/mDNSPosix/Makefile mDNSResponder-214.3.2/mDNSPosix/Makefile +--- mDNSResponder-214.3.2-vanilla/mDNSPosix/Makefile 2010-10-15 08:38:44.798283212 -0500 ++++ mDNSResponder-214.3.2/mDNSPosix/Makefile 2010-10-15 08:46:28.739548087 -0500 +@@ -316,10 +316,11 @@ + SHAREDDIR ?= ../mDNSShared + JDK = /usr/jdk + +-CC = @cc ++CC = @gcc + BISON = @bison + FLEX = @flex +-LD = ld -shared ++LD = @ld ++SOOPTS = -shared + CP = cp + RM = rm + LN = ln -s -f +@@ -344,7 +345,7 @@ + CFLAGS_DEBUG = -Os -DMDNS_DEBUGMSGS=0 + OBJDIR ?= objects/prod + BUILDDIR ?= build/prod +-STRIP = strip -S ++STRIP = @strip -S + endif + + # Configure per-OS peculiarities +@@ -353,7 +354,7 @@ + CFLAGS_OS = -DNOT_HAVE_DAEMON -DNOT_HAVE_SA_LEN -DNOT_HAVE_SOCKLEN_T -DNOT_HAVE_IF_NAMETOINDEX \ + -DLOG_PERROR=0 -D_XPG4_2 -D__EXTENSIONS__ -DHAVE_BROKEN_RECVIF_NAME -DTARGET_OS_SOLARIS + CC = gcc +-LD = gcc -shared ++LD = gcc + LINKOPTS = -lsocket -lnsl -lresolv + JAVACFLAGS_OS += -I$(JDK)/include/solaris + ifneq ($(DEBUG),1) +@@ -404,7 +405,8 @@ + CFLAGS_OS = -DHAVE_IPV6 -no-cpp-precomp -Werror -Wdeclaration-after-statement \ + -D__MAC_OS_X_VERSION_MIN_REQUIRED=__MAC_OS_X_VERSION_10_4 #-Wunreachable-code + CC = @gcc-4.0 +-LD = $(CC) -dynamiclib ++LD = $(CC) ++SOOPTS = -dynamiclib + LINKOPTS = -lSystem + LDSUFFIX = dylib + JDK = /System/Library/Frameworks/JavaVM.framework/Home +@@ -426,8 +428,9 @@ + NSSLINKNAME := $(NSSLIBNAME).so.2 + NSSINSTPATH := /lib + +-# If not otherwise defined, we install into /usr/lib and /usr/include ++# If not otherwise defined, we install into /usr/lib, /usr/include and /etc + # and our startup script is called mdns (e.g. /etc/init.d/mdns) ++ETCBASE?=/etc + INSTBASE?=/usr + STARTUPSCRIPTNAME?=mdns + +@@ -511,7 +514,7 @@ + CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o + + $(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS) +- @$(LD) $(LINKOPTS) -o $@ $+ ++ @$(LD) $(SOOPTS) $(LINKOPTS) -o $@ $+ + @$(STRIP) $@ + + Clients: setup libdns_sd ../Clients/build/dns-sd +@@ -546,7 +549,7 @@ + InstalledClients: $(INSTBASE)/bin/dns-sd + @echo $+ " installed" + +-InstalledNSS: $(NSSINSTPATH)/$(NSSLINKNAME) /etc/nss_mdns.conf $(MANPATH)/man5/nss_mdns.conf.5 $(MANPATH)/man8/libnss_mdns.8 ++InstalledNSS: $(NSSINSTPATH)/$(NSSLINKNAME) $(ETCBASE)/nss_mdns.conf $(MANPATH)/man5/nss_mdns.conf.5 $(MANPATH)/man8/libnss_mdns.8 + @echo $+ " installed" + + # Note: If daemon already installed, we make sure it's stopped before overwriting it +@@ -601,19 +604,21 @@ + + $(NSSINSTPATH)/$(NSSLINKNAME): $(NSSINSTPATH)/$(NSSLIBFILE) + $(LN) $< $@ +- ldconfig ++ifdef LDCONFIG ++ $(LDCONFIG) ++endif + + $(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE) + $(CP) $< $@ + chmod 444 $@ + +-/etc/nss_mdns.conf: nss_mdns.conf ++$(ETCBASE)/nss_mdns.conf: nss_mdns.conf + $(CP) $< $@ + chmod 444 $@ + # Check the nsswitch.conf file. + # If 'mdns' does not already appear on the "hosts:" line, then add it right before 'dns' +- cp -f /etc/nsswitch.conf /etc/nsswitch.conf.pre-mdns +- sed -e '/mdns/!s/^\(hosts:.*\)dns\(.*\)/\1mdns dns\2/' /etc/nsswitch.conf.pre-mdns > /etc/nsswitch.conf ++ -[ -f $(ETCBASE)/nsswitch.conf ] && cp -f $(ETCBASE)/nsswitch.conf $(ETCBASE)/nsswitch.conf.pre-mdns ++ -[ -f $(ETCBASE)/nsswitch.conf ] && sed -e '/mdns/!s/^\(hosts:.*\)dns\(.*\)/\1mdns dns\2/' $(ETCBASE)/nsswitch.conf.pre-mdns > $(ETCBASE)/nsswitch.conf + + ############################################################################# + diff --git a/net/mdnsresponder/patches/002-uclibc.patch b/net/mdnsresponder/patches/002-uclibc.patch new file mode 100644 index 0000000..bfb0289 --- /dev/null +++ b/net/mdnsresponder/patches/002-uclibc.patch @@ -0,0 +1,21 @@ +diff -u --recursive mDNSResponder-214.3.2-vanilla/mDNSPosix/Makefile mDNSResponder-214.3.2/mDNSPosix/Makefile +--- mDNSResponder-214.3.2-vanilla/mDNSPosix/Makefile 2010-10-15 08:38:44.798283212 -0500 ++++ mDNSResponder-214.3.2/mDNSPosix/Makefile 2010-10-15 08:48:27.334503432 -0500 +@@ -361,12 +361,16 @@ + endif + else + +-ifeq ($(os),linux) ++# Any variant containing linux: ++ifeq ($(findstring linux,$(os)),linux) + CFLAGS_OS = -DNOT_HAVE_SA_LEN -DUSES_NETLINK -DHAVE_LINUX -DTARGET_OS_LINUX + FLEXFLAGS_OS = -l + JAVACFLAGS_OS += -I$(JDK)/include/linux ++# uClibc does not provide NSS, do not compile nss_mdns: ++ifneq ($(os),linux-uclibc) + OPTIONALTARG = nss_mdns + OPTINSTALL = InstalledNSS ++endif + else + + ifeq ($(os),netbsd) diff --git a/net/memcached/Makefile b/net/memcached/Makefile new file mode 100644 index 0000000..617ede5 --- /dev/null +++ b/net/memcached/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2009-2010 Thomas Heil +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=memcached +PKG_VERSION:=1.2.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://memcached.googlecode.com/files +PKG_MD5SUM:=200d22f7ac2d114f74a6904552e9eb70 + +include $(INCLUDE_DIR)/package.mk + +define Package/memcached + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libevent + TITLE:=The high-performance, distributed memory object caching system + MAINTAINER:=Thomas Heil + URL:=http://memcached.org/ +endef + +define Package/memcached/description + Free and open source, high-performance, distributed memory object caching system +endef + +define Package/memcached/conffiles +/etc/config/memcached +endef + +ifeq ($(CONFIG_BIG_ENDIAN),y) +CONFIGURE_VARS += ac_cv_c_endian=big +else +CONFIGURE_VARS += ac_cv_c_endian=little +endif + +CONFIGURE_ARGS += \ + --disable-docs \ + --disable-dtrace \ + --disable-sasl + +define Package/memcached/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/memcached $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/memcached.config $(1)/etc/config/memcached + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/memcached.init $(1)/etc/init.d/memcached +endef + +$(eval $(call BuildPackage,memcached)) diff --git a/net/memcached/files/memcached.config b/net/memcached/files/memcached.config new file mode 100644 index 0000000..4071116 --- /dev/null +++ b/net/memcached/files/memcached.config @@ -0,0 +1,6 @@ +config memcached + option user 'nobody' + option maxconn '1024' + option listen '0.0.0.0' + option port '11211' + option memory '64' diff --git a/net/memcached/files/memcached.init b/net/memcached/files/memcached.init new file mode 100644 index 0000000..1ba27d6 --- /dev/null +++ b/net/memcached/files/memcached.init @@ -0,0 +1,24 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2010 OpenWrt.org +START=80 + +start_service () { + local section="$1" + config_get user "$section" user + config_get maxconn "$section" maxconn + config_get listen "$section" listen + config_get port "$section" port + config_get memory "$section" memory + + memcached_args="-d -u ${user:-nobody} -c ${maxconn:-1024} -l ${listen:-0.0.0.0} -p ${port:-11211} -U ${port:-11211} -m ${memory:-64}" + memcached $memcached_args >/dev/null 2>&1 +} + +start() { + config_load "memcached" + config_foreach start_service memcached +} + +stop() { + killall memcached +} diff --git a/net/memcached/patches/100-fix_iov_max.patch b/net/memcached/patches/100-fix_iov_max.patch new file mode 100644 index 0000000..086096e --- /dev/null +++ b/net/memcached/patches/100-fix_iov_max.patch @@ -0,0 +1,23 @@ +--- a/memcached.c ++++ b/memcached.c +@@ -15,6 +15,10 @@ + std * + * $Id$ + */ ++#ifndef __need_IOV_MAX ++#define __need_IOV_MAX ++#endif ++ + #include "memcached.h" + #include + #include +@@ -29,9 +33,6 @@ + #define _P1003_1B_VISIBLE + #endif + /* need this to get IOV_MAX on some platforms. */ +-#ifndef __need_IOV_MAX +-#define __need_IOV_MAX +-#endif + #include + #include + #include diff --git a/net/mercurial/Makefile b/net/mercurial/Makefile new file mode 100644 index 0000000..a94b758 --- /dev/null +++ b/net/mercurial/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mercurial +PKG_VERSION:=1.8.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://mercurial.selenic.com/release +PKG_MD5SUM:=b3dcc3de473e003dd1cc0500dcd9de47 + +PKG_BUILD_DEPENDS:=python-mini + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/mercurial + SECTION:=net + CATEGORY:=Network + DEPENDS:=+python + TITLE:=Mercurial Source Control Management (SCM) system + URL:=http://mercurial.selenic.com/ + SUBMENU:=Version Control Systems +endef + +define Package/mercurial/description + A fast, lightweight Source Control Management system designed for efficient + handling of very large distributed projects. +endef + +define Build/Compile + $(call Build/Compile/PyMod,, \ + install --prefix="$(PKG_INSTALL_DIR)", \ + ) +endef + +define Package/mercurial/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/bin $(1)/usr/ + $(CP) $(PKG_INSTALL_DIR)/lib $(1)/usr/ +endef + +$(eval $(call BuildPackage,mercurial)) diff --git a/net/mercurial/patches/001-no_bzip2.patch b/net/mercurial/patches/001-no_bzip2.patch new file mode 100644 index 0000000..d43acca --- /dev/null +++ b/net/mercurial/patches/001-no_bzip2.patch @@ -0,0 +1,183 @@ +--- a/mercurial/archival.py ++++ b/mercurial/archival.py +@@ -37,7 +37,6 @@ def tidyprefix(dest, kind, prefix): + + exts = { + 'tar': ['.tar'], +- 'tbz2': ['.tbz2', '.tar.bz2'], + 'tgz': ['.tgz', '.tar.gz'], + 'zip': ['.zip'], + } +@@ -51,7 +50,7 @@ def guesskind(dest): + + class tarit(object): + '''write archive to tar file or stream. can write uncompressed, +- or compress with gzip or bzip2.''' ++ or compress with gzip.''' + + class GzipFileWithTime(gzip.GzipFile): + +@@ -205,7 +204,6 @@ class fileit(object): + archivers = { + 'files': fileit, + 'tar': tarit, +- 'tbz2': lambda name, mtime: tarit(name, mtime, 'bz2'), + 'tgz': lambda name, mtime: tarit(name, mtime, 'gz'), + 'uzip': lambda name, mtime: zipit(name, mtime, False), + 'zip': zipit, +--- a/mercurial/bundlerepo.py ++++ b/mercurial/bundlerepo.py +@@ -307,7 +307,7 @@ def getremotechanges(ui, repo, other, re + cg = other.changegroup(incoming, "incoming") + else: + cg = other.changegroupsubset(incoming, revs, 'incoming') +- bundletype = other.local() and "HG10BZ" or "HG10UN" ++ bundletype = other.local() and "HG10GZ" or "HG10UN" + fname = bundle = changegroup.writebundle(cg, bundlename, bundletype) + # keep written bundle? + if bundlename: +--- a/mercurial/changegroup.py ++++ b/mercurial/changegroup.py +@@ -7,7 +7,7 @@ + + from i18n import _ + import util +-import struct, os, bz2, zlib, tempfile ++import struct, os, zlib, tempfile + + def readexactly(stream, n): + '''read n bytes from stream.read and abort if less was available''' +@@ -45,7 +45,6 @@ class nocompress(object): + bundletypes = { + "": ("", nocompress), + "HG10UN": ("HG10UN", nocompress), +- "HG10BZ": ("HG10", lambda: bz2.BZ2Compressor()), + "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()), + } + +@@ -59,14 +58,13 @@ def collector(cl, mmfs, files): + return collect + + # hgweb uses this list to communicate its preferred type +-bundlepriority = ['HG10GZ', 'HG10BZ', 'HG10UN'] ++bundlepriority = ['HG10GZ', 'HG10UN'] + + def writebundle(cg, filename, bundletype): + """Write a bundle file and return its filename. + + Existing files will not be overwritten. + If no filename is specified, a temporary file is created. +- bz2 compression can be turned off. + The bundle file will be deleted in case of errors. + """ + +@@ -124,12 +122,6 @@ def decompressor(fh, alg): + zd = zlib.decompressobj() + for chunk in f: + yield zd.decompress(chunk) +- elif alg == 'BZ': +- def generator(f): +- zd = bz2.BZ2Decompressor() +- zd.decompress("BZ") +- for chunk in util.filechunkiter(f, 4096): +- yield zd.decompress(chunk) + else: + raise util.Abort("unknown bundle compression '%s'" % alg) + return util.chunkbuffer(generator(fh)) +--- a/mercurial/hgweb/hgwebdir_mod.py ++++ b/mercurial/hgweb/hgwebdir_mod.py +@@ -204,7 +204,7 @@ class hgwebdir(object): + def archivelist(ui, nodeid, url): + allowed = ui.configlist("web", "allow_archive", untrusted=True) + archives = [] +- for i in [('zip', '.zip'), ('gz', '.tar.gz'), ('bz2', '.tar.bz2')]: ++ for i in [('zip', '.zip'), ('gz', '.tar.gz')]: + if i[0] in allowed or ui.configbool("web", "allow" + i[0], + untrusted=True): + archives.append({"type" : i[0], "extension": i[1], +--- a/mercurial/hgweb/hgweb_mod.py ++++ b/mercurial/hgweb/hgweb_mod.py +@@ -40,7 +40,7 @@ class hgweb(object): + self.mtime = -1 + self.size = -1 + self.reponame = name +- self.archives = 'zip', 'gz', 'bz2' ++ self.archives = 'zip', 'gz' + self.stripecount = 1 + # a repo owner may set web.templates in .hg/hgrc to get any file + # readable by the user running the CGI script +@@ -284,7 +284,6 @@ class hgweb(object): + yield {"type" : i, "extension" : spec[2], "node" : nodeid} + + archive_specs = { +- 'bz2': ('application/x-bzip2', 'tbz2', '.tar.bz2', None), + 'gz': ('application/x-gzip', 'tgz', '.tar.gz', None), + 'zip': ('application/zip', 'zip', '.zip', None), + } +--- a/mercurial/repair.py ++++ b/mercurial/repair.py +@@ -19,7 +19,7 @@ def _bundle(repo, bases, heads, node, su + os.mkdir(backupdir) + name = os.path.join(backupdir, "%s-%s.hg" % (short(node), suffix)) + if compress: +- bundletype = "HG10BZ" ++ bundletype = "HG10GZ" + else: + bundletype = "HG10UN" + return changegroup.writebundle(cg, name, bundletype) +--- a/mercurial/commands.py ++++ b/mercurial/commands.py +@@ -162,7 +162,6 @@ def archive(ui, repo, dest, **opts): + + :``files``: a directory full of files (default) + :``tar``: tar archive, uncompressed +- :``tbz2``: tar archive, compressed using bzip2 + :``tgz``: tar archive, compressed using gzip + :``uzip``: zip archive, uncompressed + :``zip``: zip archive, compressed using deflate +@@ -644,8 +643,8 @@ def bundle(ui, repo, fname, dest=None, * + -a/--all (or --base null). + + You can change compression method with the -t/--type option. +- The available compression methods are: none, bzip2, and +- gzip (by default, bundles are compressed using bzip2). ++ The available compression methods are: none, and ++ gzip (by default, bundles are compressed using gzip). + + The bundle file can then be transferred using conventional means + and applied to another repository with the unbundle or pull +@@ -712,8 +711,8 @@ def bundle(ui, repo, fname, dest=None, * + else: + cg = repo.changegroup(o, 'bundle') + +- bundletype = opts.get('type', 'bzip2').lower() +- btypes = {'none': 'HG10UN', 'bzip2': 'HG10BZ', 'gzip': 'HG10GZ'} ++ bundletype = opts.get('type', 'gzip').lower() ++ btypes = {'none': 'HG10UN', 'gzip': 'HG10GZ'} + bundletype = btypes.get(bundletype) + if bundletype not in changegroup.bundletypes: + raise util.Abort(_('unknown bundle type specified with --type')) +@@ -4316,7 +4315,7 @@ table = { + _('a base changeset assumed to be available at the destination'), + _('REV')), + ('a', 'all', None, _('bundle all changesets in the repository')), +- ('t', 'type', 'bzip2', ++ ('t', 'type', 'gzip', + _('bundle compression type to use'), _('TYPE')), + ] + remoteopts, + _('[-f] [-t TYPE] [-a] [-r REV]... [--base REV]... FILE [DEST]')), +--- a/setup.py ++++ b/setup.py +@@ -36,12 +36,6 @@ except: + raise SystemExit( + "Couldn't import standard zlib (incomplete Python install).") + +-try: +- import bz2 +-except: +- raise SystemExit( +- "Couldn't import standard bz2 (incomplete Python install).") +- + import os, subprocess, time + import shutil + import tempfile diff --git a/net/mgen/Makefile b/net/mgen/Makefile new file mode 100644 index 0000000..38a7961 --- /dev/null +++ b/net/mgen/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mgen +PKG_VERSION:=5.01b +PKG_RELEASE:=1 + +PKG_SOURCE:=src-$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://downloads.pf.itd.nrl.navy.mil/mgen/ +PKG_MD5SUM:=1e467131446d649c8a0aebdcd8e5f2a9 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/mgen + TITLE:=Multi-Generator + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpthread +uclibcxx + URL:=http://cs.itd.nrl.navy.mil/work/mgen/ +endef + +define Package/mgen/Description + The Multi-Generator (MGEN) is open source software developed by + the Naval Research Laboratory (NRL) PROTocol Engineering Advanced + Networking (PROTEAN) Research Group. MGEN provides the ability to + perform IP network performance tests and measurements using UDP/IP + traffic (TCP is currently being developed). +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/unix \ + CC="$(TARGET_CXX)" \ + CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++ -fno-builtin -fno-rtti -nostdinc++" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + SYSTEM_LIBS="-ldl -lpthread -luClibc++" \ + -f Makefile.linux mgen +endef + +define Package/mgen/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/unix/mgen $(1)/usr/bin/mgen +endef + +$(eval $(call BuildPackage,mgen)) diff --git a/net/mgen/patches/100-ipv6.patch b/net/mgen/patches/100-ipv6.patch new file mode 100644 index 0000000..4878a96 --- /dev/null +++ b/net/mgen/patches/100-ipv6.patch @@ -0,0 +1,24 @@ +diff -urN mgen.old/protolib/unix/Makefile.linux mgen/protolib/unix/Makefile.linux +--- mgen.old/protolib/unix/Makefile.linux 2008-03-07 22:23:06.000000000 +0100 ++++ mgen/protolib/unix/Makefile.linux 2009-06-06 20:40:29.000000000 +0200 +@@ -39,7 +39,7 @@ + # (We export these for other Makefiles as needed) + # + +-SYSTEM_HAVES = -DLINUX -DHAVE_IPV6 -DHAVE_GETLOGIN -D_FILE_OFFSET_BITS=64 -DHAVE_LOCKF \ ++SYSTEM_HAVES = -DLINUX -DHAVE_GETLOGIN -D_FILE_OFFSET_BITS=64 -DHAVE_LOCKF \ + -DHAVE_OLD_SIGNALHANDLER -DHAVE_DIRFD -DHAVE_ASSERT -DNO_SCM_RIGHTS -DHAVE_SCHED + + # (TBD) Move ProtoRouteMgr to ProtokitEx ?? +diff -urN mgen.old/unix/Makefile.linux mgen/unix/Makefile.linux +--- mgen.old/unix/Makefile.linux 2007-06-22 21:16:20.000000000 +0200 ++++ mgen/unix/Makefile.linux 2009-06-06 20:40:10.000000000 +0200 +@@ -35,7 +35,7 @@ + # (We export these for other Makefiles as needed) + # + +-SYSTEM_HAVES = -DLINUX -DHAVE_PSELECT -DHAVE_SCHED -DHAVE_IPV6 -DHAVE_GETLOGIN -DHAVE_LOCKF -DHAVE_DIRFD \ ++SYSTEM_HAVES = -DLINUX -DHAVE_PSELECT -DHAVE_SCHED -DHAVE_GETLOGIN -DHAVE_LOCKF -DHAVE_DIRFD \ + -DHAVE_ASSERT $(NETSEC) + + SYSTEM = linux diff --git a/net/miau/Makefile b/net/miau/Makefile new file mode 100644 index 0000000..0ed0756 --- /dev/null +++ b/net/miau/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=miau +PKG_VERSION:=0.6.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/miau +PKG_MD5SUM:=8778b8564c679cf5487b1972ca0b35e4 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/miau + SUBMENU:=Instant Messaging + SECTION:=net + CATEGORY:=Network + TITLE:=Another IRC-bouncer/proxy + URL:=http://miau.sourceforge.net/ +endef + +define Package/miau/description + In short, miau is an IRC-bouncer/proxy. + Being more verbose, miau is small but quite featured + IRC-bouncer - a service bit like HTTP-proxy, but + for IRC-networks. +endef + +define Package/miau/conffiles +/etc/miau/miaurc +endef + +CONFIGURE_ARGS += \ + --enable-automode \ + --enable-releasenick \ + --enable-uptime \ + --enable-privlog \ + --enable-onconnect + +define Package/miau/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_DIR) $(1)/etc/miau + $(INSTALL_BIN) ./files/miau.init $(1)/etc/init.d/miau + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/doc/miau/examples/miaurc $(1)/etc/miau/ +endef + +$(eval $(call BuildPackage,miau)) diff --git a/net/miau/files/miau.init b/net/miau/files/miau.init new file mode 100644 index 0000000..4a71877 --- /dev/null +++ b/net/miau/files/miau.init @@ -0,0 +1,28 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2011 OpenWrt.org +START=50 + +OPTIONS="-d /etc/miau/" +LOG_DIR="/var/log/miau" +ERR_LOG="$LOG_DIR/error.log" +OUT_LOG="$LOG_DIR/miau.log" + +start() { + [ -f /var/run/miau.pid ] && { + echo "[ERROR] miau is running" + exit 0 + } + [ -d $LOG_DIR ] || mkdir -p $LOG_DIR + /usr/bin/miau -f $OPTIONS > $OUT_LOG 2> $ERR_LOG & + PID=$! + sleep 1 + if [ -d /proc/$PID ]; then + echo $PID > /var/run/miau.pid + else + echo "[ERROR] Unable to run miau as a daemon" + fi +} + +stop() { + [ -f /var/run/miau.pid ] && kill $(cat /var/run/miau.pid) >/dev/null 2>&1 && rm /var/run/miau.pid +} diff --git a/net/miax/Makefile b/net/miax/Makefile new file mode 100644 index 0000000..85194f4 --- /dev/null +++ b/net/miax/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=miax +PKG_VERSION:=1.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/miax +PKG_MD5SUM:=44f0d2ef46ee2697d890b7b96846adc7 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/miax + SECTION:=net + CATEGORY:=Network + SUBMENU:=Telephony + DEPENDS:=+libpthread +bluez-libs + TITLE:=A console iax (asterisk) client + URL:=http://www.eja.it/?l=en&n=miax +endef + +define Package/miax/description + miax is a console iax (asterisk) client, it can work with + a soundcard as a normal voip phone, taking input/output from + keyboard, analog/gsm/isdn modem or bluetooth phones. +endef + +define Build/Compile + $(MAKE) -C "$(PKG_BUILD_DIR)" \ + CC="$(TARGET_CC)" \ + OFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + all +endef + +define Package/miax/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/miax $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,miax)) diff --git a/net/miax/patches/001-cross.patch b/net/miax/patches/001-cross.patch new file mode 100644 index 0000000..f47c110 --- /dev/null +++ b/net/miax/patches/001-cross.patch @@ -0,0 +1,24 @@ +diff -ruN miax-1.4-old/Makefile miax-1.4-new/Makefile +--- miax-1.4-old/Makefile 2005-04-27 18:56:13.000000000 +0200 ++++ miax-1.4-new/Makefile 2005-11-30 01:07:21.000000000 +0100 +@@ -1,4 +1,5 @@ +-CFLAGS= -Iiax/ -Igsm/inc -DIAXC_IAX2 -DLIBIAX -g -DPOSIXSLEEP -DLINUX -O2 ++OFLAGS= -02 -g ++CFLAGS= -Iiax/ -Igsm/inc $(CPPFLAGS) -DIAXC_IAX2 -DLIBIAX -DPOSIXSLEEP -DLINUX $(OFLAGS) + SYSLIBS=-lpthread -lm -lbluetooth + + +@@ -32,11 +33,10 @@ + miax.o + + all: $(OBJS) +- gcc $(OBJS) $(CFLAGS) $(SYSLIBS) -o miax +- cp miax /bin/miax ++ $(CC) $(OBJS) $(CFLAGS) $(LDFLAGS) $(SYSLIBS) -o miax + + static: $(OBJS) bluetooth.o +- gcc $(OBJS) $(CFLAGS) $(SYSLIBS) -static -o miax ++ $(CC) $(OBJS) $(CFLAGS) $(LDFLAGS) $(SYSLIBS) -static -o miax + + clean: + rm -f $(OBJS) miax diff --git a/net/mii-tool/Makefile b/net/mii-tool/Makefile new file mode 100644 index 0000000..ca63fb3 --- /dev/null +++ b/net/mii-tool/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mii-tool +PKG_VERSION:=1.9.1.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources +PKG_MD5SUM:=f65dbeb1c2392acffd4c94138b1f2e52 + +include $(INCLUDE_DIR)/package.mk + +define Package/mii-tool + SECTION:=net + CATEGORY:=Network + TITLE:=configure media type using MII commands + URL:=http://freshmeat.net/projects/mii-tool/ +endef + +define Package/mii-tool/description + The mii-tool command allows you to set or autodetect the media type + or mii chipset-based ethernet devices. It traditionally had been + distributed in the net-tools package. This is a single distribution + optimized for embedded systems and fully automated cross/-sysroot-builds +endef + +MAKE_FLAGS += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -I. -idirafter ./include/" + +define Package/mii-tool/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/mii-tool $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,mii-tool)) diff --git a/net/mii-tool/patches/001-include_linux_sockios.patch b/net/mii-tool/patches/001-include_linux_sockios.patch new file mode 100644 index 0000000..3f11bf8 --- /dev/null +++ b/net/mii-tool/patches/001-include_linux_sockios.patch @@ -0,0 +1,12 @@ +Index: mii-tool-1.9.1.1/mii-tool.c +=================================================================== +--- mii-tool-1.9.1.1.orig/mii-tool.c ++++ mii-tool-1.9.1.1/mii-tool.c +@@ -50,6 +50,7 @@ static char version[] = + #include + #include + #endif ++#include + #include "mii.h" + + #define MAX_ETH 8 /* Maximum # of interfaces */ diff --git a/net/mini_httpd/Makefile b/net/mini_httpd/Makefile new file mode 100644 index 0000000..669d9b7 --- /dev/null +++ b/net/mini_httpd/Makefile @@ -0,0 +1,189 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mini-httpd +PKG_VERSION:=1.19 +PKG_RELEASE:=1 + +PKG_SOURCE:=mini_httpd-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.acme.com/software/mini_httpd/ +PKG_MD5SUM:=792a529dfe974355aad8ba6c80e54e7a + +PKG_BUILD_DIR:=$(BUILD_DIR)/mini_httpd-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/mini-httpd/Default + SUBMENU:=Web Servers/Proxies + SECTION:=net + CATEGORY:=Network + TITLE:=A small web server + URL:=http://www.acme.com/software/mini_httpd/ +endef + +define Package/mini-httpd/Default/conffiles +/etc/mini_httpd.conf +/etc/default/mini_httpd +endef + +define Package/mini-httpd/Default/description + mini_httpd is a small HTTP server. Its performance is not great, but for + low or medium traffic sites it's quite adequate. It implements all the + basic features of an HTTP server, including: + - GET, HEAD, and POST methods + - CGI + - Basic authentication + - Security against ".." filename snooping + - The common MIME types + - Trailing-slash redirection + - index.html, index.htm, index.cgi + - Directory listings + - Multihoming / virtual hosting + - Standard logging + - Custom error pages + It can also be configured to do IPv6. +endef + +define Package/mini-httpd +$(call Package/mini-httpd/Default) +endef + +define Package/mini-httpd/conffiles +$(call Package/mini-httpd/Default/conffiles) +endef + +define Package/mini-httpd/description +$(call Package/mini-httpd/Default/description) +endef + +define Package/mini-httpd-matrixssl +$(call Package/mini-httpd/Default) + DEPENDS:= +libmatrixssl + TITLE+= (built with MatrixSSL) +endef + +define Package/mini-httpd-matrixssl/conffiles +$(call Package/mini-httpd/Default/conffiles) +/etc/mini_httpd.pem +endef + +define Package/mini-httpd-matrixssl/description +$(call Package/mini-httpd/Default/description) + This package is built with SSL/HTTPS using MatrixSSL. +endef + +define Package/mini-httpd-openssl +$(call Package/mini-httpd/Default) + DEPENDS:= +libopenssl + TITLE+= (built with OpenSSL) +endef + +define Package/mini-httpd-openssl/conffiles +$(call Package/mini-httpd/Default/conffiles) +/etc/mini_httpd.pem +endef + +define Package/mini-httpd-openssl/description +$(call Package/mini-httpd/Default/description) + This package is built with SSL/HTTPS using OpenSSL. +endef + +define Package/mini-httpd-htpasswd + $(call Package/mini-httpd/Default) + TITLE:=Utility to generate HTTP access files +endef + +define Package/mini-httpd-htpasswd/description +$(call Package/mini-httpd/Default/description) + This package generates .htaccess/.htpasswd files to use HTTP access authentication. +endef + + +define Build/Template + +$(STAMP_BUILT)-$(2): $(STAMP_PREPARED) + -$(MAKE) -C $(PKG_BUILD_DIR) clean + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + OFLAGS="$(TARGET_CFLAGS)" \ + $(3) \ + all + ( cd $(PKG_BUILD_DIR); mv -f mini_httpd mini_httpd-$(2) ) + touch $$@ + +$(STAMP_BUILT): $(STAMP_BUILT)-$(2) + +define Package/$(1)/install + $(INSTALL_DIR) $$(1)/etc +ifeq ($(2),without-ssl) + $(INSTALL_DATA) ./files/mini_httpd.conf $$(1)/etc/mini_httpd.conf +else + $(INSTALL_DATA) ./files/mini_httpd-ssl.conf $$(1)/etc/mini_httpd.conf + $(INSTALL_CONF) ./files/mini_httpd.pem $$(1)/etc/mini_httpd.pem +endif + $(INSTALL_DIR) $$(1)/etc/default + $(INSTALL_DATA) ./files/mini_httpd.default $$(1)/etc/default/mini_httpd + $(INSTALL_DIR) $$(1)/etc/init.d + $(INSTALL_BIN) ./files/mini_httpd.init $$(1)/etc/init.d/mini_httpd + $(INSTALL_DIR) $$(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mini_httpd-$(2) $$(1)/usr/sbin/mini_httpd +endef + +endef + + +define Build/Prepare +$(call Build/Prepare/Default) + $(CP) ./files/matrixssl_helper.{c,h} $(PKG_BUILD_DIR)/ +endef + +define Build/Configure +endef + +define Build/Compile +endef + +# always build without SSL because we might need htpassd +define Build/without-ssl + $(call Build/Template,mini-httpd,without-ssl,) +endef +$(eval $(Build/without-ssl)) + +ifneq ($(SDK)$(CONFIG_PACKAGE_mini-httpd-matrixssl),) + define Build/with-matrixssl + $(call Build/Template,mini-httpd-matrixssl,with-matrixssl, \ + SSL_DEFS="-DUSE_SSL -DHAVE_MATRIXSSL" \ + SSL_INC="$(TARGET_CPPFLAGS)" \ + SSL_LIBS="$(TARGET_LDFLAGS) -lmatrixssl" \ + SSL_OBJS="matrixssl_helper.o" \ + ) + endef +endif +$(eval $(Build/with-matrixssl)) + +ifneq ($(SDK)$(CONFIG_PACKAGE_mini-httpd-openssl),) + define Build/with-openssl + $(call Build/Template,mini-httpd-openssl,with-openssl, \ + SSL_DEFS="-DUSE_SSL -DHAVE_OPENSSL" \ + SSL_INC="$(TARGET_CPPFLAGS)" \ + SSL_LIBS="$(TARGET_LDFLAGS) -lcrypto -lssl" \ + ) + endef +endif +$(eval $(Build/with-openssl)) + +define Package/mini-httpd-htpasswd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/htpasswd $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,mini-httpd)) +$(eval $(call BuildPackage,mini-httpd-matrixssl)) +$(eval $(call BuildPackage,mini-httpd-openssl)) +$(eval $(call BuildPackage,mini-httpd-htpasswd)) diff --git a/net/mini_httpd/files/matrixssl_helper.c b/net/mini_httpd/files/matrixssl_helper.c new file mode 100644 index 0000000..e3fe334 --- /dev/null +++ b/net/mini_httpd/files/matrixssl_helper.c @@ -0,0 +1,455 @@ +/* + * MatrixSSL helper functions + * + * Copyright (C) 2005 Nicolas Thill + * + * 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. + * + * Portions borrowed from MatrixSSL example code + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "matrixssl_helper.h" + +#define SSL_SOCKET_EOF 0x0001 +#define SSL_SOCKET_CLOSE_NOTIFY 0x0002 + +#define min(a, b) ( (a) < (b) ) ? (a) : (b) + +static int _ssl_read(SSL *ssl, char *buf, int len); +static int _ssl_write(SSL *ssl, char *buf, int len); +static void _ssl_setSocketBlock(int fd); +static void _ssl_setSocketNonblock(int fd); +static void _ssl_closeSocket(int fd); + + +SSL * SSL_new(sslKeys_t *keys) +{ + SSL * ssl; + ssl = (SSL *)malloc(sizeof(SSL)); + + if (!ssl) return 0; + + ssl->keys = keys; + if ( matrixSslNewSession(&(ssl->ssl), ssl->keys, NULL, SSL_FLAGS_SERVER) < 0 ) { + } + + ssl->insock.size = 1024; + ssl->insock.buf = ssl->insock.start = ssl->insock.end = + (unsigned char *)malloc(ssl->insock.size); + + ssl->outsock.size = 1024; + ssl->outsock.buf = ssl->outsock.start = ssl->outsock.end = + (unsigned char *)malloc(ssl->outsock.size); + + ssl->inbuf.size = 0; + ssl->inbuf.buf = ssl->inbuf.start = ssl->inbuf.end = NULL; + + return ssl; +} + + +int SSL_accept(SSL *ssl) { + + unsigned char buf[1024]; + int status, rc; + +readMore: + rc = _ssl_read(ssl, buf, sizeof(buf)); + if (rc == 0) { + if (ssl->status == SSL_SOCKET_EOF || ssl->status == SSL_SOCKET_CLOSE_NOTIFY) { + SSL_free(ssl); + return -1; + } + if (matrixSslHandshakeIsComplete(ssl->ssl) == 0) { + goto readMore; + } + } else if (rc > 0) { + return 0; + } else { + SSL_free(ssl); + return -1; + } + + return 1; +} + + +void SSL_set_fd(SSL *ssl, int fd) { + ssl->fd = fd; +} + + +int SSL_read(SSL *ssl, char *buf, int len) { + int rc; +readMore: + rc = _ssl_read(ssl, buf, len); + if (rc <= 0) { + if (rc < 0 || ssl->status == SSL_SOCKET_EOF || ssl->status == SSL_SOCKET_CLOSE_NOTIFY) { + _ssl_closeSocket(ssl->fd); + return rc; + } + goto readMore; + } + return rc; +} + + +int SSL_write(SSL *ssl, char *buf, int len) { + int rc; +writeMore: + rc = _ssl_write(ssl, buf, len); + if (rc <= 0) { + if (rc < 0) { + return rc; + } + goto writeMore; + } + return rc; +} + + +void SSL_free(SSL * ssl) +{ + matrixSslDeleteSession(ssl->ssl); + if (ssl->insock.buf) { + free(ssl->insock.buf); + } + if (ssl->outsock.buf) { + free(ssl->outsock.buf); + } + if (ssl->inbuf.buf) { + free(ssl->inbuf.buf); + } + free(ssl); +} + + + +static void _ssl_setSocketBlock(int fd) +{ + fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_NONBLOCK); + fcntl(fd, F_SETFD, FD_CLOEXEC); +} + + +static void _ssl_setSocketNonblock(int fd) +{ + fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK); +} + + +static void _ssl_closeSocket(int fd) +{ + char buf[32]; + + if (fd != -1) { + _ssl_setSocketNonblock(fd); + if (shutdown(fd, 1) >= 0) { + while (recv(fd, buf, sizeof(buf), 0) > 0); + } + close(fd); + } +} + + +static int _ssl_read(SSL *ssl, char *buf, int len) +{ + int bytes, rc, remaining; + unsigned char error, alertLevel, alertDescription, performRead; + + ssl->status = 0; + + if (ssl->ssl == NULL || len <= 0) { + return -1; + } +/* + If inbuf is valid, then we have previously decoded data that must be + returned, return as much as possible. Once all buffered data is + returned, free the inbuf. +*/ + if (ssl->inbuf.buf) { + if (ssl->inbuf.start < ssl->inbuf.end) { + remaining = (int)(ssl->inbuf.end - ssl->inbuf.start); + bytes = (int)min(len, remaining); + memcpy(buf, ssl->inbuf.start, bytes); + ssl->inbuf.start += bytes; + return bytes; + } + free(ssl->inbuf.buf); + ssl->inbuf.buf = NULL; + } +/* + Pack the buffered socket data (if any) so that start is at zero. +*/ + if (ssl->insock.buf < ssl->insock.start) { + if (ssl->insock.start == ssl->insock.end) { + ssl->insock.start = ssl->insock.end = ssl->insock.buf; + } else { + memmove(ssl->insock.buf, ssl->insock.start, ssl->insock.end - ssl->insock.start); + ssl->insock.end -= (ssl->insock.start - ssl->insock.buf); + ssl->insock.start = ssl->insock.buf; + } + } +/* + Read up to as many bytes as there are remaining in the buffer. We could + Have encrypted data already cached in conn->insock, but might as well read more + if we can. +*/ + performRead = 0; +readMore: + if (ssl->insock.end == ssl->insock.start || performRead) { + performRead = 1; + bytes = recv(ssl->fd, (char *)ssl->insock.end, + (int)((ssl->insock.buf + ssl->insock.size) - ssl->insock.end), MSG_NOSIGNAL); + if (bytes == -1) { + ssl->status = errno; + return -1; + } + if (bytes == 0) { + ssl->status = SSL_SOCKET_EOF; + return 0; + } + ssl->insock.end += bytes; + } +/* + Define a temporary sslBuf +*/ + ssl->inbuf.start = ssl->inbuf.end = ssl->inbuf.buf = (unsigned char *)malloc(len); + ssl->inbuf.size = len; +/* + Decode the data we just read from the socket +*/ +decodeMore: + error = 0; + alertLevel = 0; + alertDescription = 0; + + rc = matrixSslDecode(ssl->ssl, &ssl->insock, &ssl->inbuf, &error, &alertLevel, + &alertDescription); + switch (rc) { +/* + Successfully decoded a record that did not return data or require a response. +*/ + case SSL_SUCCESS: + return 0; +/* + Successfully decoded an application data record, and placed in tmp buf +*/ + case SSL_PROCESS_DATA: +/* + Copy as much as we can from the temp buffer into the caller's buffer + and leave the remainder in conn->inbuf until the next call to read + It is possible that len > data in buffer if the encoded record + was longer than len, but the decoded record isn't! +*/ + rc = (int)(ssl->inbuf.end - ssl->inbuf.start); + rc = min(rc, len); + memcpy(buf, ssl->inbuf.start, rc); + ssl->inbuf.start += rc; + return rc; +/* + We've decoded a record that requires a response into tmp + If there is no data to be flushed in the out buffer, we can write out + the contents of the tmp buffer. Otherwise, we need to append the data + to the outgoing data buffer and flush it out. +*/ + case SSL_SEND_RESPONSE: + bytes = send(ssl->fd, (char *)ssl->inbuf.start, + (int)(ssl->inbuf.end - ssl->inbuf.start), MSG_NOSIGNAL); + if (bytes == -1) { + ssl->status = errno; + if (ssl->status != EAGAIN) { + goto readError; + } + ssl->status = 0; + } + ssl->inbuf.start += bytes; + if (ssl->inbuf.start < ssl->inbuf.end) { +/* + This must be a non-blocking socket since it didn't all get sent + out and there was no error. We want to finish the send here + simply because we are likely in the SSL handshake. +*/ + _ssl_setSocketBlock(ssl->fd); + bytes = send(ssl->fd, (char *)ssl->inbuf.start, + (int)(ssl->inbuf.end - ssl->inbuf.start), MSG_NOSIGNAL); + if (bytes == -1) { + ssl->status = errno; + goto readError; + } + ssl->inbuf.start += bytes; +/* + Can safely set back to non-blocking because we wouldn't + have got here if this socket wasn't non-blocking to begin with. +*/ + _ssl_setSocketNonblock(ssl->fd); + } + ssl->inbuf.start = ssl->inbuf.end = ssl->inbuf.buf; + return 0; +/* + There was an error decoding the data, or encoding the out buffer. + There may be a response data in the out buffer, so try to send. + We try a single hail-mary send of the data, and then close the socket. + Since we're closing on error, we don't worry too much about a clean flush. +*/ + case SSL_ERROR: + if (ssl->inbuf.start < ssl->inbuf.end) { + _ssl_setSocketNonblock(ssl->fd); + bytes = send(ssl->fd, (char *)ssl->inbuf.start, + (int)(ssl->inbuf.end - ssl->inbuf.start), MSG_NOSIGNAL); + } + goto readError; +/* + We've decoded an alert. The level and description passed into + matrixSslDecode are filled in with the specifics. +*/ + case SSL_ALERT: + if (alertDescription == SSL_ALERT_CLOSE_NOTIFY) { + ssl->status = SSL_SOCKET_CLOSE_NOTIFY; + goto readZero; + } + goto readError; +/* + We have a partial record, we need to read more data off the socket. + If we have a completely full conn->insock buffer, we'll need to grow it + here so that we CAN read more data when called the next time. +*/ + case SSL_PARTIAL: + if (ssl->insock.start == ssl->insock.buf && ssl->insock.end == + (ssl->insock.buf + ssl->insock.size)) { + if (ssl->insock.size > SSL_MAX_BUF_SIZE) { + goto readError; + } + ssl->insock.size *= 2; + ssl->insock.start = ssl->insock.buf = + (unsigned char *)realloc(ssl->insock.buf, ssl->insock.size); + ssl->insock.end = ssl->insock.buf + (ssl->insock.size / 2); + } + if (!performRead) { + performRead = 1; + free(ssl->inbuf.buf); + ssl->inbuf.buf = NULL; + goto readMore; + } else { + goto readZero; + } +/* + The out buffer is too small to fit the decoded or response + data. Increase the size of the buffer and call decode again +*/ + case SSL_FULL: + ssl->inbuf.size *= 2; + if (ssl->inbuf.buf != (unsigned char*)buf) { + free(ssl->inbuf.buf); + ssl->inbuf.buf = NULL; + } + ssl->inbuf.start = ssl->inbuf.end = ssl->inbuf.buf = + (unsigned char *)malloc(ssl->inbuf.size); + goto decodeMore; + } +/* + We consolidated some of the returns here because we must ensure + that conn->inbuf is cleared if pointing at caller's buffer, otherwise + it will be freed later on. +*/ +readZero: + if (ssl->inbuf.buf == (unsigned char*)buf) { + ssl->inbuf.buf = NULL; + } + return 0; +readError: + if (ssl->inbuf.buf == (unsigned char*)buf) { + ssl->inbuf.buf = NULL; + } + return -1; +} + + +int _ssl_write(SSL *ssl, char *buf, int len) +{ + int rc; + + ssl->status = 0; +/* + Pack the buffered socket data (if any) so that start is at zero. +*/ + if (ssl->outsock.buf < ssl->outsock.start) { + if (ssl->outsock.start == ssl->outsock.end) { + ssl->outsock.start = ssl->outsock.end = ssl->outsock.buf; + } else { + memmove(ssl->outsock.buf, ssl->outsock.start, ssl->outsock.end - ssl->outsock.start); + ssl->outsock.end -= (ssl->outsock.start - ssl->outsock.buf); + ssl->outsock.start = ssl->outsock.buf; + } + } +/* + If there is buffered output data, the caller must be trying to + send the same amount of data as last time. We don't support + sending additional data until the original buffered request has + been completely sent. +*/ + if (ssl->outBufferCount > 0 && len != ssl->outBufferCount) { + return -1; + } +/* + If we don't have buffered data, encode the caller's data +*/ + if (ssl->outBufferCount == 0) { +retryEncode: + rc = matrixSslEncode(ssl->ssl, (unsigned char *)buf, len, &ssl->outsock); + switch (rc) { + case SSL_ERROR: + return -1; + case SSL_FULL: + if (ssl->outsock.size > SSL_MAX_BUF_SIZE) { + return -1; + } + ssl->outsock.size *= 2; + ssl->outsock.buf = + (unsigned char *)realloc(ssl->outsock.buf, ssl->outsock.size); + ssl->outsock.end = ssl->outsock.buf + (ssl->outsock.end - ssl->outsock.start); + ssl->outsock.start = ssl->outsock.buf; + goto retryEncode; + } + } +/* + We've got data to send. +*/ + rc = send(ssl->fd, (char *)ssl->outsock.start, + (int)(ssl->outsock.end - ssl->outsock.start), MSG_NOSIGNAL); + if (rc == -1) { + ssl->status = errno; + return -1; + } + ssl->outsock.start += rc; +/* + If we wrote it all return the length, otherwise remember the number of + bytes passed in, and return 0 to be called again later. +*/ + if (ssl->outsock.start == ssl->outsock.end) { + ssl->outBufferCount = 0; + return len; + } + ssl->outBufferCount = len; + return 0; +} + diff --git a/net/mini_httpd/files/matrixssl_helper.h b/net/mini_httpd/files/matrixssl_helper.h new file mode 100644 index 0000000..e5854df --- /dev/null +++ b/net/mini_httpd/files/matrixssl_helper.h @@ -0,0 +1,39 @@ +/* + * MatrixSSL helper functions + * + * Copyright (C) 2005 Nicolas Thill + * + * 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. + */ + +#ifndef __MATRIXSSL_HELPER_H__ +#define __MATRIXSSL_HELPER_H__ + +#include + +typedef struct __SSL { + int fd; + ssl_t *ssl; + sslKeys_t *keys; + sslBuf_t insock, outsock, inbuf; + int outBufferCount; + int partial; + int status; +} SSL; + +SSL * SSL_new(sslKeys_t *keys); +void SSL_set_fd(SSL *ssl, int fd); +int SSL_accept(SSL *ssl); +int SSL_read(SSL *ssl, char *b, int len); +int SSL_write(SSL *ssl, char *buf, int len); +void SSL_free(SSL *ssl); + +#endif /* __MATRIXSSL_HELPER_H__ */ diff --git a/net/mini_httpd/files/mini_httpd-ssl.conf b/net/mini_httpd/files/mini_httpd-ssl.conf new file mode 100644 index 0000000..1cd7022 --- /dev/null +++ b/net/mini_httpd/files/mini_httpd-ssl.conf @@ -0,0 +1,7 @@ +cgipat=cgi-bin/**|**.sh +dir=/www +nochroot +pidfile=/var/run/mini_httpd.pid +user=root +ssl +certfile=/etc/mini_httpd.pem diff --git a/net/mini_httpd/files/mini_httpd.conf b/net/mini_httpd/files/mini_httpd.conf new file mode 100644 index 0000000..d636a43 --- /dev/null +++ b/net/mini_httpd/files/mini_httpd.conf @@ -0,0 +1,5 @@ +cgipat=cgi-bin/**|**.sh +dir=/www +nochroot +pidfile=/var/run/mini_httpd.pid +user=root diff --git a/net/mini_httpd/files/mini_httpd.default b/net/mini_httpd/files/mini_httpd.default new file mode 100644 index 0000000..85b229e --- /dev/null +++ b/net/mini_httpd/files/mini_httpd.default @@ -0,0 +1 @@ +OPTIONS="-C /etc/mini_httpd.conf" diff --git a/net/mini_httpd/files/mini_httpd.init b/net/mini_httpd/files/mini_httpd.init new file mode 100644 index 0000000..4e0a3a7 --- /dev/null +++ b/net/mini_httpd/files/mini_httpd.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=mini_httpd +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid +[ -f $DEFAULT ] && . $DEFAULT + +start() { + [ -d $RUN_D ] || mkdir -p $RUN_D + $BIN $OPTIONS 2>/dev/null +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} diff --git a/net/mini_httpd/files/mini_httpd.pem b/net/mini_httpd/files/mini_httpd.pem new file mode 100644 index 0000000..8a1241a --- /dev/null +++ b/net/mini_httpd/files/mini_httpd.pem @@ -0,0 +1,29 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXgIBAAKBgQC5rFJOQakwMmF9aoVnAXaQLOOPoYOEk19/ls9VZt1ZqfzQuTbG +GGrgMIDclB0kHMFvSbzeiVjMnrSdQTNe1gOQAGtHhHiqugrLqH9m3wqOerbf/Yir +hic9U6X9RaWC6BzNgcYU1QtPn1sDtbMNFAB6jzF3W76EIlHEobgMtfqtxwIDAQAB +AoGBAKJst9eToyDxgc1ICQlSA1kem7eDUF0C2xDvadLI2KxegzZIQD1NEPmsFJ5h +x5hWu3TSabG3LwJZd6D1b63vxE6QRMhcDG3idb7kXzhOOZyfnlnrBtJ3VJC/UH5H +O1pMMBxcu2fXrua+h7BW0gMoZhchvsArDoWaZPjNUNHiNRYBAkEA3Ngnge7njqlf +/UlLkQHHfxgorQ78GjOzrrUvz86pFtW8RKCjAv55HIqAhWrSgxWF4yXkPO2XOHC9 +KTeVKccjAQJBANc63r3M3yP817cPzyo/8BJQD9nAzmolrsBf1YMxML20UmEbObax +QdmxoYu/a8tOD4gT6EZDkauJU0yS69HGeMcCQQCvRmbkuuXQ1iC29+sfpVfeSSBP +aaswaIRdTrQprA2LcAtCNHPsNmeM/WfPe96j5vsiMrqYmMECLIgVJGYgiEoBAkEA +kzg1e+ZTC667bwBlWCT79crFzNDRYFH+QqBKz74p9NkPMFULGSgOPvX95jU9aocu +oInda5J0Zb09OTeWDpuPqQJAUIeY36WUst7NaW40mZXkMjjR2QtWi7P4cmv7nLp0 +WdPQzkUW1Bv4sSUQ7svQqpmZPaFiyhXL1VSa1M5MPd3tbA== +-----END RSA PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICOTCCAaKgAwIBAgIJANRuTbnzy8ObMA0GCSqGSIb3DQEBBAUAMFMxCzAJBgNV +BAYTAkZSMQ4wDAYDVQQIEwVQYXJpczEOMAwGA1UEBxMFUGFyaXMxEDAOBgNVBAoT +B015IEhvbWUxEjAQBgNVBAMTCU15IFJvdXRlcjAeFw0wNTAxMTQwMjQzMjdaFw0w +NjAxMTQwMjQzMjdaMFMxCzAJBgNVBAYTAkZSMQ4wDAYDVQQIEwVQYXJpczEOMAwG +A1UEBxMFUGFyaXMxEDAOBgNVBAoTB015IEhvbWUxEjAQBgNVBAMTCU15IFJvdXRl +cjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuaxSTkGpMDJhfWqFZwF2kCzj +j6GDhJNff5bPVWbdWan80Lk2xhhq4DCA3JQdJBzBb0m83olYzJ60nUEzXtYDkABr +R4R4qroKy6h/Zt8Kjnq23/2Iq4YnPVOl/UWlgugczYHGFNULT59bA7WzDRQAeo8x +d1u+hCJRxKG4DLX6rccCAwEAAaMVMBMwEQYJYIZIAYb4QgEBBAQDAgZAMA0GCSqG +SIb3DQEBBAUAA4GBAErI3QmcZVzjxKcoPTO3z8cRJV87SVFp0qbIjbYCBDUWB1QY +/bMkQPr2zJyfJmUYLEs4iKgHrmlaUCMHy9NZKOg9ZxrW42BtQ5QnOtDm3UifwzJW +oCFC3uPWfTYsZn/FrUXlErds+xXXT63VJzBe6DdXwHcdcdxzl05oIyL9JIzI +-----END CERTIFICATE----- diff --git a/net/mini_httpd/patches/001-cgi_path.patch b/net/mini_httpd/patches/001-cgi_path.patch new file mode 100644 index 0000000..c847d94 --- /dev/null +++ b/net/mini_httpd/patches/001-cgi_path.patch @@ -0,0 +1,16 @@ +diff -ruN mini_httpd-1.19-old/mini_httpd.c mini_httpd-1.19-new/mini_httpd.c +--- mini_httpd-1.19-old/mini_httpd.c 2005-10-19 01:11:24.000000000 +0200 ++++ mini_httpd-1.19-new/mini_httpd.c 2005-10-19 01:13:05.000000000 +0200 +@@ -138,10 +138,10 @@ + #define CGI_NICE 10 + #endif /* CGI_NICE */ + #ifndef CGI_PATH +-#define CGI_PATH "/usr/local/bin:/usr/ucb:/bin:/usr/bin" ++#define CGI_PATH "/usr/bin:/bin:/usr/sbin:/sbin" + #endif /* CGI_PATH */ + #ifndef CGI_LD_LIBRARY_PATH +-#define CGI_LD_LIBRARY_PATH "/usr/local/lib:/usr/lib" ++#define CGI_LD_LIBRARY_PATH "/usr/lib:/lib" + #endif /* CGI_LD_LIBRARY_PATH */ + #ifndef AUTH_FILE + #define AUTH_FILE ".htpasswd" diff --git a/net/mini_httpd/patches/500-matrixssl.patch b/net/mini_httpd/patches/500-matrixssl.patch new file mode 100644 index 0000000..0ab8d68 --- /dev/null +++ b/net/mini_httpd/patches/500-matrixssl.patch @@ -0,0 +1,161 @@ +diff -ruN mini_httpd-1.19-orig/Makefile mini_httpd-1.19-3/Makefile +--- mini_httpd-1.19-orig/Makefile 2002-11-02 00:02:57.000000000 +0100 ++++ mini_httpd-1.19-3/Makefile 2005-03-09 08:52:21.000000000 +0100 +@@ -14,17 +14,30 @@ + # http://www.openssl.org/ Make sure the SSL_TREE definition points to the + # tree with your OpenSSL installation - depending on how you installed it, + # it may be in /usr/local instead of /usr/local/ssl. ++ ++# OpenSSL + #SSL_TREE = /usr/local/ssl + #SSL_DEFS = -DUSE_SSL + #SSL_INC = -I${SSL_TREE}/include + #SSL_LIBS = -L${SSL_TREE}/lib -lssl -lcrypto ++#SSL_OBJS = ++ ++# MatrixSSL ++#SSL_TREE = ++#SSL_DEFS = -DUSE_SSL -DHAVE_MATRIXSSL ++#SSL_INC = ++#SSL_LIBS = -lmatrixssl ++#SSL_OBJS = matrixssl_helper.o + + +-BINDIR = /usr/local/sbin +-MANDIR = /usr/local/man ++DESTDIR = ++ ++BINDIR = $(DESTDIR)/usr/sbin ++MANDIR = $(DESTDIR)/usr/share/man + CC = gcc + CDEFS = ${SSL_DEFS} ${SSL_INC} +-CFLAGS = -O ${CDEFS} ++OFLAGS = -O ++CFLAGS = ${OFLAGS} ${CDEFS} + #CFLAGS = -g ${CDEFS} +-LDFLAGS = -s ++LDFLAGS = + #LDFLAGS = -g +@@ -32,12 +45,15 @@ + + all: mini_httpd htpasswd + +-mini_httpd: mini_httpd.o match.o tdate_parse.o +- ${CC} ${CFLAGS} ${LDFLAGS} mini_httpd.o match.o tdate_parse.o ${LDLIBS} -o mini_httpd ++mini_httpd: mini_httpd.o match.o tdate_parse.o ${SSL_OBJS} ++ ${CC} ${CFLAGS} ${LDFLAGS} mini_httpd.o match.o tdate_parse.o ${SSL_OBJS} ${LDLIBS} -o mini_httpd + + mini_httpd.o: mini_httpd.c version.h port.h match.h tdate_parse.h mime_encodings.h mime_types.h + ${CC} ${CFLAGS} -c mini_httpd.c + ++matrixssl_helper.o: matrixssl_helper.c ++ ${CC} ${CFLAGS} -c matrixssl_helper.c ++ + match.o: match.c match.h + ${CC} ${CFLAGS} -c match.c + +@@ -71,16 +87,18 @@ + chmod 600 mini_httpd.pem + + +-install: all +- rm -f ${BINDIR}/mini_httpd ${BINDIR}/htpasswd ++install: all uninstall + -mkdir -p ${BINDIR} + cp mini_httpd htpasswd ${BINDIR} +- rm -f ${MANDIR}/man8/mini_httpd.8 ${MANDIR}/man1/htpasswd.1 + -mkdir -p ${MANDIR}/man8 + cp mini_httpd.8 ${MANDIR}/man8 + -mkdir -p ${MANDIR}/man1 + cp htpasswd.1 ${MANDIR}/man1 + ++uninstall: ++ rm -f ${BINDIR}/mini_httpd ${BINDIR}/htpasswd ++ rm -f ${MANDIR}/man8/mini_httpd.8 ${MANDIR}/man1/htpasswd.1 ++ + clean: + rm -f mini_httpd mime_encodings.h mime_types.h htpasswd mini_httpd.rnd *.o core core.* *.core + +diff -ruN mini_httpd-1.19-orig/mini_httpd.c mini_httpd-1.19-3/mini_httpd.c +--- mini_httpd-1.19-orig/mini_httpd.c 2003-12-03 19:27:22.000000000 +0100 ++++ mini_httpd-1.19-3/mini_httpd.c 2005-03-09 08:46:28.000000000 +0100 +@@ -66,8 +66,14 @@ + #endif /* HAVE_SENDFILE */ + + #ifdef USE_SSL ++# ifdef HAVE_OPENSSL + #include + #include ++# else /* HAVE_OPENSSL */ ++# ifdef HAVE_MATRIXSSL ++# include "matrixssl_helper.h" ++# endif /* HAVE_MATRIXSSL */ ++# endif /* HAVE_OPENSSL */ + #endif /* USE_SSL */ + + extern char* crypt( const char* key, const char* setting ); +@@ -193,7 +199,13 @@ + static int do_ssl; + static char* certfile; + static char* cipher; ++#ifdef HAVE_OPENSSL + static SSL_CTX* ssl_ctx; ++#else /* HAVE_OPENSSL */ ++ #ifdef HAVE_MATRIXSSL ++static sslKeys_t* keys; ++ #endif /* HAVE_MATRIXSSL */ ++#endif /* HAVE_OPENSSL */ + #endif /* USE_SSL */ + static char cwd[MAXPATHLEN]; + static int got_hup; +@@ -540,6 +552,7 @@ + #ifdef USE_SSL + if ( do_ssl ) + { ++# ifdef HAVE_OPENSSL + SSL_load_error_strings(); + SSLeay_add_ssl_algorithms(); + ssl_ctx = SSL_CTX_new( SSLv23_server_method() ); +@@ -559,6 +572,17 @@ + exit( 1 ); + } + } ++# else /* HAVE_OPENSSL */ ++# ifdef HAVE_MATRIXSSL ++ matrixSslOpen(); ++ if ( matrixSslReadKeys( &keys, certfile, certfile, NULL, NULL ) < 0 ) ++ { ++ syslog( LOG_CRIT, "can't load certificate and/or private key\n"); ++ (void) fprintf( stderr, "%s: can't load certificate and/or private key\n", argv0 ); ++ exit( 1 ); ++ } ++# endif /* HAVE_MATRIXSSL */ ++# endif /* HAVE_OPENSSL */ + } + #endif /* USE_SSL */ + +@@ -1174,6 +1198,7 @@ + #ifdef USE_SSL + if ( do_ssl ) + { ++# ifdef HAVE_OPENSSL + ssl = SSL_new( ssl_ctx ); + SSL_set_fd( ssl, conn_fd ); + if ( SSL_accept( ssl ) == 0 ) +@@ -1181,6 +1206,16 @@ + ERR_print_errors_fp( stderr ); + exit( 1 ); + } ++# else /* HAVE_OPENSSL */ ++# ifdef HAVE_MATRIXSSL ++ ssl = SSL_new(keys); ++ SSL_set_fd( ssl, conn_fd ); ++ if ( SSL_accept( ssl ) <= 0 ) ++ { ++ perror( "SSL_accept" ); ++ } ++# endif /* HAVE_MATRIXSSL */ ++# endif /* HAVE_OPENSSL */ + } + #endif /* USE_SSL */ + diff --git a/net/mini_snmpd/Makefile b/net/mini_snmpd/Makefile new file mode 100644 index 0000000..ecc2717 --- /dev/null +++ b/net/mini_snmpd/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2009-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mini_snmpd +PKG_VERSION:=1.2b +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://members.aon.at/linuxfreak/linux/ +PKG_MD5SUM:=9e432c50ba8216d7fab0983b11b7112a + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME) +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/mini-snmpd/Default + TITLE:=SNMP server for embedded systems + URL:=http://members.aon.at/linuxfreak/linux/mini_snmpd.html +endef + +define Package/mini-snmpd +$(call Package/mini-snmpd/Default) + SECTION:=net + CATEGORY:=Network + TITLE+= Mini Snmpd +endef + +PKG_OFLAGS:=$(TARGET_CFLAGS) -DSYSLOG + +ifeq ($(CONFIG_IPV6),y) + PKG_OFLAGS+= -D__IPV6__ +else + PKG_OFLAGS+= -D__IPV4__ +endif + +MAKE_FLAGS+= \ + OFLAGS="$(PKG_OFLAGS)" \ + STRIP="/bin/true" \ + INSTALL_ROOT="$(PKG_INSTALL_DIR)" + +define Build/Compile + $(call Build/Compile/Default,mini_snmpd) +endef + +define Package/mini-snmpd/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/sbin/mini_snmpd $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/mini_snmpd.config $(1)/etc/config/mini_snmpd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/mini_snmpd.init $(1)/etc/init.d/mini_snmpd +endef + +Package/mini-snmpd6/install=$(Package/mini-snmpd/install) + +$(eval $(call BuildPackage,mini-snmpd)) diff --git a/net/mini_snmpd/files/mini_snmpd.config b/net/mini_snmpd/files/mini_snmpd.config new file mode 100644 index 0000000..43ab931 --- /dev/null +++ b/net/mini_snmpd/files/mini_snmpd.config @@ -0,0 +1,8 @@ +config mini_snmpd + option enabled 1 + option ipv6 0 + option community public + option location '' + option contact '' + option disks '/tmp,/jffs' + option interfaces 'lo,br-lan,eth0.1,eth1' # Max 4 diff --git a/net/mini_snmpd/files/mini_snmpd.init b/net/mini_snmpd/files/mini_snmpd.init new file mode 100644 index 0000000..cc051c0 --- /dev/null +++ b/net/mini_snmpd/files/mini_snmpd.init @@ -0,0 +1,41 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009 OpenWrt.org + +NAME=mini_snmpd +PROG=/usr/bin/$NAME +START=50 + +append_string() { + local section="$1" + local option="$2" + local value="$3" + local _val + config_get _val "$section" "$option" + [ -n "$_val" ] && append args "$3 $_val" +} + +mini_snmpd_config() { + local cfg="$1" + args="" + + append_string "$cfg" community "-c" + append_string "$cfg" location "-L" + append_string "$cfg" contact "-C" + append_string "$cfg" disks "-d" + append_string "$cfg" interfaces "-i" + + config_get_bool ipv6 "$cfg" "ipv6" '0' + [ "$ipv6" -gt 0 ] && append args "-6" + + config_get_bool enabled "$cfg" "enabled" '1' + [ "$enabled" -gt 0 ] && $PROG $args & +} + +start() { + config_load mini_snmpd + config_foreach mini_snmpd_config mini_snmpd +} + +stop() { + killall mini_snmpd +} diff --git a/net/mini_snmpd/patches/100-dualstack.patch b/net/mini_snmpd/patches/100-dualstack.patch new file mode 100644 index 0000000..a83236a --- /dev/null +++ b/net/mini_snmpd/patches/100-dualstack.patch @@ -0,0 +1,159 @@ +--- a/globals.c ++++ b/globals.c +@@ -31,6 +31,8 @@ + const struct in_addr inaddr_any = { INADDR_ANY }; + #endif + ++int g_family = AF_INET; ++ + in_port_t g_udp_port = 161; + in_port_t g_tcp_port = 161; + int g_timeout = 100; +--- a/mini_snmpd.c ++++ b/mini_snmpd.c +@@ -54,6 +54,10 @@ static void print_help(void) + fprintf(stderr, "-d, --disks nnn set the disks to monitor (/)\n"); + fprintf(stderr, "-i, --interfaces nnn set the network interfaces to monitor (lo)\n"); + fprintf(stderr, "-I, --listen nnn set the network interface to listen (all)\n"); ++#ifdef __IPV6__ ++ fprintf(stderr, "-4, --ipv4 use IPv4 (default)\n"); ++ fprintf(stderr, "-6, --ipv6 use IPv6\n"); ++#endif + fprintf(stderr, "-t, --timeout nnn set the timeout for MIB updates (1 second)\n"); + fprintf(stderr, "-a, --auth require authentication (thus SNMP version 2c)\n"); + fprintf(stderr, "-v, --verbose verbose syslog messages \n"); +@@ -117,7 +121,7 @@ static void handle_udp_client(void) + #endif + + /* Call the protocol handler which will prepare the response packet */ +- inet_ntop(my_af_inet, &sockaddr.my_sin_addr, straddr, sizeof(straddr)); ++ inet_ntop(g_family, &sockaddr.my_sin_addr, straddr, sizeof(straddr)); + if (snmp(&g_udp_client) == -1) { + lprintf(LOG_WARNING, "could not handle packet from UDP client %s:%d: %m\n", + straddr, sockaddr.my_sin_port); +@@ -132,7 +136,7 @@ static void handle_udp_client(void) + /* Send the whole UDP packet to the socket at once */ + rv = sendto(g_udp_sockfd, g_udp_client.packet, g_udp_client.size, + MSG_DONTWAIT, (struct sockaddr *)&sockaddr, socklen); +- inet_ntop(my_af_inet, &sockaddr.my_sin_addr, straddr, sizeof(straddr)); ++ inet_ntop(g_family, &sockaddr.my_sin_addr, straddr, sizeof(straddr)); + if (rv == -1) { + lprintf(LOG_WARNING, "could not send packet to UDP client %s:%d: %m\n", + straddr, sockaddr.my_sin_port); +@@ -176,7 +180,7 @@ static void handle_tcp_connect(void) + } + tmp_sockaddr.my_sin_addr = client->addr; + tmp_sockaddr.my_sin_port = client->port; +- inet_ntop(my_af_inet, &tmp_sockaddr.my_sin_addr, straddr, sizeof(straddr)); ++ inet_ntop(g_family, &tmp_sockaddr.my_sin_addr, straddr, sizeof(straddr)); + lprintf(LOG_WARNING, "maximum number of %d clients reached, kicking out %s:%d\n", + MAX_NR_CLIENTS, straddr, tmp_sockaddr.my_sin_port); + close(client->sockfd); +@@ -190,7 +194,7 @@ static void handle_tcp_connect(void) + } + + /* Now fill out the client control structure values */ +- inet_ntop(my_af_inet, &sockaddr.my_sin_addr, straddr, sizeof(straddr)); ++ inet_ntop(g_family, &sockaddr.my_sin_addr, straddr, sizeof(straddr)); + lprintf(LOG_DEBUG, "connected TCP client %s:%d\n", + straddr, sockaddr.my_sin_port); + client->timestamp = time(NULL); +@@ -211,7 +215,7 @@ static void handle_tcp_client_write(clie + sockaddr.my_sin_addr = client->addr; + sockaddr.my_sin_port = client->port; + rv = send(client->sockfd, client->packet, client->size, 0); +- inet_ntop(my_af_inet, &sockaddr.my_sin_addr, straddr, sizeof(straddr)); ++ inet_ntop(g_family, &sockaddr.my_sin_addr, straddr, sizeof(straddr)); + if (rv == -1) { + lprintf(LOG_WARNING, "could not send packet to TCP client %s:%d: %m\n", + straddr, sockaddr.my_sin_port); +@@ -246,7 +250,7 @@ static void handle_tcp_client_read(clien + sockaddr.my_sin_port = client->port; + rv = read(client->sockfd, client->packet + client->size, + sizeof (client->packet) - client->size); +- inet_ntop(my_af_inet, &sockaddr.my_sin_addr, straddr, sizeof(straddr)); ++ inet_ntop(g_family, &sockaddr.my_sin_addr, straddr, sizeof(straddr)); + if (rv == -1) { + lprintf(LOG_WARNING, "could not read packet from TCP client %s:%d: %m\n", + straddr, sockaddr.my_sin_port); +@@ -304,7 +308,11 @@ static void handle_tcp_client_read(clien + + int main(int argc, char *argv[]) + { ++#ifdef __IPV6__ ++ static const char short_options[] = "p:P:c:D:V:L:C:d:i:I:t:T:avl46h"; ++#else + static const char short_options[] = "p:P:c:D:V:L:C:d:i:I:t:T:avlh"; ++#endif + static const struct option long_options[] = { + { "udp-port", 1, 0, 'p' }, + { "tcp-port", 1, 0, 'P' }, +@@ -316,6 +324,10 @@ int main(int argc, char *argv[]) + { "disks", 1, 0, 'd' }, + { "interfaces", 1, 0, 'i' }, + { "listen", 1, 0, 'I' }, ++#ifdef __IPV6__ ++ { "ipv4", 0, 0, '4' }, ++ { "ipv6", 0, 0, '6' }, ++#endif + { "timeout", 1, 0, 't' }, + { "traps", 1, 0, 'T' }, + { "auth", 0, 0, 'a' }, +@@ -396,6 +408,14 @@ int main(int argc, char *argv[]) + case 'v': + g_verbose = 1; + break; ++#ifdef __IPV6__ ++ case '4': ++ g_family = AF_INET; ++ break; ++ case '6': ++ g_family = AF_INET6; ++ break; ++#endif + case 'l': + print_version(); + exit(EXIT_ARGS); +@@ -435,12 +455,12 @@ int main(int argc, char *argv[]) + #endif + + /* Open the server's UDP port and prepare it for listening */ +- g_udp_sockfd = socket(my_pf_inet, SOCK_DGRAM, 0); ++ g_udp_sockfd = socket((g_family == AF_INET) ? PF_INET : PF_INET6, SOCK_DGRAM, 0); + if (g_udp_sockfd == -1) { + lprintf(LOG_ERR, "could not create UDP socket: %m\n"); + exit(EXIT_SYSCALL); + } +- sockaddr.my_sin_family = my_af_inet; ++ sockaddr.my_sin_family = g_family; + sockaddr.my_sin_port = htons(g_udp_port); + sockaddr.my_sin_addr = my_inaddr_any; + socklen = sizeof (sockaddr); +@@ -457,7 +477,7 @@ int main(int argc, char *argv[]) + } + + /* Open the server's TCP port and prepare it for listening */ +- g_tcp_sockfd = socket(my_pf_inet, SOCK_STREAM, 0); ++ g_tcp_sockfd = socket((g_family == AF_INET) ? PF_INET : PF_INET6, SOCK_STREAM, 0); + if (g_tcp_sockfd == -1) { + lprintf(LOG_ERR, "could not create TCP socket: %m\n"); + exit(EXIT_SYSCALL); +@@ -474,7 +494,7 @@ int main(int argc, char *argv[]) + lprintf(LOG_WARNING, "could not set SO_REUSEADDR on TCP socket: %m\n"); + exit(EXIT_SYSCALL); + } +- sockaddr.my_sin_family = my_af_inet; ++ sockaddr.my_sin_family = g_family; + sockaddr.my_sin_port = htons(g_tcp_port); + sockaddr.my_sin_addr = my_inaddr_any; + socklen = sizeof (sockaddr); +--- a/mini_snmpd.h ++++ b/mini_snmpd.h +@@ -255,6 +255,7 @@ typedef struct demoinfo_s { + + extern in_port_t g_udp_port; + extern in_port_t g_tcp_port; ++extern int g_family; + extern int g_timeout; + extern int g_auth; + extern int g_verbose; diff --git a/net/mini_snmpd/patches/101-opt_flags.patch b/net/mini_snmpd/patches/101-opt_flags.patch new file mode 100644 index 0000000..70dbce5 --- /dev/null +++ b/net/mini_snmpd/patches/101-opt_flags.patch @@ -0,0 +1,14 @@ +--- a/Makefile ++++ b/Makefile +@@ -32,9 +32,9 @@ HEADERS = mini_snmpd.h + SOURCES = mini_snmpd.c protocol.c mib.c globals.c utils.c linux.c freebsd.c + VERSION = 1.2b + VENDOR = .1.3.6.1.4.1 +-OFLAGS = -O2 -DDEBUG -g ++OFLAGS = -O2 + CFLAGS = -Wall -Werror -DVERSION="\"$(VERSION)\"" -DVENDOR="\"$(VENDOR)\"" \ +- $(OFLAGS) -D__TRAPS__ -D__LINUX__ -D__IPV6__ ++ $(OFLAGS) -D__TRAPS__ -D__LINUX__ + LDFLAGS = $(OFLAGS) + TARGET = mini_snmpd + MAN = mini_snmpd.8 diff --git a/net/mini_snmpd/patches/102-mib_fix_uninitialized_memory.patch b/net/mini_snmpd/patches/102-mib_fix_uninitialized_memory.patch new file mode 100644 index 0000000..fc8cecf --- /dev/null +++ b/net/mini_snmpd/patches/102-mib_fix_uninitialized_memory.patch @@ -0,0 +1,34 @@ +--- a/mib.c ++++ b/mib.c +@@ -290,6 +290,7 @@ static int mib_build_entry(const oid_t * + value->data.max_length = sizeof (int) + 2; + value->data.encoded_length = 0; + value->data.buffer = malloc(value->data.max_length); ++ memset(value->data.buffer, 0, value->data.max_length); + if (encode_snmp_element_integer(value, (int)default_value) == -1) { + return -1; + } +@@ -298,6 +299,7 @@ static int mib_build_entry(const oid_t * + value->data.max_length = strlen((const char *)default_value) + 4; + value->data.encoded_length = 0; + value->data.buffer = malloc(value->data.max_length); ++ memset(value->data.buffer, 0, value->data.max_length); + if (encode_snmp_element_string(value, (const char *)default_value) == -1) { + return -1; + } +@@ -306,6 +308,7 @@ static int mib_build_entry(const oid_t * + value->data.max_length = MAX_NR_SUBIDS * 5 + 4; + value->data.encoded_length = 0; + value->data.buffer = malloc(value->data.max_length); ++ memset(value->data.buffer, 0, value->data.max_length); + if (encode_snmp_element_oid(value, oid_aton((const char *)default_value)) == -1) { + return -1; + } +@@ -316,6 +319,7 @@ static int mib_build_entry(const oid_t * + value->data.max_length = sizeof (unsigned int) + 2; + value->data.encoded_length = 0; + value->data.buffer = malloc(value->data.max_length); ++ memset(value->data.buffer, 0, value->data.max_length); + if (encode_snmp_element_unsigned(value, type, (unsigned int)default_value) == -1) { + return -1; + } diff --git a/net/mini_snmpd/patches/103-mib_encode_snmp_element_oid_fix.patch b/net/mini_snmpd/patches/103-mib_encode_snmp_element_oid_fix.patch new file mode 100644 index 0000000..a1f105c --- /dev/null +++ b/net/mini_snmpd/patches/103-mib_encode_snmp_element_oid_fix.patch @@ -0,0 +1,21 @@ +--- a/mib.c ++++ b/mib.c +@@ -120,6 +120,9 @@ static int encode_snmp_element_oid(value + int length; + int i; + ++ if (oid_value == NULL) { ++ return -1; ++ } + buffer = value->data.buffer; + length = 1; + for (i = 2; i < oid_value->subid_list_length; i++) { +@@ -310,6 +313,8 @@ static int mib_build_entry(const oid_t * + value->data.buffer = malloc(value->data.max_length); + memset(value->data.buffer, 0, value->data.max_length); + if (encode_snmp_element_oid(value, oid_aton((const char *)default_value)) == -1) { ++ lprintf(LOG_ERR, "could not create MIB entry '%s.%d.%d': invalid oid '%s'\n", ++ oid_ntoa(prefix), column, row, (char *)default_value); + return -1; + } + break; diff --git a/net/miniupnpc/Makefile b/net/miniupnpc/Makefile new file mode 100644 index 0000000..9cf00e8 --- /dev/null +++ b/net/miniupnpc/Makefile @@ -0,0 +1,72 @@ +# +# Copyright (C) 2010-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=miniupnpc +PKG_VERSION:=1.5 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://miniupnp.free.fr/files +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=0efa7498d27c82a56a0300b0c05c4f58 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/miniupnpc/Default + TITLE:=Lightweight UPnP + URL:=http://miniupnp.tuxfamily.org/ +endef + +define Package/miniupnpc + $(call Package/miniupnpc/Default) + SECTION:=net + CATEGORY:=Network + SUBMENU:=Firewall + TITLE+= client + DEPENDS:=+libminiupnpc +endef + +define Package/libminiupnpc + $(call Package/miniupnpc/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE+= library +endef + +TARGET_CFLAGS += $(FPIC) + +MAKE_FLAGS += \ + PREFIX="$(PKG_INSTALL_DIR)" + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/miniupnpc + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/miniupnpc/*.h \ + $(1)/usr/include/miniupnpc/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \ + $(1)/usr/lib/ +endef + +define Package/miniupnpc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upnpc $(1)/usr/bin/ +endef + +define Package/libminiupnpc/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/lib/libminiupnpc.so.* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,miniupnpc)) +$(eval $(call BuildPackage,libminiupnpc)) diff --git a/net/miniupnpc/patches/100-no_minixml_test.patch b/net/miniupnpc/patches/100-no_minixml_test.patch new file mode 100644 index 0000000..e549ef0 --- /dev/null +++ b/net/miniupnpc/patches/100-no_minixml_test.patch @@ -0,0 +1,13 @@ +--- a/Makefile ++++ b/Makefile +@@ -107,8 +107,8 @@ installpythonmodule: pythonmodule + python setup.py install + + validateminixml: minixmlvalid +- @echo "minixml validation test" +- ./minixmlvalid ++ @echo "(skipping) minixml validation test" ++# ./minixmlvalid + touch $@ + + clean: diff --git a/net/miniupnpc/patches/200-miniupnpc_desc.patch b/net/miniupnpc/patches/200-miniupnpc_desc.patch new file mode 100644 index 0000000..9a38847 --- /dev/null +++ b/net/miniupnpc/patches/200-miniupnpc_desc.patch @@ -0,0 +1,11 @@ +--- a/upnpcommands.c ++++ b/upnpcommands.c +@@ -351,7 +351,7 @@ UPNP_AddPortMapping(const char * control + AddPortMappingArgs[5].elt = "NewEnabled"; + AddPortMappingArgs[5].val = "1"; + AddPortMappingArgs[6].elt = "NewPortMappingDescription"; +- AddPortMappingArgs[6].val = desc?desc:"libminiupnpc"; ++ AddPortMappingArgs[6].val = desc?desc:"miniupnpc"; + AddPortMappingArgs[7].elt = "NewLeaseDuration"; + AddPortMappingArgs[7].val = "0"; + if(simpleUPnPcommand(-1, controlURL, servicetype, "AddPortMapping", AddPortMappingArgs, buffer, &bufsize) < 0) { diff --git a/net/miniupnpd/Makefile b/net/miniupnpd/Makefile new file mode 100644 index 0000000..0a2d443 --- /dev/null +++ b/net/miniupnpd/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=miniupnpd +PKG_VERSION:=1.5.20110309 +PKG_RELEASE:=2 +PKG_MD5SUM:=350d20bf25922e12f8d69e06fa33fd83 + +PKG_SOURCE_URL:=http://miniupnp.free.fr/files +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz + +include $(INCLUDE_DIR)/package.mk + +define Package/miniupnpd + SECTION:=net + CATEGORY:=Network + DEPENDS:=+iptables +libip4tc + TITLE:=Lightweight UPnP daemon + SUBMENU:=Firewall + URL:=http://miniupnp.free.fr/ + MAINTAINER:=Daniel Dickinson +endef + +define Package/miniupnpd/conffiles +/etc/config/upnpd +endef + +define Build/Compile + echo "OpenWRT/$(OPENWRTVERSION)" | tr \(\)\ _ >$(PKG_BUILD_DIR)/os.openwrt + $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.linux \ + $(TARGET_CONFIGURE_OPTS) \ + STAGING_DIR="$(STAGING_DIR)" \ + CC="$(TARGET_CC)" \ + TARGET_OPENWRT=1 \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(firstword $(wildcard $(KERNEL_BUILD_DIR)/iptables-*/include)) -DIPTABLES_143" \ + LIBS="$(STAGING_DIR)/usr/lib/libip4tc.so" +endef + +define Package/miniupnpd/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/iface $(1)/etc/hotplug.d/firewall + $(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/bin/miniupnpd + $(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd + $(INSTALL_CONF) ./files/upnpd.config $(1)/etc/config/upnpd + $(INSTALL_DATA) ./files/miniupnpd.iface.hotplug $(1)/etc/hotplug.d/iface/50-miniupnpd + $(INSTALL_DATA) ./files/miniupnpd.firewall.hotplug $(1)/etc/hotplug.d/firewall/50-miniupnpd + $(INSTALL_DIR) $(1)/usr/share/miniupnpd +endef + +$(eval $(call BuildPackage,miniupnpd)) diff --git a/net/miniupnpd/files/miniupnpd.firewall.hotplug b/net/miniupnpd/files/miniupnpd.firewall.hotplug new file mode 100644 index 0000000..f2d980c --- /dev/null +++ b/net/miniupnpd/files/miniupnpd.firewall.hotplug @@ -0,0 +1,50 @@ +#!/bin/sh + +miniupnpd_add_rules() { + local zone="$1" + local network="$2" + local iface="$3" + + miniupnpd_remove_rules + + logger -t miniupnpd "adding firewall rules for $iface to zone $zone" + + iptables -t nat -N MINIUPNPD 2>/dev/null + iptables -t nat -I zone_${zone}_prerouting -i $iface -j MINIUPNPD + iptables -t filter -N MINIUPNPD 2>/dev/null + iptables -t filter -I zone_${zone}_forward -i $iface ! -o $iface -j MINIUPNPD + + uci_set_state upnpd state "" state + uci_set_state upnpd state zone "$zone" + uci_set_state upnpd state ifname "$iface" + uci_set_state upnpd state network "$network" +} + +miniupnpd_remove_rules() { + local zone="$(uci_get_state upnpd state zone)" + local iface="$(uci_get_state upnpd state ifname)" + + [ -n "$zone" ] && [ -n "$iface" ] && { + logger -t miniupnpd "removing firewall rules for $iface from zone $zone" + + while iptables -t nat -D zone_${zone}_prerouting \ + -i $iface -j MINIUPNPD 2>/dev/null; do :; done + + while iptables -t filter -D zone_${zone}_forward \ + -i $iface ! -o $iface -j MINIUPNPD 2>/dev/null; do :; done + } + + uci_revert_state upnpd +} + +/etc/init.d/miniupnpd enabled && [ -n "`pidof miniupnpd`" ] && { + + local extif="$(uci_get upnpd config external_iface)" + local curif="$(uci_get_state upnpd state network)" + + if [ "$ACTION" = "add" ] && [ "$INTERFACE" = "$extif" ]; then + miniupnpd_add_rules "$ZONE" "$INTERFACE" "$DEVICE" + elif [ "$ACTION" = "remove" ] && [ "$INTERFACE" = "$curif" ]; then + miniupnpd_remove_rules + fi +} diff --git a/net/miniupnpd/files/miniupnpd.iface.hotplug b/net/miniupnpd/files/miniupnpd.iface.hotplug new file mode 100644 index 0000000..32d5272 --- /dev/null +++ b/net/miniupnpd/files/miniupnpd.iface.hotplug @@ -0,0 +1,8 @@ +#!/bin/sh + +/etc/init.d/miniupnpd enabled && [ -n "`pidof miniupnpd`" ] && [ "$ACTION" = "ifup" ] && { + local intif + for intif in $(uci_get upnpd config internal_iface); do + [ "$INTERFACE" = "$intif" ] && /etc/init.d/miniupnpd restart + done +} diff --git a/net/miniupnpd/files/miniupnpd.init b/net/miniupnpd/files/miniupnpd.init new file mode 100644 index 0000000..4eebe41 --- /dev/null +++ b/net/miniupnpd/files/miniupnpd.init @@ -0,0 +1,191 @@ +#!/bin/sh /etc/rc.common +START=95 + +upnpd_get_port_range() { + local _var="$1"; shift + local _val + + config_get _val "$@" + + case "$_val" in + [0-9]*[:-][0-9]*) + export -n -- "${_var}_start=${_val%%[:-]*}" + export -n -- "${_var}_end=${_val##*[:-]}" + ;; + [0-9]*) + export -n -- "${_var}_start=$_val" + export -n -- "${_var}_end=" + ;; + esac +} + +conf_rule_add() { + local cfg="$1" + local tmpconf="$2" + local action external_port_start external_port_end int_addr + local internal_port_start internal_port_end + + config_get action "$cfg" action "deny" # allow or deny + upnpd_get_port_range "ext" "$cfg" ext_ports "0-65535" # external ports: x, x-y, x:y + config_get int_addr "$cfg" int_addr "0.0.0.0/0" # ip or network and subnet mask (internal) + upnpd_get_port_range "int" "$cfg" int_ports "0-65535" # internal ports: x, x-y, x:y or range + + # Make a single IP IP/32 so that miniupnpd.conf can use it. + case "$int_addr" in + */*) ;; + *) int_addr="$int_addr/32" ;; + esac + + echo "${action} ${ext_start}${ext_end:+-}${ext_end} ${int_addr} ${int_start}${int_end:+-}${int_end}" >>$tmpconf +} + +upnpd_write_bool() { + local opt="$1" + local def="${2:-0}" + local alt="$3" + local val + + config_get_bool val config "$opt" "$def" + if [ "$val" -eq 0 ]; then + echo "${alt:-$opt}=no" >> $tmpconf + else + echo "${alt:-$opt}=yes" >> $tmpconf + fi +} + +start() { + type miniupnpd_add_rules >/dev/null 2>/dev/null || \ + ACTION=- . /etc/hotplug.d/firewall/50-miniupnpd + + config_load "upnpd" + local extiface intiface upload download logging secure enabled natpmp + local extip port usesysuptime conffile serial_number model_number + local uuid notify_interval presentation_url enable_upnp + local upnp_lease_file clean_ruleset_threshold clean_ruleset_interval + + config_get extiface config external_iface + config_get intiface config internal_iface + config_get extip config external_ip + config_get port config port 5000 + config_get upload config upload + config_get download config download + config_get_bool logging config log_output 0 + config_get conffile config config_file + config_get serial_number config serial_number + config_get model_number config model_number + config_get uuid config uuid + config_get notify_interval config notify_interval + config_get presentation_url config presentation_url + config_get upnp_lease_file config upnp_lease_file + config_get clean_ruleset_threshold config clean_ruleset_threshold + config_get clean_ruleset_interval config clean_ruleset_interval + + local args + + include /lib/network + scan_interfaces + + local ifname + config_get ifname ${extiface:-wan} ifname + + if [ -n "$conffile" ]; then + args="-f $conffile" + else + local tmpconf="/var/etc/miniupnpd.conf" + args="-f $tmpconf" + mkdir -p /var/etc + + echo "ext_ifname=$ifname" >$tmpconf + + [ -n "$extip" ] && \ + echo "ext_ip=$extip" >>$tmpconf + + local iface + for iface in ${intiface:-lan}; do + local ipaddr + config_get ipaddr "$iface" ipaddr + [ -n "$ipaddr" ] && \ + echo "listening_ip=$ipaddr" >>$tmpconf + done + + [ "$port" != "auto" ] && \ + echo "port=$port" >>$tmpconf + + config_load "upnpd" + upnpd_write_bool enable_natpmp 1 + upnpd_write_bool enable_upnp 1 + upnpd_write_bool secure_mode 1 + upnpd_write_bool system_uptime 1 + + [ -n "$upnp_lease_file" ] && \ + echo "lease_file=$upnp_lease_file" >>$tmpconf + + [ -n "$upload" -a -n "$download" ] && { + echo "bitrate_down=$(($download * 1024 * 8))" >>$tmpconf + echo "bitrate_up=$(($upload * 1024 * 8))" >>$tmpconf + } + + [ -n "${presentation_url}" ] && \ + echo "presentation_url=${presentation_url}" >>$tmpconf + + [ -n "${notify_interval}" ] && \ + echo "notify_interval=${notify_interval}" >>$tmpconf + + [ -n "${clean_ruleset_threshold}" ] && \ + echo "clean_ruleset_threshold=${clean_ruleset_threshold}" >>$tmpconf + + [ -n "${clean_ruleset_interval}" ] && \ + echo "clean_ruleset_interval=${clean_ruleset_interval}" >>$tmpconf + + [ -z "$uuid" ] && { + uuid="$(cat /proc/sys/kernel/random/uuid)" + uci set upnpd.config.uuid=$uuid + uci commit upnpd + } + + [ "$uuid" = "nocli" ] || \ + echo "uuid=$uuid" >>$tmpconf + + [ -n "${serial_number}" ] && \ + echo "serial=${serial_number}" >>$tmpconf + + [ -n "${model_number}" ] && \ + echo "model_number=${model_number}" >>$tmpconf + + config_foreach conf_rule_add perm_rule "$tmpconf" + fi + + + if [ -n "$ifname" ]; then + # start firewall + local zone + config_load firewall + config_get zone core "${extiface:-wan}_zone" + + [ -n "$zone" ] && \ + miniupnpd_add_rules "$zone" "${extiface:-wan}" "$ifname" + + if [ "$logging" = "1" ]; then + start-stop-daemon -b -S -x miniupnpd -- $args -d + else + start-stop-daemon -S -x miniupnpd -- $args + fi + else + logger -t "upnp daemon" "external interface not found, not starting" + fi +} + +stop() { + start-stop-daemon -K -q -x miniupnpd -p /var/run/miniupnpd.pid + rm -f /var/run/miniupnpd.pid + + type miniupnpd_remove_rules >/dev/null 2>/dev/null || \ + ACTION=- . /etc/hotplug.d/firewall/50-miniupnpd + + miniupnpd_remove_rules + + iptables -t nat -F MINIUPNPD 2>/dev/null + iptables -t nat -X MINIUPNPD 2>/dev/null + iptables -t filter -F MINIUPNPD 2>/dev/null + iptables -t filter -X MINIUPNPD 2>/dev/null +} diff --git a/net/miniupnpd/files/upnpd.config b/net/miniupnpd/files/upnpd.config new file mode 100644 index 0000000..02b4b2a --- /dev/null +++ b/net/miniupnpd/files/upnpd.config @@ -0,0 +1,24 @@ +config upnpd config + option enable_natpmp 1 + option enable_upnp 1 + option secure_mode 1 + option log_output 0 + option download 1024 + option upload 512 + option external_iface wan + option internal_iface lan + option port 5000 + +config perm_rule + option action allow + option ext_ports 1024-65535 + option int_addr 0.0.0.0/0 # Does not override secure_mode + option int_ports 1024-65535 + option comment "Allow high ports" + +config perm_rule + option action deny + option ext_ports 0-65535 + option int_addr 0.0.0.0/0 + option int_ports 0-65535 + option comment "Default deny" diff --git a/net/mtr/Makefile b/net/mtr/Makefile new file mode 100644 index 0000000..3e7c8c0 --- /dev/null +++ b/net/mtr/Makefile @@ -0,0 +1,67 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mtr +PKG_VERSION:=0.80 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.bitwizard.nl/mtr +PKG_MD5SUM:=fa68528eaec1757f52bacf9fea8c68a9 + +PKG_INSTALL:=1 + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +define Package/mtr + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libncurses + TITLE:=Full screen ncurses traceroute tool + URL:=http://www.bitwizard.nl/mtr/ +endef + +define Package/mtr/description + mtr combines the functionality of the 'traceroute' and 'ping' programs + in a single network diagnostic tool. + As mtr starts, it investigates the network connection between the host + mtr runs on and a user-specified destination host. After it + determines the address of each network hop between the machines, + it sends a sequence ICMP ECHO requests to each one to determine the + quality of the link to each machine. As it does this, it prints + running statistics about each machine. +endef + +CONFIGURE_ARGS += \ + --without-gtk \ + +#CONFIGURE_VARS += \ +# ac_cv_lib_resolv_res_mkquery=no \ + +define Build/Configure + (cd $(PKG_BUILD_DIR); touch \ + configure.in \ + aclocal.m4 \ + Makefile.in \ + img/Makefile.in \ + stamp-h.in \ + config.h.in \ + configure \ + ); + $(call Build/Configure/Default) +endef + +define Package/mtr/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mtr $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,mtr)) diff --git a/net/mtr/patches/501-dns.patch b/net/mtr/patches/501-dns.patch new file mode 100644 index 0000000..0976cb3 --- /dev/null +++ b/net/mtr/patches/501-dns.patch @@ -0,0 +1,510 @@ +--- a/dns.c ++++ b/dns.c +@@ -880,6 +880,507 @@ void restell(char *s) + fputs("\r",stderr); + } + ++#ifdef __UCLIBC__ ++ ++static const char digits[] = "0123456789"; ++#define __set_errno(e) (errno = (e)) ++ ++#define NS_PUT16(s, cp) do { \ ++ register u_int16_t t_s = (u_int16_t)(s); \ ++ register u_char *t_cp = (u_char *)(cp); \ ++ *t_cp++ = t_s >> 8; \ ++ *t_cp = t_s; \ ++ (cp) += NS_INT16SZ; \ ++} while (0) ++ ++ ++ ++#define NS_PUT32(l, cp) do { \ ++ register u_int32_t t_l = (u_int32_t)(l); \ ++ register u_char *t_cp = (u_char *)(cp); \ ++ *t_cp++ = t_l >> 24; \ ++ *t_cp++ = t_l >> 16; \ ++ *t_cp++ = t_l >> 8; \ ++ *t_cp = t_l; \ ++ (cp) += NS_INT32SZ; \ ++} while (0) ++ ++ ++void ++ns_put16(u_int src, u_char *dst) { ++ NS_PUT16(src, dst); ++} ++ ++void ++ns_put32(u_long src, u_char *dst) { ++ NS_PUT32(src, dst); ++} ++ ++void __putshort(u_int16_t src, u_char *dst) { ns_put16(src, dst); } ++void __putlong(u_int32_t src, u_char *dst) { ns_put32(src, dst); } ++ ++int ++mklower(int ch) { ++ if (ch >= 0x41 && ch <= 0x5A) ++ return (ch + 0x20); ++ return (ch); ++} ++ ++ ++static int ++dn_find(const u_char *domain, const u_char *msg, ++ const u_char * const *dnptrs, ++ const u_char * const *lastdnptr) ++{ ++ const u_char *dn, *cp, *sp; ++ const u_char * const *cpp; ++ u_int n; ++ ++ for (cpp = dnptrs; cpp < lastdnptr; cpp++) { ++ sp = *cpp; ++ /* ++ * terminate search on: ++ * root label ++ * compression pointer ++ * unusable offset ++ */ ++ while (*sp != 0 && (*sp & NS_CMPRSFLGS) == 0 && ++ (sp - msg) < 0x4000) { ++ dn = domain; ++ cp = sp; ++ while ((n = *cp++) != 0) { ++ /* ++ * check for indirection ++ */ ++ switch (n & NS_CMPRSFLGS) { ++ case 0: /* normal case, n == len */ ++ if (n != *dn++) ++ goto next; ++ for ((void)NULL; n > 0; n--) ++ if (mklower(*dn++) != ++ mklower(*cp++)) ++ goto next; ++ /* Is next root for both ? */ ++ if (*dn == '\0' && *cp == '\0') ++ return (sp - msg); ++ if (*dn) ++ continue; ++ goto next; ++ ++ case NS_CMPRSFLGS: /* indirection */ ++ cp = msg + (((n & 0x3f) << 8) | *cp); ++ break; ++ ++ default: /* illegal type */ ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ } ++ next: ++ sp += *sp + 1; ++ } ++ } ++ __set_errno (ENOENT); ++ return (-1); ++} ++ ++ ++int ++ns_name_pack(const u_char *src, u_char *dst, int dstsiz, ++ const u_char **dnptrs, const u_char **lastdnptr) ++{ ++ u_char *dstp; ++ const u_char **cpp, **lpp, *eob, *msg; ++ const u_char *srcp; ++ int n, l, first = 1; ++ ++ srcp = src; ++ dstp = dst; ++ eob = dstp + dstsiz; ++ lpp = cpp = NULL; ++ if (dnptrs != NULL) { ++ if ((msg = *dnptrs++) != NULL) { ++ for (cpp = dnptrs; *cpp != NULL; cpp++) ++ (void)NULL; ++ lpp = cpp; /* end of list to search */ ++ } ++ } else ++ msg = NULL; ++ ++ /* make sure the domain we are about to add is legal */ ++ l = 0; ++ do { ++ n = *srcp; ++ if ((n & NS_CMPRSFLGS) != 0 && n != 0x41) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ if (n == 0x41) ++ n = *++srcp / 8; ++ l += n + 1; ++ if (l > MAXCDNAME) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ srcp += n + 1; ++ } while (n != 0); ++ ++ /* from here on we need to reset compression pointer array on error */ ++ srcp = src; ++ do { ++ /* Look to see if we can use pointers. */ ++ n = *srcp; ++ if (n != 0 && n != 0x41 && msg != NULL) { ++ l = dn_find(srcp, msg, (const u_char * const *)dnptrs, ++ (const u_char * const *)lpp); ++ if (l >= 0) { ++ if (dstp + 1 >= eob) { ++ goto cleanup; ++ } ++ *dstp++ = (l >> 8) | NS_CMPRSFLGS; ++ *dstp++ = l % 256; ++ return (dstp - dst); ++ } ++ /* Not found, save it. */ ++ if (lastdnptr != NULL && cpp < lastdnptr - 1 && ++ (dstp - msg) < 0x4000 && first) { ++ *cpp++ = dstp; ++ *cpp = NULL; ++ first = 0; ++ } ++ } ++ /* copy label to buffer */ ++ if ((n & NS_CMPRSFLGS) != 0 && n != 0x41) { /* Should not happen. */ ++ goto cleanup; ++ } ++ if (n == 0x41) { ++ n = *++srcp / 8; ++ if (dstp + 1 >= eob) ++ goto cleanup; ++ *dstp++ = 0x41; ++ } ++ if (dstp + 1 + n >= eob) { ++ goto cleanup; ++ } ++ memcpy(dstp, srcp, n + 1); ++ srcp += n + 1; ++ dstp += n + 1; ++ } while (n != 0); ++ ++ if (dstp > eob) { ++cleanup: ++ if (msg != NULL) ++ *lpp = NULL; ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ return (dstp - dst); ++} ++ ++ ++int ++ns_name_pton(const char *src, u_char *dst, size_t dstsiz) { ++ u_char *label, *bp, *eom; ++ int c, n, escaped; ++ char *cp; ++ ++ escaped = 0; ++ bp = dst; ++ eom = dst + dstsiz; ++ label = bp++; ++ ++ while ((c = *src++) != 0) { ++ if (escaped) { ++ if ((cp = strchr(digits, c)) != NULL) { ++ n = (cp - digits) * 100; ++ if ((c = *src++) == 0 || ++ (cp = strchr(digits, c)) == NULL) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ n += (cp - digits) * 10; ++ if ((c = *src++) == 0 || ++ (cp = strchr(digits, c)) == NULL) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ n += (cp - digits); ++ if (n > 255) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ c = n; ++ } else if (c == '[' && label == bp - 1 && *src == 'x') { ++ /* Theoretically we would have to handle \[o ++ as well but we do not since we do not need ++ it internally. */ ++ *label = 0x41; ++ label = bp++; ++ ++src; ++ while (isxdigit (*src)) { ++ n = *src > '9' ? *src - 'a' + 10 : *src - '0'; ++ ++src; ++ if (! isxdigit(*src)) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ n <<= 4; ++ n += *src > '9' ? *src - 'a' + 10 : *src - '0'; ++ if (bp + 1 >= eom) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ *bp++ = n; ++ ++src; ++ } ++ *label = (bp - label - 1) * 8; ++ if (*src++ != ']' || *src++ != '.') { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ escaped = 0; ++ label = bp++; ++ if (bp >= eom) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ continue; ++ } ++ escaped = 0; ++ } else if (c == '\\') { ++ escaped = 1; ++ continue; ++ } else if (c == '.') { ++ c = (bp - label - 1); ++ if ((c & NS_CMPRSFLGS) != 0) { /* Label too big. */ ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ if (label >= eom) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ *label = c; ++ /* Fully qualified ? */ ++ if (*src == '\0') { ++ if (c != 0) { ++ if (bp >= eom) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ *bp++ = '\0'; ++ } ++ if ((bp - dst) > MAXCDNAME) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ return (1); ++ } ++ if (c == 0 || *src == '.') { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ label = bp++; ++ continue; ++ } ++ if (bp >= eom) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ *bp++ = (u_char)c; ++ } ++ c = (bp - label - 1); ++ if ((c & NS_CMPRSFLGS) != 0) { /* Label too big. */ ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ if (label >= eom) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ *label = c; ++ if (c != 0) { ++ if (bp >= eom) { ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ *bp++ = 0; ++ } ++ if ((bp - dst) > MAXCDNAME) { /* src too big */ ++ __set_errno (EMSGSIZE); ++ return (-1); ++ } ++ return (0); ++} ++ ++ ++ ++int ++ns_name_compress(const char *src, u_char *dst, size_t dstsiz, ++ const u_char **dnptrs, const u_char **lastdnptr) ++{ ++ u_char tmp[NS_MAXCDNAME]; ++ ++ if (ns_name_pton(src, tmp, sizeof tmp) == -1) ++ return (-1); ++ return (ns_name_pack(tmp, dst, dstsiz, dnptrs, lastdnptr)); ++} ++ ++ ++int ++dn_comp(const char *src, u_char *dst, int dstsiz, ++ u_char **dnptrs, u_char **lastdnptr) ++{ ++ return (ns_name_compress(src, dst, (size_t)dstsiz, ++ (const u_char **)dnptrs, ++ (const u_char **)lastdnptr)); ++} ++ ++ ++ ++ ++int ++res_nmkquery(res_state statp, ++ int op, /* opcode of query */ ++ const char *dname, /* domain name */ ++ int class, int type, /* class and type of query */ ++ const u_char *data, /* resource record data */ ++ int datalen, /* length of data */ ++ const u_char *newrr_in, /* new rr for modify or append */ ++ u_char *buf, /* buffer to put query */ ++ int buflen) /* size of buffer */ ++{ ++ register HEADER *hp; ++ register u_char *cp; ++ register int n; ++ u_char *dnptrs[20], **dpp, **lastdnptr; ++ ++#ifdef DEBUG ++ if (statp->options & RES_DEBUG) ++ printf(";; res_nmkquery(%s, %s, %s, %s)\n", ++ _res_opcodes[op], dname, p_class(class), p_type(type)); ++#endif ++ /* ++ * Initialize header fields. ++ */ ++ if ((buf == NULL) || (buflen < HFIXEDSZ)) ++ return (-1); ++ memset(buf, 0, HFIXEDSZ); ++ hp = (HEADER *) buf; ++ /* We randomize the IDs every time. The old code just ++ incremented by one after the initial randomization which ++ still predictable if the application does multiple ++ requests. */ ++#if 0 ++ hp->id = htons(++statp->id); ++#else ++ hp->id = htons(statp->id); ++ int randombits; ++ do ++ { ++#ifdef RANDOM_BITS ++ RANDOM_BITS (randombits); ++#else ++ struct timeval tv; ++ gettimeofday (&tv, NULL); ++ randombits = (tv.tv_sec << 8) ^ tv.tv_usec; ++#endif ++ } ++ while ((randombits & 0xffff) == 0); ++ statp->id = (statp->id + randombits) & 0xffff; ++#endif ++ hp->opcode = op; ++ hp->rd = (statp->options & RES_RECURSE) != 0; ++ hp->rcode = NOERROR; ++ cp = buf + HFIXEDSZ; ++ buflen -= HFIXEDSZ; ++ dpp = dnptrs; ++ *dpp++ = buf; ++ *dpp++ = NULL; ++ lastdnptr = dnptrs + sizeof dnptrs / sizeof dnptrs[0]; ++ /* ++ * perform opcode specific processing ++ */ ++ switch (op) { ++ case QUERY: /*FALLTHROUGH*/ ++ case NS_NOTIFY_OP: ++ if ((buflen -= QFIXEDSZ) < 0) ++ return (-1); ++ if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0) ++ return (-1); ++ cp += n; ++ buflen -= n; ++ __putshort(type, cp); ++ cp += INT16SZ; ++ __putshort(class, cp); ++ cp += INT16SZ; ++ hp->qdcount = htons(1); ++ if (op == QUERY || data == NULL) ++ break; ++ /* ++ * Make an additional record for completion domain. ++ */ ++ buflen -= RRFIXEDSZ; ++ n = dn_comp((char *)data, cp, buflen, dnptrs, lastdnptr); ++ if (n < 0) ++ return (-1); ++ cp += n; ++ buflen -= n; ++ __putshort(T_NULL, cp); ++ cp += INT16SZ; ++ __putshort(class, cp); ++ cp += INT16SZ; ++ __putlong(0, cp); ++ cp += INT32SZ; ++ __putshort(0, cp); ++ cp += INT16SZ; ++ hp->arcount = htons(1); ++ break; ++ ++ case IQUERY: ++ /* ++ * Initialize answer section ++ */ ++ if (buflen < 1 + RRFIXEDSZ + datalen) ++ return (-1); ++ *cp++ = '\0'; /* no domain name */ ++ __putshort(type, cp); ++ cp += INT16SZ; ++ __putshort(class, cp); ++ cp += INT16SZ; ++ __putlong(0, cp); ++ cp += INT32SZ; ++ __putshort(datalen, cp); ++ cp += INT16SZ; ++ if (datalen) { ++ memcpy(cp, data, datalen); ++ cp += datalen; ++ } ++ hp->ancount = htons(1); ++ break; ++ ++ default: ++ return (-1); ++ } ++ return (cp - buf); ++} ++ ++int ++res_mkquery(int op, /* opcode of query */ ++ const char *dname, /* domain name */ ++ int class, int type, /* class and type of query */ ++ const u_char *data, /* resource record data */ ++ int datalen, /* length of data */ ++ const u_char *newrr_in, /* new rr for modify or append */ ++ u_char *buf, /* buffer to put query */ ++ int buflen) /* size of buffer */ ++{ ++ return (res_nmkquery(&_res, op, dname, class, type, ++ data, datalen, ++ newrr_in, buf, buflen)); ++} ++ ++#endif + + void dorequest(char *s,int type,word id) + { diff --git a/net/mtr/patches/502-fix-res_ninit.patch b/net/mtr/patches/502-fix-res_ninit.patch new file mode 100644 index 0000000..efece77 --- /dev/null +++ b/net/mtr/patches/502-fix-res_ninit.patch @@ -0,0 +1,56 @@ +--- a/dns.c ++++ b/dns.c +@@ -309,17 +309,17 @@ char nullstring[] = ""; + + int use_dns = 1; + +-#ifdef res_ninit +-#define MY_RES_INIT() res_ninit(&myres); +-#define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \ +- res_nmkquery(&myres, a, b, c, d, e, f, g, h, i) +-struct __res_state myres; +-#else ++//#ifdef res_ninit ++//#define MY_RES_INIT() res_ninit(&myres); ++//#define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \ ++// res_nmkquery(&myres, a, b, c, d, e, f, g, h, i) ++//struct __res_state myres; ++//#else + #define MY_RES_INIT() res_init(); + #define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \ + res_mkquery(a, b, c, d, e, f, g, h, i) + #define myres _res +-#endif ++//#endif + + /* Code */ + #ifdef CorruptCheck +@@ -1267,28 +1267,6 @@ res_nmkquery(res_state statp, + return (-1); + memset(buf, 0, HFIXEDSZ); + hp = (HEADER *) buf; +- /* We randomize the IDs every time. The old code just +- incremented by one after the initial randomization which +- still predictable if the application does multiple +- requests. */ +-#if 0 +- hp->id = htons(++statp->id); +-#else +- hp->id = htons(statp->id); +- int randombits; +- do +- { +-#ifdef RANDOM_BITS +- RANDOM_BITS (randombits); +-#else +- struct timeval tv; +- gettimeofday (&tv, NULL); +- randombits = (tv.tv_sec << 8) ^ tv.tv_usec; +-#endif +- } +- while ((randombits & 0xffff) == 0); +- statp->id = (statp->id + randombits) & 0xffff; +-#endif + hp->opcode = op; + hp->rd = (statp->options & RES_RECURSE) != 0; + hp->rcode = NOERROR; diff --git a/net/mtr/patches/520-libresolv_fix.patch b/net/mtr/patches/520-libresolv_fix.patch new file mode 100644 index 0000000..e507553 --- /dev/null +++ b/net/mtr/patches/520-libresolv_fix.patch @@ -0,0 +1,17 @@ +--- a/configure.in ++++ b/configure.in +@@ -72,10 +72,10 @@ AC_CHECK_FUNC(gethostbyname, , + AC_CHECK_FUNCS(seteuid) + # AC_CHECK_FUNC(setuid, , AC_MSG_ERROR (I Need either seteuid or setuid)) + +-AC_CHECK_FUNC(res_mkquery, , +- AC_CHECK_LIB(bind, res_mkquery, , +- AC_CHECK_LIB(resolv, res_mkquery, , +- AC_CHECK_LIB(resolv, __res_mkquery, , AC_MSG_ERROR(No resolver library found))))) ++#AC_CHECK_FUNC(res_mkquery, , ++# AC_CHECK_LIB(bind, res_mkquery, , ++# AC_CHECK_LIB(resolv, res_mkquery, , ++# AC_CHECK_LIB(resolv, __res_mkquery, , AC_MSG_ERROR(No resolver library found))))) + # This next line would override the just detected-or-not -lresolv. + # This apparently hurts BSD. And it's bad practise. So it should go. + # However, it probably didn't get added for nothing..... Holler if diff --git a/net/mtr/patches/521-gtk_fix.patch b/net/mtr/patches/521-gtk_fix.patch new file mode 100644 index 0000000..5dbcbed --- /dev/null +++ b/net/mtr/patches/521-gtk_fix.patch @@ -0,0 +1,29 @@ +--- a/configure.in ++++ b/configure.in +@@ -48,16 +48,16 @@ AC_ARG_ENABLE(ipv6, + [ --disable-ipv6 Do not enable IPv6], + WANTS_IPV6=$enableval, WANTS_IPV6=yes) + +-if test "x$WANTS_GTK" = "xyes"; then +- AM_PATH_GTK_2_0(2.6.0, CFLAGS="$CFLAGS $GTK_CFLAGS" +- LIBS="$LIBS $GTK_LIBS -lm", +- AC_MSG_WARN(Building without GTK2 display support) +- AC_DEFINE(NO_GTK, 1, [Define if you don't have the GTK+ libraries available.]) +- GTK_OBJ="") +-else +- AC_DEFINE(NO_GTK) +- GTK_OBJ="" +-fi ++#if test "x$WANTS_GTK" = "xyes"; then ++# AM_PATH_GTK_2_0(2.6.0, CFLAGS="$CFLAGS $GTK_CFLAGS" ++# LIBS="$LIBS $GTK_LIBS -lm", ++# AC_MSG_WARN(Building without GTK2 display support) ++# AC_DEFINE(NO_GTK, 1, [Define if you don't have the GTK+ libraries available.]) ++# GTK_OBJ="") ++#else ++ AC_DEFINE(NO_GTK) ++ GTK_OBJ="" ++#fi + + AC_CHECK_FUNC(socket, , + AC_CHECK_LIB(socket, socket, , AC_MSG_ERROR(No socket library found))) diff --git a/net/multiwan/Makefile b/net/multiwan/Makefile new file mode 100644 index 0000000..96f4982 --- /dev/null +++ b/net/multiwan/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2010-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=multiwan +PKG_VERSION:=1.0.19 +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/multiwan + SECTION:=net + CATEGORY:=Network + DEPENDS:=+ip +iptables +iptables-mod-conntrack +iptables-mod-conntrack-extra +iptables-mod-ipopt + TITLE:=Simple multi WAN configuration + URL:=ftp://ftp.netlab7.com/ + MAINTAINER:=Craig M. Coffee +endef + +define Package/multiwan/description +An agent script that makes Multi-WAN configuration simple, +easy and manageable. Complete with load balancing, failover and an easy +to manage traffic ruleset. +endef + +define Package/multiwan/conffiles +/etc/config/multiwan +endef + +define Build/Compile +endef + +define Package/multiwan/install + $(CP) ./files/* $(1) +endef + +$(eval $(call BuildPackage,multiwan)) diff --git a/net/multiwan/files/etc/config/multiwan b/net/multiwan/files/etc/config/multiwan new file mode 100644 index 0000000..b89096e --- /dev/null +++ b/net/multiwan/files/etc/config/multiwan @@ -0,0 +1,54 @@ + +config 'multiwan' 'config' + option 'default_route' 'balancer' + # health_monitor below is defaulted to parallel, and can be set to + # serial to save system resources. + # option 'health_monitor' 'serial' + # option 'debug' '1' + +config 'interface' 'wan' + option 'weight' '10' + option 'health_interval' '10' + option 'icmp_hosts' 'dns' + # icmp_count is defaulted to 1, and can be increased to reduce + # false positives. + # option 'icmp_count' '3' + option 'timeout' '3' + option 'health_fail_retries' '3' + option 'health_recovery_retries' '5' + option 'failover_to' 'wan2' + option 'dns' 'auto' + +config 'interface' 'wan2' + option 'weight' '10' + option 'health_interval' '10' + option 'icmp_hosts' 'gateway' + option 'timeout' '3' + option 'health_fail_retries' '3' + option 'health_recovery_retries' '5' + option 'failover_to' 'balancer' + option 'dns' '208.67.222.222 208.67.220.220' + +config 'mwanfw' + option 'src' '192.168.1.0/24' + option 'dst' 'ftp.netlab7.com' + option 'proto' 'tcp' + option 'ports' '21' + option 'wanrule' 'wan2' + +# VoIP traffic goes through wan +# config 'mwanfw' + # option 'src' '192.168.1.0/24' + # option 'proto' 'udp' + # option 'port_type' 'source-ports' + # option 'ports' '5060,16384:16482' + # option 'wanrule' 'wan' + +config 'mwanfw' + option 'src' '192.168.0.3' + option 'proto' 'icmp' + option 'wanrule' 'balancer' + +config 'mwanfw' + option 'dst' 'www.whatismyip.com' + option 'wanrule' 'fastbalancer' diff --git a/net/multiwan/files/etc/init.d/multiwan b/net/multiwan/files/etc/init.d/multiwan new file mode 100755 index 0000000..8784430 --- /dev/null +++ b/net/multiwan/files/etc/init.d/multiwan @@ -0,0 +1,20 @@ +#!/bin/sh /etc/rc.common +START=99 +EXTRA_COMMANDS="single" + +start () { + /usr/bin/multiwan agent & +} + +stop () { + sh /usr/bin/multiwan stop +} + +restart () { + /usr/bin/multiwan restart & +} + +single () { + /usr/bin/multiwan single & +} + diff --git a/net/multiwan/files/usr/bin/multiwan b/net/multiwan/files/usr/bin/multiwan new file mode 100755 index 0000000..fb6e8b1 --- /dev/null +++ b/net/multiwan/files/usr/bin/multiwan @@ -0,0 +1,1035 @@ +#!/bin/sh + +. /etc/functions.sh + +silencer() { + if [ -z "$debug" -o "$debug" == "0" ]; then + $* > /dev/null 2>&1 + else + $* + fi +} + +mwnote() { + logger ${debug:+-s} -p 5 -t multiwan "$1" +} + +failover() { + local failchk=$(query_config failchk $2) + local recvrychk=$(query_config recvrychk $2) + + local wanid=$(query_config wanid $2) + local failover_to=$(uci_get_state multiwan ${2} failover_to) + local failover_to_wanid=$(query_config wanid $failover_to) + + local existing_failover=$(iptables -n -L FW${wanid}MARK -t mangle | echo $(($(wc -l) - 2))) + + add() { + + wan_fail_map=$(echo $wan_fail_map | sed -e "s/${1}\[${failchk}\]//g") + wan_fail_map="$wan_fail_map${1}[x]" + wan_recovery_map=$(echo $wan_recovery_map | sed -e "s/${1}\[${recvrychk}\]//g") + update_cache + + if [ "$existing_failover" == "2" ]; then + if [ "$failover_to" != "balancer" -a "$failover_to" != "fastbalancer" -a "$failover_to" != "disable" -a "$failover_to_wanid" != "$wanid" ]; then + iptables -I FW${wanid}MARK 2 -t mangle -j FW${failover_to_wanid}MARK + elif [ "$failover_to" == "balancer" ]; then + iptables -I FW${wanid}MARK 2 -t mangle -j LoadBalancer + elif [ "$failover_to" == "fastbalancer" ]; then + iptables -I FW${wanid}MARK 2 -t mangle -j FastBalancer + fi + fi + mwnote "$1 has failed and is currently offline." + } + + del() { + + wan_recovery_map=$(echo $wan_recovery_map | sed -e "s/${1}\[${recvrychk}\]//g") + wan_fail_map=$(echo $wan_fail_map | sed -e "s/${1}\[${failchk}\]//g") + update_cache + + if [ "$existing_failover" == "3" ]; then + iptables -D FW${wanid}MARK 2 -t mangle + fi + mwnote "$1 has recovered and is back online!" + } + + case $1 in + add) add $2;; + del) del $2;; + esac +} + +fail_wan() { + local new_fail_count + + local health_fail_retries=$(uci_get_state multiwan ${1} health_fail_retries) + local weight=$(uci_get_state multiwan ${1} weight) + + local failchk=$(query_config failchk $1) + local recvrychk=$(query_config recvrychk $1) + wan_recovery_map=$(echo $wan_recovery_map | sed -e "s/${1}\[${recvrychk}\]//g") + + if [ -z "$failchk" ]; then + failchk=1 + wan_fail_map="$wan_fail_map${1}[1]" + fi + + if [ "$failchk" != "x" ]; then + new_fail_count=$(($failchk + 1)) + if [ "$new_fail_count" -lt "$health_fail_retries" ]; then + wan_fail_map=$(echo $wan_fail_map | sed -e "s/${1}\[${failchk}\]/$1\[${new_fail_count}\]/g") + else + failover add $1 + refresh_dns + if [ "$weight" != "disable" ]; then + refresh_loadbalancer + fi + fi + fi + update_cache +} + +recover_wan() { + local new_fail_count + + local health_recovery_retries=$(uci_get_state multiwan ${1} health_recovery_retries) + local weight=$(uci_get_state multiwan ${1} weight) + + local failchk=$(query_config failchk $1) + local recvrychk=$(query_config recvrychk $1) + local wanid=$(query_config wanid $1) + + if [ ! -z "$failchk" -a "$failchk" != "x" ]; then + wan_fail_map=$(echo $wan_fail_map | sed -e "s/${1}\[${failchk}\]//g") + update_cache + fi + + if [ "$failchk" == "x" ]; then + if [ -z "$recvrychk" ]; then + wan_recovery_map="$wan_recovery_map${1}[1]" + update_cache + if [ "$health_recovery_retries" == "1" ]; then + recover_wan $1 + fi + else + new_recovery_count=$(($recvrychk + 1)) + if [ "$new_recovery_count" -lt "$health_recovery_retries" ]; then + wan_recovery_map=$(echo $wan_recovery_map | sed -e "s/${1}\[${recvrychk}\]/$1\[${new_recovery_count}\]/g") + update_cache + else + failover del $1 + refresh_dns + if [ "$weight" != "disable" ]; then + refresh_loadbalancer + fi + fi + fi + fi +} + +acquire_wan_data() { + local check_old_map + local get_wanid + local old_ifname + local old_ipaddr + local old_gateway + + local ifname=$(uci_get_state network ${1} ifname 'x') + local ipaddr=$(uci_get_state network ${1} ipaddr 'x') + local gateway=$(uci_get_state network ${1} gateway 'x') + + check_old_map=$(echo $wan_id_map 2>&1 | grep -o "$1\[") + + if [ -z $check_old_map ]; then + wancount=$(($wancount + 1)) + if [ $wancount -gt 20 ]; then + wancount=20 + return + fi + wan_if_map="$wan_if_map${1}[${ifname}]" + wan_id_map="$wan_id_map${1}[${wancount}]" + wan_gw_map="$wan_gw_map${1}[${gateway}]" + wan_ip_map="$wan_ip_map${1}[${ipaddr}]" + else + old_ipaddr=$(query_config ipaddr $1) + old_gateway=$(query_config gateway $1) + old_ifname=$(query_config ifname $1) + get_wanid=$(query_config wanid $1) + + wan_if_map=$(echo $wan_if_map | sed -e "s/${1}\[${old_ifname}\]/$1\[${ifname}\]/g") + wan_ip_map=$(echo $wan_ip_map | sed -e "s/${1}\[${old_ipaddr}\]/$1\[${ipaddr}\]/g") + wan_gw_map=$(echo $wan_gw_map | sed -e "s/${1}\[${old_gateway}\]/$1\[${gateway}\]/g") + + if [ "$old_ifname" != "$ifname" ]; then + iptables -D MultiWanPreHandler -t mangle -i $old_$ifname -m state --state NEW -j FW${get_wanid}MARK + iptables -A MultiWanPreHandler -t mangle -i $ifname -m state --state NEW -j FW${get_wanid}MARK + iptables -D MultiWanPostHandler -t mangle -o $old_$ifname -m mark --mark 0x1 -j FW${get_wanid}MARK + iptables -A MultiWanPostHandler -t mangle -o $ifname -m mark --mark 0x1 -j FW${get_wanid}MARK + fi + + if [ "$ifname" != "x" -a "$ipaddr" != "x" -a "$gateway" != "x" ]; then + failover del $1 + iprules_config $get_wanid + else + failover add $1 + fi + + refresh_routes + refresh_loadbalancer + refresh_dns + update_cache + fi +} + +update_cache() { + if [ ! -d /tmp/.mwan ]; then + mkdir /tmp/.mwan > /dev/null 2>&1 + fi + + rm /tmp/.mwan/cache > /dev/null 2>&1 + touch /tmp/.mwan/cache + + echo "# Automatically Generated by Multi-WAN Agent Script. Do not modify or remove. #" > /tmp/.mwan/cache + echo "wan_id_map=\"$wan_id_map\"" >> /tmp/.mwan/cache + echo "wan_if_map=\"$wan_if_map\"" >> /tmp/.mwan/cache + echo "wan_ip_map=\"$wan_ip_map\"" >> /tmp/.mwan/cache + echo "wan_gw_map=\"$wan_gw_map\"" >> /tmp/.mwan/cache + echo "wan_fail_map=\"$wan_fail_map\"" >> /tmp/.mwan/cache + echo "wan_recovery_map=\"$wan_recovery_map\"" >> /tmp/.mwan/cache + echo "wan_monitor_map=\"$wan_monitor_map\"" >> /tmp/.mwan/cache +} + +query_config() { + case $1 in + ifname) echo $wan_if_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';; + ipaddr) echo $wan_ip_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';; + gateway) echo $wan_gw_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';; + wanid) echo $wan_id_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';; + failchk) echo $wan_fail_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';; + recvrychk) echo $wan_recovery_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';; + monitor) echo $wan_monitor_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';; + group) echo $wan_id_map | grep -o "\w*\[$2\]" | awk -F "[" '{print $1}';; + esac +} + +mwan_kill() { + local otherpids=$(ps 2>&1 | grep 'multiwan agent' | grep -v $$ | awk '{print $1}') + [ -n "$otherpids" ] && kill $otherpids > /dev/null 2>&1 + sleep 2 +} + +# For system shutdownl: stop +# A plain stop will leave network in a limp state, without wan access +# stop single: restore to a single wan +# stop restart: restart multiple wan's +stop() { + mwan_kill + flush $1 + + if [ "$1" == "single" ]; then + # ifup is quite expensive--do it only when single wan is requested + echo "## Refreshing Interfaces ##" + local i=0 + while [ $((i++)) -lt $wancount ]; do + local group=$(query_config group $i) + ifup $group >&- 2>&- && sleep 1 + done + + echo "## Unloaded, updating syslog and exiting. ##" + mwnote "Succesfully Unloaded on $(exec date -R)." + rm -fr /tmp/.mwan >&- 2>&- + fi + ip route flush cache + + if [ "$1" == "restart" ]; then + echo "## Restarting Multi-WAN. ##" + mwnote "Reinitializing Multi-WAN Configuration." + rm -fr /tmp/.mwan >&- 2>&- + /etc/init.d/multiwan start >&- 2>&- + fi + + exit +} + +clear_rules() { + local restore_single=$1 + local group + + iptables -t mangle -F PREROUTING + iptables -t mangle -F FORWARD + iptables -t mangle -F POSTROUTING + iptables -t mangle -F OUTPUT + iptables -t mangle -F MultiWan + iptables -t mangle -X MultiWan + iptables -t mangle -F MultiWanRules + iptables -t mangle -X MultiWanRules + iptables -t mangle -F MultiWanDNS + iptables -t mangle -X MultiWanDNS + iptables -t mangle -F MultiWanPreHandler + iptables -t mangle -X MultiWanPreHandler + iptables -t mangle -F MultiWanPostHandler + iptables -t mangle -X MultiWanPostHandler + iptables -t mangle -F LoadBalancer + iptables -t mangle -X LoadBalancer + iptables -t mangle -F FastBalancer + iptables -t mangle -X FastBalancer + iptables -t mangle -F MultiWanLoadBalancer + iptables -t mangle -X MultiWanLoadBalancer + + local i=0 + while [ $((i++)) -lt $wancount ]; do + iptables -t mangle -F FW${i}MARK + iptables -t mangle -X FW${i}MARK + done + + if [ ! -z "$CHKFORQOS" ]; then + iptables -t mangle -F MultiWanQoS + iptables -t mangle -X MultiWanQoS + + i=0 + while [ $((i++)) -lt $wancount ]; do + group=$(query_config group $i) + iptables -t mangle -F qos_${group} + iptables -t mangle -F qos_${group}_ct + iptables -t mangle -X qos_${group} + iptables -t mangle -X qos_${group}_ct + done + fi + + [ "$restore_single" == 'single' ] && + /etc/init.d/qos restart > /dev/null 2>&1 +} + +qos_init() { + local ifname + local queue_count + local get_wan_tc + local get_wan_iptables + local add_qos_iptables + local add_qos_tc + local execute + local iprule + local qos_if_test + + ifname=$(query_config ifname $1) + + if [ "$ifname" == "x" ]; then + return + fi + + qos_if_test=$(echo $qos_if_done | grep $ifname.) + + if [ ! -z "$qos_if_test" ]; then + return + fi + + qos_if_done=$(echo ${qos_if_done}.${ifname}) + + queue_count=$(tc filter list dev $ifname | tail -n 1 | awk -F " " '{print $10}' | sed "s/0x//g") + + if [ -z "$queue_count" ]; then + return + fi + + queue_count=$(($queue_count + 1)) + + iptables -t mangle -N qos_${1} + iptables -t mangle -N qos_${1}_ct + + get_wan_tc=$(tc filter list dev $ifname | grep "0x" | sed -e "s/filter /tc filter add dev $ifname /g" -e "s/pref/prio/g" -e "s/fw//g") + get_wan_iptables=$(iptables-save | egrep '(-A Default )|(-A Default_ct )' | grep -v "MultiWanQoS" | sed -e "s/Default /qos_${1} /g" -e "s/Default_ct /qos_${1}_ct /g" -e "s/-A/iptables -t mangle -A/g") + + + local i=0 + while [ $i -lt $queue_count ]; do + echo "s/\(0x$i \|0x$i\/0xffffffff\)/0x$(($2 * 10 + $i)) /g" >> /tmp/.mwan/qos.$1.sedfilter + i=$(($i + 1)) + done + + add_qos_iptables=$(echo "$get_wan_iptables" | sed -f /tmp/.mwan/qos.$1.sedfilter) + echo "$add_qos_iptables" | while read execute; do ${execute}; done + + rm /tmp/.mwan/qos.$1.sedfilter + i=1 + while [ $i -lt $queue_count ]; do + echo "s/0x$i /0x${2}${i} fw /g" >> /tmp/.mwan/qos.$1.sedfilter + i=$(($i + 1)) + done + + add_qos_tc=$(echo "$get_wan_tc" | sed -f /tmp/.mwan/qos.$1.sedfilter) + echo "$add_qos_tc" | while read execute; do ${execute}; done + rm /tmp/.mwan/qos.$1.sedfilter + + i=0 + while [ $i -lt $queue_count ]; do + if [ $i -lt $(($queue_count - 1)) ]; then + ip rule add fwmark 0x$(($2 * 10 + $i + 1)) table $(($2 + 170)) prio $(( $2 * 10 + $i + 2)) + fi + iptables -t mangle -A MultiWanQoS -m mark --mark 0x$(($2 * 10 + $i)) -j qos_${1} + i=$(($i + 1)) + done +} + +mwanrule() { + local src + local dst + local ports + local proto + local wanrule + + config_get src $1 src + config_get dst $1 dst + config_get port_type $1 port_type 'dports' + config_get ports $1 ports + config_get proto $1 proto + config_get wanrule $1 wanrule + + if [ -z "$wanrule" ]; then + return + fi + + if [ "$wanrule" != "balancer" -a "$wanrule" != "fastbalancer" ]; then + wanrule=$(query_config wanid ${wanrule}) + wanrule="FW${wanrule}MARK" + elif [ "$wanrule" == "balancer" ]; then + wanrule="LoadBalancer" + elif [ "$wanrule" == "fastbalancer" ]; then + wanrule="FastBalancer" + fi + if [ "$dst" == "all" ]; then + dst=$NULL + fi + if [ "$proto" == "all" ]; then + proto=$NULL + fi + if [ "$ports" == "all" ]; then + ports=$NULL + fi + add_rule() { + if [ "$proto" == "icmp" ]; then + ports=$NULL + fi + if [ "$src" == "all" ]; then + src=$NULL + fi + iptables -t mangle -A MultiWanRules ${src:+-s $src} ${dst:+-d $dst} \ + -m mark --mark 0x0 ${proto:+-p $proto -m $proto} \ + ${ports:+-m multiport --$port_type $ports} \ + -j $wanrule + } + if [ -z "$proto" -a ! -z "$ports" ]; then + proto=tcp + add_rule + proto=udp + add_rule + return + fi + add_rule +} + +refresh_dns() { + local dns + local group + local ipaddr + local gateway + local ifname + local failchk + local compile_dns + local dns_server + + iptables -F MultiWanDNS -t mangle + + rm /tmp/resolv.conf.auto + touch /tmp/resolv.conf.auto + + echo "## Refreshing DNS Resolution and Tables ##" + + local i=0 + while [ $((i++)) -lt $wancount ]; do + group=$(query_config group $i) + gateway=$(query_config gateway $group) + ipaddr=$(query_config ipaddr $group) + ifname=$(query_config ifname $group) + failchk=$(query_config failchk $group) + + dns=$(uci_get_state multiwan ${group} dns 'auto') + [ "$dns" == "auto" ] && dns=$(uci_get_state network ${group} dns) + dns=$(echo $dns | sed -e "s/ /\n/g") + + if [ ! -z "$dns" -a "$failchk" != "x" -a "$ipaddr" != "x" -a "$gateway" != "x" -a "$ifname" != "x" ]; then + echo "$dns" | while read dns_server; do + iptables -t mangle -A MultiWanDNS -d $dns_server -p tcp --dport 53 -j FW${i}MARK + iptables -t mangle -A MultiWanDNS -d $dns_server -p udp --dport 53 -j FW${i}MARK + + compile_dns="nameserver $dns_server" + echo "$compile_dns" >> /tmp/resolv.conf.auto + done + fi + done + + last_resolv_update=$(ls -l -e /tmp/resolv.conf.auto | awk -F " " '{print $5, $9}') +} + +iptables_init() { + echo "## IPTables Rule Initialization ##" + local iprule + local group + local ifname + local execute + local IMQ_NFO + local default_route_id + local i + + if [ ! -z "$CHKFORQOS" ]; then + echo "## QoS Initialization ##" + + /etc/init.d/qos restart > /dev/null 2>&1 + + IMQ_NFO=$(iptables -n -L PREROUTING -t mangle -v | grep IMQ | awk -F " " '{print $6,$12}') + + iptables -t mangle -F PREROUTING + iptables -t mangle -F FORWARD + iptables -t mangle -F POSTROUTING + iptables -t mangle -F OUTPUT + + echo "$IMQ_NFO" | while read execute; do + iptables -t mangle -A PREROUTING -i $(echo $execute | awk -F " " '{print $1}') -j IMQ --todev $(echo $execute | awk -F " " '{print $2}') + done + + iptables -t mangle -N MultiWanQoS + + i=0 + while [ $((i++)) -lt $wancount ]; do + qos_init $(query_config group $i) $i + done + + fi + + iptables -t mangle -N MultiWan + iptables -t mangle -N LoadBalancer + iptables -t mangle -N FastBalancer + iptables -t mangle -N MultiWanRules + iptables -t mangle -N MultiWanDNS + iptables -t mangle -N MultiWanPreHandler + iptables -t mangle -N MultiWanPostHandler + iptables -t mangle -N MultiWanLoadBalancer + + echo "## Creating FW Rules ##" + i=0 + while [ $((i++)) -lt $wancount ]; do + iprule=$(($i * 10)) + iptables -t mangle -N FW${i}MARK + iptables -t mangle -A FW${i}MARK -j MARK --set-mark 0x${iprule} + iptables -t mangle -A FW${i}MARK -j CONNMARK --save-mark + done + + iptables -t mangle -A LoadBalancer -j MARK --set-mark 0x1 + iptables -t mangle -A LoadBalancer -j CONNMARK --save-mark + + if [ -z "$CHKFORMODULE" ]; then + iptables -t mangle -A FastBalancer -j MARK --set-mark 0x2 + iptables -t mangle -A FastBalancer -j CONNMARK --save-mark + else + mwnote "Performance load balancer(fastbalanacer) is unavailable due to current kernel limitations." + iptables -t mangle -A FastBalancer -j MARK --set-mark 0x1 + iptables -t mangle -A FastBalancer -j CONNMARK --save-mark + fi + + iptables -t mangle -A MultiWan -j CONNMARK --restore-mark + iptables -t mangle -A MultiWan -j MultiWanPreHandler + iptables -t mangle -A MultiWan -j MultiWanRules + iptables -t mangle -A MultiWan -j MultiWanLoadBalancer + iptables -t mangle -A MultiWan -j MultiWanDNS + iptables -t mangle -A MultiWan -j MultiWanPostHandler + + iptables -t mangle -I PREROUTING -j MultiWan + iptables -t mangle -I FORWARD -j MultiWan + iptables -t mangle -I OUTPUT -j MultiWan + iptables -t mangle -I POSTROUTING -j MultiWan + + + refresh_dns + + config_load "multiwan" + config_foreach mwanrule mwanfw + + if [ "$default_route" != "balancer" -a "$default_route" != "fastbalancer" ]; then + default_route_id=$(query_config wanid $default_route) + iptables -t mangle -A MultiWanRules -m mark --mark 0x0 -j FW${default_route_id}MARK + elif [ "$default_route" == "fastbalancer" ]; then + iptables -t mangle -A MultiWanRules -m mark --mark 0x0 -j FastBalancer + else + iptables -t mangle -A MultiWanRules -m mark --mark 0x0 -j LoadBalancer + fi + + i=0 + while [ $((i++)) -lt $wancount ]; do + group=$(query_config group $i) + ifname=$(query_config ifname $group) + iptables -t mangle -A MultiWanPreHandler -i $ifname -m state --state NEW -j FW${i}MARK + iptables -t mangle -A MultiWanPostHandler -o $ifname -m mark --mark 0x1 -j FW${i}MARK + done + + if [ ! -z "$CHKFORQOS" ]; then + iptables -t mangle -A MultiWan -j MultiWanQoS + fi +} + +refresh_loadbalancer() { + local group + local gateway + local ifname + local failchk + local weight + local nexthop + local pre_nexthop_chk + local rand_probability + + echo "## Refreshing Load Balancer ##" + + ip rule del prio 9 > /dev/null 2>&1 + ip route flush table 170 > /dev/null 2>&1 + + for TABLE in 170; do + ip route | grep -Ev ^default | while read ROUTE; do + ip route add table $TABLE to $ROUTE + done + done + + iptables -F MultiWanLoadBalancer -t mangle + + local total_weight=0 + + local i=0 + while [ $((i++)) -lt $wancount ]; do + group=$(query_config group $i) + failchk=$(query_config failchk $group) + gateway=$(query_config gateway $group) + ifname=$(query_config ifname $group) + weight=$(uci_get_state multiwan ${group} weight) + if [ "$gateway" != "x" -a "$ifname" != "x" -a "$failchk" != "x" -a "$weight" != "disable" ]; then + total_weight=$(($total_weight + $weight)) + fi + done + + i=0 + while [ $((i++)) -lt $wancount ]; do + group=$(query_config group $i) + failchk=$(query_config failchk $group) + gateway=$(query_config gateway $group) + ifname=$(query_config ifname $group) + + weight=$(uci_get_state multiwan ${group} weight) + + if [ "$gateway" != "x" -a "$ifname" != "x" -a "$failchk" != "x" -a "$weight" != "disable" ]; then + nexthop="$nexthop nexthop via $gateway dev $ifname weight $weight" + + rand_probability=$(($weight * 100 / $total_weight)) + total_weight=$(($total_weight - $weight)) + + if [ $rand_probability -lt 10 ]; then + rand_probability="0.0${rand_probability}" + elif [ $rand_probability -lt 100 ]; then + rand_probability="0.${rand_probability}" + else + rand_probability="1.0" + fi + + if [ -z "$CHKFORMODULE" ]; then + iptables -A MultiWanLoadBalancer -t mangle -m mark --mark 0x2 -m statistic --mode random --probability $rand_probability -j FW${i}MARK + fi + fi + + done + + pre_nexthop_chk=$(echo $nexthop | awk -F "nexthop" '{print NF-1}') + if [ "$pre_nexthop_chk" == "1" ]; then + ip route add default via $(echo $nexthop | awk -F " " '{print $3}') dev $(echo $nexthop | awk -F " " '{print $5}') proto static table 170 + elif [ "$pre_nexthop_chk" -gt "1" ]; then + ip route add proto static table 170 default scope global $nexthop + fi + + ip rule add fwmark 0x1 table 170 prio 9 + ip route flush cache +} + +refresh_routes() { + local iprule + local gateway + local group + local ifname + local ipaddr + + echo "## Refreshing Routing Tables ##" + + local i=0 + while [ $((i++)) -lt $wancount ]; do + group=$(query_config group $i) + gateway=$(query_config gateway $group) + ifname=$(query_config ifname $group) + ipaddr=$(query_config ipaddr $group) + ip route flush table $(($i + 170)) > /dev/null 2>&1 + + TABLE=$(($i + 170)) + ip route | grep -Ev ^default | while read ROUTE; do + ip route add table $TABLE to $ROUTE + done + + if [ "$gateway" != "x" -a "$ipaddr" != "x" -a "$ifname" != "x" ]; then + ip route add default via $gateway table $(($i + 170)) src $ipaddr proto static + route add default gw $gateway > /dev/null 2>&1 + fi + done + + ip route flush cache +} + +iprules_config() { + local iprule + local group + local gateway + local ipaddr + + group=$(query_config group $1) + gateway=$(query_config gateway $group) + ipaddr=$(query_config ipaddr $group) + + CHKIPROUTE=$(grep MWAN${1} /etc/iproute2/rt_tables) + if [ -z "$CHKIPROUTE" ]; then + echo "$(($1 + 170)) MWAN${1}" >> /etc/iproute2/rt_tables + fi + + ip rule del prio $(($1 * 10)) > /dev/null 2>&1 + ip rule del prio $(($1 * 10 + 1)) > /dev/null 2>&1 + + if [ "$gateway" != "x" -a "$ipaddr" != "x" ]; then + ip rule add from $ipaddr table $(($1 + 170)) prio $(($1 * 10)) + ip rule add fwmark 0x$(($1 * 10)) table $(($1 + 170)) prio $(($1 * 10 + 1)) + fi +} + +flush() { + local restore_single=$1 + echo "## Flushing IP Rules & Routes ##" + + ip rule flush > /dev/null 2>&1 + ip rule add lookup main prio 32766 > /dev/null 2>&1 + ip rule add lookup default prio 32767 > /dev/null 2>&1 + + ip route flush table 170 > /dev/null + + local i=0 + while [ $((i++)) -lt $wancount ]; do + ip route del default > /dev/null 2>&1 + ip route flush table $(($i + 170)) > /dev/null 2>&1 + done + + echo "## Clearing Rules ##" + clear_rules $restore_single > /dev/null 2>&1 + + rm $jobfile > /dev/null 2>&1 +} + +main_init() { + local RP_PATH IFACE + local group + local health_interval + + echo "## Main Initialization ##" + + mkdir /tmp/.mwan > /dev/null 2>&1 + + mwan_kill + flush + + echo "## IP Rules Initialization ##" + + CHKIPROUTE=$(grep LoadBalancer /etc/iproute2/rt_tables) + if [ -z "$CHKIPROUTE" ]; then + echo "#" >> /etc/iproute2/rt_tables + echo "170 LoadBalancer" >> /etc/iproute2/rt_tables + fi + + local i=0 + while [ $((i++)) -lt $wancount ]; do + iprules_config $i + done + + refresh_routes + iptables_init + + refresh_loadbalancer + + RP_PATH=/proc/sys/net/ipv4/conf + for IFACE in $(ls $RP_PATH); do + echo 0 > $RP_PATH/$IFACE/rp_filter + done + mwnote "Succesfully Initialized on $(date -R)." + fail_start_check + + while :; do + schedule_tasks + do_tasks + done +} + +monitor_wan() { + local ifname ipaddr gateway icmp_hosts_acquire icmp_test_host + local check_test + + . /tmp/.mwan/cache + + local timeout=$(uci_get_state multiwan ${1} timeout) + local icmp_hosts=$(uci_get_state multiwan ${1} icmp_hosts) + local icmp_count=$(uci_get_state multiwan ${1} icmp_count '1') + local health_interval=$(uci_get_state multiwan ${1} health_interval) + local ifname_cur=$(query_config ifname $1) + local ipaddr_cur=$(query_config ipaddr $1) + local gateway_cur=$(query_config gateway $1) + + while :; do + [ "${health_monitor%.*}" = 'parallel' ] && sleep $health_interval + + ifname=$(uci_get_state network ${1} ifname 'x') + ipaddr=$(uci_get_state network ${1} ipaddr 'x') + gateway=$(uci_get_state network ${1} gateway 'x') + + if [ "$ifname_cur" != "$ifname" -o "$ipaddr_cur" != "$ipaddr" -o "$gateway_cur" != "$gateway" ]; then + add_task "$1" acquire + if [ "${health_monitor%.*}" = 'parallel' ]; then + exit + else + return + fi + else + [ "$gateway" != "x" ] && ! ip route | grep -o $gateway >&- 2>&- && + add_task route refresh + fi + + if [ "$icmp_hosts" != "disable" -a "$ifname" != "x" -a "$ipaddr" != "x" -a "$gateway" != "x" ]; then + + if [ "$icmp_hosts" == "gateway" -o -z "$icmp_hosts" ]; then + icmp_hosts_acquire=$gateway + elif [ "$icmp_hosts" == "dns" ]; then + icmp_hosts_acquire=$(uci_get_state multiwan $1 dns 'auto') + [ "$icmp_hosts_acquire" == "auto" ] && + icmp_hosts_acquire=$(uci_get_state network $1 dns) + else + icmp_hosts_acquire=$icmp_hosts + fi + + icmp_hosts=$(echo $icmp_hosts_acquire | sed -e "s/\,/ /g" | sed -e "s/ /\n/g") + + ping_test() { + echo "$icmp_hosts" | while read icmp_test_host; do + ping -c "$icmp_count" -W $timeout -I $ifname $icmp_test_host 2>&1 | grep -o "round-trip" + done + } + + check_test=$(ping_test) + + if [ -z "$check_test" ]; then + add_task "$1" fail + else + add_task "$1" pass + fi + + elif [ "$icmp_hosts" == "disable" ]; then + add_task "$1" pass + fi + + [ "$health_monitor" = 'serial' ] && { + wan_monitor_map=$(echo $wan_monitor_map | sed -e "s/$1\[\w*\]/$1\[$(date +%s)\]/g") + update_cache + break + } + done +} + +# Add a task to the $jobfile while ensuring +# no duplicate tasks for the specified group +add_task() { + local group=$1 + local task=$2 + grep -o "$group.$task" $jobfile >&- 2>&- || echo "$group.$task" >> $jobfile +} + +# For health_monitor "parallel", start a background monitor for each group. +# For health_monitor "serial", queue monitor tasks for do_tasks. +schedule_tasks() { + local group health_interval monitored_last_at current_time diff delay + local i=0 + + get_health_interval() { + group=$(query_config group $1) + health_interval=$(uci_get_state multiwan ${group} health_interval 'disable') + [ "$health_interval" = "disable" ] && health_interval=0 + } + + [ "$health_monitor" = 'parallel' ] && { + while [ $((i++)) -lt $wancount ]; do + get_health_interval $i + if [ "$health_interval" -gt 0 ]; then + monitor_wan $group & + sleep 1 + fi + done + echo "## Started background monitor_wan ##" + health_monitor="parallel.started" + } + + [ "$health_monitor" = 'serial' ] && { + local monitor_disabled=1 + + until [ -f $jobfile ]; do + current_time=$(date +%s) + delay=$max_interval + i=0 + + while [ $((i++)) -lt $wancount ]; do + get_health_interval $i + if [ "$health_interval" -gt 0 ]; then + monitor_disabled=0 + + monitored_last=$(query_config monitor $group) + [ -z "$monitored_last" ] && { + monitored_last=$current_time + wan_monitor_map="${wan_monitor_map}${group}[$monitored_last]" + update_cache + } + + will_monitor_at=$(($monitored_last + $health_interval)) + diff=$(($will_monitor_at - $current_time)) + [ $diff -le 0 ] && add_task "$group" 'monitor' + + delay=$(($delay > $diff ? $diff : $delay)) + fi + done + + [ "$monitor_disabled" -eq 1 ] && { + # Although health monitors are disabled, still + # need to check up on iptables rules in do_tasks + sleep "$iptables_interval" + break + } + [ $delay -gt 0 ] && sleep $delay + done + } +} + +rule_counter=0 +# Process each task in the $jobfile in FIFO order +do_tasks() { + local check_iptables + local queued_task + local current_resolv_file + + while :; do + + . /tmp/.mwan/cache + + if [ "$((++rule_counter))" -eq 5 -o "$health_monitor" = 'serial' ]; then + + check_iptables=$(iptables -n -L MultiWan -t mangle | grep "references" | awk -F "(" '{print $2}' | cut -d " " -f 1) + + if [ -z "$check_iptables" -o "$check_iptables" -lt 4 ]; then + mwnote "Netfilter rules appear to of been altered." + /etc/init.d/multiwan restart + exit + fi + + current_resolv_file=$(ls -l -e /tmp/resolv.conf.auto | awk -F " " '{print $5, $9}') + + if [ "$last_resolv_update" != "$current_resolv_file" ]; then + refresh_dns + fi + + rule_counter=0 + fi + + if [ -f $jobfile ]; then + + mv $jobfile $jobfile.work + + while read LINE; do + + execute_task() { + case $2 in + fail) fail_wan $1;; + pass) recover_wan $1;; + acquire) + acquire_wan_data $1 + [ "${health_monitor%.* }" = 'parallel' ] && { + monitor_wan $1 & + echo "## Started background monitor_wan ##" + } + ;; + monitor) monitor_wan $1;; + refresh) refresh_routes;; + *) echo "## Unknown task command: $2 ##";; + esac + } + + queued_task=$(echo $LINE | awk -F "." '{print $1,$2}') + execute_task $queued_task + done < $jobfile.work + + rm $jobfile.work + fi + + if [ "$health_monitor" = 'serial' ]; then + break + else + sleep 1 + fi + done +} + +fail_start_check(){ + local ipaddr + local gateway + local ifname + local group + + local i=0 + while [ $((i++)) -lt $wancount ]; do + group=$(query_config group $i) + ifname=$(query_config ifname $group) + ipaddr=$(query_config ipaddr $group) + gateway=$(query_config gateway $group) + + if [ "$ifname" == "x" -o "$ipaddr" == "x" -o "$gateway" == "x" ]; then + failover add $group + fi + done +} + +wancount=0 +max_interval=$(((1<<31) - 1)) + +config_clear +config_load "multiwan" +config_get default_route config default_route +config_get health_monitor config health_monitor +config_get iptables_interval config iptables_interval '30' +config_get debug config debug + +[ "$health_monitor" = 'serial' ] || health_monitor='parallel' + +config_foreach acquire_wan_data interface + +update_cache + +CHKFORQOS=$(iptables -n -L Default -t mangle 2>&1 | grep "Chain Default") +CHKFORMODULE=$(iptables -m statistic 2>&1 | grep -o "File not found") + +jobfile="/tmp/.mwan/jobqueue" + +case $1 in + agent) silencer main_init;; + stop) silencer stop;; + restart) silencer stop restart;; + single) silencer stop single;; +esac diff --git a/net/mutella/Makefile b/net/mutella/Makefile new file mode 100644 index 0000000..ded1b8b --- /dev/null +++ b/net/mutella/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mutella +PKG_VERSION:=0.4.5 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=1a676eacf562e3b8de90493f99fe059c + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/mutella + SUBMENU:=P2P + SECTION:=net + CATEGORY:=Network + TITLE:=Gnutella client with command line and http interface + URL:=http://mutella.sourceforge.net/ + DEPENDS:=+libncurses +libreadline +libpthread +libstdcpp +zlib +endef + +define Package/mutella/description + Mutella supports all the functionality required to participate as + a full-featured node in the Gnutella network. "Full-featured" implies + support for file search, download and sharing. It is optimized for a + high-bandwidth connection, where it sets standards for server + performance and stability, but can also run on a modest-speed line. + . + Mutella can either be controlled via a colourful text mode interface + or via a web browser using a built in http interface. +endef + +CONFIGURE_VARS += \ + CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \ + +define Package/mutella/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mutella{,_sio} $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share + $(CP) $(PKG_INSTALL_DIR)/usr/share/mutella $(1)/usr/share/ +endef + +$(eval $(call BuildPackage,mutella)) + diff --git a/net/mutella/patches/001-no_backtrace.patch b/net/mutella/patches/001-no_backtrace.patch new file mode 100644 index 0000000..65021db --- /dev/null +++ b/net/mutella/patches/001-no_backtrace.patch @@ -0,0 +1,15 @@ +Index: mutella-0.4.5/mutella/main.cpp +=================================================================== +--- mutella-0.4.5.orig/mutella/main.cpp 2007-09-22 05:48:22.000000000 +0200 ++++ mutella-0.4.5/mutella/main.cpp 2007-09-22 05:48:22.000000000 +0200 +@@ -45,6 +45,10 @@ + #define HAVE_BACKTRACE + #endif + ++#ifdef __UCLIBC__ ++#undef HAVE_BACKTRACE ++#endif ++ + #ifdef HAVE_BACKTRACE + #include + #endif diff --git a/net/mutella/patches/002-gcc4_fixes.patch b/net/mutella/patches/002-gcc4_fixes.patch new file mode 100644 index 0000000..249d9c8 --- /dev/null +++ b/net/mutella/patches/002-gcc4_fixes.patch @@ -0,0 +1,12 @@ +Index: mutella-0.4.5/mutella/gnushare.h +=================================================================== +--- mutella-0.4.5.orig/mutella/gnushare.h 2007-09-22 05:48:21.000000000 +0200 ++++ mutella-0.4.5/mutella/gnushare.h 2007-09-22 05:48:27.000000000 +0200 +@@ -26,6 +26,7 @@ + #include "mthread.h" + + class MGnuDirector; ++class MShareThread; + + class MGnuShare + { diff --git a/net/mutella/patches/003-gcc4_3_fixes.patch b/net/mutella/patches/003-gcc4_3_fixes.patch new file mode 100644 index 0000000..f7be59d --- /dev/null +++ b/net/mutella/patches/003-gcc4_3_fixes.patch @@ -0,0 +1,34 @@ +diff --git a/mutella/common.h b/mutella/common.h +--- a/mutella/common.h ++++ b/mutella/common.h +@@ -50,7 +50,7 @@ CString restore_string(CString s, bool bFormMode = true); + bool QueryMatch(CString Result, const CString& Query); + // fast functions which do not copy the string + void MakeWordList(LPSTR szQuery, vector& QWords); +-void MakeWordList(LPSTR szQuery, vector& QWords, vector& QWords); ++void MakeWordList(LPSTR szQuery, vector& QWordsInc, vector&QWordsExc); + bool MatchWordList(const CString& ResultLower, const vector& QWords, bool bMatchAll = true); + + // slower but 'storage-independent' versions +diff --git a/mutella/mutella.h b/mutella/mutella.h +--- a/mutella/mutella.h ++++ b/mutella/mutella.h +@@ -79,6 +79,7 @@ using std::insert_iterator; + #include + #include + #include ++#include + + // library-type includes + #include "defines.h" +diff --git a/mutella/tstring.h b/mutella/tstring.h +--- a/mutella/tstring.h ++++ b/mutella/tstring.h +@@ -22,6 +22,7 @@ + #define __TSTRING_H__INCLUDED__ + + #include ++#include + #include + + #ifdef TSTRING_DEBUG diff --git a/net/mutella/patches/004-no-host-paths.patch b/net/mutella/patches/004-no-host-paths.patch new file mode 100644 index 0000000..c32e524 --- /dev/null +++ b/net/mutella/patches/004-no-host-paths.patch @@ -0,0 +1,58 @@ +--- a/mutella/Makefile.am ++++ b/mutella/Makefile.am +@@ -12,8 +12,8 @@ EXTRA_DIST = main.cpp common.cpp common. + ####### kdevelop will overwrite this part!!! (end)############ + + # set the include path found by configure +-INCLUDES= $(all_includes) -I$(includedir) ++INCLUDES= $(all_includes) + + # the library search path. +-mutella_LDFLAGS = $(all_libraries) -L$(libdir) ++mutella_LDFLAGS = $(all_libraries) + +--- a/mutella/Makefile.in ++++ b/mutella/Makefile.in +@@ -221,10 +221,10 @@ EXTRA_DIST = main.cpp common.cpp common. + ####### kdevelop will overwrite this part!!! (end)############ + + # set the include path found by configure +-INCLUDES = $(all_includes) -I$(includedir) ++INCLUDES = $(all_includes) + + # the library search path. +-mutella_LDFLAGS = $(all_libraries) -L$(libdir) ++mutella_LDFLAGS = $(all_libraries) + all: all-recursive + + .SUFFIXES: +--- a/util/Makefile.am ++++ b/util/Makefile.am +@@ -9,10 +9,10 @@ bin_PROGRAMS = mutella_sio + mutella_sio_SOURCES = sockio.c + + # set the include path found by configure +-INCLUDES= $(all_includes) -I$(includedir) ++INCLUDES= $(all_includes) + + # the library search path. +-mutella_sio_LDFLAGS = $(all_libraries) -L$(libdir) ++mutella_sio_LDFLAGS = $(all_libraries) + + + +--- a/util/Makefile.in ++++ b/util/Makefile.in +@@ -166,10 +166,10 @@ EXTRA_DIST = sockio.c + mutella_sio_SOURCES = sockio.c + + # set the include path found by configure +-INCLUDES = $(all_includes) -I$(includedir) ++INCLUDES = $(all_includes) + + # the library search path. +-mutella_sio_LDFLAGS = $(all_libraries) -L$(libdir) ++mutella_sio_LDFLAGS = $(all_libraries) + all: all-am + + .SUFFIXES: diff --git a/net/mvprelay/Makefile b/net/mvprelay/Makefile new file mode 100644 index 0000000..432e7ff --- /dev/null +++ b/net/mvprelay/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mvprelay +PKG_VERSION:=0.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/ +PKG_MD5SUM:=189fb792470c966834d5204705ebee83 + +include $(INCLUDE_DIR)/package.mk + +define Package/mvprelay + SECTION:=net + CATEGORY:=Network + TITLE:=relays requests from the MVP + URL:=http://mvpmc.wikispaces.com/mvprelay +endef + +define Package/mvprelay/description + Relays requests from the MediaMVP to the TFTP server +endef + +define Build/Configure +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) $(PKG_BUILD_DIR)/$(PKG_NAME).c -o $(PKG_BUILD_DIR)/$(PKG_NAME) +endef + +define Package/mvprelay/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,mvprelay)) diff --git a/net/n2n/Makefile b/net/n2n/Makefile new file mode 100644 index 0000000..338ccb6 --- /dev/null +++ b/net/n2n/Makefile @@ -0,0 +1,51 @@ +# +## Copyright (C) 2007-2008 OpenWrt.org +# +## This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + + +include $(TOPDIR)/rules.mk + +PKG_BRANCH:=trunk +PKG_SOURCE_URL:=https://svn.ntop.org/svn/ntop/trunk/n2n +PKG_REV:=3875 + +PKG_NAME:=n2n +PKG_VERSION:=$(PKG_REV) +PKG_RELEASE:=1 + +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz +PKG_SOURCE_PROTO:=svn +PKG_SOURCE_VERSION:=$(PKG_REV) + +include $(INCLUDE_DIR)/package.mk + +define Package/n2n + SECTION:=net + CATEGORY:=Network + TITLE:=VPN tunneling daemon + URL:=http://www.ntop.org/n2n/ + SUBMENU:=VPN + DEPENDS:=+libpthread +kmod-tun +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + INSTALL_PROG=":" +endef + +define Package/n2n/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/edge $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/supernode $(1)/sbin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/n2n.config $(1)/etc/config/n2n + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/n2n.init $(1)/etc/init.d/n2n +endef + +$(eval $(call BuildPackage,n2n)) diff --git a/net/n2n/files/n2n.config b/net/n2n/files/n2n.config new file mode 100644 index 0000000..bf4acfe --- /dev/null +++ b/net/n2n/files/n2n.config @@ -0,0 +1,7 @@ +config edge + option ipaddr '' + option supernode '' + option port '' + option community '' + option key '' + option route '' diff --git a/net/n2n/files/n2n.init b/net/n2n/files/n2n.init new file mode 100644 index 0000000..4730112 --- /dev/null +++ b/net/n2n/files/n2n.init @@ -0,0 +1,37 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=90 + +config_cb() { + local cfg="$CONFIG_SECTION" + config_get configname "$cfg" TYPE + + case "$configname" in + edge) + config_get ipaddr "$cfg" ipaddr + config_get supernode "$cfg" supernode + config_get port "$cfg" port + config_get community "$cfg" community + config_get key "$cfg" key + config_get_bool route "$cfg" route 0 + [ "$route" = "1" ] && args='-r' + if [ "$ipaddr" != "" ]; then + edge -f $args -a $ipaddr -c $community -k $key -l ${supernode}:${port} + fi + ;; + supernode) + config_get port "$cfg" port + if [ "$port" != "" ]; then + supernode -l $port & + fi + ;; + esac +} + +start() { + config_load n2n +} +stop() { + killall edge + killall supernode +} diff --git a/net/natpmp/Makefile b/net/natpmp/Makefile new file mode 100644 index 0000000..ec81f33 --- /dev/null +++ b/net/natpmp/Makefile @@ -0,0 +1,50 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=natpmp +PKG_VERSION:=0.2.3 +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=http://download.savannah.nongnu.org/releases/natpmp/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=f696565d59c488b9ad9f43625be93377 + +include $(INCLUDE_DIR)/package.mk + +define Package/natpmp + SECTION:=net + CATEGORY:=Network + DEPENDS:=+ip + SUBMENU:=Firewall + TITLE:=A daemon implementing NAT-PMP + URL:=http://savannah.nongnu.org/projects/natpmp +endef + +define Package/natpmp/description + This is a daemon implementing NAT-PMP. NAT-PMP is a protocol for + handling port forwarding requests from clients behind a NAT. +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_CC)" \ + CFLAGS="$(strip $(TARGET_CFLAGS))" \ + CPPFLAGS="$$$$CPPFLAGS $(TARGET_CPPFLAGS) -DIPTABLES_PATH=\\\"/usr/sbin\\\"" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + prefix="$(PKG_INSTALL_DIR)/usr" +endef + +define Package/natpmp/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/natpmp $(1)/usr/sbin + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/natpmp.config $(1)/etc/config/natpmp + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/natpmp.init $(1)/etc/init.d/natpmp +endef + +$(eval $(call BuildPackage,natpmp)) diff --git a/net/natpmp/files/natpmp.config b/net/natpmp/files/natpmp.config new file mode 100644 index 0000000..a01867e --- /dev/null +++ b/net/natpmp/files/natpmp.config @@ -0,0 +1,4 @@ +config natpmp + option outbound_interface vlan0 + option inbound_interfaces br-lan eth1 + option iptables_chain natpmp diff --git a/net/natpmp/files/natpmp.init b/net/natpmp/files/natpmp.init new file mode 100644 index 0000000..289a63d --- /dev/null +++ b/net/natpmp/files/natpmp.init @@ -0,0 +1,63 @@ +#!/bin/sh /etc/rc.common + +START=70 + +IP=$(which ip) +IPTABLES=$(which iptables) +NATPMP=/usr/sbin/natpmp +PIDFILE=/var/run/natpmp.pid + +natpmp_config() { + local cfg="$1" + + config_get PUBLIC_IF "$cfg" outbound_interface + config_get PRIVATE_IFS "$cfg" inbound_interfaces + config_get IPTABLES_CHAIN "$cfg" iptables_chain +} + +start() { + config_load natpmp + config_foreach natpmp_config natpmp + + # Flush all the rules in the natpmp chain, or create it, if it doesn't exists. + $IPTABLES -t nat -F $IPTABLES_CHAIN 2>/dev/null || \ + $IPTABLES -t nat -N $IPTABLES_CHAIN + + # Handle all incoming connections in the natpmp chain. + $IPTABLES -t nat -D PREROUTING -j $IPTABLES_CHAIN 2>/dev/null || true + $IPTABLES -t nat -A PREROUTING -j $IPTABLES_CHAIN + + # Iterate through the private interfaces. + BIND_ARGS="" + for IF in $PRIVATE_IFS; do + # Get the IP address of this interface. + ADDR=`$IP addr show dev $IF 2>/dev/null | grep "^ *inet .* $IF\$" | cut -d " " -f 6 | cut -d / -f 1` + if [ -n "$ADDR" ] ; then + # Add the IP address to the argument list. + BIND_ARGS="$BIND_ARGS -a $ADDR" + else + echo "Could not get IP address of interface $IF. Skipping." >&2 + fi + done + + if [ -z "$BIND_ARGS" ] ; then + echo "No IP addresses to bind to. Exiting." >&2 + exit 1 + fi + + $NATPMP -p $PIDFILE -b -i "$PUBLIC_IF" $BIND_ARGS -- "$IPTABLES_CHAIN" +} + +stop() { + config_load natpmp + config_foreach natpmp_config natpmp + + # Unlink chain + $IPTABLES -t nat -D PREROUTING -j $IPTABLES_CHAIN 2>/dev/null || true + + # Flush all the rules in the natpmp chain + $IPTABLES -t nat -F $IPTABLES_CHAIN 2>/dev/null && \ + $IPTABLES -t nat -X $IPTABLES_CHAIN + + kill $(cat $PIDFILE) +} diff --git a/net/nbd/Makefile b/net/nbd/Makefile new file mode 100644 index 0000000..d0d85ef --- /dev/null +++ b/net/nbd/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nbd +PKG_VERSION:=2.9.22 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/nbd +PKG_MD5SUM:=ff79803165a349a84d526bfcea820b12 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +# -liconv due to glib2, to be revisited later +include $(INCLUDE_DIR)/nls.mk + +PKG_BUILD_DEPENDS:=glib2 libintl + +define Package/nbd + SECTION:=net + CATEGORY:=Network + TITLE:=Network Block Device utilities + URL:=http://nbd.sourceforge.net + DEPENDS:=@!LINUX_2_4 +kmod-nbd +endef + +define Package/nbd/description + This package contains the network block device client. +endef + +CONFIGURE_ARGS+= \ + --disable-glibtest + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + nbd-client +endef + +define Package/nbd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nbd-client $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,nbd)) diff --git a/net/nbtscan/Makefile b/net/nbtscan/Makefile new file mode 100644 index 0000000..b930f9d --- /dev/null +++ b/net/nbtscan/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nbtscan +PKG_VERSION:=1.5.1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/n/nbtscan/ +PKG_MD5SUM:=85bb085077c380b82a6ff73e0de0c154 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)a + +include $(INCLUDE_DIR)/package.mk + +define Package/nbtscan + SECTION:=net + CATEGORY:=Network + TITLE:=NBTscan is a program for scanning IP networks for NetBIOS name information + URL:=http://www.inetcat.net/software/nbtscan.html +endef + +define Package/nbtscan/description + NBTscan is a program for scanning IP networks for NetBIOS name information. + It sends NetBIOS status query to each address in supplied range and lists + received information in human readable form. For each responded host it lists + IP address, NetBIOS computer name, logged-in user name and MAC address. +endef + +CONFIGURE_ARGS += \ + --enable-static \ + --enable-shared + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" +endef + + +define Package/nbtscan/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/nbtscan $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,nbtscan)) diff --git a/net/ncftp/Makefile b/net/ncftp/Makefile new file mode 100644 index 0000000..053ab7f --- /dev/null +++ b/net/ncftp/Makefile @@ -0,0 +1,68 @@ +# +# Copyright (C) 2010-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ncftp +PKG_VERSION:=3.2.5 +PKG_RELEASE:=1 + +PKG_INSTALL:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.ncftp.com/ncftp +PKG_MD5SUM:=b05c7a6d5269c04891f02f43d4312b30 + +include $(INCLUDE_DIR)/package.mk + +define Package/ncftp/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=File Transfer + TITLE:=NcFTP Client + URL:=http://www.ncftpd.com/ +endef + +define Package/ncftp/Default/description + NcFTP Client (also known as just NcFTP) is a set of FREE application + programs implementing the File Transfer Protocol (FTP). +endef + +define Package/ncftp +$(call Package/ncftp/Default) + TITLE+= (main program) +endef + +define Package/ncftp/description +$(call Package/ncftp/Default/description) + Main program. +endef + +define Package/ncftp-utils +$(call Package/ncftp/Default) + TITLE+= (utilities) +endef + +define Package/ncftp-utils/description +$(call Package/ncftp/Default/description) + Utilities. +endef + +define Package/ncftp/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncftp $(1)/usr/bin/ +endef + +define Package/ncftp-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/ncftp{batch,get,ls,put,spooler} \ + $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,ncftp)) +$(eval $(call BuildPackage,ncftp-utils)) diff --git a/net/ndyndns/Makefile b/net/ndyndns/Makefile new file mode 100644 index 0000000..09f6346 --- /dev/null +++ b/net/ndyndns/Makefile @@ -0,0 +1,50 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=ndyndns +PKG_VERSION:=2.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://ndyndns.googlecode.com/files +PKG_MD5SUM:=0cdb4dcba5f8c1664f53884b3c2179e9 + +PKG_FIXUP = libtool + +include $(INCLUDE_DIR)/package.mk + +MAKE_FLAGS:=PLATFORM=linux + +define Package/ndyndns + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + TITLE:=DynDNS.com update daemon + URL:=http://ndyndns.googlecode.com/ + DEPENDS:=+libcurl +libopenssl +endef + +define Package/ndyndns/description + The ndyndns daemon is an update client for DynDNS.com. It + checks for an IP address change every two minutes, avoids + unnecessary updates, reports errors, logs to syslog, and + generally complies with everything required of a proper dyndns + client. +endef + +define Package/ndyndns/conffiles +/etc/ndyndns/ndyndns.conf.sample +/etc/default/ndyndns +endef + +define Package/ndyndns/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ndyndns $(1)/usr/sbin + $(INSTALL_DIR) $(1)/etc/default + $(INSTALL_BIN) files/$(PKG_NAME).default $(1)/etc/default/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/$(PKG_NAME) + $(INSTALL_CONF) files/$(PKG_NAME).conf.sample $(1)/etc/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,ndyndns)) diff --git a/net/ndyndns/files/ndyndns.conf.sample b/net/ndyndns/files/ndyndns.conf.sample new file mode 100644 index 0000000..eedd341 --- /dev/null +++ b/net/ndyndns/files/ndyndns.conf.sample @@ -0,0 +1,7 @@ +[config] + +[dyndns] +username = user +password = password +hosts = hostname.dyndns.org +wildcard diff --git a/net/ndyndns/files/ndyndns.default b/net/ndyndns/files/ndyndns.default new file mode 100644 index 0000000..1904794 --- /dev/null +++ b/net/ndyndns/files/ndyndns.default @@ -0,0 +1,3 @@ +CHROOT="/etc/ndyndns" +CONFIG="/etc/ndyndns/ndyndns.conf" +OPTIONS="" diff --git a/net/ndyndns/files/ndyndns.init b/net/ndyndns/files/ndyndns.init new file mode 100644 index 0000000..113d19c --- /dev/null +++ b/net/ndyndns/files/ndyndns.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org + +START=80 +DEFAULT=/etc/default/ndyndns + +start() { + [ -f $DEFAULT ] && . $DEFAULT + + . /etc/functions.sh + include /lib/network + scan_interfaces + /usr/sbin/ndyndns -c $CHROOT -f $CONFIG -i $(config_get wan ifname) $OPTIONS +} + +stop() { + killall ndyndns +} diff --git a/net/ndyndns/patches/010-dont-add-host-includes.patch b/net/ndyndns/patches/010-dont-add-host-includes.patch new file mode 100644 index 0000000..a28dc4a --- /dev/null +++ b/net/ndyndns/patches/010-dont-add-host-includes.patch @@ -0,0 +1,24 @@ +diff -urN ndyndns-2.1.orig/configure ndyndns-2.1/configure +--- ndyndns-2.1.orig/configure 2010-07-17 13:22:39.000000000 +0200 ++++ ndyndns-2.1/configure 2011-01-26 16:24:15.834445729 +0100 +@@ -3318,7 +3318,7 @@ + fi + + +-CURLINC=-I`curl-config --prefix`/include ++CURLINC=-I`curl-config --cflags` + + CURLLIB=`curl-config --libs` + +diff -urN ndyndns-2.1.orig/configure.in ndyndns-2.1/configure.in +--- ndyndns-2.1.orig/configure.in 2010-07-17 13:22:11.000000000 +0200 ++++ ndyndns-2.1/configure.in 2011-01-26 16:24:14.090441650 +0100 +@@ -24,7 +24,7 @@ + fi + AC_SUBST(PLATFORM) + +-CURLINC=-I`curl-config --prefix`/include ++CURLINC=-I`curl-config --cflags` + AC_SUBST(CURLINC) + CURLLIB=`curl-config --libs` + AC_SUBST(CURLLIB) diff --git a/net/ndyndns/patches/020-ndyndns.patch b/net/ndyndns/patches/020-ndyndns.patch new file mode 100644 index 0000000..00f3f57 --- /dev/null +++ b/net/ndyndns/patches/020-ndyndns.patch @@ -0,0 +1,211 @@ +diff -urN ndyndns-2.1.orig/cfg.c ndyndns-2.1/cfg.c +--- ndyndns-2.1.orig/cfg.c 2011-01-26 17:02:05.762443700 +0100 ++++ ndyndns-2.1/cfg.c 2011-01-26 17:03:43.334443683 +0100 +@@ -804,34 +804,6 @@ + continue; + } + +- tmp = parse_line_string(point, "user"); +- if (tmp) { +- switch (prs) { +- default: +- parse_warn(lnum, "user"); +- break; +- case PRS_CONFIG: +- cfg_set_user(tmp); +- break; +- } +- free(tmp); +- continue; +- } +- +- tmp = parse_line_string(point, "group"); +- if (tmp) { +- switch (prs) { +- default: +- parse_warn(lnum, "group"); +- break; +- case PRS_CONFIG: +- cfg_set_group(tmp); +- break; +- } +- free(tmp); +- continue; +- } +- + tmp = parse_line_string(point, "interface"); + if (tmp) { + switch (prs) { +diff -urN ndyndns-2.1.orig/chroot.c ndyndns-2.1/chroot.c +--- ndyndns-2.1.orig/chroot.c 2011-01-26 17:02:05.762443700 +0100 ++++ ndyndns-2.1/chroot.c 2011-01-26 17:03:54.470442525 +0100 +@@ -19,8 +19,6 @@ + #include + #include + #include +-#include +-#include + + #include "defines.h" + #include "log.h" +@@ -82,32 +80,3 @@ + } + } + } +- +-void drop_root(uid_t uid, gid_t gid) +-{ +- if (uid == 0 || gid == 0) { +- log_line("FATAL - drop_root: attempt to drop root to root?\n"); +- exit(EXIT_FAILURE); +- } +- +- if (getgid() == 0) { +- if (setregid(gid, gid) == -1) { +- log_line("FATAL - drop_root: failed to drop real gid == root!\n"); +- exit(EXIT_FAILURE); +- } +- } +- +- if (getuid() == 0) { +- if (setreuid(uid, uid) == -1) { +- log_line("FATAL - drop_root: failed to drop real uid == root!\n"); +- exit(EXIT_FAILURE); +- } +- } +- +- /* be absolutely sure */ +- if (getgid() == 0 || getuid() == 0) { +- log_line("FATAL - drop_root: tried to drop root, but still have root!\n"); +- exit(EXIT_FAILURE); +- } +-} +- +diff -urN ndyndns-2.1.orig/Makefile.in ndyndns-2.1/Makefile.in +--- ndyndns-2.1.orig/Makefile.in 2011-01-26 17:02:05.766443748 +0100 ++++ ndyndns-2.1/Makefile.in 2011-01-26 17:03:43.338443633 +0100 +@@ -1,11 +1,9 @@ + #CC = gcc -Wall -Wpointer-arith -Wstrict-prototypes -pedantic + CC = @CC@ +-dnslib = -lnss_dns + objects = log.o nstrl.o util.o chroot.o pidfile.o signals.o strlist.o checkip.o $(PLATFORM).o cfg.o ndyndns.o +-CURLINC = @CURLINC@ + CURLLIB = @CURLLIB@ + VERSION = @VERSION@ +-CFLAGS = @CFLAGS@ -Wall -Wextra -pedantic $(CURLINC) ++CFLAGS += -Wall -Wpointer-arith -Wstrict-prototypes -pedantic + PLATFORM = @PLATFORM@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ +@@ -16,7 +14,7 @@ + all: ndyndns + + ndyndns : $(objects) +- $(CC) $(LDFLAGS) $(dnslib) $(CURLLIB) -o ndyndns $(objects) ++ $(CC) $(LDFLAGS) $(CURLLIB) -o ndyndns $(objects) + + ndyndns.o : log.h nstrl.h util.h chroot.h pidfile.h signals.h strlist.h checkip.h $(PLATFORM).h cfg.h + $(CC) $(CFLAGS) -c -o $@ ndyndns.c +diff -urN ndyndns-2.1.orig/ndyndns.c ndyndns-2.1/ndyndns.c +--- ndyndns-2.1.orig/ndyndns.c 2011-01-26 17:02:05.766443748 +0100 ++++ ndyndns-2.1/ndyndns.c 2011-01-26 17:04:15.526443092 +0100 +@@ -32,8 +32,6 @@ + #include + #include + #include +-#include +-#include + + #include + #include +@@ -897,40 +895,6 @@ + strlcpy(pidfile, pidfname, sizeof pidfile); + } + +-void cfg_set_user(char *username) +-{ +- int t; +- char *p; +- struct passwd *pws; +- +- t = (unsigned int) strtol(username, &p, 10); +- if (*p != '\0') { +- pws = getpwnam(username); +- if (pws) { +- cfg_uid = (int)pws->pw_uid; +- if (!cfg_gid) +- cfg_gid = (int)pws->pw_gid; +- } else suicide("FATAL - Invalid uid specified.\n"); +- } else +- cfg_uid = t; +-} +- +-void cfg_set_group(char *groupname) +-{ +- int t; +- char *p; +- struct group *grp; +- +- t = (unsigned int) strtol(groupname, &p, 10); +- if (*p != '\0') { +- grp = getgrnam(groupname); +- if (grp) { +- cfg_gid = (int)grp->gr_gid; +- } else suicide("FATAL - Invalid gid specified.\n"); +- } else +- cfg_gid = t; +-} +- + void cfg_set_interface(char *interface) + { + strlcpy(ifname, interface, sizeof ifname); +@@ -954,8 +918,6 @@ + {"disable-chroot", 0, 0, 'x'}, + {"file", 1, 0, 'f'}, + {"cfg-stdin", 0, 0, 'F'}, +- {"user", 1, 0, 'u'}, +- {"group", 1, 0, 'g'}, + {"interface", 1, 0, 'i'}, + {"remote", 0, 0, 'r'}, + {"help", 0, 0, 'h'}, +@@ -963,7 +925,7 @@ + {0, 0, 0, 0} + }; + +- c = getopt_long(argc, argv, "rdnp:qc:xf:Fu:g:i:hv", long_options, &option_index); ++ c = getopt_long(argc, argv, "rdnp:qc:xf:i:hv", long_options, &option_index); + if (c == -1) break; + + switch (c) { +@@ -983,8 +945,6 @@ + " -F, --cfg-stdin read configuration file from standard input\n" + " -p, --pidfile pidfile path\n"); + printf( +- " -u, --user user name that ndyndns should run as\n" +- " -g, --group group name that ndyndns should run as\n" + " -i, --interface interface ip to check (default: ppp0)\n" + " -r, --remote get ip from remote dyndns host (overrides -i)\n" + " -h, --help print this help and exit\n" +@@ -1060,14 +1020,6 @@ + cfg_set_pidfile(optarg); + break; + +- case 'u': +- cfg_set_user(optarg); +- break; +- +- case 'g': +- cfg_set_group(optarg); +- break; +- + case 'i': + cfg_set_interface(optarg); + break; +@@ -1095,7 +1047,6 @@ + + /* Note that failure cases are handled by called fns. */ + imprison(get_chroot()); +- drop_root(cfg_uid, cfg_gid); + + /* Cover our tracks... */ + wipe_chroot(); diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile new file mode 100644 index 0000000..05de29b --- /dev/null +++ b/net/net-snmp/Makefile @@ -0,0 +1,262 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=net-snmp +PKG_VERSION:=5.4.2.1 +PKG_RELEASE:=5 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/net-snmp +PKG_MD5SUM:=984932520143f0c8bf7b7ce1fc9e1da1 + +PKG_FIXUP = libtool no-autoreconf + +include $(INCLUDE_DIR)/package.mk + +define Package/net-snmp/Default + SECTION:=net + CATEGORY:=Network + URL:=http://www.net-snmp.org/ +endef + +define Package/net-snmp/Default/description + Simple Network Management Protocol (SNMP) is a widely used protocol for + monitoring the health and welfare of network equipment (eg. routers), + computer equipment and even devices like UPSs. Net-SNMP is a suite of + applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both + IPv4 and IPv6. +endef + + +define Package/libnetsnmp +$(call Package/net-snmp/Default) + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libelf + TITLE:=Open source SNMP implementation (libraries) +endef + +define Package/libnetsnmp/description +$(call Package/net-snmp/Default/description) + . + This package contains shared libraries, needed by other programs. +endef + + +define Package/snmp-utils +$(call Package/net-snmp/Default) + DEPENDS:=+libnetsnmp + TITLE:=Open source SNMP implementation (utilities) +endef + +define Package/snmp-utils/description +$(call Package/net-snmp/Default/description) + . + This package contains SNMP client utilities. +endef + + +define Package/snmpd +$(call Package/net-snmp/Default) + DEPENDS:=+libnetsnmp + TITLE:=Open source SNMP implementation (daemon) +endef + +define Package/snmpd/description +$(call Package/net-snmp/Default/description) + . + This package contains the SNMP agent, dynamically linked. +endef + + +define Package/snmpd-static +$(call Package/net-snmp/Default) + TITLE:=Open source SNMP implementation (daemon) + DEPENDS:=+libelf +endef + +define Package/snmpd-static/description +$(call Package/net-snmp/Default/description) + . + This package contains the SNMP agent, statically linked. +endef + + +SNMP_MIB_MODULES_INCLUDED = \ + host/hr_device \ + host/hr_disk \ + host/hr_filesys \ + host/hr_network \ + host/hr_partition \ + host/hr_proc \ + host/hr_storage \ + host/hr_system \ + ieee802dot11 \ + if-mib/ifXTable \ + mibII/at \ + mibII/icmp \ + mibII/ifTable \ + mibII/ip \ + mibII/snmp_mib \ + mibII/sysORTable \ + mibII/system_mib \ + mibII/tcp \ + mibII/udp \ + mibII/vacm_context \ + mibII/vacm_vars \ + snmpv3/snmpEngine \ + snmpv3/snmpMPDStats \ + snmpv3/usmConf \ + snmpv3/usmStats \ + snmpv3/usmUser \ + tunnel \ + ucd-snmp/disk \ + ucd-snmp/dlmod \ + ucd-snmp/extensible \ + ucd-snmp/loadave \ + ucd-snmp/memory \ + ucd-snmp/pass \ + ucd-snmp/proc \ + ucd-snmp/vmstat \ + util_funcs \ + utilities/execute \ + +SNMP_MIB_MODULES_EXCLUDED = \ + agent_mibs \ + agentx \ + disman/event \ + disman/schedule \ + hardware \ + host \ + if-mib \ + mibII \ + notification \ + notification-log-mib \ + snmpv3mibs \ + target \ + tcp-mib \ + ucd_snmp \ + udp-mib \ + utilities \ + +SNMP_TRANSPORTS_INCLUDED = Callback UDP + +SNMP_TRANSPORTS_EXCLUDED = TCP TCPIPv6 Unix + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --enable-mfd-rewrites \ + --enable-shared \ + --enable-static \ + --with-endianness=little \ + --with-logfile=/var/log/snmpd.log \ + --with-persistent-directory=/usr/lib/snmp/ \ + --with-default-snmp-version=1 \ + --with-sys-contact=root@localhost \ + --with-sys-location=Unknown \ + --enable-applications \ + --disable-debugging \ + --disable-manuals \ + --disable-mibs \ + --disable-scripts \ + --with-out-mib-modules="$(SNMP_MIB_MODULES_EXCLUDED)" \ + --with-mib-modules="$(SNMP_MIB_MODULES_INCLUDED)" \ + --with-out-transports="$(SNMP_TRANSPORTS_EXCLUDED)" \ + --with-transports="$(SNMP_TRANSPORTS_INCLUDED)" \ + --without-openssl \ + --without-libwrap \ + --without-rpm \ + --without-zlib \ + $(call autoconf_bool,CONFIG_IPV6,ipv6) \ + +ifeq ($(CONFIG_IPV6),y) +SNMP_TRANSPORTS_INCLUDED+= UDPIPv6 +endif + +TARGET_LDFLAGS += -L$(TOOLCHAIN_DIR)/usr/lib + +ifdef CONFIG_PACKAGE_snmpd-static + define Build/Compile/static + $(MAKE) -C $(PKG_BUILD_DIR)/agent \ + LDFLAGS="$(TARGET_LDFLAGS) -lm -static" \ + EXEEXT="-static" \ + snmpd-static + endef +endif + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ + LDFLAGS="$(TARGET_LDFLAGS) -lm -lc" \ + all install + $(Build/Compile/static) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(2)/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/net-snmp-config $(2)/bin/ + $(SED) 's,=/usr,=$(STAGING_DIR)/usr,g' $(2)/bin/net-snmp-config + + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/net-snmp $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.{a,so*} $(1)/usr/lib/ +endef + +define Package/libnetsnmp/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.so.* $(1)/usr/lib/ +endef + +define Package/snmpd/conffiles +/etc/default/snmpd +/etc/config/snmpd +endef + +define Package/snmpd/install + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/snmpd.conf $(1)/etc/config/snmpd + $(INSTALL_DIR) $(1)/etc/snmp + ln -sf /var/run/snmpd.conf $(1)/etc/snmp/ + $(INSTALL_DIR) $(1)/etc/default + $(INSTALL_DATA) ./files/snmpd.default $(1)/etc/default/snmpd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/snmpd.init $(1)/etc/init.d/snmpd + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/snmpd $(1)/usr/sbin/snmpd +endef + +define Package/snmpd-static/conffiles +/etc/default/snmpd +/etc/config/snmpd +endef + +define Package/snmpd-static/install + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/snmpd.conf $(1)/etc/config/snmpd + $(INSTALL_DIR) $(1)/etc/snmp + ln -sf /var/run/snmpd.conf $(1)/etc/snmp/ + $(INSTALL_DIR) $(1)/etc/default + $(INSTALL_DATA) ./files/snmpd.default $(1)/etc/default/snmpd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/snmpd.init $(1)/etc/init.d/snmpd + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/agent/snmpd-static $(1)/usr/sbin/snmpd +endef + +define Package/snmp-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/snmp{get,set,status,test,trap,walk} $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libnetsnmp)) +$(eval $(call BuildPackage,snmp-utils)) +$(eval $(call BuildPackage,snmpd)) +$(eval $(call BuildPackage,snmpd-static)) diff --git a/net/net-snmp/files/snmpd.conf b/net/net-snmp/files/snmpd.conf new file mode 100644 index 0000000..4bdc3d4 --- /dev/null +++ b/net/net-snmp/files/snmpd.conf @@ -0,0 +1,82 @@ +config agent + option agentaddress UDP:161 + +config com2sec public + option secname ro + option source default + option community public + +config com2sec private + option secname rw + option source localhost + option community private + +config group public_v1 + option group public + option version v1 + option secname ro + +config group public_v2c + option group public + option version v2c + option secname ro + +config group public_usm + option group public + option version usm + option secname ro + +config group private_v1 + option group private + option version v1 + option secname rw + +config group private_v2c + option group private + option version v2c + option secname rw + +config group private_usm + option group private + option version usm + option secname rw + +config view all + option viewname all + option type included + option oid .1 + +config access public_access + option group public + option context none + option version any + option level noauth + option prefix exact + option read all + option write none + option notify none + +config access private_access + option group private + option context none + option version any + option level noauth + option prefix exact + option read all + option write all + option notify all + +config system + option sysLocation 'office' + option sysContact 'bofh@example.com' + option sysName 'HeartOfGold' +# option sysServices 72 +# option sysDescr 'adult playground' +# option sysObjectID '1.2.3.4' + +config exec + option name filedescriptors + option prog /bin/cat + option args /proc/sys/fs/file-nr +# option miboid 1.2.3.4 + diff --git a/net/net-snmp/files/snmpd.default b/net/net-snmp/files/snmpd.default new file mode 100644 index 0000000..758c8e4 --- /dev/null +++ b/net/net-snmp/files/snmpd.default @@ -0,0 +1 @@ +OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid" diff --git a/net/net-snmp/files/snmpd.init b/net/net-snmp/files/snmpd.init new file mode 100644 index 0000000..770961e --- /dev/null +++ b/net/net-snmp/files/snmpd.init @@ -0,0 +1,135 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=50 + +DEFAULT=/etc/default/snmpd +LIB_D=/var/lib/snmp +LOG_D=/var/log +RUN_D=/var/run +PID_F=$RUN_D/snmpd.pid +RUN_C=$RUN_D/snmpd.conf + +snmpd_agent_add() { + local cfg="$1" + + config_get agentaddress "$cfg" agentaddress + [ -n "$agentaddress" ] || return 0 + echo "agentaddress $agentaddress" >> $RUN_C +} +snmpd_system_add() { + local cfg="$1" + config_get syslocation "$cfg" sysLocation + [ -n "$syslocation" ] && echo "sysLocation $syslocation" >> $RUN_C + config_get syscontact "$cfg" sysContact + [ -n "$syscontact" ] && echo "sysContact $syscontact" >> $RUN_C + config_get sysname "$cfg" sysName + [ -n "$sysname" ] && echo "sysName $sysname" >> $RUN_C + config_get sysservice "$cfg" sysService + [ -n "$sysservice" ] && echo "sysService $sysservice" >> $RUN_C + config_get sysdescr "$cfg" sysDescr + [ -n "$sysdescr" ] && echo "sysDescr $sysdescr" >> $RUN_C + config_get sysobjectid "$cfg" sysObjectID + [ -n "$sysobjectid" ] && echo "sysObjectID $sysobjectid" >> $RUN_C +} +snmpd_com2sec_add() { + local cfg="$1" + config_get secname "$cfg" secname + [ -n "$secname" ] || return 0 + config_get source "$cfg" source + [ -n "$source" ] || return 0 + config_get community "$cfg" community + [ -n "$community" ] || return 0 + echo "com2sec $secname $source $community" >> $RUN_C +} +snmpd_group_add() { + local cfg="$1" + config_get group "$cfg" group + [ -n "$group" ] || return 0 + config_get version "$cfg" version + [ -n "$version" ] || return 0 + config_get secname "$cfg" secname + [ -n "$secname" ] || return 0 + echo "group $group $version $secname" >> $RUN_C +} +snmpd_view_add() { + local cfg="$1" + config_get viewname "$cfg" viewname + [ -n "$viewname" ] || return 0 + config_get type "$cfg" type + [ -n "$type" ] || return 0 + config_get oid "$cfg" oid + [ -n "$oid" ] || return 0 + # optional mask + config_get mask "$cfg" mask + echo "view $viewname $type $oid $mask" >> $RUN_C +} +snmpd_access_add() { + local cfg="$1" + config_get group "$cfg" group + [ -n "$group" ] || return 0 + config_get context "$cfg" context + [ -n $context ] || return 0 + [ "$context" == "none" ] && context='""' + config_get version "$cfg" version + [ -n "$version" ] || return 0 + config_get level "$cfg" level + [ -n "$level" ] || return 0 + config_get prefix "$cfg" prefix + [ -n "$prefix" ] || return 0 + config_get read "$cfg" read + [ -n "$read" ] || return 0 + config_get write "$cfg" write + [ -n "$write" ] || return 0 + config_get notify "$cfg" notify + [ -n "$notify" ] || return 0 + echo "access $group $context $version $level $prefix $read $write $notify" >> $RUN_C +} +snmpd_pass_add() { + local cfg="$1" + local pass='pass' + + config_get miboid "$cfg" miboid + [ -n "$miboid" ] || return 0 + config_get prog "$cfg" prog + [ -n "$prog" ] || return 0 + config_get_bool persist "$cfg" persist 0 + [ $persist -ne 0 ] && pass='pass_persist' + config_get priority "$cfg" priority + priority=${priority:+-p $priority} + echo "$pass $priority $miboid $prog" >> $RUN_C +} +snmpd_exec_add() { + local cfg="$1" + + config_get name "$cfg" name + [ -n "$name" ] || return 0 + config_get prog "$cfg" prog + [ -n "$prog" ] || return 0 + config_get args "$cfg" args + config_get miboid "$cfg" miboid + echo "exec $miboid $name $prog $args" >> $RUN_C +} +start() { + [ -d $LIB_D ] || mkdir -p $LIB_D + [ -d $LOG_D ] || mkdir -p $LOG_D + [ -d $RUN_D ] || mkdir -p $RUN_D + [ -f $RUN_C ] && rm -f $RUN_C + + config_load snmpd + + config_foreach snmpd_agent_add agent + config_foreach snmpd_system_add system + config_foreach snmpd_com2sec_add com2sec + config_foreach snmpd_group_add group + config_foreach snmpd_view_add view + config_foreach snmpd_access_add access + config_foreach snmpd_pass_add pass + config_foreach snmpd_exec_add exec + + [ -f $DEFAULT ] && . $DEFAULT + $DEBUG /usr/sbin/snmpd $OPTIONS +} +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) + [ -f $RUN_C ] && rm -f $RUN_C +} diff --git a/net/net-snmp/patches/100-debian-statistics.patch b/net/net-snmp/patches/100-debian-statistics.patch new file mode 100644 index 0000000..af4d27a --- /dev/null +++ b/net/net-snmp/patches/100-debian-statistics.patch @@ -0,0 +1,22 @@ +--- a/agent/mibgroup/mibII/interfaces.c ++++ b/agent/mibgroup/mibII/interfaces.c +@@ -1550,6 +1550,10 @@ Interface_Scan_Init(void) + struct ifnet *nnew; + char *stats, *ifstart = line; + ++ /* Ignore interfaces with no statistics. */ ++ if (strstr(line, "No statistics available.")) ++ continue; ++ + if (line[strlen(line) - 1] == '\n') + line[strlen(line) - 1] = '\0'; + +@@ -1583,7 +1587,7 @@ Interface_Scan_Init(void) + &coll) != 5)) { + if ((scan_line_to_use == scan_line_2_2) + && !strstr(line, "No statistics available")) +- snmp_log(LOG_ERR, ++ snmp_log(LOG_DEBUG, + "/proc/net/dev data format error, line ==|%s|", + line); + continue; diff --git a/net/net-snmp/patches/110-debian-makefiles.patch b/net/net-snmp/patches/110-debian-makefiles.patch new file mode 100644 index 0000000..5ce771c --- /dev/null +++ b/net/net-snmp/patches/110-debian-makefiles.patch @@ -0,0 +1,40 @@ +--- a/local/Makefile.in ++++ b/local/Makefile.in +@@ -100,7 +100,7 @@ tkmib.made: $(srcdir)/tkmib + + mib2c.made: $(srcdir)/mib2c + if test "x$(PERL)" != "x" ; then \ +- $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%;s#/usr/local/share/snmp#$(snmplibdir)#;' ${srcdir}/mib2c > mib2c.made; \ ++ $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%;s#/usr/local/share/snmp#$(snmplibdir)#;s#/usr/local/etc/snmp#$(SNMPCONFPATH)#;' ${srcdir}/mib2c > mib2c.made; \ + else \ + touch mib2c.made; \ + fi +--- a/mibs/Makefile.in ++++ b/mibs/Makefile.in +@@ -48,11 +48,15 @@ NETSNMPMIBS = NET-SNMP-TC.txt NET-SNMP-M + UCDMIBS = UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \ + UCD-DLMOD-MIB.txt UCD-DISKIO-MIB.txt + ++EXTRAMIBS = BGP4-MIB.txt BRIDGE-MIB.txt GNOME-SMI.txt OSPF-MIB.txt \ ++ OSPF-TRAP-MIB.txt RIPv2-MIB.txt SOURCE-ROUTING-MIB.txt \ ++ LM-SENSORS-MIB.txt ++ + DEFAULTMIBS = @default_mibs_install@ + + MIBS = $(V1MIBS) $(V2MIBS) $(V3MIBS) $(RFCMIBS) \ + $(AGENTMIBS) $(IANAMIBS) \ +- $(NETSNMPMIBS) $(UCDMIBS) $(DEFAULTMIBS) ++ $(NETSNMPMIBS) $(UCDMIBS) $(DEFAULTMIBS) $(EXTRAMIBS) + + all: standardall + +--- a/Makefile.top ++++ b/Makefile.top +@@ -26,6 +26,7 @@ man8dir = $(mandir)/man8 + snmplibdir = $(datadir)/snmp + mibdir = $(snmplibdir)/mibs + persistentdir = @PERSISTENT_DIRECTORY@ ++sysconfdir = @sysconfdir@ + DESTDIR = @INSTALL_PREFIX@ + INSTALL_PREFIX = $(DESTDIR) + diff --git a/net/net-snmp/patches/120-debian-searchdirs.patch b/net/net-snmp/patches/120-debian-searchdirs.patch new file mode 100644 index 0000000..d8c88f3 --- /dev/null +++ b/net/net-snmp/patches/120-debian-searchdirs.patch @@ -0,0 +1,14 @@ +--- a/local/mib2c ++++ b/local/mib2c +@@ -60,8 +60,9 @@ $currentlevel = -1; + if($ENV{MIB2C_DIR}) { + push @def_search_dirs, split(/:/, $ENV{MIB2C_DIR}); + } +-push @def_search_dirs, "/usr/local/share/snmp/"; +-push @def_search_dirs, "/usr/local/share/snmp/mib2c-data"; ++push @def_search_dirs, "/etc/snmp/"; ++push @def_search_dirs, "/usr/share/snmp/"; ++push @def_search_dirs, "/usr/share/snmp/mib2c-data"; + push @def_search_dirs, "./mib2c-conf.d"; + + sub usage { diff --git a/net/net-snmp/patches/130-debian-extramibs.patch b/net/net-snmp/patches/130-debian-extramibs.patch new file mode 100644 index 0000000..e741ee7 --- /dev/null +++ b/net/net-snmp/patches/130-debian-extramibs.patch @@ -0,0 +1,6261 @@ +--- /dev/null ++++ b/mibs/BGP4-MIB.txt +@@ -0,0 +1,929 @@ ++ BGP4-MIB DEFINITIONS ::= BEGIN ++ ++ IMPORTS ++ MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, ++ IpAddress, Integer32, Counter32, Gauge32, mib-2 ++ FROM SNMPv2-SMI ++ MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP ++ FROM SNMPv2-CONF; ++ ++ bgp MODULE-IDENTITY ++ LAST-UPDATED "9902100000Z" ++ ORGANIZATION "IETF IDR Working Group" ++ CONTACT-INFO "E-mail: idr@merit.net ++ ++ Susan Hares (Editor) ++ Merit Network ++ 4251 Plymouth Road ++ Suite C ++ Ann Arbor, MI 48105-2785 ++ Tel: +1 734 936 2095 ++ Fax: +1 734 647 3185 ++ E-mail: skh@merit.edu ++ ++ Jeff Johnson (Editor) ++ RedBack Networks, Inc. ++ 1389 Moffett Park Drive ++ Sunnyvale, CA 94089-1134 ++ Tel: +1 408 548 3516 ++ Fax: +1 408 548 3599 ++ E-mail: jeff@redback.com" ++ DESCRIPTION ++ "The MIB module for BGP-4." ++ REVISION "9902100000Z" ++ DESCRIPTION ++ "Corrected duplicate OBJECT IDENTIFIER ++ assignment in the conformance information." ++ REVISION "9601080000Z" ++ DESCRIPTION ++ "1) Fixed the definitions of the traps to ++ make them equivalent to their initial ++ definition in RFC 1269. ++ 2) Added compliance and conformance info." ++ ::= { mib-2 15 } ++ ++ bgpVersion OBJECT-TYPE ++ SYNTAX OCTET STRING (SIZE (1..255)) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "Vector of supported BGP protocol version ++ numbers. Each peer negotiates the version ++ from this vector. Versions are identified ++ via the string of bits contained within this ++ object. The first octet contains bits 0 to ++ 7, the second octet contains bits 8 to 15, ++ and so on, with the most significant bit ++ referring to the lowest bit number in the ++ octet (e.g., the MSB of the first octet ++ refers to bit 0). If a bit, i, is present ++ and set, then the version (i+1) of the BGP ++ is supported." ++ ::= { bgp 1 } ++ ++ bgpLocalAs OBJECT-TYPE ++ SYNTAX INTEGER (0..65535) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The local autonomous system number." ++ ::= { bgp 2 } ++ ++ ++ ++ -- BGP Peer table. This table contains, one entry per BGP ++ -- peer, information about the BGP peer. ++ ++ bgpPeerTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF BgpPeerEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "BGP peer table. This table contains, ++ one entry per BGP peer, information about the ++ connections with BGP peers." ++ ::= { bgp 3 } ++ ++ bgpPeerEntry OBJECT-TYPE ++ SYNTAX BgpPeerEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "Entry containing information about the ++ connection with a BGP peer." ++ INDEX { bgpPeerRemoteAddr } ++ ::= { bgpPeerTable 1 } ++ ++ BgpPeerEntry ::= SEQUENCE { ++ bgpPeerIdentifier ++ IpAddress, ++ bgpPeerState ++ INTEGER, ++ bgpPeerAdminStatus ++ INTEGER, ++ bgpPeerNegotiatedVersion ++ Integer32, ++ bgpPeerLocalAddr ++ IpAddress, ++ bgpPeerLocalPort ++ INTEGER, ++ bgpPeerRemoteAddr ++ IpAddress, ++ bgpPeerRemotePort ++ INTEGER, ++ bgpPeerRemoteAs ++ INTEGER, ++ bgpPeerInUpdates ++ Counter32, ++ bgpPeerOutUpdates ++ Counter32, ++ bgpPeerInTotalMessages ++ Counter32, ++ bgpPeerOutTotalMessages ++ Counter32, ++ bgpPeerLastError ++ OCTET STRING, ++ bgpPeerFsmEstablishedTransitions ++ Counter32, ++ bgpPeerFsmEstablishedTime ++ Gauge32, ++ bgpPeerConnectRetryInterval ++ INTEGER, ++ bgpPeerHoldTime ++ INTEGER, ++ bgpPeerKeepAlive ++ INTEGER, ++ bgpPeerHoldTimeConfigured ++ INTEGER, ++ bgpPeerKeepAliveConfigured ++ INTEGER, ++ bgpPeerMinASOriginationInterval ++ INTEGER, ++ bgpPeerMinRouteAdvertisementInterval ++ INTEGER, ++ bgpPeerInUpdateElapsedTime ++ Gauge32 ++ } ++ ++ bgpPeerIdentifier OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The BGP Identifier of this entry's BGP peer." ++ ::= { bgpPeerEntry 1 } ++ ++ bgpPeerState OBJECT-TYPE ++ SYNTAX INTEGER { ++ idle(1), ++ connect(2), ++ active(3), ++ opensent(4), ++ openconfirm(5), ++ established(6) ++ } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The BGP peer connection state." ++ ::= { bgpPeerEntry 2 } ++ ++ bgpPeerAdminStatus OBJECT-TYPE ++ SYNTAX INTEGER { ++ stop(1), ++ start(2) ++ } ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "The desired state of the BGP connection. A ++ transition from 'stop' to 'start' will cause ++ the BGP Start Event to be generated. A ++ transition from 'start' to 'stop' will cause ++ the BGP Stop Event to be generated. This ++ parameter can be used to restart BGP peer ++ connections. Care should be used in providing ++ write access to this object without adequate ++ authentication." ++ ::= { bgpPeerEntry 3 } ++ ++ bgpPeerNegotiatedVersion OBJECT-TYPE ++ SYNTAX Integer32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The negotiated version of BGP running between ++ the two peers." ++ ::= { bgpPeerEntry 4 } ++ ++ bgpPeerLocalAddr OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The local IP address of this entry's BGP ++ connection." ++ ::= { bgpPeerEntry 5 } ++ ++ bgpPeerLocalPort OBJECT-TYPE ++ SYNTAX INTEGER (0..65535) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The local port for the TCP connection between ++ the BGP peers." ++ ::= { bgpPeerEntry 6 } ++ ++ bgpPeerRemoteAddr OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The remote IP address of this entry's BGP ++ peer." ++ ::= { bgpPeerEntry 7 } ++ ++ bgpPeerRemotePort OBJECT-TYPE ++ SYNTAX INTEGER (0..65535) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The remote port for the TCP connection between ++ the BGP peers. Note that the objects ++ bgpPeerLocalAddr, bgpPeerLocalPort, ++ bgpPeerRemoteAddr and bgpPeerRemotePort ++ provide the appropriate reference to the ++ standard MIB TCP connection table." ++ ::= { bgpPeerEntry 8 } ++ ++ bgpPeerRemoteAs OBJECT-TYPE ++ SYNTAX INTEGER (0..65535) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The remote autonomous system number." ++ ::= { bgpPeerEntry 9 } ++ ++ bgpPeerInUpdates OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of BGP UPDATE messages received on ++ this connection. This object should be ++ initialized to zero (0) when the connection is ++ established." ++ ::= { bgpPeerEntry 10 } ++ ++ bgpPeerOutUpdates OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of BGP UPDATE messages transmitted ++ on this connection. This object should be ++ initialized to zero (0) when the connection is ++ established." ++ ::= { bgpPeerEntry 11 } ++ ++ bgpPeerInTotalMessages OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The total number of messages received from the ++ remote peer on this connection. This object ++ should be initialized to zero when the ++ connection is established." ++ ::= { bgpPeerEntry 12 } ++ ++ bgpPeerOutTotalMessages OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The total number of messages transmitted to ++ the remote peer on this connection. This object ++ should be initialized to zero when the ++ connection is established." ++ ::= { bgpPeerEntry 13 } ++ ++ bgpPeerLastError OBJECT-TYPE ++ SYNTAX OCTET STRING (SIZE (2)) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The last error code and subcode seen by this ++ peer on this connection. If no error has ++ occurred, this field is zero. Otherwise, the ++ first byte of this two byte OCTET STRING ++ contains the error code, and the second byte ++ contains the subcode." ++ ::= { bgpPeerEntry 14 } ++ ++ bgpPeerFsmEstablishedTransitions OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The total number of times the BGP FSM ++ transitioned into the established state." ++ ::= { bgpPeerEntry 15 } ++ ++ bgpPeerFsmEstablishedTime OBJECT-TYPE ++ SYNTAX Gauge32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "This timer indicates how long (in seconds) this ++ peer has been in the Established state or how long ++ since this peer was last in the Established state. ++ It is set to zero when a new peer is configured or ++ the router is booted." ++ ::= { bgpPeerEntry 16 } ++ ++ bgpPeerConnectRetryInterval OBJECT-TYPE ++ SYNTAX INTEGER (1..65535) ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "Time interval in seconds for the ConnectRetry ++ timer. The suggested value for this timer is ++ 120 seconds." ++ ::= { bgpPeerEntry 17 } ++ ++ bgpPeerHoldTime OBJECT-TYPE ++ SYNTAX INTEGER ( 0 | 3..65535 ) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "Time interval in seconds for the Hold Timer ++ established with the peer. The value of this ++ object is calculated by this BGP speaker by ++ using the smaller of the value in ++ bgpPeerHoldTimeConfigured and the Hold Time ++ received in the OPEN message. This value ++ must be at lease three seconds if it is not ++ zero (0) in which case the Hold Timer has ++ not been established with the peer, or, the ++ value of bgpPeerHoldTimeConfigured is zero (0)." ++ ::= { bgpPeerEntry 18 } ++ ++ bgpPeerKeepAlive OBJECT-TYPE ++ SYNTAX INTEGER ( 0 | 1..21845 ) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "Time interval in seconds for the KeepAlive ++ timer established with the peer. The value of ++ this object is calculated by this BGP speaker ++ such that, when compared with bgpPeerHoldTime, ++ it has the same proportion as what ++ bgpPeerKeepAliveConfigured has when compared ++ with bgpPeerHoldTimeConfigured. If the value ++ of this object is zero (0), it indicates that ++ the KeepAlive timer has not been established ++ with the peer, or, the value of ++ bgpPeerKeepAliveConfigured is zero (0)." ++ ::= { bgpPeerEntry 19 } ++ ++ bgpPeerHoldTimeConfigured OBJECT-TYPE ++ SYNTAX INTEGER ( 0 | 3..65535 ) ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "Time interval in seconds for the Hold Time ++ configured for this BGP speaker with this peer. ++ This value is placed in an OPEN message sent to ++ this peer by this BGP speaker, and is compared ++ with the Hold Time field in an OPEN message ++ received from the peer when determining the Hold ++ Time (bgpPeerHoldTime) with the peer. This value ++ must not be less than three seconds if it is not ++ zero (0) in which case the Hold Time is NOT to be ++ established with the peer. The suggested value for ++ this timer is 90 seconds." ++ ::= { bgpPeerEntry 20 } ++ ++ bgpPeerKeepAliveConfigured OBJECT-TYPE ++ SYNTAX INTEGER ( 0 | 1..21845 ) ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "Time interval in seconds for the KeepAlive timer ++ configured for this BGP speaker with this peer. ++ The value of this object will only determine the ++ KEEPALIVE messages' frequency relative to the value ++ specified in bgpPeerHoldTimeConfigured; the actual ++ time interval for the KEEPALIVE messages is ++ indicated by bgpPeerKeepAlive. A reasonable ++ maximum value for this timer would be configured to ++ be one third of that of bgpPeerHoldTimeConfigured. ++ If the value of this object is zero (0), no ++ periodical KEEPALIVE messages are sent to the peer ++ after the BGP connection has been established. The ++ suggested value for this timer is 30 seconds." ++ ::= { bgpPeerEntry 21 } ++ ++ bgpPeerMinASOriginationInterval OBJECT-TYPE ++ SYNTAX INTEGER (1..65535) ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "Time interval in seconds for the ++ MinASOriginationInterval timer. ++ The suggested value for this timer is 15 seconds." ++ ::= { bgpPeerEntry 22 } ++ ++ bgpPeerMinRouteAdvertisementInterval OBJECT-TYPE ++ SYNTAX INTEGER (1..65535) ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "Time interval in seconds for the ++ MinRouteAdvertisementInterval timer. ++ The suggested value for this timer is 30 seconds." ++ ::= { bgpPeerEntry 23 } ++ ++ bgpPeerInUpdateElapsedTime OBJECT-TYPE ++ SYNTAX Gauge32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "Elapsed time in seconds since the last BGP ++ UPDATE message was received from the peer. ++ Each time bgpPeerInUpdates is incremented, ++ the value of this object is set to zero (0)." ++ ::= { bgpPeerEntry 24 } ++ ++ ++ ++ bgpIdentifier OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The BGP Identifier of local system." ++ ::= { bgp 4 } ++ ++ ++ ++ -- Received Path Attribute Table. This table contains, ++ -- one entry per path to a network, path attributes ++ -- received from all peers running BGP version 3 or less. ++ -- This table is obsolete, having been replaced in ++ -- functionality with the bgp4PathAttrTable. ++ ++ bgpRcvdPathAttrTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF BgpPathAttrEntry ++ MAX-ACCESS not-accessible ++ STATUS obsolete ++ DESCRIPTION ++ "The BGP Received Path Attribute Table contains ++ information about paths to destination networks ++ received from all peers running BGP version 3 or ++ less." ++ ::= { bgp 5 } ++ ++ bgpPathAttrEntry OBJECT-TYPE ++ SYNTAX BgpPathAttrEntry ++ MAX-ACCESS not-accessible ++ STATUS obsolete ++ DESCRIPTION ++ "Information about a path to a network." ++ INDEX { bgpPathAttrDestNetwork, ++ bgpPathAttrPeer } ++ ::= { bgpRcvdPathAttrTable 1 } ++ ++ BgpPathAttrEntry ::= SEQUENCE { ++ bgpPathAttrPeer ++ IpAddress, ++ bgpPathAttrDestNetwork ++ IpAddress, ++ bgpPathAttrOrigin ++ INTEGER, ++ bgpPathAttrASPath ++ OCTET STRING, ++ bgpPathAttrNextHop ++ IpAddress, ++ bgpPathAttrInterASMetric ++ Integer32 ++ } ++ ++ bgpPathAttrPeer OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS obsolete ++ DESCRIPTION ++ "The IP address of the peer where the path ++ information was learned." ++ ::= { bgpPathAttrEntry 1 } ++ ++ bgpPathAttrDestNetwork OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS obsolete ++ DESCRIPTION ++ "The address of the destination network." ++ ::= { bgpPathAttrEntry 2 } ++ ++ bgpPathAttrOrigin OBJECT-TYPE ++ SYNTAX INTEGER { ++ igp(1),-- networks are interior ++ egp(2),-- networks learned via EGP ++ incomplete(3) -- undetermined ++ } ++ MAX-ACCESS read-only ++ STATUS obsolete ++ DESCRIPTION ++ "The ultimate origin of the path information." ++ ::= { bgpPathAttrEntry 3 } ++ ++ bgpPathAttrASPath OBJECT-TYPE ++ SYNTAX OCTET STRING (SIZE (2..255)) ++ MAX-ACCESS read-only ++ STATUS obsolete ++ DESCRIPTION ++ "The set of ASs that must be traversed to reach ++ the network. This object is probably best ++ represented as SEQUENCE OF INTEGER. For SMI ++ compatibility, though, it is represented as ++ OCTET STRING. Each AS is represented as a pair ++ of octets according to the following algorithm: ++ ++ first-byte-of-pair = ASNumber / 256; ++ second-byte-of-pair = ASNumber & 255;" ++ ::= { bgpPathAttrEntry 4 } ++ ++ bgpPathAttrNextHop OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS obsolete ++ DESCRIPTION ++ "The address of the border router that should ++ be used for the destination network." ++ ::= { bgpPathAttrEntry 5 } ++ ++ bgpPathAttrInterASMetric OBJECT-TYPE ++ SYNTAX Integer32 ++ MAX-ACCESS read-only ++ STATUS obsolete ++ DESCRIPTION ++ "The optional inter-AS metric. If this ++ attribute has not been provided for this route, ++ the value for this object is 0." ++ ::= { bgpPathAttrEntry 6 } ++ ++ ++ ++ -- BGP-4 Received Path Attribute Table. This table contains, ++ -- one entry per path to a network, path attributes ++ -- received from all peers running BGP-4. ++ ++ bgp4PathAttrTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF Bgp4PathAttrEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "The BGP-4 Received Path Attribute Table contains ++ information about paths to destination networks ++ received from all BGP4 peers." ++ ::= { bgp 6 } ++ ++ bgp4PathAttrEntry OBJECT-TYPE ++ SYNTAX Bgp4PathAttrEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "Information about a path to a network." ++ INDEX { bgp4PathAttrIpAddrPrefix, ++ bgp4PathAttrIpAddrPrefixLen, ++ bgp4PathAttrPeer } ++ ::= { bgp4PathAttrTable 1 } ++ ++ Bgp4PathAttrEntry ::= SEQUENCE { ++ bgp4PathAttrPeer ++ IpAddress, ++ bgp4PathAttrIpAddrPrefixLen ++ INTEGER, ++ bgp4PathAttrIpAddrPrefix ++ IpAddress, ++ bgp4PathAttrOrigin ++ INTEGER, ++ bgp4PathAttrASPathSegment ++ OCTET STRING, ++ bgp4PathAttrNextHop ++ IpAddress, ++ bgp4PathAttrMultiExitDisc ++ INTEGER, ++ bgp4PathAttrLocalPref ++ INTEGER, ++ bgp4PathAttrAtomicAggregate ++ INTEGER, ++ bgp4PathAttrAggregatorAS ++ INTEGER, ++ bgp4PathAttrAggregatorAddr ++ IpAddress, ++ bgp4PathAttrCalcLocalPref ++ INTEGER, ++ bgp4PathAttrBest ++ INTEGER, ++ bgp4PathAttrUnknown ++ OCTET STRING ++ } ++ ++ bgp4PathAttrPeer OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP address of the peer where the path ++ information was learned." ++ ::= { bgp4PathAttrEntry 1 } ++ bgp4PathAttrIpAddrPrefixLen OBJECT-TYPE ++ SYNTAX INTEGER (0..32) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "Length in bits of the IP address prefix in the ++ Network Layer Reachability Information field." ++ ::= { bgp4PathAttrEntry 2 } ++ ++ bgp4PathAttrIpAddrPrefix OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "An IP address prefix in the Network Layer ++ Reachability Information field. This object ++ is an IP address containing the prefix with ++ length specified by bgp4PathAttrIpAddrPrefixLen. ++ Any bits beyond the length specified by ++ bgp4PathAttrIpAddrPrefixLen are zeroed." ++ ::= { bgp4PathAttrEntry 3 } ++ ++ bgp4PathAttrOrigin OBJECT-TYPE ++ SYNTAX INTEGER { ++ igp(1),-- networks are interior ++ egp(2),-- networks learned via EGP ++ incomplete(3) -- undetermined ++ } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The ultimate origin of the path information." ++ ::= { bgp4PathAttrEntry 4 } ++ ++ bgp4PathAttrASPathSegment OBJECT-TYPE ++ SYNTAX OCTET STRING (SIZE (2..255)) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The sequence of AS path segments. Each AS ++ path segment is represented by a triple ++ . ++ ++ The type is a 1-octet field which has two ++ possible values: ++ 1 AS_SET: unordered set of ASs a ++ route in the UPDATE message ++ has traversed ++ 2 AS_SEQUENCE: ordered set of ASs ++ a route in the UPDATE message ++ has traversed. ++ ++ The length is a 1-octet field containing the ++ number of ASs in the value field. ++ ++ The value field contains one or more AS ++ numbers, each AS is represented in the octet ++ string as a pair of octets according to the ++ following algorithm: ++ ++ first-byte-of-pair = ASNumber / 256; ++ second-byte-of-pair = ASNumber & 255;" ++ ::= { bgp4PathAttrEntry 5 } ++ ++ bgp4PathAttrNextHop OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The address of the border router that should ++ be used for the destination network." ++ ::= { bgp4PathAttrEntry 6 } ++ ++ bgp4PathAttrMultiExitDisc OBJECT-TYPE ++ SYNTAX INTEGER (-1..2147483647) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "This metric is used to discriminate between ++ multiple exit points to an adjacent autonomous ++ system. A value of -1 indicates the absence of ++ this attribute." ++ ::= { bgp4PathAttrEntry 7 } ++ ++ bgp4PathAttrLocalPref OBJECT-TYPE ++ SYNTAX INTEGER (-1..2147483647) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The originating BGP4 speaker's degree of ++ preference for an advertised route. A value of ++ -1 indicates the absence of this attribute." ++ ::= { bgp4PathAttrEntry 8 } ++ ++ bgp4PathAttrAtomicAggregate OBJECT-TYPE ++ SYNTAX INTEGER { ++ lessSpecificRrouteNotSelected(1), ++ lessSpecificRouteSelected(2) ++ } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "Whether or not a system has selected ++ a less specific route without selecting a ++ more specific route." ++ ::= { bgp4PathAttrEntry 9 } ++ ++ bgp4PathAttrAggregatorAS OBJECT-TYPE ++ SYNTAX INTEGER (0..65535) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The AS number of the last BGP4 speaker that ++ performed route aggregation. A value of zero (0) ++ indicates the absence of this attribute." ++ ::= { bgp4PathAttrEntry 10 } ++ ++ bgp4PathAttrAggregatorAddr OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP address of the last BGP4 speaker that ++ performed route aggregation. A value of ++ 0.0.0.0 indicates the absence of this attribute." ++ ::= { bgp4PathAttrEntry 11 } ++ ++ bgp4PathAttrCalcLocalPref OBJECT-TYPE ++ SYNTAX INTEGER (-1..2147483647) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The degree of preference calculated by the ++ receiving BGP4 speaker for an advertised route. ++ A value of -1 indicates the absence of this ++ attribute." ++ ::= { bgp4PathAttrEntry 12 } ++ ++ bgp4PathAttrBest OBJECT-TYPE ++ SYNTAX INTEGER { ++ false(1),-- not chosen as best route ++ true(2) -- chosen as best route ++ } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "An indication of whether or not this route ++ was chosen as the best BGP4 route." ++ ::= { bgp4PathAttrEntry 13 } ++ ++ bgp4PathAttrUnknown OBJECT-TYPE ++ SYNTAX OCTET STRING (SIZE(0..255)) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "One or more path attributes not understood ++ by this BGP4 speaker. Size zero (0) indicates ++ the absence of such attribute(s). Octets ++ beyond the maximum size, if any, are not ++ recorded by this object." ++ ::= { bgp4PathAttrEntry 14 } ++ ++ ++ -- Traps. ++ ++ -- note that in RFC 1657, bgpTraps was incorrectly ++ -- assigned a value of { bgp 7 }, and each of the ++ -- traps had the bgpPeerRemoteAddr object inappropriately ++ -- removed from their OBJECTS clause. The following ++ -- definitions restore the semantics of the traps as ++ -- they were initially defined in RFC 1269. ++ ++ -- { bgp 7 } is unused ++ ++ bgpTraps OBJECT IDENTIFIER ::= { bgp 0 } ++ ++ bgpEstablished NOTIFICATION-TYPE ++ OBJECTS { bgpPeerRemoteAddr, ++ bgpPeerLastError, ++ bgpPeerState } ++ STATUS current ++ DESCRIPTION ++ "The BGP Established event is generated when ++ the BGP FSM enters the ESTABLISHED state." ++ ::= { bgpTraps 1 } ++ ++ bgpBackwardTransition NOTIFICATION-TYPE ++ OBJECTS { bgpPeerRemoteAddr, ++ bgpPeerLastError, ++ bgpPeerState } ++ STATUS current ++ DESCRIPTION ++ "The BGPBackwardTransition Event is generated ++ when the BGP FSM moves from a higher numbered ++ state to a lower numbered state." ++ ::= { bgpTraps 2 } ++ ++ -- conformance information ++ ++ bgpMIBConformance OBJECT IDENTIFIER ::= { bgp 8 } ++ bgpMIBCompliances OBJECT IDENTIFIER ::= { bgpMIBConformance 1 } ++ bgpMIBGroups OBJECT IDENTIFIER ::= { bgpMIBConformance 2 } ++ ++ -- compliance statements ++ ++ bgpMIBCompliance MODULE-COMPLIANCE ++ STATUS current ++ DESCRIPTION ++ "The compliance statement for entities which ++ implement the BGP4 mib." ++ MODULE -- this module ++ MANDATORY-GROUPS { bgp4MIBGlobalsGroup, ++ bgp4MIBPeerGroup, ++ bgp4MIBPathAttrGroup, ++ bgp4MIBNotificationGroup } ++ ::= { bgpMIBCompliances 1 } ++ ++ -- units of conformance ++ ++ bgp4MIBGlobalsGroup OBJECT-GROUP ++ OBJECTS { bgpVersion, ++ bgpLocalAs, ++ bgpIdentifier } ++ STATUS current ++ DESCRIPTION ++ "A collection of objects providing information ++ on global BGP state." ++ ::= { bgpMIBGroups 1 } ++ ++ bgp4MIBPeerGroup OBJECT-GROUP ++ OBJECTS { bgpPeerIdentifier, ++ bgpPeerState, ++ bgpPeerAdminStatus, ++ bgpPeerNegotiatedVersion, ++ bgpPeerLocalAddr, ++ bgpPeerLocalPort, ++ bgpPeerRemoteAddr, ++ bgpPeerRemotePort, ++ bgpPeerRemoteAs, ++ bgpPeerInUpdates, ++ bgpPeerOutUpdates, ++ bgpPeerInTotalMessages, ++ bgpPeerOutTotalMessages, ++ bgpPeerLastError, ++ bgpPeerFsmEstablishedTransitions, ++ bgpPeerFsmEstablishedTime, ++ bgpPeerConnectRetryInterval, ++ bgpPeerHoldTime, ++ bgpPeerKeepAlive, ++ bgpPeerHoldTimeConfigured, ++ bgpPeerKeepAliveConfigured, ++ bgpPeerMinASOriginationInterval, ++ bgpPeerMinRouteAdvertisementInterval, ++ bgpPeerInUpdateElapsedTime } ++ STATUS current ++ DESCRIPTION ++ "A collection of objects for managing ++ BGP peers." ++ ::= { bgpMIBGroups 2 } ++ ++ bgp4MIBRcvdPathAttrGroup OBJECT-GROUP ++ OBJECTS { bgpPathAttrPeer, ++ bgpPathAttrDestNetwork, ++ bgpPathAttrOrigin, ++ bgpPathAttrASPath, ++ bgpPathAttrNextHop, ++ bgpPathAttrInterASMetric } ++ STATUS obsolete ++ DESCRIPTION ++ "A collection of objects for managing BGP ++ path entries. ++ ++ This conformance group is obsolete, ++ replaced by bgp4MIBPathAttrGroup." ++ ::= { bgpMIBGroups 3 } ++ ++ bgp4MIBPathAttrGroup OBJECT-GROUP ++ OBJECTS { bgp4PathAttrPeer, ++ bgp4PathAttrIpAddrPrefixLen, ++ bgp4PathAttrIpAddrPrefix, ++ bgp4PathAttrOrigin, ++ bgp4PathAttrASPathSegment, ++ bgp4PathAttrNextHop, ++ bgp4PathAttrMultiExitDisc, ++ bgp4PathAttrLocalPref, ++ bgp4PathAttrAtomicAggregate, ++ bgp4PathAttrAggregatorAS, ++ bgp4PathAttrAggregatorAddr, ++ bgp4PathAttrCalcLocalPref, ++ bgp4PathAttrBest, ++ bgp4PathAttrUnknown } ++ STATUS current ++ DESCRIPTION ++ "A collection of objects for managing ++ BGP path entries." ++ ::= { bgpMIBGroups 4 } ++ ++ bgp4MIBNotificationGroup NOTIFICATION-GROUP ++ NOTIFICATIONS { bgpEstablished, ++ bgpBackwardTransition } ++ STATUS current ++ DESCRIPTION ++ "A collection of notifications for signaling ++ changes in BGP peer relationships." ++ ::= { bgpMIBGroups 5 } ++ ++ END +--- /dev/null ++++ b/mibs/BRIDGE-MIB.txt +@@ -0,0 +1,1075 @@ ++BRIDGE-MIB DEFINITIONS ::= BEGIN ++ ++IMPORTS ++ Counter, TimeTicks ++ FROM RFC1155-SMI ++ mib-2 ++ FROM RFC1213-MIB ++ OBJECT-TYPE ++ FROM RFC-1212 ++ TRAP-TYPE ++ FROM RFC-1215; ++ ++-- All representations of MAC addresses in this MIB Module ++-- use, as a textual convention (i.e. this convention does ++-- not affect their encoding), the data type: ++MacAddress ::= OCTET STRING (SIZE (6)) -- a 6 octet address ++ -- in the ++ -- "canonical" ++ -- order ++-- defined by IEEE 802.1a, i.e., as if it were transmitted ++-- least significant bit first, even though 802.5 (in ++-- contrast to other n802.x protocols) requires MAC ++-- addresses to be transmitted most significant bit first. ++-- ++-- 16-bit addresses, if needed, are represented by setting ++-- their upper 4 octets to all 0's, i.e., AAFF would be ++-- represented as 00000000AAFF. ++ ++-- Similarly, all representations of Bridge-Id in this MIB ++-- Module use, as a textual convention (i.e. this ++-- convention does not affect their encoding), the data ++-- type: ++BridgeId ::= OCTET STRING (SIZE (8)) -- the ++ -- Bridge-Identifier ++ -- as used in the ++ -- Spanning Tree ++-- Protocol to uniquely identify a bridge. Its first two ++-- octets (in network byte order) contain a priority ++-- value and its last 6 octets contain the MAC address ++-- used to refer to a bridge in a unique fashion ++-- (typically, the numerically smallest MAC address ++-- of all ports on the bridge). ++ ++-- Several objects in this MIB module represent values of ++-- timers used by the Spanning Tree Protocol. In this ++-- MIB, these timers have values in units of hundreths of ++-- a second (i.e. 1/100 secs). ++-- These timers, when stored in a Spanning Tree Protocol's ++-- BPDU, are in units of 1/256 seconds. Note, however, ++-- that 802.1D-1990 specifies a settable granularity of ++-- no more than 1 second for these timers. To avoid ++-- ambiguity, a data type is defined here as a textual ++-- convention and all representation of these timers ++-- in this MIB module are defined using this data type. An ++-- algorithm is also defined for converting between the ++-- different units, to ensure a timer's value is not ++-- distorted by multiple conversions. ++-- The data type is: ++ ++Timeout ::= INTEGER -- a STP timer in units of 1/100 seconds ++ ++-- To convert a Timeout value into a value in units of ++-- 1/256 seconds, the following algorithm should be used: ++-- ++-- b = floor( (n * 256) / 100) ++-- ++-- where: ++-- floor = quotient [ignore remainder] ++-- n is the value in 1/100 second units ++-- b is the value in 1/256 second units ++-- ++-- To convert the value from 1/256 second units back to ++-- 1/100 seconds, the following algorithm should be used: ++-- ++-- n = ceiling( (b * 100) / 256) ++-- ++-- where: ++-- ceiling = quotient [if remainder is 0], or ++-- quotient + 1 [if remainder is non-zero] ++-- n is the value in 1/100 second units ++-- b is the value in 1/256 second units ++-- ++-- Note: it is important that the arithmetic operations are ++-- done in the order specified (i.e., multiply first, divide ++-- second). ++ ++ dot1dBridge OBJECT IDENTIFIER ::= { mib-2 17 } ++ ++-- groups in the Bridge MIB ++ ++dot1dBase OBJECT IDENTIFIER ::= { dot1dBridge 1 } ++ ++dot1dStp OBJECT IDENTIFIER ::= { dot1dBridge 2 } ++ ++dot1dSr OBJECT IDENTIFIER ::= { dot1dBridge 3 } ++-- separately documented ++ ++dot1dTp OBJECT IDENTIFIER ::= { dot1dBridge 4 } ++ ++dot1dStatic OBJECT IDENTIFIER ::= { dot1dBridge 5 } ++ ++-- the dot1dBase group ++ ++-- Implementation of the dot1dBase group is mandatory for all ++-- bridges. ++ ++dot1dBaseBridgeAddress OBJECT-TYPE ++ SYNTAX MacAddress ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The MAC address used by this bridge when it must ++ be referred to in a unique fashion. It is ++ recommended that this be the numerically smallest ++ MAC address of all ports that belong to this ++ bridge. However it is only required to be unique. ++ When concatenated with dot1dStpPriority a unique ++ BridgeIdentifier is formed which is used in the ++ Spanning Tree Protocol." ++ REFERENCE ++ "IEEE 802.1D-1990: Sections 6.4.1.1.3 and 3.12.5" ++ ::= { dot1dBase 1 } ++ ++dot1dBaseNumPorts OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of ports controlled by this bridging ++ entity." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.4.1.1.3" ++ ::= { dot1dBase 2 } ++ ++dot1dBaseType OBJECT-TYPE ++ SYNTAX INTEGER { ++ unknown(1), ++ transparent-only(2), ++ sourceroute-only(3), ++ srt(4) ++ } ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "Indicates what type of bridging this bridge can ++ perform. If a bridge is actually performing a ++ certain type of bridging this will be indicated by ++ entries in the port table for the given type." ++ ::= { dot1dBase 3 } ++ ++-- The Generic Bridge Port Table ++ ++dot1dBasePortTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF Dot1dBasePortEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "A table that contains generic information about ++ every port that is associated with this bridge. ++ Transparent, source-route, and srt ports are ++ included." ++ ::= { dot1dBase 4 } ++ ++dot1dBasePortEntry OBJECT-TYPE ++ SYNTAX Dot1dBasePortEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "A list of information for each port of the ++ bridge." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.4.2, 6.6.1" ++ INDEX { dot1dBasePort } ++ ::= { dot1dBasePortTable 1 } ++ ++Dot1dBasePortEntry ::= ++ SEQUENCE { ++ dot1dBasePort ++ INTEGER, ++ dot1dBasePortIfIndex ++ INTEGER, ++ dot1dBasePortCircuit ++ ++ OBJECT IDENTIFIER, ++ dot1dBasePortDelayExceededDiscards ++ Counter, ++ dot1dBasePortMtuExceededDiscards ++ Counter ++ } ++ ++dot1dBasePort OBJECT-TYPE ++ SYNTAX INTEGER (1..65535) ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The port number of the port for which this entry ++ contains bridge management information." ++ ::= { dot1dBasePortEntry 1 } ++ ++dot1dBasePortIfIndex OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The value of the instance of the ifIndex object, ++ defined in MIB-II, for the interface corresponding ++ to this port." ++ ::= { dot1dBasePortEntry 2 } ++ ++dot1dBasePortCircuit OBJECT-TYPE ++ SYNTAX OBJECT IDENTIFIER ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "For a port which (potentially) has the same value ++ of dot1dBasePortIfIndex as another port on the ++ same bridge, this object contains the name of an ++ object instance unique to this port. For example, ++ in the case where multiple ports correspond one- ++ to-one with multiple X.25 virtual circuits, this ++ value might identify an (e.g., the first) object ++ instance associated with the X.25 virtual circuit ++ corresponding to this port. ++ ++ For a port which has a unique value of ++ dot1dBasePortIfIndex, this object can have the ++ value { 0 0 }." ++ ::= { dot1dBasePortEntry 3 } ++ ++dot1dBasePortDelayExceededDiscards OBJECT-TYPE ++ SYNTAX Counter ++ ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of frames discarded by this port due ++ to excessive transit delay through the bridge. It ++ is incremented by both transparent and source ++ route bridges." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.6.1.1.3" ++ ::= { dot1dBasePortEntry 4 } ++ ++dot1dBasePortMtuExceededDiscards OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of frames discarded by this port due ++ to an excessive size. It is incremented by both ++ transparent and source route bridges." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.6.1.1.3" ++ ::= { dot1dBasePortEntry 5 } ++ ++-- the dot1dStp group ++ ++-- Implementation of the dot1dStp group is optional. It is ++-- implemented by those bridges that support the Spanning Tree ++-- Protocol. ++ ++dot1dStpProtocolSpecification OBJECT-TYPE ++ SYNTAX INTEGER { ++ unknown(1), ++ decLb100(2), ++ ieee8021d(3) ++ } ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "An indication of what version of the Spanning ++ Tree Protocol is being run. The value ++ 'decLb100(2)' indicates the DEC LANbridge 100 ++ Spanning Tree protocol. IEEE 802.1d ++ implementations will return 'ieee8021d(3)'. If ++ future versions of the IEEE Spanning Tree Protocol ++ are released that are incompatible with the ++ current version a new value will be defined." ++ ++ ::= { dot1dStp 1 } ++ ++dot1dStpPriority OBJECT-TYPE ++ SYNTAX INTEGER (0..65535) ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The value of the write-able portion of the Bridge ++ ID, i.e., the first two octets of the (8 octet ++ long) Bridge ID. The other (last) 6 octets of the ++ Bridge ID are given by the value of ++ dot1dBaseBridgeAddress." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.3.7" ++ ::= { dot1dStp 2 } ++ ++dot1dStpTimeSinceTopologyChange OBJECT-TYPE ++ SYNTAX TimeTicks ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The time (in hundredths of a second) since the ++ last time a topology change was detected by the ++ bridge entity." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.8.1.1.3" ++ ::= { dot1dStp 3 } ++ ++dot1dStpTopChanges OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The total number of topology changes detected by ++ this bridge since the management entity was last ++ reset or initialized." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.8.1.1.3" ++ ::= { dot1dStp 4 } ++ ++dot1dStpDesignatedRoot OBJECT-TYPE ++ SYNTAX BridgeId ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The bridge identifier of the root of the spanning ++ tree as determined by the Spanning Tree Protocol ++ as executed by this node. This value is used as ++ ++ the Root Identifier parameter in all Configuration ++ Bridge PDUs originated by this node." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.3.1" ++ ::= { dot1dStp 5 } ++ ++dot1dStpRootCost OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The cost of the path to the root as seen from ++ this bridge." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.3.2" ++ ::= { dot1dStp 6 } ++ ++dot1dStpRootPort OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The port number of the port which offers the ++ lowest cost path from this bridge to the root ++ bridge." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.3.3" ++ ::= { dot1dStp 7 } ++ ++dot1dStpMaxAge OBJECT-TYPE ++ SYNTAX Timeout ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The maximum age of Spanning Tree Protocol ++ information learned from the network on any port ++ before it is discarded, in units of hundredths of ++ a second. This is the actual value that this ++ bridge is currently using." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.3.4" ++ ::= { dot1dStp 8 } ++ ++dot1dStpHelloTime OBJECT-TYPE ++ SYNTAX Timeout ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ ++ "The amount of time between the transmission of ++ Configuration bridge PDUs by this node on any port ++ when it is the root of the spanning tree or trying ++ to become so, in units of hundredths of a second. ++ This is the actual value that this bridge is ++ currently using." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.3.5" ++ ::= { dot1dStp 9 } ++ ++dot1dStpHoldTime OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "This time value determines the interval length ++ during which no more than two Configuration bridge ++ PDUs shall be transmitted by this node, in units ++ of hundredths of a second." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.3.14" ++ ::= { dot1dStp 10 } ++ ++dot1dStpForwardDelay OBJECT-TYPE ++ SYNTAX Timeout ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "This time value, measured in units of hundredths ++ of a second, controls how fast a port changes its ++ spanning state when moving towards the Forwarding ++ state. The value determines how long the port ++ stays in each of the Listening and Learning ++ states, which precede the Forwarding state. This ++ value is also used, when a topology change has ++ been detected and is underway, to age all dynamic ++ entries in the Forwarding Database. [Note that ++ this value is the one that this bridge is ++ currently using, in contrast to ++ dot1dStpBridgeForwardDelay which is the value that ++ this bridge and all others would start using ++ if/when this bridge were to become the root.]" ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.3.6" ++ ::= { dot1dStp 11 } ++ ++dot1dStpBridgeMaxAge OBJECT-TYPE ++ SYNTAX Timeout (600..4000) ++ ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The value that all bridges use for MaxAge when ++ this bridge is acting as the root. Note that ++ 802.1D-1990 specifies that the range for this ++ parameter is related to the value of ++ dot1dStpBridgeHelloTime. The granularity of this ++ timer is specified by 802.1D-1990 to be 1 second. ++ An agent may return a badValue error if a set is ++ attempted to a value which is not a whole number ++ of seconds." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.3.8" ++ ::= { dot1dStp 12 } ++ ++dot1dStpBridgeHelloTime OBJECT-TYPE ++ SYNTAX Timeout (100..1000) ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The value that all bridges use for HelloTime when ++ this bridge is acting as the root. The ++ granularity of this timer is specified by 802.1D- ++ 1990 to be 1 second. An agent may return a ++ badValue error if a set is attempted to a value ++ which is not a whole number of seconds." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.3.9" ++ ::= { dot1dStp 13 } ++ ++dot1dStpBridgeForwardDelay OBJECT-TYPE ++ SYNTAX Timeout (400..3000) ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The value that all bridges use for ForwardDelay ++ when this bridge is acting as the root. Note that ++ 802.1D-1990 specifies that the range for this ++ parameter is related to the value of ++ dot1dStpBridgeMaxAge. The granularity of this ++ timer is specified by 802.1D-1990 to be 1 second. ++ An agent may return a badValue error if a set is ++ attempted to a value which is not a whole number ++ of seconds." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.3.10" ++ ::= { dot1dStp 14 } ++ ++-- The Spanning Tree Port Table ++ ++dot1dStpPortTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF Dot1dStpPortEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "A table that contains port-specific information ++ for the Spanning Tree Protocol." ++ ::= { dot1dStp 15 } ++ ++dot1dStpPortEntry OBJECT-TYPE ++ SYNTAX Dot1dStpPortEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "A list of information maintained by every port ++ about the Spanning Tree Protocol state for that ++ port." ++ INDEX { dot1dStpPort } ++ ::= { dot1dStpPortTable 1 } ++ ++Dot1dStpPortEntry ::= ++ SEQUENCE { ++ dot1dStpPort ++ INTEGER, ++ dot1dStpPortPriority ++ INTEGER, ++ dot1dStpPortState ++ INTEGER, ++ dot1dStpPortEnable ++ INTEGER, ++ dot1dStpPortPathCost ++ INTEGER, ++ dot1dStpPortDesignatedRoot ++ BridgeId, ++ dot1dStpPortDesignatedCost ++ INTEGER, ++ dot1dStpPortDesignatedBridge ++ BridgeId, ++ dot1dStpPortDesignatedPort ++ OCTET STRING, ++ dot1dStpPortForwardTransitions ++ Counter ++ } ++ ++dot1dStpPort OBJECT-TYPE ++ SYNTAX INTEGER (1..65535) ++ ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The port number of the port for which this entry ++ contains Spanning Tree Protocol management ++ information." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.8.2.1.2" ++ ::= { dot1dStpPortEntry 1 } ++ ++dot1dStpPortPriority OBJECT-TYPE ++ SYNTAX INTEGER (0..255) ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The value of the priority field which is ++ contained in the first (in network byte order) ++ octet of the (2 octet long) Port ID. The other ++ octet of the Port ID is given by the value of ++ dot1dStpPort." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.5.1" ++ ::= { dot1dStpPortEntry 2 } ++ ++dot1dStpPortState OBJECT-TYPE ++ SYNTAX INTEGER { ++ disabled(1), ++ blocking(2), ++ listening(3), ++ learning(4), ++ forwarding(5), ++ broken(6) ++ } ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The port's current state as defined by ++ application of the Spanning Tree Protocol. This ++ state controls what action a port takes on ++ reception of a frame. If the bridge has detected ++ a port that is malfunctioning it will place that ++ port into the broken(6) state. For ports which ++ are disabled (see dot1dStpPortEnable), this object ++ will have a value of disabled(1)." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.5.2" ++ ::= { dot1dStpPortEntry 3 } ++ ++dot1dStpPortEnable OBJECT-TYPE ++ SYNTAX INTEGER { ++ enabled(1), ++ disabled(2) ++ } ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The enabled/disabled status of the port." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.5.2" ++ ::= { dot1dStpPortEntry 4 } ++ ++dot1dStpPortPathCost OBJECT-TYPE ++ SYNTAX INTEGER (1..65535) ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The contribution of this port to the path cost of ++ paths towards the spanning tree root which include ++ this port. 802.1D-1990 recommends that the ++ default value of this parameter be in inverse ++ proportion to the speed of the attached LAN." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.5.3" ++ ::= { dot1dStpPortEntry 5 } ++ ++dot1dStpPortDesignatedRoot OBJECT-TYPE ++ SYNTAX BridgeId ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The unique Bridge Identifier of the Bridge ++ recorded as the Root in the Configuration BPDUs ++ transmitted by the Designated Bridge for the ++ segment to which the port is attached." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.5.4" ++ ::= { dot1dStpPortEntry 6 } ++ ++dot1dStpPortDesignatedCost OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The path cost of the Designated Port of the ++ segment connected to this port. This value is ++ compared to the Root Path Cost field in received ++ ++ bridge PDUs." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.5.5" ++ ::= { dot1dStpPortEntry 7 } ++ ++dot1dStpPortDesignatedBridge OBJECT-TYPE ++ SYNTAX BridgeId ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The Bridge Identifier of the bridge which this ++ port considers to be the Designated Bridge for ++ this port's segment." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.5.6" ++ ::= { dot1dStpPortEntry 8 } ++ ++dot1dStpPortDesignatedPort OBJECT-TYPE ++ SYNTAX OCTET STRING (SIZE (2)) ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The Port Identifier of the port on the Designated ++ Bridge for this port's segment." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 4.5.5.7" ++ ::= { dot1dStpPortEntry 9 } ++ ++dot1dStpPortForwardTransitions OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of times this port has transitioned ++ from the Learning state to the Forwarding state." ++ ::= { dot1dStpPortEntry 10 } ++ ++-- the dot1dTp group ++ ++-- Implementation of the dot1dTp group is optional. It is ++-- implemented by those bridges that support the transparent ++-- bridging mode. A transparent or SRT bridge will implement ++-- this group. ++ ++dot1dTpLearnedEntryDiscards OBJECT-TYPE ++ SYNTAX Counter ++ ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The total number of Forwarding Database entries, ++ which have been or would have been learnt, but ++ have been discarded due to a lack of space to ++ store them in the Forwarding Database. If this ++ counter is increasing, it indicates that the ++ Forwarding Database is regularly becoming full (a ++ condition which has unpleasant performance effects ++ on the subnetwork). If this counter has a ++ significant value but is not presently increasing, ++ it indicates that the problem has been occurring ++ but is not persistent." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.7.1.1.3" ++ ::= { dot1dTp 1 } ++ ++dot1dTpAgingTime OBJECT-TYPE ++ SYNTAX INTEGER (10..1000000) ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The timeout period in seconds for aging out ++ dynamically learned forwarding information. ++ 802.1D-1990 recommends a default of 300 seconds." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.7.1.1.3" ++ ::= { dot1dTp 2 } ++ ++-- The Forwarding Database for Transparent Bridges ++ ++dot1dTpFdbTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF Dot1dTpFdbEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "A table that contains information about unicast ++ entries for which the bridge has forwarding and/or ++ filtering information. This information is used ++ by the transparent bridging function in ++ determining how to propagate a received frame." ++ ::= { dot1dTp 3 } ++ ++dot1dTpFdbEntry OBJECT-TYPE ++ SYNTAX Dot1dTpFdbEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "Information about a specific unicast MAC address ++ for which the bridge has some forwarding and/or ++ filtering information." ++ INDEX { dot1dTpFdbAddress } ++ ::= { dot1dTpFdbTable 1 } ++ ++Dot1dTpFdbEntry ::= ++ SEQUENCE { ++ dot1dTpFdbAddress ++ MacAddress, ++ dot1dTpFdbPort ++ INTEGER, ++ dot1dTpFdbStatus ++ INTEGER ++ } ++ ++dot1dTpFdbAddress OBJECT-TYPE ++ SYNTAX MacAddress ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "A unicast MAC address for which the bridge has ++ forwarding and/or filtering information." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 3.9.1, 3.9.2" ++ ::= { dot1dTpFdbEntry 1 } ++ ++dot1dTpFdbPort OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "Either the value '0', or the port number of the ++ port on which a frame having a source address ++ equal to the value of the corresponding instance ++ of dot1dTpFdbAddress has been seen. A value of ++ '0' indicates that the port number has not been ++ learned but that the bridge does have some ++ forwarding/filtering information about this ++ address (e.g. in the dot1dStaticTable). ++ Implementors are encouraged to assign the port ++ value to this object whenever it is learned even ++ for addresses for which the corresponding value of ++ dot1dTpFdbStatus is not learned(3)." ++ ::= { dot1dTpFdbEntry 2 } ++ ++dot1dTpFdbStatus OBJECT-TYPE ++ SYNTAX INTEGER { ++ other(1), ++ invalid(2), ++ learned(3), ++ self(4), ++ mgmt(5) ++ } ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The status of this entry. The meanings of the ++ values are: ++ other(1) : none of the following. This would ++ include the case where some other ++ MIB object (not the corresponding ++ instance of dot1dTpFdbPort, nor an ++ entry in the dot1dStaticTable) is ++ being used to determine if and how ++ frames addressed to the value of ++ the corresponding instance of ++ dot1dTpFdbAddress are being ++ forwarded. ++ invalid(2) : this entry is not longer valid ++ (e.g., it was learned but has since ++ aged-out), but has not yet been ++ flushed from the table. ++ learned(3) : the value of the corresponding ++ instance of dot1dTpFdbPort was ++ learned, and is being used. ++ self(4) : the value of the corresponding ++ instance of dot1dTpFdbAddress ++ represents one of the bridge's ++ addresses. The corresponding ++ instance of dot1dTpFdbPort ++ indicates which of the bridge's ++ ports has this address. ++ mgmt(5) : the value of the corresponding ++ instance of dot1dTpFdbAddress is ++ also the value of an existing ++ instance of dot1dStaticAddress." ++ ::= { dot1dTpFdbEntry 3 } ++ ++-- Port Table for Transparent Bridges ++ ++dot1dTpPortTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF Dot1dTpPortEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "A table that contains information about every ++ port that is associated with this transparent ++ bridge." ++ ::= { dot1dTp 4 } ++ ++dot1dTpPortEntry OBJECT-TYPE ++ SYNTAX Dot1dTpPortEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "A list of information for each port of a ++ transparent bridge." ++ INDEX { dot1dTpPort } ++ ::= { dot1dTpPortTable 1 } ++ ++Dot1dTpPortEntry ::= ++ SEQUENCE { ++ dot1dTpPort ++ INTEGER, ++ dot1dTpPortMaxInfo ++ INTEGER, ++ dot1dTpPortInFrames ++ Counter, ++ dot1dTpPortOutFrames ++ Counter, ++ dot1dTpPortInDiscards ++ Counter ++ } ++ ++dot1dTpPort OBJECT-TYPE ++ SYNTAX INTEGER (1..65535) ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The port number of the port for which this entry ++ contains Transparent bridging management ++ information." ++ ::= { dot1dTpPortEntry 1 } ++ ++-- It would be nice if we could use ifMtu as the size of the ++-- largest INFO field, but we can't because ifMtu is defined ++-- to be the size that the (inter-)network layer can use which ++-- can differ from the MAC layer (especially if several layers ++-- of encapsulation are used). ++ ++dot1dTpPortMaxInfo OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The maximum size of the INFO (non-MAC) field that ++ this port will receive or transmit." ++ ::= { dot1dTpPortEntry 2 } ++ ++dot1dTpPortInFrames OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of frames that have been received by ++ this port from its segment. Note that a frame ++ received on the interface corresponding to this ++ port is only counted by this object if and only if ++ it is for a protocol being processed by the local ++ bridging function, including bridge management ++ frames." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.6.1.1.3" ++ ::= { dot1dTpPortEntry 3 } ++ ++dot1dTpPortOutFrames OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of frames that have been transmitted ++ by this port to its segment. Note that a frame ++ transmitted on the interface corresponding to this ++ port is only counted by this object if and only if ++ it is for a protocol being processed by the local ++ bridging function, including bridge management ++ frames." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.6.1.1.3" ++ ::= { dot1dTpPortEntry 4 } ++ ++dot1dTpPortInDiscards OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "Count of valid frames received which were ++ discarded (i.e., filtered) by the Forwarding ++ Process." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.6.1.1.3" ++ ::= { dot1dTpPortEntry 5 } ++-- The Static (Destination-Address Filtering) Database ++ ++-- Implementation of this group is optional. ++ ++dot1dStaticTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF Dot1dStaticEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "A table containing filtering information ++ configured into the bridge by (local or network) ++ management specifying the set of ports to which ++ frames received from specific ports and containing ++ specific destination addresses are allowed to be ++ forwarded. The value of zero in this table as the ++ port number from which frames with a specific ++ destination address are received, is used to ++ specify all ports for which there is no specific ++ entry in this table for that particular ++ destination address. Entries are valid for ++ unicast and for group/broadcast addresses." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.7.2" ++ ::= { dot1dStatic 1 } ++ ++dot1dStaticEntry OBJECT-TYPE ++ SYNTAX Dot1dStaticEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "Filtering information configured into the bridge ++ by (local or network) management specifying the ++ set of ports to which frames received from a ++ specific port and containing a specific ++ destination address are allowed to be forwarded." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 6.7.2" ++ INDEX { dot1dStaticAddress, dot1dStaticReceivePort } ++ ::= { dot1dStaticTable 1 } ++ ++Dot1dStaticEntry ::= ++ SEQUENCE { ++ dot1dStaticAddress ++ MacAddress, ++ dot1dStaticReceivePort ++ INTEGER, ++ dot1dStaticAllowedToGoTo ++ OCTET STRING, ++ dot1dStaticStatus ++ INTEGER ++ } ++ ++dot1dStaticAddress OBJECT-TYPE ++ SYNTAX MacAddress ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The destination MAC address in a frame to which ++ this entry's filtering information applies. This ++ object can take the value of a unicast address, a ++ group address or the broadcast address." ++ REFERENCE ++ "IEEE 802.1D-1990: Section 3.9.1, 3.9.2" ++ ::= { dot1dStaticEntry 1 } ++ ++dot1dStaticReceivePort OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "Either the value '0', or the port number of the ++ port from which a frame must be received in order ++ for this entry's filtering information to apply. ++ A value of zero indicates that this entry applies ++ on all ports of the bridge for which there is no ++ other applicable entry." ++ ::= { dot1dStaticEntry 2 } ++ ++dot1dStaticAllowedToGoTo OBJECT-TYPE ++ SYNTAX OCTET STRING ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The set of ports to which frames received from a ++ specific port and destined for a specific MAC ++ ++ address, are allowed to be forwarded. Each octet ++ within the value of this object specifies a set of ++ eight ports, with the first octet specifying ports ++ 1 through 8, the second octet specifying ports 9 ++ through 16, etc. Within each octet, the most ++ significant bit represents the lowest numbered ++ port, and the least significant bit represents the ++ highest numbered port. Thus, each port of the ++ bridge is represented by a single bit within the ++ value of this object. If that bit has a value of ++ '1' then that port is included in the set of ++ ports; the port is not included if its bit has a ++ value of '0'. (Note that the setting of the bit ++ corresponding to the port from which a frame is ++ received is irrelevant.) The default value of ++ this object is a string of ones of appropriate ++ length." ++ ::= { dot1dStaticEntry 3 } ++ ++dot1dStaticStatus OBJECT-TYPE ++ SYNTAX INTEGER { ++ other(1), ++ invalid(2), ++ permanent(3), ++ deleteOnReset(4), ++ deleteOnTimeout(5) ++ } ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "This object indicates the status of this entry. ++ The default value is permanent(3). ++ other(1) - this entry is currently in use but ++ the conditions under which it will ++ remain so are different from each of the ++ following values. ++ invalid(2) - writing this value to the object ++ removes the corresponding entry. ++ permanent(3) - this entry is currently in use ++ and will remain so after the next reset ++ of the bridge. ++ deleteOnReset(4) - this entry is currently in ++ use and will remain so until the next ++ reset of the bridge. ++ deleteOnTimeout(5) - this entry is currently ++ in use and will remain so until it is ++ aged out." ++ ++ ::= { dot1dStaticEntry 4 } ++ ++-- Traps for use by Bridges ++ ++-- Traps for the Spanning Tree Protocol ++ ++newRoot TRAP-TYPE ++ ENTERPRISE dot1dBridge ++ DESCRIPTION ++ "The newRoot trap indicates that the sending agent ++ has become the new root of the Spanning Tree; the ++ trap is sent by a bridge soon after its election ++ as the new root, e.g., upon expiration of the ++ Topology Change Timer immediately subsequent to ++ its election. Implementation of this trap is ++ optional." ++ ::= 1 ++ ++topologyChange TRAP-TYPE ++ ENTERPRISE dot1dBridge ++ DESCRIPTION ++ "A topologyChange trap is sent by a bridge when ++ any of its configured ports transitions from the ++ Learning state to the Forwarding state, or from ++ the Forwarding state to the Blocking state. The ++ trap is not sent if a newRoot trap is sent for the ++ same transition. Implementation of this trap is ++ optional." ++ ::= 2 ++ ++END +--- /dev/null ++++ b/mibs/GNOME-SMI.txt +@@ -0,0 +1,88 @@ ++GNOME-SMI DEFINITIONS ::= BEGIN ++ ++IMPORTS ++ MODULE-IDENTITY, ++ OBJECT-IDENTITY, ++ enterprises ++ FROM SNMPv2-SMI; ++ ++gnome MODULE-IDENTITY ++ LAST-UPDATED "200709070000Z" ++ ORGANIZATION "GNOME project" ++ CONTACT-INFO ++ "GNU Network Object Model Environment project ++ ++ see http://www.gnome.org for contact persons of a particular ++ area or subproject of GNOME. ++ ++ Administrative contact for MIB module: ++ ++ Jochen Friedrich ++ Ramsaystr. 9 ++ 63450 Hanau ++ Germany ++ ++ email: jochen@scram.de" ++ DESCRIPTION ++ "The Structure of GNOME." ++ ++ -- revision history ++ ++ REVISION "200709070000Z" -- Sep 07, 2007 ++ DESCRIPTION ++ "Fixed wrong enterprise number (how comes this ++ typo was unnoticed for so long?)." ++ ++ REVISION "200505070000Z" -- May 07, 2005 ++ DESCRIPTION ++ "Added gnomeLDAP subtree for LDAP definitions." ++ ++ REVISION "200312070000Z" -- December 07, 2003 ++ DESCRIPTION ++ "Added gnomeSysadmin subtree for GNOME project system administration. ++ Updated contact info." ++ ++ REVISION "9809010000Z" -- September 01, 1998 ++ DESCRIPTION ++ "Initial version." ++ ++ ::= { enterprises 3319 } -- assigned by IANA ++ ++gnomeProducts OBJECT-IDENTITY ++ STATUS current ++ DESCRIPTION ++ "gnomeProducts is the root OBJECT IDENTIFIER from ++ which sysObjectID values are assigned." ++ ::= { gnome 1 } ++ ++gnomeMgmt OBJECT-IDENTITY ++ STATUS current ++ DESCRIPTION ++ "gnomeMgmt defines the subtree for production GNOME related ++ MIB registrations." ++ ::= { gnome 2 } ++ ++gnomeTest OBJECT-IDENTITY ++ STATUS current ++ DESCRIPTION ++ "gnomeTest defines the subtree for testing GNOME related ++ MIB registrations." ++ ::= { gnome 3 } ++ ++gnomeSysadmin OBJECT-IDENTITY ++ STATUS current ++ DESCRIPTION ++ "gnomeSysadmin defines the subtree for GNOME related Sysadmin ++ MIB registrations." ++ ::= { gnome 4 } ++ ++gnomeLDAP OBJECT-IDENTITY ++ STATUS current ++ DESCRIPTION ++ "gnomeLDAP defines the subtree for GNOME related LDAP ++ registrations." ++ ::= { gnome 5 } ++ ++-- more to come if necessary. ++ ++END +--- /dev/null ++++ b/mibs/OSPF-MIB.txt +@@ -0,0 +1,2723 @@ ++OSPF-MIB DEFINITIONS ::= BEGIN ++ ++ IMPORTS ++ MODULE-IDENTITY, OBJECT-TYPE, Counter32, Gauge32, ++ Integer32, IpAddress ++ FROM SNMPv2-SMI ++ TEXTUAL-CONVENTION, TruthValue, RowStatus ++ FROM SNMPv2-TC ++ MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF ++ mib-2 FROM RFC1213-MIB; ++ ++-- This MIB module uses the extended OBJECT-TYPE macro as ++-- defined in [9]. ++ ++ospf MODULE-IDENTITY ++ LAST-UPDATED "9501201225Z" -- Fri Jan 20 12:25:50 PST 1995 ++ ORGANIZATION "IETF OSPF Working Group" ++ CONTACT-INFO ++ " Fred Baker ++ Postal: Cisco Systems ++ 519 Lado Drive ++ Santa Barbara, California 93111 ++ Tel: +1 805 681 0115 ++ E-Mail: fred@cisco.com ++ ++ Rob Coltun ++ Postal: RainbowBridge Communications ++ Tel: (301) 340-9416 ++ E-Mail: rcoltun@rainbow-bridge.com" ++ DESCRIPTION ++ "The MIB module to describe the OSPF Version 2 ++ Protocol" ++ ::= { mib-2 14 } ++ ++-- The Area ID, in OSPF, has the same format as an IP Address, ++-- but has the function of defining a summarization point for ++-- Link State Advertisements ++ ++AreaID ::= TEXTUAL-CONVENTION ++ STATUS current ++ DESCRIPTION ++ "An OSPF Area Identifier." ++ SYNTAX IpAddress ++ ++ ++-- The Router ID, in OSPF, has the same format as an IP Address, ++-- but identifies the router independent of its IP Address. ++ ++RouterID ::= TEXTUAL-CONVENTION ++ STATUS current ++ DESCRIPTION ++ "A OSPF Router Identifier." ++ SYNTAX IpAddress ++ ++ ++-- The OSPF Metric is defined as an unsigned value in the range ++ ++Metric ::= TEXTUAL-CONVENTION ++ STATUS current ++ DESCRIPTION ++ "The OSPF Internal Metric." ++ SYNTAX Integer32 (0..'FFFF'h) ++ ++BigMetric ::= TEXTUAL-CONVENTION ++ STATUS current ++ DESCRIPTION ++ "The OSPF External Metric." ++ SYNTAX Integer32 (0..'FFFFFF'h) ++ ++-- Status Values ++ ++Status ::= TEXTUAL-CONVENTION ++ STATUS current ++ DESCRIPTION ++ "The status of an interface: 'enabled' indicates that ++ it is willing to communicate with other OSPF Routers, ++ while 'disabled' indicates that it is not." ++ SYNTAX INTEGER { enabled (1), disabled (2) } ++ ++-- Time Durations measured in seconds ++ ++PositiveInteger ::= TEXTUAL-CONVENTION ++ STATUS current ++ DESCRIPTION ++ "A positive integer. Values in excess are precluded as ++ unnecessary and prone to interoperability issues." ++ SYNTAX Integer32 (0..'7FFFFFFF'h) ++ ++HelloRange ::= TEXTUAL-CONVENTION ++ STATUS current ++ DESCRIPTION ++ "The range of intervals on which hello messages are ++ exchanged." ++ SYNTAX Integer32 (1..'FFFF'h) ++ ++UpToMaxAge ::= TEXTUAL-CONVENTION ++ STATUS current ++ DESCRIPTION ++ "The values that one might find or configure for ++ variables bounded by the maximum age of an LSA." ++ SYNTAX Integer32 (0..3600) ++ ++ ++-- The range of ifIndex ++ ++InterfaceIndex ::= TEXTUAL-CONVENTION ++ STATUS current ++ DESCRIPTION ++ "The range of ifIndex." ++ SYNTAX Integer32 ++ ++ ++-- Potential Priorities for the Designated Router Election ++ ++DesignatedRouterPriority ::= TEXTUAL-CONVENTION ++ STATUS current ++ DESCRIPTION ++ "The values defined for the priority of a system for ++ becoming the designated router." ++ SYNTAX Integer32 (0..'FF'h) ++ ++TOSType ::= TEXTUAL-CONVENTION ++ STATUS current ++ DESCRIPTION ++ "Type of Service is defined as a mapping to the IP Type of ++ Service Flags as defined in the IP Forwarding Table MIB ++ ++ +-----+-----+-----+-----+-----+-----+-----+-----+ ++ | | | | ++ | PRECEDENCE | TYPE OF SERVICE | 0 | ++ | | | | ++ +-----+-----+-----+-----+-----+-----+-----+-----+ ++ ++ IP TOS IP TOS ++ Field Policy Field Policy ++ ++ Contents Code Contents Code ++ 0 0 0 0 ==> 0 0 0 0 1 ==> 2 ++ 0 0 1 0 ==> 4 0 0 1 1 ==> 6 ++ 0 1 0 0 ==> 8 0 1 0 1 ==> 10 ++ 0 1 1 0 ==> 12 0 1 1 1 ==> 14 ++ 1 0 0 0 ==> 16 1 0 0 1 ==> 18 ++ 1 0 1 0 ==> 20 1 0 1 1 ==> 22 ++ 1 1 0 0 ==> 24 1 1 0 1 ==> 26 ++ 1 1 1 0 ==> 28 1 1 1 1 ==> 30 ++ ++ The remaining values are left for future definition." ++ SYNTAX Integer32 (0..30) ++ ++ ++-- OSPF General Variables ++ ++-- These parameters apply globally to the Router's ++-- OSPF Process. ++ ++ospfGeneralGroup OBJECT IDENTIFIER ::= { ospf 1 } ++ ++ ++ ospfRouterId OBJECT-TYPE ++ SYNTAX RouterID ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "A 32-bit integer uniquely identifying the ++ router in the Autonomous System. ++ ++ By convention, to ensure uniqueness, this ++ should default to the value of one of the ++ router's IP interface addresses." ++ REFERENCE ++ "OSPF Version 2, C.1 Global parameters" ++ ::= { ospfGeneralGroup 1 } ++ ++ ++ ospfAdminStat OBJECT-TYPE ++ SYNTAX Status ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "The administrative status of OSPF in the ++ router. The value 'enabled' denotes that the ++ OSPF Process is active on at least one inter- ++ face; 'disabled' disables it on all inter- ++ faces." ++ ::= { ospfGeneralGroup 2 } ++ ++ ospfVersionNumber OBJECT-TYPE ++ SYNTAX INTEGER { version2 (2) } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The current version number of the OSPF proto- ++ col is 2." ++ REFERENCE ++ "OSPF Version 2, Title" ++ ::= { ospfGeneralGroup 3 } ++ ++ ++ ospfAreaBdrRtrStatus OBJECT-TYPE ++ SYNTAX TruthValue ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "A flag to note whether this router is an area ++ border router." ++ REFERENCE ++ "OSPF Version 2, Section 3 Splitting the AS into ++ Areas" ++ ::= { ospfGeneralGroup 4 } ++ ++ ++ ospfASBdrRtrStatus OBJECT-TYPE ++ SYNTAX TruthValue ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "A flag to note whether this router is config- ++ ured as an Autonomous System border router." ++ REFERENCE ++ "OSPF Version 2, Section 3.3 Classification of ++ routers" ++ ::= { ospfGeneralGroup 5 } ++ ++ ospfExternLsaCount OBJECT-TYPE ++ SYNTAX Gauge32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of external (LS type 5) link-state ++ advertisements in the link-state database." ++ REFERENCE ++ "OSPF Version 2, Appendix A.4.5 AS external link ++ advertisements" ++ ::= { ospfGeneralGroup 6 } ++ ++ ++ ospfExternLsaCksumSum OBJECT-TYPE ++ SYNTAX Integer32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The 32-bit unsigned sum of the LS checksums of ++ the external link-state advertisements con- ++ tained in the link-state database. This sum ++ can be used to determine if there has been a ++ change in a router's link state database, and ++ to compare the link-state database of two ++ routers." ++ ::= { ospfGeneralGroup 7 } ++ ++ ++ ospfTOSSupport OBJECT-TYPE ++ SYNTAX TruthValue ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "The router's support for type-of-service rout- ++ ing." ++ REFERENCE ++ "OSPF Version 2, Appendix F.1.2 Optional TOS ++ support" ++ ::= { ospfGeneralGroup 8 } ++ ++ ospfOriginateNewLsas OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of new link-state advertisements ++ that have been originated. This number is in- ++ cremented each time the router originates a new ++ LSA." ++ ::= { ospfGeneralGroup 9 } ++ ++ ++ ospfRxNewLsas OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of link-state advertisements re- ++ ceived determined to be new instantiations. ++ This number does not include newer instantia- ++ tions of self-originated link-state advertise- ++ ments." ++ ::= { ospfGeneralGroup 10 } ++ ++ ospfExtLsdbLimit OBJECT-TYPE ++ SYNTAX Integer32 (-1..'7FFFFFFF'h) ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "The maximum number of non-default AS- ++ external-LSAs entries that can be stored in the ++ link-state database. If the value is -1, then ++ there is no limit. ++ ++ When the number of non-default AS-external-LSAs ++ in a router's link-state database reaches ++ ospfExtLsdbLimit, the router enters Overflow- ++ State. The router never holds more than ++ ospfExtLsdbLimit non-default AS-external-LSAs ++ in its database. OspfExtLsdbLimit MUST be set ++ identically in all routers attached to the OSPF ++ backbone and/or any regular OSPF area. (i.e., ++ OSPF stub areas and NSSAs are excluded)." ++ DEFVAL { -1 } ++ ::= { ospfGeneralGroup 11 } ++ ++ ospfMulticastExtensions OBJECT-TYPE ++ SYNTAX Integer32 ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "A Bit Mask indicating whether the router is ++ forwarding IP multicast (Class D) datagrams ++ based on the algorithms defined in the Multi- ++ cast Extensions to OSPF. ++ ++ Bit 0, if set, indicates that the router can ++ forward IP multicast datagrams in the router's ++ directly attached areas (called intra-area mul- ++ ticast routing). ++ ++ Bit 1, if set, indicates that the router can ++ forward IP multicast datagrams between OSPF ++ areas (called inter-area multicast routing). ++ ++ Bit 2, if set, indicates that the router can ++ forward IP multicast datagrams between Auto- ++ nomous Systems (called inter-AS multicast rout- ++ ing). ++ ++ Only certain combinations of bit settings are ++ allowed, namely: 0 (no multicast forwarding is ++ enabled), 1 (intra-area multicasting only), 3 ++ (intra-area and inter-area multicasting), 5 ++ (intra-area and inter-AS multicasting) and 7 ++ (multicasting everywhere). By default, no mul- ++ ticast forwarding is enabled." ++ DEFVAL { 0 } ++ ::= { ospfGeneralGroup 12 } ++ ++ ospfExitOverflowInterval OBJECT-TYPE ++ SYNTAX PositiveInteger ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "The number of seconds that, after entering ++ OverflowState, a router will attempt to leave ++ OverflowState. This allows the router to again ++ originate non-default AS-external-LSAs. When ++ set to 0, the router will not leave Overflow- ++ State until restarted." ++ DEFVAL { 0 } ++ ::= { ospfGeneralGroup 13 } ++ ++ ++ ospfDemandExtensions OBJECT-TYPE ++ SYNTAX TruthValue ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "The router's support for demand routing." ++ REFERENCE ++ "OSPF Version 2, Appendix on Demand Routing" ++ ::= { ospfGeneralGroup 14 } ++ ++ ++-- The OSPF Area Data Structure contains information ++-- regarding the various areas. The interfaces and ++-- virtual links are configured as part of these areas. ++-- Area 0.0.0.0, by definition, is the Backbone Area ++ ++ ++ ospfAreaTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF OspfAreaEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "Information describing the configured parame- ++ ters and cumulative statistics of the router's ++ attached areas." ++ REFERENCE ++ "OSPF Version 2, Section 6 The Area Data Struc- ++ ture" ++ ::= { ospf 2 } ++ ++ ++ ospfAreaEntry OBJECT-TYPE ++ SYNTAX OspfAreaEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "Information describing the configured parame- ++ ters and cumulative statistics of one of the ++ router's attached areas." ++ INDEX { ospfAreaId } ++ ::= { ospfAreaTable 1 } ++ ++OspfAreaEntry ::= ++ SEQUENCE { ++ ospfAreaId ++ AreaID, ++ ospfAuthType ++ Integer32, ++ ospfImportAsExtern ++ INTEGER, ++ ospfSpfRuns ++ Counter32, ++ ospfAreaBdrRtrCount ++ Gauge32, ++ ospfAsBdrRtrCount ++ Gauge32, ++ ospfAreaLsaCount ++ Gauge32, ++ ospfAreaLsaCksumSum ++ Integer32, ++ ospfAreaSummary ++ INTEGER, ++ ospfAreaStatus ++ RowStatus ++ } ++ ++ ospfAreaId OBJECT-TYPE ++ SYNTAX AreaID ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "A 32-bit integer uniquely identifying an area. ++ Area ID 0.0.0.0 is used for the OSPF backbone." ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ ::= { ospfAreaEntry 1 } ++ ++ ++ ospfAuthType OBJECT-TYPE ++ SYNTAX Integer32 ++ -- none (0), ++ -- simplePassword (1) ++ -- md5 (2) ++ -- reserved for specification by IANA (> 2) ++ MAX-ACCESS read-create ++ STATUS obsolete ++ DESCRIPTION ++ "The authentication type specified for an area. ++ Additional authentication types may be assigned ++ locally on a per Area basis." ++ REFERENCE ++ "OSPF Version 2, Appendix E Authentication" ++ DEFVAL { 0 } -- no authentication, by default ++ ::= { ospfAreaEntry 2 } ++ ++ ospfImportAsExtern OBJECT-TYPE ++ SYNTAX INTEGER { ++ importExternal (1), ++ importNoExternal (2), ++ importNssa (3) ++ } ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The area's support for importing AS external ++ link- state advertisements." ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ DEFVAL { importExternal } ++ ::= { ospfAreaEntry 3 } ++ ++ ++ ospfSpfRuns OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of times that the intra-area route ++ table has been calculated using this area's ++ link-state database. This is typically done ++ using Dijkstra's algorithm." ++ ::= { ospfAreaEntry 4 } ++ ++ ++ ospfAreaBdrRtrCount OBJECT-TYPE ++ SYNTAX Gauge32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The total number of area border routers reach- ++ able within this area. This is initially zero, ++ and is calculated in each SPF Pass." ++ ::= { ospfAreaEntry 5 } ++ ++ ospfAsBdrRtrCount OBJECT-TYPE ++ SYNTAX Gauge32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The total number of Autonomous System border ++ routers reachable within this area. This is ++ initially zero, and is calculated in each SPF ++ Pass." ++ ::= { ospfAreaEntry 6 } ++ ++ ++ ospfAreaLsaCount OBJECT-TYPE ++ SYNTAX Gauge32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The total number of link-state advertisements ++ in this area's link-state database, excluding ++ AS External LSA's." ++ ::= { ospfAreaEntry 7 } ++ ++ ++ ospfAreaLsaCksumSum OBJECT-TYPE ++ SYNTAX Integer32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The 32-bit unsigned sum of the link-state ad- ++ vertisements' LS checksums contained in this ++ area's link-state database. This sum excludes ++ external (LS type 5) link-state advertisements. ++ The sum can be used to determine if there has ++ been a change in a router's link state data- ++ base, and to compare the link-state database of ++ two routers." ++ DEFVAL { 0 } ++ ::= { ospfAreaEntry 8 } ++ ++ ospfAreaSummary OBJECT-TYPE ++ SYNTAX INTEGER { ++ noAreaSummary (1), ++ sendAreaSummary (2) ++ } ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The variable ospfAreaSummary controls the im- ++ port of summary LSAs into stub areas. It has ++ no effect on other areas. ++ ++ If it is noAreaSummary, the router will neither ++ originate nor propagate summary LSAs into the ++ stub area. It will rely entirely on its de- ++ fault route. ++ ++ If it is sendAreaSummary, the router will both ++ summarize and propagate summary LSAs." ++ DEFVAL { noAreaSummary } ++ ::= { ospfAreaEntry 9 } ++ ++ ++ ospfAreaStatus OBJECT-TYPE ++ SYNTAX RowStatus ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "This variable displays the status of the en- ++ try. Setting it to 'invalid' has the effect of ++ rendering it inoperative. The internal effect ++ (row removal) is implementation dependent." ++ ::= { ospfAreaEntry 10 } ++ ++ ++-- OSPF Area Default Metric Table ++ ++-- The OSPF Area Default Metric Table describes the metrics ++-- that a default Area Border Router will advertise into a ++-- Stub area. ++ ++ ++ ospfStubAreaTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF OspfStubAreaEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "The set of metrics that will be advertised by ++ a default Area Border Router into a stub area." ++ REFERENCE ++ "OSPF Version 2, Appendix C.2, Area Parameters" ++ ::= { ospf 3 } ++ ++ ++ ospfStubAreaEntry OBJECT-TYPE ++ SYNTAX OspfStubAreaEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "The metric for a given Type of Service that ++ will be advertised by a default Area Border ++ Router into a stub area." ++ REFERENCE ++ "OSPF Version 2, Appendix C.2, Area Parameters" ++ INDEX { ospfStubAreaId, ospfStubTOS } ++ ::= { ospfStubAreaTable 1 } ++ ++OspfStubAreaEntry ::= ++ SEQUENCE { ++ ospfStubAreaId ++ AreaID, ++ ospfStubTOS ++ TOSType, ++ ospfStubMetric ++ BigMetric, ++ ospfStubStatus ++ RowStatus, ++ ospfStubMetricType ++ INTEGER ++ } ++ ++ ospfStubAreaId OBJECT-TYPE ++ SYNTAX AreaID ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The 32 bit identifier for the Stub Area. On ++ creation, this can be derived from the in- ++ stance." ++ ::= { ospfStubAreaEntry 1 } ++ ++ ++ ospfStubTOS OBJECT-TYPE ++ SYNTAX TOSType ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The Type of Service associated with the ++ metric. On creation, this can be derived from ++ the instance." ++ ::= { ospfStubAreaEntry 2 } ++ ++ ++ ospfStubMetric OBJECT-TYPE ++ SYNTAX BigMetric ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The metric value applied at the indicated type ++ of service. By default, this equals the least ++ metric at the type of service among the inter- ++ faces to other areas." ++ ::= { ospfStubAreaEntry 3 } ++ ++ ++ ospfStubStatus OBJECT-TYPE ++ SYNTAX RowStatus ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "This variable displays the status of the en- ++ try. Setting it to 'invalid' has the effect of ++ rendering it inoperative. The internal effect ++ (row removal) is implementation dependent." ++ ::= { ospfStubAreaEntry 4 } ++ ++ ospfStubMetricType OBJECT-TYPE ++ SYNTAX INTEGER { ++ ospfMetric (1), -- OSPF Metric ++ comparableCost (2), -- external type 1 ++ nonComparable (3) -- external type 2 ++ } ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "This variable displays the type of metric ad- ++ vertised as a default route." ++ DEFVAL { ospfMetric } ++ ::= { ospfStubAreaEntry 5 } ++ ++-- OSPF Link State Database ++ ++-- The Link State Database contains the Link State ++-- Advertisements from throughout the areas that the ++-- device is attached to. ++ ++ ++ ospfLsdbTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF OspfLsdbEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "The OSPF Process's Link State Database." ++ REFERENCE ++ "OSPF Version 2, Section 12 Link State Adver- ++ tisements" ++ ::= { ospf 4 } ++ ++ ++ ospfLsdbEntry OBJECT-TYPE ++ SYNTAX OspfLsdbEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "A single Link State Advertisement." ++ INDEX { ospfLsdbAreaId, ospfLsdbType, ++ ospfLsdbLsid, ospfLsdbRouterId } ++ ::= { ospfLsdbTable 1 } ++ ++OspfLsdbEntry ::= ++ SEQUENCE { ++ ospfLsdbAreaId ++ AreaID, ++ ospfLsdbType ++ INTEGER, ++ ospfLsdbLsid ++ IpAddress, ++ ospfLsdbRouterId ++ RouterID, ++ ospfLsdbSequence ++ Integer32, ++ ospfLsdbAge ++ Integer32, ++ ospfLsdbChecksum ++ Integer32, ++ ospfLsdbAdvertisement ++ OCTET STRING ++ } ++ ospfLsdbAreaId OBJECT-TYPE ++ SYNTAX AreaID ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The 32 bit identifier of the Area from which ++ the LSA was received." ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ ::= { ospfLsdbEntry 1 } ++ ++-- External Link State Advertisements are permitted ++-- for backward compatibility, but should be displayed in ++-- the ospfExtLsdbTable rather than here. ++ ++ ospfLsdbType OBJECT-TYPE ++ SYNTAX INTEGER { ++ routerLink (1), ++ networkLink (2), ++ summaryLink (3), ++ asSummaryLink (4), ++ asExternalLink (5), -- but see ospfExtLsdbTable ++ multicastLink (6), ++ nssaExternalLink (7) ++ } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The type of the link state advertisement. ++ Each link state type has a separate advertise- ++ ment format." ++ REFERENCE ++ "OSPF Version 2, Appendix A.4.1 The Link State ++ Advertisement header" ++ ::= { ospfLsdbEntry 2 } ++ ++ ospfLsdbLsid OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The Link State ID is an LS Type Specific field ++ containing either a Router ID or an IP Address; ++ it identifies the piece of the routing domain ++ that is being described by the advertisement." ++ REFERENCE ++ "OSPF Version 2, Section 12.1.4 Link State ID" ++ ::= { ospfLsdbEntry 3 } ++ ospfLsdbRouterId OBJECT-TYPE ++ SYNTAX RouterID ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The 32 bit number that uniquely identifies the ++ originating router in the Autonomous System." ++ REFERENCE ++ "OSPF Version 2, Appendix C.1 Global parameters" ++ ::= { ospfLsdbEntry 4 } ++ ++-- Note that the OSPF Sequence Number is a 32 bit signed ++-- integer. It starts with the value '80000001'h, ++-- or -'7FFFFFFF'h, and increments until '7FFFFFFF'h ++-- Thus, a typical sequence number will be very negative. ++ ++ ospfLsdbSequence OBJECT-TYPE ++ SYNTAX Integer32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The sequence number field is a signed 32-bit ++ integer. It is used to detect old and dupli- ++ cate link state advertisements. The space of ++ sequence numbers is linearly ordered. The ++ larger the sequence number the more recent the ++ advertisement." ++ REFERENCE ++ "OSPF Version 2, Section 12.1.6 LS sequence ++ number" ++ ::= { ospfLsdbEntry 5 } ++ ++ ++ ospfLsdbAge OBJECT-TYPE ++ SYNTAX Integer32 -- Should be 0..MaxAge ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "This field is the age of the link state adver- ++ tisement in seconds." ++ REFERENCE ++ "OSPF Version 2, Section 12.1.1 LS age" ++ ::= { ospfLsdbEntry 6 } ++ ++ ospfLsdbChecksum OBJECT-TYPE ++ SYNTAX Integer32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "This field is the checksum of the complete ++ contents of the advertisement, excepting the ++ age field. The age field is excepted so that ++ an advertisement's age can be incremented ++ without updating the checksum. The checksum ++ used is the same that is used for ISO connec- ++ tionless datagrams; it is commonly referred to ++ as the Fletcher checksum." ++ REFERENCE ++ "OSPF Version 2, Section 12.1.7 LS checksum" ++ ::= { ospfLsdbEntry 7 } ++ ++ ++ ospfLsdbAdvertisement OBJECT-TYPE ++ SYNTAX OCTET STRING (SIZE (1..65535)) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The entire Link State Advertisement, including ++ its header." ++ REFERENCE ++ "OSPF Version 2, Section 12 Link State Adver- ++ tisements" ++ ::= { ospfLsdbEntry 8 } ++ ++ ++-- Address Range Table ++ ++-- The Address Range Table acts as an adjunct to the Area ++-- Table; It describes those Address Range Summaries that ++-- are configured to be propagated from an Area to reduce ++-- the amount of information about it which is known beyond ++-- its borders. ++ ++ ospfAreaRangeTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF OspfAreaRangeEntry ++ MAX-ACCESS not-accessible ++ STATUS obsolete ++ DESCRIPTION ++ "A range if IP addresses specified by an IP ++ address/IP network mask pair. For example, ++ class B address range of X.X.X.X with a network ++ mask of 255.255.0.0 includes all IP addresses ++ from X.X.0.0 to X.X.255.255" ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ ::= { ospf 5 } ++ ospfAreaRangeEntry OBJECT-TYPE ++ SYNTAX OspfAreaRangeEntry ++ MAX-ACCESS not-accessible ++ STATUS obsolete ++ DESCRIPTION ++ "A range if IP addresses specified by an IP ++ address/IP network mask pair. For example, ++ class B address range of X.X.X.X with a network ++ mask of 255.255.0.0 includes all IP addresses ++ from X.X.0.0 to X.X.255.255" ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ INDEX { ospfAreaRangeAreaId, ospfAreaRangeNet } ++ ::= { ospfAreaRangeTable 1 } ++ ++OspfAreaRangeEntry ::= ++ SEQUENCE { ++ ospfAreaRangeAreaId ++ AreaID, ++ ospfAreaRangeNet ++ IpAddress, ++ ospfAreaRangeMask ++ IpAddress, ++ ospfAreaRangeStatus ++ RowStatus, ++ ospfAreaRangeEffect ++ INTEGER ++ } ++ ++ ospfAreaRangeAreaId OBJECT-TYPE ++ SYNTAX AreaID ++ MAX-ACCESS read-only ++ STATUS obsolete ++ DESCRIPTION ++ "The Area the Address Range is to be found ++ within." ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ ::= { ospfAreaRangeEntry 1 } ++ ++ ++ ospfAreaRangeNet OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS obsolete ++ DESCRIPTION ++ "The IP Address of the Net or Subnet indicated ++ by the range." ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ ::= { ospfAreaRangeEntry 2 } ++ ++ ++ ospfAreaRangeMask OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-create ++ STATUS obsolete ++ DESCRIPTION ++ "The Subnet Mask that pertains to the Net or ++ Subnet." ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ ::= { ospfAreaRangeEntry 3 } ++ ++ ospfAreaRangeStatus OBJECT-TYPE ++ SYNTAX RowStatus ++ MAX-ACCESS read-create ++ STATUS obsolete ++ DESCRIPTION ++ "This variable displays the status of the en- ++ try. Setting it to 'invalid' has the effect of ++ rendering it inoperative. The internal effect ++ (row removal) is implementation dependent." ++ ::= { ospfAreaRangeEntry 4 } ++ ++ ++ ospfAreaRangeEffect OBJECT-TYPE ++ SYNTAX INTEGER { ++ advertiseMatching (1), ++ doNotAdvertiseMatching (2) ++ } ++ MAX-ACCESS read-create ++ STATUS obsolete ++ DESCRIPTION ++ "Subnets subsumed by ranges either trigger the ++ advertisement of the indicated summary (adver- ++ tiseMatching), or result in the subnet's not ++ being advertised at all outside the area." ++ DEFVAL { advertiseMatching } ++ ::= { ospfAreaRangeEntry 5 } ++ ++ ++ ++-- OSPF Host Table ++ ++-- The Host/Metric Table indicates what hosts are directly ++-- attached to the Router, and what metrics and types of ++-- service should be advertised for them. ++ ++ ospfHostTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF OspfHostEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "The list of Hosts, and their metrics, that the ++ router will advertise as host routes." ++ REFERENCE ++ "OSPF Version 2, Appendix C.6 Host route param- ++ eters" ++ ::= { ospf 6 } ++ ++ ++ ospfHostEntry OBJECT-TYPE ++ SYNTAX OspfHostEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "A metric to be advertised, for a given type of ++ service, when a given host is reachable." ++ INDEX { ospfHostIpAddress, ospfHostTOS } ++ ::= { ospfHostTable 1 } ++ ++OspfHostEntry ::= ++ SEQUENCE { ++ ospfHostIpAddress ++ IpAddress, ++ ospfHostTOS ++ TOSType, ++ ospfHostMetric ++ Metric, ++ ospfHostStatus ++ RowStatus, ++ ospfHostAreaID ++ AreaID ++ } ++ ++ ospfHostIpAddress OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP Address of the Host." ++ REFERENCE ++ "OSPF Version 2, Appendix C.6 Host route parame- ++ ters" ++ ::= { ospfHostEntry 1 } ++ ++ ++ ospfHostTOS OBJECT-TYPE ++ SYNTAX TOSType ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The Type of Service of the route being config- ++ ured." ++ REFERENCE ++ "OSPF Version 2, Appendix C.6 Host route parame- ++ ters" ++ ::= { ospfHostEntry 2 } ++ ++ ++ ospfHostMetric OBJECT-TYPE ++ SYNTAX Metric ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The Metric to be advertised." ++ REFERENCE ++ "OSPF Version 2, Appendix C.6 Host route parame- ++ ters" ++ ::= { ospfHostEntry 3 } ++ ++ ospfHostStatus OBJECT-TYPE ++ SYNTAX RowStatus ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "This variable displays the status of the en- ++ try. Setting it to 'invalid' has the effect of ++ rendering it inoperative. The internal effect ++ (row removal) is implementation dependent." ++ ::= { ospfHostEntry 4 } ++ ++ ++ ospfHostAreaID OBJECT-TYPE ++ SYNTAX AreaID ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The Area the Host Entry is to be found within. ++ By default, the area that a subsuming OSPF in- ++ terface is in, or 0.0.0.0" ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ ::= { ospfHostEntry 5 } ++ ++ ++-- OSPF Interface Table ++ ++-- The OSPF Interface Table augments the ipAddrTable ++-- with OSPF specific information. ++ ++ ospfIfTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF OspfIfEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "The OSPF Interface Table describes the inter- ++ faces from the viewpoint of OSPF." ++ REFERENCE ++ "OSPF Version 2, Appendix C.3 Router interface ++ parameters" ++ ::= { ospf 7 } ++ ++ ++ ospfIfEntry OBJECT-TYPE ++ SYNTAX OspfIfEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "The OSPF Interface Entry describes one inter- ++ face from the viewpoint of OSPF." ++ INDEX { ospfIfIpAddress, ospfAddressLessIf } ++ ::= { ospfIfTable 1 } ++ ++OspfIfEntry ::= ++ SEQUENCE { ++ ospfIfIpAddress ++ IpAddress, ++ ospfAddressLessIf ++ Integer32, ++ ospfIfAreaId ++ AreaID, ++ ospfIfType ++ INTEGER, ++ ospfIfAdminStat ++ Status, ++ ospfIfRtrPriority ++ DesignatedRouterPriority, ++ ospfIfTransitDelay ++ UpToMaxAge, ++ ospfIfRetransInterval ++ UpToMaxAge, ++ ospfIfHelloInterval ++ HelloRange, ++ ospfIfRtrDeadInterval ++ PositiveInteger, ++ ospfIfPollInterval ++ PositiveInteger, ++ ospfIfState ++ INTEGER, ++ ospfIfDesignatedRouter ++ IpAddress, ++ ospfIfBackupDesignatedRouter ++ IpAddress, ++ ospfIfEvents ++ Counter32, ++ ospfIfAuthType ++ INTEGER, ++ ospfIfAuthKey ++ OCTET STRING, ++ ospfIfStatus ++ RowStatus, ++ ospfIfMulticastForwarding ++ INTEGER, ++ ospfIfDemand ++ TruthValue ++ } ++ ++ ospfIfIpAddress OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP address of this OSPF interface." ++ ::= { ospfIfEntry 1 } ++ ++ ospfAddressLessIf OBJECT-TYPE ++ SYNTAX Integer32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "For the purpose of easing the instancing of ++ addressed and addressless interfaces; This ++ variable takes the value 0 on interfaces with ++ IP Addresses, and the corresponding value of ++ ifIndex for interfaces having no IP Address." ++ ::= { ospfIfEntry 2 } ++ ospfIfAreaId OBJECT-TYPE ++ SYNTAX AreaID ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "A 32-bit integer uniquely identifying the area ++ to which the interface connects. Area ID ++ 0.0.0.0 is used for the OSPF backbone." ++ DEFVAL { '00000000'H } -- 0.0.0.0 ++ ::= { ospfIfEntry 3 } ++ ++ ospfIfType OBJECT-TYPE ++ SYNTAX INTEGER { ++ broadcast (1), ++ nbma (2), ++ pointToPoint (3), ++ pointToMultipoint (5) ++ } ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The OSPF interface type. ++ ++ By way of a default, this field may be intuited ++ from the corresponding value of ifType. Broad- ++ cast LANs, such as Ethernet and IEEE 802.5, ++ take the value 'broadcast', X.25 and similar ++ technologies take the value 'nbma', and links ++ that are definitively point to point take the ++ value 'pointToPoint'." ++ ::= { ospfIfEntry 4 } ++ ++ ++ ospfIfAdminStat OBJECT-TYPE ++ SYNTAX Status ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The OSPF interface's administrative status. ++ The value formed on the interface, and the in- ++ terface will be advertised as an internal route ++ to some area. The value 'disabled' denotes ++ that the interface is external to OSPF." ++ DEFVAL { enabled } ++ ::= { ospfIfEntry 5 } ++ ++ ospfIfRtrPriority OBJECT-TYPE ++ SYNTAX DesignatedRouterPriority ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The priority of this interface. Used in ++ multi-access networks, this field is used in ++ the designated router election algorithm. The ++ value 0 signifies that the router is not eligi- ++ ble to become the designated router on this ++ particular network. In the event of a tie in ++ this value, routers will use their Router ID as ++ a tie breaker." ++ DEFVAL { 1 } ++ ::= { ospfIfEntry 6 } ++ ++ ++ ospfIfTransitDelay OBJECT-TYPE ++ SYNTAX UpToMaxAge ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The estimated number of seconds it takes to ++ transmit a link state update packet over this ++ interface." ++ DEFVAL { 1 } ++ ::= { ospfIfEntry 7 } ++ ++ ++ ospfIfRetransInterval OBJECT-TYPE ++ SYNTAX UpToMaxAge ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The number of seconds between link-state ad- ++ vertisement retransmissions, for adjacencies ++ belonging to this interface. This value is ++ also used when retransmitting database descrip- ++ tion and link-state request packets." ++ DEFVAL { 5 } ++ ::= { ospfIfEntry 8 } ++ ++ ++ ospfIfHelloInterval OBJECT-TYPE ++ SYNTAX HelloRange ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The length of time, in seconds, between the ++ Hello packets that the router sends on the in- ++ terface. This value must be the same for all ++ routers attached to a common network." ++ DEFVAL { 10 } ++ ::= { ospfIfEntry 9 } ++ ++ ++ ospfIfRtrDeadInterval OBJECT-TYPE ++ SYNTAX PositiveInteger ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The number of seconds that a router's Hello ++ packets have not been seen before it's neigh- ++ bors declare the router down. This should be ++ some multiple of the Hello interval. This ++ value must be the same for all routers attached ++ to a common network." ++ DEFVAL { 40 } ++ ::= { ospfIfEntry 10 } ++ ++ ++ ospfIfPollInterval OBJECT-TYPE ++ SYNTAX PositiveInteger ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The larger time interval, in seconds, between ++ the Hello packets sent to an inactive non- ++ broadcast multi- access neighbor." ++ DEFVAL { 120 } ++ ::= { ospfIfEntry 11 } ++ ++ ++ ospfIfState OBJECT-TYPE ++ SYNTAX INTEGER { ++ down (1), ++ loopback (2), ++ waiting (3), ++ pointToPoint (4), ++ designatedRouter (5), ++ backupDesignatedRouter (6), ++ otherDesignatedRouter (7) ++ } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The OSPF Interface State." ++ DEFVAL { down } ++ ::= { ospfIfEntry 12 } ++ ++ ++ ospfIfDesignatedRouter OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP Address of the Designated Router." ++ DEFVAL { '00000000'H } -- 0.0.0.0 ++ ::= { ospfIfEntry 13 } ++ ++ ++ ospfIfBackupDesignatedRouter OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP Address of the Backup Designated ++ Router." ++ DEFVAL { '00000000'H } -- 0.0.0.0 ++ ::= { ospfIfEntry 14 } ++ ++ ospfIfEvents OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of times this OSPF interface has ++ changed its state, or an error has occurred." ++ ::= { ospfIfEntry 15 } ++ ++ ++ ospfIfAuthKey OBJECT-TYPE ++ SYNTAX OCTET STRING (SIZE (0..256)) ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The Authentication Key. If the Area's Author- ++ ization Type is simplePassword, and the key ++ length is shorter than 8 octets, the agent will ++ left adjust and zero fill to 8 octets. ++ ++ Note that unauthenticated interfaces need no ++ authentication key, and simple password authen- ++ tication cannot use a key of more than 8 oc- ++ tets. Larger keys are useful only with authen- ++ tication mechanisms not specified in this docu- ++ ment. ++ ++ When read, ospfIfAuthKey always returns an Oc- ++ tet String of length zero." ++ REFERENCE ++ "OSPF Version 2, Section 9 The Interface Data ++ Structure" ++ DEFVAL { '0000000000000000'H } -- 0.0.0.0.0.0.0.0 ++ ::= { ospfIfEntry 16 } ++ ++ ospfIfStatus OBJECT-TYPE ++ SYNTAX RowStatus ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "This variable displays the status of the en- ++ try. Setting it to 'invalid' has the effect of ++ rendering it inoperative. The internal effect ++ (row removal) is implementation dependent." ++ ::= { ospfIfEntry 17 } ++ ++ ++ ospfIfMulticastForwarding OBJECT-TYPE ++ SYNTAX INTEGER { ++ blocked (1), -- no multicast forwarding ++ multicast (2), -- using multicast address ++ unicast (3) -- to each OSPF neighbor ++ } ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The way multicasts should forwarded on this ++ interface; not forwarded, forwarded as data ++ link multicasts, or forwarded as data link uni- ++ casts. Data link multicasting is not meaning- ++ ful on point to point and NBMA interfaces, and ++ setting ospfMulticastForwarding to 0 effective- ++ ly disables all multicast forwarding." ++ DEFVAL { blocked } ++ ::= { ospfIfEntry 18 } ++ ++ ++ ospfIfDemand OBJECT-TYPE ++ SYNTAX TruthValue ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "Indicates whether Demand OSPF procedures (hel- ++ lo supression to FULL neighbors and setting the ++ DoNotAge flag on proogated LSAs) should be per- ++ formed on this interface." ++ DEFVAL { false } ++ ::= { ospfIfEntry 19 } ++ ++ ++ ospfIfAuthType OBJECT-TYPE ++ SYNTAX INTEGER (0..255) ++ -- none (0), ++ -- simplePassword (1) ++ -- md5 (2) ++ -- reserved for specification by IANA (> 2) ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The authentication type specified for an in- ++ terface. Additional authentication types may ++ be assigned locally." ++ REFERENCE ++ "OSPF Version 2, Appendix E Authentication" ++ DEFVAL { 0 } -- no authentication, by default ++ ::= { ospfIfEntry 20 } ++ ++ ++-- OSPF Interface Metric Table ++ ++-- The Metric Table describes the metrics to be advertised ++-- for a specified interface at the various types of service. ++-- As such, this table is an adjunct of the OSPF Interface ++-- Table. ++ ++-- Types of service, as defined by RFC 791, have the ability ++-- to request low delay, high bandwidth, or reliable linkage. ++ ++-- For the purposes of this specification, the measure of ++-- bandwidth ++ ++-- Metric = 10^8 / ifSpeed ++ ++-- is the default value. For multiple link interfaces, note ++-- that ifSpeed is the sum of the individual link speeds. ++-- This yields a number having the following typical values: ++ ++-- Network Type/bit rate Metric ++ ++-- >= 100 MBPS 1 ++-- Ethernet/802.3 10 ++-- E1 48 ++-- T1 (ESF) 65 ++-- 64 KBPS 1562 ++-- 56 KBPS 1785 ++-- 19.2 KBPS 5208 ++-- 9.6 KBPS 10416 ++ ++-- Routes that are not specified use the default (TOS 0) metric ++ ++ ospfIfMetricTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF OspfIfMetricEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "The TOS metrics for a non-virtual interface ++ identified by the interface index." ++ REFERENCE ++ "OSPF Version 2, Appendix C.3 Router interface ++ parameters" ++ ::= { ospf 8 } ++ ++ ospfIfMetricEntry OBJECT-TYPE ++ SYNTAX OspfIfMetricEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "A particular TOS metric for a non-virtual in- ++ terface identified by the interface index." ++ REFERENCE ++ "OSPF Version 2, Appendix C.3 Router interface ++ parameters" ++ INDEX { ospfIfMetricIpAddress, ++ ospfIfMetricAddressLessIf, ++ ospfIfMetricTOS } ++ ::= { ospfIfMetricTable 1 } ++ ++OspfIfMetricEntry ::= ++ SEQUENCE { ++ ospfIfMetricIpAddress ++ IpAddress, ++ ospfIfMetricAddressLessIf ++ Integer32, ++ ospfIfMetricTOS ++ TOSType, ++ ospfIfMetricValue ++ Metric, ++ ospfIfMetricStatus ++ RowStatus ++ } ++ ++ ospfIfMetricIpAddress OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP address of this OSPF interface. On row ++ creation, this can be derived from the in- ++ stance." ++ ::= { ospfIfMetricEntry 1 } ++ ++ ospfIfMetricAddressLessIf OBJECT-TYPE ++ SYNTAX Integer32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "For the purpose of easing the instancing of ++ addressed and addressless interfaces; This ++ variable takes the value 0 on interfaces with ++ IP Addresses, and the value of ifIndex for in- ++ terfaces having no IP Address. On row crea- ++ tion, this can be derived from the instance." ++ ::= { ospfIfMetricEntry 2 } ++ ++ ++ ospfIfMetricTOS OBJECT-TYPE ++ SYNTAX TOSType ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The type of service metric being referenced. ++ On row creation, this can be derived from the ++ instance." ++ ::= { ospfIfMetricEntry 3 } ++ ++ ++ ospfIfMetricValue OBJECT-TYPE ++ SYNTAX Metric ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The metric of using this type of service on ++ this interface. The default value of the TOS 0 ++ Metric is 10^8 / ifSpeed." ++ ::= { ospfIfMetricEntry 4 } ++ ++ ospfIfMetricStatus OBJECT-TYPE ++ SYNTAX RowStatus ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "This variable displays the status of the en- ++ try. Setting it to 'invalid' has the effect of ++ rendering it inoperative. The internal effect ++ (row removal) is implementation dependent." ++ ::= { ospfIfMetricEntry 5 } ++ ++ ++-- OSPF Virtual Interface Table ++ ++-- The Virtual Interface Table describes the virtual ++-- links that the OSPF Process is configured to ++-- carry on. ++ ++ ospfVirtIfTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF OspfVirtIfEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "Information about this router's virtual inter- ++ faces." ++ REFERENCE ++ "OSPF Version 2, Appendix C.4 Virtual link ++ parameters" ++ ::= { ospf 9 } ++ ++ ++ ospfVirtIfEntry OBJECT-TYPE ++ SYNTAX OspfVirtIfEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "Information about a single Virtual Interface." ++ INDEX { ospfVirtIfAreaId, ospfVirtIfNeighbor } ++ ::= { ospfVirtIfTable 1 } ++ ++OspfVirtIfEntry ::= ++ SEQUENCE { ++ ospfVirtIfAreaId ++ AreaID, ++ ospfVirtIfNeighbor ++ RouterID, ++ ospfVirtIfTransitDelay ++ UpToMaxAge, ++ ospfVirtIfRetransInterval ++ UpToMaxAge, ++ ospfVirtIfHelloInterval ++ HelloRange, ++ ospfVirtIfRtrDeadInterval ++ PositiveInteger, ++ ospfVirtIfState ++ INTEGER, ++ ospfVirtIfEvents ++ Counter32, ++ ospfVirtIfAuthType ++ INTEGER, ++ ospfVirtIfAuthKey ++ OCTET STRING, ++ ospfVirtIfStatus ++ RowStatus ++ } ++ ++ ospfVirtIfAreaId OBJECT-TYPE ++ SYNTAX AreaID ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The Transit Area that the Virtual Link ++ traverses. By definition, this is not 0.0.0.0" ++ ::= { ospfVirtIfEntry 1 } ++ ++ ++ ospfVirtIfNeighbor OBJECT-TYPE ++ SYNTAX RouterID ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The Router ID of the Virtual Neighbor." ++ ::= { ospfVirtIfEntry 2 } ++ ++ ++ ospfVirtIfTransitDelay OBJECT-TYPE ++ SYNTAX UpToMaxAge ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The estimated number of seconds it takes to ++ transmit a link- state update packet over this ++ interface." ++ DEFVAL { 1 } ++ ::= { ospfVirtIfEntry 3 } ++ ++ ++ ospfVirtIfRetransInterval OBJECT-TYPE ++ SYNTAX UpToMaxAge ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The number of seconds between link-state ad- ++ vertisement retransmissions, for adjacencies ++ belonging to this interface. This value is ++ also used when retransmitting database descrip- ++ tion and link-state request packets. This ++ value should be well over the expected round- ++ trip time." ++ DEFVAL { 5 } ++ ::= { ospfVirtIfEntry 4 } ++ ++ ++ ospfVirtIfHelloInterval OBJECT-TYPE ++ SYNTAX HelloRange ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The length of time, in seconds, between the ++ Hello packets that the router sends on the in- ++ terface. This value must be the same for the ++ virtual neighbor." ++ DEFVAL { 10 } ++ ::= { ospfVirtIfEntry 5 } ++ ++ ++ ospfVirtIfRtrDeadInterval OBJECT-TYPE ++ SYNTAX PositiveInteger ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The number of seconds that a router's Hello ++ packets have not been seen before it's neigh- ++ bors declare the router down. This should be ++ some multiple of the Hello interval. This ++ value must be the same for the virtual neigh- ++ bor." ++ DEFVAL { 60 } ++ ::= { ospfVirtIfEntry 6 } ++ ++ ++ ospfVirtIfState OBJECT-TYPE ++ SYNTAX INTEGER { ++ down (1), -- these use the same encoding ++ pointToPoint (4) -- as the ospfIfTable ++ } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "OSPF virtual interface states." ++ DEFVAL { down } ++ ::= { ospfVirtIfEntry 7 } ++ ++ ++ ospfVirtIfEvents OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of state changes or error events on ++ this Virtual Link" ++ ::= { ospfVirtIfEntry 8 } ++ ++ ++ ospfVirtIfAuthKey OBJECT-TYPE ++ SYNTAX OCTET STRING (SIZE(0..256)) ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "If Authentication Type is simplePassword, the ++ device will left adjust and zero fill to 8 oc- ++ tets. ++ ++ Note that unauthenticated interfaces need no ++ authentication key, and simple password authen- ++ tication cannot use a key of more than 8 oc- ++ tets. Larger keys are useful only with authen- ++ tication mechanisms not specified in this docu- ++ ment. ++ ++ When read, ospfVifAuthKey always returns a ++ string of length zero." ++ REFERENCE ++ "OSPF Version 2, Section 9 The Interface Data ++ Structure" ++ DEFVAL { '0000000000000000'H } -- 0.0.0.0.0.0.0.0 ++ ::= { ospfVirtIfEntry 9 } ++ ++ ++ ospfVirtIfStatus OBJECT-TYPE ++ SYNTAX RowStatus ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "This variable displays the status of the en- ++ try. Setting it to 'invalid' has the effect of ++ rendering it inoperative. The internal effect ++ (row removal) is implementation dependent." ++ ::= { ospfVirtIfEntry 10 } ++ ++ ++ ospfVirtIfAuthType OBJECT-TYPE ++ SYNTAX INTEGER (0..255) ++ -- none (0), ++ -- simplePassword (1) ++ -- md5 (2) ++ -- reserved for specification by IANA (> 2) ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The authentication type specified for a virtu- ++ al interface. Additional authentication types ++ may be assigned locally." ++ REFERENCE ++ "OSPF Version 2, Appendix E Authentication" ++ DEFVAL { 0 } -- no authentication, by default ++ ::= { ospfVirtIfEntry 11 } ++ ++ ++-- OSPF Neighbor Table ++ ++-- The OSPF Neighbor Table describes all neighbors in ++-- the locality of the subject router. ++ ++ ospfNbrTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF OspfNbrEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "A table of non-virtual neighbor information." ++ REFERENCE ++ "OSPF Version 2, Section 10 The Neighbor Data ++ Structure" ++ ::= { ospf 10 } ++ ++ ++ ospfNbrEntry OBJECT-TYPE ++ SYNTAX OspfNbrEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "The information regarding a single neighbor." ++ REFERENCE ++ "OSPF Version 2, Section 10 The Neighbor Data ++ Structure" ++ INDEX { ospfNbrIpAddr, ospfNbrAddressLessIndex } ++ ::= { ospfNbrTable 1 } ++ ++OspfNbrEntry ::= ++ SEQUENCE { ++ ospfNbrIpAddr ++ IpAddress, ++ ospfNbrAddressLessIndex ++ InterfaceIndex, ++ ospfNbrRtrId ++ RouterID, ++ ospfNbrOptions ++ Integer32, ++ ospfNbrPriority ++ DesignatedRouterPriority, ++ ospfNbrState ++ INTEGER, ++ ospfNbrEvents ++ Counter32, ++ ospfNbrLsRetransQLen ++ Gauge32, ++ ospfNbmaNbrStatus ++ RowStatus, ++ ospfNbmaNbrPermanence ++ INTEGER, ++ ospfNbrHelloSuppressed ++ TruthValue ++ } ++ ++ ospfNbrIpAddr OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP address this neighbor is using in its ++ IP Source Address. Note that, on addressless ++ links, this will not be 0.0.0.0, but the ad- ++ dress of another of the neighbor's interfaces." ++ ::= { ospfNbrEntry 1 } ++ ++ ++ ospfNbrAddressLessIndex OBJECT-TYPE ++ SYNTAX InterfaceIndex ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "On an interface having an IP Address, zero. ++ On addressless interfaces, the corresponding ++ value of ifIndex in the Internet Standard MIB. ++ On row creation, this can be derived from the ++ instance." ++ ::= { ospfNbrEntry 2 } ++ ++ ++ ospfNbrRtrId OBJECT-TYPE ++ SYNTAX RouterID ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "A 32-bit integer (represented as a type IpAd- ++ dress) uniquely identifying the neighboring ++ router in the Autonomous System." ++ DEFVAL { '00000000'H } -- 0.0.0.0 ++ ::= { ospfNbrEntry 3 } ++ ++ ++ ospfNbrOptions OBJECT-TYPE ++ SYNTAX Integer32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "A Bit Mask corresponding to the neighbor's op- ++ tions field. ++ ++ Bit 0, if set, indicates that the system will ++ operate on Type of Service metrics other than ++ TOS 0. If zero, the neighbor will ignore all ++ metrics except the TOS 0 metric. ++ ++ Bit 1, if set, indicates that the associated ++ area accepts and operates on external informa- ++ tion; if zero, it is a stub area. ++ ++ Bit 2, if set, indicates that the system is ca- ++ pable of routing IP Multicast datagrams; i.e., ++ that it implements the Multicast Extensions to ++ OSPF. ++ ++ Bit 3, if set, indicates that the associated ++ area is an NSSA. These areas are capable of ++ carrying type 7 external advertisements, which ++ are translated into type 5 external advertise- ++ ments at NSSA borders." ++ REFERENCE ++ "OSPF Version 2, Section 12.1.2 Options" ++ DEFVAL { 0 } ++ ::= { ospfNbrEntry 4 } ++ ++ ++ ospfNbrPriority OBJECT-TYPE ++ SYNTAX DesignatedRouterPriority ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The priority of this neighbor in the designat- ++ ed router election algorithm. The value 0 sig- ++ nifies that the neighbor is not eligible to be- ++ come the designated router on this particular ++ network." ++ DEFVAL { 1 } ++ ::= { ospfNbrEntry 5 } ++ ++ ++ ospfNbrState OBJECT-TYPE ++ SYNTAX INTEGER { ++ down (1), ++ attempt (2), ++ init (3), ++ twoWay (4), ++ exchangeStart (5), ++ exchange (6), ++ loading (7), ++ full (8) ++ } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The State of the relationship with this Neigh- ++ bor." ++ REFERENCE ++ "OSPF Version 2, Section 10.1 Neighbor States" ++ DEFVAL { down } ++ ::= { ospfNbrEntry 6 } ++ ++ ++ ospfNbrEvents OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of times this neighbor relationship ++ has changed state, or an error has occurred." ++ ::= { ospfNbrEntry 7 } ++ ++ ++ ospfNbrLsRetransQLen OBJECT-TYPE ++ SYNTAX Gauge32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The current length of the retransmission ++ queue." ++ ::= { ospfNbrEntry 8 } ++ ++ ++ ospfNbmaNbrStatus OBJECT-TYPE ++ SYNTAX RowStatus ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "This variable displays the status of the en- ++ try. Setting it to 'invalid' has the effect of ++ rendering it inoperative. The internal effect ++ (row removal) is implementation dependent." ++ ::= { ospfNbrEntry 9 } ++ ++ ++ ospfNbmaNbrPermanence OBJECT-TYPE ++ SYNTAX INTEGER { ++ dynamic (1), -- learned through protocol ++ permanent (2) -- configured address ++ } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "This variable displays the status of the en- ++ try. 'dynamic' and 'permanent' refer to how ++ the neighbor became known." ++ DEFVAL { permanent } ++ ::= { ospfNbrEntry 10 } ++ ++ ++ ospfNbrHelloSuppressed OBJECT-TYPE ++ SYNTAX TruthValue ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "Indicates whether Hellos are being suppressed ++ to the neighbor" ++ ::= { ospfNbrEntry 11 } ++ ++ ++-- OSPF Virtual Neighbor Table ++ ++-- This table describes all virtual neighbors. ++-- Since Virtual Links are configured in the ++-- virtual interface table, this table is read-only. ++ ++ ospfVirtNbrTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF OspfVirtNbrEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "A table of virtual neighbor information." ++ REFERENCE ++ "OSPF Version 2, Section 15 Virtual Links" ++ ::= { ospf 11 } ++ ++ ++ ospfVirtNbrEntry OBJECT-TYPE ++ SYNTAX OspfVirtNbrEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "Virtual neighbor information." ++ INDEX { ospfVirtNbrArea, ospfVirtNbrRtrId } ++ ::= { ospfVirtNbrTable 1 } ++ ++OspfVirtNbrEntry ::= ++ SEQUENCE { ++ ospfVirtNbrArea ++ AreaID, ++ ospfVirtNbrRtrId ++ RouterID, ++ ospfVirtNbrIpAddr ++ IpAddress, ++ ospfVirtNbrOptions ++ Integer32, ++ ospfVirtNbrState ++ INTEGER, ++ ospfVirtNbrEvents ++ Counter32, ++ ospfVirtNbrLsRetransQLen ++ Gauge32, ++ ospfVirtNbrHelloSuppressed ++ TruthValue ++ } ++ ++ ospfVirtNbrArea OBJECT-TYPE ++ SYNTAX AreaID ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The Transit Area Identifier." ++ ::= { ospfVirtNbrEntry 1 } ++ ++ ++ ospfVirtNbrRtrId OBJECT-TYPE ++ SYNTAX RouterID ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "A 32-bit integer uniquely identifying the ++ neighboring router in the Autonomous System." ++ ::= { ospfVirtNbrEntry 2 } ++ ++ ++ ospfVirtNbrIpAddr OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP address this Virtual Neighbor is us- ++ ing." ++ ::= { ospfVirtNbrEntry 3 } ++ ++ ++ ospfVirtNbrOptions OBJECT-TYPE ++ SYNTAX Integer32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "A Bit Mask corresponding to the neighbor's op- ++ tions field. ++ ++ Bit 1, if set, indicates that the system will ++ operate on Type of Service metrics other than ++ TOS 0. If zero, the neighbor will ignore all ++ metrics except the TOS 0 metric. ++ ++ Bit 2, if set, indicates that the system is ++ Network Multicast capable; ie, that it imple- ++ ments OSPF Multicast Routing." ++ ::= { ospfVirtNbrEntry 4 } ++ ospfVirtNbrState OBJECT-TYPE ++ SYNTAX INTEGER { ++ down (1), ++ attempt (2), ++ init (3), ++ twoWay (4), ++ exchangeStart (5), ++ exchange (6), ++ loading (7), ++ full (8) ++ } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The state of the Virtual Neighbor Relation- ++ ship." ++ ::= { ospfVirtNbrEntry 5 } ++ ++ ++ ospfVirtNbrEvents OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of times this virtual link has ++ changed its state, or an error has occurred." ++ ::= { ospfVirtNbrEntry 6 } ++ ++ ++ ospfVirtNbrLsRetransQLen OBJECT-TYPE ++ SYNTAX Gauge32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The current length of the retransmission ++ queue." ++ ::= { ospfVirtNbrEntry 7 } ++ ++ ++ ospfVirtNbrHelloSuppressed OBJECT-TYPE ++ SYNTAX TruthValue ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "Indicates whether Hellos are being suppressed ++ to the neighbor" ++ ::= { ospfVirtNbrEntry 8 } ++ ++-- OSPF Link State Database, External ++ ++-- The Link State Database contains the Link State ++-- Advertisements from throughout the areas that the ++-- device is attached to. ++ ++-- This table is identical to the OSPF LSDB Table in ++-- format, but contains only External Link State ++-- Advertisements. The purpose is to allow external ++-- LSAs to be displayed once for the router rather ++-- than once in each non-stub area. ++ ++ ospfExtLsdbTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF OspfExtLsdbEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "The OSPF Process's Links State Database." ++ REFERENCE ++ "OSPF Version 2, Section 12 Link State Adver- ++ tisements" ++ ::= { ospf 12 } ++ ++ ++ ospfExtLsdbEntry OBJECT-TYPE ++ SYNTAX OspfExtLsdbEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "A single Link State Advertisement." ++ INDEX { ospfExtLsdbType, ospfExtLsdbLsid, ospfExtLsdbRouterId } ++ ::= { ospfExtLsdbTable 1 } ++ ++OspfExtLsdbEntry ::= ++ SEQUENCE { ++ ospfExtLsdbType ++ INTEGER, ++ ospfExtLsdbLsid ++ IpAddress, ++ ospfExtLsdbRouterId ++ RouterID, ++ ospfExtLsdbSequence ++ Integer32, ++ ospfExtLsdbAge ++ Integer32, ++ ospfExtLsdbChecksum ++ Integer32, ++ ospfExtLsdbAdvertisement ++ OCTET STRING ++ } ++ ++ ospfExtLsdbType OBJECT-TYPE ++ SYNTAX INTEGER { ++ asExternalLink (5) ++ } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The type of the link state advertisement. ++ Each link state type has a separate advertise- ++ ment format." ++ REFERENCE ++ "OSPF Version 2, Appendix A.4.1 The Link State ++ Advertisement header" ++ ::= { ospfExtLsdbEntry 1 } ++ ++ ++ ospfExtLsdbLsid OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The Link State ID is an LS Type Specific field ++ containing either a Router ID or an IP Address; ++ it identifies the piece of the routing domain ++ that is being described by the advertisement." ++ REFERENCE ++ "OSPF Version 2, Section 12.1.4 Link State ID" ++ ::= { ospfExtLsdbEntry 2 } ++ ++ ++ ospfExtLsdbRouterId OBJECT-TYPE ++ SYNTAX RouterID ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The 32 bit number that uniquely identifies the ++ originating router in the Autonomous System." ++ REFERENCE ++ "OSPF Version 2, Appendix C.1 Global parameters" ++ ::= { ospfExtLsdbEntry 3 } ++ ++-- Note that the OSPF Sequence Number is a 32 bit signed ++-- integer. It starts with the value '80000001'h, ++-- or -'7FFFFFFF'h, and increments until '7FFFFFFF'h ++-- Thus, a typical sequence number will be very negative. ++ ospfExtLsdbSequence OBJECT-TYPE ++ SYNTAX Integer32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The sequence number field is a signed 32-bit ++ integer. It is used to detect old and dupli- ++ cate link state advertisements. The space of ++ sequence numbers is linearly ordered. The ++ larger the sequence number the more recent the ++ advertisement." ++ REFERENCE ++ "OSPF Version 2, Section 12.1.6 LS sequence ++ number" ++ ::= { ospfExtLsdbEntry 4 } ++ ++ ++ ospfExtLsdbAge OBJECT-TYPE ++ SYNTAX Integer32 -- Should be 0..MaxAge ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "This field is the age of the link state adver- ++ tisement in seconds." ++ REFERENCE ++ "OSPF Version 2, Section 12.1.1 LS age" ++ ::= { ospfExtLsdbEntry 5 } ++ ++ ++ ospfExtLsdbChecksum OBJECT-TYPE ++ SYNTAX Integer32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "This field is the checksum of the complete ++ contents of the advertisement, excepting the ++ age field. The age field is excepted so that ++ an advertisement's age can be incremented ++ without updating the checksum. The checksum ++ used is the same that is used for ISO connec- ++ tionless datagrams; it is commonly referred to ++ as the Fletcher checksum." ++ REFERENCE ++ "OSPF Version 2, Section 12.1.7 LS checksum" ++ ::= { ospfExtLsdbEntry 6 } ++ ++ ++ ospfExtLsdbAdvertisement OBJECT-TYPE ++ SYNTAX OCTET STRING (SIZE(36)) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The entire Link State Advertisement, including ++ its header." ++ REFERENCE ++ "OSPF Version 2, Section 12 Link State Adver- ++ tisements" ++ ::= { ospfExtLsdbEntry 7 } ++ ++ ++-- OSPF Use of the CIDR Route Table ++ ++ospfRouteGroup OBJECT IDENTIFIER ::= { ospf 13 } ++ ++-- The IP Forwarding Table defines a number of objects for use by ++-- the routing protocol to externalize its information. Most of ++-- the variables (ipForwardDest, ipForwardMask, ipForwardPolicy, ++-- ipForwardNextHop, ipForwardIfIndex, ipForwardType, ++-- ipForwardProto, ipForwardAge, and ipForwardNextHopAS) are ++-- defined there. ++ ++-- Those that leave some discretion are defined here. ++ ++-- ipCidrRouteProto is, of course, ospf (13). ++ ++-- ipCidrRouteAge is the time since the route was first calculated, ++-- as opposed to the time since the last SPF run. ++ ++-- ipCidrRouteInfo is an OBJECT IDENTIFIER for use by the routing ++-- protocol. The following values shall be found there depending ++-- on the way the route was calculated. ++ ++ospfIntraArea OBJECT IDENTIFIER ::= { ospfRouteGroup 1 } ++ospfInterArea OBJECT IDENTIFIER ::= { ospfRouteGroup 2 } ++ospfExternalType1 OBJECT IDENTIFIER ::= { ospfRouteGroup 3 } ++ospfExternalType2 OBJECT IDENTIFIER ::= { ospfRouteGroup 4 } ++ ++-- ipCidrRouteMetric1 is, by definition, the primary routing ++-- metric. Therefore, it should be the metric that route ++-- selection is based on. For intra-area and inter-area routes, ++-- it is an OSPF metric. For External Type 1 (comparable value) ++-- routes, it is an OSPF metric plus the External Metric. For ++-- external Type 2 (non-comparable value) routes, it is the ++-- external metric. ++ ++-- ipCidrRouteMetric2 is, by definition, a secondary routing ++-- metric. Therefore, it should be the metric that breaks a tie ++-- among routes having equal metric1 values and the same ++-- calculation rule. For intra-area, inter-area routes, and ++-- External Type 1 (comparable value) routes, it is unused. For ++-- external Type 2 (non-comparable value) routes, it is the metric ++-- to the AS border router. ++ ++-- ipCidrRouteMetric3, ipCidrRouteMetric4, and ipCidrRouteMetric5 are ++-- unused. ++ ++-- ++-- The OSPF Area Aggregate Table ++-- ++-- This table replaces the OSPF Area Summary Table, being an ++-- extension of that for CIDR routers. ++ ++ ospfAreaAggregateTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF OspfAreaAggregateEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "A range of IP addresses specified by an IP ++ address/IP network mask pair. For example, ++ class B address range of X.X.X.X with a network ++ mask of 255.255.0.0 includes all IP addresses ++ from X.X.0.0 to X.X.255.255. Note that if ++ ranges are configured such that one range sub- ++ sumes another range (e.g., 10.0.0.0 mask ++ 255.0.0.0 and 10.1.0.0 mask 255.255.0.0), the ++ most specific match is the preferred one." ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ ::= { ospf 14 } ++ ++ ++ ospfAreaAggregateEntry OBJECT-TYPE ++ SYNTAX OspfAreaAggregateEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "A range of IP addresses specified by an IP ++ address/IP network mask pair. For example, ++ class B address range of X.X.X.X with a network ++ mask of 255.255.0.0 includes all IP addresses ++ from X.X.0.0 to X.X.255.255. Note that if ++ ranges are range configured such that one range ++ subsumes another range (e.g., 10.0.0.0 mask ++ 255.0.0.0 and 10.1.0.0 mask 255.255.0.0), the ++ most specific match is the preferred one." ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ INDEX { ospfAreaAggregateAreaID, ospfAreaAggregateLsdbType, ++ ospfAreaAggregateNet, ospfAreaAggregateMask } ++ ::= { ospfAreaAggregateTable 1 } ++ ++ ++OspfAreaAggregateEntry ::= ++ SEQUENCE { ++ ospfAreaAggregateAreaID ++ AreaID, ++ ospfAreaAggregateLsdbType ++ INTEGER, ++ ospfAreaAggregateNet ++ IpAddress, ++ ospfAreaAggregateMask ++ IpAddress, ++ ospfAreaAggregateStatus ++ RowStatus, ++ ospfAreaAggregateEffect ++ INTEGER ++ } ++ ++ ospfAreaAggregateAreaID OBJECT-TYPE ++ SYNTAX AreaID ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The Area the Address Aggregate is to be found ++ within." ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ ::= { ospfAreaAggregateEntry 1 } ++ ++ ++ ospfAreaAggregateLsdbType OBJECT-TYPE ++ SYNTAX INTEGER { ++ summaryLink (3), ++ nssaExternalLink (7) ++ } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The type of the Address Aggregate. This field ++ specifies the Lsdb type that this Address Ag- ++ gregate applies to." ++ REFERENCE ++ "OSPF Version 2, Appendix A.4.1 The Link State ++ Advertisement header" ++ ::= { ospfAreaAggregateEntry 2 } ++ ++ ++ ospfAreaAggregateNet OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP Address of the Net or Subnet indicated ++ by the range." ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ ::= { ospfAreaAggregateEntry 3 } ++ ++ ++ ospfAreaAggregateMask OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The Subnet Mask that pertains to the Net or ++ Subnet." ++ REFERENCE ++ "OSPF Version 2, Appendix C.2 Area parameters" ++ ::= { ospfAreaAggregateEntry 4 } ++ ++ ++ ospfAreaAggregateStatus OBJECT-TYPE ++ SYNTAX RowStatus ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "This variable displays the status of the en- ++ try. Setting it to 'invalid' has the effect of ++ rendering it inoperative. The internal effect ++ (row removal) is implementation dependent." ++ ::= { ospfAreaAggregateEntry 5 } ++ ++ ++ ospfAreaAggregateEffect OBJECT-TYPE ++ SYNTAX INTEGER { ++ advertiseMatching (1), ++ doNotAdvertiseMatching (2) ++ } ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "Subnets subsumed by ranges either trigger the ++ advertisement of the indicated aggregate (ad- ++ vertiseMatching), or result in the subnet's not ++ being advertised at all outside the area." ++ DEFVAL { advertiseMatching } ++ ::= { ospfAreaAggregateEntry 6 } ++ ++ ++-- conformance information ++ ++ospfConformance OBJECT IDENTIFIER ::= { ospf 15 } ++ ++ospfGroups OBJECT IDENTIFIER ::= { ospfConformance 1 } ++ospfCompliances OBJECT IDENTIFIER ::= { ospfConformance 2 } ++ ++-- compliance statements ++ ++ ospfCompliance MODULE-COMPLIANCE ++ STATUS current ++ DESCRIPTION ++ "The compliance statement " ++ MODULE -- this module ++ MANDATORY-GROUPS { ++ ospfBasicGroup, ++ ospfAreaGroup, ++ ospfStubAreaGroup, ++ ospfIfGroup, ++ ospfIfMetricGroup, ++ ospfVirtIfGroup, ++ ospfNbrGroup, ++ ospfVirtNbrGroup, ++ ospfAreaAggregateGroup ++ } ++ ::= { ospfCompliances 1 } ++ ++ ++-- units of conformance ++ ++ ospfBasicGroup OBJECT-GROUP ++ OBJECTS { ++ ospfRouterId, ++ ospfAdminStat, ++ ospfVersionNumber, ++ ospfAreaBdrRtrStatus, ++ ospfASBdrRtrStatus, ++ ospfExternLsaCount, ++ ospfExternLsaCksumSum, ++ ospfTOSSupport, ++ ospfOriginateNewLsas, ++ ospfRxNewLsas, ++ ospfExtLsdbLimit, ++ ospfMulticastExtensions, ++ ospfExitOverflowInterval, ++ ospfDemandExtensions ++ } ++ STATUS current ++ DESCRIPTION ++ "These objects are required for OSPF systems." ++ ::= { ospfGroups 1 } ++ ++ ++ ospfAreaGroup OBJECT-GROUP ++ OBJECTS { ++ ospfAreaId, ++ ospfImportAsExtern, ++ ospfSpfRuns, ++ ospfAreaBdrRtrCount, ++ ospfAsBdrRtrCount, ++ ospfAreaLsaCount, ++ ospfAreaLsaCksumSum, ++ ospfAreaSummary, ++ ospfAreaStatus ++ } ++ STATUS current ++ DESCRIPTION ++ "These objects are required for OSPF systems ++ supporting areas." ++ ::= { ospfGroups 2 } ++ ++ ++ ospfStubAreaGroup OBJECT-GROUP ++ OBJECTS { ++ ospfStubAreaId, ++ ospfStubTOS, ++ ospfStubMetric, ++ ospfStubStatus, ++ ospfStubMetricType ++ } ++ STATUS current ++ DESCRIPTION ++ "These objects are required for OSPF systems ++ supporting stub areas." ++ ::= { ospfGroups 3 } ++ ++ ++ ospfLsdbGroup OBJECT-GROUP ++ OBJECTS { ++ ospfLsdbAreaId, ++ ospfLsdbType, ++ ospfLsdbLsid, ++ ospfLsdbRouterId, ++ ospfLsdbSequence, ++ ospfLsdbAge, ++ ospfLsdbChecksum, ++ ospfLsdbAdvertisement ++ } ++ STATUS current ++ DESCRIPTION ++ "These objects are required for OSPF systems ++ that display their link state database." ++ ::= { ospfGroups 4 } ++ ++ ++ ospfAreaRangeGroup OBJECT-GROUP ++ OBJECTS { ++ ospfAreaRangeAreaId, ++ ospfAreaRangeNet, ++ ospfAreaRangeMask, ++ ospfAreaRangeStatus, ++ ospfAreaRangeEffect ++ } ++ STATUS obsolete ++ DESCRIPTION ++ "These objects are required for non-CIDR OSPF ++ systems that support multiple areas." ++ ::= { ospfGroups 5 } ++ ++ ++ ospfHostGroup OBJECT-GROUP ++ OBJECTS { ++ ospfHostIpAddress, ++ ospfHostTOS, ++ ospfHostMetric, ++ ospfHostStatus, ++ ospfHostAreaID ++ } ++ STATUS current ++ DESCRIPTION ++ "These objects are required for OSPF systems ++ that support attached hosts." ++ ::= { ospfGroups 6 } ++ ++ ++ ospfIfGroup OBJECT-GROUP ++ OBJECTS { ++ ospfIfIpAddress, ++ ospfAddressLessIf, ++ ospfIfAreaId, ++ ospfIfType, ++ ospfIfAdminStat, ++ ospfIfRtrPriority, ++ ospfIfTransitDelay, ++ ospfIfRetransInterval, ++ ospfIfHelloInterval, ++ ospfIfRtrDeadInterval, ++ ospfIfPollInterval, ++ ospfIfState, ++ ospfIfDesignatedRouter, ++ ospfIfBackupDesignatedRouter, ++ ospfIfEvents, ++ ospfIfAuthType, ++ ospfIfAuthKey, ++ ospfIfStatus, ++ ospfIfMulticastForwarding, ++ ospfIfDemand ++ } ++ STATUS current ++ DESCRIPTION ++ "These objects are required for OSPF systems." ++ ::= { ospfGroups 7 } ++ ++ ++ ospfIfMetricGroup OBJECT-GROUP ++ OBJECTS { ++ ospfIfMetricIpAddress, ++ ospfIfMetricAddressLessIf, ++ ospfIfMetricTOS, ++ ospfIfMetricValue, ++ ospfIfMetricStatus ++ } ++ STATUS current ++ DESCRIPTION ++ "These objects are required for OSPF systems." ++ ::= { ospfGroups 8 } ++ ++ ++ ospfVirtIfGroup OBJECT-GROUP ++ OBJECTS { ++ ospfVirtIfAreaId, ++ ospfVirtIfNeighbor, ++ ospfVirtIfTransitDelay, ++ ospfVirtIfRetransInterval, ++ ospfVirtIfHelloInterval, ++ ospfVirtIfRtrDeadInterval, ++ ospfVirtIfState, ++ ospfVirtIfEvents, ++ ospfVirtIfAuthType, ++ ospfVirtIfAuthKey, ++ ospfVirtIfStatus ++ } ++ STATUS current ++ DESCRIPTION ++ "These objects are required for OSPF systems." ++ ::= { ospfGroups 9 } ++ ++ ++ ospfNbrGroup OBJECT-GROUP ++ OBJECTS { ++ ospfNbrIpAddr, ++ ospfNbrAddressLessIndex, ++ ospfNbrRtrId, ++ ospfNbrOptions, ++ ospfNbrPriority, ++ ospfNbrState, ++ ospfNbrEvents, ++ ospfNbrLsRetransQLen, ++ ospfNbmaNbrStatus, ++ ospfNbmaNbrPermanence, ++ ospfNbrHelloSuppressed ++ } ++ STATUS current ++ DESCRIPTION ++ "These objects are required for OSPF systems." ++ ::= { ospfGroups 10 } ++ ++ ++ ospfVirtNbrGroup OBJECT-GROUP ++ OBJECTS { ++ ospfVirtNbrArea, ++ ospfVirtNbrRtrId, ++ ospfVirtNbrIpAddr, ++ ospfVirtNbrOptions, ++ ospfVirtNbrState, ++ ospfVirtNbrEvents, ++ ospfVirtNbrLsRetransQLen, ++ ospfVirtNbrHelloSuppressed ++ } ++ STATUS current ++ DESCRIPTION ++ "These objects are required for OSPF systems." ++ ::= { ospfGroups 11 } ++ ++ ++ ospfExtLsdbGroup OBJECT-GROUP ++ OBJECTS { ++ ospfExtLsdbType, ++ ospfExtLsdbLsid, ++ ospfExtLsdbRouterId, ++ ospfExtLsdbSequence, ++ ospfExtLsdbAge, ++ ospfExtLsdbChecksum, ++ ospfExtLsdbAdvertisement ++ } ++ STATUS current ++ DESCRIPTION ++ "These objects are required for OSPF systems ++ that display their link state database." ++ ::= { ospfGroups 12 } ++ ++ ++ ospfAreaAggregateGroup OBJECT-GROUP ++ OBJECTS { ++ ospfAreaAggregateAreaID, ++ ospfAreaAggregateLsdbType, ++ ospfAreaAggregateNet, ++ ospfAreaAggregateMask, ++ ospfAreaAggregateStatus, ++ ospfAreaAggregateEffect ++ } ++ STATUS current ++ DESCRIPTION ++ "These objects are required for OSPF systems." ++ ::= { ospfGroups 13 } ++ ++END +--- /dev/null ++++ b/mibs/OSPF-TRAP-MIB.txt +@@ -0,0 +1,443 @@ ++OSPF-TRAP-MIB DEFINITIONS ::= BEGIN ++ ++ IMPORTS ++ MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, IpAddress ++ FROM SNMPv2-SMI ++ MODULE-COMPLIANCE, OBJECT-GROUP ++ FROM SNMPv2-CONF ++ ospfRouterId, ospfIfIpAddress, ospfAddressLessIf, ospfIfState, ++ ospfVirtIfAreaId, ospfVirtIfNeighbor, ospfVirtIfState, ++ ospfNbrIpAddr, ospfNbrAddressLessIndex, ospfNbrRtrId, ++ ospfNbrState, ospfVirtNbrArea, ospfVirtNbrRtrId, ospfVirtNbrState, ++ ospfLsdbType, ospfLsdbLsid, ospfLsdbRouterId, ospfLsdbAreaId, ++ ospfExtLsdbLimit, ospf ++ FROM OSPF-MIB; ++ ++ ospfTrap MODULE-IDENTITY ++ LAST-UPDATED "9501201225Z" -- Fri Jan 20 12:25:50 PST 1995 ++ ORGANIZATION "IETF OSPF Working Group" ++ CONTACT-INFO ++ " Fred Baker ++ Postal: Cisco Systems ++ 519 Lado Drive ++ Santa Barbara, California 93111 ++ Tel: +1 805 681 0115 ++ E-Mail: fred@cisco.com ++ ++ Rob Coltun ++ Postal: RainbowBridge Communications ++ Tel: (301) 340-9416 ++ E-Mail: rcoltun@rainbow-bridge.com" ++ DESCRIPTION ++ "The MIB module to describe traps for the OSPF ++ Version 2 Protocol." ++ ::= { ospf 16 } ++ ++-- Trap Support Objects ++ ++-- The following are support objects for the OSPF traps. ++ ++ospfTrapControl OBJECT IDENTIFIER ::= { ospfTrap 1 } ++ospfTraps OBJECT IDENTIFIER ::= { ospfTrap 2 } ++ ++ ospfSetTrap OBJECT-TYPE ++ SYNTAX OCTET STRING (SIZE(4)) ++ MAX-ACCESS read-write ++ STATUS current ++ DESCRIPTION ++ "A four-octet string serving as a bit map for ++ the trap events defined by the OSPF traps. This ++ object is used to enable and disable specific ++ OSPF traps where a 1 in the bit field ++ represents enabled. The right-most bit (least ++ significant) represents trap 0." ++ ::= { ospfTrapControl 1 } ++ ++ ++ ospfConfigErrorType OBJECT-TYPE ++ SYNTAX INTEGER { ++ badVersion (1), ++ areaMismatch (2), ++ unknownNbmaNbr (3), -- Router is Dr eligible ++ unknownVirtualNbr (4), ++ authTypeMismatch(5), ++ authFailure (6), ++ netMaskMismatch (7), ++ helloIntervalMismatch (8), ++ deadIntervalMismatch (9), ++ optionMismatch (10) } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "Potential types of configuration conflicts. ++ Used by the ospfConfigError and ospfConfigVir- ++ tError traps." ++ ::= { ospfTrapControl 2 } ++ ++ ++ ospfPacketType OBJECT-TYPE ++ SYNTAX INTEGER { ++ hello (1), ++ dbDescript (2), ++ lsReq (3), ++ lsUpdate (4), ++ lsAck (5) } ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "OSPF packet types." ++ ::= { ospfTrapControl 3 } ++ ++ ++ ospfPacketSrc OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP address of an inbound packet that can- ++ not be identified by a neighbor instance." ++ ::= { ospfTrapControl 4 } ++ ++ ++-- Traps ++ ++ ++ ospfIfStateChange NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfIfIpAddress, ++ ospfAddressLessIf, ++ ospfIfState -- The new state ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfIfStateChange trap signifies that there ++ has been a change in the state of a non-virtual ++ OSPF interface. This trap should be generated ++ when the interface state regresses (e.g., goes ++ from Dr to Down) or progresses to a terminal ++ state (i.e., Point-to-Point, DR Other, Dr, or ++ Backup)." ++ ::= { ospfTraps 16 } ++ ++ ++ ospfVirtIfStateChange NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfVirtIfAreaId, ++ ospfVirtIfNeighbor, ++ ospfVirtIfState -- The new state ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfIfStateChange trap signifies that there ++ has been a change in the state of an OSPF vir- ++ tual interface. ++ This trap should be generated when the inter- ++ face state regresses (e.g., goes from Point- ++ to-Point to Down) or progresses to a terminal ++ state (i.e., Point-to-Point)." ++ ::= { ospfTraps 1 } ++ ++ ++ ospfNbrStateChange NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfNbrIpAddr, ++ ospfNbrAddressLessIndex, ++ ospfNbrRtrId, ++ ospfNbrState -- The new state ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfNbrStateChange trap signifies that ++ there has been a change in the state of a non- ++ virtual OSPF neighbor. This trap should be ++ generated when the neighbor state regresses ++ (e.g., goes from Attempt or Full to 1-Way or ++ Down) or progresses to a terminal state (e.g., ++ 2-Way or Full). When an neighbor transitions ++ from or to Full on non-broadcast multi-access ++ and broadcast networks, the trap should be gen- ++ erated by the designated router. A designated ++ router transitioning to Down will be noted by ++ ospfIfStateChange." ++ ::= { ospfTraps 2 } ++ ++ ++ ospfVirtNbrStateChange NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfVirtNbrArea, ++ ospfVirtNbrRtrId, ++ ospfVirtNbrState -- The new state ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfIfStateChange trap signifies that there ++ has been a change in the state of an OSPF vir- ++ tual neighbor. This trap should be generated ++ when the neighbor state regresses (e.g., goes ++ from Attempt or Full to 1-Way or Down) or ++ progresses to a terminal state (e.g., Full)." ++ ::= { ospfTraps 3 } ++ ospfIfConfigError NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfIfIpAddress, ++ ospfAddressLessIf, ++ ospfPacketSrc, -- The source IP address ++ ospfConfigErrorType, -- Type of error ++ ospfPacketType ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfIfConfigError trap signifies that a ++ packet has been received on a non-virtual in- ++ terface from a router whose configuration ++ parameters conflict with this router's confi- ++ guration parameters. Note that the event op- ++ tionMismatch should cause a trap only if it ++ prevents an adjacency from forming." ++ ::= { ospfTraps 4 } ++ ++ ++ ospfVirtIfConfigError NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfVirtIfAreaId, ++ ospfVirtIfNeighbor, ++ ospfConfigErrorType, -- Type of error ++ ospfPacketType ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfConfigError trap signifies that a pack- ++ et has been received on a virtual interface ++ from a router whose configuration parameters ++ conflict with this router's configuration ++ parameters. Note that the event optionMismatch ++ should cause a trap only if it prevents an ad- ++ jacency from forming." ++ ::= { ospfTraps 5 } ++ ++ ++ ospfIfAuthFailure NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfIfIpAddress, ++ ospfAddressLessIf, ++ ospfPacketSrc, -- The source IP address ++ ospfConfigErrorType, -- authTypeMismatch or ++ -- authFailure ++ ospfPacketType ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfIfAuthFailure trap signifies that a ++ packet has been received on a non-virtual in- ++ terface from a router whose authentication key ++ or authentication type conflicts with this ++ router's authentication key or authentication ++ type." ++ ::= { ospfTraps 6 } ++ ++ ++ ospfVirtIfAuthFailure NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfVirtIfAreaId, ++ ospfVirtIfNeighbor, ++ ospfConfigErrorType, -- authTypeMismatch or ++ -- authFailure ++ ospfPacketType ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfVirtIfAuthFailure trap signifies that a ++ packet has been received on a virtual interface ++ from a router whose authentication key or au- ++ thentication type conflicts with this router's ++ authentication key or authentication type." ++ ::= { ospfTraps 7 } ++ ++ ++ ospfIfRxBadPacket NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfIfIpAddress, ++ ospfAddressLessIf, ++ ospfPacketSrc, -- The source IP address ++ ospfPacketType ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfIfRxBadPacket trap signifies that an ++ OSPF packet has been received on a non-virtual ++ interface that cannot be parsed." ++ ::= { ospfTraps 8 } ++ ++ ospfVirtIfRxBadPacket NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfVirtIfAreaId, ++ ospfVirtIfNeighbor, ++ ospfPacketType ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfRxBadPacket trap signifies that an OSPF ++ packet has been received on a virtual interface ++ that cannot be parsed." ++ ::= { ospfTraps 9 } ++ ++ ++ ospfTxRetransmit NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfIfIpAddress, ++ ospfAddressLessIf, ++ ospfNbrRtrId, -- Destination ++ ospfPacketType, ++ ospfLsdbType, ++ ospfLsdbLsid, ++ ospfLsdbRouterId ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfTxRetransmit trap signifies than an ++ OSPF packet has been retransmitted on a non- ++ virtual interface. All packets that may be re- ++ transmitted are associated with an LSDB entry. ++ The LS type, LS ID, and Router ID are used to ++ identify the LSDB entry." ++ ::= { ospfTraps 10 } ++ ++ ++ ospfVirtIfTxRetransmit NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfVirtIfAreaId, ++ ospfVirtIfNeighbor, ++ ospfPacketType, ++ ospfLsdbType, ++ ospfLsdbLsid, ++ ospfLsdbRouterId ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfTxRetransmit trap signifies than an ++ OSPF packet has been retransmitted on a virtual ++ interface. All packets that may be retransmit- ++ ted are associated with an LSDB entry. The LS ++ type, LS ID, and Router ID are used to identify ++ the LSDB entry." ++ ::= { ospfTraps 11 } ++ ++ ++ ospfOriginateLsa NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfLsdbAreaId, -- 0.0.0.0 for AS Externals ++ ospfLsdbType, ++ ospfLsdbLsid, ++ ospfLsdbRouterId ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfOriginateLsa trap signifies that a new ++ LSA has been originated by this router. This ++ trap should not be invoked for simple refreshes ++ of LSAs (which happesn every 30 minutes), but ++ instead will only be invoked when an LSA is ++ (re)originated due to a topology change. Addi- ++ tionally, this trap does not include LSAs that ++ are being flushed because they have reached ++ MaxAge." ++ ::= { ospfTraps 12 } ++ ++ ++ ospfMaxAgeLsa NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfLsdbAreaId, -- 0.0.0.0 for AS Externals ++ ospfLsdbType, ++ ospfLsdbLsid, ++ ospfLsdbRouterId ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfMaxAgeLsa trap signifies that one of ++ the LSA in the router's link-state database has ++ aged to MaxAge." ++ ::= { ospfTraps 13 } ++ ++ ++ ospfLsdbOverflow NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfExtLsdbLimit ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfLsdbOverflow trap signifies that the ++ number of LSAs in the router's link-state data- ++ base has exceeded ospfExtLsdbLimit." ++ ::= { ospfTraps 14 } ++ ++ ++ ospfLsdbApproachingOverflow NOTIFICATION-TYPE ++ OBJECTS { ++ ospfRouterId, -- The originator of the trap ++ ospfExtLsdbLimit ++ } ++ STATUS current ++ DESCRIPTION ++ "An ospfLsdbApproachingOverflow trap signifies ++ that the number of LSAs in the router's link- ++ state database has exceeded ninety percent of ++ ospfExtLsdbLimit." ++ ::= { ospfTraps 15 } ++ ++ ++-- conformance information ++ ++ospfTrapConformance OBJECT IDENTIFIER ::= { ospfTrap 3 } ++ ++ospfTrapGroups OBJECT IDENTIFIER ::= { ospfTrapConformance 1 } ++ospfTrapCompliances OBJECT IDENTIFIER ::= { ospfTrapConformance 2 } ++ ++-- compliance statements ++ ++ ospfTrapCompliance MODULE-COMPLIANCE ++ STATUS current ++ DESCRIPTION ++ "The compliance statement " ++ MODULE -- this module ++ MANDATORY-GROUPS { ospfTrapControlGroup } ++ ++ ++ GROUP ospfTrapControlGroup ++ DESCRIPTION ++ "This group is optional but recommended for all ++ OSPF systems" ++ ::= { ospfTrapCompliances 1 } ++ ++ ++-- units of conformance ++ ++ ospfTrapControlGroup OBJECT-GROUP ++ OBJECTS { ++ ospfSetTrap, ++ ospfConfigErrorType, ++ ospfPacketType, ++ ospfPacketSrc ++ } ++ STATUS current ++ DESCRIPTION ++ "These objects are required to control traps ++ from OSPF systems." ++ ::= { ospfTrapGroups 1 } ++ ++ ++END +--- /dev/null ++++ b/mibs/RIPv2-MIB.txt +@@ -0,0 +1,530 @@ ++ RIPv2-MIB DEFINITIONS ::= BEGIN ++ ++ IMPORTS ++ MODULE-IDENTITY, OBJECT-TYPE, Counter32, ++ TimeTicks, IpAddress FROM SNMPv2-SMI ++ TEXTUAL-CONVENTION, RowStatus FROM SNMPv2-TC ++ MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF ++ mib-2 FROM RFC1213-MIB; ++ ++ -- This MIB module uses the extended OBJECT-TYPE macro as ++ -- defined in [9]. ++ ++ rip2 MODULE-IDENTITY ++ LAST-UPDATED "9407272253Z" -- Wed Jul 27 22:53:04 PDT 1994 ++ ORGANIZATION "IETF RIP-II Working Group" ++ CONTACT-INFO ++ " Fred Baker ++ Postal: Cisco Systems ++ 519 Lado Drive ++ Santa Barbara, California 93111 ++ Tel: +1 805 681 0115 ++ E-Mail: fbaker@cisco.com ++ ++ Postal: Gary Malkin ++ Xylogics, Inc. ++ 53 Third Avenue ++ Burlington, MA 01803 ++ ++ Phone: (617) 272-8140 ++ EMail: gmalkin@Xylogics.COM" ++ DESCRIPTION ++ "The MIB module to describe the RIP2 Version 2 Protocol" ++ ::= { mib-2 23 } ++ ++ -- RIP-2 Management Information Base ++ ++ -- the RouteTag type represents the contents of the ++ -- Route Domain field in the packet header or route entry. ++ -- The use of the Route Domain is deprecated. ++ ++ RouteTag ::= TEXTUAL-CONVENTION ++ STATUS current ++ DESCRIPTION ++ "the RouteTag type represents the contents of the Route Domain ++ field in the packet header or route entry" ++ SYNTAX OCTET STRING (SIZE (2)) ++ ++--4.1 Global Counters ++ ++-- The RIP-2 Globals Group. ++-- Implementation of this group is mandatory for systems ++-- which implement RIP-2. ++ ++-- These counters are intended to facilitate debugging quickly ++-- changing routes or failing neighbors ++ ++rip2Globals OBJECT IDENTIFIER ::= { rip2 1 } ++ ++ rip2GlobalRouteChanges OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of route changes made to the IP Route ++ Database by RIP. This does not include the refresh ++ of a route's age." ++ ::= { rip2Globals 1 } ++ ++ rip2GlobalQueries OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of responses sent to RIP queries ++ from other systems." ++ ::= { rip2Globals 2 } ++ ++--4.2 RIP Interface Tables ++ ++-- RIP Interfaces Groups ++-- Implementation of these Groups is mandatory for systems ++-- which implement RIP-2. ++ ++-- The RIP Interface Status Table. ++ ++ rip2IfStatTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF Rip2IfStatEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "A list of subnets which require separate ++ status monitoring in RIP." ++ ::= { rip2 2 } ++ ++ rip2IfStatEntry OBJECT-TYPE ++ SYNTAX Rip2IfStatEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "A Single Routing Domain in a single Subnet." ++ INDEX { rip2IfStatAddress } ++ ::= { rip2IfStatTable 1 } ++ ++ Rip2IfStatEntry ::= ++ SEQUENCE { ++ rip2IfStatAddress ++ IpAddress, ++ rip2IfStatRcvBadPackets ++ Counter32, ++ rip2IfStatRcvBadRoutes ++ Counter32, ++ rip2IfStatSentUpdates ++ Counter32, ++ rip2IfStatStatus ++ RowStatus ++ } ++ ++ rip2IfStatAddress OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP Address of this system on the indicated ++ subnet. For unnumbered interfaces, the value 0.0.0.N, ++ where the least significant 24 bits (N) is the ifIndex ++ for the IP Interface in network byte order." ++ ::= { rip2IfStatEntry 1 } ++ ++ rip2IfStatRcvBadPackets OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of RIP response packets received by ++ the RIP process which were subsequently discarded ++ for any reason (e.g. a version 0 packet, or an ++ unknown command type)." ++ ::= { rip2IfStatEntry 2 } ++ ++ rip2IfStatRcvBadRoutes OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of routes, in valid RIP packets, ++ which were ignored for any reason (e.g. unknown ++ address family, or invalid metric)." ++ ::= { rip2IfStatEntry 3 } ++ ++ rip2IfStatSentUpdates OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of triggered RIP updates actually ++ sent on this interface. This explicitly does ++ NOT include full updates sent containing new ++ information." ++ ::= { rip2IfStatEntry 4 } ++ ++ rip2IfStatStatus OBJECT-TYPE ++ SYNTAX RowStatus ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "Writing invalid has the effect of deleting ++ this interface." ++ ::= { rip2IfStatEntry 5 } ++ ++-- The RIP Interface Configuration Table. ++ ++ rip2IfConfTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF Rip2IfConfEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "A list of subnets which require separate ++ configuration in RIP." ++ ::= { rip2 3 } ++ ++ rip2IfConfEntry OBJECT-TYPE ++ SYNTAX Rip2IfConfEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "A Single Routing Domain in a single Subnet." ++ INDEX { rip2IfConfAddress } ++ ::= { rip2IfConfTable 1 } ++ ++ Rip2IfConfEntry ::= ++ SEQUENCE { ++ rip2IfConfAddress ++ IpAddress, ++ rip2IfConfDomain ++ RouteTag, ++ rip2IfConfAuthType ++ INTEGER, ++ rip2IfConfAuthKey ++ OCTET STRING (SIZE(0..16)), ++ rip2IfConfSend ++ INTEGER, ++ rip2IfConfReceive ++ INTEGER, ++ rip2IfConfDefaultMetric ++ INTEGER, ++ rip2IfConfStatus ++ RowStatus, ++ rip2IfConfSrcAddress ++ IpAddress ++ } ++ ++ rip2IfConfAddress OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP Address of this system on the indicated ++ subnet. For unnumbered interfaces, the value 0.0.0.N, ++ where the least significant 24 bits (N) is the ifIndex ++ for the IP Interface in network byte order." ++ ::= { rip2IfConfEntry 1 } ++ ++ rip2IfConfDomain OBJECT-TYPE ++ SYNTAX RouteTag ++ MAX-ACCESS read-create ++ STATUS obsolete ++ DESCRIPTION ++ "Value inserted into the Routing Domain field ++ of all RIP packets sent on this interface." ++ DEFVAL { '0000'h } ++ ::= { rip2IfConfEntry 2 } ++ ++ rip2IfConfAuthType OBJECT-TYPE ++ SYNTAX INTEGER { ++ noAuthentication (1), ++ simplePassword (2), ++ md5 (3) ++ } ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The type of Authentication used on this ++ interface." ++ DEFVAL { noAuthentication } ++ ::= { rip2IfConfEntry 3 } ++ ++ rip2IfConfAuthKey OBJECT-TYPE ++ SYNTAX OCTET STRING (SIZE(0..16)) ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The value to be used as the Authentication Key ++ whenever the corresponding instance of ++ rip2IfConfAuthType has a value other than ++ noAuthentication. A modification of the corresponding ++ instance of rip2IfConfAuthType does not modify ++ the rip2IfConfAuthKey value. If a string shorter ++ than 16 octets is supplied, it will be left- ++ justified and padded to 16 octets, on the right, ++ with nulls (0x00). ++ ++ Reading this object always results in an OCTET ++ STRING of length zero; authentication may not ++ be bypassed by reading the MIB object." ++ DEFVAL { ''h } ++ ::= { rip2IfConfEntry 4 } ++ ++ rip2IfConfSend OBJECT-TYPE ++ SYNTAX INTEGER { ++ doNotSend (1), ++ ripVersion1 (2), ++ rip1Compatible (3), ++ ripVersion2 (4), ++ ripV1Demand (5), ++ ripV2Demand (6) ++ } ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "What the router sends on this interface. ++ ripVersion1 implies sending RIP updates compliant ++ with RFC 1058. rip1Compatible implies ++ broadcasting RIP-2 updates using RFC 1058 route ++ subsumption rules. ripVersion2 implies ++ multicasting RIP-2 updates. ripV1Demand indicates ++ the use of Demand RIP on a WAN interface under RIP ++ Version 1 rules. ripV2Demand indicates the use of ++ Demand RIP on a WAN interface under Version 2 rules." ++ DEFVAL { rip1Compatible } ++ ::= { rip2IfConfEntry 5 } ++ ++ rip2IfConfReceive OBJECT-TYPE ++ SYNTAX INTEGER { ++ rip1 (1), ++ rip2 (2), ++ rip1OrRip2 (3), ++ doNotRecieve (4) ++ } ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "This indicates which version of RIP updates ++ are to be accepted. Note that rip2 and ++ rip1OrRip2 implies reception of multicast ++ packets." ++ DEFVAL { rip1OrRip2 } ++ ::= { rip2IfConfEntry 6 } ++ ++ rip2IfConfDefaultMetric OBJECT-TYPE ++ SYNTAX INTEGER ( 0..15 ) ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "This variable indicates the metric that is to ++ be used for the default route entry in RIP updates ++ originated on this interface. A value of zero ++ indicates that no default route should be ++ originated; in this case, a default route via ++ another router may be propagated." ++ ::= { rip2IfConfEntry 7 } ++ ++ rip2IfConfStatus OBJECT-TYPE ++ SYNTAX RowStatus ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "Writing invalid has the effect of deleting ++ this interface." ++ ::= { rip2IfConfEntry 8 } ++ ++ rip2IfConfSrcAddress OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-create ++ STATUS current ++ DESCRIPTION ++ "The IP Address this system will use as a source ++ address on this interface. If it is a numbered ++ interface, this MUST be the same value as ++ rip2IfConfAddress. On unnumbered interfaces, ++ it must be the value of rip2IfConfAddress for ++ some interface on the system." ++ ::= { rip2IfConfEntry 9 } ++ ++--4.3 Peer Table ++ ++-- Peer Table ++ ++-- The RIP Peer Group ++-- Implementation of this Group is Optional ++ ++-- This group provides information about active peer ++-- relationships intended to assist in debugging. An ++-- active peer is a router from which a valid RIP ++-- updated has been heard in the last 180 seconds. ++ ++ rip2PeerTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF Rip2PeerEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "A list of RIP Peers." ++ ::= { rip2 4 } ++ ++ rip2PeerEntry OBJECT-TYPE ++ SYNTAX Rip2PeerEntry ++ MAX-ACCESS not-accessible ++ STATUS current ++ DESCRIPTION ++ "Information regarding a single routing peer." ++ INDEX { rip2PeerAddress, rip2PeerDomain } ++ ::= { rip2PeerTable 1 } ++ ++ Rip2PeerEntry ::= ++ SEQUENCE { ++ rip2PeerAddress ++ IpAddress, ++ rip2PeerDomain ++ RouteTag, ++ rip2PeerLastUpdate ++ TimeTicks, ++ rip2PeerVersion ++ INTEGER, ++ rip2PeerRcvBadPackets ++ Counter32, ++ rip2PeerRcvBadRoutes ++ Counter32 ++ } ++ ++ rip2PeerAddress OBJECT-TYPE ++ SYNTAX IpAddress ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The IP Address that the peer is using as its source ++ address. Note that on an unnumbered link, this may ++ not be a member of any subnet on the system." ++ ::= { rip2PeerEntry 1 } ++ ++ rip2PeerDomain OBJECT-TYPE ++ SYNTAX RouteTag ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The value in the Routing Domain field in RIP ++ packets received from the peer. As domain suuport ++ is deprecated, this must be zero." ++ ::= { rip2PeerEntry 2 } ++ ++ rip2PeerLastUpdate OBJECT-TYPE ++ SYNTAX TimeTicks ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The value of sysUpTime when the most recent ++ RIP update was received from this system." ++ ::= { rip2PeerEntry 3 } ++ ++ rip2PeerVersion OBJECT-TYPE ++ SYNTAX INTEGER ( 0..255 ) ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The RIP version number in the header of the ++ last RIP packet received." ++ ::= { rip2PeerEntry 4 } ++ ++ rip2PeerRcvBadPackets OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of RIP response packets from this ++ peer discarded as invalid." ++ ::= { rip2PeerEntry 5 } ++ ++ ++ rip2PeerRcvBadRoutes OBJECT-TYPE ++ SYNTAX Counter32 ++ MAX-ACCESS read-only ++ STATUS current ++ DESCRIPTION ++ "The number of routes from this peer that were ++ ignored because the entry format was invalid." ++ ::= { rip2PeerEntry 6 } ++ ++-- conformance information ++ ++rip2Conformance OBJECT IDENTIFIER ::= { rip2 5 } ++ ++rip2Groups OBJECT IDENTIFIER ::= { rip2Conformance 1 } ++rip2Compliances OBJECT IDENTIFIER ::= { rip2Conformance 2 } ++ ++-- compliance statements ++rip2Compliance MODULE-COMPLIANCE ++ STATUS current ++ DESCRIPTION ++ "The compliance statement " ++ MODULE -- this module ++ MANDATORY-GROUPS { ++ rip2GlobalGroup, ++ rip2IfStatGroup, ++ rip2IfConfGroup, ++ rip2PeerGroup ++ } ++ GROUP rip2GlobalGroup ++ DESCRIPTION ++ "This group defines global controls for RIP-II systems." ++ GROUP rip2IfStatGroup ++ DESCRIPTION ++ "This group defines interface statistics for RIP-II systems." ++ GROUP rip2IfConfGroup ++ DESCRIPTION ++ "This group defines interface configuration for RIP-II systems." ++ GROUP rip2PeerGroup ++ DESCRIPTION ++ "This group defines peer information for RIP-II systems." ++ ::= { rip2Compliances 1 } ++ ++-- units of conformance ++ ++rip2GlobalGroup OBJECT-GROUP ++ OBJECTS { ++ rip2GlobalRouteChanges, ++ rip2GlobalQueries ++ } ++ STATUS current ++ DESCRIPTION ++ "This group defines global controls for RIP-II systems." ++ ::= { rip2Groups 1 } ++rip2IfStatGroup OBJECT-GROUP ++ OBJECTS { ++ rip2IfStatAddress, ++ rip2IfStatRcvBadPackets, ++ rip2IfStatRcvBadRoutes, ++ rip2IfStatSentUpdates, ++ rip2IfStatStatus ++ } ++ STATUS current ++ DESCRIPTION ++ "This group defines interface statistics for RIP-II systems." ++ ::= { rip2Groups 2 } ++rip2IfConfGroup OBJECT-GROUP ++ OBJECTS { ++ rip2IfConfAddress, ++ rip2IfConfAuthType, ++ rip2IfConfAuthKey, ++ rip2IfConfSend, ++ rip2IfConfReceive, ++ rip2IfConfDefaultMetric, ++ rip2IfConfStatus, ++ rip2IfConfSrcAddress ++ } ++ STATUS current ++ DESCRIPTION ++ "This group defines interface configuration for RIP-II systems." ++ ::= { rip2Groups 3 } ++rip2PeerGroup OBJECT-GROUP ++ OBJECTS { ++ rip2PeerAddress, ++ rip2PeerDomain, ++ rip2PeerLastUpdate, ++ rip2PeerVersion, ++ rip2PeerRcvBadPackets, ++ rip2PeerRcvBadRoutes ++ } ++ STATUS current ++ DESCRIPTION ++ "This group defines peer information for RIP-II systems." ++ ::= { rip2Groups 4 } ++END +--- /dev/null ++++ b/mibs/SOURCE-ROUTING-MIB.txt +@@ -0,0 +1,452 @@ ++SOURCE-ROUTING-MIB DEFINITIONS ::= BEGIN ++ ++IMPORTS ++ Counter, Gauge ++ FROM RFC1155-SMI ++ dot1dBridge, dot1dSr ++ FROM BRIDGE-MIB ++ OBJECT-TYPE ++ FROM RFC-1212; ++ ++-- groups in the SR MIB ++ ++-- dot1dSr is imported from the Bridge MIB ++ ++dot1dPortPair OBJECT IDENTIFIER ::= { dot1dBridge 10 } ++ ++-- the dot1dSr group ++ ++-- this group is implemented by those bridges that ++-- support the source route bridging mode, including Source ++-- Routing and SRT bridges. ++ ++dot1dSrPortTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF Dot1dSrPortEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "A table that contains information about every ++ port that is associated with this source route ++ bridge." ++ ::= { dot1dSr 1 } ++ ++dot1dSrPortEntry OBJECT-TYPE ++ SYNTAX Dot1dSrPortEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "A list of information for each port of a source ++ route bridge." ++ INDEX { dot1dSrPort } ++ ++ ::= { dot1dSrPortTable 1 } ++ ++Dot1dSrPortEntry ::= ++ SEQUENCE { ++ dot1dSrPort ++ INTEGER, ++ dot1dSrPortHopCount ++ INTEGER, ++ dot1dSrPortLocalSegment ++ INTEGER, ++ dot1dSrPortBridgeNum ++ INTEGER, ++ dot1dSrPortTargetSegment ++ INTEGER, ++ dot1dSrPortLargestFrame ++ INTEGER, ++ dot1dSrPortSTESpanMode ++ INTEGER, ++ dot1dSrPortSpecInFrames ++ Counter, ++ dot1dSrPortSpecOutFrames ++ Counter, ++ dot1dSrPortApeInFrames ++ Counter, ++ dot1dSrPortApeOutFrames ++ Counter, ++ dot1dSrPortSteInFrames ++ Counter, ++ dot1dSrPortSteOutFrames ++ Counter, ++ dot1dSrPortSegmentMismatchDiscards ++ Counter, ++ dot1dSrPortDuplicateSegmentDiscards ++ Counter, ++ dot1dSrPortHopCountExceededDiscards ++ Counter, ++ dot1dSrPortDupLanIdOrTreeErrors ++ Counter, ++ dot1dSrPortLanIdMismatches ++ Counter ++ } ++ ++dot1dSrPort OBJECT-TYPE ++ SYNTAX INTEGER (1..65535) ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The port number of the port for which this entry ++ ++ contains Source Route management information." ++ ::= { dot1dSrPortEntry 1 } ++ ++dot1dSrPortHopCount OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The maximum number of routing descriptors allowed ++ in an All Paths or Spanning Tree Explorer frames." ++ ::= { dot1dSrPortEntry 2 } ++ ++dot1dSrPortLocalSegment OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The segment number that uniquely identifies the ++ segment to which this port is connected. Current ++ source routing protocols limit this value to the ++ range: 0 through 4095. (The value 0 is used by ++ some management applications for special test ++ cases.) A value of 65535 signifies that no segment ++ number is assigned to this port." ++ ::= { dot1dSrPortEntry 3 } ++ ++dot1dSrPortBridgeNum OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "A bridge number uniquely identifies a bridge when ++ more than one bridge is used to span the same two ++ segments. Current source routing protocols limit ++ this value to the range: 0 through 15. A value of ++ 65535 signifies that no bridge number is assigned ++ to this bridge." ++ ::= { dot1dSrPortEntry 4 } ++ ++dot1dSrPortTargetSegment OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The segment number that corresponds to the target ++ segment this port is considered to be connected to ++ by the bridge. Current source routing protocols ++ limit this value to the range: 0 through 4095. ++ ++ (The value 0 is used by some management ++ applications for special test cases.) A value of ++ 65535 signifies that no target segment is assigned ++ to this port." ++ ::= { dot1dSrPortEntry 5 } ++ ++-- It would be nice if we could use ifMtu as the size of the ++-- largest frame, but we can't because ifMtu is defined to be ++-- the size that the (inter-)network layer can use which can ++-- differ from the MAC layer (especially if several layers of ++-- encapsulation are used). ++ ++dot1dSrPortLargestFrame OBJECT-TYPE ++ SYNTAX INTEGER ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The maximum size of the INFO field (LLC and ++ above) that this port can send/receive. It does ++ not include any MAC level (framing) octets. The ++ value of this object is used by this bridge to ++ determine whether a modification of the ++ LargestFrame (LF, see [14]) field of the Routing ++ Control field of the Routing Information Field is ++ necessary. ++ ++ 64 valid values are defined by the IEEE 802.5M SRT ++ Addendum: 516, 635, 754, 873, 993, 1112, 1231, ++ 1350, 1470, 1542, 1615, 1688, 1761, 1833, 1906, ++ 1979, 2052, 2345, 2638, 2932, 3225, 3518, 3812, ++ 4105, 4399, 4865, 5331, 5798, 6264, 6730, 7197, ++ 7663, 8130, 8539, 8949, 9358, 9768, 10178, 10587, ++ 10997, 11407, 12199, 12992, 13785, 14578, 15370, ++ 16163, 16956, 17749, 20730, 23711, 26693, 29674, ++ 32655, 35637, 38618, 41600, 44591, 47583, 50575, ++ 53567, 56559, 59551, and 65535. ++ ++ An illegal value will not be accepted by the ++ bridge." ++ ::= { dot1dSrPortEntry 6 } ++ ++dot1dSrPortSTESpanMode OBJECT-TYPE ++ SYNTAX INTEGER { ++ auto-span(1), ++ disabled(2), ++ forced(3) ++ } ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "Determines how this port behaves when presented ++ with a Spanning Tree Explorer frame. The value ++ 'disabled(2)' indicates that the port will not ++ accept or send Spanning Tree Explorer packets; any ++ STE packets received will be silently discarded. ++ The value 'forced(3)' indicates the port will ++ always accept and propagate Spanning Tree Explorer ++ frames. This allows a manually configured ++ Spanning Tree for this class of packet to be ++ configured. Note that unlike transparent ++ bridging, this is not catastrophic to the network ++ if there are loops. The value 'auto-span(1)' can ++ only be returned by a bridge that both implements ++ the Spanning Tree Protocol and has use of the ++ protocol enabled on this port. The behavior of the ++ port for Spanning Tree Explorer frames is ++ determined by the state of dot1dStpPortState. If ++ the port is in the 'forwarding' state, the frame ++ will be accepted or propagated. Otherwise, it ++ will be silently discarded." ++ ::= { dot1dSrPortEntry 7 } ++ ++dot1dSrPortSpecInFrames OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of Specifically Routed frames, also ++ referred to as Source Routed Frames, that have ++ been received from this port's segment." ++ ::= { dot1dSrPortEntry 8 } ++ ++dot1dSrPortSpecOutFrames OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of Specifically Routed frames, also ++ referred to as Source Routed Frames, that this ++ port has transmitted on its segment." ++ ::= { dot1dSrPortEntry 9 } ++ ++dot1dSrPortApeInFrames OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of All Paths Explorer frames, also ++ referred to as All Routes Explorer frames, that ++ have been received by this port from its segment." ++ ::= { dot1dSrPortEntry 10 } ++ ++dot1dSrPortApeOutFrames OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of all Paths Explorer Frames, also ++ referred to as All Routes Explorer frames, that ++ have been transmitted by this port on its ++ segment." ++ ::= { dot1dSrPortEntry 11 } ++ ++dot1dSrPortSteInFrames OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of spanning tree explorer frames that ++ have been received by this port from its segment." ++ ::= { dot1dSrPortEntry 12 } ++ ++dot1dSrPortSteOutFrames OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of spanning tree explorer frames that ++ have been transmitted by this port on its ++ segment." ++ ::= { dot1dSrPortEntry 13 } ++ ++dot1dSrPortSegmentMismatchDiscards OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of explorer frames that have been ++ discarded by this port because the routing ++ descriptor field contained an invalid adjacent ++ segment value." ++ ::= { dot1dSrPortEntry 14 } ++ ++dot1dSrPortDuplicateSegmentDiscards OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of frames that have been discarded by ++ this port because the routing descriptor field ++ contained a duplicate segment identifier." ++ ::= { dot1dSrPortEntry 15 } ++ ++dot1dSrPortHopCountExceededDiscards OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of explorer frames that have been ++ discarded by this port because the Routing ++ Information Field has exceeded the maximum route ++ descriptor length." ++ ::= { dot1dSrPortEntry 16 } ++ ++dot1dSrPortDupLanIdOrTreeErrors OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of duplicate LAN IDs or Tree errors. ++ This helps in detection of problems in networks ++ containing older IBM Source Routing Bridges." ++ ::= { dot1dSrPortEntry 17 } ++ ++dot1dSrPortLanIdMismatches OBJECT-TYPE ++ SYNTAX Counter ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The number of ARE and STE frames that were ++ discarded because the last LAN ID in the routing ++ information field did not equal the LAN-in ID. ++ This error can occur in implementations which do ++ only a LAN-in ID and Bridge Number check instead ++ of a LAN-in ID, Bridge Number, and LAN-out ID ++ check before they forward broadcast frames." ++ ::= { dot1dSrPortEntry 18 } ++ ++-- scalar object in dot1dSr ++ ++dot1dSrBridgeLfMode OBJECT-TYPE ++ SYNTAX INTEGER { ++ mode3(1), ++ mode6(2) ++ } ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "Indicates whether the bridge operates using older ++ 3 bit length negotiation fields or the newer 6 bit ++ length field in its RIF." ++ ::= { dot1dSr 2 } ++ ++-- The Port-Pair Database ++ ++-- Implementation of this group is optional. ++ ++-- This group is implemented by those bridges that support ++-- the direct multiport model of the source route bridging ++-- mode as defined in the IEEE 802.5 SRT Addendum to ++-- 802.1d. ++ ++-- Bridges implementing this group may report 65535 for ++-- dot1dSrPortBridgeNumber and dot1dSrPortTargetSegment, ++-- indicating that those objects are not applicable. ++ ++dot1dPortPairTableSize OBJECT-TYPE ++ SYNTAX Gauge ++ ACCESS read-only ++ STATUS mandatory ++ DESCRIPTION ++ "The total number of entries in the Bridge Port ++ Pair Database." ++ ::= { dot1dPortPair 1 } ++ ++-- the Bridge Port-Pair table ++ ++-- this table represents port pairs within a bridge forming ++-- a unique bridge path, as defined in the IEEE 802.5M SRT ++-- Addendum. ++ ++dot1dPortPairTable OBJECT-TYPE ++ SYNTAX SEQUENCE OF Dot1dPortPairEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "A table that contains information about every ++ ++ port pair database entity associated with this ++ source routing bridge." ++ ::= { dot1dPortPair 2 } ++ ++dot1dPortPairEntry OBJECT-TYPE ++ SYNTAX Dot1dPortPairEntry ++ ACCESS not-accessible ++ STATUS mandatory ++ DESCRIPTION ++ "A list of information for each port pair entity ++ of a bridge." ++ INDEX { dot1dPortPairLowPort, dot1dPortPairHighPort } ++ ::= { dot1dPortPairTable 1 } ++ ++Dot1dPortPairEntry ::= ++ SEQUENCE { ++ dot1dPortPairLowPort ++ INTEGER, ++ dot1dPortPairHighPort ++ INTEGER, ++ dot1dPortPairBridgeNum ++ INTEGER, ++ dot1dPortPairBridgeState ++ INTEGER ++ } ++ ++dot1dPortPairLowPort OBJECT-TYPE ++ SYNTAX INTEGER (1..65535) ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The port number of the lower numbered port for ++ which this entry contains port pair database ++ information." ++ ::= { dot1dPortPairEntry 1 } ++ ++dot1dPortPairHighPort OBJECT-TYPE ++ SYNTAX INTEGER (1..65535) ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The port number of the higher numbered port for ++ which this entry contains port pair database ++ information." ++ ::= { dot1dPortPairEntry 2 } ++ ++dot1dPortPairBridgeNum OBJECT-TYPE ++ SYNTAX INTEGER ++ ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "A bridge number that uniquely identifies the path ++ provided by this source routing bridge between the ++ segments connected to dot1dPortPairLowPort and ++ dot1dPortPairHighPort. The purpose of bridge ++ number is to disambiguate between multiple paths ++ connecting the same two LANs." ++ ::= { dot1dPortPairEntry 3 } ++ ++dot1dPortPairBridgeState OBJECT-TYPE ++ SYNTAX INTEGER { ++ enabled(1), ++ disabled(2), ++ invalid(3) ++ } ++ ACCESS read-write ++ STATUS mandatory ++ DESCRIPTION ++ "The state of dot1dPortPairBridgeNum. Writing ++ 'invalid(3)' to this object removes the ++ corresponding entry." ++ ::= { dot1dPortPairEntry 4 } ++ ++END diff --git a/net/net-snmp/patches/140-debian-docfiles.patch b/net/net-snmp/patches/140-debian-docfiles.patch new file mode 100644 index 0000000..9a80e46 --- /dev/null +++ b/net/net-snmp/patches/140-debian-docfiles.patch @@ -0,0 +1,95 @@ +--- a/FAQ ++++ b/FAQ +@@ -99,7 +99,7 @@ TABLE OF CONTENTS + I don't understand the new access control stuff - what does it mean? + How do I configure SNMPv3 users? + The 'createUser' line disappears when I start the agent. Why? +- What's the difference between /var/net-snmp and /usr/local/share/snmp? ++ What's the difference between /var/lib/snmp and /usr/share/snmp? + My new agent is ignoring the old snmpd.conf file. Why? + Why am I getting "Connection refused"? + Why can't I see values in the UCDavis 'extensible' or 'disk' trees? +@@ -643,7 +643,7 @@ How do I add a MIB to the tools? + There are two steps required to add a new MIB file to the tools. + Firstly, copy the MIB file into the appropiate location: + +- cp MY-MIB.txt /usr/local/share/snmp/mibs ++ cp MY-MIB.txt /usr/share/snmp/mibs + (which makes it available to everyone on the system) + + or +@@ -1177,7 +1177,7 @@ My traphandler script doesn't work when + If this is the case, then you can specify this interpreter + explicitly as part of the trap handle directive: + +- traphandle default /usr/bin/perl /usr/local/bin/log_it ++ traphandle default /usr/bin/perl /usr/bin/log_it + + In this case, it's almost certain that you'll also + need to give the full path to the traphandle script (as shown) +@@ -1251,7 +1251,7 @@ OK, what should I put in snmp.conf? + string to use. + + Some of these (such as the MIB file location), might be best put in +- a shared snmp.conf file (typically /usr/local/share/snmp/snmp.conf or ++ a shared snmp.conf file (typically /usr/share/snmp/snmp.conf or + /etc/snmp/snmp.conf) to apply to all users of the system. Others + (particularly the SNMPv3 security settings), are more likely to refer + to a particular user, and should go in a personal snmp.conf file +@@ -1476,7 +1476,7 @@ Why aren't my mib files being read in? + + + Alternatively, the tools may be looking in the wrong place. +- The default location for the mib files is /usr/local/share/snmp/mibs. ++ The default location for the mib files is /usr/share/snmp/mibs. + Again, this is set when the suite is first configured and compiled. + This can be changed using the environmental variable 'MIBDIRS' + or the snmp.conf directive 'mibdirs'. +@@ -2430,7 +2430,7 @@ How do I configure SNMPv3 users? + + There are three ways to configure SNMPv3 users: + +- 1) Stop the agent, and create a file /var/net-snmp/snmpd.conf, ++ 1) Stop the agent, and create a file /var/lib/snmp/snmpd.conf, + containing the line + + createUser {myUser} MD5 {myPassword} DES +@@ -2443,7 +2443,7 @@ How do I configure SNMPv3 users? + net-snmp-config --create-snmpv3-user + + and follow the instructions. This will create an entry +- in the /var/net-snmp/snmpd.conf file similar to the above. ++ in the /var/lib/snmp/snmpd.conf file similar to the above. + Then re-start the snmpd agent. + + 3) Make sure the agent is running, and will respond to a suitable +@@ -2476,16 +2476,16 @@ The 'createUser' line disappears when I + + + +-What's the difference between /var/net-snmp and /usr/local/share/snmp? +---------------------------------------------------------------------- ++What's the difference between /var/lib/snmp and /usr/share/snmp? ++---------------------------------------------------------------- + +- The /var/net-snmp location is primarily used for information set ++ The /var/lib/snmp location is primarily used for information set + during the running of the agent, which needs to be persistent between + one run of the agent and the next. Apart from "createUser" (see + the previous entry), you shouldn't need to touch this file. + + All other user-provided configuration should go in the traditional +- location (typically /usr/local/share/snmp/snmpd.conf or /etc/snmp). ++ location (typically /usr/share/snmp or /etc/snmp). + + + +@@ -2498,7 +2498,7 @@ My new agent is ignoring the old snmpd.c + distribution), with the current release installed from the source. + + The default location for this file with the basic distribution is +- /usr/local/share/snmp/snmpd.conf (or PREFIX/share/snmp/snmpd.conf). ++ /usr/share/snmp/snmpd.conf (or PREFIX/share/snmp/snmpd.conf). + Ready-installed versions often look for the file as /etc/snmpd.conf, + or /etc/snmp/snmpd.conf. Try moving the old config file to the new + location, and restart the agent. diff --git a/net/net-snmp/patches/150-debian-defaultconfig.patch b/net/net-snmp/patches/150-debian-defaultconfig.patch new file mode 100644 index 0000000..205ed1a --- /dev/null +++ b/net/net-snmp/patches/150-debian-defaultconfig.patch @@ -0,0 +1,142 @@ +--- a/EXAMPLE.conf.def ++++ b/EXAMPLE.conf.def +@@ -6,7 +6,7 @@ + ############################################################################### + # + # This file is intended to only be an example. If, however, you want +-# to use it, it should be placed in SYSCONFDIR/snmp/snmpd.conf. ++# to use it, it should be placed in /etc/snmp/snmpd.conf. + # When the snmpd agent starts up, this is where it will look for it. + # + # You might be interested in generating your own snmpd.conf file using +@@ -58,31 +58,37 @@ + # from): + + # sec.name source community +-com2sec local localhost COMMUNITY +-com2sec mynetwork NETWORK/24 COMMUNITY ++com2sec paranoid default public ++#com2sec readonly default public ++#com2sec readwrite default private + + #### + # Second, map the security names into group names: + + # sec.model sec.name +-group MyRWGroup v1 local +-group MyRWGroup v2c local +-group MyRWGroup usm local +-group MyROGroup v1 mynetwork +-group MyROGroup v2c mynetwork +-group MyROGroup usm mynetwork ++group MyROSystem v1 paranoid ++group MyROSystem v2c paranoid ++group MyROSystem usm paranoid ++group MyROGroup v1 readonly ++group MyROGroup v2c readonly ++group MyROGroup usm readonly ++group MyRWGroup v1 readwrite ++group MyRWGroup v2c readwrite ++group MyRWGroup usm readwrite + + #### + # Third, create a view for us to let the groups have rights to: + + # incl/excl subtree mask + view all included .1 80 ++view system included .iso.org.dod.internet.mgmt.mib-2.system + + #### + # Finally, grant the 2 groups access to the 1 view with different + # write permissions: + + # context sec.model sec.level match read write notif ++access MyROSystem "" any noauth exact system none none + access MyROGroup "" any noauth exact all none none + access MyRWGroup "" any noauth exact all all none + +@@ -100,8 +106,8 @@ access MyRWGroup "" any noaut + # value of an object whose value is given here will fail with an error + # status of notWritable. + +-syslocation Right here, right now. +-syscontact Me ++syslocation Unknown (configure /etc/snmp/snmpd.local.conf) ++syscontact Root (configure /etc/snmp/snmpd.local.conf) + + # Example output of snmpwalk: + # % snmpwalk -v 1 -c public localhost system +@@ -135,13 +141,13 @@ syscontact Me + # + + # Make sure mountd is running +-proc mountd ++#proc mountd + + # Make sure there are no more than 4 ntalkds running, but 0 is ok too. +-proc ntalkd 4 ++#proc ntalkd 4 + + # Make sure at least one sendmail, but less than or equal to 10 are running. +-proc sendmail 10 1 ++#proc sendmail 10 1 + + # A snmpwalk of the prTable would look something like this: + # +@@ -199,7 +205,7 @@ proc sendmail 10 1 + # ARGS: optional arguments to be passed to the program + + # a simple hello world +-exec echotest /bin/echo hello world ++#exec echotest /bin/echo hello world + + # Run a shell script containing: + # +@@ -250,7 +256,7 @@ exec echotest /bin/echo hello world + + # Check the / partition and make sure it contains at least 10 megs. + +-disk / 10000 ++#disk / 10000 + + # % snmpwalk -v 1 -c public localhost .EXTENSIBLEDOTMIB.DISKMIBNUM + # enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0 +@@ -279,7 +285,7 @@ disk / 10000 + # 15MAX: Similar, but for 15 min average. + + # Check for loads: +-load 12 14 14 ++#load 12 14 14 + + # % snmpwalk -v 1 -c public localhost .EXTENSIBLEDOTMIB.LOADAVEMIBNUM + # enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1 +@@ -365,7 +371,7 @@ load 12 14 14 + # (commented out here since it requires that you place the + # script in the right location. (its not installed by default)) + +-# pass .EXTENSIBLEDOTMIB.255 /bin/sh PREFIX/local/passtest ++# pass .EXTENSIBLEDOTMIB.255 /bin/sh /usr/local/passtest + + # % snmpwalk -v 1 -c public localhost .EXTENSIBLEDOTMIB.255 + # enterprises.ucdavis.255.1 = "life the universe and everything" +--- /dev/null ++++ b/EXAMPLE-trap.conf +@@ -0,0 +1,18 @@ ++############################################################################### ++# ++# EXAMPLE-trap.conf: ++# An example configuration file for configuring the Net-SNMP snmptrapd agent. ++# ++############################################################################### ++# ++# This file is intended to only be an example. If, however, you want ++# to use it, it should be placed in /etc/snmp/snmptrapd.conf. ++# When the snmptrapd agent starts up, this is where it will look for it. ++# ++# All lines beginning with a '#' are comments and are intended for you ++# to read. All other lines are configuration commands for the agent. ++ ++# ++# PLEASE: read the snmptrapd.conf(5) manual page as well! ++# ++ diff --git a/net/net-snmp/patches/160-no_ldconfig.patch b/net/net-snmp/patches/160-no_ldconfig.patch new file mode 100644 index 0000000..f883c7f --- /dev/null +++ b/net/net-snmp/patches/160-no_ldconfig.patch @@ -0,0 +1,12 @@ +diff -urN net-snmp-5.4.2.1/configure net-snmp-5.4.2.1.new/configure +--- net-snmp-5.4.2.1/configure 2008-10-31 16:53:45.000000000 +0100 ++++ net-snmp-5.4.2.1.new/configure 2009-08-02 00:46:05.000000000 +0200 +@@ -10218,7 +10218,7 @@ + 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' ++ finish_cmds='' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. diff --git a/net/net-snmp/patches/170-ldflags.patch b/net/net-snmp/patches/170-ldflags.patch new file mode 100644 index 0000000..d9826bc --- /dev/null +++ b/net/net-snmp/patches/170-ldflags.patch @@ -0,0 +1,11 @@ +--- a/Makefile.top ++++ b/Makefile.top +@@ -81,7 +81,7 @@ LIBCURRENT = 16 + LIBAGE = 1 + LIBREVISION = 2 + +-LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o ++LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) $(LDFLAGS) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o + LIB_EXTENSION = la + LIB_VERSION = + LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(libdir) diff --git a/net/net-snmp/patches/750-ieee802dot11.patch b/net/net-snmp/patches/750-ieee802dot11.patch new file mode 100644 index 0000000..9e0625c --- /dev/null +++ b/net/net-snmp/patches/750-ieee802dot11.patch @@ -0,0 +1,6156 @@ +--- /dev/null ++++ b/agent/mibgroup/ieee802dot11.c +@@ -0,0 +1,4915 @@ ++/**************************************************************************** ++* * ++* File Name: ieee802dot11.c * ++* Used By: * ++* * ++* Operating System: * ++* Purpose: * ++* * ++* Comments: * ++* * ++* Author: Larry Simmons * ++* lsimmons@avantcom.com * ++* www.avantcom.com * ++* * ++* Creation Date: 09/02/03 * ++* * ++* Ver Date Inits Modification * ++* ----- -------- ----- ------------ * ++* 0.0.1 09/02/03 LRS created * ++* 0.0.2 09/24/03 LRS wouldn't build after fresh ./configure * ++****************************************************************************/ ++/**************************************************************************** ++* Includes * ++****************************************************************************/ ++#include ++#include ++#include ++#include "ieee802dot11.h" ++#include "iwlib.h" ++ ++/**************************************************************************** ++* Defines * ++****************************************************************************/ ++#define DISPLAYWIEXT // display wireless ext info ++#define TABLE_SIZE 1 ++//#define MINLOADFREQ 15 // min reload frequency in seconds ++#define MINLOADFREQ 5 // min reload frequency in seconds // for testing ++#define PROC_NET_DEV "/proc/net/dev" ++#define PROC_NET_WIRELESS "/proc/net/wireless" ++ ++#ifndef UCHAR ++ typedef unsigned char UCHAR; ++#endif ++ ++/**************************************************************************** ++* Private Functions * ++****************************************************************************/ ++static void loadTables(); ++static void loadWiExt ( int, char *, struct wireless_info * ); ++static void load80211Structs ( int, char *, struct wireless_info * ); ++static void initStructs(); ++ ++// Wireless Extensions Specific Functions ++static void loadWiExtTo80211Structs ( int, char *, struct wireless_info * ); ++static void displayWiExt ( struct wireless_info ); ++ ++// Linked List Functions ++static void addList ( char *, char *, int ); ++static void initLists(); // initialize all the linked lists ++static void flushLists(); // flush all the linked lists ++static void flushList ( char * ); // flush a single linked list ++ ++// Utility Functions ++static int openSocket ( void ); ++static int mWatt2dbm ( int ); ++static char *htob ( char * ); ++static int hasChanged ( char *, int ); ++ ++/**************************************************************************** ++* Private Variables * ++****************************************************************************/ ++static unsigned long lastLoad = 0; // ET in secs at last table load ++ ++static struct avNode *lastNode, *newNode, *np; ++ ++/**************************************************************************** ++* External Functions * ++****************************************************************************/ ++ ++/**************************************************************************** ++* ieee802dot11_variables_oid: * ++* this is the top level oid that we want to register under. This * ++* is essentially a prefix, with the suffix appearing in the * ++* variable below. * ++****************************************************************************/ ++oid ieee802dot11_variables_oid[] = { 1,2,840,10036 }; ++ ++/**************************************************************************** ++* variable7 ieee802dot11_variables: * ++* this variable defines function callbacks and type return information * ++* for the ieee802dot11 mib section * ++****************************************************************************/ ++struct variable7 ieee802dot11_variables[] = { ++/* magic number , variable type , ro/rw , callback fn , L, oidsuffix */ ++#define DOT11STATIONID 3 ++ { DOT11STATIONID , ASN_OCTET_STR , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,1 } }, ++#define DOT11MEDIUMOCCUPANCYLIMIT 4 ++ { DOT11MEDIUMOCCUPANCYLIMIT, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,2 } }, ++#define DOT11CFPOLLABLE 5 ++ { DOT11CFPOLLABLE , ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,3 } }, ++#define DOT11CFPPERIOD 6 ++ { DOT11CFPPERIOD , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,4 } }, ++#define DOT11CFPMAXDURATION 7 ++ { DOT11CFPMAXDURATION , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,5 } }, ++#define DOT11AUTHENTICATIONRESPONSETIMEOUT 8 ++ { DOT11AUTHENTICATIONRESPONSETIMEOUT, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,6 } }, ++#define DOT11PRIVACYOPTIONIMPLEMENTED 9 ++ { DOT11PRIVACYOPTIONIMPLEMENTED, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,7 } }, ++#define DOT11POWERMANAGEMENTMODE 10 ++ { DOT11POWERMANAGEMENTMODE, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,8 } }, ++#define DOT11DESIREDSSID 11 ++ { DOT11DESIREDSSID , ASN_OCTET_STR , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,9 } }, ++#define DOT11DESIREDBSSTYPE 12 ++ { DOT11DESIREDBSSTYPE , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,10 } }, ++#define DOT11OPERATIONALRATESET 13 ++ { DOT11OPERATIONALRATESET, ASN_OCTET_STR , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,11 } }, ++#define DOT11BEACONPERIOD 14 ++ { DOT11BEACONPERIOD , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,12 } }, ++#define DOT11DTIMPERIOD 15 ++ { DOT11DTIMPERIOD , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,13 } }, ++#define DOT11ASSOCIATIONRESPONSETIMEOUT 16 ++ { DOT11ASSOCIATIONRESPONSETIMEOUT, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,14 } }, ++#define DOT11DISASSOCIATEREASON 17 ++ { DOT11DISASSOCIATEREASON, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,15 } }, ++#define DOT11DISASSOCIATESTATION 18 ++ { DOT11DISASSOCIATESTATION, ASN_OCTET_STR , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,16 } }, ++#define DOT11DEAUTHENTICATEREASON 19 ++ { DOT11DEAUTHENTICATEREASON, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,17 } }, ++#define DOT11DEAUTHENTICATESTATION 20 ++ { DOT11DEAUTHENTICATESTATION, ASN_OCTET_STR , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,18 } }, ++#define DOT11AUTHENTICATEFAILSTATUS 21 ++ { DOT11AUTHENTICATEFAILSTATUS, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,19 } }, ++#define DOT11AUTHENTICATEFAILSTATION 22 ++ { DOT11AUTHENTICATEFAILSTATION, ASN_OCTET_STR , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,20 } }, ++ ++#define DOT11AUTHENTICATIONALGORITHM 26 ++ { DOT11AUTHENTICATIONALGORITHM, ASN_INTEGER , RONLY , var_dot11AuthenticationAlgorithmsTable, 4, { 1,2,1,2 } }, ++#define DOT11AUTHENTICATIONALGORITHMSENABLE 27 ++ { DOT11AUTHENTICATIONALGORITHMSENABLE, ASN_INTEGER , RWRITE, var_dot11AuthenticationAlgorithmsTable, 4, { 1,2,1,3 } }, ++ ++#define DOT11WEPDEFAULTKEYVALUE 31 ++ { DOT11WEPDEFAULTKEYVALUE, ASN_OCTET_STR , RWRITE, var_dot11WEPDefaultKeysTable, 4, { 1,3,1,2 } }, ++ ++#define DOT11WEPKEYMAPPINGADDRESS 35 ++ { DOT11WEPKEYMAPPINGADDRESS, ASN_OCTET_STR , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,2 } }, ++#define DOT11WEPKEYMAPPINGWEPON 36 ++ { DOT11WEPKEYMAPPINGWEPON, ASN_INTEGER , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,3 } }, ++#define DOT11WEPKEYMAPPINGVALUE 37 ++ { DOT11WEPKEYMAPPINGVALUE, ASN_OCTET_STR , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,4 } }, ++#define DOT11WEPKEYMAPPINGSTATUS 38 ++ { DOT11WEPKEYMAPPINGSTATUS, ASN_INTEGER , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,5 } }, ++ ++#define DOT11PRIVACYINVOKED 41 ++ { DOT11PRIVACYINVOKED , ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,1 } }, ++#define DOT11WEPDEFAULTKEYID 42 ++ { DOT11WEPDEFAULTKEYID, ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,2 } }, ++#define DOT11WEPKEYMAPPINGLENGTH 43 ++ { DOT11WEPKEYMAPPINGLENGTH, ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,3 } }, ++#define DOT11EXCLUDEUNENCRYPTED 44 ++ { DOT11EXCLUDEUNENCRYPTED, ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,4 } }, ++#define DOT11WEPICVERRORCOUNT 45 ++ { DOT11WEPICVERRORCOUNT, ASN_COUNTER , RONLY , var_dot11PrivacyTable, 4, { 1,5,1,5 } }, ++#define DOT11WEPEXCLUDEDCOUNT 46 ++ { DOT11WEPEXCLUDEDCOUNT, ASN_COUNTER , RONLY , var_dot11PrivacyTable, 4, { 1,5,1,6 } }, ++ ++#define DOT11MACADDRESS 49 ++ { DOT11MACADDRESS , ASN_OCTET_STR , RONLY , var_dot11OperationTable, 4, { 2,1,1,1 } }, ++#define DOT11RTSTHRESHOLD 50 ++ { DOT11RTSTHRESHOLD , ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,2 } }, ++#define DOT11SHORTRETRYLIMIT 51 ++ { DOT11SHORTRETRYLIMIT, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,3 } }, ++#define DOT11LONGRETRYLIMIT 52 ++ { DOT11LONGRETRYLIMIT , ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,4 } }, ++#define DOT11FRAGMENTATIONTHRESHOLD 53 ++ { DOT11FRAGMENTATIONTHRESHOLD, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,5 } }, ++#define DOT11MAXTRANSMITMSDULIFETIME 54 ++ { DOT11MAXTRANSMITMSDULIFETIME, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,6 } }, ++#define DOT11MAXRECEIVELIFETIME 55 ++ { DOT11MAXRECEIVELIFETIME, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,7 } }, ++#define DOT11MANUFACTURERID 56 ++ { DOT11MANUFACTURERID , ASN_OCTET_STR , RONLY , var_dot11OperationTable, 4, { 2,1,1,8 } }, ++#define DOT11PRODUCTID 57 ++ { DOT11PRODUCTID , ASN_OCTET_STR , RONLY , var_dot11OperationTable, 4, { 2,1,1,9 } }, ++ ++#define DOT11TRANSMITTEDFRAGMENTCOUNT 60 ++ { DOT11TRANSMITTEDFRAGMENTCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,1 } }, ++#define DOT11MULTICASTTRANSMITTEDFRAMECOUNT 61 ++ { DOT11MULTICASTTRANSMITTEDFRAMECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,2 } }, ++#define DOT11FAILEDCOUNT 62 ++ { DOT11FAILEDCOUNT , ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,3 } }, ++#define DOT11RETRYCOUNT 63 ++ { DOT11RETRYCOUNT , ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,4 } }, ++#define DOT11MULTIPLERETRYCOUNT 64 ++ { DOT11MULTIPLERETRYCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,5 } }, ++#define DOT11FRAMEDUPLICATECOUNT 65 ++ { DOT11FRAMEDUPLICATECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,6 } }, ++#define DOT11RTSSUCCESSCOUNT 66 ++ { DOT11RTSSUCCESSCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,7 } }, ++#define DOT11RTSFAILURECOUNT 67 ++ { DOT11RTSFAILURECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,8 } }, ++#define DOT11ACKFAILURECOUNT 68 ++ { DOT11ACKFAILURECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,9 } }, ++#define DOT11RECEIVEDFRAGMENTCOUNT 69 ++ { DOT11RECEIVEDFRAGMENTCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,10 } }, ++#define DOT11MULTICASTRECEIVEDFRAMECOUNT 70 ++ { DOT11MULTICASTRECEIVEDFRAMECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,11 } }, ++#define DOT11FCSERRORCOUNT 71 ++ { DOT11FCSERRORCOUNT , ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,12 } }, ++#define DOT11TRANSMITTEDFRAMECOUNT 72 ++ { DOT11TRANSMITTEDFRAMECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,13 } }, ++#define DOT11WEPUNDECRYPTABLECOUNT 73 ++ { DOT11WEPUNDECRYPTABLECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,14 } }, ++ ++#define DOT11ADDRESS 77 ++ { DOT11ADDRESS , ASN_OCTET_STR , RWRITE, var_dot11GroupAddressesTable, 4, { 2,3,1,2 } }, ++#define DOT11GROUPADDRESSESSTATUS 78 ++ { DOT11GROUPADDRESSESSTATUS, ASN_INTEGER , RWRITE, var_dot11GroupAddressesTable, 4, { 2,3,1,3 } }, ++ ++#define DOT11RESOURCETYPEIDNAME 79 ++ { DOT11RESOURCETYPEIDNAME, ASN_OCTET_STR , RONLY , var_ieee802dot11, 3, { 3,1,1 } }, ++#define DOT11MANUFACTUREROUI 82 ++ { DOT11MANUFACTUREROUI, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,1 } }, ++#define DOT11MANUFACTURERNAME 83 ++ { DOT11MANUFACTURERNAME, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,2 } }, ++#define DOT11MANUFACTURERPRODUCTNAME 84 ++ { DOT11MANUFACTURERPRODUCTNAME, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,3 } }, ++#define DOT11MANUFACTURERPRODUCTVERSION 85 ++ { DOT11MANUFACTURERPRODUCTVERSION, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,4 } }, ++ ++#define DOT11PHYTYPE 88 ++ { DOT11PHYTYPE , ASN_INTEGER , RONLY , var_dot11PhyOperationTable, 4, { 4,1,1,1 } }, ++#define DOT11CURRENTREGDOMAIN 89 ++ { DOT11CURRENTREGDOMAIN, ASN_INTEGER , RWRITE, var_dot11PhyOperationTable, 4, { 4,1,1,2 } }, ++#define DOT11TEMPTYPE 90 ++ { DOT11TEMPTYPE , ASN_INTEGER , RONLY , var_dot11PhyOperationTable, 4, { 4,1,1,3 } }, ++#define DOT11CURRENTTXANTENNA 93 ++ { DOT11CURRENTTXANTENNA, ASN_INTEGER , RWRITE, var_dot11PhyAntennaTable, 4, { 4,2,1,1 } }, ++#define DOT11DIVERSITYSUPPORT 94 ++ { DOT11DIVERSITYSUPPORT, ASN_INTEGER , RONLY , var_dot11PhyAntennaTable, 4, { 4,2,1,2 } }, ++#define DOT11CURRENTRXANTENNA 95 ++ { DOT11CURRENTRXANTENNA, ASN_INTEGER , RWRITE, var_dot11PhyAntennaTable, 4, { 4,2,1,3 } }, ++#define DOT11NUMBERSUPPORTEDPOWERLEVELS 98 ++ { DOT11NUMBERSUPPORTEDPOWERLEVELS, ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,1 } }, ++#define DOT11TXPOWERLEVEL1 99 ++ { DOT11TXPOWERLEVEL1 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,2 } }, ++#define DOT11TXPOWERLEVEL2 100 ++ { DOT11TXPOWERLEVEL2 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,3 } }, ++#define DOT11TXPOWERLEVEL3 101 ++ { DOT11TXPOWERLEVEL3 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,4 } }, ++#define DOT11TXPOWERLEVEL4 102 ++ { DOT11TXPOWERLEVEL4 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,5 } }, ++#define DOT11TXPOWERLEVEL5 103 ++ { DOT11TXPOWERLEVEL5 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,6 } }, ++#define DOT11TXPOWERLEVEL6 104 ++ { DOT11TXPOWERLEVEL6 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,7 } }, ++#define DOT11TXPOWERLEVEL7 105 ++ { DOT11TXPOWERLEVEL7 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,8 } }, ++#define DOT11TXPOWERLEVEL8 106 ++ { DOT11TXPOWERLEVEL8 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,9 } }, ++#define DOT11CURRENTTXPOWERLEVEL 107 ++ { DOT11CURRENTTXPOWERLEVEL, ASN_INTEGER , RWRITE, var_dot11PhyTxPowerTable, 4, { 4,3,1,10 } }, ++ ++#define DOT11HOPTIME 110 ++ { DOT11HOPTIME , ASN_INTEGER , RONLY , var_dot11PhyFHSSTable, 4, { 4,4,1,1 } }, ++#define DOT11CURRENTCHANNELNUMBER 111 ++ { DOT11CURRENTCHANNELNUMBER, ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,2 } }, ++#define DOT11MAXDWELLTIME 112 ++ { DOT11MAXDWELLTIME , ASN_INTEGER , RONLY , var_dot11PhyFHSSTable, 4, { 4,4,1,3 } }, ++#define DOT11CURRENTDWELLTIME 113 ++ { DOT11CURRENTDWELLTIME, ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,4 } }, ++#define DOT11CURRENTSET 114 ++ { DOT11CURRENTSET , ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,5 } }, ++#define DOT11CURRENTPATTERN 115 ++ { DOT11CURRENTPATTERN , ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,6 } }, ++#define DOT11CURRENTINDEX 116 ++ { DOT11CURRENTINDEX , ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,7 } }, ++ ++#define DOT11CURRENTCHANNEL 119 ++ { DOT11CURRENTCHANNEL , ASN_INTEGER , RWRITE, var_dot11PhyDSSSTable, 4, { 4,5,1,1 } }, ++#define DOT11CCAMODESUPPORTED 120 ++ { DOT11CCAMODESUPPORTED, ASN_INTEGER , RONLY , var_dot11PhyDSSSTable, 4, { 4,5,1,2 } }, ++#define DOT11CURRENTCCAMODE 121 ++ { DOT11CURRENTCCAMODE , ASN_INTEGER , RWRITE, var_dot11PhyDSSSTable, 4, { 4,5,1,3 } }, ++#define DOT11EDTHRESHOLD 122 ++ { DOT11EDTHRESHOLD , ASN_INTEGER , RWRITE, var_dot11PhyDSSSTable, 4, { 4,5,1,4 } }, ++ ++#define DOT11CCAWATCHDOGTIMERMAX 125 ++ { DOT11CCAWATCHDOGTIMERMAX, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,1 } }, ++#define DOT11CCAWATCHDOGCOUNTMAX 126 ++ { DOT11CCAWATCHDOGCOUNTMAX, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,2 } }, ++#define DOT11CCAWATCHDOGTIMERMIN 127 ++ { DOT11CCAWATCHDOGTIMERMIN, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,3 } }, ++#define DOT11CCAWATCHDOGCOUNTMIN 128 ++ { DOT11CCAWATCHDOGCOUNTMIN, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,4 } }, ++ ++#define DOT11REGDOMAINSSUPPORTVALUE 132 ++ { DOT11REGDOMAINSSUPPORTVALUE, ASN_INTEGER , RONLY , var_dot11RegDomainsSupportedTable, 4, { 4,7,1,2 } }, ++ ++#define DOT11SUPPORTEDTXANTENNA 136 ++ { DOT11SUPPORTEDTXANTENNA, ASN_INTEGER , RWRITE, var_dot11AntennasListTable, 4, { 4,8,1,2 } }, ++#define DOT11SUPPORTEDRXANTENNA 137 ++ { DOT11SUPPORTEDRXANTENNA, ASN_INTEGER , RWRITE, var_dot11AntennasListTable, 4, { 4,8,1,3 } }, ++#define DOT11DIVERSITYSELECTIONRX 138 ++ { DOT11DIVERSITYSELECTIONRX, ASN_INTEGER , RWRITE, var_dot11AntennasListTable, 4, { 4,8,1,4 } }, ++ ++#define DOT11SUPPORTEDDATARATESTXVALUE 142 ++ { DOT11SUPPORTEDDATARATESTXVALUE, ASN_INTEGER , RONLY , var_dot11SupportedDataRatesTxTable, 4, { 4,9,1,2 } }, ++ ++#define DOT11SUPPORTEDDATARATESRXVALUE 146 ++ { DOT11SUPPORTEDDATARATESRXVALUE, ASN_INTEGER , RONLY , var_dot11SupportedDataRatesRxTable, 4, { 4,10,1,2 } }, ++}; ++// ( L = length of the oidsuffix ) ++ ++/**************************************************************************** ++* * ++* init_ieee802dot11() - perform any required initialization * ++* * ++****************************************************************************/ ++void init_ieee802dot11 ( void ) { ++ ++ /* register ourselves with the agent to handle our mib tree */ ++ REGISTER_MIB("ieee802dot11", ieee802dot11_variables, variable7, ++ ieee802dot11_variables_oid); ++ ++ initLists(); ++} ++ ++/**************************************************************************** ++* * ++* shutdown_ieee802dot11() - perform any required cleanup @ shutdown * ++* * ++****************************************************************************/ ++void shutdown_ieee802dot11 ( void ) ++{ ++ flushLists(); ++} ++ ++/**************************************************************************** ++* * ++* var_ieee802dot11() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_ieee802dot11 ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method) ++{ ++ loadTables(); ++ ++ if ( header_generic ( vp, name, length, exact,var_len,write_method ) ++ == MATCH_FAILED ) ++ return NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11RESOURCETYPEIDNAME: ++ if ( !haveResourceTypeIDName ) ++ return NULL; ++ *var_len = strlen ( resourceTypeIDName ); ++ return ( UCHAR * ) resourceTypeIDName; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11StationConfigTable() - return a variable value from the table * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11StationConfigTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method ) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ static char MACWork[17]; ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &scList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ sc = ( struct scTbl_data * ) np->data; ++ rName[vp->namelen] = sc->ifIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { ++ ++ switch ( vp->magic ) { // found requested OID, now check for requested variable ++ case DOT11STATIONID: ++ if ( sc->haveStationID ) found = TRUE; break; ++ case DOT11MEDIUMOCCUPANCYLIMIT: ++ if ( sc->haveMediumOccupancyLimit ) found = TRUE; break; ++ case DOT11CFPOLLABLE: ++ if ( sc->haveCFPPollable ) found = TRUE; break; ++ case DOT11CFPPERIOD: ++ if ( sc->haveCFPPeriod ) found = TRUE; break; ++ case DOT11CFPMAXDURATION: ++ if ( sc->haveMaxDuration ) found = TRUE; break; ++ case DOT11AUTHENTICATIONRESPONSETIMEOUT: ++ if ( sc->haveAuthenticationResponseTimeOut ) found = TRUE; break; ++ case DOT11PRIVACYOPTIONIMPLEMENTED: ++ if ( sc->havePrivacyOptionImplemented ) found = TRUE; break; ++ case DOT11POWERMANAGEMENTMODE: ++ if ( sc->havePowerManagementMode ) found = TRUE; break; ++ case DOT11DESIREDSSID: ++ if ( sc->haveDesiredSSID ) found = TRUE; break; ++ case DOT11DESIREDBSSTYPE: ++ if ( sc->haveDesiredBSSType ) found = TRUE; break; ++ case DOT11OPERATIONALRATESET: ++ if ( sc->haveOperationalRateSet ) found = TRUE; break; ++ case DOT11BEACONPERIOD: ++ if ( sc->haveBeaconPeriod ) found = TRUE; break; ++ case DOT11DTIMPERIOD: ++ if ( sc->haveDTIMPeriod ) found = TRUE; break; ++ case DOT11ASSOCIATIONRESPONSETIMEOUT: ++ if ( sc->haveAssociationResponseTimeOut ) found = TRUE; break; ++ case DOT11DISASSOCIATEREASON: ++ if ( sc->disAssociationReason ) found = TRUE; break; ++ case DOT11DISASSOCIATESTATION: ++ if ( sc->haveDisAssociationStation ) found = TRUE; break; ++ case DOT11DEAUTHENTICATEREASON: ++ if ( sc->deAuthenticationReason ) found = TRUE; break; ++ case DOT11DEAUTHENTICATESTATION: ++ if ( sc->haveDeAuthenticationStation ) found = TRUE; break; ++ case DOT11AUTHENTICATEFAILSTATUS: ++ if ( sc->authenticateFailStatus ) found = TRUE; break; ++ case DOT11AUTHENTICATEFAILSTATION: ++ if ( sc->haveAuthenticateFailStation ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); ++ *length = vp->namelen + 1; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11STATIONID: ++// *write_method = write_dot11StationID; ++ MACWork[ 0] = sc->stationID [ 0]; ++ MACWork[ 1] = sc->stationID [ 1]; ++ MACWork[ 2] = sc->stationID [ 3]; ++ MACWork[ 3] = sc->stationID [ 4]; ++ MACWork[ 4] = sc->stationID [ 6]; ++ MACWork[ 5] = sc->stationID [ 7]; ++ MACWork[ 6] = sc->stationID [ 9]; ++ MACWork[ 7] = sc->stationID [10]; ++ MACWork[ 8] = sc->stationID [12]; ++ MACWork[ 9] = sc->stationID [13]; ++ MACWork[10] = sc->stationID [15]; ++ MACWork[11] = sc->stationID [16]; ++ MACWork[12] = '\0'; ++ *var_len = 6; ++ return ( UCHAR * ) htob ( MACWork ); ++ ++ case DOT11MEDIUMOCCUPANCYLIMIT: ++// *write_method = write_dot11MediumOccupancyLimit; ++ sc->mediumOccupancyLimit = 5; ++ return ( UCHAR * ) &sc->mediumOccupancyLimit; ++ ++ case DOT11CFPOLLABLE: ++ return ( UCHAR * ) &sc->CFPPollable; ++ ++ case DOT11CFPPERIOD: ++// *write_method = write_dot11CFPPeriod; ++ return ( UCHAR * ) &sc->CFPPeriod; ++ ++ case DOT11CFPMAXDURATION: ++// *write_method = write_dot11CFPMaxDuration; ++ return ( UCHAR * ) &sc->maxDuration; ++ ++ case DOT11AUTHENTICATIONRESPONSETIMEOUT: ++// *write_method = write_dot11AuthenticationResponseTimeOut; ++ return ( UCHAR * ) &sc->authenticationResponseTimeOut; ++ ++ case DOT11PRIVACYOPTIONIMPLEMENTED: ++ return ( UCHAR * ) &sc->privacyOptionImplemented; ++ ++ case DOT11POWERMANAGEMENTMODE: ++// *write_method = write_dot11PowerManagementMode; ++ return ( UCHAR * ) &sc->powerManagementMode; ++ ++ case DOT11DESIREDSSID: ++// *write_method = write_dot11DesiredSSID; ++ *var_len = strlen ( sc->desiredSSID ); ++ return ( UCHAR * ) sc->desiredSSID; ++ ++ case DOT11DESIREDBSSTYPE: ++// *write_method = write_dot11DesiredBSSType; ++ return ( UCHAR * ) &sc->desiredBSSType; ++ ++ case DOT11OPERATIONALRATESET: ++// *write_method = write_dot11OperationalRateSet; ++ *var_len = strlen ( sc->operationalRateSet ); ++ return ( UCHAR * ) sc->operationalRateSet; ++ ++ case DOT11BEACONPERIOD: ++// *write_method = write_dot11BeaconPeriod; ++ return ( UCHAR * ) &sc->beaconPeriod; ++ ++ case DOT11DTIMPERIOD: ++// *write_method = write_dot11DTIMPeriod; ++ return ( UCHAR * ) &sc->DTIMPeriod; ++ ++ case DOT11ASSOCIATIONRESPONSETIMEOUT: ++// *write_method = write_dot11AssociationResponseTimeOut; ++ return ( UCHAR * ) &sc->associationResponseTimeOut; ++ ++ case DOT11DISASSOCIATEREASON: ++ return ( UCHAR * ) &sc->disAssociationReason; ++ ++ case DOT11DISASSOCIATESTATION: ++ MACWork[ 0] = sc->disAssociationStation[ 0]; ++ MACWork[ 1] = sc->disAssociationStation[ 1]; ++ MACWork[ 2] = sc->disAssociationStation[ 3]; ++ MACWork[ 3] = sc->disAssociationStation[ 4]; ++ MACWork[ 4] = sc->disAssociationStation[ 6]; ++ MACWork[ 5] = sc->disAssociationStation[ 7]; ++ MACWork[ 6] = sc->disAssociationStation[ 9]; ++ MACWork[ 7] = sc->disAssociationStation[10]; ++ MACWork[ 8] = sc->disAssociationStation[12]; ++ MACWork[ 9] = sc->disAssociationStation[13]; ++ MACWork[10] = sc->disAssociationStation[15]; ++ MACWork[11] = sc->disAssociationStation[16]; ++ MACWork[12] = '\0'; ++ *var_len = 6; ++ return ( UCHAR * ) htob ( MACWork ); ++ ++ case DOT11DEAUTHENTICATEREASON: ++ return ( UCHAR * ) &sc->deAuthenticationReason; ++ ++ case DOT11DEAUTHENTICATESTATION: ++ MACWork[ 0] = sc->deAuthenticationStation[ 0]; ++ MACWork[ 1] = sc->deAuthenticationStation[ 1]; ++ MACWork[ 2] = sc->deAuthenticationStation[ 3]; ++ MACWork[ 3] = sc->deAuthenticationStation[ 4]; ++ MACWork[ 4] = sc->deAuthenticationStation[ 6]; ++ MACWork[ 5] = sc->deAuthenticationStation[ 7]; ++ MACWork[ 6] = sc->deAuthenticationStation[ 9]; ++ MACWork[ 7] = sc->deAuthenticationStation[10]; ++ MACWork[ 8] = sc->deAuthenticationStation[12]; ++ MACWork[ 9] = sc->deAuthenticationStation[13]; ++ MACWork[10] = sc->deAuthenticationStation[15]; ++ MACWork[11] = sc->deAuthenticationStation[16]; ++ MACWork[12] = '\0'; ++ *var_len = 6; ++ return ( UCHAR * ) htob ( MACWork ); ++ ++ case DOT11AUTHENTICATEFAILSTATUS: ++ return ( UCHAR * ) &sc->authenticateFailStatus; ++ ++ case DOT11AUTHENTICATEFAILSTATION: ++ MACWork[ 0] = sc->authenticateFailStation[ 0]; ++ MACWork[ 1] = sc->authenticateFailStation[ 1]; ++ MACWork[ 2] = sc->authenticateFailStation[ 3]; ++ MACWork[ 3] = sc->authenticateFailStation[ 4]; ++ MACWork[ 4] = sc->authenticateFailStation[ 6]; ++ MACWork[ 5] = sc->authenticateFailStation[ 7]; ++ MACWork[ 6] = sc->authenticateFailStation[ 9]; ++ MACWork[ 7] = sc->authenticateFailStation[10]; ++ MACWork[ 8] = sc->authenticateFailStation[12]; ++ MACWork[ 9] = sc->authenticateFailStation[13]; ++ MACWork[10] = sc->authenticateFailStation[15]; ++ MACWork[11] = sc->authenticateFailStation[16]; ++ MACWork[12] = '\0'; ++ *var_len = 6; ++ return ( UCHAR * ) htob ( MACWork ); ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11AuthenticationAlgorithmsTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11AuthenticationAlgorithmsTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method ) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &aaList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ aa = ( struct aaTbl_data * ) np->data; ++ rName[vp->namelen + 0] = aa->ifIndex; ++ rName[vp->namelen + 1] = aa->authenticationAlgorithmsIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11AUTHENTICATIONALGORITHM: ++ if ( aa->haveAuthenticationAlgorithm ) found = TRUE; break; ++ case DOT11AUTHENTICATIONALGORITHMSENABLE: ++ if ( aa->authenticationAlgorithmsEnable ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); ++ *length = vp->namelen + 2; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11AUTHENTICATIONALGORITHM: ++ return ( UCHAR * ) &aa->authenticationAlgorithm; ++ ++ case DOT11AUTHENTICATIONALGORITHMSENABLE: ++// *write_method = write_dot11AuthenticationAlgorithmsEnable; ++ return ( UCHAR * ) &aa->authenticationAlgorithmsEnable; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11WEPDefaultKeysTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11WEPDefaultKeysTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method ) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &dfList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ df = ( struct dfTbl_data * ) np->data; ++ rName[vp->namelen + 0] = df->ifIndex; ++ rName[vp->namelen + 1] = df->WEPDefaultKeyIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11WEPDEFAULTKEYVALUE: ++ if ( df->haveWEPDefaultKeyValue ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); ++ *length = vp->namelen + 2; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11WEPDEFAULTKEYVALUE: ++// *write_method = write_dot11WEPDefaultKeyValue; ++ *var_len = strlen ( df->WEPDefaultKeyValue ); ++ return ( UCHAR * ) df->WEPDefaultKeyValue; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11WEPKeyMappingsTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11WEPKeyMappingsTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method) ++{ ++ static char MACWork[17]; ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &kmList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ km = ( struct kmTbl_data * ) np->data; ++ rName[vp->namelen + 0] = km->ifIndex; ++ rName[vp->namelen + 1] = km->WEPKeyMappingIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11WEPKEYMAPPINGADDRESS: ++ if ( km->haveWEPKeyMappingAddress ) found = TRUE; break; ++ case DOT11WEPKEYMAPPINGWEPON: ++ if ( km->haveWEPKeyMappingWEPOn ) found = TRUE; break; ++ case DOT11WEPKEYMAPPINGVALUE: ++ if ( km->haveWEPKeyMappingValue ) found = TRUE; break; ++ case DOT11WEPKEYMAPPINGSTATUS: ++ if ( km->haveWEPKeyMappingStatus ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); ++ *length = vp->namelen + 2; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11WEPKEYMAPPINGADDRESS: ++// *write_method = write_dot11WEPKeyMappingAddress; ++ MACWork[ 0] = km->WEPKeyMappingAddress[ 0]; ++ MACWork[ 1] = km->WEPKeyMappingAddress[ 1]; ++ MACWork[ 2] = km->WEPKeyMappingAddress[ 3]; ++ MACWork[ 3] = km->WEPKeyMappingAddress[ 4]; ++ MACWork[ 4] = km->WEPKeyMappingAddress[ 6]; ++ MACWork[ 5] = km->WEPKeyMappingAddress[ 7]; ++ MACWork[ 6] = km->WEPKeyMappingAddress[ 9]; ++ MACWork[ 7] = km->WEPKeyMappingAddress[10]; ++ MACWork[ 8] = km->WEPKeyMappingAddress[12]; ++ MACWork[ 9] = km->WEPKeyMappingAddress[13]; ++ MACWork[10] = km->WEPKeyMappingAddress[15]; ++ MACWork[11] = km->WEPKeyMappingAddress[16]; ++ MACWork[12] = '\0'; ++ *var_len = 6; ++ return ( UCHAR * ) htob ( MACWork ); ++ ++ case DOT11WEPKEYMAPPINGWEPON: ++// *write_method = write_dot11WEPKeyMappingWEPOn; ++ return ( UCHAR * ) &km->WEPKeyMappingWEPOn; ++ ++ case DOT11WEPKEYMAPPINGVALUE: ++// *write_method = write_dot11WEPKeyMappingValue; ++ *var_len = strlen ( km->WEPKeyMappingValue ); ++ return ( UCHAR * ) km->WEPKeyMappingValue; ++ ++ case DOT11WEPKEYMAPPINGSTATUS: ++// *write_method = write_dot11WEPKeyMappingStatus; ++ return ( UCHAR * ) &km->WEPKeyMappingStatus; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11PrivacyTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11PrivacyTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method ) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &prList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ pr = ( struct prTbl_data * ) np->data; ++ rName[vp->namelen] = pr->ifIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11PRIVACYINVOKED: ++ if ( pr->havePrivacyInvoked ) found = TRUE; break; ++ case DOT11WEPDEFAULTKEYID: ++ if ( pr->haveWEPDefaultKeyID ) found = TRUE; break; ++ case DOT11WEPKEYMAPPINGLENGTH: ++ if ( pr->haveWEPKeyMappingLength ) found = TRUE; break; ++ case DOT11EXCLUDEUNENCRYPTED: ++ if ( pr->haveExcludeUnencrypted ) found = TRUE; break; ++ case DOT11WEPICVERRORCOUNT: ++ if ( pr->haveWEPICVErrorCount ) found = TRUE; break; ++ case DOT11WEPEXCLUDEDCOUNT: ++ if ( pr->haveWEPExcludedCount ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); ++ *length = vp->namelen + 1; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11PRIVACYINVOKED: ++// *write_method = write_dot11PrivacyInvoked; ++ return ( UCHAR * ) &pr->privacyInvoked; ++ ++ case DOT11WEPDEFAULTKEYID: ++// *write_method = write_dot11WEPDefaultKeyID; ++ return ( UCHAR * ) &pr->WEPDefaultKeyID; ++ ++ case DOT11WEPKEYMAPPINGLENGTH: ++// *write_method = write_dot11WEPKeyMappingLength; ++ return ( UCHAR * ) &pr->WEPKeyMappingLength; ++ ++ case DOT11EXCLUDEUNENCRYPTED: ++// *write_method = write_dot11ExcludeUnencrypted; ++ return ( UCHAR * ) &pr->excludeUnencrypted; ++ ++ case DOT11WEPICVERRORCOUNT: ++ return ( UCHAR * ) &pr->WEPICVErrorCount; ++ ++ case DOT11WEPEXCLUDEDCOUNT: ++ return ( UCHAR * ) &pr->WEPExcludedCount; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11OperationTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11OperationTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method ) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ static char MACWork[17]; ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &opList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ op = ( struct opTbl_data * ) np->data; ++ rName[vp->namelen] = op->ifIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { ++ ++ switch ( vp->magic ) { // found requested OID, now check for requested variable ++ case DOT11MACADDRESS: ++ if ( op->haveMACAddress ) found = TRUE; break; ++ case DOT11RTSTHRESHOLD: ++ if ( op->haveRTSThreshold ) found = TRUE; break; ++ case DOT11SHORTRETRYLIMIT: ++ if ( op->haveShortRetryLimit ) found = TRUE; break; ++ case DOT11LONGRETRYLIMIT: ++ if ( op->haveLongRetryLimit ) found = TRUE; break; ++ case DOT11FRAGMENTATIONTHRESHOLD: ++ if ( op->haveFragmentationThreshold ) found = TRUE; break; ++ case DOT11MAXTRANSMITMSDULIFETIME: ++ if ( op->haveMaxTransmitMSDULifetime ) found = TRUE; break; ++ case DOT11MAXRECEIVELIFETIME: ++ if ( op->haveMaxReceiveLifetime ) found = TRUE; break; ++ case DOT11MANUFACTURERID: ++ if ( op->haveManufacturerID ) found = TRUE; break; ++ case DOT11PRODUCTID: ++ if ( op->haveProductID ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); ++ *length = vp->namelen + 1; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11MACADDRESS: ++ MACWork[ 0] = op->MACAddress[ 0]; ++ MACWork[ 1] = op->MACAddress[ 1]; ++ MACWork[ 2] = op->MACAddress[ 3]; ++ MACWork[ 3] = op->MACAddress[ 4]; ++ MACWork[ 4] = op->MACAddress[ 6]; ++ MACWork[ 5] = op->MACAddress[ 7]; ++ MACWork[ 6] = op->MACAddress[ 9]; ++ MACWork[ 7] = op->MACAddress[10]; ++ MACWork[ 8] = op->MACAddress[12]; ++ MACWork[ 9] = op->MACAddress[13]; ++ MACWork[10] = op->MACAddress[15]; ++ MACWork[11] = op->MACAddress[16]; ++ MACWork[12] = '\0'; ++ *var_len = 6; ++ return ( UCHAR * ) htob ( MACWork ); ++ ++ case DOT11RTSTHRESHOLD: ++// *write_method = write_dot11RTSThreshold; ++ return ( UCHAR * ) &op->RTSThreshold; ++ ++ case DOT11SHORTRETRYLIMIT: ++// *write_method = write_dot11ShortRetryLimit; ++ return ( UCHAR * ) &op->shortRetryLimit; ++ ++ case DOT11LONGRETRYLIMIT: ++// *write_method = write_dot11LongRetryLimit; ++ return ( UCHAR * ) &op->longRetryLimit; ++ ++ case DOT11FRAGMENTATIONTHRESHOLD: ++// *write_method = write_dot11FragmentationThreshold; ++ return ( UCHAR * ) &op->fragmentationThreshold; ++ ++ case DOT11MAXTRANSMITMSDULIFETIME: ++// *write_method = write_dot11MaxTransmitMSDULifetime; ++ return ( UCHAR * ) &op->maxTransmitMSDULifetime; ++ ++ case DOT11MAXRECEIVELIFETIME: ++// *write_method = write_dot11MaxReceiveLifetime; ++ return ( UCHAR * ) &op->maxReceiveLifetime; ++ ++ case DOT11MANUFACTURERID: ++ *var_len = strlen ( op->manufacturerID ); ++ return ( UCHAR * ) op->manufacturerID; ++ ++ case DOT11PRODUCTID: ++ *var_len = strlen ( op->productID ); ++ return ( UCHAR * ) op->productID; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11CountersTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11CountersTable(struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &coList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ co = ( struct coTbl_data * ) np->data; ++ rName[vp->namelen] = co->ifIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11TRANSMITTEDFRAGMENTCOUNT: ++ if ( co->haveTransmittedFragmentCount ) found = TRUE; break; ++ case DOT11MULTICASTTRANSMITTEDFRAMECOUNT: ++ if ( co->haveTransmittedFrameCount ) found = TRUE; break; ++ case DOT11FAILEDCOUNT: ++ if ( co->haveFailedCount ) found = TRUE; break; ++ case DOT11RETRYCOUNT: ++ if ( co->haveRetryCount ) found = TRUE; break; ++ case DOT11MULTIPLERETRYCOUNT: ++ if ( co->haveMultipleRetryCount ) found = TRUE; break; ++ case DOT11FRAMEDUPLICATECOUNT: ++ if ( co->haveFrameDuplicateCount ) found = TRUE; break; ++ case DOT11RTSSUCCESSCOUNT: ++ if ( co->haveRTSSuccessCount ) found = TRUE; break; ++ case DOT11RTSFAILURECOUNT: ++ if ( co->haveRTSFailureCount ) found = TRUE; break; ++ case DOT11ACKFAILURECOUNT: ++ if ( co->haveACKFailureCount ) found = TRUE; break; ++ case DOT11RECEIVEDFRAGMENTCOUNT: ++ if ( co->haveReceivedFragmentCount ) found = TRUE; break; ++ case DOT11MULTICASTRECEIVEDFRAMECOUNT: ++ if ( co->haveMulticastReceivedFrameCount ) found = TRUE; break; ++ case DOT11FCSERRORCOUNT: ++ if ( co->haveFCSErrorCount ) found = TRUE; break; ++ case DOT11TRANSMITTEDFRAMECOUNT: ++ if ( co->haveTransmittedFrameCount ) found = TRUE; break; ++ case DOT11WEPUNDECRYPTABLECOUNT: ++ if ( co->haveWEPUndecryptableCount ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); ++ *length = vp->namelen + 1; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11TRANSMITTEDFRAGMENTCOUNT: return ( UCHAR * ) &co->transmittedFragmentCount; ++ case DOT11MULTICASTTRANSMITTEDFRAMECOUNT: return ( UCHAR * ) &co->transmittedFrameCount; ++ case DOT11FAILEDCOUNT: return ( UCHAR * ) &co->failedCount; ++ case DOT11RETRYCOUNT: return ( UCHAR * ) &co->retryCount; ++ case DOT11MULTIPLERETRYCOUNT: return ( UCHAR * ) &co->multipleRetryCount; ++ case DOT11FRAMEDUPLICATECOUNT: return ( UCHAR * ) &co->frameDuplicateCount; ++ case DOT11RTSSUCCESSCOUNT: return ( UCHAR * ) &co->RTSSuccessCount; ++ case DOT11RTSFAILURECOUNT: return ( UCHAR * ) &co->RTSFailureCount; ++ case DOT11ACKFAILURECOUNT: return ( UCHAR * ) &co->ACKFailureCount; ++ case DOT11RECEIVEDFRAGMENTCOUNT: return ( UCHAR * ) &co->receivedFragmentCount; ++ case DOT11MULTICASTRECEIVEDFRAMECOUNT: return ( UCHAR * ) &co->multicastReceivedFrameCount; ++ case DOT11FCSERRORCOUNT: return ( UCHAR * ) &co->FCSErrorCount; ++ case DOT11TRANSMITTEDFRAMECOUNT: return ( UCHAR * ) &co->transmittedFrameCount; ++ case DOT11WEPUNDECRYPTABLECOUNT: return ( UCHAR * ) &co->WEPUndecryptableCount; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11GroupAddressesTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11GroupAddressesTable(struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method) ++{ ++ static char MACWork[17]; ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &gaList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ ga = ( struct gaTbl_data * ) np->data; ++ rName[vp->namelen + 0] = ga->ifIndex; ++ rName[vp->namelen + 1] = ga->groupAddressesIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11ADDRESS: ++ if ( ga->haveAddress ) found = TRUE; break; ++ case DOT11GROUPADDRESSESSTATUS: ++ if ( ga->haveGroupAddressesStatus ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); ++ *length = vp->namelen + 2; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11ADDRESS: ++// *write_method = write_dot11Address; ++ MACWork[ 0] = ga->address[ 0]; ++ MACWork[ 1] = ga->address[ 1]; ++ MACWork[ 2] = ga->address[ 3]; ++ MACWork[ 3] = ga->address[ 4]; ++ MACWork[ 4] = ga->address[ 6]; ++ MACWork[ 5] = ga->address[ 7]; ++ MACWork[ 6] = ga->address[ 9]; ++ MACWork[ 7] = ga->address[10]; ++ MACWork[ 8] = ga->address[12]; ++ MACWork[ 9] = ga->address[13]; ++ MACWork[10] = ga->address[15]; ++ MACWork[11] = ga->address[16]; ++ MACWork[12] = '\0'; ++ *var_len = 6; ++ return ( UCHAR * ) htob ( MACWork ); ++ ++ case DOT11GROUPADDRESSESSTATUS: ++// *write_method = write_dot11GroupAddressesStatus; ++ return ( UCHAR * ) &ga->groupAddressesStatus; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11ResourceInfoTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11ResourceInfoTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method ) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &riList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ ri = ( struct riTbl_data * ) np->data; ++ rName[vp->namelen] = ri->ifIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11MANUFACTUREROUI: ++ if ( ri->haveManufacturerOUI ) found = TRUE; break; ++ case DOT11MANUFACTURERNAME: ++ if ( ri->haveManufacturerName ) found = TRUE; break; ++ case DOT11MANUFACTURERPRODUCTNAME: ++ if ( ri->haveManufacturerProductName ) found = TRUE; break; ++ case DOT11MANUFACTURERPRODUCTVERSION: ++ if ( ri->haveManufacturerProductVersion ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); ++ *length = vp->namelen + 1; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11MANUFACTUREROUI: ++ *var_len = strlen ( ri->manufacturerOUI ); ++ return ( UCHAR * ) ri->manufacturerOUI; ++ ++ case DOT11MANUFACTURERNAME: ++ *var_len = strlen ( ri->manufacturerName ); ++ return ( UCHAR * ) ri->manufacturerName; ++ ++ case DOT11MANUFACTURERPRODUCTNAME: ++ *var_len = strlen ( ri->manufacturerProductName ); ++ return ( UCHAR * ) ri->manufacturerProductName; ++ ++ case DOT11MANUFACTURERPRODUCTVERSION: ++ *var_len = strlen ( ri->manufacturerProductVersion ); ++ return ( UCHAR * ) ri->manufacturerProductVersion; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11PhyOperationTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11PhyOperationTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method ) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &poList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ po = ( struct poTbl_data * ) np->data; ++ rName[vp->namelen] = po->ifIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11PHYTYPE: ++ if ( po->havePHYType ) found = TRUE; break; ++ case DOT11CURRENTREGDOMAIN: ++ if ( po->haveCurrentRegDomain ) found = TRUE; break; ++ case DOT11TEMPTYPE: ++ if ( po->haveTempType ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); ++ *length = vp->namelen + 1; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11PHYTYPE: ++ return ( UCHAR * ) &po->PHYType; ++ ++ case DOT11CURRENTREGDOMAIN: ++// *write_method = write_dot11CurrentRegDomain; ++ return ( UCHAR * ) &po->currentRegDomain; ++ ++ case DOT11TEMPTYPE: ++ return ( UCHAR * ) &po->tempType; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11PhyAntennaTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11PhyAntennaTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method ) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &paList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ pa = ( struct paTbl_data * ) np->data; ++ rName[vp->namelen] = pa->ifIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11CURRENTTXANTENNA: ++ if ( pa->haveCurrentTxAntenna ) found = TRUE; break; ++ case DOT11DIVERSITYSUPPORT: ++ if ( pa->haveDiversitySupport ) found = TRUE; break; ++ case DOT11CURRENTRXANTENNA: ++ if ( pa->haveCurrentRxAntenna ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); ++ *length = vp->namelen + 1; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11CURRENTTXANTENNA: ++// *write_method = write_dot11CurrentTxAntenna; ++ return ( UCHAR * ) &pa->currentTxAntenna; ++ ++ case DOT11DIVERSITYSUPPORT: ++ return ( UCHAR * ) &pa->diversitySupport; ++ ++ case DOT11CURRENTRXANTENNA: ++// *write_method = write_dot11CurrentRxAntenna; ++ return ( UCHAR * ) &pa->currentRxAntenna; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11PhyTxPowerTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11PhyTxPowerTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method ) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &ptList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ pt = ( struct ptTbl_data * ) np->data; ++ rName[vp->namelen] = pt->ifIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11NUMBERSUPPORTEDPOWERLEVELS: ++ if ( pt->haveNumberSupportedPowerLevels ) found = TRUE; break; ++ case DOT11TXPOWERLEVEL1: ++ if ( pt->haveTxPowerLevel1 ) found = TRUE; break; ++ case DOT11TXPOWERLEVEL2: ++ if ( pt->haveTxPowerLevel2 ) found = TRUE; break; ++ case DOT11TXPOWERLEVEL3: ++ if ( pt->haveTxPowerLevel3 ) found = TRUE; break; ++ case DOT11TXPOWERLEVEL4: ++ if ( pt->haveTxPowerLevel4 ) found = TRUE; break; ++ case DOT11TXPOWERLEVEL5: ++ if ( pt->haveTxPowerLevel5 ) found = TRUE; break; ++ case DOT11TXPOWERLEVEL6: ++ if ( pt->haveTxPowerLevel6 ) found = TRUE; break; ++ case DOT11TXPOWERLEVEL7: ++ if ( pt->haveTxPowerLevel7 ) found = TRUE; break; ++ case DOT11TXPOWERLEVEL8: ++ if ( pt->haveTxPowerLevel8 ) found = TRUE; break; ++ case DOT11CURRENTTXPOWERLEVEL: ++ if ( pt->currentTxPowerLevel ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); ++ *length = vp->namelen + 1; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11NUMBERSUPPORTEDPOWERLEVELS: ++ return ( UCHAR * ) &pt->numberSupportedPowerLevels; ++ ++ case DOT11TXPOWERLEVEL1: return ( UCHAR * ) &pt->TxPowerLevel1; ++ case DOT11TXPOWERLEVEL2: return ( UCHAR * ) &pt->TxPowerLevel2; ++ case DOT11TXPOWERLEVEL3: return ( UCHAR * ) &pt->TxPowerLevel3; ++ case DOT11TXPOWERLEVEL4: return ( UCHAR * ) &pt->TxPowerLevel4; ++ case DOT11TXPOWERLEVEL5: return ( UCHAR * ) &pt->TxPowerLevel5; ++ case DOT11TXPOWERLEVEL6: return ( UCHAR * ) &pt->TxPowerLevel6; ++ case DOT11TXPOWERLEVEL7: return ( UCHAR * ) &pt->TxPowerLevel7; ++ case DOT11TXPOWERLEVEL8: return ( UCHAR * ) &pt->TxPowerLevel8; ++ ++ case DOT11CURRENTTXPOWERLEVEL: ++// *write_method = write_dot11CurrentTxPowerLevel; ++ return ( UCHAR * ) &pt->currentTxPowerLevel; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11PhyFHSSTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11PhyFHSSTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method ) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &pfList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ pf = ( struct pfTbl_data * ) np->data; ++ rName[vp->namelen] = pf->ifIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11HOPTIME: ++ if ( pf->haveHopTime ) found = TRUE; break; ++ case DOT11CURRENTCHANNELNUMBER: ++ if ( pf->haveCurrentChannelNumber ) found = TRUE; break; ++ case DOT11MAXDWELLTIME: ++ if ( pf->haveMaxDwellTime ) found = TRUE; break; ++ case DOT11CURRENTDWELLTIME: ++ if ( pf->haveCurrentDwellTime ) found = TRUE; break; ++ case DOT11CURRENTSET: ++ if ( pf->haveCurrentSet ) found = TRUE; break; ++ case DOT11CURRENTPATTERN: ++ if ( pf->haveCurrentPattern ) found = TRUE; break; ++ case DOT11CURRENTINDEX: ++ if ( pf->haveCurrentIndex ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); ++ *length = vp->namelen + 1; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11HOPTIME: ++ return ( UCHAR * ) &pf->hopTime; ++ ++ case DOT11CURRENTCHANNELNUMBER: ++// *write_method = write_dot11CurrentChannelNumber; ++ return ( UCHAR * ) &pf->currentChannelNumber; ++ ++ case DOT11MAXDWELLTIME: ++ return ( UCHAR * ) &pf->maxDwellTime; ++ ++ case DOT11CURRENTDWELLTIME: ++// *write_method = write_dot11CurrentDwellTime; ++ return ( UCHAR * ) &pf->currentDwellTime; ++ ++ case DOT11CURRENTSET: ++// *write_method = write_dot11CurrentSet; ++ return ( UCHAR * ) &pf->currentSet; ++ ++ case DOT11CURRENTPATTERN: ++// *write_method = write_dot11CurrentPattern; ++ return ( UCHAR * ) &pf->currentPattern; ++ ++ case DOT11CURRENTINDEX: ++// *write_method = write_dot11CurrentIndex; ++ return ( UCHAR * ) &pf->currentIndex; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11PhyDSSSTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11PhyDSSSTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method ) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &pdList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ pd = ( struct pdTbl_data * ) np->data; ++ rName[vp->namelen] = pd->ifIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11CURRENTCHANNEL: ++ if ( pd->haveCurrentChannel ) found = TRUE; break; ++ case DOT11CCAMODESUPPORTED: ++ if ( pd->haveCCAModeSupported ) found = TRUE; break; ++ case DOT11CURRENTCCAMODE: ++ if ( pd->haveCurrentCCAMode ) found = TRUE; break; ++ case DOT11EDTHRESHOLD: ++ if ( pd->haveEDThreshold ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); ++ *length = vp->namelen + 1; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11CURRENTCHANNEL: ++// *write_method = write_dot11CurrentChannel; ++ return ( UCHAR * ) &pd->currentChannel; ++ ++ case DOT11CCAMODESUPPORTED: ++ return ( UCHAR * ) &pd->CCAModeSupported; ++ ++ case DOT11CURRENTCCAMODE: ++// *write_method = write_dot11CurrentCCAMode; ++ return ( UCHAR * ) &pd->currentCCAMode; ++ ++ case DOT11EDTHRESHOLD: ++// *write_method = write_dot11EDThreshold; ++ return ( UCHAR * ) &pd->EDThreshold; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11PhyIRTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11PhyIRTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method) ++{ ++ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &piList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ pi = ( struct piTbl_data * ) np->data; ++ rName[vp->namelen] = pi->ifIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11CCAWATCHDOGTIMERMAX: ++ if ( pi->CCAWatchdogTimerMax ) found = TRUE; break; ++ case DOT11CCAWATCHDOGCOUNTMAX: ++ if ( pi->CCAWatchdogCountMax ) found = TRUE; break; ++ case DOT11CCAWATCHDOGTIMERMIN: ++ if ( pi->CCAWatchdogTimerMin ) found = TRUE; break; ++ case DOT11CCAWATCHDOGCOUNTMIN: ++ if ( pi->CCAWatchdogCountMin ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); ++ *length = vp->namelen + 1; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11CCAWATCHDOGTIMERMAX: ++// *write_method = write_dot11CCAWatchdogTimerMax; ++ return ( UCHAR * ) &pi->CCAWatchdogTimerMax; ++ ++ case DOT11CCAWATCHDOGCOUNTMAX: ++// *write_method = write_dot11CCAWatchdogCountMax; ++ return ( UCHAR * ) &pi->CCAWatchdogCountMax; ++ ++ case DOT11CCAWATCHDOGTIMERMIN: ++// *write_method = write_dot11CCAWatchdogTimerMin; ++ return ( UCHAR * ) &pi->CCAWatchdogTimerMin; ++ ++ case DOT11CCAWATCHDOGCOUNTMIN: ++// *write_method = write_dot11CCAWatchdogCountMin; ++ return ( UCHAR * ) &pi->CCAWatchdogCountMin; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11RegDomainsSupportedTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11RegDomainsSupportedTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &rdList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ rd = ( struct rdTbl_data * ) np->data; ++ rName[vp->namelen + 0] = rd->ifIndex; ++ rName[vp->namelen + 1] = rd->regDomainsSupportIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11REGDOMAINSSUPPORTVALUE: ++ if ( rd->haveRegDomainsSupportValue ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); ++ *length = vp->namelen + 2; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11REGDOMAINSSUPPORTVALUE: ++ return ( UCHAR * ) &rd->regDomainsSupportValue; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11AntennasListTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11AntennasListTable(struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &alList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ al = ( struct alTbl_data * ) np->data; ++ rName[vp->namelen + 0] = al->ifIndex; ++ rName[vp->namelen + 1] = al->antennaListIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11SUPPORTEDTXANTENNA: ++ if ( al->haveSupportedTxAntenna ) found = TRUE; break; ++ case DOT11SUPPORTEDRXANTENNA: ++ if ( al->haveSupportedRxAntenna ) found = TRUE; break; ++ case DOT11DIVERSITYSELECTIONRX: ++ if ( al->haveDiversitySelectionRx ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); ++ *length = vp->namelen + 2; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11SUPPORTEDTXANTENNA: ++// *write_method = write_dot11SupportedTxAntenna; ++ return ( UCHAR * ) &al->supportedTxAntenna; ++ ++ case DOT11SUPPORTEDRXANTENNA: ++// *write_method = write_dot11SupportedRxAntenna; ++ return ( UCHAR * ) &al->supportedRxAntenna; ++ ++ case DOT11DIVERSITYSELECTIONRX: ++// *write_method = write_dot11DiversitySelectionRx; ++ return ( UCHAR * ) &al->diversitySelectionRx; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11SupportedDataRatesTxTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11SupportedDataRatesTxTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method ) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &rtList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ rt = ( struct rtTbl_data * ) np->data; ++ rName[vp->namelen + 0] = rt->ifIndex; ++ rName[vp->namelen + 1] = rt->supportedDataRatesTxIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11SUPPORTEDDATARATESTXVALUE: ++ if ( rt->haveSupportedDataRatesTxValue ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); ++ *length = vp->namelen + 2; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11SUPPORTEDDATARATESTXVALUE: ++ return ( UCHAR * ) &rt->supportedDataRatesTxValue; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++* var_dot11SupportedDataRatesRxTable() - * ++* * ++****************************************************************************/ ++unsigned char * ++var_dot11SupportedDataRatesRxTable ( struct variable *vp, ++ oid *name, ++ size_t *length, ++ int exact, ++ size_t *var_len, ++ WriteMethod **write_method ) ++{ ++ int found = FALSE; ++ oid rName [ MAX_OID_LEN ]; // OID to be returned ++ ++ loadTables(); ++ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); ++ for ( np = LIST_FIRST ( &rrList ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ rr = ( struct rrTbl_data * ) np->data; ++ rName[vp->namelen + 0] = rr->ifIndex; ++ rName[vp->namelen + 1] = rr->supportedDataRatesRxIndex; ++ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || ++ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { ++ switch ( vp->magic ) { ++ case DOT11SUPPORTEDDATARATESRXVALUE: ++ if ( rr->haveSupportedDataRatesRxValue ) found = TRUE; break; ++ } ++ } ++ if ( found ) ++ break; ++ } ++ ++ if ( !found ) ++ return NULL; ++ ++ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); ++ *length = vp->namelen + 2; ++ *var_len = sizeof ( long ); ++ *write_method = NULL; ++ ++ switch ( vp->magic ) { ++ ++ case DOT11SUPPORTEDDATARATESRXVALUE: ++ return ( UCHAR * ) &rr->supportedDataRatesRxValue; ++ ++ default: ++ ERROR_MSG ( "" ); ++ } ++ ++ return NULL; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11StationID(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static unsigned char string[SPRINT_MAX_LEN]; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_OCTET_STR ) { ++ fprintf ( stderr, "write to dot11StationID not ASN_OCTET_STR\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( string )) { ++ fprintf ( stderr,"write to dot11StationID: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11MediumOccupancyLimit(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11MediumOccupancyLimit not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr,"write to dot11MediumOccupancyLimit: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CFPPeriod(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CFPPeriod not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CFPPeriod: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CFPMaxDuration(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CFPMaxDuration not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CFPMaxDuration: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11AuthenticationResponseTimeOut(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11AuthenticationResponseTimeOut not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11AuthenticationResponseTimeOut: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11PowerManagementMode(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11PowerManagementMode not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )) { ++ fprintf ( stderr, "write to dot11PowerManagementMode: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11DesiredSSID(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static unsigned char string[SPRINT_MAX_LEN]; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_OCTET_STR ) { ++ fprintf ( stderr, "write to dot11DesiredSSID not ASN_OCTET_STR\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( string )){ ++ fprintf ( stderr, "write to dot11DesiredSSID: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11DesiredBSSType(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11DesiredBSSType not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11DesiredBSSType: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11OperationalRateSet(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static unsigned char string[SPRINT_MAX_LEN]; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_OCTET_STR ) { ++ fprintf ( stderr, "write to dot11OperationalRateSet not ASN_OCTET_STR\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( string )){ ++ fprintf ( stderr, "write to dot11OperationalRateSet: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11BeaconPeriod(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11BeaconPeriod not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr,"write to dot11BeaconPeriod: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11DTIMPeriod(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11DTIMPeriod not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr,"write to dot11DTIMPeriod: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11AssociationResponseTimeOut(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11AssociationResponseTimeOut not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )) { ++ fprintf ( stderr,"write to dot11AssociationResponseTimeOut: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11AuthenticationAlgorithmsEnable(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11AuthenticationAlgorithmsEnable not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr,"write to dot11AuthenticationAlgorithmsEnable: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11WEPDefaultKeyValue(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static unsigned char string[SPRINT_MAX_LEN]; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_OCTET_STR ) { ++ fprintf ( stderr, "write to dot11WEPDefaultKeyValue not ASN_OCTET_STR\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( string )){ ++ fprintf ( stderr,"write to dot11WEPDefaultKeyValue: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11WEPKeyMappingAddress(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static unsigned char string[SPRINT_MAX_LEN]; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_OCTET_STR ) { ++ fprintf ( stderr, "write to dot11WEPKeyMappingAddress not ASN_OCTET_STR\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( string )) { ++ fprintf ( stderr,"write to dot11WEPKeyMappingAddress: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11WEPKeyMappingWEPOn(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11WEPKeyMappingWEPOn not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11WEPKeyMappingWEPOn: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11WEPKeyMappingValue(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static unsigned char string[SPRINT_MAX_LEN]; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_OCTET_STR ) { ++ fprintf ( stderr, "write to dot11WEPKeyMappingValue not ASN_OCTET_STR\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( string )) { ++ fprintf ( stderr, "write to dot11WEPKeyMappingValue: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11WEPKeyMappingStatus(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11WEPKeyMappingStatus not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11WEPKeyMappingStatus: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11PrivacyInvoked(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11PrivacyInvoked not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11PrivacyInvoked: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11WEPDefaultKeyID(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11WEPDefaultKeyID not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11WEPDefaultKeyID: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11WEPKeyMappingLength(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11WEPKeyMappingLength not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11WEPKeyMappingLength: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11ExcludeUnencrypted(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11ExcludeUnencrypted not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr,"write to dot11ExcludeUnencrypted: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11RTSThreshold(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ){ ++ fprintf ( stderr, "write to dot11RTSThreshold not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11RTSThreshold: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11ShortRetryLimit(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11ShortRetryLimit not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11ShortRetryLimit: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11LongRetryLimit(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11LongRetryLimit not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr,"write to dot11LongRetryLimit: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11FragmentationThreshold(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11FragmentationThreshold not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr,"write to dot11FragmentationThreshold: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11MaxTransmitMSDULifetime(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11MaxTransmitMSDULifetime not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11MaxTransmitMSDULifetime: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11MaxReceiveLifetime(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11MaxReceiveLifetime not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11MaxReceiveLifetime: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11Address(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static unsigned char string[SPRINT_MAX_LEN]; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_OCTET_STR ) { ++ fprintf ( stderr, "write to dot11Address not ASN_OCTET_STR\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( string )){ ++ fprintf ( stderr, "write to dot11Address: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11GroupAddressesStatus(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11GroupAddressesStatus not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr,"write to dot11GroupAddressesStatus: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CurrentRegDomain(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CurrentRegDomain not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CurrentRegDomain: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CurrentTxAntenna(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CurrentTxAntenna not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CurrentTxAntenna: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CurrentRxAntenna(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CurrentRxAntenna not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr,"write to dot11CurrentRxAntenna: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CurrentTxPowerLevel(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CurrentTxPowerLevel not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CurrentTxPowerLevel: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CurrentChannelNumber(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CurrentChannelNumber not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr,"write to dot11CurrentChannelNumber: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CurrentDwellTime(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CurrentDwellTime not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CurrentDwellTime: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CurrentSet(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CurrentSet not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CurrentSet: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CurrentPattern(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CurrentPattern not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CurrentPattern: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CurrentIndex(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CurrentIndex not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CurrentIndex: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CurrentChannel(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CurrentChannel not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CurrentChannel: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CurrentCCAMode(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CurrentCCAMode not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr,"write to dot11CurrentCCAMode: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11EDThreshold(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11EDThreshold not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11EDThreshold: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CCAWatchdogTimerMax(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CCAWatchdogTimerMax not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CCAWatchdogTimerMax: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CCAWatchdogCountMax(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CCAWatchdogCountMax not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CCAWatchdogCountMax: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CCAWatchdogTimerMin(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CCAWatchdogTimerMin not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CCAWatchdogTimerMin: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11CCAWatchdogCountMin(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11CCAWatchdogCountMin not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11CCAWatchdogCountMin: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11SupportedTxAntenna(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11SupportedTxAntenna not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11SupportedTxAntenna: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11SupportedRxAntenna(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11SupportedRxAntenna not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr,"write to dot11SupportedRxAntenna: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++int ++write_dot11DiversitySelectionRx(int action, ++ u_char *var_val, ++ u_char var_val_type, ++ size_t var_val_len, ++ u_char *statP, ++ oid *name, ++ size_t name_len) ++{ ++ static long *long_ret; ++ int size; ++ ++ switch ( action ) { ++ ++ case RESERVE1: ++ if ( var_val_type != ASN_INTEGER ) { ++ fprintf ( stderr, "write to dot11DiversitySelectionRx not ASN_INTEGER\n" ); ++ return SNMP_ERR_WRONGTYPE; ++ } ++ if ( var_val_len > sizeof ( long_ret )){ ++ fprintf ( stderr, "write to dot11DiversitySelectionRx: bad length\n" ); ++ return SNMP_ERR_WRONGLENGTH; ++ } ++ break; ++ ++ case RESERVE2: ++ case FREE: ++ case ACTION: ++ case UNDO: ++ break; ++ ++ case COMMIT: ++ break; ++ } ++ ++ return SNMP_ERR_NOERROR; ++} ++ ++/**************************************************************************** ++* * ++* loadTables() - Load the Tables * ++* * ++****************************************************************************/ ++static void loadTables() ++{ ++ int skfd; // generic raw socket desc ++ struct iwreq wrq; // ioctl request structure ++ struct ifreq ifr; ++ struct timeval et; // elapsed time ++ struct wireless_info info; // workarea for wireless ioctl information ++ FILE *fp; ++ char bfr[1024], ifName[1024]; ++ char *s, *t; ++ ++ gettimeofday ( &et, ( struct timezone * ) 0 ); // get time-of-day ++ if ( et.tv_sec < lastLoad + MINLOADFREQ ) // only reload so often ++ return; ++ lastLoad = et.tv_sec; ++ ++ skfd = openSocket(); // open socket ++ if ( skfd < 0 ) { ++ syslog ( LOG_ERR, "SNMP ieee802dot11.loadTables() - %s\n", "socket open failure" ); ++ return; ++ } ++ ++ flushLists(); ++ ++ // find interfaces in /proc/net/dev and find the wireless interfaces ++ fp = fopen ( PROC_NET_DEV, "r" ); ++ if ( fp ) { ++ while ( fgets ( bfr, sizeof ( bfr ), fp )) { ++ if ( strstr ( bfr, ":" )) { ++ s = bfr; t = ifName; ++ while ( isspace ( *s )) // discard white space ++ *s++; ++ while ( *s != ':' ) // get interface name ++ *t++ = *s++; ++ *t = '\0'; ++ ++ // verify as a wireless device ++ memset (( char * ) &info, 0, sizeof ( struct wireless_info )); ++ strncpy ( wrq.ifr_name, ifName, IFNAMSIZ ); ++ if ( ioctl ( skfd, SIOCGIWNAME, &wrq ) >= 0 ) { ++ printf ( "%s ifName: %s\n", "loadTables() -", ifName ); ++ initStructs(); ++ loadWiExt( skfd, ifName, &info ); ++ displayWiExt ( info ); ++ load80211Structs ( skfd, ifName, &info ); ++ } ++ } ++ } ++ fclose ( fp ); ++ } ++ ++ close ( skfd ); ++} ++ ++/**************************************************************************** ++* * ++* load80211Structs() - load the 802.11 structures * ++* * ++****************************************************************************/ ++static void ++load80211Structs ( int skfd, char *ifName, struct wireless_info *wi ) ++{ ++ int rc, ifIndex = 0; ++ struct ifreq ifr; ++ char MACAddress [ MACADDR_LEN + 1 ]; ++ ++ strcpy ( ifr.ifr_name, ifName ); ++ rc = ioctl ( skfd, SIOCGIFHWADDR, &ifr ); ++ if ( rc >= 0 ) { ++ ++ sprintf ( MACAddress, "%02X:%02X:%02X:%02X:%02X:%02X\0", ++ ( UCHAR ) ifr.ifr_hwaddr.sa_data[0], ( UCHAR ) ifr.ifr_hwaddr.sa_data[1], ++ ( UCHAR ) ifr.ifr_hwaddr.sa_data[2], ( UCHAR ) ifr.ifr_hwaddr.sa_data[3], ++ ( UCHAR ) ifr.ifr_hwaddr.sa_data[4], ( UCHAR ) ifr.ifr_hwaddr.sa_data[5] ); ++ ++ nSc.haveStationID = TRUE; ++ strcpy ( nSc.stationID, MACAddress ); ++ nOp.haveMACAddress = TRUE; ++ strcpy ( nOp.MACAddress, MACAddress ); ++ nRi.haveManufacturerOUI = TRUE; ++ strncpy ( nRi.manufacturerOUI, MACAddress, MAN_OUI_LEN ); ++ ++ ifIndex = if_nametoindex ( ifName ); ++ if ( !ifIndex ) { ++ syslog ( LOG_ERR, "SNMP %s - %s %s\n", ++ "ieee802dot11.load80211Structs()", ifName, "has no ifIndex" ); ++ return; ++ } ++ ++ loadWiExtTo80211Structs ( ifIndex, ifName, wi ); ++ ++ if ( hasChanged (( char * ) &nSc, sizeof ( nSc ))) { ++ nSc.ifIndex = ifIndex; ++ sprintf ( nSc.UID, "%04d\0", nSc.ifIndex ); ++ strcpy ( nSc.ifName, ifName ); ++ addList (( char * ) &scList, ( char * ) &nSc, sizeof ( nSc )); ++ } ++ ++ if ( hasChanged (( char * ) &nPr, sizeof ( nPr ))) { ++ nPr.ifIndex = ifIndex; ++ sprintf ( nPr.UID, "%04d\0", nPr.ifIndex ); ++ strcpy ( nPr.ifName, ifName ); ++ addList (( char * ) &prList, ( char * ) &nPr, sizeof ( nPr )); ++ } ++ ++ if ( hasChanged (( char * ) &nOp, sizeof ( nOp ))) { ++ nOp.ifIndex = ifIndex; ++ sprintf ( nOp.UID, "%04d\0", nOp.ifIndex ); ++ strcpy ( nOp.ifName, ifName ); ++ addList (( char * ) &opList, ( char * ) &nOp, sizeof ( nOp )); ++ } ++ ++ if ( hasChanged (( char * ) &nCo, sizeof ( nCo ))) { ++ nCo.ifIndex = ifIndex; ++ sprintf ( nCo.UID, "%04d\0", nCo.ifIndex ); ++ strcpy ( nCo.ifName, ifName ); ++ addList (( char * ) &coList, ( char * ) &nCo, sizeof ( nCo )); ++ } ++ ++ if ( hasChanged (( char * ) &nRi, sizeof ( nRi ))) { ++ nRi.ifIndex = ifIndex; ++ sprintf ( nRi.UID, "%04d\0", nRi.ifIndex ); ++ strcpy ( nRi.ifName, ifName ); ++ addList (( char * ) &riList, ( char * ) &nRi, sizeof ( nRi )); ++ } ++ ++ if ( hasChanged (( char * ) &nPo, sizeof ( nPo ))) { ++ nPo.ifIndex = ifIndex; ++ sprintf ( nPo.UID, "%04d\0", nPo.ifIndex ); ++ strcpy ( nPo.ifName, ifName ); ++ addList (( char * ) &poList, ( char * ) &nPo, sizeof ( nPo )); ++ } ++ ++ if ( hasChanged (( char * ) &nPa, sizeof ( nPa ))) { ++ nPa.ifIndex = ifIndex; ++ sprintf ( nPa.UID, "%04d\0", nPa.ifIndex ); ++ strcpy ( nPa.ifName, ifName ); ++ addList (( char * ) &paList, ( char * ) &nPa, sizeof ( nPa )); ++ } ++ ++ if ( hasChanged (( char * ) &nPt, sizeof ( nPt ))) { ++ nPt.ifIndex = ifIndex; ++ sprintf ( nPt.UID, "%04d\0", nPt.ifIndex ); ++ strcpy ( nPt.ifName, ifName ); ++ addList (( char * ) &ptList, ( char * ) &nPt, sizeof ( nPt )); ++ } ++ ++ if ( hasChanged (( char * ) &nPf, sizeof ( nPf ))) { ++ nPf.ifIndex = ifIndex; ++ sprintf ( nPf.UID, "%04d\0", nPf.ifIndex ); ++ strcpy ( nPf.ifName, ifName ); ++ addList (( char * ) &pfList, ( char * ) &nPf, sizeof ( nPf )); ++ } ++ ++ if ( hasChanged (( char * ) &nPd, sizeof ( nPd ))) { ++ nPd.ifIndex = ifIndex; ++ sprintf ( nPd.UID, "%04d\0", nPd.ifIndex ); ++ strcpy ( nPd.ifName, ifName ); ++ addList (( char * ) &pdList, ( char * ) &nPd, sizeof ( nPd )); ++ } ++ ++ if ( hasChanged (( char * ) &nPi, sizeof ( nPi ))) { ++ nPi.ifIndex = ifIndex; ++ sprintf ( nPi.UID, "%04d\0", nPi.ifIndex ); ++ strcpy ( nPi.ifName, ifName ); ++ addList (( char * ) &piList, ( char * ) &nPi, sizeof ( nPi )); ++ } ++ } ++ ++//printf ( "%s - ifIndex: %d ifName: %s UID: %s\n", ++// "load80211Structs() - HASCHANGED", ifIndex, ifName, nSc.UID ); ++} ++ ++/**************************************************************************** ++* * ++* initStructs() - initialize structures * ++* * ++****************************************************************************/ ++static void initStructs() ++{ ++ int i; ++ ++ // 802.11 MIB Stuctures ++ memset (( char * ) &nSc, 0, sizeof ( nSc )); memset (( char * ) &nAa, 0, sizeof ( nAa )); ++ memset (( char * ) &nDf, 0, sizeof ( nDf )); memset (( char * ) &nKm, 0, sizeof ( nKm )); ++ memset (( char * ) &nPr, 0, sizeof ( nPr )); memset (( char * ) &nOp, 0, sizeof ( nOp )); ++ memset (( char * ) &nCo, 0, sizeof ( nCo )); memset (( char * ) &nGa, 0, sizeof ( nGa )); ++ memset (( char * ) &nRi, 0, sizeof ( nRi )); memset (( char * ) &nPo, 0, sizeof ( nPo )); ++ memset (( char * ) &nPa, 0, sizeof ( nPa )); memset (( char * ) &nPt, 0, sizeof ( nPt )); ++ memset (( char * ) &nPf, 0, sizeof ( nPf )); memset (( char * ) &nPd, 0, sizeof ( nPd )); ++ memset (( char * ) &nPi, 0, sizeof ( nPi )); memset (( char * ) &nRd, 0, sizeof ( nRd )); ++ memset (( char * ) &nAl, 0, sizeof ( nAl )); memset (( char * ) &nRt, 0, sizeof ( nRt )); ++ memset (( char * ) &nRr, 0, sizeof ( nRr )); ++ ++ // Wireless Extensions ++ wepCurrentKey = 0; ++ haveWepCurrentKey = FALSE; ++ for ( i = 0; i < MAX_WEP_KEYS; i++ ) { ++ wep[i].len = 0; ++ wep[i].key[0] = '\0'; ++ wep[i].haveKey = FALSE; ++ } ++} ++ ++/**************************************************************************** ++* * ++* Wireless Extensions Specific Functions * ++* * ++****************************************************************************/ ++/**************************************************************************** ++* * ++* loadWiExtTo80211Structs() - load wireless extensions to 802.11 structures * ++* * ++****************************************************************************/ ++static void ++loadWiExtTo80211Structs ( int ifIndex, char *ifName, struct wireless_info *wi ) ++{ ++ int i, j = 0; ++ ++ // dot11Smt Group ++ // dot11StationConfigTable ++ nSc.havePrivacyOptionImplemented = TRUE; ++ nSc.privacyOptionImplemented = 1; // assume we support WEP ++ ++ if ( wi->has_power ) { ++ nSc.havePowerManagementMode = TRUE; ++ nSc.powerManagementMode = 1; // assume power is active ++ if ( !wi->power.disabled && ++ wi->power.flags & IW_POWER_MIN ) ++ nSc.powerManagementMode = 2; // power save mode ++ } ++ ++ if ( wi->has_essid && strlen ( wi->essid )) { ++ nSc.haveDesiredSSID = TRUE; ++ strcpy ( nSc.desiredSSID, wi->essid ); ++ } ++ ++ if ( wi->has_mode ) { ++ nSc.haveDesiredBSSType = TRUE; ++ if ( wi->mode == IW_MODE_ADHOC ) ++ nSc.desiredBSSType = 2; // independent ++ else if ( wi->has_ap_addr ) ++ nSc.desiredBSSType = 1; // infrastructure ++ else ++ nSc.desiredBSSType = 3; // any ++ } ++ ++ if ( wi->has_range ) { ++ for ( i = 0; i < wi->range.num_bitrates && j < 126; i++ ) { ++ nSc.haveOperationalRateSet = TRUE; ++ nSc.operationalRateSet[j++] = ( char ) ( wi->range.bitrate[i] / 500000L ); ++ } ++ } ++ ++ // dot11AuthenticationAlgorithmsTable ++ nAa.haveAuthenticationAlgorithm = TRUE; // it's a rule to always have ++ nAa.haveAuthenticationAlgorithmsEnable = TRUE; // 'open' supported ++ nAa.ifIndex = ifIndex; ++ nAa.authenticationAlgorithmsIndex = 1; // index number one ++ nAa.authenticationAlgorithm = 1; // 1 => open key ++ sprintf ( nAa.UID, "%04d%04d\0", nAa.ifIndex, nAa.authenticationAlgorithmsIndex ); ++ nAa.authenticationAlgorithmsEnable = 1; // enabled by default ++ if ( ( wi->has_key ) && ++ ( wi->key_size != 0 ) && ++ !( wi->key_flags & IW_ENCODE_DISABLED )) ++ nAa.authenticationAlgorithmsEnable = 2; ++ addList (( char * ) &aaList, ( char * ) &nAa, sizeof ( nAa )); ++ ++ nAa.haveAuthenticationAlgorithm = TRUE; // I'm gonna assume we always support WEP ++ nAa.haveAuthenticationAlgorithmsEnable = TRUE; ++ nAa.ifIndex = ifIndex; ++ nAa.authenticationAlgorithmsIndex = 2; // index number 2 ++ nAa.authenticationAlgorithm = 2; // 2 => shared key ++ sprintf ( nAa.UID, "%04d%04d\0", nAa.ifIndex, nAa.authenticationAlgorithmsIndex ); ++ nAa.authenticationAlgorithmsEnable = 2; ++ if ( ( wi->has_key ) && ++ ( wi->key_size != 0 ) && ++ !( wi->key_flags & IW_ENCODE_DISABLED )) ++ nAa.authenticationAlgorithmsEnable = 1; // disabled by default ++ addList (( char * ) &aaList, ( char * ) &nAa, sizeof ( nAa )); ++ ++ //dot11WEPDefaultKeysTable ++ if ( wi->has_range ) { ++ for ( i = 0; i < MAX_WEP_KEYS; i++ ) { ++ nDf.haveWEPDefaultKeyValue = TRUE; ++ nDf.ifIndex = ifIndex; ++ nDf.WEPDefaultKeyIndex = i + 1; // index number ++ sprintf ( nDf.UID, "%04d%04d\0", nDf.ifIndex, nDf.WEPDefaultKeyIndex ); ++ if ( wep[i].haveKey ) ++ strcpy ( nDf.WEPDefaultKeyValue, "*****" ); ++ else ++ nDf.WEPDefaultKeyValue[0] = '\0'; ++ addList (( char * ) &dfList, ( char * ) &nDf, sizeof ( nDf )); ++ } ++ } ++ ++ // dot11PrivacyTable ++ nPr.havePrivacyInvoked = TRUE; ++ nPr.privacyInvoked = 2; // 2 => FALSE ++ nPr.haveWEPDefaultKeyID = TRUE; ++ nPr.WEPDefaultKeyID = 0; ++ nPr.haveExcludeUnencrypted = TRUE; ++ nPr.excludeUnencrypted = 2; // 2 => FALSE ++ if ( wi->has_range ) { ++ if ( ( wi->key_size != 0 ) && ++ !( wi->key_flags & IW_ENCODE_DISABLED )) { ++ nPr.privacyInvoked = 1; ++ if ( wi->key_flags & IW_ENCODE_RESTRICTED ) ++ nPr.excludeUnencrypted = 1; ++ nPr.WEPDefaultKeyID = wepCurrentKey; ++ } ++ } ++ ++ // dot11Mac Group ++ // dot11OperationTable ++ if ( wi->has_range ) { ++ nOp.haveRTSThreshold = TRUE; ++ nOp.RTSThreshold = wi->range.max_rts; ++ } ++ ++ if ( wi->has_frag && wi->frag.value ) { ++ nOp.haveFragmentationThreshold = TRUE; ++ nOp.fragmentationThreshold = wi->frag.value; ++ } ++ ++ // dot11Phy Group ++ // dot11PhyOperationTable ++ if ( strstr ( wi->name, "IEEE 802.11-FS" )) nPo.PHYType = 1; // So what if I ++ if ( strstr ( wi->name, "IEEE 802.11-DS" )) nPo.PHYType = 2; // made up a couple? ++ if ( strstr ( wi->name, "IEEE 802.11-IR" )) nPo.PHYType = 3; ++ if ( strstr ( wi->name, "IEEE 802.11-OFDM" )) nPo.PHYType = 4; // 802.11a ++ if ( strstr ( wi->name, "IEEE 802.11-OFDM/DS" )) nPo.PHYType = 5; // 802.11g ++ if ( strstr ( wi->name, "IEEE 802.11-TURBO" )) nPo.PHYType = 6; // Atheros TURBO mode ++ if ( nPo.PHYType ) nPo.havePHYType = TRUE; ++ ++ // dot11PhyDSSSTable ++ if ( wi->has_range ) { // && wi->freq <= ( double ) 2483000000 ) { // DSSS frequencies only ++ for ( i = 0; i < wi->range.num_frequency; i++ ) { ++ if ((( double ) ( wi->range.freq[i].e * 10 ) * ( double ) wi->range.freq[i].m ) == wi->freq ) { ++ nPd.haveCurrentChannel = TRUE; ++ nPd.currentChannel = wi->range.freq[i].i; ++ } ++ } ++ } ++ ++ // dot11SupportedDataRatesTxTable ++ if ( wi->has_range ) { ++ for ( i = 0; i < wi->range.num_bitrates; i++ ) { ++ nRt.ifIndex = ifIndex; ++ nRt.supportedDataRatesTxIndex = i + 1; ++ nRt.supportedDataRatesTxValue = wi->range.bitrate[i] / 500000L; ++ nRt.haveSupportedDataRatesTxValue = TRUE; ++ sprintf ( nRt.UID, "%04d%04d\0", nRt.ifIndex, nRt.supportedDataRatesTxIndex ); ++ strcpy ( nRt.ifName, ifName ); ++ addList (( char * ) &rtList, ( char * ) &nRt, sizeof ( nRt )); ++ } ++ } ++ ++ // dot11SupportedDataRatesRxTable ++ if ( wi->has_range ) { ++ for ( i = 0; i < wi->range.num_bitrates; i++ ) { ++ nRr.ifIndex = ifIndex; ++ nRr.supportedDataRatesRxIndex = i + 1; ++ nRr.supportedDataRatesRxValue = wi->range.bitrate[i] / 500000L; ++ nRr.haveSupportedDataRatesRxValue = TRUE; ++ sprintf ( nRr.UID, "%04d%04d\0", nRr.ifIndex, nRr.supportedDataRatesRxIndex ); ++ strcpy ( nRr.ifName, ifName ); ++ addList (( char * ) &rrList, ( char * ) &nRr, sizeof ( nRr )); ++ } ++ } ++ ++//printf ( "%s max_encoding_tokens: %d\n", ++// "loadWiExtTo80211Structs() - ", wi->range.max_encoding_tokens ); ++} ++ ++/**************************************************************************** ++* * ++* loadWiExt() - load wireless extensions structures; * ++* use ioctl calls and read /proc/net/wireless * ++* * ++****************************************************************************/ ++static void loadWiExt ( int skfd, char *ifname, struct wireless_info *wi ) ++{ ++ struct iwreq wrq; // ioctl request structure ++ FILE *fp; ++ char bfr[1024]; ++ char buffer[sizeof ( iwrange ) * 2]; /* Large enough */ ++ char *s, *t; ++ int i, j; ++ ++ strncpy ( wrq.ifr_name, ifname, IFNAMSIZ ); ++ ++ /* Get wireless name */ ++ if ( ioctl ( skfd, SIOCGIWNAME, &wrq ) >= 0 ) { ++ strncpy ( wi->name, wrq.u.name, IFNAMSIZ ); ++ wi->name[IFNAMSIZ] = '\0'; ++ } ++ ++ /* Get ranges */ // NOTE: some version checking in iwlib.c ++ memset ( buffer, 0, sizeof ( buffer )); ++ wrq.u.data.pointer = ( caddr_t ) &buffer; ++ wrq.u.data.length = sizeof ( buffer ); ++ wrq.u.data.flags = 0; ++ if ( ioctl ( skfd, SIOCGIWRANGE, &wrq ) >= 0 ) { ++ memcpy (( char * ) &wi->range, buffer, sizeof ( iwrange )); ++ wi->has_range = 1; ++ } ++ ++ /* Get network ID */ ++ if ( ioctl ( skfd, SIOCGIWNWID, &wrq ) >= 0 ) { ++ memcpy ( &wi->nwid, &wrq.u.nwid, sizeof ( iwparam )); ++ wi->has_nwid = 1; ++ } ++ ++ /* Get frequency / channel */ // THIS NUMBER LOOKS FUNNY ++ if ( ioctl ( skfd, SIOCGIWFREQ, &wrq ) >= 0 ) { ++ wi->has_freq = 1; ++ wi->freq = (( double ) wrq.u.freq.m ) * pow ( 10, wrq.u.freq.e ); ++ } ++ ++ /* Get sensitivity */ ++ if ( ioctl ( skfd, SIOCGIWSENS, &wrq ) >= 0 ) { ++ wi->has_sens = 1; ++ memcpy ( &wi->sens, &wrq.u.sens, sizeof ( iwparam )); ++ } ++ ++ /* Get encryption information */ ++ wrq.u.data.pointer = ( caddr_t ) &wi->key; ++ wrq.u.data.length = IW_ENCODING_TOKEN_MAX; ++ wrq.u.data.flags = 0; ++ if ( ioctl ( skfd, SIOCGIWENCODE, &wrq ) >= 0 ) { ++ wi->has_key = 1; ++ wi->key_size = wrq.u.data.length; ++ wi->key_flags = wrq.u.data.flags; ++ wepCurrentKey = wrq.u.data.flags & IW_ENCODE_INDEX; ++ } ++ ++ for ( i = 0; i < wi->range.max_encoding_tokens; i++ ) { ++ wrq.u.data.pointer = ( caddr_t ) &wi->key; ++ wrq.u.data.length = IW_ENCODING_TOKEN_MAX; ++ wrq.u.data.flags = i; ++ if ( ioctl ( skfd, SIOCGIWENCODE, &wrq ) >= 0 ) { ++ if ( ( wrq.u.data.length != 0 ) && ++ !( wrq.u.data.flags & IW_ENCODE_DISABLED )) { ++ wep[i].len = wrq.u.data.length; ++ wep[i].haveKey = TRUE; ++ t = wep[i].key; ++ for ( j = 0; j < wrq.u.data.length; j++ ) { ++ if (( j & 0x1 ) == 0 && j != 0 ) ++ strcpy ( t++, "-"); ++ sprintf ( t, "%.2X", wi->key[j] ); ++ t += 2; ++ } ++ t = '\0'; ++ } ++ } ++ } ++ ++ /* Get ESSID */ ++ wrq.u.essid.pointer = ( caddr_t ) &wi->essid; ++ wrq.u.essid.length = IW_ESSID_MAX_SIZE + 1; ++ wrq.u.essid.flags = 0; ++ if ( ioctl ( skfd, SIOCGIWESSID, &wrq ) >= 0 ) { ++ wi->has_essid = 1; ++ wi->essid_on = wrq.u.data.flags; ++ } ++ ++ /* Get AP address */ ++ if ( ioctl ( skfd, SIOCGIWAP, &wrq ) >= 0 ) { ++ wi->has_ap_addr = 1; ++ memcpy ( &wi->ap_addr, &wrq.u.ap_addr, sizeof ( sockaddr )); ++ } ++ ++ /* Get NickName */ ++ wrq.u.essid.pointer = ( caddr_t ) &wi->nickname; ++ wrq.u.essid.length = IW_ESSID_MAX_SIZE + 1; ++ wrq.u.essid.flags = 0; ++ if ( ioctl ( skfd, SIOCGIWNICKN, &wrq ) >= 0 ) { ++ if ( wrq.u.data.length > 1 ) ++ wi->has_nickname = 1; ++ } ++ ++ /* Get bit rate */ ++ if ( ioctl ( skfd, SIOCGIWRATE, &wrq ) >= 0 ) { ++ wi->has_bitrate = 1; ++ memcpy ( &wi->bitrate, &wrq.u.bitrate, sizeof ( iwparam )); ++ } ++ ++ /* Get RTS threshold */ ++ if ( ioctl ( skfd, SIOCGIWRTS, &wrq ) >= 0 ) { ++ wi->has_rts = 1; ++ memcpy ( &wi->rts, &wrq.u.rts, sizeof ( iwparam )); ++ } ++ ++ /* Get fragmentation threshold */ ++ if ( ioctl ( skfd, SIOCGIWFRAG, &wrq ) >= 0 ) { ++ wi->has_frag = 1; ++ memcpy ( &wi->frag, &wrq.u.frag, sizeof ( iwparam )); ++ } ++ ++ /* Get operation mode */ ++ if ( ioctl ( skfd, SIOCGIWMODE, &wrq ) >= 0 ) { ++ wi->mode = wrq.u.mode; ++ if ( wi->mode < IW_NUM_OPER_MODE && wi->mode >= 0 ) ++ wi->has_mode = 1; ++ } ++ ++ /* Get Power Management settings */ // #if WIRELESS_EXT > 9 ++ wrq.u.power.flags = 0; ++ if ( ioctl ( skfd, SIOCGIWPOWER, &wrq ) >= 0 ) { ++ wi->has_power = 1; ++ memcpy ( &wi->power, &wrq.u.power, sizeof ( iwparam )); ++ } ++ ++ /* Get retry limit/lifetime */ // #if WIRELESS_EXT > 10 ++ if ( ioctl ( skfd, SIOCGIWRETRY, &wrq ) >= 0 ) { ++ wi->has_retry = 1; ++ memcpy ( &wi->retry, &wrq.u.retry, sizeof ( iwparam )); ++ } ++ ++ /* Get stats */ // #if WIRELESS_EXT > 11 ++ wrq.u.data.pointer = ( caddr_t ) &wi->stats; ++ wrq.u.data.length = 0; ++ wrq.u.data.flags = 1; /* Clear updated flag */ ++ if ( ioctl ( skfd, SIOCGIWSTATS, &wrq ) < 0 ) ++ wi->has_stats = 1; ++ ++ if ( !wi->has_stats ) { // no ioctl support, go to file ++ fp = fopen ( PROC_NET_WIRELESS, "r" ); ++ if ( fp ) { ++ while ( fgets ( bfr, sizeof ( bfr ), fp )) { ++ bfr [ sizeof ( bfr ) - 1 ] = '\0'; // no buffer overruns here! ++ strtok (( char * ) &bfr, "\n" ); // '\n' => '\0' ++ if ( strstr ( bfr, ifname ) && strstr ( bfr, ":" )) { ++ wi->has_stats = 1; ++ s = bfr; ++ s = strchr ( s, ':' ); s++; /* Skip ethX: */ ++ s = strtok ( s, " " ); /* ' ' => '\0' */ ++ sscanf ( s, "%X", &wi->stats.status ); // status ++ ++ s = strtok ( NULL, " " ); // link quality ++ if ( strchr ( s, '.' ) != NULL ) ++ wi->stats.qual.updated |= 1; ++ sscanf ( s, "%d", &wi->stats.qual.qual ); ++ ++ s = strtok ( NULL, " " ); // signal level ++ if ( strchr ( s,'.' ) != NULL ) ++ wi->stats.qual.updated |= 2; ++ sscanf ( s, "%d", &wi->stats.qual.level ); ++ ++ s = strtok ( NULL, " " ); // noise level ++ if ( strchr ( s, '.' ) != NULL ) ++ wi->stats.qual.updated += 4; ++ sscanf ( s, "%d", &wi->stats.qual.noise ); ++ ++ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.nwid ); ++ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.code ); ++ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.fragment ); ++ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.retries ); ++ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.misc ); ++ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.miss.beacon ); ++ } ++ } ++ fclose ( fp ); ++ } ++ } ++ ++// printf ( "%s bfr: %s\n", "loadTables()", bfr ); ++} ++ ++/**************************************************************************** ++* * ++* displayWiExt() - show what I got from Wireless Extensions * ++* * ++****************************************************************************/ ++static void displayWiExt ( struct wireless_info info ) ++{ ++#ifdef DISPLAYWIEXT ++ int i; ++ char title[] = "displayWiExt() -"; ++ ++ printf ( "========================================\n" ); ++ printf ( "===> Wireless Extension IOCTL calls <===\n" ); ++ printf ( "========================================\n" ); ++ ++ if ( strlen ( info.name )) ++ printf ( "%s name: %s\n", "SIOCGIWNAME", info.name ); ++ else ++ printf ( "%s\n", "no info.name support" ); ++ ++ if ( info.has_nickname = 1 ) ++ printf ( "%s nickname: %s\n", "SIOCGIWNICKN", info.nickname ); ++ else ++ printf ( "%s %s\n", "SIOCGIWNICKN", " ===> no info.nickname support" ); ++ ++ if ( info.has_essid ) ++ printf ( "%s essid_on: %d essid: %s\n", "SIOCGIWESSID", info.essid_on, info.essid ); ++ else ++ printf ( "%s %s\n", "SIOCGIWESSID", " ===> no info.essid support" ); ++ ++ if ( info.has_range ) { ++ printf ( "%s throughput: %d\n", "SIOCGIWRANGE", info.range.throughput ); ++ printf ( "%s min_nwid: %d\n", "SIOCGIWRANGE", info.range.min_nwid ); ++ printf ( "%s max_nwid: %d\n", "SIOCGIWRANGE", info.range.max_nwid ); ++ printf ( "%s sensitivity: %d\n", "SIOCGIWRANGE", info.range.sensitivity ); ++ printf ( "%s num_bitrates: %d\n", "SIOCGIWRANGE", info.range.num_bitrates ); ++ for ( i = 0; i < info.range.num_bitrates; i++ ) ++ printf ( "%s bitrate[%d]: %d\n", "SIOCGIWRANGE", i, info.range.bitrate[i] ); ++ printf ( "%s min_rts: %d\n", "SIOCGIWRANGE", info.range.min_rts ); ++ printf ( "%s max_rts: %d\n", "SIOCGIWRANGE", info.range.max_rts ); ++ printf ( "%s min_frag: %d\n", "SIOCGIWRANGE", info.range.min_frag ); ++ printf ( "%s max_frag: %d\n", "SIOCGIWRANGE", info.range.max_frag ); ++ printf ( "%s min_pmp: %d\n", "SIOCGIWRANGE", info.range.min_pmp ); ++ printf ( "%s max_pmp: %d\n", "SIOCGIWRANGE", info.range.max_pmp ); ++ printf ( "%s min_pmt: %d\n", "SIOCGIWRANGE", info.range.min_pmt ); ++ printf ( "%s max_pmt: %d\n", "SIOCGIWRANGE", info.range.max_pmt ); ++ printf ( "%s pmp_flags: %d\n", "SIOCGIWRANGE", info.range.pmp_flags ); ++ printf ( "%s pmt_flags: %d\n", "SIOCGIWRANGE", info.range.pmt_flags ); ++ printf ( "%s pm_capa: %d\n", "SIOCGIWRANGE", info.range.pm_capa ); ++ printf ( "%s num_encoding_sizes: %d\n", "SIOCGIWRANGE", info.range.num_encoding_sizes ); ++ for ( i = 0; i < info.range.num_encoding_sizes; i++ ) ++ printf ( "%s encoding_size[%d]: %d\n", "SIOCGIWRANGE", i, info.range.encoding_size[i] ); ++ printf ( "%s max_encoding_tokens: %d\n", "SIOCGIWRANGE", info.range.max_encoding_tokens ); ++// printf ( "%s encoding_login_index: %d\n", "SIOCGIWRANGE", info.range.encoding_login_index ); ++ printf ( "%s txpower_capa: %d\n", "SIOCGIWRANGE", info.range.txpower_capa ); ++ printf ( "%s num_txpower: %d dBm\n", "SIOCGIWRANGE", info.range.num_txpower ); ++ for ( i = 0; i < info.range.num_txpower; i++ ) ++ printf ( "%s txpower[%d]: %d\n", "SIOCGIWRANGE", i, info.range.txpower[i] ); ++ printf ( "%s we_version_compiled: %d\n", "SIOCGIWRANGE", info.range.we_version_compiled ); ++ printf ( "%s we_version_source: %d\n", "SIOCGIWRANGE", info.range.we_version_source ); ++ printf ( "%s retry_capa: %d\n", "SIOCGIWRANGE", info.range.retry_capa ); ++ printf ( "%s retry_flags: %d\n", "SIOCGIWRANGE", info.range.retry_flags ); ++ printf ( "%s r_time_flags: %d\n", "SIOCGIWRANGE", info.range.r_time_flags ); ++ printf ( "%s min_retry: %d\n", "SIOCGIWRANGE", info.range.min_retry ); ++ printf ( "%s max_retry: %d\n", "SIOCGIWRANGE", info.range.max_retry ); ++ printf ( "%s min_r_time: %d\n", "SIOCGIWRANGE", info.range.min_r_time ); ++ printf ( "%s max_r_time: %d\n", "SIOCGIWRANGE", info.range.max_r_time ); ++ printf ( "%s num_channels: %d\n", "SIOCGIWRANGE", info.range.num_channels ); ++ printf ( "%s num_frequency: %d\n", "SIOCGIWRANGE", info.range.num_frequency ); ++ for ( i = 0; i < info.range.num_frequency; i++ ) ++ printf ( "%s freq[%d].i: %d freq[%d].e: %d freq[%d].m: %d\n", "SIOCGIWRANGE", ++ i, info.range.freq[i].i, i, info.range.freq[i].e, i, info.range.freq[i].m ); ++ } ++ else ++ printf ( "%s %s\n", "SIOCGIWRANGE", " ===> no info.range support" ); ++ ++ if ( info.has_nwid ) ++ printf ( "%s nwid - disabled: %d value: %X\n", "SIOCGIWNWID", info.nwid.disabled, info.nwid.value ); ++ else ++ printf ( "%s %s\n", "SIOCGIWNWID", " ===> no info.nwid support" ); ++ ++ if ( info.has_freq ) { ++// printf ( "%s freq: %g\n", "SIOCGIWFREQ", info.freq / GIGA ); ++ printf ( "%s freq: %g\n", "SIOCGIWFREQ", info.freq ); ++ } ++ else ++ printf ( "%s %s\n", "SIOCGIWFREQ", " ===> no info.freq support" ); ++ ++ if ( info.has_sens ) ++ printf ( "%s sens: %d\n", "SIOCGIWSENS", info.sens ); ++ else ++ printf ( "%s %s\n", "SIOCGIWSENS", " ===> no info.sens support" ); ++ ++ if ( info.has_key ) { ++ printf ( "%s key_size: %d key_flags: %d wepCurrentKey: %d\n", ++ "SIOCGIWENCODE", info.key_size, info.key_flags, wepCurrentKey ); ++ printf ( "%s MODE: %d DISABLED: %d INDEX: %d OPEN: %d RESTRICTED: %d NOKEY: %d TEMP: %d\n", ++ "SIOCGIWENCODE", info.key_flags & IW_ENCODE_MODE, ++ info.key_flags & IW_ENCODE_DISABLED ? 1:0, info.key_flags & IW_ENCODE_INDEX, ++ info.key_flags & IW_ENCODE_OPEN ? 1:0, info.key_flags & IW_ENCODE_RESTRICTED ? 1:0, ++ info.key_flags & IW_ENCODE_NOKEY ? 1:0, info.key_flags & IW_ENCODE_TEMP ? 1:0 ); ++ } ++ else ++ printf ( "%s %s\n", "SIOCGIWENCODE", " ===> no info.key support" ); ++ ++ for ( i = 0; i < MAX_WEP_KEYS; i++ ) { ++ if ( wep[i].haveKey ) ++ printf ( "%s wep[%d].len: %d wep[%d].key: %s\n", ++ "SIOCGIWENCODE", i, wep[i].len, i, wep[i].key ); ++ } ++ ++ if ( info.has_ap_addr ) ++ printf ( "%s ap_addr.sa_data: %02X:%02X:%02X:%02X:%02X:%02X ap_addr.sa_family: %d\n", ++ "SIOCGIWAP", ( UCHAR ) info.ap_addr.sa_data[0], ( UCHAR ) info.ap_addr.sa_data[1], ++ ( UCHAR ) info.ap_addr.sa_data[2], ( UCHAR ) info.ap_addr.sa_data[3], ++ ( UCHAR ) info.ap_addr.sa_data[4], ( UCHAR ) info.ap_addr.sa_data[5], ++ info.ap_addr.sa_family ); ++ else ++ printf ( "%s %s\n", "SIOCGIWAP", " ===> no ap_addr information" ); ++ ++ if ( info.has_bitrate ) ++ printf ( "%s bitrate: %d value: %d fixed: %d disabled: %d flags: %d\n", ++ "SIOCGIWRATE", info.bitrate, info.bitrate.value, info.bitrate.fixed, ++ info.bitrate.disabled, info.bitrate.flags ); ++ else ++ printf ( "%s %s\n", "SIOCGIWRATE", " ===> no info.bitrate support" ); ++ ++ if ( info.has_rts ) ++ printf ( "%s rts: %d\n", "SIOCGIWRTS", info.rts ); ++ else ++ printf ( "%s %s\n", "SIOCGIWRTS", " ===> no info.rts support" ); ++ ++ if ( info.has_frag ) ++ printf ( "%s frag: %d\n", "SIOCGIWFRAG", info.frag ); ++ else ++ printf ( "%s %s\n", "SIOCGIWFRAG", " ===> no info.frag support" ); ++ ++ if ( info.has_mode ) ++ printf ( "%s mode: %d\n", "SIOCGIWMODE", info.mode ); ++ else ++ printf ( "%s %s\n", "SIOCGIWMODE", " ===> no info.mode support" ); ++ ++ if ( info.has_power ) { ++ printf ( "%s power: %d\n", "SIOCGIWPOWER", info.power ); ++ printf ( "%s disabled: %d MIN: %d MAX: %d TIMEOUT: %d RELATIVE: %d\n", ++ "SIOCGIWPOWER", ++ info.power.disabled ? 1:0, ++ info.power.flags & IW_POWER_MIN ? 1:0, ++ info.power.flags & IW_POWER_MAX ? 1:0, ++ info.power.flags & IW_POWER_TIMEOUT ? 1:0, ++ info.power.flags & IW_POWER_RELATIVE ? 1:0 ); ++ printf ( "%s UNICAST: %d MULTICAST: %d ALL: %d FORCE: %d REPEATER: %d\n", ++ "SIOCGIWPOWER", ++ info.power.flags & IW_POWER_UNICAST_R ? 1:0, ++ info.power.flags & IW_POWER_MULTICAST_R ? 1:0, ++ info.power.flags & IW_POWER_ALL_R ? 1:0, ++ info.power.flags & IW_POWER_FORCE_S ? 1:0, ++ info.power.flags & IW_POWER_REPEATER ? 1:0 ); ++ } ++ else ++ printf ( "%s %s\n", "SIOCGIWPOWER", " ===> no info.power support" ); ++ ++ if ( info.has_retry ) ++ printf ( "%s retry: %d\n", "SIOCGIWRETRY", info.retry ); ++ else ++ printf ( "%s %s\n", "SIOCGIWRETRY", " ===> no info.retry support" ); ++ ++ if ( info.has_stats ) { ++ printf ( "%s status: %d\n", "SIOCGIWSTATS", info.stats.status ); ++ printf ( "%s qual.level: %d\n", "SIOCGIWSTATS", info.stats.qual.level ); ++ printf ( "%s qual.noise: %d\n", "SIOCGIWSTATS", info.stats.qual.noise ); ++ printf ( "%s qual.qual: %d\n", "SIOCGIWSTATS", info.stats.qual.qual ); ++ printf ( "%s qual.updated: %d\n", "SIOCGIWSTATS", info.stats.qual.updated ); ++ printf ( "%s discard.code: %d\n", "SIOCGIWSTATS", info.stats.discard.code ); ++ printf ( "%s discard.fragment: %d\n", "SIOCGIWSTATS", info.stats.discard.fragment ); ++ printf ( "%s discard.misc: %d\n", "SIOCGIWSTATS", info.stats.discard.misc ); ++ printf ( "%s discard.nwid: %d\n", "SIOCGIWSTATS", info.stats.discard.nwid ); ++ printf ( "%s discard.retries: %d\n", "SIOCGIWSTATS", info.stats.discard.retries ); ++ printf ( "%s miss.beacon: %d\n", "SIOCGIWSTATS", info.stats.miss.beacon ); ++ } ++ else ++ printf ( "%s %s\n", "SIOCGIWSTATS", " ===> no info.stats support" ); ++ ++ if ( info.txpower.flags & IW_TXPOW_MWATT ) ++ printf ( "%s txpower1: %d dBm disabled: %d fixed: %d flags: %d\n", "SIOCGIWRANGE", ++ mWatt2dbm ( info.txpower.value ), info.txpower.disabled, info.txpower.fixed, info.txpower.flags); ++ else ++ printf ( "%s txpower2: %d dBm disabled: %d fixed: %d flags: %d\n", "SIOCGIWRANGE", info.txpower.value, info.txpower.disabled, info.txpower.fixed, info.txpower.flags ); ++ ++ if ( info.has_range ) ++ if ( info.sens.value < 0 ) ++ printf ( "%s sens: %d dBm\n", "SIOCGIWRANGE", info.sens.value ); ++ else ++ printf ( "%s sens: %d/%d\n", "SIOCGIWRANGE", info.sens.value, info.range.sensitivity ); ++ ++ if ( info.has_range && ( info.stats.qual.level != 0 )) ++ if ( info.stats.qual.level > info.range.max_qual.level ) ++ /* Statistics are in dBm (absolute power measurement) */ ++ printf ( "%s Quality: %d/%d Signal level: %d dBm Noise level: %d dBm\n", ++ "SIOCGIWRANGE", ++ info.stats.qual.qual, info.range.max_qual.qual, ++ info.stats.qual.level - 0x100, ++ info.stats.qual.noise - 0x100 ); ++ else ++ printf ( "%s Quality: %d/%d Signal level: %d/%d Noise level: %d/%d", ++ "SIOCGIWRANGE", ++ info.stats.qual.qual, info.range.max_qual.qual, ++ info.stats.qual.level, info.range.max_qual.level, ++ info.stats.qual.noise, info.range.max_qual.noise ); ++ ++#endif // #ifdef DISPLAYWIEXT ++} ++ ++/**************************************************************************** ++* * ++* Linked List Functions * ++* * ++****************************************************************************/ ++/**************************************************************************** ++* * ++* addList() - add an entry to a linked list * ++* * ++****************************************************************************/ ++static void ++addList ( char *l, char *data, int len ) ++{ ++ char uid[256]; ++ LIST_HEAD ( , avNode ) *list; ++ ++ // NOTE: this assumes the UID is at the begining of the ++ // data structure and that UIDs are strings ++ ++ list = ( LIST_HEAD ( , avNode ) * ) l; // NOTE: don't know how to get ++ strcpy ( uid, data ); // rid of compiler warning on ++ // LISTHEAD typecast ++ // create a new node and the data that goes in it ++ newNode = malloc ( sizeof ( struct avNode )); ++ newNode->data = malloc ( len ); ++ memcpy ( newNode->data, data, len ); ++ ++ // this deals with an empty list ++ if ( LIST_EMPTY ( list )) { ++ LIST_INSERT_HEAD ( list, newNode, nodes ); ++ return; ++ } ++ ++ // this deals with UIDs that match ++ for ( np = LIST_FIRST ( list ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ if ( strncmp ( uid, np->data, strlen ( uid )) == 0 ) { // found matching UID ++ LIST_INSERT_AFTER ( np, newNode, nodes ); ++ if ( np->data ) ++ free ( np->data ); ++ LIST_REMOVE ( np, nodes ); ++ free ( np ); ++ return; ++ } ++ } ++ ++ // this deals with inserting a new UID in the list ++ for ( np = LIST_FIRST ( list ); np != NULL; np = LIST_NEXT ( np, nodes )) { ++ lastNode = np; ++ if ( strncmp ( np->data, uid, strlen ( uid )) > 0 ) { // old ID > new ID AND ++ LIST_INSERT_BEFORE ( np, newNode, nodes ); ++ return; ++ } ++ } ++ ++ // this deals with a UID that needs to go on the end of the list ++ LIST_INSERT_AFTER ( lastNode, newNode, nodes ); ++ ++ return; ++} ++ ++/**************************************************************************** ++* * ++* initLists() - initialize all the linked lists * ++* * ++****************************************************************************/ ++static void initLists() ++{ ++ LIST_INIT ( &scList ); LIST_INIT ( &aaList ); LIST_INIT ( &dfList ); ++ LIST_INIT ( &kmList ); LIST_INIT ( &prList ); ++ LIST_INIT ( &opList ); LIST_INIT ( &coList ); ++ LIST_INIT ( &gaList ); LIST_INIT ( &riList ); LIST_INIT ( &poList ); ++ LIST_INIT ( &paList ); LIST_INIT ( &ptList ); LIST_INIT ( &pfList ); ++ LIST_INIT ( &pdList ); LIST_INIT ( &piList ); LIST_INIT ( &rdList ); ++ LIST_INIT ( &alList ); LIST_INIT ( &rtList ); LIST_INIT ( &rrList ); ++} ++/**************************************************************************** ++* * ++* flushLists() - flush all linked lists * ++* * ++****************************************************************************/ ++static void flushLists() ++{ ++ flushList (( char * ) &scList ); flushList (( char * ) &aaList ); ++ flushList (( char * ) &dfList ); flushList (( char * ) &kmList ); ++ flushList (( char * ) &prList ); ++ flushList (( char * ) &opList ); flushList (( char * ) &coList ); ++ flushList (( char * ) &gaList ); flushList (( char * ) &riList ); ++ flushList (( char * ) &poList ); flushList (( char * ) &paList ); ++ flushList (( char * ) &ptList ); flushList (( char * ) &pfList ); ++ flushList (( char * ) &pdList ); flushList (( char * ) &piList ); ++ flushList (( char * ) &rdList ); flushList (( char * ) &alList ); ++ flushList (( char * ) &rtList ); flushList (( char * ) &rrList ); ++} ++ ++/**************************************************************************** ++* * ++* flushList() - flush a linked list * ++* * ++****************************************************************************/ ++static void flushList ( char *l ) ++{ ++ LIST_HEAD ( , avNode ) *list; ++ ++ list = ( LIST_HEAD ( , avNode ) * ) l; // NOTE: don't know how to get ++ while ( !LIST_EMPTY ( list )) { // rid of compiler warning on ++ np = LIST_FIRST ( list ); // LISTHEAD typecast ++ if ( np->data ) ++ free ( np->data ); ++ LIST_REMOVE ( np, nodes ); ++ free ( np ); ++ } ++} ++ ++/**************************************************************************** ++* * ++* Utility Functions * ++* * ++****************************************************************************/ ++/**************************************************************************** ++* * ++* The following two routines were taken directly from iwlib.c * ++* * ++****************************************************************************/ ++ /* ++ * Open a socket. ++ * Depending on the protocol present, open the right socket. The socket ++ * will allow us to talk to the driver. ++ */ ++static int openSocket ( void ) ++{ ++ static const int families[] = { ++ AF_INET, AF_IPX, AF_AX25, AF_APPLETALK ++ }; ++ unsigned int i; ++ int sock; ++ ++ /* ++ * Now pick any (exisiting) useful socket family for generic queries ++ * Note : don't open all the socket, only returns when one matches, ++ * all protocols might not be valid. ++ * Workaround by Jim Kaba ++ * Note : in 99% of the case, we will just open the inet_sock. ++ * The remaining 1% case are not fully correct... ++ */ ++ ++ /* Try all families we support */ ++ for(i = 0; i < sizeof(families)/sizeof(int); ++i) { ++ /* Try to open the socket, if success returns it */ ++ sock = socket(families[i], SOCK_DGRAM, 0); ++ if(sock >= 0) ++ return sock; ++ } ++ ++ return -1; ++} ++ ++/*------------------------------------------------------------------*/ ++/* ++ * Convert a value in milliWatt to a value in dBm. ++ */ ++static int mWatt2dbm ( int in ) ++{ ++#ifdef WE_NOLIBM ++ /* Version without libm : slower */ ++ double fin = (double) in; ++ int res = 0; ++ ++ /* Split integral and floating part to avoid accumulating rounding errors */ ++ while(fin > 10.0) ++ { ++ res += 10; ++ fin /= 10.0; ++ } ++ while(fin > 1.000001) /* Eliminate rounding errors, take ceil */ ++ { ++ res += 1; ++ fin /= LOG10_MAGIC; ++ } ++ return(res); ++#else /* WE_NOLIBM */ ++ /* Version with libm : faster */ ++ return((int) (ceil(10.0 * log10((double) in)))); ++#endif /* WE_NOLIBM */ ++} ++ ++/**************************************************************************** ++* * ++* htob - converts hex string to binary * ++* * ++****************************************************************************/ ++static char *htob ( char *s ) ++{ ++ char nibl, *byt; ++ static char bin[20]; ++ ++ byt = bin; ++ ++ while ((nibl = *s++) && nibl != ' ') { /* While not end of string. */ ++ nibl -= ( nibl > '9') ? ('A' - 10): '0'; ++ *byt = nibl << 4; /* place high nibble */ ++ if((nibl = *s++) && nibl != ' ') { ++ nibl -= ( nibl > '9') ? ('A' - 10): '0'; ++ *byt |= nibl; /* place low nibble */ ++ } ++ else break; ++ ++byt; ++ } ++ *++byt = '\0'; ++ return ( bin ); ++} ++ ++/**************************************************************************** ++* * ++* hasChanged() - see if area has been changed from NULLs * ++* * ++****************************************************************************/ ++static int hasChanged ( char *loc, int len ) ++{ ++ char *wrk; ++ int changed = TRUE; ++ ++ wrk = malloc ( len ); ++ memset ( wrk, 0, len ); ++ if ( memcmp ( loc, wrk, len ) == 0 ) ++ changed = FALSE; ++ free ( wrk ); ++ ++ return ( changed ); ++} ++ +--- /dev/null ++++ b/agent/mibgroup/ieee802dot11.h +@@ -0,0 +1,730 @@ ++/**************************************************************************** ++* * ++* File Name: ieee802dot11.h * ++* Used By: * ++* * ++* Operating System: * ++* Purpose: * ++* * ++* Comments: * ++* * ++* Author: Larry Simmons * ++* lsimmons@avantcom.com * ++* www.avantcom.com * ++* * ++* Creation Date: 09/02/03 * ++* * ++* Ver Date Inits Modification * ++* ----- -------- ----- ------------ * ++* 0.0.1 09/02/03 LRS created * ++* 0.0.2 09/24/03 LRS wouldn't build after fresh ./configure * ++****************************************************************************/ ++/* This file was generated by mib2c and is intended for use as a mib module ++ for the ucd-snmp snmpd agent. */ ++#ifndef _MIBGROUP_IEEE802DOT11_H ++#define _MIBGROUP_IEEE802DOT11_H ++/* we may use header_generic and header_simple_table from the util_funcs module */ ++ ++/**************************************************************************** ++* Includes * ++****************************************************************************/ ++#include ++ ++/**************************************************************************** ++* Linked List Defines * ++****************************************************************************/ ++// here are some Linked List MACROS I wanted to use, ++// but curiously were not in /usr/includes/sys/queue.h ++ ++#ifndef LIST_EMPTY ++ #define LIST_EMPTY(head) ((head)->lh_first == NULL) ++#endif ++ ++#ifndef LIST_NEXT ++ #define LIST_NEXT(elm, field) ((elm)->field.le_next) ++#endif ++ ++#ifndef LIST_INSERT_BEFORE ++ #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ ++ (elm)->field.le_prev = (listelm)->field.le_prev; \ ++ LIST_NEXT((elm), field) = (listelm); \ ++ *(listelm)->field.le_prev = (elm); \ ++ (listelm)->field.le_prev = &LIST_NEXT((elm), field); \ ++ } while (0) ++#endif ++ ++#ifndef LIST_FIRST ++ #define LIST_FIRST(head) ((head)->lh_first) ++#endif ++ ++/**************************************************************************** ++* 802.11 MIB Defines * ++****************************************************************************/ ++#define SYS_STRING_LEN 256 ++#define MACADDR_LEN ( 6 * 2 ) + 5 ++#define OPER_RATE_SET_LEN 126 ++#define MAN_OUI_LEN ( 3 * 2 ) + 2 ++#define WEP_STR_LEN 64 ++#define SNMP_STR_LEN 128 ++#define TEXT_LEN 80 ++#define IFINDEX_LEN 4 ++#define IFNAME_LEN 16 ++#define MAX_WEP_KEYS 4 ++ ++#define AUTHENICATION_ALGORITHMS_INDEX_LEN 4 ++#define WEP_DEFAULT_KEY_INDEX_LEN 4 ++#define WEP_KEY_MAPPING_INDEX_LEN 4 ++#define GROUP_ADDRESS_INDEX_LEN 4 ++#define REG_DOMAIN_SUPPORT_INDEX_LEN 4 ++#define ANTENNA_LIST_INDEX_LEN 4 ++#define SUPPORTED_DATA_RATES_TX_INDEX_LEN 4 ++#define SUPPORTED_DATA_RATES_RX_INDEX_LEN 4 ++ ++#define SC_UID_LEN IFINDEX_LEN ++#define AA_UID_LEN IFINDEX_LEN + AUTHENICATION_ALGORITHMS_INDEX_LEN ++#define DF_UID_LEN IFINDEX_LEN + WEP_DEFAULT_KEY_INDEX_LEN ++#define KM_UID_LEN IFINDEX_LEN + WEP_KEY_MAPPING_INDEX_LEN ++#define PR_UID_LEN IFINDEX_LEN ++#define OP_UID_LEN IFINDEX_LEN ++#define CO_UID_LEN IFINDEX_LEN ++#define GA_UID_LEN IFINDEX_LEN + GROUP_ADDRESS_INDEX_LEN ++#define RI_UID_LEN IFINDEX_LEN ++#define PO_UID_LEN IFINDEX_LEN ++#define PA_UID_LEN IFINDEX_LEN ++#define PT_UID_LEN IFINDEX_LEN ++#define PF_UID_LEN IFINDEX_LEN ++#define PD_UID_LEN IFINDEX_LEN ++#define PI_UID_LEN IFINDEX_LEN ++#define RD_UID_LEN IFINDEX_LEN + REG_DOMAIN_SUPPORT_INDEX_LEN ++#define AL_UID_LEN IFINDEX_LEN + ANTENNA_LIST_INDEX_LEN ++#define RT_UID_LEN IFINDEX_LEN + SUPPORTED_DATA_RATES_TX_INDEX_LEN ++#define RR_UID_LEN IFINDEX_LEN + SUPPORTED_DATA_RATES_RX_INDEX_LEN ++ ++/**************************************************************************** ++* Linked List Structure * ++****************************************************************************/ ++static struct avNode { ++ LIST_ENTRY ( avNode ) nodes; ++ char *data; // pointer to data ++}; ++ ++typedef LIST_HEAD ( , avNode ) avList_t; ++ ++/**************************************************************************** ++* 802.11 MIB structures * ++****************************************************************************/ ++/**************************************************************************** ++* dot11Smt Group * ++****************************************************************************/ ++/**************************************************************************** ++* dot11StationConfigTable * ++****************************************************************************/ ++static struct scTbl_data { ++ ++ char UID [ SC_UID_LEN + 1 ]; // unique ID ++ char ifName [ IFNAME_LEN + 1 ]; // ifName of card ++ ++ long ifIndex; // ifindex of card ++ ++ char stationID [ MACADDR_LEN + 1 ]; // Default actual MacAddr ++ long mediumOccupancyLimit; ++ long CFPPollable; ++ long CFPPeriod; ++ long maxDuration; ++ long authenticationResponseTimeOut; ++ long privacyOptionImplemented; ++ long powerManagementMode; ++ char desiredSSID [ SNMP_STR_LEN + 1 ]; ++ long desiredBSSType; ++ char operationalRateSet [ OPER_RATE_SET_LEN + 1]; ++ long beaconPeriod; ++ long DTIMPeriod; ++ long associationResponseTimeOut; ++ long disAssociationReason; ++ char disAssociationStation [ MACADDR_LEN + 1 ]; ++ long deAuthenticationReason; ++ char deAuthenticationStation [ MACADDR_LEN + 1 ]; ++ long authenticateFailStatus; ++ char authenticateFailStation [ MACADDR_LEN + 1 ]; ++ ++ long haveStationID; ++ long haveMediumOccupancyLimit; ++ long haveCFPPollable; ++ long haveCFPPeriod; ++ long haveMaxDuration; ++ long haveAuthenticationResponseTimeOut; ++ long havePrivacyOptionImplemented; ++ long havePowerManagementMode; ++ long haveDesiredSSID; ++ long haveDesiredBSSType; ++ long haveOperationalRateSet; ++ long haveBeaconPeriod; ++ long haveDTIMPeriod; ++ long haveAssociationResponseTimeOut; ++ long haveDisAssociationReason; ++ long haveDisAssociationStation; ++ long haveDeAuthenticationReason; ++ long haveDeAuthenticationStation; ++ long haveAuthenticateFailStatus; ++ long haveAuthenticateFailStation; ++ ++} nSc, *sc = &nSc; ++ ++static avList_t scList; ++ ++/**************************************************************************** ++* dot11AuthenticationAlgorithmsTable * ++****************************************************************************/ ++static struct aaTbl_data { ++ ++ char UID [ AA_UID_LEN + 1 ]; ++ char ifName [ IFNAME_LEN + 1 ]; // ifName of card ++ ++ long ifIndex; // ifindex of card ++ long authenticationAlgorithmsIndex; ++ ++ long authenticationAlgorithm; ++ long authenticationAlgorithmsEnable; ++ ++ long haveAuthenticationAlgorithm; ++ long haveAuthenticationAlgorithmsEnable; ++ ++} nAa, *aa = &nAa; ++ ++static avList_t aaList; ++ ++/**************************************************************************** ++* dot11WEPDefaultKeysTable * ++****************************************************************************/ ++static struct dfTbl_data { ++ ++ char UID [ DF_UID_LEN + 1 ]; ++ char ifName [ IFNAME_LEN + 1 ]; ++ ++ long ifIndex; // ifindex of card ++ long WEPDefaultKeyIndex; ++ ++ char WEPDefaultKeyValue [ WEP_STR_LEN + 1 ]; ++ long haveWEPDefaultKeyValue; ++ ++} nDf, *df = &nDf; ++ ++static avList_t dfList; ++ ++/**************************************************************************** ++* dot11WEPKeyMappingsTable * ++****************************************************************************/ ++static struct kmTbl_data { ++ ++ char UID [ KM_UID_LEN + 1 ]; ++ char ifName [ IFNAME_LEN + 1 ]; ++ ++ long ifIndex; ++ long WEPKeyMappingIndex; ++ ++ char WEPKeyMappingAddress [ MACADDR_LEN + 1 ]; ++ long WEPKeyMappingWEPOn; ++ char WEPKeyMappingValue [ WEP_STR_LEN + 1 ]; ++ long WEPKeyMappingStatus; ++ ++ long haveWEPKeyMappingIndex; ++ long haveWEPKeyMappingAddress; ++ long haveWEPKeyMappingWEPOn; ++ long haveWEPKeyMappingValue; ++ long haveWEPKeyMappingStatus; ++ ++} nKm, *km = &nKm; ++ ++static avList_t kmList; ++ ++/**************************************************************************** ++* dot11PrivacyTable * ++****************************************************************************/ ++static struct prTbl_data { ++ ++ char UID [ PR_UID_LEN + 1 ]; ++ char ifName [ IFNAME_LEN + 1 ]; ++ ++ long ifIndex; ++ ++ long privacyInvoked; ++ long WEPDefaultKeyID; ++ long WEPKeyMappingLength; ++ long excludeUnencrypted; ++ unsigned long WEPICVErrorCount; ++ unsigned long WEPExcludedCount; ++ ++ long havePrivacyInvoked; ++ long haveWEPDefaultKeyID; ++ long haveWEPKeyMappingLength; ++ long haveExcludeUnencrypted; ++ long haveWEPICVErrorCount; ++ long haveWEPExcludedCount; ++ ++} nPr, *pr = &nPr; ++ ++static avList_t prList; ++ ++/**************************************************************************** ++* dot11Mac Group * ++****************************************************************************/ ++/**************************************************************************** ++* dot11OperationTable * ++****************************************************************************/ ++static struct opTbl_data { ++ ++ char UID [ OP_UID_LEN + 1 ]; // unique ID ++ char ifName [ IFNAME_LEN + 1 ]; // ifName of card ++ ++ long ifIndex; // ifindex of card ++ ++ char MACAddress [ MACADDR_LEN + 1 ]; ++ long RTSThreshold; ++ long shortRetryLimit; ++ long longRetryLimit; ++ long fragmentationThreshold; ++ long maxTransmitMSDULifetime; ++ long maxReceiveLifetime; ++ char manufacturerID [ SNMP_STR_LEN + 1 ]; ++ char productID [ SNMP_STR_LEN + 1 ]; ++ ++ long haveMACAddress; ++ long haveRTSThreshold; ++ long haveShortRetryLimit; ++ long haveLongRetryLimit; ++ long haveFragmentationThreshold; ++ long haveMaxTransmitMSDULifetime; ++ long haveMaxReceiveLifetime; ++ long haveManufacturerID; ++ long haveProductID; ++ ++} nOp, *op = &nOp; ++ ++static avList_t opList; ++ ++/**************************************************************************** ++* dot11CountersTable * ++****************************************************************************/ ++static struct coTbl_data { ++ ++ char UID [ CO_UID_LEN + 1 ]; // unique ID ++ char ifName [ IFNAME_LEN + 1 ]; // ifName of card ++ ++ long ifIndex; // ifindex of card ++ ++ unsigned long transmittedFragmentCount; ++ unsigned long multicastTransmittedFrameCount; ++ unsigned long failedCount; ++ unsigned long retryCount; ++ unsigned long multipleRetryCount; ++ unsigned long frameDuplicateCount; ++ unsigned long RTSSuccessCount; ++ unsigned long RTSFailureCount; ++ unsigned long ACKFailureCount; ++ unsigned long receivedFragmentCount; ++ unsigned long multicastReceivedFrameCount; ++ unsigned long FCSErrorCount; ++ unsigned long transmittedFrameCount; ++ unsigned long WEPUndecryptableCount; ++ ++ long haveTransmittedFragmentCount; ++ long haveMulticastTransmittedFrameCount; ++ long haveFailedCount; ++ long haveRetryCount; ++ long haveMultipleRetryCount; ++ long haveFrameDuplicateCount; ++ long haveRTSSuccessCount; ++ long haveRTSFailureCount; ++ long haveACKFailureCount; ++ long haveReceivedFragmentCount; ++ long haveMulticastReceivedFrameCount; ++ long haveFCSErrorCount; ++ long haveTransmittedFrameCount; ++ long haveWEPUndecryptableCount; ++ ++} nCo, *co = &nCo; ++ ++static avList_t coList; ++ ++/**************************************************************************** ++* dot11GroupAddressesTable * ++****************************************************************************/ ++static struct gaTbl_data { ++ ++ char UID [ GA_UID_LEN + 1 ]; ++ char ifName [ IFNAME_LEN + 1 ]; ++ ++ long ifIndex; // ifindex of card ++ long groupAddressesIndex; ++ ++ char address [ MACADDR_LEN + 1 ]; ++ long groupAddressesStatus; ++ ++ long haveAddress; ++ long haveGroupAddressesStatus; ++ ++} nGa, *ga = &nGa; ++ ++static avList_t gaList; ++ ++/**************************************************************************** ++* dot11Res Group * ++****************************************************************************/ ++static char resourceTypeIDName[] = "RTID"; ++static long haveResourceTypeIDName = 1; ++ ++/**************************************************************************** ++* dot11ResourceInfoTable * ++****************************************************************************/ ++static struct riTbl_data { ++ ++ char UID [ RI_UID_LEN + 1 ]; // unique ID ++ char ifName [ IFNAME_LEN + 1 ]; // ifName of card ++ ++ long ifIndex; // ifindex of card ++ ++ char manufacturerOUI [ MAN_OUI_LEN + 1 ]; ++ char manufacturerName [ SYS_STRING_LEN + 1 ]; ++ char manufacturerProductName [ SYS_STRING_LEN + 1 ]; ++ char manufacturerProductVersion [ SYS_STRING_LEN + 1 ]; ++ ++ char haveManufacturerOUI; ++ char haveManufacturerName; ++ char haveManufacturerProductName; ++ char haveManufacturerProductVersion; ++ ++} nRi, *ri = &nRi; ++ ++static avList_t riList; ++ ++/**************************************************************************** ++* dot11Phy Group * ++****************************************************************************/ ++/**************************************************************************** ++* dot11PhyOperationTable * ++****************************************************************************/ ++static struct poTbl_data { ++ ++ char UID [ PO_UID_LEN + 1 ]; // unique ID ++ char ifName [ IFNAME_LEN + 1 ]; // ifName of card ++ ++ long ifIndex; // ifindex of card ++ ++ long PHYType; ++ long currentRegDomain; ++ long tempType; ++ ++ long havePHYType; ++ long haveCurrentRegDomain; ++ long haveTempType; ++ ++} nPo, *po = &nPo; ++ ++static avList_t poList; ++ ++/**************************************************************************** ++* dot11PhyAntennaEntry * ++****************************************************************************/ ++static struct paTbl_data { ++ ++ char UID [ PA_UID_LEN + 1 ]; // unique ID ++ char ifName [ IFNAME_LEN + 1 ]; // ifName of card ++ ++ long ifIndex; // ifindex of card ++ ++ long currentTxAntenna; ++ long diversitySupport; ++ long currentRxAntenna; ++ ++ long haveCurrentTxAntenna; ++ long haveDiversitySupport; ++ long haveCurrentRxAntenna; ++ ++} nPa, *pa = &nPa; ++ ++static avList_t paList; ++ ++/**************************************************************************** ++* dot11PhyTxPowerTable * ++****************************************************************************/ ++static struct ptTbl_data { ++ ++ char UID [ PT_UID_LEN + 1 ]; // unique ID ++ char ifName [ IFNAME_LEN + 1 ]; // ifName of card ++ ++ long ifIndex; // ifindex of card ++ ++ long numberSupportedPowerLevels; ++ long TxPowerLevel1; ++ long TxPowerLevel2; ++ long TxPowerLevel3; ++ long TxPowerLevel4; ++ long TxPowerLevel5; ++ long TxPowerLevel6; ++ long TxPowerLevel7; ++ long TxPowerLevel8; ++ long currentTxPowerLevel; ++ ++ long haveNumberSupportedPowerLevels; ++ long haveTxPowerLevel1; ++ long haveTxPowerLevel2; ++ long haveTxPowerLevel3; ++ long haveTxPowerLevel4; ++ long haveTxPowerLevel5; ++ long haveTxPowerLevel6; ++ long haveTxPowerLevel7; ++ long haveTxPowerLevel8; ++ long haveCurrentTxPowerLevel ; ++ ++} nPt, *pt = &nPt; ++ ++static avList_t ptList; ++ ++/**************************************************************************** ++* dot11PhyFHSSTable * ++****************************************************************************/ ++static struct pfTbl_data { ++ ++ char UID [ PF_UID_LEN + 1 ]; // unique ID ++ char ifName [ IFNAME_LEN + 1 ]; // ifName of card ++ ++ long ifIndex; // ifindex of card ++ ++ long hopTime; ++ long currentChannelNumber; ++ long maxDwellTime; ++ long currentDwellTime; ++ long currentSet; ++ long currentPattern; ++ long currentIndex; ++ ++ long haveHopTime; ++ long haveCurrentChannelNumber; ++ long haveMaxDwellTime; ++ long haveCurrentDwellTime; ++ long haveCurrentSet; ++ long haveCurrentPattern; ++ long haveCurrentIndex; ++ ++} nPf, *pf = &nPf; ++ ++static avList_t pfList; ++ ++/**************************************************************************** ++* dot11PhyDSSSTable * ++****************************************************************************/ ++static struct pdTbl_data { ++ ++ char UID [ PD_UID_LEN + 1 ]; // unique ID ++ char ifName [ IFNAME_LEN + 1 ]; // ifName of card ++ ++ long ifIndex; // ifindex of card ++ ++ long currentChannel; ++ long CCAModeSupported; ++ long currentCCAMode; ++ long EDThreshold; ++ ++ long haveCurrentChannel; ++ long haveCCAModeSupported ; ++ long haveCurrentCCAMode; ++ long haveEDThreshold; ++ ++} nPd, *pd = &nPd; ++ ++static avList_t pdList; ++ ++/**************************************************************************** ++* dot11PhyIRTable * ++****************************************************************************/ ++static struct piTbl_data { ++ ++ char UID [ PI_UID_LEN + 1 ]; // unique ID ++ char ifName [ IFNAME_LEN + 1 ]; // ifName of card ++ ++ long ifIndex; // ifindex of card ++ ++ long CCAWatchdogTimerMax; ++ long CCAWatchdogCountMax; ++ long CCAWatchdogTimerMin; ++ long CCAWatchdogCountMin; ++ ++ long haveCCAWatchdogTimerMax; ++ long haveCCAWatchdogCountMax; ++ long haveCCAWatchdogTimerMin; ++ long haveCCAWatchdogCountMin; ++ ++} nPi, *pi = &nPi; ++ ++static avList_t piList; ++ ++/**************************************************************************** ++* dot11RegDomainsSupportedTable * ++****************************************************************************/ ++static struct rdTbl_data { ++ ++ char UID [ RD_UID_LEN + 1 ]; ++ char ifName [ IFNAME_LEN + 1 ]; ++ ++ long ifIndex; // ifindex of card ++ long regDomainsSupportIndex; ++ ++ long regDomainsSupportValue; ++ long haveRegDomainsSupportValue; ++ ++} nRd, *rd = &nRd; ++ ++static avList_t rdList; ++ ++/**************************************************************************** ++* dot11AntennasListTable * ++****************************************************************************/ ++static struct alTbl_data { ++ ++ char UID [ AL_UID_LEN + 1 ]; ++ char ifName [ IFNAME_LEN + 1 ]; ++ ++ long ifIndex; // ifindex of card ++ long antennaListIndex; ++ ++ long supportedTxAntenna; ++ long supportedRxAntenna; ++ long diversitySelectionRx ; ++ ++ long haveSupportedTxAntenna; ++ long haveSupportedRxAntenna; ++ long haveDiversitySelectionRx ; ++ ++} nAl, *al = &nAl; ++ ++static avList_t alList; ++ ++/**************************************************************************** ++* dot11SupportedDataRatesTxTable * ++****************************************************************************/ ++static struct rtTbl_data { ++ ++ char UID [ RT_UID_LEN + 1 ]; ++ char ifName [ IFNAME_LEN + 1 ]; ++ ++ long ifIndex; // ifindex of card ++ long supportedDataRatesTxIndex; ++ ++ long supportedDataRatesTxValue; ++ long haveSupportedDataRatesTxValue; ++ ++} nRt, *rt = &nRt; ++ ++static avList_t rtList; ++ ++/**************************************************************************** ++* dot11SupportedDataRatesRxTable * ++****************************************************************************/ ++static struct rrTbl_data { ++ ++ char UID [ RR_UID_LEN + 1 ]; ++ char ifName [ IFNAME_LEN + 1 ]; ++ ++ long ifIndex; // ifindex of card ++ long supportedDataRatesRxIndex; ++ ++ long supportedDataRatesRxValue; ++ long haveSupportedDataRatesRxValue; ++ ++} nRr, *rr = &nRr; ++ ++static avList_t rrList; ++ ++/**************************************************************************** ++* Wireless Extensions Structures * ++****************************************************************************/ ++static long wepCurrentKey; ++static long haveWepCurrentKey; ++static struct wepTbl_data { ++ ++ long len; ++ char key [ WEP_STR_LEN + 1 ]; ++ long haveKey; ++ ++} wep[4]; ++ ++/**************************************************************************** ++* * ++****************************************************************************/ ++config_require(util_funcs) ++ ++/* function prototypes */ ++ ++void init_ieee802dot11 ( void ); ++FindVarMethod var_ieee802dot11; ++FindVarMethod var_dot11StationConfigTable; ++FindVarMethod var_dot11AuthenticationAlgorithmsTable; ++FindVarMethod var_dot11WEPDefaultKeysTable; ++FindVarMethod var_dot11WEPKeyMappingsTable; ++FindVarMethod var_dot11PrivacyTable; ++FindVarMethod var_dot11OperationTable; ++FindVarMethod var_dot11CountersTable; ++FindVarMethod var_dot11GroupAddressesTable; ++FindVarMethod var_dot11ResourceInfoTable; ++FindVarMethod var_dot11PhyOperationTable; ++FindVarMethod var_dot11PhyAntennaTable; ++FindVarMethod var_dot11PhyTxPowerTable; ++FindVarMethod var_dot11PhyFHSSTable; ++FindVarMethod var_dot11PhyDSSSTable; ++FindVarMethod var_dot11PhyIRTable; ++FindVarMethod var_dot11RegDomainsSupportedTable; ++FindVarMethod var_dot11AntennasListTable; ++FindVarMethod var_dot11SupportedDataRatesTxTable; ++FindVarMethod var_dot11SupportedDataRatesRxTable; ++ ++WriteMethod write_dot11StationID; ++WriteMethod write_dot11MediumOccupancyLimit; ++WriteMethod write_dot11CFPPeriod; ++WriteMethod write_dot11CFPMaxDuration; ++WriteMethod write_dot11AuthenticationResponseTimeOut; ++WriteMethod write_dot11PowerManagementMode; ++WriteMethod write_dot11DesiredSSID; ++WriteMethod write_dot11DesiredBSSType; ++WriteMethod write_dot11OperationalRateSet; ++WriteMethod write_dot11BeaconPeriod; ++WriteMethod write_dot11DTIMPeriod; ++WriteMethod write_dot11AssociationResponseTimeOut; ++WriteMethod write_dot11AuthenticationAlgorithmsEnable; ++WriteMethod write_dot11WEPDefaultKeyValue; ++WriteMethod write_dot11WEPKeyMappingAddress; ++WriteMethod write_dot11WEPKeyMappingWEPOn; ++WriteMethod write_dot11WEPKeyMappingValue; ++WriteMethod write_dot11WEPKeyMappingStatus; ++WriteMethod write_dot11PrivacyInvoked; ++WriteMethod write_dot11WEPDefaultKeyID; ++WriteMethod write_dot11WEPKeyMappingLength; ++WriteMethod write_dot11ExcludeUnencrypted; ++WriteMethod write_dot11RTSThreshold; ++WriteMethod write_dot11ShortRetryLimit; ++WriteMethod write_dot11LongRetryLimit; ++WriteMethod write_dot11FragmentationThreshold; ++WriteMethod write_dot11MaxTransmitMSDULifetime; ++WriteMethod write_dot11MaxReceiveLifetime; ++WriteMethod write_dot11Address; ++WriteMethod write_dot11GroupAddressesStatus; ++WriteMethod write_dot11CurrentRegDomain; ++WriteMethod write_dot11CurrentTxAntenna; ++WriteMethod write_dot11CurrentRxAntenna; ++WriteMethod write_dot11CurrentTxPowerLevel; ++WriteMethod write_dot11CurrentChannelNumber; ++WriteMethod write_dot11CurrentDwellTime; ++WriteMethod write_dot11CurrentSet; ++WriteMethod write_dot11CurrentPattern; ++WriteMethod write_dot11CurrentIndex; ++WriteMethod write_dot11CurrentChannel; ++WriteMethod write_dot11CurrentCCAMode; ++WriteMethod write_dot11EDThreshold; ++WriteMethod write_dot11CCAWatchdogTimerMax; ++WriteMethod write_dot11CCAWatchdogCountMax; ++WriteMethod write_dot11CCAWatchdogTimerMin; ++WriteMethod write_dot11CCAWatchdogCountMin; ++WriteMethod write_dot11SupportedTxAntenna; ++WriteMethod write_dot11SupportedRxAntenna; ++WriteMethod write_dot11DiversitySelectionRx; ++ ++#endif /* _MIBGROUP_IEEE802DOT11_H */ +--- /dev/null ++++ b/agent/mibgroup/iwlib.h +@@ -0,0 +1,502 @@ ++/* ++ * Wireless Tools ++ * ++ * Jean II - HPLB 97->99 - HPL 99->02 ++ * ++ * Common header for the Wireless Extension library... ++ * ++ * This file is released under the GPL license. ++ * Copyright (c) 1997-2002 Jean Tourrilhes ++ */ ++ ++#ifndef IWLIB_H ++#define IWLIB_H ++ ++/*#include "CHANGELOG.h"*/ ++ ++/***************************** INCLUDES *****************************/ ++ ++/* Standard headers */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include /* gethostbyname, getnetbyname */ ++#include /* struct ether_addr */ ++#include /* struct timeval */ ++#include ++ ++/* This is our header selection. Try to hide the mess and the misery :-( ++ * Don't look, you would go blind ;-) */ ++ ++#ifndef LINUX_VERSION_CODE ++#include ++#endif ++ ++/* Kernel headers 2.4.X + Glibc 2.2 - Mandrake 8.0, Debian 2.3, RH 7.1 ++ * Kernel headers 2.2.X + Glibc 2.2 - Slackware 8.0 */ ++#if defined(__GLIBC__) \ ++ && __GLIBC__ == 2 \ ++ && __GLIBC_MINOR__ >= 2 \ ++ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) ++//#define GLIBC22_HEADERS ++#define GENERIC_HEADERS ++ ++/* Kernel headers 2.4.X + Glibc 2.1 - Debian 2.2 upgraded, RH 7.0 ++ * Kernel headers 2.2.X + Glibc 2.1 - Debian 2.2, RH 6.1 */ ++#elif defined(__GLIBC__) \ ++ && __GLIBC__ == 2 \ ++ && __GLIBC_MINOR__ == 1 \ ++ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) ++//#define GLIBC_HEADERS ++#define GENERIC_HEADERS ++ ++/* Kernel headers 2.2.X + Glibc 2.0 - Debian 2.1 */ ++#elif defined(__GLIBC__) \ ++ && __GLIBC__ == 2 \ ++ && __GLIBC_MINOR__ == 0 \ ++ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0) \ ++ && LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) ++#define GLIBC_HEADERS ++#define KLUDGE_HEADERS ++ ++/* Note : is it really worth supporting kernel 2.0.X, knowing that ++ * we require WE v9, which is only available in 2.2.X and higher ? ++ * I guess one could use 2.0.x with an upgraded wireless.h... */ ++ ++/* Kernel headers 2.0.X + Glibc 2.0 - Debian 2.0, RH 5 */ ++#elif defined(__GLIBC__) \ ++ && __GLIBC__ == 2 \ ++ && __GLIBC_MINOR__ == 0 \ ++ && LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) \ ++ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0) ++#define GLIBC_HEADERS ++ ++/* Kernel headers 2.0.X + libc5 - old systems */ ++#elif defined(_LINUX_C_LIB_VERSION_MAJOR) \ ++ && _LINUX_C_LIB_VERSION_MAJOR == 5 \ ++ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0) \ ++ && LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) ++#define LIBC5_HEADERS ++ ++/* Unsupported combination */ ++#else ++#error "Your kernel/libc combination is not supported" ++#endif ++ ++#ifdef GENERIC_HEADERS ++/* Proposed by Dr. Michael Rietz , 27.3.2 */ ++/* If this works for all, it might be more stable on the long term - Jean II */ ++#include /* For ARPHRD_ETHER */ ++#include /* For AF_INET & struct sockaddr */ ++#include /* For struct sockaddr_in */ ++#include ++#endif /* GENERIC_HEADERS */ ++ ++#ifdef GLIBC22_HEADERS ++/* Added by Ross G. Miller , 3/28/01 */ ++#include /* For ARPHRD_ETHER */ ++#include /* For AF_INET & struct sockaddr */ ++#include ++#endif /* GLIBC22_HEADERS */ ++ ++#ifdef KLUDGE_HEADERS ++#include ++#endif /* KLUDGE_HEADERS */ ++ ++#ifdef GLIBC_HEADERS ++#include /* For ARPHRD_ETHER */ ++#include /* For AF_INET & struct sockaddr */ ++#include /* For struct sockaddr_in */ ++#endif /* KLUDGE_HEADERS || GLIBC_HEADERS */ ++ ++#ifdef LIBC5_HEADERS ++#include /* For AF_INET & struct sockaddr & socket() */ ++#include /* For ARPHRD_ETHER */ ++#include /* For struct sockaddr_in */ ++#endif /* LIBC5_HEADERS */ ++ ++/* Those 3 headers were previously included in wireless.h */ ++#include /* for "caddr_t" et al */ ++#include /* for "struct sockaddr" et al */ ++#include /* for IFNAMSIZ and co... */ ++ ++#ifdef WEXT_HEADER ++/* Private copy of Wireless extensions */ ++#include WEXT_HEADER ++#else /* !WEXT_HEADER */ ++/* System wide Wireless extensions */ ++#include ++#endif /* !WEXT_HEADER */ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/****************************** DEBUG ******************************/ ++ ++ ++/************************ CONSTANTS & MACROS ************************/ ++ ++/* Paths */ ++#define PROC_NET_WIRELESS "/proc/net/wireless" ++#define PROC_NET_DEV "/proc/net/dev" ++ ++/* Some usefull constants */ ++#define KILO 1e3 ++#define MEGA 1e6 ++#define GIGA 1e9 ++/* For doing log10/exp10 without libm */ ++#define LOG10_MAGIC 1.25892541179 ++ ++/* Backward compatibility for Wireless Extension 9 */ ++#ifndef IW_POWER_MODIFIER ++#define IW_POWER_MODIFIER 0x000F /* Modify a parameter */ ++#define IW_POWER_MIN 0x0001 /* Value is a minimum */ ++#define IW_POWER_MAX 0x0002 /* Value is a maximum */ ++#define IW_POWER_RELATIVE 0x0004 /* Value is not in seconds/ms/us */ ++#endif /* IW_POWER_MODIFIER */ ++ ++#ifndef IW_ENCODE_NOKEY ++#define IW_ENCODE_NOKEY 0x0800 /* Key is write only, so not here */ ++#define IW_ENCODE_MODE 0xF000 /* Modes defined below */ ++#endif /* IW_ENCODE_NOKEY */ ++#ifndef IW_ENCODE_TEMP ++#define IW_ENCODE_TEMP 0x0400 /* Temporary key */ ++#endif /* IW_ENCODE_TEMP */ ++ ++/* More backward compatibility */ ++#ifndef SIOCSIWCOMMIT ++#define SIOCSIWCOMMIT SIOCSIWNAME ++#endif /* SIOCSIWCOMMIT */ ++ ++/****************************** TYPES ******************************/ ++ ++/* Shortcuts */ ++typedef struct iw_statistics iwstats; ++typedef struct iw_range iwrange; ++typedef struct iw_param iwparam; ++typedef struct iw_freq iwfreq; ++typedef struct iw_quality iwqual; ++typedef struct iw_priv_args iwprivargs; ++typedef struct sockaddr sockaddr; ++ ++/* Structure for storing all wireless information for each device ++ * This is pretty exhaustive... */ ++typedef struct wireless_info ++{ ++ char name[IFNAMSIZ + 1]; /* Wireless/protocol name */ ++ int has_nwid; ++ iwparam nwid; /* Network ID */ ++ int has_freq; ++ double freq; /* Frequency/channel */ ++ int has_sens; ++ iwparam sens; /* sensitivity */ ++ int has_key; ++ unsigned char key[IW_ENCODING_TOKEN_MAX]; /* Encoding key used */ ++ int key_size; /* Number of bytes */ ++ int key_flags; /* Various flags */ ++ int has_essid; ++ int essid_on; ++ char essid[IW_ESSID_MAX_SIZE + 1]; /* ESSID (extended network) */ ++ int has_nickname; ++ char nickname[IW_ESSID_MAX_SIZE + 1]; /* NickName */ ++ int has_ap_addr; ++ sockaddr ap_addr; /* Access point address */ ++ int has_bitrate; ++ iwparam bitrate; /* Bit rate in bps */ ++ int has_rts; ++ iwparam rts; /* RTS threshold in bytes */ ++ int has_frag; ++ iwparam frag; /* Fragmentation threshold in bytes */ ++ int has_mode; ++ int mode; /* Operation mode */ ++ int has_power; ++ iwparam power; /* Power management parameters */ ++ int has_txpower; ++ iwparam txpower; /* Transmit Power in dBm */ ++ int has_retry; ++ iwparam retry; /* Retry limit or lifetime */ ++ ++ /* Stats */ ++ iwstats stats; ++ int has_stats; ++ iwrange range; ++ int has_range; ++} wireless_info; ++ ++/* Structure for storing all wireless information for each device ++ * This is a cut down version of the one above, containing only ++ * the things *truly* needed to configure a card. ++ * Don't add other junk, I'll remove it... */ ++typedef struct wireless_config ++{ ++ char name[IFNAMSIZ + 1]; /* Wireless/protocol name */ ++ int has_nwid; ++ iwparam nwid; /* Network ID */ ++ int has_freq; ++ double freq; /* Frequency/channel */ ++ int has_key; ++ unsigned char key[IW_ENCODING_TOKEN_MAX]; /* Encoding key used */ ++ int key_size; /* Number of bytes */ ++ int key_flags; /* Various flags */ ++ int has_essid; ++ int essid_on; ++ char essid[IW_ESSID_MAX_SIZE + 1]; /* ESSID (extended network) */ ++ int has_mode; ++ int mode; /* Operation mode */ ++} wireless_config; ++ ++typedef struct stream_descr ++{ ++ char * end; /* End of the stream */ ++ char * current; /* Current event in stream of events */ ++ char * value; /* Current value in event */ ++} stream_descr; ++ ++/* Prototype for handling display of each single interface on the ++ * system - see iw_enum_devices() */ ++typedef int (*iw_enum_handler)(int skfd, ++ char * ifname, ++ char * args[], ++ int count); ++ ++/**************************** PROTOTYPES ****************************/ ++/* ++ * All the functions in iwcommon.c ++ */ ++ ++/* ---------------------- SOCKET SUBROUTINES -----------------------*/ ++int ++ iw_sockets_open(void); ++void ++ iw_enum_devices(int skfd, ++ iw_enum_handler fn, ++ char * args[], ++ int count); ++/* --------------------- WIRELESS SUBROUTINES ----------------------*/ ++int ++ iw_get_range_info(int skfd, ++ char * ifname, ++ iwrange * range); ++int ++ iw_print_version_info(char * toolname); ++int ++ iw_get_priv_info(int skfd, ++ char * ifname, ++ iwprivargs * priv, ++ int maxpriv); ++int ++ iw_get_basic_config(int skfd, ++ char * ifname, ++ wireless_config * info); ++int ++ iw_set_basic_config(int skfd, ++ char * ifname, ++ wireless_config * info); ++/* --------------------- PROTOCOL SUBROUTINES --------------------- */ ++int ++ iw_protocol_compare(char * protocol1, ++ char * protocol2); ++/* -------------------- FREQUENCY SUBROUTINES --------------------- */ ++void ++ iw_float2freq(double in, ++ iwfreq * out); ++double ++ iw_freq2float(iwfreq * in); ++void ++ iw_print_freq(char * buffer, ++ double freq); ++int ++ iw_freq_to_channel(double freq, ++ struct iw_range * range); ++void ++ iw_print_bitrate(char * buffer, ++ int bitrate); ++/* ---------------------- POWER SUBROUTINES ----------------------- */ ++int ++ iw_dbm2mwatt(int in); ++int ++ iw_mwatt2dbm(int in); ++/* -------------------- STATISTICS SUBROUTINES -------------------- */ ++int ++ iw_get_stats(int skfd, ++ char * ifname, ++ iwstats * stats); ++void ++ iw_print_stats(char * buffer, ++ iwqual * qual, ++ iwrange * range, ++ int has_range); ++/* --------------------- ENCODING SUBROUTINES --------------------- */ ++void ++ iw_print_key(char * buffer, ++ unsigned char * key, ++ int key_size, ++ int key_flags); ++int ++ iw_in_key(char * input, ++ unsigned char * key); ++int ++ iw_in_key_full(int skfd, ++ char * ifname, ++ char * input, ++ unsigned char * key, ++ __u16 * flags); ++/* ----------------- POWER MANAGEMENT SUBROUTINES ----------------- */ ++void ++ iw_print_pm_value(char * buffer, ++ int value, ++ int flags); ++void ++ iw_print_pm_mode(char * buffer, ++ int flags); ++/* --------------- RETRY LIMIT/LIFETIME SUBROUTINES --------------- */ ++#if WIRELESS_EXT > 10 ++void ++ iw_print_retry_value(char * buffer, ++ int value, ++ int flags); ++#endif ++/* ----------------------- TIME SUBROUTINES ----------------------- */ ++void ++ iw_print_timeval(char * buffer, ++ const struct timeval * time); ++/* --------------------- ADDRESS SUBROUTINES ---------------------- */ ++int ++ iw_check_mac_addr_type(int skfd, ++ char * ifname); ++int ++ iw_check_if_addr_type(int skfd, ++ char * ifname); ++#if 0 ++int ++ iw_check_addr_type(int skfd, ++ char * ifname); ++#endif ++void ++ iw_ether_ntop(const struct ether_addr* eth, char* buf); ++char* ++ iw_ether_ntoa(const struct ether_addr* eth); ++int ++ iw_ether_aton(const char* bufp, struct ether_addr* eth); ++int ++ iw_in_inet(char *bufp, struct sockaddr *sap); ++int ++ iw_in_addr(int skfd, ++ char * ifname, ++ char * bufp, ++ struct sockaddr * sap); ++/* ----------------------- MISC SUBROUTINES ------------------------ */ ++int ++ iw_get_priv_size(int args); ++ ++#if WIRELESS_EXT > 13 ++/* ---------------------- EVENT SUBROUTINES ---------------------- */ ++void ++ iw_init_event_stream(struct stream_descr * stream, ++ char * data, ++ int len); ++int ++ iw_extract_event_stream(struct stream_descr * stream, ++ struct iw_event * iwe); ++#endif /* WIRELESS_EXT > 13 */ ++ ++/**************************** VARIABLES ****************************/ ++ ++extern const char * const iw_operation_mode[]; ++#define IW_NUM_OPER_MODE 7 ++ ++/************************* INLINE FUNTIONS *************************/ ++/* ++ * Functions that are so simple that it's more efficient inlining them ++ */ ++ ++/* ++ * Note : I've defined wrapper for the ioctl request so that ++ * it will be easier to migrate to other kernel API if needed ++ */ ++ ++/*------------------------------------------------------------------*/ ++/* ++ * Wrapper to push some Wireless Parameter in the driver ++ */ ++static inline int ++iw_set_ext(int skfd, /* Socket to the kernel */ ++ char * ifname, /* Device name */ ++ int request, /* WE ID */ ++ struct iwreq * pwrq) /* Fixed part of the request */ ++{ ++ /* Set device name */ ++ strncpy(pwrq->ifr_name, ifname, IFNAMSIZ); ++ /* Do the request */ ++ return(ioctl(skfd, request, pwrq)); ++} ++ ++/*------------------------------------------------------------------*/ ++/* ++ * Wrapper to extract some Wireless Parameter out of the driver ++ */ ++static inline int ++iw_get_ext(int skfd, /* Socket to the kernel */ ++ char * ifname, /* Device name */ ++ int request, /* WE ID */ ++ struct iwreq * pwrq) /* Fixed part of the request */ ++{ ++ /* Set device name */ ++ strncpy(pwrq->ifr_name, ifname, IFNAMSIZ); ++ /* Do the request */ ++ return(ioctl(skfd, request, pwrq)); ++} ++ ++/*------------------------------------------------------------------*/ ++/* Backwards compatability ++ * Actually, those form are much easier to use when dealing with ++ * struct sockaddr... */ ++static inline char* ++iw_pr_ether(char* bufp, const unsigned char* addr) ++{ ++ iw_ether_ntop((const struct ether_addr *) addr, bufp); ++ return bufp; ++} ++/* Backwards compatability */ ++static inline int ++iw_in_ether(const char *bufp, struct sockaddr *sap) ++{ ++ sap->sa_family = ARPHRD_ETHER; ++ return iw_ether_aton(bufp, (struct ether_addr *) sap->sa_data) ? 0 : -1; ++} ++ ++/*------------------------------------------------------------------*/ ++/* ++ * Create an Ethernet broadcast address ++ */ ++static inline void ++iw_broad_ether(struct sockaddr *sap) ++{ ++ sap->sa_family = ARPHRD_ETHER; ++ memset((char *) sap->sa_data, 0xFF, ETH_ALEN); ++} ++ ++/*------------------------------------------------------------------*/ ++/* ++ * Create an Ethernet NULL address ++ */ ++static inline void ++iw_null_ether(struct sockaddr *sap) ++{ ++ sap->sa_family = ARPHRD_ETHER; ++ memset((char *) sap->sa_data, 0x00, ETH_ALEN); ++} ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* IWLIB_H */ diff --git a/net/net-tools/Makefile b/net/net-tools/Makefile new file mode 100644 index 0000000..e7fb1b1 --- /dev/null +++ b/net/net-tools/Makefile @@ -0,0 +1,323 @@ +# +# Copyright (C) 2006 - 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=net-tools +PKG_VERSION:=1.60 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.tazenda.demon.co.uk/phil/net-tools/ +PKG_MD5SUM:=888774accab40217dde927e21979c165 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/net-tools-arp + SECTION:=net + CATEGORY:=Network + TITLE:=net-tools - arp + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-arp/description + Program arp from net-tools. Manipulate kernel's ARP cache. + Add, delete an entry, or to dump the entire cache. +endef + +define Package/net-tools-dnsdomainname + SECTION:=net + CATEGORY:=Network + DEPENDS += net-tools-hostname + TITLE:=net-tools - dnsdomainname + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-dnsdomainname/description + Program dnsdomainname from net-tools. + Reports the system's DNS domain name. +endef + +define Package/net-tools-domainname + SECTION:=net + CATEGORY:=Network + DEPENDS += net-tools-hostname + TITLE:=net-tools - domainname + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-domainname/description + Program domainname from net-tools. + Reports the system's NIS/YP domain name. +endef + +define Package/net-tools-hostname + SECTION:=net + CATEGORY:=Network + TITLE:=net-tools - hostname + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-hostname/description + Program hostname from net-tools. + Reports or sets the name of the current host system. +endef + +define Package/net-tools-ifconfig + SECTION:=net + CATEGORY:=Network + TITLE:=net-tools - ifconfig + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-ifconfig/description + Program ifconfig from net-tools. + Configure network interfaces. +endef + +define Package/net-tools-ipmaddr + SECTION:=net + CATEGORY:=Network + TITLE:=net-tools - ipmaddr + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-ipmaddr/description + Program ipmaddr from net-tools. Adds, + deletes and shows an interface's multicast addresses. +endef + +define Package/net-tools-iptunnel + SECTION:=net + CATEGORY:=Network + TITLE:=net-tools - iptunnel + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-iptunnel/description + Program iptunnel from net-tools. + Adds, changes, deletes and shows an interface's tunnels. +endef + +define Package/net-tools-mii-tool + SECTION:=net + CATEGORY:=Network + TITLE:=net-tools - mii-tool + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-mii-tool/description + Program mii-tool from net-tools. Checks or sets + the status of a network interface's Media Independent + Interface (MII) unit. +endef + +define Package/net-tools-nameif + SECTION:=net + CATEGORY:=Network + TITLE:=net-tools - nameif + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-nameif/description + Program nameif from net-tools + Trivial File Transfer Protocol server. +endef + +define Package/net-tools-netstat + SECTION:=net + CATEGORY:=Network + TITLE:=net-tools - netstat + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-netstat/description + Program netstat from net-tools. Report network + connections, routing tables, and interface statistics. +endef + +define Package/net-tools-nisdomainname + SECTION:=net + CATEGORY:=Network + DEPENDS += net-tools-hostname + TITLE:=net-tools - nisdomainname + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-nisdomainname/description + Program nisdomainname from net-tools. + Same as domainname. +endef + +define Package/net-tools-plipconfig + SECTION:=net + CATEGORY:=Network + TITLE:=net-tools - plipconfig + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-plipconfig/description + Program plipconfig from net-tools. Fine tune the + PLIP device parameters, to improve its performance. +endef + +define Package/net-tools-rarp + SECTION:=net + CATEGORY:=Network + TITLE:=net-tools - rarp + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-rarp/description + Program rarp from net-tools. + Manipulate the kernel's RARP table. +endef + +define Package/net-tools-route + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + TITLE:=net-tools - route + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-route/description + Program route from net-tools. + Manipulate the IP routing table. +endef + +define Package/net-tools-slattach + SECTION:=net + CATEGORY:=Network + TITLE:=net-tools - slattach + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-slattach/description + Program slattach from net-tools. Attaches a + network interface to a serial line. This allows + to use normal terminal lines for point-to-point + links to other computers. +endef + +define Package/net-tools-ypdomainname + SECTION:=net + CATEGORY:=Network + DEPENDS += net-tools-hostname + TITLE:=net-tools - ypdomainname + URL:=http://www.tazenda.demon.co.uk/phil/net-tools +endef + +define Package/net-tools-ypdomainname/description + Program route from net-tools. + Same as domainname. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + COPTS="$(TARGET_CFLAGS)" +endef + +define Package/net-tools-arp/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/arp $(1)/usr/bin/ +endef + +define Package/net-tools-dnsdomainname/install + $(INSTALL_DIR) $(1)/usr/bin + ln -sf hostname $(1)/usr/bin/dnsdomainname +endef + +define Package/net-tools-domainname/install + $(INSTALL_DIR) $(1)/usr/bin + ln -sf hostname $(1)/usr/bin/domainname +endef + +define Package/net-tools-hostname/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostname $(1)/usr/bin/ +endef + +define Package/net-tools-ifconfig/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ifconfig $(1)/usr/sbin/ +endef + +define Package/net-tools-ipmaddr/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipmaddr $(1)/usr/bin/ +endef + +define Package/net-tools-iptunnel/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/iptunnel $(1)/usr/bin/ +endef + +define Package/net-tools-mii-tool/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mii-tool $(1)/usr/bin/ +endef + +define Package/net-tools-nameif/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/nameif $(1)/usr/bin/ +endef + +define Package/net-tools-netstat/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/netstat $(1)/usr/bin/ +endef + +define Package/net-tools-nisdomainname/install + $(INSTALL_DIR) $(1)/usr/bin + ln -sf hostname $(1)/usr/bin/nisdomainname +endef + +define Package/net-tools-plipconfig/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/plipconfig $(1)/usr/bin/ +endef + +define Package/net-tools-rarp/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/rarp $(1)/usr/bin/ +endef + +define Package/net-tools-route/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/route $(1)/usr/bin/ +endef + +define Package/net-tools-slattach/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/slattach $(1)/usr/bin/ +endef + +define Package/net-tools-ypdomainname/install + $(INSTALL_DIR) $(1)/usr/bin + ln -sf hostname $(1)/usr/bin/ypdomainname +endef + +$(eval $(call BuildPackage,net-tools-arp)) +$(eval $(call BuildPackage,net-tools-hostname)) +$(eval $(call BuildPackage,net-tools-dnsdomainname)) +$(eval $(call BuildPackage,net-tools-domainname)) +$(eval $(call BuildPackage,net-tools-ifconfig)) +$(eval $(call BuildPackage,net-tools-ipmaddr)) +$(eval $(call BuildPackage,net-tools-iptunnel)) +$(eval $(call BuildPackage,net-tools-mii-tool)) +$(eval $(call BuildPackage,net-tools-nameif)) +$(eval $(call BuildPackage,net-tools-netstat)) +$(eval $(call BuildPackage,net-tools-nisdomainname)) +$(eval $(call BuildPackage,net-tools-plipconfig)) +$(eval $(call BuildPackage,net-tools-rarp)) +$(eval $(call BuildPackage,net-tools-route)) +$(eval $(call BuildPackage,net-tools-slattach)) +$(eval $(call BuildPackage,net-tools-ypdomainname)) diff --git a/net/net-tools/patches/001-config.patch b/net/net-tools/patches/001-config.patch new file mode 100644 index 0000000..04760fb --- /dev/null +++ b/net/net-tools/patches/001-config.patch @@ -0,0 +1,209 @@ +--- /dev/null 2006-11-02 13:38:16.000000000 +0100 ++++ net-tools-1.60.works/config.make 2007-01-14 04:43:34.000000000 +0100 +@@ -0,0 +1,35 @@ ++# I18N=0 ++HAVE_AFUNIX=1 ++HAVE_AFINET=1 ++HAVE_AFINET6=1 ++# HAVE_AFIPX=0 ++# HAVE_AFATALK=0 ++# HAVE_AFAX25=0 ++# HAVE_AFNETROM=0 ++# HAVE_AFROSE=0 ++# HAVE_AFX25=0 ++# HAVE_AFECONET=0 ++# HAVE_AFDECnet=0 ++# HAVE_AFASH=0 ++HAVE_HWETHER=1 ++# HAVE_HWARC=0 ++# HAVE_HWSLIP=0 ++HAVE_HWPPP=1 ++HAVE_HWTUNNEL=1 ++# HAVE_HWSTRIP=0 ++# HAVE_HWTR=0 ++# HAVE_HWAX25=0 ++# HAVE_HWROSE=0 ++# HAVE_HWNETROM=0 ++# HAVE_HWX25=0 ++# HAVE_HWFR=0 ++# HAVE_HWSIT=0 ++# HAVE_HWFDDI=0 ++# HAVE_HWHIPPI=0 ++# HAVE_HWASH=0 ++# HAVE_HWHDLCLAPB=0 ++# HAVE_HWIRDA=0 ++# HAVE_HWEC=0 ++HAVE_FW_MASQUERADE=1 ++HAVE_IP_TOOLS=1 ++HAVE_MII=1 +--- /dev/null 2006-11-02 13:38:16.000000000 +0100 ++++ net-tools-1.60.works/config.status 2007-01-14 04:43:34.000000000 +0100 +@@ -0,0 +1,91 @@ ++# ++# config.in Configure.sh source for the net-tools. ++# This file contains the definition of what the support ++# library contains. Most of all, it defines which types ++# of address families and hardware we know of. ++# ++# NET-TOOLS A collection of programs that form the base set of the ++# NET-3 Networking Distribution for the LINUX operating ++# system. ++# ++# Version: config.in 1.22 (99-04-19) ++# ++# Author: Fred N. van Kempen, ++# Copyright 1988-1993 MicroWalt Corporation ++# ++# Bernd 'eckes' Eckenfels ++# Arnaldo Carvalho de Melo ++# GNU gettext - I18N ++# ++# 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. ++# ++= /* ++= * config.h Automatically generated configuration includefile ++= * ++= * NET-TOOLS A collection of programs that form the base set of the ++= * NET-3 Networking Distribution for the LINUX operating ++= * system. ++= * ++= * DO NOT EDIT DIRECTLY ++= * ++= */ ++* ++* ++* Internationalization ++* ++* The net-tools package has currently been translated to French, ++* German and Brazilian Portugese. Other translations are, of ++* course, welcome. Answer `n' here if you have no support for ++* internationalization on your system. ++* ++bool 'Does your system support GNU gettext?' I18N n ++* ++* ++* Protocol Families. ++* ++bool 'UNIX protocol family' HAVE_AFUNIX y ++bool 'INET (TCP/IP) protocol family' HAVE_AFINET y ++bool 'INET6 (IPv6) protocol family' HAVE_AFINET6 n ++bool 'Novell IPX/SPX protocol family' HAVE_AFIPX n ++bool 'Appletalk DDP protocol family' HAVE_AFATALK n ++bool 'AX25 (packet radio) protocol family' HAVE_AFAX25 n ++bool 'NET/ROM (packet radio) protocol family' HAVE_AFNETROM n ++bool 'Rose (packet radio) protocol family' HAVE_AFROSE n ++bool 'X.25 (CCITT) protocol family' HAVE_AFX25 n ++bool 'Econet protocol family' HAVE_AFECONET n ++bool 'DECnet protocol family' HAVE_AFDECnet n ++bool 'Ash protocol family' HAVE_AFASH n ++* ++* ++* Device Hardware types. ++* ++bool 'Ethernet (generic) support' HAVE_HWETHER y ++bool 'ARCnet support' HAVE_HWARC n ++bool 'SLIP (serial line) support' HAVE_HWSLIP n ++bool 'PPP (serial line) support' HAVE_HWPPP y ++bool 'IPIP Tunnel support' HAVE_HWTUNNEL y ++bool 'STRIP (Metricom radio) support' HAVE_HWSTRIP n ++bool 'Token ring (generic) support' HAVE_HWTR n ++bool 'AX25 (packet radio) support' HAVE_HWAX25 n ++bool 'Rose (packet radio) support' HAVE_HWROSE n ++bool 'NET/ROM (packet radio) support' HAVE_HWNETROM n ++bool 'X.25 (generic) support' HAVE_HWX25 n ++bool 'DLCI/FRAD (frame relay) support' HAVE_HWFR n ++bool 'SIT (IPv6-in-IPv4) support' HAVE_HWSIT n ++bool 'FDDI (generic) support' HAVE_HWFDDI n ++bool 'HIPPI (generic) support' HAVE_HWHIPPI n ++bool 'Ash hardware support' HAVE_HWASH n ++bool '(Cisco)-HDLC/LAPB support' HAVE_HWHDLCLAPB n ++bool 'IrDA support' HAVE_HWIRDA n ++bool 'Econet hardware support' HAVE_HWEC n ++* ++* ++* Other Features. ++* ++bool 'IP Masquerading support' HAVE_FW_MASQUERADE y ++bool 'Build iptunnel and ipmaddr' HAVE_IP_TOOLS y ++bool 'Build mii-tool' HAVE_MII y +--- /dev/null 2006-11-02 13:38:16.000000000 +0100 ++++ net-tools-1.60.works/config.h 2007-01-14 04:43:34.000000000 +0100 +@@ -0,0 +1,74 @@ ++/* ++* config.h Automatically generated configuration includefile ++* ++* NET-TOOLS A collection of programs that form the base set of the ++* NET-3 Networking Distribution for the LINUX operating ++* system. ++* ++* DO NOT EDIT DIRECTLY ++* ++*/ ++ ++/* ++ * ++ * Internationalization ++ * ++ * The net-tools package has currently been translated to French, ++ * German and Brazilian Portugese. Other translations are, of ++ * course, welcome. Answer `n' here if you have no support for ++ * internationalization on your system. ++ * ++ */ ++#define I18N 0 ++ ++/* ++ * ++ * Protocol Families. ++ * ++ */ ++#define HAVE_AFUNIX 1 ++#define HAVE_AFINET 1 ++#define HAVE_AFINET6 1 ++#define HAVE_AFIPX 0 ++#define HAVE_AFATALK 0 ++#define HAVE_AFAX25 0 ++#define HAVE_AFNETROM 0 ++#define HAVE_AFROSE 0 ++#define HAVE_AFX25 0 ++#define HAVE_AFECONET 0 ++#define HAVE_AFDECnet 0 ++#define HAVE_AFASH 0 ++ ++/* ++ * ++ * Device Hardware types. ++ * ++ */ ++#define HAVE_HWETHER 1 ++#define HAVE_HWARC 0 ++#define HAVE_HWSLIP 0 ++#define HAVE_HWPPP 1 ++#define HAVE_HWTUNNEL 1 ++#define HAVE_HWSTRIP 0 ++#define HAVE_HWTR 0 ++#define HAVE_HWAX25 0 ++#define HAVE_HWROSE 0 ++#define HAVE_HWNETROM 0 ++#define HAVE_HWX25 0 ++#define HAVE_HWFR 0 ++#define HAVE_HWSIT 0 ++#define HAVE_HWFDDI 0 ++#define HAVE_HWHIPPI 0 ++#define HAVE_HWASH 0 ++#define HAVE_HWHDLCLAPB 0 ++#define HAVE_HWIRDA 0 ++#define HAVE_HWEC 0 ++ ++/* ++ * ++ * Other Features. ++ * ++ */ ++#define HAVE_FW_MASQUERADE 1 ++#define HAVE_IP_TOOLS 1 ++#define HAVE_MII 1 diff --git a/net/net-tools/patches/002-compile-fixes.patch b/net/net-tools/patches/002-compile-fixes.patch new file mode 100644 index 0000000..a72bf3e --- /dev/null +++ b/net/net-tools/patches/002-compile-fixes.patch @@ -0,0 +1,74 @@ +--- net-tools-1.60/lib/inet_sr.c 2000-02-20 22:46:45.000000000 +0100 ++++ net-tools-1.60.works/lib/inet_sr.c 2007-01-14 04:44:40.000000000 +0100 +@@ -105,6 +105,7 @@ + case 2: + isnet = 0; break; + default: ++ break; + } + + /* Fill in the other fields. */ +--- net-tools-1.60/hostname.c 2001-04-08 19:04:23.000000000 +0200 ++++ net-tools-1.60.works/hostname.c 2007-01-14 04:46:09.000000000 +0100 +@@ -98,6 +98,7 @@ + fprintf(stderr, _("%s: name too long\n"), program_name); + break; + default: ++ break; + } + exit(1); + }; +@@ -117,6 +118,7 @@ + fprintf(stderr, _("%s: name too long\n"), program_name); + break; + default: ++ break; + } + exit(1); + }; +@@ -174,6 +176,7 @@ + printf("%s\n", hp->h_name); + break; + default: ++ break; + } + } + +@@ -330,7 +333,7 @@ + case 'h': + default: + usage(); +- ++ break; + }; + + +--- net-tools-1.60/mii-tool.c 2000-05-21 16:31:17.000000000 +0200 ++++ net-tools-1.60.works/mii-tool.c 2007-01-14 04:47:42.000000000 +0100 +@@ -379,16 +379,16 @@ + /*--------------------------------------------------------------------*/ + + const char *usage = +-"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...] +- -V, --version display version information +- -v, --verbose more verbose output +- -R, --reset reset MII to poweron state +- -r, --restart restart autonegotiation +- -w, --watch monitor for link status changes +- -l, --log with -w, write events to syslog +- -A, --advertise=media,... advertise only specified media +- -F, --force=media force specified media technology +-media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, ++"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n\ ++ -V, --version display version information\n\ ++ -v, --verbose more verbose output\n\ ++ -R, --reset reset MII to poweron state\n\ ++ -r, --restart restart autonegotiation\n\ ++ -w, --watch monitor for link status changes\n\ ++ -l, --log with -w, write events to syslog\n\ ++ -A, --advertise=media,... advertise only specified media\n\ ++ -F, --force=media force specified media technology\n\ ++media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n\ + (to advertise both HD and FD) 100baseTx, 10baseT\n"; + + int main(int argc, char **argv) diff --git a/net/netatalk/Makefile b/net/netatalk/Makefile new file mode 100644 index 0000000..b1a4613 --- /dev/null +++ b/net/netatalk/Makefile @@ -0,0 +1,75 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=netatalk +PKG_VERSION:=2.1.3 +PKG_RELEASE:=1 +PKG_SOURCE:=netatalk-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/netatalk/ +PKG_BUILD_PARALLEL:=1 +PKG_MD5SUM:=785e287f5b5e5c9cce9397f9bce02a22 + +include $(INCLUDE_DIR)/package.mk + +define Package/netatalk + SECTION:=net + CATEGORY:=Network + SUBMENU:=Filesystem + DEPENDS:=+libdb47 +libgcrypt +libopenssl $(LIBRPC_DEPENDS) + TITLE:=netatalk + URL:=http://netatalk.sourceforge.net + MAINTAINER:=W. Michael Petullo +endef + +define Package/netatalk/decription + Netatalk is a freely-available Open Source AFP fileserver. + It also provides a kernel level implementation of the AppleTalk + Protocol Suite. +endef + +EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include +TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include +TARGET_LDFLAGS += $(LIBRPC) + +CONFIGURE_VARS += \ + CFLAGS="$(TARGET_CFLAGS) -std=gnu99 -DNO_DEBUG " + +CONFIGURE_ARGS += \ + --disable-afs \ + --enable-hfs \ + --disable-debugging \ + --disable-shell-check \ + --disable-timelord \ + --disable-a2boot \ + --disable-cups \ + --disable-tcp-wrappers \ + --with-cnid-default-backend=dbd \ + --with-bdb="$(STAGING_DIR)/usr/" \ + --with-libgcrypt-dir="$(STAGING_DIR)/usr" \ + --with-ssl-dir="$(STAGING_DIR)/usr" \ + --with-uams-path="/usr/lib/uams" \ + --disable-admin-group \ + --disable-srvloc \ + +define Package/netatalk/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/uams/ + $(INSTALL_DIR) $(1)/etc/netatalk/ + $(INSTALL_DIR) $(1)/etc/init.d/ + $(CP) $(PKG_BUILD_DIR)/etc/afpd/afpd $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/bin/afppasswd/afppasswd $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/etc/cnid_dbd/cnid_dbd $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/etc/cnid_dbd/cnid_metad $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/etc/uams/.libs/*.so $(1)/usr/lib/uams/ + $(CP) ./files/AppleVolumes.* $(1)/etc/netatalk/ + $(INSTALL_CONF) ./files/afpd.conf $(1)/etc/netatalk/ + $(INSTALL_BIN) ./files/afpd.init $(1)/etc/init.d/afpd +endef + +$(eval $(call BuildPackage,netatalk)) diff --git a/net/netatalk/files/AppleVolumes.default b/net/netatalk/files/AppleVolumes.default new file mode 100644 index 0000000..5835163 --- /dev/null +++ b/net/netatalk/files/AppleVolumes.default @@ -0,0 +1,2 @@ +- +/tmp Temp allow:root,nobody cnidscheme:dbd diff --git a/net/netatalk/files/AppleVolumes.system b/net/netatalk/files/AppleVolumes.system new file mode 100644 index 0000000..d75e4c9 --- /dev/null +++ b/net/netatalk/files/AppleVolumes.system @@ -0,0 +1,326 @@ +# ($Id) +### +### Delete a '#' character at the head of line if you need. +### If clients are Mac OS X only, it is not especially necessary. +### However, it might be useful for Mac OS 9 or earlier. +### +### Use at your own risk. No guarantees express or implied. +### +### Try to use MacPerl script 'ICDumpSuffixMap' included in /usr/doc +### to download file mapping list from your Internet Config Preference. +### +### inoue@ma.ns.musashi-tech.ac.jp. +### + +### default translation -- note that CR <-> LF translation is done on all +### files of type TEXT (if crlf is set in volume's options). +### The first line turns off translation for files of unknown type, +### the third turns this translation on. +###. "????" "????" Unix Binary Unix application/octet-stream +###. "BINA" "UNIX" Unix Binary Unix application/octet-stream +###. "TEXT" "ttxt" ASCII Text SimpleText text/plain + +#.1st "TEXT" "ttxt" Text Readme SimpleText application/text +#.669 "6669" "SNPL" 669 MOD Music PlayerPro +#.8med "STrk" "SCPL" Amiga OctaMed music SoundApp +#.8svx "8SVX" "SCPL" Amiga 8-bit sound SoundApp +#.a "TEXT" "ttxt" Assembly Source SimpleText +#.aif "AIFF" "SCPL" AIFF Sound SoundApp audio/x-aiff +#.aifc "AIFC" "SCPL" AIFF Sound Compressed SoundApp audio/x-aiff +#.aiff "AIFF" "SCPL" AIFF Sound SoundApp audio/x-aiff +#.al "ALAW" "SCPL" ALAW Sound SoundApp +#.ani "ANIi" "GKON" Animated NeoChrome GraphicConverter +#.apd "TEXT" "ALD3" Aldus Printer Description Aldus PageMaker +#.arc "mArc" "SITx" PC ARChive StuffIt Expander +#.arj "BINA" "DArj" ARJ Archive DeArj +#.arr "ARR " "GKON" Amber ARR image GraphicConverter +#.art "ART " "GKON" First Publisher GraphicConverter +#.asc "TEXT" "ttxt" ASCII Text SimpleText text/plain +#.ascii "TEXT" "ttxt" ASCII Text SimpleText text/plain +#.asf "ASF_" "Ms01" Netshow Player Netshow Server video/x-ms-asf +#.asm "TEXT" "ttxt" Assembly Source SimpleText +#.asx "ASX_" "Ms01" Netshow Player Netshow Server video/x-ms-asf +#.au "ULAW" "TVOD" Sun Sound QuickTime Player audio/basic +#.avi "VfW " "TVOD" AVI Movie QuickTime Player video/avi +#.bar "BARF" "S691" Unix BAR Archive SunTar +#.bas "TEXT" "ttxt" BASIC Source SimpleText +#.bat "TEXT" "ttxt" MS-DOS Batch File SimpleText +#.bga "BMPp" "ogle" OS/2 Bitmap PictureViewer +#.bib "TEXT" "ttxt" BibTex Bibliography SimpleText +#.bin "SIT!" "SITx" MacBinary StuffIt Expander application/macbinary +#.binary "BINA" "hDmp" Untyped Binary Data HexEdit application/octet-stream +#.bmp "BMPp" "ogle" Windows Bitmap PictureViewer +#.boo "TEXT" "ttxt" BOO encoded SimpleText +#.bst "TEXT" "ttxt" BibTex Style SimpleText +#.bw "SGI " "GKON" SGI Image GraphicConverter +#.c "TEXT" "CWIE" C Source CodeWarrior +#.cgm "CGMm" "GKON" Computer Graphics Meta GraphicConverter +#.class "Clss" "CWIE" Java Class File CodeWarrior +#.clp "CLPp" "GKON" Windows Clipboard GraphicConverter +#.cmd "TEXT" "ttxt" OS/2 Batch File SimpleText +#.com "PCFA" "SWIN" MS-DOS Executable SoftWindows +#.cp "TEXT" "CWIE" C++ Source CodeWarrior +#.cpp "TEXT" "CWIE" C++ Source CodeWarrior +#.cpt "PACT" "SITx" Compact Pro Archive StuffIt Expander +#.csv "TEXT" "XCEL" Comma Separated Vars Excel +#.ct "..CT" "GKON" Scitex-CT GraphicConverter +#.cut "Halo" "GKON" Dr Halo Image GraphicConverter +#.cvs "drw2" "DAD2" Canvas Drawing Canvas +#.dbf "COMP" "FOX+" DBase Document FoxBase+ +#.dcx "DCXx" "GKON" Some PCX Images GraphicConverter +#.dif "TEXT" "XCEL" Data Interchange Format Excel +#.diz "TEXT" "R*Ch" BBS Descriptive Text BBEdit +#.dl "DL " "AnVw" DL Animation MacAnim Viewer +#.dll "PCFL" "SWIN" Windows DLL SoftWindows +#.doc "WDBN" "MSWD" Word Document Microsoft Word application/msword +#.dot "sDBN" "MSWD" Word for Windows Template Microsoft Word +#.dvi "ODVI" "xdvi" TeX DVI Document xdvi application/x-dvi +#.dwt "TEXT" "DmWr" Dreamweaver Template Dreamweaver +#.dxf "TEXT" "SWVL" AutoCAD 3D Data Swivel Pro +#.eps "EPSF" "vgrd" Postscript LaserWriter 8 application/postscript +#.epsf "EPSF" "vgrd" Postscript LaserWriter 8 application/postscript +#.etx "TEXT" "ezVu" SEText Easy View text/x-setext +#.evy "EVYD" "ENVY" Envoy Document Envoy +#.exe "PCFA" "SWIN" MS-DOS Executable SoftWindows +#.faq "TEXT" "ttxt" ASCII Text SimpleText text/x-usenet-faq +#.fit "FITS" "GKON" Flexible Image Transport GraphicConverter image/x-fits +#.flc "FLI " "TVOD" FLIC Animation QuickTime Player +#.fli "FLI " "TVOD" FLI Animation QuickTime Player +#.fm "FMPR" "FMPR" FileMaker Pro Database FileMaker Pro +#.for "TEXT" "MPS " Fortran Source MPW Shell +#.fts "FITS" "GKON" Flexible Image Transport GraphicConverter +#.gem "GEM-" "GKON" GEM Metafile GraphicConverter +#.gif "GIFf" "ogle" GIF Picture PictureViewer image/gif +#.gl "GL " "AnVw" GL Animation MacAnim Viewer +#.grp "GRPp" "GKON" GRP Image GraphicConverter +#.gz "SIT!" "SITx" Gnu ZIP Archive StuffIt Expander application/x-gzip +#.h "TEXT" "CWIE" C Include File CodeWarrior +#.hcom "FSSD" "SCPL" SoundEdit Sound ex SOX SoundApp +#.hp "TEXT" "CWIE" C Include File CodeWarrior +#.hpgl "HPGL" "GKON" HP GL/2 GraphicConverter +#.hpp "TEXT" "CWIE" C Include File CodeWarrior +#.hqx "TEXT" "SITx" BinHex StuffIt Expander application/mac-binhex40 +#.htm "TEXT" "MOSS" HyperText Netscape Communicator text/html +#.html "TEXT" "MOSS" HyperText Netscape Communicator text/html +#.i3 "TEXT" "R*ch" Modula 3 Interface BBEdit +#.ic1 "IMAG" "GKON" Atari Image GraphicConverter +#.ic2 "IMAG" "GKON" Atari Image GraphicConverter +#.ic3 "IMAG" "GKON" Atari Image GraphicConverter +#.icn "ICO " "GKON" Windows Icon GraphicConverter +#.ico "ICO " "GKON" Windows Icon GraphicConverter +#.ief "IEF " "GKON" IEF image GraphicConverter image/ief +#.iff "ILBM" "GKON" Amiga IFF Image GraphicConverter +#.ilbm "ILBM" "GKON" Amiga ILBM Image GraphicConverter +#.image "dImg" "ddsk" Apple DiskCopy Image Disk Copy +#.img "IMGg" "GKON" GEM bit image/XIMG GraphicConverter +#.ini "TEXT" "ttxt" Windows INI File SimpleText +#.java "TEXT" "CWIE" Java Source File CodeWarrior +#.jfif "JPEG" "ogle" JFIF Image PictureViewer +#.jpe "JPEG" "ogle" JPEG Picture PictureViewer image/jpeg +#.jpeg "JPEG" "ogle" JPEG Picture PictureViewer image/jpeg +#.jpg "JPEG" "ogle" JPEG Picture PictureViewer image/jpeg +#.latex "TEXT" "OTEX" Latex OzTex application/x-latex +#.lbm "ILBM" "GKON" Amiga IFF Image GraphicConverter +#.lha "LHA " "SITx" LHArc Archive StuffIt Expander +#.lzh "LHA " "SITx" LHArc Archive StuffIt Expander +#.m1a "MPEG" "TVOD" MPEG-1 audiostream MoviePlayer audio/x-mpeg +#.m1s "MPEG" "TVOD" MPEG-1 systemstream MoviePlayer +#.m1v "M1V " "TVOD" MPEG-1 IPB videostream MoviePlayer video/mpeg +#.m2 "TEXT" "R*ch" Modula 2 Source BBEdit +#.m2v "MPG2" "MPG2" MPEG-2 IPB videostream MPEG2decoder +#.m3 "TEXT" "R*ch" Modula 3 Source BBEdit +#.mac "PICT" "ogle" PICT Picture PictureViewer image/x-pict +#.mak "TEXT" "R*ch" Makefile BBEdit +#.mcw "WDBN" "MSWD" Mac Word Document Microsoft Word +#.me "TEXT" "ttxt" Text Readme SimpleText +#.med "STrk" "SCPL" Amiga MED Sound SoundApp +#.mf "TEXT" "*MF*" Metafont Metafont +#.mid "Midi" "TVOD" MIDI Music MoviePlayer +#.midi "Midi" "TVOD" MIDI Music MoviePlayer +#.mif "TEXT" "Fram" FrameMaker MIF FrameMaker application/x-framemaker +#.mime "TEXT" "SITx" MIME Message StuffIt Expander message/rfc822 +#.ml "TEXT" "R*ch" ML Source BBEdit +#.mod "STrk" "SCPL" MOD Music SoundApp +#.mol "TEXT" "RSML" MDL Molfile RasMac +#.moov "MooV" "TVOD" QuickTime Movie MoviePlayer video/quicktime +#.mov "MooV" "TVOD" QuickTime Movie MoviePlayer video/quicktime +#.mp2 "MPEG" "TVOD" MPEG-1 audiostream MoviePlayer audio/x-mpeg +#.mp3 "MPG3" "TVOD" MPEG-3 audiostream MoviePlayer audio/x-mpeg +#.mpa "MPEG" "TVOD" MPEG-1 audiostream MoviePlayer audio/x-mpeg +#.mpe "MPEG" "TVOD" MPEG Movie of some sort MoviePlayer video/mpeg +#.mpeg "MPEG" "TVOD" MPEG Movie of some sort MoviePlayer video/mpeg +#.mpg "MPEG" "TVOD" MPEG Movie of some sort MoviePlayer video/mpeg +#.msp "MSPp" "GKON" Microsoft Paint GraphicConverter +#.mtm "MTM " "SNPL" MultiMOD Music PlayerPro +#.mw "MW2D" "MWII" MacWrite Document MacWrite II application/macwriteii +#.mwii "MW2D" "MWII" MacWrite Document MacWrite II application/macwriteii +#.neo "NeoC" "GKON" Atari NeoChrome GraphicConverter +#.nfo "TEXT" "ttxt" Info Text SimpleText application/text +#.nst "STrk" "SCPL" MOD Music SoundApp +#.obj "PCFL" "SWIN" Object (DOS/Windows) SoftWindows +#.oda "ODIF" "ODA " ODA Document MacODA XTND Translator application/oda +#.okt "OKTA" "SCPL" Oktalyser MOD Music SoundApp +#.out "BINA" "hDmp" Output File HexEdit +#.ovl "PCFL" "SWIN" Overlay (DOS/Windows) SoftWindows +#.p "TEXT" "CWIE" Pascal Source CodeWarrior +#.pac "STAD" "GKON" Atari STAD Image GraphicConverter +#.pas "TEXT" "CWIE" Pascal Source CodeWarrior +#.pbm "PPGM" "GKON" Portable Bitmap GraphicConverter image/x-portable-bitmap +#.pc1 "Dega" "GKON" Atari Degas Image GraphicConverter +#.pc2 "Dega" "GKON" Atari Degas Image GraphicConverter +#.pc3 "Dega" "GKON" Atari Degas Image GraphicConverter +#.pcs "PICS" "GKON" Animated PICTs GraphicConverter +#.pct "PICT" "ogle" PICT Picture PictureViewer image/x-pict +#.pcx "PCXx" "GKON" PC PaintBrush GraphicConverter +#.pdb "TEXT" "RSML" Brookhaven PDB file RasMac +#.pdf "PDF " "CARO" Portable Document Format Acrobat Reader application/pdf +#.pdx "TEXT" "ALD5" Printer Description PageMaker +#.pf "CSIT" "SITx" Private File StuffIt Expander +#.pgm "PPGM" "GKON" Portable Graymap GraphicConverter image/x-portable-graymap +#.pi1 "Dega" "GKON" Atari Degas Image GraphicConverter +#.pi2 "Dega" "GKON" Atari Degas Image GraphicConverter +#.pi3 "Dega" "GKON" Atari Degas Image GraphicConverter +#.pic "PICT" "ogle" PICT Picture PictureViewer image/x-pict +#.pict "PICT" "ogle" PICT Picture PictureViewer image/x-macpict +#.pit "PIT " "SITx" PackIt Archive StuffIt Expander +#.pkg "HBSF" "SITx" AppleLink Package StuffIt Expander +#.pl "TEXT" "McPL" Perl Source MacPerl +#.plt "HPGL" "GKON" HP GL/2 GraphicConverter +#.pm "PMpm" "GKON" Bitmap from xv GraphicConverter +#.pm3 "ALB3" "ALD3" PageMaker 3 Document PageMaker +#.pm4 "ALB4" "ALD4" PageMaker 4 Document PageMaker +#.pm5 "ALB5" "ALD5" PageMaker 5 Document PageMaker +#.png "PNG " "ogle" Portable Network Graphic PictureViewer +#.pntg "PNTG" "ogle" Macintosh Painting PictureViewer +#.ppd "TEXT" "ALD5" Printer Description PageMaker +#.ppm "PPGM" "GKON" Portable Pixmap GraphicConverter image/x-portable-pixmap +#.prn "TEXT" "R*ch" Printer Output File BBEdit +#.ps "TEXT" "vgrd" PostScript LaserWriter 8 application/postscript +#.psd "8BPS" "8BIM" PhotoShop Document Photoshop +#.pt4 "ALT4" "ALD4" PageMaker 4 Template PageMaker +#.pt5 "ALT5" "ALD5" PageMaker 5 Template PageMaker +#.pxr "PXR " "8BIM" Pixar Image Photoshop +#.qdv "QDVf" "GKON" QDV image GraphicConverter +#.qt "MooV" "TVOD" QuickTime Movie MoviePlayer video/quicktime +#.qxd "XDOC" "XPR3" QuarkXpress Document QuarkXpress +#.qxt "XTMP" "XPR3" QuarkXpress Template QuarkXpress +#.raw "BINA" "GKON" Raw Image GraphicConverter +#.readme "TEXT" "ttxt" Text Readme SimpleText application/text +#.rgb "SGI " "GKON" SGI Image GraphicConverter image/x-rgb +#.rgba "SGI " "GKON" SGI Image GraphicConverter image/x-rgb +#.rib "TEXT" "RINI" Renderman 3D Data Renderman +#.rif "RIFF" "GKON" RIFF Graphic GraphicConverter +#.rle "RLE " "GKON" RLE image GraphicConverter +#.rme "TEXT" "ttxt" Text Readme SimpleText +#.rpl "FRL!" "REP!" Replica Document Replica +#.rsc "rsrc" "RSED" Resource File ResEdit +#.rsrc "rsrc" "RSED" Resource File ResEdit +#.rtf "TEXT" "MSWD" Rich Text Format Microsoft Word application/rtf +#.rtx "TEXT" "R*ch" Rich Text BBEdit text/richtext +#.s3m "S3M " "SNPL" ScreamTracker 3 MOD PlayerPro +#.scc "MSX " "GKON" MSX pitcure GraphicConverter +#.scg "RIX3" "GKON" ColoRIX GraphicConverter +#.sci "RIX3" "GKON" ColoRIX GraphicConverter +#.scp "RIX3" "GKON" ColoRIX GraphicConverter +#.scr "RIX3" "GKON" ColoRIX GraphicConverter +#.scu "RIX3" "GKON" ColoRIX GraphicConverter +#.sea "APPL" "????" Self-Extracting Archive Self Extracting Archive +#.sf "IRCM" "SDHK" IRCAM Sound SoundHack +#.sgi ".SGI" "ogle" SGI Image PictureViewer +#.sha "TEXT" "UnSh" Unix Shell Archive UnShar application/x-shar +#.shar "TEXT" "UnSh" Unix Shell Archive UnShar application/x-shar +#.shp "SHPp" "GKON" Printmaster Icon Library GraphicConverter +#.sit "SIT!" "SITx" StuffIt 1.5.1 Archive StuffIt Expander application/x-stuffit +#.sithqx "TEXT" "SITx" BinHexed StuffIt Archive StuffIt Expander application/mac-binhex40 +#.six "SIXE" "GKON" SIXEL image GraphicConverter +#.slk "TEXT" "XCEL" SYLK Spreadsheet Excel +#.snd "BINA" "SCPL" Sound of various types SoundApp +#.spc "Spec" "GKON" Atari Spectrum 512 GraphicConverter +#.sr "SUNn" "GKON" Sun Raster Image GraphicConverter +#.sty "TEXT" "*TEX" TeX Style Textures +#.sun "SUNn" "GKON" Sun Raster Image GraphicConverter +#.sup "SCRN" "GKON" StartupScreen GraphicConverter +#.svx "8SVX" "SCPL" Amiga IFF Sound SoundApp +#.syk "TEXT" "XCEL" SYLK Spreadsheet Excel +#.sylk "TEXT" "XCEL" SYLK Spreadsheet Excel +#.tar "TARF" "SITx" Unix Tape ARchive StuffIt Expander application/x-tar +#.targa "TPIC" "GKON" Truevision Image GraphicConverter +#.taz "ZIVU" "SITx" Compressed Tape ARchive StuffIt Expander application/x-compress +#.tex "TEXT" "OTEX" TeX Document OzTeX application/x-tex +#.texi "TEXT" "OTEX" TeX Document OzTeX +#.texinfo "TEXT" "OTEX" TeX Document OzTeX application/x-texinfo +#.text "TEXT" "ttxt" ASCII Text SimpleText text/plain +#.tga "TPIC" "GKON" Truevision Image GraphicConverter +#.tgz "Gzip" "SITx" Gnu ZIPed Tape ARchive StuffIt Expander application/x-gzip +#.tif "TIFF" "ogle" TIFF Picture PictureViewer image/tiff +#.tiff "TIFF" "ogle" TIFF Picture PictureViewer image/tiff +#.tny "TINY" "GKON" Atari TINY Bitmap GraphicConverter +#.tsv "TEXT" "XCEL" Tab Separated Values Excel text/tab-separated-values +#.tx8 "TEXT" "ttxt" 8-bit ASCII Text SimpleText +#.txt "TEXT" "ttxt" ASCII Text SimpleText text/plain +#.ul "ULAW" "TVOD" Mu-Law Sound MoviePlayer audio/basic +#.url "AURL" "Arch" URL Bookmark Anarchie message/external-body +#.uu "TEXT" "SITx" UUEncode StuffIt Expander +#.uue "TEXT" "SITx" UUEncode StuffIt Expander +#.vff "VFFf" "GKON" DESR VFF Greyscale Image GraphicConverter +#.vga "BMPp" "ogle" OS/2 Bitmap PictureViewer +#.voc "VOC " "SCPL" VOC Sound SoundApp +#.w51 ".WP5" "WPC2" WordPerfect PC 5.1 Doc WordPerfect application/wordperfect5.1 +#.wav "WAVE" "TVOD" Windows WAV Sound MoviePlayer audio/x-wav +#.wk1 "XLBN" "XCEL" Lotus Spreadsheet r2.1 Excel +#.wks "XLBN" "XCEL" Lotus Spreadsheet r1.x Excel +#.wmf "WMF " "GKON" Windows Metafile GraphicConverter +#.wp ".WP5" "WPC2" WordPerfect PC 5.1 Doc WordPerfect application/wordperfect5.1 +#.wp4 ".WP4" "WPC2" WordPerfect PC 4.2 Doc WordPerfect +#.wp5 ".WP5" "WPC2" WordPerfect PC 5.x Doc WordPerfect application/wordperfect5.1 +#.wp6 ".WP6" "WPC2" WordPerfect PC 6.x Doc WordPerfect +#.wpg "WPGf" "GKON" WordPerfect Graphic GraphicConverter +#.wpm "WPD1" "WPC2" WordPerfect Mac WordPerfect +#.wri "WDBN" "MSWD" MS Write/Windows Microsoft Word +#.wve "BINA" "SCPL" PSION sound SoundApp +#.x10 "XWDd" "GKON" X-Windows Dump GraphicConverter image/x-xwd +#.x11 "XWDd" "GKON" X-Windows Dump GraphicConverter image/x-xwd +#.xbm "XBM " "GKON" X-Windows Bitmap GraphicConverter image/x-xbm +#.xl "XLS " "XCEL" Excel Spreadsheet Excel +#.xlc "XLC " "XCEL" Excel Chart Excel +#.xlm "XLM " "XCEL" Excel Macro Excel +#.xls "XLS " "XCEL" Excel Spreadsheet Excel +#.xlw "XLW " "XCEL" Excel Workspace Excel +#.xm "XM " "SNPL" FastTracker MOD Music PlayerPro +#.xpm "XPM " "GKON" X-Windows Pixmap GraphicConverter image/x-xpm +#.xwd "XWDd" "GKON" X-Windows Dump GraphicConverter image/x-xwd +#.Z "ZIVU" "SITx" Unix Compress Archive StuffIt Expander application/x-compress +#.zip "ZIP " "SITx" PC ZIP Archive StuffIt Expander application/zip +#.zoo "Zoo " "Booz" Zoo Archive MacBooz + +### Last Updated Jan 2, 2002 +### Use at your own risk. Take care ! +### +### I'd like to dedicate this as follows code to Miss.Tamaki Imazu +### +### Kazuhiko Okudaira the Nursery Teacher +### kokudaira@hotmail.com + +#.bld "BLD " "GKON" BLD GraphicConverter +#.bum ".bMp" "GKON" QuickTime Importer(QuickDraw) GraphicConverter +#.cel "CEL " "GKON" KISS CEL GraphicConverter +#.cur "CUR " "GKON" Windows Cursor GraphicConverter +#.cwj "CWSS" "cwkj" ClarisWorks Document ClarisWorks 4.0 +#.dat "TCLl" "GKON" TCL image GraphicConverter +#.hr "TR80" "GKON" TSR-80 HR GraphicConverter +#.iss "ISS " "GKON" ISS GraphicConverter +#.jif "JIFf" "GKON" JIF99a GraphicConverter +#.lwf "lwfF" "GKON" LuraWave(LWF) GraphicConverter +#.mbm "MBM " "GKON" PSION 5(MBM) GraphicConverter +#.ngg "NGGC" "GKON" Mobile Phone(Nokia)Format GraphicConverter +#.nol "NOL " "GKON" Mobile Phone(Nokia)Format GraphicConverter +#.pal "8BCT" "8BIM" Color Table GraphicConverter +#.pgc "PGCF" "GKON" PGC/PGF Atari Portfolio PCG GraphicConverter +#.pics "PICS" "GKON" PICS-PICT Sequence GraphicConverter +#.swf "SWFL" "SWF2" Flash Macromedia Flash +#.vpb "VPB " "GKON" VPB QUANTEL GraphicConverter +#.wbmp "WBMP" "GKON" WBMP GraphicConverter +#.x-face "TEXT" "GKON" X-Face GraphicConverter + +### Nov 29, 2002 +#.fla "SPA " "MFL2" Flash source Macromedia Flash diff --git a/net/netatalk/files/afpd.conf b/net/netatalk/files/afpd.conf new file mode 100644 index 0000000..63cdc3d --- /dev/null +++ b/net/netatalk/files/afpd.conf @@ -0,0 +1 @@ +- -noddp -uampath /usr/lib/uams -uamlist uams_guest.so,uams_passwd.so,uams_dhx_passwd.so,uams_randnum.so -passwdfile /etc/netatalk/afppasswd -savepassword -passwdminlen 0 -nosetpassword -defaultvol /etc/netatalk/AppleVolumes.default -systemvol /etc/netatalk/AppleVolumes.system -nouservol -guestname "nobody" -sleep 1 -icon diff --git a/net/netatalk/files/afpd.init b/net/netatalk/files/afpd.init new file mode 100644 index 0000000..bc42b35 --- /dev/null +++ b/net/netatalk/files/afpd.init @@ -0,0 +1,24 @@ +#!/bin/sh /etc/rc.common + +START=70 + +MAXCONS="7" +CONFIGFILE="/etc/netatalk/afpd.conf" +PIDFILE="/var/run/afpd.pid" + +start() +{ + /usr/sbin/cnid_metad + /usr/sbin/afpd -F ${CONFIGFILE} -P ${PIDFILE} -c ${MAXCONS} +} + +stop() +{ + kill `cat "${PIDFILE}"` + killall cnid_metad +} + +reload() +{ + kill -s HUP `cat "${PIDFILE}"` +} diff --git a/net/netcat/Makefile b/net/netcat/Makefile new file mode 100644 index 0000000..b2e95ca --- /dev/null +++ b/net/netcat/Makefile @@ -0,0 +1,57 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=netcat +PKG_VERSION:=0.7.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=0a29eff1736ddb5effd0b1ec1f6fe0ef + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/netcat + SECTION:=net + CATEGORY:=Network + TITLE:=A feature-rich network debugging and exploration tool. + URL:=http://netcat.sourceforge.net/ +endef + +define Package/netcat/description + Netcat is a featured networking utility which reads and writes data across network connections, using the TCP/IP protocol. + It is designed to be a reliable "back-end" tool that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-rpath \ + --with-included-getopt \ + ) +endef + +define Package/netcat/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/netcat \ + $(1)/usr/bin +endef + +define Package/netcat/postinst +#!/bin/sh +if [ -e $${IPKG_INSTROOT}/usr/bin/nc ]; then + rm -rf $${IPKG_INSTROOT}/usr/bin/nc; +fi +ln -s ./netcat $${IPKG_INSTROOT}/usr/bin/nc +endef + +define Package/netcat/postrm +#!/bin/sh +rm $${IPKG_INSTROOT}/usr/bin/nc +ln -s ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/nc +$${IPKG_INSTROOT}/usr/bin/nc 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/nc +exit 0 +endef + + +$(eval $(call BuildPackage,netcat)) diff --git a/net/netcat/patches/001-netcat_flag_count.patch b/net/netcat/patches/001-netcat_flag_count.patch new file mode 100644 index 0000000..44ee9e1 --- /dev/null +++ b/net/netcat/patches/001-netcat_flag_count.patch @@ -0,0 +1,22 @@ +Index: netcat-0.7.1/src/flagset.c +=================================================================== +--- netcat-0.7.1.orig/src/flagset.c 2009-02-06 19:56:01.000000000 +0100 ++++ netcat-0.7.1/src/flagset.c 2009-02-06 19:56:13.000000000 +0100 +@@ -134,7 +134,7 @@ + + int netcat_flag_count(void) + { +- register char c; ++ register unsigned char c; + register int i; + int ret = 0; + +@@ -154,7 +154,7 @@ + Assumed that the bit number 1 is the sign, and that we will shift the + bit 1 (or the bit that takes its place later) until the the most right, + WHY it has to keep the wrong sign? */ +- ret -= (c >> 7); ++ ret += (c >> 7); + c <<= 1; + } + } diff --git a/net/netdiscover/Makefile b/net/netdiscover/Makefile new file mode 100644 index 0000000..7bf46d4 --- /dev/null +++ b/net/netdiscover/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=netdiscover +PKG_VERSION:=0.3-beta6 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://nixgeneration.com/~jaime/netdiscover/releases/ +PKG_MD5SUM:=0919227a91ecaeeb2443cff249417be2 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/netdiscover + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap +libnet1 +libpthread + TITLE:=An active/passive address reconnaissance tool + URL:=http://nixgeneration.com/~jaime/netdiscover/ + MAINTAINER:=Daniel Dickinson +endef + +CONFIGURE_VARS+= \ + CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libnet-1.1.x/include" \ + LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libnet-1.1.x/lib" \ + +define Package/netdiscover/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdiscover $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,netdiscover)) diff --git a/net/netdiscover/patches/00-add-machine-ouput.patch b/net/netdiscover/patches/00-add-machine-ouput.patch new file mode 100644 index 0000000..eed7f0f --- /dev/null +++ b/net/netdiscover/patches/00-add-machine-ouput.patch @@ -0,0 +1,467 @@ +diff -Naur netdiscover-0.3-beta6.orig/src/ifaces.c netdiscover-0.3-beta6/src/ifaces.c +--- netdiscover-0.3-beta6.orig/src/ifaces.c 2009-06-24 18:21:11.000000000 -0400 ++++ netdiscover-0.3-beta6/src/ifaces.c 2009-06-24 21:44:05.000000000 -0400 +@@ -127,6 +127,7 @@ + memcpy(type, packet + 20, 2); /* ARP Opcode */ + new_arprep_l->header = new_header; /* Add header */ + new_arprep_l->count = 1; /* Count */ ++ new_arprep_l->printed = 0; + new_arprep_l->next = NULL; + + /* Source IP */ +diff -Naur netdiscover-0.3-beta6.orig/src/main.c netdiscover-0.3-beta6/src/main.c +--- netdiscover-0.3-beta6.orig/src/main.c 2009-06-24 18:21:11.000000000 -0400 ++++ netdiscover-0.3-beta6/src/main.c 2009-06-24 21:34:59.000000000 -0400 +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include "ifaces.h" + #include "screen.h" + +@@ -39,8 +40,17 @@ + char *disp; + char *sip; + int autos; ++ int machine; + }; + ++/* Injection Thread data structure */ ++struct t_inject { ++ struct t_data *datos; ++ pthread_t *sniffer; ++ pthread_t *screen; ++ pthread_t *keys; ++ int scan_secs; ++}; + + void *inject_arp(void *arg); + void *screen_refresh(void *arg); +@@ -77,7 +87,7 @@ + + + pthread_t injection, sniffer, screen, keys; +-int fastmode, pcount, node, ssleep; ++int fastmode, pcount, node, ssleep, nokeywait; + long sleept; + + +@@ -86,7 +96,9 @@ + { + while ( 1 == 1 ) + { +- read_key(); ++ struct t_data *datos; ++ datos = (struct t_data *)arg; ++ read_key(datos->machine); + } + } + +@@ -97,20 +109,24 @@ + int c; + int esniff = 0; + int erange = 0; ++ int scan_secs = 0; + struct t_data datos; +- ++ struct t_inject injectdata; ++ + datos.sip = NULL; + datos.disp = NULL; ++ datos.machine = 0; + datos.autos = 0; + sleept = 99; + node = 67; + pcount = 1; ++ nokeywait = 0; + + current_network = (char *) malloc ((sizeof(char)) * 16); + sprintf(current_network,"Starting."); + + /* Fetch parameters */ +- while ((c = getopt(argc, argv, "i:s:r:n:c:pSfh")) != EOF) ++ while ((c = getopt(argc, argv, "i:s:r:n:c:t:pSfhkm")) != EOF) + { + switch (c) + { +@@ -138,12 +154,20 @@ + case 'n': + node = atoi(optarg); + break; ++ ++ case 't': ++ scan_secs = atoi(optarg); ++ break; + + case 'r': + datos.sip = (char *) malloc (sizeof(char) * strlen(optarg)); + sprintf(datos.sip, "%s", optarg); + erange = 1; + break; ++ ++ case 'm': ++ datos.machine = 1; ++ break; + + case 'f': + fastmode = 1; +@@ -153,6 +177,10 @@ + usage(argv[0]); + exit(1); + break; ++ ++ case 'k': ++ nokeywait = 1; ++ break; + + default: + break; +@@ -181,7 +209,7 @@ + /* Init some stuff */ + lnet_init(datos.disp); + init_lists(); +- system("clear"); ++ if (!datos.machine) system("clear"); + + /* If no mode was selected, enable auto scan */ + if ((erange != 1) && (esniff != 1)) +@@ -189,9 +217,15 @@ + datos.autos = 1; + } + ++ + /* Start the execution */ +- pthread_create(&screen, NULL, screen_refresh, (void *)NULL); +- pthread_create(&keys, NULL, keys_thread, (void *)NULL); ++ pthread_create(&screen, NULL, screen_refresh, (void *)&datos); ++ if (!nokeywait) { ++ pthread_create(&keys, NULL, keys_thread, (void *)&datos); ++ injectdata.keys = &keys; ++ } else { ++ injectdata.keys = NULL; ++ } + pthread_create(&sniffer, NULL, start_sniffer, (void *)&datos); + + if (esniff == 1) +@@ -201,10 +235,19 @@ + } + else + { +- if (pthread_create(&injection, NULL, inject_arp, (void *)&datos)) ++ injectdata.datos = &datos; ++ injectdata.sniffer = &sniffer; ++ injectdata.screen = &screen; ++ injectdata.scan_secs = scan_secs; ++ ++ if (pthread_create(&injection, NULL, inject_arp, (void *)&injectdata)) + perror("Could not create injection thread"); + +- pthread_join(sniffer,NULL); ++ if (scan_secs > 0) { ++ pthread_join(injection,NULL); ++ } else { ++ pthread_join(sniffer,NULL); ++ } + } + + +@@ -215,10 +258,11 @@ + /* Refresh screen function called by screen thread */ + void *screen_refresh(void *arg) + { +- ++ struct t_data *datos; ++ datos = (struct t_data *)arg; + while (1==1) + { +- print_screen(); ++ print_screen(datos->machine); + sleep(1); + } + +@@ -228,9 +272,11 @@ + /* Inject ARP Replys to the network */ + void *inject_arp(void *arg) + { ++ struct t_inject *inject; + struct t_data *datos; + +- datos = (struct t_data *)arg; ++ inject = (struct t_inject *)arg; ++ datos = inject->datos; + sleep(2); + + if ( datos->autos != 1 ) +@@ -251,6 +297,12 @@ + + sprintf(current_network,"Finished!"); + lnet_destroy(); ++ if (inject->scan_secs > 0) { ++ sleep(inject->scan_secs); ++ pthread_kill(*(inject->sniffer), SIGKILL); ++ pthread_kill(*(inject->screen), SIGKILL); ++ pthread_kill(*(inject->keys), SIGKILL); ++ } + + return NULL; + } +@@ -400,6 +452,9 @@ + " -n node: last ip octet used for scanning (from 2 to 253)\n" + " -S enable sleep time supression betwen each request (hardcore mode)\n" + " -f enable fastmode scan, saves a lot of time, recommended for auto\n\n" ++ " -k nokeywait: Don't wait for keypress\n" ++ " -t time: maximum time to listen after last arp request sent (seconds)\n" ++ " -m don't clear and format screen, just output replies\n" + "If -p or -r arent enabled, netdiscover will scan for common lan addresses\n", + VERSION, comando); + } +diff -Naur netdiscover-0.3-beta6.orig/src/screen.c netdiscover-0.3-beta6/src/screen.c +--- netdiscover-0.3-beta6.orig/src/screen.c 2009-06-24 18:21:11.000000000 -0400 ++++ netdiscover-0.3-beta6/src/screen.c 2009-06-25 19:15:24.000000000 -0400 +@@ -114,7 +114,7 @@ + + + /* Read input keys */ +-void read_key() ++void read_key(int machine) + { + int ch; + ch = getchar(); +@@ -162,12 +162,12 @@ + smode = 2; + } + +- print_screen(); ++ print_screen(machine); + } + + + /* Clear and fill the screen */ +-void print_screen() ++void print_screen(int machine) + { + /* Get Console Size */ + if (ioctl(0, TIOCGWINSZ, &win_sz) < 0) +@@ -177,16 +177,16 @@ + } + + /* Flush and print screen */ +- fprintf( stderr, "\33[1;1H" ); +- fill_screen(); +- fprintf( stderr, "\33[J" ); ++ if (!machine) fprintf( stderr, "\33[1;1H" ); ++ fill_screen(machine); ++ if (!machine) fprintf( stderr, "\33[J" ); + fflush(stdout); + } + + + /* Fills the screen using white spaces to avoid refresh problems * + * not a very smart way, but it works :) */ +-void fill_screen() ++void fill_screen(int machine) + { + int x, j; + struct arp_rep_l *arprep_l; +@@ -196,40 +196,42 @@ + + pthread_mutex_lock(listm); + +- sprintf(line, " Currently scanning: %s | Our Mac is: %s - %i", +- current_network, ourmac, scroll); +- printf("%s", line); +- +- /* Fill with spaces */ +- for (j=strlen(line); jcount, arprep_count->hosts, arprep_count->length); +- printf("%s", line); +- +- /* Fill with spaces */ +- for (j=strlen(line); jcount, arprep_count->hosts, arprep_count->length); ++ printf("%s", line); ++ ++ /* Fill with spaces */ ++ for (j=strlen(line); jsip); ++ sprintf(tline, "%s ", arprep_l->sip); + strcat(line, tline); +- +- /* Fill with spaces */ +- for (j=strlen(line); j<17; j++) +- strcat(line, blank); ++ ++ /* Fill with spaces */ ++ for (j=strlen(line); j<17; j++) ++ strcat(line, blank); + + /* IP & MAC */ + sprintf(tline, "%02x:%02x:%02x:%02x:%02x:%02x ", +@@ -260,21 +262,29 @@ + /* Count, Length & Vendor */ + sprintf(tline, "%02d %03d %s", arprep_l->count, + arprep_l->header->length, arprep_l->vendor ); +- strcat(line, tline); +- +- /* Fill again with spaces */ +- for (j=strlen(line); jprinted) { ++ printf("%s\n", line); ++ arprep_l->printed = 1; ++ if (!machine) { ++ arprep_l->printed = 0; ++ } ++ } + } + + arprep_l = arprep_l->next; + x += 1; +- +- /* Check if end of screen was reached */ +- if (x >= ( (win_sz.ws_row + scroll) - 7)) +- break; ++ ++ if (!machine) { ++ /* Check if end of screen was reached */ ++ if (x >= ( (win_sz.ws_row + scroll) - 7)) ++ break; ++ } + } + + } /* Print only arp request */ +@@ -292,10 +302,10 @@ + /* Get source IP */ + sprintf(tline, "%s ", arprep_l->sip); + strcat(line, tline); +- +- /* Fill with spaces */ +- for (j=strlen(line); j<17; j++) +- strcat(line, blank); ++ ++ /* Fill with spaces */ ++ for (j=strlen(line); j<17; j++) ++ strcat(line, blank); + + /* Get source MAC */ + sprintf(tline, "%02x:%02x:%02x:%02x:%02x:%02x ", +@@ -308,27 +318,29 @@ + sprintf(tline, "%s", arprep_l->dip); + strcat(line, tline); + +- /* Fill with spaces */ +- for (j=strlen(line); j<54; j++) +- strcat(line, blank); ++ /* Fill with spaces */ ++ for (j=strlen(line); j<54; j++) ++ strcat(line, blank); + + /* Count, Length & Vendor */ + sprintf(tline, "%02d", arprep_l->count); + strcat(line, tline); + +- /* Fill again with spaces */ +- for (j=strlen(line); jnext; + x += 1; +- +- /* Check if end of screen was reached */ +- if (x >= ( (win_sz.ws_row + scroll) - 7)) +- break; ++ ++ if (!machine) { ++ /* Check if end of screen was reached */ ++ if (x >= ( (win_sz.ws_row + scroll) - 7)) ++ break; ++ } + } + } + else if(smode == 2) +diff -Naur netdiscover-0.3-beta6.orig/src/screen.h netdiscover-0.3-beta6/src/screen.h +--- netdiscover-0.3-beta6.orig/src/screen.h 2009-06-24 18:21:11.000000000 -0400 ++++ netdiscover-0.3-beta6/src/screen.h 2009-06-24 21:42:13.000000000 -0400 +@@ -60,6 +60,7 @@ + char *vendor; + short type; + unsigned int count; ++ int printed; + struct arp_rep_l *next; + }; + diff --git a/net/netdiscover/patches/01-initfix+end-fix.patch b/net/netdiscover/patches/01-initfix+end-fix.patch new file mode 100644 index 0000000..6ba5ffe --- /dev/null +++ b/net/netdiscover/patches/01-initfix+end-fix.patch @@ -0,0 +1,34 @@ +diff -Naur netdiscover-0.3-beta6.01machine/src/main.c netdiscover-0.3-beta6/src/main.c +--- netdiscover-0.3-beta6.01machine/src/main.c 2009-06-25 18:19:18.000000000 -0400 ++++ netdiscover-0.3-beta6/src/main.c 2009-07-16 06:37:43.000000000 -0400 +@@ -121,6 +121,8 @@ + node = 67; + pcount = 1; + nokeywait = 0; ++ fastmode = 0; ++ ssleep = 0; + + current_network = (char *) malloc ((sizeof(char)) * 16); + sprintf(current_network,"Starting."); +@@ -250,7 +252,6 @@ + } + } + +- + return 0; + } + +@@ -299,9 +300,10 @@ + lnet_destroy(); + if (inject->scan_secs > 0) { + sleep(inject->scan_secs); +- pthread_kill(*(inject->sniffer), SIGKILL); +- pthread_kill(*(inject->screen), SIGKILL); +- pthread_kill(*(inject->keys), SIGKILL); ++ pthread_kill(*(inject->sniffer), SIGTERM); ++ pthread_kill(*(inject->screen), SIGTERM); ++ pthread_kill(*(inject->keys), SIGTERM); ++ sighandler(SIGTERM); + } + + return NULL; diff --git a/net/netperf/Makefile b/net/netperf/Makefile new file mode 100644 index 0000000..09f0633 --- /dev/null +++ b/net/netperf/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=netperf +PKG_VERSION:=2.4.5 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.netperf.org/netperf/ +PKG_MD5SUM:=5cfaae1d024551161b8eafbd48faedf4 + +include $(INCLUDE_DIR)/package.mk + +define Package/netperf + SECTION:=net + CATEGORY:=Network + TITLE:=Network performance measurement tool + URL:=http://www.netperf.org/ +endef + +define Package/netperf/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/netserver.init $(1)/etc/init.d/netserver + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/netperf $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/netserver $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/lib/netperf + $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/arr_script $(1)/lib/netperf + $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/packet_byte_script $(1)/lib/netperf + $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/sctp_stream_script $(1)/lib/netperf + $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/snapshot_script $(1)/lib/netperf + $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/tcp_range_script $(1)/lib/netperf + $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/tcp_rr_script $(1)/lib/netperf + $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/tcp_stream_script $(1)/lib/netperf + $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/udp_rr_script $(1)/lib/netperf + $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/udp_stream_script $(1)/lib/netperf +endef + +$(eval $(call BuildPackage,netperf)) diff --git a/net/netperf/files/netserver.init b/net/netperf/files/netserver.init new file mode 100644 index 0000000..6d3ccdd --- /dev/null +++ b/net/netperf/files/netserver.init @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start() { + /usr/bin/netserver +} + +stop() { + killall netserver +} diff --git a/net/netperf/patches/001-dccp.patch b/net/netperf/patches/001-dccp.patch new file mode 100644 index 0000000..ae84cee --- /dev/null +++ b/net/netperf/patches/001-dccp.patch @@ -0,0 +1,38 @@ +[PATCH] fix build on systems where IPROTO_DCCP is defined, but SOCK_DCCP isn't + +On some systems (E.G. uClibc 0.9.31) IPROTO_DCCP is defined, but SOCK_DCCP +isn't - Causing the build to break. Fix it by checking for both before +using. + +Signed-off-by: Peter Korsgaard +--- + src/netsh.c | 2 +- + src/nettest_bsd.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: netperf-2.4.5/src/netsh.c +=================================================================== +--- netperf-2.4.5.orig/src/netsh.c ++++ netperf-2.4.5/src/netsh.c +@@ -452,7 +452,7 @@ parse_protocol(char protocol_string[]) + return IPPROTO_SDP; + } + #endif +-#ifdef IPPROTO_DCCP ++#if defined(IPPROTO_DCCP) && defined(SOCK_DCCP) + if (!strcasecmp(temp,"dccp")) { + socket_type = SOCK_DCCP; + return IPPROTO_DCCP; +Index: netperf-2.4.5/src/nettest_bsd.c +=================================================================== +--- netperf-2.4.5.orig/src/nettest_bsd.c ++++ netperf-2.4.5/src/nettest_bsd.c +@@ -712,7 +712,7 @@ complete_addrinfo(char *controlhost, cha + that we did this so the code for the Solaris kludge can do + the fix-up for us. also flip error over to EAI_AGAIN and + make sure we don't "count" this time around the loop. */ +-#if defined(IPPROTO_DCCP) ++#if defined(IPPROTO_DCCP) && defined(SOCK_DCCP) + /* only tweak on this one the second time around, after we've + kludged the ai_protocol field */ + if ((hints.ai_socktype == SOCK_DCCP) && diff --git a/net/netpipe/Makefile b/net/netpipe/Makefile new file mode 100644 index 0000000..81d2712 --- /dev/null +++ b/net/netpipe/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=netpipe +PKG_VERSION:=3.7.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=NetPIPE-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.scl.ameslab.gov/netpipe/code +PKG_MD5SUM:=cc458a9154f6b8c6da9fae16627beec4 + +PKG_BUILD_DIR:=$(BUILD_DIR)/NetPIPE-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/netpipe + SECTION:=net + CATEGORY:=Network + TITLE:=A Network Protocol Independent Performance Evaluator + URL:=http://www.scl.ameslab.gov/netpipe/ +endef + +define Package/netpipe/description + NetPIPE is a protocol independent performance tool that visually + represents the network performance under a variety of conditions. It + performs simple ping-pong tests, bouncing messages of increasing size + between two processes, whether across a network or within an SMP + system. Message sizes are chosen at regular intervals, and with slight + perturbations, to provide a complete test of the communication system. + Each data point involves many ping-pong tests to provide an accurate + timing. Latencies are calculated by dividing the round trip time in + half for small messages ( < 64 Bytes ). +endef + +define Build/Configure +endef + +define Package/netpipe/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPtcp $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,netpipe)) diff --git a/net/netstat-nat/Makefile b/net/netstat-nat/Makefile new file mode 100644 index 0000000..8673695 --- /dev/null +++ b/net/netstat-nat/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=netstat-nat +PKG_VERSION:=1.4.10 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://tweegy.nl/download +PKG_MD5SUM:=c1bbb3ee9774ebfa27c440e2d9dd7286 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/netstat-nat + SECTION:=net + CATEGORY:=Network + TITLE:=A netstat variant for NAT connections + URL:=http://tweegy.nl/projects/netstat-nat/ +endef + +define Package/netstat-nat/description + Netstat-nat is a small program written in C. + It displays NAT connections, managed by netfilter/iptables which comes + with the > 2.4.x linux kernels. + The program reads its information from '/proc/net/ip_conntrack', which + is the temporary conntrack-storage of netfilter. +endef + +define Package/netstat-nat/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/netstat-nat $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,netstat-nat)) diff --git a/net/nfs-kernel-server/Makefile b/net/nfs-kernel-server/Makefile new file mode 100644 index 0000000..3832822 --- /dev/null +++ b/net/nfs-kernel-server/Makefile @@ -0,0 +1,140 @@ +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nfs-kernel-server +PKG_VERSION:=1.1.6 +PKG_RELEASE:=1 +PKG_MD5SUM:=b0d1b8ec5c8c081a340cfc77bb8670cd + +PKG_SOURCE_URL:=@SF/nfs +PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.bz2 + +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/nfs-utils-$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION) +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=$(PKG_NAME)/host + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Package/nfs-kernel-server/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Filesystem + DEPENDS:=+libwrap +libblkid +libuuid + URL:=http://nfs.sourceforge.net/ +endef + +define Package/nfs-kernel-server + $(call Package/nfs-kernel-server/Default) + TITLE:=Kernel NFS server support + DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +portmap +endef + +define Package/nfs-kernel-server/description + Kernel NFS server support +endef + +define Package/nfs-kernel-server-utils + $(call Package/nfs-kernel-server/Default) + TITLE:=NFS server utils + DEPENDS:=nfs-kernel-server +endef + +define Package/nfs-kernel-server-utils/description + NFS server utils +endef + +define Package/nfs-kernel-server/conffiles +/etc/exports +endef + +define Package/nfs-utils + $(call Package/nfs-kernel-server/Default) + SECTION:=utils + CATEGORY:=Utilities + DEPENDS+= +libevent + TITLE:=updated mount utility (includes nfs4) +endef + +define Package/nfs-utils/description + Updated mount.nfs command - allows mounting nfs4 volumes +endef + +TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib -I$(STAGING_DIR)/usr/include -Drpc_uint=uint +TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(LIBRPC) + +CONFIGURE_ARGS += \ + --disable-gss \ + --disable-nfsv4 \ + --enable-static \ + --enable-shared + +MAKE_FLAGS += \ + OPT="$(TARGET_CFLAGS)" \ + INSTALLSUID="install -m 4755" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + RPCGEN_PATH=$(STAGING_DIR_HOST)/bin/rpcgen \ + RPCGEN=$(STAGING_DIR_HOST)/bin/rpcgen + +HOST_CFLAGS += -Dlinux + +HOST_CONFIGURE_ARGS += \ + --disable-gss \ + --disable-nfsv4 \ + --without-tcp-wrappers + +HOST_CONFIGURE_VARS += \ + ac_cv_lib_event_event_dispatch=yes \ + ac_cv_lib_nfsidmap_nfs4_init_name_mapping=yes \ + ac_cv_lib_blkid_blkid_get_library_version=yes \ + ac_cv_header_event_h=yes \ + ac_cv_header_nfsidmap_h=yes \ + ac_cv_header_blkid_blkid_h=yes \ + GSSGLUE_CFLAGS=" " \ + GSSGLUE_LIBS=" " \ + RPCSECGSS_CFLAGS=" " \ + RPCSECGSS_LIBS=" " \ + + +define Host/Compile + $(MAKE) -C $(HOST_BUILD_DIR)/tools/rpcgen all +endef + +define Host/Install + $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/rpcgen/rpcgen $(STAGING_DIR_HOST)/bin/rpcgen +endef + +define Package/nfs-kernel-server/install + $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin + $(INSTALL_DATA) ./files/nfsd.exports $(1)/etc/exports + $(INSTALL_BIN) ./files/nfsd.init $(1)/etc/init.d/nfsd + $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/sm-notify $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/statd $(1)/usr/sbin/rpc.statd + $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsd/nfsd $(1)/usr/sbin/rpc.nfsd + $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/mountd/mountd $(1)/usr/sbin/rpc.mountd + $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/exportfs/exportfs $(1)/usr/sbin/ +endef + +define Package/nfs-kernel-server-utils/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/showmount/showmount $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsstat/nfsstat $(1)/usr/sbin +endef + +define Package/nfs-utils/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mount.nfs $(1)/sbin/ + (cd $(1)/sbin; ln -sf mount.nfs mount.nfs4; ln -sf mount.nfs umount.nfs; ln -sf mount.nfs umount.nfs4) +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,nfs-kernel-server)) +$(eval $(call BuildPackage,nfs-kernel-server-utils)) +$(eval $(call BuildPackage,nfs-utils)) diff --git a/net/nfs-kernel-server/files/nfsd.exports b/net/nfs-kernel-server/files/nfsd.exports new file mode 100644 index 0000000..0453e04 --- /dev/null +++ b/net/nfs-kernel-server/files/nfsd.exports @@ -0,0 +1 @@ +/mnt *(ro,all_squash,insecure,sync) diff --git a/net/nfs-kernel-server/files/nfsd.init b/net/nfs-kernel-server/files/nfsd.init new file mode 100644 index 0000000..c6ee8c8 --- /dev/null +++ b/net/nfs-kernel-server/files/nfsd.init @@ -0,0 +1,36 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=60 +STOP=60 + +NFS_D=/var/lib/nfs +LOCK_D=/var/lib/nfs/sm + +start() { + grep -q /proc/fs/nfsd /proc/mounts || \ + mount -t nfsd nfsd /proc/fs/nfsd + mkdir -p $NFS_D + mkdir -p $LOCK_D + touch $NFS_D/rmtab + + sysctl -w fs.nfs.nlm_tcpport=32777 fs.nfs.nlm_udpport=32777 > /dev/null + /usr/sbin/rpc.statd -p 32778 -o 32779 + /usr/sbin/exportfs -r + /usr/sbin/rpc.nfsd + /usr/sbin/rpc.mountd -p 32780 +} + +stop() { + killall rpc.mountd 2> /dev/null + rpc.nfsd 0 2> /dev/null + /usr/sbin/exportfs -au + killall rpc.statd 2> /dev/null + grep -q /proc/fs/nfsd /proc/mounts && \ + umount /proc/fs/nfsd +} + +reload() { + /usr/sbin/exportfs -r +} + diff --git a/net/nfs-kernel-server/patches/001-nfs_utils_uclibc.patch b/net/nfs-kernel-server/patches/001-nfs_utils_uclibc.patch new file mode 100644 index 0000000..9a561e8 --- /dev/null +++ b/net/nfs-kernel-server/patches/001-nfs_utils_uclibc.patch @@ -0,0 +1,35 @@ +--- a/utils/mountd/cache.c ++++ b/utils/mountd/cache.c +@@ -142,6 +142,7 @@ void auth_unix_gid(FILE *f) + pw = getpwuid(uid); + if (!pw) + rv = -1; ++#ifndef __UCLIBC__ + else { + rv = getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups); + if (rv == -1 && ngroups >= 100) { +@@ -153,6 +154,7 @@ void auth_unix_gid(FILE *f) + groups, &ngroups); + } + } ++#endif /* __UCLIBC__ */ + qword_printint(f, uid); + qword_printint(f, time(0)+30*60); + if (rv >= 0) { +--- a/support/nfs/svc_socket.c ++++ b/support/nfs/svc_socket.c +@@ -66,9 +66,13 @@ svc_socket (u_long number, int type, int + + memset (&addr, 0, sizeof (addr)); + addr.sin_family = AF_INET; +- ++#ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */ + ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata, + &rpcp); ++#else ++ rpcp = getrpcbynumber (number); ++ ret = 0; ++#endif + if (ret == 0 && rpcp != NULL) + { + /* First try name. */ diff --git a/net/nfs-kernel-server/patches/002-no_ttycom_h.patch b/net/nfs-kernel-server/patches/002-no_ttycom_h.patch new file mode 100644 index 0000000..8db2a07 --- /dev/null +++ b/net/nfs-kernel-server/patches/002-no_ttycom_h.patch @@ -0,0 +1,26 @@ +--- a/tools/rpcgen/rpc_main.c ++++ b/tools/rpcgen/rpc_main.c +@@ -545,13 +545,6 @@ s_output(int argc, char **argv, char *in + timerflag = 1; + } + +-#ifndef linux +- if( !tirpcflag && inetdflag ) +- f_print(fout, "#include /* TIOCNOTTY */\n"); +-#else +- if( !tirpcflag ) +- f_print(fout, "#include /* TIOCNOTTY */\n"); +-#endif + if( Cflag && (inetdflag || pmflag ) ) { + f_print(fout, "#ifdef __cplusplus\n"); + f_print(fout, "#include /* getdtablesize, open */\n"); +--- a/tools/rpcgen/rpc_svcout.c ++++ b/tools/rpcgen/rpc_svcout.c +@@ -788,7 +788,6 @@ write_rpc_svc_fg(char *infile, char *sp) + else { + f_print(fout, "%si = open(\"/dev/tty\", 2);\n", sp); + f_print(fout, "%sif (i >= 0) {\n", sp); +- f_print(fout, "%s\t(void) ioctl(i, TIOCNOTTY, (char *)NULL);\n", sp);; + f_print(fout, "%s\t(void) close(i);\n", sp); + f_print(fout, "%s}\n", sp); + } diff --git a/net/nfs-kernel-server/patches/003-no_malloc_h.patch b/net/nfs-kernel-server/patches/003-no_malloc_h.patch new file mode 100644 index 0000000..4595749 --- /dev/null +++ b/net/nfs-kernel-server/patches/003-no_malloc_h.patch @@ -0,0 +1,10 @@ +--- a/tools/rpcgen/rpc_cout.c ++++ b/tools/rpcgen/rpc_cout.c +@@ -38,7 +38,6 @@ static char sccsid[] = "@(#)rpc_cout.c 1 + #include + #include + #include +-#include + #include + #include "rpc_parse.h" + #include "rpc_util.h" diff --git a/net/nfs-server/Makefile b/net/nfs-server/Makefile new file mode 100644 index 0000000..6338b1b --- /dev/null +++ b/net/nfs-server/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nfs-server +PKG_VERSION:=2.2beta47 +PKG_RELEASE:=1 +PKG_MD5SUM:=79a29fe9f79b2f3241d4915767b8c511 + +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/n/nfs-user-server +PKG_SOURCE:=nfs-user-server_$(PKG_VERSION).orig.tar.gz + +include $(INCLUDE_DIR)/package.mk + +define Package/nfs-server + SECTION:=net + CATEGORY:=Network + SUBMENU:=Filesystem + DEPENDS:=+portmap $(LIBRPC_DEPENDS) + TITLE:=User Space NFS server + URL:=http://packages.debian.org/nfs-user-server +endef + +define Package/nfs-server/description +User Space NFS server +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) +endef + +TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include +TARGET_LDFLAGS += $(LIBRPC) + +define Package/nfs-server/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/nfsd.exports $(1)/etc/exports + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/nfsd.init $(1)/etc/init.d/nfsd + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/rpc.* $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,nfs-server)) diff --git a/net/nfs-server/files/nfsd.exports b/net/nfs-server/files/nfsd.exports new file mode 100644 index 0000000..75a387a --- /dev/null +++ b/net/nfs-server/files/nfsd.exports @@ -0,0 +1 @@ +/mnt (ro,all_squash,insecure) diff --git a/net/nfs-server/files/nfsd.init b/net/nfs-server/files/nfsd.init new file mode 100644 index 0000000..183441c --- /dev/null +++ b/net/nfs-server/files/nfsd.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 +STOP=50 + +start() { + /usr/sbin/portmap + /usr/sbin/rpc.mountd -r + /usr/sbin/rpc.nfsd +} + +stop() { + killall rpc.nfsd + killall rpc.mountd + killall portmap +} diff --git a/net/nfs-server/patches/001-build_config.patch b/net/nfs-server/patches/001-build_config.patch new file mode 100644 index 0000000..5aa1cde --- /dev/null +++ b/net/nfs-server/patches/001-build_config.patch @@ -0,0 +1,67 @@ +--- nfs-server-2.2beta47.old/site.mk 1970-01-01 01:00:00.000000000 +0100 ++++ nfs-server-2.2beta47/site.mk 2005-03-24 22:42:20.000000000 +0100 +@@ -0,0 +1,11 @@ ++# ++# Site-specific make options generated by BUILD. Please do not edit. ++# ++ ++# ugidd support ++UGIDD_PROG= ++UGIDD_MAN= ++# Location of tcp_wrapper library ++LIBWRAP_DIR=-L/usr/share/stuff/src/openwrt/experimental/buildroot/build_mipsel/staging_dir/lib ++LIBWRAP_LIB=-lwrap ++DEVTAB_FILE= +--- nfs-server-2.2beta47.old/site.h 1970-01-01 01:00:00.000000000 +0100 ++++ nfs-server-2.2beta47/site.h 2005-03-24 22:44:19.000000000 +0100 +@@ -0,0 +1,50 @@ ++/* ++ * Site-specific configuration options generated by BUILD. ++ * Please do not edit. ++ */ ++ ++/* ++ * If ENABLE_DEVTAB is defined, nfsd will use the new inode ++ * number generation scheme for avoiding inode number clashes ++ * on big hard disks. ++ */ ++/* #undef ENABLE_DEVTAB */ ++ ++/* ++ * If MULTIPLE_SERVER_READWRITE is defined, you will be able ++ * to run several nfsd process in parallel servicing all NFS ++ * requests. ++ */ ++#define MULTIPLE_SERVERS_READWRITE ++ ++/* ++ * If ENABLE_UGID_DAEMON is defined, the real rpc.ugidd is built, ++ * nfsd is built to support ugidd queries. ++ * Otherwise, a dummy program is created ++ */ ++/* #undef ENABLE_UGID_DAEMON */ ++ ++/* ++ * If ENABLE_UGID_NIS is defined, nfsd will support user mapping ++ * vie the client's NIS server. ++ */ ++/* #undef ENABLE_UGID_NIS */ ++ ++/* ++ * if HOSTS_ACCESS is defined, ugidd uses host access control ++ * provided by libwrap.a from tcp_wrappers ++ */ ++#define HOSTS_ACCESS ++ ++/* ++ * Define correct ownership of export control file ++ */ ++#define EXPORTSOWNERUID ((uid_t) 0) ++#define EXPORTSOWNERGID ((gid_t) 0) ++ ++/* ++ * If WANT_LOG_MOUNTS is defined, every mount request will be logged ++ * to syslogd with the name of source site and a path that was ++ * it requested ++ */ ++#define WANT_LOG_MOUNTS diff --git a/net/nfs-server/patches/002-cross_compile_fix.patch b/net/nfs-server/patches/002-cross_compile_fix.patch new file mode 100644 index 0000000..646a34a --- /dev/null +++ b/net/nfs-server/patches/002-cross_compile_fix.patch @@ -0,0 +1,149 @@ +diff -urN nfs-server-2.2beta47.old/configure nfs-server-2.2beta47/configure +--- nfs-server-2.2beta47.old/configure 1999-06-11 12:06:04.000000000 +0200 ++++ nfs-server-2.2beta47/configure 2005-03-24 22:24:39.000000000 +0100 +@@ -1960,7 +1960,7 @@ + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test "$cross_compiling" = yes; then +- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&6 + else + if test "$cross_compiling" = yes; then +- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&6 + else + if test "$cross_compiling" = yes; then +- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&6 + else + if test "$cross_compiling" = yes; then +- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&6 + else + if test "$cross_compiling" = yes; then +- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&6 + else + if test "$cross_compiling" = yes; then +- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&6 + else + if test "$cross_compiling" = yes; then +- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&6 + else + if test "$cross_compiling" = yes; then +- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext <&6 + else + if test "$cross_compiling" = yes; then +- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } ++ { echo "configure: error: can not run test program while cross compiling" 1>&2; } + else + cat > conftest.$ac_ext < + + #ifdef HAVE_SYSLOG_H + #include +--- nfs-server-2.2beta47.old/fh.c 1999-11-10 10:41:14.000000000 +0100 ++++ nfs-server-2.2beta47/fh.c 2005-03-24 22:50:50.000000000 +0100 +@@ -50,6 +50,7 @@ + */ + + #include ++#include + #include "nfsd.h" + #include "rpcmisc.h" + #include "signals.h" +@@ -350,7 +351,7 @@ + #ifndef ENABLE_DEVTAB + psi_t dmajor, dminor; + +-#if SIZEOF_DEV_T == 4 ++#if (SIZEOF_DEV_T == 4) + /* This folds the upper 16 bits into bits 8..15, and + * the lower 16 bits into bits 0..7 + */ +--- nfs-server-2.2beta47.old/ugid_map.c 2005-03-24 22:34:56.000000000 +0100 ++++ nfs-server-2.2beta47/ugid_map.c 2005-03-24 22:54:00.000000000 +0100 +@@ -34,14 +34,8 @@ + #define UGID_CHUNK0_BYTES (UGID_CHUNK * sizeof(idmap_t)) + #define UGID_EXPIRE 300 /* 5 minutes */ + +-/* +- * Make sure we get the right size for ugid_t +- */ +-#if SIZEOF_UID_T != SIZEOF_GID_T +-#error Sorry, this code relies on sizeof(uid_t) == sizeof(gid_t) +-#endif + +-#define UGID_BITS (SIZEOF_UID_T * BITSPERBYTE) ++#define UGID_BITS (sizeof(uid_t) * BITSPERBYTE) + #define BITSTOLEVEL(b) ((UGID_BITS - (b)) / UGID_CHUNK_BITS - 1) + #define UGID_LOWER(id, b) ((id) & ~((1 << (b)) - 1)) + #define UGID_UPPER(id, b) (((id + (1 << (b))) & ~((1 << (b)) - 1))-1) diff --git a/net/nfs-server/patches/003-debian_subset.patch b/net/nfs-server/patches/003-debian_subset.patch new file mode 100644 index 0000000..2ac3f93 --- /dev/null +++ b/net/nfs-server/patches/003-debian_subset.patch @@ -0,0 +1,698 @@ +--- nfs-user-server-2.2beta47.orig/BUILD ++++ nfs-user-server-2.2beta47/BUILD +@@ -48,7 +48,7 @@ + shift + done + +-function read_yesno { ++read_yesno() { + ans="" + echo >&2 + default=$2 +@@ -84,7 +84,7 @@ + echo $ans + } + +-function read_ugid { ++read_ugid() { + ans="" + prompt="$2 [default $3 $4] " + default=$3 +@@ -145,7 +145,7 @@ + + if ! $batch; then + echo -n "Please press return to continue" +- read ++ read ans + fi + + version=`cat .version` +--- nfs-user-server-2.2beta47.orig/Makefile.in ++++ nfs-user-server-2.2beta47/Makefile.in +@@ -95,20 +95,20 @@ + LIBSRCS = fileblocks.c fsusage.c realpath.c strerror.c \ + utimes.c mkdir.c rename.c getopt.c getopt_long.c \ + alloca.c mountlist.c xmalloc.c \ +- xstrdup.c strdup.c strstr.c nfsmounted.c faccess.c \ ++ xstrdup.c strdup.c strstr.c nfsmounted.c \ + haccess.c failsafe.c signals.c + XDRFILES = mount.x nfs_prot.x + GENFILES = mount.h mount_xdr.c mount_svc.c nfs_prot.h nfs_prot_xdr.c \ + ugid.h ugid_xdr.c ugid_clnt.c + HDRS = system.h nfsd.h auth.h fh.h logging.h fakefsuid.h \ +- rpcmisc.h faccess.h rquotad.h rquota.h haccess.h ++ rpcmisc.h rquotad.h rquota.h haccess.h + LIBHDRS = fsusage.h getopt.h mountlist.h failsafe.h signals.h + MANPAGES5 = exports + MANPAGES8p = mountd nfsd $(UGIDD_MAN) + MANPAGES8 = showmount + MANPAGES = $(MANPAGES5) $(MANPAGES8p) $(MANPAGES8) + LIBOBJS = version.o fsusage.o mountlist.o xmalloc.o xstrdup.o \ +- nfsmounted.o faccess.o haccess.o failsafe.o \ ++ nfsmounted.o haccess.o failsafe.o \ + signals.o @LIBOBJS@ @ALLOCA@ + OBJS = logging.o fh.o devtab.o auth_init.o auth_clnt.o auth.o + NFSD_OBJS = nfsd.o rpcmisc.o nfs_dispatch.o getattr.o setattr.o \ +@@ -116,7 +116,7 @@ + MOUNTD_OBJS = mountd.o rpcmisc.o mount_dispatch.o mount_xdr.o rmtab.o \ + $(OBJS) + SHOWMOUNT_OBJS = showmount.o mount_xdr.o +-UGIDD_OBJS = ugidd.o ugid_xdr.o logging.o ++UGIDD_OBJS = ugidd.o ugid_xdr.o logging.o rpcmisc.o + DAEMONS = $(rpcprefix)mountd $(rpcprefix)nfsd $(UGIDD_PROG) + CLIENTS = showmount + +--- nfs-user-server-2.2beta47.orig/auth.c ++++ nfs-user-server-2.2beta47/auth.c +@@ -143,6 +143,21 @@ + return okay; + } + ++static inline int ++auth_atob(const char *name, struct in_addr *ap) ++{ ++ int m; ++ ++ if (!isdigit(*name)) ++ return 0; ++ for (m = 0; isdigit(*name); name++) ++ m = m * 10 + (unsigned char) *name - '0'; ++ if (m > 32) ++ return 0; ++ ap->s_addr = m ? ~((1 << (32 - m)) - 1) : 0; ++ return 1; ++} ++ + /* + * Get a client entry for a specific name or pattern. + * If necessary, this function performs a hostname lookup to +@@ -614,7 +629,9 @@ + if (auth_aton(hname, &haddr, &ename)) { + if (*ename == '\0') + is_hostaddr = 1; +- else if (*ename == '/' && auth_aton(ename+1, &hmask, NULL)) ++ else if (*ename == '/' && ++ (auth_aton(ename+1, &hmask, NULL) || ++ auth_atob(ename+1, &hmask))) + is_netmask = 1; + } + is_special = is_wildcard + is_netgroup + is_netmask; +--- nfs-user-server-2.2beta47.orig/auth_init.c ++++ nfs-user-server-2.2beta47/auth_init.c +@@ -23,6 +23,7 @@ + #define EXPORTSFILE "/etc/exports" + #endif + ++#if 0 + /* Support for file access control on /etc/exports by Alex Yuriev. */ + #include "faccess.h" + #ifndef EXPORTSOWNERUID +@@ -31,6 +32,7 @@ + #ifndef EXPORTSOWNERGID + #define EXPORTSOWNERGID ((gid_t) 0) + #endif ++#endif + + exportnode * export_list = NULL; + int allow_non_root = 0; +@@ -395,6 +397,7 @@ + auth_file = fname; /* Save for re-initialization */ + + /* Check protection of exports file. */ ++#if 0 /* A man's house is his castle. */ + switch(iCheckAccess(auth_file, EXPORTSOWNERUID, EXPORTSOWNERGID)) { + case FACCESSWRITABLE: + Dprintf(L_ERROR, +@@ -409,6 +412,7 @@ + Dprintf(L_ERROR, "exiting because of security violation.\n"); + exit(1); + } ++#endif + + if ((ef = fopen(fname, "r")) == NULL) { + Dprintf(L_ERROR, "Could not open exports file %s: %s\n", +@@ -468,7 +472,7 @@ + + /* Build the RPC mount export list data structure. */ + resex = (exportnode *) xmalloc(sizeof *resex); +- resex->ex_dir = mount_point; ++ resex->ex_dir = xstrdup(path); + resex->ex_groups = NULL; + + #ifndef NEW_STYLE_EXPORTS_FILE +--- nfs-user-server-2.2beta47.orig/configure.in ++++ nfs-user-server-2.2beta47/configure.in +@@ -53,7 +53,7 @@ + AC_CHECK_LIB(crypt, main) + AC_CHECK_LIB(nys, main) + AC_REPLACE_FUNCS(strerror realpath mkdir rename utimes strdup strstr getopt getopt_long) +-AC_HAVE_FUNCS(getcwd seteuid setreuid getdtablesize setgroups lchown setsid setfsuid setfsgid innetgr quotactl authdes_getucred) ++AC_HAVE_FUNCS(getcwd seteuid setreuid getdtablesize setgroups lchown setsid setfsuid setfsgid innetgr quotactl authdes_getucred strsignal) + AC_AUTHDES_GETUCRED + AC_BROKEN_SETFSUID + AC_MOUNTLIST +--- nfs-user-server-2.2beta47.orig/exports.man ++++ nfs-user-server-2.2beta47/exports.man +@@ -8,7 +8,7 @@ + The file + .I /etc/exports + serves as the access control list for file systems which may be +-exported to NFS clients. It it used by both the NFS mount daemon, ++exported to NFS clients. It is used by both the NFS mount daemon, + .IR mountd (8) + and the NFS file server daemon + .IR nfsd (8). +@@ -75,11 +75,12 @@ + off, specify + .IR insecure . + .TP ++.IR ro ++Disallow the client to modify files and directories. The client is only ++allowed to issue read-only requests. ++.TP + .IR rw +-Allow the client to modify files and directories. The default is to +-restrict the client to read-only request, which can be made explicit +-by using the +-.IR ro " option. ++Allow the client to modify files and directories. This is the default. + .TP + .I noaccess + This makes everything below the directory inaccessible for the named +@@ -98,6 +99,14 @@ + .TP + .IR link_absolute + Leave all symbolic link as they are. This is the default operation. ++.SS Anonymous Entries ++.PP ++Entries where hosts are not specified are known as anonymous entries. They ++have different default settings compared to normal entries. The differences ++include ++.IR all_squash , ++.IR no_secure ", and" ++.IR ro . + .SS User ID Mapping + .PP + .I nfsd +--- nfs-user-server-2.2beta47.orig/failsafe.c ++++ nfs-user-server-2.2beta47/failsafe.c +@@ -10,8 +10,12 @@ + #include "logging.h" + #include "signals.h" + #include ++#ifdef HAVE_STRSIGNAL ++#include ++#else + + static const char * get_signame(int signo); ++#endif + + void + failsafe(int level, int ncopies) +@@ -111,9 +115,17 @@ + pid, running? "Continue" : "Exit"); + } else { + Dprintf(L_WARNING, "failsafe: " ++#ifdef HAVE_STRSIGNAL ++ "child %d terminated by: %s. " ++#else + "child %d terminated by %s. " ++#endif + "Restarting.", ++#ifdef HAVE_STRSIGNAL ++ pid, strsignal(signo)); ++#else + pid, get_signame(signo)); ++#endif + child = -1; /* Restart */ + } + } else if (WIFEXITED(status)) { +@@ -159,6 +171,7 @@ + /* NOP */ + } + ++#ifndef HAVE_STRSIGNAL + static const char * + get_signame(int signo) + { +@@ -199,3 +212,4 @@ + sprintf(namebuf, "signal #%d", signo); + return namebuf; + } ++#endif +--- nfs-user-server-2.2beta47.orig/mount_dispatch.c ++++ nfs-user-server-2.2beta47/mount_dispatch.c +@@ -131,7 +131,7 @@ + dent = &dtbl[proc_index]; + + memset(&argument, 0, dent->arg_size); +- if (!svc_getargs(transp, (xdrproc_t) dent->xdr_argument, &argument)) { ++ if (!svc_getargs(transp, (xdrproc_t) dent->xdr_argument, (caddr_t) &argument)) { + svcerr_decode(transp); + goto done; + } +@@ -148,7 +148,7 @@ + if (!svc_sendreply(transp, dent->xdr_result, (caddr_t) resp)) { + svcerr_systemerr(transp); + } +- if (!svc_freeargs(transp, (xdrproc_t) dent->xdr_argument, &argument)) { ++ if (!svc_freeargs(transp, (xdrproc_t) dent->xdr_argument, (caddr_t) &argument)) { + Dprintf(L_ERROR, "unable to free RPC arguments, exiting\n"); + exit(1); + } +--- nfs-user-server-2.2beta47.orig/mount_xdr.c ++++ nfs-user-server-2.2beta47/mount_xdr.c +@@ -190,7 +190,7 @@ + xdr_ppathcnf(XDR *xdrs, ppathcnf *objp) + { + +- register long *buf=buf; ++ int32_t *buf=buf; + + int i=i; + +--- nfs-user-server-2.2beta47.orig/mountd.c ++++ nfs-user-server-2.2beta47/mountd.c +@@ -310,6 +310,7 @@ + int c; + + program_name = argv[0]; ++ chdir("/"); + + /* Parse the command line options and arguments. */ + opterr = 0; +--- nfs-user-server-2.2beta47.orig/nfs_dispatch.c ++++ nfs-user-server-2.2beta47/nfs_dispatch.c +@@ -147,7 +147,7 @@ + nfsclient = NULL; + + memset(&argument, 0, dent->arg_size); +- if (!svc_getargs(transp, (xdrproc_t) dent->xdr_argument, &argument)) { ++ if (!svc_getargs(transp, (xdrproc_t) dent->xdr_argument, (caddr_t) &argument)) { + svcerr_decode(transp); + goto done; + } +@@ -173,7 +173,7 @@ + svc_sendreply(transp, dent->xdr_result, (caddr_t) &result); + #endif + +- if (!svc_freeargs(transp, (xdrproc_t) dent->xdr_argument, &argument)) { ++ if (!svc_freeargs(transp, (xdrproc_t) dent->xdr_argument, (caddr_t) &argument)) { + Dprintf(L_ERROR, "unable to free RPC arguments, exiting\n"); + exit(1); + } +--- nfs-user-server-2.2beta47.orig/nfs_prot_xdr.c ++++ nfs-user-server-2.2beta47/nfs_prot_xdr.c +@@ -98,7 +98,7 @@ + xdr_fattr(XDR *xdrs, fattr *objp) + { + +- register long *buf=buf; ++ int32_t *buf=buf; + + + if (xdrs->x_op == XDR_ENCODE) { +@@ -273,7 +273,7 @@ + xdr_sattr(XDR *xdrs, sattr *objp) + { + +- register long *buf=buf; ++ int32_t *buf=buf; + + + if (xdrs->x_op == XDR_ENCODE) { +@@ -553,7 +553,7 @@ + xdr_writeargs(XDR *xdrs, writeargs *objp) + { + +- register long *buf = buf; ++ int32_t *buf = buf; + + + if (xdrs->x_op == XDR_ENCODE) { +@@ -777,7 +777,7 @@ + xdr_statfsokres(XDR *xdrs, statfsokres *objp) + { + +- register long *buf=buf; ++ int32_t *buf=buf; + + + if (xdrs->x_op == XDR_ENCODE) { +--- nfs-user-server-2.2beta47.orig/nfsd.c ++++ nfs-user-server-2.2beta47/nfsd.c +@@ -36,6 +36,7 @@ + #define CHK_READ 0 + #define CHK_WRITE 1 + #define CHK_NOACCESS 2 ++#define CHK_ROOT 4 + + /* Make larger reads possible. Without crashing the machine :-) */ + #undef NFS_MAXDATA +@@ -173,7 +174,8 @@ + return NULL; + } + +- auth_user(nfsmount, rqstp); ++ if (!(flags & CHK_ROOT) || strcmp(nfsmount->path, fhc->path)) ++ auth_user(nfsmount, rqstp); + + *statp = NFS_OK; + return fhc; +@@ -244,7 +246,7 @@ + nfsstat status; + fhcache *fhc; + +- fhc = auth_fh(rqstp, argp, &status, CHK_READ); ++ fhc = auth_fh(rqstp, argp, &status, CHK_READ | CHK_ROOT); + if (fhc == NULL) + return status; + +@@ -575,7 +577,12 @@ + #endif + + /* MvS: Some clients use chardev 0xFFFF for a FIFO. */ ++#if defined(major) && defined(minor) ++ if (S_ISCHR(argp->attributes.mode) && ++ major(dev) == 0xff && minor(dev) == 0xff) { ++#else + if (S_ISCHR(argp->attributes.mode) && dev == 0xFFFF) { ++#endif + is_borc = 0; + dev = 0; + argp->attributes.mode &= ~S_IFMT; +@@ -882,7 +889,9 @@ + + /* This code is from Mark Shand's version */ + errno = 0; +- if (efs_lstat(h->path, &sbuf) < 0 || !(S_ISDIR(sbuf.st_mode))) ++ if (efs_lstat(h->path, &sbuf) < 0) ++ return (NFSERR_ACCES); ++ if (!S_ISDIR(sbuf.st_mode)) + return (NFSERR_NOTDIR); + if ((dirp = efs_opendir(h->path)) == NULL) + return ((errno ? nfs_errno() : NFSERR_NAMETOOLONG)); +@@ -940,7 +949,7 @@ + char *path; + struct fs_usage fs; + +- fhc = auth_fh(rqstp, argp, &status, CHK_READ | CHK_NOACCESS); ++ fhc = auth_fh(rqstp, argp, &status, CHK_READ | CHK_NOACCESS | CHK_ROOT); + if (fhc == NULL) + return status; + path = fhc->path; +--- nfs-user-server-2.2beta47.orig/rpcmisc.c ++++ nfs-user-server-2.2beta47/rpcmisc.c +@@ -64,25 +64,25 @@ + asize = sizeof(saddr); + sock = 0; + if (getsockname(0, (struct sockaddr *) &saddr, &asize) == 0) { +- int ssize = sizeof (int); ++ int ssize = sizeof (i); + + if (saddr.sin_family != AF_INET) + goto not_inetd; +- if (getsockopt(0, SOL_SOCKET, SO_TYPE, &_rpcfdtype, &ssize) < 0) ++ if (getsockopt(0, SOL_SOCKET, SO_TYPE, &i, &ssize) < 0) + goto not_inetd; ++ _rpcfdtype = i; + background_logging(); /* no more logging to stderr */ + closedown = time(NULL) + _RPCSVC_CLOSEDOWN; + _rpcpmstart = 1; + } else { + not_inetd: +- _rpcfdtype = 0; + for (i = 0; (vers = verstbl[i]) != 0; i++) + pmap_unset(prog, vers); + sock = RPC_ANYSOCK; + } + + if ((_rpcfdtype == 0) || (_rpcfdtype == SOCK_DGRAM)) { +- if (_rpcfdtype == 0 && defport != 0) ++ if (_rpcpmstart == 0 && defport != 0) + sock = makesock(defport, IPPROTO_UDP, bufsiz); + transp = svcudp_create(sock); + if (transp == NULL) +@@ -97,7 +97,7 @@ + } + + if ((_rpcfdtype == 0) || (_rpcfdtype == SOCK_STREAM)) { +- if (_rpcfdtype == 0 && defport != 0) ++ if (_rpcpmstart == 0 && defport != 0) + sock = makesock(defport, IPPROTO_TCP, bufsiz); + transp = svctcp_create(sock, 0, 0); + if (transp == NULL) +@@ -220,11 +220,14 @@ + } + #endif /* SO_SNDBUF */ + +- if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) == -1) +- Dprintf(L_FATAL, "Could not bind %s socket to %s:%d: %s\n", ++ if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) == -1) { ++ Dprintf(L_ERROR, "Could not bind %s socket to %s:%d: %s\n", + prot_name, inet_ntoa(sin.sin_addr), + ntohs(sin.sin_port), + strerror(errno)); ++ close(s); ++ s = RPC_ANYSOCK; ++ } + + return (s); + } +--- nfs-user-server-2.2beta47.orig/showmount.c ++++ nfs-user-server-2.2beta47/showmount.c +@@ -200,7 +200,7 @@ + memset(&exportlist, '\0', sizeof(exportlist)); + clnt_stat = clnt_call(mclient, MOUNTPROC_EXPORT, + (xdrproc_t) xdr_void, NULL, +- (xdrproc_t) xdr_exports, &exportlist, ++ (xdrproc_t) xdr_exports, (caddr_t) &exportlist, + total_timeout); + if (clnt_stat != RPC_SUCCESS) { + clnt_perror(mclient, "rpc mount export"); +@@ -233,7 +233,7 @@ + memset(&dumplist, '\0', sizeof(dumplist)); + clnt_stat = clnt_call(mclient, MOUNTPROC_DUMP, + (xdrproc_t) xdr_void, NULL, +- (xdrproc_t) xdr_mountlist, &dumplist, ++ (xdrproc_t) xdr_mountlist, (caddr_t) &dumplist, + total_timeout); + if (clnt_stat != RPC_SUCCESS) { + clnt_perror(mclient, "rpc mount dump"); +--- nfs-user-server-2.2beta47.orig/ugid_clnt.c ++++ nfs-user-server-2.2beta47/ugid_clnt.c +@@ -16,7 +16,7 @@ + static int clnt_res; + + memset((char *)&clnt_res, 0, sizeof(clnt_res)); +- if (clnt_call(clnt, AUTHENTICATE, (xdrproc_t) xdr_int, argp, (xdrproc_t) xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS) { ++ if (clnt_call(clnt, AUTHENTICATE, (xdrproc_t) xdr_int, (caddr_t) argp, (xdrproc_t) xdr_int, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&clnt_res); +@@ -28,7 +28,7 @@ + static int clnt_res; + + memset((char *)&clnt_res, 0, sizeof(clnt_res)); +- if (clnt_call(clnt, NAME_UID, (xdrproc_t) xdr_ugname, argp, (xdrproc_t) xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS) { ++ if (clnt_call(clnt, NAME_UID, (xdrproc_t) xdr_ugname, (caddr_t) argp, (xdrproc_t) xdr_int, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&clnt_res); +@@ -40,7 +40,7 @@ + static int clnt_res; + + memset((char *)&clnt_res, 0, sizeof(clnt_res)); +- if (clnt_call(clnt, GROUP_GID, (xdrproc_t) xdr_ugname, argp, (xdrproc_t) xdr_int, &clnt_res, TIMEOUT) != RPC_SUCCESS) { ++ if (clnt_call(clnt, GROUP_GID, (xdrproc_t) xdr_ugname, (caddr_t) argp, (xdrproc_t) xdr_int, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&clnt_res); +@@ -52,7 +52,7 @@ + static ugname clnt_res; + + memset((char *)&clnt_res, 0, sizeof(clnt_res)); +- if (clnt_call(clnt, UID_NAME, (xdrproc_t) xdr_int, argp, (xdrproc_t) xdr_ugname, &clnt_res, TIMEOUT) != RPC_SUCCESS) { ++ if (clnt_call(clnt, UID_NAME, (xdrproc_t) xdr_int, (caddr_t) argp, (xdrproc_t) xdr_ugname, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&clnt_res); +@@ -64,7 +64,7 @@ + static ugname clnt_res; + + memset((char *)&clnt_res, 0, sizeof(clnt_res)); +- if (clnt_call(clnt, GID_GROUP, (xdrproc_t) xdr_int, argp, (xdrproc_t) xdr_ugname, &clnt_res, TIMEOUT) != RPC_SUCCESS) { ++ if (clnt_call(clnt, GID_GROUP, (xdrproc_t) xdr_int, (caddr_t) argp, (xdrproc_t) xdr_ugname, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&clnt_res); +--- nfs-user-server-2.2beta47.orig/ugid_map.c ++++ nfs-user-server-2.2beta47/ugid_map.c +@@ -602,7 +602,7 @@ + * the server's port after clntudp_create, so we fetch it + * explicitly. + */ +- clnt_control(clnt, CLGET_SERVER_ADDR, &addr); ++ clnt_control(clnt, CLGET_SERVER_ADDR, (caddr_t) &addr); + if (!SECURE_PORT(addr.sin_port)) { + Dprintf(L_ERROR, "%s on %s runs on unprivileged port.\n", + name, inet_ntoa(addr.sin_addr)); +--- nfs-user-server-2.2beta47.orig/ugidd.c ++++ nfs-user-server-2.2beta47/ugidd.c +@@ -20,6 +20,8 @@ + #include "ugid.h" + #include "logging.h" + #include "haccess.h" ++#include "rpcmisc.h" ++#include "signals.h" + #ifdef HAVE_LIBWRAP_BUG + #include + #endif +@@ -27,6 +29,8 @@ + + static void ugidprog_1(struct svc_req *rqstp, SVCXPRT *transp); + static void usage(void); ++static void terminate(void); ++static RETSIGTYPE sigterm(int sig); + + #ifndef HAVE_RPCGEN_C + #define authenticate_1_svc authenticate_1 +@@ -39,17 +43,23 @@ + + static struct option longopts[] = { + { "debug", 0, 0, 'd' }, ++ { "port", required_argument, 0, 'P' }, + { NULL, 0, 0, 0 } + }; + ++static int ugidd_versions[] = { ++ UGIDVERS, ++ 0 ++}; ++ + int + main(argc, argv) + int argc; + char **argv; + { +- SVCXPRT *transp; + int c, longind; + int foreground = 0; ++ int port = 0; + + #ifndef HOSTS_ACCESS + fprintf(stderr, +@@ -59,40 +69,34 @@ + sleep(1); + #endif + +- while ((c = getopt_long(argc, argv, "d", longopts, &longind)) != EOF) { ++ chdir("/"); ++ ++ while ((c = getopt_long(argc, argv, "dP:", longopts, &longind)) != EOF) { + switch (c) { + case 'd': + foreground = 1; + enable_logging("ugid"); + break; ++ case 'P': ++ port = atoi(optarg); ++ if (port <= 0 || port > 65535) { ++ fprintf(stderr, "ugidd: bad port number: %s\n", ++ optarg); ++ usage(); ++ } ++ break; + default: + usage(); + } + } + +- (void)pmap_unset(UGIDPROG, UGIDVERS); ++ log_open("ugidd", foreground); + +- transp = svcudp_create(RPC_ANYSOCK); +- if (transp == NULL) { +- (void)fprintf(stderr, "cannot create udp service.\n"); +- exit(1); +- } +- if (!svc_register(transp, UGIDPROG, UGIDVERS, ugidprog_1, IPPROTO_UDP)) { +- fprintf(stderr, "unable to register (UGIDPROG, UGIDVERS, UDP)\n"); +- exit(1); +- } +- +- transp = svctcp_create(RPC_ANYSOCK, 0, 0); +- if (transp == NULL) { +- fprintf(stderr, "cannot create tcp service.\n"); +- exit(1); +- } +- if (!svc_register(transp, UGIDPROG, UGIDVERS, ugidprog_1, IPPROTO_TCP)) { +- fprintf(stderr, "unable to register (UGIDPROG, UGIDVERS, TCP)\n"); +- exit(1); +- } ++ /* Create services and register with portmapper */ ++ _rpcfdtype = SOCK_DGRAM; ++ rpc_init("ugidd", UGIDPROG, ugidd_versions, ugidprog_1, port, 0); + +- if (!foreground) { ++ if (!foreground && !_rpcpmstart) { + if ((c = fork()) > 0) + exit(0); + if (c < 0) { +@@ -117,7 +121,8 @@ + #endif + } + +- log_open("ugidd", foreground); ++ install_signal_handler(SIGTERM, sigterm); ++ atexit(terminate); + + svc_run(); + Dprintf(L_ERROR, "svc_run returned\n"); +@@ -127,7 +132,7 @@ + static void + usage() + { +- fprintf(stderr, "rpc.ugidd: [-d]\n"); ++ fprintf(stderr, "rpc.ugidd: [-d] [-P port]\n"); + exit (2); + } + +@@ -188,7 +193,7 @@ + return; + } + bzero((char *)&argument, sizeof(argument)); +- if (!svc_getargs(transp, xdr_argument, &argument)) { ++ if (!svc_getargs(transp, xdr_argument, (caddr_t) &argument)) { + svcerr_decode(transp); + return; + } +@@ -196,7 +201,7 @@ + if (result != NULL && !svc_sendreply(transp, xdr_result, result)) { + svcerr_systemerr(transp); + } +- if (!svc_freeargs(transp, xdr_argument, &argument)) { ++ if (!svc_freeargs(transp, xdr_argument, (caddr_t) &argument)) { + (void)fprintf(stderr, "unable to free arguments\n"); + exit(1); + } +@@ -321,6 +326,19 @@ + } + + ++static RETSIGTYPE ++sigterm(int sig) ++{ ++ exit(0); ++} ++ ++static void ++terminate(void) ++{ ++ rpc_exit(UGIDPROG, ugidd_versions); ++} ++ ++ + + #else /* ENABLE_UGID_DAEMON */ + diff --git a/net/nfs-server/patches/004-gcc34_fix.patch b/net/nfs-server/patches/004-gcc34_fix.patch new file mode 100644 index 0000000..21915ce --- /dev/null +++ b/net/nfs-server/patches/004-gcc34_fix.patch @@ -0,0 +1,24 @@ +diff -urN nfs-server-2.2beta47.old/fh.c nfs-server-2.2beta47.dev/fh.c +--- nfs-server-2.2beta47.old/fh.c 2005-04-29 00:37:48.000000000 +0200 ++++ nfs-server-2.2beta47.dev/fh.c 2005-04-29 00:39:44.000000000 +0200 +@@ -351,13 +351,13 @@ + #ifndef ENABLE_DEVTAB + psi_t dmajor, dminor; + +-#if (SIZEOF_DEV_T == 4) +- /* This folds the upper 16 bits into bits 8..15, and +- * the lower 16 bits into bits 0..7 +- */ +- dev = (((dev >> 16) & 0xff00) ^ ((dev >> 8) & 0xff00)) | +- (((dev >> 8) & 0xff) ^ (dev & 0xff)); +-#endif ++ if (sizeof(dev_t) == 4) { ++ /* This folds the upper 16 bits into bits 8..15, and ++ * the lower 16 bits into bits 0..7 ++ */ ++ dev = (((dev >> 16) & 0xff00) ^ ((dev >> 8) & 0xff00)) | ++ (((dev >> 8) & 0xff) ^ (dev & 0xff)); ++ } + + /* + * Assuming major and minor numbers are small integers, diff --git a/net/nfs-server/patches/005-remove_warning.patch b/net/nfs-server/patches/005-remove_warning.patch new file mode 100644 index 0000000..5484b79 --- /dev/null +++ b/net/nfs-server/patches/005-remove_warning.patch @@ -0,0 +1,30 @@ +--- nfs-server-2.2beta47.old/auth_clnt.c 1999-11-10 10:18:06.000000000 +0100 ++++ nfs-server-2.2beta47/auth_clnt.c 2005-03-24 23:44:16.000000000 +0100 +@@ -238,19 +238,23 @@ + + /* First, set the user ID. */ + if (auth_uid != cred_uid) { +- if (setfsuid(cred_uid) < 0) ++ if (setfsuid(cred_uid) < 0) { ++#if 0 + Dprintf(L_ERROR, "Unable to setfsuid %d: %s\n", + cred_uid, strerror(errno)); +- else ++#endif ++ } else + auth_uid = cred_uid; + } + + /* Next, the group ID. */ + if (auth_gid != cred_gid) { +- if (setfsgid(cred_gid) < 0) ++ if (setfsgid(cred_gid) < 0) { ++#if 0 + Dprintf(L_ERROR, "Unable to setfsgid %d: %s\n", + cred_gid, strerror(errno)); +- else ++#endif ++ } else + auth_gid = cred_gid; + } + diff --git a/net/nginx/Config.in b/net/nginx/Config.in new file mode 100644 index 0000000..b24a3f3 --- /dev/null +++ b/net/nginx/Config.in @@ -0,0 +1,39 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +menu "Configuration" + depends on PACKAGE_nginx + +config NGINX_STUB_STATUS + bool + prompt "Enable stub status module" + default n + help + Enable the stub status module which gives some status from the server. + +config NGINX_FLV + bool + prompt "Enable FLV module" + default n + help + Provides the ability to seek within FLV (Flash) files using time-based offsets. + +config NGINX_SSL + bool + prompt "Enable SSL module" + default n + help + Enable HTTPS/SSL support. + +config NGINX_DAV + bool + prompt "Enable WebDAV module" + default n + help + Enable the HTTP and WebDAV methods PUT, DELETE, MKCOL, COPY and MOVE. + +endmenu diff --git a/net/nginx/Makefile b/net/nginx/Makefile new file mode 100644 index 0000000..26d862c --- /dev/null +++ b/net/nginx/Makefile @@ -0,0 +1,117 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nginx +PKG_VERSION:=0.7.67 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://sysoev.ru/nginx/ +PKG_MD5SUM:=b6e175f969d03a4d3c5643aaabc6a5ff + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +PKG_CONFIG_DEPENDS:=\ + CONFIG_NGINX_STUB_STATUS \ + CONFIG_NGINX_FLV \ + CONFIG_NGINX_SSL \ + CONFIG_NGINX_DAV + +include $(INCLUDE_DIR)/package.mk + +define Package/nginx + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=Nginx web server + URL:=http://nginx.net/ + DEPENDS:=+libpcre +NGINX_SSL:libopenssl +zlib + MENU:=1 +endef + +define Package/nginx/description + Nginx is a free, open-source, high-performance HTTP server + and reverse proxy, as well as an IMAP/POP3 proxy server, + written by Igor Sysoev. +endef + +define Package/nginx/config + source "$(SOURCE)/Config.in" +endef + +config_files=nginx.conf mime.types fastcgi_params koi-utf koi-win win-utf + +define Package/nginx/conffiles +/etc/nginx/nginx.conf +/etc/nginx/mime.types +/etc/nginx/fastcgi_params +/etc/nginx/koi-utf +/etc/nginx/koi-win +/etc/nginx/win-utf +endef + +ADDITIONAL_MODULES:= + +ifeq ($(CONFIG_IPV6),y) + ADDITIONAL_MODULES += --with-ipv6 +endif +ifeq ($(CONFIG_NGINX_STUB_STATUS),y) + ADDITIONAL_MODULES += --with-http_stub_status_module +endif +ifeq ($(CONFIG_NGINX_FLV),y) + ADDITIONAL_MODULES += --with-http_flv_module +endif +ifeq ($(CONFIG_NGINX_SSL),y) + ADDITIONAL_MODULES += --with-http_ssl_module +else + ADDITIONAL_MODULES += --without-http-cache +endif +ifeq ($(CONFIG_NGINX_DAV),y) + ADDITIONAL_MODULES += --with-http_dav_module +endif + +define Build/Configure + # TODO: fix --crossbuild + (cd $(PKG_BUILD_DIR) ;\ + ./configure \ + --crossbuild=Linux::$(ARCH) \ + --prefix=/usr \ + --conf-path=/etc/nginx/nginx.conf \ + --error-log-path=/var/log/nginx/error.log \ + --pid-path=/var/run/nginx.pid \ + --lock-path=/var/lock/nginx.lock \ + --http-log-path=/var/log/nginx/access.log \ + --http-client-body-temp-path=/var/lib/nginx/body \ + --http-proxy-temp-path=/var/lib/nginx/proxy \ + --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \ + --with-cc="$(TARGET_CC)" \ + --with-cc-opt="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ + --with-ld-opt="$(TARGET_LDFLAGS)" \ + $(ADDITIONAL_MODULES) ) +endef + +define Build/Compile + $(call Build/Compile/Default,build) +endef + +define Package/nginx/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nginx $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/nginx + $(INSTALL_DATA) $(addprefix $(PKG_INSTALL_DIR)/etc/nginx/,$(config_files)) $(1)/etc/nginx + # make nginx bind on both IPv4 and IPv6 by default, when available + ifeq ($(CONFIG_IPV6),y) + $(SED) 's/listen\( \+\)80;/listen\1[::]:80;/' $(1)/etc/nginx/nginx.conf + endif + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/nginx.init $(1)/etc/init.d/nginx +endef + +$(eval $(call BuildPackage,nginx)) diff --git a/net/nginx/files/nginx.init b/net/nginx/files/nginx.init new file mode 100644 index 0000000..cfda3c8 --- /dev/null +++ b/net/nginx/files/nginx.init @@ -0,0 +1,24 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009 OpenWrt.org + +START=50 +NGINX_BIN=/usr/sbin/nginx + +start() { + mkdir -p /var/log/nginx + mkdir -p /var/lib/nginx + $NGINX_BIN +} + +stop() { + $NGINX_BIN -s stop +} + +reload() { + $NGINX_BIN -s reload +} + +shutdown() { + $NGINX_BIN -s quit +} + diff --git a/net/nginx/patches/001-feature_test_fix b/net/nginx/patches/001-feature_test_fix new file mode 100644 index 0000000..8efa25e --- /dev/null +++ b/net/nginx/patches/001-feature_test_fix @@ -0,0 +1,136 @@ +--- a/auto/cc/conf ++++ b/auto/cc/conf +@@ -135,7 +135,8 @@ if [ "$NGX_PLATFORM" != win32 ]; then + ngx_feature_test="char buf[30]; buf[0] = '0'; + var(0, buf, \"%d\", 1); + if (buf[0] != '1') return 1" +- . auto/feature ++ #. auto/feature ++ have=$ngx_feature_name . auto/have + + + if [ "$NGX_CC_NAME" = "ccc" ]; then +@@ -151,7 +152,8 @@ if [ "$NGX_PLATFORM" != win32 ]; then + ngx_feature_test="char buf[30]; buf[0] = '0'; + var(0, buf, \"%d\", 1); + if (buf[0] != '1') return 1" +- . auto/feature ++ #. auto/feature ++ have=$ngx_feature_name . auto/have + fi + + +--- a/auto/cc/name ++++ b/auto/cc/name +@@ -13,12 +13,12 @@ if [ "$NGX_PLATFORM" != win32 ]; then + ngx_feature_test= + . auto/feature + +- if [ $ngx_found = no ]; then +- echo +- echo $0: error: C compiler $CC is not found +- echo +- exit 1 +- fi ++ #if [ $ngx_found = no ]; then ++ # echo ++ # echo $0: error: C compiler $CC is not found ++ # echo ++ # exit 1 ++ #fi + + fi + +--- a/auto/os/linux ++++ b/auto/os/linux +@@ -49,7 +49,8 @@ ngx_feature_test="int efd = 0, fd = 1, n + ee.data.ptr = NULL; + efd = epoll_create(100); + if (efd == -1) return 1;" +-. auto/feature ++#. auto/feature ++have=$ngx_feature_name . auto/have + + if [ $ngx_found = yes ]; then + have=NGX_HAVE_CLEAR_EVENT . auto/have +@@ -73,7 +74,8 @@ ngx_feature_test="int s = 0, fd = 1; + ssize_t n; off_t off = 0; + n = sendfile(s, fd, &off, 1); + if (n == -1 && errno == ENOSYS) return 1" +-. auto/feature ++#. auto/feature ++have=$ngx_feature_name . auto/have + + if [ $ngx_found = yes ]; then + CORE_SRCS="$CORE_SRCS $LINUX_SENDFILE_SRCS" +@@ -94,7 +96,8 @@ ngx_feature_test="int s = 0, fd = 1; + ssize_t n; off_t off = 0; + n = sendfile(s, fd, &off, 1); + if (n == -1 && errno == ENOSYS) return 1" +-. auto/feature ++#. auto/feature ++have=$ngx_feature_name . auto/have + + + ngx_include="sys/prctl.h"; . auto/include +@@ -108,7 +111,8 @@ ngx_feature_incs="#include + ngx_feature_path= + ngx_feature_libs= + ngx_feature_test="if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) == -1) return 1" +-. auto/feature ++#. auto/feature ++have=$ngx_feature_name . auto/have + + + # sched_setaffinity() +--- a/auto/unix ++++ b/auto/unix +@@ -117,7 +117,7 @@ ngx_feature_path= + ngx_feature_libs= + ngx_feature_test="char buf[1024]; long n; n = strerror_r(1, buf, 1024); + if (n < 0 || n > 1024) return 1;" +-. auto/feature ++#. auto/feature + + + # GNU style strerror_r() returns not length, but pointer +@@ -130,7 +130,8 @@ ngx_feature_path= + ngx_feature_libs= + ngx_feature_test="char buf[1024]; long n; n = strerror_r(1, buf, 1024); + if (n >= 0 && n < 1024) return 1;" +-. auto/feature ++#. auto/feature ++have=$ngx_feature_name . auto/have + + + ngx_feature="localtime_r()" +@@ -173,7 +174,8 @@ ngx_feature_test="void *p; + p = mmap(NULL, 4096, PROT_READ|PROT_WRITE, + MAP_ANON|MAP_SHARED, -1, 0); + if (p == MAP_FAILED) return 1;" +-. auto/feature ++#. auto/feature ++have=$ngx_feature_name . auto/have + + + ngx_feature='mmap("/dev/zero", MAP_SHARED)' +@@ -188,7 +190,8 @@ ngx_feature_test='void *p; int fd; + fd = open("/dev/zero", O_RDWR); + p = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); + if (p == MAP_FAILED) return 1;' +-. auto/feature ++#. auto/feature ++have=$ngx_feature_name . auto/have + + + ngx_feature="System V shared memory" +@@ -202,7 +205,8 @@ ngx_feature_test="int id; + id = shmget(IPC_PRIVATE, 4096, (SHM_R|SHM_W|IPC_CREAT)); + if (id == -1) return 1; + shmctl(id, IPC_RMID, NULL);" +-. auto/feature ++#. auto/feature ++have=$ngx_feature_name . auto/have + + + ngx_feature="struct msghdr.msg_control" diff --git a/net/nginx/patches/002-sizeof_test_fix b/net/nginx/patches/002-sizeof_test_fix new file mode 100644 index 0000000..bea1080 --- /dev/null +++ b/net/nginx/patches/002-sizeof_test_fix @@ -0,0 +1,26 @@ +--- a/auto/types/sizeof ++++ b/auto/types/sizeof +@@ -23,8 +23,13 @@ $NGX_INCLUDE_UNISTD_H + $NGX_INCLUDE_INTTYPES_H + $NGX_INCLUDE_AUTO_CONFIG_H + ++char object_code_block[] = { ++ '\n', 'e', '4', 'V', 'A', ++ '0', 'x', ('0' + sizeof($ngx_type)), ++ 'Y', '3', 'p', 'M', '\n' ++}; ++ + int main() { +- printf("%d", sizeof($ngx_type)); + return 0; + } + +@@ -38,7 +43,7 @@ eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>& + + + if [ -x $NGX_AUTOTEST ]; then +- ngx_size=`$NGX_AUTOTEST` ++ ngx_size=`sed -ne 's/^e4VA0x\(.\)Y3pM$/\1/p' < $NGX_AUTOTEST` + echo " $ngx_size bytes" + fi + diff --git a/net/ngircd/Makefile b/net/ngircd/Makefile new file mode 100644 index 0000000..3649de9 --- /dev/null +++ b/net/ngircd/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ngircd +PKG_VERSION:=15 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:= \ + ftp://ngircd.barton.de/pub/ngircd/ \ + ftp://ftp.berlios.de/pub/ngircd/ +PKG_MD5SUM:=c183a85eba6fe51255983848f099c8ae + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ngircd + SECTION:=net + CATEGORY:=Network + SUBMENU:=Instant Messaging + DEPENDS:=+zlib + TITLE:=Next Generation IRC Server + URL:=http://ngircd.barton.de +endef + +define Package/ngircd/description + ngIRCd is an Open Source server for the Internet Relay Chat (IRC), which + is developed and published under the terms of the GNU General Public Licence. + ngIRCd means "next generation IRC daemon", it's written from scratch and + not deduced from the "grandfather of IRC daemons", the daemon of the IRCNet. +endef + +define Package/ngircd/conffiles +/etc/ngircd.conf +endef + +define Package/ngircd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ngircd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ngircd.conf $(1)/etc/ +endef + +$(eval $(call BuildPackage,ngircd)) diff --git a/net/ngrep/Makefile b/net/ngrep/Makefile new file mode 100644 index 0000000..a516b43 --- /dev/null +++ b/net/ngrep/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ngrep +PKG_VERSION:=1.45 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/ngrep +PKG_MD5SUM:=bc8150331601f3b869549c94866b4f1c + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ngrep + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap +libpcre + TITLE:=network grep + URL:=http://ngrep.sourceforge.net +endef + +define Package/ngrep/description + ngrep a pcap-aware tool that will allow you to specify extended + regular expressions to match against data payloads of packets. It + currently recognizes TCP, UDP, and ICMP across Ethernet, PPP, SLIP, + FDDI, Token Ring and null interfaces, and understands BPF filter + logic in the same fashion as more common packet sniffing tools, + like tcpdump and snoop. +endef + +CONFIGURE_ARGS+= \ + --with-pcap-includes=$(STAGING_DIR)/usr/include \ + --enable-pcre \ + --with-pcre=$(STAGING_DIR)/usr \ + --disable-dropprivs \ + +CONFIGURE_VARS+= \ + LDFLAGS="$(TARGET_LDFLAGS) -lpcre" \ + +define Package/ngrep/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ngrep $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,ngrep)) diff --git a/net/ngrep/patches/001-makefile_in.patch b/net/ngrep/patches/001-makefile_in.patch new file mode 100644 index 0000000..5d7ab09 --- /dev/null +++ b/net/ngrep/patches/001-makefile_in.patch @@ -0,0 +1,20 @@ +diff -u ngrep-1.45/Makefile.in ngrep-1.45.mod/Makefile.in +--- ngrep-1.45/Makefile.in Tue Nov 28 15:35:37 2006 ++++ ngrep-1.45.mod/Makefile.in Sat May 19 10:40:57 2007 +@@ -32,13 +32,13 @@ + + INSTALL = ./install-sh + +-REGEX_DIR=@REGEX_DIR@ +-REGEX_OBJS=@REGEX_OBJS@ ++REGEX_DIR= ++REGEX_OBJS= + + + all: $(TARGET) + +-$(TARGET): $(REGEX_OBJS) $(OBJS) ++$(TARGET): $(OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) $(STRIPFLAG) -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LIBS) + + debug: $(REGEX_OBJS) $(OBJS) \ No newline at end of file diff --git a/net/ngrep/patches/001-ngrep.patch b/net/ngrep/patches/001-ngrep.patch new file mode 100644 index 0000000..c3cb2e7 --- /dev/null +++ b/net/ngrep/patches/001-ngrep.patch @@ -0,0 +1,12 @@ +diff -ur ngrep-1.45/ngrep.c ngrep-1.45.mod/ngrep.c +--- ngrep-1.45/ngrep.c Tue Nov 28 15:38:43 2006 ++++ ngrep-1.45.mod/ngrep.c Sat May 19 10:21:27 2007 +@@ -92,7 +92,7 @@ + #endif + + #if USE_PCRE +-#include "pcre-5.0/pcre.h" ++#include "pcre.h" + #else + #include "regex-0.12/regex.h" + #endif diff --git a/net/nmap/Makefile b/net/nmap/Makefile new file mode 100644 index 0000000..f9e0789 --- /dev/null +++ b/net/nmap/Makefile @@ -0,0 +1,140 @@ +# +# Copyright (C) 2011 Nuno Goncalves +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +#TODO +# +# * uClibcpp not supported, performance +100x slower. libstdcpp is being used. https://bugs.busybox.net/show_bug.cgi?id=2545 +# * liblua is still not recognized/blindly accepted. Impossible to compile with support +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nmap +PKG_VERSION:=5.51 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://nmap.org/dist/ +PKG_MD5SUM:=0b80d2cb92ace5ebba8095a4c2850275 + +PKG_INSTALL:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +NMAP_DEPENDS:=+libnl +libpcap +libstdcpp +NCAT_DEPENDS:=+libpcap +NPING_DEPENDS:=+libnl +libpcap +libpthread +libstdcpp +NDIFF_DEPENDS:=+python + +define Package/nmap/default + SUBMENU:=NMAP Suite + SECTION:=net + CATEGORY:=Network + URL:=http://nmap.org/ + MAINTAINER:=Nuno Goncalves +endef + +define Package/nmap +$(call Package/nmap/default) + DEPENDS:=$(NMAP_DEPENDS) + VARIANT:=nossl + TITLE:=Utility for network exploration or security auditing +endef + +define Package/nmap-ssl +$(call Package/nmap/default) + DEPENDS:=$(NMAP_DEPENDS) +libopenssl + VARIANT:=ssl + TITLE:=Nmap (with OpenSSL support) +endef + +define Package/ncat +$(call Package/nmap/default) + DEPENDS:=$(NCAT_DEPENDS) + VARIANT:=nossl + TITLE:=Much-improved reimplementation of Netcat +endef + +define Package/ncat-ssl +$(call Package/nmap/default) + DEPENDS:=$(NCAT_DEPENDS) +libopenssl + VARIANT:=ssl + TITLE:=Ncat (with OpenSSL support) +endef + +define Package/nping +$(call Package/nmap/default) + DEPENDS:=$(NPING_DEPENDS) + VARIANT:=nossl + TITLE:=Network packet generation tool / ping utility +endef + +define Package/ndiff +$(call Package/nmap/default) + DEPENDS:=$(NDIFF_DEPENDS) + VARIANT:=nossl + TITLE:=Utility to compare the results of Nmap scans +endef + +CONFIGURE_ARGS += \ + --with-libdnet=included \ + --with-libpcre=included \ + --with-libpcap="$(STAGING_DIR)/usr" \ + --without-liblua + +CONFIGURE_VARS += CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti" + +ifeq ($(BUILD_VARIANT),ssl) + CONFIGURE_ARGS += --with-openssl="$(STAGING_DIR)/usr" +else + CONFIGURE_ARGS += --without-openssl +endif + +define Package/nmap/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share/nmap + $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/ +endef + +define Package/nmap-ssl/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share/nmap + $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/ +endef + +define Package/ncat/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncat $(1)/usr/bin/ +endef + +define Package/ncat-ssl/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncat $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share/ncat + $(CP) $(PKG_INSTALL_DIR)/usr/share/ncat/ca-bundle.crt $(1)/usr/share/ncat/ +endef + +define Package/ndiff/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ndiff $(1)/usr/bin/ +endef + +define Package/nping/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nping $(1)/usr/bin/ +endef + + +$(eval $(call BuildPackage,nmap)) +$(eval $(call BuildPackage,nmap-ssl)) +$(eval $(call BuildPackage,ncat)) +$(eval $(call BuildPackage,ncat-ssl)) +$(eval $(call BuildPackage,nping)) +$(eval $(call BuildPackage,ndiff)) diff --git a/net/nocatauth/Makefile b/net/nocatauth/Makefile new file mode 100644 index 0000000..c4a7ff6 --- /dev/null +++ b/net/nocatauth/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nocatauth +PKG_VERSION:=nightly +PKG_RELEASE:=1 + +PKG_SOURCE:=NoCatAuth-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://nocat.net/downloads/NoCatAuth/ +PKG_MD5SUM:=b3a5f8d62b322a9409806037ab8d374e + +PKG_BUILD_DIR:=$(BUILD_DIR)/NoCatAuth-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/nocatauth + SUBMENU:=Captive Portals + SECTION:=net + CATEGORY:=Network + DEPENDS:=+perl +perlbase-essential +perlbase-posix +perlbase-autoloader +perlbase-xsloader +perlbase-fcntl +perlbase-tie +perlbase-getopt +perlbase-findbin +perlbase-cwd +perlbase-config +perlbase-file +perlbase-sigtrap +perlbase-io +perlbase-symbol +perlbase-selectsaver +perlbase-socket +perlbase-errno +kmod-ipt-ipopt +kmod-ipt-nat-extra +iptables-mod-ipopt +iptables-mod-nat-extra + TITLE:=Open public network perl-based gateway daemon + URL:=http://nocat.net +endef + +define Package/nocatauth/description + NoCatAuth is the original "catch and release" captive portal + implementation. It provides a simple splash screen web page for + clients on your network, as well as a variety of authenticated + modes. It is written in Perl. +endef + +define Build/Configure +endef + +define Build/Compile + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + PREFIX="$(PKG_INSTALL_DIR)" \ + gateway +endef + +define Package/nocatauth/install + $(INSTALL_DIR) $(1) + $(INSTALL_DIR) $(1)/www + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/htdocs/{status,splash}.html $(1)/www + $(INSTALL_DIR) $(1)/www/images + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/htdocs/images/auth_logo.gif $(1)/www/images + $(INSTALL_DIR) $(1)/usr/nocatauth/lib + $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/nocatauth/lib + $(INSTALL_DIR) $(1)/usr/nocatauth/bin + $(CP) $(PKG_INSTALL_DIR)/bin/* $(1)/usr/nocatauth/bin + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/nocat.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/nocatauth-gateway $(1)/etc/init.d/nocatauth-gateway +endef + +$(eval $(call BuildPackage,nocatauth)) diff --git a/net/nocatauth/files/nocatauth-gateway b/net/nocatauth/files/nocatauth-gateway new file mode 100755 index 0000000..ec4c07e --- /dev/null +++ b/net/nocatauth/files/nocatauth-gateway @@ -0,0 +1,14 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009 OpenWrt.org + +START=90 +GATEWAY=/usr/nocatauth/bin/gateway +CONF=/etc/nocat.conf + +start() { + $GATEWAY -f $CONF +} + +stop() { + killall gateway +} diff --git a/net/nocatauth/patches/001-ptp-local.patch b/net/nocatauth/patches/001-ptp-local.patch new file mode 100644 index 0000000..ce5dd50 --- /dev/null +++ b/net/nocatauth/patches/001-ptp-local.patch @@ -0,0 +1,56 @@ +diff -ru NoCatAuth-nightly/bin/detect-fw.sh NoCatAuth-patched/bin/detect-fw.sh +--- NoCatAuth-nightly/bin/detect-fw.sh 2002-08-08 23:28:43.000000000 -0700 ++++ NoCatAuth-patched/bin/detect-fw.sh 2009-03-18 15:03:00.000000000 -0700 +@@ -9,8 +9,7 @@ + + # Do we have iptables *and* are running Linux 2.4? + # +-elif which iptables >/dev/null 2>&1 && \ +- test X"`uname -sr | cut -d. -f-2`" = X"Linux 2.4"; then ++elif which iptables >/dev/null 2>&1 ; then + FIREWALL=iptables + FW_BIN=iptables + +diff -ru NoCatAuth-nightly/bin/gateway NoCatAuth-patched/bin/gateway +--- NoCatAuth-nightly/bin/gateway 2003-03-07 17:56:51.000000000 -0800 ++++ NoCatAuth-patched/bin/gateway 2009-03-19 00:24:05.000000000 -0700 +@@ -7,6 +7,7 @@ + use lib "$FindBin::Bin/../lib"; + use NoCat; + use strict; ++use sigtrap qw(stack-trace untrapped error-signals); + + # Gracefully handle termination signals. + $SIG{INT} = sub { exit }; +diff -ru NoCatAuth-nightly/lib/NoCat/Gateway.pm NoCatAuth-patched/lib/NoCat/Gateway.pm +--- NoCatAuth-nightly/lib/NoCat/Gateway.pm 2003-07-30 22:22:22.000000000 -0700 ++++ NoCatAuth-patched/lib/NoCat/Gateway.pm 2009-03-19 00:22:09.000000000 -0700 +@@ -90,13 +90,12 @@ + + sub run { + my $self = shift; +- my $kids = 0; + my $hup = 0; + + return unless $self->bind_socket; + + local $SIG{PIPE} = "IGNORE"; +- local $SIG{CHLD} = sub { $kids++ }; ++ local $SIG{CHLD} = "IGNORE"; + local $SIG{HUP} = sub { $hup++ }; + + # Reset history. +@@ -134,13 +133,6 @@ + $self->log( 6, "HUP received, resetting log file." ); + $hup = 0; + } +- +- # See if any kids have expired, reap zombies +- if ( $kids ) { +- 1 until ( wait == -1 ); +- $kids = 0; +- } +- + } # loop forever + } + diff --git a/net/nocatauth/patches/002-openwrt.patch b/net/nocatauth/patches/002-openwrt.patch new file mode 100644 index 0000000..f6c3ed3 --- /dev/null +++ b/net/nocatauth/patches/002-openwrt.patch @@ -0,0 +1,30 @@ +diff -ur NoCatAuth-nightly/gateway.conf NoCatAuth-patched/gateway.conf +--- NoCatAuth-nightly/gateway.conf 2003-02-10 17:59:09.000000000 -0800 ++++ NoCatAuth-patched/gateway.conf 2009-03-19 01:20:42.000000000 -0700 +@@ -46,7 +46,7 @@ + ## + # GatewayLog -- Optional. If unset, messages will go to STDERR. + # +-GatewayLog /usr/local/nocat/nocat.log ++GatewayLog /var/log/nocat.log + + ## + # LoginTimeout - Number of seconds after a client's last +@@ -79,7 +79,7 @@ + # DocumentRoot -- Where all of the application templates (including + # SplashPage) are hiding. Can be different from Apache's DocumentRoot. + # +-DocumentRoot /usr/local/nocat/htdocs ++DocumentRoot /www + + # SplashForm -- Form displayed to users on capture. + # +@@ -289,7 +289,7 @@ + # the bin/ parent directory. Set this only if you put it + # somewhere that NoCat doesn't expect. + # +-# PGPKeyPath /usr/local/nocat/pgp ++# PGPKeyPath /usr/lib/nocatauth/pgp + + ## + # MessageVerify -- Shell command to verify a PGP signed diff --git a/net/nocatauth/patches/003-fix-module-loading b/net/nocatauth/patches/003-fix-module-loading new file mode 100644 index 0000000..9f12172 --- /dev/null +++ b/net/nocatauth/patches/003-fix-module-loading @@ -0,0 +1,31 @@ +diff -ru NoCatAuth-nightly/libexec/iptables/initialize.fw NoCatAuth-patched/libexec/iptables/initialize.fw +--- NoCatAuth-nightly/libexec/iptables/initialize.fw 2003-03-26 19:21:04.000000000 -0800 ++++ NoCatAuth-patched/libexec/iptables/initialize.fw 2009-03-19 19:24:31.000000000 -0700 +@@ -26,18 +26,6 @@ + # + echo "1" > /proc/sys/net/ipv4/ip_forward + echo "1" > /proc/sys/net/ipv4/conf/all/rp_filter +- +- # Load alllll the kernel modules we need. +- # +- rmmod ipchains > /dev/null 2>&1 # for RH 7.1 users. +- +- for module in ip_tables ipt_REDIRECT ipt_MASQUERADE ipt_MARK ipt_REJECT \ +- ipt_TOS ipt_LOG iptable_mangle iptable_filter iptable_nat ip_nat_ftp \ +- ip_conntrack ip_conntrack_ftp ip_conntrack_irc \ +- ip_nat_irc ipt_mac ipt_state ipt_mark; do +- +- modprobe $module +- done + fi + + # Flush all user-defined chains +@@ -241,6 +229,8 @@ + # Add any other local firewall rules below. + ## + ++iptables -t nat -I POSTROUTING -o $ExternalDevice -j MASQUERADE ++ + ## + # Uncomment the following to permit all 10/8 traffic *before* auth + ## diff --git a/net/nocatauth/patches/004-fw_detect.patch b/net/nocatauth/patches/004-fw_detect.patch new file mode 100644 index 0000000..18bb971 --- /dev/null +++ b/net/nocatauth/patches/004-fw_detect.patch @@ -0,0 +1,55 @@ +diff -urN NoCatAuth-nightly/bin/detect-fw.sh NoCatAuth-nightly.new/bin/detect-fw.sh +--- NoCatAuth-nightly/bin/detect-fw.sh 2010-03-27 17:44:01.000000000 +0100 ++++ NoCatAuth-nightly.new/bin/detect-fw.sh 2010-03-27 17:44:39.000000000 +0100 +@@ -6,47 +6,12 @@ + if [ -n "$1" -a -n "$2" -a -d "$2/$1" ]; then + FIREWALL=$1 + shift +- +-# Do we have iptables *and* are running Linux 2.4? +-# +-elif which iptables >/dev/null 2>&1 ; then +- FIREWALL=iptables +- FW_BIN=iptables +- +-# +-# Or do we have ipchains? +-# +-elif which ipchains >/dev/null 2>&1; then +- FIREWALL=ipchains +- FW_BIN=ipchains +- +-# +-# Or ip_filter (e.g. *BSD, Solaris, HP-UX, etc)? +-# +-# +-elif which ipf >/dev/null 2>&1; then +-ipf_running="`ipf -V | grep 'Running' | awk '{print $2}'`"; +- if [ "$ipf_running" = "yes" ]; then +- FIREWALL="ipfilter" +- FW_BIN=ipf +- else +- echo "ERROR: ip_filter appears to exist, but we're not postive that it's running" +- echo "1. You must be root for us to verify this" +- echo "2. Check that it's compiled in your kernel (either staticlly or a loaded module)" +- fi +- +-# Or packetfilter (OpenBSD 3.0+) +-elif which pfctl >/dev/null 2>&1; then +- FIREWALL=pf +- FW_BIN=pfctl +- +-else +- echo "No supported firewalls detected! Check your path." +- echo "Supported firewalls include: iptables, ipchains, ipf, pf." +- exit 1 + fi + +-echo $(which $FW_BIN) found. ++FIREWALL=iptables ++FW_BIN=iptables ++ ++echo $FW_BIN found. + + # Remove the existing *.fw links in /usr/local/nocat/bin (or wherever this is being run from) + TARGET=$1 diff --git a/net/nocatsplash/Makefile b/net/nocatsplash/Makefile new file mode 100644 index 0000000..c12eff9 --- /dev/null +++ b/net/nocatsplash/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nocatsplash +PKG_VERSION:=0.93pre2 +PKG_RELEASE:=2 + +PKG_SOURCE:=NoCatSplash-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://nocat.net/downloads/NoCatSplash/ +PKG_MD5SUM:=b0aa5cc33a3bbdd8e65726ff3cfe3cd1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/NoCatSplash-$(PKG_VERSION) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/nocatsplash + SUBMENU:=Captive Portals + SECTION:=net + CATEGORY:=Network + DEPENDS:=+glib1 +iptables-mod-ipopt +iptables-mod-nat-extra + TITLE:=Open public network gateway daemon + URL:=http://nocat.net +endef + +define Package/nocatsplash/description + NoCatSplash is an Open Public Network Gateway Daemon. + It performs as a [captive/open/active] portal. When run on a gateway/router + on a network, all web requests are redirected until the client either logs + in or clicks "I Accept" to an AUP. The gateway daemon then changes the + firewall rules on the gateway to pass traffic for that client (based on IP + address and MAC address). +endef + +define Package/nocatsplash/conffiles +/etc/nocat.conf +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --with-firewall=iptables \ + --with-glib-prefix="$(STAGING_DIR)/usr" \ + ) +endef + +define Package/nocatsplash/install + $(INSTALL_DIR) $(1) + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +$(eval $(call BuildPackage,nocatsplash)) diff --git a/net/nocatsplash/patches/001-openwrt_firewall.patch b/net/nocatsplash/patches/001-openwrt_firewall.patch new file mode 100644 index 0000000..a6f7129 --- /dev/null +++ b/net/nocatsplash/patches/001-openwrt_firewall.patch @@ -0,0 +1,19 @@ +diff -urN NoCatSplash-0.92.old/libexec/iptables/initialize.fw NoCatSplash-0.92/libexec/iptables/initialize.fw +--- NoCatSplash-0.92.old/libexec/iptables/initialize.fw 2002-12-27 11:44:41.000000000 +0100 ++++ NoCatSplash-0.92/libexec/iptables/initialize.fw 2005-04-04 20:45:57.000000000 +0200 +@@ -28,13 +28,9 @@ + + # Load alllll the kernel modules we need. + # +-rmmod ipchains > /dev/null 2>&1 # for RH 7.1 users. + +-for module in ip_tables ipt_REDIRECT ipt_MASQUERADE ipt_MARK ipt_REJECT \ +- ipt_TOS ipt_LOG iptable_mangle iptable_filter iptable_nat ip_nat_ftp \ +- ip_conntrack ipt_mac ipt_state ipt_mark; do +- +- modprobe $module ++for module in ipt_TOS ipt_mac ipt_REDIRECT; do ++ insmod $module + done + + diff --git a/net/nodogsplash/Makefile b/net/nodogsplash/Makefile new file mode 100644 index 0000000..f83b515 --- /dev/null +++ b/net/nodogsplash/Makefile @@ -0,0 +1,75 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nodogsplash +PKG_VERSION:=0.9_beta9.9.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://kokoro.ucsd.edu/nodogsplash/ \ + http://kokoro.ucsd.edu/nodogsplash/old/ +PKG_MD5SUM:=3ba0d862b4d63ecf97f16176a486faed + +PKG_FIXUP:=libtool +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/nodogsplash + SUBMENU:=Captive Portals + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpthread +iptables-mod-ipopt + TITLE:=Open public network gateway daemon + URL:=http://kokoro.ucsd.edu/nodogsplash/ +endef + +define Package/nodogsplash/description + Nodogsplash offers a simple way to open a free hotspot providing restricted access to an + internet connection. It is intended for use on wireless access points running OpenWRT + (but may also work on other Linux-based devices). +endef + +define Build/Configure + $(call Build/Configure/Default,\ + --enable-static \ + --enable-shared \ + ) +endef + +define Build/Compile + $(call Build/Compile/Default, \ + mkinstalldirs="$(INSTALL_DIR)") +endef + +define Build/Install + mkdir -p $(PKG_INSTALL_DIR)/usr/{share{,/doc/$(PKG_NAME)-$(PKG_VERSION)},lib,include{,/nodogsplash},bin,sbin}/ + $(call Build/Install/Default, \ + mkinstalldirs="$(INSTALL_DIR)" \ + install) +endef + +define Package/nodogsplash/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/etc/$(PKG_NAME) + $(INSTALL_CONF) $(PKG_BUILD_DIR)/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME)/ + $(SED) 's,br0,br-lan,' $(1)/etc/$(PKG_NAME)/$(PKG_NAME).conf + $(CP) $(PKG_BUILD_DIR)/htdocs $(1)/etc/$(PKG_NAME)/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) + $(SED) 's,\(do_module_tests "imq"\),#\1,' $(1)/etc/init.d/$(PKG_NAME) + $(SED) 's,\(do_module_tests "ipt_IMQ"\),#\1,' $(1)/etc/init.d/$(PKG_NAME) + $(SED) 's,\(do_module_tests "sch_htb"\),#\1,' $(1)/etc/init.d/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,nodogsplash)) diff --git a/net/nodogsplash/files/nodogsplash.init b/net/nodogsplash/files/nodogsplash.init new file mode 100644 index 0000000..7eba60b --- /dev/null +++ b/net/nodogsplash/files/nodogsplash.init @@ -0,0 +1,176 @@ +#!/bin/sh /etc/rc.common +# +# description: Startup/shutdown script for nodogsplash captive portal +# +# P. Kube 2007 +# +# (Based on wifidog startup script +# Date : 2004-08-25 +# Version : 1.0 +# Comment by that author: Could be better, but it's working as expected) +# + + +IPT=/usr/sbin/iptables +WD_DIR=/usr/bin +OPTIONS="" +START=65 +STOP=65 +# -s -d 5 runs in background, with level 5 (not so verbose) messages to syslog +# -f -d 7 runs in foreground, with level 7 (verbose) debug messages to terminal +# N.B.: -f will fail if starting at boot from rcS +#OPTIONS="-s -d 5" + +start() { + echo "Starting nodogsplash ... " + if $WD_DIR/ndsctl status 2> /dev/null; then + echo "FAILED: nodogsplash already running" + else + if test_module && $WD_DIR/nodogsplash $OPTIONS; then + echo "OK: nodogsplash started" + else + echo "FAILED: nodogsplash exited with non 0 status" + fi + fi +} + +stop() { + echo "Stopping nodogsplash ... " + if $WD_DIR/ndsctl status 2> /dev/null; then + if $WD_DIR/ndsctl stop; then + echo "OK: nodogsplash stopped" + else + echo "FAILED: ndsctl stop exited with non 0 status" + fi + else + echo "FAILED: nodogsplash was not running" + fi +} + +status() { + $WD_DIR/ndsctl status +} + +test_module() { + + ### Test ipt_mark with iptables + test_ipt_mark () { + ($IPT -A FORWARD -m mark --mark 2 -j ACCEPT 2>&1) > /dev/null + IPTABLES_OK=$? + if [ "$IPTABLES_OK" -eq 0 ]; then + ($IPT -D FORWARD -m mark --mark 2 -j ACCEPT 2>&1) > /dev/null + return 0 + else + return 1 + fi + } + ### Test ipt_mac with iptables + test_ipt_mac () { + ($IPT -A INPUT -m mac --mac-source 00:00:00:00:00:00 -j ACCEPT 2>&1) > /dev/null + IPTABLES_OK=$? + if [ "$IPTABLES_OK" -eq 0 ]; then + ($IPT -D INPUT -m mac --mac-source 00:00:00:00:00:00 -j ACCEPT 2>&1) > /dev/null + return 0 + else + return 1 + fi + } + + ### Test ipt_IMQ with iptables + test_ipt_IMQ () { + ($IPT -t mangle -A PREROUTING -j IMQ --todev 0 2>&1) > /dev/null + IPTABLES_OK=$? + if [ "$IPTABLES_OK" -eq 0 ]; then + ($IPT -t mangle -D PREROUTING -j IMQ --todev 0 2>&1) > /dev/null + return 0 + else + return 1 + fi + } + + ### Test imq with ip + test_imq () { + (ip link set imq0 up 2>&1) > /dev/null + IMQ0_OK=$? + (ip link set imq1 up 2>&1) > /dev/null + IMQ1_OK=$? + if [ "$IMQ0_OK" -eq 0 -a "$IMQ1_OK" -eq 0 ]; then + (ip link set imq0 down 2>&1) > /dev/null + (ip link set imq1 down 2>&1) > /dev/null + return 0 + else + return 1 + fi + } + + ### Test sch_htb with tc; requires imq0 + test_sch_htb () { + (tc qdisc del dev imq0 root 2>&1) > /dev/null + (tc qdisc add dev imq0 root htb 2>&1) > /dev/null + TC_OK=$? + if [ "$TC_OK" -eq 0 ]; then + (tc qdisc del dev imq0 root 2>&1) > /dev/null + return 0 + else + return 1 + fi + } + + + ### Find a module on disk + module_exists () { + EXIST=$(find /lib/modules/`uname -r` -name $1.*o 2> /dev/null) + if [ -n "$EXIST" ]; then + return 0 + else + return 1 + fi + } + + ### Test if a module is in memory + module_in_memory () { + MODULE=$(lsmod | grep $1 | awk '{print $1}') + if [ "$MODULE" = "$1" ]; then + return 0 + else + return 1 + fi + } + + ### Test functionality of a module; load if necessary + do_module_tests () { + echo " Testing module $1 $2" + "test_$1" + if [ $? -ne 0 ]; then + echo " Module $1 $2 needed" + echo " Scanning disk for $1 module" + module_exists $1 + if [ $? -ne 0 ]; then + echo " $1 module missing: please install it" + exit 1 + else + echo " $1 exists, trying to load" + insmod $1 $2 > /dev/null + if [ $? -ne 0 ]; then + echo " Error: insmod $1 $2 failed" + exit 1 + else + echo " $1 $2 loaded successfully" + fi + fi + else + echo " $1 is working" + fi + + } + + echo " Testing required modules" + + do_module_tests "ipt_mac" + do_module_tests "ipt_mark" + # if not using traffic control, + # you can comment out the following 3 lines: + do_module_tests "imq" "numdevs=2" + do_module_tests "ipt_IMQ" + do_module_tests "sch_htb" +} diff --git a/net/nprobe/Makefile b/net/nprobe/Makefile new file mode 100644 index 0000000..66f5916 --- /dev/null +++ b/net/nprobe/Makefile @@ -0,0 +1,75 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nprobe +PKG_VERSION:=4.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=nProbe-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources +PKG_MD5SUM:=32ed12f60eab771a79bd5f90622fa2a3 + +BUILD_DEPENDS:=libwrap +PKG_FIXUP:=libtool + +PKG_BUILD_DIR:=$(BUILD_DIR)/nProbe + +include $(INCLUDE_DIR)/package.mk + +define Package/nprobe + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libpcap +libpcre +libpthread +NPROBE_MYSQL_SUPPORT:libmysqlclient + TITLE:=nProbe + URL:=http://invisible-island.net/dialog/ +endef + +define Package/nprobe/config + config NPROBE_MYSQL_SUPPORT + depends on PACKAGE_nprobe + bool "MySQL support" + +endef + +define Package/nprobe/description + nprobe +endef + +ifndef CONFIG_NPROBE_MYSQL_SUPPORT + CONFIGURE_VARS += ac_cv_prog_MYSQL=no +endif + +define Build/Configure + # patch creates these, so we make them executable + chmod +x $(PKG_BUILD_DIR)/configure + chmod +x $(PKG_BUILD_DIR)/config.guess + $(call Build/Configure/Default, \ + --with-only-ipv4 \ + PCAP_ROOT="$(STAGING_DIR)/usr" \ + ) +endef + +define Build/Compile + DESTDIR=$(PKG_INSTALL_DIR) \ + LDFLAGS="$(TARGET_LDFLAGS) -ldl" \ + $(MAKE) -C $(PKG_BUILD_DIR) \ + all install +endef + +define Package/nprobe/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nprobe \ + $(1)/usr/bin/ + $(CP) -a $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib +endef + +$(eval $(call BuildPackage,nprobe)) + diff --git a/net/nprobe/patches/001-automake-compat.patch b/net/nprobe/patches/001-automake-compat.patch new file mode 100644 index 0000000..4360b70 --- /dev/null +++ b/net/nprobe/patches/001-automake-compat.patch @@ -0,0 +1,46 @@ +--- /dev/null ++++ b/acinclude.m4 +@@ -0,0 +1 @@ ++sinclude(acinclude.m4.in) +--- a/acinclude.m4.in ++++ b/acinclude.m4.in +@@ -120,7 +120,7 @@ else + esac + fi + msg="enabled" +-AC_DEFINE(DEBUG) ++AC_DEFINE([DEBUG], [], [Enable debugging]) + ],[ + if test ".$ac_cv_prog_gcc" = ".yes"; then + case "$CFLAGS" in +--- a/configure.in ++++ b/configure.in +@@ -13,18 +13,16 @@ AC_REVISION([1.0]) + + + dnl> acconfig.h is deprecated +-AH_TEMPLATE([ HAVE_UINT64_T ],) +-AH_TEMPLATE([ HAVE_U_INT64_T ],) +-AH_TEMPLATE([ HAVE_U_INT32_T ],) +-AH_TEMPLATE([ HAVE_U_INT16_T ],) +-AH_TEMPLATE([ HAVE_U_INT8_T ],) +-AH_TEMPLATE([ HAVE_INT64_T ],) +-AH_TEMPLATE([ HAVE_INT32_T ],) +-AH_TEMPLATE([ HAVE_INT16_T ],) +-AH_TEMPLATE([ HAVE_INT8_T ],) +-AH_TEMPLATE([ u_int],) +-AH_TEMPLATE([ HAVE_ZLIB ], [ Define if you have zlib ]) +-AH_TEMPLATE([ DEBUG ], [ Define if you want a debugging version.]) ++AC_DEFINE([HAVE_UINT64_T], [], [Define if you have uint64_t]) ++AC_DEFINE([HAVE_U_INT64_T], [], [Define if you have u_int64_t]) ++AC_DEFINE([HAVE_U_INT32_T], [], [Define if you have u_int32_t]) ++AC_DEFINE([HAVE_U_INT16_T], [], [Define if you have u_int16_t]) ++AC_DEFINE([HAVE_U_INT8_T], [], [Define if you have u_int8_t]) ++AC_DEFINE([HAVE_INT64_T], [], [Define if you have int64_t]) ++AC_DEFINE([HAVE_INT32_T], [], [Define if you have int32_t]) ++AC_DEFINE([HAVE_INT16_T], [], [Define if you have int16_t]) ++AC_DEFINE([HAVE_INT8_T], [], [Define if you have int8_t]) ++AC_DEFINE([HAVE_ZLIB], [], [Define if you have zlib]) + + echo + echo "Welcome to $PACKAGE_NAME, Version $PACKAGE_VERSION" diff --git a/net/nprobe/patches/002-path_to_pcap.patch b/net/nprobe/patches/002-path_to_pcap.patch new file mode 100644 index 0000000..7f2c155 --- /dev/null +++ b/net/nprobe/patches/002-path_to_pcap.patch @@ -0,0 +1,13 @@ +--- a/configure.in ++++ b/configure.in +@@ -331,8 +331,8 @@ dnl> user defined directory passed as op + dnl> + if test ".${PCAP_ROOT}" != .; then + if test -d $PCAP_ROOT && +- test -r $PCAP_ROOT/libpcap.a && +- test -r $PCAP_ROOT/pcap.h; then ++ test -r $PCAP_ROOT/lib/libpcap.a && ++ test -r $PCAP_ROOT/include/pcap.h; then + PCAP_ROOT=`cd ${PCAP_ROOT} && pwd` + CORELIBS="${CORELIBS} -L$PCAP_ROOT -lpcap" + INCS="${INCS} -I$PCAP_ROOT" diff --git a/net/nprobe/patches/003-ipv6_fix.patch b/net/nprobe/patches/003-ipv6_fix.patch new file mode 100644 index 0000000..689487b --- /dev/null +++ b/net/nprobe/patches/003-ipv6_fix.patch @@ -0,0 +1,35 @@ +--- a/nprobe.c ++++ b/nprobe.c +@@ -241,8 +241,10 @@ void processPacket(u_char *_deviceId, + u_short eth_type, off=0, numPkts = 1; + u_int8_t flags = 0, proto = 0; + struct ip ip; ++ #ifndef IPV4_ONLY + struct ip6_hdr ipv6; + struct ip6_ext ipv6ext; ++ #endif + struct tcphdr tp; + struct udphdr up; + struct icmp icmpPkt; +@@ -362,7 +364,9 @@ void processPacket(u_char *_deviceId, + isFragment = (ntohs(ip.ip_off) & 0x3fff) ? 1 : 0; + + off = ntohs(ip.ip_off); +- } else if(eth_type == ETHERTYPE_IPV6) { ++ } ++ #ifndef IPV4_ONLY ++ else if(eth_type == ETHERTYPE_IPV6) { + memcpy(&ipv6, p+ehshift, sizeof(struct ip6_hdr)); + if(((ipv6.ip6_vfc >> 4) & 0x0f) != 6) return; /* IP v6 only */ + estimatedLen = sizeof(struct ip6_hdr)+ehshift+htons(ipv6.ip6_plen); +@@ -392,7 +396,9 @@ void processPacket(u_char *_deviceId, + hlen += (ipv6ext.ip6e_len+1)*8; + proto = ipv6ext.ip6e_nxt; + } +- } else ++ } ++ #endif //IPV4_ONLY ++ else + return; /* Anything else that's not IPv4/v6 */ + + plen = length-ehshift; diff --git a/net/nstx/Makefile b/net/nstx/Makefile new file mode 100644 index 0000000..82b178c --- /dev/null +++ b/net/nstx/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nstx +PKG_VERSION:=1.1-beta6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/n/nstx/ +PKG_MD5SUM:=275abd75a856b07a798b1f2360088cf5 + +include $(INCLUDE_DIR)/package.mk + +define Package/nstx/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Firewall Tunnel + TITLE:=allows you to pass IP packets via DNS queries + URL:=http://savannah.nongnu.org/projects/nstx/ +endef + +define Package/nstx + $(call Package/nstx/Default) + TITLE+= client version +endef + +define Package/nstx/description + nstx client version +endef + +define Package/nstxd + $(call Package/nstx/Default) + TITLE+= server version +endef + +define Package/nstxd/description + nstx server version +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) CC="$(TARGET_CC)" +endef + +define Package/nstx/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/nstxcd $(1)/usr/sbin/ +endef + +define Package/nstxd/install + $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/nstxd $(1)/usr/sbin +endef + +$(eval $(call BuildPackage,nstx)) +$(eval $(call BuildPackage,nstxd)) diff --git a/net/nstx/patches/001-debian_changes.patch b/net/nstx/patches/001-debian_changes.patch new file mode 100644 index 0000000..df31962 --- /dev/null +++ b/net/nstx/patches/001-debian_changes.patch @@ -0,0 +1,382 @@ +diff -urN nstx-1.1-beta6/Makefile nstx-1.1-beta6.new/Makefile +--- nstx-1.1-beta6/Makefile 2004-06-27 23:46:38.000000000 +0200 ++++ nstx-1.1-beta6.new/Makefile 2006-12-24 12:15:23.000000000 +0100 +@@ -1,4 +1,4 @@ +-CFLAGS += -ggdb -Wall -Werror ++CFLAGS += -ggdb -Wall -Werror -Wsign-compare + + NSTXD_SRCS = nstxd.c nstx_encode.c nstx_pstack.c nstx_dns.c nstx_tuntap.c nstx_queue.c + NSTXD_OBJS = ${NSTXD_SRCS:.c=.o} +diff -urN nstx-1.1-beta6/nstx_dns.c nstx-1.1-beta6.new/nstx_dns.c +--- nstx-1.1-beta6/nstx_dns.c 2004-06-27 23:43:34.000000000 +0200 ++++ nstx-1.1-beta6.new/nstx_dns.c 2006-12-24 12:15:23.000000000 +0100 +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + + #include "nstxfun.h" + #include "nstxdns.h" +@@ -58,7 +59,7 @@ + * DNS-packet 'msg'. */ + + static char * +-decompress_label(const char *msg, int msglen, const char *lbl) ++decompress_label(const char *msg, unsigned int msglen, const char *lbl) + { + const char *ptr = lbl; + char *buf; +@@ -69,7 +70,7 @@ + + while ((chunklen = *ptr)) { + if (chunklen > 63) { +- if ((ptr-msg) >= (msglen-1)) { ++ if ((ptr-msg) >= ((signed int)msglen-1)) { + DEBUG("Bad pointer at end of msg"); + if (buf) + free(buf); +@@ -104,13 +105,15 @@ + ptr += chunklen + 1; + } + } +- buf[buflen] = 0; +- buflen++; ++ if (buf) { ++ buf[buflen] = 0; ++ buflen++; ++ } + return buf; + } + + static const unsigned char * +-_cstringify(const unsigned char *data, int *dlen, int clen) ++_cstringify(const unsigned char *data, int *dlen, unsigned int clen) + { + static unsigned char *buf; + +@@ -143,7 +146,7 @@ + { + int len; + +- len = strlen(data); ++ len = strlen((char*)data); + return _cstringify(data, &len, 63); + } + +@@ -183,24 +186,24 @@ + static const unsigned char * + lbl2data (const unsigned char *data, size_t len) + { +- static unsigned char *buf; +- ++ static signed char *buf = NULL; + const unsigned char *s = data; +- unsigned char *d; +- unsigned int llen; ++ signed char *d; ++ signed int llen; + + d = buf = realloc(buf, len); ++ assert(d); + do + { + llen = *s++; +- if ((llen > 63) || (llen > len - (s - data))) +- return NULL; ++ if ((llen > 63) || (llen > (signed int)(len - (s - data)))) ++ break; + memcpy(d, s, llen); + s += llen; + d += llen; + } while (llen); + *d = '\0'; +- return buf; ++ return (const unsigned char*)buf; + } + + /* New DNS-Code */ +@@ -318,7 +321,7 @@ + const char *ptr; + static char *fqdn; + +- ptr = data2lbl(data); ++ ptr = (char*)data2lbl((unsigned char*)data); + fqdn = realloc(fqdn, strlen(ptr)+strlen(suffix)+1); + strcpy(fqdn, ptr); + strcat(fqdn, suffix); +@@ -336,8 +339,9 @@ + free(buf); + + off = strstr(fqdn, suffix); +- if (off) +- buf = strdup(lbl2data(fqdn, off - fqdn)); ++ /* only parse if the fqdn was found, and there is more than the fqdn */ ++ if (off && off != fqdn) ++ buf = strdup((char*)lbl2data((unsigned char*)fqdn, off - fqdn)); + else + /* Our suffix not found... */ + buf = NULL; +@@ -364,7 +368,7 @@ + const char *ptr; + char *buf; + +- ptr = data2txt(data, &len); ++ ptr = (char*)data2txt((unsigned char*)data, &len); + buf = malloc(len); + memcpy(buf, ptr, len); + +@@ -477,7 +481,7 @@ + { + offsets[i++] = ptr - buf; + rrp = _new_listitem(&pkt->query); +- rrp->data = decompress_label(buf, len, ptr); ++ rrp->data = decompress_label((char*)buf, len, (char*)ptr); + if (!rrp->data) + { + syslog(LOG_ERR, "dns_extractpkt: decompress_label choked in qd\n"); +@@ -517,8 +521,9 @@ + if (j < i) + rrp->link = j; + } +- ptr = _skip_lbl(ptr, &remain); +- rrp->len = ptr[8]*256+ptr[9]; ++ // ptr = _skip_lbl(ptr, &remain); ++ // rrp->len = ptr[8]*256+ptr[9]; ++ rrp->len = ptr[10]*256+ptr[11]; + ptr += 12; + remain -= 12; + if (remain < rrp->len) +diff -urN nstx-1.1-beta6/nstx_encode.c nstx-1.1-beta6.new/nstx_encode.c +--- nstx-1.1-beta6/nstx_encode.c 2004-06-27 23:43:34.000000000 +0200 ++++ nstx-1.1-beta6.new/nstx_encode.c 2006-12-24 12:15:23.000000000 +0100 +@@ -30,11 +30,11 @@ + + void init_revmap (void) + { +- int i; ++ unsigned int i; + + revmap = malloc(256); + +- for (i = 0; i < strlen(map); i++) ++ for (i = 0; i < strlen((char*)map); i++) + revmap[map[i]] = i; + } + +@@ -70,11 +70,11 @@ + if (!revmap) + init_revmap(); + +- len = strlen(data)-1; +- ++ len = strlen((char*)data); ++ + buf = realloc(buf, ((len+3)/4)*3); + +- while (off < len) { ++ while (off+3 < len) { + buf[i+0] = (revmap[data[off]]<<2)|((revmap[data[off+1]]&48)>>4); + buf[i+1] = ((revmap[data[off+1]]&15)<<4)|((revmap[data[off+2]]&60)>>2); + buf[i+2] = ((revmap[data[off+2]]&3)<<6)|(revmap[data[off+3]]); +diff -urN nstx-1.1-beta6/nstx_pstack.c nstx-1.1-beta6.new/nstx_pstack.c +--- nstx-1.1-beta6/nstx_pstack.c 2004-06-27 23:43:34.000000000 +0200 ++++ nstx-1.1-beta6.new/nstx_pstack.c 2006-12-24 12:15:23.000000000 +0100 +@@ -49,7 +49,7 @@ + char *netpacket; + int netpacketlen; + +- if ((!ptr) || len < sizeof(struct nstxhdr)) ++ if ((!ptr) || (signed int) len < (signed int) sizeof(struct nstxhdr)) + return; + + if (!nstxpkt->id) +diff -urN nstx-1.1-beta6/nstx_tuntap.c nstx-1.1-beta6.new/nstx_tuntap.c +--- nstx-1.1-beta6/nstx_tuntap.c 2004-06-27 23:43:34.000000000 +0200 ++++ nstx-1.1-beta6.new/nstx_tuntap.c 2006-12-24 12:15:23.000000000 +0100 +@@ -215,7 +215,7 @@ + + struct nstxmsg *nstx_select (int timeout) + { +- int peerlen; ++ unsigned peerlen; + fd_set set; + struct timeval tv; + static struct nstxmsg *ret = NULL; +diff -urN nstx-1.1-beta6/nstxcd.8 nstx-1.1-beta6.new/nstxcd.8 +--- nstx-1.1-beta6/nstxcd.8 1970-01-01 01:00:00.000000000 +0100 ++++ nstx-1.1-beta6.new/nstxcd.8 2006-12-24 12:15:23.000000000 +0100 +@@ -0,0 +1,36 @@ ++.TH NSTXCD "8" "May 2004" "nstx 1.1-beta4" "User Commands" ++.SH NAME ++nstxcd \- IP over DNS tunneling client ++ ++.SH SYNOPSIS ++.B "nstxcd \fIDOMAIN\fR \fIIPADDRESS\fR" ++ ++.SH DESCRIPTION ++.B nstxcd ++tunnels IP packets over DNS, allowing them to be sent to a server without ++any protocols other than DNS being used. ++ ++.SH OPTIONS ++.B nstxcd ++takes the following options: ++.IP "domain" ++The domain that nstxcd will send requests to. This domain must be delegated ++to a machine that is running nstxd. ++.IP "IP address" ++The IP address of a DNS server that can be reached from the current machine. ++ ++.SH USAGE ++.Bnstxcd ++should be run against a domain that has been delegated to a machine running ++nstxd. It will then take any packets that are sent to the tun0 interface and ++send them over DNS to the other tunnel endpoint. Responses will appear on ++the tun0 interface. ++ ++.SH AUTHORS ++ ++.IP ++Florian Heinz ++.IP ++Julien Oster ++.IP ++http://nstx.dereference.de/nstx/ +diff -urN nstx-1.1-beta6/nstxcd.c nstx-1.1-beta6.new/nstxcd.c +--- nstx-1.1-beta6/nstxcd.c 2004-06-27 23:43:34.000000000 +0200 ++++ nstx-1.1-beta6.new/nstxcd.c 2006-12-24 12:15:23.000000000 +0100 +@@ -63,7 +63,7 @@ + int main (int argc, char * argv[]) { + struct nstxmsg *msg; + const char *device = NULL; +- char ch; ++ int ch; + + nsid = time(NULL); + +@@ -110,11 +110,11 @@ + const char *data; + int datalen; + +- pkt = dns_extractpkt (reply, len); ++ pkt = dns_extractpkt ((unsigned char*)reply, len); + if (!pkt) + return; + while ((data = dns_getanswerdata(pkt, &datalen))) { +- data = txt2data(data, &datalen); ++ data = (char*)txt2data((unsigned char*)data, &datalen); + nstx_handlepacket (data, datalen, &sendtun); + } + dequeueitem(pkt->id); +@@ -159,9 +159,9 @@ + data += l; + datalen -= l; + +- dns_addquery(pkt, dns_data2fqdn(nstx_encode(p, sizeof(nh)+l))); ++ dns_addquery(pkt, dns_data2fqdn(nstx_encode((unsigned char*)p, sizeof(nh)+l))); + free(p); +- p = dns_constructpacket(pkt, &l); ++ p = (char*)dns_constructpacket(pkt, &l); + sendns(p, l, NULL); + free(p); + +diff -urN nstx-1.1-beta6/nstxd.8 nstx-1.1-beta6.new/nstxd.8 +--- nstx-1.1-beta6/nstxd.8 1970-01-01 01:00:00.000000000 +0100 ++++ nstx-1.1-beta6.new/nstxd.8 2006-12-24 12:15:23.000000000 +0100 +@@ -0,0 +1,47 @@ ++.TH NSTXD "7" "Mar 2005" "nstx 1.1-beta6" "User Commands" ++.SH NAME ++nstxd \- IP over DNS tunneling daemon ++ ++.SH SYNOPSIS ++.B "nstxd \fIOPTION\fR \fIDOMAIN\fR" ++ ++.SH DESCRIPTION ++.B nstxd ++listens for well formed DNS requests and translates them into IP packets. ++Responses are sent in the form of DNS replies. This allows clients to ++tunnel IP packets over the DNS protocol. ++ ++.SH OPTIONS ++.B nstxd ++takes the following option: ++.IP \-d tun-device ++Use this tun device instead of tun0 ++.IP \-i ipaddr ++Bind to this IP address rather than every available address ++.IP \-C dir ++Chroot to this directory on startup ++.IP \-D ++Daemonize on startup ++.IP \-g ++Switch on debug messages ++.IP \-u user ++Run as the following user ++.IP "domain" ++The domain that nstxd will listen to requests for. This should be a domain ++that is delegated to the machine running nstxd. ++ ++.SH USAGE ++A domain should be delegated to the machine that will run nstxd. nstxd should ++then be run giving that domain as the only argument. nstxd will then listen ++for requests and translate them into IP packets that will appear on the tun0 ++interface. Packets sent to the tun0 interface will be transferred back to ++the client as DNS answers. ++ ++.SH AUTHORS ++ ++.IP ++Florian Heinz ++.IP ++Julien Oster ++.IP ++http://nstx.dereference.de/nstx/ +diff -urN nstx-1.1-beta6/nstxd.c nstx-1.1-beta6.new/nstxd.c +--- nstx-1.1-beta6/nstxd.c 2004-06-27 23:55:17.000000000 +0200 ++++ nstx-1.1-beta6.new/nstxd.c 2006-12-24 12:15:23.000000000 +0100 +@@ -67,7 +67,7 @@ + } + + int main (int argc, char *argv[]) { +- char ch; ++ signed char ch; + const char *device = NULL, *dir = NULL; + in_addr_t bindto = INADDR_ANY; + uid_t uid = 0; +@@ -172,7 +172,7 @@ + dns_setid(pkt, q->id); + dns_settype(pkt, DNS_RESPONSE); + dns_addanswer(pkt, "\xb4\x00\x00\x00", 4, dns_addquery(pkt, q->name)); +- buf = dns_constructpacket (pkt, &len); ++ buf = (char*)dns_constructpacket (pkt, &len); + sendns(buf, len, &q->peer); + free(buf); + } +@@ -188,7 +188,7 @@ + + if (msg) { + if (msg->src == FROMNS) { +- pkt = dns_extractpkt(msg->data, msg->len); ++ pkt = dns_extractpkt((unsigned char*)msg->data, msg->len); + if (pkt) + { + name = dns_getquerydata(pkt); +@@ -198,7 +198,7 @@ + name); + queueitem(pkt->id, name, &msg->peer); + if ((data = dns_fqdn2data(name)) && +- (buf = nstx_decode(data, &len))) ++ (buf = nstx_decode((unsigned char*)data, &len))) + { + nstx_handlepacket(buf, len, &sendtun); + } +@@ -220,7 +220,7 @@ + len = dns_getfreespace(pkt, DNS_RESPONSE); + buf = dequeue_senditem(&len); + dns_addanswer(pkt, buf, len, link); +- buf = dns_constructpacket(pkt, &len); ++ buf = (char*)dns_constructpacket(pkt, &len); + sendns(buf, len, &qitem->peer); + } + timeoutqueue(do_timeout); diff --git a/net/ntpclient/Makefile b/net/ntpclient/Makefile new file mode 100644 index 0000000..841f3e0 --- /dev/null +++ b/net/ntpclient/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ntpclient +PKG_VERSION:=2007_365 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://doolittle.icarus.com/ntpclient/ +PKG_MD5SUM:=cb98711f11769cdd22fc592844cef414 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-2007 + +include $(INCLUDE_DIR)/package.mk + +define Package/ntpclient + SUBMENU:=Time Synchronization + SECTION:=net + CATEGORY:=Network + TITLE:=NTP (Network Time Protocol) client + URL:=http://doolittle.icarus.com/ntpclient/ + DEPENDS:=+librt +endef + +define Package/ntpclient/description + NTP client for setting system time from NTP servers. +endef + +define Package/ntpclient/conffiles +/etc/config/ntpclient +endef + +MAKE_FLAGS += \ + all adjtimex + +define Package/ntpclient/install + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DATA) ./files/ntpclient.hotplug $(1)/etc/hotplug.d/iface/20-ntpclient + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/ntpclient.config $(1)/etc/config/ntpclient + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpclient $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/adjtimex $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/rate.awk $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,ntpclient)) diff --git a/net/ntpclient/files/ntpclient.config b/net/ntpclient/files/ntpclient.config new file mode 100644 index 0000000..10be886 --- /dev/null +++ b/net/ntpclient/files/ntpclient.config @@ -0,0 +1,23 @@ +config ntpserver + option hostname '0.openwrt.pool.ntp.org' + option port '123' + +config ntpserver + option hostname '1.openwrt.pool.ntp.org' + option port '123' + +config ntpserver + option hostname '2.openwrt.pool.ntp.org' + option port '123' + +config ntpserver + option hostname '3.openwrt.pool.ntp.org' + option port '123' + +config ntpdrift + option freq '0' + +config ntpclient + option interval 600 + #option count 10 + #option interface wan diff --git a/net/ntpclient/files/ntpclient.hotplug b/net/ntpclient/files/ntpclient.hotplug new file mode 100644 index 0000000..c932688 --- /dev/null +++ b/net/ntpclient/files/ntpclient.hotplug @@ -0,0 +1,78 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org + +. /etc/functions.sh + +unset SERVER +unset PORT +unset INTERVAL +unset COUNT +unset INTERFACE_GLOBAL + +NTPC=`which ntpclient` + +check_server() { + local hostname + local port + local interface + [ -n "$SERVER" ] && return + config_get hostname $1 hostname + config_get port $1 port + config_get interface $1 interface + + [ -z "$interface" ] && interface=$INTERFACE_GLOBAL + + [ -n "$interface" ] && { + # $INTERFACE is passed from hotplug event + [ "$interface" = "$INTERFACE" ] || return + } + + [ -z "$hostname" ] && return + $NTPC -c 1 -p ${port:-123} -i 2 -h $hostname > /dev/null && { SERVER=$hostname; PORT=${port:-123}; } +} + +set_drift() { + config_get freq $1 freq + [ -n "$freq" ] && adjtimex -f $freq >/dev/null +} + +start_ntpclient() { + config_foreach set_drift ntpdrift + config_foreach check_server ntpserver + [ -z "$SERVER" ] && exit 0 + logger starting ntpclient + $NTPC ${COUNT:+-c $COUNT} ${INTERVAL:+-i $INTERVAL} -s -l -D -p $PORT -h $SERVER 2> /dev/null +} + +stop_ntpclient() { + logger stopping ntpclient + killall ntpclient +} + +load_settings() { + local interval + local count + local iface + + config_get interval $1 interval + config_get count $1 count + config_get interface $1 interface + + [ -n "$count" ] && COUNT=$count + [ -n "$interval" ] && INTERVAL=$interval + [ -n "$interface" ] && INTERFACE_GLOBAL=$interface +} + +config_load ntpclient +config_foreach load_settings ntpclient + +NTP_RUNNING=`ps | grep $NTPC | grep -v grep` + +case "${ACTION:-ifup}" in + ifup) + [ -z "$NTP_RUNNING" ] && start_ntpclient + ;; + ifdown) + [ -n "$NTP_RUNNING" ] && stop_ntpclient + ;; +esac diff --git a/net/ntpclient/patches/100-daemon.patch b/net/ntpclient/patches/100-daemon.patch new file mode 100644 index 0000000..0ff8d5e --- /dev/null +++ b/net/ntpclient/patches/100-daemon.patch @@ -0,0 +1,24 @@ +Index: ntpclient-2007/ntpclient.c +=================================================================== +--- ntpclient-2007.orig/ntpclient.c 2008-08-12 03:11:34.000000000 +0200 ++++ ntpclient-2007/ntpclient.c 2008-08-12 03:11:36.000000000 +0200 +@@ -614,7 +614,7 @@ + ntpc.cross_check=1; + + for (;;) { +- c = getopt( argc, argv, "c:" DEBUG_OPTION "f:g:h:i:lp:q:" REPLAY_OPTION "st"); ++ c = getopt( argc, argv, "c:" DEBUG_OPTION "f:g:h:i:lp:q:" REPLAY_OPTION "stD"); + if (c == EOF) break; + switch (c) { + case 'c': +@@ -663,6 +663,10 @@ + (ntpc.cross_check)=0; + break; + ++ case 'D': ++ daemon(); ++ break; ++ + default: + usage(argv[0]); + exit(1); diff --git a/net/ntpd/Makefile b/net/ntpd/Makefile new file mode 100644 index 0000000..26c2e56 --- /dev/null +++ b/net/ntpd/Makefile @@ -0,0 +1,161 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ntp +PKG_VERSION:=4.2.6p3 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ +PKG_MD5SUM:=59876a9009b098ff59767ee45a88ebd2 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_BUILD_DEPENDS:=libelf +PKG_FIXUP:=libtool +PKG_LIBTOOL_PATHS:=. sntp + +include $(INCLUDE_DIR)/package.mk + +define Package/ntpd/Default + SUBMENU:=Time Synchronization + SECTION:=net + CATEGORY:=Network + TITLE:=ISC ntp + MAINTAINER:=Peter Wagner + URL:=http://www.ntp.org/ +endef + +define Package/ntpd/Default/description + The ISC ntp suite is a collection of tools used to synchronize the + system clock with remote NTP time servers and run/montior local NTP + servers. +endef + +define Package/ntpd +$(call Package/ntpd/Default) + TITLE+= server + VARIANT:=nossl +endef + +define Package/ntpd/description +$(call Package/ntpd/Default/description) + . + This package contains the ntpd server. +endef + +define Package/ntpd-ssl +$(call Package/ntpd/Default) + TITLE+= server (with OpenSSL support) + VARIANT:=ssl + DEPENDS:=+libopenssl +endef + +define Package/ntpd-ssl/description +$(call Package/ntpd/Default/description) + . + This package contains the ntpd server with OpenSSL support. +endef + +define Package/ntpdate +$(call Package/ntpd/Default) + TITLE+=date + VARIANT:=nossl +endef + +define Package/ntpdate/description +$(call Package/ntpd/Default/description) + . + This package contains ntpdate. +endef + +define Package/ntp-utils +$(call Package/ntpd/Default) + TITLE+= utilities + VARIANT:=nossl + DEPENDS:=+libncurses +endef + +define Package/ntp-utils/description +$(call Package/ntpd/Default/description) + . + This package contains ntpdc and ntpq. +endef + +define Package/ntpd/conffiles +/etc/ntp.conf +endef + +TARGET_CPPFLAGS += \ + -I$(STAGING_DIR)/usr/include/libelf + +CONFIGURE_VARS += \ + ac_cv_header_md5_h=no \ + ac_cv_lib_rt_sched_setscheduler=no \ + ac_cv_header_dns_sd_h=no + +CONFIGURE_ARGS += \ + --disable-all-clocks \ + --disable-parse-clocks \ + --enable-NMEA \ + --enable-LOCAL-CLOCK \ + --enable-SHM \ + --disable-linuxcaps \ + --without-ntpsnmpd \ + +ifeq ($(BUILD_VARIANT),ssl) + CONFIGURE_ARGS += \ + --with-crypto \ + --with-openssl-incdir="$(STAGING_DIR)/usr/include" \ + --with-openssl-libdir="$(STAGING_DIR)/usr/lib" +endif + +define Package/ntpd/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) ./files/ntp.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd +endef + +define Package/ntpd/postinst +#!/bin/sh +[ -L "$${IPKG_INSTROOT}/usr/sbin/ntpd" ] && rm -f "$${IPKG_INSTROOT}/usr/sbin/ntpd" +exit 0 +endef + +define Package/ntpd/postrm +#!/bin/sh +/bin/busybox ntpd -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/sbin/ntpd +exit 0 +endef + +Package/ntpd-ssl/conffiles = $(Package/ntpd/conffiles) +Package/ntpd-ssl/install = $(Package/ntpd/install) + +define Package/ntpdate/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/ntpdate.init $(1)/etc/init.d/ntpdate +endef + +define Package/ntp-utils/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,ntpd)) +$(eval $(call BuildPackage,ntpd-ssl)) +$(eval $(call BuildPackage,ntpdate)) +$(eval $(call BuildPackage,ntp-utils)) diff --git a/net/ntpd/files/ntp.conf b/net/ntpd/files/ntp.conf new file mode 100644 index 0000000..b810305 --- /dev/null +++ b/net/ntpd/files/ntp.conf @@ -0,0 +1,27 @@ +# use a random selection of 8 public stratum 2 servers +# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers + +#restrict default nomodify notrap noquery +#restrict default noquery + + +restrict 127.0.0.1 + +driftfile /tmp/ntp.drift + +server 0.openwrt.pool.ntp.org iburst +server 1.openwrt.pool.ntp.org iburst +server 2.openwrt.pool.ntp.org iburst +server 3.openwrt.pool.ntp.org iburst + + +# GPS(NMEA)+PPS +#server 127.127.20.0 minpoll 4 prefer +#fudge 127.127.20.0 flag3 1 flag2 0 + +# SMA PPS +#server 127.127.28.0 minpoll 4 prefer +#fudge 127.127.28.0 refid PPS flag3 1 + +#server 192.168.1.253 + diff --git a/net/ntpd/files/ntpd.hotplug b/net/ntpd/files/ntpd.hotplug new file mode 100644 index 0000000..992628f --- /dev/null +++ b/net/ntpd/files/ntpd.hotplug @@ -0,0 +1,10 @@ +NAME=ntpd +CONFIG=/etc/ntp.conf +COMMAND=/usr/sbin/$NAME + +[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && { + [ -x $COMMAND ] && [ -r $CONFIG ] && { + killall ntpd + /etc/init.d/ntpd start + } & +} diff --git a/net/ntpd/files/ntpd.init b/net/ntpd/files/ntpd.init new file mode 100644 index 0000000..d8dd4f5 --- /dev/null +++ b/net/ntpd/files/ntpd.init @@ -0,0 +1,17 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2011 OpenWrt.org + +START=65 + +PIDFILE="/var/run/ntpd.pid" + +start() { +# ln -sf /dev/ttyS0 /dev/gps0 +# /usr/sbin/setgarmin -d /dev/gps -c /etc/setgarmin.conf + stop + /sbin/ntpd -g -p $PIDFILE +} + +stop() { + [ -f "$PIDFILE" ] && kill $(cat "$PIDFILE") 2>/dev/null >/dev/null +} diff --git a/net/ntpd/files/ntpdate.init b/net/ntpd/files/ntpdate.init new file mode 100644 index 0000000..2f33210 --- /dev/null +++ b/net/ntpd/files/ntpdate.init @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2008 OpenWrt.org + +START=60 + +STEP_SERVERS="0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org 2.openwrt.pool.ntp.org" +TIMEOUT="2" # in seconds + +start() { + for s in $STEP_SERVERS ; do + /usr/sbin/ntpdate -s -b -u -t "$TIMEOUT" "$s" && break + done +} diff --git a/net/nufw/Makefile b/net/nufw/Makefile new file mode 100644 index 0000000..b378f93 --- /dev/null +++ b/net/nufw/Makefile @@ -0,0 +1,117 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nufw +PKG_VERSION:=2.2.21 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.nufw.org/download/nufw/ +PKG_MD5SUM:=7eb500e7ddb3db622dc6c5d43b495c9a + +PKG_FIXUP:=libtool +PKG_REMOVE_FILES:=autogen.sh aclocal.m4 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/nufw/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Firewall + DEPENDS:=+glib2 +libgnutls +libsasl2 +libnetfilter-queue $(ICONV_DEPENDS) $(INTL_DEPENDS) + TITLE:=nufw + URL:=http://www.nufw.org/ +endef + +define Package/nufw/description + NuFW adds user-based filtering to Netfilter, + the state of the art IP filtering layer from + the Linux kernel. Its exclusive algorithm allows + authenticated filtering even on multiuser computers. +endef + +define Package/nufw + $(call Package/nufw/Default) +endef + +define Package/nutcpc + $(call Package/nufw/Default) + TITLE:=client version +endef + +define Package/nufw-python + $(call Package/nufw/Default) + TITLE:=python bindings +endef + +define PyPackage/nufw-python/filespec ++|$(PYTHON_PKG_DIR)/nuauth_command/__init__.py ++|$(PYTHON_PKG_DIR)/nuauth_command/client.py ++|$(PYTHON_PKG_DIR)/nuauth_command/command_dec.py ++|$(PYTHON_PKG_DIR)/nuauth_command/version.py +endef + + +define Package/nufw-modules + $(call Package/nufw/Default) + TITLE:=NuFW modules +endef + +CONFIGURE_ARGS += \ + --enable-static \ + --enable-shared \ + --disable-pam-nufw \ + --without-system-auth \ + --with-libgnutls-prefix="$(STAGING_DIR)/usr/" \ + --with-libgcrypt-prefix="$(STAGING_DIR)/usr/" \ + --with-libsasl-prefix="$(STAGING_DIR)/usr/" + +define Build/Configure + (cd $(PKG_BUILD_DIR) ; test -x ./autogen.sh && ./autogen.sh || true) + $(call Build/Configure/Default) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \ + -I$(INTL_PREFIX)/include \ + -I$(ICONV_PREFIX)/include" \ + LDFLAGS="$(TARGET_LDFLAGS) \ + -L$(INTL_PREFIX)/lib \ + -L$(ICONV_PREFIX)/lib \ + -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -liconv \ + -lgnutls -lnetfilter_queue -lpthread" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + + +define Package/nufw/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nufw $(1)/usr/sbin/ +endef + +define Package/nutcpc/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nutcpc $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnuclient.so* $(1)/usr/lib/ +endef + +define Package/nufw-modules/install + $(INSTALL_DIR) $(1)/usr/lib/nuauth/modules/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/nuauth/modules/*.so* $(1)/usr/lib/nuauth/modules/ +endef + +$(eval $(call BuildPackage,nufw)) +$(eval $(call BuildPackage,nutcpc)) +$(eval $(call BuildPackage,nufw-modules)) +$(eval $(call PyPackage,nufw-python)) +$(eval $(call BuildPackage,nufw-python)) diff --git a/net/nufw/patches/001-no_doc_tests.patch b/net/nufw/patches/001-no_doc_tests.patch new file mode 100644 index 0000000..97d4459 --- /dev/null +++ b/net/nufw/patches/001-no_doc_tests.patch @@ -0,0 +1,23 @@ +Index: nufw-2.2.21/Makefile.am +=================================================================== +--- nufw-2.2.21.orig/Makefile.am 2008-11-18 10:12:32.000000000 +0100 ++++ nufw-2.2.21/Makefile.am 2009-10-05 20:26:45.000000000 +0200 +@@ -1,4 +1,4 @@ +-SUBDIRS = src scripts doc tests conf python selinux ++SUBDIRS = src scripts conf python selinux + + PATCH_FILES = patches/dump-connection-mark.diff + EXTRA_DIST = autogen.sh $(PATCH_FILES) +Index: nufw-2.2.21/Makefile.in +=================================================================== +--- nufw-2.2.21.orig/Makefile.in 2009-02-03 22:46:54.000000000 +0100 ++++ nufw-2.2.21/Makefile.in 2009-10-05 20:27:05.000000000 +0200 +@@ -193,7 +193,7 @@ + target_alias = @target_alias@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = src scripts doc tests conf python selinux ++SUBDIRS = src scripts conf python selinux + PATCH_FILES = patches/dump-connection-mark.diff + EXTRA_DIST = autogen.sh $(PATCH_FILES) + all: all-recursive diff --git a/net/nufw/patches/002-debian_fixes.patch b/net/nufw/patches/002-debian_fixes.patch new file mode 100644 index 0000000..7cea0a7 --- /dev/null +++ b/net/nufw/patches/002-debian_fixes.patch @@ -0,0 +1,22788 @@ +--- nufw-2.2.21.orig/aclocal.m4 ++++ nufw-2.2.21/aclocal.m4 +@@ -1,4 +1,4 @@ +-# generated automatically by aclocal 1.10.1 -*- Autoconf -*- ++# generated automatically by aclocal 1.10.2 -*- Autoconf -*- + + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, + # 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +@@ -13,8 +13,8 @@ + + m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +-m4_if(AC_AUTOCONF_VERSION, [2.61],, +-[m4_warning([this file was generated for autoconf 2.61. ++m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, ++[m4_warning([this file was generated for autoconf 2.64. + You have another version of autoconf. It may work, but is not guaranteed to. + If you have problems, you may need to regenerate the build system entirely. + To do so, use the procedure documented by the package, typically `autoreconf'.])]) +@@ -114,8 +114,9 @@ + { + int major, minor, micro; + char *tmp_version; ++ int ignored; + +- system ("touch conf.glibtest"); ++ ignored = system ("touch conf.glibtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_glib_version"); +@@ -340,167 +341,6 @@ + AC_SUBST(LIBGCRYPT_LIBS) + ]) + +-dnl Autoconf macros for libgnutls +-dnl $id$ +- +-# Modified for LIBGNUTLS -- nmav +-# Configure paths for LIBGCRYPT +-# Shamelessly stolen from the one of XDELTA by Owen Taylor +-# Werner Koch 99-12-09 +- +-dnl AM_PATH_LIBGNUTLS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) +-dnl Test for libgnutls, and define LIBGNUTLS_CFLAGS and LIBGNUTLS_LIBS +-dnl +-AC_DEFUN([AM_PATH_LIBGNUTLS], +-[dnl +-dnl Get the cflags and libraries from the libgnutls-config script +-dnl +-AC_ARG_WITH(libgnutls-prefix, +- [ --with-libgnutls-prefix=PFX Prefix where libgnutls is installed (optional)], +- libgnutls_config_prefix="$withval", libgnutls_config_prefix="") +- +- if test x$libgnutls_config_prefix != x ; then +- if test x${LIBGNUTLS_CONFIG+set} != xset ; then +- LIBGNUTLS_CONFIG=$libgnutls_config_prefix/bin/libgnutls-config +- fi +- fi +- +- AC_PATH_PROG(LIBGNUTLS_CONFIG, libgnutls-config, no) +- min_libgnutls_version=ifelse([$1], ,0.1.0,$1) +- AC_MSG_CHECKING(for libgnutls - version >= $min_libgnutls_version) +- no_libgnutls="" +- if test "$LIBGNUTLS_CONFIG" = "no" ; then +- no_libgnutls=yes +- else +- LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags` +- LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs` +- libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version` +- +- +- ac_save_CFLAGS="$CFLAGS" +- ac_save_LIBS="$LIBS" +- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" +- LIBS="$LIBS $LIBGNUTLS_LIBS" +-dnl +-dnl Now check if the installed libgnutls is sufficiently new. Also sanity +-dnl checks the results of libgnutls-config to some extent +-dnl +- rm -f conf.libgnutlstest +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +- +-int +-main () +-{ +- system ("touch conf.libgnutlstest"); +- +- if( strcmp( gnutls_check_version(NULL), "$libgnutls_config_version" ) ) +- { +- printf("\n*** 'libgnutls-config --version' returned %s, but LIBGNUTLS (%s)\n", +- "$libgnutls_config_version", gnutls_check_version(NULL) ); +- printf("*** was found! If libgnutls-config was correct, then it is best\n"); +- printf("*** to remove the old version of LIBGNUTLS. You may also be able to fix the error\n"); +- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); +- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); +- printf("*** required on your system.\n"); +- printf("*** If libgnutls-config was wrong, set the environment variable LIBGNUTLS_CONFIG\n"); +- printf("*** to point to the correct copy of libgnutls-config, and remove the file config.cache\n"); +- printf("*** before re-running configure\n"); +- } +- else if ( strcmp(gnutls_check_version(NULL), LIBGNUTLS_VERSION ) ) +- { +- printf("\n*** LIBGNUTLS header file (version %s) does not match\n", LIBGNUTLS_VERSION); +- printf("*** library (version %s)\n", gnutls_check_version(NULL) ); +- } +- else +- { +- if ( gnutls_check_version( "$min_libgnutls_version" ) ) +- { +- return 0; +- } +- else +- { +- printf("no\n*** An old version of LIBGNUTLS (%s) was found.\n", +- gnutls_check_version(NULL) ); +- printf("*** You need a version of LIBGNUTLS newer than %s. The latest version of\n", +- "$min_libgnutls_version" ); +- printf("*** LIBGNUTLS is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n"); +- printf("*** \n"); +- printf("*** If you have already installed a sufficiently new version, this error\n"); +- printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n"); +- printf("*** being found. The easiest way to fix this is to remove the old version\n"); +- printf("*** of LIBGNUTLS, but you can also set the LIBGNUTLS_CONFIG environment to point to the\n"); +- printf("*** correct copy of libgnutls-config. (In this case, you will have to\n"); +- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); +- printf("*** so that the correct libraries are found at run-time))\n"); +- } +- } +- return 1; +-} +-],, no_libgnutls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +- CFLAGS="$ac_save_CFLAGS" +- LIBS="$ac_save_LIBS" +- fi +- +- if test "x$no_libgnutls" = x ; then +- AC_MSG_RESULT(yes) +- ifelse([$2], , :, [$2]) +- else +- if test -f conf.libgnutlstest ; then +- : +- else +- AC_MSG_RESULT(no) +- fi +- if test "$LIBGNUTLS_CONFIG" = "no" ; then +- echo "*** The libgnutls-config script installed by LIBGNUTLS could not be found" +- echo "*** If LIBGNUTLS was installed in PREFIX, make sure PREFIX/bin is in" +- echo "*** your path, or set the LIBGNUTLS_CONFIG environment variable to the" +- echo "*** full path to libgnutls-config." +- else +- if test -f conf.libgnutlstest ; then +- : +- else +- echo "*** Could not run libgnutls test program, checking why..." +- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" +- LIBS="$LIBS $LIBGNUTLS_LIBS" +- AC_TRY_LINK([ +-#include +-#include +-#include +-#include +-], [ return !!gnutls_check_version(NULL); ], +- [ echo "*** The test program compiled, but did not run. This usually means" +- echo "*** that the run-time linker is not finding LIBGNUTLS or finding the wrong" +- echo "*** version of LIBGNUTLS. If it is not finding LIBGNUTLS, you'll need to set your" +- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" +- echo "*** to the installed location Also, make sure you have run ldconfig if that" +- echo "*** is required on your system" +- echo "***" +- echo "*** If you have an old version installed, it is best to remove it, although" +- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +- echo "***" ], +- [ echo "*** The test program failed to compile or link. See the file config.log for the" +- echo "*** exact error that occured. This usually means LIBGNUTLS was incorrectly installed" +- echo "*** or that you have moved LIBGNUTLS since it was installed. In the latter case, you" +- echo "*** may want to edit the libgnutls-config script: $LIBGNUTLS_CONFIG" ]) +- CFLAGS="$ac_save_CFLAGS" +- LIBS="$ac_save_LIBS" +- fi +- fi +- LIBGNUTLS_CFLAGS="" +- LIBGNUTLS_LIBS="" +- ifelse([$3], , :, [$3]) +- fi +- rm -f conf.libgnutlstest +- AC_SUBST(LIBGNUTLS_CFLAGS) +- AC_SUBST(LIBGNUTLS_LIBS) +-]) +- +-dnl *-*wedit:notab*-* Please keep this as the last line. +- + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +@@ -877,12 +717,12 @@ + # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) + # --------------------------------------------------- + m4_define([lt_decl_varnames_tagged], +-[_$0(m4_quote(m4_default([$1], [[, ]])), +- m4_quote(m4_if([$2], [], +- m4_quote(lt_decl_tag_varnames), +- m4_quote(m4_shift($@)))), +- m4_split(m4_normalize(m4_quote(_LT_TAGS))))]) +-m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)]) ++[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...]) +@@ -1442,10 +1282,10 @@ + _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 ++ 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? ++ # 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' ;; +@@ -1487,7 +1327,11 @@ + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" +- if test "$GCC" = "yes"; then ++ 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}" +@@ -2009,7 +1853,7 @@ + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw*) ++ 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, +@@ -2177,10 +2021,6 @@ + # endif + #endif + +-#ifdef __cplusplus +-extern "C" void exit (int); +-#endif +- + void fnord() { int i=42;} + int main () + { +@@ -2196,7 +2036,7 @@ + else + puts (dlerror ()); + +- exit (status); ++ return status; + }] + _LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then +@@ -2235,7 +2075,7 @@ + lt_cv_dlopen_self=yes + ;; + +- mingw* | pw32*) ++ mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; +@@ -2532,6 +2372,7 @@ + [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], +@@ -2696,14 +2537,14 @@ + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32*) ++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,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}`~ +@@ -2726,7 +2567,7 @@ + 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*) ++ 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"` +@@ -3164,7 +3005,7 @@ + version_type=linux + need_lib_prefix=no + need_version=no +- library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ++ 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 +@@ -3188,7 +3029,7 @@ + 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 +@@ -3465,6 +3306,7 @@ + # -- PORTME fill in with the dynamic library characteristics + m4_defun([_LT_CHECK_MAGIC_METHOD], + [m4_require([_LT_DECL_EGREP]) ++m4_require([_LT_DECL_OBJDUMP]) + AC_CACHE_CHECK([how to recognize dependent libraries], + lt_cv_deplibs_check_method, + [lt_cv_file_magic_cmd='$MAGIC_CMD' +@@ -3515,6 +3357,12 @@ + 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 + ;; +@@ -3826,7 +3674,7 @@ + aix*) + symcode='[[BCDT]]' + ;; +-cygwin* | mingw* | pw32*) ++cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; + hpux*) +@@ -4072,7 +3920,7 @@ + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; +- mingw* | cygwin* | os2* | pw32*) ++ 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 +@@ -4099,10 +3947,11 @@ + fi + ;; + hpux*) +- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but +- # not for PA HP-UX. ++ # 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*|ia64*) ++ hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' +@@ -4200,12 +4049,19 @@ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; +- icpc* | ecpc* ) +- # Intel C++ ++ 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,' +@@ -4371,7 +4227,7 @@ + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2*) ++ 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 +@@ -4387,10 +4243,11 @@ + ;; + + hpux*) +- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but +- # not for PA HP-UX. ++ # 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*|ia64*) ++ hppa*64*) + # +Z the default + ;; + *) +@@ -4440,7 +4297,7 @@ + fi + ;; + +- mingw* | cygwin* | pw32* | os2*) ++ 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], [], +@@ -4471,11 +4328,25 @@ + + linux* | k*bsd*-gnu) + case $cc_basename in +- icc* | ecc* | ifort*) ++ # 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) +@@ -4657,7 +4528,7 @@ + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; +- cygwin* | mingw*) ++ 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' + ;; + linux* | k*bsd*-gnu) +@@ -4712,7 +4583,7 @@ + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32*) ++ 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++. +@@ -4727,6 +4598,9 @@ + openbsd*) + with_gnu_ld=no + ;; ++ linux* | k*bsd*-gnu) ++ _LT_TAGVAR(link_all_deplibs, $1)=no ++ ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes +@@ -4799,7 +4673,7 @@ + fi + ;; + +- cygwin* | mingw* | pw32*) ++ 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' +@@ -4865,6 +4739,9 @@ + 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= ;; +@@ -5097,6 +4974,7 @@ + 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 +@@ -5151,7 +5029,7 @@ + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + +- cygwin* | mingw* | pw32*) ++ 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 +@@ -5255,7 +5133,7 @@ + _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 ${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}+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' +@@ -6036,6 +5914,7 @@ + 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. +@@ -6094,7 +5973,7 @@ + esac + ;; + +- cygwin* | mingw* | pw32*) ++ 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' +@@ -7475,6 +7354,18 @@ + ]) + + ++# _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 +@@ -7935,7 +7826,7 @@ + [enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32*) ++*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) +@@ -8176,14 +8067,14 @@ + + # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- + # +-# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +-# Written by Gary V. Vaughan, 2004 ++# 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 5 ltsugar.m4 ++# 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])]) +@@ -8239,14 +8130,14 @@ + # 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([$2], [], [], +- [m4_if([$4], [], [], +- [lt_join(m4_quote(m4_default([$1], [[, ]])), +- lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2], +- [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]), +- [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl +-]) ++[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]) +@@ -8309,15 +8200,15 @@ + + # Generated from ltversion.in. + +-# serial 2976 ltversion.m4 ++# serial 3012 ltversion.m4 + # This file is part of GNU Libtool + +-m4_define([LT_PACKAGE_VERSION], [2.2.4]) +-m4_define([LT_PACKAGE_REVISION], [1.2976]) ++m4_define([LT_PACKAGE_VERSION], [2.2.6]) ++m4_define([LT_PACKAGE_REVISION], [1.3012]) + + AC_DEFUN([LTVERSION_VERSION], +-[macro_version='2.2.4' +-macro_revision='1.2976' ++[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) + ]) +@@ -8573,7 +8464,7 @@ + fi[]dnl + ])# PKG_CHECK_MODULES + +-# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. ++# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -8588,7 +8479,7 @@ + [am__api_version='1.10' + dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to + dnl require some minimum version. Point them to the right macro. +-m4_if([$1], [1.10.1], [], ++m4_if([$1], [1.10.2], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl + ]) + +@@ -8602,12 +8493,12 @@ + # AM_SET_CURRENT_AUTOMAKE_VERSION + # ------------------------------- + # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. ++# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +-[AM_AUTOMAKE_VERSION([1.10.1])dnl ++[AM_AUTOMAKE_VERSION([1.10.2])dnl + m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +-_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) ++_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + + # AM_AUX_DIR_EXPAND -*- Autoconf -*- + +@@ -8857,19 +8748,28 @@ + + # Generate code to set up dependency tracking. -*- Autoconf -*- + +-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 ++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 + # Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. + +-#serial 3 ++#serial 4 + + # _AM_OUTPUT_DEPENDENCY_COMMANDS + # ------------------------------ + AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +-[for mf in $CONFIG_FILES; do ++[# Autoconf 2.62 quotes --file arguments for eval, but not when files ++# are listed without --file. Let's play safe and only enable the eval ++# if we detect the quoting. ++case $CONFIG_FILES in ++*\'*) eval set x "$CONFIG_FILES" ;; ++*) set x $CONFIG_FILES ;; ++esac ++shift ++for mf ++do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. +@@ -9213,13 +9113,13 @@ + + # Helper functions for option handling. -*- Autoconf -*- + +-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. ++# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. + +-# serial 3 ++# serial 4 + + # _AM_MANGLE_OPTION(NAME) + # ----------------------- +@@ -9236,7 +9136,7 @@ + # ---------------------------------- + # OPTIONS is a space-separated list of Automake options. + AC_DEFUN([_AM_SET_OPTIONS], +-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) ++[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + + # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) + # ------------------------------------------- +--- nufw-2.2.21.orig/Makefile.in ++++ nufw-2.2.21/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -99,6 +99,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -111,9 +113,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -124,6 +123,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -132,6 +132,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -191,6 +192,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + SUBDIRS = src scripts doc tests conf python selinux +@@ -240,7 +242,7 @@ + -rm -rf .libs _libs + + distclean-libtool: +- -rm -f libtool ++ -rm -f libtool config.lt + + # This directory's subdirectories are mostly independent; you can cd + # into them and run `make' without going through this Makefile. +@@ -317,7 +319,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/ltmain.sh ++++ nufw-2.2.21/ltmain.sh +@@ -1,6 +1,6 @@ + # Generated from ltmain.m4sh. + +-# ltmain.sh (GNU libtool) 2.2.4 ++# ltmain.sh (GNU libtool) 2.2.6 + # Written by Gordon Matzigkeit , 1996 + + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +@@ -65,7 +65,7 @@ + # compiler: $LTCC + # compiler flags: $LTCFLAGS + # linker: $LD (gnu? $with_gnu_ld) +-# $progname: (GNU libtool) 2.2.4 Debian-2.2.4-0ubuntu4 ++# $progname: (GNU libtool) 2.2.6 Debian-2.2.6a-4 + # automake: $automake_version + # autoconf: $autoconf_version + # +@@ -73,9 +73,9 @@ + + PROGRAM=ltmain.sh + PACKAGE=libtool +-VERSION="2.2.4 Debian-2.2.4-0ubuntu4" ++VERSION="2.2.6 Debian-2.2.6a-4" + TIMESTAMP="" +-package_revision=1.2976 ++package_revision=1.3012 + + # Be Bourne compatible + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +@@ -805,7 +805,7 @@ + + + case $host in +- *cygwin* | *mingw* | *pw32*) ++ *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; +@@ -893,8 +893,9 @@ + # determined imposters. + func_lalib_p () + { +- $SED -e 4q "$1" 2>/dev/null \ +- | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 ++ test -f "$1" && ++ $SED -e 4q "$1" 2>/dev/null \ ++ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 + } + + # func_lalib_unsafe_p file +@@ -907,7 +908,7 @@ + func_lalib_unsafe_p () + { + lalib_p=no +- if test -r "$1" && exec 5<&0 <"$1"; then ++ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line +@@ -1275,7 +1276,7 @@ + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in +- cygwin* | mingw* | pw32* | os2*) ++ cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac +@@ -2046,7 +2047,7 @@ + 'exit $?' + tstripme="$stripme" + case $host_os in +- cygwin* | mingw* | pw32*) ++ cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" +@@ -2152,7 +2153,7 @@ + + # Do a test to see if this is really a libtool program. + case $host in +- *cygwin*|*mingw*) ++ *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result +@@ -2358,7 +2359,7 @@ + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in +- *cygwin* | *mingw* ) ++ *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; +@@ -2370,7 +2371,7 @@ + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in +- *cygwin | *mingw* ) ++ *cygwin | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; +@@ -2426,7 +2427,7 @@ + } lt_dlsymlist; + " + case $host in +- *cygwin* | *mingw* ) ++ *cygwin* | *mingw* | *cegcc* ) + $ECHO >> "$output_objdir/$my_dlsyms" "\ + /* DATA imports from DLLs on WIN32 con't be const, because + runtime relocations are performed -- see ld's documentation +@@ -2512,7 +2513,7 @@ + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in +- *cygwin* | *mingw* ) ++ *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` +@@ -2691,25 +2692,16 @@ + + + +-# func_emit_wrapper arg ++# func_emit_wrapper_part1 [arg=no] + # +-# emit a libtool wrapper script on stdout +-# don't directly open a file because we may want to +-# incorporate the script contents within a cygwin/mingw +-# wrapper executable. Must ONLY be called from within +-# func_mode_link because it depends on a number of variable +-# set therein. +-# +-# arg is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +-# variable will take. If 'yes', then the emitted script +-# will assume that the directory in which it is stored is +-# the '.lib' directory. This is a cygwin/mingw-specific +-# behavior. +-func_emit_wrapper () ++# Emit the first part of a libtool wrapper script on stdout. ++# For more information, see the description associated with ++# func_emit_wrapper(), below. ++func_emit_wrapper_part1 () + { +- func_emit_wrapper_arg1=no ++ func_emit_wrapper_part1_arg1=no + if test -n "$1" ; then +- func_emit_wrapper_arg1=$1 ++ func_emit_wrapper_part1_arg1=$1 + fi + + $ECHO "\ +@@ -2794,10 +2786,27 @@ + file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done ++" ++} ++# end: func_emit_wrapper_part1 ++ ++# func_emit_wrapper_part2 [arg=no] ++# ++# Emit the second part of a libtool wrapper script on stdout. ++# For more information, see the description associated with ++# func_emit_wrapper(), below. ++func_emit_wrapper_part2 () ++{ ++ func_emit_wrapper_part2_arg1=no ++ if test -n "$1" ; then ++ func_emit_wrapper_part2_arg1=$1 ++ fi ++ ++ $ECHO "\ + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. +- WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 ++ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then +@@ -2888,7 +2897,7 @@ + " + case $host in + # Backslashes separate directories on plain windows +- *-*-mingw | *-*-os2*) ++ *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} + " +@@ -2914,7 +2923,207 @@ + fi\ + " + } +-# end: func_emit_wrapper ++# end: func_emit_wrapper_part2 ++ ++ ++# func_emit_wrapper [arg=no] ++# ++# Emit a libtool wrapper script on stdout. ++# Don't directly open a file because we may want to ++# incorporate the script contents within a cygwin/mingw ++# wrapper executable. Must ONLY be called from within ++# func_mode_link because it depends on a number of variables ++# set therein. ++# ++# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR ++# variable will take. If 'yes', then the emitted script ++# will assume that the directory in which it is stored is ++# the $objdir directory. This is a cygwin/mingw-specific ++# behavior. ++func_emit_wrapper () ++{ ++ func_emit_wrapper_arg1=no ++ if test -n "$1" ; then ++ func_emit_wrapper_arg1=$1 ++ fi ++ ++ # split this up so that func_emit_cwrapperexe_src ++ # can call each part independently. ++ func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" ++ func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" ++} ++ ++ ++# func_to_host_path arg ++# ++# Convert paths to host format when used with build tools. ++# Intended for use with "native" mingw (where libtool itself ++# is running under the msys shell), or in the following cross- ++# build environments: ++# $build $host ++# mingw (msys) mingw [e.g. native] ++# cygwin mingw ++# *nix + wine mingw ++# where wine is equipped with the `winepath' executable. ++# In the native mingw case, the (msys) shell automatically ++# converts paths for any non-msys applications it launches, ++# but that facility isn't available from inside the cwrapper. ++# Similar accommodations are necessary for $host mingw and ++# $build cygwin. Calling this function does no harm for other ++# $host/$build combinations not listed above. ++# ++# ARG is the path (on $build) that should be converted to ++# the proper representation for $host. The result is stored ++# in $func_to_host_path_result. ++func_to_host_path () ++{ ++ func_to_host_path_result="$1" ++ if test -n "$1" ; then ++ case $host in ++ *mingw* ) ++ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' ++ case $build in ++ *mingw* ) # actually, msys ++ # awkward: cmd appends spaces to result ++ lt_sed_strip_trailing_spaces="s/[ ]*\$//" ++ func_to_host_path_tmp1=`( cmd //c echo "$1" |\ ++ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` ++ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ ++ $SED -e "$lt_sed_naive_backslashify"` ++ ;; ++ *cygwin* ) ++ func_to_host_path_tmp1=`cygpath -w "$1"` ++ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ ++ $SED -e "$lt_sed_naive_backslashify"` ++ ;; ++ * ) ++ # Unfortunately, winepath does not exit with a non-zero ++ # error code, so we are forced to check the contents of ++ # stdout. On the other hand, if the command is not ++ # found, the shell will set an exit code of 127 and print ++ # *an error message* to stdout. So we must check for both ++ # error code of zero AND non-empty stdout, which explains ++ # the odd construction: ++ func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` ++ if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then ++ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ ++ $SED -e "$lt_sed_naive_backslashify"` ++ else ++ # Allow warning below. ++ func_to_host_path_result="" ++ fi ++ ;; ++ esac ++ if test -z "$func_to_host_path_result" ; then ++ func_error "Could not determine host path corresponding to" ++ func_error " '$1'" ++ func_error "Continuing, but uninstalled executables may not work." ++ # Fallback: ++ func_to_host_path_result="$1" ++ fi ++ ;; ++ esac ++ fi ++} ++# end: func_to_host_path ++ ++# func_to_host_pathlist arg ++# ++# Convert pathlists to host format when used with build tools. ++# See func_to_host_path(), above. This function supports the ++# following $build/$host combinations (but does no harm for ++# combinations not listed here): ++# $build $host ++# mingw (msys) mingw [e.g. native] ++# cygwin mingw ++# *nix + wine mingw ++# ++# Path separators are also converted from $build format to ++# $host format. If ARG begins or ends with a path separator ++# character, it is preserved (but converted to $host format) ++# on output. ++# ++# ARG is a pathlist (on $build) that should be converted to ++# the proper representation on $host. The result is stored ++# in $func_to_host_pathlist_result. ++func_to_host_pathlist () ++{ ++ func_to_host_pathlist_result="$1" ++ if test -n "$1" ; then ++ case $host in ++ *mingw* ) ++ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' ++ # Remove leading and trailing path separator characters from ++ # ARG. msys behavior is inconsistent here, cygpath turns them ++ # into '.;' and ';.', and winepath ignores them completely. ++ func_to_host_pathlist_tmp2="$1" ++ # Once set for this call, this variable should not be ++ # reassigned. It is used in tha fallback case. ++ func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ ++ $SED -e 's|^:*||' -e 's|:*$||'` ++ case $build in ++ *mingw* ) # Actually, msys. ++ # Awkward: cmd appends spaces to result. ++ lt_sed_strip_trailing_spaces="s/[ ]*\$//" ++ func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ ++ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` ++ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ ++ $SED -e "$lt_sed_naive_backslashify"` ++ ;; ++ *cygwin* ) ++ func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` ++ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ ++ $SED -e "$lt_sed_naive_backslashify"` ++ ;; ++ * ) ++ # unfortunately, winepath doesn't convert pathlists ++ func_to_host_pathlist_result="" ++ func_to_host_pathlist_oldIFS=$IFS ++ IFS=: ++ for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do ++ IFS=$func_to_host_pathlist_oldIFS ++ if test -n "$func_to_host_pathlist_f" ; then ++ func_to_host_path "$func_to_host_pathlist_f" ++ if test -n "$func_to_host_path_result" ; then ++ if test -z "$func_to_host_pathlist_result" ; then ++ func_to_host_pathlist_result="$func_to_host_path_result" ++ else ++ func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" ++ fi ++ fi ++ fi ++ IFS=: ++ done ++ IFS=$func_to_host_pathlist_oldIFS ++ ;; ++ esac ++ if test -z "$func_to_host_pathlist_result" ; then ++ func_error "Could not determine the host path(s) corresponding to" ++ func_error " '$1'" ++ func_error "Continuing, but uninstalled executables may not work." ++ # Fallback. This may break if $1 contains DOS-style drive ++ # specifications. The fix is not to complicate the expression ++ # below, but for the user to provide a working wine installation ++ # with winepath so that path translation in the cross-to-mingw ++ # case works properly. ++ lt_replace_pathsep_nix_to_dos="s|:|;|g" ++ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ ++ $SED -e "$lt_replace_pathsep_nix_to_dos"` ++ fi ++ # Now, add the leading and trailing path separators back ++ case "$1" in ++ :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ++ ;; ++ esac ++ case "$1" in ++ *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ++ ;; ++ esac ++ ;; ++ esac ++ fi ++} ++# end: func_to_host_pathlist + + # func_emit_cwrapperexe_src + # emit the source code for a wrapper executable on stdout +@@ -2951,6 +3160,12 @@ + # include + # ifdef __CYGWIN__ + # include ++# define HAVE_SETENV ++# ifdef __STRICT_ANSI__ ++char *realpath (const char *, char *); ++int putenv (char *); ++int setenv (const char *, const char *, int); ++# endif + # endif + #endif + #include +@@ -3057,29 +3272,105 @@ + int check_executable (const char *path); + char *strendzap (char *str, const char *pat); + void lt_fatal (const char *message, ...); ++void lt_setenv (const char *name, const char *value); ++char *lt_extend_str (const char *orig_value, const char *add, int to_end); ++void lt_opt_process_env_set (const char *arg); ++void lt_opt_process_env_prepend (const char *arg); ++void lt_opt_process_env_append (const char *arg); ++int lt_split_name_value (const char *arg, char** name, char** value); ++void lt_update_exe_path (const char *name, const char *value); ++void lt_update_lib_path (const char *name, const char *value); + +-static const char *script_text = ++static const char *script_text_part1 = + EOF + +- func_emit_wrapper yes | ++ func_emit_wrapper_part1 yes | ++ $SED -e 's/\([\\"]\)/\\\1/g' \ ++ -e 's/^/ "/' -e 's/$/\\n"/' ++ echo ";" ++ cat </dev/null || echo $SHELL` +- case $lt_newargv0 in +- *.exe | *.EXE) ;; +- *) lt_newargv0=$lt_newargv0.exe ;; +- esac +- ;; +- * ) lt_newargv0=$SHELL ;; +- esac +- fi +- +- cat <"))); ++ for (i = 0; i < newargc; i++) + { +- LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, newargz[i])); ++ LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + } + + EOF + + case $host_os in + mingw*) +- cat <"), ++ (value ? value : ""))); ++ { ++#ifdef HAVE_SETENV ++ /* always make a copy, for consistency with !HAVE_SETENV */ ++ char *str = xstrdup (value); ++ setenv (name, str, 1); ++#else ++ int len = strlen (name) + 1 + strlen (value) + 1; ++ char *str = XMALLOC (char, len); ++ sprintf (str, "%s=%s", name, value); ++ if (putenv (str) != EXIT_SUCCESS) ++ { ++ XFREE (str); ++ } ++#endif ++ } ++} ++ ++char * ++lt_extend_str (const char *orig_value, const char *add, int to_end) ++{ ++ char *new_value; ++ if (orig_value && *orig_value) ++ { ++ int orig_value_len = strlen (orig_value); ++ int add_len = strlen (add); ++ new_value = XMALLOC (char, add_len + orig_value_len + 1); ++ if (to_end) ++ { ++ strcpy (new_value, orig_value); ++ strcpy (new_value + orig_value_len, add); ++ } ++ else ++ { ++ strcpy (new_value, add); ++ strcpy (new_value + add_len, orig_value); ++ } ++ } ++ else ++ { ++ new_value = xstrdup (add); ++ } ++ return new_value; ++} ++ ++int ++lt_split_name_value (const char *arg, char** name, char** value) ++{ ++ const char *p; ++ int len; ++ if (!arg || !*arg) ++ return 1; ++ ++ p = strchr (arg, (int)'='); ++ ++ if (!p) ++ return 1; ++ ++ *value = xstrdup (++p); ++ ++ len = strlen (arg) - strlen (*value); ++ *name = XMALLOC (char, len); ++ strncpy (*name, arg, len-1); ++ (*name)[len - 1] = '\0'; ++ ++ return 0; ++} ++ ++void ++lt_opt_process_env_set (const char *arg) ++{ ++ char *name = NULL; ++ char *value = NULL; ++ ++ if (lt_split_name_value (arg, &name, &value) != 0) ++ { ++ XFREE (name); ++ XFREE (value); ++ lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); ++ } ++ ++ lt_setenv (name, value); ++ XFREE (name); ++ XFREE (value); ++} ++ ++void ++lt_opt_process_env_prepend (const char *arg) ++{ ++ char *name = NULL; ++ char *value = NULL; ++ char *new_value = NULL; ++ ++ if (lt_split_name_value (arg, &name, &value) != 0) ++ { ++ XFREE (name); ++ XFREE (value); ++ lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); ++ } ++ ++ new_value = lt_extend_str (getenv (name), value, 0); ++ lt_setenv (name, new_value); ++ XFREE (new_value); ++ XFREE (name); ++ XFREE (value); ++} ++ ++void ++lt_opt_process_env_append (const char *arg) ++{ ++ char *name = NULL; ++ char *value = NULL; ++ char *new_value = NULL; ++ ++ if (lt_split_name_value (arg, &name, &value) != 0) ++ { ++ XFREE (name); ++ XFREE (value); ++ lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); ++ } ++ ++ new_value = lt_extend_str (getenv (name), value, 1); ++ lt_setenv (name, new_value); ++ XFREE (new_value); ++ XFREE (name); ++ XFREE (value); ++} ++ ++void ++lt_update_exe_path (const char *name, const char *value) ++{ ++ LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", ++ (name ? name : ""), ++ (value ? value : ""))); ++ ++ if (name && *name && value && *value) ++ { ++ char *new_value = lt_extend_str (getenv (name), value, 0); ++ /* some systems can't cope with a ':'-terminated path #' */ ++ int len = strlen (new_value); ++ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) ++ { ++ new_value[len-1] = '\0'; ++ } ++ lt_setenv (name, new_value); ++ XFREE (new_value); ++ } ++} ++ ++void ++lt_update_lib_path (const char *name, const char *value) ++{ ++ LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", ++ (name ? name : ""), ++ (value ? value : ""))); ++ ++ if (name && *name && value && *value) ++ { ++ char *new_value = lt_extend_str (getenv (name), value, 0); ++ lt_setenv (name, new_value); ++ XFREE (new_value); ++ } ++} ++ ++ + EOF + } + # end: func_emit_cwrapperexe_src +@@ -3515,7 +4033,7 @@ + { + $opt_debug + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra +@@ -3959,6 +4477,13 @@ + -L*) + func_stripname '-L' '' "$arg" + dir=$func_stripname_result ++ if test -z "$dir"; then ++ if test "$#" -gt 0; then ++ func_fatal_error "require no space between \`-L' and \`$1'" ++ else ++ func_fatal_error "need path for \`-L' option" ++ fi ++ fi + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; +@@ -3977,14 +4502,16 @@ + ;; + esac + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; ++ ::) dllsearchpath=$dir;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; ++ ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; +@@ -3995,7 +4522,7 @@ + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) + # These systems don't actually have a C or math library (as such) + continue + ;; +@@ -4072,7 +4599,7 @@ + + -no-install) + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" +@@ -4820,19 +5347,19 @@ + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" ++ tmp_libs= ++ for deplib in $dependency_libs; do ++ deplibs="$deplib $deplibs" ++ if $opt_duplicate_deps ; then ++ case "$tmp_libs " in ++ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ esac ++ fi ++ tmp_libs="$tmp_libs $deplib" ++ done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi +- tmp_libs= +- for deplib in $dependency_libs; do +- deplibs="$deplib $deplibs" +- if $opt_duplicate_deps ; then +- case "$tmp_libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; +- esac +- fi +- tmp_libs="$tmp_libs $deplib" +- done + continue + fi # $pass = conv + +@@ -5032,7 +5559,7 @@ + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in +- *cygwin* | *mingw*) ++ *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs="$notinst_deplibs $lib" + need_relink=no +@@ -5102,7 +5629,7 @@ + elif test -n "$soname_spec"; then + # bleh windows + case $host in +- *cygwin* | mingw*) ++ *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" +@@ -5369,6 +5896,7 @@ + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do ++ path= + case $deplib in + -L*) path="$deplib" ;; + *.la) +@@ -5884,7 +6412,7 @@ + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in +- *.$objext) ++ *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then +@@ -5955,7 +6483,7 @@ + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) +@@ -6454,7 +6982,7 @@ + + orig_export_symbols= + case $host_os in +- cygwin* | mingw*) ++ cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then +@@ -7079,14 +7607,16 @@ + esac + fi + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; ++ ::) dllsearchpath=$libdir;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; ++ ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; +@@ -7156,6 +7686,10 @@ + wrappers_required=no + fi + ;; ++ *cegcc) ++ # Disable wrappers for cegcc, we are cross compiling anyway. ++ wrappers_required=no ++ ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no +@@ -7308,11 +7842,10 @@ + + func_emit_cwrapperexe_src > $cwrappersource + +- # we should really use a build-platform specific compiler +- # here, but OTOH, the wrappers (shell script and this C one) +- # are only useful if you want to execute the "real" binary. +- # Since the "real" binary is built for $host, then this +- # wrapper might as well be built for $host, too. ++ # The wrapper executable is built using the $host compiler, ++ # because it contains $host paths and files. If cross- ++ # compiling, it, like the target executable, must be ++ # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper +@@ -7597,7 +8130,7 @@ + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in +- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; ++ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $ECHO > $output "\ + # $outputname - a libtool library file +--- nufw-2.2.21.orig/configure.ac ++++ nufw-2.2.21/configure.ac +@@ -87,6 +87,7 @@ + #AM_CHECK_PATH([libgcrypt], [gcry_md_open],AC_DEFINE([HAVE_LIBRARY_GCRYPT],[1],[Gcrypt lib flag]), check_gcrypt=no,[-L/usr/local/lib]) + #AM_CHECK_PATH(libgnutls], [gnutls_init],AC_DEFINE([HAVE_LIBRARY_GNUTLS],[1],[Gnutls lib flag]), check_gnutls=no) + ++PKG_PROG_PKG_CONFIG + + NEED_LIBGCRYPT_VERSION=1.2.0 + AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_VERSION") +@@ -99,11 +100,7 @@ + fi + + NEED_LIBGNUTLS_VERSION=1.0.16 +-AM_PATH_LIBGNUTLS("$NEED_LIBGNUTLS_VERSION") +-if test "x$LIBGNUTLS_LIBS" = "x"; then +- AC_MSG_ERROR([libgnutls is needed. +- See www.gnu.org/software/gnutls/ .]) +-fi ++PKG_CHECK_MODULES(GNUTLS, gnutls >= $NEED_LIBGNUTLS_VERSION,,exit) + + #Configure database support, depending on user input + AC_ARG_WITH(prelude-log, +--- nufw-2.2.21.orig/configure ++++ nufw-2.2.21/configure +@@ -1,62 +1,83 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.61 for NuFW 2.2.21. ++# Generated by GNU Autoconf 2.64 for NuFW 2.2.21. + # + # Report bugs to . + # + # 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, 2009 Free Software ++# Foundation, Inc. ++# + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. +-## --------------------- ## +-## M4sh Initialization. ## +-## --------------------- ## ++## -------------------- ## ++## M4sh Initialization. ## ++## -------------------- ## + + # Be more Bourne compatible + DUALCASE=1; export DUALCASE # for MKS sh +-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: +- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST + else +- case `(set -o) 2>/dev/null` in +- *posix*) set -o posix ;; ++ case `(set -o) 2>/dev/null` in #( ++ *posix*) : ++ set -o posix ;; #( ++ *) : ++ ;; + esac +- + fi + + +- +- +-# PATH needs CR +-# Avoid depending upon Character Ranges. +-as_cr_letters='abcdefghijklmnopqrstuvwxyz' +-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +-as_cr_Letters=$as_cr_letters$as_cr_LETTERS +-as_cr_digits='0123456789' +-as_cr_alnum=$as_cr_Letters$as_cr_digits +- +-# The user is always right. +-if test "${PATH_SEPARATOR+set}" != set; then +- echo "#! /bin/sh" >conf$$.sh +- echo "exit 0" >>conf$$.sh +- chmod +x conf$$.sh +- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then +- PATH_SEPARATOR=';' ++as_nl=' ++' ++export as_nl ++# Printing a long string crashes Solaris 7 /usr/bin/printf. ++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo ++# Prefer a ksh shell builtin over an external printf program on Solaris, ++# but without wasting forks for bash or zsh. ++if test -z "$BASH_VERSION$ZSH_VERSION" \ ++ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then ++ as_echo='print -r --' ++ as_echo_n='print -rn --' ++elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then ++ as_echo='printf %s\n' ++ as_echo_n='printf %s' ++else ++ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then ++ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' ++ as_echo_n='/usr/ucb/echo -n' + else +- 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 + +-# Support unset when possible. +-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +- as_unset=unset +-else +- as_unset=false ++# 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 + + +@@ -65,20 +86,18 @@ + # 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. +-case $0 in ++case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +-done ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++ done + IFS=$as_save_IFS + + ;; +@@ -89,354 +108,322 @@ + as_myself=$0 + fi + if test ! -f "$as_myself"; then +- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 +- { (exit 1); exit 1; } ++ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ exit 1 + fi + +-# Work around bugs in pre-3.0 UWIN ksh. +-for as_var in ENV MAIL MAILPATH +-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++# Unset variables that we do not need and which cause bugs (e.g. in ++# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" ++# suppresses any "Segmentation fault" message there. '((' could ++# trigger a bug in pdksh 5.2.14. ++for as_var in BASH_ENV ENV MAIL MAILPATH ++do eval test x\${$as_var+set} = xset \ ++ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : + done + PS1='$ ' + PS2='> ' + PS4='+ ' + + # NLS nuisances. +-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 +- +-# Required to use basename. +-if expr a : '\(a\)' >/dev/null 2>&1 && +- test "X`expr 00001 : '.*\(...\)'`" = X001; then +- as_expr=expr +-else +- as_expr=false +-fi +- +-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +- as_basename=basename +-else +- as_basename=false +-fi +- +- +-# Name of the executable. +-as_me=`$as_basename -- "$0" || +-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ +- X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)' \| . 2>/dev/null || +-echo X/"$0" | +- sed '/^.*\/\([^/][^/]*\)\/*$/{ +- s//\1/ +- q +- } +- /^X\/\(\/\/\)$/{ +- s//\1/ +- q +- } +- /^X\/\(\/\).*/{ +- s//\1/ +- q +- } +- s/.*/./; q'` ++LC_ALL=C ++export LC_ALL ++LANGUAGE=C ++export LANGUAGE + + # CDPATH. +-$as_unset CDPATH +- ++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + if test "x$CONFIG_SHELL" = x; then +- if (eval ":") 2>/dev/null; then +- as_have_required=yes ++ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : ++ emulate sh ++ NULLCMD=: ++ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which ++ # is contrary to our usage. Disable this feature. ++ alias -g '\${1+\"\$@\"}'='\"\$@\"' ++ setopt NO_GLOB_SUBST + else +- as_have_required=no ++ case \`(set -o) 2>/dev/null\` in #( ++ *posix*) : ++ set -o posix ;; #( ++ *) : ++ ;; ++esac + fi +- +- if test $as_have_required = yes && (eval ": +-(as_func_return () { +- (exit \$1) +-} +-as_func_success () { +- as_func_return 0 +-} +-as_func_failure () { +- as_func_return 1 +-} +-as_func_ret_success () { +- return 0 +-} +-as_func_ret_failure () { +- return 1 +-} ++" ++ as_required="as_fn_return () { (exit \$1); } ++as_fn_success () { as_fn_return 0; } ++as_fn_failure () { as_fn_return 1; } ++as_fn_ret_success () { return 0; } ++as_fn_ret_failure () { return 1; } + + exitcode=0 +-if as_func_success; then +- : +-else +- exitcode=1 +- echo as_func_success failed. +-fi +- +-if as_func_failure; then +- exitcode=1 +- echo as_func_failure succeeded. +-fi +- +-if as_func_ret_success; then +- : ++as_fn_success || { exitcode=1; echo as_fn_success failed.; } ++as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } ++as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } ++as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } ++if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : ++ ++else ++ exitcode=1; echo positional parameters were not saved. ++fi ++test x\$exitcode = x0 || exit 1" ++ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO ++ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO ++ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && ++ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 ++test \$(( 1 + 1 )) = 2 || exit 1" ++ if (eval "$as_required") 2>/dev/null; then : ++ as_have_required=yes + else +- exitcode=1 +- echo as_func_ret_success failed. +-fi +- +-if as_func_ret_failure; then +- exitcode=1 +- echo as_func_ret_failure succeeded. ++ as_have_required=no + fi ++ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then +- : + else +- exitcode=1 +- echo positional parameters were not saved. +-fi +- +-test \$exitcode = 0) || { (exit 1); exit 1; } +- +-( +- as_lineno_1=\$LINENO +- as_lineno_2=\$LINENO +- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && +- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +-") 2> /dev/null; then +- : +-else +- as_candidate_shells= +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++as_found=false + for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- case $as_dir in ++ as_found=: ++ case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do +- as_candidate_shells="$as_candidate_shells $as_dir/$as_base" ++ # Try only shells that exist, to save several forks. ++ as_shell=$as_dir/$as_base ++ if { test -f "$as_shell" || test -f "$as_shell.exe"; } && ++ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : ++ CONFIG_SHELL=$as_shell as_have_required=yes ++ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : ++ break 2 ++fi ++fi + done;; + esac ++ as_found=false + done ++$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && ++ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : ++ CONFIG_SHELL=$SHELL as_have_required=yes ++fi; } + IFS=$as_save_IFS + + +- for as_shell in $as_candidate_shells $SHELL; do +- # Try only shells that exist, to save several forks. +- if { test -f "$as_shell" || test -f "$as_shell.exe"; } && +- { ("$as_shell") 2> /dev/null <<\_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 +- # is contrary to our usage. Disable this feature. +- alias -g '${1+"$@"}'='"$@"' +- setopt NO_GLOB_SUBST +-else +- case `(set -o) 2>/dev/null` in +- *posix*) set -o posix ;; +-esac +- ++ if test "x$CONFIG_SHELL" != x; then : ++ # We cannot yet assume a decent shell, so we have to provide a ++ # neutralization value for shells without unset; and this also ++ # works around shells that cannot unset nonexistent variables. ++ BASH_ENV=/dev/null ++ ENV=/dev/null ++ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV ++ export CONFIG_SHELL ++ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} ++fi ++ ++ if test x$as_have_required = xno; then : ++ $as_echo "$0: This script requires a shell more modern than all" ++ $as_echo "$0: the shells that I found on your system." ++ if test x${ZSH_VERSION+set} = xset ; then ++ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" ++ $as_echo "$0: be upgraded to zsh 4.3.4 or later." ++ else ++ $as_echo "$0: Please tell bug-autoconf@gnu.org and ++$0: nufw-devel@nongnu.org about your system, including any ++$0: error possibly output before this message. Then install ++$0: a modern shell, or manually run the script under such a ++$0: shell if you do have one." ++ fi ++ exit 1 + fi +- +- +-: +-_ASEOF +-}; then +- CONFIG_SHELL=$as_shell +- as_have_required=yes +- if { "$as_shell" 2> /dev/null <<\_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 +- # is contrary to our usage. Disable this feature. +- alias -g '${1+"$@"}'='"$@"' +- setopt NO_GLOB_SUBST +-else +- case `(set -o) 2>/dev/null` in +- *posix*) set -o posix ;; +-esac +- + fi +- +- +-: +-(as_func_return () { +- (exit $1) +-} +-as_func_success () { +- as_func_return 0 +-} +-as_func_failure () { +- as_func_return 1 +-} +-as_func_ret_success () { +- return 0 +-} +-as_func_ret_failure () { +- return 1 +-} +- +-exitcode=0 +-if as_func_success; then +- : +-else +- exitcode=1 +- echo as_func_success failed. + fi ++SHELL=${CONFIG_SHELL-/bin/sh} ++export SHELL ++# Unset more variables known to interfere with behavior of common tools. ++CLICOLOR_FORCE= GREP_OPTIONS= ++unset CLICOLOR_FORCE GREP_OPTIONS + +-if as_func_failure; then +- exitcode=1 +- echo as_func_failure succeeded. +-fi ++## --------------------- ## ++## M4sh Shell Functions. ## ++## --------------------- ## ++# as_fn_unset VAR ++# --------------- ++# Portably unset VAR. ++as_fn_unset () ++{ ++ { eval $1=; unset $1;} ++} ++as_unset=as_fn_unset ++ ++# as_fn_set_status STATUS ++# ----------------------- ++# Set $? to STATUS, without forking. ++as_fn_set_status () ++{ ++ return $1 ++} # as_fn_set_status ++ ++# as_fn_exit STATUS ++# ----------------- ++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. ++as_fn_exit () ++{ ++ set +e ++ as_fn_set_status $1 ++ exit $1 ++} # as_fn_exit ++ ++# as_fn_mkdir_p ++# ------------- ++# Create "$as_dir" as a directory, including parents if necessary. ++as_fn_mkdir_p () ++{ + +-if as_func_ret_success; then +- : +-else +- exitcode=1 +- echo as_func_ret_success failed. +-fi ++ case $as_dir in #( ++ -*) as_dir=./$as_dir;; ++ esac ++ test -d "$as_dir" || eval $as_mkdir_p || { ++ as_dirs= ++ while :; do ++ case $as_dir in #( ++ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( ++ *) as_qdir=$as_dir;; ++ esac ++ as_dirs="'$as_qdir' $as_dirs" ++ as_dir=`$as_dirname -- "$as_dir" || ++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$as_dir" : 'X\(//\)[^/]' \| \ ++ X"$as_dir" : 'X\(//\)$' \| \ ++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X"$as_dir" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ test -d "$as_dir" && break ++ done ++ test -z "$as_dirs" || eval "mkdir $as_dirs" ++ } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + +-if as_func_ret_failure; then +- exitcode=1 +- echo as_func_ret_failure succeeded. +-fi + +-if ( set x; as_func_ret_success y && test x = "$1" ); then +- : ++} # as_fn_mkdir_p ++# as_fn_append VAR VALUE ++# ---------------------- ++# Append the text in VALUE to the end of the definition contained in VAR. Take ++# advantage of any shell optimizations that allow amortized linear growth over ++# repeated appends, instead of the typical quadratic growth present in naive ++# implementations. ++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : ++ eval 'as_fn_append () ++ { ++ eval $1+=\$2 ++ }' + else +- exitcode=1 +- echo positional parameters were not saved. +-fi +- +-test $exitcode = 0) || { (exit 1); exit 1; } +- +-( +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } +- +-_ASEOF +-}; then +- break +-fi +- +-fi +- +- done +- +- 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+"$@"} +-fi +- +- +- if test $as_have_required = no; then +- echo This script requires a shell more modern than all the +- echo shells that I found on your system. Please install a +- echo modern shell, or manually run the script under such a +- echo shell if you do have one. +- { (exit 1); exit 1; } +-fi +- +- +-fi +- +-fi ++ as_fn_append () ++ { ++ eval $1=\$$1\$2 ++ } ++fi # as_fn_append + ++# as_fn_arith ARG... ++# ------------------ ++# Perform arithmetic evaluation on the ARGs, and store the result in the ++# global $as_val. Take advantage of shells that can avoid forks. The arguments ++# must be portable across $(()) and expr. ++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : ++ eval 'as_fn_arith () ++ { ++ as_val=$(( $* )) ++ }' ++else ++ as_fn_arith () ++ { ++ as_val=`expr "$@" || test $? -eq 1` ++ } ++fi # as_fn_arith + + +-(eval "as_func_return () { +- (exit \$1) +-} +-as_func_success () { +- as_func_return 0 +-} +-as_func_failure () { +- as_func_return 1 +-} +-as_func_ret_success () { +- return 0 +-} +-as_func_ret_failure () { +- return 1 +-} ++# as_fn_error ERROR [LINENO LOG_FD] ++# --------------------------------- ++# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are ++# provided, also output the error to LOG_FD, referencing LINENO. Then exit the ++# script with status $?, using 1 if that was 0. ++as_fn_error () ++{ ++ as_status=$?; test $as_status -eq 0 && as_status=1 ++ if test "$3"; then ++ as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 ++ fi ++ $as_echo "$as_me: error: $1" >&2 ++ as_fn_exit $as_status ++} # as_fn_error + +-exitcode=0 +-if as_func_success; then +- : ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then ++ as_expr=expr + else +- exitcode=1 +- echo as_func_success failed. +-fi +- +-if as_func_failure; then +- exitcode=1 +- echo as_func_failure succeeded. ++ as_expr=false + fi + +-if as_func_ret_success; then +- : ++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then ++ as_basename=basename + else +- exitcode=1 +- echo as_func_ret_success failed. +-fi +- +-if as_func_ret_failure; then +- exitcode=1 +- echo as_func_ret_failure succeeded. ++ as_basename=false + fi + +-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then +- : ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname + else +- exitcode=1 +- echo positional parameters were not saved. ++ as_dirname=false + 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 +-} ++as_me=`$as_basename -- "$0" || ++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ ++ X"$0" : 'X\(//\)$' \| \ ++ X"$0" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X/"$0" | ++ sed '/^.*\/\([^/][^/]*\)\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits + + +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { +- +- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO +- # uniformly replaced by the line number. The first 'sed' inserts a +- # line-number line after each line using $LINENO; the second 'sed' +- # does the real work. The second script uses 'N' to pair each +- # line-number line with the line containing $LINENO, and appends +- # trailing '-' during substitution so that $LINENO is not a special +- # case at line end. +- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the +- # scripts with optimization help from Paolo Bonzini. Blame Lee +- # E. McMahon (1931-1989) for sed's syntax. :-) ++ as_lineno_1=$LINENO as_lineno_1a=$LINENO ++ as_lineno_2=$LINENO as_lineno_2a=$LINENO ++ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && ++ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { ++ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= +@@ -453,8 +440,7 @@ + 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 +- { (exit 1); exit 1; }; } ++ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the +@@ -464,49 +450,40 @@ + exit + } + +- +-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then +- as_dirname=dirname +-else +- as_dirname=false +-fi +- + ECHO_C= ECHO_N= ECHO_T= +-case `echo -n x` in ++case `echo -n x` in #((((( + -n*) +- case `echo 'x\c'` in ++ case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. +- *) ECHO_C='\c';; ++ xy) ECHO_C='\c';; ++ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ++ ECHO_T=' ';; + esac;; + *) + ECHO_N='-n';; + esac + +-if expr a : '\(a\)' >/dev/null 2>&1 && +- test "X`expr 00001 : '.*\(...\)'`" = X001; then +- as_expr=expr +-else +- as_expr=false +-fi +- + rm -f conf$$ conf$$.exe conf$$.file + if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file + else + rm -f conf$$.dir +- mkdir conf$$.dir ++ 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 +@@ -514,7 +491,7 @@ + rmdir conf$$.dir 2>/dev/null + + if mkdir -p . 2>/dev/null; then +- as_mkdir_p=: ++ as_mkdir_p='mkdir -p "$as_dir"' + else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +@@ -531,12 +508,12 @@ + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then +- test -d "$1/."; ++ test -d "$1/."; + else +- case $1 in +- -*)set "./$1";; ++ case $1 in #( ++ -*)set "./$1";; + esac; +- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +@@ -551,7 +528,6 @@ + + + +- + # Check that we are running under the correct shell. + SHELL=${CONFIG_SHELL-/bin/sh} + +@@ -718,7 +694,6 @@ + subdirs= + MFLAGS= + MAKEFLAGS= +-SHELL=${CONFIG_SHELL-/bin/sh} + + # Identity of this package. + PACKAGE_NAME='NuFW' +@@ -726,6 +701,7 @@ + PACKAGE_VERSION='2.2.21' + PACKAGE_STRING='NuFW 2.2.21' + PACKAGE_BUGREPORT='nufw-devel@nongnu.org' ++PACKAGE_URL='' + + ac_unique_file="src/nufw/main.c" + # Factoring default headers for most tests. +@@ -764,172 +740,210 @@ + # include + #endif" + +-ac_subst_vars='SHELL +-PATH_SEPARATOR +-PACKAGE_NAME +-PACKAGE_TARNAME +-PACKAGE_VERSION +-PACKAGE_STRING +-PACKAGE_BUGREPORT +-exec_prefix +-prefix +-program_transform_name +-bindir +-sbindir +-libexecdir +-datarootdir +-datadir +-sysconfdir +-sharedstatedir +-localstatedir +-includedir +-oldincludedir +-docdir +-infodir +-htmldir +-dvidir +-pdfdir +-psdir +-libdir +-localedir +-mandir +-DEFS +-ECHO_C +-ECHO_N +-ECHO_T +-LIBS +-build_alias +-host_alias +-target_alias +-CC +-CFLAGS +-LDFLAGS +-CPPFLAGS +-ac_ct_CC +-EXEEXT +-OBJEXT +-LIBTOOL +-build +-build_cpu +-build_vendor +-build_os +-host +-host_cpu +-host_vendor +-host_os +-SED +-GREP +-EGREP +-FGREP +-LD +-DUMPBIN +-ac_ct_DUMPBIN +-NM +-LN_S +-AR +-STRIP +-RANLIB +-lt_ECHO +-DSYMUTIL +-NMEDIT +-LIPO +-OTOOL +-OTOOL64 +-CPP +-INSTALL_PROGRAM +-INSTALL_SCRIPT +-INSTALL_DATA +-DOCBOOK2MAN +-DOCBOOK2PDF +-LIBOBJS +-LIBGCRYPT_CONFIG +-LIBGCRYPT_CFLAGS +-LIBGCRYPT_LIBS +-LIBGNUTLS_CONFIG +-LIBGNUTLS_CFLAGS +-LIBGNUTLS_LIBS +-PYTHON +-PKG_CONFIG +-GLIB_CFLAGS +-GLIB_LIBS +-GLIB_GENMARSHAL +-GOBJECT_QUERY +-GLIB_MKENUMS +-USE_SYSTEM_AUTH_TRUE +-USE_SYSTEM_AUTH_FALSE +-USE_LDAP_TRUE +-USE_LDAP_FALSE +-USE_PRELUDE_LOG_TRUE +-USE_PRELUDE_LOG_FALSE +-USE_MYSQL_LOG_TRUE +-USE_MYSQL_LOG_FALSE +-USE_MYSQL_AUTH_TRUE +-USE_MYSQL_AUTH_FALSE +-HAVE_MYSQL_CONFIG_TRUE +-HAVE_MYSQL_CONFIG_FALSE +-USE_PGSQL_LOG_TRUE +-USE_PGSQL_LOG_FALSE +-USE_PLAINTEXT_AUTH_TRUE +-USE_PLAINTEXT_AUTH_FALSE +-USE_MARK_GROUP_TRUE +-USE_MARK_GROUP_FALSE +-USE_MARK_FIELD_TRUE +-USE_MARK_FIELD_FALSE +-USE_MARK_FLAG_TRUE +-USE_MARK_FLAG_FALSE +-USE_SYSLOG_LOG_TRUE +-USE_SYSLOG_LOG_FALSE +-BUILD_NUFW_TRUE +-BUILD_NUFW_FALSE +-BUILD_NUAUTH_TRUE +-BUILD_NUAUTH_FALSE +-BUILD_NUTCPC_TRUE +-BUILD_NUTCPC_FALSE +-BUILD_LIBNUCLIENT_TRUE +-BUILD_LIBNUCLIENT_FALSE +-BUILD_PAM_NUFW_TRUE +-BUILD_PAM_NUFW_FALSE +-BUILD_NUAUTH_COMMAND_TRUE +-BUILD_NUAUTH_COMMAND_FALSE +-HAVE_IPQ_TRUE +-HAVE_IPQ_FALSE +-USE_USER_MARK_TRUE +-USE_USER_MARK_FALSE +-HAVE_NFQUEUE_ONLY_TRUE +-HAVE_NFQUEUE_ONLY_FALSE +-HAVE_NFQUEUE_CONNTRACK_TRUE +-HAVE_NFQUEUE_CONNTRACK_FALSE +-HAVE_CONNTRACK_ONLY_TRUE +-HAVE_CONNTRACK_ONLY_FALSE +-am__isrc +-CYGPATH_W +-PACKAGE +-VERSION +-ACLOCAL +-AUTOCONF +-AUTOMAKE +-AUTOHEADER +-MAKEINFO +-install_sh +-INSTALL_STRIP_PROGRAM +-mkdir_p +-AWK +-SET_MAKE +-am__leading_dot +-AMTAR +-am__tar +-am__untar +-DEPDIR +-am__include +-am__quote +-AMDEP_TRUE +-AMDEP_FALSE +-AMDEPBACKSLASH +-CCDEPMODE +-am__fastdepCC_TRUE ++ac_subst_vars='LTLIBOBJS + am__fastdepCC_FALSE +-LTLIBOBJS' ++am__fastdepCC_TRUE ++CCDEPMODE ++AMDEPBACKSLASH ++AMDEP_FALSE ++AMDEP_TRUE ++am__quote ++am__include ++DEPDIR ++am__untar ++am__tar ++AMTAR ++am__leading_dot ++SET_MAKE ++AWK ++mkdir_p ++MKDIR_P ++INSTALL_STRIP_PROGRAM ++install_sh ++MAKEINFO ++AUTOHEADER ++AUTOMAKE ++AUTOCONF ++ACLOCAL ++VERSION ++PACKAGE ++CYGPATH_W ++am__isrc ++HAVE_CONNTRACK_ONLY_FALSE ++HAVE_CONNTRACK_ONLY_TRUE ++HAVE_NFQUEUE_CONNTRACK_FALSE ++HAVE_NFQUEUE_CONNTRACK_TRUE ++HAVE_NFQUEUE_ONLY_FALSE ++HAVE_NFQUEUE_ONLY_TRUE ++USE_USER_MARK_FALSE ++USE_USER_MARK_TRUE ++HAVE_IPQ_FALSE ++HAVE_IPQ_TRUE ++BUILD_NUAUTH_COMMAND_FALSE ++BUILD_NUAUTH_COMMAND_TRUE ++BUILD_PAM_NUFW_FALSE ++BUILD_PAM_NUFW_TRUE ++BUILD_LIBNUCLIENT_FALSE ++BUILD_LIBNUCLIENT_TRUE ++BUILD_NUTCPC_FALSE ++BUILD_NUTCPC_TRUE ++BUILD_NUAUTH_FALSE ++BUILD_NUAUTH_TRUE ++BUILD_NUFW_FALSE ++BUILD_NUFW_TRUE ++USE_SYSLOG_LOG_FALSE ++USE_SYSLOG_LOG_TRUE ++USE_MARK_FLAG_FALSE ++USE_MARK_FLAG_TRUE ++USE_MARK_FIELD_FALSE ++USE_MARK_FIELD_TRUE ++USE_MARK_GROUP_FALSE ++USE_MARK_GROUP_TRUE ++USE_PLAINTEXT_AUTH_FALSE ++USE_PLAINTEXT_AUTH_TRUE ++USE_PGSQL_LOG_FALSE ++USE_PGSQL_LOG_TRUE ++HAVE_MYSQL_CONFIG_FALSE ++HAVE_MYSQL_CONFIG_TRUE ++USE_MYSQL_AUTH_FALSE ++USE_MYSQL_AUTH_TRUE ++USE_MYSQL_LOG_FALSE ++USE_MYSQL_LOG_TRUE ++USE_PRELUDE_LOG_FALSE ++USE_PRELUDE_LOG_TRUE ++USE_LDAP_FALSE ++USE_LDAP_TRUE ++USE_SYSTEM_AUTH_FALSE ++USE_SYSTEM_AUTH_TRUE ++GLIB_MKENUMS ++GOBJECT_QUERY ++GLIB_GENMARSHAL ++GLIB_LIBS ++GLIB_CFLAGS ++PYTHON ++GNUTLS_LIBS ++GNUTLS_CFLAGS ++LIBGCRYPT_LIBS ++LIBGCRYPT_CFLAGS ++LIBGCRYPT_CONFIG ++PKG_CONFIG ++LIBOBJS ++DOCBOOK2PDF ++DOCBOOK2MAN ++INSTALL_DATA ++INSTALL_SCRIPT ++INSTALL_PROGRAM ++CPP ++OTOOL64 ++OTOOL ++LIPO ++NMEDIT ++DSYMUTIL ++lt_ECHO ++RANLIB ++STRIP ++AR ++OBJDUMP ++LN_S ++NM ++ac_ct_DUMPBIN ++DUMPBIN ++LD ++FGREP ++EGREP ++GREP ++SED ++host_os ++host_vendor ++host_cpu ++host ++build_os ++build_vendor ++build_cpu ++build ++LIBTOOL ++OBJEXT ++EXEEXT ++ac_ct_CC ++CPPFLAGS ++LDFLAGS ++CFLAGS ++CC ++target_alias ++host_alias ++build_alias ++LIBS ++ECHO_T ++ECHO_N ++ECHO_C ++DEFS ++mandir ++localedir ++libdir ++psdir ++pdfdir ++dvidir ++htmldir ++infodir ++docdir ++oldincludedir ++includedir ++localstatedir ++sharedstatedir ++sysconfdir ++datadir ++datarootdir ++libexecdir ++sbindir ++bindir ++program_transform_name ++prefix ++exec_prefix ++PACKAGE_URL ++PACKAGE_BUGREPORT ++PACKAGE_STRING ++PACKAGE_VERSION ++PACKAGE_TARNAME ++PACKAGE_NAME ++PATH_SEPARATOR ++SHELL' + ac_subst_files='' ++ac_user_opts=' ++enable_option_checking ++enable_shared ++enable_static ++with_pic ++enable_fast_install ++with_gnu_ld ++enable_libtool_lock ++with_libgcrypt_prefix ++with_prelude_log ++with_mysql_log ++with_mysql_auth ++with_pgsql_log ++with_syslog_log ++with_plaintext_auth ++with_mark_group ++with_mark_field ++with_mark_flag ++with_system_auth ++with_ldap ++with_nfqueue ++with_nfconntrack ++with_utf8 ++with_fixedtimeout ++enable_nufw ++enable_nuauth ++enable_libnuclient ++enable_nutcpc ++enable_pam_nufw ++enable_nuauth_command ++enable_debug ++with_perf_display ++enable_glibtest ++with_user_mark ++enable_dependency_tracking ++' + ac_precious_vars='build_alias + host_alias + target_alias +@@ -939,12 +953,16 @@ + LIBS + CPPFLAGS + CPP +-PKG_CONFIG' ++PKG_CONFIG ++GNUTLS_CFLAGS ++GNUTLS_LIBS' + + + # 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 +@@ -1043,13 +1061,20 @@ + 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 +- { (exit 1); exit 1; }; } +- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` +- eval enable_$ac_feature=no ;; ++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && ++ as_fn_error "invalid feature name: $ac_useropt" ++ ac_useropt_orig=$ac_useropt ++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ++ case $ac_user_opts in ++ *" ++"enable_$ac_useropt" ++"*) ;; ++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ++ ac_unrecognized_sep=', ';; ++ esac ++ eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; +@@ -1062,13 +1087,20 @@ + 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 +- { (exit 1); exit 1; }; } +- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` +- eval enable_$ac_feature=\$ac_optarg ;; ++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && ++ as_fn_error "invalid feature name: $ac_useropt" ++ ac_useropt_orig=$ac_useropt ++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ++ case $ac_user_opts in ++ *" ++"enable_$ac_useropt" ++"*) ;; ++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ++ ac_unrecognized_sep=', ';; ++ esac ++ eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ +@@ -1259,22 +1291,36 @@ + 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 +- { (exit 1); exit 1; }; } +- ac_package=`echo $ac_package | sed 's/[-.]/_/g'` +- eval with_$ac_package=\$ac_optarg ;; ++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && ++ as_fn_error "invalid package name: $ac_useropt" ++ ac_useropt_orig=$ac_useropt ++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ++ case $ac_user_opts in ++ *" ++"with_$ac_useropt" ++"*) ;; ++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ++ ac_unrecognized_sep=', ';; ++ esac ++ eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) +- ac_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 +- { (exit 1); exit 1; }; } +- ac_package=`echo $ac_package | sed 's/[-.]/_/g'` +- eval with_$ac_package=no ;; ++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && ++ as_fn_error "invalid package name: $ac_useropt" ++ ac_useropt_orig=$ac_useropt ++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` ++ case $ac_user_opts in ++ *" ++"with_$ac_useropt" ++"*) ;; ++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ++ ac_unrecognized_sep=', ';; ++ esac ++ eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. +@@ -1294,25 +1340,25 @@ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + +- -*) { echo "$as_me: error: unrecognized option: $ac_option +-Try \`$0 --help' for more information." >&2 +- { (exit 1); exit 1; }; } ++ -*) as_fn_error "unrecognized option: \`$ac_option' ++Try \`$0 --help' for more information." + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. +- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && +- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 +- { (exit 1); exit 1; }; } ++ case $ac_envvar in #( ++ '' | [0-9]* | *[!_$as_cr_alnum]* ) ++ as_fn_error "invalid variable name: \`$ac_envvar'" ;; ++ esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. +- 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} + ;; + +@@ -1321,23 +1367,36 @@ + + if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` +- { echo "$as_me: error: missing argument to $ac_option" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error "missing argument to $ac_option" ++fi ++ ++if test -n "$ac_unrecognized_opts"; then ++ case $enable_option_checking in ++ no) ;; ++ fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; ++ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; ++ esac + fi + +-# Be sure to have absolute directory names. ++# 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 +- { (exit 1); exit 1; }; } ++ as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + done + + # There might be people who depend on the old broken behavior: `$host' +@@ -1351,7 +1410,7 @@ + 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 +@@ -1367,23 +1426,21 @@ + 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 +- { (exit 1); exit 1; }; } ++ as_fn_error "working directory cannot be determined" + test "X$ac_ls_di" = "X$ac_pwd_ls_di" || +- { echo "$as_me: error: pwd does not report name of working directory" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error "pwd does not report name of working directory" + + + # Find the source files, if location was not specified. + if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. +- ac_confdir=`$as_dirname -- "$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 +@@ -1410,13 +1467,11 @@ + 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 +- { (exit 1); exit 1; }; } ++ as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + fi + ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" + ac_abs_confdir=`( +- cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 +- { (exit 1); exit 1; }; } ++ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + pwd)` + # When building in place, set srcdir=. + if test "$ac_abs_confdir" = "$ac_pwd"; then +@@ -1464,9 +1519,9 @@ + + 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 +@@ -1476,25 +1531,25 @@ + 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/nufw] +- --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/nufw] ++ --htmldir=DIR html documentation [DOCDIR] ++ --dvidir=DIR dvi documentation [DOCDIR] ++ --pdfdir=DIR pdf documentation [DOCDIR] ++ --psdir=DIR ps documentation [DOCDIR] + _ACEOF + + cat <<\_ACEOF +@@ -1517,6 +1572,7 @@ + cat <<\_ACEOF + + Optional Features: ++ --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-shared[=PKGS] build shared libraries [default=yes] +@@ -1544,7 +1600,6 @@ + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-libgcrypt-prefix=PFX + prefix where LIBGCRYPT is installed (optional) +- --with-libgnutls-prefix=PFX Prefix where libgnutls is installed (optional) + --with-prelude-log Support user activity logging in Prelude + --with-mysql-log Support user activity logging in Mysql database + --with-mysql-auth Support user authentication in Mysql database +@@ -1575,87 +1630,506 @@ + you have headers in a nonstandard directory + CPP C preprocessor + PKG_CONFIG path to pkg-config utility ++ GNUTLS_CFLAGS ++ C compiler flags for GNUTLS, overriding pkg-config ++ GNUTLS_LIBS linker flags for GNUTLS, overriding pkg-config + + Use these variables to override the choices made by `configure' or to help + it to find libraries and programs with nonstandard names/locations. + +-Report bugs to . +-_ACEOF +-ac_status=$? ++Report bugs to . ++_ACEOF ++ac_status=$? ++fi ++ ++if test "$ac_init_help" = "recursive"; then ++ # If there are subdirs, report their specific --help. ++ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue ++ test -d "$ac_dir" || ++ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || ++ continue ++ ac_builddir=. ++ ++case "$ac_dir" in ++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; ++*) ++ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` ++ # A ".." for each directory in $ac_dir_suffix. ++ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` ++ case $ac_top_builddir_sub in ++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;; ++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; ++ esac ;; ++esac ++ac_abs_top_builddir=$ac_pwd ++ac_abs_builddir=$ac_pwd$ac_dir_suffix ++# for backward compatibility: ++ac_top_builddir=$ac_top_build_prefix ++ ++case $srcdir in ++ .) # We are building in place. ++ ac_srcdir=. ++ ac_top_srcdir=$ac_top_builddir_sub ++ ac_abs_top_srcdir=$ac_pwd ;; ++ [\\/]* | ?:[\\/]* ) # Absolute name. ++ ac_srcdir=$srcdir$ac_dir_suffix; ++ ac_top_srcdir=$srcdir ++ ac_abs_top_srcdir=$srcdir ;; ++ *) # Relative name. ++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ++ ac_top_srcdir=$ac_top_build_prefix$srcdir ++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;; ++esac ++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix ++ ++ cd "$ac_dir" || { ac_status=$?; continue; } ++ # Check for guested configure. ++ if test -f "$ac_srcdir/configure.gnu"; then ++ echo && ++ $SHELL "$ac_srcdir/configure.gnu" --help=recursive ++ elif test -f "$ac_srcdir/configure"; then ++ echo && ++ $SHELL "$ac_srcdir/configure" --help=recursive ++ else ++ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 ++ fi || ac_status=$? ++ cd "$ac_pwd" || { ac_status=$?; break; } ++ done ++fi ++ ++test -n "$ac_init_help" && exit $ac_status ++if $ac_init_version; then ++ cat <<\_ACEOF ++NuFW configure 2.2.21 ++generated by GNU Autoconf 2.64 ++ ++Copyright (C) 2009 Free Software Foundation, Inc. ++This configure script is free software; the Free Software Foundation ++gives unlimited permission to copy, distribute and modify it. ++_ACEOF ++ exit ++fi ++ ++## ------------------------ ## ++## Autoconf initialization. ## ++## ------------------------ ## ++ ++# ac_fn_c_try_compile LINENO ++# -------------------------- ++# Try to compile conftest.$ac_ext, and return whether this succeeded. ++ac_fn_c_try_compile () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ rm -f conftest.$ac_objext ++ if { { ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_compile") 2>conftest.err ++ ac_status=$? ++ if test -s conftest.err; then ++ grep -v '^ *+' conftest.err >conftest.er1 ++ cat conftest.er1 >&5 ++ mv -f conftest.er1 conftest.err ++ fi ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then : ++ ac_retval=0 ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_retval=1 ++fi ++ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ return $ac_retval ++ ++} # ac_fn_c_try_compile ++ ++# ac_fn_c_try_link LINENO ++# ----------------------- ++# Try to link conftest.$ac_ext, and return whether this succeeded. ++ac_fn_c_try_link () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ rm -f conftest.$ac_objext conftest$ac_exeext ++ if { { ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_link") 2>conftest.err ++ ac_status=$? ++ if test -s conftest.err; then ++ grep -v '^ *+' conftest.err >conftest.er1 ++ cat conftest.er1 >&5 ++ mv -f conftest.er1 conftest.err ++ fi ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then : ++ ac_retval=0 ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_retval=1 ++fi ++ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information ++ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would ++ # interfere with the next link command; also delete a directory that is ++ # left behind by Apple's compiler. We do this before executing the actions. ++ rm -rf conftest.dSYM conftest_ipa8_conftest.oo ++ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ return $ac_retval ++ ++} # ac_fn_c_try_link ++ ++# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES ++# ------------------------------------------------------- ++# Tests whether HEADER exists and can be compiled using the include files in ++# INCLUDES, setting the cache variable VAR accordingly. ++ac_fn_c_check_header_compile () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++#include <$2> ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$3=yes" ++else ++ eval "$3=no" ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ ++} # ac_fn_c_check_header_compile ++ ++# ac_fn_c_try_cpp LINENO ++# ---------------------- ++# Try to preprocess conftest.$ac_ext, and return whether this succeeded. ++ac_fn_c_try_cpp () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ if { { ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ++ ac_status=$? ++ if test -s conftest.err; then ++ grep -v '^ *+' conftest.err >conftest.er1 ++ cat conftest.er1 >&5 ++ mv -f conftest.er1 conftest.err ++ fi ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then : ++ ac_retval=0 ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_retval=1 + fi ++ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ return $ac_retval + +-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 +- ac_builddir=. ++} # ac_fn_c_try_cpp + +-case "$ac_dir" in +-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +-*) +- ac_dir_suffix=/`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,/,,'` +- case $ac_top_builddir_sub in +- "") ac_top_builddir_sub=. ac_top_build_prefix= ;; +- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; +- esac ;; ++# ac_fn_c_try_run LINENO ++# ---------------------- ++# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes ++# that executables *can* be run. ++ac_fn_c_try_run () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ if { { ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; + esac +-ac_abs_top_builddir=$ac_pwd +-ac_abs_builddir=$ac_pwd$ac_dir_suffix +-# for backward compatibility: +-ac_top_builddir=$ac_top_build_prefix +- +-case $srcdir in +- .) # We are building in place. +- ac_srcdir=. +- ac_top_srcdir=$ac_top_builddir_sub +- ac_abs_top_srcdir=$ac_pwd ;; +- [\\/]* | ?:[\\/]* ) # Absolute name. +- ac_srcdir=$srcdir$ac_dir_suffix; +- ac_top_srcdir=$srcdir +- ac_abs_top_srcdir=$srcdir ;; +- *) # Relative name. +- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix +- ac_top_srcdir=$ac_top_build_prefix$srcdir +- ac_abs_top_srcdir=$ac_pwd/$srcdir ;; ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_link") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' ++ { { case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; + esac +-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_try") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; }; then : ++ ac_retval=0 ++else ++ $as_echo "$as_me: program exited with status $ac_status" >&5 ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 + +- cd "$ac_dir" || { ac_status=$?; continue; } +- # Check for guested configure. +- if test -f "$ac_srcdir/configure.gnu"; then +- echo && +- $SHELL "$ac_srcdir/configure.gnu" --help=recursive +- elif test -f "$ac_srcdir/configure"; then +- echo && +- $SHELL "$ac_srcdir/configure" --help=recursive +- else +- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 +- fi || ac_status=$? +- cd "$ac_pwd" || { ac_status=$?; break; } +- done ++ ac_retval=$ac_status + fi ++ rm -rf conftest.dSYM conftest_ipa8_conftest.oo ++ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ return $ac_retval + +-test -n "$ac_init_help" && exit $ac_status +-if $ac_init_version; then +- cat <<\_ACEOF +-NuFW configure 2.2.21 +-generated by GNU Autoconf 2.61 ++} # ac_fn_c_try_run + +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +-This configure script is free software; the Free Software Foundation +-gives unlimited permission to copy, distribute and modify it. ++# ac_fn_c_check_func LINENO FUNC VAR ++# ---------------------------------- ++# Tests whether FUNC exists, setting the cache variable VAR accordingly ++ac_fn_c_check_func () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++/* Define $2 to an innocuous variant, in case declares $2. ++ For example, HP-UX 11i declares gettimeofday. */ ++#define $2 innocuous_$2 ++ ++/* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $2 (); below. ++ Prefer to if __STDC__ is defined, since ++ exists even on freestanding compilers. */ ++ ++#ifdef __STDC__ ++# include ++#else ++# include ++#endif ++ ++#undef $2 ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char $2 (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined __stub_$2 || defined __stub___$2 ++choke me ++#endif ++ ++int ++main () ++{ ++return $2 (); ++ ; ++ return 0; ++} + _ACEOF +- exit ++if ac_fn_c_try_link "$LINENO"; then : ++ eval "$3=yes" ++else ++ eval "$3=no" ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ ++} # ac_fn_c_check_func ++ ++# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES ++# ---------------------------------------------------- ++# Tries to find if the field MEMBER exists in type AGGR, after including ++# INCLUDES, setting cache variable VAR accordingly. ++ac_fn_c_check_member () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 ++$as_echo_n "checking for $2.$3... " >&6; } ++if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$5 ++int ++main () ++{ ++static $2 ac_aggr; ++if (ac_aggr.$3) ++return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$4=yes" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$5 ++int ++main () ++{ ++static $2 ac_aggr; ++if (sizeof ac_aggr.$3) ++return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$4=yes" ++else ++ eval "$4=no" + fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++eval ac_res=\$$4 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ ++} # ac_fn_c_check_member ++ ++# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES ++# ------------------------------------------------------- ++# Tests whether HEADER exists, giving a warning if it cannot be compiled using ++# the include files in INCLUDES and setting the cache variable VAR ++# accordingly. ++ac_fn_c_check_header_mongrel () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++ $as_echo_n "(cached) " >&6 ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++else ++ # Is the header compilable? ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 ++$as_echo_n "checking $2 usability... " >&6; } ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++#include <$2> ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_header_compiler=yes ++else ++ ac_header_compiler=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 ++$as_echo "$ac_header_compiler" >&6; } ++ ++# Is the header present? ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 ++$as_echo_n "checking $2 presence... " >&6; } ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include <$2> ++_ACEOF ++if ac_fn_c_try_cpp "$LINENO"; then : ++ ac_header_preproc=yes ++else ++ ac_header_preproc=no ++fi ++rm -f conftest.err conftest.$ac_ext ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 ++$as_echo "$ac_header_preproc" >&6; } ++ ++# So? What about this header? ++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( ++ yes:no: ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 ++$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 ++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ++ ;; ++ no:yes:* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 ++$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 ++$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 ++$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 ++$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 ++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ++( cat <<\_ASBOX ++## ------------------------------------ ## ++## Report this to nufw-devel@nongnu.org ## ++## ------------------------------------ ## ++_ASBOX ++ ) | sed "s/^/$as_me: WARNING: /" >&2 ++ ;; ++esac ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++ $as_echo_n "(cached) " >&6 ++else ++ eval "$3=\$ac_header_compiler" ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++fi ++ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ ++} # ac_fn_c_check_header_mongrel + cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + + It was created by NuFW $as_me 2.2.21, which was +-generated by GNU Autoconf 2.61. Invocation command line was ++generated by GNU Autoconf 2.64. Invocation command line was + + $ $0 $@ + +@@ -1691,8 +2165,8 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- echo "PATH: $as_dir" +-done ++ $as_echo "PATH: $as_dir" ++ done + IFS=$as_save_IFS + + } >&5 +@@ -1726,12 +2200,12 @@ + | -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'" ;; ++ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) +- ac_configure_args1="$ac_configure_args1 '$ac_arg'" ++ as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else +@@ -1747,13 +2221,13 @@ + -* ) ac_must_keep_next=true ;; + esac + fi +- ac_configure_args="$ac_configure_args '$ac_arg'" ++ as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done + done +-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } ++{ ac_configure_args0=; unset ac_configure_args0;} ++{ ac_configure_args1=; unset ac_configure_args1;} + + # When interrupted or exit'd, cleanup temporary files, and complete + # config.log. We remove comments because anyway the quotes in there +@@ -1778,12 +2252,13 @@ + 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:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 ++$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( +- *) $as_unset $ac_var ;; ++ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( ++ *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done +@@ -1812,9 +2287,9 @@ + 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 + +@@ -1829,9 +2304,9 @@ + 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 +@@ -1847,64 +2322,69 @@ + 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 && + exit $exit_status + ' 0 + for ac_signal in 1 2 13 15; do +- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal ++ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal + done + ac_signal=0 + + # confdefs.h avoids OS command line length limits that DEFS can exceed. + rm -f -r conftest* confdefs.h + ++$as_echo "/* confdefs.h */" > confdefs.h ++ + # Predefined preprocessor variables. + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_NAME "$PACKAGE_NAME" + _ACEOF + +- + cat >>confdefs.h <<_ACEOF + #define PACKAGE_TARNAME "$PACKAGE_TARNAME" + _ACEOF + +- + cat >>confdefs.h <<_ACEOF + #define PACKAGE_VERSION "$PACKAGE_VERSION" + _ACEOF + +- + cat >>confdefs.h <<_ACEOF + #define PACKAGE_STRING "$PACKAGE_STRING" + _ACEOF + +- + cat >>confdefs.h <<_ACEOF + #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" + _ACEOF + ++cat >>confdefs.h <<_ACEOF ++#define PACKAGE_URL "$PACKAGE_URL" ++_ACEOF ++ + + # Let the site file select an alternate cache file if it wants to. +-# Prefer 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:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 ++$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +@@ -1914,16 +2394,16 @@ + # 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:${as_lineno-$LINENO}: loading cache $cache_file" >&5 ++$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi + else +- { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +-echo "$as_me: creating cache $cache_file" >&6;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 ++$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file + fi + +@@ -1937,68 +2417,56 @@ + 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:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 ++$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) +- { 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:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 ++$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then +- { 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:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 ++$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ++ ac_cache_corrupted=: ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 ++$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} ++ eval $ac_var=\$ac_old_val ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 ++$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 ++$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in +- *\'*) ac_arg=$ac_var=`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 + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. +- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; ++ *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi + done + if $ac_cache_corrupted; then +- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +-echo "$as_me: error: changes in the environment can compromise the build" >&2;} +- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} +- { (exit 1); exit 1; }; } +-fi +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 ++$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} ++ as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 ++fi ++## -------------------- ## ++## Main body of script. ## ++## -------------------- ## + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -2020,10 +2488,10 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. + set dummy ${ac_tool_prefix}gcc; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_CC+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -2033,25 +2501,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -2060,10 +2528,10 @@ + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +@@ -2073,25 +2541,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_CC" = x; then +@@ -2099,12 +2567,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + CC=$ac_ct_CC +@@ -2117,10 +2581,10 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + set dummy ${ac_tool_prefix}cc; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_CC+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -2130,25 +2594,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -2157,10 +2621,10 @@ + if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_CC+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -2171,18 +2635,18 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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 + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + if test $ac_prog_rejected = yes; then +@@ -2201,11 +2665,11 @@ + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -2216,10 +2680,10 @@ + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_CC+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +@@ -2229,25 +2693,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -2260,10 +2724,10 @@ + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +@@ -2273,25 +2737,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -2303,12 +2767,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + CC=$ac_ct_CC +@@ -2318,98 +2778,82 @@ + fi + + +-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +-See \`config.log' for more details." >&5 +-echo "$as_me: error: no acceptable C compiler found in \$PATH +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error "no acceptable C compiler found in \$PATH ++See \`config.log' for more details." "$LINENO" 5; } + + # Provide some information about the compiler. +-echo "$as_me:$LINENO: checking for C compiler version" >&5 +-ac_compiler=`set X $ac_compile; echo $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_compiler --version >&5") 2>&5 +- ac_status=$? +- 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_compiler -v >&5") 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } +-{ (ac_try="$ac_compiler -V >&5" ++$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 ++set X $ac_compile ++ac_compiler=$2 ++for ac_option in --version -v -V -qversion; do ++ { { ac_try="$ac_compiler $ac_option >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_compiler -V >&5") 2>&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } ++ if test -s conftest.err; then ++ sed '10a\ ++... rest of stderr output deleted ... ++ 10q' conftest.err >conftest.er1 ++ cat conftest.er1 >&5 ++ rm -f conftest.er1 conftest.err ++ fi ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++done + +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- ++#include + int + main () + { ++FILE *f = fopen ("conftest.out", "w"); ++ return ferror (f) || fclose (f) != 0; + + ; + return 0; + } + _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 conftest.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:${as_lineno-$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 + rm -f $ac_rmfiles + +-if { (ac_try="$ac_link_default" ++if { { ac_try="$ac_link_default" + 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:${as_lineno-$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 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. + # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' + # in a Makefile. We should not override ac_cv_exeext if it was cached, +@@ -2419,14 +2863,14 @@ + 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 + # certainly right. + break;; + *.* ) +- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; ++ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi +@@ -2445,78 +2889,75 @@ + else + ac_file='' + fi +- +-{ echo "$as_me:$LINENO: result: $ac_file" >&5 +-echo "${ECHO_T}$ac_file" >&6; } +-if test -z "$ac_file"; then +- echo "$as_me: failed program was:" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 ++$as_echo "$ac_file" >&6; } ++if test -z "$ac_file"; then : ++ $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +-See \`config.log' for more details." >&5 +-echo "$as_me: error: C compiler cannot create executables +-See \`config.log' for more details." >&2;} +- { (exit 77); exit 77; }; } ++{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++{ as_fn_set_status 77 ++as_fn_error "C compiler cannot create executables ++See \`config.log' for more details." "$LINENO" 5; }; } + fi +- + 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; } +-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 ++$as_echo_n "checking whether the C compiler works... " >&6; } + # If not cross compiling, check that we can run a simple program. + if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' +- { (case "(($ac_try" in ++ { { 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:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else +- { { echo "$as_me:$LINENO: error: cannot run C compiled programs. ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error "cannot run C compiled programs. + If you meant to cross compile, use \`--host'. +-See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot run C compiled programs. +-If you meant to cross compile, use \`--host'. +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++See \`config.log' for more details." "$LINENO" 5; } + fi + fi + fi +-{ echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } ++{ $as_echo "$as_me:${as_lineno-$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 conftest.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; } +- +-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +-if { (ac_try="$ac_link" ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 ++$as_echo_n "checking whether we are cross compiling... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 ++$as_echo "$cross_compiling" >&6; } ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 ++$as_echo_n "checking for suffix of executables... " >&6; } ++if { { ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) + # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will + # work properly (i.e., refer to `conftest.exe'), while it won't with +@@ -2524,37 +2965,31 @@ + 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 +-See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error "cannot compute suffix of executables: cannot compile and link ++See \`config.log' for more details." "$LINENO" 5; } + fi +- + rm -f conftest$ac_cv_exeext +-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +-echo "${ECHO_T}$ac_cv_exeext" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 ++$as_echo "$ac_cv_exeext" >&6; } + + rm -f conftest.$ac_ext + EXEEXT=$ac_cv_exeext + ac_exeext=$EXEEXT +-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +-if test "${ac_cv_objext+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 ++$as_echo_n "checking for suffix of object files... " >&6; } ++if test "${ac_cv_objext+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -2566,51 +3001,46 @@ + } + _ACEOF + rm -f conftest.o conftest.obj +-if { (ac_try="$ac_compile" ++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_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; ++ *.$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 +-See \`config.log' for more details." >&5 +-echo "$as_me: error: cannot compute suffix of object files: cannot compile +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error "cannot compute suffix of object files: cannot compile ++See \`config.log' for more details." "$LINENO" 5; } + fi +- + rm -f conftest.$ac_cv_objext conftest.$ac_ext + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +-echo "${ECHO_T}$ac_cv_objext" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 ++$as_echo "$ac_cv_objext" >&6; } + OBJEXT=$ac_cv_objext + ac_objext=$OBJEXT +-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +-if test "${ac_cv_c_compiler_gnu+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 ++$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } ++if test "${ac_cv_c_compiler_gnu+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -2624,54 +3054,34 @@ + 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 ++if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_compiler_gnu=no ++ ac_compiler_gnu=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_c_compiler_gnu=$ac_compiler_gnu + + fi +-{ 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:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 ++$as_echo "$ac_cv_c_compiler_gnu" >&6; } ++if test $ac_compiler_gnu = yes; then ++ GCC=yes ++else ++ GCC= ++fi + ac_test_CFLAGS=${CFLAGS+set} + ac_save_CFLAGS=$CFLAGS +-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +-if test "${ac_cv_prog_cc_g+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 ++$as_echo_n "checking whether $CC accepts -g... " >&6; } ++if test "${ac_cv_prog_cc_g+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -2682,34 +3092,11 @@ + 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 ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- CFLAGS="" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ CFLAGS="" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -2720,35 +3107,12 @@ + 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 +- : +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_compile "$LINENO"; then : + +- ac_c_werror_flag=$ac_save_c_werror_flag ++else ++ ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -2759,42 +3123,18 @@ + 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 ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 ++$as_echo "$ac_cv_prog_cc_g" >&6; } + if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS + elif test $ac_cv_prog_cc_g = yes; then +@@ -2810,18 +3150,14 @@ + 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; } +-if test "${ac_cv_prog_cc_c89+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 ++$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } ++if test "${ac_cv_prog_cc_c89+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_cv_prog_cc_c89=no + ac_save_CC=$CC +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -2878,31 +3214,9 @@ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" + do + CC="$ac_save_CC $ac_arg" +- 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 ++ if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break + done +@@ -2913,17 +3227,19 @@ + # 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 ++$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + esac ++if test "x$ac_cv_prog_cc_c89" != xno; then : + ++fi + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -2935,20 +3251,18 @@ + # check for a ISO C99 compiler + + +- case $ac_cv_prog_cc_stdc in +- no) ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; +- *) { echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5 +-echo $ECHO_N "checking for $CC option to accept ISO C99... $ECHO_C" >&6; } +-if test "${ac_cv_prog_cc_c99+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ case $ac_cv_prog_cc_stdc in #( ++ no) : ++ ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( ++ *) : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 ++$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } ++if test "${ac_cv_prog_cc_c99+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_cv_prog_cc_c99=no + ac_save_CC=$CC +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -3087,34 +3401,12 @@ + return 0; + } + _ACEOF +-for ac_arg in '' -std=gnu99 -c99 -qlanglvl=extc99 ++for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 + do + CC="$ac_save_CC $ac_arg" +- 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 ++ if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c99=$ac_arg +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c99" != "xno" && break + done +@@ -3125,31 +3417,27 @@ + # AC_CACHE_VAL + case "x$ac_cv_prog_cc_c99" in + x) +- { echo "$as_me:$LINENO: result: none needed" >&5 +-echo "${ECHO_T}none needed" >&6; } ;; ++ { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: unsupported" >&5 ++$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c99" +- { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_c99" >&6; } ;; ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 ++$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; + esac +-if test "x$ac_cv_prog_cc_c99" != xno; then ++if test "x$ac_cv_prog_cc_c99" != xno; then : + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + else +- { 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; } +-if test "${ac_cv_prog_cc_c89+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 ++$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } ++if test "${ac_cv_prog_cc_c89+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_cv_prog_cc_c89=no + ac_save_CC=$CC +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -3206,31 +3494,9 @@ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" + do + CC="$ac_save_CC $ac_arg" +- 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 ++ if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break + done +@@ -3241,54 +3507,50 @@ + # 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 ++$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + esac +-if test "x$ac_cv_prog_cc_c89" != xno; then ++if test "x$ac_cv_prog_cc_c89" != xno; then : + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + else + ac_cv_prog_cc_stdc=no + fi + +- + fi +- + ;; + esac +- { echo "$as_me:$LINENO: checking for $CC option to accept ISO Standard C" >&5 +-echo $ECHO_N "checking for $CC option to accept ISO Standard C... $ECHO_C" >&6; } +- if test "${ac_cv_prog_cc_stdc+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-fi +- +- case $ac_cv_prog_cc_stdc in +- no) { echo "$as_me:$LINENO: result: unsupported" >&5 +-echo "${ECHO_T}unsupported" >&6; } ;; +- '') { echo "$as_me:$LINENO: result: none needed" >&5 +-echo "${ECHO_T}none needed" >&6; } ;; +- *) { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6; } ;; ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 ++$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } ++ if test "${ac_cv_prog_cc_stdc+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++fi ++ ++ case $ac_cv_prog_cc_stdc in #( ++ no) : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 ++$as_echo "unsupported" >&6; } ;; #( ++ '') : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 ++$as_echo "none needed" >&6; } ;; #( ++ *) : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 ++$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; + esac + + +- +-{ echo "$as_me:$LINENO: checking for an ANSI C99-conforming __func__" >&5 +-echo $ECHO_N "checking for an ANSI C99-conforming __func__... $ECHO_C" >&6; } +-if test "${ac_cv_cpp_func+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C99-conforming __func__" >&5 ++$as_echo_n "checking for an ANSI C99-conforming __func__... " >&6; } ++if test "${ac_cv_cpp_func+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -3299,33 +3561,10 @@ + 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 ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_cpp_func=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -3336,56 +3575,29 @@ + 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 ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_cpp_func=__FUNCTION__ + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_cpp_func=no ++ ac_cv_cpp_func=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_cpp_func" >&5 +-echo "${ECHO_T}$ac_cv_cpp_func" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cpp_func" >&5 ++$as_echo "$ac_cv_cpp_func" >&6; } + + if test $ac_cv_cpp_func = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define __PRELUDE_FUNC__ __func__ +-_ACEOF ++$as_echo "#define __PRELUDE_FUNC__ __func__" >>confdefs.h + + elif test $ac_cv_cpp_func = __FUNCTION__; then + +-cat >>confdefs.h <<\_ACEOF +-#define __PRELUDE_FUNC__ __FUNCTION__ +-_ACEOF ++$as_echo "#define __PRELUDE_FUNC__ __FUNCTION__" >>confdefs.h + + elif test $ac_cv_cpp_func = no; then + +-cat >>confdefs.h <<\_ACEOF +-#define __PRELUDE_FUNC__ "" +-_ACEOF ++$as_echo "#define __PRELUDE_FUNC__ \"\"" >>confdefs.h + + fi + +@@ -3393,14 +3605,14 @@ + + case `pwd` in + *\ * | *\ *) +- { echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +-echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 ++$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; + esac + + + +-macro_version='2.2.4' +-macro_revision='1.2976' ++macro_version='2.2.6' ++macro_revision='1.3012' + + + +@@ -3418,24 +3630,16 @@ + + ac_aux_dir= + for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do +- if test -f "$ac_dir/install-sh"; then +- ac_aux_dir=$ac_dir +- ac_install_sh="$ac_aux_dir/install-sh -c" +- break +- elif test -f "$ac_dir/install.sh"; then +- ac_aux_dir=$ac_dir +- ac_install_sh="$ac_aux_dir/install.sh -c" +- break +- elif test -f "$ac_dir/shtool"; then +- ac_aux_dir=$ac_dir +- ac_install_sh="$ac_aux_dir/shtool install -c" +- break +- fi ++ for ac_t in install-sh install.sh shtool; do ++ if test -f "$ac_dir/$ac_t"; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/$ac_t -c" ++ break 2 ++ fi ++ done + done + if test -z "$ac_aux_dir"; then +- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + fi + + # These three variables are undocumented and unsupported, +@@ -3449,35 +3653,27 @@ + + # 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;} +- { (exit 1); exit 1; }; } +- +-{ echo "$as_me:$LINENO: checking build system type" >&5 +-echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +-if test "${ac_cv_build+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 ++$as_echo_n "checking build system type... " >&6; } ++if test "${ac_cv_build+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_build_alias=$build_alias + test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + test "x$ac_build_alias" = x && +- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +-echo "$as_me: error: cannot guess build type; you must specify one" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || +- { { 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;} +- { (exit 1); exit 1; }; } ++ as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +-echo "${ECHO_T}$ac_cv_build" >&6; } ++{ $as_echo "$as_me:${as_lineno-$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;} +- { (exit 1); exit 1; }; };; ++*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; + esac + build=$ac_cv_build + ac_save_IFS=$IFS; IFS='-' +@@ -3493,28 +3689,24 @@ + 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; } +-if test "${ac_cv_host+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 ++$as_echo_n "checking host system type... " >&6; } ++if test "${ac_cv_host+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build + else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || +- { { 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;} +- { (exit 1); exit 1; }; } ++ as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + fi + + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +-echo "${ECHO_T}$ac_cv_host" >&6; } ++{ $as_echo "$as_me:${as_lineno-$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;} +- { (exit 1); exit 1; }; };; ++*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; + esac + host=$ac_cv_host + ac_save_IFS=$IFS; IFS='-' +@@ -3530,51 +3722,46 @@ + 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; } +-if test "${ac_cv_path_SED+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$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 "${ac_cv_path_SED+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done +- echo "$ac_script" | sed 99q >conftest.sed +- $as_unset ac_script || ac_script= +- # Extract the first word of "sed gsed" to use in msg output +-if test -z "$SED"; then +-set dummy sed gsed; ac_prog_name=$2 +-if test "${ac_cv_path_SED+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else ++ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed ++ { ac_script=; unset ac_script;} ++ if test -z "$SED"; then + ac_path_SED_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 + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_prog in sed gsed; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" +- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +- # Check for GNU ac_path_SED and select it if it is found. ++ for ac_prog in sed gsed; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue ++# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED + case `"$ac_path_SED" --version 2>&1` in + *GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl" ++ $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +- ac_count=`expr $ac_count + 1` ++ as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" +@@ -3586,31 +3773,21 @@ + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + esac + +- +- $ac_path_SED_found && break 3 ++ $ac_path_SED_found && break 3 ++ done ++ done + done +-done +- +-done + IFS=$as_save_IFS +- +- +-fi +- +-SED="$ac_cv_path_SED" +-if test -z "$SED"; then +- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in \$PATH" >&5 +-echo "$as_me: error: no acceptable $ac_prog_name could be found in \$PATH" >&2;} +- { (exit 1); exit 1; }; } +-fi +- ++ if test -z "$ac_cv_path_SED"; then ++ as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 ++ fi + else + ac_cv_path_SED=$SED + fi + + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +-echo "${ECHO_T}$ac_cv_path_SED" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 ++$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +@@ -3627,45 +3804,40 @@ + + + +-{ 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 +-if test "${ac_cv_path_GREP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 ++$as_echo_n "checking for grep that handles long lines and -e... " >&6; } ++if test "${ac_cv_path_GREP+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else ++ if test -z "$GREP"; then + ac_path_GREP_found=false +-# Loop through the user's path and test for each of PROGNAME-LIST +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++ # 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_prog in grep ggrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue ++# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP + case `"$ac_path_GREP" --version 2>&1` in + *GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; + *) + ac_count=0 +- 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` ++ as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" +@@ -3677,77 +3849,61 @@ + 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 +- +-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;} +- { (exit 1); exit 1; }; } +-fi +- ++ if test -z "$ac_cv_path_GREP"; then ++ as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 ++ fi + else + ac_cv_path_GREP=$GREP + fi + +- + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +-echo "${ECHO_T}$ac_cv_path_GREP" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 ++$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +-{ echo "$as_me:$LINENO: checking for egrep" >&5 +-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +-if test "${ac_cv_path_EGREP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 ++$as_echo_n "checking for egrep... " >&6; } ++if test "${ac_cv_path_EGREP+set}" = set; then : ++ $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_prog in egrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue ++# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP + case `"$ac_path_EGREP" --version 2>&1` in + *GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; + *) + ac_count=0 +- 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` ++ as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" +@@ -3759,78 +3915,62 @@ + 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 +- +-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;} +- { (exit 1); exit 1; }; } +-fi +- ++ if test -z "$ac_cv_path_EGREP"; then ++ as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 ++ fi + else + ac_cv_path_EGREP=$EGREP + fi + +- + fi + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 ++$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +-{ echo "$as_me:$LINENO: checking for fgrep" >&5 +-echo $ECHO_N "checking for fgrep... $ECHO_C" >&6; } +-if test "${ac_cv_path_FGREP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 ++$as_echo_n "checking for fgrep... " >&6; } ++if test "${ac_cv_path_FGREP+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else +- # Extract the first word of "fgrep" to use in msg output +-if test -z "$FGREP"; then +-set dummy fgrep; ac_prog_name=$2 +-if test "${ac_cv_path_FGREP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else ++ if test -z "$FGREP"; then + ac_path_FGREP_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 fgrep; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" +- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +- # Check for GNU ac_path_FGREP and select it if it is found. ++ for ac_prog in fgrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue ++# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP + case `"$ac_path_FGREP" --version 2>&1` in + *GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_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 'FGREP' >> "conftest.nl" ++ $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +- ac_count=`expr $ac_count + 1` ++ as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" +@@ -3842,33 +3982,22 @@ + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + esac + +- +- $ac_path_FGREP_found && break 3 ++ $ac_path_FGREP_found && break 3 ++ done ++ done + done +-done +- +-done + IFS=$as_save_IFS +- +- +-fi +- +-FGREP="$ac_cv_path_FGREP" +-if test -z "$FGREP"; 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;} +- { (exit 1); exit 1; }; } +-fi +- ++ if test -z "$ac_cv_path_FGREP"; then ++ as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 ++ fi + else + ac_cv_path_FGREP=$FGREP + fi + +- + fi + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +-echo "${ECHO_T}$ac_cv_path_FGREP" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 ++$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +@@ -3893,7 +4022,7 @@ + + + # Check whether --with-gnu-ld was given. +-if test "${with_gnu_ld+set}" = set; then ++if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + else + with_gnu_ld=no +@@ -3902,8 +4031,8 @@ + 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:${as_lineno-$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 +@@ -3932,14 +4061,14 @@ + ;; + 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:${as_lineno-$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:${as_lineno-$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 ++if test "${lt_cv_path_LD+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +@@ -3969,19 +4098,17 @@ + + 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:${as_lineno-$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:${as_lineno-$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;} +- { (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; } +-if test "${lt_cv_prog_gnu_ld+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 ++{ $as_echo "$as_me:${as_lineno-$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 : ++ $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 &5 +-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 ++$as_echo "$lt_cv_prog_gnu_ld" >&6; } + with_gnu_ld=$lt_cv_prog_gnu_ld + + +@@ -4005,10 +4132,10 @@ + + + +-{ echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +-echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6; } +-if test "${lt_cv_path_NM+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 ++$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } ++if test "${lt_cv_path_NM+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$NM"; then + # Let the user override the test. +@@ -4054,8 +4181,8 @@ + : ${lt_cv_path_NM=no} + fi + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +-echo "${ECHO_T}$lt_cv_path_NM" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 ++$as_echo "$lt_cv_path_NM" >&6; } + if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" + else +@@ -4065,10 +4192,10 @@ + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_DUMPBIN+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DUMPBIN+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +@@ -4078,25 +4205,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_DUMPBIN="$ac_tool_prefix$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + DUMPBIN=$ac_cv_prog_DUMPBIN + if test -n "$DUMPBIN"; then +- { echo "$as_me:$LINENO: result: $DUMPBIN" >&5 +-echo "${ECHO_T}$DUMPBIN" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 ++$as_echo "$DUMPBIN" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -4109,10 +4236,10 @@ + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +@@ -4122,25 +4249,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_DUMPBIN="$ac_prog" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN + if test -n "$ac_ct_DUMPBIN"; then +- { echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 +-echo "${ECHO_T}$ac_ct_DUMPBIN" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 ++$as_echo "$ac_ct_DUMPBIN" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -4152,12 +4279,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + DUMPBIN=$ac_ct_DUMPBIN +@@ -4176,45 +4299,45 @@ + + + +-{ echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +-echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6; } +-if test "${lt_cv_nm_interface+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 ++$as_echo_n "checking the name lister ($NM) interface... " >&6; } ++if test "${lt_cv_nm_interface+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext +- (eval echo "\"\$as_me:4186: $ac_compile\"" >&5) ++ (eval echo "\"\$as_me:4309: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 +- (eval echo "\"\$as_me:4189: $NM \\\"conftest.$ac_objext\\\"\"" >&5) ++ (eval echo "\"\$as_me:4312: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 +- (eval echo "\"\$as_me:4192: output\"" >&5) ++ (eval echo "\"\$as_me:4315: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +-echo "${ECHO_T}$lt_cv_nm_interface" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 ++$as_echo "$lt_cv_nm_interface" >&6; } + +-{ 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 ++$as_echo "no, using $LN_S" >&6; } + fi + + # 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; } +-if test "${lt_cv_sys_max_cmd_len+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + i=0 + teststring="ABCD" +@@ -4235,7 +4358,7 @@ + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw*) ++ 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, +@@ -4331,11 +4454,11 @@ + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: none" >&5 ++$as_echo "none" >&6; } + fi + max_cmd_len=$lt_cv_sys_max_cmd_len + +@@ -4348,8 +4471,8 @@ + : ${MV="mv -f"} + : ${RM="rm -f"} + +-{ echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +-echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 ++$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +@@ -4358,18 +4481,18 @@ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +-{ echo "$as_me:$LINENO: result: $xsi_shell" >&5 +-echo "${ECHO_T}$xsi_shell" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 ++$as_echo "$xsi_shell" >&6; } + + +-{ echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +-echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 ++$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } + lt_shell_append=no + ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +-{ echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +-echo "${ECHO_T}$lt_shell_append" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 ++$as_echo "$lt_shell_append" >&6; } + + + if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +@@ -4403,31 +4526,132 @@ + + + +-{ 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; } +-if test "${lt_cv_ld_reload_flag+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ld_reload_flag='-r' ++fi ++{ $as_echo "$as_me:${as_lineno-$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 ++"" | " "*) ;; ++*) reload_flag=" $reload_flag" ;; ++esac ++reload_cmds='$LD$reload_flag -o $output$reload_objs' ++case $host_os in ++ darwin*) ++ if test "$GCC" = yes; then ++ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' ++ else ++ reload_cmds='$LD$reload_flag -o $output$reload_objs' ++ fi ++ ;; ++esac ++ ++ ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. ++set dummy ${ac_tool_prefix}objdump; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_OBJDUMP+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$OBJDUMP"; then ++ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++OBJDUMP=$ac_cv_prog_OBJDUMP ++if test -n "$OBJDUMP"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 ++$as_echo "$OBJDUMP" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_OBJDUMP"; then ++ ac_ct_OBJDUMP=$OBJDUMP ++ # Extract the first word of "objdump", so it can be a program name with args. ++set dummy objdump; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_OBJDUMP"; then ++ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_ac_ct_OBJDUMP="objdump" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP ++if test -n "$ac_ct_OBJDUMP"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 ++$as_echo "$ac_ct_OBJDUMP" >&6; } + else +- lt_cv_ld_reload_flag='-r' ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } +-reload_flag=$lt_cv_ld_reload_flag +-case $reload_flag in +-"" | " "*) ;; +-*) reload_flag=" $reload_flag" ;; +-esac +-reload_cmds='$LD$reload_flag -o $output$reload_objs' +-case $host_os in +- darwin*) +- if test "$GCC" = yes; then +- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +- else +- reload_cmds='$LD$reload_flag -o $output$reload_objs' +- fi +- ;; ++ ++ if test "x$ac_ct_OBJDUMP" = x; then ++ OBJDUMP="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; + esac ++ OBJDUMP=$ac_ct_OBJDUMP ++ fi ++else ++ OBJDUMP="$ac_cv_prog_OBJDUMP" ++fi + ++test -z "$OBJDUMP" && OBJDUMP=objdump + + + +@@ -4437,10 +4661,10 @@ + + + +-{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +-echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } +-if test "${lt_cv_deplibs_check_method+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + lt_cv_file_magic_cmd='$MAGIC_CMD' + lt_cv_file_magic_test_file= +@@ -4490,6 +4714,12 @@ + 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 + ;; +@@ -4627,8 +4857,8 @@ + 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:${as_lineno-$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 +@@ -4647,10 +4877,10 @@ + 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; } +-if test "${ac_cv_prog_AR+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_AR+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +@@ -4660,25 +4890,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -4687,10 +4917,10 @@ + 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; } +-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : ++ $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. +@@ -4700,25 +4930,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_AR" = x; then +@@ -4726,12 +4956,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR +@@ -4756,10 +4982,10 @@ + 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; } +-if test "${ac_cv_prog_STRIP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_STRIP+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +@@ -4769,25 +4995,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -4796,10 +5022,10 @@ + 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; } +-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +@@ -4809,25 +5035,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_STRIP" = x; then +@@ -4835,12 +5061,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + STRIP=$ac_ct_STRIP +@@ -4859,10 +5081,10 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. + set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_RANLIB+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_RANLIB+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +@@ -4872,25 +5094,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -4899,10 +5121,10 @@ + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : ++ $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. +@@ -4912,25 +5134,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_RANLIB" = x; then +@@ -4938,12 +5160,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + RANLIB=$ac_ct_RANLIB +@@ -5020,10 +5238,10 @@ + + + # 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; } +-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + + # These are sane defaults that work on at least a few old systems. +@@ -5040,7 +5258,7 @@ + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32*) ++cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -5138,18 +5356,18 @@ + int main(){nm_test_var='a';nm_test_func();return(0);} + _LT_EOF + +- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; 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 ++ if { { eval echo "\"\$as_me\":${as_lineno-$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 +- (exit $ac_status); } && test -s "$nlist"; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" +@@ -5202,11 +5420,11 @@ + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" +- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && test -s conftest${ac_exeext}; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" +@@ -5240,11 +5458,11 @@ + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: ok" >&5 ++$as_echo "ok" >&6; } + fi + + +@@ -5269,7 +5487,7 @@ + + + # Check whether --enable-libtool-lock was given. +-if test "${enable_libtool_lock+set}" = set; then ++if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; + fi + +@@ -5281,11 +5499,11 @@ + ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext +- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" +@@ -5299,12 +5517,12 @@ + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 5302 "configure"' > conftest.$ac_ext +- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ echo '#line 5520 "configure"' > conftest.$ac_ext ++ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) +@@ -5338,11 +5556,11 @@ + s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext +- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in +@@ -5391,10 +5609,10 @@ + # 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; } +-if test "${lt_cv_cc_needs_belf+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -5402,11 +5620,7 @@ + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -5417,34 +5631,13 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- lt_cv_cc_needs_belf=no ++ lt_cv_cc_needs_belf=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -5452,8 +5645,8 @@ + 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:${as_lineno-$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" +@@ -5462,11 +5655,11 @@ + sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext +- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in +@@ -5492,10 +5685,10 @@ + 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; } +-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +@@ -5505,25 +5698,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -5532,10 +5725,10 @@ + 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; } +-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : ++ $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. +@@ -5545,25 +5738,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_DSYMUTIL" = x; then +@@ -5571,12 +5764,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + DSYMUTIL=$ac_ct_DSYMUTIL +@@ -5588,10 +5777,10 @@ + 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; } +-if test "${ac_cv_prog_NMEDIT+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_NMEDIT+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +@@ -5601,25 +5790,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -5628,10 +5817,10 @@ + 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; } +-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : ++ $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. +@@ -5641,25 +5830,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_NMEDIT" = x; then +@@ -5667,12 +5856,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + NMEDIT=$ac_ct_NMEDIT +@@ -5684,10 +5869,10 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. + set dummy ${ac_tool_prefix}lipo; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_LIPO+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_LIPO+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +@@ -5697,25 +5882,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_LIPO="${ac_tool_prefix}lipo" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + LIPO=$ac_cv_prog_LIPO + if test -n "$LIPO"; then +- { echo "$as_me:$LINENO: result: $LIPO" >&5 +-echo "${ECHO_T}$LIPO" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 ++$as_echo "$LIPO" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -5724,10 +5909,10 @@ + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. + set dummy lipo; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +@@ -5737,25 +5922,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_LIPO="lipo" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO + if test -n "$ac_ct_LIPO"; then +- { echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 +-echo "${ECHO_T}$ac_ct_LIPO" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 ++$as_echo "$ac_ct_LIPO" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_LIPO" = x; then +@@ -5763,12 +5948,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + LIPO=$ac_ct_LIPO +@@ -5780,10 +5961,10 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. + set dummy ${ac_tool_prefix}otool; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_OTOOL+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_OTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +@@ -5793,25 +5974,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_OTOOL="${ac_tool_prefix}otool" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + OTOOL=$ac_cv_prog_OTOOL + if test -n "$OTOOL"; then +- { echo "$as_me:$LINENO: result: $OTOOL" >&5 +-echo "${ECHO_T}$OTOOL" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 ++$as_echo "$OTOOL" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -5820,10 +6001,10 @@ + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. + set dummy otool; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +@@ -5833,25 +6014,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_OTOOL="otool" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL + if test -n "$ac_ct_OTOOL"; then +- { echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 +-echo "${ECHO_T}$ac_ct_OTOOL" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 ++$as_echo "$ac_ct_OTOOL" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_OTOOL" = x; then +@@ -5859,12 +6040,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + OTOOL=$ac_ct_OTOOL +@@ -5876,10 +6053,10 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. + set dummy ${ac_tool_prefix}otool64; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_OTOOL64+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_OTOOL64+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +@@ -5889,25 +6066,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_OTOOL64="${ac_tool_prefix}otool64" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + OTOOL64=$ac_cv_prog_OTOOL64 + if test -n "$OTOOL64"; then +- { echo "$as_me:$LINENO: result: $OTOOL64" >&5 +-echo "${ECHO_T}$OTOOL64" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 ++$as_echo "$OTOOL64" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -5916,10 +6093,10 @@ + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. + set dummy otool64; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +@@ -5929,25 +6106,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_OTOOL64="otool64" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 + if test -n "$ac_ct_OTOOL64"; then +- { echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 +-echo "${ECHO_T}$ac_ct_OTOOL64" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 ++$as_echo "$ac_ct_OTOOL64" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_OTOOL64" = x; then +@@ -5955,12 +6132,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + OTOOL64=$ac_ct_OTOOL64 +@@ -5995,10 +6168,10 @@ + + + +- { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 +-echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } +-if test "${lt_cv_apple_cc_single_mod+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then +@@ -6022,22 +6195,18 @@ + rm -f conftest.* + 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; } +-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 ++$as_echo "$lt_cv_apple_cc_single_mod" >&6; } ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -6048,39 +6217,18 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- lt_cv_ld_exported_symbols_list=no ++ lt_cv_ld_exported_symbols_list=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ 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:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 ++$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; +@@ -6121,15 +6269,15 @@ + 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:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 ++$as_echo_n "checking how to run the C preprocessor... " >&6; } + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= + fi + if test -z "$CPP"; then +- if test "${ac_cv_prog_CPP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ if test "${ac_cv_prog_CPP+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" +@@ -6143,11 +6291,7 @@ + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __STDC__ + # include +@@ -6156,76 +6300,34 @@ + #endif + Syntax error + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-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_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- : +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_cpp "$LINENO"; then : + ++else + # Broken: fails on valid input. + continue + fi +- + rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-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_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then ++if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. + continue + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- + # Passes both tests. + ac_preproc_ok=: + break + fi +- + rm -f conftest.err conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. + rm -f conftest.err conftest.$ac_ext +-if $ac_preproc_ok; then ++if $ac_preproc_ok; then : + break + fi + +@@ -6237,8 +6339,8 @@ + else + ac_cv_prog_CPP=$CPP + fi +-{ echo "$as_me:$LINENO: result: $CPP" >&5 +-echo "${ECHO_T}$CPP" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 ++$as_echo "$CPP" >&6; } + ac_preproc_ok=false + for ac_c_preproc_warn_flag in '' yes + do +@@ -6248,11 +6350,7 @@ + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __STDC__ + # include +@@ -6261,83 +6359,40 @@ + #endif + Syntax error + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-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_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- : +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_cpp "$LINENO"; then : + ++else + # Broken: fails on valid input. + continue + fi +- + rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-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_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then ++if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. + continue + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- + # Passes both tests. + ac_preproc_ok=: + break + fi +- + rm -f conftest.err conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. + rm -f conftest.err conftest.$ac_ext +-if $ac_preproc_ok; then +- : ++if $ac_preproc_ok; then : ++ + else +- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +-See \`config.log' for more details." >&5 +-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error "C preprocessor \"$CPP\" fails sanity check ++See \`config.log' for more details." "$LINENO" 5; } + fi + + ac_ext=c +@@ -6347,16 +6402,12 @@ + 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; } +-if test "${ac_cv_header_stdc+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 ++$as_echo_n "checking for ANSI C header files... " >&6; } ++if test "${ac_cv_header_stdc+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -6371,47 +6422,23 @@ + 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 ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_header_stdc=no ++ ac_cv_header_stdc=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "memchr" >/dev/null 2>&1; then +- : ++ $EGREP "memchr" >/dev/null 2>&1; then : ++ + else + ac_cv_header_stdc=no + fi +@@ -6421,18 +6448,14 @@ + + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "free" >/dev/null 2>&1; then +- : ++ $EGREP "free" >/dev/null 2>&1; then : ++ + else + ac_cv_header_stdc=no + fi +@@ -6442,14 +6465,10 @@ + + if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -6476,113 +6495,36 @@ + 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 ++if ac_fn_c_try_run "$LINENO"; then : + +-( exit $ac_status ) +-ac_cv_header_stdc=no ++else ++ ac_cv_header_stdc=no + fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam 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:${as_lineno-$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 +-#define STDC_HEADERS 1 +-_ACEOF ++$as_echo "#define STDC_HEADERS 1" >>confdefs.h + + fi + + # On IRIX 5.3, sys/types and inttypes.h are conflicting. +- +- +- +- +- +- +- +- +- + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +-do +-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +- +-#include <$ac_header> +-_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 +- eval "$as_ac_Header=yes" +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_Header=no" +-fi +- +-rm -f 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 ++do : ++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default ++" ++eval as_val=\$$as_ac_Header ++ if test "x$as_val" = x""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 +@@ -6590,58 +6532,13 @@ + done + + +- + for ac_header in dlfcn.h +-do +-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +- +-#include <$ac_header> +-_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 +- eval "$as_ac_Header=yes" +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_Header=no" +-fi +- +-rm -f 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 ++do : ++ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default ++" ++if test "x$ac_cv_header_dlfcn_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define HAVE_DLFCN_H 1 + _ACEOF + + fi +@@ -6661,7 +6558,7 @@ + + + # Check whether --enable-shared was given. +-if test "${enable_shared+set}" = set; then ++if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; +@@ -6692,7 +6589,7 @@ + + + # Check whether --enable-static was given. +-if test "${enable_static+set}" = set; then ++if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; +@@ -6724,7 +6621,7 @@ + + + # Check whether --with-pic was given. +-if test "${with_pic+set}" = set; then ++if test "${with_pic+set}" = set; then : + withval=$with_pic; pic_mode="$withval" + else + pic_mode=default +@@ -6740,7 +6637,7 @@ + + + # Check whether --enable-fast-install was given. +-if test "${enable_fast_install+set}" = set; then ++if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; +@@ -6821,10 +6718,10 @@ + setopt NO_GLOB_SUBST + fi + +-{ echo "$as_me:$LINENO: checking for objdir" >&5 +-echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +-if test "${lt_cv_objdir+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 ++$as_echo_n "checking for objdir... " >&6; } ++if test "${lt_cv_objdir+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null +@@ -6836,8 +6733,8 @@ + 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:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 ++$as_echo "$lt_cv_objdir" >&6; } + objdir=$lt_cv_objdir + + +@@ -6929,10 +6826,10 @@ + 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; } +-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + case $MAGIC_CMD in + [\\/*] | ?:[\\/]*) +@@ -6982,11 +6879,11 @@ + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -6995,10 +6892,10 @@ + + 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; } +-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 ++$as_echo_n "checking for file... " >&6; } ++if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + case $MAGIC_CMD in + [\\/*] | ?:[\\/]*) +@@ -7048,11 +6945,11 @@ + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -7128,10 +7025,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; } +-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext +@@ -7146,11 +7043,11 @@ + -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:7149: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:7046: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:7153: \$? = $ac_status" >&5 ++ echo "$as_me:7050: \$? = $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. +@@ -7163,8 +7060,8 @@ + $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:${as_lineno-$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" +@@ -7183,8 +7080,8 @@ + 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:${as_lineno-$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,' +@@ -7218,7 +7115,7 @@ + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2*) ++ 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 +@@ -7233,10 +7130,11 @@ + ;; + + hpux*) +- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but +- # not for PA HP-UX. ++ # 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*|ia64*) ++ hppa*64*) + # +Z the default + ;; + *) +@@ -7286,7 +7184,7 @@ + fi + ;; + +- mingw* | cygwin* | pw32* | os2*) ++ 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). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -7316,11 +7214,25 @@ + + linux* | k*bsd*-gnu) + case $cc_basename in +- icc* | ecc* | ifort*) ++ # old Intel for x86_64 which still supported -KPIC. ++ ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; ++ # icc used to be incompatible with GCC. ++ # ICC 10 doesn't accept -KPIC any more. ++ icc* | ifort*) ++ lt_prog_compiler_wl='-Wl,' ++ lt_prog_compiler_pic='-fPIC' ++ lt_prog_compiler_static='-static' ++ ;; ++ # Lahey Fortran 8.1. ++ lf95*) ++ lt_prog_compiler_wl='-Wl,' ++ lt_prog_compiler_pic='--shared' ++ lt_prog_compiler_static='--static' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -7440,8 +7352,8 @@ + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +-echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 ++$as_echo "$lt_prog_compiler_pic" >&6; } + + + +@@ -7452,10 +7364,10 @@ + # 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; } +-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext +@@ -7470,11 +7382,11 @@ + -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:7473: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:7385: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:7477: \$? = $ac_status" >&5 ++ echo "$as_me:7389: \$? = $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. +@@ -7487,8 +7399,8 @@ + $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:${as_lineno-$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 +@@ -7511,10 +7423,10 @@ + # 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; } +-if test "${lt_cv_prog_compiler_static_works+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" +@@ -7539,8 +7451,8 @@ + 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:${as_lineno-$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 + : +@@ -7554,10 +7466,10 @@ + + + +- { 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; } +-if test "${lt_cv_prog_compiler_c_o+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null +@@ -7575,11 +7487,11 @@ + -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:7578: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:7490: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:7582: \$? = $ac_status" >&5 ++ echo "$as_me:7494: \$? = $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 +@@ -7601,18 +7513,18 @@ + $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:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 ++$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + +- { 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; } +-if test "${lt_cv_prog_compiler_c_o+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null +@@ -7630,11 +7542,11 @@ + -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:7633: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:7545: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:7637: \$? = $ac_status" >&5 ++ echo "$as_me:7549: \$? = $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 +@@ -7656,8 +7568,8 @@ + $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:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 ++$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + +@@ -7665,19 +7577,19 @@ + 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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 +@@ -7689,8 +7601,8 @@ + + + +- { 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:${as_lineno-$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= +@@ -7734,7 +7646,7 @@ + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32*) ++ 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++. +@@ -7749,6 +7661,9 @@ + openbsd*) + with_gnu_ld=no + ;; ++ linux* | k*bsd*-gnu) ++ link_all_deplibs=no ++ ;; + esac + + ld_shlibs=yes +@@ -7821,7 +7736,7 @@ + fi + ;; + +- cygwin* | mingw* | pw32*) ++ cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -7887,6 +7802,9 @@ + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; ++ lf95*) # Lahey Fortran 8.1 ++ whole_archive_flag_spec= ++ tmp_sharedflag='--shared' ;; + xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; +@@ -8119,6 +8037,7 @@ + fi + fi + ++ export_dynamic_flag_spec='${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. + always_export_symbols=yes +@@ -8128,11 +8047,7 @@ + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -8143,24 +8058,7 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -8174,15 +8072,9 @@ + 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 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" +@@ -8195,11 +8087,7 @@ + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -8210,24 +8098,7 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { +@@ -8241,15 +8112,9 @@ + 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 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" +@@ -8285,7 +8150,7 @@ + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32*) ++ 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 +@@ -8316,7 +8181,11 @@ + whole_archive_flag_spec='' + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" +- if test "$GCC" = "yes"; then ++ 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 + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +@@ -8408,7 +8277,7 @@ + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +@@ -8457,38 +8326,16 @@ + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat >conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + int foo(void) {} + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + archive_expsym_cmds='$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' + +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + else + archive_cmds='$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' +@@ -8744,8 +8591,8 @@ + fi + fi + +-{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +-echo "${ECHO_T}$ld_shlibs" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 ++$as_echo "$ld_shlibs" >&6; } + test "$ld_shlibs" = no && can_build_shared=no + + with_gnu_ld=$with_gnu_ld +@@ -8781,16 +8628,16 @@ + # 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:${as_lineno-$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 ++ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } 2>conftest.err; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext +@@ -8804,11 +8651,11 @@ + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= +- if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 ++ if { { eval echo "\"\$as_me\":${as_lineno-$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 +- (exit $ac_status); } ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } + then + archive_cmds_need_lc=no + else +@@ -8819,8 +8666,8 @@ + 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:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 ++$as_echo "$archive_cmds_need_lc" >&6; } + ;; + esac + fi +@@ -8983,8 +8830,8 @@ + + + +- { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 ++$as_echo_n "checking dynamic linker characteristics... " >&6; } + + if test "$GCC" = yes; then + case $host_os in +@@ -9146,14 +8993,14 @@ + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32*) ++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,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}`~ +@@ -9176,7 +9023,7 @@ + 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*) ++ 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"` +@@ -9405,11 +9252,7 @@ + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9420,37 +9263,13 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 +- if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then ++if ac_fn_c_try_link "$LINENO"; then : ++ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + shlibpath_overrides_runpath=yes + fi +- +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +@@ -9657,7 +9476,7 @@ + version_type=linux + need_lib_prefix=no + need_version=no +- library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ++ 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 +@@ -9674,8 +9493,8 @@ + dynamic_linker=no + ;; + esac +-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +-echo "${ECHO_T}$dynamic_linker" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 ++$as_echo "$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no + + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +@@ -9776,8 +9595,8 @@ + + + +- { 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:${as_lineno-$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" || +@@ -9801,8 +9620,8 @@ + # directories. + hardcode_action=unsupported + fi +-{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +-echo "${ECHO_T}$hardcode_action" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 ++$as_echo "$hardcode_action" >&6; } + + if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then +@@ -9834,7 +9653,7 @@ + lt_cv_dlopen_self=yes + ;; + +- mingw* | pw32*) ++ mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; +@@ -9846,18 +9665,14 @@ + + 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; } +-if test "${ac_cv_lib_dl_dlopen+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldl $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -9875,39 +9690,18 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_dl_dlopen=no ++ ac_cv_lib_dl_dlopen=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +-if test $ac_cv_lib_dl_dlopen = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 ++$as_echo "$ac_cv_lib_dl_dlopen" >&6; } ++if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + else + +@@ -9920,102 +9714,18 @@ + ;; + + *) +- { echo "$as_me:$LINENO: checking for shl_load" >&5 +-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +-if test "${ac_cv_func_shl_load+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define shl_load to an innocuous variant, in case declares shl_load. +- For example, HP-UX 11i declares gettimeofday. */ +-#define shl_load innocuous_shl_load +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char shl_load (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef shl_load +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char shl_load (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_shl_load || defined __stub___shl_load +-choke me +-#endif +- +-int +-main () +-{ +-return shl_load (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 +- ac_cv_func_shl_load=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_func_shl_load=no +-fi +- +-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; } +-if test $ac_cv_func_shl_load = yes; then ++ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" ++if test "x$ac_cv_func_shl_load" = x""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; } +-if test "${ac_cv_lib_dld_shl_load+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldld $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -10033,137 +9743,32 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_dld_shl_load=no ++ ac_cv_lib_dld_shl_load=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +-if test $ac_cv_lib_dld_shl_load = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 ++$as_echo "$ac_cv_lib_dld_shl_load" >&6; } ++if test "x$ac_cv_lib_dld_shl_load" = x""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; } +-if test "${ac_cv_func_dlopen+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define dlopen to an innocuous variant, in case declares dlopen. +- For example, HP-UX 11i declares gettimeofday. */ +-#define dlopen innocuous_dlopen +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char dlopen (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef dlopen +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char dlopen (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_dlopen || defined __stub___dlopen +-choke me +-#endif +- +-int +-main () +-{ +-return dlopen (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 +- ac_cv_func_dlopen=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_func_dlopen=no +-fi +- +-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; } +-if test $ac_cv_func_dlopen = yes; then ++ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" ++if test "x$ac_cv_func_dlopen" = x""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; } +-if test "${ac_cv_lib_dl_dlopen+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldl $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -10181,53 +9786,28 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_dl_dlopen=no ++ ac_cv_lib_dl_dlopen=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +-if test $ac_cv_lib_dl_dlopen = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 ++$as_echo "$ac_cv_lib_dl_dlopen" >&6; } ++if test "x$ac_cv_lib_dl_dlopen" = x""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; } +-if test "${ac_cv_lib_svld_dlopen+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lsvld $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -10245,53 +9825,28 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_svld_dlopen=no ++ ac_cv_lib_svld_dlopen=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +-if test $ac_cv_lib_svld_dlopen = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 ++$as_echo "$ac_cv_lib_svld_dlopen" >&6; } ++if test "x$ac_cv_lib_svld_dlopen" = x""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; } +-if test "${ac_cv_lib_dld_dld_link+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldld $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -10309,39 +9864,18 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_dld_dld_link=no ++ ac_cv_lib_dld_dld_link=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } +-if test $ac_cv_lib_dld_dld_link = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 ++$as_echo "$ac_cv_lib_dld_dld_link" >&6; } ++if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" + fi + +@@ -10380,10 +9914,10 @@ + 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; } +-if test "${lt_cv_dlopen_self+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +@@ -10391,7 +9925,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10394 "configure" ++#line 9928 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10432,10 +9966,6 @@ + # endif + #endif + +-#ifdef __cplusplus +-extern "C" void exit (int); +-#endif +- + void fnord() { int i=42;} + int main () + { +@@ -10451,14 +9981,14 @@ + else + puts (dlerror ()); + +- exit (status); ++ return status; + } + _LT_EOF +- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in +@@ -10475,15 +10005,15 @@ + + + fi +-{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +-echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } ++{ $as_echo "$as_me:${as_lineno-$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; } +-if test "${lt_cv_dlopen_self_static+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$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 : ++ $as_echo_n "(cached) " >&6 + else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +@@ -10491,7 +10021,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10494 "configure" ++#line 10024 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10532,10 +10062,6 @@ + # endif + #endif + +-#ifdef __cplusplus +-extern "C" void exit (int); +-#endif +- + void fnord() { int i=42;} + int main () + { +@@ -10551,14 +10077,14 @@ + else + puts (dlerror ()); + +- exit (status); ++ return status; + } + _LT_EOF +- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in +@@ -10575,8 +10101,8 @@ + + + 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:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 ++$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" +@@ -10614,13 +10140,13 @@ + + 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:${as_lineno-$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:${as_lineno-$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 +@@ -10628,16 +10154,16 @@ + 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + ;; + esac + fi +@@ -10654,13 +10180,13 @@ + + + # 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:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 ++$as_echo_n "checking if libtool supports shared libraries... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 +@@ -10680,15 +10206,15 @@ + fi + ;; + esac +- { echo "$as_me:$LINENO: result: $enable_shared" >&5 +-echo "${ECHO_T}$enable_shared" >&6; } ++ { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $enable_static" >&5 ++$as_echo "$enable_static" >&6; } + + + +@@ -10735,22 +10261,23 @@ + # 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:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 ++$as_echo_n "checking for a BSD-compatible install... " >&6; } + if test -z "$INSTALL"; then +-if test "${ac_cv_path_install+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++if test "${ac_cv_path_install+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- # Account for people who put trailing slashes in PATH elements. +-case $as_dir/ in +- ./ | .// | /cC/* | \ ++ # Account for people who put trailing slashes in PATH elements. ++case $as_dir/ in #(( ++ ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ +- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ ++ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. +@@ -10768,17 +10295,29 @@ + # 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 ++ ++ done + IFS=$as_save_IFS + ++rm -rf conftest.one conftest.two conftest.dir + + fi + if test "${ac_cv_path_install+set}" = set; then +@@ -10791,8 +10330,8 @@ + INSTALL=$ac_install_sh + fi + fi +-{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +-echo "${ECHO_T}$INSTALL" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 ++$as_echo "$INSTALL" >&6; } + + # Use test -z because SunOS4 sh mishandles braces in ${var-val}. + # It thinks the first close brace ends the variable substitution. +@@ -10804,264 +10343,244 @@ + + + # Checks for endianess +-{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +-if test "${ac_cv_c_bigendian+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- # See if sys/param.h defines the BYTE_ORDER macro. +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 ++$as_echo_n "checking whether byte ordering is bigendian... " >&6; } ++if test "${ac_cv_c_bigendian+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_cv_c_bigendian=unknown ++ # See if we're dealing with a universal compiler. ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#ifndef __APPLE_CC__ ++ not a universal capable compiler ++ #endif ++ typedef int dummy; ++ ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ++ # Check for potential -arch flags. It is not universal unless ++ # there are at least two -arch flags with different values. ++ ac_arch= ++ ac_prev= ++ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do ++ if test -n "$ac_prev"; then ++ case $ac_word in ++ i?86 | x86_64 | ppc | ppc64) ++ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ++ ac_arch=$ac_word ++ else ++ ac_cv_c_bigendian=universal ++ break ++ fi ++ ;; ++ esac ++ ac_prev= ++ elif test "x$ac_word" = "x-arch"; then ++ ac_prev=arch ++ fi ++ done ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ if test $ac_cv_c_bigendian = unknown; then ++ # See if sys/param.h defines the BYTE_ORDER macro. ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +-#include ++ #include + + int + main () + { +-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ +- && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) +- bogus endian macros +-#endif ++#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ ++ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ ++ && LITTLE_ENDIAN) ++ bogus endian macros ++ #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 ++if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +-#include ++ #include + + int + main () + { + #if BYTE_ORDER != BIG_ENDIAN +- not big endian +-#endif ++ not big endian ++ #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 ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_c_bigendian=no ++ ac_cv_c_bigendian=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ fi ++ if test $ac_cv_c_bigendian = unknown; then ++ # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + +- # It does not; compile a test program. +-if test "$cross_compiling" = yes; then +- # try to guess the endianness by grepping values into an object file +- ac_cv_c_bigendian=unknown +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++int ++main () ++{ ++#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) ++ bogus endian macros ++ #endif ++ ++ ; ++ return 0; ++} + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ # It does; now see whether it defined to _BIG_ENDIAN or not. ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +-short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +-void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +-short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +-short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } ++#include ++ + int + main () + { +- _ascii (); _ebcdic (); ++#ifndef _BIG_ENDIAN ++ not big endian ++ #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 +- if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes ++else ++ ac_cv_c_bigendian=no + fi +-if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then +- if test "$ac_cv_c_bigendian" = unknown; then +- ac_cv_c_bigendian=no +- else +- # finding both strings is unlikely to happen, but who knows? +- ac_cv_c_bigendian=unknown +- fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ fi ++ if test $ac_cv_c_bigendian = unknown; then ++ # Compile a test program. ++ if test "$cross_compiling" = yes; then : ++ # Try to guess by grepping values from an object file. ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++short int ascii_mm[] = ++ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; ++ short int ascii_ii[] = ++ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; ++ int use_ascii (int i) { ++ return ascii_mm[i] + ascii_ii[i]; ++ } ++ short int ebcdic_ii[] = ++ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; ++ short int ebcdic_mm[] = ++ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; ++ int use_ebcdic (int i) { ++ return ebcdic_mm[i] + ebcdic_ii[i]; ++ } ++ extern int foo; + ++int ++main () ++{ ++return use_ascii (foo) == use_ebcdic (foo); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ++ ac_cv_c_bigendian=yes ++ fi ++ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then ++ if test "$ac_cv_c_bigendian" = unknown; then ++ ac_cv_c_bigendian=no ++ else ++ # finding both strings is unlikely to happen, but who knows? ++ ac_cv_c_bigendian=unknown ++ fi ++ fi + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $ac_includes_default + int + main () + { + +- /* Are we little or big endian? From Harbison&Steele. */ +- union +- { +- long int l; +- char c[sizeof (long int)]; +- } u; +- u.l = 1; +- return u.c[sizeof (long int) - 1] == 1; ++ /* Are we little or big endian? From Harbison&Steele. */ ++ union ++ { ++ long int l; ++ char c[sizeof (long int)]; ++ } u; ++ u.l = 1; ++ return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; + } + _ACEOF +-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 ++if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no + else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-ac_cv_c_bigendian=yes ++ ac_cv_c_bigendian=yes + fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + +- ++ fi + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 ++$as_echo "$ac_cv_c_bigendian" >&6; } ++ case $ac_cv_c_bigendian in #( ++ yes) ++ $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ++;; #( ++ no) ++ ;; #( ++ universal) + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +-echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +-case $ac_cv_c_bigendian in +- yes) ++$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + +-cat >>confdefs.h <<\_ACEOF +-#define WORDS_BIGENDIAN 1 +-_ACEOF +- ;; +- no) +- ;; +- *) +- { { echo "$as_me:$LINENO: error: unknown endianness +-presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +-echo "$as_me: error: unknown endianness +-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} +- { (exit 1); exit 1; }; } ;; +-esac ++ ;; #( ++ *) ++ as_fn_error "unknown endianness ++ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; ++ esac + + + case $host in + *-*-linux*) + +-cat >>confdefs.h <<\_ACEOF +-#define LINUX 1 +-_ACEOF ++$as_echo "#define LINUX 1" >>confdefs.h + + CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199506L" ;; + *-*-darwin*) +-cat >>confdefs.h <<\_ACEOF +-#define FREEBSD 1 +-_ACEOF ++$as_echo "#define FREEBSD 1" >>confdefs.h + ;; + *-*-freebsd*) +-cat >>confdefs.h <<\_ACEOF +-#define FREEBSD 1 +-_ACEOF ++$as_echo "#define FREEBSD 1" >>confdefs.h + ;; +-*) { { echo "$as_me:$LINENO: error: Linux, FreeBSD, Darwin only, dude!" >&5 +-echo "$as_me: error: Linux, FreeBSD, Darwin only, dude!" >&2;} +- { (exit 1); exit 1; }; };; ++*) as_fn_error "Linux, FreeBSD, Darwin only, dude!" "$LINENO" 5;; + esac + + # Global definitions +@@ -11073,125 +10592,25 @@ + CFLAGS="$CFLAGS -D_ISOC99_SOURCE -D_GNU_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE" + + # check to see if struct dirent has the d_type member +-{ echo "$as_me:$LINENO: checking for struct dirent.d_type" >&5 +-echo $ECHO_N "checking for struct dirent.d_type... $ECHO_C" >&6; } +-if test "${ac_cv_member_struct_dirent_d_type+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-static struct dirent ac_aggr; +-if (ac_aggr.d_type) +-return 0; +- ; +- 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_member_struct_dirent_d_type=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-static struct dirent ac_aggr; +-if (sizeof ac_aggr.d_type) +-return 0; +- ; +- 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_member_struct_dirent_d_type=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_member_struct_dirent_d_type=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_dirent_d_type" >&5 +-echo "${ECHO_T}$ac_cv_member_struct_dirent_d_type" >&6; } +-if test $ac_cv_member_struct_dirent_d_type = yes; then ++ac_fn_c_check_member "$LINENO" "struct dirent" "d_type" "ac_cv_member_struct_dirent_d_type" "#include ++" ++if test "x$ac_cv_member_struct_dirent_d_type" = x""yes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_STRUCT_DIRENT_D_TYPE 1 +-_ACEOF ++$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h + + fi + + + # Checks for libraries. + +- +-{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +-echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } +-if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 ++$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } ++if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lpthread $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -11209,39 +10628,18 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_mutex_init=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_pthread_pthread_mutex_init=no ++ ac_cv_lib_pthread_pthread_mutex_init=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +-echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +-if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 ++$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } ++if test "x$ac_cv_lib_pthread_pthread_mutex_init" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBPTHREAD 1 + _ACEOF +@@ -11256,10 +10654,10 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}docbook2man", so it can be a program name with args. + set dummy ${ac_tool_prefix}docbook2man; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_DOCBOOK2MAN+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DOCBOOK2MAN+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$DOCBOOK2MAN"; then + ac_cv_prog_DOCBOOK2MAN="$DOCBOOK2MAN" # Let the user override the test. +@@ -11269,25 +10667,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_DOCBOOK2MAN="${ac_tool_prefix}docbook2man" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + DOCBOOK2MAN=$ac_cv_prog_DOCBOOK2MAN + if test -n "$DOCBOOK2MAN"; then +- { echo "$as_me:$LINENO: result: $DOCBOOK2MAN" >&5 +-echo "${ECHO_T}$DOCBOOK2MAN" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOK2MAN" >&5 ++$as_echo "$DOCBOOK2MAN" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -11296,10 +10694,10 @@ + ac_ct_DOCBOOK2MAN=$DOCBOOK2MAN + # Extract the first word of "docbook2man", so it can be a program name with args. + set dummy docbook2man; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_ac_ct_DOCBOOK2MAN+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DOCBOOK2MAN+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_DOCBOOK2MAN"; then + ac_cv_prog_ac_ct_DOCBOOK2MAN="$ac_ct_DOCBOOK2MAN" # Let the user override the test. +@@ -11309,25 +10707,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_DOCBOOK2MAN="docbook2man" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + ac_ct_DOCBOOK2MAN=$ac_cv_prog_ac_ct_DOCBOOK2MAN + if test -n "$ac_ct_DOCBOOK2MAN"; then +- { echo "$as_me:$LINENO: result: $ac_ct_DOCBOOK2MAN" >&5 +-echo "${ECHO_T}$ac_ct_DOCBOOK2MAN" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DOCBOOK2MAN" >&5 ++$as_echo "$ac_ct_DOCBOOK2MAN" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_DOCBOOK2MAN" = x; then +@@ -11335,12 +10733,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + DOCBOOK2MAN=$ac_ct_DOCBOOK2MAN +@@ -11352,10 +10746,10 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}docbook2pdf", so it can be a program name with args. + set dummy ${ac_tool_prefix}docbook2pdf; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_DOCBOOK2PDF+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_DOCBOOK2PDF+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$DOCBOOK2PDF"; then + ac_cv_prog_DOCBOOK2PDF="$DOCBOOK2PDF" # Let the user override the test. +@@ -11365,25 +10759,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_DOCBOOK2PDF="${ac_tool_prefix}docbook2pdf" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + DOCBOOK2PDF=$ac_cv_prog_DOCBOOK2PDF + if test -n "$DOCBOOK2PDF"; then +- { echo "$as_me:$LINENO: result: $DOCBOOK2PDF" >&5 +-echo "${ECHO_T}$DOCBOOK2PDF" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOK2PDF" >&5 ++$as_echo "$DOCBOOK2PDF" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -11392,10 +10786,10 @@ + ac_ct_DOCBOOK2PDF=$DOCBOOK2PDF + # Extract the first word of "docbook2pdf", so it can be a program name with args. + set dummy docbook2pdf; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_ac_ct_DOCBOOK2PDF+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_DOCBOOK2PDF+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_DOCBOOK2PDF"; then + ac_cv_prog_ac_ct_DOCBOOK2PDF="$ac_ct_DOCBOOK2PDF" # Let the user override the test. +@@ -11405,25 +10799,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_DOCBOOK2PDF="docbook2pdf" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + ac_ct_DOCBOOK2PDF=$ac_cv_prog_ac_ct_DOCBOOK2PDF + if test -n "$ac_ct_DOCBOOK2PDF"; then +- { echo "$as_me:$LINENO: result: $ac_ct_DOCBOOK2PDF" >&5 +-echo "${ECHO_T}$ac_ct_DOCBOOK2PDF" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DOCBOOK2PDF" >&5 ++$as_echo "$ac_ct_DOCBOOK2PDF" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_DOCBOOK2PDF" = x; then +@@ -11431,12 +10825,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + DOCBOOK2PDF=$ac_ct_DOCBOOK2PDF +@@ -11447,16 +10837,12 @@ + + + # Checks for header files. +-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +-if test "${ac_cv_header_stdc+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 ++$as_echo_n "checking for ANSI C header files... " >&6; } ++if test "${ac_cv_header_stdc+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -11471,68 +10857,23 @@ + 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 ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_header_stdc=no ++ ac_cv_header_stdc=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "memchr" >/dev/null 2>&1; then +- : +-else +- ac_cv_header_stdc=no +-fi +-rm -f conftest* +- +-fi +- +-if test $ac_cv_header_stdc = yes; then +- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include ++ $EGREP "memchr" >/dev/null 2>&1; then : + +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "free" >/dev/null 2>&1; then +- : + else + ac_cv_header_stdc=no + fi +@@ -11541,232 +10882,81 @@ + fi + + if test $ac_cv_header_stdc = yes; then +- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +- if test "$cross_compiling" = yes; then +- : +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include + #include +-#if ((' ' & 0x0FF) == 0x020) +-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +-#else +-# define ISLOWER(c) \ +- (('a' <= (c) && (c) <= 'i') \ +- || ('j' <= (c) && (c) <= 'r') \ +- || ('s' <= (c) && (c) <= 'z')) +-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +-#endif +- +-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +-int +-main () +-{ +- int i; +- for (i = 0; i < 256; i++) +- if (XOR (islower (i), ISLOWER (i)) +- || toupper (i) != TOUPPER (i)) +- return 2; +- return 0; +-} +-_ACEOF +-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 ) +-ac_cv_header_stdc=no +-fi +-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; } +-if test $ac_cv_header_stdc = yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define STDC_HEADERS 1 +-_ACEOF +- +-fi +- +- +- +- +- +- +- +- +- +-for ac_header in arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h +-do +-as_ac_Header=`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; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-fi +-ac_res=`eval echo '${'$as_ac_Header'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$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; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (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_header_compiler=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_header_compiler=no ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "free" >/dev/null 2>&1; then : ++ ++else ++ ac_cv_header_stdc=no + fi ++rm -f conftest* + +-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; } ++fi + +-# Is the header present? +-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++if test $ac_cv_header_stdc = yes; then ++ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. ++ if test "$cross_compiling" = yes; then : ++ : ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include <$ac_header> ++#include ++#include ++#if ((' ' & 0x0FF) == 0x020) ++# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') ++# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) ++#else ++# define ISLOWER(c) \ ++ (('a' <= (c) && (c) <= 'i') \ ++ || ('j' <= (c) && (c) <= 'r') \ ++ || ('s' <= (c) && (c) <= 'z')) ++# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) ++#endif ++ ++#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) ++int ++main () ++{ ++ int i; ++ for (i = 0; i < 256; i++) ++ if (XOR (islower (i), ISLOWER (i)) ++ || toupper (i) != TOUPPER (i)) ++ return 2; ++ return 0; ++} + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-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_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ ac_cv_header_stdc=no ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi + +- ac_header_preproc=no + fi ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 ++$as_echo "$ac_cv_header_stdc" >&6; } ++if test $ac_cv_header_stdc = yes; then + +-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 "#define STDC_HEADERS 1" >>confdefs.h + +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------------ ## +-## Report this to nufw-devel@nongnu.org ## +-## ------------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&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; } + +-fi +-if test `eval echo '${'$as_ac_Header'}'` = yes; then ++for ac_header in arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h ++do : ++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" ++eval as_val=\$$as_ac_Header ++ if test "x$as_val" = x""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 +@@ -11775,16 +10965,12 @@ + + + # Checks for typedefs, structures, and compiler characteristics. +-{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +-if test "${ac_cv_c_const+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 ++$as_echo_n "checking for an ANSI C-conforming const... " >&6; } ++if test "${ac_cv_c_const+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -11844,203 +11030,44 @@ + 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 ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_c_const=no ++ ac_cv_c_const=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +-echo "${ECHO_T}$ac_cv_c_const" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 ++$as_echo "$ac_cv_c_const" >&6; } + if test $ac_cv_c_const = no; then + +-cat >>confdefs.h <<\_ACEOF +-#define const +-_ACEOF ++$as_echo "#define const /**/" >>confdefs.h + + fi + + + # Checks for library functions. +- + for ac_header in stdlib.h +-do +-as_ac_Header=`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; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-fi +-ac_res=`eval echo '${'$as_ac_Header'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$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; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (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_header_compiler=yes +-else +- 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; } +- +-# Is the header present? +-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-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_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- 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 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------------ ## +-## Report this to nufw-devel@nongnu.org ## +-## ------------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&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; } +- +-fi +-if test `eval echo '${'$as_ac_Header'}'` = yes; then ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" ++if test "x$ac_cv_header_stdlib_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define HAVE_STDLIB_H 1 + _ACEOF + + fi + + done + +-{ echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 +-echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; } +-if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 ++$as_echo_n "checking for GNU libc compatible malloc... " >&6; } ++if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + ac_cv_func_malloc_0_nonnull=no + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #if defined STDC_HEADERS || defined HAVE_STDLIB_H + # include +@@ -12056,52 +11083,24 @@ + 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 ++if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_malloc_0_nonnull=yes + else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-ac_cv_func_malloc_0_nonnull=no ++ ac_cv_func_malloc_0_nonnull=no + fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + +- + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 +-echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; } +-if test $ac_cv_func_malloc_0_nonnull = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 ++$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } ++if test $ac_cv_func_malloc_0_nonnull = yes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_MALLOC 1 +-_ACEOF ++$as_echo "#define HAVE_MALLOC 1" >>confdefs.h + + else +- cat >>confdefs.h <<\_ACEOF +-#define HAVE_MALLOC 0 +-_ACEOF ++ $as_echo "#define HAVE_MALLOC 0" >>confdefs.h + + case " $LIBOBJS " in + *" malloc.$ac_objext "* ) ;; +@@ -12110,30 +11109,23 @@ + esac + + +-cat >>confdefs.h <<\_ACEOF +-#define malloc rpl_malloc +-_ACEOF ++$as_echo "#define malloc rpl_malloc" >>confdefs.h + + fi + + +- +-{ echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 +-echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6; } +-if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 ++$as_echo_n "checking whether lstat dereferences a symlink specified with a trailing slash... " >&6; } ++if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + rm -f conftest.sym conftest.file + echo >conftest.file + if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + ac_cv_func_lstat_dereferences_slashed_symlink=no + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $ac_includes_default + int +@@ -12148,39 +11140,15 @@ + 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 ++if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_lstat_dereferences_slashed_symlink=yes + else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-ac_cv_func_lstat_dereferences_slashed_symlink=no ++ ac_cv_func_lstat_dereferences_slashed_symlink=no + fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + +- + else + # If the `ln -s' command failed, then we probably don't even + # have an lstat function. +@@ -12189,8 +11157,8 @@ + rm -f conftest.sym conftest.file + + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 +-echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 ++$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } + + test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && + +@@ -12208,19 +11176,15 @@ + + fi + +-{ echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5 +-echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" >&6; } +-if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 ++$as_echo_n "checking whether stat accepts an empty string... " >&6; } ++if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + ac_cv_func_stat_empty_string_bug=yes + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $ac_includes_default + int +@@ -12232,149 +11196,40 @@ + 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 +- ac_cv_func_stat_empty_string_bug=no +-else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-ac_cv_func_stat_empty_string_bug=yes +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5 +-echo "${ECHO_T}$ac_cv_func_stat_empty_string_bug" >&6; } +-if test $ac_cv_func_stat_empty_string_bug = yes; then +- case " $LIBOBJS " in +- *" stat.$ac_objext "* ) ;; +- *) LIBOBJS="$LIBOBJS stat.$ac_objext" +- ;; +-esac +- +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_STAT_EMPTY_STRING_BUG 1 +-_ACEOF +- +-fi +- +- +- +- +- +- +-for ac_func in gethostbyname memset socket strcasecmp strspn +-do +-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 +- eval "$as_ac_var=yes" ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_func_stat_empty_string_bug=no + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ ac_cv_func_stat_empty_string_bug=yes ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi + +- eval "$as_ac_var=no" + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 ++$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } ++if test $ac_cv_func_stat_empty_string_bug = yes; then ++ case " $LIBOBJS " in ++ *" stat.$ac_objext "* ) ;; ++ *) LIBOBJS="$LIBOBJS stat.$ac_objext" ++ ;; ++esac ++ ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STAT_EMPTY_STRING_BUG 1 ++_ACEOF + +-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 ++ ++for ac_func in gethostbyname memset socket strcasecmp strspn ++do : ++ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" ++eval as_val=\$$as_ac_var ++ if test "x$as_val" = x""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 +@@ -12387,10 +11242,126 @@ + #AM_CHECK_PATH(libgnutls], [gnutls_init],AC_DEFINE([HAVE_LIBRARY_GNUTLS],[1],[Gnutls lib flag]), check_gnutls=no) + + ++ ++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. ++set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $PKG_CONFIG in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ++ ;; ++ *) ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++ ;; ++esac ++fi ++PKG_CONFIG=$ac_cv_path_PKG_CONFIG ++if test -n "$PKG_CONFIG"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 ++$as_echo "$PKG_CONFIG" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_path_PKG_CONFIG"; then ++ ac_pt_PKG_CONFIG=$PKG_CONFIG ++ # Extract the first word of "pkg-config", so it can be a program name with args. ++set dummy pkg-config; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $ac_pt_PKG_CONFIG in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ++ ;; ++ *) ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++ ;; ++esac ++fi ++ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG ++if test -n "$ac_pt_PKG_CONFIG"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 ++$as_echo "$ac_pt_PKG_CONFIG" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_pt_PKG_CONFIG" = x; then ++ PKG_CONFIG="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ PKG_CONFIG=$ac_pt_PKG_CONFIG ++ fi ++else ++ PKG_CONFIG="$ac_cv_path_PKG_CONFIG" ++fi ++ ++fi ++if test -n "$PKG_CONFIG"; then ++ _pkg_min_version=0.9.0 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 ++$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } ++ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ PKG_CONFIG="" ++ fi ++ ++fi ++ + NEED_LIBGCRYPT_VERSION=1.2.0 + + # Check whether --with-libgcrypt-prefix was given. +-if test "${with_libgcrypt_prefix+set}" = set; then ++if test "${with_libgcrypt_prefix+set}" = set; then : + withval=$with_libgcrypt_prefix; libgcrypt_config_prefix="$withval" + else + libgcrypt_config_prefix="" +@@ -12404,10 +11375,10 @@ + + # Extract the first word of "libgcrypt-config", so it can be a program name with args. + set dummy libgcrypt-config; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_path_LIBGCRYPT_CONFIG+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_path_LIBGCRYPT_CONFIG+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + case $LIBGCRYPT_CONFIG in + [\\/]* | ?:[\\/]*) +@@ -12419,14 +11390,14 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_path_LIBGCRYPT_CONFIG="$as_dir/$ac_word$ac_exec_ext" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + test -z "$ac_cv_path_LIBGCRYPT_CONFIG" && ac_cv_path_LIBGCRYPT_CONFIG="no" +@@ -12435,11 +11406,11 @@ + fi + LIBGCRYPT_CONFIG=$ac_cv_path_LIBGCRYPT_CONFIG + if test -n "$LIBGCRYPT_CONFIG"; then +- { echo "$as_me:$LINENO: result: $LIBGCRYPT_CONFIG" >&5 +-echo "${ECHO_T}$LIBGCRYPT_CONFIG" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGCRYPT_CONFIG" >&5 ++$as_echo "$LIBGCRYPT_CONFIG" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -12452,8 +11423,8 @@ + min_libgcrypt_version="$tmp" + fi + +- { echo "$as_me:$LINENO: checking for LIBGCRYPT - version >= $min_libgcrypt_version" >&5 +-echo $ECHO_N "checking for LIBGCRYPT - version >= $min_libgcrypt_version... $ECHO_C" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGCRYPT - version >= $min_libgcrypt_version" >&5 ++$as_echo_n "checking for LIBGCRYPT - version >= $min_libgcrypt_version... " >&6; } + ok=no + if test "$LIBGCRYPT_CONFIG" != "no" ; then + req_major=`echo $min_libgcrypt_version | \ +@@ -12486,11 +11457,11 @@ + fi + fi + if test $ok = yes; then +- { echo "$as_me:$LINENO: result: yes ($libgcrypt_config_version)" >&5 +-echo "${ECHO_T}yes ($libgcrypt_config_version)" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($libgcrypt_config_version)" >&5 ++$as_echo "yes ($libgcrypt_config_version)" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + if test $ok = yes; then + # If we have a recent libgcrypt, we should also check that the +@@ -12498,15 +11469,15 @@ + if test "$req_libgcrypt_api" -gt 0 ; then + tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` + if test "$tmp" -gt 0 ; then +- { echo "$as_me:$LINENO: checking LIBGCRYPT API version" >&5 +-echo $ECHO_N "checking LIBGCRYPT API version... $ECHO_C" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGCRYPT API version" >&5 ++$as_echo_n "checking LIBGCRYPT API version... " >&6; } + if test "$req_libgcrypt_api" -eq "$tmp" ; then +- { echo "$as_me:$LINENO: result: okay" >&5 +-echo "${ECHO_T}okay" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: okay" >&5 ++$as_echo "okay" >&6; } + else + ok=no +- { echo "$as_me:$LINENO: result: does not match. want=$req_libgcrypt_api got=$tmp" >&5 +-echo "${ECHO_T}does not match. want=$req_libgcrypt_api got=$tmp" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: does not match. want=$req_libgcrypt_api got=$tmp" >&5 ++$as_echo "does not match. want=$req_libgcrypt_api got=$tmp" >&6; } + fi + fi + fi +@@ -12521,302 +11492,93 @@ + : + fi + +- +- +-if test "x$LIBGCRYPT_LIBS" = "x"; then +- { { echo "$as_me:$LINENO: error: libgcrypt is needed. +- See ftp://ftp.gnupg.org/gcrypt/ ." >&5 +-echo "$as_me: error: libgcrypt is needed. +- See ftp://ftp.gnupg.org/gcrypt/ ." >&2;} +- { (exit 1); exit 1; }; } +-else +- CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS" +- LDFLAGS="$LDFLAGS $LIBGCRYPT_LIBS" +-fi +- +-NEED_LIBGNUTLS_VERSION=1.0.16 +- +-# Check whether --with-libgnutls-prefix was given. +-if test "${with_libgnutls_prefix+set}" = set; then +- withval=$with_libgnutls_prefix; libgnutls_config_prefix="$withval" +-else +- libgnutls_config_prefix="" +-fi +- +- +- if test x$libgnutls_config_prefix != x ; then +- if test x${LIBGNUTLS_CONFIG+set} != xset ; then +- LIBGNUTLS_CONFIG=$libgnutls_config_prefix/bin/libgnutls-config +- fi +- fi +- +- # Extract the first word of "libgnutls-config", so it can be a program name with args. +-set dummy libgnutls-config; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_path_LIBGNUTLS_CONFIG+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- case $LIBGNUTLS_CONFIG in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_LIBGNUTLS_CONFIG="$LIBGNUTLS_CONFIG" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_path_LIBGNUTLS_CONFIG="$as_dir/$ac_word$ac_exec_ext" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +-done +-IFS=$as_save_IFS +- +- test -z "$ac_cv_path_LIBGNUTLS_CONFIG" && ac_cv_path_LIBGNUTLS_CONFIG="no" +- ;; +-esac +-fi +-LIBGNUTLS_CONFIG=$ac_cv_path_LIBGNUTLS_CONFIG +-if test -n "$LIBGNUTLS_CONFIG"; then +- { echo "$as_me:$LINENO: result: $LIBGNUTLS_CONFIG" >&5 +-echo "${ECHO_T}$LIBGNUTLS_CONFIG" >&6; } +-else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } +-fi +- +- +- min_libgnutls_version="$NEED_LIBGNUTLS_VERSION" +- { echo "$as_me:$LINENO: checking for libgnutls - version >= $min_libgnutls_version" >&5 +-echo $ECHO_N "checking for libgnutls - version >= $min_libgnutls_version... $ECHO_C" >&6; } +- no_libgnutls="" +- if test "$LIBGNUTLS_CONFIG" = "no" ; then +- no_libgnutls=yes +- else +- LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags` +- LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs` +- libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version` +- +- +- ac_save_CFLAGS="$CFLAGS" +- ac_save_LIBS="$LIBS" +- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" +- LIBS="$LIBS $LIBGNUTLS_LIBS" +- rm -f conf.libgnutlstest +- if test "$cross_compiling" = yes; then +- echo $ac_n "cross compiling; assumed OK... $ac_c" +-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 +-#include +-#include +- +-int +-main () +-{ +- system ("touch conf.libgnutlstest"); +- +- if( strcmp( gnutls_check_version(NULL), "$libgnutls_config_version" ) ) +- { +- printf("\n*** 'libgnutls-config --version' returned %s, but LIBGNUTLS (%s)\n", +- "$libgnutls_config_version", gnutls_check_version(NULL) ); +- printf("*** was found! If libgnutls-config was correct, then it is best\n"); +- printf("*** to remove the old version of LIBGNUTLS. You may also be able to fix the error\n"); +- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); +- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); +- printf("*** required on your system.\n"); +- printf("*** If libgnutls-config was wrong, set the environment variable LIBGNUTLS_CONFIG\n"); +- printf("*** to point to the correct copy of libgnutls-config, and remove the file config.cache\n"); +- printf("*** before re-running configure\n"); +- } +- else if ( strcmp(gnutls_check_version(NULL), LIBGNUTLS_VERSION ) ) +- { +- printf("\n*** LIBGNUTLS header file (version %s) does not match\n", LIBGNUTLS_VERSION); +- printf("*** library (version %s)\n", gnutls_check_version(NULL) ); +- } +- else +- { +- if ( gnutls_check_version( "$min_libgnutls_version" ) ) +- { +- return 0; +- } +- else +- { +- printf("no\n*** An old version of LIBGNUTLS (%s) was found.\n", +- gnutls_check_version(NULL) ); +- printf("*** You need a version of LIBGNUTLS newer than %s. The latest version of\n", +- "$min_libgnutls_version" ); +- printf("*** LIBGNUTLS is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n"); +- printf("*** \n"); +- printf("*** If you have already installed a sufficiently new version, this error\n"); +- printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n"); +- printf("*** being found. The easiest way to fix this is to remove the old version\n"); +- printf("*** of LIBGNUTLS, but you can also set the LIBGNUTLS_CONFIG environment to point to the\n"); +- printf("*** correct copy of libgnutls-config. (In this case, you will have to\n"); +- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); +- printf("*** so that the correct libraries are found at run-time))\n"); +- } +- } +- return 1; +-} +- +-_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 ) +-no_libgnutls=yes +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- CFLAGS="$ac_save_CFLAGS" +- LIBS="$ac_save_LIBS" +- fi +- +- if test "x$no_libgnutls" = x ; then +- { echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } +- : +- else +- if test -f conf.libgnutlstest ; then +- : +- else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } +- fi +- if test "$LIBGNUTLS_CONFIG" = "no" ; then +- echo "*** The libgnutls-config script installed by LIBGNUTLS could not be found" +- echo "*** If LIBGNUTLS was installed in PREFIX, make sure PREFIX/bin is in" +- echo "*** your path, or set the LIBGNUTLS_CONFIG environment variable to the" +- echo "*** full path to libgnutls-config." +- else +- if test -f conf.libgnutlstest ; then +- : +- else +- echo "*** Could not run libgnutls test program, checking why..." +- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" +- LIBS="$LIBS $LIBGNUTLS_LIBS" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-#include +-#include +- +-int +-main () +-{ +- return !!gnutls_check_version(NULL); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 +- echo "*** The test program compiled, but did not run. This usually means" +- echo "*** that the run-time linker is not finding LIBGNUTLS or finding the wrong" +- echo "*** version of LIBGNUTLS. If it is not finding LIBGNUTLS, you'll need to set your" +- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" +- echo "*** to the installed location Also, make sure you have run ldconfig if that" +- echo "*** is required on your system" +- echo "***" +- echo "*** If you have an old version installed, it is best to remove it, although" +- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +- echo "***" ++ ++ ++if test "x$LIBGCRYPT_LIBS" = "x"; then ++ as_fn_error "libgcrypt is needed. ++ See ftp://ftp.gnupg.org/gcrypt/ ." "$LINENO" 5 + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS" ++ LDFLAGS="$LDFLAGS $LIBGCRYPT_LIBS" ++fi ++ ++NEED_LIBGNUTLS_VERSION=1.0.16 ++ ++pkg_failed=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNUTLS" >&5 ++$as_echo_n "checking for GNUTLS... " >&6; } + +- echo "*** The test program failed to compile or link. See the file config.log for the" +- echo "*** exact error that occured. This usually means LIBGNUTLS was incorrectly installed" +- echo "*** or that you have moved LIBGNUTLS since it was installed. In the latter case, you" +- echo "*** may want to edit the libgnutls-config script: $LIBGNUTLS_CONFIG" ++if test -n "$PKG_CONFIG"; then ++ if test -n "$GNUTLS_CFLAGS"; then ++ pkg_cv_GNUTLS_CFLAGS="$GNUTLS_CFLAGS" ++ else ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= \$NEED_LIBGNUTLS_VERSION\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "gnutls >= $NEED_LIBGNUTLS_VERSION") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_GNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= $NEED_LIBGNUTLS_VERSION" 2>/dev/null` ++else ++ pkg_failed=yes ++fi ++ fi ++else ++ pkg_failed=untried ++fi ++if test -n "$PKG_CONFIG"; then ++ if test -n "$GNUTLS_LIBS"; then ++ pkg_cv_GNUTLS_LIBS="$GNUTLS_LIBS" ++ else ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= \$NEED_LIBGNUTLS_VERSION\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "gnutls >= $NEED_LIBGNUTLS_VERSION") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_GNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= $NEED_LIBGNUTLS_VERSION" 2>/dev/null` ++else ++ pkg_failed=yes ++fi ++ fi ++else ++ pkg_failed=untried + fi + +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +- CFLAGS="$ac_save_CFLAGS" +- LIBS="$ac_save_LIBS" +- fi +- fi +- LIBGNUTLS_CFLAGS="" +- LIBGNUTLS_LIBS="" +- : +- fi +- rm -f conf.libgnutlstest + + ++if test $pkg_failed = yes; then ++ ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no ++fi ++ if test $_pkg_short_errors_supported = yes; then ++ GNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gnutls >= $NEED_LIBGNUTLS_VERSION"` ++ else ++ GNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= $NEED_LIBGNUTLS_VERSION"` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$GNUTLS_PKG_ERRORS" >&5 + +-if test "x$LIBGNUTLS_LIBS" = "x"; then +- { { echo "$as_me:$LINENO: error: libgnutls is needed. +- See www.gnu.org/software/gnutls/ ." >&5 +-echo "$as_me: error: libgnutls is needed. +- See www.gnu.org/software/gnutls/ ." >&2;} +- { (exit 1); exit 1; }; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ exit ++elif test $pkg_failed = untried; then ++ exit ++else ++ GNUTLS_CFLAGS=$pkg_cv_GNUTLS_CFLAGS ++ GNUTLS_LIBS=$pkg_cv_GNUTLS_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ : + fi + + #Configure database support, depending on user input + + # Check whether --with-prelude-log was given. +-if test "${with_prelude_log+set}" = set; then ++if test "${with_prelude_log+set}" = set; then : + withval=$with_prelude_log; enable_prelude_log=$withval + else + enable_prelude_log="" +@@ -12825,7 +11587,7 @@ + + + # Check whether --with-mysql-log was given. +-if test "${with_mysql_log+set}" = set; then ++if test "${with_mysql_log+set}" = set; then : + withval=$with_mysql_log; enable_mysql_log=$withval + else + enable_mysql_log="" +@@ -12833,7 +11595,7 @@ + + + # Check whether --with-mysql-auth was given. +-if test "${with_mysql_auth+set}" = set; then ++if test "${with_mysql_auth+set}" = set; then : + withval=$with_mysql_auth; enable_mysql_auth=$withval + else + enable_mysql_auth="" +@@ -12841,7 +11603,7 @@ + + + # Check whether --with-pgsql-log was given. +-if test "${with_pgsql_log+set}" = set; then ++if test "${with_pgsql_log+set}" = set; then : + withval=$with_pgsql_log; enable_pgsql_log=$withval + else + enable_pgsql_log="" +@@ -12849,7 +11611,7 @@ + + + # Check whether --with-syslog-log was given. +-if test "${with_syslog_log+set}" = set; then ++if test "${with_syslog_log+set}" = set; then : + withval=$with_syslog_log; enable_syslog_log=$withval + else + enable_syslog_log="yes" +@@ -12858,7 +11620,7 @@ + + + # Check whether --with-plaintext-auth was given. +-if test "${with_plaintext_auth+set}" = set; then ++if test "${with_plaintext_auth+set}" = set; then : + withval=$with_plaintext_auth; enable_plaintext_auth=$withval + else + enable_plaintext_auth="yes" +@@ -12866,7 +11628,7 @@ + + + # Check whether --with-mark-group was given. +-if test "${with_mark_group+set}" = set; then ++if test "${with_mark_group+set}" = set; then : + withval=$with_mark_group; enable_mark_group=$withval + else + enable_mark_group="yes" +@@ -12874,7 +11636,7 @@ + + + # Check whether --with-mark-field was given. +-if test "${with_mark_field+set}" = set; then ++if test "${with_mark_field+set}" = set; then : + withval=$with_mark_field; enable_mark_field=$withval + else + enable_mark_field="yes" +@@ -12882,7 +11644,7 @@ + + + # Check whether --with-mark-flag was given. +-if test "${with_mark_flag+set}" = set; then ++if test "${with_mark_flag+set}" = set; then : + withval=$with_mark_flag; enable_mark_flag=$withval + else + enable_mark_flag="yes" +@@ -12890,7 +11652,7 @@ + + + # Check whether --with-system-auth was given. +-if test "${with_system_auth+set}" = set; then ++if test "${with_system_auth+set}" = set; then : + withval=$with_system_auth; enable_system_auth=$withval + else + enable_system_auth="yes" +@@ -12899,7 +11661,7 @@ + + + # Check whether --with-ldap was given. +-if test "${with_ldap+set}" = set; then ++if test "${with_ldap+set}" = set; then : + withval=$with_ldap; ldap=$withval + else + ldap="" +@@ -12909,7 +11671,7 @@ + + + # Check whether --with-nfqueue was given. +-if test "${with_nfqueue+set}" = set; then ++if test "${with_nfqueue+set}" = set; then : + withval=$with_nfqueue; use_nfqueue=$withval + else + use_nfqueue="yes" +@@ -12917,7 +11679,7 @@ + + + # Check whether --with-nfconntrack was given. +-if test "${with_nfconntrack+set}" = set; then ++if test "${with_nfconntrack+set}" = set; then : + withval=$with_nfconntrack; use_nfconntrack=$withval + else + use_nfconntrack="yes" +@@ -12927,7 +11689,7 @@ + + + # Check whether --with-utf8 was given. +-if test "${with_utf8+set}" = set; then ++if test "${with_utf8+set}" = set; then : + withval=$with_utf8; + cat >>confdefs.h <<_ACEOF + #define USE_UTF8 1 +@@ -12937,49 +11699,49 @@ + + + # Check whether --with-fixedtimeout was given. +-if test "${with_fixedtimeout+set}" = set; then ++if test "${with_fixedtimeout+set}" = set; then : + withval=$with_fixedtimeout; have_conntrack_fixedtimeout=$withval + fi + + + + # Check whether --enable-nufw was given. +-if test "${enable_nufw+set}" = set; then ++if test "${enable_nufw+set}" = set; then : + enableval=$enable_nufw; build_nufw=$enableval + else + build_nufw="yes" + fi + + # Check whether --enable-nuauth was given. +-if test "${enable_nuauth+set}" = set; then ++if test "${enable_nuauth+set}" = set; then : + enableval=$enable_nuauth; build_nuauth=$enableval + else + build_nuauth="yes" + fi + + # Check whether --enable-libnuclient was given. +-if test "${enable_libnuclient+set}" = set; then ++if test "${enable_libnuclient+set}" = set; then : + enableval=$enable_libnuclient; build_libnuclient=$enableval + else + build_libnuclient="yes" + fi + + # Check whether --enable-nutcpc was given. +-if test "${enable_nutcpc+set}" = set; then ++if test "${enable_nutcpc+set}" = set; then : + enableval=$enable_nutcpc; build_nutcpc=$enableval + else + build_nutcpc="yes" + fi + + # Check whether --enable-pam-nufw was given. +-if test "${enable_pam_nufw+set}" = set; then ++if test "${enable_pam_nufw+set}" = set; then : + enableval=$enable_pam_nufw; build_pam_nufw=$enableval + else + build_pam_nufw="no" + fi + + # Check whether --enable-nuauth-command was given. +-if test "${enable_nuauth_command+set}" = set; then ++if test "${enable_nuauth_command+set}" = set; then : + enableval=$enable_nuauth_command; build_nuauth_command=$enableval + else + build_nuauth_command="yes" +@@ -12990,10 +11752,10 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}python", so it can be a program name with args. + set dummy ${ac_tool_prefix}python; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_PYTHON+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_PYTHON+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$PYTHON"; then + ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test. +@@ -13003,25 +11765,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_PYTHON="${ac_tool_prefix}python" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + PYTHON=$ac_cv_prog_PYTHON + if test -n "$PYTHON"; then +- { echo "$as_me:$LINENO: result: $PYTHON" >&5 +-echo "${ECHO_T}$PYTHON" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 ++$as_echo "$PYTHON" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -13030,10 +11792,10 @@ + ac_ct_PYTHON=$PYTHON + # Extract the first word of "python", so it can be a program name with args. + set dummy python; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_ac_ct_PYTHON+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_PYTHON+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_PYTHON"; then + ac_cv_prog_ac_ct_PYTHON="$ac_ct_PYTHON" # Let the user override the test. +@@ -13043,25 +11805,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_PYTHON="python" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + ac_ct_PYTHON=$ac_cv_prog_ac_ct_PYTHON + if test -n "$ac_ct_PYTHON"; then +- { echo "$as_me:$LINENO: result: $ac_ct_PYTHON" >&5 +-echo "${ECHO_T}$ac_ct_PYTHON" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PYTHON" >&5 ++$as_echo "$ac_ct_PYTHON" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_PYTHON" = x; then +@@ -13069,12 +11831,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + PYTHON=$ac_ct_PYTHON +@@ -13091,7 +11849,7 @@ + fi + + # Check whether --enable-debug was given. +-if test "${enable_debug+set}" = set; then ++if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; debug=$enableval + else + debug="" +@@ -13099,7 +11857,7 @@ + + + # Check whether --with-perf-display was given. +-if test "${with_perf_display+set}" = set; then ++if test "${with_perf_display+set}" = set; then : + withval=$with_perf_display; use_perf_display=$withval + else + use_perf_display="yes" +@@ -13120,18 +11878,14 @@ + -o "${build_nutcpc}" = "yes" \ + -o "${build_pam_nufw}" = "yes" \ + ; then +- { echo "$as_me:$LINENO: checking for sasl_server_init in -lsasl2" >&5 +-echo $ECHO_N "checking for sasl_server_init in -lsasl2... $ECHO_C" >&6; } +-if test "${ac_cv_lib_sasl2_sasl_server_init+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_server_init in -lsasl2" >&5 ++$as_echo_n "checking for sasl_server_init in -lsasl2... " >&6; } ++if test "${ac_cv_lib_sasl2_sasl_server_init+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lsasl2 $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -13149,43 +11903,20 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_sasl2_sasl_server_init=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_sasl2_sasl_server_init=no ++ ac_cv_lib_sasl2_sasl_server_init=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_server_init" >&5 +-echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_server_init" >&6; } +-if test $ac_cv_lib_sasl2_sasl_server_init = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_server_init" >&5 ++$as_echo "$ac_cv_lib_sasl2_sasl_server_init" >&6; } ++if test "x$ac_cv_lib_sasl2_sasl_server_init" = x""yes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LIBRARY_SASL2 1 +-_ACEOF ++$as_echo "#define HAVE_LIBRARY_SASL2 1" >>confdefs.h + + else + check_sasl=no +@@ -13194,18 +11925,14 @@ + fi + + if test "${build_nuauth}" = "yes"; then +- { echo "$as_me:$LINENO: checking for sasl_server_init in -lsasl2" >&5 +-echo $ECHO_N "checking for sasl_server_init in -lsasl2... $ECHO_C" >&6; } +-if test "${ac_cv_lib_sasl2_sasl_server_init+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_server_init in -lsasl2" >&5 ++$as_echo_n "checking for sasl_server_init in -lsasl2... " >&6; } ++if test "${ac_cv_lib_sasl2_sasl_server_init+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lsasl2 $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -13223,43 +11950,20 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_sasl2_sasl_server_init=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_sasl2_sasl_server_init=no ++ ac_cv_lib_sasl2_sasl_server_init=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_server_init" >&5 +-echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_server_init" >&6; } +-if test $ac_cv_lib_sasl2_sasl_server_init = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_server_init" >&5 ++$as_echo "$ac_cv_lib_sasl2_sasl_server_init" >&6; } ++if test "x$ac_cv_lib_sasl2_sasl_server_init" = x""yes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LIBRARY_SASL2 1 +-_ACEOF ++$as_echo "#define HAVE_LIBRARY_SASL2 1" >>confdefs.h + + else + check_sasl=no +@@ -13267,7 +11971,7 @@ + + # glib stuff + # Check whether --enable-glibtest was given. +-if test "${enable_glibtest+set}" = set; then ++if test "${enable_glibtest+set}" = set; then : + enableval=$enable_glibtest; + else + enable_glibtest=yes +@@ -13302,10 +12006,10 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. + set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) +@@ -13317,14 +12021,14 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + ;; +@@ -13332,11 +12036,11 @@ + fi + PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then +- { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +-echo "${ECHO_T}$PKG_CONFIG" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 ++$as_echo "$PKG_CONFIG" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -13345,10 +12049,10 @@ + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) +@@ -13360,14 +12064,14 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + ;; +@@ -13375,11 +12079,11 @@ + fi + ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG + if test -n "$ac_pt_PKG_CONFIG"; then +- { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 ++$as_echo "$ac_pt_PKG_CONFIG" >&6; } + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_pt_PKG_CONFIG" = x; then +@@ -13387,12 +12091,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + PKG_CONFIG=$ac_pt_PKG_CONFIG +@@ -13404,14 +12104,14 @@ + fi + if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.16 +- { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 ++$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then +- { echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } ++ { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + PKG_CONFIG="" + fi + +@@ -13425,8 +12125,8 @@ + fi + + min_glib_version=2.4.0 +- { echo "$as_me:$LINENO: checking for GLIB - version >= $min_glib_version" >&5 +-echo $ECHO_N "checking for GLIB - version >= $min_glib_version... $ECHO_C" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB - version >= $min_glib_version" >&5 ++$as_echo_n "checking for GLIB - version >= $min_glib_version... " >&6; } + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs +@@ -13461,14 +12161,10 @@ + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$GLIB_LIBS $LIBS" + rm -f conf.glibtest +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + echo $ac_n "cross compiling; assumed OK... $ac_c" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -13480,8 +12176,9 @@ + { + int major, minor, micro; + char *tmp_version; ++ int ignored; + +- system ("touch conf.glibtest"); ++ ignored = system ("touch conf.glibtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_glib_version"); +@@ -13543,50 +12240,26 @@ + } + + _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 ++if ac_fn_c_try_run "$LINENO"; then : + +-( exit $ac_status ) +-no_glib=yes ++else ++ no_glib=yes + fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + +- + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_glib" = x ; then +- { echo "$as_me:$LINENO: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5 +-echo "${ECHO_T}yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5 ++$as_echo "yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6; } + : + else +- { echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://www.freedesktop.org/software/pkgconfig/" +@@ -13599,11 +12272,7 @@ + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GLIB_CFLAGS" + LIBS="$LIBS $GLIB_LIBS" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -13617,24 +12286,7 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GLIB or finding the wrong" + echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" +@@ -13645,15 +12297,11 @@ + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- echo "*** The test program failed to compile or link. See the file config.log for the" ++ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GLIB is incorrectly installed." + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi +@@ -13673,18 +12321,14 @@ + rm -f conf.glibtest + + if test "$enable_system_auth" = "yes"; then +- { echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5 +-echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6; } +-if test "${ac_cv_lib_pam_pam_start+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5 ++$as_echo_n "checking for pam_start in -lpam... " >&6; } ++if test "${ac_cv_lib_pam_pam_start+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lpam $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -13702,43 +12346,20 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pam_pam_start=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_pam_pam_start=no ++ ac_cv_lib_pam_pam_start=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5 +-echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6; } +-if test $ac_cv_lib_pam_pam_start = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5 ++$as_echo "$ac_cv_lib_pam_pam_start" >&6; } ++if test "x$ac_cv_lib_pam_pam_start" = x""yes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LIBRARY_PAM 1 +-_ACEOF ++$as_echo "#define HAVE_LIBRARY_PAM 1" >>confdefs.h + + else + check_pam=no +@@ -13747,18 +12368,14 @@ + fi + + if test "${ldap}" = "yes"; then +- { echo "$as_me:$LINENO: checking for ldap_simple_bind_s in -lldap" >&5 +-echo $ECHO_N "checking for ldap_simple_bind_s in -lldap... $ECHO_C" >&6; } +-if test "${ac_cv_lib_ldap_ldap_simple_bind_s+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind_s in -lldap" >&5 ++$as_echo_n "checking for ldap_simple_bind_s in -lldap... " >&6; } ++if test "${ac_cv_lib_ldap_ldap_simple_bind_s+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lldap $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -13776,43 +12393,20 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ldap_ldap_simple_bind_s=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_ldap_ldap_simple_bind_s=no ++ ac_cv_lib_ldap_ldap_simple_bind_s=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_simple_bind_s" >&5 +-echo "${ECHO_T}$ac_cv_lib_ldap_ldap_simple_bind_s" >&6; } +-if test $ac_cv_lib_ldap_ldap_simple_bind_s = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_simple_bind_s" >&5 ++$as_echo "$ac_cv_lib_ldap_ldap_simple_bind_s" >&6; } ++if test "x$ac_cv_lib_ldap_ldap_simple_bind_s" = x""yes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LIBRARY_LDAP 1 +-_ACEOF ++$as_echo "#define HAVE_LIBRARY_LDAP 1" >>confdefs.h + + else + check_ldap=no +@@ -13823,18 +12417,14 @@ + if test "$enable_mysql_log" = "yes" \ + -o "$enable_mysql_auth" = "yes" ; then + if which mysql_config 1>/dev/null; then +- { echo "$as_me:$LINENO: checking for mysql_real_connect in -lmysqlclient" >&5 +-echo $ECHO_N "checking for mysql_real_connect in -lmysqlclient... $ECHO_C" >&6; } +-if test "${ac_cv_lib_mysqlclient_mysql_real_connect+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_real_connect in -lmysqlclient" >&5 ++$as_echo_n "checking for mysql_real_connect in -lmysqlclient... " >&6; } ++if test "${ac_cv_lib_mysqlclient_mysql_real_connect+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lmysqlclient $(mysql_config --libs) $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -13852,60 +12442,33 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mysqlclient_mysql_real_connect=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_mysqlclient_mysql_real_connect=no ++ ac_cv_lib_mysqlclient_mysql_real_connect=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_real_connect" >&5 +-echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_real_connect" >&6; } +-if test $ac_cv_lib_mysqlclient_mysql_real_connect = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_real_connect" >&5 ++$as_echo "$ac_cv_lib_mysqlclient_mysql_real_connect" >&6; } ++if test "x$ac_cv_lib_mysqlclient_mysql_real_connect" = x""yes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LIBRARY_MYSQLCLIENT 1 +-_ACEOF ++$as_echo "#define HAVE_LIBRARY_MYSQLCLIENT 1" >>confdefs.h + + else + check_mysql=no + fi + +- { echo "$as_me:$LINENO: checking for mysql_ssl_set in -lmysqlclient" >&5 +-echo $ECHO_N "checking for mysql_ssl_set in -lmysqlclient... $ECHO_C" >&6; } +-if test "${ac_cv_lib_mysqlclient_mysql_ssl_set+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_ssl_set in -lmysqlclient" >&5 ++$as_echo_n "checking for mysql_ssl_set in -lmysqlclient... " >&6; } ++if test "${ac_cv_lib_mysqlclient_mysql_ssl_set+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lmysqlclient $(mysql_config --libs) $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -13923,63 +12486,38 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mysqlclient_mysql_ssl_set=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_mysqlclient_mysql_ssl_set=no ++ ac_cv_lib_mysqlclient_mysql_ssl_set=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_ssl_set" >&5 +-echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_ssl_set" >&6; } +-if test $ac_cv_lib_mysqlclient_mysql_ssl_set = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_ssl_set" >&5 ++$as_echo "$ac_cv_lib_mysqlclient_mysql_ssl_set" >&6; } ++if test "x$ac_cv_lib_mysqlclient_mysql_ssl_set" = x""yes; then : + + cat >>confdefs.h <<_ACEOF + #define HAVE_MYSQL_SSL 1 + _ACEOF + + else +- { echo "$as_me:$LINENO: mysqlclient has no ssl support" >&5 +-echo "$as_me: mysqlclient has no ssl support" >&6;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: mysqlclient has no ssl support" >&5 ++$as_echo "$as_me: mysqlclient has no ssl support" >&6;} + fi + + have_mysql_config="yes" + else +- { echo "$as_me:$LINENO: checking for mysql_real_connect in -lmysqlclient" >&5 +-echo $ECHO_N "checking for mysql_real_connect in -lmysqlclient... $ECHO_C" >&6; } +-if test "${ac_cv_lib_mysqlclient_mysql_real_connect+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_real_connect in -lmysqlclient" >&5 ++$as_echo_n "checking for mysql_real_connect in -lmysqlclient... " >&6; } ++if test "${ac_cv_lib_mysqlclient_mysql_real_connect+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lmysqlclient $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -13997,60 +12535,33 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mysqlclient_mysql_real_connect=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_mysqlclient_mysql_real_connect=no ++ ac_cv_lib_mysqlclient_mysql_real_connect=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_real_connect" >&5 +-echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_real_connect" >&6; } +-if test $ac_cv_lib_mysqlclient_mysql_real_connect = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_real_connect" >&5 ++$as_echo "$ac_cv_lib_mysqlclient_mysql_real_connect" >&6; } ++if test "x$ac_cv_lib_mysqlclient_mysql_real_connect" = x""yes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LIBRARY_MYSQLCLIENT 1 +-_ACEOF ++$as_echo "#define HAVE_LIBRARY_MYSQLCLIENT 1" >>confdefs.h + + else + check_mysql=no + fi + +- { echo "$as_me:$LINENO: checking for mysql_ssl_set in -lmysqlclient" >&5 +-echo $ECHO_N "checking for mysql_ssl_set in -lmysqlclient... $ECHO_C" >&6; } +-if test "${ac_cv_lib_mysqlclient_mysql_ssl_set+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_ssl_set in -lmysqlclient" >&5 ++$as_echo_n "checking for mysql_ssl_set in -lmysqlclient... " >&6; } ++if test "${ac_cv_lib_mysqlclient_mysql_ssl_set+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lmysqlclient $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -14068,47 +12579,26 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mysqlclient_mysql_ssl_set=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_mysqlclient_mysql_ssl_set=no ++ ac_cv_lib_mysqlclient_mysql_ssl_set=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_ssl_set" >&5 +-echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_ssl_set" >&6; } +-if test $ac_cv_lib_mysqlclient_mysql_ssl_set = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_ssl_set" >&5 ++$as_echo "$ac_cv_lib_mysqlclient_mysql_ssl_set" >&6; } ++if test "x$ac_cv_lib_mysqlclient_mysql_ssl_set" = x""yes; then : + + cat >>confdefs.h <<_ACEOF + #define HAVE_MYSQL_SSL 1 + _ACEOF + + else +- { echo "$as_me:$LINENO: mysqlclient has no ssl support" >&5 +-echo "$as_me: mysqlclient has no ssl support" >&6;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: mysqlclient has no ssl support" >&5 ++$as_echo "$as_me: mysqlclient has no ssl support" >&6;} + fi + + fi +@@ -14122,138 +12612,9 @@ + OLDCPPFLAGS="$CPPFLAGS" + CFLAGS="$CFLAGS -I/usr/include/libprelude/" + CPPFLAGS="$CFLAGS -I/usr/include/libprelude/" +- if test "${ac_cv_header_prelude_h+set}" = set; then +- { echo "$as_me:$LINENO: checking for prelude.h" >&5 +-echo $ECHO_N "checking for prelude.h... $ECHO_C" >&6; } +-if test "${ac_cv_header_prelude_h+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_header_prelude_h" >&5 +-echo "${ECHO_T}$ac_cv_header_prelude_h" >&6; } +-else +- # Is the header compilable? +-{ echo "$as_me:$LINENO: checking prelude.h usability" >&5 +-echo $ECHO_N "checking prelude.h usability... $ECHO_C" >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include +-_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_header_compiler=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ ac_fn_c_check_header_mongrel "$LINENO" "prelude.h" "ac_cv_header_prelude_h" "$ac_includes_default" ++if test "x$ac_cv_header_prelude_h" = x""yes; then : + +- 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; } +- +-# Is the header present? +-{ echo "$as_me:$LINENO: checking prelude.h presence" >&5 +-echo $ECHO_N "checking prelude.h presence... $ECHO_C" >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-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_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- 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 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { echo "$as_me:$LINENO: WARNING: prelude.h: accepted by the compiler, rejected by the preprocessor!" >&5 +-echo "$as_me: WARNING: prelude.h: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: prelude.h: proceeding with the compiler's result" >&5 +-echo "$as_me: WARNING: prelude.h: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { echo "$as_me:$LINENO: WARNING: prelude.h: present but cannot be compiled" >&5 +-echo "$as_me: WARNING: prelude.h: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: prelude.h: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: prelude.h: check for missing prerequisite headers?" >&2;} +- { echo "$as_me:$LINENO: WARNING: prelude.h: see the Autoconf documentation" >&5 +-echo "$as_me: WARNING: prelude.h: see the Autoconf documentation" >&2;} +- { echo "$as_me:$LINENO: WARNING: prelude.h: section \"Present But Cannot Be Compiled\"" >&5 +-echo "$as_me: WARNING: prelude.h: section \"Present But Cannot Be Compiled\"" >&2;} +- { echo "$as_me:$LINENO: WARNING: prelude.h: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: prelude.h: proceeding with the preprocessor's result" >&2;} +- { echo "$as_me:$LINENO: WARNING: prelude.h: in the future, the compiler will take precedence" >&5 +-echo "$as_me: WARNING: prelude.h: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------------ ## +-## Report this to nufw-devel@nongnu.org ## +-## ------------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ echo "$as_me:$LINENO: checking for prelude.h" >&5 +-echo $ECHO_N "checking for prelude.h... $ECHO_C" >&6; } +-if test "${ac_cv_header_prelude_h+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- ac_cv_header_prelude_h=$ac_header_preproc +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_header_prelude_h" >&5 +-echo "${ECHO_T}$ac_cv_header_prelude_h" >&6; } +- +-fi +-if test $ac_cv_header_prelude_h = yes; then +- : + else + check_prelude=no + fi +@@ -14261,18 +12622,14 @@ + + + # Check for prelude_init() function libprelude.so +- { echo "$as_me:$LINENO: checking for prelude_init in -lprelude" >&5 +-echo $ECHO_N "checking for prelude_init in -lprelude... $ECHO_C" >&6; } +-if test "${ac_cv_lib_prelude_prelude_init+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prelude_init in -lprelude" >&5 ++$as_echo_n "checking for prelude_init in -lprelude... " >&6; } ++if test "${ac_cv_lib_prelude_prelude_init+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lprelude $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -14290,43 +12647,20 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_prelude_prelude_init=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_prelude_prelude_init=no ++ ac_cv_lib_prelude_prelude_init=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_prelude_prelude_init" >&5 +-echo "${ECHO_T}$ac_cv_lib_prelude_prelude_init" >&6; } +-if test $ac_cv_lib_prelude_prelude_init = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prelude_prelude_init" >&5 ++$as_echo "$ac_cv_lib_prelude_prelude_init" >&6; } ++if test "x$ac_cv_lib_prelude_prelude_init" = x""yes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LIBRARY_PRELUDE 1 +-_ACEOF ++$as_echo "#define HAVE_LIBRARY_PRELUDE 1" >>confdefs.h + + else + check_prelude=no +@@ -14337,18 +12671,14 @@ + fi + + if test "$enable_pgsql_log" = "yes"; then +- { echo "$as_me:$LINENO: checking for PQconnectdb in -lpq" >&5 +-echo $ECHO_N "checking for PQconnectdb in -lpq... $ECHO_C" >&6; } +-if test "${ac_cv_lib_pq_PQconnectdb+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQconnectdb in -lpq" >&5 ++$as_echo_n "checking for PQconnectdb in -lpq... " >&6; } ++if test "${ac_cv_lib_pq_PQconnectdb+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lpq $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -14365,44 +12695,21 @@ + ; + return 0; + } +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pq_PQconnectdb=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_pq_PQconnectdb=no ++ ac_cv_lib_pq_PQconnectdb=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_pq_PQconnectdb" >&5 +-echo "${ECHO_T}$ac_cv_lib_pq_PQconnectdb" >&6; } +-if test $ac_cv_lib_pq_PQconnectdb = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQconnectdb" >&5 ++$as_echo "$ac_cv_lib_pq_PQconnectdb" >&6; } ++if test "x$ac_cv_lib_pq_PQconnectdb" = x""yes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LIBRARY_PQ 1 +-_ACEOF ++$as_echo "#define HAVE_LIBRARY_PQ 1" >>confdefs.h + + else + check_pgsql=no +@@ -14510,18 +12817,14 @@ + + + if test "${build_libnuclient}" = "yes"; then +- { echo "$as_me:$LINENO: checking for sasl_server_init in -lsasl2" >&5 +-echo $ECHO_N "checking for sasl_server_init in -lsasl2... $ECHO_C" >&6; } +-if test "${ac_cv_lib_sasl2_sasl_server_init+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_server_init in -lsasl2" >&5 ++$as_echo_n "checking for sasl_server_init in -lsasl2... " >&6; } ++if test "${ac_cv_lib_sasl2_sasl_server_init+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lsasl2 $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -14539,43 +12842,20 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_sasl2_sasl_server_init=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_sasl2_sasl_server_init=no ++ ac_cv_lib_sasl2_sasl_server_init=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_server_init" >&5 +-echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_server_init" >&6; } +-if test $ac_cv_lib_sasl2_sasl_server_init = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_server_init" >&5 ++$as_echo "$ac_cv_lib_sasl2_sasl_server_init" >&6; } ++if test "x$ac_cv_lib_sasl2_sasl_server_init" = x""yes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LIBRARY_SASL2 1 +-_ACEOF ++$as_echo "#define HAVE_LIBRARY_SASL2 1" >>confdefs.h + + else + check_sasl=no +@@ -14586,18 +12866,14 @@ + if test "${build_nufw}" = "yes"; then + if test "${use_nfqueue}" = "yes"; then + # if we don't have we can't build nufw +- { echo "$as_me:$LINENO: checking for nfnl_open in -lnfnetlink" >&5 +-echo $ECHO_N "checking for nfnl_open in -lnfnetlink... $ECHO_C" >&6; } +-if test "${ac_cv_lib_nfnetlink_nfnl_open+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfnl_open in -lnfnetlink" >&5 ++$as_echo_n "checking for nfnl_open in -lnfnetlink... " >&6; } ++if test "${ac_cv_lib_nfnetlink_nfnl_open+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lnfnetlink $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -14615,56 +12891,31 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nfnetlink_nfnl_open=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_nfnetlink_nfnl_open=no ++ ac_cv_lib_nfnetlink_nfnl_open=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_nfnetlink_nfnl_open" >&5 +-echo "${ECHO_T}$ac_cv_lib_nfnetlink_nfnl_open" >&6; } +-if test $ac_cv_lib_nfnetlink_nfnl_open = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nfnetlink_nfnl_open" >&5 ++$as_echo "$ac_cv_lib_nfnetlink_nfnl_open" >&6; } ++if test "x$ac_cv_lib_nfnetlink_nfnl_open" = x""yes; then : + have_nfqueue="yes" + else + build_nufw="" + fi + +- { echo "$as_me:$LINENO: checking for nfq_open in -lnetfilter_queue" >&5 +-echo $ECHO_N "checking for nfq_open in -lnetfilter_queue... $ECHO_C" >&6; } +-if test "${ac_cv_lib_netfilter_queue_nfq_open+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfq_open in -lnetfilter_queue" >&5 ++$as_echo_n "checking for nfq_open in -lnetfilter_queue... " >&6; } ++if test "${ac_cv_lib_netfilter_queue_nfq_open+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lnetfilter_queue -lnfnetlink $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -14682,58 +12933,31 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_netfilter_queue_nfq_open=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_netfilter_queue_nfq_open=no ++ ac_cv_lib_netfilter_queue_nfq_open=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_netfilter_queue_nfq_open" >&5 +-echo "${ECHO_T}$ac_cv_lib_netfilter_queue_nfq_open" >&6; } +-if test $ac_cv_lib_netfilter_queue_nfq_open = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netfilter_queue_nfq_open" >&5 ++$as_echo "$ac_cv_lib_netfilter_queue_nfq_open" >&6; } ++if test "x$ac_cv_lib_netfilter_queue_nfq_open" = x""yes; then : + have_nfqueue="yes" + else +- { { echo "$as_me:$LINENO: error: libnetfilter_queue not present" >&5 +-echo "$as_me: error: libnetfilter_queue not present" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "libnetfilter_queue not present" "$LINENO" 5 + fi + +- { echo "$as_me:$LINENO: checking for nfq_set_queue_maxlen in -lnetfilter_queue" >&5 +-echo $ECHO_N "checking for nfq_set_queue_maxlen in -lnetfilter_queue... $ECHO_C" >&6; } +-if test "${ac_cv_lib_netfilter_queue_nfq_set_queue_maxlen+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfq_set_queue_maxlen in -lnetfilter_queue" >&5 ++$as_echo_n "checking for nfq_set_queue_maxlen in -lnetfilter_queue... " >&6; } ++if test "${ac_cv_lib_netfilter_queue_nfq_set_queue_maxlen+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lnetfilter_queue -lnfnetlink $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -14751,39 +12975,18 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_netfilter_queue_nfq_set_queue_maxlen=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_netfilter_queue_nfq_set_queue_maxlen=no ++ ac_cv_lib_netfilter_queue_nfq_set_queue_maxlen=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_netfilter_queue_nfq_set_queue_maxlen" >&5 +-echo "${ECHO_T}$ac_cv_lib_netfilter_queue_nfq_set_queue_maxlen" >&6; } +-if test $ac_cv_lib_netfilter_queue_nfq_set_queue_maxlen = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netfilter_queue_nfq_set_queue_maxlen" >&5 ++$as_echo "$ac_cv_lib_netfilter_queue_nfq_set_queue_maxlen" >&6; } ++if test "x$ac_cv_lib_netfilter_queue_nfq_set_queue_maxlen" = x""yes; then : + + cat >>confdefs.h <<_ACEOF + #define HAVE_NFQ_SET_QUEUE_MAXLEN 1 +@@ -14791,18 +12994,14 @@ + + fi + +- { echo "$as_me:$LINENO: checking for nlif_catch in -lnfnetlink" >&5 +-echo $ECHO_N "checking for nlif_catch in -lnfnetlink... $ECHO_C" >&6; } +-if test "${ac_cv_lib_nfnetlink_nlif_catch+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nlif_catch in -lnfnetlink" >&5 ++$as_echo_n "checking for nlif_catch in -lnfnetlink... " >&6; } ++if test "${ac_cv_lib_nfnetlink_nlif_catch+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lnfnetlink $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -14820,51 +13019,26 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nfnetlink_nlif_catch=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_nfnetlink_nlif_catch=no ++ ac_cv_lib_nfnetlink_nlif_catch=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_nfnetlink_nlif_catch" >&5 +-echo "${ECHO_T}$ac_cv_lib_nfnetlink_nlif_catch" >&6; } +-if test $ac_cv_lib_nfnetlink_nlif_catch = yes; then +- { echo "$as_me:$LINENO: checking for nfq_get_indev_name in -lnetfilter_queue" >&5 +-echo $ECHO_N "checking for nfq_get_indev_name in -lnetfilter_queue... $ECHO_C" >&6; } +-if test "${ac_cv_lib_netfilter_queue_nfq_get_indev_name+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nfnetlink_nlif_catch" >&5 ++$as_echo "$ac_cv_lib_nfnetlink_nlif_catch" >&6; } ++if test "x$ac_cv_lib_nfnetlink_nlif_catch" = x""yes; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfq_get_indev_name in -lnetfilter_queue" >&5 ++$as_echo_n "checking for nfq_get_indev_name in -lnetfilter_queue... " >&6; } ++if test "${ac_cv_lib_netfilter_queue_nfq_get_indev_name+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lnetfilter_queue -lnfnetlink $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -14882,47 +13056,26 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_netfilter_queue_nfq_get_indev_name=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_netfilter_queue_nfq_get_indev_name=no ++ ac_cv_lib_netfilter_queue_nfq_get_indev_name=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_netfilter_queue_nfq_get_indev_name" >&5 +-echo "${ECHO_T}$ac_cv_lib_netfilter_queue_nfq_get_indev_name" >&6; } +-if test $ac_cv_lib_netfilter_queue_nfq_get_indev_name = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netfilter_queue_nfq_get_indev_name" >&5 ++$as_echo "$ac_cv_lib_netfilter_queue_nfq_get_indev_name" >&6; } ++if test "x$ac_cv_lib_netfilter_queue_nfq_get_indev_name" = x""yes; then : + + cat >>confdefs.h <<_ACEOF + #define HAVE_NFQ_INDEV_NAME 1 + _ACEOF + + else +- { echo "$as_me:$LINENO: WARNING: \"Support of interface resolution in nfnetlink but not in netfilter_queue\"" >&5 +-echo "$as_me: WARNING: \"Support of interface resolution in nfnetlink but not in netfilter_queue\"" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Support of interface resolution in nfnetlink but not in netfilter_queue\"" >&5 ++$as_echo "$as_me: WARNING: \"Support of interface resolution in nfnetlink but not in netfilter_queue\"" >&2;} + fi + + +@@ -14934,146 +13087,14 @@ + _ACEOF + + else +- +- +-for ac_header in libipq/libipq.h libipq.h +-do +-as_ac_Header=`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; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-fi +-ac_res=`eval echo '${'$as_ac_Header'}'` +- { echo "$as_me:$LINENO: result: $ac_res" >&5 +-echo "${ECHO_T}$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; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (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_header_compiler=yes +-else +- 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; } +- +-# Is the header present? +-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-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_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- 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 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------------ ## +-## Report this to nufw-devel@nongnu.org ## +-## ------------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- echo $ECHO_N "(cached) $ECHO_C" >&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; } +- +-fi +-if test `eval echo '${'$as_ac_Header'}'` = yes; then ++ for ac_header in libipq/libipq.h libipq.h ++do : ++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" ++eval as_val=\$$as_ac_Header ++ if test "x$as_val" = x""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 +@@ -15081,18 +13102,14 @@ + done + + # if we don't have we can't build nufw +- { echo "$as_me:$LINENO: checking for ipq_message_type in -lipq" >&5 +-echo $ECHO_N "checking for ipq_message_type in -lipq... $ECHO_C" >&6; } +-if test "${ac_cv_lib_ipq_ipq_message_type+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipq_message_type in -lipq" >&5 ++$as_echo_n "checking for ipq_message_type in -lipq... " >&6; } ++if test "${ac_cv_lib_ipq_ipq_message_type+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lipq $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -15110,39 +13127,18 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ipq_ipq_message_type=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_ipq_ipq_message_type=no ++ ac_cv_lib_ipq_ipq_message_type=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipq_ipq_message_type" >&5 +-echo "${ECHO_T}$ac_cv_lib_ipq_ipq_message_type" >&6; } +-if test $ac_cv_lib_ipq_ipq_message_type = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipq_ipq_message_type" >&5 ++$as_echo "$ac_cv_lib_ipq_ipq_message_type" >&6; } ++if test "x$ac_cv_lib_ipq_ipq_message_type" = x""yes; then : + have_ipq="yes" + else + build_nufw="" +@@ -15153,7 +13149,7 @@ + # check if we have a version of libipq supporting mark + + # Check whether --with-user-mark was given. +-if test "${with_user_mark+set}" = set; then ++if test "${with_user_mark+set}" = set; then : + withval=$with_user_mark; enable_user_mark="yes" + else + enable_user_mark="" +@@ -15161,18 +13157,14 @@ + + + if test "$enable_user_mark" = "yes"; then +- { echo "$as_me:$LINENO: checking for ipq_set_vwmark in -lipq" >&5 +-echo $ECHO_N "checking for ipq_set_vwmark in -lipq... $ECHO_C" >&6; } +-if test "${ac_cv_lib_ipq_ipq_set_vwmark+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipq_set_vwmark in -lipq" >&5 ++$as_echo_n "checking for ipq_set_vwmark in -lipq... " >&6; } ++if test "${ac_cv_lib_ipq_ipq_set_vwmark+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lipq $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -15190,47 +13182,26 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ipq_ipq_set_vwmark=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_ipq_ipq_set_vwmark=no ++ ac_cv_lib_ipq_ipq_set_vwmark=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipq_ipq_set_vwmark" >&5 +-echo "${ECHO_T}$ac_cv_lib_ipq_ipq_set_vwmark" >&6; } +-if test $ac_cv_lib_ipq_ipq_set_vwmark = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipq_ipq_set_vwmark" >&5 ++$as_echo "$ac_cv_lib_ipq_ipq_set_vwmark" >&6; } ++if test "x$ac_cv_lib_ipq_ipq_set_vwmark" = x""yes; then : + + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBIPQ_MARK 1 + _ACEOF + + else +- { echo "$as_me:$LINENO: result: libipq has no support for mark" >&5 +-echo "${ECHO_T}libipq has no support for mark" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: libipq has no support for mark" >&5 ++$as_echo "libipq has no support for mark" >&6; } + fi + + fi +@@ -15239,18 +13210,14 @@ + fi + + if test "${use_nfconntrack}" = "yes"; then +- { echo "$as_me:$LINENO: checking for nfct_dump_conntrack_table in -lnetfilter_conntrack" >&5 +-echo $ECHO_N "checking for nfct_dump_conntrack_table in -lnetfilter_conntrack... $ECHO_C" >&6; } +-if test "${ac_cv_lib_netfilter_conntrack_nfct_dump_conntrack_table+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfct_dump_conntrack_table in -lnetfilter_conntrack" >&5 ++$as_echo_n "checking for nfct_dump_conntrack_table in -lnetfilter_conntrack... " >&6; } ++if test "${ac_cv_lib_netfilter_conntrack_nfct_dump_conntrack_table+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lnetfilter_conntrack -ldl -lnfnetlink $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -15268,39 +13235,18 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_netfilter_conntrack_nfct_dump_conntrack_table=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_netfilter_conntrack_nfct_dump_conntrack_table=no ++ ac_cv_lib_netfilter_conntrack_nfct_dump_conntrack_table=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_netfilter_conntrack_nfct_dump_conntrack_table" >&5 +-echo "${ECHO_T}$ac_cv_lib_netfilter_conntrack_nfct_dump_conntrack_table" >&6; } +-if test $ac_cv_lib_netfilter_conntrack_nfct_dump_conntrack_table = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netfilter_conntrack_nfct_dump_conntrack_table" >&5 ++$as_echo "$ac_cv_lib_netfilter_conntrack_nfct_dump_conntrack_table" >&6; } ++if test "x$ac_cv_lib_netfilter_conntrack_nfct_dump_conntrack_table" = x""yes; then : + have_conntrack="yes" + else + have_conntrack="" +@@ -15316,18 +13262,14 @@ + #define HAVE_LIBCONNTRACK 1 + _ACEOF + +- { echo "$as_me:$LINENO: checking for nfct_callback_register in -lnetfilter_conntrack" >&5 +-echo $ECHO_N "checking for nfct_callback_register in -lnetfilter_conntrack... $ECHO_C" >&6; } +-if test "${ac_cv_lib_netfilter_conntrack_nfct_callback_register+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfct_callback_register in -lnetfilter_conntrack" >&5 ++$as_echo_n "checking for nfct_callback_register in -lnetfilter_conntrack... " >&6; } ++if test "${ac_cv_lib_netfilter_conntrack_nfct_callback_register+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lnetfilter_conntrack -ldl -lnfnetlink $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -15345,39 +13287,18 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_netfilter_conntrack_nfct_callback_register=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_netfilter_conntrack_nfct_callback_register=no ++ ac_cv_lib_netfilter_conntrack_nfct_callback_register=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_netfilter_conntrack_nfct_callback_register" >&5 +-echo "${ECHO_T}$ac_cv_lib_netfilter_conntrack_nfct_callback_register" >&6; } +-if test $ac_cv_lib_netfilter_conntrack_nfct_callback_register = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netfilter_conntrack_nfct_callback_register" >&5 ++$as_echo "$ac_cv_lib_netfilter_conntrack_nfct_callback_register" >&6; } ++if test "x$ac_cv_lib_netfilter_conntrack_nfct_callback_register" = x""yes; then : + have_new_conntrack_api="yes" + else + have_new_conntrack_api="" +@@ -15401,18 +13322,14 @@ + + if test "${build_pam_nufw}" = "yes"; then + #AC_CHECK_LIB([pam], [pam_sm_authenticate],AC_DEFINE([HAVE_LIBRARY_PAM],[1],[Pam lib flag]), check_pam=no) +- { echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5 +-echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6; } +-if test "${ac_cv_lib_pam_pam_start+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5 ++$as_echo_n "checking for pam_start in -lpam... " >&6; } ++if test "${ac_cv_lib_pam_pam_start+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lpam $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -15430,43 +13347,20 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (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 ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pam_pam_start=yes + else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_pam_pam_start=no ++ ac_cv_lib_pam_pam_start=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5 +-echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6; } +-if test $ac_cv_lib_pam_pam_start = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5 ++$as_echo "$ac_cv_lib_pam_pam_start" >&6; } ++if test "x$ac_cv_lib_pam_pam_start" = x""yes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LIBRARY_PAM 1 +-_ACEOF ++$as_echo "#define HAVE_LIBRARY_PAM 1" >>confdefs.h + + else + check_pam=no +@@ -15566,14 +13460,14 @@ + + if test "x$GCC" = "xyes"; then + +- { echo "$as_me:$LINENO: checking gcc version" >&5 +-echo $ECHO_N "checking gcc version... $ECHO_C" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5 ++$as_echo_n "checking gcc version... " >&6; } + gccver=$($CC -dumpversion) + gccvermajor=$(echo $gccver | cut -d . -f1) + gccverminor=$(echo $gccver | cut -d . -f2) + gccvernum=$(expr $gccvermajor "*" 100 + $gccverminor) +- { echo "$as_me:$LINENO: result: $gccver" >&5 +-echo "${ECHO_T}$gccver" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gccver" >&5 ++$as_echo "$gccver" >&6; } + + CFLAGS="$CFLAGS -Wall" + +@@ -15611,44 +13505,42 @@ + -o x${check_gnutls} = xno \ + -o x${check_pam} = xno \ + ; then +- { echo "$as_me:$LINENO: result: " >&5 +-echo "${ECHO_T}" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 ++$as_echo "" >&6; } + if test x${check_pthread} = xno; then +- { echo "$as_me:$LINENO: result: ERROR: pthread library needed" >&5 +-echo "${ECHO_T}ERROR: pthread library needed" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ERROR: pthread library needed" >&5 ++$as_echo "ERROR: pthread library needed" >&6; } + fi + if test x${check_gcrypt} = xno; then +- { echo "$as_me:$LINENO: result: ERROR: gcrypt library needed for encryption" >&5 +-echo "${ECHO_T}ERROR: gcrypt library needed for encryption" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ERROR: gcrypt library needed for encryption" >&5 ++$as_echo "ERROR: gcrypt library needed for encryption" >&6; } + fi + if test x${check_pam} = xno; then +- { echo "$as_me:$LINENO: result: ERROR: PAM library needed for system authentication" >&5 +-echo "${ECHO_T}ERROR: PAM library needed for system authentication" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ERROR: PAM library needed for system authentication" >&5 ++$as_echo "ERROR: PAM library needed for system authentication" >&6; } + fi + if test x${check_gnutls} = xno; then +- { echo "$as_me:$LINENO: result: ERROR: gnutls library needed for encryption" >&5 +-echo "${ECHO_T}ERROR: gnutls library needed for encryption" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ERROR: gnutls library needed for encryption" >&5 ++$as_echo "ERROR: gnutls library needed for encryption" >&6; } + fi + if test x${check_ldap} = xno; then +- { echo "$as_me:$LINENO: result: ERROR: ldap library needed for authentication" >&5 +-echo "${ECHO_T}ERROR: ldap library needed for authentication" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ERROR: ldap library needed for authentication" >&5 ++$as_echo "ERROR: ldap library needed for authentication" >&6; } + fi + if test x${check_glib} = xno; then +- { echo "$as_me:$LINENO: result: ERROR: glib is required in order to compile nuauth" >&5 +-echo "${ECHO_T}ERROR: glib is required in order to compile nuauth" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ERROR: glib is required in order to compile nuauth" >&5 ++$as_echo "ERROR: glib is required in order to compile nuauth" >&6; } + fi + if test x${check_mysql} = xno; then +- { echo "$as_me:$LINENO: result: ERROR: mysqlclient library needed if selected" >&5 +-echo "${ECHO_T}ERROR: mysqlclient library needed if selected" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ERROR: mysqlclient library needed if selected" >&5 ++$as_echo "ERROR: mysqlclient library needed if selected" >&6; } + fi + if test x${check_prelude} = xno; then +- { echo "$as_me:$LINENO: result: ERROR: libprelude library needed if Prelude logging selected" >&5 +-echo "${ECHO_T}ERROR: libprelude library needed if Prelude logging selected" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ERROR: libprelude library needed if Prelude logging selected" >&5 ++$as_echo "ERROR: libprelude library needed if Prelude logging selected" >&6; } + fi + if test x${check_pgsql} = xno; then +- { { echo "$as_me:$LINENO: error: libpq library needed if PostgreSQL support selected" >&5 +-echo "$as_me: error: libpq library needed if PostgreSQL support selected" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "libpq library needed if PostgreSQL support selected" "$LINENO" 5 + fi + exit 1 + fi +@@ -15660,16 +13552,16 @@ + -o "${build_pam_nufw}" = "yes" \ + ; then + if test x${check_sasl} = xno; then +- { echo "$as_me:$LINENO: result: ERROR: sasl library needed for authentication" >&5 +-echo "${ECHO_T}ERROR: sasl library needed for authentication" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ERROR: sasl library needed for authentication" >&5 ++$as_echo "ERROR: sasl library needed for authentication" >&6; } + exit 1 + fi + fi + + am__api_version='1.10' + +-{ 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:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 ++$as_echo_n "checking whether build environment is sane... " >&6; } + # Just in case + sleep 1 + echo timestamp > conftest.file +@@ -15692,11 +13584,8 @@ + # 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 +-alias in your environment" >&5 +-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; }; } ++ as_fn_error "ls -t appears to fail. Make sure there is not a broken ++alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file +@@ -15705,26 +13594,20 @@ + # Ok. + : + else +- { { 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! +-Check your system clock" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "newly created file is older than distributed files! ++Check your system clock" "$LINENO" 5 + fi +-{ echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } + test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" + # Use a double $ so make ignores it. + test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +-# Double any \ or $. 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` +@@ -15735,22 +13618,22 @@ + 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:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 ++$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + fi + +-{ 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; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 ++$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } + if test -z "$MKDIR_P"; then +- if test "${ac_cv_path_mkdir+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++ if test "${ac_cv_path_mkdir+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_prog in mkdir gmkdir; do ++ for ac_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 #( +@@ -15762,7 +13645,7 @@ + esac + done + done +-done ++ done + IFS=$as_save_IFS + + fi +@@ -15778,8 +13661,8 @@ + MKDIR_P="$ac_install_sh -d" + fi + fi +-{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +-echo "${ECHO_T}$MKDIR_P" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 ++$as_echo "$MKDIR_P" >&6; } + + mkdir_p="$MKDIR_P" + case $mkdir_p in +@@ -15791,10 +13674,10 @@ + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +-if test "${ac_cv_prog_AWK+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_AWK+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +@@ -15804,36 +13687,37 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$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'` +-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 "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 ++$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } ++set x ${MAKE-make} ++ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` ++if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : ++ $as_echo_n "(cached) " >&6 + else + cat >conftest.make <<\_ACEOF + SHELL = /bin/sh +@@ -15850,12 +13734,12 @@ + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" + fi + +@@ -15880,8 +13764,8 @@ + .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:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 ++$as_echo_n "checking for style of include used by $am_make... " >&6; } + am__include="#" + am__quote= + _am_result=none +@@ -15908,12 +13792,12 @@ + fi + + +-{ echo "$as_me:$LINENO: result: $_am_result" >&5 +-echo "${ECHO_T}$_am_result" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 ++$as_echo "$_am_result" >&6; } + rm -f confinc confmf + + # Check whether --enable-dependency-tracking was given. +-if test "${enable_dependency_tracking+set}" = set; then ++if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; + fi + +@@ -15936,9 +13820,7 @@ + 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;} +- { (exit 1); exit 1; }; } ++ as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi + fi + +@@ -15992,10 +13874,10 @@ + 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; } +-if test "${ac_cv_prog_STRIP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_STRIP+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +@@ -16005,25 +13887,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + +@@ -16032,10 +13914,10 @@ + 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; } +-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +@@ -16045,25 +13927,25 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; 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:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi + + if test "x$ac_ct_STRIP" = x; then +@@ -16071,12 +13953,8 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ 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 +-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;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + STRIP=$ac_ct_STRIP +@@ -16101,10 +13979,10 @@ + + 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; } +-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 ++$as_echo_n "checking dependency style of $depcc... " >&6; } ++if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up +@@ -16192,8 +14070,8 @@ + 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:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 ++$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } + CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if +@@ -16236,12 +14114,13 @@ + 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:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 ++$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( +- *) $as_unset $ac_var ;; ++ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( ++ *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done +@@ -16249,8 +14128,8 @@ + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) +- # `set' does not quote correctly, so add quotes (double-quote +- # substitution turns \\\\ into \\, and sed turns \\ into \). ++ # `set' does not quote correctly, so add quotes: double-quote ++ # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" +@@ -16273,12 +14152,12 @@ + 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:${as_lineno-$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:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 ++$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi + fi + rm -f confcache +@@ -16294,199 +14173,127 @@ + 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" +- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' ++ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" ++ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' + done + LIBOBJS=$ac_libobjs + + LTLIBOBJS=$ac_ltlibobjs + + ++ + if test -z "${USE_SYSTEM_AUTH_TRUE}" && test -z "${USE_SYSTEM_AUTH_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"USE_SYSTEM_AUTH\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"USE_SYSTEM_AUTH\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"USE_SYSTEM_AUTH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${USE_LDAP_TRUE}" && test -z "${USE_LDAP_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"USE_LDAP\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"USE_LDAP\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"USE_LDAP\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${USE_PRELUDE_LOG_TRUE}" && test -z "${USE_PRELUDE_LOG_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"USE_PRELUDE_LOG\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"USE_PRELUDE_LOG\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"USE_PRELUDE_LOG\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${USE_MYSQL_LOG_TRUE}" && test -z "${USE_MYSQL_LOG_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"USE_MYSQL_LOG\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"USE_MYSQL_LOG\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"USE_MYSQL_LOG\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${USE_MYSQL_AUTH_TRUE}" && test -z "${USE_MYSQL_AUTH_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"USE_MYSQL_AUTH\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"USE_MYSQL_AUTH\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"USE_MYSQL_AUTH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${HAVE_MYSQL_CONFIG_TRUE}" && test -z "${HAVE_MYSQL_CONFIG_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"HAVE_MYSQL_CONFIG\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"HAVE_MYSQL_CONFIG\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"HAVE_MYSQL_CONFIG\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${USE_PGSQL_LOG_TRUE}" && test -z "${USE_PGSQL_LOG_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"USE_PGSQL_LOG\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"USE_PGSQL_LOG\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"USE_PGSQL_LOG\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${USE_PLAINTEXT_AUTH_TRUE}" && test -z "${USE_PLAINTEXT_AUTH_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"USE_PLAINTEXT_AUTH\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"USE_PLAINTEXT_AUTH\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"USE_PLAINTEXT_AUTH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${USE_MARK_GROUP_TRUE}" && test -z "${USE_MARK_GROUP_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"USE_MARK_GROUP\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"USE_MARK_GROUP\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"USE_MARK_GROUP\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${USE_MARK_FIELD_TRUE}" && test -z "${USE_MARK_FIELD_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"USE_MARK_FIELD\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"USE_MARK_FIELD\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"USE_MARK_FIELD\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${USE_MARK_FLAG_TRUE}" && test -z "${USE_MARK_FLAG_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"USE_MARK_FLAG\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"USE_MARK_FLAG\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"USE_MARK_FLAG\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${USE_SYSLOG_LOG_TRUE}" && test -z "${USE_SYSLOG_LOG_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"USE_SYSLOG_LOG\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"USE_SYSLOG_LOG\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"USE_SYSLOG_LOG\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${BUILD_NUFW_TRUE}" && test -z "${BUILD_NUFW_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"BUILD_NUFW\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"BUILD_NUFW\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"BUILD_NUFW\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${BUILD_NUAUTH_TRUE}" && test -z "${BUILD_NUAUTH_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"BUILD_NUAUTH\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"BUILD_NUAUTH\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"BUILD_NUAUTH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${BUILD_NUTCPC_TRUE}" && test -z "${BUILD_NUTCPC_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"BUILD_NUTCPC\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"BUILD_NUTCPC\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"BUILD_NUTCPC\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${BUILD_LIBNUCLIENT_TRUE}" && test -z "${BUILD_LIBNUCLIENT_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"BUILD_LIBNUCLIENT\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"BUILD_LIBNUCLIENT\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"BUILD_LIBNUCLIENT\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${BUILD_PAM_NUFW_TRUE}" && test -z "${BUILD_PAM_NUFW_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"BUILD_PAM_NUFW\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"BUILD_PAM_NUFW\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"BUILD_PAM_NUFW\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${BUILD_NUAUTH_COMMAND_TRUE}" && test -z "${BUILD_NUAUTH_COMMAND_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"BUILD_NUAUTH_COMMAND\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"BUILD_NUAUTH_COMMAND\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"BUILD_NUAUTH_COMMAND\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${HAVE_IPQ_TRUE}" && test -z "${HAVE_IPQ_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"HAVE_IPQ\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"HAVE_IPQ\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"HAVE_IPQ\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${USE_USER_MARK_TRUE}" && test -z "${USE_USER_MARK_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"USE_USER_MARK\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"USE_USER_MARK\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"USE_USER_MARK\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${HAVE_NFQUEUE_ONLY_TRUE}" && test -z "${HAVE_NFQUEUE_ONLY_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"HAVE_NFQUEUE_ONLY\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"HAVE_NFQUEUE_ONLY\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"HAVE_NFQUEUE_ONLY\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${HAVE_NFQUEUE_CONNTRACK_TRUE}" && test -z "${HAVE_NFQUEUE_CONNTRACK_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"HAVE_NFQUEUE_CONNTRACK\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"HAVE_NFQUEUE_CONNTRACK\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"HAVE_NFQUEUE_CONNTRACK\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${HAVE_CONNTRACK_ONLY_TRUE}" && test -z "${HAVE_CONNTRACK_ONLY_FALSE}"; then +- { { echo "$as_me:$LINENO: error: conditional \"HAVE_CONNTRACK_ONLY\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-echo "$as_me: error: conditional \"HAVE_CONNTRACK_ONLY\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"HAVE_CONNTRACK_ONLY\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then +- { { 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. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"AMDEP\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then +- { { 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. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error "conditional \"am__fastdepCC\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + 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:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 ++$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} ++as_write_fail=0 ++cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 + #! $SHELL + # Generated by $as_me. + # Run this file to recreate the current configuration. +@@ -16496,59 +14303,79 @@ + debug=false + ac_cs_recheck=false + ac_cs_silent=false +-SHELL=\${CONFIG_SHELL-$SHELL} +-_ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF +-## --------------------- ## +-## M4sh Initialization. ## +-## --------------------- ## ++SHELL=\${CONFIG_SHELL-$SHELL} ++export SHELL ++_ASEOF ++cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ++## -------------------- ## ++## M4sh Initialization. ## ++## -------------------- ## + + # Be more Bourne compatible + DUALCASE=1; export DUALCASE # for MKS sh +-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: +- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST + else +- case `(set -o) 2>/dev/null` in +- *posix*) set -o posix ;; ++ case `(set -o) 2>/dev/null` in #( ++ *posix*) : ++ set -o posix ;; #( ++ *) : ++ ;; + esac +- + fi + + +- +- +-# PATH needs CR +-# Avoid depending upon Character Ranges. +-as_cr_letters='abcdefghijklmnopqrstuvwxyz' +-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +-as_cr_Letters=$as_cr_letters$as_cr_LETTERS +-as_cr_digits='0123456789' +-as_cr_alnum=$as_cr_Letters$as_cr_digits +- +-# The user is always right. +-if test "${PATH_SEPARATOR+set}" != set; then +- echo "#! /bin/sh" >conf$$.sh +- echo "exit 0" >>conf$$.sh +- chmod +x conf$$.sh +- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then +- PATH_SEPARATOR=';' ++as_nl=' ++' ++export as_nl ++# Printing a long string crashes Solaris 7 /usr/bin/printf. ++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo ++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo ++# Prefer a ksh shell builtin over an external printf program on Solaris, ++# but without wasting forks for bash or zsh. ++if test -z "$BASH_VERSION$ZSH_VERSION" \ ++ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then ++ as_echo='print -r --' ++ as_echo_n='print -rn --' ++elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then ++ as_echo='printf %s\n' ++ as_echo_n='printf %s' ++else ++ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then ++ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' ++ as_echo_n='/usr/ucb/echo -n' + else +- 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 + +-# Support unset when possible. +-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +- as_unset=unset +-else +- as_unset=false ++# 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 + + +@@ -16557,20 +14384,18 @@ + # 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. +-case $0 in ++case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +-done ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++ done + IFS=$as_save_IFS + + ;; +@@ -16581,32 +14406,111 @@ + as_myself=$0 + fi + if test ! -f "$as_myself"; then +- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 +- { (exit 1); exit 1; } ++ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ exit 1 + fi + +-# Work around bugs in pre-3.0 UWIN ksh. +-for as_var in ENV MAIL MAILPATH +-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++# Unset variables that we do not need and which cause bugs (e.g. in ++# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" ++# suppresses any "Segmentation fault" message there. '((' could ++# trigger a bug in pdksh 5.2.14. ++for as_var in BASH_ENV ENV MAIL MAILPATH ++do eval test x\${$as_var+set} = xset \ ++ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : + done + PS1='$ ' + PS2='> ' + PS4='+ ' + +-# NLS nuisances. +-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 ++# NLS nuisances. ++LC_ALL=C ++export LC_ALL ++LANGUAGE=C ++export LANGUAGE ++ ++# CDPATH. ++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH ++ ++ ++# as_fn_error ERROR [LINENO LOG_FD] ++# --------------------------------- ++# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are ++# provided, also output the error to LOG_FD, referencing LINENO. Then exit the ++# script with status $?, using 1 if that was 0. ++as_fn_error () ++{ ++ as_status=$?; test $as_status -eq 0 && as_status=1 ++ if test "$3"; then ++ as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 ++ fi ++ $as_echo "$as_me: error: $1" >&2 ++ as_fn_exit $as_status ++} # as_fn_error ++ ++ ++# as_fn_set_status STATUS ++# ----------------------- ++# Set $? to STATUS, without forking. ++as_fn_set_status () ++{ ++ return $1 ++} # as_fn_set_status ++ ++# as_fn_exit STATUS ++# ----------------- ++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. ++as_fn_exit () ++{ ++ set +e ++ as_fn_set_status $1 ++ exit $1 ++} # as_fn_exit ++ ++# as_fn_unset VAR ++# --------------- ++# Portably unset VAR. ++as_fn_unset () ++{ ++ { eval $1=; unset $1;} ++} ++as_unset=as_fn_unset ++# as_fn_append VAR VALUE ++# ---------------------- ++# Append the text in VALUE to the end of the definition contained in VAR. Take ++# advantage of any shell optimizations that allow amortized linear growth over ++# repeated appends, instead of the typical quadratic growth present in naive ++# implementations. ++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : ++ eval 'as_fn_append () ++ { ++ eval $1+=\$2 ++ }' ++else ++ as_fn_append () ++ { ++ eval $1=\$$1\$2 ++ } ++fi # as_fn_append ++ ++# as_fn_arith ARG... ++# ------------------ ++# Perform arithmetic evaluation on the ARGs, and store the result in the ++# global $as_val. Take advantage of shells that can avoid forks. The arguments ++# must be portable across $(()) and expr. ++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : ++ eval 'as_fn_arith () ++ { ++ as_val=$(( $* )) ++ }' ++else ++ as_fn_arith () ++ { ++ as_val=`expr "$@" || test $? -eq 1` ++ } ++fi # as_fn_arith ++ + +-# Required to use basename. + if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +@@ -16620,13 +14524,17 @@ + as_basename=false + fi + ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname ++else ++ as_dirname=false ++fi + +-# Name of the executable. + as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +-echo X/"$0" | ++$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q +@@ -16641,104 +14549,103 @@ + } + s/.*/./; q'` + +-# CDPATH. +-$as_unset CDPATH +- +- +- +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { +- +- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO +- # uniformly replaced by the line number. The first 'sed' inserts a +- # line-number line after each line using $LINENO; the second 'sed' +- # does the real work. The second script uses 'N' to pair each +- # line-number line with the line containing $LINENO, and appends +- # trailing '-' during substitution so that $LINENO is not a special +- # case at line end. +- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the +- # scripts with optimization help from Paolo Bonzini. Blame Lee +- # E. McMahon (1931-1989) for sed's syntax. :-) +- sed -n ' +- p +- /[$]LINENO/= +- ' <$as_myself | +- sed ' +- s/[$]LINENO.*/&-/ +- t lineno +- b +- :lineno +- N +- :loop +- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ +- t loop +- s/-\n.*// +- ' >$as_me.lineno && +- chmod +x "$as_me.lineno" || +- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 +- { (exit 1); exit 1; }; } +- +- # Don't try to exec as it changes $[0], causing all sort of problems +- # (the dirname of $[0] is not the place where we might find the +- # original and so on. Autoconf is especially sensitive to this). +- . "./$as_me.lineno" +- # Exit status is that of the last command. +- exit +-} +- +- +-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then +- as_dirname=dirname +-else +- as_dirname=false +-fi ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits + + ECHO_C= ECHO_N= ECHO_T= +-case `echo -n x` in ++case `echo -n x` in #((((( + -n*) +- case `echo 'x\c'` in ++ case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. +- *) ECHO_C='\c';; ++ xy) ECHO_C='\c';; ++ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ++ ECHO_T=' ';; + esac;; + *) + ECHO_N='-n';; + esac + +-if expr a : '\(a\)' >/dev/null 2>&1 && +- test "X`expr 00001 : '.*\(...\)'`" = X001; then +- as_expr=expr +-else +- as_expr=false +-fi +- + rm -f conf$$ conf$$.exe conf$$.file + if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file + else + rm -f conf$$.dir +- mkdir conf$$.dir ++ 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 + rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file + rmdir conf$$.dir 2>/dev/null + ++ ++# as_fn_mkdir_p ++# ------------- ++# Create "$as_dir" as a directory, including parents if necessary. ++as_fn_mkdir_p () ++{ ++ ++ case $as_dir in #( ++ -*) as_dir=./$as_dir;; ++ esac ++ test -d "$as_dir" || eval $as_mkdir_p || { ++ as_dirs= ++ while :; do ++ case $as_dir in #( ++ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( ++ *) as_qdir=$as_dir;; ++ esac ++ as_dirs="'$as_qdir' $as_dirs" ++ as_dir=`$as_dirname -- "$as_dir" || ++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$as_dir" : 'X\(//\)[^/]' \| \ ++ X"$as_dir" : 'X\(//\)$' \| \ ++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X"$as_dir" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ test -d "$as_dir" && break ++ done ++ test -z "$as_dirs" || eval "mkdir $as_dirs" ++ } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" ++ ++ ++} # as_fn_mkdir_p + if mkdir -p . 2>/dev/null; then +- as_mkdir_p=: ++ as_mkdir_p='mkdir -p "$as_dir"' + else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +@@ -16755,12 +14662,12 @@ + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then +- test -d "$1/."; ++ test -d "$1/."; + else +- case $1 in +- -*)set "./$1";; ++ case $1 in #( ++ -*)set "./$1";; + esac; +- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +@@ -16775,13 +14682,19 @@ + + + exec 6>&1 ++## ----------------------------------- ## ++## Main body of $CONFIG_STATUS script. ## ++## ----------------------------------- ## ++_ASEOF ++test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +-# Save the log message, to keep $[0] and so on meaningful, and to ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++# Save the log message, to keep $0 and so on meaningful, and to + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" + This file was extended by NuFW $as_me 2.2.21, which was +-generated by GNU Autoconf 2.61. Invocation command line was ++generated by GNU Autoconf 2.64. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS +@@ -16794,7 +14707,16 @@ + + _ACEOF + +-cat >>$CONFIG_STATUS <<_ACEOF ++case $ac_config_files in *" ++"*) set x $ac_config_files; shift; ac_config_files=$*;; ++esac ++ ++case $ac_config_headers in *" ++"*) set x $ac_config_headers; shift; ac_config_headers=$*;; ++esac ++ ++ ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + # Files that config.status was made for. + config_files="$ac_config_files" + config_headers="$ac_config_headers" +@@ -16802,22 +14724,24 @@ + + _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. ++\`$as_me' instantiates files and other configuration actions ++from templates according to the current configuration. Unless the files ++and actions are specified as TAGs, all are instantiated by default. + +-Usage: $0 [OPTIONS] [FILE]... ++Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit +- -q, --quiet do not print progress messages ++ -q, --quiet, --silent ++ do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions +- --file=FILE[:TEMPLATE] +- instantiate the configuration file FILE +- --header=FILE[:TEMPLATE] +- instantiate the configuration header FILE ++ --file=FILE[:TEMPLATE] ++ instantiate the configuration file FILE ++ --header=FILE[:TEMPLATE] ++ instantiate the configuration header FILE + + Configuration files: + $config_files +@@ -16828,16 +14752,16 @@ + Configuration commands: + $config_commands + +-Report bugs to ." ++Report bugs to ." + + _ACEOF +-cat >>$CONFIG_STATUS <<_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_version="\\ + NuFW config.status 2.2.21 +-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.64, ++ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +-Copyright (C) 2006 Free Software Foundation, Inc. ++Copyright (C) 2009 Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." + +@@ -16845,11 +14769,12 @@ + 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 +@@ -16871,34 +14796,38 @@ + -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 ++ as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift +- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ++ case $ac_optarg in ++ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ esac ++ as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header +- { echo "$as_me: error: ambiguous option: $1 +-Try \`$0 --help' for more information." >&2 +- { (exit 1); exit 1; }; };; ++ as_fn_error "ambiguous option: \`$1' ++Try \`$0 --help' for more information.";; + --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 +-Try \`$0 --help' for more information." >&2 +- { (exit 1); exit 1; }; } ;; ++ -*) as_fn_error "unrecognized option: \`$1' ++Try \`$0 --help' for more information." ;; + +- *) ac_config_targets="$ac_config_targets $1" ++ *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac +@@ -16913,27 +14842,29 @@ + 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 + # +@@ -16974,6 +14905,7 @@ + lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' + reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' ++OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' + AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' +@@ -17079,6 +15011,7 @@ + lt_SP2NL \ + lt_NL2SP \ + reload_flag \ ++OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ + AR \ +@@ -17194,7 +15127,7 @@ + + _ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + + # Handling of arguments. + for ac_config_target in $ac_config_targets +@@ -17245,9 +15178,7 @@ + "tests/pki/Makefile") CONFIG_FILES="$CONFIG_FILES tests/pki/Makefile" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + +- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +-echo "$as_me: error: invalid argument: $ac_config_target" >&2;} +- { (exit 1); exit 1; }; };; ++ *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac + done + +@@ -17274,7 +15205,7 @@ + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + ' 0 +- trap '{ (exit 1); exit 1; }' 1 2 13 15 ++ trap 'as_fn_exit 1' 1 2 13 15 + } + # Create a (secure) tmp directory for tmp files. + +@@ -17285,272 +15216,139 @@ + { + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +-} || +-{ +- echo "$me: cannot create a temporary directory in ." >&2 +- { (exit 1); exit 1; } +-} +- +-# +-# Set up the sed scripts for CONFIG_FILES section. +-# ++} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 + +-# 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 +-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 +-LIBTOOL!$LIBTOOL$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 +-FGREP!$FGREP$ac_delim +-LD!$LD$ac_delim +-DUMPBIN!$DUMPBIN$ac_delim +-ac_ct_DUMPBIN!$ac_ct_DUMPBIN$ac_delim +-NM!$NM$ac_delim +-LN_S!$LN_S$ac_delim +-AR!$AR$ac_delim +-STRIP!$STRIP$ac_delim +-RANLIB!$RANLIB$ac_delim +-lt_ECHO!$lt_ECHO$ac_delim +-DSYMUTIL!$DSYMUTIL$ac_delim +-NMEDIT!$NMEDIT$ac_delim +-LIPO!$LIPO$ac_delim +-OTOOL!$OTOOL$ac_delim +-OTOOL64!$OTOOL64$ac_delim +-CPP!$CPP$ac_delim +-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +-INSTALL_DATA!$INSTALL_DATA$ac_delim +-DOCBOOK2MAN!$DOCBOOK2MAN$ac_delim +-DOCBOOK2PDF!$DOCBOOK2PDF$ac_delim +-LIBOBJS!$LIBOBJS$ac_delim +-LIBGCRYPT_CONFIG!$LIBGCRYPT_CONFIG$ac_delim +-LIBGCRYPT_CFLAGS!$LIBGCRYPT_CFLAGS$ac_delim +-LIBGCRYPT_LIBS!$LIBGCRYPT_LIBS$ac_delim +-LIBGNUTLS_CONFIG!$LIBGNUTLS_CONFIG$ac_delim +-LIBGNUTLS_CFLAGS!$LIBGNUTLS_CFLAGS$ac_delim +-LIBGNUTLS_LIBS!$LIBGNUTLS_LIBS$ac_delim +-PYTHON!$PYTHON$ac_delim +-PKG_CONFIG!$PKG_CONFIG$ac_delim +-GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim +-GLIB_LIBS!$GLIB_LIBS$ac_delim +-GLIB_GENMARSHAL!$GLIB_GENMARSHAL$ac_delim +-GOBJECT_QUERY!$GOBJECT_QUERY$ac_delim +-GLIB_MKENUMS!$GLIB_MKENUMS$ac_delim +-USE_SYSTEM_AUTH_TRUE!$USE_SYSTEM_AUTH_TRUE$ac_delim +-USE_SYSTEM_AUTH_FALSE!$USE_SYSTEM_AUTH_FALSE$ac_delim +-USE_LDAP_TRUE!$USE_LDAP_TRUE$ac_delim +-USE_LDAP_FALSE!$USE_LDAP_FALSE$ac_delim +-USE_PRELUDE_LOG_TRUE!$USE_PRELUDE_LOG_TRUE$ac_delim +-USE_PRELUDE_LOG_FALSE!$USE_PRELUDE_LOG_FALSE$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=`echo X | tr X '\015'` ++# On cygwin, bash can eat \r inside `` if the user requested igncr. ++# But we know of no other shell where ac_cr would be empty at this ++# point, so we can use a bashism as a fallback. ++if test "x$ac_cr" = x; then ++ eval ac_cr=\$\'\\r\' ++fi ++ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` ++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_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ++ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + ac_delim='%!_!# ' + for ac_last_try in false false false false false :; do +- cat >conf$$subs.sed <<_ACEOF +-USE_MYSQL_LOG_TRUE!$USE_MYSQL_LOG_TRUE$ac_delim +-USE_MYSQL_LOG_FALSE!$USE_MYSQL_LOG_FALSE$ac_delim +-USE_MYSQL_AUTH_TRUE!$USE_MYSQL_AUTH_TRUE$ac_delim +-USE_MYSQL_AUTH_FALSE!$USE_MYSQL_AUTH_FALSE$ac_delim +-HAVE_MYSQL_CONFIG_TRUE!$HAVE_MYSQL_CONFIG_TRUE$ac_delim +-HAVE_MYSQL_CONFIG_FALSE!$HAVE_MYSQL_CONFIG_FALSE$ac_delim +-USE_PGSQL_LOG_TRUE!$USE_PGSQL_LOG_TRUE$ac_delim +-USE_PGSQL_LOG_FALSE!$USE_PGSQL_LOG_FALSE$ac_delim +-USE_PLAINTEXT_AUTH_TRUE!$USE_PLAINTEXT_AUTH_TRUE$ac_delim +-USE_PLAINTEXT_AUTH_FALSE!$USE_PLAINTEXT_AUTH_FALSE$ac_delim +-USE_MARK_GROUP_TRUE!$USE_MARK_GROUP_TRUE$ac_delim +-USE_MARK_GROUP_FALSE!$USE_MARK_GROUP_FALSE$ac_delim +-USE_MARK_FIELD_TRUE!$USE_MARK_FIELD_TRUE$ac_delim +-USE_MARK_FIELD_FALSE!$USE_MARK_FIELD_FALSE$ac_delim +-USE_MARK_FLAG_TRUE!$USE_MARK_FLAG_TRUE$ac_delim +-USE_MARK_FLAG_FALSE!$USE_MARK_FLAG_FALSE$ac_delim +-USE_SYSLOG_LOG_TRUE!$USE_SYSLOG_LOG_TRUE$ac_delim +-USE_SYSLOG_LOG_FALSE!$USE_SYSLOG_LOG_FALSE$ac_delim +-BUILD_NUFW_TRUE!$BUILD_NUFW_TRUE$ac_delim +-BUILD_NUFW_FALSE!$BUILD_NUFW_FALSE$ac_delim +-BUILD_NUAUTH_TRUE!$BUILD_NUAUTH_TRUE$ac_delim +-BUILD_NUAUTH_FALSE!$BUILD_NUAUTH_FALSE$ac_delim +-BUILD_NUTCPC_TRUE!$BUILD_NUTCPC_TRUE$ac_delim +-BUILD_NUTCPC_FALSE!$BUILD_NUTCPC_FALSE$ac_delim +-BUILD_LIBNUCLIENT_TRUE!$BUILD_LIBNUCLIENT_TRUE$ac_delim +-BUILD_LIBNUCLIENT_FALSE!$BUILD_LIBNUCLIENT_FALSE$ac_delim +-BUILD_PAM_NUFW_TRUE!$BUILD_PAM_NUFW_TRUE$ac_delim +-BUILD_PAM_NUFW_FALSE!$BUILD_PAM_NUFW_FALSE$ac_delim +-BUILD_NUAUTH_COMMAND_TRUE!$BUILD_NUAUTH_COMMAND_TRUE$ac_delim +-BUILD_NUAUTH_COMMAND_FALSE!$BUILD_NUAUTH_COMMAND_FALSE$ac_delim +-HAVE_IPQ_TRUE!$HAVE_IPQ_TRUE$ac_delim +-HAVE_IPQ_FALSE!$HAVE_IPQ_FALSE$ac_delim +-USE_USER_MARK_TRUE!$USE_USER_MARK_TRUE$ac_delim +-USE_USER_MARK_FALSE!$USE_USER_MARK_FALSE$ac_delim +-HAVE_NFQUEUE_ONLY_TRUE!$HAVE_NFQUEUE_ONLY_TRUE$ac_delim +-HAVE_NFQUEUE_ONLY_FALSE!$HAVE_NFQUEUE_ONLY_FALSE$ac_delim +-HAVE_NFQUEUE_CONNTRACK_TRUE!$HAVE_NFQUEUE_CONNTRACK_TRUE$ac_delim +-HAVE_NFQUEUE_CONNTRACK_FALSE!$HAVE_NFQUEUE_CONNTRACK_FALSE$ac_delim +-HAVE_CONNTRACK_ONLY_TRUE!$HAVE_CONNTRACK_ONLY_TRUE$ac_delim +-HAVE_CONNTRACK_ONLY_FALSE!$HAVE_CONNTRACK_ONLY_FALSE$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 +-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 +-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 +-LTLIBOBJS!$LTLIBOBJS$ac_delim +-_ACEOF ++ . ./conf$$subs.sh || ++ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + +- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 68; then ++ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` ++ if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then +- { { 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; }; } ++ as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi + done ++rm -f conf$$subs.sh + +-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 +-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +-_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 ++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 = "" ++ ++} ++{ ++ line = $ 0 ++ nfields = split(line, field, "@") ++ substed = 0 ++ len = length(field[1]) ++ for (i = 2; i < nfields; i++) { ++ key = field[i] ++ keylen = length(key) ++ if (S_is_set[key]) { ++ value = S[key] ++ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) ++ len += length(value) + length(field[++i]) ++ substed = 1 ++ } else ++ len += 1 + keylen ++ } ++ ++ print line ++} + ++_ACAWK ++_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then ++ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" ++else ++ cat ++fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ ++ || as_fn_error "could not setup config files machinery" "$LINENO" 5 ++_ACEOF + + # VPATH may cause trouble with some makes, so we remove $(srcdir), + # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +@@ -17567,20 +15365,128 @@ + }' + fi + +-cat >>$CONFIG_STATUS <<\_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + fi # test -n "$CONFIG_FILES" + ++# Set up the scripts for CONFIG_HEADERS section. ++# No need to generate them if there are no CONFIG_HEADERS. ++# This happens for instance with `./config.status Makefile'. ++if test -n "$CONFIG_HEADERS"; then ++cat >"$tmp/defines.awk" <<\_ACAWK || ++BEGIN { ++_ACEOF ++ ++# Transform confdefs.h into an awk script `defines.awk', embedded as ++# here-document in config.status, that substitutes the proper values into ++# config.h.in to produce config.h. ++ ++# Create a delimiter string that does not exist in confdefs.h, to ease ++# handling of long lines. ++ac_delim='%!_!# ' ++for ac_last_try in false false :; do ++ ac_t=`sed -n "/$ac_delim/p" confdefs.h` ++ if test -z "$ac_t"; then ++ break ++ elif $ac_last_try; then ++ as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 ++ else ++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! " ++ fi ++done ++ ++# For the awk script, D is an array of macro values keyed by name, ++# likewise P contains macro parameters if any. Preserve backslash ++# newline sequences. ++ ++ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* ++sed -n ' ++s/.\{148\}/&'"$ac_delim"'/g ++t rset ++:rset ++s/^[ ]*#[ ]*define[ ][ ]*/ / ++t def ++d ++:def ++s/\\$// ++t bsnl ++s/["\\]/\\&/g ++s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ ++D["\1"]=" \3"/p ++s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p ++d ++:bsnl ++s/["\\]/\\&/g ++s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ ++D["\1"]=" \3\\\\\\n"\\/p ++t cont ++s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p ++t cont ++d ++:cont ++n ++s/.\{148\}/&'"$ac_delim"'/g ++t clear ++:clear ++s/\\$// ++t bsnlc ++s/["\\]/\\&/g; s/^/"/; s/$/"/p ++d ++:bsnlc ++s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p ++b cont ++' >$CONFIG_STATUS || ac_write_fail=1 ++ ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++ for (key in D) D_is_set[key] = 1 ++ FS = "" ++} ++/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { ++ line = \$ 0 ++ split(line, arg, " ") ++ if (arg[1] == "#") { ++ defundef = arg[2] ++ mac1 = arg[3] ++ } else { ++ defundef = substr(arg[1], 2) ++ mac1 = arg[2] ++ } ++ split(mac1, mac2, "(") #) ++ macro = mac2[1] ++ prefix = substr(line, 1, index(line, defundef) - 1) ++ if (D_is_set[macro]) { ++ # Preserve the white space surrounding the "#". ++ print prefix "define", macro P[macro] D[macro] ++ next ++ } else { ++ # Replace #undef with comments. This is necessary, for example, ++ # in the case of _POSIX_SOURCE, which is predefined and required ++ # on some systems where configure will not decide to define it. ++ if (defundef == "undef") { ++ print "/*", prefix defundef, macro, "*/" ++ next ++ } ++ } ++} ++{ print } ++_ACAWK ++_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++ as_fn_error "could not setup config headers machinery" "$LINENO" 5 ++fi # test -n "$CONFIG_HEADERS" ++ + +-for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS ++eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" ++shift ++for ac_tag + do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; +- :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +-echo "$as_me: error: Invalid tag $ac_tag." >&2;} +- { (exit 1); exit 1; }; };; ++ :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac +@@ -17608,26 +15514,34 @@ + [\\/$]*) 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;} +- { (exit 1); exit 1; }; };; ++ as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac +- ac_file_inputs="$ac_file_inputs $ac_f" ++ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ++ as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ +- configure_input="Generated from "`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:${as_lineno-$LINENO}: creating $ac_file" >&5 ++$as_echo "$as_me: creating $ac_file" >&6;} + fi ++ # Neutralize special characters interpreted by sed in replacement strings. ++ case $configure_input in #( ++ *\&* | *\|* | *\\* ) ++ ac_sed_conf_input=`$as_echo "$configure_input" | ++ sed 's/[\\\\&|]/\\\\&/g'`;; #( ++ *) ac_sed_conf_input=$configure_input;; ++ esac + + case $ac_tag in +- *:-:* | *:-) cat >"$tmp/stdin";; ++ *:-:* | *:-) cat >"$tmp/stdin" \ ++ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac +@@ -17637,42 +15551,7 @@ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$ac_file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ +- s//\1/ +- q +- } +- /^X\(\/\/\)[^/].*/{ +- s//\1/ +- q +- } +- /^X\(\/\/\)$/{ +- s//\1/ +- q +- } +- /^X\(\/\).*/{ +- s//\1/ +- q +- } +- s/.*/./; q'` +- { as_dir="$ac_dir" +- case $as_dir in #( +- -*) as_dir=./$as_dir;; +- esac +- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { +- as_dirs= +- while :; do +- case $as_dir in #( +- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( +- *) as_qdir=$as_dir;; +- esac +- as_dirs="'$as_qdir' $as_dirs" +- as_dir=`$as_dirname -- "$as_dir" || +-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$as_dir" : 'X\(//\)[^/]' \| \ +- X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$as_dir" | ++$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q +@@ -17690,20 +15569,15 @@ + q + } + s/.*/./; q'` +- 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;} +- { (exit 1); exit 1; }; }; } ++ as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + + case "$ac_dir" in + .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) +- ac_dir_suffix=/`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/ ;; +@@ -17748,12 +15622,12 @@ + 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 + } +@@ -17761,36 +15635,37 @@ + /@docdir@/p + /@infodir@/p + /@localedir@/p +-/@mandir@/p +-' $ac_file_inputs` in ++/@mandir@/p' ++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:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 ++$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + _ACEOF +-cat >>$CONFIG_STATUS <<_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g +- s&\\\${datarootdir}&$datarootdir&g' ;; ++ s&\\\${datarootdir}&$datarootdir&g' ;; + esac + _ACEOF + + # Neutralize VPATH when `$srcdir' = `.'. + # Shell code in configure.ac might set extrasub. + # FIXME: do we really want to maintain this feature? +-cat >>$CONFIG_STATUS <<_ACEOF +- 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 +@@ -17801,121 +15676,50 @@ + 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_fn_error "could not create $ac_file" "$LINENO" 5 + + test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && +- { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + which seems to be undefined. Please make sure it is defined." >&5 +-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_fn_error "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # +-_ACEOF +- +-# Transform confdefs.h into a sed script `conftest.defines', that +-# substitutes the proper values into config.h.in to produce config.h. +-rm -f conftest.defines conftest.tail +-# First, append a space to every undef/define line, to ease matching. +-echo 's/$/ /' >conftest.defines +-# Then, protect against being on the right side of a sed subst, or in +-# an unquoted here document, in config.status. If some macros were +-# called several times there might be several #defines for the same +-# symbol, which is useless. But do not sort them, since the last +-# AC_DEFINE must be honored. +-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +-# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +-# NAME is the cpp macro being defined, VALUE is the value it is being given. +-# PARAMS is the parameter list in the macro definition--in most cases, it's +-# just an empty string. +-ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +-ac_dB='\\)[ (].*,\\1define\\2' +-ac_dC=' ' +-ac_dD=' ,' +- +-uniq confdefs.h | +- sed -n ' +- t rset +- :rset +- s/^[ ]*#[ ]*define[ ][ ]*// +- t ok +- d +- :ok +- s/[\\&,]/\\&/g +- s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p +- s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p +- ' >>conftest.defines +- +-# Remove the space that was appended to ease matching. +-# Then replace #undef with comments. This is necessary, for +-# example, in the case of _POSIX_SOURCE, which is predefined and required +-# on some systems where configure will not decide to define it. +-# (The regexp can be short, since the line contains either #define or #undef.) +-echo 's/ $// +-s,^[ #]*u.*,/* & */,' >>conftest.defines +- +-# Break up conftest.defines: +-ac_max_sed_lines=50 +- +-# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +-# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +-# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +-# et cetera. +-ac_in='$ac_file_inputs' +-ac_out='"$tmp/out1"' +-ac_nxt='"$tmp/out2"' +- +-while : +-do +- # Write a here document: +- cat >>$CONFIG_STATUS <<_ACEOF +- # First, check the format of the line: +- cat >"\$tmp/defines.sed" <<\\CEOF +-/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +-/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +-b +-:def +-_ACEOF +- sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS +- echo 'CEOF +- sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS +- ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in +- sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail +- grep . conftest.tail >/dev/null || break +- rm -f conftest.defines +- mv conftest.tail conftest.defines +-done +-rm -f conftest.defines conftest.tail +- +-echo "ac_result=$ac_in" >>$CONFIG_STATUS +-cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then +- echo "/* $configure_input */" >"$tmp/config.h" +- cat "$ac_result" >>"$tmp/config.h" +- if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then +- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +-echo "$as_me: $ac_file is unchanged" >&6;} ++ { ++ $as_echo "/* $configure_input */" \ ++ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" ++ } >"$tmp/config.h" \ ++ || as_fn_error "could not create $ac_file" "$LINENO" 5 ++ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 ++$as_echo "$as_me: $ac_file is unchanged" >&6;} + else +- rm -f $ac_file +- mv "$tmp/config.h" $ac_file ++ rm -f "$ac_file" ++ mv "$tmp/config.h" "$ac_file" \ ++ || as_fn_error "could not create $ac_file" "$LINENO" 5 + fi + else +- echo "/* $configure_input */" +- cat "$ac_result" ++ $as_echo "/* $configure_input */" \ ++ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ ++ || as_fn_error "could not create -" "$LINENO" 5 + fi +- rm -f "$tmp/out12" +-# Compute $ac_file's index in $config_headers. +-_am_arg=$ac_file ++# Compute "$ac_file"'s index in $config_headers. ++_am_arg="$ac_file" + _am_stamp_count=1 + for _am_header in $config_headers :; do + case $_am_header in +@@ -17930,7 +15734,7 @@ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$_am_arg" | ++$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q +@@ -17950,8 +15754,8 @@ + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + +- :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +-echo "$as_me: executing $ac_file commands" >&6;} ++ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 ++$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + +@@ -18079,6 +15883,9 @@ + reload_flag=$lt_reload_flag + reload_cmds=$lt_reload_cmds + ++# An object symbol dumper. ++OBJDUMP=$lt_OBJDUMP ++ + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +@@ -18589,7 +16396,16 @@ + chmod +x "$ofile" + + ;; +- "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do ++ "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files ++# are listed without --file. Let's play safe and only enable the eval ++# if we detect the quoting. ++case $CONFIG_FILES in ++*\'*) eval set x "$CONFIG_FILES" ;; ++*) set x $CONFIG_FILES ;; ++esac ++shift ++for mf ++do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. +@@ -18605,7 +16421,7 @@ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$mf" | ++$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q +@@ -18649,42 +16465,7 @@ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ +- s//\1/ +- q +- } +- /^X\(\/\/\)[^/].*/{ +- s//\1/ +- q +- } +- /^X\(\/\/\)$/{ +- s//\1/ +- q +- } +- /^X\(\/\).*/{ +- s//\1/ +- q +- } +- s/.*/./; q'` +- { as_dir=$dirpart/$fdir +- case $as_dir in #( +- -*) as_dir=./$as_dir;; +- esac +- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { +- as_dirs= +- while :; do +- case $as_dir in #( +- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( +- *) as_qdir=$as_dir;; +- esac +- as_dirs="'$as_qdir' $as_dirs" +- as_dir=`$as_dirname -- "$as_dir" || +-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$as_dir" : 'X\(//\)[^/]' \| \ +- X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +-echo X"$as_dir" | ++$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q +@@ -18702,12 +16483,7 @@ + q + } + s/.*/./; q'` +- 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;} +- { (exit 1); exit 1; }; }; } ++ as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +@@ -18718,11 +16494,13 @@ + done # for ac_tag + + +-{ (exit 0); exit 0; } ++as_fn_exit 0 + _ACEOF +-chmod +x $CONFIG_STATUS + ac_clean_files=$ac_clean_files_save + ++test $ac_write_fail = 0 || ++ as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 ++ + + # configure is writing to config.log, and then calls config.status. + # config.status does its own redirection, appending to config.log. +@@ -18742,129 +16520,133 @@ + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. +- $ac_cs_success || { (exit 1); exit 1; } ++ $ac_cs_success || as_fn_exit $? ++fi ++if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 ++$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + fi + +-{ echo "$as_me:$LINENO: result: ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: + + Configuration complete + " >&5 +-echo "${ECHO_T} ++$as_echo " + + Configuration complete + " >&6; } + + if test "$debug"; then +- { echo "$as_me:$LINENO: result: * Compiling with developement DEBUG support" >&5 +-echo "${ECHO_T}* Compiling with developement DEBUG support" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: * Compiling with developement DEBUG support" >&5 ++$as_echo "* Compiling with developement DEBUG support" >&6; } + fi + + if test "${build_nuauth}" = "yes"; then +- { echo "$as_me:$LINENO: result: * Compiling NuAuth" >&5 +-echo "${ECHO_T}* Compiling NuAuth" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: * Compiling NuAuth" >&5 ++$as_echo "* Compiling NuAuth" >&6; } + if test "$enable_system_auth" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuAuth: compile auth module system" >&5 +-echo "${ECHO_T} - NuAuth: compile auth module system" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuAuth: compile auth module system" >&5 ++$as_echo " - NuAuth: compile auth module system" >&6; } + fi + + if test "${ldap}" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuAuth: compile module ldap" >&5 +-echo "${ECHO_T} - NuAuth: compile module ldap" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuAuth: compile module ldap" >&5 ++$as_echo " - NuAuth: compile module ldap" >&6; } + fi + + if test "${enable_prelude_log}" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuAuth: compile log module prelude" >&5 +-echo "${ECHO_T} - NuAuth: compile log module prelude" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuAuth: compile log module prelude" >&5 ++$as_echo " - NuAuth: compile log module prelude" >&6; } + fi + + if test "${enable_mysql_log}" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuAuth: compile log module mysql" >&5 +-echo "${ECHO_T} - NuAuth: compile log module mysql" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuAuth: compile log module mysql" >&5 ++$as_echo " - NuAuth: compile log module mysql" >&6; } + fi + + if test "${enable_mysql_auth}" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuAuth: compile authentication module mysql" >&5 +-echo "${ECHO_T} - NuAuth: compile authentication module mysql" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuAuth: compile authentication module mysql" >&5 ++$as_echo " - NuAuth: compile authentication module mysql" >&6; } + fi + + if test "${enable_pgsql_log}" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuAuth: compile log module pgsql" >&5 +-echo "${ECHO_T} - NuAuth: compile log module pgsql" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuAuth: compile log module pgsql" >&5 ++$as_echo " - NuAuth: compile log module pgsql" >&6; } + fi + + if test "${enable_syslog_log}" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuAuth: compile syslog log module" >&5 +-echo "${ECHO_T} - NuAuth: compile syslog log module" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuAuth: compile syslog log module" >&5 ++$as_echo " - NuAuth: compile syslog log module" >&6; } + fi + + if test "${enable_plaintext_auth}" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuAuth: compile plaintext auth module" >&5 +-echo "${ECHO_T} - NuAuth: compile plaintext auth module" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuAuth: compile plaintext auth module" >&5 ++$as_echo " - NuAuth: compile plaintext auth module" >&6; } + fi + + if test "${enable_mark_group}" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuAuth: compile mark group module" >&5 +-echo "${ECHO_T} - NuAuth: compile mark group module" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuAuth: compile mark group module" >&5 ++$as_echo " - NuAuth: compile mark group module" >&6; } + fi + + if test "${enable_mark_field}" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuAuth: compile mark field module" >&5 +-echo "${ECHO_T} - NuAuth: compile mark field module" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuAuth: compile mark field module" >&5 ++$as_echo " - NuAuth: compile mark field module" >&6; } + fi + + if test "${enable_mark_flag}" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuAuth: compile mark flag module" >&5 +-echo "${ECHO_T} - NuAuth: compile mark flag module" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuAuth: compile mark flag module" >&5 ++$as_echo " - NuAuth: compile mark flag module" >&6; } + fi + fi + + if test "${build_nufw}" = "yes"; then +- { echo "$as_me:$LINENO: result: * Compiling NuFW" >&5 +-echo "${ECHO_T}* Compiling NuFW" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: * Compiling NuFW" >&5 ++$as_echo "* Compiling NuFW" >&6; } + if test "${have_conntrack}" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuFW: libnetfilter_conntrack support" >&5 +-echo "${ECHO_T} - NuFW: libnetfilter_conntrack support" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuFW: libnetfilter_conntrack support" >&5 ++$as_echo " - NuFW: libnetfilter_conntrack support" >&6; } + fi + if test "${have_nfqueue}" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuFW: libnetfilter_queue support" >&5 +-echo "${ECHO_T} - NuFW: libnetfilter_queue support" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuFW: libnetfilter_queue support" >&5 ++$as_echo " - NuFW: libnetfilter_queue support" >&6; } + else + if test "${have_ipq}" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuFW: libipq support" >&5 +-echo "${ECHO_T} - NuFW: libipq support" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuFW: libipq support" >&5 ++$as_echo " - NuFW: libipq support" >&6; } + if test "$enable_user_mark" = "yes"; then +- { echo "$as_me:$LINENO: result: - NuFW: User mark support" >&5 +-echo "${ECHO_T} - NuFW: User mark support" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: - NuFW: User mark support" >&5 ++$as_echo " - NuFW: User mark support" >&6; } + fi + fi + fi + else + if test "${use_nfconntrack}" = "yes"; then +- { echo "$as_me:$LINENO: result: !!! WARNING !!! NuFW daemon WON'T be compiled: libnetfilter_queue not present" >&5 +-echo "${ECHO_T}!!! WARNING !!! NuFW daemon WON'T be compiled: libnetfilter_queue not present" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: !!! WARNING !!! NuFW daemon WON'T be compiled: libnetfilter_queue not present" >&5 ++$as_echo "!!! WARNING !!! NuFW daemon WON'T be compiled: libnetfilter_queue not present" >&6; } + else +- { echo "$as_me:$LINENO: result: !!! WARNING !!! NuFW daemon WON'T be compiled: libipq not present" >&5 +-echo "${ECHO_T}!!! WARNING !!! NuFW daemon WON'T be compiled: libipq not present" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: !!! WARNING !!! NuFW daemon WON'T be compiled: libipq not present" >&5 ++$as_echo "!!! WARNING !!! NuFW daemon WON'T be compiled: libipq not present" >&6; } + fi + fi + + if test "${build_libnuclient}" = "yes"; then +- { echo "$as_me:$LINENO: result: * Compiling libnuclient" >&5 +-echo "${ECHO_T}* Compiling libnuclient" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: * Compiling libnuclient" >&5 ++$as_echo "* Compiling libnuclient" >&6; } + fi + + if test "${build_nutcpc}" = "yes"; then +- { echo "$as_me:$LINENO: result: * Compiling nutcpc" >&5 +-echo "${ECHO_T}* Compiling nutcpc" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: * Compiling nutcpc" >&5 ++$as_echo "* Compiling nutcpc" >&6; } + fi + + if test "${build_pam_nufw}" = "yes"; then +- { echo "$as_me:$LINENO: result: * Compiling pam_nufw" >&5 +-echo "${ECHO_T}* Compiling pam_nufw" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: * Compiling pam_nufw" >&5 ++$as_echo "* Compiling pam_nufw" >&6; } + fi + +-{ echo "$as_me:$LINENO: result: ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: + Now type 'make' and then 'sudo make install'" >&5 +-echo "${ECHO_T} ++$as_echo " + Now type 'make' and then 'sudo make install'" >&6; } + +--- nufw-2.2.21.orig/src/Makefile.in ++++ nufw-2.2.21/src/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -84,6 +84,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -96,9 +98,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -109,6 +108,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -117,6 +117,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -176,6 +177,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + EXTRA_DIST = doxygen.cfg doxygen.sh +@@ -188,8 +190,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -295,7 +297,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nufw/Makefile.in ++++ nufw-2.2.21/src/nufw/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -111,6 +111,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -123,9 +125,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -136,6 +135,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -144,6 +144,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -203,6 +204,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @BUILD_NUFW_TRUE@AM_CPPFLAGS = -DLOCAL_STATE_DIR=\"$(localstatedir)\" -DCONFIG_DIR=\"$(sysconfdir)\" -I$(top_srcdir)/src/include/ +@@ -226,8 +228,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -348,7 +350,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/include/config.h ++++ nufw-2.2.21/src/include/config.h +@@ -1,6 +1,9 @@ + /* src/include/config.h. Generated from config.h.in by configure. */ + /* src/include/config.h.in. Generated from configure.ac by autoheader. */ + ++/* Define if building universal (internal helper macro) */ ++/* #undef AC_APPLE_UNIVERSAL_BUILD */ ++ + /* Build nuauth_command */ + #define BUILD_NUAUTH_COMMAND 1 + +@@ -44,19 +47,19 @@ + #define HAVE_LIBPTHREAD 1 + + /* ldap lib flag */ +-/* #undef HAVE_LIBRARY_LDAP */ ++#define HAVE_LIBRARY_LDAP 1 + + /* mysql lib flag */ +-/* #undef HAVE_LIBRARY_MYSQLCLIENT */ ++#define HAVE_LIBRARY_MYSQLCLIENT 1 + + /* pam lib flag */ + #define HAVE_LIBRARY_PAM 1 + + /* pgsql lib flag */ +-/* #undef HAVE_LIBRARY_PQ */ ++#define HAVE_LIBRARY_PQ 1 + + /* prelude library flag */ +-/* #undef HAVE_LIBRARY_PRELUDE */ ++#define HAVE_LIBRARY_PRELUDE 1 + + /* SASL lib flag */ + #define HAVE_LIBRARY_SASL2 1 +@@ -72,7 +75,7 @@ + #define HAVE_MEMSET 1 + + /* Will compile mysql log module with ssl support */ +-/* #undef HAVE_MYSQL_SSL */ ++#define HAVE_MYSQL_SSL 1 + + /* Define to 1 if you have the header file. */ + #define HAVE_NETDB_H 1 +@@ -84,7 +87,7 @@ + #define HAVE_NEW_NFCT_API 1 + + /* Found iface resolution in nfnetlink and libnetfilter_queue */ +-/* #undef HAVE_NFQ_INDEV_NAME */ ++#define HAVE_NFQ_INDEV_NAME 1 + + /* Found queue max length support in netfilter_queue */ + #define HAVE_NFQ_SET_QUEUE_MAXLEN 1 +@@ -155,6 +158,9 @@ + /* Define to the one symbol short name of this package. */ + #define PACKAGE_TARNAME "nufw" + ++/* Define to the home page for this package. */ ++#define PACKAGE_URL "" ++ + /* Define to the version of this package. */ + #define PACKAGE_VERSION "2.2.21" + +@@ -168,14 +174,22 @@ + #define USE_NFQUEUE 1 + + /* Will use UTF8 exchange */ +-/* #undef USE_UTF8 */ ++#define USE_UTF8 1 + + /* Version number of package */ + #define VERSION "2.2.21" + +-/* Define to 1 if your processor stores words with the most significant byte +- first (like Motorola and SPARC, unlike Intel and VAX). */ +-/* #undef WORDS_BIGENDIAN */ ++/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most ++ significant byte first (like Motorola and SPARC, unlike Intel). */ ++#if defined AC_APPLE_UNIVERSAL_BUILD ++# if defined __BIG_ENDIAN__ ++# define WORDS_BIGENDIAN 1 ++# endif ++#else ++# ifndef WORDS_BIGENDIAN ++/* # undef WORDS_BIGENDIAN */ ++# endif ++#endif + + /* Define to __FUNCTION__ or "" if '__func__' does not conform to ANSI C. */ + #define __PRELUDE_FUNC__ __func__ +--- nufw-2.2.21.orig/src/include/Makefile.in ++++ nufw-2.2.21/src/include/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -95,6 +95,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -107,9 +109,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -120,6 +119,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -128,6 +128,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -187,6 +188,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + noinst_LTLIBRARIES = libnufw.la +@@ -205,8 +207,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -300,7 +302,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/include/config.h.in ++++ nufw-2.2.21/src/include/config.h.in +@@ -1,5 +1,8 @@ + /* src/include/config.h.in. Generated from configure.ac by autoheader. */ + ++/* Define if building universal (internal helper macro) */ ++#undef AC_APPLE_UNIVERSAL_BUILD ++ + /* Build nuauth_command */ + #undef BUILD_NUAUTH_COMMAND + +@@ -154,6 +157,9 @@ + /* Define to the one symbol short name of this package. */ + #undef PACKAGE_TARNAME + ++/* Define to the home page for this package. */ ++#undef PACKAGE_URL ++ + /* Define to the version of this package. */ + #undef PACKAGE_VERSION + +@@ -172,9 +178,17 @@ + /* Version number of package */ + #undef VERSION + +-/* Define to 1 if your processor stores words with the most significant byte +- first (like Motorola and SPARC, unlike Intel and VAX). */ +-#undef WORDS_BIGENDIAN ++/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most ++ significant byte first (like Motorola and SPARC, unlike Intel). */ ++#if defined AC_APPLE_UNIVERSAL_BUILD ++# if defined __BIG_ENDIAN__ ++# define WORDS_BIGENDIAN 1 ++# endif ++#else ++# ifndef WORDS_BIGENDIAN ++# undef WORDS_BIGENDIAN ++# endif ++#endif + + /* Define to __FUNCTION__ or "" if '__func__' does not conform to ANSI C. */ + #undef __PRELUDE_FUNC__ +--- nufw-2.2.21.orig/src/clients/Makefile.in ++++ nufw-2.2.21/src/clients/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -84,6 +84,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -96,9 +98,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -109,6 +108,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -117,6 +117,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -176,6 +177,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + SUBDIRS = lib nutcpc pam_nufw +@@ -186,8 +188,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -293,7 +295,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/clients/nutcpc/Makefile.in ++++ nufw-2.2.21/src/clients/nutcpc/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -98,6 +98,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -110,9 +112,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -123,6 +122,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -131,6 +131,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -190,6 +191,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @BUILD_NUTCPC_TRUE@EXTRA_DIST = valgrind.sh valgrind.supp +@@ -207,8 +209,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -318,7 +320,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/clients/pam_nufw/Makefile.in ++++ nufw-2.2.21/src/clients/pam_nufw/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -104,6 +104,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -116,9 +118,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -129,6 +128,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -137,6 +137,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -196,6 +197,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @BUILD_PAM_NUFW_TRUE@TITLE = pam_nufw +@@ -214,8 +216,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -316,7 +318,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/clients/lib/Makefile.in ++++ nufw-2.2.21/src/clients/lib/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -125,6 +125,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -137,9 +139,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -150,6 +149,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -158,6 +158,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -217,6 +218,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @BUILD_LIBNUCLIENT_TRUE@AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -I$(top_srcdir)/src/include/ +@@ -242,8 +244,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -432,7 +434,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/clients/lib/tests/Makefile.in ++++ nufw-2.2.21/src/clients/lib/tests/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -72,6 +72,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -84,9 +86,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -97,6 +96,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -105,6 +105,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -164,6 +165,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + EXTRA_DIST = dummy_client.c +@@ -174,8 +176,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +--- nufw-2.2.21.orig/src/nuauth/Makefile.in ++++ nufw-2.2.21/src/nuauth/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -119,6 +119,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -131,9 +133,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -144,6 +143,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -152,6 +152,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -211,6 +212,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + SUBDIRS = modules +@@ -244,8 +246,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -442,7 +444,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -84,6 +84,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -96,9 +98,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -109,6 +108,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -117,6 +117,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -176,6 +177,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + SUBDIRS = ldap log_syslog log_script log_mysql log_pgsql plaintext system xml_defs \ +@@ -189,8 +191,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -296,7 +298,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/session_authtype/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/session_authtype/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -104,6 +104,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -116,9 +118,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -129,6 +128,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -137,6 +137,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -196,6 +197,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -212,8 +214,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -305,7 +307,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/mark_uid/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/mark_uid/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -104,6 +104,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -116,9 +118,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -129,6 +128,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -137,6 +137,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -196,6 +197,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -212,8 +214,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -305,7 +307,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/ipauth_guest/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/ipauth_guest/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -104,6 +104,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -116,9 +118,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -129,6 +128,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -137,6 +137,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -196,6 +197,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -212,8 +214,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -305,7 +307,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/log_mysql/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/log_mysql/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -110,6 +110,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -122,9 +124,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -135,6 +134,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -143,6 +143,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -202,6 +203,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @USE_MYSQL_LOG_TRUE@AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -221,8 +223,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -333,7 +335,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/log_nuprelude/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/log_nuprelude/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -111,6 +111,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -123,9 +125,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -136,6 +135,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -144,6 +144,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -203,6 +204,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @USE_PRELUDE_LOG_TRUE@AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -221,8 +223,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -333,7 +335,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/log_syslog/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/log_syslog/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -106,6 +106,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -118,9 +120,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -131,6 +130,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -139,6 +139,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -198,6 +199,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @USE_SYSLOG_LOG_TRUE@AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -214,8 +216,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -309,7 +311,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/session_expire/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/session_expire/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -104,6 +104,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -116,9 +118,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -129,6 +128,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -137,6 +137,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -196,6 +197,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -212,8 +214,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -305,7 +307,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/plaintext/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/plaintext/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -112,6 +112,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -124,9 +126,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -137,6 +136,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -145,6 +145,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -204,6 +205,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @USE_PLAINTEXT_AUTH_TRUE@AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -221,8 +223,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -333,7 +335,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/system/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/system/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -109,6 +109,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -121,9 +123,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -134,6 +133,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -142,6 +142,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -201,6 +202,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @USE_SYSTEM_AUTH_TRUE@AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -218,8 +220,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -314,7 +316,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/log_pgsql/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/log_pgsql/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -110,6 +110,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -122,9 +124,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -135,6 +134,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -143,6 +143,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -202,6 +203,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @USE_PGSQL_LOG_TRUE@AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -220,8 +222,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -332,7 +334,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/mark_group/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/mark_group/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -111,6 +111,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -123,9 +125,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -136,6 +135,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -144,6 +144,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -203,6 +204,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @USE_MARK_GROUP_TRUE@AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -220,8 +222,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -332,7 +334,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/ldap/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/ldap/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -110,6 +110,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -122,9 +124,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -135,6 +134,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -143,6 +143,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -202,6 +203,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @USE_LDAP_TRUE@AM_CPPFLAGS = -fPIC -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -220,8 +222,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -332,7 +334,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/auth_mysql/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/auth_mysql/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -111,6 +111,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -123,9 +125,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -136,6 +135,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -144,6 +144,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -203,6 +204,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @USE_MYSQL_AUTH_TRUE@AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -224,8 +226,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -336,7 +338,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/x509_std/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/x509_std/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -108,6 +108,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -120,9 +122,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -133,6 +132,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -141,6 +141,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -200,6 +201,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -217,8 +219,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -327,7 +329,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/log_script/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/log_script/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -102,6 +102,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -114,9 +116,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -127,6 +126,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -135,6 +135,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -194,6 +195,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -210,8 +212,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -303,7 +305,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/xml_defs/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/xml_defs/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -108,6 +108,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -120,9 +122,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -133,6 +132,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -141,6 +141,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -200,6 +201,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -217,8 +219,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -327,7 +329,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/mark_flag/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/mark_flag/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -104,6 +104,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -116,9 +118,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -129,6 +128,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -137,6 +137,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -196,6 +197,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -212,8 +214,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -305,7 +307,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/src/nuauth/modules/mark_field/Makefile.in ++++ nufw-2.2.21/src/nuauth/modules/mark_field/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -111,6 +111,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -123,9 +125,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -136,6 +135,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -144,6 +144,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -203,6 +204,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @USE_MARK_FIELD_TRUE@AM_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\" -DMODULE_DIR=\"$(libdir)\" +@@ -220,8 +222,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -332,7 +334,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/python/Makefile.in ++++ nufw-2.2.21/python/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -72,6 +72,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -84,9 +86,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -97,6 +96,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -105,6 +105,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -164,6 +165,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + EXTRA_DIST = test_nuclient.py nuclient/classes.py nuclient/func.py nuclient/__init__.py +@@ -174,8 +176,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +--- nufw-2.2.21.orig/scripts/Makefile.in ++++ nufw-2.2.21/scripts/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -84,6 +84,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -96,9 +98,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -109,6 +108,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -117,6 +117,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -176,6 +177,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + SUBDIRS = nuauth_command auth_mysql +@@ -187,8 +189,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -294,7 +296,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/scripts/nuauth_command/Makefile.in ++++ nufw-2.2.21/scripts/nuauth_command/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -85,6 +85,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -97,9 +99,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -110,6 +109,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -118,6 +118,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -177,6 +178,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + @BUILD_NUAUTH_COMMAND_TRUE@SUBDIRS = scripts nuauth_command +@@ -188,8 +190,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -295,7 +297,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/scripts/nuauth_command/nuauth_command/Makefile.in ++++ nufw-2.2.21/scripts/nuauth_command/nuauth_command/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -72,6 +72,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -84,9 +86,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -97,6 +96,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -105,6 +105,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -164,6 +165,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + EXTRA_DIST = client.py command_dec.py __init__.py version.py +@@ -174,8 +176,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +--- nufw-2.2.21.orig/scripts/nuauth_command/scripts/Makefile.in ++++ nufw-2.2.21/scripts/nuauth_command/scripts/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -72,6 +72,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -84,9 +86,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -97,6 +96,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -105,6 +105,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -164,6 +165,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + edit = sed \ +@@ -178,8 +180,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +--- nufw-2.2.21.orig/scripts/auth_mysql/Makefile.in ++++ nufw-2.2.21/scripts/auth_mysql/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -72,6 +72,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -84,9 +86,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -97,6 +96,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -105,6 +105,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -164,6 +165,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + PHP_FILES = authmysql/index.php authmysql/pages/authentication_error.php authmysql/pages/authentication.php authmysql/pages/authentication_success.php +@@ -175,8 +177,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +--- nufw-2.2.21.orig/conf/Makefile.in ++++ nufw-2.2.21/conf/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -72,6 +72,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -84,9 +86,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -97,6 +96,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -105,6 +105,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -164,6 +165,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + CONFIG_FILES = acls.nufw mark_field.conf mark_group.conf nuaclgen.conf nuauth.conf nuclient.conf nutop.conf periods.xml users-plaintext.nufw +@@ -179,8 +181,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +--- nufw-2.2.21.orig/tests/Makefile.in ++++ nufw-2.2.21/tests/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -84,6 +84,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -96,9 +98,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -109,6 +108,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -117,6 +117,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -176,6 +177,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + SUBDIRS = inl_tests pki +@@ -198,8 +200,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -305,7 +307,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/tests/pki/Makefile.in ++++ nufw-2.2.21/tests/pki/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -72,6 +72,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -84,9 +86,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -97,6 +96,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -105,6 +105,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -164,6 +165,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + EXTRA_DIST = gen_certs.sh gen_config.sh gen_server_cnf.sh gen_user_cnf.sh +@@ -183,8 +185,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +--- nufw-2.2.21.orig/tests/inl_tests/Makefile.in ++++ nufw-2.2.21/tests/inl_tests/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -99,6 +99,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -111,9 +113,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -124,6 +123,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -132,6 +132,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -191,6 +192,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + EXTRA_DIST = \ +@@ -217,8 +219,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -312,7 +314,7 @@ + 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; } \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique + tags: TAGS +--- nufw-2.2.21.orig/debian/nutcpc.install ++++ nufw-2.2.21/debian/nutcpc.install +@@ -0,0 +1 @@ ++src/clients/nutcpc/.libs/nutcpc usr/bin +--- nufw-2.2.21.orig/debian/nuauth.default ++++ nufw-2.2.21/debian/nuauth.default +@@ -0,0 +1,10 @@ ++#Change to "true" for Nufw to be started ++NUAUTH_START="true" ++ ++#Add "v"s so nufw gets more verbose ++NUAUTH_VERBOSITY="vv" ++ ++#User nuauth runs on. Change this to some entry existing in /etc/passwd ++NUAUTH_USER="nuauth" ++ ++#EDIT /etc/nuauth/nuauth.conf for other options! +--- nufw-2.2.21.orig/debian/nuauth.dirs ++++ nufw-2.2.21/debian/nuauth.dirs +@@ -0,0 +1,5 @@ ++etc/nufw/certs ++etc/default ++usr/sbin ++usr/share/nuauth ++var/run/nuauth +--- nufw-2.2.21.orig/debian/nuauth.install ++++ nufw-2.2.21/debian/nuauth.install +@@ -0,0 +1,43 @@ ++conf/nuauth.conf etc/nufw ++conf/periods.xml etc/nufw ++conf/acls.nufw etc/nufw ++conf/users-plaintext.nufw etc/nufw ++src/nuauth/nuauth usr/sbin ++src/nuauth/modules/ldap/.libs/libldap.so usr/lib/nuauth/modules ++src/nuauth/modules/ldap/libldap.la usr/lib/nuauth/modules ++src/nuauth/modules/ldap/.libs/libldap.a usr/lib/nuauth/modules ++src/nuauth/modules/plaintext/.libs/libplaintext.so usr/lib/nuauth/modules ++src/nuauth/modules/plaintext/libplaintext.la usr/lib/nuauth/modules ++src/nuauth/modules/plaintext/.libs/libplaintext.a usr/lib/nuauth/modules ++src/nuauth/modules/system/.libs/libsystem.so usr/lib/nuauth/modules ++src/nuauth/modules/system/libsystem.la usr/lib/nuauth/modules ++src/nuauth/modules/system/.libs/libsystem.a usr/lib/nuauth/modules ++src/nuauth/modules/log_syslog/.libs/libsyslog.so usr/lib/nuauth/modules ++src/nuauth/modules/log_syslog/libsyslog.la usr/lib/nuauth/modules ++src/nuauth/modules/log_syslog/.libs/libsyslog.a usr/lib/nuauth/modules ++src/nuauth/modules/xml_defs/.libs/libxml_defs.so usr/lib/nuauth/modules ++src/nuauth/modules/xml_defs/.libs/libxml_defs.a usr/lib/nuauth/modules ++src/nuauth/modules/xml_defs/libxml_defs.la usr/lib/nuauth/modules ++src/nuauth/modules/x509_std/.libs/libx509_std.so usr/lib/nuauth/modules ++src/nuauth/modules/x509_std/.libs/libx509_std.a usr/lib/nuauth/modules ++src/nuauth/modules/x509_std/libx509_std.la usr/lib/nuauth/modules ++src/nuauth/modules/mark_uid/.libs/libmark_uid.so usr/lib/nuauth/modules ++src/nuauth/modules/mark_uid/.libs/libmark_uid.a usr/lib/nuauth/modules ++src/nuauth/modules/mark_uid/libmark_uid.la usr/lib/nuauth/modules ++src/nuauth/modules/mark_group/.libs/libmark_group.so usr/lib/nuauth/modules ++src/nuauth/modules/mark_group/.libs/libmark_group.a usr/lib/nuauth/modules ++src/nuauth/modules/mark_group/libmark_group.la usr/lib/nuauth/modules ++src/nuauth/modules/mark_field/.libs/libmark_field.so usr/lib/nuauth/modules ++src/nuauth/modules/mark_field/.libs/libmark_field.a usr/lib/nuauth/modules ++src/nuauth/modules/mark_field/libmark_field.la usr/lib/nuauth/modules ++src/nuauth/modules/mark_flag/.libs/libmark_flag.so usr/lib/nuauth/modules ++src/nuauth/modules/mark_flag/.libs/libmark_flag.a usr/lib/nuauth/modules ++src/nuauth/modules/mark_flag/libmark_flag.la usr/lib/nuauth/modules ++src/nuauth/modules/session_expire/.libs/libsession_expire.so usr/lib/nuauth/modules ++src/nuauth/modules/session_expire/.libs/libsession_expire.a usr/lib/nuauth/modules ++src/nuauth/modules/session_expire/libsession_expire.la usr/lib/nuauth/modules ++src/nuauth/modules/session_authtype/.libs/libsession_authtype.so usr/lib/nuauth/modules ++src/nuauth/modules/session_authtype/.libs/libsession_authtype.a usr/lib/nuauth/modules ++src/nuauth/modules/session_authtype/libsession_authtype.la usr/lib/nuauth/modules ++src/nuauth/modules/log_nuprelude/.libs/libnuprelude.so usr/lib/nuauth/modules ++src/nuauth/modules/log_nuprelude/.libs/libnuprelude.a usr/lib/nuauth/modules +--- nufw-2.2.21.orig/debian/nuauth-log-mysql.docs ++++ nufw-2.2.21/debian/nuauth-log-mysql.docs +@@ -0,0 +1,3 @@ ++conf/nulog.ipv4.mysql.dump ++conf/nulog.ipv6.mysql.dump ++conf/nulog-v1-v2.mysql.dump +--- nufw-2.2.21.orig/debian/nuauth-log-pgsql.install ++++ nufw-2.2.21/debian/nuauth-log-pgsql.install +@@ -0,0 +1,3 @@ ++src/nuauth/modules/log_pgsql/.libs/libpgsql.a usr/lib/nuauth/modules ++src/nuauth/modules/log_pgsql/libpgsql.la usr/lib/nuauth/modules ++src/nuauth/modules/log_pgsql/.libs/libpgsql.so usr/lib/nuauth/modules +--- nufw-2.2.21.orig/debian/nuauth-extra.install ++++ nufw-2.2.21/debian/nuauth-extra.install +@@ -0,0 +1,9 @@ ++src/nuauth/modules/ipauth_guest/.libs/libipauth_guest.so usr/lib/nuauth/modules ++src/nuauth/modules/ipauth_guest/libipauth_guest.la usr/lib/nuauth/modules ++src/nuauth/modules/ipauth_guest/.libs/libipauth_guest.a usr/lib/nuauth/modules ++src/nuauth/modules/auth_mysql/.libs/libauth_mysql.a usr/lib/nuauth/modules ++src/nuauth/modules/auth_mysql/libauth_mysql.la usr/lib/nuauth/modules ++src/nuauth/modules/auth_mysql/.libs/libauth_mysql.so usr/lib/nuauth/modules ++src/nuauth/modules/log_script/.libs/libscript.a usr/lib/nuauth/modules ++src/nuauth/modules/log_script/libscript.la usr/lib/nuauth/modules ++src/nuauth/modules/log_script/.libs/libscript.so usr/lib/nuauth/modules +--- nufw-2.2.21.orig/debian/rules ++++ nufw-2.2.21/debian/rules +@@ -0,0 +1,503 @@ ++#!/usr/bin/make -f ++# -*- makefile -*- ++# Sample debian/rules that uses debhelper. ++# GNU copyright 1997 to 1999 by Joey Hess. ++ ++# Uncomment this to turn on verbose mode. ++#export DH_VERBOSE=1 ++maindir = $(shell pwd) ++b = $(shell pwd)/debian ++ ++ ++# These are used for cross-compiling and for saving the configure script ++# from having to guess our platform (since we know it already) ++DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) ++DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ++ ++ ++CFLAGS = -Wall -g ++ ++ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) ++ CFLAGS += -O0 ++else ++ CFLAGS += -O2 ++endif ++ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) ++ INSTALL_PROGRAM += -s ++endif ++ ++# Which packages should we build? ++ ++CONFIGURE = CFLAGS='$(CFLAGS)' ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \ ++ --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --localstatedir=/var \ ++ --sysconfdir=/etc/nufw/ --with-mysql-log --with-pgsql-log --with-system-auth --with-ldap \ ++ --with-utf8 --with-nfqueue --with-nfconntrack --without-fixedtimeout --enable-pam-nufw \ ++ --with-prelude-log --with-mysql-auth ++ # --with-utf8 --with-nfqueue --with-nfconntrack --with-fixedtimeout #FIXME : THIS line should be used ++ ++config.status: configure ++ dh_testdir ++ # Add here commands to configure the package. ++ CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \ ++ --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --localstatedir=/var \ ++ --sysconfdir=/etc/nufw/ --with-mysql-log --with-pgsql-log --with-system-auth --with-ldap \ ++ --with-nfqueue --with-nfconntrack --with-fixedtimeout --with-utf8 --enable-pam-nufw \ ++ --with-prelude-log --with-mysql-auth ++ ++build: build-stamp ++ ++clean: ++ dh_testdir ++ dh_testroot ++ rm -f build-stamp ++ rm -f build-nufw build-nufw-stamp ++ rm -f config-nufw-stamp install-stamp ++ ++ # Add here commands to clean up after the build process. ++ [ ! -f Makefile ] || $(MAKE) distclean ++ rm -f tests/pki/Makefile ++ -find scripts/nuauth_command/ -name '*.pyc' -exec rm {} \; ++ [ ! -d scripts/nuauth_command/build ] || rm -rf scripts/nuauth_command/build ++ [ ! -f scripts/nuauth_command/scripts/nuauth_command ] || rm -f scripts/nuauth_command/scripts/nuauth_command ++ rm -f tests/inl_tests/libnobuffer.so ++ rm -f config.log ++ ++ dh_clean ++ ++config-nufw: config-nufw-stamp ++config-nufw-stamp: ++ dh_testdir -a ++ @echo "Doing $@" ++ [ ! -f Makefile ] || make clean ++ $(CONFIGURE) ++ touch config-nufw-stamp ++ ++build-nufw:build-nufw-stamp ++build-nufw-stamp: config-nufw-stamp ++ dh_testdir -a ++ @echo "Doing $@" ++ $(MAKE) ++ #$(MAKE) && \ ++ #(cd src/nufw && mv nufw nufw.plain); ++ touch build-nufw-stamp ++ ++build-stamp: build-nufw ++ @echo "--- Compiling" ++ dh_testdir ++ touch build-stamp ++ ++binary-arch: build nufw nuauth libnuclient3 libnuclient-dev nutcpc nuauth-extra nuauth-log-mysql nuauth-log-pgsql libpam-nufw nuauth-utils ++ ++nufw: ++ @echo "--- Building: $@" ++ dh_installdirs -p$@ -P$(b)/$@ ++ dh_testdir -p$@ -P$(b)/$@ ++ dh_testroot -p$@ -P$(b)/$@ ++ dh_installchangelogs -p$@ -P$(b)/$@ ChangeLog ++ dh_installdocs -p$@ -P$(b)/$@ ++ dh_installexamples -p$@ -P$(b)/$@ ++# dh_install -p$@ -P$(b)/$@ ++# rm debian/$@/usr/sbin/nufw ++ /usr/bin/install -m 755 src/nufw/nufw debian/nufw/usr/sbin/nufw ++# dh_installmenu ++ dh_installdebconf -p$@ -P$(b)/$@ ++# dh_installlogrotate ++# dh_installemacsen ++# dh_installpam ++# dh_installmime ++ dh_installinit -p$@ -P$(b)/$@ -u"start 40 2 3 4 5 . stop 89 0 1 6 ." ++# dh_installcron ++# dh_installinfo ++ dh_installman -pnufw doc/nufw.8 ++ dh_link -p$@ -P$(b)/$@ ++ dh_strip -p$@ -P$(b)/$@ ++ dh_compress -p$@ -P$(b)/$@ ++ dh_fixperms -p$@ -P$(b)/$@ ++# dh_perl ++# dh_python ++ dh_makeshlibs -p$@ -P$(b)/$@ -n ++ dh_installdeb -p$@ -P$(b)/$@ ++ dh_shlibdeps -p$@ -P$(b)/$@ ++ dh_gencontrol -p$@ -P$(b)/$@ ++ dh_md5sums -p$@ -P$(b)/$@ ++ dh_builddeb -p$@ -P$(b)/$@ ++ ++ ++libnuclient3: ++ @echo "--- Building: $@" ++ dh_installdirs -p$@ -P$(b)/$@ ++ dh_testdir -p$@ -P$(b)/$@ ++ dh_testroot -p$@ -P$(b)/$@ ++ dh_installchangelogs -p$@ -P$(b)/$@ ChangeLog ++ dh_installdocs -p$@ -P$(b)/$@ ++ dh_installexamples -p$@ -P$(b)/$@ ++ dh_install -p$@ ++# rm debian/$@/usr/sbin/nufw ++# dh_installmenu ++ dh_installdebconf -p$@ -P$(b)/$@ ++# dh_installlogrotate ++# dh_installemacsen ++# dh_installpam ++# dh_installmime ++# dh_installcron ++# dh_installinfo ++ dh_link -p$@ -P$(b)/$@ ++ dh_strip -p$@ -P$(b)/$@ ++ dh_compress -p$@ -P$(b)/$@ ++ dh_fixperms -p$@ -P$(b)/$@ ++# dh_perl ++# dh_python ++ dh_makeshlibs -p$@ -P$(b)/$@ -n ++ dh_installdeb -p$@ -P$(b)/$@ ++ dh_shlibdeps -p$@ -P$(b)/$@ ++ dh_gencontrol -p$@ -P$(b)/$@ ++ dh_md5sums -p$@ -P$(b)/$@ ++ dh_builddeb -p$@ -P$(b)/$@ ++ ++libnuclient-dev: ++ @echo "--- Building: $@" ++ dh_installdirs -p$@ -P$(b)/$@ ++ dh_testdir -p$@ -P$(b)/$@ ++ dh_testroot -p$@ -P$(b)/$@ ++ dh_installchangelogs -p$@ -P$(b)/$@ ChangeLog ++ dh_installdocs -p$@ -P$(b)/$@ ++ dh_installexamples -p$@ -P$(b)/$@ ++ dh_install -p$@ ++# rm debian/$@/usr/sbin/nufw ++# dh_installmenu ++ dh_installdebconf -p$@ -P$(b)/$@ ++# dh_installlogrotate ++# dh_installemacsen ++# dh_installpam ++# dh_installmime ++# dh_installcron ++# dh_installinfo ++ dh_link -p$@ -P$(b)/$@ ++ dh_strip -p$@ -P$(b)/$@ ++ dh_compress -p$@ -P$(b)/$@ ++ dh_fixperms -p$@ -P$(b)/$@ ++# dh_perl ++# dh_python ++ dh_makeshlibs -p$@ -P$(b)/$@ -n ++ dh_installdeb -p$@ -P$(b)/$@ ++ dh_shlibdeps -L libnuclient3 -l debian/libnuclient3/usr/lib -p$@ -P$(b)/$@ ++ dh_gencontrol -p$@ -P$(b)/$@ ++ dh_md5sums -p$@ -P$(b)/$@ ++ dh_builddeb -p$@ -P$(b)/$@ ++ ++libpam-nufw: ++ @echo "--- Building: $@" ++ dh_installdirs -p$@ -P$(b)/$@ ++ dh_testdir -p$@ -P$(b)/$@ ++ dh_testroot -p$@ -P$(b)/$@ ++ dh_installchangelogs -p$@ -P$(b)/$@ ChangeLog ++ dh_installdocs -p$@ -P$(b)/$@ ++ dh_installexamples -p$@ -P$(b)/$@ ++ dh_install -p$@ ++# rm debian/$@/usr/sbin/nufw ++ # remove local rpath (#495769) ++ chrpath -d $(CURDIR)/debian/libpam-nufw/lib/security/pam_nufw.so ++# dh_installmenu ++ dh_installdebconf -p$@ -P$(b)/$@ ++# dh_installlogrotate ++# dh_installemacsen ++# dh_installpam ++# dh_installmime ++ ++# dh_installcron ++# dh_installinfo ++ dh_link -p$@ -P$(b)/$@ ++ dh_strip -p$@ -P$(b)/$@ ++ dh_compress -p$@ -P$(b)/$@ ++ dh_fixperms -p$@ -P$(b)/$@ ++# dh_perl ++# dh_python ++ dh_makeshlibs -p$@ -P$(b)/$@ -n ++ dh_installdeb -p$@ -P$(b)/$@ ++ dh_shlibdeps -p$@ -P$(b)/$@ ++ dh_gencontrol -p$@ -P$(b)/$@ ++ dh_md5sums -p$@ -P$(b)/$@ ++ dh_builddeb -p$@ -P$(b)/$@ ++ ++nuauth: ++ @echo "--- Building: $@" ++ dh_installdirs -p$@ -P$(b)/$@ ++ dh_testdir -p$@ -P$(b)/$@ ++ dh_testroot -p$@ -P$(b)/$@ ++ dh_installchangelogs -p$@ -P$(b)/$@ ChangeLog ++ dh_installdocs -p$@ -P$(b)/$@ ++ dh_installexamples -p$@ -P$(b)/$@ ++ mkdir -p $(CURDIR)/debian/$@/etc/nufw/ ++ dh_install -p$@ ++ sed -e "sµ^#\? *nuauth_tls_key=.*µnuauth_tls_key=\"/etc/nufw/certs/nuauth-key.pem\"µ" \ ++ -e "sµ^#\? *nuauth_tls_cert=.*µnuauth_tls_cert=\"/etc/nufw/certs/nuauth-cert.pem\"µ" \ ++ -e "sµ^ *plaintext_aclfile=.*µplaintext_aclfile=\"/etc/nufw/acls.nufw\"µ" \ ++ -e "sµ^ *plaintext_userfile=.*µplaintext_userfile=\"/etc/nufw/users-plaintext.nufw\"µ" \ ++ -e "sµ^ *nuauth_user_check_module=.*µnuauth_user_check_module=\"system\"µ" \ ++ -e "sµ^ *nuauth_tls_request_cert=.*µnuauth_tls_request_cert=1µ" \ ++ -e "sµ^#\? *nuauth_tls_disable_nufw_fqdn_check=.*µnuauth_tls_disable_nufw_fqdn_check=1µ" \ ++ < $(CURDIR)/conf/nuauth.conf >$(CURDIR)/debian/$@/etc/nufw/nuauth.conf ++ mv $(CURDIR)/debian/$@/etc/nufw/nuauth.conf $(CURDIR)/debian/$@/usr/share/nuauth/nuauth.conf ++ cp $(CURDIR)/conf/acls.nufw $(CURDIR)/debian/$@/etc/nufw/ ++ cp $(CURDIR)/conf/users-plaintext.nufw $(CURDIR)/debian/$@/etc/nufw/ ++ cp $(CURDIR)/conf/periods.xml $(CURDIR)/debian/$@/etc/nufw/ ++ rmdir $(CURDIR)/debian/$@/var/run/nuauth ++ pwd ++# dh_install -p$@ -P$(b)/$@ ++# dh_installmenu ++ dh_installdebconf -p$@ -P$(b)/$@ ++# dh_installlogrotate ++# dh_installemacsen ++# dh_installpam ++# dh_installmime ++# dh_installcron ++# dh_installinfo ++ dh_link -p$@ -P$(b)/$@ ++ dh_strip -p$@ -P$(b)/$@ ++ dh_installinit -p$@ -P$(b)/$@ -u"start 40 2 3 4 5 . stop 89 0 1 6 ." ++ dh_installman -pnuauth doc/nuauth.8 ++ dh_compress -p$@ -P$(b)/$@ ++ dh_fixperms -p$@ -P$(b)/$@ ++# dh_perl ++# dh_python ++ dh_makeshlibs -p$@ -P$(b)/$@ -n ++ dh_installdeb -p$@ -P$(b)/$@ ++ dh_shlibdeps -p$@ -P$(b)/$@ ++ dh_gencontrol -p$@ -P$(b)/$@ ++ dh_md5sums -p$@ -P$(b)/$@ ++ dh_builddeb -p$@ -P$(b)/$@ ++ ++nuauth-extra: ++ @echo "--- Building: $@" ++ dh_installdirs -p$@ -P$(b)/$@ ++ dh_testdir -p$@ -P$(b)/$@ ++ dh_testroot -p$@ -P$(b)/$@ ++ dh_installchangelogs -p$@ -P$(b)/$@ ChangeLog ++ dh_installdocs -p$@ -P$(b)/$@ ++ dh_installexamples -p$@ -P$(b)/$@ ++ dh_install -p$@ ++# rm debian/$@/usr/sbin/nufw ++# dh_installmenu ++ dh_installdebconf -p$@ -P$(b)/$@ ++# dh_installlogrotate ++# dh_installemacsen ++# dh_installpam ++# dh_installmime ++# dh_installcron ++# dh_installinfo ++ dh_link -p$@ -P$(b)/$@ ++ dh_strip -p$@ -P$(b)/$@ ++ dh_compress -p$@ -P$(b)/$@ ++ dh_fixperms -p$@ -P$(b)/$@ ++# dh_perl ++# dh_python ++ dh_makeshlibs -p$@ -P$(b)/$@ -n ++ dh_installdeb -p$@ -P$(b)/$@ ++ dh_shlibdeps -p$@ -P$(b)/$@ ++ dh_gencontrol -p$@ -P$(b)/$@ ++ dh_md5sums -p$@ -P$(b)/$@ ++ dh_builddeb -p$@ -P$(b)/$@ ++ ++nuauth-log-mysql: ++ @echo "--- Building: $@" ++ dh_installdirs -p$@ -P$(b)/$@ ++ dh_testdir -p$@ -P$(b)/$@ ++ dh_testroot -p$@ -P$(b)/$@ ++ dh_installchangelogs -p$@ -P$(b)/$@ ChangeLog ++ dh_installdocs -p$@ -P$(b)/$@ ++ dh_installexamples -p$@ -P$(b)/$@ ++ dh_install -p$@ ++# rm debian/$@/usr/sbin/nufw ++# dh_installmenu ++ dh_installdebconf -p$@ -P$(b)/$@ ++# dh_installlogrotate ++# dh_installemacsen ++# dh_installpam ++# dh_installmime ++# dh_installcron ++# dh_installinfo ++ dh_link -p$@ -P$(b)/$@ ++ dh_strip -p$@ -P$(b)/$@ ++ dh_compress -p$@ -P$(b)/$@ ++ dh_fixperms -p$@ -P$(b)/$@ ++# dh_perl ++# dh_python ++ dh_makeshlibs -p$@ -P$(b)/$@ -n ++ dh_installdeb -p$@ -P$(b)/$@ ++ dh_shlibdeps -p$@ -P$(b)/$@ ++ dh_gencontrol -p$@ -P$(b)/$@ ++ dh_md5sums -p$@ -P$(b)/$@ ++ dh_builddeb -p$@ -P$(b)/$@ ++ ++nuauth-log-pgsql: ++ @echo "--- Building: $@" ++ dh_installdirs -p$@ -P$(b)/$@ ++ dh_testdir -p$@ -P$(b)/$@ ++ dh_testroot -p$@ -P$(b)/$@ ++ dh_installchangelogs -p$@ -P$(b)/$@ ChangeLog ++ dh_installdocs -p$@ -P$(b)/$@ ++ dh_installexamples -p$@ -P$(b)/$@ ++ dh_install -p$@ ++# rm debian/$@/usr/sbin/nufw ++# dh_installmenu ++ dh_installdebconf -p$@ -P$(b)/$@ ++# dh_installlogrotate ++# dh_installemacsen ++# dh_installpam ++# dh_installmime ++# dh_installcron ++# dh_installinfo ++ dh_link -p$@ -P$(b)/$@ ++ dh_strip -p$@ -P$(b)/$@ ++ dh_compress -p$@ -P$(b)/$@ ++ dh_fixperms -p$@ -P$(b)/$@ ++# dh_perl ++# dh_python ++ dh_makeshlibs -p$@ -P$(b)/$@ -n ++ dh_installdeb -p$@ -P$(b)/$@ ++ dh_shlibdeps -p$@ -P$(b)/$@ ++ dh_gencontrol -p$@ -P$(b)/$@ ++ dh_md5sums -p$@ -P$(b)/$@ ++ dh_builddeb -p$@ -P$(b)/$@ ++ ++nuauth-utils: ++ @echo "--- Building: $@" ++ dh_installdirs -p$@ -P$(b)/$@ ++ dh_testdir -p$@ -P$(b)/$@ ++ dh_testroot -p$@ -P$(b)/$@ ++ dh_installchangelogs -p$@ -P$(b)/$@ ChangeLog ++ dh_installdocs -p$@ -P$(b)/$@ ++ dh_installexamples -p$@ -P$(b)/$@ ++ dh_install -p$@ ++# rm debian/$@/usr/sbin/nufw ++# dh_installmenu ++ dh_installdebconf -p$@ -P$(b)/$@ ++ cp $(CURDIR)/conf/nuaclgen.conf $(CURDIR)/debian/$@/etc/nufw/ ++ cp $(CURDIR)/conf/nutop.conf $(CURDIR)/debian/$@/etc/nufw/ ++ cp $(CURDIR)/scripts/nuaclgen $(CURDIR)/debian/$@/usr/bin ++ cp $(CURDIR)/scripts/nutop $(CURDIR)/debian/$@/usr/bin ++ cp $(CURDIR)/scripts/clean_conntrack.pl $(CURDIR)/debian/$@/usr/sbin ++ #make -C $(CURDIR)/scripts/nuauth_command install DESTDIR=$(CURDIR)/debian/$@/ ++ cd $(CURDIR)/scripts/nuauth_command && ./setup.py install --no-compile \ ++ --install-lib=$(CURDIR)/debian/$@/usr/share/python-support/nuauth_command \ ++ --prefix=$(CURDIR)/debian/$@/usr ++ #find $(CURDIR)/debian/$@/ -name \*.pyc -exec rm -f {} \; ++ dh_python ++ dh_pysupport ++# dh_installlogrotate ++# dh_installemacsen ++# dh_installpam ++# dh_installmime ++# dh_installcron ++# dh_installinfo ++ dh_link -p$@ -P$(b)/$@ ++ dh_strip -p$@ -P$(b)/$@ ++ dh_installman -pnuauth-utils doc/nuaclgen.8 ++ dh_installman -pnuauth-utils doc/nutop.8 ++ dh_compress -p$@ -P$(b)/$@ ++ dh_fixperms -p$@ -P$(b)/$@ ++# dh_perl ++# dh_python ++ dh_makeshlibs -p$@ -P$(b)/$@ -n ++ dh_installdeb -p$@ -P$(b)/$@ ++ dh_shlibdeps -p$@ -P$(b)/$@ ++ dh_gencontrol -p$@ -P$(b)/$@ ++ dh_md5sums -p$@ -P$(b)/$@ ++ dh_builddeb -p$@ -P$(b)/$@ ++ ++nutcpc: ++ @echo "--- Building: $@" ++ dh_installdirs -p$@ -P$(b)/$@ ++ dh_testdir -p$@ -P$(b)/$@ ++ dh_testroot -p$@ -P$(b)/$@ ++ dh_installchangelogs -p$@ -P$(b)/$@ ChangeLog ++ dh_installdocs -p$@ -P$(b)/$@ ++ dh_installexamples -p$@ -P$(b)/$@ ++ dh_install -p$@ ++# rm debian/$@/usr/sbin/nufw ++# dh_installmenu ++ dh_installman -pnutcpc doc/nutcpc.1 ++ dh_installdebconf -p$@ -P$(b)/$@ ++# dh_installlogrotate ++# dh_installemacsen ++# dh_installpam ++# dh_installmime ++# dh_installcron ++# dh_installinfo ++ dh_link -p$@ -P$(b)/$@ ++ dh_strip -p$@ -P$(b)/$@ ++ dh_compress -p$@ -P$(b)/$@ ++ dh_fixperms -p$@ -P$(b)/$@ ++# dh_perl ++# dh_python ++ dh_makeshlibs -p$@ -P$(b)/$@ -n ++ dh_installdeb -p$@ -P$(b)/$@ ++ dh_shlibdeps -L libnuclient3 -l debian/libnuclient3/usr/lib -p$@ -P$(b)/$@ ++ dh_gencontrol -p$@ -P$(b)/$@ ++ dh_md5sums -p$@ -P$(b)/$@ ++ dh_builddeb -p$@ -P$(b)/$@ ++ ++install: install-stamp ++install-stamp: ++ dh_testdir -a ++ @echo "Installing $@" ++ dh_testroot -a ++# dh_clean -k -a ++# dh_installdirs -a ++ ++ # Add here commands to install the package into debian/nufw. ++ #$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp/ ++#default certificates ++# cp $(CURDIR)/conf/certs/nufw-key.pem $(CURDIR)/debian/tmp/etc/nufw/certs ++# cp $(CURDIR)/conf/certs/nufw-cert.pem $(CURDIR)/debian/tmp/etc/nufw/certs ++# cp $(CURDIR)/conf/certs/nuauth-key.pem $(CURDIR)/debian/tmp/etc/nufw/certs ++# cp $(CURDIR)/conf/certs/nuauth-cert.pem $(CURDIR)/debian/tmp/etc/nufw/certs ++ ++# cp $(CURDIR)/conf/nufw.init $(CURDIR)/debian/tmp/etc/init.d/nufw ++# cp $(CURDIR)/conf/nuauth $(CURDIR)/debian/tmp/etc/init.d/nuauth ++# chmod 755 $(CURDIR)/debian/tmp/etc/init.d/* ++# ln -s $(CURDIR)/debian/tmp/usr/lib/nuauth $(CURDIR)/debian/tmp/usr/lib/nuauth ++ touch $(maindir)/install-stamp ++ ++ ++# Build architecture-independent files here. ++binary-indep: build install ++# We have nothing to do by default. ++ ++# Build architecture-dependent files here. ++binary-arch: build install ++# dh_testdir $(dhbuildpackages) ++# dh_testroot $(dhbuildpackages) ++# dh_installchangelogs $(dhbuildpackages) ChangeLog ++# dh_installdocs $(dhbuildpackages) ++# dh_installexamples $(dhbuildpackages) ++# dh_install $(dhbuildpackages) --sourcedir=debian/tmp ++## dh_installmenu ++# dh_installdebconf $(dhbuildpackages) ++## dh_installlogrotate ++## dh_installemacsen ++## dh_installpam ++## dh_installmime ++# dh_installinit $(dhbuildpackages) -u"start 40 2 3 4 5 . stop 89 0 1 6 ." ++## dh_installcron ++## dh_installinfo ++# dh_installman -pnufw doc/nufw.1 ++# dh_installman -pnuauth doc/nuauth.1 ++# dh_installman -pnutcpc doc/nutcpc.1 ++# dh_installman -pnuauth-utils doc/nuaclgen.1 ++# dh_installman -pnuauth-utils doc/nutop.1 ++# dh_link $(dhbuildpackages) ++# dh_strip $(dhbuildpackages) ++# dh_compress $(dhbuildpackages) ++# dh_fixperms $(dhbuildpackages) ++## dh_perl ++## dh_python ++# dh_makeshlibs $(dhbuildpackages) -n ++# dh_installdeb $(dhbuildpackages) ++# dh_shlibdeps $(dhbuildpackages) ++# dh_gencontrol $(dhbuildpackages) ++# dh_md5sums $(dhbuildpackages) ++# dh_builddeb $(dhbuildpackages) ++ ++binary: binary-indep binary-arch ++.PHONY: build clean binary-indep binary-arch binary install +--- nufw-2.2.21.orig/debian/copyright ++++ nufw-2.2.21/debian/copyright +@@ -0,0 +1,29 @@ ++This package was debianized by Vincent Deffontaines on ++Thu, 13 Nov 2003 13:03:54 +0100. ++ ++It was downloaded from http://www.nufw.org ++ ++Upstream Authors: Eric Leblond ++ Vincent Deffontaines ++ ++Copyright (C) 2007-2008 INL ++ ++NuFW is licensed under the GPLv2 ++ ++ This package 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; version 2 dated June, 1991. ++ ++ This package 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 package; if not, write to the Free Software ++ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, ++ MA 02110-1301, USA. ++ ++On Debian GNU/Linux systems, the complete text of the GNU General ++Public License 2 can be found in `/usr/share/common-licenses/GPL-2'. ++ +--- nufw-2.2.21.orig/debian/README.Debian ++++ nufw-2.2.21/debian/README.Debian +@@ -0,0 +1,54 @@ ++TLS and certificates ++-------------------- ++ ++By default, NuFW requires a valid certificate authority, and valid certificates to ++be installed on all components (especially for nuauth and nufw). ++See http://nufw.org/docs/handbook22.html#hardening for details. ++ ++To make the installation easier, the Debian package uses the non-strict mode ++by default. ++ ++The following modifications have been done (revert them to use strict mode): ++ ++In file /etc/default/nufw, change :: ++ ++ NUFW_OPTIONS="" ++ ++to :: ++ ++ NUFW_OPTIONS="-s" ++ ++In file /etc/nufw/nuauth.conf, change :: ++ ++ nuauth_tls_request_cert=2 ++ # nuauth_tls_disable_nufw_fqdn_check=0 ++ ++to :: ++ ++ nuauth_tls_request_cert=1 ++ nuauth_tls_disable_nufw_fqdn_check=1 ++ ++ ++Documentation ++------------- ++ ++NuFW handbook (containing the installation guide, and more information) can ++be found at: ++ ++http://nufw.org/docs/handbook22.html ++ ++PDF version: http://nufw.org/docs/handbook22.pdf ++ ++The handbook is not packaged in Debian due to the license (Creative ++Commons by-nc-sa 3.0). ++ ++An installation guide for Debian can be found at: ++http://software.inl.fr/trac/wiki/nufw_install_debian ++ ++ ++More links: ++Documentation, links, forums, etc.: ++ http://software.inl.fr/trac/wiki/EdenWall/NuFW ++ ++ -- Pierre Chifflier Tue, 25 Nov 2008 11:45:25 +0100 ++ +--- nufw-2.2.21.orig/debian/libnuclient3.postinst ++++ nufw-2.2.21/debian/libnuclient3.postinst +@@ -0,0 +1,19 @@ ++#!/bin/sh ++ ++set -e ++ ++# dh_installdeb will replace this with shell code automatically ++# generated by other debhelper scripts. ++ ++case "$1" in ++ configure) ++ ++ ldconfig ++ ++ ;; ++esac ++ ++#DEBHELPER# ++ ++exit 0 ++ +--- nufw-2.2.21.orig/debian/nuauth-log-mysql.install ++++ nufw-2.2.21/debian/nuauth-log-mysql.install +@@ -0,0 +1,3 @@ ++src/nuauth/modules/log_mysql/.libs/libmysql.a usr/lib/nuauth/modules ++src/nuauth/modules/log_mysql/libmysql.la usr/lib/nuauth/modules ++src/nuauth/modules/log_mysql/.libs/libmysql.so usr/lib/nuauth/modules +--- nufw-2.2.21.orig/debian/nuauth.postinst ++++ nufw-2.2.21/debian/nuauth.postinst +@@ -0,0 +1,72 @@ ++#!/bin/sh ++CONFIGFILE1=/etc/default/nuauth ++CONFIGFILE2=/etc/nufw/nuauth.conf ++set -e ++. /usr/share/debconf/confmodule ++ ++grepconf () { ++ w=" " # space tab ++ sq=/etc/nufw/nuauth.conf ++ # sed is cool. ++ res=`sed -ne ' ++ s/^\s*'$1'\s*=\s*"\?\([^"]*\)\"$/\1/p; ++ t end; ++ d; ++ :end q' < $sq` ++ [ -n "$res" ] || res=$2 ++ echo "$res" ++} ++ ++grepdefault () { ++ w=" " # space tab ++ sq=/etc/default/nuauth ++ # sed is cool. ++ res=`sed -ne ' ++ s/^\s*'$1'\s*=\s*"\?\([^"]*\)\"$/\1/p; ++ t end; ++ d; ++ :end q' < $sq` ++ [ -n "$res" ] || res=$2 ++ echo "$res" ++} ++ ++# Installing the config ++ucf --three-way --debconf-ok /usr/share/nuauth/nuauth.conf /etc/nufw/nuauth.conf ++ ++NUAUTH_USER=`grepdefault NUAUTH_USER nobody` ++nuauth_tls_key=`grepconf nuauth_tls_key /etc/nufw/certs/nuauth-key.pem` ++nuauth_tls_cert=`grepconf nuauth_tls_cert /etc/nufw/certs/nuauth-cert.pem` ++ ++if grep -q -e "^$NUAUTH_USER:" /etc/passwd ++then ++ chown $NUAUTH_USER /var/run/nuauth/ ++else ++ echo "FATAL : User \"$NUAUTH_USER\" does not exist, but is supposed to run nuath" ++ exit -1 ++fi ++ ++ ++# ssl certificate generation ++if [ -x /usr/bin/openssl ]; then ++ if [ ! -e $nuauth_tls_key ]; then ++ ++ make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/nufw/certs/nuauth.pem ++ ++ if [ -f /etc/nufw/certs/nuauth.pem ]; then ++ # split key and certificate data ++ openssl x509 -in /etc/nufw/certs/nuauth.pem -out $nuauth_tls_cert ++ openssl rsa -in /etc/nufw/certs/nuauth.pem -out $nuauth_tls_key ++ chmod 0600 $nuauth_tls_key ++ chown $NUAUTH_USER $nuauth_tls_key ++ rm -f /etc/nufw/certs/nuauth.pem ++ find /etc/nufw/certs -type l -maxdepth 1 -delete ++ fi ++ ++ fi ++fi ++ ++db_stop ++ ++#DEBHELPER# ++ ++exit 0 +--- nufw-2.2.21.orig/debian/nuauth-utils.install ++++ nufw-2.2.21/debian/nuauth-utils.install +@@ -0,0 +1,5 @@ ++conf/nuaclgen.conf etc/nufw ++conf/nutop.conf etc/nufw ++scripts/nuaclgen usr/bin ++scripts/nutop usr/bin ++scripts/clean_conntrack.pl usr/sbin +--- nufw-2.2.21.orig/debian/control ++++ nufw-2.2.21/debian/control +@@ -0,0 +1,186 @@ ++Source: nufw ++Section: net ++Priority: optional ++XS-Python-Version: all ++Maintainer: Pierre Chifflier ++Build-Depends: debhelper (>= 5), po-debconf, automake1.9, ++ libldap2-dev, libglib2.0-dev, ++ libmysqlclient-dev | libmysqlclient15-dev, ++ libpq-dev, ++ iptables-dev, ++ libtool, ++ libgnutls-dev|libgnutls11-dev, libsasl2-dev, ++ libpam0g-dev, ++ libprelude-dev, ++ libnetfilter-conntrack-dev, libnetfilter-queue-dev, libnfnetlink-dev, ++ python-support (>= 0.4), python-dev, ++ pkg-config, ++ chrpath ++Standards-Version: 3.8.2 ++Homepage: http://www.nufw.org/-English-.html ++ ++Package: nufw ++Architecture: any ++Depends: ${shlibs:Depends}, ${misc:Depends}, debconf (>= 1.3.22), ssl-cert, openssl ++Suggests: ulogd, ulogd-mysql ++Description: The authenticating firewall [NFQUEUE daemon] ++ NuFW is an authenticating firewall based on netfilter's NFQUEUE target. ++ It allows to write filtering rules based on user identity, in addition ++ to classical network criteria. Unless other solutions, NuFW uses a ++ strict security model and can apply different access rules to users ++ connected on the same host, for example. ++ . ++ NuFW can: ++ * Act as a traditional firewall ++ * Add user identity to the list of parameters used to write firewall rules ++ * Authenticate any connection or protocol ++ * Perform accounting, routing and quality of service based on users ++ * Filter packets with criteria such as application and OS ++ * Log all traffic in SQL with username and application information ++ * Be the key of a secure and simple Single Sign On system. ++ . ++ This package provides the daemon receiving packets through the NFQUEUE ++ netfilter rule. Informations about those packets are forwarded to the ++ nuauth daemon, which decides if packets should be accepted or denied, ++ sends back the information to Nufw that applies decisions. ++ ++Package: nuauth ++Architecture: any ++Pre-Depends: passwd, adduser ++Depends: ${shlibs:Depends}, ${misc:Depends}, debconf (>= 1.3.22), ucf, libsasl2-modules, ssl-cert, openssl ++Recommends: nuauth-utils ++Description: The authenticating firewall [authentication daemon] ++ NuFW is an authenticating firewall based on netfilter's NFQUEUE target. ++ It allows to write filtering rules based on user identity, in addition ++ to classical network criteria. Unless other solutions, NuFW uses a ++ strict security model and can apply different access rules to users ++ connected on the same host, for example. ++ . ++ NuFW can: ++ * Act as a traditional firewall ++ * Add user identity to the list of parameters used to write firewall rules ++ * Authenticate any connection or protocol ++ * Perform accounting, routing and quality of service based on users ++ * Filter packets with criteria such as application and OS ++ * Log all traffic in SQL with username and application information ++ * Be the key of a secure and simple Single Sign On system. ++ . ++ This package provides the authentication daemon, which uses a user database ++ (though PAM modules) and an ACL database (which can be a LDAP directory, ++ or XML/DBM files, etc.). ++ Nuauth handles both client authentication, taking decisions on requests ++ sent by the nufw daemon to accept packets or not, and sending decision ++ to the nufw daemon. ++ ++Package: nuauth-extra ++Architecture: any ++Depends: ${shlibs:Depends}, ${misc:Depends}, nuauth ++Recommends: nuauth-utils ++Description: The authenticating firewall [extra modules] ++ NuFW is an authenticating firewall based on netfilter's NFQUEUE target. ++ It allows to write filtering rules based on user identity, in addition ++ to classical network criteria. Unless other solutions, NuFW uses a ++ strict security model and can apply different access rules to users ++ connected on the same host, for example. ++ . ++ Nuauth-extra provides extra modules for nuauth, such as the ipauth_guest ++ and auth_mysql modules. ++ ++Package: nuauth-log-mysql ++Architecture: any ++Depends: ${shlibs:Depends}, ${misc:Depends}, nuauth ++Recommends: nuauth-utils ++Description: The authenticating firewall [MySQL log module] ++ NuFW is an authenticating firewall based on netfilter's NFQUEUE target. ++ It allows to write filtering rules based on user identity, in addition ++ to classical network criteria. Unless other solutions, NuFW uses a ++ strict security model and can apply different access rules to users ++ connected on the same host, for example. ++ . ++ This package adds support for nuauth logging users activity into a MySQL ++ database. You can use this for an SSO solution, too. ++ ++Package: nuauth-log-pgsql ++Architecture: any ++Depends: ${shlibs:Depends}, ${misc:Depends}, nuauth ++Recommends: nuauth-utils ++Description: The authenticating firewall [PostgreSQL log module] ++ NuFW is an authenticating firewall based on netfilter's NFQUEUE target. ++ It allows to write filtering rules based on user identity, in addition ++ to classical network criteria. Unless other solutions, NuFW uses a ++ strict security model and can apply different access rules to users ++ connected on the same host, for example. ++ . ++ This package adds support for nuauth logging users activity into a PostgreSQL ++ database. You can use this for an SSO solution, too. ++ ++Package: nutcpc ++Architecture: any ++Depends: ${shlibs:Depends}, ${misc:Depends}, libnuclient3 (= ${binary:Version}) ++Description: The authenticating firewall [client] ++ NuFW is an authenticating firewall based on netfilter's NFQUEUE target. ++ It allows to write filtering rules based on user identity, in addition ++ to classical network criteria. Unless other solutions, NuFW uses a ++ strict security model and can apply different access rules to users ++ connected on the same host, for example. ++ . ++ nutcpc is a console-mode client for the NUFW authenticating firewall. ++ It is in charge of authenticating the user, and replying to nuauth requests ++ to send information on network connections. ++ ++Package: nuauth-utils ++Architecture: all ++Depends: ${shlibs:Depends}, ${python:Depends}, ${misc:Depends}, python-ipy, perl, libnet-ldap-perl, nuauth ++XB-Python-Version: ${python:Versions} ++Description: The authenticating firewall [tools for admin] ++ NuFW is an authenticating firewall based on netfilter's NFQUEUE target. ++ It allows to write filtering rules based on user identity, in addition ++ to classical network criteria. Unless other solutions, NuFW uses a ++ strict security model and can apply different access rules to users ++ connected on the same host, for example. ++ . ++ nuaclgen is a perl script that helps generate LDAP ACLs for use with nuauth, ++ the nufw authentication daemon. nuauth_command is a Python script to control ++ the nuauth daemon. ++ ++Package: libnuclient3 ++Architecture: any ++Depends: ${shlibs:Depends}, ${misc:Depends}, libsasl2-modules ++Replaces: libnuclient ++Conflicts: libnuclient ++Description: The authenticating firewall [client library] ++ NuFW is an authenticating firewall based on netfilter's NFQUEUE target. ++ It allows to write filtering rules based on user identity, in addition ++ to classical network criteria. Unless other solutions, NuFW uses a ++ strict security model and can apply different access rules to users ++ connected on the same host, for example. ++ . ++ This library provides the library for nufw clients. ++ ++Package: libnuclient-dev ++Architecture: any ++Depends: ${shlibs:Depends}, ${misc:Depends}, libsasl2-dev, libgnutls-dev|libgnutls11-dev, libnuclient3 (= ${binary:Version}) ++Section: libdevel ++Description: The authenticating firewall [client development files] ++ NuFW is an authenticating firewall based on netfilter's NFQUEUE target. ++ It allows to write filtering rules based on user identity, in addition ++ to classical network criteria. Unless other solutions, NuFW uses a ++ strict security model and can apply different access rules to users ++ connected on the same host, for example. ++ . ++ This library provides files needed to develop a NuFW client. ++ ++Package: libpam-nufw ++Architecture: any ++Depends: ${shlibs:Depends}, ${misc:Depends}, libnuclient3 (= ${binary:Version}) ++Description: The authenticating firewall [PAM module] ++ NuFW is an authenticating firewall based on netfilter's NFQUEUE target. ++ It allows to write filtering rules based on user identity, in addition ++ to classical network criteria. Unless other solutions, NuFW uses a ++ strict security model and can apply different access rules to users ++ connected on the same host, for example. ++ . ++ This packages contains a PAM module to transparently authenticate to the NuFW ++ authentication daemon. It uses the login and password to start a NuFW client, ++ for the duration of the session. ++ +--- nufw-2.2.21.orig/debian/nufw.install ++++ nufw-2.2.21/debian/nufw.install +@@ -0,0 +1 @@ ++usr/sbin/nufw +--- nufw-2.2.21.orig/debian/nutcpc.dirs ++++ nufw-2.2.21/debian/nutcpc.dirs +@@ -0,0 +1 @@ ++usr/bin +--- nufw-2.2.21.orig/debian/nuauth-log-pgsql.docs ++++ nufw-2.2.21/debian/nuauth-log-pgsql.docs +@@ -0,0 +1 @@ ++conf/nulog.pgsql.dump +--- nufw-2.2.21.orig/debian/nufw.default ++++ nufw-2.2.21/debian/nufw.default +@@ -0,0 +1,26 @@ ++#Change to "true" for Nufw to be started ++NUFW_START="true" ++ ++#Add "v"s so nufw gets more verbose ++NUFW_VERBOSITY="vv" ++ ++#Address of the nuauth server ++#NUFW_NUAUTH_ADDRESS="127.0.0.1" ++ ++#UDP port the nuauth server listens on ++#NUFW_NUAUTH_PORT=4128 ++ ++#Timeout to forget about packets when there's no match (seconds) ++#NUFW_TIMEOUT=15 ++ ++#Track Size ++#NUFW_TRACK_SIZE=1000 ++ ++#SSL certificates and keys ++NUFW_SSL_CERTIFICATE="/etc/nufw/certs/nufw-cert.pem" ++NUFW_SSL_KEY="/etc/nufw/certs/nufw-key.pem" ++ ++# Additional options ++# For ex., add -s here to disable TLS strict checking mode ++# See http://nufw.org/docs/handbook22.html#hardening ++NUFW_OPTIONS="-s" +--- nufw-2.2.21.orig/debian/docs ++++ nufw-2.2.21/debian/docs +@@ -0,0 +1,3 @@ ++NEWS ++README ++TODO +--- nufw-2.2.21.orig/debian/nufw.init ++++ nufw-2.2.21/debian/nufw.init +@@ -0,0 +1,117 @@ ++#! /bin/sh ++# ++# Written by Miquel van Smoorenburg . ++# Modified for Debian ++# by Ian Murdock . ++# Customized for nufw by Vincent Deffontaines ++# ++# ++ ++### BEGIN INIT INFO ++# Provides: nufw-nfqueue ++# Required-Start: $syslog ++# Required-Stop: $syslog ++# Should-Start: $local_fs ++# Should-Stop: $local_fs ++# Default-Start: 2 3 4 5 ++# Default-Stop: 0 1 6 ++# Short-Description: Control script for nufw ++# Description: Init script to control (start/stop/reload) ++# the nufw server. ++### END INIT INFO ++ ++PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin ++DAEMON=/usr/sbin/nufw ++NAME=nufw ++PID=nufw ++DESC=nufw ++NUFW_START="false" ++ ++ ++test -x $DAEMON || exit 0 ++ ++NUFW_OPTIONS="" ++ ++# Include nufw defaults if available ++if [ -f /etc/default/nufw ] ; then ++ . /etc/default/nufw ++fi ++ ++if [ "$NUFW_START" != "true" ]; then ++ exit 0 ++fi ++ ++if [ -z "$NUFW_VERBOSITY" ]; then ++ NUFW_VERBOSITY="vv" ++fi ++ ++if [ "$NUFW_NUAUTH_ADDRESS" != "" ]; then ++ NUFW_OPTIONS="$NUFW_OPTIONS -d $NUFW_NUAUTH_ADDRESS" ++fi ++ ++if [ "$NUFW_NUAUTH_PORT" != "" ]; then ++ NUFW_OPTIONS="$NUFW_OPTIONS -p $NUFW_NUAUTH_PORT" ++fi ++ ++if [ "$NUFW_TIMEOUT" != "" ]; then ++ NUFW_OPTIONS="$NUFW_OPTIONS -t $NUFW_TIMEOUT" ++fi ++ ++if [ "$NUFW_TRACK_SIZE" != "" ]; then ++ NUFW_OPTIONS="$NUFW_OPTIONS -T $NUFW_TRACK_SIZE" ++fi ++ ++DAEMON_OPTS="-D -$NUFW_VERBOSITY \ ++ $NUFW_OPTIONS \ ++ -k $NUFW_SSL_KEY -c $NUFW_SSL_CERTIFICATE -C -M -m" ++ ++set -e ++ ++case "$1" in ++ start) ++ echo -n "Starting $DESC: " ++ start-stop-daemon --start --quiet --pidfile /var/run/$PID.pid \ ++ --exec $DAEMON -- $DAEMON_OPTS ++ echo "$NAME." ++ ;; ++ stop) ++ echo -n "Stopping $DESC: " ++ start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/$PID.pid \ ++ --retry 5 --exec $DAEMON ++ echo "$NAME." ++ ;; ++ #reload) ++ # ++ # If the daemon can reload its config files on the fly ++ # for example by sending it SIGHUP, do it here. ++ # ++ # If the daemon responds to changes in its config file ++ # directly anyway, make this a do-nothing entry. ++ # ++ # echo "Reloading $DESC configuration files." ++ # start-stop-daemon --stop --signal 1 --quiet --pidfile \ ++ # /var/run/$NAME.pid --exec $DAEMON ++ #;; ++ restart|force-reload) ++ # ++ # If the "reload" option is implemented, move the "force-reload" ++ # option to the "reload" entry above. If not, "force-reload" is ++ # just the same as "restart". ++ # ++ echo -n "Restarting $DESC: " ++ start-stop-daemon --stop --quiet --oknodo --pidfile \ ++ /var/run/$PID.pid --retry 5 --exec $DAEMON ++ sleep 1 ++ start-stop-daemon --start --quiet --pidfile \ ++ /var/run/$PID.pid --exec $DAEMON -- $DAEMON_OPTS ++ echo "$NAME." ++ ;; ++ *) ++ N=/etc/init.d/$NAME ++ # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 ++ echo "Usage: $N {start|stop|restart|force-reload}" >&2 ++ exit 1 ++ ;; ++esac ++ ++exit 0 +--- nufw-2.2.21.orig/debian/nuauth.postrm ++++ nufw-2.2.21/debian/nuauth.postrm +@@ -0,0 +1,45 @@ ++#! /bin/sh ++# postrm script for nuauth ++# ++# see: dh_installdeb(1) ++ ++set -e ++ ++# summary of how this script can be called: ++# * `remove' ++# * `purge' ++# * `upgrade' ++# * `failed-upgrade' ++# * `abort-install' ++# * `abort-install' ++# * `abort-upgrade' ++# * `disappear' overwrit>r> ++# for details, see /usr/doc/packaging-manual/ ++ ++case "$1" in ++ purge|disappear) ++ ++# update-rc.d -f nuauth remove >/dev/null ++ userdel nuauth 2>/dev/null || true ++ for FILE in /etc/nufw/nuauth.conf; do ++ # Taken from the ucf example postrm ++ for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist .ucf-dist; do ++ rm -f $FILE$ext ++ done ++ rm -f $FILE ++ if which ucf >/dev/null 2>&1; then ++ ucf --purge $FILE ++ fi ++ done ++ ;; ++ remove|upgrade|failed-upgrade|abort-install|abort-upgrade) ++ # nothing ++ ;; ++esac ++ ++# dh_installdeb will replace this with shell code automatically ++# generated by other debhelper scripts. ++ ++#DEBHELPER# ++ ++ +--- nufw-2.2.21.orig/debian/libpam-nufw.dirs ++++ nufw-2.2.21/debian/libpam-nufw.dirs +@@ -0,0 +1 @@ ++lib/security +--- nufw-2.2.21.orig/debian/libnuclient3.install ++++ nufw-2.2.21/debian/libnuclient3.install +@@ -0,0 +1,2 @@ ++src/clients/lib/.libs/libnuclient.so.3.0.0 usr/lib ++src/clients/lib/.libs/libnuclient.so.3 usr/lib +--- nufw-2.2.21.orig/debian/nuauth-extra.docs ++++ nufw-2.2.21/debian/nuauth-extra.docs +@@ -0,0 +1,4 @@ ++conf/auth_mysql/auth_mysql.ipv4.mysql.dump ++conf/auth_mysql/auth_mysql.ipv6.mysql.dump ++conf/auth_mysql/check_net.mysql ++scripts/auth_mysql/authmysql +--- nufw-2.2.21.orig/debian/nuauth.preinst ++++ nufw-2.2.21/debian/nuauth.preinst +@@ -0,0 +1,50 @@ ++#!/bin/sh ++ ++set -e ++ ++# summary of how this script can be called: ++# * `install' ++# * `install' ++# * `upgrade' ++# * `abort-upgrade' ++ ++case "$1" in ++ install|upgrade) ++ # 1. create group if not existing ++ addgroup --quiet --system nuauth 2>/dev/null || true ++ # 2. create homedir if not existing ++ test -d /var/run/nuauth || mkdir -p /var/run/nuauth ++ # 3. create user if not existing ++ adduser --quiet \ ++ --system \ ++ --ingroup nuauth \ ++ --no-create-home \ ++ --disabled-password \ ++ nuauth 2>/dev/null || true ++ # 4. adjust passwd entry ++ usermod -c "Nuauth for NuFW" \ ++ -d /var/run/nuauth \ ++ -g nuauth \ ++ nuauth ++ # 5. adjust file and directory permissions ++ chown -R nuauth:nuauth /var/run/nuauth ++ chmod u=rwx,g=rx,o= /var/run/nuauth ++ ;; ++ configure) ++ ;; ++ abort-upgrade) ++ ;; ++ *) ++ echo "preinst called with unknown argument \`$1'" >&2 ++ exit 0 ++ ;; ++esac ++ ++# dh_installdeb will replace this with shell code automatically ++# generated by other debhelper scripts. ++ ++#DEBHELPER# ++ ++exit 0 ++ ++ +--- nufw-2.2.21.orig/debian/compat ++++ nufw-2.2.21/debian/compat +@@ -0,0 +1 @@ ++5 +--- nufw-2.2.21.orig/debian/watch ++++ nufw-2.2.21/debian/watch +@@ -0,0 +1,11 @@ ++# debian watch file ++# You can run the "uscan" command ++# to check for upstream updates and more. ++# See uscan(1) for format ++ ++# Compulsory line, this is a version 3 file ++version=3 ++ ++#http://nufw.org/download/nufw/nufw-2.2.3.tar.gz ++http://nufw.org/download/nufw/nufw-([0-9].*)\.tar\.gz ++ +--- nufw-2.2.21.orig/debian/nutcpc.docs ++++ nufw-2.2.21/debian/nutcpc.docs +@@ -0,0 +1,3 @@ ++NEWS ++README ++TODO +--- nufw-2.2.21.orig/debian/libnuclient-dev.dirs ++++ nufw-2.2.21/debian/libnuclient-dev.dirs +@@ -0,0 +1 @@ ++usr/include/nuclient +--- nufw-2.2.21.orig/debian/libpam-nufw.install ++++ nufw-2.2.21/debian/libpam-nufw.install +@@ -0,0 +1 @@ ++src/clients/pam_nufw/.libs/pam_nufw.so lib/security +--- nufw-2.2.21.orig/debian/nuauth-log-mysql.dirs ++++ nufw-2.2.21/debian/nuauth-log-mysql.dirs +@@ -0,0 +1 @@ ++usr/lib +--- nufw-2.2.21.orig/debian/nuauth.init ++++ nufw-2.2.21/debian/nuauth.init +@@ -0,0 +1,107 @@ ++#! /bin/sh ++# ++# Written by Miquel van Smoorenburg . ++# Modified for Debian ++# by Ian Murdock . ++# Customized for nuauth by Vincent Deffontaines ++# ++# ++ ++### BEGIN INIT INFO ++# Provides: nuauth ++# Required-Start: $syslog ++# Required-Stop: $syslog ++# Should-Start: $local_fs ++# Should-Stop: $local_fs ++# Default-Start: 2 3 4 5 ++# Default-Stop: 0 1 6 ++# Short-Description: Control script for nuauth ++# Description: Init script to control (start/stop/reload) ++# the nuauth server. ++### END INIT INFO ++ ++PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin ++DAEMON=/usr/sbin/nuauth ++PID=nuauth ++NAME=nuauth ++DESC=nuauth ++NUAUTH_START="no" ++ ++ ++test -x $DAEMON || exit 0 ++ ++# Include nuauth defaults if available ++if [ -f /etc/default/nuauth ] ; then ++ . /etc/default/nuauth ++fi ++ ++if [ "$NUAUTH_START" != "true" ]; then ++ exit 0 ++fi ++ ++if [ ! "$NUAUTH_VERBOSITY" ]; then ++ NUAUTH_VERBOSITY="vv" ++fi ++ ++if [ ! "$NUAUTH_USER" ]; then ++ echo "No user configured to run nuauth... Trying \"nobody\" ..." ++ NUAUTH_USER="nobody" ++fi ++ ++DAEMON_OPTS="-D -$NUAUTH_VERBOSITY" ++ ++set -e ++ ++case "$1" in ++ start) ++ # ubuntu wipes everything in /var/run at boot ++ if [ ! -d /var/run/nuauth ]; then ++ mkdir /var/run/nuauth ++ chown $NUAUTH_USER /var/run/nuauth ++ fi ++ echo -n "Starting $DESC: " ++ start-stop-daemon --start --quiet --pidfile /var/run/$PID/$PID.pid \ ++ --chuid $NUAUTH_USER --exec $DAEMON -- $DAEMON_OPTS ++ echo "$NAME." ++ ;; ++ stop) ++ echo -n "Stopping $DESC: " ++ start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/$PID/$PID.pid \ ++ --retry 5 --exec $DAEMON ++ echo "$NAME." ++ ;; ++ #reload) ++ # ++ # If the daemon can reload its config files on the fly ++ # for example by sending it SIGHUP, do it here. ++ # ++ # If the daemon responds to changes in its config file ++ # directly anyway, make this a do-nothing entry. ++ # ++ # echo "Reloading $DESC configuration files." ++ # start-stop-daemon --stop --signal 1 --quiet --pidfile \ ++ # /var/run/$NAME.pid --exec $DAEMON ++ #;; ++ restart|force-reload) ++ # ++ # If the "reload" option is implemented, move the "force-reload" ++ # option to the "reload" entry above. If not, "force-reload" is ++ # just the same as "restart". ++ # ++ echo -n "Restarting $DESC: " ++ start-stop-daemon --stop --quiet --oknodo --pidfile \ ++ /var/run/$PID/$PID.pid --retry 5 --exec $DAEMON ++ sleep 1 ++ start-stop-daemon --start --quiet --pidfile /var/run/$PID/$PID.pid \ ++ --chuid $NUAUTH_USER --exec $DAEMON -- $DAEMON_OPTS ++ echo "$NAME." ++ ;; ++ *) ++ N=/etc/init.d/$NAME ++ # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 ++ echo "Usage: $N {start|stop|restart|force-reload}" >&2 ++ exit 1 ++ ;; ++esac ++ ++exit 0 +--- nufw-2.2.21.orig/debian/nuauth-utils.dirs ++++ nufw-2.2.21/debian/nuauth-utils.dirs +@@ -0,0 +1 @@ ++etc/nufw +--- nufw-2.2.21.orig/debian/nufw.dirs ++++ nufw-2.2.21/debian/nufw.dirs +@@ -0,0 +1,2 @@ ++etc/nufw/certs ++usr/sbin +--- nufw-2.2.21.orig/debian/nuauth.docs ++++ nufw-2.2.21/debian/nuauth.docs +@@ -0,0 +1,4 @@ ++NEWS ++README ++TODO ++conf/acls.schema +--- nufw-2.2.21.orig/debian/pycompat ++++ nufw-2.2.21/debian/pycompat +@@ -0,0 +1 @@ ++2 +--- nufw-2.2.21.orig/debian/nufw.postinst ++++ nufw-2.2.21/debian/nufw.postinst +@@ -0,0 +1,31 @@ ++#!/bin/sh ++CONFIGFILE=/etc/default/nufw ++ ++set -e ++#set -x ++. /usr/share/debconf/confmodule ++ ++# ssl certificate generation ++if [ -x /usr/bin/openssl ]; then ++ if [ ! -e /etc/nufw/certs/nufw-key.pem ]; then ++ ++ make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/nufw/certs/nufw.pem ++ ++ if [ -f /etc/nufw/certs/nufw.pem ]; then ++ # split key and certificate data ++ openssl x509 -in /etc/nufw/certs/nufw.pem -out /etc/nufw/certs/nufw-cert.pem ++ openssl rsa -in /etc/nufw/certs/nufw.pem -out /etc/nufw/certs/nufw-key.pem ++ chmod 0600 /etc/nufw/certs/nufw-key.pem ++ rm -f /etc/nufw/certs/nufw.pem ++ find /etc/nufw/certs -type l -maxdepth 1 -delete ++ fi ++ ++ fi ++fi ++ ++db_stop ++ ++ ++#DEBHELPER# ++ ++exit 0 +--- nufw-2.2.21.orig/debian/libnuclient-dev.install ++++ nufw-2.2.21/debian/libnuclient-dev.install +@@ -0,0 +1,4 @@ ++src/clients/lib/.libs/libnuclient.so usr/lib ++src/clients/lib/libnuclient.la usr/lib ++src/clients/lib/nuclient.h usr/include/nuclient ++src/include/nufw_source.h usr/include/nuclient +--- nufw-2.2.21.orig/debian/changelog ++++ nufw-2.2.21/debian/changelog +@@ -0,0 +1,560 @@ ++nufw (2.2.21-4) unstable; urgency=high ++ ++ * Fix FTBFS against gnutls26 >= 2.7.x (Closes: #529841) ++ This required to run autogen.sh ++ * Urgency high because of above bug ++ * Update dependency on libmysqlclient-dev ++ * Bump standards version to 3.8.2 (no changes) ++ ++ -- Pierre Chifflier Sat, 15 Aug 2009 16:33:32 +0200 ++ ++nufw (2.2.21-3) unstable; urgency=low ++ ++ * Apply patch from Jérôme Soyer: ++ * Add more modules to nuauth: ++ - mark_field ++ - mark_flag ++ - session_authtype ++ * Add more modules to nuauth-extra: ++ - script ++ ++ -- Pierre Chifflier Tue, 10 Mar 2009 15:34:07 +0100 ++ ++nufw (2.2.21-2) unstable; urgency=low ++ ++ * Upload to unstable ++ ++ -- Pierre Chifflier Wed, 25 Feb 2009 12:03:36 +0100 ++ ++nufw (2.2.21-1) experimental; urgency=low ++ ++ * New upstream release ++ ++ -- Pierre Chifflier Wed, 04 Feb 2009 13:49:18 +0100 ++ ++nufw (2.2.20-2) experimental; urgency=low ++ ++ * Add Homepage field (Closes: #511453) ++ ++ -- Pierre Chifflier Mon, 19 Jan 2009 11:08:20 +0100 ++ ++nufw (2.2.20-1) experimental; urgency=low ++ ++ * New upstream release ++ ++ -- Pierre Chifflier Wed, 10 Dec 2008 13:36:54 +0100 ++ ++nufw (2.2.19-1) experimental; urgency=low ++ ++ * New upstream release ++ * Upstream uses strict TLS checking mode by default. Use less ++ strict, but easier to use configuration (see README.Debian) ++ ++ -- Pierre Chifflier Fri, 05 Dec 2008 10:21:05 +0100 ++ ++nufw (2.2.15-3) unstable; urgency=low ++ ++ * Rewrite certificate generation code to use make-ssl-cert (Closes: #497778) ++ ++ -- Pierre Chifflier Thu, 04 Sep 2008 13:49:00 +0200 ++ ++nufw (2.2.15-2) unstable; urgency=high ++ ++ * Remove rpath to insecure location (Closes: #495769) ++ * urgency=high because of RC bug ++ * Add dependency on rpath ++ * Bump standards version (no changes) ++ ++ -- Pierre Chifflier Mon, 25 Aug 2008 11:42:20 +0200 ++ ++nufw (2.2.15-1) unstable; urgency=low ++ ++ * New upstream release ++ * Rebuild with support for several python versions (Closes: #476238) ++ ++ -- Pierre Chifflier Tue, 15 Apr 2008 15:54:47 +0200 ++ ++nufw (2.2.14-2) unstable; urgency=low ++ ++ * Rebuild for python transition (Closes: #476173) ++ ++ -- Pierre Chifflier Tue, 15 Apr 2008 09:16:45 +0200 ++ ++nufw (2.2.14-1) unstable; urgency=low ++ ++ * New upstream release ++ * Debian directory is now separated from upstream ++ ++ -- Pierre Chifflier Tue, 08 Apr 2008 15:15:58 +0200 ++ ++nufw (2.2.13-2) unstable; urgency=low ++ ++ * Backport patch from upstream to fix build (error with inline functions) ++ ++ -- Pierre Chifflier Thu, 03 Apr 2008 11:50:15 +0200 ++ ++nufw (2.2.13-1) unstable; urgency=low ++ ++ * New upstream release ++ ++ -- Pierre Chifflier Wed, 02 Apr 2008 12:12:11 +0200 ++ ++nufw (2.2.11-2) unstable; urgency=low ++ ++ * Fix bashism in NuFW init script (Closes: #465013) ++ * Fix spelling in control (mysql -> MySQL) ++ ++ -- Pierre Chifflier Sun, 10 Feb 2008 18:22:09 +0100 ++ ++nufw (2.2.11-1) unstable; urgency=low ++ ++ * New upstream release ++ * Bump standards version ++ ++ -- Pierre Chifflier Wed, 09 Jan 2008 09:24:33 +0100 ++ ++nufw (2.2.10-2) unstable; urgency=low ++ ++ * Add python-ipy to build-deps ++ ++ -- Pierre Chifflier Wed, 05 Dec 2007 14:13:55 +0100 ++ ++nufw (2.2.10-1) unstable; urgency=low ++ ++ * New upstream release ++ ++ -- Pierre Chifflier Wed, 05 Dec 2007 09:37:11 +0100 ++ ++nufw (2.2.9-3) unstable; urgency=low ++ ++ * Change build order and tell dh_shlibdeps to search libs in correct dir .. ++ ++ -- Pierre Chifflier Fri, 30 Nov 2007 13:47:36 +0100 ++ ++nufw (2.2.9-2) unstable; urgency=low ++ ++ * Tell dh_shlibdeps to use libnuclient3 ++ ++ -- Pierre Chifflier Fri, 30 Nov 2007 12:01:34 +0100 ++ ++nufw (2.2.9-1) unstable; urgency=low ++ ++ * New upstream release ++ ++ -- Pierre Chifflier Mon, 26 Nov 2007 12:17:37 +0100 ++ ++nufw (2.2.8-1) unstable; urgency=low ++ ++ * New upstream release ++ * Create directory /var/run/nuauth in package ++ * Do not use --enable-debug, so it does not flood the log with debug ++ messages ++ ++ -- Pierre Chifflier Tue, 13 Nov 2007 13:56:41 +0100 ++ ++nufw (2.2.7-1) unstable; urgency=low ++ ++ * New upstream release ++ ++ -- Pierre Chifflier Mon, 29 Oct 2007 20:09:27 +0100 ++ ++nufw (2.2.6-3) unstable; urgency=low ++ ++ * Enable Prelude module ++ ++ -- Pierre Chifflier Sun, 28 Oct 2007 09:36:37 +0100 ++ ++nufw (2.2.6-2) unstable; urgency=low ++ ++ * Make libnuclient-dev depend on libnuclient3 ++ ++ -- Pierre Chifflier Fri, 26 Oct 2007 17:53:04 +0200 ++ ++nufw (2.2.6-1) unstable; urgency=low ++ ++ * New upstream release ++ ++ -- Pierre Chifflier Wed, 10 Oct 2007 11:57:28 +0200 ++ ++nufw (2.2.5-2) unstable; urgency=low ++ ++ * Add binary package libnuclient-dev ++ ++ -- Pierre Chifflier Wed, 12 Sep 2007 21:41:39 +0200 ++ ++nufw (2.2.5-1) unstable; urgency=low ++ ++ * New upstream release ++ ++ -- Pierre Chifflier Tue, 11 Sep 2007 16:05:35 +0200 ++ ++nufw (2.2.4-1) unstable; urgency=low ++ ++ * New upstream release ++ * Add nuauth-command script to nuauth-utils ++ * Use python-support for nuauth-utils ++ * Update nuauth-utils dependencies ++ ++ -- Pierre Chifflier Mon, 20 Aug 2007 23:18:37 +0200 ++ ++nufw (2.2.3-2) unstable; urgency=low ++ ++ * Fix init script (Closes: #436958) ++ * Move system files to nuauth (Closes: #427973) ++ * Add --retry to really wait for script exit ++ ++ -- Pierre Chifflier Mon, 13 Aug 2007 15:14:06 +0200 ++ ++nufw (2.2.3-1) unstable; urgency=low ++ ++ * New upstream release ++ * Add watch file ++ * Update my mail address ++ ++ -- Pierre Chifflier Sun, 05 Aug 2007 22:28:35 +0200 ++ ++nufw (2.2.2-2) unstable; urgency=low ++ ++ * Also move system backend to nuauth (Closes: #427973) ++ ++ -- Pierre Chifflier Wed, 04 Jul 2007 11:30:30 +0200 ++ ++nufw (2.2.2-1) unstable; urgency=medium ++ ++ * New upstream release ++ + restore compatibility with 2.0 versions ++ + not compatible with 2.2.1 ++ * Do not include plaintext files in nuauth-extra (Closes: #427973) ++ * Urgency=medium because of RC bug ++ ++ -- Pierre Chifflier Tue, 26 Jun 2007 16:48:15 +0200 ++ ++nufw (2.2.1-1) unstable; urgency=low ++ ++ * New upstream release ++ * Change build dependency from postgresql-dev to libpq-dev ++ ++ -- Pierre Chifflier Mon, 18 Jun 2007 11:22:34 +0200 ++ ++nufw (2.2.0-3) unstable; urgency=high ++ ++ * Move module plaintext to nuauth (Closes: #427973) ++ * Urgency=high because of RC bug ++ * Remove dependency on libnuclient3, now correctly detected by dh_shlibdeps ++ ++ -- Pierre Chifflier Fri, 08 Jun 2007 11:36:36 +0200 ++ ++nufw (2.2.0-2) unstable; urgency=high ++ ++ * Conficts/Replaces package libnuclient (Closes: #427611) ++ * Urgency=high because of RC bug ++ ++ -- Pierre Chifflier Tue, 05 Jun 2007 14:44:13 +0200 ++ ++nufw (2.2.0-1) unstable; urgency=low ++ ++ * New upstream release ++ * Complete rewrite of the package ++ * Remove templates (Closes: #414507, #420931, #361428) ++ * Set nuauth-utils arch to all (Closes: #419923) ++ * Set myself as Maintainer, with Jean-Michel's agreement ++ * Update libnuclient files location ++ * Update copyright file ++ * Update dependencies on debconf ++ * Spell check packages descriptions ++ * Add LSB sections to init scripts ++ * Remove dependencies on libnetfilter*, detected by dh_shlibdeps ++ * Rename libnuclient to libnuclient3 ++ * Remove debconf stuff, not needed ++ * Use ucf for nuauth.conf ++ ++ -- Pierre Chifflier Tue, 29 May 2007 09:26:17 +0200 ++ ++nufw (2.0.16-1) unstable; urgency=low ++ ++ * New upstream release (Closes: #411515) ++ * Ack NMU (Closes: #378385) ++ * Add myself to Uploaders ++ * Bump Standards version to 3.7.2 ++ * Add LSB sections to init scripts ++ * Update depends on debconf ++ * Change libpam-nufw description to be less than 80 characters ++ * Change dependency to libpq-dev (Closes: #409768) ++ * Update Czech template (Closes: #412697) ++ ++ -- Pierre Chifflier Fri, 16 Mar 2007 16:24:56 +0100 ++ ++nufw (2.0.9-5.2) unstable; urgency=high ++ ++ * Non-maintainer upload. ++ * Added nauth: missing pre-dep on passwd (Closes: #408269) ++ - added pre-dep on adduser too, since it uses adduser in preinst ++ * Urgency high due RCness ++ ++ -- Bastian Venthur Thu, 1 Feb 2007 11:54:30 +0100 ++ ++nufw (2.0.9-5.1) unstable; urgency=low ++ ++ * Non-maintainer upload to fix longstanding l10n issues ++ * Add debconf-updatepo to the clean target in debian/rules ++ Closes: #349839 ++ * add the nufw20.templates and nuauth20.templates files to ++ debian/po/POTFILES.in so that these files are translated too ++ * General rewrite of the debconf templates in a desperate attempt to ++ have them DevRef compliant, remove untranslatable strings and, ++ unfortunately, drive translators crazy. Closes: #361423 ++ * Fix typo in the package description. Closes: #390090 ++ * Lintian fixes: ++ - Remove redundant declaration of conffiles in /etc. Closes: #356772 ++ * Debconf translation updates: ++ - French updated ++ - Czech updated. Closes: #345142 ++ - Swedish updated. Closes: #347608 ++ - German added. Sent during the call for updates for the NMU campaign. ++ - Russian added. Sent during the call for updates for the NMU campaign. ++ ++ -- Christian Perrier Sun, 3 Dec 2006 12:14:00 +0100 ++ ++nufw (2.0.9-5) unstable; urgency=low ++ ++ * One more patch for compilation on hppa. ++ ++ -- Jean-Michel Kelbert Sat, 2 Dec 2006 12:31:12 +0100 ++ ++nufw (2.0.9-4) unstable; urgency=low ++ ++ * Apply a patch provided by upstream to compile on hppa. This time it should ++ work ! ++ ++ -- Jean-Michel Kelbert Tue, 28 Nov 2006 21:12:17 +0100 ++ ++nufw ++(2.0.9-3) unstable; urgency=low ++ ++ * Apply a patch provided by upstream to compile on hppa. ++ ++ -- Jean-Michel Kelbert Thu, 9 Nov 2006 21:41:03 +0100 ++ ++nufw (2.0.9-2) unstable; urgency=low ++ ++ * Change copyright file to not include the entire GPL. ++ ++ -- Jean-Michel Kelbert Wed, 1 Nov 2006 20:04:30 +0100 ++ ++nufw (2.0.9-1) unstable; urgency=low ++ ++ * New upstream release. ++ * Adapt packaging to version 2. ++ * Many thanks to Vincent Deffontaines for its packaging. ++ ++ -- Jean-Michel Kelbert Mon, 9 Oct 2006 21:58:20 +0200 ++ ++nufw (1.0.23-1.1) unstable; urgency=high ++ ++ * Non-maintainer upload. ++ * Unbreak syntactically wrong debconf template, which caused problems ++ during package installation. (Closes: #360581) ++ ++ -- Steinar H. Gunderson Sun, 16 Jul 2006 00:02:00 +0200 ++ ++nufw (1.0.23-1) unstable; urgency=low ++ ++ * New upstream release ++ * Update debconf configuration to take care of new options. ++ * Upgrade build depends to libmysqlclient15-dev ++ (closes: #356719) ++ ++ -- Jean-Michel Kelbert Thu, 30 Mar 2006 21:01:38 +0200 ++ ++nufw (1.0.16-1) unstable; urgency=low ++ ++ * New upstream release. This is a security release. The NuFW team has ++ identified a problem that could lead to Denial of Service from legitimate ++ users of the authentication service. ++ This has been assigned CVE-2005-3950. ++ (closes: #341544) ++ * Add debconf-updatepo in debian/rules. ++ (closes: #329942) ++ * Add debconf-2.0 as an alternate to debconf. ++ (closes: #332049) ++ * Use gnutls12 instead of gnutls11. ++ (closes: #335769) ++ * Update the French translation for debconf. ++ (closes: #332575) ++ * Add the Swedish translation for debconf. ++ (closes: #336780) ++ ++ -- Jean-Michel Kelbert Tue, 27 Dec 2005 17:04:58 +0100 ++ ++nufw (1.0.13-1) unstable; urgency=low ++ ++ * New upstream release ++ ++ -- Jean-Michel Kelbert Sun, 16 Oct 2005 18:12:39 +0200 ++ ++nufw (1.0.11-1) unstable; urgency=low ++ ++ * Add the Vietnamese translation for debconf. ++ (closes: #316322) ++ * Add the French translation for debconf. ++ (closes: #307763) ++ * Add the Czech translation for debconf. ++ (closes: #310700) ++ ++ -- Jean-Michel Kelbert Fri, 2 Sep 2005 22:02:12 +0200 ++ ++nufw (1.0.10-1) stable; urgency=low ++ ++ * new upstream release ++ ++ -- Eric Leblond Mon, 4 Jul 2005 11:32:01 +0200 ++ ++nufw (1.0.8-1) unstable; urgency=low ++ ++ * new upstream release ++ ++ -- Eric Leblond Fri, 10 Jun 2005 15:46:35 +0200 ++ ++nufw (1.0.7-1) unstable; urgency=low ++ ++ * new upstream release ++ ++ -- Eric Leblond Wed, 8 Jun 2005 09:46:42 +0200 ++ ++nufw (1.0.6-1) unstable; urgency=low ++ ++ * new upstream release ++ ++ -- Eric Leblond Thu, 2 Jun 2005 21:56:16 +0200 ++ ++nufw (1.0.5-1) unstable; urgency=low ++ ++ * new upstream release ++ ++ -- Eric Leblond Thu, 12 May 2005 12:20:42 +0200 ++ ++nufw (1.0.3-1) unstable; urgency=low ++ ++ * new upstream release ++ ++ -- Eric Leblond Wed, 20 Apr 2005 09:17:25 +0200 ++ ++nufw (1.0.2-1) unstable; urgency=low ++ ++ * new upstream release ++ ++ -- Eric Leblond Tue, 29 Mar 2005 07:16:56 +0200 ++ ++nufw (1.0.1-1) unstable; urgency=low ++ ++ * New upstream release. ++ ++ -- Eric Leblond Tue, 15 Mar 2005 23:22:12 +0100 ++ ++nufw (1.0-1) unstable; urgency=low ++ ++ * New upstream release. ++ * Add --with-system-auth to configure in debian/rules to support PAM+NSS ++ authentication. ++ * Add --with-ldap to support LDAP directory for users and acl lookup. ++ * Add --with-gdbm to support gdbm users lookup. ++ * Add --with-ident to support support ident users authentication. ++ * Add libgcrypt11-dev, libgnutls11-dev, libident-dev, libpam-dev to ++ Build-Depends. ++ * Add postrm and preinst for nuauth. ++ ++ -- Jean-Michel Kelbert Tue, 22 Feb 2005 22:53:22 +0100 ++ ++nufw (0.8.5-3) unstable; urgency=low ++ ++ * Change debian/copyright to reflect changes made by upstreams to the ++ license. ++ * Initial upload in Debian. Thanks to Vincent Deffontaines for packaging the ++ package before me. ++ (closes: #258746) ++ ++ -- Jean-Michel Kelbert Mon, 20 Dec 2004 22:23:16 +0100 ++ ++nufw (0.8.5-1) unstable; urgency=low ++ ++ * New upstream release. ++ * Upstream add an exception to the GPL which allows linking with OpenSSL. ++ ++ -- Jean-Michel Kelbert Wed, 1 Sep 2004 23:03:10 +0200 ++ ++nufw (0.8.2-1) unstable; urgency=low ++ ++ * Update Description in debian/control. Thanks to Brandon Robinson. ++ * Switch to gettext for the debconf templates. ++ * Change the way of packaging. ++ * Correct minor policy violations. ++ ++ -- Jean-Michel Kelbert Fri, 30 Jul 2004 13:41:25 +0200 ++ ++nufw (0.8.1-1) unstable; urgency=low ++ ++ * New upstream version. Adds a paquet for libnuclient, the client ++ authentication library. ++ ++ -- Vincent Deffontaines Mon, 19 Jul 2004 21:23:13 +0200 ++ ++nufw (0.8.0-1) unstable; urgency=low ++ ++ * New upstream version. Adds the strict logs update option, together with ++ some scaling bugfix, that would cause nuauth to grow heavily on some ++ particular [DoS] conditions. ++ ++ -- Vincent Deffontaines Mon, 5 Jul 2004 21:23:13 +0200 ++ ++nufw (0.7.1-1) unstable; urgency=low ++ ++ * New upstream version. Fixes some bug that would rarely memleak nuauth. ++ Adds the SQL sync option. ++ ++ -- Vincent Deffontaines Fri, 11 Jun 2004 18:08:19 +0200 ++ ++nufw (0.7.0-1) unstable; urgency=low ++ ++ * New upstream version. 0.7.0 is the first release with SSL connections all ++ the way. ++ ++ -- Vincent Deffontaines Tue, 30 Mar 2004 21:18:37 +0200 ++ ++nufw (0.6.5-1) unstable; urgency=low ++ ++ * New upstream version ++ ++ -- Vincent Deffontaines Sun, 14 Mar 2004 18:52:38 +0100 ++ ++nufw (0.6.4-1) unstable; urgency=low ++ ++ * New upstream version ++ * Splitted debian nuauth packages into 3, so that modules support is ... ++ modular ++ ++ -- Vincent Deffontaines Wed, 7 Jan 2004 23:49:34 +0100 ++ ++nufw (0.6.3-1) unstable; urgency=low ++ ++ * Nesw upstream version ++ ++ -- Vincent Deffontaines Wed, 7 Jan 2004 00:33:47 +0100 ++ ++nufw (0.6.2-1) unstable; urgency=low ++ ++ * Upstream changed to 0.6.2 ++ ++ -- Vincent Deffontaines Sun, 4 Jan 2004 23:42:57 +0100 ++ ++nufw (0.6.1-1) unstable; urgency=low ++ ++ * Upstream changed to 0.6.1 ++ ++ -- Vincent Deffontaines Mon, 22 Dec 2003 15:55:24 +0100 ++ ++nufw (0.5.4-1) unstable; urgency=low ++ ++ * Initial Release. ++ ++ -- Vincent Deffontaines Thu, 13 Nov 2003 13:03:54 +0100 ++ +--- nufw-2.2.21.orig/debian/nuauth-log-pgsql.dirs ++++ nufw-2.2.21/debian/nuauth-log-pgsql.dirs +@@ -0,0 +1 @@ ++usr/lib +--- nufw-2.2.21.orig/selinux/Makefile.in ++++ nufw-2.2.21/selinux/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -72,6 +72,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -84,9 +86,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -97,6 +96,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -105,6 +105,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -164,6 +165,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + EXTRA_DIST = nuauth.fc nuauth.if nuauth.te nufw.fc nufw.if nufw.te README.selinux +@@ -176,8 +178,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +--- nufw-2.2.21.orig/doc/Makefile.in ++++ nufw-2.2.21/doc/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.10.1 from Makefile.am. ++# Makefile.in generated by automake 1.10.2 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -80,6 +80,8 @@ + GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ + GLIB_LIBS = @GLIB_LIBS@ + GLIB_MKENUMS = @GLIB_MKENUMS@ ++GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + GOBJECT_QUERY = @GOBJECT_QUERY@ + GREP = @GREP@ + INSTALL = @INSTALL@ +@@ -92,9 +94,6 @@ + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +-LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +-LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ +-LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -105,6 +104,7 @@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ ++OBJDUMP = @OBJDUMP@ + OBJEXT = @OBJEXT@ + OTOOL = @OTOOL@ + OTOOL64 = @OTOOL64@ +@@ -113,6 +113,7 @@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ +@@ -172,6 +173,7 @@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + man_MANS = nuaclgen.8 nuauth.8 nufw.8 nutcpc.1 nutop.8 libnuclient.3 nuclient.conf.5 +@@ -191,8 +193,8 @@ + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +- && exit 0; \ ++ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ++ && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ +@@ -233,8 +235,8 @@ + esac; \ + done; \ + for i in $$list; do \ +- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ +- else file=$$i; fi; \ ++ if test -f $$i; then file=$$i; \ ++ else file=$(srcdir)/$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ +@@ -278,8 +280,8 @@ + esac; \ + done; \ + for i in $$list; do \ +- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ +- else file=$$i; fi; \ ++ if test -f $$i; then file=$$i; \ ++ else file=$(srcdir)/$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 3*) ;; \ +@@ -323,8 +325,8 @@ + esac; \ + done; \ + for i in $$list; do \ +- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ +- else file=$$i; fi; \ ++ if test -f $$i; then file=$$i; \ ++ else file=$(srcdir)/$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 5*) ;; \ +@@ -368,8 +370,8 @@ + esac; \ + done; \ + for i in $$list; do \ +- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ +- else file=$$i; fi; \ ++ if test -f $$i; then file=$$i; \ ++ else file=$(srcdir)/$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 8*) ;; \ diff --git a/net/nzbget/Makefile b/net/nzbget/Makefile new file mode 100644 index 0000000..eea709b --- /dev/null +++ b/net/nzbget/Makefile @@ -0,0 +1,72 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nzbget +PKG_VERSION:=0.7.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/nzbget +PKG_MD5SUM:=27971846aba75f5e312d80dce7edbc5d + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +TARGET_LDFLAGS+=-Wl,-rpath-link="$(STAGING_DIR)/usr/lib" +TARGET_CFLAGS += $(FPIC) + +define Package/nzbget + SUBMENU:=NNTP + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libxml2 +libpar2 +libopenssl +libpthread +libncurses + URL:=http://nzbget.sourceforge.net/ + TITLE:=Binary newsgrabber for nzb-files + MAINTAINER:=Artur Wronowski +endef + +define Package/nzbget/description +A command-line client/server based binary newsgrabber for nzb-files. +endef + +CONFIGURE_ARGS += \ + --disable-static \ + --disable-nls \ + --with-tlslib=OpenSSL \ + --with-libpar2-includes=$(STAGING_DIR)/usr/include/libpar2 \ + --with-libpar2-libraries=$(STAGING_DIR)/usr/lib \ + --with-libsigc-includes=$(STAGING_DIR)/usr/include/sigc++-2.0 \ + --with-libsigc-libraries=$(STAGING_DIR)/usr/lib \ + --with-openssl-includes=$(STAGING_DIR)/usr/include \ + --with-openssl-libraries=$(STAGING_DIR)/usr/lib \ + --with-libcurses-includes=$(STAGING_DIR)/usr/include \ + --with-libcurses-libraries=$(STAGING_DIR)/usr/lib \ + , \ + PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" + +CONFIGURE_VARS += \ + ac_cv_header_regex_h=no \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include/libxml2 $$$$CPPFLAGS" + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install all +endef + +define Package/nzbget/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/nzbget $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) $(PKG_BUILD_DIR)/nzbget.conf.example $(1)/etc/nzbget.conf +endef + +$(eval $(call BuildPackage,nzbget)) diff --git a/net/nzbget/patches/001-openssl-1.0.0-compat.patch b/net/nzbget/patches/001-openssl-1.0.0-compat.patch new file mode 100644 index 0000000..04374ab --- /dev/null +++ b/net/nzbget/patches/001-openssl-1.0.0-compat.patch @@ -0,0 +1,32 @@ +--- a/TLS.cpp ++++ b/TLS.cpp +@@ -908,7 +908,7 @@ int tls_check_cert(tls_t *tls, const cha + char *buf; + int bufsize; + /* needed to get the DNS subjectAltNames: */ +- STACK *subj_alt_names; ++ STACK_OF(GENERAL_NAME) *subj_alt_names; + int subj_alt_names_count; + GENERAL_NAME *subj_alt_name; + /* did we find a name matching hostname? */ +@@ -960,7 +960,7 @@ int tls_check_cert(tls_t *tls, const cha + /* Try the DNS subjectAltNames. */ + match_found = 0; + if ((subj_alt_names = +- (STACK*)X509_get_ext_d2i(x509cert, NID_subject_alt_name, NULL, NULL))) ++ (STACK_OF(GENERAL_NAME) *)X509_get_ext_d2i(x509cert, NID_subject_alt_name, NULL, NULL))) + { + subj_alt_names_count = sk_GENERAL_NAME_num(subj_alt_names); + for (i = 0; i < subj_alt_names_count; i++) +@@ -1105,7 +1105,11 @@ int tls_init(tls_t *tls, const char *key + + #ifdef HAVE_OPENSSL + ++ #if OPENSSL_VERSION_NUMBER >= 0x10000000L ++ const SSL_METHOD *ssl_method = NULL; ++ #else + SSL_METHOD *ssl_method = NULL; ++ #endif + + ssl_method = force_sslv3 ? SSLv3_client_method() : SSLv23_client_method(); + if (!ssl_method) diff --git a/net/nzbgetweb/Makefile b/net/nzbgetweb/Makefile new file mode 100644 index 0000000..9e30178 --- /dev/null +++ b/net/nzbgetweb/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nzbgetweb +PKG_VERSION:=1.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip +PKG_SOURCE_URL:=@SF/nzbget +PKG_MD5SUM:=78ccce66f9df07ee69250ec79819c37c + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/nzbgetweb + +include $(INCLUDE_DIR)/package.mk + +define Package/nzbgetweb + SUBMENU:=NNTP + SECTION:=net + CATEGORY:=Network + DEPENDS:=+nzbget +php5 +php5-cgi +php5-mod-session +php5-mod-gd +php5-mod-xml +uhttpd + URL:=http://nzbget.sourceforge.net/ + TITLE:=Web interface for nzbget + MAINTAINER:=Artur Wronowski +endef + +define Package/nzbgetweb/description +Web interface for nzbget. +endef + +define Package/nzbgetweb/postinst +#!/bin/sh +uci batch < +// $Id: xmlrpc.inc,v 1.174 2009/03/16 19:36:38 ggiunta Exp $ + +// Copyright (c) 1999,2000,2002 Edd Dumbill. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * 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. +// +// * Neither the name of the "XML-RPC for PHP" 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 COPYRIGHT HOLDERS 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(!function_exists('xml_parser_create')) + { + // For PHP 4 onward, XML functionality is always compiled-in on windows: + // no more need to dl-open it. It might have been compiled out on *nix... + if(strtoupper(substr(PHP_OS, 0, 3) != 'WIN')) + { + dl('xml.so'); + } + } + + // G. Giunta 2005/01/29: declare global these variables, + // so that xmlrpc.inc will work even if included from within a function + // Milosch: 2005/08/07 - explicitly request these via $GLOBALS where used. + $GLOBALS['xmlrpcI4']='i4'; + $GLOBALS['xmlrpcInt']='int'; + $GLOBALS['xmlrpcBoolean']='boolean'; + $GLOBALS['xmlrpcDouble']='double'; + $GLOBALS['xmlrpcString']='string'; + $GLOBALS['xmlrpcDateTime']='dateTime.iso8601'; + $GLOBALS['xmlrpcBase64']='base64'; + $GLOBALS['xmlrpcArray']='array'; + $GLOBALS['xmlrpcStruct']='struct'; + $GLOBALS['xmlrpcValue']='undefined'; + + $GLOBALS['xmlrpcTypes']=array( + $GLOBALS['xmlrpcI4'] => 1, + $GLOBALS['xmlrpcInt'] => 1, + $GLOBALS['xmlrpcBoolean'] => 1, + $GLOBALS['xmlrpcString'] => 1, + $GLOBALS['xmlrpcDouble'] => 1, + $GLOBALS['xmlrpcDateTime'] => 1, + $GLOBALS['xmlrpcBase64'] => 1, + $GLOBALS['xmlrpcArray'] => 2, + $GLOBALS['xmlrpcStruct'] => 3 + ); + + $GLOBALS['xmlrpc_valid_parents'] = array( + 'VALUE' => array('MEMBER', 'DATA', 'PARAM', 'FAULT'), + 'BOOLEAN' => array('VALUE'), + 'I4' => array('VALUE'), + 'INT' => array('VALUE'), + 'STRING' => array('VALUE'), + 'DOUBLE' => array('VALUE'), + 'DATETIME.ISO8601' => array('VALUE'), + 'BASE64' => array('VALUE'), + 'MEMBER' => array('STRUCT'), + 'NAME' => array('MEMBER'), + 'DATA' => array('ARRAY'), + 'ARRAY' => array('VALUE'), + 'STRUCT' => array('VALUE'), + 'PARAM' => array('PARAMS'), + 'METHODNAME' => array('METHODCALL'), + 'PARAMS' => array('METHODCALL', 'METHODRESPONSE'), + 'FAULT' => array('METHODRESPONSE'), + 'NIL' => array('VALUE'), // only used when extension activated + 'EX:NIL' => array('VALUE') // only used when extension activated + ); + + // define extra types for supporting NULL (useful for json or ) + $GLOBALS['xmlrpcNull']='null'; + $GLOBALS['xmlrpcTypes']['null']=1; + + // Not in use anymore since 2.0. Shall we remove it? + /// @deprecated + $GLOBALS['xmlEntities']=array( + 'amp' => '&', + 'quot' => '"', + 'lt' => '<', + 'gt' => '>', + 'apos' => "'" + ); + + // tables used for transcoding different charsets into us-ascii xml + + $GLOBALS['xml_iso88591_Entities']=array(); + $GLOBALS['xml_iso88591_Entities']['in'] = array(); + $GLOBALS['xml_iso88591_Entities']['out'] = array(); + for ($i = 0; $i < 32; $i++) + { + $GLOBALS['xml_iso88591_Entities']['in'][] = chr($i); + $GLOBALS['xml_iso88591_Entities']['out'][] = '&#'.$i.';'; + } + for ($i = 160; $i < 256; $i++) + { + $GLOBALS['xml_iso88591_Entities']['in'][] = chr($i); + $GLOBALS['xml_iso88591_Entities']['out'][] = '&#'.$i.';'; + } + + /// @todo add to iso table the characters from cp_1252 range, i.e. 128 to 159? + /// These will NOT be present in true ISO-8859-1, but will save the unwary + /// windows user from sending junk (though no luck when reciving them...) + /* + $GLOBALS['xml_cp1252_Entities']=array(); + for ($i = 128; $i < 160; $i++) + { + $GLOBALS['xml_cp1252_Entities']['in'][] = chr($i); + } + $GLOBALS['xml_cp1252_Entities']['out'] = array( + '€', '?', '‚', 'ƒ', + '„', '…', '†', '‡', + 'ˆ', '‰', 'Š', '‹', + 'Œ', '?', 'Ž', '?', + '?', '‘', '’', '“', + '”', '•', '–', '—', + '˜', '™', 'š', '›', + 'œ', '?', 'ž', 'Ÿ' + ); + */ + + $GLOBALS['xmlrpcerr'] = array( + 'unknown_method'=>1, + 'invalid_return'=>2, + 'incorrect_params'=>3, + 'introspect_unknown'=>4, + 'http_error'=>5, + 'no_data'=>6, + 'no_ssl'=>7, + 'curl_fail'=>8, + 'invalid_request'=>15, + 'no_curl'=>16, + 'server_error'=>17, + 'multicall_error'=>18, + 'multicall_notstruct'=>9, + 'multicall_nomethod'=>10, + 'multicall_notstring'=>11, + 'multicall_recursion'=>12, + 'multicall_noparams'=>13, + 'multicall_notarray'=>14, + + 'cannot_decompress'=>103, + 'decompress_fail'=>104, + 'dechunk_fail'=>105, + 'server_cannot_decompress'=>106, + 'server_decompress_fail'=>107 + ); + + $GLOBALS['xmlrpcstr'] = array( + 'unknown_method'=>'Unknown method', + 'invalid_return'=>'Invalid return payload: enable debugging to examine incoming payload', + 'incorrect_params'=>'Incorrect parameters passed to method', + 'introspect_unknown'=>"Can't introspect: method unknown", + 'http_error'=>"Didn't receive 200 OK from remote server.", + 'no_data'=>'No data received from server.', + 'no_ssl'=>'No SSL support compiled in.', + 'curl_fail'=>'CURL error', + 'invalid_request'=>'Invalid request payload', + 'no_curl'=>'No CURL support compiled in.', + 'server_error'=>'Internal server error', + 'multicall_error'=>'Received from server invalid multicall response', + 'multicall_notstruct'=>'system.multicall expected struct', + 'multicall_nomethod'=>'missing methodName', + 'multicall_notstring'=>'methodName is not a string', + 'multicall_recursion'=>'recursive system.multicall forbidden', + 'multicall_noparams'=>'missing params', + 'multicall_notarray'=>'params is not an array', + + 'cannot_decompress'=>'Received from server compressed HTTP and cannot decompress', + 'decompress_fail'=>'Received from server invalid compressed HTTP', + 'dechunk_fail'=>'Received from server invalid chunked HTTP', + 'server_cannot_decompress'=>'Received from client compressed HTTP request and cannot decompress', + 'server_decompress_fail'=>'Received from client invalid compressed HTTP request' + ); + + // The charset encoding used by the server for received messages and + // by the client for received responses when received charset cannot be determined + // or is not supported + $GLOBALS['xmlrpc_defencoding']='UTF-8'; + + // The encoding used internally by PHP. + // String values received as xml will be converted to this, and php strings will be converted to xml + // as if having been coded with this + $GLOBALS['xmlrpc_internalencoding']='ISO-8859-1'; + + $GLOBALS['xmlrpcName']='XML-RPC for PHP'; + $GLOBALS['xmlrpcVersion']='3.0.0.beta'; + + // let user errors start at 800 + $GLOBALS['xmlrpcerruser']=800; + // let XML parse errors start at 100 + $GLOBALS['xmlrpcerrxml']=100; + + // formulate backslashes for escaping regexp + // Not in use anymore since 2.0. Shall we remove it? + /// @deprecated + $GLOBALS['xmlrpc_backslash']=chr(92).chr(92); + + // set to TRUE to enable correct decoding of and values + $GLOBALS['xmlrpc_null_extension']=false; + + // set to TRUE to enable encoding of php NULL values to instead of + $GLOBALS['xmlrpc_null_apache_encoding']=false; + + // used to store state during parsing + // quick explanation of components: + // ac - used to accumulate values + // isf - used to indicate a parsing fault (2) or xmlrpcresp fault (1) + // isf_reason - used for storing xmlrpcresp fault string + // lv - used to indicate "looking for a value": implements + // the logic to allow values with no types to be strings + // params - used to store parameters in method calls + // method - used to store method name + // stack - array with genealogy of xml elements names: + // used to validate nesting of xmlrpc elements + $GLOBALS['_xh']=null; + + /** + * Convert a string to the correct XML representation in a target charset + * To help correct communication of non-ascii chars inside strings, regardless + * of the charset used when sending requests, parsing them, sending responses + * and parsing responses, an option is to convert all non-ascii chars present in the message + * into their equivalent 'charset entity'. Charset entities enumerated this way + * are independent of the charset encoding used to transmit them, and all XML + * parsers are bound to understand them. + * Note that in the std case we are not sending a charset encoding mime type + * along with http headers, so we are bound by RFC 3023 to emit strict us-ascii. + * + * @todo do a bit of basic benchmarking (strtr vs. str_replace) + * @todo make usage of iconv() or recode_string() or mb_string() where available + */ + function xmlrpc_encode_entitites($data, $src_encoding='', $dest_encoding='') + { + if ($src_encoding == '') + { + // lame, but we know no better... + $src_encoding = $GLOBALS['xmlrpc_internalencoding']; + } + + switch(strtoupper($src_encoding.'_'.$dest_encoding)) + { + case 'ISO-8859-1_': + case 'ISO-8859-1_US-ASCII': + $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); + $escaped_data = str_replace($GLOBALS['xml_iso88591_Entities']['in'], $GLOBALS['xml_iso88591_Entities']['out'], $escaped_data); + break; + case 'ISO-8859-1_UTF-8': + $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); + $escaped_data = utf8_encode($escaped_data); + break; + case 'ISO-8859-1_ISO-8859-1': + case 'US-ASCII_US-ASCII': + case 'US-ASCII_UTF-8': + case 'US-ASCII_': + case 'US-ASCII_ISO-8859-1': + case 'UTF-8_UTF-8': + //case 'CP1252_CP1252': + $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); + break; + case 'UTF-8_': + case 'UTF-8_US-ASCII': + case 'UTF-8_ISO-8859-1': + // NB: this will choke on invalid UTF-8, going most likely beyond EOF + $escaped_data = ''; + // be kind to users creating string xmlrpcvals out of different php types + $data = (string) $data; + $ns = strlen ($data); + for ($nn = 0; $nn < $ns; $nn++) + { + $ch = $data[$nn]; + $ii = ord($ch); + //1 7 0bbbbbbb (127) + if ($ii < 128) + { + /// @todo shall we replace this with a (supposedly) faster str_replace? + switch($ii){ + case 34: + $escaped_data .= '"'; + break; + case 38: + $escaped_data .= '&'; + break; + case 39: + $escaped_data .= '''; + break; + case 60: + $escaped_data .= '<'; + break; + case 62: + $escaped_data .= '>'; + break; + default: + $escaped_data .= $ch; + } // switch + } + //2 11 110bbbbb 10bbbbbb (2047) + else if ($ii>>5 == 6) + { + $b1 = ($ii & 31); + $ii = ord($data[$nn+1]); + $b2 = ($ii & 63); + $ii = ($b1 * 64) + $b2; + $ent = sprintf ('&#%d;', $ii); + $escaped_data .= $ent; + $nn += 1; + } + //3 16 1110bbbb 10bbbbbb 10bbbbbb + else if ($ii>>4 == 14) + { + $b1 = ($ii & 15); + $ii = ord($data[$nn+1]); + $b2 = ($ii & 63); + $ii = ord($data[$nn+2]); + $b3 = ($ii & 63); + $ii = ((($b1 * 64) + $b2) * 64) + $b3; + $ent = sprintf ('&#%d;', $ii); + $escaped_data .= $ent; + $nn += 2; + } + //4 21 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb + else if ($ii>>3 == 30) + { + $b1 = ($ii & 7); + $ii = ord($data[$nn+1]); + $b2 = ($ii & 63); + $ii = ord($data[$nn+2]); + $b3 = ($ii & 63); + $ii = ord($data[$nn+3]); + $b4 = ($ii & 63); + $ii = ((((($b1 * 64) + $b2) * 64) + $b3) * 64) + $b4; + $ent = sprintf ('&#%d;', $ii); + $escaped_data .= $ent; + $nn += 3; + } + } + break; +/* + case 'CP1252_': + case 'CP1252_US-ASCII': + $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); + $escaped_data = str_replace($GLOBALS['xml_iso88591_Entities']['in'], $GLOBALS['xml_iso88591_Entities']['out'], $escaped_data); + $escaped_data = str_replace($GLOBALS['xml_cp1252_Entities']['in'], $GLOBALS['xml_cp1252_Entities']['out'], $escaped_data); + break; + case 'CP1252_UTF-8': + $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); + /// @todo we could use real UTF8 chars here instead of xml entities... (note that utf_8 encode all allone will NOT convert them) + $escaped_data = str_replace($GLOBALS['xml_cp1252_Entities']['in'], $GLOBALS['xml_cp1252_Entities']['out'], $escaped_data); + $escaped_data = utf8_encode($escaped_data); + break; + case 'CP1252_ISO-8859-1': + $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); + // we might as well replave all funky chars with a '?' here, but we are kind and leave it to the receiving application layer to decide what to do with these weird entities... + $escaped_data = str_replace($GLOBALS['xml_cp1252_Entities']['in'], $GLOBALS['xml_cp1252_Entities']['out'], $escaped_data); + break; +*/ + default: + $escaped_data = ''; + error_log("Converting from $src_encoding to $dest_encoding: not supported..."); + } + return $escaped_data; + } + + /// xml parser handler function for opening element tags + function xmlrpc_se($parser, $name, $attrs, $accept_single_vals=false) + { + // if invalid xmlrpc already detected, skip all processing + if ($GLOBALS['_xh']['isf'] < 2) + { + // check for correct element nesting + // top level element can only be of 2 types + /// @todo optimization creep: save this check into a bool variable, instead of using count() every time: + /// there is only a single top level element in xml anyway + if (count($GLOBALS['_xh']['stack']) == 0) + { + if ($name != 'METHODRESPONSE' && $name != 'METHODCALL' && ( + $name != 'VALUE' && !$accept_single_vals)) + { + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = 'missing top level xmlrpc element'; + return; + } + else + { + $GLOBALS['_xh']['rt'] = strtolower($name); + $GLOBALS['_xh']['rt'] = strtolower($name); + } + } + else + { + // not top level element: see if parent is OK + $parent = end($GLOBALS['_xh']['stack']); + if (!array_key_exists($name, $GLOBALS['xmlrpc_valid_parents']) || !in_array($parent, $GLOBALS['xmlrpc_valid_parents'][$name])) + { + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = "xmlrpc element $name cannot be child of $parent"; + return; + } + } + + switch($name) + { + // optimize for speed switch cases: most common cases first + case 'VALUE': + /// @todo we could check for 2 VALUE elements inside a MEMBER or PARAM element + $GLOBALS['_xh']['vt']='value'; // indicator: no value found yet + $GLOBALS['_xh']['ac']=''; + $GLOBALS['_xh']['lv']=1; + $GLOBALS['_xh']['php_class']=null; + break; + case 'I4': + case 'INT': + case 'STRING': + case 'BOOLEAN': + case 'DOUBLE': + case 'DATETIME.ISO8601': + case 'BASE64': + if ($GLOBALS['_xh']['vt']!='value') + { + //two data elements inside a value: an error occurred! + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = "$name element following a {$GLOBALS['_xh']['vt']} element inside a single value"; + return; + } + $GLOBALS['_xh']['ac']=''; // reset the accumulator + break; + case 'STRUCT': + case 'ARRAY': + if ($GLOBALS['_xh']['vt']!='value') + { + //two data elements inside a value: an error occurred! + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = "$name element following a {$GLOBALS['_xh']['vt']} element inside a single value"; + return; + } + // create an empty array to hold child values, and push it onto appropriate stack + $cur_val = array(); + $cur_val['values'] = array(); + $cur_val['type'] = $name; + // check for out-of-band information to rebuild php objs + // and in case it is found, save it + if (@isset($attrs['PHP_CLASS'])) + { + $cur_val['php_class'] = $attrs['PHP_CLASS']; + } + $GLOBALS['_xh']['valuestack'][] = $cur_val; + $GLOBALS['_xh']['vt']='data'; // be prepared for a data element next + break; + case 'DATA': + if ($GLOBALS['_xh']['vt']!='data') + { + //two data elements inside a value: an error occurred! + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = "found two data elements inside an array element"; + return; + } + case 'METHODCALL': + case 'METHODRESPONSE': + case 'PARAMS': + // valid elements that add little to processing + break; + case 'METHODNAME': + case 'NAME': + /// @todo we could check for 2 NAME elements inside a MEMBER element + $GLOBALS['_xh']['ac']=''; + break; + case 'FAULT': + $GLOBALS['_xh']['isf']=1; + break; + case 'MEMBER': + $GLOBALS['_xh']['valuestack'][count($GLOBALS['_xh']['valuestack'])-1]['name']=''; // set member name to null, in case we do not find in the xml later on + //$GLOBALS['_xh']['ac']=''; + // Drop trough intentionally + case 'PARAM': + // clear value type, so we can check later if no value has been passed for this param/member + $GLOBALS['_xh']['vt']=null; + break; + case 'NIL': + case 'EX:NIL': + if ($GLOBALS['xmlrpc_null_extension']) + { + if ($GLOBALS['_xh']['vt']!='value') + { + //two data elements inside a value: an error occurred! + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = "$name element following a {$GLOBALS['_xh']['vt']} element inside a single value"; + return; + } + $GLOBALS['_xh']['ac']=''; // reset the accumulator + break; + } + // we do not support the extension, so + // drop through intentionally + default: + /// INVALID ELEMENT: RAISE ISF so that it is later recognized!!! + $GLOBALS['_xh']['isf'] = 2; + $GLOBALS['_xh']['isf_reason'] = "found not-xmlrpc xml element $name"; + break; + } + + // Save current element name to stack, to validate nesting + $GLOBALS['_xh']['stack'][] = $name; + + /// @todo optimization creep: move this inside the big switch() above + if($name!='VALUE') + { + $GLOBALS['_xh']['lv']=0; + } + } + } + + /// Used in decoding xml chunks that might represent single xmlrpc values + function xmlrpc_se_any($parser, $name, $attrs) + { + xmlrpc_se($parser, $name, $attrs, true); + } + + /// xml parser handler function for close element tags + function xmlrpc_ee($parser, $name, $rebuild_xmlrpcvals = true) + { + if ($GLOBALS['_xh']['isf'] < 2) + { + // push this element name from stack + // NB: if XML validates, correct opening/closing is guaranteed and + // we do not have to check for $name == $curr_elem. + // we also checked for proper nesting at start of elements... + $curr_elem = array_pop($GLOBALS['_xh']['stack']); + + switch($name) + { + case 'VALUE': + // This if() detects if no scalar was inside + if ($GLOBALS['_xh']['vt']=='value') + { + $GLOBALS['_xh']['value']=$GLOBALS['_xh']['ac']; + $GLOBALS['_xh']['vt']=$GLOBALS['xmlrpcString']; + } + + if ($rebuild_xmlrpcvals) + { + // build the xmlrpc val out of the data received, and substitute it + $temp = new xmlrpcval($GLOBALS['_xh']['value'], $GLOBALS['_xh']['vt']); + // in case we got info about underlying php class, save it + // in the object we're rebuilding + if (isset($GLOBALS['_xh']['php_class'])) + $temp->_php_class = $GLOBALS['_xh']['php_class']; + // check if we are inside an array or struct: + // if value just built is inside an array, let's move it into array on the stack + $vscount = count($GLOBALS['_xh']['valuestack']); + if ($vscount && $GLOBALS['_xh']['valuestack'][$vscount-1]['type']=='ARRAY') + { + $GLOBALS['_xh']['valuestack'][$vscount-1]['values'][] = $temp; + } + else + { + $GLOBALS['_xh']['value'] = $temp; + } + } + else + { + /// @todo this needs to treat correctly php-serialized objects, + /// since std deserializing is done by php_xmlrpc_decode, + /// which we will not be calling... + if (isset($GLOBALS['_xh']['php_class'])) + { + } + + // check if we are inside an array or struct: + // if value just built is inside an array, let's move it into array on the stack + $vscount = count($GLOBALS['_xh']['valuestack']); + if ($vscount && $GLOBALS['_xh']['valuestack'][$vscount-1]['type']=='ARRAY') + { + $GLOBALS['_xh']['valuestack'][$vscount-1]['values'][] = $GLOBALS['_xh']['value']; + } + } + break; + case 'BOOLEAN': + case 'I4': + case 'INT': + case 'STRING': + case 'DOUBLE': + case 'DATETIME.ISO8601': + case 'BASE64': + $GLOBALS['_xh']['vt']=strtolower($name); + /// @todo: optimization creep - remove the if/elseif cycle below + /// since the case() in which we are already did that + if ($name=='STRING') + { + $GLOBALS['_xh']['value']=$GLOBALS['_xh']['ac']; + } + elseif ($name=='DATETIME.ISO8601') + { + if (!preg_match('/^[0-9]{8}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/', $GLOBALS['_xh']['ac'])) + { + error_log('XML-RPC: invalid value received in DATETIME: '.$GLOBALS['_xh']['ac']); + } + $GLOBALS['_xh']['vt']=$GLOBALS['xmlrpcDateTime']; + $GLOBALS['_xh']['value']=$GLOBALS['_xh']['ac']; + } + elseif ($name=='BASE64') + { + /// @todo check for failure of base64 decoding / catch warnings + $GLOBALS['_xh']['value']=base64_decode($GLOBALS['_xh']['ac']); + } + elseif ($name=='BOOLEAN') + { + // special case here: we translate boolean 1 or 0 into PHP + // constants true or false. + // Strings 'true' and 'false' are accepted, even though the + // spec never mentions them (see eg. Blogger api docs) + // NB: this simple checks helps a lot sanitizing input, ie no + // security problems around here + if ($GLOBALS['_xh']['ac']=='1' || strcasecmp($GLOBALS['_xh']['ac'], 'true') == 0) + { + $GLOBALS['_xh']['value']=true; + } + else + { + // log if receiveing something strange, even though we set the value to false anyway + if ($GLOBALS['_xh']['ac']!='0' && strcasecmp($GLOBALS['_xh']['ac'], 'false') != 0) + error_log('XML-RPC: invalid value received in BOOLEAN: '.$GLOBALS['_xh']['ac']); + $GLOBALS['_xh']['value']=false; + } + } + elseif ($name=='DOUBLE') + { + // we have a DOUBLE + // we must check that only 0123456789-. are characters here + // NOTE: regexp could be much stricter than this... + if (!preg_match('/^[+-eE0123456789 \t.]+$/', $GLOBALS['_xh']['ac'])) + { + /// @todo: find a better way of throwing an error than this! + error_log('XML-RPC: non numeric value received in DOUBLE: '.$GLOBALS['_xh']['ac']); + $GLOBALS['_xh']['value']='ERROR_NON_NUMERIC_FOUND'; + } + else + { + // it's ok, add it on + $GLOBALS['_xh']['value']=(double)$GLOBALS['_xh']['ac']; + } + } + else + { + // we have an I4/INT + // we must check that only 0123456789- are characters here + if (!preg_match('/^[+-]?[0123456789 \t]+$/', $GLOBALS['_xh']['ac'])) + { + /// @todo find a better way of throwing an error than this! + error_log('XML-RPC: non numeric value received in INT: '.$GLOBALS['_xh']['ac']); + $GLOBALS['_xh']['value']='ERROR_NON_NUMERIC_FOUND'; + } + else + { + // it's ok, add it on + $GLOBALS['_xh']['value']=(int)$GLOBALS['_xh']['ac']; + } + } + //$GLOBALS['_xh']['ac']=''; // is this necessary? + $GLOBALS['_xh']['lv']=3; // indicate we've found a value + break; + case 'NAME': + $GLOBALS['_xh']['valuestack'][count($GLOBALS['_xh']['valuestack'])-1]['name'] = $GLOBALS['_xh']['ac']; + break; + case 'MEMBER': + //$GLOBALS['_xh']['ac']=''; // is this necessary? + // add to array in the stack the last element built, + // unless no VALUE was found + if ($GLOBALS['_xh']['vt']) + { + $vscount = count($GLOBALS['_xh']['valuestack']); + $GLOBALS['_xh']['valuestack'][$vscount-1]['values'][$GLOBALS['_xh']['valuestack'][$vscount-1]['name']] = $GLOBALS['_xh']['value']; + } else + error_log('XML-RPC: missing VALUE inside STRUCT in received xml'); + break; + case 'DATA': + //$GLOBALS['_xh']['ac']=''; // is this necessary? + $GLOBALS['_xh']['vt']=null; // reset this to check for 2 data elements in a row - even if they're empty + break; + case 'STRUCT': + case 'ARRAY': + // fetch out of stack array of values, and promote it to current value + $curr_val = array_pop($GLOBALS['_xh']['valuestack']); + $GLOBALS['_xh']['value'] = $curr_val['values']; + $GLOBALS['_xh']['vt']=strtolower($name); + if (isset($curr_val['php_class'])) + { + $GLOBALS['_xh']['php_class'] = $curr_val['php_class']; + } + break; + case 'PARAM': + // add to array of params the current value, + // unless no VALUE was found + if ($GLOBALS['_xh']['vt']) + { + $GLOBALS['_xh']['params'][]=$GLOBALS['_xh']['value']; + $GLOBALS['_xh']['pt'][]=$GLOBALS['_xh']['vt']; + } + else + error_log('XML-RPC: missing VALUE inside PARAM in received xml'); + break; + case 'METHODNAME': + $GLOBALS['_xh']['method']=preg_replace('/^[\n\r\t ]+/', '', $GLOBALS['_xh']['ac']); + break; + case 'NIL': + case 'EX:NIL': + if ($GLOBALS['xmlrpc_null_extension']) + { + $GLOBALS['_xh']['vt']='null'; + $GLOBALS['_xh']['value']=null; + $GLOBALS['_xh']['lv']=3; + break; + } + // drop through intentionally if nil extension not enabled + case 'PARAMS': + case 'FAULT': + case 'METHODCALL': + case 'METHORESPONSE': + break; + default: + // End of INVALID ELEMENT! + // shall we add an assert here for unreachable code??? + break; + } + } + } + + /// Used in decoding xmlrpc requests/responses without rebuilding xmlrpc values + function xmlrpc_ee_fast($parser, $name) + { + xmlrpc_ee($parser, $name, false); + } + + /// xml parser handler function for character data + function xmlrpc_cd($parser, $data) + { + // skip processing if xml fault already detected + if ($GLOBALS['_xh']['isf'] < 2) + { + // "lookforvalue==3" means that we've found an entire value + // and should discard any further character data + if($GLOBALS['_xh']['lv']!=3) + { + // G. Giunta 2006-08-23: useless change of 'lv' from 1 to 2 + //if($GLOBALS['_xh']['lv']==1) + //{ + // if we've found text and we're just in a then + // say we've found a value + //$GLOBALS['_xh']['lv']=2; + //} + // we always initialize the accumulator before starting parsing, anyway... + //if(!@isset($GLOBALS['_xh']['ac'])) + //{ + // $GLOBALS['_xh']['ac'] = ''; + //} + $GLOBALS['_xh']['ac'].=$data; + } + } + } + + /// xml parser handler function for 'other stuff', ie. not char data or + /// element start/end tag. In fact it only gets called on unknown entities... + function xmlrpc_dh($parser, $data) + { + // skip processing if xml fault already detected + if ($GLOBALS['_xh']['isf'] < 2) + { + if(substr($data, 0, 1) == '&' && substr($data, -1, 1) == ';') + { + // G. Giunta 2006-08-25: useless change of 'lv' from 1 to 2 + //if($GLOBALS['_xh']['lv']==1) + //{ + // $GLOBALS['_xh']['lv']=2; + //} + $GLOBALS['_xh']['ac'].=$data; + } + } + return true; + } + + class xmlrpc_client + { + var $path; + var $server; + var $port=0; + var $method='http'; + var $errno; + var $errstr; + var $debug=0; + var $username=''; + var $password=''; + var $authtype=1; + var $cert=''; + var $certpass=''; + var $cacert=''; + var $cacertdir=''; + var $key=''; + var $keypass=''; + var $verifypeer=true; + var $verifyhost=1; + var $no_multicall=false; + var $proxy=''; + var $proxyport=0; + var $proxy_user=''; + var $proxy_pass=''; + var $proxy_authtype=1; + var $cookies=array(); + var $extracurlopts=array(); + + /** + * List of http compression methods accepted by the client for responses. + * NB: PHP supports deflate, gzip compressions out of the box if compiled w. zlib + * + * NNB: you can set it to any non-empty array for HTTP11 and HTTPS, since + * in those cases it will be up to CURL to decide the compression methods + * it supports. You might check for the presence of 'zlib' in the output of + * curl_version() to determine wheter compression is supported or not + */ + var $accepted_compression = array(); + /** + * Name of compression scheme to be used for sending requests. + * Either null, gzip or deflate + */ + var $request_compression = ''; + /** + * CURL handle: used for keep-alive connections (PHP 4.3.8 up, see: + * http://curl.haxx.se/docs/faq.html#7.3) + */ + var $xmlrpc_curl_handle = null; + /// Wheter to use persistent connections for http 1.1 and https + var $keepalive = false; + /// Charset encodings that can be decoded without problems by the client + var $accepted_charset_encodings = array(); + /// Charset encoding to be used in serializing request. NULL = use ASCII + var $request_charset_encoding = ''; + /** + * Decides the content of xmlrpcresp objects returned by calls to send() + * valid strings are 'xmlrpcvals', 'phpvals' or 'xml' + */ + var $return_type = 'xmlrpcvals'; + /** + * Sent to servers in http headers + */ + var $user_agent; + + /** + * @param string $path either the complete server URL or the PATH part of the xmlrc server URL, e.g. /xmlrpc/server.php + * @param string $server the server name / ip address + * @param integer $port the port the server is listening on, defaults to 80 or 443 depending on protocol used + * @param string $method the http protocol variant: defaults to 'http', 'https' and 'http11' can be used if CURL is installed + */ + function xmlrpc_client($path, $server='', $port='', $method='') + { + // allow user to specify all params in $path + if($server == '' and $port == '' and $method == '') + { + $parts = parse_url($path); + $server = $parts['host']; + $path = isset($parts['path']) ? $parts['path'] : ''; + if(isset($parts['query'])) + { + $path .= '?'.$parts['query']; + } + if(isset($parts['fragment'])) + { + $path .= '#'.$parts['fragment']; + } + if(isset($parts['port'])) + { + $port = $parts['port']; + } + if(isset($parts['scheme'])) + { + $method = $parts['scheme']; + } + if(isset($parts['user'])) + { + $this->username = $parts['user']; + } + if(isset($parts['pass'])) + { + $this->password = $parts['pass']; + } + } + if($path == '' || $path[0] != '/') + { + $this->path='/'.$path; + } + else + { + $this->path=$path; + } + $this->server=$server; + if($port != '') + { + $this->port=$port; + } + if($method != '') + { + $this->method=$method; + } + + // if ZLIB is enabled, let the client by default accept compressed responses + if(function_exists('gzinflate') || ( + function_exists('curl_init') && (($info = curl_version()) && + ((is_string($info) && strpos($info, 'zlib') !== null) || isset($info['libz_version']))) + )) + { + $this->accepted_compression = array('gzip', 'deflate'); + } + + // keepalives: enabled by default + $this->keepalive = true; + + // by default the xml parser can support these 3 charset encodings + $this->accepted_charset_encodings = array('UTF-8', 'ISO-8859-1', 'US-ASCII'); + + // initialize user_agent string + $this->user_agent = $GLOBALS['xmlrpcName'] . ' ' . $GLOBALS['xmlrpcVersion']; + } + + /** + * Enables/disables the echoing to screen of the xmlrpc responses received + * @param integer $debug values 0, 1 and 2 are supported (2 = echo sent msg too, before received response) + * @access public + */ + function setDebug($in) + { + $this->debug=$in; + } + + /** + * Add some http BASIC AUTH credentials, used by the client to authenticate + * @param string $u username + * @param string $p password + * @param integer $t auth type. See curl_setopt man page for supported auth types. Defaults to CURLAUTH_BASIC (basic auth) + * @access public + */ + function setCredentials($u, $p, $t=1) + { + $this->username=$u; + $this->password=$p; + $this->authtype=$t; + } + + /** + * Add a client-side https certificate + * @param string $cert + * @param string $certpass + * @access public + */ + function setCertificate($cert, $certpass) + { + $this->cert = $cert; + $this->certpass = $certpass; + } + + /** + * Add a CA certificate to verify server with (see man page about + * CURLOPT_CAINFO for more details + * @param string $cacert certificate file name (or dir holding certificates) + * @param bool $is_dir set to true to indicate cacert is a dir. defaults to false + * @access public + */ + function setCaCertificate($cacert, $is_dir=false) + { + if ($is_dir) + { + $this->cacertdir = $cacert; + } + else + { + $this->cacert = $cacert; + } + } + + /** + * Set attributes for SSL communication: private SSL key + * NB: does not work in older php/curl installs + * Thanks to Daniel Convissor + * @param string $key The name of a file containing a private SSL key + * @param string $keypass The secret password needed to use the private SSL key + * @access public + */ + function setKey($key, $keypass) + { + $this->key = $key; + $this->keypass = $keypass; + } + + /** + * Set attributes for SSL communication: verify server certificate + * @param bool $i enable/disable verification of peer certificate + * @access public + */ + function setSSLVerifyPeer($i) + { + $this->verifypeer = $i; + } + + /** + * Set attributes for SSL communication: verify match of server cert w. hostname + * @param int $i + * @access public + */ + function setSSLVerifyHost($i) + { + $this->verifyhost = $i; + } + + /** + * Set proxy info + * @param string $proxyhost + * @param string $proxyport Defaults to 8080 for HTTP and 443 for HTTPS + * @param string $proxyusername Leave blank if proxy has public access + * @param string $proxypassword Leave blank if proxy has public access + * @param int $proxyauthtype set to constant CURLAUTH_NTLM to use NTLM auth with proxy + * @access public + */ + function setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '', $proxyauthtype = 1) + { + $this->proxy = $proxyhost; + $this->proxyport = $proxyport; + $this->proxy_user = $proxyusername; + $this->proxy_pass = $proxypassword; + $this->proxy_authtype = $proxyauthtype; + } + + /** + * Enables/disables reception of compressed xmlrpc responses. + * Note that enabling reception of compressed responses merely adds some standard + * http headers to xmlrpc requests. It is up to the xmlrpc server to return + * compressed responses when receiving such requests. + * @param string $compmethod either 'gzip', 'deflate', 'any' or '' + * @access public + */ + function setAcceptedCompression($compmethod) + { + if ($compmethod == 'any') + $this->accepted_compression = array('gzip', 'deflate'); + else + $this->accepted_compression = array($compmethod); + } + + /** + * Enables/disables http compression of xmlrpc request. + * Take care when sending compressed requests: servers might not support them + * (and automatic fallback to uncompressed requests is not yet implemented) + * @param string $compmethod either 'gzip', 'deflate' or '' + * @access public + */ + function setRequestCompression($compmethod) + { + $this->request_compression = $compmethod; + } + + /** + * Adds a cookie to list of cookies that will be sent to server. + * NB: setting any param but name and value will turn the cookie into a 'version 1' cookie: + * do not do it unless you know what you are doing + * @param string $name + * @param string $value + * @param string $path + * @param string $domain + * @param int $port + * @access public + * + * @todo check correctness of urlencoding cookie value (copied from php way of doing it...) + */ + function setCookie($name, $value='', $path='', $domain='', $port=null) + { + $this->cookies[$name]['value'] = urlencode($value); + if ($path || $domain || $port) + { + $this->cookies[$name]['path'] = $path; + $this->cookies[$name]['domain'] = $domain; + $this->cookies[$name]['port'] = $port; + $this->cookies[$name]['version'] = 1; + } + else + { + $this->cookies[$name]['version'] = 0; + } + } + + /** + * Directly set cURL options, for extra flexibility + * It allows eg. to bind client to a specific IP interface / address + * @param $options array + */ + function SetCurlOptions( $options ) + { + $this->extracurlopts = $options; + } + + /** + * Set user-agent string that will be used by this client instance + * in http headers sent to the server + */ + function SetUserAgent( $agentstring ) + { + $this->user_agent = $agentstring; + } + + /** + * Send an xmlrpc request + * @param mixed $msg The message object, or an array of messages for using multicall, or the complete xml representation of a request + * @param integer $timeout Connection timeout, in seconds, If unspecified, a platform specific timeout will apply + * @param string $method if left unspecified, the http protocol chosen during creation of the object will be used + * @return xmlrpcresp + * @access public + */ + function& send($msg, $timeout=0, $method='') + { + // if user deos not specify http protocol, use native method of this client + // (i.e. method set during call to constructor) + if($method == '') + { + $method = $this->method; + } + + if(is_array($msg)) + { + // $msg is an array of xmlrpcmsg's + $r = $this->multicall($msg, $timeout, $method); + return $r; + } + elseif(is_string($msg)) + { + $n = new xmlrpcmsg(''); + $n->payload = $msg; + $msg = $n; + } + + // where msg is an xmlrpcmsg + $msg->debug=$this->debug; + + if($method == 'https') + { + $r =& $this->sendPayloadHTTPS( + $msg, + $this->server, + $this->port, + $timeout, + $this->username, + $this->password, + $this->authtype, + $this->cert, + $this->certpass, + $this->cacert, + $this->cacertdir, + $this->proxy, + $this->proxyport, + $this->proxy_user, + $this->proxy_pass, + $this->proxy_authtype, + $this->keepalive, + $this->key, + $this->keypass + ); + } + elseif($method == 'http11') + { + $r =& $this->sendPayloadCURL( + $msg, + $this->server, + $this->port, + $timeout, + $this->username, + $this->password, + $this->authtype, + null, + null, + null, + null, + $this->proxy, + $this->proxyport, + $this->proxy_user, + $this->proxy_pass, + $this->proxy_authtype, + 'http', + $this->keepalive + ); + } + else + { + $r =& $this->sendPayloadHTTP10( + $msg, + $this->server, + $this->port, + $timeout, + $this->username, + $this->password, + $this->authtype, + $this->proxy, + $this->proxyport, + $this->proxy_user, + $this->proxy_pass, + $this->proxy_authtype + ); + } + + return $r; + } + + /** + * @access private + */ + function &sendPayloadHTTP10($msg, $server, $port, $timeout=0, + $username='', $password='', $authtype=1, $proxyhost='', + $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1) + { + if($port==0) + { + $port=80; + } + + // Only create the payload if it was not created previously + if(empty($msg->payload)) + { + $msg->createPayload($this->request_charset_encoding); + } + + $payload = $msg->payload; + // Deflate request body and set appropriate request headers + if(function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) + { + if($this->request_compression == 'gzip') + { + $a = @gzencode($payload); + if($a) + { + $payload = $a; + $encoding_hdr = "Content-Encoding: gzip\r\n"; + } + } + else + { + $a = @gzcompress($payload); + if($a) + { + $payload = $a; + $encoding_hdr = "Content-Encoding: deflate\r\n"; + } + } + } + else + { + $encoding_hdr = ''; + } + + // thanks to Grant Rauscher for this + $credentials=''; + if($username!='') + { + $credentials='Authorization: Basic ' . base64_encode($username . ':' . $password) . "\r\n"; + if ($authtype != 1) + { + error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported with HTTP 1.0'); + } + } + + $accepted_encoding = ''; + if(is_array($this->accepted_compression) && count($this->accepted_compression)) + { + $accepted_encoding = 'Accept-Encoding: ' . implode(', ', $this->accepted_compression) . "\r\n"; + } + + $proxy_credentials = ''; + if($proxyhost) + { + if($proxyport == 0) + { + $proxyport = 8080; + } + $connectserver = $proxyhost; + $connectport = $proxyport; + $uri = 'http://'.$server.':'.$port.$this->path; + if($proxyusername != '') + { + if ($proxyauthtype != 1) + { + error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth to proxy is supported with HTTP 1.0'); + } + $proxy_credentials = 'Proxy-Authorization: Basic ' . base64_encode($proxyusername.':'.$proxypassword) . "\r\n"; + } + } + else + { + $connectserver = $server; + $connectport = $port; + $uri = $this->path; + } + + // Cookie generation, as per rfc2965 (version 1 cookies) or + // netscape's rules (version 0 cookies) + $cookieheader=''; + if (count($this->cookies)) + { + $version = ''; + foreach ($this->cookies as $name => $cookie) + { + if ($cookie['version']) + { + $version = ' $Version="' . $cookie['version'] . '";'; + $cookieheader .= ' ' . $name . '="' . $cookie['value'] . '";'; + if ($cookie['path']) + $cookieheader .= ' $Path="' . $cookie['path'] . '";'; + if ($cookie['domain']) + $cookieheader .= ' $Domain="' . $cookie['domain'] . '";'; + if ($cookie['port']) + $cookieheader .= ' $Port="' . $cookie['port'] . '";'; + } + else + { + $cookieheader .= ' ' . $name . '=' . $cookie['value'] . ";"; + } + } + $cookieheader = 'Cookie:' . $version . substr($cookieheader, 0, -1) . "\r\n"; + } + + $op= 'POST ' . $uri. " HTTP/1.0\r\n" . + 'User-Agent: ' . $this->user_agent . "\r\n" . + 'Host: '. $server . ':' . $port . "\r\n" . + $credentials . + $proxy_credentials . + $accepted_encoding . + $encoding_hdr . + 'Accept-Charset: ' . implode(',', $this->accepted_charset_encodings) . "\r\n" . + $cookieheader . + 'Content-Type: ' . $msg->content_type . "\r\nContent-Length: " . + strlen($payload) . "\r\n\r\n" . + $payload; + + if($this->debug > 1) + { + print "
    \n---SENDING---\n" . htmlentities($op) . "\n---END---\n
    "; + // let the client see this now in case http times out... + flush(); + } + + if($timeout>0) + { + $fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr, $timeout); + } + else + { + $fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr); + } + if($fp) + { + if($timeout>0 && function_exists('stream_set_timeout')) + { + stream_set_timeout($fp, $timeout); + } + } + else + { + $this->errstr='Connect error: '.$this->errstr; + $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr . ' (' . $this->errno . ')'); + return $r; + } + + if(!fputs($fp, $op, strlen($op))) + { + fclose($fp); + $this->errstr='Write error'; + $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr); + return $r; + } + else + { + // reset errno and errstr on succesful socket connection + $this->errstr = ''; + } + // G. Giunta 2005/10/24: close socket before parsing. + // should yeld slightly better execution times, and make easier recursive calls (e.g. to follow http redirects) + $ipd=''; + do + { + // shall we check for $data === FALSE? + // as per the manual, it signals an error + $ipd.=fread($fp, 32768); + } while(!feof($fp)); + fclose($fp); + $r =& $msg->parseResponse($ipd, false, $this->return_type); + return $r; + + } + + /** + * @access private + */ + function &sendPayloadHTTPS($msg, $server, $port, $timeout=0, $username='', + $password='', $authtype=1, $cert='',$certpass='', $cacert='', $cacertdir='', + $proxyhost='', $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1, + $keepalive=false, $key='', $keypass='') + { + $r =& $this->sendPayloadCURL($msg, $server, $port, $timeout, $username, + $password, $authtype, $cert, $certpass, $cacert, $cacertdir, $proxyhost, $proxyport, + $proxyusername, $proxypassword, $proxyauthtype, 'https', $keepalive, $key, $keypass); + return $r; + } + + /** + * Contributed by Justin Miller + * Requires curl to be built into PHP + * NB: CURL versions before 7.11.10 cannot use proxy to talk to https servers! + * @access private + */ + function &sendPayloadCURL($msg, $server, $port, $timeout=0, $username='', + $password='', $authtype=1, $cert='', $certpass='', $cacert='', $cacertdir='', + $proxyhost='', $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1, $method='https', + $keepalive=false, $key='', $keypass='') + { + if(!function_exists('curl_init')) + { + $this->errstr='CURL unavailable on this install'; + $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_curl'], $GLOBALS['xmlrpcstr']['no_curl']); + return $r; + } + if($method == 'https') + { + if(($info = curl_version()) && + ((is_string($info) && strpos($info, 'OpenSSL') === null) || (is_array($info) && !isset($info['ssl_version'])))) + { + $this->errstr='SSL unavailable on this install'; + $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_ssl'], $GLOBALS['xmlrpcstr']['no_ssl']); + return $r; + } + } + + if($port == 0) + { + if($method == 'http') + { + $port = 80; + } + else + { + $port = 443; + } + } + + // Only create the payload if it was not created previously + if(empty($msg->payload)) + { + $msg->createPayload($this->request_charset_encoding); + } + + // Deflate request body and set appropriate request headers + $payload = $msg->payload; + if(function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) + { + if($this->request_compression == 'gzip') + { + $a = @gzencode($payload); + if($a) + { + $payload = $a; + $encoding_hdr = 'Content-Encoding: gzip'; + } + } + else + { + $a = @gzcompress($payload); + if($a) + { + $payload = $a; + $encoding_hdr = 'Content-Encoding: deflate'; + } + } + } + else + { + $encoding_hdr = ''; + } + + if($this->debug > 1) + { + print "
    \n---SENDING---\n" . htmlentities($payload) . "\n---END---\n
    "; + // let the client see this now in case http times out... + flush(); + } + + if(!$keepalive || !$this->xmlrpc_curl_handle) + { + $curl = curl_init($method . '://' . $server . ':' . $port . $this->path); + if($keepalive) + { + $this->xmlrpc_curl_handle = $curl; + } + } + else + { + $curl = $this->xmlrpc_curl_handle; + } + + // results into variable + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + + if($this->debug) + { + curl_setopt($curl, CURLOPT_VERBOSE, 1); + } + curl_setopt($curl, CURLOPT_USERAGENT, $this->user_agent); + // required for XMLRPC: post the data + curl_setopt($curl, CURLOPT_POST, 1); + // the data + curl_setopt($curl, CURLOPT_POSTFIELDS, $payload); + + // return the header too + curl_setopt($curl, CURLOPT_HEADER, 1); + + // will only work with PHP >= 5.0 + // NB: if we set an empty string, CURL will add http header indicating + // ALL methods it is supporting. This is possibly a better option than + // letting the user tell what curl can / cannot do... + if(is_array($this->accepted_compression) && count($this->accepted_compression)) + { + //curl_setopt($curl, CURLOPT_ENCODING, implode(',', $this->accepted_compression)); + // empty string means 'any supported by CURL' (shall we catch errors in case CURLOPT_SSLKEY undefined ?) + if (count($this->accepted_compression) == 1) + { + curl_setopt($curl, CURLOPT_ENCODING, $this->accepted_compression[0]); + } + else + curl_setopt($curl, CURLOPT_ENCODING, ''); + } + // extra headers + $headers = array('Content-Type: ' . $msg->content_type , 'Accept-Charset: ' . implode(',', $this->accepted_charset_encodings)); + // if no keepalive is wanted, let the server know it in advance + if(!$keepalive) + { + $headers[] = 'Connection: close'; + } + // request compression header + if($encoding_hdr) + { + $headers[] = $encoding_hdr; + } + + curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); + // timeout is borked + if($timeout) + { + curl_setopt($curl, CURLOPT_TIMEOUT, $timeout == 1 ? 1 : $timeout - 1); + } + + if($username && $password) + { + curl_setopt($curl, CURLOPT_USERPWD, $username.':'.$password); + if (defined('CURLOPT_HTTPAUTH')) + { + curl_setopt($curl, CURLOPT_HTTPAUTH, $authtype); + } + else if ($authtype != 1) + { + error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported by the current PHP/curl install'); + } + } + + if($method == 'https') + { + // set cert file + if($cert) + { + curl_setopt($curl, CURLOPT_SSLCERT, $cert); + } + // set cert password + if($certpass) + { + curl_setopt($curl, CURLOPT_SSLCERTPASSWD, $certpass); + } + // whether to verify remote host's cert + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->verifypeer); + // set ca certificates file/dir + if($cacert) + { + curl_setopt($curl, CURLOPT_CAINFO, $cacert); + } + if($cacertdir) + { + curl_setopt($curl, CURLOPT_CAPATH, $cacertdir); + } + // set key file (shall we catch errors in case CURLOPT_SSLKEY undefined ?) + if($key) + { + curl_setopt($curl, CURLOPT_SSLKEY, $key); + } + // set key password (shall we catch errors in case CURLOPT_SSLKEY undefined ?) + if($keypass) + { + curl_setopt($curl, CURLOPT_SSLKEYPASSWD, $keypass); + } + // whether to verify cert's common name (CN); 0 for no, 1 to verify that it exists, and 2 to verify that it matches the hostname used + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, $this->verifyhost); + } + + // proxy info + if($proxyhost) + { + if($proxyport == 0) + { + $proxyport = 8080; // NB: even for HTTPS, local connection is on port 8080 + } + curl_setopt($curl, CURLOPT_PROXY, $proxyhost.':'.$proxyport); + //curl_setopt($curl, CURLOPT_PROXYPORT,$proxyport); + if($proxyusername) + { + curl_setopt($curl, CURLOPT_PROXYUSERPWD, $proxyusername.':'.$proxypassword); + if (defined('CURLOPT_PROXYAUTH')) + { + curl_setopt($curl, CURLOPT_PROXYAUTH, $proxyauthtype); + } + else if ($proxyauthtype != 1) + { + error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth to proxy is supported by the current PHP/curl install'); + } + } + } + + // NB: should we build cookie http headers by hand rather than let CURL do it? + // the following code does not honour 'expires', 'path' and 'domain' cookie attributes + // set to client obj the the user... + if (count($this->cookies)) + { + $cookieheader = ''; + foreach ($this->cookies as $name => $cookie) + { + $cookieheader .= $name . '=' . $cookie['value'] . '; '; + } + curl_setopt($curl, CURLOPT_COOKIE, substr($cookieheader, 0, -2)); + } + + foreach ($this->extracurlopts as $opt => $val) + { + curl_setopt($curl, $opt, $val); + } + + $result = curl_exec($curl); + + if ($this->debug > 1) + { + print "
    \n---CURL INFO---\n";
    +				foreach(curl_getinfo($curl) as $name => $val)
    +					 print $name . ': ' . htmlentities($val). "\n";
    +				print "---END---\n
    "; + } + + if(!$result) /// @todo we should use a better check here - what if we get back '' or '0'? + { + $this->errstr='no response'; + $resp=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['curl_fail'], $GLOBALS['xmlrpcstr']['curl_fail']. ': '. curl_error($curl)); + curl_close($curl); + if($keepalive) + { + $this->xmlrpc_curl_handle = null; + } + } + else + { + if(!$keepalive) + { + curl_close($curl); + } + $resp =& $msg->parseResponse($result, true, $this->return_type); + } + return $resp; + } + + /** + * Send an array of request messages and return an array of responses. + * Unless $this->no_multicall has been set to true, it will try first + * to use one single xmlrpc call to server method system.multicall, and + * revert to sending many successive calls in case of failure. + * This failure is also stored in $this->no_multicall for subsequent calls. + * Unfortunately, there is no server error code universally used to denote + * the fact that multicall is unsupported, so there is no way to reliably + * distinguish between that and a temporary failure. + * If you are sure that server supports multicall and do not want to + * fallback to using many single calls, set the fourth parameter to FALSE. + * + * NB: trying to shoehorn extra functionality into existing syntax has resulted + * in pretty much convoluted code... + * + * @param array $msgs an array of xmlrpcmsg objects + * @param integer $timeout connection timeout (in seconds) + * @param string $method the http protocol variant to be used + * @param boolean fallback When true, upon receiveing an error during multicall, multiple single calls will be attempted + * @return array + * @access public + */ + function multicall($msgs, $timeout=0, $method='', $fallback=true) + { + if ($method == '') + { + $method = $this->method; + } + if(!$this->no_multicall) + { + $results = $this->_try_multicall($msgs, $timeout, $method); + if(is_array($results)) + { + // System.multicall succeeded + return $results; + } + else + { + // either system.multicall is unsupported by server, + // or call failed for some other reason. + if ($fallback) + { + // Don't try it next time... + $this->no_multicall = true; + } + else + { + if (is_a($results, 'xmlrpcresp')) + { + $result = $results; + } + else + { + $result = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['multicall_error'], $GLOBALS['xmlrpcstr']['multicall_error']); + } + } + } + } + else + { + // override fallback, in case careless user tries to do two + // opposite things at the same time + $fallback = true; + } + + $results = array(); + if ($fallback) + { + // system.multicall is (probably) unsupported by server: + // emulate multicall via multiple requests + foreach($msgs as $msg) + { + $results[] =& $this->send($msg, $timeout, $method); + } + } + else + { + // user does NOT want to fallback on many single calls: + // since we should always return an array of responses, + // return an array with the same error repeated n times + foreach($msgs as $msg) + { + $results[] = $result; + } + } + return $results; + } + + /** + * Attempt to boxcar $msgs via system.multicall. + * Returns either an array of xmlrpcreponses, an xmlrpc error response + * or false (when received response does not respect valid multicall syntax) + * @access private + */ + function _try_multicall($msgs, $timeout, $method) + { + // Construct multicall message + $calls = array(); + foreach($msgs as $msg) + { + $call['methodName'] = new xmlrpcval($msg->method(),'string'); + $numParams = $msg->getNumParams(); + $params = array(); + for($i = 0; $i < $numParams; $i++) + { + $params[$i] = $msg->getParam($i); + } + $call['params'] = new xmlrpcval($params, 'array'); + $calls[] = new xmlrpcval($call, 'struct'); + } + $multicall = new xmlrpcmsg('system.multicall'); + $multicall->addParam(new xmlrpcval($calls, 'array')); + + // Attempt RPC call + $result =& $this->send($multicall, $timeout, $method); + + if($result->faultCode() != 0) + { + // call to system.multicall failed + return $result; + } + + // Unpack responses. + $rets = $result->value(); + + if ($this->return_type == 'xml') + { + return $rets; + } + else if ($this->return_type == 'phpvals') + { + ///@todo test this code branch... + $rets = $result->value(); + if(!is_array($rets)) + { + return false; // bad return type from system.multicall + } + $numRets = count($rets); + if($numRets != count($msgs)) + { + return false; // wrong number of return values. + } + + $response = array(); + for($i = 0; $i < $numRets; $i++) + { + $val = $rets[$i]; + if (!is_array($val)) { + return false; + } + switch(count($val)) + { + case 1: + if(!isset($val[0])) + { + return false; // Bad value + } + // Normal return value + $response[$i] = new xmlrpcresp($val[0], 0, '', 'phpvals'); + break; + case 2: + /// @todo remove usage of @: it is apparently quite slow + $code = @$val['faultCode']; + if(!is_int($code)) + { + return false; + } + $str = @$val['faultString']; + if(!is_string($str)) + { + return false; + } + $response[$i] = new xmlrpcresp(0, $code, $str); + break; + default: + return false; + } + } + return $response; + } + else // return type == 'xmlrpcvals' + { + $rets = $result->value(); + if($rets->kindOf() != 'array') + { + return false; // bad return type from system.multicall + } + $numRets = $rets->arraysize(); + if($numRets != count($msgs)) + { + return false; // wrong number of return values. + } + + $response = array(); + for($i = 0; $i < $numRets; $i++) + { + $val = $rets->arraymem($i); + switch($val->kindOf()) + { + case 'array': + if($val->arraysize() != 1) + { + return false; // Bad value + } + // Normal return value + $response[$i] = new xmlrpcresp($val->arraymem(0)); + break; + case 'struct': + $code = $val->structmem('faultCode'); + if($code->kindOf() != 'scalar' || $code->scalartyp() != 'int') + { + return false; + } + $str = $val->structmem('faultString'); + if($str->kindOf() != 'scalar' || $str->scalartyp() != 'string') + { + return false; + } + $response[$i] = new xmlrpcresp(0, $code->scalarval(), $str->scalarval()); + break; + default: + return false; + } + } + return $response; + } + } + } // end class xmlrpc_client + + class xmlrpcresp + { + var $val = 0; + var $valtyp; + var $errno = 0; + var $errstr = ''; + var $payload; + var $hdrs = array(); + var $_cookies = array(); + var $content_type = 'text/xml'; + var $raw_data = ''; + + /** + * @param mixed $val either an xmlrpcval obj, a php value or the xml serialization of an xmlrpcval (a string) + * @param integer $fcode set it to anything but 0 to create an error response + * @param string $fstr the error string, in case of an error response + * @param string $valtyp either 'xmlrpcvals', 'phpvals' or 'xml' + * + * @todo add check that $val / $fcode / $fstr is of correct type??? + * NB: as of now we do not do it, since it might be either an xmlrpcval or a plain + * php val, or a complete xml chunk, depending on usage of xmlrpc_client::send() inside which creator is called... + */ + function xmlrpcresp($val, $fcode = 0, $fstr = '', $valtyp='') + { + if($fcode != 0) + { + // error response + $this->errno = $fcode; + $this->errstr = $fstr; + //$this->errstr = htmlspecialchars($fstr); // XXX: encoding probably shouldn't be done here; fix later. + } + else + { + // successful response + $this->val = $val; + if ($valtyp == '') + { + // user did not declare type of response value: try to guess it + if (is_object($this->val) && is_a($this->val, 'xmlrpcval')) + { + $this->valtyp = 'xmlrpcvals'; + } + else if (is_string($this->val)) + { + $this->valtyp = 'xml'; + + } + else + { + $this->valtyp = 'phpvals'; + } + } + else + { + // user declares type of resp value: believe him + $this->valtyp = $valtyp; + } + } + } + + /** + * Returns the error code of the response. + * @return integer the error code of this response (0 for not-error responses) + * @access public + */ + function faultCode() + { + return $this->errno; + } + + /** + * Returns the error code of the response. + * @return string the error string of this response ('' for not-error responses) + * @access public + */ + function faultString() + { + return $this->errstr; + } + + /** + * Returns the value received by the server. + * @return mixed the xmlrpcval object returned by the server. Might be an xml string or php value if the response has been created by specially configured xmlrpc_client objects + * @access public + */ + function value() + { + return $this->val; + } + + /** + * Returns an array with the cookies received from the server. + * Array has the form: $cookiename => array ('value' => $val, $attr1 => $val1, $attr2 = $val2, ...) + * with attributes being e.g. 'expires', 'path', domain'. + * NB: cookies sent as 'expired' by the server (i.e. with an expiry date in the past) + * are still present in the array. It is up to the user-defined code to decide + * how to use the received cookies, and wheter they have to be sent back with the next + * request to the server (using xmlrpc_client::setCookie) or not + * @return array array of cookies received from the server + * @access public + */ + function cookies() + { + return $this->_cookies; + } + + /** + * Returns xml representation of the response. XML prologue not included + * @param string $charset_encoding the charset to be used for serialization. if null, US-ASCII is assumed + * @return string the xml representation of the response + * @access public + */ + function serialize($charset_encoding='') + { + if ($charset_encoding != '') + $this->content_type = 'text/xml; charset=' . $charset_encoding; + else + $this->content_type = 'text/xml'; + $result = "\n"; + if($this->errno) + { + // G. Giunta 2005/2/13: let non-ASCII response messages be tolerated by clients + // by xml-encoding non ascii chars + $result .= "\n" . +"\nfaultCode\n" . $this->errno . +"\n\n\nfaultString\n" . +xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $charset_encoding) . "\n\n" . +"\n\n"; + } + else + { + if(!is_object($this->val) || !is_a($this->val, 'xmlrpcval')) + { + if (is_string($this->val) && $this->valtyp == 'xml') + { + $result .= "\n\n" . + $this->val . + "\n"; + } + else + { + /// @todo try to build something serializable? + die('cannot serialize xmlrpcresp objects whose content is native php values'); + } + } + else + { + $result .= "\n\n" . + $this->val->serialize($charset_encoding) . + "\n"; + } + } + $result .= "\n"; + $this->payload = $result; + return $result; + } + } + + class xmlrpcmsg + { + var $payload; + var $methodname; + var $params=array(); + var $debug=0; + var $content_type = 'text/xml'; + + /** + * @param string $meth the name of the method to invoke + * @param array $pars array of parameters to be paased to the method (xmlrpcval objects) + */ + function xmlrpcmsg($meth, $pars=0) + { + $this->methodname=$meth; + if(is_array($pars) && count($pars)>0) + { + for($i=0; $iaddParam($pars[$i]); + } + } + } + + /** + * @access private + */ + function xml_header($charset_encoding='') + { + if ($charset_encoding != '') + { + return "\n\n"; + } + else + { + return "\n\n"; + } + } + + /** + * @access private + */ + function xml_footer() + { + return ''; + } + + /** + * @access private + */ + function kindOf() + { + return 'msg'; + } + + /** + * @access private + */ + function createPayload($charset_encoding='') + { + if ($charset_encoding != '') + $this->content_type = 'text/xml; charset=' . $charset_encoding; + else + $this->content_type = 'text/xml'; + $this->payload=$this->xml_header($charset_encoding); + $this->payload.='' . $this->methodname . "\n"; + $this->payload.="\n"; + for($i=0; $iparams); $i++) + { + $p=$this->params[$i]; + $this->payload.="\n" . $p->serialize($charset_encoding) . + "\n"; + } + $this->payload.="\n"; + $this->payload.=$this->xml_footer(); + } + + /** + * Gets/sets the xmlrpc method to be invoked + * @param string $meth the method to be set (leave empty not to set it) + * @return string the method that will be invoked + * @access public + */ + function method($meth='') + { + if($meth!='') + { + $this->methodname=$meth; + } + return $this->methodname; + } + + /** + * Returns xml representation of the message. XML prologue included + * @return string the xml representation of the message, xml prologue included + * @access public + */ + function serialize($charset_encoding='') + { + $this->createPayload($charset_encoding); + return $this->payload; + } + + /** + * Add a parameter to the list of parameters to be used upon method invocation + * @param xmlrpcval $par + * @return boolean false on failure + * @access public + */ + function addParam($par) + { + // add check: do not add to self params which are not xmlrpcvals + if(is_object($par) && is_a($par, 'xmlrpcval')) + { + $this->params[]=$par; + return true; + } + else + { + return false; + } + } + + /** + * Returns the nth parameter in the message. The index zero-based. + * @param integer $i the index of the parameter to fetch (zero based) + * @return xmlrpcval the i-th parameter + * @access public + */ + function getParam($i) { return $this->params[$i]; } + + /** + * Returns the number of parameters in the messge. + * @return integer the number of parameters currently set + * @access public + */ + function getNumParams() { return count($this->params); } + + /** + * Given an open file handle, read all data available and parse it as axmlrpc response. + * NB: the file handle is not closed by this function. + * NNB: might have trouble in rare cases to work on network streams, as we + * check for a read of 0 bytes instead of feof($fp). + * But since checking for feof(null) returns false, we would risk an + * infinite loop in that case, because we cannot trust the caller + * to give us a valid pointer to an open file... + * @access public + * @return xmlrpcresp + * @todo add 2nd & 3rd param to be passed to ParseResponse() ??? + */ + function &parseResponseFile($fp) + { + $ipd=''; + while($data=fread($fp, 32768)) + { + $ipd.=$data; + } + //fclose($fp); + $r =& $this->parseResponse($ipd); + return $r; + } + + /** + * Parses HTTP headers and separates them from data. + * @access private + */ + function &parseResponseHeaders(&$data, $headers_processed=false) + { + // Support "web-proxy-tunelling" connections for https through proxies + if(preg_match('/^HTTP\/1\.[0-1] 200 Connection established/', $data)) + { + // Look for CR/LF or simple LF as line separator, + // (even though it is not valid http) + $pos = strpos($data,"\r\n\r\n"); + if($pos || is_int($pos)) + { + $bd = $pos+4; + } + else + { + $pos = strpos($data,"\n\n"); + if($pos || is_int($pos)) + { + $bd = $pos+2; + } + else + { + // No separation between response headers and body: fault? + $bd = 0; + } + } + if ($bd) + { + // this filters out all http headers from proxy. + // maybe we could take them into account, too? + $data = substr($data, $bd); + } + else + { + error_log('XML-RPC: '.__METHOD__.': HTTPS via proxy error, tunnel connection possibly failed'); + $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $GLOBALS['xmlrpcstr']['http_error']. ' (HTTPS via proxy error, tunnel connection possibly failed)'); + return $r; + } + } + + // Strip HTTP 1.1 100 Continue header if present + while(preg_match('/^HTTP\/1\.1 1[0-9]{2} /', $data)) + { + $pos = strpos($data, 'HTTP', 12); + // server sent a Continue header without any (valid) content following... + // give the client a chance to know it + if(!$pos && !is_int($pos)) // works fine in php 3, 4 and 5 + { + break; + } + $data = substr($data, $pos); + } + if(!preg_match('/^HTTP\/[0-9.]+ 200 /', $data)) + { + $errstr= substr($data, 0, strpos($data, "\n")-1); + error_log('XML-RPC: '.__METHOD__.': HTTP error, got response: ' .$errstr); + $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $GLOBALS['xmlrpcstr']['http_error']. ' (' . $errstr . ')'); + return $r; + } + + $GLOBALS['_xh']['headers'] = array(); + $GLOBALS['_xh']['cookies'] = array(); + + // be tolerant to usage of \n instead of \r\n to separate headers and data + // (even though it is not valid http) + $pos = strpos($data,"\r\n\r\n"); + if($pos || is_int($pos)) + { + $bd = $pos+4; + } + else + { + $pos = strpos($data,"\n\n"); + if($pos || is_int($pos)) + { + $bd = $pos+2; + } + else + { + // No separation between response headers and body: fault? + // we could take some action here instead of going on... + $bd = 0; + } + } + // be tolerant to line endings, and extra empty lines + $ar = preg_split("/\r?\n/", trim(substr($data, 0, $pos))); + while(list(,$line) = @each($ar)) + { + // take care of multi-line headers and cookies + $arr = explode(':',$line,2); + if(count($arr) > 1) + { + $header_name = strtolower(trim($arr[0])); + /// @todo some other headers (the ones that allow a CSV list of values) + /// do allow many values to be passed using multiple header lines. + /// We should add content to $GLOBALS['_xh']['headers'][$header_name] + /// instead of replacing it for those... + if ($header_name == 'set-cookie' || $header_name == 'set-cookie2') + { + if ($header_name == 'set-cookie2') + { + // version 2 cookies: + // there could be many cookies on one line, comma separated + $cookies = explode(',', $arr[1]); + } + else + { + $cookies = array($arr[1]); + } + foreach ($cookies as $cookie) + { + // glue together all received cookies, using a comma to separate them + // (same as php does with getallheaders()) + if (isset($GLOBALS['_xh']['headers'][$header_name])) + $GLOBALS['_xh']['headers'][$header_name] .= ', ' . trim($cookie); + else + $GLOBALS['_xh']['headers'][$header_name] = trim($cookie); + // parse cookie attributes, in case user wants to correctly honour them + // feature creep: only allow rfc-compliant cookie attributes? + // @todo support for server sending multiple time cookie with same name, but using different PATHs + $cookie = explode(';', $cookie); + foreach ($cookie as $pos => $val) + { + $val = explode('=', $val, 2); + $tag = trim($val[0]); + $val = trim(@$val[1]); + /// @todo with version 1 cookies, we should strip leading and trailing " chars + if ($pos == 0) + { + $cookiename = $tag; + $GLOBALS['_xh']['cookies'][$tag] = array(); + $GLOBALS['_xh']['cookies'][$cookiename]['value'] = urldecode($val); + } + else + { + if ($tag != 'value') + { + $GLOBALS['_xh']['cookies'][$cookiename][$tag] = $val; + } + } + } + } + } + else + { + $GLOBALS['_xh']['headers'][$header_name] = trim($arr[1]); + } + } + elseif(isset($header_name)) + { + /// @todo version1 cookies might span multiple lines, thus breaking the parsing above + $GLOBALS['_xh']['headers'][$header_name] .= ' ' . trim($line); + } + } + + $data = substr($data, $bd); + + if($this->debug && count($GLOBALS['_xh']['headers'])) + { + print '
    ';
    +					foreach($GLOBALS['_xh']['headers'] as $header => $value)
    +					{
    +						print htmlentities("HEADER: $header: $value\n");
    +					}
    +					foreach($GLOBALS['_xh']['cookies'] as $header => $value)
    +					{
    +						print htmlentities("COOKIE: $header={$value['value']}\n");
    +					}
    +					print "
    \n"; + } + + // if CURL was used for the call, http headers have been processed, + // and dechunking + reinflating have been carried out + if(!$headers_processed) + { + // Decode chunked encoding sent by http 1.1 servers + if(isset($GLOBALS['_xh']['headers']['transfer-encoding']) && $GLOBALS['_xh']['headers']['transfer-encoding'] == 'chunked') + { + if(!$data = decode_chunked($data)) + { + error_log('XML-RPC: '.__METHOD__.': errors occurred when trying to rebuild the chunked data received from server'); + $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['dechunk_fail'], $GLOBALS['xmlrpcstr']['dechunk_fail']); + return $r; + } + } + + // Decode gzip-compressed stuff + // code shamelessly inspired from nusoap library by Dietrich Ayala + if(isset($GLOBALS['_xh']['headers']['content-encoding'])) + { + $GLOBALS['_xh']['headers']['content-encoding'] = str_replace('x-', '', $GLOBALS['_xh']['headers']['content-encoding']); + if($GLOBALS['_xh']['headers']['content-encoding'] == 'deflate' || $GLOBALS['_xh']['headers']['content-encoding'] == 'gzip') + { + // if decoding works, use it. else assume data wasn't gzencoded + if(function_exists('gzinflate')) + { + if($GLOBALS['_xh']['headers']['content-encoding'] == 'deflate' && $degzdata = @gzuncompress($data)) + { + $data = $degzdata; + if($this->debug) + print "
    ---INFLATED RESPONSE---[".strlen($data)." chars]---\n" . htmlentities($data) . "\n---END---
    "; + } + elseif($GLOBALS['_xh']['headers']['content-encoding'] == 'gzip' && $degzdata = @gzinflate(substr($data, 10))) + { + $data = $degzdata; + if($this->debug) + print "
    ---INFLATED RESPONSE---[".strlen($data)." chars]---\n" . htmlentities($data) . "\n---END---
    "; + } + else + { + error_log('XML-RPC: '.__METHOD__.': errors occurred when trying to decode the deflated data received from server'); + $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['decompress_fail'], $GLOBALS['xmlrpcstr']['decompress_fail']); + return $r; + } + } + else + { + error_log('XML-RPC: '.__METHOD__.': the server sent deflated data. Your php install must have the Zlib extension compiled in to support this.'); + $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['cannot_decompress'], $GLOBALS['xmlrpcstr']['cannot_decompress']); + return $r; + } + } + } + } // end of 'if needed, de-chunk, re-inflate response' + + // real stupid hack to avoid PHP complaining about returning NULL by ref + $r = null; + $r =& $r; + return $r; + } + + /** + * Parse the xmlrpc response contained in the string $data and return an xmlrpcresp object. + * @param string $data the xmlrpc response, eventually including http headers + * @param bool $headers_processed when true prevents parsing HTTP headers for interpretation of content-encoding and consequent decoding + * @param string $return_type decides return type, i.e. content of response->value(). Either 'xmlrpcvals', 'xml' or 'phpvals' + * @return xmlrpcresp + * @access public + */ + function &parseResponse($data='', $headers_processed=false, $return_type='xmlrpcvals') + { + if($this->debug) + { + //by maHo, replaced htmlspecialchars with htmlentities + print "
    ---GOT---\n" . htmlentities($data) . "\n---END---\n
    "; + } + + if($data == '') + { + error_log('XML-RPC: '.__METHOD__.': no response received from server.'); + $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_data'], $GLOBALS['xmlrpcstr']['no_data']); + return $r; + } + + $GLOBALS['_xh']=array(); + + $raw_data = $data; + // parse the HTTP headers of the response, if present, and separate them from data + if(substr($data, 0, 4) == 'HTTP') + { + $r =& $this->parseResponseHeaders($data, $headers_processed); + if ($r) + { + // failed processing of HTTP response headers + // save into response obj the full payload received, for debugging + $r->raw_data = $data; + return $r; + } + } + else + { + $GLOBALS['_xh']['headers'] = array(); + $GLOBALS['_xh']['cookies'] = array(); + } + + if($this->debug) + { + $start = strpos($data, '', $start); + $comments = substr($data, $start, $end-$start); + print "
    ---SERVER DEBUG INFO (DECODED) ---\n\t".htmlentities(str_replace("\n", "\n\t", base64_decode($comments)))."\n---END---\n
    "; + } + } + + // be tolerant of extra whitespace in response body + $data = trim($data); + + /// @todo return an error msg if $data=='' ? + + // be tolerant of junk after methodResponse (e.g. javascript ads automatically inserted by free hosts) + // idea from Luca Mariano originally in PEARified version of the lib + $pos = strrpos($data, ''); + if($pos !== false) + { + $data = substr($data, 0, $pos+17); + } + + // if user wants back raw xml, give it to him + if ($return_type == 'xml') + { + $r = new xmlrpcresp($data, 0, '', 'xml'); + $r->hdrs = $GLOBALS['_xh']['headers']; + $r->_cookies = $GLOBALS['_xh']['cookies']; + $r->raw_data = $raw_data; + return $r; + } + + // try to 'guestimate' the character encoding of the received response + $resp_encoding = guess_encoding(@$GLOBALS['_xh']['headers']['content-type'], $data); + + $GLOBALS['_xh']['ac']=''; + //$GLOBALS['_xh']['qt']=''; //unused... + $GLOBALS['_xh']['stack'] = array(); + $GLOBALS['_xh']['valuestack'] = array(); + $GLOBALS['_xh']['isf']=0; // 0 = OK, 1 for xmlrpc fault responses, 2 = invalid xmlrpc + $GLOBALS['_xh']['isf_reason']=''; + $GLOBALS['_xh']['rt']=''; // 'methodcall or 'methodresponse' + + // if response charset encoding is not known / supported, try to use + // the default encoding and parse the xml anyway, but log a warning... + if (!in_array($resp_encoding, array('UTF-8', 'ISO-8859-1', 'US-ASCII'))) + // the following code might be better for mb_string enabled installs, but + // makes the lib about 200% slower... + //if (!is_valid_charset($resp_encoding, array('UTF-8', 'ISO-8859-1', 'US-ASCII'))) + { + error_log('XML-RPC: '.__METHOD__.': invalid charset encoding of received response: '.$resp_encoding); + $resp_encoding = $GLOBALS['xmlrpc_defencoding']; + } + $parser = xml_parser_create($resp_encoding); + xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true); + // G. Giunta 2005/02/13: PHP internally uses ISO-8859-1, so we have to tell + // the xml parser to give us back data in the expected charset. + // What if internal encoding is not in one of the 3 allowed? + // we use the broadest one, ie. utf8 + // This allows to send data which is native in various charset, + // by extending xmlrpc_encode_entitites() and setting xmlrpc_internalencoding + if (!in_array($GLOBALS['xmlrpc_internalencoding'], array('UTF-8', 'ISO-8859-1', 'US-ASCII'))) + { + xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, 'UTF-8'); + } + else + { + xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $GLOBALS['xmlrpc_internalencoding']); + } + + if ($return_type == 'phpvals') + { + xml_set_element_handler($parser, 'xmlrpc_se', 'xmlrpc_ee_fast'); + } + else + { + xml_set_element_handler($parser, 'xmlrpc_se', 'xmlrpc_ee'); + } + + xml_set_character_data_handler($parser, 'xmlrpc_cd'); + xml_set_default_handler($parser, 'xmlrpc_dh'); + + // first error check: xml not well formed + if(!xml_parse($parser, $data, count($data))) + { + // thanks to Peter Kocks + if((xml_get_current_line_number($parser)) == 1) + { + $errstr = 'XML error at line 1, check URL'; + } + else + { + $errstr = sprintf('XML error: %s at line %d, column %d', + xml_error_string(xml_get_error_code($parser)), + xml_get_current_line_number($parser), xml_get_current_column_number($parser)); + } + error_log($errstr); + $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'], $GLOBALS['xmlrpcstr']['invalid_return'].' ('.$errstr.')'); + xml_parser_free($parser); + if($this->debug) + { + print $errstr; + } + $r->hdrs = $GLOBALS['_xh']['headers']; + $r->_cookies = $GLOBALS['_xh']['cookies']; + $r->raw_data = $raw_data; + return $r; + } + xml_parser_free($parser); + // second error check: xml well formed but not xml-rpc compliant + if ($GLOBALS['_xh']['isf'] > 1) + { + if ($this->debug) + { + /// @todo echo something for user? + } + + $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'], + $GLOBALS['xmlrpcstr']['invalid_return'] . ' ' . $GLOBALS['_xh']['isf_reason']); + } + // third error check: parsing of the response has somehow gone boink. + // NB: shall we omit this check, since we trust the parsing code? + elseif ($return_type == 'xmlrpcvals' && !is_object($GLOBALS['_xh']['value'])) + { + // something odd has happened + // and it's time to generate a client side error + // indicating something odd went on + $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'], + $GLOBALS['xmlrpcstr']['invalid_return']); + } + else + { + if ($this->debug) + { + print "
    ---PARSED---\n";
    +					// somehow htmlentities chokes on var_export, and some full html string...
    +					//print htmlentitites(var_export($GLOBALS['_xh']['value'], true));
    +					print htmlspecialchars(var_export($GLOBALS['_xh']['value'], true));
    +					print "\n---END---
    "; + } + + // note that using =& will raise an error if $GLOBALS['_xh']['st'] does not generate an object. + $v =& $GLOBALS['_xh']['value']; + + if($GLOBALS['_xh']['isf']) + { + /// @todo we should test here if server sent an int and a string, + /// and/or coerce them into such... + if ($return_type == 'xmlrpcvals') + { + $errno_v = $v->structmem('faultCode'); + $errstr_v = $v->structmem('faultString'); + $errno = $errno_v->scalarval(); + $errstr = $errstr_v->scalarval(); + } + else + { + $errno = $v['faultCode']; + $errstr = $v['faultString']; + } + + if($errno == 0) + { + // FAULT returned, errno needs to reflect that + $errno = -1; + } + + $r = new xmlrpcresp(0, $errno, $errstr); + } + else + { + $r=new xmlrpcresp($v, 0, '', $return_type); + } + } + + $r->hdrs = $GLOBALS['_xh']['headers']; + $r->_cookies = $GLOBALS['_xh']['cookies']; + $r->raw_data = $raw_data; + return $r; + } + } + + class xmlrpcval + { + var $me=array(); + var $mytype=0; + var $_php_class=null; + + /** + * @param mixed $val + * @param string $type any valid xmlrpc type name (lowercase). If null, 'string' is assumed + */ + function xmlrpcval($val=-1, $type='') + { + /// @todo: optimization creep - do not call addXX, do it all inline. + /// downside: booleans will not be coerced anymore + if($val!==-1 || $type!='') + { + // optimization creep: inlined all work done by constructor + switch($type) + { + case '': + $this->mytype=1; + $this->me['string']=$val; + break; + case 'i4': + case 'int': + case 'double': + case 'string': + case 'boolean': + case 'dateTime.iso8601': + case 'base64': + case 'null': + $this->mytype=1; + $this->me[$type]=$val; + break; + case 'array': + $this->mytype=2; + $this->me['array']=$val; + break; + case 'struct': + $this->mytype=3; + $this->me['struct']=$val; + break; + default: + error_log("XML-RPC: ".__METHOD__.": not a known type ($type)"); + } + /*if($type=='') + { + $type='string'; + } + if($GLOBALS['xmlrpcTypes'][$type]==1) + { + $this->addScalar($val,$type); + } + elseif($GLOBALS['xmlrpcTypes'][$type]==2) + { + $this->addArray($val); + } + elseif($GLOBALS['xmlrpcTypes'][$type]==3) + { + $this->addStruct($val); + }*/ + } + } + + /** + * Add a single php value to an (unitialized) xmlrpcval + * @param mixed $val + * @param string $type + * @return int 1 or 0 on failure + */ + function addScalar($val, $type='string') + { + $typeof=@$GLOBALS['xmlrpcTypes'][$type]; + if($typeof!=1) + { + error_log("XML-RPC: ".__METHOD__.": not a scalar type ($type)"); + return 0; + } + + // coerce booleans into correct values + // NB: we should either do it for datetimes, integers and doubles, too, + // or just plain remove this check, implemented on booleans only... + if($type==$GLOBALS['xmlrpcBoolean']) + { + if(strcasecmp($val,'true')==0 || $val==1 || ($val==true && strcasecmp($val,'false'))) + { + $val=true; + } + else + { + $val=false; + } + } + + switch($this->mytype) + { + case 1: + error_log('XML-RPC: '.__METHOD__.': scalar xmlrpcval can have only one value'); + return 0; + case 3: + error_log('XML-RPC: '.__METHOD__.': cannot add anonymous scalar to struct xmlrpcval'); + return 0; + case 2: + // we're adding a scalar value to an array here + //$ar=$this->me['array']; + //$ar[]=new xmlrpcval($val, $type); + //$this->me['array']=$ar; + // Faster (?) avoid all the costly array-copy-by-val done here... + $this->me['array'][]=new xmlrpcval($val, $type); + return 1; + default: + // a scalar, so set the value and remember we're scalar + $this->me[$type]=$val; + $this->mytype=$typeof; + return 1; + } + } + + /** + * Add an array of xmlrpcval objects to an xmlrpcval + * @param array $vals + * @return int 1 or 0 on failure + * @access public + * + * @todo add some checking for $vals to be an array of xmlrpcvals? + */ + function addArray($vals) + { + if($this->mytype==0) + { + $this->mytype=$GLOBALS['xmlrpcTypes']['array']; + $this->me['array']=$vals; + return 1; + } + elseif($this->mytype==2) + { + // we're adding to an array here + $this->me['array'] = array_merge($this->me['array'], $vals); + return 1; + } + else + { + error_log('XML-RPC: '.__METHOD__.': already initialized as a [' . $this->kindOf() . ']'); + return 0; + } + } + + /** + * Add an array of named xmlrpcval objects to an xmlrpcval + * @param array $vals + * @return int 1 or 0 on failure + * @access public + * + * @todo add some checking for $vals to be an array? + */ + function addStruct($vals) + { + if($this->mytype==0) + { + $this->mytype=$GLOBALS['xmlrpcTypes']['struct']; + $this->me['struct']=$vals; + return 1; + } + elseif($this->mytype==3) + { + // we're adding to a struct here + $this->me['struct'] = array_merge($this->me['struct'], $vals); + return 1; + } + else + { + error_log('XML-RPC: '.__METHOD__.': already initialized as a [' . $this->kindOf() . ']'); + return 0; + } + } + + // poor man's version of print_r ??? + // DEPRECATED! + function dump($ar) + { + foreach($ar as $key => $val) + { + echo "$key => $val
    "; + if($key == 'array') + { + while(list($key2, $val2) = each($val)) + { + echo "-- $key2 => $val2
    "; + } + } + } + } + + /** + * Returns a string containing "struct", "array" or "scalar" describing the base type of the value + * @return string + * @access public + */ + function kindOf() + { + switch($this->mytype) + { + case 3: + return 'struct'; + break; + case 2: + return 'array'; + break; + case 1: + return 'scalar'; + break; + default: + return 'undef'; + } + } + + /** + * @access private + */ + function serializedata($typ, $val, $charset_encoding='') + { + $rs=''; + switch(@$GLOBALS['xmlrpcTypes'][$typ]) + { + case 1: + switch($typ) + { + case $GLOBALS['xmlrpcBase64']: + $rs.="<${typ}>" . base64_encode($val) . ""; + break; + case $GLOBALS['xmlrpcBoolean']: + $rs.="<${typ}>" . ($val ? '1' : '0') . ""; + break; + case $GLOBALS['xmlrpcString']: + // G. Giunta 2005/2/13: do NOT use htmlentities, since + // it will produce named html entities, which are invalid xml + $rs.="<${typ}>" . xmlrpc_encode_entitites($val, $GLOBALS['xmlrpc_internalencoding'], $charset_encoding). ""; + break; + case $GLOBALS['xmlrpcInt']: + case $GLOBALS['xmlrpcI4']: + $rs.="<${typ}>".(int)$val.""; + break; + case $GLOBALS['xmlrpcDouble']: + // avoid using standard conversion of float to string because it is locale-dependent, + // and also because the xmlrpc spec forbids exponential notation. + // sprintf('%F') could be most likely ok but it fails eg. on 2e-14. + // The code below tries its best at keeping max precision while avoiding exp notation, + // but there is of course no limit in the number of decimal places to be used... + $rs.="<${typ}>".preg_replace('/\\.?0+$/','',number_format((double)$val, 128, '.', '')).""; + break; + case $GLOBALS['xmlrpcDateTime']: + if (is_string($val)) + { + $rs.="<${typ}>${val}"; + } + else if(is_a($val, 'DateTime')) + { + $rs.="<${typ}>".$val->format('Ymd\TH:i:s').""; + } + else if(is_int($val)) + { + $rs.="<${typ}>".strftime("%Y%m%dT%H:%M:%S", $val).""; + } + else + { + // not really a good idea here: but what shall we output anyway? left for backward compat... + $rs.="<${typ}>${val}"; + } + break; + case $GLOBALS['xmlrpcNull']: + if ($GLOBALS['xmlrpc_null_apache_encoding']) + { + $rs.=""; + } + else + { + $rs.=""; + } + break; + default: + // no standard type value should arrive here, but provide a possibility + // for xmlrpcvals of unknown type... + $rs.="<${typ}>${val}"; + } + break; + case 3: + // struct + if ($this->_php_class) + { + $rs.='\n"; + } + else + { + $rs.="\n"; + } + foreach($val as $key2 => $val2) + { + $rs.=''.xmlrpc_encode_entitites($key2, $GLOBALS['xmlrpc_internalencoding'], $charset_encoding)."\n"; + //$rs.=$this->serializeval($val2); + $rs.=$val2->serialize($charset_encoding); + $rs.="\n"; + } + $rs.=''; + break; + case 2: + // array + $rs.="\n\n"; + for($i=0; $iserializeval($val[$i]); + $rs.=$val[$i]->serialize($charset_encoding); + } + $rs.="\n"; + break; + default: + break; + } + return $rs; + } + + /** + * Returns xml representation of the value. XML prologue not included + * @param string $charset_encoding the charset to be used for serialization. if null, US-ASCII is assumed + * @return string + * @access public + */ + function serialize($charset_encoding='') + { + // add check? slower, but helps to avoid recursion in serializing broken xmlrpcvals... + //if (is_object($o) && (get_class($o) == 'xmlrpcval' || is_subclass_of($o, 'xmlrpcval'))) + //{ + reset($this->me); + list($typ, $val) = each($this->me); + return '' . $this->serializedata($typ, $val, $charset_encoding) . "\n"; + //} + } + + // DEPRECATED + function serializeval($o) + { + // add check? slower, but helps to avoid recursion in serializing broken xmlrpcvals... + //if (is_object($o) && (get_class($o) == 'xmlrpcval' || is_subclass_of($o, 'xmlrpcval'))) + //{ + $ar=$o->me; + reset($ar); + list($typ, $val) = each($ar); + return '' . $this->serializedata($typ, $val) . "\n"; + //} + } + + /** + * Checks wheter a struct member with a given name is present. + * Works only on xmlrpcvals of type struct. + * @param string $m the name of the struct member to be looked up + * @return boolean + * @access public + */ + function structmemexists($m) + { + return array_key_exists($m, $this->me['struct']); + } + + /** + * Returns the value of a given struct member (an xmlrpcval object in itself). + * Will raise a php warning if struct member of given name does not exist + * @param string $m the name of the struct member to be looked up + * @return xmlrpcval + * @access public + */ + function structmem($m) + { + return $this->me['struct'][$m]; + } + + /** + * Reset internal pointer for xmlrpcvals of type struct. + * @access public + */ + function structreset() + { + reset($this->me['struct']); + } + + /** + * Return next member element for xmlrpcvals of type struct. + * @return xmlrpcval + * @access public + */ + function structeach() + { + return each($this->me['struct']); + } + + // DEPRECATED! this code looks like it is very fragile and has not been fixed + // for a long long time. Shall we remove it for 2.0? + function getval() + { + // UNSTABLE + reset($this->me); + list($a,$b)=each($this->me); + // contributed by I Sofer, 2001-03-24 + // add support for nested arrays to scalarval + // i've created a new method here, so as to + // preserve back compatibility + + if(is_array($b)) + { + @reset($b); + while(list($id,$cont) = @each($b)) + { + $b[$id] = $cont->scalarval(); + } + } + + // add support for structures directly encoding php objects + if(is_object($b)) + { + $t = get_object_vars($b); + @reset($t); + while(list($id,$cont) = @each($t)) + { + $t[$id] = $cont->scalarval(); + } + @reset($t); + while(list($id,$cont) = @each($t)) + { + @$b->$id = $cont; + } + } + // end contrib + return $b; + } + + /** + * Returns the value of a scalar xmlrpcval + * @return mixed + * @access public + */ + function scalarval() + { + reset($this->me); + list(,$b)=each($this->me); + return $b; + } + + /** + * Returns the type of the xmlrpcval. + * For integers, 'int' is always returned in place of 'i4' + * @return string + * @access public + */ + function scalartyp() + { + reset($this->me); + list($a,)=each($this->me); + if($a==$GLOBALS['xmlrpcI4']) + { + $a=$GLOBALS['xmlrpcInt']; + } + return $a; + } + + /** + * Returns the m-th member of an xmlrpcval of struct type + * @param integer $m the index of the value to be retrieved (zero based) + * @return xmlrpcval + * @access public + */ + function arraymem($m) + { + return $this->me['array'][$m]; + } + + /** + * Returns the number of members in an xmlrpcval of array type + * @return integer + * @access public + */ + function arraysize() + { + return count($this->me['array']); + } + + /** + * Returns the number of members in an xmlrpcval of struct type + * @return integer + * @access public + */ + function structsize() + { + return count($this->me['struct']); + } + } + + + // date helpers + + /** + * Given a timestamp, return the corresponding ISO8601 encoded string. + * + * Really, timezones ought to be supported + * but the XML-RPC spec says: + * + * "Don't assume a timezone. It should be specified by the server in its + * documentation what assumptions it makes about timezones." + * + * These routines always assume localtime unless + * $utc is set to 1, in which case UTC is assumed + * and an adjustment for locale is made when encoding + * + * @param int $timet (timestamp) + * @param int $utc (0 or 1) + * @return string + */ + function iso8601_encode($timet, $utc=0) + { + if(!$utc) + { + $t=strftime("%Y%m%dT%H:%M:%S", $timet); + } + else + { + if(function_exists('gmstrftime')) + { + // gmstrftime doesn't exist in some versions + // of PHP + $t=gmstrftime("%Y%m%dT%H:%M:%S", $timet); + } + else + { + $t=strftime("%Y%m%dT%H:%M:%S", $timet-date('Z')); + } + } + return $t; + } + + /** + * Given an ISO8601 date string, return a timet in the localtime, or UTC + * @param string $idate + * @param int $utc either 0 or 1 + * @return int (datetime) + */ + function iso8601_decode($idate, $utc=0) + { + $t=0; + if(preg_match('/([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})/', $idate, $regs)) + { + if($utc) + { + $t=gmmktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]); + } + else + { + $t=mktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]); + } + } + return $t; + } + + /** + * Takes an xmlrpc value in PHP xmlrpcval object format and translates it into native PHP types. + * + * Works with xmlrpc message objects as input, too. + * + * Given proper options parameter, can rebuild generic php object instances + * (provided those have been encoded to xmlrpc format using a corresponding + * option in php_xmlrpc_encode()) + * PLEASE NOTE that rebuilding php objects involves calling their constructor function. + * This means that the remote communication end can decide which php code will + * get executed on your server, leaving the door possibly open to 'php-injection' + * style of attacks (provided you have some classes defined on your server that + * might wreak havoc if instances are built outside an appropriate context). + * Make sure you trust the remote server/client before eanbling this! + * + * @author Dan Libby (dan@libby.com) + * + * @param xmlrpcval $xmlrpc_val + * @param array $options if 'decode_php_objs' is set in the options array, xmlrpc structs can be decoded into php objects; if 'dates_as_objects' is set xmlrpc datetimes are decoded as php DateTime objects (standard is + * @return mixed + */ + function php_xmlrpc_decode($xmlrpc_val, $options=array()) + { + switch($xmlrpc_val->kindOf()) + { + case 'scalar': + if (in_array('extension_api', $options)) + { + reset($xmlrpc_val->me); + list($typ,$val) = each($xmlrpc_val->me); + switch ($typ) + { + case 'dateTime.iso8601': + $xmlrpc_val->scalar = $val; + $xmlrpc_val->xmlrpc_type = 'datetime'; + $xmlrpc_val->timestamp = iso8601_decode($val); + return $xmlrpc_val; + case 'base64': + $xmlrpc_val->scalar = $val; + $xmlrpc_val->type = $typ; + return $xmlrpc_val; + default: + return $xmlrpc_val->scalarval(); + } + } + if (in_array('dates_as_objects', $options) && $xmlrpc_val->scalartyp() == 'dateTime.iso8601') + { + // we return a Datetime object instead of a string + // since now the constructor of xmlrpcval accepts safely strings, ints and datetimes, + // we cater to all 3 cases here + $out = $xmlrpc_val->scalarval(); + if (is_string($out)) + { + $out = strtotime($out); + } + if (is_int($out)) + { + $result = new Datetime(); + $result->setTimestamp($out); + return $result; + } + elseif (is_a($out, 'Datetime')) + { + return $out; + } + } + return $xmlrpc_val->scalarval(); + case 'array': + $size = $xmlrpc_val->arraysize(); + $arr = array(); + for($i = 0; $i < $size; $i++) + { + $arr[] = php_xmlrpc_decode($xmlrpc_val->arraymem($i), $options); + } + return $arr; + case 'struct': + $xmlrpc_val->structreset(); + // If user said so, try to rebuild php objects for specific struct vals. + /// @todo should we raise a warning for class not found? + // shall we check for proper subclass of xmlrpcval instead of + // presence of _php_class to detect what we can do? + if (in_array('decode_php_objs', $options) && $xmlrpc_val->_php_class != '' + && class_exists($xmlrpc_val->_php_class)) + { + $obj = @new $xmlrpc_val->_php_class; + while(list($key,$value)=$xmlrpc_val->structeach()) + { + $obj->$key = php_xmlrpc_decode($value, $options); + } + return $obj; + } + else + { + $arr = array(); + while(list($key,$value)=$xmlrpc_val->structeach()) + { + $arr[$key] = php_xmlrpc_decode($value, $options); + } + return $arr; + } + case 'msg': + $paramcount = $xmlrpc_val->getNumParams(); + $arr = array(); + for($i = 0; $i < $paramcount; $i++) + { + $arr[] = php_xmlrpc_decode($xmlrpc_val->getParam($i)); + } + return $arr; + } + } + + // This constant left here only for historical reasons... + // it was used to decide if we have to define xmlrpc_encode on our own, but + // we do not do it anymore + if(function_exists('xmlrpc_decode')) + { + define('XMLRPC_EPI_ENABLED','1'); + } + else + { + define('XMLRPC_EPI_ENABLED','0'); + } + + /** + * Takes native php types and encodes them into xmlrpc PHP object format. + * It will not re-encode xmlrpcval objects. + * + * Feature creep -- could support more types via optional type argument + * (string => datetime support has been added, ??? => base64 not yet) + * + * If given a proper options parameter, php object instances will be encoded + * into 'special' xmlrpc values, that can later be decoded into php objects + * by calling php_xmlrpc_decode() with a corresponding option + * + * @author Dan Libby (dan@libby.com) + * + * @param mixed $php_val the value to be converted into an xmlrpcval object + * @param array $options can include 'encode_php_objs', 'auto_dates', 'null_extension' or 'extension_api' + * @return xmlrpcval + */ + function php_xmlrpc_encode($php_val, $options=array()) + { + $type = gettype($php_val); + switch($type) + { + case 'string': + if (in_array('auto_dates', $options) && preg_match('/^[0-9]{8}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/', $php_val)) + $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcDateTime']); + else + $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcString']); + break; + case 'integer': + $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcInt']); + break; + case 'double': + $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcDouble']); + break; + // + // Add support for encoding/decoding of booleans, since they are supported in PHP + case 'boolean': + $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcBoolean']); + break; + // + case 'array': + // PHP arrays can be encoded to either xmlrpc structs or arrays, + // depending on wheter they are hashes or plain 0..n integer indexed + // A shorter one-liner would be + // $tmp = array_diff(array_keys($php_val), range(0, count($php_val)-1)); + // but execution time skyrockets! + $j = 0; + $arr = array(); + $ko = false; + foreach($php_val as $key => $val) + { + $arr[$key] = php_xmlrpc_encode($val, $options); + if(!$ko && $key !== $j) + { + $ko = true; + } + $j++; + } + if($ko) + { + $xmlrpc_val = new xmlrpcval($arr, $GLOBALS['xmlrpcStruct']); + } + else + { + $xmlrpc_val = new xmlrpcval($arr, $GLOBALS['xmlrpcArray']); + } + break; + case 'object': + if(is_a($php_val, 'xmlrpcval')) + { + $xmlrpc_val = $php_val; + } + else if(is_a($php_val, 'DateTime')) + { + $xmlrpc_val = new xmlrpcval($php_val->format('Ymd\TH:i:s'), $GLOBALS['xmlrpcStruct']); + } + else + { + $arr = array(); + reset($php_val); + while(list($k,$v) = each($php_val)) + { + $arr[$k] = php_xmlrpc_encode($v, $options); + } + $xmlrpc_val = new xmlrpcval($arr, $GLOBALS['xmlrpcStruct']); + if (in_array('encode_php_objs', $options)) + { + // let's save original class name into xmlrpcval: + // might be useful later on... + $xmlrpc_val->_php_class = get_class($php_val); + } + } + break; + case 'NULL': + if (in_array('extension_api', $options)) + { + $xmlrpc_val = new xmlrpcval('', $GLOBALS['xmlrpcString']); + } + else if (in_array('null_extension', $options)) + { + $xmlrpc_val = new xmlrpcval('', $GLOBALS['xmlrpcNull']); + } + else + { + $xmlrpc_val = new xmlrpcval(); + } + break; + case 'resource': + if (in_array('extension_api', $options)) + { + $xmlrpc_val = new xmlrpcval((int)$php_val, $GLOBALS['xmlrpcInt']); + } + else + { + $xmlrpc_val = new xmlrpcval(); + } + // catch "user function", "unknown type" + default: + // giancarlo pinerolo + // it has to return + // an empty object in case, not a boolean. + $xmlrpc_val = new xmlrpcval(); + break; + } + return $xmlrpc_val; + } + + /** + * Convert the xml representation of a method response, method request or single + * xmlrpc value into the appropriate object (a.k.a. deserialize) + * @param string $xml_val + * @param array $options + * @return mixed false on error, or an instance of either xmlrpcval, xmlrpcmsg or xmlrpcresp + */ + function php_xmlrpc_decode_xml($xml_val, $options=array()) + { + $GLOBALS['_xh'] = array(); + $GLOBALS['_xh']['ac'] = ''; + $GLOBALS['_xh']['stack'] = array(); + $GLOBALS['_xh']['valuestack'] = array(); + $GLOBALS['_xh']['params'] = array(); + $GLOBALS['_xh']['pt'] = array(); + $GLOBALS['_xh']['isf'] = 0; + $GLOBALS['_xh']['isf_reason'] = ''; + $GLOBALS['_xh']['method'] = false; + $GLOBALS['_xh']['rt'] = ''; + /// @todo 'guestimate' encoding + $parser = xml_parser_create(); + xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true); + // What if internal encoding is not in one of the 3 allowed? + // we use the broadest one, ie. utf8! + if (!in_array($GLOBALS['xmlrpc_internalencoding'], array('UTF-8', 'ISO-8859-1', 'US-ASCII'))) + { + xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, 'UTF-8'); + } + else + { + xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $GLOBALS['xmlrpc_internalencoding']); + } + xml_set_element_handler($parser, 'xmlrpc_se_any', 'xmlrpc_ee'); + xml_set_character_data_handler($parser, 'xmlrpc_cd'); + xml_set_default_handler($parser, 'xmlrpc_dh'); + if(!xml_parse($parser, $xml_val, 1)) + { + $errstr = sprintf('XML error: %s at line %d, column %d', + xml_error_string(xml_get_error_code($parser)), + xml_get_current_line_number($parser), xml_get_current_column_number($parser)); + error_log($errstr); + xml_parser_free($parser); + return false; + } + xml_parser_free($parser); + if ($GLOBALS['_xh']['isf'] > 1) // test that $GLOBALS['_xh']['value'] is an obj, too??? + { + error_log($GLOBALS['_xh']['isf_reason']); + return false; + } + switch ($GLOBALS['_xh']['rt']) + { + case 'methodresponse': + $v =& $GLOBALS['_xh']['value']; + if ($GLOBALS['_xh']['isf'] == 1) + { + $vc = $v->structmem('faultCode'); + $vs = $v->structmem('faultString'); + $r = new xmlrpcresp(0, $vc->scalarval(), $vs->scalarval()); + } + else + { + $r = new xmlrpcresp($v); + } + return $r; + case 'methodcall': + $m = new xmlrpcmsg($GLOBALS['_xh']['method']); + for($i=0; $i < count($GLOBALS['_xh']['params']); $i++) + { + $m->addParam($GLOBALS['_xh']['params'][$i]); + } + return $m; + case 'value': + return $GLOBALS['_xh']['value']; + default: + return false; + } + } + + /** + * decode a string that is encoded w/ "chunked" transfer encoding + * as defined in rfc2068 par. 19.4.6 + * code shamelessly stolen from nusoap library by Dietrich Ayala + * + * @param string $buffer the string to be decoded + * @return string + */ + function decode_chunked($buffer) + { + // length := 0 + $length = 0; + $new = ''; + + // read chunk-size, chunk-extension (if any) and crlf + // get the position of the linebreak + $chunkend = strpos($buffer,"\r\n") + 2; + $temp = substr($buffer,0,$chunkend); + $chunk_size = hexdec( trim($temp) ); + $chunkstart = $chunkend; + while($chunk_size > 0) + { + $chunkend = strpos($buffer, "\r\n", $chunkstart + $chunk_size); + + // just in case we got a broken connection + if($chunkend == false) + { + $chunk = substr($buffer,$chunkstart); + // append chunk-data to entity-body + $new .= $chunk; + $length += strlen($chunk); + break; + } + + // read chunk-data and crlf + $chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart); + // append chunk-data to entity-body + $new .= $chunk; + // length := length + chunk-size + $length += strlen($chunk); + // read chunk-size and crlf + $chunkstart = $chunkend + 2; + + $chunkend = strpos($buffer,"\r\n",$chunkstart)+2; + if($chunkend == false) + { + break; //just in case we got a broken connection + } + $temp = substr($buffer,$chunkstart,$chunkend-$chunkstart); + $chunk_size = hexdec( trim($temp) ); + $chunkstart = $chunkend; + } + return $new; + } + + /** + * xml charset encoding guessing helper function. + * Tries to determine the charset encoding of an XML chunk received over HTTP. + * NB: according to the spec (RFC 3023), if text/xml content-type is received over HTTP without a content-type, + * we SHOULD assume it is strictly US-ASCII. But we try to be more tolerant of unconforming (legacy?) clients/servers, + * which will be most probably using UTF-8 anyway... + * + * @param string $httpheaders the http Content-type header + * @param string $xmlchunk xml content buffer + * @param string $encoding_prefs comma separated list of character encodings to be used as default (when mb extension is enabled) + * + * @todo explore usage of mb_http_input(): does it detect http headers + post data? if so, use it instead of hand-detection!!! + */ + function guess_encoding($httpheader='', $xmlchunk='', $encoding_prefs=null) + { + // discussion: see http://www.yale.edu/pclt/encoding/ + // 1 - test if encoding is specified in HTTP HEADERS + + //Details: + // LWS: (\13\10)?( |\t)+ + // token: (any char but excluded stuff)+ + // quoted string: " (any char but double quotes and cointrol chars)* " + // header: Content-type = ...; charset=value(; ...)* + // where value is of type token, no LWS allowed between 'charset' and value + // Note: we do not check for invalid chars in VALUE: + // this had better be done using pure ereg as below + // Note 2: we might be removing whitespace/tabs that ought to be left in if + // the received charset is a quoted string. But nobody uses such charset names... + + /// @todo this test will pass if ANY header has charset specification, not only Content-Type. Fix it? + $matches = array(); + if(preg_match('/;\s*charset\s*=([^;]+)/i', $httpheader, $matches)) + { + return strtoupper(trim($matches[1], " \t\"")); + } + + // 2 - scan the first bytes of the data for a UTF-16 (or other) BOM pattern + // (source: http://www.w3.org/TR/2000/REC-xml-20001006) + // NOTE: actually, according to the spec, even if we find the BOM and determine + // an encoding, we should check if there is an encoding specified + // in the xml declaration, and verify if they match. + /// @todo implement check as described above? + /// @todo implement check for first bytes of string even without a BOM? (It sure looks harder than for cases WITH a BOM) + if(preg_match('/^(\x00\x00\xFE\xFF|\xFF\xFE\x00\x00|\x00\x00\xFF\xFE|\xFE\xFF\x00\x00)/', $xmlchunk)) + { + return 'UCS-4'; + } + elseif(preg_match('/^(\xFE\xFF|\xFF\xFE)/', $xmlchunk)) + { + return 'UTF-16'; + } + elseif(preg_match('/^(\xEF\xBB\xBF)/', $xmlchunk)) + { + return 'UTF-8'; + } + + // 3 - test if encoding is specified in the xml declaration + // Details: + // SPACE: (#x20 | #x9 | #xD | #xA)+ === [ \x9\xD\xA]+ + // EQ: SPACE?=SPACE? === [ \x9\xD\xA]*=[ \x9\xD\xA]* + if (preg_match('/^<\?xml\s+version\s*=\s*'. "((?:\"[a-zA-Z0-9_.:-]+\")|(?:'[a-zA-Z0-9_.:-]+'))". + '\s+encoding\s*=\s*' . "((?:\"[A-Za-z][A-Za-z0-9._-]*\")|(?:'[A-Za-z][A-Za-z0-9._-]*'))/", + $xmlchunk, $matches)) + { + return strtoupper(substr($matches[2], 1, -1)); + } + + // 4 - if mbstring is available, let it do the guesswork + // NB: we favour finding an encoding that is compatible with what we can process + if(extension_loaded('mbstring')) + { + if($encoding_prefs) + { + $enc = mb_detect_encoding($xmlchunk, $encoding_prefs); + } + else + { + $enc = mb_detect_encoding($xmlchunk); + } + // NB: mb_detect likes to call it ascii, xml parser likes to call it US_ASCII... + // IANA also likes better US-ASCII, so go with it + if($enc == 'ASCII') + { + $enc = 'US-'.$enc; + } + return $enc; + } + else + { + // no encoding specified: as per HTTP1.1 assume it is iso-8859-1? + // Both RFC 2616 (HTTP 1.1) and 1945 (HTTP 1.0) clearly state that for text/xxx content types + // this should be the standard. And we should be getting text/xml as request and response. + // BUT we have to be backward compatible with the lib, which always used UTF-8 as default... + return $GLOBALS['xmlrpc_defencoding']; + } + } + + /** + * Checks if a given charset encoding is present in a list of encodings or + * if it is a valid subset of any encoding in the list + * @param string $encoding charset to be tested + * @param mixed $validlist comma separated list of valid charsets (or array of charsets) + */ + function is_valid_charset($encoding, $validlist) + { + $charset_supersets = array( + 'US-ASCII' => array ('ISO-8859-1', 'ISO-8859-2', 'ISO-8859-3', 'ISO-8859-4', + 'ISO-8859-5', 'ISO-8859-6', 'ISO-8859-7', 'ISO-8859-8', + 'ISO-8859-9', 'ISO-8859-10', 'ISO-8859-11', 'ISO-8859-12', + 'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'UTF-8', + 'EUC-JP', 'EUC-', 'EUC-KR', 'EUC-CN') + ); + if (is_string($validlist)) + $validlist = explode(',', $validlist); + if (@in_array(strtoupper($encoding), $validlist)) + return true; + else + { + if (array_key_exists($encoding, $charset_supersets)) + foreach ($validlist as $allowed) + if (in_array($allowed, $charset_supersets[$encoding])) + return true; + return false; + } + } + +?> \ No newline at end of file diff --git a/net/nzbgetweb/files/lib/xmlrpc_wrappers.inc b/net/nzbgetweb/files/lib/xmlrpc_wrappers.inc new file mode 100644 index 0000000..1a663f0 --- /dev/null +++ b/net/nzbgetweb/files/lib/xmlrpc_wrappers.inc @@ -0,0 +1,955 @@ +' . $funcname[1]; + } + $exists = method_exists($funcname[0], $funcname[1]); + if (!$exists && version_compare(phpversion(), '5.1') < 0) + { + // workaround for php 5.0: static class methods are not seen by method_exists + $exists = is_callable( $funcname ); + } + } + else + { + $plainfuncname = $funcname; + $exists = function_exists($funcname); + } + + if(!$exists) + { + error_log('XML-RPC: function to be wrapped is not defined: '.$plainfuncname); + return false; + } + else + { + // determine name of new php function + if($newfuncname == '') + { + if(is_array($funcname)) + { + if(is_string($funcname[0])) + $xmlrpcfuncname = "{$prefix}_".implode('_', $funcname); + else + $xmlrpcfuncname = "{$prefix}_".get_class($funcname[0]) . '_' . $funcname[1]; + } + else + { + $xmlrpcfuncname = "{$prefix}_$funcname"; + } + } + else + { + $xmlrpcfuncname = $newfuncname; + } + while($buildit && function_exists($xmlrpcfuncname)) + { + $xmlrpcfuncname .= 'x'; + } + + // start to introspect PHP code + if(is_array($funcname)) + { + $func = new ReflectionMethod($funcname[0], $funcname[1]); + if($func->isPrivate()) + { + error_log('XML-RPC: method to be wrapped is private: '.$plainfuncname); + return false; + } + if($func->isProtected()) + { + error_log('XML-RPC: method to be wrapped is protected: '.$plainfuncname); + return false; + } + if($func->isConstructor()) + { + error_log('XML-RPC: method to be wrapped is the constructor: '.$plainfuncname); + return false; + } + // php 503 always says isdestructor = true... + if( version_compare(phpversion(), '5.0.3') != 0 && $func->isDestructor()) + { + error_log('XML-RPC: method to be wrapped is the destructor: '.$plainfuncname); + return false; + } + if($func->isAbstract()) + { + error_log('XML-RPC: method to be wrapped is abstract: '.$plainfuncname); + return false; + } + /// @todo add more checks for static vs. nonstatic? + } + else + { + $func = new ReflectionFunction($funcname); + } + if($func->isInternal()) + { + // Note: from PHP 5.1.0 onward, we will possibly be able to use invokeargs + // instead of getparameters to fully reflect internal php functions ? + error_log('XML-RPC: function to be wrapped is internal: '.$plainfuncname); + return false; + } + + // retrieve parameter names, types and description from javadoc comments + + // function description + $desc = ''; + // type of return val: by default 'any' + $returns = $GLOBALS['xmlrpcValue']; + // desc of return val + $returnsDocs = ''; + // type + name of function parameters + $paramDocs = array(); + + $docs = $func->getDocComment(); + if($docs != '') + { + $docs = explode("\n", $docs); + $i = 0; + foreach($docs as $doc) + { + $doc = trim($doc, " \r\t/*"); + if(strlen($doc) && strpos($doc, '@') !== 0 && !$i) + { + if($desc) + { + $desc .= "\n"; + } + $desc .= $doc; + } + elseif(strpos($doc, '@param') === 0) + { + // syntax: @param type [$name] desc + if(preg_match('/@param\s+(\S+)(\s+\$\S+)?\s+(.+)/', $doc, $matches)) + { + if(strpos($matches[1], '|')) + { + //$paramDocs[$i]['type'] = explode('|', $matches[1]); + $paramDocs[$i]['type'] = 'mixed'; + } + else + { + $paramDocs[$i]['type'] = $matches[1]; + } + $paramDocs[$i]['name'] = trim($matches[2]); + $paramDocs[$i]['doc'] = $matches[3]; + } + $i++; + } + elseif(strpos($doc, '@return') === 0) + { + // syntax: @return type desc + //$returns = preg_split('/\s+/', $doc); + if(preg_match('/@return\s+(\S+)\s+(.+)/', $doc, $matches)) + { + $returns = php_2_xmlrpc_type($matches[1]); + if(isset($matches[2])) + { + $returnsDocs = $matches[2]; + } + } + } + } + } + + // execute introspection of actual function prototype + $params = array(); + $i = 0; + foreach($func->getParameters() as $paramobj) + { + $params[$i] = array(); + $params[$i]['name'] = '$'.$paramobj->getName(); + $params[$i]['isoptional'] = $paramobj->isOptional(); + $i++; + } + + + // start building of PHP code to be eval'd + $innercode = ''; + $i = 0; + $parsvariations = array(); + $pars = array(); + $pnum = count($params); + foreach($params as $param) + { + if (isset($paramDocs[$i]['name']) && $paramDocs[$i]['name'] && strtolower($paramDocs[$i]['name']) != strtolower($param['name'])) + { + // param name from phpdoc info does not match param definition! + $paramDocs[$i]['type'] = 'mixed'; + } + + if($param['isoptional']) + { + // this particular parameter is optional. save as valid previous list of parameters + $innercode .= "if (\$paramcount > $i) {\n"; + $parsvariations[] = $pars; + } + $innercode .= "\$p$i = \$msg->getParam($i);\n"; + if ($decode_php_objects) + { + $innercode .= "if (\$p{$i}->kindOf() == 'scalar') \$p$i = \$p{$i}->scalarval(); else \$p$i = php_{$prefix}_decode(\$p$i, array('decode_php_objs'));\n"; + } + else + { + $innercode .= "if (\$p{$i}->kindOf() == 'scalar') \$p$i = \$p{$i}->scalarval(); else \$p$i = php_{$prefix}_decode(\$p$i);\n"; + } + + $pars[] = "\$p$i"; + $i++; + if($param['isoptional']) + { + $innercode .= "}\n"; + } + if($i == $pnum) + { + // last allowed parameters combination + $parsvariations[] = $pars; + } + } + + $sigs = array(); + $psigs = array(); + if(count($parsvariations) == 0) + { + // only known good synopsis = no parameters + $parsvariations[] = array(); + $minpars = 0; + } + else + { + $minpars = count($parsvariations[0]); + } + + if($minpars) + { + // add to code the check for min params number + // NB: this check needs to be done BEFORE decoding param values + $innercode = "\$paramcount = \$msg->getNumParams();\n" . + "if (\$paramcount < $minpars) return new {$prefix}resp(0, {$GLOBALS['xmlrpcerr']['incorrect_params']}, '{$GLOBALS['xmlrpcstr']['incorrect_params']}');\n" . $innercode; + } + else + { + $innercode = "\$paramcount = \$msg->getNumParams();\n" . $innercode; + } + + $innercode .= "\$np = false;\n"; + // since there are no closures in php, if we are given an object instance, + // we store a pointer to it in a global var... + if ( is_array($funcname) && is_object($funcname[0]) ) + { + $GLOBALS['xmlrpcWPFObjHolder'][$xmlrpcfuncname] =& $funcname[0]; + $innercode .= "\$obj =& \$GLOBALS['xmlrpcWPFObjHolder']['$xmlrpcfuncname'];\n"; + $realfuncname = '$obj->'.$funcname[1]; + } + else + { + $realfuncname = $plainfuncname; + } + foreach($parsvariations as $pars) + { + $innercode .= "if (\$paramcount == " . count($pars) . ") \$retval = {$catch_warnings}$realfuncname(" . implode(',', $pars) . "); else\n"; + // build a 'generic' signature (only use an appropriate return type) + $sig = array($returns); + $psig = array($returnsDocs); + for($i=0; $i < count($pars); $i++) + { + if (isset($paramDocs[$i]['type'])) + { + $sig[] = php_2_xmlrpc_type($paramDocs[$i]['type']); + } + else + { + $sig[] = $GLOBALS['xmlrpcValue']; + } + $psig[] = isset($paramDocs[$i]['doc']) ? $paramDocs[$i]['doc'] : ''; + } + $sigs[] = $sig; + $psigs[] = $psig; + } + $innercode .= "\$np = true;\n"; + $innercode .= "if (\$np) return new {$prefix}resp(0, {$GLOBALS['xmlrpcerr']['incorrect_params']}, '{$GLOBALS['xmlrpcstr']['incorrect_params']}'); else {\n"; + //$innercode .= "if (\$_xmlrpcs_error_occurred) return new xmlrpcresp(0, $GLOBALS['xmlrpcerr']user, \$_xmlrpcs_error_occurred); else\n"; + $innercode .= "if (is_a(\$retval, '{$prefix}resp')) return \$retval; else\n"; + if($returns == $GLOBALS['xmlrpcDateTime'] || $returns == $GLOBALS['xmlrpcBase64']) + { + $innercode .= "return new {$prefix}resp(new {$prefix}val(\$retval, '$returns'));"; + } + else + { + if ($encode_php_objects) + $innercode .= "return new {$prefix}resp(php_{$prefix}_encode(\$retval, array('encode_php_objs')));\n"; + else + $innercode .= "return new {$prefix}resp(php_{$prefix}_encode(\$retval));\n"; + } + // shall we exclude functions returning by ref? + // if($func->returnsReference()) + // return false; + $code = "function $xmlrpcfuncname(\$msg) {\n" . $innercode . "}\n}"; + //print_r($code); + if ($buildit) + { + $allOK = 0; + eval($code.'$allOK=1;'); + // alternative + //$xmlrpcfuncname = create_function('$m', $innercode); + + if(!$allOK) + { + error_log('XML-RPC: could not create function '.$xmlrpcfuncname.' to wrap php function '.$plainfuncname); + return false; + } + } + + /// @todo examine if $paramDocs matches $parsvariations and build array for + /// usage as method signature, plus put together a nice string for docs + + $ret = array('function' => $xmlrpcfuncname, 'signature' => $sigs, 'docstring' => $desc, 'signature_docs' => $psigs, 'source' => $code); + return $ret; + } + } + + /** + * Given a user-defined PHP class or php object, map its methods onto a list of + * PHP 'wrapper' functions that can be exposed as xmlrpc methods from an xmlrpc_server + * object and called from remote clients (as well as their corresponding signature info). + * + * @param mixed $classname the name of the class whose methods are to be exposed as xmlrpc methods, or an object instance of that class + * @param array $extra_options see the docs for wrap_php_method for more options + * string method_type 'static', 'nonstatic', 'all' and 'auto' (default); the latter will switch between static and non-static depending on wheter $classname is a class name or object instance + * @return array or false on failure + * + * @todo get_class_methods will return both static and non-static methods. + * we have to differentiate the action, depending on wheter we recived a class name or object + */ + function wrap_php_class($classname, $extra_options=array()) + { + $methodfilter = isset($extra_options['method_filter']) ? $extra_options['method_filter'] : ''; + $methodtype = isset($extra_options['method_type']) ? $extra_options['method_type'] : 'auto'; + + if(version_compare(phpversion(), '5.0.3') == -1) + { + // up to php 5.0.3 some useful reflection methods were missing + error_log('XML-RPC: cannot not wrap php functions unless running php version bigger than 5.0.3'); + return false; + } + + $result = array(); + $mlist = get_class_methods($classname); + foreach($mlist as $mname) + { + if ($methodfilter == '' || preg_match($methodfilter, $mname)) + { + // echo $mlist."\n"; + $func = new ReflectionMethod($classname, $mname); + if(!$func->isPrivate() && !$func->isProtected() && !$func->isConstructor() && !$func->isDestructor() && !$func->isAbstract()) + { + if(($func->isStatic && ($methodtype == 'all' || $methodtype == 'static' || ($methodtype == 'auto' && is_string($classname)))) || + (!$func->isStatic && ($methodtype == 'all' || $methodtype == 'nonstatic' || ($methodtype == 'auto' && is_object($classname))))) + { + $methodwrap = wrap_php_function(array($classname, $mname), '', $extra_options); + if ( $methodwrap ) + { + $result[$methodwrap['function']] = $methodwrap['function']; + } + } + } + } + } + return $result; + } + + /** + * Given an xmlrpc client and a method name, register a php wrapper function + * that will call it and return results using native php types for both + * params and results. The generated php function will return an xmlrpcresp + * oject for failed xmlrpc calls + * + * Known limitations: + * - server must support system.methodsignature for the wanted xmlrpc method + * - for methods that expose many signatures, only one can be picked (we + * could in priciple check if signatures differ only by number of params + * and not by type, but it would be more complication than we can spare time) + * - nested xmlrpc params: the caller of the generated php function has to + * encode on its own the params passed to the php function if these are structs + * or arrays whose (sub)members include values of type datetime or base64 + * + * Notes: the connection properties of the given client will be copied + * and reused for the connection used during the call to the generated + * php function. + * Calling the generated php function 'might' be slow: a new xmlrpc client + * is created on every invocation and an xmlrpc-connection opened+closed. + * An extra 'debug' param is appended to param list of xmlrpc method, useful + * for debugging purposes. + * + * @param xmlrpc_client $client an xmlrpc client set up correctly to communicate with target server + * @param string $methodname the xmlrpc method to be mapped to a php function + * @param array $extra_options array of options that specify conversion details. valid ptions include + * integer signum the index of the method signature to use in mapping (if method exposes many sigs) + * integer timeout timeout (in secs) to be used when executing function/calling remote method + * string protocol 'http' (default), 'http11' or 'https' + * string new_function_name the name of php function to create. If unsepcified, lib will pick an appropriate name + * string return_source if true return php code w. function definition instead fo function name + * bool encode_php_objs let php objects be sent to server using the 'improved' xmlrpc notation, so server can deserialize them as php objects + * bool decode_php_objs --- WARNING !!! possible security hazard. only use it with trusted servers --- + * mixed return_on_fault a php value to be returned when the xmlrpc call fails/returns a fault response (by default the xmlrpcresp object is returned in this case). If a string is used, '%faultCode%' and '%faultString%' tokens will be substituted with actual error values + * bool debug set it to 1 or 2 to see debug results of querying server for method synopsis + * @return string the name of the generated php function (or false) - OR AN ARRAY... + */ + function wrap_xmlrpc_method($client, $methodname, $extra_options=0, $timeout=0, $protocol='', $newfuncname='') + { + // mind numbing: let caller use sane calling convention (as per javadoc, 3 params), + // OR the 2.0 calling convention (no options) - we really love backward compat, don't we? + if (!is_array($extra_options)) + { + $signum = $extra_options; + $extra_options = array(); + } + else + { + $signum = isset($extra_options['signum']) ? (int)$extra_options['signum'] : 0; + $timeout = isset($extra_options['timeout']) ? (int)$extra_options['timeout'] : 0; + $protocol = isset($extra_options['protocol']) ? $extra_options['protocol'] : ''; + $newfuncname = isset($extra_options['new_function_name']) ? $extra_options['new_function_name'] : ''; + } + //$encode_php_objects = in_array('encode_php_objects', $extra_options); + //$verbatim_client_copy = in_array('simple_client_copy', $extra_options) ? 1 : + // in_array('build_class_code', $extra_options) ? 2 : 0; + + $encode_php_objects = isset($extra_options['encode_php_objs']) ? (bool)$extra_options['encode_php_objs'] : false; + $decode_php_objects = isset($extra_options['decode_php_objs']) ? (bool)$extra_options['decode_php_objs'] : false; + $simple_client_copy = isset($extra_options['simple_client_copy']) ? (int)($extra_options['simple_client_copy']) : 0; + $buildit = isset($extra_options['return_source']) ? !($extra_options['return_source']) : true; + $prefix = isset($extra_options['prefix']) ? $extra_options['prefix'] : 'xmlrpc'; + if (isset($extra_options['return_on_fault'])) + { + $decode_fault = true; + $fault_response = $extra_options['return_on_fault']; + } + else + { + $decode_fault = false; + $fault_response = ''; + } + $debug = isset($extra_options['debug']) ? ($extra_options['debug']) : 0; + + $msgclass = $prefix.'msg'; + $valclass = $prefix.'val'; + $decodefunc = 'php_'.$prefix.'_decode'; + + $msg = new $msgclass('system.methodSignature'); + $msg->addparam(new $valclass($methodname)); + $client->setDebug($debug); + $response =& $client->send($msg, $timeout, $protocol); + if($response->faultCode()) + { + error_log('XML-RPC: could not retrieve method signature from remote server for method '.$methodname); + return false; + } + else + { + $msig = $response->value(); + if ($client->return_type != 'phpvals') + { + $msig = $decodefunc($msig); + } + if(!is_array($msig) || count($msig) <= $signum) + { + error_log('XML-RPC: could not retrieve method signature nr.'.$signum.' from remote server for method '.$methodname); + return false; + } + else + { + // pick a suitable name for the new function, avoiding collisions + if($newfuncname != '') + { + $xmlrpcfuncname = $newfuncname; + } + else + { + // take care to insure that methodname is translated to valid + // php function name + $xmlrpcfuncname = $prefix.'_'.preg_replace(array('/\./', '/[^a-zA-Z0-9_\x7f-\xff]/'), + array('_', ''), $methodname); + } + while($buildit && function_exists($xmlrpcfuncname)) + { + $xmlrpcfuncname .= 'x'; + } + + $msig = $msig[$signum]; + $mdesc = ''; + // if in 'offline' mode, get method description too. + // in online mode, favour speed of operation + if(!$buildit) + { + $msg = new $msgclass('system.methodHelp'); + $msg->addparam(new $valclass($methodname)); + $response =& $client->send($msg, $timeout, $protocol); + if (!$response->faultCode()) + { + $mdesc = $response->value(); + if ($client->return_type != 'phpvals') + { + $mdesc = $mdesc->scalarval(); + } + } + } + + $results = build_remote_method_wrapper_code($client, $methodname, + $xmlrpcfuncname, $msig, $mdesc, $timeout, $protocol, $simple_client_copy, + $prefix, $decode_php_objects, $encode_php_objects, $decode_fault, + $fault_response); + + //print_r($code); + if ($buildit) + { + $allOK = 0; + eval($results['source'].'$allOK=1;'); + // alternative + //$xmlrpcfuncname = create_function('$m', $innercode); + if($allOK) + { + return $xmlrpcfuncname; + } + else + { + error_log('XML-RPC: could not create function '.$xmlrpcfuncname.' to wrap remote method '.$methodname); + return false; + } + } + else + { + $results['function'] = $xmlrpcfuncname; + return $results; + } + } + } + } + + /** + * Similar to wrap_xmlrpc_method, but will generate a php class that wraps + * all xmlrpc methods exposed by the remote server as own methods. + * For more details see wrap_xmlrpc_method. + * @param xmlrpc_client $client the client obj all set to query the desired server + * @param array $extra_options list of options for wrapped code + * @return mixed false on error, the name of the created class if all ok or an array with code, class name and comments (if the appropriatevoption is set in extra_options) + */ + function wrap_xmlrpc_server($client, $extra_options=array()) + { + $methodfilter = isset($extra_options['method_filter']) ? $extra_options['method_filter'] : ''; + //$signum = isset($extra_options['signum']) ? (int)$extra_options['signum'] : 0; + $timeout = isset($extra_options['timeout']) ? (int)$extra_options['timeout'] : 0; + $protocol = isset($extra_options['protocol']) ? $extra_options['protocol'] : ''; + $newclassname = isset($extra_options['new_class_name']) ? $extra_options['new_class_name'] : ''; + $encode_php_objects = isset($extra_options['encode_php_objs']) ? (bool)$extra_options['encode_php_objs'] : false; + $decode_php_objects = isset($extra_options['decode_php_objs']) ? (bool)$extra_options['decode_php_objs'] : false; + $verbatim_client_copy = isset($extra_options['simple_client_copy']) ? !($extra_options['simple_client_copy']) : true; + $buildit = isset($extra_options['return_source']) ? !($extra_options['return_source']) : true; + $prefix = isset($extra_options['prefix']) ? $extra_options['prefix'] : 'xmlrpc'; + + $msgclass = $prefix.'msg'; + //$valclass = $prefix.'val'; + $decodefunc = 'php_'.$prefix.'_decode'; + + $msg = new $msgclass('system.listMethods'); + $response =& $client->send($msg, $timeout, $protocol); + if($response->faultCode()) + { + error_log('XML-RPC: could not retrieve method list from remote server'); + return false; + } + else + { + $mlist = $response->value(); + if ($client->return_type != 'phpvals') + { + $mlist = $decodefunc($mlist); + } + if(!is_array($mlist) || !count($mlist)) + { + error_log('XML-RPC: could not retrieve meaningful method list from remote server'); + return false; + } + else + { + // pick a suitable name for the new function, avoiding collisions + if($newclassname != '') + { + $xmlrpcclassname = $newclassname; + } + else + { + $xmlrpcclassname = $prefix.'_'.preg_replace(array('/\./', '/[^a-zA-Z0-9_\x7f-\xff]/'), + array('_', ''), $client->server).'_client'; + } + while($buildit && class_exists($xmlrpcclassname)) + { + $xmlrpcclassname .= 'x'; + } + + /// @todo add function setdebug() to new class, to enable/disable debugging + $source = "class $xmlrpcclassname\n{\nvar \$client;\n\n"; + $source .= "function $xmlrpcclassname()\n{\n"; + $source .= build_client_wrapper_code($client, $verbatim_client_copy, $prefix); + $source .= "\$this->client =& \$client;\n}\n\n"; + $opts = array('simple_client_copy' => 2, 'return_source' => true, + 'timeout' => $timeout, 'protocol' => $protocol, + 'encode_php_objs' => $encode_php_objects, 'prefix' => $prefix, + 'decode_php_objs' => $decode_php_objects + ); + /// @todo build javadoc for class definition, too + foreach($mlist as $mname) + { + if ($methodfilter == '' || preg_match($methodfilter, $mname)) + { + $opts['new_function_name'] = preg_replace(array('/\./', '/[^a-zA-Z0-9_\x7f-\xff]/'), + array('_', ''), $mname); + $methodwrap = wrap_xmlrpc_method($client, $mname, $opts); + if ($methodwrap) + { + if (!$buildit) + { + $source .= $methodwrap['docstring']; + } + $source .= $methodwrap['source']."\n"; + } + else + { + error_log('XML-RPC: will not create class method to wrap remote method '.$mname); + } + } + } + $source .= "}\n"; + if ($buildit) + { + $allOK = 0; + eval($source.'$allOK=1;'); + // alternative + //$xmlrpcfuncname = create_function('$m', $innercode); + if($allOK) + { + return $xmlrpcclassname; + } + else + { + error_log('XML-RPC: could not create class '.$xmlrpcclassname.' to wrap remote server '.$client->server); + return false; + } + } + else + { + return array('class' => $xmlrpcclassname, 'code' => $source, 'docstring' => ''); + } + } + } + } + + /** + * Given the necessary info, build php code that creates a new function to + * invoke a remote xmlrpc method. + * Take care that no full checking of input parameters is done to ensure that + * valid php code is emitted. + * Note: real spaghetti code follows... + * @access private + */ + function build_remote_method_wrapper_code($client, $methodname, $xmlrpcfuncname, + $msig, $mdesc='', $timeout=0, $protocol='', $client_copy_mode=0, $prefix='xmlrpc', + $decode_php_objects=false, $encode_php_objects=false, $decode_fault=false, + $fault_response='') + { + $code = "function $xmlrpcfuncname ("; + if ($client_copy_mode < 2) + { + // client copy mode 0 or 1 == partial / full client copy in emitted code + $innercode = build_client_wrapper_code($client, $client_copy_mode, $prefix); + $innercode .= "\$client->setDebug(\$debug);\n"; + $this_ = ''; + } + else + { + // client copy mode 2 == no client copy in emitted code + $innercode = ''; + $this_ = 'this->'; + } + $innercode .= "\$msg = new {$prefix}msg('$methodname');\n"; + + if ($mdesc != '') + { + // take care that PHP comment is not terminated unwillingly by method description + $mdesc = "/**\n* ".str_replace('*/', '* /', $mdesc)."\n"; + } + else + { + $mdesc = "/**\nFunction $xmlrpcfuncname\n"; + } + + // param parsing + $plist = array(); + $pcount = count($msig); + for($i = 1; $i < $pcount; $i++) + { + $plist[] = "\$p$i"; + $ptype = $msig[$i]; + if($ptype == 'i4' || $ptype == 'int' || $ptype == 'boolean' || $ptype == 'double' || + $ptype == 'string' || $ptype == 'dateTime.iso8601' || $ptype == 'base64' || $ptype == 'null') + { + // only build directly xmlrpcvals when type is known and scalar + $innercode .= "\$p$i = new {$prefix}val(\$p$i, '$ptype');\n"; + } + else + { + if ($encode_php_objects) + { + $innercode .= "\$p$i =& php_{$prefix}_encode(\$p$i, array('encode_php_objs'));\n"; + } + else + { + $innercode .= "\$p$i =& php_{$prefix}_encode(\$p$i);\n"; + } + } + $innercode .= "\$msg->addparam(\$p$i);\n"; + $mdesc .= '* @param '.xmlrpc_2_php_type($ptype)." \$p$i\n"; + } + if ($client_copy_mode < 2) + { + $plist[] = '$debug=0'; + $mdesc .= "* @param int \$debug when 1 (or 2) will enable debugging of the underlying {$prefix} call (defaults to 0)\n"; + } + $plist = implode(', ', $plist); + $mdesc .= '* @return '.xmlrpc_2_php_type($msig[0])." (or an {$prefix}resp obj instance if call fails)\n*/\n"; + + $innercode .= "\$res =& \${$this_}client->send(\$msg, $timeout, '$protocol');\n"; + if ($decode_fault) + { + if (is_string($fault_response) && ((strpos($fault_response, '%faultCode%') !== false) || (strpos($fault_response, '%faultString%') !== false))) + { + $respcode = "str_replace(array('%faultCode%', '%faultString%'), array(\$res->faultCode(), \$res->faultString()), '".str_replace("'", "''", $fault_response)."')"; + } + else + { + $respcode = var_export($fault_response, true); + } + } + else + { + $respcode = '$res'; + } + if ($decode_php_objects) + { + $innercode .= "if (\$res->faultcode()) return $respcode; else return php_{$prefix}_decode(\$res->value(), array('decode_php_objs'));"; + } + else + { + $innercode .= "if (\$res->faultcode()) return $respcode; else return php_{$prefix}_decode(\$res->value());"; + } + + $code = $code . $plist. ") {\n" . $innercode . "\n}\n"; + + return array('source' => $code, 'docstring' => $mdesc); + } + + /** + * Given necessary info, generate php code that will rebuild a client object + * Take care that no full checking of input parameters is done to ensure that + * valid php code is emitted. + * @access private + */ + function build_client_wrapper_code($client, $verbatim_client_copy, $prefix='xmlrpc') + { + $code = "\$client = new {$prefix}_client('".str_replace("'", "\'", $client->path). + "', '" . str_replace("'", "\'", $client->server) . "', $client->port);\n"; + + // copy all client fields to the client that will be generated runtime + // (this provides for future expansion or subclassing of client obj) + if ($verbatim_client_copy) + { + foreach($client as $fld => $val) + { + if($fld != 'debug' && $fld != 'return_type') + { + $val = var_export($val, true); + $code .= "\$client->$fld = $val;\n"; + } + } + } + // only make sure that client always returns the correct data type + $code .= "\$client->return_type = '{$prefix}vals';\n"; + //$code .= "\$client->setDebug(\$debug);\n"; + return $code; + } +?> \ No newline at end of file diff --git a/net/nzbgetweb/files/lib/xmlrpcs.inc b/net/nzbgetweb/files/lib/xmlrpcs.inc new file mode 100644 index 0000000..441dc3d --- /dev/null +++ b/net/nzbgetweb/files/lib/xmlrpcs.inc @@ -0,0 +1,1246 @@ + +// $Id: xmlrpcs.inc,v 1.71 2008/10/29 23:41:28 ggiunta Exp $ + +// Copyright (c) 1999,2000,2002 Edd Dumbill. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * 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. +// +// * Neither the name of the "XML-RPC for PHP" 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 COPYRIGHT HOLDERS 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. + + // XML RPC Server class + // requires: xmlrpc.inc + + $GLOBALS['xmlrpcs_capabilities'] = array( + // xmlrpc spec: always supported + 'xmlrpc' => new xmlrpcval(array( + 'specUrl' => new xmlrpcval('http://www.xmlrpc.com/spec', 'string'), + 'specVersion' => new xmlrpcval(1, 'int') + ), 'struct'), + // if we support system.xxx functions, we always support multicall, too... + // Note that, as of 2006/09/17, the following URL does not respond anymore + 'system.multicall' => new xmlrpcval(array( + 'specUrl' => new xmlrpcval('http://www.xmlrpc.com/discuss/msgReader$1208', 'string'), + 'specVersion' => new xmlrpcval(1, 'int') + ), 'struct'), + // introspection: version 2! we support 'mixed', too + 'introspection' => new xmlrpcval(array( + 'specUrl' => new xmlrpcval('http://phpxmlrpc.sourceforge.net/doc-2/ch10.html', 'string'), + 'specVersion' => new xmlrpcval(2, 'int') + ), 'struct') + ); + + /* Functions that implement system.XXX methods of xmlrpc servers */ + $_xmlrpcs_getCapabilities_sig=array(array($GLOBALS['xmlrpcStruct'])); + $_xmlrpcs_getCapabilities_doc='This method lists all the capabilites that the XML-RPC server has: the (more or less standard) extensions to the xmlrpc spec that it adheres to'; + $_xmlrpcs_getCapabilities_sdoc=array(array('list of capabilities, described as structs with a version number and url for the spec')); + function _xmlrpcs_getCapabilities($server, $m=null) + { + $outAr = $GLOBALS['xmlrpcs_capabilities']; + // NIL extension + if ($GLOBALS['xmlrpc_null_extension']) { + $outAr['nil'] = new xmlrpcval(array( + 'specUrl' => new xmlrpcval('http://www.ontosys.com/xml-rpc/extensions.php', 'string'), + 'specVersion' => new xmlrpcval(1, 'int') + ), 'struct'); + } + return new xmlrpcresp(new xmlrpcval($outAr, 'struct')); + } + + // listMethods: signature was either a string, or nothing. + // The useless string variant has been removed + $_xmlrpcs_listMethods_sig=array(array($GLOBALS['xmlrpcArray'])); + $_xmlrpcs_listMethods_doc='This method lists all the methods that the XML-RPC server knows how to dispatch'; + $_xmlrpcs_listMethods_sdoc=array(array('list of method names')); + function _xmlrpcs_listMethods($server, $m=null) // if called in plain php values mode, second param is missing + { + + $outAr=array(); + foreach($server->dmap as $key => $val) + { + $outAr[]=new xmlrpcval($key, 'string'); + } + if($server->allow_system_funcs) + { + foreach($GLOBALS['_xmlrpcs_dmap'] as $key => $val) + { + $outAr[]=new xmlrpcval($key, 'string'); + } + } + return new xmlrpcresp(new xmlrpcval($outAr, 'array')); + } + + $_xmlrpcs_methodSignature_sig=array(array($GLOBALS['xmlrpcArray'], $GLOBALS['xmlrpcString'])); + $_xmlrpcs_methodSignature_doc='Returns an array of known signatures (an array of arrays) for the method name passed. If no signatures are known, returns a none-array (test for type != array to detect missing signature)'; + $_xmlrpcs_methodSignature_sdoc=array(array('list of known signatures, each sig being an array of xmlrpc type names', 'name of method to be described')); + function _xmlrpcs_methodSignature($server, $m) + { + // let accept as parameter both an xmlrpcval or string + if (is_object($m)) + { + $methName=$m->getParam(0); + $methName=$methName->scalarval(); + } + else + { + $methName=$m; + } + if(strpos($methName, "system.") === 0) + { + $dmap=$GLOBALS['_xmlrpcs_dmap']; $sysCall=1; + } + else + { + $dmap=$server->dmap; $sysCall=0; + } + if(isset($dmap[$methName])) + { + if(isset($dmap[$methName]['signature'])) + { + $sigs=array(); + foreach($dmap[$methName]['signature'] as $inSig) + { + $cursig=array(); + foreach($inSig as $sig) + { + $cursig[]=new xmlrpcval($sig, 'string'); + } + $sigs[]=new xmlrpcval($cursig, 'array'); + } + $r=new xmlrpcresp(new xmlrpcval($sigs, 'array')); + } + else + { + // NB: according to the official docs, we should be returning a + // "none-array" here, which means not-an-array + $r=new xmlrpcresp(new xmlrpcval('undef', 'string')); + } + } + else + { + $r=new xmlrpcresp(0,$GLOBALS['xmlrpcerr']['introspect_unknown'], $GLOBALS['xmlrpcstr']['introspect_unknown']); + } + return $r; + } + + $_xmlrpcs_methodHelp_sig=array(array($GLOBALS['xmlrpcString'], $GLOBALS['xmlrpcString'])); + $_xmlrpcs_methodHelp_doc='Returns help text if defined for the method passed, otherwise returns an empty string'; + $_xmlrpcs_methodHelp_sdoc=array(array('method description', 'name of the method to be described')); + function _xmlrpcs_methodHelp($server, $m) + { + // let accept as parameter both an xmlrpcval or string + if (is_object($m)) + { + $methName=$m->getParam(0); + $methName=$methName->scalarval(); + } + else + { + $methName=$m; + } + if(strpos($methName, "system.") === 0) + { + $dmap=$GLOBALS['_xmlrpcs_dmap']; $sysCall=1; + } + else + { + $dmap=$server->dmap; $sysCall=0; + } + if(isset($dmap[$methName])) + { + if(isset($dmap[$methName]['docstring'])) + { + $r=new xmlrpcresp(new xmlrpcval($dmap[$methName]['docstring']), 'string'); + } + else + { + $r=new xmlrpcresp(new xmlrpcval('', 'string')); + } + } + else + { + $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['introspect_unknown'], $GLOBALS['xmlrpcstr']['introspect_unknown']); + } + return $r; + } + + $_xmlrpcs_multicall_sig = array(array($GLOBALS['xmlrpcArray'], $GLOBALS['xmlrpcArray'])); + $_xmlrpcs_multicall_doc = 'Boxcar multiple RPC calls in one request. See http://www.xmlrpc.com/discuss/msgReader$1208 for details'; + $_xmlrpcs_multicall_sdoc = array(array('list of response structs, where each struct has the usual members', 'list of calls, with each call being represented as a struct, with members "methodname" and "params"')); + function _xmlrpcs_multicall_error($err) + { + if(is_string($err)) + { + $str = $GLOBALS['xmlrpcstr']["multicall_${err}"]; + $code = $GLOBALS['xmlrpcerr']["multicall_${err}"]; + } + else + { + $code = $err->faultCode(); + $str = $err->faultString(); + } + $struct = array(); + $struct['faultCode'] = new xmlrpcval($code, 'int'); + $struct['faultString'] = new xmlrpcval($str, 'string'); + return new xmlrpcval($struct, 'struct'); + } + + function _xmlrpcs_multicall_do_call($server, $call) + { + if($call->kindOf() != 'struct') + { + return _xmlrpcs_multicall_error('notstruct'); + } + $methName = @$call->structmem('methodName'); + if(!$methName) + { + return _xmlrpcs_multicall_error('nomethod'); + } + if($methName->kindOf() != 'scalar' || $methName->scalartyp() != 'string') + { + return _xmlrpcs_multicall_error('notstring'); + } + if($methName->scalarval() == 'system.multicall') + { + return _xmlrpcs_multicall_error('recursion'); + } + + $params = @$call->structmem('params'); + if(!$params) + { + return _xmlrpcs_multicall_error('noparams'); + } + if($params->kindOf() != 'array') + { + return _xmlrpcs_multicall_error('notarray'); + } + $numParams = $params->arraysize(); + + $msg = new xmlrpcmsg($methName->scalarval()); + for($i = 0; $i < $numParams; $i++) + { + if(!$msg->addParam($params->arraymem($i))) + { + $i++; + return _xmlrpcs_multicall_error(new xmlrpcresp(0, + $GLOBALS['xmlrpcerr']['incorrect_params'], + $GLOBALS['xmlrpcstr']['incorrect_params'] . ": probable xml error in param " . $i)); + } + } + + $result = $server->execute($msg); + + if($result->faultCode() != 0) + { + return _xmlrpcs_multicall_error($result); // Method returned fault. + } + + return new xmlrpcval(array($result->value()), 'array'); + } + + function _xmlrpcs_multicall_do_call_phpvals($server, $call) + { + if(!is_array($call)) + { + return _xmlrpcs_multicall_error('notstruct'); + } + if(!array_key_exists('methodName', $call)) + { + return _xmlrpcs_multicall_error('nomethod'); + } + if (!is_string($call['methodName'])) + { + return _xmlrpcs_multicall_error('notstring'); + } + if($call['methodName'] == 'system.multicall') + { + return _xmlrpcs_multicall_error('recursion'); + } + if(!array_key_exists('params', $call)) + { + return _xmlrpcs_multicall_error('noparams'); + } + if(!is_array($call['params'])) + { + return _xmlrpcs_multicall_error('notarray'); + } + + // this is a real dirty and simplistic hack, since we might have received a + // base64 or datetime values, but they will be listed as strings here... + $numParams = count($call['params']); + $pt = array(); + foreach($call['params'] as $val) + $pt[] = php_2_xmlrpc_type(gettype($val)); + + $result = $server->execute($call['methodName'], $call['params'], $pt); + + if($result->faultCode() != 0) + { + return _xmlrpcs_multicall_error($result); // Method returned fault. + } + + return new xmlrpcval(array($result->value()), 'array'); + } + + function _xmlrpcs_multicall($server, $m) + { + $result = array(); + // let accept a plain list of php parameters, beside a single xmlrpc msg object + if (is_object($m)) + { + $calls = $m->getParam(0); + $numCalls = $calls->arraysize(); + for($i = 0; $i < $numCalls; $i++) + { + $call = $calls->arraymem($i); + $result[$i] = _xmlrpcs_multicall_do_call($server, $call); + } + } + else + { + $numCalls=count($m); + for($i = 0; $i < $numCalls; $i++) + { + $result[$i] = _xmlrpcs_multicall_do_call_phpvals($server, $m[$i]); + } + } + + return new xmlrpcresp(new xmlrpcval($result, 'array')); + } + + $GLOBALS['_xmlrpcs_dmap']=array( + 'system.listMethods' => array( + 'function' => '_xmlrpcs_listMethods', + 'signature' => $_xmlrpcs_listMethods_sig, + 'docstring' => $_xmlrpcs_listMethods_doc, + 'signature_docs' => $_xmlrpcs_listMethods_sdoc), + 'system.methodHelp' => array( + 'function' => '_xmlrpcs_methodHelp', + 'signature' => $_xmlrpcs_methodHelp_sig, + 'docstring' => $_xmlrpcs_methodHelp_doc, + 'signature_docs' => $_xmlrpcs_methodHelp_sdoc), + 'system.methodSignature' => array( + 'function' => '_xmlrpcs_methodSignature', + 'signature' => $_xmlrpcs_methodSignature_sig, + 'docstring' => $_xmlrpcs_methodSignature_doc, + 'signature_docs' => $_xmlrpcs_methodSignature_sdoc), + 'system.multicall' => array( + 'function' => '_xmlrpcs_multicall', + 'signature' => $_xmlrpcs_multicall_sig, + 'docstring' => $_xmlrpcs_multicall_doc, + 'signature_docs' => $_xmlrpcs_multicall_sdoc), + 'system.getCapabilities' => array( + 'function' => '_xmlrpcs_getCapabilities', + 'signature' => $_xmlrpcs_getCapabilities_sig, + 'docstring' => $_xmlrpcs_getCapabilities_doc, + 'signature_docs' => $_xmlrpcs_getCapabilities_sdoc) + ); + + $GLOBALS['_xmlrpcs_occurred_errors'] = ''; + $GLOBALS['_xmlrpcs_prev_ehandler'] = ''; + + /** + * Error handler used to track errors that occur during server-side execution of PHP code. + * This allows to report back to the client whether an internal error has occurred or not + * using an xmlrpc response object, instead of letting the client deal with the html junk + * that a PHP execution error on the server generally entails. + * + * NB: in fact a user defined error handler can only handle WARNING, NOTICE and USER_* errors. + * + */ + function _xmlrpcs_errorHandler($errcode, $errstring, $filename=null, $lineno=null, $context=null) + { + // obey the @ protocol + if (error_reporting() == 0) + return; + + //if($errcode != E_NOTICE && $errcode != E_WARNING && $errcode != E_USER_NOTICE && $errcode != E_USER_WARNING) + if($errcode != E_STRICT) + { + $GLOBALS['_xmlrpcs_occurred_errors'] = $GLOBALS['_xmlrpcs_occurred_errors'] . $errstring . "\n"; + } + // Try to avoid as much as possible disruption to the previous error handling + // mechanism in place + if($GLOBALS['_xmlrpcs_prev_ehandler'] == '') + { + // The previous error handler was the default: all we should do is log error + // to the default error log (if level high enough) + if(ini_get('log_errors') && (intval(ini_get('error_reporting')) & $errcode)) + { + error_log($errstring); + } + } + else + { + // Pass control on to previous error handler, trying to avoid loops... + if($GLOBALS['_xmlrpcs_prev_ehandler'] != '_xmlrpcs_errorHandler') + { + // NB: this code will NOT work on php < 4.0.2: only 2 params were used for error handlers + if(is_array($GLOBALS['_xmlrpcs_prev_ehandler'])) + { + // the following works both with static class methods and plain object methods as error handler + call_user_func_array($GLOBALS['_xmlrpcs_prev_ehandler'], array($errcode, $errstring, $filename, $lineno, $context)); + } + else + { + $GLOBALS['_xmlrpcs_prev_ehandler']($errcode, $errstring, $filename, $lineno, $context); + } + } + } + } + + $GLOBALS['_xmlrpc_debuginfo']=''; + + /** + * Add a string to the debug info that can be later seralized by the server + * as part of the response message. + * Note that for best compatbility, the debug string should be encoded using + * the $GLOBALS['xmlrpc_internalencoding'] character set. + * @param string $m + * @access public + */ + function xmlrpc_debugmsg($m) + { + $GLOBALS['_xmlrpc_debuginfo'] .= $m . "\n"; + } + + class xmlrpc_server + { + /** + * Array defining php functions exposed as xmlrpc methods by this server + * @access private + */ + var $dmap=array(); + /** + * Defines how functions in dmap will be invoked: either using an xmlrpc msg object + * or plain php values. + * valid strings are 'xmlrpcvals', 'phpvals' or 'epivals' + */ + var $functions_parameters_type='xmlrpcvals'; + /** + * Option used for fine-tuning the encoding the php values returned from + * functions registered in the dispatch map when the functions_parameters_types + * member is set to 'phpvals' + * @see php_xmlrpc_encode for a list of values + */ + var $phpvals_encoding_options = array( 'auto_dates' ); + /// controls wether the server is going to echo debugging messages back to the client as comments in response body. valid values: 0,1,2,3 + var $debug = 1; + /** + * Controls behaviour of server when invoked user function throws an exception: + * 0 = catch it and return an 'internal error' xmlrpc response (default) + * 1 = catch it and return an xmlrpc response with the error corresponding to the exception + * 2 = allow the exception to float to the upper layers + */ + var $exception_handling = 0; + /** + * When set to true, it will enable HTTP compression of the response, in case + * the client has declared its support for compression in the request. + */ + var $compress_response = false; + /** + * List of http compression methods accepted by the server for requests. + * NB: PHP supports deflate, gzip compressions out of the box if compiled w. zlib + */ + var $accepted_compression = array(); + /// shall we serve calls to system.* methods? + var $allow_system_funcs = true; + /// list of charset encodings natively accepted for requests + var $accepted_charset_encodings = array(); + /** + * charset encoding to be used for response. + * NB: if we can, we will convert the generated response from internal_encoding to the intended one. + * can be: a supported xml encoding (only UTF-8 and ISO-8859-1 at present, unless mbstring is enabled), + * null (leave unspecified in response, convert output stream to US_ASCII), + * 'default' (use xmlrpc library default as specified in xmlrpc.inc, convert output stream if needed), + * or 'auto' (use client-specified charset encoding or same as request if request headers do not specify it (unless request is US-ASCII: then use library default anyway). + * NB: pretty dangerous if you accept every charset and do not have mbstring enabled) + */ + var $response_charset_encoding = ''; + /** + * Storage for internal debug info + * @access private + */ + var $debug_info = ''; + /** + * Extra data passed at runtime to method handling functions. Used only by EPI layer + */ + var $user_data = null; + + /** + * @param array $dispmap the dispatch map withd efinition of exposed services + * @param boolean $servicenow set to false to prevent the server from runnung upon construction + */ + function xmlrpc_server($dispMap=null, $serviceNow=true) + { + // if ZLIB is enabled, let the server by default accept compressed requests, + // and compress responses sent to clients that support them + if(function_exists('gzinflate')) + { + $this->accepted_compression = array('gzip', 'deflate'); + $this->compress_response = true; + } + + // by default the xml parser can support these 3 charset encodings + $this->accepted_charset_encodings = array('UTF-8', 'ISO-8859-1', 'US-ASCII'); + + // dispMap is a dispatch array of methods + // mapped to function names and signatures + // if a method + // doesn't appear in the map then an unknown + // method error is generated + /* milosch - changed to make passing dispMap optional. + * instead, you can use the class add_to_map() function + * to add functions manually (borrowed from SOAPX4) + */ + if($dispMap) + { + $this->dmap = $dispMap; + if($serviceNow) + { + $this->service(); + } + } + } + + /** + * Set debug level of server. + * @param integer $in debug lvl: determines info added to xmlrpc responses (as xml comments) + * 0 = no debug info, + * 1 = msgs set from user with debugmsg(), + * 2 = add complete xmlrpc request (headers and body), + * 3 = add also all processing warnings happened during method processing + * (NB: this involves setting a custom error handler, and might interfere + * with the standard processing of the php function exposed as method. In + * particular, triggering an USER_ERROR level error will not halt script + * execution anymore, but just end up logged in the xmlrpc response) + * Note that info added at elevel 2 and 3 will be base64 encoded + * @access public + */ + function setDebug($in) + { + $this->debug=$in; + } + + /** + * Return a string with the serialized representation of all debug info + * @param string $charset_encoding the target charset encoding for the serialization + * @return string an XML comment (or two) + */ + function serializeDebug($charset_encoding='') + { + // Tough encoding problem: which internal charset should we assume for debug info? + // It might contain a copy of raw data received from client, ie with unknown encoding, + // intermixed with php generated data and user generated data... + // so we split it: system debug is base 64 encoded, + // user debug info should be encoded by the end user using the INTERNAL_ENCODING + $out = ''; + if ($this->debug_info != '') + { + $out .= "\n"; + } + if($GLOBALS['_xmlrpc_debuginfo']!='') + { + + $out .= "\n"; + // NB: a better solution MIGHT be to use CDATA, but we need to insert it + // into return payload AFTER the beginning tag + //$out .= "', ']_]_>', $GLOBALS['_xmlrpc_debuginfo']) . "\n]]>\n"; + } + return $out; + } + + /** + * Execute the xmlrpc request, printing the response + * @param string $data the request body. If null, the http POST request will be examined + * @return xmlrpcresp the response object (usually not used by caller...) + * @access public + */ + function service($data=null, $return_payload=false) + { + if ($data === null) + { + // workaround for a known bug in php ver. 5.2.2 that broke $HTTP_RAW_POST_DATA + $ver = phpversion(); + if ($ver[0] >= 5) + { + $data = file_get_contents('php://input'); + } + else + { + $data = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : ''; + } + } + $raw_data = $data; + + // reset internal debug info + $this->debug_info = ''; + + // Echo back what we received, before parsing it + if($this->debug > 1) + { + $this->debugmsg("+++GOT+++\n" . $data . "\n+++END+++"); + } + + $r = $this->parseRequestHeaders($data, $req_charset, $resp_charset, $resp_encoding); + if (!$r) + { + $r=$this->parseRequest($data, $req_charset); + } + + // save full body of request into response, for more debugging usages + $r->raw_data = $raw_data; + + if($this->debug > 2 && $GLOBALS['_xmlrpcs_occurred_errors']) + { + $this->debugmsg("+++PROCESSING ERRORS AND WARNINGS+++\n" . + $GLOBALS['_xmlrpcs_occurred_errors'] . "+++END+++"); + } + + $payload=$this->xml_header($resp_charset); + if($this->debug > 0) + { + $payload = $payload . $this->serializeDebug($resp_charset); + } + + // G. Giunta 2006-01-27: do not create response serialization if it has + // already happened. Helps building json magic + if (empty($r->payload)) + { + $r->serialize($resp_charset); + } + $payload = $payload . $r->payload; + + if ($return_payload) + { + return $payload; + } + + // if we get a warning/error that has output some text before here, then we cannot + // add a new header. We cannot say we are sending xml, either... + if(!headers_sent()) + { + header('Content-Type: '.$r->content_type); + // we do not know if client actually told us an accepted charset, but if he did + // we have to tell him what we did + header("Vary: Accept-Charset"); + + // http compression of output: only + // if we can do it, and we want to do it, and client asked us to, + // and php ini settings do not force it already + $php_no_self_compress = !ini_get('zlib.output_compression') && (ini_get('output_handler') != 'ob_gzhandler'); + if($this->compress_response && function_exists('gzencode') && $resp_encoding != '' + && $php_no_self_compress) + { + if(strpos($resp_encoding, 'gzip') !== false) + { + $payload = gzencode($payload); + header("Content-Encoding: gzip"); + header("Vary: Accept-Encoding"); + } + elseif (strpos($resp_encoding, 'deflate') !== false) + { + $payload = gzcompress($payload); + header("Content-Encoding: deflate"); + header("Vary: Accept-Encoding"); + } + } + + // do not ouput content-length header if php is compressing output for us: + // it will mess up measurements + if($php_no_self_compress) + { + header('Content-Length: ' . (int)strlen($payload)); + } + } + else + { + error_log('XML-RPC: '.__METHOD__.': http headers already sent before response is fully generated. Check for php warning or error messages'); + } + + print $payload; + + // return request, in case subclasses want it + return $r; + } + + /** + * Add a method to the dispatch map + * @param string $methodname the name with which the method will be made available + * @param string $function the php function that will get invoked + * @param array $sig the array of valid method signatures + * @param string $doc method documentation + * @param array $sigdoc the array of valid method signatures docs (one string per param, one for return type) + * @access public + */ + function add_to_map($methodname,$function,$sig=null,$doc=false,$sigdoc=false) + { + $this->dmap[$methodname] = array( + 'function' => $function, + 'docstring' => $doc + ); + if ($sig) + { + $this->dmap[$methodname]['signature'] = $sig; + } + if ($sigdoc) + { + $this->dmap[$methodname]['signature_docs'] = $sigdoc; + } + } + + /** + * Verify type and number of parameters received against a list of known signatures + * @param array $in array of either xmlrpcval objects or xmlrpc type definitions + * @param array $sig array of known signatures to match against + * @access private + */ + function verifySignature($in, $sig) + { + // check each possible signature in turn + if (is_object($in)) + { + $numParams = $in->getNumParams(); + } + else + { + $numParams = count($in); + } + foreach($sig as $cursig) + { + if(count($cursig)==$numParams+1) + { + $itsOK=1; + for($n=0; $n<$numParams; $n++) + { + if (is_object($in)) + { + $p=$in->getParam($n); + if($p->kindOf() == 'scalar') + { + $pt=$p->scalartyp(); + } + else + { + $pt=$p->kindOf(); + } + } + else + { + $pt= $in[$n] == 'i4' ? 'int' : strtolower($in[$n]); // dispatch maps never use i4... + } + + // param index is $n+1, as first member of sig is return type + if($pt != $cursig[$n+1] && $cursig[$n+1] != $GLOBALS['xmlrpcValue']) + { + $itsOK=0; + $pno=$n+1; + $wanted=$cursig[$n+1]; + $got=$pt; + break; + } + } + if($itsOK) + { + return array(1,''); + } + } + } + if(isset($wanted)) + { + return array(0, "Wanted ${wanted}, got ${got} at param ${pno}"); + } + else + { + return array(0, "No method signature matches number of parameters"); + } + } + + /** + * Parse http headers received along with xmlrpc request. If needed, inflate request + * @return null on success or an xmlrpcresp + * @access private + */ + function parseRequestHeaders(&$data, &$req_encoding, &$resp_encoding, &$resp_compression) + { + // check if $_SERVER is populated: it might have been disabled via ini file + // (this is true even when in CLI mode) + if (count($_SERVER) == 0) + { + error_log('XML-RPC: '.__METHOD__.': cannot parse request headers as $_SERVER is not populated'); + } + + if($this->debug > 1) + { + if(function_exists('getallheaders')) + { + $this->debugmsg(''); // empty line + foreach(getallheaders() as $name => $val) + { + $this->debugmsg("HEADER: $name: $val"); + } + } + + } + + if(isset($_SERVER['HTTP_CONTENT_ENCODING'])) + { + $content_encoding = str_replace('x-', '', $_SERVER['HTTP_CONTENT_ENCODING']); + } + else + { + $content_encoding = ''; + } + + // check if request body has been compressed and decompress it + if($content_encoding != '' && strlen($data)) + { + if($content_encoding == 'deflate' || $content_encoding == 'gzip') + { + // if decoding works, use it. else assume data wasn't gzencoded + if(function_exists('gzinflate') && in_array($content_encoding, $this->accepted_compression)) + { + if($content_encoding == 'deflate' && $degzdata = @gzuncompress($data)) + { + $data = $degzdata; + if($this->debug > 1) + { + $this->debugmsg("\n+++INFLATED REQUEST+++[".strlen($data)." chars]+++\n" . $data . "\n+++END+++"); + } + } + elseif($content_encoding == 'gzip' && $degzdata = @gzinflate(substr($data, 10))) + { + $data = $degzdata; + if($this->debug > 1) + $this->debugmsg("+++INFLATED REQUEST+++[".strlen($data)." chars]+++\n" . $data . "\n+++END+++"); + } + else + { + $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['server_decompress_fail'], $GLOBALS['xmlrpcstr']['server_decompress_fail']); + return $r; + } + } + else + { + //error_log('The server sent deflated data. Your php install must have the Zlib extension compiled in to support this.'); + $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['server_cannot_decompress'], $GLOBALS['xmlrpcstr']['server_cannot_decompress']); + return $r; + } + } + } + + // check if client specified accepted charsets, and if we know how to fulfill + // the request + if ($this->response_charset_encoding == 'auto') + { + $resp_encoding = ''; + if (isset($_SERVER['HTTP_ACCEPT_CHARSET'])) + { + // here we should check if we can match the client-requested encoding + // with the encodings we know we can generate. + /// @todo we should parse q=0.x preferences instead of getting first charset specified... + $client_accepted_charsets = explode(',', strtoupper($_SERVER['HTTP_ACCEPT_CHARSET'])); + // Give preference to internal encoding + $known_charsets = array($GLOBALS['xmlrpc_internalencoding'], 'UTF-8', 'ISO-8859-1', 'US-ASCII'); + foreach ($known_charsets as $charset) + { + foreach ($client_accepted_charsets as $accepted) + if (strpos($accepted, $charset) === 0) + { + $resp_encoding = $charset; + break; + } + if ($resp_encoding) + break; + } + } + } + else + { + $resp_encoding = $this->response_charset_encoding; + } + + if (isset($_SERVER['HTTP_ACCEPT_ENCODING'])) + { + $resp_compression = $_SERVER['HTTP_ACCEPT_ENCODING']; + } + else + { + $resp_compression = ''; + } + + // 'guestimate' request encoding + /// @todo check if mbstring is enabled and automagic input conversion is on: it might mingle with this check??? + $req_encoding = guess_encoding(isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : '', + $data); + + return null; + } + + /** + * Parse an xml chunk containing an xmlrpc request and execute the corresponding + * php function registered with the server + * @param string $data the xml request + * @param string $req_encoding (optional) the charset encoding of the xml request + * @return xmlrpcresp + * @access private + */ + function parseRequest($data, $req_encoding='') + { + // 2005/05/07 commented and moved into caller function code + //if($data=='') + //{ + // $data=$GLOBALS['HTTP_RAW_POST_DATA']; + //} + + // G. Giunta 2005/02/13: we do NOT expect to receive html entities + // so we do not try to convert them into xml character entities + //$data = xmlrpc_html_entity_xlate($data); + + $GLOBALS['_xh']=array(); + $GLOBALS['_xh']['ac']=''; + $GLOBALS['_xh']['stack']=array(); + $GLOBALS['_xh']['valuestack'] = array(); + $GLOBALS['_xh']['params']=array(); + $GLOBALS['_xh']['pt']=array(); + $GLOBALS['_xh']['isf']=0; + $GLOBALS['_xh']['isf_reason']=''; + $GLOBALS['_xh']['method']=false; // so we can check later if we got a methodname or not + $GLOBALS['_xh']['rt']=''; + + // decompose incoming XML into request structure + if ($req_encoding != '') + { + if (!in_array($req_encoding, array('UTF-8', 'ISO-8859-1', 'US-ASCII'))) + // the following code might be better for mb_string enabled installs, but + // makes the lib about 200% slower... + //if (!is_valid_charset($req_encoding, array('UTF-8', 'ISO-8859-1', 'US-ASCII'))) + { + error_log('XML-RPC: '.__METHOD__.': invalid charset encoding of received request: '.$req_encoding); + $req_encoding = $GLOBALS['xmlrpc_defencoding']; + } + /// @BUG this will fail on PHP 5 if charset is not specified in the xml prologue, + // the encoding is not UTF8 and there are non-ascii chars in the text... + /// @todo use an ampty string for php 5 ??? + $parser = xml_parser_create($req_encoding); + } + else + { + $parser = xml_parser_create(); + } + + xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true); + // G. Giunta 2005/02/13: PHP internally uses ISO-8859-1, so we have to tell + // the xml parser to give us back data in the expected charset + // What if internal encoding is not in one of the 3 allowed? + // we use the broadest one, ie. utf8 + // This allows to send data which is native in various charset, + // by extending xmlrpc_encode_entitites() and setting xmlrpc_internalencoding + if (!in_array($GLOBALS['xmlrpc_internalencoding'], array('UTF-8', 'ISO-8859-1', 'US-ASCII'))) + { + xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, 'UTF-8'); + } + else + { + xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $GLOBALS['xmlrpc_internalencoding']); + } + + if ($this->functions_parameters_type != 'xmlrpcvals') + xml_set_element_handler($parser, 'xmlrpc_se', 'xmlrpc_ee_fast'); + else + xml_set_element_handler($parser, 'xmlrpc_se', 'xmlrpc_ee'); + xml_set_character_data_handler($parser, 'xmlrpc_cd'); + xml_set_default_handler($parser, 'xmlrpc_dh'); + if(!xml_parse($parser, $data, 1)) + { + // return XML error as a faultCode + $r=new xmlrpcresp(0, + $GLOBALS['xmlrpcerrxml']+xml_get_error_code($parser), + sprintf('XML error: %s at line %d, column %d', + xml_error_string(xml_get_error_code($parser)), + xml_get_current_line_number($parser), xml_get_current_column_number($parser))); + xml_parser_free($parser); + } + elseif ($GLOBALS['_xh']['isf']) + { + xml_parser_free($parser); + $r=new xmlrpcresp(0, + $GLOBALS['xmlrpcerr']['invalid_request'], + $GLOBALS['xmlrpcstr']['invalid_request'] . ' ' . $GLOBALS['_xh']['isf_reason']); + } + else + { + xml_parser_free($parser); + // small layering violation in favor of speed and memory usage: + // we should allow the 'execute' method handle this, but in the + // most common scenario (xmlrpcvals type server with some methods + // registered as phpvals) that would mean a useless encode+decode pass + if ($this->functions_parameters_type != 'xmlrpcvals' || (isset($this->dmap[$GLOBALS['_xh']['method']]['parameters_type']) && ($this->dmap[$GLOBALS['_xh']['method']]['parameters_type'] == 'phpvals'))) + { + if($this->debug > 1) + { + $this->debugmsg("\n+++PARSED+++\n".var_export($GLOBALS['_xh']['params'], true)."\n+++END+++"); + } + $r = $this->execute($GLOBALS['_xh']['method'], $GLOBALS['_xh']['params'], $GLOBALS['_xh']['pt']); + } + else + { + // build an xmlrpcmsg object with data parsed from xml + $m=new xmlrpcmsg($GLOBALS['_xh']['method']); + // now add parameters in + for($i=0; $iaddParam($GLOBALS['_xh']['params'][$i]); + } + + if($this->debug > 1) + { + $this->debugmsg("\n+++PARSED+++\n".var_export($m, true)."\n+++END+++"); + } + $r = $this->execute($m); + } + } + return $r; + } + + /** + * Execute a method invoked by the client, checking parameters used + * @param mixed $m either an xmlrpcmsg obj or a method name + * @param array $params array with method parameters as php types (if m is method name only) + * @param array $paramtypes array with xmlrpc types of method parameters (if m is method name only) + * @return xmlrpcresp + * @access private + */ + function execute($m, $params=null, $paramtypes=null) + { + if (is_object($m)) + { + $methName = $m->method(); + } + else + { + $methName = $m; + } + $sysCall = $this->allow_system_funcs && (strpos($methName, "system.") === 0); + $dmap = $sysCall ? $GLOBALS['_xmlrpcs_dmap'] : $this->dmap; + + if(!isset($dmap[$methName]['function'])) + { + // No such method + return new xmlrpcresp(0, + $GLOBALS['xmlrpcerr']['unknown_method'], + $GLOBALS['xmlrpcstr']['unknown_method']); + } + + // Check signature + if(isset($dmap[$methName]['signature'])) + { + $sig = $dmap[$methName]['signature']; + if (is_object($m)) + { + list($ok, $errstr) = $this->verifySignature($m, $sig); + } + else + { + list($ok, $errstr) = $this->verifySignature($paramtypes, $sig); + } + if(!$ok) + { + // Didn't match. + return new xmlrpcresp( + 0, + $GLOBALS['xmlrpcerr']['incorrect_params'], + $GLOBALS['xmlrpcstr']['incorrect_params'] . ": ${errstr}" + ); + } + } + + $func = $dmap[$methName]['function']; + // let the 'class::function' syntax be accepted in dispatch maps + if(is_string($func) && strpos($func, '::')) + { + $func = explode('::', $func); + } + // verify that function to be invoked is in fact callable + if(!is_callable($func)) + { + error_log("XML-RPC: ".__METHOD__.": function $func registered as method handler is not callable"); + return new xmlrpcresp( + 0, + $GLOBALS['xmlrpcerr']['server_error'], + $GLOBALS['xmlrpcstr']['server_error'] . ": no function matches method" + ); + } + + // If debug level is 3, we should catch all errors generated during + // processing of user function, and log them as part of response + if($this->debug > 2) + { + $GLOBALS['_xmlrpcs_prev_ehandler'] = set_error_handler('_xmlrpcs_errorHandler'); + } + try + { + // Allow mixed-convention servers + if (is_object($m)) + { + if($sysCall) + { + $r = call_user_func($func, $this, $m); + } + else + { + $r = call_user_func($func, $m); + } + if (!is_a($r, 'xmlrpcresp')) + { + error_log("XML-RPC: ".__METHOD__.": function $func registered as method handler does not return an xmlrpcresp object"); + if (is_a($r, 'xmlrpcval')) + { + $r = new xmlrpcresp($r); + } + else + { + $r = new xmlrpcresp( + 0, + $GLOBALS['xmlrpcerr']['server_error'], + $GLOBALS['xmlrpcstr']['server_error'] . ": function does not return xmlrpcresp object" + ); + } + } + } + else + { + // call a 'plain php' function + if($sysCall) + { + array_unshift($params, $this); + $r = call_user_func_array($func, $params); + } + else + { + // 3rd API convention for method-handling functions: EPI-style + if ($this->functions_parameters_type == 'epivals') + { + $r = call_user_func_array($func, array($methName, $params, $this->user_data)); + // mimic EPI behaviour: if we get an array that looks like an error, make it + // an eror response + if (is_array($r) && array_key_exists('faultCode', $r) && array_key_exists('faultString', $r)) + { + $r = new xmlrpcresp(0, (integer)$r['faultCode'], (string)$r['faultString']); + } + else + { + // functions using EPI api should NOT return resp objects, + // so make sure we encode the return type correctly + $r = new xmlrpcresp(php_xmlrpc_encode($r, array('extension_api'))); + } + } + else + { + $r = call_user_func_array($func, $params); + } + } + // the return type can be either an xmlrpcresp object or a plain php value... + if (!is_a($r, 'xmlrpcresp')) + { + // what should we assume here about automatic encoding of datetimes + // and php classes instances??? + $r = new xmlrpcresp(php_xmlrpc_encode($r, $this->phpvals_encoding_options)); + } + } + } + catch(Exception $e) + { + // (barring errors in the lib) an uncatched exception happened + // in the called function, we wrap it in a proper error-response + switch($this->exception_handling) + { + case 2: + throw $e; + break; + case 1: + $r = new xmlrpcresp(0, $e->getCode(), $e->getMessage()); + break; + default: + $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['server_error'], $GLOBALS['xmlrpcstr']['server_error']); + } + } + if($this->debug > 2) + { + // note: restore the error handler we found before calling the + // user func, even if it has been changed inside the func itself + if($GLOBALS['_xmlrpcs_prev_ehandler']) + { + set_error_handler($GLOBALS['_xmlrpcs_prev_ehandler']); + } + else + { + restore_error_handler(); + } + } + return $r; + } + + /** + * add a string to the 'internal debug message' (separate from 'user debug message') + * @param string $strings + * @access private + */ + function debugmsg($string) + { + $this->debug_info .= $string."\n"; + } + + /** + * @access private + */ + function xml_header($charset_encoding='') + { + if ($charset_encoding != '') + { + return "\n"; + } + else + { + return "\n"; + } + } + + /** + * A debugging routine: just echoes back the input packet as a string value + * DEPRECATED! + */ + function echoInput() + { + $r=new xmlrpcresp(new xmlrpcval( "'Aha said I: '" . $GLOBALS['HTTP_RAW_POST_DATA'], 'string')); + print $r->serialize(); + } + } +?> \ No newline at end of file diff --git a/net/oidentd/Makefile b/net/oidentd/Makefile new file mode 100644 index 0000000..ef60431 --- /dev/null +++ b/net/oidentd/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=oidentd +PKG_VERSION:=2.0.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/ojnk +PKG_MD5SUM:=c3d9a56255819ef8904b867284386911 + +include $(INCLUDE_DIR)/package.mk + +define Package/oidentd + SECTION:=net + CATEGORY:=Network + TITLE:=Identd server + URL:=http://dev.ojnk.net/ +endef + +define Package/oidentd/description + A nat aware identd server that will correctly forwared requests to clients. +endef + +# uses GNU configure + +define Build/Compile + $(call Build/Compile/Default,all) +endef + +define Package/oidentd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/src/oidentd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/oidentd.init $(1)/etc/init.d/oidentd +endef + +$(eval $(call BuildPackage,oidentd)) diff --git a/net/oidentd/files/oidentd.init b/net/oidentd/files/oidentd.init new file mode 100644 index 0000000..2bdc34d --- /dev/null +++ b/net/oidentd/files/oidentd.init @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=85 +start() { + /usr/sbin/oidentd -m -f 113 +} + +stop() { + killall oidentd +} diff --git a/net/olsrd/Makefile b/net/olsrd/Makefile new file mode 100644 index 0000000..94c5f66 --- /dev/null +++ b/net/olsrd/Makefile @@ -0,0 +1,233 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=olsrd +PKG_VERSION:=0.6.1 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.olsr.org/releases/0.6 +PKG_MD5SUM:=a75fc9b6252df5b5f49f13418fafeff1 + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_CFLAGS += $(FPIC) + +define Package/olsrd/template + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + MAINTAINER:=Saverio Proto + TITLE:=OLSR (Optimized Link State Routing) daemon + URL:=http://www.olsr.org/ +endef + +define Package/olsrd + $(call Package/olsrd/template) + MENU:=1 + DEPENDS:=+libpthread +endef + +define Package/olsrd/conffiles +/etc/config/olsrd +endef + +define Package/olsrd-mod-arprefresh + $(call Package/olsrd/template) + DEPENDS:=olsrd + TITLE:=Kernel ARP cache refresh plugin +endef + +define Package/olsrd-mod-dot-draw + $(call Package/olsrd/template) + DEPENDS:=olsrd + TITLE:=Dot topology information plugin +endef + +define Package/olsrd-mod-bmf + $(call Package/olsrd/template) + DEPENDS:=olsrd +kmod-tun + TITLE:=Basic multicast forwarding plugin +endef + +define Package/olsrd-mod-dyn-gw + $(call Package/olsrd/template) + DEPENDS:=olsrd + TITLE:=Dynamic internet gateway plugin +endef + +define Package/olsrd-mod-dyn-gw-plain + $(call Package/olsrd/template) + DEPENDS:=olsrd + TITLE:=Dynamic internet gateway plain plugin +endef + +define Package/olsrd-mod-httpinfo + $(call Package/olsrd/template) + DEPENDS:=olsrd + TITLE:=Small informative web server plugin +endef + +define Package/olsrd-mod-mdns + $(call Package/olsrd/template) + DEPENDS:=olsrd + TITLE:=Multicast DNS plugin +endef + +define Package/olsrd-mod-nameservice + $(call Package/olsrd/template) + DEPENDS:=olsrd + TITLE:=Lightweight hostname resolver plugin +endef + +define Package/olsrd-mod-p2pd + $(call Package/olsrd/template) + DEPENDS:=olsrd + TITLE:=Peer to Peer Discovery plugin +endef + +define Package/olsrd-mod-quagga + $(call Package/olsrd/template) + DEPENDS:=olsrd + TITLE:=Quagga plugin +endef + +define Package/olsrd-mod-secure + $(call Package/olsrd/template) + DEPENDS:=olsrd + TITLE:=Message signing plugin to secure routing domain +endef + +define Package/olsrd-mod-txtinfo + $(call Package/olsrd/template) + DEPENDS:=olsrd + TITLE:=Small informative web server plugin +endef + +define Package/olsrd-mod-watchdog + $(call Package/olsrd/template) + DEPENDS:=olsrd + TITLE:=Watchdog plugin +endef + +define Package/olsrd-mod-secure/conffiles +/etc/olsrd.d/olsrd_secure_key +endef + +MAKE_FLAGS+= \ + NO_DEBUG_MESSAGES=1 \ + OS="linux" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + STRIP="true" \ + INSTALL_LIB="true" \ + SUBDIRS="arprefresh bmf dot_draw dyn_gw dyn_gw_plain httpinfo mdns nameservice p2pd quagga secure txtinfo watchdog" + +define Build/Compile + $(call Build/Compile/Default,all) + $(call Build/Compile/Default,libs) +endef + +define Build/Install + $(call Build/Install/Default,install) + $(call Build/Install/Default,install_libs) +endef + +define Package/olsrd/install + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/olsrd.config $(1)/etc/config/olsrd + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/olsrd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/olsrd.init $(1)/etc/init.d/olsrd +endef + +define Package/olsrd-mod-arprefresh/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/arprefresh/olsrd_arprefresh.so.* $(1)/usr/lib/ +endef + +define Package/olsrd-mod-dot-draw/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dot_draw/olsrd_dot_draw.so.* $(1)/usr/lib/ +endef + +define Package/olsrd-mod-bmf/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmf/olsrd_bmf.so.* $(1)/usr/lib/ +endef + +define Package/olsrd-mod-dyn-gw/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dyn_gw/olsrd_dyn_gw.so.* $(1)/usr/lib/ +endef + +define Package/olsrd-mod-dyn-gw-plain/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dyn_gw_plain/olsrd_dyn_gw_plain.so.* $(1)/usr/lib/ +endef + +define Package/olsrd-mod-httpinfo/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/httpinfo/olsrd_httpinfo.so.* $(1)/usr/lib/ +endef + +define Package/olsrd-mod-mdns/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/mdns/olsrd_mdns.so.* $(1)/usr/lib/ +endef + +define Package/olsrd-mod-nameservice/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/nameservice/olsrd_nameservice.so.* $(1)/usr/lib/ +endef + +define Package/olsrd-mod-p2pd/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/p2pd/olsrd_p2pd.so.* $(1)/usr/lib/ +endef + +define Package/olsrd-mod-quagga/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/quagga/olsrd_quagga.so.* $(1)/usr/lib/ +endef + +define Package/olsrd-mod-secure/install + $(INSTALL_DIR) $(1)/etc/olsrd.d + $(CP) ./files/olsrd_secure_key $(1)/etc/olsrd.d/ + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/secure/olsrd_secure.so.* $(1)/usr/lib/ +endef + +define Package/olsrd-mod-txtinfo/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/txtinfo/olsrd_txtinfo.so.* $(1)/usr/lib/ +endef + +define Package/olsrd-mod-watchdog/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/watchdog/olsrd_watchdog.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,olsrd)) +$(eval $(call BuildPackage,olsrd-mod-arprefresh)) +$(eval $(call BuildPackage,olsrd-mod-dot-draw)) +$(eval $(call BuildPackage,olsrd-mod-bmf)) +$(eval $(call BuildPackage,olsrd-mod-dyn-gw)) +$(eval $(call BuildPackage,olsrd-mod-dyn-gw-plain)) +$(eval $(call BuildPackage,olsrd-mod-httpinfo)) +$(eval $(call BuildPackage,olsrd-mod-mdns)) +$(eval $(call BuildPackage,olsrd-mod-nameservice)) +$(eval $(call BuildPackage,olsrd-mod-p2pd)) +$(eval $(call BuildPackage,olsrd-mod-quagga)) +$(eval $(call BuildPackage,olsrd-mod-secure)) +$(eval $(call BuildPackage,olsrd-mod-txtinfo)) +$(eval $(call BuildPackage,olsrd-mod-watchdog)) diff --git a/net/olsrd/files/olsrd.config b/net/olsrd/files/olsrd.config new file mode 100644 index 0000000..9a19eb9 --- /dev/null +++ b/net/olsrd/files/olsrd.config @@ -0,0 +1,26 @@ +config olsrd + # uncomment the following line to use a custom config file instead: + #option config_file '/etc/olsrd.conf' + + option IpVersion '4' + +config LoadPlugin + option library 'olsrd_arprefresh.so.0.1' + +config LoadPlugin + option library 'olsrd_dyn_gw.so.0.5' + +config LoadPlugin + option library 'olsrd_httpinfo.so.0.1' + option port '1978' + list Net '0.0.0.0 0.0.0.0' + +config LoadPlugin + option library 'olsrd_nameservice.so.0.3' + +config LoadPlugin + option library 'olsrd_txtinfo.so.0.1' + option accept '0.0.0.0' + +config Interface + list interface 'wlan' diff --git a/net/olsrd/files/olsrd.init b/net/olsrd/files/olsrd.init new file mode 100644 index 0000000..dd82bb5 --- /dev/null +++ b/net/olsrd/files/olsrd.init @@ -0,0 +1,612 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 Alina Friedrichsen +# Special thanks to bittorf wireless )) +START=65 + +OLSRD_OLSRD_SCHEMA='ignore:internal config_file:internal DebugLevel=0 AllowNoInt=yes' +OLSRD_IPCCONNECT_SCHEMA='ignore:internal Host:list Net:list2' +OLSRD_LOADPLUGIN_SCHEMA='ignore:internal library:internal Host4:list Net4:list2 Host:list Net:list2 Host6:list Net6:list2 Ping:list redistribute:list NonOlsrIf:list name:list lat lon latlon_infile HNA:list2 hosts:list2' +OLSRD_INTERFACE_SCHEMA='ignore:internal interface:internal AutoDetectChanges:bool' +OLSRD_INTERFACE_DEFAULTS_SCHEMA='AutoDetectChanges:bool' + +T=' ' +N=' +' + +validate_varname() { + local varname="$1" + [ -z "$varname" -o "$varname" != "${varname%%[!A-Za-z0-9_]*}" ] && return 1 + return 0 +} + +validate_ifname() { + local ifname="$1" + [ -z "$ifname" -o "$ifname" != "${ifname%%[!A-Za-z0-9.:_-]*}" ] && return 1 + return 0 +} + +validate_olsrd_option() { + local str="$1" + [ -z "$str" -o "$str" != "${str%%[! 0-9A-Za-z./|:_-]*}" ] && return 1 + return 0 +} + +get_ifname() { + IFNAME= + local interface="$1" + validate_varname "$interface" || return 1 + local ifname + + config_get ifname "$interface" ifname + validate_ifname "$ifname" || return 1 + IFNAME="$ifname" + + return 0 +} + +system_config() { + local cfg="$1" + local cfgt + local hostname + local latlon + + config_get cfgt "$cfg" TYPE + + if [ "$cfgt" = "system" ]; then + config_get hostname "$cfg" hostname + hostname="${hostname:-OpenWrt}" + SYSTEM_HOSTNAME="$hostname" + fi + + if [ -z "$SYSTEM_LAT" -o -z "$SYSTEM_LON" ]; then + config_get latlon "$cfg" latlon + IFS=" ${T}${N}," + set -- $latlon + unset IFS + SYSTEM_LAT="$1" + SYSTEM_LON="$2" + fi + + if [ -z "$SYSTEM_LAT" -o -z "$SYSTEM_LON" ]; then + config_get latlon "$cfg" latitude + SYSTEM_LAT="$latlon" + config_get latlon "$cfg" longitude + SYSTEM_LON="$latlon" + fi +} + +olsrd_find_config_file() { + local cfg="$1" + validate_varname "$cfg" || return 0 + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + config_get OLSRD_CONFIG_FILE "$cfg" config_file + + return 0 +} + +warning_invalid_value() { + local package="$1" + validate_varname "$package" || package= + local config="$2" + validate_varname "$config" || config= + local option="$3" + validate_varname "$option" || option= + + echo -n "Warning: Invalid value" 1>&2 + + if [ -n "$package" -a -n "$config" ]; then + echo -n " in option '$package.$config${option:+.}$option'" 1>&2 + fi + + echo ", skipped" 1>&2 + + return 0 +} + +olsrd_write_option() { + local param="$1" + local cfg="$2" + validate_varname "$cfg" || return 1 + local option="$3" + validate_varname "$option" || return 1 + local value="$4" + local option_type="$5" + + if [ "$option_type" = bool ]; then + case "$value" in + 1|on|true|enabled|yes) value=yes;; + 0|off|false|disabled|no) value=no;; + *) warning_invalid_value olsrd "$cfg" "$option"; return 1;; + esac + fi + + if ! validate_olsrd_option "$value"; then + warning_invalid_value olsrd "$cfg" "$option" + return 1 + fi + + if [ "$value" != "${value%%[G-Zg-z_-]*}" ]; then + if [ "$option" != "Ip6AddrType" -a "$option" != "LinkQualityMult" -a "$value" != "yes" -a "$value" != "no" ]; then + value="\"$value\"" + fi + fi + + echo -n "${N}$param$option $value" + + return 0 +} + +olsrd_write_plparam() { + local param="$1" + local cfg="$2" + validate_varname "$cfg" || return 1 + local option="$3" + validate_varname "$option" || return 1 + local value="$4" + local option_type="$5" + local _option + + if [ "$option_type" = bool ]; then + case "$value" in + 1|on|true|enabled|yes) value=yes;; + 0|off|false|disabled|no) value=no;; + *) warning_invalid_value olsrd "$cfg" "$option"; return 1;; + esac + fi + + if ! validate_olsrd_option "$value"; then + warning_invalid_value olsrd "$cfg" "$option" + return 1 + fi + + IFS='-_' + set -- $option + option="$*" + unset IFS + _option="$option" + if [ "$option" = 'hosts' ]; then + set -- $value + option="$1" + shift + value="$*" + fi + if [ "$option" = 'NonOlsrIf' ]; then + if validate_varname "$value"; then + if get_ifname "$value"; then + ifname="$IFNAME" + echo "Info: mdns Interface '$value' ifname '$ifname' found" 1>&2 + else + echo "Warning: mdns Interface '$value' not found, skipped" 1>&2 + fi + else + warning_invalid_value olsrd "$cfg" "NonOlsrIf" + fi + [ -z "$ifname" ] || value=$ifname + fi + + echo -n "${N}${param}PlParam \"$option\" \"$value\"" + + return 0 +} + +config_update_schema() { + unset IFS + local schema_varname="$1" + validate_varname "$schema_varname" || return 1 + local command="$2" + validate_varname "$command" || return 1 + local option="$3" + validate_varname "$option" || return 1 + local value="$4" + local schema + local cur_option + + case "$varname" in + *_LENGTH) return 0;; + *_ITEM*) return 0;; + esac + + eval "export -n -- \"schema=\${$schema_varname}\"" + + for cur_option in $schema; do + [ "${cur_option%%[:=]*}" = "$option" ] && return 0 + done + + if [ "$command" = list ]; then + set -- $value + if [ "$#" -ge "3" ]; then + schema_entry="$option:list3" + elif [ "$#" -ge "2" ]; then + schema_entry="$option:list2" + else + schema_entry="$option:list" + fi + else + schema_entry="$option" + fi + + append "$schema_varname" "$schema_entry" + + return 0 +} + +config_write_options() { + unset IFS + local schema="$1" + local cfg="$2" + validate_varname "$cfg" || return 1 + local write_func="$3" + [ -z "$write_func" ] && output_func=echo + local write_param="$4" + local schema_entry + local option + local option_length + local option_type + local default + local value + local list_size + local list_item + local list_value + local i + local position + + for schema_entry in $schema; do + default="${schema_entry#*[=]}" + [ "$default" = "$schema_entry" ] && default= + option="${schema_entry%%[=]*}" + IFS=':' + set -- $option + unset IFS + option="$1" + option_type="$2" + validate_varname "$option" || continue + [ -z "$option_type" ] || validate_varname "$option_type" || continue + [ "$option_type" = internal ] && continue + config_get value "$cfg" "$option" + + if [ -z "$value" ]; then + IFS='+' + set -- $default + unset IFS + value=$* + elif [ "$value" = '-' -a -n "$default" ]; then + continue + fi + + [ -z "$value" ] && continue + + case "$option_type" in + list) list_size=1;; + list2) list_size=2;; + list3) list_size=3;; + *) list_size=0;; + esac + + if [ "$list_size" -gt 0 ]; then + config_get option_length "$cfg" "${option}_LENGTH" + if [ -n "$option_length" ]; then + i=1 + while [ "$i" -le "$option_length" ]; do + config_get list_value "$cfg" "${option}_ITEM$i" + "$write_func" "$write_param" "$cfg" "$option" "$list_value" "$option_type" || break + i=$((i + 1)) + done + else + list_value= + i=0 + for list_item in $value; do + append "list_value" "$list_item" + i=$((i + 1)) + position=$((i % list_size)) + if [ "$position" -eq 0 ]; then + "$write_func" "$write_param" "$cfg" "$option" "$list_value" "$option_type" || break + list_value= + fi + done + [ "$position" -ne 0 ] && "$write_func" "$write_param" "$cfg" "$option" "$list_value" "$option_type" + fi + else + "$write_func" "$write_param" "$cfg" "$option" "$value" "$option_type" + fi + done + + return 0 +} + +olsrd_write_olsrd() { + local cfg="$1" + validate_varname "$cfg" || return 0 + local ignore + local ipversion + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + + [ "$OLSRD_COUNT" -gt 0 ] && return 0 + + config_get ipversion "$cfg" IpVersion + if [ "$ipversion" = "6and4" ]; then + OLSRD_IPVERSION_6AND4=1 + config_set "$cfg" IpVersion '6' + fi + + config_write_options "$OLSRD_OLSRD_SCHEMA" "$cfg" olsrd_write_option + echo + OLSRD_COUNT=$((OLSRD_COUNT + 1)) + + return 0 +} + +olsrd_write_ipcconnect() { + local cfg="$1" + validate_varname "$cfg" || return 0 + local ignore + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + + [ "$IPCCONNECT_COUNT" -gt 0 ] && return 0 + + echo -n "${N}IpcConnect${N}{" + config_write_options "$OLSRD_IPCCONNECT_SCHEMA" "$cfg" olsrd_write_option "${T}" + echo "${N}}" + IPCCONNECT_COUNT=$((IPCCONNECT_COUNT + 1)) + + return 0 +} + +olsrd_write_hna4() { + local cfg="$1" + validate_varname "$cfg" || return 0 + local ignore + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + + config_get netaddr "$cfg" netaddr + if ! validate_olsrd_option "$netaddr"; then + warning_invalid_value olsrd "$cfg" "netaddr" + return 0 + fi + + config_get netmask "$cfg" netmask + if ! validate_olsrd_option "$netmask"; then + warning_invalid_value olsrd "$cfg" "netmask" + return 0 + fi + + [ "$HNA4_COUNT" -le 0 ] && echo -n "${N}Hna4${N}{" + echo -n "${N}${T}${T}$netaddr $netmask" + HNA4_COUNT=$((HNA4_COUNT + 1)) + + return 0 +} + +olsrd_write_hna6() { + local cfg="$1" + validate_varname "$cfg" || return 0 + local ignore + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + + config_get netaddr "$cfg" netaddr + if ! validate_olsrd_option "$netaddr"; then + warning_invalid_value olsrd "$cfg" "netaddr" + return 0 + fi + + config_get prefix "$cfg" prefix + if ! validate_olsrd_option "$prefix"; then + warning_invalid_value olsrd "$cfg" "prefix" + return 0 + fi + + [ "$HNA6_COUNT" -le 0 ] && echo -n "${N}Hna6${N}{" + echo -n "${N}${T}${T}$netaddr $prefix" + HNA6_COUNT=$((HNA6_COUNT + 1)) + + return 0 +} + +olsrd_write_loadplugin() { + local cfg="$1" + validate_varname "$cfg" || return 0 + local ignore + local name + local suffix + local lat + local lon + local latlon_infile + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + + config_get library "$cfg" library + if ! validate_olsrd_option "$library"; then + warning_invalid_value olsrd "$cfg" "library" + return 0 + fi + if ! [ -x "/lib/$library" -o -x "/usr/lib/$library" -o -x "/usr/local/lib/$library" ]; then + echo "Warning: Plugin library '$library' not found, skipped" 1>&2 + return 0 + fi + + case "$library" in + olsrd_nameservice.*) + config_get name "$cfg" name + [ -z "$name" ] && config_set "$cfg" name $SYSTEM_HOSTNAME + + config_get suffix "$cfg" suffix + [ -z "$suffix" ] && config_set "$cfg" suffix '.olsr' + + config_get lat "$cfg" lat + config_get lon "$cfg" lon + config_get latlon_infile "$cfg" latlon_infile + if [ \( -z "$lat" -o -z "$lat" \) -a -z "$latlon_infile" ]; then + if [ -f '/var/run/latlon.txt' ]; then + config_set "$cfg" lat '' + config_set "$cfg" lon '' + config_set "$cfg" latlon_infile '/var/run/latlon.txt' + else + config_set "$cfg" lat "$SYSTEM_LAT" + config_set "$cfg" lon "$SYSTEM_LON" + fi + fi + + config_get latlon_file "$cfg" latlon_file + [ -z "$latlon_file" ] && config_set "$cfg" latlon_file '/var/run/latlon.js' + ;; + esac + + echo -n "${N}LoadPlugin \"$library\"${N}{" + config_write_options "$OLSRD_LOADPLUGIN_SCHEMA" "$cfg" olsrd_write_plparam "${T}" + echo "${N}}" + + return 0 +} + +olsrd_write_interface() { + local cfg="$1" + validate_varname "$cfg" || return 0 + local ignore + local interfaces + local interface + local ifnames + + config_get_bool ignore "$cfg" ignore 0 + [ "$ignore" -ne 0 ] && return 0 + + ifnames= + config_get interfaces "$cfg" interface + for interface in $interfaces; do + if validate_varname "$interface"; then + if get_ifname "$interface"; then + ifnames="$ifnames \"$IFNAME\"" + else + echo "Warning: Interface '$interface' not found, skipped" 1>&2 + fi + else + warning_invalid_value olsrd "$cfg" "interface" + fi + done + + [ -z "$ifnames" ] && return 0 + + echo -n "${N}Interface$ifnames${N}{" + config_write_options "$OLSRD_INTERFACE_SCHEMA" "$cfg" olsrd_write_option "${T}" + echo "${N}}" + INTERFACES_COUNT=$((INTERFACES_COUNT + 1)) + + return 0 +} + +olsrd_write_interface_defaults() { + local cfg="$1" + validate_varname "$cfg" || return 0 + + echo -n "${N}InterfaceDefaults$ifnames${N}{" + config_write_options "$OLSRD_INTERFACE_DEFAULTS_SCHEMA" "$cfg" olsrd_write_option "${T}" + echo "${N}}" + + return 1 +} + +olsrd_update_schema() { + local command="$1" + validate_varname "$command" || return 0 + local varname="$2" + validate_varname "$varname" || return 0 + local value="$3" + local cfg="$CONFIG_SECTION" + local cfgt + local cur_varname + + config_get cfgt "$cfg" TYPE + case "$cfgt" in + olsrd) config_update_schema OLSRD_OLSRD_SCHEMA "$command" "$varname" "$value";; + IpcConnect) config_update_schema OLSRD_IPCCONNECT_SCHEMA "$command" "$varname" "$value";; + LoadPlugin) config_update_schema OLSRD_LOADPLUGIN_SCHEMA "$command" "$varname" "$value";; + Interface) config_update_schema OLSRD_INTERFACE_SCHEMA "$command" "$varname" "$value";; + InterfaceDefaults) config_update_schema OLSRD_INTERFACE_DEFAULTS_SCHEMA "$command" "$varname" "$value";; + esac + + return 0 +} + +olsrd_write_config() { + OLSRD_IPVERSION_6AND4=0 + OLSRD_COUNT=0 + config_foreach olsrd_write_olsrd olsrd + IPCCONNECT_COUNT=0 + config_foreach olsrd_write_ipcconnect IpcConnect + HNA4_COUNT=0 + config_foreach olsrd_write_hna4 Hna4 + [ "$HNA4_COUNT" -gt 0 ] && echo "${N}}" + HNA6_COUNT=0 + config_foreach olsrd_write_hna6 Hna6 + [ "$HNA6_COUNT" -gt 0 ] && echo "${N}}" + config_foreach olsrd_write_loadplugin LoadPlugin + INTERFACES_COUNT=0 + config_foreach olsrd_write_interface_defaults InterfaceDefaults + config_foreach olsrd_write_interface Interface + echo + + return 0 +} + +start() { + SYSTEM_HOSTNAME= + SYSTEM_LAT= + SYSTEM_LON= + config_load system + config_foreach system_config system + + option_cb() { + olsrd_update_schema "option" "$@" + } + + list_cb() { + olsrd_update_schema "list" "$@" + } + + include /lib/network + scan_interfaces + config_load olsrd + reset_cb + + OLSRD_CONFIG_FILE= + config_foreach olsrd_find_config_file olsrd + + if [ -z "$OLSRD_CONFIG_FILE" ]; then + mkdir -p -- /var/etc/ + olsrd_write_config > /var/etc/olsrd.conf + if [ "$INTERFACES_COUNT" -gt 0 -a "$OLSRD_COUNT" -gt 0 ]; then + OLSRD_CONFIG_FILE=/var/etc/olsrd.conf + fi + fi + + [ -z "$OLSRD_CONFIG_FILE" ] && return 1 + + local bindv6only='0' + if [ "$OLSRD_IPVERSION_6AND4" -ne 0 ]; then + bindv6only="$(sysctl -n net.ipv6.bindv6only)" + sysctl -w net.ipv6.bindv6only=1 + sed -e 's/^\t\t[0-9.]*[ ][0-9.]*$//' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv6 + sed -i '/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/d' /var/etc/olsrd.conf.ipv6 + olsrd -f /var/etc/olsrd.conf.ipv6 -nofork < /dev/null > /dev/null & + + sed -e 's/^IpVersion[ ][ ]*6$/IpVersion 4/' -e 's/^\t\t[A-Fa-f0-9.:]*[:][A-Fa-f0-9.:]*[ ][0-9]*$//' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv4 + olsrd -f /var/etc/olsrd.conf.ipv4 -nofork < /dev/null > /dev/null & + sleep 3 + sysctl -w net.ipv6.bindv6only="$bindv6only" + else + olsrd -f "$OLSRD_CONFIG_FILE" -nofork < /dev/null > /dev/null & + fi +} + +stop() { + killall olsrd +} diff --git a/net/olsrd/files/olsrd_secure_key b/net/olsrd/files/olsrd_secure_key new file mode 100644 index 0000000..4a7d725 --- /dev/null +++ b/net/olsrd/files/olsrd_secure_key @@ -0,0 +1 @@ +1234567890123456 \ No newline at end of file diff --git a/net/olsrd/patches/100-no_forwarding_override.patch b/net/olsrd/patches/100-no_forwarding_override.patch new file mode 100644 index 0000000..16658e3 --- /dev/null +++ b/net/olsrd/patches/100-no_forwarding_override.patch @@ -0,0 +1,29 @@ +--- a/src/linux/net.c ++++ b/src/linux/net.c +@@ -174,11 +174,13 @@ static bool is_at_least_linuxkernel_2_6_ + */ + void + net_os_set_global_ifoptions(void) { ++#if 0 + if (writeToProc(olsr_cnf->ip_version == AF_INET ? PROC_IPFORWARD_V4 : PROC_IPFORWARD_V6, &orig_fwd_state, '1')) { + OLSR_PRINTF(1, "Warning, could not enable IP forwarding!\n" + "you should manually ensure that IP forwarding is enabled!\n\n"); + olsr_startup_sleep(3); + } ++#endif + + if (olsr_cnf->smart_gw_active) { + char procfile[FILENAME_MAX]; +@@ -273,10 +275,12 @@ net_os_restore_ifoptions(void) + + OLSR_PRINTF(1, "Restoring network state\n"); + ++#if 0 + /* Restore IP forwarding to "off" */ + if (writeToProc(olsr_cnf->ip_version == AF_INET ? PROC_IPFORWARD_V4 : PROC_IPFORWARD_V6, NULL, orig_fwd_state)) { + OLSR_PRINTF(1, "Error, could not restore ip_forward settings\n"); + } ++#endif + + if (olsr_cnf->smart_gw_active && (olsr_cnf->ip_version == AF_INET || olsr_cnf->use_niit)) { + /* Generate the procfile name */ diff --git a/net/olsrd/patches/200-txtinfo_gateways_formatting.patch b/net/olsrd/patches/200-txtinfo_gateways_formatting.patch new file mode 100644 index 0000000..caf4253 --- /dev/null +++ b/net/olsrd/patches/200-txtinfo_gateways_formatting.patch @@ -0,0 +1,20 @@ +--- a/lib/txtinfo/src/olsrd_txtinfo.c ++++ b/lib/txtinfo/src/olsrd_txtinfo.c +@@ -562,7 +562,7 @@ ipc_print_gateway(struct autobuf *abuf) + struct lqtextbuffer lqbuf; + + // Status IP ETX Hopcount Uplink-Speed Downlink-Speed ipv4/ipv4-nat/- ipv6/- ipv6-prefix/- +- abuf_puts(abuf, "Table: Gateways\n Gateway\tETX\tHopcnt\tUplink\tDownlnk\tIPv4\tIPv6\tPrefix\n"); ++ abuf_puts(abuf, "Table: Gateways\nGateway\tETX\tHopcnt\tUplink\tDownlnk\tIPv4\tIPv6\tPrefix\n"); + OLSR_FOR_ALL_GATEWAY_ENTRIES(gw) { + char v4 = '-', v6 = '-'; + bool autoV4 = false, autoV6 = false; +@@ -595,7 +595,7 @@ ipc_print_gateway(struct autobuf *abuf) + v6type = IPV6; + } + +- abuf_appendf(abuf, "%c%c %s\t%s\t%d\t%u\t%u\t%s\t%s\t%s\n", ++ abuf_appendf(abuf, "%c%c\t%s\t%s\t%d\t%u\t%u\t%s\t%s\t%s\n", + v4, v6, olsr_ip_to_string(&buf, &gw->originator), + get_linkcost_text(tc->path_cost, true, &lqbuf), tc->hops, + gw->uplink, gw->downlink, v4type, v6type, diff --git a/net/olsrd/patches/900-force_copy_olsrd_conf_file.patch b/net/olsrd/patches/900-force_copy_olsrd_conf_file.patch new file mode 100644 index 0000000..f1e4785 --- /dev/null +++ b/net/olsrd/patches/900-force_copy_olsrd_conf_file.patch @@ -0,0 +1,11 @@ +--- a/Makefile 2010-06-14 11:27:58.000000000 +0200 ++++ b/Makefile 2010-06-14 11:28:44.000000000 +0200 +@@ -117,7 +117,7 @@ + @echo can be found at files/olsrd.conf.default.lq + @echo ========================================================== + mkdir -p $(ETCDIR) +- -cp -i files/olsrd.conf.default.lq $(CFGFILE) ++ -cp -f files/olsrd.conf.default.lq $(CFGFILE) + @echo ------------------------------------------- + @echo Edit $(CFGFILE) before running olsrd!! + @echo ------------------------------------------- diff --git a/net/openconnect/Makefile b/net/openconnect/Makefile new file mode 100644 index 0000000..468402b --- /dev/null +++ b/net/openconnect/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=openconnect +PKG_VERSION:=2.25 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/ +PKG_MD5SUM:=796a32b611ee6210a5367eb9684d6778 + +include $(INCLUDE_DIR)/package.mk + +define Package/openconnect + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libxml2 +libopenssl +kmod-tun + TITLE:=VPN client for Cisco's AnyConnect SSL VPN + URL:=http://www.infradead.org/openconnect/ + SUBMENU:=VPN +endef + +define Package/openconnect/description + A VPN client compatible with Cisco's AnyConnect SSL VPN. + + OpenConnect is a client for Cisco's AnyConnect SSL VPN, which is + supported by IOS 12.4(9)T or later on Cisco SR500, 870, 880, 1800, 2800, + 3800, 7200 Series and Cisco 7301 Routers. +endef + +define Build/Compile + $(call Build/Compile/Default, \ + SSL_CFLAGS="" \ + OPT_FLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ + OS="Linux" \ + STAGING_DIR="$(STAGING_DIR)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + PREFIX=/usr \ + all install \ + ) +endef + +define Package/openconnect/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/openconnect \ + $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,openconnect)) diff --git a/net/openconnect/patches/001-change-openssl-paths.patch b/net/openconnect/patches/001-change-openssl-paths.patch new file mode 100644 index 0000000..730aff6 --- /dev/null +++ b/net/openconnect/patches/001-change-openssl-paths.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -15,7 +15,7 @@ endif + # dir; there's no need to install it anywhere (we link it statically). + ifdef OPENSSL + SSL_CFLAGS += -I$(OPENSSL)/include +-SSL_LDFLAGS += $(OPENSSL)/libssl.a $(OPENSSL)/libcrypto.a ++SSL_LDFLAGS += $(OPENSSL)/lib/libssl.a $(OPENSSL)/lib/libcrypto.a + else + ifeq ($(wildcard /usr/include/openssl),) + $(error "No OpenSSL in /usr/include/openssl. Cannot continue"); diff --git a/net/opendchub/Makefile b/net/opendchub/Makefile new file mode 100644 index 0000000..a6ef84e --- /dev/null +++ b/net/opendchub/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=opendchub +PKG_VERSION:=0.8.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/opendchub +PKG_MD5SUM:=e812ac26323f3a8113ce1a0761ce9544 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/opendchub + SUBMENU:=P2P + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libopenssl +libpthread + TITLE:=software for the Direct Connect network + URL:=http://opendchub.sourceforge.net/ +endef + +define Package/opendchub/description + Open DC hub is a Unix/Linux version of the hub software + for the Direct Connect network +endef + +CONFIGURE_ARGS += \ + --disable-perl \ + +define Package/opendchub/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opendchub $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,opendchub)) diff --git a/net/openl2tp/Makefile b/net/openl2tp/Makefile new file mode 100644 index 0000000..6b3e4a2 --- /dev/null +++ b/net/openl2tp/Makefile @@ -0,0 +1,73 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=openl2tp +PKG_VERSION:=1.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/openl2tp +PKG_MD5SUM:=e3d08dedfb9e6a9a1e24f6766f6dadd0 + +PKG_BUILD_DEPENDS:=libreadline libncurses +PKG_BUILD_PARALLEL:=1 +PPPD_VERSION:=2.4.4 + +include $(INCLUDE_DIR)/package.mk + +define Build/Prepare + $(call Build/Prepare/Default) + $(CP) ./src/*.[ch] $(PKG_BUILD_DIR)/ +endef + +define Package/openl2tp + SECTION:=net + CATEGORY:=Network + DEPENDS:=+ppp +kmod-pppol2tp +portmap +libreadline +libncurses \ + @!LINUX_2_4 $(LIBRPC_DEPENDS) + TITLE:=An L2TP (Layer 2 Tunneling Protocol) daemon + URL:=http://www.openl2tp.org/ + SUBMENU:=VPN +endef + +define Package/openl2tp/description + OpenL2TP is an open source L2TP client/server, written by Katalix Systems + specifically for Linux. It has been designed for use as an enterprise + L2TP VPN server or in commercial, Linux-based, embedded networking + products and is able to support hundreds of sessions, each with different + configuration. +endef + +MAKE_FLAGS+= \ + KERNEL_SRCDIR="$(LINUX_DIR)" \ + KERNEL_BLDDIR="$(LINUX_DIR)" \ + PPPD_VERSION="$(PKG_PPPD_VERSION)" \ + READLINE_DIR="$(STAGING_DIR)/usr" \ + PPPD_SRCDIR="$(STAGING_DIR)/usr/include" \ + PPPD_LIBDIR="$(STAGING_DIR)/usr/lib" \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ + LIBS.dmalloc="-L$(STAGING_DIR)/usr/lib $(LIBRPC)" + +define Package/openl2tp/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/l2tpconfig $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/openl2tpd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PPPD_VERSION) + $(INSTALL_BIN) $(PKG_BUILD_DIR)/pppd/openl2tp.so $(1)/usr/lib/pppd/$(PPPD_VERSION)/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/pppd/pppol2tp.so $(1)/usr/lib/pppd/$(PPPD_VERSION)/ + $(INSTALL_DIR) $(1)/usr/lib/openl2tp + $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/event_sock.so $(1)/usr/lib/openl2tp/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ipsec.so $(1)/usr/lib/openl2tp/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ppp_null.so $(1)/usr/lib/openl2tp/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/ppp_unix.so $(1)/usr/lib/openl2tp/ +endef + +$(eval $(call BuildPackage,openl2tp)) diff --git a/net/openl2tp/patches/001-makefile.patch b/net/openl2tp/patches/001-makefile.patch new file mode 100644 index 0000000..17790cf --- /dev/null +++ b/net/openl2tp/patches/001-makefile.patch @@ -0,0 +1,87 @@ +--- a/Makefile ++++ b/Makefile +@@ -8,7 +8,7 @@ L2TP_FEATURE_LAIC_SUPPORT= y + L2TP_FEATURE_LAOC_SUPPORT= y + L2TP_FEATURE_LNIC_SUPPORT= y + L2TP_FEATURE_LNOC_SUPPORT= y +-L2TP_FEATURE_LOCAL_CONF_FILE= y ++#L2TP_FEATURE_LOCAL_CONF_FILE= y + #L2TP_FEATURE_LOCAL_STAT_FILE= y + + # Define USE_DMALLOC to enable dmalloc memory debugging +@@ -55,17 +55,17 @@ endif + # in the pppd subdirectory of the compiler's default search path + # (e.g. /usr/include/pppd). but can be pointed to another directory if + # desired. +-PPPD_VERSION= 2.4.5 ++#PPPD_VERSION= 2.4.5 + # PPPD_INCDIR= /usr/include/pppd + # PPPD_LIBDIR= $(SYS_LIBDIR)/pppd/$(PPPD_VERSION) + + # Points to readline install root. READLINE_DIR should have lib/ & + # include/ subdirs If not defined, readline is assumed to be installed + # in the standard places that the compiler looks. +-READLINE_DIR= ++#READLINE_DIR= + + # For cross-compiling +-CROSS_COMPILE= ++#CROSS_COMPILE= + + # END CONFIGURABLE SETTINGS + +@@ -158,7 +158,7 @@ CFLAGS= -I. -Iusl -Icli -isystem inclu + $(CPPFLAGS) $(CPPFLAGS.dmalloc) \ + -DSYS_LIBDIR=$(SYS_LIBDIR) + LDFLAGS.l2tpd= -Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc +-LDFLAGS.l2tpconfig= -Lcli -lcli -lreadline $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc ++LDFLAGS.l2tpconfig= -Lcli -lcli -lreadline -lncurses $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc + + OPT_CFLAGS?= -O + +@@ -185,11 +185,11 @@ RPCGENFLAGS= -N -M -C -L + + .PHONY: all clean distclean install daemon app test + +-all: generated-files daemon $(APP) ++all: daemon $(APP) + +-daemon: generated-files $(SUBDIRS:%=subdir-%) openl2tpd ++daemon: $(SUBDIRS:%=subdir-%) openl2tpd + +-app: generated-files l2tpconfig ++app: l2tpconfig + + test: subdir-test + $(MAKE) -C $@ $(MFLAGS) $@ +@@ -197,7 +197,7 @@ test: subdir-test + + .PHONY: $(SUBDIRS:%=subdir-%) + +-$(SUBDIRS:%=subdir-%): FORCE ++$(SUBDIRS:%=subdir-%): FORCE generated-files + $(MAKE) -C $(@:subdir-%=%) $(MFLAGS) EXTRA_CFLAGS="$(CPPFLAGS)" + + ifeq ($(L2TP_FEATURE_LOCAL_CONF_FILE),y) +@@ -265,9 +265,13 @@ TAGS: + @for d in $(SUBDIRS); do $(MAKE) -C $$d $(MFLAGS) $@; done + etags $(wildcard *.c) $(wildcard *.h) + ++$(L2TPD_SRCS.o): generated-files ++ + openl2tpd: $(L2TPD_SRCS.o) + $(CC) -o $@ $^ $(LDFLAGS.l2tpd) + ++$(L2TPCONFIG_SRCS.o): generated-files ++ + l2tpconfig: $(L2TPCONFIG_SRCS.o) + $(CC) -o $@ $^ $(LDFLAGS.l2tpconfig) + +@@ -317,6 +321,7 @@ endif + else \ + mv $@.tmp $@ ;\ + fi ++ @echo '$@ generated.' + + .PHONY: all install-all install-daemon install-app + diff --git a/net/openl2tp/patches/010-ppp_unix.patch b/net/openl2tp/patches/010-ppp_unix.patch new file mode 100644 index 0000000..839749e --- /dev/null +++ b/net/openl2tp/patches/010-ppp_unix.patch @@ -0,0 +1,11 @@ +--- a/plugins/ppp_unix.c ++++ b/plugins/ppp_unix.c +@@ -888,6 +888,8 @@ static int ppp_unix_pppd_spawn(struct pp + + if (ppp->ppp_profile_data->proxy_arp) { + argv[arg++] = "proxyarp"; ++ } else { ++ argv[arg++] = "noproxyarp"; + } + + argv[arg++] = "plugin"; diff --git a/net/openl2tp/src/l2tp_rpc.h b/net/openl2tp/src/l2tp_rpc.h new file mode 100644 index 0000000..3989b92 --- /dev/null +++ b/net/openl2tp/src/l2tp_rpc.h @@ -0,0 +1,1475 @@ +/* + * Please do not edit this file. + * It was generated using rpcgen. + */ + +#ifndef _L2TP_RPC_H_RPCGEN +#define _L2TP_RPC_H_RPCGEN + +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define L2TP_APP_COPYRIGHT_INFO "(c) Copyright 2004-2010" +#define L2TP_APP_VENDOR_INFO "Katalix Systems Ltd." +#define L2TP_APP_MAJOR_VERSION 1 +#define L2TP_APP_MINOR_VERSION 8 +#define L2TP_DEBUG_PROTOCOL 1 +#define L2TP_DEBUG_FSM 2 +#define L2TP_DEBUG_API 4 +#define L2TP_DEBUG_AVP 8 +#define L2TP_DEBUG_AVP_HIDE 16 +#define L2TP_DEBUG_AVP_DATA 32 +#define L2TP_DEBUG_FUNC 64 +#define L2TP_DEBUG_XPRT 128 +#define L2TP_DEBUG_DATA 256 +#define L2TP_DEBUG_SYSTEM 512 +#define L2TP_DEBUG_PPP 1024 +#define L2TP_ERR_BASE 500 +#define L2TP_ERR_PARAM_NOT_MODIFIABLE 500 +#define L2TP_ERR_PEER_ADDRESS_MISSING 501 +#define L2TP_ERR_PEER_NOT_FOUND 502 +#define L2TP_ERR_PEER_PROFILE_NOT_FOUND 503 +#define L2TP_ERR_PPP_PROFILE_NOT_FOUND 504 +#define L2TP_ERR_PROFILE_ALREADY_EXISTS 505 +#define L2TP_ERR_PROFILE_NAME_ILLEGAL 506 +#define L2TP_ERR_PROFILE_NAME_MISSING 507 +#define L2TP_ERR_SESSION_ALREADY_EXISTS 508 +#define L2TP_ERR_SESSION_ID_ALLOC_FAILURE 509 +#define L2TP_ERR_SESSION_LIMIT_EXCEEDED 510 +#define L2TP_ERR_SESSION_NOT_FOUND 511 +#define L2TP_ERR_SESSION_PROFILE_NOT_FOUND 512 +#define L2TP_ERR_SESSION_SPEC_MISSING 513 +#define L2TP_ERR_SESSION_TYPE_BAD 514 +#define L2TP_ERR_SESSION_TYPE_ILLEGAL_FOR_TUNNEL 515 +#define L2TP_ERR_TUNNEL_ADD_ADMIN_DISABLED 516 +#define L2TP_ERR_TUNNEL_CREATE_ADMIN_DISABLED 517 +#define L2TP_ERR_TUNNEL_ALREADY_EXISTS 518 +#define L2TP_ERR_TUNNEL_ID_ALLOC_FAILURE 519 +#define L2TP_ERR_TUNNEL_NOT_FOUND 520 +#define L2TP_ERR_TUNNEL_PROFILE_NOT_FOUND 521 +#define L2TP_ERR_TUNNEL_SPEC_MISSING 522 +#define L2TP_ERR_TUNNEL_TOO_MANY_SESSIONS 523 +#define L2TP_ERR_TUNNEL_TOO_MANY_SAME_IP 524 +#define L2TP_ERR_TUNNEL_LIMIT_EXCEEDED 525 +#define L2TP_ERR_SESSION_TYPE_NOT_SUPPORTED 526 +#define L2TP_ERR_TUNNEL_HIDE_AVPS_NEEDS_SECRET 527 +#define L2TP_ERR_MAX 528 + +struct optstring { + int valid; + union { + char *value; + } optstring_u; +}; +typedef struct optstring optstring; +#define OPTSTRING(_var) _var.optstring_u.value +#define OPTSTRING_PTR(_var) ((_var.valid == 1) ? _var.optstring_u.value : NULL) + +enum l2tp_api_tunnel_auth_mode { + L2TP_API_TUNNEL_AUTH_MODE_NONE = 0, + L2TP_API_TUNNEL_AUTH_MODE_SIMPLE = 1, + L2TP_API_TUNNEL_AUTH_MODE_CHALLENGE = 2, +}; +typedef enum l2tp_api_tunnel_auth_mode l2tp_api_tunnel_auth_mode; + +enum l2tp_api_tunnel_mode { + L2TP_API_TUNNEL_MODE_LACLNS = 0, + L2TP_API_TUNNEL_MODE_LAC = 1, + L2TP_API_TUNNEL_MODE_LNS = 2, +}; +typedef enum l2tp_api_tunnel_mode l2tp_api_tunnel_mode; + +struct l2tp_api_ip_addr { + uint32_t s_addr; +}; +typedef struct l2tp_api_ip_addr l2tp_api_ip_addr; +#define L2TP_API_APP_FEATURE_LOCAL_CONF_FILE 1 +#define L2TP_API_APP_FEATURE_LAC_SUPPORT 2 +#define L2TP_API_APP_FEATURE_LNS_SUPPORT 4 +#define L2TP_API_APP_FEATURE_RPC_MANAGEMENT 8 +#define L2TP_API_APP_FEATURE_LAIC_SUPPORT 16 +#define L2TP_API_APP_FEATURE_LAOC_SUPPORT 32 +#define L2TP_API_APP_FEATURE_LNIC_SUPPORT 64 +#define L2TP_API_APP_FEATURE_LNOC_SUPPORT 128 +#define L2TP_API_APP_FEATURE_LOCAL_STAT_FILE 256 + +struct l2tp_api_app_msg_data { + char *build_date; + char *build_time; + int major; + int minor; + uint32_t cookie; + struct { + u_int patches_len; + int *patches_val; + } patches; + uint32_t features; +}; +typedef struct l2tp_api_app_msg_data l2tp_api_app_msg_data; +#define L2TP_API_CONFIG_FLAG_TRACE_FLAGS 1 +#define L2TP_API_CONFIG_FLAG_MAX_TUNNELS 2 +#define L2TP_API_CONFIG_FLAG_DRAIN_TUNNELS 4 +#define L2TP_API_CONFIG_FLAG_MAX_SESSIONS 8 +#define L2TP_API_CONFIG_FLAG_TUNNEL_ESTABLISH_TIMEOUT 16 +#define L2TP_API_CONFIG_FLAG_SESSION_ESTABLISH_TIMEOUT 32 +#define L2TP_API_CONFIG_FLAG_DENY_LOCAL_TUNNEL_CREATES 64 +#define L2TP_API_CONFIG_FLAG_DENY_REMOTE_TUNNEL_CREATES 128 +#define L2TP_API_CONFIG_FLAG_RESET_STATISTICS 256 +#define L2TP_API_CONFIG_FLAG_TUNNEL_PERSIST_PEND_TIMEOUT 512 +#define L2TP_API_CONFIG_FLAG_SESSION_PERSIST_PEND_TIMEOUT 1024 + +struct l2tp_api_system_config { + uint32_t flags; + int udp_port; + uint32_t trace_flags; + uint32_t trace_flags_mask; + int max_tunnels; + int max_sessions; + int drain_tunnels; + int tunnel_establish_timeout; + int session_establish_timeout; + int tunnel_persist_pend_timeout; + int session_persist_pend_timeout; + bool_t deny_local_tunnel_creates; + bool_t deny_remote_tunnel_creates; +}; +typedef struct l2tp_api_system_config l2tp_api_system_config; + +struct l2tp_api_system_msg_stats { + uint32_t rx; + uint32_t tx; + uint32_t rx_bad; +}; +typedef struct l2tp_api_system_msg_stats l2tp_api_system_msg_stats; +#define L2TP_API_MSG_TYPE_COUNT 17 + +struct l2tp_api_system_stats { + uint32_t short_frames; + uint32_t wrong_version_frames; + uint32_t unexpected_data_frames; + uint32_t bad_rcvd_frames; + uint32_t total_rcvd_control_frames; + uint32_t total_sent_control_frames; + uint32_t total_control_frame_send_fails; + uint32_t total_retransmitted_control_frames; + uint32_t no_control_frame_resources; + uint32_t no_peer_resources; + uint32_t no_tunnel_resources; + uint32_t no_session_resources; + uint32_t no_ppp_resources; + uint32_t too_many_tunnels; + uint32_t too_many_sessions; + uint32_t auth_fails; + uint32_t no_matching_tunnel_id_discards; + uint32_t no_matching_session_id_discards; + uint32_t mismatched_tunnel_ids; + uint32_t mismatched_session_ids; + uint32_t encode_message_fails; + uint32_t tunnel_setup_failures; + uint32_t session_setup_failures; + uint32_t event_queue_full_errors; + uint32_t ignored_avps; + uint32_t vendor_avps; + uint32_t illegal_messages; + uint32_t unsupported_messages; + struct { + u_int messages_len; + struct l2tp_api_system_msg_stats *messages_val; + } messages; +}; +typedef struct l2tp_api_system_stats l2tp_api_system_stats; + +struct l2tp_api_system_status { + struct l2tp_api_system_stats stats; + uint32_t num_tunnels; + uint32_t num_sessions; +}; +typedef struct l2tp_api_system_status l2tp_api_system_status; + +struct l2tp_api_system_msg_data { + struct l2tp_api_system_config config; + struct l2tp_api_system_status status; +}; +typedef struct l2tp_api_system_msg_data l2tp_api_system_msg_data; + +struct l2tp_api_peer_msg_data { + int result_code; + struct l2tp_api_ip_addr peer_addr; + struct l2tp_api_ip_addr local_addr; + int num_tunnels; +}; +typedef struct l2tp_api_peer_msg_data l2tp_api_peer_msg_data; + +struct l2tp_api_peer_list_entry { + struct l2tp_api_ip_addr peer_addr; + struct l2tp_api_ip_addr local_addr; + struct l2tp_api_peer_list_entry *next; +}; +typedef struct l2tp_api_peer_list_entry l2tp_api_peer_list_entry; + +struct l2tp_api_peer_list_msg_data { + int result; + struct l2tp_api_peer_list_entry *peers; +}; +typedef struct l2tp_api_peer_list_msg_data l2tp_api_peer_list_msg_data; +#define L2TP_API_PEER_PROFILE_DEFAULT_PROFILE_NAME "default" +#define L2TP_API_PEER_PROFILE_FLAG_LACLNS 1 +#define L2TP_API_PEER_PROFILE_FLAG_TUNNEL_PROFILE_NAME 2 +#define L2TP_API_PEER_PROFILE_FLAG_SESSION_PROFILE_NAME 4 +#define L2TP_API_PEER_PROFILE_FLAG_PPP_PROFILE_NAME 8 +#define L2TP_API_PEER_PROFILE_FLAG_PEER_IPADDR 16 +#define L2TP_API_PEER_PROFILE_FLAG_PEER_PORT 32 +#define L2TP_API_PEER_PROFILE_FLAG_NETMASK 64 + +struct l2tp_api_peer_profile_msg_data { + uint32_t flags; + int result_code; + struct l2tp_api_ip_addr peer_addr; + uint16_t peer_port; + bool_t we_can_be_lac; + bool_t we_can_be_lns; + char *profile_name; + optstring default_tunnel_profile_name; + optstring default_session_profile_name; + optstring default_ppp_profile_name; + struct l2tp_api_ip_addr netmask; + int use_count; +}; +typedef struct l2tp_api_peer_profile_msg_data l2tp_api_peer_profile_msg_data; + +struct l2tp_api_peer_profile_list_entry { + char *profile_name; + struct l2tp_api_peer_profile_list_entry *next; +}; +typedef struct l2tp_api_peer_profile_list_entry l2tp_api_peer_profile_list_entry; + +struct l2tp_api_peer_profile_list_msg_data { + int result; + int num_profiles; + struct l2tp_api_peer_profile_list_entry *profiles; +}; +typedef struct l2tp_api_peer_profile_list_msg_data l2tp_api_peer_profile_list_msg_data; + +struct l2tp_api_peer_profile_unset_msg_data { + uint32_t flags; + int result_code; + char *profile_name; +}; +typedef struct l2tp_api_peer_profile_unset_msg_data l2tp_api_peer_profile_unset_msg_data; + +struct l2tp_api_tunnel_peer { + bool_t framing_cap_sync; + bool_t framing_cap_async; + bool_t bearer_cap_digital; + bool_t bearer_cap_analog; + uint8_t protocol_version_ver; + uint8_t protocol_version_rev; + uint16_t rx_window_size; + uint16_t firmware_revision; + optstring host_name; + optstring vendor_name; + struct { + u_int tiebreaker_len; + uint8_t *tiebreaker_val; + } tiebreaker; + uint16_t result_code_result; + uint16_t result_code_error; + optstring result_code_message; +}; +typedef struct l2tp_api_tunnel_peer l2tp_api_tunnel_peer; + +struct l2tp_api_tunnel_stats { + uint32_t retransmits; + uint32_t tx_zlbs; + uint32_t tx_zlb_fails; + uint32_t rx_zlbs; + uint32_t data_pkt_discards; + uint32_t duplicate_pkt_discards; + uint32_t rx_hellos; + uint32_t tx_hellos; + uint32_t tx_hello_fails; + uint16_t ns; + uint16_t nr; + uint16_t peer_ns; + uint16_t peer_nr; + uint16_t cwnd; + uint16_t ssthresh; + uint16_t congpkt_acc; + uint64_t control_rx_packets; + uint64_t control_rx_bytes; + uint64_t control_rx_oos_packets; + uint64_t control_rx_oos_discards; + uint64_t control_tx_packets; + uint64_t control_tx_bytes; + uint64_t data_rx_packets; + uint64_t data_rx_bytes; + uint64_t data_rx_errors; + uint64_t data_rx_oos_packets; + uint64_t data_rx_oos_discards; + uint64_t data_tx_packets; + uint64_t data_tx_bytes; + uint64_t data_tx_errors; + bool_t using_ipsec; +}; +typedef struct l2tp_api_tunnel_stats l2tp_api_tunnel_stats; +#define L2TP_API_TUNNEL_FLAG_HIDE_AVPS 1 +#define L2TP_API_TUNNEL_FLAG_OUR_ADDR 2 +#define L2TP_API_TUNNEL_FLAG_PEER_ADDR 4 +#define L2TP_API_TUNNEL_FLAG_CONFIG_ID 8 +#define L2TP_API_TUNNEL_FLAG_OUR_UDP_PORT 16 +#define L2TP_API_TUNNEL_FLAG_AUTH_MODE 32 +#define L2TP_API_TUNNEL_FLAG_FRAMING_CAP 64 +#define L2TP_API_TUNNEL_FLAG_BEARER_CAP 128 +#define L2TP_API_TUNNEL_FLAG_USE_TIEBREAKER 256 +#define L2TP_API_TUNNEL_FLAG_PERSIST 512 +#define L2TP_API_TUNNEL_FLAG_HELLO_TIMEOUT 1024 +#define L2TP_API_TUNNEL_FLAG_MAX_RETRIES 2048 +#define L2TP_API_TUNNEL_FLAG_RX_WINDOW_SIZE 4096 +#define L2TP_API_TUNNEL_FLAG_TX_WINDOW_SIZE 8192 +#define L2TP_API_TUNNEL_FLAG_RETRY_TIMEOUT 16384 +#define L2TP_API_TUNNEL_FLAG_IDLE_TIMEOUT 32768 +#define L2TP_API_TUNNEL_FLAG_PEER_UDP_PORT 65536 +#define L2TP_API_TUNNEL_FLAG_SECRET 131072 +#define L2TP_API_TUNNEL_FLAG_ALLOW_PPP_PROXY 262144 +#define L2TP_API_TUNNEL_FLAG_TRACE_FLAGS 524288 +#define L2TP_API_TUNNEL_FLAG_USE_UDP_CHECKSUMS 1048576 +#define L2TP_API_TUNNEL_FLAG_HOST_NAME 2097152 +#define L2TP_API_TUNNEL_FLAG_TUNNEL_ID 4194304 +#define L2TP_API_TUNNEL_FLAG_PROFILE_NAME 8388608 +#define L2TP_API_TUNNEL_FLAG_MAX_SESSIONS 16777216 +#define L2TP_API_TUNNEL_FLAG_TUNNEL_NAME 33554432 +#define L2TP_API_TUNNEL_FLAG_UNUSED_2 67108864 +#define L2TP_API_TUNNEL_FLAG_PEER_PROFILE_NAME 134217728 +#define L2TP_API_TUNNEL_FLAG_SESSION_PROFILE_NAME 268435456 +#define L2TP_API_TUNNEL_FLAG_PPP_PROFILE_NAME 536870912 +#define L2TP_API_TUNNEL_FLAG_DO_PMTU_DISCOVERY 1073741824 +#define L2TP_API_TUNNEL_FLAG_MTU 2147483648 +#define L2TP_API_TUNNEL_FLAG_INTERFACE_NAME 1 + +struct l2tp_api_tunnel_msg_data { + uint32_t flags; + uint32_t flags2; + uint16_t tunnel_id; + uint16_t peer_tunnel_id; + int result_code; + int hide_avps; + optstring tunnel_name; + struct l2tp_api_ip_addr our_addr; + struct l2tp_api_ip_addr peer_addr; + uint16_t our_udp_port; + uint16_t peer_udp_port; + int config_id; + enum l2tp_api_tunnel_auth_mode auth_mode; + bool_t framing_cap_sync; + bool_t framing_cap_async; + bool_t bearer_cap_digital; + bool_t bearer_cap_analog; + bool_t use_tiebreaker; + bool_t allow_ppp_proxy; + bool_t use_udp_checksums; + bool_t created_by_admin; + optstring create_time; + int max_sessions; + int num_sessions; + int use_count; + int num_establish_retries; + enum l2tp_api_tunnel_mode mode; + int hello_timeout; + int max_retries; + uint16_t rx_window_size; + uint16_t tx_window_size; + uint16_t actual_tx_window_size; + int retry_timeout; + int idle_timeout; + uint32_t trace_flags; + uint32_t trace_flags_mask; + bool_t do_pmtu_discovery; + bool_t persist; + int mtu; + optstring state; + optstring secret; + optstring host_name; + optstring tunnel_profile_name; + optstring peer_profile_name; + optstring session_profile_name; + optstring ppp_profile_name; + optstring interface_name; + struct { + u_int tiebreaker_len; + uint8_t *tiebreaker_val; + } tiebreaker; + uint16_t result_code_result; + uint16_t result_code_error; + optstring result_code_message; + struct l2tp_api_tunnel_peer peer; + struct l2tp_api_tunnel_stats stats; +}; +typedef struct l2tp_api_tunnel_msg_data l2tp_api_tunnel_msg_data; + +struct l2tp_api_tunnel_list_msg_data { + int result; + struct { + u_int tunnel_ids_len; + uint16_t *tunnel_ids_val; + } tunnel_ids; +}; +typedef struct l2tp_api_tunnel_list_msg_data l2tp_api_tunnel_list_msg_data; +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_PROFILE_NAME "default" +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_AUTH_MODE L2TP_API_TUNNEL_AUTH_MODE_NONE +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_FRAMING_CAP_SYNC 1 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_FRAMING_CAP_ASYNC 1 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_BEARER_CAP_DIGITAL 1 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_BEARER_CAP_ANALOG 1 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_USE_TIEBREAKER 0 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_HELLO_TIMEOUT 60 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_MAX_RETRIES 5 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_RX_WINDOW_SIZE 10 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_TX_WINDOW_SIZE 10 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_RETRY_TIMEOUT 1 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_IDLE_TIMEOUT 0 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_ZLB_TIMEOUT 5 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_TRACE_FLAGS 0 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_ALLOW_PPP_PROXY 0 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_USE_UDP_CHECKSUMS 1 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_DO_PMTU_DISCOVERY 0 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_MTU 1460 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_HIDE_AVPS 0 +#define L2TP_API_TUNNEL_PROFILE_DEFAULT_MAX_SESSIONS 0 +#define L2TP_API_TUNNEL_PROFILE_FLAG_HIDE_AVPS 1 +#define L2TP_API_TUNNEL_PROFILE_FLAG_AUTH_MODE 2 +#define L2TP_API_TUNNEL_PROFILE_FLAG_FRAMING_CAP 4 +#define L2TP_API_TUNNEL_PROFILE_FLAG_BEARER_CAP 8 +#define L2TP_API_TUNNEL_PROFILE_FLAG_USE_TIEBREAKER 16 +#define L2TP_API_TUNNEL_PROFILE_FLAG_UNUSED_1 32 +#define L2TP_API_TUNNEL_PROFILE_FLAG_HELLO_TIMEOUT 64 +#define L2TP_API_TUNNEL_PROFILE_FLAG_MAX_RETRIES 128 +#define L2TP_API_TUNNEL_PROFILE_FLAG_RX_WINDOW_SIZE 256 +#define L2TP_API_TUNNEL_PROFILE_FLAG_TX_WINDOW_SIZE 512 +#define L2TP_API_TUNNEL_PROFILE_FLAG_RETRY_TIMEOUT 1024 +#define L2TP_API_TUNNEL_PROFILE_FLAG_IDLE_TIMEOUT 2048 +#define L2TP_API_TUNNEL_PROFILE_FLAG_SECRET 4096 +#define L2TP_API_TUNNEL_PROFILE_FLAG_ALLOW_PPP_PROXY 8192 +#define L2TP_API_TUNNEL_PROFILE_FLAG_TRACE_FLAGS 16384 +#define L2TP_API_TUNNEL_PROFILE_FLAG_USE_UDP_CHECKSUMS 32768 +#define L2TP_API_TUNNEL_PROFILE_FLAG_HOST_NAME 65536 +#define L2TP_API_TUNNEL_PROFILE_FLAG_MAX_SESSIONS 131072 +#define L2TP_API_TUNNEL_PROFILE_FLAG_OUR_ADDR 262144 +#define L2TP_API_TUNNEL_PROFILE_FLAG_PEER_ADDR 524288 +#define L2TP_API_TUNNEL_PROFILE_FLAG_OUR_UDP_PORT 1048576 +#define L2TP_API_TUNNEL_PROFILE_FLAG_PEER_UDP_PORT 2097152 +#define L2TP_API_TUNNEL_PROFILE_FLAG_UNUSED_2 4194304 +#define L2TP_API_TUNNEL_PROFILE_FLAG_PEER_PROFILE_NAME 8388608 +#define L2TP_API_TUNNEL_PROFILE_FLAG_SESSION_PROFILE_NAME 16777216 +#define L2TP_API_TUNNEL_PROFILE_FLAG_PPP_PROFILE_NAME 33554432 +#define L2TP_API_TUNNEL_PROFILE_FLAG_DO_PMTU_DISCOVERY 67108864 +#define L2TP_API_TUNNEL_PROFILE_FLAG_MTU 134217728 + +struct l2tp_api_tunnel_profile_msg_data { + uint32_t flags; + char *profile_name; + int result_code; + int hide_avps; + enum l2tp_api_tunnel_auth_mode auth_mode; + bool_t framing_cap_sync; + bool_t framing_cap_async; + bool_t bearer_cap_digital; + bool_t bearer_cap_analog; + bool_t use_tiebreaker; + bool_t allow_ppp_proxy; + bool_t use_udp_checksums; + int hello_timeout; + int max_retries; + uint16_t rx_window_size; + uint16_t tx_window_size; + int retry_timeout; + int idle_timeout; + uint32_t trace_flags; + uint32_t trace_flags_mask; + int max_sessions; + struct l2tp_api_ip_addr our_addr; + struct l2tp_api_ip_addr peer_addr; + uint16_t our_udp_port; + uint16_t peer_udp_port; + bool_t do_pmtu_discovery; + int mtu; + optstring peer_profile_name; + optstring session_profile_name; + optstring ppp_profile_name; + optstring secret; + optstring host_name; +}; +typedef struct l2tp_api_tunnel_profile_msg_data l2tp_api_tunnel_profile_msg_data; + +struct l2tp_api_tunnel_profile_list_entry { + char *profile_name; + struct l2tp_api_tunnel_profile_list_entry *next; +}; +typedef struct l2tp_api_tunnel_profile_list_entry l2tp_api_tunnel_profile_list_entry; + +struct l2tp_api_tunnel_profile_list_msg_data { + int result; + int num_profiles; + struct l2tp_api_tunnel_profile_list_entry *profiles; +}; +typedef struct l2tp_api_tunnel_profile_list_msg_data l2tp_api_tunnel_profile_list_msg_data; + +struct l2tp_api_tunnel_profile_unset_msg_data { + uint32_t flags; + int result_code; + char *profile_name; +}; +typedef struct l2tp_api_tunnel_profile_unset_msg_data l2tp_api_tunnel_profile_unset_msg_data; +#define L2TP_API_SESSION_DEFAULT_SESSION_TYPE L2TP_API_SESSION_TYPE_UNSPECIFIED +#define L2TP_API_SESSION_FLAG_TRACE_FLAGS 1 +#define L2TP_API_SESSION_FLAG_SEQUENCING_REQUIRED 2 +#define L2TP_API_SESSION_FLAG_PPP_PROFILE_NAME 4 +#define L2TP_API_SESSION_FLAG_SESSION_TYPE 8 +#define L2TP_API_SESSION_FLAG_PRIV_GROUP_ID 16 +#define L2TP_API_SESSION_FLAG_FRAMING_TYPE 32 +#define L2TP_API_SESSION_FLAG_BEARER_TYPE 64 +#define L2TP_API_SESSION_FLAG_MINIMUM_BPS 128 +#define L2TP_API_SESSION_FLAG_MAXIMUM_BPS 256 +#define L2TP_API_SESSION_FLAG_CONNECT_SPEED 512 +#define L2TP_API_SESSION_FLAG_USE_PPP_PROXY 1024 +#define L2TP_API_SESSION_FLAG_PROXY_AUTH_TYPE 8192 +#define L2TP_API_SESSION_FLAG_PROXY_AUTH_NAME 16384 +#define L2TP_API_SESSION_FLAG_PROXY_AUTH_CHALLENGE 32768 +#define L2TP_API_SESSION_FLAG_PROXY_AUTH_RESPONSE 65536 +#define L2TP_API_SESSION_FLAG_CALLING_NUMBER 131072 +#define L2TP_API_SESSION_FLAG_CALLED_NUMBER 262144 +#define L2TP_API_SESSION_FLAG_SUB_ADDRESS 524288 +#define L2TP_API_SESSION_FLAG_INITIAL_RCVD_LCP_CONFREQ 1048576 +#define L2TP_API_SESSION_FLAG_LAST_SENT_LCP_CONFREQ 2097152 +#define L2TP_API_SESSION_FLAG_LAST_RCVD_LCP_CONFREQ 4194304 +#define L2TP_API_SESSION_FLAG_USER_NAME 8388608 +#define L2TP_API_SESSION_FLAG_USER_PASSWORD 16777216 +#define L2TP_API_SESSION_FLAG_USE_SEQUENCE_NUMBERS 33554432 +#define L2TP_API_SESSION_FLAG_REORDER_TIMEOUT 67108864 +#define L2TP_API_SESSION_FLAG_TUNNEL_NAME 134217728 +#define L2TP_API_SESSION_FLAG_SESSION_NAME 268435456 +#define L2TP_API_SESSION_FLAG_INTERFACE_NAME 536870912 +#define L2TP_API_SESSION_FLAG_PROFILE_NAME 1073741824 +#define L2TP_API_SESSION_FLAG_NO_PPP 2147483648 + +enum l2tp_api_session_proxy_auth_type { + L2TP_API_SESSION_PROXY_AUTH_TYPE_RESERVED = 0, + L2TP_API_SESSION_PROXY_AUTH_TYPE_PLAIN_TEXT = 1, + L2TP_API_SESSION_PROXY_AUTH_TYPE_PPP_CHAP = 2, + L2TP_API_SESSION_PROXY_AUTH_TYPE_PPP_PAP = 3, + L2TP_API_SESSION_PROXY_AUTH_TYPE_NO_AUTH = 4, + L2TP_API_SESSION_PROXY_AUTH_TYPE_PPP_MSCHAPV1 = 5, +}; +typedef enum l2tp_api_session_proxy_auth_type l2tp_api_session_proxy_auth_type; + +struct l2tp_api_session_call_errors { + uint32_t crc_errors; + uint32_t framing_errors; + uint32_t hardware_overruns; + uint32_t buffer_overruns; + uint32_t timeout_errors; + uint32_t alignment_errors; +}; +typedef struct l2tp_api_session_call_errors l2tp_api_session_call_errors; + +struct l2tp_api_session_stats { + uint64_t data_rx_packets; + uint64_t data_rx_bytes; + uint64_t data_rx_errors; + uint64_t data_rx_oos_packets; + uint64_t data_rx_oos_discards; + uint64_t data_tx_packets; + uint64_t data_tx_bytes; + uint64_t data_tx_errors; +}; +typedef struct l2tp_api_session_stats l2tp_api_session_stats; + +struct l2tp_api_session_peer_info { + uint16_t result_code; + uint16_t error_code; + optstring error_message; + uint32_t minimum_bps; + uint32_t maximum_bps; + uint32_t connect_speed; + uint32_t rx_connect_speed; + enum l2tp_api_session_proxy_auth_type proxy_auth_type; + uint8_t proxy_auth_id; + optstring proxy_auth_name; + struct { + u_int proxy_auth_challenge_len; + uint8_t *proxy_auth_challenge_val; + } proxy_auth_challenge; + struct { + u_int proxy_auth_response_len; + uint8_t *proxy_auth_response_val; + } proxy_auth_response; + optstring private_group_id; + bool_t framing_type_sync; + bool_t framing_type_async; + bool_t bearer_type_digital; + bool_t bearer_type_analog; + bool_t sequencing_required; + uint32_t call_serial_number; + uint32_t physical_channel_id; + struct { + u_int initial_rcvd_lcp_confreq_len; + uint8_t *initial_rcvd_lcp_confreq_val; + } initial_rcvd_lcp_confreq; + struct { + u_int last_sent_lcp_confreq_len; + uint8_t *last_sent_lcp_confreq_val; + } last_sent_lcp_confreq; + struct { + u_int last_rcvd_lcp_confreq_len; + uint8_t *last_rcvd_lcp_confreq_val; + } last_rcvd_lcp_confreq; + optstring calling_number; + optstring called_number; + optstring sub_address; + uint16_t q931_cause_code; + uint16_t q931_cause_msg; + optstring q931_advisory_msg; + struct l2tp_api_session_call_errors call_errors; + uint32_t send_accm; + uint32_t recv_accm; +}; +typedef struct l2tp_api_session_peer_info l2tp_api_session_peer_info; + +enum l2tp_api_session_type { + L2TP_API_SESSION_TYPE_UNSPECIFIED = 0, + L2TP_API_SESSION_TYPE_LAIC = 1, + L2TP_API_SESSION_TYPE_LAOC = 2, + L2TP_API_SESSION_TYPE_LNIC = 3, + L2TP_API_SESSION_TYPE_LNOC = 4, +}; +typedef enum l2tp_api_session_type l2tp_api_session_type; + +struct l2tp_api_session_msg_data { + uint32_t flags; + uint16_t tunnel_id; + uint16_t session_id; + int result_code; + optstring tunnel_name; + uint16_t peer_session_id; + optstring state; + optstring session_name; + optstring interface_name; + enum l2tp_api_session_type session_type; + optstring user_name; + optstring user_password; + optstring priv_group_id; + optstring profile_name; + bool_t created_by_admin; + optstring create_time; + bool_t no_ppp; + bool_t sequencing_required; + bool_t use_sequence_numbers; + int reorder_timeout; + bool_t framing_type_sync; + bool_t framing_type_async; + bool_t bearer_type_digital; + bool_t bearer_type_analog; + uint32_t call_serial_number; + uint32_t physical_channel_id; + uint32_t trace_flags; + uint32_t trace_flags_mask; + int minimum_bps; + int maximum_bps; + int tx_connect_speed; + int rx_connect_speed; + struct l2tp_api_session_peer_info peer; + optstring ppp_profile_name; + struct l2tp_api_session_stats stats; + bool_t use_ppp_proxy; + enum l2tp_api_session_proxy_auth_type proxy_auth_type; + optstring proxy_auth_name; + struct { + u_int proxy_auth_challenge_len; + uint8_t *proxy_auth_challenge_val; + } proxy_auth_challenge; + struct { + u_int proxy_auth_response_len; + uint8_t *proxy_auth_response_val; + } proxy_auth_response; + optstring calling_number; + optstring called_number; + optstring sub_address; + struct { + u_int initial_rcvd_lcp_confreq_len; + uint8_t *initial_rcvd_lcp_confreq_val; + } initial_rcvd_lcp_confreq; + struct { + u_int last_sent_lcp_confreq_len; + uint8_t *last_sent_lcp_confreq_val; + } last_sent_lcp_confreq; + struct { + u_int last_rcvd_lcp_confreq_len; + uint8_t *last_rcvd_lcp_confreq_val; + } last_rcvd_lcp_confreq; +}; +typedef struct l2tp_api_session_msg_data l2tp_api_session_msg_data; + +struct l2tp_api_session_list_msg_data { + int result; + struct { + u_int session_ids_len; + uint16_t *session_ids_val; + } session_ids; +}; +typedef struct l2tp_api_session_list_msg_data l2tp_api_session_list_msg_data; + +struct l2tp_api_session_incall_msg_data { + int ppp_unit; + char *tunnel_profile_name; + struct l2tp_api_session_msg_data session; +}; +typedef struct l2tp_api_session_incall_msg_data l2tp_api_session_incall_msg_data; +#define L2TP_API_SESSION_PROFILE_DEFAULT_PROFILE_NAME "default" +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_TRACE_FLAGS 0 +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_SEQUENCING_REQUIRED 0 +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_TYPE L2TP_API_SESSION_TYPE_UNSPECIFIED +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_FRAMING_TYPE_SYNC 1 +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_FRAMING_TYPE_ASYNC 1 +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_BEARER_TYPE_ANALOG 1 +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_BEARER_TYPE_DIGITAL 1 +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_MINIMUM_BPS 0 +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_MAXIMUM_BPS 0 +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_TX_CONNECT_SPEED 1000000 +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_RX_CONNECT_SPEED 0 +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_USE_PPP_PROXY FALSE +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_USE_SEQUENCE_NUMBERS FALSE +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_REORDER_TIMEOUT 0 +#define L2TP_API_SESSION_PROFILE_DEFAULT_SESSION_NO_PPP FALSE +#define L2TP_API_SESSION_PROFILE_FLAG_TRACE_FLAGS 1 +#define L2TP_API_SESSION_PROFILE_FLAG_SEQUENCING_REQUIRED 2 +#define L2TP_API_SESSION_PROFILE_FLAG_PPP_PROFILE_NAME 4 +#define L2TP_API_SESSION_PROFILE_FLAG_SESSION_TYPE 8 +#define L2TP_API_SESSION_PROFILE_FLAG_PRIV_GROUP_ID 16 +#define L2TP_API_SESSION_PROFILE_FLAG_FRAMING_TYPE 32 +#define L2TP_API_SESSION_PROFILE_FLAG_BEARER_TYPE 64 +#define L2TP_API_SESSION_PROFILE_FLAG_MINIMUM_BPS 128 +#define L2TP_API_SESSION_PROFILE_FLAG_MAXIMUM_BPS 256 +#define L2TP_API_SESSION_PROFILE_FLAG_CONNECT_SPEED 512 +#define L2TP_API_SESSION_PROFILE_FLAG_USE_PPP_PROXY 1024 +#define L2TP_API_SESSION_PROFILE_FLAG_USE_SEQUENCE_NUMBERS 2048 +#define L2TP_API_SESSION_PROFILE_FLAG_REORDER_TIMEOUT 4096 +#define L2TP_API_SESSION_PROFILE_FLAG_NO_PPP 8192 + +struct l2tp_api_session_profile_msg_data { + uint32_t flags; + int result_code; + char *profile_name; + bool_t sequencing_required; + bool_t use_sequence_numbers; + bool_t no_ppp; + int reorder_timeout; + bool_t do_pmtu_discovery; + int mtu; + int mru; + uint32_t trace_flags; + uint32_t trace_flags_mask; + optstring ppp_profile_name; + enum l2tp_api_session_type session_type; + optstring priv_group_id; + bool_t framing_type_sync; + bool_t framing_type_async; + bool_t bearer_type_digital; + bool_t bearer_type_analog; + int minimum_bps; + int maximum_bps; + int tx_connect_speed; + int rx_connect_speed; + bool_t use_ppp_proxy; +}; +typedef struct l2tp_api_session_profile_msg_data l2tp_api_session_profile_msg_data; + +struct l2tp_api_session_profile_list_entry { + char *profile_name; + struct l2tp_api_session_profile_list_entry *next; +}; +typedef struct l2tp_api_session_profile_list_entry l2tp_api_session_profile_list_entry; + +struct l2tp_api_session_profile_list_msg_data { + int result; + int num_profiles; + struct l2tp_api_session_profile_list_entry *profiles; +}; +typedef struct l2tp_api_session_profile_list_msg_data l2tp_api_session_profile_list_msg_data; + +struct l2tp_api_session_profile_unset_msg_data { + uint32_t flags; + int result_code; + char *profile_name; +}; +typedef struct l2tp_api_session_profile_unset_msg_data l2tp_api_session_profile_unset_msg_data; +#define L2TP_API_PPP_PROFILE_FLAG_TRACE_FLAGS 1 +#define L2TP_API_PPP_PROFILE_FLAG_ASYNCMAP 2 +#define L2TP_API_PPP_PROFILE_FLAG_MRU 4 +#define L2TP_API_PPP_PROFILE_FLAG_MTU 8 +#define L2TP_API_PPP_PROFILE_FLAG_USE_RADIUS 32 +#define L2TP_API_PPP_PROFILE_FLAG_RADIUS_HINT 64 +#define L2TP_API_PPP_PROFILE_FLAG_SYNC_MODE 256 +#define L2TP_API_PPP_PROFILE_FLAG_CHAP_INTERVAL 512 +#define L2TP_API_PPP_PROFILE_FLAG_CHAP_MAX_CHALLENGE 1024 +#define L2TP_API_PPP_PROFILE_FLAG_CHAP_RESTART 2048 +#define L2TP_API_PPP_PROFILE_FLAG_PAP_MAX_AUTH_REQUESTS 4096 +#define L2TP_API_PPP_PROFILE_FLAG_PAP_RESTART_INTERVAL 8192 +#define L2TP_API_PPP_PROFILE_FLAG_PAP_TIMEOUT 16384 +#define L2TP_API_PPP_PROFILE_FLAG_IDLE_TIMEOUT 32768 +#define L2TP_API_PPP_PROFILE_FLAG_IPCP_MAX_CONFIG_REQUESTS 65536 +#define L2TP_API_PPP_PROFILE_FLAG_IPCP_MAX_CONFIG_NAKS 131072 +#define L2TP_API_PPP_PROFILE_FLAG_IPCP_MAX_TERMINATE_REQUESTS 262144 +#define L2TP_API_PPP_PROFILE_FLAG_IPCP_RETRANSMIT_INTERVAL 524288 +#define L2TP_API_PPP_PROFILE_FLAG_LCP_ECHO_FAILURE_COUNT 1048576 +#define L2TP_API_PPP_PROFILE_FLAG_LCP_ECHO_INTERVAL 2097152 +#define L2TP_API_PPP_PROFILE_FLAG_LCP_MAX_CONFIG_REQUESTS 4194304 +#define L2TP_API_PPP_PROFILE_FLAG_LCP_MAX_CONFIG_NAKS 8388608 +#define L2TP_API_PPP_PROFILE_FLAG_LCP_MAX_TERMINATE_REQUESTS 16777216 +#define L2TP_API_PPP_PROFILE_FLAG_LCP_RETRANSMIT_INTERVAL 33554432 +#define L2TP_API_PPP_PROFILE_FLAG_MAX_CONNECT_TIME 67108864 +#define L2TP_API_PPP_PROFILE_FLAG_MAX_FAILURE_COUNT 134217728 +#define L2TP_API_PPP_PROFILE_FLAG_DNS_ADDR_1 1 +#define L2TP_API_PPP_PROFILE_FLAG_DNS_ADDR_2 2 +#define L2TP_API_PPP_PROFILE_FLAG_WINS_ADDR_1 4 +#define L2TP_API_PPP_PROFILE_FLAG_WINS_ADDR_2 8 +#define L2TP_API_PPP_PROFILE_FLAG_LOCAL_IP_ADDR 16 +#define L2TP_API_PPP_PROFILE_FLAG_PEER_IP_ADDR 32 +#define L2TP_API_PPP_PROFILE_FLAG_IP_POOL_NAME 64 +#define L2TP_API_PPP_PROFILE_FLAG_USE_AS_DEFAULT_ROUTE 128 +#define L2TP_API_PPP_PROFILE_FLAG_MULTILINK 256 +#define L2TP_API_PPP_PROFILE_FLAG_LOCAL_NAME 512 +#define L2TP_API_PPP_PROFILE_FLAG_REMOTE_NAME 1024 +#define L2TP_API_PPP_PROFILE_FLAG_PROXY_ARP 2048 +#define L2TP_API_PPP_PROFILE_FLAG_AUTH_NONE 4096 +#define L2TP_API_PPP_PROFILE_FLAG_AUTH_REFUSE_EAP 8192 +#define L2TP_API_PPP_PROFILE_FLAG_AUTH_REFUSE_MSCHAPV2 16384 +#define L2TP_API_PPP_PROFILE_FLAG_AUTH_REFUSE_MSCHAP 32768 +#define L2TP_API_PPP_PROFILE_FLAG_AUTH_REFUSE_CHAP 65536 +#define L2TP_API_PPP_PROFILE_FLAG_AUTH_REFUSE_PAP 131072 +#define L2TP_API_PPP_PROFILE_FLAG_AUTH_PEER 262144 +#define L2TP_API_PPP_PROFILE_DEFAULT_PROFILE_NAME "default" +#define L2TP_API_PPP_PROFILE_DEFAULT_TRACE_FLAGS 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_ASYNCMAP 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_MRU 1500 +#define L2TP_API_PPP_PROFILE_DEFAULT_MTU 1500 +#define L2TP_API_PPP_PROFILE_DEFAULT_AUTH_NONE 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_AUTH_PEER 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_AUTH_REFUSE_PAP 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_AUTH_REFUSE_CHAP 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_AUTH_REFUSE_MSCHAP 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_AUTH_REFUSE_MSCHAPV2 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_AUTH_REFUSE_EAP 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_SYNC_MODE L2TP_API_PPP_SYNCMODE_SYNC_ASYNC +#define L2TP_API_PPP_PROFILE_DEFAULT_CHAP_INTERVAL 10 +#define L2TP_API_PPP_PROFILE_DEFAULT_CHAP_MAX_CHALLENGE 10 +#define L2TP_API_PPP_PROFILE_DEFAULT_CHAP_RESTART 3 +#define L2TP_API_PPP_PROFILE_DEFAULT_PAP_MAX_AUTH_REQUESTS 10 +#define L2TP_API_PPP_PROFILE_DEFAULT_PAP_RESTART_INTERVAL 3 +#define L2TP_API_PPP_PROFILE_DEFAULT_PAP_TIMEOUT 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_IDLE_TIMEOUT 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_IPCP_MAX_CONFIG_REQUESTS 10 +#define L2TP_API_PPP_PROFILE_DEFAULT_IPCP_MAX_CONFIG_NAKS 10 +#define L2TP_API_PPP_PROFILE_DEFAULT_IPCP_MAX_TERMINATE_REQUESTS 3 +#define L2TP_API_PPP_PROFILE_DEFAULT_IPCP_RETRANSMIT_INTERVAL 3 +#define L2TP_API_PPP_PROFILE_DEFAULT_LCP_ECHO_FAILURE_COUNT 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_LCP_ECHO_INTERVAL 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_LCP_MAX_CONFIG_REQUESTS 10 +#define L2TP_API_PPP_PROFILE_DEFAULT_LCP_MAX_CONFIG_NAKS 10 +#define L2TP_API_PPP_PROFILE_DEFAULT_LCP_MAX_TERMINATE_REQUESTS 3 +#define L2TP_API_PPP_PROFILE_DEFAULT_LCP_RETRANSMIT_INTERVAL 3 +#define L2TP_API_PPP_PROFILE_DEFAULT_MAX_CONNECT_TIME 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_MAX_FAILURE_COUNT 10 +#define L2TP_API_PPP_PROFILE_DEFAULT_LOCAL_IP_ADDR 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_PEER_IP_ADDR 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_DNS_ADDR_1 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_DNS_ADDR_2 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_WINS_ADDR_1 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_WINS_ADDR_2 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_USE_RADIUS 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_RADIUS_HINT "" +#define L2TP_API_PPP_PROFILE_DEFAULT_USE_AS_DEFAULT_ROUTE 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_MULTILINK 0 +#define L2TP_API_PPP_PROFILE_DEFAULT_PROXY_ARP 0 + +enum l2tp_api_ppp_sync_mode { + L2TP_API_PPP_SYNCMODE_SYNC_ASYNC = 0, + L2TP_API_PPP_SYNCMODE_SYNC = 1, + L2TP_API_PPP_SYNCMODE_ASYNC = 2, +}; +typedef enum l2tp_api_ppp_sync_mode l2tp_api_ppp_sync_mode; + +struct l2tp_api_ppp_profile_msg_data { + uint32_t flags; + uint32_t flags2; + int result_code; + uint32_t trace_flags; + uint32_t trace_flags_mask; + char *profile_name; + uint32_t asyncmap; + uint16_t mru; + uint16_t mtu; + bool_t auth_none; + bool_t auth_peer; + bool_t auth_refuse_pap; + bool_t auth_refuse_chap; + bool_t auth_refuse_mschap; + bool_t auth_refuse_mschapv2; + bool_t auth_refuse_eap; + enum l2tp_api_ppp_sync_mode sync_mode; + int chap_interval; + int chap_max_challenge; + int chap_restart; + int pap_max_auth_requests; + int pap_restart_interval; + int pap_timeout; + int idle_timeout; + int ipcp_max_config_requests; + int ipcp_max_config_naks; + int ipcp_max_terminate_requests; + int ipcp_retransmit_interval; + int lcp_echo_failure_count; + int lcp_echo_interval; + int lcp_max_config_requests; + int lcp_max_config_naks; + int lcp_max_terminate_requests; + int lcp_retransmit_interval; + int max_connect_time; + int max_failure_count; + struct l2tp_api_ip_addr local_ip_addr; + struct l2tp_api_ip_addr peer_ip_addr; + struct l2tp_api_ip_addr dns_addr_1; + struct l2tp_api_ip_addr dns_addr_2; + struct l2tp_api_ip_addr wins_addr_1; + struct l2tp_api_ip_addr wins_addr_2; + optstring ip_pool_name; + bool_t use_radius; + optstring radius_hint; + bool_t use_as_default_route; + bool_t multilink; + optstring local_name; + optstring remote_name; + bool_t proxy_arp; +}; +typedef struct l2tp_api_ppp_profile_msg_data l2tp_api_ppp_profile_msg_data; + +struct l2tp_api_ppp_profile_list_entry { + char *profile_name; + struct l2tp_api_ppp_profile_list_entry *next; +}; +typedef struct l2tp_api_ppp_profile_list_entry l2tp_api_ppp_profile_list_entry; + +struct l2tp_api_ppp_profile_list_msg_data { + int result; + int num_profiles; + struct l2tp_api_ppp_profile_list_entry *profiles; +}; +typedef struct l2tp_api_ppp_profile_list_msg_data l2tp_api_ppp_profile_list_msg_data; + +struct l2tp_api_ppp_profile_unset_msg_data { + uint32_t flags; + uint32_t flags2; + int result_code; + char *profile_name; +}; +typedef struct l2tp_api_ppp_profile_unset_msg_data l2tp_api_ppp_profile_unset_msg_data; + +struct l2tp_api_user_list_entry { + char *user_name; + char *create_time; + bool_t created_by_admin; + uint16_t tunnel_id; + uint16_t session_id; + struct l2tp_api_user_list_entry *next; +}; +typedef struct l2tp_api_user_list_entry l2tp_api_user_list_entry; + +struct l2tp_api_user_list_msg_data { + int result; + int num_users; + struct l2tp_api_user_list_entry *users; +}; +typedef struct l2tp_api_user_list_msg_data l2tp_api_user_list_msg_data; +#define L2TP_API_TEST_FLAG_FAKE_RX_DROP 1 +#define L2TP_API_TEST_FLAG_FAKE_TX_DROP 2 +#define L2TP_API_TEST_FLAG_FAKE_TRIGGER_TYPE 4 +#define L2TP_API_TEST_FLAG_CLEAR_FAKE_TRIGGER 8 +#define L2TP_API_TEST_FLAG_HOLD_TUNNELS 16 +#define L2TP_API_TEST_FLAG_HOLD_SESSIONS 32 +#define L2TP_API_TEST_FLAG_NO_RANDOM_IDS 64 +#define L2TP_API_TEST_FLAG_RESET_IDS 128 +#define L2TP_API_TEST_FLAG_DO_TRANSPORT_TEST 256 +#define L2TP_API_TEST_FLAG_TUNNEL_ID 512 +#define L2TP_API_TEST_FLAG_SESSION_ID 1024 +#define L2TP_API_TEST_FLAG_DEFAULT_CONFIG 2048 +#define L2TP_API_TEST_FLAG_SHOW_PROFILE_USAGE 4096 + +enum l2tp_api_test_trigger_type { + L2TP_API_TEST_FAKE_TRIGGER_OFF = 0, + L2TP_API_TEST_FAKE_TRIGGER_ON = 1, + L2TP_API_TEST_FAKE_TRIGGER_ONCE = 2, + L2TP_API_TEST_FAKE_TRIGGER_LOW = 3, + L2TP_API_TEST_FAKE_TRIGGER_MEDIUM = 4, + L2TP_API_TEST_FAKE_TRIGGER_HIGH = 5, +}; +typedef enum l2tp_api_test_trigger_type l2tp_api_test_trigger_type; + +struct l2tp_api_test_msg_data { + uint32_t flags; + bool_t fake_rx_drop; + bool_t fake_tx_drop; + bool_t fake_trigger_fired; + bool_t hold_tunnels; + bool_t hold_sessions; + bool_t no_random_ids; + bool_t show_profile_usage; + int num_rx_drops; + int num_tx_drops; + enum l2tp_api_test_trigger_type fake_trigger_type; + uint16_t tunnel_id; + uint16_t session_id; + int num_tunnel_id_hash_hits; + int num_tunnel_id_hash_misses; + int num_tunnel_name_hash_hits; + int num_tunnel_name_hash_misses; + int num_session_id_hash_hits; + int num_session_id_hash_misses; +}; +typedef struct l2tp_api_test_msg_data l2tp_api_test_msg_data; + +struct l2tp_tunnel_delete_1_argument { + uint16_t tunnel_id; + optstring tunnel_name; + optstring reason; +}; +typedef struct l2tp_tunnel_delete_1_argument l2tp_tunnel_delete_1_argument; + +struct l2tp_tunnel_get_1_argument { + uint16_t tunnel_id; + optstring tunnel_name; +}; +typedef struct l2tp_tunnel_get_1_argument l2tp_tunnel_get_1_argument; + +struct l2tp_session_delete_1_argument { + uint16_t tunnel_id; + optstring tunnel_name; + uint16_t session_id; + optstring session_name; + optstring reason; +}; +typedef struct l2tp_session_delete_1_argument l2tp_session_delete_1_argument; + +struct l2tp_session_get_1_argument { + uint16_t tunnel_id; + optstring tunnel_name; + uint16_t session_id; + optstring session_name; +}; +typedef struct l2tp_session_get_1_argument l2tp_session_get_1_argument; + +struct l2tp_session_list_1_argument { + uint16_t tunnel_id; + optstring tunnel_name; +}; +typedef struct l2tp_session_list_1_argument l2tp_session_list_1_argument; + +struct l2tp_peer_get_1_argument { + struct l2tp_api_ip_addr local_addr; + struct l2tp_api_ip_addr peer_addr; +}; +typedef struct l2tp_peer_get_1_argument l2tp_peer_get_1_argument; + +#define L2TP_PROG 300773 +#define L2TP_VERSION 1 + +#if defined(__STDC__) || defined(__cplusplus) +#define L2TP_APP_INFO_GET 1 +extern enum clnt_stat l2tp_app_info_get_1(struct l2tp_api_app_msg_data *, CLIENT *); +extern bool_t l2tp_app_info_get_1_svc(struct l2tp_api_app_msg_data *, struct svc_req *); +#define L2TP_SYSTEM_MODIFY 2 +extern enum clnt_stat l2tp_system_modify_1(struct l2tp_api_system_msg_data , int *, CLIENT *); +extern bool_t l2tp_system_modify_1_svc(struct l2tp_api_system_msg_data , int *, struct svc_req *); +#define L2TP_SYSTEM_GET 3 +extern enum clnt_stat l2tp_system_get_1(struct l2tp_api_system_msg_data *, CLIENT *); +extern bool_t l2tp_system_get_1_svc(struct l2tp_api_system_msg_data *, struct svc_req *); +#define L2TP_PEER_PROFILE_CREATE 4 +extern enum clnt_stat l2tp_peer_profile_create_1(struct l2tp_api_peer_profile_msg_data , int *, CLIENT *); +extern bool_t l2tp_peer_profile_create_1_svc(struct l2tp_api_peer_profile_msg_data , int *, struct svc_req *); +#define L2TP_PEER_PROFILE_DELETE 5 +extern enum clnt_stat l2tp_peer_profile_delete_1(char *, int *, CLIENT *); +extern bool_t l2tp_peer_profile_delete_1_svc(char *, int *, struct svc_req *); +#define L2TP_PEER_PROFILE_MODIFY 6 +extern enum clnt_stat l2tp_peer_profile_modify_1(struct l2tp_api_peer_profile_msg_data , int *, CLIENT *); +extern bool_t l2tp_peer_profile_modify_1_svc(struct l2tp_api_peer_profile_msg_data , int *, struct svc_req *); +#define L2TP_PEER_PROFILE_GET 7 +extern enum clnt_stat l2tp_peer_profile_get_1(char *, struct l2tp_api_peer_profile_msg_data *, CLIENT *); +extern bool_t l2tp_peer_profile_get_1_svc(char *, struct l2tp_api_peer_profile_msg_data *, struct svc_req *); +#define L2TP_PEER_PROFILE_LIST 8 +extern enum clnt_stat l2tp_peer_profile_list_1(struct l2tp_api_peer_profile_list_msg_data *, CLIENT *); +extern bool_t l2tp_peer_profile_list_1_svc(struct l2tp_api_peer_profile_list_msg_data *, struct svc_req *); +#define L2TP_TUNNEL_CREATE 9 +extern enum clnt_stat l2tp_tunnel_create_1(struct l2tp_api_tunnel_msg_data , int *, CLIENT *); +extern bool_t l2tp_tunnel_create_1_svc(struct l2tp_api_tunnel_msg_data , int *, struct svc_req *); +#define L2TP_TUNNEL_DELETE 10 +extern enum clnt_stat l2tp_tunnel_delete_1(uint16_t , optstring , optstring , int *, CLIENT *); +extern bool_t l2tp_tunnel_delete_1_svc(uint16_t , optstring , optstring , int *, struct svc_req *); +#define L2TP_TUNNEL_MODIFY 11 +extern enum clnt_stat l2tp_tunnel_modify_1(struct l2tp_api_tunnel_msg_data , int *, CLIENT *); +extern bool_t l2tp_tunnel_modify_1_svc(struct l2tp_api_tunnel_msg_data , int *, struct svc_req *); +#define L2TP_TUNNEL_GET 12 +extern enum clnt_stat l2tp_tunnel_get_1(uint16_t , optstring , struct l2tp_api_tunnel_msg_data *, CLIENT *); +extern bool_t l2tp_tunnel_get_1_svc(uint16_t , optstring , struct l2tp_api_tunnel_msg_data *, struct svc_req *); +#define L2TP_TUNNEL_LIST 13 +extern enum clnt_stat l2tp_tunnel_list_1(struct l2tp_api_tunnel_list_msg_data *, CLIENT *); +extern bool_t l2tp_tunnel_list_1_svc(struct l2tp_api_tunnel_list_msg_data *, struct svc_req *); +#define L2TP_TUNNEL_PROFILE_CREATE 14 +extern enum clnt_stat l2tp_tunnel_profile_create_1(struct l2tp_api_tunnel_profile_msg_data , int *, CLIENT *); +extern bool_t l2tp_tunnel_profile_create_1_svc(struct l2tp_api_tunnel_profile_msg_data , int *, struct svc_req *); +#define L2TP_TUNNEL_PROFILE_DELETE 15 +extern enum clnt_stat l2tp_tunnel_profile_delete_1(char *, int *, CLIENT *); +extern bool_t l2tp_tunnel_profile_delete_1_svc(char *, int *, struct svc_req *); +#define L2TP_TUNNEL_PROFILE_MODIFY 16 +extern enum clnt_stat l2tp_tunnel_profile_modify_1(struct l2tp_api_tunnel_profile_msg_data , int *, CLIENT *); +extern bool_t l2tp_tunnel_profile_modify_1_svc(struct l2tp_api_tunnel_profile_msg_data , int *, struct svc_req *); +#define L2TP_TUNNEL_PROFILE_GET 17 +extern enum clnt_stat l2tp_tunnel_profile_get_1(char *, struct l2tp_api_tunnel_profile_msg_data *, CLIENT *); +extern bool_t l2tp_tunnel_profile_get_1_svc(char *, struct l2tp_api_tunnel_profile_msg_data *, struct svc_req *); +#define L2TP_TUNNEL_PROFILE_LIST 18 +extern enum clnt_stat l2tp_tunnel_profile_list_1(struct l2tp_api_tunnel_profile_list_msg_data *, CLIENT *); +extern bool_t l2tp_tunnel_profile_list_1_svc(struct l2tp_api_tunnel_profile_list_msg_data *, struct svc_req *); +#define L2TP_SESSION_CREATE 19 +extern enum clnt_stat l2tp_session_create_1(struct l2tp_api_session_msg_data , int *, CLIENT *); +extern bool_t l2tp_session_create_1_svc(struct l2tp_api_session_msg_data , int *, struct svc_req *); +#define L2TP_SESSION_DELETE 20 +extern enum clnt_stat l2tp_session_delete_1(uint16_t , optstring , uint16_t , optstring , optstring , int *, CLIENT *); +extern bool_t l2tp_session_delete_1_svc(uint16_t , optstring , uint16_t , optstring , optstring , int *, struct svc_req *); +#define L2TP_SESSION_MODIFY 21 +extern enum clnt_stat l2tp_session_modify_1(struct l2tp_api_session_msg_data , int *, CLIENT *); +extern bool_t l2tp_session_modify_1_svc(struct l2tp_api_session_msg_data , int *, struct svc_req *); +#define L2TP_SESSION_GET 22 +extern enum clnt_stat l2tp_session_get_1(uint16_t , optstring , uint16_t , optstring , struct l2tp_api_session_msg_data *, CLIENT *); +extern bool_t l2tp_session_get_1_svc(uint16_t , optstring , uint16_t , optstring , struct l2tp_api_session_msg_data *, struct svc_req *); +#define L2TP_SESSION_LIST 23 +extern enum clnt_stat l2tp_session_list_1(uint16_t , optstring , struct l2tp_api_session_list_msg_data *, CLIENT *); +extern bool_t l2tp_session_list_1_svc(uint16_t , optstring , struct l2tp_api_session_list_msg_data *, struct svc_req *); +#define L2TP_SESSION_INCALL_IND 24 +extern enum clnt_stat l2tp_session_incall_ind_1(struct l2tp_api_session_incall_msg_data , int *, CLIENT *); +extern bool_t l2tp_session_incall_ind_1_svc(struct l2tp_api_session_incall_msg_data , int *, struct svc_req *); +#define L2TP_SESSION_PROFILE_CREATE 25 +extern enum clnt_stat l2tp_session_profile_create_1(struct l2tp_api_session_profile_msg_data , int *, CLIENT *); +extern bool_t l2tp_session_profile_create_1_svc(struct l2tp_api_session_profile_msg_data , int *, struct svc_req *); +#define L2TP_SESSION_PROFILE_DELETE 26 +extern enum clnt_stat l2tp_session_profile_delete_1(char *, int *, CLIENT *); +extern bool_t l2tp_session_profile_delete_1_svc(char *, int *, struct svc_req *); +#define L2TP_SESSION_PROFILE_MODIFY 27 +extern enum clnt_stat l2tp_session_profile_modify_1(struct l2tp_api_session_profile_msg_data , int *, CLIENT *); +extern bool_t l2tp_session_profile_modify_1_svc(struct l2tp_api_session_profile_msg_data , int *, struct svc_req *); +#define L2TP_SESSION_PROFILE_GET 28 +extern enum clnt_stat l2tp_session_profile_get_1(char *, struct l2tp_api_session_profile_msg_data *, CLIENT *); +extern bool_t l2tp_session_profile_get_1_svc(char *, struct l2tp_api_session_profile_msg_data *, struct svc_req *); +#define L2TP_SESSION_PROFILE_LIST 29 +extern enum clnt_stat l2tp_session_profile_list_1(struct l2tp_api_session_profile_list_msg_data *, CLIENT *); +extern bool_t l2tp_session_profile_list_1_svc(struct l2tp_api_session_profile_list_msg_data *, struct svc_req *); +#define L2TP_PPP_PROFILE_CREATE 30 +extern enum clnt_stat l2tp_ppp_profile_create_1(struct l2tp_api_ppp_profile_msg_data , int *, CLIENT *); +extern bool_t l2tp_ppp_profile_create_1_svc(struct l2tp_api_ppp_profile_msg_data , int *, struct svc_req *); +#define L2TP_PPP_PROFILE_DELETE 31 +extern enum clnt_stat l2tp_ppp_profile_delete_1(char *, int *, CLIENT *); +extern bool_t l2tp_ppp_profile_delete_1_svc(char *, int *, struct svc_req *); +#define L2TP_PPP_PROFILE_MODIFY 32 +extern enum clnt_stat l2tp_ppp_profile_modify_1(struct l2tp_api_ppp_profile_msg_data , int *, CLIENT *); +extern bool_t l2tp_ppp_profile_modify_1_svc(struct l2tp_api_ppp_profile_msg_data , int *, struct svc_req *); +#define L2TP_PPP_PROFILE_GET 33 +extern enum clnt_stat l2tp_ppp_profile_get_1(char *, struct l2tp_api_ppp_profile_msg_data *, CLIENT *); +extern bool_t l2tp_ppp_profile_get_1_svc(char *, struct l2tp_api_ppp_profile_msg_data *, struct svc_req *); +#define L2TP_PPP_PROFILE_LIST 34 +extern enum clnt_stat l2tp_ppp_profile_list_1(struct l2tp_api_ppp_profile_list_msg_data *, CLIENT *); +extern bool_t l2tp_ppp_profile_list_1_svc(struct l2tp_api_ppp_profile_list_msg_data *, struct svc_req *); +#define L2TP_PEER_GET 35 +extern enum clnt_stat l2tp_peer_get_1(struct l2tp_api_ip_addr , struct l2tp_api_ip_addr , struct l2tp_api_peer_msg_data *, CLIENT *); +extern bool_t l2tp_peer_get_1_svc(struct l2tp_api_ip_addr , struct l2tp_api_ip_addr , struct l2tp_api_peer_msg_data *, struct svc_req *); +#define L2TP_PEER_LIST 36 +extern enum clnt_stat l2tp_peer_list_1(struct l2tp_api_peer_list_msg_data *, CLIENT *); +extern bool_t l2tp_peer_list_1_svc(struct l2tp_api_peer_list_msg_data *, struct svc_req *); +#define L2TP_USER_LIST 37 +extern enum clnt_stat l2tp_user_list_1(struct l2tp_api_user_list_msg_data *, CLIENT *); +extern bool_t l2tp_user_list_1_svc(struct l2tp_api_user_list_msg_data *, struct svc_req *); +#define L2TP_PEER_PROFILE_UNSET 38 +extern enum clnt_stat l2tp_peer_profile_unset_1(struct l2tp_api_peer_profile_unset_msg_data , int *, CLIENT *); +extern bool_t l2tp_peer_profile_unset_1_svc(struct l2tp_api_peer_profile_unset_msg_data , int *, struct svc_req *); +#define L2TP_TUNNEL_PROFILE_UNSET 39 +extern enum clnt_stat l2tp_tunnel_profile_unset_1(struct l2tp_api_tunnel_profile_unset_msg_data , int *, CLIENT *); +extern bool_t l2tp_tunnel_profile_unset_1_svc(struct l2tp_api_tunnel_profile_unset_msg_data , int *, struct svc_req *); +#define L2TP_SESSION_PROFILE_UNSET 40 +extern enum clnt_stat l2tp_session_profile_unset_1(struct l2tp_api_session_profile_unset_msg_data , int *, CLIENT *); +extern bool_t l2tp_session_profile_unset_1_svc(struct l2tp_api_session_profile_unset_msg_data , int *, struct svc_req *); +#define L2TP_PPP_PROFILE_UNSET 41 +extern enum clnt_stat l2tp_ppp_profile_unset_1(struct l2tp_api_ppp_profile_unset_msg_data , int *, CLIENT *); +extern bool_t l2tp_ppp_profile_unset_1_svc(struct l2tp_api_ppp_profile_unset_msg_data , int *, struct svc_req *); +#define L2TP_TEST_LOG 97 +extern enum clnt_stat l2tp_test_log_1(char *, int *, CLIENT *); +extern bool_t l2tp_test_log_1_svc(char *, int *, struct svc_req *); +#define L2TP_TEST_MODIFY 98 +extern enum clnt_stat l2tp_test_modify_1(struct l2tp_api_test_msg_data , int *, CLIENT *); +extern bool_t l2tp_test_modify_1_svc(struct l2tp_api_test_msg_data , int *, struct svc_req *); +#define L2TP_TEST_GET 99 +extern enum clnt_stat l2tp_test_get_1(struct l2tp_api_test_msg_data *, CLIENT *); +extern bool_t l2tp_test_get_1_svc(struct l2tp_api_test_msg_data *, struct svc_req *); +extern int l2tp_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t); + +#else /* K&R C */ +#define L2TP_APP_INFO_GET 1 +extern enum clnt_stat l2tp_app_info_get_1(); +extern bool_t l2tp_app_info_get_1_svc(); +#define L2TP_SYSTEM_MODIFY 2 +extern enum clnt_stat l2tp_system_modify_1(); +extern bool_t l2tp_system_modify_1_svc(); +#define L2TP_SYSTEM_GET 3 +extern enum clnt_stat l2tp_system_get_1(); +extern bool_t l2tp_system_get_1_svc(); +#define L2TP_PEER_PROFILE_CREATE 4 +extern enum clnt_stat l2tp_peer_profile_create_1(); +extern bool_t l2tp_peer_profile_create_1_svc(); +#define L2TP_PEER_PROFILE_DELETE 5 +extern enum clnt_stat l2tp_peer_profile_delete_1(); +extern bool_t l2tp_peer_profile_delete_1_svc(); +#define L2TP_PEER_PROFILE_MODIFY 6 +extern enum clnt_stat l2tp_peer_profile_modify_1(); +extern bool_t l2tp_peer_profile_modify_1_svc(); +#define L2TP_PEER_PROFILE_GET 7 +extern enum clnt_stat l2tp_peer_profile_get_1(); +extern bool_t l2tp_peer_profile_get_1_svc(); +#define L2TP_PEER_PROFILE_LIST 8 +extern enum clnt_stat l2tp_peer_profile_list_1(); +extern bool_t l2tp_peer_profile_list_1_svc(); +#define L2TP_TUNNEL_CREATE 9 +extern enum clnt_stat l2tp_tunnel_create_1(); +extern bool_t l2tp_tunnel_create_1_svc(); +#define L2TP_TUNNEL_DELETE 10 +extern enum clnt_stat l2tp_tunnel_delete_1(); +extern bool_t l2tp_tunnel_delete_1_svc(); +#define L2TP_TUNNEL_MODIFY 11 +extern enum clnt_stat l2tp_tunnel_modify_1(); +extern bool_t l2tp_tunnel_modify_1_svc(); +#define L2TP_TUNNEL_GET 12 +extern enum clnt_stat l2tp_tunnel_get_1(); +extern bool_t l2tp_tunnel_get_1_svc(); +#define L2TP_TUNNEL_LIST 13 +extern enum clnt_stat l2tp_tunnel_list_1(); +extern bool_t l2tp_tunnel_list_1_svc(); +#define L2TP_TUNNEL_PROFILE_CREATE 14 +extern enum clnt_stat l2tp_tunnel_profile_create_1(); +extern bool_t l2tp_tunnel_profile_create_1_svc(); +#define L2TP_TUNNEL_PROFILE_DELETE 15 +extern enum clnt_stat l2tp_tunnel_profile_delete_1(); +extern bool_t l2tp_tunnel_profile_delete_1_svc(); +#define L2TP_TUNNEL_PROFILE_MODIFY 16 +extern enum clnt_stat l2tp_tunnel_profile_modify_1(); +extern bool_t l2tp_tunnel_profile_modify_1_svc(); +#define L2TP_TUNNEL_PROFILE_GET 17 +extern enum clnt_stat l2tp_tunnel_profile_get_1(); +extern bool_t l2tp_tunnel_profile_get_1_svc(); +#define L2TP_TUNNEL_PROFILE_LIST 18 +extern enum clnt_stat l2tp_tunnel_profile_list_1(); +extern bool_t l2tp_tunnel_profile_list_1_svc(); +#define L2TP_SESSION_CREATE 19 +extern enum clnt_stat l2tp_session_create_1(); +extern bool_t l2tp_session_create_1_svc(); +#define L2TP_SESSION_DELETE 20 +extern enum clnt_stat l2tp_session_delete_1(); +extern bool_t l2tp_session_delete_1_svc(); +#define L2TP_SESSION_MODIFY 21 +extern enum clnt_stat l2tp_session_modify_1(); +extern bool_t l2tp_session_modify_1_svc(); +#define L2TP_SESSION_GET 22 +extern enum clnt_stat l2tp_session_get_1(); +extern bool_t l2tp_session_get_1_svc(); +#define L2TP_SESSION_LIST 23 +extern enum clnt_stat l2tp_session_list_1(); +extern bool_t l2tp_session_list_1_svc(); +#define L2TP_SESSION_INCALL_IND 24 +extern enum clnt_stat l2tp_session_incall_ind_1(); +extern bool_t l2tp_session_incall_ind_1_svc(); +#define L2TP_SESSION_PROFILE_CREATE 25 +extern enum clnt_stat l2tp_session_profile_create_1(); +extern bool_t l2tp_session_profile_create_1_svc(); +#define L2TP_SESSION_PROFILE_DELETE 26 +extern enum clnt_stat l2tp_session_profile_delete_1(); +extern bool_t l2tp_session_profile_delete_1_svc(); +#define L2TP_SESSION_PROFILE_MODIFY 27 +extern enum clnt_stat l2tp_session_profile_modify_1(); +extern bool_t l2tp_session_profile_modify_1_svc(); +#define L2TP_SESSION_PROFILE_GET 28 +extern enum clnt_stat l2tp_session_profile_get_1(); +extern bool_t l2tp_session_profile_get_1_svc(); +#define L2TP_SESSION_PROFILE_LIST 29 +extern enum clnt_stat l2tp_session_profile_list_1(); +extern bool_t l2tp_session_profile_list_1_svc(); +#define L2TP_PPP_PROFILE_CREATE 30 +extern enum clnt_stat l2tp_ppp_profile_create_1(); +extern bool_t l2tp_ppp_profile_create_1_svc(); +#define L2TP_PPP_PROFILE_DELETE 31 +extern enum clnt_stat l2tp_ppp_profile_delete_1(); +extern bool_t l2tp_ppp_profile_delete_1_svc(); +#define L2TP_PPP_PROFILE_MODIFY 32 +extern enum clnt_stat l2tp_ppp_profile_modify_1(); +extern bool_t l2tp_ppp_profile_modify_1_svc(); +#define L2TP_PPP_PROFILE_GET 33 +extern enum clnt_stat l2tp_ppp_profile_get_1(); +extern bool_t l2tp_ppp_profile_get_1_svc(); +#define L2TP_PPP_PROFILE_LIST 34 +extern enum clnt_stat l2tp_ppp_profile_list_1(); +extern bool_t l2tp_ppp_profile_list_1_svc(); +#define L2TP_PEER_GET 35 +extern enum clnt_stat l2tp_peer_get_1(); +extern bool_t l2tp_peer_get_1_svc(); +#define L2TP_PEER_LIST 36 +extern enum clnt_stat l2tp_peer_list_1(); +extern bool_t l2tp_peer_list_1_svc(); +#define L2TP_USER_LIST 37 +extern enum clnt_stat l2tp_user_list_1(); +extern bool_t l2tp_user_list_1_svc(); +#define L2TP_PEER_PROFILE_UNSET 38 +extern enum clnt_stat l2tp_peer_profile_unset_1(); +extern bool_t l2tp_peer_profile_unset_1_svc(); +#define L2TP_TUNNEL_PROFILE_UNSET 39 +extern enum clnt_stat l2tp_tunnel_profile_unset_1(); +extern bool_t l2tp_tunnel_profile_unset_1_svc(); +#define L2TP_SESSION_PROFILE_UNSET 40 +extern enum clnt_stat l2tp_session_profile_unset_1(); +extern bool_t l2tp_session_profile_unset_1_svc(); +#define L2TP_PPP_PROFILE_UNSET 41 +extern enum clnt_stat l2tp_ppp_profile_unset_1(); +extern bool_t l2tp_ppp_profile_unset_1_svc(); +#define L2TP_TEST_LOG 97 +extern enum clnt_stat l2tp_test_log_1(); +extern bool_t l2tp_test_log_1_svc(); +#define L2TP_TEST_MODIFY 98 +extern enum clnt_stat l2tp_test_modify_1(); +extern bool_t l2tp_test_modify_1_svc(); +#define L2TP_TEST_GET 99 +extern enum clnt_stat l2tp_test_get_1(); +extern bool_t l2tp_test_get_1_svc(); +extern int l2tp_prog_1_freeresult (); +#endif /* K&R C */ + +/* the xdr functions */ + +#if defined(__STDC__) || defined(__cplusplus) +extern bool_t xdr_optstring (XDR *, optstring*); +extern bool_t xdr_l2tp_api_tunnel_auth_mode (XDR *, l2tp_api_tunnel_auth_mode*); +extern bool_t xdr_l2tp_api_tunnel_mode (XDR *, l2tp_api_tunnel_mode*); +extern bool_t xdr_l2tp_api_ip_addr (XDR *, l2tp_api_ip_addr*); +extern bool_t xdr_l2tp_api_app_msg_data (XDR *, l2tp_api_app_msg_data*); +extern bool_t xdr_l2tp_api_system_config (XDR *, l2tp_api_system_config*); +extern bool_t xdr_l2tp_api_system_msg_stats (XDR *, l2tp_api_system_msg_stats*); +extern bool_t xdr_l2tp_api_system_stats (XDR *, l2tp_api_system_stats*); +extern bool_t xdr_l2tp_api_system_status (XDR *, l2tp_api_system_status*); +extern bool_t xdr_l2tp_api_system_msg_data (XDR *, l2tp_api_system_msg_data*); +extern bool_t xdr_l2tp_api_peer_msg_data (XDR *, l2tp_api_peer_msg_data*); +extern bool_t xdr_l2tp_api_peer_list_entry (XDR *, l2tp_api_peer_list_entry*); +extern bool_t xdr_l2tp_api_peer_list_msg_data (XDR *, l2tp_api_peer_list_msg_data*); +extern bool_t xdr_l2tp_api_peer_profile_msg_data (XDR *, l2tp_api_peer_profile_msg_data*); +extern bool_t xdr_l2tp_api_peer_profile_list_entry (XDR *, l2tp_api_peer_profile_list_entry*); +extern bool_t xdr_l2tp_api_peer_profile_list_msg_data (XDR *, l2tp_api_peer_profile_list_msg_data*); +extern bool_t xdr_l2tp_api_peer_profile_unset_msg_data (XDR *, l2tp_api_peer_profile_unset_msg_data*); +extern bool_t xdr_l2tp_api_tunnel_peer (XDR *, l2tp_api_tunnel_peer*); +extern bool_t xdr_l2tp_api_tunnel_stats (XDR *, l2tp_api_tunnel_stats*); +extern bool_t xdr_l2tp_api_tunnel_msg_data (XDR *, l2tp_api_tunnel_msg_data*); +extern bool_t xdr_l2tp_api_tunnel_list_msg_data (XDR *, l2tp_api_tunnel_list_msg_data*); +extern bool_t xdr_l2tp_api_tunnel_profile_msg_data (XDR *, l2tp_api_tunnel_profile_msg_data*); +extern bool_t xdr_l2tp_api_tunnel_profile_list_entry (XDR *, l2tp_api_tunnel_profile_list_entry*); +extern bool_t xdr_l2tp_api_tunnel_profile_list_msg_data (XDR *, l2tp_api_tunnel_profile_list_msg_data*); +extern bool_t xdr_l2tp_api_tunnel_profile_unset_msg_data (XDR *, l2tp_api_tunnel_profile_unset_msg_data*); +extern bool_t xdr_l2tp_api_session_proxy_auth_type (XDR *, l2tp_api_session_proxy_auth_type*); +extern bool_t xdr_l2tp_api_session_call_errors (XDR *, l2tp_api_session_call_errors*); +extern bool_t xdr_l2tp_api_session_stats (XDR *, l2tp_api_session_stats*); +extern bool_t xdr_l2tp_api_session_peer_info (XDR *, l2tp_api_session_peer_info*); +extern bool_t xdr_l2tp_api_session_type (XDR *, l2tp_api_session_type*); +extern bool_t xdr_l2tp_api_session_msg_data (XDR *, l2tp_api_session_msg_data*); +extern bool_t xdr_l2tp_api_session_list_msg_data (XDR *, l2tp_api_session_list_msg_data*); +extern bool_t xdr_l2tp_api_session_incall_msg_data (XDR *, l2tp_api_session_incall_msg_data*); +extern bool_t xdr_l2tp_api_session_profile_msg_data (XDR *, l2tp_api_session_profile_msg_data*); +extern bool_t xdr_l2tp_api_session_profile_list_entry (XDR *, l2tp_api_session_profile_list_entry*); +extern bool_t xdr_l2tp_api_session_profile_list_msg_data (XDR *, l2tp_api_session_profile_list_msg_data*); +extern bool_t xdr_l2tp_api_session_profile_unset_msg_data (XDR *, l2tp_api_session_profile_unset_msg_data*); +extern bool_t xdr_l2tp_api_ppp_sync_mode (XDR *, l2tp_api_ppp_sync_mode*); +extern bool_t xdr_l2tp_api_ppp_profile_msg_data (XDR *, l2tp_api_ppp_profile_msg_data*); +extern bool_t xdr_l2tp_api_ppp_profile_list_entry (XDR *, l2tp_api_ppp_profile_list_entry*); +extern bool_t xdr_l2tp_api_ppp_profile_list_msg_data (XDR *, l2tp_api_ppp_profile_list_msg_data*); +extern bool_t xdr_l2tp_api_ppp_profile_unset_msg_data (XDR *, l2tp_api_ppp_profile_unset_msg_data*); +extern bool_t xdr_l2tp_api_user_list_entry (XDR *, l2tp_api_user_list_entry*); +extern bool_t xdr_l2tp_api_user_list_msg_data (XDR *, l2tp_api_user_list_msg_data*); +extern bool_t xdr_l2tp_api_test_trigger_type (XDR *, l2tp_api_test_trigger_type*); +extern bool_t xdr_l2tp_api_test_msg_data (XDR *, l2tp_api_test_msg_data*); +extern bool_t xdr_l2tp_tunnel_delete_1_argument (XDR *, l2tp_tunnel_delete_1_argument*); +extern bool_t xdr_l2tp_tunnel_get_1_argument (XDR *, l2tp_tunnel_get_1_argument*); +extern bool_t xdr_l2tp_session_delete_1_argument (XDR *, l2tp_session_delete_1_argument*); +extern bool_t xdr_l2tp_session_get_1_argument (XDR *, l2tp_session_get_1_argument*); +extern bool_t xdr_l2tp_session_list_1_argument (XDR *, l2tp_session_list_1_argument*); +extern bool_t xdr_l2tp_peer_get_1_argument (XDR *, l2tp_peer_get_1_argument*); + +#else /* K&R C */ +extern bool_t xdr_optstring (); +extern bool_t xdr_l2tp_api_tunnel_auth_mode (); +extern bool_t xdr_l2tp_api_tunnel_mode (); +extern bool_t xdr_l2tp_api_ip_addr (); +extern bool_t xdr_l2tp_api_app_msg_data (); +extern bool_t xdr_l2tp_api_system_config (); +extern bool_t xdr_l2tp_api_system_msg_stats (); +extern bool_t xdr_l2tp_api_system_stats (); +extern bool_t xdr_l2tp_api_system_status (); +extern bool_t xdr_l2tp_api_system_msg_data (); +extern bool_t xdr_l2tp_api_peer_msg_data (); +extern bool_t xdr_l2tp_api_peer_list_entry (); +extern bool_t xdr_l2tp_api_peer_list_msg_data (); +extern bool_t xdr_l2tp_api_peer_profile_msg_data (); +extern bool_t xdr_l2tp_api_peer_profile_list_entry (); +extern bool_t xdr_l2tp_api_peer_profile_list_msg_data (); +extern bool_t xdr_l2tp_api_peer_profile_unset_msg_data (); +extern bool_t xdr_l2tp_api_tunnel_peer (); +extern bool_t xdr_l2tp_api_tunnel_stats (); +extern bool_t xdr_l2tp_api_tunnel_msg_data (); +extern bool_t xdr_l2tp_api_tunnel_list_msg_data (); +extern bool_t xdr_l2tp_api_tunnel_profile_msg_data (); +extern bool_t xdr_l2tp_api_tunnel_profile_list_entry (); +extern bool_t xdr_l2tp_api_tunnel_profile_list_msg_data (); +extern bool_t xdr_l2tp_api_tunnel_profile_unset_msg_data (); +extern bool_t xdr_l2tp_api_session_proxy_auth_type (); +extern bool_t xdr_l2tp_api_session_call_errors (); +extern bool_t xdr_l2tp_api_session_stats (); +extern bool_t xdr_l2tp_api_session_peer_info (); +extern bool_t xdr_l2tp_api_session_type (); +extern bool_t xdr_l2tp_api_session_msg_data (); +extern bool_t xdr_l2tp_api_session_list_msg_data (); +extern bool_t xdr_l2tp_api_session_incall_msg_data (); +extern bool_t xdr_l2tp_api_session_profile_msg_data (); +extern bool_t xdr_l2tp_api_session_profile_list_entry (); +extern bool_t xdr_l2tp_api_session_profile_list_msg_data (); +extern bool_t xdr_l2tp_api_session_profile_unset_msg_data (); +extern bool_t xdr_l2tp_api_ppp_sync_mode (); +extern bool_t xdr_l2tp_api_ppp_profile_msg_data (); +extern bool_t xdr_l2tp_api_ppp_profile_list_entry (); +extern bool_t xdr_l2tp_api_ppp_profile_list_msg_data (); +extern bool_t xdr_l2tp_api_ppp_profile_unset_msg_data (); +extern bool_t xdr_l2tp_api_user_list_entry (); +extern bool_t xdr_l2tp_api_user_list_msg_data (); +extern bool_t xdr_l2tp_api_test_trigger_type (); +extern bool_t xdr_l2tp_api_test_msg_data (); +extern bool_t xdr_l2tp_tunnel_delete_1_argument (); +extern bool_t xdr_l2tp_tunnel_get_1_argument (); +extern bool_t xdr_l2tp_session_delete_1_argument (); +extern bool_t xdr_l2tp_session_get_1_argument (); +extern bool_t xdr_l2tp_session_list_1_argument (); +extern bool_t xdr_l2tp_peer_get_1_argument (); + +#endif /* K&R C */ + +#ifdef __cplusplus +} +#endif + +#endif /* !_L2TP_RPC_H_RPCGEN */ diff --git a/net/openl2tp/src/l2tp_rpc_client.c b/net/openl2tp/src/l2tp_rpc_client.c new file mode 100644 index 0000000..2acec51 --- /dev/null +++ b/net/openl2tp/src/l2tp_rpc_client.c @@ -0,0 +1,426 @@ +/* + * Please do not edit this file. + * It was generated using rpcgen. + */ + +#include /* for memset */ +#include "l2tp_rpc.h" +#define OPTSTRING(_var) _var.optstring_u.value +#define OPTSTRING_PTR(_var) ((_var.valid == 1) ? _var.optstring_u.value : NULL) + +/* Default timeout can be changed using clnt_control() */ +static struct timeval TIMEOUT = { 25, 0 }; + +enum clnt_stat +l2tp_app_info_get_1(struct l2tp_api_app_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call (clnt, L2TP_APP_INFO_GET, (xdrproc_t) xdr_void, (caddr_t) NULL, + (xdrproc_t) xdr_l2tp_api_app_msg_data, (caddr_t) clnt_res, + TIMEOUT)); + +} + +enum clnt_stat +l2tp_system_modify_1(struct l2tp_api_system_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_SYSTEM_MODIFY, + (xdrproc_t) xdr_l2tp_api_system_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_system_get_1(struct l2tp_api_system_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call (clnt, L2TP_SYSTEM_GET, (xdrproc_t) xdr_void, (caddr_t) NULL, + (xdrproc_t) xdr_l2tp_api_system_msg_data, (caddr_t) clnt_res, + TIMEOUT)); + +} + +enum clnt_stat +l2tp_peer_profile_create_1(struct l2tp_api_peer_profile_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_PEER_PROFILE_CREATE, + (xdrproc_t) xdr_l2tp_api_peer_profile_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_peer_profile_delete_1(char *name, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_PEER_PROFILE_DELETE, + (xdrproc_t) xdr_wrapstring, (caddr_t) &name, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_peer_profile_modify_1(struct l2tp_api_peer_profile_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_PEER_PROFILE_MODIFY, + (xdrproc_t) xdr_l2tp_api_peer_profile_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_peer_profile_get_1(char *name, struct l2tp_api_peer_profile_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_PEER_PROFILE_GET, + (xdrproc_t) xdr_wrapstring, (caddr_t) &name, + (xdrproc_t) xdr_l2tp_api_peer_profile_msg_data, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_peer_profile_list_1(struct l2tp_api_peer_profile_list_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call (clnt, L2TP_PEER_PROFILE_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL, + (xdrproc_t) xdr_l2tp_api_peer_profile_list_msg_data, (caddr_t) clnt_res, + TIMEOUT)); + +} + +enum clnt_stat +l2tp_tunnel_create_1(struct l2tp_api_tunnel_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_TUNNEL_CREATE, + (xdrproc_t) xdr_l2tp_api_tunnel_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_tunnel_delete_1(uint16_t tunnel_id, optstring tunnel_name, optstring reason, int *clnt_res, CLIENT *clnt) +{ + l2tp_tunnel_delete_1_argument arg; + arg.tunnel_id = tunnel_id; + arg.tunnel_name = tunnel_name; + arg.reason = reason; + return (clnt_call (clnt, L2TP_TUNNEL_DELETE, (xdrproc_t) xdr_l2tp_tunnel_delete_1_argument, (caddr_t) &arg, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_tunnel_modify_1(struct l2tp_api_tunnel_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_TUNNEL_MODIFY, + (xdrproc_t) xdr_l2tp_api_tunnel_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_tunnel_get_1(uint16_t tunnel_id, optstring tunnel_name, struct l2tp_api_tunnel_msg_data *clnt_res, CLIENT *clnt) +{ + l2tp_tunnel_get_1_argument arg; + arg.tunnel_id = tunnel_id; + arg.tunnel_name = tunnel_name; + return (clnt_call (clnt, L2TP_TUNNEL_GET, (xdrproc_t) xdr_l2tp_tunnel_get_1_argument, (caddr_t) &arg, + (xdrproc_t) xdr_l2tp_api_tunnel_msg_data, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_tunnel_list_1(struct l2tp_api_tunnel_list_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call (clnt, L2TP_TUNNEL_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL, + (xdrproc_t) xdr_l2tp_api_tunnel_list_msg_data, (caddr_t) clnt_res, + TIMEOUT)); + +} + +enum clnt_stat +l2tp_tunnel_profile_create_1(struct l2tp_api_tunnel_profile_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_TUNNEL_PROFILE_CREATE, + (xdrproc_t) xdr_l2tp_api_tunnel_profile_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_tunnel_profile_delete_1(char *name, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_TUNNEL_PROFILE_DELETE, + (xdrproc_t) xdr_wrapstring, (caddr_t) &name, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_tunnel_profile_modify_1(struct l2tp_api_tunnel_profile_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_TUNNEL_PROFILE_MODIFY, + (xdrproc_t) xdr_l2tp_api_tunnel_profile_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_tunnel_profile_get_1(char *name, struct l2tp_api_tunnel_profile_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_TUNNEL_PROFILE_GET, + (xdrproc_t) xdr_wrapstring, (caddr_t) &name, + (xdrproc_t) xdr_l2tp_api_tunnel_profile_msg_data, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_tunnel_profile_list_1(struct l2tp_api_tunnel_profile_list_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call (clnt, L2TP_TUNNEL_PROFILE_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL, + (xdrproc_t) xdr_l2tp_api_tunnel_profile_list_msg_data, (caddr_t) clnt_res, + TIMEOUT)); + +} + +enum clnt_stat +l2tp_session_create_1(struct l2tp_api_session_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_SESSION_CREATE, + (xdrproc_t) xdr_l2tp_api_session_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_session_delete_1(uint16_t tunnel_id, optstring tunnel_name, uint16_t session_id, optstring session_name, optstring reason, int *clnt_res, CLIENT *clnt) +{ + l2tp_session_delete_1_argument arg; + arg.tunnel_id = tunnel_id; + arg.tunnel_name = tunnel_name; + arg.session_id = session_id; + arg.session_name = session_name; + arg.reason = reason; + return (clnt_call (clnt, L2TP_SESSION_DELETE, (xdrproc_t) xdr_l2tp_session_delete_1_argument, (caddr_t) &arg, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_session_modify_1(struct l2tp_api_session_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_SESSION_MODIFY, + (xdrproc_t) xdr_l2tp_api_session_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_session_get_1(uint16_t tunnel_id, optstring tunnel_name, uint16_t session_id, optstring session_name, struct l2tp_api_session_msg_data *clnt_res, CLIENT *clnt) +{ + l2tp_session_get_1_argument arg; + arg.tunnel_id = tunnel_id; + arg.tunnel_name = tunnel_name; + arg.session_id = session_id; + arg.session_name = session_name; + return (clnt_call (clnt, L2TP_SESSION_GET, (xdrproc_t) xdr_l2tp_session_get_1_argument, (caddr_t) &arg, + (xdrproc_t) xdr_l2tp_api_session_msg_data, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_session_list_1(uint16_t tunnel_id, optstring tunnel_name, struct l2tp_api_session_list_msg_data *clnt_res, CLIENT *clnt) +{ + l2tp_session_list_1_argument arg; + arg.tunnel_id = tunnel_id; + arg.tunnel_name = tunnel_name; + return (clnt_call (clnt, L2TP_SESSION_LIST, (xdrproc_t) xdr_l2tp_session_list_1_argument, (caddr_t) &arg, + (xdrproc_t) xdr_l2tp_api_session_list_msg_data, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_session_incall_ind_1(struct l2tp_api_session_incall_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_SESSION_INCALL_IND, + (xdrproc_t) xdr_l2tp_api_session_incall_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_session_profile_create_1(struct l2tp_api_session_profile_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_SESSION_PROFILE_CREATE, + (xdrproc_t) xdr_l2tp_api_session_profile_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_session_profile_delete_1(char *name, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_SESSION_PROFILE_DELETE, + (xdrproc_t) xdr_wrapstring, (caddr_t) &name, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_session_profile_modify_1(struct l2tp_api_session_profile_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_SESSION_PROFILE_MODIFY, + (xdrproc_t) xdr_l2tp_api_session_profile_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_session_profile_get_1(char *name, struct l2tp_api_session_profile_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_SESSION_PROFILE_GET, + (xdrproc_t) xdr_wrapstring, (caddr_t) &name, + (xdrproc_t) xdr_l2tp_api_session_profile_msg_data, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_session_profile_list_1(struct l2tp_api_session_profile_list_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call (clnt, L2TP_SESSION_PROFILE_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL, + (xdrproc_t) xdr_l2tp_api_session_profile_list_msg_data, (caddr_t) clnt_res, + TIMEOUT)); + +} + +enum clnt_stat +l2tp_ppp_profile_create_1(struct l2tp_api_ppp_profile_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_PPP_PROFILE_CREATE, + (xdrproc_t) xdr_l2tp_api_ppp_profile_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_ppp_profile_delete_1(char *name, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_PPP_PROFILE_DELETE, + (xdrproc_t) xdr_wrapstring, (caddr_t) &name, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_ppp_profile_modify_1(struct l2tp_api_ppp_profile_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_PPP_PROFILE_MODIFY, + (xdrproc_t) xdr_l2tp_api_ppp_profile_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_ppp_profile_get_1(char *name, struct l2tp_api_ppp_profile_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_PPP_PROFILE_GET, + (xdrproc_t) xdr_wrapstring, (caddr_t) &name, + (xdrproc_t) xdr_l2tp_api_ppp_profile_msg_data, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_ppp_profile_list_1(struct l2tp_api_ppp_profile_list_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call (clnt, L2TP_PPP_PROFILE_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL, + (xdrproc_t) xdr_l2tp_api_ppp_profile_list_msg_data, (caddr_t) clnt_res, + TIMEOUT)); + +} + +enum clnt_stat +l2tp_peer_get_1(struct l2tp_api_ip_addr local_addr, struct l2tp_api_ip_addr peer_addr, struct l2tp_api_peer_msg_data *clnt_res, CLIENT *clnt) +{ + l2tp_peer_get_1_argument arg; + arg.local_addr = local_addr; + arg.peer_addr = peer_addr; + return (clnt_call (clnt, L2TP_PEER_GET, (xdrproc_t) xdr_l2tp_peer_get_1_argument, (caddr_t) &arg, + (xdrproc_t) xdr_l2tp_api_peer_msg_data, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_peer_list_1(struct l2tp_api_peer_list_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call (clnt, L2TP_PEER_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL, + (xdrproc_t) xdr_l2tp_api_peer_list_msg_data, (caddr_t) clnt_res, + TIMEOUT)); + +} + +enum clnt_stat +l2tp_user_list_1(struct l2tp_api_user_list_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call (clnt, L2TP_USER_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL, + (xdrproc_t) xdr_l2tp_api_user_list_msg_data, (caddr_t) clnt_res, + TIMEOUT)); + +} + +enum clnt_stat +l2tp_peer_profile_unset_1(struct l2tp_api_peer_profile_unset_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_PEER_PROFILE_UNSET, + (xdrproc_t) xdr_l2tp_api_peer_profile_unset_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_tunnel_profile_unset_1(struct l2tp_api_tunnel_profile_unset_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_TUNNEL_PROFILE_UNSET, + (xdrproc_t) xdr_l2tp_api_tunnel_profile_unset_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_session_profile_unset_1(struct l2tp_api_session_profile_unset_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_SESSION_PROFILE_UNSET, + (xdrproc_t) xdr_l2tp_api_session_profile_unset_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_ppp_profile_unset_1(struct l2tp_api_ppp_profile_unset_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_PPP_PROFILE_UNSET, + (xdrproc_t) xdr_l2tp_api_ppp_profile_unset_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_test_log_1(char *text, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_TEST_LOG, + (xdrproc_t) xdr_wrapstring, (caddr_t) &text, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_test_modify_1(struct l2tp_api_test_msg_data params, int *clnt_res, CLIENT *clnt) +{ + return (clnt_call(clnt, L2TP_TEST_MODIFY, + (xdrproc_t) xdr_l2tp_api_test_msg_data, (caddr_t) ¶ms, + (xdrproc_t) xdr_int, (caddr_t) clnt_res, + TIMEOUT)); +} + +enum clnt_stat +l2tp_test_get_1(struct l2tp_api_test_msg_data *clnt_res, CLIENT *clnt) +{ + return (clnt_call (clnt, L2TP_TEST_GET, (xdrproc_t) xdr_void, (caddr_t) NULL, + (xdrproc_t) xdr_l2tp_api_test_msg_data, (caddr_t) clnt_res, + TIMEOUT)); + +} diff --git a/net/openl2tp/src/l2tp_rpc_server.c b/net/openl2tp/src/l2tp_rpc_server.c new file mode 100644 index 0000000..b2dd30a --- /dev/null +++ b/net/openl2tp/src/l2tp_rpc_server.c @@ -0,0 +1,665 @@ +/* + * Please do not edit this file. + * It was generated using rpcgen. + */ + +#include "l2tp_rpc.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef SIG_PF +#define SIG_PF void(*)(int) +#endif +#define OPTSTRING(_var) _var.optstring_u.value +#define OPTSTRING_PTR(_var) ((_var.valid == 1) ? _var.optstring_u.value : NULL) + +int +_l2tp_app_info_get_1 (void *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_app_info_get_1_svc(result, rqstp)); +} + +int +_l2tp_system_modify_1 (struct l2tp_api_system_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_system_modify_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_system_get_1 (void *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_system_get_1_svc(result, rqstp)); +} + +int +_l2tp_peer_profile_create_1 (struct l2tp_api_peer_profile_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_peer_profile_create_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_peer_profile_delete_1 (char * *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_peer_profile_delete_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_peer_profile_modify_1 (struct l2tp_api_peer_profile_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_peer_profile_modify_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_peer_profile_get_1 (char * *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_peer_profile_get_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_peer_profile_list_1 (void *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_peer_profile_list_1_svc(result, rqstp)); +} + +int +_l2tp_tunnel_create_1 (struct l2tp_api_tunnel_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_tunnel_create_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_tunnel_delete_1 (l2tp_tunnel_delete_1_argument *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_tunnel_delete_1_svc(argp->tunnel_id, argp->tunnel_name, argp->reason, result, rqstp)); +} + +int +_l2tp_tunnel_modify_1 (struct l2tp_api_tunnel_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_tunnel_modify_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_tunnel_get_1 (l2tp_tunnel_get_1_argument *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_tunnel_get_1_svc(argp->tunnel_id, argp->tunnel_name, result, rqstp)); +} + +int +_l2tp_tunnel_list_1 (void *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_tunnel_list_1_svc(result, rqstp)); +} + +int +_l2tp_tunnel_profile_create_1 (struct l2tp_api_tunnel_profile_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_tunnel_profile_create_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_tunnel_profile_delete_1 (char * *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_tunnel_profile_delete_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_tunnel_profile_modify_1 (struct l2tp_api_tunnel_profile_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_tunnel_profile_modify_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_tunnel_profile_get_1 (char * *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_tunnel_profile_get_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_tunnel_profile_list_1 (void *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_tunnel_profile_list_1_svc(result, rqstp)); +} + +int +_l2tp_session_create_1 (struct l2tp_api_session_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_session_create_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_session_delete_1 (l2tp_session_delete_1_argument *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_session_delete_1_svc(argp->tunnel_id, argp->tunnel_name, argp->session_id, argp->session_name, argp->reason, result, rqstp)); +} + +int +_l2tp_session_modify_1 (struct l2tp_api_session_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_session_modify_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_session_get_1 (l2tp_session_get_1_argument *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_session_get_1_svc(argp->tunnel_id, argp->tunnel_name, argp->session_id, argp->session_name, result, rqstp)); +} + +int +_l2tp_session_list_1 (l2tp_session_list_1_argument *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_session_list_1_svc(argp->tunnel_id, argp->tunnel_name, result, rqstp)); +} + +int +_l2tp_session_incall_ind_1 (struct l2tp_api_session_incall_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_session_incall_ind_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_session_profile_create_1 (struct l2tp_api_session_profile_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_session_profile_create_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_session_profile_delete_1 (char * *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_session_profile_delete_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_session_profile_modify_1 (struct l2tp_api_session_profile_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_session_profile_modify_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_session_profile_get_1 (char * *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_session_profile_get_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_session_profile_list_1 (void *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_session_profile_list_1_svc(result, rqstp)); +} + +int +_l2tp_ppp_profile_create_1 (struct l2tp_api_ppp_profile_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_ppp_profile_create_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_ppp_profile_delete_1 (char * *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_ppp_profile_delete_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_ppp_profile_modify_1 (struct l2tp_api_ppp_profile_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_ppp_profile_modify_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_ppp_profile_get_1 (char * *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_ppp_profile_get_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_ppp_profile_list_1 (void *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_ppp_profile_list_1_svc(result, rqstp)); +} + +int +_l2tp_peer_get_1 (l2tp_peer_get_1_argument *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_peer_get_1_svc(argp->local_addr, argp->peer_addr, result, rqstp)); +} + +int +_l2tp_peer_list_1 (void *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_peer_list_1_svc(result, rqstp)); +} + +int +_l2tp_user_list_1 (void *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_user_list_1_svc(result, rqstp)); +} + +int +_l2tp_peer_profile_unset_1 (struct l2tp_api_peer_profile_unset_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_peer_profile_unset_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_tunnel_profile_unset_1 (struct l2tp_api_tunnel_profile_unset_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_tunnel_profile_unset_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_session_profile_unset_1 (struct l2tp_api_session_profile_unset_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_session_profile_unset_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_ppp_profile_unset_1 (struct l2tp_api_ppp_profile_unset_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_ppp_profile_unset_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_test_log_1 (char * *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_test_log_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_test_modify_1 (struct l2tp_api_test_msg_data *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_test_modify_1_svc(*argp, result, rqstp)); +} + +int +_l2tp_test_get_1 (void *argp, void *result, struct svc_req *rqstp) +{ + return (l2tp_test_get_1_svc(result, rqstp)); +} + +void +l2tp_prog_1(struct svc_req *rqstp, register SVCXPRT *transp) +{ + union { + struct l2tp_api_system_msg_data l2tp_system_modify_1_arg; + struct l2tp_api_peer_profile_msg_data l2tp_peer_profile_create_1_arg; + char *l2tp_peer_profile_delete_1_arg; + struct l2tp_api_peer_profile_msg_data l2tp_peer_profile_modify_1_arg; + char *l2tp_peer_profile_get_1_arg; + struct l2tp_api_tunnel_msg_data l2tp_tunnel_create_1_arg; + l2tp_tunnel_delete_1_argument l2tp_tunnel_delete_1_arg; + struct l2tp_api_tunnel_msg_data l2tp_tunnel_modify_1_arg; + l2tp_tunnel_get_1_argument l2tp_tunnel_get_1_arg; + struct l2tp_api_tunnel_profile_msg_data l2tp_tunnel_profile_create_1_arg; + char *l2tp_tunnel_profile_delete_1_arg; + struct l2tp_api_tunnel_profile_msg_data l2tp_tunnel_profile_modify_1_arg; + char *l2tp_tunnel_profile_get_1_arg; + struct l2tp_api_session_msg_data l2tp_session_create_1_arg; + l2tp_session_delete_1_argument l2tp_session_delete_1_arg; + struct l2tp_api_session_msg_data l2tp_session_modify_1_arg; + l2tp_session_get_1_argument l2tp_session_get_1_arg; + l2tp_session_list_1_argument l2tp_session_list_1_arg; + struct l2tp_api_session_incall_msg_data l2tp_session_incall_ind_1_arg; + struct l2tp_api_session_profile_msg_data l2tp_session_profile_create_1_arg; + char *l2tp_session_profile_delete_1_arg; + struct l2tp_api_session_profile_msg_data l2tp_session_profile_modify_1_arg; + char *l2tp_session_profile_get_1_arg; + struct l2tp_api_ppp_profile_msg_data l2tp_ppp_profile_create_1_arg; + char *l2tp_ppp_profile_delete_1_arg; + struct l2tp_api_ppp_profile_msg_data l2tp_ppp_profile_modify_1_arg; + char *l2tp_ppp_profile_get_1_arg; + l2tp_peer_get_1_argument l2tp_peer_get_1_arg; + struct l2tp_api_peer_profile_unset_msg_data l2tp_peer_profile_unset_1_arg; + struct l2tp_api_tunnel_profile_unset_msg_data l2tp_tunnel_profile_unset_1_arg; + struct l2tp_api_session_profile_unset_msg_data l2tp_session_profile_unset_1_arg; + struct l2tp_api_ppp_profile_unset_msg_data l2tp_ppp_profile_unset_1_arg; + char *l2tp_test_log_1_arg; + struct l2tp_api_test_msg_data l2tp_test_modify_1_arg; + } argument; + union { + struct l2tp_api_app_msg_data l2tp_app_info_get_1_res; + int l2tp_system_modify_1_res; + struct l2tp_api_system_msg_data l2tp_system_get_1_res; + int l2tp_peer_profile_create_1_res; + int l2tp_peer_profile_delete_1_res; + int l2tp_peer_profile_modify_1_res; + struct l2tp_api_peer_profile_msg_data l2tp_peer_profile_get_1_res; + struct l2tp_api_peer_profile_list_msg_data l2tp_peer_profile_list_1_res; + int l2tp_tunnel_create_1_res; + int l2tp_tunnel_delete_1_res; + int l2tp_tunnel_modify_1_res; + struct l2tp_api_tunnel_msg_data l2tp_tunnel_get_1_res; + struct l2tp_api_tunnel_list_msg_data l2tp_tunnel_list_1_res; + int l2tp_tunnel_profile_create_1_res; + int l2tp_tunnel_profile_delete_1_res; + int l2tp_tunnel_profile_modify_1_res; + struct l2tp_api_tunnel_profile_msg_data l2tp_tunnel_profile_get_1_res; + struct l2tp_api_tunnel_profile_list_msg_data l2tp_tunnel_profile_list_1_res; + int l2tp_session_create_1_res; + int l2tp_session_delete_1_res; + int l2tp_session_modify_1_res; + struct l2tp_api_session_msg_data l2tp_session_get_1_res; + struct l2tp_api_session_list_msg_data l2tp_session_list_1_res; + int l2tp_session_incall_ind_1_res; + int l2tp_session_profile_create_1_res; + int l2tp_session_profile_delete_1_res; + int l2tp_session_profile_modify_1_res; + struct l2tp_api_session_profile_msg_data l2tp_session_profile_get_1_res; + struct l2tp_api_session_profile_list_msg_data l2tp_session_profile_list_1_res; + int l2tp_ppp_profile_create_1_res; + int l2tp_ppp_profile_delete_1_res; + int l2tp_ppp_profile_modify_1_res; + struct l2tp_api_ppp_profile_msg_data l2tp_ppp_profile_get_1_res; + struct l2tp_api_ppp_profile_list_msg_data l2tp_ppp_profile_list_1_res; + struct l2tp_api_peer_msg_data l2tp_peer_get_1_res; + struct l2tp_api_peer_list_msg_data l2tp_peer_list_1_res; + struct l2tp_api_user_list_msg_data l2tp_user_list_1_res; + int l2tp_peer_profile_unset_1_res; + int l2tp_tunnel_profile_unset_1_res; + int l2tp_session_profile_unset_1_res; + int l2tp_ppp_profile_unset_1_res; + int l2tp_test_log_1_res; + int l2tp_test_modify_1_res; + struct l2tp_api_test_msg_data l2tp_test_get_1_res; + } result; + bool_t retval; + xdrproc_t _xdr_argument, _xdr_result; + bool_t (*local)(char *, void *, struct svc_req *); + + if (l2tp_api_rpc_check_request(transp) < 0) return; switch (rqstp->rq_proc) { + case NULLPROC: + (void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL); + return; + + case L2TP_APP_INFO_GET: + _xdr_argument = (xdrproc_t) xdr_void; + _xdr_result = (xdrproc_t) xdr_l2tp_api_app_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_app_info_get_1; + break; + + case L2TP_SYSTEM_MODIFY: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_system_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_system_modify_1; + break; + + case L2TP_SYSTEM_GET: + _xdr_argument = (xdrproc_t) xdr_void; + _xdr_result = (xdrproc_t) xdr_l2tp_api_system_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_system_get_1; + break; + + case L2TP_PEER_PROFILE_CREATE: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_peer_profile_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_peer_profile_create_1; + break; + + case L2TP_PEER_PROFILE_DELETE: + _xdr_argument = (xdrproc_t) xdr_wrapstring; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_peer_profile_delete_1; + break; + + case L2TP_PEER_PROFILE_MODIFY: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_peer_profile_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_peer_profile_modify_1; + break; + + case L2TP_PEER_PROFILE_GET: + _xdr_argument = (xdrproc_t) xdr_wrapstring; + _xdr_result = (xdrproc_t) xdr_l2tp_api_peer_profile_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_peer_profile_get_1; + break; + + case L2TP_PEER_PROFILE_LIST: + _xdr_argument = (xdrproc_t) xdr_void; + _xdr_result = (xdrproc_t) xdr_l2tp_api_peer_profile_list_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_peer_profile_list_1; + break; + + case L2TP_TUNNEL_CREATE: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_tunnel_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_tunnel_create_1; + break; + + case L2TP_TUNNEL_DELETE: + _xdr_argument = (xdrproc_t) xdr_l2tp_tunnel_delete_1_argument; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_tunnel_delete_1; + break; + + case L2TP_TUNNEL_MODIFY: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_tunnel_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_tunnel_modify_1; + break; + + case L2TP_TUNNEL_GET: + _xdr_argument = (xdrproc_t) xdr_l2tp_tunnel_get_1_argument; + _xdr_result = (xdrproc_t) xdr_l2tp_api_tunnel_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_tunnel_get_1; + break; + + case L2TP_TUNNEL_LIST: + _xdr_argument = (xdrproc_t) xdr_void; + _xdr_result = (xdrproc_t) xdr_l2tp_api_tunnel_list_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_tunnel_list_1; + break; + + case L2TP_TUNNEL_PROFILE_CREATE: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_tunnel_profile_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_tunnel_profile_create_1; + break; + + case L2TP_TUNNEL_PROFILE_DELETE: + _xdr_argument = (xdrproc_t) xdr_wrapstring; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_tunnel_profile_delete_1; + break; + + case L2TP_TUNNEL_PROFILE_MODIFY: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_tunnel_profile_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_tunnel_profile_modify_1; + break; + + case L2TP_TUNNEL_PROFILE_GET: + _xdr_argument = (xdrproc_t) xdr_wrapstring; + _xdr_result = (xdrproc_t) xdr_l2tp_api_tunnel_profile_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_tunnel_profile_get_1; + break; + + case L2TP_TUNNEL_PROFILE_LIST: + _xdr_argument = (xdrproc_t) xdr_void; + _xdr_result = (xdrproc_t) xdr_l2tp_api_tunnel_profile_list_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_tunnel_profile_list_1; + break; + + case L2TP_SESSION_CREATE: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_session_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_session_create_1; + break; + + case L2TP_SESSION_DELETE: + _xdr_argument = (xdrproc_t) xdr_l2tp_session_delete_1_argument; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_session_delete_1; + break; + + case L2TP_SESSION_MODIFY: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_session_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_session_modify_1; + break; + + case L2TP_SESSION_GET: + _xdr_argument = (xdrproc_t) xdr_l2tp_session_get_1_argument; + _xdr_result = (xdrproc_t) xdr_l2tp_api_session_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_session_get_1; + break; + + case L2TP_SESSION_LIST: + _xdr_argument = (xdrproc_t) xdr_l2tp_session_list_1_argument; + _xdr_result = (xdrproc_t) xdr_l2tp_api_session_list_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_session_list_1; + break; + + case L2TP_SESSION_INCALL_IND: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_session_incall_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_session_incall_ind_1; + break; + + case L2TP_SESSION_PROFILE_CREATE: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_session_profile_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_session_profile_create_1; + break; + + case L2TP_SESSION_PROFILE_DELETE: + _xdr_argument = (xdrproc_t) xdr_wrapstring; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_session_profile_delete_1; + break; + + case L2TP_SESSION_PROFILE_MODIFY: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_session_profile_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_session_profile_modify_1; + break; + + case L2TP_SESSION_PROFILE_GET: + _xdr_argument = (xdrproc_t) xdr_wrapstring; + _xdr_result = (xdrproc_t) xdr_l2tp_api_session_profile_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_session_profile_get_1; + break; + + case L2TP_SESSION_PROFILE_LIST: + _xdr_argument = (xdrproc_t) xdr_void; + _xdr_result = (xdrproc_t) xdr_l2tp_api_session_profile_list_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_session_profile_list_1; + break; + + case L2TP_PPP_PROFILE_CREATE: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_ppp_profile_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_ppp_profile_create_1; + break; + + case L2TP_PPP_PROFILE_DELETE: + _xdr_argument = (xdrproc_t) xdr_wrapstring; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_ppp_profile_delete_1; + break; + + case L2TP_PPP_PROFILE_MODIFY: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_ppp_profile_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_ppp_profile_modify_1; + break; + + case L2TP_PPP_PROFILE_GET: + _xdr_argument = (xdrproc_t) xdr_wrapstring; + _xdr_result = (xdrproc_t) xdr_l2tp_api_ppp_profile_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_ppp_profile_get_1; + break; + + case L2TP_PPP_PROFILE_LIST: + _xdr_argument = (xdrproc_t) xdr_void; + _xdr_result = (xdrproc_t) xdr_l2tp_api_ppp_profile_list_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_ppp_profile_list_1; + break; + + case L2TP_PEER_GET: + _xdr_argument = (xdrproc_t) xdr_l2tp_peer_get_1_argument; + _xdr_result = (xdrproc_t) xdr_l2tp_api_peer_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_peer_get_1; + break; + + case L2TP_PEER_LIST: + _xdr_argument = (xdrproc_t) xdr_void; + _xdr_result = (xdrproc_t) xdr_l2tp_api_peer_list_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_peer_list_1; + break; + + case L2TP_USER_LIST: + _xdr_argument = (xdrproc_t) xdr_void; + _xdr_result = (xdrproc_t) xdr_l2tp_api_user_list_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_user_list_1; + break; + + case L2TP_PEER_PROFILE_UNSET: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_peer_profile_unset_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_peer_profile_unset_1; + break; + + case L2TP_TUNNEL_PROFILE_UNSET: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_tunnel_profile_unset_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_tunnel_profile_unset_1; + break; + + case L2TP_SESSION_PROFILE_UNSET: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_session_profile_unset_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_session_profile_unset_1; + break; + + case L2TP_PPP_PROFILE_UNSET: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_ppp_profile_unset_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_ppp_profile_unset_1; + break; + + case L2TP_TEST_LOG: + _xdr_argument = (xdrproc_t) xdr_wrapstring; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_test_log_1; + break; + + case L2TP_TEST_MODIFY: + _xdr_argument = (xdrproc_t) xdr_l2tp_api_test_msg_data; + _xdr_result = (xdrproc_t) xdr_int; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_test_modify_1; + break; + + case L2TP_TEST_GET: + _xdr_argument = (xdrproc_t) xdr_void; + _xdr_result = (xdrproc_t) xdr_l2tp_api_test_msg_data; + local = (bool_t (*) (char *, void *, struct svc_req *))_l2tp_test_get_1; + break; + + default: + svcerr_noproc (transp); + return; + } + memset ((char *)&argument, 0, sizeof (argument)); + if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { + svcerr_decode (transp); + return; + } + retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp); + if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) { + svcerr_systemerr (transp); + } + if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { + syslog (LOG_ERR, "%s", "unable to free arguments"); + exit (1); + } + if (!l2tp_prog_1_freeresult (transp, _xdr_result, (caddr_t) &result)) + syslog (LOG_ERR, "%s", "unable to free results"); + + return; +} diff --git a/net/openl2tp/src/l2tp_rpc_xdr.c b/net/openl2tp/src/l2tp_rpc_xdr.c new file mode 100644 index 0000000..9c540c3 --- /dev/null +++ b/net/openl2tp/src/l2tp_rpc_xdr.c @@ -0,0 +1,2957 @@ +/* + * Please do not edit this file. + * It was generated using rpcgen. + */ + +#include "l2tp_rpc.h" + +bool_t +xdr_optstring (XDR *xdrs, optstring *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->valid)) + return FALSE; + switch (objp->valid) { + case 1: + if (!xdr_string (xdrs, &objp->optstring_u.value, ~0)) + return FALSE; + break; + default: + break; + } + return TRUE; +} +#define OPTSTRING(_var) _var.optstring_u.value +#define OPTSTRING_PTR(_var) ((_var.valid == 1) ? _var.optstring_u.value : NULL) + +bool_t +xdr_l2tp_api_tunnel_auth_mode (XDR *xdrs, l2tp_api_tunnel_auth_mode *objp) +{ + register int32_t *buf; + + if (!xdr_enum (xdrs, (enum_t *) objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_tunnel_mode (XDR *xdrs, l2tp_api_tunnel_mode *objp) +{ + register int32_t *buf; + + if (!xdr_enum (xdrs, (enum_t *) objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_ip_addr (XDR *xdrs, l2tp_api_ip_addr *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->s_addr)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_app_msg_data (XDR *xdrs, l2tp_api_app_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_string (xdrs, &objp->build_date, 16)) + return FALSE; + if (!xdr_string (xdrs, &objp->build_time, 16)) + return FALSE; + if (!xdr_int (xdrs, &objp->major)) + return FALSE; + if (!xdr_int (xdrs, &objp->minor)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->cookie)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->patches.patches_val, (u_int *) &objp->patches.patches_len, ~0, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->features)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_system_config (XDR *xdrs, l2tp_api_system_config *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->udp_port)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + buf = XDR_INLINE (xdrs, 9 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->max_tunnels)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_sessions)) + return FALSE; + if (!xdr_int (xdrs, &objp->drain_tunnels)) + return FALSE; + if (!xdr_int (xdrs, &objp->tunnel_establish_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->session_establish_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->tunnel_persist_pend_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->session_persist_pend_timeout)) + return FALSE; + if (!xdr_bool (xdrs, &objp->deny_local_tunnel_creates)) + return FALSE; + if (!xdr_bool (xdrs, &objp->deny_remote_tunnel_creates)) + return FALSE; + } else { + IXDR_PUT_LONG(buf, objp->max_tunnels); + IXDR_PUT_LONG(buf, objp->max_sessions); + IXDR_PUT_LONG(buf, objp->drain_tunnels); + IXDR_PUT_LONG(buf, objp->tunnel_establish_timeout); + IXDR_PUT_LONG(buf, objp->session_establish_timeout); + IXDR_PUT_LONG(buf, objp->tunnel_persist_pend_timeout); + IXDR_PUT_LONG(buf, objp->session_persist_pend_timeout); + IXDR_PUT_BOOL(buf, objp->deny_local_tunnel_creates); + IXDR_PUT_BOOL(buf, objp->deny_remote_tunnel_creates); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->udp_port)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + buf = XDR_INLINE (xdrs, 9 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->max_tunnels)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_sessions)) + return FALSE; + if (!xdr_int (xdrs, &objp->drain_tunnels)) + return FALSE; + if (!xdr_int (xdrs, &objp->tunnel_establish_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->session_establish_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->tunnel_persist_pend_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->session_persist_pend_timeout)) + return FALSE; + if (!xdr_bool (xdrs, &objp->deny_local_tunnel_creates)) + return FALSE; + if (!xdr_bool (xdrs, &objp->deny_remote_tunnel_creates)) + return FALSE; + } else { + objp->max_tunnels = IXDR_GET_LONG(buf); + objp->max_sessions = IXDR_GET_LONG(buf); + objp->drain_tunnels = IXDR_GET_LONG(buf); + objp->tunnel_establish_timeout = IXDR_GET_LONG(buf); + objp->session_establish_timeout = IXDR_GET_LONG(buf); + objp->tunnel_persist_pend_timeout = IXDR_GET_LONG(buf); + objp->session_persist_pend_timeout = IXDR_GET_LONG(buf); + objp->deny_local_tunnel_creates = IXDR_GET_BOOL(buf); + objp->deny_remote_tunnel_creates = IXDR_GET_BOOL(buf); + } + return TRUE; + } + + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->udp_port)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_tunnels)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_sessions)) + return FALSE; + if (!xdr_int (xdrs, &objp->drain_tunnels)) + return FALSE; + if (!xdr_int (xdrs, &objp->tunnel_establish_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->session_establish_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->tunnel_persist_pend_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->session_persist_pend_timeout)) + return FALSE; + if (!xdr_bool (xdrs, &objp->deny_local_tunnel_creates)) + return FALSE; + if (!xdr_bool (xdrs, &objp->deny_remote_tunnel_creates)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_system_msg_stats (XDR *xdrs, l2tp_api_system_msg_stats *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->rx)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_bad)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_system_stats (XDR *xdrs, l2tp_api_system_stats *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->short_frames)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->wrong_version_frames)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->unexpected_data_frames)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->bad_rcvd_frames)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->total_rcvd_control_frames)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->total_sent_control_frames)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->total_control_frame_send_fails)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->total_retransmitted_control_frames)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->no_control_frame_resources)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->no_peer_resources)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->no_tunnel_resources)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->no_session_resources)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->no_ppp_resources)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->too_many_tunnels)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->too_many_sessions)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->auth_fails)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->no_matching_tunnel_id_discards)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->no_matching_session_id_discards)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->mismatched_tunnel_ids)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->mismatched_session_ids)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->encode_message_fails)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tunnel_setup_failures)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->session_setup_failures)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->event_queue_full_errors)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->ignored_avps)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->vendor_avps)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->illegal_messages)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->unsupported_messages)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->messages.messages_val, (u_int *) &objp->messages.messages_len, L2TP_API_MSG_TYPE_COUNT, + sizeof (l2tp_api_system_msg_stats), (xdrproc_t) xdr_l2tp_api_system_msg_stats)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_system_status (XDR *xdrs, l2tp_api_system_status *objp) +{ + register int32_t *buf; + + if (!xdr_l2tp_api_system_stats (xdrs, &objp->stats)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->num_tunnels)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->num_sessions)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_system_msg_data (XDR *xdrs, l2tp_api_system_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_l2tp_api_system_config (xdrs, &objp->config)) + return FALSE; + if (!xdr_l2tp_api_system_status (xdrs, &objp->status)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_peer_msg_data (XDR *xdrs, l2tp_api_peer_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->peer_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->local_addr)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tunnels)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_peer_list_entry (XDR *xdrs, l2tp_api_peer_list_entry *objp) +{ + register int32_t *buf; + + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->peer_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->local_addr)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->next, sizeof (l2tp_api_peer_list_entry), (xdrproc_t) xdr_l2tp_api_peer_list_entry)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_peer_list_msg_data (XDR *xdrs, l2tp_api_peer_list_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->result)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->peers, sizeof (l2tp_api_peer_list_entry), (xdrproc_t) xdr_l2tp_api_peer_list_entry)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_peer_profile_msg_data (XDR *xdrs, l2tp_api_peer_profile_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->peer_addr)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_port)) + return FALSE; + if (!xdr_bool (xdrs, &objp->we_can_be_lac)) + return FALSE; + if (!xdr_bool (xdrs, &objp->we_can_be_lns)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->default_tunnel_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->default_session_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->default_ppp_profile_name)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->netmask)) + return FALSE; + if (!xdr_int (xdrs, &objp->use_count)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_peer_profile_list_entry (XDR *xdrs, l2tp_api_peer_profile_list_entry *objp) +{ + register int32_t *buf; + + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->next, sizeof (l2tp_api_peer_profile_list_entry), (xdrproc_t) xdr_l2tp_api_peer_profile_list_entry)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_peer_profile_list_msg_data (XDR *xdrs, l2tp_api_peer_profile_list_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->result)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_profiles)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->profiles, sizeof (l2tp_api_peer_profile_list_entry), (xdrproc_t) xdr_l2tp_api_peer_profile_list_entry)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_peer_profile_unset_msg_data (XDR *xdrs, l2tp_api_peer_profile_unset_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_tunnel_peer (XDR *xdrs, l2tp_api_tunnel_peer *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->framing_cap_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_cap_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_analog)) + return FALSE; + + } else { + IXDR_PUT_BOOL(buf, objp->framing_cap_sync); + IXDR_PUT_BOOL(buf, objp->framing_cap_async); + IXDR_PUT_BOOL(buf, objp->bearer_cap_digital); + IXDR_PUT_BOOL(buf, objp->bearer_cap_analog); + } + if (!xdr_uint8_t (xdrs, &objp->protocol_version_ver)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->protocol_version_rev)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->rx_window_size)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->firmware_revision)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->host_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->vendor_name)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->tiebreaker.tiebreaker_val, (u_int *) &objp->tiebreaker.tiebreaker_len, 8, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->result_code_result)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->result_code_error)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->result_code_message)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->framing_cap_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_cap_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_analog)) + return FALSE; + + } else { + objp->framing_cap_sync = IXDR_GET_BOOL(buf); + objp->framing_cap_async = IXDR_GET_BOOL(buf); + objp->bearer_cap_digital = IXDR_GET_BOOL(buf); + objp->bearer_cap_analog = IXDR_GET_BOOL(buf); + } + if (!xdr_uint8_t (xdrs, &objp->protocol_version_ver)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->protocol_version_rev)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->rx_window_size)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->firmware_revision)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->host_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->vendor_name)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->tiebreaker.tiebreaker_val, (u_int *) &objp->tiebreaker.tiebreaker_len, 8, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->result_code_result)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->result_code_error)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->result_code_message)) + return FALSE; + return TRUE; + } + + if (!xdr_bool (xdrs, &objp->framing_cap_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_cap_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_analog)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->protocol_version_ver)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->protocol_version_rev)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->rx_window_size)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->firmware_revision)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->host_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->vendor_name)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->tiebreaker.tiebreaker_val, (u_int *) &objp->tiebreaker.tiebreaker_len, 8, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->result_code_result)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->result_code_error)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->result_code_message)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_tunnel_stats (XDR *xdrs, l2tp_api_tunnel_stats *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->retransmits)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_zlbs)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_zlb_fails)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_zlbs)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->data_pkt_discards)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->duplicate_pkt_discards)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_hellos)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_hellos)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_hello_fails)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->ns)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->nr)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_ns)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_nr)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->cwnd)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->ssthresh)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->congpkt_acc)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->control_rx_packets)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->control_rx_bytes)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->control_rx_oos_packets)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->control_rx_oos_discards)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->control_tx_packets)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->control_tx_bytes)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_rx_packets)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_rx_bytes)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_rx_errors)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_rx_oos_packets)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_rx_oos_discards)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_tx_packets)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_tx_bytes)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_tx_errors)) + return FALSE; + if (!xdr_bool (xdrs, &objp->using_ipsec)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_tunnel_msg_data (XDR *xdrs, l2tp_api_tunnel_msg_data *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->flags2)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_tunnel_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_int (xdrs, &objp->hide_avps)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_name)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->our_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->peer_addr)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->our_udp_port)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_udp_port)) + return FALSE; + if (!xdr_int (xdrs, &objp->config_id)) + return FALSE; + if (!xdr_l2tp_api_tunnel_auth_mode (xdrs, &objp->auth_mode)) + return FALSE; + buf = XDR_INLINE (xdrs, 8 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->framing_cap_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_cap_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_analog)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_tiebreaker)) + return FALSE; + if (!xdr_bool (xdrs, &objp->allow_ppp_proxy)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_udp_checksums)) + return FALSE; + if (!xdr_bool (xdrs, &objp->created_by_admin)) + return FALSE; + + } else { + IXDR_PUT_BOOL(buf, objp->framing_cap_sync); + IXDR_PUT_BOOL(buf, objp->framing_cap_async); + IXDR_PUT_BOOL(buf, objp->bearer_cap_digital); + IXDR_PUT_BOOL(buf, objp->bearer_cap_analog); + IXDR_PUT_BOOL(buf, objp->use_tiebreaker); + IXDR_PUT_BOOL(buf, objp->allow_ppp_proxy); + IXDR_PUT_BOOL(buf, objp->use_udp_checksums); + IXDR_PUT_BOOL(buf, objp->created_by_admin); + } + if (!xdr_optstring (xdrs, &objp->create_time)) + return FALSE; + buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->max_sessions)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_sessions)) + return FALSE; + if (!xdr_int (xdrs, &objp->use_count)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_establish_retries)) + return FALSE; + + } else { + IXDR_PUT_LONG(buf, objp->max_sessions); + IXDR_PUT_LONG(buf, objp->num_sessions); + IXDR_PUT_LONG(buf, objp->use_count); + IXDR_PUT_LONG(buf, objp->num_establish_retries); + } + if (!xdr_l2tp_api_tunnel_mode (xdrs, &objp->mode)) + return FALSE; + if (!xdr_int (xdrs, &objp->hello_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_retries)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->rx_window_size)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tx_window_size)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->actual_tx_window_size)) + return FALSE; + if (!xdr_int (xdrs, &objp->retry_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->idle_timeout)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->do_pmtu_discovery)) + return FALSE; + if (!xdr_bool (xdrs, &objp->persist)) + return FALSE; + if (!xdr_int (xdrs, &objp->mtu)) + return FALSE; + + } else { + IXDR_PUT_BOOL(buf, objp->do_pmtu_discovery); + IXDR_PUT_BOOL(buf, objp->persist); + IXDR_PUT_LONG(buf, objp->mtu); + } + if (!xdr_optstring (xdrs, &objp->state)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->secret)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->host_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->peer_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->session_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ppp_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->interface_name)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->tiebreaker.tiebreaker_val, (u_int *) &objp->tiebreaker.tiebreaker_len, 8, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->result_code_result)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->result_code_error)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->result_code_message)) + return FALSE; + if (!xdr_l2tp_api_tunnel_peer (xdrs, &objp->peer)) + return FALSE; + if (!xdr_l2tp_api_tunnel_stats (xdrs, &objp->stats)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->flags2)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_tunnel_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_int (xdrs, &objp->hide_avps)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_name)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->our_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->peer_addr)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->our_udp_port)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_udp_port)) + return FALSE; + if (!xdr_int (xdrs, &objp->config_id)) + return FALSE; + if (!xdr_l2tp_api_tunnel_auth_mode (xdrs, &objp->auth_mode)) + return FALSE; + buf = XDR_INLINE (xdrs, 8 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->framing_cap_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_cap_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_analog)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_tiebreaker)) + return FALSE; + if (!xdr_bool (xdrs, &objp->allow_ppp_proxy)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_udp_checksums)) + return FALSE; + if (!xdr_bool (xdrs, &objp->created_by_admin)) + return FALSE; + + } else { + objp->framing_cap_sync = IXDR_GET_BOOL(buf); + objp->framing_cap_async = IXDR_GET_BOOL(buf); + objp->bearer_cap_digital = IXDR_GET_BOOL(buf); + objp->bearer_cap_analog = IXDR_GET_BOOL(buf); + objp->use_tiebreaker = IXDR_GET_BOOL(buf); + objp->allow_ppp_proxy = IXDR_GET_BOOL(buf); + objp->use_udp_checksums = IXDR_GET_BOOL(buf); + objp->created_by_admin = IXDR_GET_BOOL(buf); + } + if (!xdr_optstring (xdrs, &objp->create_time)) + return FALSE; + buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->max_sessions)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_sessions)) + return FALSE; + if (!xdr_int (xdrs, &objp->use_count)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_establish_retries)) + return FALSE; + + } else { + objp->max_sessions = IXDR_GET_LONG(buf); + objp->num_sessions = IXDR_GET_LONG(buf); + objp->use_count = IXDR_GET_LONG(buf); + objp->num_establish_retries = IXDR_GET_LONG(buf); + } + if (!xdr_l2tp_api_tunnel_mode (xdrs, &objp->mode)) + return FALSE; + if (!xdr_int (xdrs, &objp->hello_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_retries)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->rx_window_size)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tx_window_size)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->actual_tx_window_size)) + return FALSE; + if (!xdr_int (xdrs, &objp->retry_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->idle_timeout)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->do_pmtu_discovery)) + return FALSE; + if (!xdr_bool (xdrs, &objp->persist)) + return FALSE; + if (!xdr_int (xdrs, &objp->mtu)) + return FALSE; + + } else { + objp->do_pmtu_discovery = IXDR_GET_BOOL(buf); + objp->persist = IXDR_GET_BOOL(buf); + objp->mtu = IXDR_GET_LONG(buf); + } + if (!xdr_optstring (xdrs, &objp->state)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->secret)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->host_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->peer_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->session_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ppp_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->interface_name)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->tiebreaker.tiebreaker_val, (u_int *) &objp->tiebreaker.tiebreaker_len, 8, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->result_code_result)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->result_code_error)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->result_code_message)) + return FALSE; + if (!xdr_l2tp_api_tunnel_peer (xdrs, &objp->peer)) + return FALSE; + if (!xdr_l2tp_api_tunnel_stats (xdrs, &objp->stats)) + return FALSE; + return TRUE; + } + + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->flags2)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_tunnel_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_int (xdrs, &objp->hide_avps)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_name)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->our_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->peer_addr)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->our_udp_port)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_udp_port)) + return FALSE; + if (!xdr_int (xdrs, &objp->config_id)) + return FALSE; + if (!xdr_l2tp_api_tunnel_auth_mode (xdrs, &objp->auth_mode)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_cap_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_cap_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_analog)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_tiebreaker)) + return FALSE; + if (!xdr_bool (xdrs, &objp->allow_ppp_proxy)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_udp_checksums)) + return FALSE; + if (!xdr_bool (xdrs, &objp->created_by_admin)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->create_time)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_sessions)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_sessions)) + return FALSE; + if (!xdr_int (xdrs, &objp->use_count)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_establish_retries)) + return FALSE; + if (!xdr_l2tp_api_tunnel_mode (xdrs, &objp->mode)) + return FALSE; + if (!xdr_int (xdrs, &objp->hello_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_retries)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->rx_window_size)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tx_window_size)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->actual_tx_window_size)) + return FALSE; + if (!xdr_int (xdrs, &objp->retry_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->idle_timeout)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + if (!xdr_bool (xdrs, &objp->do_pmtu_discovery)) + return FALSE; + if (!xdr_bool (xdrs, &objp->persist)) + return FALSE; + if (!xdr_int (xdrs, &objp->mtu)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->state)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->secret)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->host_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->peer_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->session_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ppp_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->interface_name)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->tiebreaker.tiebreaker_val, (u_int *) &objp->tiebreaker.tiebreaker_len, 8, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->result_code_result)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->result_code_error)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->result_code_message)) + return FALSE; + if (!xdr_l2tp_api_tunnel_peer (xdrs, &objp->peer)) + return FALSE; + if (!xdr_l2tp_api_tunnel_stats (xdrs, &objp->stats)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_tunnel_list_msg_data (XDR *xdrs, l2tp_api_tunnel_list_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->result)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->tunnel_ids.tunnel_ids_val, (u_int *) &objp->tunnel_ids.tunnel_ids_len, ~0, + sizeof (uint16_t), (xdrproc_t) xdr_uint16_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_tunnel_profile_msg_data (XDR *xdrs, l2tp_api_tunnel_profile_msg_data *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_int (xdrs, &objp->hide_avps)) + return FALSE; + if (!xdr_l2tp_api_tunnel_auth_mode (xdrs, &objp->auth_mode)) + return FALSE; + buf = XDR_INLINE (xdrs, 9 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->framing_cap_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_cap_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_analog)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_tiebreaker)) + return FALSE; + if (!xdr_bool (xdrs, &objp->allow_ppp_proxy)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_udp_checksums)) + return FALSE; + if (!xdr_int (xdrs, &objp->hello_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_retries)) + return FALSE; + + } else { + IXDR_PUT_BOOL(buf, objp->framing_cap_sync); + IXDR_PUT_BOOL(buf, objp->framing_cap_async); + IXDR_PUT_BOOL(buf, objp->bearer_cap_digital); + IXDR_PUT_BOOL(buf, objp->bearer_cap_analog); + IXDR_PUT_BOOL(buf, objp->use_tiebreaker); + IXDR_PUT_BOOL(buf, objp->allow_ppp_proxy); + IXDR_PUT_BOOL(buf, objp->use_udp_checksums); + IXDR_PUT_LONG(buf, objp->hello_timeout); + IXDR_PUT_LONG(buf, objp->max_retries); + } + if (!xdr_uint16_t (xdrs, &objp->rx_window_size)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tx_window_size)) + return FALSE; + if (!xdr_int (xdrs, &objp->retry_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->idle_timeout)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_sessions)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->our_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->peer_addr)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->our_udp_port)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_udp_port)) + return FALSE; + if (!xdr_bool (xdrs, &objp->do_pmtu_discovery)) + return FALSE; + if (!xdr_int (xdrs, &objp->mtu)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->peer_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->session_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ppp_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->secret)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->host_name)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_int (xdrs, &objp->hide_avps)) + return FALSE; + if (!xdr_l2tp_api_tunnel_auth_mode (xdrs, &objp->auth_mode)) + return FALSE; + buf = XDR_INLINE (xdrs, 9 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->framing_cap_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_cap_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_analog)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_tiebreaker)) + return FALSE; + if (!xdr_bool (xdrs, &objp->allow_ppp_proxy)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_udp_checksums)) + return FALSE; + if (!xdr_int (xdrs, &objp->hello_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_retries)) + return FALSE; + + } else { + objp->framing_cap_sync = IXDR_GET_BOOL(buf); + objp->framing_cap_async = IXDR_GET_BOOL(buf); + objp->bearer_cap_digital = IXDR_GET_BOOL(buf); + objp->bearer_cap_analog = IXDR_GET_BOOL(buf); + objp->use_tiebreaker = IXDR_GET_BOOL(buf); + objp->allow_ppp_proxy = IXDR_GET_BOOL(buf); + objp->use_udp_checksums = IXDR_GET_BOOL(buf); + objp->hello_timeout = IXDR_GET_LONG(buf); + objp->max_retries = IXDR_GET_LONG(buf); + } + if (!xdr_uint16_t (xdrs, &objp->rx_window_size)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tx_window_size)) + return FALSE; + if (!xdr_int (xdrs, &objp->retry_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->idle_timeout)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_sessions)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->our_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->peer_addr)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->our_udp_port)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_udp_port)) + return FALSE; + if (!xdr_bool (xdrs, &objp->do_pmtu_discovery)) + return FALSE; + if (!xdr_int (xdrs, &objp->mtu)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->peer_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->session_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ppp_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->secret)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->host_name)) + return FALSE; + return TRUE; + } + + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_int (xdrs, &objp->hide_avps)) + return FALSE; + if (!xdr_l2tp_api_tunnel_auth_mode (xdrs, &objp->auth_mode)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_cap_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_cap_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_cap_analog)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_tiebreaker)) + return FALSE; + if (!xdr_bool (xdrs, &objp->allow_ppp_proxy)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_udp_checksums)) + return FALSE; + if (!xdr_int (xdrs, &objp->hello_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_retries)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->rx_window_size)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tx_window_size)) + return FALSE; + if (!xdr_int (xdrs, &objp->retry_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->idle_timeout)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_sessions)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->our_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->peer_addr)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->our_udp_port)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_udp_port)) + return FALSE; + if (!xdr_bool (xdrs, &objp->do_pmtu_discovery)) + return FALSE; + if (!xdr_int (xdrs, &objp->mtu)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->peer_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->session_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ppp_profile_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->secret)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->host_name)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_tunnel_profile_list_entry (XDR *xdrs, l2tp_api_tunnel_profile_list_entry *objp) +{ + register int32_t *buf; + + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->next, sizeof (l2tp_api_tunnel_profile_list_entry), (xdrproc_t) xdr_l2tp_api_tunnel_profile_list_entry)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_tunnel_profile_list_msg_data (XDR *xdrs, l2tp_api_tunnel_profile_list_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->result)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_profiles)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->profiles, sizeof (l2tp_api_tunnel_profile_list_entry), (xdrproc_t) xdr_l2tp_api_tunnel_profile_list_entry)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_tunnel_profile_unset_msg_data (XDR *xdrs, l2tp_api_tunnel_profile_unset_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_session_proxy_auth_type (XDR *xdrs, l2tp_api_session_proxy_auth_type *objp) +{ + register int32_t *buf; + + if (!xdr_enum (xdrs, (enum_t *) objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_session_call_errors (XDR *xdrs, l2tp_api_session_call_errors *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->crc_errors)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->framing_errors)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->hardware_overruns)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->buffer_overruns)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->timeout_errors)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->alignment_errors)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_session_stats (XDR *xdrs, l2tp_api_session_stats *objp) +{ + register int32_t *buf; + + if (!xdr_uint64_t (xdrs, &objp->data_rx_packets)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_rx_bytes)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_rx_errors)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_rx_oos_packets)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_rx_oos_discards)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_tx_packets)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_tx_bytes)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->data_tx_errors)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_session_peer_info (XDR *xdrs, l2tp_api_session_peer_info *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_uint16_t (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->error_code)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->error_message)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->minimum_bps)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->maximum_bps)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->connect_speed)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_connect_speed)) + return FALSE; + if (!xdr_l2tp_api_session_proxy_auth_type (xdrs, &objp->proxy_auth_type)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->proxy_auth_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->proxy_auth_name)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->proxy_auth_challenge.proxy_auth_challenge_val, (u_int *) &objp->proxy_auth_challenge.proxy_auth_challenge_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->proxy_auth_response.proxy_auth_response_val, (u_int *) &objp->proxy_auth_response.proxy_auth_response_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->private_group_id)) + return FALSE; + buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->framing_type_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_analog)) + return FALSE; + if (!xdr_bool (xdrs, &objp->sequencing_required)) + return FALSE; + + } else { + IXDR_PUT_BOOL(buf, objp->framing_type_sync); + IXDR_PUT_BOOL(buf, objp->framing_type_async); + IXDR_PUT_BOOL(buf, objp->bearer_type_digital); + IXDR_PUT_BOOL(buf, objp->bearer_type_analog); + IXDR_PUT_BOOL(buf, objp->sequencing_required); + } + if (!xdr_uint32_t (xdrs, &objp->call_serial_number)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->physical_channel_id)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->initial_rcvd_lcp_confreq.initial_rcvd_lcp_confreq_val, (u_int *) &objp->initial_rcvd_lcp_confreq.initial_rcvd_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->last_sent_lcp_confreq.last_sent_lcp_confreq_val, (u_int *) &objp->last_sent_lcp_confreq.last_sent_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->last_rcvd_lcp_confreq.last_rcvd_lcp_confreq_val, (u_int *) &objp->last_rcvd_lcp_confreq.last_rcvd_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->calling_number)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->called_number)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->sub_address)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->q931_cause_code)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->q931_cause_msg)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->q931_advisory_msg)) + return FALSE; + if (!xdr_l2tp_api_session_call_errors (xdrs, &objp->call_errors)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->send_accm)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->recv_accm)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_uint16_t (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->error_code)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->error_message)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->minimum_bps)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->maximum_bps)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->connect_speed)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_connect_speed)) + return FALSE; + if (!xdr_l2tp_api_session_proxy_auth_type (xdrs, &objp->proxy_auth_type)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->proxy_auth_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->proxy_auth_name)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->proxy_auth_challenge.proxy_auth_challenge_val, (u_int *) &objp->proxy_auth_challenge.proxy_auth_challenge_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->proxy_auth_response.proxy_auth_response_val, (u_int *) &objp->proxy_auth_response.proxy_auth_response_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->private_group_id)) + return FALSE; + buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->framing_type_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_analog)) + return FALSE; + if (!xdr_bool (xdrs, &objp->sequencing_required)) + return FALSE; + + } else { + objp->framing_type_sync = IXDR_GET_BOOL(buf); + objp->framing_type_async = IXDR_GET_BOOL(buf); + objp->bearer_type_digital = IXDR_GET_BOOL(buf); + objp->bearer_type_analog = IXDR_GET_BOOL(buf); + objp->sequencing_required = IXDR_GET_BOOL(buf); + } + if (!xdr_uint32_t (xdrs, &objp->call_serial_number)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->physical_channel_id)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->initial_rcvd_lcp_confreq.initial_rcvd_lcp_confreq_val, (u_int *) &objp->initial_rcvd_lcp_confreq.initial_rcvd_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->last_sent_lcp_confreq.last_sent_lcp_confreq_val, (u_int *) &objp->last_sent_lcp_confreq.last_sent_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->last_rcvd_lcp_confreq.last_rcvd_lcp_confreq_val, (u_int *) &objp->last_rcvd_lcp_confreq.last_rcvd_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->calling_number)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->called_number)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->sub_address)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->q931_cause_code)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->q931_cause_msg)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->q931_advisory_msg)) + return FALSE; + if (!xdr_l2tp_api_session_call_errors (xdrs, &objp->call_errors)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->send_accm)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->recv_accm)) + return FALSE; + return TRUE; + } + + if (!xdr_uint16_t (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->error_code)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->error_message)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->minimum_bps)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->maximum_bps)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->connect_speed)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_connect_speed)) + return FALSE; + if (!xdr_l2tp_api_session_proxy_auth_type (xdrs, &objp->proxy_auth_type)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->proxy_auth_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->proxy_auth_name)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->proxy_auth_challenge.proxy_auth_challenge_val, (u_int *) &objp->proxy_auth_challenge.proxy_auth_challenge_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->proxy_auth_response.proxy_auth_response_val, (u_int *) &objp->proxy_auth_response.proxy_auth_response_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->private_group_id)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_analog)) + return FALSE; + if (!xdr_bool (xdrs, &objp->sequencing_required)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->call_serial_number)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->physical_channel_id)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->initial_rcvd_lcp_confreq.initial_rcvd_lcp_confreq_val, (u_int *) &objp->initial_rcvd_lcp_confreq.initial_rcvd_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->last_sent_lcp_confreq.last_sent_lcp_confreq_val, (u_int *) &objp->last_sent_lcp_confreq.last_sent_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->last_rcvd_lcp_confreq.last_rcvd_lcp_confreq_val, (u_int *) &objp->last_rcvd_lcp_confreq.last_rcvd_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->calling_number)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->called_number)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->sub_address)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->q931_cause_code)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->q931_cause_msg)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->q931_advisory_msg)) + return FALSE; + if (!xdr_l2tp_api_session_call_errors (xdrs, &objp->call_errors)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->send_accm)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->recv_accm)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_session_type (XDR *xdrs, l2tp_api_session_type *objp) +{ + register int32_t *buf; + + if (!xdr_enum (xdrs, (enum_t *) objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_session_msg_data (XDR *xdrs, l2tp_api_session_msg_data *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->session_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_name)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_session_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->state)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->session_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->interface_name)) + return FALSE; + if (!xdr_l2tp_api_session_type (xdrs, &objp->session_type)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->user_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->user_password)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->priv_group_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->profile_name)) + return FALSE; + if (!xdr_bool (xdrs, &objp->created_by_admin)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->create_time)) + return FALSE; + buf = XDR_INLINE (xdrs, 8 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->no_ppp)) + return FALSE; + if (!xdr_bool (xdrs, &objp->sequencing_required)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_sequence_numbers)) + return FALSE; + if (!xdr_int (xdrs, &objp->reorder_timeout)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_analog)) + return FALSE; + + } else { + IXDR_PUT_BOOL(buf, objp->no_ppp); + IXDR_PUT_BOOL(buf, objp->sequencing_required); + IXDR_PUT_BOOL(buf, objp->use_sequence_numbers); + IXDR_PUT_LONG(buf, objp->reorder_timeout); + IXDR_PUT_BOOL(buf, objp->framing_type_sync); + IXDR_PUT_BOOL(buf, objp->framing_type_async); + IXDR_PUT_BOOL(buf, objp->bearer_type_digital); + IXDR_PUT_BOOL(buf, objp->bearer_type_analog); + } + if (!xdr_uint32_t (xdrs, &objp->call_serial_number)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->physical_channel_id)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->minimum_bps)) + return FALSE; + if (!xdr_int (xdrs, &objp->maximum_bps)) + return FALSE; + if (!xdr_int (xdrs, &objp->tx_connect_speed)) + return FALSE; + if (!xdr_int (xdrs, &objp->rx_connect_speed)) + return FALSE; + + } else { + IXDR_PUT_LONG(buf, objp->minimum_bps); + IXDR_PUT_LONG(buf, objp->maximum_bps); + IXDR_PUT_LONG(buf, objp->tx_connect_speed); + IXDR_PUT_LONG(buf, objp->rx_connect_speed); + } + if (!xdr_l2tp_api_session_peer_info (xdrs, &objp->peer)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ppp_profile_name)) + return FALSE; + if (!xdr_l2tp_api_session_stats (xdrs, &objp->stats)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_ppp_proxy)) + return FALSE; + if (!xdr_l2tp_api_session_proxy_auth_type (xdrs, &objp->proxy_auth_type)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->proxy_auth_name)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->proxy_auth_challenge.proxy_auth_challenge_val, (u_int *) &objp->proxy_auth_challenge.proxy_auth_challenge_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->proxy_auth_response.proxy_auth_response_val, (u_int *) &objp->proxy_auth_response.proxy_auth_response_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->calling_number)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->called_number)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->sub_address)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->initial_rcvd_lcp_confreq.initial_rcvd_lcp_confreq_val, (u_int *) &objp->initial_rcvd_lcp_confreq.initial_rcvd_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->last_sent_lcp_confreq.last_sent_lcp_confreq_val, (u_int *) &objp->last_sent_lcp_confreq.last_sent_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->last_rcvd_lcp_confreq.last_rcvd_lcp_confreq_val, (u_int *) &objp->last_rcvd_lcp_confreq.last_rcvd_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->session_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_name)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_session_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->state)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->session_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->interface_name)) + return FALSE; + if (!xdr_l2tp_api_session_type (xdrs, &objp->session_type)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->user_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->user_password)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->priv_group_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->profile_name)) + return FALSE; + if (!xdr_bool (xdrs, &objp->created_by_admin)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->create_time)) + return FALSE; + buf = XDR_INLINE (xdrs, 8 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->no_ppp)) + return FALSE; + if (!xdr_bool (xdrs, &objp->sequencing_required)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_sequence_numbers)) + return FALSE; + if (!xdr_int (xdrs, &objp->reorder_timeout)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_analog)) + return FALSE; + + } else { + objp->no_ppp = IXDR_GET_BOOL(buf); + objp->sequencing_required = IXDR_GET_BOOL(buf); + objp->use_sequence_numbers = IXDR_GET_BOOL(buf); + objp->reorder_timeout = IXDR_GET_LONG(buf); + objp->framing_type_sync = IXDR_GET_BOOL(buf); + objp->framing_type_async = IXDR_GET_BOOL(buf); + objp->bearer_type_digital = IXDR_GET_BOOL(buf); + objp->bearer_type_analog = IXDR_GET_BOOL(buf); + } + if (!xdr_uint32_t (xdrs, &objp->call_serial_number)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->physical_channel_id)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->minimum_bps)) + return FALSE; + if (!xdr_int (xdrs, &objp->maximum_bps)) + return FALSE; + if (!xdr_int (xdrs, &objp->tx_connect_speed)) + return FALSE; + if (!xdr_int (xdrs, &objp->rx_connect_speed)) + return FALSE; + + } else { + objp->minimum_bps = IXDR_GET_LONG(buf); + objp->maximum_bps = IXDR_GET_LONG(buf); + objp->tx_connect_speed = IXDR_GET_LONG(buf); + objp->rx_connect_speed = IXDR_GET_LONG(buf); + } + if (!xdr_l2tp_api_session_peer_info (xdrs, &objp->peer)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ppp_profile_name)) + return FALSE; + if (!xdr_l2tp_api_session_stats (xdrs, &objp->stats)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_ppp_proxy)) + return FALSE; + if (!xdr_l2tp_api_session_proxy_auth_type (xdrs, &objp->proxy_auth_type)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->proxy_auth_name)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->proxy_auth_challenge.proxy_auth_challenge_val, (u_int *) &objp->proxy_auth_challenge.proxy_auth_challenge_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->proxy_auth_response.proxy_auth_response_val, (u_int *) &objp->proxy_auth_response.proxy_auth_response_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->calling_number)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->called_number)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->sub_address)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->initial_rcvd_lcp_confreq.initial_rcvd_lcp_confreq_val, (u_int *) &objp->initial_rcvd_lcp_confreq.initial_rcvd_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->last_sent_lcp_confreq.last_sent_lcp_confreq_val, (u_int *) &objp->last_sent_lcp_confreq.last_sent_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->last_rcvd_lcp_confreq.last_rcvd_lcp_confreq_val, (u_int *) &objp->last_rcvd_lcp_confreq.last_rcvd_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + return TRUE; + } + + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->session_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_name)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->peer_session_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->state)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->session_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->interface_name)) + return FALSE; + if (!xdr_l2tp_api_session_type (xdrs, &objp->session_type)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->user_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->user_password)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->priv_group_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->profile_name)) + return FALSE; + if (!xdr_bool (xdrs, &objp->created_by_admin)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->create_time)) + return FALSE; + if (!xdr_bool (xdrs, &objp->no_ppp)) + return FALSE; + if (!xdr_bool (xdrs, &objp->sequencing_required)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_sequence_numbers)) + return FALSE; + if (!xdr_int (xdrs, &objp->reorder_timeout)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_analog)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->call_serial_number)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->physical_channel_id)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + if (!xdr_int (xdrs, &objp->minimum_bps)) + return FALSE; + if (!xdr_int (xdrs, &objp->maximum_bps)) + return FALSE; + if (!xdr_int (xdrs, &objp->tx_connect_speed)) + return FALSE; + if (!xdr_int (xdrs, &objp->rx_connect_speed)) + return FALSE; + if (!xdr_l2tp_api_session_peer_info (xdrs, &objp->peer)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ppp_profile_name)) + return FALSE; + if (!xdr_l2tp_api_session_stats (xdrs, &objp->stats)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_ppp_proxy)) + return FALSE; + if (!xdr_l2tp_api_session_proxy_auth_type (xdrs, &objp->proxy_auth_type)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->proxy_auth_name)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->proxy_auth_challenge.proxy_auth_challenge_val, (u_int *) &objp->proxy_auth_challenge.proxy_auth_challenge_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->proxy_auth_response.proxy_auth_response_val, (u_int *) &objp->proxy_auth_response.proxy_auth_response_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->calling_number)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->called_number)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->sub_address)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->initial_rcvd_lcp_confreq.initial_rcvd_lcp_confreq_val, (u_int *) &objp->initial_rcvd_lcp_confreq.initial_rcvd_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->last_sent_lcp_confreq.last_sent_lcp_confreq_val, (u_int *) &objp->last_sent_lcp_confreq.last_sent_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->last_rcvd_lcp_confreq.last_rcvd_lcp_confreq_val, (u_int *) &objp->last_rcvd_lcp_confreq.last_rcvd_lcp_confreq_len, ~0, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_session_list_msg_data (XDR *xdrs, l2tp_api_session_list_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->result)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->session_ids.session_ids_val, (u_int *) &objp->session_ids.session_ids_len, ~0, + sizeof (uint16_t), (xdrproc_t) xdr_uint16_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_session_incall_msg_data (XDR *xdrs, l2tp_api_session_incall_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->ppp_unit)) + return FALSE; + if (!xdr_string (xdrs, &objp->tunnel_profile_name, ~0)) + return FALSE; + if (!xdr_l2tp_api_session_msg_data (xdrs, &objp->session)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_session_profile_msg_data (XDR *xdrs, l2tp_api_session_profile_msg_data *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + buf = XDR_INLINE (xdrs, 7 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->sequencing_required)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_sequence_numbers)) + return FALSE; + if (!xdr_bool (xdrs, &objp->no_ppp)) + return FALSE; + if (!xdr_int (xdrs, &objp->reorder_timeout)) + return FALSE; + if (!xdr_bool (xdrs, &objp->do_pmtu_discovery)) + return FALSE; + if (!xdr_int (xdrs, &objp->mtu)) + return FALSE; + if (!xdr_int (xdrs, &objp->mru)) + return FALSE; + + } else { + IXDR_PUT_BOOL(buf, objp->sequencing_required); + IXDR_PUT_BOOL(buf, objp->use_sequence_numbers); + IXDR_PUT_BOOL(buf, objp->no_ppp); + IXDR_PUT_LONG(buf, objp->reorder_timeout); + IXDR_PUT_BOOL(buf, objp->do_pmtu_discovery); + IXDR_PUT_LONG(buf, objp->mtu); + IXDR_PUT_LONG(buf, objp->mru); + } + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ppp_profile_name)) + return FALSE; + if (!xdr_l2tp_api_session_type (xdrs, &objp->session_type)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->priv_group_id)) + return FALSE; + buf = XDR_INLINE (xdrs, 9 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->framing_type_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_analog)) + return FALSE; + if (!xdr_int (xdrs, &objp->minimum_bps)) + return FALSE; + if (!xdr_int (xdrs, &objp->maximum_bps)) + return FALSE; + if (!xdr_int (xdrs, &objp->tx_connect_speed)) + return FALSE; + if (!xdr_int (xdrs, &objp->rx_connect_speed)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_ppp_proxy)) + return FALSE; + } else { + IXDR_PUT_BOOL(buf, objp->framing_type_sync); + IXDR_PUT_BOOL(buf, objp->framing_type_async); + IXDR_PUT_BOOL(buf, objp->bearer_type_digital); + IXDR_PUT_BOOL(buf, objp->bearer_type_analog); + IXDR_PUT_LONG(buf, objp->minimum_bps); + IXDR_PUT_LONG(buf, objp->maximum_bps); + IXDR_PUT_LONG(buf, objp->tx_connect_speed); + IXDR_PUT_LONG(buf, objp->rx_connect_speed); + IXDR_PUT_BOOL(buf, objp->use_ppp_proxy); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + buf = XDR_INLINE (xdrs, 7 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->sequencing_required)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_sequence_numbers)) + return FALSE; + if (!xdr_bool (xdrs, &objp->no_ppp)) + return FALSE; + if (!xdr_int (xdrs, &objp->reorder_timeout)) + return FALSE; + if (!xdr_bool (xdrs, &objp->do_pmtu_discovery)) + return FALSE; + if (!xdr_int (xdrs, &objp->mtu)) + return FALSE; + if (!xdr_int (xdrs, &objp->mru)) + return FALSE; + + } else { + objp->sequencing_required = IXDR_GET_BOOL(buf); + objp->use_sequence_numbers = IXDR_GET_BOOL(buf); + objp->no_ppp = IXDR_GET_BOOL(buf); + objp->reorder_timeout = IXDR_GET_LONG(buf); + objp->do_pmtu_discovery = IXDR_GET_BOOL(buf); + objp->mtu = IXDR_GET_LONG(buf); + objp->mru = IXDR_GET_LONG(buf); + } + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ppp_profile_name)) + return FALSE; + if (!xdr_l2tp_api_session_type (xdrs, &objp->session_type)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->priv_group_id)) + return FALSE; + buf = XDR_INLINE (xdrs, 9 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->framing_type_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_analog)) + return FALSE; + if (!xdr_int (xdrs, &objp->minimum_bps)) + return FALSE; + if (!xdr_int (xdrs, &objp->maximum_bps)) + return FALSE; + if (!xdr_int (xdrs, &objp->tx_connect_speed)) + return FALSE; + if (!xdr_int (xdrs, &objp->rx_connect_speed)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_ppp_proxy)) + return FALSE; + } else { + objp->framing_type_sync = IXDR_GET_BOOL(buf); + objp->framing_type_async = IXDR_GET_BOOL(buf); + objp->bearer_type_digital = IXDR_GET_BOOL(buf); + objp->bearer_type_analog = IXDR_GET_BOOL(buf); + objp->minimum_bps = IXDR_GET_LONG(buf); + objp->maximum_bps = IXDR_GET_LONG(buf); + objp->tx_connect_speed = IXDR_GET_LONG(buf); + objp->rx_connect_speed = IXDR_GET_LONG(buf); + objp->use_ppp_proxy = IXDR_GET_BOOL(buf); + } + return TRUE; + } + + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + if (!xdr_bool (xdrs, &objp->sequencing_required)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_sequence_numbers)) + return FALSE; + if (!xdr_bool (xdrs, &objp->no_ppp)) + return FALSE; + if (!xdr_int (xdrs, &objp->reorder_timeout)) + return FALSE; + if (!xdr_bool (xdrs, &objp->do_pmtu_discovery)) + return FALSE; + if (!xdr_int (xdrs, &objp->mtu)) + return FALSE; + if (!xdr_int (xdrs, &objp->mru)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ppp_profile_name)) + return FALSE; + if (!xdr_l2tp_api_session_type (xdrs, &objp->session_type)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->priv_group_id)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_sync)) + return FALSE; + if (!xdr_bool (xdrs, &objp->framing_type_async)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_digital)) + return FALSE; + if (!xdr_bool (xdrs, &objp->bearer_type_analog)) + return FALSE; + if (!xdr_int (xdrs, &objp->minimum_bps)) + return FALSE; + if (!xdr_int (xdrs, &objp->maximum_bps)) + return FALSE; + if (!xdr_int (xdrs, &objp->tx_connect_speed)) + return FALSE; + if (!xdr_int (xdrs, &objp->rx_connect_speed)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_ppp_proxy)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_session_profile_list_entry (XDR *xdrs, l2tp_api_session_profile_list_entry *objp) +{ + register int32_t *buf; + + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->next, sizeof (l2tp_api_session_profile_list_entry), (xdrproc_t) xdr_l2tp_api_session_profile_list_entry)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_session_profile_list_msg_data (XDR *xdrs, l2tp_api_session_profile_list_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->result)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_profiles)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->profiles, sizeof (l2tp_api_session_profile_list_entry), (xdrproc_t) xdr_l2tp_api_session_profile_list_entry)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_session_profile_unset_msg_data (XDR *xdrs, l2tp_api_session_profile_unset_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_ppp_sync_mode (XDR *xdrs, l2tp_api_ppp_sync_mode *objp) +{ + register int32_t *buf; + + if (!xdr_enum (xdrs, (enum_t *) objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_ppp_profile_msg_data (XDR *xdrs, l2tp_api_ppp_profile_msg_data *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->flags2)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->asyncmap)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->mru)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->mtu)) + return FALSE; + buf = XDR_INLINE (xdrs, 7 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->auth_none)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_peer)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_pap)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_chap)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_mschap)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_mschapv2)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_eap)) + return FALSE; + + } else { + IXDR_PUT_BOOL(buf, objp->auth_none); + IXDR_PUT_BOOL(buf, objp->auth_peer); + IXDR_PUT_BOOL(buf, objp->auth_refuse_pap); + IXDR_PUT_BOOL(buf, objp->auth_refuse_chap); + IXDR_PUT_BOOL(buf, objp->auth_refuse_mschap); + IXDR_PUT_BOOL(buf, objp->auth_refuse_mschapv2); + IXDR_PUT_BOOL(buf, objp->auth_refuse_eap); + } + if (!xdr_l2tp_api_ppp_sync_mode (xdrs, &objp->sync_mode)) + return FALSE; + buf = XDR_INLINE (xdrs, 19 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->chap_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->chap_max_challenge)) + return FALSE; + if (!xdr_int (xdrs, &objp->chap_restart)) + return FALSE; + if (!xdr_int (xdrs, &objp->pap_max_auth_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->pap_restart_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->pap_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->idle_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->ipcp_max_config_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->ipcp_max_config_naks)) + return FALSE; + if (!xdr_int (xdrs, &objp->ipcp_max_terminate_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->ipcp_retransmit_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_echo_failure_count)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_echo_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_max_config_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_max_config_naks)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_max_terminate_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_retransmit_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_connect_time)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_failure_count)) + return FALSE; + + } else { + IXDR_PUT_LONG(buf, objp->chap_interval); + IXDR_PUT_LONG(buf, objp->chap_max_challenge); + IXDR_PUT_LONG(buf, objp->chap_restart); + IXDR_PUT_LONG(buf, objp->pap_max_auth_requests); + IXDR_PUT_LONG(buf, objp->pap_restart_interval); + IXDR_PUT_LONG(buf, objp->pap_timeout); + IXDR_PUT_LONG(buf, objp->idle_timeout); + IXDR_PUT_LONG(buf, objp->ipcp_max_config_requests); + IXDR_PUT_LONG(buf, objp->ipcp_max_config_naks); + IXDR_PUT_LONG(buf, objp->ipcp_max_terminate_requests); + IXDR_PUT_LONG(buf, objp->ipcp_retransmit_interval); + IXDR_PUT_LONG(buf, objp->lcp_echo_failure_count); + IXDR_PUT_LONG(buf, objp->lcp_echo_interval); + IXDR_PUT_LONG(buf, objp->lcp_max_config_requests); + IXDR_PUT_LONG(buf, objp->lcp_max_config_naks); + IXDR_PUT_LONG(buf, objp->lcp_max_terminate_requests); + IXDR_PUT_LONG(buf, objp->lcp_retransmit_interval); + IXDR_PUT_LONG(buf, objp->max_connect_time); + IXDR_PUT_LONG(buf, objp->max_failure_count); + } + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->local_ip_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->peer_ip_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->dns_addr_1)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->dns_addr_2)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->wins_addr_1)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->wins_addr_2)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ip_pool_name)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_radius)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->radius_hint)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_as_default_route)) + return FALSE; + if (!xdr_bool (xdrs, &objp->multilink)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->local_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->remote_name)) + return FALSE; + if (!xdr_bool (xdrs, &objp->proxy_arp)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->flags2)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->asyncmap)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->mru)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->mtu)) + return FALSE; + buf = XDR_INLINE (xdrs, 7 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->auth_none)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_peer)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_pap)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_chap)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_mschap)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_mschapv2)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_eap)) + return FALSE; + + } else { + objp->auth_none = IXDR_GET_BOOL(buf); + objp->auth_peer = IXDR_GET_BOOL(buf); + objp->auth_refuse_pap = IXDR_GET_BOOL(buf); + objp->auth_refuse_chap = IXDR_GET_BOOL(buf); + objp->auth_refuse_mschap = IXDR_GET_BOOL(buf); + objp->auth_refuse_mschapv2 = IXDR_GET_BOOL(buf); + objp->auth_refuse_eap = IXDR_GET_BOOL(buf); + } + if (!xdr_l2tp_api_ppp_sync_mode (xdrs, &objp->sync_mode)) + return FALSE; + buf = XDR_INLINE (xdrs, 19 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->chap_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->chap_max_challenge)) + return FALSE; + if (!xdr_int (xdrs, &objp->chap_restart)) + return FALSE; + if (!xdr_int (xdrs, &objp->pap_max_auth_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->pap_restart_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->pap_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->idle_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->ipcp_max_config_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->ipcp_max_config_naks)) + return FALSE; + if (!xdr_int (xdrs, &objp->ipcp_max_terminate_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->ipcp_retransmit_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_echo_failure_count)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_echo_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_max_config_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_max_config_naks)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_max_terminate_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_retransmit_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_connect_time)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_failure_count)) + return FALSE; + + } else { + objp->chap_interval = IXDR_GET_LONG(buf); + objp->chap_max_challenge = IXDR_GET_LONG(buf); + objp->chap_restart = IXDR_GET_LONG(buf); + objp->pap_max_auth_requests = IXDR_GET_LONG(buf); + objp->pap_restart_interval = IXDR_GET_LONG(buf); + objp->pap_timeout = IXDR_GET_LONG(buf); + objp->idle_timeout = IXDR_GET_LONG(buf); + objp->ipcp_max_config_requests = IXDR_GET_LONG(buf); + objp->ipcp_max_config_naks = IXDR_GET_LONG(buf); + objp->ipcp_max_terminate_requests = IXDR_GET_LONG(buf); + objp->ipcp_retransmit_interval = IXDR_GET_LONG(buf); + objp->lcp_echo_failure_count = IXDR_GET_LONG(buf); + objp->lcp_echo_interval = IXDR_GET_LONG(buf); + objp->lcp_max_config_requests = IXDR_GET_LONG(buf); + objp->lcp_max_config_naks = IXDR_GET_LONG(buf); + objp->lcp_max_terminate_requests = IXDR_GET_LONG(buf); + objp->lcp_retransmit_interval = IXDR_GET_LONG(buf); + objp->max_connect_time = IXDR_GET_LONG(buf); + objp->max_failure_count = IXDR_GET_LONG(buf); + } + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->local_ip_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->peer_ip_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->dns_addr_1)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->dns_addr_2)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->wins_addr_1)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->wins_addr_2)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ip_pool_name)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_radius)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->radius_hint)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_as_default_route)) + return FALSE; + if (!xdr_bool (xdrs, &objp->multilink)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->local_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->remote_name)) + return FALSE; + if (!xdr_bool (xdrs, &objp->proxy_arp)) + return FALSE; + return TRUE; + } + + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->flags2)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->trace_flags_mask)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->asyncmap)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->mru)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->mtu)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_none)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_peer)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_pap)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_chap)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_mschap)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_mschapv2)) + return FALSE; + if (!xdr_bool (xdrs, &objp->auth_refuse_eap)) + return FALSE; + if (!xdr_l2tp_api_ppp_sync_mode (xdrs, &objp->sync_mode)) + return FALSE; + if (!xdr_int (xdrs, &objp->chap_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->chap_max_challenge)) + return FALSE; + if (!xdr_int (xdrs, &objp->chap_restart)) + return FALSE; + if (!xdr_int (xdrs, &objp->pap_max_auth_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->pap_restart_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->pap_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->idle_timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->ipcp_max_config_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->ipcp_max_config_naks)) + return FALSE; + if (!xdr_int (xdrs, &objp->ipcp_max_terminate_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->ipcp_retransmit_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_echo_failure_count)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_echo_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_max_config_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_max_config_naks)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_max_terminate_requests)) + return FALSE; + if (!xdr_int (xdrs, &objp->lcp_retransmit_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_connect_time)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_failure_count)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->local_ip_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->peer_ip_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->dns_addr_1)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->dns_addr_2)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->wins_addr_1)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->wins_addr_2)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->ip_pool_name)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_radius)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->radius_hint)) + return FALSE; + if (!xdr_bool (xdrs, &objp->use_as_default_route)) + return FALSE; + if (!xdr_bool (xdrs, &objp->multilink)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->local_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->remote_name)) + return FALSE; + if (!xdr_bool (xdrs, &objp->proxy_arp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_ppp_profile_list_entry (XDR *xdrs, l2tp_api_ppp_profile_list_entry *objp) +{ + register int32_t *buf; + + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->next, sizeof (l2tp_api_ppp_profile_list_entry), (xdrproc_t) xdr_l2tp_api_ppp_profile_list_entry)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_ppp_profile_list_msg_data (XDR *xdrs, l2tp_api_ppp_profile_list_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->result)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_profiles)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->profiles, sizeof (l2tp_api_ppp_profile_list_entry), (xdrproc_t) xdr_l2tp_api_ppp_profile_list_entry)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_ppp_profile_unset_msg_data (XDR *xdrs, l2tp_api_ppp_profile_unset_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->flags2)) + return FALSE; + if (!xdr_int (xdrs, &objp->result_code)) + return FALSE; + if (!xdr_string (xdrs, &objp->profile_name, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_user_list_entry (XDR *xdrs, l2tp_api_user_list_entry *objp) +{ + register int32_t *buf; + + if (!xdr_string (xdrs, &objp->user_name, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->create_time, ~0)) + return FALSE; + if (!xdr_bool (xdrs, &objp->created_by_admin)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->session_id)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->next, sizeof (l2tp_api_user_list_entry), (xdrproc_t) xdr_l2tp_api_user_list_entry)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_user_list_msg_data (XDR *xdrs, l2tp_api_user_list_msg_data *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->result)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_users)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->users, sizeof (l2tp_api_user_list_entry), (xdrproc_t) xdr_l2tp_api_user_list_entry)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_test_trigger_type (XDR *xdrs, l2tp_api_test_trigger_type *objp) +{ + register int32_t *buf; + + if (!xdr_enum (xdrs, (enum_t *) objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_api_test_msg_data (XDR *xdrs, l2tp_api_test_msg_data *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + buf = XDR_INLINE (xdrs, 9 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->fake_rx_drop)) + return FALSE; + if (!xdr_bool (xdrs, &objp->fake_tx_drop)) + return FALSE; + if (!xdr_bool (xdrs, &objp->fake_trigger_fired)) + return FALSE; + if (!xdr_bool (xdrs, &objp->hold_tunnels)) + return FALSE; + if (!xdr_bool (xdrs, &objp->hold_sessions)) + return FALSE; + if (!xdr_bool (xdrs, &objp->no_random_ids)) + return FALSE; + if (!xdr_bool (xdrs, &objp->show_profile_usage)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_rx_drops)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tx_drops)) + return FALSE; + + } else { + IXDR_PUT_BOOL(buf, objp->fake_rx_drop); + IXDR_PUT_BOOL(buf, objp->fake_tx_drop); + IXDR_PUT_BOOL(buf, objp->fake_trigger_fired); + IXDR_PUT_BOOL(buf, objp->hold_tunnels); + IXDR_PUT_BOOL(buf, objp->hold_sessions); + IXDR_PUT_BOOL(buf, objp->no_random_ids); + IXDR_PUT_BOOL(buf, objp->show_profile_usage); + IXDR_PUT_LONG(buf, objp->num_rx_drops); + IXDR_PUT_LONG(buf, objp->num_tx_drops); + } + if (!xdr_l2tp_api_test_trigger_type (xdrs, &objp->fake_trigger_type)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->session_id)) + return FALSE; + buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->num_tunnel_id_hash_hits)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tunnel_id_hash_misses)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tunnel_name_hash_hits)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tunnel_name_hash_misses)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_session_id_hash_hits)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_session_id_hash_misses)) + return FALSE; + } else { + IXDR_PUT_LONG(buf, objp->num_tunnel_id_hash_hits); + IXDR_PUT_LONG(buf, objp->num_tunnel_id_hash_misses); + IXDR_PUT_LONG(buf, objp->num_tunnel_name_hash_hits); + IXDR_PUT_LONG(buf, objp->num_tunnel_name_hash_misses); + IXDR_PUT_LONG(buf, objp->num_session_id_hash_hits); + IXDR_PUT_LONG(buf, objp->num_session_id_hash_misses); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + buf = XDR_INLINE (xdrs, 9 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_bool (xdrs, &objp->fake_rx_drop)) + return FALSE; + if (!xdr_bool (xdrs, &objp->fake_tx_drop)) + return FALSE; + if (!xdr_bool (xdrs, &objp->fake_trigger_fired)) + return FALSE; + if (!xdr_bool (xdrs, &objp->hold_tunnels)) + return FALSE; + if (!xdr_bool (xdrs, &objp->hold_sessions)) + return FALSE; + if (!xdr_bool (xdrs, &objp->no_random_ids)) + return FALSE; + if (!xdr_bool (xdrs, &objp->show_profile_usage)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_rx_drops)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tx_drops)) + return FALSE; + + } else { + objp->fake_rx_drop = IXDR_GET_BOOL(buf); + objp->fake_tx_drop = IXDR_GET_BOOL(buf); + objp->fake_trigger_fired = IXDR_GET_BOOL(buf); + objp->hold_tunnels = IXDR_GET_BOOL(buf); + objp->hold_sessions = IXDR_GET_BOOL(buf); + objp->no_random_ids = IXDR_GET_BOOL(buf); + objp->show_profile_usage = IXDR_GET_BOOL(buf); + objp->num_rx_drops = IXDR_GET_LONG(buf); + objp->num_tx_drops = IXDR_GET_LONG(buf); + } + if (!xdr_l2tp_api_test_trigger_type (xdrs, &objp->fake_trigger_type)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->session_id)) + return FALSE; + buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->num_tunnel_id_hash_hits)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tunnel_id_hash_misses)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tunnel_name_hash_hits)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tunnel_name_hash_misses)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_session_id_hash_hits)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_session_id_hash_misses)) + return FALSE; + } else { + objp->num_tunnel_id_hash_hits = IXDR_GET_LONG(buf); + objp->num_tunnel_id_hash_misses = IXDR_GET_LONG(buf); + objp->num_tunnel_name_hash_hits = IXDR_GET_LONG(buf); + objp->num_tunnel_name_hash_misses = IXDR_GET_LONG(buf); + objp->num_session_id_hash_hits = IXDR_GET_LONG(buf); + objp->num_session_id_hash_misses = IXDR_GET_LONG(buf); + } + return TRUE; + } + + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_bool (xdrs, &objp->fake_rx_drop)) + return FALSE; + if (!xdr_bool (xdrs, &objp->fake_tx_drop)) + return FALSE; + if (!xdr_bool (xdrs, &objp->fake_trigger_fired)) + return FALSE; + if (!xdr_bool (xdrs, &objp->hold_tunnels)) + return FALSE; + if (!xdr_bool (xdrs, &objp->hold_sessions)) + return FALSE; + if (!xdr_bool (xdrs, &objp->no_random_ids)) + return FALSE; + if (!xdr_bool (xdrs, &objp->show_profile_usage)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_rx_drops)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tx_drops)) + return FALSE; + if (!xdr_l2tp_api_test_trigger_type (xdrs, &objp->fake_trigger_type)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->session_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tunnel_id_hash_hits)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tunnel_id_hash_misses)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tunnel_name_hash_hits)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_tunnel_name_hash_misses)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_session_id_hash_hits)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_session_id_hash_misses)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_tunnel_delete_1_argument (XDR *xdrs, l2tp_tunnel_delete_1_argument *objp) +{ + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->reason)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_tunnel_get_1_argument (XDR *xdrs, l2tp_tunnel_get_1_argument *objp) +{ + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_name)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_session_delete_1_argument (XDR *xdrs, l2tp_session_delete_1_argument *objp) +{ + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_name)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->session_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->session_name)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->reason)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_session_get_1_argument (XDR *xdrs, l2tp_session_get_1_argument *objp) +{ + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_name)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->session_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->session_name)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_session_list_1_argument (XDR *xdrs, l2tp_session_list_1_argument *objp) +{ + if (!xdr_uint16_t (xdrs, &objp->tunnel_id)) + return FALSE; + if (!xdr_optstring (xdrs, &objp->tunnel_name)) + return FALSE; + return TRUE; +} + +bool_t +xdr_l2tp_peer_get_1_argument (XDR *xdrs, l2tp_peer_get_1_argument *objp) +{ + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->local_addr)) + return FALSE; + if (!xdr_l2tp_api_ip_addr (xdrs, &objp->peer_addr)) + return FALSE; + return TRUE; +} diff --git a/net/opennhrp/Makefile b/net/opennhrp/Makefile new file mode 100644 index 0000000..ef94129 --- /dev/null +++ b/net/opennhrp/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# Copyright (C) 2009 Jakob Pfeiffer +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=opennhrp +PKG_VERSION:=0.11.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/opennhrp +PKG_MD5SUM:=6f6f8571ccc0a9f97e52c6240fe9002a + +PKG_FIXUP:=libtool +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/opennhrp + SECTION:=net + CATEGORY:=Network + SUBMENU:=VPN + DEPENDS:=+libcares +ipsec-tools +ip +kmod-gre + TITLE:=NBMA Next Hop Resolution Protocol + URL:=http://opennhrp.sourceforge.net/ +endef + +define Package/opennhrp/description + OpenNHRP implements NBMA Next Hop Resolution Protocol (as defined in RFC 2332). + It makes it possible to create dynamic multipoint VPN Linux router using NHRP, + GRE and IPsec. It aims to be Cisco DMVPN compatible. +endef + +define Package/opennhrp/conffiles +/etc/opennhrp/opennhrp.conf +endef + +define Package/opennhrp/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/opennhrp{,ctl} $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/opennhrp + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/opennhrp/opennhrp.conf $(1)/etc/opennhrp/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/opennhrp/opennhrp-script $(1)/etc/opennhrp/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/opennhrp/racoon-ph1down.sh $(1)/etc/opennhrp/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/opennhrp.init $(1)/etc/init.d/opennhrp +endef + +$(eval $(call BuildPackage,opennhrp)) diff --git a/net/opennhrp/files/opennhrp.init b/net/opennhrp/files/opennhrp.init new file mode 100755 index 0000000..706e018 --- /dev/null +++ b/net/opennhrp/files/opennhrp.init @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009 OpenWrt.org +START=50 +# Copyright (C) 2009 Jakob Pfeiffer + +start() { + /usr/sbin/opennhrp -d +} + +stop() { + killall opennhrp +} + diff --git a/net/opennhrp/patches/100-compile-fix.patch b/net/opennhrp/patches/100-compile-fix.patch new file mode 100644 index 0000000..f822feb --- /dev/null +++ b/net/opennhrp/patches/100-compile-fix.patch @@ -0,0 +1,14 @@ +--- + nhrp/sysdep_netlink.c | 1 + + 1 file changed, 1 insertion(+) + +--- opennhrp-0.11.3.orig/nhrp/sysdep_netlink.c ++++ opennhrp-0.11.3/nhrp/sysdep_netlink.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/net/openntpd/Makefile b/net/openntpd/Makefile new file mode 100644 index 0000000..d6c139c --- /dev/null +++ b/net/openntpd/Makefile @@ -0,0 +1,75 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=openntpd +PKG_VERSION:=3.9p1 +PKG_RELEASE:=5 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/ \ + ftp://ftp.de.openbsd.org/pub/unix/OpenBSD/OpenNTPD/ \ + ftp://ftp.fr.openbsd.org/pub/OpenBSD/OpenNTPD/ \ + ftp://ftp.sunet.se/pub/OpenBSD/OpenNTPD/ +PKG_MD5SUM:=afc34175f38d08867c1403d9008600b3 + +include $(INCLUDE_DIR)/package.mk + +define Package/openntpd + SUBMENU:=Time Synchronization + SECTION:=net + CATEGORY:=Network + TITLE:=NTP server + URL:=http://www.openntpd.org/ +endef + +define Package/openntpd/description + A free and easy to use NTP (Network Time Protocol) implementation. +endef + +define Package/openntpd/conffiles +/etc/ntpd.conf +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --with-builtin-arc4random \ + --with-privsep-user=network \ + --with-adjtimex \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CFLAGS="$(TARGET_CFLAGS) -DUSE_ADJTIMEX" +endef + +define Package/openntpd/install + $(INSTALL_DIR) $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd $(1)/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/ntpd.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd +endef + +define Package/openntpd/postinst +#!/bin/sh +[ -L "$${IPKG_INSTROOT}/usr/sbin/ntpd" ] && rm -f "$${IPKG_INSTROOT}/usr/sbin/ntpd" +exit 0 +endef + +define Package/openntpd/postrm +#!/bin/sh +/bin/busybox ntpd -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/sbin/ntpd +exit 0 +endef + +$(eval $(call BuildPackage,openntpd)) diff --git a/net/openntpd/files/ntpd.conf b/net/openntpd/files/ntpd.conf new file mode 100644 index 0000000..4569c39 --- /dev/null +++ b/net/openntpd/files/ntpd.conf @@ -0,0 +1,6 @@ +# use a random selection of 8 public stratum 2 servers +# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers +server 0.openwrt.pool.ntp.org +server 1.openwrt.pool.ntp.org +server 2.openwrt.pool.ntp.org +server 3.openwrt.pool.ntp.org diff --git a/net/openntpd/files/ntpd.config b/net/openntpd/files/ntpd.config new file mode 100644 index 0000000..192ae7b --- /dev/null +++ b/net/openntpd/files/ntpd.config @@ -0,0 +1,3 @@ +config timezone + option posixtz "CET-1CEST,M3.5.0,M10.5.0/3" + option zoneinfo "Europe/Paris" diff --git a/net/openntpd/files/ntpd.hotplug b/net/openntpd/files/ntpd.hotplug new file mode 100644 index 0000000..dfd58d4 --- /dev/null +++ b/net/openntpd/files/ntpd.hotplug @@ -0,0 +1,12 @@ +case "${ACTION:-ifup}" in + ifup) + ps | grep -v 'grep' | grep -v '20-ntpd' | grep -q 'ntpd' || { + route -n 2>/dev/null | grep -q '^0.0.0.0' && { + /etc/init.d/ntpd enabled && /etc/init.d/ntpd start 2>/dev/null >/dev/null + } + } + ;; + ifdown) + route -n 2>/dev/null | grep -q '^0.0.0.0' || /etc/init.d/ntpd stop 2>/dev/null >/dev/null + ;; +esac diff --git a/net/openntpd/files/ntpd.init b/net/openntpd/files/ntpd.init new file mode 100644 index 0000000..ea5fc3b --- /dev/null +++ b/net/openntpd/files/ntpd.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2011 OpenWrt.org + +START=60 + +boot() { + return 0 +} + +start() { + mkdir -p `awk -F: '/^network:/{print $6}' /etc/passwd` + mkdir -p /var/db/ + /sbin/ntpd -s +} + +stop() { + service_kill ntpd +} diff --git a/net/openntpd/patches/001-adjtimex_linux.patch b/net/openntpd/patches/001-adjtimex_linux.patch new file mode 100644 index 0000000..3a02775 --- /dev/null +++ b/net/openntpd/patches/001-adjtimex_linux.patch @@ -0,0 +1,178 @@ +diff -urN openntpd-3.9p1/client.c openntpd-3.9p1.new/client.c +--- openntpd-3.9p1/client.c 2006-05-14 07:29:21.000000000 +0200 ++++ openntpd-3.9p1.new/client.c 2006-11-03 11:05:18.000000000 +0100 +@@ -321,7 +321,7 @@ + priv_adjtime(); + + for (i = 0; i < OFFSET_ARRAY_SIZE; i++) +- if (p->reply[i].rcvd <= p->reply[best].rcvd) ++ /* if (p->reply[i].rcvd <= p->reply[best].rcvd) */ + p->reply[i].good = 0; + + return (0); +diff -urN openntpd-3.9p1/configure.ac openntpd-3.9p1.new/configure.ac +--- openntpd-3.9p1/configure.ac 2006-05-14 07:29:23.000000000 +0200 ++++ openntpd-3.9p1.new/configure.ac 2006-11-03 11:06:26.000000000 +0100 +@@ -583,6 +583,12 @@ + [ builtin_arc4random=$withval ] + ) + ++AC_ARG_WITH(adjtimex, ++ [ --with-adjtimex Use adjtimex to adjust kernel skew], ++ [ AC_DEFINE(USE_ADJTIMEX, [], [Use adjust skew with adjtimex (experimental)]) ] ++) ++ ++ + AC_ARG_WITH(mantype, + [ --with-mantype=man|cat|doc Set man page type], + [ +diff -urN openntpd-3.9p1/defines.h openntpd-3.9p1.new/defines.h +--- openntpd-3.9p1/defines.h 2006-05-14 07:29:21.000000000 +0200 ++++ openntpd-3.9p1.new/defines.h 2006-11-03 11:06:56.000000000 +0100 +@@ -20,6 +20,10 @@ + # define setproctitle(x) + #endif + ++#ifdef USE_ADJTIMEX ++# define adjtime(a,b) (_compat_adjtime((a),(b))) ++#endif ++ + #if !defined(SA_LEN) + # if defined(HAVE_STRUCT_SOCKADDR_SA_LEN) + # define SA_LEN(x) ((x)->sa_len) +diff -urN openntpd-3.9p1/openbsd-compat/Makefile.in openntpd-3.9p1.new/openbsd-compat/Makefile.in +--- openntpd-3.9p1/openbsd-compat/Makefile.in 2006-05-14 07:29:19.000000000 +0200 ++++ openntpd-3.9p1.new/openbsd-compat/Makefile.in 2006-11-03 11:07:20.000000000 +0100 +@@ -9,7 +9,7 @@ + COMPAT= atomicio.o bsd-arc4random.o bsd-misc.o bsd-poll.o \ + bsd-snprintf.o bsd-getifaddrs.o bsd-setresuid.o \ + bsd-setresgid.o fake-rfc2553.o +-PORT= port-qnx.o ++PORT= port-linux.o port-qnx.o + + VPATH=@srcdir@ + CC=@CC@ +diff -urN openntpd-3.9p1/openbsd-compat/openbsd-compat.h openntpd-3.9p1.new/openbsd-compat/openbsd-compat.h +--- openntpd-3.9p1/openbsd-compat/openbsd-compat.h 2006-05-14 07:29:19.000000000 +0200 ++++ openntpd-3.9p1.new/openbsd-compat/openbsd-compat.h 2006-11-03 11:07:55.000000000 +0100 +@@ -46,6 +46,11 @@ + __attribute__((__format__ (printf, 2, 3))); + #endif + ++#ifdef USE_ADJTIMEX ++# include ++int _compat_adjtime(const struct timeval *, struct timeval *); ++#endif ++ + #ifndef HAVE_INET_PTON + int inet_pton(int, const char *, void *); + #endif +diff -urN openntpd-3.9p1/openbsd-compat/port-linux.c openntpd-3.9p1.new/openbsd-compat/port-linux.c +--- openntpd-3.9p1/openbsd-compat/port-linux.c 1970-01-01 01:00:00.000000000 +0100 ++++ openntpd-3.9p1.new/openbsd-compat/port-linux.c 2006-11-03 11:08:57.000000000 +0100 +@@ -0,0 +1,105 @@ ++/* $Id$ */ ++ ++/* ++ * Copyright (c) 2004 Darren Tucker ++ * ++ * Permission to use, copy, modify, and distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++#include "includes.h" ++ ++#ifdef USE_ADJTIMEX ++#include ++#include ++#ifdef adjtime ++# undef adjtime ++#endif ++ ++#include "ntpd.h" ++ ++/* scale factor used by adjtimex freq param. 1 ppm = 65536 */ ++#define ADJTIMEX_FREQ_SCALE 65536 ++ ++/* maximum change to skew per adjustment, in PPM */ ++#define MAX_SKEW_DELTA 5.0 ++ ++int ++_compat_adjtime(const struct timeval *delta, struct timeval *olddelta) ++{ ++ static struct timeval tlast = {0,0}; ++ static double tskew = 0; ++ static int synced = -1; ++ struct timeval tnow, tdelta; ++ double skew = 0, newskew, deltaskew, adjust, interval = 0; ++ struct timex tmx; ++ int result, saved_errno; ++ ++ gettimeofday(&tnow, NULL); ++ adjust = (double)delta->tv_sec; ++ adjust += (double)delta->tv_usec / 1000000; ++ ++ /* Even if the caller doesn't care about the olddelta, we do */ ++ if (olddelta == NULL) ++ olddelta = &tdelta; ++ ++ result = adjtime(delta, olddelta); ++ saved_errno = errno; ++ ++ if (olddelta->tv_sec == 0 && olddelta->tv_usec == 0 && ++ synced != INT_MAX) ++ synced++; ++ else ++ synced = 0; ++ ++ /* ++ * do skew calculations if we have synced ++ */ ++ if (synced == 0 ) { ++ tmx.modes = 0; ++ if (adjtimex(&tmx) == -1) ++ log_warn("adjtimex get failed"); ++ else ++ tskew = (double)tmx.freq / ADJTIMEX_FREQ_SCALE; ++ } else if (synced >= 1) { ++ interval = (double)(tnow.tv_sec - tlast.tv_sec); ++ interval += (double)(tnow.tv_usec - tlast.tv_usec) / 1000000; ++ ++ skew = (adjust * 1000000) / interval; ++ newskew = ((tskew * synced) + skew) / synced; ++ deltaskew = newskew - tskew; ++ ++ if (deltaskew > MAX_SKEW_DELTA) { ++ log_info("skew change %0.3lf exceeds limit", deltaskew); ++ tskew += MAX_SKEW_DELTA; ++ } else if (deltaskew < -MAX_SKEW_DELTA) { ++ log_info("skew change %0.3lf exceeds limit", deltaskew); ++ tskew -= MAX_SKEW_DELTA; ++ } else { ++ tskew = newskew; ++ } ++ ++ /* Adjust the kernel skew. */ ++ tmx.freq = (long)(tskew * ADJTIMEX_FREQ_SCALE); ++ tmx.modes = ADJ_FREQUENCY; ++ if (adjtimex(&tmx) == -1) ++ log_warn("adjtimex set freq failed"); ++ } ++ ++ log_debug("interval %0.3lf skew %0.3lf total skew %0.3lf", interval, ++ skew, tskew); ++ ++ tlast = tnow; ++ errno = saved_errno; ++ return result; ++} ++#endif diff --git a/net/openntpd/patches/002-save_freq_drift.patch b/net/openntpd/patches/002-save_freq_drift.patch new file mode 100644 index 0000000..2bc5bb2 --- /dev/null +++ b/net/openntpd/patches/002-save_freq_drift.patch @@ -0,0 +1,92 @@ +--- openntpd-3.9p1/ntpd.h 2006-05-14 07:29:21.000000000 +0200 ++++ openntpd-3.9p1new/ntpd.h 2007-02-03 23:51:56.000000000 +0100 +@@ -34,6 +34,7 @@ + #define NTPD_USER "_ntp" + #endif + #define CONFFILE SYSCONFDIR "/ntpd.conf" ++#define DRIFTFILE "/var/db/ntpd.drift" + + #define READ_BUF_SIZE 4096 + +--- openntpd-3.9p1/ntpd.c 2006-05-14 07:29:23.000000000 +0200 ++++ openntpd-3.9p1new/ntpd.c 2007-02-04 00:00:36.000000000 +0100 +@@ -45,6 +45,7 @@ + int dispatch_imsg(struct ntpd_conf *); + int ntpd_adjtime(double); + void ntpd_settime(double); ++void readfreq(void); + + volatile sig_atomic_t quit = 0; + volatile sig_atomic_t reconfig = 0; +@@ -153,7 +154,8 @@ + chld_pid = ntp_main(pipe_chld, &conf); + + setproctitle("[priv]"); +- ++ readfreq(); ++ + signal(SIGTERM, sighdlr); + signal(SIGINT, sighdlr); + signal(SIGCHLD, sighdlr); + +--- openntpd-3.9p1/openbsd-compat/port-linux.c 2007-02-03 20:52:20.000000000 +0100 ++++ openntpd-3.9p1new/openbsd-compat/port-linux.c 2007-02-04 01:02:16.000000000 +0100 +@@ -33,6 +33,49 @@ + /* maximum change to skew per adjustment, in PPM */ + #define MAX_SKEW_DELTA 5.0 + ++void ++writefreq(double d) ++{ ++ int r; ++ FILE *fp; ++ ++ fp = fopen(DRIFTFILE, "w"); ++ if (fp == NULL) ++ { ++ log_warn("opening drift file for writing failed"); ++ return; ++ } ++ ++ fprintf(fp, "%e\n", d); ++ r = ferror(fp); ++ if (fclose(fp) != 0 || r != 0) ++ { ++ unlink(DRIFTFILE); ++ log_warn("saving freq drift failed"); ++ } ++} ++ ++void ++readfreq(void) ++{ ++ FILE *fp; ++ double d; ++ struct timex tmx; ++ ++ fp = fopen(DRIFTFILE, "r"); ++ if (fp == NULL) ++ return; ++ ++ if (fscanf(fp, "%le", &d) == 1) ++ { ++ tmx.freq = (long)(d * ADJTIMEX_FREQ_SCALE); ++ tmx.modes = ADJ_FREQUENCY; ++ if (adjtimex(&tmx) == -1) ++ log_warn("adjtimex set freq failed"); ++ } ++ fclose(fp); ++} ++ + int + _compat_adjtime(const struct timeval *delta, struct timeval *olddelta) + { +@@ -93,6 +136,8 @@ + tmx.modes = ADJ_FREQUENCY; + if (adjtimex(&tmx) == -1) + log_warn("adjtimex set freq failed"); ++ ++ writefreq( tskew ); + } + + log_debug("interval %0.3lf skew %0.3lf total skew %0.3lf", interval, diff --git a/net/openntpd/patches/003-no_permission_check.patch b/net/openntpd/patches/003-no_permission_check.patch new file mode 100644 index 0000000..4391a30 --- /dev/null +++ b/net/openntpd/patches/003-no_permission_check.patch @@ -0,0 +1,11 @@ +--- a/ntp.c ++++ b/ntp.c +@@ -111,8 +111,6 @@ ntp_main(int pipe_prnt[2], struct ntpd_c + + if (stat(chrootdir, &stb) == -1) + fatal("stat"); +- if (stb.st_uid != 0 || (stb.st_mode & (S_IWGRP|S_IWOTH)) != 0) +- fatal("bad privsep dir permissions"); + if (chroot(chrootdir) == -1) + fatal("chroot"); + if (chdir("/") == -1) diff --git a/net/openrrcp/Makefile b/net/openrrcp/Makefile new file mode 100644 index 0000000..dad1f1f --- /dev/null +++ b/net/openrrcp/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=openrrcp +PKG_VERSION:=0.2.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://nording.ru/projects/download/openrrcp/stable +PKG_MD5SUM:=e3d6097732af812b03dbbbedeced34d2 + +include $(INCLUDE_DIR)/package.mk + +define Package/openrrcp + SECTION:=net + CATEGORY:=Network + TITLE:=OpenRRCP toolset for managing RRCP-capable Ethernet switches + URL:=http://openrrcp.org.ru/ +endef + +define Package/openrrcp/description + OpenRRCP toolset for managing RRCP-capable Ethernet switches +endef + +define Build/Compile + $(call Build/Compile/Default, \ + PREFIX="/usr" \ + ) +endef + +define Package/openrrcp/install + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(1)" \ + PREFIX="/usr" \ + install +endef + +$(eval $(call BuildPackage,openrrcp)) diff --git a/net/openser/Makefile b/net/openser/Makefile new file mode 100644 index 0000000..a75e201 --- /dev/null +++ b/net/openser/Makefile @@ -0,0 +1,339 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=openser +PKG_VERSION:=1.0.1 +PKG_RELEASE:=1 +PKG_MD5SUM:=eebc16665003ee92daf96b216d6f9563 +# PKG_VARIANT:=-tls # for tls version +PKG_VARIANT:= + +PKG_SOURCE_URL:=http://openser.org/pub/openser/$(PKG_VERSION)/src +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz + +include $(INCLUDE_DIR)/package.mk + +define Package/openser + SECTION:=net + CATEGORY:=Network + SUBMENU:=Telephony + TITLE:=Configurable, free SIP server + URL:=http://www.openser.org + MENU:=1 +endef + +define Package/openser/conffiles +/etc/openser/openser.cfg +endef + +define Package/openser-mod-acc + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=Accounting support + SUBMENU:=Telephony +endef + +define Package/openser-mod-auth + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=Authentication support + SUBMENU:=Telephony +endef + +define Package/openser-mod-auth-db + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=Authentication with database support + SUBMENU:=Telephony +endef + +define Package/openser-mod-auth-radius + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser +libradiusclient-ng + TITLE:=Authentication with RADIUS support + SUBMENU:=Telephony +endef + +define Package/openser-mod-avp-radius + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser +libradiusclient-ng + TITLE:=AVP with RADIUS support + SUBMENU:=Telephony +endef + +define Package/openser-mod-avpops + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=AVP options support + SUBMENU:=Telephony +endef + +define Package/openser-mod-dispatcher + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=Dispatcher support + SUBMENU:=Telephony +endef + +define Package/openser-mod-diversion + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=Diversion support + SUBMENU:=Telephony +endef + +define Package/openser-mod-flatstore + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=Flatstore support + SUBMENU:=Telephony +endef + +define Package/openser-mod-gflags + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=Gflags support + SUBMENU:=Telephony +endef + +define Package/openser-mod-group + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=Group support + SUBMENU:=Telephony +endef + +define Package/openser-mod-group-radius + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser +libradiusclient-ng + TITLE:=Group with RADIUS support + SUBMENU:=Telephony +endef + +define Package/openser-mod-lcr + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser openser-mod-mysql + TITLE:=Least Cost Routing support + SUBMENU:=Telephony +endef + +define Package/openser-mod-mediaproxy + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=Mediaproxy support + SUBMENU:=Telephony +endef + +define Package/openser-mod-msilo + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=MSilo support + SUBMENU:=Telephony +endef + +define Package/openser-mod-mysql + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser +libmysqlclient + TITLE:=MySQL support + SUBMENU:=Telephony +endef + +define Package/openser-mod-nathelper + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=NAT helper support + SUBMENU:=Telephony +endef + +define Package/openser-mod-options + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=Options support + SUBMENU:=Telephony +endef + +define Package/openser-mod-pdt + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=PDT support + SUBMENU:=Telephony +endef + +define Package/openser-mod-permissions + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=Permissions support + SUBMENU:=Telephony +endef + +define Package/openser-mod-pike + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=PIKE support + SUBMENU:=Telephony +endef + +define Package/openser-mod-sms + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=SMS support + SUBMENU:=Telephony +endef + +define Package/openser-mod-speeddial + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=Speeddial supporte + SUBMENU:=Telephony +endef + +define Package/openser-mod-uac + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=UAC support + SUBMENU:=Telephony +endef + +define Package/openser-mod-uac-redirect + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=UAC with redirect support + SUBMENU:=Telephony +endef + +define Package/openser-mod-uri + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=URI support + SUBMENU:=Telephony +endef + +define Package/openser-mod-uri-db + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser +openser-mod-mysql + TITLE:=URI with database support + SUBMENU:=Telephony +endef + +define Package/openser-mod-uri-radius + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser +libradiusclient-ng + TITLE:=URI with RADIUS support + SUBMENU:=Telephony +endef + +define Package/openser-mod-xlog + SECTION:=net + CATEGORY:=Network + DEPENDS:=openser + TITLE:=Advanced logging support + SUBMENU:=Telephony +endef + +# Select here the modules for the ipk package +OPENSER_MODULES := sl tm rr maxfwd usrloc registrar dbtext textops exec + +OPENSER_MODULE_FILES := $(foreach module,$(OPENSER_MODULES),modules/$(module)/$(module).so) +OPENSER_MODULES := $(patsubst %,modules/%,$(OPENSER_MODULES)) + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + prefix=/ \ + extra_defs="-DUSE_PTHREAD_MUTEX " \ + CC="$(TARGET_CC)" \ + ARCH="$(ARCH)" \ + CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ + LOCALBASE="$(STAGING_DIR)/usr" \ + all utils/gen_ha1/gen_ha1 +endef + +define Package/openser/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/utils/gen_ha1/gen_ha1 $(1)/usr/sbin/openser_gen_ha1 + $(CP) $(PKG_BUILD_DIR)/scripts/sc $(1)/usr/sbin/openserctl + chmod 744 $(1)/usr/sbin/openserctl + $(CP) $(PKG_BUILD_DIR)/scripts/sc.dbtext $(1)/usr/sbin/dbtextctl + chmod 744 $(1)/usr/sbin/dbtextctl + $(INSTALL_DIR) $(1)/usr/lib/openser/modules + (cd $(PKG_BUILD_DIR);\ + $(CP) $(OPENSER_MODULE_FILES) $(1)/usr/lib/openser/modules/; \ + ) + $(INSTALL_DIR) $(1)/etc/openser + $(CP) $(PKG_BUILD_DIR)/etc/openser.cfg $(1)/etc/openser/ +endef + +define BuildPlugin + define Package/$(1)/install + [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/openser/modules/ + $(CP) $(PKG_BUILD_DIR)/modules/$(2)/$(2).so \ + $$(1)/usr/lib/openser/modules/ ; + endef + + $$(eval $$(call BuildPackage,$(1))) +endef + +$(eval $(call BuildPackage,openser)) +$(eval $(call BuildPlugin,openser-mod-acc,acc)) +$(eval $(call BuildPlugin,openser-mod-auth,auth)) +$(eval $(call BuildPlugin,openser-mod-auth-db,auth_db)) +$(eval $(call BuildPlugin,openser-mod-auth-radius,auth_radius)) +$(eval $(call BuildPlugin,openser-mod-avp-radius,avp_radius)) +$(eval $(call BuildPlugin,openser-mod-avpops,avpops)) +$(eval $(call BuildPlugin,openser-mod-dispatcher,dispatcher)) +$(eval $(call BuildPlugin,openser-mod-diversion,diversion)) +$(eval $(call BuildPlugin,openser-mod-flatstore,flatstore)) +$(eval $(call BuildPlugin,openser-mod-gflags,gflags)) +$(eval $(call BuildPlugin,openser-mod-group,group)) +$(eval $(call BuildPlugin,openser-mod-group-radius,group_radius)) +$(eval $(call BuildPlugin,openser-mod-lcr,lcr)) +$(eval $(call BuildPlugin,openser-mod-mediaproxy,mediaproxy)) +$(eval $(call BuildPlugin,openser-mod-msilo,msilo)) +$(eval $(call BuildPlugin,openser-mod-mysql,mysql)) +$(eval $(call BuildPlugin,openser-mod-nathelper,nathelper)) +$(eval $(call BuildPlugin,openser-mod-options,options)) +$(eval $(call BuildPlugin,openser-mod-pdt,pdt)) +$(eval $(call BuildPlugin,openser-mod-permissions,permissions)) +$(eval $(call BuildPlugin,openser-mod-pike,pike)) +$(eval $(call BuildPlugin,openser-mod-sms,sms)) +$(eval $(call BuildPlugin,openser-mod-speeddial,speeddial)) +$(eval $(call BuildPlugin,openser-mod-uac,uac)) +$(eval $(call BuildPlugin,openser-mod-uac-redirect,uac_redirect)) +$(eval $(call BuildPlugin,openser-mod-uri,uri)) +$(eval $(call BuildPlugin,openser-mod-uri-db,uri_db)) +$(eval $(call BuildPlugin,openser-mod-uri-radius,uri_radius)) +$(eval $(call BuildPlugin,openser-mod-xlog,xlog)) diff --git a/net/openser/patches/001-openser_cfg.patch b/net/openser/patches/001-openser_cfg.patch new file mode 100644 index 0000000..f26e79e --- /dev/null +++ b/net/openser/patches/001-openser_cfg.patch @@ -0,0 +1,33 @@ +--- openser-1.0.0-tls.orig/etc/openser.cfg 2005-10-28 21:45:33.000000000 +0200 ++++ openser-1.0.0-tls/etc/openser.cfg 2006-01-07 01:39:01.077134312 +0100 +@@ -36,20 +36,20 @@ + # ------------------ module loading ---------------------------------- + + # Uncomment this if you want to use SQL database +-#loadmodule "/usr/local/lib/openser/modules/mysql.so" ++#loadmodule "/usr/lib/openser/modules/mysql.so" + +-loadmodule "/usr/local/lib/openser/modules/sl.so" +-loadmodule "/usr/local/lib/openser/modules/tm.so" +-loadmodule "/usr/local/lib/openser/modules/rr.so" +-loadmodule "/usr/local/lib/openser/modules/maxfwd.so" +-loadmodule "/usr/local/lib/openser/modules/usrloc.so" +-loadmodule "/usr/local/lib/openser/modules/registrar.so" +-loadmodule "/usr/local/lib/openser/modules/textops.so" ++loadmodule "/usr/lib/openser/modules/sl.so" ++loadmodule "/usr/lib/openser/modules/tm.so" ++loadmodule "/usr/lib/openser/modules/rr.so" ++loadmodule "/usr/lib/openser/modules/maxfwd.so" ++loadmodule "/usr/lib/openser/modules/usrloc.so" ++loadmodule "/usr/lib/openser/modules/registrar.so" ++loadmodule "/usr/lib/openser/modules/textops.so" + + # Uncomment this if you want digest authentication + # mysql.so must be loaded ! +-#loadmodule "/usr/local/lib/openser/modules/auth.so" +-#loadmodule "/usr/local/lib/openser/modules/auth_db.so" ++#loadmodule "/usr/lib/openser/modules/auth.so" ++#loadmodule "/usr/lib/openser/modules/auth_db.so" + + # ----------------- setting module-specific parameters --------------- + diff --git a/net/openser/patches/002-sc.patch b/net/openser/patches/002-sc.patch new file mode 100644 index 0000000..52ef9a6 --- /dev/null +++ b/net/openser/patches/002-sc.patch @@ -0,0 +1,41 @@ +--- openser-1.0.0-tls.orig/scripts/sc 2005-08-11 14:08:02.000000000 +0200 ++++ openser-1.0.0-tls/scripts/sc 2006-01-29 02:18:43.319054456 +0100 +@@ -48,11 +48,15 @@ + STARTOPTIONS= # for example -dddd + fi + if [ -z "$DIR" ] ; then +- DIR=`dirname $0` ++ DIR=/usr/sbin + fi + if [ -z "$SERBIN" ] ; then + SERBIN=$DIR/openser + fi ++if [ -z "$SIP_DOMAIN" ] ; then ++ SIP_DOMAIN=$(nvram get sip_domain) ++fi ++ + + ##### ----------------------------------------------- ##### + ### openser's FIFO server +@@ -415,7 +419,7 @@ + fi + + if [ -z "$SERDOMAIN" ] ; then +- echo "domain unknown: use usernames with domain or set default domain in SIP_DOMAIN" ++ echo "domain unknown: use usernames with domain or set default domain in SIP_DOMAIN (with 'nvram set sip_domain=YOUR_SIP_DOMAIN')" + exit 1 + fi + } +@@ -671,11 +675,7 @@ + set_user $2 + fifo_cmd ul_show_contact $USRLOC_TABLE "$SERUSER@$SERDOMAIN" + elif [ $# -eq 1 ] ; then +- printf "Dumping all contacts may take long: are you sure you want to proceed? [Y|N] " > /dev/stderr +- read answer +- if [ "$answer" = "y" -o "$answer" = "Y" ] ; then +- fifo_cmd ul_dump +- fi ++ fifo_cmd ul_dump + else + echo "wrong number of params for usrloc show" + usage diff --git a/net/openser/patches/003-makefile_defs.patch b/net/openser/patches/003-makefile_defs.patch new file mode 100644 index 0000000..a7275bd --- /dev/null +++ b/net/openser/patches/003-makefile_defs.patch @@ -0,0 +1,71 @@ +--- openser-1.0.0-tls.orig/Makefile.defs 2005-10-28 18:32:39.000000000 +0200 ++++ openser-1.0.0-tls/Makefile.defs 2006-01-15 23:40:18.391547040 +0100 +@@ -917,7 +917,7 @@ + endif + YACC_FLAGS=-d -b cfg + # on solaris add -lxnet (e.g. LIBS= -lxnet) +-LIBS= -lfl -ldl -lresolv ++LIBS= -ldl -lresolv + + + #os specific stuff +@@ -955,7 +955,7 @@ + endif + OLD_SOLARIS= $(shell echo "$(OSREL)" | \ + sed -e 's/^5\.[0-6][^0-9]*$$/yes/' ) +- LIBS+= -L$(LOCALBASE)/lib -lfl -lxnet -lnsl ++ LIBS+= -L$(LOCALBASE)/lib -lxnet -lnsl + ifeq ($(OLD_SOLARIS), yes) + LIBS+=-lposix4 + else +@@ -970,9 +970,9 @@ + ifneq ($(found_lock_method), yes) + DEFS+= -DUSE_PTHREAD_MUTEX # try pthread sems + found_lock_method=yes +- LIBS= -pthread -lfl #dlopen is in libc ++ LIBS= -pthread #dlopen is in libc + else +- LIBS= -lfl #dlopen is in libc ++ LIBS= #dlopen is in libc + endif + YACC=yacc + endif +@@ -987,7 +987,7 @@ + # (symbols on openbsd are prefixed by "_") + YACC=yacc + # no sched_yield on openbsd unless linking with c_r (not recommended) +- LIBS= -lfl ++ LIBS= + OPENBSD_IS_AOUT= $(shell echo "$(OSREL)" | \ + sed -e 's/^3\.[0-3][^0-9]*$$/yes/' |sed -e 's/^[0-2]\..*/yes/') + # exception: on sparc openbsd 3.2 is elf and not aout +@@ -1014,7 +1014,7 @@ + found_lock_method=yes + endif + YACC=yacc +- LIBS= -lfl ++ LIBS= + endif + + # OS X support, same as freebsd +@@ -1028,9 +1028,9 @@ + ifneq ($(found_lock_method), yes) + DEFS+= -DUSE_PTHREAD_MUTEX # try pthread sems + found_lock_method=yes +- LIBS= -pthread -lfl -lresolv #dlopen is in libc ++ LIBS= -pthread -lresolv #dlopen is in libc + else +- LIBS= -lfl -lresolv #dlopen is in libc ++ LIBS= -lresolv #dlopen is in libc + endif + LDFLAGS= # darwin doesn't like -O2 or -E + MOD_LDFLAGS= -bundle -bundle_loader ../../$(MAIN_NAME) +@@ -1047,7 +1047,7 @@ + + #add libssl if needed + ifneq ($(TLS),) +-DEFS+= -I$(LOCALBASE)/ssl/include ++DEFS+= -I$(LOCALBASE)/include + LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto + endif + diff --git a/net/openser/patches/004-cfg_lex.patch b/net/openser/patches/004-cfg_lex.patch new file mode 100644 index 0000000..39eacb2 --- /dev/null +++ b/net/openser/patches/004-cfg_lex.patch @@ -0,0 +1,13 @@ +--- openser-1.0.0-tls.orig/cfg.lex 2005-09-02 17:34:41.000000000 +0200 ++++ openser-1.0.0-tls/cfg.lex 2006-01-05 01:34:50.279630928 +0100 +@@ -85,6 +85,10 @@ + static char* addstr(struct str_buf *, char*, int); + static void count(); + ++ int yywrap(void) ++ { ++ return 1; ++ } + + %} + diff --git a/net/openser/patches/005-config_h.patch b/net/openser/patches/005-config_h.patch new file mode 100644 index 0000000..45af8f1 --- /dev/null +++ b/net/openser/patches/005-config_h.patch @@ -0,0 +1,33 @@ +--- openser-1.0.0-tls.orig/config.h 2005-08-23 19:31:12.000000000 +0200 ++++ openser-1.0.0-tls/config.h 2006-01-05 01:42:14.101159800 +0100 +@@ -48,7 +48,7 @@ + #define MAX_LISTEN 16 + + /* default number of child processes started */ +-#define CHILD_NO 8 ++#define CHILD_NO 4 + + #define RT_NO 40 /* routing tables number */ + #define FAILURE_RT_NO RT_NO /* on_failure routing tables number */ +@@ -68,10 +68,10 @@ + #define CONTENT_LENGTH "Content-Length: " + #define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1) + +-#define USER_AGENT "User-Agent: OpenSer (" VERSION " (" ARCH "/" OS"))" ++#define USER_AGENT "User-Agent: OpenSer " VERSION " (boozy.milkfish.org)" + #define USER_AGENT_LEN (sizeof(USER_AGENT)-1) + +-#define SERVER_HDR "Server: OpenSer (" VERSION " (" ARCH "/" OS"))" ++#define SERVER_HDR "Server: OpenSer " VERSION " (boozy.milkfish.org)" + #define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1) + + #define MAX_WARNING_LEN 256 +@@ -113,7 +113,7 @@ + #define PKG_MEM_POOL_SIZE 1024*1024 + + /*used if SH_MEM is defined*/ +-#define SHM_MEM_SIZE 32 ++#define SHM_MEM_SIZE 8 + + #define TIMER_TICK 1 + diff --git a/net/openser/patches/006-sc_dbtext.patch b/net/openser/patches/006-sc_dbtext.patch new file mode 100644 index 0000000..2a1b7ea --- /dev/null +++ b/net/openser/patches/006-sc_dbtext.patch @@ -0,0 +1,22 @@ +--- openser-1.0.0-tls.orig/scripts/sc.dbtext 2005-07-29 21:05:36.000000000 +0200 ++++ openser-1.0.0-tls/scripts/sc.dbtext 2006-01-29 02:30:31.795349688 +0100 +@@ -62,6 +62,10 @@ + ##### ----------------------------------------------- ##### + #### table names + ++if [ -z "$SIP_DOMAIN" ] ; then ++ SIP_DOMAIN=$(nvram get sip_domain) ++fi ++ + # UsrLoc Table + if [ -z "$UL_TABLE" ] ; then + UL_TABLE=location +@@ -247,7 +251,7 @@ + fi + + if [ -z "$SERDOMAIN" ] ; then +- echo -e "\nDomain unknown: use usernames with domain or set default domain in SIP_DOMAIN\n" ++ echo -e "\nDomain unknown: use usernames with domain or set default domain in SIP_DOMAIN (with 'nvram set sip_domain=YOUR_SIP_DOMAIN')\n" + exit 1 + fi + } diff --git a/net/openser/patches/007-modules_build.patch b/net/openser/patches/007-modules_build.patch new file mode 100644 index 0000000..bdc9f65 --- /dev/null +++ b/net/openser/patches/007-modules_build.patch @@ -0,0 +1,57 @@ +--- openser-1.0.1/Makefile 2006-02-15 20:52:21.000000000 +0100 ++++ openser-1.0.1.new/Makefile 2006-03-17 11:01:27.417488936 +0100 +@@ -46,8 +46,7 @@ + skip_modules?= + + # if not set on the cmd. line or the env, exclude this modules: +-exclude_modules?= jabber cpl-c pa postgres mysql \ +- avp_radius auth_radius group_radius uri_radius ++exclude_modules?= jabber cpl-c pa postgres + # always exclude the CVS dir + override exclude_modules+= CVS $(skip_modules) + +diff -urN openser-1.0.1/modules/acc/Makefile openser-1.0.1.new/modules/acc/Makefile +--- openser-1.0.1/modules/acc/Makefile 2005-09-05 21:32:02.000000000 +0200 ++++ openser-1.0.1.new/modules/acc/Makefile 2006-03-17 10:38:14.333269928 +0100 +@@ -14,8 +14,8 @@ + DEFS+=-DSQL_ACC + + # uncomment the next two lines if you wish to enable RADIUS accounting +-#DEFS+=-DRAD_ACC -I$(LOCALBASE)/include +-#LIBS=-L$(LOCALBASE)/lib -lradiusclient-ng ++DEFS+=-DRAD_ACC -I$(LOCALBASE)/include ++LIBS=-L$(LOCALBASE)/lib -lradiusclient-ng + + # uncomment the next two lines if you wish to enable DIAMETER accounting + #DEFS+=-DDIAM_ACC +diff -urN openser-1.0.1/modules/mysql/Makefile openser-1.0.1.new/modules/mysql/Makefile +--- openser-1.0.1/modules/mysql/Makefile 2005-06-13 18:47:40.000000000 +0200 ++++ openser-1.0.1.new/modules/mysql/Makefile 2006-03-17 11:12:16.218856136 +0100 +@@ -9,14 +9,12 @@ + # mysql.h locations (freebsd,openbsd solaris) + DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/mysql \ + -I$(LOCALBASE)/mysql/include \ +- -I/usr/include/mysql + + # libmysqlclient locations on RH/Suse, Solaris /OpenBSD, FreeBSD + # (Debian does the right thing and puts it in /usr/lib) + LIBS=-L/usr/lib/mysql -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/mysql \ + -L$(LOCALBASE)/mysql/lib/mysql/ \ + -L$(LOCALBASE)/mysql/lib \ +- -L/usr/lib64/mysql \ + -lmysqlclient -lz + + include ../../Makefile.modules +diff -urN openser-1.0.1/modules/postgres/Makefile openser-1.0.1.new/modules/postgres/Makefile +--- openser-1.0.1/modules/postgres/Makefile 2005-07-01 16:52:34.000000000 +0200 ++++ openser-1.0.1.new/modules/postgres/Makefile 2006-03-17 11:13:22.150832952 +0100 +@@ -7,8 +7,7 @@ + NAME=postgres.so + + # libpq-fe.h locations +-DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/pgsql/include \ +- -I/usr/include/postgresql -I/usr/include/postgresql/8.0 ++DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/pgsql/include -I$(LOCALBASE)/include/postgresql + LIBS=-L$(LOCALBASE)/lib -L$(LOCALBASE)/pgsql/lib -L$(LOCALBASE)/lib/pgsql \ + -lpq + diff --git a/net/opensips/Makefile b/net/opensips/Makefile new file mode 100644 index 0000000..288e9cc --- /dev/null +++ b/net/opensips/Makefile @@ -0,0 +1,272 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=opensips +PKG_VERSION:=1.5.3 +PKG_RELEASE:=1 +PKG_VARIANT:=-tls + +PKG_SOURCE_URL:=http://opensips.org/pub/opensips/$(PKG_VERSION)/src +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz +PKG_MD5SUM:=8a03167420c31da15405bed7630ed3e2 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)$(PKG_VARIANT) + +PKG_BUILD_DEPENDS:=curl expat libxml2 mysql openldap openssl pcre postgresql radiusclient-ng + +include $(INCLUDE_DIR)/package.mk + +TARGET_CFLAGS += $(FPIC) + +define Package/opensips/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Telephony + URL:=http://www.opensips.org/ +endef + + +define Package/opensips +$(call Package/opensips/Default) + TITLE:=Open SIP Server + MENU:=1 +endef + +define Package/opensips-example +$(call Package/opensips/Default) + TITLE:=OpenSIPS example config + DEPENDS:=opensips \ + +opensips-mod-acc \ + +opensips-mod-maxfwd \ + +opensips-mod-mi-fifo \ + +opensips-mod-registrar \ + +opensips-mod-rr \ + +opensips-mod-signaling \ + +opensips-mod-sl \ + +opensips-mod-textops \ + +opensips-mod-tm \ + +opensips-mod-uri \ + +opensips-mod-uri-db \ + +opensips-mod-usrloc \ + +opensips-mod-xlog +endef + +define Package/opensips-example/conffiles +/etc/default/opensips +/etc/opensips/opensips.cfg +endef + + +define Package/opensips-tools +$(call Package/opensips/Default) + TITLE:=OpenSIPS control tools + DEPENDS:=opensips +endef + +define Package/opensips-tools/conffiles +/etc/opensips/opensipsctlrc +endef + + +PKG_EXCL_MODULES:= \ + auth_diameter \ + carrierroute \ + db_berkeley \ + db_oracle \ + db_unixodbc \ + mediaproxy \ + mi_xmlrpc \ + mmgeoip \ + osp \ + perl \ + perlvdb \ + snmpstats \ + +PKG_MAKE_ARGS:= \ + cfg-dir="etc/opensips/" \ + bin-dir="usr/sbin/" \ + data-dir="var/lib/opensips/" \ + lib-dir="usr/lib/opensips/" \ + modules-dir="usr/lib/opensips/modules/" \ + exclude_modules="$(PKG_EXCL_MODULES)" \ + + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) \ + prefix=/ \ + extra_defs="-DUSE_PTHREAD_MUTEX " \ + CC="$(TARGET_CC)" \ + ARCH="$(ARCH)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + ISSMP="no" \ + LOCALBASE="$(STAGING_DIR)/usr" \ + SYSBASE="$(STAGING_DIR)/usr" \ + PCRECFG= \ + all + $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install +endef + +define Package/opensips/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) \ + $(PKG_INSTALL_DIR)/usr/sbin/opensips \ + $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/opensips/modules +endef + +define Package/opensips-example/install + $(INSTALL_DIR) $(1)/etc/opensips + $(CP) \ + $(PKG_INSTALL_DIR)/etc/opensips/opensips.cfg \ + $(1)/etc/opensips/ + $(SED) 's,$(PKG_INSTALL_DIR),,g' \ + $(1)/etc/opensips/opensips.cfg + $(INSTALL_DIR) $(1)/etc/default + $(INSTALL_DATA) ./files/opensips.default $(1)/etc/default/opensips + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/opensips.init $(1)/etc/init.d/opensips +endef + +define Package/opensips-tools/install + $(INSTALL_DIR) $(1)/etc/opensips + $(CP) \ + $(PKG_INSTALL_DIR)/etc/opensips/opensipsctlrc \ + $(1)/etc/opensips/ + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) \ + $(PKG_INSTALL_DIR)/usr/sbin/opensips{ctl,dbctl,unix} \ + $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/opensips + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/opensips/opensipsctl \ + $(1)/usr/lib/opensips/ + $(SED) 's,/bin/bash,/bin/sh,g' \ + -e 's,$(PKG_INSTALL_DIR),,g' \ + $(1)/usr/sbin/opensips{ctl,dbctl} +endef + +define BuildPlugin + define Package/opensips-mod-$(1) + $$(call Package/opensips/Default) + TITLE:= OpenSIPS $(3) module + DEPENDS:=opensips $$(foreach m,$(4),+opensips-mod-$$m) $(5) + endef + + define Package/opensips-mod-$(1)/install + [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/opensips/modules/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/opensips/modules/$(2).so \ + $$(1)/usr/lib/opensips/modules/ ; + endef + + $$(eval $$(call BuildPackage,opensips-mod-$(1))) +endef + +$(eval $(call BuildPackage,opensips)) +$(eval $(call BuildPackage,opensips-example)) +$(eval $(call BuildPackage,opensips-tools)) +$(eval $(call BuildPlugin,acc,acc,Accounting,tm,)) +$(eval $(call BuildPlugin,alias-db,alias_db,Database-backend aliases,,)) +$(eval $(call BuildPlugin,auth,auth,Authentication Framework,signaling,)) +$(eval $(call BuildPlugin,auth-db,auth_db,Database-backend authentication,auth,)) +$(eval $(call BuildPlugin,auth-radius,auth_radius,RADIUS-backend authentication,auth,+libradiusclient-ng)) +$(eval $(call BuildPlugin,avp-radius,avp_radius,RADIUS-backend for AVP loading,,+libradiusclient-ng)) +$(eval $(call BuildPlugin,avpops,avpops,AVP operation,,)) +$(eval $(call BuildPlugin,benchmark,benchmark,Config benchmark,,)) +$(eval $(call BuildPlugin,call-control,call_control,Prepair application,dialog,)) +#$(eval $(call BuildPlugin,carrierroute,carrierroute,Carrier Routing,,+libconfuse)) +$(eval $(call BuildPlugin,cfgutils,cfgutils,Config utilities,,)) +$(eval $(call BuildPlugin,closeddial,closeddial,PBX-like features,,)) +$(eval $(call BuildPlugin,cpl-c,cpl-c,Call Processing language interpreter,tm sl usrloc,+libxml2)) +#$(eval $(call BuildPlugin,db-berkeley,db_berkeley,Berkeley DB Database-backend,,)) +$(eval $(call BuildPlugin,db-flatstore,db_flatstore,Fast writing-only text database-backed,,)) +$(eval $(call BuildPlugin,db-mysql,db_mysql,MySQL database-backend,,+libmysqlclient)) +#$(eval $(call BuildPlugin,db-oracle,db_oracle,Oracle Database-backend,,)) +$(eval $(call BuildPlugin,db-postgres,db_postgres,PostgreSQL Database-backend,,+libpq)) +$(eval $(call BuildPlugin,db-text,db_text,Text database-backend,,)) +#$(eval $(call BuildPlugin,db-unixodbc,db_unixodbc,UnixODBC Database-backend,,)) +$(eval $(call BuildPlugin,dialog,dialog,Dialog support,rr tm,)) +$(eval $(call BuildPlugin,dialplan,dialplan,Dialplan management,,)) +$(eval $(call BuildPlugin,dispatcher,dispatcher,Dispatcher,,)) +$(eval $(call BuildPlugin,diversion,diversion,Diversion header insertion,,)) +$(eval $(call BuildPlugin,domain,domain,Multi-domain support,,)) +$(eval $(call BuildPlugin,domainpolicy,domainpolicy,Domain policy,,)) +$(eval $(call BuildPlugin,drouting,drouting,Dynaming routing,,)) +$(eval $(call BuildPlugin,enum,enum,ENUM lookup,,)) +$(eval $(call BuildPlugin,exec,exec,External exec,,)) +$(eval $(call BuildPlugin,gflags,gflags,Global shared flags,,)) +$(eval $(call BuildPlugin,group,group,Database-backend user-groups,,)) +$(eval $(call BuildPlugin,group-radius,group_radius,RADIUS-backend user-groups,,)) +$(eval $(call BuildPlugin,h350,h350,H.350,ldap,+libopenldap)) +$(eval $(call BuildPlugin,identity,identity,Identity,,+libopenssl)) +$(eval $(call BuildPlugin,imc,imc,IM conferencing,db-mysql tm,)) +$(eval $(call BuildPlugin,jabber,jabber,Jabber,tm,+libexpat)) +$(eval $(call BuildPlugin,lcr,lcr,Least Cost Routing,tm,)) +$(eval $(call BuildPlugin,ldap,ldap,LDAP connector,,+libopenldap)) +$(eval $(call BuildPlugin,load_balancer,load_balancer,Load balancer,dialog,)) +$(eval $(call BuildPlugin,localcache,localcache,Local cache,,)) +$(eval $(call BuildPlugin,mangler,mangler,SIP mangler,,)) +$(eval $(call BuildPlugin,maxfwd,maxfwd,Max-Forward processor,,)) +$(eval $(call BuildPlugin,mi-datagram,mi_datagram,Datagram support for Management Interface,,)) +$(eval $(call BuildPlugin,mi-fifo,mi_fifo,FIFO support for Management Interface,,)) +#$(eval $(call BuildPlugin,mi-xmlrpc,mi_xmlrpc,XML-RPC support for Management Interface,,+xmlrpc-c)) +#$(eval $(call BuildPlugin,mediaproxy,mediaproxy,NAT traversal,,+mediaproxy)) +#$(eval $(call BuildPlugin,mmgeoip,mmgeoip,MaxMind GeoIP,,+libgeoip)) +$(eval $(call BuildPlugin,msilo,msilo,SIP message silo,tm,)) +$(eval $(call BuildPlugin,nat_traversal,nat_traversal,NAT traversal,dialog sl tm,)) +$(eval $(call BuildPlugin,nathelper,nathelper,NAT traversal helper,,+rtpproxy)) +$(eval $(call BuildPlugin,options,options,OPTIONS server replier,sl,)) +#$(eval $(call BuildPlugin,osp,osp,OSP peering,auth rr sl tm textops,+libosp)) +$(eval $(call BuildPlugin,path,path,SIP path insertion,rr,)) +$(eval $(call BuildPlugin,pdt,pdt,Prefix-to-Domain translator,,)) +$(eval $(call BuildPlugin,peering,peering,Perring,,+libradiusclient-ng)) +#$(eval $(call BuildPlugin,perl,perl,Perl,sl,+perl)) +#$(eval $(call BuildPlugin,perlvdb,perlvdb,Perl Virtual DB,perl,)) +$(eval $(call BuildPlugin,permissions,permissions,Permissions control,,)) +$(eval $(call BuildPlugin,pike,pike,Flood detector,,)) +$(eval $(call BuildPlugin,presence,presence,Presence server,signaling,+libxml2)) +$(eval $(call BuildPlugin,presence-dialoginfo,presence_dialoginfo,Dialog Event presence,presence,)) +$(eval $(call BuildPlugin,presence-mwi,presence_mwi,Message Waiting Indication presence,presence,)) +$(eval $(call BuildPlugin,presence-xcapdiff,presence_xcapdiff,XCAP-Diff presence,presence pua,)) +$(eval $(call BuildPlugin,presence-xml,presence_xml,XCAP presence,presence xcap-client,)) +$(eval $(call BuildPlugin,pua,pua,Presence User Agent,tm,+libxml2)) +$(eval $(call BuildPlugin,pua-bla,pua_bla,Bridged Line Appearence PUA,presence pua usrloc,)) +$(eval $(call BuildPlugin,pua-dialoginfo,pua_dialoginfo,Dialog Event PUA,dialog pua,)) +$(eval $(call BuildPlugin,pua-mi,pua_mi,PUA Management Interface,pua,)) +$(eval $(call BuildPlugin,pua-usrloc,pua_usrloc,PUA User Location,pua usrloc,)) +$(eval $(call BuildPlugin,pua-xmpp,pua_xmpp,PUA XMPP,presence pua xmpp,)) +$(eval $(call BuildPlugin,qos,qos,QoS control,dialog,)) +$(eval $(call BuildPlugin,ratelimit,ratelimit,Traffic shapping,,)) +$(eval $(call BuildPlugin,regex,regex,Regular Expression,,+libpcre)) +$(eval $(call BuildPlugin,registrar,registrar,SIP Registrar,signaling usrloc,)) +$(eval $(call BuildPlugin,rls,rls,Resource List Server,presence pua signaling tm,+libxml2)) +$(eval $(call BuildPlugin,rr,rr,Record-Route and Route,,)) +$(eval $(call BuildPlugin,seas,seas,SIP Express Application Server,tm,)) +$(eval $(call BuildPlugin,signaling,signaling,Signaling,sl tm,)) +$(eval $(call BuildPlugin,siptrace,siptrace,SIP trace,,)) +$(eval $(call BuildPlugin,sl,sl,Stateless replier,,)) +$(eval $(call BuildPlugin,sms,sms,SIP-to-SMS IM gateway,tm,)) +#$(eval $(call BuildPlugin,snmpstats,snmpstats,SNMP,presence usrloc,+libnetsnmp)) +$(eval $(call BuildPlugin,speeddial,speeddial,Per-user speed-dial controller,,)) +$(eval $(call BuildPlugin,statistics,statistics,Script statistics,,)) +$(eval $(call BuildPlugin,sst,sst,SIP Session Timer,dialog sl,)) +$(eval $(call BuildPlugin,textops,textops,Text operations,,)) +$(eval $(call BuildPlugin,tlsops,tlsops,TLS operations,,+libopenssl)) +$(eval $(call BuildPlugin,tm,tm,Transaction,,)) +$(eval $(call BuildPlugin,uac,uac,User Agent Client,tm,)) +$(eval $(call BuildPlugin,uac-redirect,uac_redirect,User Agent Client redirection,tm,)) +$(eval $(call BuildPlugin,uri,uri,Generic URI operation,,)) +$(eval $(call BuildPlugin,uri-db,uri_db,Database-backend SIP URI checking,,)) +$(eval $(call BuildPlugin,uri-radius,uri_radius,RADIUS-backend SIP URI checking,,+libradiusclient-ng)) +$(eval $(call BuildPlugin,userblacklist,userblacklist,User blacklists,,)) +$(eval $(call BuildPlugin,usrloc,usrloc,User location,,)) +$(eval $(call BuildPlugin,xcap-client,xcap_client,XCAP Client,,+libcurl +libxml2)) +$(eval $(call BuildPlugin,xlog,xlog,Advanced logger,,)) +$(eval $(call BuildPlugin,xmpp,xmpp,SIP-to-XMPP Gateway,tm,+libexpat)) diff --git a/net/opensips/files/opensips.default b/net/opensips/files/opensips.default new file mode 100644 index 0000000..a61617b --- /dev/null +++ b/net/opensips/files/opensips.default @@ -0,0 +1,13 @@ +# OPTIONS +# -n COUNT +# Specifies the number of children processes forked per interface +# -N COUNT +# Specifies the number of children processes forked to handle tcp incoming connections +# -m SIZE +# Size of the shared memory which will be allocated (in Megabytes). +# -u UID +# Changes the user id under which +# -g GID +# Changes the group id under which + +OPTIONS="-n 4 -m 4 - m 8" diff --git a/net/opensips/files/opensips.init b/net/opensips/files/opensips.init new file mode 100755 index 0000000..32654da --- /dev/null +++ b/net/opensips/files/opensips.init @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009 OpenWrt.org +START=50 + +BIN=opensips +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $RUN_D + $BIN -P $PID_F $OPTIONS >/dev/null 2>&1 +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + diff --git a/net/opensips/patches/001-no_rej.patch b/net/opensips/patches/001-no_rej.patch new file mode 100644 index 0000000..066249a --- /dev/null +++ b/net/opensips/patches/001-no_rej.patch @@ -0,0 +1,21 @@ +--- a/pvar.c.rej ++++ /dev/null +@@ -1,18 +0,0 @@ +-*************** +-*** 2409,2415 **** +- LM_ERR("invalid socket specification\n"); +- return -1; +- } +-- si = grep_sock_info(&host, (unsigned short)port, +- (unsigned short)proto); +- if (si==NULL) +- return -1; +---- 2409,2416 ---- +- LM_ERR("invalid socket specification\n"); +- return -1; +- } +-+ set_sip_defaults( port, proto); +-+ si = grep_sock_info(&host, (unsigned short)port, +- (unsigned short)proto); +- if (si==NULL) +- return -1; diff --git a/net/opensips/patches/005-config_h.patch b/net/opensips/patches/005-config_h.patch new file mode 100644 index 0000000..abd40d6 --- /dev/null +++ b/net/opensips/patches/005-config_h.patch @@ -0,0 +1,20 @@ +--- a/config.h ++++ b/config.h +@@ -48,7 +48,7 @@ + + #define MAX_LISTEN 16 /*!< maximum number of addresses on which we will listen */ + +-#define CHILD_NO 8 /*!< default number of child processes started */ ++#define CHILD_NO 4 /*!< default number of child processes started */ + + #define RT_NO 100 /*!< routing tables number */ + #define FAILURE_RT_NO RT_NO /*!< on_failure routing tables number */ +@@ -114,7 +114,7 @@ + #define SRV_MAX_PREFIX_LEN SRV_TLS_PREFIX_LEN + + #define PKG_MEM_POOL_SIZE 1024*1024 /*!< Used only if PKG_MALLOC is defined*/ +-#define SHM_MEM_SIZE 32 /*!< Used if SH_MEM is defined*/ ++#define SHM_MEM_SIZE 8 /*!< Used if SH_MEM is defined*/ + + #define TIMER_TICK 1 /*!< one second */ + #define UTIMER_TICK 100*1000 /*!< 100 miliseconds*/ diff --git a/net/opensips/patches/007-modules_build.patch b/net/opensips/patches/007-modules_build.patch new file mode 100644 index 0000000..178b6e9 --- /dev/null +++ b/net/opensips/patches/007-modules_build.patch @@ -0,0 +1,102 @@ +--- a/modules/carrierroute/Makefile ++++ b/modules/carrierroute/Makefile +@@ -12,10 +12,8 @@ NAME=carrierroute.so + BUILDER = $(shell which confuse-config) + + ifeq ($(BUILDER),) +- CONFUSEDEFS=-I$(LOCALBASE)/include -I/usr/local/include -I/opt/include \ +- -I/usr/sfw/include +- CONFUSELIBS=-L$(LOCALBASE)/lib -L/usr/local/lib -L/usr/sfw/lib \ +- -L/opt/lib -lconfuse ++ CONFUSEDEFS=-I$(LOCALBASE)/include ++ CONFUSELIBS=-L$(LOCALBASE)/lib + else + CONFUSEDEFS = $(shell confuse-config --cflags) + CONFUSELIBS = $(shell confuse-config --libs) +--- a/modules/h350/Makefile ++++ b/modules/h350/Makefile +@@ -9,6 +9,8 @@ include ../../Makefile.defs + + auto_gen= + NAME=h350.so +-LIBS= ++ ++DEFS+=-I$(LOCALBASE)/include ++LIBS=-L$(LOCALBASE)/lib -lldap + + include ../../Makefile.modules +--- a/modules/identity/Makefile ++++ b/modules/identity/Makefile +@@ -9,7 +9,7 @@ include ../../Makefile.defs + auto_gen= + NAME=identity.so + +-DEFS+= -I$(LOCALBASE)/ssl/include -I$(LOCALBASE)/include -I/usr/sfw/include -I/usr/local/ssl/include +-LIBS= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -L/usr/sfw/lib -L/usr/local/ssl/lib -lssl -lcrypto ++DEFS+= -I$(LOCALBASE)/include ++LIBS= -L$(LOCALBASE)/lib -lssl -lcrypto + + include ../../Makefile.modules +--- a/modules/ldap/Makefile ++++ b/modules/ldap/Makefile +@@ -12,7 +12,8 @@ include ../../Makefile.defs + auto_gen= + NAME=ldap.so + +-LIBS=-lldap ++DEFS+=-I$(LOCALBASE)/include ++LIBS=-L$(LOCALBASE)/lib -lldap + + ifeq ($(OS),solaris) + DEFS+=-I$(LOCALBASE)/include -I/usr/sfw/include -I/usr/local/include -I/opt/sfw/include -I/opt/csw/include +--- a/modules/pua_bla/Makefile ++++ b/modules/pua_bla/Makefile +@@ -9,8 +9,8 @@ include ../../Makefile.defs + auto_gen= + NAME=pua_bla.so + LIBS= +-DEFS+=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 -I$(LOCALBASE)/include +-LIBS+=-L/usr/include/lib -L$(LOCALBASE)/lib -lxml2 ++DEFS+=-I$(LOCALBASE)/include/libxml2 -I$(LOCALBASE)/include ++LIBS+=-L$(LOCALBASE)/lib -lxml2 + + include ../../Makefile.modules + +--- a/modules/pua_xmpp/Makefile ++++ b/modules/pua_xmpp/Makefile +@@ -10,7 +10,7 @@ auto_gen= + NAME= pua_xmpp.so + LIBS= + +-DEFS+=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 -I$(LOCALBASE)/include +-LIBS+=-L/usr/include/lib -L$(LOCALBASE)/lib -lxml2 ++DEFS+=-I$(LOCALBASE)/include/libxml2 -I$(LOCALBASE)/include ++LIBS+=-L$(LOCALBASE)/lib -lxml2 + + include ../../Makefile.modules +--- a/modules/regex/Makefile ++++ b/modules/regex/Makefile +@@ -20,8 +20,8 @@ ifneq ($(PCRECFG),) + + else + +- DEFS+=-I/usr/include -I/usr/sfw/include -I/usr/local/include -I/opt/csw/include -I$(LOCALBASE)/include +- LIBS=-I/usr/lib -I/usr/sfw/lib -I/usr/local/lib -I/opt/csw/lib -I$(LOCALBASE)/lib -lpcre ++ DEFS+=-I$(LOCALBASE)/include ++ LIBS=-L$(LOCALBASE)/lib -lpcre + + endif + +--- a/modules/tlsops/Makefile ++++ b/modules/tlsops/Makefile +@@ -7,8 +7,8 @@ auto_gen= + NAME=tlsops.so + LIBS= + +-DEFS+= -I$(LOCALBASE)/ssl/include -I$(LOCALBASE)/include -I/usr/sfw/include -I/usr/local/ssl/include +-LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -L/usr/sfw/lib -L/usr/local/ssl/lib -lssl -lcrypto ++DEFS+= -I$(LOCALBASE)/include ++LIBS+= -L$(LOCALBASE)/lib -lssl -lcrypto + + include ../../Makefile.modules + diff --git a/net/openslp/Makefile b/net/openslp/Makefile new file mode 100644 index 0000000..d0be77d --- /dev/null +++ b/net/openslp/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2008-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=openslp +PKG_VERSION:=1.2.1 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/openslp +PKG_MD5SUM:=ff9999d1b44017281dd00ed2c4d32330 + +PKG_INSTALL:=1 +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/openslp + SECTION:=net + CATEGORY:=Network + TITLE:=openslp + URL:=http://www.openslp.org/ +endef + +#CONFIGURE_ARGS += \ +# --disable-libwrap + +#MAKE_FLAGS += \ +# CFLAGS="$(TARGET_CFLAGS) -Wall -D_REENTRANT" \ +# all + +define Package/openslp/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libslp.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/slptool $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/slpd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/etc/slp.* $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/etc/init.d/* $(1)/etc/init.d/ +endef + +$(eval $(call BuildPackage,openslp)) diff --git a/net/openslp/files/etc/init.d/slpd b/net/openslp/files/etc/init.d/slpd new file mode 100644 index 0000000..2b5e727 --- /dev/null +++ b/net/openslp/files/etc/init.d/slpd @@ -0,0 +1,14 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=50 + +start() { + cp /etc/slp* /var + IP=`ifconfig br-lan | grep inet | cut -d" " -f12 | cut -d: -f2` + sed -i "s/IPADDR/${IP}/g" /var/slp.reg + slpd -r /var/slp.reg -c /var/slp.conf +} + +stop() { + killall slpd +} diff --git a/net/openslp/files/etc/slp.conf b/net/openslp/files/etc/slp.conf new file mode 100644 index 0000000..ca434ea --- /dev/null +++ b/net/openslp/files/etc/slp.conf @@ -0,0 +1,28 @@ +;net.slp.useScopes = myScope1, myScope2, myScope3 +;net.slp.DAAddresses = myDa1,myDa2,myDa3 +;net.slp.isDA = true +;net.slp.DAHeartBeat = 10800 +;net.slp.watchRegistrationPID = false +;net.slp.maxResults = 256 +;net.slp.isBroadcastOnly = true +;net.slp.passiveDADetection = false +;net.slp.activeDADetection = false +;net.slp.DAActiveDiscoveryInterval = 1 +;net.slp.multicastTTL = 255 +;net.slp.DADiscoveryMaximumWait = 2000 +;net.slp.DADiscoveryTimeouts = 500,750,1000,1500,2000,3000 +;net.slp.multicastMaximumWait = 5000 +;net.slp.multicastTimeouts = 500,750,1000,1500,2000,3000 +;net.slp.unicastMaximumWait = 5000 +;net.slp.unicastTimeouts = 500,750,1000,1500,2000,3000 +;net.slp.datagramTimeouts = IGNORED +;net.slp.randomWaitBound = 5000 +;net.slp.MTU = 1400 +;net.slp.interfaces = 1.2.3.4,1.2.3.5,1.2.3.6 +;net.slp.securityEnabled=true +;net.slp.checkSourceAddr=false + +;net.slp.traceDATraffic = true +;net.slp.traceReg = true +;net.slp.traceDrop = true +;net.slp.traceMsg = true diff --git a/net/openslp/files/etc/slp.reg b/net/openslp/files/etc/slp.reg new file mode 100644 index 0000000..44fdae3 --- /dev/null +++ b/net/openslp/files/etc/slp.reg @@ -0,0 +1,2 @@ +service:device.AP://IPADDR,en,65535 +use default scopes diff --git a/net/openslp/files/etc/slp.spi b/net/openslp/files/etc/slp.spi new file mode 100644 index 0000000..e69de29 diff --git a/net/openssh/Makefile b/net/openssh/Makefile new file mode 100644 index 0000000..a39eb18 --- /dev/null +++ b/net/openssh/Makefile @@ -0,0 +1,201 @@ +# +# Copyright (C) 2006,2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=openssh +PKG_VERSION:=5.8p2 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ + ftp://openbsd.wiretapped.net/pub/OpenBSD/OpenSSH/portable/ \ + ftp://ftp.belnet.be/packages/openbsd/OpenSSH/portable/ \ + ftp://ftp.de.openbsd.org/pub/unix/OpenBSD/OpenSSH/portable/ +PKG_MD5SUM:=0541579adf9d55abb15ef927048d372e + +PKG_BUILD_DEPENDS:=libopenssl + +include $(INCLUDE_DIR)/package.mk + +define Package/openssh/Default + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libopenssl +zlib +libgcc + TITLE:=OpenSSH + MAINTAINER:=Peter Wagner + URL:=http://www.openssh.com/ + SUBMENU:=SSH +endef + +define Package/openssh-client + $(call Package/openssh/Default) + TITLE+= client +endef + +define Package/openssh-client/description +OpenSSH client. +endef + +define Package/openssh-client/conffiles +/etc/ssh/ssh_config +endef + +define Package/openssh-client-utils + $(call Package/openssh/Default) + DEPENDS+= +openssh-client +openssh-keygen + TITLE+= client utilities +endef + +define Package/openssh-client-utils/description +OpenSSH client utilities. +endef + +define Package/openssh-keygen + $(call Package/openssh/Default) + TITLE+= keygen +endef + +define Package/openssh-keygen/description +OpenSSH keygen. +endef + +define Package/openssh-server + $(call Package/openssh/Default) + DEPENDS+= +openssh-keygen + TITLE+= server +endef + +define Package/openssh-server/description +OpenSSH server. +endef + +define Package/openssh-server/conffiles +/etc/ssh/sshd_config +endef + +define Package/openssh-sftp-client + $(call Package/openssh/Default) + TITLE+= SFTP client +endef + +define Package/openssh-sftp-client/description +OpenSSH SFTP client. +endef + +define Package/openssh-sftp-server + $(call Package/openssh/Default) + DEPENDS:=+libgcc + TITLE+= SFTP server +endef + +define Package/openssh-sftp-server/description +OpenSSH SFTP server. +endef + +CONFIGURE_ARGS+= \ + $(DISABLE_NLS) \ + --sysconfdir=/etc/ssh \ + --enable-shared \ + --disable-static \ + --disable-debug \ + --disable-strip \ + --disable-etc-default-login \ + --disable-lastlog \ + --disable-utmp \ + --disable-utmpx \ + --disable-wtmp \ + --disable-wtmpx \ + --without-bsd-auth \ + --without-kerberos5 \ + --without-pam \ + --without-x + +ifneq ($(CONFIG_SSP_SUPPORT),y) +CONFIGURE_ARGS += \ + --without-stackprotect +endif + +CONFIGURE_VARS += LD="$(TARGET_CC)" + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + LIBS="" \ + sftp-server + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + STRIP_OPT="" \ + all install +endef + +define Package/openssh-client/install + $(INSTALL_DIR) $(1)/etc/ssh + chmod 0700 $(1)/etc/ssh + $(CP) $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(1)/etc/ssh/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scp $(1)/usr/bin/ +endef + +define Package/openssh-client-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(foreach bin,add agent keyscan keysign,$(PKG_BUILD_DIR)/ssh-$(bin)) $(1)/usr/bin/ +endef + +define Package/openssh-keygen/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(1)/usr/bin/ +endef + + +define Package/openssh-server/install + $(INSTALL_DIR) $(1)/etc/ssh + chmod 0700 $(1)/etc/ssh + $(CP) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(1)/etc/ssh/ + $(CP) $(PKG_INSTALL_DIR)/etc/ssh/moduli $(1)/etc/ssh/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/sshd.init $(1)/etc/init.d/sshd + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sshd $(1)/usr/sbin/ +endef + +define Package/openssh-server/postinst +#!/bin/sh + +name=sshd +id=22 + +if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then + echo "adding group $$name to /etc/group" + echo "$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc/group +fi + +if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then + echo "adding user $$name to /etc/passwd" + echo "$${name}:x:$${id}:$${id}:$${name}:/var/empty/.$${name}:/bin/false" >> $${IPKG_INSTROOT}/etc/passwd +fi +endef + +define Package/openssh-sftp-client/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sftp $(1)/usr/bin/ +endef + +define Package/openssh-sftp-server/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/sftp-server $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/libexec + ln -sf ../lib/sftp-server $(1)/usr/libexec/sftp-server +endef + +$(eval $(call BuildPackage,openssh-client)) +$(eval $(call BuildPackage,openssh-client-utils)) +$(eval $(call BuildPackage,openssh-keygen)) +$(eval $(call BuildPackage,openssh-server)) +$(eval $(call BuildPackage,openssh-sftp-client)) +$(eval $(call BuildPackage,openssh-sftp-server)) diff --git a/net/openssh/files/sshd.init b/net/openssh/files/sshd.init new file mode 100644 index 0000000..58b5ce7 --- /dev/null +++ b/net/openssh/files/sshd.init @@ -0,0 +1,29 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 +STOP=50 + +start() { + for type in rsa dsa; do { + # check for keys + key=/etc/ssh/ssh_host_${type}_key + [ ! -f $key ] && { + # generate missing keys + [ -x /usr/bin/ssh-keygen ] && { + /usr/bin/ssh-keygen -N '' -t $type -f $key 2>&- >&- && exec /etc/rc.common "$initscript" start + } & + exit 0 + } + }; done + mkdir -p /var/empty + chmod 0700 /var/empty + /usr/sbin/sshd +} + +stop() { + kill $(cat /var/run/sshd.pid) +} + +shutdown() { + killall sshd +} diff --git a/net/openssh/patches/100-no_cast_fix.patch b/net/openssh/patches/100-no_cast_fix.patch new file mode 100644 index 0000000..dfcf0d0 --- /dev/null +++ b/net/openssh/patches/100-no_cast_fix.patch @@ -0,0 +1,12 @@ +--- a/cipher.c ++++ b/cipher.c +@@ -73,7 +73,9 @@ struct Cipher { + + { "3des-cbc", SSH_CIPHER_SSH2, 8, 24, 0, 1, EVP_des_ede3_cbc }, + { "blowfish-cbc", SSH_CIPHER_SSH2, 8, 16, 0, 1, EVP_bf_cbc }, ++#ifndef OPENSSL_NO_CAST + { "cast128-cbc", SSH_CIPHER_SSH2, 8, 16, 0, 1, EVP_cast5_cbc }, ++#endif + { "arcfour", SSH_CIPHER_SSH2, 8, 16, 0, 0, EVP_rc4 }, + { "arcfour128", SSH_CIPHER_SSH2, 8, 16, 1536, 0, EVP_rc4 }, + { "arcfour256", SSH_CIPHER_SSH2, 8, 32, 1536, 0, EVP_rc4 }, diff --git a/net/openssh/patches/110-no_ripemd_fix.patch b/net/openssh/patches/110-no_ripemd_fix.patch new file mode 100644 index 0000000..35bd0ba --- /dev/null +++ b/net/openssh/patches/110-no_ripemd_fix.patch @@ -0,0 +1,13 @@ +--- a/mac.c ++++ b/mac.c +@@ -59,8 +59,10 @@ struct { + { "hmac-sha1-96", SSH_EVP, EVP_sha1, 96, -1, -1 }, + { "hmac-md5", SSH_EVP, EVP_md5, 0, -1, -1 }, + { "hmac-md5-96", SSH_EVP, EVP_md5, 96, -1, -1 }, ++#ifndef OPENSSL_NO_RIPEMD + { "hmac-ripemd160", SSH_EVP, EVP_ripemd160, 0, -1, -1 }, + { "hmac-ripemd160@openssh.com", SSH_EVP, EVP_ripemd160, 0, -1, -1 }, ++#endif + { "umac-64@openssh.com", SSH_UMAC, NULL, 0, 128, 64 }, + { NULL, 0, NULL, 0, -1, -1 } + }; diff --git a/net/openssh/patches/130-implicit_memset_decl_fix.patch b/net/openssh/patches/130-implicit_memset_decl_fix.patch new file mode 100644 index 0000000..a2229ee --- /dev/null +++ b/net/openssh/patches/130-implicit_memset_decl_fix.patch @@ -0,0 +1,12 @@ +--- a/includes.h ++++ b/includes.h +@@ -57,6 +57,9 @@ + /* + *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively + */ ++#ifdef HAVE_STRING_H ++# include ++#endif + #ifdef HAVE_STRINGS_H + # include + #endif diff --git a/net/openssh/patches/200-dscp-qos.patch b/net/openssh/patches/200-dscp-qos.patch new file mode 100644 index 0000000..5a728dd --- /dev/null +++ b/net/openssh/patches/200-dscp-qos.patch @@ -0,0 +1,26 @@ +Index: packages/net/openssh/patches/200-enable_dscp_qos.patch +=================================================================== +--- packages/net/openssh/patches/200-enable_dscp_qos.patch (revision 0) ++++ packages/net/openssh/patches/200-enable_dscp_qos.patch (revision 0) +@@ -0,0 +1,21 @@ ++--- a/ssh_config 2010-01-12 01:40:27.000000000 -0700 +++++ b/ssh_config 2011-02-09 14:35:30.000000000 -0700 ++@@ -45,3 +45,6 @@ ++ # PermitLocalCommand no ++ # VisualHostKey no ++ # ProxyCommand ssh -q -W %h:%p gateway.example.com +++ +++# enable DSCP QoS values (per RFC-4594) +++#IPQoS AF21 AF11 ++--- a/sshd_config 2010-09-09 19:20:12.000000000 -0600 +++++ b/sshd_config 2011-02-09 14:32:25.000000000 -0700 ++@@ -108,6 +108,9 @@ ++ # no default banner path ++ #Banner none ++ +++# enable DSCP QoS values (per RFC-4594) +++#IPQoS AF21 AF11 +++ ++ # override default of no subsystems ++ Subsystem sftp /usr/libexec/sftp-server ++ diff --git a/net/openswan/Makefile b/net/openswan/Makefile new file mode 100644 index 0000000..1a33dd1 --- /dev/null +++ b/net/openswan/Makefile @@ -0,0 +1,104 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=openswan +PKG_VERSION:=2.6.37 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.openswan.org/download +PKG_MD5SUM:=e5c948555088df06cfadcfbe6c13adfe + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/openswan/Default + TITLE:=Openswan + URL:=http://www.openswan.org/ + DEPENDS:=@!LINUX_2_4 +endef + +define Package/openswan/Default/description + Openswan is an IPsec implementation for Linux. +endef + +define Package/openswan +$(call Package/openswan/Default) + SUBMENU:=VPN + SECTION:=net + CATEGORY:=Network + TITLE+= (daemon) + DEPENDS+= +kmod-openswan +libgmp +ip +endef + +define Package/openswan/description +$(call Package/openswan/Default/description) + This package contains the Openswan user-land daemon. +endef + +define KernelPackage/openswan +$(call Package/openswan/Default) + SUBMENU:=Network Support + TITLE+= (kernel module) + DEPENDS+=+IPV6:kmod-ipv6 + FILES:=$(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX) +endef + +define KernelPackage/openswan/description +$(call Package/openswan/Default/description) + This package contains the Openswan kernel module. +endef + +TARGET_CPPFLAGS += -I$(LINUX_DIR)/include -D__EXPORTED_HEADERS__ + +OPENSWAN_MAKEFLAGS:= \ + -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + LINUX_RELEASE="$(LINUX_RELEASE)" \ + KERNELSRC="$(LINUX_DIR)" \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + USERCOMPILE="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/ports/linux/include -I$(PKG_BUILD_DIR)/linux/include -I$(PKG_BUILD_DIR)/include $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \ + IPSECDIR="/usr/lib/ipsec" \ + INC_USRLOCAL="/usr" \ + INC_RCDEFAULT="/etc/init.d" \ + MODPROBE="/sbin/insmod" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" + +define Build/Compile + $(MAKE) $(PKG_JOBS) $(OPENSWAN_MAKEFLAGS) programs + $(MAKE) $(PKG_JOBS) $(OPENSWAN_MAKEFLAGS) module +endef + +define Build/Install + $(MAKE) $(OPENSWAN_MAKEFLAGS) install +endef + +define Package/openswan/conffiles +/etc/ipsec.conf +/etc/ipsec.secrets +endef + +define Package/openswan/install + $(CP) $(PKG_INSTALL_DIR)/* $(1) + $(INSTALL_DIR) $(1)/etc/init.d + $(CP) ./files/ipsec.init $(1)/etc/init.d/ipsec + rm -rf $(1)/usr/share + rm -rf $(1)/usr/man + rm -rf $(1)/var + rm -rf $(1)/etc/rc.d + find $(1) -name \*.old | xargs rm -rf +endef + +$(eval $(call BuildPackage,openswan)) +$(eval $(call KernelPackage,openswan)) diff --git a/net/openswan/files/ipsec.init b/net/openswan/files/ipsec.init new file mode 100755 index 0000000..68ad359 --- /dev/null +++ b/net/openswan/files/ipsec.init @@ -0,0 +1,211 @@ +#!/bin/sh /etc/rc.common +# IPsec startup and shutdown script +# Copyright (C) 1998, 1999, 2001 Henry Spencer. +# Copyright (C) 2002 Michael Richardson +# +# 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. See . +# +# 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. +# +# +# ipsec init.d script for starting and stopping +# the IPsec security subsystem (KLIPS and Pluto). +# +# This script becomes /etc/rc.d/init.d/ipsec (or possibly /etc/init.d/ipsec) +# and is also accessible as "ipsec setup" (the preferred route for human +# invocation). +# +# The startup and shutdown times are a difficult compromise (in particular, +# it is almost impossible to reconcile them with the insanely early/late +# times of NFS filesystem startup/shutdown). Startup is after startup of +# syslog and pcmcia support; shutdown is just before shutdown of syslog. +# +# chkconfig: 2345 47 76 +# description: IPsec provides encrypted and authenticated communications; \ +# KLIPS is the kernel half of it, Pluto is the user-level management daemon. + +START=60 +EXTRA_COMMANDS=status +EXTRA_HELP=" status Show the status of the service" + +script_init() { + me='ipsec setup' # for messages + + # where the private directory and the config files are + IPSEC_EXECDIR="${IPSEC_EXECDIR-/usr/libexec/ipsec}" + IPSEC_LIBDIR="${IPSEC_LIBDIR-/usr/lib/ipsec}" + IPSEC_SBINDIR="${IPSEC_SBINDIR-/usr/sbin}" + IPSEC_CONFS="${IPSEC_CONFS-/etc}" + + if test " $IPSEC_DIR" = " " # if we were not called by the ipsec command + then + # we must establish a suitable PATH ourselves + PATH="${IPSEC_SBINDIR}":/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin + export PATH + + IPSEC_DIR="$IPSEC_LIBDIR" + export IPSEC_DIR IPSEC_CONFS IPSEC_LIBDIR IPSEC_EXECDIR + fi + + # Check that the ipsec command is available. + found= + for dir in `echo $PATH | tr ':' ' '` + do + if test -f $dir/ipsec -a -x $dir/ipsec + then + found=yes + break # NOTE BREAK OUT + fi + done + if ! test "$found" + then + echo "cannot find ipsec command -- \`$1' aborted" | + logger -s -p daemon.error -t ipsec_setup + exit 1 + fi + + # accept a few flags + + export IPSEC_setupflags + IPSEC_setupflags="" + + config="" + + for dummy + do + case "$1" in + --showonly|--show) IPSEC_setupflags="$1" ;; + --config) config="--config $2" ; shift ;; + *) break ;; + esac + shift + done + + + # Pick up IPsec configuration (until we have done this, successfully, we + # do not know where errors should go, hence the explicit "daemon.error"s.) + # Note the "--export", which exports the variables created. + variables=`ipsec addconn $config --varprefix IPSEC --configsetup` + if [ $? != 0 ] + then + echo "Failed to parse config setup portion of ipsec.conf" + exit $? + fi + eval $variables + + if test " $IPSEC_confreadstatus" != " " + then + case $1 in + stop|--stop|_autostop) + echo "$IPSEC_confreadstatus -- \`$1' may not work" | + logger -s -p daemon.error -t ipsec_setup;; + + *) echo "$IPSEC_confreadstatus -- \`$1' aborted" | + logger -s -p daemon.error -t ipsec_setup; + exit 1;; + esac + fi + + IPSEC_confreadsection=${IPSEC_confreadsection:-setup} + export IPSEC_confreadsection + + IPSECsyslog=${IPSECsyslog-daemon.error} + export IPSECsyslog + + # misc setup + umask 022 + + mkdir -p /var/run/pluto +} + +script_command() { + # do it + case "$1" in + start|--start|stop|--stop|_autostop|_autostart) + # remove for: @cygwin_START@ + # portable way for checking for root + if [ ! -w / ] + then + + echo "permission denied (must be superuser)" | + logger -s -p $IPSECsyslog -t ipsec_setup 2>&1 + exit 1 + fi + # remove for: @cygwin_END@ + tmp=/var/run/pluto/ipsec_setup.st + outtmp=/var/run/pluto/ipsec_setup.out + ( + ipsec _realsetup $1 + echo "$?" >$tmp + ) > ${outtmp} 2>&1 + st=$? + if test -f $tmp + then + st=`cat $tmp` + rm -f $tmp + fi + if [ -f ${outtmp} ]; then + cat ${outtmp} | logger -s -p $IPSECsyslog -t ipsec_setup 2>&1 + rm -f ${outtmp} + fi + ;; + + restart|--restart|force-reload) + $0 $IPSEC_setupflags stop + $0 $IPSEC_setupflags start + ;; + + _autorestart) # for internal use only + $0 $IPSEC_setupflags _autostop + $0 $IPSEC_setupflags _autostart + ;; + + status|--status) + ipsec _realsetup $1 + exit + ;; + + --version) + echo "$me $IPSEC_VERSION" + exit 0 + ;; + + --help) + echo "Usage: $me [ --showonly ] {--start|--stop|--restart}" + echo " $me --status" + exit 0 + ;; + + *) + echo "Usage: $me [ --showonly ] {--start|--stop|--restart}" + echo " $me --status" + exit 2 + esac +} +start() { + script_init start "$@" + script_command start "$@" +} + +stop() { + script_init stop "$@" + script_command stop "$@" +} + +restart() { + script_init stop "$@" + script_command stop "$@" + script_command start "$@" +} + +status() { + script_init status "$@" + ipsec _realsetup status +} + diff --git a/net/openswan/patches/110-scripts.patch b/net/openswan/patches/110-scripts.patch new file mode 100644 index 0000000..971ea59 --- /dev/null +++ b/net/openswan/patches/110-scripts.patch @@ -0,0 +1,14 @@ +--- + programs/_plutorun/_plutorun.in | 2 +- + programs/_realsetup/_realsetup.in | 2 +- + programs/loggerfix | 5 +++++ + 3 files changed, 7 insertions(+), 2 deletions(-) + +--- /dev/null ++++ b/programs/loggerfix +@@ -0,0 +1,5 @@ ++#!/bin/sh ++# use filename instead of /dev/null to log, but dont log to flash or ram ++# pref. log to nfs mount ++echo "$*" >> /dev/null ++exit 0 diff --git a/net/openswan/patches/120-no_manpages.patch b/net/openswan/patches/120-no_manpages.patch new file mode 100644 index 0000000..4a7c6ec --- /dev/null +++ b/net/openswan/patches/120-no_manpages.patch @@ -0,0 +1,60 @@ +--- a/programs/_confread/Makefile ++++ b/programs/_confread/Makefile +@@ -16,7 +16,6 @@ + OPENSWANSRCDIR?=$(shell cd ../..; pwd) + include ${OPENSWANSRCDIR}/Makefile.inc + +-EXTRA5MAN=ipsec.conf.5 + CONFFILES=ipsec.conf + EXCONFILES=ipsec.win2k.conf + SOURCEDIR=_confread +@@ -26,11 +25,3 @@ CONFDFILES=clear clear-or-private privat + + include ${srcdir}../Makefile.program + +-ipsec.conf.5: ${srcdir}ipsec.conf.5.xml +- +-${srcdir}ipsec.conf.5.xml: $(wildcard d.ipsec.conf/*.xml) ${srcdir}d.ipsec.conf/order.txt +- cd ${srcdir} && cat `cat ${srcdir}d.ipsec.conf/order.txt` >ipsec.conf.5.xml +- +-diff: ipsec.conf.5.xml +- diff -B -w -u ipsec.conf.5.xml ipsec.conf.5.xml-ref +- +--- a/programs/pluto/Makefile ++++ b/programs/pluto/Makefile +@@ -195,35 +195,11 @@ doinstall: all + $(INSTALL) $(INSTBINFLAGS) $(BINNAMEPLUTO) $(BINNAMEWHACK) $(LIBEXECDIR) + #$(INSTALL) $(INSTSUIDFLAGS) $(BINNAMEWHACKINIT) $(LIBEXECDIR) + if $(USE_ADNS) ; then $(INSTALL) $(INSTBINFLAGS) $(BINNAMEADNS) $(LIBEXECDIR) ; fi +- $(INSTALL) $(INSTMANFLAGS) ${srcdir}pluto.8 $(PMANDIR)/ipsec_pluto.8 +- sh ${OPENSWANSRCDIR}/packaging/utils/manlink ${srcdir}pluto.8 | \ +- while read from to ; \ +- do \ +- ln -s -f ipsec_$$from $(PMANDIR)/$$to; \ +- done +- $(INSTALL) $(INSTMANFLAGS) ${srcdir}ipsec.secrets.5 $(FMANDIR) +- sh ${OPENSWANSRCDIR}/packaging/utils/manlink ${srcdir}ipsec.secrets.5 | \ +- while read from to ; \ +- do \ +- ln -s -f $$from $(FMANDIR)/$$to; \ +- done + + install_file_list: + @echo $(LIBEXECDIR)/$(BINNAMEPLUTO) + @if $(USE_ADNS) ; then echo $(LIBDIR)/$(BINNAMEADNS) ; fi + @echo $(LIBEXECDIR)/$(BINNAMEWHACK) +- @echo $(PMANDIR)/ipsec_pluto.8 +- @sh ${OPENSWANSRCDIR}/packaging/utils/manlink pluto.8 | \ +- while read from to; \ +- do\ +- echo $(PMANDIR)/$$to; \ +- done +- @echo $(FMANDIR)/ipsec.secrets.5 +- @sh ${OPENSWANSRCDIR}/packaging/utils/manlink ipsec.secrets.5 | \ +- while read from to; \ +- do \ +- echo $(FMANDIR)/$$to; \ +- done + + alg_info_test: alg_info_test.o ike_alg.o constants.o defs.o log.o db_ops.o crypto.o $(LIBDESLITE) $(OPENSWANLIB) + $(CC) -o $@ $^ $(LDFLAGS) $(LIBSPLUTO) diff --git a/net/openswan/patches/130-compat_net_dev_ops.patch b/net/openswan/patches/130-compat_net_dev_ops.patch new file mode 100644 index 0000000..46786fa --- /dev/null +++ b/net/openswan/patches/130-compat_net_dev_ops.patch @@ -0,0 +1,19 @@ +--- + linux/include/openswan/ipsec_kversion.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/linux/include/openswan/ipsec_kversion.h ++++ b/linux/include/openswan/ipsec_kversion.h +@@ -393,6 +393,12 @@ + # endif + #endif + ++#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,30) ++# ifndef CONFIG_COMPAT_NET_DEV_OPS ++# define USE_NETDEV_OPS ++# endif ++#endif ++ + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) + # define USE_NETDEV_OPS + #else diff --git a/net/openswan/patches/140-generated_autoconf.patch b/net/openswan/patches/140-generated_autoconf.patch new file mode 100644 index 0000000..fedb5f1 --- /dev/null +++ b/net/openswan/patches/140-generated_autoconf.patch @@ -0,0 +1,367 @@ +--- a/linux/include/ocf-compat.h ++++ b/linux/include/ocf-compat.h +@@ -35,10 +35,11 @@ + /****************************************************************************/ + #ifdef __KERNEL__ + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif +- + /* + * fake some BSD driver interface stuff specifically for OCF use + */ +--- a/linux/include/openswan/ipsec_kversion.h ++++ b/linux/include/openswan/ipsec_kversion.h +@@ -43,10 +43,11 @@ + * We use a lot of config defines, on older kernels that means we + * need to include config.h + */ +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif +- + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + /* Only enable IPv6 support on newer kernels with IPv6 enabled */ + # if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) +--- a/linux/net/ipsec/aes/ipsec_alg_aes.c ++++ b/linux/net/ipsec/aes/ipsec_alg_aes.c +@@ -22,8 +22,10 @@ + * + */ + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif + #include + +--- a/linux/net/ipsec/des/ipsec_alg_3des.c ++++ b/linux/net/ipsec/des/ipsec_alg_3des.c +@@ -19,8 +19,10 @@ + * + */ + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif + #include + +--- a/linux/net/ipsec/ipcomp.c ++++ b/linux/net/ipsec/ipcomp.c +@@ -19,10 +19,11 @@ + /* SSS */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif +- + #define __NO_VERSION__ + #include + #include /* printk() */ +--- a/linux/net/ipsec/ipsec_ah.c ++++ b/linux/net/ipsec/ipsec_ah.c +@@ -14,10 +14,11 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif +- + #define __NO_VERSION__ + #include + #include /* printk() */ +--- a/linux/net/ipsec/ipsec_alg.c ++++ b/linux/net/ipsec/ipsec_alg.c +@@ -19,10 +19,11 @@ + * + */ + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif +- + #define __NO_VERSION__ + #include + #include /* printk() */ +--- a/linux/net/ipsec/ipsec_alg_cryptoapi.c ++++ b/linux/net/ipsec/ipsec_alg_cryptoapi.c +@@ -26,10 +26,11 @@ + * modprobe ipsec_cryptoapi des_ede3=0 (everything but 3DES) + */ + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif +- + /* + * special case: ipsec core modular with this static algo inside: + * must avoid MODULE magic for this file +--- a/linux/net/ipsec/ipsec_esp.c ++++ b/linux/net/ipsec/ipsec_esp.c +@@ -14,10 +14,11 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif +- + #define __NO_VERSION__ + #include + #include /* printk() */ +--- a/linux/net/ipsec/ipsec_init.c ++++ b/linux/net/ipsec/ipsec_init.c +@@ -19,8 +19,10 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif + #include + #include /* printk() */ +--- a/linux/net/ipsec/ipsec_ipcomp.c ++++ b/linux/net/ipsec/ipsec_ipcomp.c +@@ -14,10 +14,11 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif +- + #define __NO_VERSION__ + #include + #include /* printk() */ +--- a/linux/net/ipsec/ipsec_ipip.c ++++ b/linux/net/ipsec/ipsec_ipip.c +@@ -14,10 +14,11 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif +- + #define __NO_VERSION__ + #include + #include /* printk() */ +--- a/linux/net/ipsec/ipsec_ocf.c ++++ b/linux/net/ipsec/ipsec_ocf.c +@@ -16,10 +16,11 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif +- + #define __NO_VERSION__ + #include + #include /* printk() */ +--- a/linux/net/ipsec/ipsec_ocf.h ++++ b/linux/net/ipsec/ipsec_ocf.h +@@ -19,8 +19,10 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif + #include + +--- a/linux/net/ipsec/ipsec_radij.c ++++ b/linux/net/ipsec/ipsec_radij.c +@@ -16,8 +16,10 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif + #include /* printk() */ + +--- a/linux/net/ipsec/ipsec_rcv.c ++++ b/linux/net/ipsec/ipsec_rcv.c +@@ -21,10 +21,11 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif +- + #define __NO_VERSION__ + #include + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,26) +--- a/linux/net/ipsec/ipsec_sa.c ++++ b/linux/net/ipsec/ipsec_sa.c +@@ -19,8 +19,10 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif + #include /* printk() */ + +--- a/linux/net/ipsec/ipsec_snprintf.c ++++ b/linux/net/ipsec/ipsec_snprintf.c +@@ -19,8 +19,10 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif + #define __NO_VERSION__ + #include +--- a/linux/net/ipsec/ipsec_tunnel.c ++++ b/linux/net/ipsec/ipsec_tunnel.c +@@ -24,8 +24,10 @@ + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,26) + # include + #endif +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif + #include /* printk() */ + +--- a/linux/net/ipsec/ipsec_xform.c ++++ b/linux/net/ipsec/ipsec_xform.c +@@ -17,8 +17,10 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif + #include /* printk() */ + +--- a/linux/net/ipsec/pfkey_v2_ext_process.c ++++ b/linux/net/ipsec/pfkey_v2_ext_process.c +@@ -20,8 +20,10 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif + #include /* printk() */ + +--- a/linux/net/ipsec/pfkey_v2_parser.c ++++ b/linux/net/ipsec/pfkey_v2_parser.c +@@ -23,8 +23,10 @@ + + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif + #include /* printk() */ + +--- a/linux/net/ipsec/radij.c ++++ b/linux/net/ipsec/radij.c +@@ -54,8 +54,10 @@ + */ + + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +-#include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) ++#include ++#else ++#include + #endif + #include /* printk() */ + diff --git a/net/openvpn-devel/Makefile b/net/openvpn-devel/Makefile new file mode 100644 index 0000000..2261f6c --- /dev/null +++ b/net/openvpn-devel/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2010-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=openvpn-devel +PKG_VERSION:=201120 +PKG_RELEASE:=1 + +PKG_SOURCE:=openvpn-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.secure-computing.net/pub/FreeBSD/ports/openvpn-devel \ + ftp://ftp2.secure-computing.net/pub/FreeBSD/ports/openvpn-devel +PKG_MD5SUM:=58d219359d5e086cc7749f23428c0bb0 + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DIR:=$(BUILD_DIR)/openvpn-devel + +include $(INCLUDE_DIR)/package.mk + +define Package/openvpn-devel + SECTION:=net + CATEGORY:=Network + DEPENDS:=+kmod-tun +kmod-ipv6 +libopenssl +liblzo +ip + TITLE:=Open source VPN solution using SSL (devel version) + URL:=http://openvpn.net + SUBMENU:=VPN +endef + +define Package/openvpn-devel/conffiles +/etc/config/openvpn +endef + +define Package/openvpn-devel/description + Open source VPN solution using SSL - DEVEL VERSION, Week $(PKG_VERSION) +endef + +CONFIGURE_ARGS += \ + --disable-debug \ + --disable-plugins \ + --enable-management \ + --enable-small \ + --disable-socks \ + --enable-password-save \ + --enable-iproute2 \ + --with-iproute-path=/usr/sbin/ip + +CONFIGURE_VARS += \ + ac_cv_func_epoll_create=no + +define Package/openvpn-devel/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) files/openvpn.init $(1)/etc/init.d/openvpn + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) files/openvpn.config $(1)/etc/config/openvpn + $(INSTALL_DIR) $(1)/etc/openvpn +endef + +$(eval $(call BuildPackage,openvpn-devel)) diff --git a/net/openvpn-devel/files b/net/openvpn-devel/files new file mode 120000 index 0000000..aba90e9 --- /dev/null +++ b/net/openvpn-devel/files @@ -0,0 +1 @@ +../openvpn/files \ No newline at end of file diff --git a/net/openvpn/Makefile b/net/openvpn/Makefile new file mode 100644 index 0000000..c618988 --- /dev/null +++ b/net/openvpn/Makefile @@ -0,0 +1,99 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=openvpn +PKG_VERSION:=2.1.4 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://swupdate.openvpn.net/community/releases @SF/openvpn +PKG_MD5SUM:=96a11868082685802489254f03ff3bde + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/openvpn + SECTION:=net + CATEGORY:=Network + DEPENDS:=+kmod-tun +libopenssl +PACKAGE_openvpn_complzo:liblzo + TITLE:=Open source VPN solution using SSL + URL:=http://openvpn.net + SUBMENU:=VPN +endef + +define Package/openvpn/config +config PACKAGE_openvpn_complzo + bool "Enable --comp-lzo compression option" + depends on PACKAGE_openvpn + default y +endef + +define Package/openvpn/conffiles +/etc/config/openvpn +endef + +define Package/openvpn/description + Open source VPN solution using SSL +endef + +define Package/openvpn-easy-rsa + $(call Package/openvpn) + DEPENDS:=+openssl-util + TITLE:=Simple shell scripts to manage a Certificate Authority +endef + +define Package/openvpn-easy-rsa/conffiles +/etc/easy-rsa/keys/serial +/etc/easy-rsa/keys/index.txt +/etc/easy-rsa/vars +endef + +CONFIGURE_ARGS+= \ + --with-ifconfig-path=/sbin/ifconfig \ + --with-iproute-path=/usr/sbin/ip \ + --with-route-path=/sbin/route \ + --disable-pthread \ + --disable-debug \ + --disable-plugins \ + --enable-management \ + --disable-socks \ + --enable-password-save \ + --enable-small + +ifndef CONFIG_PACKAGE_openvpn_complzo +CONFIGURE_ARGS += \ + --disable-lzo +endif + +define Package/openvpn/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/openvpn + $(INSTALL_DIR) $(1)/lib/upgrade/keep.d + $(INSTALL_DATA) files/openvpn.upgrade $(1)/lib/upgrade/keep.d/openvpn +endef + +define Package/openvpn-easy-rsa/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/easy-rsa + $(INSTALL_DATA) $(PKG_BUILD_DIR)/easy-rsa/2.0/openssl.cnf $(1)/etc/easy-rsa/openssl.cnf + $(INSTALL_DATA) $(PKG_BUILD_DIR)/easy-rsa/2.0/vars $(1)/etc/easy-rsa/vars + $(INSTALL_DIR) $(1)/etc/easy-rsa/keys + $(INSTALL_DATA) files/easy-rsa.index $(1)/etc/easy-rsa/keys/index.txt + $(INSTALL_DATA) files/easy-rsa.serial $(1)/etc/easy-rsa/keys/serial +endef + +$(eval $(call BuildPackage,openvpn)) +$(eval $(call BuildPackage,openvpn-easy-rsa)) diff --git a/net/openvpn/files/easy-rsa.index b/net/openvpn/files/easy-rsa.index new file mode 100644 index 0000000..e69de29 diff --git a/net/openvpn/files/easy-rsa.serial b/net/openvpn/files/easy-rsa.serial new file mode 100644 index 0000000..8a0f05e --- /dev/null +++ b/net/openvpn/files/easy-rsa.serial @@ -0,0 +1 @@ +01 diff --git a/net/openvpn/files/openvpn.config b/net/openvpn/files/openvpn.config new file mode 100644 index 0000000..a0539df --- /dev/null +++ b/net/openvpn/files/openvpn.config @@ -0,0 +1,398 @@ +package openvpn + +################################################# +# Sample to include a custom config file. # +################################################# + +config openvpn custom_config + + # Set to 1 to enable this instance: + option enable 0 + + # Include OpenVPN configuration + option config /etc/openvpn/my-vpn.conf + + +################################################# +# Sample OpenVPN 2.0 uci config for # +# multi-client server. # +################################################# + +config openvpn sample_server + + # Set to 1 to enable this instance: + option enable 0 + + # Which local IP address should OpenVPN + # listen on? (optional) +# option local 0.0.0.0 + + # Which TCP/UDP port should OpenVPN listen on? + # If you want to run multiple OpenVPN instances + # on the same machine, use a different port + # number for each one. You will need to + # open up this port on your firewall. + option port 1194 + + # TCP or UDP server? +# option proto tcp + option proto udp + + # "dev tun" will create a routed IP tunnel, + # "dev tap" will create an ethernet tunnel. + # Use "dev tap0" if you are ethernet bridging + # and have precreated a tap0 virtual interface + # and bridged it with your ethernet interface. + # If you want to control access policies + # over the VPN, you must create firewall + # rules for the the TUN/TAP interface. + # On non-Windows systems, you can give + # an explicit unit number, such as tun0. + # On Windows, use "dev-node" for this. + # On most systems, the VPN will not function + # unless you partially or fully disable + # the firewall for the TUN/TAP interface. +# option dev tap + option dev tun + + # SSL/TLS root certificate (ca), certificate + # (cert), and private key (key). Each client + # and the server must have their own cert and + # key file. The server and all clients will + # use the same ca file. + # + # See the "easy-rsa" directory for a series + # of scripts for generating RSA certificates + # and private keys. Remember to use + # a unique Common Name for the server + # and each of the client certificates. + # + # Any X509 key management system can be used. + # OpenVPN can also use a PKCS #12 formatted key file + # (see "pkcs12" directive in man page). + option ca /etc/openvpn/ca.crt + option cert /etc/openvpn/server.crt + # This file should be kept secret: + option key /etc/openvpn/server.key + + # Diffie hellman parameters. + # Generate your own with: + # openssl dhparam -out dh1024.pem 1024 + # Substitute 2048 for 1024 if you are using + # 2048 bit keys. + option dh /etc/openvpn/dh1024.pem + + # Configure server mode and supply a VPN subnet + # for OpenVPN to draw client addresses from. + # The server will take 10.8.0.1 for itself, + # the rest will be made available to clients. + # Each client will be able to reach the server + # on 10.8.0.1. Comment this line out if you are + # ethernet bridging. See the man page for more info. + option server "10.8.0.0 255.255.255.0" + + # Maintain a record of client <-> virtual IP address + # associations in this file. If OpenVPN goes down or + # is restarted, reconnecting clients can be assigned + # the same virtual IP address from the pool that was + # previously assigned. + option ifconfig_pool_persist /tmp/ipp.txt + + # Configure server mode for ethernet bridging. + # You must first use your OS's bridging capability + # to bridge the TAP interface with the ethernet + # NIC interface. Then you must manually set the + # IP/netmask on the bridge interface, here we + # assume 10.8.0.4/255.255.255.0. Finally we + # must set aside an IP range in this subnet + # (start=10.8.0.50 end=10.8.0.100) to allocate + # to connecting clients. Leave this line commented + # out unless you are ethernet bridging. +# option server_bridge "10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100" + + # Push routes to the client to allow it + # to reach other private subnets behind + # the server. Remember that these + # private subnets will also need + # to know to route the OpenVPN client + # address pool (10.8.0.0/255.255.255.0) + # back to the OpenVPN server. +# list push "route 192.168.10.0 255.255.255.0" +# list push "route 192.168.20.0 255.255.255.0" + + # To assign specific IP addresses to specific + # clients or if a connecting client has a private + # subnet behind it that should also have VPN access, + # use the subdirectory "ccd" for client-specific + # configuration files (see man page for more info). + + # EXAMPLE: Suppose the client + # having the certificate common name "Thelonious" + # also has a small subnet behind his connecting + # machine, such as 192.168.40.128/255.255.255.248. + # First, uncomment out these lines: +# option client_config_dir /etc/openvpn/ccd +# list route "192.168.40.128 255.255.255.248" + # Then create a file ccd/Thelonious with this line: + # iroute 192.168.40.128 255.255.255.248 + # This will allow Thelonious' private subnet to + # access the VPN. This example will only work + # if you are routing, not bridging, i.e. you are + # using "dev tun" and "server" directives. + + # EXAMPLE: Suppose you want to give + # Thelonious a fixed VPN IP address of 10.9.0.1. + # First uncomment out these lines: +# option client_config_dir /etc/openvpn/ccd +# list route "10.9.0.0 255.255.255.252" +# list route "192.168.100.0 255.255.255.0" + # Then add this line to ccd/Thelonious: + # ifconfig-push "10.9.0.1 10.9.0.2" + + # Suppose that you want to enable different + # firewall access policies for different groups + # of clients. There are two methods: + # (1) Run multiple OpenVPN daemons, one for each + # group, and firewall the TUN/TAP interface + # for each group/daemon appropriately. + # (2) (Advanced) Create a script to dynamically + # modify the firewall in response to access + # from different clients. See man + # page for more info on learn-address script. +# option learn_address /etc/openvpn/script + + # If enabled, this directive will configure + # all clients to redirect their default + # network gateway through the VPN, causing + # all IP traffic such as web browsing and + # and DNS lookups to go through the VPN + # (The OpenVPN server machine may need to NAT + # the TUN/TAP interface to the internet in + # order for this to work properly). + # CAVEAT: May break client's network config if + # client's local DHCP server packets get routed + # through the tunnel. Solution: make sure + # client's local DHCP server is reachable via + # a more specific route than the default route + # of 0.0.0.0/0.0.0.0. +# list push "redirect-gateway" + + # Certain Windows-specific network settings + # can be pushed to clients, such as DNS + # or WINS server addresses. CAVEAT: + # http://openvpn.net/faq.html#dhcpcaveats +# list push "dhcp-option DNS 10.8.0.1" +# list push "dhcp-option WINS 10.8.0.1" + + # Uncomment this directive to allow different + # clients to be able to "see" each other. + # By default, clients will only see the server. + # To force clients to only see the server, you + # will also need to appropriately firewall the + # server's TUN/TAP interface. +# option client_to_client 1 + + # Uncomment this directive if multiple clients + # might connect with the same certificate/key + # files or common names. This is recommended + # only for testing purposes. For production use, + # each client should have its own certificate/key + # pair. + # + # IF YOU HAVE NOT GENERATED INDIVIDUAL + # CERTIFICATE/KEY PAIRS FOR EACH CLIENT, + # EACH HAVING ITS OWN UNIQUE "COMMON NAME", + # UNCOMMENT THIS LINE OUT. +# option duplicate_cn 1 + + # The keepalive directive causes ping-like + # messages to be sent back and forth over + # the link so that each side knows when + # the other side has gone down. + # Ping every 10 seconds, assume that remote + # peer is down if no ping received during + # a 120 second time period. + option keepalive "10 120" + + # For extra security beyond that provided + # by SSL/TLS, create an "HMAC firewall" + # to help block DoS attacks and UDP port flooding. + # + # Generate with: + # openvpn --genkey --secret ta.key + # + # The server and each client must have + # a copy of this key. + # The second parameter should be '0' + # on the server and '1' on the clients. + # This file is secret: +# option tls_auth "/etc/openvpn/ta.key 0" + + # Select a cryptographic cipher. + # This config item must be copied to + # the client config file as well. + # Blowfish (default): +# option cipher BF-CBC + # AES: +# option cipher AES-128-CBC + # Triple-DES: +# option cipher DES-EDE3-CBC + + # Enable compression on the VPN link. + # If you enable it here, you must also + # enable it in the client config file. + option comp_lzo 1 + + # The maximum number of concurrently connected + # clients we want to allow. +# option max_clients 100 + + # The persist options will try to avoid + # accessing certain resources on restart + # that may no longer be accessible because + # of the privilege downgrade. + option persist_key 1 + option persist_tun 1 + + # Output a short status file showing + # current connections, truncated + # and rewritten every minute. + option status /tmp/openvpn-status.log + + # By default, log messages will go to the syslog (or + # on Windows, if running as a service, they will go to + # the "\Program Files\OpenVPN\log" directory). + # Use log or log-append to override this default. + # "log" will truncate the log file on OpenVPN startup, + # while "log-append" will append to it. Use one + # or the other (but not both). +# option log /tmp/openvpn.log +# option log_append /tmp/openvpn.log + + # Set the appropriate level of log + # file verbosity. + # + # 0 is silent, except for fatal errors + # 4 is reasonable for general usage + # 5 and 6 can help to debug connection problems + # 9 is extremely verbose + option verb 3 + + # Silence repeating messages. At most 20 + # sequential messages of the same message + # category will be output to the log. +# option mute 20 + + +############################################## +# Sample client-side OpenVPN 2.0 uci config # +# for connecting to multi-client server. # +############################################## + +config openvpn sample_client + + # Set to 1 to enable this instance: + option enable 0 + + # Specify that we are a client and that we + # will be pulling certain config file directives + # from the server. + option client 1 + + # Use the same setting as you are using on + # the server. + # On most systems, the VPN will not function + # unless you partially or fully disable + # the firewall for the TUN/TAP interface. +# option dev tap + option dev tun + + # Are we connecting to a TCP or + # UDP server? Use the same setting as + # on the server. +# option proto tcp + option proto udp + + # The hostname/IP and port of the server. + # You can have multiple remote entries + # to load balance between the servers. + list remote "my_server_1 1194" +# list remote "my_server_2 1194" + + # Choose a random host from the remote + # list for load_balancing. Otherwise + # try hosts in the order specified. +# option remote_random 1 + + # Keep trying indefinitely to resolve the + # host name of the OpenVPN server. Very useful + # on machines which are not permanently connected + # to the internet such as laptops. + option resolv_retry infinite + + # Most clients don't need to bind to + # a specific local port number. + option nobind 1 + + # Try to preserve some state across restarts. + option persist_key 1 + option persist_tun 1 + + # If you are connecting through an + # HTTP proxy to reach the actual OpenVPN + # server, put the proxy server/IP and + # port number here. See the man page + # if your proxy server requires + # authentication. + # retry on connection failures: +# option http_proxy_retry 1 + # specify http proxy address and port: +# option http_proxy "192.168.1.100 8080" + + # Wireless networks often produce a lot + # of duplicate packets. Set this flag + # to silence duplicate packet warnings. +# option mute_replay_warnings 1 + + # SSL/TLS parms. + # See the server config file for more + # description. It's best to use + # a separate .crt/.key file pair + # for each client. A single ca + # file can be used for all clients. + option ca /etc/openvpn/ca.crt + option cert /etc/openvpn/client.crt + option key /etc/openvpn/client.key + + # Verify server certificate by checking + # that the certicate has the nsCertType + # field set to "server". This is an + # important precaution to protect against + # a potential attack discussed here: + # http://openvpn.net/howto.html#mitm + # + # To use this feature, you will need to generate + # your server certificates with the nsCertType + # field set to "server". The build_key_server + # script in the easy_rsa folder will do this. +# option ns_cert_type server + + # If a tls_auth key is used on the server + # then every client must also have the key. +# option tls_auth "/etc/openvpn/ta.key 1" + + # Select a cryptographic cipher. + # If the cipher option is used on the server + # then you must also specify it here. +# option cipher x + + # Enable compression on the VPN link. + # Don't enable this unless it is also + # enabled in the server config file. + option comp_lzo 1 + + # Set log file verbosity. + option verb 3 + + # Silence repeating messages +# option mute 20 diff --git a/net/openvpn/files/openvpn.init b/net/openvpn/files/openvpn.init new file mode 100644 index 0000000..0fee06d --- /dev/null +++ b/net/openvpn/files/openvpn.init @@ -0,0 +1,170 @@ +#!/bin/sh /etc/rc.common +# OpenVPN init script +# Copyright (C) 2008 Jo-Philipp Wich +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +START=95 +BIN=/usr/sbin/openvpn +SSD=start-stop-daemon +EXTRA_COMMANDS="up down" + +LIST_SEP=" +" + +append_param() { + local v="$1" + case "$v" in + *_*_*_*) v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_} ;; + *_*_*) v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_} ;; + *_*) v=${v%%_*}-${v#*_} ;; + esac + ARGS="$ARGS --$v" + return 0 +} + +append_bools() { + local p; local v; local s="$1"; shift + for p in $*; do + config_get_bool v "$s" "$p" + [ "$v" == 1 ] && append_param "$p" + done +} + +append_params() { + local p; local v; local s="$1"; shift + for p in $*; do + config_get v "$s" "$p" + IFS="$LIST_SEP" + for v in $v; do + [ -n "$v" ] && append_param "$p" && ARGS="$ARGS $v" + done + unset IFS + done +} + +append_params_quoted() { + local p; local v; local s="$1"; shift + for p in $*; do + config_get v "$s" "$p" + IFS="$LIST_SEP" + for v in $v; do + [ -n "$v" ] && append_param "$p" && ARGS="$ARGS '$v'" + done + unset IFS + done +} + +start_service() { + local s="$1" + local enable=0 + + # disabled? + config_get_bool enable "$s" enable 0 + [ "$enable" == 0 ] && return 0 + + PID="/var/run/openvpn-$s.pid" + ARGS="" + + # append flags + append_bools "$s" \ + auth_nocache auth_retry auth_user_pass_optional bind ccd_exclusive client client_cert_not_required \ + client_disconnect client_to_client comp_lzo comp_noadapt disable \ + disable_occ down_pre duplicate_cn fast_io float http_proxy_retry \ + ifconfig_noexec ifconfig_nowarn ifconfig_pool_linear management_forget_disconnect management_hold \ + management_query_passwords management_signal mktun mlock mtu_test multihome mute_replay_warnings \ + nobind no_iv no_name_remapping no_replay opt_verify passtos persist_key persist_local_ip \ + persist_remote_ip persist_tun ping_timer_rem pull push_reset \ + remote_random rmtun route_noexec route_nopull single_session socks_proxy_retry \ + suppress_timestamps tcp_nodelay test_crypto tls_client tls_exit tls_server \ + tun_ipv6 up_delay up_restart username_as_common_name + + # append params + append_params "$s" \ + cd askpass auth auth_user_pass auth_user_pass_verify bcast_buffers ca cert \ + chroot cipher client_config_dir client_connect config connect_freq \ + connect_retry connect_timeout connect_retry_max crl_verify dev dev_node dev_type dh \ + echo engine explicit_exit_notify fragment group hand_window hash_size \ + http_proxy http_proxy_option http_proxy_timeout ifconfig ifconfig_pool \ + ifconfig_pool_persist ifconfig_push inactive ipchange iroute keepalive \ + key key_method keysize learn_address link_mtu lladdr local log log_append \ + lport management management_log_cache max_clients \ + max_routes_per_client mode mssfix mtu_disc mute nice ns_cert_type ping \ + ping_exit ping_restart pkcs12 plugin port port_share prng proto rcvbuf \ + redirect_gateway remap_usr1 remote remote_cert_eku remote_cert_ku remote_cert_tls \ + reneg_bytes reneg_pkts reneg_sec \ + replay_persist replay_window resolv_retry route route_delay route_gateway \ + route_metric route_up rport script_security secret server server_bridge setenv shaper sndbuf \ + socks_proxy status status_version syslog tcp_queue_limit tls_auth \ + tls_cipher tls_remote tls_timeout tls_verify tmp_dir topology tran_window \ + tun_mtu tun_mtu_extra txqueuelen user verb + + # append multi-value params + append_params_quoted "$s" \ + down push up + + + [ -n "$ARGS" ] && \ + eval "$SSD -q -b -p '$PID' -x $BIN -S -- --syslog 'openvpn($s)' --writepid '$PID' $ARGS" +} + +kill_service() { + local s="$1" + local S="${2:-TERM}" + local enable=0 + + # disabled? + config_get_bool enable "$s" enable 0 + [ "$enable" == 1 ] || [ "$S" == "TERM" ] || return 0 + + PID="/var/run/openvpn-$s.pid" + + $SSD -q -p $PID -x $BIN -K -s $S + [ "$S" == "TERM" ] && rm -f "$PID" +} + +hup_service() { kill_service "$1" HUP; } +stop_service() { kill_service "$1" TERM; } + +start() { + config_load openvpn + config_foreach start_service openvpn +} + +stop() { + config_load openvpn + config_foreach stop_service openvpn +} + +reload() { + config_load openvpn + config_foreach hup_service openvpn +} + +restart() { + stop; sleep 5; start +} + +up() { + local exists + local INSTANCE + config_load openvpn + for INSTANCE in "$@"; do + config_get exists "$INSTANCE" TYPE + if [ "$exists" == "openvpn" ]; then + start_service "$INSTANCE" + fi + done +} + +down() { + local exists + local INSTANCE + config_load openvpn + for INSTANCE in "$@"; do + config_get exists "$INSTANCE" TYPE + if [ "$exists" == "openvpn" ]; then + stop_service "$INSTANCE" + fi + done +} diff --git a/net/openvpn/files/openvpn.upgrade b/net/openvpn/files/openvpn.upgrade new file mode 100644 index 0000000..6ae49d2 --- /dev/null +++ b/net/openvpn/files/openvpn.upgrade @@ -0,0 +1 @@ +/etc/openvpn/ diff --git a/net/openvpn/patches/001-easy_rsa.patch b/net/openvpn/patches/001-easy_rsa.patch new file mode 100644 index 0000000..fa987a2 --- /dev/null +++ b/net/openvpn/patches/001-easy_rsa.patch @@ -0,0 +1,192 @@ +--- a/easy-rsa/2.0/build-ca ++++ b/easy-rsa/2.0/build-ca +@@ -1,8 +1,8 @@ +-#!/bin/bash ++#!/bin/sh + + # + # Build a root certificate + # + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --initca $* ++"/usr/sbin/pkitool" --interact --initca $* +--- a/easy-rsa/2.0/build-dh ++++ b/easy-rsa/2.0/build-dh +@@ -1,4 +1,6 @@ +-#!/bin/bash ++#!/bin/sh ++ ++. /etc/easy-rsa/vars + + # Build Diffie-Hellman parameters for the server side + # of an SSL/TLS connection. +--- a/easy-rsa/2.0/build-inter ++++ b/easy-rsa/2.0/build-inter +@@ -1,7 +1,7 @@ +-#!/bin/bash ++#!/bin/sh + + # Make an intermediate CA certificate/private key pair using a locally generated + # root certificate. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --inter $* ++"/usr/sbin/pkitool" --interact --inter $* +--- a/easy-rsa/2.0/build-key ++++ b/easy-rsa/2.0/build-key +@@ -1,7 +1,7 @@ +-#!/bin/bash ++#!/bin/sh + + # Make a certificate/private key pair using a locally generated + # root certificate. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact $* ++"/usr/sbin/pkitool" --interact $* +--- a/easy-rsa/2.0/build-key-pass ++++ b/easy-rsa/2.0/build-key-pass +@@ -1,7 +1,7 @@ +-#!/bin/bash ++#!/bin/sh + + # Similar to build-key, but protect the private key + # with a password. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --pass $* ++"/usr/sbin/pkitool" --interact --pass $* +--- a/easy-rsa/2.0/build-key-pkcs12 ++++ b/easy-rsa/2.0/build-key-pkcs12 +@@ -1,8 +1,8 @@ +-#!/bin/bash ++#!/bin/sh + + # Make a certificate/private key pair using a locally generated + # root certificate and convert it to a PKCS #12 file including the + # the CA certificate as well. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --pkcs12 $* ++"/usr/sbin/pkitool" --interact --pkcs12 $* +--- a/easy-rsa/2.0/build-key-server ++++ b/easy-rsa/2.0/build-key-server +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # Make a certificate/private key pair using a locally generated + # root certificate. +@@ -7,4 +7,4 @@ + # extension in the openssl.cnf file. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --server $* ++"/usr/sbin/pkitool" --interact --server $* +--- a/easy-rsa/2.0/build-req ++++ b/easy-rsa/2.0/build-req +@@ -1,7 +1,7 @@ +-#!/bin/bash ++#!/bin/sh + + # Build a certificate signing request and private key. Use this + # when your root certificate and key is not available locally. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --csr $* ++"/usr/sbin/pkitool" --interact --csr $* +--- a/easy-rsa/2.0/build-req-pass ++++ b/easy-rsa/2.0/build-req-pass +@@ -1,7 +1,7 @@ +-#!/bin/bash ++#!/bin/sh + + # Like build-req, but protect your private key + # with a password. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --csr --pass $* ++"/usr/sbin/pkitool" --interact --csr --pass $* +--- a/easy-rsa/2.0/clean-all ++++ b/easy-rsa/2.0/clean-all +@@ -1,4 +1,6 @@ +-#!/bin/bash ++#!/bin/sh ++ ++. /etc/easy-rsa/vars + + # Initialize the $KEY_DIR directory. + # Note that this script does a +--- a/easy-rsa/2.0/inherit-inter ++++ b/easy-rsa/2.0/inherit-inter +@@ -1,4 +1,6 @@ +-#!/bin/bash ++#!/bin/sh ++ ++. /etc/easy-rsa/vars + + # Build a new PKI which is rooted on an intermediate certificate generated + # by ./build-inter or ./pkitool --inter from a parent PKI. The new PKI should +--- a/easy-rsa/2.0/list-crl ++++ b/easy-rsa/2.0/list-crl +@@ -1,4 +1,6 @@ +-#!/bin/bash ++#!/bin/sh ++ ++. /etc/easy-rsa/vars + + # list revoked certificates + +--- a/easy-rsa/2.0/pkitool ++++ b/easy-rsa/2.0/pkitool +@@ -1,5 +1,7 @@ + #!/bin/sh + ++. /etc/easy-rsa/vars ++ + # OpenVPN -- An application to securely tunnel IP networks + # over a single TCP/UDP port, with support for SSL/TLS-based + # session authentication and key exchange, +--- a/easy-rsa/2.0/revoke-full ++++ b/easy-rsa/2.0/revoke-full +@@ -1,4 +1,6 @@ +-#!/bin/bash ++#!/bin/sh ++ ++. /etc/easy-rsa/vars + + # revoke a certificate, regenerate CRL, + # and verify revocation +--- a/easy-rsa/2.0/sign-req ++++ b/easy-rsa/2.0/sign-req +@@ -1,7 +1,7 @@ +-#!/bin/bash ++#!/bin/sh + + # Sign a certificate signing request (a .csr file) + # with a local root certificate and key. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --sign $* ++"/usr/sbin/pkitool" --interact --sign $* +--- a/easy-rsa/2.0/vars ++++ b/easy-rsa/2.0/vars +@@ -12,7 +12,7 @@ + # This variable should point to + # the top level of the easy-rsa + # tree. +-export EASY_RSA="`pwd`" ++export EASY_RSA="/etc/easy-rsa" + + # + # This variable should point to +@@ -26,7 +26,7 @@ export GREP="grep" + # This variable should point to + # the openssl.cnf file included + # with easy-rsa. +-export KEY_CONFIG=`$EASY_RSA/whichopensslcnf $EASY_RSA` ++export KEY_CONFIG=`/usr/sbin/whichopensslcnf $EASY_RSA` + + # Edit this variable to point to + # your soon-to-be-created key diff --git a/net/p910nd/Makefile b/net/p910nd/Makefile new file mode 100644 index 0000000..1e0fafb --- /dev/null +++ b/net/p910nd/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2009-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=p910nd +PKG_VERSION:=0.95 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/p910nd +PKG_MD5SUM:=c7ac6afdf7730ac8387a8e87198d4491 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/p910nd + SECTION:=net + CATEGORY:=Network + TITLE:=A small non-spooling printer server + URL:=http://p910nd.sourceforge.net +endef + +define Package/p910nd/conffiles +/etc/config/p910nd +endef + +define Package/p910nd/description + p910nd is a small daemon that copies any data received on + the port it is listening on to the corresponding printer + port. It is primarily intended for diskless Linux hosts + running as printer drivers but there is no reason why it + could not be used on diskful hosts. Port 9100 is copied + to /dev/lp0, 9101 to /dev/lp1 and 9102 to /dev/lp2. The + default is port 9100 to /dev/lp0. +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) -DLOCKFILE_DIR=\"\\\"/tmp\"\\\"" + +define Package/p910nd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/$(PKG_NAME).conf $(1)/etc/config/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,p910nd)) diff --git a/net/p910nd/files/p910nd.conf b/net/p910nd/files/p910nd.conf new file mode 100644 index 0000000..57a3058 --- /dev/null +++ b/net/p910nd/files/p910nd.conf @@ -0,0 +1,5 @@ +config p910nd + option device /dev/lp0 + option port 0 + option bidirectional 1 + option enabled 0 diff --git a/net/p910nd/files/p910nd.init b/net/p910nd/files/p910nd.init new file mode 100644 index 0000000..1850c66 --- /dev/null +++ b/net/p910nd/files/p910nd.init @@ -0,0 +1,50 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org +START=50 + +append_bool() { + local section="$1" + local option="$2" + local value="$3" + local _val + config_get_bool _val "$section" "$option" '0' + [ "$_val" -gt 0 ] && append args "$3" +} + +append_string() { + local section="$1" + local option="$2" + local value="$3" + local _val + config_get _val "$section" "$option" + [ -n "$_val" ] && append args "$3$_val" +} + +start_service() { + local section="$1" + args="" + + append_bool "$section" bidirectional "-b" + append_string "$section" device "-f " + append_string "$section" port "" + config_get_bool "enabled" "$section" "enabled" '1' + [ "$enabled" -gt 0 ] && /usr/sbin/p910nd $args +} + +stop_service() { + local section="$1" + config_get port "$section" port + + PID_F=/var/run/p910${port}d.pid + [ -f $PID_F ] && kill $(cat $PID_F) +} + +start() { + config_load "p910nd" + config_foreach start_service p910nd +} + +stop() { + config_load "p910nd" + config_foreach stop_service p910nd +} diff --git a/net/parprouted/Makefile b/net/parprouted/Makefile new file mode 100644 index 0000000..4b00c79 --- /dev/null +++ b/net/parprouted/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=parprouted +PKG_VERSION:=0.64 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.hazard.maks.net/parprouted/ +PKG_MD5SUM:=14133c9cb8dd9c9a90ff37648ae7b31a + +include $(INCLUDE_DIR)/package.mk + +define Package/parprouted + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + DEPENDS:=+libpthread + TITLE:=Proxy ARP daemon + URL:=http://www.hazard.maks.net/parprouted/ +endef + +define Package/parprouted/description + parprouted is a daemon for transparent IP (Layer 3) proxy ARP bridging. + This is useful for creation of transparent firewalls and bridging networks + with different MAC protocols. Also, unlike standard bridging, proxy ARP + bridging allows to bridge Ethernet networks behind wireless nodes without + using WDS or layer 2 bridging. + +endef + +define Build/Compile + $(call Build/Compile/Default, \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="" \ + all \ + ) +endef + +define Package/parprouted/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/parprouted $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/default + $(INSTALL_BIN) ./files/parprouted.default $(1)/etc/default/parprouted + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/parprouted.init $(1)/etc/init.d/parprouted +endef + +$(eval $(call BuildPackage,parprouted)) diff --git a/net/parprouted/files/parprouted.default b/net/parprouted/files/parprouted.default new file mode 100755 index 0000000..7128a56 --- /dev/null +++ b/net/parprouted/files/parprouted.default @@ -0,0 +1 @@ +OPTIONS="$lan_ifname $wifi_ifname" diff --git a/net/parprouted/files/parprouted.init b/net/parprouted/files/parprouted.init new file mode 100644 index 0000000..fe79440 --- /dev/null +++ b/net/parprouted/files/parprouted.init @@ -0,0 +1,15 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=parprouted +DEFAULT=/etc/default/$BIN + +start() { + [ -f $DEFAULT ] && . $DEFAULT + $BIN $OPTIONS +} + +stop() { + killall $BIN +} diff --git a/net/parprouted/patches/001-parprouted.patch b/net/parprouted/patches/001-parprouted.patch new file mode 100644 index 0000000..17fbdec --- /dev/null +++ b/net/parprouted/patches/001-parprouted.patch @@ -0,0 +1,33 @@ +diff -rupw parprouted-0.63/arp.c parprouted-0.63-1/arp.c +--- parprouted-0.63/arp.c 2004-05-23 14:06:31.000000000 +0200 ++++ parprouted-0.63-1/arp.c 2005-03-13 16:10:18.000000000 +0100 +@@ -366,7 +366,7 @@ void *arp(char *ifname) + do { + pthread_testcancel(); + /* Sleep a bit in order not to overload the system */ +- usleep(300); ++ usleep(3000); + + if (arp_recv(sock, &frame) <= 0) + continue; +diff -rupw parprouted-0.63/parprouted.c parprouted-0.63-1/parprouted.c +--- parprouted-0.63/parprouted.c 2004-01-30 02:45:43.000000000 +0100 ++++ parprouted-0.63-1/parprouted.c 2005-03-20 09:14:35.000000000 +0100 +@@ -93,7 +93,7 @@ void processarp(int cleanup) + + /* added route to the kernel */ + if (snprintf(routecmd_str, ROUTE_CMD_LEN-1, +- "/sbin/ip route add %s/32 metric 50 dev %s scope link", ++ "/sbin/route add -host %s metric 50 dev %s", + inet_ntoa(cur_entry->ipaddr_ia), cur_entry->ifname) > ROUTE_CMD_LEN-1) + { + syslog(LOG_INFO, "ip route command too large to fit in buffer!"); +@@ -112,7 +112,7 @@ void processarp(int cleanup) + + /* remove entry from arp table and remove route from kernel */ + if (snprintf(routecmd_str, ROUTE_CMD_LEN-1, +- "/sbin/ip route del %s/32 metric 50 dev %s scope link", ++ "/sbin/route del -host %s metric 50 dev %s", + inet_ntoa(cur_entry->ipaddr_ia), cur_entry->ifname) > ROUTE_CMD_LEN-1) + { + syslog(LOG_INFO, "ip route command too large to fit in buffer!"); diff --git a/net/pcapsipdump/Makefile b/net/pcapsipdump/Makefile new file mode 100644 index 0000000..03fa71f --- /dev/null +++ b/net/pcapsipdump/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pcapsipdump +PKG_VERSION:=0.1.4 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/psipdump +PKG_MD5SUM:=95ed26caf66237a654cae2cacdaa3386 + +include $(INCLUDE_DIR)/package.mk + +define Package/pcapsipdump + SECTION:=net + CATEGORY:=Network + SUBMENU:=Telephony + DEPENDS:=+libpcap +uclibcxx + TITLE:=SIP sessions dumping tool + URL:=http://sourceforge.net/projects/pcapsipdump/ +endef + +define Package/pcapsipdump/description + pcapsipdump is a tool for dumping SIP sessions (+RTP traffic, if available) to disk in a + fashion similar to "tcpdump -w" (format is exactly the same), but one file per sip session + (even if there is thousands of concurrect SIP sessions). +endef + +define Build/Compile + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(PKG_BUILD_DIR) \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/uClibc++ -fno-builtin -fno-rtti -nostdinc++" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ + LIBS="-lpcap -luClibc++" +endef + +define Package/pcapsipdump/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/pcapsipdump $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,pcapsipdump)) diff --git a/net/pcapsipdump/patches/001-cross_compile.patch b/net/pcapsipdump/patches/001-cross_compile.patch new file mode 100644 index 0000000..db4bead --- /dev/null +++ b/net/pcapsipdump/patches/001-cross_compile.patch @@ -0,0 +1,16 @@ +diff -urN pcapsipdump-0.1.4/Makefile pcapsipdump-0.1.4.new/Makefile +--- pcapsipdump-0.1.4/Makefile 2007-02-09 12:33:48.000000000 +0100 ++++ pcapsipdump-0.1.4.new/Makefile 2009-05-12 12:01:02.000000000 +0200 +@@ -1,10 +1,10 @@ + all: pcapsipdump + + pcapsipdump: pcapsipdump.cpp calltable.cpp calltable.h +- $(CC) $(CPPFLAGS) $(LDFLAGS) pcapsipdump.cpp calltable.cpp -o pcapsipdump -lpcap -lstdc++ ++ $(CC) $(CPPFLAGS) $(LDFLAGS) pcapsipdump.cpp calltable.cpp -o pcapsipdump $(LIBS) + + pcapsipdump-debug: pcapsipdump.cpp calltable.cpp calltable.h +- $(CC) $(CPPFLAGS) $(LDFLAGS) -ggdb pcapsipdump.cpp calltable.cpp -o pcapsipdump-debug -lpcap -lstdc++ ++ $(CC) $(CPPFLAGS) $(LDFLAGS) -ggdb pcapsipdump.cpp calltable.cpp -o pcapsipdump-debug $(LIBS) + + clean: + rm -f pcapsipdump diff --git a/net/pcapsipdump/patches/002-elif_else_replacement.patch b/net/pcapsipdump/patches/002-elif_else_replacement.patch new file mode 100644 index 0000000..bb217b7 --- /dev/null +++ b/net/pcapsipdump/patches/002-elif_else_replacement.patch @@ -0,0 +1,12 @@ +diff -urN pcapsipdump-0.1.4/pcapsipdump.h pcapsipdump-0.1.4.new/pcapsipdump.h +--- pcapsipdump-0.1.4/pcapsipdump.h 2007-05-11 20:40:49.000000000 +0200 ++++ pcapsipdump-0.1.4.new/pcapsipdump.h 2010-03-29 09:52:20.000000000 +0200 +@@ -35,7 +35,7 @@ + #elif defined (__BIG_ENDIAN) + uint8_t version:4, + ihl:4; +-#elif ++#else + #error Endian not defined + #endif + uint8_t tos; diff --git a/net/peerguardian/Makefile b/net/peerguardian/Makefile new file mode 100644 index 0000000..9f0335d --- /dev/null +++ b/net/peerguardian/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=peerguardian +PKG_VERSION:=1.5beta +PKG_RELEASE:=3 + +PKG_SOURCE:=pglinux-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/peerguardian +PKG_MD5SUM:=0fb2bc5501b031604fc56eec3bd35fa4 + +PKG_BUILD_DIR:=$(BUILD_DIR)/pglinux-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +PKG_BUILD_DEPENDS:=iptables + +include $(INCLUDE_DIR)/package.mk + +define Package/peerguardian + SECTION:=net + CATEGORY:=Network + SUBMENU:=P2P + DEPENDS:= +libncurses +libpthread +libnetfilter-queue + TITLE:=PeerGuardian for Linux + URL:=http://phoenixlabs.org/ +endef + +define Package/peerguardian/description + PeerGuardian helps protect your privacy by blocking many ranges of aggressive + IPs while you use P2P. +endef + +define Package/peerguardian/conffiles +/etc/PG.conf +/etc/p2p.p2b.p2p +endef + +EXTRA_CFLAGS:=-fno-rtti -I$(STAGING_DIR)/usr/include/libnetfilter_queue/ + +CONFIGURE_VARS+= \ + LIBS="-lm" + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + CXXLD="$(TARGET_CXX)" +endef + +define Package/peerguardian/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) $(PKG_BUILD_DIR)/PG.conf $(1)/etc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/p2p.p2b.p2p $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/peerguardnf $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/pgtext $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/peerguardian.init $(1)/etc/init.d/peerguardian +endef + +$(eval $(call BuildPackage,peerguardian)) diff --git a/net/peerguardian/files/peerguardian.init b/net/peerguardian/files/peerguardian.init new file mode 100644 index 0000000..c0cb8be --- /dev/null +++ b/net/peerguardian/files/peerguardian.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=peerguardnf +CFG_F=/etc/PG.conf +OPTIONS="-c $CFG_F -d" + +start() { + $BIN $OPTIONS +} + diff --git a/net/peerguardian/patches/001-no_host_includes.patch b/net/peerguardian/patches/001-no_host_includes.patch new file mode 100644 index 0000000..11a63f0 --- /dev/null +++ b/net/peerguardian/patches/001-no_host_includes.patch @@ -0,0 +1,13 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -74,8 +74,8 @@ peerguardnf_SOURCES = Main.cpp PeerGuard + pgtext_SOURCES = pgtext.cpp + peerguardnf_LDADD = -lipq -lpthread + pgtext_LDADD = -lncurses -lpthread +-peerguardnf_LDFLAGS = $(all_includes) -I/usr/include/libipq +-AM_CPPFLAGS = $(ALL_INCLUDES) -I/usr/include/libipq ++peerguardnf_LDFLAGS = $(all_includes) ++AM_CPPFLAGS = $(ALL_INCLUDES) + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs + CONFIG_HEADER = config.h diff --git a/net/peerguardian/patches/002-new_libipq.patch b/net/peerguardian/patches/002-new_libipq.patch new file mode 100644 index 0000000..c7ca959 --- /dev/null +++ b/net/peerguardian/patches/002-new_libipq.patch @@ -0,0 +1,32 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -3,7 +3,7 @@ man_MANS=peerguardnf.1 + mybin_PROGRAMS = peerguardnf pgtext + peerguardnf_SOURCES=Main.cpp PeerGuard.cpp BlockList.cpp Blocker_Linux.cpp Blocker_BSD.cpp HttpServer.cpp HttpRequest.cpp sha1.cpp + pgtext_SOURCES=pgtext.cpp +-peerguardnf_LDADD=-lipq -lpthread ++peerguardnf_LDADD=-lipq -lnetfilter_queue -lnfnetlink -lpthread + pgtext_LDADD=-lncurses -lpthread + peerguardnf_LDFLAGS=$(all_includes) -I/usr/include/libipq + AM_CPPFLAGS=$(ALL_INCLUDES) -I/usr/include/libipq +--- a/Makefile.in ++++ b/Makefile.in +@@ -72,7 +72,7 @@ man_MANS = peerguardnf.1 + mybin_PROGRAMS = peerguardnf pgtext + peerguardnf_SOURCES = Main.cpp PeerGuard.cpp BlockList.cpp Blocker_Linux.cpp Blocker_BSD.cpp HttpServer.cpp HttpRequest.cpp sha1.cpp + pgtext_SOURCES = pgtext.cpp +-peerguardnf_LDADD = -lipq -lpthread ++peerguardnf_LDADD = -lipq -lnetfilter_queue -lnfnetlink -lpthread + pgtext_LDADD = -lncurses -lpthread + peerguardnf_LDFLAGS = $(all_includes) + AM_CPPFLAGS = $(ALL_INCLUDES) +--- a/Blocker_Linux.cpp ++++ b/Blocker_Linux.cpp +@@ -22,6 +22,7 @@ + + #include "PeerGuard.h" + ++#include + #include + extern "C" { + #include diff --git a/net/peerguardian/patches/003-gcc_4_3-compile-fix.patch b/net/peerguardian/patches/003-gcc_4_3-compile-fix.patch new file mode 100644 index 0000000..aaa72c3 --- /dev/null +++ b/net/peerguardian/patches/003-gcc_4_3-compile-fix.patch @@ -0,0 +1,20 @@ +--- a/Main.cpp ++++ b/Main.cpp +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + using namespace PG; + using namespace std; +--- a/PeerGuard.h ++++ b/PeerGuard.h +@@ -24,6 +24,7 @@ + #include "BlockList.h" + + #include ++#include + + namespace PG { + diff --git a/net/pen/Makefile b/net/pen/Makefile new file mode 100644 index 0000000..161abbc --- /dev/null +++ b/net/pen/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pen +PKG_VERSION:=0.18.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://siag.nu/pub/pen/ +PKG_MD5SUM:=96f6d39e7e7cca11a647e795550f3829 + +include $(INCLUDE_DIR)/package.mk + +define Package/pen + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libopenssl + TITLE:=Simple tcp load balancer + URL:=http://siag.nu/pen/ +endef + +define Package/pen/description + This is pen, a load balancer for "simple" tcp based protocols + such as http or smtp. It allows several servers to appear as + one to the outside and automatically detects servers that are + down and distributes clients among the available servers. + This gives high availability and scalable performance. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --with-poll \ + --with-experimental-only-ssl="$(STAGING_DIR)/usr" \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) +endef + +define Package/pen/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mergelogs $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/pen $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/penctl $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/penctl.cgi $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/penlog $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/penlogd $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/penstats $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,pen)) diff --git a/net/pepperspot/Makefile b/net/pepperspot/Makefile new file mode 100644 index 0000000..9f29b43 --- /dev/null +++ b/net/pepperspot/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pepperspot +PKG_VERSION:=0.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/pepperspot +PKG_MD5SUM:=10e6d42be577c231135c36440d86012a + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/pepperspot + SUBMENU:=Captive Portals + SECTION:=net + CATEGORY:=Network + TITLE:=Wireless LAN HotSpot controller + URL:=http://pepperspot.sourceforge.net/ + DEPENDS:=+kmod-tun +kmod-ipv6 +endef + +define Package/pepperspot/description + PepperSpot is a captive portal or wireless LAN access point controller + which support the IPv6 protocol. It supports web based login and it + supports Wireless Protected Access (WPA). Authentication is handled by + your favorite radius server (over IPv4/IPv6). +endef + +define Package/pepperspot/conffiles +/etc/pepper.conf +endef + +# uses GNU configure + +define Build/Prepare +$(call Build/Prepare/Default) + # prevent autoconf invocation, since one the patches touched + # configure + (cd $(PKG_BUILD_DIR); \ + touch -r Makefile.am configure.in; \ + touch -r Makefile.in configure; \ + ) +endef + +define Package/pepperspot/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/pepper + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/extra/pepper.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pepper $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,pepperspot)) diff --git a/net/pepperspot/files/pepperspot.init b/net/pepperspot/files/pepperspot.init new file mode 100644 index 0000000..e5bd265 --- /dev/null +++ b/net/pepperspot/files/pepperspot.init @@ -0,0 +1,20 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=50 + +RUN_D=/var/run +PID_F=$RUN_D/pepper.pid + +start() { + include /lib/network + scan_interfaces + /sbin/insmod tun >/dev/null 2>&1 + /sbin/insmod ipv6 >/dev/null 2>&1 + [ -d $RUN_D ] || mkdir -p $RUN_D + config_get ipaddr lan ipaddr + /usr/sbin/pepper --dns1="$ipaddr" +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1 +} diff --git a/net/pepperspot/patches/101-cflags.patch b/net/pepperspot/patches/101-cflags.patch new file mode 100644 index 0000000..a63dad6 --- /dev/null +++ b/net/pepperspot/patches/101-cflags.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -2801,8 +2801,6 @@ am__tar='${AMTAR} chof - "$$tardir"'; am + ac_config_headers="$ac_config_headers config.h" + + +-CFLAGS="" +- + # Checks for programs. + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +--- a/configure.in ++++ b/configure.in +@@ -9,8 +9,6 @@ AM_INIT_AUTOMAKE + + AM_CONFIG_HEADER([config.h]) + +-CFLAGS="" +- + # Checks for programs. + AC_PROG_CC + diff --git a/net/pepperspot/patches/102-no_warnings.patch b/net/pepperspot/patches/102-no_warnings.patch new file mode 100644 index 0000000..2767ae0 --- /dev/null +++ b/net/pepperspot/patches/102-no_warnings.patch @@ -0,0 +1,134 @@ +--- a/src/pepper.c ++++ b/src/pepper.c +@@ -389,7 +389,7 @@ static int set_env(char *name, char *val + } + else if(mac != NULL) + { +- (void) snprintf(s, sizeof(s) - 1, "%.2X-%.2X-%.2X-%.2X-%.2X-%.2X", ++ (void) snprintf(s, sizeof(s) - 1, "%.2hX-%.2hX-%.2hX-%.2hX-%.2hX-%.2hX", + mac[0], mac[1], + mac[2], mac[3], + mac[4], mac[5]); +@@ -447,7 +447,7 @@ static int set_envv6(char *name, char *v + } + else if(mac != NULL) + { +- (void) snprintf(s, sizeof(s) - 1, "%.2X-%.2X-%.2X-%.2X-%.2X-%.2X", ++ (void) snprintf(s, sizeof(s) - 1, "%.2hX-%.2hX-%.2hX-%.2hX-%.2hX-%.2hX", + mac[0], mac[1], + mac[2], mac[3], + mac[4], mac[5]); +@@ -958,7 +958,7 @@ static int set_macallowed(char *macallow + for(i = 0; i < strlen(p1); i++) + if(!isxdigit(p1[i])) p1[i] = 0x20; + +- if(sscanf(p1, "%2x %2x %2x %2x %2x %2x", ++ if(sscanf(p1, "%2hhx %2hhx %2hhx %2hhx %2hhx %2hhx", + &options.macok[options.macoklen][0], + &options.macok[options.macoklen][1], + &options.macok[options.macoklen][2], +@@ -973,7 +973,7 @@ static int set_macallowed(char *macallow + } + if(options.debug & DEBUG_CONF) + { +- printf("Macallowed address #%d: %.2X-%.2X-%.2X-%.2X-%.2X-%.2X\n", ++ printf("Macallowed address #%d: %.2hhX-%.2hhX-%.2hhX-%.2hhX-%.2hhX-%.2hhX\n", + options.macoklen, + options.macok[options.macoklen][0], + options.macok[options.macoklen][1], +--- a/src/redir.c ++++ b/src/redir.c +@@ -178,7 +178,7 @@ static int redir_hextochar(char *src, in + { + char x[3]; + int n = 0; +- int y = 0; ++ unsigned int y = 0; + int nb = len / 2; + + for(n = 0 ; n < nb ; n++) +--- a/src/radius.c ++++ b/src/radius.c +@@ -971,7 +971,7 @@ int radius_getattr(struct radius_packet_ + } + offset += t->l; + } +- while(offset < (ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ ++ while(offset < ((int)ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ + } + else /* Need to check pack -> length */ + { +@@ -992,7 +992,7 @@ int radius_getattr(struct radius_packet_ + } + offset += t->l; + } +- while(offset < (ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ ++ while(offset < ((int)ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ + } + + return -1; /* Not found */ +@@ -1040,7 +1040,7 @@ int radius_getattrv6(struct radius_packe + } + offset += t->l; + } +- while(offset < (ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ ++ while(offset < ((int)ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ + } + else /* Need to check pack -> length */ + { +@@ -1061,7 +1061,7 @@ int radius_getattrv6(struct radius_packe + } + offset += t->l; + } +- while(offset < (ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ ++ while(offset < ((int)ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ + } + + return -1; /* Not found */ +@@ -1090,7 +1090,7 @@ int radius_getattrv6(struct radius_packe + } + offset += 2 + t->l; + } +- while(offset < ntohs(pack->length)); ++ while(offset < (int)ntohs(pack->length)); + + if(0) printf("Count %d\n", count); + return count; +@@ -1903,7 +1903,7 @@ int radius_decaps(struct radius_t *this) + return -1; + } + +- if(ntohs(pack.length) != status) ++ if((int)ntohs(pack.length) != status) + { + sys_err(LOG_WARNING, __FILE__, __LINE__, errno, + "Received radius packet with wrong length field %d != %d!", +@@ -2107,7 +2107,7 @@ int radius_proxy_ind(struct radius_t *th + return -1; + } + +- if(ntohs(pack.length) != status) ++ if((int)ntohs(pack.length) != status) + { + sys_err(LOG_WARNING, __FILE__, __LINE__, 0, + "Received radius packet with wrong length field %d != %d!", +--- a/src/dhcp.c ++++ b/src/dhcp.c +@@ -240,7 +240,7 @@ static int dhcp_tcp_checkv6(struct dhcp_ + struct dhcp_tcphdr_t *tcph = NULL; + int tcp_len = 0; + +- if(ntohs(pack->ip6h.payload_length) > (length - DHCP_ETH_HLEN)) ++ if((int)ntohs(pack->ip6h.payload_length) > (length - DHCP_ETH_HLEN)) + return -1; /* Wrong length of packet */ + + tcp_len = ntohs(pack->ip6h.payload_length); +@@ -347,7 +347,7 @@ static int dhcp_tcp_check(struct dhcp_ip + struct dhcp_tcphdr_t *tcph; + int tcp_len = 0; + +- if(ntohs(pack->iph.tot_len) > (length - DHCP_ETH_HLEN)) ++ if((int)ntohs(pack->iph.tot_len) > (length - DHCP_ETH_HLEN)) + return -1; /* Wrong length of packet */ + + tcp_len = ntohs(pack->iph.tot_len) - pack->iph.ihl * 4; diff --git a/net/pepsal/Makefile b/net/pepsal/Makefile new file mode 100644 index 0000000..6c68e20 --- /dev/null +++ b/net/pepsal/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pepsal +PKG_VERSION:=1.2.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=5107f0b922716276e8493b26b80fb4b6 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/pepsal + TITLE:=Performance Enhancing Proxy + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + URL:=http://pepsal.sourceforge.net/ + DEPENDS:=+libnetfilter-queue +endef + +define Package/pepsal/description + PEPsal is an integrated, multi-layer, transparent TCP Performance Enhancing + Proxy which splits the connection into two parts, making use of Linux TCP + enhancements when sending data, and largely improving performance in + links with different characteristics +endef + + +define Package/pepsal/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/pepsal $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,pepsal)) diff --git a/net/polipo/Makefile b/net/polipo/Makefile new file mode 100644 index 0000000..bbd54eb --- /dev/null +++ b/net/polipo/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=polipo +PKG_VERSION:=1.0.4.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://freehaven.net/~chrisd/polipo/ +PKG_MD5SUM:=bfc5c85289519658280e093a270d6703 + +include $(INCLUDE_DIR)/package.mk + +define Package/polipo + SUBMENU:=Web Servers/Proxies + SECTION:=net + CATEGORY:=Network + TITLE:=A caching web proxy + URL:=http://www.pps.jussieu.fr/~jch/software/polipo/ + MAINTAINER:=Gabriel Kerneis +endef + +define Package/polipo/description + Polipo is a small and fast caching web proxy (a web cache, an HTTP proxy, + a proxy server). While Polipo was designed to be used by one person or a + small group of people, there is nothing that prevents it from being used + by a larger group. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + polipo +endef + +define Package/polipo/conffiles +/etc/config/polipo +/etc/polipo/config +endef + +define Package/polipo/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/polipo $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/polipo + $(INSTALL_CONF) $(PKG_BUILD_DIR)/config.sample $(1)/etc/polipo/config + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/polipo.config $(1)/etc/config/polipo + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/polipo.init $(1)/etc/init.d/polipo +endef + +$(eval $(call BuildPackage,polipo)) diff --git a/net/polipo/files/polipo.config b/net/polipo/files/polipo.config new file mode 100644 index 0000000..8f85331 --- /dev/null +++ b/net/polipo/files/polipo.config @@ -0,0 +1,42 @@ +# polipo daemon configuration +config 'polipo' 'daemon' + # daemonise polipo (fork in background) + option 'daemonise' '1' + # where polipo will store its process pid + option 'pidFile' '/var/run/polipo.pid' + +config 'polipo' 'general' + option 'enabled' '1' + # adress on which polipo will listen, 0.0.0.0 means all addresses + option 'proxyAddress' '0.0.0.0' + # port on which polipo will listen, default is 8123 + #option 'proxyPort' '8123' + # list of allowed clients to connect + list 'allowedClients' '192.168.1.0/24' + #list 'allowedClients' '127.0.0.1' + #list 'allowedClients' '192.168.2.1' + # how much RAM memory should Polipo use (in bytes). + option 'chunkHighMark' '1048576' + # enable disk cache index and serverlist of integrated polipo web interface + #option 'disableIndexing' '0' + #option 'disableServersList' '0' + # disable loging to syslog + option 'logSyslog' '0' + # set log file location (disabled when not set) + #option 'logFile' '/mnt/usbdrive/polipo/log' + +config 'polipo' 'cache' + # disk cache location, you should always use external storage device + # (disabled when not set) + #option 'diskCacheRoot' '/mnt/usbdrive-p2/polipo/cache' + # disk cache cleanup settings + #option 'diskCacheUnlinkTime' '20d' + #option 'diskCacheTruncateTime' '5d' + #option 'diskCacheTruncateSize' '3145728' + # set to 1 if proxy is used by multiple users + #option 'cacheIsShared' '1' + +config 'polipo' 'pmm' + # poor man's multiplexing semgnet size to fetch + #option 'pmmSize' '8192' + diff --git a/net/polipo/files/polipo.init b/net/polipo/files/polipo.init new file mode 100644 index 0000000..5b5d54c --- /dev/null +++ b/net/polipo/files/polipo.init @@ -0,0 +1,162 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=99 + +DAEMON=/usr/sbin/polipo +CFGFILE=/var/etc/polipo.conf + +start() { + config_load polipo + + config_get_bool enabled "general" enabled + [ "$enabled" -ne "1" ] && { + echo 'Polipo is disabled.' + return 0 + } + + mkdir -p /var/etc/ + echo '### AUTOGENERATED CONFIGURATION' > $CFGFILE + echo '### DO NOT EDIT' >> $CFGFILE + echo '### SEE /etc/config/polipo INSTEAD' >> $CFGFILE + echo '' >> $CFGFILE + + config_foreach polipo_config polipo + + # handle values that are disabled when not defiend or empty + echo "### VALUES THAT ARE DISABLED WHEN EMPTY" >> $CFGFILE + polipo_atom "cache" "diskCacheRoot" '"' "1" >> $CFGFILE + polipo_atom "general" "logFile" '"' "1" >> $CFGFILE + polipo_atom "general" "localDocumentRoot" '"' "1" >> $CFGFILE + + echo 'Polipo is starting...' + start-stop-daemon -S -q -x "$DAEMON" -- -c "$CFGFILE" +} + +stop() { + echo 'Polipo is stopping...' + start-stop-daemon -K -q -x "$DAEMON" + rm -f $CFGFILE +} + +restart() { + stop + sleep 2 + start +} + +polipo_config() { + echo "### SECTION $1" >> $CFGFILE + + string_options='authCredentials authRealm dnsNameServer forbiddenFile + forbiddenUrl logFacility pidFile parentAuthCredentials parentProxy + proxyAddress proxyName redirector socksParentProxy socksProxyType + socksUserName uncachableFile' + + number_options='bigBufferSize chunkCriticalMark chunkHighMark chunkLowMark + diskCacheDirectoryPermissions diskCacheFilePermissions + diskCacheTruncateSize diskCacheWriteoutOnClose forbiddenRedirectCode + logFilePermissions logLevel maxDiskCacheEntrySize maxDiskEntries + maxObjectsWhenIdle maxPipelineTrain maxSideBuffering maxWriteoutWhenIdle + objectHashTableSize objectHighMark pmmFirstSize pmmSize proxyPort + publicObjectLowMark redirectorRedirectCode replyUnpipelineSize + serverMaxSlots serverSlots serverSlots1 maxAgeFraction' + + time_options='clientTimeout diskCacheTruncateTime diskCacheUnlinkTime + dnsGethostbynameTtl dnsMaxTimeout dnsNegativeTtl idleTime maxAge + maxConnectionAge maxConnectionRequests maxExpiresAge maxNoModifiedAge + replyUnpipelineTime serverExpireTime serverIdleTimeout serverTimeout + smallRequestTime' + + multistate_options='censorReferer dnsQueryIPv6 dnsUseGethostbyname + dontTrustVaryETag expectContinue pipelineAdditionalRequests + useTemporarySourceAddress' + + boolean_options='cacheIsShared daemonise disableConfiguration disableIndexing + disableLocalInterface disableProxy disableServersList disableVia + dontCacheCookies dontCacheRedirects logSyslog mindlesslyCacheVary + preciseExpiry proxyOffline scrubLogs laxHttpParser' + + string_list_options='allowedClients censoredHeaders' + + number_list_options='allowedPorts tunnelAllowedPorts' + + for option in $string_options; do + polipo_atom "$1" "$option" '"' >> $CFGFILE + done + + for option in $number_options; do + polipo_atom "$1" "$option" >> $CFGFILE + done + + for option in $time_options; do + polipo_atom "$1" "$option" >> $CFGFILE + done + + for option in $multistate_options; do + polipo_atom "$1" "$option" >> $CFGFILE + done + + for option in $boolean_options; do + polipo_boolean "$1" "$option" >> $CFGFILE + done + + for option in $string_list_options; do + polipo_list "$1" "$option" '"' >> $CFGFILE + done + + for option in $number_list_options; do + polipo_list "$1" "$option" >> $CFGFILE + done +} + +polipo_atom() { + local SECTION=$1 + local OPTION=$2 + local QUOTE=$3 + local EMPTY_DISABLED=${4:-0} + + config_get _value "$SECTION" "$OPTION" + [ -n "$_value" -o "$EMPTY_DISABLED" -eq "1" ] && { + echo "$OPTION = ${QUOTE}${_value}${QUOTE}" + } +} + +polipo_boolean() { + local SECTION=$1 + local OPTION=$2 + + config_get_bool _value "$SECTION" "$OPTION" + [ -n "$_value" ] && { + [ "$_value" -eq "1" ] && _value="true" || _value="false" + echo "$OPTION = $_value" + } +} + +polipo_list() { + local SECTION=$1 + local OPTION=$2 + local QUOTE=$3 + + config_get _value "$SECTION" "$OPTION" + + [ "$SECTION" = general ] && [ "$OPTION" = allowedClients ] && { + case "$_value" in + *127.0.0.1*) : ;; + *) _value="127.0.0.1 $_value" ;; + esac + } + + [ -n "$_value" ] && { + echo -n "$OPTION = " + + local FIRST=1 + for entry in $_value; do + [ "$FIRST" -ne "1" ] && echo -n ", " || FIRST=0 + + echo -n "${QUOTE}${entry}${QUOTE}" + done + + echo '' + } +} + diff --git a/net/portmap/Makefile b/net/portmap/Makefile new file mode 100644 index 0000000..19c373d --- /dev/null +++ b/net/portmap/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=portmap +PKG_VERSION:=6.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://neil.brown.name/portmap/ +PKG_MD5SUM:=ac108ab68bf0f34477f8317791aaf1ff + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/portmap + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libwrap $(LIBRPC_DEPENDS) + TITLE:=The RPC Portmapper + URL:=http://neil.brown.name/portmap/ +endef + +define Package/portmap/description + Portmap is a server that converts RPC (Remote Procedure Call) program + numbers into DARPA protocol port numbers. +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DHOSTS_ACCESS -DFACILITY=LOG_DAEMON -DIGNORE_SIGCHLD" \ + RPCUSER="nobody" \ + LDLIBS="$(TARGET_LDFLAGS) -lwrap $(LIBRPC)" \ + all + +define Package/portmap/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/portmap $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/portmap.init $(1)/etc/init.d/portmap +endef + +$(eval $(call BuildPackage,portmap)) diff --git a/net/portmap/files/portmap.init b/net/portmap/files/portmap.init new file mode 100644 index 0000000..fd7322c --- /dev/null +++ b/net/portmap/files/portmap.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2008 OpenWrt.org + +START=19 +STOP=19 + +NAME=portmap +PROG=/usr/sbin/$NAME +DEFAULT=/etc/default/$NAME + +start() { + [ -f $DEFAULT ] && . $DEFAULT + start-stop-daemon -q -S -x $PROG -- $OPTIONS +} + +stop() { + start-stop-daemon -q -K -x $PROG -- $OPTIONS +} diff --git a/net/portmap/patches/101-no_pie.patch b/net/portmap/patches/101-no_pie.patch new file mode 100644 index 0000000..6cbdece --- /dev/null +++ b/net/portmap/patches/101-no_pie.patch @@ -0,0 +1,12 @@ +diff -ur portmap_6.0.org/Makefile portmap_6.0/Makefile +--- portmap_6.0.org/Makefile 2008-04-19 22:44:35.000000000 +0200 ++++ portmap_6.0/Makefile 2008-04-19 00:02:01.000000000 +0200 +@@ -127,7 +127,7 @@ + CPPFLAGS += $(HOSTS_ACCESS) + portmap: CFLAGS += -fpie + portmap: LDLIBS += $(WRAP_LIB) +-portmap: LDFLAGS += -pie ++#portmap: LDFLAGS += -pie + portmap: portmap.o pmap_check.o from_local.o + + from_local: CPPFLAGS += -DTEST diff --git a/net/portsentry/Makefile b/net/portsentry/Makefile new file mode 100644 index 0000000..0c18ace --- /dev/null +++ b/net/portsentry/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=portsentry +PKG_VERSION:=1.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-1.2.tar.gz +PKG_SOURCE_URL:=@SF/sentrytools +PKG_MD5SUM:=3ebd3618ba9abfea2525e236bd44cebd + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_beta + +include $(INCLUDE_DIR)/package.mk + +define Package/portsentry + SECTION:=net + CATEGORY:=Network + SUBMENU:=Firewall + TITLE:=Portscan protection utility + URL:=http://sourceforge.net/projects/sentrytools +endef + +define Package/portsentry/conffiles +/etc/portsentry.conf +endef + +MAKE_FLAGS += \ + linux \ + +define Package/portsentry/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_NAME).conf $(1)/etc/ + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,portsentry)) diff --git a/net/portsentry/files/portsentry.init b/net/portsentry/files/portsentry.init new file mode 100644 index 0000000..dbaa362 --- /dev/null +++ b/net/portsentry/files/portsentry.init @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org +START=99 + +start() { + portsentry -atcp + portsentry -audp +} + +stop() { + killall -9 portsentry +} + diff --git a/net/portsentry/patches/100-conf_location.patch b/net/portsentry/patches/100-conf_location.patch new file mode 100644 index 0000000..d644825 --- /dev/null +++ b/net/portsentry/patches/100-conf_location.patch @@ -0,0 +1,13 @@ +Index: portsentry_beta/portsentry_config.h +=================================================================== +--- portsentry_beta.orig/portsentry_config.h 2007-09-20 17:30:32.000000000 +0200 ++++ portsentry_beta/portsentry_config.h 2007-09-20 17:30:32.000000000 +0200 +@@ -22,7 +22,7 @@ + + /* These are probably ok. Be sure you change the Makefile if you */ + /* change the path */ +-#define CONFIG_FILE "/usr/local/psionic/portsentry/portsentry.conf" ++#define CONFIG_FILE "/etc/portsentry.conf" + + /* The location of Wietse Venema's TCP Wrapper hosts.deny file */ + #define WRAPPER_HOSTS_DENY "/etc/hosts.deny" diff --git a/net/portsentry/patches/101-postsentry_c.patch b/net/portsentry/patches/101-postsentry_c.patch new file mode 100644 index 0000000..51374bd --- /dev/null +++ b/net/portsentry/patches/101-postsentry_c.patch @@ -0,0 +1,14 @@ +Index: portsentry_beta/portsentry.c +=================================================================== +--- portsentry_beta.orig/portsentry.c 2007-09-20 17:30:32.000000000 +0200 ++++ portsentry_beta/portsentry.c 2007-09-20 17:30:32.000000000 +0200 +@@ -1581,8 +1581,7 @@ + Usage (void) + { + printf ("PortSentry - Port Scan Detector.\n"); +- printf ("Copyright 1997-2003 Craig H. Rowland \n"); ++ printf ("Copyright 1997-2003 Craig H. Rowland \n"); + printf ("Licensing restrictions apply. Please see documentation\n"); + printf ("Version: %s\n\n", VERSION); + #ifdef SUPPORT_STEALTH diff --git a/net/pptpd/Makefile b/net/pptpd/Makefile new file mode 100644 index 0000000..e79e0a7 --- /dev/null +++ b/net/pptpd/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pptpd +PKG_VERSION:=1.3.4 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/poptop +PKG_MD5SUM:=b38df9c431041922c997c1148bedf591 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/pptpd + SECTION:=net + CATEGORY:=Network + DEPENDS:=+kmod-ppp +kmod-gre +ppp + TITLE:=PopTop pptp server + URL:=http://www.poptop.org/ + SUBMENU:=VPN +endef + +CONFIGURE_ARGS += \ + --enable-bcrelay \ + +CONFIGURE_VARS += \ + ac_cv_header_libintl_h=no \ + +MAKE_FLAGS += \ + COPTS="$(TARGET_CFLAGS)" \ + INSTALL="install" \ + +define Package/pptpd/conffiles +/etc/pptpd.conf +/etc/ppp/options.pptpd +endef + +define Package/pptpd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) \ + $(PKG_INSTALL_DIR)/usr/sbin/bcrelay \ + $(PKG_INSTALL_DIR)/usr/sbin/pptpctrl \ + $(PKG_INSTALL_DIR)/usr/sbin/pptpd \ + $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/pptpd + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pptpd/* $(1)/usr/lib/pptpd/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/pptpd.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/pptpd.init $(1)/etc/init.d/pptpd + $(INSTALL_DIR) $(1)/etc/ppp + $(INSTALL_DATA) ./files/options.pptpd $(1)/etc/ppp/ +endef + +$(eval $(call BuildPackage,pptpd)) diff --git a/net/pptpd/files/options.pptpd b/net/pptpd/files/options.pptpd new file mode 100644 index 0000000..5dd2daf --- /dev/null +++ b/net/pptpd/files/options.pptpd @@ -0,0 +1,23 @@ +#debug +#logfile /tmp/pptp-server.log +172.16.1.1: +auth +name "pptp-server" +lcp-echo-failure 3 +lcp-echo-interval 60 +default-asyncmap +mtu 1482 +mru 1482 +nobsdcomp +nodeflate +#noproxyarp +#nomppc +mppe required,no40,no56,stateless +require-mschap-v2 +refuse-chap +refuse-mschap +refuse-eap +refuse-pap +#ms-dns 172.16.1.1 +#plugin radius.so +#radius-config-file /etc/radius.conf diff --git a/net/pptpd/files/pptpd.conf b/net/pptpd/files/pptpd.conf new file mode 100644 index 0000000..354745f --- /dev/null +++ b/net/pptpd/files/pptpd.conf @@ -0,0 +1,5 @@ +#debug +option /etc/ppp/options.pptpd +speed 115200 +stimeout 10 +#localip & remoteip are not needed, ip management is done by pppd diff --git a/net/pptpd/files/pptpd.init b/net/pptpd/files/pptpd.init new file mode 100644 index 0000000..a74973c --- /dev/null +++ b/net/pptpd/files/pptpd.init @@ -0,0 +1,21 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=60 +BIN=pptpd +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $RUN_D + for m in arc4 sha1 slhc crc-ccitt ppp_generic ppp_async ppp_mppe_mppc; do + insmod $m >/dev/null 2>&1 + done + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} diff --git a/net/pptpd/patches/001-bad_pqueue_debug.patch b/net/pptpd/patches/001-bad_pqueue_debug.patch new file mode 100644 index 0000000..8e8f5a5 --- /dev/null +++ b/net/pptpd/patches/001-bad_pqueue_debug.patch @@ -0,0 +1,18 @@ +--- pptpd-1.3.4.orig/pqueue.c 2005-08-03 10:53:22.000000000 +0200 ++++ pptpd-1.3.4/pqueue.c 2009-12-03 17:47:26.976174000 +0100 +@@ -7,13 +7,11 @@ + #include "pqueue.h" + + #ifdef DEBUG_PQUEUE +-#define DEBUG_ON 1 ++#define DEBUG_CMD(_a) { _a } + #else +-#define DEBUG_ON 0 ++#define DEBUG_CMD(_a) + #endif + +-#define DEBUG_CMD(_a) if (DEBUG_ON) { _a } +- + #define MIN_CAPACITY 128 /* min allocated buffer for a packet */ + + static int pqueue_alloc (int seq, unsigned char *packet, int packlen, pqueue_t **new); diff --git a/net/pptpd/patches/002-makefile_fix.patch b/net/pptpd/patches/002-makefile_fix.patch new file mode 100644 index 0000000..554b0a1 --- /dev/null +++ b/net/pptpd/patches/002-makefile_fix.patch @@ -0,0 +1,11 @@ +--- pptpd-1.3.4.orig/plugins/Makefile 2006-08-03 04:02:01.000000000 +0200 ++++ pptpd-1.3.4/plugins/Makefile 2009-12-03 21:18:09.678467590 +0100 +@@ -18,7 +18,7 @@ all: $(PLUGINS) + %.so: %.c + $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD) + +-LIBDIR ?= $(DESTDIR)$(prefix)/lib/pptpd ++LIBDIR = $(DESTDIR)$(prefix)/lib/pptpd + + install: $(PLUGINS) + $(INSTALL) -d $(LIBDIR) diff --git a/net/pptpd/patches/003-opt_flags.patch b/net/pptpd/patches/003-opt_flags.patch new file mode 100644 index 0000000..213fb03 --- /dev/null +++ b/net/pptpd/patches/003-opt_flags.patch @@ -0,0 +1,12 @@ +diff -ruN pptpd-1.3.0-old/Makefile.in pptpd-1.3.0-new/Makefile.in +--- pptpd-1.3.0-old/Makefile.in 2005-08-03 09:47:42.000000000 +0200 ++++ pptpd-1.3.0-new/Makefile.in 2006-10-27 18:22:00.000000000 +0200 +@@ -106,7 +106,7 @@ + AWK = @AWK@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ +-CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' ++CFLAGS = $(COPTS) -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ + CYGPATH_W = @CYGPATH_W@ diff --git a/net/privoxy/Makefile b/net/privoxy/Makefile new file mode 100644 index 0000000..2cc6bff --- /dev/null +++ b/net/privoxy/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=privoxy +PKG_VERSION:=3.0.17 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-stable-src.tar.gz +PKG_SOURCE_URL:=@SF/ijbswa +PKG_MD5SUM:=9d363d738a3f3d73e774d6dfeafdb15f + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-stable +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/privoxy + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + DEPENDS:=+libpcre +libpthread +zlib + TITLE:=web proxy with advanced filtering capabilities + URL:=http://www.privoxy.org/ +endef + +define Package/privoxy/description + Privoxy is a web proxy with advanced filtering capabilities for + protecting privacy, modifying web page content, managing cookies, + controlling access, and removing ads, banners, pop-ups and other + obnoxious Internet junk. Privoxy has a very flexible configuration + and can be customized to suit individual needs and tastes. Privoxy + has application for both stand-alone systems and multi-user networks. +endef + +CONFIGURE_ARGS += \ + --sysconfdir=/etc/privoxy \ + +MAKE_FLAGS := + +define Package/privoxy/conffiles +/etc/privoxy/config +endef + +define Package/privoxy/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/privoxy $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/privoxy + $(CP) $(PKG_INSTALL_DIR)/etc/privoxy/* $(1)/etc/privoxy/ + $(INSTALL_CONF) ./files/privoxy.config $(1)/etc/privoxy/config + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/privoxy.init $(1)/etc/init.d/privoxy +endef + +$(eval $(call BuildPackage,privoxy)) diff --git a/net/privoxy/files/privoxy.config b/net/privoxy/files/privoxy.config new file mode 100644 index 0000000..7f0b8af --- /dev/null +++ b/net/privoxy/files/privoxy.config @@ -0,0 +1,27 @@ +confdir /etc/privoxy +logdir /var/log +filterfile default.filter +logfile privoxy +actionsfile match-all.action # Actions that are applied to all sites and maybe overruled later on. +actionsfile default.action # Main actions file +#actionsfile user.action # User customizations +listen-address 127.0.0.1:8118 +toggle 1 +enable-remote-toggle 1 +enable-remote-http-toggle 0 +enable-edit-actions 1 +enforce-blocks 0 +buffer-limit 4096 +forwarded-connect-retries 0 +accept-intercepted-requests 0 +allow-cgi-request-crunching 0 +split-large-forms 0 +keep-alive-timeout 300 +socket-timeout 300 +permit-access 192.168.1.0/24 +debug 1 # show each GET/POST/CONNECT request +debug 4096 # Startup banner and warnings +debug 8192 # Errors - *we highly recommended enabling this* +#admin-address privoxy-admin@example.com +#proxy-info-url http://www.example.com/proxy-service.html + diff --git a/net/privoxy/files/privoxy.init b/net/privoxy/files/privoxy.init new file mode 100644 index 0000000..85479b3 --- /dev/null +++ b/net/privoxy/files/privoxy.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +CFG_F=/etc/privoxy/config +RUN_D=/var/run +PID_F=$RUN_D/privoxy.pid + +start() { + mkdir -p $RUN_D + /usr/sbin/privoxy --pidfile $PID_F $CFG_F +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} diff --git a/net/proftpd/Makefile b/net/proftpd/Makefile new file mode 100644 index 0000000..b5d92fd --- /dev/null +++ b/net/proftpd/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2009-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=proftpd +PKG_VERSION:=1.3.3e +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.proftpd.org/distrib/source +PKG_MD5SUM:=acc49b6589bc8c9fdf1dce9000bebdbd + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/proftpd + SUBMENU:=File Transfer + SECTION:=net + CATEGORY:=Network + TITLE:=ProFTPD FTP server + URL:=http://www.proftpd.org/ + MAINTAINER:=Cezary Jackiewicz +endef + +define Package/proftpd/conffiles +/etc/proftpd.conf +endef + +TARGET_CPPFLAGS += \ + -I$(LINUX_DIR)/include + +MAKE_FLAGS += \ + INSTALL_USER=$(shell id -u) \ + INSTALL_GROUP=$(shell id -g) + +CONFIGURE_ARGS += \ + --disable-cap \ + --enable-devel \ + +define Package/proftpd/install + $(INSTALL_DIR) $(1)/etc + $(if $(CONFIG_IPV6),,$(SED) 's/^UseIPv6/#UseIPv6/' $(PKG_INSTALL_DIR)/etc/proftpd.conf) + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/proftpd.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/proftpd.init $(1)/etc/init.d/proftpd + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ftp{count,top,who} $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{ftpshut,proftpd} $(1)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/in.proftpd $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,proftpd)) diff --git a/net/proftpd/files/proftpd.init b/net/proftpd/files/proftpd.init new file mode 100644 index 0000000..b92dc38 --- /dev/null +++ b/net/proftpd/files/proftpd.init @@ -0,0 +1,41 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2010 OpenWrt.org + +START=50 + +BIN=/usr/sbin/proftpd +HOME=/home/ftp +RUN_D=/var +PID_F=$RUN_D/proftpd.pid +RUN_USER=ftp +RUN_GROUP=$RUN_USER + +EXTRA_COMMANDS="suspend resume" +EXTRA_HELP=" suspend Suspend the service + resume Resume the service" + +start() { + [ -d $HOME ] || ( mkdir -p $HOME && chown $RUN_USER:$RUN_GROUP $HOME ) + + [ ! -f $PID_F ] && $BIN +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + +reload() { + [ -f $PID_F ] && kill -HUP $(cat $PID_F) +} + +suspend() { + echo "Suspending NOW" + ftpshut now "Maintenance in progress" +} + +resume() { + [ -f /etc/shutmsg ] && { + echo "Allowing sessions again" + ftpshut -R > /dev/null + } +} diff --git a/net/proftpd/patches/001-automake-compat.patch b/net/proftpd/patches/001-automake-compat.patch new file mode 100644 index 0000000..2a36e12 --- /dev/null +++ b/net/proftpd/patches/001-automake-compat.patch @@ -0,0 +1,145 @@ +--- a/configure.in ++++ b/configure.in +@@ -40,8 +40,8 @@ if test "$OSTYPE" = "$OSREL" ; then + platform="\"$ostype\"" + fi + +-AC_DEFINE_UNQUOTED(PR_BUILD_OPTS, "`echo "$ac_configure_args"`") +-AC_DEFINE_UNQUOTED(PR_PLATFORM, $platform) ++AC_DEFINE_UNQUOTED(PR_BUILD_OPTS, "`echo "$ac_configure_args"`", [.]) ++AC_DEFINE_UNQUOTED(PR_PLATFORM, $platform, [.]) + AC_SUBST(OSREL) + AC_SUBST(OSTYPE) + +@@ -278,7 +278,7 @@ AC_ARG_WITH(lastlog, + fi + + if test -n "$pr_lastlog_path" ; then +- AC_DEFINE_UNQUOTED(PR_LASTLOG_PATH, "`eval echo "$pr_lastlog_path"`") ++ AC_DEFINE_UNQUOTED(PR_LASTLOG_PATH, "`eval echo "$pr_lastlog_path"`", [.]) + fi + fi + ]) +@@ -522,15 +522,6 @@ AC_ARG_ENABLE(dso, + LIB_DEPS="libltdl" + MODULE_DEPS="libltdl" + AC_DEFINE(PR_USE_DSO, 1, [Define if using DSO support.]) +- +- dnl Run configure scripts in subdirectories +- LT_CONFIG_LTDL_DIR([lib/libltdl]) +- LTDL_INIT([convenience]) +- +- dnl Even though this macro is deprecated, we need to use it to +- dnl specifically tell ltdl that it is NOT to use any system directories, +- dnl and ONLY to use this bundled location. +- LTDL_CONVENIENCE([lib/libltdl]) + fi + ]) + +@@ -802,9 +793,9 @@ AC_ARG_ENABLE(scoreboard-updates, + [ + if test x"$enableval" = xyes || test x"$enableval" = xno ; then + AC_MSG_WARN(scoreboard updates defaulting to 10) +- AC_DEFINE_UNQUOTED(PR_TUNABLE_XFER_SCOREBOARD_UPDATES, 10) ++ AC_DEFINE_UNQUOTED(PR_TUNABLE_XFER_SCOREBOARD_UPDATES, 10, [.]) + else +- AC_DEFINE_UNQUOTED(PR_TUNABLE_XFER_SCOREBOARD_UPDATES, $enableval) ++ AC_DEFINE_UNQUOTED(PR_TUNABLE_XFER_SCOREBOARD_UPDATES, $enableval, [.]) + fi + ]) + +@@ -1027,13 +1018,13 @@ if test x"$force_shadow" != xno ; then + AC_DEFINE(PR_USE_SHADOW, 1, [Define if using shadow password support.]) + + AC_CHECK_MEMBER(struct spwd.sp_warn, +- [AC_DEFINE(HAVE_SPWD_SP_WARN)],, ++ [AC_DEFINE(HAVE_SPWD_SP_WARN, 1, [.])],, + [#include ]) + AC_CHECK_MEMBER(struct spwd.sp_inact, +- [AC_DEFINE(HAVE_SPWD_SP_INACT)],, ++ [AC_DEFINE(HAVE_SPWD_SP_INACT, 1, [.])],, + [#include ]) + AC_CHECK_MEMBER(struct spwd.sp_expire, +- [AC_DEFINE(HAVE_SPWD_SP_EXPIRE)],, ++ [AC_DEFINE(HAVE_SPWD_SP_EXPIRE, 1, [.])],, + [#include ]) + + fi ]) +@@ -2266,19 +2257,19 @@ pr_saved_exec_prefix="$exec_prefix" + test "x$prefix" = xNONE && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +-AC_DEFINE_UNQUOTED(PR_CONFIG_DIR, "`eval echo "${sysconfdir}"`") +-AC_DEFINE_UNQUOTED(PR_INCLUDE_DIR, "`eval echo "${includedir}"`") +-AC_DEFINE_UNQUOTED(PR_LIBEXEC_DIR, "`eval echo "${libexecdir}"`") ++AC_DEFINE_UNQUOTED(PR_CONFIG_DIR, "`eval echo "${sysconfdir}"`", [.]) ++AC_DEFINE_UNQUOTED(PR_INCLUDE_DIR, "`eval echo "${includedir}"`", [.]) ++AC_DEFINE_UNQUOTED(PR_LIBEXEC_DIR, "`eval echo "${libexecdir}"`", [.]) + + dnl We evaluate the string twice. Once to go from $datadir to $prefix/share, + dnl and once more to substitute in the $prefix value. What a pain. + locale_dir="`eval echo ${localedir}`" + locale_dir="`eval echo ${locale_dir}`" +-AC_DEFINE_UNQUOTED(PR_LOCALE_DIR, "`eval echo "${locale_dir}"`") ++AC_DEFINE_UNQUOTED(PR_LOCALE_DIR, "`eval echo "${locale_dir}"`", [.]) + +-AC_DEFINE_UNQUOTED(PR_RUN_DIR, "`eval echo "${localstatedir}"`") +-AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/proftpd.conf"`") +-AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/proftpd.pid"`") ++AC_DEFINE_UNQUOTED(PR_RUN_DIR, "`eval echo "${localstatedir}"`", [.]) ++AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/proftpd.conf"`", [.]) ++AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/proftpd.pid"`", [.]) + + prefix="$pr_saved_prefix" + exec_prefix="$pr_saved_exec_prefix" +@@ -2328,11 +2319,11 @@ if test "$OSTYPE" = "-DDARWIN6" -o "$OST + fi + + my_cflags="\"$CFLAGS\"" +-AC_DEFINE_UNQUOTED(PR_BUILD_CFLAGS, $my_cflags) ++AC_DEFINE_UNQUOTED(PR_BUILD_CFLAGS, $my_cflags, [.]) + my_ldflags="\"$LDFLAGS $LIBDIRS\"" +-AC_DEFINE_UNQUOTED(PR_BUILD_LDFLAGS, $my_ldflags) ++AC_DEFINE_UNQUOTED(PR_BUILD_LDFLAGS, $my_ldflags, [.]) + my_libs="\"$LIBRARIES $LIBS\"" +-AC_DEFINE_UNQUOTED(PR_BUILD_LIBS, $my_libs) ++AC_DEFINE_UNQUOTED(PR_BUILD_LIBS, $my_libs, [.]) + + dnl And finally, generate the appropriate Make* and config.h + AC_SUBST(ENABLE_NLS) +--- /dev/null ++++ b/acinclude.m4 +@@ -0,0 +1 @@ ++sinclude(m4/proftpd.m4) +--- /dev/null ++++ b/lib/libltdl/acinclude.m4 +@@ -0,0 +1,7 @@ ++sinclude(m4/argz.m4) ++sinclude(m4/libtool.m4) ++sinclude(m4/ltversion.m4) ++sinclude(m4/ltsugar.m4) ++sinclude(m4/ltoptions.m4) ++sinclude(m4/ltdl.m4) ++sinclude(m4/lt~obsolete.m4) +--- a/lib/libltdl/Makefile.am ++++ b/lib/libltdl/Makefile.am +@@ -50,19 +50,7 @@ AM_LDFLAGS += -no-undefined + LTDL_VERSION_INFO = -version-info 9:0:2 + + noinst_LTLIBRARIES += $(LT_DLLOADERS) +- +-if INSTALL_LTDL +-ltdlincludedir = $(includedir)/libltdl +-ltdlinclude_HEADERS = libltdl/lt_system.h \ +- libltdl/lt_error.h \ +- libltdl/lt_dlloader.h +-include_HEADERS += ltdl.h +-lib_LTLIBRARIES += libltdl.la +-endif +- +-if CONVENIENCE_LTDL + noinst_LTLIBRARIES += libltdlc.la +-endif + + libltdl_la_SOURCES = libltdl/lt__alloc.h \ + libltdl/lt__dirent.h \ diff --git a/net/prosody/Makefile b/net/prosody/Makefile new file mode 100644 index 0000000..4c1214c --- /dev/null +++ b/net/prosody/Makefile @@ -0,0 +1,125 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=prosody +PKG_VERSION:=0.6.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://prosody.im/downloads/source +PKG_MD5SUM:=5da59bc906419ad3b4faa21516a6ca18 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/prosody + SECTION:=net + CATEGORY:=Network + SUBMENU:=Instant Messaging + DEPENDS:=+luafilesystem +libidn +luaexpat +luasec + TITLE:=XMPP server + URL:=http://prosody.im/ +endef + +define Package/prosody/description + Prosody is an exciting new server for Jabber/XMPP + written in Lua. It aims to be easy to use, and light + on resources +endef + +define Package/prosody/conffiles +/etc/prosody/prosody.cfg.lua +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Configure + # this is *NOT* GNU autoconf stuff + (cd $(PKG_BUILD_DIR); ./configure \ + --prefix=/usr \ + --with-lua="$(STAGING_DIR)/host/bin" \ + --with-lua-include="$(STAGING_DIR)/usr/include" \ + --with-lua-lib="$(STAGING_DIR)/usr/lib" \ + --cflags="$(TARGET_CFLAGS)" \ + --datadir="/etc/prosody/data" \ + ) +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + PREFIX="/usr" \ + +define Package/prosody/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/prosody.init $(1)/etc/init.d/prosody + $(INSTALL_DIR) $(1)/etc/prosody + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/prosody/prosody.cfg.lua $(1)/etc/prosody/ + $(INSTALL_DIR) $(1)/etc/prosody/certs + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/prosody/certs/localhost.{cert,key} $(1)/etc/prosody/certs/ + $(INSTALL_DIR) $(1)/etc/prosody/data + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prosody{,ctl} $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/prosody + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/prosody.version $(1)/usr/lib/prosody/ + $(INSTALL_DIR) $(1)/usr/lib/prosody/core + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/core/*.lua $(1)/usr/lib/prosody/core/ + $(INSTALL_DIR) $(1)/usr/lib/prosody/fallbacks + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/fallbacks/*.lua $(1)/usr/lib/prosody/fallbacks/ + $(INSTALL_DIR) $(1)/usr/lib/prosody/modules + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/*.lua $(1)/usr/lib/prosody/modules/ + $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/muc + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/muc/*.lua $(1)/usr/lib/prosody/modules/muc/ + $(INSTALL_DIR) $(1)/usr/lib/prosody/net + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/*.lua $(1)/usr/lib/prosody/net/ + $(INSTALL_DIR) $(1)/usr/lib/prosody/util + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.lua $(1)/usr/lib/prosody/util/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.so $(1)/usr/lib/prosody/util/ +endef + +define Package/prosody/postinst +#!/bin/sh + +id=54 +name=prosody +home=/tmp/.$${name} +shell=/bin/false + +# do not change below +# check if we are on real system +if [ -z "$${IPKG_INSTROOT}" ]; then + # create copies of passwd and group, if we use squashfs + rootfs=`mount |awk '/root/ { print $$5 }'` + if [ "$$rootfs" = "squashfs" ]; then + if [ -h /etc/group ]; then + rm /etc/group + cp -p /rom/etc/group /etc/group + fi + if [ -h /etc/passwd ]; then + rm /etc/passwd + cp -p /rom/etc/passwd /etc/passwd + fi + fi + + echo "" + if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then + echo "adding group $$name to /etc/group" + echo "$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc/group + fi + if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then + echo "adding user $$name to /etc/passwd" + echo "$${name}:x:$${id}:$${id}:$${name}:$${home}:$${shell}" >> $${IPKG_INSTROOT}/etc/passwd + fi + + chown -R $${name}:$${name} $${IPKG_INSTROOT}/etc/prosody +fi +endef + +$(eval $(call BuildPackage,prosody)) diff --git a/net/prosody/files/prosody.init b/net/prosody/files/prosody.init new file mode 100644 index 0000000..90051c5 --- /dev/null +++ b/net/prosody/files/prosody.init @@ -0,0 +1,32 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2010 OpenWrt.org + +START=99 +EXTRA_COMMANDS="status" +EXTRA_HELP=" status Print the status of the service" + +BIN=/usr/bin/prosodyctl +LOG_D=/var/log/prosody +RUN_D=/var/run/prosody +PID_F=$RUN_D/prosody.pid +RUN_USER=prosody +RUN_GROUP=prosody + +start() { + [ -d $LOG_D ] || ( mkdir -p $LOG_D && chown $RUN_USER:$RUN_GROUP $LOG_D ) + [ -d $RUN_D ] || ( mkdir -p $RUN_D && chown $RUN_USER:$RUN_GROUP $RUN_D ) + + $BIN start +} + +stop() { + $BIN stop +} + +reload() { + [ -f $PID_F ] && kill -HUP $(cat $PID_F) +} + +status() { + $BIN status +} diff --git a/net/prosody/patches/001-conf.patch b/net/prosody/patches/001-conf.patch new file mode 100644 index 0000000..4b23f9a --- /dev/null +++ b/net/prosody/patches/001-conf.patch @@ -0,0 +1,37 @@ +--- a/prosody.cfg.lua.dist ++++ b/prosody.cfg.lua.dist +@@ -47,7 +47,7 @@ modules_enabled = { + "register"; -- Allow users to register on this server using a client and change passwords + + -- Other specific functionality +- --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc. ++ "posix"; -- POSIX functionality, sends server to background, enables syslog, etc. + --"console"; -- Opens admin telnet interface on localhost port 5582 + --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP" + --"httpserver"; -- Serve static files from a directory over HTTP +@@ -65,6 +65,9 @@ modules_disabled = { + -- Disable account creation by default, for security + -- For more information see http://prosody.im/doc/creating_accounts + allow_registration = false; ++ ++-- File to write pid in ++pidfile = "/var/run/prosody/prosody.pid"; + + -- These are the SSL/TLS-related settings. If you don't want + -- to use SSL/TLS, you may comment or remove this +@@ -73,6 +76,15 @@ ssl = { + certificate = "certs/localhost.cert"; + } + ++-- Errors to syslog ++-- All to /var/log/prosody/ ++log = { ++ { levels = { "error" }; to = "syslog"; }; ++ { levels = { "error" }; to = "file"; filename = "/var/log/prosody/prosody.err"; }; ++ -- Change "info" to "debug" for more verbose logging ++ { levels = { min = "info" }; to = "file"; filename = "/var/log/prosody/prosody.log"; }; ++} ++ + ----------- Virtual hosts ----------- + -- You need to add a VirtualHost entry for each domain you wish Prosody to serve. + -- Settings under each VirtualHost entry apply *only* to that host. diff --git a/net/psybnc/Makefile b/net/psybnc/Makefile new file mode 100644 index 0000000..f264971 --- /dev/null +++ b/net/psybnc/Makefile @@ -0,0 +1,68 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=psybnc +PKG_VERSION:=2.3.2-7 +PKG_RELEASE:=2 + +PKG_SOURCE:=psyBNC-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.psybnc.at/download/beta/ +PKG_MD5SUM:=4b893a92f914813450e0921b2894ad6c + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/psybnc + SUBMENU:=Instant Messaging + SECTION:=net + CATEGORY:=Network + TITLE:=An IRC-Bouncer with many features + URL:=http://www.psybnc.at/ +endef + +define Package/psybnc/description + psyBNC is an easy-to-use, multi-user, permanent + IRC-Bouncer with many features. Some of its features + vhost- and relay support to connected bouncers and an + extensive online help system. Many other helpful + functions are included. +endef + +ifneq ($(SDK)$(CONFIG_BIG_ENDIAN),) + ENDIANESS:=1 +else + ENDIANESS:=0 +endif + +define Build/Compile + $(call Build/Compile/Default, \ + CFLAGS="$(TARGET_CFLAGS)" \ + HOSTCC="$(HOSTCC)" \ + all \ + ) +endef + +define Package/psybnc/conffiles +/etc/psybnc.conf +endef + +define Package/psybnc/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/psybnc.sh $(1)/usr/sbin/psybnc + $(INSTALL_DIR) $(1)/usr/share/psybnc + $(INSTALL_BIN) $(PKG_BUILD_DIR)/psybnc $(1)/usr/share/psybnc/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/psybnc.conf $(1)/usr/share/psybnc/ + $(INSTALL_DIR) $(1)/usr/share/psybnc/lang + $(INSTALL_DATA) $(PKG_BUILD_DIR)/lang/english.lng $(1)/usr/share/psybnc/lang/ + $(INSTALL_DIR) $(1)/etc/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/psybnc.conf $(1)/etc +endef + +$(eval $(call BuildPackage,psybnc)) diff --git a/net/psybnc/patches/001-makefile.patch b/net/psybnc/patches/001-makefile.patch new file mode 100644 index 0000000..2db9560 --- /dev/null +++ b/net/psybnc/patches/001-makefile.patch @@ -0,0 +1,59 @@ +--- psybnc/Makefile 2005-06-04 20:22:45.000000000 +0200 ++++ psybnc_patched/Makefile 2005-11-04 11:50:28.879157626 +0100 +@@ -1,16 +1,16 @@ +-CC = gcc ++HOSTCC = gcc + CCFLAGS = + + all: $(OBJS) + @echo Initializing bouncer compilation + @echo [*] Running Conversion Tool for older psyBNC Data. +- @$(CC) tools/convconf.c -o tools/convconf ++ @$(HOSTCC) tools/convconf.c -o tools/convconf + @tools/convconf + @echo [*] Running Autoconfig. +- @$(CC) -I. tools/autoconf.c -o tools/autoconf ++ @$(HOSTCC) -I. tools/autoconf.c -o tools/autoconf + @tools/autoconf + @echo [*] Compiling MakeSalt for Encryption.. +- @$(CC) -I. -o makesalt tools/makesalt.c ++ @$(HOSTCC) -I. -o makesalt tools/makesalt.c + @./makesalt + @echo [*] Compiling Bouncer.. + @make -f makefile.out +@@ -20,14 +20,14 @@ + menuconfig: + @echo Initializing Menu-Configuration + @echo [*] Running Conversion Tool for older psyBNC Data. +- @$(CC) tools/convconf.c -o tools/convconf ++ @$(HOSTCC) tools/convconf.c -o tools/convconf + @tools/convconf + @echo [*] Running Autoconfig. +- @$(CC) -I. tools/autoconf.c -o tools/autoconf ++ @$(HOSTCC) -I. tools/autoconf.c -o tools/autoconf + @tools/autoconf + @echo [*] Creating Menu, please wait. + @echo This needs the 'ncurses' library. If it is not available, menuconf wont work. If you are using 'curses', use make menuconfig-curses instead. +- @$(CC) menuconf/menuconf.c menuconf/inputbox.c menuconf/util.c menuconf/checklist.c menuconf/menubox.c menuconf/textbox.c src/snprintf.c -I. -lncurses -lm -o menuconf/menuconf 2>/dev/null ++ @$(HOSTCC) menuconf/menuconf.c menuconf/inputbox.c menuconf/util.c menuconf/checklist.c menuconf/menubox.c menuconf/textbox.c src/snprintf.c -I. -lncurses -lm -o menuconf/menuconf 2>/dev/null + @menuconf/menuconf + @clear + @echo Now compile psyBNC using make, if not yet compiled, or if Options were changed. +@@ -36,14 +36,14 @@ + menuconfig-curses: + @echo Initializing Menu-Configuration using Curses + @echo [*] Running Conversion Tool for older psyBNC Data. +- @$(CC) tools/convconf.c -o tools/convconf ++ @$(HOSTCC) tools/convconf.c -o tools/convconf + @tools/convconf + @echo [*] Running Autoconfig. +- @$(CC) -I. tools/autoconf.c -o tools/autoconf ++ @$(HOSTCC) -I. tools/autoconf.c -o tools/autoconf + @tools/autoconf + @echo [*] Creating Menu, please wait. + @echo This needs the 'curses' library. If it is not available, menuconf wont work. +- @$(CC) menuconf/menuconf.c menuconf/inputbox.c menuconf/util.c menuconf/checklist.c menuconf/menubox.c menuconf/textbox.c src/snprintf.c -DNONCURSES -I. -lcurses -lm -o menuconf/menuconf 2>/dev/null ++ @$(HOSTCC) menuconf/menuconf.c menuconf/inputbox.c menuconf/util.c menuconf/checklist.c menuconf/menubox.c menuconf/textbox.c src/snprintf.c -DNONCURSES -I. -lcurses -lm -o menuconf/menuconf 2>/dev/null + @menuconf/menuconf + @clear + @echo Now compile psyBNC using make, if not yet compiled, or if Options were changed. diff --git a/net/psybnc/patches/002-conf.patch b/net/psybnc/patches/002-conf.patch new file mode 100644 index 0000000..98e9ad5 --- /dev/null +++ b/net/psybnc/patches/002-conf.patch @@ -0,0 +1,14 @@ +diff -Naur psybnc/psybnc.conf psybnc_finish/psybnc.conf +--- psybnc/psybnc.conf 1970-01-01 01:00:00.000000000 +0100 ++++ psybnc_finish/psybnc.conf 2005-11-03 18:27:44.726264185 +0100 +@@ -0,0 +1,10 @@ ++PSYBNC.SYSTEM.PORT1=50001 ++PSYBNC.SYSTEM.ME=psybnc_mipsel ++PSYBNC.SYSTEM.HOST1=* ++PSYBNC.HOSTALLOWS.ENTRY0=*;* ++USER1.USER.NICK=change_me ++USER1.USER.USER=psybnc_admin ++USER1.USER.PASS=change_me ++USER1.USER.RIGHTS=1 ++USER1.USER.VLINK=0 ++USER1.USER.LOGIN=psybnc_admin diff --git a/net/psybnc/patches/003-psybnc.patch b/net/psybnc/patches/003-psybnc.patch new file mode 100644 index 0000000..32f2165 --- /dev/null +++ b/net/psybnc/patches/003-psybnc.patch @@ -0,0 +1,105 @@ +diff -ur psybnc/config.h psybnc_finish/config.h +--- psybnc/config.h 2005-06-04 20:22:45.000000000 +0200 ++++ psybnc_finish/config.h 2005-11-03 17:05:40.802998216 +0100 +@@ -1,40 +1,7 @@ +-/* $Id: config.h,v 1.2 2005/06/04 18:05:33 hisi Exp $ */ + /* + * Configuration file for psyBNC, created by menuconf + */ + +-/* Encryption */ +- +-#define CRYPT +- +-/* Encryption Type*/ +- +-#define BLOWFISH +- +-/* Allow Translation */ +- +-#define TRANSLATE +- +-/* Allow internal network */ +- +-#define INTNET +- +-/* Allow traffic logging */ +- +-#define TRAFFICLOG +- +-/* Allow linkage of bouncers */ +- +-#define LINKAGE +- +-/* Allow the dcc File-Functions */ +- +-#define DCCFILES +- +-/* Pipe dcc Chats */ +- +-#define DCCCHAT +- + /* Allow to add more users */ + + #define MULTIUSER +@@ -47,28 +14,27 @@ + + #define MAXCONN 99 + +-/* Allow the usage of scripts */ ++/* Use blocking DNS */ + +-#define SCRIPTING ++#define BLOCKDNS + + /* Allow multiple irc connections per user */ + + #define NETWORK + +-/* Allow Proxy Support */ ++/* The logging level */ + +-#define PROXYS ++#define LOGLEVEL 2 + +-/* The logging level */ ++/* The ctcp Version reply */ + +-#define LOGLEVEL 0 ++#define CTCPVERSION "psyBNC 2.3.2-7 running on mipsel, ported by piie visit www.linuX-gamers.net" + +-/* SSL-Security */ ++/* The Path to SSL */ + +-#define SSLSEC 2 ++#define SSLPATH "/tmp/" + +-/* Blocking DNS is preferred. Non Blocking DNS is experimental */ ++/* SSL-Security */ ++ ++#define SSLSEC 0 + +-#ifndef BLOCKDNS +-#define BLOCKDNS +-#endif +diff -ur psybnc/tools/autoconf.c psybnc_finish/tools/autoconf.c +--- psybnc/tools/autoconf.c 2005-06-04 20:22:45.000000000 +0200 ++++ psybnc_finish/tools/autoconf.c 2005-10-29 14:46:49.000000000 +0200 +@@ -425,7 +425,7 @@ + printf("Can't create makefile.out .. aborting\n"); + exit(0x1); + } +- fprintf(makefile,"CC = gcc\n"); ++ fprintf(makefile,"CC = mipsel-linux-gcc\n"); + fprintf(makefile,"SRC = src/\n"); + #ifdef BOUNDCHECK + fprintf(makefile,"CFLAGS = -O -fbounds-checking -fno-builtin\n"); +@@ -450,7 +450,7 @@ + fprintf(makefile,"\n"); + fprintf(makefile,"all: $(OBJS)\n"); + fprintf(makefile," $(CC) -o $(TARGET) $(CFLAGS) $(OBJS) $(LIBS)\n"); +- fprintf(makefile," @strip $(TARGET)\n"); ++ /*fprintf(makefile," @strip $(TARGET)\n");*/ + if(ssl==0) + { + if(!fexists("key/psybnc.cert.pem")) /* only create, if not exist */ diff --git a/net/psybnc/patches/004-start_script.patch b/net/psybnc/patches/004-start_script.patch new file mode 100644 index 0000000..635213d --- /dev/null +++ b/net/psybnc/patches/004-start_script.patch @@ -0,0 +1,16 @@ +diff -Naur psybnc/psybnc.sh psybnc_patched/psybnc.sh +--- psybnc/psybnc.sh 1970-01-01 01:00:00.000000000 +0100 ++++ psybnc_finish/psybnc.sh 2005-11-04 12:51:26.478557377 +0100 +@@ -0,0 +1,12 @@ ++#!/bin/sh ++ ++PDIR=$(pwd); ++cd /usr/share/psybnc; ++./psybnc "$@"; ++cd "$PDIR"; ++ ++echo; ++echo; ++echo "Configuration is located at /usr/share/psybnc/psybnc.conf"; ++echo "everything can be configured within your chatclient,"; ++echo "after logging in as psybnc_admin ( /bhelp shows bnc help )"; diff --git a/net/psybnc/patches/005-fix_endianess_detection.patch b/net/psybnc/patches/005-fix_endianess_detection.patch new file mode 100644 index 0000000..7783f84 --- /dev/null +++ b/net/psybnc/patches/005-fix_endianess_detection.patch @@ -0,0 +1,31 @@ +--- a/tools/autoconf.c ++++ b/tools/autoconf.c +@@ -222,6 +222,9 @@ + + int checkendian() + { ++#ifdef ENDIANESS ++ return ENDIANESS; ++#else + char xyz[]="\x01\x02\x03\x04"; + unsigned long *lp; + unsigned long result; +@@ -229,6 +232,7 @@ + result=*lp; + if(result==67305985) return 0x1; + return 0x0; ++#endif + } + + int main() +--- a/Makefile ++++ b/Makefile +@@ -7,7 +7,7 @@ + @$(HOSTCC) tools/convconf.c -o tools/convconf + @tools/convconf + @echo [*] Running Autoconfig. +- @$(HOSTCC) -I. tools/autoconf.c -o tools/autoconf ++ @$(HOSTCC) -I. -DENDIANESS=$(ENDIANESS) tools/autoconf.c -o tools/autoconf + @tools/autoconf + @echo [*] Compiling MakeSalt for Encryption.. + @$(HOSTCC) -I. -o makesalt tools/makesalt.c diff --git a/net/ptpd/Makefile b/net/ptpd/Makefile new file mode 100644 index 0000000..41816ce --- /dev/null +++ b/net/ptpd/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2010-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ptpd +PKG_VERSION:=2.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/ptpd +PKG_MD5SUM:=9748f031ed9ebb5c600de354dae53046 + +include $(INCLUDE_DIR)/package.mk + +MAKE_PATH:=src + +define Package/ptpd + SECTION:=net + CATEGORY:=Network + SUBMENU:=Time Synchronization + TITLE:=Precision Time Protocol (PTP) daemon + URL:=http://ptpd.sourceforge.net/ + DEPENDS:=+libpthread +librt +endef + +define Package/ptpd/description + The PTP daemon (PTPd) implements version 2 of the Precision Time Protocol (PTP) + as defined by the IEEE 1588-2008 standard. + PTP was developed to provide very precise time coordination of LAN connected + computers. +endef + +define Package/ptpd/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ptpd2 $(1)/usr/sbin/ptpd + $(INSTALL_BIN) ./files/ptpd.init $(1)/etc/init.d/ptpd +endef + +$(eval $(call BuildPackage,ptpd)) diff --git a/net/ptpd/files/ptpd.init b/net/ptpd/files/ptpd.init new file mode 100644 index 0000000..71b5221 --- /dev/null +++ b/net/ptpd/files/ptpd.init @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common + +START=50 + +start() { + ptpd +} + +stop() { + killall ptpd +} diff --git a/net/ptunnel/Makefile b/net/ptunnel/Makefile new file mode 100644 index 0000000..54b8b32 --- /dev/null +++ b/net/ptunnel/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ptunnel +PKG_VERSION:=0.71 +PKG_RELEASE:=1 + +PKG_SOURCE:=PingTunnel-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.cs.uit.no/~daniels/PingTunnel +PKG_MD5SUM:=9b04771d4fa50abc15a6af690b81c71a + +PKG_BUILD_DIR:=$(BUILD_DIR)/PingTunnel + +include $(INCLUDE_DIR)/package.mk + +define Package/ptunnel + SECTION:=net + CATEGORY:=Network + SUBMENU:=Firewall Tunnel + DEPENDS:=+libpthread +libpcap + TITLE:=Tunnel TCP connections over ICMP packets + URL:=http://www.cs.uit.no/~daniels/PingTunnel/ +endef + +define Package/ptunnel/description + ptunnel is an application that allows you to reliably tunnel TCP connections to + a remote host using ICMP echo request and reply packets, commonly known as ping + requests and replies. It acts as a proxy and can handle sockets and secured + identification. +endef + +define Package/ptunnel/conffiles +/etc/config/ptunnel +endef + +# uses GNU configure + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -Wall -g -I$(STAGING_DIR)/usr/include" \ + LDOPTS="$(TARGET_LDFLAGS) -lpthread -lpcap" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Package/ptunnel/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ptunnel $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/ptunnel.init $(1)/etc/init.d/ptunnel + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/ptunnel.conf $(1)/etc/config/ptunnel +endef + +$(eval $(call BuildPackage,ptunnel)) diff --git a/net/ptunnel/files/ptunnel.conf b/net/ptunnel/files/ptunnel.conf new file mode 100644 index 0000000..bfc7495 --- /dev/null +++ b/net/ptunnel/files/ptunnel.conf @@ -0,0 +1,2 @@ +config ptunnel + option interface 'lan' diff --git a/net/ptunnel/files/ptunnel.init b/net/ptunnel/files/ptunnel.init new file mode 100644 index 0000000..99252d5 --- /dev/null +++ b/net/ptunnel/files/ptunnel.init @@ -0,0 +1,40 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007-2009 OpenWrt.org + +START=70 +BIN=ptunnel +PIDCOUNT=0 + +start() { + include /lib/network + scan_interfaces + + config_load ptunnel + config_foreach start_ptunnel ptunnel + iptables -I OUTPUT 1 -p icmp -j ACCEPT 2> /dev/null +} + +start_ptunnel() { + local section="$1" + + config_get interface "$section" interface + config_get ifname "$interface" ifname + + [ -z "$ifname" ] && { + echo "Error: Interface '$interface' not found" 1>&2 + return 1 + } + + PIDCOUNT="$(( ${PIDCOUNT} + 1))" + ${BIN} -c "$ifname" -daemon /var/run/ptunnel."$PIDCOUNT".pid> /dev/null +} + +stop() { + local pidfile + + for pidfile in `ls /var/run/${BIN}.*.pid` + do + start-stop-daemon -K -s KILL -p "${pidfile}" -n "${BIN}" >/dev/null + rm -f "${pidfile}" + done +} diff --git a/net/ptunnel/patches/001-prefix.patch b/net/ptunnel/patches/001-prefix.patch new file mode 100644 index 0000000..c640670 --- /dev/null +++ b/net/ptunnel/patches/001-prefix.patch @@ -0,0 +1,13 @@ +--- a/Makefile ++++ b/Makefile +@@ -12,8 +12,8 @@ WIN32_CFLAGS = -g -Wall -DWIN32 -I"c:\Pr + WIN32_LDOPTS = -lwpcap -lwsock32 -L"c:\Program Files\WpdPack\Lib" + WIN32_PT_OBJS = ptunnel.obj md5.obj + +-prefix = /usr +-bindir = $(prefix)/bin ++prefix = $(DESTDIR)/usr ++bindir = $(prefix)/sbin + mandir = $(prefix)/share/man/man8 + + all: ptunnel diff --git a/net/ptunnel/patches/002-no_selinux.patch b/net/ptunnel/patches/002-no_selinux.patch new file mode 100644 index 0000000..2dcf8c4 --- /dev/null +++ b/net/ptunnel/patches/002-no_selinux.patch @@ -0,0 +1,20 @@ +--- a/Makefile ++++ b/Makefile +@@ -32,7 +32,7 @@ install: ptunnel + install ./ptunnel.8 $(mandir)/ptunnel.8 + + ptunnel: $(PT_OBJS) +- $(CC) -o $@ $^ $(LDOPTS) `[ -e /usr/include/selinux/selinux.h ] && echo -lselinux` ++ $(CC) -o $@ $^ $(LDOPTS) + + ptunnel.exe: $(WIN32_PT_OBJS) + $(CC) -o $@ $^ $(WIN32_LDOPTS) +@@ -47,7 +47,7 @@ depend: .depend + $(CC) $(CFLAGS) -MM *.c > $@ + + %.o:%.c +- $(CC) $(CFLAGS) `[ -e /usr/include/selinux/selinux.h ] && echo -DHAVE_SELINUX` -c -o $@ $< ++ $(CC) $(CFLAGS) -c -o $@ $< + + %.obj:%.c + $(WIN32_CC) $(WIN32_CFLAGS) -c -o $@ $< diff --git a/net/pure-ftpd/Makefile b/net/pure-ftpd/Makefile new file mode 100644 index 0000000..d4d39a3 --- /dev/null +++ b/net/pure-ftpd/Makefile @@ -0,0 +1,91 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pure-ftpd +PKG_VERSION:=1.0.32 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://download.pureftpd.org/pub/pure-ftpd/releases +PKG_MD5SUM:=065211a4319e2089bd16b44c003eb0f8 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/pure-ftpd/Default + SUBMENU:=File Transfer + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libelf + TITLE:=Secure FTP made easy! + URL:=http://www.pureftpd.org/project/pure-ftpd +endef + +define Package/pure-ftpd + $(call Package/pure-ftpd/Default) + TITLE+= (no TLS) + VARIANT:=notls +endef + +define Package/pure-ftpd-tls + $(call Package/pure-ftpd/Default) + TITLE+= (TLS) + VARIANT:=tls + DEPENDS+=+libopenssl +endef + +define Package/pure-ftpd/description + Pure-FTPd is a free (BSD), secure, production-quality and standard-conformant + FTP server. It doesn't provide useless bells and whistles, but focuses on + efficiency and ease of use. + It provides simple answers to common needs, plus unique useful features for + personal users as well as hosting providers. +endef + +Package/pure-ftpd-tls/description=$(Package/pure-ftpd/description) + +define Package/pure-ftpd/conffiles +/etc/config/pure-ftpd +endef + +Package/pure-ftpd-tls/conffiles=$(Package/pure-ftpd/conffiles) + +CONFIGURE_ARGS += \ + --with-everything \ + --with-virtualchroot + +ifeq ($(BUILD_VARIANT),tls) +CONFIGURE_ARGS += \ + --with-certfile=/etc/ssl/private/pure-ftpd.pem \ + --with-tls +endif + +define Package/pure-ftpd/install + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/pure-{pw,pwconvert,statsdecode} \ + $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ptracetest $(1)/usr/sbin/ + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/sbin/pure-{authd,ftpd,ftpwho,mrtginfo,quotacheck,uploadscript} \ + $(1)/usr/sbin/ +endef + +Package/pure-ftpd-tls/install=$(Package/pure-ftpd/install) + +$(eval $(call BuildPackage,pure-ftpd)) +$(eval $(call BuildPackage,pure-ftpd-tls)) diff --git a/net/pure-ftpd/files/pure-ftpd.config b/net/pure-ftpd/files/pure-ftpd.config new file mode 100644 index 0000000..69aa734 --- /dev/null +++ b/net/pure-ftpd/files/pure-ftpd.config @@ -0,0 +1,10 @@ +config pure-ftpd + option port '21' + option noanonymous '1' + option chrooteveryone '1' + option maxclientsperip '10' + option maxclientsnumber '4' + option peruserlimits '3:4' + option umask '133:022' + option authentication 'unix' + option enabled '0' diff --git a/net/pure-ftpd/files/pure-ftpd.init b/net/pure-ftpd/files/pure-ftpd.init new file mode 100644 index 0000000..cb810b4 --- /dev/null +++ b/net/pure-ftpd/files/pure-ftpd.init @@ -0,0 +1,109 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2011 OpenWrt.org +START=50 + +SSD=start-stop-daemon +PIDF=/var/run/pure-ftpd.pid +PROG=/usr/sbin/pure-ftpd + +append_bool() { + local section="$1" + local option="$2" + local value="$3" + local _val + config_get_bool _val "$section" "$option" '0' + [ "$_val" -gt 0 ] && append args "$3" +} + +append_string() { + local section="$1" + local option="$2" + local value="$3" + local _val + config_get _val "$section" "$option" + [ -n "$_val" ] && append args "$3 $_val" +} + +start_service() { + local section="$1" + args="" + + append_string "$section" trustedgid "-a" + append_string "$section" syslogfacility "-f" + append_string "$section" fortunesfile "-F" + append_string "$section" maxidletime "-I" + append_string "$section" maxdiskusagepct "-k" + append_string "$section" limitrecursion "-L" + append_string "$section" anonymouscancreate "-M" + append_string "$section" maxload "-m" + append_string "$section" quota "-n" + append_string "$section" altlog "-O" + append_string "$section" passiveportrange "-p" + append_string "$section" forcepassiveip "-P" + append_string "$section" anonymousratio "-q" + append_string "$section" userratio "-Q" + append_string "$section" anonymousbandwidth "-t" + append_string "$section" userbandwidth "-T" + append_string "$section" minuid "-u" + append_string "$section" trustedip "-V" + append_string "$section" tls "-Y" + append_string "$section" tlsciphersuite "-J" + + append_bool "$section" uploadscript "-o" + append_bool "$section" natmode "-N" + append_bool "$section" autorename "-r" + append_bool "$section" nochmod "-R" + append_bool "$section" antiwarez "-s" + append_bool "$section" allowuserfxp "-w" + append_bool "$section" allowanonymousfxp "-W" + append_bool "$section" prohibitdotfileswrite "-x" + append_bool "$section" prohibitdotfilesread "-X" + append_bool "$section" allowdotfiles "-z" + append_bool "$section" customerproof "-Z" + append_bool "$section" anonymouscantupload "-i" + append_bool "$section" createhomedir "-j" + append_bool "$section" keepallfiles "-K" + append_bool "$section" norename "-G" + append_bool "$section" dontresolve "-H" + append_bool "$section" verboselog "-d" + append_bool "$section" displaydotfiles "-D" + append_bool "$section" anonymousonly "-e" + append_bool "$section" brokenclientscompatibility "-b" + append_bool "$section" notruncate "-0" + append_bool "$section" logpid "-1" + append_bool "$section" ipv4only "-4" + append_bool "$section" ipv6only "-6" + + append_string "$section" bind "-S" + append_string "$section" login "-l" + + append_bool "$section" noanonymous "-E" + append_bool "$section" chrooteveryone "-A" + append_string "$section" maxclientsperip "-c" + append_string "$section" maxclientsnumber "-C" + append_string "$section" peruserlimits "-y" + append_string "$section" umask "-U" + + append_string "$section" port "-S" + append_string "$section" authentication "-l" + + config_get_bool "enabled" "$section" "enabled" '1' + [ "$enabled" -gt 0 ] && $SSD -S -p $PIDF -q -x $PROG -- -g $PIDF -B $args +} + +stop_service() { + killall pure-ftpd 2>&1 > /dev/null + + # FIXME: Fix Busybox start-stop-daemon to work with multiple PIDs + # $SSD -K -p $PIDF -q +} + +start() { + config_load "pure-ftpd" + config_foreach start_service "pure-ftpd" +} + +stop() { + config_load "pure-ftpd" + config_foreach stop_service "pure-ftpd" +} diff --git a/net/pure-ftpd/patches/010-dont-add-host-paths.patch b/net/pure-ftpd/patches/010-dont-add-host-paths.patch new file mode 100644 index 0000000..42a9189 --- /dev/null +++ b/net/pure-ftpd/patches/010-dont-add-host-paths.patch @@ -0,0 +1,29 @@ +--- a/configure ++++ b/configure +@@ -4825,18 +4825,6 @@ fi + + + +-if test -d /usr/local/include; then +- CPPFLAGS="$CPPFLAGS -I/usr/local/include" +-fi +- +-if test -d /usr/kerberos/include; then +- CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" +-fi +- +-if test -d /usr/local/lib; then +- LDFLAGS="$LDFLAGS -L/usr/local/lib" +-fi +- + if uname | fgrep SunOS > /dev/null 2> /dev/null ; then + CPPFLAGS="$CPPFLAGS -D_XPG4_2=1" + fi +@@ -9222,7 +9210,6 @@ if test $ac_have_func = no; then + # There is a commonly available library for RS/6000 AIX. + # Since it is not a standard part of AIX, it might be installed locally. + ac_getloadavg_LIBS=$LIBS +- LIBS="-L/usr/local/lib $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 + $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } + if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : diff --git a/net/qolyester/Makefile b/net/qolyester/Makefile new file mode 100644 index 0000000..13cbca4 --- /dev/null +++ b/net/qolyester/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=qolyester +PKG_VERSION:=20090302 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://qolsr.lri.fr/code/ +PKG_MD5SUM:=650286fc2ea3e13c246d233aaa46f2a4 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/qolyester + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpthread @!TARGET_avr32 @!powerpc + TITLE:=OLSR implementation with QoS + URL:=http://qolsr.lri.fr/code/ +endef + +define Package/qolyester/description + This is an implementation from scratch of the OLSR protocol. + It is written in the C++ programming language and its goals + are modularity, efficiency and conformance to RFC 3626 (OLSR). +endef + +# uses GNU configure + +define Package/qolyester/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qolsrd $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,qolyester)) diff --git a/net/quagga/Makefile b/net/quagga/Makefile new file mode 100644 index 0000000..1baf6b0 --- /dev/null +++ b/net/quagga/Makefile @@ -0,0 +1,276 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=quagga +ifneq ($(CONFIG_QUAGGA_OLD),) + PKG_VERSION:=0.98.6 + PKG_RELEASE:=10 + PKG_MD5SUM:=b0d4132039953a0214256873b7d23d68 + PATCH_DIR:=./patches-old +else + PKG_VERSION:=0.99.18 + PKG_RELEASE:=2 + PKG_MD5SUM:=59e306e93a4a1ce16760f20e9075d473 +endif + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.quagga.net/download/ \ + http://www.de.quagga.net/download/ \ + http://www.uk.quagga.net/download/ +PKG_CONFIG_DEPENDS:= \ + CONFIG_QUAGGA_OLD \ + CONFIG_IPV6 \ + CONFIG_PACKAGE_quagga-libzebra \ + CONFIG_PACKAGE_quagga-libospf \ + CONFIG_PACKAGE_quagga-bgpd \ + CONFIG_PACKAGE_quagga-isisd \ + CONFIG_PACKAGE_quagga-ospf6d \ + CONFIG_PACKAGE_quagga-ripd \ + CONFIG_PACKAGE_quagga-ripngd \ + CONFIG_PACKAGE_quagga-vtysh +PKG_BUILD_PARALLEL:=1 +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/quagga/Default + SECTION:=net + CATEGORY:=Network + DEPENDS:=quagga + TITLE:=The Quagga Software Routing Suite + URL:=http://www.quagga.net + MAINTAINER:=Vasilis Tsiligiannis +endef + +define Package/quagga + $(call Package/quagga/Default) + DEPENDS:=+!QUAGGA_OLD:librt + MENU:=1 +endef + +define Package/quagga/description + A routing software package that provides TCP/IP based routing services + with routing protocols support such as RIPv1, RIPv2, RIPng, OSPFv2, + OSPFv3, BGP-4, and BGP-4+ +endef + +define Package/quagga/config +config QUAGGA_OLD + depends on (PACKAGE_quagga && BROKEN) + default n + bool "Use the old release version 0.98.6" + help + This option allows you to select the old version of Quagga to be built. +endef + +define Package/quagga-libzebra + $(call Package/quagga/Default) + TITLE:=zebra library +endef + +define Package/quagga-libospf + $(call Package/quagga/Default) + TITLE:=OSPF library +endef + +define Package/quagga-bgpd + $(call Package/quagga/Default) + DEPENDS+=+quagga-libzebra + TITLE:=BGPv4, BGPv4+, BGPv4- routing engine +endef + +define Package/quagga-isisd + $(call Package/quagga/Default) + TITLE:=IS-IS routing engine +endef + +define Package/quagga-ospfd + $(call Package/quagga/Default) + DEPENDS+=+quagga-libospf +quagga-libzebra + TITLE:=OSPFv2 routing engine +endef + +define Package/quagga-ospf6d + $(call Package/quagga/Default) + DEPENDS+=+quagga-libospf +quagga-libzebra @IPV6 + TITLE:=OSPFv3 routing engine +endef + +define Package/quagga-ripd + $(call Package/quagga/Default) + DEPENDS+=+quagga-libzebra + TITLE:=RIP routing engine +endef + +define Package/quagga-ripngd + $(call Package/quagga/Default) + DEPENDS+=+quagga-libzebra @IPV6 + TITLE:=RIPNG routing engine +endef + +define Package/quagga-vtysh + $(call Package/quagga/Default) + DEPENDS+=quagga-libzebra +libreadline +libncurses + TITLE:=integrated shell for Quagga routing software +endef + +define Package/quagga/conffiles +/etc/quagga/zebra.conf +endef + +define Package/quagga-bgpd/conffiles +/etc/quagga/bgpd.conf +endef + +define Package/quagga-isisd/conffiles +/etc/quagga/isisd.conf +endef + +define Package/quagga-ospfd/conffiles +/etc/quagga/ospfd.conf +endef + +define Package/quagga-ospf6d/conffiles +/etc/quagga/ospf6d.conf +endef + +define Package/quagga-ripd/conffiles +/etc/quagga/ripd.conf +endef + +define Package/quagga-ripngd/conffiles +/etc/quagga/ripngd.conf +endef + +ifneq ($(SDK),) +CONFIG_PACKAGE_quagga-libzebra:=m +CONFIG_PACKAGE_quagga-libospf:=m +CONFIG_PACKAGE_quagga-bgpd:=m +CONFIG_PACKAGE_quagga-isisd:=m +CONFIG_PACKAGE_quagga-ospf6d:=m +CONFIG_PACKAGE_quagga-ripd:=m +CONFIG_PACKAGE_quagga-ripngd:=m +CONFIG_PACKAGE_quagga-vtysh:=m +endif + +CONFIGURE_ARGS+= \ + --localstatedir=/var/run/quagga \ + --sysconfdir=/etc/quagga/ \ + --enable-shared \ + --disable-static \ + --enable-user=network \ + --enable-group=network \ + --enable-pie=no \ + --enable-multipath=8 \ + $(call autoconf_bool,CONFIG_PACKAGE_quagga-libzebra,zebra) \ + $(call autoconf_bool,CONFIG_PACKAGE_quagga-libospf,ospfd) \ + $(call autoconf_bool,CONFIG_PACKAGE_quagga-bgpd,bgpd) \ + $(call autoconf_bool,CONFIG_PACKAGE_quagga-isisd,isisd) \ + $(call autoconf_bool,CONFIG_PACKAGE_quagga-ospf6d,ospf6d) \ + $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripd,ripd) \ + $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripngd,ripngd) \ + $(call autoconf_bool,CONFIG_PACKAGE_quagga-vtysh,vtysh) \ + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) -std=gnu99" + +define Build/Configure + (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ + autoconf \ + ); + $(call Build/Configure/Default) +endef + +define Package/quagga/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(1)/usr/sbin/ + # avoid /etc being set to 0750 + $(INSTALL_DIR) $(1)/etc/quagga + chmod 0750 $(1)/etc/quagga + $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/zebra.conf + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/quagga $(1)/usr/sbin/quagga.init + $(INSTALL_BIN) ./files/quagga.init $(1)/etc/init.d/quagga +endef + +define Package/quagga-bgpd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bgpd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/quagga + chmod 0750 $(1)/etc/quagga + $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/bgpd.conf +endef + +define Package/quagga-isisd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/isisd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/quagga + chmod 0750 $(1)/etc/quagga + $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/isisd.conf +endef + +define Package/quagga-ospfd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospfd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/quagga + chmod 0750 $(1)/etc/quagga + $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospfd.conf +endef + +define Package/quagga-ospf6d/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospf6d $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/quagga + chmod 0750 $(1)/etc/quagga + $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospf6d.conf +endef + +define Package/quagga-ripd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/quagga + chmod 0750 $(1)/etc/quagga + $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripd.conf +endef + +define Package/quagga-ripngd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripngd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/quagga + chmod 0750 $(1)/etc/quagga + $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripngd.conf +endef + +define Package/quagga-vtysh/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(1)/usr/bin/ +endef + +define Package/quagga-libospf/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libospf.so.* $(1)/usr/lib/ +endef + +define Package/quagga-libzebra/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,quagga)) +$(eval $(call BuildPackage,quagga-libzebra)) +$(eval $(call BuildPackage,quagga-libospf)) +$(eval $(call BuildPackage,quagga-bgpd)) +$(eval $(call BuildPackage,quagga-isisd)) +$(eval $(call BuildPackage,quagga-ospfd)) +$(eval $(call BuildPackage,quagga-ospf6d)) +$(eval $(call BuildPackage,quagga-ripd)) +$(eval $(call BuildPackage,quagga-ripngd)) +$(eval $(call BuildPackage,quagga-vtysh)) diff --git a/net/quagga/files/quagga b/net/quagga/files/quagga new file mode 100644 index 0000000..0ccfb1c --- /dev/null +++ b/net/quagga/files/quagga @@ -0,0 +1,335 @@ +#!/bin/sh +# +# quagga Starts/stops quagga daemons and watchquagga. +# Create a daemon.conf file to have that routing daemon +# started/stopped automagically when using this script +# without any daemon names as args. +# If watchquagga is available, it will also be +# started/stopped if the script is called without +# any daemon names. +# + +ME=$(basename $0) + +usage() { + echo "Usage: ${ME} {start|stop|restart} [daemon ...]" + exit 2 +} + +if [ -z "$1" ] +then + usage +else + COMMAND=$1 +fi +shift +ARG_DAEMONS=$* +BINDIR=/usr/sbin +CONFDIR=/etc/quagga +STATEDIR=/var/run/quagga +RUNUSER=network +RUNGROUP=$RUNUSER +DAEMONS="zebra ripd ripngd ospfd ospf6d bgpd" +DAEMON_FLAGS=-d +WATCHQUAGGA_FLAGS="-d -z -T 60 -R" +WATCHQUAGGA_CMD="$0 watchrestart" +if [ ${COMMAND} != "watchrestart" ] +then + DAEMONS="${DAEMONS} watchquagga" +fi +DAEMONS_STARTSEQ=${DAEMONS} + +reverse() +{ + local revlist r + revlist= + for r + do + revlist="$r $revlist" + done + echo $revlist +} + +DAEMONS_STOPSEQ=$(reverse ${DAEMONS_STARTSEQ}) + +#pidof() { +# ps ax | awk 'match($5, "(^|/)'"$1"'$") > 0 { printf " %s", $1 }' +#} + +quit() { + echo "${ME}: $1" + exit 0 +} + +die() { + echo "${ME}: $1" + exit 1 +} + +is_in() { + local i + for i in $2 + do + [ "$1" = "$i" ] && return 0 + done + return 1 +} + +select_subset() { + local unknown i j + unknown= + RESULT= + for i in $1 + do + is_in $i "$2" || unknown="$unknown $i" + done + if [ -n "$unknown" ] + then + RESULT=$unknown + return 1 + else + for j in $2 + do + is_in $j "$1" && RESULT="$RESULT $j" + done + return 0 + fi +} + +# check command + +case ${COMMAND} +in + start|stop|restart) + ;; + watchrestart) + if [ -n "$ARG_DAEMONS" ] + then + echo "${ME}: watchrestart mode is only for use by watchquagga" + exit 2 + fi + ;; + *) + usage + ;; +esac + +# select daemons to start + +case ${COMMAND} +in + start|restart|watchrestart) + START_DAEMONS= + for d in ${DAEMONS_STARTSEQ} + do + [ -x "${BINDIR}/${d}" -a -f "${CONFDIR}/${d}.conf" ] \ + && START_DAEMONS="${START_DAEMONS}${d} " + done + WATCHQUAGGA_DAEMONS=${START_DAEMONS} + if is_in watchquagga "${DAEMONS_STARTSEQ}" + then + START_DAEMONS="${START_DAEMONS} watchquagga" + fi + if [ -n "${ARG_DAEMONS}" ] + then + if select_subset "${ARG_DAEMONS}" "${DAEMONS}" + then + if select_subset "${ARG_DAEMONS}" "${START_DAEMONS}" + then + START_DAEMONS=${RESULT} + else + die "these daemons are not startable:${RESULT}." + fi + else + die "unknown daemons:${RESULT}; choose from: ${DAEMONS}." + fi + fi + ;; +esac + +# select daemons to stop + +case ${COMMAND} +in + stop|restart|watchrestart) + STOP_DAEMONS=${DAEMONS_STOPSEQ} + if [ -n "${ARG_DAEMONS}" ] + then + if select_subset "${ARG_DAEMONS}" "${STOP_DAEMONS}" + then + STOP_DAEMONS=${RESULT} + else + die "unknown daemons:${RESULT}; choose from: ${DAEMONS}." + fi + fi + stop_daemons= + for d in ${STOP_DAEMONS} + do + pidfile=${STATEDIR}/${d}.pid + if [ -f "${pidfile}" -o -n "$(pidof ${d})" ] + then + stop_daemons="${stop_daemons}${d} " + elif [ -n "${ARG_DAEMONS}" ] + then + echo "${ME}: found no ${d} process running." + fi + done + STOP_DAEMONS=${stop_daemons} + ;; +esac + +# stop daemons + +for d in $STOP_DAEMONS +do + echo -n "${ME}: Stopping ${d} ... " + pidfile=${STATEDIR}/${d}.pid + if [ -f "${pidfile}" ] + then + file_pid=$(cat ${pidfile}) + if [ -z "${file_pid}" ] + then + echo -n "no pid file entry found ... " + fi + else + file_pid= + echo -n "no pid file found ... " + fi + proc_pid=$(pidof ${d}) + if [ -z "${proc_pid}" ] + then + echo -n "found no ${d} process running ... " + else + count=0 + notinpidfile= + for p in ${proc_pid} + do + count=$((${count}+1)) + if kill ${p} + then + echo -n "killed ${p} ... " + else + echo -n "failed to kill ${p} ... " + fi + [ "${p}" = "${file_pid}" ] \ + || notinpidfile="${notinpidfile} ${p}" + done + [ ${count} -le 1 ] \ + || echo -n "WARNING: ${count} ${d} processes were found running ... " + for n in ${notinpidfile} + do + echo -n "WARNING: process ${n} was not in pid file ... " + done + fi + count=0 + survivors=$(pidof ${d}) + while [ -n "${survivors}" ] + do + sleep 1 + count=$((${count}+1)) + survivors=$(pidof ${d}) + [ -z "${survivors}" -o ${count} -gt 5 ] && break + for p in ${survivors} + do + sleep 1 + echo -n "${p} " + kill ${p} + done + done + survivors=$(pidof ${d}) + [ -n "${survivors}" ] && \ + if kill -KILL ${survivors} + then + echo -n "KILLed ${survivors} ... " + else + echo -n "failed to KILL ${survivors} ... " + fi + sleep 1 + survivors=$(pidof ${d}) + if [ -z "${survivors}" ] + then + echo -n "done." + if [ -f "${pidfile}" ] + then + rm -f ${pidfile} \ + || echo -n " Failed to remove pidfile." + fi + else + echo -n "failed to stop ${survivors} - giving up." + if [ "${survivors}" != "${file_pid}" ] + then + if echo "${survivors}" > ${pidfile} + then + chown ${RUNUSER}:${RUNGROUP} ${pidfile} + echo -n " Wrote ${survivors} to pidfile." + else + echo -n " Failed to write ${survivors} to pidfile." + fi + fi + fi + echo +done + +# start daemons + +if [ -n "$START_DAEMONS" ] +then + [ -d ${CONFDIR} ] \ + || quit "${ME}: no config directory ${CONFDIR} - exiting." + chown -R ${RUNUSER}:${RUNGROUP} ${CONFDIR} + [ -d ${STATEDIR} ] || mkdir -p ${STATEDIR} \ + || die "${ME}: could not create state directory ${STATEDIR} - exiting." + chown -R ${RUNUSER}:${RUNGROUP} ${STATEDIR} + + for d in $START_DAEMONS + do + echo -n "${ME}: Starting ${d} ... " + proc_pid=$(pidof ${d}) + pidfile=${STATEDIR}/${d}.pid + file_pid= + if [ -f "${pidfile}" ] + then + file_pid=$(cat ${pidfile}) + if [ -n "${file_pid}" ] + then + echo -n "found old pid file entry ${file_pid} ... " + fi + fi + if [ -n "${proc_pid}" ] + then + echo -n "found ${d} running (${proc_pid}) - skipping ${d}." + if [ "${proc_pid}" != "${file_pid}" ] + then + if echo "${proc_pid}" > ${pidfile} + then + chown ${RUNUSER}:${RUNGROUP} ${pidfile} + echo -n " Wrote ${proc_pid} to pidfile." + else + echo -n " Failed to write ${proc_pid} to pidfile." + fi + fi + elif rm -f "${pidfile}" + then + if [ "${d}" = "watchquagga" ] + then + "${BINDIR}/${d}" \ + ${WATCHQUAGGA_FLAGS} \ + "${WATCHQUAGGA_CMD}" \ + ${WATCHQUAGGA_DAEMONS} + status=$? + else + "${BINDIR}/${d}" ${DAEMON_FLAGS} + status=$? + fi + if [ $status -eq 0 ] + then + echo -n "done." + else + echo -n "failed." + fi + else + echo -n " failed to remove pidfile." + fi + echo + done +fi diff --git a/net/quagga/files/quagga.conf b/net/quagga/files/quagga.conf new file mode 100644 index 0000000..fb7a54e --- /dev/null +++ b/net/quagga/files/quagga.conf @@ -0,0 +1,7 @@ +password zebra +! +access-list vty permit 127.0.0.0/8 +access-list vty deny any +! +line vty + access-class vty diff --git a/net/quagga/files/quagga.init b/net/quagga/files/quagga.init new file mode 100644 index 0000000..21fbf2c --- /dev/null +++ b/net/quagga/files/quagga.init @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=60 +start() { + /usr/sbin/quagga.init start +} + +stop() { + /usr/sbin/quagga.init stop +} diff --git a/net/quagga/patches-old/001-quagga_cross.patch b/net/quagga/patches-old/001-quagga_cross.patch new file mode 100644 index 0000000..b6d5b20 --- /dev/null +++ b/net/quagga/patches-old/001-quagga_cross.patch @@ -0,0 +1,84 @@ +--- a/configure ++++ b/configure +@@ -12675,69 +12675,6 @@ fi + + + +-echo "$as_me:$LINENO: checking for broken CMSG_FIRSTHDR" >&5 +-echo $ECHO_N "checking for broken CMSG_FIRSTHDR... $ECHO_C" >&6 +-if test "$cross_compiling" = yes; then +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&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 SUNOS_5 +-#define _XPG4_2 +-#define __EXTENSIONS__ +-#endif +-#include +-#include +-#include +- +-main() +-{ +- struct msghdr msg; +- char buf[4]; +- +- msg.msg_control = buf; +- msg.msg_controllen = 0; +- +- if (CMSG_FIRSTHDR(&msg) != NULL) +- exit(0); +- exit (1); +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- echo "$as_me:$LINENO: result: yes - using workaround" >&5 +-echo "${ECHO_T}yes - using workaround" >&6 +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_BROKEN_CMSG_FIRSTHDR +-_ACEOF +- +-else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +-fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- + echo "$as_me:$LINENO: checking route read method check" >&5 + echo $ECHO_N "checking route read method check... $ECHO_C" >&6 + if test "${zebra_rtread+set}" = set; then +@@ -12835,10 +12772,7 @@ echo $ECHO_N "checking ipforward method + if test "${zebra_ipforward_path+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- for zebra_ipforward_path in /proc/net/snmp /dev/ip /dev/null; +-do +- test x`ls $zebra_ipforward_path 2>/dev/null` = x"$zebra_ipforward_path" && break +-done ++ zebra_ipforward_path="/proc/net/snmp" + case $zebra_ipforward_path in + "/proc/net/snmp") IPFORWARD=ipforward_proc.o + zebra_ipforward_path="proc";; diff --git a/net/quagga/patches-old/001-quagga_readline.patch b/net/quagga/patches-old/001-quagga_readline.patch new file mode 100644 index 0000000..68113fd --- /dev/null +++ b/net/quagga/patches-old/001-quagga_readline.patch @@ -0,0 +1,58 @@ +--- a/configure ++++ b/configure +@@ -10972,7 +10972,7 @@ if test "${ac_cv_lib_curses_tputs+set}" + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcurses $LIBS" ++#LIBS="-lcurses $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -11108,7 +11108,8 @@ if test $ac_cv_lib_ncurses_tputs = yes; + #define HAVE_LIBNCURSES 1 + _ACEOF + +- LIBS="-lncurses $LIBS" ++# LIBS="-lncurses $LIBS" ++CURSES=-lncurses + + fi + +@@ -11125,7 +11126,7 @@ if test "${ac_cv_lib_readline_main+set}" + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lreadline $LIBS" ++LIBS="-lreadline $CURSES $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -11182,7 +11183,8 @@ if test $ac_cv_lib_readline_main = yes; + #define HAVE_LIBREADLINE 1 + _ACEOF + +- LIBS="-lreadline $LIBS" ++# LIBS="-lreadline $LIBS" ++CURSES="$CURSES -lreadline" + + fi + +@@ -11342,7 +11344,7 @@ if test "${ac_cv_lib_readline_rl_complet + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lreadline $LIBS" ++LIBS="-lreadline $CURSES $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -11405,7 +11407,7 @@ if test $ac_cv_lib_readline_rl_completio + #define HAVE_LIBREADLINE 1 + _ACEOF + +- LIBS="-lreadline $LIBS" ++# LIBS="-lreadline $LIBS" + + fi + diff --git a/net/quagga/patches-old/002-quagga_manet.patch b/net/quagga/patches-old/002-quagga_manet.patch new file mode 100644 index 0000000..8fe07ac --- /dev/null +++ b/net/quagga/patches-old/002-quagga_manet.patch @@ -0,0 +1,855 @@ +--- a/bgpd/bgp_vty.c ++++ b/bgpd/bgp_vty.c +@@ -3,6 +3,9 @@ + + This file is part of GNU Zebra. + ++This file was modified from the original on 30/12/2007 ++by Vasilis Tsiligiannis ++ + GNU Zebra 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 +@@ -7793,8 +7796,12 @@ bgp_str2route_type (int afi, const char + return ZEBRA_ROUTE_STATIC; + else if (strncmp (str, "r", 1) == 0) + return ZEBRA_ROUTE_RIP; +- else if (strncmp (str, "o", 1) == 0) ++ else if (strncmp (str, "ol", 2) == 0) ++ return ZEBRA_ROUTE_OLSR; ++ else if (strncmp (str, "os", 2) == 0) + return ZEBRA_ROUTE_OSPF; ++ else if (strncmp (str, "ba", 2) == 0) ++ return ZEBRA_ROUTE_BATMAN; + } + if (afi == AFI_IP6) + { +@@ -7806,21 +7813,28 @@ bgp_str2route_type (int afi, const char + return ZEBRA_ROUTE_STATIC; + else if (strncmp (str, "r", 1) == 0) + return ZEBRA_ROUTE_RIPNG; +- else if (strncmp (str, "o", 1) == 0) ++ else if (strncmp (str, "os", 2) == 0) + return ZEBRA_ROUTE_OSPF6; ++ else if (strncmp (str, "ol", 2) == 0) ++ return ZEBRA_ROUTE_OLSR; ++ else if (strncmp (str, "ba", 2) == 0) ++ return ZEBRA_ROUTE_BATMAN; + } + return 0; + } + + DEFUN (bgp_redistribute_ipv4, + bgp_redistribute_ipv4_cmd, +- "redistribute (connected|kernel|ospf|rip|static)", ++ "redistribute (connected|kernel|ospf|rip|static|olsr|batman)", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" +- "Static routes\n") ++ "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++ ) + { + int type; + +@@ -7835,13 +7849,15 @@ DEFUN (bgp_redistribute_ipv4, + + DEFUN (bgp_redistribute_ipv4_rmap, + bgp_redistribute_ipv4_rmap_cmd, +- "redistribute (connected|kernel|ospf|rip|static) route-map WORD", ++ "redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -7860,13 +7876,15 @@ DEFUN (bgp_redistribute_ipv4_rmap, + + DEFUN (bgp_redistribute_ipv4_metric, + bgp_redistribute_ipv4_metric_cmd, +- "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295>", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n") + { +@@ -7887,13 +7905,15 @@ DEFUN (bgp_redistribute_ipv4_metric, + + DEFUN (bgp_redistribute_ipv4_rmap_metric, + bgp_redistribute_ipv4_rmap_metric_cmd, +- "redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD metric <0-4294967295>", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n" + "Metric for redistributed routes\n" +@@ -7917,13 +7937,15 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric + + DEFUN (bgp_redistribute_ipv4_metric_rmap, + bgp_redistribute_ipv4_metric_rmap_cmd, +- "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD", ++ "redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295> route-map WORD", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n" + "Route map reference\n" +@@ -7947,14 +7969,17 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap + + DEFUN (no_bgp_redistribute_ipv4, + no_bgp_redistribute_ipv4_cmd, +- "no redistribute (connected|kernel|ospf|rip|static)", ++ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman)", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" +- "Static routes\n") ++ "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++ ) + { + int type; + +@@ -7970,7 +7995,7 @@ DEFUN (no_bgp_redistribute_ipv4, + + DEFUN (no_bgp_redistribute_ipv4_rmap, + no_bgp_redistribute_ipv4_rmap_cmd, +- "no redistribute (connected|kernel|ospf|rip|static) route-map WORD", ++ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -7978,6 +8003,8 @@ DEFUN (no_bgp_redistribute_ipv4_rmap, + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -7996,7 +8023,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap, + + DEFUN (no_bgp_redistribute_ipv4_metric, + no_bgp_redistribute_ipv4_metric_cmd, +- "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295>", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8004,6 +8031,8 @@ DEFUN (no_bgp_redistribute_ipv4_metric, + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n") + { +@@ -8022,7 +8051,7 @@ DEFUN (no_bgp_redistribute_ipv4_metric, + + DEFUN (no_bgp_redistribute_ipv4_rmap_metric, + no_bgp_redistribute_ipv4_rmap_metric_cmd, +- "no redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD metric <0-4294967295>", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8030,6 +8059,8 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n" + "Metric for redistributed routes\n" +@@ -8051,7 +8082,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met + + ALIAS (no_bgp_redistribute_ipv4_rmap_metric, + no_bgp_redistribute_ipv4_metric_rmap_cmd, +- "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD", ++ "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295> route-map WORD", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8059,6 +8090,8 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n" + "Route map reference\n" +@@ -8067,13 +8100,16 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met + #ifdef HAVE_IPV6 + DEFUN (bgp_redistribute_ipv6, + bgp_redistribute_ipv6_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static)", ++ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman)", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" +- "Static routes\n") ++ "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++ ) + { + int type; + +@@ -8089,13 +8125,15 @@ DEFUN (bgp_redistribute_ipv6, + + DEFUN (bgp_redistribute_ipv6_rmap, + bgp_redistribute_ipv6_rmap_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD", ++ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -8114,13 +8152,15 @@ DEFUN (bgp_redistribute_ipv6_rmap, + + DEFUN (bgp_redistribute_ipv6_metric, + bgp_redistribute_ipv6_metric_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295>", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n") + { +@@ -8141,13 +8181,15 @@ DEFUN (bgp_redistribute_ipv6_metric, + + DEFUN (bgp_redistribute_ipv6_rmap_metric, + bgp_redistribute_ipv6_rmap_metric_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD metric <0-4294967295>", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n" + "Metric for redistributed routes\n" +@@ -8171,13 +8213,15 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric + + DEFUN (bgp_redistribute_ipv6_metric_rmap, + bgp_redistribute_ipv6_metric_rmap_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD", ++ "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295> route-map WORD", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n" + "Route map reference\n" +@@ -8201,14 +8245,17 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap + + DEFUN (no_bgp_redistribute_ipv6, + no_bgp_redistribute_ipv6_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static)", ++ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman)", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" +- "Static routes\n") ++ "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++ ) + { + int type; + +@@ -8224,7 +8271,7 @@ DEFUN (no_bgp_redistribute_ipv6, + + DEFUN (no_bgp_redistribute_ipv6_rmap, + no_bgp_redistribute_ipv6_rmap_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD", ++ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8232,6 +8279,8 @@ DEFUN (no_bgp_redistribute_ipv6_rmap, + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -8250,7 +8299,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap, + + DEFUN (no_bgp_redistribute_ipv6_metric, + no_bgp_redistribute_ipv6_metric_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295>", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8258,6 +8307,8 @@ DEFUN (no_bgp_redistribute_ipv6_metric, + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n") + { +@@ -8276,7 +8327,7 @@ DEFUN (no_bgp_redistribute_ipv6_metric, + + DEFUN (no_bgp_redistribute_ipv6_rmap_metric, + no_bgp_redistribute_ipv6_rmap_metric_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD metric <0-4294967295>", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8284,6 +8335,8 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n" + "Metric for redistributed routes\n" +@@ -8305,7 +8358,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met + + ALIAS (no_bgp_redistribute_ipv6_rmap_metric, + no_bgp_redistribute_ipv6_metric_rmap_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD", ++ "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295> route-map WORD", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8313,6 +8366,8 @@ ALIAS (no_bgp_redistribute_ipv6_rmap_met + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n" + "Route map reference\n" +@@ -8325,7 +8380,7 @@ bgp_config_write_redistribute (struct vt + { + int i; + const char *str[] = { "system", "kernel", "connected", "static", "rip", +- "ripng", "ospf", "ospf6", "isis", "bgp"}; ++ "ripng", "ospf", "ospf6", "isis", "bgp", "hsls", "olsr", "batman"}; + + /* Unicast redistribution only. */ + if (safi != SAFI_UNICAST) +--- a/lib/zebra.h ++++ b/lib/zebra.h +@@ -3,6 +3,9 @@ + + This file is part of GNU Zebra. + ++This file was modified from the original on 30/12/2007 ++by Vasilis Tsiligiannis ++ + GNU Zebra 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 +@@ -378,7 +381,9 @@ struct in_pktinfo + #define ZEBRA_ROUTE_ISIS 8 + #define ZEBRA_ROUTE_BGP 9 + #define ZEBRA_ROUTE_HSLS 10 +-#define ZEBRA_ROUTE_MAX 11 ++#define ZEBRA_ROUTE_OLSR 11 ++#define ZEBRA_ROUTE_BATMAN 12 ++#define ZEBRA_ROUTE_MAX 13 + + /* Zebra's family types. */ + #define ZEBRA_FAMILY_IPV4 1 +--- a/ospfd/ospf_vty.c ++++ b/ospfd/ospf_vty.c +@@ -3,6 +3,9 @@ + * + * This file is part of GNU Zebra. + * ++ * This file was modified from the original on 30/12/2007 ++ * by Vasilis Tsiligiannis ++ * + * GNU Zebra 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 +@@ -106,11 +109,15 @@ str2distribute_source (const char *str, + *source = ZEBRA_ROUTE_STATIC; + else if (strncmp (str, "r", 1) == 0) + *source = ZEBRA_ROUTE_RIP; +- else if (strncmp (str, "b", 1) == 0) ++ else if (strncmp (str, "bg", 2) == 0) + *source = ZEBRA_ROUTE_BGP; ++ else if (strncmp (str, "ol", 2) == 0) ++ *source = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (str, "ba", 2) == 0) ++ *source = ZEBRA_ROUTE_BATMAN; + else + return 0; +- ++ + return 1; + } + +@@ -5302,13 +5309,15 @@ ALIAS (no_ip_ospf_transmit_delay, + + DEFUN (ospf_redistribute_source_metric_type, + ospf_redistribute_source_metric_type_routemap_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> metric-type (1|2) route-map WORD", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214> metric-type (1|2) route-map WORD", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "OSPF default metric\n" + "OSPF exterior metric type for redistributed routes\n" +@@ -5346,13 +5355,15 @@ DEFUN (ospf_redistribute_source_metric_t + + ALIAS (ospf_redistribute_source_metric_type, + ospf_redistribute_source_metric_type_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> metric-type (1|2)", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214> metric-type (1|2)", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "OSPF default metric\n" + "OSPF exterior metric type for redistributed routes\n" +@@ -5361,25 +5372,29 @@ ALIAS (ospf_redistribute_source_metric_t + + ALIAS (ospf_redistribute_source_metric_type, + ospf_redistribute_source_metric_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214>", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "OSPF default metric\n") + + DEFUN (ospf_redistribute_source_type_metric, + ospf_redistribute_source_type_metric_routemap_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map WORD", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2) metric <0-16777214> route-map WORD", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "OSPF exterior metric type for redistributed routes\n" + "Set OSPF External Type 1 metrics\n" + "Set OSPF External Type 2 metrics\n" +@@ -5417,13 +5432,15 @@ DEFUN (ospf_redistribute_source_type_met + + ALIAS (ospf_redistribute_source_type_metric, + ospf_redistribute_source_type_metric_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2) metric <0-16777214>", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "OSPF exterior metric type for redistributed routes\n" + "Set OSPF External Type 1 metrics\n" + "Set OSPF External Type 2 metrics\n" +@@ -5432,7 +5449,7 @@ ALIAS (ospf_redistribute_source_type_met + + ALIAS (ospf_redistribute_source_type_metric, + ospf_redistribute_source_type_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2)", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" +@@ -5440,28 +5457,35 @@ ALIAS (ospf_redistribute_source_type_met + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" + "OSPF exterior metric type for redistributed routes\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Set OSPF External Type 1 metrics\n" + "Set OSPF External Type 2 metrics\n") + + ALIAS (ospf_redistribute_source_type_metric, + ospf_redistribute_source_cmd, +- "redistribute (kernel|connected|static|rip|bgp)", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman)", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" +- "Border Gateway Protocol (BGP)\n") ++ "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++ ) + + DEFUN (ospf_redistribute_source_metric_routemap, + ospf_redistribute_source_metric_routemap_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map WORD", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214> route-map WORD", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "OSPF default metric\n" + "Route map reference\n" +@@ -5490,13 +5514,15 @@ DEFUN (ospf_redistribute_source_metric_r + + DEFUN (ospf_redistribute_source_type_routemap, + ospf_redistribute_source_type_routemap_cmd, +- "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map WORD", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2) route-map WORD", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "OSPF exterior metric type for redistributed routes\n" + "Set OSPF External Type 1 metrics\n" + "Set OSPF External Type 2 metrics\n" +@@ -5526,13 +5552,15 @@ DEFUN (ospf_redistribute_source_type_rou + + DEFUN (ospf_redistribute_source_routemap, + ospf_redistribute_source_routemap_cmd, +- "redistribute (kernel|connected|static|rip|bgp) route-map WORD", ++ "redistribute (kernel|connected|static|rip|bgp|olsr|batman) route-map WORD", + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" + "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -5553,14 +5581,17 @@ DEFUN (ospf_redistribute_source_routemap + + DEFUN (no_ospf_redistribute_source, + no_ospf_redistribute_source_cmd, +- "no redistribute (kernel|connected|static|rip|bgp)", ++ "no redistribute (kernel|connected|static|rip|bgp|olsr|batman)", + NO_STR + "Redistribute information from another routing protocol\n" + "Kernel routes\n" + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" +- "Border Gateway Protocol (BGP)\n") ++ "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++ ) + { + struct ospf *ospf = vty->index; + int source; +@@ -5574,7 +5605,7 @@ DEFUN (no_ospf_redistribute_source, + + DEFUN (ospf_distribute_list_out, + ospf_distribute_list_out_cmd, +- "distribute-list WORD out (kernel|connected|static|rip|bgp)", ++ "distribute-list WORD out (kernel|connected|static|rip|bgp|olsr|batman)", + "Filter networks in routing updates\n" + "Access-list name\n" + OUT_STR +@@ -5582,7 +5613,10 @@ DEFUN (ospf_distribute_list_out, + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" +- "Border Gateway Protocol (BGP)\n") ++ "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++) + { + struct ospf *ospf = vty->index; + int source; +@@ -5596,7 +5630,7 @@ DEFUN (ospf_distribute_list_out, + + DEFUN (no_ospf_distribute_list_out, + no_ospf_distribute_list_out_cmd, +- "no distribute-list WORD out (kernel|connected|static|rip|bgp)", ++ "no distribute-list WORD out (kernel|connected|static|rip|bgp|olsr|batman)", + NO_STR + "Filter networks in routing updates\n" + "Access-list name\n" +@@ -5605,7 +5639,10 @@ DEFUN (no_ospf_distribute_list_out, + "Connected\n" + "Static routes\n" + "Routing Information Protocol (RIP)\n" +- "Border Gateway Protocol (BGP)\n") ++ "Border Gateway Protocol (BGP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" ++) + { + struct ospf *ospf = vty->index; + int source; +@@ -7121,7 +7158,8 @@ config_write_virtual_link (struct vty *v + + + const char *distribute_str[] = { "system", "kernel", "connected", "static", +- "rip", "ripng", "ospf", "ospf6", "isis", "bgp"}; ++ "rip", "ripng", "ospf", "ospf6", "isis", "bgp", ++ "hsls","olsr","batman"}; + int + config_write_ospf_redistribute (struct vty *vty, struct ospf *ospf) + { +--- a/zebra/redistribute.c ++++ b/zebra/redistribute.c +@@ -3,6 +3,9 @@ + * + * This file is part of GNU Zebra. + * ++ * This file was modified from the original on 30/12/2007 ++ * by Vasilis Tsiligiannis ++ * + * GNU Zebra 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 +@@ -253,6 +256,8 @@ zebra_redistribute_add (int command, str + case ZEBRA_ROUTE_OSPF: + case ZEBRA_ROUTE_OSPF6: + case ZEBRA_ROUTE_BGP: ++ case ZEBRA_ROUTE_OLSR: ++ case ZEBRA_ROUTE_BATMAN: + if (! client->redist[type]) + { + client->redist[type] = 1; +@@ -281,6 +286,8 @@ zebra_redistribute_delete (int command, + case ZEBRA_ROUTE_OSPF: + case ZEBRA_ROUTE_OSPF6: + case ZEBRA_ROUTE_BGP: ++ case ZEBRA_ROUTE_OLSR: ++ case ZEBRA_ROUTE_BATMAN: + client->redist[type] = 0; + break; + default: +--- a/zebra/zebra_vty.c ++++ b/zebra/zebra_vty.c +@@ -53,6 +53,10 @@ route_type_str (u_char type) + return "isis"; + case ZEBRA_ROUTE_BGP: + return "bgp"; ++ case ZEBRA_ROUTE_OLSR: ++ return "olsr"; ++ case ZEBRA_ROUTE_BATMAN: ++ return "batman"; + default: + return "unknown"; + } +@@ -84,6 +88,12 @@ route_type_char (u_char type) + return 'I'; + case ZEBRA_ROUTE_BGP: + return 'B'; ++ case ZEBRA_ROUTE_HSLS: ++ return 'H'; ++ case ZEBRA_ROUTE_OLSR: ++ return 'L'; ++ case ZEBRA_ROUTE_BATMAN: ++ return 'M'; + default: + return '?'; + } +@@ -755,8 +765,8 @@ vty_show_ip_route (struct vty *vty, stru + } + + #define SHOW_ROUTE_V4_HEADER "Codes: K - kernel route, C - connected, " \ +- "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, " \ +- "> - selected route, * - FIB route%s%s" ++ "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, H - HSLS, " \ ++ "L - OLSR, M - BATMAN, > - selected route, * - FIB route%s%s" + + DEFUN (show_ip_route, + show_ip_route_cmd, +@@ -874,7 +884,7 @@ DEFUN (show_ip_route_supernets, + + DEFUN (show_ip_route_protocol, + show_ip_route_protocol_cmd, +- "show ip route (bgp|connected|isis|kernel|ospf|rip|static)", ++ "show ip route (bgp|connected|isis|kernel|ospf|rip|olsr|batman|static)", + SHOW_STR + IP_STR + "IP routing table\n" +@@ -884,6 +894,8 @@ DEFUN (show_ip_route_protocol, + "Kernel\n" + "Open Shortest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Static routes\n") + { + int type; +@@ -892,13 +904,13 @@ DEFUN (show_ip_route_protocol, + struct rib *rib; + int first = 1; + +- if (strncmp (argv[0], "b", 1) == 0) ++ if (strncmp (argv[0], "bg", 2) == 0) + type = ZEBRA_ROUTE_BGP; + else if (strncmp (argv[0], "c", 1) == 0) + type = ZEBRA_ROUTE_CONNECT; + else if (strncmp (argv[0], "k", 1) ==0) + type = ZEBRA_ROUTE_KERNEL; +- else if (strncmp (argv[0], "o", 1) == 0) ++ else if (strncmp (argv[0], "os", 2) == 0) + type = ZEBRA_ROUTE_OSPF; + else if (strncmp (argv[0], "i", 1) == 0) + type = ZEBRA_ROUTE_ISIS; +@@ -906,6 +918,10 @@ DEFUN (show_ip_route_protocol, + type = ZEBRA_ROUTE_RIP; + else if (strncmp (argv[0], "s", 1) == 0) + type = ZEBRA_ROUTE_STATIC; ++ else if (strncmp (argv[0], "ol", 2) == 0) ++ type = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (argv[0], "ba", 2) == 0) ++ type = ZEBRA_ROUTE_BATMAN; + else + { + vty_out (vty, "Unknown route type%s", VTY_NEWLINE); +@@ -1732,7 +1748,7 @@ DEFUN (show_ipv6_route_prefix_longer, + + DEFUN (show_ipv6_route_protocol, + show_ipv6_route_protocol_cmd, +- "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|static)", ++ "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|olsr|batman|static)", + SHOW_STR + IP_STR + "IP routing table\n" +@@ -1742,6 +1758,8 @@ DEFUN (show_ipv6_route_protocol, + "Kernel\n" + "Open Shortest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Static routes\n") + { + int type; +@@ -1750,13 +1768,13 @@ DEFUN (show_ipv6_route_protocol, + struct rib *rib; + int first = 1; + +- if (strncmp (argv[0], "b", 1) == 0) ++ if (strncmp (argv[0], "bg", 2) == 0) + type = ZEBRA_ROUTE_BGP; + else if (strncmp (argv[0], "c", 1) == 0) + type = ZEBRA_ROUTE_CONNECT; + else if (strncmp (argv[0], "k", 1) ==0) + type = ZEBRA_ROUTE_KERNEL; +- else if (strncmp (argv[0], "o", 1) == 0) ++ else if (strncmp (argv[0], "os", 2) == 0) + type = ZEBRA_ROUTE_OSPF6; + else if (strncmp (argv[0], "i", 1) == 0) + type = ZEBRA_ROUTE_ISIS; +@@ -1764,7 +1782,11 @@ DEFUN (show_ipv6_route_protocol, + type = ZEBRA_ROUTE_RIPNG; + else if (strncmp (argv[0], "s", 1) == 0) + type = ZEBRA_ROUTE_STATIC; +- else ++ else if (strncmp (argv[0], "ol", 2) == 0) ++ type = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (argv[0], "ba", 2) == 0) ++ type = ZEBRA_ROUTE_BATMAN; ++ else + { + vty_out (vty, "Unknown route type%s", VTY_NEWLINE); + return CMD_WARNING; diff --git a/net/quagga/patches-old/100-confederation.patch b/net/quagga/patches-old/100-confederation.patch new file mode 100644 index 0000000..6a98653 --- /dev/null +++ b/net/quagga/patches-old/100-confederation.patch @@ -0,0 +1,18 @@ +--- a/bgpd/bgp_route.c ++++ b/bgpd/bgp_route.c +@@ -1815,6 +1815,7 @@ bgp_update_main (struct peer *peer, stru + if ((afi == AFI_IP || afi == AFI_IP6) + && safi == SAFI_UNICAST + && (peer_sort (peer) == BGP_PEER_IBGP ++ || peer_sort (peer) == BGP_PEER_CONFED + || (peer_sort (peer) == BGP_PEER_EBGP && peer->ttl != 1) + || CHECK_FLAG (peer->flags, PEER_FLAG_ENFORCE_MULTIHOP))) + { +@@ -1862,6 +1863,7 @@ bgp_update_main (struct peer *peer, stru + if ((afi == AFI_IP || afi == AFI_IP6) + && safi == SAFI_UNICAST + && (peer_sort (peer) == BGP_PEER_IBGP ++ || peer_sort (peer) == BGP_PEER_CONFED + || (peer_sort (peer) == BGP_PEER_EBGP && peer->ttl != 1) + || CHECK_FLAG (peer->flags, PEER_FLAG_ENFORCE_MULTIHOP))) + { diff --git a/net/quagga/patches-old/120-confed_errorhandle.patch b/net/quagga/patches-old/120-confed_errorhandle.patch new file mode 100644 index 0000000..a3cb65c --- /dev/null +++ b/net/quagga/patches-old/120-confed_errorhandle.patch @@ -0,0 +1,90 @@ +--- a/bgpd/bgp_aspath.c ++++ b/bgpd/bgp_aspath.c +@@ -614,6 +614,47 @@ aspath_private_as_check (struct aspath * + return 1; + } + ++/* AS path confed check. If aspath contains confed set or sequence then return 1. */ ++int ++aspath_confed_check (struct aspath *aspath) ++{ ++ caddr_t pnt; ++ caddr_t end; ++ struct assegment *assegment; ++ ++ if (aspath == NULL) ++ return 0; ++ ++ pnt = aspath->data; ++ end = aspath->data + aspath->length; ++ ++ while (pnt < end) ++ { ++ assegment = (struct assegment *) pnt; ++ if (assegment->type == AS_CONFED_SET || assegment->type == AS_CONFED_SEQUENCE) ++ return 1; ++ pnt += (assegment->length * AS_VALUE_SIZE) + AS_HEADER_SIZE; ++ } ++ return 0; ++} ++ ++/* Leftmost AS path segment confed check. If leftmost AS segment is of type ++ AS_CONFED_SEQUENCE or AS_CONFED_SET then return 1. */ ++int ++aspath_left_confed_check (struct aspath *aspath) ++{ ++ struct assegment *assegment; ++ ++ if (aspath == NULL) ++ return 0; ++ ++ assegment = (struct assegment *) aspath->data; ++ if (assegment->type == AS_CONFED_SEQUENCE || assegment->type == AS_CONFED_SET) ++ return 1; ++ ++ return 0; ++} ++ + /* Merge as1 to as2. as2 should be uninterned aspath. */ + struct aspath * + aspath_merge (struct aspath *as1, struct aspath *as2) +@@ -671,6 +712,10 @@ aspath_prepend (struct aspath *as1, stru + if (seg1 == NULL) + return as2; + ++ /* Delete any AS_CONFED_SEQUENCE segment from as2. */ ++ if (seg1->type == AS_SEQUENCE && seg2->type == AS_CONFED_SEQUENCE) ++ as2 = aspath_delete_confed_seq (as2); ++ + /* Compare last segment type of as1 and first segment type of as2. */ + if (seg1->type != seg2->type) + return aspath_merge (as1, as2); +--- a/bgpd/bgp_aspath.h ++++ b/bgpd/bgp_aspath.h +@@ -76,4 +76,6 @@ unsigned int aspath_key_make (struct asp + int aspath_loop_check (struct aspath *, as_t); + int aspath_private_as_check (struct aspath *); + int aspath_firstas_check (struct aspath *, as_t); ++int aspath_confed_check (struct aspath *); ++int aspath_left_confed_check (struct aspath *); + unsigned long aspath_count (); +--- a/bgpd/bgp_attr.c ++++ b/bgpd/bgp_attr.c +@@ -673,6 +673,17 @@ bgp_attr_aspath (struct peer *peer, bgp_ + return -1; + } + ++ /* Confederation sanity check. */ ++ if ((peer_sort (peer) == BGP_PEER_CONFED && ! aspath_left_confed_check (attr->aspath)) || ++ (peer_sort (peer) == BGP_PEER_EBGP && aspath_confed_check (attr->aspath))) ++ { ++ zlog (peer->log, LOG_ERR, "Malformed AS path from %s", peer->host); ++ bgp_notify_send (peer, ++ BGP_NOTIFY_UPDATE_ERR, ++ BGP_NOTIFY_UPDATE_MAL_AS_PATH); ++ return -1; ++ } ++ + bgp = peer->bgp; + + /* First AS check for EBGP. */ diff --git a/net/quagga/patches-old/130-netlink_ignore_wireless.patch b/net/quagga/patches-old/130-netlink_ignore_wireless.patch new file mode 100644 index 0000000..59315d6 --- /dev/null +++ b/net/quagga/patches-old/130-netlink_ignore_wireless.patch @@ -0,0 +1,38 @@ +--- a/zebra/rt_netlink.c ++++ b/zebra/rt_netlink.c +@@ -487,6 +487,17 @@ netlink_interface (struct sockaddr_nl *s + /* Looking up interface name. */ + memset (tb, 0, sizeof tb); + netlink_parse_rtattr (tb, IFLA_MAX, IFLA_RTA (ifi), len); ++ ++#ifdef IFLA_WIRELESS ++ /* check for wireless messages to ignore */ ++ if ((tb[IFLA_WIRELESS] != NULL) && (ifi->ifi_change == 0)) ++ { ++ if (IS_ZEBRA_DEBUG_KERNEL) ++ zlog_debug ("%s: ignoring IFLA_WIRELESS message", __func__); ++ return 0; ++ } ++#endif /* IFLA_WIRELESS */ ++ + if (tb[IFLA_IFNAME] == NULL) + return -1; + name = (char *) RTA_DATA (tb[IFLA_IFNAME]); +@@ -943,6 +954,17 @@ netlink_link_change (struct sockaddr_nl + /* Looking up interface name. */ + memset (tb, 0, sizeof tb); + netlink_parse_rtattr (tb, IFLA_MAX, IFLA_RTA (ifi), len); ++ ++#ifdef IFLA_WIRELESS ++ /* check for wireless messages to ignore */ ++ if ((tb[IFLA_WIRELESS] != NULL) && (ifi->ifi_change == 0)) ++ { ++ if (IS_ZEBRA_DEBUG_KERNEL) ++ zlog_debug ("%s: ignoring IFLA_WIRELESS message", __func__); ++ return 0; ++ } ++#endif /* IFLA_WIRELESS */ ++ + if (tb[IFLA_IFNAME] == NULL) + return -1; + name = (char *) RTA_DATA (tb[IFLA_IFNAME]); diff --git a/net/quagga/patches-old/140-holdtimer-set.patch b/net/quagga/patches-old/140-holdtimer-set.patch new file mode 100644 index 0000000..1264f5b --- /dev/null +++ b/net/quagga/patches-old/140-holdtimer-set.patch @@ -0,0 +1,20 @@ +--- a/bgpd/bgp_network.c ++++ b/bgpd/bgp_network.c +@@ -109,6 +109,7 @@ bgp_accept (struct thread *thread) + peer->fd = bgp_sock; + peer->status = Active; + peer->local_id = peer1->local_id; ++ peer->v_holdtime = BGP_LARGE_HOLDTIME; + + /* Make peer's address string. */ + sockunion2str (&su, buf, SU_ADDRSTRLEN); +--- a/bgpd/bgpd.h ++++ b/bgpd/bgpd.h +@@ -656,6 +656,7 @@ struct bgp_nlri + /* BGP timers default value. */ + #define BGP_INIT_START_TIMER 5 + #define BGP_ERROR_START_TIMER 30 ++#define BGP_LARGE_HOLDTIME 240 + #define BGP_DEFAULT_HOLDTIME 180 + #define BGP_DEFAULT_KEEPALIVE 60 + #define BGP_DEFAULT_ASORIGINATE 15 diff --git a/net/quagga/patches-old/150-no-cross-fs-link.patch b/net/quagga/patches-old/150-no-cross-fs-link.patch new file mode 100644 index 0000000..1988f2e --- /dev/null +++ b/net/quagga/patches-old/150-no-cross-fs-link.patch @@ -0,0 +1,40 @@ +--- a/lib/command.c ++++ b/lib/command.c +@@ -2567,6 +2567,13 @@ + unlink (config_file_tmp); + return CMD_WARNING; + } ++ ++#if 0 ++ /* This code fails on UNION MOUNTs and similar filesystems if the ++ * config file is still on the RO layer. Hardlinks across layers ++ * will not work and cause quagga to fail saving the configuration... ++ * should use rename() to move files around... ++ */ + if (link (config_file, config_file_sav) != 0) + { + vty_out (vty, "Can't backup old configuration file %s.%s", config_file_sav, +@@ -2586,7 +2593,23 @@ + unlink (config_file_tmp); + return CMD_WARNING; + } ++#else ++ /* And this is the code that hopefully does work */ ++ if (rename (config_file, config_file_sav) != 0) ++ { ++ vty_out (vty, "Can't backup old configuration file %s.%s", config_file_sav, ++ VTY_NEWLINE); ++ return CMD_WARNING; ++ } ++ sync (); ++#endif ++ ++#if 0 ++ /* same here. Please no cross-filesystem hardlinks... */ + if (link (config_file_tmp, config_file) != 0) ++#else ++ if (rename (config_file_tmp, config_file) != 0) ++#endif + { + vty_out (vty, "Can't save configuration file %s.%s", config_file, + VTY_NEWLINE); diff --git a/net/quagga/patches-old/170-use-supported-pagers.patch b/net/quagga/patches-old/170-use-supported-pagers.patch new file mode 100644 index 0000000..fca7fc4 --- /dev/null +++ b/net/quagga/patches-old/170-use-supported-pagers.patch @@ -0,0 +1,29 @@ +--- a/vtysh/vtysh.c ++++ b/vtysh/vtysh.c +@@ -243,7 +243,7 @@ vtysh_pager_init () + if (pager_defined) + vtysh_pager_name = strdup (pager_defined); + else +- vtysh_pager_name = strdup ("more"); ++ vtysh_pager_name = strdup ("cat"); + } + + /* Command execution over the vty interface. */ +@@ -1745,7 +1745,7 @@ DEFUN (vtysh_terminal_length, + { + int lines; + char *endptr = NULL; +- char default_pager[10]; ++ char default_pager[12]; + + lines = strtol (argv[0], &endptr, 10); + if (lines < 0 || lines > 512 || *endptr != '\0') +@@ -1762,7 +1762,7 @@ DEFUN (vtysh_terminal_length, + + if (lines != 0) + { +- snprintf(default_pager, 10, "more -%i", lines); ++ snprintf(default_pager, 12, "head -n %i", lines); + vtysh_pager_name = strdup (default_pager); + } + diff --git a/net/quagga/patches/010-fix-format-warnings.patch b/net/quagga/patches/010-fix-format-warnings.patch new file mode 100644 index 0000000..ac05e17 --- /dev/null +++ b/net/quagga/patches/010-fix-format-warnings.patch @@ -0,0 +1,22 @@ +--- a/lib/command.c ++++ b/lib/command.c +@@ -3056,7 +3056,7 @@ DEFUN (config_logmsg, + if ((level = level_match(argv[0])) == ZLOG_DISABLED) + return CMD_ERR_NO_MATCH; + +- zlog(NULL, level, ((message = argv_concat(argv, argc, 1)) ? message : "")); ++ zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, 1)) ? message : "")); + if (message) + XFREE(MTYPE_TMP, message); + return CMD_SUCCESS; +--- a/lib/if.c ++++ b/lib/if.c +@@ -664,7 +664,7 @@ connected_log (struct connected *connect + strncat (logbuf, inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ), + BUFSIZ - strlen(logbuf)); + } +- zlog (NULL, LOG_INFO, logbuf); ++ zlog (NULL, LOG_INFO, "%s", logbuf); + } + + /* If two connected address has same prefix return 1. */ diff --git a/net/quagga/patches/020-fix-ipv6-build-failure.patch b/net/quagga/patches/020-fix-ipv6-build-failure.patch new file mode 100644 index 0000000..6c3ac78 --- /dev/null +++ b/net/quagga/patches/020-fix-ipv6-build-failure.patch @@ -0,0 +1,31 @@ +--- a/bgpd/bgp_route.c ++++ b/bgpd/bgp_route.c +@@ -4327,6 +4327,7 @@ ALIAS_DEPRECATED (no_bgp_network_mask_na + "Specify a BGP backdoor route\n" + "AS-Path hopcount limit attribute\n" + "AS-Pathlimit TTL, in number of AS-Path hops\n") ++#ifdef HAVE_IPV6 + ALIAS_DEPRECATED (ipv6_bgp_network, + ipv6_bgp_network_ttl_cmd, + "network X:X::X:X/M pathlimit <0-255>", +@@ -4342,6 +4343,7 @@ ALIAS_DEPRECATED (no_ipv6_bgp_network, + "IPv6 prefix /\n" + "AS-Path hopcount limit attribute\n" + "AS-Pathlimit TTL, in number of AS-Path hops\n") ++#endif /* HAVE_IPV6 */ + + /* Aggreagete address: + +@@ -12133,9 +12135,11 @@ bgp_route_init (void) + install_element (BGP_IPV4M_NODE, &no_bgp_network_backdoor_ttl_cmd); + install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_backdoor_ttl_cmd); + install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_natural_backdoor_ttl_cmd); +- ++ ++#ifdef HAVE_IPV6 + install_element (BGP_IPV6_NODE, &ipv6_bgp_network_ttl_cmd); + install_element (BGP_IPV6_NODE, &no_ipv6_bgp_network_ttl_cmd); ++#endif + } + + void diff --git a/net/quagga/patches/030-fix-opaque-support.patch b/net/quagga/patches/030-fix-opaque-support.patch new file mode 100644 index 0000000..ba0081c --- /dev/null +++ b/net/quagga/patches/030-fix-opaque-support.patch @@ -0,0 +1,91 @@ +--- a/ospfd/ospf_lsa.h ++++ b/ospfd/ospf_lsa.h +@@ -114,6 +114,9 @@ struct ospf_lsa + + /* Refreshement List or Queue */ + int refresh_list; ++ ++ /* For Type-9 Opaque-LSAs */ ++ struct ospf_interface *oi; + }; + + /* OSPF LSA Link Type. */ +--- a/ospfd/ospf_nsm.c ++++ b/ospfd/ospf_nsm.c +@@ -216,7 +216,7 @@ ospf_db_summary_add (struct ospf_neighbo + { + case OSPF_OPAQUE_LINK_LSA: + /* Exclude type-9 LSAs that does not have the same "oi" with "nbr". */ +- if (lsa->oi != nbr->oi) ++ if (nbr->oi && ospf_if_exists (lsa->oi) != nbr->oi) + return 0; + break; + case OSPF_OPAQUE_AREA_LSA: +--- a/ospfd/ospf_opaque.c ++++ b/ospfd/ospf_opaque.c +@@ -251,7 +251,7 @@ struct ospf_opaque_functab + void (* config_write_debug )(struct vty *vty); + void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa); + int (* lsa_originator)(void *arg); +- void (* lsa_refresher )(struct ospf_lsa *lsa); ++ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa); + int (* new_lsa_hook)(struct ospf_lsa *lsa); + int (* del_lsa_hook)(struct ospf_lsa *lsa); + }; +@@ -354,7 +354,7 @@ ospf_register_opaque_functab ( + void (* config_write_debug )(struct vty *vty), + void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa), + int (* lsa_originator)(void *arg), +- void (* lsa_refresher )(struct ospf_lsa *lsa), ++ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa), + int (* new_lsa_hook)(struct ospf_lsa *lsa), + int (* del_lsa_hook)(struct ospf_lsa *lsa)) + { +@@ -1608,12 +1608,13 @@ out: + return new; + } + +-void ++struct ospf_lsa * + ospf_opaque_lsa_refresh (struct ospf_lsa *lsa) + { + struct ospf *ospf; + struct ospf_opaque_functab *functab; +- ++ struct ospf_lsa *new = NULL; ++ + ospf = ospf_lookup (); + + if ((functab = ospf_opaque_functab_lookup (lsa)) == NULL +@@ -1633,9 +1634,9 @@ ospf_opaque_lsa_refresh (struct ospf_lsa + ospf_lsa_flush (ospf, lsa); + } + else +- (* functab->lsa_refresher)(lsa); ++ new = (* functab->lsa_refresher)(lsa); + +- return; ++ return new; + } + + /*------------------------------------------------------------------------* +--- a/ospfd/ospf_opaque.h ++++ b/ospfd/ospf_opaque.h +@@ -120,7 +120,7 @@ ospf_register_opaque_functab ( + void (* config_write_debug )(struct vty *vty), + void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa), + int (* lsa_originator)(void *arg), +- void (* lsa_refresher )(struct ospf_lsa *lsa), ++ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa), + int (* new_lsa_hook)(struct ospf_lsa *lsa), + int (* del_lsa_hook)(struct ospf_lsa *lsa) + ); +@@ -143,7 +143,7 @@ extern void ospf_opaque_lsa_originate_sc + int *init_delay); + extern struct ospf_lsa *ospf_opaque_lsa_install (struct ospf_lsa *, + int rt_recalc); +-extern void ospf_opaque_lsa_refresh (struct ospf_lsa *lsa); ++extern struct ospf_lsa *ospf_opaque_lsa_refresh (struct ospf_lsa *lsa); + + extern void ospf_opaque_lsa_reoriginate_schedule (void *lsa_type_dependent, + u_char lsa_type, diff --git a/net/quagga/patches/110-fix_ipctl_forwarding.patch b/net/quagga/patches/110-fix_ipctl_forwarding.patch new file mode 100644 index 0000000..d757312 --- /dev/null +++ b/net/quagga/patches/110-fix_ipctl_forwarding.patch @@ -0,0 +1,25 @@ +Add definitions for IPCTL_FORWARDING and IP6CTL_FORWARDING. + +Inspired from +http://svn.gnumonks.org/trunk/grouter/build/src/quagga/quagga/quagga-0.99.1-forward_sysctl-2.6.14.patch + +Signed-off-by: Thomas Petazzoni + +--- a/zebra/ipforward_sysctl.c ++++ b/zebra/ipforward_sysctl.c +@@ -31,6 +31,15 @@ + + #define MIB_SIZ 4 + ++/* Fix for recent (2.6.14) kernel headers */ ++#ifndef IPCTL_FORWARDING ++#define IPCTL_FORWARDING NET_IPV4_FORWARD ++#endif ++ ++#ifndef IP6CTL_FORWARDING ++#define IP6CTL_FORWARDING NET_IPV6_FORWARDING ++#endif ++ + extern struct zebra_privs_t zserv_privs; + + /* IPv4 forwarding control MIB. */ diff --git a/net/quagga/patches/120-quagga_manet.patch b/net/quagga/patches/120-quagga_manet.patch new file mode 100644 index 0000000..c32af31 --- /dev/null +++ b/net/quagga/patches/120-quagga_manet.patch @@ -0,0 +1,845 @@ +--- a/bgpd/bgp_vty.c ++++ b/bgpd/bgp_vty.c +@@ -8228,8 +8228,14 @@ bgp_str2route_type (int afi, const char + return ZEBRA_ROUTE_STATIC; + else if (strncmp (str, "r", 1) == 0) + return ZEBRA_ROUTE_RIP; +- else if (strncmp (str, "o", 1) == 0) ++ else if (strncmp (str, "os", 2) == 0) + return ZEBRA_ROUTE_OSPF; ++ else if (strncmp (str, "h", 1) == 0) ++ return ZEBRA_ROUTE_HSLS; ++ else if (strncmp (str, "ol", 2) == 0) ++ return ZEBRA_ROUTE_OLSR; ++ else if (strncmp (str, "b", 1) == 0) ++ return ZEBRA_ROUTE_BATMAN; + } + if (afi == AFI_IP6) + { +@@ -8241,21 +8247,30 @@ bgp_str2route_type (int afi, const char + return ZEBRA_ROUTE_STATIC; + else if (strncmp (str, "r", 1) == 0) + return ZEBRA_ROUTE_RIPNG; +- else if (strncmp (str, "o", 1) == 0) ++ else if (strncmp (str, "os", 2) == 0) + return ZEBRA_ROUTE_OSPF6; ++ else if (strncmp (str, "h", 1) == 0) ++ return ZEBRA_ROUTE_HSLS; ++ else if (strncmp (str, "ol", 2) == 0) ++ return ZEBRA_ROUTE_OLSR; ++ else if (strncmp (str, "b", 1) == 0) ++ return ZEBRA_ROUTE_BATMAN; + } + return 0; + } + + DEFUN (bgp_redistribute_ipv4, + bgp_redistribute_ipv4_cmd, +- "redistribute (connected|kernel|ospf|rip|static)", ++ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman)", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" +- "Static routes\n") ++ "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n") + { + int type; + +@@ -8270,13 +8285,16 @@ DEFUN (bgp_redistribute_ipv4, + + DEFUN (bgp_redistribute_ipv4_rmap, + bgp_redistribute_ipv4_rmap_cmd, +- "redistribute (connected|kernel|ospf|rip|static) route-map WORD", ++ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -8295,13 +8313,16 @@ DEFUN (bgp_redistribute_ipv4_rmap, + + DEFUN (bgp_redistribute_ipv4_metric, + bgp_redistribute_ipv4_metric_cmd, +- "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295>", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n") + { +@@ -8322,13 +8343,16 @@ DEFUN (bgp_redistribute_ipv4_metric, + + DEFUN (bgp_redistribute_ipv4_rmap_metric, + bgp_redistribute_ipv4_rmap_metric_cmd, +- "redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n" + "Metric for redistributed routes\n" +@@ -8352,13 +8376,16 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric + + DEFUN (bgp_redistribute_ipv4_metric_rmap, + bgp_redistribute_ipv4_metric_rmap_cmd, +- "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD", ++ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n" + "Route map reference\n" +@@ -8382,14 +8409,17 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap + + DEFUN (no_bgp_redistribute_ipv4, + no_bgp_redistribute_ipv4_cmd, +- "no redistribute (connected|kernel|ospf|rip|static)", ++ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman)", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" +- "Static routes\n") ++ "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n") + { + int type; + +@@ -8405,7 +8435,7 @@ DEFUN (no_bgp_redistribute_ipv4, + + DEFUN (no_bgp_redistribute_ipv4_rmap, + no_bgp_redistribute_ipv4_rmap_cmd, +- "no redistribute (connected|kernel|ospf|rip|static) route-map WORD", ++ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8413,6 +8443,9 @@ DEFUN (no_bgp_redistribute_ipv4_rmap, + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -8431,7 +8464,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap, + + DEFUN (no_bgp_redistribute_ipv4_metric, + no_bgp_redistribute_ipv4_metric_cmd, +- "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295>", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8439,6 +8472,9 @@ DEFUN (no_bgp_redistribute_ipv4_metric, + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n") + { +@@ -8457,7 +8493,7 @@ DEFUN (no_bgp_redistribute_ipv4_metric, + + DEFUN (no_bgp_redistribute_ipv4_rmap_metric, + no_bgp_redistribute_ipv4_rmap_metric_cmd, +- "no redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8465,6 +8501,9 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n" + "Metric for redistributed routes\n" +@@ -8486,7 +8525,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met + + ALIAS (no_bgp_redistribute_ipv4_rmap_metric, + no_bgp_redistribute_ipv4_metric_rmap_cmd, +- "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD", ++ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8494,6 +8533,9 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met + "Open Shurtest Path First (OSPF)\n" + "Routing Information Protocol (RIP)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n" + "Route map reference\n" +@@ -8502,13 +8544,16 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met + #ifdef HAVE_IPV6 + DEFUN (bgp_redistribute_ipv6, + bgp_redistribute_ipv6_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static)", ++ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman)", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" +- "Static routes\n") ++ "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n") + { + int type; + +@@ -8524,13 +8569,16 @@ DEFUN (bgp_redistribute_ipv6, + + DEFUN (bgp_redistribute_ipv6_rmap, + bgp_redistribute_ipv6_rmap_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD", ++ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -8549,13 +8597,16 @@ DEFUN (bgp_redistribute_ipv6_rmap, + + DEFUN (bgp_redistribute_ipv6_metric, + bgp_redistribute_ipv6_metric_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295>", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n") + { +@@ -8576,13 +8627,16 @@ DEFUN (bgp_redistribute_ipv6_metric, + + DEFUN (bgp_redistribute_ipv6_rmap_metric, + bgp_redistribute_ipv6_rmap_metric_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>", ++ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n" + "Metric for redistributed routes\n" +@@ -8606,13 +8660,16 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric + + DEFUN (bgp_redistribute_ipv6_metric_rmap, + bgp_redistribute_ipv6_metric_rmap_cmd, +- "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD", ++ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD", + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n" + "Route map reference\n" +@@ -8636,14 +8693,17 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap + + DEFUN (no_bgp_redistribute_ipv6, + no_bgp_redistribute_ipv6_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static)", ++ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman)", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" + "Kernel routes\n" + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" +- "Static routes\n") ++ "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n") + { + int type; + +@@ -8659,7 +8719,7 @@ DEFUN (no_bgp_redistribute_ipv6, + + DEFUN (no_bgp_redistribute_ipv6_rmap, + no_bgp_redistribute_ipv6_rmap_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD", ++ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8667,6 +8727,9 @@ DEFUN (no_bgp_redistribute_ipv6_rmap, + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n") + { +@@ -8685,7 +8748,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap, + + DEFUN (no_bgp_redistribute_ipv6_metric, + no_bgp_redistribute_ipv6_metric_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295>", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8693,6 +8756,9 @@ DEFUN (no_bgp_redistribute_ipv6_metric, + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n") + { +@@ -8711,7 +8777,7 @@ DEFUN (no_bgp_redistribute_ipv6_metric, + + DEFUN (no_bgp_redistribute_ipv6_rmap_metric, + no_bgp_redistribute_ipv6_rmap_metric_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>", ++ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8719,6 +8785,9 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Route map reference\n" + "Pointer to route-map entries\n" + "Metric for redistributed routes\n" +@@ -8740,7 +8809,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met + + ALIAS (no_bgp_redistribute_ipv6_rmap_metric, + no_bgp_redistribute_ipv6_metric_rmap_cmd, +- "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD", ++ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD", + NO_STR + "Redistribute information from another routing protocol\n" + "Connected\n" +@@ -8748,6 +8817,9 @@ ALIAS (no_bgp_redistribute_ipv6_rmap_met + "Open Shurtest Path First (OSPFv3)\n" + "Routing Information Protocol (RIPng)\n" + "Static routes\n" ++ "Hazy-Sighted Link State Protocol (HSLS)\n" ++ "Optimized Link State Routing (OLSR)\n" ++ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n" + "Metric for redistributed routes\n" + "Default metric\n" + "Route map reference\n" +--- a/lib/log.c ++++ b/lib/log.c +@@ -838,6 +838,8 @@ static const struct zebra_desc_table rou + DESC_ENTRY (ZEBRA_ROUTE_ISIS, "isis", 'I' ), + DESC_ENTRY (ZEBRA_ROUTE_BGP, "bgp", 'B' ), + DESC_ENTRY (ZEBRA_ROUTE_HSLS, "hsls", 'H' ), ++ DESC_ENTRY (ZEBRA_ROUTE_OLSR, "olsr", 'o' ), ++ DESC_ENTRY (ZEBRA_ROUTE_BATMAN, "batman", 'b' ), + }; + #undef DESC_ENTRY + +--- a/lib/route_types.txt ++++ b/lib/route_types.txt +@@ -51,13 +51,9 @@ ZEBRA_ROUTE_OSPF, ospf, ospfd + ZEBRA_ROUTE_OSPF6, ospf6, ospf6d, 'O', 0, 1, "OSPF" + ZEBRA_ROUTE_ISIS, isis, isisd, 'I', 1, 1, "IS-IS" + ZEBRA_ROUTE_BGP, bgp, bgpd, 'B', 1, 1, "BGP" +-# HSLS and OLSR both are AFI independent (so: 1, 1), however +-# we want to disable for them for general Quagga distribution. +-# This at least makes it trivial for users of these protocols +-# to 'switch on' redist support (direct numeric entry remaining +-# possible). +-ZEBRA_ROUTE_HSLS, hsls, hslsd, 'H', 0, 0, "HSLS" +-ZEBRA_ROUTE_OLSR, olsr, oslrd, 'o', 0, 0, "OLSR" ++ZEBRA_ROUTE_HSLS, hsls, hslsd, 'H', 1, 1, "HSLS" ++ZEBRA_ROUTE_OLSR, olsr, olsrd, 'o', 1, 1, "OLSR" ++ZEBRA_ROUTE_BATMAN, batman, batmand,'b', 1, 1, "BATMAN" + + ## help strings + ZEBRA_ROUTE_SYSTEM, "Reserved route type, for internal use only" +@@ -71,4 +67,5 @@ ZEBRA_ROUTE_OSPF6, "Open Shortest Path + ZEBRA_ROUTE_ISIS, "Intermediate System to Intermediate System (IS-IS)" + ZEBRA_ROUTE_BGP, "Border Gateway Protocol (BGP)" + ZEBRA_ROUTE_HSLS, "Hazy-Sighted Link State Protocol (HSLS)" +-ZEBRA_ROUTE_OLSR, "Optimised Link State Routing (OLSR)" ++ZEBRA_ROUTE_OLSR, "Optimized Link State Routing (OLSR)" ++ZEBRA_ROUTE_BATMAN, "Better Approach to Mobile Ad-Hoc Networking (BATMAN)" +--- a/lib/zebra.h ++++ b/lib/zebra.h +@@ -441,7 +441,9 @@ struct in_pktinfo + #define ZEBRA_ROUTE_ISIS 8 + #define ZEBRA_ROUTE_BGP 9 + #define ZEBRA_ROUTE_HSLS 10 +-#define ZEBRA_ROUTE_MAX 11 ++#define ZEBRA_ROUTE_OLSR 11 ++#define ZEBRA_ROUTE_BATMAN 12 ++#define ZEBRA_ROUTE_MAX 13 + + /* Note: whenever a new route-type or zserv-command is added the + * corresponding {command,route}_types[] table in lib/log.c MUST be +--- a/ospf6d/ospf6_asbr.c ++++ b/ospf6d/ospf6_asbr.c +@@ -616,13 +616,16 @@ ospf6_asbr_redistribute_remove (int type + + DEFUN (ospf6_redistribute, + ospf6_redistribute_cmd, +- "redistribute (static|kernel|connected|ripng|bgp)", ++ "redistribute (static|kernel|connected|ripng|bgp|hsls|olsr|batman)", + "Redistribute\n" + "Static route\n" + "Kernel route\n" + "Connected route\n" + "RIPng route\n" + "BGP route\n" ++ "HSLS route\n" ++ "OLSR route\n" ++ "BATMAN route\n" + ) + { + int type = 0; +@@ -637,6 +640,12 @@ DEFUN (ospf6_redistribute, + type = ZEBRA_ROUTE_RIPNG; + else if (strncmp (argv[0], "bgp", 3) == 0) + type = ZEBRA_ROUTE_BGP; ++ else if (strncmp (argv[0], "h", 1) == 0) ++ type = ZEBRA_ROUTE_HSLS; ++ else if (strncmp (argv[0], "o", 1) == 0) ++ type = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (argv[0], "ba", 2) == 0) ++ type = ZEBRA_ROUTE_BATMAN; + + ospf6_asbr_redistribute_unset (type); + ospf6_asbr_routemap_unset (type); +@@ -646,13 +655,16 @@ DEFUN (ospf6_redistribute, + + DEFUN (ospf6_redistribute_routemap, + ospf6_redistribute_routemap_cmd, +- "redistribute (static|kernel|connected|ripng|bgp) route-map WORD", ++ "redistribute (static|kernel|connected|ripng|bgp|hsls|olsr|batman) route-map WORD", + "Redistribute\n" + "Static routes\n" + "Kernel route\n" + "Connected route\n" + "RIPng route\n" + "BGP route\n" ++ "HSLS route\n" ++ "OLSR route\n" ++ "BATMAN route\n" + "Route map reference\n" + "Route map name\n" + ) +@@ -669,6 +681,12 @@ DEFUN (ospf6_redistribute_routemap, + type = ZEBRA_ROUTE_RIPNG; + else if (strncmp (argv[0], "bgp", 3) == 0) + type = ZEBRA_ROUTE_BGP; ++ else if (strncmp (argv[0], "h", 1) == 0) ++ type = ZEBRA_ROUTE_HSLS; ++ else if (strncmp (argv[0], "o", 1) == 0) ++ type = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (argv[0], "ba", 2) == 0) ++ type = ZEBRA_ROUTE_BATMAN; + + ospf6_asbr_redistribute_unset (type); + ospf6_asbr_routemap_set (type, argv[1]); +@@ -678,7 +696,7 @@ DEFUN (ospf6_redistribute_routemap, + + DEFUN (no_ospf6_redistribute, + no_ospf6_redistribute_cmd, +- "no redistribute (static|kernel|connected|ripng|bgp)", ++ "no redistribute (static|kernel|connected|ripng|bgp|hsls|olsr|batman)", + NO_STR + "Redistribute\n" + "Static route\n" +@@ -686,6 +704,9 @@ DEFUN (no_ospf6_redistribute, + "Connected route\n" + "RIPng route\n" + "BGP route\n" ++ "HSLS route\n" ++ "OLSR route\n" ++ "BATMAN route\n" + ) + { + int type = 0; +@@ -700,6 +721,12 @@ DEFUN (no_ospf6_redistribute, + type = ZEBRA_ROUTE_RIPNG; + else if (strncmp (argv[0], "bgp", 3) == 0) + type = ZEBRA_ROUTE_BGP; ++ else if (strncmp (argv[0], "h", 1) == 0) ++ type = ZEBRA_ROUTE_HSLS; ++ else if (strncmp (argv[0], "o", 1) == 0) ++ type = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (argv[0], "ba", 2) == 0) ++ type = ZEBRA_ROUTE_BATMAN; + + ospf6_asbr_redistribute_unset (type); + ospf6_asbr_routemap_unset (type); +--- a/ospfd/ospf_vty.c ++++ b/ospfd/ospf_vty.c +@@ -107,8 +107,14 @@ str2distribute_source (const char *str, + *source = ZEBRA_ROUTE_STATIC; + else if (strncmp (str, "r", 1) == 0) + *source = ZEBRA_ROUTE_RIP; +- else if (strncmp (str, "b", 1) == 0) ++ else if (strncmp (str, "bg", 2) == 0) + *source = ZEBRA_ROUTE_BGP; ++ else if (strncmp (str, "h", 1) == 0) ++ *source = ZEBRA_ROUTE_HSLS; ++ else if (strncmp (str, "o", 1) == 0) ++ *source = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (str, "ba", 2) == 0) ++ *source = ZEBRA_ROUTE_BATMAN; + else + return 0; + +--- a/ripd/rip_zebra.c ++++ b/ripd/rip_zebra.c +@@ -204,8 +204,11 @@ static struct { + {ZEBRA_ROUTE_KERNEL, 1, "kernel"}, + {ZEBRA_ROUTE_CONNECT, 1, "connected"}, + {ZEBRA_ROUTE_STATIC, 1, "static"}, +- {ZEBRA_ROUTE_OSPF, 1, "ospf"}, +- {ZEBRA_ROUTE_BGP, 1, "bgp"}, ++ {ZEBRA_ROUTE_OSPF, 2, "ospf"}, ++ {ZEBRA_ROUTE_BGP, 2, "bgp"}, ++ {ZEBRA_ROUTE_HSLS, 1, "hsls"}, ++ {ZEBRA_ROUTE_OLSR, 2, "olsr"}, ++ {ZEBRA_ROUTE_BATMAN, 2, "batman"}, + {0, 0, NULL} + }; + +--- a/ripngd/ripng_zebra.c ++++ b/ripngd/ripng_zebra.c +@@ -214,8 +214,11 @@ static struct { + {ZEBRA_ROUTE_KERNEL, 1, "kernel"}, + {ZEBRA_ROUTE_CONNECT, 1, "connected"}, + {ZEBRA_ROUTE_STATIC, 1, "static"}, +- {ZEBRA_ROUTE_OSPF6, 1, "ospf6"}, +- {ZEBRA_ROUTE_BGP, 1, "bgp"}, ++ {ZEBRA_ROUTE_OSPF6, 2, "ospf6"}, ++ {ZEBRA_ROUTE_BGP, 2, "bgp"}, ++ {ZEBRA_ROUTE_HSLS, 1, "hsls"}, ++ {ZEBRA_ROUTE_OLSR, 2, "olsr"}, ++ {ZEBRA_ROUTE_BATMAN, 2, "batman"}, + {0, 0, NULL} + }; + +--- a/zebra/redistribute.c ++++ b/zebra/redistribute.c +@@ -255,6 +255,9 @@ zebra_redistribute_add (int command, str + case ZEBRA_ROUTE_OSPF: + case ZEBRA_ROUTE_OSPF6: + case ZEBRA_ROUTE_BGP: ++ case ZEBRA_ROUTE_HSLS: ++ case ZEBRA_ROUTE_OLSR: ++ case ZEBRA_ROUTE_BATMAN: + if (! client->redist[type]) + { + client->redist[type] = 1; +@@ -283,6 +286,9 @@ zebra_redistribute_delete (int command, + case ZEBRA_ROUTE_OSPF: + case ZEBRA_ROUTE_OSPF6: + case ZEBRA_ROUTE_BGP: ++ case ZEBRA_ROUTE_HSLS: ++ case ZEBRA_ROUTE_OLSR: ++ case ZEBRA_ROUTE_BATMAN: + client->redist[type] = 0; + break; + default: +--- a/zebra/zebra_rib.c ++++ b/zebra/zebra_rib.c +@@ -66,7 +66,10 @@ static const struct + {ZEBRA_ROUTE_OSPF, 110}, + {ZEBRA_ROUTE_OSPF6, 110}, + {ZEBRA_ROUTE_ISIS, 115}, +- {ZEBRA_ROUTE_BGP, 20 /* IBGP is 200. */} ++ {ZEBRA_ROUTE_BGP, 20 /* IBGP is 200. */}, ++ {ZEBRA_ROUTE_HSLS, 0}, ++ {ZEBRA_ROUTE_OLSR, 0}, ++ {ZEBRA_ROUTE_BATMAN, 0} + }; + + /* Vector for routing table. */ +@@ -1229,6 +1232,8 @@ static const u_char meta_queue_map[ZEBRA + [ZEBRA_ROUTE_ISIS] = 2, + [ZEBRA_ROUTE_BGP] = 3, + [ZEBRA_ROUTE_HSLS] = 4, ++ [ZEBRA_ROUTE_OLSR] = 4, ++ [ZEBRA_ROUTE_BATMAN] = 4, + }; + + /* Look into the RN and queue it into one or more priority queues, +--- a/zebra/zebra_snmp.c ++++ b/zebra/zebra_snmp.c +@@ -251,6 +251,12 @@ proto_trans(int type) + return 1; /* shouldn't happen */ + case ZEBRA_ROUTE_BGP: + return 14; /* bgp */ ++ case ZEBRA_ROUTE_HSLS: ++ return 1; /* other */ ++ case ZEBRA_ROUTE_OLSR: ++ return 1; /* other */ ++ case ZEBRA_ROUTE_BATMAN: ++ return 1; /* other */ + default: + return 1; /* other */ + } +--- a/zebra/zebra_vty.c ++++ b/zebra/zebra_vty.c +@@ -557,7 +557,10 @@ vty_show_ip_route_detail (struct vty *vt + if (rib->type == ZEBRA_ROUTE_RIP + || rib->type == ZEBRA_ROUTE_OSPF + || rib->type == ZEBRA_ROUTE_ISIS +- || rib->type == ZEBRA_ROUTE_BGP) ++ || rib->type == ZEBRA_ROUTE_BGP ++ || rib->type == ZEBRA_ROUTE_HSLS ++ || rib->type == ZEBRA_ROUTE_OLSR ++ || rib->type == ZEBRA_ROUTE_BATMAN) + { + time_t uptime; + struct tm *tm; +@@ -775,7 +778,10 @@ vty_show_ip_route (struct vty *vty, stru + if (rib->type == ZEBRA_ROUTE_RIP + || rib->type == ZEBRA_ROUTE_OSPF + || rib->type == ZEBRA_ROUTE_ISIS +- || rib->type == ZEBRA_ROUTE_BGP) ++ || rib->type == ZEBRA_ROUTE_BGP ++ || rib->type == ZEBRA_ROUTE_HSLS ++ || rib->type == ZEBRA_ROUTE_OLSR ++ || rib->type == ZEBRA_ROUTE_BATMAN) + { + time_t uptime; + struct tm *tm; +@@ -803,8 +809,8 @@ vty_show_ip_route (struct vty *vty, stru + } + + #define SHOW_ROUTE_V4_HEADER "Codes: K - kernel route, C - connected, " \ +- "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, " \ +- "> - selected route, * - FIB route%s%s" ++ "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, H - HSLS, " \ ++ "o - OLSR, b - BATMAN,%s > - selected route, * - FIB route%s%s" + + DEFUN (show_ip_route, + show_ip_route_cmd, +@@ -829,7 +835,7 @@ DEFUN (show_ip_route, + if (first) + { + vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE, VTY_NEWLINE, +- VTY_NEWLINE); ++ VTY_NEWLINE, VTY_NEWLINE); + first = 0; + } + vty_show_ip_route (vty, rn, rib); +@@ -872,7 +878,7 @@ DEFUN (show_ip_route_prefix_longer, + if (first) + { + vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE, +- VTY_NEWLINE, VTY_NEWLINE); ++ VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); + first = 0; + } + vty_show_ip_route (vty, rn, rib); +@@ -911,7 +917,7 @@ DEFUN (show_ip_route_supernets, + if (first) + { + vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE, +- VTY_NEWLINE, VTY_NEWLINE); ++ VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); + first = 0; + } + vty_show_ip_route (vty, rn, rib); +@@ -922,7 +928,7 @@ DEFUN (show_ip_route_supernets, + + DEFUN (show_ip_route_protocol, + show_ip_route_protocol_cmd, +- "show ip route (bgp|connected|isis|kernel|ospf|rip|static)", ++ "show ip route (bgp|connected|isis|kernel|ospf|rip|static|hsls|olsr|batman)", + SHOW_STR + IP_STR + "IP routing table\n" +@@ -940,13 +946,13 @@ DEFUN (show_ip_route_protocol, + struct rib *rib; + int first = 1; + +- if (strncmp (argv[0], "b", 1) == 0) ++ if (strncmp (argv[0], "bg", 2) == 0) + type = ZEBRA_ROUTE_BGP; + else if (strncmp (argv[0], "c", 1) == 0) + type = ZEBRA_ROUTE_CONNECT; + else if (strncmp (argv[0], "k", 1) ==0) + type = ZEBRA_ROUTE_KERNEL; +- else if (strncmp (argv[0], "o", 1) == 0) ++ else if (strncmp (argv[0], "os", 2) == 0) + type = ZEBRA_ROUTE_OSPF; + else if (strncmp (argv[0], "i", 1) == 0) + type = ZEBRA_ROUTE_ISIS; +@@ -954,6 +960,12 @@ DEFUN (show_ip_route_protocol, + type = ZEBRA_ROUTE_RIP; + else if (strncmp (argv[0], "s", 1) == 0) + type = ZEBRA_ROUTE_STATIC; ++ else if (strncmp (argv[0], "h", 1) == 0) ++ type = ZEBRA_ROUTE_HSLS; ++ else if (strncmp (argv[0], "ol", 2) == 0) ++ type = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (argv[0], "ba", 2) == 0) ++ type = ZEBRA_ROUTE_BATMAN; + else + { + vty_out (vty, "Unknown route type%s", VTY_NEWLINE); +@@ -971,7 +983,7 @@ DEFUN (show_ip_route_protocol, + { + if (first) + { +- vty_out (vty, SHOW_ROUTE_V4_HEADER, ++ vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE, + VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); + first = 0; + } +@@ -1560,7 +1572,10 @@ vty_show_ipv6_route_detail (struct vty * + if (rib->type == ZEBRA_ROUTE_RIPNG + || rib->type == ZEBRA_ROUTE_OSPF6 + || rib->type == ZEBRA_ROUTE_ISIS +- || rib->type == ZEBRA_ROUTE_BGP) ++ || rib->type == ZEBRA_ROUTE_BGP ++ || rib->type == ZEBRA_ROUTE_HSLS ++ || rib->type == ZEBRA_ROUTE_OLSR ++ || rib->type == ZEBRA_ROUTE_BATMAN) + { + time_t uptime; + struct tm *tm; +@@ -1739,7 +1754,10 @@ vty_show_ipv6_route (struct vty *vty, st + if (rib->type == ZEBRA_ROUTE_RIPNG + || rib->type == ZEBRA_ROUTE_OSPF6 + || rib->type == ZEBRA_ROUTE_ISIS +- || rib->type == ZEBRA_ROUTE_BGP) ++ || rib->type == ZEBRA_ROUTE_BGP ++ || rib->type == ZEBRA_ROUTE_HSLS ++ || rib->type == ZEBRA_ROUTE_OLSR ++ || rib->type == ZEBRA_ROUTE_BATMAN) + { + time_t uptime; + struct tm *tm; +@@ -1766,7 +1784,7 @@ vty_show_ipv6_route (struct vty *vty, st + } + } + +-#define SHOW_ROUTE_V6_HEADER "Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv3,%s I - ISIS, B - BGP, * - FIB route.%s%s" ++#define SHOW_ROUTE_V6_HEADER "Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv3,%s I - ISIS, B - BGP, H - HSLS, o - OLSR, b - BATMAN, * - FIB route.%s%s" + + DEFUN (show_ipv6_route, + show_ipv6_route_cmd, +@@ -1842,7 +1860,7 @@ DEFUN (show_ipv6_route_prefix_longer, + + DEFUN (show_ipv6_route_protocol, + show_ipv6_route_protocol_cmd, +- "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|static)", ++ "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|static|hsls|olsr|batman)", + SHOW_STR + IP_STR + "IP routing table\n" +@@ -1860,13 +1878,13 @@ DEFUN (show_ipv6_route_protocol, + struct rib *rib; + int first = 1; + +- if (strncmp (argv[0], "b", 1) == 0) ++ if (strncmp (argv[0], "bg", 2) == 0) + type = ZEBRA_ROUTE_BGP; + else if (strncmp (argv[0], "c", 1) == 0) + type = ZEBRA_ROUTE_CONNECT; + else if (strncmp (argv[0], "k", 1) ==0) + type = ZEBRA_ROUTE_KERNEL; +- else if (strncmp (argv[0], "o", 1) == 0) ++ else if (strncmp (argv[0], "os", 2) == 0) + type = ZEBRA_ROUTE_OSPF6; + else if (strncmp (argv[0], "i", 1) == 0) + type = ZEBRA_ROUTE_ISIS; +@@ -1874,6 +1892,12 @@ DEFUN (show_ipv6_route_protocol, + type = ZEBRA_ROUTE_RIPNG; + else if (strncmp (argv[0], "s", 1) == 0) + type = ZEBRA_ROUTE_STATIC; ++ else if (strncmp (argv[0], "h", 1) == 0) ++ type = ZEBRA_ROUTE_HSLS; ++ else if (strncmp (argv[0], "ol", 2) == 0) ++ type = ZEBRA_ROUTE_OLSR; ++ else if (strncmp (argv[0], "ba", 2) == 0) ++ type = ZEBRA_ROUTE_BATMAN; + else + { + vty_out (vty, "Unknown route type%s", VTY_NEWLINE); diff --git a/net/quagga/patches/130-fix_cpp.patch b/net/quagga/patches/130-fix_cpp.patch new file mode 100644 index 0000000..3660bf8 --- /dev/null +++ b/net/quagga/patches/130-fix_cpp.patch @@ -0,0 +1,11 @@ +--- a/vtysh/extract.pl.in ++++ b/vtysh/extract.pl.in +@@ -62,7 +62,7 @@ $ignore{'"show history"'} = "ignore"; + foreach (@ARGV) { + $file = $_; + +- open (FH, "cpp -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -DHAVE_IPV6 -I@top_builddir@ -I@srcdir@/ -I@srcdir@/.. -I@top_srcdir@/lib -I@top_srcdir@/isisd/topology @SNMP_INCLUDES@ $file |"); ++ open (FH, "@CPP@ @CPPFLAGS@ -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -DHAVE_IPV6 -I@top_builddir@ -I@srcdir@/ -I@srcdir@/.. -I@top_srcdir@/lib -I@top_srcdir@/isisd/topology @SNMP_INCLUDES@ $file |"); + local $/; undef $/; + $line = ; + close (FH); diff --git a/net/quagga/patches/140-holdtimer-set.patch b/net/quagga/patches/140-holdtimer-set.patch new file mode 100644 index 0000000..8642bbf --- /dev/null +++ b/net/quagga/patches/140-holdtimer-set.patch @@ -0,0 +1,22 @@ +--- a/bgpd/bgp_network.c ++++ b/bgpd/bgp_network.c +@@ -188,8 +188,7 @@ bgp_accept (struct thread *thread) + peer->fd = bgp_sock; + peer->status = Active; + peer->local_id = peer1->local_id; +- peer->v_holdtime = peer1->v_holdtime; +- peer->v_keepalive = peer1->v_keepalive; ++ peer->v_holdtime = BGP_LARGE_HOLDTIME; + + /* Make peer's address string. */ + sockunion2str (&su, buf, SU_ADDRSTRLEN); +--- a/bgpd/bgpd.h ++++ b/bgpd/bgpd.h +@@ -709,6 +709,7 @@ struct bgp_nlri + /* BGP timers default value. */ + #define BGP_INIT_START_TIMER 5 + #define BGP_ERROR_START_TIMER 30 ++#define BGP_LARGE_HOLDTIME 240 + #define BGP_DEFAULT_HOLDTIME 180 + #define BGP_DEFAULT_KEEPALIVE 60 + #define BGP_DEFAULT_ASORIGINATE 15 diff --git a/net/quagga/patches/150-no-cross-fs-link.patch b/net/quagga/patches/150-no-cross-fs-link.patch new file mode 100644 index 0000000..c3f29c3 --- /dev/null +++ b/net/quagga/patches/150-no-cross-fs-link.patch @@ -0,0 +1,40 @@ +--- a/lib/command.c ++++ b/lib/command.c +@@ -2601,6 +2601,13 @@ DEFUN (config_write_file, + VTY_NEWLINE); + goto finished; + } ++ ++#if 0 ++ /* This code fails on UNION MOUNTs and similar filesystems if the ++ * config file is still on the RO layer. Hardlinks across layers ++ * will not work and cause quagga to fail saving the configuration... ++ * should use rename() to move files around... ++ */ + if (link (config_file, config_file_sav) != 0) + { + vty_out (vty, "Can't backup old configuration file %s.%s", config_file_sav, +@@ -2614,7 +2621,23 @@ DEFUN (config_write_file, + VTY_NEWLINE); + goto finished; + } ++#else ++ /* And this is the code that hopefully does work */ ++ if (rename (config_file, config_file_sav) != 0) ++ { ++ vty_out (vty, "Can't backup old configuration file %s.%s", config_file_sav, ++ VTY_NEWLINE); ++ goto finished; ++ } ++ sync (); ++#endif ++ ++#if 0 ++ /* same here. Please no cross-filesystem hardlinks... */ + if (link (config_file_tmp, config_file) != 0) ++#else ++ if (rename (config_file_tmp, config_file) != 0) ++#endif + { + vty_out (vty, "Can't save configuration file %s.%s", config_file, + VTY_NEWLINE); diff --git a/net/quagga/patches/160-pgbgp.patch b/net/quagga/patches/160-pgbgp.patch new file mode 100644 index 0000000..c88ba98 --- /dev/null +++ b/net/quagga/patches/160-pgbgp.patch @@ -0,0 +1,3095 @@ +From: Josh Karlin +Date: Mon, 18 Aug 2008 13:17:21 +0000 (+0100) +Subject: [bgp] Add support for Pretty-Good BGP +X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705cad607f4b86ff143f7af92d538dc946 + +[bgp] Add support for Pretty-Good BGP + +2008-7-7 Josh Karlin + + * bgpd/bgp_pgbgp.c: Added file + * bgpd/bgp_pgbgp.h: Added file + * bgpd/Makefile.am: Added bgp_pgbgp.h and bgp_pgbgp.c + * bgpd/bgp_aspath.h: Externed the hash of as paths (ashash) + * bgpd/bgp_route.c: . Added PGBGP depref check to decision process. + . Informs PGBGP of new updates and selected routes + . Added anomaly status for show ip bgp + . Added PGBGP commands + * bgpd/bgp_route.h: Added suspicious route flags + * bgpd/bgp_table.h: Added PGBGP history pointer to struct bgp_node + * bgpd/bgpd.h: Defined BGP_CONFIG_PGBGP + * lib/hash.c: Added "hash_iterate_until" to be able to break out + * lib/hash.h: Definition for "hash_iterate_until" + * lib/memtypes.c: Added PGBGP memory types +--- + +--- a/bgpd/Makefile.am ++++ b/bgpd/Makefile.am +@@ -15,14 +15,14 @@ libbgp_a_SOURCES = \ + bgp_debug.c bgp_route.c bgp_zebra.c bgp_open.c bgp_routemap.c \ + bgp_packet.c bgp_network.c bgp_filter.c bgp_regex.c bgp_clist.c \ + bgp_dump.c bgp_snmp.c bgp_ecommunity.c bgp_mplsvpn.c bgp_nexthop.c \ +- bgp_damp.c bgp_table.c bgp_advertise.c bgp_vty.c ++ bgp_damp.c bgp_table.c bgp_advertise.c bgp_vty.c bgp_pgbgp.c + + noinst_HEADERS = \ + bgp_aspath.h bgp_attr.h bgp_community.h bgp_debug.h bgp_fsm.h \ + bgp_network.h bgp_open.h bgp_packet.h bgp_regex.h bgp_route.h \ + bgpd.h bgp_filter.h bgp_clist.h bgp_dump.h bgp_zebra.h \ + bgp_ecommunity.h bgp_mplsvpn.h bgp_nexthop.h bgp_damp.h bgp_table.h \ +- bgp_advertise.h bgp_snmp.h bgp_vty.h ++ bgp_advertise.h bgp_snmp.h bgp_vty.h bgp_pgbgp.h + + bgpd_SOURCES = bgp_main.c + bgpd_LDADD = libbgp.a ../lib/libzebra.la @LIBCAP@ @LIBM@ +--- /dev/null ++++ b/bgpd/bgp_pgbgp.c +@@ -0,0 +1,2401 @@ ++/* ++ BGP Pretty Good BGP ++ Copyright (C) 2008 University of New Mexico (Josh Karlin) ++ ++This file is part of GNU Zebra. ++ ++GNU Zebra 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. ++ ++GNU Zebra 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 Zebra; see the file COPYING. If not, write to the Free ++Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++02111-1307, USA. ++*/ ++ ++/* ++ Quagga based Pretty Good BGP: ++ ++ Summary ++ ------- ++ Pretty Good BGP (PGBGP) is a soft security enhancement to BGP. ++ It uses independently collected (therefore completely distributed) ++ historical routing information to determine network topology and ++ prefix ownership. Abberations to the historical database are considered ++ anomalous and avoided when possible. ++ ++ What PGBGP can protect against: prefix hijacks, sub-prefix hijacks, and ++ spoofed edges. ++ ++ Further reading is available at http://cs.unm.edu/~karlinjf/pgbgp/ ++ ++ Route updates are forwarded to PGBGP, which determines if the route ++ is anomalous. Anomalous routes are flagged as suspicious and ++ avoided where feasible for 24 hours. If the anomalous ++ characteristic is still in the RIB after 24 hours, consider it valid ++ and enter it into the normal database. ++ ++ Cases for anomalous routes ++ -------------------------- ++ case 1) New origin AS - prefix pair (one not recently seen in the RIB): ++ response) label the route with BGP_INFO_SUSPICIOUS_O and avoid for 24 hours if possible ++ ++ case 2) New edge in path (one not recently seen in the RIB): ++ response) label the route with BGP_INFO_SUSPICIOUS_E and avoid for 24 hours ++ if possible ++ ++ case 3) New prefix that is a sub-prefix of a prefix in recent history ++ and that path differs from the current less-specific's path ++ response) label the sub-prefix routes with BGP_INFO_IGNORED_P and ++ prevent it from entering FIB for 24 hours ++ response) label the super-net routes from the same next-hop as BGP_INFO_SUSPICIOUS_P ++ and try to avoid it for 24 hours if possible ++ response) while no super-net route is selected, remove the BGP_INFO_IGNORED_P flags ++ ++ ++ Normal Database (history) ++ ------------------------- ++ Recently Seen) A route characteristic (edge, prefix/origin pair, prefix) ++ that has resided within the RIB within the last X hours ++ where X is user defined for each characteristic. ++ Storage) Prefix and Origin history are stored in bgp_node structs with the ++ "hist" pointer. ++ Edge information is stored in a separate hash table, where the edge ++ is the key to the hash. ++ Updates) The history's primary function is the keep track of when each route ++ characteristic was last seen. For each route announcement, update ++ the history's 'last seen' time. Periodically run the garbage collector ++ which updates 'last seen' times for objects currently in the RIB. ++ ++ Garbage Collection ++ ------------------ ++ Periodically the garbage collector (gc) is called to remove stale history ++ information and update the lastSeen time of objects that reside in the RIB ++ at the time of collection. This is relatively expensive as it walks ++ the RIB as well as the list of AS paths. ++ ++ What is removed) Objects that have not been seen in the RIB within a user-defined ++ time. ++ Suspicious objcets that are 24 hours old that have not been in the RIB ++ since the last collection. ++ ++ Reuse Priority Queue ++ -------------------- ++ After 24 hours, routes that are flagged as suspicious have the flags removed. ++ This is not run on a timer. Instead, for each update that PGBGP is informed of, ++ it checks the reuse queue to determine if any routes need to be updated. ++ ++*/ ++ ++ ++/* ++ Things that must be ensured: ++ . GC updates lastSeen so it must be called at least twice as often as the lowest BUFFER_TIME ++ . GC should be called at least twice per day ++ . Delay times must be shorter than history window lengths ++*/ ++ ++ ++/* ++ Changes made to original PGBGP thinking ++ . Don't check for things in the RIB all of the time, periodically ++ update the lastSeen values and just use lastSeen ++*/ ++ ++/* ++ Changes made to original protocol ++ . sub-prefixes are only ignored while the super-net has a selected ++ route and it's non-anomalous (not to a neighbor that announced ++ the sub-prefix) ++ ++ . At point of reuse, don't delete the item if it's not in the RIB. ++ delete it if it hasn't been in the RIB since the last storage. ++ This saves a lot of processing time for new edges ++ ++ . Changed heuristic from "if new sub-prefix and trusted AS on path ++ then it's okay" to "if new sub-prefix and same path is used to reach ++ super-prefix, then it's okay". Might be better to change to "if old ++ path is prefix of new path, then okay" ++*/ ++ ++#include ++#include ++ ++#include "prefix.h" ++#include "memory.h" ++#include "command.h" ++#include "log.h" ++#include "pqueue.h" ++#include "table.h" ++#include "hash.h" ++#include "str.h" ++ ++#include "bgpd/bgpd.h" ++#include "bgpd/bgp_aspath.h" ++#include "bgpd/bgp_pgbgp.h" ++#include "bgpd/bgp_table.h" ++#include "bgpd/bgp_route.h" ++#include "bgpd/bgp_attr.h" ++#include "bgpd/bgp_advertise.h" ++ ++ ++#define true 1 ++#define false 0 ++ ++struct hash * ashash; ++ ++static void *edge_hash_alloc (void *arg); ++static unsigned int edge_key_make (void *p); ++static int edge_cmp (const void *arg1, const void *args); ++ ++// Helper Functions ++static struct bgp_pgbgp_pathSet bgp_pgbgp_pathOrigin (struct aspath *); ++static int bgp_pgbgp_pathLength (struct aspath *asp); ++static int bgp_pgbgp_gc (struct bgp_table *); ++static int bgp_pgbgp_clean (struct bgp_table *); ++static int bgp_pgbgp_reuse (time_t); ++static struct bgp_node *findSuper (struct bgp_table *table, struct prefix *p, ++ time_t t_now); ++static int bgp_pgbgp_store (struct bgp_table *table); ++static int bgp_pgbgp_restore (void); ++static struct bgp_info *bgp_pgbgp_selected (struct bgp_node *node); ++static int originInRIB (struct bgp_node *node, struct bgp_pgbgp_origin *origin); ++static int prefixInRIB (struct bgp_node *node, struct bgp_pgbgp_prefix *prefix); ++static int edgeInRIB (struct bgp_pgbgp_edge *e); ++ ++// MOAS Functions ++static void bgp_pgbgp_logOriginAnomaly (as_t asn, struct bgp_node *rn, ++ struct attr *); ++static int bgp_pgbgp_reuseOrigin (struct bgp_pgbgp_r_origin); ++static void bgp_pgbgp_cleanHistTable (struct bgp_table *); ++static int bgp_pgbgp_garbageCollectHistTable (struct bgp_table *); ++static void bgp_pgbgp_storeHistTable (struct bgp_table *table, FILE * file); ++static int bgp_pgbgp_updateOrigin (struct bgp_pgbgp_hist *, struct bgp_info *, ++ struct attr *, struct bgp_node *, time_t, int); ++ ++ ++// Sub-Prefix Hijack Detector Functions ++static int bgp_pgbgp_shouldIgnore (struct bgp_node *super, struct bgp_info *selected); ++static void bgp_pgbgp_logSubprefixAnomaly (as_t asn, struct bgp_node *rn, ++ struct attr *, struct bgp_node *super); ++static int bgp_pgbgp_reusePrefix (struct bgp_pgbgp_r_prefix); ++static int bgp_pgbgp_updatePrefix (struct bgp_pgbgp_hist *hist, struct bgp_node *, ++ struct bgp_info *, struct attr *, ++ struct bgp_node *, time_t, int); ++ ++ ++// Spoofed Edge Detector Functions ++static void bgp_pgbgp_cleanEdges (void); ++static void bgp_pgbgp_logEdgeAnomaly (struct bgp_node *rn, struct attr *, ++ struct edge *edge); ++static int bgp_pgbgp_reuseEdge (struct bgp_pgbgp_r_edge); ++static void bgp_pgbgp_storeEdges (struct bgp_table *, FILE *); ++static int bgp_pgbgp_garbageCollectEdges (struct bgp_table *); ++static int bgp_pgbgp_updateEdge (struct bgp_pgbgp_hist *hist, struct bgp_info *, ++ struct attr *, struct bgp_node *, time_t, int); ++static int bgp_pgbgp_restoreEdge (FILE * file); ++static void bgp_pgbgp_storeEdges (struct bgp_table *table, FILE * file); ++ ++ ++ ++// New Peer Detector Functions ++static int bgp_pgbgp_updatePeer (struct bgp_info *binfo, time_t now); ++ ++ ++/* --------------- Global Variables ------------------ */ ++struct bgp_pgbgp_config bgp_pgbgp_cfg; ++struct bgp_pgbgp_config *pgbgp = &bgp_pgbgp_cfg; ++/*! --------------- Global Variables ------------------ !*/ ++ ++/* --------------- VTY (others exist in bgp_route.c) ------------------ */ ++ ++struct nsearch ++{ ++ struct vty *pvty; ++ time_t time; ++ as_t asn; ++}; ++ ++static void ++edge_neighbor_iterator (struct hash_backet *backet, struct nsearch *pns) ++{ ++ struct bgp_pgbgp_edge *hedge = backet->data; ++ if ((hedge->e.a == pns->asn || hedge->e.b == pns->asn) ++ && hedge->e.a != hedge->e.b) ++ { ++ struct vty *vty = pns->pvty; ++ if (hedge->deprefUntil > pns->time) ++ vty_out (pns->pvty, "Untrusted: %d -- %d%s", hedge->e.a, hedge->e.b, ++ VTY_NEWLINE); ++ else ++ vty_out (pns->pvty, "Trusted: %d -- %d%s", hedge->e.a, hedge->e.b, ++ VTY_NEWLINE); ++ } ++} ++ ++static int ++bgp_pgbgp_stats_neighbors (struct vty *vty, afi_t afi, safi_t safi, as_t asn) ++{ ++ struct nsearch ns; ++ ns.pvty = vty; ++ ns.time = time (NULL); ++ ns.asn = asn; ++ ++ hash_iterate (pgbgp->edgeT, ++ (void (*)(struct hash_backet *, void *)) ++ edge_neighbor_iterator, &ns); ++ return CMD_SUCCESS; ++} ++ ++static int ++bgp_pgbgp_stats_origins (struct vty *vty, afi_t afi, safi_t safi, ++ const char *prefix) ++{ ++ struct bgp *bgp; ++ struct bgp_table *table; ++ time_t t_now = time (NULL); ++ bgp = bgp_get_default (); ++ if (bgp == NULL) ++ return CMD_WARNING; ++ if (bgp->rib == NULL) ++ return CMD_WARNING; ++ table = bgp->rib[afi][safi]; ++ if (table == NULL) ++ return CMD_WARNING; ++ ++ struct prefix p; ++ str2prefix (prefix, &p); ++ struct bgp_node *rn = bgp_node_match (table, &p); ++ vty_out (vty, "%s%s", prefix, VTY_NEWLINE); ++ if (rn) ++ { ++ if (rn->hist) ++ { ++ for (struct bgp_pgbgp_origin * cur = rn->hist->o; cur != NULL; ++ cur = cur->next) ++ { ++ if (cur->deprefUntil > t_now) ++ vty_out (vty, "Untrusted Origin AS: %d%s", cur->originAS, ++ VTY_NEWLINE); ++ else ++ vty_out (vty, "Trusted Origin AS: %d%s", cur->originAS, ++ VTY_NEWLINE); ++ } ++ } ++ bgp_unlock_node (rn); ++ } ++ return CMD_SUCCESS; ++} ++ ++static int ++bgp_pgbgp_stats (struct vty *vty, afi_t afi, safi_t safi) ++{ ++ struct bgp *bgp; ++ struct bgp_table *table; ++ ++ ++ bgp = bgp_get_default (); ++ if (bgp == NULL) ++ return CMD_WARNING; ++ if (bgp->rib == NULL) ++ return CMD_WARNING; ++ table = bgp->rib[afi][safi]; ++ if (table == NULL) ++ return CMD_WARNING; ++ ++ // bgp_pgbgp_store(table); ++ ++ // Print out the number of anomalous routes ++ int anomalous = 0; ++ int routes = 0; ++ int num_selected = 0; ++ int num_origin = 0; ++ int num_super = 0; ++ int num_ignored = 0; ++ int num_edge = 0; ++ ++ for (struct bgp_node * rn = bgp_table_top (table); rn; ++ rn = bgp_route_next (rn)) ++ { ++ for (struct bgp_info * ri = rn->info; ri; ri = ri->next) ++ { ++ routes += 1; ++ if (ANOMALOUS (ri->flags)) ++ { ++ anomalous += 1; ++ if (CHECK_FLAG (ri->flags, BGP_INFO_SELECTED)) ++ num_selected += 1; ++ ++ if (CHECK_FLAG (ri->flags, BGP_INFO_SUSPICIOUS_O)) ++ num_origin += 1; ++ if (CHECK_FLAG (ri->flags, BGP_INFO_SUSPICIOUS_E)) ++ num_edge += 1; ++ if (CHECK_FLAG (ri->flags, BGP_INFO_SUSPICIOUS_P)) ++ num_super += 1; ++ if (CHECK_FLAG (ri->flags, BGP_INFO_IGNORED_P)) ++ num_ignored += 1; ++ } ++ } ++ } ++ ++ vty_out (vty, "%-30s: %10d%s", "Routes in the RIB", routes, VTY_NEWLINE); ++ vty_out (vty, "%-30s: %10d%s", "Anomalous routes in RIB", anomalous, ++ VTY_NEWLINE); ++ vty_out (vty, "%-30s: %10d%s", "Selected anomalous routes", num_selected, ++ VTY_NEWLINE); ++ vty_out (vty, "-----------------------------%s", VTY_NEWLINE); ++ vty_out (vty, "%-30s: %10d%s", "Routes with anomalous origins", num_origin, ++ VTY_NEWLINE); ++ vty_out (vty, "%-30s: %10d%s", "Routes with anomalous edges", num_edge, ++ VTY_NEWLINE); ++ vty_out (vty, "%-30s: %10d%s", "Routes ignored for sub-prefix", num_ignored, ++ VTY_NEWLINE); ++ vty_out (vty, "%-30s: %10d%s", "Less specific routes to avoid", num_super, ++ VTY_NEWLINE); ++ /* ++ vty_out (vty, "There are %d routes in the RIB.%s", routes, VTY_NEWLINE); ++ vty_out (vty, "%d are anomalous.%s", anomalous, VTY_NEWLINE); ++ vty_out (vty, "%d anomalous routes are selected.%s", num_selected, VTY_NEWLINE); ++ vty_out (vty, "%s", VTY_NEWLINE); ++ vty_out (vty, "Anomaly breakdown:%s", VTY_NEWLINE); ++ vty_out (vty, "%d contain anomalous origins%s", num_origin, VTY_NEWLINE); ++ vty_out (vty, "%d contain anomalous edges.%s", num_edge, VTY_NEWLINE); ++ vty_out (vty, "%d are for ignored sub-prefixes.%s", num_ignored, VTY_NEWLINE); ++ vty_out (vty, "%d are super-net routes through peers that announced anomalous sub-prefixes.%s", num_super, VTY_NEWLINE); ++ */ ++ return CMD_SUCCESS; ++} ++ ++ ++DEFUN (show_ip_bgp_pgbgp, ++ show_ip_bgp_pgbgp_cmd, ++ "show ip bgp pgbgp", ++ SHOW_STR IP_STR BGP_STR "Display PGBGP statistics\n") ++{ ++ return bgp_pgbgp_stats (vty, AFI_IP, SAFI_UNICAST); ++} ++ ++DEFUN (show_ip_bgp_pgbgp_neighbors, ++ show_ip_bgp_pgbgp_neighbors_cmd, ++ "show ip bgp pgbgp neighbors WORD", ++ SHOW_STR ++ IP_STR ++ BGP_STR ++ "BGP pgbgp\n" ++ "BGP pgbgp neighbors\n" "ASN whos neighbors should be displayed\n") ++{ ++ return bgp_pgbgp_stats_neighbors (vty, AFI_IP, SAFI_UNICAST, ++ atoi (argv[0])); ++} ++ ++DEFUN (show_ip_bgp_pgbgp_origins, ++ show_ip_bgp_pgbgp_origins_cmd, ++ "show ip bgp pgbgp origins A.B.C.D/M", ++ SHOW_STR ++ IP_STR ++ BGP_STR ++ "BGP pgbgp\n" ++ "BGP pgbgp neighbors\n" "Prefix to look up origin ASes of\n") ++{ ++ return bgp_pgbgp_stats_origins (vty, AFI_IP, SAFI_UNICAST, argv[0]); ++} ++ ++ ++ ++ ++/*! --------------- VTY (others exist in bgp_route.c) ------------------ !*/ ++ ++ ++ ++ ++ ++ ++ ++/* --------------- Helper Functions ------------------ */ ++/* ++ If the origin hasn't been seen/verified lately, look for it in the RIB ++*/ ++int ++originInRIB (struct bgp_node *node, struct bgp_pgbgp_origin *origin) ++{ ++ for (struct bgp_info * ri = node->info; ri; ri = ri->next) ++ { ++ struct bgp_pgbgp_pathSet pathOrigins; ++ pathOrigins = bgp_pgbgp_pathOrigin (ri->attr->aspath); ++ for (int i = 0; i < pathOrigins.length; ++i) ++ { ++ if (pathOrigins.ases[i] == origin->originAS) ++ { ++ return true; ++ } ++ } ++ } ++ return false; ++} ++ ++ ++/* ++ If the prefix hasn't been seen/verified lately, look for it in the RIB ++*/ ++int ++prefixInRIB (struct bgp_node *node, struct bgp_pgbgp_prefix *prefix) ++{ ++ if (node->info) ++ return true; ++ return false; ++} ++ ++static int ++edge_inRIB_iterator (struct hash_backet *backet, struct bgp_pgbgp_edge *hedge) ++{ ++ struct aspath *p = backet->data; ++ char first = true; ++ struct edge curEdge; ++ curEdge.a = 0; ++ curEdge.b = 0; ++ ++ struct assegment *seg; ++ ++ for (seg = p->segments; seg; seg = seg->next) ++ { ++ for (int i = 0; i < seg->length; i++) ++ { ++ curEdge.a = curEdge.b; ++ curEdge.b = seg->as[i]; ++ if (first) ++ { ++ first = false; ++ continue; ++ } ++ // Is this the edge we're looking for? ++ if (curEdge.a == hedge->e.a && curEdge.b == hedge->e.b) ++ { ++ hedge->lastSeen = time (NULL); ++ return false; ++ } ++ } ++ } ++ ++ return true; ++} ++ ++/* ++ If the edge hasn't been seen/verified lately, look for it in the AS path list ++ This function is expensive, use sparingly ++*/ ++int ++edgeInRIB (struct bgp_pgbgp_edge *e) ++{ ++ int completed; ++ completed = hash_iterate_until (ashash, ++ (int (*)(struct hash_backet *, void *)) ++ edge_inRIB_iterator, e); ++ if (completed) ++ return false; ++ ++ return true; ++} ++ ++ ++ ++/* ++ Return the selected route for the given route node ++ */ ++ ++struct bgp_info * ++bgp_pgbgp_selected (struct bgp_node *node) ++{ ++ for (struct bgp_info * ri = node->info; ri; ri = ri->next) ++ { ++ if (CHECK_FLAG (ri->flags, BGP_INFO_SELECTED)) ++ return ri; ++ } ++ return NULL; ++} ++ ++static int ++reuse_cmp (void *node1, void *node2) ++{ ++ struct bgp_pgbgp_reuse *a; ++ struct bgp_pgbgp_reuse *b; ++ a = (struct bgp_pgbgp_reuse *) node1; ++ b = (struct bgp_pgbgp_reuse *) node2; ++ return a->deprefUntil - b->deprefUntil; ++} ++ ++int ++bgp_pgbgp_pathLength (struct aspath *asp) ++{ ++ struct assegment *seg; ++ if ((asp == NULL) || (asp->segments == NULL)) ++ return 0; ++ int count = 0; ++ seg = asp->segments; ++ while (seg->next != NULL) ++ { ++ count += seg->length; ++ seg = seg->next; ++ } ++ return count; ++} ++ ++ ++ ++/* Find the origin(s) of the path ++ All ASes in the final set are considered origins */ ++static struct bgp_pgbgp_pathSet ++bgp_pgbgp_pathOrigin (struct aspath *asp) ++{ ++ struct assegment *seg, *last; ++ struct bgp_pgbgp_pathSet tmp; ++ tmp.length = 0; ++ tmp.ases = NULL; ++ ++ assert (asp != NULL && asp->segments != NULL); ++ ++ /* if ( (asp == NULL) || (asp->segments == NULL) ) ++ return tmp; ++ */ ++ seg = asp->segments; ++ last = NULL; ++ while (seg->next != NULL) ++ { ++ if (seg->type != AS_SET && seg->type != AS_CONFED_SET) ++ last = seg; ++ seg = seg->next; ++ } ++ ++ if (seg->type == AS_SET || seg->type == AS_CONFED_SET) ++ seg = last; ++ ++ assert (seg); ++ tmp.length = 1; ++ tmp.ases = &seg->as[seg->length - 1]; ++ ++ /* ++ if (seg->type == AS_SET || seg->type == AS_CONFED_SET) ++ { ++ tmp.length = seg->length; ++ tmp.ases = seg->as; ++ } ++ else ++ { ++ tmp.length = 1; ++ tmp.ases = &seg->as[seg->length - 1]; ++ } ++ */ ++ assert (tmp.length >= 1); ++ return tmp; ++ // return seg->as[seg->length-1]; ++} ++ ++int ++bgp_pgbgp_reuse (time_t t_now) ++{ ++ ++ struct bgp_pgbgp_reuse *cur = NULL; ++ ++ while (pgbgp->rq_size > 0) ++ { ++ cur = pqueue_dequeue (pgbgp->reuse_q); ++ pgbgp->rq_size -= 1; ++ ++ // Is the next item ready to be reused? ++ if (t_now < cur->deprefUntil) ++ { ++ pqueue_enqueue (cur, pgbgp->reuse_q); ++ pgbgp->rq_size += 1; ++ break; ++ } ++ ++ // Okay, it needs to be reused now ++ if (cur->type == PGBGP_REUSE_ORIGIN) ++ bgp_pgbgp_reuseOrigin (cur->data.origin); ++ ++ else if (cur->type == PGBGP_REUSE_PREFIX) ++ bgp_pgbgp_reusePrefix (cur->data.prefix); ++ ++ else if (cur->type == PGBGP_REUSE_EDGE) ++ bgp_pgbgp_reuseEdge (cur->data.edge); ++ ++ ++ XFREE (MTYPE_BGP_PGBGP_REUSE, cur); ++ } ++ return 0; ++} ++ ++/* Check bit of the prefix. */ ++static int ++check_bit (u_char * prefix, u_char prefixlen) ++{ ++ int offset; ++ int shift; ++ u_char *p = (u_char *) prefix; ++ ++ assert (prefixlen <= 128); ++ ++ offset = prefixlen / 8; ++ shift = 7 - (prefixlen % 8); ++ ++ return (p[offset] >> shift & 1); ++} ++ ++/* ++ Find a super-net in the tree that's not currently anomalous if one exists ++*/ ++struct bgp_node * ++findSuper (struct bgp_table *table, struct prefix *p, time_t t_now) ++{ ++ struct bgp_node *node; ++ struct bgp_node *matched; ++ ++ matched = NULL; ++ node = table->top; ++ ++ while (node && node->p.prefixlen < p->prefixlen && ++ prefix_match (&node->p, p)) ++ { ++ // Node may not yet have its info set when reading in from pgbgp log files ++ if (node->hist && node->p.prefixlen >= 8) ++ { ++ if (node->hist->p != NULL && node->hist->p->ignoreUntil < t_now) ++ //if (node->hist->p != NULL && prefixInRIB (node, NULL)) ++ //if (node->hist->p != NULL) ++ matched = node; ++ } ++ node = node->link[check_bit (&p->u.prefix, node->p.prefixlen)]; ++ } ++ if (matched) ++ return bgp_lock_node (matched); ++ return NULL; ++} ++ ++ ++ ++ ++ ++/*! --------------- Helper Functions ------------------ !*/ ++ ++ ++ ++ ++ ++ ++ ++/* --------------- Public PGBGP Interface ------------------ */ ++int ++bgp_pgbgp_enable (struct bgp *bgp, afi_t afi, safi_t safi, ++ int ost, int est, int sst, int oht, int pht, int eht, ++ const char *file, const char *anoms) ++{ ++ ++ if (CHECK_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_PGBGP)) ++ { ++ if (pgbgp->storage && pgbgp->anomalies) ++ { ++ if (pgbgp->origin_sus_time == ost ++ && pgbgp->edge_sus_time == est ++ && pgbgp->sub_sus_time == sst ++ && pgbgp->origin_hist_time == oht ++ && pgbgp->prefix_hist_time == pht ++ && pgbgp->edge_hist_time == eht ++ && strcmp (pgbgp->storage, file) == 0 ++ && strcmp (pgbgp->anomalies, anoms) == 0) ++ ++ return 0; ++ } ++ } ++ ++ SET_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_PGBGP); ++ ++#ifndef PGBGP_DEBUG ++ time_t hour = 3600; ++ time_t day = 86400; ++#endif ++#ifdef PGBGP_DEBUG ++ time_t hour = 2; ++ time_t day = 5; ++#endif ++ ++ pgbgp->origin_sus_time = ost * hour; ++ pgbgp->edge_sus_time = est * hour; ++ pgbgp->sub_sus_time = sst * hour; ++ pgbgp->origin_hist_time = oht * day; ++ pgbgp->prefix_hist_time = pht * day; ++ pgbgp->edge_hist_time = eht * day; ++ pgbgp->peer_hist_time = DEFAULT_ORIGIN_HIST; ++ ++ if (file != NULL) ++ pgbgp->storage = strdup (file); ++ else ++ pgbgp->storage = NULL; ++ ++ if (anoms != NULL) ++ pgbgp->anomalies = strdup (anoms); ++ else ++ pgbgp->anomalies = NULL; ++ ++ ++ pgbgp->reuse_q = pqueue_create (); ++ pgbgp->reuse_q->cmp = reuse_cmp; ++ pgbgp->rq_size = 0; ++ pgbgp->lastgc = time (NULL); ++ pgbgp->lastStore = time (NULL); ++ pgbgp->startTime = time (NULL); ++ install_element (VIEW_NODE, &show_ip_bgp_pgbgp_cmd); ++ install_element (ENABLE_NODE, &show_ip_bgp_pgbgp_cmd); ++ install_element (VIEW_NODE, &show_ip_bgp_pgbgp_neighbors_cmd); ++ install_element (ENABLE_NODE, &show_ip_bgp_pgbgp_neighbors_cmd); ++ install_element (VIEW_NODE, &show_ip_bgp_pgbgp_origins_cmd); ++ install_element (ENABLE_NODE, &show_ip_bgp_pgbgp_origins_cmd); ++ pgbgp->edgeT = hash_create_size (131072, edge_key_make, edge_cmp); ++ bgp_pgbgp_restore (); ++ return 0; ++} ++ ++int ++bgp_pgbgp_disable (struct bgp *bgp, afi_t afi, safi_t safi) ++{ ++ UNSET_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_PGBGP); ++ ++ // Clean the tables ++ if (bgp->rib[afi][safi] != NULL) ++ bgp_pgbgp_clean (bgp->rib[afi][safi]); ++ ++ bgp_pgbgp_cleanEdges (); ++ ++ if (pgbgp->storage != NULL) ++ free (pgbgp->storage); ++ ++ if (pgbgp->anomalies != NULL) ++ free (pgbgp->anomalies); ++ ++ struct bgp_pgbgp_peerTime *pr = pgbgp->peerLast; ++ while (pr) ++ { ++ struct bgp_pgbgp_peerTime *cur = pr; ++ pr = pr->next; ++ XFREE (MTYPE_BGP_PGBGP_PEER, cur); ++ } ++ ++ return 0; ++} ++ ++int ++bgp_pgbgp_clean (struct bgp_table *table) ++{ ++ struct bgp_pgbgp_reuse *rnode = NULL; ++ ++ while (pgbgp->rq_size > 0) ++ { ++ rnode = (struct bgp_pgbgp_reuse *) pqueue_dequeue (pgbgp->reuse_q); ++ pgbgp->rq_size -= 1; ++ XFREE (MTYPE_BGP_PGBGP_REUSE, rnode); ++ } ++ pqueue_delete (pgbgp->reuse_q); ++ ++ if (table == NULL) ++ return 0; ++ ++ // Clean the detectors ++ bgp_pgbgp_cleanHistTable (table); ++ ++ bgp_pgbgp_cleanEdges (); ++ ++ ++ // Clean up the RIB nodes ++ for (struct bgp_node * rn = bgp_table_top (table); rn; ++ rn = bgp_route_next (rn)) ++ { ++ int changed = 0; ++ for (struct bgp_info * ri = rn->info; ri; ri = ri->next) ++ { ++ if (CHECK_FLAG (ri->flags, BGP_INFO_SUSPICIOUS_O ++ | BGP_INFO_SUSPICIOUS_P | BGP_INFO_SUSPICIOUS_E ++ | BGP_INFO_IGNORED_P)) ++ { ++ changed = 1; ++ UNSET_FLAG (ri->flags, BGP_INFO_SUSPICIOUS_O ++ | BGP_INFO_SUSPICIOUS_P | BGP_INFO_SUSPICIOUS_E ++ | BGP_INFO_IGNORED_P); ++ } ++ } ++ if (changed && rn->info) ++ { ++ struct bgp_info *ri = rn->info; ++ bgp_process (ri->peer->bgp, rn, rn->table->afi, rn->table->safi); ++ } ++ } ++ ++ hash_free (pgbgp->edgeT); ++ return 0; ++} ++ ++ ++int ++bgp_pgbgp_gc (struct bgp_table *table) ++{ ++ struct bgp *bgp = bgp_get_default (); ++ if (!bgp) ++ return 0; ++ ++ // Collect each AFI/SAFI RIB ++ for (afi_t afi = AFI_IP; afi < AFI_MAX; afi++) ++ for (safi_t safi = SAFI_UNICAST; safi < SAFI_MAX; safi++) ++ { ++ if (!CHECK_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_PGBGP)) ++ continue; ++ struct bgp_table *curTable = bgp->rib[afi][safi]; ++ if (!curTable) ++ continue; ++ bgp_pgbgp_garbageCollectHistTable (curTable); ++ } ++ ++ bgp_pgbgp_garbageCollectEdges (table); ++ ++ return 0; ++} ++ ++int ++bgp_pgbgp_restore (void) ++{ ++ ++ if (pgbgp->storage == NULL) ++ return 0; ++ FILE *file = fopen (pgbgp->storage, "r"); ++ if (!file) ++ return 0; ++ ++ int type = 0; ++ struct prefix p; ++ struct bgp *bgp = bgp_get_default (); ++ struct bgp_node *curNode = NULL; ++ ++ // Get the log store time ++ long long int writetime; ++ fscanf (file, "%lld", &writetime); ++ time_t swtime = writetime; ++ ++ // If it's too old (more than 1 week old), start fresh ++ if (time (NULL) - swtime > 86400 * 7) ++ { ++ fclose (file); ++ return 0; ++ } ++ ++ ++ // Get the PGBGP init time ++ long long int stime; ++ fscanf (file, "%lld", &stime); ++ pgbgp->startTime = stime; ++ ++ while (fscanf (file, "%d", &type) != EOF) ++ { ++ ++ if (type == PREFIX_ID) ++ { ++ char pre[128]; ++ unsigned int afi; ++ unsigned int safi; ++ long long int time; ++ fscanf (file, "%s %u %u %lld", pre, &afi, &safi, &time); ++ str2prefix (pre, &p); ++ struct bgp_table *curTable = bgp->rib[afi][safi]; ++ assert (curTable != NULL); ++ ++ // Create and lock the node ++ curNode = bgp_node_get (curTable, &p); ++ assert (curNode->hist == NULL); ++ ++ // bgp_lock_node(curNode); ++ ++ curNode->hist = ++ XCALLOC (MTYPE_BGP_PGBGP_HIST, sizeof (struct bgp_pgbgp_hist)); ++ assert (curNode->hist != NULL); ++ ++ curNode->hist->p = ++ XCALLOC (MTYPE_BGP_PGBGP_PREFIX, ++ sizeof (struct bgp_pgbgp_prefix)); ++ assert (curNode->hist->p != NULL); ++ ++ curNode->hist->p->lastSeen = time; ++ } ++ else if (type == ORIGIN_ID) ++ { ++ unsigned int ASN; ++ long long int time; ++ fscanf (file, "%u %lld", &ASN, &time); ++ struct bgp_pgbgp_origin *or = XCALLOC (MTYPE_BGP_PGBGP_ORIGIN, ++ sizeof (struct ++ bgp_pgbgp_origin)); ++ or->lastSeen = time; ++ or->originAS = ASN; ++ or->next = curNode->hist->o; ++ curNode->hist->o = or; ++ } ++ else if (type == EDGE_ID) ++ { ++ bgp_pgbgp_restoreEdge (file); ++ } ++ else if (type == PEER_ID) ++ { ++ struct bgp_pgbgp_peerTime *pr; ++ long long int time; ++ union sockunion su; ++ char szsu[128]; ++ fscanf (file, "%s %lld", szsu, &time); ++ str2sockunion (szsu, &su); ++ pr = ++ XCALLOC (MTYPE_BGP_PGBGP_PEER, ++ sizeof (struct bgp_pgbgp_peerTime)); ++ pr->su = su; ++ pr->lastSeen = time; ++ pr->next = pgbgp->peerLast; ++ pgbgp->peerLast = pr; ++ } ++ } ++ ++ fclose (file); ++ return 0; ++} ++ ++int ++bgp_pgbgp_store (struct bgp_table *table) ++{ ++ if (pgbgp->storage == NULL) ++ return 0; ++ char *tmpname = malloc (sizeof (char) * (1 + 4 + strlen (pgbgp->storage))); ++ strcpy (tmpname, pgbgp->storage); ++ strcat (tmpname, ".tmp"); ++ FILE *file = fopen (tmpname, "w"); ++ ++ if (!file) ++ { ++ free (tmpname); ++ return 0; ++ } ++ ++ // Store the current time ++ fprintf (file, "%lld\n", (long long int) time (NULL)); ++ ++ // Store the init time ++ fprintf (file, "%lld\n", (long long int) pgbgp->startTime); ++ ++ // Store the peer times ++ for (struct bgp_pgbgp_peerTime * pr = pgbgp->peerLast; pr; pr = pr->next) ++ { ++ char strSock[128]; ++ sockunion2str (&pr->su, strSock, sizeof (strSock)); ++ ++ if (pr->deprefUntil < time (NULL)) ++ { ++ fprintf (file, "%d %s %lld\n", PEER_ID, strSock, ++ (long long int) pr->lastSeen); ++ } ++ } ++ ++ // Store the tables ++ bgp_pgbgp_storeHistTable (table, file); ++ bgp_pgbgp_storeEdges (table, file); ++ ++ fclose (file); ++ ++ rename (tmpname, pgbgp->storage); ++ ++ free (tmpname); ++ return 0; ++} ++ ++/* ++ Check to see if we've seen the peer recently ++ If not, then we need to return true and not delay routes ++ for awhile ++*/ ++int ++bgp_pgbgp_updatePeer (struct bgp_info *binfo, time_t now) ++{ ++ int status = false; ++ // Find the peer ++ struct bgp_pgbgp_peerTime *pr = pgbgp->peerLast; ++ for (; pr; pr = pr->next) ++ if (sockunion_same (&pr->su, &binfo->peer->su)) ++ break; ++ ++ // If this is a new peer, create it ++ if (pr == NULL) ++ { ++ pr = XCALLOC (MTYPE_BGP_PGBGP_PEER, sizeof (struct bgp_pgbgp_peerTime)); ++ pr->su = binfo->peer->su; ++ pr->next = pgbgp->peerLast; ++ pgbgp->peerLast = pr; ++ ++ } ++ // Is it currently marked as new? ++ if (pr->deprefUntil > now) ++ goto UPPEER_DEPREF; ++ ++ // Have we seen the peer recently? ++ if (pr->lastSeen + pgbgp->peer_hist_time > now) ++ goto UPPEER_CLEAN; ++ ++ // It must not have been seen lately, depref it ++ pr->deprefUntil = now + PGBGP_PEER_GRACE; ++ ++ ++UPPEER_DEPREF: ++ status = true; ++ ++UPPEER_CLEAN: ++ pr->lastSeen = now; ++ ++ return status; ++} ++ ++ ++/* ++ Returns whether or not the sub-prefix should be ignored ++*/ ++int ++bgp_pgbgp_shouldIgnore (struct bgp_node *super, struct bgp_info *selected) ++{ ++ if (!selected || CHECK_FLAG (selected->flags, BGP_INFO_SUSPICIOUS_P)) ++ return false; ++ return true; ++} ++ ++/* ++ This is a special case function for smoothly handling sub-prefix hijacks. ++ ++ It handles the following 2 events: ++ ++ Event 1: The super-prefix of an anomalous prefix has a route through a non-anomalous ++ ++ Event 1: An anomalous sub-prefix is ignored, but no best route for the super-prefix exists ++ Response: Announce the sub-prefix until the super-prefix comes back ++ ++ Event 2: A super-prefix comes back to the RIB and its anomalous sub-prefix is in use ++ Response: Ignore the sub-prefix again ++ */ ++ ++ ++int ++bgp_pgbgp_rib_updated (struct bgp_node *rn, struct bgp_info *old_best, ++ struct bgp_info *new_best) ++{ ++ // return 0; ++ struct bgp_pgbgp_hist *hist = rn->hist; ++ if (!hist) ++ return 0; ++ if (!hist->p) ++ return 0; ++ time_t t_now = time (NULL); ++ ++ /* ++ If we can't avoid the sub-prefix by routing to the super-prefix, ++ then route as normal to the sub-prefix ++ */ ++ if (!bgp_pgbgp_shouldIgnore (rn, new_best)) ++ { ++ for (struct bgp_pgbgp_avoid * cur = hist->p->avoid; cur; ++ cur = cur->next) ++ { ++ if (cur->avoidUntil > t_now) ++ { ++ int changed = false; ++ for (struct bgp_info * ri = cur->sub->info; ri; ri = ri->next) ++ { ++ if (CHECK_FLAG (ri->flags, BGP_INFO_IGNORED_P)) ++ { ++ changed = true; ++ UNSET_FLAG (ri->flags, BGP_INFO_IGNORED_P); ++ } ++ } ++ if (changed) ++ { ++ struct bgp_info *ri = cur->sub->info; ++ if (ri && ri->peer && ri->peer->bgp) ++ bgp_process (ri->peer->bgp, cur->sub, ++ cur->sub->table->afi, cur->sub->table->safi); ++ ++ } ++ ++ } ++ } ++ } ++ ++ /* ++ If we can avoid the sub-prefix by routing to the super-prefix, ++ then do so ++ */ ++ ++ else ++ { ++ for (struct bgp_pgbgp_avoid * cur = hist->p->avoid; cur; ++ cur = cur->next) ++ { ++ if (cur->avoidUntil > t_now) ++ { ++ int changed = false; ++ for (struct bgp_info * ri = cur->sub->info; ri; ri = ri->next) ++ { ++ if (!CHECK_FLAG (ri->flags, BGP_INFO_IGNORED_P)) ++ { ++ changed = true; ++ SET_FLAG (ri->flags, BGP_INFO_IGNORED_P); ++ } ++ } ++ if (changed) ++ { ++ struct bgp_info *ri = cur->sub->info; ++ if (ri && ri->peer && ri->peer->bgp) ++ bgp_process (ri->peer->bgp, cur->sub, ++ cur->sub->table->afi, cur->sub->table->safi); ++ } ++ } ++ } ++ } ++ ++ /* ++ if (old_best && !new_best) ++ { ++ time_t t_now = time(NULL); ++ for (struct bgp_pgbgp_avoid * cur = hist->p->avoid; cur; ++ cur = cur->next) ++ { ++ if (cur->avoidUntil > t_now) ++ { ++ for (struct bgp_info * ri = cur->sub->info; ri; ri = ri->next) ++ UNSET_FLAG (ri->flags, BGP_INFO_IGNORED_P); ++ ++ struct bgp_info *ri = cur->sub->info; ++ if (ri && ri->peer && ri->peer->bgp) ++ bgp_process (ri->peer->bgp, cur->sub, cur->sub->table->afi, ++ cur->sub->table->safi); ++ } ++ } ++ } ++ ++ ++ else if (!old_best && new_best) ++ { ++ time_t t_now = time(NULL); ++ for (struct bgp_pgbgp_avoid * av = hist->p->avoid; av; av = av->next) ++ { ++ struct bgp_info * ri = av->sub->info; ++ if (av->avoidUntil > t_now && ri && !CHECK_FLAG(ri->flags, BGP_INFO_IGNORED_P)) ++ { ++ for (; ri; ri = ri->next) ++ SET_FLAG (ri->flags, BGP_INFO_IGNORED_P); ++ ri = av->sub->info; ++ if (ri && ri->peer && ri->peer->bgp) ++ bgp_process (ri->peer->bgp, av->sub, ++ av->sub->table->afi, av->sub->table->safi); ++ ++ } ++ } ++ } ++ */ ++ return 0; ++} ++ ++int ++bgp_pgbgp_update (struct bgp_info *binfo, struct attr *at, ++ struct bgp_node *rn) ++{ ++ time_t t_now = time (NULL); ++ ++ // Clean up the reuse list ++ bgp_pgbgp_reuse (t_now); ++ ++ ++ if (!rn->hist) ++ { ++ rn->hist = ++ XCALLOC (MTYPE_BGP_PGBGP_HIST, sizeof (struct bgp_pgbgp_hist)); ++ // Get the PGBGP history lock on rn ++ bgp_lock_node (rn); ++ } ++ ++ struct bgp_node *superhn = NULL; ++ ++ // implicit lock from node_get ++ superhn = findSuper (rn->table, &rn->p, t_now); ++ ++ int newPeer = bgp_pgbgp_updatePeer (binfo, t_now); ++ bgp_pgbgp_updateOrigin (rn->hist, binfo, at, rn, t_now, newPeer); ++ bgp_pgbgp_updatePrefix (rn->hist, superhn, binfo, at, rn, t_now, newPeer); ++ bgp_pgbgp_updateEdge (rn->hist, binfo, at, rn, t_now, newPeer); ++ ++ if (superhn != NULL) ++ bgp_unlock_node (superhn); ++ ++ ++ ++ // GC and storage must be last, as they update lastSeen values of objects ++ // which would cause new routes to be recently seen, which is undesired behavior ++ // Make sure you don't collect anything that might be in use! ++ if (t_now >= pgbgp->lastgc + PGBGP_GC_DELTA) ++ { ++ bgp_pgbgp_gc (rn->table); ++ pgbgp->lastgc = t_now; ++ } ++ ++ if (t_now >= pgbgp->lastStore + PGBGP_STORE_DELTA) ++ { ++ bgp_pgbgp_store (rn->table); ++ pgbgp->lastStore = t_now; ++ } ++ ++ ++ ++ return 0; ++} ++ ++ ++ ++ ++/*! --------------- Public PGBGP Interface ------------------ !*/ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++/* --------------- MOAS Detection ------------------ */ ++void ++bgp_pgbgp_storeHistTable (struct bgp_table *table, FILE * file) ++{ ++ time_t t_now; ++ t_now = time (NULL); ++ ++ struct bgp *bgp = bgp_get_default (); ++ if (!bgp) ++ return; ++ ++ // Store each AFI/SAFI RIB ++ for (afi_t afi = AFI_IP; afi < AFI_MAX; afi++) ++ for (safi_t safi = SAFI_UNICAST; safi < SAFI_MAX; safi++) ++ { ++ if (!CHECK_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_PGBGP)) ++ continue; ++ struct bgp_table *curTable = bgp->rib[afi][safi]; ++ if (!curTable) ++ continue; ++ ++ for (struct bgp_node * rn = bgp_table_top (curTable); rn; ++ rn = bgp_route_next (rn)) ++ { ++ struct bgp_pgbgp_hist *hist = rn->hist; ++ if (hist == NULL) ++ continue; ++ char szPrefix[128]; ++ prefix2str (&rn->p, szPrefix, sizeof (szPrefix)); ++ ++ ++ struct bgp_pgbgp_prefix *pre = hist->p; ++ if (pre && pre->ignoreUntil <= t_now) ++ { ++ if (pre->lastSeen + pgbgp->prefix_hist_time > t_now) ++ fprintf (file, "%d %s %u %u %lld\n", PREFIX_ID, szPrefix, ++ (unsigned int) afi, (unsigned int) safi, ++ (long long int) pre->lastSeen); ++ else ++ continue; ++ } ++ /* Need a prefix in the file before the origins, ++ if no prefix.. skip origins */ ++ else ++ continue; ++ ++ for (struct bgp_pgbgp_origin * cur = hist->o; cur; ++ cur = cur->next) ++ { ++ if (cur->deprefUntil > t_now) ++ continue; ++ ++ if (cur->lastSeen + pgbgp->origin_hist_time > t_now) ++ fprintf (file, "%d %u %lld\n", ORIGIN_ID, cur->originAS, ++ (long long int) cur->lastSeen); ++ } ++ ++ } ++ } ++} ++ ++ ++int ++bgp_pgbgp_garbageCollectHistTable (struct bgp_table *table) ++{ ++ time_t t_now; ++ t_now = time (NULL); ++ ++ ++ for (struct bgp_node * rn = bgp_table_top (table); rn; ++ rn = bgp_route_next (rn)) ++ { ++ int collect = false; ++ struct bgp_pgbgp_hist *hist = rn->hist; ++ if (hist == NULL) ++ continue; ++ ++ struct bgp_pgbgp_origin *cur = hist->o; ++ struct bgp_pgbgp_prefix *pre = hist->p; ++ struct bgp_pgbgp_origin *parent = NULL; ++ ++ int used = false; ++ if (cur != NULL || pre != NULL) ++ used = true; ++ ++ while (cur != NULL) ++ { ++ // Update the lastSeen time w/ originInRIB ++ if (originInRIB (rn, cur)) ++ cur->lastSeen = t_now; ++ ++ collect = false; ++ ++ // Collect if old ++ if (cur->lastSeen + pgbgp->origin_hist_time <= t_now) ++ collect = true; ++ ++ // Collect if anomaly just became okay but not seen since last collection ++ if (cur->deprefUntil != 0 && cur->deprefUntil < t_now) ++ { ++ if (cur->lastSeen < pgbgp->lastgc) ++ collect = true; ++ cur->deprefUntil = 0; ++ } ++ ++ if (collect) ++ { ++ if (parent == NULL) ++ hist->o = cur->next; ++ else ++ parent->next = cur->next; ++ ++ // Delete cur, parent doesn't change ++ struct bgp_pgbgp_origin *del = cur; ++ cur = cur->next; ++ XFREE (MTYPE_BGP_PGBGP_ORIGIN, del); ++ } ++ else ++ { ++ parent = cur; ++ cur = cur->next; ++ } ++ } ++ ++ // Update the lastSeen time w/ prefixInRIB ++ if (pre && prefixInRIB (rn, pre)) ++ pre->lastSeen = t_now; ++ ++ collect = false; ++ ++ // Collect if old ++ if (pre && pre->lastSeen + pgbgp->prefix_hist_time <= t_now) ++ collect = true; ++ ++ // Collect if anomaly just became okay but not seen since last collection ++ if (pre && pre->ignoreUntil != 0 && pre->ignoreUntil < t_now) ++ { ++ if (pre->lastSeen < pgbgp->lastgc) ++ collect = true; ++ pre->ignoreUntil = 0; ++ } ++ ++ if (collect) ++ { ++ for (struct bgp_pgbgp_avoid * av = pre->avoid; av;) ++ { ++ struct bgp_pgbgp_avoid *del = av; ++ av = av->next; ++ bgp_unlock_node (del->sub); ++ XFREE (MTYPE_BGP_PGBGP_AVOID, del); ++ } ++ ++ XFREE (MTYPE_BGP_PGBGP_PREFIX, pre); ++ hist->p = NULL; ++ } ++ ++ // If the node isn't in use, remove it ++ if (used && hist->o == NULL && hist->p == NULL) ++ { ++ XFREE (MTYPE_BGP_PGBGP_HIST, hist); ++ rn->hist = NULL; ++ bgp_unlock_node (rn); ++ } ++ } ++ ++ return 0; ++} ++ ++void ++bgp_pgbgp_cleanHistTable (struct bgp_table *table) ++{ ++ // Clean up the RIB nodes ++ for (struct bgp_node * rn = bgp_table_top (table); rn; ++ rn = bgp_route_next (rn)) ++ { ++ struct bgp_pgbgp_hist *hist = rn->hist; ++ if (hist == NULL) ++ continue; ++ ++ if (hist->p) ++ { ++ for (struct bgp_pgbgp_avoid * av = hist->p->avoid; av;) ++ { ++ struct bgp_pgbgp_avoid *del = av; ++ av = av->next; ++ bgp_unlock_node (del->sub); ++ XFREE (MTYPE_BGP_PGBGP_AVOID, del); ++ } ++ hist->p->avoid = NULL; ++ XFREE (MTYPE_BGP_PGBGP_PREFIX, hist->p); ++ hist->p = NULL; ++ } ++ ++ for (struct bgp_pgbgp_origin * cur = hist->o; cur;) ++ { ++ struct bgp_pgbgp_origin *next = cur->next; ++ XFREE (MTYPE_BGP_PGBGP_ORIGIN, cur); ++ cur = next; ++ } ++ hist->o = NULL; ++ XFREE (MTYPE_BGP_PGBGP_HIST, hist); ++ rn->hist = NULL; ++ bgp_unlock_node (rn); ++ } ++} ++ ++void ++bgp_pgbgp_logOriginAnomaly (as_t asn, struct bgp_node *rn, struct attr *at) ++{ ++ assert (pgbgp); ++ if (!pgbgp->anomalies) ++ return; ++ FILE *file = fopen (pgbgp->anomalies, "a"); ++ if (!file) ++ return; ++ ++ char pre[256]; ++ prefix2str (&rn->p, pre, sizeof (pre)); ++ ++ // MOAS | TIME | NEXTHOP | PREFIX | SUSPICIOUS_ORIGIN | TRUSTED_ORIGINS | PATH ++ fprintf (file, "%d|%lld|%s|%s|%d|", MOAS, (long long int) time (NULL), ++ inet_ntoa (at->nexthop), pre, asn); ++ ++ ++ // Print the trusted origins ++ assert (rn->hist); ++ assert (rn->hist->o); ++ ++ struct bgp_pgbgp_hist *hist = rn->hist; ++ ++ for (struct bgp_pgbgp_origin * cur = hist->o; cur != NULL; cur = cur->next) ++ { ++ if (cur->deprefUntil > time (NULL)) ++ continue; ++ fprintf (file, "%d", cur->originAS); ++ if (cur->next != NULL) ++ fprintf (file, " "); ++ } ++ ++ fprintf (file, " |%s\n", aspath_print (at->aspath)); ++ fclose (file); ++} ++ ++int ++bgp_pgbgp_updateOrigin (struct bgp_pgbgp_hist *hist, struct bgp_info *binfo, ++ struct attr *at, struct bgp_node *rn, time_t t_now, ++ int newPeer) ++{ ++ struct bgp_pgbgp_pathSet pathOrigins; ++ struct bgp_pgbgp_origin *pi = NULL; ++ int status = 0; ++ struct bgp_pgbgp_reuse *r; ++ pathOrigins = bgp_pgbgp_pathOrigin (at->aspath); ++ ++ ++ for (int i = 0; i < pathOrigins.length; i++) ++ { ++ as_t pathOrigin = pathOrigins.ases[i]; ++ ++ /* Is the Origin AS in the history? */ ++ for (pi = hist->o; pi; pi = pi->next) ++ if (pi->originAS == pathOrigin) ++ break; ++ ++ if (pi == NULL) ++ { ++ pi = ++ XCALLOC (MTYPE_BGP_PGBGP_ORIGIN, ++ sizeof (struct bgp_pgbgp_origin)); ++ pi->next = hist->o; ++ pi->originAS = pathOrigin; ++ hist->o = pi; ++ } ++ ++ // If this is our first origin for the prefix, let the sub-prefix ++ // check take care of it ++ if (pi->next == NULL) ++ goto UPO_CLEAN; ++ ++ /* Is the origin currently marked as suspicious? */ ++ if (pi->deprefUntil > t_now) ++ goto UPO_DEPREF; ++ ++ /* Have we seen the origin recently? */ ++ if (pi->lastSeen + pgbgp->origin_hist_time > t_now) ++ goto UPO_CLEAN; ++ ++#ifndef PGBGP_DEBUG ++ /* Are we within the initial grace period? */ ++ if (newPeer) ++ goto UPO_CLEAN; ++#endif ++ ++ /* It must not be in recent history, depref origin for first time */ ++ pi->deprefUntil = t_now + pgbgp->origin_sus_time; ++ bgp_pgbgp_logOriginAnomaly (pathOrigin, rn, at); ++ ++ r = XCALLOC (MTYPE_BGP_PGBGP_REUSE, sizeof (struct bgp_pgbgp_reuse)); ++ r->type = PGBGP_REUSE_ORIGIN; ++ r->deprefUntil = pi->deprefUntil; ++ r->data.origin.originAS = pathOrigin; ++ r->data.origin.rn = rn; ++ bgp_lock_node (rn); ++ pqueue_enqueue (r, pgbgp->reuse_q); ++ pgbgp->rq_size += 1; ++ ++ ++ UPO_DEPREF: ++ SET_FLAG (binfo->flags, BGP_INFO_SUSPICIOUS_O); ++ status = BGP_INFO_SUSPICIOUS_O; ++ ++ UPO_CLEAN: ++ pi->lastSeen = t_now; ++ } ++ return status; ++} ++ ++int ++bgp_pgbgp_reuseOrigin (struct bgp_pgbgp_r_origin data) ++{ ++ struct bgp_info *ri; ++ int numChanged = 0; ++ time_t t_now = time (NULL); ++ assert (data.rn->hist != NULL); ++ ++ // Repreference paths for this prefix that are now okay ++ for (ri = data.rn->info; ri; ri = ri->next) ++ { ++ if (CHECK_FLAG (ri->flags, BGP_INFO_SUSPICIOUS_O)) ++ { ++ struct bgp_pgbgp_pathSet pathOrigins; ++ pathOrigins = bgp_pgbgp_pathOrigin (ri->attr->aspath); ++ int numOkay = 0; ++ for (int i = 0; i < pathOrigins.length; i++) ++ { ++ as_t pathOrigin = pathOrigins.ases[i]; ++ // Find the origin ++ struct bgp_pgbgp_origin *o = NULL; ++ for (o = data.rn->hist->o; o != NULL; o = o->next) ++ if (o->originAS == pathOrigin) ++ break; ++ /* ++ if (o == NULL) { ++ for(struct bgp_pgbgp_origin * z = data.rn->hist->o; z != NULL; z = z->next) ++ printf("Known origin: %d\n", z->originAS); ++ char pre[128]; ++ prefix2str(&data.rn->p, pre, 128); ++ printf("%s : %s : %d\n", pre, ri->attr->aspath->str, pathOrigin); ++ } ++ */ ++ assert (o != NULL); ++ ++ if (o->deprefUntil <= t_now) ++ numOkay += 1; ++ } ++ if (numOkay == pathOrigins.length) ++ { ++ UNSET_FLAG (ri->flags, BGP_INFO_SUSPICIOUS_O); ++ numChanged += 1; ++ } ++ } ++ } ++ ++ ri = data.rn->info; ++ ++ // Rerun the decision process? ++ if (numChanged > 0) ++ bgp_process (ri->peer->bgp, data.rn, data.rn->table->afi, ++ data.rn->table->safi); ++ ++ ++ /* ++ // Remove this (origin,prefix) pair from the normal database ++ // if it's not still in the RIB ++ struct bgp_pgbgp_hist *hist = rn->hist; ++ struct bgp_pgbgp_origin * cur = hist->o; ++ struct bgp_pgbgp_origin * parent = NULL; ++ ++ // Find the origin AS node ++ while(cur != NULL) ++ { ++ if (cur->originAS == data.originAS) ++ { ++ // Delete the node if it hasn't been seen ++ // since the last storage run ++ if (cur->lastSeen < pgbgp->lastStore) { ++ // Delete this node ++ if (parent == NULL) ++ hist->o = cur->next; ++ else ++ parent->next = cur->next; ++ ++ XFREE(MTYPE_BGP_PGBGP_ORIGIN, cur); ++ } ++ break; ++ } ++ parent = cur; ++ cur = cur->next; ++ } ++ */ ++ ++ bgp_unlock_node (data.rn); ++ return 0; ++} ++ ++/*! --------------- MOAS Detection ------------------ !*/ ++ ++ ++/* --------------- Sub-Prefix Detection ------------------ */ ++ ++ ++ ++ ++ ++void ++bgp_pgbgp_logSubprefixAnomaly (as_t asn, struct bgp_node *rn, struct attr *at, ++ struct bgp_node *super) ++{ ++ assert (pgbgp); ++ if (!pgbgp->anomalies) ++ return; ++ FILE *file = fopen (pgbgp->anomalies, "a"); ++ if (!file) ++ return; ++ ++ char pre[256]; ++ prefix2str (&rn->p, pre, sizeof (pre)); ++ ++ char superpre[256]; ++ prefix2str (&super->p, superpre, sizeof (superpre)); ++ ++ // SUBPREFIX | TIME | NEXTHOP | PREFIX | SUPER-PREFIX | SUSPICIOUS_ORIGIN | TRUSTED_ORIGINS | PATH ++ fprintf (file, "%d|%lld|%s|%s|%s|%d|", SUBPREFIX, ++ (long long int) time (NULL), inet_ntoa (at->nexthop), pre, ++ superpre, asn); ++ ++ // Print the trusted origins ++ assert (super->hist); ++ assert (super->hist->o); ++ ++ struct bgp_pgbgp_hist *hist = super->hist; ++ ++ for (struct bgp_pgbgp_origin * cur = hist->o; cur != NULL; cur = cur->next) ++ { ++ if (cur->deprefUntil > time (NULL)) ++ continue; ++ fprintf (file, "%d", cur->originAS); ++ if (cur->next != NULL) ++ fprintf (file, " "); ++ } ++ ++ fprintf (file, " |%s\n", aspath_print (at->aspath)); ++ fclose (file); ++} ++ ++/* ++ If the first path is a prefix of the second, then return true ++ */ ++ ++static int ++bgp_pgbgp_pathIsPrefix(struct aspath *trusted, struct aspath * new) ++{ ++ if (trusted == new) ++ return true; ++ ++ struct assegment *seg1 = trusted->segments; ++ struct assegment *seg2 = new->segments; ++ ++ while (seg1 || seg2) ++ { ++ if ((!seg1 && seg2) || (seg1 && !seg2)) ++ return false; ++ if (seg1->type != seg2->type) ++ return false; ++ ++ if (seg1->length > seg2->length) ++ return false; ++ ++ for(int i = 0; i < seg1->length; i++) ++ if (seg1->as[i] != seg2->as[i]) ++ return false; ++ ++ seg1 = seg1->next; ++ seg2 = seg2->next; ++ } ++ ++ return true; ++} ++ ++int ++bgp_pgbgp_updatePrefix (struct bgp_pgbgp_hist *hist, ++ struct bgp_node *supernode, struct bgp_info *binfo, ++ struct attr *at, struct bgp_node *rn, time_t t_now, ++ int newPeer) ++{ ++ struct bgp_pgbgp_prefix *pre = NULL; ++ struct bgp_pgbgp_reuse *r = NULL; ++ int status = 0; ++ int changed = false; ++ ++ pre = hist->p; ++ ++ ++ /* Do we have this prefix? */ ++ if (pre == NULL) ++ { ++ pre = ++ XCALLOC (MTYPE_BGP_PGBGP_PREFIX, sizeof (struct bgp_pgbgp_prefix)); ++ hist->p = pre; ++ } ++ ++ /* Is the prefix currently marked as suspicious? */ ++ if (pre->ignoreUntil > t_now) ++ { ++ goto UPP_IGNORE; ++ } ++ ++ /* Should this neighbor be avoided for this prefix because it ++ sent us info. about a suspicious sub-prefix? */ ++ for (struct bgp_pgbgp_avoid * av = hist->p->avoid; av; av = av->next) ++ { ++ if (binfo->peer->as == av->peerASN && av->avoidUntil > t_now) ++ { ++ SET_FLAG (binfo->flags, BGP_INFO_SUSPICIOUS_P); ++ status = BGP_INFO_SUSPICIOUS_P; ++ goto UPP_DONE; ++ } ++ } ++ ++ /* Have we seen the prefix recently? */ ++ if (pre->lastSeen + pgbgp->prefix_hist_time > t_now) ++ goto UPP_DONE; ++ ++#ifndef PGBGP_DEBUG ++ /* Are we within the initial grace period? */ ++ if (newPeer) ++ goto UPP_DONE; ++#endif ++ ++ /* Is there a less specific *in recent history* that this could be hijacking? */ ++ if (supernode == NULL) ++ goto UPP_DONE; ++ ++ /* Does this path the super-net's non-anomalous path from this peer? If so it's okay */ ++ int found = false; ++ for (struct bgp_info * ri = supernode->info; ri; ri = ri->next) ++ { ++ if (ri->peer->as == binfo->peer->as) ++ { ++ if (!ANOMALOUS(ri->flags) && bgp_pgbgp_pathIsPrefix(ri->attr->aspath, at->aspath)) ++ found = true; ++ break; ++ } ++ } ++ ++ if (found) ++ goto UPP_DONE; ++ ++ /* ++ It's not in recent history, and there is a less specific currently in use ++ Response: ++ . Ignore this prefix ++ . Make the less specific's route for this neighbor suspicious ++ */ ++ ++ ++ pre->ignoreUntil = t_now + pgbgp->sub_sus_time; ++ ++ struct bgp_pgbgp_pathSet pathOrigins; ++ pathOrigins = bgp_pgbgp_pathOrigin (at->aspath); ++ for (int i = 0; i < pathOrigins.length; i++) ++ bgp_pgbgp_logSubprefixAnomaly (pathOrigins.ases[i], rn, at, supernode); ++ ++ ++ ++ r = XCALLOC (MTYPE_BGP_PGBGP_REUSE, sizeof (struct bgp_pgbgp_reuse)); ++ r->type = PGBGP_REUSE_PREFIX; ++ r->deprefUntil = pre->ignoreUntil; ++ r->data.prefix.rn = rn; ++ r->data.prefix.rnsuper = supernode; ++ bgp_lock_node (rn); ++ bgp_lock_node (supernode); ++ pqueue_enqueue (r, pgbgp->reuse_q); ++ pgbgp->rq_size += 1; ++ ++UPP_IGNORE: ++ // Sanity check ++ if (supernode == NULL) ++ goto UPP_DONE; ++ ++ /* Set the less specific's route from this peer to suspicious */ ++ changed = false; ++ ++ for (struct bgp_info * ri = supernode->info; ri; ri = ri->next) ++ { ++ if (ri->peer->as == binfo->peer->as) ++ { ++ if (!CHECK_FLAG (ri->flags, BGP_INFO_SUSPICIOUS_P)) ++ { ++ SET_FLAG (ri->flags, BGP_INFO_SUSPICIOUS_P); ++ changed = true; ++ } ++ break; ++ } ++ } ++ ++ // Make note of it in the less specific's history information ++ found = false; ++ struct bgp_pgbgp_hist *superhist = supernode->hist; ++ ++ if (superhist && superhist->p) ++ { ++ for (struct bgp_pgbgp_avoid * av = superhist->p->avoid; av; ++ av = av->next) ++ { ++ if (av->peerASN == binfo->peer->as) ++ { ++ if (av->avoidUntil < pre->ignoreUntil) ++ av->avoidUntil = pre->ignoreUntil; ++ found = true; ++ break; ++ } ++ } ++ if (!found) ++ { ++ struct bgp_pgbgp_avoid *newavoid = ++ XCALLOC (MTYPE_BGP_PGBGP_AVOID, sizeof (struct bgp_pgbgp_avoid)); ++ newavoid->peerASN = binfo->peer->as; ++ newavoid->avoidUntil = pre->ignoreUntil; ++ newavoid->next = superhist->p->avoid; ++ newavoid->sub = rn; ++ bgp_lock_node (rn); ++ superhist->p->avoid = newavoid; ++ } ++ } ++ /* ++ ignore this route unless the supernet's node ++ is only a placeholder from loaded pgbgp data ++ */ ++ if (bgp_pgbgp_shouldIgnore (supernode, bgp_pgbgp_selected (supernode))) ++ { ++ SET_FLAG (binfo->flags, BGP_INFO_IGNORED_P); ++ status = BGP_INFO_IGNORED_P; ++ } ++ if (changed) ++ { ++ struct bgp_info *ri = supernode->info; ++ bgp_process (ri->peer->bgp, supernode, supernode->table->afi, ++ supernode->table->safi); ++ } ++ ++UPP_DONE: ++ pre->lastSeen = t_now; ++ ++ return status; ++} ++ ++int ++bgp_pgbgp_reusePrefix (struct bgp_pgbgp_r_prefix data) ++{ ++ struct bgp_info *ri = NULL; ++ ++ time_t t_now = time (NULL); ++ ++ // Repreference all routes for this node ++ for (ri = data.rn->info; ri; ri = ri->next) ++ UNSET_FLAG (ri->flags, BGP_INFO_IGNORED_P); ++ ri = data.rn->info; ++ ++ // Rerun the decision process ++ if (ri != NULL) ++ bgp_process (ri->peer->bgp, data.rn, data.rn->table->afi, ++ data.rn->table->safi); ++ ++ ++ // Remove the avoid nodes from the super ++ struct bgp_pgbgp_hist *superhist = data.rnsuper->hist; ++ if (superhist != NULL && superhist->p != NULL) ++ { ++ struct bgp_pgbgp_avoid *parent = NULL; ++ for (struct bgp_pgbgp_avoid * av = superhist->p->avoid; av;) ++ { ++ int numChanged = 0; ++ if (av->avoidUntil <= t_now) ++ { ++ struct bgp_pgbgp_avoid *del = av; ++ av = av->next; ++ if (parent == NULL) ++ superhist->p->avoid = av; ++ else ++ parent->next = av; ++ ++ // Repreference any routes ++ for (ri = data.rnsuper->info; ri; ri = ri->next) ++ { ++ if (ri->peer->as == del->peerASN) ++ { ++ UNSET_FLAG (ri->flags, BGP_INFO_SUSPICIOUS_P); ++ numChanged += 1; ++ break; ++ } ++ } ++ ri = data.rnsuper->info; ++ ++ if (numChanged > 0 && ri != NULL) ++ bgp_process (ri->peer->bgp, data.rnsuper, ++ data.rnsuper->table->afi, ++ data.rnsuper->table->safi); ++ bgp_unlock_node (del->sub); ++ XFREE (MTYPE_BGP_PGBGP_AVOID, del); ++ } ++ else ++ { ++ parent = av; ++ av = av->next; ++ } ++ } ++ } ++ ++ // Remove this prefix from the normal database ++ // if it hasn't been seen in the RIB since the last ++ // storage run ++ /* ++ struct bgp_pgbgp_hist *hist = rn->hist; ++ struct bgp_pgbgp_prefix * pre = hist->p; ++ ++ if (pre && pre->lastSeen < pgbgp->lastStore) ++ { ++ // Delete this node ++ for(struct bgp_pgbgp_avoid * av = hist->p->avoid; av;) ++ { ++ struct bgp_pgbgp_avoid *del = av; ++ av = av->next; ++ bgp_unlock_node(del->sub); ++ XFREE (MTYPE_BGP_PGBGP_AVOID, del); ++ } ++ XFREE(MTYPE_BGP_PGBGP_PREFIX, pre); ++ hist->p = NULL; ++ } ++ */ ++ bgp_unlock_node (data.rn); ++ bgp_unlock_node (data.rnsuper); ++ return 0; ++} ++ ++/*! --------------- Sub-Prefix Detection ------------------ !*/ ++ ++ ++ ++ ++ ++/* --------------- Edge Detection ------------------ */ ++ ++static void ++edge_store_clear_iterator (struct hash_backet *backet, void *file) ++{ ++ struct bgp_pgbgp_edge *hedge = backet->data; ++} ++ ++static void ++edge_store_iterator (struct hash_backet *backet, FILE * file) ++{ ++ struct bgp_pgbgp_edge *hedge = backet->data; ++ time_t t_now = time (NULL); ++ if (hedge->deprefUntil > t_now) ++ return; ++ if (hedge->lastSeen + pgbgp->edge_hist_time > t_now) ++ { ++ fprintf (file, "%d %u %u %lld\n", EDGE_ID, hedge->e.a, hedge->e.b, ++ (long long int) hedge->lastSeen); ++ } ++} ++ ++ ++void ++bgp_pgbgp_storeEdges (struct bgp_table *table, FILE * file) ++{ ++ hash_iterate (pgbgp->edgeT, ++ (void (*)(struct hash_backet *, void *)) ++ edge_store_iterator, file); ++ return; ++} ++ ++ ++int ++bgp_pgbgp_restoreEdge (FILE * file) ++{ ++ unsigned int a, b; ++ long long int lastSeen; ++ fscanf (file, "%u %u %lld", &a, &b, &lastSeen); ++ struct bgp_pgbgp_edge finder; ++ finder.e.a = a; ++ finder.e.b = b; ++ finder.lastSeen = lastSeen; ++ struct bgp_pgbgp_edge *hedge = ++ hash_get (pgbgp->edgeT, &finder, edge_hash_alloc); ++ hedge->lastSeen = finder.lastSeen; ++ return 0; ++} ++ ++unsigned int ++edge_key_make (void *p) ++{ ++ struct bgp_pgbgp_edge *pe = p; ++ struct edge *e = &pe->e; ++ return (e->a << 16) + e->b; ++} ++ ++static int ++edge_cmp (const void *arg1, const void *arg2) ++{ ++ ++ const struct edge *e1 = &((const struct bgp_pgbgp_edge *) arg1)->e; ++ const struct edge *e2 = &((const struct bgp_pgbgp_edge *) arg2)->e; ++ if (e1->a == e2->a && e1->b == e2->b) ++ return 1; ++ return 0; ++} ++ ++static void * ++edge_hash_alloc (void *arg) ++{ ++ struct bgp_pgbgp_edge *hedge = ++ XCALLOC (MTYPE_BGP_PGBGP_EDGE, sizeof (struct bgp_pgbgp_edge)); ++ struct bgp_pgbgp_edge *lookup = arg; ++ if (hedge == NULL) ++ return NULL; ++ hedge->e = lookup->e; ++ return hedge; ++} ++ ++ ++static void ++edge_gc_iterator (struct hash_backet *backet, time_t * time) ++{ ++ time_t t_now = *time; ++ struct bgp_pgbgp_edge *hedge = backet->data; ++ ++ int collect = false; ++ ++ // Collect if we haven't seen it in awhile ++ if (hedge->lastSeen + pgbgp->edge_hist_time <= t_now) ++ collect = true; ++ ++ // Collect if it has just gotten out of anomaly stage ++ // but hasn't been in the RIB since the last GC ++ if (hedge->deprefUntil != 0 && hedge->deprefUntil < t_now) ++ { ++ if (hedge->lastSeen < pgbgp->lastgc) ++ collect = true; ++ hedge->deprefUntil = 0; ++ } ++ ++ if (collect) ++ { ++ struct bgp_pgbgp_edge *ret = hash_release (pgbgp->edgeT, hedge); ++ assert (ret != NULL); ++ XFREE (MTYPE_BGP_PGBGP_EDGE, hedge); ++ } ++} ++ ++ ++ ++static void ++edge_update_iterator (struct hash_backet *backet, void *v) ++{ ++ struct aspath *p = backet->data; ++ time_t t_now = time (NULL); ++ int first = true; ++ ++ struct edge cur; ++ cur.a = 0; ++ cur.b = 0; ++ struct assegment *seg; ++ struct bgp_pgbgp_edge *hedge = NULL; ++ for (seg = p->segments; seg; seg = seg->next) ++ { ++ for (int i = 0; i < seg->length; i++) ++ { ++ cur.a = cur.b; ++ cur.b = seg->as[i]; ++ if (first) ++ { ++ first = false; ++ continue; ++ } ++ if (cur.a == cur.b) ++ continue; ++ // printf("%d -- %d\n", cur.a, cur.b); ++ struct bgp_pgbgp_edge finder; ++ finder.e = cur; ++ hedge = hash_lookup (pgbgp->edgeT, &finder); ++ ++ if (!hedge) ++ continue; ++ hedge->lastSeen = t_now; ++ } ++ } ++} ++ ++int ++bgp_pgbgp_garbageCollectEdges (struct bgp_table *table) ++{ ++ // Update the timings ++ hash_iterate (ashash, ++ (void (*)(struct hash_backet *, void *)) ++ edge_update_iterator, NULL); ++ ++ // Perform the collection ++ time_t t_now = time (NULL); ++ hash_iterate (pgbgp->edgeT, ++ (void (*)(struct hash_backet *, void *)) ++ edge_gc_iterator, &t_now); ++ return 0; ++} ++ ++static void ++edge_clean_iterator (struct hash_backet *backet, void *a1) ++{ ++ struct bgp_pgbgp_edge *hedge = backet->data; ++ struct bgp_pgbgp_edge *ret = hash_release (pgbgp->edgeT, hedge); ++ assert (ret != NULL); ++ XFREE (MTYPE_BGP_PGBGP_EDGE, hedge); ++} ++ ++static void ++bgp_pgbgp_cleanEdges (void) ++{ ++ if (pgbgp->edgeT != NULL) ++ { ++ hash_iterate (pgbgp->edgeT, ++ (void (*)(struct hash_backet *, void *)) ++ edge_clean_iterator, NULL); ++ hash_free (pgbgp->edgeT); ++ } ++ return; ++} ++ ++void ++bgp_pgbgp_logEdgeAnomaly (struct bgp_node *rn, struct attr *at, ++ struct edge *edge) ++{ ++ assert (pgbgp); ++ if (!pgbgp->anomalies) ++ return; ++ FILE *file = fopen (pgbgp->anomalies, "a"); ++ if (!file) ++ return; ++ ++ char pre[256]; ++ prefix2str (&rn->p, pre, sizeof (pre)); ++ ++ // EDGE | TIME | NEXTHOP | PREFIX | PATH | Edge.a | Edge.b ++ ++ fprintf (file, "%d|%lld|%s|%s|%s|%d|%d\n", EDGE, ++ (long long int) time (NULL), inet_ntoa (at->nexthop), pre, ++ aspath_print (at->aspath), edge->a, edge->b); ++ ++ fclose (file); ++} ++ ++ ++int ++bgp_pgbgp_updateEdge (struct bgp_pgbgp_hist *hist, struct bgp_info *binfo, ++ struct attr *at, struct bgp_node *rn, time_t t_now, ++ int newPeer) ++{ ++ ++ char first = true; ++ struct edge curEdge; ++ curEdge.a = 0; ++ curEdge.b = 0; ++ ++ ++ if (at->aspath == NULL) ++ return 0; ++ struct assegment *seg = at->aspath->segments; ++ if (seg == NULL) ++ return 0; ++ time_t max_depref = 0; ++ for (seg = at->aspath->segments; seg; seg = seg->next) ++ { ++ for (int i = 0; i < seg->length; i++) ++ { ++ curEdge.a = curEdge.b; ++ curEdge.b = seg->as[i]; ++ if (first) ++ { ++ first = false; ++ continue; ++ } ++ if (curEdge.a == curEdge.b) ++ continue; ++ ++ // We have an edge to consider ++ struct bgp_pgbgp_edge finder; ++ finder.e = curEdge; ++ struct bgp_pgbgp_edge *hedge = ++ hash_get (pgbgp->edgeT, &finder, edge_hash_alloc); ++ ++ // Is this edge marked as suspicious? ++ if (hedge->deprefUntil > t_now) ++ goto UPE_DEPREF; ++ ++ // Have we seen the edge recently? ++ if (hedge->lastSeen + pgbgp->edge_hist_time > t_now) ++ goto UPE_CLEAN; ++#ifndef PGBGP_DEBUG ++ /* Are we within the initial grace period? */ ++ if (newPeer) ++ goto UPE_CLEAN; ++#endif ++ // It must not be in recent history, depref edge for first time ++ hedge->deprefUntil = t_now + pgbgp->edge_sus_time; ++ bgp_pgbgp_logEdgeAnomaly (rn, at, &curEdge); ++ ++ ++ UPE_DEPREF: ++ if (hedge->deprefUntil > max_depref) ++ max_depref = hedge->deprefUntil; ++ UPE_CLEAN: ++ hedge->lastSeen = t_now; ++ } ++ } ++ if (max_depref) ++ { ++ SET_FLAG (binfo->flags, BGP_INFO_SUSPICIOUS_E); ++ if (!hist->pEdgeReuse) ++ { ++ struct bgp_pgbgp_reuse *r; ++ r = ++ XCALLOC (MTYPE_BGP_PGBGP_REUSE, sizeof (struct bgp_pgbgp_reuse)); ++ r->type = PGBGP_REUSE_EDGE; ++ r->deprefUntil = max_depref; ++ r->data.edge.rn = rn; ++ bgp_lock_node (rn); ++ pqueue_enqueue (r, pgbgp->reuse_q); ++ pgbgp->rq_size += 1; ++ hist->pEdgeReuse = r; ++ } ++ return BGP_INFO_SUSPICIOUS_E; ++ } ++ ++ return 0; ++} ++ ++int ++bgp_pgbgp_reuseEdge (struct bgp_pgbgp_r_edge data) ++{ ++ ++ // Okay, go through all of the paths for the prefix ++ // and find the path that needs to be updated next and ++ // enqueue it ++ time_t minMax = 0; ++ int numChanged = 0; ++ time_t t_now = time (NULL); ++ ++ for (struct bgp_info * ri = data.rn->info; ri; ri = ri->next) ++ { ++ char first = true; ++ struct edge curEdge = { 0, 0 }; ++ struct assegment *seg; ++ time_t max_depref = 0; ++ ++ for (seg = ri->attr->aspath->segments; seg; seg = seg->next) ++ { ++ for (int i = 0; i < seg->length; i++) ++ { ++ curEdge.a = curEdge.b; ++ curEdge.b = seg->as[i]; ++ if (first) ++ { ++ first = false; ++ continue; ++ } ++ struct bgp_pgbgp_edge finder; ++ finder.e = curEdge; ++ struct bgp_pgbgp_edge *hedge = ++ hash_lookup (pgbgp->edgeT, &finder); ++ if (!hedge) ++ continue; ++ // Is this edge suspicious? ++ if (hedge->deprefUntil > t_now ++ && hedge->deprefUntil > max_depref) ++ max_depref = hedge->deprefUntil; ++ } ++ } ++ ++ if (max_depref) ++ { ++ if (!minMax || max_depref < minMax) ++ minMax = max_depref; ++ } ++ else ++ { ++ if (CHECK_FLAG (ri->flags, BGP_INFO_SUSPICIOUS_E)) ++ { ++ UNSET_FLAG (ri->flags, BGP_INFO_SUSPICIOUS_E); ++ numChanged += 1; ++ } ++ } ++ } ++ struct bgp_info *ri = data.rn->info; ++ if (numChanged > 0 && ri) ++ bgp_process (ri->peer->bgp, data.rn, data.rn->table->afi, ++ data.rn->table->safi); ++ ++ struct bgp_pgbgp_hist *hist = data.rn->hist; ++ hist->pEdgeReuse = NULL; ++ ++ if (minMax) ++ { ++ struct bgp_pgbgp_reuse *r; ++ r = XCALLOC (MTYPE_BGP_PGBGP_REUSE, sizeof (struct bgp_pgbgp_reuse)); ++ r->type = PGBGP_REUSE_EDGE; ++ r->deprefUntil = minMax; ++ r->data.edge.rn = data.rn; ++ pqueue_enqueue (r, pgbgp->reuse_q); ++ pgbgp->rq_size += 1; ++ hist->pEdgeReuse = r; ++ } ++ else ++ { ++ bgp_unlock_node (data.rn); ++ } ++ ++ return 0; ++} +--- /dev/null ++++ b/bgpd/bgp_pgbgp.h +@@ -0,0 +1,286 @@ ++/* BGP Pretty Good BGP ++ Copyright (C) 2008 University of New Mexico (Josh Karlin) ++ ++This file is part of GNU Zebra. ++ ++GNU Zebra 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. ++ ++GNU Zebra 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 Zebra; see the file COPYING. If not, write to the Free ++Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++02111-1307, USA. */ ++ ++#ifndef _QUAGGA_BGP_PGBGP_H ++#define _QUAGGA_BGP_PGBGP_H ++ ++#include "bgpd.h" ++#include "bgp_route.h" ++#include "table.h" ++ ++#define MOAS 0 ++#define SUBPREFIX 1 ++#define EDGE 2 ++ ++/* Global PGBGP data */ ++struct bgp_pgbgp_config ++{ ++ /* Depref time for a new origin AS */ ++ time_t origin_sus_time; ++ ++ /* Depref time for a new edge */ ++ time_t edge_sus_time; ++ ++ /* Depref time for a new sub-prefix */ ++ time_t sub_sus_time; ++ ++ /* Origin AS Mapping History Length */ ++ time_t origin_hist_time; ++ ++ /* Prefix Mapping History Length */ ++ time_t prefix_hist_time; ++ ++ /* Edge Mapping History Length */ ++ time_t edge_hist_time; ++ ++ /* Peer Mapping History Length */ ++ time_t peer_hist_time; ++ ++ /* The list of depreferenced routes */ ++ struct pqueue *reuse_q; ++ int rq_size; ++ ++ /* Time that the last garbage collection (gc) took place */ ++ time_t lastgc; ++ ++ /* History table */ ++ // struct route_table *histT; ++ ++ /* Edge Hash Table */ ++ struct hash *edgeT; ++ ++ /* File path for history storage */ ++ char *storage; ++ ++ /* File path for dump of anomalous routes */ ++ char *anomalies; ++ ++ /* The time that we last stored to disk */ ++ time_t lastStore; ++ ++ /* The time that PGBGP started counting */ ++ time_t startTime; ++ ++ /* Last time each peer was seen */ ++ struct bgp_pgbgp_peerTime *peerLast; ++ ++}; ++ ++ ++struct bgp_pgbgp_peerTime ++{ ++ struct bgp_pgbgp_peerTime *next; ++ time_t lastSeen; ++ union sockunion su; ++ time_t deprefUntil; ++}; ++ ++struct edge ++{ ++ as_t a; ++ as_t b; ++}; ++ ++/* ++ Avoid the neighbors for the less specific that told you about ++ the more specific ++ */ ++struct bgp_pgbgp_avoid ++{ ++ struct bgp_pgbgp_avoid *next; ++ time_t avoidUntil; ++ as_t peerASN; ++ struct bgp_node *sub; ++}; ++ ++/* A list of origin ASes for a path ++ Usually it's only one but if the last AS ++ in the path is an AS set, then the whole ++ set must be returned ++*/ ++struct bgp_pgbgp_pathSet ++{ ++ int length; ++ as_t *ases; ++}; ++ ++/* ++ Avoid paths with suspicious origins ++ */ ++struct bgp_pgbgp_origin ++{ ++ struct bgp_pgbgp_origin *next; ++ time_t lastSeen; ++ time_t deprefUntil; ++ as_t originAS; ++}; ++ ++/* ++ Ignore routes for this prefix ++ */ ++struct bgp_pgbgp_prefix ++{ ++ time_t lastSeen; ++ time_t ignoreUntil; ++ struct bgp_pgbgp_avoid *avoid; ++}; ++ ++struct bgp_pgbgp_edge ++{ ++ time_t lastSeen; ++ time_t deprefUntil; ++ struct edge e; ++}; ++ ++struct bgp_pgbgp_hist ++{ ++ struct bgp_pgbgp_origin *o; ++ struct bgp_pgbgp_prefix *p; ++ struct bgp_pgbgp_reuse *pEdgeReuse; ++}; ++ ++struct bgp_pgbgp_r_origin ++{ ++ as_t originAS; ++ struct bgp_node *rn; ++}; ++ ++struct bgp_pgbgp_r_prefix ++{ ++ struct bgp_node *rn; ++ struct bgp_node *rnsuper; ++}; ++ ++/* ++ This node contained a route with a bad edge, check ++ it again for bad edges in 24 hours ++*/ ++struct bgp_pgbgp_r_edge ++{ ++ struct bgp_node *rn; ++}; ++ ++ ++union reuseTypes ++{ ++ struct bgp_pgbgp_r_origin origin; ++ struct bgp_pgbgp_r_prefix prefix; ++ struct bgp_pgbgp_r_edge edge; ++}; ++ ++struct bgp_pgbgp_reuse ++{ ++ union reuseTypes data; ++ short type; ++ time_t deprefUntil; ++}; ++ ++#define ANOMALOUS(V) \ ++(CHECK_FLAG(V, BGP_INFO_SUSPICIOUS_O | BGP_INFO_SUSPICIOUS_P \ ++ | BGP_INFO_SUSPICIOUS_E | BGP_INFO_IGNORED_P)) ++ ++#define PGBGP_REUSE_ORIGIN 0 ++#define PGBGP_REUSE_PREFIX 1 ++#define PGBGP_REUSE_EDGE 2 ++ ++#define BGP_PGBGP_NONE 0 ++#define BGP_PGBGP_DEPREFFED 1 ++ ++// For storage ++#define ORIGIN_ID 0 ++#define PREFIX_ID 1 ++#define EDGE_ID 2 ++#define PEER_ID 3 ++ ++/* Default timing values */ ++#define DEFAULT_ORIGIN_SUS (86400 * 1) ++#define DEFAULT_EDGE_SUS (86400 * 1) ++#define DEFAULT_SUB_SUS (86400 * 1) ++#define DEFAULT_ORIGIN_HIST (86400 * 30) ++#define DEFAULT_PREFIX_HIST (86400 * 10) ++#define DEFAULT_EDGE_HIST (86400 * 60) ++// Time between garbage collections ++#define PGBGP_GC_DELTA (3600) ++// Time between file stores ++#define PGBGP_STORE_DELTA (28800) ++// Time that a new peer's routes are not considered suspicious ++#define PGBGP_PEER_GRACE (86400 * 1) ++ ++ ++ ++///////// PUBLIC PGBGP FUNCTIONS ///////// ++ ++/* ++ bgp_pgbgp_enable: ++ Enable PGBGP depreferencing / history tracking for this afi/safi ++ ++ Arguments: ++ . ost: Depref. time of new prefix origins (in hours) ++ . est: Depref. time of new edges (in hours) ++ . sst: Depref. time of new sub-prefixes (in hours) ++ . oht: Storage time of known origins for prefixes (in days) ++ . pht: Storage time of known prefixes (in days) ++ . eht: Storage time of known edges (in days) ++ . storage: File to periodically store history in (can be /dev/null) ++ . anoms: File to store history of depreferenced routes (can be /dev/null) ++ ++ Caution: ++ It is important that the storage times are longer than the depreference times ++*/ ++extern int bgp_pgbgp_enable (struct bgp *, afi_t afi, safi_t safi, int ost, ++ int est, int sst, int oht, int pht, int eht, ++ const char *storage, const char *anoms); ++extern int bgp_pgbgp_disable (struct bgp *, afi_t afi, safi_t safi); ++ ++/* ++ bgp_pgbgp_update: ++ Call on the event of an announcement update ++ ++ Arguments: ++ bgp_info: The route ++ at: The new route's attributes ++*/ ++extern int bgp_pgbgp_update (struct bgp_info *, struct attr *at, ++ struct bgp_node *); ++ ++/* ++ bgp_pgbgp_rib_updated: ++ Call upon discovery of a new best path (or lack thereof) ++ ++ This is a special case function for smoothly handling sub-prefix hijacks. ++ ++ It handles the following 2 events: ++ ++ Event 1: An anomalous sub-prefix is ignored, but no best route for the super-prefix exists ++ Response: Announce the sub-prefix until the super-prefix comes back ++ ++ Event 2: A super-prefix comes back to the RIB and its anomalous sub-prefix is in use ++ Response: Ignore the sub-prefix again ++ ++ Arguments: ++ rn: The route node that a new best path was found for ++ old_best: The old best route (NULL if one did not exist) ++ new_best: The current best route (NULL if one does not exist) ++ */ ++extern int ++bgp_pgbgp_rib_updated (struct bgp_node *rn, struct bgp_info *old_best, ++ struct bgp_info *new_best); ++ ++#endif +--- a/bgpd/bgp_route.c ++++ b/bgpd/bgp_route.c +@@ -51,6 +51,7 @@ Software Foundation, Inc., 59 Temple Pla + #include "bgpd/bgp_mplsvpn.h" + #include "bgpd/bgp_nexthop.h" + #include "bgpd/bgp_damp.h" ++#include "bgpd/bgp_pgbgp.h" + #include "bgpd/bgp_advertise.h" + #include "bgpd/bgp_zebra.h" + #include "bgpd/bgp_vty.h" +@@ -332,12 +333,19 @@ bgp_info_cmp (struct bgp *bgp, struct bg + int confed_as_route = 0; + int ret; + ++ + /* 0. Null check. */ + if (new == NULL) + return 0; + if (exist == NULL) + return 1; + ++ /* 0.5 PGBGP Depref. Check */ ++ if (ANOMALOUS(exist->flags) && !ANOMALOUS(new->flags)) ++ return 1; ++ if (!ANOMALOUS(exist->flags) && ANOMALOUS(new->flags)) ++ return 0; ++ + /* 1. Weight check. */ + if (new->attr->extra) + new_weight = new->attr->extra->weight; +@@ -1508,6 +1516,10 @@ bgp_process_main (struct work_queue *wq, + bgp_info_unset_flag (rn, new_select, BGP_INFO_ATTR_CHANGED); + } + ++ /* PGBGP needs to know about selected routes */ ++ if (CHECK_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_PGBGP)) ++ bgp_pgbgp_rib_updated(rn, old_select, new_select); ++ + + /* Check each BGP peer. */ + for (ALL_LIST_ELEMENTS (bgp->peer, node, nnode, peer)) +@@ -1831,6 +1843,11 @@ bgp_update_rsclient (struct peer *rsclie + /* If the update is implicit withdraw. */ + if (ri) + { ++ /* Update PGBGP state, and mark the route as anomalous if necessary */ ++ if (CHECK_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_PGBGP) ++ && peer_sort(peer) == BGP_PEER_EBGP) ++ bgp_pgbgp_update(ri, attr_new, rn); ++ + ri->uptime = bgp_clock (); + + /* Same attribute comes in. */ +@@ -2262,6 +2279,11 @@ bgp_update_main (struct peer *peer, stru + /* Increment prefix */ + bgp_aggregate_increment (bgp, p, new, afi, safi); + ++ /* Update PGBGP state, and mark the route as anomalous if necessary */ ++ if (CHECK_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_PGBGP) ++ && peer_sort(peer) == BGP_PEER_EBGP) ++ bgp_pgbgp_update(new, attr_new, rn); ++ + /* Register new BGP information. */ + bgp_info_add (rn, new); + +@@ -5474,6 +5496,20 @@ enum bgp_display_type + static void + route_vty_short_status_out (struct vty *vty, struct bgp_info *binfo) + { ++ if (ANOMALOUS(binfo->flags)) ++ { ++ vty_out(vty, "a["); ++ if (CHECK_FLAG(binfo->flags, BGP_INFO_SUSPICIOUS_P)) ++ vty_out(vty, "i"); ++ if (CHECK_FLAG(binfo->flags, BGP_INFO_SUSPICIOUS_O)) ++ vty_out(vty, "p"); ++ if (CHECK_FLAG(binfo->flags, BGP_INFO_SUSPICIOUS_E)) ++ vty_out(vty, "e"); ++ if (CHECK_FLAG(binfo->flags, BGP_INFO_IGNORED_P)) ++ vty_out(vty, "s"); ++ vty_out(vty, "] "); ++ } ++ + /* Route status display. */ + if (CHECK_FLAG (binfo->flags, BGP_INFO_REMOVED)) + vty_out (vty, "R"); +@@ -5974,6 +6010,7 @@ route_vty_out_detail (struct vty *vty, s + } + + #define BGP_SHOW_SCODE_HEADER "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,%s r RIB-failure, S Stale, R Removed%s" ++#define BGP_SHOW_PCODE_HEADER "Status code: a (anomalous) of: [p] prefix hijack, [s] sub-prefix hijack,%s [i] informant of sub-prefix [e] new edge%s" + #define BGP_SHOW_OCODE_HEADER "Origin codes: i - IGP, e - EGP, ? - incomplete%s%s" + #define BGP_SHOW_HEADER " Network Next Hop Metric LocPrf Weight Path%s" + #define BGP_SHOW_DAMP_HEADER " Network From Reuse Path%s" +@@ -6005,7 +6042,8 @@ enum bgp_show_type + bgp_show_type_flap_route_map, + bgp_show_type_flap_neighbor, + bgp_show_type_dampend_paths, +- bgp_show_type_damp_neighbor ++ bgp_show_type_damp_neighbor, ++ bgp_show_type_anomalous_paths + }; + + static int +@@ -6172,11 +6210,17 @@ bgp_show_table (struct vty *vty, struct + || CHECK_FLAG (ri->flags, BGP_INFO_HISTORY)) + continue; + } ++ if (type == bgp_show_type_anomalous_paths) ++ { ++ if (! ANOMALOUS(ri->flags)) ++ continue; ++ } + + if (header) + { + vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (*router_id), VTY_NEWLINE); + vty_out (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE); ++ vty_out (vty, BGP_SHOW_PCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE); + vty_out (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE); + if (type == bgp_show_type_dampend_paths + || type == bgp_show_type_damp_neighbor) +@@ -6254,6 +6298,7 @@ bgp_show (struct vty *vty, struct bgp *b + return bgp_show_table (vty, table, &bgp->router_id, type, output_arg); + } + ++ + /* Header of detailed BGP route information */ + static void + route_vty_out_detail_header (struct vty *vty, struct bgp *bgp, +@@ -11063,6 +11108,64 @@ DEFUN (bgp_damp_set, + half, reuse, suppress, max); + } + ++DEFUN (bgp_pgbgp_arg, ++ bgp_pgbgp_arg_cmd, ++ "bgp pgbgp <1-100> <1-100> <1-100> <1-365> <1-365> <1-365> WORD WORD", ++ "BGP Specific commands\n" ++ "Enable Pretty Good BGP\n" ++ "New origin depref time (in hours)\n" ++ "New edge depref time (in hours)\n" ++ "New sub-prefix depref time (in hours)\n" ++ "Origin history time (in days)\n" ++ "Prefix history time (in days)\n" ++ "Edge history time (in days)\n" ++ "Log file for history data\n" ++ "Log file of anomalies\n") ++{ ++ struct bgp *bgp; ++ ++ int ost = DEFAULT_ORIGIN_SUS; ++ int est = DEFAULT_EDGE_SUS; ++ int sst = DEFAULT_SUB_SUS; ++ int oht = DEFAULT_ORIGIN_HIST; ++ int pht = DEFAULT_PREFIX_HIST; ++ int eht = DEFAULT_EDGE_HIST; ++ const char* path = "/var/log/quagga/pgbgp_hist"; ++ const char* anoms = "/var/log/quagga/pgbgp_anomalies"; ++ ++ if (argc == 8) ++ { ++ VTY_GET_INTEGER("origin depref time", ost, argv[0]); ++ VTY_GET_INTEGER("edge depref time", est, argv[1]); ++ VTY_GET_INTEGER("sub-prefix depref time", sst, argv[2]); ++ VTY_GET_INTEGER("origin history time", oht, argv[3]); ++ VTY_GET_INTEGER("prefix history time", pht, argv[4]); ++ VTY_GET_INTEGER("edge history time", eht, argv[5]); ++ path = argv[6]; ++ anoms = argv[7]; ++ } ++ ++ bgp = vty->index; ++ return bgp_pgbgp_enable(bgp, bgp_node_afi (vty), bgp_node_safi (vty), ++ ost, est, sst, oht, pht, eht, path, anoms); ++} ++ ++ALIAS (bgp_pgbgp_arg, ++ bgp_pgbgp_cmd, ++ "bgp pgbgp", ++ "BGP specific commands\n" ++ "Enable Pretty Good BGP\n") ++ ++DEFUN (bgp_pgbgp_unset, ++ bgp_pgbgp_unset_cmd, ++ "no bgp pgbgp\n", ++ "BGP specific commands\n") ++{ ++ struct bgp *bgp; ++ bgp = vty->index; ++ return bgp_pgbgp_disable (bgp, bgp_node_afi (vty), bgp_node_safi (vty)); ++} ++ + ALIAS (bgp_damp_set, + bgp_damp_set2_cmd, + "bgp dampening <1-45>", +@@ -11112,6 +11215,19 @@ DEFUN (show_ip_bgp_dampened_paths, + NULL); + } + ++DEFUN (show_ip_bgp_anomalous_paths, ++ show_ip_bgp_anomalous_paths_cmd, ++ "show ip bgp anomalous-paths", ++ SHOW_STR ++ IP_STR ++ BGP_STR ++ "Display anomalous paths (less likely to be used)\n") ++{ ++ return bgp_show (vty, NULL, AFI_IP, SAFI_UNICAST, bgp_show_type_anomalous_paths, ++ NULL); ++} ++ ++ + DEFUN (show_ip_bgp_flap_statistics, + show_ip_bgp_flap_statistics_cmd, + "show ip bgp flap-statistics", +@@ -11629,6 +11745,7 @@ bgp_route_init (void) + install_element (VIEW_NODE, &show_ip_bgp_neighbor_received_prefix_filter_cmd); + install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbor_received_prefix_filter_cmd); + install_element (VIEW_NODE, &show_ip_bgp_dampened_paths_cmd); ++ install_element (VIEW_NODE, &show_ip_bgp_anomalous_paths_cmd); + install_element (VIEW_NODE, &show_ip_bgp_flap_statistics_cmd); + install_element (VIEW_NODE, &show_ip_bgp_flap_address_cmd); + install_element (VIEW_NODE, &show_ip_bgp_flap_prefix_cmd); +@@ -11736,6 +11853,7 @@ bgp_route_init (void) + install_element (ENABLE_NODE, &show_ip_bgp_neighbor_received_prefix_filter_cmd); + install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_received_prefix_filter_cmd); + install_element (ENABLE_NODE, &show_ip_bgp_dampened_paths_cmd); ++ install_element (ENABLE_NODE, &show_ip_bgp_anomalous_paths_cmd); + install_element (ENABLE_NODE, &show_ip_bgp_flap_statistics_cmd); + install_element (ENABLE_NODE, &show_ip_bgp_flap_address_cmd); + install_element (ENABLE_NODE, &show_ip_bgp_flap_prefix_cmd); +@@ -12093,6 +12211,10 @@ bgp_route_init (void) + install_element (BGP_IPV4_NODE, &bgp_damp_unset_cmd); + install_element (BGP_IPV4_NODE, &bgp_damp_unset2_cmd); + ++ install_element (BGP_NODE, &bgp_pgbgp_cmd); ++ install_element (BGP_NODE, &bgp_pgbgp_arg_cmd); ++ install_element (BGP_NODE, &bgp_pgbgp_unset_cmd); ++ + /* Deprecated AS-Pathlimit commands */ + install_element (BGP_NODE, &bgp_network_ttl_cmd); + install_element (BGP_NODE, &bgp_network_mask_ttl_cmd); +--- a/bgpd/bgp_route.h ++++ b/bgpd/bgp_route.h +@@ -1,3 +1,4 @@ ++ + /* BGP routing information base + Copyright (C) 1996, 97, 98, 2000 Kunihiro Ishiguro + +@@ -76,6 +77,10 @@ struct bgp_info + #define BGP_INFO_STALE (1 << 8) + #define BGP_INFO_REMOVED (1 << 9) + #define BGP_INFO_COUNTED (1 << 10) ++#define BGP_INFO_SUSPICIOUS_O (1 << 11) ++#define BGP_INFO_SUSPICIOUS_P (1 << 12) ++#define BGP_INFO_IGNORED_P (1 << 13) ++#define BGP_INFO_SUSPICIOUS_E (1 << 14) + + /* BGP route type. This can be static, RIP, OSPF, BGP etc. */ + u_char type; +@@ -120,7 +125,7 @@ struct bgp_static + + /* Flags which indicate a route is unuseable in some form */ + #define BGP_INFO_UNUSEABLE \ +- (BGP_INFO_HISTORY|BGP_INFO_DAMPED|BGP_INFO_REMOVED) ++ (BGP_INFO_HISTORY|BGP_INFO_DAMPED|BGP_INFO_REMOVED|BGP_INFO_IGNORED_P) + /* Macro to check BGP information is alive or not. Sadly, + * not equivalent to just checking previous, because of the + * sense of the additional VALID flag. +--- a/bgpd/bgp_table.h ++++ b/bgpd/bgp_table.h +@@ -65,6 +65,8 @@ struct bgp_node + + int lock; + ++ struct bgp_pgbgp_hist *hist; ++ + u_char flags; + #define BGP_NODE_PROCESS_SCHEDULED (1 << 0) + }; +--- a/bgpd/bgpd.h ++++ b/bgpd/bgpd.h +@@ -123,6 +123,7 @@ struct bgp + /* BGP Per AF flags */ + u_int16_t af_flags[AFI_MAX][SAFI_MAX]; + #define BGP_CONFIG_DAMPENING (1 << 0) ++#define BGP_CONFIG_PGBGP (1 << 1) + + /* Static route configuration. */ + struct bgp_table *route[AFI_MAX][SAFI_MAX]; +--- a/lib/hash.c ++++ b/lib/hash.c +@@ -166,6 +166,35 @@ hash_iterate (struct hash *hash, + } + } + ++/* ++ Iterates until 0 is returned or until completion ++ Return: 1 if iteration completed ++ Return: 0 if iteration was interrupted ++*/ ++ ++int ++hash_iterate_until(struct hash *hash, ++ int (*func) (struct hash_backet *, void *), void *arg) ++{ ++ unsigned int i; ++ struct hash_backet *hb; ++ struct hash_backet *hbnext; ++ int ret; ++ ++ for (i = 0; i < hash->size; i++) ++ for (hb = hash->index[i]; hb; hb = hbnext) ++ { ++ /* get pointer to next hash backet here, in case (*func) ++ * decides to delete hb by calling hash_release ++ */ ++ hbnext = hb->next; ++ ret = (*func) (hb, arg); ++ if (!ret) ++ return 0; ++ } ++ return 1; ++} ++ + /* Clean up hash. */ + void + hash_clean (struct hash *hash, void (*free_func) (void *)) +--- a/lib/hash.h ++++ b/lib/hash.h +@@ -66,7 +66,8 @@ extern void *hash_release (struct hash * + + extern void hash_iterate (struct hash *, + void (*) (struct hash_backet *, void *), void *); +- ++extern int hash_iterate_until(struct hash *, ++ int (*) (struct hash_backet *, void *), void *); + extern void hash_clean (struct hash *, void (*) (void *)); + extern void hash_free (struct hash *); + +--- a/lib/memtypes.c ++++ b/lib/memtypes.c +@@ -149,6 +149,15 @@ struct memory_list memory_list_bgp[] = + { MTYPE_PEER_UPDATE_SOURCE, "BGP peer update interface" }, + { MTYPE_BGP_DAMP_INFO, "Dampening info" }, + { MTYPE_BGP_DAMP_ARRAY, "BGP Dampening array" }, ++ { 0, NULL }, ++ { MTYPE_BGP_PGBGP_ORIGIN, "BGP PGBGP Origin AS Node" }, ++ { MTYPE_BGP_PGBGP_PREFIX, "BGP PGBGP Prefix AS Node" }, ++ { MTYPE_BGP_PGBGP_EDGE, "BGP PGBGP Edge Node" }, ++ { MTYPE_BGP_PGBGP_REUSE, "BGP PGBGP Reuse Node" }, ++ { MTYPE_BGP_PGBGP_HIST, "BGP PGBGP History Node" }, ++ { MTYPE_BGP_PGBGP_AVOID, "BGP PGBGP Avoid Peer Node" }, ++ { MTYPE_BGP_PGBGP_PEER, "BGP PGBGP Peer Timing" }, ++ { 0, NULL }, + { MTYPE_BGP_REGEXP, "BGP regexp" }, + { MTYPE_BGP_AGGREGATE, "BGP aggregate" }, + { -1, NULL } diff --git a/net/quagga/patches/161-pgbgp-addon.patch b/net/quagga/patches/161-pgbgp-addon.patch new file mode 100644 index 0000000..0fd8a55 --- /dev/null +++ b/net/quagga/patches/161-pgbgp-addon.patch @@ -0,0 +1,318 @@ +From: Paul Jakma +Date: Thu, 4 Sep 2008 22:27:13 +0000 (+0100) +Subject: [bgp/pgbgp] Add some pgbgp commands to restricted-mode and other command tweaks +X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6021635e9e1e5105c3e22bf7eb0d6c3 + +[bgp/pgbgp] Add some pgbgp commands to restricted-mode and other command tweaks + +* bgp_pgbgp.c: + (edge_neighbor_iterator) make ASN==0 mean 'iterate over all ASNs' + (bgp_pgbgp_stats_origin_one) new function, to display one origin AS status. + (bgp_pgbgp_stats_origins) adapt to use previous. + Adapt to iterate over all stats if no prefix was giving. + (show_ip_bgp_pgbgp_neighbors_cmd) recognise no ASN argument case + (show_ip_bgp_pgbgp_neighbors_all_cmd) Iterate over all + (show_ip_bgp_pgbgp_origins_cmd) similar + (show_ip_bgp_pgbgp_origins_all_cmd) + (bgp_pgbgp_enable) install the lookup commands to ther new RESTRICTED_NODE +* bgp_route.c: + (route_vty_short_status_out) only allowed to print one char for anomalous + status. + (route_vty_out_detail) Add support for printing out more detail on + PG-BGP status +--- + +--- a/bgpd/bgp_pgbgp.c ++++ b/bgpd/bgp_pgbgp.c +@@ -227,7 +227,7 @@ static void + edge_neighbor_iterator (struct hash_backet *backet, struct nsearch *pns) + { + struct bgp_pgbgp_edge *hedge = backet->data; +- if ((hedge->e.a == pns->asn || hedge->e.b == pns->asn) ++ if ((!pns->asn || hedge->e.a == pns->asn || hedge->e.b == pns->asn) + && hedge->e.a != hedge->e.b) + { + struct vty *vty = pns->pvty; +@@ -254,13 +254,39 @@ bgp_pgbgp_stats_neighbors (struct vty *v + return CMD_SUCCESS; + } + ++static void ++bgp_pgbgp_stats_origin_one (struct vty *vty, struct bgp_node *rn, ++ time_t t_now) ++{ ++ char str[INET6_BUFSIZ]; ++ ++ if (!rn->hist) ++ return; ++ ++ prefix2str (&rn->p, str, sizeof(str)); ++ vty_out (vty, "%s%s", str, VTY_NEWLINE); ++ ++ for (struct bgp_pgbgp_origin * cur = rn->hist->o; cur != NULL; ++ cur = cur->next) ++ { ++ if (cur->deprefUntil > t_now) ++ vty_out (vty, "Untrusted Origin AS: %d%s", cur->originAS, ++ VTY_NEWLINE); ++ else ++ vty_out (vty, "Trusted Origin AS: %d%s", cur->originAS, ++ VTY_NEWLINE); ++ } ++} ++ + static int + bgp_pgbgp_stats_origins (struct vty *vty, afi_t afi, safi_t safi, + const char *prefix) + { + struct bgp *bgp; + struct bgp_table *table; ++ struct bgp_node *rn; + time_t t_now = time (NULL); ++ + bgp = bgp_get_default (); + if (bgp == NULL) + return CMD_WARNING; +@@ -269,28 +295,22 @@ bgp_pgbgp_stats_origins (struct vty *vty + table = bgp->rib[afi][safi]; + if (table == NULL) + return CMD_WARNING; +- +- struct prefix p; +- str2prefix (prefix, &p); +- struct bgp_node *rn = bgp_node_match (table, &p); +- vty_out (vty, "%s%s", prefix, VTY_NEWLINE); +- if (rn) ++ ++ if (prefix) + { ++ struct prefix p; ++ str2prefix (prefix, &p); ++ rn = bgp_node_match (table, &p); + if (rn->hist) +- { +- for (struct bgp_pgbgp_origin * cur = rn->hist->o; cur != NULL; +- cur = cur->next) +- { +- if (cur->deprefUntil > t_now) +- vty_out (vty, "Untrusted Origin AS: %d%s", cur->originAS, +- VTY_NEWLINE); +- else +- vty_out (vty, "Trusted Origin AS: %d%s", cur->originAS, +- VTY_NEWLINE); +- } +- } ++ bgp_pgbgp_stats_origin_one (vty, rn, t_now); + bgp_unlock_node (rn); ++ return CMD_SUCCESS; + } ++ ++ for (rn = bgp_table_top (table); rn; rn = bgp_route_next (rn)) ++ if (rn->hist) ++ bgp_pgbgp_stats_origin_one (vty, rn, t_now); ++ + return CMD_SUCCESS; + } + +@@ -377,7 +397,7 @@ bgp_pgbgp_stats (struct vty *vty, afi_t + DEFUN (show_ip_bgp_pgbgp, + show_ip_bgp_pgbgp_cmd, + "show ip bgp pgbgp", +- SHOW_STR IP_STR BGP_STR "Display PGBGP statistics\n") ++ SHOW_STR IP_STR BGP_STR "Pretty-Good BGP statistics\n") + { + return bgp_pgbgp_stats (vty, AFI_IP, SAFI_UNICAST); + } +@@ -385,29 +405,46 @@ DEFUN (show_ip_bgp_pgbgp, + DEFUN (show_ip_bgp_pgbgp_neighbors, + show_ip_bgp_pgbgp_neighbors_cmd, + "show ip bgp pgbgp neighbors WORD", +- SHOW_STR +- IP_STR +- BGP_STR +- "BGP pgbgp\n" +- "BGP pgbgp neighbors\n" "ASN whos neighbors should be displayed\n") ++ SHOW_STR IP_STR BGP_STR ++ "Pretty-Good BGP statistics\n" ++ "PG-BGP neighbor information\n" ++ "AS to show neighbors of\n") + { + return bgp_pgbgp_stats_neighbors (vty, AFI_IP, SAFI_UNICAST, +- atoi (argv[0])); ++ argc == 1 ? atoi (argv[0]) : 0); + } + ++ALIAS (show_ip_bgp_pgbgp_neighbors, ++ show_ip_bgp_pgbgp_neighbors_all_cmd, ++ "show ip bgp pgbgp neighbors", ++ SHOW_STR ++ IP_STR ++ BGP_STR ++ "Pretty-Good BGP statistics\n" ++ "PG-BGP neighbors information\n") ++ + DEFUN (show_ip_bgp_pgbgp_origins, + show_ip_bgp_pgbgp_origins_cmd, + "show ip bgp pgbgp origins A.B.C.D/M", + SHOW_STR + IP_STR + BGP_STR +- "BGP pgbgp\n" +- "BGP pgbgp neighbors\n" "Prefix to look up origin ASes of\n") ++ "Pretty-Good BGP statistics\n" ++ "PG-BGP prefix origin information\n" ++ "Prefix to look up origin ASes of\n") + { +- return bgp_pgbgp_stats_origins (vty, AFI_IP, SAFI_UNICAST, argv[0]); ++ return bgp_pgbgp_stats_origins (vty, AFI_IP, SAFI_UNICAST, ++ argc == 1 ? argv[0] : NULL); + } + +- ++ALIAS (show_ip_bgp_pgbgp_origins, ++ show_ip_bgp_pgbgp_origins_all_cmd, ++ "show ip bgp pgbgp origins", ++ SHOW_STR ++ IP_STR ++ BGP_STR ++ "Pretty-Good BGP statistics\n" ++ "PG-BGP prefixes origin information") + + + /*! --------------- VTY (others exist in bgp_route.c) ------------------ !*/ +@@ -749,12 +786,19 @@ bgp_pgbgp_enable (struct bgp *bgp, afi_t + pgbgp->lastgc = time (NULL); + pgbgp->lastStore = time (NULL); + pgbgp->startTime = time (NULL); ++ install_element (RESTRICTED_NODE, &show_ip_bgp_pgbgp_cmd); ++ install_element (RESTRICTED_NODE, &show_ip_bgp_pgbgp_neighbors_cmd); ++ install_element (RESTRICTED_NODE, &show_ip_bgp_pgbgp_origins_cmd); + install_element (VIEW_NODE, &show_ip_bgp_pgbgp_cmd); +- install_element (ENABLE_NODE, &show_ip_bgp_pgbgp_cmd); + install_element (VIEW_NODE, &show_ip_bgp_pgbgp_neighbors_cmd); +- install_element (ENABLE_NODE, &show_ip_bgp_pgbgp_neighbors_cmd); + install_element (VIEW_NODE, &show_ip_bgp_pgbgp_origins_cmd); ++ install_element (VIEW_NODE, &show_ip_bgp_pgbgp_neighbors_all_cmd); ++ install_element (VIEW_NODE, &show_ip_bgp_pgbgp_origins_all_cmd); ++ install_element (ENABLE_NODE, &show_ip_bgp_pgbgp_cmd); ++ install_element (ENABLE_NODE, &show_ip_bgp_pgbgp_neighbors_cmd); + install_element (ENABLE_NODE, &show_ip_bgp_pgbgp_origins_cmd); ++ install_element (ENABLE_NODE, &show_ip_bgp_pgbgp_neighbors_all_cmd); ++ install_element (ENABLE_NODE, &show_ip_bgp_pgbgp_origins_all_cmd); + pgbgp->edgeT = hash_create_size (131072, edge_key_make, edge_cmp); + bgp_pgbgp_restore (); + return 0; +--- a/bgpd/bgp_route.c ++++ b/bgpd/bgp_route.c +@@ -5496,20 +5496,6 @@ enum bgp_display_type + static void + route_vty_short_status_out (struct vty *vty, struct bgp_info *binfo) + { +- if (ANOMALOUS(binfo->flags)) +- { +- vty_out(vty, "a["); +- if (CHECK_FLAG(binfo->flags, BGP_INFO_SUSPICIOUS_P)) +- vty_out(vty, "i"); +- if (CHECK_FLAG(binfo->flags, BGP_INFO_SUSPICIOUS_O)) +- vty_out(vty, "p"); +- if (CHECK_FLAG(binfo->flags, BGP_INFO_SUSPICIOUS_E)) +- vty_out(vty, "e"); +- if (CHECK_FLAG(binfo->flags, BGP_INFO_IGNORED_P)) +- vty_out(vty, "s"); +- vty_out(vty, "] "); +- } +- + /* Route status display. */ + if (CHECK_FLAG (binfo->flags, BGP_INFO_REMOVED)) + vty_out (vty, "R"); +@@ -5525,6 +5511,17 @@ route_vty_short_status_out (struct vty * + /* Selected */ + if (CHECK_FLAG (binfo->flags, BGP_INFO_HISTORY)) + vty_out (vty, "h"); ++ else if (ANOMALOUS(binfo->flags)) ++ { ++ if (CHECK_FLAG(binfo->flags, BGP_INFO_SUSPICIOUS_O)) ++ vty_out(vty, "p"); ++ else if (CHECK_FLAG(binfo->flags, BGP_INFO_IGNORED_P)) ++ vty_out(vty, "P"); ++ else if (CHECK_FLAG(binfo->flags, BGP_INFO_SUSPICIOUS_P)) ++ vty_out(vty, "a"); ++ if (CHECK_FLAG(binfo->flags, BGP_INFO_SUSPICIOUS_E)) ++ vty_out(vty, "a"); ++ } + else if (CHECK_FLAG (binfo->flags, BGP_INFO_DAMPED)) + vty_out (vty, "d"); + else if (CHECK_FLAG (binfo->flags, BGP_INFO_SELECTED)) +@@ -5998,7 +5995,22 @@ route_vty_out_detail (struct vty *vty, s + if (binfo->extra && binfo->extra->damp_info) + bgp_damp_info_vty (vty, binfo); + +- /* Line 7 display Uptime */ ++ /* 8: PGBGP status */ ++ if (ANOMALOUS(binfo->flags)) ++ { ++ vty_out (vty, " Anomalous:"); ++ if (CHECK_FLAG(binfo->flags, BGP_INFO_SUSPICIOUS_P)) ++ vty_out (vty, " divergent sub-prefixes,"); ++ if (CHECK_FLAG(binfo->flags, BGP_INFO_SUSPICIOUS_O)) ++ vty_out (vty, " origin AS (prefix hijack?),"); ++ if (CHECK_FLAG(binfo->flags, BGP_INFO_SUSPICIOUS_E)) ++ vty_out (vty, " new edge in path,"); ++ if (CHECK_FLAG(binfo->flags, BGP_INFO_IGNORED_P)) ++ vty_out (vty, " origin AS (sub-prefix hijack?),"); ++ vty_out (vty, "%s", VTY_NEWLINE); ++ } ++ ++ /* Line 9 display Uptime */ + #ifdef HAVE_CLOCK_MONOTONIC + tbuf = time(NULL) - (bgp_clock() - binfo->uptime); + vty_out (vty, " Last update: %s", ctime(&tbuf)); +@@ -6009,8 +6021,9 @@ route_vty_out_detail (struct vty *vty, s + vty_out (vty, "%s", VTY_NEWLINE); + } + +-#define BGP_SHOW_SCODE_HEADER "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,%s r RIB-failure, S Stale, R Removed%s" +-#define BGP_SHOW_PCODE_HEADER "Status code: a (anomalous) of: [p] prefix hijack, [s] sub-prefix hijack,%s [i] informant of sub-prefix [e] new edge%s" ++#define BGP_SHOW_SCODE_HEADER "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,%s" \ ++ " r RIB-failure, S Stale, R Removed, %s" \ ++ " p prefix hijack, P sub-prefix hijack, a other anomaly%s" + #define BGP_SHOW_OCODE_HEADER "Origin codes: i - IGP, e - EGP, ? - incomplete%s%s" + #define BGP_SHOW_HEADER " Network Next Hop Metric LocPrf Weight Path%s" + #define BGP_SHOW_DAMP_HEADER " Network From Reuse Path%s" +@@ -6219,8 +6232,7 @@ bgp_show_table (struct vty *vty, struct + if (header) + { + vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (*router_id), VTY_NEWLINE); +- vty_out (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE); +- vty_out (vty, BGP_SHOW_PCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE); ++ vty_out (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); + vty_out (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE); + if (type == bgp_show_type_dampend_paths + || type == bgp_show_type_damp_neighbor) +@@ -9492,7 +9504,7 @@ show_adj_route (struct vty *vty, struct + PEER_STATUS_DEFAULT_ORIGINATE)) + { + vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (bgp->router_id), VTY_NEWLINE); +- vty_out (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE); ++ vty_out (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); + vty_out (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE); + + vty_out (vty, "Originating default network 0.0.0.0%s%s", +@@ -9509,7 +9521,7 @@ show_adj_route (struct vty *vty, struct + if (header1) + { + vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (bgp->router_id), VTY_NEWLINE); +- vty_out (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE); ++ vty_out (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); + vty_out (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE); + header1 = 0; + } +@@ -9533,7 +9545,7 @@ show_adj_route (struct vty *vty, struct + if (header1) + { + vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (bgp->router_id), VTY_NEWLINE); +- vty_out (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE); ++ vty_out (vty, BGP_SHOW_SCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); + vty_out (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE); + header1 = 0; + } diff --git a/net/quagga/patches/170-use-supported-pagers.patch b/net/quagga/patches/170-use-supported-pagers.patch new file mode 100644 index 0000000..fe1a4d9 --- /dev/null +++ b/net/quagga/patches/170-use-supported-pagers.patch @@ -0,0 +1,29 @@ +--- a/vtysh/vtysh.c ++++ b/vtysh/vtysh.c +@@ -268,7 +268,7 @@ vtysh_pager_init (void) + if (pager_defined) + vtysh_pager_name = strdup (pager_defined); + else +- vtysh_pager_name = strdup ("more"); ++ vtysh_pager_name = strdup ("cat"); + } + + /* Command execution over the vty interface. */ +@@ -1866,7 +1866,7 @@ DEFUN (vtysh_terminal_length, + { + int lines; + char *endptr = NULL; +- char default_pager[10]; ++ char default_pager[12]; + + lines = strtol (argv[0], &endptr, 10); + if (lines < 0 || lines > 512 || *endptr != '\0') +@@ -1883,7 +1883,7 @@ DEFUN (vtysh_terminal_length, + + if (lines != 0) + { +- snprintf(default_pager, 10, "more -%i", lines); ++ snprintf(default_pager, 12, "head -n %i", lines); + vtysh_pager_name = strdup (default_pager); + } + diff --git a/net/quicktun/Makefile b/net/quicktun/Makefile new file mode 100644 index 0000000..5ba9fe3 --- /dev/null +++ b/net/quicktun/Makefile @@ -0,0 +1,69 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=quicktun +PKG_VERSION:=2.1.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://oss.ucis.nl/quicktun/src +PKG_MD5SUM:=6cf38b17218deb8c908cc17d91f9cbd7 + +PKG_BUILD_DEPENDS:=nacl + +include $(INCLUDE_DIR)/package.mk + +define Package/quicktun + SECTION:=net + CATEGORY:=Network + DEPENDS:=+kmod-tun + TITLE:=QuickTun is a simple and secure VPN software + URL:=http://wiki.ucis.nl/QuickTun + SUBMENU:=VPN +endef + +define Package/quicktun/description + QuickTun is a simple and secure VPN software +endef + +define Package/quicktun/conffiles +/etc/config/quicktun +endef + +define Build/Compile + ( \ + cd $(PKG_BUILD_DIR); \ + mkdir -p obj out; \ + \ + export CPATH=$(STAGING_DIR)/usr/include/nacl; \ + \ + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -c -DCOMBINED_BINARY src/proto.raw.c -o obj/proto.raw.o; \ + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -c -DCOMBINED_BINARY src/proto.nacl0.c -o obj/proto.nacl0.o; \ + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -c -DCOMBINED_BINARY src/proto.nacltai.c -o obj/proto.nacltai.o; \ + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -c -DCOMBINED_BINARY src/run.combined.c -o obj/run.combined.o; \ + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -c src/common.c -o obj/common.o; \ + $(TARGET_CC) $(TARGET_LDFLAGS) -o out/quicktun.combined obj/common.o obj/run.combined.o obj/proto.raw.o obj/proto.nacl0.o obj/proto.nacltai.o \ + -lnacl; \ + \ + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) -o out/quicktun.keypair src/keypair.c -lnacl \ + ) +endef + +define Package/quicktun/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/quicktun.{combined,keypair} $(1)/usr/sbin/ + $(LN) quicktun.combined $(1)/usr/sbin/quicktun + + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,quicktun)) diff --git a/net/quicktun/files/quicktun.config b/net/quicktun/files/quicktun.config new file mode 100644 index 0000000..3392320 --- /dev/null +++ b/net/quicktun/files/quicktun.config @@ -0,0 +1,55 @@ +package quicktun + +config quicktun sample_config + + # Set to 1 to enable this instance: + option enable 0 + + # IP address or hostname of the local end, optional +# option local_address 0.0.0.0 + + # Local UDP port + option local_port 2998 + + # IP address or hostname of the remote end + # Use 0.0.0.0 for a floating/dynamic endpoint + option remote_address 0.0.0.0 + + # Remote UDP port + option remote_port 2998 + + # Allows the remote address and port to change when properly + # encrypted packets are received even when a remote address + # is set + option remote_float 0 + + # "proto raw" uses no encryption + # "proto nacl0" uses NaCl encryption without nonce + # "proto nacltai" uses NaCl encryption with nonce + option protocol raw + + # "tun_mode 0" will create an ethernet tunnel (tap device), + # "tun_mode 1" will create an IP tunnel (tun device). + option tun_mode 0 + + # Set the name of the tunnel interface to use + option interface "tap0" +# option interface "tun0" +# option interface "qt0" + + # The local private key and the remote public key + # A keypair can be generated with quicktun.keygen + # (nacl0 and nacltai protocols only) + #option private_key 0000000000000000000000000000000000000000000000000000000000000000 + #option public_key 0000000000000000000000000000000000000000000000000000000000000000 + + # allowed time window for first received packet in seconds, + # positive number allows packets from history + # (nacltai protocol only) + #option time_window 0 + + # command to configure IP addresses etc. after the tunnel is up; $1 will be the interface name (optional) +# option up "" + + # command to execute before the tunnel is set down; $1 will be the interface name (optional) +# option down "" diff --git a/net/quicktun/files/quicktun.init b/net/quicktun/files/quicktun.init new file mode 100644 index 0000000..82caa26 --- /dev/null +++ b/net/quicktun/files/quicktun.init @@ -0,0 +1,140 @@ +#!/bin/sh /etc/rc.common +# Quicktun init script +# Partly taken the the OpenVPN init script (Copyright (C) 2008 Jo-Philipp Wich) +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +START=95 +BIN=/usr/sbin/quicktun +SSD=start-stop-daemon +EXTRA_COMMANDS="up down" + +LIST_SEP=" +" + +append_opt() { + local p="$1"; local v="$2"; local p_uc + + p_uc=$(echo "$p" | tr '[a-z]' '[A-Z]') + OPTS="$OPTS \"$p_uc=$v\"" +} + +append_opts() { + local p; local v; local s="$1"; shift + for p in $*; do + config_get v "$s" "$p" + [ -n "$v" ] && append_opt "$p" "$v" + done +} + +start_service() { + local s="$1" + local enable=0 + + # disabled? + config_get_bool enable "$s" enable 0 + [ "$enable" == 0 ] && return 0 + + PID="/var/run/quicktun-$s.pid" + OPTS="" + + config_get interface "$s" interface + if [ -z "$interface" ]; then + echo "$s: interface not set" + return 1 + fi + + if ifconfig "$interface" >/dev/null 2>&1; then + echo "$s: interface $interface is already in use" + return 1 + fi + + append_opts "$s" interface local_address local_port remote_address remote_port \ + protocol private_key public_key time_window + + config_get_bool tun_mode "$s" tun_mode 0 + [ "$tun_mode" == 1 ] && append_opt tun_mode 1 + + config_get_bool remote_float "$s" remote_float 0 + [ "$remote_float" == 1 ] && append_opt remote_float 1 + + eval env $OPTS "$SSD" -q -b -p "$PID" -m -x "$BIN" -S + + while ! ifconfig "$interface" >/dev/null 2>&1; do + if ! $SSD -t -q -p $PID -x $BIN -K; then + echo "$s: daemon startup failed" + return 1 + fi + + sleep 1 + done + + config_get up "$s" up + [ -n "$up" ] && sh -c "$up" - "$interface" +} + +stop_service() { + local s="$1" + local enable=0 + + # disabled? + config_get_bool enable "$s" enable 0 + [ "$enable" == 0 ] && return 0 + + config_get interface "$s" interface + if [ -z "$interface" ]; then + echo "$s: interface not set" + return 1 + fi + + if ! ifconfig "$interface" >/dev/null 2>&1; then + echo "$s: interface $interface does not exist" + return 1 + fi + + config_get down "$s" down + [ -n "$down" ] && sh -c "$down" - "$interface" + + PID="/var/run/quicktun-$s.pid" + + $SSD -q -p $PID -x $BIN -K + rm -f "$PID" +} + +start() { + config_load quicktun + config_foreach start_service quicktun +} + +stop() { + config_load quicktun + config_foreach stop_service quicktun +} + +restart() { + stop; start +} + +up() { + local exists + local INSTANCE + config_load quicktun + for INSTANCE in "$@"; do + config_get exists "$INSTANCE" TYPE + if [ "$exists" == "quicktun" ]; then + start_service "$INSTANCE" + fi + done +} + +down() { + local exists + local INSTANCE + config_load quicktun + for INSTANCE in "$@"; do + config_get exists "$INSTANCE" TYPE + if [ "$exists" == "quicktun" ]; then + stop_service "$INSTANCE" + fi + done +} diff --git a/net/raddump/Makefile b/net/raddump/Makefile new file mode 100644 index 0000000..e5346d6 --- /dev/null +++ b/net/raddump/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=raddump +PKG_VERSION:=0.3.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/raddump +PKG_MD5SUM:=f8c29c67141ea78bb6ae8b97d5149480 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/raddump + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap +libopenssl + TITLE:=raddump interprets captured RADIUS packets. + URL:=http://sourceforge.net/projects/raddump +endef + +define Package/raddump/description + raddump interprets captured RADIUS packets to print a + timestamp, packet length, RADIUS packet type, source and + destination hosts and ports, and included attribute names and + values for each packet. +endef + +# uses GNU configure + +define Package/raddump/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raddump $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,raddump)) diff --git a/net/radsecproxy/Makefile b/net/radsecproxy/Makefile new file mode 100644 index 0000000..e1b0619 --- /dev/null +++ b/net/radsecproxy/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2008-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=radsecproxy +PKG_VERSION:=1.4.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://software.uninett.no/radsecproxy/ +PKG_MD5SUM:=ccdff609c72c0862235b9119323345a8 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/radsecproxy + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libopenssl +libpthread + TITLE:=radsecproxy + URL:=http://software.uninett.no/radsecproxy + MAINTAINER:=Hans Zandbelt +endef + +define Package/radsecproxy/description + A generic radius proxy for UDP/TLS (RadSec) +endef + +CONFIGURE_ARGS+= \ + --with-ssl="$(STAGING_DIR)/usr" + +define Package/radsecproxy/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radsecproxy $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/ + $(CP) $(PKG_BUILD_DIR)/radsecproxy.conf-example $(1)/etc/radsecproxy.conf + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/radsecproxy.init $(1)/etc/init.d/radsecproxy +endef + +$(eval $(call BuildPackage,radsecproxy)) + diff --git a/net/radsecproxy/files/radsecproxy.init b/net/radsecproxy/files/radsecproxy.init new file mode 100644 index 0000000..9576d96 --- /dev/null +++ b/net/radsecproxy/files/radsecproxy.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2008 OpenWrt.org + +START=50 + +DEFAULT=/etc/default/radsecproxy +OPTIONS="" + +start() { + [ -f $DEFAULT ] && . $DEFAULT + /usr/sbin/radsecproxy $OPTIONS +} + +stop() { + killall radsecproxy +} diff --git a/net/rarpd/Makefile b/net/rarpd/Makefile new file mode 100644 index 0000000..b763e62 --- /dev/null +++ b/net/rarpd/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rarpd +PKG_VERSION:=1.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.dementia.org/pub/net-tools +PKG_MD5SUM:=04e2ca849e758d0b88c8281775ec3b58 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/rarpd + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + DEPENDS:=+libnet0 + TITLE:=Reverse ARP Daemon + URL:=ftp://ftp.dementia.org/pub/net-tools/ +endef + +define Package/rarpd/description + Rarpd is a daemon which responds to RARP requests. + RARP is used by some machines at boot time to discover their + IP address. They provide their Ethernet address and rarpd + responds with their IP address if it finds it in the ethers + database. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --with-libnet="$(STAGING_DIR)/usr/lib/libnet-1.0.x" \ + --with-pcap="$(STAGING_DIR)/usr" \ + , \ + CFLAGS="$$$$CFLAGS -DNEW_LIBNET_INTERFACE" \ + ) +endef + +define Package/rarpd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rarpd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/default + install -m644 ./files/rarpd.default $(1)/etc/default/rarpd + $(INSTALL_DIR) $(1)/etc/init.d + install -m755 ./files/rarpd.init $(1)/etc/init.d/rarpd +endef + +$(eval $(call BuildPackage,rarpd)) diff --git a/net/rarpd/files/rarpd.default b/net/rarpd/files/rarpd.default new file mode 100644 index 0000000..1dd41e9 --- /dev/null +++ b/net/rarpd/files/rarpd.default @@ -0,0 +1,4 @@ +# /etc/default/rarpd +# +# Only listen on vlan0 +#OPTIONS="-i vlan0" diff --git a/net/rarpd/files/rarpd.init b/net/rarpd/files/rarpd.init new file mode 100644 index 0000000..f973cc8 --- /dev/null +++ b/net/rarpd/files/rarpd.init @@ -0,0 +1,14 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +RARPD=/usr/sbin/rarpd +DEFAULT=/etc/default/rarpd + +start() { + [ -f $DEFAULT ] && . $DEFAULT + $RARPD $OPTIONS +} +stop() { + killall rarpd +} diff --git a/net/reaim/Makefile b/net/reaim/Makefile new file mode 100644 index 0000000..1201801 --- /dev/null +++ b/net/reaim/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=reaim +PKG_VERSION:=0.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/reaim +PKG_MD5SUM:=647d2ab72ec454f89294accfb3182c09 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/reaim + SUBMENU:=Instant Messaging + SECTION:=net + CATEGORY:=Network + DEPENDS:=+iptables + TITLE:=A transparent AIM / MSN proxy + URL:=http://reaim.sourceforge.net/ +endef + +define Package/reaim/description +ReAIM is a proxy for file transfers with MSN/AIM. +endef + +define Package/reaim/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/reaim $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/reaim.init $(1)/etc/init.d/reaim +endef + +$(eval $(call BuildPackage,reaim)) diff --git a/net/reaim/files/reaim.init b/net/reaim/files/reaim.init new file mode 100644 index 0000000..d6e8cb7 --- /dev/null +++ b/net/reaim/files/reaim.init @@ -0,0 +1,48 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=60 +PATH=/sbin:/bin:/usr/sbin:/usr/bin +NAME=reaim +DESC="Transparent proxy for IM behind NAT" +IPT=/usr/sbin/iptables + +set_rules() { + include /lib/network + scan_interfaces + config_get WAN wan ifname + + [ -z "$WAN" ] && exit + $IPT $1 input_rule -i $WAN -p tcp --dport 1863:1864 -j ACCEPT + $IPT $1 input_rule -i $WAN -p tcp --dport 4443 -j ACCEPT + $IPT $1 input_rule -i $WAN -p tcp --dport 5566 -j ACCEPT + $IPT $1 input_rule -i $WAN -p tcp --dport 40000:40099 -j ACCEPT +} + +start() { + if [ -e /var/run/$NAME.pid ]; then + echo "$DESC: $NAME already started." + exit 0 + fi + echo -n "Starting $DESC: $NAME" + + set_rules -A + test -e /var/run/$NAME.pid || touch /var/run/$NAME.pid + /usr/sbin/$NAME + echo "." +} + +stop() { + set_rules -D 2>/dev/null >/dev/null + + if [ ! -e /var/run/$NAME.pid ]; then + echo "$DESC: $NAME is not running." + exit 0 + fi + echo -n "Stopping $DESC: $NAME" + + killall $NAME + rm -f /var/run/$NAME.pid + + echo "." +} diff --git a/net/reaim/patches/501-cross_compile-install.patch b/net/reaim/patches/501-cross_compile-install.patch new file mode 100644 index 0000000..9e88f61 --- /dev/null +++ b/net/reaim/patches/501-cross_compile-install.patch @@ -0,0 +1,16 @@ +diff -urN reaim-0.8/Makefile reaim-0.8/Makefile +--- reaim-0.8/Makefile 2002-11-28 06:10:38.000000000 +0100 ++++ reaim-0.8/Makefile 2005-10-07 12:07:43.000000000 +0200 +@@ -11,7 +11,10 @@ + endif + + reaim: reaim.c +- gcc -o reaim reaim.c -g -Wall $(FW_FLAGS) +- ++ $(CC) $(CFLAGS) -o reaim reaim.c -Wall $(FW_FLAGS) + clean: + -rm reaim ++ ++install: ++ install -d -m 0755 $(DESTDIR)/usr/sbin ++ install -m 0755 reaim $(DESTDIR)/usr/sbin/ diff --git a/net/redir/Makefile b/net/redir/Makefile new file mode 100644 index 0000000..c822b8c --- /dev/null +++ b/net/redir/Makefile @@ -0,0 +1,36 @@ +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=redir +PKG_VERSION:=2.2.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://sammy.net/~sammy/hacks +PKG_MD5SUM:=4342fadac30504c86c8db7beefe01995 + +include $(INCLUDE_DIR)/package.mk + +define Package/redir + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + TITLE=Redirect TCP connections + URL:=http://sammy.net/~sammy/hacks +endef + +define Package/redir/description + A port redirector, used to forward incoming connections to somewhere else. +endef + +define Package/redir/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/redir $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,redir)) diff --git a/net/redir/patches/00_honor_copts.patch b/net/redir/patches/00_honor_copts.patch new file mode 100644 index 0000000..dfd6b46 --- /dev/null +++ b/net/redir/patches/00_honor_copts.patch @@ -0,0 +1,12 @@ +diff -ruN a/Makefile b/Makefile +--- a/Makefile 2009-05-07 14:31:14.000000000 +0100 ++++ b/Makefile 2009-05-07 14:31:47.000000000 +0100 +@@ -32,7 +32,7 @@ + # if your system lacks getopt_long, remove the comment from this line + OBJS = redir.o $(GETOPT_OBJS) + +-CFLAGS = -O2 -Wall $(STR_CFLAGS) $(WRAP_CFLAGS) $(EXTRA_CFLAGS) ++CFLAGS += -Wall $(STR_CFLAGS) $(WRAP_CFLAGS) $(EXTRA_CFLAGS) + LDFLAGS = -s + + # solaris, and others, may also need these libraries to link diff --git a/net/redir/patches/01_fix_max_bandwidth_docs.patch b/net/redir/patches/01_fix_max_bandwidth_docs.patch new file mode 100644 index 0000000..378061c --- /dev/null +++ b/net/redir/patches/01_fix_max_bandwidth_docs.patch @@ -0,0 +1,54 @@ +diff -Nur a/redir.c b/redir.c +--- a/redir.c 1999-12-26 15:50:06.000000000 -0500 ++++ b/redir.c 2005-10-22 21:21:56.849499952 -0400 +@@ -233,7 +233,7 @@ + #ifndef NO_SHAPER + /* options for bandwidth */ + fprintf(stderr, "\t\t--bufsize=\tsize of the buffer\n"); +- fprintf(stderr, "\t\t--maxbandwidth=\tlimit the bandwidth\n"); ++ fprintf(stderr, "\t\t--max_bandwidth=\tlimit the bandwidth\n"); + fprintf(stderr, "\t\t--random_wait=\twait before each packet\n"); + fprintf(stderr, "\t\t--wait_in_out=\t1 wait for in, 2 out, 3 in&out\n"); + /* end options for bandwidth */ +diff -urNad redir-2.2.1~/redir.man redir-2.2.1/redir.man +--- redir-2.2.1~/redir.man 1999-12-26 15:52:24.000000000 -0500 ++++ redir-2.2.1/redir.man 2005-10-22 21:22:28.882630176 -0400 +@@ -18,7 +18,7 @@ + .I --lport=port + .I --cport=port + .RB [ \--bufsize=n ] +-.RB [ \--maxbandwidth=n ] ++.RB [ \--max_bandwidth=n ] + .RB [ \--random_wait=n ] + .RB [ \--wait_in_out=n ] + .ll -8 +@@ -35,7 +35,7 @@ + .RB [ \--connect=host:port ] + .I --cport=port + .RB [ \--bufsize=n ] +-.RB [ \--maxbandwidth=n ] ++.RB [ \--max_bandwidth=n ] + .RB [ \--random_wait=n ] + .RB [ \--wait_in_out=n ] + .ll -8 +@@ -102,9 +102,9 @@ + .TP + .B \--bufsize n + Set the bufsize (defaut 4096) in bytes. Can be used combined with +---maxbandwidth or --random_wait to simulate a slow connection. ++--max_bandwidth or --random_wait to simulate a slow connection. + .TP +-.B \--maxbandwidth n ++.B \--max_bandwidth n + Reduce the bandwidth to be no more than n bits/sec. The algorithme is + basic, the goal is to simulate a slow connection, so there is no pic + acceptance. +@@ -115,7 +115,7 @@ + than the bufsize (see also --bufsize). + .TP + .B \--wait_in_out n +-Apply --maxbandwidth and --random_wait for input if n=1, output if n=2 and ++Apply --max_bandwidth and --random_wait for input if n=1, output if n=2 and + both if n=3. + .SH "SEE ALSO" + inetd(1) diff --git a/net/redir/patches/02_use_ntohs.patch b/net/redir/patches/02_use_ntohs.patch new file mode 100644 index 0000000..a6b9f0f --- /dev/null +++ b/net/redir/patches/02_use_ntohs.patch @@ -0,0 +1,43 @@ +diff -Nur a/redir.c b/redir.c +--- a/redir.c 1999-12-26 15:50:06.000000000 -0500 ++++ b/redir.c 2005-10-22 21:29:55.491735272 -0400 +@@ -745,7 +745,7 @@ + } + + debug1("peer IP is %s\n", inet_ntoa(client.sin_addr)); +- debug1("peer socket is %d\n", client.sin_port); ++ debug1("peer socket is %d\n", ntohs(client.sin_port)); + + /* + * Double fork here so we don't have to wait later +@@ -871,8 +871,8 @@ + strcpy(tmp2, inet_ntoa(target->sin_addr)); + + syslog(LOG_NOTICE, "connecting %s/%d to %s/%d", +- tmp1, client.sin_port, +- tmp2, target->sin_port); ++ tmp1, ntohs(client.sin_port), ++ tmp2, ntohs(target->sin_port)); + } + + /* do proxy stuff */ +@@ -1066,7 +1066,7 @@ + + if (!getpeername(0, (struct sockaddr *) &client, &client_size)) { + debug1("peer IP is %s\n", inet_ntoa(client.sin_addr)); +- debug1("peer socket is %d\n", client.sin_port); ++ debug1("peer socket is %d\n", ntohs(client.sin_port)); + } + if ((targetsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + perror("target: socket"); +@@ -1109,8 +1109,8 @@ + + if (dosyslog) { + syslog(LOG_NOTICE, "connecting %s/%d to %s/%d", +- inet_ntoa(client.sin_addr), client.sin_port, +- target_ip, target.sin_port); ++ inet_ntoa(client.sin_addr), ntohs(client.sin_port), ++ target_ip, ntohs(target.sin_port)); + } + + /* Just start copying - one side of the loop is stdin - 0 */ diff --git a/net/redir/patches/03_fix_tcp_wrappers.patch b/net/redir/patches/03_fix_tcp_wrappers.patch new file mode 100644 index 0000000..3718c65 --- /dev/null +++ b/net/redir/patches/03_fix_tcp_wrappers.patch @@ -0,0 +1,25 @@ +diff -Nur a/redir.c b/redir.c +--- a/redir.c 2005-10-22 22:10:11.439455392 -0400 ++++ b/redir.c 2005-10-22 22:10:51.625346208 -0400 +@@ -802,8 +802,8 @@ + #ifdef USE_TCP_WRAPPERS + request_init(&request, RQ_DAEMON, ident, RQ_FILE, clisock, 0); + sock_host(&request); +- sock_hostname(&request); +- sock_hostaddr(&request); ++ sock_hostname(request.client); ++ sock_hostaddr(request.client); + + if (!hosts_access(&request)) { + refuse(&request); +@@ -1057,8 +1057,8 @@ + #ifdef USE_TCP_WRAPPERS + request_init(&request, RQ_DAEMON, ident, RQ_FILE, 0, 0); + sock_host(&request); +- sock_hostname(&request); +- sock_hostaddr(&request); ++ sock_hostname(request.client); ++ sock_hostaddr(request.client); + + if (!hosts_access(&request)) + refuse(&request); diff --git a/net/redir/patches/04_fix_timeouts.patch b/net/redir/patches/04_fix_timeouts.patch new file mode 100644 index 0000000..45bba9b --- /dev/null +++ b/net/redir/patches/04_fix_timeouts.patch @@ -0,0 +1,38 @@ +diff -Nur a/redir.c b/redir.c +--- a/redir.c 2005-10-22 22:44:39.504061784 -0400 ++++ b/redir.c 2005-10-22 22:47:14.746461352 -0400 +@@ -598,10 +598,6 @@ + /* Record start time */ + start_time = (unsigned int) time(NULL); + +- /* Set up timeout */ +- timeout.tv_sec = timeout_secs; +- timeout.tv_usec = 0; +- + /* file descriptor bits */ + FD_ZERO(&iofds); + FD_SET(insock, &iofds); +@@ -618,14 +614,21 @@ + while(1) { + (void) memcpy(&c_iofds, &iofds, sizeof(iofds)); + ++ /* Set up timeout, Linux returns seconds left in this structure ++ * so we have to reset it before each select(). */ ++ timeout.tv_sec = timeout_secs; ++ timeout.tv_usec = 0; ++ + + if (select(max_fd + 1, + &c_iofds, + (fd_set *)0, + (fd_set *)0, + (timeout_secs ? &timeout : NULL)) <= 0) { +- /* syslog(LLEV,"connection timeout: %d sec",timeout.tv_sec);*/ +- break; ++ if (dosyslog) { ++ syslog(LOG_NOTICE,"connection timeout: %d sec",timeout_secs); ++ } ++ break; + } + + if(FD_ISSET(insock, &c_iofds)) { diff --git a/net/redir/patches/06_fix_shaper_buffer.patch b/net/redir/patches/06_fix_shaper_buffer.patch new file mode 100644 index 0000000..8cbe723 --- /dev/null +++ b/net/redir/patches/06_fix_shaper_buffer.patch @@ -0,0 +1,56 @@ +diff -Nur a/redir.c b/redir.c +--- a/redir.c 2005-10-22 23:20:05.235901424 -0400 ++++ b/redir.c 2005-10-22 23:22:20.198384008 -0400 +@@ -259,7 +259,7 @@ + #endif + int *transproxy, + #ifndef NO_SHAPER +- unsigned int * bufsize, ++ unsigned int * bufsizeout, + int * max_bandwidth, + int * random_wait, + int * wait_in_out, +@@ -366,7 +366,7 @@ + + #ifndef NO_SHAPER + case 'z': +- *bufsize = (unsigned int)atol(optarg); ++ *bufsizeout = (unsigned int)atol(optarg); + break; + + case 'm': +@@ -593,7 +593,7 @@ + unsigned long bytes_in = 0; + unsigned long bytes_out = 0; + unsigned int start_time, end_time; +- char buf[bufsize]; ++ char* buf = malloc(bufsize); + + /* Record start time */ + start_time = (unsigned int) time(NULL); +@@ -632,7 +632,7 @@ + } + + if(FD_ISSET(insock, &c_iofds)) { +- if((bytes = read(insock, buf, sizeof(buf))) <= 0) ++ if((bytes = read(insock, buf, bufsize)) <= 0) + break; + #ifndef NO_FTP + if (ftp & FTP_PORT) +@@ -647,7 +647,7 @@ + bytes_out += bytes; + } + if(FD_ISSET(outsock, &c_iofds)) { +- if((bytes = read(outsock, buf, sizeof(buf))) <= 0) ++ if((bytes = read(outsock, buf, bufsize)) <= 0) + break; + /* if we're correcting for PASV on ftp redirections, then + fix buf and bytes to have the new address, among other +@@ -684,6 +684,7 @@ + syslog(LOG_NOTICE, "disconnect %d secs, %ld in %ld out", + (end_time - start_time), bytes_in, bytes_out); + } ++ free(buf); + return; + } + diff --git a/net/remotefs/Makefile b/net/remotefs/Makefile new file mode 100644 index 0000000..da769d8 --- /dev/null +++ b/net/remotefs/Makefile @@ -0,0 +1,75 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=remotefs +PKG_REV:=854 +PKG_VERSION:=$(PKG_REV) +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=svn +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=remotefs-$(PKG_VERSION) +PKG_SOURCE_URL:=http://remotefs.svn.sourceforge.net/svnroot/remotefs/trunk +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz +include $(INCLUDE_DIR)/package.mk + +define Package/remotefs + TITLE:=RemoteFS + SECTION:=net + CATEGORY:=Network + SUBMENU:=Filesystem + DEPENDS:=+libfuse +libc +libgcc +libpthread + URL:=http://remotefs.sourceforge.net +endef + +define Package/remotefs/description + remotefs is a network file system designed for use with home NAS. + Simple to use, few dependencies, reasonable security, completely + in user space. Provided remotefs-server package contains server + components. +endef + +define Package/remotefs-server + $(call Package/remotefs) + TITLE:=RemoteFS server + DEPENDS:=+libc +libgcc +endef + +define Package/opkg/conffiles +/etc/rfs-exports +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + INSTALL_DIR="$(PKG_INSTALL_DIR)" \ + HOST_CPU="$(ARCH)" \ + CFLAGS_RELEASE="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ + LDFLAGS_RELEASE="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \ + server client install_client install_server +endef + +define Package/remotefs/install + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/rfs $(1)/bin/rfs + $(INSTALL_DIR) $(1)/lib + $(CP) $(PKG_INSTALL_DIR)/lib/librfs.so.* $(1)/lib +endef + +define Package/remotefs-server/install + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/rfsd $(1)/bin/rfsd + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/rfspasswd $(1)/bin/rfspasswd + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/rfs-exports $(1)/etc/rfs-exports + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/rfsd $(1)/etc/init.d/rfsd +endef + +$(eval $(call BuildPackage,remotefs)) +$(eval $(call BuildPackage,remotefs-server)) diff --git a/net/remotefs/files/rfsd b/net/remotefs/files/rfsd new file mode 100755 index 0000000..67ffef1 --- /dev/null +++ b/net/remotefs/files/rfsd @@ -0,0 +1,25 @@ +#!/bin/sh /etc/rc.common + +START=50 + +LISTEN=$(ifconfig br-lan | sed -n 's/.*dr:\(.*\)Bc.*/\1/p') +PORT="5001" +RFSD_USER="root" +RFSD_GROUP="root" +PIDFILE="/var/run/rfsd.pid" + +start() +{ + rfsd -a ${LISTEN} -p ${PORT} -u ${RFSD_USER} -g ${RFSD_GROUP} -r ${PIDFILE} +} + +stop() +{ + killall rfsd +} + +reload() +{ + kill -s HUP `cat ${PIDFILE}` + start +} diff --git a/net/restund/Makefile b/net/restund/Makefile new file mode 100644 index 0000000..cf82a43 --- /dev/null +++ b/net/restund/Makefile @@ -0,0 +1,54 @@ +# +# Makefile +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=restund +PKG_VERSION:=0.2.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.creytiv.com/pub/ +PKG_MD5SUM:=b8fa2ab40d7952fd78c5d72ab1742232 + +include $(INCLUDE_DIR)/package.mk + +define Package/restund + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libre @BROKEN + TITLE:=libre stun server + URL:=http://www.creytiv.com/ +endef + +#PKG_MAKE_OPTS += USE_MYSQL= + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + LIBRE_MK=$(STAGING_DIR)/usr/share/re/re.mk \ + LIBRE_INC=$(STAGING_DIR)/usr/include/re \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + $(PKG_MAKE_OPTS) \ + SYSROOT="$(TOOLCHAIN_DIR)" \ + SYSROOT_ALT="$(STAGING_DIR)/usr" \ + RELEASE=1 \ + all install +endef + +define Package/restund/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/restund $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/$(PKG_NAME)/modules + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)/modules/*.so $(1)/usr/lib/$(PKG_NAME)/modules/. + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/etc/restund.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/restund.init $(1)/etc/init.d/restund +endef + +$(eval $(call BuildPackage,restund)) diff --git a/net/restund/files/restund.init b/net/restund/files/restund.init new file mode 100644 index 0000000..85246b9 --- /dev/null +++ b/net/restund/files/restund.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +START=60 +BIN=restund +DEFAULT=/etc/default/$BIN +OPTIONS= + +start() { + [ -f $DEFAULT ] && . $DEFAULT + $BIN $OPTIONS +} + +stop() { + killall $BIN +} diff --git a/net/rinetd/Makefile b/net/rinetd/Makefile new file mode 100755 index 0000000..75d05e3 --- /dev/null +++ b/net/rinetd/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rinetd +PKG_VERSION:=0.62 +PKG_RELEASE:=1 + +PKG_SOURCE:=rinetd.tar.gz +PKG_SOURCE_URL:=http://www.boutell.com/rinetd/http +PKG_MD5SUM:=28c78bac648971724c46f1a921154c4f +PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) + +include $(INCLUDE_DIR)/package.mk + +define Package/rinetd + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + TITLE:=rinetd - Internet Redirection Server + URL:=http://www.boutell.com/rinetd/ +endef + +define Package/rinetd/conffiles +/etc/config/rinetd +endef + +define Package/rinetd/description + Rinetd redirects TCP connections from one IP address and port to another. + Rinetd is a single-process server which handles any number of connections + to the address/port pairs specified in the configuration. + Since rinetd runs as a single process using nonblocking I/O, it is able to + redirect a large number of connections without a severe impact on the + machine. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + rinetd +endef + +define Package/rinetd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/rinetd $(1)/usr/sbin + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/rinetd.config $(1)/etc/config/rinetd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/rinetd.init $(1)/etc/init.d/rinetd + +endef + +$(eval $(call BuildPackage,rinetd)) diff --git a/net/rinetd/files/rinetd.config b/net/rinetd/files/rinetd.config new file mode 100644 index 0000000..eb543af --- /dev/null +++ b/net/rinetd/files/rinetd.config @@ -0,0 +1,33 @@ +# This section defines common settings for the rinetd process. +config common + # Remove the comment from the line below to enable logging. + #option logfile /var/log/rinetd.log + + # Enable the option below to use a web server style + # common log format. + #option logcommon 1 + + # Define allow and deny rules below, you may use "?" and "*" + # as wildcards, "?" matches exactly one and "*" matches zero + # or more characters. + # + #list deny "88.*.*.*" + #list deny "89.123.12?.*" + # + #list allow "192.168.*.*" + #list allow "172.16.*.*" + #list allow "10.*.*.*" + +# Forwarding sections define forwarding rules for rinetd, +# there may be multiple sections of this type to define +# any number of forwardings. +config forwarding + # IP and port rinetd should listen to for connections. + # Use the address "0.0.0.0" to listen on any interface. + option bindaddress "0.0.0.0" + option bindport "123" + + # IP and port to forward accepted connections to. + option connectaddress "10.0.0.1" + option connectport "123" + diff --git a/net/rinetd/files/rinetd.init b/net/rinetd/files/rinetd.init new file mode 100755 index 0000000..0cb2bbc --- /dev/null +++ b/net/rinetd/files/rinetd.init @@ -0,0 +1,68 @@ +#!/bin/sh /etc/rc.common +# rinetd init script +# Copyright (C) 2009 OpenWrt.org + +START=80 + +SSD=start-stop-daemon +BIN=/usr/sbin/rinetd +CFG=/var/etc/rinetd.conf +PID=/var/run/rinetd.pid + +common_add() { + local cfg="$1" + local logfile logcommon allow deny match + + config_get logfile "$cfg" logfile + config_get_bool logcommon "$cfg" logcommon 0 + + [ -n "$logfile" ] && { + echo "logfile $logfile" >> $CFG + [ "$logcommon" -gt 0 ] && echo "logcommon" >> $CFG + } + + config_get allow "$cfg" allow + config_get deny "$cfg" deny + + for match in $allow; do + echo "allow $match" >> $CFG + done + + for match in $deny; do + echo "deny $match" >> $CFG + done +} + +forward_add() { + local cfg="$1" + local bindaddr bindport connaddr connport + + config_get bindaddr "$cfg" bindaddress + config_get bindport "$cfg" bindport + config_get connaddr "$cfg" connectaddress + config_get connport "$cfg" connectport + + [ -n "$bindaddr" ] && [ -n "$connaddr" ] && \ + [ -n "$bindport" ] && [ -n "$connport" ] && \ + echo "$bindaddr $bindport $connaddr $connport" >> $CFG +} + +start() { + mkdir -p /var/etc /var/run + + echo "# This file is autogenerated, use /etc/config/rinetd" > $CFG + config_load rinetd + config_foreach common_add common + config_foreach forward_add forwarding + + $SSD -S -q -x $BIN -- -c $CFG +} + +stop() { + $SSD -K -q -p $PID -x $BIN + rm -f $PID $CFG +} + +reload() { + $SSD -K -q -p $PID -x $BIN -s 1 +} diff --git a/net/rinetd/patches/001-crosscompile.patch b/net/rinetd/patches/001-crosscompile.patch new file mode 100644 index 0000000..0024306 --- /dev/null +++ b/net/rinetd/patches/001-crosscompile.patch @@ -0,0 +1,12 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,8 @@ ++CC=gcc + CFLAGS=-DLINUX -g + + rinetd: rinetd.o match.o +- gcc rinetd.o match.o -o rinetd ++ $(CC) rinetd.o match.o -o rinetd + + install: rinetd + install -m 700 rinetd /usr/sbin diff --git a/net/rp-l2tp/Makefile b/net/rp-l2tp/Makefile new file mode 100644 index 0000000..d120c34 --- /dev/null +++ b/net/rp-l2tp/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rp-l2tp +PKG_VERSION:=0.4 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/rp-l2tp +PKG_MD5SUM:=0e45d11cb4fa6c56cce6b1d119733ed9 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/rp-l2tpd + SECTION:=net + CATEGORY:=Network + TITLE:=Roaring Penguin L2TP + URL:=http://sourceforge.net/projects/rp-l2tp/ + TITLE+= daemon + SUBMENU:=dial-in/up +endef + +define Package/rp-l2tpd/description + Roaring Penguin L2TP (Layer 2 Tunneling Protocol) implementation. +endef + +TARGET_CFLAGS := -I$(PKG_BUILD_DIR)/libevent $(TARGET_CFLAGS) + +define Package/rp-l2tpd/install + $(INSTALL_DIR) $(1)/etc + $(CP) $(PKG_INSTALL_DIR)/etc/l2tp.conf.example $(1)/etc/l2tp.conf + $(INSTALL_DIR) $(1)/usr/lib/l2tp + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/l2tpd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/rp-l2tpd.init $(1)/etc/init.d/rp-l2tpd + $(CP) $(PKG_INSTALL_DIR)/usr/lib/l2tp/cmd.so $(1)/usr/lib/l2tp/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/l2tp/sync-pppd.so $(1)/usr/lib/l2tp/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/l2tp-control $(1)/usr/sbin/ +endef + +#define Package/rp-l2tpd-mod-cmd/install +# $(INSTALL_DIR) $(1)/usr/lib/l2tp +# $(CP) $(PKG_INSTALL_DIR)/usr/lib/l2tp/cmd.so $(1)/usr/lib/l2tp/ +# $(INSTALL_DIR) $(1)/usr/sbin +# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/l2tp-control $(1)/usr/sbin/ +#endef + +#define Package/rp-l2tpd-mod-ppp/install +# $(INSTALL_DIR) $(1)/usr/lib/l2tp +# $(CP) $(PKG_INSTALL_DIR)/usr/lib/l2tp/sync-pppd.so $(1)/usr/lib/l2tp/ +#endef + +$(eval $(call BuildPackage,rp-l2tpd)) +#$(eval $(call BuildPackage,rp-l2tpd-mod-cmd)) +#$(eval $(call BuildPackage,rp-l2tpd-mod-ppp)) diff --git a/net/rp-l2tp/files/rp-l2tpd.init b/net/rp-l2tp/files/rp-l2tpd.init new file mode 100644 index 0000000..4895e17 --- /dev/null +++ b/net/rp-l2tp/files/rp-l2tpd.init @@ -0,0 +1,17 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=60 +DEFAULT=/etc/default/rp-l2tpd +RUN_D=/var/run +[ -f $DEFAULT ] && . $DEFAULT + +start() { + [ -d $RUN_D ] || mkdir -p $RUN_D + l2tpd $OPTIONS +} + +stop() { + killall l2tpd +} + diff --git a/net/rp-l2tp/patches/001-cross.patch b/net/rp-l2tp/patches/001-cross.patch new file mode 100644 index 0000000..654402e --- /dev/null +++ b/net/rp-l2tp/patches/001-cross.patch @@ -0,0 +1,235 @@ +diff -ruN rp-l2tp-0.4-orig/Makefile.in rp-l2tp-0.4-4/Makefile.in +--- rp-l2tp-0.4-orig/Makefile.in 2004-07-01 17:17:11.000000000 +0200 ++++ rp-l2tp-0.4-4/Makefile.in 2005-03-09 16:26:49.000000000 +0100 +@@ -27,10 +27,10 @@ + sbindir=@sbindir@ + + OBJS=auth.o debug.o dgram.o main.o md5.o network.o options.o peer.o session.o tunnel.o utils.o +-EXTRA_LIBS=@LIBEVENT@/*.o -ldl ++EXTRA_LIBS=@LIBEVENT@/*.o -lc -ldl + + SRCS=$(OBJS:.o=.c) +-CFLAGS=-g -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" ++CFLAGS=@CFLAGS@ -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" + + TARGETS=l2tpd libl2tp.a handlers + +@@ -38,12 +38,12 @@ + + libl2tp.a: $(OBJS) + rm -f $@ +- ar -rc $@ $^ +- ranlib $@ || true ++ $(AR) -rc $@ $^ ++ @RANLIB@ $@ || true + + l2tpd: libl2tp.a libevent/libevent.a + $(MAKE) -C handlers +- @CC@ -o l2tpd -rdynamic $(OBJS) $(EXTRA_LIBS) ++ @CC@ $(CFLAGS) -o l2tpd -rdynamic $(OBJS) $(EXTRA_LIBS) + + libevent/libevent.a: + test -d libevent || ln -s ../libevent . +@@ -72,18 +72,20 @@ + rm -f *.o *.a *~ + rm -f l2tpd + $(MAKE) -C handlers clean ++ $(MAKE) -C libevent clean + + distclean: clean +- rm -f Makefile config.cache ++ rm -f Makefile config.cache config.log config.status .depend + $(MAKE) -C handlers distclean ++ $(MAKE) -C libevent distclean + + -include .depend + + install: all + -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) +- $(install) -m 755 -s l2tpd $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) ++ $(install) -m 755 l2tpd $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) + -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp +- $(install) -m 644 l2tp.conf $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp/l2tp.conf.example ++ $(install) -m 644 l2tp.conf $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp.conf.example + -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 + -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5 + $(install) -m 644 man/l2tpd.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 +diff -ruN rp-l2tp-0.4-orig/handlers/Makefile.in rp-l2tp-0.4-4/handlers/Makefile.in +--- rp-l2tp-0.4-orig/handlers/Makefile.in 2002-09-30 21:45:00.000000000 +0200 ++++ rp-l2tp-0.4-4/handlers/Makefile.in 2005-03-09 16:26:49.000000000 +0100 +@@ -14,32 +14,34 @@ + + OBJS=pty.o sync-pppd.o dstring.o + SRCS=$(OBJS:.o=.c) +-CFLAGS=-g -O2 -I.. -I../libevent -I../../libevent -Wall ++CFLAGS=@CFLAGS@ -I.. -I../libevent -I../../libevent -Wall + + all: $(HANDLERS) l2tp-control + + l2tp-control: cmd-control.o +- gcc -o l2tp-control cmd-control.o ++ $(CC) $(CFLAGS) -o l2tp-control cmd-control.o + + cmd-control.o: cmd-control.c +- gcc -c -o $@ $^ ++ $(CC) $(CFLAGS) -c -o $@ $^ + + %.o: %.c +- gcc $(CFLAGS) -fPIC -c -o $@ $< ++ $(CC) $(CFLAGS) -fPIC -c -o $@ $< + + sync-pppd.so: pty.o sync-pppd.o +- gcc -shared -o $@ $^ ++ $(CC) $(CFLAGS) -shared -o $@ $^ + + cmd.so: cmd.o dstring.o +- gcc -shared -o $@ $^ ++ $(CC) $(CFLAGS) -shared -o $@ $^ + + clean: + rm -f *.so *.o *~ + rm -f l2tp-control + + install: all +- -mkdir -p $(RPM_INSTALL_ROOT)$(sbindir) +- -mkdir -p $(RPM_INSTALL_ROOT)$(prefix)/lib/l2tp/plugins +- $(install) -m 755 -s l2tp-control $(RPM_INSTALL_ROOT)$(sbindir) +- $(install) -m 755 $(HANDLERS) $(RPM_INSTALL_ROOT)$(prefix)/lib/l2tp/plugins ++ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) ++ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(prefix)/lib/l2tp ++ $(install) -m 755 l2tp-control $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir) ++ $(install) -m 755 $(HANDLERS) $(RPM_INSTALL_ROOT)$(DESTDIR)$(prefix)/lib/l2tp ++ + distclean: clean ++ rm -f Makefile +diff -ruN rp-l2tp-0.4-orig/handlers/cmd-control.c rp-l2tp-0.4-4/handlers/cmd-control.c +--- rp-l2tp-0.4-orig/handlers/cmd-control.c 2002-09-30 21:45:00.000000000 +0200 ++++ rp-l2tp-0.4-4/handlers/cmd-control.c 2005-03-09 16:26:49.000000000 +0100 +@@ -52,7 +52,7 @@ + + memset(&addr, 0, sizeof(addr)); + addr.sun_family = AF_LOCAL; +- strncpy(addr.sun_path, "/var/run/l2tpctrl", sizeof(addr.sun_path) - 1); ++ strncpy(addr.sun_path, "/var/run/l2tp.sock", sizeof(addr.sun_path) - 1); + + fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (fd < 0) { +diff -ruN rp-l2tp-0.4-orig/handlers/cmd.c rp-l2tp-0.4-4/handlers/cmd.c +--- rp-l2tp-0.4-orig/handlers/cmd.c 2004-07-01 16:58:56.000000000 +0200 ++++ rp-l2tp-0.4-4/handlers/cmd.c 2005-03-09 16:26:49.000000000 +0100 +@@ -162,7 +162,7 @@ + + /* We have hit the end of our options. Open command socket */ + if (!sockname) { +- sockname = "/var/run/l2tpctrl"; ++ sockname = "/var/run/l2tp.sock"; + } + + (void) remove(sockname); +diff -ruN rp-l2tp-0.4-orig/libevent/Makefile.in rp-l2tp-0.4-4/libevent/Makefile.in +--- rp-l2tp-0.4-orig/libevent/Makefile.in 2002-09-30 21:45:00.000000000 +0200 ++++ rp-l2tp-0.4-4/libevent/Makefile.in 2005-03-09 16:26:49.000000000 +0100 +@@ -18,24 +18,27 @@ + + libevent.a: $(OBJS) + rm -f libevent.a +- ar -cq libevent.a $(OBJS) ++ $(AR) r libevent.a $(OBJS) + @RANLIB@ libevent.a + + event.o: event.c $(HDRS) +- gcc $(CFLAGS) -c -o event.o event.c ++ $(CC) $(CFLAGS) -c -o event.o event.c + + hash.o: hash.c $(HDRS) +- gcc $(CFLAGS) -c -o hash.o hash.c ++ $(CC) $(CFLAGS) -c -o hash.o hash.c + + event_sig.o: event_sig.c $(HDRS) +- gcc $(CFLAGS) -c -o event_sig.o event_sig.c ++ $(CC) $(CFLAGS) -c -o event_sig.o event_sig.c + + event_tcp.o: event_tcp.c $(HDRS) +- gcc $(CFLAGS) -c -o event_tcp.o event_tcp.c ++ $(CC) $(CFLAGS) -c -o event_tcp.o event_tcp.c + + clean: FORCE + rm -f *.a *.o *~ + ++distclean: clean ++ rm -f Makefile ++ + FORCE: + +-.phony: FORCE +\ No newline at end of file ++.phony: FORCE +diff -ruN rp-l2tp-0.4-orig/main.c rp-l2tp-0.4-4/main.c +--- rp-l2tp-0.4-orig/main.c 2002-09-30 21:45:00.000000000 +0200 ++++ rp-l2tp-0.4-4/main.c 2005-03-09 16:26:49.000000000 +0100 +@@ -68,7 +68,7 @@ + l2tp_peer_init(); + l2tp_debug_set_bitmask(debugmask); + +- if (l2tp_parse_config_file(es, "/etc/l2tp/l2tp.conf") < 0) { ++ if (l2tp_parse_config_file(es, "/etc/l2tp.conf") < 0) { + l2tp_die(); + } + +diff -ruN rp-l2tp-0.4-orig/man/l2tp.conf.5 rp-l2tp-0.4-4/man/l2tp.conf.5 +--- rp-l2tp-0.4-orig/man/l2tp.conf.5 2004-07-01 16:58:56.000000000 +0200 ++++ rp-l2tp-0.4-4/man/l2tp.conf.5 2005-03-09 16:26:49.000000000 +0100 +@@ -155,7 +155,7 @@ + in the global section. The only option available is: + .IP "\fBsocket-path\fP \fIpathname\fR" + Specifies the path name of the UNIX-domain socket for controlling the +-daemon. Defaults to \fI/var/run/l2tpctrl\fR. ++daemon. Defaults to \fI/var/run/l2tp.sock\fR. + .PP + Even if you do not supply any options to cmd, you \fImust\fR have + a \fBsection cmd\fR line to activate the handler. +diff -ruN rp-l2tp-0.4-orig/man/l2tpd.8 rp-l2tp-0.4-4/man/l2tpd.8 +--- rp-l2tp-0.4-orig/man/l2tpd.8 2002-09-30 21:45:00.000000000 +0200 ++++ rp-l2tp-0.4-4/man/l2tpd.8 2005-03-09 16:26:49.000000000 +0100 +@@ -47,17 +47,17 @@ + fairly lightweight and efficient. + + .SH L2TPD CONFIGURATION +-On startup, \fBl2tpd\fR reads the configuration file \fB/etc/l2tp/l2tp.conf\fR. ++On startup, \fBl2tpd\fR reads the configuration file \fB/etc/l2tp.conf\fR. + This configuration file sets operating parameters, describes peers and loads + and configures handlers. See \fBl2tp.conf\fR(5) for configuration + file details. + + .SH FILES + .TP +-.B /etc/l2tp/l2tp.conf ++.B /etc/l2tp.conf + Main configuration file. + .TP +-.B /var/run/l2tpctrl ++.B /var/run/l2tp.sock + Control socket for \fBcmd.so\fR handler. + + .SH AUTHORS +diff -ruN rp-l2tp-0.4-orig/utils.c rp-l2tp-0.4-4/utils.c +--- rp-l2tp-0.4-orig/utils.c 2002-09-30 21:45:00.000000000 +0200 ++++ rp-l2tp-0.4-4/utils.c 2005-03-09 16:26:49.000000000 +0100 +@@ -182,7 +182,7 @@ + * -1 on error, 0 if OK + * %DESCRIPTION: + * Dynamically-loads a handler and initializes it. If fname is not +-* an absolute path name, we load the handler from /usr/lib/l2tp/plugins ++* an absolute path name, we load the handler from /usr/lib/l2tp + ***********************************************************************/ + int + l2tp_load_handler(EventSelector *es, +@@ -196,7 +196,7 @@ + if (*fname == '/') { + handle = dlopen(fname, RTLD_NOW); + } else { +- snprintf(buf, sizeof(buf), "%s/lib/l2tp/plugins/%s", PREFIX, fname); ++ snprintf(buf, sizeof(buf), "%s/lib/l2tp/%s", PREFIX, fname); + buf[sizeof(buf)-1] = 0; + handle = dlopen(buf, RTLD_NOW); + } diff --git a/net/rp-pppoe/Makefile b/net/rp-pppoe/Makefile new file mode 100644 index 0000000..9d58fe7 --- /dev/null +++ b/net/rp-pppoe/Makefile @@ -0,0 +1,130 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rp-pppoe +PKG_VERSION:=3.10 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://roaringpenguin.com/files/download +PKG_MD5SUM:=d58a13cc4185bca6121a606ff456dec0 + +PKG_BUILD_DEPENDS:=ppp + +include $(INCLUDE_DIR)/package.mk + +define Package/rp-pppoe/Default + SECTION:=net + CATEGORY:=Network + DEPENDS:=+ppp + TITLE:=PPPoE (PPP over Ethernet) + URL:=http://roaringpenguin.com/products/pppoe + SUBMENU:=dial-in/up +endef + +define Package/rp-pppoe/Default/description + Dubbed RP-PPPoE, this open-source product is ideal for Linux users with + a DSL "modem" whose Internet service provider uses PPPoE. +endef + +define Package/rp-pppoe-client + $(call Package/rp-pppoe/Default) + TITLE+= client +endef + +define Package/rp-pppoe-client/description + $(call Package/rp-pppoe/Default/description) + This package contains pppoe-connect. +endef + +define Package/rp-pppoe-relay + $(call Package/rp-pppoe/Default) + TITLE+= relay +endef + +define Package/rp-pppoe-relay/description + $(call Package/rp-pppoe/Default/description) + This package contains pppoe-relay. +endef + +define Package/rp-pppoe-server + $(call Package/rp-pppoe/Default) + TITLE+= server +endef + +define Package/rp-pppoe-server/conffiles +/etc/ppp/pppoe-server-options +/etc/default/pppoe-server +endef + +define Package/rp-pppoe-server/description + $(call Package/rp-pppoe/Default/description) + This package contains pppoe-server. +endef + +define Package/rp-pppoe-sniff + $(call Package/rp-pppoe/Default) + TITLE+= sniffer +endef + +define Package/rp-pppoe-sniff/description + $(call Package/rp-pppoe/Default/description) + This package contains pppoe-sniff. +endef + +TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/src/libevent +CONFIGURE_PATH := ./src +CONFIGURE_ARGS += ac_cv_path_PPPD=/usr/sbin/pppd --enable-plugin=$(STAGING_DIR)/usr/include/ +MAKE_FLAGS := DESTDIR="$(PKG_INSTALL_DIR)" install +MAKE_PATH := ./src + +define Package/rp-pppoe-client/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/pppoe-client.init $(1)/etc/init.d/pppoe-client + $(INSTALL_DIR) $(1)/etc/ppp + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ppp/pppoe.conf $(1)/etc/ppp/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-connect $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-start $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-stop $(1)/usr/sbin/ + $(SED) 's,modprobe,insmod,g' $(1)/usr/sbin/pppoe-connect +endef + +define Package/rp-pppoe-relay/install + $(INSTALL_DIR) $(1)/etc/default + $(INSTALL_BIN) ./files/pppoe-relay.default $(1)/etc/default/pppoe-relay + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/pppoe-relay.init $(1)/etc/init.d/pppoe-relay + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(1)/usr/sbin/ +endef + +define Package/rp-pppoe-server/install + $(INSTALL_DIR) $(1)/etc/default + $(INSTALL_BIN) ./files/pppoe-server.default $(1)/etc/default/pppoe-server + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/pppoe-server.init $(1)/etc/init.d/pppoe-server + $(INSTALL_DIR) $(1)/etc/ppp + $(INSTALL_DIR) $(1)/etc/ppp/plugins + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(1)/etc/ppp/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/ppp/plugins/rp-pppoe.so $(1)/etc/ppp/plugins/ +endef + +define Package/rp-pppoe-sniff/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,rp-pppoe-client)) +$(eval $(call BuildPackage,rp-pppoe-relay)) +$(eval $(call BuildPackage,rp-pppoe-server)) +$(eval $(call BuildPackage,rp-pppoe-sniff)) diff --git a/net/rp-pppoe/files/pppoe-client.init b/net/rp-pppoe/files/pppoe-client.init new file mode 100644 index 0000000..93654dd --- /dev/null +++ b/net/rp-pppoe/files/pppoe-client.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start() { + pppoe-start +} + +stop() { + pppoe-stop +} + diff --git a/net/rp-pppoe/files/pppoe-relay.default b/net/rp-pppoe/files/pppoe-relay.default new file mode 100644 index 0000000..47a3892 --- /dev/null +++ b/net/rp-pppoe/files/pppoe-relay.default @@ -0,0 +1 @@ +OPTIONS="-C eth2 -S vlan1" diff --git a/net/rp-pppoe/files/pppoe-relay.init b/net/rp-pppoe/files/pppoe-relay.init new file mode 100644 index 0000000..92ddd0c --- /dev/null +++ b/net/rp-pppoe/files/pppoe-relay.init @@ -0,0 +1,15 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +DEFAULT=/etc/default/pppoe-relay + +start() { + [ -f $DEFAULT ] && . $DEFAULT + pppoe-relay $OPTIONS +} + +stop() { + killall pppoe-relay +} + diff --git a/net/rp-pppoe/files/pppoe-server.default b/net/rp-pppoe/files/pppoe-server.default new file mode 100644 index 0000000..72a8c01 --- /dev/null +++ b/net/rp-pppoe/files/pppoe-server.default @@ -0,0 +1 @@ +OPTIONS="-C MyRouter -I eth2" diff --git a/net/rp-pppoe/files/pppoe-server.init b/net/rp-pppoe/files/pppoe-server.init new file mode 100644 index 0000000..16d8a17 --- /dev/null +++ b/net/rp-pppoe/files/pppoe-server.init @@ -0,0 +1,14 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +DEFAULT=/etc/default/pppoe-server + +start() { + [ -f $DEFAULT ] && . $DEFAULT + pppoe-server $OPTIONS +} + +stop() { + killall pppoe-server +} diff --git a/net/rp-pppoe/patches/100-configure.patch b/net/rp-pppoe/patches/100-configure.patch new file mode 100644 index 0000000..d8af0c3 --- /dev/null +++ b/net/rp-pppoe/patches/100-configure.patch @@ -0,0 +1,11 @@ +--- a/src/configure ++++ b/src/configure +@@ -6303,7 +6303,7 @@ + { echo "$as_me:$LINENO: checking packing order of bit fields" >&5 + echo $ECHO_N "checking packing order of bit fields... $ECHO_C" >&6; } + if test "$cross_compiling" = yes; then +- $ECHO "no defaults for cross-compiling"; exit 0 ++ rpppoe_cv_pack_bitfields="$ac_cv_pack_bitfields" + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ diff --git a/net/rrs/Makefile b/net/rrs/Makefile new file mode 100644 index 0000000..4ff8441 --- /dev/null +++ b/net/rrs/Makefile @@ -0,0 +1,89 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rrs +PKG_VERSION:=1.70 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.cycom.se/uploads/36/19 +PKG_MD5SUM:=b400d03c0e39e3e78a7327ba78f789f0 + +include $(INCLUDE_DIR)/package.mk + +define Package/rrs/Default + SECTION:=net + CATEGORY:=Network + DEPENDS:=+uclibcxx + TITLE:=A reverse (connecting) remote shell + URL:=http://www.cycom.se/dl/rrs/ +endef + +define Package/rrs +$(call Package/rrs/Default) + SECTION:=net + CATEGORY:=Network + DEPENDS+= +libopenssl + TITLE+= (with SSL support) + URL:=http://www.cycom.se/dl/rrs/ +endef + +define Package/rrs-nossl +$(call Package/rrs/Default) + SECTION:=net + CATEGORY:=Network + TITLE+= (without SSL support) +endef + + +define Build/Template + +$(STAMP_BUILT)-$(2): $(STAMP_PREPARED) + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++ -fno-builtin -fno-rtti -nostdinc++" \ + LDFLAGS="$(TARGET_LDFLAGS) -nodefaultlibs $(4) -luClibc++ -lm -lutil" \ + LDFLAGSNOSSL="$(TARGET_LDFLAGS) -nodefaultlibs $(4) -luClibc++ -lm -lutil" \ + $(3) + ( cd $(PKG_BUILD_DIR); mv -f rrs rrs-$(2); ) + touch $$@ + +$(STAMP_BUILT): $(STAMP_BUILT)-$(2) + +define Package/$(1)/install + $(INSTALL_DIR) $$(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/rrs-$(2) $$(1)/usr/bin/rrs +endef + +endef + + +define Build/Configure +endef + +define Build/Compile +endef + +ifneq ($(SDK)$(CONFIG_PACKAGE_rrs),) + define Build/with-ssl + $(call Build/Template,rrs,with-ssl,generic,-lcrypto -lssl) + endef +endif +$(eval $(Build/with-ssl)) + +ifneq ($(SDK)$(CONFIG_PACKAGE_rrs-nossl),) + define Build/without-ssl + $(call Build/Template,rrs-nossl,without-ssl,generic-nossl,) + endef +endif +$(eval $(Build/without-ssl)) + + +$(eval $(call BuildPackage,rrs)) +$(eval $(call BuildPackage,rrs-nossl)) diff --git a/net/rrs/patches/001-shell.patch b/net/rrs/patches/001-shell.patch new file mode 100644 index 0000000..13520fc --- /dev/null +++ b/net/rrs/patches/001-shell.patch @@ -0,0 +1,13 @@ +Index: rrs-1.70/rrs.c +=================================================================== +--- rrs-1.70.orig/rrs.c 2007-07-30 14:30:24.000000000 +0200 ++++ rrs-1.70/rrs.c 2007-07-30 14:30:24.000000000 +0200 +@@ -920,7 +920,7 @@ + close(slave_fd); + signal(SIGHUP, SIG_DFL); + signal(SIGCHLD, SIG_DFL); +- execl("/bin/sh", "", NULL); ++ execl("/bin/sh", "/bin/sh", NULL); + /* should not return */ + exit(1); + } else if (pid > 0) { diff --git a/net/rrs/patches/002-no_sslv2.patch b/net/rrs/patches/002-no_sslv2.patch new file mode 100644 index 0000000..1f7c35d --- /dev/null +++ b/net/rrs/patches/002-no_sslv2.patch @@ -0,0 +1,46 @@ +Index: rrs-1.70/rrs.c +=================================================================== +--- rrs-1.70.orig/rrs.c 2007-07-30 14:30:24.000000000 +0200 ++++ rrs-1.70/rrs.c 2007-07-30 14:30:25.000000000 +0200 +@@ -1826,9 +1826,12 @@ + } + rrs_ssl = TLSv1; + if (optarg) { ++#ifndef OPENSSL_NO_SSL2 + if (!strcasecmp(optarg, "SSLv2")) { + rrs_ssl = SSLv2; +- } else if (!strcasecmp(optarg, "SSLv3")) { ++ } else ++#endif ++ if (!strcasecmp(optarg, "SSLv3")) { + rrs_ssl = SSLv3; + } else if (!strcasecmp(optarg, "TLSv1")) { + rrs_ssl = TLSv1; +@@ -1981,9 +1984,12 @@ + SSL_load_error_strings(); + + if (rrs_listen) { ++#ifndef OPENSSL_NO_SSL2 + if (rrs_ssl == SSLv2) { + sslmethod = SSLv2_server_method(); +- } else if (rrs_ssl == SSLv3) { ++ } else ++#endif ++ if (rrs_ssl == SSLv3) { + sslmethod = SSLv3_server_method(); + } else if (rrs_ssl == TLSv1) { + sslmethod = TLSv1_server_method(); +@@ -1992,9 +1998,12 @@ + return err_generic; + } + } else { ++#ifndef OPENSSL_NO_SSL2 + if (rrs_ssl == SSLv2) { + sslmethod = SSLv2_client_method(); +- } else if (rrs_ssl == SSLv3) { ++ } else ++#endif ++ if (rrs_ssl == SSLv3) { + sslmethod = SSLv3_client_method(); + } else if (rrs_ssl == TLSv1) { + sslmethod = TLSv1_client_method(); diff --git a/net/rrs/patches/003-honour_copts.patch b/net/rrs/patches/003-honour_copts.patch new file mode 100644 index 0000000..b089329 --- /dev/null +++ b/net/rrs/patches/003-honour_copts.patch @@ -0,0 +1,12 @@ +diff -ruN rrs-1.70-old/Makefile rrs-1.70-new/Makefile +--- rrs-1.70-old/Makefile 2004-05-30 02:14:14.000000000 +0200 ++++ rrs-1.70-new/Makefile 2007-09-01 16:26:09.000000000 +0200 +@@ -50,7 +50,7 @@ + $(CC) $(CFLAGS) $(LDFLAGS) $(LDEXTRA) -o $(out) rrs.c md5.c sha1.c farm9crypt.cc twofish2.cc + + compile-generic-nossl: +- $(CC) -DWITHOUT_SSL $(CFLAGS) $$CFLAGS $(LDFLAGSNOSSL) $(LDEXTRA) -o $(out) rrs.c md5.c sha1.c farm9crypt.cc twofish2.cc ++ $(CC) -DWITHOUT_SSL $(CFLAGS) $(LDFLAGSNOSSL) $(LDEXTRA) -o $(out) rrs.c md5.c sha1.c farm9crypt.cc twofish2.cc + + ## qnx + compile-qnx: diff --git a/net/rssh/Makefile b/net/rssh/Makefile new file mode 100644 index 0000000..8e7e9f1 --- /dev/null +++ b/net/rssh/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rssh +PKG_VERSION:=2.3.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/rssh +PKG_MD5SUM:=b0c147602fcc95737ed50573b92fc468 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/rssh + SECTION:=net + CATEGORY:=Network + SUBMENU:=SSH + TITLE:=restricted shell for use with OpenSSH + URL:=http://www.pizzashack.org/rssh/index.shtml +endef + +define Package/rssh/description + rssh is a restricted shell for use with OpenSSH, allowing only scp and/or sftp. + It now also includes support for rdist, rsync, and cvs. For example, if you have + a server which you only want to allow users to copy files off of via scp, without + providing shell access, you can use rssh to do that. +endef + +define Package/rssh/conffiles +/etc/rssh.conf +endef + +CONFIGURE_ARGS += \ + --with-sftp-server="/usr/libexec/sftp-server" \ + +CONFIGURE_VARS += \ + ac_cv_func_malloc_0_nonnull=yes \ + +define Package/rssh/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/$(PKG_NAME).conf $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/rssh_chroot_helper $(1)/usr/lib/ +endef + +define Package/rssh/postinst +#!/bin/sh +grep rssh $${IPKG_INSTROOT}/etc/shells || \ + echo "/usr/bin/rssh" >> $${IPKG_INSTROOT}/etc/shells +endef + +$(eval $(call BuildPackage,rssh)) diff --git a/net/rssh/patches/001-destdir.patch b/net/rssh/patches/001-destdir.patch new file mode 100644 index 0000000..96184a0 --- /dev/null +++ b/net/rssh/patches/001-destdir.patch @@ -0,0 +1,22 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -16,7 +16,7 @@ base=`echo @PACKAGE_STRING@|tr " " "-"` + $(CC) -c $(DEFS) $(ourdefs) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< + + install-exec-hook: +- chmod u+s $(libexecdir)/rssh_chroot_helper ++ chmod u+s $(DESTDIR)$(libexecdir)/rssh_chroot_helper + + rpm: dist + rpmbuild -ta --sign $(base).tar.gz +--- a/Makefile.in ++++ b/Makefile.in +@@ -830,7 +830,7 @@ uninstall-man: uninstall-man1 uninstall- + $(CC) -c $(DEFS) $(ourdefs) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< + + install-exec-hook: +- chmod u+s $(libexecdir)/rssh_chroot_helper ++ chmod u+s $(DESTDIR)$(libexecdir)/rssh_chroot_helper + + rpm: dist + rpmbuild -ta --sign $(base).tar.gz diff --git a/net/rsync/Makefile b/net/rsync/Makefile new file mode 100644 index 0000000..46670e5 --- /dev/null +++ b/net/rsync/Makefile @@ -0,0 +1,82 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rsync +PKG_VERSION:=3.0.8 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://rsync.samba.org/ftp/rsync/src +PKG_MD5SUM:=0ee8346ce16bdfe4c88a236e94c752b4 + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/rsync + SECTION:=net + CATEGORY:=Network + SUBMENU:=File Transfer + TITLE:=Fast remote file copy program (like rcp) + DEPENDS:=+libpopt + URL:=http://rsync.samba.org/ +endef + +define Package/rsyncd + SECTION:=net + CATEGORY:=Network + SUBMENU:=File Transfer + TITLE:=Rsync daemon + DEPENDS:=+rsync +endef + +define Package/rsync/description + rsync is a program that allows files to be copied to + and from remote machines in much the same way as rcp. + It has many more options than rcp, and uses the rsync + remote-update protocol to greatly speed up file + transfers when the destination file already exists. + + The rsync remote-update protocol allows rsync to + transfer just the differences between two sets of files + across the network link. +endef + +CONFIGURE_ARGS += \ + --with-included-popt=no \ + --disable-debug \ + --disable-locale \ + --disable-xattr-support \ + --disable-acl-support \ + +define Package/rsync/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ +endef + +define Package/rsyncd/description + rsyncd is a configuration file and initscript to + utilize rsync as a daemon. It uses the same binary + as rsync. +endef + +define Package/rsyncd/conffiles +/etc/rsyncd.conf +endef + +define Package/rsyncd/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/rsyncd.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/rsyncd.init $(1)/etc/init.d/rsyncd +endef + +$(eval $(call BuildPackage,rsync)) +$(eval $(call BuildPackage,rsyncd)) diff --git a/net/rsync/files/rsyncd.conf b/net/rsync/files/rsyncd.conf new file mode 100644 index 0000000..896f368 --- /dev/null +++ b/net/rsync/files/rsyncd.conf @@ -0,0 +1,15 @@ +# /etc/rsyncd.conf +# Minimal configuration for rsync daemon + +# Next line required for init script +pid file = /var/run/rsyncd.pid +use chroot = yes +uid = nobody +gid = nogroup +read only = yes + +# Simple example to configure server +#[openwrt-etc] +#path = /etc +#comment = OpenWrt Configuration Files +#exclude = /init.d diff --git a/net/rsync/files/rsyncd.init b/net/rsync/files/rsyncd.init new file mode 100644 index 0000000..741e09c --- /dev/null +++ b/net/rsync/files/rsyncd.init @@ -0,0 +1,15 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2011 OpenWrt.org + +START=50 +BIN=/usr/bin/rsync +PID=/var/run/rsyncd.pid +SSD=start-stop-daemon + +start() { + $SSD -p $PID -S -x $BIN -- --daemon +} + +stop() { + $SSD -p $PID -K +} diff --git a/net/rtorrent/Makefile b/net/rtorrent/Makefile new file mode 100644 index 0000000..7101e6f --- /dev/null +++ b/net/rtorrent/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rtorrent +PKG_VERSION:=0.8.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://libtorrent.rakshasa.no/downloads +PKG_MD5SUM:=b804c45c01c40312926bcea6b55bb084 + +PKG_FIXUP:=libtool +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/rtorrent + SUBMENU:=BitTorrent + SECTION:=net + CATEGORY:=Network + TITLE:=BitTorrent client for ncurses + URL:=http://libtorrent.rakshasa.no/ + DEPENDS:=+libcurl +libtorrent +libncurses +libsigcxx +xmlrpc-c-server +libpthread + MAINTAINER:=Luka Perkov +endef + +define Package/rtorrent/description + rTorrent is a BitTorrent client for ncurses, using the libtorrent library. + The client and library is written in C++ with emphasis on speed and + efficiency, while delivering equivalent features to those found in GUI based + clients in an ncurses client. +endef + +TARGET_CPPFLAGS += -fno-strict-aliasing -fno-inline +TARGET_LDFLAGS += -lpthread -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +CONFIGURE_ARGS+= \ + --enable-shared \ + --disable-static \ + --disable-debug \ + --with-xmlrpc-c + +define Build/Configure + ( cd $(PKG_BUILD_DIR); ./autogen.sh ); + $(call Build/Configure/Default) +endef + +define Package/rtorrent/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rtorrent $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,rtorrent)) diff --git a/net/rtorrent/patches/100-fix-cross_compile.patch b/net/rtorrent/patches/100-fix-cross_compile.patch new file mode 100644 index 0000000..b52a952 --- /dev/null +++ b/net/rtorrent/patches/100-fix-cross_compile.patch @@ -0,0 +1,22 @@ +Index: rtorrent-0.8.6/scripts/common.m4 +=================================================================== +--- rtorrent-0.8.6.orig/scripts/common.m4 ++++ rtorrent-0.8.6/scripts/common.m4 +@@ -184,7 +184,7 @@ AC_DEFUN([TORRENT_CHECK_MADVISE], [ + AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_MSG_CHECKING(for execinfo.h) + +- AC_RUN_IFELSE( ++ AC_LINK_IFELSE( + [[#include + int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} + ]], +@@ -199,7 +199,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_DEFUN([TORRENT_CHECK_ALIGNED], [ + AC_MSG_CHECKING(the byte alignment) + +- AC_RUN_IFELSE( ++ AC_LINK_IFELSE( + [[#include + int main() { + char buf[8] = { 0, 0, 0, 0, 1, 0, 0, 0 }; diff --git a/net/rtorrent/patches/120-fix-ncurses.patch b/net/rtorrent/patches/120-fix-ncurses.patch new file mode 100644 index 0000000..e460927 --- /dev/null +++ b/net/rtorrent/patches/120-fix-ncurses.patch @@ -0,0 +1,13 @@ +Index: rtorrent-0.8.6/src/display/canvas.h +=================================================================== +--- rtorrent-0.8.6.orig/src/display/canvas.h ++++ rtorrent-0.8.6/src/display/canvas.h +@@ -48,7 +48,7 @@ class Canvas { + public: + typedef std::vector attributes_list; + +- Canvas(int x = 0, int y = 0, int width = 0, int height = 0) : ++ Canvas(int x = 0, int y = 0, int width = 1, int height = 1) : + m_window(newwin(height, width, y, x)) {} + ~Canvas() { delwin(m_window); } + diff --git a/net/rtpproxy/Makefile b/net/rtpproxy/Makefile new file mode 100644 index 0000000..b841a8f --- /dev/null +++ b/net/rtpproxy/Makefile @@ -0,0 +1,38 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rtpproxy +PKG_VERSION:=1.2.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://b2bua.org/chrome/site/ +PKG_MD5SUM:=b0b5d6cdce3f17cdbbac473c11a2d0e5 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/rtpproxy + SECTION:=net + CATEGORY:=Network + SUBMENU:=Telephony + DEPENDS:=+libpthread + TITLE:=RTP (Realtime Transport Protocol) proxy + URL:=http://www.rtpproxy.org/ +endef + +# uses GNU configure + +define Package/rtpproxy/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rtpproxy $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,rtpproxy)) diff --git a/net/samba/Makefile b/net/samba/Makefile new file mode 100644 index 0000000..28c2bd7 --- /dev/null +++ b/net/samba/Makefile @@ -0,0 +1,209 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=samba +PKG_VERSION:=2.0.10 +PKG_RELEASE:=6 +PKG_MD5SUM:=54870482fe036b7e69dd48c90661eec6 + +PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/samba/old-versions +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz + +include $(INCLUDE_DIR)/package.mk + +define Package/samba + SECTION:=net + CATEGORY:=Network + SUBMENU:=Filesystem + TITLE:=samba - NetBIOS/SMB implementation + URL:=http://www.samba.org/ +endef + +define Package/samba/description +The Samba software suite is a collection of programs that implements the + SMB protocol for unix systems, allowing you to serve files and printers to + Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred + to as the LanManager or Netbios protocol. +endef + +define Package/samba2-common + $(call Package/samba) + MENU:=1 + TITLE:=NetBIOS/SMB server and client shared files + DEPENDS:=+libgcc +endef + +define Package/samba2-server + $(call Package/samba) + TITLE:=NetBIOS/SMB file and print server + DEPENDS:=samba2-common +endef + +define Package/samba2-client + $(call Package/samba) + TITLE:=NetBIOS/SMB simple client + DEPENDS:=samba2-common +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + (cd $(PKG_BUILD_DIR)/source ; rm -rf config.{cache,status} ; \ + ./configure \ + $(HOST_CONFIGURE_VARS) \ + $(HOST_CONFIGURE_ARGS) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --includedir=/usr/include \ + --infodir=/usr/share/info \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --localstatedir=/var/log/samba \ + --mandir=/usr/share/man \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc/samba \ + $(DISABLE_NLS) \ + --with-lockdir=/var/run/samba \ + --with-privatedir=/etc/samba \ + ); + $(MAKE) -C $(PKG_BUILD_DIR)/source \ + bin/make_smbcodepage bin/make_unicodemap + (cd $(PKG_BUILD_DIR)/source/bin ; \ + mv -f make_smbcodepage make_smbcodepage.old ; \ + mv -f make_unicodemap make_unicodemap.old ; \ + ); + $(MAKE) -C $(PKG_BUILD_DIR)/source \ + clean + (cd $(PKG_BUILD_DIR)/source; rm -rf config.{cache,status}; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) $(LIBGCC_S)" \ + ac_cv_lib_cups_httpConnect=no \ + samba_cv_FTRUNCATE_NEEDS_ROOT=no \ + samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no \ + samba_cv_HAVE_BROKEN_GETGROUPS=no \ + samba_cv_HAVE_BROKEN_READDIR=no \ + samba_cv_HAVE_FCNTL_LOCK=yes \ + samba_cv_HAVE_FNMATCH=yes \ + samba_cv_HAVE_FTRUNCATE_EXTEND=no \ + samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \ + samba_cv_HAVE_IFACE_AIX=no \ + samba_cv_HAVE_IFACE_IFCONF=yes \ + samba_cv_HAVE_IFACE_IFREQ=yes \ + samba_cv_HAVE_INO64_T=yes \ + samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no \ + samba_cv_HAVE_OFF64_T=yes \ + samba_cv_HAVE_ROOT=yes \ + samba_cv_HAVE_SECURE_MKSTEMP=yes \ + samba_cv_HAVE_SHARED_MMAP=yes \ + samba_cv_HAVE_STRUCT_FLOCK64=yes \ + samba_cv_HAVE_SYSV_IPC=no \ + samba_cv_HAVE_TRUNCATED_SALT=no \ + samba_cv_HAVE_UNION_SEMUN=no \ + samba_cv_HAVE_UNSIGNED_CHAR=yes \ + samba_cv_NEED_SGI_SEMUN_HACK=no \ + samba_cv_REPLACE_INET_NTOA=no \ + samba_cv_SIZEOF_INO_T=4 \ + samba_cv_SIZEOF_OFF_T=4 \ + samba_cv_SYSCONF_SC_NGROUPS_MAX=yes \ + samba_cv_USE_SETEUID=yes \ + samba_cv_USE_SETRESUID=no \ + samba_cv_USE_SETREUID=yes \ + samba_cv_USE_SETUIDX=no \ + samba_cv_have_longlong=yes \ + samba_cv_have_setresgid=no \ + samba_cv_have_setresuid=no \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --includedir=/usr/include \ + --infodir=/usr/share/info \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --localstatedir=/var/log/samba \ + --mandir=/usr/share/man \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc/samba \ + $(DISABLE_NLS) \ + --with-lockdir=/var/run/samba \ + --with-privatedir=/etc/samba \ + --with-syslog \ + ); + $(MAKE) -C $(PKG_BUILD_DIR)/source \ + $(TARGET_CONFIGURE_OPTS) \ + CODEPAGEDIR="/usr/share/samba" \ + all shared + (cd $(PKG_BUILD_DIR)/source/bin ; \ + mv -f make_smbcodepage.old make_smbcodepage ; touch make_smbcodepage ; \ + mv -f make_unicodemap.old make_unicodemap ; touch make_unicodemap ; \ + ); + mkdir -p $(PKG_INSTALL_DIR)/usr/share/samba + mkdir -p $(PKG_INSTALL_DIR)/var/log + $(MAKE) -C $(PKG_BUILD_DIR)/source \ + BASEDIR="$(PKG_INSTALL_DIR)/usr" \ + BINDIR="$(PKG_INSTALL_DIR)/usr/bin" \ + SBINDIR="$(PKG_INSTALL_DIR)/usr/bin" \ + LIBDIR="$(PKG_INSTALL_DIR)/usr/lib" \ + VARDIR="$(PKG_INSTALL_DIR)/var/log/samba" \ + MANDIR="$(PKG_INSTALL_DIR)/usr/share/man" \ + CONFIGDIR="$(PKG_INSTALL_DIR)/etc/samba" \ + PRIVATEDIR="$(PKG_INSTALL_DIR)/etc/samba" \ + SWATDIR="$(PKG_INSTALL_DIR)/usr/swat" \ + LOCKDIR="$(PKG_INSTALL_DIR)/var/run/samba" \ + SAMBABOOK="$(PKG_INSTALL_DIR)/usr/swat/using_samba" \ + CODEPAGEDIR="$(PKG_INSTALL_DIR)/usr/share/samba" \ + install +endef + +define Package/samba2-common/install + $(INSTALL_DIR) $(1)/etc/samba + $(INSTALL_DATA) ./files/smb.conf $(1)/etc/samba/smb.conf + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbpasswd.shared $(1)/usr/bin/smbpasswd + $(INSTALL_DIR) $(1)/usr/share/samba + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/codepage.{437,850} $(1)/usr/share/samba/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/unicode_map.{437,850,ISO8859-1,ISO8859-15} $(1)/usr/share/samba/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/codepage.852 $(1)/usr/share/samba/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/unicode_map.{852,ISO8859-2} $(1)/usr/share/samba/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/codepage.{866,1251} $(1)/usr/share/samba/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/samba/unicode_map.{866,ISO8859-5,KOI8-R,1251} $(1)/usr/share/samba/ +endef + +define Package/samba2-server/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/libsmb.so $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/nmbd.shared $(1)/usr/sbin/nmbd + $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbd.shared $(1)/usr/sbin/smbd +endef + +define Package/samba2-client/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/smbclient $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,samba2-common)) +$(eval $(call BuildPackage,samba2-server)) +$(eval $(call BuildPackage,samba2-client)) diff --git a/net/samba/files/samba.init b/net/samba/files/samba.init new file mode 100644 index 0000000..159797f --- /dev/null +++ b/net/samba/files/samba.init @@ -0,0 +1,36 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=60 + +DEFAULT=/etc/default/samba +RUN_D=/var/run/samba +NMBD_PID_F=$RUN_D/nmbd.pid +SMBD_PID_F=$RUN_D/smbd.pid + +config_cb() { + local cfg="$CONFIG_SECTION" + local cfgtype + config_get cfgtype "$cfg" TYPE + + case "$cfgtype" in + timezone) + config_get posixtz $cfg posixtz + config_get zoneinfo $cfg zoneinfo + echo "$posixtz" > /etc/TZ + ;; + esac +} + + +start() { + [ -f $DEFAULT ] && . $DEFAULT + config_load timezone& + mkdir -p $RUN_D + nmbd -D $NMBD_OPTIONS + smbd -D $SMBD_OPTIONS +} +stop() { + [ -f $SMBD_PID_F ] && kill $(cat $SMBD_PID_F) + [ -f $NMBD_PID_F ] && kill $(cat $NMBD_PID_F) +} + diff --git a/net/samba/files/smb.conf b/net/samba/files/smb.conf new file mode 100644 index 0000000..c52d6dd --- /dev/null +++ b/net/samba/files/smb.conf @@ -0,0 +1,18 @@ +[global] + syslog = 0 + syslog only = yes + workgroup = OpenWrt + server string = OpenWrt Samba Server + security = share + encrypt passwords = yes + guest account = nobody + local master = yes + name resolve order = lmhosts hosts bcast + +[tmp] + comment = /tmp + path = /tmp + browseable = yes + public = yes + writeable = no + diff --git a/net/samba/files/smbd.config b/net/samba/files/smbd.config new file mode 100644 index 0000000..583d21b --- /dev/null +++ b/net/samba/files/smbd.config @@ -0,0 +1,3 @@ +# use a random selection of 8 public stratum 2 servers +# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers +servers 0.openwrt.pool.ntp.org diff --git a/net/samba/patches/100-samba.patch b/net/samba/patches/100-samba.patch new file mode 100644 index 0000000..3bfeed3 --- /dev/null +++ b/net/samba/patches/100-samba.patch @@ -0,0 +1,489 @@ +diff -ruN samba-2.0.10.orig/source/include/smb.h samba-2.0.10/source/include/smb.h +--- samba-2.0.10.orig/source/include/smb.h 2001-06-23 10:52:20.000000000 +0200 ++++ samba-2.0.10/source/include/smb.h 2006-03-06 22:21:12.000000000 +0100 +@@ -115,6 +115,22 @@ + * Usage: + * DEBUGADD( 2, ("Some additional text.\n") ); + */ ++ ++#ifdef NDEBUG ++ ++#define DEBUGLVL( level ) \ ++ ( (0 == (level)) \ ++ && dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) ) ++ ++#define DEBUG( level, body ) \ ++ (void)( (0 == (level)) \ ++ && (dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) )) \ ++ && (dbgtext body) ) ++ ++#define DEBUGADD( level, body ) \ ++ (void)( (0 == (level)) && (dbgtext body) ) ++ ++#else + #define DEBUGLVL( level ) \ + ( (DEBUGLEVEL >= (level)) \ + && dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) ) +@@ -140,7 +156,7 @@ + (void)( (DEBUGLEVEL >= (level)) && (dbgtext body) ) + + #endif +- ++#endif + /* End Debugging code section. + * -------------------------------------------------------------------------- ** + */ +@@ -1612,7 +1628,9 @@ + #define CAP_LOCK_AND_READ 0x0100 + #define CAP_NT_FIND 0x0200 + #define CAP_DFS 0x1000 ++#define CAP_W2K_SMBS 0x2000 + #define CAP_LARGE_READX 0x4000 ++#define CAP_LARGE_WRITEX 0x8000 + #define CAP_EXTENDED_SECURITY 0x80000000 + + /* protocol types. It assumes that higher protocols include lower protocols +diff -ruN samba-2.0.10.orig/source/Makefile.in samba-2.0.10/source/Makefile.in +--- samba-2.0.10.orig/source/Makefile.in 2000-03-16 23:57:08.000000000 +0100 ++++ samba-2.0.10/source/Makefile.in 2006-03-06 22:21:12.000000000 +0100 +@@ -37,8 +37,8 @@ + # set these to where to find various files + # These can be overridden by command line switches (see smbd(8)) + # or in smb.conf (see smb.conf(5)) +-SMBLOGFILE = $(VARDIR)/log.smb +-NMBLOGFILE = $(VARDIR)/log.nmb ++SMBLOGFILE = $(VARDIR)/smb ++NMBLOGFILE = $(VARDIR)/nmb + CONFIGFILE = $(LIBDIR)/smb.conf + LMHOSTSFILE = $(LIBDIR)/lmhosts + DRIVERFILE = $(LIBDIR)/printers.def +@@ -55,7 +55,7 @@ + LOCKDIR = @lockdir@ + + # The directory where code page definition files go +-CODEPAGEDIR = $(LIBDIR)/codepages ++CODEPAGEDIR = $(BASEDIR)/codepages + + # The current codepage definition list. + CODEPAGELIST= 437 737 775 850 852 861 932 866 949 950 936 1251 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R +@@ -82,6 +82,7 @@ + PROGS2 = bin/rpcclient bin/smbpasswd bin/make_smbcodepage bin/make_unicodemap @WRAP@ @WRAP32@ + MPROGS = @MPROGS@ + PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup bin/make_printerdef ++SHAREDPROGS = bin/smbd.shared bin/nmbd.shared bin/smbpasswd.shared + + SCRIPTS = $(srcdir)/script/smbtar $(srcdir)/script/addtosmbpass $(srcdir)/script/convert_smbpasswd + +@@ -159,6 +160,8 @@ + $(RPC_SERVER_OBJ) $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) \ + $(LOCKING_OBJ) $(PASSDB_OBJ) $(PRINTING_OBJ) $(PROFILE_OBJ) $(LIB_OBJ) + ++SMBDSHARED_OBJ = $(SMBD_OBJ1) $(RPC_SERVER_OBJ) \ ++ $(LOCKING_OBJ) $(PROFILE_OBJ) #$(PRINTING_OBJ) + + NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \ + nmbd/nmbd_become_lmb.o nmbd/nmbd_browserdb.o \ +@@ -176,6 +179,8 @@ + NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \ + $(LIB_OBJ) + ++NMBDSHARED_OBJ = $(NMBD_OBJ1) ++ + SWAT_OBJ = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \ + web/swat.o $(LIBSMB_OBJ) $(LOCKING_OBJ) \ + $(PARAM_OBJ) $(PASSDB_OBJ) $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) \ +@@ -207,6 +212,8 @@ + SMBPASSWD_OBJ = utils/smbpasswd.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) \ + $(UBIQX_OBJ) $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) $(LIB_OBJ) + ++SMBPASSWDSHARED_OBJ = utils/smbpasswd.o ++ + RPCCLIENT_OBJ = rpcclient/rpcclient.o \ + rpcclient/display.o \ + rpcclient/cmd_lsarpc.o \ +@@ -265,6 +272,11 @@ + PROTO_OBJ = $(SMBD_OBJ) $(NMBD_OBJ) $(SWAT_OBJ) $(CLIENT_OBJ) \ + $(RPCCLIENT_OBJ) $(SMBWRAPPER_OBJ) $(SMBTORTURE_OBJ) + ++LIBSMBSHARED_OBJ = $(LIB_OBJ) $(LIBSMB_OBJ) $(PARAM_OBJ) $(UBIQX_OBJ) \ ++ $(PASSDB_OBJ) $(RPC_PARSE_OBJ) #$(RPC_CLIENT_OBJ) ++ ++LIBSMB_PICOBJS = $(LIBSMBSHARED_OBJ:.o=.po) ++ + PICOBJS = $(SMBWRAPPER_OBJ:.o=.po) + PICOBJS32 = $(SMBWRAPPER_OBJ:.o=.po32) + +@@ -274,6 +286,8 @@ + + all : CHECK $(SPROGS) $(PROGS) + ++shared : CHECK $(SHAREDPROGS) ++ + smbwrapper : CHECK bin/smbsh bin/smbwrapper.@SHLIBEXT@ @WRAP32@ + + smbtorture : CHECK bin/smbtorture +@@ -359,10 +373,18 @@ + @echo Linking $@ + @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LIBS) + ++bin/smbd.shared: $(SMBDSHARED_OBJ) bin/libsmb.@SHLIBEXT@ bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(SMBDSHARED_OBJ) $(LDFLAGS) $(LIBS) -Lbin -lsmb ++ + bin/nmbd: $(NMBD_OBJ) bin/.dummy + @echo Linking $@ + @$(CC) $(FLAGS) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(LIBS) + ++bin/nmbd.shared: $(NMBDSHARED_OBJ) bin/libsmb.@SHLIBEXT@ bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(NMBDSHARED_OBJ) $(LDFLAGS) $(LIBS) -Lbin -lsmb ++ + bin/swat: $(SWAT_OBJ) bin/.dummy + @echo Linking $@ + @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(LIBS) +@@ -411,6 +433,10 @@ + @echo Linking $@ + @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(LIBS) + ++bin/smbpasswd.shared: $(SMBPASSWDSHARED_OBJ) bin/libsmb.@SHLIBEXT@ bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(SMBPASSWDSHARED_OBJ) $(LDFLAGS) $(LIBS) -Lbin -lsmb ++ + bin/make_smbcodepage: $(MAKE_SMBCODEPAGE_OBJ) bin/.dummy + @echo Linking $@ + @$(CC) $(FLAGS) -o $@ $(MAKE_SMBCODEPAGE_OBJ) $(LDFLAGS) $(LIBS) +@@ -459,6 +485,10 @@ + @echo Linking $@ + @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS) + ++bin/libsmb.@SHLIBEXT@: $(LIBSMB_PICOBJS) bin/.dummy ++ @echo Linking shared library $@ ++ @$(LD) @LDSHFLAGS@ -o $@ $(LIBSMB_PICOBJS) $(LIBS) ++ + install: installbin installman installscripts installcp installswat + + installdirs: +@@ -518,7 +548,7 @@ + ctags `find . -name "*.[ch]" | grep -v /CVS/` + + realclean: clean +- -rm -f config.log $(PROGS) $(SPROGS) bin/.dummy ++ -rm -f config.log $(PROGS) $(SPROGS) $(SHAREDPROGS) bin/.dummy + -rmdir bin + + distclean: realclean +diff -ruN samba-2.0.10.orig/source/nmbd/nmbd_mynames.c samba-2.0.10/source/nmbd/nmbd_mynames.c +--- samba-2.0.10.orig/source/nmbd/nmbd_mynames.c 2000-03-16 23:59:24.000000000 +0100 ++++ samba-2.0.10/source/nmbd/nmbd_mynames.c 2006-03-06 22:21:12.000000000 +0100 +@@ -215,8 +215,8 @@ + */ + if( !is_refresh_already_queued( subrec, namerec) ) + refresh_name( subrec, namerec, NULL, NULL, NULL ); +- namerec->data.death_time += lp_max_ttl(); +- namerec->data.refresh_time += MIN(lp_max_ttl(), MAX_REFRESH_TIME); ++ namerec->data.death_time = t + lp_max_ttl(); ++ namerec->data.refresh_time = t + MIN(lp_max_ttl(), MAX_REFRESH_TIME); + } + } + } +diff -ruN samba-2.0.10.orig/source/smbd/close.c samba-2.0.10/source/smbd/close.c +--- samba-2.0.10.orig/source/smbd/close.c 2000-04-21 19:43:13.000000000 +0200 ++++ samba-2.0.10/source/smbd/close.c 2006-03-06 22:21:12.000000000 +0100 +@@ -122,11 +122,11 @@ + last_reference = True; + + fsp->fd_ptr = NULL; +- ++#ifdef PRINTING + /* NT uses smbclose to start a print - weird */ + if (normal_close && fsp->print_file) + print_file(conn, fsp); +- ++#endif + /* check for magic scripts */ + if (normal_close) { + check_magic(fsp,conn); +diff -ruN samba-2.0.10.orig/source/smbd/ipc.c samba-2.0.10/source/smbd/ipc.c +--- samba-2.0.10.orig/source/smbd/ipc.c 2000-03-30 00:20:06.000000000 +0200 ++++ samba-2.0.10/source/smbd/ipc.c 2006-03-06 22:21:12.000000000 +0100 +@@ -472,7 +472,7 @@ + PACK(desc,t,v); + } + +- ++#ifdef PRINTING + /**************************************************************************** + get a print queue + ****************************************************************************/ +@@ -1004,7 +1004,7 @@ + + return True; + } +- ++#endif + /**************************************************************************** + get info level for a server list query + ****************************************************************************/ +@@ -1834,7 +1834,7 @@ + + return(True); + } +- ++#ifdef PRINTING + /**************************************************************************** + delete a print job + Form: <> +@@ -2091,7 +2091,7 @@ + + return(True); + } +- ++#endif + + /**************************************************************************** + get info about the server +@@ -2756,7 +2756,7 @@ + + return(True); + } +- ++#ifdef PRINTING + /**************************************************************************** + api_WPrintJobEnumerate + ****************************************************************************/ +@@ -3189,7 +3189,7 @@ + DEBUG(4,("WPrintPortEnum: errorcode %d\n",desc.errcode)); + return(True); + } +- ++#endif + /**************************************************************************** + Start the first part of an RPC reply which began with an SMBtrans request. + ****************************************************************************/ +@@ -3407,6 +3407,7 @@ + {"RNetUserGetInfo", 56, api_RNetUserGetInfo,0}, + {"NetUserGetGroups", 59, api_NetUserGetGroups,0}, + {"NetWkstaGetInfo", 63, api_NetWkstaGetInfo,0}, ++#ifdef PRINTING + {"DosPrintQEnum", 69, api_DosPrintQEnum,0}, + {"DosPrintQGetInfo", 70, api_DosPrintQGetInfo,0}, + {"WPrintQueuePause", 74, api_WPrintQueuePurge,0}, +@@ -3418,16 +3419,21 @@ + {"RDosPrintJobResume",83, api_RDosPrintJobDel,0}, + {"WPrintDestEnum", 84, api_WPrintDestEnum,0}, + {"WPrintDestGetInfo", 85, api_WPrintDestGetInfo,0}, ++#endif + {"NetRemoteTOD", 91, api_NetRemoteTOD,0}, ++#ifdef PRINTING + {"WPrintQueuePurge", 103, api_WPrintQueuePurge,0}, ++#endif + {"NetServerEnum", 104, api_RNetServerEnum,0}, + {"WAccessGetUserPerms",105, api_WAccessGetUserPerms,0}, + {"SetUserPassword", 115, api_SetUserPassword,0}, + {"WWkstaUserLogon", 132, api_WWkstaUserLogon,0}, ++#ifdef PRINTING + {"PrintJobInfo", 147, api_PrintJobInfo,0}, + {"WPrintDriverEnum", 205, api_WPrintDriverEnum,0}, + {"WPrintQProcEnum", 206, api_WPrintQProcEnum,0}, + {"WPrintPortEnum", 207, api_WPrintPortEnum,0}, ++#endif + {"SamOEMChangePassword", 214, api_SamOEMChangePassword,0}, + {NULL, -1, api_Unsupported,0}}; + +diff -ruN samba-2.0.10.orig/source/smbd/negprot.c samba-2.0.10/source/smbd/negprot.c +--- samba-2.0.10.orig/source/smbd/negprot.c 2000-03-16 23:59:47.000000000 +0100 ++++ samba-2.0.10/source/smbd/negprot.c 2006-03-06 22:21:12.000000000 +0100 +@@ -160,7 +160,7 @@ + /* dual names + lock_and_read + nt SMBs + remote API calls */ + int capabilities = CAP_NT_FIND|CAP_LOCK_AND_READ| + (lp_nt_smb_support() ? CAP_NT_SMBS | CAP_RPC_REMOTE_APIS : 0) | +- (SMB_OFF_T_BITS == 64 ? CAP_LARGE_FILES : 0); ++ (SMB_OFF_T_BITS == 64 ? CAP_LARGE_FILES | CAP_LARGE_READX | CAP_LARGE_WRITEX /*| CAP_W2K_SMBS*/ : 0); + + + /* +diff -ruN samba-2.0.10.orig/source/smbd/password.c samba-2.0.10/source/smbd/password.c +--- samba-2.0.10.orig/source/smbd/password.c 2000-03-16 23:59:48.000000000 +0100 ++++ samba-2.0.10/source/smbd/password.c 2006-03-06 22:21:12.000000000 +0100 +@@ -1149,7 +1149,7 @@ + + return(True); + } +- ++#ifdef RPCCLIENT + /*********************************************************************** + Connect to a remote machine for domain security authentication + given a name or IP address. +@@ -1504,3 +1504,4 @@ + cli_shutdown(&cli); + return True; + } ++#endif +diff -ruN samba-2.0.10.orig/source/smbd/process.c samba-2.0.10/source/smbd/process.c +--- samba-2.0.10.orig/source/smbd/process.c 2000-04-15 02:21:27.000000000 +0200 ++++ samba-2.0.10/source/smbd/process.c 2006-03-06 22:21:12.000000000 +0100 +@@ -343,10 +343,12 @@ + {SMBlseek,"SMBlseek",reply_lseek,AS_USER}, + {SMBflush,"SMBflush",reply_flush,AS_USER}, + {SMBctemp,"SMBctemp",reply_ctemp,AS_USER | QUEUE_IN_OPLOCK }, ++#ifdef PRINTING + {SMBsplopen,"SMBsplopen",reply_printopen,AS_USER | QUEUE_IN_OPLOCK }, + {SMBsplclose,"SMBsplclose",reply_printclose,AS_USER}, + {SMBsplretq,"SMBsplretq",reply_printqueue,AS_USER}, + {SMBsplwr,"SMBsplwr",reply_printwrite,AS_USER}, ++#endif + {SMBlock,"SMBlock",reply_lock,AS_USER}, + {SMBunlock,"SMBunlock",reply_unlock,AS_USER}, + +@@ -908,7 +910,7 @@ + DEBUG(2,("Closing idle connection 2.\n")); + return False; + } +- ++#ifdef RPCLIENT + if(global_machine_password_needs_changing) + { + unsigned char trust_passwd_hash[16]; +@@ -954,7 +956,7 @@ + trust_password_unlock(); + global_machine_password_needs_changing = False; + } +- ++#endif + /* + * Check to see if we have any blocking locks + * outstanding on the queue. +diff -ruN samba-2.0.10.orig/source/smbd/reply.c samba-2.0.10/source/smbd/reply.c +--- samba-2.0.10.orig/source/smbd/reply.c 2001-06-23 10:51:24.000000000 +0200 ++++ samba-2.0.10/source/smbd/reply.c 2006-03-06 22:21:12.000000000 +0100 +@@ -597,12 +597,12 @@ + + if (!check_domain_match(orig_user, domain)) + return False; +- ++#ifdef RPCCLIENT + ret = domain_client_validate(orig_user, domain, + smb_apasswd, smb_apasslen, + smb_ntpasswd, smb_ntpasslen, + &user_exists); +- ++#endif + if(ret) { + /* + * User validated ok against Domain controller. +@@ -2991,7 +2991,7 @@ + return -1; + } + +- ++#ifdef PRINTING + /**************************************************************************** + reply to a printopen + ****************************************************************************/ +@@ -3176,7 +3176,7 @@ + + return(outsize); + } +- ++#endif + + /**************************************************************************** + reply to a mkdir +diff -ruN samba-2.0.10.orig/source/smbd/server.c samba-2.0.10/source/smbd/server.c +--- samba-2.0.10.orig/source/smbd/server.c 2000-03-16 23:59:52.000000000 +0100 ++++ samba-2.0.10/source/smbd/server.c 2006-03-06 22:21:12.000000000 +0100 +@@ -300,9 +300,9 @@ + lp_killunused(conn_snum_used); + + ret = lp_load(servicesf,False,False,True); +- ++#ifdef PRINTING + load_printers(); +- ++#endif + /* perhaps the config filename is now set */ + if (!test) + reload_services(True); +diff -ruN samba-2.0.10.orig/source/smbd/service.c samba-2.0.10/source/smbd/service.c +--- samba-2.0.10.orig/source/smbd/service.c 2000-03-16 23:59:52.000000000 +0100 ++++ samba-2.0.10/source/smbd/service.c 2006-03-06 22:21:12.000000000 +0100 +@@ -121,7 +121,7 @@ + } + } + } +- ++#ifdef PRINTING + /* If we still don't have a service, attempt to add it as a printer. */ + if (iService < 0) + { +@@ -146,7 +146,7 @@ + DEBUG(3,("%s is not a valid printer name\n", service)); + } + } +- ++#endif + /* just possibly it's a default service? */ + if (iService < 0) + { +diff -ruN samba-2.0.10.orig/source/utils/smbpasswd.c samba-2.0.10/source/utils/smbpasswd.c +--- samba-2.0.10.orig/source/utils/smbpasswd.c 2000-03-16 23:59:57.000000000 +0100 ++++ samba-2.0.10/source/utils/smbpasswd.c 2006-03-06 22:21:12.000000000 +0100 +@@ -71,7 +71,7 @@ + } + exit(1); + } +- ++#ifdef RPCCLIENT + /********************************************************* + Join a domain. + **********************************************************/ +@@ -143,7 +143,7 @@ + + return (int)ret; + } +- ++#endif + + static void set_line_buffering(FILE *f) + { +@@ -335,13 +335,13 @@ + if((local_flags & (LOCAL_ADD_USER|LOCAL_DELETE_USER)) && ((remote_machine != NULL) || joining_domain)) { + usage(); + } +- ++#ifdef RPCCLIENT + if(joining_domain) { + if (argc != 0) + usage(); + return join_domain(new_domain, remote_machine); + } +- ++#endif + /* + * Deal with root - can add a user, but only locally. + */ +diff -ruN samba-2.0.10.orig/source/web/swat.c samba-2.0.10/source/web/swat.c +--- samba-2.0.10.orig/source/web/swat.c 2000-04-11 19:36:36.000000000 +0200 ++++ samba-2.0.10/source/web/swat.c 2006-03-06 22:21:12.000000000 +0100 +@@ -357,8 +357,9 @@ + return 0; + } + iNumNonAutoPrintServices = lp_numservices(); ++#ifdef PRINTING + load_printers(); +- ++#endif + return 1; + } + +@@ -997,8 +998,9 @@ + charset_initialise(); + load_config(True); + iNumNonAutoPrintServices = lp_numservices(); ++#ifdef PRINTING + load_printers(); +- ++#endif + cgi_setup(SWATDIR, !demo_mode); + + print_header(); diff --git a/net/samba/patches/101-codepages.patch b/net/samba/patches/101-codepages.patch new file mode 100644 index 0000000..619fed3 --- /dev/null +++ b/net/samba/patches/101-codepages.patch @@ -0,0 +1,4764 @@ +--- samba-2.0.10./source/Makefile.in 2007-04-24 15:49:41.000000000 +0200 ++++ samba-2.0.10.patched/source/Makefile.in 2007-04-24 15:57:04.000000000 +0200 +@@ -60,7 +60,8 @@ + CODEPAGEDIR = $(BASEDIR)/codepages + + # The current codepage definition list. +-CODEPAGELIST= 437 737 775 850 852 861 932 866 949 950 936 1251 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R ++CODEPAGELIST= 437 737 775 850 852 x857 861 x862 932 866 936 949 950 1125 1251 \ ++ ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-13 ISO8859-15 KOI8-R KOI8-U + + # where you are going to have the smbrun binary. This defaults to the + # install directory. This binary is needed for correct printing +diff -urN samba-2.0.10/source/codepages/codepage_def.1125 samba-2.2.9/source/codepages/codepage_def.1125 +--- samba-2.0.10/source/codepages/codepage_def.1125 1970-01-01 01:00:00.000000000 +0100 ++++ samba-2.2.9/source/codepages/codepage_def.1125 2004-05-08 03:07:19.000000000 +0200 +@@ -0,0 +1,168 @@ ++# ++# 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. ++# ++ ++# Codepage definition file for Code Page 1125 - OS/2 Ukrainian Cyrillic ++# defines lower->upper mapping. ++# Written by Oleg Deribas ( older@iname.com ) ++ ++# The columns are : ++# lower upper map to lower map to upper ++# ++ 97 65 True True ++ 98 66 True True ++ 99 67 True True ++ 100 68 True True ++ 101 69 True True ++ 102 70 True True ++ 103 71 True True ++ 104 72 True True ++ 105 73 True True ++ 106 74 True True ++ 107 75 True True ++ 108 76 True True ++ 109 77 True True ++ 110 78 True True ++ 111 79 True True ++ 112 80 True True ++ 113 81 True True ++ 114 82 True True ++ 115 83 True True ++ 116 84 True True ++ 117 85 True True ++ 118 86 True True ++ 119 87 True True ++ 120 88 True True ++ 121 89 True True ++ 122 90 True True ++ 160 128 True True ++ 161 129 True True ++ 162 130 True True ++ 163 131 True True ++ 164 132 True True ++ 165 133 True True ++ 166 134 True True ++ 167 135 True True ++ 168 136 True True ++ 169 137 True True ++ 170 138 True True ++ 171 139 True True ++ 172 140 True True ++ 173 141 True True ++ 174 142 True True ++ 175 143 True True ++ 224 144 True True ++ 225 145 True True ++ 226 146 True True ++ 227 147 True True ++ 228 148 True True ++ 229 149 True True ++ 230 150 True True ++ 231 151 True True ++ 232 152 True True ++ 233 153 True True ++ 234 154 True True ++ 235 155 True True ++ 236 156 True True ++ 237 157 True True ++ 238 158 True True ++ 239 159 True True ++ 241 240 True True ++ 243 242 True True ++ 245 244 True True ++ 247 246 True True ++ 33 0 False False ++ 35 0 False False ++ 36 0 False False ++ 37 0 False False ++ 38 0 False False ++ 39 0 False False ++ 40 0 False False ++ 41 0 False False ++ 45 0 False False ++ 48 0 False False ++ 49 0 False False ++ 50 0 False False ++ 51 0 False False ++ 52 0 False False ++ 53 0 False False ++ 54 0 False False ++ 55 0 False False ++ 56 0 False False ++ 57 0 False False ++ 64 0 False False ++ 94 0 False False ++ 95 0 False False ++ 96 0 False False ++ 123 0 False False ++ 125 0 False False ++ 126 0 False False ++ 127 0 False False ++ 176 0 False False ++ 177 0 False False ++ 178 0 False False ++ 179 0 False False ++ 180 0 False False ++ 181 0 False False ++ 182 0 False False ++ 183 0 False False ++ 184 0 False False ++ 185 0 False False ++ 186 0 False False ++ 187 0 False False ++ 188 0 False False ++ 189 0 False False ++ 190 0 False False ++ 191 0 False False ++ 192 0 False False ++ 193 0 False False ++ 194 0 False False ++ 195 0 False False ++ 196 0 False False ++ 197 0 False False ++ 198 0 False False ++ 199 0 False False ++ 200 0 False False ++ 201 0 False False ++ 202 0 False False ++ 203 0 False False ++ 204 0 False False ++ 205 0 False False ++ 206 0 False False ++ 207 0 False False ++ 208 0 False False ++ 209 0 False False ++ 210 0 False False ++ 211 0 False False ++ 212 0 False False ++ 213 0 False False ++ 214 0 False False ++ 215 0 False False ++ 216 0 False False ++ 217 0 False False ++ 218 0 False False ++ 219 0 False False ++ 220 0 False False ++ 221 0 False False ++ 222 0 False False ++ 223 0 False False ++ 248 0 False False ++ 249 0 False False ++ 250 0 False False ++ 251 0 False False ++ 252 0 False False ++ 253 0 False False ++ 254 0 False False ++ 255 0 False False +diff -urN samba-2.0.10/source/codepages/codepage_def.857 samba-2.2.9/source/codepages/codepage_def.857 +--- samba-2.0.10/source/codepages/codepage_def.857 1970-01-01 01:00:00.000000000 +0100 ++++ samba-2.2.9/source/codepages/codepage_def.857 2004-05-08 03:07:20.000000000 +0200 +@@ -0,0 +1,55 @@ ++# ++# 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. ++# ++ ++# Codepage definition file for IBM Code Page 857 - MS-DOS Latin 5 ++# defines lower->upper mapping. ++# Written by Deniz Akkus (akkus@alum.mit.edu) ++ ++# The columns are : ++# lower upper map upper to lower map lower to upper ++# ++ 0x85 0xB7 True True #A WITH GRAVE ++ 0xA0 0xB5 True True #A WITH ACUTE ++ 0x83 0xB6 True True #A WITH CIRCUMFLEX ++ 0xC6 0xC7 True True #A WITH TILDE ++ 0x84 0x8E True True #A WITH DIAERESIS ++ 0x86 0x8F True True #A WITH RING ABOVE ++ 0x91 0x92 True True #LIGATURE AE ++ 0x87 0x80 True True #C WITH CEDILLA ++ 0x8A 0xD4 True True #E WITH GRAVE ++ 0x82 0x90 True True #E WITH ACUTE ++ 0x88 0xD2 True True #E WITH CIRCUMFLEX ++ 0x89 0xD3 True True #E WITH DIAERESIS ++ 0x8D 0x49 True True #DOTLESS I ++ 0xA1 0xD6 True True #I WITH ACUTE ++ 0x8C 0xD7 True True #I WITH CIRCUMFLEX ++ 0x8B 0xD8 True True #I WITH DIAERESIS ++ 0xA4 0xA5 True True #N WITH TILDE ++ 0x95 0xE3 True True #O WITH GRAVE ++ 0xA2 0xE0 True True #O WITH ACUTE ++ 0x93 0xE2 True True #O WITH CIRCUMFLEX ++ 0xE4 0xE5 True True #O WITH TILDE ++ 0x94 0x99 True True #O WITH DIAERESIS ++ 0x9B 0x9D True True #O WITH STROKE ++ 0x97 0xEB True True #U WITH GRAVE ++ 0xA3 0xE9 True True #U WITH ACUTE ++ 0x96 0xEA True True #U WITH CIRCUMFLEX ++ 0x81 0x9A True True #U WITH DIAERESIS ++ 0xEC 0xDE True True #I WITH GRAVE ++ 0x69 0x98 True True #I WITH DOT ABOVE ++ 0xA7 0xA6 True True #G WITH BREVE ++ 0x9f 0x9e True True #S with cedilla ++ +diff -urN samba-2.0.10/source/codepages/codepage_def.862 samba-2.2.9/source/codepages/codepage_def.862 +--- samba-2.0.10/source/codepages/codepage_def.862 1970-01-01 01:00:00.000000000 +0100 ++++ samba-2.2.9/source/codepages/codepage_def.862 2004-05-08 03:07:19.000000000 +0200 +@@ -0,0 +1,52 @@ ++# ++# 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. ++# ++ ++# Codepage definition file for Code Page 862 - Hebrew ++# defines lower->upper mapping. ++# Written by Alexander Bokovoy (ab@alt-linux.org) ++ ++# The columns are : ++# lower upper map to lower map to upper ++# ++0x74 0x54 True True ++0x63 0x43 True True ++0x75 0x55 True True ++0x64 0x44 True True ++0x76 0x56 True True ++0x65 0x45 True True ++0x77 0x57 True True ++0x66 0x46 True True ++0x78 0x58 True True ++0x67 0x47 True True ++0x79 0x59 True True ++0x68 0x48 True True ++0x69 0x49 True True ++0x7a 0x5a True True ++0x6a 0x4a True True ++0x6b 0x4b True True ++0x6c 0x4c True True ++0x6d 0x4d True True ++0x6e 0x4e True True ++0x6f 0x4f True True ++0xa4 0xa5 True True ++0xe5 0xe4 True True ++0xed 0xe8 True True ++0x70 0x50 True True ++0x71 0x51 True True ++0x61 0x41 True True ++0x72 0x52 True True ++0x62 0x42 True True ++0x73 0x53 True True +diff -urN samba-2.0.10/source/codepages/CPISO8859-13.TXT samba-2.2.9/source/codepages/CPISO8859-13.TXT +--- samba-2.0.10/source/codepages/CPISO8859-13.TXT 1970-01-01 01:00:00.000000000 +0100 ++++ samba-2.2.9/source/codepages/CPISO8859-13.TXT 2004-05-08 03:07:20.000000000 +0200 +@@ -0,0 +1,229 @@ ++# ++# Name: ISO 8859-13 to Unicode ++# Unicode version: 1.1 ++# Table version: 0.2 ++# Table format: Format A ++# Date: 19 February 2001 ++# Authors: Toomas Soome ++# ++# Copyright (c) 1991-1995 Unicode, Inc. All Rights reserved. ++# ++# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). ++# No claims are made as to fitness for any particular purpose. No ++# warranties of any kind are expressed or implied. The recipient ++# agrees to determine applicability of information provided. If this ++# file has been provided on magnetic media by Unicode, Inc., the sole ++# remedy for any claim will be exchange of defective media within 90 ++# days of receipt. ++# ++# Recipient is granted the right to make copies in any form for ++# internal distribution and to freely use the information supplied ++# in the creation of products supporting Unicode. Unicode, Inc. ++# specifically excludes the right to re-distribute this file directly ++# to third parties or other organizations whether for profit or not. ++# ++# General notes: ++# ++# This table contains the data the Unicode Consortium has on how ++# ISO 8859-13 characters map into Unicode. ++# ++# Format: Three tab-separated columns ++# Column #1 is the ISO 8859-13 code (in hex as 0xXX) ++# Column #2 is the Unicode (in hex as 0xXXXX) ++# Column #3 the Unicode name (follows a comment sign, '#') ++# ++# The entries are in ISO 8859-13 order ++# ++# Any comments or problems, contact ++# ++0x20 0x0020 # SPACE ++0x21 0x0021 # EXCLAMATION MARK ++0x22 0x0022 # QUOTATION MARK ++0x23 0x0023 # NUMBER SIGN ++0x24 0x0024 # DOLLAR SIGN ++0x25 0x0025 # PERCENT SIGN ++0x26 0x0026 # AMPERSAND ++0x27 0x0027 # APOSTROPHE ++0x28 0x0028 # LEFT PARENTHESIS ++0x29 0x0029 # RIGHT PARENTHESIS ++0x2A 0x002A # ASTERISK ++0x2B 0x002B # PLUS SIGN ++0x2C 0x002C # COMMA ++0x2D 0x002D # HYPHEN-MINUS ++0x2E 0x002E # FULL STOP ++0x2F 0x002F # SOLIDUS ++0x30 0x0030 # DIGIT ZERO ++0x31 0x0031 # DIGIT ONE ++0x32 0x0032 # DIGIT TWO ++0x33 0x0033 # DIGIT THREE ++0x34 0x0034 # DIGIT FOUR ++0x35 0x0035 # DIGIT FIVE ++0x36 0x0036 # DIGIT SIX ++0x37 0x0037 # DIGIT SEVEN ++0x38 0x0038 # DIGIT EIGHT ++0x39 0x0039 # DIGIT NINE ++0x3A 0x003A # COLON ++0x3B 0x003B # SEMICOLON ++0x3C 0x003C # LESS-THAN SIGN ++0x3D 0x003D # EQUALS SIGN ++0x3E 0x003E # GREATER-THAN SIGN ++0x3F 0x003F # QUESTION MARK ++0x40 0x0040 # COMMERCIAL AT ++0x41 0x0041 # LATIN CAPITAL LETTER A ++0x42 0x0042 # LATIN CAPITAL LETTER B ++0x43 0x0043 # LATIN CAPITAL LETTER C ++0x44 0x0044 # LATIN CAPITAL LETTER D ++0x45 0x0045 # LATIN CAPITAL LETTER E ++0x46 0x0046 # LATIN CAPITAL LETTER F ++0x47 0x0047 # LATIN CAPITAL LETTER G ++0x48 0x0048 # LATIN CAPITAL LETTER H ++0x49 0x0049 # LATIN CAPITAL LETTER I ++0x4A 0x004A # LATIN CAPITAL LETTER J ++0x4B 0x004B # LATIN CAPITAL LETTER K ++0x4C 0x004C # LATIN CAPITAL LETTER L ++0x4D 0x004D # LATIN CAPITAL LETTER M ++0x4E 0x004E # LATIN CAPITAL LETTER N ++0x4F 0x004F # LATIN CAPITAL LETTER O ++0x50 0x0050 # LATIN CAPITAL LETTER P ++0x51 0x0051 # LATIN CAPITAL LETTER Q ++0x52 0x0052 # LATIN CAPITAL LETTER R ++0x53 0x0053 # LATIN CAPITAL LETTER S ++0x54 0x0054 # LATIN CAPITAL LETTER T ++0x55 0x0055 # LATIN CAPITAL LETTER U ++0x56 0x0056 # LATIN CAPITAL LETTER V ++0x57 0x0057 # LATIN CAPITAL LETTER W ++0x58 0x0058 # LATIN CAPITAL LETTER X ++0x59 0x0059 # LATIN CAPITAL LETTER Y ++0x5A 0x005A # LATIN CAPITAL LETTER Z ++0x5B 0x005B # LEFT SQUARE BRACKET ++0x5C 0x005C # REVERSE SOLIDUS ++0x5D 0x005D # RIGHT SQUARE BRACKET ++0x5E 0x005E # CIRCUMFLEX ACCENT ++0x5F 0x005F # LOW LINE ++0x60 0x0060 # GRAVE ACCENT ++0x61 0x0061 # LATIN SMALL LETTER A ++0x62 0x0062 # LATIN SMALL LETTER B ++0x63 0x0063 # LATIN SMALL LETTER C ++0x64 0x0064 # LATIN SMALL LETTER D ++0x65 0x0065 # LATIN SMALL LETTER E ++0x66 0x0066 # LATIN SMALL LETTER F ++0x67 0x0067 # LATIN SMALL LETTER G ++0x68 0x0068 # LATIN SMALL LETTER H ++0x69 0x0069 # LATIN SMALL LETTER I ++0x6A 0x006A # LATIN SMALL LETTER J ++0x6B 0x006B # LATIN SMALL LETTER K ++0x6C 0x006C # LATIN SMALL LETTER L ++0x6D 0x006D # LATIN SMALL LETTER M ++0x6E 0x006E # LATIN SMALL LETTER N ++0x6F 0x006F # LATIN SMALL LETTER O ++0x70 0x0070 # LATIN SMALL LETTER P ++0x71 0x0071 # LATIN SMALL LETTER Q ++0x72 0x0072 # LATIN SMALL LETTER R ++0x73 0x0073 # LATIN SMALL LETTER S ++0x74 0x0074 # LATIN SMALL LETTER T ++0x75 0x0075 # LATIN SMALL LETTER U ++0x76 0x0076 # LATIN SMALL LETTER V ++0x77 0x0077 # LATIN SMALL LETTER W ++0x78 0x0078 # LATIN SMALL LETTER X ++0x79 0x0079 # LATIN SMALL LETTER Y ++0x7A 0x007A # LATIN SMALL LETTER Z ++0x7B 0x007B # LEFT CURLY BRACKET ++0x7C 0x007C # VERTICAL LINE ++0x7D 0x007D # RIGHT CURLY BRACKET ++0x7E 0x007E # TILDE ++0xA0 0x00A0 # NO-BREAK SPACE ++0xA1 0x201D # RIGHT DOUBLE QUOTATION MARK ++0xA2 0x00A2 # CENT SIGN ++0xA3 0x00A3 # POUND SIGN ++0xA4 0x00A4 # CURRENCY SIGN ++0xA5 0x201E # DOUBLE LOW-9 QUOTATION MARK ++0xA6 0x00A6 # BROKEN BAR ++0xA7 0x00A7 # SECTION SIGN ++0xA8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE ++0xA9 0x00A9 # COPYRIGHT SIGN ++0xAA 0x0156 # LATIN CAPITAL LETTER R WITH CEDILLA ++0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xAC 0x00AC # NOT SIGN ++0xAD 0x00AD # SOFT HYPHEN ++0xAE 0x00AE # REGISTERED SIGN ++0xAF 0x00C6 # LATIN CAPITAL LETTER AE ++0xB0 0x00B0 # DEGREE SIGN ++0xB1 0x00B1 # PLUS-MINUS SIGN ++0xB2 0x00B2 # SUPERSCRIPT TWO ++0xB3 0x00B3 # SUPERSCRIPT THREE ++0xB4 0x201C # LEFT DOUBLE QUOTATION MARK ++0xB5 0x00B5 # MICRO SIGN ++0xB6 0x00B6 # PILCROW SIGN ++0xB7 0x00B7 # MIDDLE DOT ++0xB8 0x00F8 # LATIN SMALL LETTER O WITH STROKE ++0xB9 0x00B9 # SUPERSCRIPT ONE ++0xBA 0x0157 # LATIN SMALL LETTER R WITH CEDILLA ++0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xBC 0x00BC # VULGAR FRACTION ONE QUARTER ++0xBD 0x00BD # VULGAR FRACTION ONE HALF ++0xBE 0x00BE # VULGAR FRACTION THREE QUARTERS ++0xBF 0x00E6 # LATIN SMALL LETTER AE ++0xC0 0x0104 # LATIN CAPITAL LETTER A WITH OGONEK ++0xC1 0x012E # LATIN CAPITAL LETTER I WITH OGONEK ++0xC2 0x0100 # LATIN CAPITAL LETTER A WITH MACRON ++0xC3 0x0106 # LATIN CAPITAL LETTER C WITH ACUTE ++0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS ++0xC5 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE ++0xC6 0x0118 # LATIN CAPITAL LETTER E WITH OGONEK ++0xC7 0x0112 # LATIN CAPITAL LETTER E WITH MACRON ++0xC8 0x010C # LATIN CAPITAL LETTER C WITH CARON ++0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE ++0xCA 0x0179 # LATIN CAPITAL LETTER Z WITH ACUTE ++0xCB 0x0116 # LATIN CAPITAL LETTER E WITH DOT ABOVE ++0xCC 0x0122 # LATIN CAPITAL LETTER G WITH CEDILLA ++0xCD 0x0136 # LATIN CAPITAL LETTER K WITH CEDILLA ++0xCE 0x012A # LATIN CAPITAL LETTER I WITH MACRON ++0xCF 0x013B # LATIN CAPITAL LETTER L WITH CEDILLA ++0xD0 0x0160 # LATIN CAPITAL LETTER S WITH CARON ++0xD1 0x0143 # LATIN CAPITAL LETTER N WITH ACUTE ++0xD2 0x0145 # LATIN CAPITAL LETTER N WITH CEDILLA ++0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE ++0xD4 0x014C # LATIN CAPITAL LETTER O WITH MACRON ++0xD5 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE ++0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS ++0xD7 0x00D7 # MULTIPLICATION SIGN ++0xD8 0x0172 # LATIN CAPITAL LETTER U WITH OGONEK ++0xD9 0x0141 # LATIN CAPITAL LETTER L WITH STROKE ++0xDA 0x015A # LATIN CAPITAL LETTER S WITH ACUTE ++0xDB 0x016A # LATIN CAPITAL LETTER U WITH MACRON ++0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS ++0xDD 0x017B # LATIN CAPITAL LETTER Z WITH DOT ABOVE ++0xDE 0x017D # LATIN CAPITAL LETTER Z WITH CARON ++0xDF 0x00DF # LATIN SMALL LETTER SHARP S ++0xE0 0x0105 # LATIN SMALL LETTER A WITH OGONEK ++0xE1 0x012F # LATIN SMALL LETTER I WITH OGONEK ++0xE2 0x0101 # LATIN SMALL LETTER A WITH MACRON ++0xE3 0x0107 # LATIN SMALL LETTER C WITH ACUTE ++0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS ++0xE5 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE ++0xE6 0x0119 # LATIN SMALL LETTER E WITH OGONEK ++0xE7 0x0113 # LATIN SMALL LETTER E WITH MACRON ++0xE8 0x010D # LATIN SMALL LETTER C WITH CARON ++0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE ++0xEA 0x017A # LATIN SMALL LETTER Z WITH ACUTE ++0xEB 0x0117 # LATIN SMALL LETTER E WITH DOT ABOVE ++0xEC 0x0123 # LATIN SMALL LETTER G WITH CEDILLA ++0xED 0x0137 # LATIN SMALL LETTER K WITH CEDILLA ++0xEE 0x012B # LATIN SMALL LETTER I WITH MACRON ++0xEF 0x013C # LATIN SMALL LETTER L WITH CEDILLA ++0xF0 0x0161 # LATIN SMALL LETTER S WITH CARON ++0xF1 0x0144 # LATIN SMALL LETTER N WITH ACUTE ++0xF2 0x0146 # LATIN SMALL LETTER N WITH CEDILLA ++0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE ++0xF4 0x014D # LATIN SMALL LETTER O WITH MACRON ++0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE ++0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS ++0xF7 0x00F7 # DIVISION SIGN ++0xF8 0x0173 # LATIN SMALL LETTER U WITH OGONEK ++0xF9 0x0142 # LATIN SMALL LETTER L WITH STROKE ++0xFA 0x015B # LATIN SMALL LETTER S WITH ACUTE ++0xFB 0x016B # LATIN SMALL LETTER U WITH MACRON ++0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS ++0xFD 0x017C # LATIN SMALL LETTER Z WITH DOT ABOVE ++0xFE 0x017E # LATIN SMALL LETTER Z WITH CARON ++0xFF 0x2019 # RIGHT SINGLE QUOTATION MARK +diff -urN samba-2.0.10/source/codepages/CPISO8859-15.TXT samba-2.2.9/source/codepages/CPISO8859-15.TXT +--- samba-2.0.10/source/codepages/CPISO8859-15.TXT 1970-01-01 01:00:00.000000000 +0100 ++++ samba-2.2.9/source/codepages/CPISO8859-15.TXT 2004-05-08 03:07:20.000000000 +0200 +@@ -0,0 +1,229 @@ ++# ++# Name: ISO 8859-15 to Unicode ++# Unicode version: 1.1 ++# Table version: 0.2 ++# Table format: Format A ++# Date: 01 may 2001 ++# Authors: Toomas Soome ++# ++# Copyright (c) 1991-1995 Unicode, Inc. All Rights reserved. ++# ++# This file is provided as-is by Unicode, Inc. (The Unicode Consortium). ++# No claims are made as to fitness for any particular purpose. No ++# warranties of any kind are expressed or implied. The recipient ++# agrees to determine applicability of information provided. If this ++# file has been provided on magnetic media by Unicode, Inc., the sole ++# remedy for any claim will be exchange of defective media within 90 ++# days of receipt. ++# ++# Recipient is granted the right to make copies in any form for ++# internal distribution and to freely use the information supplied ++# in the creation of products supporting Unicode. Unicode, Inc. ++# specifically excludes the right to re-distribute this file directly ++# to third parties or other organizations whether for profit or not. ++# ++# General notes: ++# ++# This table contains the data the Unicode Consortium has on how ++# ISO 8859-15 characters map into Unicode. ++# ++# Format: Three tab-separated columns ++# Column #1 is the ISO 8859-15 code (in hex as 0xXX) ++# Column #2 is the Unicode (in hex as 0xXXXX) ++# Column #3 the Unicode name (follows a comment sign, '#') ++# ++# The entries are in ISO 8859-15 order ++# ++# Any comments or problems, contact ++# ++0x20 0x0020 # SPACE ++0x21 0x0021 # EXCLAMATION MARK ++0x22 0x0022 # QUOTATION MARK ++0x23 0x0023 # NUMBER SIGN ++0x24 0x0024 # DOLLAR SIGN ++0x25 0x0025 # PERCENT SIGN ++0x26 0x0026 # AMPERSAND ++0x27 0x0027 # APOSTROPHE ++0x28 0x0028 # LEFT PARENTHESIS ++0x29 0x0029 # RIGHT PARENTHESIS ++0x2A 0x002A # ASTERISK ++0x2B 0x002B # PLUS SIGN ++0x2C 0x002C # COMMA ++0x2D 0x002D # HYPHEN-MINUS ++0x2E 0x002E # FULL STOP ++0x2F 0x002F # SOLIDUS ++0x30 0x0030 # DIGIT ZERO ++0x31 0x0031 # DIGIT ONE ++0x32 0x0032 # DIGIT TWO ++0x33 0x0033 # DIGIT THREE ++0x34 0x0034 # DIGIT FOUR ++0x35 0x0035 # DIGIT FIVE ++0x36 0x0036 # DIGIT SIX ++0x37 0x0037 # DIGIT SEVEN ++0x38 0x0038 # DIGIT EIGHT ++0x39 0x0039 # DIGIT NINE ++0x3A 0x003A # COLON ++0x3B 0x003B # SEMICOLON ++0x3C 0x003C # LESS-THAN SIGN ++0x3D 0x003D # EQUALS SIGN ++0x3E 0x003E # GREATER-THAN SIGN ++0x3F 0x003F # QUESTION MARK ++0x40 0x0040 # COMMERCIAL AT ++0x41 0x0041 # LATIN CAPITAL LETTER A ++0x42 0x0042 # LATIN CAPITAL LETTER B ++0x43 0x0043 # LATIN CAPITAL LETTER C ++0x44 0x0044 # LATIN CAPITAL LETTER D ++0x45 0x0045 # LATIN CAPITAL LETTER E ++0x46 0x0046 # LATIN CAPITAL LETTER F ++0x47 0x0047 # LATIN CAPITAL LETTER G ++0x48 0x0048 # LATIN CAPITAL LETTER H ++0x49 0x0049 # LATIN CAPITAL LETTER I ++0x4A 0x004A # LATIN CAPITAL LETTER J ++0x4B 0x004B # LATIN CAPITAL LETTER K ++0x4C 0x004C # LATIN CAPITAL LETTER L ++0x4D 0x004D # LATIN CAPITAL LETTER M ++0x4E 0x004E # LATIN CAPITAL LETTER N ++0x4F 0x004F # LATIN CAPITAL LETTER O ++0x50 0x0050 # LATIN CAPITAL LETTER P ++0x51 0x0051 # LATIN CAPITAL LETTER Q ++0x52 0x0052 # LATIN CAPITAL LETTER R ++0x53 0x0053 # LATIN CAPITAL LETTER S ++0x54 0x0054 # LATIN CAPITAL LETTER T ++0x55 0x0055 # LATIN CAPITAL LETTER U ++0x56 0x0056 # LATIN CAPITAL LETTER V ++0x57 0x0057 # LATIN CAPITAL LETTER W ++0x58 0x0058 # LATIN CAPITAL LETTER X ++0x59 0x0059 # LATIN CAPITAL LETTER Y ++0x5A 0x005A # LATIN CAPITAL LETTER Z ++0x5B 0x005B # LEFT SQUARE BRACKET ++0x5C 0x005C # REVERSE SOLIDUS ++0x5D 0x005D # RIGHT SQUARE BRACKET ++0x5E 0x005E # CIRCUMFLEX ACCENT ++0x5F 0x005F # LOW LINE ++0x60 0x0060 # GRAVE ACCENT ++0x61 0x0061 # LATIN SMALL LETTER A ++0x62 0x0062 # LATIN SMALL LETTER B ++0x63 0x0063 # LATIN SMALL LETTER C ++0x64 0x0064 # LATIN SMALL LETTER D ++0x65 0x0065 # LATIN SMALL LETTER E ++0x66 0x0066 # LATIN SMALL LETTER F ++0x67 0x0067 # LATIN SMALL LETTER G ++0x68 0x0068 # LATIN SMALL LETTER H ++0x69 0x0069 # LATIN SMALL LETTER I ++0x6A 0x006A # LATIN SMALL LETTER J ++0x6B 0x006B # LATIN SMALL LETTER K ++0x6C 0x006C # LATIN SMALL LETTER L ++0x6D 0x006D # LATIN SMALL LETTER M ++0x6E 0x006E # LATIN SMALL LETTER N ++0x6F 0x006F # LATIN SMALL LETTER O ++0x70 0x0070 # LATIN SMALL LETTER P ++0x71 0x0071 # LATIN SMALL LETTER Q ++0x72 0x0072 # LATIN SMALL LETTER R ++0x73 0x0073 # LATIN SMALL LETTER S ++0x74 0x0074 # LATIN SMALL LETTER T ++0x75 0x0075 # LATIN SMALL LETTER U ++0x76 0x0076 # LATIN SMALL LETTER V ++0x77 0x0077 # LATIN SMALL LETTER W ++0x78 0x0078 # LATIN SMALL LETTER X ++0x79 0x0079 # LATIN SMALL LETTER Y ++0x7A 0x007A # LATIN SMALL LETTER Z ++0x7B 0x007B # LEFT CURLY BRACKET ++0x7C 0x007C # VERTICAL LINE ++0x7D 0x007D # RIGHT CURLY BRACKET ++0x7E 0x007E # TILDE ++0xA0 0x00A0 # NO-BREAK SPACE ++0xA1 0x00A1 # INVERTED EXCLAMATION MARK ++0xA2 0x00A2 # CENT SIGN ++0xA3 0x00A3 # POUND SIGN ++0xA4 0x20AC # EURO SIGN ++0xA5 0x00A5 # YEN SIGN ++0xA6 0x0160 # LATIN CAPITAL LETTER S WITH CARON ++0xA7 0x00A7 # SECTION SIGN ++0xA8 0x0161 # LATIN SMALL LETTER S WITH CARON ++0xA9 0x00A9 # COPYRIGHT SIGN ++0xAA 0x00AA # FEMININE ORDINAL INDICATOR ++0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xAC 0x00AC # NOT SIGN ++0xAD 0x00AD # SOFT HYPHEN ++0xAE 0x00AE # REGISTERED SIGN ++0xAF 0x00AF # MACRON ++0xB0 0x00B0 # DEGREE SIGN ++0xB1 0x00B1 # PLUS-MINUS SIGN ++0xB2 0x00B2 # SUPERSCRIPT TWO ++0xB3 0x00B3 # SUPERSCRIPT THREE ++0xB4 0x017D # LATIN CAPITAL LETTER Z WITH CARON ++0xB5 0x00B5 # MICRO SIGN ++0xB6 0x00B6 # PILCROW SIGN ++0xB7 0x00B7 # MIDDLE DOT ++0xB8 0x017E # LATIN SMALL LETTER Z WITH CARON ++0xB9 0x00B9 # SUPERSCRIPT ONE ++0xBA 0x00BA # MASCULINE ORDINAL INDICATOR ++0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xBC 0x0152 # LATIN CAPITAL LIGATURE OE ++0xBD 0x0153 # LATIN SMALL LIGATURE OE ++0xBE 0x0178 # LATIN CAPITAL LETTER Y WITH DIAERESIS ++0xBF 0x00BF # INVERTED QUESTION MARK ++0xC0 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE ++0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE ++0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX ++0xC3 0x00C3 # LATIN CAPITAL LETTER A WITH TILDE ++0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS ++0xC5 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE ++0xC6 0x00C6 # LATIN CAPITAL LETTER AE ++0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA ++0xC8 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE ++0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE ++0xCA 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX ++0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS ++0xCC 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE ++0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE ++0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX ++0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS ++0xD0 0x00D0 # LATIN CAPITAL LETTER ETH (Icelandic) ++0xD1 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE ++0xD2 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE ++0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE ++0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX ++0xD5 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE ++0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS ++0xD7 0x00D7 # MULTIPLICATION SIGN ++0xD8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE ++0xD9 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE ++0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE ++0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX ++0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS ++0xDD 0x00DD # LATIN CAPITAL LETTER Y WITH ACUTE ++0xDE 0x00DE # LATIN CAPITAL LETTER THORN (Icelandic) ++0xDF 0x00DF # LATIN SMALL LETTER SHARP S (German) ++0xE0 0x00E0 # LATIN SMALL LETTER A WITH GRAVE ++0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE ++0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX ++0xE3 0x00E3 # LATIN SMALL LETTER A WITH TILDE ++0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS ++0xE5 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE ++0xE6 0x00E6 # LATIN SMALL LETTER AE ++0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA ++0xE8 0x00E8 # LATIN SMALL LETTER E WITH GRAVE ++0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE ++0xEA 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX ++0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS ++0xEC 0x00EC # LATIN SMALL LETTER I WITH GRAVE ++0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE ++0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX ++0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS ++0xF0 0x00F0 # LATIN SMALL LETTER ETH (Icelandic) ++0xF1 0x00F1 # LATIN SMALL LETTER N WITH TILDE ++0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE ++0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE ++0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX ++0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE ++0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS ++0xF7 0x00F7 # DIVISION SIGN ++0xF8 0x00F8 # LATIN SMALL LETTER O WITH STROKE ++0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE ++0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE ++0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX ++0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS ++0xFD 0x00FD # LATIN SMALL LETTER Y WITH ACUTE ++0xFE 0x00FE # LATIN SMALL LETTER THORN (Icelandic) ++0xFF 0x00FF # LATIN SMALL LETTER Y WITH DIAERESIS +diff -urN samba-2.0.10/source/codepages/CPISO8859-8.TXT samba-2.2.9/source/codepages/CPISO8859-8.TXT +--- samba-2.0.10/source/codepages/CPISO8859-8.TXT 1970-01-01 01:00:00.000000000 +0100 ++++ samba-2.2.9/source/codepages/CPISO8859-8.TXT 2004-05-08 03:07:19.000000000 +0200 +@@ -0,0 +1,240 @@ ++# ++# Name: ISO 8859-8 to Unicode ++# Unicode version: 1.1 ++# Table version: 0.1 ++# Table format: Format A ++# Date: 15 February 2002 ++# Authors: Alexander Bokovoy ++# ++# General notes: ++# ++# This table contains the data the Unicode Consortium has on how ++# ISO 8859-8 (Hewbrew) characters map into Unicode. ++# ++# Format: Three tab-separated columns ++# Column #1 is the ISO 8859-8 code (in hex as 0xXX) ++# Column #2 is the Unicode (in hex as 0xXXXX) ++# Column #3 the Unicode name (follows a comment sign, '#') ++# ++# The entries are in ISO 8859-8 order ++# ++0x00 0x0000 # NULL (NUL) ++0x01 0x0001 # START OF HEADING (SOH) ++0x02 0x0002 # START OF TEXT (STX) ++0x03 0x0003 # END OF TEXT (ETX) ++0x04 0x0004 # END OF TRANSMISSION (EOT) ++0x05 0x0005 # ENQUIRY (ENQ) ++0x06 0x0006 # ACKNOWLEDGE (ACK) ++0x07 0x0007 # BELL (BEL) ++0x08 0x0008 # BACKSPACE (BS) ++0x09 0x0009 # CHARACTER TABULATION (HT) ++0x0a 0x000A # LINE FEED (LF) ++0x0b 0x000B # LINE TABULATION (VT) ++0x0c 0x000C # FORM FEED (FF) ++0x0d 0x000D # CARRIAGE RETURN (CR) ++0x0e 0x000E # SHIFT OUT (SO) ++0x0f 0x000F # SHIFT IN (SI) ++0x10 0x0010 # DATALINK ESCAPE (DLE) ++0x11 0x0011 # DEVICE CONTROL ONE (DC1) ++0x12 0x0012 # DEVICE CONTROL TWO (DC2) ++0x13 0x0013 # DEVICE CONTROL THREE (DC3) ++0x14 0x0014 # DEVICE CONTROL FOUR (DC4) ++0x15 0x0015 # NEGATIVE ACKNOWLEDGE (NAK) ++0x16 0x0016 # SYNCHRONOUS IDLE (SYN) ++0x17 0x0017 # END OF TRANSMISSION BLOCK (ETB) ++0x18 0x0018 # CANCEL (CAN) ++0x19 0x0019 # END OF MEDIUM (EM) ++0x1a 0x001A # SUBSTITUTE (SUB) ++0x1b 0x001B # ESCAPE (ESC) ++0x1c 0x001C # FILE SEPARATOR (IS4) ++0x1d 0x001D # GROUP SEPARATOR (IS3) ++0x1e 0x001E # RECORD SEPARATOR (IS2) ++0x1f 0x001F # UNIT SEPARATOR (IS1) ++0x20 0x0020 # SPACE ++0x21 0x0021 # EXCLAMATION MARK ++0x22 0x0022 # QUOTATION MARK ++0x23 0x0023 # NUMBER SIGN ++0x24 0x0024 # DOLLAR SIGN ++0x25 0x0025 # PERCENT SIGN ++0x26 0x0026 # AMPERSAND ++0x27 0x0027 # APOSTROPHE ++0x28 0x0028 # LEFT PARENTHESIS ++0x29 0x0029 # RIGHT PARENTHESIS ++0x2a 0x002A # ASTERISK ++0x2b 0x002B # PLUS SIGN ++0x2c 0x002C # COMMA ++0x2d 0x002D # HYPHEN-MINUS ++0x2e 0x002E # FULL STOP ++0x2f 0x002F # SOLIDUS ++0x30 0x0030 # DIGIT ZERO ++0x31 0x0031 # DIGIT ONE ++0x32 0x0032 # DIGIT TWO ++0x33 0x0033 # DIGIT THREE ++0x34 0x0034 # DIGIT FOUR ++0x35 0x0035 # DIGIT FIVE ++0x36 0x0036 # DIGIT SIX ++0x37 0x0037 # DIGIT SEVEN ++0x38 0x0038 # DIGIT EIGHT ++0x39 0x0039 # DIGIT NINE ++0x3a 0x003A # COLON ++0x3b 0x003B # SEMICOLON ++0x3c 0x003C # LESS-THAN SIGN ++0x3d 0x003D # EQUALS SIGN ++0x3e 0x003E # GREATER-THAN SIGN ++0x3f 0x003F # QUESTION MARK ++0x40 0x0040 # COMMERCIAL AT ++0x41 0x0041 # LATIN CAPITAL LETTER A ++0x42 0x0042 # LATIN CAPITAL LETTER B ++0x43 0x0043 # LATIN CAPITAL LETTER C ++0x44 0x0044 # LATIN CAPITAL LETTER D ++0x45 0x0045 # LATIN CAPITAL LETTER E ++0x46 0x0046 # LATIN CAPITAL LETTER F ++0x47 0x0047 # LATIN CAPITAL LETTER G ++0x48 0x0048 # LATIN CAPITAL LETTER H ++0x49 0x0049 # LATIN CAPITAL LETTER I ++0x4a 0x004A # LATIN CAPITAL LETTER J ++0x4b 0x004B # LATIN CAPITAL LETTER K ++0x4c 0x004C # LATIN CAPITAL LETTER L ++0x4d 0x004D # LATIN CAPITAL LETTER M ++0x4e 0x004E # LATIN CAPITAL LETTER N ++0x4f 0x004F # LATIN CAPITAL LETTER O ++0x50 0x0050 # LATIN CAPITAL LETTER P ++0x51 0x0051 # LATIN CAPITAL LETTER Q ++0x52 0x0052 # LATIN CAPITAL LETTER R ++0x53 0x0053 # LATIN CAPITAL LETTER S ++0x54 0x0054 # LATIN CAPITAL LETTER T ++0x55 0x0055 # LATIN CAPITAL LETTER U ++0x56 0x0056 # LATIN CAPITAL LETTER V ++0x57 0x0057 # LATIN CAPITAL LETTER W ++0x58 0x0058 # LATIN CAPITAL LETTER X ++0x59 0x0059 # LATIN CAPITAL LETTER Y ++0x5a 0x005A # LATIN CAPITAL LETTER Z ++0x5b 0x005B # LEFT SQUARE BRACKET ++0x5c 0x005C # REVERSE SOLIDUS ++0x5d 0x005D # RIGHT SQUARE BRACKET ++0x5e 0x005E # CIRCUMFLEX ACCENT ++0x5f 0x005F # LOW LINE ++0x60 0x0060 # GRAVE ACCENT ++0x61 0x0061 # LATIN SMALL LETTER A ++0x62 0x0062 # LATIN SMALL LETTER B ++0x63 0x0063 # LATIN SMALL LETTER C ++0x64 0x0064 # LATIN SMALL LETTER D ++0x65 0x0065 # LATIN SMALL LETTER E ++0x66 0x0066 # LATIN SMALL LETTER F ++0x67 0x0067 # LATIN SMALL LETTER G ++0x68 0x0068 # LATIN SMALL LETTER H ++0x69 0x0069 # LATIN SMALL LETTER I ++0x6a 0x006A # LATIN SMALL LETTER J ++0x6b 0x006B # LATIN SMALL LETTER K ++0x6c 0x006C # LATIN SMALL LETTER L ++0x6d 0x006D # LATIN SMALL LETTER M ++0x6e 0x006E # LATIN SMALL LETTER N ++0x6f 0x006F # LATIN SMALL LETTER O ++0x70 0x0070 # LATIN SMALL LETTER P ++0x71 0x0071 # LATIN SMALL LETTER Q ++0x72 0x0072 # LATIN SMALL LETTER R ++0x73 0x0073 # LATIN SMALL LETTER S ++0x74 0x0074 # LATIN SMALL LETTER T ++0x75 0x0075 # LATIN SMALL LETTER U ++0x76 0x0076 # LATIN SMALL LETTER V ++0x77 0x0077 # LATIN SMALL LETTER W ++0x78 0x0078 # LATIN SMALL LETTER X ++0x79 0x0079 # LATIN SMALL LETTER Y ++0x7a 0x007A # LATIN SMALL LETTER Z ++0x7b 0x007B # LEFT CURLY BRACKET ++0x7c 0x007C # VERTICAL LINE ++0x7d 0x007D # RIGHT CURLY BRACKET ++0x7e 0x007E # TILDE ++0x7f 0x007F # DELETE (DEL) ++0x80 0x0080 # PADDING CHARACTER (PAD) ++0x81 0x0081 # HIGH OCTET PRESET (HOP) ++0x82 0x0082 # BREAK PERMITTED HERE (BPH) ++0x83 0x0083 # NO BREAK HERE (NBH) ++0x84 0x0084 # INDEX (IND) ++0x85 0x0085 # NEXT LINE (NEL) ++0x86 0x0086 # START OF SELECTED AREA (SSA) ++0x87 0x0087 # END OF SELECTED AREA (ESA) ++0x88 0x0088 # CHARACTER TABULATION SET (HTS) ++0x89 0x0089 # CHARACTER TABULATION WITH JUSTIFICATION (HTJ) ++0x8a 0x008A # LINE TABULATION SET (VTS) ++0x8b 0x008B # PARTIAL LINE FORWARD (PLD) ++0x8c 0x008C # PARTIAL LINE BACKWARD (PLU) ++0x8d 0x008D # REVERSE LINE FEED (RI) ++0x8e 0x008E # SINGLE-SHIFT TWO (SS2) ++0x8f 0x008F # SINGLE-SHIFT THREE (SS3) ++0x90 0x0090 # DEVICE CONTROL STRING (DCS) ++0x91 0x0091 # PRIVATE USE ONE (PU1) ++0x92 0x0092 # PRIVATE USE TWO (PU2) ++0x93 0x0093 # SET TRANSMIT STATE (STS) ++0x94 0x0094 # CANCEL CHARACTER (CCH) ++0x95 0x0095 # MESSAGE WAITING (MW) ++0x96 0x0096 # START OF GUARDED AREA (SPA) ++0x97 0x0097 # END OF GUARDED AREA (EPA) ++0x98 0x0098 # START OF STRING (SOS) ++0x99 0x0099 # SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI) ++0x9a 0x009A # SINGLE CHARACTER INTRODUCER (SCI) ++0x9b 0x009B # CONTROL SEQUENCE INTRODUCER (CSI) ++0x9c 0x009C # STRING TERMINATOR (ST) ++0x9d 0x009D # OPERATING SYSTEM COMMAND (OSC) ++0x9e 0x009E # PRIVACY MESSAGE (PM) ++0x9f 0x009F # APPLICATION PROGRAM COMMAND (APC) ++0xa0 0x00A0 # NO-BREAK SPACE ++0xa2 0x00A2 # CENT SIGN ++0xa3 0x00A3 # POUND SIGN ++0xa4 0x00A4 # CURRENCY SIGN ++0xa5 0x00A5 # YEN SIGN ++0xa6 0x00A6 # BROKEN BAR ++0xa7 0x00A7 # SECTION SIGN ++0xa8 0x00A8 # DIAERESIS ++0xa9 0x00A9 # COPYRIGHT SIGN ++0xaa 0x00D7 # MULTIPLICATION SIGN ++0xab 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xac 0x00AC # NOT SIGN ++0xad 0x00AD # SOFT HYPHEN ++0xae 0x00AE # REGISTERED SIGN ++0xaf 0x00AF # MACRON ++0xb0 0x00B0 # DEGREE SIGN ++0xb1 0x00B1 # PLUS-MINUS SIGN ++0xb2 0x00B2 # SUPERSCRIPT TWO ++0xb3 0x00B3 # SUPERSCRIPT THREE ++0xb4 0x00B4 # ACUTE ACCENT ++0xb5 0x00B5 # MICRO SIGN ++0xb6 0x00B6 # PILCROW SIGN ++0xb7 0x00B7 # MIDDLE DOT ++0xb8 0x00B8 # CEDILLA ++0xb9 0x00B9 # SUPERSCRIPT ONE ++0xba 0x00F7 # DIVISION SIGN ++0xbb 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xbc 0x00BC # VULGAR FRACTION ONE QUARTER ++0xbd 0x00BD # VULGAR FRACTION ONE HALF ++0xbe 0x00BE # VULGAR FRACTION THREE QUARTERS ++0xdf 0x2017 # DOUBLE LOW LINE ++0xe0 0x05D0 # HEBREW LETTER ALEF ++0xe1 0x05D1 # HEBREW LETTER BET ++0xe2 0x05D2 # HEBREW LETTER GIMEL ++0xe3 0x05D3 # HEBREW LETTER DALET ++0xe4 0x05D4 # HEBREW LETTER HE ++0xe5 0x05D5 # HEBREW LETTER VAV ++0xe6 0x05D6 # HEBREW LETTER ZAYIN ++0xe7 0x05D7 # HEBREW LETTER HET ++0xe8 0x05D8 # HEBREW LETTER TET ++0xe9 0x05D9 # HEBREW LETTER YOD ++0xea 0x05DA # HEBREW LETTER FINAL KAF ++0xeb 0x05DB # HEBREW LETTER KAF ++0xec 0x05DC # HEBREW LETTER LAMED ++0xed 0x05DD # HEBREW LETTER FINAL MEM ++0xee 0x05DE # HEBREW LETTER MEM ++0xef 0x05DF # HEBREW LETTER FINAL NUN ++0xf0 0x05E0 # HEBREW LETTER NUN ++0xf1 0x05E1 # HEBREW LETTER SAMEKH ++0xf2 0x05E2 # HEBREW LETTER AYIN ++0xf3 0x05E3 # HEBREW LETTER FINAL PE ++0xf4 0x05E4 # HEBREW LETTER PE ++0xf5 0x05E5 # HEBREW LETTER FINAL TSADI ++0xf6 0x05E6 # HEBREW LETTER TSADI ++0xf7 0x05E7 # HEBREW LETTER QOF ++0xf8 0x05E8 # HEBREW LETTER RESH ++0xf9 0x05E9 # HEBREW LETTER SHIN ++0xfa 0x05EA # HEBREW LETTER TAV ++0xfd 0x200E # LEFT-TO-RIGHT MARK ++0xfe 0x200F # RIGHT-TO-LEFT MARK +diff -urN samba-2.0.10/source/codepages/CPISO8859-9.TXT samba-2.2.9/source/codepages/CPISO8859-9.TXT +--- samba-2.0.10/source/codepages/CPISO8859-9.TXT 1970-01-01 01:00:00.000000000 +0100 ++++ samba-2.2.9/source/codepages/CPISO8859-9.TXT 2004-05-08 03:07:19.000000000 +0200 +@@ -0,0 +1,222 @@ ++# ++# Name: ISO 8859-9 to Unicode ++# Unicode version: 1.1 ++# Table version: 0.1 ++# Table format: Format A ++# Date: 7 January 2001 ++# Authors: Deniz Akkus ++# ++# General notes: ++# ++# This table contains data on how ++# ISO 8859-9 characters map into Unicode. ++# ++# Format: Three tab-separated columns ++# Column #1 is the ISO 8859-9 code (in hex as 0xXX) ++# Column #2 is the Unicode (in hex as 0xXXXX) ++# Column #3 the Unicode name (follows a comment sign, '#') ++# ++# The entries are in ISO 8859-9 order ++# ++# Any comments or problems, contact ++# ++0x20 0x0020 # SPACE ++0x21 0x0021 # EXCLAMATION MARK ++0x22 0x0022 # QUOTATION MARK ++0x23 0x0023 # NUMBER SIGN ++0x24 0x0024 # DOLLAR SIGN ++0x25 0x0025 # PERCENT SIGN ++0x26 0x0026 # AMPERSAND ++0x27 0x0027 # APOSTROPHE ++0x28 0x0028 # LEFT PARENTHESIS ++0x29 0x0029 # RIGHT PARENTHESIS ++0x2A 0x002A # ASTERISK ++0x2B 0x002B # PLUS SIGN ++0x2C 0x002C # COMMA ++0x2D 0x002D # HYPHEN-MINUS ++0x2E 0x002E # FULL STOP ++0x2F 0x002F # SOLIDUS ++0x30 0x0030 # DIGIT ZERO ++0x31 0x0031 # DIGIT ONE ++0x32 0x0032 # DIGIT TWO ++0x33 0x0033 # DIGIT THREE ++0x34 0x0034 # DIGIT FOUR ++0x35 0x0035 # DIGIT FIVE ++0x36 0x0036 # DIGIT SIX ++0x37 0x0037 # DIGIT SEVEN ++0x38 0x0038 # DIGIT EIGHT ++0x39 0x0039 # DIGIT NINE ++0x3A 0x003A # COLON ++0x3B 0x003B # SEMICOLON ++0x3C 0x003C # LESS-THAN SIGN ++0x3D 0x003D # EQUALS SIGN ++0x3E 0x003E # GREATER-THAN SIGN ++0x3F 0x003F # QUESTION MARK ++0x40 0x0040 # COMMERCIAL AT ++0x41 0x0041 # LATIN CAPITAL LETTER A ++0x42 0x0042 # LATIN CAPITAL LETTER B ++0x43 0x0043 # LATIN CAPITAL LETTER C ++0x44 0x0044 # LATIN CAPITAL LETTER D ++0x45 0x0045 # LATIN CAPITAL LETTER E ++0x46 0x0046 # LATIN CAPITAL LETTER F ++0x47 0x0047 # LATIN CAPITAL LETTER G ++0x48 0x0048 # LATIN CAPITAL LETTER H ++0x49 0x0049 # LATIN CAPITAL LETTER I ++0x4A 0x004A # LATIN CAPITAL LETTER J ++0x4B 0x004B # LATIN CAPITAL LETTER K ++0x4C 0x004C # LATIN CAPITAL LETTER L ++0x4D 0x004D # LATIN CAPITAL LETTER M ++0x4E 0x004E # LATIN CAPITAL LETTER N ++0x4F 0x004F # LATIN CAPITAL LETTER O ++0x50 0x0050 # LATIN CAPITAL LETTER P ++0x51 0x0051 # LATIN CAPITAL LETTER Q ++0x52 0x0052 # LATIN CAPITAL LETTER R ++0x53 0x0053 # LATIN CAPITAL LETTER S ++0x54 0x0054 # LATIN CAPITAL LETTER T ++0x55 0x0055 # LATIN CAPITAL LETTER U ++0x56 0x0056 # LATIN CAPITAL LETTER V ++0x57 0x0057 # LATIN CAPITAL LETTER W ++0x58 0x0058 # LATIN CAPITAL LETTER X ++0x59 0x0059 # LATIN CAPITAL LETTER Y ++0x5A 0x005A # LATIN CAPITAL LETTER Z ++0x5B 0x005B # LEFT SQUARE BRACKET ++0x5C 0x005C # REVERSE SOLIDUS ++0x5D 0x005D # RIGHT SQUARE BRACKET ++0x5E 0x005E # CIRCUMFLEX ACCENT ++0x5F 0x005F # LOW LINE ++0x60 0x0060 # GRAVE ACCENT ++0x61 0x0061 # LATIN SMALL LETTER A ++0x62 0x0062 # LATIN SMALL LETTER B ++0x63 0x0063 # LATIN SMALL LETTER C ++0x64 0x0064 # LATIN SMALL LETTER D ++0x65 0x0065 # LATIN SMALL LETTER E ++0x66 0x0066 # LATIN SMALL LETTER F ++0x67 0x0067 # LATIN SMALL LETTER G ++0x68 0x0068 # LATIN SMALL LETTER H ++0x69 0x0069 # LATIN SMALL LETTER I ++0x6A 0x006A # LATIN SMALL LETTER J ++0x6B 0x006B # LATIN SMALL LETTER K ++0x6C 0x006C # LATIN SMALL LETTER L ++0x6D 0x006D # LATIN SMALL LETTER M ++0x6E 0x006E # LATIN SMALL LETTER N ++0x6F 0x006F # LATIN SMALL LETTER O ++0x70 0x0070 # LATIN SMALL LETTER P ++0x71 0x0071 # LATIN SMALL LETTER Q ++0x72 0x0072 # LATIN SMALL LETTER R ++0x73 0x0073 # LATIN SMALL LETTER S ++0x74 0x0074 # LATIN SMALL LETTER T ++0x75 0x0075 # LATIN SMALL LETTER U ++0x76 0x0076 # LATIN SMALL LETTER V ++0x77 0x0077 # LATIN SMALL LETTER W ++0x78 0x0078 # LATIN SMALL LETTER X ++0x79 0x0079 # LATIN SMALL LETTER Y ++0x7A 0x007A # LATIN SMALL LETTER Z ++0x7B 0x007B # LEFT CURLY BRACKET ++0x7C 0x007C # VERTICAL LINE ++0x7D 0x007D # RIGHT CURLY BRACKET ++0x7E 0x007E # TILDE ++0xA0 0x00A0 # NO-BREAK SPACE ++0xA1 0x00A1 # INVERTED EXCLAMATION MARK ++0xA2 0x00A2 # CENT SIGN ++0xA3 0x00A3 # POUND SIGN ++0xA4 0x00A4 # CURRENCY SIGN ++0xA5 0x00A5 # YEN SIGN ++0xA6 0x00A6 # BROKEN BAR ++0xA7 0x00A7 # SECTION SIGN ++0xA8 0x00A8 # DIAERESIS ++0xA9 0x00A9 # COPYRIGHT SIGN ++0xAA 0x00AA # FEMININE ORDINAL INDICATOR ++0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xAC 0x00AC # NOT SIGN ++0xAD 0x00AD # SOFT HYPHEN ++0xAE 0x00AE # REGISTERED SIGN ++0xAF 0x00AF # MACRON ++0xB0 0x00B0 # DEGREE SIGN ++0xB1 0x00B1 # PLUS-MINUS SIGN ++0xB2 0x00B2 # SUPERSCRIPT TWO ++0xB3 0x00B3 # SUPERSCRIPT THREE ++0xB4 0x00B4 # ACUTE ACCENT ++0xB5 0x00B5 # MICRO SIGN ++0xB6 0x00B6 # PILCROW SIGN ++0xB7 0x00B7 # MIDDLE DOT ++0xB8 0x00B8 # CEDILLA ++0xB9 0x00B9 # SUPERSCRIPT ONE ++0xBA 0x00BA # MASCULINE ORDINAL INDICATOR ++0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xBC 0x00BC # VULGAR FRACTION ONE QUARTER ++0xBD 0x00BD # VULGAR FRACTION ONE HALF ++0xBE 0x00BE # VULGAR FRACTION THREE QUARTERS ++0xBF 0x00BF # INVERTED QUESTION MARK ++0xC0 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE ++0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE ++0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX ++0xC3 0x00C3 # LATIN CAPITAL LETTER A WITH TILDE ++0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS ++0xC5 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE ++0xC6 0x00C6 # LATIN CAPITAL LETTER AE ++0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA ++0xC8 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE ++0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE ++0xCA 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX ++0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS ++0xCC 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE ++0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE ++0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX ++0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS ++0xD0 0x011E # LATIN CAPITAL LETTER G WITH BREVE ++0xD1 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE ++0xD2 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE ++0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE ++0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX ++0xD5 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE ++0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS ++0xD7 0x00D7 # MULTIPLICATION SIGN ++0xD8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE ++0xD9 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE ++0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE ++0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX ++0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS ++0xDD 0x0130 # LATIN CAPITAL LETTER I WITH DOT ABOVE ++0xDE 0x015E # LATIN CAPITAL LETTER S WITH CEDILLA ++0xDF 0x00DF # LATIN SMALL LETTER SHARP S (German) ++0xE0 0x00E0 # LATIN SMALL LETTER A WITH GRAVE ++0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE ++0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX ++0xE3 0x00E3 # LATIN SMALL LETTER A WITH TILDE ++0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS ++0xE5 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE ++0xE6 0x00E6 # LATIN SMALL LETTER AE ++0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA ++0xE8 0x00E8 # LATIN SMALL LETTER E WITH GRAVE ++0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE ++0xEA 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX ++0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS ++0xEC 0x00EC # LATIN SMALL LETTER I WITH GRAVE ++0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE ++0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX ++0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS ++0xF0 0x011F # LATIN SMALL LETTER G WITH BREVE ++0xF1 0x00F1 # LATIN SMALL LETTER N WITH TILDE ++0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE ++0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE ++0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX ++0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE ++0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS ++0xF7 0x00F7 # DIVISION SIGN ++0xF8 0x00F8 # LATIN SMALL LETTER O WITH STROKE ++0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE ++0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE ++0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX ++0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS ++0xFD 0x0131 # LATIN SMALL LETTER DOTLESS I ++0xFE 0x015F # LATIN SMALL LETTER S WITH CEDILLA ++0xFF 0x00FF # LATIN SMALL LETTER Y WITH DIAERESIS ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -urN samba-2.0.10/source/codepages/CPKOI8-U.TXT samba-2.2.9/source/codepages/CPKOI8-U.TXT +--- samba-2.0.10/source/codepages/CPKOI8-U.TXT 1970-01-01 01:00:00.000000000 +0100 ++++ samba-2.2.9/source/codepages/CPKOI8-U.TXT 2004-05-08 03:07:19.000000000 +0200 +@@ -0,0 +1,262 @@ ++# ++# UNIX Ukrainian (koi8-u) to UNICODE translation table ++# ++# Based on koi8u_uni.tbl from lynx 2.8.2 distribution ++# by porokh ++# ++0x00 0x0000 # NULL ++0x01 0x0001 # START OF HEADING ++0x02 0x0002 # START OF TEXT ++0x03 0x0003 # END OF TEXT ++0x04 0x0004 # END OF TRANSMISSION ++0x05 0x0005 # ENQUIRY ++0x06 0x0006 # ACKNOWLEDGE ++0x07 0x0007 # BELL ++0x08 0x0008 # BACKSPACE ++0x09 0x0009 # HORIZONTAL TABULATION ++0x0A 0x000A # LINE FEED ++0x0B 0x000B # VERTICAL TABULATION ++0x0C 0x000C # FORM FEED ++0x0D 0x000D # CARRIAGE RETURN ++0x0E 0x000E # SHIFT OUT ++0x0F 0x000F # SHIFT IN ++0x10 0x0010 # DATA LINK ESCAPE ++0x11 0x0011 # DEVICE CONTROL ONE ++0x12 0x0012 # DEVICE CONTROL TWO ++0x13 0x0013 # DEVICE CONTROL THREE ++0x14 0x0014 # DEVICE CONTROL FOUR ++0x15 0x0015 # NEGATIVE ACKNOWLEDGE ++0x16 0x0016 # SYNCHRONOUS IDLE ++0x17 0x0017 # END OF TRANSMISSION BLOCK ++0x18 0x0018 # CANCEL ++0x19 0x0019 # END OF MEDIUM ++0x1A 0x001A # SUBSTITUTE ++0x1B 0x001B # ESCAPE ++0x1C 0x001C # FILE SEPARATOR ++0x1D 0x001D # GROUP SEPARATOR ++0x1E 0x001E # RECORD SEPARATOR ++0x1F 0x001F # UNIT SEPARATOR ++0x20 0x0020 # SPACE ++0x21 0x0021 # EXCLAMATION MARK ++0x22 0x0022 # QUOTATION MARK ++0x23 0x0023 # NUMBER SIGN ++0x24 0x0024 # DOLLAR SIGN ++0x25 0x0025 # PERCENT SIGN ++0x26 0x0026 # AMPERSAND ++0x27 0x0027 # APOSTROPHE ++0x28 0x0028 # LEFT PARENTHESIS ++0x29 0x0029 # RIGHT PARENTHESIS ++0x2A 0x002A # ASTERISK ++0x2B 0x002B # PLUS SIGN ++0x2C 0x002C # COMMA ++0x2D 0x002D # HYPHEN-MINUS ++0x2E 0x002E # FULL STOP ++0x2F 0x002F # SOLIDUS ++0x30 0x0030 # DIGIT ZERO ++0x31 0x0031 # DIGIT ONE ++0x32 0x0032 # DIGIT TWO ++0x33 0x0033 # DIGIT THREE ++0x34 0x0034 # DIGIT FOUR ++0x35 0x0035 # DIGIT FIVE ++0x36 0x0036 # DIGIT SIX ++0x37 0x0037 # DIGIT SEVEN ++0x38 0x0038 # DIGIT EIGHT ++0x39 0x0039 # DIGIT NINE ++0x3A 0x003A # COLON ++0x3B 0x003B # SEMICOLON ++0x3C 0x003C # LESS-THAN SIGN ++0x3D 0x003D # EQUALS SIGN ++0x3E 0x003E # GREATER-THAN SIGN ++0x3F 0x003F # QUESTION MARK ++0x40 0x0040 # COMMERCIAL AT ++0x41 0x0041 # LATIN CAPITAL LETTER A ++0x42 0x0042 # LATIN CAPITAL LETTER B ++0x43 0x0043 # LATIN CAPITAL LETTER C ++0x44 0x0044 # LATIN CAPITAL LETTER D ++0x45 0x0045 # LATIN CAPITAL LETTER E ++0x46 0x0046 # LATIN CAPITAL LETTER F ++0x47 0x0047 # LATIN CAPITAL LETTER G ++0x48 0x0048 # LATIN CAPITAL LETTER H ++0x49 0x0049 # LATIN CAPITAL LETTER I ++0x4A 0x004A # LATIN CAPITAL LETTER J ++0x4B 0x004B # LATIN CAPITAL LETTER K ++0x4C 0x004C # LATIN CAPITAL LETTER L ++0x4D 0x004D # LATIN CAPITAL LETTER M ++0x4E 0x004E # LATIN CAPITAL LETTER N ++0x4F 0x004F # LATIN CAPITAL LETTER O ++0x50 0x0050 # LATIN CAPITAL LETTER P ++0x51 0x0051 # LATIN CAPITAL LETTER Q ++0x52 0x0052 # LATIN CAPITAL LETTER R ++0x53 0x0053 # LATIN CAPITAL LETTER S ++0x54 0x0054 # LATIN CAPITAL LETTER T ++0x55 0x0055 # LATIN CAPITAL LETTER U ++0x56 0x0056 # LATIN CAPITAL LETTER V ++0x57 0x0057 # LATIN CAPITAL LETTER W ++0x58 0x0058 # LATIN CAPITAL LETTER X ++0x59 0x0059 # LATIN CAPITAL LETTER Y ++0x5A 0x005A # LATIN CAPITAL LETTER Z ++0x5B 0x005B # LEFT SQUARE BRACKET ++0x5C 0x005C # REVERSE SOLIDUS ++0x5D 0x005D # RIGHT SQUARE BRACKET ++0x5E 0x005E # CIRCUMFLEX ACCENT ++0x5F 0x005F # LOW LINE ++0x60 0x0060 # GRAVE ACCENT ++0x61 0x0061 # LATIN SMALL LETTER A ++0x62 0x0062 # LATIN SMALL LETTER B ++0x63 0x0063 # LATIN SMALL LETTER C ++0x64 0x0064 # LATIN SMALL LETTER D ++0x65 0x0065 # LATIN SMALL LETTER E ++0x66 0x0066 # LATIN SMALL LETTER F ++0x67 0x0067 # LATIN SMALL LETTER G ++0x68 0x0068 # LATIN SMALL LETTER H ++0x69 0x0069 # LATIN SMALL LETTER I ++0x6A 0x006A # LATIN SMALL LETTER J ++0x6B 0x006B # LATIN SMALL LETTER K ++0x6C 0x006C # LATIN SMALL LETTER L ++0x6D 0x006D # LATIN SMALL LETTER M ++0x6E 0x006E # LATIN SMALL LETTER N ++0x6F 0x006F # LATIN SMALL LETTER O ++0x70 0x0070 # LATIN SMALL LETTER P ++0x71 0x0071 # LATIN SMALL LETTER Q ++0x72 0x0072 # LATIN SMALL LETTER R ++0x73 0x0073 # LATIN SMALL LETTER S ++0x74 0x0074 # LATIN SMALL LETTER T ++0x75 0x0075 # LATIN SMALL LETTER U ++0x76 0x0076 # LATIN SMALL LETTER V ++0x77 0x0077 # LATIN SMALL LETTER W ++0x78 0x0078 # LATIN SMALL LETTER X ++0x79 0x0079 # LATIN SMALL LETTER Y ++0x7A 0x007A # LATIN SMALL LETTER Z ++0x7B 0x007B # LEFT CURLY BRACKET ++0x7C 0x007C # VERTICAL LINE ++0x7D 0x007D # RIGHT CURLY BRACKET ++0x7E 0x007E # TILDE ++0x7F 0x007F # DELETE ++0x80 0x2500 # BOX DRAWINGS LIGHT HORIZONTAL ++0x81 0x2502 # BOX DRAWINGS LIGHT VERTICAL ++0x82 0x250C # BOX DRAWINGS LIGHT DOWN AND RIGHT ++0x83 0x2510 # BOX DRAWINGS LIGHT DOWN AND LEFT ++0x84 0x2514 # BOX DRAWINGS LIGHT UP AND RIGHT ++0x85 0x2518 # BOX DRAWINGS LIGHT UP AND LEFT ++0x86 0x251C # BOX DRAWINGS LIGHT VERTICAL AND RIGHT ++0x87 0x2524 # BOX DRAWINGS LIGHT VERTICAL AND LEFT ++0x88 0x252C # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL ++0x89 0x2534 # BOX DRAWINGS LIGHT UP AND HORIZONTAL ++0x8A 0x253C # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL ++0x8B 0x2580 # UPPER HALF BLOCK ++0x8C 0x2584 # LOWER HALF BLOCK ++0x8D 0x2588 # FULL BLOCK ++0x8E 0x258C # LEFT HALF BLOCK ++0x8F 0x2590 # RIGHT HALF BLOCK ++0x90 0x2591 # LIGHT SHADE ++0x91 0x2592 # MEDIUM SHADE ++0x92 0x2593 # DARK SHADE ++0x93 0x2320 # TOP HALF INTEGRAL ++0x94 0x25A0 # BLACK SQUARE ++0x95 0x2219 # BULLET OPERATOR ++0x96 0x221A # SQUARE ROOT ++0x97 0x2248 # ALMOST EQUAL TO ++0x98 0x2264 # LESS THAN OR EQUAL TO ++0x99 0x2265 # GREATER THAN OR EQUAL TO ++0x9A 0x00A0 # NO-BREAK SPACE ++0x9B 0x2321 # BOTTOM HALF INTEGRAL ++0x9C 0x00B0 # DEGREE SIGN ++0x9D 0x00B2 # SUPERSCRIPT TWO ++0x9E 0x00B7 # MIDDLE DOT ++0x9F 0x00F7 # DIVISION SIGN ++0xA0 0x2550 # BOX DRAWINGS DOUBLE HORIZONTAL ++0xA1 0x2551 # BOX DRAWINGS DOUBLE VERTICAL ++0xA2 0x2552 # BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE ++0xA3 0x0451 # CYRILLIC SMALL LETTER IO ++0xA4 0x0454 # CYRILLIC SMALL LETTER UKRAINIAN IE ++0xA5 0x2554 # BOX DRAWINGS DOUBLE DOWN AND RIGHT ++0xA6 0x0456 # CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I ++0xA7 0x0457 # CYRILLIC SMALL LETTER YI (UKRAINIAN) ++0xA8 0x2557 # BOX DRAWINGS DOUBLE DOWN AND LEFT ++0xA9 0x2558 # BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE ++0xAA 0x2559 # BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE ++0xAB 0x255A # BOX DRAWINGS DOUBLE UP AND RIGHT ++0xAC 0x255B # BOX DRAWINGS UP SINGLE AND LEFT DOUBLE ++0xAD 0x0491 # CYRILLIC SMALL LETTER GHE WITH UPTURN ++0xAE 0x255D # BOX DRAWINGS DOUBLE UP AND LEFT ++0xAF 0x255E # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE ++0xB0 0x255F # BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE ++0xB1 0x2560 # BOX DRAWINGS DOUBLE VERTICAL AND RIGHT ++0xB2 0x2561 # BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE ++0xB3 0x0401 # CYRILLIC CAPITAL LETTER IO ++0xB4 0x0404 # CYRILLIC CAPITAL LETTER UKRAINIAN IE ++0xB5 0x2563 # BOX DRAWINGS DOUBLE VERTICAL AND LEFT ++0xB6 0x0406 # CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I ++0xB7 0x0407 # CYRILLIC CAPITAL LETTER YI (UKRAINIAN) ++0xB8 0x2566 # BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL ++0xB9 0x2567 # BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE ++0xBA 0x2568 # BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE ++0xBB 0x2569 # BOX DRAWINGS DOUBLE UP AND HORIZONTAL ++0xBC 0x256A # BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE ++0xBD 0x0490 # CYRILLIC CAPITAL LETTER GHE WITH UPTURN ++0xBE 0x256C # BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL ++0xBF 0x00A9 # COPYRIGHT SIGN ++0xC0 0x044E # CYRILLIC SMALL LETTER YU ++0xC1 0x0430 # CYRILLIC SMALL LETTER A ++0xC2 0x0431 # CYRILLIC SMALL LETTER BE ++0xC3 0x0446 # CYRILLIC SMALL LETTER TSE ++0xC4 0x0434 # CYRILLIC SMALL LETTER DE ++0xC5 0x0435 # CYRILLIC SMALL LETTER IE ++0xC6 0x0444 # CYRILLIC SMALL LETTER EF ++0xC7 0x0433 # CYRILLIC SMALL LETTER GHE ++0xC8 0x0445 # CYRILLIC SMALL LETTER KHA ++0xC9 0x0438 # CYRILLIC SMALL LETTER I ++0xCA 0x0439 # CYRILLIC SMALL LETTER SHORT I ++0xCB 0x043A # CYRILLIC SMALL LETTER KA ++0xCC 0x043B # CYRILLIC SMALL LETTER EL ++0xCD 0x043C # CYRILLIC SMALL LETTER EM ++0xCE 0x043D # CYRILLIC SMALL LETTER EN ++0xCF 0x043E # CYRILLIC SMALL LETTER O ++0xD0 0x043F # CYRILLIC SMALL LETTER PE ++0xD1 0x044F # CYRILLIC SMALL LETTER YA ++0xD2 0x0440 # CYRILLIC SMALL LETTER ER ++0xD3 0x0441 # CYRILLIC SMALL LETTER ES ++0xD4 0x0442 # CYRILLIC SMALL LETTER TE ++0xD5 0x0443 # CYRILLIC SMALL LETTER U ++0xD6 0x0436 # CYRILLIC SMALL LETTER ZHE ++0xD7 0x0432 # CYRILLIC SMALL LETTER VE ++0xD8 0x044C # CYRILLIC SMALL LETTER SOFT SIGN ++0xD9 0x044B # CYRILLIC SMALL LETTER YERU ++0xDA 0x0437 # CYRILLIC SMALL LETTER ZE ++0xDB 0x0448 # CYRILLIC SMALL LETTER SHA ++0xDC 0x044D # CYRILLIC SMALL LETTER E ++0xDD 0x0449 # CYRILLIC SMALL LETTER SHCHA ++0xDE 0x0447 # CYRILLIC SMALL LETTER CHE ++0xDF 0x044A # CYRILLIC SMALL LETTER HARD SIGN ++0xE0 0x042E # CYRILLIC CAPITAL LETTER YU ++0xE1 0x0410 # CYRILLIC CAPITAL LETTER A ++0xE2 0x0411 # CYRILLIC CAPITAL LETTER BE ++0xE3 0x0426 # CYRILLIC CAPITAL LETTER TSE ++0xE4 0x0414 # CYRILLIC CAPITAL LETTER DE ++0xE5 0x0415 # CYRILLIC CAPITAL LETTER IE ++0xE6 0x0424 # CYRILLIC CAPITAL LETTER EF ++0xE7 0x0413 # CYRILLIC CAPITAL LETTER GHE ++0xE8 0x0425 # CYRILLIC CAPITAL LETTER KHA ++0xE9 0x0418 # CYRILLIC CAPITAL LETTER I ++0xEA 0x0419 # CYRILLIC CAPITAL LETTER SHORT I ++0xEB 0x041A # CYRILLIC CAPITAL LETTER KA ++0xEC 0x041B # CYRILLIC CAPITAL LETTER EL ++0xED 0x041C # CYRILLIC CAPITAL LETTER EM ++0xEE 0x041D # CYRILLIC CAPITAL LETTER EN ++0xEF 0x041E # CYRILLIC CAPITAL LETTER O ++0xF0 0x041F # CYRILLIC CAPITAL LETTER PE ++0xF1 0x042F # CYRILLIC CAPITAL LETTER YA ++0xF2 0x0420 # CYRILLIC CAPITAL LETTER ER ++0xF3 0x0421 # CYRILLIC CAPITAL LETTER ES ++0xF4 0x0422 # CYRILLIC CAPITAL LETTER TE ++0xF5 0x0423 # CYRILLIC CAPITAL LETTER U ++0xF6 0x0416 # CYRILLIC CAPITAL LETTER ZHE ++0xF7 0x0412 # CYRILLIC CAPITAL LETTER VE ++0xF8 0x042C # CYRILLIC CAPITAL LETTER SOFT SIGN ++0xF9 0x042B # CYRILLIC CAPITAL LETTER YERU ++0xFA 0x0417 # CYRILLIC CAPITAL LETTER ZE ++0xFB 0x0428 # CYRILLIC CAPITAL LETTER SHA ++0xFC 0x042D # CYRILLIC CAPITAL LETTER E ++0xFD 0x0429 # CYRILLIC CAPITAL LETTER SHCHA ++0xFE 0x0427 # CYRILLIC CAPITAL LETTER CHE ++0xFF 0x042A # CYRILLIC CAPITAL LETTER HARD SIGN +diff -urN samba-2.0.10/source/codepages/CP1125.TXT samba-2.2.9/source/codepages/CP1125.TXT +--- samba-2.0.10/source/codepages/CP1125.TXT 1970-01-01 01:00:00.000000000 +0100 ++++ samba-2.2.9/source/codepages/CP1125.TXT 2004-05-08 03:07:19.000000000 +0200 +@@ -0,0 +1,263 @@ ++# ++# DOS Ukrainian (RUSCII, cp1125) to UNICODE translation table ++# ++# Based on cp866u_uni.tbl from lynx 2.8.2 distribution ++# by porokh ++# ++0x00 0x0000 #NULL ++0x01 0x0001 #START OF HEADING ++0x02 0x0002 #START OF TEXT ++0x03 0x0003 #END OF TEXT ++0x04 0x0004 #END OF TRANSMISSION ++0x05 0x0005 #ENQUIRY ++0x06 0x0006 #ACKNOWLEDGE ++0x07 0x0007 #BELL ++0x08 0x0008 #BACKSPACE ++0x09 0x0009 #HORIZONTAL TABULATION ++0x0a 0x000a #LINE FEED ++0x0b 0x000b #VERTICAL TABULATION ++0x0c 0x000c #FORM FEED ++0x0d 0x000d #CARRIAGE RETURN ++0x0e 0x000e #SHIFT OUT ++0x0f 0x000f #SHIFT IN ++0x10 0x0010 #DATA LINK ESCAPE ++0x11 0x0011 #DEVICE CONTROL ONE ++0x12 0x0012 #DEVICE CONTROL TWO ++0x13 0x0013 #DEVICE CONTROL THREE ++0x14 0x0014 #DEVICE CONTROL FOUR ++0x15 0x0015 #NEGATIVE ACKNOWLEDGE ++0x16 0x0016 #SYNCHRONOUS IDLE ++0x17 0x0017 #END OF TRANSMISSION BLOCK ++0x18 0x0018 #CANCEL ++0x19 0x0019 #END OF MEDIUM ++0x1a 0x001a #SUBSTITUTE ++0x1b 0x001b #ESCAPE ++0x1c 0x001c #FILE SEPARATOR ++0x1d 0x001d #GROUP SEPARATOR ++0x1e 0x001e #RECORD SEPARATOR ++0x1f 0x001f #UNIT SEPARATOR ++0x20 0x0020 #SPACE ++0x21 0x0021 #EXCLAMATION MARK ++0x22 0x0022 #QUOTATION MARK ++0x23 0x0023 #NUMBER SIGN ++0x24 0x0024 #DOLLAR SIGN ++0x25 0x0025 #PERCENT SIGN ++0x26 0x0026 #AMPERSAND ++0x27 0x0027 #APOSTROPHE ++0x28 0x0028 #LEFT PARENTHESIS ++0x29 0x0029 #RIGHT PARENTHESIS ++0x2a 0x002a #ASTERISK ++0x2b 0x002b #PLUS SIGN ++0x2c 0x002c #COMMA ++0x2d 0x002d #HYPHEN-MINUS ++0x2e 0x002e #FULL STOP ++0x2f 0x002f #SOLIDUS ++0x30 0x0030 #DIGIT ZERO ++0x31 0x0031 #DIGIT ONE ++0x32 0x0032 #DIGIT TWO ++0x33 0x0033 #DIGIT THREE ++0x34 0x0034 #DIGIT FOUR ++0x35 0x0035 #DIGIT FIVE ++0x36 0x0036 #DIGIT SIX ++0x37 0x0037 #DIGIT SEVEN ++0x38 0x0038 #DIGIT EIGHT ++0x39 0x0039 #DIGIT NINE ++0x3a 0x003a #COLON ++0x3b 0x003b #SEMICOLON ++0x3c 0x003c #LESS-THAN SIGN ++0x3d 0x003d #EQUALS SIGN ++0x3e 0x003e #GREATER-THAN SIGN ++0x3f 0x003f #QUESTION MARK ++0x40 0x0040 #COMMERCIAL AT ++0x41 0x0041 #LATIN CAPITAL LETTER A ++0x42 0x0042 #LATIN CAPITAL LETTER B ++0x43 0x0043 #LATIN CAPITAL LETTER C ++0x44 0x0044 #LATIN CAPITAL LETTER D ++0x45 0x0045 #LATIN CAPITAL LETTER E ++0x46 0x0046 #LATIN CAPITAL LETTER F ++0x47 0x0047 #LATIN CAPITAL LETTER G ++0x48 0x0048 #LATIN CAPITAL LETTER H ++0x49 0x0049 #LATIN CAPITAL LETTER I ++0x4a 0x004a #LATIN CAPITAL LETTER J ++0x4b 0x004b #LATIN CAPITAL LETTER K ++0x4c 0x004c #LATIN CAPITAL LETTER L ++0x4d 0x004d #LATIN CAPITAL LETTER M ++0x4e 0x004e #LATIN CAPITAL LETTER N ++0x4f 0x004f #LATIN CAPITAL LETTER O ++0x50 0x0050 #LATIN CAPITAL LETTER P ++0x51 0x0051 #LATIN CAPITAL LETTER Q ++0x52 0x0052 #LATIN CAPITAL LETTER R ++0x53 0x0053 #LATIN CAPITAL LETTER S ++0x54 0x0054 #LATIN CAPITAL LETTER T ++0x55 0x0055 #LATIN CAPITAL LETTER U ++0x56 0x0056 #LATIN CAPITAL LETTER V ++0x57 0x0057 #LATIN CAPITAL LETTER W ++0x58 0x0058 #LATIN CAPITAL LETTER X ++0x59 0x0059 #LATIN CAPITAL LETTER Y ++0x5a 0x005a #LATIN CAPITAL LETTER Z ++0x5b 0x005b #LEFT SQUARE BRACKET ++0x5c 0x005c #REVERSE SOLIDUS ++0x5d 0x005d #RIGHT SQUARE BRACKET ++0x5e 0x005e #CIRCUMFLEX ACCENT ++0x5f 0x005f #LOW LINE ++0x60 0x0060 #GRAVE ACCENT ++0x61 0x0061 #LATIN SMALL LETTER A ++0x62 0x0062 #LATIN SMALL LETTER B ++0x63 0x0063 #LATIN SMALL LETTER C ++0x64 0x0064 #LATIN SMALL LETTER D ++0x65 0x0065 #LATIN SMALL LETTER E ++0x66 0x0066 #LATIN SMALL LETTER F ++0x67 0x0067 #LATIN SMALL LETTER G ++0x68 0x0068 #LATIN SMALL LETTER H ++0x69 0x0069 #LATIN SMALL LETTER I ++0x6a 0x006a #LATIN SMALL LETTER J ++0x6b 0x006b #LATIN SMALL LETTER K ++0x6c 0x006c #LATIN SMALL LETTER L ++0x6d 0x006d #LATIN SMALL LETTER M ++0x6e 0x006e #LATIN SMALL LETTER N ++0x6f 0x006f #LATIN SMALL LETTER O ++0x70 0x0070 #LATIN SMALL LETTER P ++0x71 0x0071 #LATIN SMALL LETTER Q ++0x72 0x0072 #LATIN SMALL LETTER R ++0x73 0x0073 #LATIN SMALL LETTER S ++0x74 0x0074 #LATIN SMALL LETTER T ++0x75 0x0075 #LATIN SMALL LETTER U ++0x76 0x0076 #LATIN SMALL LETTER V ++0x77 0x0077 #LATIN SMALL LETTER W ++0x78 0x0078 #LATIN SMALL LETTER X ++0x79 0x0079 #LATIN SMALL LETTER Y ++0x7a 0x007a #LATIN SMALL LETTER Z ++0x7b 0x007b #LEFT CURLY BRACKET ++0x7c 0x007c #VERTICAL LINE ++0x7d 0x007d #RIGHT CURLY BRACKET ++0x7e 0x007e #TILDE ++0x7f 0x007f #DELETE ++0x80 0x0410 #CYRILLIC CAPITAL LETTER A ++0x81 0x0411 #CYRILLIC CAPITAL LETTER BE ++0x82 0x0412 #CYRILLIC CAPITAL LETTER VE ++0x83 0x0413 #CYRILLIC CAPITAL LETTER GHE ++0x84 0x0414 #CYRILLIC CAPITAL LETTER DE ++0x85 0x0415 #CYRILLIC CAPITAL LETTER IE ++0x86 0x0416 #CYRILLIC CAPITAL LETTER ZHE ++0x87 0x0417 #CYRILLIC CAPITAL LETTER ZE ++0x88 0x0418 #CYRILLIC CAPITAL LETTER I ++0x89 0x0419 #CYRILLIC CAPITAL LETTER SHORT I ++0x8a 0x041a #CYRILLIC CAPITAL LETTER KA ++0x8b 0x041b #CYRILLIC CAPITAL LETTER EL ++0x8c 0x041c #CYRILLIC CAPITAL LETTER EM ++0x8d 0x041d #CYRILLIC CAPITAL LETTER EN ++0x8e 0x041e #CYRILLIC CAPITAL LETTER O ++0x8f 0x041f #CYRILLIC CAPITAL LETTER PE ++0x90 0x0420 #CYRILLIC CAPITAL LETTER ER ++0x91 0x0421 #CYRILLIC CAPITAL LETTER ES ++0x92 0x0422 #CYRILLIC CAPITAL LETTER TE ++0x93 0x0423 #CYRILLIC CAPITAL LETTER U ++0x94 0x0424 #CYRILLIC CAPITAL LETTER EF ++0x95 0x0425 #CYRILLIC CAPITAL LETTER HA ++0x96 0x0426 #CYRILLIC CAPITAL LETTER TSE ++0x97 0x0427 #CYRILLIC CAPITAL LETTER CHE ++0x98 0x0428 #CYRILLIC CAPITAL LETTER SHA ++0x99 0x0429 #CYRILLIC CAPITAL LETTER SHCHA ++0x9a 0x042a #CYRILLIC CAPITAL LETTER HARD SIGN ++0x9b 0x042b #CYRILLIC CAPITAL LETTER YERU ++0x9c 0x042c #CYRILLIC CAPITAL LETTER SOFT SIGN ++0x9d 0x042d #CYRILLIC CAPITAL LETTER E ++0x9e 0x042e #CYRILLIC CAPITAL LETTER YU ++0x9f 0x042f #CYRILLIC CAPITAL LETTER YA ++0xa0 0x0430 #CYRILLIC SMALL LETTER A ++0xa1 0x0431 #CYRILLIC SMALL LETTER BE ++0xa2 0x0432 #CYRILLIC SMALL LETTER VE ++0xa3 0x0433 #CYRILLIC SMALL LETTER GHE ++0xa4 0x0434 #CYRILLIC SMALL LETTER DE ++0xa5 0x0435 #CYRILLIC SMALL LETTER IE ++0xa6 0x0436 #CYRILLIC SMALL LETTER ZHE ++0xa7 0x0437 #CYRILLIC SMALL LETTER ZE ++0xa8 0x0438 #CYRILLIC SMALL LETTER I ++0xa9 0x0439 #CYRILLIC SMALL LETTER SHORT I ++0xaa 0x043a #CYRILLIC SMALL LETTER KA ++0xab 0x043b #CYRILLIC SMALL LETTER EL ++0xac 0x043c #CYRILLIC SMALL LETTER EM ++0xad 0x043d #CYRILLIC SMALL LETTER EN ++0xae 0x043e #CYRILLIC SMALL LETTER O ++0xaf 0x043f #CYRILLIC SMALL LETTER PE ++0xb0 0x2591 #LIGHT SHADE ++0xb1 0x2592 #MEDIUM SHADE ++0xb2 0x2593 #DARK SHADE ++0xb3 0x2502 #BOX DRAWINGS LIGHT VERTICAL ++0xb4 0x2524 #BOX DRAWINGS LIGHT VERTICAL AND LEFT ++0xb5 0x2561 #BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE ++0xb6 0x2562 #BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE ++0xb7 0x2556 #BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE ++0xb8 0x2555 #BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE ++0xb9 0x2563 #BOX DRAWINGS DOUBLE VERTICAL AND LEFT ++0xba 0x2551 #BOX DRAWINGS DOUBLE VERTICAL ++0xbb 0x2557 #BOX DRAWINGS DOUBLE DOWN AND LEFT ++0xbc 0x255d #BOX DRAWINGS DOUBLE UP AND LEFT ++0xbd 0x255c #BOX DRAWINGS UP DOUBLE AND LEFT SINGLE ++0xbe 0x255b #BOX DRAWINGS UP SINGLE AND LEFT DOUBLE ++0xbf 0x2510 #BOX DRAWINGS LIGHT DOWN AND LEFT ++0xc0 0x2514 #BOX DRAWINGS LIGHT UP AND RIGHT ++0xc1 0x2534 #BOX DRAWINGS LIGHT UP AND HORIZONTAL ++0xc2 0x252c #BOX DRAWINGS LIGHT DOWN AND HORIZONTAL ++0xc3 0x251c #BOX DRAWINGS LIGHT VERTICAL AND RIGHT ++0xc4 0x2500 #BOX DRAWINGS LIGHT HORIZONTAL ++0xc5 0x253c #BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL ++0xc6 0x255e #BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE ++0xc7 0x255f #BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE ++0xc8 0x255a #BOX DRAWINGS DOUBLE UP AND RIGHT ++0xc9 0x2554 #BOX DRAWINGS DOUBLE DOWN AND RIGHT ++0xca 0x2569 #BOX DRAWINGS DOUBLE UP AND HORIZONTAL ++0xcb 0x2566 #BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL ++0xcc 0x2560 #BOX DRAWINGS DOUBLE VERTICAL AND RIGHT ++0xcd 0x2550 #BOX DRAWINGS DOUBLE HORIZONTAL ++0xce 0x256c #BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL ++0xcf 0x2567 #BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE ++0xd0 0x2568 #BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE ++0xd1 0x2564 #BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE ++0xd2 0x2565 #BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE ++0xd3 0x2559 #BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE ++0xd4 0x2558 #BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE ++0xd5 0x2552 #BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE ++0xd6 0x2553 #BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE ++0xd7 0x256b #BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE ++0xd8 0x256a #BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE ++0xd9 0x2518 #BOX DRAWINGS LIGHT UP AND LEFT ++0xda 0x250c #BOX DRAWINGS LIGHT DOWN AND RIGHT ++0xdb 0x2588 #FULL BLOCK ++0xdc 0x2584 #LOWER HALF BLOCK ++0xdd 0x258c #LEFT HALF BLOCK ++0xde 0x2590 #RIGHT HALF BLOCK ++0xdf 0x2580 #UPPER HALF BLOCK ++0xe0 0x0440 #CYRILLIC SMALL LETTER ER ++0xe1 0x0441 #CYRILLIC SMALL LETTER ES ++0xe2 0x0442 #CYRILLIC SMALL LETTER TE ++0xe3 0x0443 #CYRILLIC SMALL LETTER U ++0xe4 0x0444 #CYRILLIC SMALL LETTER EF ++0xe5 0x0445 #CYRILLIC SMALL LETTER HA ++0xe6 0x0446 #CYRILLIC SMALL LETTER TSE ++0xe7 0x0447 #CYRILLIC SMALL LETTER CHE ++0xe8 0x0448 #CYRILLIC SMALL LETTER SHA ++0xe9 0x0449 #CYRILLIC SMALL LETTER SHCHA ++0xea 0x044a #CYRILLIC SMALL LETTER HARD SIGN ++0xeb 0x044b #CYRILLIC SMALL LETTER YERU ++0xec 0x044c #CYRILLIC SMALL LETTER SOFT SIGN ++0xed 0x044d #CYRILLIC SMALL LETTER E ++0xee 0x044e #CYRILLIC SMALL LETTER YU ++0xef 0x044f #CYRILLIC SMALL LETTER YA ++0xf0 0x0401 #CYRILLIC CAPITAL LETTER IO ++0xf1 0x0451 #CYRILLIC SMALL LETTER IO ++0xf2 0x0490 #CYRILLIC CAPITAL LETTER GHE WITH UPTURN ++0xf3 0x0491 #CYRILLIC SMALL LETTER GHE WITH UPTURN ++0xf4 0x0404 #CYRILLIC CAPITAL LETTER UKRAINIAN IE ++0xf5 0x0454 #CYRILLIC SMALL LETTER UKRAINIAN IE ++0xf6 0x0406 #CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I ++0xf7 0x0456 #CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I ++0xf8 0x0407 #CYRILLIC CAPITAL LETTER YI ++0xf9 0x0457 #CYRILLIC SMALL LETTER YI ++0xfa 0x00b7 #MIDDLE DOT ++0xfb 0x221a #SQUARE ROOT ++0xfc 0x2116 #NUMERO SIGN ++0xfd 0x00a4 #CURRENCY SIGN ++0xfe 0x25a0 #BLACK SQUARE ++0xff 0x00a0 #NO-BREAK SPACE ++ +diff -urN samba-2.0.10/source/codepages/CP1251.TXT samba-2.2.9/source/codepages/CP1251.TXT +--- samba-2.0.10/source/codepages/CP1251.TXT 1970-01-01 01:00:00.000000000 +0100 ++++ samba-2.2.9/source/codepages/CP1251.TXT 2004-05-08 03:07:20.000000000 +0200 +@@ -0,0 +1,274 @@ ++# ++# Name: cp1251 to Unicode table ++# Unicode version: 2.0 ++# Table version: 2.01 ++# Table format: Format A ++# Date: 04/15/98 ++# ++# Contact: cpxlate@microsoft.com ++# ++# General notes: none ++# ++# Format: Three tab-separated columns ++# Column #1 is the cp1251 code (in hex) ++# Column #2 is the Unicode (in hex as 0xXXXX) ++# Column #3 is the Unicode name (follows a comment sign, '#') ++# ++# The entries are in cp1251 order ++# ++0x00 0x0000 #NULL ++0x01 0x0001 #START OF HEADING ++0x02 0x0002 #START OF TEXT ++0x03 0x0003 #END OF TEXT ++0x04 0x0004 #END OF TRANSMISSION ++0x05 0x0005 #ENQUIRY ++0x06 0x0006 #ACKNOWLEDGE ++0x07 0x0007 #BELL ++0x08 0x0008 #BACKSPACE ++0x09 0x0009 #HORIZONTAL TABULATION ++0x0A 0x000A #LINE FEED ++0x0B 0x000B #VERTICAL TABULATION ++0x0C 0x000C #FORM FEED ++0x0D 0x000D #CARRIAGE RETURN ++0x0E 0x000E #SHIFT OUT ++0x0F 0x000F #SHIFT IN ++0x10 0x0010 #DATA LINK ESCAPE ++0x11 0x0011 #DEVICE CONTROL ONE ++0x12 0x0012 #DEVICE CONTROL TWO ++0x13 0x0013 #DEVICE CONTROL THREE ++0x14 0x0014 #DEVICE CONTROL FOUR ++0x15 0x0015 #NEGATIVE ACKNOWLEDGE ++0x16 0x0016 #SYNCHRONOUS IDLE ++0x17 0x0017 #END OF TRANSMISSION BLOCK ++0x18 0x0018 #CANCEL ++0x19 0x0019 #END OF MEDIUM ++0x1A 0x001A #SUBSTITUTE ++0x1B 0x001B #ESCAPE ++0x1C 0x001C #FILE SEPARATOR ++0x1D 0x001D #GROUP SEPARATOR ++0x1E 0x001E #RECORD SEPARATOR ++0x1F 0x001F #UNIT SEPARATOR ++0x20 0x0020 #SPACE ++0x21 0x0021 #EXCLAMATION MARK ++0x22 0x0022 #QUOTATION MARK ++0x23 0x0023 #NUMBER SIGN ++0x24 0x0024 #DOLLAR SIGN ++0x25 0x0025 #PERCENT SIGN ++0x26 0x0026 #AMPERSAND ++0x27 0x0027 #APOSTROPHE ++0x28 0x0028 #LEFT PARENTHESIS ++0x29 0x0029 #RIGHT PARENTHESIS ++0x2A 0x002A #ASTERISK ++0x2B 0x002B #PLUS SIGN ++0x2C 0x002C #COMMA ++0x2D 0x002D #HYPHEN-MINUS ++0x2E 0x002E #FULL STOP ++0x2F 0x002F #SOLIDUS ++0x30 0x0030 #DIGIT ZERO ++0x31 0x0031 #DIGIT ONE ++0x32 0x0032 #DIGIT TWO ++0x33 0x0033 #DIGIT THREE ++0x34 0x0034 #DIGIT FOUR ++0x35 0x0035 #DIGIT FIVE ++0x36 0x0036 #DIGIT SIX ++0x37 0x0037 #DIGIT SEVEN ++0x38 0x0038 #DIGIT EIGHT ++0x39 0x0039 #DIGIT NINE ++0x3A 0x003A #COLON ++0x3B 0x003B #SEMICOLON ++0x3C 0x003C #LESS-THAN SIGN ++0x3D 0x003D #EQUALS SIGN ++0x3E 0x003E #GREATER-THAN SIGN ++0x3F 0x003F #QUESTION MARK ++0x40 0x0040 #COMMERCIAL AT ++0x41 0x0041 #LATIN CAPITAL LETTER A ++0x42 0x0042 #LATIN CAPITAL LETTER B ++0x43 0x0043 #LATIN CAPITAL LETTER C ++0x44 0x0044 #LATIN CAPITAL LETTER D ++0x45 0x0045 #LATIN CAPITAL LETTER E ++0x46 0x0046 #LATIN CAPITAL LETTER F ++0x47 0x0047 #LATIN CAPITAL LETTER G ++0x48 0x0048 #LATIN CAPITAL LETTER H ++0x49 0x0049 #LATIN CAPITAL LETTER I ++0x4A 0x004A #LATIN CAPITAL LETTER J ++0x4B 0x004B #LATIN CAPITAL LETTER K ++0x4C 0x004C #LATIN CAPITAL LETTER L ++0x4D 0x004D #LATIN CAPITAL LETTER M ++0x4E 0x004E #LATIN CAPITAL LETTER N ++0x4F 0x004F #LATIN CAPITAL LETTER O ++0x50 0x0050 #LATIN CAPITAL LETTER P ++0x51 0x0051 #LATIN CAPITAL LETTER Q ++0x52 0x0052 #LATIN CAPITAL LETTER R ++0x53 0x0053 #LATIN CAPITAL LETTER S ++0x54 0x0054 #LATIN CAPITAL LETTER T ++0x55 0x0055 #LATIN CAPITAL LETTER U ++0x56 0x0056 #LATIN CAPITAL LETTER V ++0x57 0x0057 #LATIN CAPITAL LETTER W ++0x58 0x0058 #LATIN CAPITAL LETTER X ++0x59 0x0059 #LATIN CAPITAL LETTER Y ++0x5A 0x005A #LATIN CAPITAL LETTER Z ++0x5B 0x005B #LEFT SQUARE BRACKET ++0x5C 0x005C #REVERSE SOLIDUS ++0x5D 0x005D #RIGHT SQUARE BRACKET ++0x5E 0x005E #CIRCUMFLEX ACCENT ++0x5F 0x005F #LOW LINE ++0x60 0x0060 #GRAVE ACCENT ++0x61 0x0061 #LATIN SMALL LETTER A ++0x62 0x0062 #LATIN SMALL LETTER B ++0x63 0x0063 #LATIN SMALL LETTER C ++0x64 0x0064 #LATIN SMALL LETTER D ++0x65 0x0065 #LATIN SMALL LETTER E ++0x66 0x0066 #LATIN SMALL LETTER F ++0x67 0x0067 #LATIN SMALL LETTER G ++0x68 0x0068 #LATIN SMALL LETTER H ++0x69 0x0069 #LATIN SMALL LETTER I ++0x6A 0x006A #LATIN SMALL LETTER J ++0x6B 0x006B #LATIN SMALL LETTER K ++0x6C 0x006C #LATIN SMALL LETTER L ++0x6D 0x006D #LATIN SMALL LETTER M ++0x6E 0x006E #LATIN SMALL LETTER N ++0x6F 0x006F #LATIN SMALL LETTER O ++0x70 0x0070 #LATIN SMALL LETTER P ++0x71 0x0071 #LATIN SMALL LETTER Q ++0x72 0x0072 #LATIN SMALL LETTER R ++0x73 0x0073 #LATIN SMALL LETTER S ++0x74 0x0074 #LATIN SMALL LETTER T ++0x75 0x0075 #LATIN SMALL LETTER U ++0x76 0x0076 #LATIN SMALL LETTER V ++0x77 0x0077 #LATIN SMALL LETTER W ++0x78 0x0078 #LATIN SMALL LETTER X ++0x79 0x0079 #LATIN SMALL LETTER Y ++0x7A 0x007A #LATIN SMALL LETTER Z ++0x7B 0x007B #LEFT CURLY BRACKET ++0x7C 0x007C #VERTICAL LINE ++0x7D 0x007D #RIGHT CURLY BRACKET ++0x7E 0x007E #TILDE ++0x7F 0x007F #DELETE ++0x80 0x0402 #CYRILLIC CAPITAL LETTER DJE ++0x81 0x0403 #CYRILLIC CAPITAL LETTER GJE ++0x82 0x201A #SINGLE LOW-9 QUOTATION MARK ++0x83 0x0453 #CYRILLIC SMALL LETTER GJE ++0x84 0x201E #DOUBLE LOW-9 QUOTATION MARK ++0x85 0x2026 #HORIZONTAL ELLIPSIS ++0x86 0x2020 #DAGGER ++0x87 0x2021 #DOUBLE DAGGER ++0x88 0x20AC #EURO SIGN ++0x89 0x2030 #PER MILLE SIGN ++0x8A 0x0409 #CYRILLIC CAPITAL LETTER LJE ++0x8B 0x2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK ++0x8C 0x040A #CYRILLIC CAPITAL LETTER NJE ++0x8D 0x040C #CYRILLIC CAPITAL LETTER KJE ++0x8E 0x040B #CYRILLIC CAPITAL LETTER TSHE ++0x8F 0x040F #CYRILLIC CAPITAL LETTER DZHE ++0x90 0x0452 #CYRILLIC SMALL LETTER DJE ++0x91 0x2018 #LEFT SINGLE QUOTATION MARK ++0x92 0x2019 #RIGHT SINGLE QUOTATION MARK ++0x93 0x201C #LEFT DOUBLE QUOTATION MARK ++0x94 0x201D #RIGHT DOUBLE QUOTATION MARK ++0x95 0x2022 #BULLET ++0x96 0x2013 #EN DASH ++0x97 0x2014 #EM DASH ++0x98 #UNDEFINED ++0x99 0x2122 #TRADE MARK SIGN ++0x9A 0x0459 #CYRILLIC SMALL LETTER LJE ++0x9B 0x203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK ++0x9C 0x045A #CYRILLIC SMALL LETTER NJE ++0x9D 0x045C #CYRILLIC SMALL LETTER KJE ++0x9E 0x045B #CYRILLIC SMALL LETTER TSHE ++0x9F 0x045F #CYRILLIC SMALL LETTER DZHE ++0xA0 0x00A0 #NO-BREAK SPACE ++0xA1 0x040E #CYRILLIC CAPITAL LETTER SHORT U ++0xA2 0x045E #CYRILLIC SMALL LETTER SHORT U ++0xA3 0x0408 #CYRILLIC CAPITAL LETTER JE ++0xA4 0x00A4 #CURRENCY SIGN ++0xA5 0x0490 #CYRILLIC CAPITAL LETTER GHE WITH UPTURN ++0xA6 0x00A6 #BROKEN BAR ++0xA7 0x00A7 #SECTION SIGN ++0xA8 0x0401 #CYRILLIC CAPITAL LETTER IO ++0xA9 0x00A9 #COPYRIGHT SIGN ++0xAA 0x0404 #CYRILLIC CAPITAL LETTER UKRAINIAN IE ++0xAB 0x00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xAC 0x00AC #NOT SIGN ++0xAD 0x00AD #SOFT HYPHEN ++0xAE 0x00AE #REGISTERED SIGN ++0xAF 0x0407 #CYRILLIC CAPITAL LETTER YI ++0xB0 0x00B0 #DEGREE SIGN ++0xB1 0x00B1 #PLUS-MINUS SIGN ++0xB2 0x0406 #CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I ++0xB3 0x0456 #CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I ++0xB4 0x0491 #CYRILLIC SMALL LETTER GHE WITH UPTURN ++0xB5 0x00B5 #MICRO SIGN ++0xB6 0x00B6 #PILCROW SIGN ++0xB7 0x00B7 #MIDDLE DOT ++0xB8 0x0451 #CYRILLIC SMALL LETTER IO ++0xB9 0x2116 #NUMERO SIGN ++0xBA 0x0454 #CYRILLIC SMALL LETTER UKRAINIAN IE ++0xBB 0x00BB #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xBC 0x0458 #CYRILLIC SMALL LETTER JE ++0xBD 0x0405 #CYRILLIC CAPITAL LETTER DZE ++0xBE 0x0455 #CYRILLIC SMALL LETTER DZE ++0xBF 0x0457 #CYRILLIC SMALL LETTER YI ++0xC0 0x0410 #CYRILLIC CAPITAL LETTER A ++0xC1 0x0411 #CYRILLIC CAPITAL LETTER BE ++0xC2 0x0412 #CYRILLIC CAPITAL LETTER VE ++0xC3 0x0413 #CYRILLIC CAPITAL LETTER GHE ++0xC4 0x0414 #CYRILLIC CAPITAL LETTER DE ++0xC5 0x0415 #CYRILLIC CAPITAL LETTER IE ++0xC6 0x0416 #CYRILLIC CAPITAL LETTER ZHE ++0xC7 0x0417 #CYRILLIC CAPITAL LETTER ZE ++0xC8 0x0418 #CYRILLIC CAPITAL LETTER I ++0xC9 0x0419 #CYRILLIC CAPITAL LETTER SHORT I ++0xCA 0x041A #CYRILLIC CAPITAL LETTER KA ++0xCB 0x041B #CYRILLIC CAPITAL LETTER EL ++0xCC 0x041C #CYRILLIC CAPITAL LETTER EM ++0xCD 0x041D #CYRILLIC CAPITAL LETTER EN ++0xCE 0x041E #CYRILLIC CAPITAL LETTER O ++0xCF 0x041F #CYRILLIC CAPITAL LETTER PE ++0xD0 0x0420 #CYRILLIC CAPITAL LETTER ER ++0xD1 0x0421 #CYRILLIC CAPITAL LETTER ES ++0xD2 0x0422 #CYRILLIC CAPITAL LETTER TE ++0xD3 0x0423 #CYRILLIC CAPITAL LETTER U ++0xD4 0x0424 #CYRILLIC CAPITAL LETTER EF ++0xD5 0x0425 #CYRILLIC CAPITAL LETTER HA ++0xD6 0x0426 #CYRILLIC CAPITAL LETTER TSE ++0xD7 0x0427 #CYRILLIC CAPITAL LETTER CHE ++0xD8 0x0428 #CYRILLIC CAPITAL LETTER SHA ++0xD9 0x0429 #CYRILLIC CAPITAL LETTER SHCHA ++0xDA 0x042A #CYRILLIC CAPITAL LETTER HARD SIGN ++0xDB 0x042B #CYRILLIC CAPITAL LETTER YERU ++0xDC 0x042C #CYRILLIC CAPITAL LETTER SOFT SIGN ++0xDD 0x042D #CYRILLIC CAPITAL LETTER E ++0xDE 0x042E #CYRILLIC CAPITAL LETTER YU ++0xDF 0x042F #CYRILLIC CAPITAL LETTER YA ++0xE0 0x0430 #CYRILLIC SMALL LETTER A ++0xE1 0x0431 #CYRILLIC SMALL LETTER BE ++0xE2 0x0432 #CYRILLIC SMALL LETTER VE ++0xE3 0x0433 #CYRILLIC SMALL LETTER GHE ++0xE4 0x0434 #CYRILLIC SMALL LETTER DE ++0xE5 0x0435 #CYRILLIC SMALL LETTER IE ++0xE6 0x0436 #CYRILLIC SMALL LETTER ZHE ++0xE7 0x0437 #CYRILLIC SMALL LETTER ZE ++0xE8 0x0438 #CYRILLIC SMALL LETTER I ++0xE9 0x0439 #CYRILLIC SMALL LETTER SHORT I ++0xEA 0x043A #CYRILLIC SMALL LETTER KA ++0xEB 0x043B #CYRILLIC SMALL LETTER EL ++0xEC 0x043C #CYRILLIC SMALL LETTER EM ++0xED 0x043D #CYRILLIC SMALL LETTER EN ++0xEE 0x043E #CYRILLIC SMALL LETTER O ++0xEF 0x043F #CYRILLIC SMALL LETTER PE ++0xF0 0x0440 #CYRILLIC SMALL LETTER ER ++0xF1 0x0441 #CYRILLIC SMALL LETTER ES ++0xF2 0x0442 #CYRILLIC SMALL LETTER TE ++0xF3 0x0443 #CYRILLIC SMALL LETTER U ++0xF4 0x0444 #CYRILLIC SMALL LETTER EF ++0xF5 0x0445 #CYRILLIC SMALL LETTER HA ++0xF6 0x0446 #CYRILLIC SMALL LETTER TSE ++0xF7 0x0447 #CYRILLIC SMALL LETTER CHE ++0xF8 0x0448 #CYRILLIC SMALL LETTER SHA ++0xF9 0x0449 #CYRILLIC SMALL LETTER SHCHA ++0xFA 0x044A #CYRILLIC SMALL LETTER HARD SIGN ++0xFB 0x044B #CYRILLIC SMALL LETTER YERU ++0xFC 0x044C #CYRILLIC SMALL LETTER SOFT SIGN ++0xFD 0x044D #CYRILLIC SMALL LETTER E ++0xFE 0x044E #CYRILLIC SMALL LETTER YU ++0xFF 0x044F #CYRILLIC SMALL LETTER YA +diff -urN samba-2.0.10/source/codepages/CP775.TXT samba-2.2.9/source/codepages/CP775.TXT +--- samba-2.0.10/source/codepages/CP775.TXT 1970-01-01 01:00:00.000000000 +0100 ++++ samba-2.2.9/source/codepages/CP775.TXT 2004-05-08 03:07:18.000000000 +0200 +@@ -0,0 +1,273 @@ ++# ++# Name: cp775_DOSBaltic to Unicode table ++# Unicode version: 2.0 ++# Table version: 2.00 ++# Table format: Format A ++# Date: 01/08/2001 ++# Authors: Toomas Soome ++# General notes: none ++# ++# Format: Three tab-separated columns ++# Column #1 is the cp775_DOSBaltic code (in hex) ++# Column #2 is the Unicode (in hex as 0xXXXX) ++# Column #3 is the Unicode name (follows a comment sign, '#') ++# ++# The entries are in cp775_DOSBaltic order ++# ++0x00 0x0000 #NULL ++0x01 0x0001 #START OF HEADING ++0x02 0x0002 #START OF TEXT ++0x03 0x0003 #END OF TEXT ++0x04 0x0004 #END OF TRANSMISSION ++0x05 0x0005 #ENQUIRY ++0x06 0x0006 #ACKNOWLEDGE ++0x07 0x0007 #BELL ++0x08 0x0008 #BACKSPACE ++0x09 0x0009 #HORIZONTAL TABULATION ++0x0a 0x000a #LINE FEED ++0x0b 0x000b #VERTICAL TABULATION ++0x0c 0x000c #FORM FEED ++0x0d 0x000d #CARRIAGE RETURN ++0x0e 0x000e #SHIFT OUT ++0x0f 0x000f #SHIFT IN ++0x10 0x0010 #DATA LINK ESCAPE ++0x11 0x0011 #DEVICE CONTROL ONE ++0x12 0x0012 #DEVICE CONTROL TWO ++0x13 0x0013 #DEVICE CONTROL THREE ++0x14 0x0014 #DEVICE CONTROL FOUR ++0x15 0x0015 #NEGATIVE ACKNOWLEDGE ++0x16 0x0016 #SYNCHRONOUS IDLE ++0x17 0x0017 #END OF TRANSMISSION BLOCK ++0x18 0x0018 #CANCEL ++0x19 0x0019 #END OF MEDIUM ++0x1a 0x001a #SUBSTITUTE ++0x1b 0x001b #ESCAPE ++0x1c 0x001c #FILE SEPARATOR ++0x1d 0x001d #GROUP SEPARATOR ++0x1e 0x001e #RECORD SEPARATOR ++0x1f 0x001f #UNIT SEPARATOR ++0x20 0x0020 #SPACE ++0x21 0x0021 #EXCLAMATION MARK ++0x22 0x0022 #QUOTATION MARK ++0x23 0x0023 #NUMBER SIGN ++0x24 0x0024 #DOLLAR SIGN ++0x25 0x0025 #PERCENT SIGN ++0x26 0x0026 #AMPERSAND ++0x27 0x0027 #APOSTROPHE ++0x28 0x0028 #LEFT PARENTHESIS ++0x29 0x0029 #RIGHT PARENTHESIS ++0x2a 0x002a #ASTERISK ++0x2b 0x002b #PLUS SIGN ++0x2c 0x002c #COMMA ++0x2d 0x002d #HYPHEN-MINUS ++0x2e 0x002e #FULL STOP ++0x2f 0x002f #SOLIDUS ++0x30 0x0030 #DIGIT ZERO ++0x31 0x0031 #DIGIT ONE ++0x32 0x0032 #DIGIT TWO ++0x33 0x0033 #DIGIT THREE ++0x34 0x0034 #DIGIT FOUR ++0x35 0x0035 #DIGIT FIVE ++0x36 0x0036 #DIGIT SIX ++0x37 0x0037 #DIGIT SEVEN ++0x38 0x0038 #DIGIT EIGHT ++0x39 0x0039 #DIGIT NINE ++0x3a 0x003a #COLON ++0x3b 0x003b #SEMICOLON ++0x3c 0x003c #LESS-THAN SIGN ++0x3d 0x003d #EQUALS SIGN ++0x3e 0x003e #GREATER-THAN SIGN ++0x3f 0x003f #QUESTION MARK ++0x40 0x0040 #COMMERCIAL AT ++0x41 0x0041 #LATIN CAPITAL LETTER A ++0x42 0x0042 #LATIN CAPITAL LETTER B ++0x43 0x0043 #LATIN CAPITAL LETTER C ++0x44 0x0044 #LATIN CAPITAL LETTER D ++0x45 0x0045 #LATIN CAPITAL LETTER E ++0x46 0x0046 #LATIN CAPITAL LETTER F ++0x47 0x0047 #LATIN CAPITAL LETTER G ++0x48 0x0048 #LATIN CAPITAL LETTER H ++0x49 0x0049 #LATIN CAPITAL LETTER I ++0x4a 0x004a #LATIN CAPITAL LETTER J ++0x4b 0x004b #LATIN CAPITAL LETTER K ++0x4c 0x004c #LATIN CAPITAL LETTER L ++0x4d 0x004d #LATIN CAPITAL LETTER M ++0x4e 0x004e #LATIN CAPITAL LETTER N ++0x4f 0x004f #LATIN CAPITAL LETTER O ++0x50 0x0050 #LATIN CAPITAL LETTER P ++0x51 0x0051 #LATIN CAPITAL LETTER Q ++0x52 0x0052 #LATIN CAPITAL LETTER R ++0x53 0x0053 #LATIN CAPITAL LETTER S ++0x54 0x0054 #LATIN CAPITAL LETTER T ++0x55 0x0055 #LATIN CAPITAL LETTER U ++0x56 0x0056 #LATIN CAPITAL LETTER V ++0x57 0x0057 #LATIN CAPITAL LETTER W ++0x58 0x0058 #LATIN CAPITAL LETTER X ++0x59 0x0059 #LATIN CAPITAL LETTER Y ++0x5a 0x005a #LATIN CAPITAL LETTER Z ++0x5b 0x005b #LEFT SQUARE BRACKET ++0x5c 0x005c #REVERSE SOLIDUS ++0x5d 0x005d #RIGHT SQUARE BRACKET ++0x5e 0x005e #CIRCUMFLEX ACCENT ++0x5f 0x005f #LOW LINE ++0x60 0x0060 #GRAVE ACCENT ++0x61 0x0061 #LATIN SMALL LETTER A ++0x62 0x0062 #LATIN SMALL LETTER B ++0x63 0x0063 #LATIN SMALL LETTER C ++0x64 0x0064 #LATIN SMALL LETTER D ++0x65 0x0065 #LATIN SMALL LETTER E ++0x66 0x0066 #LATIN SMALL LETTER F ++0x67 0x0067 #LATIN SMALL LETTER G ++0x68 0x0068 #LATIN SMALL LETTER H ++0x69 0x0069 #LATIN SMALL LETTER I ++0x6a 0x006a #LATIN SMALL LETTER J ++0x6b 0x006b #LATIN SMALL LETTER K ++0x6c 0x006c #LATIN SMALL LETTER L ++0x6d 0x006d #LATIN SMALL LETTER M ++0x6e 0x006e #LATIN SMALL LETTER N ++0x6f 0x006f #LATIN SMALL LETTER O ++0x70 0x0070 #LATIN SMALL LETTER P ++0x71 0x0071 #LATIN SMALL LETTER Q ++0x72 0x0072 #LATIN SMALL LETTER R ++0x73 0x0073 #LATIN SMALL LETTER S ++0x74 0x0074 #LATIN SMALL LETTER T ++0x75 0x0075 #LATIN SMALL LETTER U ++0x76 0x0076 #LATIN SMALL LETTER V ++0x77 0x0077 #LATIN SMALL LETTER W ++0x78 0x0078 #LATIN SMALL LETTER X ++0x79 0x0079 #LATIN SMALL LETTER Y ++0x7a 0x007a #LATIN SMALL LETTER Z ++0x7b 0x007b #LEFT CURLY BRACKET ++0x7c 0x007c #VERTICAL LINE ++0x7d 0x007d #RIGHT CURLY BRACKET ++0x7e 0x007e #TILDE ++0x7f 0x007f #DELETE ++0x80 0x0106 #LATIN CAPITAL LETTER C WITH ACUTE ++0x81 0x00fc #LATIN SMALL LETTER U WITH DIAERESIS ++0x82 0x00e9 #LATIN SMALL LETTER E WITH ACUTE ++0x83 0x0101 #LATIN SMALL LETTER A WITH MACRON ++0x84 0x00e4 #LATIN SMALL LETTER A WITH DIAERESIS ++0x85 0x0123 #LATIN SMALL LETTER G WITH CEDILLA ++0x86 0x00e5 #LATIN SMALL LETTER A WITH RING ABOVE ++0x87 0x0107 #LATIN SMALL LETTER C WITH ACUTE ++0x88 0x0142 #LATIN SMALL LETTER L WITH STROKE ++0x89 0x0113 #LATIN SMALL LETTER E WITH MACRON ++0x8a 0x0156 #LATIN CAPITAL LETTER R WITH CEDILLA ++0x8b 0x0157 #LATIN SMALL LETTER R WITH CEDILLA ++0x8c 0x012b #LATIN SMALL LETTER I WITH MACRON ++0x8d 0x0179 #LATIN CAPITAL LETTER Z WITH ACUTE ++0x8e 0x00c4 #LATIN CAPITAL LETTER A WITH DIAERESIS ++0x8f 0x00c5 #LATIN CAPITAL LETTER A WITH RING ABOVE ++0x90 0x00c9 #LATIN CAPITAL LETTER E WITH ACUTE ++0x91 0x00e6 #LATIN SMALL LIGATURE AE ++0x92 0x00c6 #LATIN CAPITAL LIGATURE AE ++0x93 0x014d #LATIN SMALL LETTER O WITH MACRON ++0x94 0x00f6 #LATIN SMALL LETTER O WITH DIAERESIS ++0x95 0x0122 #LATIN CAPITAL LETTER G WITH CEDILLA ++0x96 0x00a2 #CENT SIGN ++0x97 0x015a #LATIN CAPITAL LETTER S WITH ACUTE ++0x98 0x015b #LATIN SMALL LETTER S WITH ACUTE ++0x99 0x00d6 #LATIN CAPITAL LETTER O WITH DIAERESIS ++0x9a 0x00dc #LATIN CAPITAL LETTER U WITH DIAERESIS ++0x9b 0x00f8 #LATIN SMALL LETTER O WITH STROKE ++0x9c 0x00a3 #POUND SIGN ++0x9d 0x00d8 #LATIN CAPITAL LETTER O WITH STROKE ++0x9e 0x00d7 #MULTIPLICATION SIGN ++0x9f 0x00a4 #CURRENCY SIGN ++0xa0 0x0100 #LATIN CAPITAL LETTER A WITH MACRON ++0xa1 0x012a #LATIN CAPITAL LETTER I WITH MACRON ++0xa2 0x00f3 #LATIN SMALL LETTER O WITH ACUTE ++0xa3 0x017b #LATIN CAPITAL LETTER Z WITH DOT ABOVE ++0xa4 0x017c #LATIN SMALL LETTER Z WITH DOT ABOVE ++0xa5 0x017a #LATIN SMALL LETTER Z WITH ACUTE ++0xa6 0x201d #RIGHT DOUBLE QUOTATION MARK ++0xa7 0x00a6 #BROKEN BAR ++0xa8 0x00a9 #COPYRIGHT SIGN ++0xa9 0x00ae #REGISTERED SIGN ++0xaa 0x00ac #NOT SIGN ++0xab 0x00bd #VULGAR FRACTION ONE HALF ++0xac 0x00bc #VULGAR FRACTION ONE QUARTER ++0xad 0x0141 #LATIN CAPITAL LETTER L WITH STROKE ++0xae 0x00ab #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xaf 0x00bb #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xb0 0x2591 #LIGHT SHADE ++0xb1 0x2592 #MEDIUM SHADE ++0xb2 0x2593 #DARK SHADE ++0xb3 0x2502 #BOX DRAWINGS LIGHT VERTICAL ++0xb4 0x2524 #BOX DRAWINGS LIGHT VERTICAL AND LEFT ++0xb5 0x0104 #LATIN CAPITAL LETTER A WITH OGONEK ++0xb6 0x010c #LATIN CAPITAL LETTER C WITH CARON ++0xb7 0x0118 #LATIN CAPITAL LETTER E WITH OGONEK ++0xb8 0x0116 #LATIN CAPITAL LETTER E WITH DOT ABOVE ++0xb9 0x2563 #BOX DRAWINGS DOUBLE VERTICAL AND LEFT ++0xba 0x2551 #BOX DRAWINGS DOUBLE VERTICAL ++0xbb 0x2557 #BOX DRAWINGS DOUBLE DOWN AND LEFT ++0xbc 0x255d #BOX DRAWINGS DOUBLE UP AND LEFT ++0xbd 0x012e #LATIN CAPITAL LETTER I WITH OGONEK ++0xbe 0x0160 #LATIN CAPITAL LETTER S WITH CARON ++0xbf 0x2510 #BOX DRAWINGS LIGHT DOWN AND LEFT ++0xc0 0x2514 #BOX DRAWINGS LIGHT UP AND RIGHT ++0xc1 0x2534 #BOX DRAWINGS LIGHT UP AND HORIZONTAL ++0xc2 0x252c #BOX DRAWINGS LIGHT DOWN AND HORIZONTAL ++0xc3 0x251c #BOX DRAWINGS LIGHT VERTICAL AND RIGHT ++0xc4 0x2500 #BOX DRAWINGS LIGHT HORIZONTAL ++0xc5 0x253c #BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL ++0xc6 0x0172 #LATIN CAPITAL LETTER U WITH OGONEK ++0xc7 0x016a #LATIN CAPITAL LETTER U WITH MACRON ++0xc8 0x255a #BOX DRAWINGS DOUBLE UP AND RIGHT ++0xc9 0x2554 #BOX DRAWINGS DOUBLE DOWN AND RIGHT ++0xca 0x2569 #BOX DRAWINGS DOUBLE UP AND HORIZONTAL ++0xcb 0x2566 #BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL ++0xcc 0x2560 #BOX DRAWINGS DOUBLE VERTICAL AND RIGHT ++0xcd 0x2550 #BOX DRAWINGS DOUBLE HORIZONTAL ++0xce 0x256c #BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL ++0xcf 0x017d #LATIN CAPITAL LETTER Z WITH CARON ++0xd0 0x0105 #LATIN SMALL LETTER A WITH OGONEK ++0xd1 0x010d #LATIN SMALL LETTER C WITH CARON ++0xd2 0x0119 #LATIN SMALL LETTER E WITH OGONEK ++0xd3 0x0117 #LATIN SMALL LETTER E WITH DOT ABOVE ++0xd4 0x012f #LATIN SMALL LETTER I WITH OGONEK ++0xd5 0x0161 #LATIN SMALL LETTER S WITH CARON ++0xd6 0x0173 #LATIN SMALL LETTER U WITH OGONEK ++0xd7 0x016b #LATIN SMALL LETTER U WITH MACRON ++0xd8 0x017e #LATIN SMALL LETTER Z WITH CARON ++0xd9 0x2518 #BOX DRAWINGS LIGHT UP AND LEFT ++0xda 0x250c #BOX DRAWINGS LIGHT DOWN AND RIGHT ++0xdb 0x2588 #FULL BLOCK ++0xdc 0x2584 #LOWER HALF BLOCK ++0xdd 0x258c #LEFT HALF BLOCK ++0xde 0x2590 #RIGHT HALF BLOCK ++0xdf 0x2580 #UPPER HALF BLOCK ++0xe0 0x00d3 #LATIN CAPITAL LETTER O WITH ACUTE ++0xe1 0x00df #LATIN SMALL LETTER SHARP S ++0xe2 0x014c #LATIN CAPITAL LETTER O WITH MACRON ++0xe3 0x0143 #LATIN CAPITAL LETTER N WITH ACUTE ++0xe4 0x00f5 #LATIN SMALL LETTER O WITH TILDE ++0xe5 0x00d5 #LATIN CAPITAL LETTER O WITH TILDE ++0xe6 0x00b5 #MICRO SIGN ++0xe7 0x0144 #LATIN SMALL LETTER N WITH ACUTE ++0xe8 0x0136 #LATIN CAPITAL LETTER K WITH CEDILLA ++0xe9 0x0137 #LATIN SMALL LETTER K WITH CEDILLA ++0xea 0x013b #LATIN CAPITAL LETTER L WITH CEDILLA ++0xeb 0x013c #LATIN SMALL LETTER L WITH CEDILLA ++0xec 0x0146 #LATIN SMALL LETTER N WITH CEDILLA ++0xed 0x0112 #LATIN CAPITAL LETTER E WITH MACRON ++0xee 0x0145 #LATIN CAPITAL LETTER N WITH CEDILLA ++0xef 0x2019 #RIGHT SINGLE QUOTATION MARK ++0xf0 0x00ad #SOFT HYPHEN ++0xf1 0x00b1 #PLUS-MINUS SIGN ++0xf2 0x201c #LEFT DOUBLE QUOTATION MARK ++0xf3 0x00be #VULGAR FRACTION THREE QUARTERS ++0xf4 0x00b6 #PILCROW SIGN ++0xf5 0x00a7 #SECTION SIGN ++0xf6 0x00f7 #DIVISION SIGN ++0xf7 0x201e #DOUBLE LOW-9 QUOTATION MARK ++0xf8 0x00b0 #DEGREE SIGN ++0xf9 0x2219 #BULLET OPERATOR ++0xfa 0x00b7 #MIDDLE DOT ++0xfb 0x00b9 #SUPERSCRIPT ONE ++0xfc 0x00b3 #SUPERSCRIPT THREE ++0xfd 0x00b2 #SUPERSCRIPT TWO ++0xfe 0x25a0 #BLACK SQUARE ++0xff 0x00a0 #NO-BREAK SPACE ++ +diff -urN samba-2.0.10/source/codepages/CP857.TXT samba-2.2.9/source/codepages/CP857.TXT +--- samba-2.0.10/source/codepages/CP857.TXT 1970-01-01 01:00:00.000000000 +0100 ++++ samba-2.2.9/source/codepages/CP857.TXT 2004-05-08 03:07:18.000000000 +0200 +@@ -0,0 +1,273 @@ ++# ++# Name: cp857_DOSLatin5 to Unicode table ++# Unicode version: 2.0 ++# Table version: 0.01 ++# Table format: Format A ++# Date: 01/05/2001 ++# Authors: Deniz Akkus ++# ++# General notes: none ++# ++# Format: Three tab-separated columns ++# Column #1 is the cp857_DOSLatin5 code (in hex) ++# Column #2 is the Unicode (in hex as 0xXXXX) ++# Column #3 is the Unicode name (follows a comment sign, '#') ++# ++# The entries are in cp857_DOSLatin5 order ++# ++0x00 0x0000 #NULL ++0x01 0x0001 #START OF HEADING ++0x02 0x0002 #START OF TEXT ++0x03 0x0003 #END OF TEXT ++0x04 0x0004 #END OF TRANSMISSION ++0x05 0x0005 #ENQUIRY ++0x06 0x0006 #ACKNOWLEDGE ++0x07 0x0007 #BELL ++0x08 0x0008 #BACKSPACE ++0x09 0x0009 #HORIZONTAL TABULATION ++0x0a 0x000a #LINE FEED ++0x0b 0x000b #VERTICAL TABULATION ++0x0c 0x000c #FORM FEED ++0x0d 0x000d #CARRIAGE RETURN ++0x0e 0x000e #SHIFT OUT ++0x0f 0x000f #SHIFT IN ++0x10 0x0010 #DATA LINK ESCAPE ++0x11 0x0011 #DEVICE CONTROL ONE ++0x12 0x0012 #DEVICE CONTROL TWO ++0x13 0x0013 #DEVICE CONTROL THREE ++0x14 0x0014 #DEVICE CONTROL FOUR ++0x15 0x0015 #NEGATIVE ACKNOWLEDGE ++0x16 0x0016 #SYNCHRONOUS IDLE ++0x17 0x0017 #END OF TRANSMISSION BLOCK ++0x18 0x0018 #CANCEL ++0x19 0x0019 #END OF MEDIUM ++0x1a 0x001a #SUBSTITUTE ++0x1b 0x001b #ESCAPE ++0x1c 0x001c #FILE SEPARATOR ++0x1d 0x001d #GROUP SEPARATOR ++0x1e 0x001e #RECORD SEPARATOR ++0x1f 0x001f #UNIT SEPARATOR ++0x20 0x0020 #SPACE ++0x21 0x0021 #EXCLAMATION MARK ++0x22 0x0022 #QUOTATION MARK ++0x23 0x0023 #NUMBER SIGN ++0x24 0x0024 #DOLLAR SIGN ++0x25 0x0025 #PERCENT SIGN ++0x26 0x0026 #AMPERSAND ++0x27 0x0027 #APOSTROPHE ++0x28 0x0028 #LEFT PARENTHESIS ++0x29 0x0029 #RIGHT PARENTHESIS ++0x2a 0x002a #ASTERISK ++0x2b 0x002b #PLUS SIGN ++0x2c 0x002c #COMMA ++0x2d 0x002d #HYPHEN-MINUS ++0x2e 0x002e #FULL STOP ++0x2f 0x002f #SOLIDUS ++0x30 0x0030 #DIGIT ZERO ++0x31 0x0031 #DIGIT ONE ++0x32 0x0032 #DIGIT TWO ++0x33 0x0033 #DIGIT THREE ++0x34 0x0034 #DIGIT FOUR ++0x35 0x0035 #DIGIT FIVE ++0x36 0x0036 #DIGIT SIX ++0x37 0x0037 #DIGIT SEVEN ++0x38 0x0038 #DIGIT EIGHT ++0x39 0x0039 #DIGIT NINE ++0x3a 0x003a #COLON ++0x3b 0x003b #SEMICOLON ++0x3c 0x003c #LESS-THAN SIGN ++0x3d 0x003d #EQUALS SIGN ++0x3e 0x003e #GREATER-THAN SIGN ++0x3f 0x003f #QUESTION MARK ++0x40 0x0040 #COMMERCIAL AT ++0x41 0x0041 #LATIN CAPITAL LETTER A ++0x42 0x0042 #LATIN CAPITAL LETTER B ++0x43 0x0043 #LATIN CAPITAL LETTER C ++0x44 0x0044 #LATIN CAPITAL LETTER D ++0x45 0x0045 #LATIN CAPITAL LETTER E ++0x46 0x0046 #LATIN CAPITAL LETTER F ++0x47 0x0047 #LATIN CAPITAL LETTER G ++0x48 0x0048 #LATIN CAPITAL LETTER H ++0x49 0x0049 #LATIN CAPITAL LETTER I ++0x4a 0x004a #LATIN CAPITAL LETTER J ++0x4b 0x004b #LATIN CAPITAL LETTER K ++0x4c 0x004c #LATIN CAPITAL LETTER L ++0x4d 0x004d #LATIN CAPITAL LETTER M ++0x4e 0x004e #LATIN CAPITAL LETTER N ++0x4f 0x004f #LATIN CAPITAL LETTER O ++0x50 0x0050 #LATIN CAPITAL LETTER P ++0x51 0x0051 #LATIN CAPITAL LETTER Q ++0x52 0x0052 #LATIN CAPITAL LETTER R ++0x53 0x0053 #LATIN CAPITAL LETTER S ++0x54 0x0054 #LATIN CAPITAL LETTER T ++0x55 0x0055 #LATIN CAPITAL LETTER U ++0x56 0x0056 #LATIN CAPITAL LETTER V ++0x57 0x0057 #LATIN CAPITAL LETTER W ++0x58 0x0058 #LATIN CAPITAL LETTER X ++0x59 0x0059 #LATIN CAPITAL LETTER Y ++0x5a 0x005a #LATIN CAPITAL LETTER Z ++0x5b 0x005b #LEFT SQUARE BRACKET ++0x5c 0x005c #REVERSE SOLIDUS ++0x5d 0x005d #RIGHT SQUARE BRACKET ++0x5e 0x005e #CIRCUMFLEX ACCENT ++0x5f 0x005f #LOW LINE ++0x60 0x0060 #GRAVE ACCENT ++0x61 0x0061 #LATIN SMALL LETTER A ++0x62 0x0062 #LATIN SMALL LETTER B ++0x63 0x0063 #LATIN SMALL LETTER C ++0x64 0x0064 #LATIN SMALL LETTER D ++0x65 0x0065 #LATIN SMALL LETTER E ++0x66 0x0066 #LATIN SMALL LETTER F ++0x67 0x0067 #LATIN SMALL LETTER G ++0x68 0x0068 #LATIN SMALL LETTER H ++0x69 0x0069 #LATIN SMALL LETTER I ++0x6a 0x006a #LATIN SMALL LETTER J ++0x6b 0x006b #LATIN SMALL LETTER K ++0x6c 0x006c #LATIN SMALL LETTER L ++0x6d 0x006d #LATIN SMALL LETTER M ++0x6e 0x006e #LATIN SMALL LETTER N ++0x6f 0x006f #LATIN SMALL LETTER O ++0x70 0x0070 #LATIN SMALL LETTER P ++0x71 0x0071 #LATIN SMALL LETTER Q ++0x72 0x0072 #LATIN SMALL LETTER R ++0x73 0x0073 #LATIN SMALL LETTER S ++0x74 0x0074 #LATIN SMALL LETTER T ++0x75 0x0075 #LATIN SMALL LETTER U ++0x76 0x0076 #LATIN SMALL LETTER V ++0x77 0x0077 #LATIN SMALL LETTER W ++0x78 0x0078 #LATIN SMALL LETTER X ++0x79 0x0079 #LATIN SMALL LETTER Y ++0x7a 0x007a #LATIN SMALL LETTER Z ++0x7b 0x007b #LEFT CURLY BRACKET ++0x7c 0x007c #VERTICAL LINE ++0x7d 0x007d #RIGHT CURLY BRACKET ++0x7e 0x007e #TILDE ++0x7f 0x007f #DELETE ++0x80 0x00c7 #LATIN CAPITAL LETTER C WITH CEDILLA ++0x81 0x00fc #LATIN SMALL LETTER U WITH DIAERESIS ++0x82 0x00e9 #LATIN SMALL LETTER E WITH ACUTE ++0x83 0x00e2 #LATIN SMALL LETTER A WITH CIRCUMFLEX ++0x84 0x00e4 #LATIN SMALL LETTER A WITH DIAERESIS ++0x85 0x00e0 #LATIN SMALL LETTER A WITH GRAVE ++0x86 0x00e5 #LATIN SMALL LETTER A WITH RING ABOVE ++0x87 0x00e7 #LATIN SMALL LETTER C WITH CEDILLA ++0x88 0x00ea #LATIN SMALL LETTER E WITH CIRCUMFLEX ++0x89 0x00eb #LATIN SMALL LETTER E WITH DIAERESIS ++0x8a 0x00e8 #LATIN SMALL LETTER E WITH GRAVE ++0x8b 0x00ef #LATIN SMALL LETTER I WITH DIAERESIS ++0x8c 0x00ee #LATIN SMALL LETTER I WITH CIRCUMFLEX ++0x8d 0x0131 #LATIN SMALL LETTER DOTLESS I ++0x8e 0x00c4 #LATIN CAPITAL LETTER A WITH DIAERESIS ++0x8f 0x00c5 #LATIN CAPITAL LETTER A WITH RING ABOVE ++0x90 0x00c9 #LATIN CAPITAL LETTER E WITH ACUTE ++0x91 0x00e6 #LATIN SMALL LIGATURE AE ++0x92 0x00c6 #LATIN CAPITAL LIGATURE AE ++0x93 0x00f4 #LATIN SMALL LETTER O WITH CIRCUMFLEX ++0x94 0x00f6 #LATIN SMALL LETTER O WITH DIAERESIS ++0x95 0x00f2 #LATIN SMALL LETTER O WITH GRAVE ++0x96 0x00fb #LATIN SMALL LETTER U WITH CIRCUMFLEX ++0x97 0x00f9 #LATIN SMALL LETTER U WITH GRAVE ++0x98 0x0130 #LATIN CAPITAL LETTER I WITH DOT ABOVE ++0x99 0x00d6 #LATIN CAPITAL LETTER O WITH DIAERESIS ++0x9a 0x00dc #LATIN CAPITAL LETTER U WITH DIAERESIS ++0x9b 0x00f8 #LATIN SMALL LETTER O WITH STROKE ++0x9c 0x00a3 #POUND SIGN ++0x9d 0x00d8 #LATIN CAPITAL LETTER O WITH STROKE ++0x9e 0x015e #LATIN CAPITAL LETTER S WITH CEDILLA ++0x9f 0x015f #LATIN SMALL LETTER S WITH CEDILLA ++0xa0 0x00e1 #LATIN SMALL LETTER A WITH ACUTE ++0xa1 0x00ed #LATIN SMALL LETTER I WITH ACUTE ++0xa2 0x00f3 #LATIN SMALL LETTER O WITH ACUTE ++0xa3 0x00fa #LATIN SMALL LETTER U WITH ACUTE ++0xa4 0x00f1 #LATIN SMALL LETTER N WITH TILDE ++0xa5 0x00d1 #LATIN CAPITAL LETTER N WITH TILDE ++0xa6 0x011e #LATIN CAPITAL LETTER G WITH BREVE ++0xa7 0x011f #LATIN SMALL LETTER G WITH BREVE ++0xa8 0x00bf #INVERTED QUESTION MARK ++0xa9 0x00ae #REGISTERED SIGN ++0xaa 0x00ac #NOT SIGN ++0xab 0x00bd #VULGAR FRACTION ONE HALF ++0xac 0x00bc #VULGAR FRACTION ONE QUARTER ++0xad 0x00a1 #INVERTED EXCLAMATION MARK ++0xae 0x00ab #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xaf 0x00bb #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xb0 0x2591 #LIGHT SHADE ++0xb1 0x2592 #MEDIUM SHADE ++0xb2 0x2593 #DARK SHADE ++0xb3 0x2502 #BOX DRAWINGS LIGHT VERTICAL ++0xb4 0x2524 #BOX DRAWINGS LIGHT VERTICAL AND LEFT ++0xb5 0x00c1 #LATIN CAPITAL LETTER A WITH ACUTE ++0xb6 0x00c2 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX ++0xb7 0x00c0 #LATIN CAPITAL LETTER A WITH GRAVE ++0xb8 0x00a9 #COPYRIGHT SIGN ++0xb9 0x2563 #BOX DRAWINGS DOUBLE VERTICAL AND LEFT ++0xba 0x2551 #BOX DRAWINGS DOUBLE VERTICAL ++0xbb 0x2557 #BOX DRAWINGS DOUBLE DOWN AND LEFT ++0xbc 0x255d #BOX DRAWINGS DOUBLE UP AND LEFT ++0xbd 0x00a2 #CENT SIGN ++0xbe 0x00a5 #YEN SIGN ++0xbf 0x2510 #BOX DRAWINGS LIGHT DOWN AND LEFT ++0xc0 0x2514 #BOX DRAWINGS LIGHT UP AND RIGHT ++0xc1 0x2534 #BOX DRAWINGS LIGHT UP AND HORIZONTAL ++0xc2 0x252c #BOX DRAWINGS LIGHT DOWN AND HORIZONTAL ++0xc3 0x251c #BOX DRAWINGS LIGHT VERTICAL AND RIGHT ++0xc4 0x2500 #BOX DRAWINGS LIGHT HORIZONTAL ++0xc5 0x253c #BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL ++0xc6 0x00e3 #LATIN SMALL LETTER A WITH TILDE ++0xc7 0x00c3 #LATIN CAPITAL LETTER A WITH TILDE ++0xc8 0x255a #BOX DRAWINGS DOUBLE UP AND RIGHT ++0xc9 0x2554 #BOX DRAWINGS DOUBLE DOWN AND RIGHT ++0xca 0x2569 #BOX DRAWINGS DOUBLE UP AND HORIZONTAL ++0xcb 0x2566 #BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL ++0xcc 0x2560 #BOX DRAWINGS DOUBLE VERTICAL AND RIGHT ++0xcd 0x2550 #BOX DRAWINGS DOUBLE HORIZONTAL ++0xce 0x256c #BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL ++0xcf 0x00a4 #CURRENCY SIGN ++0xd0 0x00ba #MASCULINE ORDINAL INDICATOR ++0xd1 0x00aa #FEMININE ORDINAL INDICATOR ++0xd2 0x00ca #LATIN CAPITAL LETTER E WITH CIRCUMFLEX ++0xd3 0x00cb #LATIN CAPITAL LETTER E WITH DIAERESIS ++0xd4 0x00c8 #LATIN CAPITAL LETTER E WITH GRAVE ++0xd5 0x0131 #LATIN SMALL LETTER DOTLESS I ++0xd6 0x00cd #LATIN CAPITAL LETTER I WITH ACUTE ++0xd7 0x00ce #LATIN CAPITAL LETTER I WITH CIRCUMFLEX ++0xd8 0x00cf #LATIN CAPITAL LETTER I WITH DIAERESIS ++0xd9 0x2518 #BOX DRAWINGS LIGHT UP AND LEFT ++0xda 0x250c #BOX DRAWINGS LIGHT DOWN AND RIGHT ++0xdb 0x2588 #FULL BLOCK ++0xdc 0x2584 #LOWER HALF BLOCK ++0xdd 0x00a6 #BROKEN BAR ++0xde 0x00cc #LATIN CAPITAL LETTER I WITH GRAVE ++0xdf 0x2580 #UPPER HALF BLOCK ++0xe0 0x00d3 #LATIN CAPITAL LETTER O WITH ACUTE ++0xe1 0x00df #LATIN SMALL LETTER SHARP S ++0xe2 0x00d4 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX ++0xe3 0x00d2 #LATIN CAPITAL LETTER O WITH GRAVE ++0xe4 0x00f5 #LATIN SMALL LETTER O WITH TILDE ++0xe5 0x00d5 #LATIN CAPITAL LETTER O WITH TILDE ++0xe6 0x00b5 #MICRO SIGN ++0xe7 0x00fe #LATIN SMALL LETTER THORN ++0xe8 0x00d7 #MULTIPLICATION SIGN ++0xe9 0x00da #LATIN CAPITAL LETTER U WITH ACUTE ++0xea 0x00db #LATIN CAPITAL LETTER U WITH CIRCUMFLEX ++0xeb 0x00d9 #LATIN CAPITAL LETTER U WITH GRAVE ++0xec 0x00ec #LATIN SMALL LETTER I WITH GRAVE ++0xed 0x00ff #LATIN SMALL LETTER Y WITH DIARESIS ++0xee 0x00af #MACRON ++0xef 0x00b4 #ACUTE ACCENT ++0xf0 0x00ad #SOFT HYPHEN ++0xf1 0x00b1 #PLUS-MINUS SIGN ++0xf2 0x2017 #DOUBLE LOW LINE ++0xf3 0x00be #VULGAR FRACTION THREE QUARTERS ++0xf4 0x00b6 #PILCROW SIGN ++0xf5 0x00a7 #SECTION SIGN ++0xf6 0x00f7 #DIVISION SIGN ++0xf7 0x00b8 #CEDILLA ++0xf8 0x00b0 #DEGREE SIGN ++0xf9 0x00a8 #DIAERESIS ++0xfa 0x00b7 #MIDDLE DOT ++0xfb 0x00b9 #SUPERSCRIPT ONE ++0xfc 0x00b3 #SUPERSCRIPT THREE ++0xfd 0x00b2 #SUPERSCRIPT TWO ++0xfe 0x25a0 #BLACK SQUARE ++0xff 0x00a0 #NO-BREAK SPACE +diff -urN samba-2.0.10/source/codepages/CP862.TXT samba-2.2.9/source/codepages/CP862.TXT +--- samba-2.0.10/source/codepages/CP862.TXT 1970-01-01 01:00:00.000000000 +0100 ++++ samba-2.2.9/source/codepages/CP862.TXT 2004-05-08 03:07:19.000000000 +0200 +@@ -0,0 +1,270 @@ ++# ++# Name: cp862_Hewbrew to Unicode table ++# Unicode version: 2.0 ++# Table version: 2.00 ++# Table format: Format A ++# Date: 02/14/02 ++# Authors: Alexander Bokovoy ++# General notes: generated from /usr/share/i18n/charmaps/IBM862 ++# ++# Format: Three tab-separated columns ++# Column #1 is the cp862_Hewbrew code (in hex) ++# Column #2 is the Unicode (in hex as 0xXXXX) ++# Column #3 is the Unicode name (follows a comment sign, '#') ++# ++0x00 0x0000 # NULL (NUL) ++0x01 0x0001 # START OF HEADING (SOH) ++0x02 0x0002 # START OF TEXT (STX) ++0x03 0x0003 # END OF TEXT (ETX) ++0x04 0x0004 # END OF TRANSMISSION (EOT) ++0x05 0x0005 # ENQUIRY (ENQ) ++0x06 0x0006 # ACKNOWLEDGE (ACK) ++0x07 0x0007 # BELL (BEL) ++0x08 0x0008 # BACKSPACE (BS) ++0x09 0x0009 # CHARACTER TABULATION (HT) ++0x0a 0x000A # LINE FEED (LF) ++0x0b 0x000B # LINE TABULATION (VT) ++0x0c 0x000C # FORM FEED (FF) ++0x0d 0x000D # CARRIAGE RETURN (CR) ++0x0e 0x000E # SHIFT OUT (SO) ++0x0f 0x000F # SHIFT IN (SI) ++0x10 0x0010 # DATALINK ESCAPE (DLE) ++0x11 0x0011 # DEVICE CONTROL ONE (DC1) ++0x12 0x0012 # DEVICE CONTROL TWO (DC2) ++0x13 0x0013 # DEVICE CONTROL THREE (DC3) ++0x14 0x0014 # DEVICE CONTROL FOUR (DC4) ++0x15 0x0015 # NEGATIVE ACKNOWLEDGE (NAK) ++0x16 0x0016 # SYNCHRONOUS IDLE (SYN) ++0x17 0x0017 # END OF TRANSMISSION BLOCK (ETB) ++0x18 0x0018 # CANCEL (CAN) ++0x19 0x0019 # END OF MEDIUM (EM) ++0x1a 0x001A # SUBSTITUTE (SUB) ++0x1b 0x001B # ESCAPE (ESC) ++0x1c 0x001C # FILE SEPARATOR (IS4) ++0x1d 0x001D # GROUP SEPARATOR (IS3) ++0x1e 0x001E # RECORD SEPARATOR (IS2) ++0x1f 0x001F # UNIT SEPARATOR (IS1) ++0x20 0x0020 # SPACE ++0x21 0x0021 # EXCLAMATION MARK ++0x22 0x0022 # QUOTATION MARK ++0x23 0x0023 # NUMBER SIGN ++0x24 0x0024 # DOLLAR SIGN ++0x25 0x0025 # PERCENT SIGN ++0x26 0x0026 # AMPERSAND ++0x27 0x0027 # APOSTROPHE ++0x28 0x0028 # LEFT PARENTHESIS ++0x29 0x0029 # RIGHT PARENTHESIS ++0x2a 0x002A # ASTERISK ++0x2b 0x002B # PLUS SIGN ++0x2c 0x002C # COMMA ++0x2d 0x002D # HYPHEN-MINUS ++0x2e 0x002E # FULL STOP ++0x2f 0x002F # SOLIDUS ++0x30 0x0030 # DIGIT ZERO ++0x31 0x0031 # DIGIT ONE ++0x32 0x0032 # DIGIT TWO ++0x33 0x0033 # DIGIT THREE ++0x34 0x0034 # DIGIT FOUR ++0x35 0x0035 # DIGIT FIVE ++0x36 0x0036 # DIGIT SIX ++0x37 0x0037 # DIGIT SEVEN ++0x38 0x0038 # DIGIT EIGHT ++0x39 0x0039 # DIGIT NINE ++0x3a 0x003A # COLON ++0x3b 0x003B # SEMICOLON ++0x3c 0x003C # LESS-THAN SIGN ++0x3d 0x003D # EQUALS SIGN ++0x3e 0x003E # GREATER-THAN SIGN ++0x3f 0x003F # QUESTION MARK ++0x40 0x0040 # COMMERCIAL AT ++0x41 0x0041 # LATIN CAPITAL LETTER A ++0x42 0x0042 # LATIN CAPITAL LETTER B ++0x43 0x0043 # LATIN CAPITAL LETTER C ++0x44 0x0044 # LATIN CAPITAL LETTER D ++0x45 0x0045 # LATIN CAPITAL LETTER E ++0x46 0x0046 # LATIN CAPITAL LETTER F ++0x47 0x0047 # LATIN CAPITAL LETTER G ++0x48 0x0048 # LATIN CAPITAL LETTER H ++0x49 0x0049 # LATIN CAPITAL LETTER I ++0x4a 0x004A # LATIN CAPITAL LETTER J ++0x4b 0x004B # LATIN CAPITAL LETTER K ++0x4c 0x004C # LATIN CAPITAL LETTER L ++0x4d 0x004D # LATIN CAPITAL LETTER M ++0x4e 0x004E # LATIN CAPITAL LETTER N ++0x4f 0x004F # LATIN CAPITAL LETTER O ++0x50 0x0050 # LATIN CAPITAL LETTER P ++0x51 0x0051 # LATIN CAPITAL LETTER Q ++0x52 0x0052 # LATIN CAPITAL LETTER R ++0x53 0x0053 # LATIN CAPITAL LETTER S ++0x54 0x0054 # LATIN CAPITAL LETTER T ++0x55 0x0055 # LATIN CAPITAL LETTER U ++0x56 0x0056 # LATIN CAPITAL LETTER V ++0x57 0x0057 # LATIN CAPITAL LETTER W ++0x58 0x0058 # LATIN CAPITAL LETTER X ++0x59 0x0059 # LATIN CAPITAL LETTER Y ++0x5a 0x005A # LATIN CAPITAL LETTER Z ++0x5b 0x005B # LEFT SQUARE BRACKET ++0x5c 0x005C # REVERSE SOLIDUS ++0x5d 0x005D # RIGHT SQUARE BRACKET ++0x5e 0x005E # CIRCUMFLEX ACCENT ++0x5f 0x005F # LOW LINE ++0x60 0x0060 # GRAVE ACCENT ++0x61 0x0061 # LATIN SMALL LETTER A ++0x62 0x0062 # LATIN SMALL LETTER B ++0x63 0x0063 # LATIN SMALL LETTER C ++0x64 0x0064 # LATIN SMALL LETTER D ++0x65 0x0065 # LATIN SMALL LETTER E ++0x66 0x0066 # LATIN SMALL LETTER F ++0x67 0x0067 # LATIN SMALL LETTER G ++0x68 0x0068 # LATIN SMALL LETTER H ++0x69 0x0069 # LATIN SMALL LETTER I ++0x6a 0x006A # LATIN SMALL LETTER J ++0x6b 0x006B # LATIN SMALL LETTER K ++0x6c 0x006C # LATIN SMALL LETTER L ++0x6d 0x006D # LATIN SMALL LETTER M ++0x6e 0x006E # LATIN SMALL LETTER N ++0x6f 0x006F # LATIN SMALL LETTER O ++0x70 0x0070 # LATIN SMALL LETTER P ++0x71 0x0071 # LATIN SMALL LETTER Q ++0x72 0x0072 # LATIN SMALL LETTER R ++0x73 0x0073 # LATIN SMALL LETTER S ++0x74 0x0074 # LATIN SMALL LETTER T ++0x75 0x0075 # LATIN SMALL LETTER U ++0x76 0x0076 # LATIN SMALL LETTER V ++0x77 0x0077 # LATIN SMALL LETTER W ++0x78 0x0078 # LATIN SMALL LETTER X ++0x79 0x0079 # LATIN SMALL LETTER Y ++0x7a 0x007A # LATIN SMALL LETTER Z ++0x7b 0x007B # LEFT CURLY BRACKET ++0x7c 0x007C # VERTICAL LINE ++0x7d 0x007D # RIGHT CURLY BRACKET ++0x7e 0x007E # TILDE ++0x7f 0x007F # DELETE (DEL) ++0x80 0x05D0 # HEBREW LETTER ALEF ++0x81 0x05D1 # HEBREW LETTER BET ++0x82 0x05D2 # HEBREW LETTER GIMEL ++0x83 0x05D3 # HEBREW LETTER DALET ++0x84 0x05D4 # HEBREW LETTER HE ++0x85 0x05D5 # HEBREW LETTER VAV ++0x86 0x05D6 # HEBREW LETTER ZAYIN ++0x87 0x05D7 # HEBREW LETTER HET ++0x88 0x05D8 # HEBREW LETTER TET ++0x89 0x05D9 # HEBREW LETTER YOD ++0x8a 0x05DA # HEBREW LETTER FINAL KAF ++0x8b 0x05DB # HEBREW LETTER KAF ++0x8c 0x05DC # HEBREW LETTER LAMED ++0x8d 0x05DD # HEBREW LETTER FINAL MEM ++0x8e 0x05DE # HEBREW LETTER MEM ++0x8f 0x05DF # HEBREW LETTER FINAL NUN ++0x90 0x05E0 # HEBREW LETTER NUN ++0x91 0x05E1 # HEBREW LETTER SAMEKH ++0x92 0x05E2 # HEBREW LETTER AYIN ++0x93 0x05E3 # HEBREW LETTER FINAL PE ++0x94 0x05E4 # HEBREW LETTER PE ++0x95 0x05E5 # HEBREW LETTER FINAL TSADI ++0x96 0x05E6 # HEBREW LETTER TSADI ++0x97 0x05E7 # HEBREW LETTER QOF ++0x98 0x05E8 # HEBREW LETTER RESH ++0x99 0x05E9 # HEBREW LETTER SHIN ++0x9a 0x05EA # HEBREW LETTER TAV ++0x9b 0x00A2 # CENT SIGN ++0x9c 0x00A3 # POUND SIGN ++0x9d 0x00A5 # YEN SIGN ++0x9e 0x20A7 # PESETA SIGN ++0x9f 0x0192 # LATIN SMALL LETTER F WITH HOOK ++0xa0 0x00E1 # LATIN SMALL LETTER A WITH ACUTE ++0xa1 0x00ED # LATIN SMALL LETTER I WITH ACUTE ++0xa2 0x00F3 # LATIN SMALL LETTER O WITH ACUTE ++0xa3 0x00FA # LATIN SMALL LETTER U WITH ACUTE ++0xa4 0x00F1 # LATIN SMALL LETTER N WITH TILDE ++0xa5 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE ++0xa6 0x00AA # FEMININE ORDINAL INDICATOR ++0xa7 0x00BA # MASCULINE ORDINAL INDICATOR ++0xa8 0x00BF # INVERTED QUESTION MARK ++0xa9 0x2310 # REVERSED NOT SIGN ++0xaa 0x00AC # NOT SIGN ++0xab 0x00BD # VULGAR FRACTION ONE HALF ++0xac 0x00BC # VULGAR FRACTION ONE QUARTER ++0xad 0x00A1 # INVERTED EXCLAMATION MARK ++0xae 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xaf 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK ++0xb0 0x2591 # LIGHT SHADE ++0xb1 0x2592 # MEDIUM SHADE ++0xb2 0x2593 # DARK SHADE ++0xb3 0x2502 # BOX DRAWINGS LIGHT VERTICAL ++0xb4 0x2524 # BOX DRAWINGS LIGHT VERTICAL AND LEFT ++0xb5 0x2561 # BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE ++0xb6 0x2562 # BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE ++0xb7 0x2556 # BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE ++0xb8 0x2555 # BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE ++0xb9 0x2563 # BOX DRAWINGS DOUBLE VERTICAL AND LEFT ++0xba 0x2551 # BOX DRAWINGS DOUBLE VERTICAL ++0xbb 0x2557 # BOX DRAWINGS DOUBLE DOWN AND LEFT ++0xbc 0x255D # BOX DRAWINGS DOUBLE UP AND LEFT ++0xbd 0x255C # BOX DRAWINGS UP DOUBLE AND LEFT SINGLE ++0xbe 0x255B # BOX DRAWINGS UP SINGLE AND LEFT DOUBLE ++0xbf 0x2510 # BOX DRAWINGS LIGHT DOWN AND LEFT ++0xc0 0x2514 # BOX DRAWINGS LIGHT UP AND RIGHT ++0xc1 0x2534 # BOX DRAWINGS LIGHT UP AND HORIZONTAL ++0xc2 0x252C # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL ++0xc3 0x251C # BOX DRAWINGS LIGHT VERTICAL AND RIGHT ++0xc4 0x2500 # BOX DRAWINGS LIGHT HORIZONTAL ++0xc5 0x253C # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL ++0xc6 0x255E # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE ++0xc7 0x255F # BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE ++0xc8 0x255A # BOX DRAWINGS DOUBLE UP AND RIGHT ++0xc9 0x2554 # BOX DRAWINGS DOUBLE DOWN AND RIGHT ++0xca 0x2569 # BOX DRAWINGS DOUBLE UP AND HORIZONTAL ++0xcb 0x2566 # BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL ++0xcc 0x2560 # BOX DRAWINGS DOUBLE VERTICAL AND RIGHT ++0xcd 0x2550 # BOX DRAWINGS DOUBLE HORIZONTAL ++0xce 0x256C # BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL ++0xcf 0x2567 # BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE ++0xd0 0x2568 # BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE ++0xd1 0x2564 # BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE ++0xd2 0x2565 # BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE ++0xd3 0x2559 # BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE ++0xd4 0x2558 # BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE ++0xd5 0x2552 # BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE ++0xd6 0x2553 # BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE ++0xd7 0x256B # BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE ++0xd8 0x256A # BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE ++0xd9 0x2518 # BOX DRAWINGS LIGHT UP AND LEFT ++0xda 0x250C # BOX DRAWINGS LIGHT DOWN AND RIGHT ++0xdb 0x2588 # FULL BLOCK ++0xdc 0x2584 # LOWER HALF BLOCK ++0xdd 0x258C # LEFT HALF BLOCK ++0xde 0x2590 # RIGHT HALF BLOCK ++0xdf 0x2580 # UPPER HALF BLOCK ++0xe0 0x03B1 # GREEK SMALL LETTER ALPHA ++0xe1 0x00DF # LATIN SMALL LETTER SHARP S (German) ++0xe2 0x0393 # GREEK CAPITAL LETTER GAMMA ++0xe3 0x03C0 # GREEK SMALL LETTER PI ++0xe4 0x03A3 # GREEK CAPITAL LETTER SIGMA ++0xe5 0x03C3 # GREEK SMALL LETTER SIGMA ++0xe6 0x00B5 # MICRO SIGN ++0xe7 0x03C4 # GREEK SMALL LETTER TAU ++0xe8 0x03A6 # GREEK CAPITAL LETTER PHI ++0xe9 0x0398 # GREEK CAPITAL LETTER THETA ++0xea 0x03A9 # GREEK CAPITAL LETTER OMEGA ++0xeb 0x03B4 # GREEK SMALL LETTER DELTA ++0xec 0x221E # INFINITY ++0xed 0x03C6 # GREEK SMALL LETTER PHI ++0xee 0x03B5 # GREEK SMALL LETTER EPSILON ++0xef 0x2229 # INTERSECTION ++0xf0 0x2261 # IDENTICAL TO ++0xf1 0x00B1 # PLUS-MINUS SIGN ++0xf2 0x2265 # GREATER-THAN OR EQUAL TO ++0xf3 0x2264 # LESS-THAN OR EQUAL TO ++0xf4 0x2320 # TOP HALF INTEGRAL ++0xf5 0x2321 # BOTTOM HALF INTEGRAL ++0xf6 0x00F7 # DIVISION SIGN ++0xf7 0x2248 # ALMOST EQUAL TO ++0xf8 0x00B0 # DEGREE SIGN ++0xf9 0x2219 # BULLET OPERATOR ++0xfa 0x00B7 # MIDDLE DOT ++0xfb 0x221A # SQUARE ROOT ++0xfc 0x207F # SUPERSCRIPT LATIN SMALL LETTER N ++0xfd 0x00B2 # SUPERSCRIPT TWO ++0xfe 0x25A0 # BLACK SQUARE ++0xff 0x00A0 # NO-BREAK SPACE +diff -urN samba-2.0.10/source/codepages/CP932.TXT samba-2.2.9/source/codepages/CP932.TXT +--- samba-2.0.10/source/codepages/CP932.TXT 2000-04-04 00:46:18.000000000 +0200 ++++ samba-2.2.9/source/codepages/CP932.TXT 2004-05-08 03:07:21.000000000 +0200 +@@ -7613,6 +7613,1886 @@ + 0xEEFA 0xFFE4 #FULLWIDTH BROKEN BAR + 0xEEFB 0xFF07 #FULLWIDTH APOSTROPHE + 0xEEFC 0xFF02 #FULLWIDTH QUOTATION MARK ++0xF040 0xE000 #USER DEFINED CHAR ++0xF041 0xE001 #USER DEFINED CHAR ++0xF042 0xE002 #USER DEFINED CHAR ++0xF043 0xE003 #USER DEFINED CHAR ++0xF044 0xE004 #USER DEFINED CHAR ++0xF045 0xE005 #USER DEFINED CHAR ++0xF046 0xE006 #USER DEFINED CHAR ++0xF047 0xE007 #USER DEFINED CHAR ++0xF048 0xE008 #USER DEFINED CHAR ++0xF049 0xE009 #USER DEFINED CHAR ++0xF04A 0xE00A #USER DEFINED CHAR ++0xF04B 0xE00B #USER DEFINED CHAR ++0xF04C 0xE00C #USER DEFINED CHAR ++0xF04D 0xE00D #USER DEFINED CHAR ++0xF04E 0xE00E #USER DEFINED CHAR ++0xF04F 0xE00F #USER DEFINED CHAR ++0xF050 0xE010 #USER DEFINED CHAR ++0xF051 0xE011 #USER DEFINED CHAR ++0xF052 0xE012 #USER DEFINED CHAR ++0xF053 0xE013 #USER DEFINED CHAR ++0xF054 0xE014 #USER DEFINED CHAR ++0xF055 0xE015 #USER DEFINED CHAR ++0xF056 0xE016 #USER DEFINED CHAR ++0xF057 0xE017 #USER DEFINED CHAR ++0xF058 0xE018 #USER DEFINED CHAR ++0xF059 0xE019 #USER DEFINED CHAR ++0xF05A 0xE01A #USER DEFINED CHAR ++0xF05B 0xE01B #USER DEFINED CHAR ++0xF05C 0xE01C #USER DEFINED CHAR ++0xF05D 0xE01D #USER DEFINED CHAR ++0xF05E 0xE01E #USER DEFINED CHAR ++0xF05F 0xE01F #USER DEFINED CHAR ++0xF060 0xE020 #USER DEFINED CHAR ++0xF061 0xE021 #USER DEFINED CHAR ++0xF062 0xE022 #USER DEFINED CHAR ++0xF063 0xE023 #USER DEFINED CHAR ++0xF064 0xE024 #USER DEFINED CHAR ++0xF065 0xE025 #USER DEFINED CHAR ++0xF066 0xE026 #USER DEFINED CHAR ++0xF067 0xE027 #USER DEFINED CHAR ++0xF068 0xE028 #USER DEFINED CHAR ++0xF069 0xE029 #USER DEFINED CHAR ++0xF06A 0xE02A #USER DEFINED CHAR ++0xF06B 0xE02B #USER DEFINED CHAR ++0xF06C 0xE02C #USER DEFINED CHAR ++0xF06D 0xE02D #USER DEFINED CHAR ++0xF06E 0xE02E #USER DEFINED CHAR ++0xF06F 0xE02F #USER DEFINED CHAR ++0xF070 0xE030 #USER DEFINED CHAR ++0xF071 0xE031 #USER DEFINED CHAR ++0xF072 0xE032 #USER DEFINED CHAR ++0xF073 0xE033 #USER DEFINED CHAR ++0xF074 0xE034 #USER DEFINED CHAR ++0xF075 0xE035 #USER DEFINED CHAR ++0xF076 0xE036 #USER DEFINED CHAR ++0xF077 0xE037 #USER DEFINED CHAR ++0xF078 0xE038 #USER DEFINED CHAR ++0xF079 0xE039 #USER DEFINED CHAR ++0xF07A 0xE03A #USER DEFINED CHAR ++0xF07B 0xE03B #USER DEFINED CHAR ++0xF07C 0xE03C #USER DEFINED CHAR ++0xF07D 0xE03D #USER DEFINED CHAR ++0xF07E 0xE03E #USER DEFINED CHAR ++0xF080 0xE03F #USER DEFINED CHAR ++0xF081 0xE040 #USER DEFINED CHAR ++0xF082 0xE041 #USER DEFINED CHAR ++0xF083 0xE042 #USER DEFINED CHAR ++0xF084 0xE043 #USER DEFINED CHAR ++0xF085 0xE044 #USER DEFINED CHAR ++0xF086 0xE045 #USER DEFINED CHAR ++0xF087 0xE046 #USER DEFINED CHAR ++0xF088 0xE047 #USER DEFINED CHAR ++0xF089 0xE048 #USER DEFINED CHAR ++0xF08A 0xE049 #USER DEFINED CHAR ++0xF08B 0xE04A #USER DEFINED CHAR ++0xF08C 0xE04B #USER DEFINED CHAR ++0xF08D 0xE04C #USER DEFINED CHAR ++0xF08E 0xE04D #USER DEFINED CHAR ++0xF08F 0xE04E #USER DEFINED CHAR ++0xF090 0xE04F #USER DEFINED CHAR ++0xF091 0xE050 #USER DEFINED CHAR ++0xF092 0xE051 #USER DEFINED CHAR ++0xF093 0xE052 #USER DEFINED CHAR ++0xF094 0xE053 #USER DEFINED CHAR ++0xF095 0xE054 #USER DEFINED CHAR ++0xF096 0xE055 #USER DEFINED CHAR ++0xF097 0xE056 #USER DEFINED CHAR ++0xF098 0xE057 #USER DEFINED CHAR ++0xF099 0xE058 #USER DEFINED CHAR ++0xF09A 0xE059 #USER DEFINED CHAR ++0xF09B 0xE05A #USER DEFINED CHAR ++0xF09C 0xE05B #USER DEFINED CHAR ++0xF09D 0xE05C #USER DEFINED CHAR ++0xF09E 0xE05D #USER DEFINED CHAR ++0xF09F 0xE05E #USER DEFINED CHAR ++0xF0A0 0xE05F #USER DEFINED CHAR ++0xF0A1 0xE060 #USER DEFINED CHAR ++0xF0A2 0xE061 #USER DEFINED CHAR ++0xF0A3 0xE062 #USER DEFINED CHAR ++0xF0A4 0xE063 #USER DEFINED CHAR ++0xF0A5 0xE064 #USER DEFINED CHAR ++0xF0A6 0xE065 #USER DEFINED CHAR ++0xF0A7 0xE066 #USER DEFINED CHAR ++0xF0A8 0xE067 #USER DEFINED CHAR ++0xF0A9 0xE068 #USER DEFINED CHAR ++0xF0AA 0xE069 #USER DEFINED CHAR ++0xF0AB 0xE06A #USER DEFINED CHAR ++0xF0AC 0xE06B #USER DEFINED CHAR ++0xF0AD 0xE06C #USER DEFINED CHAR ++0xF0AE 0xE06D #USER DEFINED CHAR ++0xF0AF 0xE06E #USER DEFINED CHAR ++0xF0B0 0xE06F #USER DEFINED CHAR ++0xF0B1 0xE070 #USER DEFINED CHAR ++0xF0B2 0xE071 #USER DEFINED CHAR ++0xF0B3 0xE072 #USER DEFINED CHAR ++0xF0B4 0xE073 #USER DEFINED CHAR ++0xF0B5 0xE074 #USER DEFINED CHAR ++0xF0B6 0xE075 #USER DEFINED CHAR ++0xF0B7 0xE076 #USER DEFINED CHAR ++0xF0B8 0xE077 #USER DEFINED CHAR ++0xF0B9 0xE078 #USER DEFINED CHAR ++0xF0BA 0xE079 #USER DEFINED CHAR ++0xF0BB 0xE07A #USER DEFINED CHAR ++0xF0BC 0xE07B #USER DEFINED CHAR ++0xF0BD 0xE07C #USER DEFINED CHAR ++0xF0BE 0xE07D #USER DEFINED CHAR ++0xF0BF 0xE07E #USER DEFINED CHAR ++0xF0C0 0xE07F #USER DEFINED CHAR ++0xF0C1 0xE080 #USER DEFINED CHAR ++0xF0C2 0xE081 #USER DEFINED CHAR ++0xF0C3 0xE082 #USER DEFINED CHAR ++0xF0C4 0xE083 #USER DEFINED CHAR ++0xF0C5 0xE084 #USER DEFINED CHAR ++0xF0C6 0xE085 #USER DEFINED CHAR ++0xF0C7 0xE086 #USER DEFINED CHAR ++0xF0C8 0xE087 #USER DEFINED CHAR ++0xF0C9 0xE088 #USER DEFINED CHAR ++0xF0CA 0xE089 #USER DEFINED CHAR ++0xF0CB 0xE08A #USER DEFINED CHAR ++0xF0CC 0xE08B #USER DEFINED CHAR ++0xF0CD 0xE08C #USER DEFINED CHAR ++0xF0CE 0xE08D #USER DEFINED CHAR ++0xF0CF 0xE08E #USER DEFINED CHAR ++0xF0D0 0xE08F #USER DEFINED CHAR ++0xF0D1 0xE090 #USER DEFINED CHAR ++0xF0D2 0xE091 #USER DEFINED CHAR ++0xF0D3 0xE092 #USER DEFINED CHAR ++0xF0D4 0xE093 #USER DEFINED CHAR ++0xF0D5 0xE094 #USER DEFINED CHAR ++0xF0D6 0xE095 #USER DEFINED CHAR ++0xF0D7 0xE096 #USER DEFINED CHAR ++0xF0D8 0xE097 #USER DEFINED CHAR ++0xF0D9 0xE098 #USER DEFINED CHAR ++0xF0DA 0xE099 #USER DEFINED CHAR ++0xF0DB 0xE09A #USER DEFINED CHAR ++0xF0DC 0xE09B #USER DEFINED CHAR ++0xF0DD 0xE09C #USER DEFINED CHAR ++0xF0DE 0xE09D #USER DEFINED CHAR ++0xF0DF 0xE09E #USER DEFINED CHAR ++0xF0E0 0xE09F #USER DEFINED CHAR ++0xF0E1 0xE0A0 #USER DEFINED CHAR ++0xF0E2 0xE0A1 #USER DEFINED CHAR ++0xF0E3 0xE0A2 #USER DEFINED CHAR ++0xF0E4 0xE0A3 #USER DEFINED CHAR ++0xF0E5 0xE0A4 #USER DEFINED CHAR ++0xF0E6 0xE0A5 #USER DEFINED CHAR ++0xF0E7 0xE0A6 #USER DEFINED CHAR ++0xF0E8 0xE0A7 #USER DEFINED CHAR ++0xF0E9 0xE0A8 #USER DEFINED CHAR ++0xF0EA 0xE0A9 #USER DEFINED CHAR ++0xF0EB 0xE0AA #USER DEFINED CHAR ++0xF0EC 0xE0AB #USER DEFINED CHAR ++0xF0ED 0xE0AC #USER DEFINED CHAR ++0xF0EE 0xE0AD #USER DEFINED CHAR ++0xF0EF 0xE0AE #USER DEFINED CHAR ++0xF0F0 0xE0AF #USER DEFINED CHAR ++0xF0F1 0xE0B0 #USER DEFINED CHAR ++0xF0F2 0xE0B1 #USER DEFINED CHAR ++0xF0F3 0xE0B2 #USER DEFINED CHAR ++0xF0F4 0xE0B3 #USER DEFINED CHAR ++0xF0F5 0xE0B4 #USER DEFINED CHAR ++0xF0F6 0xE0B5 #USER DEFINED CHAR ++0xF0F7 0xE0B6 #USER DEFINED CHAR ++0xF0F8 0xE0B7 #USER DEFINED CHAR ++0xF0F9 0xE0B8 #USER DEFINED CHAR ++0xF0FA 0xE0B9 #USER DEFINED CHAR ++0xF0FB 0xE0BA #USER DEFINED CHAR ++0xF0FC 0xE0BB #USER DEFINED CHAR ++0xF140 0xE0BC #USER DEFINED CHAR ++0xF141 0xE0BD #USER DEFINED CHAR ++0xF142 0xE0BE #USER DEFINED CHAR ++0xF143 0xE0BF #USER DEFINED CHAR ++0xF144 0xE0C0 #USER DEFINED CHAR ++0xF145 0xE0C1 #USER DEFINED CHAR ++0xF146 0xE0C2 #USER DEFINED CHAR ++0xF147 0xE0C3 #USER DEFINED CHAR ++0xF148 0xE0C4 #USER DEFINED CHAR ++0xF149 0xE0C5 #USER DEFINED CHAR ++0xF14A 0xE0C6 #USER DEFINED CHAR ++0xF14B 0xE0C7 #USER DEFINED CHAR ++0xF14C 0xE0C8 #USER DEFINED CHAR ++0xF14D 0xE0C9 #USER DEFINED CHAR ++0xF14E 0xE0CA #USER DEFINED CHAR ++0xF14F 0xE0CB #USER DEFINED CHAR ++0xF150 0xE0CC #USER DEFINED CHAR ++0xF151 0xE0CD #USER DEFINED CHAR ++0xF152 0xE0CE #USER DEFINED CHAR ++0xF153 0xE0CF #USER DEFINED CHAR ++0xF154 0xE0D0 #USER DEFINED CHAR ++0xF155 0xE0D1 #USER DEFINED CHAR ++0xF156 0xE0D2 #USER DEFINED CHAR ++0xF157 0xE0D3 #USER DEFINED CHAR ++0xF158 0xE0D4 #USER DEFINED CHAR ++0xF159 0xE0D5 #USER DEFINED CHAR ++0xF15A 0xE0D6 #USER DEFINED CHAR ++0xF15B 0xE0D7 #USER DEFINED CHAR ++0xF15C 0xE0D8 #USER DEFINED CHAR ++0xF15D 0xE0D9 #USER DEFINED CHAR ++0xF15E 0xE0DA #USER DEFINED CHAR ++0xF15F 0xE0DB #USER DEFINED CHAR ++0xF160 0xE0DC #USER DEFINED CHAR ++0xF161 0xE0DD #USER DEFINED CHAR ++0xF162 0xE0DE #USER DEFINED CHAR ++0xF163 0xE0DF #USER DEFINED CHAR ++0xF164 0xE0E0 #USER DEFINED CHAR ++0xF165 0xE0E1 #USER DEFINED CHAR ++0xF166 0xE0E2 #USER DEFINED CHAR ++0xF167 0xE0E3 #USER DEFINED CHAR ++0xF168 0xE0E4 #USER DEFINED CHAR ++0xF169 0xE0E5 #USER DEFINED CHAR ++0xF16A 0xE0E6 #USER DEFINED CHAR ++0xF16B 0xE0E7 #USER DEFINED CHAR ++0xF16C 0xE0E8 #USER DEFINED CHAR ++0xF16D 0xE0E9 #USER DEFINED CHAR ++0xF16E 0xE0EA #USER DEFINED CHAR ++0xF16F 0xE0EB #USER DEFINED CHAR ++0xF170 0xE0EC #USER DEFINED CHAR ++0xF171 0xE0ED #USER DEFINED CHAR ++0xF172 0xE0EE #USER DEFINED CHAR ++0xF173 0xE0EF #USER DEFINED CHAR ++0xF174 0xE0F0 #USER DEFINED CHAR ++0xF175 0xE0F1 #USER DEFINED CHAR ++0xF176 0xE0F2 #USER DEFINED CHAR ++0xF177 0xE0F3 #USER DEFINED CHAR ++0xF178 0xE0F4 #USER DEFINED CHAR ++0xF179 0xE0F5 #USER DEFINED CHAR ++0xF17A 0xE0F6 #USER DEFINED CHAR ++0xF17B 0xE0F7 #USER DEFINED CHAR ++0xF17C 0xE0F8 #USER DEFINED CHAR ++0xF17D 0xE0F9 #USER DEFINED CHAR ++0xF17E 0xE0FA #USER DEFINED CHAR ++0xF180 0xE0FB #USER DEFINED CHAR ++0xF181 0xE0FC #USER DEFINED CHAR ++0xF182 0xE0FD #USER DEFINED CHAR ++0xF183 0xE0FE #USER DEFINED CHAR ++0xF184 0xE0FF #USER DEFINED CHAR ++0xF185 0xE100 #USER DEFINED CHAR ++0xF186 0xE101 #USER DEFINED CHAR ++0xF187 0xE102 #USER DEFINED CHAR ++0xF188 0xE103 #USER DEFINED CHAR ++0xF189 0xE104 #USER DEFINED CHAR ++0xF18A 0xE105 #USER DEFINED CHAR ++0xF18B 0xE106 #USER DEFINED CHAR ++0xF18C 0xE107 #USER DEFINED CHAR ++0xF18D 0xE108 #USER DEFINED CHAR ++0xF18E 0xE109 #USER DEFINED CHAR ++0xF18F 0xE10A #USER DEFINED CHAR ++0xF190 0xE10B #USER DEFINED CHAR ++0xF191 0xE10C #USER DEFINED CHAR ++0xF192 0xE10D #USER DEFINED CHAR ++0xF193 0xE10E #USER DEFINED CHAR ++0xF194 0xE10F #USER DEFINED CHAR ++0xF195 0xE110 #USER DEFINED CHAR ++0xF196 0xE111 #USER DEFINED CHAR ++0xF197 0xE112 #USER DEFINED CHAR ++0xF198 0xE113 #USER DEFINED CHAR ++0xF199 0xE114 #USER DEFINED CHAR ++0xF19A 0xE115 #USER DEFINED CHAR ++0xF19B 0xE116 #USER DEFINED CHAR ++0xF19C 0xE117 #USER DEFINED CHAR ++0xF19D 0xE118 #USER DEFINED CHAR ++0xF19E 0xE119 #USER DEFINED CHAR ++0xF19F 0xE11A #USER DEFINED CHAR ++0xF1A0 0xE11B #USER DEFINED CHAR ++0xF1A1 0xE11C #USER DEFINED CHAR ++0xF1A2 0xE11D #USER DEFINED CHAR ++0xF1A3 0xE11E #USER DEFINED CHAR ++0xF1A4 0xE11F #USER DEFINED CHAR ++0xF1A5 0xE120 #USER DEFINED CHAR ++0xF1A6 0xE121 #USER DEFINED CHAR ++0xF1A7 0xE122 #USER DEFINED CHAR ++0xF1A8 0xE123 #USER DEFINED CHAR ++0xF1A9 0xE124 #USER DEFINED CHAR ++0xF1AA 0xE125 #USER DEFINED CHAR ++0xF1AB 0xE126 #USER DEFINED CHAR ++0xF1AC 0xE127 #USER DEFINED CHAR ++0xF1AD 0xE128 #USER DEFINED CHAR ++0xF1AE 0xE129 #USER DEFINED CHAR ++0xF1AF 0xE12A #USER DEFINED CHAR ++0xF1B0 0xE12B #USER DEFINED CHAR ++0xF1B1 0xE12C #USER DEFINED CHAR ++0xF1B2 0xE12D #USER DEFINED CHAR ++0xF1B3 0xE12E #USER DEFINED CHAR ++0xF1B4 0xE12F #USER DEFINED CHAR ++0xF1B5 0xE130 #USER DEFINED CHAR ++0xF1B6 0xE131 #USER DEFINED CHAR ++0xF1B7 0xE132 #USER DEFINED CHAR ++0xF1B8 0xE133 #USER DEFINED CHAR ++0xF1B9 0xE134 #USER DEFINED CHAR ++0xF1BA 0xE135 #USER DEFINED CHAR ++0xF1BB 0xE136 #USER DEFINED CHAR ++0xF1BC 0xE137 #USER DEFINED CHAR ++0xF1BD 0xE138 #USER DEFINED CHAR ++0xF1BE 0xE139 #USER DEFINED CHAR ++0xF1BF 0xE13A #USER DEFINED CHAR ++0xF1C0 0xE13B #USER DEFINED CHAR ++0xF1C1 0xE13C #USER DEFINED CHAR ++0xF1C2 0xE13D #USER DEFINED CHAR ++0xF1C3 0xE13E #USER DEFINED CHAR ++0xF1C4 0xE13F #USER DEFINED CHAR ++0xF1C5 0xE140 #USER DEFINED CHAR ++0xF1C6 0xE141 #USER DEFINED CHAR ++0xF1C7 0xE142 #USER DEFINED CHAR ++0xF1C8 0xE143 #USER DEFINED CHAR ++0xF1C9 0xE144 #USER DEFINED CHAR ++0xF1CA 0xE145 #USER DEFINED CHAR ++0xF1CB 0xE146 #USER DEFINED CHAR ++0xF1CC 0xE147 #USER DEFINED CHAR ++0xF1CD 0xE148 #USER DEFINED CHAR ++0xF1CE 0xE149 #USER DEFINED CHAR ++0xF1CF 0xE14A #USER DEFINED CHAR ++0xF1D0 0xE14B #USER DEFINED CHAR ++0xF1D1 0xE14C #USER DEFINED CHAR ++0xF1D2 0xE14D #USER DEFINED CHAR ++0xF1D3 0xE14E #USER DEFINED CHAR ++0xF1D4 0xE14F #USER DEFINED CHAR ++0xF1D5 0xE150 #USER DEFINED CHAR ++0xF1D6 0xE151 #USER DEFINED CHAR ++0xF1D7 0xE152 #USER DEFINED CHAR ++0xF1D8 0xE153 #USER DEFINED CHAR ++0xF1D9 0xE154 #USER DEFINED CHAR ++0xF1DA 0xE155 #USER DEFINED CHAR ++0xF1DB 0xE156 #USER DEFINED CHAR ++0xF1DC 0xE157 #USER DEFINED CHAR ++0xF1DD 0xE158 #USER DEFINED CHAR ++0xF1DE 0xE159 #USER DEFINED CHAR ++0xF1DF 0xE15A #USER DEFINED CHAR ++0xF1E0 0xE15B #USER DEFINED CHAR ++0xF1E1 0xE15C #USER DEFINED CHAR ++0xF1E2 0xE15D #USER DEFINED CHAR ++0xF1E3 0xE15E #USER DEFINED CHAR ++0xF1E4 0xE15F #USER DEFINED CHAR ++0xF1E5 0xE160 #USER DEFINED CHAR ++0xF1E6 0xE161 #USER DEFINED CHAR ++0xF1E7 0xE162 #USER DEFINED CHAR ++0xF1E8 0xE163 #USER DEFINED CHAR ++0xF1E9 0xE164 #USER DEFINED CHAR ++0xF1EA 0xE165 #USER DEFINED CHAR ++0xF1EB 0xE166 #USER DEFINED CHAR ++0xF1EC 0xE167 #USER DEFINED CHAR ++0xF1ED 0xE168 #USER DEFINED CHAR ++0xF1EE 0xE169 #USER DEFINED CHAR ++0xF1EF 0xE16A #USER DEFINED CHAR ++0xF1F0 0xE16B #USER DEFINED CHAR ++0xF1F1 0xE16C #USER DEFINED CHAR ++0xF1F2 0xE16D #USER DEFINED CHAR ++0xF1F3 0xE16E #USER DEFINED CHAR ++0xF1F4 0xE16F #USER DEFINED CHAR ++0xF1F5 0xE170 #USER DEFINED CHAR ++0xF1F6 0xE171 #USER DEFINED CHAR ++0xF1F7 0xE172 #USER DEFINED CHAR ++0xF1F8 0xE173 #USER DEFINED CHAR ++0xF1F9 0xE174 #USER DEFINED CHAR ++0xF1FA 0xE175 #USER DEFINED CHAR ++0xF1FB 0xE176 #USER DEFINED CHAR ++0xF1FC 0xE177 #USER DEFINED CHAR ++0xF240 0xE178 #USER DEFINED CHAR ++0xF241 0xE179 #USER DEFINED CHAR ++0xF242 0xE17A #USER DEFINED CHAR ++0xF243 0xE17B #USER DEFINED CHAR ++0xF244 0xE17C #USER DEFINED CHAR ++0xF245 0xE17D #USER DEFINED CHAR ++0xF246 0xE17E #USER DEFINED CHAR ++0xF247 0xE17F #USER DEFINED CHAR ++0xF248 0xE180 #USER DEFINED CHAR ++0xF249 0xE181 #USER DEFINED CHAR ++0xF24A 0xE182 #USER DEFINED CHAR ++0xF24B 0xE183 #USER DEFINED CHAR ++0xF24C 0xE184 #USER DEFINED CHAR ++0xF24D 0xE185 #USER DEFINED CHAR ++0xF24E 0xE186 #USER DEFINED CHAR ++0xF24F 0xE187 #USER DEFINED CHAR ++0xF250 0xE188 #USER DEFINED CHAR ++0xF251 0xE189 #USER DEFINED CHAR ++0xF252 0xE18A #USER DEFINED CHAR ++0xF253 0xE18B #USER DEFINED CHAR ++0xF254 0xE18C #USER DEFINED CHAR ++0xF255 0xE18D #USER DEFINED CHAR ++0xF256 0xE18E #USER DEFINED CHAR ++0xF257 0xE18F #USER DEFINED CHAR ++0xF258 0xE190 #USER DEFINED CHAR ++0xF259 0xE191 #USER DEFINED CHAR ++0xF25A 0xE192 #USER DEFINED CHAR ++0xF25B 0xE193 #USER DEFINED CHAR ++0xF25C 0xE194 #USER DEFINED CHAR ++0xF25D 0xE195 #USER DEFINED CHAR ++0xF25E 0xE196 #USER DEFINED CHAR ++0xF25F 0xE197 #USER DEFINED CHAR ++0xF260 0xE198 #USER DEFINED CHAR ++0xF261 0xE199 #USER DEFINED CHAR ++0xF262 0xE19A #USER DEFINED CHAR ++0xF263 0xE19B #USER DEFINED CHAR ++0xF264 0xE19C #USER DEFINED CHAR ++0xF265 0xE19D #USER DEFINED CHAR ++0xF266 0xE19E #USER DEFINED CHAR ++0xF267 0xE19F #USER DEFINED CHAR ++0xF268 0xE1A0 #USER DEFINED CHAR ++0xF269 0xE1A1 #USER DEFINED CHAR ++0xF26A 0xE1A2 #USER DEFINED CHAR ++0xF26B 0xE1A3 #USER DEFINED CHAR ++0xF26C 0xE1A4 #USER DEFINED CHAR ++0xF26D 0xE1A5 #USER DEFINED CHAR ++0xF26E 0xE1A6 #USER DEFINED CHAR ++0xF26F 0xE1A7 #USER DEFINED CHAR ++0xF270 0xE1A8 #USER DEFINED CHAR ++0xF271 0xE1A9 #USER DEFINED CHAR ++0xF272 0xE1AA #USER DEFINED CHAR ++0xF273 0xE1AB #USER DEFINED CHAR ++0xF274 0xE1AC #USER DEFINED CHAR ++0xF275 0xE1AD #USER DEFINED CHAR ++0xF276 0xE1AE #USER DEFINED CHAR ++0xF277 0xE1AF #USER DEFINED CHAR ++0xF278 0xE1B0 #USER DEFINED CHAR ++0xF279 0xE1B1 #USER DEFINED CHAR ++0xF27A 0xE1B2 #USER DEFINED CHAR ++0xF27B 0xE1B3 #USER DEFINED CHAR ++0xF27C 0xE1B4 #USER DEFINED CHAR ++0xF27D 0xE1B5 #USER DEFINED CHAR ++0xF27E 0xE1B6 #USER DEFINED CHAR ++0xF280 0xE1B7 #USER DEFINED CHAR ++0xF281 0xE1B8 #USER DEFINED CHAR ++0xF282 0xE1B9 #USER DEFINED CHAR ++0xF283 0xE1BA #USER DEFINED CHAR ++0xF284 0xE1BB #USER DEFINED CHAR ++0xF285 0xE1BC #USER DEFINED CHAR ++0xF286 0xE1BD #USER DEFINED CHAR ++0xF287 0xE1BE #USER DEFINED CHAR ++0xF288 0xE1BF #USER DEFINED CHAR ++0xF289 0xE1C0 #USER DEFINED CHAR ++0xF28A 0xE1C1 #USER DEFINED CHAR ++0xF28B 0xE1C2 #USER DEFINED CHAR ++0xF28C 0xE1C3 #USER DEFINED CHAR ++0xF28D 0xE1C4 #USER DEFINED CHAR ++0xF28E 0xE1C5 #USER DEFINED CHAR ++0xF28F 0xE1C6 #USER DEFINED CHAR ++0xF290 0xE1C7 #USER DEFINED CHAR ++0xF291 0xE1C8 #USER DEFINED CHAR ++0xF292 0xE1C9 #USER DEFINED CHAR ++0xF293 0xE1CA #USER DEFINED CHAR ++0xF294 0xE1CB #USER DEFINED CHAR ++0xF295 0xE1CC #USER DEFINED CHAR ++0xF296 0xE1CD #USER DEFINED CHAR ++0xF297 0xE1CE #USER DEFINED CHAR ++0xF298 0xE1CF #USER DEFINED CHAR ++0xF299 0xE1D0 #USER DEFINED CHAR ++0xF29A 0xE1D1 #USER DEFINED CHAR ++0xF29B 0xE1D2 #USER DEFINED CHAR ++0xF29C 0xE1D3 #USER DEFINED CHAR ++0xF29D 0xE1D4 #USER DEFINED CHAR ++0xF29E 0xE1D5 #USER DEFINED CHAR ++0xF29F 0xE1D6 #USER DEFINED CHAR ++0xF2A0 0xE1D7 #USER DEFINED CHAR ++0xF2A1 0xE1D8 #USER DEFINED CHAR ++0xF2A2 0xE1D9 #USER DEFINED CHAR ++0xF2A3 0xE1DA #USER DEFINED CHAR ++0xF2A4 0xE1DB #USER DEFINED CHAR ++0xF2A5 0xE1DC #USER DEFINED CHAR ++0xF2A6 0xE1DD #USER DEFINED CHAR ++0xF2A7 0xE1DE #USER DEFINED CHAR ++0xF2A8 0xE1DF #USER DEFINED CHAR ++0xF2A9 0xE1E0 #USER DEFINED CHAR ++0xF2AA 0xE1E1 #USER DEFINED CHAR ++0xF2AB 0xE1E2 #USER DEFINED CHAR ++0xF2AC 0xE1E3 #USER DEFINED CHAR ++0xF2AD 0xE1E4 #USER DEFINED CHAR ++0xF2AE 0xE1E5 #USER DEFINED CHAR ++0xF2AF 0xE1E6 #USER DEFINED CHAR ++0xF2B0 0xE1E7 #USER DEFINED CHAR ++0xF2B1 0xE1E8 #USER DEFINED CHAR ++0xF2B2 0xE1E9 #USER DEFINED CHAR ++0xF2B3 0xE1EA #USER DEFINED CHAR ++0xF2B4 0xE1EB #USER DEFINED CHAR ++0xF2B5 0xE1EC #USER DEFINED CHAR ++0xF2B6 0xE1ED #USER DEFINED CHAR ++0xF2B7 0xE1EE #USER DEFINED CHAR ++0xF2B8 0xE1EF #USER DEFINED CHAR ++0xF2B9 0xE1F0 #USER DEFINED CHAR ++0xF2BA 0xE1F1 #USER DEFINED CHAR ++0xF2BB 0xE1F2 #USER DEFINED CHAR ++0xF2BC 0xE1F3 #USER DEFINED CHAR ++0xF2BD 0xE1F4 #USER DEFINED CHAR ++0xF2BE 0xE1F5 #USER DEFINED CHAR ++0xF2BF 0xE1F6 #USER DEFINED CHAR ++0xF2C0 0xE1F7 #USER DEFINED CHAR ++0xF2C1 0xE1F8 #USER DEFINED CHAR ++0xF2C2 0xE1F9 #USER DEFINED CHAR ++0xF2C3 0xE1FA #USER DEFINED CHAR ++0xF2C4 0xE1FB #USER DEFINED CHAR ++0xF2C5 0xE1FC #USER DEFINED CHAR ++0xF2C6 0xE1FD #USER DEFINED CHAR ++0xF2C7 0xE1FE #USER DEFINED CHAR ++0xF2C8 0xE1FF #USER DEFINED CHAR ++0xF2C9 0xE200 #USER DEFINED CHAR ++0xF2CA 0xE201 #USER DEFINED CHAR ++0xF2CB 0xE202 #USER DEFINED CHAR ++0xF2CC 0xE203 #USER DEFINED CHAR ++0xF2CD 0xE204 #USER DEFINED CHAR ++0xF2CE 0xE205 #USER DEFINED CHAR ++0xF2CF 0xE206 #USER DEFINED CHAR ++0xF2D0 0xE207 #USER DEFINED CHAR ++0xF2D1 0xE208 #USER DEFINED CHAR ++0xF2D2 0xE209 #USER DEFINED CHAR ++0xF2D3 0xE20A #USER DEFINED CHAR ++0xF2D4 0xE20B #USER DEFINED CHAR ++0xF2D5 0xE20C #USER DEFINED CHAR ++0xF2D6 0xE20D #USER DEFINED CHAR ++0xF2D7 0xE20E #USER DEFINED CHAR ++0xF2D8 0xE20F #USER DEFINED CHAR ++0xF2D9 0xE210 #USER DEFINED CHAR ++0xF2DA 0xE211 #USER DEFINED CHAR ++0xF2DB 0xE212 #USER DEFINED CHAR ++0xF2DC 0xE213 #USER DEFINED CHAR ++0xF2DD 0xE214 #USER DEFINED CHAR ++0xF2DE 0xE215 #USER DEFINED CHAR ++0xF2DF 0xE216 #USER DEFINED CHAR ++0xF2E0 0xE217 #USER DEFINED CHAR ++0xF2E1 0xE218 #USER DEFINED CHAR ++0xF2E2 0xE219 #USER DEFINED CHAR ++0xF2E3 0xE21A #USER DEFINED CHAR ++0xF2E4 0xE21B #USER DEFINED CHAR ++0xF2E5 0xE21C #USER DEFINED CHAR ++0xF2E6 0xE21D #USER DEFINED CHAR ++0xF2E7 0xE21E #USER DEFINED CHAR ++0xF2E8 0xE21F #USER DEFINED CHAR ++0xF2E9 0xE220 #USER DEFINED CHAR ++0xF2EA 0xE221 #USER DEFINED CHAR ++0xF2EB 0xE222 #USER DEFINED CHAR ++0xF2EC 0xE223 #USER DEFINED CHAR ++0xF2ED 0xE224 #USER DEFINED CHAR ++0xF2EE 0xE225 #USER DEFINED CHAR ++0xF2EF 0xE226 #USER DEFINED CHAR ++0xF2F0 0xE227 #USER DEFINED CHAR ++0xF2F1 0xE228 #USER DEFINED CHAR ++0xF2F2 0xE229 #USER DEFINED CHAR ++0xF2F3 0xE22A #USER DEFINED CHAR ++0xF2F4 0xE22B #USER DEFINED CHAR ++0xF2F5 0xE22C #USER DEFINED CHAR ++0xF2F6 0xE22D #USER DEFINED CHAR ++0xF2F7 0xE22E #USER DEFINED CHAR ++0xF2F8 0xE22F #USER DEFINED CHAR ++0xF2F9 0xE230 #USER DEFINED CHAR ++0xF2FA 0xE231 #USER DEFINED CHAR ++0xF2FB 0xE232 #USER DEFINED CHAR ++0xF2FC 0xE233 #USER DEFINED CHAR ++0xF340 0xE234 #USER DEFINED CHAR ++0xF341 0xE235 #USER DEFINED CHAR ++0xF342 0xE236 #USER DEFINED CHAR ++0xF343 0xE237 #USER DEFINED CHAR ++0xF344 0xE238 #USER DEFINED CHAR ++0xF345 0xE239 #USER DEFINED CHAR ++0xF346 0xE23A #USER DEFINED CHAR ++0xF347 0xE23B #USER DEFINED CHAR ++0xF348 0xE23C #USER DEFINED CHAR ++0xF349 0xE23D #USER DEFINED CHAR ++0xF34A 0xE23E #USER DEFINED CHAR ++0xF34B 0xE23F #USER DEFINED CHAR ++0xF34C 0xE240 #USER DEFINED CHAR ++0xF34D 0xE241 #USER DEFINED CHAR ++0xF34E 0xE242 #USER DEFINED CHAR ++0xF34F 0xE243 #USER DEFINED CHAR ++0xF350 0xE244 #USER DEFINED CHAR ++0xF351 0xE245 #USER DEFINED CHAR ++0xF352 0xE246 #USER DEFINED CHAR ++0xF353 0xE247 #USER DEFINED CHAR ++0xF354 0xE248 #USER DEFINED CHAR ++0xF355 0xE249 #USER DEFINED CHAR ++0xF356 0xE24A #USER DEFINED CHAR ++0xF357 0xE24B #USER DEFINED CHAR ++0xF358 0xE24C #USER DEFINED CHAR ++0xF359 0xE24D #USER DEFINED CHAR ++0xF35A 0xE24E #USER DEFINED CHAR ++0xF35B 0xE24F #USER DEFINED CHAR ++0xF35C 0xE250 #USER DEFINED CHAR ++0xF35D 0xE251 #USER DEFINED CHAR ++0xF35E 0xE252 #USER DEFINED CHAR ++0xF35F 0xE253 #USER DEFINED CHAR ++0xF360 0xE254 #USER DEFINED CHAR ++0xF361 0xE255 #USER DEFINED CHAR ++0xF362 0xE256 #USER DEFINED CHAR ++0xF363 0xE257 #USER DEFINED CHAR ++0xF364 0xE258 #USER DEFINED CHAR ++0xF365 0xE259 #USER DEFINED CHAR ++0xF366 0xE25A #USER DEFINED CHAR ++0xF367 0xE25B #USER DEFINED CHAR ++0xF368 0xE25C #USER DEFINED CHAR ++0xF369 0xE25D #USER DEFINED CHAR ++0xF36A 0xE25E #USER DEFINED CHAR ++0xF36B 0xE25F #USER DEFINED CHAR ++0xF36C 0xE260 #USER DEFINED CHAR ++0xF36D 0xE261 #USER DEFINED CHAR ++0xF36E 0xE262 #USER DEFINED CHAR ++0xF36F 0xE263 #USER DEFINED CHAR ++0xF370 0xE264 #USER DEFINED CHAR ++0xF371 0xE265 #USER DEFINED CHAR ++0xF372 0xE266 #USER DEFINED CHAR ++0xF373 0xE267 #USER DEFINED CHAR ++0xF374 0xE268 #USER DEFINED CHAR ++0xF375 0xE269 #USER DEFINED CHAR ++0xF376 0xE26A #USER DEFINED CHAR ++0xF377 0xE26B #USER DEFINED CHAR ++0xF378 0xE26C #USER DEFINED CHAR ++0xF379 0xE26D #USER DEFINED CHAR ++0xF37A 0xE26E #USER DEFINED CHAR ++0xF37B 0xE26F #USER DEFINED CHAR ++0xF37C 0xE270 #USER DEFINED CHAR ++0xF37D 0xE271 #USER DEFINED CHAR ++0xF37E 0xE272 #USER DEFINED CHAR ++0xF380 0xE273 #USER DEFINED CHAR ++0xF381 0xE274 #USER DEFINED CHAR ++0xF382 0xE275 #USER DEFINED CHAR ++0xF383 0xE276 #USER DEFINED CHAR ++0xF384 0xE277 #USER DEFINED CHAR ++0xF385 0xE278 #USER DEFINED CHAR ++0xF386 0xE279 #USER DEFINED CHAR ++0xF387 0xE27A #USER DEFINED CHAR ++0xF388 0xE27B #USER DEFINED CHAR ++0xF389 0xE27C #USER DEFINED CHAR ++0xF38A 0xE27D #USER DEFINED CHAR ++0xF38B 0xE27E #USER DEFINED CHAR ++0xF38C 0xE27F #USER DEFINED CHAR ++0xF38D 0xE280 #USER DEFINED CHAR ++0xF38E 0xE281 #USER DEFINED CHAR ++0xF38F 0xE282 #USER DEFINED CHAR ++0xF390 0xE283 #USER DEFINED CHAR ++0xF391 0xE284 #USER DEFINED CHAR ++0xF392 0xE285 #USER DEFINED CHAR ++0xF393 0xE286 #USER DEFINED CHAR ++0xF394 0xE287 #USER DEFINED CHAR ++0xF395 0xE288 #USER DEFINED CHAR ++0xF396 0xE289 #USER DEFINED CHAR ++0xF397 0xE28A #USER DEFINED CHAR ++0xF398 0xE28B #USER DEFINED CHAR ++0xF399 0xE28C #USER DEFINED CHAR ++0xF39A 0xE28D #USER DEFINED CHAR ++0xF39B 0xE28E #USER DEFINED CHAR ++0xF39C 0xE28F #USER DEFINED CHAR ++0xF39D 0xE290 #USER DEFINED CHAR ++0xF39E 0xE291 #USER DEFINED CHAR ++0xF39F 0xE292 #USER DEFINED CHAR ++0xF3A0 0xE293 #USER DEFINED CHAR ++0xF3A1 0xE294 #USER DEFINED CHAR ++0xF3A2 0xE295 #USER DEFINED CHAR ++0xF3A3 0xE296 #USER DEFINED CHAR ++0xF3A4 0xE297 #USER DEFINED CHAR ++0xF3A5 0xE298 #USER DEFINED CHAR ++0xF3A6 0xE299 #USER DEFINED CHAR ++0xF3A7 0xE29A #USER DEFINED CHAR ++0xF3A8 0xE29B #USER DEFINED CHAR ++0xF3A9 0xE29C #USER DEFINED CHAR ++0xF3AA 0xE29D #USER DEFINED CHAR ++0xF3AB 0xE29E #USER DEFINED CHAR ++0xF3AC 0xE29F #USER DEFINED CHAR ++0xF3AD 0xE2A0 #USER DEFINED CHAR ++0xF3AE 0xE2A1 #USER DEFINED CHAR ++0xF3AF 0xE2A2 #USER DEFINED CHAR ++0xF3B0 0xE2A3 #USER DEFINED CHAR ++0xF3B1 0xE2A4 #USER DEFINED CHAR ++0xF3B2 0xE2A5 #USER DEFINED CHAR ++0xF3B3 0xE2A6 #USER DEFINED CHAR ++0xF3B4 0xE2A7 #USER DEFINED CHAR ++0xF3B5 0xE2A8 #USER DEFINED CHAR ++0xF3B6 0xE2A9 #USER DEFINED CHAR ++0xF3B7 0xE2AA #USER DEFINED CHAR ++0xF3B8 0xE2AB #USER DEFINED CHAR ++0xF3B9 0xE2AC #USER DEFINED CHAR ++0xF3BA 0xE2AD #USER DEFINED CHAR ++0xF3BB 0xE2AE #USER DEFINED CHAR ++0xF3BC 0xE2AF #USER DEFINED CHAR ++0xF3BD 0xE2B0 #USER DEFINED CHAR ++0xF3BE 0xE2B1 #USER DEFINED CHAR ++0xF3BF 0xE2B2 #USER DEFINED CHAR ++0xF3C0 0xE2B3 #USER DEFINED CHAR ++0xF3C1 0xE2B4 #USER DEFINED CHAR ++0xF3C2 0xE2B5 #USER DEFINED CHAR ++0xF3C3 0xE2B6 #USER DEFINED CHAR ++0xF3C4 0xE2B7 #USER DEFINED CHAR ++0xF3C5 0xE2B8 #USER DEFINED CHAR ++0xF3C6 0xE2B9 #USER DEFINED CHAR ++0xF3C7 0xE2BA #USER DEFINED CHAR ++0xF3C8 0xE2BB #USER DEFINED CHAR ++0xF3C9 0xE2BC #USER DEFINED CHAR ++0xF3CA 0xE2BD #USER DEFINED CHAR ++0xF3CB 0xE2BE #USER DEFINED CHAR ++0xF3CC 0xE2BF #USER DEFINED CHAR ++0xF3CD 0xE2C0 #USER DEFINED CHAR ++0xF3CE 0xE2C1 #USER DEFINED CHAR ++0xF3CF 0xE2C2 #USER DEFINED CHAR ++0xF3D0 0xE2C3 #USER DEFINED CHAR ++0xF3D1 0xE2C4 #USER DEFINED CHAR ++0xF3D2 0xE2C5 #USER DEFINED CHAR ++0xF3D3 0xE2C6 #USER DEFINED CHAR ++0xF3D4 0xE2C7 #USER DEFINED CHAR ++0xF3D5 0xE2C8 #USER DEFINED CHAR ++0xF3D6 0xE2C9 #USER DEFINED CHAR ++0xF3D7 0xE2CA #USER DEFINED CHAR ++0xF3D8 0xE2CB #USER DEFINED CHAR ++0xF3D9 0xE2CC #USER DEFINED CHAR ++0xF3DA 0xE2CD #USER DEFINED CHAR ++0xF3DB 0xE2CE #USER DEFINED CHAR ++0xF3DC 0xE2CF #USER DEFINED CHAR ++0xF3DD 0xE2D0 #USER DEFINED CHAR ++0xF3DE 0xE2D1 #USER DEFINED CHAR ++0xF3DF 0xE2D2 #USER DEFINED CHAR ++0xF3E0 0xE2D3 #USER DEFINED CHAR ++0xF3E1 0xE2D4 #USER DEFINED CHAR ++0xF3E2 0xE2D5 #USER DEFINED CHAR ++0xF3E3 0xE2D6 #USER DEFINED CHAR ++0xF3E4 0xE2D7 #USER DEFINED CHAR ++0xF3E5 0xE2D8 #USER DEFINED CHAR ++0xF3E6 0xE2D9 #USER DEFINED CHAR ++0xF3E7 0xE2DA #USER DEFINED CHAR ++0xF3E8 0xE2DB #USER DEFINED CHAR ++0xF3E9 0xE2DC #USER DEFINED CHAR ++0xF3EA 0xE2DD #USER DEFINED CHAR ++0xF3EB 0xE2DE #USER DEFINED CHAR ++0xF3EC 0xE2DF #USER DEFINED CHAR ++0xF3ED 0xE2E0 #USER DEFINED CHAR ++0xF3EE 0xE2E1 #USER DEFINED CHAR ++0xF3EF 0xE2E2 #USER DEFINED CHAR ++0xF3F0 0xE2E3 #USER DEFINED CHAR ++0xF3F1 0xE2E4 #USER DEFINED CHAR ++0xF3F2 0xE2E5 #USER DEFINED CHAR ++0xF3F3 0xE2E6 #USER DEFINED CHAR ++0xF3F4 0xE2E7 #USER DEFINED CHAR ++0xF3F5 0xE2E8 #USER DEFINED CHAR ++0xF3F6 0xE2E9 #USER DEFINED CHAR ++0xF3F7 0xE2EA #USER DEFINED CHAR ++0xF3F8 0xE2EB #USER DEFINED CHAR ++0xF3F9 0xE2EC #USER DEFINED CHAR ++0xF3FA 0xE2ED #USER DEFINED CHAR ++0xF3FB 0xE2EE #USER DEFINED CHAR ++0xF3FC 0xE2EF #USER DEFINED CHAR ++0xF440 0xE2F0 #USER DEFINED CHAR ++0xF441 0xE2F1 #USER DEFINED CHAR ++0xF442 0xE2F2 #USER DEFINED CHAR ++0xF443 0xE2F3 #USER DEFINED CHAR ++0xF444 0xE2F4 #USER DEFINED CHAR ++0xF445 0xE2F5 #USER DEFINED CHAR ++0xF446 0xE2F6 #USER DEFINED CHAR ++0xF447 0xE2F7 #USER DEFINED CHAR ++0xF448 0xE2F8 #USER DEFINED CHAR ++0xF449 0xE2F9 #USER DEFINED CHAR ++0xF44A 0xE2FA #USER DEFINED CHAR ++0xF44B 0xE2FB #USER DEFINED CHAR ++0xF44C 0xE2FC #USER DEFINED CHAR ++0xF44D 0xE2FD #USER DEFINED CHAR ++0xF44E 0xE2FE #USER DEFINED CHAR ++0xF44F 0xE2FF #USER DEFINED CHAR ++0xF450 0xE300 #USER DEFINED CHAR ++0xF451 0xE301 #USER DEFINED CHAR ++0xF452 0xE302 #USER DEFINED CHAR ++0xF453 0xE303 #USER DEFINED CHAR ++0xF454 0xE304 #USER DEFINED CHAR ++0xF455 0xE305 #USER DEFINED CHAR ++0xF456 0xE306 #USER DEFINED CHAR ++0xF457 0xE307 #USER DEFINED CHAR ++0xF458 0xE308 #USER DEFINED CHAR ++0xF459 0xE309 #USER DEFINED CHAR ++0xF45A 0xE30A #USER DEFINED CHAR ++0xF45B 0xE30B #USER DEFINED CHAR ++0xF45C 0xE30C #USER DEFINED CHAR ++0xF45D 0xE30D #USER DEFINED CHAR ++0xF45E 0xE30E #USER DEFINED CHAR ++0xF45F 0xE30F #USER DEFINED CHAR ++0xF460 0xE310 #USER DEFINED CHAR ++0xF461 0xE311 #USER DEFINED CHAR ++0xF462 0xE312 #USER DEFINED CHAR ++0xF463 0xE313 #USER DEFINED CHAR ++0xF464 0xE314 #USER DEFINED CHAR ++0xF465 0xE315 #USER DEFINED CHAR ++0xF466 0xE316 #USER DEFINED CHAR ++0xF467 0xE317 #USER DEFINED CHAR ++0xF468 0xE318 #USER DEFINED CHAR ++0xF469 0xE319 #USER DEFINED CHAR ++0xF46A 0xE31A #USER DEFINED CHAR ++0xF46B 0xE31B #USER DEFINED CHAR ++0xF46C 0xE31C #USER DEFINED CHAR ++0xF46D 0xE31D #USER DEFINED CHAR ++0xF46E 0xE31E #USER DEFINED CHAR ++0xF46F 0xE31F #USER DEFINED CHAR ++0xF470 0xE320 #USER DEFINED CHAR ++0xF471 0xE321 #USER DEFINED CHAR ++0xF472 0xE322 #USER DEFINED CHAR ++0xF473 0xE323 #USER DEFINED CHAR ++0xF474 0xE324 #USER DEFINED CHAR ++0xF475 0xE325 #USER DEFINED CHAR ++0xF476 0xE326 #USER DEFINED CHAR ++0xF477 0xE327 #USER DEFINED CHAR ++0xF478 0xE328 #USER DEFINED CHAR ++0xF479 0xE329 #USER DEFINED CHAR ++0xF47A 0xE32A #USER DEFINED CHAR ++0xF47B 0xE32B #USER DEFINED CHAR ++0xF47C 0xE32C #USER DEFINED CHAR ++0xF47D 0xE32D #USER DEFINED CHAR ++0xF47E 0xE32E #USER DEFINED CHAR ++0xF480 0xE32F #USER DEFINED CHAR ++0xF481 0xE330 #USER DEFINED CHAR ++0xF482 0xE331 #USER DEFINED CHAR ++0xF483 0xE332 #USER DEFINED CHAR ++0xF484 0xE333 #USER DEFINED CHAR ++0xF485 0xE334 #USER DEFINED CHAR ++0xF486 0xE335 #USER DEFINED CHAR ++0xF487 0xE336 #USER DEFINED CHAR ++0xF488 0xE337 #USER DEFINED CHAR ++0xF489 0xE338 #USER DEFINED CHAR ++0xF48A 0xE339 #USER DEFINED CHAR ++0xF48B 0xE33A #USER DEFINED CHAR ++0xF48C 0xE33B #USER DEFINED CHAR ++0xF48D 0xE33C #USER DEFINED CHAR ++0xF48E 0xE33D #USER DEFINED CHAR ++0xF48F 0xE33E #USER DEFINED CHAR ++0xF490 0xE33F #USER DEFINED CHAR ++0xF491 0xE340 #USER DEFINED CHAR ++0xF492 0xE341 #USER DEFINED CHAR ++0xF493 0xE342 #USER DEFINED CHAR ++0xF494 0xE343 #USER DEFINED CHAR ++0xF495 0xE344 #USER DEFINED CHAR ++0xF496 0xE345 #USER DEFINED CHAR ++0xF497 0xE346 #USER DEFINED CHAR ++0xF498 0xE347 #USER DEFINED CHAR ++0xF499 0xE348 #USER DEFINED CHAR ++0xF49A 0xE349 #USER DEFINED CHAR ++0xF49B 0xE34A #USER DEFINED CHAR ++0xF49C 0xE34B #USER DEFINED CHAR ++0xF49D 0xE34C #USER DEFINED CHAR ++0xF49E 0xE34D #USER DEFINED CHAR ++0xF49F 0xE34E #USER DEFINED CHAR ++0xF4A0 0xE34F #USER DEFINED CHAR ++0xF4A1 0xE350 #USER DEFINED CHAR ++0xF4A2 0xE351 #USER DEFINED CHAR ++0xF4A3 0xE352 #USER DEFINED CHAR ++0xF4A4 0xE353 #USER DEFINED CHAR ++0xF4A5 0xE354 #USER DEFINED CHAR ++0xF4A6 0xE355 #USER DEFINED CHAR ++0xF4A7 0xE356 #USER DEFINED CHAR ++0xF4A8 0xE357 #USER DEFINED CHAR ++0xF4A9 0xE358 #USER DEFINED CHAR ++0xF4AA 0xE359 #USER DEFINED CHAR ++0xF4AB 0xE35A #USER DEFINED CHAR ++0xF4AC 0xE35B #USER DEFINED CHAR ++0xF4AD 0xE35C #USER DEFINED CHAR ++0xF4AE 0xE35D #USER DEFINED CHAR ++0xF4AF 0xE35E #USER DEFINED CHAR ++0xF4B0 0xE35F #USER DEFINED CHAR ++0xF4B1 0xE360 #USER DEFINED CHAR ++0xF4B2 0xE361 #USER DEFINED CHAR ++0xF4B3 0xE362 #USER DEFINED CHAR ++0xF4B4 0xE363 #USER DEFINED CHAR ++0xF4B5 0xE364 #USER DEFINED CHAR ++0xF4B6 0xE365 #USER DEFINED CHAR ++0xF4B7 0xE366 #USER DEFINED CHAR ++0xF4B8 0xE367 #USER DEFINED CHAR ++0xF4B9 0xE368 #USER DEFINED CHAR ++0xF4BA 0xE369 #USER DEFINED CHAR ++0xF4BB 0xE36A #USER DEFINED CHAR ++0xF4BC 0xE36B #USER DEFINED CHAR ++0xF4BD 0xE36C #USER DEFINED CHAR ++0xF4BE 0xE36D #USER DEFINED CHAR ++0xF4BF 0xE36E #USER DEFINED CHAR ++0xF4C0 0xE36F #USER DEFINED CHAR ++0xF4C1 0xE370 #USER DEFINED CHAR ++0xF4C2 0xE371 #USER DEFINED CHAR ++0xF4C3 0xE372 #USER DEFINED CHAR ++0xF4C4 0xE373 #USER DEFINED CHAR ++0xF4C5 0xE374 #USER DEFINED CHAR ++0xF4C6 0xE375 #USER DEFINED CHAR ++0xF4C7 0xE376 #USER DEFINED CHAR ++0xF4C8 0xE377 #USER DEFINED CHAR ++0xF4C9 0xE378 #USER DEFINED CHAR ++0xF4CA 0xE379 #USER DEFINED CHAR ++0xF4CB 0xE37A #USER DEFINED CHAR ++0xF4CC 0xE37B #USER DEFINED CHAR ++0xF4CD 0xE37C #USER DEFINED CHAR ++0xF4CE 0xE37D #USER DEFINED CHAR ++0xF4CF 0xE37E #USER DEFINED CHAR ++0xF4D0 0xE37F #USER DEFINED CHAR ++0xF4D1 0xE380 #USER DEFINED CHAR ++0xF4D2 0xE381 #USER DEFINED CHAR ++0xF4D3 0xE382 #USER DEFINED CHAR ++0xF4D4 0xE383 #USER DEFINED CHAR ++0xF4D5 0xE384 #USER DEFINED CHAR ++0xF4D6 0xE385 #USER DEFINED CHAR ++0xF4D7 0xE386 #USER DEFINED CHAR ++0xF4D8 0xE387 #USER DEFINED CHAR ++0xF4D9 0xE388 #USER DEFINED CHAR ++0xF4DA 0xE389 #USER DEFINED CHAR ++0xF4DB 0xE38A #USER DEFINED CHAR ++0xF4DC 0xE38B #USER DEFINED CHAR ++0xF4DD 0xE38C #USER DEFINED CHAR ++0xF4DE 0xE38D #USER DEFINED CHAR ++0xF4DF 0xE38E #USER DEFINED CHAR ++0xF4E0 0xE38F #USER DEFINED CHAR ++0xF4E1 0xE390 #USER DEFINED CHAR ++0xF4E2 0xE391 #USER DEFINED CHAR ++0xF4E3 0xE392 #USER DEFINED CHAR ++0xF4E4 0xE393 #USER DEFINED CHAR ++0xF4E5 0xE394 #USER DEFINED CHAR ++0xF4E6 0xE395 #USER DEFINED CHAR ++0xF4E7 0xE396 #USER DEFINED CHAR ++0xF4E8 0xE397 #USER DEFINED CHAR ++0xF4E9 0xE398 #USER DEFINED CHAR ++0xF4EA 0xE399 #USER DEFINED CHAR ++0xF4EB 0xE39A #USER DEFINED CHAR ++0xF4EC 0xE39B #USER DEFINED CHAR ++0xF4ED 0xE39C #USER DEFINED CHAR ++0xF4EE 0xE39D #USER DEFINED CHAR ++0xF4EF 0xE39E #USER DEFINED CHAR ++0xF4F0 0xE39F #USER DEFINED CHAR ++0xF4F1 0xE3A0 #USER DEFINED CHAR ++0xF4F2 0xE3A1 #USER DEFINED CHAR ++0xF4F3 0xE3A2 #USER DEFINED CHAR ++0xF4F4 0xE3A3 #USER DEFINED CHAR ++0xF4F5 0xE3A4 #USER DEFINED CHAR ++0xF4F6 0xE3A5 #USER DEFINED CHAR ++0xF4F7 0xE3A6 #USER DEFINED CHAR ++0xF4F8 0xE3A7 #USER DEFINED CHAR ++0xF4F9 0xE3A8 #USER DEFINED CHAR ++0xF4FA 0xE3A9 #USER DEFINED CHAR ++0xF4FB 0xE3AA #USER DEFINED CHAR ++0xF4FC 0xE3AB #USER DEFINED CHAR ++0xF540 0xE3AC #USER DEFINED CHAR ++0xF541 0xE3AD #USER DEFINED CHAR ++0xF542 0xE3AE #USER DEFINED CHAR ++0xF543 0xE3AF #USER DEFINED CHAR ++0xF544 0xE3B0 #USER DEFINED CHAR ++0xF545 0xE3B1 #USER DEFINED CHAR ++0xF546 0xE3B2 #USER DEFINED CHAR ++0xF547 0xE3B3 #USER DEFINED CHAR ++0xF548 0xE3B4 #USER DEFINED CHAR ++0xF549 0xE3B5 #USER DEFINED CHAR ++0xF54A 0xE3B6 #USER DEFINED CHAR ++0xF54B 0xE3B7 #USER DEFINED CHAR ++0xF54C 0xE3B8 #USER DEFINED CHAR ++0xF54D 0xE3B9 #USER DEFINED CHAR ++0xF54E 0xE3BA #USER DEFINED CHAR ++0xF54F 0xE3BB #USER DEFINED CHAR ++0xF550 0xE3BC #USER DEFINED CHAR ++0xF551 0xE3BD #USER DEFINED CHAR ++0xF552 0xE3BE #USER DEFINED CHAR ++0xF553 0xE3BF #USER DEFINED CHAR ++0xF554 0xE3C0 #USER DEFINED CHAR ++0xF555 0xE3C1 #USER DEFINED CHAR ++0xF556 0xE3C2 #USER DEFINED CHAR ++0xF557 0xE3C3 #USER DEFINED CHAR ++0xF558 0xE3C4 #USER DEFINED CHAR ++0xF559 0xE3C5 #USER DEFINED CHAR ++0xF55A 0xE3C6 #USER DEFINED CHAR ++0xF55B 0xE3C7 #USER DEFINED CHAR ++0xF55C 0xE3C8 #USER DEFINED CHAR ++0xF55D 0xE3C9 #USER DEFINED CHAR ++0xF55E 0xE3CA #USER DEFINED CHAR ++0xF55F 0xE3CB #USER DEFINED CHAR ++0xF560 0xE3CC #USER DEFINED CHAR ++0xF561 0xE3CD #USER DEFINED CHAR ++0xF562 0xE3CE #USER DEFINED CHAR ++0xF563 0xE3CF #USER DEFINED CHAR ++0xF564 0xE3D0 #USER DEFINED CHAR ++0xF565 0xE3D1 #USER DEFINED CHAR ++0xF566 0xE3D2 #USER DEFINED CHAR ++0xF567 0xE3D3 #USER DEFINED CHAR ++0xF568 0xE3D4 #USER DEFINED CHAR ++0xF569 0xE3D5 #USER DEFINED CHAR ++0xF56A 0xE3D6 #USER DEFINED CHAR ++0xF56B 0xE3D7 #USER DEFINED CHAR ++0xF56C 0xE3D8 #USER DEFINED CHAR ++0xF56D 0xE3D9 #USER DEFINED CHAR ++0xF56E 0xE3DA #USER DEFINED CHAR ++0xF56F 0xE3DB #USER DEFINED CHAR ++0xF570 0xE3DC #USER DEFINED CHAR ++0xF571 0xE3DD #USER DEFINED CHAR ++0xF572 0xE3DE #USER DEFINED CHAR ++0xF573 0xE3DF #USER DEFINED CHAR ++0xF574 0xE3E0 #USER DEFINED CHAR ++0xF575 0xE3E1 #USER DEFINED CHAR ++0xF576 0xE3E2 #USER DEFINED CHAR ++0xF577 0xE3E3 #USER DEFINED CHAR ++0xF578 0xE3E4 #USER DEFINED CHAR ++0xF579 0xE3E5 #USER DEFINED CHAR ++0xF57A 0xE3E6 #USER DEFINED CHAR ++0xF57B 0xE3E7 #USER DEFINED CHAR ++0xF57C 0xE3E8 #USER DEFINED CHAR ++0xF57D 0xE3E9 #USER DEFINED CHAR ++0xF57E 0xE3EA #USER DEFINED CHAR ++0xF580 0xE3EB #USER DEFINED CHAR ++0xF581 0xE3EC #USER DEFINED CHAR ++0xF582 0xE3ED #USER DEFINED CHAR ++0xF583 0xE3EE #USER DEFINED CHAR ++0xF584 0xE3EF #USER DEFINED CHAR ++0xF585 0xE3F0 #USER DEFINED CHAR ++0xF586 0xE3F1 #USER DEFINED CHAR ++0xF587 0xE3F2 #USER DEFINED CHAR ++0xF588 0xE3F3 #USER DEFINED CHAR ++0xF589 0xE3F4 #USER DEFINED CHAR ++0xF58A 0xE3F5 #USER DEFINED CHAR ++0xF58B 0xE3F6 #USER DEFINED CHAR ++0xF58C 0xE3F7 #USER DEFINED CHAR ++0xF58D 0xE3F8 #USER DEFINED CHAR ++0xF58E 0xE3F9 #USER DEFINED CHAR ++0xF58F 0xE3FA #USER DEFINED CHAR ++0xF590 0xE3FB #USER DEFINED CHAR ++0xF591 0xE3FC #USER DEFINED CHAR ++0xF592 0xE3FD #USER DEFINED CHAR ++0xF593 0xE3FE #USER DEFINED CHAR ++0xF594 0xE3FF #USER DEFINED CHAR ++0xF595 0xE400 #USER DEFINED CHAR ++0xF596 0xE401 #USER DEFINED CHAR ++0xF597 0xE402 #USER DEFINED CHAR ++0xF598 0xE403 #USER DEFINED CHAR ++0xF599 0xE404 #USER DEFINED CHAR ++0xF59A 0xE405 #USER DEFINED CHAR ++0xF59B 0xE406 #USER DEFINED CHAR ++0xF59C 0xE407 #USER DEFINED CHAR ++0xF59D 0xE408 #USER DEFINED CHAR ++0xF59E 0xE409 #USER DEFINED CHAR ++0xF59F 0xE40A #USER DEFINED CHAR ++0xF5A0 0xE40B #USER DEFINED CHAR ++0xF5A1 0xE40C #USER DEFINED CHAR ++0xF5A2 0xE40D #USER DEFINED CHAR ++0xF5A3 0xE40E #USER DEFINED CHAR ++0xF5A4 0xE40F #USER DEFINED CHAR ++0xF5A5 0xE410 #USER DEFINED CHAR ++0xF5A6 0xE411 #USER DEFINED CHAR ++0xF5A7 0xE412 #USER DEFINED CHAR ++0xF5A8 0xE413 #USER DEFINED CHAR ++0xF5A9 0xE414 #USER DEFINED CHAR ++0xF5AA 0xE415 #USER DEFINED CHAR ++0xF5AB 0xE416 #USER DEFINED CHAR ++0xF5AC 0xE417 #USER DEFINED CHAR ++0xF5AD 0xE418 #USER DEFINED CHAR ++0xF5AE 0xE419 #USER DEFINED CHAR ++0xF5AF 0xE41A #USER DEFINED CHAR ++0xF5B0 0xE41B #USER DEFINED CHAR ++0xF5B1 0xE41C #USER DEFINED CHAR ++0xF5B2 0xE41D #USER DEFINED CHAR ++0xF5B3 0xE41E #USER DEFINED CHAR ++0xF5B4 0xE41F #USER DEFINED CHAR ++0xF5B5 0xE420 #USER DEFINED CHAR ++0xF5B6 0xE421 #USER DEFINED CHAR ++0xF5B7 0xE422 #USER DEFINED CHAR ++0xF5B8 0xE423 #USER DEFINED CHAR ++0xF5B9 0xE424 #USER DEFINED CHAR ++0xF5BA 0xE425 #USER DEFINED CHAR ++0xF5BB 0xE426 #USER DEFINED CHAR ++0xF5BC 0xE427 #USER DEFINED CHAR ++0xF5BD 0xE428 #USER DEFINED CHAR ++0xF5BE 0xE429 #USER DEFINED CHAR ++0xF5BF 0xE42A #USER DEFINED CHAR ++0xF5C0 0xE42B #USER DEFINED CHAR ++0xF5C1 0xE42C #USER DEFINED CHAR ++0xF5C2 0xE42D #USER DEFINED CHAR ++0xF5C3 0xE42E #USER DEFINED CHAR ++0xF5C4 0xE42F #USER DEFINED CHAR ++0xF5C5 0xE430 #USER DEFINED CHAR ++0xF5C6 0xE431 #USER DEFINED CHAR ++0xF5C7 0xE432 #USER DEFINED CHAR ++0xF5C8 0xE433 #USER DEFINED CHAR ++0xF5C9 0xE434 #USER DEFINED CHAR ++0xF5CA 0xE435 #USER DEFINED CHAR ++0xF5CB 0xE436 #USER DEFINED CHAR ++0xF5CC 0xE437 #USER DEFINED CHAR ++0xF5CD 0xE438 #USER DEFINED CHAR ++0xF5CE 0xE439 #USER DEFINED CHAR ++0xF5CF 0xE43A #USER DEFINED CHAR ++0xF5D0 0xE43B #USER DEFINED CHAR ++0xF5D1 0xE43C #USER DEFINED CHAR ++0xF5D2 0xE43D #USER DEFINED CHAR ++0xF5D3 0xE43E #USER DEFINED CHAR ++0xF5D4 0xE43F #USER DEFINED CHAR ++0xF5D5 0xE440 #USER DEFINED CHAR ++0xF5D6 0xE441 #USER DEFINED CHAR ++0xF5D7 0xE442 #USER DEFINED CHAR ++0xF5D8 0xE443 #USER DEFINED CHAR ++0xF5D9 0xE444 #USER DEFINED CHAR ++0xF5DA 0xE445 #USER DEFINED CHAR ++0xF5DB 0xE446 #USER DEFINED CHAR ++0xF5DC 0xE447 #USER DEFINED CHAR ++0xF5DD 0xE448 #USER DEFINED CHAR ++0xF5DE 0xE449 #USER DEFINED CHAR ++0xF5DF 0xE44A #USER DEFINED CHAR ++0xF5E0 0xE44B #USER DEFINED CHAR ++0xF5E1 0xE44C #USER DEFINED CHAR ++0xF5E2 0xE44D #USER DEFINED CHAR ++0xF5E3 0xE44E #USER DEFINED CHAR ++0xF5E4 0xE44F #USER DEFINED CHAR ++0xF5E5 0xE450 #USER DEFINED CHAR ++0xF5E6 0xE451 #USER DEFINED CHAR ++0xF5E7 0xE452 #USER DEFINED CHAR ++0xF5E8 0xE453 #USER DEFINED CHAR ++0xF5E9 0xE454 #USER DEFINED CHAR ++0xF5EA 0xE455 #USER DEFINED CHAR ++0xF5EB 0xE456 #USER DEFINED CHAR ++0xF5EC 0xE457 #USER DEFINED CHAR ++0xF5ED 0xE458 #USER DEFINED CHAR ++0xF5EE 0xE459 #USER DEFINED CHAR ++0xF5EF 0xE45A #USER DEFINED CHAR ++0xF5F0 0xE45B #USER DEFINED CHAR ++0xF5F1 0xE45C #USER DEFINED CHAR ++0xF5F2 0xE45D #USER DEFINED CHAR ++0xF5F3 0xE45E #USER DEFINED CHAR ++0xF5F4 0xE45F #USER DEFINED CHAR ++0xF5F5 0xE460 #USER DEFINED CHAR ++0xF5F6 0xE461 #USER DEFINED CHAR ++0xF5F7 0xE462 #USER DEFINED CHAR ++0xF5F8 0xE463 #USER DEFINED CHAR ++0xF5F9 0xE464 #USER DEFINED CHAR ++0xF5FA 0xE465 #USER DEFINED CHAR ++0xF5FB 0xE466 #USER DEFINED CHAR ++0xF5FC 0xE467 #USER DEFINED CHAR ++0xF640 0xE468 #USER DEFINED CHAR ++0xF641 0xE469 #USER DEFINED CHAR ++0xF642 0xE46A #USER DEFINED CHAR ++0xF643 0xE46B #USER DEFINED CHAR ++0xF644 0xE46C #USER DEFINED CHAR ++0xF645 0xE46D #USER DEFINED CHAR ++0xF646 0xE46E #USER DEFINED CHAR ++0xF647 0xE46F #USER DEFINED CHAR ++0xF648 0xE470 #USER DEFINED CHAR ++0xF649 0xE471 #USER DEFINED CHAR ++0xF64A 0xE472 #USER DEFINED CHAR ++0xF64B 0xE473 #USER DEFINED CHAR ++0xF64C 0xE474 #USER DEFINED CHAR ++0xF64D 0xE475 #USER DEFINED CHAR ++0xF64E 0xE476 #USER DEFINED CHAR ++0xF64F 0xE477 #USER DEFINED CHAR ++0xF650 0xE478 #USER DEFINED CHAR ++0xF651 0xE479 #USER DEFINED CHAR ++0xF652 0xE47A #USER DEFINED CHAR ++0xF653 0xE47B #USER DEFINED CHAR ++0xF654 0xE47C #USER DEFINED CHAR ++0xF655 0xE47D #USER DEFINED CHAR ++0xF656 0xE47E #USER DEFINED CHAR ++0xF657 0xE47F #USER DEFINED CHAR ++0xF658 0xE480 #USER DEFINED CHAR ++0xF659 0xE481 #USER DEFINED CHAR ++0xF65A 0xE482 #USER DEFINED CHAR ++0xF65B 0xE483 #USER DEFINED CHAR ++0xF65C 0xE484 #USER DEFINED CHAR ++0xF65D 0xE485 #USER DEFINED CHAR ++0xF65E 0xE486 #USER DEFINED CHAR ++0xF65F 0xE487 #USER DEFINED CHAR ++0xF660 0xE488 #USER DEFINED CHAR ++0xF661 0xE489 #USER DEFINED CHAR ++0xF662 0xE48A #USER DEFINED CHAR ++0xF663 0xE48B #USER DEFINED CHAR ++0xF664 0xE48C #USER DEFINED CHAR ++0xF665 0xE48D #USER DEFINED CHAR ++0xF666 0xE48E #USER DEFINED CHAR ++0xF667 0xE48F #USER DEFINED CHAR ++0xF668 0xE490 #USER DEFINED CHAR ++0xF669 0xE491 #USER DEFINED CHAR ++0xF66A 0xE492 #USER DEFINED CHAR ++0xF66B 0xE493 #USER DEFINED CHAR ++0xF66C 0xE494 #USER DEFINED CHAR ++0xF66D 0xE495 #USER DEFINED CHAR ++0xF66E 0xE496 #USER DEFINED CHAR ++0xF66F 0xE497 #USER DEFINED CHAR ++0xF670 0xE498 #USER DEFINED CHAR ++0xF671 0xE499 #USER DEFINED CHAR ++0xF672 0xE49A #USER DEFINED CHAR ++0xF673 0xE49B #USER DEFINED CHAR ++0xF674 0xE49C #USER DEFINED CHAR ++0xF675 0xE49D #USER DEFINED CHAR ++0xF676 0xE49E #USER DEFINED CHAR ++0xF677 0xE49F #USER DEFINED CHAR ++0xF678 0xE4A0 #USER DEFINED CHAR ++0xF679 0xE4A1 #USER DEFINED CHAR ++0xF67A 0xE4A2 #USER DEFINED CHAR ++0xF67B 0xE4A3 #USER DEFINED CHAR ++0xF67C 0xE4A4 #USER DEFINED CHAR ++0xF67D 0xE4A5 #USER DEFINED CHAR ++0xF67E 0xE4A6 #USER DEFINED CHAR ++0xF680 0xE4A7 #USER DEFINED CHAR ++0xF681 0xE4A8 #USER DEFINED CHAR ++0xF682 0xE4A9 #USER DEFINED CHAR ++0xF683 0xE4AA #USER DEFINED CHAR ++0xF684 0xE4AB #USER DEFINED CHAR ++0xF685 0xE4AC #USER DEFINED CHAR ++0xF686 0xE4AD #USER DEFINED CHAR ++0xF687 0xE4AE #USER DEFINED CHAR ++0xF688 0xE4AF #USER DEFINED CHAR ++0xF689 0xE4B0 #USER DEFINED CHAR ++0xF68A 0xE4B1 #USER DEFINED CHAR ++0xF68B 0xE4B2 #USER DEFINED CHAR ++0xF68C 0xE4B3 #USER DEFINED CHAR ++0xF68D 0xE4B4 #USER DEFINED CHAR ++0xF68E 0xE4B5 #USER DEFINED CHAR ++0xF68F 0xE4B6 #USER DEFINED CHAR ++0xF690 0xE4B7 #USER DEFINED CHAR ++0xF691 0xE4B8 #USER DEFINED CHAR ++0xF692 0xE4B9 #USER DEFINED CHAR ++0xF693 0xE4BA #USER DEFINED CHAR ++0xF694 0xE4BB #USER DEFINED CHAR ++0xF695 0xE4BC #USER DEFINED CHAR ++0xF696 0xE4BD #USER DEFINED CHAR ++0xF697 0xE4BE #USER DEFINED CHAR ++0xF698 0xE4BF #USER DEFINED CHAR ++0xF699 0xE4C0 #USER DEFINED CHAR ++0xF69A 0xE4C1 #USER DEFINED CHAR ++0xF69B 0xE4C2 #USER DEFINED CHAR ++0xF69C 0xE4C3 #USER DEFINED CHAR ++0xF69D 0xE4C4 #USER DEFINED CHAR ++0xF69E 0xE4C5 #USER DEFINED CHAR ++0xF69F 0xE4C6 #USER DEFINED CHAR ++0xF6A0 0xE4C7 #USER DEFINED CHAR ++0xF6A1 0xE4C8 #USER DEFINED CHAR ++0xF6A2 0xE4C9 #USER DEFINED CHAR ++0xF6A3 0xE4CA #USER DEFINED CHAR ++0xF6A4 0xE4CB #USER DEFINED CHAR ++0xF6A5 0xE4CC #USER DEFINED CHAR ++0xF6A6 0xE4CD #USER DEFINED CHAR ++0xF6A7 0xE4CE #USER DEFINED CHAR ++0xF6A8 0xE4CF #USER DEFINED CHAR ++0xF6A9 0xE4D0 #USER DEFINED CHAR ++0xF6AA 0xE4D1 #USER DEFINED CHAR ++0xF6AB 0xE4D2 #USER DEFINED CHAR ++0xF6AC 0xE4D3 #USER DEFINED CHAR ++0xF6AD 0xE4D4 #USER DEFINED CHAR ++0xF6AE 0xE4D5 #USER DEFINED CHAR ++0xF6AF 0xE4D6 #USER DEFINED CHAR ++0xF6B0 0xE4D7 #USER DEFINED CHAR ++0xF6B1 0xE4D8 #USER DEFINED CHAR ++0xF6B2 0xE4D9 #USER DEFINED CHAR ++0xF6B3 0xE4DA #USER DEFINED CHAR ++0xF6B4 0xE4DB #USER DEFINED CHAR ++0xF6B5 0xE4DC #USER DEFINED CHAR ++0xF6B6 0xE4DD #USER DEFINED CHAR ++0xF6B7 0xE4DE #USER DEFINED CHAR ++0xF6B8 0xE4DF #USER DEFINED CHAR ++0xF6B9 0xE4E0 #USER DEFINED CHAR ++0xF6BA 0xE4E1 #USER DEFINED CHAR ++0xF6BB 0xE4E2 #USER DEFINED CHAR ++0xF6BC 0xE4E3 #USER DEFINED CHAR ++0xF6BD 0xE4E4 #USER DEFINED CHAR ++0xF6BE 0xE4E5 #USER DEFINED CHAR ++0xF6BF 0xE4E6 #USER DEFINED CHAR ++0xF6C0 0xE4E7 #USER DEFINED CHAR ++0xF6C1 0xE4E8 #USER DEFINED CHAR ++0xF6C2 0xE4E9 #USER DEFINED CHAR ++0xF6C3 0xE4EA #USER DEFINED CHAR ++0xF6C4 0xE4EB #USER DEFINED CHAR ++0xF6C5 0xE4EC #USER DEFINED CHAR ++0xF6C6 0xE4ED #USER DEFINED CHAR ++0xF6C7 0xE4EE #USER DEFINED CHAR ++0xF6C8 0xE4EF #USER DEFINED CHAR ++0xF6C9 0xE4F0 #USER DEFINED CHAR ++0xF6CA 0xE4F1 #USER DEFINED CHAR ++0xF6CB 0xE4F2 #USER DEFINED CHAR ++0xF6CC 0xE4F3 #USER DEFINED CHAR ++0xF6CD 0xE4F4 #USER DEFINED CHAR ++0xF6CE 0xE4F5 #USER DEFINED CHAR ++0xF6CF 0xE4F6 #USER DEFINED CHAR ++0xF6D0 0xE4F7 #USER DEFINED CHAR ++0xF6D1 0xE4F8 #USER DEFINED CHAR ++0xF6D2 0xE4F9 #USER DEFINED CHAR ++0xF6D3 0xE4FA #USER DEFINED CHAR ++0xF6D4 0xE4FB #USER DEFINED CHAR ++0xF6D5 0xE4FC #USER DEFINED CHAR ++0xF6D6 0xE4FD #USER DEFINED CHAR ++0xF6D7 0xE4FE #USER DEFINED CHAR ++0xF6D8 0xE4FF #USER DEFINED CHAR ++0xF6D9 0xE500 #USER DEFINED CHAR ++0xF6DA 0xE501 #USER DEFINED CHAR ++0xF6DB 0xE502 #USER DEFINED CHAR ++0xF6DC 0xE503 #USER DEFINED CHAR ++0xF6DD 0xE504 #USER DEFINED CHAR ++0xF6DE 0xE505 #USER DEFINED CHAR ++0xF6DF 0xE506 #USER DEFINED CHAR ++0xF6E0 0xE507 #USER DEFINED CHAR ++0xF6E1 0xE508 #USER DEFINED CHAR ++0xF6E2 0xE509 #USER DEFINED CHAR ++0xF6E3 0xE50A #USER DEFINED CHAR ++0xF6E4 0xE50B #USER DEFINED CHAR ++0xF6E5 0xE50C #USER DEFINED CHAR ++0xF6E6 0xE50D #USER DEFINED CHAR ++0xF6E7 0xE50E #USER DEFINED CHAR ++0xF6E8 0xE50F #USER DEFINED CHAR ++0xF6E9 0xE510 #USER DEFINED CHAR ++0xF6EA 0xE511 #USER DEFINED CHAR ++0xF6EB 0xE512 #USER DEFINED CHAR ++0xF6EC 0xE513 #USER DEFINED CHAR ++0xF6ED 0xE514 #USER DEFINED CHAR ++0xF6EE 0xE515 #USER DEFINED CHAR ++0xF6EF 0xE516 #USER DEFINED CHAR ++0xF6F0 0xE517 #USER DEFINED CHAR ++0xF6F1 0xE518 #USER DEFINED CHAR ++0xF6F2 0xE519 #USER DEFINED CHAR ++0xF6F3 0xE51A #USER DEFINED CHAR ++0xF6F4 0xE51B #USER DEFINED CHAR ++0xF6F5 0xE51C #USER DEFINED CHAR ++0xF6F6 0xE51D #USER DEFINED CHAR ++0xF6F7 0xE51E #USER DEFINED CHAR ++0xF6F8 0xE51F #USER DEFINED CHAR ++0xF6F9 0xE520 #USER DEFINED CHAR ++0xF6FA 0xE521 #USER DEFINED CHAR ++0xF6FB 0xE522 #USER DEFINED CHAR ++0xF6FC 0xE523 #USER DEFINED CHAR ++0xF740 0xE524 #USER DEFINED CHAR ++0xF741 0xE525 #USER DEFINED CHAR ++0xF742 0xE526 #USER DEFINED CHAR ++0xF743 0xE527 #USER DEFINED CHAR ++0xF744 0xE528 #USER DEFINED CHAR ++0xF745 0xE529 #USER DEFINED CHAR ++0xF746 0xE52A #USER DEFINED CHAR ++0xF747 0xE52B #USER DEFINED CHAR ++0xF748 0xE52C #USER DEFINED CHAR ++0xF749 0xE52D #USER DEFINED CHAR ++0xF74A 0xE52E #USER DEFINED CHAR ++0xF74B 0xE52F #USER DEFINED CHAR ++0xF74C 0xE530 #USER DEFINED CHAR ++0xF74D 0xE531 #USER DEFINED CHAR ++0xF74E 0xE532 #USER DEFINED CHAR ++0xF74F 0xE533 #USER DEFINED CHAR ++0xF750 0xE534 #USER DEFINED CHAR ++0xF751 0xE535 #USER DEFINED CHAR ++0xF752 0xE536 #USER DEFINED CHAR ++0xF753 0xE537 #USER DEFINED CHAR ++0xF754 0xE538 #USER DEFINED CHAR ++0xF755 0xE539 #USER DEFINED CHAR ++0xF756 0xE53A #USER DEFINED CHAR ++0xF757 0xE53B #USER DEFINED CHAR ++0xF758 0xE53C #USER DEFINED CHAR ++0xF759 0xE53D #USER DEFINED CHAR ++0xF75A 0xE53E #USER DEFINED CHAR ++0xF75B 0xE53F #USER DEFINED CHAR ++0xF75C 0xE540 #USER DEFINED CHAR ++0xF75D 0xE541 #USER DEFINED CHAR ++0xF75E 0xE542 #USER DEFINED CHAR ++0xF75F 0xE543 #USER DEFINED CHAR ++0xF760 0xE544 #USER DEFINED CHAR ++0xF761 0xE545 #USER DEFINED CHAR ++0xF762 0xE546 #USER DEFINED CHAR ++0xF763 0xE547 #USER DEFINED CHAR ++0xF764 0xE548 #USER DEFINED CHAR ++0xF765 0xE549 #USER DEFINED CHAR ++0xF766 0xE54A #USER DEFINED CHAR ++0xF767 0xE54B #USER DEFINED CHAR ++0xF768 0xE54C #USER DEFINED CHAR ++0xF769 0xE54D #USER DEFINED CHAR ++0xF76A 0xE54E #USER DEFINED CHAR ++0xF76B 0xE54F #USER DEFINED CHAR ++0xF76C 0xE550 #USER DEFINED CHAR ++0xF76D 0xE551 #USER DEFINED CHAR ++0xF76E 0xE552 #USER DEFINED CHAR ++0xF76F 0xE553 #USER DEFINED CHAR ++0xF770 0xE554 #USER DEFINED CHAR ++0xF771 0xE555 #USER DEFINED CHAR ++0xF772 0xE556 #USER DEFINED CHAR ++0xF773 0xE557 #USER DEFINED CHAR ++0xF774 0xE558 #USER DEFINED CHAR ++0xF775 0xE559 #USER DEFINED CHAR ++0xF776 0xE55A #USER DEFINED CHAR ++0xF777 0xE55B #USER DEFINED CHAR ++0xF778 0xE55C #USER DEFINED CHAR ++0xF779 0xE55D #USER DEFINED CHAR ++0xF77A 0xE55E #USER DEFINED CHAR ++0xF77B 0xE55F #USER DEFINED CHAR ++0xF77C 0xE560 #USER DEFINED CHAR ++0xF77D 0xE561 #USER DEFINED CHAR ++0xF77E 0xE562 #USER DEFINED CHAR ++0xF780 0xE563 #USER DEFINED CHAR ++0xF781 0xE564 #USER DEFINED CHAR ++0xF782 0xE565 #USER DEFINED CHAR ++0xF783 0xE566 #USER DEFINED CHAR ++0xF784 0xE567 #USER DEFINED CHAR ++0xF785 0xE568 #USER DEFINED CHAR ++0xF786 0xE569 #USER DEFINED CHAR ++0xF787 0xE56A #USER DEFINED CHAR ++0xF788 0xE56B #USER DEFINED CHAR ++0xF789 0xE56C #USER DEFINED CHAR ++0xF78A 0xE56D #USER DEFINED CHAR ++0xF78B 0xE56E #USER DEFINED CHAR ++0xF78C 0xE56F #USER DEFINED CHAR ++0xF78D 0xE570 #USER DEFINED CHAR ++0xF78E 0xE571 #USER DEFINED CHAR ++0xF78F 0xE572 #USER DEFINED CHAR ++0xF790 0xE573 #USER DEFINED CHAR ++0xF791 0xE574 #USER DEFINED CHAR ++0xF792 0xE575 #USER DEFINED CHAR ++0xF793 0xE576 #USER DEFINED CHAR ++0xF794 0xE577 #USER DEFINED CHAR ++0xF795 0xE578 #USER DEFINED CHAR ++0xF796 0xE579 #USER DEFINED CHAR ++0xF797 0xE57A #USER DEFINED CHAR ++0xF798 0xE57B #USER DEFINED CHAR ++0xF799 0xE57C #USER DEFINED CHAR ++0xF79A 0xE57D #USER DEFINED CHAR ++0xF79B 0xE57E #USER DEFINED CHAR ++0xF79C 0xE57F #USER DEFINED CHAR ++0xF79D 0xE580 #USER DEFINED CHAR ++0xF79E 0xE581 #USER DEFINED CHAR ++0xF79F 0xE582 #USER DEFINED CHAR ++0xF7A0 0xE583 #USER DEFINED CHAR ++0xF7A1 0xE584 #USER DEFINED CHAR ++0xF7A2 0xE585 #USER DEFINED CHAR ++0xF7A3 0xE586 #USER DEFINED CHAR ++0xF7A4 0xE587 #USER DEFINED CHAR ++0xF7A5 0xE588 #USER DEFINED CHAR ++0xF7A6 0xE589 #USER DEFINED CHAR ++0xF7A7 0xE58A #USER DEFINED CHAR ++0xF7A8 0xE58B #USER DEFINED CHAR ++0xF7A9 0xE58C #USER DEFINED CHAR ++0xF7AA 0xE58D #USER DEFINED CHAR ++0xF7AB 0xE58E #USER DEFINED CHAR ++0xF7AC 0xE58F #USER DEFINED CHAR ++0xF7AD 0xE590 #USER DEFINED CHAR ++0xF7AE 0xE591 #USER DEFINED CHAR ++0xF7AF 0xE592 #USER DEFINED CHAR ++0xF7B0 0xE593 #USER DEFINED CHAR ++0xF7B1 0xE594 #USER DEFINED CHAR ++0xF7B2 0xE595 #USER DEFINED CHAR ++0xF7B3 0xE596 #USER DEFINED CHAR ++0xF7B4 0xE597 #USER DEFINED CHAR ++0xF7B5 0xE598 #USER DEFINED CHAR ++0xF7B6 0xE599 #USER DEFINED CHAR ++0xF7B7 0xE59A #USER DEFINED CHAR ++0xF7B8 0xE59B #USER DEFINED CHAR ++0xF7B9 0xE59C #USER DEFINED CHAR ++0xF7BA 0xE59D #USER DEFINED CHAR ++0xF7BB 0xE59E #USER DEFINED CHAR ++0xF7BC 0xE59F #USER DEFINED CHAR ++0xF7BD 0xE5A0 #USER DEFINED CHAR ++0xF7BE 0xE5A1 #USER DEFINED CHAR ++0xF7BF 0xE5A2 #USER DEFINED CHAR ++0xF7C0 0xE5A3 #USER DEFINED CHAR ++0xF7C1 0xE5A4 #USER DEFINED CHAR ++0xF7C2 0xE5A5 #USER DEFINED CHAR ++0xF7C3 0xE5A6 #USER DEFINED CHAR ++0xF7C4 0xE5A7 #USER DEFINED CHAR ++0xF7C5 0xE5A8 #USER DEFINED CHAR ++0xF7C6 0xE5A9 #USER DEFINED CHAR ++0xF7C7 0xE5AA #USER DEFINED CHAR ++0xF7C8 0xE5AB #USER DEFINED CHAR ++0xF7C9 0xE5AC #USER DEFINED CHAR ++0xF7CA 0xE5AD #USER DEFINED CHAR ++0xF7CB 0xE5AE #USER DEFINED CHAR ++0xF7CC 0xE5AF #USER DEFINED CHAR ++0xF7CD 0xE5B0 #USER DEFINED CHAR ++0xF7CE 0xE5B1 #USER DEFINED CHAR ++0xF7CF 0xE5B2 #USER DEFINED CHAR ++0xF7D0 0xE5B3 #USER DEFINED CHAR ++0xF7D1 0xE5B4 #USER DEFINED CHAR ++0xF7D2 0xE5B5 #USER DEFINED CHAR ++0xF7D3 0xE5B6 #USER DEFINED CHAR ++0xF7D4 0xE5B7 #USER DEFINED CHAR ++0xF7D5 0xE5B8 #USER DEFINED CHAR ++0xF7D6 0xE5B9 #USER DEFINED CHAR ++0xF7D7 0xE5BA #USER DEFINED CHAR ++0xF7D8 0xE5BB #USER DEFINED CHAR ++0xF7D9 0xE5BC #USER DEFINED CHAR ++0xF7DA 0xE5BD #USER DEFINED CHAR ++0xF7DB 0xE5BE #USER DEFINED CHAR ++0xF7DC 0xE5BF #USER DEFINED CHAR ++0xF7DD 0xE5C0 #USER DEFINED CHAR ++0xF7DE 0xE5C1 #USER DEFINED CHAR ++0xF7DF 0xE5C2 #USER DEFINED CHAR ++0xF7E0 0xE5C3 #USER DEFINED CHAR ++0xF7E1 0xE5C4 #USER DEFINED CHAR ++0xF7E2 0xE5C5 #USER DEFINED CHAR ++0xF7E3 0xE5C6 #USER DEFINED CHAR ++0xF7E4 0xE5C7 #USER DEFINED CHAR ++0xF7E5 0xE5C8 #USER DEFINED CHAR ++0xF7E6 0xE5C9 #USER DEFINED CHAR ++0xF7E7 0xE5CA #USER DEFINED CHAR ++0xF7E8 0xE5CB #USER DEFINED CHAR ++0xF7E9 0xE5CC #USER DEFINED CHAR ++0xF7EA 0xE5CD #USER DEFINED CHAR ++0xF7EB 0xE5CE #USER DEFINED CHAR ++0xF7EC 0xE5CF #USER DEFINED CHAR ++0xF7ED 0xE5D0 #USER DEFINED CHAR ++0xF7EE 0xE5D1 #USER DEFINED CHAR ++0xF7EF 0xE5D2 #USER DEFINED CHAR ++0xF7F0 0xE5D3 #USER DEFINED CHAR ++0xF7F1 0xE5D4 #USER DEFINED CHAR ++0xF7F2 0xE5D5 #USER DEFINED CHAR ++0xF7F3 0xE5D6 #USER DEFINED CHAR ++0xF7F4 0xE5D7 #USER DEFINED CHAR ++0xF7F5 0xE5D8 #USER DEFINED CHAR ++0xF7F6 0xE5D9 #USER DEFINED CHAR ++0xF7F7 0xE5DA #USER DEFINED CHAR ++0xF7F8 0xE5DB #USER DEFINED CHAR ++0xF7F9 0xE5DC #USER DEFINED CHAR ++0xF7FA 0xE5DD #USER DEFINED CHAR ++0xF7FB 0xE5DE #USER DEFINED CHAR ++0xF7FC 0xE5DF #USER DEFINED CHAR ++0xF840 0xE5E0 #USER DEFINED CHAR ++0xF841 0xE5E1 #USER DEFINED CHAR ++0xF842 0xE5E2 #USER DEFINED CHAR ++0xF843 0xE5E3 #USER DEFINED CHAR ++0xF844 0xE5E4 #USER DEFINED CHAR ++0xF845 0xE5E5 #USER DEFINED CHAR ++0xF846 0xE5E6 #USER DEFINED CHAR ++0xF847 0xE5E7 #USER DEFINED CHAR ++0xF848 0xE5E8 #USER DEFINED CHAR ++0xF849 0xE5E9 #USER DEFINED CHAR ++0xF84A 0xE5EA #USER DEFINED CHAR ++0xF84B 0xE5EB #USER DEFINED CHAR ++0xF84C 0xE5EC #USER DEFINED CHAR ++0xF84D 0xE5ED #USER DEFINED CHAR ++0xF84E 0xE5EE #USER DEFINED CHAR ++0xF84F 0xE5EF #USER DEFINED CHAR ++0xF850 0xE5F0 #USER DEFINED CHAR ++0xF851 0xE5F1 #USER DEFINED CHAR ++0xF852 0xE5F2 #USER DEFINED CHAR ++0xF853 0xE5F3 #USER DEFINED CHAR ++0xF854 0xE5F4 #USER DEFINED CHAR ++0xF855 0xE5F5 #USER DEFINED CHAR ++0xF856 0xE5F6 #USER DEFINED CHAR ++0xF857 0xE5F7 #USER DEFINED CHAR ++0xF858 0xE5F8 #USER DEFINED CHAR ++0xF859 0xE5F9 #USER DEFINED CHAR ++0xF85A 0xE5FA #USER DEFINED CHAR ++0xF85B 0xE5FB #USER DEFINED CHAR ++0xF85C 0xE5FC #USER DEFINED CHAR ++0xF85D 0xE5FD #USER DEFINED CHAR ++0xF85E 0xE5FE #USER DEFINED CHAR ++0xF85F 0xE5FF #USER DEFINED CHAR ++0xF860 0xE600 #USER DEFINED CHAR ++0xF861 0xE601 #USER DEFINED CHAR ++0xF862 0xE602 #USER DEFINED CHAR ++0xF863 0xE603 #USER DEFINED CHAR ++0xF864 0xE604 #USER DEFINED CHAR ++0xF865 0xE605 #USER DEFINED CHAR ++0xF866 0xE606 #USER DEFINED CHAR ++0xF867 0xE607 #USER DEFINED CHAR ++0xF868 0xE608 #USER DEFINED CHAR ++0xF869 0xE609 #USER DEFINED CHAR ++0xF86A 0xE60A #USER DEFINED CHAR ++0xF86B 0xE60B #USER DEFINED CHAR ++0xF86C 0xE60C #USER DEFINED CHAR ++0xF86D 0xE60D #USER DEFINED CHAR ++0xF86E 0xE60E #USER DEFINED CHAR ++0xF86F 0xE60F #USER DEFINED CHAR ++0xF870 0xE610 #USER DEFINED CHAR ++0xF871 0xE611 #USER DEFINED CHAR ++0xF872 0xE612 #USER DEFINED CHAR ++0xF873 0xE613 #USER DEFINED CHAR ++0xF874 0xE614 #USER DEFINED CHAR ++0xF875 0xE615 #USER DEFINED CHAR ++0xF876 0xE616 #USER DEFINED CHAR ++0xF877 0xE617 #USER DEFINED CHAR ++0xF878 0xE618 #USER DEFINED CHAR ++0xF879 0xE619 #USER DEFINED CHAR ++0xF87A 0xE61A #USER DEFINED CHAR ++0xF87B 0xE61B #USER DEFINED CHAR ++0xF87C 0xE61C #USER DEFINED CHAR ++0xF87D 0xE61D #USER DEFINED CHAR ++0xF87E 0xE61E #USER DEFINED CHAR ++0xF880 0xE61F #USER DEFINED CHAR ++0xF881 0xE620 #USER DEFINED CHAR ++0xF882 0xE621 #USER DEFINED CHAR ++0xF883 0xE622 #USER DEFINED CHAR ++0xF884 0xE623 #USER DEFINED CHAR ++0xF885 0xE624 #USER DEFINED CHAR ++0xF886 0xE625 #USER DEFINED CHAR ++0xF887 0xE626 #USER DEFINED CHAR ++0xF888 0xE627 #USER DEFINED CHAR ++0xF889 0xE628 #USER DEFINED CHAR ++0xF88A 0xE629 #USER DEFINED CHAR ++0xF88B 0xE62A #USER DEFINED CHAR ++0xF88C 0xE62B #USER DEFINED CHAR ++0xF88D 0xE62C #USER DEFINED CHAR ++0xF88E 0xE62D #USER DEFINED CHAR ++0xF88F 0xE62E #USER DEFINED CHAR ++0xF890 0xE62F #USER DEFINED CHAR ++0xF891 0xE630 #USER DEFINED CHAR ++0xF892 0xE631 #USER DEFINED CHAR ++0xF893 0xE632 #USER DEFINED CHAR ++0xF894 0xE633 #USER DEFINED CHAR ++0xF895 0xE634 #USER DEFINED CHAR ++0xF896 0xE635 #USER DEFINED CHAR ++0xF897 0xE636 #USER DEFINED CHAR ++0xF898 0xE637 #USER DEFINED CHAR ++0xF899 0xE638 #USER DEFINED CHAR ++0xF89A 0xE639 #USER DEFINED CHAR ++0xF89B 0xE63A #USER DEFINED CHAR ++0xF89C 0xE63B #USER DEFINED CHAR ++0xF89D 0xE63C #USER DEFINED CHAR ++0xF89E 0xE63D #USER DEFINED CHAR ++0xF89F 0xE63E #USER DEFINED CHAR ++0xF8A0 0xE63F #USER DEFINED CHAR ++0xF8A1 0xE640 #USER DEFINED CHAR ++0xF8A2 0xE641 #USER DEFINED CHAR ++0xF8A3 0xE642 #USER DEFINED CHAR ++0xF8A4 0xE643 #USER DEFINED CHAR ++0xF8A5 0xE644 #USER DEFINED CHAR ++0xF8A6 0xE645 #USER DEFINED CHAR ++0xF8A7 0xE646 #USER DEFINED CHAR ++0xF8A8 0xE647 #USER DEFINED CHAR ++0xF8A9 0xE648 #USER DEFINED CHAR ++0xF8AA 0xE649 #USER DEFINED CHAR ++0xF8AB 0xE64A #USER DEFINED CHAR ++0xF8AC 0xE64B #USER DEFINED CHAR ++0xF8AD 0xE64C #USER DEFINED CHAR ++0xF8AE 0xE64D #USER DEFINED CHAR ++0xF8AF 0xE64E #USER DEFINED CHAR ++0xF8B0 0xE64F #USER DEFINED CHAR ++0xF8B1 0xE650 #USER DEFINED CHAR ++0xF8B2 0xE651 #USER DEFINED CHAR ++0xF8B3 0xE652 #USER DEFINED CHAR ++0xF8B4 0xE653 #USER DEFINED CHAR ++0xF8B5 0xE654 #USER DEFINED CHAR ++0xF8B6 0xE655 #USER DEFINED CHAR ++0xF8B7 0xE656 #USER DEFINED CHAR ++0xF8B8 0xE657 #USER DEFINED CHAR ++0xF8B9 0xE658 #USER DEFINED CHAR ++0xF8BA 0xE659 #USER DEFINED CHAR ++0xF8BB 0xE65A #USER DEFINED CHAR ++0xF8BC 0xE65B #USER DEFINED CHAR ++0xF8BD 0xE65C #USER DEFINED CHAR ++0xF8BE 0xE65D #USER DEFINED CHAR ++0xF8BF 0xE65E #USER DEFINED CHAR ++0xF8C0 0xE65F #USER DEFINED CHAR ++0xF8C1 0xE660 #USER DEFINED CHAR ++0xF8C2 0xE661 #USER DEFINED CHAR ++0xF8C3 0xE662 #USER DEFINED CHAR ++0xF8C4 0xE663 #USER DEFINED CHAR ++0xF8C5 0xE664 #USER DEFINED CHAR ++0xF8C6 0xE665 #USER DEFINED CHAR ++0xF8C7 0xE666 #USER DEFINED CHAR ++0xF8C8 0xE667 #USER DEFINED CHAR ++0xF8C9 0xE668 #USER DEFINED CHAR ++0xF8CA 0xE669 #USER DEFINED CHAR ++0xF8CB 0xE66A #USER DEFINED CHAR ++0xF8CC 0xE66B #USER DEFINED CHAR ++0xF8CD 0xE66C #USER DEFINED CHAR ++0xF8CE 0xE66D #USER DEFINED CHAR ++0xF8CF 0xE66E #USER DEFINED CHAR ++0xF8D0 0xE66F #USER DEFINED CHAR ++0xF8D1 0xE670 #USER DEFINED CHAR ++0xF8D2 0xE671 #USER DEFINED CHAR ++0xF8D3 0xE672 #USER DEFINED CHAR ++0xF8D4 0xE673 #USER DEFINED CHAR ++0xF8D5 0xE674 #USER DEFINED CHAR ++0xF8D6 0xE675 #USER DEFINED CHAR ++0xF8D7 0xE676 #USER DEFINED CHAR ++0xF8D8 0xE677 #USER DEFINED CHAR ++0xF8D9 0xE678 #USER DEFINED CHAR ++0xF8DA 0xE679 #USER DEFINED CHAR ++0xF8DB 0xE67A #USER DEFINED CHAR ++0xF8DC 0xE67B #USER DEFINED CHAR ++0xF8DD 0xE67C #USER DEFINED CHAR ++0xF8DE 0xE67D #USER DEFINED CHAR ++0xF8DF 0xE67E #USER DEFINED CHAR ++0xF8E0 0xE67F #USER DEFINED CHAR ++0xF8E1 0xE680 #USER DEFINED CHAR ++0xF8E2 0xE681 #USER DEFINED CHAR ++0xF8E3 0xE682 #USER DEFINED CHAR ++0xF8E4 0xE683 #USER DEFINED CHAR ++0xF8E5 0xE684 #USER DEFINED CHAR ++0xF8E6 0xE685 #USER DEFINED CHAR ++0xF8E7 0xE686 #USER DEFINED CHAR ++0xF8E8 0xE687 #USER DEFINED CHAR ++0xF8E9 0xE688 #USER DEFINED CHAR ++0xF8EA 0xE689 #USER DEFINED CHAR ++0xF8EB 0xE68A #USER DEFINED CHAR ++0xF8EC 0xE68B #USER DEFINED CHAR ++0xF8ED 0xE68C #USER DEFINED CHAR ++0xF8EE 0xE68D #USER DEFINED CHAR ++0xF8EF 0xE68E #USER DEFINED CHAR ++0xF8F0 0xE68F #USER DEFINED CHAR ++0xF8F1 0xE690 #USER DEFINED CHAR ++0xF8F2 0xE691 #USER DEFINED CHAR ++0xF8F3 0xE692 #USER DEFINED CHAR ++0xF8F4 0xE693 #USER DEFINED CHAR ++0xF8F5 0xE694 #USER DEFINED CHAR ++0xF8F6 0xE695 #USER DEFINED CHAR ++0xF8F7 0xE696 #USER DEFINED CHAR ++0xF8F8 0xE697 #USER DEFINED CHAR ++0xF8F9 0xE698 #USER DEFINED CHAR ++0xF8FA 0xE699 #USER DEFINED CHAR ++0xF8FB 0xE69A #USER DEFINED CHAR ++0xF8FC 0xE69B #USER DEFINED CHAR ++0xF940 0xE69C #USER DEFINED CHAR ++0xF941 0xE69D #USER DEFINED CHAR ++0xF942 0xE69E #USER DEFINED CHAR ++0xF943 0xE69F #USER DEFINED CHAR ++0xF944 0xE6A0 #USER DEFINED CHAR ++0xF945 0xE6A1 #USER DEFINED CHAR ++0xF946 0xE6A2 #USER DEFINED CHAR ++0xF947 0xE6A3 #USER DEFINED CHAR ++0xF948 0xE6A4 #USER DEFINED CHAR ++0xF949 0xE6A5 #USER DEFINED CHAR ++0xF94A 0xE6A6 #USER DEFINED CHAR ++0xF94B 0xE6A7 #USER DEFINED CHAR ++0xF94C 0xE6A8 #USER DEFINED CHAR ++0xF94D 0xE6A9 #USER DEFINED CHAR ++0xF94E 0xE6AA #USER DEFINED CHAR ++0xF94F 0xE6AB #USER DEFINED CHAR ++0xF950 0xE6AC #USER DEFINED CHAR ++0xF951 0xE6AD #USER DEFINED CHAR ++0xF952 0xE6AE #USER DEFINED CHAR ++0xF953 0xE6AF #USER DEFINED CHAR ++0xF954 0xE6B0 #USER DEFINED CHAR ++0xF955 0xE6B1 #USER DEFINED CHAR ++0xF956 0xE6B2 #USER DEFINED CHAR ++0xF957 0xE6B3 #USER DEFINED CHAR ++0xF958 0xE6B4 #USER DEFINED CHAR ++0xF959 0xE6B5 #USER DEFINED CHAR ++0xF95A 0xE6B6 #USER DEFINED CHAR ++0xF95B 0xE6B7 #USER DEFINED CHAR ++0xF95C 0xE6B8 #USER DEFINED CHAR ++0xF95D 0xE6B9 #USER DEFINED CHAR ++0xF95E 0xE6BA #USER DEFINED CHAR ++0xF95F 0xE6BB #USER DEFINED CHAR ++0xF960 0xE6BC #USER DEFINED CHAR ++0xF961 0xE6BD #USER DEFINED CHAR ++0xF962 0xE6BE #USER DEFINED CHAR ++0xF963 0xE6BF #USER DEFINED CHAR ++0xF964 0xE6C0 #USER DEFINED CHAR ++0xF965 0xE6C1 #USER DEFINED CHAR ++0xF966 0xE6C2 #USER DEFINED CHAR ++0xF967 0xE6C3 #USER DEFINED CHAR ++0xF968 0xE6C4 #USER DEFINED CHAR ++0xF969 0xE6C5 #USER DEFINED CHAR ++0xF96A 0xE6C6 #USER DEFINED CHAR ++0xF96B 0xE6C7 #USER DEFINED CHAR ++0xF96C 0xE6C8 #USER DEFINED CHAR ++0xF96D 0xE6C9 #USER DEFINED CHAR ++0xF96E 0xE6CA #USER DEFINED CHAR ++0xF96F 0xE6CB #USER DEFINED CHAR ++0xF970 0xE6CC #USER DEFINED CHAR ++0xF971 0xE6CD #USER DEFINED CHAR ++0xF972 0xE6CE #USER DEFINED CHAR ++0xF973 0xE6CF #USER DEFINED CHAR ++0xF974 0xE6D0 #USER DEFINED CHAR ++0xF975 0xE6D1 #USER DEFINED CHAR ++0xF976 0xE6D2 #USER DEFINED CHAR ++0xF977 0xE6D3 #USER DEFINED CHAR ++0xF978 0xE6D4 #USER DEFINED CHAR ++0xF979 0xE6D5 #USER DEFINED CHAR ++0xF97A 0xE6D6 #USER DEFINED CHAR ++0xF97B 0xE6D7 #USER DEFINED CHAR ++0xF97C 0xE6D8 #USER DEFINED CHAR ++0xF97D 0xE6D9 #USER DEFINED CHAR ++0xF97E 0xE6DA #USER DEFINED CHAR ++0xF980 0xE6DB #USER DEFINED CHAR ++0xF981 0xE6DC #USER DEFINED CHAR ++0xF982 0xE6DD #USER DEFINED CHAR ++0xF983 0xE6DE #USER DEFINED CHAR ++0xF984 0xE6DF #USER DEFINED CHAR ++0xF985 0xE6E0 #USER DEFINED CHAR ++0xF986 0xE6E1 #USER DEFINED CHAR ++0xF987 0xE6E2 #USER DEFINED CHAR ++0xF988 0xE6E3 #USER DEFINED CHAR ++0xF989 0xE6E4 #USER DEFINED CHAR ++0xF98A 0xE6E5 #USER DEFINED CHAR ++0xF98B 0xE6E6 #USER DEFINED CHAR ++0xF98C 0xE6E7 #USER DEFINED CHAR ++0xF98D 0xE6E8 #USER DEFINED CHAR ++0xF98E 0xE6E9 #USER DEFINED CHAR ++0xF98F 0xE6EA #USER DEFINED CHAR ++0xF990 0xE6EB #USER DEFINED CHAR ++0xF991 0xE6EC #USER DEFINED CHAR ++0xF992 0xE6ED #USER DEFINED CHAR ++0xF993 0xE6EE #USER DEFINED CHAR ++0xF994 0xE6EF #USER DEFINED CHAR ++0xF995 0xE6F0 #USER DEFINED CHAR ++0xF996 0xE6F1 #USER DEFINED CHAR ++0xF997 0xE6F2 #USER DEFINED CHAR ++0xF998 0xE6F3 #USER DEFINED CHAR ++0xF999 0xE6F4 #USER DEFINED CHAR ++0xF99A 0xE6F5 #USER DEFINED CHAR ++0xF99B 0xE6F6 #USER DEFINED CHAR ++0xF99C 0xE6F7 #USER DEFINED CHAR ++0xF99D 0xE6F8 #USER DEFINED CHAR ++0xF99E 0xE6F9 #USER DEFINED CHAR ++0xF99F 0xE6FA #USER DEFINED CHAR ++0xF9A0 0xE6FB #USER DEFINED CHAR ++0xF9A1 0xE6FC #USER DEFINED CHAR ++0xF9A2 0xE6FD #USER DEFINED CHAR ++0xF9A3 0xE6FE #USER DEFINED CHAR ++0xF9A4 0xE6FF #USER DEFINED CHAR ++0xF9A5 0xE700 #USER DEFINED CHAR ++0xF9A6 0xE701 #USER DEFINED CHAR ++0xF9A7 0xE702 #USER DEFINED CHAR ++0xF9A8 0xE703 #USER DEFINED CHAR ++0xF9A9 0xE704 #USER DEFINED CHAR ++0xF9AA 0xE705 #USER DEFINED CHAR ++0xF9AB 0xE706 #USER DEFINED CHAR ++0xF9AC 0xE707 #USER DEFINED CHAR ++0xF9AD 0xE708 #USER DEFINED CHAR ++0xF9AE 0xE709 #USER DEFINED CHAR ++0xF9AF 0xE70A #USER DEFINED CHAR ++0xF9B0 0xE70B #USER DEFINED CHAR ++0xF9B1 0xE70C #USER DEFINED CHAR ++0xF9B2 0xE70D #USER DEFINED CHAR ++0xF9B3 0xE70E #USER DEFINED CHAR ++0xF9B4 0xE70F #USER DEFINED CHAR ++0xF9B5 0xE710 #USER DEFINED CHAR ++0xF9B6 0xE711 #USER DEFINED CHAR ++0xF9B7 0xE712 #USER DEFINED CHAR ++0xF9B8 0xE713 #USER DEFINED CHAR ++0xF9B9 0xE714 #USER DEFINED CHAR ++0xF9BA 0xE715 #USER DEFINED CHAR ++0xF9BB 0xE716 #USER DEFINED CHAR ++0xF9BC 0xE717 #USER DEFINED CHAR ++0xF9BD 0xE718 #USER DEFINED CHAR ++0xF9BE 0xE719 #USER DEFINED CHAR ++0xF9BF 0xE71A #USER DEFINED CHAR ++0xF9C0 0xE71B #USER DEFINED CHAR ++0xF9C1 0xE71C #USER DEFINED CHAR ++0xF9C2 0xE71D #USER DEFINED CHAR ++0xF9C3 0xE71E #USER DEFINED CHAR ++0xF9C4 0xE71F #USER DEFINED CHAR ++0xF9C5 0xE720 #USER DEFINED CHAR ++0xF9C6 0xE721 #USER DEFINED CHAR ++0xF9C7 0xE722 #USER DEFINED CHAR ++0xF9C8 0xE723 #USER DEFINED CHAR ++0xF9C9 0xE724 #USER DEFINED CHAR ++0xF9CA 0xE725 #USER DEFINED CHAR ++0xF9CB 0xE726 #USER DEFINED CHAR ++0xF9CC 0xE727 #USER DEFINED CHAR ++0xF9CD 0xE728 #USER DEFINED CHAR ++0xF9CE 0xE729 #USER DEFINED CHAR ++0xF9CF 0xE72A #USER DEFINED CHAR ++0xF9D0 0xE72B #USER DEFINED CHAR ++0xF9D1 0xE72C #USER DEFINED CHAR ++0xF9D2 0xE72D #USER DEFINED CHAR ++0xF9D3 0xE72E #USER DEFINED CHAR ++0xF9D4 0xE72F #USER DEFINED CHAR ++0xF9D5 0xE730 #USER DEFINED CHAR ++0xF9D6 0xE731 #USER DEFINED CHAR ++0xF9D7 0xE732 #USER DEFINED CHAR ++0xF9D8 0xE733 #USER DEFINED CHAR ++0xF9D9 0xE734 #USER DEFINED CHAR ++0xF9DA 0xE735 #USER DEFINED CHAR ++0xF9DB 0xE736 #USER DEFINED CHAR ++0xF9DC 0xE737 #USER DEFINED CHAR ++0xF9DD 0xE738 #USER DEFINED CHAR ++0xF9DE 0xE739 #USER DEFINED CHAR ++0xF9DF 0xE73A #USER DEFINED CHAR ++0xF9E0 0xE73B #USER DEFINED CHAR ++0xF9E1 0xE73C #USER DEFINED CHAR ++0xF9E2 0xE73D #USER DEFINED CHAR ++0xF9E3 0xE73E #USER DEFINED CHAR ++0xF9E4 0xE73F #USER DEFINED CHAR ++0xF9E5 0xE740 #USER DEFINED CHAR ++0xF9E6 0xE741 #USER DEFINED CHAR ++0xF9E7 0xE742 #USER DEFINED CHAR ++0xF9E8 0xE743 #USER DEFINED CHAR ++0xF9E9 0xE744 #USER DEFINED CHAR ++0xF9EA 0xE745 #USER DEFINED CHAR ++0xF9EB 0xE746 #USER DEFINED CHAR ++0xF9EC 0xE747 #USER DEFINED CHAR ++0xF9ED 0xE748 #USER DEFINED CHAR ++0xF9EE 0xE749 #USER DEFINED CHAR ++0xF9EF 0xE74A #USER DEFINED CHAR ++0xF9F0 0xE74B #USER DEFINED CHAR ++0xF9F1 0xE74C #USER DEFINED CHAR ++0xF9F2 0xE74D #USER DEFINED CHAR ++0xF9F3 0xE74E #USER DEFINED CHAR ++0xF9F4 0xE74F #USER DEFINED CHAR ++0xF9F5 0xE750 #USER DEFINED CHAR ++0xF9F6 0xE751 #USER DEFINED CHAR ++0xF9F7 0xE752 #USER DEFINED CHAR ++0xF9F8 0xE753 #USER DEFINED CHAR ++0xF9F9 0xE754 #USER DEFINED CHAR ++0xF9FA 0xE755 #USER DEFINED CHAR ++0xF9FB 0xE756 #USER DEFINED CHAR ++0xF9FC 0xE757 #USER DEFINED CHAR + 0xFA40 0x2170 #SMALL ROMAN NUMERAL ONE + 0xFA41 0x2171 #SMALL ROMAN NUMERAL TWO + 0xFA42 0x2172 #SMALL ROMAN NUMERAL THREE diff --git a/net/samba/patches/102-cp1251.patch b/net/samba/patches/102-cp1251.patch new file mode 100644 index 0000000..59e090a --- /dev/null +++ b/net/samba/patches/102-cp1251.patch @@ -0,0 +1,54 @@ +diff -ruN samba-2.0.10/source/lib/charcnv.c samba-2.2.10/source/lib/charcnv.c +--- samba-2.0.10/source/lib/charcnv.c 2000-03-16 17:59:14.000000000 -0500 ++++ samba-2.2.10/source/lib/charcnv.c 2004-07-21 11:04:42.000000000 -0400 +@@ -191,6 +191,39 @@ + update_map("\370\234\371\233\372\207\373\230\374\235\375\231\376\227\377\232"); + } + ++/* Init for Bulgarian, Belarussian, and variants of Russian and Ukrainian locales */ ++/* Patch from Alexander Bokovoy. */ ++ ++static void init_1251(int codepage) ++{ ++ setupmaps(); ++ ++ if (codepage == 866) { ++/* MSDOS Code Page 866 -> 1251 */ ++update_map ("\240\377\241\366\242\367\244\375"); ++update_map ("\250\360\252\362\257\364"); ++update_map ("\260\370\267\372"); ++update_map ("\270\361\271\374\272\363\277\365"); ++update_map ("\300\200\301\201\302\202\303\203\304\204\305\205\306\206\307\207"); ++update_map ("\310\210\311\211\312\212\313\213\314\214\315\215\316\216\317\217"); ++update_map ("\320\220\321\221\322\222\323\223\324\224\325\225\326\226\327\227"); ++update_map ("\330\230\331\231\332\232\333\233\334\234\335\235\336\236\337\237"); ++update_map ("\340\240\341\241\342\242\343\243\344\244\345\245\346\246\347\247"); ++update_map ("\350\250\351\251\352\252\353\253\354\254\355\255\356\256\357\257"); ++update_map ("\360\340\361\341\362\342\363\343\364\344\365\345\366\346\367\347"); ++update_map ("\370\350\371\351\372\352\373\353\374\354\375\355\376\356\377\357"); ++ } else { ++/* MSDOS Code Page 1125 (Ukranian) -> 1251 */ ++update_map ("\271\374\270\361\360\340\361\341\340\240\362\342\341\241\320\220"); ++update_map ("\272\365\363\343\342\242\321\221\300\200\364\344\343\243\322\222"); ++update_map ("\301\201\263\367\250\360\365\345\344\244\323\223\302\202\277\371"); ++update_map ("\366\346\345\245\324\224\303\203\367\347\346\246\325\225\304\204"); ++update_map ("\252\364\370\350\347\247\326\226\305\205\371\351\350\250\327\227"); ++update_map ("\306\206\262\366\351\251\330\230\307\207\257\370\331\231\310\210"); ++update_map ("\311\211\245\362\264\363"); ++ } ++} ++ + + /* Init for ROMAN-8 (HP-UX) */ + +@@ -275,6 +308,10 @@ + init_iso8859_7(); + } else if (strequal (str, "koi8-r")) { + init_koi8_r(); ++ } else if (strequal (str, "1251u")) { ++ init_1251(1125); ++ } else if (strequal (str, "1251")) { ++ init_1251(866); + } else if (strequal (str, "roman8")) { + init_roman8(); + } else { diff --git a/net/samba/patches/103-cp775.patch b/net/samba/patches/103-cp775.patch new file mode 100644 index 0000000..5242791 --- /dev/null +++ b/net/samba/patches/103-cp775.patch @@ -0,0 +1,40 @@ +--- ./source/lib/charcnv.c 2009-07-01 13:42:20.000000000 +0300 ++++ ./source/lib.new/charcnv.c 2009-07-01 13:53:19.000000000 +0300 +@@ -166,6 +166,28 @@ + update_map("\270\353\271\354\272\355\274\356\276\357\277\360"); + } + ++/* init for Baltic Rim */ ++/* Patch from Zintis Petersons. */ ++ ++static void init_iso8859_13(void) { ++ ++ setupmaps(); ++ ++ /* MSDOS Code Page 775 -> ISO-8859-13 */ ++update_map("\240\377\241\246\242\226\243\234\244\237\245\367\246\247\247\365"); ++update_map("\250\235\251\250\252\212\253\256\254\252\255\360\256\251\257\222"); ++update_map("\260\370\261\361\262\375\263\374\264\362\265\346\266\364\267\372"); ++update_map("\270\233\271\373\272\213\273\257\274\254\275\253\276\363\277\221"); ++update_map("\300\265\301\275\302\240\303\200\304\216\305\217\306\267\307\355"); ++update_map("\310\266\311\220\312\215\313\270\314\225\315\350\316\241\317\352"); ++update_map("\320\276\321\343\322\356\323\340\324\342\325\345\326\231\327\236"); ++update_map("\330\306\331\255\332\227\333\307\334\232\335\243\336\317\337\341"); ++update_map("\340\320\341\324\342\203\343\207\344\204\345\206\346\322\347\211"); ++update_map("\350\321\351\202\352\245\353\323\354\205\355\351\356\214\357\353"); ++update_map("\360\325\361\347\362\354\363\242\364\223\365\344\366\224\367\366"); ++update_map("\370\326\371\210\372\230\373\327\374\201\375\244\376\330\377\357"); ++} ++ + /* Init for russian language (koi8) */ + + static void init_koi8_r(void) +@@ -306,6 +328,8 @@ + init_iso8859_5(); + } else if (strequal (str, "iso8859-7")) { + init_iso8859_7(); ++ } else if (strequal (str, "iso8859-13")) { ++ init_iso8859_13(); + } else if (strequal (str, "koi8-r")) { + init_koi8_r(); + } else if (strequal (str, "1251u")) { diff --git a/net/samba/patches/200-security.patch b/net/samba/patches/200-security.patch new file mode 100644 index 0000000..8e51549 --- /dev/null +++ b/net/samba/patches/200-security.patch @@ -0,0 +1,606 @@ +diff -ruN samba-2.0.10.orig/source/include/smb.h samba-2.0.10/source/include/smb.h +--- samba-2.0.10.orig/source/include/smb.h 2006-03-06 22:25:08.000000000 +0100 ++++ samba-2.0.10/source/include/smb.h 2006-03-06 22:25:53.000000000 +0100 +@@ -272,6 +272,7 @@ + #define ERRlock 33 /* Lock request conflicts with existing lock */ + #define ERRunsup 50 /* Request unsupported, returned by Win 95, RJS 20Jun98 */ + #define ERRfilexists 80 /* File in operation already exists */ ++#define ERRinvalidparam 87 + #define ERRcannotopen 110 /* Cannot open the file specified */ + #define ERRunknownlevel 124 + #define ERRrename 183 +@@ -1911,4 +1912,7 @@ + + #define SAFE_NETBIOS_CHARS ". -_" + ++#ifndef SAFE_FREE ++#define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} } while(0) ++#endif + #endif /* _SMB_H */ +diff -ruN samba-2.0.10.orig/source/include/version.h samba-2.0.10/source/include/version.h +--- samba-2.0.10.orig/source/include/version.h 2001-06-23 15:23:59.000000000 +0200 ++++ samba-2.0.10/source/include/version.h 2006-03-06 22:25:53.000000000 +0100 +@@ -1 +1 @@ +-#define VERSION "2.0.10" ++#define VERSION "2.0.10-security-rollup" +diff -ruN samba-2.0.10.orig/source/smbd/filename.c samba-2.0.10/source/smbd/filename.c +--- samba-2.0.10.orig/source/smbd/filename.c 2000-03-16 23:59:44.000000000 +0100 ++++ samba-2.0.10/source/smbd/filename.c 2006-03-06 22:25:53.000000000 +0100 +@@ -172,7 +172,7 @@ + * StrnCpy always null terminates. + */ + +- StrnCpy(orig_name, full_orig_name, namelen); ++ StrnCpy(orig_name, full_orig_name, MIN(namelen, sizeof(orig_name)-1)); + if(!case_sensitive) + strupper( orig_name ); + +diff -ruN samba-2.0.10.orig/source/smbd/ipc.c samba-2.0.10/source/smbd/ipc.c +--- samba-2.0.10.orig/source/smbd/ipc.c 2006-03-06 22:25:08.000000000 +0100 ++++ samba-2.0.10/source/smbd/ipc.c 2006-03-06 22:25:53.000000000 +0100 +@@ -3556,18 +3556,18 @@ + uint16 *setup=NULL; + int outsize = 0; + uint16 vuid = SVAL(inbuf,smb_uid); +- int tpscnt = SVAL(inbuf,smb_vwv0); +- int tdscnt = SVAL(inbuf,smb_vwv1); +- int mprcnt = SVAL(inbuf,smb_vwv2); +- int mdrcnt = SVAL(inbuf,smb_vwv3); +- int msrcnt = CVAL(inbuf,smb_vwv4); ++ unsigned int tpscnt = SVAL(inbuf,smb_vwv0); ++ unsigned int tdscnt = SVAL(inbuf,smb_vwv1); ++ unsigned int mprcnt = SVAL(inbuf,smb_vwv2); ++ unsigned int mdrcnt = SVAL(inbuf,smb_vwv3); ++ unsigned int msrcnt = CVAL(inbuf,smb_vwv4); + BOOL close_on_completion = BITSETW(inbuf+smb_vwv5,0); + BOOL one_way = BITSETW(inbuf+smb_vwv5,1); +- int pscnt = SVAL(inbuf,smb_vwv9); +- int psoff = SVAL(inbuf,smb_vwv10); +- int dscnt = SVAL(inbuf,smb_vwv11); +- int dsoff = SVAL(inbuf,smb_vwv12); +- int suwcnt = CVAL(inbuf,smb_vwv13); ++ unsigned int pscnt = SVAL(inbuf,smb_vwv9); ++ unsigned int psoff = SVAL(inbuf,smb_vwv10); ++ unsigned int dscnt = SVAL(inbuf,smb_vwv11); ++ unsigned int dsoff = SVAL(inbuf,smb_vwv12); ++ unsigned int suwcnt = CVAL(inbuf,smb_vwv13); + + memset(name, '\0',sizeof(name)); + fstrcpy(name,smb_buf(inbuf)); +@@ -3578,26 +3578,44 @@ + + if (tdscnt) { + if((data = (char *)malloc(tdscnt)) == NULL) { +- DEBUG(0,("reply_trans: data malloc fail for %d bytes !\n", tdscnt)); ++ DEBUG(0,("reply_trans: data malloc fail for %u bytes !\n", tdscnt)); + return(ERROR(ERRDOS,ERRnomem)); + } ++ if ((dsoff+dscnt < dsoff) || (dsoff+dscnt < dscnt)) ++ goto bad_param; ++ if (smb_base(inbuf)+dsoff+dscnt > inbuf + size) ++ goto bad_param; ++ + memcpy(data,smb_base(inbuf)+dsoff,dscnt); + } + + if (tpscnt) { + if((params = (char *)malloc(tpscnt)) == NULL) { +- DEBUG(0,("reply_trans: param malloc fail for %d bytes !\n", tpscnt)); ++ DEBUG(0,("reply_trans: param malloc fail for %u bytes !\n", tpscnt)); ++ SAFE_FREE(data); + return(ERROR(ERRDOS,ERRnomem)); + } ++ if ((psoff+pscnt < psoff) || (psoff+pscnt < pscnt)) ++ goto bad_param; ++ if (smb_base(inbuf)+psoff+pscnt > inbuf + size) ++ goto bad_param; ++ + memcpy(params,smb_base(inbuf)+psoff,pscnt); + } + + if (suwcnt) { + int i; + if((setup = (uint16 *)malloc(suwcnt*sizeof(uint16))) == NULL) { +- DEBUG(0,("reply_trans: setup malloc fail for %d bytes !\n", (int)(suwcnt * sizeof(uint16)))); +- return(ERROR(ERRDOS,ERRnomem)); +- } ++ DEBUG(0,("reply_trans: setup malloc fail for %u bytes !\n", (unsigned int)(suwcnt * sizeof(uint16)))); ++ SAFE_FREE(data); ++ SAFE_FREE(params); ++ return(ERROR(ERRDOS,ERRnomem)); ++ } ++ if (inbuf+smb_vwv14+(suwcnt*SIZEOFWORD) > inbuf + size) ++ goto bad_param; ++ if ((smb_vwv14+(suwcnt*SIZEOFWORD) < smb_vwv14) || (smb_vwv14+(suwcnt*SIZEOFWORD) < (suwcnt*SIZEOFWORD))) ++ goto bad_param; ++ + for (i=0;i tdscnt || pscnt > tpscnt) { +- exit_server("invalid trans parameters\n"); +- } ++ if (dscnt > tdscnt || pscnt > tpscnt) ++ goto bad_param; + +- if (pcnt) ++ if (pcnt) { ++ if (pdisp+pcnt >= tpscnt) ++ goto bad_param; ++ if ((pdisp+pcnt < pdisp) || (pdisp+pcnt < pcnt)) ++ goto bad_param; ++ if (smb_base(inbuf) + poff + pcnt >= inbuf + bufsize) ++ goto bad_param; ++ if (params + pdisp < params) ++ goto bad_param; ++ + memcpy(params+pdisp,smb_base(inbuf)+poff,pcnt); +- if (dcnt) ++ } ++ ++ if (dcnt) { ++ if (ddisp+dcnt >= tdscnt) ++ goto bad_param; ++ if ((ddisp+dcnt < ddisp) || (ddisp+dcnt < dcnt)) ++ goto bad_param; ++ if (smb_base(inbuf) + doff + dcnt >= inbuf + bufsize) ++ goto bad_param; ++ if (data + ddisp < data) ++ goto bad_param; ++ + memcpy(data+ddisp,smb_base(inbuf)+doff,dcnt); ++ } + } +- +- ++ + DEBUG(3,("trans <%s> data=%d params=%d setup=%d\n", + name,tdscnt,tpscnt,suwcnt)); + +@@ -3700,4 +3737,12 @@ + return(ERROR(ERRSRV,ERRnosupport)); + + return(outsize); ++ ++ bad_param: ++ ++ DEBUG(0,("reply_trans: invalid trans parameters\n")); ++ SAFE_FREE(data); ++ SAFE_FREE(params); ++ SAFE_FREE(setup); ++ return(ERROR(ERRSRV,ERRerror)); + } +diff -ruN samba-2.0.10.orig/source/smbd/nttrans.c samba-2.0.10/source/smbd/nttrans.c +--- samba-2.0.10.orig/source/smbd/nttrans.c 2000-04-24 19:27:30.000000000 +0200 ++++ samba-2.0.10/source/smbd/nttrans.c 2006-03-06 22:25:53.000000000 +0100 +@@ -2575,11 +2575,14 @@ + params = (char *)malloc(total_parameter_count); + if (total_data_count > 0) + data = (char *)malloc(total_data_count); +- ++ + if ((total_parameter_count && !params) || (total_data_count && !data) || + (setup_count && !setup)) { ++ SAFE_FREE(setup); ++ SAFE_FREE(params); ++ SAFE_FREE(data); + DEBUG(0,("reply_nttrans : Out of memory\n")); +- return(ERROR(ERRDOS,ERRnomem)); ++ return ERROR(ERRDOS,ERRnomem); + } + + /* Copy the param and data bytes sent with this request into +@@ -2588,64 +2591,112 @@ + num_data_sofar = data_count; + + if (parameter_count > total_parameter_count || data_count > total_data_count) +- exit_server("reply_nttrans: invalid sizes in packet.\n"); ++ goto bad_param; + + if(setup) { +- memcpy( setup, &inbuf[smb_nt_SetupStart], setup_count); + DEBUG(10,("reply_nttrans: setup_count = %d\n", setup_count)); +- dump_data(10, setup, setup_count); ++ if ((smb_nt_SetupStart + setup_count < smb_nt_SetupStart) || ++ (smb_nt_SetupStart + setup_count < setup_count)) ++ goto bad_param; ++ if (smb_nt_SetupStart + setup_count > length) ++ goto bad_param; ++ ++ memcpy( setup, &inbuf[smb_nt_SetupStart], setup_count); + } + if(params) { +- memcpy( params, smb_base(inbuf) + parameter_offset, parameter_count); + DEBUG(10,("reply_nttrans: parameter_count = %d\n", parameter_count)); +- dump_data(10, params, parameter_count); ++ if ((parameter_offset + parameter_count < parameter_offset) || ++ (parameter_offset + parameter_count < parameter_count)) ++ goto bad_param; ++ if (smb_base(inbuf) + parameter_offset + parameter_count > inbuf + length) ++ goto bad_param; ++ ++ memcpy( params, smb_base(inbuf) + parameter_offset, parameter_count); + } + if(data) { +- memcpy( data, smb_base(inbuf) + data_offset, data_count); + DEBUG(10,("reply_nttrans: data_count = %d\n",data_count)); +- dump_data(10, data, data_count); ++ if ((data_offset + data_count < data_offset) || (data_offset + data_count < data_count)) ++ goto bad_param; ++ if (smb_base(inbuf) + data_offset + data_count > inbuf + length) ++ goto bad_param; ++ ++ memcpy( data, smb_base(inbuf) + data_offset, data_count); ++ + } + + if(num_data_sofar < total_data_count || num_params_sofar < total_parameter_count) { + /* We need to send an interim response then receive the rest + of the parameter/data bytes */ + outsize = set_message(outbuf,0,0,True); +- send_smb(Client,outbuf); ++ if (!send_smb(Client,outbuf)) ++ exit_server("reply_nttrans: send_smb failed."); + + while( num_data_sofar < total_data_count || num_params_sofar < total_parameter_count) { + BOOL ret; +- ++ uint32 parameter_displacement; ++ uint32 data_displacement; ++ + ret = receive_next_smb(inbuf,bufsize,SMB_SECONDARY_WAIT); +- ++ + if((ret && (CVAL(inbuf, smb_com) != SMBnttranss)) || !ret) { +- outsize = set_message(outbuf,0,0,True); +- if(ret) { +- DEBUG(0,("reply_nttrans: Invalid secondary nttrans packet\n")); +- } else { +- DEBUG(0,("reply_nttrans: %s in getting secondary nttrans response.\n", +- (smb_read_error == READ_ERROR) ? "error" : "timeout" )); ++ outsize = set_message(outbuf,0,0,True); ++ if(ret) { ++ DEBUG(0,("reply_nttrans: Invalid secondary nttrans packet\n")); ++ } else { ++ DEBUG(0,("reply_nttrans: %s in getting secondary nttrans response.\n", ++ (smb_read_error == READ_ERROR) ? "error" : "timeout" )); + } +- if(params) +- free(params); +- if(data) +- free(data); +- if(setup) +- free(setup); +- return(ERROR(ERRSRV,ERRerror)); ++ goto bad_param; + } + + /* Revise total_params and total_data in case they have changed downwards */ +- total_parameter_count = IVAL(inbuf, smb_nts_TotalParameterCount); +- total_data_count = IVAL(inbuf, smb_nts_TotalDataCount); +- num_params_sofar += (parameter_count = IVAL(inbuf,smb_nts_ParameterCount)); +- num_data_sofar += ( data_count = IVAL(inbuf, smb_nts_DataCount)); +- if (num_params_sofar > total_parameter_count || num_data_sofar > total_data_count) +- exit_server("reply_nttrans2: data overflow in secondary nttrans packet\n"); +- +- memcpy( ¶ms[ IVAL(inbuf, smb_nts_ParameterDisplacement)], +- smb_base(inbuf) + IVAL(inbuf, smb_nts_ParameterOffset), parameter_count); +- memcpy( &data[IVAL(inbuf, smb_nts_DataDisplacement)], +- smb_base(inbuf)+ IVAL(inbuf, smb_nts_DataOffset), data_count); ++ if (IVAL(inbuf, smb_nts_TotalParameterCount) < total_parameter_count) ++ total_parameter_count = IVAL(inbuf, smb_nts_TotalParameterCount); ++ if (IVAL(inbuf, smb_nts_TotalDataCount) < total_data_count) ++ total_data_count = IVAL(inbuf, smb_nts_TotalDataCount); ++ ++ parameter_count = IVAL(inbuf,smb_nts_ParameterCount); ++ parameter_offset = IVAL(inbuf, smb_nts_ParameterOffset); ++ parameter_displacement = IVAL(inbuf, smb_nts_ParameterDisplacement); ++ num_params_sofar += parameter_count; ++ ++ data_count = IVAL(inbuf, smb_nts_DataCount); ++ data_displacement = IVAL(inbuf, smb_nts_DataDisplacement); ++ data_offset = IVAL(inbuf, smb_nts_DataOffset); ++ num_data_sofar += data_count; ++ ++ if (num_params_sofar > total_parameter_count || num_data_sofar > total_data_count) { ++ DEBUG(0,("reply_nttrans2: data overflow in secondary nttrans packet")); ++ goto bad_param; ++ } ++ ++ if (parameter_count) { ++ if (parameter_displacement + parameter_count >= total_parameter_count) ++ goto bad_param; ++ if ((parameter_displacement + parameter_count < parameter_displacement) || ++ (parameter_displacement + parameter_count < parameter_count)) ++ goto bad_param; ++ if (smb_base(inbuf) + parameter_offset + parameter_count >= inbuf + bufsize) ++ goto bad_param; ++ if (params + parameter_displacement < params) ++ goto bad_param; ++ ++ memcpy( ¶ms[parameter_displacement], smb_base(inbuf) + parameter_offset, parameter_count); ++ } ++ ++ if (data_count) { ++ if (data_displacement + data_count >= total_data_count) ++ goto bad_param; ++ if ((data_displacement + data_count < data_displacement) || ++ (data_displacement + data_count < data_count)) ++ goto bad_param; ++ if (smb_base(inbuf) + data_offset + data_count >= inbuf + bufsize) ++ goto bad_param; ++ if (data + data_displacement < data) ++ goto bad_param; ++ ++ memcpy( &data[data_displacement], smb_base(inbuf)+ data_offset, data_count); ++ } + } + } + +@@ -2714,4 +2765,10 @@ + return outsize; /* If a correct response was needed the call_nt_transact_xxxx + calls have already sent it. If outsize != -1 then it is + returning an error packet. */ ++ bad_param: ++ ++ SAFE_FREE(params); ++ SAFE_FREE(data); ++ SAFE_FREE(setup); ++ return ERROR(ERRDOS,ERRinvalidparam); + } +diff -ruN samba-2.0.10.orig/source/smbd/password.c samba-2.0.10/source/smbd/password.c +--- samba-2.0.10.orig/source/smbd/password.c 2006-03-06 22:25:08.000000000 +0100 ++++ samba-2.0.10/source/smbd/password.c 2006-03-06 22:25:53.000000000 +0100 +@@ -770,7 +770,7 @@ + if (!ok && lp_username(snum)) { + char *auser; + pstring user_list; +- StrnCpy(user_list,lp_username(snum),sizeof(pstring)); ++ StrnCpy(user_list,lp_username(snum),sizeof(pstring)-1); + + pstring_sub(user_list,"%S",lp_servicename(snum)); + +diff -ruN samba-2.0.10.orig/source/smbd/reply.c samba-2.0.10/source/smbd/reply.c +--- samba-2.0.10.orig/source/smbd/reply.c 2006-03-06 22:25:08.000000000 +0100 ++++ samba-2.0.10/source/smbd/reply.c 2006-03-06 22:25:53.000000000 +0100 +@@ -1413,6 +1413,9 @@ + + for (i=numentries;(i BUFFER_SIZE ) ++ break; + finished = + !get_dir_entry(conn,mask,dirtype,fname,&size,&mode,&date,check_descend); + if (!finished) +@@ -3122,6 +3125,9 @@ + + + for (i=first;i BUFFER_SIZE ) ++ break; + put_dos_date2(p,0,queue[i].time); + CVAL(p,4) = (queue[i].status==LPQ_PRINTING?2:3); + SSVAL(p,5,printjob_encode(SNUM(conn), +diff -ruN samba-2.0.10.orig/source/smbd/trans2.c samba-2.0.10/source/smbd/trans2.c +--- samba-2.0.10.orig/source/smbd/trans2.c 2000-04-24 19:27:31.000000000 +0200 ++++ samba-2.0.10/source/smbd/trans2.c 2006-03-06 22:25:53.000000000 +0100 +@@ -201,7 +201,6 @@ + int16 open_ofun = SVAL(params,12); + int32 open_size = IVAL(params,14); + char *pname = ¶ms[28]; +- int16 namelen = strlen(pname)+1; + + pstring fname; + mode_t unixmode; +@@ -213,7 +212,7 @@ + BOOL bad_path = False; + files_struct *fsp; + +- StrnCpy(fname,pname,namelen); ++ pstrcpy(fname,pname); + + DEBUG(3,("trans2open %s mode=%d attr=%d ofun=%d size=%d\n", + fname,open_mode, open_attr, open_ofun, open_size)); +@@ -2185,7 +2184,7 @@ + unsigned int suwcnt = SVAL(inbuf, smb_suwcnt); + unsigned int tran_call = SVAL(inbuf, smb_setup0); + char *params = NULL, *data = NULL; +- int num_params, num_params_sofar, num_data, num_data_sofar; ++ unsigned int num_params, num_params_sofar, num_data, num_data_sofar; + + if(global_oplock_break && (tran_call == TRANSACT2_OPEN)) { + /* Queue this open message as we are the process of an +@@ -2203,8 +2202,9 @@ + /* All trans2 messages we handle have smb_sucnt == 1 - ensure this + is so as a sanity check */ + if (suwcnt != 1) { +- DEBUG(2,("Invalid smb_sucnt in trans2 call\n")); +- return(ERROR(ERRSRV,ERRerror)); ++ DEBUG(2,("Invalid smb_sucnt in trans2 call(%u)\n",suwcnt)); ++ DEBUG(2,("Transaction is %d\n",tran_call)); ++ ERROR(ERRDOS,ERRinvalidparam); + } + + /* Allocate the space for the maximum needed parameters and data */ +@@ -2215,11 +2215,9 @@ + + if ((total_params && !params) || (total_data && !data)) { + DEBUG(2,("Out of memory in reply_trans2\n")); +- if(params) +- free(params); +- if(data) +- free(data); +- return(ERROR(ERRDOS,ERRnomem)); ++ SAFE_FREE(params); ++ SAFE_FREE(data); ++ return ERROR(ERRDOS,ERRnomem); + } + + /* Copy the param and data bytes sent with this request into +@@ -2230,20 +2228,37 @@ + if (num_params > total_params || num_data > total_data) + exit_server("invalid params in reply_trans2"); + +- if(params) +- memcpy( params, smb_base(inbuf) + SVAL(inbuf, smb_psoff), num_params); +- if(data) +- memcpy( data, smb_base(inbuf) + SVAL(inbuf, smb_dsoff), num_data); ++ if(params) { ++ unsigned int psoff = SVAL(inbuf, smb_psoff); ++ if ((psoff + num_params < psoff) || (psoff + num_params < num_params)) ++ goto bad_param; ++ if (smb_base(inbuf) + psoff + num_params > inbuf + length) ++ goto bad_param; ++ memcpy( params, smb_base(inbuf) + psoff, num_params); ++ } ++ if(data) { ++ unsigned int dsoff = SVAL(inbuf, smb_dsoff); ++ if ((dsoff + num_data < dsoff) || (dsoff + num_data < num_data)) ++ goto bad_param; ++ if (smb_base(inbuf) + dsoff + num_data > inbuf + length) ++ goto bad_param; ++ memcpy( data, smb_base(inbuf) + dsoff, num_data); ++ } + + if(num_data_sofar < total_data || num_params_sofar < total_params) { + /* We need to send an interim response then receive the rest + of the parameter/data bytes */ + outsize = set_message(outbuf,0,0,True); +- send_smb(Client,outbuf); ++ if (!send_smb(Client,outbuf)) ++ exit_server("reply_trans2: send_smb failed."); + + while (num_data_sofar < total_data || + num_params_sofar < total_params) { + BOOL ret; ++ unsigned int param_disp; ++ unsigned int param_off; ++ unsigned int data_disp; ++ unsigned int data_off; + + ret = receive_next_smb(inbuf,bufsize,SMB_SECONDARY_WAIT); + +@@ -2255,26 +2270,55 @@ + else + DEBUG(0,("reply_trans2: %s in getting secondary trans2 response.\n", + (smb_read_error == READ_ERROR) ? "error" : "timeout" )); +- if(params) +- free(params); +- if(data) +- free(data); +- return(ERROR(ERRSRV,ERRerror)); ++ goto bad_param; + } + + /* Revise total_params and total_data in case + they have changed downwards */ +- total_params = SVAL(inbuf, smb_tpscnt); +- total_data = SVAL(inbuf, smb_tdscnt); +- num_params_sofar += (num_params = SVAL(inbuf,smb_spscnt)); +- num_data_sofar += ( num_data = SVAL(inbuf, smb_sdscnt)); ++ if (SVAL(inbuf, smb_tpscnt) < total_params) ++ total_params = SVAL(inbuf, smb_tpscnt); ++ if (SVAL(inbuf, smb_tdscnt) < total_data) ++ total_data = SVAL(inbuf, smb_tdscnt); ++ ++ num_params = SVAL(inbuf,smb_spscnt); ++ param_off = SVAL(inbuf, smb_spsoff); ++ param_disp = SVAL(inbuf, smb_spsdisp); ++ num_params_sofar += num_params; ++ ++ num_data = SVAL(inbuf, smb_sdscnt); ++ data_off = SVAL(inbuf, smb_sdsoff); ++ data_disp = SVAL(inbuf, smb_sdsdisp); ++ num_data_sofar += num_data; ++ + if (num_params_sofar > total_params || num_data_sofar > total_data) +- exit_server("data overflow in trans2"); ++ goto bad_param; + +- memcpy( ¶ms[ SVAL(inbuf, smb_spsdisp)], +- smb_base(inbuf) + SVAL(inbuf, smb_spsoff), num_params); +- memcpy( &data[SVAL(inbuf, smb_sdsdisp)], +- smb_base(inbuf)+ SVAL(inbuf, smb_sdsoff), num_data); ++ if (num_params) { ++ if (param_disp + num_params >= total_params) ++ goto bad_param; ++ if ((param_disp + num_params < param_disp) || ++ (param_disp + num_params < num_params)) ++ goto bad_param; ++ if (smb_base(inbuf) + param_off + num_params >= inbuf + bufsize) ++ goto bad_param; ++ if (params + param_disp < params) ++ goto bad_param; ++ ++ memcpy( ¶ms[param_disp], smb_base(inbuf) + param_off, num_params); ++ } ++ if (num_data) { ++ if (data_disp + num_data >= total_data) ++ goto bad_param; ++ if ((data_disp + num_data < data_disp) || ++ (data_disp + num_data < num_data)) ++ goto bad_param; ++ if (smb_base(inbuf) + data_off + num_data >= inbuf + bufsize) ++ goto bad_param; ++ if (data + data_disp < data) ++ goto bad_param; ++ ++ memcpy( &data[data_disp], smb_base(inbuf) + data_off, num_data); ++ } + } + } + +@@ -2367,4 +2411,10 @@ + return outsize; /* If a correct response was needed the + call_trans2xxx calls have already sent + it. If outsize != -1 then it is returning */ ++ ++ bad_param: ++ ++ SAFE_FREE(params); ++ SAFE_FREE(data); ++ return (ERROR(ERRDOS,ERRinvalidparam)); + } diff --git a/net/samba/patches/250-writex.patch b/net/samba/patches/250-writex.patch new file mode 100644 index 0000000..ed0495e --- /dev/null +++ b/net/samba/patches/250-writex.patch @@ -0,0 +1,152 @@ +diff -ruN samba-2.0.10.orig/source/include/smb.h samba-2.0.10/source/include/smb.h +--- samba-2.0.10.orig/source/include/smb.h 2006-03-06 22:25:53.000000000 +0100 ++++ samba-2.0.10/source/include/smb.h 2006-03-06 22:27:31.000000000 +0100 +@@ -24,8 +24,14 @@ + #ifndef _SMB_H + #define _SMB_H + ++#if defined(LARGE_SMB_OFF_T) ++#define BUFFER_SIZE (128*1024) ++#else /* no large readwrite possible */ + #define BUFFER_SIZE (0xFFFF) ++#endif ++ + #define SAFETY_MARGIN 1024 ++#define LARGE_WRITEX_HDR_SIZE 65 + + #define NMB_PORT 137 + #define DGRAM_PORT 138 +diff -ruN samba-2.0.10.orig/source/lib/util_sock.c samba-2.0.10/source/lib/util_sock.c +--- samba-2.0.10.orig/source/lib/util_sock.c 2000-03-16 23:59:18.000000000 +0100 ++++ samba-2.0.10/source/lib/util_sock.c 2006-03-06 22:27:31.000000000 +0100 +@@ -649,19 +649,21 @@ + memset(buffer,'\0',smb_size + 100); + + len = read_smb_length_return_keepalive(fd,buffer,timeout); +- if (len < 0) +- { ++ if (len < 0) { + DEBUG(10,("receive_smb: length < 0!\n")); + return(False); + } + +- if (len > BUFFER_SIZE) { ++ /* ++ * A WRITEX with CAP_LARGE_WRITEX can be 64k worth of data plus 65 bytes ++ * of header. Don't print the error if this fits.... JRA. ++ */ ++ ++ if (len > (BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE)) { + DEBUG(0,("Invalid packet length! (%d bytes).\n",len)); + if (len > BUFFER_SIZE + (SAFETY_MARGIN/2)) +- { + exit(1); + } +- } + + if(len > 0) { + ret = read_socket_data(fd,buffer+4,len); +diff -ruN samba-2.0.10.orig/source/smbd/oplock.c samba-2.0.10/source/smbd/oplock.c +--- samba-2.0.10.orig/source/smbd/oplock.c 2000-04-25 04:32:14.000000000 +0200 ++++ samba-2.0.10/source/smbd/oplock.c 2006-03-06 22:27:31.000000000 +0100 +@@ -887,13 +887,13 @@ + messages crossing on the wire. + */ + +- if((inbuf = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN))==NULL) ++ if((inbuf = (char *)malloc(BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE + SAFETY_MARGIN))==NULL) + { + DEBUG(0,("oplock_break: malloc fail for input buffer.\n")); + return False; + } + +- if((outbuf = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN))==NULL) ++ if((outbuf = (char *)malloc(BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE + SAFETY_MARGIN))==NULL) + { + DEBUG(0,("oplock_break: malloc fail for output buffer.\n")); + free(inbuf); +diff -ruN samba-2.0.10.orig/source/smbd/process.c samba-2.0.10/source/smbd/process.c +--- samba-2.0.10.orig/source/smbd/process.c 2006-03-06 22:25:28.000000000 +0100 ++++ samba-2.0.10/source/smbd/process.c 2006-03-06 22:27:31.000000000 +0100 +@@ -995,8 +995,8 @@ + time_t last_timeout_processing_time = time(NULL); + unsigned int num_smbs = 0; + +- InBuffer = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN); +- OutBuffer = (char *)malloc(BUFFER_SIZE + SAFETY_MARGIN); ++ InBuffer = (char *)malloc(BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE + SAFETY_MARGIN); ++ OutBuffer = (char *)malloc(BUFFER_SIZE + LARGE_WRITEX_HDR_SIZE + SAFETY_MARGIN); + if ((InBuffer == NULL) || (OutBuffer == NULL)) + return; + +@@ -1027,7 +1027,7 @@ + /* free up temporary memory */ + lp_talloc_free(); + +- while(!receive_message_or_smb(InBuffer,BUFFER_SIZE,select_timeout,&got_smb)) ++ while(!receive_message_or_smb(InBuffer,BUFFER_SIZE+LARGE_WRITEX_HDR_SIZE,select_timeout,&got_smb)) + { + if(!timeout_processing( deadtime, &select_timeout, &last_timeout_processing_time)) + return; +diff -ruN samba-2.0.10.orig/source/smbd/reply.c samba-2.0.10/source/smbd/reply.c +--- samba-2.0.10.orig/source/smbd/reply.c 2006-03-06 22:25:53.000000000 +0100 ++++ samba-2.0.10/source/smbd/reply.c 2006-03-06 22:27:31.000000000 +0100 +@@ -2551,17 +2551,28 @@ + size_t numtowrite = SVAL(inbuf,smb_vwv10); + BOOL write_through = BITSETW(inbuf+smb_vwv7,0); + ssize_t nwritten = -1; +- int smb_doff = SVAL(inbuf,smb_vwv11); ++ unsigned int smb_doff = SVAL(inbuf,smb_vwv11); ++ unsigned int smblen = smb_len(inbuf); + char *data; ++ BOOL large_writeX = ((CVAL(inbuf,smb_wct) == 14) && (smblen > 0xFFFF)); + + /* If it's an IPC, pass off the pipe handler. */ +- if (IS_IPC(conn)) ++ if (IS_IPC(conn)) { + return reply_pipe_write_and_X(inbuf,outbuf,length,bufsize); ++ } + + CHECK_FSP(fsp,conn); + CHECK_WRITE(fsp); + CHECK_ERROR(fsp); + ++ /* Deal with possible LARGE_WRITEX */ ++ if (large_writeX) ++ numtowrite |= ((((size_t)SVAL(inbuf,smb_vwv9)) & 1 )<<16); ++ ++ if(smb_doff > smblen || (smb_doff + numtowrite > smblen)) { ++ return(ERROR(ERRDOS,ERRbadmem)); ++ } ++ + data = smb_base(inbuf) + smb_doff; + + if(CVAL(inbuf,smb_wct) == 14) { +@@ -2586,8 +2597,9 @@ + #endif /* LARGE_SMB_OFF_T */ + } + +- if (is_locked(fsp,conn,numtowrite,startpos, F_WRLCK)) ++ if (is_locked(fsp,conn,(SMB_BIG_UINT)numtowrite,(SMB_BIG_UINT)startpos, WRITE_LOCK)) { + return(ERROR(ERRDOS,ERRlock)); ++ } + + /* X/Open SMB protocol says that, unlike SMBwrite + if the length is zero then NO truncation is +@@ -2598,12 +2610,15 @@ + else + nwritten = write_file(fsp,data,startpos,numtowrite); + +- if(((nwritten == 0) && (numtowrite != 0))||(nwritten < 0)) ++ if(((nwritten == 0) && (numtowrite != 0))||(nwritten < 0)) { + return(UNIXERROR(ERRDOS,ERRnoaccess)); ++ } + + set_message(outbuf,6,0,True); + + SSVAL(outbuf,smb_vwv2,nwritten); ++ if (large_writeX) ++ SSVAL(outbuf,smb_vwv4,(nwritten>>16)&1); + + if (nwritten < (ssize_t)numtowrite) { + CVAL(outbuf,smb_rcls) = ERRHRD; diff --git a/net/samba/patches/300-shared_lib_ldflags_fix.patch b/net/samba/patches/300-shared_lib_ldflags_fix.patch new file mode 100644 index 0000000..7428fac --- /dev/null +++ b/net/samba/patches/300-shared_lib_ldflags_fix.patch @@ -0,0 +1,25 @@ +--- samba-2.0.10/source/Makefile.in.orig 2005-08-20 20:34:44.000000000 +0200 ++++ samba-2.0.10/source/Makefile.in 2005-08-20 20:36:27.000000000 +0200 +@@ -475,11 +475,11 @@ + + bin/smbwrapper.@SHLIBEXT@: $(PICOBJS) + @echo Linking shared library $@ +- @$(LD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LIBS) ++ @$(LD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LDFLAGS) $(LIBS) + + bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) + @echo Linking shared library $@ +- @$(LD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS) ++ @$(LD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LDFLAGS) $(LIBS) + + bin/smbsh: $(SMBSH_OBJ) bin/.dummy + @echo Linking $@ +@@ -487,7 +487,7 @@ + + bin/libsmb.@SHLIBEXT@: $(LIBSMB_PICOBJS) bin/.dummy + @echo Linking shared library $@ +- @$(LD) @LDSHFLAGS@ -o $@ $(LIBSMB_PICOBJS) $(LIBS) ++ @$(LD) @LDSHFLAGS@ -o $@ $(LIBSMB_PICOBJS) $(LDFLAGS) $(LIBS) + + install: installbin installman installscripts installcp installswat + diff --git a/net/samba/patches/301-config_files_path.patch b/net/samba/patches/301-config_files_path.patch new file mode 100644 index 0000000..089d9f6 --- /dev/null +++ b/net/samba/patches/301-config_files_path.patch @@ -0,0 +1,25 @@ +diff -ruN samba-2.0.10-old/source/Makefile.in samba-2.0.10-new/source/Makefile.in +--- samba-2.0.10-old/source/Makefile.in 2005-08-22 03:03:17.000000000 +0200 ++++ samba-2.0.10-new/source/Makefile.in 2005-08-22 03:08:23.000000000 +0200 +@@ -31,6 +31,8 @@ + MANDIR = @mandir@ + SAMBABOOK = @sambabook@ + ++CONFIGDIR = @sysconfdir@ ++ + # The permissions to give the executables + INSTALLPERMS = 0755 + +@@ -39,9 +41,9 @@ + # or in smb.conf (see smb.conf(5)) + SMBLOGFILE = $(VARDIR)/smb + NMBLOGFILE = $(VARDIR)/nmb +-CONFIGFILE = $(LIBDIR)/smb.conf +-LMHOSTSFILE = $(LIBDIR)/lmhosts +-DRIVERFILE = $(LIBDIR)/printers.def ++CONFIGFILE = $(CONFIGDIR)/smb.conf ++LMHOSTSFILE = $(CONFIGDIR)/lmhosts ++DRIVERFILE = $(CONFIGDIR)/printers.def + PASSWD_PROGRAM = /bin/passwd + # This is where smbpasswd et al go + PRIVATEDIR = @privatedir@ diff --git a/net/samba/patches/400-enhanced_attributes.patch b/net/samba/patches/400-enhanced_attributes.patch new file mode 100644 index 0000000..d769827 --- /dev/null +++ b/net/samba/patches/400-enhanced_attributes.patch @@ -0,0 +1,29 @@ +diff -Nur samba-2.0.10.orig/source/smbd/trans2.c samba-2.0.10/source/smbd/trans2.c +--- samba-2.0.10.orig/source/smbd/trans2.c 2006-08-07 20:04:26.000000000 +0200 ++++ samba-2.0.10/source/smbd/trans2.c 2006-08-07 20:06:07.000000000 +0200 +@@ -1379,12 +1379,6 @@ + data_size = max_data_bytes + 1024; + pdata = *ppdata = Realloc(*ppdata, data_size); + +- if (total_data > 0 && IVAL(pdata,0) == total_data) { +- /* uggh, EAs for OS2 */ +- DEBUG(4,("Rejecting EA request with total_data=%d\n",total_data)); +- return(ERROR(ERRDOS,ERROR_EAS_NOT_SUPPORTED)); +- } +- + memset((char *)pdata,'\0',data_size); + + switch (info_level) +@@ -1652,12 +1646,6 @@ + tvs.actime = st.st_atime; + mode = dos_mode(conn,fname,&st); + +- if (total_data > 0 && IVAL(pdata,0) == total_data) { +- /* uggh, EAs for OS2 */ +- DEBUG(4,("Rejecting EA request with total_data=%d\n",total_data)); +- return(ERROR(ERRDOS,ERROR_EAS_NOT_SUPPORTED)); +- } +- + switch (info_level) + { + case SMB_INFO_STANDARD: diff --git a/net/samba3/Config.in b/net/samba3/Config.in new file mode 100644 index 0000000..c6b7e76 --- /dev/null +++ b/net/samba3/Config.in @@ -0,0 +1,4 @@ +config SAMBA3_DEBUG + bool "Enable Logging for samba3" + depends PACKAGE_samba3 + default n diff --git a/net/samba3/Makefile b/net/samba3/Makefile new file mode 100644 index 0000000..1a10101 --- /dev/null +++ b/net/samba3/Makefile @@ -0,0 +1,83 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=samba3 +PKG_VERSION:=3.0.24 +PKG_RELEASE:=8 +PKG_MD5SUM:=89273f67a6d8067cbbecefaa13747153 + +PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/samba/old-versions/ +PKG_SOURCE:=samba-$(PKG_VERSION).tar.gz +PKG_BUILD_DIR:=$(BUILD_DIR)/samba-$(PKG_VERSION)/ + +include $(INCLUDE_DIR)/package.mk + +TARGET_CFLAGS+=$(if $(CONFIG_SAMBA3_DEBUG),-DSAMBA_DEBUG) + +define Package/samba3 + SECTION:=net + CATEGORY:=Network + SUBMENU:=Filesystem + TITLE:=samba3 + DEPENDS:=+libpthread + URL:=http://www.samba.org/ +endef + +define Package/samba3/Description + Samba3 - made small with patches taken from AVM GPL releases and freetz +endef + +define Package/samba3/conffiles +/etc/config/samba +/etc/samba/smb.conf.template +endef + +define Package/samba3/config + source "$(SOURCE)/Config.in" +endef + +define Build/Prepare/LFS +endef + +define Build/Prepare +$(call Build/Prepare/Default) +endef + +define Build/Configure + [ -f "$(PKG_BUILD_DIR)/source/include/config.h.save" ] || \ + $(CP) $(PKG_BUILD_DIR)/source/include/config.h \ + $(PKG_BUILD_DIR)/source/include/config.h.save + cat \ + $(PKG_BUILD_DIR)/source/include/config.h.save \ + ./files/config-lfs.h >> $(PKG_BUILD_DIR)/source/include/config.h + $(Build/Configure/Default) +endef + +define Build/Compile + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + $(MAKE) -C $(PKG_BUILD_DIR)/source \ + $(TARGET_CONFIGURE_OPTS) \ + all bin/smbpasswd +endef + +define Package/samba3/install + $(INSTALL_DIR) $(1)/etc/{samba,init.d,config} + $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba + $(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba + $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba/ + touch $(1)/etc/samba/smbpasswd + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbpasswd $(1)/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbd $(1)/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/nmbd $(1)/bin/ +endef + +$(eval $(call BuildPackage,samba3)) diff --git a/net/samba3/files/config-lfs.h b/net/samba3/files/config-lfs.h new file mode 100644 index 0000000..128e8a5 --- /dev/null +++ b/net/samba3/files/config-lfs.h @@ -0,0 +1,56 @@ +#undef HAVE_CREAT64 +#define HAVE_CREAT64 1 + +#undef HAVE_FSEEKO64 +#define HAVE_FSEEKO64 1 + +#undef HAVE_FSTAT64 +#define HAVE_FSTAT64 1 + +#undef HAVE_FTELLO64 +#define HAVE_FTELLO64 1 + +#undef HAVE_FTRUNCATE64 +#define HAVE_FTRUNCATE64 1 + +#undef HAVE_LSEEK64 +#define HAVE_LSEEK64 1 + +#undef HAVE_LSTAT64 +#define HAVE_LSTAT64 1 + +#undef HAVE_OPEN64 +#define HAVE_OPEN64 1 + +#undef HAVE_PREAD64 +#define HAVE_PREAD64 1 + +#undef HAVE_PWRITE64 +#define HAVE_PWRITE64 1 + +#undef HAVE_READDIR64 +#define HAVE_READDIR64 1 + +#undef HAVE_STAT64 +#define HAVE_STAT64 1 + +#undef HAVE_STRUCT_FLOCK64 +#define HAVE_STRUCT_FLOCK64 1 + +#undef SIZEOF_LONG_LONG +#define SIZEOF_LONG_LONG 8 + +#undef SIZEOF_OFF_T +#define SIZEOF_OFF_T 8 + +#undef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 + +#undef _GNU_SOURCE +#define _GNU_SOURCE 1 + +#undef _LARGEFILE_SOURCE +#define _LARGEFILE_SOURCE 1 + +#undef _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE 1 diff --git a/net/samba3/files/samba.config b/net/samba3/files/samba.config new file mode 100644 index 0000000..3acff5d --- /dev/null +++ b/net/samba3/files/samba.config @@ -0,0 +1,14 @@ +config samba + option 'name' 'openwrt' + option 'workgroup' 'openwrt' + option 'description' 'openwrt' + option 'homes' '1' + +config sambashare + option 'name' 'tmp' + option 'path' '/tmp' + option 'read_only' 'no' + option 'guest_ok' 'no' + option 'create_mask' '0700' + option 'dir_mask' '0700' + #option 'users' 'abc' diff --git a/net/samba3/files/samba.init b/net/samba3/files/samba.init new file mode 100755 index 0000000..ad8f268 --- /dev/null +++ b/net/samba3/files/samba.init @@ -0,0 +1,69 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008-2010 OpenWrt.org + +START=60 + +smb_header() { + local name + local workgroup + local description + local homes + + config_get name $1 name + config_get workgroup $1 workgroup + config_get description $1 description + config_get homes $1 homes + + [ -z "$name" ] && name=openwrt + [ -z "$workgroup" ] && workgroup=openwrt + [ -z "$description" ] && description=openwrt + + cp /etc/samba/smb.conf.template /tmp/smb.conf + [ -L /etc/samba/smb.conf ] || ln -nsf /tmp/smb.conf /etc/samba/smb.conf + sed -i "s/|NAME|/$name/g" /tmp/smb.conf + sed -i "s/|WORKGROUP|/$workgroup/g" /tmp/smb.conf + sed -i "s/|DESCRIPTION|/$description/g" /tmp/smb.conf + [ "$homes" == "1" ] && { + echo -e "\n[homes]\n\tcomment = Home Directories\n\tbrowseable = no\n\tread only = no\n\tcreate mode = 0750" >> /tmp/smb.conf + } +} + +smb_add_share() { + local name + local path + local users + local read_only + local guest_ok + local create_mask + local dir_mask + + config_get name $1 name + config_get path $1 path + config_get users $1 users + config_get read_only $1 read_only + config_get guest_ok $1 guest_ok + config_get create_mask $1 create_mask + config_get dir_mask $1 dir_mask + + [ -z "$name" -o -z "$path" ] && return + + echo -e "\n[$name]\n\tpath = $path" >> /tmp/smb.conf + [ -n "$users" ] && echo -e "\tvalid users = $users" >> /tmp/smb.conf + [ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /tmp/smb.conf + [ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /tmp/smb.conf + [ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /tmp/smb.conf + [ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /tmp/smb.conf +} + +start() { + config_load samba + config_foreach smb_header samba + config_foreach smb_add_share sambashare + smbd -D + nmbd -D +} + +stop() { + killall smbd + killall nmbd +} diff --git a/net/samba3/files/smb.conf.template b/net/samba3/files/smb.conf.template new file mode 100644 index 0000000..d3a28df --- /dev/null +++ b/net/samba3/files/smb.conf.template @@ -0,0 +1,16 @@ +[global] + netbios name = |NAME| + workgroup = |WORKGROUP| + server string = |DESCRIPTION| + syslog = 10 + encrypt passwords = true + passdb backend = smbpasswd + obey pam restrictions = yes + socket options = TCP_NODELAY + unix charset = ISO-8859-1 + preferred master = yes + os level = 20 + security = share + guest account = nobody + invalid users = root + smb passwd file = /etc/samba/smbpasswd diff --git a/net/samba3/patches/100-avm.patch b/net/samba3/patches/100-avm.patch new file mode 100644 index 0000000..2db6e61 --- /dev/null +++ b/net/samba3/patches/100-avm.patch @@ -0,0 +1,7267 @@ +diff -urN samba-3.0.24.orig/source/auth/auth_compat.c samba-3.0.24/source/auth/auth_compat.c +--- samba-3.0.24.orig/source/auth/auth_compat.c 2006-04-20 04:29:20.000000000 +0200 ++++ samba-3.0.24/source/auth/auth_compat.c 2007-07-17 13:19:05.000000000 +0200 +@@ -92,18 +92,25 @@ + check if a username/password pair is ok via the auth subsystem. + return True if the password is correct, False otherwise + ****************************************************************************/ ++ + BOOL password_ok(char *smb_name, DATA_BLOB password_blob) + { ++ ++ DATA_BLOB null_password = data_blob(NULL, 0); ++ BOOL encrypted = (global_encrypted_passwords_negotiated && (password_blob.length == 24 || password_blob.length > 46)); ++ ++ if (encrypted) { ++ /* ++ * The password could be either NTLM or plain LM. Try NTLM first, ++ * but fall-through as required. ++ * Vista sends NTLMv2 here - we need to try the client given workgroup. ++ */ ++ if (get_session_workgroup()) { ++ if (NT_STATUS_IS_OK(pass_check_smb(smb_name, get_session_workgroup(), null_password, password_blob, null_password, encrypted))) { ++ return True; ++ } ++ } + +- DATA_BLOB null_password = data_blob(NULL, 0); +- BOOL encrypted = (global_encrypted_passwords_negotiated && password_blob.length == 24); +- +- if (encrypted) { +- /* +- * The password could be either NTLM or plain LM. Try NTLM first, +- * but fall-through as required. +- * NTLMv2 makes no sense here. +- */ + if (NT_STATUS_IS_OK(pass_check_smb(smb_name, lp_workgroup(), null_password, password_blob, null_password, encrypted))) { + return True; + } +@@ -119,5 +126,3 @@ + + return False; + } +- +- +diff -urN samba-3.0.24.orig/source/auth/auth_util.c samba-3.0.24/source/auth/auth_util.c +--- samba-3.0.24.orig/source/auth/auth_util.c 2007-02-04 19:59:14.000000000 +0100 ++++ samba-3.0.24/source/auth/auth_util.c 2007-07-17 13:19:05.000000000 +0200 +@@ -2043,18 +2043,20 @@ + /* The only other possible result is that winbind is not up + and running. We need to update the trustdom_cache + ourselves */ +- ++#ifndef AVM_SMALLER + update_trustdom_cache(); ++#endif + } + + /* now the trustdom cache should be available a DC could still + * have a transitive trust so fall back to the cache of trusted + * domains (like a domain member would use */ + ++#ifndef AVM_SMALLER + if ( trustdom_cache_fetch(dom_name, &trustdom_sid) ) { + return True; + } +- ++#endif + return False; + } + + +diff -urN samba-3.0.24.orig/source/bin/dummy samba-3.0.24/source/bin/dummy +--- samba-3.0.24.orig/source/bin/dummy 1970-01-01 01:00:00.000000000 +0100 ++++ samba-3.0.24/source/bin/dummy 2007-07-17 13:19:05.000000000 +0200 +@@ -0,0 +1 @@ ++x +diff -urN samba-3.0.24.orig/source/.dmallocrc samba-3.0.24/source/.dmallocrc +--- samba-3.0.24.orig/source/.dmallocrc 2005-02-25 18:59:36.000000000 +0100 ++++ samba-3.0.24/source/.dmallocrc 1970-01-01 01:00:00.000000000 +0100 +@@ -1,2 +0,0 @@ +-samba allow-free-null, log-stats, log-non-free, log-trans, \ +- check-fence, check-heap, check-lists, error-abort +\ No newline at end of file +diff -urN samba-3.0.24.orig/source/include/config.h samba-3.0.24/source/include/config.h +--- samba-3.0.24.orig/source/include/config.h 1970-01-01 01:00:00.000000000 +0100 ++++ samba-3.0.24/source/include/config.h 2008-01-28 10:18:38.000000000 +0100 +@@ -0,0 +1,2229 @@ ++/* include/config.h. Generated by configure. */ ++/* include/config.h.in. Generated from configure.in by autoheader. */ ++ ++/* Whether the host os is aix */ ++/* #undef AIX */ ++ ++/* Whether the AIX send_file() API is available */ ++/* #undef AIX_SENDFILE_API */ ++ ++/* Does extattr API work */ ++/* #undef BROKEN_EXTATTR */ ++ ++/* Does getgrnam work correctly */ ++/* #undef BROKEN_GETGRNAM */ ++ ++/* Whether the nisplus include files are broken */ ++#define BROKEN_NISPLUS_INCLUDE_FILES 1 ++ ++/* Broken RedHat 7.2 system header files */ ++/* #undef BROKEN_REDHAT_7_SYSTEM_HEADERS */ ++ ++/* Does strndup work correctly */ ++/* #undef BROKEN_STRNDUP */ ++ ++/* Does strnlen work correctly */ ++/* #undef BROKEN_STRNLEN */ ++ ++/* Does this system use unicode compose characters */ ++/* #undef BROKEN_UNICODE_COMPOSE_CHARACTERS */ ++ ++/* Whether the compiler supports the LL prefix on long long integers */ ++#define COMPILER_SUPPORTS_LL 1 ++ ++/* Whether the host os is Darwin/MacOSX */ ++/* #undef DARWINOS */ ++ ++/* Default display charset name */ ++#define DEFAULT_DISPLAY_CHARSET "ASCII" ++ ++/* Default dos charset name */ ++#define DEFAULT_DOS_CHARSET "CP850" ++ ++/* Default unix charset name */ ++#define DEFAULT_UNIX_CHARSET "UTF-8" ++ ++/* Define to check invariants around some common functions */ ++/* #undef DMALLOC_FUNC_CHECK */ ++ ++/* Define to turn on dmalloc debugging */ ++/* #undef ENABLE_DMALLOC */ ++ ++/* Whether the host os is FreeBSD */ ++/* #undef FREEBSD */ ++ ++/* Whether the FreeBSD sendfile() API is available */ ++/* #undef FREEBSD_SENDFILE_API */ ++ ++/* Whether we are running on 64bit linux */ ++/* #undef HAVE_64BIT_LINUX */ ++ ++/* Whether acl_get_perm_np() is available */ ++/* #undef HAVE_ACL_GET_PERM_NP */ ++ ++/* Whether the krb5_address struct has a addrtype property */ ++/* #undef HAVE_ADDRTYPE_IN_KRB5_ADDRESS */ ++ ++/* Whether the krb5_address struct has a addr_type property */ ++/* #undef HAVE_ADDR_TYPE_IN_KRB5_ADDRESS */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_AFS_AFS_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_AFS_H */ ++ ++/* Whether 64 bit aio is available */ ++/* #undef HAVE_AIOCB64 */ ++ ++/* Have aio_cancel */ ++/* #undef HAVE_AIO_CANCEL */ ++ ++/* Have aio_cancel64 */ ++/* #undef HAVE_AIO_CANCEL64 */ ++ ++/* Have aio_error */ ++/* #undef HAVE_AIO_ERROR */ ++ ++/* Have aio_error64 */ ++/* #undef HAVE_AIO_ERROR64 */ ++ ++/* Have aio_fsync */ ++/* #undef HAVE_AIO_FSYNC */ ++ ++/* Have aio_fsync64 */ ++/* #undef HAVE_AIO_FSYNC64 */ ++ ++/* Define to 1 if you have the header file. */ ++/* AR7 #define HAVE_AIO_H 1 */ ++ ++/* Have aio_read */ ++/* #undef HAVE_AIO_READ */ ++ ++/* Have aio_read64 */ ++/* #undef HAVE_AIO_READ64 */ ++ ++/* Have aio_return */ ++/* #undef HAVE_AIO_RETURN */ ++ ++/* Have aio_return64 */ ++/* #undef HAVE_AIO_RETURN64 */ ++ ++/* Have aio_suspend */ ++/* #undef HAVE_AIO_SUSPEND */ ++ ++/* Have aio_suspend64 */ ++/* #undef HAVE_AIO_SUSPEND64 */ ++ ++/* Have aio_write */ ++/* #undef HAVE_AIO_WRITE */ ++ ++/* Have aio_write64 */ ++/* #undef HAVE_AIO_WRITE64 */ ++ ++/* Whether AIX ACLs are available */ ++/* #undef HAVE_AIX_ACLS */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_ALLOCA_H 1 ++ ++/* Whether the AP_OPTS_USE_SUBKEY ap option is available */ ++/* #undef HAVE_AP_OPTS_USE_SUBKEY */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_ARPA_INET_H 1 ++ ++/* check for */ ++#define HAVE_ASM_TYPES_H 1 ++ ++/* Define to 1 if you have the `asprintf' function. */ ++#define HAVE_ASPRINTF 1 ++ ++/* Whether asprintf() is available */ ++#define HAVE_ASPRINTF_DECL 1 ++ ++/* Define to 1 if you have the `atexit' function. */ ++#define HAVE_ATEXIT 1 ++ ++/* Define to 1 if you have the `attr_get' function. */ ++/* #undef HAVE_ATTR_GET */ ++ ++/* Define to 1 if you have the `attr_getf' function. */ ++/* #undef HAVE_ATTR_GETF */ ++ ++/* Define to 1 if you have the `attr_list' function. */ ++/* #undef HAVE_ATTR_LIST */ ++ ++/* Define to 1 if you have the `attr_listf' function. */ ++/* #undef HAVE_ATTR_LISTF */ ++ ++/* Define to 1 if you have the `attr_remove' function. */ ++/* #undef HAVE_ATTR_REMOVE */ ++ ++/* Define to 1 if you have the `attr_removef' function. */ ++/* #undef HAVE_ATTR_REMOVEF */ ++ ++/* Define to 1 if you have the `attr_set' function. */ ++/* #undef HAVE_ATTR_SET */ ++ ++/* Define to 1 if you have the `attr_setf' function. */ ++/* #undef HAVE_ATTR_SETF */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_ATTR_XATTR_H */ ++ ++/* Define to 1 if you have the `backtrace_symbols' function. */ ++/* AR7 #define HAVE_BACKTRACE_SYMBOLS 1 */ ++ ++/* Define to 1 if you have the `ber_scanf' function. */ ++/* #undef HAVE_BER_SCANF */ ++ ++/* What header to include for iconv() function: biconv.h */ ++/* #undef HAVE_BICONV */ ++ ++/* Define to 1 if you have the `bigcrypt' function. */ ++/* #undef HAVE_BIGCRYPT */ ++ ++/* Whether fcntl64 locks are broken */ ++/* #undef HAVE_BROKEN_FCNTL64_LOCKS */ ++ ++/* Whether getgroups is broken */ ++/* #undef HAVE_BROKEN_GETGROUPS */ ++ ++/* Whether readdir() is broken */ ++/* #undef HAVE_BROKEN_READDIR */ ++ ++/* Whether there is a C99 compliant vsnprintf */ ++#define HAVE_C99_VSNPRINTF 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_CFSTRINGENCODINGCONVERTER_H */ ++ ++/* Define to 1 if you have the `chmod' function. */ ++#define HAVE_CHMOD 1 ++ ++/* Define to 1 if you have the `chown' function. */ ++#define HAVE_CHOWN 1 ++ ++/* Define to 1 if you have the `chroot' function. */ ++#define HAVE_CHROOT 1 ++ ++/* Define to 1 if you have the `chsize' function. */ ++/* #undef HAVE_CHSIZE */ ++ ++/* Define to 1 if you have the `closedir64' function. */ ++/* #undef HAVE_CLOSEDIR64 */ ++ ++/* Whether the compiler will optimize out function calls */ ++#define HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_COM_ERR_H */ ++ ++/* Whether the system has connect() */ ++#define HAVE_CONNECT 1 ++ ++/* Define to 1 if you have the `copy_Authenticator' function. */ ++/* #undef HAVE_COPY_AUTHENTICATOR */ ++ ++/* Define to 1 if you have the ++ header file. */ ++/* #undef HAVE_COREFOUNDATION_CFSTRINGENCODINGCONVERTER_H */ ++ ++/* Define to 1 if you have the `creat64' function. */ ++/* AR7 #define HAVE_CREAT64 1 */ ++ ++/* Whether the system has the crypt() function */ ++#define HAVE_CRYPT 1 ++ ++/* Define to 1 if you have the `crypt16' function. */ ++/* #undef HAVE_CRYPT16 */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_CTYPE_H 1 ++ ++/* Whether we have CUPS */ ++/* #undef HAVE_CUPS */ ++ ++/* Define to 1 if you have the `des_set_key' function. */ ++/* #undef HAVE_DES_SET_KEY */ ++ ++/* Whether the 'dev64_t' type is available */ ++/* #undef HAVE_DEV64_T */ ++ ++/* Whether the major macro for dev_t is available */ ++#define HAVE_DEVICE_MAJOR_FN 1 ++ ++/* Whether the minor macro for dev_t is available */ ++#define HAVE_DEVICE_MINOR_FN 1 ++ ++/* Define to 1 if you have the `devnm' function. */ ++/* #undef HAVE_DEVNM */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_DEVNM_H */ ++ ++/* Whether dirent has a d_off member */ ++#define HAVE_DIRENT_D_OFF 1 ++ ++/* Define to 1 if you have the header file, and it defines `DIR'. ++ */ ++#define HAVE_DIRENT_H 1 ++ ++/* Define to 1 if you have the `dlclose' function. */ ++#define HAVE_DLCLOSE 1 ++ ++/* Define to 1 if you have the `dlerror' function. */ ++#define HAVE_DLERROR 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_DLFCN_H 1 ++ ++/* Define to 1 if you have the `dlopen' function. */ ++#define HAVE_DLOPEN 1 ++ ++/* Define to 1 if you have the `dlsym' function. */ ++#define HAVE_DLSYM 1 ++ ++/* Define to 1 if you have the `dlsym_prepend_underscore' function. */ ++/* #undef HAVE_DLSYM_PREPEND_UNDERSCORE */ ++ ++/* struct dqblk .dqb_fsoftlimit */ ++/* #undef HAVE_DQB_FSOFTLIMIT */ ++ ++/* Define to 1 if you have the `dup2' function. */ ++#define HAVE_DUP2 1 ++ ++/* Whether the ENCTYPE_ARCFOUR_HMAC_MD5 key type is available */ ++/* #undef HAVE_ENCTYPE_ARCFOUR_HMAC_MD5 */ ++ ++/* Define to 1 if you have the `endmntent' function. */ ++#define HAVE_ENDMNTENT 1 ++ ++/* Define to 1 if you have the `endnetgrent' function. */ ++/* AR7 #define HAVE_ENDNETGRENT 1 */ ++ ++/* Whether errno() is available */ ++#define HAVE_ERRNO_DECL 1 ++ ++/* Define to 1 if you have the header file. */ ++/* AR7 #define HAVE_EXECINFO_H 1 */ ++ ++ ++/* Define to 1 if you have the `execl' function. */ ++#define HAVE_EXECL 1 ++ ++/* Whether large file support can be enabled */ ++/* AR7 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1 */ ++ ++/* Define to 1 if you have the `extattr_delete_fd' function. */ ++/* #undef HAVE_EXTATTR_DELETE_FD */ ++ ++/* Define to 1 if you have the `extattr_delete_file' function. */ ++/* #undef HAVE_EXTATTR_DELETE_FILE */ ++ ++/* Define to 1 if you have the `extattr_delete_link' function. */ ++/* #undef HAVE_EXTATTR_DELETE_LINK */ ++ ++/* Define to 1 if you have the `extattr_get_fd' function. */ ++/* #undef HAVE_EXTATTR_GET_FD */ ++ ++/* Define to 1 if you have the `extattr_get_file' function. */ ++/* #undef HAVE_EXTATTR_GET_FILE */ ++ ++/* Define to 1 if you have the `extattr_get_link' function. */ ++/* #undef HAVE_EXTATTR_GET_LINK */ ++ ++/* Define to 1 if you have the `extattr_list_fd' function. */ ++/* #undef HAVE_EXTATTR_LIST_FD */ ++ ++/* Define to 1 if you have the `extattr_list_file' function. */ ++/* #undef HAVE_EXTATTR_LIST_FILE */ ++ ++/* Define to 1 if you have the `extattr_list_link' function. */ ++/* #undef HAVE_EXTATTR_LIST_LINK */ ++ ++/* Define to 1 if you have the `extattr_set_fd' function. */ ++/* #undef HAVE_EXTATTR_SET_FD */ ++ ++/* Define to 1 if you have the `extattr_set_file' function. */ ++/* #undef HAVE_EXTATTR_SET_FILE */ ++ ++/* Define to 1 if you have the `extattr_set_link' function. */ ++/* #undef HAVE_EXTATTR_SET_LINK */ ++ ++/* Define to 1 if you have the `fchmod' function. */ ++#define HAVE_FCHMOD 1 ++ ++/* Define to 1 if you have the `fchown' function. */ ++#define HAVE_FCHOWN 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_FCNTL_H 1 ++ ++/* Whether fcntl locking is available */ ++#define HAVE_FCNTL_LOCK 1 ++ ++/* Define to 1 if you have the `fcvt' function. */ ++#define HAVE_FCVT 1 ++ ++/* Define to 1 if you have the `fcvtl' function. */ ++/* #undef HAVE_FCVTL */ ++ ++/* Define to 1 if you have the `fgetxattr' function. */ ++/* AR7 #define HAVE_FGETXATTR 1 */ ++ ++/* Define to 1 if you have the `flistxattr' function. */ ++/* AR7 #define HAVE_FLISTXATTR 1 */ ++ ++/* Define to 1 if you have the `fopen64' function. */ ++/* AR7 #define HAVE_FOPEN64 1 */ ++ ++/* Define to 1 if you have the `fremovexattr' function. */ ++/* AR7 #define HAVE_FREMOVEXATTR 1 */ ++ ++/* Define to 1 if you have the `fseek64' function. */ ++/* #undef HAVE_FSEEK64 */ ++ ++/* Define to 1 if you have the `fseeko64' function. */ ++/* #define HAVE_FSEEKO64 1 */ ++ ++/* Define to 1 if you have the `fsetxattr' function. */ ++/* AR7 #define HAVE_FSETXATTR 1 */ ++ ++/* Define to 1 if you have the `fstat' function. */ ++#define HAVE_FSTAT 1 ++ ++/* Whether fstat64() is available */ ++/* AR7 #define HAVE_FSTAT64 1 */ ++ ++/* Define to 1 if you have the `fsync' function. */ ++#define HAVE_FSYNC 1 ++ ++/* Define to 1 if you have the `ftell64' function. */ ++/* #undef HAVE_FTELL64 */ ++ ++/* Define to 1 if you have the `ftello64' function. */ ++/* AR7 #define HAVE_FTELLO64 1 */ ++ ++/* Define to 1 if you have the `ftruncate' function. */ ++#define HAVE_FTRUNCATE 1 ++ ++/* Define to 1 if you have the `ftruncate64' function. */ ++/* AR7 #define HAVE_FTRUNCATE64 1 */ ++ ++/* Truncate extend */ ++#define HAVE_FTRUNCATE_EXTEND 1 ++ ++/* Whether there is a __FUNCTION__ macro */ ++#define HAVE_FUNCTION_MACRO 1 ++ ++/* Define to 1 if you have the `getauthuid' function. */ ++/* #undef HAVE_GETAUTHUID */ ++ ++/* Define to 1 if you have the `getcwd' function. */ ++#define HAVE_GETCWD 1 ++ ++/* Define to 1 if you have the `getdents' function. */ ++/* #undef HAVE_GETDENTS */ ++ ++/* Define to 1 if you have the `getdirentries' function. */ ++#define HAVE_GETDIRENTRIES 1 ++ ++/* Define to 1 if you have the `getgrent' function. */ ++#define HAVE_GETGRENT 1 ++ ++/* Define to 1 if you have the `getgrnam' function. */ ++#define HAVE_GETGRNAM 1 ++ ++/* Define to 1 if you have the `getgrouplist' function. */ ++/* #undef HAVE_GETGROUPLIST */ ++ ++/* Define to 1 if you have the `getmntent' function. */ ++#define HAVE_GETMNTENT 1 ++ ++/* Define to 1 if you have the `getnetgrent' function. */ ++#define HAVE_GETNETGRENT 1 ++ ++/* Define to 1 if you have the `getprpwnam' function. */ ++/* #undef HAVE_GETPRPWNAM */ ++ ++/* Define to 1 if you have the `getpwanam' function. */ ++/* #undef HAVE_GETPWANAM */ ++ ++/* Define to 1 if you have the `getrlimit' function. */ ++#define HAVE_GETRLIMIT 1 ++ ++/* Define to 1 if you have the `getspnam' function. */ ++#define HAVE_GETSPNAM 1 ++ ++/* Whether gettimeofday() is available */ ++#define HAVE_GETTIMEOFDAY_TZ 1 ++ ++/* Define to 1 if you have the `getutmpx' function. */ ++#define HAVE_GETUTMPX 1 ++ ++/* Define to 1 if you have the `getxattr' function. */ ++/* AR7 #define HAVE_GETXATTR 1 */ ++ ++/* What header to include for iconv() function: giconv.h */ ++/* #undef HAVE_GICONV */ ++ ++/* Define to 1 if you have the `glob' function. */ ++#define HAVE_GLOB 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_GLOB_H 1 ++ ++/* Define to 1 if you have the `grantpt' function. */ ++#define HAVE_GRANTPT 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_GRP_H 1 ++ ++/* Whether GSSAPI is available */ ++/* #undef HAVE_GSSAPI */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_GSSAPI_GSSAPI_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_GSSAPI_H */ ++ ++/* Define to 1 if you have the `gss_display_status' function. */ ++/* #undef HAVE_GSS_DISPLAY_STATUS */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_HISTORY_H */ ++ ++/* Whether HPUX ACLs are available */ ++/* #undef HAVE_HPUX_ACLS */ ++ ++/* What header to include for iconv() function: iconv.h */ ++/* AR7 #define HAVE_ICONV 1 */ ++ ++/* Whether iface AIX is available */ ++/* #undef HAVE_IFACE_AIX */ ++ ++/* Whether iface ifconf is available */ ++#define HAVE_IFACE_IFCONF 1 ++ ++/* Whether iface ifreq is available */ ++/* #undef HAVE_IFACE_IFREQ */ ++ ++/* Whether the compiler supports immediate structures */ ++#define HAVE_IMMEDIATE_STRUCTURES 1 ++ ++/* Define to 1 if you have the `initgroups' function. */ ++#define HAVE_INITGROUPS 1 ++ ++/* Define to 1 if you have the `innetgr' function. */ ++/* AR7 #define HAVE_INNETGR 1 */ ++ ++/* Whether the 'ino64_t' type is available */ ++/* #undef HAVE_INO64_T */ ++ ++/* Whether int16 typedef is included by rpc/rpc.h */ ++/* #undef HAVE_INT16_FROM_RPC_RPC_H */ ++ ++/* Whether int32 typedef is included by rpc/rpc.h */ ++/* #undef HAVE_INT32_FROM_RPC_RPC_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_INTTYPES_H 1 ++ ++/* Whether IRIX ACLs are available */ ++/* #undef HAVE_IRIX_ACLS */ ++ ++/* Whether IRIX specific capabilities are available */ ++/* #undef HAVE_IRIX_SPECIFIC_CAPABILITIES */ ++ ++/* Whether kernel notifies changes */ ++#define HAVE_KERNEL_CHANGE_NOTIFY 1 ++ ++/* Whether IRIX kernel oplock type definitions are available */ ++/* #undef HAVE_KERNEL_OPLOCKS_IRIX */ ++ ++/* Whether to use linux kernel oplocks */ ++#define HAVE_KERNEL_OPLOCKS_LINUX 1 ++ ++/* Whether the kernel supports share modes */ ++#define HAVE_KERNEL_SHARE_MODES 1 ++ ++/* Whether to have KRB5 support */ ++/* #undef HAVE_KRB5 */ ++ ++/* Define to 1 if you have the `krb5_auth_con_setkey' function. */ ++/* #undef HAVE_KRB5_AUTH_CON_SETKEY */ ++ ++/* Define to 1 if you have the `krb5_auth_con_setuseruserkey' function. */ ++/* #undef HAVE_KRB5_AUTH_CON_SETUSERUSERKEY */ ++ ++/* Define to 1 if you have the `krb5_c_enctype_compare' function. */ ++/* #undef HAVE_KRB5_C_ENCTYPE_COMPARE */ ++ ++/* Whether the type krb5_encrypt_block exists */ ++/* #undef HAVE_KRB5_ENCRYPT_BLOCK */ ++ ++/* Define to 1 if you have the `krb5_encrypt_data' function. */ ++/* #undef HAVE_KRB5_ENCRYPT_DATA */ ++ ++/* Define to 1 if you have the `krb5_enctypes_compatible_keys' function. */ ++/* #undef HAVE_KRB5_ENCTYPES_COMPATIBLE_KEYS */ ++ ++/* Define to 1 if you have the `krb5_free_data_contents' function. */ ++/* #undef HAVE_KRB5_FREE_DATA_CONTENTS */ ++ ++/* Define to 1 if you have the `krb5_free_keytab_entry_contents' function. */ ++/* #undef HAVE_KRB5_FREE_KEYTAB_ENTRY_CONTENTS */ ++ ++/* Define to 1 if you have the `krb5_free_ktypes' function. */ ++/* #undef HAVE_KRB5_FREE_KTYPES */ ++ ++/* Define to 1 if you have the `krb5_free_unparsed_name' function. */ ++/* #undef HAVE_KRB5_FREE_UNPARSED_NAME */ ++ ++/* Define to 1 if you have the `krb5_get_default_in_tkt_etypes' function. */ ++/* #undef HAVE_KRB5_GET_DEFAULT_IN_TKT_ETYPES */ ++ ++/* Define to 1 if you have the `krb5_get_permitted_enctypes' function. */ ++/* #undef HAVE_KRB5_GET_PERMITTED_ENCTYPES */ ++ ++/* Define to 1 if you have the `krb5_get_pw_salt' function. */ ++/* #undef HAVE_KRB5_GET_PW_SALT */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_KRB5_H */ ++ ++/* Whether the krb5_creds struct has a keyblock property */ ++/* #undef HAVE_KRB5_KEYBLOCK_IN_CREDS */ ++ ++/* Whether the krb5_keyblock struct has a keyvalue property */ ++/* #undef HAVE_KRB5_KEYBLOCK_KEYVALUE */ ++ ++/* Whether krb5_keytab_entry has key member */ ++/* #undef HAVE_KRB5_KEYTAB_ENTRY_KEY */ ++ ++/* Whether krb5_keytab_entry has keyblock member */ ++/* #undef HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK */ ++ ++/* Define to 1 if you have the `krb5_krbhst_get_addrinfo' function. */ ++/* #undef HAVE_KRB5_KRBHST_GET_ADDRINFO */ ++ ++/* Define to 1 if you have the `krb5_kt_compare' function. */ ++/* #undef HAVE_KRB5_KT_COMPARE */ ++ ++/* Define to 1 if you have the `krb5_kt_free_entry' function. */ ++/* #undef HAVE_KRB5_KT_FREE_ENTRY */ ++ ++/* Define to 1 if you have the `krb5_locate_kdc' function. */ ++/* #undef HAVE_KRB5_LOCATE_KDC */ ++ ++/* Define to 1 if you have the `krb5_mk_req_extended' function. */ ++/* #undef HAVE_KRB5_MK_REQ_EXTENDED */ ++ ++/* Define to 1 if you have the `krb5_principal2salt' function. */ ++/* #undef HAVE_KRB5_PRINCIPAL2SALT */ ++ ++/* Define to 1 if you have the `krb5_principal_get_comp_string' function. */ ++/* #undef HAVE_KRB5_PRINCIPAL_GET_COMP_STRING */ ++ ++/* Whether krb5_princ_component is available */ ++/* #undef HAVE_KRB5_PRINC_COMPONENT */ ++ ++/* Whether the krb5_creds struct has a session property */ ++/* #undef HAVE_KRB5_SESSION_IN_CREDS */ ++ ++/* Define to 1 if you have the `krb5_set_default_in_tkt_etypes' function. */ ++/* #undef HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES */ ++ ++/* Define to 1 if you have the `krb5_set_default_tgs_ktypes' function. */ ++/* #undef HAVE_KRB5_SET_DEFAULT_TGS_KTYPES */ ++ ++/* Define to 1 if you have the `krb5_set_real_time' function. */ ++/* #undef HAVE_KRB5_SET_REAL_TIME */ ++ ++/* Define to 1 if you have the `krb5_string_to_key' function. */ ++/* #undef HAVE_KRB5_STRING_TO_KEY */ ++ ++/* Define to 1 if you have the `krb5_string_to_key_salt' function. */ ++/* #undef HAVE_KRB5_STRING_TO_KEY_SALT */ ++ ++/* Whether the krb5_ticket struct has a enc_part2 property */ ++/* #undef HAVE_KRB5_TKT_ENC_PART2 */ ++ ++/* Define to 1 if you have the `krb5_use_enctype' function. */ ++/* #undef HAVE_KRB5_USE_ENCTYPE */ ++ ++/* Whether the KV5M_KEYTAB option is available */ ++/* #undef HAVE_KV5M_KEYTAB */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_LANGINFO_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_LASTLOG_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_LBER_H */ ++ ++/* Whether ldap is available */ ++/* #undef HAVE_LDAP */ ++ ++/* Define to 1 if you have the `ldap_domain2hostlist' function. */ ++/* #undef HAVE_LDAP_DOMAIN2HOSTLIST */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_LDAP_H */ ++ ++/* Define to 1 if you have the `ldap_init' function. */ ++/* #undef HAVE_LDAP_INIT */ ++ ++/* Define to 1 if you have the `ldap_initialize' function. */ ++/* #undef HAVE_LDAP_INITIALIZE */ ++ ++/* Define to 1 if you have the `ldap_set_rebind_proc' function. */ ++/* #undef HAVE_LDAP_SET_REBIND_PROC */ ++ ++/* Define to 1 if you have the `lgetxattr' function. */ ++/* AR7 #define HAVE_LGETXATTR 1 */ ++ ++/* Define to 1 if you have the `asn1' library (-lasn1). */ ++/* #undef HAVE_LIBASN1 */ ++ ++/* Define to 1 if you have the `com_err' library (-lcom_err). */ ++/* #undef HAVE_LIBCOM_ERR */ ++ ++/* Define to 1 if you have the `crypto' library (-lcrypto). */ ++/* #undef HAVE_LIBCRYPTO */ ++ ++/* Define to 1 if you have the `dl' library (-ldl). */ ++/* #undef HAVE_LIBDL */ ++ ++/* Define to 1 if you have the `exc' library (-lexc). */ ++/* #undef HAVE_LIBEXC */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_LIBEXC_H */ ++ ++/* Define to 1 if you have the `gen' library (-lgen). */ ++/* #undef HAVE_LIBGEN */ ++ ++/* Define to 1 if you have the `gssapi' library (-lgssapi). */ ++/* #undef HAVE_LIBGSSAPI */ ++ ++/* Define to 1 if you have the `gssapi_krb5' library (-lgssapi_krb5). */ ++/* #undef HAVE_LIBGSSAPI_KRB5 */ ++ ++/* Define to 1 if you have the `inet' library (-linet). */ ++/* #undef HAVE_LIBINET */ ++ ++/* Define to 1 if you have the `k5crypto' library (-lk5crypto). */ ++/* #undef HAVE_LIBK5CRYPTO */ ++ ++/* Define to 1 if you have the `krb5' library (-lkrb5). */ ++/* #undef HAVE_LIBKRB5 */ ++ ++/* Define to 1 if you have the `lber' library (-llber). */ ++/* #undef HAVE_LIBLBER */ ++ ++/* Define to 1 if you have the `ldap' library (-lldap). */ ++/* #undef HAVE_LIBLDAP */ ++ ++/* Define to 1 if you have the `nsl' library (-lnsl). */ ++/* #undef HAVE_LIBNSL */ ++ ++/* Define to 1 if you have the `nsl_s' library (-lnsl_s). */ ++/* #undef HAVE_LIBNSL_S */ ++ ++/* Whether libpam is available */ ++#define HAVE_LIBPAM 1 ++ ++/* Whether the system has readline */ ++/* AR7 #define HAVE_LIBREADLINE 1 */ ++ ++/* Define to 1 if you have the `resolv' library (-lresolv). */ ++#define HAVE_LIBRESOLV 1 ++ ++/* Define to 1 if you have the `roken' library (-lroken). */ ++/* #undef HAVE_LIBROKEN */ ++ ++/* Define to 1 if you have the `sec' library (-lsec). */ ++/* #undef HAVE_LIBSEC */ ++ ++/* Define to 1 if you have the `security' library (-lsecurity). */ ++/* #undef HAVE_LIBSECURITY */ ++ ++/* Define to 1 if you have the `sendfile' library (-lsendfile). */ ++/* #undef HAVE_LIBSENDFILE */ ++ ++/* Define to 1 if you have the `socket' library (-lsocket). */ ++/* #undef HAVE_LIBSOCKET */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_LIMITS_H 1 ++ ++/* Define to 1 if you have the `link' function. */ ++#define HAVE_LINK 1 ++ ++/* Whether Linux xfs quota support is available */ ++/* AR7 #define HAVE_LINUX_XFS_QUOTAS 1 */ ++ ++/* Define to 1 if you have the `listxattr' function. */ ++/* AR7 #define HAVE_LISTXATTR 1 */ ++ ++/* Define to 1 if you have the `llistxattr' function. */ ++/* AR7 #define HAVE_LLISTXATTR 1 */ ++ ++/* Define to 1 if you have the `llseek' function. */ ++#define HAVE_LLSEEK 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_LOCALE_H 1 ++ ++/* Whether the host supports long long's */ ++#define HAVE_LONGLONG 1 ++ ++/* Define to 1 if you have the `lremovexattr' function. */ ++/* AR7 #define HAVE_LREMOVEXATTR 1 */ ++ ++/* Define to 1 if you have the `lseek64' function. */ ++/* AR7 #define HAVE_LSEEK64 1 */ ++ ++/* Define to 1 if you have the `lsetxattr' function. */ ++/* AR7 #define HAVE_LSETXATTR 1 */ ++ ++/* Define to 1 if you have the `lstat64' function. */ ++/* AR7 #define HAVE_LSTAT64 1 */ ++ ++/* Whether the macro for makedev is available */ ++#define HAVE_MAKEDEV 1 ++ ++/* Define to 1 if you have the `memmove' function. */ ++#define HAVE_MEMMOVE 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_MEMORY_H 1 ++ ++/* Whether memset() is available */ ++#define HAVE_MEMSET 1 ++ ++/* Define to 1 if you have the `mknod' function. */ ++#define HAVE_MKNOD 1 ++ ++/* Define to 1 if you have the `mknod64' function. */ ++/* #undef HAVE_MKNOD64 */ ++ ++/* Define to 1 if you have the `mktime' function. */ ++#define HAVE_MKTIME 1 ++ ++/* Whether mmap works */ ++#define HAVE_MMAP 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_MNTENT_H 1 ++ ++/* Define to 1 if you have the `nanosleep' function. */ ++#define HAVE_NANOSLEEP 1 ++ ++/* Whether to use native iconv */ ++/* AR7 #define HAVE_NATIVE_ICONV 1 */ ++ ++/* Define to 1 if you have the header file, and it defines `DIR'. */ ++/* #undef HAVE_NDIR_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_NETINET_IN_IP_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_NETINET_IN_SYSTM_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_NETINET_IP_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_NETINET_TCP_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_NET_IF_H 1 ++ ++/* Do we have rl_completion_matches? */ ++/* AR7 #define HAVE_NEW_LIBREADLINE 1 */ ++ ++/* Define to 1 if you have the `nl_langinfo' function. */ ++#define HAVE_NL_LANGINFO 1 ++ ++/* Whether no ACLs support is available */ ++#define HAVE_NO_ACLS 1 ++ ++/* Whether no asynchronous io support is available */ ++#define HAVE_NO_AIO 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_NSSWITCH_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_NSS_COMMON_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* AR7 #define HAVE_NSS_H 1 */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_NS_API_H */ ++ ++/* Whether off64_t is available */ ++/* #undef HAVE_OFF64_T */ ++ ++/* Define to 1 if you have the `open64' function. */ ++/* AR7 #define HAVE_OPEN64 1 */ ++ ++/* Define to 1 if you have the `opendir64' function. */ ++/* #undef HAVE_OPENDIR64 */ ++ ++/* Defined if struct passwd has pw_age field */ ++/* #undef HAVE_PASSWD_PW_AGE */ ++ ++/* Defined if struct passwd has pw_comment field */ ++/* #undef HAVE_PASSWD_PW_COMMENT */ ++ ++/* Define to 1 if you have the `pathconf' function. */ ++#define HAVE_PATHCONF 1 ++ ++/* Define to 1 if you have the `pipe' function. */ ++#define HAVE_PIPE 1 ++ ++/* Define to 1 if you have the `poll' function. */ ++#define HAVE_POLL 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_POLL_H 1 ++ ++/* Whether POSIX ACLs are available */ ++/* #undef HAVE_POSIX_ACLS */ ++ ++/* Whether prctl is available */ ++#define HAVE_PRCTL 1 ++ ++/* Define to 1 if you have the `pread' function. */ ++#define HAVE_PREAD 1 ++ ++/* Define to 1 if you have the `pread64' function. */ ++/* AR7 #define HAVE_PREAD64 1 */ ++ ++/* Define to 1 if you have the `putprpwnam' function. */ ++/* #undef HAVE_PUTPRPWNAM */ ++ ++/* Define to 1 if you have the `pututline' function. */ ++#define HAVE_PUTUTLINE 1 ++ ++/* Define to 1 if you have the `pututxline' function. */ ++#define HAVE_PUTUTXLINE 1 ++ ++/* Define to 1 if you have the `pwrite' function. */ ++#define HAVE_PWRITE 1 ++ ++/* Define to 1 if you have the `pwrite64' function. */ ++/* AR7 #define HAVE_PWRITE64 1 */ ++ ++/* Whether CRAY int quotactl (char *spec, int request, char *arg); is ++ available */ ++/* #undef HAVE_QUOTACTL_3 */ ++ ++/* Whether long quotactl(int cmd, char *special, qid_t id, caddr_t addr) is ++ available */ ++/* #undef HAVE_QUOTACTL_4A */ ++ ++/* Whether int quotactl(const char *path, int cmd, int id, char *addr) is ++ available */ ++/* #undef HAVE_QUOTACTL_4B */ ++ ++/* Whether Linux quota support is available */ ++/* AR7 #define HAVE_QUOTACTL_LINUX 1 */ ++ ++/* Define to 1 if you have the `rand' function. */ ++#define HAVE_RAND 1 ++ ++/* Define to 1 if you have the `random' function. */ ++#define HAVE_RANDOM 1 ++ ++/* Define to 1 if you have the `rdchk' function. */ ++/* #undef HAVE_RDCHK */ ++ ++/* Define to 1 if you have the `readdir64' function. */ ++/* AR7 #define HAVE_READDIR64 1 */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_READLINE_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_READLINE_HISTORY_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_READLINE_READLINE_H 1 ++ ++/* Define to 1 if you have the `readlink' function. */ ++#define HAVE_READLINK 1 ++ ++/* Define to 1 if you have the `realpath' function. */ ++#define HAVE_REALPATH 1 ++ ++/* Define to 1 if you have the `removexattr' function. */ ++/* AR7 #define HAVE_REMOVEXATTR 1 */ ++ ++/* Define to 1 if you have the `rename' function. */ ++#define HAVE_RENAME 1 ++ ++/* Define to 1 if you have the `rewinddir64' function. */ ++/* #undef HAVE_REWINDDIR64 */ ++ ++/* Define to 1 if you have the `roken_getaddrinfo_hostspec' function. */ ++/* #undef HAVE_ROKEN_GETADDRINFO_HOSTSPEC */ ++ ++/* Whether current user is root */ ++/* #undef HAVE_ROOT */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_RPCSVC_NIS_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_RPCSVC_YPCLNT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_RPCSVC_YP_PROT_H 1 ++ ++/* Whether there is a conflicting AUTH_ERROR define in rpc/rpc.h */ ++/* #undef HAVE_RPC_AUTH_ERROR_CONFLICT */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_RPC_NETTYPE_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_RPC_RPC_H 1 ++ ++/* Whether mkstemp is secure */ ++#define HAVE_SECURE_MKSTEMP 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SECURITY_PAM_APPL_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SECURITY_PAM_MODULES_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SECURITY__PAM_MACROS_H 1 ++ ++/* Define to 1 if you have the `seekdir64' function. */ ++/* #undef HAVE_SEEKDIR64 */ ++ ++/* Define to 1 if you have the `select' function. */ ++#define HAVE_SELECT 1 ++ ++/* Whether sendfile() is available */ ++/* #undef HAVE_SENDFILE */ ++ ++/* Whether sendfile64() is available */ ++/* AR7 #define HAVE_SENDFILE64 1 */ ++ ++/* Whether sendfilev() is available */ ++/* #undef HAVE_SENDFILEV */ ++ ++/* Whether sendfilev64() is available */ ++/* #undef HAVE_SENDFILEV64 */ ++ ++/* Define to 1 if you have the `setbuffer' function. */ ++#define HAVE_SETBUFFER 1 ++ ++/* Define to 1 if you have the `setenv' function. */ ++#define HAVE_SETENV 1 ++ ++/* Define to 1 if you have the `setgidx' function. */ ++/* #undef HAVE_SETGIDX */ ++ ++/* Define to 1 if you have the `setgroups' function. */ ++#define HAVE_SETGROUPS 1 ++ ++/* Define to 1 if you have the `setlinebuf' function. */ ++#define HAVE_SETLINEBUF 1 ++ ++/* Define to 1 if you have the `setlocale' function. */ ++#define HAVE_SETLOCALE 1 ++ ++/* Define to 1 if you have the `setluid' function. */ ++/* #undef HAVE_SETLUID */ ++ ++/* Define to 1 if you have the `setmntent' function. */ ++#define HAVE_SETMNTENT 1 ++ ++/* Define to 1 if you have the `setnetgrent' function. */ ++#define HAVE_SETNETGRENT 1 ++ ++/* Define to 1 if you have the `setpgid' function. */ ++#define HAVE_SETPGID 1 ++ ++/* Define to 1 if you have the `setpriv' function. */ ++/* #undef HAVE_SETPRIV */ ++ ++/* Whether the system has setresgid */ ++#define HAVE_SETRESGID 1 ++ ++/* Whether setresgid() is available */ ++#define HAVE_SETRESGID_DECL 1 ++ ++/* Whether the system has setresuid */ ++#define HAVE_SETRESUID 1 ++ ++/* Whether setresuid() is available */ ++#define HAVE_SETRESUID_DECL 1 ++ ++/* Define to 1 if you have the `setsid' function. */ ++#define HAVE_SETSID 1 ++ ++/* Define to 1 if you have the `setuidx' function. */ ++/* #undef HAVE_SETUIDX */ ++ ++/* Define to 1 if you have the `setxattr' function. */ ++/* AR7 #define HAVE_SETXATTR 1 */ ++ ++/* Define to 1 if you have the `set_auth_parameters' function. */ ++/* #undef HAVE_SET_AUTH_PARAMETERS */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SHADOW_H 1 ++ ++/* Define to 1 if you have the `shmget' function. */ ++#define HAVE_SHMGET 1 ++ ++/* Define to 1 if you have the `shm_open' function. */ ++/* #undef HAVE_SHM_OPEN */ ++ ++/* Define to 1 if you have the `sigaction' function. */ ++#define HAVE_SIGACTION 1 ++ ++/* Define to 1 if you have the `sigblock' function. */ ++#define HAVE_SIGBLOCK 1 ++ ++/* Define to 1 if you have the `sigprocmask' function. */ ++#define HAVE_SIGPROCMASK 1 ++ ++/* Define to 1 if you have the `sigset' function. */ ++#define HAVE_SIGSET 1 ++ ++/* Whether we have the atomic_t variable type */ ++#define HAVE_SIG_ATOMIC_T_TYPE 1 ++ ++/* Define to 1 if you have the `snprintf' function. */ ++#define HAVE_SNPRINTF 1 ++ ++/* Whether snprintf() is available */ ++#define HAVE_SNPRINTF_DECL 1 ++ ++/* Whether we have the variable type socklen_t */ ++#define HAVE_SOCKLEN_T_TYPE 1 ++ ++/* Whether the sockaddr_in struct has a sin_len property */ ++/* #undef HAVE_SOCK_SIN_LEN */ ++ ++/* Whether solaris ACLs are available */ ++/* #undef HAVE_SOLARIS_ACLS */ ++ ++/* Define to 1 if you have the `srand' function. */ ++#define HAVE_SRAND 1 ++ ++/* Define to 1 if you have the `srandom' function. */ ++#define HAVE_SRANDOM 1 ++ ++/* Whether stat64() is available */ ++/* AR7 #define HAVE_STAT64 1 */ ++ ++/* whether struct stat has sub-second timestamps */ ++/* AR7 #define HAVE_STAT_HIRES_TIMESTAMPS 1 */ ++ ++/* whether struct stat contains st_atim */ ++#define HAVE_STAT_ST_ATIM 1 ++ ++/* Whether the stat struct has a st_blksize property */ ++#define HAVE_STAT_ST_BLKSIZE 1 ++ ++/* Whether the stat struct has a st_block property */ ++#define HAVE_STAT_ST_BLOCKS 1 ++ ++/* whether struct stat contains st_ctim */ ++#define HAVE_STAT_ST_CTIM 1 ++ ++/* whether struct stat contains st_mtim */ ++#define HAVE_STAT_ST_MTIM 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STDARG_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STDINT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_STDLIB_H 1 ++ ++/* Define to 1 if you have the `strcasecmp' function. */ ++#define HAVE_STRCASECMP 1 ++ ++/* Define to 1 if you have the `strchr' function. */ ++#define HAVE_STRCHR 1 ++ ++/* Define to 1 if you have the `strdup' function. */ ++#define HAVE_STRDUP 1 ++ ++/* Define to 1 if you have the `strerror' function. */ ++#define HAVE_STRERROR 1 ++ ++/* Define to 1 if you have the `strftime' function. */ ++#define HAVE_STRFTIME 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 `strlcat' function. */ ++/* #undef HAVE_STRLCAT */ ++ ++/* Define to 1 if you have the `strlcpy' function. */ ++/* #undef HAVE_STRLCPY */ ++ ++/* Define to 1 if you have the `strndup' function. */ ++#define HAVE_STRNDUP 1 ++ ++/* Define to 1 if you have the `strnlen' function. */ ++#define HAVE_STRNLEN 1 ++ ++/* Define to 1 if you have the header file. */ ++/* AR7 #define HAVE_STROPTS_H 1 */ ++ ++/* Define to 1 if you have the `strpbrk' function. */ ++#define HAVE_STRPBRK 1 ++ ++/* Define to 1 if you have the `strtoul' function. */ ++#define HAVE_STRTOUL 1 ++ ++/* Whether the 'DIR64' abstract data type is available */ ++/* #undef HAVE_STRUCT_DIR64 */ ++ ++/* Whether the 'dirent64' struct is available */ ++/* AR7 #define HAVE_STRUCT_DIRENT64 1 */ ++ ++/* Whether the flock64 struct is available */ ++/* AR7 #define HAVE_STRUCT_FLOCK64 1 */ ++ ++/* Define to 1 if `method_attrlist' is member of `struct secmethod_table'. */ ++/* #undef HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST */ ++ ++/* Define to 1 if `method_version' is member of `struct secmethod_table'. */ ++/* #undef HAVE_STRUCT_SECMETHOD_TABLE_METHOD_VERSION */ ++ ++/* Define to 1 if `st_rdev' is member of `struct stat'. */ ++#define HAVE_STRUCT_STAT_ST_RDEV 1 ++ ++/* Whether we have struct timespec */ ++#define HAVE_STRUCT_TIMESPEC 1 ++ ++/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use ++ `HAVE_STRUCT_STAT_ST_RDEV' instead. */ ++#define HAVE_ST_RDEV 1 ++ ++/* Define to 1 if you have the `symlink' function. */ ++#define HAVE_SYMLINK 1 ++ ++/* Define to 1 if you have the `syscall' function. */ ++#define HAVE_SYSCALL 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYSCALL_H 1 ++ ++/* Define to 1 if you have the `sysconf' function. */ ++#define HAVE_SYSCONF 1 ++ ++/* Define to 1 if you have the `syslog' function. */ ++#define HAVE_SYSLOG 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYSLOG_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_ACL_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_ATTRIBUTES_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_CAPABILITY_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_CDEFS_H 1 ++ ++/* Define to 1 if you have the header file, and it defines `DIR'. ++ */ ++/* #undef HAVE_SYS_DIR_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_DUSTAT_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_EXTATTR_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_FCNTL_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_FILIO_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_FILSYS_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_FS_S5PARAM_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_FS_VX_QUOTA_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_ID_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_IOCTL_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_IPC_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_MMAN_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_MODE_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_MOUNT_H 1 ++ ++/* Define to 1 if you have the header file, and it defines `DIR'. ++ */ ++/* #undef HAVE_SYS_NDIR_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_PARAM_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_PRCTL_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_PRIV_H */ ++ ++/* Whether the new lib/sysquotas.c interface can be used */ ++/* AR7 #define HAVE_SYS_QUOTAS 1 */ ++ ++/* Define to 1 if you have the header file. */ ++/* AR7 #define HAVE_SYS_QUOTA_H 1 */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_RESOURCE_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_SECURITY_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_SELECT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_SHM_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_SOCKET_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_SOCKIO_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_STATFS_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_STATVFS_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_STAT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_SYSCALL_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_SYSLOG_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_SYSMACROS_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_SYS_TERMIO_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_TIME_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_TYPES_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_UIO_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_UNISTD_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_UN_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_VFS_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_SYS_WAIT_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* AR7 #define HAVE_SYS_XATTR_H 1 */ ++ ++/* Define to 1 if you have the `telldir64' function. */ ++/* #undef HAVE_TELLDIR64 */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_TERMIOS_H 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_TERMIO_H 1 ++ ++/* Define to 1 if you have the `timegm' function. */ ++/* AR7 #define HAVE_TIMEGM 1 */ ++ ++/* Whether Tru64 ACLs are available */ ++/* #undef HAVE_TRU64_ACLS */ ++ ++/* Whether crypt needs truncated salt */ ++/* #undef HAVE_TRUNCATED_SALT */ ++ ++/* Whether uint16 typedef is included by rpc/rpc.h */ ++/* #undef HAVE_UINT16_FROM_RPC_RPC_H */ ++ ++/* Whether uint32 typedef is included by rpc/rpc.h */ ++/* #undef HAVE_UINT32_FROM_RPC_RPC_H */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_UNISTD_H 1 ++ ++/* If we need to build with unixscoket support */ ++#define HAVE_UNIXSOCKET 1 ++ ++/* Whether UnixWare ACLs are available */ ++/* #undef HAVE_UNIXWARE_ACLS */ ++ ++/* Whether the 'unsigned char' type is available */ ++/* #undef HAVE_UNSIGNED_CHAR */ ++ ++/* Define to 1 if you have the `updwtmp' function. */ ++#define HAVE_UPDWTMP 1 ++ ++/* Define to 1 if you have the `updwtmpx' function. */ ++#define HAVE_UPDWTMPX 1 ++ ++/* Define to 1 if you have the `usleep' function. */ ++#define HAVE_USLEEP 1 ++ ++/* Whether struct utimbuf is available */ ++#define HAVE_UTIMBUF 1 ++ ++/* Define to 1 if you have the `utime' function. */ ++#define HAVE_UTIME 1 ++ ++/* Define to 1 if you have the `utimes' function. */ ++#define HAVE_UTIMES 1 ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_UTIME_H 1 ++ ++/* Define to 1 if you have the header file. */ ++/* #define HAVE_UTMPX_H 1 */ ++ ++/* Define to 1 if you have the header file. */ ++#define HAVE_UTMP_H 1 ++ ++/* Whether the utmp struct has a property ut_addr */ ++#define HAVE_UT_UT_ADDR 1 ++ ++/* Whether the utmp struct has a property ut_exit */ ++#define HAVE_UT_UT_EXIT 1 ++ ++/* Whether the utmp struct has a property ut_host */ ++#define HAVE_UT_UT_HOST 1 ++ ++/* Whether the utmp struct has a property ut_id */ ++#define HAVE_UT_UT_ID 1 ++ ++/* Whether the utmp struct has a property ut_name */ ++#define HAVE_UT_UT_NAME 1 ++ ++/* Whether the utmp struct has a property ut_pid */ ++#define HAVE_UT_UT_PID 1 ++ ++/* Whether the utmp struct has a property ut_time */ ++#define HAVE_UT_UT_TIME 1 ++ ++/* Whether the utmp struct has a property ut_tv */ ++#define HAVE_UT_UT_TV 1 ++ ++/* Whether the utmp struct has a property ut_type */ ++#define HAVE_UT_UT_TYPE 1 ++ ++/* Whether the utmp struct has a property ut_user */ ++#define HAVE_UT_UT_USER 1 ++ ++/* Whether the utmpx struct has a property ut_syslen */ ++/* #undef HAVE_UX_UT_SYSLEN */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_VALGRIND_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_VALGRIND_MEMCHECK_H */ ++ ++/* Define to 1 if you have the header file. */ ++/* #undef HAVE_VALGRIND_VALGRIND_H */ ++ ++/* Define to 1 if you have the `vasprintf' function. */ ++#define HAVE_VASPRINTF 1 ++ ++/* Whether vasprintf() is available */ ++#define HAVE_VASPRINTF_DECL 1 ++ ++/* Whether va_copy() is available */ ++#define HAVE_VA_COPY 1 ++ ++/* Whether the C compiler understands volatile */ ++#define HAVE_VOLATILE 1 ++ ++/* Define to 1 if you have the `vsnprintf' function. */ ++#define HAVE_VSNPRINTF 1 ++ ++/* Whether vsnprintf() is available */ ++#define HAVE_VSNPRINTF_DECL 1 ++ ++/* Define to 1 if you have the `vsyslog' function. */ ++#define HAVE_VSYSLOG 1 ++ ++/* Define to 1 if you have the `waitpid' function. */ ++#define HAVE_WAITPID 1 ++ ++/* Define if you have working AF_LOCAL sockets */ ++#define HAVE_WORKING_AF_LOCAL 1 ++ ++/* Whether the WRFILE:-keytab is supported */ ++/* #undef HAVE_WRFILE_KEYTAB */ ++ ++/* Whether xfs quota support is available */ ++/* AR7 #define HAVE_XFS_QUOTAS 1 */ ++ ++/* Define to 1 if you have the `yp_get_default_domain' function. */ ++#define HAVE_YP_GET_DEFAULT_DOMAIN 1 ++ ++/* Define to 1 if you have the `_acl' function. */ ++/* #undef HAVE__ACL */ ++ ++/* Define to 1 if you have the `_chdir' function. */ ++/* #undef HAVE__CHDIR */ ++ ++/* Define to 1 if you have the `_close' function. */ ++/* #undef HAVE__CLOSE */ ++ ++/* Define to 1 if you have the `_closedir' function. */ ++/* #undef HAVE__CLOSEDIR */ ++ ++/* Define to 1 if you have the `_dup' function. */ ++/* #undef HAVE__DUP */ ++ ++/* Define to 1 if you have the `_dup2' function. */ ++/* #undef HAVE__DUP2 */ ++ ++/* Define to 1 if you have the `_et_list' function. */ ++/* #undef HAVE__ET_LIST */ ++ ++/* Define to 1 if you have the `_facl' function. */ ++/* #undef HAVE__FACL */ ++ ++/* Define to 1 if you have the `_fchdir' function. */ ++/* #undef HAVE__FCHDIR */ ++ ++/* Define to 1 if you have the `_fcntl' function. */ ++/* #undef HAVE__FCNTL */ ++ ++/* Define to 1 if you have the `_fork' function. */ ++/* #undef HAVE__FORK */ ++ ++/* Define to 1 if you have the `_fstat' function. */ ++/* #undef HAVE__FSTAT */ ++ ++/* Define to 1 if you have the `_fstat64' function. */ ++/* #undef HAVE__FSTAT64 */ ++ ++/* Define to 1 if you have the `_getcwd' function. */ ++/* #undef HAVE__GETCWD */ ++ ++/* Define to 1 if you have the `_getdents' function. */ ++/* #undef HAVE__GETDENTS */ ++ ++/* Define to 1 if you have the `_llseek' function. */ ++/* #undef HAVE__LLSEEK */ ++ ++/* Define to 1 if you have the `_lseek' function. */ ++/* #undef HAVE__LSEEK */ ++ ++/* Define to 1 if you have the `_lstat' function. */ ++/* #undef HAVE__LSTAT */ ++ ++/* Define to 1 if you have the `_lstat64' function. */ ++/* #undef HAVE__LSTAT64 */ ++ ++/* Define to 1 if you have the `_open' function. */ ++/* #undef HAVE__OPEN */ ++ ++/* Define to 1 if you have the `_open64' function. */ ++/* #undef HAVE__OPEN64 */ ++ ++/* Define to 1 if you have the `_opendir' function. */ ++/* #undef HAVE__OPENDIR */ ++ ++/* Define to 1 if you have the `_pread' function. */ ++/* #undef HAVE__PREAD */ ++ ++/* Define to 1 if you have the `_pread64' function. */ ++/* #undef HAVE__PREAD64 */ ++ ++/* Define to 1 if you have the `_pwrite' function. */ ++/* #undef HAVE__PWRITE */ ++ ++/* Define to 1 if you have the `_pwrite64' function. */ ++/* #undef HAVE__PWRITE64 */ ++ ++/* Define to 1 if you have the `_read' function. */ ++/* #undef HAVE__READ */ ++ ++/* Define to 1 if you have the `_readdir' function. */ ++/* #undef HAVE__READDIR */ ++ ++/* Define to 1 if you have the `_readdir64' function. */ ++/* #undef HAVE__READDIR64 */ ++ ++/* Define to 1 if you have the `_seekdir' function. */ ++/* #undef HAVE__SEEKDIR */ ++ ++/* Define to 1 if you have the `_stat' function. */ ++/* #undef HAVE__STAT */ ++ ++/* Define to 1 if you have the `_stat64' function. */ ++/* #undef HAVE__STAT64 */ ++ ++/* Define to 1 if you have the `_telldir' function. */ ++/* #undef HAVE__TELLDIR */ ++ ++/* Define to 1 if you have the `_write' function. */ ++/* #undef HAVE__WRITE */ ++ ++/* Define to 1 if you have the `__acl' function. */ ++/* #undef HAVE___ACL */ ++ ++/* Define to 1 if you have the `__chdir' function. */ ++/* #undef HAVE___CHDIR */ ++ ++/* Define to 1 if you have the `__close' function. */ ++#define HAVE___CLOSE 1 ++ ++/* Define to 1 if you have the `__closedir' function. */ ++/* #undef HAVE___CLOSEDIR */ ++ ++/* Define to 1 if you have the `__dup' function. */ ++/* #undef HAVE___DUP */ ++ ++/* Define to 1 if you have the `__dup2' function. */ ++#define HAVE___DUP2 1 ++ ++/* Define to 1 if you have the `__facl' function. */ ++/* #undef HAVE___FACL */ ++ ++/* Define to 1 if you have the `__fchdir' function. */ ++/* #undef HAVE___FCHDIR */ ++ ++/* Define to 1 if you have the `__fcntl' function. */ ++#define HAVE___FCNTL 1 ++ ++/* Define to 1 if you have the `__fork' function. */ ++#define HAVE___FORK 1 ++ ++/* Define to 1 if you have the `__fstat' function. */ ++#define HAVE___FSTAT 1 ++ ++/* Define to 1 if you have the `__fstat64' function. */ ++/* #undef HAVE___FSTAT64 */ ++ ++/* Define to 1 if you have the `__fxstat' function. */ ++#define HAVE___FXSTAT 1 ++ ++/* Define to 1 if you have the `__getcwd' function. */ ++/* #undef HAVE___GETCWD */ ++ ++/* Define to 1 if you have the `__getdents' function. */ ++/* #undef HAVE___GETDENTS */ ++ ++/* Define to 1 if you have the `__llseek' function. */ ++/* #undef HAVE___LLSEEK */ ++ ++/* Define to 1 if you have the `__lseek' function. */ ++#define HAVE___LSEEK 1 ++ ++/* Define to 1 if you have the `__lstat' function. */ ++#define HAVE___LSTAT 1 ++ ++/* Define to 1 if you have the `__lstat64' function. */ ++/* #undef HAVE___LSTAT64 */ ++ ++/* Define to 1 if you have the `__lxstat' function. */ ++#define HAVE___LXSTAT 1 ++ ++/* Define to 1 if you have the `__open' function. */ ++#define HAVE___OPEN 1 ++ ++/* Define to 1 if you have the `__open64' function. */ ++/* AR7 #define HAVE___OPEN64 1 */ ++ ++/* Define to 1 if you have the `__opendir' function. */ ++/* #undef HAVE___OPENDIR */ ++ ++/* Define to 1 if you have the `__pread' function. */ ++/* #undef HAVE___PREAD */ ++ ++/* Define to 1 if you have the `__pread64' function. */ ++/* AR7 #define HAVE___PREAD64 1 */ ++ ++/* Define to 1 if you have the `__pwrite' function. */ ++/* #undef HAVE___PWRITE */ ++ ++/* Define to 1 if you have the `__pwrite64' function. */ ++/* AR7 #define HAVE___PWRITE64 1 */ ++ ++/* Define to 1 if you have the `__read' function. */ ++#define HAVE___READ 1 ++ ++/* Define to 1 if you have the `__readdir' function. */ ++/* #undef HAVE___READDIR */ ++ ++/* Define to 1 if you have the `__readdir64' function. */ ++/* #undef HAVE___READDIR64 */ ++ ++/* Define to 1 if you have the `__seekdir' function. */ ++/* #undef HAVE___SEEKDIR */ ++ ++/* Define to 1 if you have the `__stat' function. */ ++#define HAVE___STAT 1 ++ ++/* Define to 1 if you have the `__stat64' function. */ ++/* #undef HAVE___STAT64 */ ++ ++/* Define to 1 if you have the `__sys_llseek' function. */ ++/* #undef HAVE___SYS_LLSEEK */ ++ ++/* Define to 1 if you have the `__telldir' function. */ ++/* #undef HAVE___TELLDIR */ ++ ++/* Whether __va_copy() is available */ ++/* #undef HAVE___VA_COPY */ ++ ++/* Define to 1 if you have the `__write' function. */ ++#define HAVE___WRITE 1 ++ ++/* Define to 1 if you have the `__xstat' function. */ ++#define HAVE___XSTAT 1 ++ ++/* Whether the host os is HPUX */ ++/* #undef HPUX */ ++ ++/* Whether the hpux sendfile() API is available */ ++/* #undef HPUX_SENDFILE_API */ ++ ++/* Whether to use intel spinlocks */ ++/* #undef INTEL_SPINLOCKS */ ++ ++/* Whether the host os is irix */ ++/* #undef IRIX */ ++ ++/* Whether the host os is irix6 */ ++/* #undef IRIX6 */ ++ ++/* Whether krb5_princ_realm returns krb5_realm or krb5_data */ ++/* #undef KRB5_PRINC_REALM_RETURNS_REALM */ ++ ++/* Number of arguments to ldap_set_rebind_proc */ ++/* #undef LDAP_SET_REBIND_PROC_ARGS */ ++ ++/* Whether the host os is linux */ ++#define LINUX 1 ++ ++/* Whether (linux) sendfile() is broken */ ++/* #undef LINUX_BROKEN_SENDFILE_API */ ++ ++/* Whether linux sendfile() API is available */ ++#define LINUX_SENDFILE_API 1 ++ ++/* Whether to use mips spinlocks */ ++/* #undef MIPS_SPINLOCKS */ ++ ++/* Whether MMAP is broken */ ++/* #undef MMAP_BLACKLIST */ ++ ++/* Whether the host os is NeXT v2 */ ++/* #undef NEXT2 */ ++ ++/* Define to 1 if your C compiler doesn't accept -c and -o together. */ ++/* #undef NO_MINUS_C_MINUS_O */ ++ ++/* Whether the host os is osf1 */ ++/* #undef OSF1 */ ++ ++/* Define to the address where bug reports for this package should be sent. */ ++#define PACKAGE_BUGREPORT "" ++ ++/* Define to the full name of this package. */ ++#define PACKAGE_NAME "" ++ ++/* Define to the full name and version of this package. */ ++#define PACKAGE_STRING "" ++ ++/* Define to the one symbol short name of this package. */ ++#define PACKAGE_TARNAME "" ++ ++/* Define to the version of this package. */ ++#define PACKAGE_VERSION "" ++ ++/* Does a POSIX ACL need a mask element */ ++/* #undef POSIX_ACL_NEEDS_MASK */ ++ ++/* Whether to use powerpc spinlocks */ ++/* #undef POWERPC_SPINLOCKS */ ++ ++/* Whether pututline returns pointer */ ++#define PUTUTLINE_RETURNS_UTMP 1 ++ ++/* Whether the host os is qnx */ ++/* #undef QNX */ ++ ++/* Whether the realpath function allows NULL */ ++#define REALPATH_TAKES_NULL 1 ++ ++/* Whether the host os is reliantunix */ ++/* #undef RELIANTUNIX */ ++ ++/* Whether getpass should be replaced */ ++#define REPLACE_GETPASS 1 ++ ++/* Whether inet_ntoa should be replaced */ ++/* #undef REPLACE_INET_NTOA */ ++ ++/* Define as the return type of signal handlers (`int' or `void'). */ ++#define RETSIGTYPE void ++ ++/* Whether the host os is sco unix */ ++/* #undef SCO */ ++ ++/* Whether seekdir returns void */ ++#define SEEKDIR_RETURNS_VOID 1 ++ ++/* The size of the 'ino_t' type */ ++/* AR7 #define SIZEOF_INO_T 8 */ ++#define SIZEOF_INO_T 4 /* AR7 */ ++ ++/* The size of a `int', as computed by sizeof. */ ++#define SIZEOF_INT 4 ++ ++/* The size of a `long', as computed by sizeof. */ ++#define SIZEOF_LONG 4 ++ ++/* The size of the 'off_t' type */ ++/* AR7 #define SIZEOF_OFF_T 8 */ ++#define SIZEOF_OFF_T 4 /* AR7 */ ++ ++/* The size of a `short', as computed by sizeof. */ ++#define SIZEOF_SHORT 2 ++ ++/* Use socket wrapper library */ ++/* #undef SOCKET_WRAPPER */ ++ ++/* Whether the solaris sendfile() API is available */ ++/* #undef SOLARIS_SENDFILE_API */ ++ ++/* Whether to use sparc spinlocks */ ++/* #undef SPARC_SPINLOCKS */ ++ ++/* Whether statfs requires two arguments and struct statfs has bsize property ++ */ ++/* #undef STAT_STATFS2_BSIZE */ ++ ++/* Whether statfs requires 2 arguments and struct statfs has fsize */ ++/* #undef STAT_STATFS2_FSIZE */ ++ ++/* Whether statfs requires 2 arguments and struct fs_data is available */ ++/* #undef STAT_STATFS2_FS_DATA */ ++ ++/* Whether statfs requires 3 arguments */ ++/* #undef STAT_STATFS3_OSF1 */ ++ ++/* Whether statfs requires 4 arguments */ ++/* #undef STAT_STATFS4 */ ++ ++/* Whether statvfs() is available */ ++#define STAT_STATVFS 1 /* AR7 */ ++ ++/* Whether statvfs64() is available */ ++/* AR7 #define STAT_STATVFS64 1 */ ++ ++/* The size of a block */ ++#define STAT_ST_BLOCKSIZE 512 ++ ++/* Define to 1 if you have the ANSI C header files. */ ++#define STDC_HEADERS 1 ++ ++/* String list of builtin modules */ ++#define STRING_STATIC_MODULES " pdb_smbpasswd pdb_tdbsam pdb_guest rpc_lsa rpc_reg rpc_lsa_ds rpc_wks rpc_svcctl rpc_net rpc_dfs rpc_srv rpc_spoolss rpc_eventlog rpc_samr idmap_tdb auth_rhosts auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin" ++ ++/* Whether the host os is sunos4 */ ++/* #undef SUNOS4 */ ++ ++/* Whether the host os is solaris */ ++/* #undef SUNOS5 */ ++ ++/* Whether sysconf(_SC_NGROUPS_MAX) is available */ ++#define SYSCONF_SC_NGROUPS_MAX 1 ++ ++/* Whether sysconf(_SC_NPROC_ONLN) is available */ ++/* #undef SYSCONF_SC_NPROC_ONLN */ ++ ++/* Whether this is a system V system */ ++/* #undef SYSV */ ++ ++/* Define to 1 if you can safely include both and . */ ++#define TIME_WITH_SYS_TIME 1 ++ ++/* Whether the host os is unixware */ ++/* #undef UNIXWARE */ ++ ++/* Whether to use both of HPUX' crypt calls */ ++/* #undef USE_BOTH_CRYPT_CALLS */ ++ ++/* Whether seteuid() is available */ ++/* #undef USE_SETEUID */ ++ ++/* Whether setresuid() is available */ ++#define USE_SETRESUID 1 ++ ++/* Whether setreuid() is available */ ++/* #undef USE_SETREUID */ ++ ++/* Whether setuidx() is available */ ++/* #undef USE_SETUIDX */ ++ ++/* Whether to use spin locks instead of fcntl locks */ ++/* #undef USE_SPINLOCKS */ ++ ++/* Whether to include Active Directory support */ ++/* #undef WITH_ADS */ ++ ++/* Whether to include AFS clear-text auth support */ ++/* #undef WITH_AFS */ ++ ++/* Using asynchronous io */ ++/* #undef WITH_AIO */ ++ ++/* Whether to include automount support */ ++/* #undef WITH_AUTOMOUNT */ ++ ++/* Whether to include DFS support */ ++/* #undef WITH_DFS */ ++ ++/* Whether to include AFS fake-kaserver support */ ++/* #undef WITH_FAKE_KASERVER */ ++ ++/* Whether to include 2.2 compatible LDAP SAM configuration */ ++/* #undef WITH_LDAP_SAMCONFIG */ ++ ++/* Whether to include nisplus_home support */ ++/* #undef WITH_NISPLUS_HOME */ ++ ++/* Whether to include PAM support */ ++/* #undef WITH_PAM */ ++ ++/* Whether to use profiling */ ++/* #undef WITH_PROFILE */ ++ ++/* Whether to use disk quota support */ ++/* AR7 #define WITH_QUOTAS 1 */ ++ ++/* Whether to include sendfile() support */ ++#define WITH_SENDFILE 1 ++ ++/* Whether to build smbmount */ ++/* #undef WITH_SMBMOUNT */ ++ ++/* Whether to include smbwrapper support */ ++/* #undef WITH_SMBWRAPPER */ ++ ++/* Whether to include experimental syslog support */ ++/* #undef WITH_SYSLOG */ ++ ++/* Whether to include experimental utmp accounting */ ++#define WITH_UTMP 1 ++ ++/* Whether to build winbind */ ++#define WITH_WINBIND 1 ++ ++/* Define to 1 if your processor stores words with the most significant byte ++ first (like Motorola and SPARC, unlike Intel and VAX). */ ++/* #undef WORDS_BIGENDIAN */ ++ ++/* Required alignment */ ++/* #undef _ALIGNMENT_REQUIRED */ ++ ++/* File offset bits */ ++#ifdef WITH_LFS ++#define _FILE_OFFSET_BITS 64 /* Large File Support */ ++#endif ++ ++/* Whether to use GNU libc extensions */ ++#define _GNU_SOURCE 1 ++ ++/* Whether to use HPUX extensions */ ++/* #undef _HPUX_SOURCE */ ++ ++/* Whether to enable large file support */ ++/* AR7 #define _LARGEFILE64_SOURCE 1 */ ++ ++/* Whether to enable large file support */ ++/* #undef _LARGE_FILES */ ++ ++/* Maximum alignment */ ++/* #undef _MAX_ALIGNMENT */ ++ ++/* Whether to enable POSIX support */ ++/* #undef _POSIX_C_SOURCE */ ++ ++/* Whether to use POSIX compatible functions */ ++/* #undef _POSIX_SOURCE */ ++ ++/* Whether to enable System V compatibility */ ++/* #undef _SYSV */ ++ ++/* Define to 1 if type `char' is unsigned and you are not using gcc. */ ++#ifndef __CHAR_UNSIGNED__ ++/* # undef __CHAR_UNSIGNED__ */ ++#endif ++ ++/* Whether to build auth_builtin as shared module */ ++/* #undef auth_builtin_init */ ++ ++/* Whether to build auth_domain as shared module */ ++/* #undef auth_domain_init */ ++ ++/* Whether to build auth_rhosts as shared module */ ++/* #undef auth_rhosts_init */ ++ ++/* Whether to build auth_sam as shared module */ ++/* #undef auth_sam_init */ ++ ++/* Whether to build auth_server as shared module */ ++/* #undef auth_server_init */ ++ ++/* Whether to build auth_unix as shared module */ ++/* #undef auth_unix_init */ ++ ++/* Whether to build auth_winbind as shared module */ ++/* #undef auth_winbind_init */ ++ ++/* Whether to build charset_CP437 as shared module */ ++#define charset_CP437_init init_module ++ ++/* Whether to build charset_CP850 as shared module */ ++#define charset_CP850_init init_module ++ ++/* Whether to build charset_macosxfs as shared module */ ++/* #undef charset_macosxfs_init */ ++ ++/* Whether to build charset_weird as shared module */ ++/* #undef charset_weird_init */ ++ ++/* Define to empty if `const' does not conform to ANSI C. */ ++/* #undef const */ ++ ++/* Define to `int' if doesn't define. */ ++/* #undef gid_t */ ++ ++/* Whether to build idmap_ad as shared module */ ++/* #undef idmap_ad_init */ ++ ++/* Whether to build idmap_ldap as shared module */ ++/* #undef idmap_ldap_init */ ++ ++/* Whether to build idmap_rid as shared module */ ++/* #undef idmap_rid_init */ ++ ++/* Whether to build idmap_tdb as shared module */ ++/* #undef idmap_tdb_init */ ++ ++/* Define to `__inline__' or `__inline' if that's what the C compiler ++ calls it, or to nothing if 'inline' is not supported under any name. */ ++#ifndef __cplusplus ++/* #undef inline */ ++#endif ++ ++/* Define to `unsigned' if does not define. */ ++/* #undef ino_t */ ++ ++/* Define to `off_t' if does not define. */ ++/* #undef loff_t */ ++ ++/* Define to `int' if does not define. */ ++/* #undef mode_t */ ++ ++/* Define to `long' if does not define. */ ++/* #undef off_t */ ++ ++/* Define to `loff_t' if does not define. */ ++#define offset_t loff_t ++ ++/* Whether to build pdb_guest as shared module */ ++/* #undef pdb_guest_init */ ++ ++/* Whether to build pdb_ldap as shared module */ ++/* #undef pdb_ldap_init */ ++ ++/* Whether to build pdb_mysql as shared module */ ++/* #undef pdb_mysql_init */ ++ ++/* Whether to build pdb_pgsql as shared module */ ++/* #undef pdb_pgsql_init */ ++ ++/* Whether to build pdb_smbpasswd as shared module */ ++/* #undef pdb_smbpasswd_init */ ++ ++/* Whether to build pdb_tdbsam as shared module */ ++/* #undef pdb_tdbsam_init */ ++ ++/* Whether to build pdb_xml as shared module */ ++/* #undef pdb_xml_init */ ++ ++/* Define to `int' if does not define. */ ++/* #undef pid_t */ ++ ++/* Whether to build rpc_dfs as shared module */ ++/* #undef rpc_dfs_init */ ++ ++/* Whether to build rpc_echo as shared module */ ++/* #undef rpc_echo_init */ ++ ++/* Whether to build rpc_eventlog as shared module */ ++/* #undef rpc_eventlog_init */ ++ ++/* Whether to build rpc_lsa_ds as shared module */ ++/* #undef rpc_lsa_ds_init */ ++ ++/* Whether to build rpc_lsa as shared module */ ++/* #undef rpc_lsa_init */ ++ ++/* Whether to build rpc_net as shared module */ ++/* #undef rpc_net_init */ ++ ++/* Whether to build rpc_reg as shared module */ ++/* #undef rpc_reg_init */ ++ ++/* Whether to build rpc_samr as shared module */ ++/* #undef rpc_samr_init */ ++ ++/* Whether to build rpc_spoolss as shared module */ ++/* #undef rpc_spoolss_init */ ++ ++/* Whether to build rpc_srv as shared module */ ++/* #undef rpc_srv_init */ ++ ++/* Whether to build rpc_svcctl as shared module */ ++/* #undef rpc_svcctl_init */ ++ ++/* Whether to build rpc_wks as shared module */ ++/* #undef rpc_wks_init */ ++ ++/* Define to `unsigned' if does not define. */ ++/* #undef size_t */ ++ ++/* Define to `int' if does not define. */ ++/* #undef ssize_t */ ++ ++/* Static init functions */ ++/* AR7 #define static_init_auth { auth_rhosts_init(); auth_sam_init(); auth_unix_init(); auth_winbind_init(); auth_server_init(); auth_domain_init(); auth_builtin_init();} */ ++#define static_init_auth { auth_sam_init(); auth_builtin_init();} ++ ++/* Static init functions */ ++#define static_init_charset {} ++ ++/* Static init functions */ ++#define static_init_idmap { idmap_tdb_init();} ++ ++/* Static init functions */ ++#define static_init_pdb { pdb_smbpasswd_init(); pdb_tdbsam_init(); /* pdb_guest_init(); */} ++ ++/* Static init functions */ ++/* AR7 #define static_init_rpc { rpc_lsa_init(); rpc_reg_init(); rpc_lsa_ds_init(); rpc_wks_init(); rpc_svcctl_init(); rpc_net_init(); rpc_dfs_init(); rpc_srv_init(); rpc_spoolss_init(); rpc_eventlog_init(); rpc_samr_init();} */ ++#define static_init_rpc { rpc_lsa_init(); /* rpc_reg_init();*/ rpc_lsa_ds_init(); rpc_wks_init(); /* rpc_svcctl_init(); */ rpc_net_init(); rpc_dfs_init(); /* rpc_srv_init(); */ /* rpc_eventlog_init(); */ /* rpc_samr_init(); */} ++ ++/* Static init functions */ ++#define static_init_vfs {} ++ ++/* Define to `int' if doesn't define. */ ++/* #undef uid_t */ ++ ++/* Whether to build vfs_afsacl as shared module */ ++/* #undef vfs_afsacl_init */ ++ ++/* Whether to build vfs_audit as shared module */ ++#define vfs_audit_init init_module ++ ++/* Whether to build vfs_cap as shared module */ ++#define vfs_cap_init init_module ++ ++/* Whether to build vfs_catia as shared module */ ++/* #undef vfs_catia_init */ ++ ++/* Whether to build vfs_default_quota as shared module */ ++#define vfs_default_quota_init init_module ++ ++/* Whether to build vfs_expand_msdfs as shared module */ ++#define vfs_expand_msdfs_init init_module ++ ++/* Whether to build vfs_extd_audit as shared module */ ++#define vfs_extd_audit_init init_module ++ ++/* Whether to build vfs_fake_perms as shared module */ ++#define vfs_fake_perms_init init_module ++ ++/* Whether to build vfs_full_audit as shared module */ ++#define vfs_full_audit_init init_module ++ ++/* Whether to build vfs_netatalk as shared module */ ++#define vfs_netatalk_init init_module ++ ++/* Whether to build vfs_readonly as shared module */ ++#define vfs_readonly_init init_module ++ ++/* Whether to build vfs_recycle as shared module */ ++#define vfs_recycle_init init_module ++ ++/* Whether to build vfs_shadow_copy as shared module */ ++#define vfs_shadow_copy_init init_module ++ ++/* Define to `unsigned short' if does not define. */ ++/* #undef wchar_t */ +diff -urN samba-3.0.24.orig/source/include/debug.h samba-3.0.24/source/include/debug.h +--- samba-3.0.24.orig/source/include/debug.h 2006-04-20 04:29:39.000000000 +0200 ++++ samba-3.0.24/source/include/debug.h 2007-08-07 09:38:18.000000000 +0200 +@@ -162,6 +162,26 @@ + * will remove the extra conditional test. + */ + ++#if 1 /* AR7 */ ++ ++#define DEBUGLVL( level ) (0) ++#define DEBUGLVLC( dbgc_class, level ) (0) ++#ifndef SAMBA_DEBUG ++#define DEBUG( level, body ) (0) ++#define Log(x) (0) ++#else ++void _fDebug(char *fmt, ...); ++#define DEBUG( level, body ) _fDebug body ++#define Log(x) _fLog x ++void _fLog(char *fmt, ...); ++#endif ++ ++#define DEBUGC( dbgc_class, level, body ) (0) ++#define DEBUGADD( level, body ) (0) ++#define DEBUGADDC( dbgc_class, level, body ) (0) ++ ++#else ++ + #define DEBUGLVL( level ) \ + ( ((level) <= MAX_DEBUG_LEVEL) && \ + ((DEBUGLEVEL_CLASS[ DBGC_CLASS ] >= (level))|| \ +@@ -208,8 +228,13 @@ + DEBUGLEVEL_CLASS[ DBGC_ALL ] >= (level)) ) \ + && (dbgtext body) ) + ++#endif /* AR7 */ ++ ++ + /* Print a separator to the debug log. */ + #define DEBUGSEP(level)\ + DEBUG((level),("===============================================================\n")) + ++ ++ + #endif +diff -urN samba-3.0.24.orig/source/include/local.h samba-3.0.24/source/include/local.h +--- samba-3.0.24.orig/source/include/local.h 2006-04-20 04:29:39.000000000 +0200 ++++ samba-3.0.24/source/include/local.h 2007-07-17 13:19:05.000000000 +0200 +@@ -16,7 +16,8 @@ + only important messages. This gives *much* smaller binaries + */ + #ifndef MAX_DEBUG_LEVEL +-#define MAX_DEBUG_LEVEL 1000 ++/* AR7 #define MAX_DEBUG_LEVEL 1000 */ ++#define MAX_DEBUG_LEVEL 0 + #endif + + /* This defines the section name in the configuration file that will contain */ +@@ -49,7 +50,8 @@ + #define MAX_DIRECTORY_HANDLES 2048 + + /* maximum number of file caches per smbd */ +-#define MAX_WRITE_CACHES 10 ++/* #define MAX_WRITE_CACHES 10 */ ++#define MAX_WRITE_CACHES 2 /* AVM */ + + /* define what facility to use for syslog */ + #ifndef SYSLOG_FACILITY +diff -urN samba-3.0.24.orig/source/include/smb.h samba-3.0.24/source/include/smb.h +--- samba-3.0.24.orig/source/include/smb.h 2007-02-04 19:59:23.000000000 +0100 ++++ samba-3.0.24/source/include/smb.h 2007-08-07 09:38:18.000000000 +0200 +@@ -1436,6 +1436,7 @@ + #define FLAGS2_LONG_PATH_COMPONENTS 0x0001 + #define FLAGS2_EXTENDED_ATTRIBUTES 0x0002 + #define FLAGS2_SMB_SECURITY_SIGNATURES 0x0004 ++#define FLAGS2_UNKNOWN_BIT4 0x0010 + #define FLAGS2_IS_LONG_NAME 0x0040 + #define FLAGS2_EXTENDED_SECURITY 0x0800 + #define FLAGS2_DFS_PATHNAMES 0x1000 +@@ -1499,7 +1500,8 @@ + + /* Remote architectures we know about. */ + enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT, +- RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_SAMBA, RA_CIFSFS}; ++ RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_VISTA, ++ RA_SAMBA, RA_CIFSFS}; + + /* case handling */ + enum case_handling {CASE_LOWER,CASE_UPPER}; +diff -urN samba-3.0.24.orig/source/include/smb_macros.h samba-3.0.24/source/include/smb_macros.h +--- samba-3.0.24.orig/source/include/smb_macros.h 2006-04-20 04:29:39.000000000 +0200 ++++ samba-3.0.24/source/include/smb_macros.h 2007-08-07 09:38:18.000000000 +0200 +@@ -310,7 +310,6 @@ + #if defined(PARANOID_MALLOC_CHECKER) + + #define PRS_ALLOC_MEM(ps, type, count) (type *)prs_alloc_mem_((ps),sizeof(type),(count)) +-#define PRS_ALLOC_MEM_VOID(ps, size) prs_alloc_mem_((ps),(size),1) + + /* Get medieval on our ass about malloc.... */ + +@@ -354,7 +353,6 @@ + #define __location__ __FILE__ ":" __LINESTR__ + + #define PRS_ALLOC_MEM(ps, type, count) (type *)prs_alloc_mem((ps),sizeof(type),(count)) +-#define PRS_ALLOC_MEM_VOID(ps, size) prs_alloc_mem((ps),(size),1) + + /* Regular malloc code. */ + +diff -urN samba-3.0.24.orig/source/lib/dummysmbd.c samba-3.0.24/source/lib/dummysmbd.c +--- samba-3.0.24.orig/source/lib/dummysmbd.c 2006-04-20 04:29:23.000000000 +0200 ++++ samba-3.0.24/source/lib/dummysmbd.c 2007-08-07 09:38:18.000000000 +0200 +@@ -38,3 +38,9 @@ + { + return False; + } ++ ++NTSTATUS can_delete_directory(struct connection_struct *conn, ++ const char *dirname) ++{ ++ return NT_STATUS_OK; ++} +diff -urN samba-3.0.24.orig/source/lib/fsusage.c samba-3.0.24/source/lib/fsusage.c +--- samba-3.0.24.orig/source/lib/fsusage.c 2005-02-25 18:59:32.000000000 +0100 ++++ samba-3.0.24/source/lib/fsusage.c 2007-07-17 13:19:05.000000000 +0200 +@@ -51,6 +51,8 @@ + #define CONVERT_BLOCKS(B) adjust_blocks ((SMB_BIG_UINT)(B), (SMB_BIG_UINT)fsd.f_fsize, (SMB_BIG_UINT)512) + struct statfs fsd; + ++ ++// #error STAT_STATFS3_OSF1 + if (statfs (path, &fsd, sizeof (struct statfs)) != 0) + return -1; + #endif /* STAT_STATFS3_OSF1 */ +@@ -59,6 +61,7 @@ + #define CONVERT_BLOCKS(B) adjust_blocks ((SMB_BIG_UINT)(B), (SMB_BIG_UINT)1024, (SMB_BIG_UINT)512) + struct fs_data fsd; + ++// #error STAT_STATFS2_FS_DATA + if (statfs (path, &fsd) != 1) + return -1; + +@@ -70,6 +73,7 @@ + #define CONVERT_BLOCKS(B) adjust_blocks ((SMB_BIG_UINT)(B), (SMB_BIG_UINT)fsd.f_bsize, (SMB_BIG_UINT)512) + struct statfs fsd; + ++// #error STAT_STATFS2_FS_BSIZE + if (statfs (path, &fsd) < 0) + return -1; + +@@ -93,6 +97,7 @@ + + struct statfs fsd; + ++// #error STAT_STATFS2_FSIZE + if (statfs (path, &fsd) < 0) + return -1; + #endif /* STAT_STATFS2_FSIZE */ +@@ -114,6 +119,7 @@ + + struct statfs fsd; + ++// #error STAT_STATFS4 + if (statfs (path, &fsd, sizeof fsd, 0) < 0) + return -1; + /* Empirically, the block counts on most SVR3 and SVR3-derived +@@ -127,9 +133,11 @@ + adjust_blocks ((SMB_BIG_UINT)(B), fsd.f_frsize ? (SMB_BIG_UINT)fsd.f_frsize : (SMB_BIG_UINT)fsd.f_bsize, (SMB_BIG_UINT)512) + + #ifdef STAT_STATVFS64 ++// #error STAT_STATVFS64 + struct statvfs64 fsd; + if (statvfs64(path, &fsd) < 0) return -1; + #else ++// #error STAT_STATVFS + struct statvfs fsd; + if (statvfs(path, &fsd) < 0) return -1; + #endif +@@ -139,6 +147,7 @@ + #endif /* STAT_STATVFS */ + + #ifndef CONVERT_BLOCKS ++#error no STAT_STATxxx defined - we have no dfree code! + /* we don't have any dfree code! */ + return -1; + #else +diff -urN samba-3.0.24.orig/source/lib/iconv.c samba-3.0.24/source/lib/iconv.c +--- samba-3.0.24.orig/source/lib/iconv.c 2007-02-04 19:59:17.000000000 +0100 ++++ samba-3.0.24/source/lib/iconv.c 2007-07-17 13:19:05.000000000 +0200 +@@ -388,7 +388,10 @@ + + while (*inbytesleft >= 2 && *outbytesleft >= 1) { + (*outbuf)[0] = (*inbuf)[0]; +- if ((*inbuf)[1]) ir_count++; ++ if ((*inbuf)[1]) { ++ ir_count++; ++ (*outbuf)[0] = '_'; // AR7 ++ } + (*inbytesleft) -= 2; + (*outbytesleft) -= 1; + (*inbuf) += 2; +diff -urN samba-3.0.24.orig/source/lib/pidfile.c samba-3.0.24/source/lib/pidfile.c +--- samba-3.0.24.orig/source/lib/pidfile.c 2007-02-04 19:59:17.000000000 +0100 ++++ samba-3.0.24/source/lib/pidfile.c 2007-07-17 13:19:05.000000000 +0200 +@@ -82,19 +82,22 @@ + { + int fd; + char buf[20]; +- char *short_configfile; + pstring name; + pstring pidFile; + pid_t pid; + ++#if 0 /* AVM */ + /* Add a suffix to the program name if this is a process with a + * none default configuration file name. */ + if (strcmp( CONFIGFILE, dyn_CONFIGFILE) == 0) { + strncpy( name, program_name, sizeof( name)-1); + } else { +- short_configfile = strrchr( dyn_CONFIGFILE, '/'); ++ char *short_configfile = strrchr( dyn_CONFIGFILE, '/'); + slprintf( name, sizeof( name)-1, "%s-%s", program_name, short_configfile+1); + } ++#else ++ strncpy( name, program_name, sizeof( name)-1); ++#endif + + slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name); + +diff -urN samba-3.0.24.orig/source/lib/smbrun.c samba-3.0.24/source/lib/smbrun.c +--- samba-3.0.24.orig/source/lib/smbrun.c 2006-04-20 04:29:23.000000000 +0200 ++++ samba-3.0.24/source/lib/smbrun.c 2007-08-07 09:38:18.000000000 +0200 +@@ -55,7 +55,7 @@ + outfd (or discard it if outfd is NULL). + ****************************************************************************/ + +-int smbrun(const char *cmd, int *outfd) ++static int smbrun_internal(const char *cmd, int *outfd, BOOL sanitize) + { + pid_t pid; + uid_t uid = current_user.ut.uid; +@@ -173,13 +173,36 @@ + } + #endif + +- execl("/bin/sh","sh","-c",cmd,NULL); ++ { ++ const char *newcmd = sanitize ? escape_shell_string(cmd) : cmd; ++ if (!newcmd) { ++ exit(82); ++ } ++ execl("/bin/sh","sh","-c",newcmd,NULL); ++ } + + /* not reached */ +- exit(82); ++ exit(83); + return 1; + } + ++/**************************************************************************** ++ Use only in known safe shell calls (printing). ++****************************************************************************/ ++ ++int smbrun_no_sanitize(const char *cmd, int *outfd) ++{ ++ return smbrun_internal(cmd, outfd, False); ++} ++ ++/**************************************************************************** ++ By default this now sanitizes shell expansion. ++****************************************************************************/ ++ ++int smbrun(const char *cmd, int *outfd) ++{ ++ return smbrun_internal(cmd, outfd, True); ++} + + /**************************************************************************** + run a command being careful about uid/gid handling and putting the output in +@@ -302,7 +325,7 @@ + #endif + + execl("/bin/sh", "sh", "-c", cmd, NULL); +- ++ + /* not reached */ + exit(82); + return 1; +diff -urN samba-3.0.24.orig/source/lib/util.c samba-3.0.24/source/lib/util.c +--- samba-3.0.24.orig/source/lib/util.c 2007-02-04 19:59:17.000000000 +0100 ++++ samba-3.0.24/source/lib/util.c 2007-08-07 09:38:18.000000000 +0200 +@@ -300,7 +300,11 @@ + char *p; + if ((p = getenv("TMPDIR"))) + return p; ++#if 1 /* AR7 */ ++ return "/var/tmp"; ++#else + return "/tmp"; ++#endif + } + + /**************************************************************************** +@@ -2182,6 +2186,9 @@ + case RA_WIN2K3: + fstrcpy(remote_arch, "Win2K3"); + break; ++ case RA_VISTA: ++ fstrcpy(remote_arch, "Vista"); ++ break; + case RA_SAMBA: + fstrcpy(remote_arch,"Samba"); + break; +diff -urN samba-3.0.24.orig/source/lib/util_sec.c samba-3.0.24/source/lib/util_sec.c +--- samba-3.0.24.orig/source/lib/util_sec.c 2007-02-04 19:59:17.000000000 +0100 ++++ samba-3.0.24/source/lib/util_sec.c 2007-08-07 09:38:18.000000000 +0200 +@@ -286,28 +286,6 @@ + } + + /**************************************************************************** +- Lightweight become root - no group change. +-****************************************************************************/ +- +-void become_root_uid_only(void) +-{ +- save_re_uid(); +- set_effective_uid(0); +-} +- +-/**************************************************************************** +- Lightweight unbecome root - no group change. Expects we are root already, +- saves errno across call boundary. +-****************************************************************************/ +- +-void unbecome_root_uid_only(void) +-{ +- int saved_errno = errno; +- restore_re_uid_fromroot(); +- errno = saved_errno; +-} +- +-/**************************************************************************** + save the real and effective gid for later restoration. Used by the + getgroups code + ****************************************************************************/ +diff -urN samba-3.0.24.orig/source/lib/util_str.c samba-3.0.24/source/lib/util_str.c +--- samba-3.0.24.orig/source/lib/util_str.c 2007-02-04 19:59:17.000000000 +0100 ++++ samba-3.0.24/source/lib/util_str.c 2007-08-07 09:38:18.000000000 +0200 +@@ -680,14 +680,14 @@ + + for(i = 0; i < len; i++) { + int val = (src[i] & 0xff); +- if (isupper_ascii(val) || islower_ascii(val) || isdigit(val) || strchr_m(other_safe_chars, val)) ++ if (isupper_ascii(val) || islower_ascii(val) || isdigit(val) || strchr_m(other_safe_chars, val)) { + dest[i] = src[i]; +- else ++ } else { + dest[i] = '_'; ++ } + } + + dest[i] = '\0'; +- + return dest; + } + +@@ -2426,3 +2426,165 @@ + return True; + } + ++ ++/******************************************************************* ++ Add a shell escape character '\' to any character not in a known list ++ of characters. UNIX charset format. ++*******************************************************************/ ++ ++#define INCLUDE_LIST "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_/ \t.," ++#define INSIDE_DQUOTE_LIST "$`\n\"\\" ++ ++char *escape_shell_string(const char *src) ++{ ++ size_t srclen = strlen(src); ++ char *ret = SMB_MALLOC((srclen * 2) + 1); ++ char *dest = ret; ++ BOOL in_s_quote = False; ++ BOOL in_d_quote = False; ++ BOOL next_escaped = False; ++ ++ if (!ret) { ++ return NULL; ++ } ++ ++ while (*src) { ++ size_t c_size = next_mb_char_size(src); ++ ++ if (c_size == (size_t)-1) { ++ SAFE_FREE(ret); ++ return NULL; ++ } ++ ++ if (c_size > 1) { ++ memcpy(dest, src, c_size); ++ src += c_size; ++ dest += c_size; ++ next_escaped = False; ++ continue; ++ } ++ ++ /* ++ * Deal with backslash escaped state. ++ * This only lasts for one character. ++ */ ++ ++ if (next_escaped) { ++ *dest++ = *src++; ++ next_escaped = False; ++ continue; ++ } ++ ++ /* ++ * Deal with single quote state. The ++ * only thing we care about is exiting ++ * this state. ++ */ ++ ++ if (in_s_quote) { ++ if (*src == '\'') { ++ in_s_quote = False; ++ } ++ *dest++ = *src++; ++ continue; ++ } ++ ++ /* ++ * Deal with double quote state. The most ++ * complex state. We must cope with \, meaning ++ * possibly escape next char (depending what it ++ * is), ", meaning exit this state, and possibly ++ * add an \ escape to any unprotected character ++ * (listed in INSIDE_DQUOTE_LIST). ++ */ ++ ++ if (in_d_quote) { ++ if (*src == '\\') { ++ /* ++ * Next character might be escaped. ++ * We have to peek. Inside double ++ * quotes only INSIDE_DQUOTE_LIST ++ * characters are escaped by a \. ++ */ ++ ++ char nextchar; ++ ++ c_size = next_mb_char_size(&src[1]); ++ if (c_size == (size_t)-1) { ++ SAFE_FREE(ret); ++ return NULL; ++ } ++ if (c_size > 1) { ++ /* ++ * Don't escape the next char. ++ * Just copy the \. ++ */ ++ *dest++ = *src++; ++ continue; ++ } ++ ++ nextchar = src[1]; ++ ++ if (nextchar && strchr(INSIDE_DQUOTE_LIST, (int)nextchar)) { ++ next_escaped = True; ++ } ++ *dest++ = *src++; ++ continue; ++ } ++ ++ if (*src == '\"') { ++ /* Exit double quote state. */ ++ in_d_quote = False; ++ *dest++ = *src++; ++ continue; ++ } ++ ++ /* ++ * We know the character isn't \ or ", ++ * so escape it if it's any of the other ++ * possible unprotected characters. ++ */ ++ ++ if (strchr(INSIDE_DQUOTE_LIST, (int)*src)) { ++ *dest++ = '\\'; ++ } ++ *dest++ = *src++; ++ continue; ++ } ++ ++ /* ++ * From here to the end of the loop we're ++ * not in the single or double quote state. ++ */ ++ ++ if (*src == '\\') { ++ /* Next character must be escaped. */ ++ next_escaped = True; ++ *dest++ = *src++; ++ continue; ++ } ++ ++ if (*src == '\'') { ++ /* Go into single quote state. */ ++ in_s_quote = True; ++ *dest++ = *src++; ++ continue; ++ } ++ ++ if (*src == '\"') { ++ /* Go into double quote state. */ ++ in_d_quote = True; ++ *dest++ = *src++; ++ continue; ++ } ++ ++ /* Check if we need to escape the character. */ ++ ++ if (!strchr(INCLUDE_LIST, (int)*src)) { ++ *dest++ = '\\'; ++ } ++ *dest++ = *src++; ++ } ++ *dest++ = '\0'; ++ return ret; ++} +diff -urN samba-3.0.24.orig/source/libads/authdata.c samba-3.0.24/source/libads/authdata.c +--- samba-3.0.24.orig/source/libads/authdata.c 2006-02-23 17:29:34.000000000 +0100 ++++ samba-3.0.24/source/libads/authdata.c 2007-08-07 09:38:18.000000000 +0200 +@@ -120,10 +120,14 @@ + return False; + + if (UNMARSHALLING(ps)) { +- array->krb_sid_and_attrs = PRS_ALLOC_MEM(ps, KRB_SID_AND_ATTRS, num); +- if (!array->krb_sid_and_attrs) { +- DEBUG(3, ("No memory available\n")); +- return False; ++ if (num) { ++ array->krb_sid_and_attrs = PRS_ALLOC_MEM(ps, KRB_SID_AND_ATTRS, num); ++ if (!array->krb_sid_and_attrs) { ++ DEBUG(3, ("No memory available\n")); ++ return False; ++ } ++ } else { ++ array->krb_sid_and_attrs = NULL; + } + } + +@@ -184,10 +188,14 @@ + return False; + + if (UNMARSHALLING(ps)) { +- array->group_membership = PRS_ALLOC_MEM(ps, GROUP_MEMBERSHIP, num); +- if (!array->group_membership) { +- DEBUG(3, ("No memory available\n")); +- return False; ++ if (num) { ++ array->group_membership = PRS_ALLOC_MEM(ps, GROUP_MEMBERSHIP, num); ++ if (!array->group_membership) { ++ DEBUG(3, ("No memory available\n")); ++ return False; ++ } ++ } else { ++ array->group_membership = NULL; + } + } + +@@ -456,10 +464,14 @@ + return False; + + if (UNMARSHALLING(ps) && length) { +- data->signature.buffer = PRS_ALLOC_MEM(ps, uint8, siglen); +- if (!data->signature.buffer) { +- DEBUG(3, ("No memory available\n")); +- return False; ++ if (siglen) { ++ data->signature.buffer = PRS_ALLOC_MEM(ps, uint8, siglen); ++ if (!data->signature.buffer) { ++ DEBUG(3, ("No memory available\n")); ++ return False; ++ } ++ } else { ++ data->signature.buffer = NULL; + } + } + +--- samba-3.0.24/source/libsmb/clifile.c.orig 2009-12-21 07:53:20.000000000 +0100 ++++ samba-3.0.24/source/libsmb/clifile.c 2009-12-21 07:51:10.000000000 +0100 +@@ -21,6 +21,8 @@ + + #include "includes.h" + ++#ifndef AVM_SMALLER ++ + /**************************************************************************** + Hard/Symlink a file (UNIX extensions). + Creates new name (sym)linked to oldname. +@@ -71,6 +73,8 @@ + return True; + } + ++#endif /* AVM_SMALLER */ ++ + /**************************************************************************** + Map standard UNIX permissions onto wire representations. + ****************************************************************************/ +@@ -165,6 +169,8 @@ + } + } + ++#ifndef AVM_SMALLER ++ + /**************************************************************************** + Do a POSIX getfacl (UNIX extensions). + ****************************************************************************/ +@@ -785,6 +791,8 @@ + return SVAL(cli->inbuf,smb_vwv2); + } + ++#endif /* AVM_SMALLER */ ++ + /**************************************************************************** + Close a file. + ****************************************************************************/ +@@ -813,6 +821,8 @@ + + + ++#ifndef AVM_SMALLER ++ + /**************************************************************************** + send a lock with a specified locktype + this is used for testing LOCKING_ANDX_CANCEL_LOCK +@@ -1760,3 +1770,6 @@ + + return cli_get_ea_list(cli, setup, param, 6, ctx, pnum_eas, pea_list); + } ++ ++#endif /* AVM_SMALLER */ ++ + +diff -urN samba-3.0.24.orig/source/libsmb/namequery.c samba-3.0.24/source/libsmb/namequery.c +--- samba-3.0.24.orig/source/libsmb/namequery.c 2007-02-04 19:59:20.000000000 +0100 ++++ samba-3.0.24/source/libsmb/namequery.c 2007-07-17 13:19:05.000000000 +0200 +@@ -1024,6 +1024,7 @@ + static BOOL resolve_ads(const char *name, int name_type, + struct ip_service **return_iplist, int *return_count) + { ++#ifdef HAVE_ADS + int i, j; + NTSTATUS status; + TALLOC_CTX *ctx; +@@ -1100,6 +1101,9 @@ + + talloc_destroy(ctx); + return True; ++#else /* HAVE_ADS */ ++ return False; ++#endif + } + + /******************************************************************* +diff -urN samba-3.0.24.orig/source/libsmb/namequery_dc.c samba-3.0.24/source/libsmb/namequery_dc.c +--- samba-3.0.24.orig/source/libsmb/namequery_dc.c 2006-04-20 04:29:25.000000000 +0200 ++++ samba-3.0.24/source/libsmb/namequery_dc.c 2007-07-17 13:19:05.000000000 +0200 +@@ -31,6 +31,9 @@ + + static BOOL ads_dc_name(const char *domain, const char *realm, struct in_addr *dc_ip, fstring srv_name) + { ++#if 1 /* AR7 */ ++ return False; ++#else + ADS_STRUCT *ads; + + if (!realm && strequal(domain, lp_workgroup())) +@@ -63,6 +66,7 @@ + srv_name, inet_ntoa(*dc_ip))); + + return True; ++#endif /* AR7 */ + } + + /**************************************************************************** +diff -urN samba-3.0.24.orig/source/locking/locking.c samba-3.0.24/source/locking/locking.c +--- samba-3.0.24.orig/source/locking/locking.c 2007-02-04 19:59:23.000000000 +0100 ++++ samba-3.0.24/source/locking/locking.c 2007-08-07 09:38:18.000000000 +0200 +@@ -1166,6 +1166,11 @@ + return NT_STATUS_ACCESS_DENIED; + } + ++ /* Don't allow delete on close for non-empty directories. */ ++ if (fsp->is_directory) { ++ return can_delete_directory(fsp->conn, fsp->fsp_name); ++ } ++ + return NT_STATUS_OK; + } + +diff -urN samba-3.0.24.orig/source/Makefile samba-3.0.24/source/Makefile +--- samba-3.0.24.orig/source/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ samba-3.0.24/source/Makefile 2008-02-28 11:21:14.000000000 +0100 +@@ -0,0 +1,1719 @@ ++######################################################################### ++# Makefile.in for Samba - rewritten for autoconf support ++# Copyright Andrew Tridgell 1992-1998 ++# Copyright (C) 2001 by Martin Pool ++# Copyright Andrew Bartlett 2002 ++# Copyright (C) 2003 Jim McDonough ++# Copyright (C) 2002-2003 Jelmer Vernooij ++########################################################################### ++ ++SOURCEROOT=$(shell pwd)/../../../.. ++SHAREDLIBS=$(SOURCEROOT)/sharedlibs ++ ++include ${SHAREDLIBS}/ar7def.mk ++ ++# AR7 ++# prefix=/usr/local/samba ++prefix=/var/samba ++exec_prefix=${prefix} ++ ++# AR7 ++# LIBS= -lcrypt -lresolv -lnsl -ldl ++LIBS= -lcrypt -ldl -lpthread ++# AR7 ++# CC=gcc ++CC=${TARGET}-gcc ++RANLIB = ${TARGET}-ranlib ++AR = ${TARGET}-ar ++ ++SHLD=${CC} ${CFLAGS} ++# AR7 ++# CFLAGS= -O -D_SAMBA_BUILD_ ++CFLAGS= -Os -D_SAMBA_BUILD_ -DAVM_NO_PRINTING ++CFLAGS+= -DAVM_NO_POPT ++CFLAGS+= -DAVM_SMALLER ++ ++# uncomment this to get debugs ++# CFLAGS += -DSAMBA_DEBUG ++ ++# AR7 ++# CPPFLAGS= -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE ++CPPFLAGS= -D_GNU_SOURCE ++EXEEXT= ++LDFLAGS= ++AR=ar ++LDSHFLAGS=-shared -Wl,-Bsymbolic ++WINBIND_NSS_LDSHFLAGS=-shared -Wl,-Bsymbolic ++AWK=gawk ++DYNEXP=-Wl,--export-dynamic ++PYTHON= ++PERL=/usr/bin/perl ++ ++ifeq ($(WITH_LFS),yes) ++CFLAGS+= -DWITH_LFS ++CPPFLAGS+= -DWITH_LFS ++endif ++ ++TERMLDFLAGS= ++# AR7 ++# TERMLIBS=-lreadline -lncurses ++TERMLIBS= ++PRINT_LIBS= ++AUTH_LIBS=-lcrypt ++ACL_LIBS= ++PASSDB_LIBS= ++IDMAP_LIBS= ++KRB5LIBS= ++LDAP_LIBS= ++ ++INSTALLCMD=/usr/bin/install -c ++INSTALLCLIENTCMD_SH=$(INSTALLCMD) ++INSTALLCLIENTCMD_A=: ++ ++ ++srcdir=`pwd` ++builddir=`pwd` ++SHELL=/bin/sh ++DESTDIR=/ ++ ++# XXX: Perhaps this should be /bin/sh instead -- apparently autoconf ++# will search for a POSIX-compliant shell, and that might not be ++# /bin/sh on some platforms. I guess it's not a big problem -- mbp ++ ++# See the autoconf manual "Installation Directory Variables" for a ++# discussion of the subtle use of these variables. ++ ++# AR7 ++# BASEDIR= /usr/local/samba ++BASEDIR= /var/samba ++BINDIR = ${exec_prefix}/bin ++# sbindir is mapped to bindir when compiling SAMBA in 2.0.x compatibility mode. ++SBINDIR = ${exec_prefix}/sbin ++LIBDIR = ${prefix}/lib ++VFSLIBDIR = $(LIBDIR)/vfs ++PDBLIBDIR = $(LIBDIR)/pdb ++RPCLIBDIR = $(LIBDIR)/rpc ++IDMAPLIBDIR = $(LIBDIR)/idmap ++CHARSETLIBDIR = $(LIBDIR)/charset ++AUTHLIBDIR = $(LIBDIR)/auth ++CONFIGDIR = ${LIBDIR} ++VARDIR = ${prefix}/var ++MANDIR = ${prefix}/man ++DATADIR = ${prefix}/share ++ ++# The permissions to give the executables ++INSTALLPERMS = 0755 ++ ++# set these to where to find various files ++# These can be overridden by command line switches (see smbd(8)) ++# or in smb.conf (see smb.conf(5)) ++LOGFILEBASE = ${VARDIR} ++CONFIGFILE = $(CONFIGDIR)/smb.conf ++LMHOSTSFILE = $(CONFIGDIR)/lmhosts ++ ++# This is where smbpasswd et al go ++PRIVATEDIR = ${prefix}/private ++ ++SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd ++PRIVATE_DIR = $(PRIVATEDIR) ++ ++# This is where SWAT images and help files go ++SWATDIR = ${prefix}/swat ++ ++# the directory where lock files go ++LOCKDIR = ${VARDIR}/locks ++ ++# the directory where pid files go ++PIDDIR = ${VARDIR}/locks ++ ++LIBSMBCLIENT=bin/libsmbclient.a bin/libsmbclient.so ++LIBSMBCLIENT_MAJOR=0 ++LIBSMBCLIENT_MINOR=1 ++ ++LIBSMBSHAREMODES=bin/libsmbsharemodes.a bin/libsmbsharemodes.so ++LIBSMBSHAREMODES_MAJOR=0 ++LIBSMBSHAREMODES_MINOR=1 ++ ++ ++FLAGS1 = $(CFLAGS) -I./popt -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I. $(CPPFLAGS) -I$(srcdir) -I$(srcdir)/tdb ++FLAGS2 = ++FLAGS3 = ++FLAGS4 = ++FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4) ++FLAGS = $(ISA) $(FLAGS5) ++ ++PASSWD_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DPRIVATE_DIR=\"$(PRIVATE_DIR)\" ++PATH_FLAGS1 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DSBINDIR=\"$(SBINDIR)\" ++PATH_FLAGS2 = $(PATH_FLAGS1) -DBINDIR=\"$(BINDIR)\" -DDRIVERFILE=\"$(DRIVERFILE)\" ++PATH_FLAGS3 = $(PATH_FLAGS2) -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" ++PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\" ++PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \ ++ -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"so\" ++PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\" ++PATH_FLAGS = $(PATH_FLAGS6) $(PASSWD_FLAGS) ++ ++# Note that all executable programs now provide for an optional executable suffix. ++ ++SBIN_PROGS = bin/smbd bin/nmbd bin/swat bin/winbindd$(EXEEXT) ++ ++BIN_PROGS1 = bin/smbclient bin/net bin/smbspool \ ++ bin/testparm bin/smbstatus ++BIN_PROGS2 = bin/smbcontrol bin/smbtree bin/tdbbackup \ ++ bin/nmblookup bin/pdbedit bin/tdbdump \ ++ bin/tdbtool ++BIN_PROGS3 = bin/smbpasswd bin/rpcclient bin/smbcacls \ ++ bin/profiles bin/ntlm_auth \ ++ bin/smbcquotas ++ ++TORTURE_PROGS = bin/smbtorture bin/msgtest \ ++ bin/masktest bin/locktest \ ++ bin/locktest2 bin/nsstest bin/vfstest ++ ++BIN_PROGS = $(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) bin/wbinfo$(EXEEXT) ++ ++EVERYTHING_PROGS = bin/debug2html bin/smbfilter bin/talloctort \ ++ bin/log2pcap ++ ++SHLIBS = nsswitch/libnss_winbind.so nsswitch/libnss_wins.so libsmbclient libsmbsharemodes ++ ++SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb ++ ++VFS_MODULES = bin/recycle.so bin/audit.so bin/extd_audit.so bin/full_audit.so bin/netatalk.so bin/fake_perms.so bin/default_quota.so bin/readonly.so bin/cap.so bin/expand_msdfs.so bin/shadow_copy.so ++PDB_MODULES = ++RPC_MODULES = ++IDMAP_MODULES = ++CHARSET_MODULES = bin/CP850.so bin/CP437.so ++AUTH_MODULES = ++MODULES = $(VFS_MODULES) $(PDB_MODULES) $(RPC_MODULES) $(IDMAP_MODULES) $(CHARSET_MODULES) $(AUTH_MODULES) ++ ++###################################################################### ++# object file lists ++###################################################################### ++ ++TDBBASE_OBJ = tdb/tdb.o tdb/spinlock.o ++ ++TDB_OBJ = $(TDBBASE_OBJ) tdb/tdbutil.o tdb/tdbback.o ++ ++SMBLDAP_OBJ = ++ ++VERSION_OBJ = lib/version.o ++ ++DOSERR_OBJ = libsmb/doserr.o ++ ++SNPRINTF_OBJ = lib/snprintf.o ++ ++WBCOMMON_OBJ = nsswitch/wb_common.o ++ ++AFS_OBJ = lib/afs.o ++ ++AFS_SETTOKEN_OBJ = lib/afs_settoken.o ++ ++SERVER_MUTEX_OBJ = lib/server_mutex.o ++ ++ERRORMAP_OBJ = libsmb/errormap.o ++ ++PASSCHANGE_OBJ = libsmb/passchange.o ++ ++SOCKET_WRAPPER_OBJ = lib/socket_wrapper.o ++ ++RPC_PARSE_OBJ0 = rpc_parse/parse_prs.o rpc_parse/parse_misc.o ++ ++LIB_OBJ = $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \ ++ lib/getsmbpass.o lib/interface.o lib/md4.o \ ++ lib/interfaces.o lib/pidfile.o lib/replace.o lib/replace1.o \ ++ lib/signal.o lib/system.o lib/sendfile.o lib/time.o \ ++ lib/ufc.o lib/genrand.o lib/username.o \ ++ lib/util_pw.o lib/access.o lib/smbrun.o \ ++ lib/bitmap.o lib/crc32.o $(SNPRINTF_OBJ) lib/dprintf.o \ ++ lib/xfile.o lib/wins_srv.o \ ++ lib/util_str.o lib/clobber.o lib/util_sid.o lib/util_uuid.o \ ++ lib/util_unistr.o lib/util_file.o lib/data_blob.o \ ++ lib/util.o lib/util_sock.o lib/sock_exec.o lib/util_sec.o \ ++ lib/talloc.o lib/substitute.o lib/fsusage.o \ ++ lib/ms_fnmatch.o lib/select.o lib/messages.o \ ++ lib/tallocmsg.o lib/dmallocmsg.o libsmb/smb_signing.o \ ++ lib/md5.o lib/hmacmd5.o lib/iconv.o \ ++ nsswitch/wb_client.o $(WBCOMMON_OBJ) \ ++ lib/pam_errors.o intl/lang_tdb.o lib/account_pol.o \ ++ lib/adt_tree.o lib/gencache.o $(TDB_OBJ) \ ++ lib/module.o lib/ldap_escape.o \ ++ lib/privileges.o lib/secdesc.o lib/secace.o lib/secacl.o \ ++ lib/arc4.o lib/sharesec.o lib/events.o lib/util_nscd.o ++ ++LIB_NONSMBD_OBJ = $(LIB_OBJ) lib/dummysmbd.o lib/dummyroot.o ++ ++READLINE_OBJ = lib/readline.o ++ ++# Also depends on $(SECRETS_OBJ) $(LIBSAMBA_OBJ) ++# Be sure to include them into your application ++ ++POPT_LIB_OBJ = lib/popt_common.o ++ ++UBIQX_OBJ = ubiqx/ubi_BinTree.o ubiqx/ubi_Cache.o ubiqx/ubi_SplayTree.o \ ++ ubiqx/ubi_dLinkList.o ubiqx/ubi_sLinkList.o ++ ++PARAM_OBJ = dynconfig.o param/loadparm.o param/params.o ++ ++KRBCLIENT_OBJ = libads/kerberos.o libads/ads_status.o ++ ++LIBADS_OBJ = libads/ldap.o libads/ldap_printer.o libads/sasl.o \ ++ libads/krb5_setpw.o libads/ldap_user.o \ ++ libads/ads_struct.o libads/kerberos_keytab.o \ ++ libads/disp_sec.o libads/ads_utils.o libads/ldap_utils.o \ ++ libads/authdata.o ++ ++LIBADS_SERVER_OBJ = libads/util.o libads/kerberos_verify.o ++ ++SECRETS_OBJ = passdb/secrets.o passdb/machine_sid.o ++ ++LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \ ++ libsmb/namequery.o libsmb/conncache.o ++ ++LIBSAMBA_OBJ = libsmb/nterr.o libsmb/smbdes.o libsmb/smbencrypt.o libsmb/ntlm_check.o \ ++ libsmb/ntlmssp.o libsmb/ntlmssp_parse.o libsmb/ntlmssp_sign.o ++ ++LIBSMB_OBJ = \ ++ libsmb/clientgen.o \ ++ libsmb/cliconnect.o \ ++ libsmb/clirap.o \ ++ libsmb/clistr.o \ ++ libsmb/clitrans.o \ ++ libsmb/clifile.o \ ++ lib/util_seaccess.o \ ++ libsmb/clikrb5.o \ ++ libsmb/clispnego.o \ ++ libsmb/asn1.o \ ++ libsmb/clierror.o \ ++ libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \ ++ libsmb/clioplock.o $(ERRORMAP_OBJ) \ ++ $(DOSERR_OBJ) \ ++ $(RPC_PARSE_OBJ1) $(LIBSAMBA_OBJ) $(LIBNMB_OBJ) ++ ++# LIBSMB_OBJ = \ ++# libsmb/clientgen.o \ ++# libsmb/cliconnect.o \ ++# libsmb/clifile.o \ ++# libsmb/clikrb5.o libsmb/clispnego.o libsmb/asn1.o \ ++# libsmb/clirap.o libsmb/clierror.o libsmb/climessage.o \ ++# libsmb/clireadwrite.o libsmb/clilist.o libsmb/cliprint.o \ ++# libsmb/clitrans.o libsmb/clisecdesc.o libsmb/clidgram.o \ ++# libsmb/clistr.o lib/util_seaccess.o \ ++# libsmb/cliquota.o libsmb/clifsinfo.o libsmb/clidfs.o \ ++# libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \ ++# libsmb/clioplock.o $(ERRORMAP_OBJ) libsmb/clirap2.o \ ++# $(DOSERR_OBJ) \ ++# $(RPC_PARSE_OBJ1) $(LIBSAMBA_OBJ) $(LIBNMB_OBJ) ++ ++ ++LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \ ++ rpc_client/cli_netlogon.o rpc_client/cli_srvsvc.o \ ++ rpc_client/cli_wkssvc.o rpc_client/cli_dfs.o \ ++ rpc_client/cli_reg.o $(RPC_CLIENT_OBJ) \ ++ rpc_client/cli_spoolss.o rpc_client/cli_spoolss_notify.o \ ++ rpc_client/cli_ds.o rpc_client/cli_echo.o \ ++ rpc_client/cli_shutdown.o rpc_client/cli_svcctl.o ++ ++REGOBJS_OBJ = registry/reg_objects.o ++ ++REGISTRY_OBJ = registry/reg_frontend.o registry/reg_cachehook.o \ ++ registry/reg_db.o registry/reg_eventlog.o registry/reg_shares.o \ ++ registry/reg_util.o registry/reg_dynamic.o ++ ++RPC_LSA_OBJ = \ ++ ++# rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o ++ ++RPC_NETLOG_OBJ = \ ++ ++# rpc_server/srv_netlog.o rpc_server/srv_netlog_nt.o ++ ++RPC_SAMR_OBJ = \ ++ rpc_server/srv_samr_util.o ++ ++# rpc_server/srv_samr.o ++# rpc_server/srv_samr_nt.o ++ ++REGFIO_OBJ = registry/regfio.o ++ ++RPC_REG_OBJ = \ ++ ++# rpc_server/srv_reg.o rpc_server/srv_reg_nt.o $(REGFIO_OBJ) ++ ++RPC_LSA_DS_OBJ = \ ++ ++# rpc_server/srv_lsa_ds.o rpc_server/srv_lsa_ds_nt.o ++ ++RPC_SVC_OBJ = \ ++ rpc_server/srv_srvsvc.o \ ++ rpc_server/srv_srvsvc_nt.o ++ ++ ++ ++RPC_WKS_OBJ = \ ++ rpc_server/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o ++ ++RPC_SVCCTL_OBJ = \ ++ ++# rpc_server/srv_svcctl.o rpc_server/srv_svcctl_nt.o \ ++# services/svc_spoolss.o services/svc_rcinit.o services/services_db.o ++ ++RPC_DFS_OBJ = \ ++ ++# rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o ++ ++RPC_SPOOLSS_OBJ = \ ++ ++# rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o ++ ++RPC_EVENTLOG_OBJ = \ ++ ++# rpc_server/srv_eventlog.o rpc_server/srv_eventlog_nt.o ++ ++RPC_PIPE_OBJ = \ ++ rpc_server/srv_pipe_hnd.o \ ++ rpc_server/srv_pipe.o \ ++ rpc_server/srv_lsa_hnd.o ++ ++# rpc_server/srv_util.o ++ ++ ++RPC_ECHO_OBJ = rpc_server/srv_echo.o rpc_server/srv_echo_nt.o ++ ++RPC_SERVER_OBJ = $(RPC_LSA_OBJ) $(RPC_REG_OBJ) $(RPC_LSA_DS_OBJ) $(RPC_WKS_OBJ) $(RPC_SVCCTL_OBJ) $(RPC_NETLOG_OBJ) $(RPC_DFS_OBJ) $(RPC_SVC_OBJ) $(RPC_EVENTLOG_OBJ) $(RPC_SAMR_OBJ) $(RPC_PIPE_OBJ) ++ ++# this includes only the low level parse code, not stuff ++# that requires knowledge of security contexts ++RPC_PARSE_OBJ1 = $(RPC_PARSE_OBJ0) rpc_parse/parse_sec.o ++ ++RPC_PARSE_OBJ = \ ++ rpc_parse/parse_rpc.o \ ++ rpc_parse/parse_lsa.o \ ++ rpc_parse/parse_net.o \ ++ rpc_parse/parse_wks.o rpc_parse/parse_ds.o \ ++ rpc_parse/parse_spoolss.o \ ++ rpc_parse/parse_dfs.o \ ++ rpc_parse/parse_echo.o rpc_parse/parse_shutdown.o \ ++ rpc_parse/parse_buffer.o $(REGOBJS_OBJ) \ ++ rpc_parse/parse_srv.o ++ ++# rpc_parse/parse_eventlog.o \ ++# rpc_parse/parse_svcctl.o \ ++# rpc_parse/parse_reg.o ++# rpc_parse/parse_samr.o ++ ++ ++RPC_CLIENT_OBJ = rpc_client/cli_pipe.o ++ ++LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o ++ ++PASSDB_GET_SET_OBJ = passdb/pdb_get_set.o ++ ++PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o passdb/pdb_interface.o \ ++ passdb/pdb_compat.o \ ++ passdb/lookup_sid.o \ ++ passdb/login_cache.o passdb/pdb_smbpasswd.o passdb/pdb_tdb.o \ ++ lib/system_smbd.o \ ++ passdb/lookup_sid.o passdb/util_builtin.o \ ++ passdb/util_wellknown.o passdb/util_unixsids.o ++ ++XML_OBJ = passdb/pdb_xml.o ++MYSQL_OBJ = passdb/pdb_mysql.o ++PGSQL_OBJ = passdb/pdb_pgsql.o ++DEVEL_HELP_WEIRD_OBJ = modules/weird.o ++CP850_OBJ = modules/CP850.o ++CP437_OBJ = modules/CP437.o ++CHARSET_MACOSXFS_OBJ = modules/charset_macosxfs.o ++ ++GROUPDB_OBJ = groupdb/mapping.o ++ ++PROFILE_OBJ = profile/profile.o ++PROFILES_OBJ = utils/profiles.o ++ ++OPLOCK_OBJ = smbd/oplock.o smbd/oplock_irix.o smbd/oplock_linux.o ++ ++NOTIFY_OBJ = smbd/notify.o smbd/notify_hash.o smbd/notify_kernel.o ++ ++VFS_AUDIT_OBJ = modules/vfs_audit.o ++VFS_EXTD_AUDIT_OBJ = modules/vfs_extd_audit.o ++VFS_FULL_AUDIT_OBJ = modules/vfs_full_audit.o ++VFS_FAKE_PERMS_OBJ = modules/vfs_fake_perms.o ++VFS_RECYCLE_OBJ = modules/vfs_recycle.o ++VFS_NETATALK_OBJ = modules/vfs_netatalk.o ++VFS_DEFAULT_QUOTA_OBJ = modules/vfs_default_quota.o ++VFS_READONLY_OBJ = modules/vfs_readonly.o modules/getdate.o ++VFS_CAP_OBJ = modules/vfs_cap.o ++VFS_EXPAND_MSDFS_OBJ = modules/vfs_expand_msdfs.o ++VFS_SHADOW_COPY_OBJ = modules/vfs_shadow_copy.o ++VFS_AFSACL_OBJ = modules/vfs_afsacl.o ++VFS_CATIA_OBJ = modules/vfs_catia.o ++ ++PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o ++ ++SLCACHE_OBJ = libsmb/samlogon_cache.o ++ ++DCUTIL_OBJ = libsmb/namequery_dc.o ++ ++# libsmb/trustdom_cache.o ++# libsmb/trusts_util.o ++ ++AUTH_BUILTIN_OBJ = auth/auth_builtin.o ++AUTH_DOMAIN_OBJ = auth/auth_domain.o ++AUTH_SAM_OBJ = auth/auth_sam.o ++AUTH_RHOSTS_OBJ = auth/auth_rhosts.o ++AUTH_SERVER_OBJ = auth/auth_server.o ++AUTH_UNIX_OBJ = auth/auth_unix.o ++AUTH_WINBIND_OBJ = auth/auth_winbind.o ++ ++AUTH_OBJ = auth/auth.o $(AUTH_SAM_OBJ) $(AUTH_BUILTIN_OBJ) auth/auth_util.o auth/auth_compat.o \ ++ auth/auth_ntlmssp.o \ ++ $(PLAINTEXT_AUTH_OBJ) $(SLCACHE_OBJ) $(DCUTIL_OBJ) ++ ++# AUTH_OBJ = auth/auth.o $(AUTH_RHOSTS_OBJ) $(AUTH_SAM_OBJ) $(AUTH_UNIX_OBJ) $(AUTH_WINBIND_OBJ) $(AUTH_SERVER_OBJ) $(AUTH_DOMAIN_OBJ) $(AUTH_BUILTIN_OBJ) auth/auth_util.o auth/auth_compat.o \ ++# auth/auth_ntlmssp.o \ ++# $(PLAINTEXT_AUTH_OBJ) $(SLCACHE_OBJ) $(DCUTIL_OBJ) ++ ++MANGLE_OBJ = smbd/mangle.o smbd/mangle_hash.o smbd/mangle_map.o smbd/mangle_hash2.o ++ ++SMBD_OBJ_MAIN = smbd/server.o ++ ++BUILDOPT_OBJ = smbd/build_options.o ++ ++SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o smbd/connection.o \ ++ smbd/utmp.o smbd/session.o \ ++ smbd/dfree.o smbd/dir.o smbd/password.o smbd/conn.o smbd/fileio.o \ ++ smbd/message.o smbd/nttrans.o \ ++ smbd/reply.o smbd/sesssetup.o smbd/trans2.o smbd/uid.o \ ++ smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \ ++ smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \ ++ smbd/vfs.o smbd/vfs-wrap.o smbd/statcache.o \ ++ smbd/posix_acls.o lib/sysacls.o $(SERVER_MUTEX_OBJ) \ ++ smbd/process.o smbd/service.o smbd/error.o \ ++ smbd/fake_file.o \ ++ smbd/msdfs.o \ ++ smbd/aio.o \ ++ $(MANGLE_OBJ) \ ++ smbd/negprot.o \ ++ smbd/ipc.o \ ++ smbd/lanman.o \ ++ smbd/change_trust_pw.o \ ++ smbd/pipes.o \ ++ smbd/share_access.o \ ++ smbd/statvfs.o \ ++ smbd/map_username.o ++ ++ ++SMBD_OBJ_BASE = $(PARAM_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \ ++ $(RPC_SERVER_OBJ) $(RPC_PARSE_OBJ) $(SECRETS_OBJ) \ ++ $(LOCKING_OBJ) $(PASSDB_OBJ) $(PROFILE_OBJ) \ ++ $(LIB_OBJ) $(OPLOCK_OBJ) \ ++ $(NOTIFY_OBJ) $(GROUPDB_OBJ) $(AUTH_OBJ) \ ++ libads/ads_status.o ++ ++# $(REGISTRY_OBJ) ++# $(LIBMSRPC_OBJ) ++ ++PRINTING_OBJ = printing/pcap.o printing/print_svid.o printing/print_aix.o \ ++ printing/print_cups.o printing/print_generic.o \ ++ printing/lpq_parse.o printing/load.o ++ ++PRINTBASE_OBJ = printing/notify.o printing/printing_db.o ++ ++PRINTBACKEND_OBJ = printing/printing.o printing/nt_printing.o $(PRINTBASE_OBJ) ++ ++# SMBD_OBJ = $(SMBD_OBJ_BASE) $(SMBD_OBJ_MAIN) ++ ++ ++NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \ ++ nmbd/nmbd_become_lmb.o nmbd/nmbd_browserdb.o \ ++ nmbd/nmbd_browsesync.o nmbd/nmbd_elections.o \ ++ nmbd/nmbd_incomingdgrams.o nmbd/nmbd_incomingrequests.o \ ++ nmbd/nmbd_lmhosts.o nmbd/nmbd_logonnames.o nmbd/nmbd_mynames.o \ ++ nmbd/nmbd_namelistdb.o nmbd/nmbd_namequery.o \ ++ nmbd/nmbd_nameregister.o nmbd/nmbd_namerelease.o \ ++ nmbd/nmbd_nodestatus.o nmbd/nmbd_packets.o \ ++ nmbd/nmbd_processlogon.o nmbd/nmbd_responserecordsdb.o \ ++ nmbd/nmbd_sendannounce.o nmbd/nmbd_serverlistdb.o \ ++ nmbd/nmbd_subnetdb.o nmbd/nmbd_winsproxy.o nmbd/nmbd_winsserver.o \ ++ nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o ++ ++NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \ ++ $(KRBCLIENT_OBJ) $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(SECRETS_OBJ) $(POPT_LIB_OBJ) ++ ++WREPL_OBJ1 = ++ ++WREPL_OBJ = $(WREPL_OBJ1) $(PARAM_OBJ) $(UBIQX_OBJ) \ ++ $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) \ ++ $(LIBSAMBA_OBJ) ++ ++SWAT_OBJ1 = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \ ++ web/swat.o web/neg_lang.o ++ ++SWAT_OBJ = $(SWAT_OBJ1) $(PARAM_OBJ) $(PRINTING_OBJ) $(LIBSMB_OBJ) \ ++ $(LOCKING_OBJ) $(PASSDB_OBJ) $(SECRETS_OBJ) $(KRBCLIENT_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) \ ++ $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_OBJ) \ ++ $(PASSCHANGE_OBJ) ++ ++SMBSH_OBJ = smbwrapper/smbsh.o smbwrapper/shared.o \ ++ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) ++ ++STATUS_OBJ = utils/status.o $(LOCKING_OBJ) $(PARAM_OBJ) \ ++ $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \ ++ $(SECRETS_OBJ) $(LIBSAMBA_OBJ) $(ERRORMAP_OBJ) ++ ++ ++SMBCONTROL_OBJ = utils/smbcontrol.o $(LOCKING_OBJ) $(PARAM_OBJ) \ ++ $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \ ++ $(SECRETS_OBJ) $(LIBSAMBA_OBJ) \ ++ $(PRINTBASE_OBJ) $(ERRORMAP_OBJ) ++ ++SMBTREE_OBJ = utils/smbtree.o $(PARAM_OBJ) \ ++ $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) \ ++ $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) ++ ++TESTPARM_OBJ = utils/testparm.o \ ++ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \ ++ $(SECRETS_OBJ) $(LIBSAMBA_OBJ) ++ ++SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSCHANGE_OBJ) $(PARAM_OBJ) $(SECRETS_OBJ) \ ++ $(LIBSMB_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ)\ ++ $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \ ++ $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_OBJ) ++ ++PDBEDIT_OBJ = utils/pdbedit.o $(PARAM_OBJ) $(PASSDB_OBJ) $(LIBSAMBA_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) $(SECRETS_OBJ) \ ++ $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) libsmb/asn1.o ++ ++SMBGET_OBJ = utils/smbget.o $(POPT_LIB_OBJ) $(LIBSMBCLIENT_OBJ) ++ ++RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \ ++ rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \ ++ rpcclient/cmd_netlogon.o rpcclient/cmd_srvsvc.o \ ++ rpcclient/cmd_dfs.o rpcclient/cmd_reg.o \ ++ rpcclient/cmd_ds.o \ ++ rpcclient/cmd_echo.o rpcclient/cmd_shutdown.o ++ ++RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \ ++ $(PARAM_OBJ) $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(LIBMSRPC_OBJ) \ ++ $(READLINE_OBJ) $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) \ ++ $(LIBADS_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ) \ ++ $(SMBLDAP_OBJ) $(DCUTIL_OBJ) ++ ++PAM_WINBIND_PICOBJ = nsswitch/pam_winbind.po \ ++ nsswitch/wb_common.po lib/replace1.po \ ++ lib/snprintf.po ++ ++SMBW_OBJ1 = smbwrapper/smbw.o \ ++ smbwrapper/smbw_dir.o smbwrapper/smbw_stat.o \ ++ smbwrapper/realcalls.o smbwrapper/shared.o \ ++ smbwrapper/smbw_cache.o ++ ++SMBW_OBJ = $(SMBW_OBJ1) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(PARAM_OBJ) \ ++ $(LIB_NONSMBD_OBJ) ++ ++SMBWRAPPER_OBJ1 = smbwrapper/wrapped.o ++ ++SMBWRAPPER_OBJ = $(SMBW_OBJ) $(SMBWRAPPER_OBJ1) ++ ++LIBSMBCLIENT_OBJ = libsmb/libsmbclient.o libsmb/libsmb_compat.o \ ++ libsmb/libsmb_cache.o \ ++ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ ++ $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) \ ++ $(SECRETS_OBJ) $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) ++ ++LIBSMBSHAREMODES_OBJ = libsmb/smb_share_modes.o tdb/tdb.o tdb/spinlock.o ++# This shared library is intended for linking with unit test programs ++# to test Samba internals. It's called libbigballofmud.so to ++# discourage casual usage. ++ ++LIBBIGBALLOFMUD_MAJOR = 0 ++ ++LIBBIGBALLOFMUD_OBJ = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(UBIQX_OBJ) $(SECRETS_OBJ) \ ++ $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ) \ ++ $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ) ++ ++LIBBIGBALLOFMUD_PICOBJS = $(LIBBIGBALLOFMUD_OBJ:.o=.po) ++ ++CLIENT_OBJ1 = client/client.o client/clitar.o ++ ++CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \ ++ $(READLINE_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) ++ ++NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \ ++ utils/net_rap.o utils/net_rpc.o utils/net_rpc_samsync.o \ ++ utils/net_rpc_join.o utils/net_time.o utils/net_lookup.o \ ++ utils/net_cache.o utils/net_groupmap.o utils/net_idmap.o \ ++ utils/net_status.o utils/net_rpc_printer.o utils/net_rpc_rights.o \ ++ utils/net_rpc_service.o utils/net_rpc_registry.o ++ ++NET_OBJ = $(NET_OBJ1) $(PARAM_OBJ) $(SECRETS_OBJ) $(LIBSMB_OBJ) \ ++ $(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ ++ $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(LIBMSRPC_OBJ) $(IDMAP_OBJ) \ ++ $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(POPT_LIB_OBJ) \ ++ $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(SERVER_MUTEX_OBJ) \ ++ $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) $(PRINTERDB_OBJ) $(REGFIO_OBJ) ++ ++CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(SECRETS_OBJ) ++ ++MOUNT_OBJ = client/smbmount.o \ ++ $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) ++ ++MNT_OBJ = client/smbmnt.o $(VERSION_OBJ) $(SNPRINTF_OBJ) ++ ++UMOUNT_OBJ = client/smbumount.o ++ ++NMBLOOKUP_OBJ = utils/nmblookup.o $(PARAM_OBJ) $(LIBNMB_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) $(LIBSAMBA_OBJ) ++ ++SMBTORTURE_OBJ1 = torture/torture.o torture/nbio.o torture/scanner.o torture/utable.o \ ++ torture/denytest.o torture/mangle_test.o ++ ++SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) \ ++ $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) ++ ++MASKTEST_OBJ = torture/masktest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) ++ ++MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) ++ ++LOCKTEST_OBJ = torture/locktest.o $(PARAM_OBJ) $(LOCKING_OBJ) $(KRBCLIENT_OBJ) \ ++ $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) ++ ++NSSTEST_OBJ = torture/nsstest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) ++ ++VFSTEST_OBJ = torture/cmd_vfs.o torture/vfstest.o $(SMBD_OBJ_BASE) $(READLINE_OBJ) ++ ++SMBICONV_OBJ = $(PARAM_OBJ) torture/smbiconv.o $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) $(LIBSAMBA_OBJ) ++ ++LOG2PCAP_OBJ = utils/log2pcaphex.o ++ ++LOCKTEST2_OBJ = torture/locktest2.o $(PARAM_OBJ) $(LOCKING_OBJ) $(LIBSMB_OBJ) \ ++ $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) ++ ++SMBCACLS_OBJ = utils/smbcacls.o $(PARAM_OBJ) $(LIBSMB_OBJ) \ ++ $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \ ++ $(PASSDB_OBJ) $(GROUPDB_OBJ) $(LIBMSRPC_OBJ) $(SECRETS_OBJ) \ ++ $(POPT_LIB_OBJ) $(DCUTIL_OBJ) $(LIBADS_OBJ) $(SMBLDAP_OBJ) ++ ++SMBCQUOTAS_OBJ = utils/smbcquotas.o $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ ++ $(PARAM_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \ ++ $(LIBMSRPC_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ) \ ++ $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) ++ ++TALLOCTORT_OBJ = lib/talloctort.o $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) libsmb/nterr.o ++ ++RPCTORTURE_OBJ = torture/rpctorture.o \ ++ rpcclient/display.o \ ++ rpcclient/cmd_lsarpc.o \ ++ rpcclient/cmd_wkssvc.o \ ++ rpcclient/cmd_samr.o \ ++ rpcclient/cmd_srvsvc.o \ ++ rpcclient/cmd_netlogon.o \ ++ $(PARAM_OBJ) $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \ ++ $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_GET_SET_OBJ) ++ ++DEBUG2HTML_OBJ = utils/debug2html.o ubiqx/debugparse.o ++ ++SMBFILTER_OBJ = utils/smbfilter.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(SECRETS_OBJ) \ ++ $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) ++ ++PROTO_OBJ = $(SMBD_OBJ_MAIN) \ ++ $(SMBD_OBJ_SRV) $(NMBD_OBJ1) $(SWAT_OBJ1) $(LIB_OBJ) $(LIBSMB_OBJ) \ ++ $(SMBTORTURE_OBJ1) $(RPCCLIENT_OBJ1) \ ++ $(LIBMSRPC_OBJ) \ ++ $(RPC_PIPE_OBJ) $(RPC_PARSE_OBJ) $(KRBCLIENT_OBJ) \ ++ $(AUTH_OBJ) $(PARAM_OBJ) $(LOCKING_OBJ) $(SECRETS_OBJ) \ ++ $(PRINTING_OBJ) $(PRINTBACKEND_OBJ) $(OPLOCK_OBJ) $(NOTIFY_OBJ) \ ++ $(PASSDB_OBJ) $(GROUPDB_OBJ) \ ++ $(READLINE_OBJ) $(PROFILE_OBJ) $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) \ ++ $(AUTH_SAM_OBJ) $(REGISTRY_OBJ) $(POPT_LIB_OBJ) \ ++ $(RPC_LSA_OBJ) $(RPC_NETLOG_OBJ) $(RPC_SAMR_OBJ) $(RPC_REG_OBJ) $(RPC_LSA_DS_OBJ) \ ++ $(RPC_SVC_OBJ) $(RPC_WKS_OBJ) $(RPC_DFS_OBJ) $(RPC_SPOOLSS_OBJ) \ ++ $(RPC_ECHO_OBJ) $(RPC_SVCCTL_OBJ) $(RPC_EVENTLOG_OBJ) $(SMBLDAP_OBJ) \ ++ $(IDMAP_OBJ) libsmb/spnego.o $(PASSCHANGE_OBJ) ++ ++WINBIND_WINS_NSS_OBJ = nsswitch/wins.o $(PARAM_OBJ) \ ++ $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(NSSWINS_OBJ) $(KRBCLIENT_OBJ) ++ ++WINBIND_WINS_NSS_PICOBJS = $(WINBIND_WINS_NSS_OBJ:.o=.po) ++ ++PICOBJS = $(SMBWRAPPER_OBJ:.o=.po) ++LIBSMBCLIENT_PICOBJS = $(LIBSMBCLIENT_OBJ:.o=.po) ++LIBSMBSHAREMODES_PICOBJS = $(LIBSMBSHAREMODES_OBJ:.o=.po) ++ ++PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \ ++ pam_smbpass/pam_smb_acct.o pam_smbpass/support.o \ ++ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ ++ $(SECRETS_OBJ) $(SMBLDAP_OBJ) $(LIBSAMBA_OBJ) ++ ++PAM_SMBPASS_PICOOBJ = $(PAM_SMBPASS_OBJ_0:.o=.po) ++ ++IDMAP_OBJ = sam/idmap.o sam/idmap_util.o sam/idmap_tdb.o ++ ++WINBINDD_OBJ1 = \ ++ nsswitch/winbindd.o \ ++ nsswitch/winbindd_user.o \ ++ nsswitch/winbindd_group.o \ ++ nsswitch/winbindd_util.o \ ++ nsswitch/winbindd_cache.o \ ++ nsswitch/winbindd_pam.o \ ++ nsswitch/winbindd_sid.o \ ++ nsswitch/winbindd_misc.o \ ++ nsswitch/winbindd_cm.o \ ++ nsswitch/winbindd_wins.o \ ++ nsswitch/winbindd_rpc.o \ ++ nsswitch/winbindd_reconnect.o \ ++ nsswitch/winbindd_ads.o \ ++ nsswitch/winbindd_passdb.o \ ++ nsswitch/winbindd_dual.o \ ++ nsswitch/winbindd_async.o ++ ++WINBINDD_OBJ = \ ++ $(WINBINDD_OBJ1) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ ++ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) \ ++ $(PROFILE_OBJ) $(SLCACHE_OBJ) $(SMBLDAP_OBJ) \ ++ $(SECRETS_OBJ) $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \ ++ $(DCUTIL_OBJ) $(IDMAP_OBJ) \ ++ $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) ++ ++WBINFO_OBJ = nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(SECRETS_OBJ) $(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) ++ ++WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) lib/replace1.o nsswitch/winbind_nss_linux.o ++ ++WINBIND_NSS_PICOBJS = $(WINBIND_NSS_OBJ:.o=.po) lib/snprintf.po ++ ++POPT_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ ++ popt/popthelp.o popt/poptparse.o ++ ++TDBBACKUP_OBJ = tdb/tdbbackup.o tdb/tdbback.o $(SNPRINTF_OBJ) $(TDBBASE_OBJ) ++ ++TDBTOOL_OBJ = tdb/tdbtool.o $(TDBBASE_OBJ) $(SNPRINTF_OBJ) ++ ++TDBDUMP_OBJ = tdb/tdbdump.o $(TDBBASE_OBJ) $(SNPRINTF_OBJ) ++ ++NTLM_AUTH_OBJ1 = utils/ntlm_auth.o utils/ntlm_auth_diagnostics.o ++ ++NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \ ++ libsmb/asn1.o libsmb/spnego.o libsmb/clikrb5.o libads/kerberos.o \ ++ libads/kerberos_verify.o $(SECRETS_OBJ) $(SERVER_MUTEX_OBJ) \ ++ libads/authdata.o $(RPC_PARSE_OBJ0) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ ++ $(SMBLDAP_OBJ) $(DOSERR_OBJ) ++ ++###################################################################### ++# now the rules... ++###################################################################### ++all : SHOWFLAGS proto_exists bin/smbd bin/smbpasswd bin/nmbd ++ ++pam_smbpass : SHOWFLAGS bin/pam_smbpass.so ++ ++smbwrapper : SHOWFLAGS ++ ++torture : SHOWFLAGS $(TORTURE_PROGS) ++ ++smbtorture : SHOWFLAGS bin/smbtorture ++ ++masktest : SHOWFLAGS bin/masktest ++ ++msgtest : SHOWFLAGS bin/msgtest ++ ++locktest : SHOWFLAGS bin/locktest ++ ++smbcacls : SHOWFLAGS bin/smbcacls ++ ++smbcquotas : SHOWFLAGS bin/smbcquotas ++ ++locktest2 : SHOWFLAGS bin/locktest2 ++ ++rpctorture : SHOWFLAGS bin/rpctorture ++ ++debug2html : SHOWFLAGS bin/debug2html ++ ++smbfilter : SHOWFLAGS bin/smbfilter ++ ++talloctort : SHOWFLAGS bin/talloctort ++ ++nsswitch : SHOWFLAGS bin/winbindd bin/wbinfo nsswitch/libnss_winbind.so \ ++ nsswitch/libnss_wins.so nsswitch/pam_winbind.so ++ ++wins : SHOWFLAGS nsswitch/libnss_wins.so ++ ++modules: SHOWFLAGS proto_exists $(MODULES) ++ ++everything: all libsmbclient debug2html smbfilter talloctort modules torture \ ++ $(EVERYTHING_PROGS) ++ ++.SUFFIXES: ++.SUFFIXES: .c .o .po .lo ++ ++SHOWFLAGS: ++ @echo "Using FLAGS = $(FLAGS)" ++ @echo " LIBS = $(LIBS)" ++ @echo " LDSHFLAGS = $(LDSHFLAGS)" ++ @echo " LDFLAGS = $(LDFLAGS)" ++ @echo " CFLAGS= $(CFLAGS)" ++ @echo " WITH_LFS= $(WITH_LFS)" ++ ++ ++MAKEDIR = || exec false; \ ++ if test -d "$$dir"; then :; else \ ++ echo mkdir "$$dir"; \ ++ mkdir -p "$$dir" >/dev/null 2>&1 || \ ++ test -d "$$dir" || \ ++ mkdir "$$dir" || \ ++ exec false; fi || exec false ++ ++.c.o: ++ @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \ ++ dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi ++ @echo Compiling $*.c ++ @$(CC) -I. -I$(srcdir) $(FLAGS) -c $< \ ++ -o $@ ++# -mv `echo $@ | sed 's%^.*/%%g'` $@ ++ ++# this adds support for precompiled headers. To use it, install a snapshot ++# of gcc-3.4 and run 'make pch' before you do the main build. ++pch: ++ rm -f $(srcdir)/include/includes.h.gch ++ $(CC) -I. -I$(srcdir) $(FLAGS) -c $(srcdir)/include/includes.h -o $(srcdir)/include/includes.h.gch ++ ++# These dependencies are only approximately correct: we want to make ++# sure Samba's paths are updated if ./configure is re-run. Really it ++# would be nice if "make prefix=/opt/samba all" also rebuilt things, ++# but since we also require "make install prefix=/opt/samba" *not* to ++# rebuild it's a bit hard. ++ ++dynconfig.o: dynconfig.c Makefile ++ @echo Compiling $*.c ++ @$(CC) $(FLAGS) $(PATH_FLAGS) -c $(srcdir)/dynconfig.c -o $@ ++ ++dynconfig.po: dynconfig.c Makefile ++ @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \ ++ dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi ++ @echo Compiling $*.c with -fPIC ++ @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) -fPIC -c $(srcdir)/dynconfig.c -o $@ ++# -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@ ++ ++lib/version.o: lib/version.c include/version.h ++ @echo Compiling $*.c ++ @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) -c $(srcdir)/lib/version.c -o $@ ++ ++lib/version.po: lib/version.c include/version.h ++ @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \ ++ dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi ++ @echo Compiling $*.c with -fPIC ++ @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) -fPIC -c $(srcdir)/lib/version.c -o $@ ++# -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@ ++ ++smbd/build_options.o: smbd/build_options.c Makefile include/config.h include/build_env.h include/proto.h ++ @echo Compiling $*.c ++ @$(CC) $(FLAGS) $(PATH_FLAGS) -c smbd/build_options.c -o $@ ++ ++smbd/build_options.c: include/config.h.in script/mkbuildoptions.awk ++ @echo Generating $@ ++ @dir=smbd $(MAKEDIR) && $(AWK) -f $(srcdir)/script/mkbuildoptions.awk > $(builddir)/smbd/build_options.c < $(srcdir)/include/config.h.in ++ ++.c.po: ++ @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \ ++ dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi ++ @echo Compiling $*.c with -fPIC ++ @$(CC) -I. -I$(srcdir) $(FLAGS) -fPIC -c $< -o $*.po ++# -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@ ++ ++bin/.dummy: ++ @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \ ++ dir=bin $(MAKEDIR); fi ++ @: >> $@ || : > $@ # what a fancy emoticon! ++ ++bin/smbd: bin/libsmbd.a $(SMBD_OBJ_MAIN) $(POPT_OBJS) $(POPT_LIB_OBJ) bin/.dummy ++ @echo Linking $@ ++ $(CC) $(FLAGS) -o $@ $(SMBD_OBJ_MAIN) $(POPT_OBJS) $(POPT_LIB_OBJ) $(LDFLAGS) \ ++ $(AUTH_LIBS) \ ++ -Lbin -lsmbd \ ++ -L$(TARGETFS)/lib \ ++ $(LIBS) ++ ++bin/libsmbd.a: $(SMBD_OBJ_BASE) ++ $(AR) cru bin/libsmbd.a $(SMBD_OBJ_BASE) ++ $(RANLIB) bin/libsmbd.a ++ ++ ++bin/nmbd: $(NMBD_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++ ++bin/swat: $(SWAT_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINT_LIBS) \ ++ $(AUTH_LIBS) $(LIBS) $(PASSDB_LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/rpcclient: $(RPCCLIENT_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(PASSDB_LIBS) $(RPCCLIENT_OBJ) \ ++ $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_OBJS) \ ++ $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/smbclient: $(CLIENT_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/net: $(NET_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) ++ ++bin/profiles: $(PROFILES_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(PROFILES_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(POPT_OBJS) ++ ++bin/smbspool: $(CUPS_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/smbmount: $(MOUNT_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(MOUNT_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/smbmnt: $(MNT_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(MNT_OBJ) $(DYNEXP) $(LDFLAGS) ++ ++bin/smbumount: $(UMOUNT_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS) ++ ++bin/testparm: $(TESTPARM_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(POPT_OBJS) ++ ++bin/smbstatus: $(STATUS_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(STATUS_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ $(POPT_OBJS) ++ ++bin/smbcontrol: $(SMBCONTROL_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) -DUSING_SMBCONTROL $(FLAGS) -o $@ $(SMBCONTROL_OBJ) $(DYNEXP) \ ++ $(LDFLAGS) $(LIBS) \ ++ $(POPT_OBJS) ++ ++bin/smbtree: $(SMBTREE_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(SMBTREE_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++# bin/smbpasswd: $(SMBPASSWD_OBJ) bin/.dummy ++# @echo Linking $@ ++# @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(PASSDB_LIBS) \ ++# $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++MY_PASS_OBJ = libsmb/smbdes.o lib/md4.o lib/arc4.o ++ ++bin/smbpasswd: utils/avm_smbpasswd.o $(MY_PASS_OBJ) ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ utils/avm_smbpasswd.o $(MY_PASS_OBJ) \ ++ -L$(TARGETFS)/lib ++ ++ ++ ++bin/pdbedit: $(PDBEDIT_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(POPT_OBJS) $(PASSDB_LIBS) $(LDAP_LIBS) ++ ++bin/smbget: $(SMBGET_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(SMBGET_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/samtest: $(SAMTEST_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(SAMTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(TERMLIBS) $(DYNEXP) $(LIBS) $(POPT_OBJS) $(PASSDB_LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/nmblookup: $(NMBLOOKUP_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(POPT_OBJS) $(LDAP_LIBS) ++ ++bin/smbtorture: $(SMBTORTURE_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/talloctort: $(TALLOCTORT_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(TALLOCTORT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) ++ ++bin/masktest: $(MASKTEST_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/msgtest: $(MSGTEST_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/smbcacls: $(SMBCACLS_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(SMBCACLS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/smbcquotas: $(SMBCQUOTAS_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(SMBCQUOTAS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/locktest: $(LOCKTEST_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/nsstest: $(NSSTEST_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/vfstest: $(VFSTEST_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(VFSTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(TERMLIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) $(ACL_LIBS) $(LIBS) $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/smbiconv: $(SMBICONV_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(SMBICONV_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(TERMLIBS) $(DYNEXP) $(LIBS) $(POPT_OBJS) ++ ++bin/log2pcap: $(LOG2PCAP_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(LOG2PCAP_OBJ) $(LDFLAGS) $(DYNEXP) $(POPT_OBJS) $(LIBS) ++ ++bin/locktest2: $(LOCKTEST2_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/rpctorture: $(RPCTORTURE_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(RPCTORTURE_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/debug2html: $(DEBUG2HTML_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) ++ ++bin/smbfilter: $(SMBFILTER_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/smbw_sample: $(SMBW_OBJ) utils/smbw_sample.o bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(SMBW_OBJ) utils/smbw_sample.o $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/smbsh: $(SMBSH_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) ++ ++bin/smbwrapper.so: $(PICOBJS) bin/.dummy ++ @echo Linking shared library $@ ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(PICOBJS) $(LIBS) \ ++ $(KRB5LIBS) $(LDAP_LIBS) \ ++ -Wl,-soname=`basename $@` ++ ++bin/libsmbclient.so: $(LIBSMBCLIENT_PICOBJS) ++ @echo Linking libsmbclient shared library $@ ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_PICOBJS) $(LDFLAGS) $(LIBS) \ ++ $(KRB5LIBS) $(LDAP_LIBS) \ ++ -Wl,-soname=`basename $@`.$(LIBSMBCLIENT_MAJOR) ++ ++bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS) ++ @echo Linking libsmbclient non-shared library $@ ++ @-$(AR) -rc $@ $(LIBSMBCLIENT_PICOBJS) ++ ++bin/libsmbsharemodes.so: $(LIBSMBSHAREMODES_PICOBJS) ++ @echo Linking libsmbsharemodes shared library $@ ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBSHAREMODES_PICOBJS) $(LDFLAGS) $(LIBS) \ ++ $(KRB5LIBS) $(LDAP_LIBS) \ ++ -Wl,-soname=`basename $@`.$(LIBSMBSHAREMODES_MAJOR) ++ ++bin/libsmbsharemodes.a: $(LIBSMBSHAREMODES_PICOBJS) ++ @echo Linking libsmbsharemodes non-shared library $@ ++ @-$(AR) -rc $@ $(LIBSMBSHAREMODES_PICOBJS) ++ ++# This is probably wrong for anything other than the GNU linker. ++bin/libbigballofmud.so: $(LIBBIGBALLOFMUD_PICOBJS) ++ @echo Linking bigballofmud shared library $@ ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBBIGBALLOFMUD_PICOBJS) $(LIBS) \ ++ $(PASSDB_LIBS) $(IDMAP_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \ ++ -Wl,-soname=`basename $@`.$(LIBBIGBALLOFMUD_MAJOR) ++ ln -snf libbigballofmud.so bin/libbigballofmud.so.0 ++ ++# It would be nice to build a static bigballofmud too, but when I try ++# I get linker errors about dl_open and similar things. I'm not sure if ++# it can be fixed or if they just can't be called from a static ++# library. ++ ++libsmbclient: $(LIBSMBCLIENT) ++libsmbsharemodes: $(LIBSMBSHAREMODES) ++ ++bin/librpc_lsarpc.so: $(RPC_LSA_OBJ) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_LSA_OBJ) -lc \ ++ -Wl,-soname=`basename $@` ++ ++bin/librpc_samr.so: $(RPC_SAMR_OBJ) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_SAMR_OBJ) -lc \ ++ -Wl,-soname=`basename $@` ++ ++bin/librpc_srvsvc.so: $(RPC_SVC_OBJ) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_SVC_OBJ) -lc \ ++ -Wl,-soname=`basename $@` ++ ++bin/librpc_svcctl.so: $(RPC_SVCCTL_OBJ) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_SVCCTL_OBJ) -lc \ ++ -Wl,-soname=`basename $@` ++ ++bin/librpc_wkssvc.so: $(RPC_WKS_OBJ) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_WKS_OBJ) -lc \ ++ -Wl,-soname=`basename $@` ++ ++bin/librpc_NETLOGON.so: $(RPC_NETLOG_OBJ) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_NETLOG_OBJ) -lc \ ++ -Wl,-soname=`basename $@` ++ ++bin/librpc_winreg.so: $(RPC_REG_OBJ) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_REG_OBJ) -lc \ ++ -Wl,-soname=`basename $@` ++ ++bin/librpc_lsa_ds.so: $(RPC_LSA_DS_OBJ) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_LSA_DS_OBJ) -lc \ ++ -Wl,-soname=`basename $@` ++ ++bin/librpc_spoolss.so: $(RPC_SPOOLSS_OBJ) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_SPOOLSS_OBJ) -lc \ ++ -Wl,-soname=`basename $@` ++ ++bin/librpc_eventlog.so: $(RPC_EVENTLOG_OBJ) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_EVENTLOG_OBJ) -lc \ ++ -Wl,-soname=`basename $@` ++ ++bin/librpc_netdfs.so: $(RPC_DFS_OBJ) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_DFS_OBJ) -lc \ ++ -Wl,-soname=`basename $@` ++ ++bin/librpc_echo.so: $(RPC_ECHO_OBJ) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_ECHO_OBJ) -lc \ ++ -Wl,-soname=`basename $@` ++ ++bin/winbindd: $(WINBINDD_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo "Linking $@" ++ @$(CC) $(FLAGS) -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ ++ $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) ++ ++# Please don't add .o files to libnss_winbind, libnss_wins, or the pam_winbind ++# libraries. Add to the appropriate PICOBJ variable instead. ++ ++nsswitch/libnss_winbind.so: $(WINBIND_NSS_PICOBJS) ++ @echo "Linking $@" ++ @$(SHLD) $(WINBIND_NSS_LDSHFLAGS) -o $@ $(WINBIND_NSS_PICOBJS) \ ++ -Wl,-soname=`basename $@` ++ ++nsswitch/libnss_wins.so: $(WINBIND_WINS_NSS_PICOBJS) ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_WINS_NSS_PICOBJS) \ ++ $(LDAP_LIBS) $(KRB5LIBS) -lc \ ++ -Wl,-soname=`basename $@` ++ ++nsswitch/pam_winbind.so: $(PAM_WINBIND_PICOBJ) bin/.dummy ++ @echo "Linking $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_PICOBJ) \ ++ -Wl,-soname=`basename $@` -lpam ++ ++bin/rhosts.so: $(AUTH_RHOSTS_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_RHOSTS_OBJ:.o=.po) -Wl,-soname=`basename $@` ++ ++bin/builtin.so: $(AUTH_BUILTIN_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_BUILTIN_OBJ:.o=.po) -Wl,-soname=`basename $@` ++ ++bin/domain.so: $(AUTH_DOMAIN_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_DOMAIN_OBJ:.o=.po) -Wl,-soname=`basename $@` ++ ++bin/smbserver.so: $(AUTH_SERVER_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_SERVER_OBJ:.o=.po) -Wl,-soname=`basename $@` ++ ++bin/winbind.so: $(AUTH_WINBIND_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_WINBIND_OBJ:.o=.po) -Wl,-soname=`basename $@` ++ ++bin/unix.so: $(AUTH_UNIX_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_UNIX_OBJ:.o=.po) -Wl,-soname=`basename $@` ++ ++bin/sam.so: $(AUTH_SAM_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_SAM_OBJ:.o=.po) -Wl,-soname=`basename $@` ++ ++bin/mysql.so: $(MYSQL_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(MYSQL_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/pgsql.so: $(PGSQL_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(PGSQL_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/ldapsam.so: passdb/pdb_ldap.po ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) $(LDAP_LIBS) -o $@ passdb/pdb_ldap.po \ ++ -Wl,-soname=`basename $@` ++ ++bin/tdbsam.so: passdb/pdb_tdb.po ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ passdb/pdb_tdb.po \ ++ -Wl,-soname=`basename $@` ++ ++bin/smbpasswd.so: passdb/pdb_smbpasswd.po ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ passdb/pdb_smbpasswd.po \ ++ -Wl,-soname=`basename $@` ++ ++bin/idmap_rid.so: sam/idmap_rid.po ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ sam/idmap_rid.po \ ++ -Wl,-soname=`basename $@` ++ ++bin/idmap_ad.so: sam/idmap_ad.po ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ sam/idmap_ad.po \ ++ -Wl,-soname=`basename $@` ++ ++bin/weird.so: $(DEVEL_HELP_WEIRD_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(DEVEL_HELP_WEIRD_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/CP850.so: $(CP850_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(CP850_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/CP437.so: $(CP437_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(CP437_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/macosxfs.so: $(CHARSET_MACOSXFS_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(CHARSET_MACOSXFS_OBJ:.o=.po) \ ++ -framework CoreFoundation -Wl,-soname=`basename $@` ++ ++bin/xml.so: $(XML_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(XML_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/audit.so: $(VFS_AUDIT_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_AUDIT_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/extd_audit.so: $(VFS_EXTD_AUDIT_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_EXTD_AUDIT_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/full_audit.so: $(VFS_FULL_AUDIT_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_FULL_AUDIT_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/recycle.so: $(VFS_RECYCLE_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_RECYCLE_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/netatalk.so: $(VFS_NETATALK_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_NETATALK_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/fake_perms.so: $(VFS_FAKE_PERMS_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_FAKE_PERMS_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/default_quota.so: $(VFS_DEFAULT_QUOTA_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_DEFAULT_QUOTA_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/readonly.so: $(VFS_READONLY_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_READONLY_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/shadow_copy.so: $(VFS_SHADOW_COPY_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_SHADOW_COPY_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/cap.so: $(VFS_CAP_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_CAP_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/expand_msdfs.so: $(VFS_EXPAND_MSDFS_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_EXPAND_MSDFS_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/afsacl.so: $(VFS_AFSACL_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_AFSACL_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++bin/catia.so: $(VFS_CATIA_OBJ:.o=.po) ++ @echo "Building plugin $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_CATIA_OBJ:.o=.po) \ ++ -Wl,-soname=`basename $@` ++ ++ ++bin/wbinfo: $(WBINFO_OBJ) $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(WBINFO_OBJ) $(DYNEXP) $(LIBS) $(POPT_OBJS) ++ ++bin/ntlm_auth: $(NTLM_AUTH_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \ ++ $(POPT_OBJS) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(NTLM_AUTH_OBJ) \ ++ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBS) \ ++ $(POPT_OBJS) $(KRB5LIBS) $(LDAP_LIBS) ++ ++bin/pam_smbpass.so: $(PAM_SMBPASS_PICOOBJ) ++ @echo "Linking shared library $@" ++ @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_SMBPASS_PICOOBJ) -lpam $(DYNEXP) $(LIBS) -lc $(LDAP_LIBS) $(KRB5LIBS) ++ ++bin/libmsrpc.a: $(LIBMSRPC_PICOBJ) ++ @-$(AR) -rc $@ $(LIBMSRPC_PICOBJ) ++ ++bin/tdbbackup: $(TDBBACKUP_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(LIBS) $(TDBBACKUP_OBJ) ++ ++bin/tdbtool: $(TDBTOOL_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(LIBS) $(TDBTOOL_OBJ) ++ ++bin/tdbdump: $(TDBDUMP_OBJ) bin/.dummy ++ @echo Linking $@ ++ @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(LIBS) $(TDBDUMP_OBJ) ++ ++bin/t_strcmp: bin/libbigballofmud.so torture/t_strcmp.o ++ $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) torture/t_strcmp.o -L ./bin -lbigballofmud ++ ++bin/t_strstr: bin/libbigballofmud.so torture/t_strstr.o ++ $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) torture/t_strstr.o -L ./bin -lbigballofmud ++ ++bin/t_stringoverflow: bin/libbigballofmud.so torture/t_stringoverflow.o ++ $(CC) $(FLAGS) -o $@ $(DYNEXP) torture/t_stringoverflow.o -L./bin -lbigballofmud ++ ++bin/t_doschar: bin/libbigballofmud.so torture/t_doschar.o ++ $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) torture/t_doschar.o -L ./bin -lbigballofmud ++bin/t_push_ucs2: bin/libbigballofmud.so torture/t_push_ucs2.o ++ $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) torture/t_push_ucs2.o -L ./bin -lbigballofmud ++ ++bin/t_snprintf: lib/snprintf.c ++ $(CC) $(FLAGS) -o $@ $(DYNEXP) -DTEST_SNPRINTF lib/snprintf.c -lm ++install: installbin installman installscripts installdat installswat installmodules installclientlib ++ ++install-everything: install installmodules ++ ++# DESTDIR is used here to prevent packagers wasting their time ++# duplicating the Makefile. Remove it and you will have the privelege ++# of package each samba release for muliple versions of multiple ++# distributions and operating systems, or at least supplying patches ++# to all the packaging files required for this, prior to committing ++# the removal of DESTDIR. Do not remove it even though you think it ++# is not used ++ ++installdirs: ++ @$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(PRIVATEDIR) $(DESTDIR)$(PIDDIR) $(DESTDIR)$(LOCKDIR) $(DESTDIR)$(MANDIR) ++ ++installservers: all installdirs ++ @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(SBIN_PROGS) ++ ++installbin: all installdirs ++ @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(SBIN_PROGS) ++ @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(BIN_PROGS) ++ ++ ++# Some symlinks are required for the 'probing' of modules. ++# This mechanism should go at some point.. ++installmodules: modules installdirs ++ @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(VFSLIBDIR) $(VFS_MODULES) ++ @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(PDBLIBDIR) $(PDB_MODULES) ++ @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(RPCLIBDIR) $(RPC_MODULES) ++ @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(IDMAPLIBDIR) $(IDMAP_MODULES) ++ @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(CHARSETLIBDIR) $(CHARSET_MODULES) ++ @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(AUTHLIBDIR) $(AUTH_MODULES) ++ @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.so ldapsam_compat.so ++ @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) rhosts.so hostsequiv.so ++ @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) sam.so sam_ignoredomain.so ++ @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) domain.so trustdomain.so ntdomain.so ++ @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) builtin.so guest.so fixed_challenge.so name_to_ntstatus.so ++ ++installscripts: installdirs ++ @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS) $(DESTDIR)$(BINDIR) $(SCRIPTS) ++ ++installdat: installdirs ++ @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(LIBDIR) $(srcdir) ++ ++installmsg: installdirs ++ @$(SHELL) $(srcdir)/script/installmsg.sh $(DESTDIR)$(LIBDIR) $(srcdir) ++ ++installswat: installdirs installmsg ++ @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir) ++ ++installclientlib: installdirs libsmbclient ++ @$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)$(LIBDIR) ++ -$(INSTALLCLIENTCMD_SH) bin/libsmbclient.so $(DESTDIR)$(LIBDIR) ++ -$(INSTALLCLIENTCMD_A) bin/libsmbclient.a $(DESTDIR)$(LIBDIR) ++ @$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)${prefix}/include ++ -$(INSTALLCMD) $(srcdir)/include/libsmbclient.h $(DESTDIR)${prefix}/include ++ ++# Python extensions ++ ++PYTHON_OBJS = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) $(RPC_PARSE_OBJ) \ ++ $(LIBMSRPC_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ ++ $(SECRETS_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ) ++ ++PYTHON_PICOBJS = $(PYTHON_OBJS:.o=.po) ++ ++python_ext: $(PYTHON_PICOBJS) ++ @if test -z "$(PYTHON)"; then \ ++ echo Use the option --with-python to configure python; \ ++ exit 1; \ ++ fi ++ PYTHON_OBJS="$(PYTHON_PICOBJS)" \ ++ PYTHON_CFLAGS="$(CFLAGS) $(CPPFLAGS) $(FLAGS)" \ ++ LIBS="$(LDFLAGS) $(LIBS) $(PASSDB_LIBS) $(IDMAP_LIBS) $(KRB5LIBS) $(LDAP_LIBS)" \ ++ $(PYTHON) python/setup.py build ++ ++python_install: $(PYTHON_PICOBJS) ++ @if test -z "$(PYTHON)"; then \ ++ echo Use the option --with-python to configure python; \ ++ exit 1; \ ++ fi ++ PYTHON_OBJS="$(PYTHON_PICOBJS)" \ ++ PYTHON_CFLAGS="$(CFLAGS) $(CPPFLAGS)" \ ++ LIBS="$(LDFLAGS) $(LIBS)" \ ++ $(PYTHON) python/setup.py install ++ ++python_clean: ++ @-if test -n "$(PYTHON)"; then $(PYTHON) python/setup.py clean; fi ++ ++# revert to the previously installed version ++revert: ++ @$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SBIN_PROGS) ++ @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(BIN_PROGS) $(SCRIPTS) ++ ++installman: installdirs ++ @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(srcdir) C "" ++ ++.PHONY: showlayout ++ ++showlayout: ++ @echo "Samba will be installed into:" ++ @echo " basedir: $(BASEDIR)" ++ @echo " bindir: $(BINDIR)" ++ @echo " sbindir: $(SBINDIR)" ++ @echo " libdir: $(LIBDIR)" ++ @echo " vardir: $(VARDIR)" ++ @echo " mandir: $(MANDIR)" ++ @echo " privatedir: $(PRIVATE_DIR)" ++ @echo " configdir: $(CONFIGDIR)" ++ @echo " lockdir: $(LOCKDIR)" ++ @echo " piddir: $(PIDDIR)" ++ @echo " swatdir: $(SWATDIR)" ++ ++ ++uninstall: uninstallman uninstallbin uninstallscripts uninstallmodules ++ ++uninstallman: ++ @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) C ++ ++uninstallbin: ++ @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(SBIN_PROGS) ++ @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(BIN_PROGS) ++ ++uninstallmodules: ++ @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(VFSLIBDIR) $(DESTDIR)$(VFS_MODULES) ++ @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(PDBLIBDIR) $(DESTDIR)$(PDB_MODULES) ++ @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(RPCLIBDIR) $(DESTDIR)$(RPC_MODULES) ++ @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(CHARSETLIBDIR) $(DESTDIR)$(CHARSET_MODULES) ++ @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(AUTHLIBDIR) $(DESTDIR)$(AUTH_MODULES) ++ ++uninstallscripts: ++ @$(SHELL) $(srcdir)/script/uninstallscripts.sh $(INSTALLPERMS) $(DESTDIR)$(BINDIR) $(SCRIPTS) ++ ++# Toplevel clean files ++TOPFILES=dynconfig.o dynconfig.po ++ ++clean: delheaders python_clean ++ -rm -f core */*~ *~ */*.o */*.po */*.so \ ++ $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(MODULES) $(TORTURE_PROGS) \ ++ $(LIBSMBCLIENT) $(LIBSMBSHAREMODES) $(EVERYTHING_PROGS) .headers.stamp ++ -rm -rf t_dir ++ -rm -rf bin/lib* ++ -find . -name *.o | xargs rm -f ++ -find . -name *.po | xargs rm -f ++ -find . -name *.so | xargs rm -f ++ ++# Making this target will just make sure that the prototype files ++# exist, not necessarily that they are up to date. Since they're ++# removed by "make clean" this will always be run when you do anything ++# afterwards. ++proto_exists: include/proto.h include/build_env.h \ ++ nsswitch/winbindd_proto.h web/swat_proto.h \ ++ client/client_proto.h utils/net_proto.h utils/ntlm_auth_proto.h ++ ++# AR7 smbd/build_options.c ++ ++delheaders: ++ @echo Removing prototype headers ++ @rm -f include/proto.h include/build_env.h \ ++ nsswitch/winbindd_proto.h web/swat_proto.h \ ++ client/client_proto.h utils/net_proto.h \ ++ smbd/build_options.c ++ ++MKPROTO_SH = $(srcdir)/script/mkproto.sh ++ ++# AR7 include/proto.h: smbd/build_options.c ++ ++include/proto.h: ++ @echo Building include/proto.h ++ @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \ ++ -h _PROTO_H_ $(builddir)/include/proto.h \ ++ $(PROTO_OBJ) ++ ++include/build_env.h: script/build_env.sh ++ @echo Building include/build_env.h ++ @$(SHELL) $(srcdir)/script/build_env.sh $(srcdir) $(builddir) $(CC) \ ++ > $(builddir)/include/build_env.h ++ ++nsswitch/winbindd_proto.h: ++ @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \ ++ -h _WINBINDD_PROTO_H_ $(builddir)/nsswitch/winbindd_proto.h \ ++ $(WINBINDD_OBJ1) ++ ++web/swat_proto.h: ++ @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \ ++ -h _SWAT_PROTO_H_ $(builddir)/web/swat_proto.h \ ++ $(SWAT_OBJ1) ++ ++client/client_proto.h: ++ @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \ ++ -h _CLIENT_PROTO_H_ $(builddir)/client/client_proto.h \ ++ $(CLIENT_OBJ1) ++ ++utils/net_proto.h: ++ @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \ ++ -h _NET_PROTO_H_ $(builddir)/utils/net_proto.h \ ++ $(NET_OBJ1) ++ ++utils/ntlm_auth_proto.h: ++ @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \ ++ -h _NTLM_AUTH_PROTO_H_ $(builddir)/utils/ntlm_auth_proto.h \ ++ $(NTLM_AUTH_OBJ1) ++ ++# "make headers" or "make proto" calls a subshell because we need to ++# make sure these commands are executed in sequence even for a ++# parallel make. ++headers: ++ $(MAKE) delheaders; \ ++ $(MAKE) smbd/build_options.c; \ ++ $(MAKE) include/proto.h; \ ++ $(MAKE) include/build_env.h; \ ++ $(MAKE) nsswitch/winbindd_proto.h; \ ++ $(MAKE) web/swat_proto.h; \ ++ $(MAKE) client/client_proto.h; \ ++ $(MAKE) utils/ntlm_auth_proto.h; \ ++ $(MAKE) utils/net_proto.h; ++ ++proto: headers ++ ++.PHONY: headers proto ++ ++etags: ++ etags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/` ++ ++ctags: ++ ctags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/` ++ ++realclean: clean delheaders ++ -rm -f config.log bin/.dummy script/findsmb ++ ++distclean: realclean ++ -rm -f include/stamp-h ++ -rm -f include/config.h Makefile ++ -rm -f config.status config.cache so_locations ++ -rm -rf .deps TAGS ++ ++realdistclean: distclean ++ -rm -f include/config.h.in ++ -rm -f include/version.h ++ -rm -f configure ++ ++# this target is really just for my use. It only works on a limited ++# range of machines and is used to produce a list of potentially ++# dead (ie. unused) functions in the code. (tridge) ++finddead: ++ nm */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt ++ nm */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt ++ comm -13 nmused.txt nmfns.txt ++ ++ ++# when configure.in is updated, reconfigure ++$(srcdir)/configure: $(srcdir)/configure.in ++ @echo "WARNING: you need to rerun ./autogen.sh" ++ ++config.status: $(srcdir)/configure ++ @echo "WARNING: you need to run ./configure" ++ ++# AR7 Makefile: $(srcdir)/Makefile.in config.status ++# AR7 @echo "WARNING: you need to run ./config.status" ++ ++###################################################################### ++# Samba Testing Framework ++ ++# FIXME: LD_LIBRARY_PATH is not portable, but in the absence of ++# libtool I don't know a better way to do it. Perhaps we should fix ++# libbigballofmud to link statically? ++## ++## not working...to be replaced by 'make test' --jerry ++## ++#check: check-programs ++# LD_LIBRARY_PATH="`pwd`/bin:$$LD_LIBRARY_PATH" \ ++# PATH="`pwd`/bin:$$PATH" \ ++# python stf/standardcheck.py; \ ++# if test -n "$(PYTHON)"; then \ ++# python stf/pythoncheck.py; \ ++# fi ++ ++# These are called by the test suite and need to be built before ++# running it. For the time being we don't build all of BIN_PROGS, ++# because they're not all needed. ++check-programs: bin/t_strcmp bin/t_strstr bin/t_push_ucs2 bin/smbcontrol bin/t_snprintf ++ ++test: all ++ @if test -z "$(SMB4TORTURE)"; then \ ++ echo "Please set the SMB4TORTURE environment variable"; \ ++ exit 1; \ ++ fi ++ ./script/smb4torture.sh `pwd`/prefix-test $(SMB4TORTURE) +diff -urN samba-3.0.24.orig/source/passdb/lookup_sid.c samba-3.0.24/source/passdb/lookup_sid.c +--- samba-3.0.24.orig/source/passdb/lookup_sid.c 2007-02-04 19:59:21.000000000 +0100 ++++ samba-3.0.24/source/passdb/lookup_sid.c 2007-08-07 09:38:18.000000000 +0200 +@@ -421,10 +421,10 @@ + return False; + } + +- become_root_uid_only(); ++ become_root(); + result = pdb_lookup_rids(domain_sid, num_rids, rids, + *names, *types); +- unbecome_root_uid_only(); ++ unbecome_root(); + + return (NT_STATUS_IS_OK(result) || + NT_STATUS_EQUAL(result, NT_STATUS_NONE_MAPPED) || +@@ -1085,9 +1085,9 @@ + goto done; + } + +- become_root_uid_only(); ++ become_root(); + ret = pdb_uid_to_rid(uid, &rid); +- unbecome_root_uid_only(); ++ unbecome_root(); + + if (ret) { + /* This is a mapped user */ +@@ -1131,9 +1131,9 @@ + goto done; + } + +- become_root_uid_only(); ++ become_root(); + ret = pdb_gid_to_sid(gid, psid); +- unbecome_root_uid_only(); ++ unbecome_root(); + + if (ret) { + /* This is a mapped group */ +@@ -1179,9 +1179,9 @@ + union unid_t id; + BOOL ret; + +- become_root_uid_only(); ++ become_root(); + ret = pdb_sid_to_id(psid, &id, &type); +- unbecome_root_uid_only(); ++ unbecome_root(); + + if (ret) { + if (type != SID_NAME_USER) { +@@ -1259,9 +1259,9 @@ + sid_check_is_in_wellknown_domain(psid))) { + BOOL ret; + +- become_root_uid_only(); ++ become_root(); + ret = pdb_getgrsid(&map, *psid); +- unbecome_root_uid_only(); ++ unbecome_root(); + + if (ret) { + *pgid = map.gid; +@@ -1273,9 +1273,9 @@ + if (sid_peek_check_rid(get_global_sam_sid(), psid, &rid)) { + BOOL ret; + +- become_root_uid_only(); ++ become_root(); + ret = pdb_sid_to_id(psid, &id, &type); +- unbecome_root_uid_only(); ++ unbecome_root(); + + if (ret) { + if ((type != SID_NAME_DOM_GRP) && +diff -urN samba-3.0.24.orig/source/printing/nt_printing.c samba-3.0.24/source/printing/nt_printing.c +--- samba-3.0.24.orig/source/printing/nt_printing.c 2007-02-04 20:09:01.000000000 +0100 ++++ samba-3.0.24/source/printing/nt_printing.c 2007-08-07 09:38:18.000000000 +0200 +@@ -2984,11 +2984,15 @@ + return True; + } + ++/***************************************************************** ++ ****************************************************************/ ++ + static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2, + struct uuid guid) + { + int i; + REGVAL_CTR *ctr=NULL; ++ UNISTR2 unistr_guid; + + /* find the DsSpooler key */ + if ((i = lookup_printerkey(info2->data, SPOOL_DSSPOOLER_KEY)) < 0) +@@ -2996,8 +3000,18 @@ + ctr = info2->data->keys[i].values; + + regval_ctr_delvalue(ctr, "objectGUID"); +- regval_ctr_addvalue(ctr, "objectGUID", REG_BINARY, +- (char *) &guid, sizeof(struct uuid)); ++ ++ /* We used to store this as a REG_BINARY but that causes ++ Vista to whine */ ++ ++ ZERO_STRUCT( unistr_guid ); ++ init_unistr2( &unistr_guid, smb_uuid_string_static(guid), ++ UNI_STR_TERMINATE ); ++ ++ regval_ctr_addvalue(ctr, "objectGUID", REG_SZ, ++ (char *)unistr_guid.buffer, ++ unistr_guid.uni_max_len*2); ++ + } + + static WERROR nt_printer_publish_ads(ADS_STRUCT *ads, +@@ -3254,6 +3268,7 @@ + REGISTRY_VALUE *guid_val; + WERROR win_rc; + int i; ++ BOOL ret = False; + + win_rc = get_a_printer(print_hnd, &printer, 2, lp_servicename(snum)); + +@@ -3267,12 +3282,36 @@ + return False; + } + +- /* fetching printer guids really ought to be a separate function.. */ +- if (guid && regval_size(guid_val) == sizeof(struct uuid)) +- memcpy(guid, regval_data_p(guid_val), sizeof(struct uuid)); ++ /* fetching printer guids really ought to be a separate function. */ ++ ++ if ( guid ) { ++ fstring guid_str; ++ ++ /* We used to store the guid as REG_BINARY, then swapped ++ to REG_SZ for Vista compatibility so check for both */ ++ ++ switch ( regval_type(guid_val) ){ ++ case REG_SZ: ++ rpcstr_pull( guid_str, regval_data_p(guid_val), ++ sizeof(guid_str)-1, -1, STR_TERMINATE ); ++ ret = smb_string_to_uuid( guid_str, guid ); ++ break; ++ case REG_BINARY: ++ if ( regval_size(guid_val) != sizeof(struct uuid) ) { ++ ret = False; ++ break; ++ } ++ memcpy(guid, regval_data_p(guid_val), sizeof(struct uuid)); ++ break; ++ default: ++ DEBUG(0,("is_printer_published: GUID value stored as " ++ "invaluid type (%d)\n", regval_type(guid_val) )); ++ break; ++ } ++ } + + free_a_printer(&printer, 2); +- return True; ++ return ret; + } + #else + WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action) +@@ -3539,13 +3578,43 @@ + break; + } + +- /* add the new value */ ++ DEBUG(8,("specific: [%s:%s], len: %d\n", keyname, valuename, size)); ++ ++ /* Vista doesn't like unknown REG_BINARY values in DsSpooler. ++ Thanks to Martin Zielinski for the hint. */ ++ ++ if ( type == REG_BINARY && ++ strequal( keyname, SPOOL_DSSPOOLER_KEY ) && ++ strequal( valuename, "objectGUID" ) ) ++ { ++ struct uuid guid; ++ UNISTR2 unistr_guid; ++ ++ ZERO_STRUCT( unistr_guid ); ++ ++ /* convert the GUID to a UNICODE string */ ++ ++ memcpy( &guid, data_p, sizeof(struct uuid) ); ++ ++ init_unistr2( &unistr_guid, smb_uuid_string_static(guid), ++ UNI_STR_TERMINATE ); ++ ++ regval_ctr_addvalue( printer_data->keys[key_index].values, ++ valuename, REG_SZ, ++ (const char *)unistr_guid.buffer, ++ unistr_guid.uni_str_len*2 ); ++ ++ } else { ++ /* add the value */ ++ ++ regval_ctr_addvalue( printer_data->keys[key_index].values, ++ valuename, type, (const char *)data_p, ++ size ); ++ } + +- regval_ctr_addvalue( printer_data->keys[key_index].values, valuename, type, (const char *)data_p, size ); + + SAFE_FREE(data_p); /* 'B' option to tdbpack does a malloc() */ + +- DEBUG(8,("specific: [%s:%s], len: %d\n", keyname, valuename, size)); + } + + return len; +diff -urN samba-3.0.24.orig/source/printing/print_generic.c samba-3.0.24/source/printing/print_generic.c +--- samba-3.0.24.orig/source/printing/print_generic.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/printing/print_generic.c 2007-08-07 09:38:18.000000000 +0200 +@@ -58,7 +58,7 @@ + if ( do_sub && snum != -1 ) + standard_sub_snum(snum,syscmd,sizeof(syscmd)); + +- ret = smbrun(syscmd,outfd); ++ ret = smbrun_no_sanitize(syscmd,outfd); + + DEBUG(3,("Running the command `%s' gave %d\n",syscmd,ret)); + +diff -urN samba-3.0.24.orig/source/registry/regfio.c samba-3.0.24/source/registry/regfio.c +--- samba-3.0.24.orig/source/registry/regfio.c 2007-02-04 19:59:26.000000000 +0100 ++++ samba-3.0.24/source/registry/regfio.c 2007-08-07 09:38:18.000000000 +0200 +@@ -642,8 +642,12 @@ + return False; + + if ( UNMARSHALLING(&hbin->ps) ) { +- if ( !(lf->hashes = PRS_ALLOC_MEM( &hbin->ps, REGF_HASH_REC, lf->num_keys )) ) +- return False; ++ if (lf->num_keys) { ++ if ( !(lf->hashes = PRS_ALLOC_MEM( &hbin->ps, REGF_HASH_REC, lf->num_keys )) ) ++ return False; ++ } else { ++ lf->hashes = NULL; ++ } + } + + for ( i=0; inum_keys; i++ ) { +diff -urN samba-3.0.24.orig/source/registry/reg_frontend.c samba-3.0.24/source/registry/reg_frontend.c +--- samba-3.0.24.orig/source/registry/reg_frontend.c 2005-11-09 19:29:03.000000000 +0100 ++++ samba-3.0.24/source/registry/reg_frontend.c 2007-07-17 13:19:05.000000000 +0200 +@@ -35,9 +35,11 @@ + + REGISTRY_HOOK reg_hooks[] = { + #ifndef REG_TDB_ONLY ++#ifndef AVM_NO_PRINTING + { KEY_PRINTING, &printing_ops }, + { KEY_PRINTING_2K, &printing_ops }, + { KEY_PRINTING_PORTS, &printing_ops }, ++#endif + { KEY_SHARES, &shares_reg_ops }, + #endif + { NULL, NULL } +diff -urN samba-3.0.24.orig/source/rpc_client/cli_pipe.c samba-3.0.24/source/rpc_client/cli_pipe.c +--- samba-3.0.24.orig/source/rpc_client/cli_pipe.c 2007-02-04 19:59:11.000000000 +0100 ++++ samba-3.0.24/source/rpc_client/cli_pipe.c 2007-07-17 13:19:05.000000000 +0200 +@@ -619,7 +619,11 @@ + + DEBUG(1, ("cli_pipe_validate_current_pdu: RPC fault code %s received from remote machine %s " + "pipe %s fnum 0x%x!\n", ++#if 1 /* AVM */ ++ "ERRSTR-REPLACEMENT", ++#else + dcerpc_errstr(NT_STATUS_V(fault_resp.status)), ++#endif + cli->cli->desthost, + cli->pipe_name, + (unsigned int)cli->fnum)); +diff -urN samba-3.0.24.orig/source/rpc_parse/parse_dfs.c samba-3.0.24/source/rpc_parse/parse_dfs.c +--- samba-3.0.24.orig/source/rpc_parse/parse_dfs.c 2007-02-04 19:59:22.000000000 +0100 ++++ samba-3.0.24/source/rpc_parse/parse_dfs.c 2007-08-07 09:38:18.000000000 +0200 +@@ -325,7 +325,9 @@ + return False; + + if (UNMARSHALLING(ps)) { +- v->stores = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->stores)*v->num_stores); ++ v->stores = PRS_ALLOC_MEM(ps,NETDFS_DFS_STORAGEINFO,v->num_stores); ++ if (!v->stores) ++ return False; + } + for (i_stores_1=0; i_stores_1num_stores;i_stores_1++) { + if (!netdfs_io_dfs_StorageInfo_p("stores", &v->stores[i_stores_1], ps, depth)) +@@ -447,7 +449,9 @@ + return False; + + if (UNMARSHALLING(ps)) { +- v->stores = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->stores)*v->num_stores); ++ v->stores = PRS_ALLOC_MEM(ps,NETDFS_DFS_STORAGEINFO,v->num_stores); ++ if (!v->stores) ++ return False; + } + for (i_stores_1=0; i_stores_1num_stores;i_stores_1++) { + if (!netdfs_io_dfs_StorageInfo_p("stores", &v->stores[i_stores_1], ps, depth)) +@@ -920,7 +924,9 @@ + return False; + + if (UNMARSHALLING(ps)) { +- v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count); ++ v->s = PRS_ALLOC_MEM(ps,NETDFS_DFS_INFO1,v->count); ++ if (!v->s) ++ return False; + } + for (i_s_1=0; i_s_1count;i_s_1++) { + if (!netdfs_io_dfs_Info1_p("s", &v->s[i_s_1], ps, depth)) +@@ -986,7 +992,9 @@ + return False; + + if (UNMARSHALLING(ps)) { +- v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count); ++ v->s = PRS_ALLOC_MEM(ps,NETDFS_DFS_INFO2,v->count); ++ if (!v->s) ++ return False; + } + for (i_s_1=0; i_s_1count;i_s_1++) { + if (!netdfs_io_dfs_Info2_p("s", &v->s[i_s_1], ps, depth)) +@@ -1052,7 +1060,9 @@ + return False; + + if (UNMARSHALLING(ps)) { +- v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count); ++ v->s = PRS_ALLOC_MEM(ps,NETDFS_DFS_INFO3,v->count); ++ if (!v->s) ++ return False; + } + for (i_s_1=0; i_s_1count;i_s_1++) { + if (!netdfs_io_dfs_Info3_p("s", &v->s[i_s_1], ps, depth)) +@@ -1118,7 +1128,9 @@ + return False; + + if (UNMARSHALLING(ps)) { +- v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count); ++ v->s = PRS_ALLOC_MEM(ps,NETDFS_DFS_INFO4,v->count); ++ if (!v->s) ++ return False; + } + for (i_s_1=0; i_s_1count;i_s_1++) { + if (!netdfs_io_dfs_Info4_p("s", &v->s[i_s_1], ps, depth)) +@@ -1184,7 +1196,9 @@ + return False; + + if (UNMARSHALLING(ps)) { +- v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count); ++ v->s = PRS_ALLOC_MEM(ps,NETDFS_DFS_INFO200,v->count); ++ if (!v->s) ++ return False; + } + for (i_s_1=0; i_s_1count;i_s_1++) { + if (!netdfs_io_dfs_Info200_p("s", &v->s[i_s_1], ps, depth)) +@@ -1250,7 +1264,9 @@ + return False; + + if (UNMARSHALLING(ps)) { +- v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count); ++ v->s = PRS_ALLOC_MEM(ps,NETDFS_DFS_INFO300,v->count); ++ if (!v->s) ++ return False; + } + for (i_s_1=0; i_s_1count;i_s_1++) { + if (!netdfs_io_dfs_Info300_p("s", &v->s[i_s_1], ps, depth)) +diff -urN samba-3.0.24.orig/source/rpc_parse/parse_lsa.c samba-3.0.24/source/rpc_parse/parse_lsa.c +--- samba-3.0.24.orig/source/rpc_parse/parse_lsa.c 2007-02-04 19:59:22.000000000 +0100 ++++ samba-3.0.24/source/rpc_parse/parse_lsa.c 2007-08-07 09:38:18.000000000 +0200 +@@ -1171,7 +1171,7 @@ + + /* Mallocate memory if we're unpacking from the wire */ + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && sen->num_entries) { + if ((sen->ptr_sid = PRS_ALLOC_MEM( ps, uint32, sen->num_entries)) == NULL) { + DEBUG(3, ("init_lsa_sid_enum(): out of memory for " + "ptr_sid\n")); +@@ -1349,12 +1349,17 @@ + &trn->num_entries2)) + return False; + +- if (UNMARSHALLING(ps)) { +- if ((trn->name = PRS_ALLOC_MEM(ps, LSA_TRANS_NAME, trn->num_entries)) == NULL) { ++ if (trn->num_entries2 != trn->num_entries) { ++ /* RPC fault */ ++ return False; ++ } ++ ++ if (UNMARSHALLING(ps) && trn->num_entries2) { ++ if ((trn->name = PRS_ALLOC_MEM(ps, LSA_TRANS_NAME, trn->num_entries2)) == NULL) { + return False; + } + +- if ((trn->uni_name = PRS_ALLOC_MEM(ps, UNISTR2, trn->num_entries)) == NULL) { ++ if ((trn->uni_name = PRS_ALLOC_MEM(ps, UNISTR2, trn->num_entries2)) == NULL) { + return False; + } + } +@@ -1406,12 +1411,17 @@ + &trn->num_entries2)) + return False; + +- if (UNMARSHALLING(ps)) { +- if ((trn->name = PRS_ALLOC_MEM(ps, LSA_TRANS_NAME2, trn->num_entries)) == NULL) { ++ if (trn->num_entries2 != trn->num_entries) { ++ /* RPC fault */ ++ return False; ++ } ++ ++ if (UNMARSHALLING(ps) && trn->num_entries2) { ++ if ((trn->name = PRS_ALLOC_MEM(ps, LSA_TRANS_NAME2, trn->num_entries2)) == NULL) { + return False; + } + +- if ((trn->uni_name = PRS_ALLOC_MEM(ps, UNISTR2, trn->num_entries)) == NULL) { ++ if ((trn->uni_name = PRS_ALLOC_MEM(ps, UNISTR2, trn->num_entries2)) == NULL) { + return False; + } + } +@@ -1678,7 +1688,7 @@ + return False; + } + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && out->num_entries2) { + if ((out->dom_rid = PRS_ALLOC_MEM(ps, DOM_RID, out->num_entries2)) + == NULL) { + DEBUG(3, ("lsa_io_r_lookup_names(): out of memory\n")); +@@ -1803,7 +1813,7 @@ + return False; + } + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && out->num_entries2) { + if ((out->dom_rid = PRS_ALLOC_MEM(ps, DOM_RID2, out->num_entries2)) + == NULL) { + DEBUG(3, ("lsa_io_r_lookup_names2(): out of memory\n")); +@@ -1956,7 +1966,7 @@ + return False; + } + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && out->num_entries2) { + if ((out->trans_sids = PRS_ALLOC_MEM(ps, LSA_TRANSLATED_SID3, out->num_entries2)) + == NULL) { + DEBUG(3, ("lsa_io_r_lookup_names3(): out of memory\n")); +@@ -2085,7 +2095,7 @@ + return False; + } + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && out->num_entries2) { + if ((out->trans_sids = PRS_ALLOC_MEM(ps, LSA_TRANSLATED_SID3, out->num_entries2)) + == NULL) { + DEBUG(3, ("lsa_io_r_lookup_names4(): out of memory\n")); +@@ -2324,7 +2334,7 @@ + if(!prs_uint32("count1", ps, depth, &out->count1)) + return False; + +- if (UNMARSHALLING(ps)) ++ if (UNMARSHALLING(ps) && out->count1) + if (!(out->privs = PRS_ALLOC_MEM(ps, LSA_PRIV_ENTRY, out->count1))) + return False; + +@@ -2759,7 +2769,7 @@ + + static BOOL lsa_io_privilege_set(const char *desc, PRIVILEGE_SET *out, prs_struct *ps, int depth) + { +- uint32 i; ++ uint32 i, dummy; + + prs_debug(ps, depth, desc, "lsa_io_privilege_set"); + depth++; +@@ -2767,7 +2777,7 @@ + if(!prs_align(ps)) + return False; + +- if(!prs_uint32("count", ps, depth, &out->count)) ++ if(!prs_uint32("count", ps, depth, &dummy)) + return False; + if(!prs_uint32("control", ps, depth, &out->control)) + return False; +@@ -3886,7 +3896,7 @@ + prs_debug(ps, depth, desc, "smb_io_lsa_data_buf"); + depth++; + +- if ( UNMARSHALLING(ps) ) { ++ if ( UNMARSHALLING(ps) && length ) { + if ( !(buf->data = PRS_ALLOC_MEM( ps, uint8, length )) ) + return False; + } +@@ -3900,7 +3910,7 @@ + if (!prs_uint32("length", ps, depth, &buf->length)) + return False; + +- if(!prs_uint8s(False, "data", ps, depth, buf->data, size)) ++ if(!prs_uint8s(False, "data", ps, depth, buf->data, length)) + return False; + + return True; +diff -urN samba-3.0.24.orig/source/rpc_parse/parse_net.c samba-3.0.24/source/rpc_parse/parse_net.c +--- samba-3.0.24.orig/source/rpc_parse/parse_net.c 2007-02-04 19:59:22.000000000 +0100 ++++ samba-3.0.24/source/rpc_parse/parse_net.c 2007-08-07 09:38:18.000000000 +0200 +@@ -1721,9 +1721,13 @@ + } + + if (UNMARSHALLING(ps)) { +- usr->gids = PRS_ALLOC_MEM(ps, DOM_GID, usr->num_groups); +- if (usr->gids == NULL) +- return False; ++ if (usr->num_groups) { ++ usr->gids = PRS_ALLOC_MEM(ps, DOM_GID, usr->num_groups); ++ if (usr->gids == NULL) ++ return False; ++ } else { ++ usr->gids = NULL; ++ } + } + + for (i = 0; i < usr->num_groups; i++) { +@@ -1756,10 +1760,15 @@ + return False; + + if (UNMARSHALLING(ps)) { +- usr->other_sids = PRS_ALLOC_MEM(ps, DOM_SID2, usr->num_other_sids); +- usr->other_sids_attrib = +- PRS_ALLOC_MEM(ps, uint32, usr->num_other_sids); +- ++ if (usr->num_other_sids) { ++ usr->other_sids = PRS_ALLOC_MEM(ps, DOM_SID2, usr->num_other_sids); ++ usr->other_sids_attrib = ++ PRS_ALLOC_MEM(ps, uint32, usr->num_other_sids); ++ } else { ++ usr->other_sids = NULL; ++ usr->other_sids_attrib = NULL; ++ } ++ + if ((num_other_sids != 0) && + ((usr->other_sids == NULL) || + (usr->other_sids_attrib == NULL))) +diff -urN samba-3.0.24.orig/source/rpc_parse/parse_prs.c samba-3.0.24/source/rpc_parse/parse_prs.c +--- samba-3.0.24.orig/source/rpc_parse/parse_prs.c 2007-02-04 19:59:22.000000000 +0100 ++++ samba-3.0.24/source/rpc_parse/parse_prs.c 2007-08-07 09:38:18.000000000 +0200 +@@ -156,7 +156,7 @@ + { + char *ret = NULL; + +- if (size) { ++ if (size && count) { + /* We can't call the type-safe version here. */ + ret = _talloc_zero_array(ps->mem_ctx, size, count, "parse_prs"); + } +@@ -642,9 +642,13 @@ + return True; + + if (UNMARSHALLING(ps)) { +- if ( !(*data = PRS_ALLOC_MEM_VOID(ps, data_size)) ) +- return False; +- } ++ if (data_size) { ++ if ( !(*data = (void *)PRS_ALLOC_MEM(ps, char, data_size)) ) ++ return False; ++ } else { ++ *data = NULL; ++ } ++ } + + return prs_fn(name, ps, depth, *data); + } +@@ -789,8 +793,13 @@ + SIVAL(q,0,NT_STATUS_V(*status)); + } + +- DEBUG(5,("%s%04x %s: %s\n", tab_depth(depth), ps->data_offset, name, +- dcerpc_errstr(NT_STATUS_V(*status)))); ++ DEBUG(5,("%s%04x %s: %s\n", tab_depth(depth), ps->data_offset, name, ++#if 1 /* AVM */ ++ "ERRSTR-REPLACEMENT" ++#else ++ dcerpc_errstr(NT_STATUS_V(*status)) ++#endif ++ )); + + ps->data_offset += sizeof(uint32); + +@@ -1014,16 +1023,16 @@ + if (q == NULL) + return False; + ++ /* If the string is empty, we don't have anything to stream */ ++ if (str->buf_len==0) ++ return True; ++ + if (UNMARSHALLING(ps)) { + str->buffer = PRS_ALLOC_MEM(ps,uint16,str->buf_len); + if (str->buffer == NULL) + return False; + } + +- /* If the string is empty, we don't have anything to stream */ +- if (str->buf_len==0) +- return True; +- + p = (char *)str->buffer; + + dbg_rw_punival(charmode, name, depth, ps, q, p, str->buf_len); +@@ -1053,6 +1062,8 @@ + buf->buffer = PRS_ALLOC_MEM(ps, uint16, buf->buf_max_len); + if ( buf->buffer == NULL ) + return False; ++ } else { ++ buf->buffer = NULL; + } + } + +@@ -1080,9 +1091,13 @@ + if (str->str_str_len > str->str_max_len) { + return False; + } +- str->buffer = PRS_ALLOC_MEM(ps,unsigned char, str->str_max_len); +- if (str->buffer == NULL) +- return False; ++ if (str->str_max_len) { ++ str->buffer = PRS_ALLOC_MEM(ps,unsigned char, str->str_max_len); ++ if (str->buffer == NULL) ++ return False; ++ } else { ++ str->buffer = NULL; ++ } + } + + if (UNMARSHALLING(ps)) { +@@ -1127,9 +1142,13 @@ + if (str->uni_str_len > str->uni_max_len) { + return False; + } +- str->buffer = PRS_ALLOC_MEM(ps,uint16,str->uni_max_len); +- if (str->buffer == NULL) +- return False; ++ if (str->uni_max_len) { ++ str->buffer = PRS_ALLOC_MEM(ps,uint16,str->uni_max_len); ++ if (str->buffer == NULL) ++ return False; ++ } else { ++ str->buffer = NULL; ++ } + } + + p = (char *)str->buffer; +@@ -1154,9 +1173,13 @@ + return False; + + if (UNMARSHALLING(ps)) { +- str->str.buffer = PRS_ALLOC_MEM(ps,uint16,str->uni_str_len); +- if (str->str.buffer == NULL) +- return False; ++ if (str->uni_str_len) { ++ str->str.buffer = PRS_ALLOC_MEM(ps,uint16,str->uni_str_len); ++ if (str->str.buffer == NULL) ++ return False; ++ } else { ++ str->str.buffer = NULL; ++ } + } + + p = (char *)str->str.buffer; +diff -urN samba-3.0.24.orig/source/rpc_parse/parse_samr.c samba-3.0.24/source/rpc_parse/parse_samr.c +--- samba-3.0.24.orig/source/rpc_parse/parse_samr.c 2007-02-04 19:59:22.000000000 +0100 ++++ samba-3.0.24/source/rpc_parse/parse_samr.c 2007-08-07 09:38:18.000000000 +0200 +@@ -3337,7 +3337,7 @@ + if(!prs_uint32("num_entries3", ps, depth, &r_u->num_entries3)) + return False; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && r_u->num_entries2) { + r_u->sam = PRS_ALLOC_MEM(ps,SAM_ENTRY,r_u->num_entries2); + r_u->uni_dom_name = PRS_ALLOC_MEM(ps,UNISTR2,r_u->num_entries2); + } +@@ -3476,7 +3476,7 @@ + if(!prs_uint32("num_entries3", ps, depth, &r_u->num_entries3)) + return False; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && r_u->num_entries2) { + r_u->sam = PRS_ALLOC_MEM(ps,SAM_ENTRY,r_u->num_entries2); + r_u->uni_grp_name = PRS_ALLOC_MEM(ps,UNISTR2,r_u->num_entries2); + } +@@ -4980,12 +4980,13 @@ + return False; + } + +- if (UNMARSHALLING(ps)) ++ if (UNMARSHALLING(ps) && r_u->num_rids2) { + r_u->rids = PRS_ALLOC_MEM(ps, uint32, r_u->num_rids2); + +- if (!r_u->rids) { +- DEBUG(0, ("NULL rids in samr_io_r_lookup_names\n")); +- return False; ++ if (!r_u->rids) { ++ DEBUG(0, ("NULL rids in samr_io_r_lookup_names\n")); ++ return False; ++ } + } + + for (i = 0; i < r_u->num_rids2; i++) { +@@ -5009,12 +5010,13 @@ + return False; + } + +- if (UNMARSHALLING(ps)) ++ if (UNMARSHALLING(ps) && r_u->num_types2) { + r_u->types = PRS_ALLOC_MEM(ps, uint32, r_u->num_types2); + +- if (!r_u->types) { +- DEBUG(0, ("NULL types in samr_io_r_lookup_names\n")); +- return False; ++ if (!r_u->types) { ++ DEBUG(0, ("NULL types in samr_io_r_lookup_names\n")); ++ return False; ++ } + } + + for (i = 0; i < r_u->num_types2; i++) { +diff -urN samba-3.0.24.orig/source/rpc_parse/parse_sec.c samba-3.0.24/source/rpc_parse/parse_sec.c +--- samba-3.0.24.orig/source/rpc_parse/parse_sec.c 2005-04-18 18:38:20.000000000 +0200 ++++ samba-3.0.24/source/rpc_parse/parse_sec.c 2007-08-07 09:38:18.000000000 +0200 +@@ -122,7 +122,7 @@ + for you as it reads them. + ********************************************************************/ + +-BOOL sec_io_acl(const char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth) ++static BOOL sec_io_acl(const char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth) + { + unsigned int i; + uint32 old_offset; +@@ -165,13 +165,10 @@ + return False; + + if (UNMARSHALLING(ps)) { +- /* +- * Even if the num_aces is zero, allocate memory as there's a difference +- * between a non-present DACL (allow all access) and a DACL with no ACE's +- * (allow no access). +- */ +- if((psa->ace = PRS_ALLOC_MEM(ps, SEC_ACE, psa->num_aces+1)) == NULL) +- return False; ++ if (psa->num_aces) { ++ if((psa->ace = PRS_ALLOC_MEM(ps, SEC_ACE, psa->num_aces)) == NULL) ++ return False; ++ } + } + + for (i = 0; i < psa->num_aces; i++) { +diff -urN samba-3.0.24.orig/source/rpc_parse/parse_spoolss.c samba-3.0.24/source/rpc_parse/parse_spoolss.c +--- samba-3.0.24.orig/source/rpc_parse/parse_spoolss.c 2007-02-04 19:59:22.000000000 +0100 ++++ samba-3.0.24/source/rpc_parse/parse_spoolss.c 2007-08-07 09:38:18.000000000 +0200 +@@ -227,8 +227,13 @@ + if(!prs_uint32("count2", ps, depth, &type->count2)) + return False; + +- if (type->count2 != type->count) ++ if (type->count2 != type->count) { + DEBUG(4,("What a mess, count was %x now is %x !\n", type->count, type->count2)); ++ return False; ++ } ++ if (type->count2 > MAX_NOTIFY_TYPE_FOR_NOW) { ++ return False; ++ } + + /* parse the option type data */ + for(i=0;icount2;i++) +@@ -252,7 +257,7 @@ + return False; + + /* reading */ +- if (UNMARSHALLING(ps)) ++ if (UNMARSHALLING(ps) && ctr->count) + if((ctr->type=PRS_ALLOC_MEM(ps,SPOOL_NOTIFY_OPTION_TYPE,ctr->count)) == NULL) + return False; + +@@ -411,7 +416,7 @@ + if(!prs_uint32("string length", ps, depth, &data->notify_data.data.length)) + return False; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && data->notify_data.data.length) { + data->notify_data.data.string = PRS_ALLOC_MEM(ps, uint16, + data->notify_data.data.length); + +@@ -430,7 +435,7 @@ + + case NOTIFY_POINTER: + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && data->notify_data.data.length) { + data->notify_data.data.string = PRS_ALLOC_MEM(ps, uint16, + data->notify_data.data.length); + +@@ -490,9 +495,13 @@ + + /* Tallocate memory for string */ + +- data->notify_data.data.string = PRS_ALLOC_MEM(ps, uint16, x * 2); +- if (!data->notify_data.data.string) +- return False; ++ if (x) { ++ data->notify_data.data.string = PRS_ALLOC_MEM(ps, uint16, x * 2); ++ if (!data->notify_data.data.string) ++ return False; ++ } else { ++ data->notify_data.data.string = NULL; ++ } + + if(!prs_uint16uni(True,"string",ps,depth,data->notify_data.data.string,x)) + return False; +@@ -3893,7 +3902,16 @@ + } + case 3: + { +- ptr_sec_desc = q_u->info.info_3->secdesc_ptr; ++ /* FIXME ! Our parsing here is wrong I think, ++ * but for a level3 it makes no sense for ++ * ptr_sec_desc to be NULL. JRA. Based on ++ * a Vista sniff from Martin Zielinski . ++ */ ++ if (UNMARSHALLING(ps)) { ++ ptr_sec_desc = 1; ++ } else { ++ ptr_sec_desc = q_u->info.info_3->secdesc_ptr; ++ } + break; + } + } +@@ -5931,14 +5949,14 @@ + case REG_BINARY: + case REG_DWORD: + case REG_MULTI_SZ: +- if (q_u->max_len) { +- if (UNMARSHALLING(ps)) +- q_u->data=PRS_ALLOC_MEM(ps, uint8, q_u->max_len); +- if(q_u->data == NULL) +- return False; +- if(!prs_uint8s(False,"data", ps, depth, q_u->data, q_u->max_len)) +- return False; +- } ++ if (q_u->max_len) { ++ if (UNMARSHALLING(ps)) ++ q_u->data=PRS_ALLOC_MEM(ps, uint8, q_u->max_len); ++ if(q_u->data == NULL) ++ return False; ++ if(!prs_uint8s(False,"data", ps, depth, q_u->data, q_u->max_len)) ++ return False; ++ } + if(!prs_align(ps)) + return False; + break; +@@ -6956,7 +6974,7 @@ + + /* first loop to write basic enum_value information */ + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && ctr->size_of_array) { + ctr->values = PRS_ALLOC_MEM(ps, PRINTER_ENUM_VALUES, ctr->size_of_array); + if (!ctr->values) + return False; +diff -urN samba-3.0.24.orig/source/rpc_parse/parse_srv.c samba-3.0.24/source/rpc_parse/parse_srv.c +--- samba-3.0.24.orig/source/rpc_parse/parse_srv.c 2005-04-18 18:38:20.000000000 +0200 ++++ samba-3.0.24/source/rpc_parse/parse_srv.c 2007-08-07 09:38:18.000000000 +0200 +@@ -782,7 +782,7 @@ + int num_entries = ctr->num_entries; + int i; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && num_entries) { + if (!(info0 = PRS_ALLOC_MEM(ps, SRV_SHARE_INFO_0, num_entries))) + return False; + ctr->share.info0 = info0; +@@ -808,7 +808,7 @@ + int num_entries = ctr->num_entries; + int i; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && num_entries) { + if (!(info1 = PRS_ALLOC_MEM(ps, SRV_SHARE_INFO_1, num_entries))) + return False; + ctr->share.info1 = info1; +@@ -834,7 +834,7 @@ + int num_entries = ctr->num_entries; + int i; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && num_entries) { + if (!(info2 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_2,num_entries))) + return False; + ctr->share.info2 = info2; +@@ -859,7 +859,7 @@ + int num_entries = ctr->num_entries; + int i; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && num_entries) { + if (!(info501 = PRS_ALLOC_MEM(ps, SRV_SHARE_INFO_501, num_entries))) + return False; + ctr->share.info501 = info501; +@@ -884,7 +884,7 @@ + int num_entries = ctr->num_entries; + int i; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && num_entries) { + if (!(info502 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_502,num_entries))) + return False; + ctr->share.info502 = info502; +@@ -910,7 +910,7 @@ + int num_entries = ctr->num_entries; + int i; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && num_entries) { + if (!(info1004 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_1004,num_entries))) + return False; + ctr->share.info1004 = info1004; +@@ -936,7 +936,7 @@ + int num_entries = ctr->num_entries; + int i; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && num_entries) { + if (!(info1005 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_1005,num_entries))) + return False; + ctr->share.info1005 = info1005; +@@ -956,7 +956,7 @@ + int num_entries = ctr->num_entries; + int i; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && num_entries) { + if (!(info1006 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_1006,num_entries))) + return False; + ctr->share.info1006 = info1006; +@@ -976,7 +976,7 @@ + int num_entries = ctr->num_entries; + int i; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && num_entries) { + if (!(info1007 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_1007,num_entries))) + return False; + ctr->share.info1007 = info1007; +@@ -1002,7 +1002,7 @@ + int num_entries = ctr->num_entries; + int i; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && num_entries) { + if (!(info1501 = PRS_ALLOC_MEM(ps,SRV_SHARE_INFO_1501,num_entries))) + return False; + ctr->share.info1501 = info1501; +@@ -2558,7 +2558,7 @@ + int num_entries = ctr->num_entries; + int i; + +- if (UNMARSHALLING(ps)) { ++ if (UNMARSHALLING(ps) && num_entries) { + if (!(info3 = PRS_ALLOC_MEM(ps, SRV_FILE_INFO_3, num_entries))) + return False; + ctr->file.info3 = info3; +@@ -3377,7 +3377,7 @@ + + r_n->disk_enum_ctr.entries_read = entries_read3; + +- if(UNMARSHALLING(ps)) { ++ if(UNMARSHALLING(ps) && entries_read3) { + + DISK_INFO *dinfo; + +@@ -3386,7 +3386,7 @@ + r_n->disk_enum_ctr.disk_info = dinfo; + } + +- for(i=0; i < r_n->disk_enum_ctr.entries_read; i++) { ++ for(i=0; i < entries_read3; i++) { + + if(!prs_uint32("unknown", ps, depth, &r_n->disk_enum_ctr.disk_info[i].unknown)) + return False; +diff -urN samba-3.0.24.orig/source/rpc_server/srv_pipe.c samba-3.0.24/source/rpc_server/srv_pipe.c +--- samba-3.0.24.orig/source/rpc_server/srv_pipe.c 2007-02-04 19:59:21.000000000 +0100 ++++ samba-3.0.24/source/rpc_server/srv_pipe.c 2007-07-17 13:19:05.000000000 +0200 +@@ -2331,6 +2331,7 @@ + int n_cmds = 0; + + switch ( idx ) { ++#ifndef AVM_SMALLER + case PI_LSARPC: + lsa_get_pipe_fns( &cmds, &n_cmds ); + break; +@@ -2343,12 +2344,14 @@ + case PI_NETLOGON: + netlog_get_pipe_fns( &cmds, &n_cmds ); + break; ++#endif /* AVM_SMALLER */ + case PI_SRVSVC: + srvsvc_get_pipe_fns( &cmds, &n_cmds ); + break; + case PI_WKSSVC: + wkssvc_get_pipe_fns( &cmds, &n_cmds ); + break; ++#ifndef AVM_SMALLER + case PI_WINREG: + reg_get_pipe_fns( &cmds, &n_cmds ); + break; +@@ -2367,6 +2370,8 @@ + case PI_NTSVCS: + ntsvcs_get_pipe_fns( &cmds, &n_cmds ); + break; ++#endif /* AVM_SMALLER */ ++ + #ifdef DEVELOPER + case PI_ECHO: + echo_get_pipe_fns( &cmds, &n_cmds ); +diff -urN samba-3.0.24.orig/source/rpc_server/srv_spoolss.c samba-3.0.24/source/rpc_server/srv_spoolss.c +--- samba-3.0.24.orig/source/rpc_server/srv_spoolss.c 2006-04-20 04:29:27.000000000 +0200 ++++ samba-3.0.24/source/rpc_server/srv_spoolss.c 2007-08-07 09:38:18.000000000 +0200 +@@ -1477,6 +1477,15 @@ + ZERO_STRUCT(r_u); + + if(!spoolss_io_q_addprinterdriverex("", &q_u, data, 0)) { ++ if (q_u.level != 3 && q_u.level != 6) { ++ /* Clever hack from Martin Zielinski ++ * to allow downgrade from level 8 (Vista). ++ */ ++ DEBUG(3,("api_spoolss_addprinterdriverex: unknown SPOOL_Q_ADDPRINTERDRIVEREX level %u.\n", ++ (unsigned int)q_u.level )); ++ setup_fault_pdu(p, NT_STATUS(DCERPC_FAULT_INVALID_TAG)); ++ return True; ++ } + DEBUG(0,("spoolss_io_q_addprinterdriverex: unable to unmarshall SPOOL_Q_ADDPRINTERDRIVEREX.\n")); + return False; + } +diff -urN samba-3.0.24.orig/source/rpc_server/srv_spoolss_nt.c samba-3.0.24/source/rpc_server/srv_spoolss_nt.c +--- samba-3.0.24.orig/source/rpc_server/srv_spoolss_nt.c 2007-02-04 19:59:21.000000000 +0100 ++++ samba-3.0.24/source/rpc_server/srv_spoolss_nt.c 2007-08-07 09:38:18.000000000 +0200 +@@ -5848,6 +5848,12 @@ + goto done; + } + ++ if (!secdesc_ctr) { ++ DEBUG(10,("update_printer_sec: secdesc_ctr is NULL !\n")); ++ result = WERR_INVALID_PARAM; ++ goto done; ++ } ++ + /* Check the user has permissions to change the security + descriptor. By experimentation with two NT machines, the user + requires Full Access to the printer to change security +@@ -9378,6 +9384,15 @@ + + /* housekeeping information in the reply */ + ++ /* Fix from Martin Zielinski - ensure ++ * the hand marshalled container size is a multiple ++ * of 4 bytes for RPC alignment. ++ */ ++ ++ if (needed % 4) { ++ needed += 4-(needed % 4); ++ } ++ + r_u->needed = needed; + r_u->returned = num_entries; + +diff -urN samba-3.0.24.orig/source/smbd/change_trust_pw.c samba-3.0.24/source/smbd/change_trust_pw.c +--- samba-3.0.24.orig/source/smbd/change_trust_pw.c 2005-10-18 04:44:56.000000000 +0200 ++++ samba-3.0.24/source/smbd/change_trust_pw.c 2007-07-17 13:19:05.000000000 +0200 +@@ -30,6 +30,10 @@ + + NTSTATUS change_trust_account_password( const char *domain, const char *remote_machine) + { ++#ifdef AVM_SMALLER ++ return NT_STATUS_UNSUCCESSFUL; ++#else ++ + NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; + struct in_addr pdc_ip; + fstring dc_name; +@@ -95,4 +99,5 @@ + DEBUG(5,("change_trust_account_password: sucess!\n")); + + return nt_status; ++#endif /* AVM_SMALLER */ + } +diff -urN samba-3.0.24.orig/source/smbd/close.c samba-3.0.24/source/smbd/close.c +--- samba-3.0.24.orig/source/smbd/close.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/close.c 2007-07-17 13:19:05.000000000 +0200 +@@ -295,7 +295,9 @@ + } + + if (fsp->print_file) { ++#ifndef AVM_NO_PRINTING + print_fsp_end(fsp, close_type); ++#endif + file_free(fsp); + return 0; + } +diff -urN samba-3.0.24.orig/source/smbd/conn.c samba-3.0.24/source/smbd/conn.c +--- samba-3.0.24.orig/source/smbd/conn.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/conn.c 2007-07-17 13:19:05.000000000 +0200 +@@ -205,10 +205,13 @@ + * idle with a handle open. + */ + ++ ++#ifndef AVM_SMALLER + for (plist = get_first_internal_pipe(); plist; plist = get_next_internal_pipe(plist)) + if (plist->pipe_handles && plist->pipe_handles->count) + allidle = False; +- ++#endif ++ + return allidle; + } + +diff -urN samba-3.0.24.orig/source/smbd/dfree.c samba-3.0.24/source/smbd/dfree.c +--- samba-3.0.24.orig/source/smbd/dfree.c 2005-11-09 19:28:55.000000000 +0100 ++++ samba-3.0.24/source/smbd/dfree.c 2007-07-17 13:19:05.000000000 +0200 +@@ -130,11 +130,13 @@ + } + } + ++#if 0 /* AR7 */ + if (disk_quotas(path, &bsize_q, &dfree_q, &dsize_q)) { + (*bsize) = bsize_q; + (*dfree) = MIN(*dfree,dfree_q); + (*dsize) = MIN(*dsize,dsize_q); + } ++#endif + + /* FIXME : Any reason for this assumption ? */ + if (*bsize < 256) { +diff -urN samba-3.0.24.orig/source/smbd/dir.c samba-3.0.24/source/smbd/dir.c +--- samba-3.0.24.orig/source/smbd/dir.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/dir.c 2007-08-07 09:38:18.000000000 +0200 +@@ -1255,3 +1255,42 @@ + } + return False; + } ++ ++/***************************************************************** ++ Is this directory empty ? ++*****************************************************************/ ++ ++NTSTATUS can_delete_directory(struct connection_struct *conn, ++ const char *dirname) ++{ ++ NTSTATUS status = NT_STATUS_OK; ++ long dirpos = 0; ++ const char *dname; ++ struct smb_Dir *dir_hnd = OpenDir(conn, dirname, NULL, 0); ++ ++ if (!dir_hnd) { ++ return map_nt_error_from_unix(errno); ++ } ++ ++ while ((dname = ReadDirName(dir_hnd,&dirpos))) { ++ SMB_STRUCT_STAT st; ++ ++ /* Quick check for "." and ".." */ ++ if (dname[0] == '.') { ++ if (!dname[1] || (dname[1] == '.' && !dname[2])) { ++ continue; ++ } ++ } ++ ++ if (!is_visible_file(conn, dirname, dname, &st, True)) { ++ continue; ++ } ++ ++ DEBUG(10,("can_delete_directory: got name %s - can't delete\n", dname )); ++ status = NT_STATUS_DIRECTORY_NOT_EMPTY; ++ break; ++ } ++ CloseDir(dir_hnd); ++ ++ return status; ++} +diff -urN samba-3.0.24.orig/source/smbd/dosmode.c samba-3.0.24/source/smbd/dosmode.c +--- samba-3.0.24.orig/source/smbd/dosmode.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/dosmode.c 2007-07-17 13:19:05.000000000 +0200 +@@ -48,12 +48,15 @@ + if (ISDOT(path) || ISDOTDOT(path)) { + return 0; + } +- ++#ifdef AVM_SMALLER ++ return 0; ++#else + if (!lp_dmapi_support(SNUM(conn)) || !dmapi_have_session()) { + return 0; + } + + return dmapi_file_flags(path); ++#endif + } + + /**************************************************************************** +diff -urN samba-3.0.24.orig/source/smbd/fileio.c samba-3.0.24/source/smbd/fileio.c +--- samba-3.0.24.orig/source/smbd/fileio.c 2005-10-18 04:44:57.000000000 +0200 ++++ samba-3.0.24/source/smbd/fileio.c 2007-08-07 09:38:18.000000000 +0200 +@@ -176,6 +176,8 @@ + + static int wcp_file_size_change(files_struct *fsp) + { ++/* AVM: Fuer Pruefung des freien Speichers auf dem Datentraeger wird ++ SMB_VFS_FTRUNCATE aufgerufen, auch falls es langsam sein sollte */ + int ret; + write_cache *wcp = fsp->wcp; + +@@ -199,6 +201,10 @@ + int write_path = -1; + + if (fsp->print_file) { ++#ifdef AVM_NO_PRINTING ++ errno = EBADF; ++ return -1; ++#else + fstring sharename; + uint32 jobid; + +@@ -210,6 +216,7 @@ + } + + return print_job_write(SNUM(fsp->conn), jobid, data, pos, n); ++#endif /* AVM_NO_PRINTING */ + } + + if (!fsp->can_write) { +diff -urN samba-3.0.24.orig/source/smbd/files.c samba-3.0.24/source/smbd/files.c +--- samba-3.0.24.orig/source/smbd/files.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/files.c 2007-07-17 13:19:05.000000000 +0200 +@@ -203,10 +203,12 @@ + exit_server("out of memory in file_init"); + } + ++#ifndef AVM_SMALLER + /* + * Ensure that pipe_handle_oppset is set correctly. + */ + set_pipe_handle_offset(real_max_open_files); ++#endif + } + + /**************************************************************************** +diff -urN samba-3.0.24.orig/source/smbd/lanman.c samba-3.0.24/source/smbd/lanman.c +--- samba-3.0.24.orig/source/smbd/lanman.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/lanman.c 2007-07-17 13:19:05.000000000 +0200 +@@ -378,6 +378,7 @@ + PACK(desc,t,v); + } + ++#ifndef AVM_NO_PRINTING + /**************************************************************************** + Get a print queue. + ****************************************************************************/ +@@ -753,6 +754,7 @@ + + return result; + } ++#endif /* AVM_NO_PRINTING */ + + static BOOL api_DosPrintQGetInfo(connection_struct *conn, + uint16 vuid, char *param,char *data, +@@ -760,6 +762,9 @@ + char **rdata,char **rparam, + int *rdata_len,int *rparam_len) + { ++#ifdef AVM_NO_PRINTING ++return False; ++#else + char *str1 = param+2; + char *str2 = skip_string(str1,1); + char *p = skip_string(str2,1); +@@ -865,6 +870,7 @@ + SAFE_FREE(tmpdata); + + return(True); ++#endif /* AVM_NO_PRINTING */ + } + + /**************************************************************************** +@@ -876,6 +882,9 @@ + char **rdata, char** rparam, + int *rdata_len, int *rparam_len) + { ++#ifdef AVM_NO_PRINTING ++return False; ++#else + char *param_format = param+2; + char *output_format1 = skip_string(param_format,1); + char *p = skip_string(output_format1,1); +@@ -1004,6 +1013,7 @@ + SAFE_FREE(status); + + return False; ++#endif /* AVM_NO_PRINTING */ + } + + /**************************************************************************** +@@ -2378,6 +2388,9 @@ + char **rdata,char **rparam, + int *rdata_len,int *rparam_len) + { ++#ifdef AVM_NO_PRINTING ++return False; ++#else + int function = SVAL(param,0); + char *str1 = param+2; + char *str2 = skip_string(str1,1); +@@ -2438,6 +2451,7 @@ + SSVAL(*rparam,2,0); /* converter word */ + + return(True); ++#endif + } + + /**************************************************************************** +@@ -2449,6 +2463,9 @@ + char **rdata,char **rparam, + int *rdata_len,int *rparam_len) + { ++#ifdef AVM_NO_PRINTING ++return False; ++#else + int function = SVAL(param,0); + char *str1 = param+2; + char *str2 = skip_string(str1,1); +@@ -2494,6 +2511,7 @@ + SSVAL(*rparam,2,0); /* converter word */ + + return(True); ++#endif + } + + /**************************************************************************** +@@ -2525,6 +2543,9 @@ + char **rdata,char **rparam, + int *rdata_len,int *rparam_len) + { ++#ifdef AVM_NO_PRINTING ++return False; ++#else + struct pack_desc desc; + char *str1 = param+2; + char *str2 = skip_string(str1,1); +@@ -2590,6 +2611,7 @@ + SSVAL(*rparam,2,0); /* converter word */ + + return(True); ++#endif + } + + +@@ -3272,6 +3294,9 @@ + char **rdata,char **rparam, + int *rdata_len,int *rparam_len) + { ++#ifdef AVM_NO_PRINTING ++return False; ++#else + char *str1 = param+2; + char *str2 = skip_string(str1,1); + char *p = skip_string(str2,1); +@@ -3358,6 +3383,7 @@ + DEBUG(4,("WPrintJobGetInfo: errorcode %d\n",desc.errcode)); + + return True; ++#endif + } + + static BOOL api_WPrintJobEnumerate(connection_struct *conn,uint16 vuid, char *param,char *data, +@@ -3365,6 +3391,9 @@ + char **rdata,char **rparam, + int *rdata_len,int *rparam_len) + { ++#ifdef AVM_NO_PRINTING ++return False; ++#else + char *str1 = param+2; + char *str2 = skip_string(str1,1); + char *p = skip_string(str2,1); +@@ -3440,6 +3469,7 @@ + DEBUG(4,("WPrintJobEnumerate: errorcode %d\n",desc.errcode)); + + return True; ++#endif + } + + static int check_printdest_info(struct pack_desc* desc, +@@ -3509,6 +3539,9 @@ + char **rdata,char **rparam, + int *rdata_len,int *rparam_len) + { ++#ifdef AVM_NO_PRINTING ++return False; ++#else + char *str1 = param+2; + char *str2 = skip_string(str1,1); + char *p = skip_string(str2,1); +@@ -3573,6 +3606,7 @@ + SAFE_FREE(tmpdata); + + return True; ++#endif + } + + static BOOL api_WPrintDestEnum(connection_struct *conn,uint16 vuid, char *param,char *data, +@@ -3580,6 +3614,9 @@ + char **rdata,char **rparam, + int *rdata_len,int *rparam_len) + { ++#ifdef AVM_NO_PRINTING ++return False; ++#else + char *str1 = param+2; + char *str2 = skip_string(str1,1); + char *p = skip_string(str2,1); +@@ -3648,6 +3685,7 @@ + DEBUG(4,("WPrintDestEnumerate: errorcode %d\n",desc.errcode)); + + return True; ++#endif + } + + static BOOL api_WPrintDriverEnum(connection_struct *conn,uint16 vuid, char *param,char *data, +@@ -3655,6 +3693,9 @@ + char **rdata,char **rparam, + int *rdata_len,int *rparam_len) + { ++#ifdef AVM_NO_PRINTING ++return False; ++#else + char *str1 = param+2; + char *str2 = skip_string(str1,1); + char *p = skip_string(str2,1); +@@ -3705,6 +3746,7 @@ + DEBUG(4,("WPrintDriverEnum: errorcode %d\n",desc.errcode)); + + return True; ++#endif + } + + static BOOL api_WPrintQProcEnum(connection_struct *conn,uint16 vuid, char *param,char *data, +@@ -3712,6 +3754,9 @@ + char **rdata,char **rparam, + int *rdata_len,int *rparam_len) + { ++#ifdef AVM_NO_PRINTING ++return False; ++#else + char *str1 = param+2; + char *str2 = skip_string(str1,1); + char *p = skip_string(str2,1); +@@ -3763,6 +3808,7 @@ + DEBUG(4,("WPrintQProcEnum: errorcode %d\n",desc.errcode)); + + return True; ++#endif + } + + static BOOL api_WPrintPortEnum(connection_struct *conn,uint16 vuid, char *param,char *data, +@@ -3770,6 +3816,9 @@ + char **rdata,char **rparam, + int *rdata_len,int *rparam_len) + { ++#ifdef AVM_NO_PRINTING ++return False; ++#else + char *str1 = param+2; + char *str2 = skip_string(str1,1); + char *p = skip_string(str2,1); +@@ -3822,6 +3871,7 @@ + DEBUG(4,("WPrintPortEnum: errorcode %d\n",desc.errcode)); + + return True; ++#endif + } + + +diff -urN samba-3.0.24.orig/source/smbd/msdfs.c samba-3.0.24/source/smbd/msdfs.c +--- samba-3.0.24.orig/source/smbd/msdfs.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/msdfs.c 2007-08-07 09:38:18.000000000 +0200 +@@ -832,9 +832,13 @@ + + /* create the referral depeding on version */ + DEBUG(10,("max_referral_level :%d\n",max_referral_level)); +- if(max_referral_level<2 || max_referral_level>3) { ++ ++ if (max_referral_level < 2) { + max_referral_level = 2; + } ++ if (max_referral_level > 3) { ++ max_referral_level = 3; ++ } + + switch(max_referral_level) { + case 2: +diff -urN samba-3.0.24.orig/source/smbd/negprot.c samba-3.0.24/source/smbd/negprot.c +--- samba-3.0.24.orig/source/smbd/negprot.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/negprot.c 2007-08-07 09:38:18.000000000 +0200 +@@ -263,6 +263,16 @@ + + global_encrypted_passwords_negotiated = lp_encrypted_passwords(); + ++ /* Check the flags field to see if this is Vista. ++ WinXP sets it and Vista does not. But we have to ++ distinguish from NT which doesn't set it either. */ ++ ++ if ( (SVAL(inbuf, smb_flg2) & FLAGS2_EXTENDED_SECURITY) && ++ ((SVAL(inbuf, smb_flg2) & FLAGS2_UNKNOWN_BIT4) == 0) ) ++ { ++ set_remote_arch( RA_VISTA ); ++ } ++ + /* do spnego in user level security if the client + supports it and we can do encrypted passwords */ + +@@ -393,6 +403,15 @@ + protocol [LANMAN2.1] + protocol [NT LM 0.12] + ++Vista: ++protocol [PC NETWORK PROGRAM 1.0] ++protocol [LANMAN1.0] ++protocol [Windows for Workgroups 3.1a] ++protocol [LM1.2X002] ++protocol [LANMAN2.1] ++protocol [NT LM 0.12] ++protocol [SMB 2.001] ++ + OS/2: + protocol [PC NETWORK PROGRAM 1.0] + protocol [XENIX CORE] +@@ -406,18 +425,19 @@ + * + * This appears to be the matrix of which protocol is used by which + * MS product. +- Protocol WfWg Win95 WinNT Win2K OS/2 +- PC NETWORK PROGRAM 1.0 1 1 1 1 1 ++ Protocol WfWg Win95 WinNT Win2K OS/2 Vista ++ PC NETWORK PROGRAM 1.0 1 1 1 1 1 1 + XENIX CORE 2 2 + MICROSOFT NETWORKS 3.0 2 2 + DOS LM1.2X002 3 3 + MICROSOFT NETWORKS 1.03 3 + DOS LANMAN2.1 4 4 +- LANMAN1.0 4 2 3 +- Windows for Workgroups 3.1a 5 5 5 3 +- LM1.2X002 6 4 4 +- LANMAN2.1 7 5 5 +- NT LM 0.12 6 8 6 ++ LANMAN1.0 4 2 3 2 ++ Windows for Workgroups 3.1a 5 5 5 3 3 ++ LM1.2X002 6 4 4 4 ++ LANMAN2.1 7 5 5 5 ++ NT LM 0.12 6 8 6 6 ++ SMB 2.001 7 + * + * tim@fsg.com 09/29/95 + * Win2K added by matty 17/7/99 +@@ -430,6 +450,7 @@ + #define ARCH_OS2 0x14 /* Again OS/2 is like NT */ + #define ARCH_SAMBA 0x20 + #define ARCH_CIFSFS 0x40 ++#define ARCH_VISTA 0x8C /* Vista is like XP/2K */ + + #define ARCH_ALL 0x7F + +@@ -493,6 +514,8 @@ + arch &= ( ARCH_WFWG | ARCH_WIN95 ); + else if (strcsequal(p,"NT LM 0.12")) + arch &= ( ARCH_WIN95 | ARCH_WINNT | ARCH_WIN2K | ARCH_CIFSFS); ++ else if (strcsequal(p,"SMB 2.001")) ++ arch = ARCH_VISTA; + else if (strcsequal(p,"LANMAN2.1")) + arch &= ( ARCH_WINNT | ARCH_WIN2K | ARCH_OS2 ); + else if (strcsequal(p,"LM1.2X002")) +@@ -537,7 +560,13 @@ + set_remote_arch(RA_WINNT); + break; + case ARCH_WIN2K: +- set_remote_arch(RA_WIN2K); ++ /* Vista may have been set in the negprot so don't ++ override it here */ ++ if ( get_remote_arch() != RA_VISTA ) ++ set_remote_arch(RA_WIN2K); ++ break; ++ case ARCH_VISTA: ++ set_remote_arch(RA_VISTA); + break; + case ARCH_OS2: + set_remote_arch(RA_OS2); +diff -urN samba-3.0.24.orig/source/smbd/open.c samba-3.0.24/source/smbd/open.c +--- samba-3.0.24.orig/source/smbd/open.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/open.c 2007-07-17 13:19:05.000000000 +0200 +@@ -1127,8 +1127,11 @@ + } + + DEBUG(10, ("open_file_ntcreate: printer open fname=%s\n", fname)); +- ++#ifdef AVM_NO_PRINTING ++ return NULL; ++#else + return print_fsp_open(conn, fname); ++#endif + } + + /* We add aARCH to this as this mode is only used if the file is +diff -urN samba-3.0.24.orig/source/smbd/password.c samba-3.0.24/source/smbd/password.c +--- samba-3.0.24.orig/source/smbd/password.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/password.c 2007-07-17 13:19:05.000000000 +0200 +@@ -23,6 +23,8 @@ + /* users from session setup */ + static char *session_userlist = NULL; + static int len_session_userlist = 0; ++/* workgroup from session setup. */ ++static char *session_workgroup = NULL; + + /* this holds info on user ids that are already validated for this VC */ + static user_struct *validated_users; +@@ -406,6 +408,29 @@ + } + + /**************************************************************************** ++ In security=share mode we need to store the client workgroup, as that's ++ what Vista uses for the NTLMv2 calculation. ++****************************************************************************/ ++ ++void add_session_workgroup(const char *workgroup) ++{ ++ if (session_workgroup) { ++ SAFE_FREE(session_workgroup); ++ } ++ session_workgroup = smb_xstrdup(workgroup); ++} ++ ++/**************************************************************************** ++ In security=share mode we need to return the client workgroup, as that's ++ what Vista uses for the NTLMv2 calculation. ++****************************************************************************/ ++ ++const char *get_session_workgroup(void) ++{ ++ return session_workgroup; ++} ++ ++/**************************************************************************** + Check if a user is in a netgroup user list. If at first we don't succeed, + try lower case. + ****************************************************************************/ +diff -urN samba-3.0.24.orig/source/smbd/posix_acls.c samba-3.0.24/source/smbd/posix_acls.c +--- samba-3.0.24.orig/source/smbd/posix_acls.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/posix_acls.c 2007-08-07 09:38:18.000000000 +0200 +@@ -655,6 +655,7 @@ + } + return 0; + } ++ + /**************************************************************************** + Function to create owner and group SIDs from a SMB_STRUCT_STAT. + ****************************************************************************/ +@@ -666,6 +667,27 @@ + } + + /**************************************************************************** ++ Is the identity in two ACEs equal ? Check both SID and uid/gid. ++****************************************************************************/ ++ ++static BOOL identity_in_ace_equal(canon_ace *ace1, canon_ace *ace2) ++{ ++ if (sid_equal(&ace1->trustee, &ace2->trustee)) { ++ return True; ++ } ++ if (ace1->owner_type == ace2->owner_type) { ++ if (ace1->owner_type == UID_ACE && ++ ace1->unix_ug.uid == ace2->unix_ug.uid) { ++ return True; ++ } else if (ace1->owner_type == GID_ACE && ++ ace1->unix_ug.gid == ace2->unix_ug.gid) { ++ return True; ++ } ++ } ++ return False; ++} ++ ++/**************************************************************************** + Merge aces with a common sid - if both are allow or deny, OR the permissions together and + delete the second one. If the first is deny, mask the permissions off and delete the allow + if the permissions become zero, delete the deny if the permissions are non zero. +@@ -692,7 +714,7 @@ + + curr_ace_next = curr_ace->next; /* Save the link in case of delete. */ + +- if (sid_equal(&curr_ace->trustee, &curr_ace_outer->trustee) && ++ if (identity_in_ace_equal(curr_ace, curr_ace_outer) && + (curr_ace->attr == curr_ace_outer->attr)) { + + if( DEBUGLVL( 10 )) { +@@ -732,7 +754,7 @@ + * we've put on the ACL, we know the deny must be the first one. + */ + +- if (sid_equal(&curr_ace->trustee, &curr_ace_outer->trustee) && ++ if (identity_in_ace_equal(curr_ace, curr_ace_outer) && + (curr_ace_outer->attr == DENY_ACE) && (curr_ace->attr == ALLOW_ACE)) { + + if( DEBUGLVL( 10 )) { +diff -urN samba-3.0.24.orig/source/smbd/process.c samba-3.0.24/source/smbd/process.c +--- samba-3.0.24.orig/source/smbd/process.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/process.c 2007-07-17 13:19:05.000000000 +0200 +@@ -1008,7 +1008,9 @@ + + chain_size = 0; + file_chain_reset(); ++#ifndef AVM_SMALLER + reset_chain_p(); ++#endif + + if (msg_type != 0) + return(reply_special(inbuf,outbuf)); +@@ -1285,8 +1287,10 @@ + if (t != -1) + select_timeout = MIN(select_timeout, t*1000); + ++#ifndef AVM_NO_PRINTING + if (print_notify_messages_pending()) + select_timeout = MIN(select_timeout, 1000); ++#endif + + return select_timeout; + } +@@ -1477,10 +1481,11 @@ + */ + process_blocking_lock_queue(t); + ++#ifndef AVM_NO_PRINTING + /* update printer queue caches if necessary */ +- + update_monitored_printq_cache(); +- ++#endif ++ + /* + * Check to see if we have any change notifies + * outstanding on the queue. +@@ -1494,9 +1499,10 @@ + force_check_log_size(); + check_log_size(); + ++#ifndef AVM_NO_PRINTING + /* Send any queued printer notify message to interested smbd's. */ +- + print_notify_send_messages(0); ++#endif + + /* + * Modify the select timeout depending upon +diff -urN samba-3.0.24.orig/source/smbd/reply.c samba-3.0.24/source/smbd/reply.c +--- samba-3.0.24.orig/source/smbd/reply.c 2007-02-04 20:09:01.000000000 +0100 ++++ samba-3.0.24/source/smbd/reply.c 2007-07-17 13:19:05.000000000 +0200 +@@ -3599,7 +3599,10 @@ + int outsize = 0; + files_struct *fsp; + START_PROFILE(SMBsplopen); +- ++#ifdef AVM_NO_PRINTING ++ END_PROFILE(SMBsplopen); ++ return ERROR_DOS(ERRDOS,ERRnoaccess); ++#else + if (!CAN_PRINT(conn)) { + END_PROFILE(SMBsplopen); + return ERROR_DOS(ERRDOS,ERRnoaccess); +@@ -3621,6 +3624,7 @@ + + END_PROFILE(SMBsplopen); + return(outsize); ++#endif + } + + /**************************************************************************** +@@ -3637,6 +3641,10 @@ + + CHECK_FSP(fsp,conn); + ++#ifdef AVM_NO_PRINTING ++ END_PROFILE(SMBsplretq); ++ return ERROR_DOS(ERRDOS,ERRnoaccess); ++#else + if (!CAN_PRINT(conn)) { + END_PROFILE(SMBsplclose); + return ERROR_NT(NT_STATUS_UNSUCCESSFUL); +@@ -3655,6 +3663,7 @@ + + END_PROFILE(SMBsplclose); + return(outsize); ++#endif + } + + /**************************************************************************** +@@ -3664,6 +3673,10 @@ + int reply_printqueue(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, int dum_buffsize) + { ++#ifdef AVM_NO_PRINTING ++ END_PROFILE(SMBsplretq); ++ return ERROR_DOS(ERRDOS,ERRnoaccess); ++#else + int outsize = set_message(outbuf,2,3,True); + int max_count = SVAL(inbuf,smb_vwv0); + int start_index = SVAL(inbuf,smb_vwv1); +@@ -3726,6 +3739,7 @@ + + END_PROFILE(SMBsplretq); + return(outsize); ++#endif + } + + /**************************************************************************** +diff -urN samba-3.0.24.orig/source/smbd/server.c samba-3.0.24/source/smbd/server.c +--- samba-3.0.24.orig/source/smbd/server.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/server.c 2008-02-28 11:21:14.000000000 +0100 +@@ -22,7 +22,7 @@ + + #include "includes.h" + +-static_decl_rpc; ++/* AR7 ???? static_decl_rpc; */ + + static int am_parent = 1; + +@@ -41,6 +41,41 @@ + extern int dcelogin_atmost_once; + #endif /* WITH_DFS */ + ++ ++ ++#ifdef SAMBA_DEBUG ++void _fLog(char *fmt, ...) ++{ ++ va_list va; ++ FILE *fp = fopen("/var/tmp/smbd.log", "a"); ++ time_t t = time(0); /* LOG */ ++ ++ if (!fp) return; ++ ++ fprintf(fp, " [%d] %02u:%02u ", getpid(), (t / 60) % 60, t % 60); ++ va_start(va, fmt); ++ vfprintf(fp, fmt, va); ++ va_end(va); ++ fprintf(fp, "\n"); ++ fclose(fp); ++} ++ ++void _fDebug(char *fmt, ...) ++{ ++ va_list va; ++ FILE *fp = fopen("/var/tmp/smbd.log", "a"); ++ time_t t = time(0); /* LOG */ ++ ++ if (!fp) return; ++ ++ fprintf(fp, " [%d] %02u:%02u ", getpid(), (t / 60) % 60, t % 60); ++ va_start(va, fmt); ++ vfprintf(fp, fmt, va); ++ va_end(va); ++ fclose(fp); ++} ++#endif ++ + /* really we should have a top level context structure that has the + client file descriptor as an element. That would require a major rewrite :( + +@@ -523,6 +558,7 @@ + **************************************************************************/ + void reload_printers(void) + { ++#ifndef AVM_NO_PRINTING + int snum; + int n_services = lp_numservices(); + int pnum = lp_servicenumber(PRINTERS_NAME); +@@ -549,6 +585,7 @@ + } + + load_printers(); ++#endif /* AVM_NO_PRINTING */ + } + + /**************************************************************************** +@@ -631,7 +668,9 @@ + + invalidate_all_vuids(); + ++#ifndef AVM_NO_PRINTING + print_notify_send_messages(3); /* 3 second timeout. */ ++#endif + + /* delete our entry in the connections database. */ + yield_connection(NULL,""); +@@ -646,7 +685,9 @@ + #endif + + locking_end(); ++#ifndef AVM_NO_PRINTING + printing_end(); ++#endif + + if (how != SERVER_EXIT_NORMAL) { + int oldlevel = DEBUGLEVEL; +@@ -729,7 +770,9 @@ + mkproto.h. Mixing $(builddir) and $(srcdir) source files in the current + prototype generation system is too complicated. */ + ++#if 0 /* AR7 */ + void build_options(BOOL screen); ++#endif + + int main(int argc,const char *argv[]) + { +@@ -741,6 +784,13 @@ + static BOOL log_stdout = False; + static char *ports = NULL; + int opt; ++ ++#if 0 // AVM DEBUG ++ extern void crashdump_init(char*); ++ crashdump_init("smbd"); ++#endif ++ ++#ifndef AVM_NO_POPT + poptContext pc; + + struct poptOption long_options[] = { +@@ -750,7 +800,9 @@ + {"foreground", 'F', POPT_ARG_VAL, &Fork, False, "Run daemon in foreground (for daemontools, etc.)" }, + {"no-process-group", '\0', POPT_ARG_VAL, &no_process_group, True, "Don't create a new process group" }, + {"log-stdout", 'S', POPT_ARG_VAL, &log_stdout, True, "Log to stdout" }, ++#if 0 /* AR7 */ + {"build-options", 'b', POPT_ARG_NONE, NULL, 'b', "Print build options" }, ++#endif + {"port", 'p', POPT_ARG_STRING, &ports, 0, "Listen on the specified ports"}, + POPT_COMMON_SAMBA + POPT_COMMON_DYNCONFIG +@@ -766,21 +818,31 @@ + pc = poptGetContext("smbd", argc, argv, long_options, 0); + + while((opt = poptGetNextOpt(pc)) != -1) { ++#if 0 /* AR7 */ + switch (opt) { + case 'b': + build_options(True); /* Display output to screen as well as debug */ + exit(0); + break; + } ++#endif + } + + poptFreeContext(pc); ++#else ++ load_case_tables(); ++#endif /* AVM_NO_POPT */ ++ + + #ifdef HAVE_SETLUID + /* needed for SecureWare on SCO */ + setluid(0); + #endif + ++#if 1 /* AVM */ ++ setpriority(PRIO_PROCESS, 0, 19); /* be nice */ ++#endif ++ + sec_init(); + + set_remote_machine_name("smbd", False); +@@ -808,6 +870,16 @@ + /* make absolutely sure we run as root - to handle cases where people + are crazy enough to have it setuid */ + ++ generate_random_buffer(NULL, 0); ++ ++ /* make absolutely sure we run as root - to handle cases where people ++ are crazy enough to have it setuid */ ++ ++ gain_root_privilege(); ++ gain_root_group_privilege(); ++ ++ fault_setup((void (*)(void *))exit_server_fault); ++ dump_core_setup("smbd"); + gain_root_privilege(); + gain_root_group_privilege(); + +@@ -850,8 +922,10 @@ + DEBUG(2,("uid=%d gid=%d euid=%d egid=%d\n", + (int)getuid(),(int)getgid(),(int)geteuid(),(int)getegid())); + ++#if 0 /* AR7 */ + /* Output the build options to the debug log */ + build_options(False); ++#endif + + if (sizeof(uint16) < 2 || sizeof(uint32) < 4) { + DEBUG(0,("ERROR: Samba is not configured correctly for the word size on your machine\n")); +@@ -945,16 +1019,20 @@ + + namecache_enable(); + ++#ifndef AVM_SMALLER + if (!init_registry()) + exit(1); ++#endif + + #if 0 + if (!init_svcctl_db()) + exit(1); + #endif + ++#ifndef AVM_NO_PRINTING + if (!print_backend_init()) + exit(1); ++#endif + + if (!init_guest_info()) { + DEBUG(0,("ERROR: failed to setup guest info.\n")); +@@ -971,14 +1049,18 @@ + smbd is launched via inetd and we fork a copy of + ourselves here */ + ++#ifndef AVM_NO_PRINTING + if ( is_daemon && !interactive ) + start_background_queue(); ++#endif + ++#if 0 /* AVM */ + /* Always attempt to initialize DMAPI. We will only use it later if + * lp_dmapi_support is set on the share, but we need a single global + * session to work with. + */ + dmapi_init_session(); ++#endif + + if (!open_sockets_smbd(is_daemon, interactive, ports)) + exit(1); +@@ -987,7 +1069,12 @@ + * everything after this point is run after the fork() + */ + ++#if 0 /* AR7 */ + static_init_rpc; ++#else ++ rpc_wks_init(); ++ rpc_srv_init(); ++#endif + + init_modules(); + +diff -urN samba-3.0.24.orig/source/smbd/service.c samba-3.0.24/source/smbd/service.c +--- samba-3.0.24.orig/source/smbd/service.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/service.c 2007-07-17 13:19:05.000000000 +0200 +@@ -254,6 +254,7 @@ + iService = add_home_service(service,service /* 'username' */, phome_dir); + } + ++#ifndef AVM_NO_PRINTING + /* If we still don't have a service, attempt to add it as a printer. */ + if (iService < 0) { + int iPrinterService; +@@ -273,6 +274,7 @@ + } + } + } ++#endif /* AVM_NO_PRINTING */ + + /* Check for default vfs service? Unsure whether to implement this */ + if (iService < 0) { +@@ -1136,7 +1138,9 @@ + void close_cnum(connection_struct *conn, uint16 vuid) + { + if (IS_IPC(conn)) { ++#ifndef AVM_SMALLER + pipe_close_conn(conn); ++#endif + } else { + file_close_conn(conn); + dptr_closecnum(conn); +diff -urN samba-3.0.24.orig/source/smbd/sesssetup.c samba-3.0.24/source/smbd/sesssetup.c +--- samba-3.0.24.orig/source/smbd/sesssetup.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/sesssetup.c 2007-07-17 13:19:05.000000000 +0200 +@@ -1035,6 +1035,7 @@ + + map_username(sub_user); + add_session_user(sub_user); ++ add_session_workgroup(domain); + /* Then force it to null for the benfit of the code below */ + *user = 0; + } +diff -urN samba-3.0.24.orig/source/smbd/trans2.c samba-3.0.24/source/smbd/trans2.c +--- samba-3.0.24.orig/source/smbd/trans2.c 2007-02-04 20:09:01.000000000 +0100 ++++ samba-3.0.24/source/smbd/trans2.c 2007-07-17 13:19:05.000000000 +0200 +@@ -2636,13 +2636,16 @@ + quotas.qflags = SVAL(pdata,40); + + /* unknown_2 6 NULL bytes follow*/ +- ++ + /* now set the quotas */ ++#if 1 /* AR7 */ ++ return ERROR_DOS(ERRSRV,ERRerror); ++#else + if (vfs_set_ntquota(fsp, SMB_USER_FS_QUOTA_TYPE, NULL, "as)!=0) { + DEBUG(0,("vfs_set_ntquota() failed for service [%s]\n",lp_servicename(SNUM(conn)))); + return ERROR_DOS(ERRSRV,ERRerror); + } +- ++#endif + break; + } + default: +diff -urN samba-3.0.24.orig/source/smbd/uid.c samba-3.0.24/source/smbd/uid.c +--- samba-3.0.24.orig/source/smbd/uid.c 2006-04-20 04:29:19.000000000 +0200 ++++ samba-3.0.24/source/smbd/uid.c 2007-08-07 09:38:18.000000000 +0200 +@@ -151,7 +151,9 @@ + char group_c; + BOOL must_free_token = False; + NT_USER_TOKEN *token = NULL; +- ++ int num_groups = 0; ++ gid_t *group_list = NULL; ++ + if (!conn) { + DEBUG(2,("change_to_user: Connection not open\n")); + return(False); +@@ -190,14 +192,14 @@ + if (conn->force_user) /* security = share sets this too */ { + uid = conn->uid; + gid = conn->gid; +- current_user.ut.groups = conn->groups; +- current_user.ut.ngroups = conn->ngroups; ++ group_list = conn->groups; ++ num_groups = conn->ngroups; + token = conn->nt_user_token; + } else if (vuser) { + uid = conn->admin_user ? 0 : vuser->uid; + gid = vuser->gid; +- current_user.ut.ngroups = vuser->n_groups; +- current_user.ut.groups = vuser->groups; ++ num_groups = vuser->n_groups; ++ group_list = vuser->groups; + token = vuser->nt_user_token; + } else { + DEBUG(2,("change_to_user: Invalid vuid used %d in accessing " +@@ -230,8 +232,8 @@ + */ + + int i; +- for (i = 0; i < current_user.ut.ngroups; i++) { +- if (current_user.ut.groups[i] == conn->gid) { ++ for (i = 0; i < num_groups; i++) { ++ if (group_list[i] == conn->gid) { + gid = conn->gid; + gid_to_sid(&token->user_sids[1], gid); + break; +@@ -243,6 +245,12 @@ + } + } + ++ /* Now set current_user since we will immediately also call ++ set_sec_ctx() */ ++ ++ current_user.ut.ngroups = num_groups; ++ current_user.ut.groups = group_list; ++ + set_sec_ctx(uid, gid, current_user.ut.ngroups, current_user.ut.groups, + token); + +diff -urN samba-3.0.24.orig/source/smbd/vfs-wrap.c samba-3.0.24/source/smbd/vfs-wrap.c +--- samba-3.0.24.orig/source/smbd/vfs-wrap.c 2007-02-04 19:59:13.000000000 +0100 ++++ samba-3.0.24/source/smbd/vfs-wrap.c 2007-08-07 09:38:18.000000000 +0200 +@@ -694,6 +694,44 @@ + return result; + } + ++#if 1 // AVM patch - don't growth the file (too much time and RAM for copy of large files to USB1.1 FAT filesystem) ++ { ++ SMB_BIG_UINT big_len = len; ++ ++ result = SMB_VFS_FSTAT(fsp,fsp->fh->fd,&st); ++ if (result == -1) { ++ goto done; ++ } ++ ++ if (big_len == (SMB_BIG_UINT)st.st_size) { ++ result = 0; ++ goto done; ++ } ++ ++ if (big_len > (SMB_BIG_UINT)st.st_size) { ++ SMB_BIG_UINT space_avail; ++ SMB_BIG_UINT bsize,dfree,dsize; ++ big_len -= st.st_size; ++ big_len /= 1024; /* Len is now number of 1k blocks needed. */ ++ space_avail = SMB_VFS_DISK_FREE(fsp->conn ,fsp->fsp_name,False,&bsize,&dfree,&dsize); ++ if (space_avail == (SMB_BIG_UINT)-1) { ++ result = -1; ++ goto done; ++ } ++ ++ if (big_len > space_avail) { ++ errno = ENOSPC; ++ result = -1; ++ goto done; ++ } ++ ++ // do nothing to be fast! ++ result = 0; ++ goto done; ++ } ++ } // block ++#endif // AVM Patch ++ + /* we used to just check HAVE_FTRUNCATE_EXTEND and only use + sys_ftruncate if the system supports it. Then I discovered that + you can have some filesystems that support ftruncate +diff -urN samba-3.0.24.orig/source/utils/avm_smbpasswd.c samba-3.0.24/source/utils/avm_smbpasswd.c +--- samba-3.0.24.orig/source/utils/avm_smbpasswd.c 1970-01-01 01:00:00.000000000 +0100 ++++ samba-3.0.24/source/utils/avm_smbpasswd.c 2007-10-23 12:27:13.000000000 +0200 +@@ -0,0 +1,213 @@ ++/* ++ * Unix SMB/CIFS implementation. ++ * Copyright (C) Jeremy Allison 1995-1998 ++ * Copyright (C) Tim Potter 2001 ++ * ++ * 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 "includes.h" ++ ++ ++void E_md4hash(const char *passwd, uchar p16[16]) ++{ ++ int len; ++ smb_ucs2_t wpwd[129]; ++ int i; ++ ++ ++ /* Password must be converted to NT unicode - null terminated. */ ++ len = strlen(passwd); ++#if 0 ++ push_ucs2(NULL, wpwd, (const char *)passwd, 256, STR_UNICODE|STR_NOALIGN|STR_TERMINATE); ++#else ++ for (i = 0; i < len; i++) { ++ wpwd[i] = (unsigned char)passwd[i]; ++ } ++ wpwd[i] = 0; // termination ++#endif ++ /* Calculate length in bytes */ ++ len = len /*strlen_w(wpwd)*/ * sizeof(int16); ++ ++ mdfour(p16, (unsigned char *)wpwd, len); ++ ZERO_STRUCT(wpwd); ++} ++ ++/** ++ * Creates the DES forward-only Hash of the users password in DOS ASCII charset ++ * @param passwd password in 'unix' charset. ++ * @param p16 return password hashed with DES, caller allocated 16 byte buffer ++ * @return False if password was > 14 characters, and therefore may be incorrect, otherwise True ++ * @note p16 is filled in regardless ++ */ ++ ++BOOL E_deshash(const char *passwd, uchar p16[16]) ++{ ++ BOOL ret = True; ++ char dospwd[256+2]; ++ int i; ++ int len; ++ ++ /* Password must be converted to DOS charset - null terminated, uppercase. */ ++// push_ascii(dospwd, passwd, sizeof(dospwd), STR_UPPER|STR_TERMINATE); ++ len = strlen(passwd); ++ for (i = 0; i < len; i++) { ++ char c = passwd[i]; ++ if (islower(c)) c = toupper(c); ++ dospwd[i] = c; ++ } ++ dospwd[i] = 0; ++ ++ /* Only the fisrt 14 chars are considered, password need not be null terminated. */ ++ E_P16((const unsigned char *)dospwd, p16); ++ ++ if (strlen(dospwd) > 14) { ++ ret = False; ++ } ++ ++ memset(dospwd, 0, sizeof(dospwd)); ++ // ZERO_STRUCT(dospwd); ++ ++ return ret; ++} ++ ++static void my_pdb_sethexpwd(char *p, const unsigned char *pwd) ++{ ++ if (pwd != NULL) { ++ int i; ++ for (i = 0; i < 16; i++) ++ slprintf(&p[i*2], 3, "%02X", pwd[i]); ++ } else { ++ strncpy(p, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", 32); ++ } ++} ++ ++static void crypt_password (const char *user_name, ++ const char *new_passwd, char *new_lanman_p16, char *new_nt_p16) ++{ ++ /* Calculate the MD4 hash (NT compatible) of the password */ ++ E_md4hash(new_passwd, new_nt_p16); ++ ++ if (!E_deshash(new_passwd, new_lanman_p16)) { ++ /* E_deshash returns false for 'long' passwords (> 14 ++ DOS chars). This allows us to match Win2k, which ++ does not store a LM hash for these passwords (which ++ would reduce the effective password length to 14 */ ++ ++ memset(new_lanman_p16, 0, LM_HASH_LEN); ++ } ++} ++ ++/* ++ftpuser:1000:8C6F5D02DEB21501AAD3B435B51404EE:E0FBA38268D0EC66EF1CB452D5885E53:[UX ]:LCT-00000000: ++*/ ++ ++/********************************************************* ++ Start here. ++**********************************************************/ ++int main(int argc, char **argv) ++{ ++ char *passwd_filename = "/var/samba/private/smbpasswd"; ++ char *cleartext_filename = "/var/tmp/smbpasswd.cleartext"; ++ ++ if (argc != 1) { ++ fprintf(stderr, "use: smbpasswd\n"); ++ fprintf(stderr, " file %s will be encrypted to %s\n", cleartext_filename, passwd_filename); ++ return -9; ++ } ++ ++ FILE *fp = fopen(passwd_filename, "w"); ++ ++ if (fp == NULL) { ++ fprintf(stderr, "can't write %s\n", passwd_filename); ++ return -10; ++ } ++ /* Make sure it is only rw by the owner */ ++ chmod(passwd_filename, 0600); ++ ++ ++ FILE *fp_in = fopen(cleartext_filename, "r"); ++ if (!fp_in) { ++ fprintf(stderr, "can't read %s\n", cleartext_filename); ++ fclose(fp); ++ return -11; ++ } ++ ++ ++ char line[512]; ++ ++ unsigned nusers = 0; ++ while(line == fgets(line, sizeof(line)-1, fp_in)) { ++ char *username, *passwd, *extra; ++ unsigned uid; ++ uchar new_lanman_p16[LM_HASH_LEN]; ++ uchar new_nt_p16[NT_HASH_LEN]; ++ char ascii_p16[32+1]; ++ char *p; ++ ++ line[sizeof(line)-1] = '\0'; ++ if (strlen(line)) { ++ p = &line[strlen(line)-1]; ++ while(p >= line) { ++ if (*p != '\n' && *p != '\r') break; ++ *p = '\0'; ++ p--; ++ } ++ } ++ ++ p = line; ++ char *p2 = strchr(p, ':'); ++ if (!p2) goto err; ++ *p2 = 0; ++ username = p; ++ ++ p = p2 + 1; ++ p2 = strchr(p, ':'); ++ if (!p2) goto err; ++ *p2 = 0; ++ uid = atoi(p); ++ ++ p = p2 + 1; ++ p2 = strchr(p, ':'); ++ if (!p2) goto err; ++ *p2 = 0; ++ passwd = p; ++ ++ extra = p2 + 1; ++ ++ crypt_password(username, passwd, new_lanman_p16, new_nt_p16); ++ ++ fprintf(fp, "%s:%u:", username, uid); ++ ++ my_pdb_sethexpwd(ascii_p16, new_lanman_p16); ++ ascii_p16[32] = '\0'; ++ fprintf(fp, "%s:", ascii_p16); ++ ++ my_pdb_sethexpwd(ascii_p16, new_nt_p16); ++ ascii_p16[32] = '\0'; ++ fprintf(fp, "%s:", ascii_p16); ++ ++ fprintf(fp, "%s\n", extra); ++ ++ nusers++; ++ } // while ++ ++err: ++ fclose(fp_in); ++ fclose(fp); ++ ++fprintf(stderr, "%u samba users written to %s\n", nusers, passwd_filename); ++ return 0; ++} ++ +diff -urN samba-3.0.24.orig/source/utils/ntlm_auth_proto.h samba-3.0.24/source/utils/ntlm_auth_proto.h +--- samba-3.0.24.orig/source/utils/ntlm_auth_proto.h 1970-01-01 01:00:00.000000000 +0100 ++++ samba-3.0.24/source/utils/ntlm_auth_proto.h 2007-07-17 13:19:05.000000000 +0200 +@@ -0,0 +1,28 @@ ++#ifndef _NTLM_AUTH_PROTO_H_ ++#define _NTLM_AUTH_PROTO_H_ ++ ++/* This file is automatically generated with "make proto". DO NOT EDIT */ ++ ++ ++/* The following definitions come from utils/ntlm_auth.c */ ++ ++const char *get_winbind_domain(void); ++const char *get_winbind_netbios_name(void); ++DATA_BLOB get_challenge(void) ; ++NTSTATUS contact_winbind_auth_crap(const char *username, ++ const char *domain, ++ const char *workstation, ++ const DATA_BLOB *challenge, ++ const DATA_BLOB *lm_response, ++ const DATA_BLOB *nt_response, ++ uint32 flags, ++ uint8 lm_key[8], ++ uint8 user_session_key[16], ++ char **error_string, ++ char **unix_name) ; ++ ++/* The following definitions come from utils/ntlm_auth_diagnostics.c */ ++ ++BOOL diagnose_ntlm_auth(void); ++ ++#endif /* _NTLM_AUTH_PROTO_H_ */ +diff -urN samba-3.0.24/source/nmbd/nmbd.c samba-3.0.24.new/source/nmbd/nmbd.c +--- samba-3.0.24/source/nmbd/nmbd.c 2007-02-04 19:59:23.000000000 +0100 ++++ samba-3.0.24.new/source/nmbd/nmbd.c 2010-03-07 19:33:23.000000000 +0100 +@@ -23,6 +23,39 @@ + + #include "includes.h" + ++#ifdef SAMBA_DEBUG ++void _fLog(char *fmt, ...) ++{ ++ va_list va; ++ FILE *fp = fopen("/var/tmp/nmbd.log", "a"); ++ time_t t = time(0); /* LOG */ ++ ++ if (!fp) return; ++ ++ fprintf(fp, " [%d] %02u:%02u ", getpid(), (t / 60) % 60, t % 60); ++ va_start(va, fmt); ++ vfprintf(fp, fmt, va); ++ va_end(va); ++ fprintf(fp, "\n"); ++ fclose(fp); ++} ++ ++void _fDebug(char *fmt, ...) ++{ ++ va_list va; ++ FILE *fp = fopen("/var/tmp/nmbd.log", "a"); ++ time_t t = time(0); /* LOG */ ++ ++ if (!fp) return; ++ ++ fprintf(fp, " [%d] %02u:%02u ", getpid(), (t / 60) % 60, t % 60); ++ va_start(va, fmt); ++ vfprintf(fp, fmt, va); ++ va_end(va); ++ fclose(fp); ++} ++#endif ++ + int ClientNMB = -1; + int ClientDGRAM = -1; + int global_nmb_port = -1; diff --git a/net/samba3/patches/110-compile_fixes.patch b/net/samba3/patches/110-compile_fixes.patch new file mode 100644 index 0000000..6b10c2f --- /dev/null +++ b/net/samba3/patches/110-compile_fixes.patch @@ -0,0 +1,105 @@ +Index: samba-3.0.24/source/Makefile +=================================================================== +--- samba-3.0.24.orig/source/Makefile 2008-08-07 11:15:02.000000000 +0200 ++++ samba-3.0.24/source/Makefile 2008-08-07 11:18:28.000000000 +0200 +@@ -10,8 +10,6 @@ + SOURCEROOT=$(shell pwd)/../../../.. + SHAREDLIBS=$(SOURCEROOT)/sharedlibs + +-include ${SHAREDLIBS}/ar7def.mk +- + # AR7 + # prefix=/usr/local/samba + prefix=/var/samba +@@ -22,25 +20,27 @@ + LIBS= -lcrypt -ldl -lpthread + # AR7 + # CC=gcc +-CC=${TARGET}-gcc ++CC?=${TARGET}-gcc + RANLIB = ${TARGET}-ranlib + AR = ${TARGET}-ar + + SHLD=${CC} ${CFLAGS} + # AR7 + # CFLAGS= -O -D_SAMBA_BUILD_ +-CFLAGS= -Os -D_SAMBA_BUILD_ -DAVM_NO_PRINTING +-CFLAGS+= -DAVM_NO_POPT ++CFLAPGS?= ++CFLAGS+= -Os -D_SAMBA_BUILD_ -DAVM_NO_PRINTING ++#CFLAGS+= -DAVM_NO_POPT + CFLAGS+= -DAVM_SMALLER +- ++#CFLAGS+= -DSAMBA_DEBUG + # uncomment this to get debugs + # CFLAGS += -DSAMBA_DEBUG + + # AR7 + # CPPFLAGS= -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE +-CPPFLAGS= -D_GNU_SOURCE ++CPPFLAGS?= -D_GNU_SOURCE ++CPPFLAGS+= -D_GNU_SOURCE + EXEEXT= +-LDFLAGS= ++LDFLAGS?= + AR=ar + LDSHFLAGS=-shared -Wl,-Bsymbolic + WINBIND_NSS_LDSHFLAGS=-shared -Wl,-Bsymbolic + +Index: samba-3.0.24/source/popt/popt.c +=================================================================== +--- samba-3.0.24.orig/source/popt/popt.c 2008-08-07 11:15:00.000000000 +0200 ++++ samba-3.0.24/source/popt/popt.c 2008-08-07 11:15:02.000000000 +0200 +@@ -10,13 +10,14 @@ + + #include "system.h" + +-#if HAVE_FLOAT_H ++//#if HAVE_FLOAT_H + #include +-#endif ++//#endif + #include + + #include "findme.h" + #include "poptint.h" ++#include "../include/config.h" + + #ifdef MYDEBUG + /*@unchecked@*/ +@@ -384,7 +385,7 @@ + sprintf(s, "%s/%s", con->execPath, item->argv[0]); + argv[argc] = s; + } else { +- argv[argc] = findProgramPath(item->argv[0]); ++ argv[argc] = ""/*findProgramPath(item->argv[0])*/; + } + if (argv[argc++] == NULL) return POPT_ERROR_NOARG; + +@@ -1235,4 +1236,3 @@ + + return numargs; + } +-/*@=boundswrite@*/ +Index: samba-3.0.24/source/smbd/server.c +=================================================================== +--- samba-3.0.24.orig/source/smbd/server.c 2008-08-07 11:15:02.000000000 +0200 ++++ samba-3.0.24/source/smbd/server.c 2008-08-07 11:15:02.000000000 +0200 +@@ -47,7 +47,7 @@ + void _fLog(char *fmt, ...) + { + va_list va; +- FILE *fp = fopen("/var/tmp/smbd.log", "a"); ++ FILE *fp = fopen("/var/log/smbd.log", "a"); + time_t t = time(0); /* LOG */ + + if (!fp) return; +@@ -63,7 +63,7 @@ + void _fDebug(char *fmt, ...) + { + va_list va; +- FILE *fp = fopen("/var/tmp/smbd.log", "a"); ++ FILE *fp = fopen("/var/log/smbd.log", "a"); + time_t t = time(0); /* LOG */ + + if (!fp) return; diff --git a/net/samba3/patches/120-owrt_paths.patch b/net/samba3/patches/120-owrt_paths.patch new file mode 100644 index 0000000..2cb2670 --- /dev/null +++ b/net/samba3/patches/120-owrt_paths.patch @@ -0,0 +1,57 @@ +Index: samba-3.0.24/source/Makefile +=================================================================== +--- samba-3.0.24.orig/source/Makefile 2008-08-06 23:33:20.000000000 +0200 ++++ samba-3.0.24/source/Makefile 2008-08-06 23:34:48.000000000 +0200 +@@ -12,7 +12,7 @@ + + # AR7 + # prefix=/usr/local/samba +-prefix=/var/samba ++prefix= + exec_prefix=${prefix} + + # AR7 +@@ -108,11 +108,11 @@ + # These can be overridden by command line switches (see smbd(8)) + # or in smb.conf (see smb.conf(5)) + LOGFILEBASE = ${VARDIR} +-CONFIGFILE = $(CONFIGDIR)/smb.conf +-LMHOSTSFILE = $(CONFIGDIR)/lmhosts ++CONFIGFILE = /etc/samba/smb.conf ++LMHOSTSFILE = /etc/lmhosts + + # This is where smbpasswd et al go +-PRIVATEDIR = ${prefix}/private ++PRIVATEDIR = /etc/samba/ + + SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd + PRIVATE_DIR = $(PRIVATEDIR) +@@ -121,10 +121,10 @@ + SWATDIR = ${prefix}/swat + + # the directory where lock files go +-LOCKDIR = ${VARDIR}/locks ++LOCKDIR = ${VARDIR}/lock + + # the directory where pid files go +-PIDDIR = ${VARDIR}/locks ++PIDDIR = ${VARDIR}/lock + + LIBSMBCLIENT=bin/libsmbclient.a bin/libsmbclient.so + LIBSMBCLIENT_MAJOR=0 +Index: samba-3.0.24/source/lib/util.c +=================================================================== +--- samba-3.0.24.orig/source/lib/util.c 2008-08-06 23:41:58.000000000 +0200 ++++ samba-3.0.24/source/lib/util.c 2008-08-06 23:42:10.000000000 +0200 +@@ -300,11 +300,7 @@ + char *p; + if ((p = getenv("TMPDIR"))) + return p; +-#if 1 /* AR7 */ +- return "/var/tmp"; +-#else + return "/tmp"; +-#endif + } + + /**************************************************************************** diff --git a/net/samba3/patches/130-owrt_smbpasswd.patch b/net/samba3/patches/130-owrt_smbpasswd.patch new file mode 100644 index 0000000..7670bd7 --- /dev/null +++ b/net/samba3/patches/130-owrt_smbpasswd.patch @@ -0,0 +1,216 @@ +Index: samba-3.0.24/source/Makefile +=================================================================== +--- samba-3.0.24.orig/source/Makefile 2008-08-07 15:56:45.000000000 +0200 ++++ samba-3.0.24/source/Makefile 2008-08-07 15:56:45.000000000 +0200 +@@ -1015,9 +1015,9 @@ + + MY_PASS_OBJ = libsmb/smbdes.o lib/md4.o lib/arc4.o + +-bin/smbpasswd: utils/avm_smbpasswd.o $(MY_PASS_OBJ) ++bin/smbpasswd: utils/owrt_smbpasswd.o $(MY_PASS_OBJ) + @echo Linking $@ +- @$(CC) $(FLAGS) -o $@ utils/avm_smbpasswd.o $(MY_PASS_OBJ) \ ++ @$(CC) $(FLAGS) -o $@ utils/owrt_smbpasswd.o $(MY_PASS_OBJ) \ + -L$(TARGETFS)/lib + + +Index: samba-3.0.24/source/utils/owrt_smbpasswd.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ samba-3.0.24/source/utils/owrt_smbpasswd.c 2008-08-07 15:58:25.000000000 +0200 +@@ -0,0 +1,195 @@ ++/* ++ * Copyright (C) John Crispin ++ * ++ * 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 "includes.h" ++#include ++ ++void E_md4hash(const char *passwd, uchar p16[16]) ++{ ++ int len; ++ smb_ucs2_t wpwd[129]; ++ int i; ++ ++ len = strlen(passwd); ++ for (i = 0; i < len; i++) { ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++ wpwd[i] = (unsigned char)passwd[i]; ++#else ++ wpwd[i] = (unsigned char)passwd[i] << 8; ++#endif ++ } ++ wpwd[i] = 0; ++ ++ len = len * sizeof(int16); ++ mdfour(p16, (unsigned char *)wpwd, len); ++ ZERO_STRUCT(wpwd); ++} ++ ++/* returns -1 if user is not present in /etc/passwd*/ ++int find_uid_for_user(char *user) ++{ ++ char t[256]; ++ FILE *fp = fopen("/etc/passwd", "r"); ++ int ret = -1; ++ ++ if(!fp) ++ { ++ printf("failed to open /etc/passwd"); ++ goto out; ++ } ++ ++ while(!feof(fp)) ++ { ++ if(fgets(t, 255, fp)) ++ { ++ char *p1, *p2; ++ p1 = strchr(t, ':'); ++ if(p1 && (p1 - t == strlen(user)) && (strncmp(t, user, strlen(user))) == 0) ++ { ++ p1 = strchr(t, ':'); ++ if(!p1) ++ goto out; ++ p2 = strchr(++p1, ':'); ++ if(!p2) ++ goto out; ++ p1 = strchr(++p2, ':'); ++ if(!p1) ++ goto out; ++ *p1 = '\0'; ++ ret = atoi(p2); ++ goto out; ++ } ++ } ++ } ++ printf("No valid user found in /etc/passwd\n"); ++ ++out: ++ if(fp) ++ fclose(fp); ++ return ret; ++} ++ ++void insert_user_in_smbpasswd(char *user, char *line) ++{ ++ char t[256]; ++ FILE *fp = fopen("/etc/samba/smbpasswd", "r+"); ++ ++ if(!fp) ++ { ++ printf("failed to open /etc/samba/smbpasswd"); ++ goto out; ++ } ++ ++ while(!feof(fp)) ++ { ++ if(fgets(t, 255, fp)) ++ { ++ char *p; ++ p = strchr(t, ':'); ++ if(p && (p - t == strlen(user)) && (strncmp(t, user, strlen(user))) == 0) ++ { ++ fseek(fp, -strlen(line), SEEK_CUR); ++ break; ++ } ++ } ++ } ++ ++ fprintf(fp, line); ++ ++out: ++ if(fp) ++ fclose(fp); ++} ++ ++void delete_user_from_smbpasswd(char *user) ++{ ++ char t[256]; ++ FILE *fp = fopen("/etc/samba/smbpasswd", "r+"); ++ ++ if(!fp) ++ { ++ printf("failed to open /etc/samba/smbpasswd"); ++ goto out; ++ } ++ ++ while(!feof(fp)) ++ { ++ if(fgets(t, 255, fp)) ++ { ++ char *p; ++ p = strchr(t, ':'); ++ if(p && (p - t == strlen(user)) && (strncmp(t, user, strlen(user))) == 0) ++ { ++ fpos_t r_pos, w_pos; ++ char t2[256]; ++ fgetpos(fp, &r_pos); ++ w_pos = r_pos; ++ w_pos.__pos -= strlen(t); ++ while(fgets(t2, 256, fp)) ++ { ++ fsetpos(fp, &w_pos); ++ fputs(t2, fp); ++ r_pos.__pos += strlen(t2); ++ w_pos.__pos += strlen(t2); ++ fsetpos(fp, &r_pos); ++ } ++ ftruncate(fileno(fp), w_pos.__pos); ++ break; ++ } ++ } ++ } ++ ++out: ++ if(fp) ++ fclose(fp); ++} ++ ++int main(int argc, char **argv) ++{ ++ unsigned uid; ++ uchar new_nt_p16[NT_HASH_LEN]; ++ int g; ++ int smbpasswd_present; ++ char smbpasswd_line[256]; ++ char *s; ++ ++ if(argc != 3) ++ { ++ printf("usage for openwrt_smbpasswd - \n\t%s USERNAME PASSWD\n\t%s -del USERNAME\n", argv[0], argv[0]); ++ exit(1); ++ } ++ if(strcmp(argv[1], "-del") == 0) ++ { ++ printf("deleting user %s\n", argv[2]); ++ delete_user_from_smbpasswd(argv[2]); ++ return 0; ++ } ++ uid = find_uid_for_user(argv[1]); ++ if(uid == -1) ++ exit(2); ++ ++ E_md4hash(argv[2], new_nt_p16); ++ s = smbpasswd_line; ++ s += snprintf(s, 256 - (s - smbpasswd_line), "%s:%u:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:", argv[1], uid); ++ for(g = 0; g < 16; g++) ++ s += snprintf(s, 256 - (s - smbpasswd_line), "%02X", new_nt_p16[g]); ++ snprintf(s, 256 - (s - smbpasswd_line), ":[U ]:LCT-00000001:\n"); ++ ++ insert_user_in_smbpasswd(argv[1], smbpasswd_line); ++ ++ return 0; ++} diff --git a/net/samba3/patches/140-no_mmap.patch b/net/samba3/patches/140-no_mmap.patch new file mode 100644 index 0000000..619cec6 --- /dev/null +++ b/net/samba3/patches/140-no_mmap.patch @@ -0,0 +1,27 @@ +Index: samba-3.0.24/source/include/config.h +=================================================================== +--- samba-3.0.24.orig/source/include/config.h 2008-08-08 17:43:08.000000000 +0200 ++++ samba-3.0.24/source/include/config.h 2008-08-08 17:44:02.000000000 +0200 +@@ -821,7 +821,7 @@ + #define HAVE_MKTIME 1 + + /* Whether mmap works */ +-#define HAVE_MMAP 1 ++/* #define HAVE_MMAP 1 */ + + /* Define to 1 if you have the header file. */ + #define HAVE_MNTENT_H 1 +Index: samba-3.0.24/source/tdb/Makefile +=================================================================== +--- samba-3.0.24.orig/source/tdb/Makefile 2008-08-08 17:42:47.000000000 +0200 ++++ samba-3.0.24/source/tdb/Makefile 2008-08-08 17:44:15.000000000 +0200 +@@ -2,7 +2,8 @@ + # Makefile for tdb directory + # + +-CFLAGS = -DSTANDALONE -DTDB_DEBUG -g -DHAVE_MMAP=1 ++CFLAGS = -DSTANDALONE -DTDB_DEBUG -g ++#-DHAVE_MMAP=1 + CC = gcc + + ADMINPROGS = tdbdump tdbbackup diff --git a/net/samba3/patches/150-fix_ls.patch b/net/samba3/patches/150-fix_ls.patch new file mode 100644 index 0000000..10538d6 --- /dev/null +++ b/net/samba3/patches/150-fix_ls.patch @@ -0,0 +1,15 @@ +Index: samba-3.0.24/source/lib/ms_fnmatch.c +=================================================================== +--- samba-3.0.24.orig/source/lib/ms_fnmatch.c 2008-08-11 11:08:03.000000000 +0200 ++++ samba-3.0.24/source/lib/ms_fnmatch.c 2008-08-11 11:11:33.000000000 +0200 +@@ -153,6 +153,10 @@ + int ret, count, i; + struct max_n *max_n = NULL; + ++ if (strcmp(pattern, "*") == 0) { ++ return 0; ++ } ++ + if (strcmp(string, "..") == 0) { + string = "."; + } diff --git a/net/samba3/patches/160-fix_log.patch b/net/samba3/patches/160-fix_log.patch new file mode 100644 index 0000000..9396b4d --- /dev/null +++ b/net/samba3/patches/160-fix_log.patch @@ -0,0 +1,13 @@ +Index: samba-3.0.24/source/lib/popt_common.c +=================================================================== +--- samba-3.0.24.orig/source/lib/popt_common.c 2008-08-11 11:25:26.000000000 +0200 ++++ samba-3.0.24/source/lib/popt_common.c 2008-08-11 11:26:03.000000000 +0200 +@@ -54,7 +54,7 @@ + else + pname++; + +- pstr_sprintf(logfile, "%s/log.%s", arg, pname); ++ pstr_sprintf(logfile, "%s/log/%s.log", arg, pname); + lp_set_logfile(logfile); + } + diff --git a/net/samba3/patches/170-no_rpc.patch b/net/samba3/patches/170-no_rpc.patch new file mode 100644 index 0000000..ae1d6c7 --- /dev/null +++ b/net/samba3/patches/170-no_rpc.patch @@ -0,0 +1,28 @@ +--- a/source/include/config.h ++++ b/source/include/config.h +@@ -986,13 +986,13 @@ + /* #undef HAVE_ROOT */ + + /* Define to 1 if you have the header file. */ +-#define HAVE_RPCSVC_NIS_H 1 ++/* #define HAVE_RPCSVC_NIS_H 1 */ + + /* Define to 1 if you have the header file. */ +-#define HAVE_RPCSVC_YPCLNT_H 1 ++/* #define HAVE_RPCSVC_YPCLNT_H 1 */ + + /* Define to 1 if you have the header file. */ +-#define HAVE_RPCSVC_YP_PROT_H 1 ++/* #define HAVE_RPCSVC_YP_PROT_H 1 */ + + /* Whether there is a conflicting AUTH_ERROR define in rpc/rpc.h */ + /* #undef HAVE_RPC_AUTH_ERROR_CONFLICT */ +@@ -1001,7 +1001,7 @@ + /* #undef HAVE_RPC_NETTYPE_H */ + + /* Define to 1 if you have the header file. */ +-#define HAVE_RPC_RPC_H 1 ++/* #define HAVE_RPC_RPC_H 1 */ + + /* Whether mkstemp is secure */ + #define HAVE_SECURE_MKSTEMP 1 diff --git a/net/samba3/patches/180-fix_duplicate_define.patch b/net/samba3/patches/180-fix_duplicate_define.patch new file mode 100644 index 0000000..e436226 --- /dev/null +++ b/net/samba3/patches/180-fix_duplicate_define.patch @@ -0,0 +1,12 @@ +--- a/source/include/config.h ++++ b/source/include/config.h +@@ -1848,8 +1848,7 @@ + #define SIZEOF_LONG 4 + + /* The size of the 'off_t' type */ +-/* AR7 #define SIZEOF_OFF_T 8 */ +-#define SIZEOF_OFF_T 4 /* AR7 */ ++/* #define SIZEOF_OFF_T 8 */ + + /* The size of a `short', as computed by sizeof. */ + #define SIZEOF_SHORT 2 diff --git a/net/scanlogd/Makefile b/net/scanlogd/Makefile new file mode 100644 index 0000000..81ae587 --- /dev/null +++ b/net/scanlogd/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=scanlogd +PKG_VERSION:=2.2.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.openwall.com/scanlogd/ \ + ftp://ftp.wiretapped.net/pub/openwall/ \ + http://distro.ibiblio.org/pub/linux/distributions/openwall/ +PKG_MD5SUM:=7b8187ea718ebe47f22805b921b909ab + +PKG_INIT_PRIO:=60 + +include $(INCLUDE_DIR)/package.mk + +define Package/scanlogd + SECTION:=net + CATEGORY:=Network + SUBMENU:=Firewall + DEPENDS:=+libpcap +libnet0 +libnids + TITLE:=Port scan detection tool + URL:=http://www.openwall.com/scanlogd +endef + +define Package/scanlogd/description + Scanlogd is a TCP port scan detection tool, originally designed + to illustrate various attacks an IDS developer has to deal with. + Thus, unlike some of the other port scan detection tools out there, + scanlogd is designed to be totally safe to use. +endef + +define Build/Configure + $(SED) "s,/var/empty,/tmp/.scanlogd," $(PKG_BUILD_DIR)/params.h + $(SED) "s,#undef SCANLOGD_DEVICE,#define SCANLOGD_DEVICE \"all\"," $(PKG_BUILD_DIR)/params.h +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CC="$(TARGET_CC)" LD="$(TARGET_CC)" CFLAGS="-c $(TARGET_CFLAGS)" \ + LDFLAGS= \ + PCAP_H="$(TARGET_CPPFLAGS)" \ + NIDS_H="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libnet-1.0.x/include" \ + NIDS_L="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libnet-1.0.x/lib -lnids -lnet -lpcap" \ + libnids +endef + +define Package/scanlogd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/scanlogd.init $(1)/etc/init.d/scanlogd +endef + +$(eval $(call BuildPackage,scanlogd)) diff --git a/net/scanlogd/files/scanlogd.init b/net/scanlogd/files/scanlogd.init new file mode 100644 index 0000000..8c6f382 --- /dev/null +++ b/net/scanlogd/files/scanlogd.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start() { + mkdir -p `grep "^scanlogd:" /etc/passwd | cut -d: -f6` + /usr/sbin/scanlogd +} + +stop() { + killall scanlogd +} diff --git a/net/scdp/Makefile b/net/scdp/Makefile new file mode 100644 index 0000000..8c80131 --- /dev/null +++ b/net/scdp/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=scdp +PKG_VERSION:=1.0b +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/scdp +PKG_MD5SUM:=7eafaf5a422e37d04715613993ed5d95 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/scdp + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libnet0 + TITLE:=An utility to send CDP (Cisco Discovery Protocol) packets + URL:=http://sourceforge.net/projects/scdp +endef + +define Package/scdp/description + This program sends CDP (Cisco Discovery Protocol) packets out on + selected interfaces and tells the connected switch (cisco only) + where the host is connected. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + , \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/lib/libnet-1.0.x/include" \ + LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libnet-1.0.x/lib" \ + PATH="$(STAGING_DIR)/usr/lib/libnet-1.0.x/bin:$$$$PATH" \ + ) +endef + +define Package/scdp/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scdp $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,scdp)) diff --git a/net/seeks/Makefile b/net/seeks/Makefile new file mode 100644 index 0000000..4f72e9d --- /dev/null +++ b/net/seeks/Makefile @@ -0,0 +1,115 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=seeks +PKG_VERSION:=0.3.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=git://seeks.git.sourceforge.net/gitroot/seeks/seeks +PKG_SOURCE_PROTO:=git +PKG_REV:=e8565b98cfe40fba644f587536f15f1a8665d230 +PKG_SOURCE_VERSION:=$(PKG_REV) + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/seeks + SUBMENU:=Web Servers/Proxies + SECTION:=net + CATEGORY:=Network + TITLE:=An open P2P design for websearch + URL:=http://www.seeks-project.info/site/ + DEPENDS:=+libpthread +libevent +libcurl +libpcre +libxml2 $(ICONV_DEPENDS) +zlib +protobuf +tokyocabinet + MAINTAINER:=Obinou +endef + +define Package/seeks/description + Seeks is a free and open P2P design and application for enabling social + websearch. Its specific purpose is to regroup users whose queries + are similar so they can share both the query results and their + experience on these results. On this basis, Seeks allows for true + real-time, decentralized, websearch to emerge. + + In the long term, there is no need for web crawlers and third-party + web indexes as users can push content directly to search groups. + By hashing queries, Seeks offers a unique solution that allows to + issue queries and get answers while not revealing the true query itself. + + Seeks is currently under development. Code is available from our git + repository. Help on any of the social, technical and software matters + is greatly encouraged and appreciated, see the dedicated page. +endef + + +CONFIGURE_VARS:= \ + CXXFLAGS="-I$(STAGING_DIR)/usr/include $(ICONV_CFLAGS)" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib $(ICONV_LDFLAGS)" \ + +CONFIGURE_ARGS += \ + --prefix=/usr \ + --enable-httpserv-plugin \ + --enable-keepalive \ + --disable-image-websearch-plugin \ + --disable-icu + +define Build/Configure + (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ + ./autogen.sh \ + ); + $(call Build/Configure/Default) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CXXFLAGS="-I$(STAGING_DIR)/usr/include $(ICONV_CFLAGS)" + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install +endef + +define Package/seeks/conffiles +/etc/config/seeks +/etc/seeks/config +endef + +define Package/seeks/install +# Binary program + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/seeks $(1)/usr/bin/ +# Config files + $(INSTALL_DIR) $(1)/etc/seeks + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/seeks/* $(1)/etc/seeks/ +# Libs + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/lib/seeks/plugins/blocker + $(INSTALL_DIR) $(1)/usr/lib/seeks/plugins/httpserv + $(INSTALL_DIR) $(1)/usr/lib/seeks/plugins/websearch + $(INSTALL_DIR) $(1)/usr/lib/seeks/plugins/query_capture + $(INSTALL_DIR) $(1)/usr/lib/seeks/plugins/uri_capture + $(INSTALL_DIR) $(1)/usr/lib/seeks/plugins/cf + $(INSTALL_DIR) $(1)/usr/lib/seeks/plugins/udb_service + $(CP) $(PKG_INSTALL_DIR)/usr/lib/seeks/plugins/blocker/lib*.so* $(1)/usr/lib/seeks/plugins/blocker + $(CP) $(PKG_INSTALL_DIR)/usr/lib/seeks/plugins/httpserv/lib*.so* $(1)/usr/lib/seeks/plugins/httpserv + $(CP) $(PKG_INSTALL_DIR)/usr/lib/seeks/plugins/websearch/lib*.so* $(1)/usr/lib/seeks/plugins/websearch + $(CP) $(PKG_INSTALL_DIR)/usr/lib/seeks/plugins/query_capture/lib*.so* $(1)/usr/lib/seeks/plugins/query_capture + $(CP) $(PKG_INSTALL_DIR)/usr/lib/seeks/plugins/uri_capture/lib*.so* $(1)/usr/lib/seeks/plugins/uri_capture + $(CP) $(PKG_INSTALL_DIR)/usr/lib/seeks/plugins/cf/lib*.so* $(1)/usr/lib/seeks/plugins/cf + $(CP) $(PKG_INSTALL_DIR)/usr/lib/seeks/plugins/udb_service/lib*.so* $(1)/usr/lib/seeks/plugins/udb_service +#Share + $(INSTALL_DIR) $(1)/usr/share/seeks + $(CP) -r $(PKG_INSTALL_DIR)/usr/share/seeks/* $(1)/usr/share/seeks/ +# This is OpenWRT specific config & scripts + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/seeks.init $(1)/etc/init.d/seeks +endef + +$(eval $(call BuildPackage,seeks)) diff --git a/net/seeks/files/seeks.init b/net/seeks/files/seeks.init new file mode 100644 index 0000000..c636d6b --- /dev/null +++ b/net/seeks/files/seeks.init @@ -0,0 +1,21 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=99 + +DAEMON=/usr/bin/seeks + +start() { + echo 'seeks is starting...' + start-stop-daemon -S -q -x "$DAEMON" -- --daemon +} + +stop() { + echo 'seeks is stopping...' + start-stop-daemon -K -q -x "$DAEMON" +} + +restart() { + stop + sleep 2 + start +} diff --git a/net/seeks/patches/050-better_icu_detection.patch b/net/seeks/patches/050-better_icu_detection.patch new file mode 100644 index 0000000..7d2fa63 --- /dev/null +++ b/net/seeks/patches/050-better_icu_detection.patch @@ -0,0 +1,39 @@ +diff -ru seeks-0.3.3/configure.in seeks-0.3.3-new/configure.in +--- seeks-0.3.3/configure.in 2011-04-30 10:16:57.000000000 +0200 ++++ seeks-0.3.3-new/configure.in 2011-05-28 14:44:13.094516755 +0200 +@@ -351,17 +351,25 @@ + #========================================================================== + # Finding icu + #========================================================================== +-# First, check for the icu-config tool +-AC_PATH_PROGS(ICU_CONFIG, icu-config, no) +-if test x$ICU_CONFIG = xno; then +- AM_CONDITIONAL(HAVE_ICU,false) ++AC_ARG_ENABLE(icu, ++AC_HELP_STRING([--disable-icu], [Don't use icu to detect and convert non-UTF8 strings (default is NO)]), ++[enableval2=$enableval], ++[enableval2=yes]) ++if test $enableval2 = yes; then ++ # First, check for the icu-config tool ++ AC_PATH_PROGS(ICU_CONFIG, icu-config, no) ++ if test x$ICU_CONFIG = xno; then ++ AM_CONDITIONAL(HAVE_ICU,false) ++ else ++ AC_DEFINE(FEATURE_ICU,1,"ICU library is there") ++ AM_CONDITIONAL(HAVE_ICU,true) ++ ICU_LDADD=`$ICU_CONFIG --ldflags` ++ AC_SUBST(ICU_LDADD) ++ ICU_CFLAGS=`$ICU_CONFIG --cppflags` ++ AC_SUBST(ICU_CFLAGS) ++ fi + else +- AC_DEFINE(FEATURE_ICU,1,"ICU library is there") +- AM_CONDITIONAL(HAVE_ICU,true) +- ICU_LDADD=`$ICU_CONFIG --ldflags` +- AC_SUBST(ICU_LDADD) +- ICU_CFLAGS=`$ICU_CONFIG --cppflags` +- AC_SUBST(ICU_CFLAGS) ++ AM_CONDITIONAL(HAVE_ICU,false) + fi + + #ICU_LDADD=`$ICU_CONFIG --ldflags` diff --git a/net/seeks/patches/100-no_tests-and-add-iconv-link.patch b/net/seeks/patches/100-no_tests-and-add-iconv-link.patch new file mode 100644 index 0000000..0dd28ae --- /dev/null +++ b/net/seeks/patches/100-no_tests-and-add-iconv-link.patch @@ -0,0 +1,34 @@ +diff -ru seeks-0.3.3/src/Makefile.am seeks-0.3.3-new/src/Makefile.am +--- seeks-0.3.3/src/Makefile.am 2011-04-30 10:16:57.000000000 +0200 ++++ seeks-0.3.3-new/src/Makefile.am 2011-05-27 10:56:09.648313435 +0200 +@@ -57,12 +57,12 @@ + LDADD += -lseeksuserdb -lseeksuserdbfix + endif + endif +-LDADD += -lpcre -lpcreposix -lseekslsh -lseeksdht -lrmd160 -lpthread -lz @CURL_LDADD@ ++LDADD += -lpcre -lpcreposix -lseekslsh -lseeksdht -lrmd160 -lpthread -lz -liconv @CURL_LDADD@ + if !HAVE_BSD + LDADD += -ldl + endif + +-SUBDIRS=utils proxy lsh dht plugins proxy/tests lsh/tests . ++SUBDIRS=utils proxy lsh dht plugins . + + configdir=$(sysconfdir)/seeks + dist_config_DATA=config \ +diff -rU5 seeks-0.3.3/src/plugins/websearch/Makefile.am seeks-0.3.3-new/src/plugins/websearch/Makefile.am +--- seeks-0.3.3/src/plugins/websearch/Makefile.am 2011-04-30 10:16:57.000000000 +0200 ++++ seeks-0.3.3-new/src/plugins/websearch/Makefile.am 2011-05-24 00:42:34.836033228 +0200 +@@ -42,11 +42,11 @@ + + if USE_PERL + libseekswebsearchplugin_la_CXXFLAGS += `perl -MExtUtils::Embed -e ccopts` + endif + +-SUBDIRS=. tests ++SUBDIRS=. + + websearchconfigdir=$(sysconfdir)/seeks + dist_websearchconfig_DATA=websearch-config + + nobase_dist_websearchplugindata_DATA= \ diff --git a/net/seeks/patches/200-add_pcre_headers_to_plugins.patch b/net/seeks/patches/200-add_pcre_headers_to_plugins.patch new file mode 100644 index 0000000..0e21b97 --- /dev/null +++ b/net/seeks/patches/200-add_pcre_headers_to_plugins.patch @@ -0,0 +1,32 @@ +diff -rU5 seeks-0.3.3/src/plugins/blocker/Makefile.am seeks-0.3.3-new/src/plugins/blocker/Makefile.am +--- seeks-0.3.3/src/plugins/blocker/Makefile.am 2010-12-05 09:33:05.000000000 +0100 ++++ seeks-0.3.3-new/src/plugins/blocker/Makefile.am 2011-05-24 01:13:09.994085964 +0200 +@@ -4,11 +4,11 @@ + blockerplugindatadir = $(datadir)/seeks/plugins/blocker + + AM_CXXFLAGS=-Wall -g -pipe + AM_CPPFLAGS= -I${srcdir} -I${srcdir}/../../utils -I${srcdir}/../../proxy -I${srcdir}/../../lsh \ + -DSEEKS_CONFIGDIR='"$(sysconfdir)/seeks/"' `pkg-config --cflags protobuf` `pkg-config --cflags tokyocabinet` \ +- -I../../proxy ++ -I../../proxy @PCRE_CFLAGS@ + ACLOCAL_AMFLAGS=-I m4 + + blockerpluginlib_LTLIBRARIES=libblockerplugin.la + libblockerplugin_la_SOURCES=blocker.cpp blocker.h + +diff -rU5 seeks-0.3.3/src/plugins/httpserv/Makefile.am seeks-0.3.3-new/src/plugins/httpserv/Makefile.am +--- seeks-0.3.3/src/plugins/httpserv/Makefile.am 2011-02-18 15:44:02.000000000 +0100 ++++ seeks-0.3.3-new/src/plugins/httpserv/Makefile.am 2011-05-24 01:27:13.413787987 +0200 +@@ -4,11 +4,11 @@ + httpservplugindatadir = $(datadir)/seeks/plugins/httpserv + + + AM_CPPFLAGS=-Wno-deprecated -Wall -g -pipe \ + -I${srcdir} -I${srcdir}/../websearch -I${srcdir}/../../utils -I${srcdir}/../../lsh -I${srcdir}/../../proxy \ +- -I${srcdir}/../../dht ++ -I${srcdir}/../../dht @PCRE_CFLAGS@ + + + if HAVE_TC + if HAVE_PROTOBUF + AM_CPPFLAGS+=-I${srcdir}/../query_capture -I${srcdir}/../cf `pkg-config --cflags protobuf` `pkg-config --cflags tokyocabinet` diff --git a/net/ser2net/Makefile b/net/ser2net/Makefile new file mode 100644 index 0000000..86d5955 --- /dev/null +++ b/net/ser2net/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ser2net +PKG_VERSION:=2.7 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/ser2net +PKG_MD5SUM:=22977477789868923a5de09a85e847dd + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ser2net + SECTION:=net + CATEGORY:=Network + TITLE:=Serial port TCP/IP redirector + URL:=http://sourceforge.net/projects/ser2net/ +endef + +define Package/ser2net/description + This is ser2net, a program for allowing network connections to serial ports. + See the man page for information about using the program. Note that ser2net + supports RFC 2217 (remote control of serial port parameters), but you must + have a complient client. +endef + +define Package/ser2net/conffiles +/etc/ser2net.conf +endef + +# uses GNU configure + +define Package/ser2net/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ser2net $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/ser2net.conf $(1)/etc/ +endef + +$(eval $(call BuildPackage,ser2net)) diff --git a/net/serialoverip/Makefile b/net/serialoverip/Makefile new file mode 100644 index 0000000..c1ed9fa --- /dev/null +++ b/net/serialoverip/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=serialoverip +PKG_VERSION:=1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME).tgz +PKG_SOURCE_URL:=@SF/serialoverip +PKG_MD5SUM:=0931cca65b8f9d32079fa3e55130ee1e + +include $(INCLUDE_DIR)/package.mk + +define Package/serialoverip + SECTION:=net + CATEGORY:=Network + TITLE:=SerialOverIP + URL:=http://sourceforge.net/projects/serialoverip/ +endef + +define Package/serialoverip/description + Tool for transport of serial interfaces over UDP/IP. + Usefull for accessing a distant serial device by a local program. +endef + +define Build/Configure +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) \ + -o $(PKG_BUILD_DIR)/serialoverip $(PKG_BUILD_DIR)/serialoverip.c +endef + +define Package/serialoverip/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/serialoverip $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,serialoverip)) diff --git a/net/serialoverip/patches/001-compile-fixes.patch b/net/serialoverip/patches/001-compile-fixes.patch new file mode 100644 index 0000000..f487e24 --- /dev/null +++ b/net/serialoverip/patches/001-compile-fixes.patch @@ -0,0 +1,76 @@ +diff -ur serialoverip-1.0.orig/serialoverip.c serialoverip-1.0/serialoverip.c +--- serialoverip-1.0.orig/serialoverip.c 2009-09-24 19:32:40.000000000 +0200 ++++ serialoverip-1.0/serialoverip.c 2009-09-24 19:43:18.000000000 +0200 +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + #define MAXMESG 2048 + +@@ -42,20 +43,19 @@ + int s[2],st[2]; + + void help(){ +- fprintf(stderr,"\ +-SerialOverIP version 1.0, Copyright (C) 2002 Stefan-Florin Nicola +-SerialOverIP comes with ABSOLUTELY NO WARRANTY. This is free software, and you +-are welcome to redistribute it under GNU General Public License. +- Usage: %s +- where and are one of the folowing: +- -s UDP server on IP:port +- -c UDP client for server IP:port +- -d sss-dps local serial device +- sss is speed (50,..,230400) +- d is data bits (5,6,7,8) +- p is parity type (N,E,O) +- s is stop bits (1,2) +-",pname); ++ fprintf(stderr, ++"SerialOverIP version 1.0, Copyright (C) 2002 Stefan-Florin Nicola \n" ++"SerialOverIP comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n" ++"are welcome to redistribute it under GNU General Public License.\n" ++" Usage: %s \n" ++" where and are one of the folowing:\n" ++" -s UDP server on IP:port\n" ++" -c UDP client for server IP:port\n" ++" -d sss-dps local serial device\n" ++" sss is speed (50,..,230400)\n" ++" d is data bits (5,6,7,8)\n" ++" p is parity type (N,E,O)\n" ++" s is stop bits (1,2)\n", pname); + return; + } + +@@ -113,10 +113,9 @@ + + int main(int argc,char**argv){ + int i,n,w,clen[2],nonblock[2],speed,data,stopb; +- unsigned char c,buf[MAXMESG],*p,parity; ++ unsigned char buf[MAXMESG],*p,parity; + struct termios cfg; + struct sockaddr_in addr[4][4]; +- struct sigaction newact,oldact; + + pname=argv[0]; + if(argc!=7){ +@@ -156,7 +155,7 @@ + n=sscanf(argv[3*i+3],"%d-%d%c%d",&speed,&data,&parity,&stopb); + if(n<4){ + fprintf(stderr,"%s: invalid argument %1d from %s\n", +- pname,read+1,argv[3*i+3]); ++ pname,(int)(read+1),argv[3*i+3]); + return 3; + } + if(setserial(s[i],&cfg,speed,data,parity,stopb)<0){ +@@ -177,7 +176,7 @@ + if(st[i]&2)n=read(s[i],buf,MAXMESG); + else{ + n=recvfrom(s[i],buf,MAXMESG,nonblock[i]*MSG_DONTWAIT, +- (struct sockaddr*)&addr[i][st[i]],&clen[i]); ++ (struct sockaddr*)&addr[i][st[i]],(socklen_t *)&clen[i]); + nonblock[i]=1; + } + p=buf; +Only in serialoverip-1.0: serialoverip.new diff --git a/net/shat/Makefile b/net/shat/Makefile new file mode 100644 index 0000000..7412f53 --- /dev/null +++ b/net/shat/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=shat +PKG_VERSION:=0.9.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/shat +PKG_MD5SUM:=da06846f35838b14d1513523dad84d24 + +include $(INCLUDE_DIR)/package.mk + +define Package/shat + SECTION:=net + CATEGORY:=Network + TITLE:=Source Hardware Address Translation + URL:=http://sourceforge.net/projects/shat/ +endef + +define Package/shat/description + A tool which allows hosts with arbitrary IP configuration + to connect to the internet over a SHAT gateway. + +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/src \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -Wall -I$(PKG_BUILD_DIR)/include/linux/include -I$(PKG_BUILD_DIR)/include -DVERSION=\\\"$(PKG_VERSION)\\\" -DDROP_NETBIOS" +endef + +define Package/shat/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/shatd $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/shatc $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,shat)) diff --git a/net/shfs/Makefile b/net/shfs/Makefile new file mode 100644 index 0000000..e1f0766 --- /dev/null +++ b/net/shfs/Makefile @@ -0,0 +1,89 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=shfs +PKG_VERSION:=0.35 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/shfs +PKG_MD5SUM:=016f49d71bc32eee2b5d11fc1600cfbe + +include $(INCLUDE_DIR)/package.mk + +define Package/shfs/Default + TITLE:=ShFS + SUBMENU:=Filesystem + URL:=http://shfs.sourceforge.net/ +endef + +define Package/shfs/Default/description + ShFS is a simple and easy to use Linux kernel module which allows you to + mount remote filesystems using a plain shell (SSH) connection. When using + ShFS, you can access all remote files just like the local ones, only the + access is governed through the transport security of SSH. +endef + +define KernelPackage/shfs +$(call Package/shfs/Default) + TITLE+= (kernel module) + DEPENDS:=@LINUX_2_4 + FILES:=$(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/shfs/shfs.$(LINUX_KMOD_SUFFIX) + SUBMENU:=Filesystems + AUTOLOAD:=$(call AutoLoad,40,shfs) +endef + +define KernelPackage/shfs/description +$(call Package/shfs/Default/description) + This package contains the ShFS kernel module. +endef + +define Package/shfs-utils +$(call Package/shfs/Default) + SECTION:=utils + CATEGORY:=Utilities + DEPENDS+=+kmod-shfs + TITLE+= (utilities) +endef + +define Package/shfs-utils/description +$(call Package/shfs/Default/description) + This package contains the ShFS utilities. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + OFLAGS="$(TARGET_CFLAGS)" \ + CC="$(TARGET_CC)" \ + LINKER="$(TARGET_CC)" \ + KERNEL="$(LINUX_VERSION)" \ + KERNEL_SOURCES="$(LINUX_DIR)" \ + ROOT="$(PKG_INSTALL_DIR)" \ + module module-install + $(MAKE) -C $(PKG_BUILD_DIR) \ + OFLAGS="$(TARGET_CFLAGS)" \ + CC="$(TARGET_CC)" \ + LINKER="$(TARGET_CC)" \ + KERNEL_SOURCES="$(LINUX_DIR)" \ + ROOT="$(PKG_INSTALL_DIR)" \ + utils utils-install +endef + +define Package/shfs-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/shfs{,u}mount $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/sbin + ln -sf /usr/bin/shfsmount $(1)/sbin/mount.shfs +endef + +$(eval $(call KernelPackage,shfs)) +$(eval $(call BuildPackage,shfs-utils)) diff --git a/net/shfs/patches/100-kmod_build.patch b/net/shfs/patches/100-kmod_build.patch new file mode 100644 index 0000000..16f198c --- /dev/null +++ b/net/shfs/patches/100-kmod_build.patch @@ -0,0 +1,100 @@ +Index: shfs-0.35/shfs/Linux-2.4/Makefile +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.4/Makefile 2007-06-04 13:22:58.143016200 +0200 ++++ shfs-0.35/shfs/Linux-2.4/Makefile 2007-06-04 13:22:58.209006168 +0200 +@@ -1,3 +1,13 @@ ++# ++# the original Makefile was trashed and replaced by this one ++# The main reason is that loadable modules should be built with ++# the same compile flags the kernel was built with, so we'd better ++# let the kernel tree build the module for us, like that : ++# ++# make -C $(KERNEL_DIR) SUBDIRS="$(shell pwd)" modules ++# make -C $(KERNEL_DIR) SUBDIRS="$(shell pwd)" modules_install ++# ++ + ifndef KERNEL + KERNEL=$(shell uname -r) + endif +@@ -10,67 +20,29 @@ + KERNEL_SOURCES=${MODULESDIR}/build + endif + +-ifeq (${MODVERSIONS},detect) +- ifeq ($(shell test -e ${KERNEL_SOURCES}/include/linux/modversions.h; echo $$?),0) +- MODVERSIONS=yes +- endif +-endif +- +-ifeq (${MODVERSIONS},yes) +-MVER=-DMODVERSIONS -DEXPORT_SYMTAB +-endif +- +-LINVER=linux-${KERNEL} +- +-ALL_TARGETS := shfs.o +- +-SEARCHDIRS := -I- -I. -I${KERNEL_SOURCES}/include #-I/usr/src/linux/include/ ++all: all-y + +-CC := gcc +-CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE ${MVER} -D__KERNEL__ -DLINUX +-LINKER := ld +-LDFLAGS = -r +-LOADLIBES := ++O_TARGET := shfs.o + +-all: ${ALL_TARGETS} ++shfs-objs := dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o + +-%.o: %.c $(wildcard *.h) +- ${CC} ${CFLAGS} -c $< -o $@ ++obj-y := $(shfs-objs) ++obj-m := $(O_TARGET) + +-shfs.o: dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o +- ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LOADLIBES} +- +-tidy: +- ${RM} core dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o +- +-clean: tidy patch-clean +- ${RM} shfs.o ++-include $(TOPDIR)/Rules.make + ++all-y: ++ make -C ${KERNEL_SOURCES} TOPDIR="${KERNEL_SOURCES}" SUBDIRS="$(shell pwd)" modules ++ + install: shfs.o + rm -f ${MODULESDIR}/kernel/fs/shfs/shfs.o + install -m644 -b -D shfs.o ${MODULESDIR}/kernel/fs/shfs/shfs.o +- if [ -x /sbin/depmod -a "${ROOT}" = "/" ]; then /sbin/depmod -aq; fi + + uninstall: + rm -rf ${MODULESDIR}/kernel/fs/shfs +- if [ -x /sbin/depmod -a "${ROOT}" = "/" ]; then /sbin/depmod -aq; fi + +-patch: +- rm -rf ${LINVER} ${LINVER}.orig; mkdir ${LINVER}; +- for i in Documentation fs/shfs include/linux; do \ +- mkdir -p ${LINVER}/$$i; \ +- done +- cp ${KERNEL_SOURCES}/Documentation/Configure.help ${LINVER}/Documentation +- cp ${KERNEL_SOURCES}/fs/{Makefile,Config.in} ${LINVER}/fs +- cp -r ${LINVER} ${LINVER}.orig +- cp ../../Changelog *.c shfs_debug.h proc.h ${LINVER}/fs/shfs/ +- cp shfs.h shfs_fs* ${LINVER}/include/linux/ +- (cd ${LINVER}; patch -p1 <../kernel-config.diff) +- find . -type f -name "*.orig" -print | xargs rm -f +- diff -urN ${LINVER}.orig ${LINVER} >${LINVER}.diff; true +- +-patch-clean: +- rm -rf ${LINVER} ${LINVER}.orig; +- rm -f ${LINVER}.diff +- +-.PHONY : all tidy clean install uninstall patch patch-clean ++clean: ++ rm -f core *.o *.a *.s ++ ++shfs.o: $(shfs-objs) ++ diff --git a/net/shfs/patches/101-shfs_0.35_2.6.18_dentry.patch b/net/shfs/patches/101-shfs_0.35_2.6.18_dentry.patch new file mode 100644 index 0000000..e7754b0 --- /dev/null +++ b/net/shfs/patches/101-shfs_0.35_2.6.18_dentry.patch @@ -0,0 +1,166 @@ +Index: shfs-0.35/shfs/Linux-2.6/inode.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/inode.c 2007-06-04 13:22:58.091024104 +0200 ++++ shfs-0.35/shfs/Linux-2.6/inode.c 2007-06-04 13:22:58.397977440 +0200 +@@ -337,12 +337,21 @@ + return -EINVAL; + } + ++#ifdef NEW_VFS_DENTRY_API ++static int ++shfs_get_sb(struct file_system_type *fs_type, ++ int flags, const char *dev_name, void *data, struct vfsmount *mnt) ++{ ++ return get_sb_nodev(fs_type, flags, data, shfs_read_super, mnt); ++} ++#else + static struct super_block * + shfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) + { + return get_sb_nodev(fs_type, flags, data, shfs_read_super); + } ++#endif + + static struct file_system_type sh_fs_type = { + .owner = THIS_MODULE, +Index: shfs-0.35/shfs/Linux-2.6/file.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/file.c 2007-06-04 13:22:58.096023344 +0200 ++++ shfs-0.35/shfs/Linux-2.6/file.c 2007-06-04 13:22:58.397977440 +0200 +@@ -199,7 +199,7 @@ + } + + static int +-shfs_file_flush(struct file *f) ++do_file_flush(struct file *f) + { + struct dentry *dentry = f->f_dentry; + struct shfs_sb_info *info = info_from_dentry(dentry); +@@ -222,6 +222,16 @@ + } + + static int ++#ifdef FLUSH_HAS_LOCK_OWNER ++shfs_file_flush(struct file *f, fl_owner_t id) ++#else ++shfs_file_flush(struct file *f) ++#endif ++{ ++ return do_file_flush(f); ++} ++ ++static int + shfs_file_release(struct inode *inode, struct file *f) + { + struct dentry *dentry = f->f_dentry; +@@ -311,7 +321,7 @@ + DEBUG("\n"); + written = generic_file_write(f, buf, count, offset); + if (written > 0) { +- result = shfs_file_flush(f); ++ result = do_file_flush(f); + written = result < 0 ? result: written; + } + +Index: shfs-0.35/shfs/Linux-2.6/proc.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/proc.c 2007-06-04 13:22:58.102022432 +0200 ++++ shfs-0.35/shfs/Linux-2.6/proc.c 2007-06-04 13:22:58.398977288 +0200 +@@ -570,6 +570,16 @@ + return result; + } + ++#ifdef NEW_VFS_DENTRY_API ++int ++shfs_statfs(struct dentry *dentry, struct kstatfs *attr) ++{ ++ struct shfs_sb_info *info = info_from_sb(dentry->d_sb); ++ ++ DEBUG("\n"); ++ return info->fops.statfs(info, attr); ++} ++#else + int + shfs_statfs(struct super_block *sb, struct kstatfs *attr) + { +@@ -578,4 +588,5 @@ + DEBUG("\n"); + return info->fops.statfs(info, attr); + } ++#endif + +Index: shfs-0.35/shfs/Linux-2.6/shfs_fs.h +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/shfs_fs.h 2007-06-04 13:22:58.107021672 +0200 ++++ shfs-0.35/shfs/Linux-2.6/shfs_fs.h 2007-06-04 13:22:58.398977288 +0200 +@@ -9,6 +9,12 @@ + + #include + #include ++#include ++ ++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17) ++#define NEW_VFS_DENTRY_API ++#define FLUSH_HAS_LOCK_OWNER ++#endif + + #define SHFS_MAX_AGE(info) (((info)->ttl * HZ) / 1000) + #define SOCKBUF_SIZE (SHFS_PATH_MAX * 10) +@@ -101,7 +107,12 @@ + void set_garbage(struct shfs_sb_info *info, int write, int count); + int get_name(struct dentry *d, char *name); + int shfs_notify_change(struct dentry *dentry, struct iattr *attr); ++ ++#ifdef NEW_VFS_DENTRY_API ++int shfs_statfs(struct dentry *dentry, struct kstatfs *attr); ++#else + int shfs_statfs(struct super_block *sb, struct kstatfs *attr); ++#endif + + /* shfs/inode.c */ + void shfs_set_inode_attr(struct inode *inode, struct shfs_fattr *fattr); +Index: shfs-0.35/shfs/Linux-2.6/symlink.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/symlink.c 2007-06-04 13:22:58.113020760 +0200 ++++ shfs-0.35/shfs/Linux-2.6/symlink.c 2007-06-04 13:22:58.398977288 +0200 +@@ -41,7 +41,7 @@ + return result; + } + +-static int ++static void * + shfs_follow_link(struct dentry *dentry, struct nameidata *nd) + { + struct shfs_sb_info *info = info_from_dentry(dentry); +@@ -61,7 +61,7 @@ + DEBUG("%s\n", real_name); + result = vfs_follow_link(nd, real_name); + error: +- return result; ++ return NULL; + } + + struct inode_operations shfs_symlink_inode_operations = { +Index: shfs-0.35/shfs/Linux-2.6/dcache.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/dcache.c 2007-06-04 13:22:58.121019544 +0200 ++++ shfs-0.35/shfs/Linux-2.6/dcache.c 2007-06-04 13:22:58.398977288 +0200 +@@ -68,7 +68,7 @@ + spin_lock(&dcache_lock); + next = parent->d_subdirs.next; + while (next != &parent->d_subdirs) { +- dentry = list_entry(next, struct dentry, d_child); ++ dentry = list_entry(next, struct dentry, d_u.d_child); + dentry->d_fsdata = NULL; + shfs_age_dentry(info, dentry); + next = next->next; +@@ -101,7 +101,7 @@ + spin_lock(&dcache_lock); + next = parent->d_subdirs.next; + while (next != &parent->d_subdirs) { +- dent = list_entry(next, struct dentry, d_child); ++ dent = list_entry(next, struct dentry, d_u.d_child); + if ((unsigned long)dent->d_fsdata == fpos) { + if (dent->d_inode) + dget_locked(dent); diff --git a/net/shfs/patches/102-shfs_0.35_clean_inode_clear.patch b/net/shfs/patches/102-shfs_0.35_clean_inode_clear.patch new file mode 100644 index 0000000..f12fc96 --- /dev/null +++ b/net/shfs/patches/102-shfs_0.35_clean_inode_clear.patch @@ -0,0 +1,22 @@ +Index: shfs-0.35/shfs/Linux-2.6/inode.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/inode.c 2007-06-04 13:22:58.397977440 +0200 ++++ shfs-0.35/shfs/Linux-2.6/inode.c 2007-06-04 13:22:58.637940960 +0200 +@@ -8,6 +8,7 @@ + #include + #endif + ++#include + #include + #include + #include +@@ -118,6 +119,9 @@ + } + KMEM_FREE("inode", inode_cache, i); + out: ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)) ++ truncate_inode_pages(&inode->i_data, 0); ++#endif + clear_inode(inode); + } + diff --git a/net/shfs/patches/103-shfs_0.35_gcc4.patch b/net/shfs/patches/103-shfs_0.35_gcc4.patch new file mode 100644 index 0000000..e4c1388 --- /dev/null +++ b/net/shfs/patches/103-shfs_0.35_gcc4.patch @@ -0,0 +1,25 @@ +Index: shfs-0.35/shfs/Linux-2.6/dir.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/dir.c 2007-06-04 13:22:58.041031704 +0200 ++++ shfs-0.35/shfs/Linux-2.6/dir.c 2007-06-04 13:22:58.822912840 +0200 +@@ -19,6 +19,8 @@ + #include "shfs_debug.h" + #include "proc.h" + ++static struct dentry_operations shfs_dentry_operations; ++ + static int + shfs_dir_open(struct inode *inode, struct file *filp) + { +Index: shfs-0.35/shfs/Linux-2.6/shfs_fs.h +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/shfs_fs.h 2007-06-04 13:22:58.398977288 +0200 ++++ shfs-0.35/shfs/Linux-2.6/shfs_fs.h 2007-06-04 13:22:58.823912688 +0200 +@@ -56,7 +56,6 @@ + #define ROUND_TO_MINS(x) do { (x).tv_sec = ((x).tv_sec / 60) * 60; (x).tv_nsec = 0; } while (0) + + /* shfs/dir.c */ +-extern struct dentry_operations shfs_dentry_operations; + extern struct file_operations shfs_dir_operations; + extern struct inode_operations shfs_dir_inode_operations; + extern void shfs_new_dentry(struct dentry *dentry); diff --git a/net/shfs/patches/104-shfs_0.35_inode_and_fs.patch b/net/shfs/patches/104-shfs_0.35_inode_and_fs.patch new file mode 100644 index 0000000..0953e6b --- /dev/null +++ b/net/shfs/patches/104-shfs_0.35_inode_and_fs.patch @@ -0,0 +1,377 @@ +Index: shfs-0.35/shfs/Linux-2.6/fcache.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/fcache.c 2007-06-04 13:22:57.997038392 +0200 ++++ shfs-0.35/shfs/Linux-2.6/fcache.c 2007-06-04 13:22:59.019882896 +0200 +@@ -100,7 +100,11 @@ + VERBOSE("dir in file cache?\n"); + return -EINVAL; + } ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ p = (struct shfs_inode_info *)inode->i_private; ++#else + p = (struct shfs_inode_info *)inode->u.generic_ip; ++#endif + if (!p) { + VERBOSE("inode without info\n"); + return -EINVAL; +@@ -127,7 +131,11 @@ + VERBOSE("dir in file cache?\n"); + return -EINVAL; + } ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ p = (struct shfs_inode_info *)inode->i_private; ++#else + p = (struct shfs_inode_info *)inode->u.generic_ip; ++#endif + if (!p) { + VERBOSE("inode without info\n"); + return -EINVAL; +@@ -160,7 +168,11 @@ + if (result == 0) { + struct shfs_inode_info *p; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ p = (struct shfs_inode_info *)f->f_dentry->d_inode->i_private; ++#else + p = (struct shfs_inode_info *)f->f_dentry->d_inode->u.generic_ip; ++#endif + if (!p) { + VERBOSE("inode without info\n"); + return -EINVAL; +@@ -184,7 +196,11 @@ + return -EINVAL; + } + DEBUG("ino: %lu\n", inode->i_ino); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ p = (struct shfs_inode_info *)inode->i_private; ++#else + p = (struct shfs_inode_info *)inode->u.generic_ip; ++#endif + if (!p) { + VERBOSE("inode without info\n"); + return -EINVAL; +@@ -226,7 +242,11 @@ + VERBOSE("dir in file cache?\n"); + return -EINVAL; + } ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ p = (struct shfs_inode_info *)inode->i_private; ++#else + p = (struct shfs_inode_info *)inode->u.generic_ip; ++#endif + if (!p) { + VERBOSE("inode without info\n"); + return -EINVAL; +@@ -327,7 +347,11 @@ + VERBOSE("dir in file cache?\n"); + return -EINVAL; + } ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ p = (struct shfs_inode_info *)inode->i_private; ++#else + p = (struct shfs_inode_info *)inode->u.generic_ip; ++#endif + if (!p) { + VERBOSE("inode without info\n"); + return -EINVAL; +Index: shfs-0.35/shfs/Linux-2.6/inode.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/inode.c 2007-06-04 13:22:58.637940960 +0200 ++++ shfs-0.35/shfs/Linux-2.6/inode.c 2007-06-04 13:22:59.020882744 +0200 +@@ -36,7 +36,11 @@ + shfs_set_inode_attr(struct inode *inode, struct shfs_fattr *fattr) + { + struct shfs_sb_info *info = info_from_inode(inode); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ struct shfs_inode_info *i = inode->i_private; ++#else + struct shfs_inode_info *i = inode->u.generic_ip; ++#endif + struct timespec last_time = inode->i_mtime; + loff_t last_size = inode->i_size; + +@@ -53,7 +57,9 @@ + inode->i_ctime = fattr->f_ctime; + inode->i_atime = fattr->f_atime; + inode->i_mtime = fattr->f_mtime; ++#ifdef STRUCT_INODE_HAS_I_BLKSIZE + inode->i_blksize= fattr->f_blksize; ++#endif + inode->i_blocks = fattr->f_blocks; + inode->i_size = fattr->f_size; + +@@ -76,7 +82,11 @@ + if (!inode) + return NULL; + inode->i_ino = fattr->f_ino; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ i = inode->i_private = (struct shfs_inode_info *)KMEM_ALLOC("inode", inode_cache, GFP_KERNEL); ++#else + i = inode->u.generic_ip = (struct shfs_inode_info *)KMEM_ALLOC("inode", inode_cache, GFP_KERNEL); ++#endif + if (!i) + return NULL; + i->cache = NULL; +@@ -108,7 +118,11 @@ + struct shfs_inode_info *i; + + DEBUG("ino: %lu\n", inode->i_ino); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ i = (struct shfs_inode_info *)inode->i_private; ++#else + i = (struct shfs_inode_info *)inode->u.generic_ip; ++#endif + if (!i) { + VERBOSE("invalid inode\n"); + goto out; +@@ -176,7 +190,11 @@ + { + struct shfs_sb_info *info = info_from_dentry(dentry); + struct inode *inode = dentry->d_inode; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ struct shfs_inode_info *i = (struct shfs_inode_info *)inode->i_private; ++#else + struct shfs_inode_info *i = (struct shfs_inode_info *)inode->u.generic_ip; ++#endif + int result; + + DEBUG("%s\n", dentry->d_name.name); +Index: shfs-0.35/shfs/Linux-2.6/dir.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/dir.c 2007-06-04 13:22:58.822912840 +0200 ++++ shfs-0.35/shfs/Linux-2.6/dir.c 2007-06-04 13:22:59.020882744 +0200 +@@ -302,8 +302,13 @@ + + shfs_invalid_dir_cache(dir); + result = shfs_instantiate(dentry); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ if (forced_write && dentry->d_inode && dentry->d_inode->i_private) ++ ((struct shfs_inode_info *)dentry->d_inode->i_private)->unset_write_on_close = 1; ++#else + if (forced_write && dentry->d_inode && dentry->d_inode->u.generic_ip) + ((struct shfs_inode_info *)dentry->d_inode->u.generic_ip)->unset_write_on_close = 1; ++#endif + return result; + } + +Index: shfs-0.35/shfs/Linux-2.6/file.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/file.c 2007-06-04 13:22:58.397977440 +0200 ++++ shfs-0.35/shfs/Linux-2.6/file.c 2007-06-04 13:22:59.020882744 +0200 +@@ -90,7 +90,11 @@ + struct dentry *dentry = f->f_dentry; + struct shfs_sb_info *info = info_from_dentry(dentry); + struct inode *inode = p->mapping->host; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ struct shfs_inode_info *i = (struct shfs_inode_info *)inode->i_private; ++#else + struct shfs_inode_info *i = (struct shfs_inode_info *)inode->u.generic_ip; ++#endif + char *buffer = kmap(p) + offset; + int written = 0, result; + unsigned count = to - offset; +@@ -252,8 +256,13 @@ + } + } + /* if file was forced to be writeable, change attrs back on close */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ if (dentry->d_inode && dentry->d_inode->i_private) { ++ if (((struct shfs_inode_info *)dentry->d_inode->i_private)->unset_write_on_close) { ++#else + if (dentry->d_inode && dentry->d_inode->u.generic_ip) { + if (((struct shfs_inode_info *)dentry->d_inode->u.generic_ip)->unset_write_on_close) { ++#endif + char name[SHFS_PATH_MAX]; + + if (get_name(dentry, name) < 0) +@@ -302,7 +311,8 @@ + goto error; + } + if (result != 0) { +- copy_to_user(buf, (char *)page, result); ++ if (copy_to_user(buf, (char *)page, result)) ++ goto error; + *ppos += result; + } + error: +@@ -315,11 +325,15 @@ + static ssize_t + shfs_slow_write(struct file *f, const char *buf, size_t count, loff_t *offset) + { +- int written = 0; ++ ssize_t written = 0; + int result; + + DEBUG("\n"); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ written = do_sync_write(f, buf, count, offset); ++#else + written = generic_file_write(f, buf, count, offset); ++#endif + if (written > 0) { + result = do_file_flush(f); + written = result < 0 ? result: written; +@@ -330,14 +344,23 @@ + + struct file_operations shfs_file_operations = { + .llseek = generic_file_llseek, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ .read = do_sync_read, ++ .write = do_sync_write, ++#else + .read = generic_file_read, + .write = generic_file_write, ++#endif + .ioctl = shfs_ioctl, + .mmap = generic_file_mmap, + .open = shfs_file_open, + .flush = shfs_file_flush, + .release = shfs_file_release, + .fsync = shfs_file_sync, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ .aio_read = generic_file_aio_read, ++ .aio_write = generic_file_aio_write, ++#endif + }; + + struct file_operations shfs_slow_operations = { +Index: shfs-0.35/shfs/Linux-2.6/proc.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/proc.c 2007-06-04 13:22:58.398977288 +0200 ++++ shfs-0.35/shfs/Linux-2.6/proc.c 2007-06-04 13:22:59.021882592 +0200 +@@ -149,7 +149,12 @@ + { + struct file *f = info->sock; + mm_segment_t fs; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ ssize_t result = 0; ++ loff_t begin; ++#else + int c, result = 0; ++#endif + unsigned long flags, sigpipe; + sigset_t old_set; + +@@ -161,7 +166,9 @@ + return result; + } + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) + c = count; ++#endif + + fs = get_fs(); + set_fs(get_ds()); +@@ -173,6 +180,16 @@ + SIGRECALC; + SIGUNLOCK(flags); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ begin = f->f_pos; ++ result = do_sync_write(f, buffer, count, &f->f_pos); ++ ++ if (result < 0) { ++ DEBUG("error: %d\n", result); ++ fput(f); ++ info->sock = NULL; ++ } ++#else + do { + struct iovec vec[1]; + +@@ -190,6 +207,7 @@ + buffer += result; + c -= result; + } while (c > 0); ++#endif + + SIGLOCK(flags); + if (result == -EPIPE && !sigpipe) { +@@ -204,7 +222,11 @@ + + DEBUG(">%d\n", result); + if (result < 0) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ set_garbage(info, 1, count - (f->f_pos - begin)); ++#else + set_garbage(info, 1, c); ++#endif + else + result = count; + return result; +@@ -222,6 +244,9 @@ + int c, result = 0; + unsigned long flags, sigpipe; + sigset_t old_set; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ loff_t begin; ++#endif + + if (!f) + return -EIO; +@@ -256,6 +281,20 @@ + fs = get_fs(); + set_fs(get_ds()); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ begin = f->f_pos; ++ result = do_sync_read(f, buffer, c, &f->f_pos); ++ ++ if (!result) { ++ /* peer has closed socket */ ++ result = -EIO; ++ } ++ if (result < 0) { ++ DEBUG("error: %d\n", result); ++ fput(f); ++ info->sock = NULL; ++ } ++#else + do { + struct iovec vec[1]; + +@@ -277,6 +316,7 @@ + buffer += result; + c -= result; + } while (c > 0); ++#endif + + SIGLOCK(flags); + if (result == -EPIPE && !sigpipe) { +@@ -291,7 +331,11 @@ + + DEBUG("<%d\n", result); + if (result < 0) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ set_garbage(info, 0, count - (f->f_pos - begin)); ++#else + set_garbage(info, 0, c); ++#endif + else + result = count; + return result; +@@ -316,8 +360,10 @@ + return result; + } + while (1) { ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) + struct iovec vec[1]; + ++#endif + nl = memchr(BUFFER, '\n', LEN); + if (nl) { + *nl = '\0'; +@@ -348,9 +394,13 @@ + fs = get_fs(); + set_fs(get_ds()); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ++ result = do_sync_read(f, BUFFER+LEN, c, &f->f_pos); ++#else + vec[0].iov_base = BUFFER+LEN; + vec[0].iov_len = c; + result = f->f_op->readv(f, (const struct iovec *)&vec, 1, &f->f_pos); ++#endif + SIGLOCK(flags); + if (result == -EPIPE && !sigpipe) { + sigdelset(¤t->pending.signal, SIGPIPE); diff --git a/net/shfs/patches/105-space_chars.patch b/net/shfs/patches/105-space_chars.patch new file mode 100644 index 0000000..03ad832 --- /dev/null +++ b/net/shfs/patches/105-space_chars.patch @@ -0,0 +1,70 @@ +Index: shfs-0.35/shfs/Linux-2.4/shell.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.4/shell.c 2007-06-04 13:22:57.970042496 +0200 ++++ shfs-0.35/shfs/Linux-2.4/shell.c 2007-06-04 13:22:59.249847936 +0200 +@@ -213,6 +213,7 @@ + int c = 0; + int is_space = 1; + int device = 0; ++ char *start = s; + + while (*s) { + if (c == DIR_COLS) +@@ -227,17 +228,20 @@ + s++; + } + *s = '\0'; ++ start = s+1; + is_space = 1; ++ } else { ++ if (c != DIR_NAME) ++ start = s+1; + } + } else { + if (is_space) { + /* (b)lock/(c)haracter device hack */ +- col[c++] = s; ++ col[c++] = start; + is_space = 0; + if ((c-1 == DIR_PERM) && ((*s == 'b')||(*s == 'c'))) { + device = 1; + } +- + } + } + s++; +Index: shfs-0.35/shfs/Linux-2.6/shell.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/shell.c 2007-06-04 13:22:57.977041432 +0200 ++++ shfs-0.35/shfs/Linux-2.6/shell.c 2007-06-04 13:22:59.249847936 +0200 +@@ -225,6 +225,7 @@ + int c = 0; + int is_space = 1; + int device = 0; ++ char *start = s; + + while (*s) { + if (c == DIR_COLS) +@@ -239,17 +240,20 @@ + s++; + } + *s = '\0'; ++ start = s+1; + is_space = 1; ++ } else { ++ if (c != DIR_NAME) ++ start = s+1; + } + } else { + if (is_space) { + /* (b)lock/(c)haracter device hack */ +- col[c++] = s; ++ col[c++] = start; + is_space = 0; + if ((c-1 == DIR_PERM) && ((*s == 'b')||(*s == 'c'))) { + device = 1; + } +- + } + } + s++; diff --git a/net/shfs/patches/106-uidgid32.patch b/net/shfs/patches/106-uidgid32.patch new file mode 100644 index 0000000..60510a2 --- /dev/null +++ b/net/shfs/patches/106-uidgid32.patch @@ -0,0 +1,38 @@ +Index: shfs-0.35/shfs/Linux-2.4/shfs_fs_sb.h +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.4/shfs_fs_sb.h 2007-06-04 13:22:57.941046904 +0200 ++++ shfs-0.35/shfs/Linux-2.4/shfs_fs_sb.h 2007-06-04 13:22:59.448817688 +0200 +@@ -38,10 +38,10 @@ + struct shfs_fileops fops; + int version; + int ttl; +- __kernel_uid_t uid; +- __kernel_gid_t gid; +- __kernel_mode_t root_mode; +- __kernel_mode_t fmask; ++ uid_t uid; ++ gid_t gid; ++ mode_t root_mode; ++ mode_t fmask; + char mount_point[SHFS_PATH_MAX]; + struct semaphore sock_sem; /* next 4 vars are guarded */ + struct file *sock; +Index: shfs-0.35/shfs/Linux-2.6/shfs_fs_sb.h +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/shfs_fs_sb.h 2007-06-04 13:22:57.949045688 +0200 ++++ shfs-0.35/shfs/Linux-2.6/shfs_fs_sb.h 2007-06-04 13:22:59.449817536 +0200 +@@ -38,10 +38,10 @@ + struct shfs_fileops fops; + int version; + int ttl; +- __kernel_uid_t uid; +- __kernel_gid_t gid; +- __kernel_mode_t root_mode; +- __kernel_mode_t fmask; ++ uid_t uid; ++ gid_t gid; ++ mode_t root_mode; ++ mode_t fmask; + char mount_point[SHFS_PATH_MAX]; + struct semaphore sock_sem; /* next 4 vars are guarded */ + struct file *sock; diff --git a/net/shfs/patches/107-df.patch b/net/shfs/patches/107-df.patch new file mode 100644 index 0000000..ca2c9d0 --- /dev/null +++ b/net/shfs/patches/107-df.patch @@ -0,0 +1,38 @@ +Index: shfs-0.35/shfs/Linux-2.4/shell.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.4/shell.c 2007-06-04 13:22:59.249847936 +0200 ++++ shfs-0.35/shfs/Linux-2.4/shell.c 2007-06-04 13:22:59.643788048 +0200 +@@ -961,11 +961,11 @@ + + s = info->sockbuf; + if ((p = strsep(&s, " "))) +- attr->f_blocks = simple_strtoull(p, NULL, 10); ++ attr->f_blocks = simple_strtoull(p, NULL, 10) >> 2; + if ((p = strsep(&s, " "))) +- attr->f_bfree = attr->f_blocks - simple_strtoull(p, NULL, 10); ++ attr->f_bfree = attr->f_blocks - (simple_strtoull(p, NULL, 10) >> 2); + if ((p = strsep(&s, " "))) +- attr->f_bavail = simple_strtoull(p, NULL, 10); ++ attr->f_bavail = simple_strtoull(p, NULL, 10) >> 2; + + result = sock_readln(info, info->sockbuf, SOCKBUF_SIZE); + if (result < 0) +Index: shfs-0.35/shfs/Linux-2.6/shell.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/shell.c 2007-06-04 13:22:59.249847936 +0200 ++++ shfs-0.35/shfs/Linux-2.6/shell.c 2007-06-04 13:22:59.643788048 +0200 +@@ -974,11 +974,11 @@ + + s = info->sockbuf; + if ((p = strsep(&s, " "))) +- attr->f_blocks = simple_strtoull(p, NULL, 10); ++ attr->f_blocks = simple_strtoull(p, NULL, 10) >> 2; + if ((p = strsep(&s, " "))) +- attr->f_bfree = attr->f_blocks - simple_strtoull(p, NULL, 10); ++ attr->f_bfree = attr->f_blocks - (simple_strtoull(p, NULL, 10) >> 2); + if ((p = strsep(&s, " "))) +- attr->f_bavail = simple_strtoull(p, NULL, 10); ++ attr->f_bavail = simple_strtoull(p, NULL, 10) >> 2; + + result = sock_readln(info, info->sockbuf, SOCKBUF_SIZE); + if (result < 0) diff --git a/net/shfs/patches/108-no_update_mtab.patch b/net/shfs/patches/108-no_update_mtab.patch new file mode 100644 index 0000000..9b4a9ae --- /dev/null +++ b/net/shfs/patches/108-no_update_mtab.patch @@ -0,0 +1,28 @@ +Index: shfs-0.35/shfsmount/shfsmount.c +=================================================================== +--- shfs-0.35.orig/shfsmount/shfsmount.c 2007-06-04 13:22:57.883055720 +0200 ++++ shfs-0.35/shfsmount/shfsmount.c 2007-06-04 13:22:59.838758408 +0200 +@@ -74,7 +74,7 @@ + static int have_uid = 0; + + /* do not update /etc/mtab */ +-static int nomtab = 0; ++static int nomtab = 1; + + /* preserve owner of files */ + static int preserve = 0; +Index: shfs-0.35/shfsmount/shfsumount.c +=================================================================== +--- shfs-0.35.orig/shfsmount/shfsumount.c 2007-06-04 13:22:57.890054656 +0200 ++++ shfs-0.35/shfsmount/shfsumount.c 2007-06-04 13:22:59.838758408 +0200 +@@ -67,10 +67,6 @@ + FILE *new_mtab; + struct mntent *ment; + +- if ((fd = open(MOUNTED"~", O_RDWR|O_CREAT|O_EXCL, 0600)) == -1) { +- fprintf(stderr, "Can't get "MOUNTED"~ lock file"); +- return 0; +- } + close(fd); + if ((mtab = setmntent(MOUNTED, "r")) == NULL) { + fprintf(stderr, "Can't open " MOUNTED ": %s\n", strerror(errno)); diff --git a/net/shfs/patches/109-linux_2.6.22.patch b/net/shfs/patches/109-linux_2.6.22.patch new file mode 100644 index 0000000..c91e052 --- /dev/null +++ b/net/shfs/patches/109-linux_2.6.22.patch @@ -0,0 +1,26 @@ +Index: shfs-0.35/shfs/Linux-2.6/dir.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/dir.c 2007-06-17 04:08:32.449815896 +0200 ++++ shfs-0.35/shfs/Linux-2.6/dir.c 2007-06-17 04:08:41.766399560 +0200 +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "shfs_fs.h" + #include "shfs_fs_i.h" +Index: shfs-0.35/shfs/Linux-2.6/inode.c +=================================================================== +--- shfs-0.35.orig/shfs/Linux-2.6/inode.c 2007-06-17 04:09:01.961329464 +0200 ++++ shfs-0.35/shfs/Linux-2.6/inode.c 2007-06-17 04:13:08.501849608 +0200 +@@ -15,6 +15,9 @@ + #include + #include + #include ++#include ++#include ++#include + + #include "shfs_fs.h" + #include "shfs_fs_sb.h" diff --git a/net/shorewall-lite/Makefile b/net/shorewall-lite/Makefile new file mode 100644 index 0000000..9a9ce6c --- /dev/null +++ b/net/shorewall-lite/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=shorewall-lite +PKG_VERSION:=4.4.12.2 +PKG_DIRECTORY:=4.4.12 +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ \ + http://www1.shorewall.net/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ \ + http://slovakia.shorewall.net/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ \ + http://shorewall.de/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ \ + http://www.shorewall.com.au/4.4/shorewall-$(PKG_DIRECTORY)/ \ + http://shorewall.infohiiway.com/pub/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ \ + http://www.shorewall.com.ar/pub/shorewall/shorewall/4.4/shorewall-$(PKG_DIRECTORY)/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=b030e988c36fc1ef8c0e27447faef2a6 + +include $(INCLUDE_DIR)/package.mk + +define Package/shorewall-lite + SECTION:=net + CATEGORY:=Network + DEPENDS:=+ip +iptables + TITLE:=Shorewall Lite + URL:=http://www.shorewall.net/ + SUBMENU:=Firewall +endef + +define Package/shorewall-lite/description + Shoreline Firewall Lite is an iptables-based firewall for Linux systems. +endef + +define Package/shorewall-lite/conffiles +/etc/shorewall-lite/shorewall-lite.conf +/etc/shorewall-lite/vardir +endef + +define Build/Compile + PREFIX=$(PKG_INSTALL_DIR) $(PKG_BUILD_DIR)/install.sh +endef + +define Package/shorewall-lite/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_DIR) $(1)/etc/lsm/script.d + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DIR) $(1)/etc/shorewall-lite + $(INSTALL_DIR) $(1)/usr/share + $(INSTALL_BIN) ./files/shorewall-lite.init $(1)/etc/init.d/shorewall-lite + $(INSTALL_BIN) ./files/hotplug_iface $(1)/etc/hotplug.d/iface/05-shorewall-lite + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/shorewall-lite $(1)/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall-lite $(1)/usr/share + $(INSTALL_BIN) ./files/hostname $(1)/usr/share/shorewall-lite + $(INSTALL_BIN) ./files/lsm_script $(1)/etc/lsm/script.d/45_shorewall-lite + $(CP) $(PKG_INSTALL_DIR)/etc/shorewall-lite $(1)/etc + $(CP) ./files/vardir $(1)/etc/shorewall-lite +endef + +$(eval $(call BuildPackage,shorewall-lite)) diff --git a/net/shorewall-lite/files/hostname b/net/shorewall-lite/files/hostname new file mode 100644 index 0000000..42e1643 --- /dev/null +++ b/net/shorewall-lite/files/hostname @@ -0,0 +1,2 @@ +#!/bin/sh +cat /proc/sys/kernel/hostname diff --git a/net/shorewall-lite/files/hotplug_iface b/net/shorewall-lite/files/hotplug_iface new file mode 100644 index 0000000..acb9950 --- /dev/null +++ b/net/shorewall-lite/files/hotplug_iface @@ -0,0 +1,12 @@ +#!/bin/sh + +# should restart shorewall when an interface comes up + +[ ifup = "$ACTION" ] && { + /etc/init.d/shorewall-lite restart +} + +[ ifdown = "$ACTION" ] && { + # might need to restore some routing + /etc/init.d/shorewall-lite restart +} diff --git a/net/shorewall-lite/files/lsm_script b/net/shorewall-lite/files/lsm_script new file mode 100644 index 0000000..f0ccb34 --- /dev/null +++ b/net/shorewall-lite/files/lsm_script @@ -0,0 +1,33 @@ +#!/bin/sh + +STATE=${1} +NAME=${2} +CHECKIP=${3} +DEVICE=${4} +WARN_EMAIL=${5} +REPLIED=${6} +WAITING=${7} +TIMEOUT=${8} +REPLY_LATE=${9} +CONS_RCVD=${10} +CONS_WAIT=${11} +CONS_MISS=${12} +AVG_RTT=${13} + +if [ -f /usr/share/shorewall-lite/lib.base ]; then + VARDIR=/var/lib/shorewall-lite + STATEDIR=/etc/shorewall-lite +else + VARDIR=/var/lib/shorewall + STATEDIR=/etc/shorewall +fi + +[ -f ${STATEDIR}/vardir ] && . ${STATEDIR}/vardir + +[ ${STATE} = up ] && state=0 || state=1 + +echo $state > ${VARDIR}/${DEVICE}.status + +/sbin/shorewall-lite restart -f >> /var/log/lsm 2>&1 + +/sbin/shorewall-lite show routing >> /var/log/lsm diff --git a/net/shorewall-lite/files/shorewall-lite.init b/net/shorewall-lite/files/shorewall-lite.init new file mode 100644 index 0000000..fb081f3 --- /dev/null +++ b/net/shorewall-lite/files/shorewall-lite.init @@ -0,0 +1,20 @@ +#!/bin/sh /etc/rc.common + +START=46 +start() { + touch /var/log/messages + mkdir -p /var/lock/subsys + /sbin/shorewall-lite -qq start -f +} + +stop() { + /sbin/shorewall-lite -qq stop +} + +restart() { + if [ -f /etc/shorewall-lite/state/restore ] ; then + /sbin/shorewall-lite -qq restore + else + /sbin/shorewall-lite -qq restart + fi +} diff --git a/net/shorewall-lite/files/vardir b/net/shorewall-lite/files/vardir new file mode 100644 index 0000000..3afdabb --- /dev/null +++ b/net/shorewall-lite/files/vardir @@ -0,0 +1,2 @@ +# move state dir out of ram +VARDIR=/etc/shorewall-lite/state diff --git a/net/shorewall-lite/patches/110-MODULESDIR.patch b/net/shorewall-lite/patches/110-MODULESDIR.patch new file mode 100644 index 0000000..a947709 --- /dev/null +++ b/net/shorewall-lite/patches/110-MODULESDIR.patch @@ -0,0 +1,20 @@ +--- a/lib.common ++++ b/lib.common +@@ -220,7 +220,7 @@ reload_kernel_modules() { + + [ -z "$MODULESDIR" ] && \ + uname=$(uname -r) && \ +- MODULESDIR=/lib/modules/$uname/kernel/net/ipv4/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset ++ MODULESDIR=/lib/modules/$uname/kernel/net/ipv4/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset:/lib/modules/$uname + + MODULES=$(lsmod | cut -d ' ' -f1) + +@@ -259,7 +259,7 @@ load_kernel_modules() # $1 = Yes, if we + + [ -z "$MODULESDIR" ] && \ + uname=$(uname -r) && \ +- MODULESDIR=/lib/modules/$uname/kernel/net/ipv4/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset ++ MODULESDIR=/lib/modules/$uname/kernel/net/ipv4/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset:/lib/modules/$uname + + for directory in $(split $MODULESDIR); do + [ -d $directory ] && moduledirectories="$moduledirectories $directory" diff --git a/net/shorewall-lite/patches/120-LOGFILE.patch b/net/shorewall-lite/patches/120-LOGFILE.patch new file mode 100644 index 0000000..5a70fd4 --- /dev/null +++ b/net/shorewall-lite/patches/120-LOGFILE.patch @@ -0,0 +1,11 @@ +--- a/shorewall-lite.conf 2009-12-05 22:37:43.000000000 -0500 ++++ b/shorewall-lite.conf 2009-12-05 22:37:51.000000000 -0500 +@@ -28,7 +28,7 @@ + # L O G G I N G + ############################################################################### + +-LOGFILE= ++LOGFILE=/dev/null + + LOGFORMAT= + diff --git a/net/sipp/Makefile b/net/sipp/Makefile new file mode 100644 index 0000000..31a48a3 --- /dev/null +++ b/net/sipp/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sipp +PKG_VERSION:=3.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).src.tar.gz +PKG_SOURCE_URL:=@SF/sipp +PKG_MD5SUM:=452a6f88f2d314dbb2f44e318a60982b + +include $(INCLUDE_DIR)/package.mk + +define Package/sipp + SECTION:=net + CATEGORY:=Network + SUBMENU:=Telephony + DEPENDS:= +libncurses +libpthread +uclibcxx + TITLE:=test tool / traffic generator for the SIP protocol + URL:=http://sipp.sourceforge.net/ +endef + +define Package/sipp/description + SIPp is a free Open Source test tool / traffic generator for the SIP + protocol. It includes a few basic SipStone user agent scenarios (UAC and + UAS) and establishes and releases multiple calls with the INVITE and BYE + methods. +endef + +TAR_CMD:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components 1 $(TAR_OPTIONS) + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CC_linux="$(TARGET_CC)" \ + CPP_linux="$(TARGET_CC)" \ + CCLINK_linux="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS_linux="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++ -fno-builtin -fno-rtti -nostdinc++" \ + LFLAGS_linux="$(TARGET_LDFLAGS)" \ + LIBS="-nodefaultlibs -lncurses -luClibc++ -ldl -lpthread -lm $(LIBGCC_S)" \ + all +endef + +define Package/sipp/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sipp $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,sipp)) diff --git a/net/siproxd/Makefile b/net/siproxd/Makefile new file mode 100644 index 0000000..828463f --- /dev/null +++ b/net/siproxd/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=siproxd +PKG_VERSION:=0.7.1 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/siproxd +PKG_MD5SUM:=45e5a44803181e2bf3361d562060c904 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/siproxd + SECTION:=net + CATEGORY:=Network + SUBMENU:=Telephony + DEPENDS:=+libltdl +libosip2 +libpthread + TITLE:=SIP (Session Initiation Protocol) proxy + URL:=http://siproxd.sourceforge.net/ +endef + +define Package/siproxd/conffiles +/etc/config/siproxd +endef + +CONFIGURE_ARGS+= \ + --with-libosip-prefix="$(STAGING_DIR)/usr" \ + +MAKE_FLAGS+= \ + SUBDIRS="src scripts contrib" \ + LIBLTDL="$(STAGING_DIR)/usr/lib/libltdl.la" \ + +define Package/siproxd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/siproxd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/siproxd + $(CP) $(PKG_INSTALL_DIR)/usr/lib/siproxd/plugin_*.so* $(1)/usr/lib/siproxd/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/siproxd.config $(1)/etc/config/siproxd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/siproxd.init $(1)/etc/init.d/siproxd +endef + +$(eval $(call BuildPackage,siproxd)) diff --git a/net/siproxd/files/siproxd.config b/net/siproxd/files/siproxd.config new file mode 100644 index 0000000..3904b91 --- /dev/null +++ b/net/siproxd/files/siproxd.config @@ -0,0 +1,3 @@ +config siproxd general + option if_inbound 'lan' + option if_outbound 'wan' diff --git a/net/siproxd/files/siproxd.init b/net/siproxd/files/siproxd.init new file mode 100644 index 0000000..03fb58b --- /dev/null +++ b/net/siproxd/files/siproxd.init @@ -0,0 +1,132 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 Alina Friedrichsen + +START=50 + +start() { + local ifname + local cfgt + + option_cb() { + local varname="$1" + local value="$2" + local cfg="$CONFIG_SECTION" + local cfgt + local item + local c + + config_get cfgt "$cfg" TYPE + + if [ "$cfgt" == siproxd ]; then + if [ "$varname" == config_file ]; then + CONFIG_FILE="$value" + elif [ "$varname" == if_inbound ]; then + IF_INBOUND="$value" + elif [ "$varname" == if_outbound ]; then + IF_OUTBOUND="$value" + elif [ "$varname" == mask_host ]; then + c=0 + for item in $value + do + if [ "$((c % 2))" -eq 0 ]; then + printf '%s\n' "mask_host = $item" >> /var/etc/siproxd.conf + else + printf '%s\n' "masked_host = $item" >> /var/etc/siproxd.conf + fi + c=$((c + 1)) + done + elif [ "$varname" == outbound_domain ]; then + c=0 + for item in $value + do + if [ "$((c % 3))" -eq 0 ]; then + printf '%s\n' "outbound_domain_name = $item" >> /var/etc/siproxd.conf + elif [ "$((c % 3))" -eq 1 ]; then + printf '%s\n' "outbound_domain_host = $item" >> /var/etc/siproxd.conf + else + printf '%s\n' "outbound_domain_port = $item" >> /var/etc/siproxd.conf + fi + c=$((c + 1)) + done + elif [ "$varname" == pi_shortdial_entry ]; then + for item in $value + do + printf '%s\n' "pi_shortdial_entry = $item" >> /var/etc/siproxd.conf + done + else + if [ "$varname" == hosts_allow_reg -o "$varname" == hosts_allow_sip -o "$varname" == hosts_deny_sip ]; then + value=$(printf '%s' "$value" | tr -s '\t ' ',') + fi + [ "$varname" == sip_listen_port ] && SIP_LISTEN_PORT="" + [ "$varname" == daemonize ] && DAEMONIZE="" + [ "$varname" == silence_log ] && SILENCE_LOG="" + [ "$varname" == log_calls ] && LOG_CALLS="" + [ "$varname" == user ] && USER="" + [ "$varname" == registration_file ] && REGISTRATION_FILE="" + [ "$varname" == pid_file ] && PID_FILE="" + [ "$varname" == rtp_proxy_enable ] && RTP_PROXY_ENABLE="" + [ "$varname" == rtp_port_low ] && RTP_PORT_LOW="" + [ "$varname" == rtp_port_high ] && RTP_PORT_HIGH="" + [ "$varname" == rtp_timeout ] && RTP_TIMEOUT="" + [ "$varname" == default_expires ] && DEFAULT_EXPIRES="" + [ "$varname" == debug_level ] && DEBUG_LEVEL="" + [ "$varname" == debug_port ] && DEBUG_PORT="" + printf '%s\n' "$varname = $value" >> /var/etc/siproxd.conf + fi + fi + } + + mkdir -p /var/etc + > /var/etc/siproxd.conf + mkdir -p /var/lib/siproxd + chmod 777 /var/lib/siproxd + mkdir -p /var/run/siproxd + chmod 777 /var/run/siproxd + CONFIG_FILE=/var/etc/siproxd.conf + SIP_LISTEN_PORT=5060 + DAEMONIZE=1 + SILENCE_LOG=0 + LOG_CALLS=1 + USER=nobody + REGISTRATION_FILE=/var/lib/siproxd/siproxd_registrations + PID_FILE=/var/run/siproxd/siproxd.pid + RTP_PROXY_ENABLE=1 + RTP_PORT_LOW=7070 + RTP_PORT_HIGH=7089 + RTP_TIMEOUT=300 + DEFAULT_EXPIRES=600 + DEBUG_LEVEL=0x00000000 + DEBUG_PORT=0 + config_load siproxd + [ -n "$SIP_LISTEN_PORT" ] && printf '%s\n' "sip_listen_port = $SIP_LISTEN_PORT" >> /var/etc/siproxd.conf + [ -n "$DAEMONIZE" ] && printf '%s\n' "daemonize = $DAEMONIZE" >> /var/etc/siproxd.conf + [ -n "$SILENCE_LOG" ] && printf '%s\n' "silence_log = $SILENCE_LOG" >> /var/etc/siproxd.conf + [ -n "$LOG_CALLS" ] && printf '%s\n' "log_calls = $LOG_CALLS" >> /var/etc/siproxd.conf + [ -n "$USER" ] && printf '%s\n' "user = $USER" >> /var/etc/siproxd.conf + [ -n "$REGISTRATION_FILE" ] && printf '%s\n' "registration_file = $REGISTRATION_FILE" >> /var/etc/siproxd.conf + [ -n "$PID_FILE" ] && printf '%s\n' "pid_file = $PID_FILE" >> /var/etc/siproxd.conf + [ -n "$RTP_PROXY_ENABLE" ] && printf '%s\n' "rtp_proxy_enable = $RTP_PROXY_ENABLE" >> /var/etc/siproxd.conf + [ -n "$RTP_PORT_LOW" ] && printf '%s\n' "rtp_port_low = $RTP_PORT_LOW" >> /var/etc/siproxd.conf + [ -n "$RTP_PORT_HIGH" ] && printf '%s\n' "rtp_port_high = $RTP_PORT_HIGH" >> /var/etc/siproxd.conf + [ -n "$RTP_TIMEOUT" ] && printf '%s\n' "rtp_timeout = $RTP_TIMEOUT" >> /var/etc/siproxd.conf + [ -n "$DEFAULT_EXPIRES" ] && printf '%s\n' "default_expires = $DEFAULT_EXPIRES" >> /var/etc/siproxd.conf + [ -n "$DEBUG_LEVEL" ] && printf '%s\n' "debug_level = $DEBUG_LEVEL" >> /var/etc/siproxd.conf + [ -n "$DEBUG_PORT" ] && printf '%s\n' "debug_port = $DEBUG_PORT" >> /var/etc/siproxd.conf + reset_cb + include /lib/network + scan_interfaces + config_load /var/state/network + if [ -n "$IF_INBOUND" ]; then + config_get IF_INBOUND "$IF_INBOUND" ifname + printf '%s\n' "if_inbound = $IF_INBOUND" >> /var/etc/siproxd.conf + fi + if [ -n "$IF_OUTBOUND" ]; then + config_get IF_OUTBOUND "$IF_OUTBOUND" ifname + printf '%s\n' "if_outbound = $IF_OUTBOUND" >> /var/etc/siproxd.conf + fi + /usr/sbin/siproxd --config "$CONFIG_FILE" +} + +stop() { + killall siproxd +} diff --git a/net/siproxd/patches/010-fix-bogus-libltdl-dependency.patch b/net/siproxd/patches/010-fix-bogus-libltdl-dependency.patch new file mode 100644 index 0000000..521de72 --- /dev/null +++ b/net/siproxd/patches/010-fix-bogus-libltdl-dependency.patch @@ -0,0 +1,24 @@ +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -26,8 +26,7 @@ AM_CFLAGS = -Wall -D_GNU_SOURCE \ + # Siproxd itself + # + sbin_PROGRAMS = siproxd +-siproxd_LDFLAGS=-export-dynamic +-siproxd_LDADD = $(LIBLTDL) ++siproxd_LDFLAGS=-export-dynamic -lltdl + siproxd_SOURCES = siproxd.c proxy.c register.c sock.c utils.c \ + sip_utils.c sip_layer.c log.c readconf.c rtpproxy.c \ + rtpproxy_relay.c accessctl.c route_processing.c \ +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -259,8 +259,7 @@ target_vendor = @target_vendor@ + AM_CFLAGS = -Wall -D_GNU_SOURCE \ + -DBUILDSTR="\"`cat .buildno`\"" + +-siproxd_LDFLAGS = -export-dynamic +-siproxd_LDADD = $(LIBLTDL) ++siproxd_LDFLAGS = -export-dynamic -lltdl + siproxd_SOURCES = siproxd.c proxy.c register.c sock.c utils.c \ + sip_utils.c sip_layer.c log.c readconf.c rtpproxy.c \ + rtpproxy_relay.c accessctl.c route_processing.c \ diff --git a/net/sipsak/Makefile b/net/sipsak/Makefile new file mode 100644 index 0000000..24cebd3 --- /dev/null +++ b/net/sipsak/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sipsak +PKG_VERSION:=0.9.6 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://download.berlios.de/sipsak/ \ + http://ftp.iptel.org/pub/sipsak/ +PKG_MD5SUM:=c4eb8e282902e75f4f040f09ea9d99d5 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/sipsak + SECTION:=net + CATEGORY:=Network + SUBMENU:=Telephony + DEPENDS:=+libopenssl + TITLE:=SIP (Session Initiation Protocol) stress and diagnostics utility + URL:=http://www.sipsak.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-gnutls \ + ) +endef + +define Package/sipsak/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sipsak $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,sipsak)) diff --git a/net/sipsak/patches/001-ssp.patch b/net/sipsak/patches/001-ssp.patch new file mode 100644 index 0000000..1dda867 --- /dev/null +++ b/net/sipsak/patches/001-ssp.patch @@ -0,0 +1,22 @@ +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -363,7 +363,7 @@ AC_DEFUN([SIPSAK_GCC_STACK_PROTECT_CC],[ + AC_MSG_CHECKING([whether ${CC} accepts -fstack-protector]) + ssp_old_cflags="$CFLAGS" + CFLAGS="$CFLAGS -fstack-protector" +- AC_TRY_COMPILE(,,, ssp_cc=no) ++ AC_TRY_LINK(,,, ssp_cc=no) + echo $ssp_cc + if test "X$ssp_cc" = "Xno"; then + CFLAGS="$ssp_old_cflags" +--- a/configure ++++ b/configure +@@ -2923,7 +2923,7 @@ main () + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++ (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 diff --git a/net/slurm/Makefile b/net/slurm/Makefile new file mode 100644 index 0000000..53096f0 --- /dev/null +++ b/net/slurm/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=slurm +PKG_VERSION:=0.3.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.wormulon.net/slurm/ +PKG_MD5SUM:=e68d09202b835c644f7f6b7f070f29a2 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/slurm + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libncurses + TITLE:=A realtime network interface monitor + URL:=http://www.wormulon.net/slurm/ +endef + +define Package/slurm/description + A realtime network interface monitor with the following features: + - realtime traffic statistics divided into incoming and outgoing ; + - optional combined view ; + - can monitor any kind of network interface ; + - shows detailed statistics about the interface ; + - it's themeable. +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); touch \ + configure.in \ + aclocal.m4 \ + Makefile.in \ + config.h.in \ + configure \ + ); + $(call Build/Configure/Default, \ + , \ + LIBS="-lncurses" \ + ac_cv_lib_ncurses_use_default_colors=yes \ + ) +endef + +define Package/slurm/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/slurm $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,slurm)) diff --git a/net/slurm/patches/001-no_host_curses.patch b/net/slurm/patches/001-no_host_curses.patch new file mode 100644 index 0000000..ce97478 --- /dev/null +++ b/net/slurm/patches/001-no_host_curses.patch @@ -0,0 +1,67 @@ +diff -ruN slurm-0.3.3-old/configure slurm-0.3.3-new/configure +--- slurm-0.3.3-old/configure 2004-09-28 16:34:56.000000000 +0200 ++++ slurm-0.3.3-new/configure 2005-11-06 22:08:53.000000000 +0100 +@@ -4762,35 +4762,35 @@ + _ACEOF + + +-for cursespath in /usr/include/ncurses.h /usr/local/include/ncurses.h /usr/local/include/ncurses/ncurses.h /opt/include/ncurses.h /opt/include/curses.h /usr/include/curses.h /usr/local/include/curses.h /dev/null +-do +- test -f "${cursespath}" && break +-done +-case ${cursespath} in +- /usr/include/*) +- CFLAGS="$CFLAGS -I/usr/include" +- LDFLAGS="" +- ;; +- /usr/local/include/ncurses/*) +- CFLAGS="${CFLAGS} -I/usr/local/include/ncurses" +- LDFLAGS="-L/usr/local/lib" +- SOLLDFLAGS="-R/usr/local/lib" +- ;; +- /usr/local/include/*) +- CFLAGS="${CFLAGS} -I/usr/local/include" +- LDFLAGS="-L/usr/local/lib" +- SOLLDFLAGS="-R/usr/local/lib" +- ;; +- /opt/include/*) +- CFLAGS="${CFLAGS} -I/opt/include" +- LDFLAGS="-L/opt/lib" +- SOLLDFLAGS="-R/opt/lib" +- ;; +-esac ++#for cursespath in /usr/include/ncurses.h /usr/local/include/ncurses.h /usr/local/include/ncurses/ncurses.h /opt/include/ncurses.h /opt/include/curses.h /usr/include/curses.h /usr/local/include/curses.h /dev/null ++#do ++# test -f "${cursespath}" && break ++#done ++#case ${cursespath} in ++# /usr/include/*) ++# CFLAGS="$CFLAGS -I/usr/include" ++# LDFLAGS="" ++# ;; ++# /usr/local/include/ncurses/*) ++# CFLAGS="${CFLAGS} -I/usr/local/include/ncurses" ++# LDFLAGS="-L/usr/local/lib" ++# SOLLDFLAGS="-R/usr/local/lib" ++# ;; ++# /usr/local/include/*) ++# CFLAGS="${CFLAGS} -I/usr/local/include" ++# LDFLAGS="-L/usr/local/lib" ++# SOLLDFLAGS="-R/usr/local/lib" ++# ;; ++# /opt/include/*) ++# CFLAGS="${CFLAGS} -I/opt/include" ++# LDFLAGS="-L/opt/lib" ++# SOLLDFLAGS="-R/opt/lib" ++# ;; ++#esac + # add Slowlaris -R and libraries to LDFLAGS +-if test ${OSTYPE} = "solaris" ; then +- LDFLAGS="${LDFLAGS} ${SOLLDFLAGS} -lnsl -lsocket -lkstat" +-fi ++#if test ${OSTYPE} = "solaris" ; then ++# LDFLAGS="${LDFLAGS} ${SOLLDFLAGS} -lnsl -lsocket -lkstat" ++#fi + + echo "$as_me:$LINENO: checking for vanilla_coke in -lfridge" >&5 + echo $ECHO_N "checking for vanilla_coke in -lfridge... $ECHO_C" >&6 diff --git a/net/smap/Makefile b/net/smap/Makefile new file mode 100644 index 0000000..147711f --- /dev/null +++ b/net/smap/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=smap +PKG_VERSION:=0.6.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-20081016.tar.gz +PKG_SOURCE_URL:=http://www.wormulon.net/smap/ +PKG_MD5SUM:=814456ccc8fea5688382b7ec55fe44eb + +PKG_BUILD_DIR:=$(BUILD_DIR)/smap-$(PKG_VERSION)/smap +PKG_FIXUP = libtool + +include $(INCLUDE_DIR)/package.mk + +LIBTOOL="$(STAGING_DIR)/host/bin/libtool" + +define Package/smap + SECTION:=net + CATEGORY:=Network + SUBMENU:=Telephony + TITLE:=A SIP network discovery tool + MAINTAINER:=Daniel Dickinson + URL:=http://www.wormulon.net/smap/ + DEPENDS:=+libpthread +endef + +define Package/smap/description + Discovers and identifies SIP devices on the network including hardware + phones, softphones, PBX software, and PBX equipment. +endef + +# define Package/smap/conffiles +# /etc/config/smap +# endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_LD)" \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -DRAW_SOCKET -DHAVE_RANDOM -DSMAP_OS=linux" \ + LDFLAGS="$(TARGET_LDFLAGS) -lm -lpthread" \ + LIBTOOL="$(LIBTOOL)" \ + smap +endef + +define Package/smap/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/smap $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/share/smap + $(CP) $(PKG_BUILD_DIR)/fingerprint.db $(1)/usr/share/smap +endef + +$(eval $(call BuildPackage,smap)) diff --git a/net/smap/patches/00-fix-broadcast.patch b/net/smap/patches/00-fix-broadcast.patch new file mode 100644 index 0000000..c47b89e --- /dev/null +++ b/net/smap/patches/00-fix-broadcast.patch @@ -0,0 +1,62 @@ +diff -Naur smap.orig/icmpping.c smap/icmpping.c +--- smap.orig/icmpping.c 2007-10-07 06:15:11.000000000 -0400 ++++ smap/icmpping.c 2009-06-13 11:57:28.000000000 -0400 +@@ -182,6 +182,7 @@ + struct sockaddr_in sin; + #define ICMP_PKT_LEN (sizeof(struct icmp) + ICMP_PAYLOAD_LEN) + char icmpbuf[ICMP_PKT_LEN]; ++ socklen_t socklen; + + /* prepare ICMP packet */ + memset(&icmpbuf, 'A', ICMP_PKT_LEN); +@@ -207,6 +208,8 @@ + if (setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)) != 0) + perror("setsockopt"); + #endif ++ if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one)) != 0) ++ perror("setsockopt"); + icmp->icmp_cksum = icmp_in_cksum((unsigned short *) &icmpbuf, ICMP_PKT_LEN); + + /* send data */ +diff -Naur smap.orig/smap.c smap/smap.c +--- smap.orig/smap.c 2007-11-03 14:14:52.000000000 -0400 ++++ smap/smap.c 2009-06-13 10:49:15.000000000 -0400 +@@ -244,11 +244,11 @@ + break; + case 't': /* TCP transport */ + /* UDP is default so TCP would override it */ +- config.flags ^= FLAG_UDP_TRANSPORT; ++ config.flags &= ~FLAG_UDP_TRANSPORT; + config.flags |= FLAG_TCP_TRANSPORT; + break; + case 'u': /* UDP transport */ +- config.flags ^= FLAG_TCP_TRANSPORT; ++ config.flags &= ~FLAG_TCP_TRANSPORT; + config.flags |= FLAG_UDP_TRANSPORT; + break; + case 'r': /* ratelimit messages/sec */ +diff -Naur smap.orig/transport_udp.c smap/transport_udp.c +--- smap.orig/transport_udp.c 2008-08-20 09:02:57.000000000 -0400 ++++ smap/transport_udp.c 2009-06-13 11:56:15.000000000 -0400 +@@ -52,6 +52,7 @@ + extern int udp_sendsock; + extern struct sockaddr_in udp_sendsock_sockaddr; + int sockaddrlen; ++ int one; + + /* is 5060 (DEFAULT_SIP_PORT) available? + * if yes, we'll use it since some clients send responses to +@@ -116,6 +117,13 @@ + error(ERR_DEBUG, "bind() successful"); + } + } ++ one = 1; ++ if (setsockopt(udp_sendsock, SOL_SOCKET, SO_BROADCAST, &one, sizeof(one)) != 0) { ++ perror("setsockopt"); ++ error(ERR_ERROR, "unable to set socket to broadcast"); ++ return 0; ++ } ++ + if (getsockname(udp_sendsock, (struct sockaddr *) &udp_sendsock_sockaddr, + (socklen_t *) &sockaddrlen) != 0) + if (DEBUG) perror("getsocknameudp_sendsock"); diff --git a/net/smap/patches/01-add-tecom-supported-header.patch b/net/smap/patches/01-add-tecom-supported-header.patch new file mode 100644 index 0000000..699a635 --- /dev/null +++ b/net/smap/patches/01-add-tecom-supported-header.patch @@ -0,0 +1,12 @@ +diff -Naur smap.broadcast/test_supported.c smap/test_supported.c +--- smap.broadcast/test_supported.c 2009-06-14 21:41:49.000000000 -0400 ++++ smap/test_supported.c 2009-06-14 21:51:17.000000000 -0400 +@@ -49,6 +49,8 @@ + {"Supported: timer, 100rel, replaces, callerid", 13}, + /* Cisco 79x0 */ + {"Supported: replaces,join,norefersub", 14}, ++ /* Tecom IP2007 */ ++ {"Supported: 100rel,replaces", 15 }, + {"", 0} + }; + diff --git a/net/smap/patches/02-segfault-and-toofast-bugfixes.patch b/net/smap/patches/02-segfault-and-toofast-bugfixes.patch new file mode 100644 index 0000000..1f14786 --- /dev/null +++ b/net/smap/patches/02-segfault-and-toofast-bugfixes.patch @@ -0,0 +1,63 @@ +diff -Naur smap.supported/config.h smap/config.h +--- smap.supported/config.h 2009-06-14 22:18:57.000000000 -0400 ++++ smap/config.h 2009-06-24 16:36:50.000000000 -0400 +@@ -113,6 +113,7 @@ + + #define DEFAULT_SIP_PORT 5060 + #define DEFAULT_TIMEOUT 500 /* in ms */ ++#define DEFAULT_RATELIMIT 25 + + /* randomizer related ********************************************************/ + enum { RAND_CALLID = 1, RAND_TAG, RAND_CSEQ, RAND_BRANCH }; +diff -Naur smap.supported/listener.c smap/listener.c +--- smap.supported/listener.c 2009-06-14 22:18:57.000000000 -0400 ++++ smap/listener.c 2009-06-15 04:36:40.000000000 -0400 +@@ -130,7 +130,7 @@ + /* use Call-ID to match response to requests */ + callid = response_getcallid(msg); + if (callid == 0) { +- error(ERR_NOTICE, "could not parse Call-ID"); ++ error(ERR_DEBUG, "could not parse Call-ID"); + goto nextmsg; + } + state = state_lookup_by_callid(callid); +diff -Naur smap.supported/results.c smap/results.c +--- smap.supported/results.c 2009-06-14 22:18:57.000000000 -0400 ++++ smap/results.c 2009-06-24 16:38:00.000000000 -0400 +@@ -39,6 +39,7 @@ + (task->results & RES_ICMP_REACH) ? "reachable" : "unreachable", + (task->results & RES_SIP_ENABLED) ? "enabled" : "disabled"); + if (task->results & RES_SIP_ENABLED) ++ error(ERR_DEBUG, "Looking up fingerprint"); + fingerprint_lookup(*task->fp); + break; + default: +diff -Naur smap.supported/smap.c smap/smap.c +--- smap.supported/smap.c 2009-06-14 22:18:57.000000000 -0400 ++++ smap/smap.c 2009-06-24 17:09:39.000000000 -0400 +@@ -197,7 +197,7 @@ + config.sip_port = DEFAULT_SIP_PORT; + config.sip_domain = NULL; + config.timeout = DEFAULT_TIMEOUT; +- config.ratelimit = 0; ++ config.ratelimit = DEFAULT_RATELIMIT; + + printf("\nsmap %s " + "http://www.wormulon.net/\n\n", SMAP_VERSION); +@@ -338,12 +338,15 @@ + break; /* make gcc happy */ + } + error_while_scanning: +- + pthread_join(pth_worker, NULL); + pthread_kill(pth_worker, SIGINT); + pthread_kill(pth_listener, SIGINT); + stats_dump(); + ++ signal(SIGINT, SIG_DFL); ++ signal(SIGTERM, SIG_DFL); ++ signal(SIGKILL, SIG_DFL); ++ + /* clean up */ + pthread_mutex_destroy(&scrlock); + pthread_mutex_destroy(&tasklock); diff --git a/net/smcroute/Makefile b/net/smcroute/Makefile new file mode 100644 index 0000000..8626b66 --- /dev/null +++ b/net/smcroute/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=smcroute +PKG_VERSION:=0.92 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://www.cschill.de/smcroute +PKG_MD5SUM:=2b50e7166606ec90e09682399e69c4a6 + +include $(INCLUDE_DIR)/package.mk + +define Package/smcroute + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + TITLE:=Static multicast routing daemon + URL:=http://www.cschill.de/smcroute/ +endef + +define Package/smcroute/description + SMCRoute is a command line tool to manipulate the multicast routes of the Linux kernel. +endef + + +ifeq ($(HOST_OS),FreeBSD) + TARGET_CFLAGS += -fno-builtin-log + TARGET_LDFLAGS += -fno-builtin-log +endif + +define Build/Compile + $(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" -C $(PKG_BUILD_DIR)/src all +endef + +define Package/smcroute/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smcroute $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mcsender $(1)/usr/bin/ + $(INSTALL_BIN) ./files/smcroute.init $(1)/etc/init.d/smcroute +endef + +$(eval $(call BuildPackage,smcroute)) diff --git a/net/smcroute/files/smcroute.init b/net/smcroute/files/smcroute.init new file mode 100644 index 0000000..3e36272 --- /dev/null +++ b/net/smcroute/files/smcroute.init @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2010 OpenWrt.org +START=50 + +start() { + smcroute -d +} + +stop() { + smcroute -k +} diff --git a/net/smcroute/patches/001-socket_path.patch b/net/smcroute/patches/001-socket_path.patch new file mode 100644 index 0000000..4b6eda0 --- /dev/null +++ b/net/smcroute/patches/001-socket_path.patch @@ -0,0 +1,11 @@ +--- a/src/ipc.c 2002-07-07 19:38:49.000000000 +0200 ++++ b/src/ipc.c 2010-10-01 21:44:26.000000000 +0200 +@@ -24,7 +24,7 @@ + + #include "mclab.h" + +-#define SOCKET_PATH "/var/lib/smcroute" ++#define SOCKET_PATH "/tmp/smcroute" + + // server's listen socket + static int ListenSock; diff --git a/net/smcroute/patches/002-optimize_size.patch b/net/smcroute/patches/002-optimize_size.patch new file mode 100644 index 0000000..23059fa --- /dev/null +++ b/net/smcroute/patches/002-optimize_size.patch @@ -0,0 +1,12 @@ +--- a/src/Makefile ++++ b/src/Makefile +@@ -1,9 +1,6 @@ + + BINDIR=../bin + +-# CFLAGS=-g +-CFLAGS=-O +- + default : build.h smcroute + + all : smcroute mcsender diff --git a/net/smtptrapd/Makefile b/net/smtptrapd/Makefile new file mode 100644 index 0000000..da0dffe --- /dev/null +++ b/net/smtptrapd/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2008-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=smtptrapd +PKG_VERSION:=1.5 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=edc5f2f3ea9f9bdd9e0f479a58903bf1 + +include $(INCLUDE_DIR)/package.mk + +define Package/smtptrapd + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpthread + TITLE:=SMTP Trap Daemon + URL:=http://smtptrapd.sourceforge.net/ +endef + +define Package/smtptrapd/description + The smtptrapd program is a multi-threaded daemon that provides + a RFC 2821 compliant SMTP service that always returns a 4xx soft + error to the RCPT TO verb. +endef + +define Build/Compile + $(TARGET_CC) \ + $(TARGET_CFLAGS) \ + $(TARGET_CPPFLAGS) \ + -D_REENTRANT \ + $(PKG_BUILD_DIR)/smtptrapd.c \ + -o $(PKG_BUILD_DIR)/smtptrapd \ + $(TARGET_LDFLAGS) \ + -lpthread +endef + +define Package/smtptrapd/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/smtptrapd.init $(1)/etc/init.d/smtptrapd + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/smtptrapd $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,smtptrapd)) diff --git a/net/smtptrapd/files/smtptrapd.init b/net/smtptrapd/files/smtptrapd.init new file mode 100644 index 0000000..56e5f97 --- /dev/null +++ b/net/smtptrapd/files/smtptrapd.init @@ -0,0 +1,144 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org + +START=90 + +NAME="smtptrapd" +DAEMON="/usr/sbin/$NAME" +RUN_D="/var/run" + +EXTRA_COMMANDS="list status exconf" +EXTRA_HELP=" list Lists available configurations + status Prints status of the service + exconf Shows an example config file + +The actions start, stop, restart, reload, status operate +globally on all configurations unless the particular +configuration has been provided as the next parameter. +" + +check_req() { + if [ -x "$DAEMON" ]; then + return 0 + else + echo "The daemon binary is missing!" + return 1 + fi +} + +check_section() { + echo "$1" | grep -vq '^cfg[[:xdigit:]]\{6\}$' +} + +start_service() { + local cfg="$1" + local named="$2" + check_section "$cfg" || return 1 + [ "$named" != "" -a "$cfg" != "$named" ] && return 0 + local args listen_ip banner_host username num_threads listen_port accept_queue_len + config_get listen_ip "$cfg" listen_ip + [ -n "$listen_ip" ] && append args "-l $listen_ip" + config_get listen_port "$cfg" listen_port + [ -n "$listen_port" ] && append args "-p $listen_port" + config_get username "$cfg" username + [ -n "$username" ] && append args "-u $username" + config_get banner_host "$cfg" banner_host + [ -n "$banner_host" ] && append args "-b \"$banner_host\"" + config_get num_threads "$cfg" num_threads + [ -n "$num_threads" ] && append args "-t $num_threads" + config_get accept_queue_len "$cfg" accept_queue_len + [ -n "$accept_queue_len" ] && append args "-m $accept_queue_len" + append args "-f ${RUN_D}/${NAME}-${cfg}.pid" + eval "$DAEMON $args" +} + +stop_service() { + local cfg="$1" + local named="$2" + check_section "$cfg" || return 1 + [ "$named" != "" -a "$cfg" != "$named" ] && return 0 + local PID_F="${RUN_D}/${NAME}-${cfg}.pid" + [ -f $PID_F ] && { + local ppid=$(cat $PID_F) + ps | grep "^[[:space:]]*$ppid[[:space:]]" | grep -q "[s]mtptrapd\>" && kill $ppid + rm -f $PID_F + } +} + +status_service() { + local cfg="$1" + local named="$2" + check_section "$cfg" || return 1 + [ "$named" != "" -a "$cfg" != "$named" ] && return 0 + local PID_F="${RUN_D}/${NAME}-${cfg}.pid" + [ -f $PID_F ] && { + local ppid=$(cat $PID_F) + if ps | grep "^[[:space:]]*$ppid[[:space:]]" | grep -q "[s]mtptrapd\>"; then + echo "$cfg (pid $ppid) is running" + else + echo "$cfg is not running (stale pid file exists)" + fi + } +} + +list_service() { + local cfg="$1" + check_section "$cfg" || return 1 + echo " $cfg" +} + +start() { + local svc_cfg="$1" + check_req || return 1 + [ ! -d $RUN_D ] && mkdir -p $RUN_D + config_load "$NAME" + config_foreach start_service "$NAME" "$svc_cfg" +} + +stop() { + local svc_cfg="$1" + check_req || return 1 + config_load "/etc/config/$NAME" + if [ -n "$svc_cfg" ]; then + config_foreach stop_service "$NAME" "$svc_cfg" + else + config_foreach stop_service "$NAME" + local pf + for pf in $(ls ${RUN_D}/${NAME}*.pid 2>/dev/null); do + local ppid=$(cat $pf) + ps | grep "^[[:space:]]*$ppid[[:space:]]" | grep -q "[s]mtptrapd\>" && kill "$ppid" + rm -f $pf + done + fi +} + +status() { + local svc_cfg="$1" + check_req || return 1 + config_load "$NAME" + config_foreach status_service "$NAME" "$svc_cfg" +} + +list() { + check_req || return 1 + echo "Available $NAME configurations:" + config_load "$NAME" + config_foreach list_service "$NAME" +} + +exconf() { + echo "An example configuration in /etc/config/$NAME:" >&2 + cat <' +# option 'username' 'nobody' +# option 'listen_ip' '' +# option 'listen_port' '25' +# option 'num_threads' '10' +# option 'accept_queue_len' '100' +EOF +} diff --git a/net/smtptrapd/patches/200-missing_opt.patch b/net/smtptrapd/patches/200-missing_opt.patch new file mode 100644 index 0000000..c989b01 --- /dev/null +++ b/net/smtptrapd/patches/200-missing_opt.patch @@ -0,0 +1,12 @@ +diff -urN smtptrapd-1.5.orig/smtptrapd.c smtptrapd-1.5.dev/smtptrapd.c +--- smtptrapd-1.5.orig/smtptrapd.c 2008-04-15 12:56:20.000000000 +0200 ++++ smtptrapd-1.5.dev/smtptrapd.c 2008-04-16 18:23:03.000000000 +0200 +@@ -545,7 +545,7 @@ + config.threads = NUM_CONSUMER; + config.max_queue_len = MAX_QUEUE_LEN; + +- while ((c = getopt(argc, argv, "hc:l:p:b:u:m:t:")) != -1) { ++ while ((c = getopt(argc, argv, "hc:l:p:b:u:m:t:f:")) != -1) { + switch (c) { + case 'h': + diff --git a/net/snort-wireless/Makefile b/net/snort-wireless/Makefile new file mode 100644 index 0000000..32c404e --- /dev/null +++ b/net/snort-wireless/Makefile @@ -0,0 +1,147 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=snort-wireless +PKG_VERSION:=2.4.3-alpha04 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.snort-wireless.org/files/ +PKG_MD5SUM:=1aa699ae279bf7a1140cf6cca02f9999 + +include $(INCLUDE_DIR)/package.mk + +define Package/snort-wireless/Default + SUBMENU:=wireless + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libnet0 +libpcap +libpcre + TITLE:=Lightweight Network Intrusion Detection System + URL:=http://www.snort-wireless.org/ +endef + +define Package/snort-wireless + $(call Package/snort-wireless/Default) +endef + +define Package/snort-wireless-mysql + $(call Package/snort-wireless/Default) + DEPENDS+= +libmysqlclient + TITLE+= (MySQL) +endef + +define Package/snort-wireless-pgsql + $(call Package/snort-wireless/Default) + DEPENDS+= +libpq + TITLE+= (PostgreSQL) +endef + + +define Compile/Template + +$(PKG_BUILD_DIR)/snort$(1): $(STAMP_CONFIGURED) + touch -r $(PKG_BUILD_DIR)/Makefile.am $(PKG_BUILD_DIR)/configure.in + touch -r $(PKG_BUILD_DIR)/Makefile.in $(PKG_BUILD_DIR)/configure + -$(MAKE) -C $(PKG_BUILD_DIR) distclean + $(call Build/Configure/Default, \ + --enable-flexresp \ + --with-libnet-includes="$(STAGING_DIR)/usr/lib/libnet-1.0.x/include" \ + --with-libnet-libraries="$(STAGING_DIR)/usr/lib/libnet-1.0.x/lib" \ + --with-libpcap-includes="$(STAGING_DIR)/usr/include" \ + --with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \ + --with-libpcre-includes="$(STAGING_DIR)/usr/include" \ + --with-libpcre-libraries="$(STAGING_DIR)/usr/lib" \ + $(2) \ + , \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/mysql" \ + LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/mysql" \ + PATH="$(STAGING_DIR)/usr/lib/libnet-1.0.x/bin:$$$$PATH" \ + $(3) \ + ); + $(MAKE) -C $(PKG_BUILD_DIR) \ + extra_incl="" \ + all + mv $(PKG_BUILD_DIR)/src/snort $(PKG_BUILD_DIR)/snort$(1) + +$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/snort$(1) + +endef + + +define Install/Template + +define Package/snort-wireless$(1)/conffiles +/etc/default/snort +/etc/snort/snort.conf +/etc/snort/threshold.conf +endef + +define Package/snort-wireless$(1)/install + $(INSTALL_DIR) $$(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/snort$(1) $$(1)/usr/sbin/snort + $(INSTALL_DIR) $$(1)/etc/snort + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/snort.conf $$(1)/etc/snort/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/classification.config $$(1)/etc/snort/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/gen-msg.map $$(1)/etc/snort/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/reference.config $$(1)/etc/snort/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/sid-msg.map $$(1)/etc/snort/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/threshold.conf $$(1)/etc/snort/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/unicode.map $$(1)/etc/snort/ + $(INSTALL_DIR) $$(1)/etc/default + $(INSTALL_DATA) ./files/snort-wireless.default $$(1)/etc/default/snort + $(INSTALL_DIR) $$(1)/etc/init.d + $(INSTALL_BIN) ./files/snort-wireless.init $$(1)/etc/init.d/snort +endef + +endef + + +ifneq ($(SDK)$(CONFIG_PACKAGE_snort-wireless),) + define Compile/snort-wireless + $(call Compile/Template,, \ + --without-mysql \ + --without-postgresql \ + ) + $(call Install/Template,) + endef +endif +$(eval $(Compile/snort-wireless)) + + +ifneq ($(SDK)$(CONFIG_PACKAGE_snort-wireless-mysql),) + define Compile/snort-wireless-mysql + $(call Compile/Template,-mysql, \ + --with-mysql="$(STAGING_DIR)/usr" \ + --without-postgresql \ + ) + $(call Install/Template,-mysql) + endef +endif +$(eval $(Compile/snort-wireless-mysql)) + +ifneq ($(SDK)$(CONFIG_PACKAGE_snort-wireless-pgsql),) + define Compile/snort-wireless-pgsql + $(call Compile/Template,-pgsql, \ + --without-mysql \ + --with-postgresql="$(STAGING_DIR)/usr" \ + ) + $(call Install/Template,-pgsql) + endef +endif +$(eval $(Compile/snort-wireless-pgsql)) + +define Build/Configure +endef + +define Build/Compile +endef + +$(eval $(call BuildPackage,snort-wireless)) +$(eval $(call BuildPackage,snort-wireless-mysql)) +$(eval $(call BuildPackage,snort-wireless-pgsql)) diff --git a/net/snort-wireless/files/snort-wireless.default b/net/snort-wireless/files/snort-wireless.default new file mode 100644 index 0000000..796a893 --- /dev/null +++ b/net/snort-wireless/files/snort-wireless.default @@ -0,0 +1,2 @@ +INTERFACE="vlan1" # WAN +OPTIONS="-i $INTERFACE -c /etc/snort/snort.conf -D -N -q -s" diff --git a/net/snort-wireless/files/snort-wireless.init b/net/snort-wireless/files/snort-wireless.init new file mode 100644 index 0000000..8c019c4 --- /dev/null +++ b/net/snort-wireless/files/snort-wireless.init @@ -0,0 +1,23 @@ +#!/bin/sh + +DEFAULT=/etc/default/snort +LOG_D=/var/log/snort +RUN_D=/var/run +[ -f $DEFAULT ] && . $DEFAULT +PID_F=$RUN_D/snort_$INTERFACE.pid + +case $1 in + start) + [ -d $LOG_D ] || mkdir -p $LOG_D + [ -d $RUN_D ] || mkdir -p $RUN_D + snort $OPTIONS + ;; + stop) + [ -f $PID_F ] && kill $(cat $PID_F) + ;; + *) + echo "usage: $0 (start|stop)" + exit 1 +esac + +exit $? diff --git a/net/snort-wireless/patches/500-no-config-search.patch b/net/snort-wireless/patches/500-no-config-search.patch new file mode 100644 index 0000000..d674ba6 --- /dev/null +++ b/net/snort-wireless/patches/500-no-config-search.patch @@ -0,0 +1,35 @@ +--- snort-2.3.2-orig/src/snort.c 2005-01-13 21:36:20.000000000 +0100 ++++ snort-2.3.2-1/src/snort.c 2005-04-04 20:03:34.000000000 +0200 +@@ -1949,7 +1949,7 @@ + { + struct stat st; + int i; +- char *conf_files[]={"/etc/snort.conf", "./snort.conf", NULL}; ++ char *conf_files[]={"/etc/snort/snort.conf", NULL}; + char *fname = NULL; + char *home_dir = NULL; + char *rval = NULL; +@@ -1970,23 +1970,6 @@ + i++; + } + +- /* search for .snortrc in the HOMEDIR */ +- if(!rval) +- { +- if((home_dir = getenv("HOME"))) +- { +- /* create the full path */ +- fname = (char *)malloc(strlen(home_dir) + strlen("/.snortrc") + 1); +- if(!fname) +- FatalError("Out of memory searching for config file\n"); +- +- if(stat(fname, &st) != -1) +- rval = fname; +- else +- free(fname); +- } +- } +- + return rval; + } + diff --git a/net/snort-wireless/patches/750-lightweight-config.patch b/net/snort-wireless/patches/750-lightweight-config.patch new file mode 100644 index 0000000..daea3be --- /dev/null +++ b/net/snort-wireless/patches/750-lightweight-config.patch @@ -0,0 +1,178 @@ +--- snort-wireless-2.4.3-alpha04/etc/snort.conf 2005-10-21 09:41:01.000000000 +0200 ++++ /Users/florian/telechargements/snort.conf 2005-10-30 13:20:17.000000000 +0100 +@@ -6,6 +6,7 @@ + # + ################################################### + # This file contains a sample snort configuration. ++# Most preprocessors and rules were disabled to save memory. + # You can take the following steps to create your own custom configuration: + # + # 1) Set the variables for your network +@@ -42,10 +43,10 @@ + # or you can specify the variable to be any IP address + # like this: + +-var HOME_NET any ++var HOME_NET 192.168.1.0/24 + + # Set up the external network addresses as well. A good start may be "any" +-var EXTERNAL_NET any ++var EXTERNAL_NET !$HOME_NET + + # Configure your wireless AP lists. This allows snort to look for attacks + # against your wireless network, such as rogue access points or adhoc wireless +@@ -137,7 +138,7 @@ + # Path to your rules files (this can be a relative path) + # Note for Windows users: You are advised to make this an absolute path, + # such as: c:\snort\rules +-var RULE_PATH ../rules ++var RULE_PATH /etc/snort/rules + + # Configure the snort decoder + # ============================ +@@ -413,11 +414,11 @@ + # lots of options available here. See doc/README.http_inspect. + # unicode.map should be wherever your snort.conf lives, or given + # a full path to where snort can find it. +-preprocessor http_inspect: global \ +- iis_unicode_map unicode.map 1252 ++#preprocessor http_inspect: global \ ++# iis_unicode_map unicode.map 1252 + +-preprocessor http_inspect_server: server default \ +- profile all ports { 80 8080 8180 } oversize_dir_length 500 ++#preprocessor http_inspect_server: server default \ ++# profile all ports { 80 8080 8180 } oversize_dir_length 500 + + # + # Example unique server configuration +@@ -451,7 +452,7 @@ + # no_alert_incomplete - don't alert when a single segment + # exceeds the current packet size + +-preprocessor rpc_decode: 111 32771 ++#preprocessor rpc_decode: 111 32771 + + # bo: Back Orifice detector + # ------------------------- +@@ -474,7 +475,7 @@ + # 3 Back Orifice Server Traffic Detected + # 4 Back Orifice Snort Buffer Attack + +-preprocessor bo ++#preprocessor bo + + # telnet_decode: Telnet negotiation string normalizer + # --------------------------------------------------- +@@ -486,7 +487,7 @@ + # This preprocessor requires no arguments. + # Portscan uses Generator ID 109 and does not generate any SID currently. + +-preprocessor telnet_decode ++#preprocessor telnet_decode + + # sfPortscan + # ---------- +@@ -537,9 +538,9 @@ + # are still watched as scanner hosts. The 'ignore_scanned' option is + # used to tune alerts from very active hosts such as syslog servers, etc. + # +-preprocessor sfportscan: proto { all } \ +- memcap { 10000000 } \ +- sense_level { low } ++#preprocessor sfportscan: proto { all } \ ++# memcap { 10000000 } \ ++# sense_level { low } + + # arpspoof + #---------------------------------------- +@@ -814,41 +815,41 @@ + include $RULE_PATH/bad-traffic.rules + include $RULE_PATH/exploit.rules + include $RULE_PATH/scan.rules +-include $RULE_PATH/finger.rules +-include $RULE_PATH/ftp.rules +-include $RULE_PATH/telnet.rules +-include $RULE_PATH/rpc.rules +-include $RULE_PATH/rservices.rules +-include $RULE_PATH/dos.rules +-include $RULE_PATH/ddos.rules +-include $RULE_PATH/dns.rules +-include $RULE_PATH/tftp.rules +- +-include $RULE_PATH/web-cgi.rules +-include $RULE_PATH/web-coldfusion.rules +-include $RULE_PATH/web-iis.rules +-include $RULE_PATH/web-frontpage.rules +-include $RULE_PATH/web-misc.rules +-include $RULE_PATH/web-client.rules +-include $RULE_PATH/web-php.rules +- +-include $RULE_PATH/sql.rules +-include $RULE_PATH/x11.rules +-include $RULE_PATH/icmp.rules +-include $RULE_PATH/netbios.rules +-include $RULE_PATH/misc.rules +-include $RULE_PATH/attack-responses.rules +-include $RULE_PATH/oracle.rules +-include $RULE_PATH/mysql.rules +-include $RULE_PATH/snmp.rules +- +-include $RULE_PATH/smtp.rules +-include $RULE_PATH/imap.rules +-include $RULE_PATH/pop2.rules +-include $RULE_PATH/pop3.rules ++#include $RULE_PATH/finger.rules ++#include $RULE_PATH/ftp.rules ++#include $RULE_PATH/telnet.rules ++#include $RULE_PATH/rpc.rules ++#include $RULE_PATH/rservices.rules ++#include $RULE_PATH/dos.rules ++#include $RULE_PATH/ddos.rules ++#include $RULE_PATH/dns.rules ++#include $RULE_PATH/tftp.rules ++ ++#include $RULE_PATH/web-cgi.rules ++#include $RULE_PATH/web-coldfusion.rules ++#include $RULE_PATH/web-iis.rules ++#include $RULE_PATH/web-frontpage.rules ++#include $RULE_PATH/web-misc.rules ++#include $RULE_PATH/web-client.rules ++#include $RULE_PATH/web-php.rules ++ ++#include $RULE_PATH/sql.rules ++#include $RULE_PATH/x11.rules ++#include $RULE_PATH/icmp.rules ++#include $RULE_PATH/netbios.rules ++#include $RULE_PATH/misc.rules ++#include $RULE_PATH/attack-responses.rules ++#include $RULE_PATH/oracle.rules ++#include $RULE_PATH/mysql.rules ++#include $RULE_PATH/snmp.rules ++ ++#include $RULE_PATH/smtp.rules ++#include $RULE_PATH/imap.rules ++#include $RULE_PATH/pop2.rules ++#include $RULE_PATH/pop3.rules + +-include $RULE_PATH/nntp.rules +-include $RULE_PATH/other-ids.rules ++#include $RULE_PATH/nntp.rules ++#include $RULE_PATH/other-ids.rules + # include $RULE_PATH/web-attacks.rules + # include $RULE_PATH/backdoor.rules + # include $RULE_PATH/shellcode.rules +@@ -856,11 +857,11 @@ + # include $RULE_PATH/porn.rules + # include $RULE_PATH/info.rules + # include $RULE_PATH/icmp-info.rules +- include $RULE_PATH/virus.rules ++# include $RULE_PATH/virus.rules + # include $RULE_PATH/chat.rules + # include $RULE_PATH/multimedia.rules + # include $RULE_PATH/p2p.rules +-include $RULE_PATH/experimental.rules ++#include $RULE_PATH/experimental.rules + #include $RULE_PATH/wifi.rules + + # Include any thresholding or suppression commands. See threshold.conf in the diff --git a/net/snort/Makefile b/net/snort/Makefile new file mode 100644 index 0000000..3c86c44 --- /dev/null +++ b/net/snort/Makefile @@ -0,0 +1,170 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=snort +PKG_VERSION:=2.8.4.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://dl.snort.org/snort-current/ +PKG_MD5SUM:=63f4e76ae96a2d133f4c7b741bad5458 + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/snort/Default + SUBMENU:=Firewall + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libnet0 +libpcap +libpcre + TITLE:=Lightweight Network Intrusion Detection System + URL:=http://www.snort.org/ +endef + +define Package/snort/Default/description + Snort is an open source network intrusion detection and prevention system. + It is capable of performing real-time traffic analysis, alerting, blocking + and packet logging on IP networks. It utilizes a combination of protocol + analysis and pattern matching in order to detect anomalies, misuse and + attacks. +endef + +define Package/snort + $(call Package/snort/Default) +endef + +define Package/snort/description + $(call Package/snort/Default/description) +endef + +define Package/snort-mysql + $(call Package/snort/Default) + DEPENDS+= +libmysqlclient + TITLE+= (MySQL) +endef + +define Package/snort-mysql/description + $(call Package/snort/Default/description) + This package contains snort with support for logging to a MySQL database. +endef + +define Package/snort-pgsql + $(call Package/snort/Default) + DEPENDS+= +libpq + TITLE+= (PostgreSQL) +endef + +define Package/snort-pgsql/description + $(call Package/snort/Default/description) + This package contains snort with support for logging to a PostgreSQL database. +endef + +define Compile/Template + +$(PKG_BUILD_DIR)/snort$(1): $(STAMP_CONFIGURED) + touch -r $(PKG_BUILD_DIR)/Makefile.am $(PKG_BUILD_DIR)/configure.in + touch -r $(PKG_BUILD_DIR)/Makefile.in $(PKG_BUILD_DIR)/configure + -$(MAKE) -C $(PKG_BUILD_DIR) distclean + $(call Build/Configure/Default, \ + --enable-flexresp \ + --with-libnet-includes="$(STAGING_DIR)/usr/lib/libnet-1.0.x/include" \ + --with-libnet-libraries="$(STAGING_DIR)/usr/lib/libnet-1.0.x/lib" \ + --with-libpcap-includes="$(STAGING_DIR)/usr/include" \ + --with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \ + --with-libpcre-includes="$(STAGING_DIR)/usr/include" \ + --with-libpcre-libraries="$(STAGING_DIR)/usr/lib" \ + $(2) \ + , \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/mysql" \ + LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/mysql" \ + PATH="$(STAGING_DIR)/usr/lib/libnet-1.0.x/bin:$$$$PATH" \ + $(3) \ + ); + $(MAKE) -C $(PKG_BUILD_DIR) \ + extra_incl="" \ + all + mv $(PKG_BUILD_DIR)/src/snort $(PKG_BUILD_DIR)/snort$(1) + +$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/snort$(1) + +endef + + +define Install/Template + +define Package/snort$(1)/conffiles +/etc/default/snort +/etc/snort/snort.conf +/etc/snort/threshold.conf +endef + +define Package/snort$(1)/install + $(INSTALL_DIR) $$(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/snort$(1) $$(1)/usr/sbin/snort + $(INSTALL_DIR) $$(1)/etc/snort + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/snort.conf $$(1)/etc/snort/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/classification.config $$(1)/etc/snort/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/gen-msg.map $$(1)/etc/snort/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/reference.config $$(1)/etc/snort/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/sid-msg.map $$(1)/etc/snort/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/threshold.conf $$(1)/etc/snort/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/unicode.map $$(1)/etc/snort/ + $(INSTALL_DIR) $$(1)/etc/default + $(INSTALL_DATA) ./files/snort.default $$(1)/etc/default/snort + $(INSTALL_DIR) $$(1)/etc/init.d + $(INSTALL_BIN) ./files/snort.init $$(1)/etc/init.d/snort +endef + +endef + + +ifneq ($(SDK)$(CONFIG_PACKAGE_snort),) + define Compile/snort + $(call Compile/Template,, \ + --without-mysql \ + --without-postgresql \ + ) + $(call Install/Template,) + endef +endif +$(eval $(Compile/snort)) + +ifneq ($(SDK)$(CONFIG_PACKAGE_snort-mysql),) + define Compile/snort-mysql + $(call Compile/Template,-mysql, \ + --with-mysql="$(STAGING_DIR)/usr" \ + --without-postgresql \ + ) + $(call Install/Template,-mysql) + endef +endif +$(eval $(Compile/snort-mysql)) + + +ifneq ($(SDK)$(CONFIG_PACKAGE_snort-pgsql),) + define Compile/snort-pgsql + $(call Compile/Template,-pgsql, \ + --without-mysql \ + --with-postgresql="$(STAGING_DIR)/usr" \ + ) + $(call Install/Template,-pgsql) + endef +endif +$(eval $(Compile/snort-pgsql)) + +define Build/Configure +endef + +define Build/Compile +endef + +$(eval $(call BuildPackage,snort)) +$(eval $(call BuildPackage,snort-mysql)) +$(eval $(call BuildPackage,snort-pgsql)) diff --git a/net/snort/files/snort.default b/net/snort/files/snort.default new file mode 100644 index 0000000..796a893 --- /dev/null +++ b/net/snort/files/snort.default @@ -0,0 +1,2 @@ +INTERFACE="vlan1" # WAN +OPTIONS="-i $INTERFACE -c /etc/snort/snort.conf -D -N -q -s" diff --git a/net/snort/files/snort.init b/net/snort/files/snort.init new file mode 100644 index 0000000..8c019c4 --- /dev/null +++ b/net/snort/files/snort.init @@ -0,0 +1,23 @@ +#!/bin/sh + +DEFAULT=/etc/default/snort +LOG_D=/var/log/snort +RUN_D=/var/run +[ -f $DEFAULT ] && . $DEFAULT +PID_F=$RUN_D/snort_$INTERFACE.pid + +case $1 in + start) + [ -d $LOG_D ] || mkdir -p $LOG_D + [ -d $RUN_D ] || mkdir -p $RUN_D + snort $OPTIONS + ;; + stop) + [ -f $PID_F ] && kill $(cat $PID_F) + ;; + *) + echo "usage: $0 (start|stop)" + exit 1 +esac + +exit $? diff --git a/net/snort/patches/001-automake-compat.patch b/net/snort/patches/001-automake-compat.patch new file mode 100644 index 0000000..023c510 --- /dev/null +++ b/net/snort/patches/001-automake-compat.patch @@ -0,0 +1,4 @@ +--- /dev/null ++++ b/acinclude.m4 +@@ -0,0 +1 @@ ++sinclude(m4/libprelude.m4) diff --git a/net/snort/patches/002-automake-cross.patch b/net/snort/patches/002-automake-cross.patch new file mode 100644 index 0000000..5671c23 --- /dev/null +++ b/net/snort/patches/002-automake-cross.patch @@ -0,0 +1,214 @@ +--- a/configure.in ++++ b/configure.in +@@ -163,28 +163,6 @@ else + AC_MSG_RESULT(no) + fi + +-# check for sparc %time register +-if eval "echo $host_cpu|grep -i sparc >/dev/null"; then +- OLD_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS -mcpu=v9 " +- AC_MSG_CHECKING([for sparc %time register]) +- AC_RUN_IFELSE( +- [AC_LANG_PROGRAM( +- [[]], +- [[ +- int val; +- __asm__ __volatile__("rd %%tick, %0" : "=r"(val)); +- ]])], +- [sparcv9="yes"], +- [sparcv9="no"]) +- AC_MSG_RESULT($sparcv9) +- if test "x$sparcv9" = "xyes"; then +- AC_DEFINE([SPARCV9], [], [For sparc v9 with %time register]) +- else +- CFLAGS="$OLD_CFLAGS" +- fi +-fi +- + dnl checking headers + AC_CHECK_HEADERS(strings.h) + AC_CHECK_HEADERS(string.h) +@@ -282,22 +260,12 @@ AC_CHECK_FUNCS(vswprintf) + AC_CHECK_FUNCS(wprintf) + + AC_MSG_CHECKING([for sizeof(unsigned long)]) +-AC_RUN_IFELSE( +-[AC_LANG_PROGRAM( +-[], +-[[ +- if (sizeof(unsigned long) == 8) +- return 0; +- +- return 1; +-]])], +-[ulong_is_64_bit="yes"], +-[ulong_is_64_bit="no"]) +-if test "x$ulong_is_64_bit" = "xyes"; then +- AC_MSG_RESULT([64 bits]) +- AC_DEFINE([ULONGIS64BIT], [], [If unsigned long is 64 bits]) ++AC_CHECK_SIZEOF([unsigned long]) ++if test $ac_cv_sizeof_unsigned_long = 8; then ++ AC_MSG_RESULT([64 bits]) ++ AC_DEFINE([ULONGIS64BIT], [], [If unsigned long is 64 bits]) + else +- AC_MSG_RESULT([32 bits]) ++ AC_MSG_RESULT([32 bits]) + fi + + AC_TRY_COMPILE([ +@@ -412,88 +380,7 @@ if test "x$LPCAP" = "xno"; then + fi + + +-# This is to determine which pcap library version is being used. The reason being +-# that versions < 0.9 do not accumulate packet statistics whereas >= 0.9 do accumulate. +-# This is Linux only. The check is done after pcre because the code below uses pcre. +-# It seems Phil Wood's pcap does not accumulate - 0.9x +-pcap_version_check="yes" +-if test "x$linux" = "xyes"; then +- if test "x$pcap_version_check" = "xyes"; then +- AC_MSG_CHECKING([for libpcap version >= 0.9]) +- AC_RUN_IFELSE( +- [AC_LANG_PROGRAM( +- [[ +- #include +- #include +- extern char pcap_version[]; +- ]], +- [[ +- if (strcmp(pcap_version, "0.9x") == 0) +- return 1; +- +- if (strcmp(pcap_version, "0.9.0") < 0) +- return 1; +- ]])], +- [libpcap_version_09="yes"], +- [libpcap_version_09="no"]) +- AC_MSG_RESULT($libpcap_version_09) +- if test "x$libpcap_version_09" = "xyes"; then +- AC_DEFINE([LIBPCAP_ACCUMULATES], [], [For libpcap versions that accumulate stats]) +- fi +- else +- libpcap_version_09="no" +- AC_DEFINE([LIBPCAP_ACCUMULATES], [], [For libpcap versions that accumulate stats]) +- fi +- +- # there is a bug in the Linux code in 0.9.0 - 0.9.4 where the pcap +- # stats are doubled. +- if test "x$libpcap_version_09" = "xyes"; then +- AC_MSG_CHECKING(for libpcap version 0.9.0 - 0.9.4) +- AC_RUN_IFELSE( +- [AC_LANG_PROGRAM( +- [[ +- #include +- #include +- extern char pcap_version[]; +- ]], +- [[ +- if (strcmp(pcap_version, "0.9.5") < 0) +- return 1; +- ]])], +- [libpcap_version_09_bug="no"], +- [libpcap_version_09_bug="yes"]) +- AC_MSG_RESULT($libpcap_version_09_bug) +- else +- libpcap_version_09_bug="no" +- fi +- +- if test "x$libpcap_version_09_bug" = "xyes"; then +- AC_DEFINE([LINUX_LIBPCAP_DOUBLES_STATS], [], [For Linux libpcap versions 0.9.0 to 0.9.4]) +- fi +-else +- AC_DEFINE([LIBPCAP_ACCUMULATES], [], [For libpcap versions that accumulate stats]) +-fi +- +-# In case INADDR_NONE is not defined (like on Solaris) +-have_inaddr_none="no" +-AC_MSG_CHECKING([for INADDR_NONE]) +-AC_RUN_IFELSE( +-[AC_LANG_PROGRAM( +-[[ +-#include +-#include +-]], +-[[ +- if (inet_addr("10,5,2") == INADDR_NONE); +-]])], +-[have_inaddr_none="yes"], +-[have_inaddr_none="no"]) +-AC_MSG_RESULT($have_inaddr_none) +-if test "x$have_inaddr_none" = "xno"; then +- AC_DEFINE([INADDR_NONE], [-1], [For INADDR_NONE definition]) +-fi +- +-default_directory="/usr /usr/local" ++AC_DEFINE([LIBPCAP_ACCUMULATES], [], [For libpcap versions that accumulate stats]) + + AC_DEFUN([FAIL_MESSAGE],[ + echo +@@ -745,64 +632,6 @@ if test "x$with_mysql" != "xno"; then + LIBS="-lmysqlclient ${LIBS}" + fi + fi +- +- AC_MSG_CHECKING([for mysql default client reconnect]) +- +- AC_RUN_IFELSE( +- [AC_LANG_PROGRAM( +- [[ +- #include +- ]], +- [[ +- if (mysql_get_client_version() < 50003) +- return 1; +- ]])], +- [mysql_default_reconnect="no"], +- [mysql_default_reconnect="yes"]) +- +- AC_MSG_RESULT($mysql_default_reconnect) +- +- if test "x$mysql_default_reconnect" = "xno"; then +- AC_MSG_CHECKING([for mysql reconnect option]) +- +- AC_RUN_IFELSE( +- [AC_LANG_PROGRAM( +- [[ +- #include +- ]], +- [[ +- if (mysql_get_client_version() < 50013) +- return 1; +- ]])], +- [mysql_has_reconnect="yes"], +- [mysql_has_reconnect="no"]) +- +- AC_MSG_RESULT($mysql_has_reconnect) +- +- if test "x$mysql_has_reconnect" = "xyes"; then +- AC_DEFINE([MYSQL_HAS_OPT_RECONNECT], [], [For MySQL versions 5.0.13 and greater]) +- +- AC_MSG_CHECKING([for mysql setting of reconnect option before connect bug]) +- +- AC_RUN_IFELSE( +- [AC_LANG_PROGRAM( +- [[ +- #include +- ]], +- [[ +- if (mysql_get_client_version() < 50019) +- return 1; +- ]])], +- [mysql_has_reconnect_bug="no"], +- [mysql_has_reconnect_bug="yes"]) +- +- AC_MSG_RESULT($mysql_has_reconnect_bug) +- +- if test "x$mysql_has_reconnect_bug" = "xyes"; then +- AC_DEFINE([MYSQL_HAS_OPT_RECONNECT_BUG], [], [For MySQL versions 5.0.13 to 5.0.18]) +- fi +- fi +- fi + fi + + AC_ARG_WITH(odbc, diff --git a/net/snort/patches/003-automake-no-hostpaths.patch b/net/snort/patches/003-automake-no-hostpaths.patch new file mode 100644 index 0000000..b7fc1f6 --- /dev/null +++ b/net/snort/patches/003-automake-no-hostpaths.patch @@ -0,0 +1,86 @@ +--- a/configure.in ++++ b/configure.in +@@ -115,7 +115,6 @@ case "$host" in + # libpcap doesn't even LOOK at the timeout you give it under Linux + AC_DEFINE(PCAP_TIMEOUT_IGNORED,,[Define if PCAP_TIMEOUT_IGNORED]) + AC_SUBST(extra_incl) +- extra_incl=-I/usr/include/pcap + ;; + *-hpux10*|*-hpux11*) + AC_DEFINE(HPUX,,[Define if HPUX]) +@@ -719,13 +718,13 @@ AC_ARG_WITH(pgsql_includes, + + if test "x$with_postgresql" != "xno"; then + if test "x$with_postgresql" = "xyes"; then +- postgresql_directory="$default_directory /usr/local/pgsql /usr/pgsql /usr/local" ++ postgresql_directory="$default_directory" + postgresql_fail="yes" + elif test -d $withval; then +- postgresql_directory="$withval $default_directory /usr/local/pgsql /usr/pgsql" ++ postgresql_directory="$withval $default_directory" + postgresql_fail="yes" + elif test "$with_postgresql" = ""; then +- postgresql_directory="$default_directory /usr/local/pgsql /usr/pgsql" ++ postgresql_directory="$default_directory" + postgresql_fail="no" + fi + +@@ -1040,8 +1039,6 @@ if test "$enable_inline" != "no"; then + LIBNET_INC_DIR="" + if test -n "$with_libnet_includes" -a "$with_libnet_includes" != "no"; then + libnet_dir="${with_libnet_includes}" +- else +- libnet_dir="/usr/include /usr/local/include /sw/include" + fi + AC_MSG_CHECKING("for libnet.h version 1.0.x") + for i in $libnet_dir; do +@@ -1089,7 +1086,6 @@ if test "x$enable_flexresp" != "xno" -a + fi + + if test `libnet-config --cflags | wc -c` = "1"; then +- CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include" + LIBNET_CONFIG_BROKEN_CFLAGS="yes" + fi + +@@ -1097,7 +1093,6 @@ if test "x$enable_flexresp" != "xno" -a + AC_MSG_WARN(libnet-config --libs is broken on your system. If you) + AC_MSG_WARN(are using a precompiled package please notify the) + AC_MSG_WARN(maintainer.) +- LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib" + LIBS="${LIBS} -lnet" + fi + +@@ -1116,8 +1111,6 @@ if test "x$enable_flexresp" != "xno" -a + if test "x${LIBNET_CONFIG_BROKEN_CFLAGS}" = "xyes"; then + if test -n "$with_libnet_includes" -a "x$with_libnet_includes" != "xno"; then + libnet_dir="${with_libnet_includes}" +- else +- libnet_dir="/usr/include /usr/local/include /sw/include" + fi + else + libnet_dir=`libnet-config --cflags | cut -dI -f2` +@@ -1210,7 +1203,6 @@ if test "x$enable_react" != "xno" -a "x$ + fi + + if test `libnet-config --cflags | wc -c` = "1"; then +- CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include" + LIBNET_CONFIG_BROKEN_CFLAGS="yes" + fi + +@@ -1218,7 +1210,6 @@ if test "x$enable_react" != "xno" -a "x$ + AC_MSG_WARN(libnet-config --libs is broken on your system. If you) + AC_MSG_WARN(are using a precompiled package please notify the) + AC_MSG_WARN(maintainer.) +- LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib" + LIBS="${LIBS} -lnet" + fi + +@@ -1237,8 +1228,6 @@ if test "x$enable_react" != "xno" -a "x$ + if test "x${LIBNET_CONFIG_BROKEN_CFLAGS}" = "xyes"; then + if test -n "$with_libnet_includes" -a "x$with_libnet_includes" != "xno"; then + libnet_dir="${with_libnet_includes}" +- else +- libnet_dir="/usr/include /usr/local/include /sw/include" + fi + else + libnet_dir=`libnet-config --cflags | cut -dI -f2` diff --git a/net/snort/patches/010-dont-add-host-paths.patch b/net/snort/patches/010-dont-add-host-paths.patch new file mode 100644 index 0000000..9a899c1 --- /dev/null +++ b/net/snort/patches/010-dont-add-host-paths.patch @@ -0,0 +1,43 @@ +--- a/configure ++++ b/configure +@@ -20668,8 +20668,6 @@ cat >>confdefs.h <<\_ACEOF + #define PCAP_TIMEOUT_IGNORED + _ACEOF + +- +- extra_incl=-I/usr/include/pcap + ;; + *-hpux10*|*-hpux11*) + +@@ -26218,7 +26216,6 @@ if test "x$enable_flexresp" != "xno" -a + fi + + if test `libnet-config --cflags | wc -c` = "1"; then +- CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include" + LIBNET_CONFIG_BROKEN_CFLAGS="yes" + fi + +@@ -26229,7 +26226,6 @@ echo "$as_me: WARNING: libnet-config --l + echo "$as_me: WARNING: are using a precompiled package please notify the" >&2;} + { echo "$as_me:$LINENO: WARNING: maintainer." >&5 + echo "$as_me: WARNING: maintainer." >&2;} +- LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib" + LIBS="${LIBS} -lnet" + fi + +@@ -26804,7 +26800,6 @@ if test "x$enable_react" != "xno" -a "x$ + fi + + if test `libnet-config --cflags | wc -c` = "1"; then +- CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include" + LIBNET_CONFIG_BROKEN_CFLAGS="yes" + fi + +@@ -26815,7 +26810,6 @@ echo "$as_me: WARNING: libnet-config --l + echo "$as_me: WARNING: are using a precompiled package please notify the" >&2;} + { echo "$as_me:$LINENO: WARNING: maintainer." >&5 + echo "$as_me: WARNING: maintainer." >&2;} +- LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib" + LIBS="${LIBS} -lnet" + fi + diff --git a/net/snort/patches/100-cross-compile.patch b/net/snort/patches/100-cross-compile.patch new file mode 100644 index 0000000..57fde47 --- /dev/null +++ b/net/snort/patches/100-cross-compile.patch @@ -0,0 +1,72 @@ +--- a/configure ++++ b/configure +@@ -20768,8 +20768,7 @@ echo $ECHO_N "checking for sparc %time r + { { 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; }; } ++See \`config.log' for more details." >&2;} } + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -22979,8 +22978,7 @@ 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; }; } ++See \`config.log' for more details." >&2;} } + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -23764,8 +23762,7 @@ echo $ECHO_N "checking for libpcap versi + { { 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; }; } ++See \`config.log' for more details." >&2;} } + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -23852,8 +23849,7 @@ echo $ECHO_N "checking for libpcap versi + { { 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; }; } ++See \`config.log' for more details." >&2;} } + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -23939,8 +23935,7 @@ 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; }; } ++See \`config.log' for more details." >&2;} } + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -24654,8 +24649,7 @@ echo $ECHO_N "checking for mysql default + { { 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; }; } ++See \`config.log' for more details." >&2;} } + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -24722,8 +24716,7 @@ echo $ECHO_N "checking for mysql reconne + { { 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; }; } ++See \`config.log' for more details." >&2;} } + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ diff --git a/net/snort/patches/500-no-config-search.patch b/net/snort/patches/500-no-config-search.patch new file mode 100644 index 0000000..bc8dd60 --- /dev/null +++ b/net/snort/patches/500-no-config-search.patch @@ -0,0 +1,42 @@ +--- a/src/snort.c ++++ b/src/snort.c +@@ -4198,7 +4198,7 @@ static char *ConfigFileSearch(void) + { + struct stat st; + int i; +- char *conf_files[]={"/etc/snort.conf", "./snort.conf", NULL}; ++ char *conf_files[]={"/etc/snort/snort.conf", NULL}; + char *fname = NULL; + char *rval = NULL; + +@@ -4217,30 +4217,6 @@ static char *ConfigFileSearch(void) + i++; + } + +- /* search for .snortrc in the HOMEDIR */ +- if(!rval) +- { +- char *home_dir = NULL; +- +- if((home_dir = getenv("HOME")) != NULL) +- { +- char *snortrc = "/.snortrc"; +- int path_len; +- +- path_len = strlen(home_dir) + strlen(snortrc) + 1; +- +- /* create the full path */ +- fname = (char *)SnortAlloc(path_len); +- +- SnortSnprintf(fname, path_len, "%s%s", home_dir, snortrc); +- +- if(stat(fname, &st) != -1) +- rval = fname; +- else +- free(fname); +- } +- } +- + return rval; + } + diff --git a/net/snort/patches/750-lightweight-config.patch b/net/snort/patches/750-lightweight-config.patch new file mode 100644 index 0000000..1116202 --- /dev/null +++ b/net/snort/patches/750-lightweight-config.patch @@ -0,0 +1,266 @@ +--- a/etc/snort.conf ++++ b/etc/snort.conf +@@ -6,6 +6,7 @@ + # + ################################################### + # This file contains a sample snort configuration. ++# Most preprocessors and rules were disabled to save memory. + # You can take the following steps to create your own custom configuration: + # + # 1) Set the variables for your network +@@ -43,10 +44,10 @@ + # or you can specify the variable to be any IP address + # like this: + +-var HOME_NET any ++var HOME_NET 192.168.1.0/24 + + # Set up the external network addresses as well. A good start may be "any" +-var EXTERNAL_NET any ++var EXTERNAL_NET !$HOME_NET + + # Configure your server lists. This allows snort to only look for attacks to + # systems that have a service up. Why look for HTTP attacks if you are not +@@ -107,8 +108,8 @@ var AIM_SERVERS [64.12.24.0/23,64.12.28. + # Path to your rules files (this can be a relative path) + # Note for Windows users: You are advised to make this an absolute path, + # such as: c:\snort\rules +-var RULE_PATH ../rules +-var PREPROC_RULE_PATH ../preproc_rules ++var RULE_PATH /etc/snort/rules ++var PREPROC_RULE_PATH /etc/snort/preproc_rules + + # Configure the snort decoder + # ============================ +@@ -307,11 +308,11 @@ preprocessor stream5_tcp: policy first, + # lots of options available here. See doc/README.http_inspect. + # unicode.map should be wherever your snort.conf lives, or given + # a full path to where snort can find it. +-preprocessor http_inspect: global \ +- iis_unicode_map unicode.map 1252 ++#preprocessor http_inspect: global \ ++# iis_unicode_map unicode.map 1252 + +-preprocessor http_inspect_server: server default \ +- profile all ports { 80 8080 8180 } oversize_dir_length 500 ++#preprocessor http_inspect_server: server default \ ++# profile all ports { 80 8080 8180 } oversize_dir_length 500 + + # + # Example unique server configuration +@@ -345,7 +346,7 @@ preprocessor http_inspect_server: server + # no_alert_incomplete - don't alert when a single segment + # exceeds the current packet size + +-preprocessor rpc_decode: 111 32771 ++#preprocessor rpc_decode: 111 32771 + + # bo: Back Orifice detector + # ------------------------- +@@ -368,7 +369,7 @@ preprocessor rpc_decode: 111 32771 + # 3 Back Orifice Server Traffic Detected + # 4 Back Orifice Snort Buffer Attack + +-preprocessor bo ++#preprocessor bo + + # ftp_telnet: FTP & Telnet normalizer, protocol enforcement and buff overflow + # --------------------------------------------------------------------------- +@@ -391,32 +392,32 @@ preprocessor bo + # or use commandline option + # --dynamic-preprocessor-lib + +-preprocessor ftp_telnet: global \ +- encrypted_traffic yes \ +- inspection_type stateful +- +-preprocessor ftp_telnet_protocol: telnet \ +- normalize \ +- ayt_attack_thresh 200 ++#preprocessor ftp_telnet: global \ ++# encrypted_traffic yes \ ++# inspection_type stateful ++ ++#preprocessor ftp_telnet_protocol: telnet \ ++# normalize \ ++# ayt_attack_thresh 200 + + # This is consistent with the FTP rules as of 18 Sept 2004. + # CWD can have param length of 200 + # MODE has an additional mode of Z (compressed) + # Check for string formats in USER & PASS commands + # Check nDTM commands that set modification time on the file. +-preprocessor ftp_telnet_protocol: ftp server default \ +- def_max_param_len 100 \ +- alt_max_param_len 200 { CWD } \ +- cmd_validity MODE < char ASBCZ > \ +- cmd_validity MDTM < [ date nnnnnnnnnnnnnn[.n[n[n]]] ] string > \ +- chk_str_fmt { USER PASS RNFR RNTO SITE MKD } \ +- telnet_cmds yes \ +- data_chan +- +-preprocessor ftp_telnet_protocol: ftp client default \ +- max_resp_len 256 \ +- bounce yes \ +- telnet_cmds yes ++#preprocessor ftp_telnet_protocol: ftp server default \ ++# def_max_param_len 100 \ ++# alt_max_param_len 200 { CWD } \ ++# cmd_validity MODE < char ASBCZ > \ ++# cmd_validity MDTM < [ date nnnnnnnnnnnnnn[.n[n[n]]] ] string > \ ++# chk_str_fmt { USER PASS RNFR RNTO SITE MKD } \ ++# telnet_cmds yes \ ++# data_chan ++ ++#preprocessor ftp_telnet_protocol: ftp client default \ ++# max_resp_len 256 \ ++# bounce yes \ ++# telnet_cmds yes + + # smtp: SMTP normalizer, protocol enforcement and buffer overflow + # --------------------------------------------------------------------------- +@@ -434,15 +435,15 @@ preprocessor ftp_telnet_protocol: ftp cl + # or use commandline option + # --dynamic-preprocessor-lib + +-preprocessor smtp: \ +- ports { 25 587 691 } \ +- inspection_type stateful \ +- normalize cmds \ +- normalize_cmds { EXPN VRFY RCPT } \ +- alt_max_command_line_len 260 { MAIL } \ +- alt_max_command_line_len 300 { RCPT } \ +- alt_max_command_line_len 500 { HELP HELO ETRN } \ +- alt_max_command_line_len 255 { EXPN VRFY } ++#preprocessor smtp: \ ++# ports { 25 587 691 } \ ++# inspection_type stateful \ ++# normalize cmds \ ++# normalize_cmds { EXPN VRFY RCPT } \ ++# alt_max_command_line_len 260 { MAIL } \ ++# alt_max_command_line_len 300 { RCPT } \ ++# alt_max_command_line_len 500 { HELP HELO ETRN } \ ++# alt_max_command_line_len 255 { EXPN VRFY } + + # sfPortscan + # ---------- +@@ -498,9 +499,9 @@ preprocessor smtp: \ + # false alerts, especially under heavy load with dropped packets; which is why + # the option is off by default. + # +-preprocessor sfportscan: proto { all } \ +- memcap { 10000000 } \ +- sense_level { low } ++#preprocessor sfportscan: proto { all } \ ++# memcap { 10000000 } \ ++# sense_level { low } + + # arpspoof + #---------------------------------------- +@@ -623,9 +624,9 @@ preprocessor dcerpc2_server: default + # or use commandline option + # --dynamic-preprocessor-lib + +-preprocessor dns: \ +- ports { 53 } \ +- enable_rdata_overflow ++#preprocessor dns: \ ++# ports { 53 } \ ++# enable_rdata_overflow + + # SSL + #---------------------------------------- +@@ -649,7 +650,7 @@ preprocessor dns: \ + # To add reassembly on port 443 to Stream5, use 'port both 443' in the + # Stream5 configuration. + +-preprocessor ssl: noinspect_encrypted, trustservers ++#preprocessor ssl: noinspect_encrypted, trustservers + + + #################################################################### +@@ -811,41 +812,41 @@ include $RULE_PATH/local.rules + include $RULE_PATH/bad-traffic.rules + include $RULE_PATH/exploit.rules + include $RULE_PATH/scan.rules +-include $RULE_PATH/finger.rules +-include $RULE_PATH/ftp.rules +-include $RULE_PATH/telnet.rules +-include $RULE_PATH/rpc.rules +-include $RULE_PATH/rservices.rules +-include $RULE_PATH/dos.rules +-include $RULE_PATH/ddos.rules +-include $RULE_PATH/dns.rules +-include $RULE_PATH/tftp.rules +- +-include $RULE_PATH/web-cgi.rules +-include $RULE_PATH/web-coldfusion.rules +-include $RULE_PATH/web-iis.rules +-include $RULE_PATH/web-frontpage.rules +-include $RULE_PATH/web-misc.rules +-include $RULE_PATH/web-client.rules +-include $RULE_PATH/web-php.rules +- +-include $RULE_PATH/sql.rules +-include $RULE_PATH/x11.rules +-include $RULE_PATH/icmp.rules +-include $RULE_PATH/netbios.rules +-include $RULE_PATH/misc.rules +-include $RULE_PATH/attack-responses.rules +-include $RULE_PATH/oracle.rules +-include $RULE_PATH/mysql.rules +-include $RULE_PATH/snmp.rules +- +-include $RULE_PATH/smtp.rules +-include $RULE_PATH/imap.rules +-include $RULE_PATH/pop2.rules +-include $RULE_PATH/pop3.rules ++#include $RULE_PATH/finger.rules ++#include $RULE_PATH/ftp.rules ++#include $RULE_PATH/telnet.rules ++#include $RULE_PATH/rpc.rules ++#include $RULE_PATH/rservices.rules ++#include $RULE_PATH/dos.rules ++#include $RULE_PATH/ddos.rules ++#include $RULE_PATH/dns.rules ++#include $RULE_PATH/tftp.rules ++ ++#include $RULE_PATH/web-cgi.rules ++#include $RULE_PATH/web-coldfusion.rules ++#include $RULE_PATH/web-iis.rules ++#include $RULE_PATH/web-frontpage.rules ++#include $RULE_PATH/web-misc.rules ++#include $RULE_PATH/web-client.rules ++#include $RULE_PATH/web-php.rules ++ ++#include $RULE_PATH/sql.rules ++#include $RULE_PATH/x11.rules ++#include $RULE_PATH/icmp.rules ++#include $RULE_PATH/netbios.rules ++#include $RULE_PATH/misc.rules ++#include $RULE_PATH/attack-responses.rules ++#include $RULE_PATH/oracle.rules ++#include $RULE_PATH/mysql.rules ++#include $RULE_PATH/snmp.rules ++ ++#include $RULE_PATH/smtp.rules ++#include $RULE_PATH/imap.rules ++#include $RULE_PATH/pop2.rules ++#include $RULE_PATH/pop3.rules + +-include $RULE_PATH/nntp.rules +-include $RULE_PATH/other-ids.rules ++#include $RULE_PATH/nntp.rules ++#include $RULE_PATH/other-ids.rules + # include $RULE_PATH/web-attacks.rules + # include $RULE_PATH/backdoor.rules + # include $RULE_PATH/shellcode.rules +@@ -859,7 +860,7 @@ include $RULE_PATH/other-ids.rules + # include $RULE_PATH/p2p.rules + # include $RULE_PATH/spyware-put.rules + # include $RULE_PATH/specific-threats.rules +-include $RULE_PATH/experimental.rules ++#include $RULE_PATH/experimental.rules + + # include $PREPROC_RULE_PATH/preprocessor.rules + # include $PREPROC_RULE_PATH/decoder.rules diff --git a/net/socat/Makefile b/net/socat/Makefile new file mode 100644 index 0000000..009da5e --- /dev/null +++ b/net/socat/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=socat +PKG_VERSION:=1.7.1.3 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download/ +PKG_MD5SUM:=2081987fb0cb0290b8105574058cb329 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/socat + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpthread + TITLE:=A multipurpose relay (SOcket CAT) + URL:=http://www.dest-unreach.org/socat/ +endef + +define Package/socat/description + SoCat (for SOcket CAT) establishes two bidirectional byte streams and + transfers data between them. + Data channels may be files, pipes, devices (terminal or modem, etc.), or + sockets (Unix, IPv4, IPv6, raw, UDP, TCP, SSL). It provides forking, + logging and tracing, different modes for interprocess communication and + many more options. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-libwrap \ + --disable-readline \ + --disable-openssl \ + --enable-termios \ + , \ + sc_cv_termios_ispeed="no" \ + sc_cv_sys_crdly_shift=9 \ + sc_cv_sys_tabdly_shift=11 \ + sc_cv_sys_csize_shift=4 \ + ) +endef + +define Package/socat/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/socat $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,socat)) diff --git a/net/socat/patches/501-honor_ldflags.patch b/net/socat/patches/501-honor_ldflags.patch new file mode 100644 index 0000000..a8eee61 --- /dev/null +++ b/net/socat/patches/501-honor_ldflags.patch @@ -0,0 +1,12 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -37,7 +37,8 @@ + + #0 CFLAGS = @CFLAGS@ $(CCOPTS) $(DEFS) $(INCLS) + CFLAGS = @CFLAGS@ $(CCOPTS) $(DEFS) $(CPPFLAGS) +-CLIBS = $(LIBS) ++LDFLAGS = @LDFLAGS@ ++CLIBS = $(LDFLAGS) $(LIBS) + #CLIBS = $(LIBS) -lm -lefence + XIOSRCS = xioinitialize.c xiohelp.c xioparam.c xiodiag.c xioopen.c xioopts.c \ + xiosignal.c xiosigchld.c xioread.c xiowrite.c \ diff --git a/net/socat/patches/502-no_sslv2.patch b/net/socat/patches/502-no_sslv2.patch new file mode 100644 index 0000000..ea6be13 --- /dev/null +++ b/net/socat/patches/502-no_sslv2.patch @@ -0,0 +1,48 @@ +--- a/sslcls.c ++++ b/sslcls.c +@@ -35,6 +35,7 @@ + return result; + } + ++#ifndef OPENSSL_NO_SSL2 + SSL_METHOD *sycSSLv2_client_method(void) { + SSL_METHOD *result; + Debug("SSLv2_client_method()"); +@@ -50,6 +51,7 @@ + Debug1("SSLv2_server_method() -> %p", result); + return result; + } ++#endif + + SSL_METHOD *sycSSLv3_client_method(void) { + SSL_METHOD *result; +--- a/xio-openssl.c ++++ b/xio-openssl.c +@@ -676,9 +676,12 @@ + + if (!server) { + if (me_str != 0) { ++#ifndef OPENSSL_NO_SSL2 + if (!strcasecmp(me_str, "SSLv2") || !strcasecmp(me_str, "SSL2")) { + method = sycSSLv2_client_method(); +- } else if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) { ++ } else ++#endif ++ if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) { + method = sycSSLv3_client_method(); + } else if (!strcasecmp(me_str, "SSLv23") || !strcasecmp(me_str, "SSL23") || + !strcasecmp(me_str, "SSL")) { +@@ -695,9 +698,12 @@ + } + } else /* server */ { + if (me_str != 0) { ++#ifndef OPENSSL_NO_SSL2 + if (!strcasecmp(me_str, "SSLv2") || !strcasecmp(me_str, "SSL2")) { + method = sycSSLv2_server_method(); +- } else if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) { ++ } else ++#endif ++ if (!strcasecmp(me_str, "SSLv3") || !strcasecmp(me_str, "SSL3")) { + method = sycSSLv3_server_method(); + } else if (!strcasecmp(me_str, "SSLv23") || !strcasecmp(me_str, "SSL23") || + !strcasecmp(me_str, "SSL")) { diff --git a/net/softflowd/Makefile b/net/softflowd/Makefile new file mode 100644 index 0000000..f6c45fe --- /dev/null +++ b/net/softflowd/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=softflowd +PKG_VERSION:=0.9.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.mindrot.org/files/softflowd/ +PKG_MD5SUM:=0054d1c80494396cc15edb0a1c7748b1 + +PKG_FIXUP = libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/softflowd + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap + TITLE:=softflowd + URL:=http://www.mindrot.org/projects/softflowd/ +endef + +define Package/softflowd/description + Software netflow exporter +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" softflowd softflowctl +endef + +define Package/softflowd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/softflowd $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/softflowctl $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,softflowd)) diff --git a/net/softflowd/files/softflowd.config b/net/softflowd/files/softflowd.config new file mode 100644 index 0000000..974d99e --- /dev/null +++ b/net/softflowd/files/softflowd.config @@ -0,0 +1,13 @@ +config softflowd + option interface 'br-lan' + option pcap_file '' + option timeout '' + option max_flows '8192' + option host_port '' + option pid_file '/var/run/softflowd.pid' + option control_socket '/var/run/softflowd.ctl' + option export_version '5' + option hoplimit '' + option tracking_level 'full' + option track_ipv6 '0' + option enabled '0' diff --git a/net/softflowd/files/softflowd.init b/net/softflowd/files/softflowd.init new file mode 100644 index 0000000..4fbb875 --- /dev/null +++ b/net/softflowd/files/softflowd.init @@ -0,0 +1,66 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org +START=50 + +NAME=softflowd +BIN_F=/usr/sbin/$NAME +SSD=start-stop-daemon + +append_bool() { + local section="$1" + local option="$2" + local value="$3" + local _val + config_get_bool _val "$section" "$option" '0' + [ "$_val" -gt 0 ] && append args "$3" +} + +append_string() { + local section="$1" + local option="$2" + local value="$3" + local _val + config_get _val "$section" "$option" + [ -n "$_val" ] && append args "$3 $_val" +} + +start_service() { + local section="$1" + args="" + + append_string "$section" interface "-i" + append_string "$section" pcap_file "-r" + append_string "$section" timeout "-t" + append_string "$section" max_flows "-m" + append_string "$section" host_port "-n" + append_string "$section" pid_file "-p" + append_string "$section" control_socket "-c" + append_string "$section" export_version "-v" + append_string "$section" hoplimit "-L" + append_string "$section" tracking_level "-T" + append_bool "$section" track_ipv6 "-6" + config_get_bool "enabled" "$section" "enabled" '1' + [ "$enabled" -gt 0 ] && $BIN_F $args +} + +stop_service() { + local section="$1" + config_get pidfile "$section" pid_file + config_get control_socket "$section" control_socket + + [ -n "$pid_file" ] || pid_file="$pidfile" + # FIXME + $SSD -K -p $pid_file -q && rm -f $control_socket +} + +start() { + mkdir -p /var/empty + + config_load $NAME + config_foreach start_service $NAME +} + +stop() { + config_load $NAME + config_foreach stop_service $NAME +} diff --git a/net/spawn-fcgi/Makefile b/net/spawn-fcgi/Makefile new file mode 100644 index 0000000..560f3be --- /dev/null +++ b/net/spawn-fcgi/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=spawn-fcgi +PKG_VERSION:=1.6.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.lighttpd.net/download/ +PKG_MD5SUM:=787ed2f88d2204bf1fe4fbd6e509d1d7 + +PKG_INSTALL = 1 + +include $(INCLUDE_DIR)/package.mk + +define Package/spawn-fcgi + SUBMENU:=Web Servers/Proxies + SECTION:=net + CATEGORY:=Network + TITLE:=Tool to spawn fastcgi applications + URL:=http://redmine.lighttpd.net/projects/spawn-fcgi +endef + +define Package/spawn-fcgi/description + spawn-fcgi is used to spawn fastcgi applications +endef + +define Package/spawn-fcgi/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/spawn-fcgi $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,spawn-fcgi)) diff --git a/net/speedtouch-usb-firmware/Makefile b/net/speedtouch-usb-firmware/Makefile new file mode 100644 index 0000000..b4e641f --- /dev/null +++ b/net/speedtouch-usb-firmware/Makefile @@ -0,0 +1,75 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=speedtouch-usb-firmware +PKG_VERSION:=3 +PKG_RELEASE:=012 + +PKG_BUILD_DIR:=$(BUILD_DIR)/speedtouch-usb-firmware-$(PKG_VERSION) +PKG_SOURCE:=SpeedTouch330_firmware_$(PKG_VERSION)$(PKG_RELEASE).zip +PKG_SOURCE_URL:=http://www.speedtouch.com/download/drivers/USB/ +PKG_MD5SUM:=2551ce46ef785642f2c6768511f70ff3 + +include $(INCLUDE_DIR)/package.mk + +define Package/speedtouch-usb-firmware + SUBMENU:=firmware + SECTION:=net + CATEGORY:=Network + TITLE:=SpeedTouch 330 ADSL USB firmware + DEPENDS:=+kmod-usb-atm +kmod-usb-atm-speedtouch @!LINUX_2_4 + PKGARCH:=all +endef + +define Package/speedtouch-usb-firmware/description + This package add the firmware for SpeedTouch330 ADSL USB modem. +endef + +define Build/Configure +endef + +define Build/Compile + mv $(PKG_BUILD_DIR)/../KQD6_$(PKG_VERSION).$(PKG_RELEASE) $(PKG_BUILD_DIR)/ + mv $(PKG_BUILD_DIR)/../ZZZL_$(PKG_VERSION).$(PKG_RELEASE) $(PKG_BUILD_DIR)/ + # next lines from Gentoo ebuild + # Extract the "stage 1" portion of the firmware + dd if=$(PKG_BUILD_DIR)/KQD6_$(PKG_VERSION).$(PKG_RELEASE) \ + of=$(PKG_BUILD_DIR)/speedtch-1.bin.2 ibs=1 obs=991 count=991 skip=36 + dd if=$(PKG_BUILD_DIR)/ZZZL_$(PKG_VERSION).$(PKG_RELEASE) \ + of=$(PKG_BUILD_DIR)/speedtch-1.bin.4 ibs=1 obs=935 count=935 skip=32 + # Extract the "stage 2" portion of the firmware + dd if=$(PKG_BUILD_DIR)/KQD6_$(PKG_VERSION).$(PKG_RELEASE) \ + of=$(PKG_BUILD_DIR)/speedtch-2.bin.2 ibs=1 obs=762650 count=762650 skip=1027 + dd if=$(PKG_BUILD_DIR)/ZZZL_$(PKG_VERSION).$(PKG_RELEASE) \ + of=$(PKG_BUILD_DIR)/speedtch-2.bin.4 ibs=1 obs=775545 count=775545 skip=967 +endef + +define Package/speedtouch-usb-firmware/install + $(INSTALL_DIR) -d $(1)/lib/firmware + $(INSTALL_CONF) $(PKG_BUILD_DIR)/speedtch-1.bin.2 $(1)/lib/firmware + $(INSTALL_CONF) $(PKG_BUILD_DIR)/speedtch-1.bin.4 $(1)/lib/firmware + $(INSTALL_CONF) $(PKG_BUILD_DIR)/speedtch-2.bin.2 $(1)/lib/firmware + $(INSTALL_CONF) $(PKG_BUILD_DIR)/speedtch-2.bin.4 $(1)/lib/firmware +endef + +define Package/speedtouch-usb-firmware/postinst +#!/bin/sh +# Symlinks for other revisions of the modem +cd "$${IPKG_INSTROOT}/lib/firmware" +for n in 1 2 ; do + for rev in 0 1 ; do + ln -sfn speedtch-$${n}.bin.2 speedtch-$${n}.bin.$${rev} + done + # Seems like a reasonable guess, for revision 3 + ln -sfn speedtch-$${stub}$${n}.bin.4 speedtch-$${n}.bin.3 +done +endef + +$(eval $(call BuildPackage,speedtouch-usb-firmware)) diff --git a/net/squid/Makefile b/net/squid/Makefile new file mode 100644 index 0000000..f0b2790 --- /dev/null +++ b/net/squid/Makefile @@ -0,0 +1,188 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=squid +PKG_VERSION:=2.7.STABLE9 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.squid-cache.org/Versions/v2/2.7/ +PKG_MD5SUM:=3c6642c85470b1079207d43bba25a819 + +include $(INCLUDE_DIR)/package.mk + +define Package/squid/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + URL:=http://www.squid-cache.org/ +endef + +define Package/squid + $(call Package/squid/Default) + MENU:=1 + DEPENDS:=+libopenssl +libpthread @!LINUX_2_4 + TITLE:=full-featured Web proxy cache +endef + +define Package/squid/description + Squid is a high-performance proxy caching server for web clients, + supporting FTP, gopher, and HTTP data objects. Unlike traditional + caching software, Squid handles all requests in a single, + non-blocking, I/O-driven process. +endef + +define Package/squid/conffiles +/etc/squid/mime.conf +/etc/squid/squid.conf +endef + +define Package/squid-mod-cachemgr + $(call Package/squid/Default) + DEPENDS:=squid + TITLE:=Web based proxy manager and reporting tool +endef + +define Package/squid-mod-basic-auth-getpwnam + $(call Package/squid/Default) + DEPENDS:=squid + TITLE:=getpwnam basic authentication helper +endef + +define Package/squid-mod-basic-auth-ncsa + $(call Package/squid/Default) + DEPENDS:=squid + TITLE:=NCSA basic authentication helper +endef + +define Package/squid-mod-basic-auth-smb + $(call Package/squid/Default) + DEPENDS:=squid + TITLE:=Samba basic authentication helper +endef + +define Package/squid-mod-digest-auth-password + $(call Package/squid/Default) + DEPENDS:=squid + TITLE:=Password digest authentication helper +endef + +define Package/squid-mod-external-acl-ip-user + $(call Package/squid/Default) + DEPENDS:=squid + TITLE:=IP user external ACL helper +endef + +define Package/squid-mod-external-acl-unix-group + $(call Package/squid/Default) + DEPENDS:=squid + TITLE:=Unix group external ACL helper +endef + +define Package/squid-mod-ntlm-auth-fakeauth + $(call Package/squid/Default) + DEPENDS:=squid + TITLE:=Fakeauth NTLM authentication helper +endef + +define Package/squid-mod-ntlm-auth-smb-auth + $(call Package/squid/Default) + DEPENDS:=squid + TITLE:=Samba NTLM authentication helper +endef + +CONFIGURE_ARGS += \ + --datadir=/usr/share/squid \ + --libexecdir=/usr/lib/squid \ + --sysconfdir=/etc/squid \ + --enable-shared \ + --enable-static \ + --enable-x-accelerator-vary \ + --with-pthreads \ + --with-dl \ + --enable-icmp \ + --enable-kill-parent-hack \ + --enable-arp-acl \ + --enable-ssl \ + --enable-htcp \ + --enable-err-languages=English \ + --enable-default-err-language=English \ + --enable-linux-netfilter \ + --enable-icmp \ + --enable-external-acl-helpers="" \ + --enable-underscores \ + --enable-cache-digests \ + --enable-referer-log \ + --enable-delay-pools \ + --enable-useragent-log \ + --with-openssl=$(STAGING_DIR)/usr \ + --enable-auth="basic digest ntlm" \ + --enable-basic-auth-helpers="getpwnam NCSA SMB" \ + --enable-ntlm-auth-helpers="fakeauth SMB" \ + --enable-digest-auth-helpers="password" \ + --enable-external-acl-helpers="ip_user unix_group" \ + --enable-storeio=null,ufs \ + --enable-epoll \ + --with-maxfd=4096 + +CONFIGURE_VARS += \ + ac_cv_header_linux_netfilter_ipv4_h=yes \ + ac_cv_epoll_works=yes \ + +define Build/Compile + # pass INCLUDES to compile host sources against our OpenSSL, not the host one + $(MAKE) -C $(PKG_BUILD_DIR)/lib \ + all + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install +endef + +define BuildPlugin + define Package/$(1)/install + $(INSTALL_DIR) $$(1)/usr/lib/squid + $(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/$(2) $$(1)/usr/lib/squid/ + endef + + $$(eval $$(call BuildPackage,$(1))) +endef + +define Package/squid/install + $(INSTALL_DIR) $(1)/etc/squid + $(CP) $(PKG_INSTALL_DIR)/etc/squid/mime.conf $(1)/etc/squid/ + $(CP) $(PKG_INSTALL_DIR)/etc/squid/squid.conf $(1)/etc/squid/ + $(INSTALL_DIR) $(1)/usr/share/squid + $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/* $(1)/usr/share/squid/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/squid $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/squid + $(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/{unlinkd,pinger,logfile-daemon} $(1)/usr/lib/squid/ +endef + +define Package/squid-mod-cachemgr/install + $(INSTALL_DIR) $(1)/www/cgi-bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/cachemgr.cgi $(1)/www/cgi-bin/ +endef + +$(eval $(call RequireHeader,/usr/include/openssl/ssl.h, \ + $(PKG_NAME) requires the openssl development (named like libssl-dev, \ + depending of your package manager) package be installed on the host-system. \ +)) + +$(eval $(call BuildPackage,squid)) +$(eval $(call BuildPackage,squid-mod-cachemgr)) +$(eval $(call BuildPlugin,squid-mod-basic-auth-getpwnam,getpwname_auth)) +$(eval $(call BuildPlugin,squid-mod-basic-auth-ncsa,ncsa_auth)) +$(eval $(call BuildPlugin,squid-mod-basic-auth-smb,smb_auth)) +$(eval $(call BuildPlugin,squid-mod-digest-auth-password,digest_pw_auth)) +$(eval $(call BuildPlugin,squid-mod-external-acl-ip-user,ip_user_check)) +$(eval $(call BuildPlugin,squid-mod-external-acl-unix-group,squid_unix_group)) +$(eval $(call BuildPlugin,squid-mod-ntlm-auth-fakeauth,fakeauth_auth)) +$(eval $(call BuildPlugin,squid-mod-ntlm-auth-smb-auth,ntlm_auth)) + diff --git a/net/squid/patches/001-cross_compile.patch b/net/squid/patches/001-cross_compile.patch new file mode 100644 index 0000000..f2648d9 --- /dev/null +++ b/net/squid/patches/001-cross_compile.patch @@ -0,0 +1,561 @@ +--- /dev/null ++++ b/src/ctype.c +@@ -0,0 +1,546 @@ ++/* ++ Static ctype data for IFC-7.1 / RedHat-9 workaround. ++ This is taken from the GLIBC source code. ++ Hack by Joe Krahn ++ ++ To use, compile with gcc (ifc should work as well): ++ ++ gcc -c ctype.c ++ ++ Next, include the resulting ctype.o when creating executables. ++ Do this automatically using a ~/.ifcrc file with a line like this: ++ ++ -Wl,/some/path/ctype.o ++ ++ That's all. ++ ++ My .ifcrc also turns off the typically excessive warnings: ++ -cm -w90 -w95 -Wl,/home/krahn/Prog/ctype/ctype.o ++ ++ To IFC maintainters: it would be nice to flag on/off specific ++ warning types, like -woff=22,33,44 ++ ++*/ ++ ++/* ++ file: ctype.c ++ ++ Derived from C-ctype.c and ctype-info.c in the GLIBC 2.3 source. ++ ++ To compile: (either gcc or icc is OK) ++ icc -c ctype.c ++ ++ To use, just add the object file ctype.o at link stage. Example: ++ ifc -o hello hello.f ctype.o ++ ++*/ ++ ++ ++/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by Ulrich Drepper , 1995. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C 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 ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++ ++/* This table's entries are taken from POSIX.2 Table 2-6 ++ ``LC_CTYPE Category Definition in the POSIX Locale''. ++ ++ The `_nl_C_LC_CTYPE_width' array is a GNU extension. ++ ++ In the `_nl_C_LC_CTYPE_class' array the value for EOF (== -1) ++ is set to always return 0 and the conversion arrays return EOF. */ ++ ++const char _nl_C_LC_CTYPE_class[768] = ++ /* 0x80 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0x86 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0x8c */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0x92 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0x98 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0x9e */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xa4 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xaa */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xb0 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xb6 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xbc */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xc2 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xc8 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xce */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xd4 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xda */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xe0 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xe6 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xec */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xf2 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xf8 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xfe */ "\000\000" "\000\000" "\002\000" "\002\000" "\002\000" "\002\000" ++ /* 0x04 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\003\040" ++ /* 0x0a */ "\002\040" "\002\040" "\002\040" "\002\040" "\002\000" "\002\000" ++ /* 0x10 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" ++ /* 0x16 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" ++ /* 0x1c */ "\002\000" "\002\000" "\002\000" "\002\000" "\001\140" "\004\300" ++ /* 0x22 */ "\004\300" "\004\300" "\004\300" "\004\300" "\004\300" "\004\300" ++ /* 0x28 */ "\004\300" "\004\300" "\004\300" "\004\300" "\004\300" "\004\300" ++ /* 0x2e */ "\004\300" "\004\300" "\010\330" "\010\330" "\010\330" "\010\330" ++ /* 0x34 */ "\010\330" "\010\330" "\010\330" "\010\330" "\010\330" "\010\330" ++ /* 0x3a */ "\004\300" "\004\300" "\004\300" "\004\300" "\004\300" "\004\300" ++ /* 0x40 */ "\004\300" "\010\325" "\010\325" "\010\325" "\010\325" "\010\325" ++ /* 0x46 */ "\010\325" "\010\305" "\010\305" "\010\305" "\010\305" "\010\305" ++ /* 0x4c */ "\010\305" "\010\305" "\010\305" "\010\305" "\010\305" "\010\305" ++ /* 0x52 */ "\010\305" "\010\305" "\010\305" "\010\305" "\010\305" "\010\305" ++ /* 0x58 */ "\010\305" "\010\305" "\010\305" "\004\300" "\004\300" "\004\300" ++ /* 0x5e */ "\004\300" "\004\300" "\004\300" "\010\326" "\010\326" "\010\326" ++ /* 0x64 */ "\010\326" "\010\326" "\010\326" "\010\306" "\010\306" "\010\306" ++ /* 0x6a */ "\010\306" "\010\306" "\010\306" "\010\306" "\010\306" "\010\306" ++ /* 0x70 */ "\010\306" "\010\306" "\010\306" "\010\306" "\010\306" "\010\306" ++ /* 0x76 */ "\010\306" "\010\306" "\010\306" "\010\306" "\010\306" "\004\300" ++ /* 0x7c */ "\004\300" "\004\300" "\004\300" "\002\000" "\000\000" "\000\000" ++ /* 0x82 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0x88 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0x8e */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0x94 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0x9a */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xa0 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xa6 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xac */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xb2 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xb8 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xbe */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xc4 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xca */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xd0 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xd6 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xdc */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xe2 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xe8 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xee */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xf4 */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++ /* 0xfa */ "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" "\000\000" ++; ++const char _nl_C_LC_CTYPE_class32[1024] = ++ /* 0x00 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000" ++ /* 0x03 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000" ++ /* 0x06 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000" ++ /* 0x09 */ "\000\000\003\040" "\000\000\002\040" "\000\000\002\040" ++ /* 0x0c */ "\000\000\002\040" "\000\000\002\040" "\000\000\002\000" ++ /* 0x0f */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000" ++ /* 0x12 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000" ++ /* 0x15 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000" ++ /* 0x18 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000" ++ /* 0x1b */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000" ++ /* 0x1e */ "\000\000\002\000" "\000\000\002\000" "\000\000\001\140" ++ /* 0x21 */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300" ++ /* 0x24 */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300" ++ /* 0x27 */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300" ++ /* 0x2a */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300" ++ /* 0x2d */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300" ++ /* 0x30 */ "\000\000\010\330" "\000\000\010\330" "\000\000\010\330" ++ /* 0x33 */ "\000\000\010\330" "\000\000\010\330" "\000\000\010\330" ++ /* 0x36 */ "\000\000\010\330" "\000\000\010\330" "\000\000\010\330" ++ /* 0x39 */ "\000\000\010\330" "\000\000\004\300" "\000\000\004\300" ++ /* 0x3c */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300" ++ /* 0x3f */ "\000\000\004\300" "\000\000\004\300" "\000\000\010\325" ++ /* 0x42 */ "\000\000\010\325" "\000\000\010\325" "\000\000\010\325" ++ /* 0x45 */ "\000\000\010\325" "\000\000\010\325" "\000\000\010\305" ++ /* 0x48 */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305" ++ /* 0x4b */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305" ++ /* 0x4e */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305" ++ /* 0x51 */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305" ++ /* 0x54 */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305" ++ /* 0x57 */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305" ++ /* 0x5a */ "\000\000\010\305" "\000\000\004\300" "\000\000\004\300" ++ /* 0x5d */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300" ++ /* 0x60 */ "\000\000\004\300" "\000\000\010\326" "\000\000\010\326" ++ /* 0x63 */ "\000\000\010\326" "\000\000\010\326" "\000\000\010\326" ++ /* 0x66 */ "\000\000\010\326" "\000\000\010\306" "\000\000\010\306" ++ /* 0x69 */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306" ++ /* 0x6c */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306" ++ /* 0x6f */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306" ++ /* 0x72 */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306" ++ /* 0x75 */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306" ++ /* 0x78 */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306" ++ /* 0x7b */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300" ++ /* 0x7e */ "\000\000\004\300" "\000\000\002\000" "\000\000\000\000" ++ /* 0x81 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0x84 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0x87 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0x8a */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0x8d */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0x90 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0x93 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0x96 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0x99 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0x9c */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0x9f */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xa2 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xa5 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xa8 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xab */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xae */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xb1 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xb4 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xb7 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xba */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xbd */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xc0 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xc3 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xc6 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xc9 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xcc */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xcf */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xd2 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xd5 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xd8 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xdb */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xde */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xe1 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xe4 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xe7 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xea */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xed */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xf0 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xf3 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xf6 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xf9 */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xfc */ "\000\000\000\000" "\000\000\000\000" "\000\000\000\000" ++ /* 0xff */ "\000\000\000\000" ++; ++const uint32_t _nl_C_LC_CTYPE_toupper[384] = ++{ ++ /* 0x80 */ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, ++ /* 0x88 */ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, ++ /* 0x90 */ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, ++ /* 0x98 */ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, ++ /* 0xa0 */ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, ++ /* 0xa8 */ 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, ++ /* 0xb0 */ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, ++ /* 0xb8 */ 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, ++ /* 0xc0 */ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, ++ /* 0xc8 */ 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, ++ /* 0xd0 */ 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, ++ /* 0xd8 */ 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, ++ /* 0xe0 */ 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, ++ /* 0xe8 */ 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, ++ /* 0xf0 */ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, ++ /* 0xf8 */ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xffffffff, ++ /* 0x00 */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, ++ /* 0x08 */ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, ++ /* 0x10 */ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, ++ /* 0x18 */ 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, ++ /* 0x20 */ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, ++ /* 0x28 */ 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, ++ /* 0x30 */ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, ++ /* 0x38 */ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, ++ /* 0x40 */ 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, ++ /* 0x48 */ 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, ++ /* 0x50 */ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, ++ /* 0x58 */ 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, ++ /* 0x60 */ 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, ++ /* 0x68 */ 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, ++ /* 0x70 */ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, ++ /* 0x78 */ 0x58, 0x59, 0x5a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, ++ /* 0x80 */ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, ++ /* 0x88 */ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, ++ /* 0x90 */ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, ++ /* 0x98 */ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, ++ /* 0xa0 */ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, ++ /* 0xa8 */ 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, ++ /* 0xb0 */ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, ++ /* 0xb8 */ 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, ++ /* 0xc0 */ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, ++ /* 0xc8 */ 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, ++ /* 0xd0 */ 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, ++ /* 0xd8 */ 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, ++ /* 0xe0 */ 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, ++ /* 0xe8 */ 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, ++ /* 0xf0 */ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, ++ /* 0xf8 */ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff ++}; ++const uint32_t _nl_C_LC_CTYPE_tolower[384] = ++{ ++ /* 0x80 */ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, ++ /* 0x88 */ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, ++ /* 0x90 */ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, ++ /* 0x98 */ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, ++ /* 0xa0 */ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, ++ /* 0xa8 */ 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, ++ /* 0xb0 */ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, ++ /* 0xb8 */ 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, ++ /* 0xc0 */ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, ++ /* 0xc8 */ 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, ++ /* 0xd0 */ 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, ++ /* 0xd8 */ 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, ++ /* 0xe0 */ 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, ++ /* 0xe8 */ 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, ++ /* 0xf0 */ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, ++ /* 0xf8 */ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xffffffff, ++ /* 0x00 */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, ++ /* 0x08 */ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, ++ /* 0x10 */ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, ++ /* 0x18 */ 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, ++ /* 0x20 */ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, ++ /* 0x28 */ 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, ++ /* 0x30 */ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, ++ /* 0x38 */ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, ++ /* 0x40 */ 0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, ++ /* 0x48 */ 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, ++ /* 0x50 */ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, ++ /* 0x58 */ 0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, ++ /* 0x60 */ 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, ++ /* 0x68 */ 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, ++ /* 0x70 */ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, ++ /* 0x78 */ 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, ++ /* 0x80 */ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, ++ /* 0x88 */ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, ++ /* 0x90 */ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, ++ /* 0x98 */ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, ++ /* 0xa0 */ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, ++ /* 0xa8 */ 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, ++ /* 0xb0 */ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, ++ /* 0xb8 */ 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, ++ /* 0xc0 */ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, ++ /* 0xc8 */ 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, ++ /* 0xd0 */ 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, ++ /* 0xd8 */ 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, ++ /* 0xe0 */ 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, ++ /* 0xe8 */ 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, ++ /* 0xf0 */ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, ++ /* 0xf8 */ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff ++}; ++ ++#define STRUCT_CTYPE_CLASS(p, q) \ ++ struct \ ++ { \ ++ uint32_t isctype_data[8]; \ ++ uint32_t header[5]; \ ++ uint32_t level1[1]; \ ++ uint32_t level2[1 << q]; \ ++ uint32_t level3[1 << p]; \ ++ } ++ ++const STRUCT_CTYPE_CLASS(1, 1) _nl_C_LC_CTYPE_class_upper = ++{ ++ { 0x00000000, 0x00000000, 0x07fffffe, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ }, ++ { 7, 1, 6, 1, 1 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 0, 8 * sizeof (uint32_t) }, ++ /* 3rd-level table */ ++ { 0x07fffffe, 0x00000000 } ++}; ++const STRUCT_CTYPE_CLASS(1, 1) _nl_C_LC_CTYPE_class_lower = ++{ ++ { 0x00000000, 0x00000000, 0x00000000, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ }, ++ { 7, 1, 6, 1, 1 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 0, 8 * sizeof (uint32_t) }, ++ /* 3rd-level table */ ++ { 0x00000000, 0x07fffffe } ++}; ++const STRUCT_CTYPE_CLASS(1, 1) _nl_C_LC_CTYPE_class_alpha = ++{ ++ { 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ }, ++ { 7, 1, 6, 1, 1 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 0, 8 * sizeof (uint32_t) }, ++ /* 3rd-level table */ ++ { 0x07fffffe, 0x07fffffe } ++}; ++const STRUCT_CTYPE_CLASS(1, 0) _nl_C_LC_CTYPE_class_digit = ++{ ++ { 0x00000000, 0x03ff0000, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ }, ++ { 6, 1, 6, 0, 1 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 7 * sizeof (uint32_t) }, ++ /* 3rd-level table */ ++ { 0x00000000, 0x03ff0000 } ++}; ++const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_xdigit = ++{ ++ { 0x00000000, 0x03ff0000, 0x0000007e, 0x0000007e, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ }, ++ { 7, 1, 7, 0, 3 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 7 * sizeof (uint32_t) }, ++ /* 3rd-level table */ ++ { 0x00000000, 0x03ff0000, 0x0000007e, 0x0000007e } ++}; ++const STRUCT_CTYPE_CLASS(1, 0) _nl_C_LC_CTYPE_class_space = ++{ ++ { 0x00003e00, 0x00000001, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ }, ++ { 6, 1, 6, 0, 1 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 7 * sizeof (uint32_t) }, ++ /* 3rd-level table */ ++ { 0x00003e00, 0x00000001 } ++}; ++const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_print = ++{ ++ { 0x00000000, 0xffffffff, 0xffffffff, 0x7fffffff, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ }, ++ { 7, 1, 7, 0, 3 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 7 * sizeof (uint32_t) }, ++ /* 3rd-level table */ ++ { 0x00000000, 0xffffffff, 0xffffffff, 0x7fffffff } ++}; ++const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_graph = ++{ ++ { 0x00000000, 0xfffffffe, 0xffffffff, 0x7fffffff, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ }, ++ { 7, 1, 7, 0, 3 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 7 * sizeof (uint32_t) }, ++ /* 3rd-level table */ ++ { 0x00000000, 0xfffffffe, 0xffffffff, 0x7fffffff } ++}; ++const STRUCT_CTYPE_CLASS(1, 0) _nl_C_LC_CTYPE_class_blank = ++{ ++ { 0x00000200, 0x00000001, 0x00000000, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ }, ++ { 6, 1, 6, 0, 1 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 7 * sizeof (uint32_t) }, ++ /* 3rd-level table */ ++ { 0x00000200, 0x00000001 } ++}; ++const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_cntrl = ++{ ++ { 0xffffffff, 0x00000000, 0x00000000, 0x80000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ }, ++ { 7, 1, 7, 0, 3 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 7 * sizeof (uint32_t) }, ++ /* 3rd-level table */ ++ { 0xffffffff, 0x00000000, 0x00000000, 0x80000000 } ++}; ++const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_punct = ++{ ++ { 0x00000000, 0xfc00fffe, 0xf8000001, 0x78000001, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ }, ++ { 7, 1, 7, 0, 3 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 7 * sizeof (uint32_t) }, ++ /* 3rd-level table */ ++ { 0x00000000, 0xfc00fffe, 0xf8000001, 0x78000001 } ++}; ++const STRUCT_CTYPE_CLASS(2, 0) _nl_C_LC_CTYPE_class_alnum = ++{ ++ { 0x00000000, 0x03ff0000, 0x07fffffe, 0x07fffffe, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ }, ++ { 7, 1, 7, 0, 3 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 7 * sizeof (uint32_t) }, ++ /* 3rd-level table */ ++ { 0x00000000, 0x03ff0000, 0x07fffffe, 0x07fffffe } ++}; ++ ++const struct ++{ ++ uint32_t header[5]; ++ uint32_t level1[1]; ++ uint32_t level2[4]; ++ int32_t level3[32]; ++} ++_nl_C_LC_CTYPE_map_toupper = ++{ ++ { 7, 1, 5, 3, 31 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 0, 0, 0, 10 * sizeof (uint32_t) }, ++ /* 3rd-level table */ ++ { ++ 0x00000000, 0xffffffe0, 0xffffffe0, 0xffffffe0, ++ 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, ++ 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, ++ 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, ++ 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, ++ 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, ++ 0xffffffe0, 0xffffffe0, 0xffffffe0, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ } ++}, ++_nl_C_LC_CTYPE_map_tolower = ++{ ++ { 7, 1, 5, 3, 31 }, ++ /* 1st-level table */ ++ { 6 * sizeof (uint32_t) }, ++ /* 2nd-level table */ ++ { 0, 0, 10 * sizeof (uint32_t), 0 }, ++ /* 3rd-level table */ ++ { ++ 0x00000000, 0x00000020, 0x00000020, 0x00000020, ++ 0x00000020, 0x00000020, 0x00000020, 0x00000020, ++ 0x00000020, 0x00000020, 0x00000020, 0x00000020, ++ 0x00000020, 0x00000020, 0x00000020, 0x00000020, ++ 0x00000020, 0x00000020, 0x00000020, 0x00000020, ++ 0x00000020, 0x00000020, 0x00000020, 0x00000020, ++ 0x00000020, 0x00000020, 0x00000020, 0x00000000, ++ 0x00000000, 0x00000000, 0x00000000, 0x00000000 ++ } ++}; ++ ++#define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o) ++ ++const uint16_t *__ctype_b = b (uint16_t, class, 128); ++const uint32_t *__ctype32_b = b (uint32_t, class32, 0); ++const int32_t *__ctype_tolower = b (int32_t, tolower, 128); ++const int32_t *__ctype_toupper = b (int32_t, toupper, 128); ++const uint32_t *__ctype32_tolower = b (uint32_t, tolower, 128); ++const uint32_t *__ctype32_toupper = b (uint32_t, toupper, 128); ++ +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -1234,6 +1234,9 @@ squid.conf.default: cf_parser.h + true + + cf_parser.h: cf.data cf_gen$(EXEEXT) ++ rm -f cf_gen ++ gcc -c ctype.c ++ gcc -o cf_gen cf_gen.c -DNODEBUG=1 -I./ -I../ -I../include/ -L../lib -lmiscutil$(shell uname -m) -lm -lnsl -Wl,ctype.o + ./cf_gen cf.data $(srcdir)/cf.data.depend + + cf_gen_defines.h: $(srcdir)/cf_gen_defines $(srcdir)/cf.data.pre diff --git a/net/squid/patches/002-no_sslv2.patch b/net/squid/patches/002-no_sslv2.patch new file mode 100644 index 0000000..c5c0f0e --- /dev/null +++ b/net/squid/patches/002-no_sslv2.patch @@ -0,0 +1,15 @@ +--- a/src/ssl_support.c ++++ b/src/ssl_support.c +@@ -446,10 +446,12 @@ sslCreateServerContext(const char *certf + ERR_clear_error(); + debug(83, 1) ("Initialising SSL.\n"); + switch (version) { ++#ifndef OPENSSL_NO_SSL2 + case 2: + debug(83, 5) ("Using SSLv2.\n"); + method = SSLv2_server_method(); + break; ++#endif + case 3: + debug(83, 5) ("Using SSLv3.\n"); + method = SSLv3_server_method(); diff --git a/net/squid/patches/003-configure.patch b/net/squid/patches/003-configure.patch new file mode 100644 index 0000000..c58b29e --- /dev/null +++ b/net/squid/patches/003-configure.patch @@ -0,0 +1,50 @@ +--- a/configure ++++ b/configure +@@ -5059,10 +5059,6 @@ _ACEOF + if test -z "$SSLLIB"; then + SSLLIB="-lcrypto" # for MD5 routines + fi +- if $PKGCONFIG --exists openssl; then +- SSLLIB="`$PKGCONFIG --libs openssl`" +- SSLFLAGS="`$PKGCONFIG --cflags openssl`" +- fi + CPPFLAGS="${SSLFLAGS} $CPPFLAGS" + fi + +@@ -27318,7 +27314,7 @@ else + See \`config.log' for more details." >&5 + $as_echo "$as_me: error: cannot run test program while cross compiling + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ { (true); true; }; } + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -27481,8 +27477,7 @@ else + { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 + $as_echo "$as_me: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++See \`config.log' for more details." >&2;} } + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -27733,7 +27728,7 @@ else + See \`config.log' for more details." >&5 + $as_echo "$as_me: error: cannot run test program while cross compiling + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ { (true); true; }; } + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -27815,7 +27810,7 @@ else + See \`config.log' for more details." >&5 + $as_echo "$as_me: error: cannot run test program while cross compiling + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ { (true); true; }; } + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ diff --git a/net/squid/patches/004-include-autoconf.patch b/net/squid/patches/004-include-autoconf.patch new file mode 100644 index 0000000..9ed4360 --- /dev/null +++ b/net/squid/patches/004-include-autoconf.patch @@ -0,0 +1,15 @@ +--- a/include/autoconf.h.in ++++ b/include/autoconf.h.in +@@ -313,10 +313,10 @@ + #undef HAVE_OPENSSL_ERR_H + + /* Define to 1 if you have the header file. */ +-#undef HAVE_OPENSSL_MD5_H ++#define HAVE_OPENSSL_MD5_H 1 + + /* Define to 1 if you have the header file. */ +-#undef HAVE_OPENSSL_SSL_H ++#define HAVE_OPENSSL_SSL_H 1 + + /* Define to 1 if you have the header file. */ + #undef HAVE_PATHS_H diff --git a/net/squid/patches/005-lib-makefile.patch b/net/squid/patches/005-lib-makefile.patch new file mode 100644 index 0000000..06b7955 --- /dev/null +++ b/net/squid/patches/005-lib-makefile.patch @@ -0,0 +1,179 @@ +--- a/lib/Makefile.in ++++ b/lib/Makefile.in +@@ -60,8 +60,10 @@ am__libmiscutil_a_SOURCES_DIST = Array.c + rfc1123.c rfc1738.c rfc2617.c safe_inet_addr.c snprintf.c \ + splay.c Stack.c strsep.c stub_memaccount.c util.c uudecode.c \ + win32lib.c ++@NEED_OWN_MD5_TRUE@am__host_objects_1 = md5.$(HOST_OBJEXT) + @NEED_OWN_SNPRINTF_TRUE@am__objects_1 = snprintf.$(OBJEXT) + @NEED_OWN_STRSEP_TRUE@am__objects_2 = strsep.$(OBJEXT) ++@NEED_OWN_SNPRINTF_TRUE@am__host_objects_2 = snprintf.$(HOST_OBJEXT) + @ENABLE_MINGW32SPECIFIC_TRUE@am__objects_3 = win32lib.$(OBJEXT) + am_libmiscutil_a_OBJECTS = Array.$(OBJEXT) base64.$(OBJEXT) \ + getfullhostname.$(OBJEXT) hash.$(OBJEXT) heap.$(OBJEXT) \ +@@ -71,7 +73,19 @@ am_libmiscutil_a_OBJECTS = Array.$(OBJEX + $(am__objects_1) splay.$(OBJEXT) Stack.$(OBJEXT) \ + $(am__objects_2) stub_memaccount.$(OBJEXT) util.$(OBJEXT) \ + uudecode.$(OBJEXT) $(am__objects_3) ++am_libmiscutil_a_HOST_OBJECTS = Array.$(HOST_OBJEXT) \ ++ base64.$(HOST_OBJEXT) getfullhostname.$(HOST_OBJEXT) \ ++ hash.$(HOST_OBJEXT) heap.$(HOST_OBJEXT) \ ++ html_quote.$(HOST_OBJEXT) iso3307.$(HOST_OBJEXT) \ ++ $(am__host_objects_1) radix.$(HOST_OBJEXT) \ ++ rfc1035.$(HOST_OBJEXT) rfc1123.$(HOST_OBJEXT) \ ++ rfc1738.$(HOST_OBJEXT) rfc2617.$(HOST_OBJEXT) \ ++ safe_inet_addr.$(HOST_OBJEXT) $(am__host_objects_2) \ ++ splay.$(HOST_OBJEXT) Stack.$(HOST_OBJEXT) \ ++ stub_memaccount.$(HOST_OBJEXT) util.$(HOST_OBJEXT) \ ++ uudecode.$(HOST_OBJEXT) + libmiscutil_a_OBJECTS = $(am_libmiscutil_a_OBJECTS) ++libmiscutil_a_HOST_OBJECTS = $(am_libmiscutil_a_HOST_OBJECTS) + libntlmauth_a_AR = $(AR) $(ARFLAGS) + libntlmauth_a_DEPENDENCIES = @LIBOBJS@ + am_libntlmauth_a_OBJECTS = ntlmauth.$(OBJEXT) +@@ -89,15 +103,19 @@ depcomp = $(SHELL) $(top_srcdir)/cfgaux/ + am__depfiles_maybe = depfiles + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ++HOST_COMPILE = $(HOST_CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ++ $(AM_CFLAGS) + CCLD = $(CC) ++HOST_CCLD = ld + LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +-SOURCES = $(libdlmalloc_a_SOURCES) $(libmiscutil_a_SOURCES) \ ++HOST_LINK = $(HOST_CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++SOURCES = $(libdlmalloc_a_SOURCES) $(libmiscutil_a_SOURCES) $(libmiscutil_a_HOST_SOURCES) \ + $(EXTRA_libmiscutil_a_SOURCES) $(libntlmauth_a_SOURCES) \ + $(libregex_a_SOURCES) $(libsspwin32_a_SOURCES) + DIST_SOURCES = $(libdlmalloc_a_SOURCES) \ + $(am__libmiscutil_a_SOURCES_DIST) \ + $(EXTRA_libmiscutil_a_SOURCES) $(libntlmauth_a_SOURCES) \ +- $(libregex_a_SOURCES) $(libsspwin32_a_SOURCES) ++ $(libregex_a_SOURCES) $(libsspwin32_a_SOURCES) $(libmiscutil_a_HOST_SOURCES) + ETAGS = etags + CTAGS = ctags + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +@@ -105,6 +123,7 @@ ACLOCAL = @ACLOCAL@ + ALLOCA = @ALLOCA@ + AMTAR = @AMTAR@ + AR = @AR@ ++HOST_AR = ar + AR_R = @AR_R@ + AUTH_LIBS = @AUTH_LIBS@ + AUTH_MODULES = @AUTH_MODULES@ +@@ -117,6 +136,7 @@ BASIC_AUTH_HELPERS = @BASIC_AUTH_HELPERS + CACHE_HTTP_PORT = @CACHE_HTTP_PORT@ + CACHE_ICP_PORT = @CACHE_ICP_PORT@ + CC = @CC@ ++HOST_CC = gcc + CCDEPMODE = @CCDEPMODE@ + CFLAGS = @CFLAGS@ + CGIEXT = @CGIEXT@ +@@ -164,6 +184,8 @@ NEGOTIATE_AUTH_HELPERS = @NEGOTIATE_AUTH + NIS_LIBS = @NIS_LIBS@ + NTLM_AUTH_HELPERS = @NTLM_AUTH_HELPERS@ + OBJEXT = @OBJEXT@ ++HOST_OBJEXT = @OBJEXT@.$(shell uname -m) ++HOST_DEPEXT = .$(shell uname -m) + OPT_DEFAULT_HOSTS = @OPT_DEFAULT_HOSTS@ + PACKAGE = @PACKAGE@ + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +@@ -261,6 +283,7 @@ EXTRA_LIBRARIES = \ + noinst_LIBRARIES = \ + @LIBDLMALLOC@ \ + libmiscutil.a \ ++ libmiscutil$(shell uname -m).a \ + libntlmauth.a \ + @LIBREGEX@ \ + $(LIBSSPWIN32) +@@ -300,9 +323,34 @@ libmiscutil_a_SOURCES = \ + uudecode.c \ + $(WIN32SRC) + ++libmiscutil_a_HOST_SOURCES = \ ++ Array.c \ ++ base64.c \ ++ getfullhostname.c \ ++ hash.c \ ++ heap.c \ ++ html_quote.c \ ++ iso3307.c \ ++ $(MD5SOURCE) \ ++ radix.c \ ++ rfc1035.c \ ++ rfc1123.c \ ++ rfc1738.c \ ++ rfc2617.c \ ++ safe_inet_addr.c \ ++ $(SNPRINTFSOURCE) \ ++ splay.c \ ++ Stack.c \ ++ stub_memaccount.c \ ++ util.c \ ++ uudecode.c ++ + libmiscutil_a_LIBADD = \ + @LIBOBJS@ + ++libmiscutil_a_HOST_LIBADD = \ ++ @LIBOBJS@ ++ + # $(top_srcdir)/include/version.h should be a dependency + libregex_a_SOURCES = \ + GNUregex.c +@@ -323,7 +371,7 @@ INCLUDES = -I$(top_builddir)/include -I$ + all: all-am + + .SUFFIXES: +-.SUFFIXES: .c .o .obj ++.SUFFIXES: .c .o .obj .o.$(shell uname -m) + $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ +@@ -360,10 +408,13 @@ libdlmalloc.a: $(libdlmalloc_a_OBJECTS) + -rm -f libdlmalloc.a + $(libdlmalloc_a_AR) libdlmalloc.a $(libdlmalloc_a_OBJECTS) $(libdlmalloc_a_LIBADD) + $(RANLIB) libdlmalloc.a +-libmiscutil.a: $(libmiscutil_a_OBJECTS) $(libmiscutil_a_DEPENDENCIES) ++libmiscutil.a: $(libmiscutil_a_OBJECTS) $(libmiscutil_a_HOST_OBJECTS) $(libmiscutil_a_DEPENDENCIES) + -rm -f libmiscutil.a ++ -rm -f libmiscutil$(shell uname -m).a + $(libmiscutil_a_AR) libmiscutil.a $(libmiscutil_a_OBJECTS) $(libmiscutil_a_LIBADD) ++ ar rcu libmiscutil$(shell uname -m).a $(libmiscutil_a_HOST_OBJECTS) $(libmiscutil_a_HOST_LIBADD) + $(RANLIB) libmiscutil.a ++ ranlib libmiscutil$(shell uname -m).a + libntlmauth.a: $(libntlmauth_a_OBJECTS) $(libntlmauth_a_DEPENDENCIES) + -rm -f libntlmauth.a + $(libntlmauth_a_AR) libntlmauth.a $(libntlmauth_a_OBJECTS) $(libntlmauth_a_LIBADD) +@@ -417,6 +468,21 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uudecode.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32lib.Po@am__quote@ ++@AMDEP_TRUE@DEP_HOST_FILES = $(DEPDIR)/Array.Po.$(HOST_DEPEXT) $(DEPDIR)/GNUregex.Po.$(HOST_DEPEXT) \ ++@AMDEP_TRUE@ $(DEPDIR)/Stack.Po.$(HOST_DEPEXT) $(DEPDIR)/base64.Po.$(HOST_DEPEXT) \ ++@AMDEP_TRUE@ $(DEPDIR)/dlmalloc.Po.$(HOST_DEPEXT) $(DEPDIR)/drand48.Po.$(HOST_DEPEXT) \ ++@AMDEP_TRUE@ $(DEPDIR)/getfullhostname.Po.$(HOST_DEPEXT) $(DEPDIR)/hash.Po.$(HOST_DEPEXT) \ ++@AMDEP_TRUE@ $(DEPDIR)/heap.Po.$(HOST_DEPEXT) $(DEPDIR)/html_quote.Po.$(HOST_DEPEXT) \ ++@AMDEP_TRUE@ $(DEPDIR)/inet_ntoa.Po.$(HOST_DEPEXT) $(DEPDIR)/initgroups.Po.$(HOST_DEPEXT) \ ++@AMDEP_TRUE@ $(DEPDIR)/iso3307.Po.$(HOST_DEPEXT) $(DEPDIR)/md5.Po.$(HOST_DEPEXT) \ ++@AMDEP_TRUE@ $(DEPDIR)/ntlmauth.Po.$(HOST_DEPEXT) $(DEPDIR)/radix.Po.$(HOST_DEPEXT) \ ++@AMDEP_TRUE@ $(DEPDIR)/rfc1035.Po.$(HOST_DEPEXT) $(DEPDIR)/rfc1123.Po.$(HOST_DEPEXT) \ ++@AMDEP_TRUE@ $(DEPDIR)/rfc1738.Po.$(HOST_DEPEXT) $(DEPDIR)/rfc2617.Po.$(HOST_DEPEXT) \ ++@AMDEP_TRUE@ $(DEPDIR)/safe_inet_addr.Po.$(HOST_DEPEXT) $(DEPDIR)/snprintf.Po.$(HOST_DEPEXT) \ ++@AMDEP_TRUE@ $(DEPDIR)/splay.Po.$(HOST_DEPEXT) $(DEPDIR)/strerror.Po.$(HOST_DEPEXT) \ ++@AMDEP_TRUE@ $(DEPDIR)/stub_memaccount.Po.$(HOST_DEPEXT) $(DEPDIR)/tempnam.Po.$(HOST_DEPEXT) \ ++@AMDEP_TRUE@ $(DEPDIR)/util.Po.$(HOST_DEPEXT) $(DEPDIR)/uudecode.Po.$(HOST_DEPEXT) ++ + + .c.o: + @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@@ -425,6 +491,9 @@ distclean-compile: + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(COMPILE) -c $< + ++.c.o.$(shell uname -m): ++ $(HOST_COMPILE) -o $(shell basename $< .c).o.$(shell uname -m) -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 diff --git a/net/srelay/Makefile b/net/srelay/Makefile new file mode 100644 index 0000000..7a8cb42 --- /dev/null +++ b/net/srelay/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=srelay +PKG_VERSION:=0.4.8b3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/socks-relay +PKG_MD5SUM:=a6d9521594172710ffa308d6b5dbece4 + +include $(INCLUDE_DIR)/package.mk + +define Package/srelay + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libwrap + SUBMENU:=Web Servers/Proxies + TITLE:=A socks 4/5 proxy server + URL:=http://www.c-wind.com/srelay/ +endef + +define Package/srelay/conffiles +/etc/srelay.conf +endef + +CONFIGURE_ARGS += \ + --disable-thread \ + --with-libwrap="$(STAGING_DIR)/usr" \ + +CONFIGURE_VARS += \ + CPPFLAGS="-DLINUX $$$$CPPFLAGS" \ + +define Package/srelay/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) files/$(PKG_NAME).conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,srelay)) diff --git a/net/srelay/files/srelay.conf b/net/srelay/files/srelay.conf new file mode 100644 index 0000000..e5d53ec --- /dev/null +++ b/net/srelay/files/srelay.conf @@ -0,0 +1,2 @@ +# allow local subnet to access socks proxy +192.168.1.0/24 any - diff --git a/net/srelay/files/srelay.init b/net/srelay/files/srelay.init new file mode 100644 index 0000000..6d23438 --- /dev/null +++ b/net/srelay/files/srelay.init @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start() { + if [ -f /etc/srelay.conf ];then + srelay -c /etc/srelay.conf -r -s + fi +} + +stop() { + killall srelay +} diff --git a/net/sscep/Makefile b/net/sscep/Makefile new file mode 100644 index 0000000..8dd037e --- /dev/null +++ b/net/sscep/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sscep +PKG_VERSION:=20040325+ng2 +PKG_RELEASE:=1 + +PKG_SOURCE:=${PKG_NAME}.tgz +PKG_SOURCE_URL:=http://www.klake.org/~jt/sscep/ +PKG_MD5SUM:=b509cdf0de952841471e77499aa6e4ca + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/sscep + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libopenssl + TITLE:=A Simple SCEP (Simple Certificate Enrollment Protocol) client + URL:=http://www.klake.org/~jt/sscep/ +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef + +define Package/sscep/conffiles +/etc/sscep.conf +endef + +define Package/sscep/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/sscep.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sscep $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,sscep)) diff --git a/net/sscep/patches/001-certnanny.patch b/net/sscep/patches/001-certnanny.patch new file mode 100644 index 0000000..6a37352 --- /dev/null +++ b/net/sscep/patches/001-certnanny.patch @@ -0,0 +1,3009 @@ +This patch adds support for signing requests with an existing key. +It was taken from CertNanny + +diff -uN sscep/Makefile sscep-ng2/Makefile +--- sscep/Makefile 2003-01-22 06:23:18.000000000 +0100 ++++ sscep-ng2/Makefile 2006-04-25 19:38:49.000000000 +0200 +@@ -7,13 +7,14 @@ + + CC = gcc + CFLAGS = -Wall -O ++LDLIBS = -lcrypto + + MAN = sscep.8 + PROG = sscep + OBJS = sscep.o init.o net.o sceputils.o pkcs7.o ias.o fileutils.o + + $(PROG): $(OBJS) +- $(CC) $(CFLAGS) -lcrypto -o $(PROG) $(OBJS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(PROG) $(OBJS) $(LDLIBS) + + clean: + rm -f $(PROG) $(OBJS) $(MAN) core +diff -uN sscep/README sscep-ng2/README +--- sscep/README 2003-04-17 07:49:46.000000000 +0200 ++++ sscep-ng2/README 2006-04-28 10:27:44.000000000 +0200 +@@ -51,11 +51,13 @@ + o iPlanet CMS (getca and enroll works)* + o VeriSign Onsite (getca and enroll works)** + o Entrust VPN Connect (getca and enroll works)*** ++o OpenCA (getca, enroll, getcrl and automatic approval works)**** + + (*) by default, subjectAltName extensions are dropped from certificate + (**) only DNS subjectAltName allowed (demo mode) + (***) demo requires to use /C=US/O=Entrust +- ++(****) automatic approval according to newer SCEP drafts requires ++ OpenCA 0.9.2.4 or higher + + HOW TO COMPILE + ============== +@@ -76,7 +78,7 @@ + + $ ./sscep + +-sscep version 20030131 ++sscep version 2005XXXX + + Usage: ./sscep OPERATION [OPTIONS] + +@@ -103,6 +105,8 @@ + OPTIONS for OPERATION enroll are + -k Private key file + -r Certificate request file ++ -K Signature private key file ++ -O Signature certificate (used instead of self-signed) + -l Write enrolled certificate in file + -e Use different CA cert for encryption + -L Write selfsigned certificate in file +@@ -152,6 +156,16 @@ + CAIdentifier Some CAs require you to define this. Example: mydomain.com + Command line option: -i + ++CheckSubjectName ++ Check subject DN in the certificate return by the CA. The ++ default is to match on the public key only. Up to version ++ 20040325 sscep checked on the subject DN only, which is a ++ problem e.g. if the CA adds a SER attribute, enforces a ++ naming policy or fixes encoding errors (e.g. with Java keytool ++ and DC). ++ Example: yes ++ Command line option: -C ++ + CertReqFile Certificate request file created with mkrequest. + Example: ./local.csr + Command line option: -r +@@ -171,6 +185,21 @@ + the signature. Example: ./enc.crt + Command line option: -e + ++SignCertFile Instead of creating a self-signed certificate from the ++ new key pair use an already existing certficate/key to ++ sign the SCEP request. If the "old" certificate and ++ key is used, the CA can verify that the holder of the ++ private key for an existing certificate re-enrolls for ++ a renewal certificate, allowing for automatic approval ++ of the request. Requires specification of the corresponding ++ signature private key file (-K, SignKeyFile). ++ Example: ./sig.crt ++ Command line option: -O ++ ++SignKeyFile See SignCertFile. Specifies the corresponding private key. ++ Example: ./sig.key ++ Command line option: -K ++ + FingerPrint Display fingerprint algorithm. Available algorithms are md5 + and sha1. Default is md5. + Command line option: -F +@@ -367,6 +396,23 @@ + the challenge password), it returns SUCCESS as a first reply. Otherwise, the + enrollment requires manual signing and authentication (perhaps a phone call). + ++Newer SCEP draft versions allow to use the existing certificate (issued ++by the CA) to authenticate a renewal request. In this context, the SCEP ++request with the new public key is signed with the old certificate and ++key (instead of using a self-signed certificate created from the new ++key pair). ++To use this feature, use the command line options -O and -K to specify ++the old certificate and private key (SignCertFile and SignCertKey ++in the configuration file). ++The actual behaviour of the SCEP server depends on the CA policy and ++on the capabilities of the SCEP server (not all servers implement ++this feature, using the existing certificate with an older SCEP server ++may or may not work, depending on implementation). ++ ++Note: Newer versions of OpenCA (http://www.openca.info/) support ++an SCEP server that is capable of automatically approving SCEP requests ++signed with the already existing key pair. ++ + + STEP 5 - Use certificate + ======================== +diff -uN sscep/cmd.h sscep-ng2/cmd.h +--- sscep/cmd.h 2003-01-30 08:57:34.000000000 +0100 ++++ sscep-ng2/cmd.h 2006-04-28 10:01:10.000000000 +0200 +@@ -16,6 +16,9 @@ + int c_flag; + char *c_char; + ++/* Check subject DN */ ++int C_flag; ++ + /* Debug? */ + int d_flag; + +@@ -51,10 +54,18 @@ + char *k_char; + int k_flag; + ++/* Private key of already existing certificate */ ++char *K_char; ++int K_flag; ++ + /* Request count */ + int n_flag; + int n_num; + ++/* Already existing certificate (to be renewed) */ ++char *O_char; ++int O_flag; ++ + /* Proxy */ + char *p_char; + int p_flag; +diff -uN sscep/draft-nourse-scep-11.txt sscep-ng2/draft-nourse-scep-11.txt +--- sscep/draft-nourse-scep-11.txt 1970-01-01 01:00:00.000000000 +0100 ++++ sscep-ng2/draft-nourse-scep-11.txt 2006-04-25 16:27:03.000000000 +0200 +@@ -0,0 +1,2367 @@ ++ ++INTERNET DRAFT Xiaoyi Liu ++draft-nourse-scep-11.txt Cheryl Madson ++expires 11 Aug 2005 David McGrew ++(revised 11 Feb 2005) Andrew Nourse ++ Cisco Systems ++ ++Category: Informational 11 Feb 2005 ++ ++ ++Cisco Systems' Simple Certificate Enrollment Protocol(SCEP): ++ ++Status of this Memo ++ ++This document is an Internet-Draft and is NOT offered in accordance ++with Section 10 of RFC2026, and the author does not provide the IETF ++with any rights other than to publish as an Internet-Draft ++ ++Internet-Drafts are working documents of the Internet Engineering Task ++Force (IETF), its areas, and its working groups. Note that other ++groups may also distribute working documents as Internet-Drafts. ++ ++Internet-Drafts are draft documents valid for a maximum of six months ++and may be updated, replaced, or obsoleted by other documents at any ++time. It is inappropriate to use Internet- Drafts as reference ++material or to cite them other than as "work in progress." ++ ++The list of current Internet-Drafts can be accessed at ++http://www.ietf.org/ietf/1id-abstracts.txt ++ ++The list of Internet-Draft Shadow Directories can be accessed at ++http://www.ietf.org/shadow.html. ++ ++This memo provides information for the Internet community. This memo ++does not specify an Internet standard of any kind. Distribution of ++this memo is unlimited. ++ ++By submitting this Internet-Draft, I certify that any applicable patent ++or other IPR claims of which I am aware have been disclosed, or will be ++disclosed, and any of which I become aware will be disclosed, in accordance ++with RFC 3668. ++ ++Abstract ++ ++This document specifies the Simple Certificate Enrollment Protocol, ++a PKI communication protocol which leverages existing technology by ++using PKCS#7 and PKCS#10. SCEP is the evolution of the enrollment ++protocol developed by Verisign, Inc. for Cisco Systems, Inc. ++It now enjoys wide support in both client and CA implementations. ++ ++ ++Table of Contents ++ ++ 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 2 ++ 2. The Goal of SCEP . . . . . . . . . . . . . . . . . . . . . 3 ++ 2.1 SCEP Entity types . . . . . . . . . . . . . . . . . . . . 3 ++ 2.2 SCEP Operations Overview . . . . . . . . . . . . . . . . . 7 ++ 2.3 PKI Operation Transactional Behavior . . . . . . . . . . . 10 ++ 2.4 Security . . . . . . . . . . . . . . . . . . . . . . . . . 12 ++ 3. Transport Protocol . . . . . . . . . . . . . . . . . . . . 13 ++ 4. Secure Transportation: PKCS #7 . . . . . . . . . . . . . . 14 ++ 4.1 SCEP Message Format . . . . . . . . . . . . . . . . . . . 14 ++ ++ Liu/Madson/McGrew/Nourse [Page 2] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ 4.2 Signed Transaction Attributes . . . . . . . . . . . . . . 15 ++ 5. SCEP Transaction Specification . . . . . . . . . . . . . . 16 ++ 5.1 Certificate Enrollment . . . . . . . . . . . . . . . . . . 16 ++ 5.2 Poll for Requester Initial Certificate . . . . . . . . . . 22 ++ 5.3 Certificate Access . . . . . . . . . . . . . . . . . . . . 26 ++ 5.4 CRL Access . . . . . . . . . . . . . . . . . . . . . . . 27 ++ 5.5 Get Certificate Authority Certificate . . . . . . . . . . 31 ++ 5.6 Get Certificate Authority Certificate Chain . . . . . . . 33 ++ 6. Security Considerations . . . . . . . . . . . . . . . . . 33 ++ 7. Intellectual Propoerty . . . . . . . . . . . . . . . . . . 33 ++ 8. References . . . . . . . . . . . . . . . . . . . . . . . . 33 ++ Appendix A. Cisco Requester Subject Name Definition . . . . . . 34 ++ Appendix B. IPSEC Client Enrollment Certificate Request . . . . 35 ++ Appendix C. Private OID Definitions . . . . . . . . . . . . . 36 ++ Appendix D. Obtaining CRL by LDAP Query . . . . . . . . . . . . 36 ++ Appendix E. SCEP State Transitions . . . . . . . . . . . . . . 37 ++ Appendix F. CA Capabilities . . . . . . . . . . . . . . . . . . 40 ++ Appendix G. Certificate Renewal and CA Key Rollover . . . . . . 41 ++ Appendix H. PKIOperation via HTTP POST Message. . . . . . . . . 42 ++ Appendix Y. Author Contact Information. . . . . . . . . . . . . 43 ++ Appendix Z. Copyright Section . . . . . . . . . . . . . . . . . 43 ++ ++Section 1. Introduction ++ ++Public key technology is becoming more widely deployed and is becoming ++the basis for standards based security, such as the Internet Engineering ++Task Force's IPSEC and IKE protocols. With the use of public key ++certificates in network security protocols comes the need for a ++certificate management protocol that Public Key Infrastructure (PKI) ++clients and Certificate Authority servers can use to support certificate ++life cycle operations such as certificate enrollment and revocation, and ++certificate and CRL access. ++ ++In the following, Section 2 gives an overview of the PKI operations, ++and Section 2.4 describes the security goals of the protocol and the ++mechanisms used to achieve them. The transport protocol and the ++security protocol PKCS#7 are described at Section 3 and Section 4, ++respectively. The last section, Section 5, specifies each PKI ++operation in terms of the message formats and the data structures of ++each operation. ++ ++The appendices provide detailed specifications and examples. Requester ++subject names are specified in Appendix A, attribute OIDs are ++specified in Appendix C , and the SCEP state transitions are described ++in Appendix E. An example of a certificate enrollment request is ++provided in Appendix B, and an example LDAP query URL encoding is ++provided in Appendix D. ++ ++The authors would like to thank Peter William of ValiCert, Inc. ++(formerly of Verisign, Inc) and Alex Deacon of Verisign, Inc. and ++Christopher Welles of IRE, Inc. for their contributions to this protocol ++and to this document. ++ ++ Liu/Madson/McGrew/Nourse [Page 3] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++2.0 The Goal of SCEP ++The goal of SCEP is to support the secure issuance of certificates to ++network devices in a scalable manner, using existing technology whenever ++possible. The protocol supports the following operations: ++ ++ CA and RA public key distribution ++ Certificate enrollment ++ Certificate revocation ++ Certificate query ++ CRL query ++ ++Certificate and CRL access can be achieved by using the LDAP protocol ++(as specified in Appendix D), or by using the query messages defined in ++SCEP. The use of HTTP certificate and CRL access, and the support of ++CDP as specified in RFC2459, will be specified in a future version of ++this document. In Section 2.1, we first define PKI entity types as well ++as the properties of each entity type. In Section 2.2, the PKI ++operations are described at functional level. Section 2.3 describes the ++transaction behavior of each PKI operations. The complete PKI messages ++are covered in Section 5. ++ ++2.1 SCEP Entity types ++ ++The entity types defined in SCEP are the "requester" type (i.e., IPSEC ++clients), the Certificate Authority (CA) entity type, and the ++Registration Authority entity type (RA). A requester is sometimes ++called a "SCEP client" in the following. ++ ++2.1.1 Requesters ++ ++A requester is an entity whose name is defined in a certificate ++subject name field and optionally, in SubjectAltName, a X.509 ++certificate V3 extension. As a requester, a SCEP client is identified ++by a subject name consisting of the following naming attributes: ++ ++ Fully qualified domain name, for example, router.cisco.com ++ IP address, Serial number, and/or x.500 distinguished name ++ ++The fully qualified domain name is required for a requester that intends ++to use the certificate for ISAKMP. The IP address, serial number, and ++x.500 distinguished name are optional name attributes. In the ++certificate enrollment request, the PKCS#10 subject field contains the ++required and optional name attributes. The distinguished name, if any, ++should be the subject name field, while any domain name, serial number, ++or IP address supplied should be in the subjectAltName field. The ++subject name field may be empty (if there is no distinguished name) ++or the subjectAltName may be omitted, but not both. ++ ++It is important to note that a client named as Alice.cisco.com is ++different than a client named as Alice.cisco.com plus the IP address ++name attribute 117.96.1.219. From CA point of view, the Distinguished ++names assigned in these two cases are distinct names. ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 4] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++Entity names which are specified as in the IPSEC profile (i.e., FQDN, IP ++address and User FQDN) must be presented in certificate's SubjectAltName ++extension. Multiple IPSEC entity names, (if any) are encoded as multiple ++values of a single SubjectAltName extension. The CA has the authority ++to assign a distinguished name to a requester, whether or not one was ++included in the request. The assigned DN should contain the SCEP client ++names as the relative DN. ++ ++The attribute identifiers and an example of SCEP client subject name are ++specified in Appendix A. Appendix B has an example from Cisco VPN Client ++enrollment request. ++ ++2.1.1.1 Local Key/Certificate/CRL Storage and Certificate-name uniqueness ++ ++A requester is required to generate asymmetric key pairs and to provide ++storage to store its private keys. If the requester does not have enough ++permanent memory to save its certificate, then it should be able to query ++its own certificate from the CA or an LDAP server, once the certificate ++has been issued. The public key pairs can be generated with a specific ++key usage. The key usage is conveyed to the CA through the certificate ++enrollment request. All current SCEP client implementations expect that ++there will be only one pair of keys for a given subject name ++and key usage combination and CA, at any time. This property is called ++the certificate-name uniqueness property, and it implies that a CA that ++implements SCEP will enforce the unique mapping between a SCEP client ++subject name and its key pairs with a given key usage. At any time, if ++the subject name is changed, or if the key is updated, the existing ++certificate would have to be revoked before a new one could be issued. ++ ++It is desirable that the CA enforce certificate-name uniqueness, but ++it is not mandatory. However a CA that does not enforce uniqueness ++must provide some other mechanism to prevent the re-transmission of an ++enrollment request by a SCEP client from creating a second certificate ++or certificate request, nor can the second request merely be rejected. ++If a client times out from polling for a pending request it can ++resynchronize by reissuing the original request with the original ++subject name, key, and transaction ID. This should return the status of ++the original transaction, including the certificate if it was granted. ++It should not create a new transaction unless the original cert has been ++revoked, or the transaction arrives more than halfway through the ++validity time of the original certificate. ++ ++An enrollment request that occurs more than halfway through the validity ++time of an existing certificate for the same subject name and key usage ++MAY be interpreted as a re-enrollment or renewal request and accepted. ++A new certificate with new validity dates may be issued, even though ++the old one is still valid, if the CA policy permits, as described in ++2.1.1.3. See also appendix G. ++ ++2.1.1.2 Requester authentication ++ ++As with every protocol that uses public-key cryptography, the ++association between the public keys used in the protocol and the ++identities with which they are associated must be authenticated in a ++ Liu/Madson/McGrew/Nourse [Page 5] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++cryptographically secure manner. This requirement is needed to ++prevent a "man in the middle" attack, in which an adversary that can ++manipulate the data as it travels between the protocol participants ++can subvert the security of the protocol. To satisfy this ++requirement, SCEP provides two authentication methods: manual ++authentication, and authentication based on pre-shared secret. In the ++manual mode, the requester is required to wait until its identity can ++be verified by the CA operator using any reliable out-of-band ++method. To prevent a "man-in-the-middle" attack, a SHA-1 or MD5 ++`fingerprint' generated on the PKCS#10 (before PKCS #7 enveloping and ++signing) must be compared out-of-band between the server and the ++requester. SCEP clients and CAs (or RAs, if appropriate) must display ++this fingerprint to the operator to enable this verification if manual ++mode is used. Failing to provide this information leaves the protocol ++vulnerable to attack by sophisticated adversaries. When utilizing a ++pre-shared secret scheme, the server should distribute a shared secret ++to the requester which can uniquely associate the enrollment request ++with the given end entity. The distribution of the secret must be ++private: only the end entity should know this secret. The actual ++binding mechanism between the requester and the secret is subject to ++the server policy and implementation. When creating the enrollment ++request, the requester is asked to provide a challenge password. When ++using the pre-shared secret scheme, the requester must enter the ++re-distributed secret as the password. In the manual authentication ++case, the challenge password only used to authenticate a request for ++the certificate's revokation. This challenge password is included as ++a PKCS#10 attribute, and is sent to the server as encrypted data. The ++PKCS#7 envelope protects the privacy of the challenge password with ++DES encryption. ++ ++2.1.1.3 Requester Uses Existing CA-Issued or Self-Signed Certificates ++ ++In this protocol, the communication between the requester and the ++certificate authority is secured by using PKCS#7 as the messaging ++protocol. PKCS#7, however, is a protocol which assumes the ++communicating entities already possess the peer's certificates and ++requires both parties use the issuer names and issuer assigned ++certificate serial numbers to identify the certificate in order to ++verify the signature and decrypt the message. If the requesting ++system already has a certificate issued by the CA, that certificate ++may be presented as credentials for the renewal of that certificate if ++the CA supports the "Renewal" capability and the CA policy permits the ++certificate to be renewed. If the requester has no certificate issued ++by the CA, or if the CA does not support and permit renewal, the ++requestor must generate a self-signed certificate with the requester ++subject name (the same name later used in the PKCS#10) as both issuer ++and subject name. During the certificate enrollment, the requester ++will first post itself as the signing authority by attaching the ++self-signed certificate to the signed certificate request. When the ++Certificate Authority makes the envelope on the issued certificate ++using the public key included in the self-signed certificate, it ++should use the same issuer name and serial number as conveyed in the ++self-signed certificate to inform the end entity on which private key ++should be used to open the envelope. ++ Liu/Madson/McGrew/Nourse [Page 6] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++Note that when a client enrolls for separate encryption and signature ++certificates, it may use the signature certificate to sign both ++requests, and then expect its signature key to be used to encrypt ++both responses. In any case, the recipientinfo on the envelope should ++reflect the key used to encrypt the request. ++ ++2.1.1.4 Trusted CA Store ++ ++To support interoperability between IPSEC peers whose certificates are ++issued by different CA, SCEP allows the users to configure multiple ++trusted certificates. Trusted certificates are have been configured as ++such in the client, based on some out-of-band means such as a "fingerprint". ++These trusted certificates are used to verify certificate chains that end ++in those certificates. ++ ++2.1.2 Certificate Authority ++ ++A Certificate Authority(CA) is an entity whose name is defined in the ++certificate issuer name field. Before any PKI operations can begin, ++the CA generates its own public key pair and creates a self-signed CA ++certificate, or causes another CA to issue a certificate to it. ++Associated with the CA certificate is a fingerprint which will be used ++by the requester to authenticate the received CA certificate if it is ++self-signed. The fingerprint is created by calculating a SHA-1 or MD5 ++hash on the whole CA certificate. Before any requester can start its ++enrollment, this CA certificate has to be configured at the entity ++side securely. For IPSEC clients, the client certificates must have ++SubjectAltName extension. To utilize LDAP as a CRL query protocol, ++the certificates must have a CRL Distribution Point. Key usage is ++optional. Without key usage, the public key is assumed as a general ++purpose public key and it can be used for all the purposes. ++ ++A Certificate Authority may enforce certain name policy. When using ++X.500 directory name as the subject name, all the name attributes ++specified in the PKCS#10 request should be included as Relative DN. All ++the name attributes as defined in RFC2459 should be specified in the ++SubjectAltName. An example is provided in Appendix A. ++ ++ If there is no LDAP query protocol support, the Certificate Authority ++should answer certificate and CRL queries, and to this end it should be ++online all the time. ++ ++The updating of the CA's public key is addressed in Appendix G. ++ ++2.1.3 Registration Authorities ++ ++In an environment where an RA is present, a requester performs ++enrollment through the RA. In order to setup a secure channel with an RA ++using PKCS#7, the RA certificate(s) have to be obtained by the client ++in addition to the CA certificate(s). ++ ++In the following, the CA and RA are specified as one entity in the ++context of PKI operation definitions. ++ Liu/Madson/McGrew/Nourse [Page 7] ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++2.2 SCEP Operations Overview ++ ++In this section, we give a high level overview of the PKI operations as ++defined in SCEP. ++ ++2.2.1 Requester Initialization ++ ++The requester initialization includes the key pair generation and the ++configuring of the required information to communicate with the ++certificate authority. ++ ++2.2.1.1 Key Pairs ++ ++Before a requester can start PKI transaction, it must have at least one ++asymmetric key pair, using the selected algorithm (the RSA algorithm is ++required in SCEP, and is the only algorithm in current implementations). ++ ++Key pairs may be intended for particular purposes, such as encryption only, ++or signing only. The usage of any associated certificate can be restricted ++by adding key usage and extended key usage attributes to the PKCS#10. ++ ++2.2.1.2 Required Information ++ ++A requester is required to have the following information configured ++before starting any PKI operations: ++ ++1. the certificate authority IP address or fully-qualified domain name, ++2. the certificate authority HTTP CGI script path, and ++ the HTTP proxy information in case there is no direct Internet ++ connection to the server, ++3. If CRLs are being published by the CA to an LDAP directory server, ++ and there is a CRL Distribution Point containing only an X.500 directory ++ name, then the client will need to know the LDAP server fully-qualified ++ domain name or IP address. CRL Distribution Points are discussed in ++ more detail in RFC 2459. ++ ++ ++2.2.2 CA/RA Certificate Distribution ++ ++Before any PKI operation can be started, the requester needs to get ++the CA/RA certificates. At this time, since no public key has been ++ ++ Liu/Madson/McGrew/Nourse [Page 8] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++exchanged between the requester and the CA/RA, the message to get the ++CA/RA certificate can not be secured using PKCS#7 protocol. Instead, the ++CA/RA certificate distribution is implemented as a clear HTTP Get ++operation. After the requester gets the CA certificate, it has to ++authenticate the CA certificate by comparing the finger print with the ++CA/RA operator. Since the RA certificates are signed by the CA, there is ++no need to authenticate the RA certificates. ++ ++This operation is defined as a transaction consisting of one HTTP Get ++message and one HTTP Response message: ++ ++ REQUESTER CA SERVER ++ Get CA/RA Cert: HTTP Get message ++ -----------------------------> ++ CA/RA Cert download: HTTP Response message ++ <--------------------------------------- ++ Compute finger print and ++ call CA operator. ++ Receive call and check finger print ++ ++If an RA is in use, a degenerated PKCS#7 with a certificate chain ++consisting of both RA and CA certificates is sent back to the end ++entity. Otherwise the CA certificate is directly sent back as the ++HTTP response payload. ++ ++ ++2.2.3 Certificate Enrollment ++ ++A requester starts an enrollment transaction by creating a certificate ++request using PKCS#10 and sends it to the CA/RA enveloped using the ++PKCS#7. After the CA/RA receives the request, it will either ++automatically approve the request and send the certificate back, or it ++will require the requester to wait until the operator can manually ++authenticate the identity of the requester. Two attributes are ++included in the PKCS#10 certificate request - a Challenge Password ++attribute and an optional ExtensionReq attribute which will be a ++sequence of extensions the requester would like to be included in its ++V3 certificate extensions. The Challenge Password may be used to ++authenticate either the enrollment request itself, or a verbal ++revocation request for the issued certificate in the event of key ++compromise or other reason. ++ ++In the automatic mode, the transaction consists of one PKCSReq PKI ++Message, and one CertRep PKI message. In the manual mode, the requester ++enters into polling mode by periodically sending a GetCertInitial PKI ++message to the server, until the server operator completes the manual ++authentication, after which the CA will respond to GetCertInitial by ++returning the issued certificate. A CA MAY run in automatic mode for ++preapproved requests, and manual mode for the rest. A request with a ++non-null password is not necessarily a pre-approved request. It is up ++to the CA server to decide. Polling mode is entered whenever the ++server returns a PENDING response. ++ ++ Liu/Madson/McGrew/Nourse [Page 9] ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ ++The transaction in automatic mode: ++ ++ REQUESTER CA SERVER ++ ++PKCSReq: PKI cert. enrollment msg ++ --------------------------------> CertRep: pkiStatus = SUCCESS ++ certificate attached ++ <------------------------------ ++ Receive issued certificate. ++ ++The transaction in manual mode: ++ ++ REQUESTER CA SERVER ++ PKCSReq: PKI cert. enrollment msg ++ --------------------------------> CertRep: pkiStatus = PENDING ++ <------------------------------ ++ GetCertInitial: polling msg ++ --------------------------------> CertRep: pkiStatus = PENDING ++ <------------------------------ ++ ................. CertRep: pkiStatus = SUCCESS ++ certificate attached ++ <------------------------------ ++ Receive issued certificate. ++ ++2.2.4 Requester Certificate Revocation ++ ++A requester should be able to revoke its own certificate. Currently ++the revocation is implemented as a manual process. In order to revoke a ++certificate, the requester makes a phone call to the CA server ++operator. The operator will come back asking the ChallengePassword ++(which has been sent to the server as an attribute of the PKCS#10 ++certificate request). If the ChallengePassword matches, the certificate ++is revoked. The reason of the revocation is documented by CA/RA. ++ ++2.2.5 Certificate Access ++ ++There are two methods to query certificates. The first method is to use ++LDAP as a query protocol. Using LDAP to query assumes the client ++understand the LDAP scheme supported by the CA. The SCEP client assumes ++that the subject DN name in the certificate is used as the URL to query the ++certificate. The standard attributes (userCertificate and caCertificate) ++are used as filter. ++ ++For the environment where LDAP is not available, a certificate query ++message is defined to retrieve the certificates from the CA. ++ ++To query a certificate from the certificate authority, a requester ++sends a request consisting of the certificate's issuer name and the ++serial number. This assumes that the requester has saved the issuer ++ ++ Liu/Madson/McGrew/Nourse [Page 10] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++name and the serial number of the issued certificate from the previous ++enrollment transaction. The transaction to query a certificate consists ++of one GetCert PKI message and one CertRep PKI message: ++ ++ REQUESTER CA SERVER ++ GetCert: PKI cert query msg ++ -------------------------------> CertRep: pkiStatus = SUCCESS ++ certificate ++attached ++ <----------------------------- ++ Receive the certificate. ++ ++2.2.6 CRL Distribution ++ ++The CA/RA will not "push" the CRL to the end entities. The query of the ++CRL can only be initialized by the requester. ++ ++There are three methods to query CRL. ++ ++The CRL may be retrieved by a simple HTTP GET. If the CA supports this ++method, it should encode the URL into a CRL Distribution Point extension ++in the certificates it issues. Support for this method should be ++incorporated in new and updated clients, but may not be in older ++versions. ++ ++The second method is to query CRL using LDAP. This assumes the CA server ++supports CRL LDAP publishing and issues the CRL Distribution Point in ++the certificate. The CRL Distribution Point is encoded as a DN. Please ++refer to Appendix D for the examples of CRL Distribution Point. ++ ++The third method is implemented for the CA which does not support LDAP ++CRL publishing or does not implement the CRL Distribution Point. In this ++case, a CRL query is composed by creating a message consists of the CA ++issuer name and the CA's certificate serial number. This method is ++deprecated because it does not scale well and requires the CA to be a ++high-availability service. ++ ++The message is sent to the CA in the same way as the other SCEP ++requests: The transaction to query CRL consists of one GetCRL PKI ++message and one CertRep PKI message which have no certificates but CRL. ++ ++ REQUESTER CA SERVER ++ GetCRL: PKI CRL query msg ++ ----------------------------------> CertRep: CRL attached ++ <-------------------------------- ++ ++2.3 PKI Operation Transactional Behavior ++ ++As described before, a PKI operation is a transaction consisting of the ++messages exchanged between a requester and the CA/RA. This section ++will specify the transaction behavior on both the requester and the ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 11] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++certificate authority server. Because the protocol is basically a two ++way communication protocol without a confirmation message from the ++initiating side, state and state resynchronization rules have to be ++defined, in case any error happens at either side. Before the state ++transition can be defined, the notion of transaction identifier has to ++be defined first. ++ ++2.3.1 Transaction Identifier ++ ++A transaction identifier is a string generated by the entity when ++starting a transaction. Since all the PKI operations defined in this ++protocol are initiated by the requester, it is the responsibility of ++the requester to generate a unique string as the transaction ++identifier. All the PKI messages exchanged for a given PKI transaction ++must carry the same transaction identifier. The transaction identifier ++is generated as a SHA-1 or MD5 hash on the public key value for which the ++enrollment request is made. This allows the SCEP client to reuse the ++same transaction identifier if it is reissuing a request for the same ++certificate (i.e. a certificate with the same subject, issuer, and key). ++The SCEP protocol requires that transaction identifiers be unique, so ++that queries can be matched up with transactions. For this reason, in ++those cases in which separate signing and encryption certificates are ++issued to the same requester, the keys must be different. ++ ++2.3.2 State Transitions in Certificate Enrollment ++ ++The requester state transitions during enrollment operation are ++indicated in the diagram below: ++ +-<------+ ++ | | ++ GetCertInitial triggered by timeout or ++ | | manual authentication ++ | | ++ [CERT-NONEXISTANT] ------> [CERT-REQ-PENDING] ---> [CERT-ISSUED] ++ | PKCSReq | CertRep with SUCCESS ++ | | ++ | | ++ +--------<-------------------+ ++ request rejected, timeout, or error ++ ++As described in the section 2.2.3, certificate enrollment starts at the ++state CERT-NONEXISTANT. Sending PKCSReq changes the state to ++CERT-REQ-PENDING. Receiving CertRep with SUCCESS status changes the ++state to CERT-ISSUED. In the case the server sending back the response ++with pending status, the requester will keep polling certificate ++response by sending GetCertInitial to the server, until either a CertRep ++with SUCCESS status is received, or the maximum polling number has been ++exceeded. ++ ++If an error or timeout occurs in the CERT-REQ-PENDING state, the end ++entity will transition to the CERT-NONEXISTANT state. ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 12] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ ++The client administrator will, eventually, start up another enrollment ++request. It is important to note that, as long as the requester does ++not change its subject name or keys, the same transaction id will be ++used in the "new" transaction. This is important because based on this ++transaction id, the certificate authority server can recognize this as ++an existing transaction instead of a new one. ++ ++ ++2.3.3 Transaction Behavior of Certificate/CRL Access ++ ++There is no state maintained during certificate access and CRL access ++transaction. When using the certificate query and CRL query messages ++defined in this protocol, the transaction identifier is still required ++so that the requester can match the response message with the ++upstanding request message. When using LDAP to query the certificate and ++the CRL, the behavior is specified by the LDAP protocol. ++ ++2.4 Security ++ ++The security goals of SCEP are that no adversary can: ++ ++o subvert the public key/identity binding from that intended, ++o discover the identity information in the enrollment requests and ++ issued certificates, ++o cause the revocation of certificates with any non-negligible ++ probability. ++ ++Here an adversary is any entity other than the requester and the CA ++(and optionally the RA) participating in the protocol that is ++computationally limited, but that can manipulate data during ++transmission (that is, a man-in-the-middle). The precise meaning of ++'computationally limited' depends on the implementer's choice of ++cryptographic hash functions and ciphers. The required algorithms are ++RSA, DES, and either SHA-1 or MD5, depending on the "SHA-1" CA Capability. ++[See Appendix F]. ++ ++The first and second goals are met through the use of PKCS#7 and PKCS#10 ++encryption and digital signatures using authenticated public keys. The ++CA's public key is authenticated via the checking of the CA fingerprint, ++as specified in Section 2.1.2, and the SCEP client's public key is ++authenticated through the manual authentication or pre-shared secret ++authentication, as specified in Section 2.1.1.2. The third goal is met ++through the use of a Challenge Password for revocation, that is chosen ++by the SCEP client and communicated to the CA protected by the PKCS#7 ++encryption, as specified in Section 2.2.4. ++ ++The motivation of the first security goal is straightforward. The ++motivation for the second security goal is to protect the identity ++information in the enrollment requests and certificates. For example, ++two IPSEC hosts behind a firewall may need to exchange certificates, and ++may need to enroll certificates with a CA that is outside of a firewall. ++Most networks with firewalls seek to prevent IP addresses and DNS ++ ++ Liu/Madson/McGrew/Nourse [Page 13] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++information from the trusted network leaving that network. The second ++goal enables the hosts in this example to enroll with a CA outside the ++firewall without revealing this information. The motivation for the ++third security goal is to protect the SCEP clients from denial of ++service attacks. ++ ++Section 3 Transport Protocol ++ ++In the SCEP protocol, HTTP is used as the transport protocol for the PKI ++messages. ++ ++3.1 HTTP "GET" and "POST" Message Format ++ ++The following is the syntax definition of a HTTP GET message sent from ++a requester to a certificate authority server: ++ ++Request = "GET " CGI-PATH CGI-PROG "?operation=" OPERATION "&message=" MESSAGE ++where: ++ CGI-PATH defines the actual CGI path to invoke the CGI program which ++ parses the request. ++ CGI-PROG is set to be the string "pkiclient.exe". This is intended ++ to be the program that the CA will use to handle the SCEP transactions, ++ though the CA may ignore CGI-PROG and use only the CGI-PATH. ++ OPERATION is set to be the string "PKIOperation" when the GET message ++ carries a PKI message to request certificates or CRL; OPERATION is set ++ to be the string "GetCACaps", "GetCACert", "GetNextCACert" or ++ "GetCACertChain" when the GET operation is used to get CA capabilities, ++ CA/RA certificate, the replacement CA/RA certificates for when the ++ current ones expire, or the CA Cert chain (respectively). ++ ++ When OPERATION is "PKIOperation", MESSAGE is a base64-encoded PKI message, ++ When OPERATION is GetCACert, MESSAGE is a CRL distribution ++ point in URI format, otherwise, MESSAGE is a string which represents ++ the certificate authority issuer identifier. ++ ++SCEP uses the HTTP "GET" and "POST" messages to request information from the CA. ++Requests for CA certificates or capabilities are sent in the clear, using "GET", ++with the OPERATION and MESSAGE fields identifying the requested data. ++CRLs may also be requested in the clear if the CA supports it. ++ ++Other types of requests are sent using the PKCS#7 secure protocol. ++These may be issued by means of a GET operation with ++OPERATION and MESSAGE parameters in the Request-URL. OPERATION ++identifies the type of GET operation, and MESSAGE is actually the PKCS#7 ++message Base64-Encoded. ++ ++For example. a requester may submit a message via HTTP to the server ++as follows: ++ ++GET /cgi-bin/pkiclient.exe?operation=PKIOperation&message=MIAGCSqGSIb3D ++QEHA6CAMIACAQAxgDCBzAIBADB2MGIxETAPBgNVBAcTCE ......AAAAAA== ++ Liu/Madson/McGrew/Nourse [Page 13a] ++ ++If supported by the CA, the message may also be sent via HTTP POST: ++ ++POST /cgi-bin/pkiclient.exe?operation=PKIOperation ++ ++This is further described in Appendix H. ++To determine if the CA supports POST, use the GetCACaps message described ++in Appendix F. ++ ++ ++3.2 Response Message Format ++ ++For each GET operation, the CA/RA server will return a MIME object via ++HTTP. For a GET operation with PKIOperation as its type, the response is ++tagged as having a Content Type of application/x-pki-message. The body ++of this message is a BER encoded binary PKI message. The following is an ++example of the response: ++ ++"Content-Type:application/x-pki-message\n\n" ++ ++In the case of GET operation with a type of GetCACert the MIME content ++type returned will depend on whether or not an RA is in use. If there ++is no RA, only the CA certificate is sent back in the response, and ++the response has the content type tagged as ++application/x-x509-ca-cert. the body of the response is a DER encoded ++binary X.509 certificate. For example: ++ ++"Content-Type:application/x-x509-ca-cert\n\n" ++ ++If there is an RA, the RA certificates are sent back together with the ++CA certificates, a certificate-only PKCS#7 SignedData is sent back in ++the response where the SignerInfo is empty. Section 5 has the detailed ++definition of the message format in this case. The content type is ++application/x-x509-ca-ra-cert. ++ ++The response to GetNextCACert is always a certificates-only PKCS#7 ++SignedData with a content type of application/x-x509-ca-ra-cert. ++If there is an RA, The signer is the current RA certificate. Otherwise, ++the signer is the current CA certificate. ++ ++If the CA supports it, PKIOperation may also be done via an HTTP POST. ++This is described in Appendix H. ++ ++ Liu/Madson/McGrew/Nourse [Page 14] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++Section 4 Secure Transportation: PKCS#7 ++ ++PKCS#7 is a general enveloping mechanism that enables both signed and ++encrypted transmission of arbitrary data. It is widely implemented and ++included in the RSA tool kit. In this section, the general PKCS#7 ++enveloped PKI message format is specified. The complete PKCS#7 message ++format for each PKI transaction will be covered in Section 5. ++ ++4.1 SCEP Message Format ++ ++As a transaction message, a SCEP message has a set of transaction ++specific attributes and an information portion. Employing PKCS#7 ++protocol, the transaction specific attributes are encoded as a set of ++authenticated attributes of the SignedData. The information portion will ++first be encrypted to become Enveloped Data, and then the digest of the ++enveloped information portion is included as one of the message digest ++attributes and being signed together with the other transaction specific ++attributes. ++ ++By applying both enveloping and signing transformations, a SCEP message ++is protected both for the integrity of its end-end-transition ++information and the confidentiality of its information portion. The ++advantage of this technique over the conventional transaction message ++format is that, the signed transaction type information and the status ++of the transaction can be determined prior to invoke security handling ++procedures specific to the information portion being processed. ++ ++The following is an example of a SCEP message with its enveloped and ++signed data portion represented by pkcsPKISigned and ++pkcsPKIEnveloped. The out-most of any PKI message is a blob of ++ContentInfo, with its content type set to SignedData and the actual ++signed data as the content. ++ ++ Liu/Madson/McGrew/Nourse [Page 15] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ pkiMessage ContentInfo ::= { ++ contentType {pkcs-7 signedData(2)} ++ content pkcsPKISigned ++ } ++ pkcsPKISigned SignedData ::= { ++ version 1 ++ digestAlgorithm { iso(1) member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ contentInfo { ++ contentType {pkcs-7 1} -- data content identifier ++ content pkcsPKIEnvelope -- enveloped information portion ++ } ++ certificates -- signer certificate chain ++ signerInfo -- including signed transaction info and the digest ++ -- of the enveloped information portion as the ++ -- authenticated attributes ++ } ++ pkcsPKIEnveloped EnvelopedData ::= { ++ version 0 ++ recipientInfos -- information required to open the envelop ++ encryptedContentInfo { ++ contentType {pkcs-7 1} -- data content identifier ++ contentEncryptionAlgorithm ++ encryptedContent -- encrypted information portion ++ } ++ } ++ ++4.2 Signed Transaction Attributes ++ ++The following transaction attributes are encoded as authenticated ++attributes. Please refer to Appendix B for the OID definitions. ++ ++transactionID PrintableString -- Decimal value as a string ++ messageType PrintableString -- Decimal value as a string ++ pkiStatus PrintableString -- Decimal value as a string ++ failinfo PrintableString -- Decimal value as a string ++ senderNonce Octet String ++ recipientNonce Octet String ++ ++where: ++ ++ The transactionID is an attribute which uniquely identify a ++ transaction. This attribute is required in all PKI messages. ++ ++ The messageType attribute specify the type of operation performed by the ++ transaction. This attribute is required in all PKI ++ messages. Currently, the following message types are defined: ++ ++ PKCSReq (19) -- Permits use of PKCS#10 certificate request ++ CertRep (3) -- Response to certificate or CRL request ++ GetCertInitial (20) -- Certificate polling in manual enrollment ++ GetCert (21) -- Retrieve a certificate ++ GetCRL (22) -- Retrieve a CRL ++ ++ Liu/Madson/McGrew/Nourse [Page 16] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ ++ All response message will include transaction status information which ++ is defined as pkiStatus attribute: ++ ++ SUCCESS (0) -- request granted ++ FAILURE (2) -- request rejected ++ PENDING (3) -- request pending for manual approval. ++ ++ If the status in the response is FAILURE, the failinfo attribute will ++ contain one of the following failure reasons: ++ ++ badAlg (0) -- Unrecognized or unsupported algorithm ident ++ badMessageCheck (1) -- integrity check failed ++ badRequest (2) -- transaction not permitted or supported ++ badTime (3) -- Message time field was not sufficiently close ++ to the system time ++ badCertId (4) -- No certificate could be identified matching ++ the provided criteria ++ ++ The attributes of senderNonce and recipientNonce are the 16 byte ++ random numbers generated for each transaction to prevent the replay ++ attack. ++ ++When a requester sends a PKI message to the server, a senderNonce is ++included in the message. After the server processes the request, it will ++send back the requester senderNonce as the recipientNonce and generates ++another nonce as the senderNonce in the response message. Because the ++proposed pki protocol is a two-way communication protocol, it is clear ++that the nonce can only be used by the requester to prevent the ++replay. The server has to employ extra state related information to ++prevent a replay attack. ++ ++Section 5. SCEP Transaction Specification ++ ++In this section each SCEP transaction is specified in terms of the ++complete messages exchanged during the transaction. ++ ++5.1 Certificate Enrollment ++ ++The certificate enrollment transaction consists of one PKCSReq message ++sent to the certificate authority from a requester, and one CertRep ++message sent back from the server. The pkiStatus returned in the ++response message is either SUCCESS, or FAILURE, or PENDING. The ++information portion of a PKCSReq message is a PKCS#10 certificate ++request, which contains the subject Distinguished Name, the subject ++public key, and two attributes, a ChallengePassword attribute to be used ++for revocation, and an optional ExtensionReq attribute which will be a ++sequence of extensions the requester expects to be included in its V3 ++certificate extensions. One of the extension attribute specifies the key ++usage. If the request is granted, the pkiStatus is set to SUCCESS, and ++the certificate is returned in CertRep; if the request is rejected, the ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 17] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++pkiStatus is set to FAILURE; if the server requires manual approval of ++the request, the pkiStatus is set to PENDING. The messages exchanged ++in the manual authentication mode is further specified in Section 5.2. ++ ++Precondition: ++ Both the requester and the certificate authority have completed their ++ initialization process. The requester has already been configured ++ with the CA/RA certificate. ++ ++Postcondition: ++ Either the certificate is received by the requester, or the end ++ entity is notified to do the manual authentication, or the request ++ is rejected. ++ ++5.1.1 PKCSReq Message Format ++ ++A PKCSReq message is created by following the steps defined below: ++ ++1. Create a PKCS#10 certificate request which is signed by the end ++ entity's private key, corresponding to the public key included in ++ the PKCS#10 certificate request. This constitutes the information ++ portion of PKCSReq. ++ ++2. Encrypt the PKCS#10 certificate request using a randomly generated ++ content-encryption key. This content-encryption key is then ++ encrypted by the CA's* public key and included in the recipientInfo. ++ This step completes the "envelope" for the PKCS#10 certificate ++ request. ++ ++3. Generate a unique string as the transaction id. ++ ++4. Generate a 16 byte random number as senderNonce. ++ ++5. Generate message digest on the enveloped PKCS#10 certificate request ++ using the selected digest algorithm. ++ ++6. Create SignedData by adding the requester's self- or CA-certificate ++ as the signer's public key certificate. Include the message type, ++ transaction id, the senderNonce and the message digest as the ++ authenticated attributes and sign the attributes using the end ++ entity's private key. This completes the SignedData. ++ ++7. The SignedData is prepended with the ContenInfo blob which indicates ++ a SignedData object. This final step completes the create of a ++ complete PKCSReq PKI message. ++ ++In the following, the PKCSReq message is defined following the ASN.1 ++notation. ++ ++For readability, the values of a field is either represented by a quoted ++string which specifies the intended value, or a constant when the value ++is known. ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 18] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ -- PKCSReq information portion ++ pkcsCertReq CertificationRequest ::= { -- PKCS#10 ++ version 0 ++ subject "the requester's subject name" ++ subjectPublicKeyInfo { ++ algorithm {pkcs-1 1} -- rsa encryption ++ subjectPublicKey "DER encoding of the requester's public key" ++ } ++ attributes { ++ challengePassword {{pkcs-9 7} "password string" } ++ extensions ++ } ++ signatureAlgorithm {pkcs-1 4} -- MD5WithRSAEncryption ++ signature "bit string which is created by signing inner content ++ of the defined pkcsCertReq using requester's private ++ key, corresponding to the public key included in ++ subjectPublicKeyInfo." ++ } ++ -- Enveloped information portion ++ pkcsCertReqEnvelope EnvelopeData ::= { -- PKCS#7 ++ version 0 ++ recipientInfo { ++ version 0 ++ issuerAndSerialNumber { ++ issuer "the CA issuer name" ++ serialNumber "the CA certificate serial number" ++ } ++ keyEncryptionAlgorithm {pkcs-1 1} -- rsa encryption ++ encryptedKey "content-encryption key ++ encrypted by CA public key" ++ } ++ encryptedContentInfo { ++ contentType {pkcs-7 1} -- data content ++ contentEncryptionAlgorithm "object identifier ++ for DES encryption" ++ encryptedContent "encrypted pkcsCertReq using the content- ++ encryption key" ++ } ++ } ++ -- Signed PKCSReq ++ pkcsCertReqSigned SignedData ::= { -- PKCS#7 ++ version 1 ++ digestAlgorithm {iso(1) member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ contentInfo { ++ contentType {pkcs-7 1} -- data content identifier ++ content pkcsCertReqEnvelope ++ } ++ certificate { -- requester self-signed or CA-issued certificate ++ version 3 ++ serialNumber "the transaction id associated with enrollment" ++ signature {pkcs-1 4} -- md5WithRSAEncryption ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 19] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ issuer " the requester's subject name" ++ validity { ++ notBefore "a UTC time" ++ notAfter "a UTC time" ++ } ++ subject "the requester's subject name" ++ subjectPublicKeyInfo { ++ algorithm {pkcs-1 1} ++ subjectPublicKey "DER encoding of requester's public key" ++ } ++ signatureAlgorithm {pkcs-1 4} ++ signature "the signature generated by using the requester's ++ private key corresponding to the public key in ++ this certificate." ++ } ++ signerInfo { ++ version 1 ++ issuerAndSerialNumber { ++ issuer "the requester's subject name" ++ serialNumber "the transaction id associated ++ with the enrollment" ++ } ++ digestAlgorithm {iso(0) member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ authenticateAttributes { ++ contentType {{pkcs-9 3} {pkcs-7 1}} ++ messageDigest {{pkcs-9 4} "an octet string"} ++ transaction-id {{id-attributes transId(7)} "printable ++ string"} ++ -- this transaction id will be used ++ -- together with the subject name as ++ -- the identifier of the requester's key ++ -- pair during enrollment ++ messageType {{id-attributes messageType(2)} "PKCSReq"} ++ senderNonce {{id-attributes senderNonce(5)} ++ "a random number encoded as a string"} ++ } ++ digestEncryptionAlgorithm {pkcs-1 1} -- rsa encryption ++ encryptedDigest "encrypted digest of the authenticated ++ attributes using requester's private key" ++ } ++ } ++ pkcsReq PKIMessage ::= { ++ contentType {pkcs-7 2} ++ content pkcsCertRepSigned ++ } ++ ++ ++ ++ ++ ++ ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 20] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++5.1.2 CertRep Message Format ++ ++The response to an SCEP enrollment request is a CertRep message. ++ ++5.1.2.1 PENDING Response ++ ++When the CA is configured to manually authenticate the requester, ++the CertRep is returned with the attribute pkiStatus set to PENDING. ++The data portion for this message is null. Only the transaction ++required attributes are sent back. ++ ++CertRepSigned SignedData ::= { -- PKCS#7 ++ version 1 ++ digestAlgorithm {iso(1) member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ contentInfo {contentType {pkcs-7 1} -- empty content ++ } ++ signerInfo { ++ version 1 ++ issuerAndSerialNumber { ++ issuer "name of CA that issued the CA [RA] cert" ++ serialNumber "the serial number of the CA [RA] cert" ++ } ++ digestAlgorithm (iso(1) member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ authenticateAttributes { ++ contentType {{pkcs-9 3} {pkcs-7 1}} ++ messageDigest {{pkcs-9 4} NULL} ++ messageType {{id-attribute messageType(0)} "CertRep"} ++ transaction-id {{id-attributes transid(7)} "printablestring"} ++ --- same transaction id used in PKCSReq ++ pkiStatus {{id-attributes pkiStatus(3)} "PENDING"} ++ recipientNonce {{id-attributes recipientNonce(6)}<16 bytes>} ++ senderNonce {{id-attributes senderNonce(5)} <16 bytes>} ++ } ++ digestEncrytionAlgorithm {pkcs-1 1} ++ encryptedDigest "encrypted message digest of the authenticated ++ attributes using the CA's [RA's] private key" ++ } ++} ++CertRep PKIMessage ::= { ++ contentType {pkcs-7 2} ++ content CertRepSigned ++} ++ ++5.1.2.2 Failure Response ++ ++In this case, the CertRep sent back to the requester is same as in ++the PENDING case, except that the pkiStatus attribute is set to FAILURE, ++and the failInfo attribute should be included: ++ ++ pkistatus {{id-attributes pkiStatus(3)} "FAILURE"} ++ failInfo {{id-attributes failInfo(4)} "the reason to reject"} ++ ++ Liu/Madson/McGrew/Nourse [Page 21] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++5.1.2.3 SUCCESS response ++ ++In this case, the information portion of CertRep will be a degenerated ++PKCS#7 which contains the requester's certificate. It is then enveloped ++and signed as below: ++ ++pkcsCertRep SignedData ::= { -- PKCS#7 ++ version 1 ++ digestAlgorithm {iso(1) member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ contentInfo { -- empty content since this is degenerated PKCS#7 ++ contentType {pkcs-7 1} ++ } ++ certificates { ++ certificate { -- issued requester's certificate // must be first ++ version 3 ++ serialNumber "issued requester's certificate serial number" ++ signature {pkcs-1 4} -- md5WithRSAEncryption ++ issuer "the certificate authority issuer name" ++ validity { ++ notBefore "UTC time" ++ notAfter "UTC time" ++ } ++ subject "the requester subject name as given in PKCS#10" ++ subjectPublicKeyInfo { ++ algorithm {pkcs-1 1} ++ subjectPublicKey "a DER encoding of requester public ++ key as given in PKCS#10" ++ } ++ extensions " the extensions as given in PKCS#10" ++ signatureAlgorithm {pkcs-1 4} ++ signature " the certificate authority signature" ++ } ++ certificate "the certificate authority certificate" (optional) ++ certificate "the registration authority certificate(s)" (optional) ++ } ++} ++pkcsCertRepEnvelope EnvelopedData ::= { -- PKCS#7 ++ version 0 ++ recipientInfo { ++ version 0 ++ issuerAndSerialNumber { -- use issuer name and serial number as ++ -- conveyed in requester's self-signed ++ -- certificate, included in the PKCSReq ++ issuer "the requester's subject name" ++ serialNumber "the serial number defined by the requester in ++ its self-signed certificate" ++ } ++ keyEncryptionAlgorithm {pkcs-1 1} ++ encryptedKey "content-encrypt key encrypted by the requester's ++ public key which is same key as authenticated in ++ the requester's certificate" ++ } ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 22] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ encryptedContentInfo { ++ contentType {pkcs-7 1} -- data content identifier ++ contentEncryptionAlgorithm "OID for DES encryption" ++ encryptedContent "encrypted pkcsCertRep using content encryption ++ key" ++ } ++} ++pkcsCertRepSigned SignedData ::= { -- PKCS#7 ++ version 1 ++ digestAlgorithm {iso(1) member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ contentInfo { ++ contentType {pkcs-7 1} ++ content pkcsCertRepEnvelope ++ } ++ signerInfo { ++ version 1 ++ issuerAndSerialNumber { ++ issuer "the certificate authority issuer name" ++ serialNumber "the CA certificate's serial number" ++ } ++ digestAlgorithm {iso(1), member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ authenticateAttributes { ++ contentType {{pkcs-9 3} {pkcs-7 1}} ++ messageDigest {{pkcs-9 4} "a octet string"} ++ messageType {{id-attribute messageType(2)} "CertRep"} ++ transaction-id {{id-attributes transId(7)} "printable ++ string"} ++ -- same transaction id as given in PKCSReq ++ pkiStatus {{id-attributes pkiStatus(3) "SUCCESS"} ++ recipientNonce {{id-attribute recipientNonce(6)}<16 bytes>} ++ senderNonce {{ id-attributes senderNonce(5) <16 bytes>} ++ } ++ digestEncryptionAlgorithm {pkcs-1 1} ++ encryptedDigest "encrypted digest of authenticate attributes ++ using CA's private key " ++ } ++} ++CertRep PKIMessage ::= { ++ contentType {pkcs-7 2} ++ content pkcsCertRepSigned ++} ++ ++5.2 Poll for Requester Initial Certificate ++ ++Either triggered by the PENDING status received from the CertRep, or by ++the non-response timeout for the previous PKCSReq, a requester will ++enter the polling state by periodically sending GetCertInitial to the ++server, until either the request is granted and the certificate is sent ++back, or the request is rejected, or the configured time limit for ++polling is exceeded. ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 23] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ ++Since GetCertInitial is part of the enrollment, the messages exchanged ++during the polling period should carry the same transaction identifier ++as the previous PKCSReq. ++ ++PreCondition ++ Either the requester has received a CertRep with pkiStatus set to be ++ PENDING, or the previous PKCSReq has timed out. ++ ++PostContition ++ The requester has either received the certificate, or be rejected of ++ its request, or the polling period ended as a failure. ++ ++5.2.1 GetCertInitial Message Format ++ ++Since at this time the certificate has not been issued, the requester ++can only use the requester's subject name, combined with the ++transaction identifier, to identify the polled certificate request. ++ ++The certificate authority server must be able to uniquely identify the ++polled certificate request. A subject name can have more than one ++outstanding certificate request (with different key usage attributes). ++ ++-- Information portion ++ ++pkcsGetCertInitial issuerAndSubject ::= { ++ issuer "the certificate authority issuer name" ++ subject "the requester subject name as given in PKCS#10" ++} ++pkcsGetCertInitialEnvelope EnvelopedData ::= { ++ version 0 ++ recipientInfo { ++ version 0 ++ issuerAndSerialNumber { ++ issuer "the CA issuer name" ++ serialNumber "the CA certificate serial number" ++ } ++ keyEncryptionAlgorithm {pkcs-1 1} ++ encryptedKey "content-encrypt key encrypted by CA's public key" ++ } ++ encryptedContentInfo { ++ contentType {pkcs-7 1} -- data content ++ contentEncryptionAlgorithm "OID for DES encryption" ++ encryptedContent "encrypted getCertInital" ++ } ++} ++pkcsGetCertInitialSigned SignedData ::= { -- PKCS#7 ++ version 1 ++ digestAlgorithm {iso(1) member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ contentInfo { ++ contentType {pkcs-7 1} ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 24] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ content pkcsGetCertIntialEnvelope ++ } ++ certificate { -- the requester's self-signed certificate ++ version 3 ++ serialNumber "the transaction id associated with enrollment" ++ signature {pkcs-1 4} -- md5WithRSAEncryption ++ issuer " the requester's subject name" ++ validity { ++ notBefore "a UTC time" ++ notAfter "a UTC time" ++ } ++ subject "the requester's subject name" ++ subjectPublicKeyInfo { ++ algorithm {pkcs-1 1} ++ subjectPublicKey "DER encoding of requester's public key" ++ } ++ signatureAlgorithm {pkcs-1 4} ++ signature "the signature generated by using the requester's ++ private key corresponding to the public key in ++ this certificate." ++ } ++ signerInfo { ++ version 1 ++ issuerAndSerialNumber { ++ issuer "requester's subject name" ++ serialNumber "the transaction id used in previous PKCSReq" ++ } ++ digestAlgorithm {iso(1), member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ authenticateAttributes { ++ contentType {{pkcs-9 3} {pkcs-7 1}} ++ messageDigest {{pkcs-9 4} "an octet string"} ++ -- digest of getCertInitial ++ messageType {{id-attribute messageType(2)} "GetCertInitial"} ++ transaction-id {{id-attributes transId(7)} "printable ++ string"} ++ -- same transaction idused in previous PKCSReq ++ senderNonce {{id-attribute senderNonce(3)} 0x<16 bytes>} ++ } ++ digestEncryptionAlgorithm {pkcs-1 1} ++ encryptedDigest "encrypted digest of authenticateAttributes" ++ } ++} ++GetCertInitial PKIMessage ::= { ++ contentType {pkcs-7 2} ++ content pkcsGetCertInitialSigned ++} ++ ++ ++ ++5.2.2 GetCertInitial Response Message Format ++ ++The response messages for GetCertInitial are the same as for PKCSReq. ++ ++ Liu/Madson/McGrew/Nourse [Page 25] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++5.3 Certificate Access ++ ++The certificate query message defined in this section is an option when ++the LDAP server is not available to provide the certificate query. A ++requester should be able to query an issued certificate from the ++certificate authority, as long as the issuer name and the issuer ++assigned certificate serial number is known to the requesting end ++entity. This transaction is not intended to provide the service as a ++certificate directory service. A more complicated query mechanism would ++have to be defined in order to allow a requester to query a certificate ++using various different fields. ++ ++This transaction consists of one GetCert message sent to the server by ++a requester, and one CertRep message sent back from the server. ++ ++PreCondition ++ The queried certificate have been issued by the certificate authority ++ and the issuer assigned serial number is known. ++ ++PostCondition ++ Either the certificate is sent back or the request is rejected. ++ ++ ++5.3.1 GetCert Message Format ++ ++The queried certificate is identified by its issuer name and the issuer ++assigned serial number. If this is a query for an arbitrary requester's ++certificate, the requesting requester should includes its own CA issued ++certificate in the signed envelope. If this is a query for its own ++certificate (assume the requester lost the issued certificate, or does ++not have enough non-volatile memory to save the certificate), then the ++self-signed certificate has to be included in the signed envelope. ++ ++ pkcsGetCert issuerAndSerialNumber ::= { ++ issuer "the certificate issuer name" ++ serialNumber "the certificate serial number" ++ } ++ pkcsGetCertEnvelope EnvelopedData ::= { ++ version 0 ++ recipientInfo { ++ version 0 ++ issuerAndSerialNumber { ++ issuer "the CA [RA] issuer name" ++ serialNumber "the CA [RA] certificate serial number" ++ } ++ keyEncryptionAlgorithm {pkcs-1 1} ++ encryptedKey "content-encrypt key encrypted ++ by CA [RA] public key" ++ } ++ ++ ++ ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 26] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ ++ encryptedContentInfo { ++ contentType {pkcs-7 1} -- data content ++ contentEncryptionAlgorithm "OID for DES encryption" ++ encryptedContent "encrypted pkcsGetCert using the content ++ encryption key" ++ } ++ } ++ pkcsGetCertSigned SignedData ::= { ++ version 1 ++ digestAlgorithm {iso(1) member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ contentInfo { ++ contentType {pkcs-7 1} ++ content pkcsGetCertEnvelope ++ } ++ certificates { ++ certificate "CA issued certificate" ++ or "self-signed certificate" ++ } ++ signerInfo { ++ version 1 ++ issuerAndSerialNumber { ++ issuer "the requester's subject name" ++ serialNumber "requester's certificate serial number" ++ } ++ digestAlgorithm {iso(1), member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ authenticateAttributes { ++ contentType {{pkcs-9 3} {pkcs-7 1}} ++ messageDigest {{pkcs-9 4} "an octet string"} ++ -- digest of pkcsGetCertEnvelope ++ messageType {{id-attribute messageType(2)} "GetCert"} ++ transaction-id {{id-attributes transId(7)} "printable ++ string"} ++ senderNonce {{id-attribute senderNonce(3)} <16 bytes>} ++ } ++ digestEncryptionAlgorithm {pkcs-1 1} ++ encryptedDigest "encrypted digest of authenticateAttributes" ++ } ++ } ++ GetCert PKIMessage ::= { ++ contentType {pkcs-7 2} ++ content pkcsGetCertSigned ++ } ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 27] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ ++5.3.2 CertRep Message Format ++ ++In this case, the CertRep from the server is same as the CertRep for the ++PKCSReq, except that the server will only either grant the request or ++reject the request. Also, the recipientInfo should use the CA issuer ++name and CA assigned serial number to identify the requester's key pair ++since at this time, the requester has received its own certificate. ++ ++5.4 CRL Access ++ ++The CRL query message defined in this section is an option when the LDAP ++server is not available to provide the CRL query. In the PKI protocol ++proposed here, only the requester can initiate the transaction to ++download CRL. A requester sends GetCRL request to the server and the ++server sends back CertRep whose information portion is a degenerated ++PKCS#7 which contains only the most recent CRL. The size of CRL included ++in the CertRep should be determined by the implementation. ++ ++PreCondition ++ The certificate authority certificate has been downloaded to the end ++ entity. ++ ++PostCondition ++ CRL sent back to the requester. ++ ++5.4.1 GetCRL Message format ++ ++The CRL is identified by using both CA's issuer name and the CA ++certificate's serial number: ++ ++ pkcsGetCRL issuerAndSerialNumber { ++ issuer "the certificate authority issuer name" ++ serialNumber "certificate authority certificate's serial number" ++ } ++ ++When the CRLDistributionPoint is supported, the pkcsGetCRL is defined as ++the following: ++ ++ pkcsGetCRL SEQUENCE { ++ crlIssuer issuerAndSerialNumber ++ distributionPoint CE-CRLDistPoints ++ } ++ ++where CE-CRLDisPoints is defined in X.509, but must contain only one ++CRL distribution point. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 28] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ pkcsGetCRLEnvelope EnvelopedData ::= { ++ version 0 ++ recipientInfo { ++ version 0 ++ issuerAndSerialNumber { ++ issuer "the certificate authority (or RA) issuer name" ++ serialNumber "the CA (RA) certificate's serial number" ++ } ++ keyEncryptionAlgorithm {pkcs-1 1} ++ encryptedKey "content-encrypt key encrypted by CA (RA) public key" ++ } ++ encryptedContentInfo { ++ contentType {pkcs-7 1} -- data content ++ contentEncryptionAlgorithm "OID for DES encryption" ++ encryptedContent "encrypted pkcsGetCRL" ++ } ++ } ++ pkcsGetCRLSigned SignedData ::= { ++ version 1 ++ digestAlgorithm {iso(1) member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ contentInfo { ++ contentType {pkcs-7 1} ++ content pkcsGetCRLEnvelope ++ } ++ certificates { ++ certificate "CA-issued or self-signed requester's certificate" ++ } ++ signerInfo { ++ version 1 ++ issuerAndSerialNumber { ++ issuer "the requester's issuer name" ++ serialNumber "the requester's certificate serial number" ++ } ++ digestAlgorithm {iso(1), member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ authenticateAttributes { ++ contentType {{pkcs-9 3} {pkcs-7 1}} ++ messageDigest {{pkcs-9 4} 0x<16/20 bytes>} ++ -- digest of pkcsGetCRLEnvelope ++ messageType {{id-attribute messageType(2)} "CertCRL"} ++ transaction-id {{id-attributes transId(7)} "printable ++ string"} ++ senderNonce {{id-attribute senderNonce(3)} <16 bytes>} ++ } ++ digestEncryptionAlgorithm {pkcs-1 1} ++ encryptedDigest "encrypted digest of authenticateAttributes" ++ } ++ } ++ GetCRL PKIMessage ::= { ++ contentType {pkcs-7 2} ++ content pkcsGetCRLSigned ++ } ++ ++ Liu/Madson/McGrew/Nourse [Page 29] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ ++5.4.2 CertRep Message Format ++ ++The CRL is sent back to the requester through CertRep message. The ++information portion of this message is a degenerated PKCS#7 SignedData ++which contains only a CRL. ++ ++ pkcsCertRep SignedData ::= { ++ version 1 ++ digestAlgorithm {iso(1) member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ contentInfo { ++ contentType {pkcs-7 1} ++ } ++ crl { ++ signature {pkcs-1 4} ++ issuer "the certificate authority issuer name" ++ lastUpdate "UTC time" ++ nextUpdate "UTC time" ++ revokedCertificate { ++ -- the first entry ++ userCertificate "certificate serial number" ++ revocationData "UTC time" ++ .... ++ -- last entry ++ userCertificate "certificate serial number" ++ revocationData "UTC time" ++ } ++ } ++ pkcsCertRepEnvelope EnvelopedData ::= { ++ version 0 ++ recipientInfo { ++ version 0 ++ issuerAndSerialNumber { ++ issuer "the requester's issuer name" ++ serialNumber "the requester certificate serial number" ++ } ++ keyEncryptionAlgorithm {pkcs-1 1} ++ encryptedKey "content-encrypt key encrypted by requester's ++ public key " ++ } ++ encryptedContentInfo { ++ contentType {pkcs-7 1} -- data content ++ contentEncryptionAlgorithm "OID for DES encryption" ++ encryptedContent "encrypted pkcsCertRep using requester's ++ public key" ++ } ++ } ++ ++ ++ ++ ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 30] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ ++ pkcsCertRepSigned SignedData ::= { -- PKCS#7 ++ version 1 ++ digestAlgorithm {iso(1) member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ contentInfo { ++ contentType {pkcs-7 1} ++ content pkcsCertRepEnvelope ++ } ++ signerInfo { ++ version 1 ++ issuerAndSerialNumber { ++ issuer "the certificate authority issuer name" ++ serialNumber "the CA certificate's serial number" ++ } ++ digestAlgorithm {iso(1), member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ authenticateAttributes { ++ contentType {{pkcs-9 3} {pkcs-7 1}} ++ messageDigest {{pkcs-9 4} "an octet string"} ++ -- digest of pkcsCertRepEnvelope ++ messageType {{id-attribute messageType(2)} "CertRep"} ++ transaction-id {{id-attributes transId(7)} "printable ++ string"} ++ -- same transaction id as given in PKCSReq ++ pkiStatus {{id-attributes pkiStatus(3) "SUCCESS"} ++ recipientNonce{{id-attribute recipientNonce(6)}<16 bytes>} ++ senderNonce {{id-attribute senderNonce (5) 0x<16 bytes>} ++ } ++ digestEncryptionAlgorithm {pkcs-1 1} ++ encryptedDigest "encrypted digest of authenticatedAttributes ++ using CA private key" ++ } ++ } ++ ++ ++NOTE:The PKCS#7 EncryptedContent is specified as an octet string, but ++SCEP entities must also accept a sequence of octet strings as a valid ++alternate encoding. ++ ++This alternate encoding must be accepted wherever PKCS #7 Enveloped ++Data is specified in this document. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 31] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++5.5 Get Certificate Authority Certificate ++ ++Before any transaction begins, end entities have to get the CA (and ++possibly RA) certificate(s) first. Since the requester may have no CA ++certificates or CA public keys at all, this message can not be ++encrypted and the response must be authenticated by out-of-band means. ++These certs are obtained by means of an HTTP GET message. To get the ++CA certificate, the requester does a "HTTP GET" with a URL that ++identifies a CGI script on the server and an optional CA issuer ++identifier as the parameter to the CGI script. The response is either ++a single X.509 CA certificate ("CA mode"), or a PKCS7 message ++containing the CA certificate and RA certificates ("RA mode"). The ++client can determine which mode the CA operates in by which response ++it gets. Once the CA certificate is received by the requester, a ++fingerprint is generated using either the SHA-1 or the MD5 hash ++algorithm on the whole CA certificate. If the requester does not have ++a certificate path to a trusted CA certificate, this fingerprint may ++be used to verify the certificate, by some positive out-of-band means, ++such as a phone call. ++ ++5.5.1 GetCACert HTTP Message Format ++ "GET" CGI-PATH CGI-PROG "?operation=GetCACert" "&message=" CA-IDENT ++ where: ++ CGI-PATH defines the actual CGI path to invoke the CGI program ++ which parses the request. ++ CGI-PROG is set to be the string "pkiclient.exe" and this is ++ expected to be the program that the CA will use to handle the ++ SCEP transactions. ++ CA-IDENT is any string which is understood by the CA. ++ For example, it could be a domain name like ietf.org. ++ If a certificate authority has multiple CA certificates ++ this field can be used to distinguish which is required. ++ Otherwise it may be ignored. ++ ++5.5.2 Response ++ ++The response for GetCACert is different between the case where the CA ++directly communicated with the requester during the enrollment, and the ++case where a RA exists and the requester communicates with the RA ++during the enrollment. ++ ++5.5.2.1 CA Certificate Only Response ++ ++A binary X.509 CA certificate is sent back as a MIME object with a ++Content-Type of application/x-x509-ca-cert. ++ ++5.5.2.2 CA and RA Certificates Response ++ ++When an RA exists, both CA and RA certificates must be sent back in ++the response to the GetCACert request. The RA certificate(s) must be ++signed by the CA. A certificates-only PKCS#7 SignedData is used to ++carry the certificates to the requester, with a Content-Type of ++application/x-x509-ca-ra-cert. ++ ++ Liu/Madson/McGrew/Nourse [Page 32] ++ ++5.5.3 Get Next Certificate Authority Certificate ++ ++5.5.3.1 GetNextCACert HTTP Message Format ++ "GET" CGI-PATH CGI-PROG "?operation=GetNextCACert" "&message=" CA-IDENT ++ ++The response to this message is a PKCS#7 certificates-only message containing ++a CA certificate (and possibly RA certificates) to be used when the current CA ++certificate expires, signed with the current CA cert (or RA certificate, if ++the CA is in RA mode. Note that a PKCS#7 is returned even in CA mode. ++ ++5.5.3.2 GetCACaps HTTP Message Format ++ "GET" CGI-PATH CGI-PROG "?operation=GetCACaps" "&message=" CA-IDENT ++ ++This message requests capabilities from CA. The response is a list of ++text capabilities, as defined in Appendix F. Support for this message ++is optional, but if it is not supported, the client should assume that ++none of the capabilities in Appendix F are supported. ++ ++5.6 Get Certificate Authority Certificate Chain ++ ++GetCACertChain provides a way to get the entire certificate chain. ++ ++5.6.1 GetCACertChain HTTP Message Format ++ ++ "GET" CGI-SCRIPT "?" "operation=GetCACertChain" "&" "message" CA-IDENT ++ where CGI-SCRIPT and CA-IDENT are as described for GetCACert. ++ ++5.6.2 Response ++ ++The response for GetCACertChain is a certificates-only PKCS#7 SignedData ++to carry the certificates to the requester, with a Content-Type of ++application/x-x509-ca-ra-cert-chain. ++ ++5.6.3 Backwards Compatability ++ ++Versions of SCEP prior to revision 3 do not support GetCACertChain. ++Certificate Authorities written to these prior versions will not be ++able to process the message and may return an HTML error. ++ ++To avoid this, clients should send the GetCACert message first. If the ++returned certificate is self-signed or is signed by a Certificate ++Authority that is trusted by the client, then it is not necessary to ++send the GetCACertChain message and it should not be sent. ++ ++If a Certificate Authority is configured with a certificate that is ++not either self-signed or has a self-signed issuer, then it should ++support this message. In other words, it should be supported if the ++CA hierarchy is more than two-deep. ++ ++An old CA in a two-deep hierarchy might still get this message from ++a client if the client did not trust either that CA or its issuer. ++In that event, the certificate cannot be trusted anyway. In any case ++the CA must not crash or hang upon the receipt of the message and the ++client must be able to handle whatever error is returned by the CA, ++including an HTML error or an ungraceful disconnect. ++ ++ Liu/Madson/McGrew/Nourse [Page 33] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++The following is the ASN.1 definition of Cert-Only PKCS#7: ++ ++ certOnly SignedData ::= { ++ version 1 ++ digestAlgorithm {iso(1) member-body(2) US(840) rsadsi(113549) ++ digestAlgorithm(2) 5} ++ ++contentInfo { ++ contentType {pkcs-7 1} -- data content identifier ++ content -- NULL ++ } ++ certificates -- the RA and CA certificates. ++ } ++ ++ CARACerts PKIMessage ::= { -- special pki message sent in the clear ++ contentType {pkcs-7 2} ++ content certOnly ++ } ++ ++ ++6.0 Security Considerations ++ ++This entire document is about security. Common security considerations ++such as keeping private keys truly private and using adequate lengths ++for symmetric and asymmetric keys must be followed in order to maintain ++the security of this protocol. ++ ++ ++7.0 Intellectual Property ++ ++This protcol includes the optional use of Certificate Revocation List ++Distribution Point (CRLDP) technology, which is a patented technology ++of Entrust Technologies, Inc. (Method for Efficient Management of ++Certificate Revocation Lists and Update Information (U.S. Patent ++5,699,431)). Please contact Entrust Technologies, Inc. ++(www.entrust.com) for more information on licensing CRLDP technology. ++ ++ ++8.0 References ++ ++[PKCS7] Kaliski, B., "PKCS #7: Cryptographic Message Syntax Version ++1.5", RFC 2315, March 1998. ++ ++[PKCS10] Kaliski, B., "PKCS #10: Certification Request Syntax Version ++1.5", RFC 2314, March 1998. ++ ++[RFC2459] Housley, R., ec. al., "Internet X.509 Public Key ++Infrastructure Certificate and CRL Profile", RFC 2459, January 1999. ++ ++ ++ ++ ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 34] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++Appendix A: Cisco Requester Subject Name Definition ++ ++The ip address and the FQDN of a SCEP client should be included in the ++V3 extension subjectAltName. When the subjectAltName extension attribute ++is present, both the subjectAltName fields and the subjectName field could ++have the IP address and the FQDN information. ++ ++When the X.500 directory is used by the CA to define the name space, the ++subject name defined above become a RDN which is part of DN binded to ++the requester's public key in the certificate. ++ ++ ++A sample of DN assigned by Entrust CA is given below (assume the same ++ciscoRouterAlice is used as the requester defined subject name): ++ ++ OU = InteropTesting, O = Entrust Technologies, C = CA ++ RDN = {"alice.cisco.com", "172.21.114.67", "22334455"} ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 35] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++Appendix B: IPSEC Client Enrollment Certificate Request ++ ++The following is the certificate enrollment request (PKCS#10) as created ++by Cisco VPN Client: ++ ++-----END NEW CERTIFICATE REQUEST----- ++ 0 30 439: SEQUENCE { ++ 4 30 288: SEQUENCE { ++ 8 02 1: INTEGER 0 ++ 11 30 57: SEQUENCE { ++ 13 31 55: SET { ++ 15 30 53: SEQUENCE { ++ 17 06 3: OBJECT IDENTIFIER commonName (2 5 4 3) ++ 22 13 46: PrintableString ++ : 'For Xiaoyi, IPSEC attrs in alternate name ++ extn' ++ : } ++ : } ++ : } ++ 70 30 158: SEQUENCE { ++ 73 30 13: SEQUENCE { ++ 75 06 9: OBJECT IDENTIFIER rsaEncryption (1 2 840 113549 1 ++ 1 1) ++ 86 05 0: NULL ++ : } ++ 88 03 140: BIT STRING 0 unused bits ++ : 30 81 88 02 81 80 73 DB 1D D5 65 AA EF C7 D4 8E ++ : AA 6E EB 46 AC 91 2A 0F 50 51 17 AD 50 A2 2A F2 ++ : CE BE F1 E4 22 8C D7 61 A1 6C 87 61 62 92 CB A6 ++ : 80 EA B4 0F 09 9D 18 5F 39 A3 02 0E DB 38 4C E4 ++ : 8A 63 2E 72 8B DC BE 9E ED 6C 1A 47 DE 13 1B 0F ++ : 83 29 4D 3E 08 86 FF 08 2B 43 09 EF 67 A7 6B EA ++ : 77 62 30 35 4D A9 0F 0F DF CC 44 F5 4D 2C 2E 19 ++ : E8 63 94 AC 84 A4 D0 01 E1 E3 97 16 CD 86 64 18 ++ : [ Another 11 bytes skipped ] ++ : } ++ 231 A0 63: [0] { ++ 233 30 61: SEQUENCE { ++ 235 06 9: OBJECT IDENTIFIER extensionReq (1 2 840 113549 1 9 ++ 14) ++ 246 31 48: SET { ++ 248 30 46: SEQUENCE { ++ 250 30 44: SEQUENCE { ++ 252 06 3: OBJECT IDENTIFIER subjectAltName (2 5 29 17) ++ 257 04 37: OCTET STRING ++ 30 23 87 04 01 02 03 04 81 0D 65 6D 61 69 ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 36] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ 6C 40 69 72 65 2E 63 6F 6D 82 0C 66 71 64 ++ 6E 2E 69 72 65 2E 63 6F 6D ++ : } ++ : } ++ : } ++ : } ++ : } ++ : } ++ ++ 296 30 13: SEQUENCE { ++ 298 06 9: OBJECT IDENTIFIER md5withRSAEncryption (1 2 840 113549 ++ 1 1 4) ++ 309 05 0: NULL ++ : } ++ 311 03 129: BIT STRING 0 unused bits ++ : 19 60 55 45 7F 72 FD 4E E5 3F D2 66 B0 77 13 9A ++ : 87 86 75 6A E1 36 C6 B6 21 71 68 BD 96 F0 B4 60 ++ : 95 8F 12 F1 65 33 16 FD 46 8A 63 19 90 40 B4 B7 ++ : 2C B5 AC 63 17 50 28 F0 CD A4 F0 00 4E D2 DE 6D ++ : C3 4F F5 CB 03 4D C8 D8 31 5A 7C 01 47 D2 2B 91 ++ : B5 48 55 C8 A7 0B DD 45 D3 4A 8D 94 04 3A 6C B0 ++ : A7 1D 64 74 AB 8A F7 FF 82 C7 22 0A 2A 95 FB 24 ++ : 88 AA B6 27 83 C1 EC 5E A0 BA 0C BA 2E 6D 50 C7 ++ : } ++ ++ ++Appendix C: Private OID Definitions ++ ++The OIDs used in defining pkiStatus are VeriSign self-maintained ++OIDs. Please note, work is in progress to replace the VeriSign owned ++object identifiers with the standard object identifiers. Once the ++standarlization is completed, this documentation will be updated. ++ ++id-VeriSign OBJECT_IDENTIFIER ::= {2 16 US(840) 1 VeriSign(113733)} ++id-pki OBJECT_IDENTIFIER ::= {id-VeriSign pki(1)} ++id-attributes OBJECT_IDENTIFIER ::= {id-pki attributes(9)} ++id-messageType OBJECT_IDENTIFIER ::= {id-attributes messageType(2)} ++id-pkiStatus OBJECT_IDENTIFIER ::= {id-attributes pkiStatus(3)} ++id-failInfo OBJECT_IDENTIFIER ::= {id-attributes failInfo(4)} ++id-senderNonce OBJECT_IDENTIFIER ::= {id-attributes senderNonce(5)} ++id-recipientNonce OBJECT_IDENTIFIER ::= {id-attributes recipientNonce(6)} ++id-transId OBJECT_IDENTIFIER ::= {id-attributes transId(7)} ++id-extensionReq OBJECT_IDENTIFIER ::= {id-attributes extensionReq(8)} ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 37] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ Appendix D: CRL Query by means of LDAP ++ ++ In order to retrieve the CRL by means of LDAP, the client needs to know ++ where in the directory it is stored. The certificate must contain a ++ CRL Distribution Point extension encoded as a DN or as an LDAP URI. ++ ++For example, the certificate issued by Entrust VPN contains ++the following DN as the CRL distribution point: ++ ++ ++ ++CN = CRL1, O = cisco, C = US. ++ ++ The asn.1 encoding of this distribution point is: ++ ++ 30 2C 31 0B 30 09 06 03 55 04 06 13 02 55 53 31 0E 30 0C 06 ++ 03 55 04 0A 13 05 63 69 73 63 6F 31 0D 30 0B 06 03 55 04 03 ++ 13 04 43 52 4C 31 ++ ++ ++The ldap form would be: ++ ++ldap://servername/CN=CRL1,O=cisco,C=US ++ ++ ++ ++Appendix E: SCEP State Transitions ++ ++SCEP state transitions are based on transaction identifier. The design ++goal is to ensure the synchronization between the CA and the requester ++under various error situations. ++ ++ ++An identity is defined by the combination of FQDN, the IP address and ++the client serial number. FQDN is the required name attribute. It is ++important to notice that, a client named as Alice.cisco.com is different ++from the client named as Alice.cisco.com plus IPAddress 117.96.1.219. ++ ++Each enrollment transaction is uniquely associated with a transaction ++identifier. Because the enrollment transaction could be interrupted by ++various errors, including network connection errors or client reboot, ++the SCEP client generates a transaction identifier by calculating a ++hash on the public key value for which the enrollment is requested. This ++retains the same transaction identifier throughout the enrollment ++transaction, even if the client has rebooted or timed out, and issues a ++new enrollment request for the same key pair. It also provides the way ++for the CA to uniquely identify a transaction in its database. At the ++requester side, it generates a transaction identifier which is included ++in PKCSReq. If the CA returns a response of PENDING, the requester ++will poll by periodically sending out GetCertInitial with the same ++transaction identifier until either a response other than PENDING is ++obtained, or the configured maximum time has elapsed. ++ ++If the client times out or the client reboots, the client administrator ++will start another enrollment transaction with the same key pair. The ++second enrollment will have the transaction idenifier. At the server ++side, instead of accepting the PKCSReq as a new enrollment request, it ++should respond as if another GetCertInitial message had been sent with ++that transaction ID. In another word, the second PKCSReq should be ++taken as a resynchronization message to allow the enrollment resume as ++the same transaction. ++ ++It is important to keep the transaction id unique since SCEP requires the ++same policy and same identity be applied to the same subject name and ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 38] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++key pair binding. In the current implementation, an SCEP client can ++only assume one identity. At any time, only one key pair, with a given ++key usage, can be associated with the same identity. ++ ++The following gives several examples of client to CA transactions. ++ ++Client actions are indicated in the left column, CA actions are ++indicated in the right column. A blank action signifies that no message ++was received. Note that these examples assume that the CA enforces the ++certificate-name uniqueness property defined in Section 2.1.1.1. ++ ++The first transaction, for example, would read like this: ++ "Client Sends PKCSReq message with transaction ID 1 to the ++ CA. The CA signs the certificate and constructs a CertRep Message ++ containing the signed certificate with a transaction ID 1. The client ++ receives the message and installs the cert locally." ++ ++Successful Enrollment Case: no manual authentication ++PKCSReq (1) ----------> CA Signs Cert ++Client Installs Cert <---------- CertRep (1) SIGNED CERT ++ ++ ++ ++Successful Enrollment Case: manual authentication required ++PKCSReq (10) ----------> Cert Request goes into Queue ++Client Polls <---------- CertRep (10) PENDING ++GetCertInitial (10) ----------> Still pending ++Client Polls <---------- CertRep (10) PENDING ++GetCertInitial (10) ----------> Still pending ++Client Polls <---------- CertRep (10) PENDING ++GetCertInitial (10) ----------> Still pending ++Client Polls <---------- CertRep (10) PENDING ++GetCertInitial (10) ----------> Cert has been signed ++Client Installs Cert <---------- CertRep (10) SIGNED CERT ++ ++ ++ ++Resync Case - CA Receive and Signs PKCSReq, Client Did not receive ++CertRep: ++ ++PKCSReq (3) ----------> Cert Request goes into queue ++ <---------- CertRep (3) PENDING ++GetCertInitial (3) ----------> ++ <---------- CertRep (3) PENDING ++GetCertInitial (3) -----------> ++ <----------- CA signed Cert and sent back ++ CertRep(3) ++(Time Out) ++PKCSReq (3) ----------> Cert already signed, sent back to ++ client ++Client Installs Cert <---------- CertRep (3) SIGNED CERT ++ ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 39] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++ ++Case when NVRAM is lost and client has to generate a new key pair, there ++is no change of name information: ++ ++PKCSReq (4) ----------> CA Signs Cert ++Client Installs Cert <---------- CertRep (4) SIGNED CERT ++(Client looses Cert) ++PKCSReq (5) ----------> There is already a valid cert with ++ this DN. ++Client Admin Revokes <---------- CertRep (5) OVERLAPPING CERT ERROR ++PKCSReq (5) ----------> CA Signs Cert ++Client Installs Cert <---------- CertRep (5) SIGNED CERT ++ ++ ++Case when client admin resync the enrollment using a different PKCS#10: ++PKCSReq (6) ----------> CA Signs Cert ++ <---------- CertRep (6) SIGNED CERT ++(Client timeout and admin starts another enrollment with a different ++ PKCS#10, but the same transaction id) ++PKCSReq (6) with different PKCS#10 ++ ----------> There is already a valid cert with ++ this entity (by checking FQDN). ++ <---------- CertRep (6) INVALID PKCS#10 CERT ++ ERROR ++Client admin either revokes the existing cert ++or corrects the error by enrolling with ++the same PKCS#10 as the first PKCSReq(6) ++PKCSReq (6) ----------> CA find the existing Cert ++Client Installs Cert <---------- CertRep (6) SIGNED CERT ++ ++ ++Resync case when server is slow in response: ++PKCSReq (13) ----------> Cert Request goes into Queue ++ <---------- CertRep (13) PENDING ++GetCertInitial ----------> Still pending ++ <---------- CertRep (13) PENDING ++GetCertInitial ----------> Still pending ++ <---------- CertRep (13) PENDING ++GetCertInitial ----------> Still pending ++ <---------- CertRep (13) PENDING ++GetCertInitial ----------> Still pending ++(TimeOut) <---------- CertRep (13) PENDING ++* Case 1 ++PKCSReq (13) ----------> Still pending ++Client polls <---------- CertRep (13) PENDING ++CertCertInitial ----------> Cert has been signed ++Client Installs Cert <---------- CertRep (13) SIGNED CERT ++* Case 2 ++PKCSReq (13) ----------> Cert has been signed ++Client Installs Cert <---------- CertRep (13) SIGNED CERT ++ ++ ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 40] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++Appendix F. CA Capabilities ++ ++The response for a GetCACaps message is a list of CA capabilities, in ++plain text, separated by characters, as follows (quotation marks ++are NOT sent): ++ ++Keyword Description ++ ++"GetNextCACert" CA Supports the GetNextCACert message. ++"POSTPKIOperation" PKIOPeration messages may be sent via HTTP POST. ++"SHA-1" CA Supports the SHA-1 hashing algorithm in ++ signatures and fingerprints. If present, the ++ client SHOULD use SHA-1. If absent, the client ++ MUST use MD5 to maintain backward compatability. ++"Renewal" Clients may use current certificate and key to ++ authenticate an enrollment request for a new ++ certificate. ++ ++A client must be able to accept and ignore any unknown keywords that ++might be sent back by a CA that implements a future version of SCEP. ++ ++Example: ++ ++GET /cgi-bin/pkiclient.exe?operation=GetCACaps&message=myca ++ ++returns: ++ ++GetNextCACert ++POSTPKIOperation ++ ++This means that the CA supports the GetNextCACert message and allows ++PKIOperation messages (PKCSreq, GetCert, GetCertInitial...) to be sent ++using HTTP POST. ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 41] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++Appendix G. Certificate Renewal and CA Key Rollover ++ ++To renew a client certificate, use the PKCSreq message and sign it with ++the existing client certificate instead of a self-signed certificate. ++ ++To obtain the new CA certificate prior to the expiration of the current ++one, use the GetNextCACert message if the CA supports it. ++ ++To obtain a new client certificate signed by the new CA certificate, ++use the new CA or RA certificate in the message envelope. ++ ++ ++Example: ++ ++GetNextCACert ----------> ++ <---------- CertRep (3) New CA certificate ++ ++PKCSReq* (1) ----------> CA Signs certificate with NEW key ++Client Stores Cert <---------- CertRep (3) Certificate issued ++for installation when from NEW CA certificate and keypair. ++existing cert expires. ++ ++ ++*enveloped for new CA or RA cert and keypair. The CA will use the ++envelope to determine which key and certificate to use to issue the ++client certificate. ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 42] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++Appendix H. PKIOperation via HTTP POST Message ++ ++If the remote CA supports it, any of the PKCS#7-encoded SCEP messages ++may be sent via HTTP POST instead of HTTP GET. This is allowed for ++any SCEP message except GetCACert, GetCACertChain, GetNextCACert, ++or GetCACaps. In this form of the message, Base 64 encoding is not ++used. ++ ++POST /cgi-bin/pkiclient.exe?operation=PKIOperation ++ ++ ++The client can verify that the CA supports SCEP messages via POST by ++looking for the "POSTPKIOperation" capability (See Appendix F). ++ ++ ++ ++ ++ ++ ++ Liu/Madson/McGrew/Nourse [Page 43] ++ ++Cisco Systems' Simple Certificate Enrollment Protocol Feb 2005 ++ ++Appendix Y. Author Contact Information ++ ++Xiaoyi Liu Cheryl Madson ++Cisco Cisco ++510 McCarthy Drive 510 McCarthy Drive ++Milpitas, CA Milpitas, CA. ++xliu@cisco.com cmadson@cisco.com ++ ++ ++David McGrew Andrew Nourse ++Cisco Cisco ++170 West Tasman Drive 510 McCarthy Drive ++San Jose, CA 94134 Milpitas, CA. ++mcgrew@cisco.com nourse@cisco.com ++ ++ ++ ++ ++Appendix Z. Copyright Section ++ ++Copyright (C) The Internet Society (2005). This document is subject ++to the rights, licenses and restrictions contained in BCP 78, and ++except as set forth therein, the authors retain all their rights. ++ ++This document and the information contained herein are provided on an ++"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS ++OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ++ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, ++INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE ++INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED ++WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. ++ ++ ++ ++ ++This draft expires 11 Aug 2005 ++ ++[End of draft-nourse-scep-11.txt] ++ +diff -uN sscep/fileutils.c sscep-ng2/fileutils.c +--- sscep/fileutils.c 2003-04-15 12:53:45.000000000 +0200 ++++ sscep-ng2/fileutils.c 2006-04-28 10:03:24.000000000 +0200 +@@ -55,8 +55,11 @@ + PKCS7 *p7; + STACK_OF(X509) *certs; + X509 *cert = NULL; ++ ASN1_BIT_STRING *cert_pubkey = NULL; + FILE *fp; + int i; ++ ASN1_BIT_STRING *request_pubkey = ++ request->req_info->pubkey->public_key; + + localcert = NULL; + +@@ -66,29 +69,44 @@ + + /* Find cert */ + for (i = 0; i < sk_X509_num(certs); i++) { +- char buffer[1024]; +- + cert = sk_X509_value(certs, i); ++ cert_pubkey = X509_get_X509_PUBKEY(cert)->public_key; ++#define fu_print_name(n) \ ++ X509_NAME_print_ex_fp(stdout,(n),0,XN_FLAG_RFC2253|ASN1_STRFLGS_SHOW_TYPE) + if (v_flag) { +- printf("%s: found certificate with\n" +- " subject: %s\n", pname, +- X509_NAME_oneline(X509_get_subject_name(cert), +- buffer, sizeof(buffer))); +- printf(" issuer: %s\n", +- X509_NAME_oneline(X509_get_issuer_name(cert), +- buffer, sizeof(buffer))); ++ printf("%s: found certificate with\n subject: ", pname); ++ fu_print_name(X509_get_subject_name(cert)); ++ printf("\n issuer: "); ++ fu_print_name(X509_get_issuer_name(cert)); ++ printf("\n"); + } +- /* The subject has to match that of our request */ +- if (!X509_NAME_cmp(X509_get_subject_name(cert), ++ /* The public keys of the request and certificate must match */ ++ if (M_ASN1_BIT_STRING_cmp(request_pubkey,cert_pubkey) != 0) { ++ if (v_flag) ++ printf(" public keys of request and certificate don't match\n"); ++ continue; ++ } ++ /* The subject has to match that of our request, ++ if the "Compare subject DN" flag is set */ ++ if (C_flag && X509_NAME_cmp(X509_get_subject_name(cert), + X509_REQ_get_subject_name(request))) { +- +- /* The subject cannot be the issuer (selfsigned) */ +- if (X509_NAME_cmp(X509_get_subject_name(cert), +- X509_get_issuer_name(cert))) { +- localcert = cert; +- break; ++ if (v_flag) { ++ printf(" certificate subject names doesn't match request subject name:\n "); ++ fu_print_name(X509_REQ_get_subject_name(request)); ++ printf("\n"); + } +- } ++ continue; ++ } ++#undef fu_print_name ++ /* The subject cannot be the issuer (selfsigned) */ ++ if (!X509_NAME_cmp(X509_get_subject_name(cert), ++ X509_get_issuer_name(cert))) { ++ if (v_flag) ++ printf(" certificate is self signed\n"); ++ continue; ++ } ++ localcert = cert; ++ break; + } + if (localcert == NULL) { + fprintf(stderr, "%s: cannot find requested certificate\n", +@@ -320,34 +338,36 @@ + /* Read local certificate (GetCert and GetCrl) */ + + void +-read_local_cert(void) { +- if (!l_flag || !(localfile = fopen(l_char, "r"))) { +- fprintf(stderr, "%s: cannot open local cert file\n", pname); ++read_cert(X509** cert, char* filename) { ++ FILE *file; ++ if (!(file = fopen(filename, "r"))) { ++ fprintf(stderr, "%s: cannot open cert file %s\n", pname, filename); + exit (SCEP_PKISTATUS_FILE); + } +- if (!PEM_read_X509(localfile, &localcert, NULL, NULL)) { +- fprintf(stderr, "%s: error while reading local cert\n", pname); ++ if (!PEM_read_X509(file, cert, NULL, NULL)) { ++ fprintf(stderr, "%s: error while reading cert %s\n", pname, filename); + ERR_print_errors_fp(stderr); + exit (SCEP_PKISTATUS_FILE); + } +- fclose(localfile); ++ fclose(file); + } + + /* Read private key */ + + void +-read_key(void) { ++read_key(EVP_PKEY** key, char* filename) { ++ FILE *file; + /* Read private key file */ +- if (!k_flag || !(keyfile = fopen(k_char, "r"))) { +- fprintf(stderr, "%s: cannot open private key file\n", pname); ++ if (!(file = fopen(filename, "r"))) { ++ fprintf(stderr, "%s: cannot open private key file %s\n", pname, filename); + exit (SCEP_PKISTATUS_FILE); + } +- if (!PEM_read_PrivateKey(keyfile, &rsa, NULL, NULL)) { +- fprintf(stderr, "%s: error while reading private key\n", pname); ++ if (!PEM_read_PrivateKey(file, key, NULL, NULL)) { ++ fprintf(stderr, "%s: error while reading private key %s\n", pname, filename); + ERR_print_errors_fp(stderr); + exit (SCEP_PKISTATUS_FILE); + } +- fclose(keyfile); ++ fclose(file); + } + + /* Read PKCS#10 request */ +diff -uN sscep/init.c sscep-ng2/init.c +--- sscep/init.c 2003-01-31 10:07:16.000000000 +0100 ++++ sscep-ng2/init.c 2006-04-28 10:11:40.000000000 +0200 +@@ -61,6 +61,9 @@ + if (!(i_char = strdup(str2))) + error_memory(); + } ++ } else if (!strncmp(str1, "CheckSubjectName", 16)) { ++ if (!strncmp(str2, "yes", 3) && !C_flag) ++ C_flag = 1; + } else if (!strncmp(str1, "CertReqFile", 11)) { + if (!r_flag) { + r_flag = 1; +@@ -114,6 +117,12 @@ + if (!(l_char = strdup(str2))) + error_memory(); + } ++ } else if (!strncmp(str1, "SignCertFile", 12)) { ++ if (!O_flag) { ++ O_flag = 1; ++ if (!(O_char = strdup(str2))) ++ error_memory(); ++ } + } else if (!strncmp(str1, "MaxPollCount", 12)) { + if (!n_flag) { + n_flag = 1; +@@ -130,6 +139,12 @@ + if (!(k_char = strdup(str2))) + error_memory(); + } ++ } else if (!strncmp(str1, "SignKeyFile", 11)) { ++ if (!K_flag) { ++ K_flag = 1; ++ if (!(K_char = strdup(str2))) ++ error_memory(); ++ } + } else if (!strncmp(str1, "SelfSignedFile", 15)) { + if (!L_flag) { + L_flag = 1; +diff -uN sscep/pkcs7.c sscep-ng2/pkcs7.c +--- sscep/pkcs7.c 2003-02-10 06:04:48.000000000 +0100 ++++ sscep-ng2/pkcs7.c 2006-04-26 13:40:34.000000000 +0200 +@@ -28,7 +28,8 @@ + PKCS7 *p7enc; + PKCS7_SIGNER_INFO *si; + STACK_OF(X509_ATTRIBUTE) *attributes; +- X509 *signer = NULL; ++ X509 *signercert = NULL; ++ EVP_PKEY *signerkey = NULL; + + /* Create a new sender nonce for all messages + * XXXXXXXXXXXXXX should it be per transaction? */ +@@ -47,7 +48,8 @@ + s->request_type_str = SCEP_REQUEST_PKCSREQ_STR; + + /* Signer cert */ +- signer = s->selfsigned; ++ signercert = s->signercert; ++ signerkey = s->signerkey; + + /* Create inner PKCS#7 */ + if (v_flag) +@@ -71,7 +73,8 @@ + s->request_type_str = SCEP_REQUEST_GETCERTINIT_STR; + + /* Signer cert */ +- signer = s->selfsigned; ++ signercert = s->signercert; ++ signerkey = s->signerkey; + + /* Create inner PKCS#7 */ + if (v_flag) +@@ -95,7 +98,8 @@ + s->request_type_str = SCEP_REQUEST_GETCERT_STR; + + /* Signer cert */ +- signer = localcert; ++ signercert = localcert; ++ signerkey = rsa; + + /* Read data in memory bio */ + databio = BIO_new(BIO_s_mem()); +@@ -115,7 +119,8 @@ + s->request_type_str = SCEP_REQUEST_GETCRL_STR; + + /* Signer cert */ +- signer = localcert; ++ signercert = localcert; ++ signerkey = rsa; + + /* Read data in memory bio */ + databio = BIO_new(BIO_s_mem()); +@@ -217,9 +222,9 @@ + } + + /* Add signer certificate and signature */ +- PKCS7_add_certificate(s->request_p7, signer); ++ PKCS7_add_certificate(s->request_p7, signercert); + if ((si = PKCS7_add_signature(s->request_p7, +- signer, rsa, sig_alg)) == NULL) { ++ signercert, signerkey, sig_alg)) == NULL) { + fprintf(stderr, "%s: error adding PKCS#7 signature\n", pname); + ERR_print_errors_fp(stderr); + exit (SCEP_PKISTATUS_P7); +@@ -317,7 +322,8 @@ + STACK_OF(X509_ATTRIBUTE) *attribs; + char *p; + unsigned char buffer[1024]; +- X509 *recipient; ++ X509 *recipientcert; ++ EVP_PKEY *recipientkey; + + /* Create new memory BIO for outer PKCS#7 */ + memorybio = BIO_new(BIO_s_mem()); +@@ -547,10 +553,14 @@ + + /* Decrypt the inner PKCS#7 */ + if ((s->request_type == SCEP_REQUEST_PKCSREQ) || +- (s->request_type == SCEP_REQUEST_GETCERTINIT)) +- recipient = s->selfsigned; +- else +- recipient = localcert; ++ (s->request_type == SCEP_REQUEST_GETCERTINIT)) { ++ recipientcert = s->signercert; ++ recipientkey = s->signerkey; ++ } ++ else { ++ recipientcert = localcert; ++ recipientkey = rsa; ++ } + if (v_flag) + printf("%s: reading inner PKCS#7\n",pname); + p7enc = d2i_PKCS7_bio(outbio, NULL); +@@ -568,7 +578,7 @@ + outbio = BIO_new(BIO_s_mem()); + if (v_flag) + printf("%s: decrypting inner PKCS#7\n",pname); +- if (PKCS7_decrypt(p7enc, rsa, recipient, outbio, 0) == 0) { ++ if (PKCS7_decrypt(p7enc, recipientkey, recipientcert, outbio, 0) == 0) { + fprintf(stderr, "%s: error decrypting inner PKCS#7\n", pname); + ERR_print_errors_fp(stderr); + exit (SCEP_PKISTATUS_P7); +diff -uN sscep/sceputils.c sscep-ng2/sceputils.c +--- sscep/sceputils.c 2003-02-09 14:18:23.000000000 +0100 ++++ sscep-ng2/sceputils.c 2006-04-25 16:27:03.000000000 +0200 +@@ -156,7 +156,8 @@ + } + + /* Copy the pointer and return */ +- s->selfsigned = cert; ++ s->signercert = cert; ++ s->signerkey = rsa; + return (0); + } + +diff -uN sscep/sscep.c sscep-ng2/sscep.c +--- sscep/sscep.c 2003-04-17 07:47:04.000000000 +0200 ++++ sscep-ng2/sscep.c 2006-04-28 11:06:16.000000000 +0200 +@@ -53,12 +53,15 @@ + } + /* Skip first parameter and parse the rest of the command */ + optind++; +- while ((c = getopt(argc, argv, "c:de:E:f:F:i:k:l:L:n:p:r:Rs:S:t:T:u:vw:")) != -1) ++ while ((c = getopt(argc, argv, "c:Cde:E:f:F:i:k:K:l:L:n:O:p:r:Rs:S:t:T:u:vw:")) != -1) + switch(c) { + case 'c': + c_flag = 1; + c_char = optarg; + break; ++ case 'C': ++ C_flag = 1; ++ break; + case 'd': + d_flag = 1; + break; +@@ -86,6 +89,10 @@ + k_flag = 1; + k_char = optarg; + break; ++ case 'K': ++ K_flag = 1; ++ K_char = optarg; ++ break; + case 'l': + l_flag = 1; + l_char = optarg; +@@ -98,6 +105,10 @@ + n_flag = 1; + n_num = atoi(optarg); + break; ++ case 'O': ++ O_flag = 1; ++ O_char = optarg; ++ break; + case 'p': + p_flag = 1; + p_char = optarg; +@@ -137,6 +148,7 @@ + w_char = optarg; + break; + default: ++ printf("argv: %s\n", argv[optind]); + usage(); + } + argc -= optind; +@@ -402,15 +414,38 @@ + case SCEP_OPERATION_GETCERT: + case SCEP_OPERATION_GETCRL: + /* Read local certificate */ +- read_local_cert(); ++ if (!l_flag) { ++ fprintf(stderr, "%s: missing local cert (-l)\n", pname); ++ exit (SCEP_PKISTATUS_FILE); ++ } ++ read_cert(&localcert, l_char); + + case SCEP_OPERATION_ENROLL: + /* + * Read in CA cert, private key and certificate + * request in global variables. + */ +- read_ca_cert(); +- read_key(); ++ read_ca_cert(); ++ ++ if (!k_flag) { ++ fprintf(stderr, "%s: missing private key (-k)\n", pname); ++ exit (SCEP_PKISTATUS_FILE); ++ } ++ read_key(&rsa, k_char); ++ ++ if ((K_flag && !O_flag) || (!K_flag && O_flag)) { ++ fprintf(stderr, "%s: -O also requires -K (and vice-versa)\n", pname); ++ exit (SCEP_PKISTATUS_FILE); ++ } ++ ++ if (K_flag) { ++ read_key(&renewal_key, K_char); ++ } ++ ++ if (O_flag) { ++ read_cert(&renewal_cert, O_char); ++ } ++ + if (operation_flag == SCEP_OPERATION_ENROLL) + read_request(); + +@@ -426,7 +461,14 @@ + if (v_flag) + fprintf(stdout, "%s: generating selfsigned " + "certificate\n", pname); +- new_selfsigned(&scep_t); ++ ++ if (! O_flag) ++ new_selfsigned(&scep_t); ++ else { ++ /* Use existing certificate */ ++ scep_t.signercert = renewal_cert; ++ scep_t.signerkey = renewal_key; ++ } + + /* Write the selfsigned certificate if requested */ + if (L_flag) { +@@ -436,7 +478,7 @@ + "file for writing\n", pname); + exit (SCEP_PKISTATUS_ERROR); + } +- if (PEM_write_X509(fp,scep_t.selfsigned) != 1) { ++ if (PEM_write_X509(fp,scep_t.signercert) != 1) { + fprintf(stderr, "%s: error while " + "writing certificate file\n", pname); + ERR_print_errors_fp(stderr); +@@ -643,7 +685,8 @@ + + void + usage() { +- fprintf(stdout, "\nsscep version %s\n\n" , VERSION); ++ fprintf(stdout, "\nsscep version %s using %s\n\n" , ++ VERSION,SSLeay_version(SSLEAY_VERSION)); + fprintf(stdout, "Usage: %s OPERATION [OPTIONS]\n" + "\nAvailable OPERATIONs are\n" + " getca Get CA/RA certificate(s)\n" +@@ -665,6 +708,8 @@ + "\nOPTIONS for OPERATION enroll are\n" + " -k Private key file\n" + " -r Certificate request file\n" ++ " -K Signature private key file, use with -O\n" ++ " -O Signature certificate (used instead of self-signed)\n" + " -l Write enrolled certificate in file\n" + " -e Use different CA cert for encryption\n" + " -L Write selfsigned certificate in file\n" +@@ -672,6 +717,8 @@ + " -T Max polling time in seconds\n" + " -n Max number of GetCertInitial requests\n" + " -R Resume interrupted enrollment\n" ++ " -C Check subject DN in the certificate return by the\n" ++ " CA (default is to match on the public key only)\n" + "\nOPTIONS for OPERATION getcert are\n" + " -k Private key file\n" + " -l Local certificate file\n" +diff -uN sscep/sscep.h sscep-ng2/sscep.h +--- sscep/sscep.h 2003-04-17 07:50:04.000000000 +0200 ++++ sscep-ng2/sscep.h 2006-04-28 10:46:49.000000000 +0200 +@@ -36,10 +36,9 @@ + #include + #include + +- + /* Global defines */ + +-#define VERSION "20030417" ++#define VERSION "20060428" + + /* SCEP operations */ + int operation_flag; +@@ -128,13 +127,13 @@ + X509 *encert; + X509 *localcert; + X509 *othercert; ++X509 *renewal_cert; + X509_REQ *request; + EVP_PKEY *rsa; ++EVP_PKEY *renewal_key; + X509_CRL *crl; + FILE *cafile; + FILE *reqfile; +-FILE *keyfile; +-FILE *localfile; + FILE *otherfile; + FILE *crlfile; + +@@ -207,7 +206,9 @@ + int recipient_nonce_len; + + /* Certificates */ +- X509 *selfsigned; ++ X509 *signercert; ++ EVP_PKEY *signerkey; ++ + EVP_PKEY *pkey; + + /* Request */ +@@ -251,13 +252,13 @@ + int init_scep(void); + + /* Read RSA private key file */ +-void read_key(void); ++void read_key(EVP_PKEY** key, char* filename); + + /* Read CA certificate file */ + void read_ca_cert(void); + + /* Read local certificate file */ +-void read_local_cert(void); ++void read_cert(X509** cert, char* filename); + + /* Read certificate request and private key */ + void read_request(void); diff --git a/net/sshfs/Makefile b/net/sshfs/Makefile new file mode 100644 index 0000000..43dd8e1 --- /dev/null +++ b/net/sshfs/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sshfs +PKG_VERSION:=2.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-fuse-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/fuse +PKG_MD5SUM:=26e9206eb5169e87e6f95f54bc005a4f + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-fuse-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/sshfs + TITLE:=SSHFS + DEPENDS:=+libfuse +fuse-utils +glib2 +libpthread + SECTION:=net + CATEGORY:=Network + SUBMENU:=Filesystem + URL:=http://fuse.sourceforge.net/ +endef + +define Package/sshfs/description + Mount remote system over sftp. +endef + +CONFIGURE_VARS += \ + SSHFS_CFLAGS=" \ + -D_FILE_OFFSET_BITS=64 \ + -I$(STAGING_DIR)/usr/include/glib-2.0 \ + -I$(STAGING_DIR)/usr/lib/glib-2.0/include \ + -I$(STAGING_DIR)/usr/include/fuse" \ + SSHFS_LIBS=" \ + -lglib-2.0 -liconv $(if $(INTL_FULL),-lintl) -lfuse -pthread -lgthread-2.0 \ + -L$(STAGING_DIR)/usr/lib" + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Package/sshfs/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sshfs $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,sshfs)) diff --git a/net/sshtunnel/Makefile b/net/sshtunnel/Makefile new file mode 100644 index 0000000..c704004 --- /dev/null +++ b/net/sshtunnel/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2010 segal.di.ubi.pt +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sshtunnel +PKG_VERSION:=3 +PKG_RELEASE:=2 + +include $(INCLUDE_DIR)/package.mk + +define Package/sshtunnel + SECTION:=net + CATEGORY:=Network + SUBMENU:=SSH + TITLE:=Manages Local and Remote openssh ssh(1) tunnels + MAINTAINER:=Nuno Goncalves + DEPENDS:=+openssh-client +endef + +define Package/sshtunnel/description +Creates openssh ssh(1) Local and Remote tunnels configured in UCI file. Can be used to allow remote connections, possibly over NATed connections or without public IP/DNS +endef + +define Package/sshtunnel/conffiles +/etc/config/sshtunnel +endef + +define Build/Compile +endef + +define Package/sshtunnel/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/initd_sshtunnel $(1)/etc/init.d/sshtunnel + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) ./files/sshtunnel.sh $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/uci_sshtunnel $(1)/etc/config/sshtunnel +endef + +$(eval $(call BuildPackage,sshtunnel)) diff --git a/net/sshtunnel/files/initd_sshtunnel b/net/sshtunnel/files/initd_sshtunnel new file mode 100644 index 0000000..3355e02 --- /dev/null +++ b/net/sshtunnel/files/initd_sshtunnel @@ -0,0 +1,184 @@ +#!/bin/sh /etc/rc.common + +START=99 +STOP=01 + +PIDFILE="/tmp/run/sshtunnel" + + +append_params() { + local p; local v; local args; + for p in $*; do + eval "v=\$$p" + [ -n "$v" ] && args="$args -o $p=$v" + done + + ARGS_options="${args# *}" +} + +append_string() { + local varname="$1"; local add="$2"; local separator="${3:- }"; local actual + eval "actual=\$$varname" + + new="${actual:+$actual$separator}$add" + eval "$varname=\$new" +} + +load_tunnelR() { + config_get section_server $1 server + [ "$server" = "$section_server" ] || return 0 # continue to read next section if this is not for the current server + let count++ # count nr of valid sections to make sure there are at least one + + config_get remoteaddress $1 remoteaddress "*" + config_get remoteport $1 remoteport + config_get localaddress $1 localaddress + config_get localport $1 localport + + [ "$remoteport" -gt 0 ] || append_string "error" "[tunnelR: $1]remoteport must be a positive integer" "; " + [ "$localport" -gt 0 ] || append_string "error" "[tunnelR: $1]localport must be a positive integer" "; " + [ -n "$error" ] && return 1 + + append_string "ARGS_tunnels" "-R $remoteaddress:$remoteport:$localaddress:$localport" +} + +load_tunnelL() { + config_get section_server $1 server + [ "$server" = "$section_server" ] || return 0 # continue to read next section if this is not for the current server + let count++ # count nr of valid sections to make sure there are at least one + + config_get localaddress $1 localaddress "*" + config_get localport $1 localport + config_get remoteaddress $1 remoteaddress + config_get remoteport $1 remoteport + + [ "$remoteport" -gt 0 ] || append_string "error" "[tunnelL: $1]remoteport must be a positive integer" "; " + [ "$localport" -gt 0 ] || append_string "error" "[tunnelL: $1]localport must be a positive integer" "; " + [ -n "$error" ] && return 1 + + append_string "ARGS_tunnels" "-L $localaddress:$localport:$remoteaddress:$remoteport" +} + +load_tunnelD() { + config_get section_server $1 server + [ "$server" = "$section_server" ] || return 0 # continue to read next section if this is not for the current server + let count++ # count nr of valid sections to make sure there are at least one + + config_get localaddress $1 localaddress "*" + config_get localport $1 localport + + [ "$remoteport" -gt 0 ] || append_string "error" "[tunnelD: $1]remoteport must be a positive integer" "; " + [ "$localport" -gt 0 ] || append_string "error" "[tunnelD: $1]localport must be a positive integer" "; " + [ -n "$error" ] && return 1 + + append_string "ARGS_tunnels" "-D $localaddress:$localport" +} + +load_server() { + server="$1" + + config_get user $1 user + config_get hostname $1 hostname + config_get retrydelay $1 retrydelay "60" + config_get PKCS11Provider $1 PKCS11Provider + config_get CheckHostIP $1 CheckHostIP + config_get Compression $1 Compression + config_get CompressionLevel $1 CompressionLevel + config_get IdentityFile $1 IdentityFile + config_get LogLevel $1 LogLevel + config_get ServerAliveCountMax $1 ServerAliveCountMax + config_get ServerAliveInterval $1 ServerAliveInterval + config_get StrictHostKeyChecking $1 StrictHostKeyChecking + config_get TCPKeepAlive $1 TCPKeepAlive + config_get VerifyHostKeyDNS $1 VerifyHostKeyDNS + + error="" + [ -n "$user" ] \ + || append_string "error" "user is not set" "; " + [ -n "$hostname" ] \ + || append_string "error" "hostname is not set" "; " + [ "$retrydelay" -ge 1 ] \ + || append_string "error" "retrydelay must be a positive integer" "; " + [ -z "$PKCS11Provider" -o -f "$PKCS11Provider" ] \ + || append_string "error" "PKCS11Provider must be a pkcs11 shared library accessible" "; " + [ -z "$CheckHostIP" -o "$CheckHostIP"="yes" -o "$CheckHostIP"="no" ] \ + || append_string "error" "CheckHostIP must be 'yes' or 'no'" "; " + [ -z "$Compression" -o "$Compression"="yes" -o "$Compression"="no" ] \ + || append_string "error" "Compression must be 'yes' or 'no'" "; " + [ -z "$CompressionLevel" ] || [ "$CompressionLevel" -ge 1 -a "$CompressionLevel" -le 9 ] \ + || append_string "error" "CompressionLevel must be between 1 and 9" "; " + [ -z "$IdentityFile" -o -f "$IdentityFile" ] \ + || append_string "error" "IdentityFile $IdentityFile not accessible" "; " + [ -z "$LogLevel" -o "$LogLevel" = "QUIET" -o "$LogLevel" = "FATAL" -o "$LogLevel" = "ERROR" -o \ + "$LogLevel" = "INFO" -o "$LogLevel" = "VERBOSE" -o "$LogLevel" = "DEBUG" -o \ + "$LogLevel" = "DEBUG1" -o "$LogLevel" = "DEBUG2" -o "$LogLevel" = "DEBUG3" ] \ + || append_string "error" "LogLevel is invalid" "; " + [ -z "$ServerAliveCountMax" ] || [ "$ServerAliveCountMax" -ge 1 ] \ + || append_string "error" "ServerAliveCountMax must be greater or equal than 1" "; " + [ -z "$ServerAliveInterval" ] || [ "$ServerAliveInterval" -ge 0 ] \ + || append_string "error" "ServerAliveInterval must be greater or equal than 0" "; " + [ -z "$StrictHostKeyChecking" -o "$StrictHostKeyChecking" = "yes" -o "$StrictHostKeyChecking" = "ask" -o "$StrictHostKeyChecking" = "no" ] \ + || append_string "error" "StrictHostKeyChecking must be 'yes', 'ask' or 'no'" "; " + [ -z "$TCPKeepAlive" -o "$TCPKeepAlive" = "yes" -o "$TCPKeepAlive" = "no" ] \ + || append_string "error" "TCPKeepAlive must be 'yes' or 'no'" "; " + [ -z "$VerifyHostKeyDNS" -o "$VerifyHostKeyDNS" = "yes" -o "$VerifyHostKeyDNS" = "no" ] \ + || append_string "error" "VerifyHostKeyDNS must be 'yes' or 'no'" "; " + + [ -n "$error" ] && { logger -p user.err -t "sshtunnel" "tunnels to $server not started - $error"; return; } + + + ARGS="" + ARGS_options="" + ARGS_tunnels="" + + count=0 + config_foreach load_tunnelR tunnelR && config_foreach load_tunnelL tunnelL && config_foreach load_tunnelD tunnelD + [ -n "$error" ] && { logger -p user.err -t "sshtunnel" "tunnels to $server not started - $error"; return; } + [ "$count" -eq 0 ] && { logger -p user.err -t "sshtunnel" "tunnels to $server not started - no tunnels defined"; return; } + + append_params CheckHostIP Compression CompressionLevel IdentityFile LogLevel PKCS11Provider ServerAliveCountMax ServerAliveInterval StrictHostKeyChecking TCPKeepAlive VerifyHostKeyDNS + ARGS="$ARGS_options -o ExitOnForwardFailure=yes -o BatchMode=yes -nN $ARGS_tunnels $user@$hostname" + + /usr/bin/sshtunnel.sh "$ARGS" "$retrydelay" "$server" & + echo $! >> "${PIDFILE}.pids" + logger -p user.info -t "sshtunnel" "started tunnels to $server (pid=$!;retrydelay=$retrydelay)" +} + +stop() { + if [ -f "$PIDFILE".pids ] + then + logger -p user.info -t "sshtunnel" "stopping all tunnels" + + while read pid + do + kill "$pid" # kill mother process first + + [ -f "${PIDFILE}_${pid}.pid" ] && { # if ssh was running, kill it also (mother process could be in retry wait) + start-stop-daemon -K -p "${PIDFILE}_${pid}.pid" + rm "${PIDFILE}_${pid}.pid" + } + + logger -p daemon.info -t "sshtunnel[$pid]" "tunnel stopped" + + done < "${PIDFILE}.pids" + + rm "${PIDFILE}.pids" + + logger -p user.info -t "sshtunnel" "all tunnels stopped" + else + logger -p user.info -t "sshtunnel" "no tunnels running" + fi +} + +start() { + [ -f "${PIDFILE}.pids" ] && stop + + config_load sshtunnel + if [ -n "$(uci show sshtunnel.@server[0])" ] # at least one server section exists + then + logger -p user.info -t "sshtunnel" "starting all tunnels" + config_foreach load_server server + logger -p user.info -t "sshtunnel" "all tunnels started" + else + logger -p user.info -t "sshtunnel" "no servers defined" + fi +} diff --git a/net/sshtunnel/files/sshtunnel.sh b/net/sshtunnel/files/sshtunnel.sh new file mode 100644 index 0000000..0ff18a6 --- /dev/null +++ b/net/sshtunnel/files/sshtunnel.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +PIDFILE="/tmp/run/sshtunnel" + +args="$1" +retrydelay="$2" +server="$3" + +while true +do + logger -p daemon.info -t "sshtunnel[$$][$server]" "connection started" + + start-stop-daemon -S -p "${PIDFILE}_${$}.pid" -mx ssh -- $args &>/tmp/log/sshtunnel_$$ + + logger -p daemon.err -t "sshtunnel[$$][$server]" < /tmp/log/sshtunnel_$$ + rm /tmp/log/sshtunnel_$$ + logger -p daemon.info -t "sshtunnel[$$][$server]" "ssh exited with code $?, retrying in $retrydelay seconds" + rm "${PIDFILE}_${$}.pid" + + sleep "$retrydelay" & wait +done diff --git a/net/sshtunnel/files/uci_sshtunnel b/net/sshtunnel/files/uci_sshtunnel new file mode 100644 index 0000000..573bbe9 --- /dev/null +++ b/net/sshtunnel/files/uci_sshtunnel @@ -0,0 +1,51 @@ +# +# password authentication is not possible, public key authentication must be used. +# set "option IdentityFile" to he file from which the identity (private key) for RSA or DSA authentication is read. +# The default is ~/.ssh/identity for protocol version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol version 2. +# ssh will also try to load certificate information from the filename obtained by appending -cert.pub to identity filenames. +# + +#config server disney +# option user mourinho +# option hostname server.disney.com +# option port 22 +# option retrydelay 1 +# option CheckHostIP yes +# option Compression no +# option CompressionLevel 6 +# option IdentityFile ~/.ssh/id_rsa +# option LogLevel INFO +# option PKCS11Provider /lib/pteidpkcs11.so +# option ServerAliveCountMax 3 +# option ServerAliveInterval 0 +# option StrictHostKeyChecking ask +# option TCPKeepAlive yes +# option VerifyHostKeyDNS yes + +# tunnelR(emote) - when the connection will be initiated to the R(emote) endpoint at +# remoteaddress:remoteport and then forwarded to localaddress:localport +# +#config tunnelR http +# option server disney +# option remoteaddress * +# option remoteport 9009 +# option localaddress 192.168.1.13 +# option localport 80 + +# tunnelL(ocal) - when the connection will be initiated to the L(ocal) endpoint at +# localaddress:localport and then forwarded to remoteaddress:remoteport +# +#config tunnelL test +# option server disney +# option localaddress * +# option localport 1022 +# option remoteaddress secretserver.disney.com +# option remoteport 22 + +# tunnelD(ynamic) - when the connection will be initiated with the SOCKS4 or SOCKS5 protocol +# to the local endpoint at localaddress:localport and then forwarded over the remote host +# +#config tunnelD proxy +# option server disney +# option localaddress * +# option localport 4055 diff --git a/net/sslcat/Makefile b/net/sslcat/Makefile new file mode 100644 index 0000000..eb7fcc0 --- /dev/null +++ b/net/sslcat/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sslcat +PKG_VERSION:=0.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME).tgz +PKG_SOURCE_URL:=http://www.bindshell.net/tools/sslcat/ +PKG_MD5SUM:=27a88e2143cbfe216e13e9493bacd32e + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/sslcat + SECTION:=net + CATEGORY:=Network + TITLE:=A netcat like utility with SSL support + URL:=http://www.bindshell.net/tools/sslcat + DEPENDS:= +libopenssl +endef + +define Package/sslcat/description + SSLCat is a simple Unix utility that reads and writes data across an + SSL enable network connection. +endef + +CONFIGURE_ARGS+= \ + --with-openssl=$(STAGING_DIR)/usr \ + +define Package/sslcat/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sslcat $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,sslcat)) diff --git a/net/sslh/Makefile b/net/sslh/Makefile new file mode 100644 index 0000000..aed2899 --- /dev/null +++ b/net/sslh/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sslh +PKG_VERSION:=1.7a +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://rutschle.net/tech/ +PKG_MD5SUM:=ee124654412198a5e11fe28acf10634d + +include $(INCLUDE_DIR)/package.mk + +define Package/sslh + SECTION:=net + CATEGORY:=Network + TITLE:=SSL/SSH multiplexer + URL:=http://rutschle.net/tech/sslh.shtml +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + USELIBWRAP= \ + all +endef + +define Package/sslh/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sslh $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,sslh)) diff --git a/net/sslh/files/sslh.config b/net/sslh/files/sslh.config new file mode 100644 index 0000000..53315fc --- /dev/null +++ b/net/sslh/files/sslh.config @@ -0,0 +1,20 @@ +package 'sslh' + +config 'sslh' 'default' + # disable or enable + option 'enable' '1' + # listen defaults to '0.0.0.0:443' (all interfaces) + # -p : + option 'listen' '' + # ssh defaults to 'localhost:22' + # -s : + option 'ssh' '' + # ssl defaults to 'localhost:442' + # -l : + option 'ssl' '' + # timeout (for ssh, then ssl is assumed) defaults to 2 + # -t + option 'timeout' '' + # verbose defaults to off + # -v + option 'verbose' '0' diff --git a/net/sslh/files/sslh.init b/net/sslh/files/sslh.init new file mode 100644 index 0000000..98b7d84 --- /dev/null +++ b/net/sslh/files/sslh.init @@ -0,0 +1,143 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009-2010 OpenWrt.org + +NAME=sslh +PROG=/usr/sbin/sslh +START=95 +PIDCOUNT=0 +EXTRA_COMMANDS="killclients" +EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself" + +sslh_start() +{ + local section="$1" + + # check if section is enabled (default) + local enabled + config_get_bool enabled "${section}" enable 1 + [ "${enabled}" -eq 0 ] && return 1 + + # increase pid file count to handle multiple instances correctly + PIDCOUNT="$(( ${PIDCOUNT} + 1 ))" + + # prepare parameters (initialise with pid file) + local args="-P /var/run/${NAME}.${PIDCOUNT}.pid" + local val + # A) listen parameter + config_get val "${section}" listen + [ -n "${val}" ] && append args "-p ${val}" + # B) ssh parameter + config_get val "${section}" ssh + [ -n "${val}" ] && append args "-s ${val}" + # C) ssl parameter + config_get val "${section}" ssl + [ -n "${val}" ] && append args "-l ${val}" + # D) timeout (for ssh, then ssl is assumed) + config_get val "${section}" timeout + [ -n "${val}" ] && append args "-t ${val}" + # E) verbose parameter + local verbosed + config_get_bool verbosed "${section}" verbose 0 + [ "${verbosed}" -ne 0 ] && append args "-v" + + # execute program and return its exit code + [ "${verbosed}" -ne 0 ] && echo "${initscript}: section ${section} started via ${PROG} ${args}" + ${PROG} ${args} + return $? +} + +start() +{ + config_load "${NAME}" + config_foreach sslh_start sslh +} + +stop() +{ + local pidfile + local rc=0 + + # killing all server processes + for pidfile in `ls /var/run/${NAME}.*.pid` + do + start-stop-daemon -q -K -s KILL -p "${pidfile}" -n "${NAME}" + [ $? -ne 0 ] && rc=1 + rm -f "${pidfile}" + done + [ -z "${pidfile}" ] && echo "${initscript}: no pid files, if you get problems with start then try killclients" + [ ${rc} -ne 0 ] && echo "${initscript}: inconsistency in pid files, if you get problems with start then try killclients" +} + +killclients() +{ + local ignore='' + local server + local pid + local connection + local proto + local address + + # if this script is run from inside a client session, then ignore that session + pid="$$" + while [ "${pid}" -ne 0 ] + do + # get parent process id + pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"` + [ "${pid}" -eq 0 ] && break + + # check if pid is connected to a client connection + # a) get established connection for pid + connection=`netstat -tupn 2>/dev/null | sed "s/[ ]\+/ /g" | grep -e "ESTABLISHED ${pid}/"` + [ -z "${connection}" ] && continue + # get connection details for foreign address + proto=`echo ${connection} | cut -d ' ' -f 1` + address=`echo ${connection} | cut -d ' ' -f 5` + + # b) get pid for foreign address, only possible if foreign address is from this machine itself + connection=`netstat -tupn 2>/dev/null | sed "s/[ ]\+/ /g" | grep -e "^${proto}.*${address}.*ESTABLISHED.*/${NAME}"` + [ -z "${connection}" ] && continue + # check that the local address (field 4) corresponds to the foreign address of the previous connection + server=`echo ${connection} | cut -d ' ' -f 4` + [ "${server}" != "${address}" ] && continue + # get pid from connection + server=`echo ${connection} | cut -d ' ' -f 7 | cut -d '/' -f 1` + + # check if client connection + grep -F -q -e "${PROG}" "/proc/${server}/cmdline" && { + append ignore "${server}" + break + } + done + + # get all server pids that should be ignored + for server in `cat /var/run/${NAME}.*.pid` + do + append ignore "${server}" + done + + # get all running pids and kill client connections + local skip + for pid in `pidof "${NAME}"` + do + # check if correct program, otherwise process next pid + grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || { + continue + } + + # check if pid should be ignored (servers, ourself) + skip=0 + for server in ${ignore} + do + if [ "${pid}" == "${server}" ] + then + skip=1 + break + fi + done + [ "${skip}" -ne 0 ] && continue + + # kill process + echo "${initscript}: Killing ${pid}..." + kill -KILL ${pid} + done +} diff --git a/net/sslh/patches/001-no_strip.patch b/net/sslh/patches/001-no_strip.patch new file mode 100644 index 0000000..cf6e53d --- /dev/null +++ b/net/sslh/patches/001-no_strip.patch @@ -0,0 +1,10 @@ +--- a/Makefile ++++ b/Makefile +@@ -24,7 +24,6 @@ all: sslh $(MAN) + + sslh: sslh.c Makefile + $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh sslh.c $(LIBS) +- strip sslh + + $(MAN): sslh.pod Makefile + pod2man --section=8 --release=$(VERSION) --center=" " sslh.pod | gzip -9 - > $(MAN) diff --git a/net/sslsniff/Makefile b/net/sslsniff/Makefile new file mode 100644 index 0000000..6f80fdd --- /dev/null +++ b/net/sslsniff/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2009 David Cooper +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sslsniff +PKG_VERSION:=0.5 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://www.thoughtcrime.org/software/sslsniff +PKG_MD5SUM:=24653e2c4f1ca94328520667eb756369 + +include $(INCLUDE_DIR)/package.mk + +define Package/sslsniff + SECTION:=net + CATEGORY:=Network + TITLE:=SSL man-in-the-middle attack + URL:=http://www.thoughtcrime.org/software/sslsniff/index.html + DEPENDS:=+libopenssl +endef + +define Package/sslsniff/description + sslsniff is designed to MITM all SSL connections on a LAN, + and dynamically generates certs for the domains that are + being accessed on the fly. The new certificates are constructed + in a certificate chain that is signed by any certificate that + you provide. +endef + +# Take this opportunity to remove the pre-packaged x86 binary +define Build/Prepare +$(call Build/Prepare/Default) + $(RM) $(PKG_BUILD_DIR)/sslsniff +endef + +MAKE_FLAGS += CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" + +define Package/sslsniff/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sslsniff $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,sslsniff)) + diff --git a/net/sslsniff/patches/01-cross-compile.patch b/net/sslsniff/patches/01-cross-compile.patch new file mode 100644 index 0000000..48bee83 --- /dev/null +++ b/net/sslsniff/patches/01-cross-compile.patch @@ -0,0 +1,24 @@ +diff -ruN sslsniff-0.5.orig/Makefile sslsniff-0.5/Makefile +--- sslsniff-0.5.orig/Makefile 2009-02-16 12:00:36.000000000 -0500 ++++ sslsniff-0.5/Makefile 2009-02-23 11:14:22.000000000 -0500 +@@ -1,4 +1,7 @@ ++CC := gcc ++CFLAGS := -g -Wall ++ + all: +- gcc -g -Wall -o sslsniff cache.c sslsniff.c network.c mx509.c mssl.c log.c -lcrypto -lssl ++ $(CC) $(CFLAGS) -o sslsniff cache.c sslsniff.c network.c mx509.c mssl.c log.c -lcrypto -lssl + clean: + rm sslsniff +\ No newline at end of file +diff -ruN sslsniff-0.5.orig/network.c sslsniff-0.5/network.c +--- sslsniff-0.5.orig/network.c 2009-02-16 12:00:36.000000000 -0500 ++++ sslsniff-0.5/network.c 2009-02-23 10:45:37.000000000 -0500 +@@ -27,6 +27,7 @@ + * SUCH DAMAGE. + */ + ++#include + #include + #include + #include diff --git a/net/sslstrip/Makefile b/net/sslstrip/Makefile new file mode 100644 index 0000000..5b2bab2 --- /dev/null +++ b/net/sslstrip/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sslstrip +PKG_VERSION:=0.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.thoughtcrime.org/software/sslstrip +PKG_MD5SUM:=7fedb46e682c2d8ef3fbc52da5e002da + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/sslstrip + SECTION:=net + CATEGORY:=Network + TITLE:=sslstrip + URL:=http://www.thoughtcrime.org/software/sslstrip/index.html + DEPENDS:=+python +twisted +twisted-web +pyopenssl +endef + +define Package/sslstrip/description + sslstrip will transparently hijack HTTP traffic on a network, + watch for HTTPS links and redirects, then map those links + into either look-alike HTTP links or homograph-similar HTTPS + links. It also supports modes for supplying a favicon which + looks like a lock icon, selective logging, and session denial. +endef + +define Build/Compile + $(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr") +endef + +define Package/sslstrip/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/sslstrip \ + $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/share/sslstrip + $(CP) \ + $(PKG_INSTALL_DIR)/usr/share/sslstrip/* \ + $(1)/usr/share/sslstrip + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) \ + $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ + $(1)$(PYTHON_PKG_DIR) +endef + +$(eval $(call BuildPackage,sslstrip)) diff --git a/net/ssltunnel/Makefile b/net/ssltunnel/Makefile new file mode 100644 index 0000000..84ddadb --- /dev/null +++ b/net/ssltunnel/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ssltunnel +PKG_VERSION:=1.16 +PKG_RELEASE:=1 + +PKG_SOURCE:=${PKG_NAME}-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.hsc.fr/ressources/outils/ssltunnel/download +PKG_MD5SUM:=4039b50566a33a4077883ea974e476d5 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ssltunnel + SECTION:=net + CATEGORY:=Network + DEPENDS:=+ppp +libopenssl + TITLE:=A PPP over SSL VPN tool + URL:=http://www.hsc.fr/ressources/outils/ssltunnel/index.html + SUBMENU:=VPN +endef + +define Package/ssltunnel/description + SSLTunnel is a client/server program to create a PPP connection over a + SSL/TLS session. + Client and server are mutually authenticated using a X509 certificate, + PPP packets are then encrypted/decrypted realtime on each side. + It's possible to use ssltunnel to connect a machine to another, a + machine with a network or two networks sets. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + , \ + BUILD_CC="$(TARGET_CC)" \ + HOSTCC="$(HOSTCC)" \ + ) +endef + +define Package/ssltunnel/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pppclient $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppwho $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppserver $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,ssltunnel)) diff --git a/net/strongswan/Makefile b/net/strongswan/Makefile new file mode 100644 index 0000000..9508e67 --- /dev/null +++ b/net/strongswan/Makefile @@ -0,0 +1,97 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=strongswan +PKG_VERSION:=2.8.11 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://download.strongswan.org/ +PKG_MD5SUM:=067189ae1586f0fdc5527c3c90448771 + +include $(INCLUDE_DIR)/package.mk + +define Package/strongswan/Default + TITLE:=strongSwan + DEPENDS:=@LINUX_2_4 + URL:=http://www.strongswan.org/ +endef + +define Package/strongswan/Default/description + strongSwan is an IPsec implementation for Linux. +endef + +define Package/strongswan +$(call Package/strongswan/Default) + SECTION:=net + CATEGORY:=Network + DEPENDS:=+kmod-strongswan +libgmp @LINUX_2_4 + TITLE+= (daemon) +endef + +define Package/strongswan/description +$(call Package/strongswan/Default/description) + This package contains the strongSwan user-land daemon. +endef + +define KernelPackage/strongswan +$(call Package/strongswan/Default) + SUBMENU:=Network Support + TITLE+= (kernel module) + DEPENDS:=@LINUX_2_4 + FILES:=$(PKG_BUILD_DIR)/linux/net/ipsec/ipsec.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,50,ipsec) +endef + +define KernelPackage/strongswan/description +$(call Package/strongswan/Default/description) + This package contains the strongSwan kernel module. +endef + +PKG_MAKE_OPTS:= \ + LINUX_RELEASE="$(LINUX_RELEASE)" \ + KERNELSRC="$(LINUX_DIR)" \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + USERCOMPILE="$(TARGET_CFLAGS) -I./linux/include $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \ + IPSECDIR="/usr/lib/ipsec" \ + INC_USRLOCAL="/usr" \ + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + $(PKG_MAKE_OPTS) \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + programs module install +endef + +define Package/strongswan/install + $(CP) $(PKG_INSTALL_DIR)/* $(1) + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DIR) $(1)/etc/cron.tick + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DIR) $(1)/etc/hotplug.d/button + $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec + $(INSTALL_BIN) ./files/ipsec.cron $(1)/etc/cron.tick/ipsec-wakeup + $(INSTALL_BIN) ./files/ipsec.iface $(1)/etc/hotplug.d/iface/65-ipsec + $(INSTALL_BIN) ./files/ipsec.button $(1)/etc/hotplug.d/button/65-ipsec + $(INSTALL_DATA) ./files/ipsec.config $(1)/etc/config/ipsec + $(INSTALL_DATA) ./files/ipsec.conf $(1)/etc/ipsec.conf + rm -rf $(1)/usr/share + rm -rf $(1)/usr/man + rm -rf $(1)/var + rm -rf $(1)/etc/rc.d + find $(1) -name \*.old | xargs rm -rf +endef + +$(eval $(call BuildPackage,strongswan)) +$(eval $(call KernelPackage,strongswan)) diff --git a/net/strongswan/files/ipsec.button b/net/strongswan/files/ipsec.button new file mode 100644 index 0000000..9bd9023 --- /dev/null +++ b/net/strongswan/files/ipsec.button @@ -0,0 +1,34 @@ +#!/bin/sh + +# snarf the code that loads the config values +# since we also load the functions, might as well save the shell calls +. /etc/init.d/ipsec + +[ -n "$IPSEC_RESET_BUTTON" -a "$BUTTON" = "$IPSEC_RESET_BUTTON" ] || exit + +if [ ! -e /var/run/pluto.pid ] ; then + + [ "$ACTION" = "pressed" ] && start + +else + + if [ "$ACTION" = "pressed" ] ; then + + stop + + elif [ "$ACTION" = "released" ] ; then + + while [ -e /var/run/pluto.pid ] ; do + sleep 1 + done + + while ps auxww | grep ipsec | grep -v grep ; do + sleep 1 + done + + start + + fi + +fi + diff --git a/net/strongswan/files/ipsec.conf b/net/strongswan/files/ipsec.conf new file mode 100644 index 0000000..8f59008 --- /dev/null +++ b/net/strongswan/files/ipsec.conf @@ -0,0 +1,34 @@ + +version 2.0 + +config setup + interfaces=%defaultroute + nat_traversal=yes # required on both ends + uniqueids=yes # makes sense on client, not server + hidetos=no + +conn %default + authby=rsasig + keyingtries=3 + keyexchange=ike + left=%defaultroute + leftrsasigkey=%cert + rightrsasigkey=%cert + dpdtimeout=30 # keepalive must arrive within + dpddelay=5 # secs before keepalives start + compress=no # breaks double nat installations + pfs=yes + +conn sample + leftca=%same + leftcert=my.certificate.crt + leftsourceip=192.168.10.1 + leftsubnet=192.168.10.0/24 + right=my.vpn.concentrator.net. + rightca=%same + rightid="C=??, ST=??, O=??, OU=??, CN=my.vpn.concentrator.net, E=root@concentrator.net" + rightsourceip=192.168.11.1 + rightsubnet=192.168.11.0/24 + dpdaction=hold + auto=start + diff --git a/net/strongswan/files/ipsec.config b/net/strongswan/files/ipsec.config new file mode 100644 index 0000000..b4865e4 --- /dev/null +++ b/net/strongswan/files/ipsec.config @@ -0,0 +1,21 @@ + +# Configure button/light behavior here. +config device + option reset_button ses + option status_start ses_orange + option status_valid ses_white + +# iptables setup for traffic to/from this host +config filter + option rule_in input_rule + option dest_in ACCEPT + option rule_out output_rule + option dest_out ACCEPT + +# iptables setup for traffic to/from another host +config forward + option rule_in forwarding_rule + option dest_in forwarding_vpn_in + option rule_out forwarding_rule + option dest_out forwarding_vpn_out + diff --git a/net/strongswan/files/ipsec.cron b/net/strongswan/files/ipsec.cron new file mode 100644 index 0000000..d8c7dcc --- /dev/null +++ b/net/strongswan/files/ipsec.cron @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/sbin/ipsec wakeup diff --git a/net/strongswan/files/ipsec.iface b/net/strongswan/files/ipsec.iface new file mode 100644 index 0000000..0716bf7 --- /dev/null +++ b/net/strongswan/files/ipsec.iface @@ -0,0 +1,8 @@ +NAME=ipsec +CTLFILE="/var/run/pluto.ctl" + +[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] || exit + +[ -e "$CTLFILE" ] || exit + +/etc/init.d/ipsec update diff --git a/net/strongswan/files/ipsec.init b/net/strongswan/files/ipsec.init new file mode 100644 index 0000000..4e8b8a2 --- /dev/null +++ b/net/strongswan/files/ipsec.init @@ -0,0 +1,101 @@ +#!/bin/sh /etc/rc.common + +START=65 + +config_cb() { + local cfg="$CONFIG_SECTION" + local cfgt + config_get cfgt "$cfg" TYPE + + case "$cfgt" in + device) + config_get IPSEC_RESET_BUTTON $cfg reset_button + config_get IPSEC_STATUS_LED_START $cfg status_start + config_get IPSEC_STATUS_LED_VALID $cfg status_valid + ;; + filter) + config_get IPSEC_UPDOWN_RULE_IN $cfg rule_in + config_get IPSEC_UPDOWN_DEST_IN $cfg dest_in + config_get IPSEC_UPDOWN_RULE_OUT $cfg rule_out + config_get IPSEC_UPDOWN_DEST_OUT $cfg dest_out + ;; + forward) + config_get IPSEC_UPDOWN_FWD_RULE_IN $cfg rule_in + config_get IPSEC_UPDOWN_FWD_DEST_IN $cfg dest_in + config_get IPSEC_UPDOWN_FWD_RULE_OUT $cfg rule_out + config_get IPSEC_UPDOWN_FWD_DEST_OUT $cfg dest_out + ;; + *) + ;; + esac +} + +config_load ipsec + +export IPSEC_RESET_BUTTON +export IPSEC_STATUS_LED_START +export IPSEC_STATUS_LED_VALID + +export IPSEC_UPDOWN_RULE_IN +export IPSEC_UPDOWN_DEST_IN +export IPSEC_UPDOWN_RULE_OUT +export IPSEC_UPDOWN_DEST_OUT + +export IPSEC_UPDOWN_FWD_RULE_IN +export IPSEC_UPDOWN_FWD_DEST_IN +export IPSEC_UPDOWN_FWD_RULE_OUT +export IPSEC_UPDOWN_FWD_DEST_OUT + + +start() { + + [ -f /etc/ipsec.conf ] || exit + [ -e /var/run/starter.pid ] && exit + + /usr/sbin/ipsec _showstatus start + + # stuff the dnsmasq cache in case dns is on our own subnet + for peer in `grep left= /etc/ipsec.conf | \ + cut -f 1 -d% | cut -f 2 -d=` ; do + ping -c 1 $peer > /dev/null 2>&1 + done + + /usr/sbin/ipsec start || exit + + # work around broken routing behavior: + # a route to the local wan segment will appear + # the need was removed in the patched _updown script + + while ! route -n | grep -q ipsec ; do sleep 1 ; done + + defint=`route -n | awk '/^0.0.0.0/{print $8}'` + defnet=`route -n | grep $defint | awk '!/^0.0.0.0/{print $1}'` + dnmask=`route -n | grep $defint | awk '!/^0.0.0.0/{print $3}'` + tundev=`route -n | grep $defnet | awk '/ipsec/{print $8}'` + + route del -net $defnet netmask $dnmask dev $tundev +} + + +stop() { + + /usr/sbin/ipsec stop 2> /dev/null + + # wait until the shutdown actually happens + while [ -e /var/run/starter.pid ] ; do + if [ -d /proc/`cat /var/run/starter.pid` ] ; then + sleep 1 + else + rm /var/run/starter.pid + fi + done + + # kill any lingering processes + while ps auxww | grep -q ipsec | grep -v init.d; do + kill `ps auxww | grep -v init.d | awk '/\/ipsec\//{print $1}'` 2> /dev/null + sleep 1 + done + + ipsec _showstatus stop +} + diff --git a/net/strongswan/patches/100-ar-fixes.patch b/net/strongswan/patches/100-ar-fixes.patch new file mode 100644 index 0000000..2e9d780 --- /dev/null +++ b/net/strongswan/patches/100-ar-fixes.patch @@ -0,0 +1,81 @@ +Index: strongswan-2.8.2/lib/libcrypto/libaes/Makefile +=================================================================== +--- strongswan-2.8.2.orig/lib/libcrypto/libaes/Makefile 2007-06-04 13:23:04.777007680 +0200 ++++ strongswan-2.8.2/lib/libcrypto/libaes/Makefile 2007-06-04 13:23:04.873992936 +0200 +@@ -25,10 +25,8 @@ + + $(BLIB): $(LIBOBJ) + /bin/rm -f $(BLIB) +- ar cr $(BLIB) $(LIBOBJ) +- -if test -s /bin/ranlib; then /bin/ranlib $(BLIB); \ +- else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(BLIB); \ +- else exit 0; fi; fi ++ $(AR) cr $(BLIB) $(LIBOBJ) ++ $(RANLIB) $(BLIB) + + testx: test_main_mac.o $(BLIB) + $(CC) -o $@ $^ +Index: strongswan-2.8.2/lib/libcrypto/libblowfish/Makefile +=================================================================== +--- strongswan-2.8.2.orig/lib/libcrypto/libblowfish/Makefile 2007-06-04 13:23:04.783006768 +0200 ++++ strongswan-2.8.2/lib/libcrypto/libblowfish/Makefile 2007-06-04 13:23:04.873992936 +0200 +@@ -58,7 +58,7 @@ + lib: $(LIB) + + $(LIB): $(LIBOBJ) +- $(AR) $(LIB) $(LIBOBJ) ++ $(AR) -r $(LIB) $(LIBOBJ) + $(RANLIB) $(LIB) + + # elf +Index: strongswan-2.8.2/lib/libcrypto/libserpent/Makefile +=================================================================== +--- strongswan-2.8.2.orig/lib/libcrypto/libserpent/Makefile 2007-06-04 13:23:04.790005704 +0200 ++++ strongswan-2.8.2/lib/libcrypto/libserpent/Makefile 2007-06-04 13:23:04.873992936 +0200 +@@ -8,10 +8,8 @@ + + $(BLIB): $(LIBOBJ) + /bin/rm -f $(BLIB) +- ar cr $(BLIB) $(LIBOBJ) +- -if test -s /bin/ranlib; then /bin/ranlib $(BLIB); \ +- else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(BLIB); \ +- else exit 0; fi; fi ++ $(AR) cr $(BLIB) $(LIBOBJ) ++ $(RANLIB) $(BLIB) + + test: test_main.o $(BLIB) + $(CC) -o $@ $^ +Index: strongswan-2.8.2/lib/libcrypto/libsha2/Makefile +=================================================================== +--- strongswan-2.8.2.orig/lib/libcrypto/libsha2/Makefile 2007-06-04 13:23:04.796004792 +0200 ++++ strongswan-2.8.2/lib/libcrypto/libsha2/Makefile 2007-06-04 13:23:04.874992784 +0200 +@@ -9,10 +9,8 @@ + + $(BLIB): $(LIBOBJ) + /bin/rm -f $(BLIB) +- ar cr $(BLIB) $(LIBOBJ) +- -if test -s /bin/ranlib; then /bin/ranlib $(BLIB); \ +- else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(BLIB); \ +- else exit 0; fi; fi ++ $(AR) cr $(BLIB) $(LIBOBJ) ++ $(RANLIB) $(BLIB) + + test: test_main.o $(BLIB) + $(CC) -o $@ $^ +Index: strongswan-2.8.2/lib/libcrypto/libtwofish/Makefile +=================================================================== +--- strongswan-2.8.2.orig/lib/libcrypto/libtwofish/Makefile 2007-06-04 13:23:04.804003576 +0200 ++++ strongswan-2.8.2/lib/libcrypto/libtwofish/Makefile 2007-06-04 13:23:04.874992784 +0200 +@@ -9,10 +9,8 @@ + + $(BLIB): $(LIBOBJ) + /bin/rm -f $(BLIB) +- ar cr $(BLIB) $(LIBOBJ) +- -if test -s /bin/ranlib; then /bin/ranlib $(BLIB); \ +- else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(BLIB); \ +- else exit 0; fi; fi ++ $(AR) cr $(BLIB) $(LIBOBJ) ++ $(RANLIB) $(BLIB) + + test: test_main.o $(BLIB) + $(CC) -o $@ $^ diff --git a/net/strongswan/patches/110-make-ipsec.patch b/net/strongswan/patches/110-make-ipsec.patch new file mode 100644 index 0000000..0d2a4e6 --- /dev/null +++ b/net/strongswan/patches/110-make-ipsec.patch @@ -0,0 +1,11 @@ +Index: strongswan-2.8.2/programs/ipsec/Makefile +=================================================================== +--- strongswan-2.8.2.orig/programs/ipsec/Makefile 2007-06-04 13:23:04.756010872 +0200 ++++ strongswan-2.8.2/programs/ipsec/Makefile 2007-06-04 13:23:05.227939128 +0200 +@@ -24,5 +24,5 @@ + include ../Makefile.program + + install:: ipsec +- @$(INSTALL) $(INSTBINFLAGS) ipsec $(RCDIR)/ipsec ++ @$(INSTALL) $(INSTBINFLAGS) -D ipsec $(RCDIR)/ipsec + diff --git a/net/strongswan/patches/120-make-pluto.patch b/net/strongswan/patches/120-make-pluto.patch new file mode 100644 index 0000000..e0dd813 --- /dev/null +++ b/net/strongswan/patches/120-make-pluto.patch @@ -0,0 +1,13 @@ +Index: strongswan-2.8.2/programs/pluto/alg/Makefile +=================================================================== +--- strongswan-2.8.2.orig/programs/pluto/alg/Makefile 2007-06-04 13:23:04.734014216 +0200 ++++ strongswan-2.8.2/programs/pluto/alg/Makefile 2007-06-04 13:23:05.416910400 +0200 +@@ -20,7 +20,7 @@ + include Config.ike_alg + + LIBCRYPTO:=../../../lib/libcrypto +-ALLFLAGS=$(CPPFLAGS) $(CFLAGS) -I .. -I- -I ../../../linux/include -I $(LIBCRYPTO) ++ALLFLAGS=$(CPPFLAGS) $(CFLAGS) -I .. -I- -I ../../../linux/include -I $(LIBCRYPTO) $(USERCOMPILE) + LIBALG := libalg.o + + all : $(LIBALG) diff --git a/net/strongswan/patches/130-make-starter.patch b/net/strongswan/patches/130-make-starter.patch new file mode 100644 index 0000000..93888ab --- /dev/null +++ b/net/strongswan/patches/130-make-starter.patch @@ -0,0 +1,21 @@ +Index: strongswan-2.8.2/programs/starter/Makefile +=================================================================== +--- strongswan-2.8.2.orig/programs/starter/Makefile 2007-06-04 13:23:04.711017712 +0200 ++++ strongswan-2.8.2/programs/starter/Makefile 2007-06-04 13:23:06.227787128 +0200 +@@ -16,7 +16,6 @@ + FREESWANSRCDIR?=$(shell cd ../..; pwd) + include ${FREESWANSRCDIR}/Makefile.inc + +-LD=$(CC) + RM=rm + LEX=flex + BISON=bison +@@ -59,7 +58,7 @@ + all: starter + + starter: $(OBJS) $(FREESWANLIB) +- $(LD) $(LDFLAGS) -o starter $(OBJS) $(LIBS) ++ $(CC) $(LDFLAGS) -o starter $(OBJS) $(LIBS) + + lex.yy.c: parser.tab.c parser.l parser.y parser.h + $(LEX) parser.l diff --git a/net/strongswan/patches/200-wakeup-showstatus.patch b/net/strongswan/patches/200-wakeup-showstatus.patch new file mode 100644 index 0000000..731f83c --- /dev/null +++ b/net/strongswan/patches/200-wakeup-showstatus.patch @@ -0,0 +1,234 @@ +Index: strongswan-2.8.2/programs/Makefile +=================================================================== +--- strongswan-2.8.2.orig/programs/Makefile 2007-06-04 13:23:04.661025312 +0200 ++++ strongswan-2.8.2/programs/Makefile 2007-06-04 13:23:06.414758704 +0200 +@@ -22,7 +22,7 @@ + SUBDIRS+=_realsetup _secretcensor _startklips _updown _updown_espmark + SUBDIRS+=auto barf ipsec look manual ranbits secrets starter + SUBDIRS+=rsasigkey send-pr setup showdefaults showhostkey calcgoo mailkey +-SUBDIRS+=ikeping examples openac scepclient ++SUBDIRS+=ikeping examples openac scepclient _showstatus wakeup + + ifeq ($(USE_LWRES),true) + SUBDIRS+=lwdnsq +Index: strongswan-2.8.2/programs/_showstatus/Makefile +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ strongswan-2.8.2/programs/_showstatus/Makefile 2007-06-04 13:23:06.414758704 +0200 +@@ -0,0 +1,22 @@ ++# Makefile for miscelaneous programs ++# Copyright (C) 2002 Michael Richardson ++# ++# 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. See . ++# ++# 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. ++# ++# RCSID $Id: Makefile,v 1.3 2006/04/17 06:48:49 as Exp $ ++ ++FREESWANSRCDIR=../.. ++include ${FREESWANSRCDIR}/Makefile.inc ++ ++PROGRAM=_showstatus ++PROGRAMDIR=${LIBDIR} ++ ++include ../Makefile.program +Index: strongswan-2.8.2/programs/_showstatus/_showstatus.8 +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ strongswan-2.8.2/programs/_showstatus/_showstatus.8 2007-06-04 13:23:06.414758704 +0200 +@@ -0,0 +1,23 @@ ++.TH _showstatus 8 "03 Feb 2007" ++.\" ++.\" RCSID $Id: _showstatus.8 ++.\" ++.SH NAME ++ipsec _showstatus \- give state feedback via led or other method ++.SH SYNOPSIS ++.I _showstatus ++is invoked by _updown to trigger led's, or other distribution ++or platform specific behavior. Presently, the SES button is ++supported as a status light on OpenWRT platforms. The button ++is configurable by environment variable: ++-B IPSEC_STATUS_LED_START ++defaults to ses_orange, and ++-B IPSEC_STATUS_LED_VALID ++defaults to ses_white. ++.SH "SEE ALSO" ++ipsec(8), ipsec_updown(8). ++.SH HISTORY ++Man page written for the Linux strongSwan project ++by Kevin Cody Jr. Original manpage for _updown by Michael Richardson. ++Original program written by Henry Spencer. Extended for the Linux strongSwan ++project by Andreas Steffen. +Index: strongswan-2.8.2/programs/_showstatus/_showstatus.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ strongswan-2.8.2/programs/_showstatus/_showstatus.in 2007-06-04 13:23:06.414758704 +0200 +@@ -0,0 +1,70 @@ ++#! /bin/sh ++# ++# Copyright (C) 2007 Kevin Cody Jr. ++# ++# 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. See . ++# ++# 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. ++# ++# RCSID $Id: _showstatus.in ++ ++ ++LED_START=$IPSEC_STATUS_LED_START ++LED_VALID=$IPSEC_STATUS_LED_VALID ++ ++[ -z "$LED_START" ] && LED_START="ses_orange" ++[ -z "$LED_VALID" ] && LED_VALID="ses_white" ++ ++ ++setled() { ++ led=$1 ++ st=$2 ++ ++ [ -n "$led" -a -n "$st" ] || return ++ ++ if [ -w "/proc/diag/led/$led" ] ; then ++ echo "$st" > "/proc/diag/led/$led" ++ fi ++ ++ # integrate other led control methods here ++ ++} ++ ++ ++case "$1" in ++ 'start') ++ [ -n "$LED_VALID" ] && setled "$LED_START" 1 ++ [ -z "$LED_VALID" ] && setled "$LED_START" f ++ setled "$LED_VALID" 0 ++ ;; ++ 'stop') ++ setled "$LED_START" 0 ++ setled "$LED_VALID" 0 ++ ;; ++ 'valid') ++ setled "$LED_VALID" 1 ++ ;; ++ 'invalid') ++ setled "$LED_VALID" 0 ++ ;; ++ 'up') ++ [ -n "$LED_VALID" ] && setled "$LED_START" 0 ++ [ -z "$LED_VALID" ] && setled "$LED_START" 1 ++ setled "$LED_VALID" 1 ++ ;; ++ 'down') ++ [ -n "$LED_VALID" ] && setled "$LED_START" 1 ++ [ -z "$LED_VALID" ] && setled "$LED_START" f ++ setled "$LED_VALID" f ++ ;; ++ *) ++ echo "$0: unknown status $status" >&2 ++ ;; ++esac ++ +Index: strongswan-2.8.2/programs/wakeup/Makefile +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ strongswan-2.8.2/programs/wakeup/Makefile 2007-06-04 13:23:06.415758552 +0200 +@@ -0,0 +1,22 @@ ++# Makefile for miscelaneous programs ++# Copyright (C) 2002 Michael Richardson ++# ++# 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. See . ++# ++# 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. ++# ++# RCSID $Id: Makefile,v 1.3 2006/04/17 06:48:49 as Exp $ ++ ++FREESWANSRCDIR=../.. ++include ${FREESWANSRCDIR}/Makefile.inc ++ ++PROGRAM=wakeup ++PROGRAMDIR=${LIBDIR} ++ ++include ../Makefile.program +Index: strongswan-2.8.2/programs/wakeup/wakeup.8 +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ strongswan-2.8.2/programs/wakeup/wakeup.8 2007-06-04 13:23:06.415758552 +0200 +@@ -0,0 +1,16 @@ ++.TH wakeup 8 "03 Feb 2007" ++.\" ++.\" RCSID $Id: wakeup.8 ++.\" ++.SH NAME ++ipsec wakeup \- stalled and down connection detection ++.SH SYNOPSIS ++.I wakeup ++is invoked by cron and checks ipsec status, whacking as necessary. ++.SH "SEE ALSO" ++ipsec(8), ipsec_whack(8). ++.SH HISTORY ++Man page written for the Linux strongSwan project ++by Kevin Cody Jr. Original manpage for _updown by Michael Richardson. ++Original program written by Henry Spencer. Extended for the Linux strongSwan ++project by Andreas Steffen. +Index: strongswan-2.8.2/programs/wakeup/wakeup.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ strongswan-2.8.2/programs/wakeup/wakeup.in 2007-06-04 13:23:06.415758552 +0200 +@@ -0,0 +1,38 @@ ++#! /bin/sh ++# wakeup script ++# ++# Copyright (C) 2007 Kevin Cody Jr. ++# ++# 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. See . ++# ++# 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. ++# ++ ++# only applicable when ipsec is running ++[ -e /var/run/pluto.pid ] || exit ++ ++# loop through any erouted tunnels in the HOLD state ++for f in `ipsec status | awk '/erouted HOLD/{ print $2 }' | cut -f1 -d\: | cut -f2 -d\"` ; do ++ ++ # only whack if no pending events at all exists ++ ipsec status | grep STATE | grep -q $f || ++ ipsec whack --name $f --initiate --asynchronous ++ ++done ++ ++# loop through any tunnels that don't quite exist ++for f in `ipsec status | awk '/prospective erouted/{ print $2 }' | cut -f1 -d: | grep -v \# | cut -f2 -d\"` ; do ++ ++ ipsec status | grep STATE_QUICK | grep -q $f || { ++ ipsec status | grep STATE_MAIN | grep -q $f && ipsec down $f ++ ipsec up $f ++ } ++ ++done ++ diff --git a/net/strongswan/patches/210-updown.patch b/net/strongswan/patches/210-updown.patch new file mode 100644 index 0000000..d546625 --- /dev/null +++ b/net/strongswan/patches/210-updown.patch @@ -0,0 +1,662 @@ +Index: strongswan-2.8.2/programs/_updown/_updown.8 +=================================================================== +--- strongswan-2.8.2.orig/programs/_updown/_updown.8 2007-06-04 13:23:04.632029720 +0200 ++++ strongswan-2.8.2/programs/_updown/_updown.8 2007-06-04 13:23:06.656721920 +0200 +@@ -8,8 +8,23 @@ + .I _updown + is invoked by pluto when it has brought up a new connection. This script + is used to insert the appropriate routing entries for IPsec operation. +-It can also be used to insert and delete dynamic iptables firewall rules. +-The interface to the script is documented in the pluto man page. ++It also inserts and deletes dynamic iptables firewall rules. IMPORTANT! ++By default, it will ACCEPT as appropriate on the INPUT, OUTPUT, FORWARD ++tables. Most distributions will want to change that to provide more ++flexibility in their firewall configuration. ++The script looks for the environment variables ++.B IPSEC_UPDOWN_RULE_IN ++for the iptables table it should insert into, ++.B IPSEC_UPDOWN_DEST_IN ++for where the rule should -j jump to, ++.B IPSEC_UPDOWN_RULE_OUT ++.B IPSEC_UPDOWN_DEST_OUT ++for the same on outgoing packets, and ++.B IPSEC_UPDOWN_FWD_RULE_IN ++.B IPSEC_UPDOWN_FWD_DEST_IN ++.B IPSEC_UPDOWN_FWD_RULE_OUT ++.B IPSEC_UPDOWN_FWD_DEST_OUT ++respectively for packets being forwarded to/from the local networks. + .SH "SEE ALSO" + ipsec(8), ipsec_pluto(8). + .SH HISTORY +Index: strongswan-2.8.2/programs/_updown/_updown.in +=================================================================== +--- strongswan-2.8.2.orig/programs/_updown/_updown.in 2007-06-04 13:23:04.642028200 +0200 ++++ strongswan-2.8.2/programs/_updown/_updown.in 2007-06-04 13:23:06.657721768 +0200 +@@ -5,6 +5,7 @@ + # Copyright (C) 2003-2004 Tuomo Soini + # Copyright (C) 2002-2004 Michael Richardson + # Copyright (C) 2005-2006 Andreas Steffen ++# Copyright (C) 2007 Kevin Cody Jr + # + # 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 +@@ -118,20 +119,61 @@ + # restricted on the peer side. + # + +-# uncomment to log VPN connections +-VPN_LOGGING=1 +-# ++# set to /bin/true to silence log messages ++LOGGER=logger ++ + # tag put in front of each log entry: + TAG=vpn +-# ++ + # syslog facility and priority used: +-FAC_PRIO=local0.notice +-# +-# to create a special vpn logging file, put the following line into +-# the syslog configuration file /etc/syslog.conf: +-# +-# local0.notice -/var/log/vpn +-# ++FAC_PRIO=authpriv.info ++ ++ ++# in the presence of KLIPS and ipsecN interfaces do not use IPSEC_POLICY ++if [ `echo "$PLUTO_INTERFACE" | grep "ipsec"` ] ; then ++ IPSEC_POLICY_IN="" ++ IPSEC_POLICY_OUT="" ++else ++ IPSEC_POLICY="-m policy --pol ipsec --proto esp --reqid $PLUTO_REQID" ++ IPSEC_POLICY_IN="$IPSEC_POLICY --dir in" ++ IPSEC_POLICY_OUT="$IPSEC_POLICY --dir out" ++fi ++ ++# are there port numbers? ++if [ "$PLUTO_MY_PORT" != 0 ] ; then ++ S_MY_PORT="--sport $PLUTO_MY_PORT" ++ D_MY_PORT="--dport $PLUTO_MY_PORT" ++fi ++ ++if [ "$PLUTO_PEER_PORT" != 0 ] ; then ++ S_PEER_PORT="--sport $PLUTO_PEER_PORT" ++ D_PEER_PORT="--dport $PLUTO_PEER_PORT" ++fi ++ ++# import firewall behavior ++IPT_RULE_IN=$IPSEC_UPDOWN_RULE_IN ++IPT_DEST_IN=$IPSEC_UPDOWN_DEST_IN ++IPT_RULE_OUT=$IPSEC_UPDOWN_RULE_OUT ++IPT_DEST_OUT=$IPSEC_UPDOWN_DEST_OUT ++ ++# import forwarding behavior ++FWD_RULE_IN=$IPSEC_UPDOWN_FWD_RULE_IN ++FWD_DEST_IN=$IPSEC_UPDOWN_FWD_DEST_IN ++FWD_RULE_OUT=$IPSEC_UPDOWN_FWD_RULE_OUT ++FWD_DEST_OUT=$IPSEC_UPDOWN_FWD_DEST_OUT ++ ++# default firewall behavior ++[ -z "$IPT_RULE_IN" ] && IPT_RULE_IN=INPUT ++[ -z "$IPT_DEST_IN" ] && IPT_DEST_IN=ACCEPT ++[ -z "$IPT_RULE_OUT" ] && IPT_RULE_OUT=OUTPUT ++[ -z "$IPT_DEST_OUT" ] && IPT_DEST_OUT=ACCEPT ++ ++# default forwarding behavior ++[ -z "$FWD_RULE_IN" ] && FWD_RULE_IN=FORWARD ++[ -z "$FWD_DEST_IN" ] && FWD_DEST_IN=ACCEPT ++[ -z "$FWD_RULE_OUT" ] && FWD_RULE_OUT=FORWARD ++[ -z "$FWD_DEST_OUT" ] && FWD_DEST_OUT=ACCEPT ++ + + # check interface version + case "$PLUTO_VERSION" in +@@ -150,8 +192,6 @@ + case "$1:$*" in + ':') # no parameters + ;; +-iptables:iptables) # due to (left/right)firewall; for default script only +- ;; + custom:*) # custom parameters (see above CAUTION comment) + ;; + *) echo "$0: unknown parameters \`$*'" >&2 +@@ -159,345 +199,307 @@ + ;; + esac + ++ + # utility functions for route manipulation + # Meddling with this stuff should not be necessary and requires great care. ++ + uproute() { + doroute add + ip route flush cache + } ++ + downroute() { + doroute delete + ip route flush cache + } + ++upfirewall() { ++ in_rule=$1 ++ in_dest=$2 ++ out_rule=$3 ++ out_dest=$4 ++ ++ [ -n "$in_rule" -a -n "$in_dest" ] && \ ++ iptables -I $in_rule 1 \ ++ -i $PLUTO_INTERFACE \ ++ -p $PLUTO_MY_PROTOCOL \ ++ -s $PLUTO_PEER_CLIENT $S_PEER_PORT \ ++ -d $PLUTO_MY_CLIENT $D_MY_PORT \ ++ $IPSEC_POLICY_IN \ ++ -j $in_dest ++ ++ [ -n "$out_rule" -a -n "$out_dest" ] && \ ++ iptables -I $out_rule 1 \ ++ -o $PLUTO_INTERFACE \ ++ -p $PLUTO_PEER_PROTOCOL \ ++ -s $PLUTO_MY_CLIENT $S_MY_PORT \ ++ -d $PLUTO_PEER_CLIENT $D_PEER_PORT \ ++ $IPSEC_POLICY_OUT \ ++ -j $out_dest ++ ++} ++ ++downfirewall() { ++ in_rule=$1 ++ in_dest=$2 ++ out_rule=$3 ++ out_dest=$4 ++ ++ [ -n "$in_rule" -a -n "$in_dest" ] && \ ++ iptables -D $in_rule \ ++ -i $PLUTO_INTERFACE \ ++ -p $PLUTO_MY_PROTOCOL \ ++ -s $PLUTO_PEER_CLIENT $S_PEER_PORT \ ++ -d $PLUTO_MY_CLIENT $D_MY_PORT \ ++ $IPSEC_POLICY_IN \ ++ -j $in_dest ++ ++ [ -n "$out_rule" -a -n "$out_dest" ] && \ ++ iptables -D $out_rule \ ++ -o $PLUTO_INTERFACE \ ++ -p $PLUTO_PEER_PROTOCOL \ ++ -s $PLUTO_MY_CLIENT $S_MY_PORT \ ++ -d $PLUTO_PEER_CLIENT $D_PEER_PORT \ ++ $IPSEC_POLICY_OUT \ ++ -j $out_dest ++ ++} ++ + addsource() { + st=0 +- if ! ip -o route get ${PLUTO_MY_SOURCEIP%/*} | grep -q ^local +- then ++ ++ if ! ip -o route get ${PLUTO_MY_SOURCEIP%/*} | grep -q ^local ; then ++ + it="ip addr add ${PLUTO_MY_SOURCEIP%/*}/32 dev $PLUTO_INTERFACE" + oops="`eval $it 2>&1`" + st=$? +- if test " $oops" = " " -a " $st" != " 0" +- then ++ ++ if [ " $oops" = " " -a " $st" != " 0" ] ; then + oops="silent error, exit status $st" + fi +- if test " $oops" != " " -o " $st" != " 0" +- then ++ ++ if [ " $oops" != " " -o " $st" != " 0" ] ; then + echo "$0: addsource \`$it' failed ($oops)" >&2 + fi + fi ++ + return $st + } + + doroute() { + st=0 + parms="$PLUTO_PEER_CLIENT" ++ parms2="dev $PLUTO_INTERFACE" + +- parms2= +- if [ -n "$PLUTO_NEXT_HOP" ] +- then +- parms2="via $PLUTO_NEXT_HOP" +- fi +- parms2="$parms2 dev $PLUTO_INTERFACE" +- +- if [ -z "$PLUTO_MY_SOURCEIP" ] +- then +- if [ -f /etc/sysconfig/defaultsource ] +- then +- . /etc/sysconfig/defaultsource +- fi ++ if [ -z "$PLUTO_MY_SOURCEIP" ] ; then + +- if [ -f /etc/conf.d/defaultsource ] +- then +- . /etc/conf.d/defaultsource +- fi ++ [ -f /etc/sysconfig/defaultsource ] && \ ++ . /etc/sysconfig/defaultsource ++ ++ [ -f /etc/conf.d/defaultsource ] && \ ++ . /etc/conf.d/defaultsource ++ ++ [ -n "$DEFAULTSOURCE" ] && \ ++ PLUTO_MY_SOURCEIP=$DEFAULTSOURCE + +- if [ -n "$DEFAULTSOURCE" ] +- then +- PLUTO_MY_SOURCEIP=$DEFAULTSOURCE +- fi + fi + + parms3= +- if test "$1" = "add" -a -n "$PLUTO_MY_SOURCEIP" +- then ++ if [ "$1" = "add" -a -n "$PLUTO_MY_SOURCEIP" ] ; then + addsource + parms3="$parms3 src ${PLUTO_MY_SOURCEIP%/*}" + fi + +- case "$PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK" in +- "0.0.0.0/0.0.0.0") ++ if [ "$PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK" = \ ++ "0.0.0.0/0.0.0.0" ] ; then + # opportunistic encryption work around + # need to provide route that eclipses default, without + # replacing it. +- it="ip route $1 0.0.0.0/1 $parms2 $parms3 && +- ip route $1 128.0.0.0/1 $parms2 $parms3" +- ;; +- *) it="ip route $1 $parms $parms2 $parms3" +- ;; +- esac ++ it="ip route $1 0.0.0.0/1 $parms2 $parms3 && ++ ip route $1 128.0.0.0/1 $parms2 $parms3" ++ else ++ it="ip route $1 $parms $parms2 $parms3" ++ fi ++ + oops="`eval $it 2>&1`" + st=$? +- if test " $oops" = " " -a " $st" != " 0" +- then +- oops="silent error, exit status $st" +- fi +- if test " $oops" != " " -o " $st" != " 0" +- then +- echo "$0: doroute \`$it' failed ($oops)" >&2 ++ ++ if [ " $oops" = " " -a " $st" != " 0" ] ; then ++ oops="silent error, exit status $st" + fi ++ ++ if [ " $oops" != " " -o " $st" != " 0" ] ; then ++ echo "$0: doroute \`$it' failed ($oops)" >&2 ++ fi ++ + return $st + } +- +-# in the presence of KLIPS and ipsecN interfaces do not use IPSEC_POLICY +-if [ `echo "$PLUTO_INTERFACE" | grep "ipsec"` ] +-then +- IPSEC_POLICY_IN="" +- IPSEC_POLICY_OUT="" +-else +- IPSEC_POLICY="-m policy --pol ipsec --proto esp --reqid $PLUTO_REQID" +- IPSEC_POLICY_IN="$IPSEC_POLICY --dir in" +- IPSEC_POLICY_OUT="$IPSEC_POLICY --dir out" +-fi + +-# are there port numbers? +-if [ "$PLUTO_MY_PORT" != 0 ] +-then +- S_MY_PORT="--sport $PLUTO_MY_PORT" +- D_MY_PORT="--dport $PLUTO_MY_PORT" +-fi +-if [ "$PLUTO_PEER_PORT" != 0 ] +-then +- S_PEER_PORT="--sport $PLUTO_PEER_PORT" +- D_PEER_PORT="--dport $PLUTO_PEER_PORT" +-fi ++dologentry() { ++ action=$1 ++ ++ if [ "$PLUTO_PEER_CLIENT" == "$PLUTO_PEER/32" ] ; then ++ rem="$PLUTO_PEER" ++ else ++ rem="$PLUTO_PEER_CLIENT == $PLUTO_PEER" ++ fi ++ ++ if [ "$PLUTO_MY_CLIENT" == "$PLUTO_ME/32" ] ; then ++ loc="$PLUTO_ME" ++ else ++ loc="$PLUTO_ME == $PLUTO_MY_CLIENT" ++ fi ++ ++ $LOGGER -t $TAG -p $FAC_PRIO "$action $rem -- $loc ($PLUTO_PEER_ID)" ++} ++ + + # the big choice ++ + case "$PLUTO_VERB:$1" in + prepare-host:*|prepare-client:*) + # delete possibly-existing route (preliminary to adding a route) +- case "$PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK" in +- "0.0.0.0/0.0.0.0") +- # need to provide route that eclipses default, without ++ ++ if [ "$PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK" = \ ++ "0.0.0.0/0.0.0.0" ] ; then ++ # need to remove the route that eclipses default, without + # replacing it. +- parms1="0.0.0.0/1" +- parms2="128.0.0.0/1" +- it="ip route delete $parms1 2>&1 ; ip route delete $parms2 2>&1" +- oops="`ip route delete $parms1 2>&1 ; ip route delete $parms2 2>&1`" +- ;; +- *) +- parms="$PLUTO_PEER_CLIENT" +- it="ip route delete $parms 2>&1" +- oops="`ip route delete $parms 2>&1`" +- ;; +- esac +- status="$?" +- if test " $oops" = " " -a " $status" != " 0" +- then +- oops="silent error, exit status $status" ++ it="( ip route delete 0.0.0.0/1 ; ++ ip route delete 128.0.0.0/1 )" ++ else ++ it="ip route delete $PLUTO_PEER_CLIENT" ++ fi ++ ++ oops="`$it 2>&1`" ++ st="$?" ++ ++ if [ " $oops" = " " -a " $st" != " 0" ] ; then ++ oops="silent error, exit status $st" + fi ++ + case "$oops" in + *'RTNETLINK answers: No such process'*) + # This is what route (currently -- not documented!) gives + # for "could not find such a route". + oops= +- status=0 ++ st=0 + ;; + esac +- if test " $oops" != " " -o " $status" != " 0" +- then ++ ++ if [ " $oops" != " " -o " $st" != " 0" ] ; then + echo "$0: \`$it' failed ($oops)" >&2 + fi +- exit $status ++ ++ exit $st ++ + ;; + route-host:*|route-client:*) + # connection to me or my client subnet being routed ++ ++ ipsec _showstatus valid + uproute ++ + ;; + unroute-host:*|unroute-client:*) + # connection to me or my client subnet being unrouted ++ ++ ipsec _showstatus invalid + downroute ++ + ;; +-up-host:) ++up-host:*) + # connection to me coming up +- # If you are doing a custom version, firewall commands go here. ++ ++ ipsec _showstatus up ++ upfirewall $IPT_RULE_IN $IPT_DEST_IN $IPT_RULE_OUT $OUT_DEST_OUT ++ dologentry "VPN-UP" ++ + ;; +-down-host:) ++down-host:*) + # connection to me going down +- # If you are doing a custom version, firewall commands go here. +- ;; +-up-client:) +- # connection to my client subnet coming up +- # If you are doing a custom version, firewall commands go here. +- ;; +-down-client:) +- # connection to my client subnet going down +- # If you are doing a custom version, firewall commands go here. ++ ++ ipsec _showstatus down ++ downfirewall $IPT_RULE_IN $IPT_DEST_IN $IPT_RULE_OUT $OUT_DEST_OUT ++ dologentry "VPN-DN" ++ + ;; +-up-host:iptables) +- # connection to me, with (left/right)firewall=yes, coming up +- # This is used only by the default updown script, not by your custom +- # ones, so do not mess with it; see CAUTION comment up at top. +- iptables -I INPUT 1 -i $PLUTO_INTERFACE -p $PLUTO_MY_PROTOCOL \ +- -s $PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK $S_PEER_PORT \ +- -d $PLUTO_ME $D_MY_PORT $IPSEC_POLICY_IN -j ACCEPT +- iptables -I OUTPUT 1 -o $PLUTO_INTERFACE -p $PLUTO_PEER_PROTOCOL \ +- -s $PLUTO_ME $S_MY_PORT $IPSEC_POLICY_OUT \ +- -d $PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK $D_PEER_PORT -j ACCEPT +- # +- # log IPsec host connection setup +- if [ $VPN_LOGGING ] +- then +- if [ "$PLUTO_PEER_CLIENT" == "$PLUTO_PEER/32" ] +- then +- logger -t $TAG -p $FAC_PRIO \ +- "+ `echo -e $PLUTO_PEER_ID` $PLUTO_PEER -- $PLUTO_ME" +- else +- logger -t $TAG -p $FAC_PRIO \ +- "+ `echo -e $PLUTO_PEER_ID` $PLUTO_PEER_CLIENT == $PLUTO_PEER -- $PLUTO_ME" +- fi +- fi +- ;; +-down-host:iptables) +- # connection to me, with (left/right)firewall=yes, going down +- # This is used only by the default updown script, not by your custom +- # ones, so do not mess with it; see CAUTION comment up at top. +- iptables -D INPUT -i $PLUTO_INTERFACE -p $PLUTO_MY_PROTOCOL \ +- -s $PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK $S_PEER_PORT \ +- -d $PLUTO_ME $D_MY_PORT $IPSEC_POLICY_IN -j ACCEPT +- iptables -D OUTPUT -o $PLUTO_INTERFACE -p $PLUTO_PEER_PROTOCOL \ +- -s $PLUTO_ME $S_MY_PORT $IPSEC_POLICY_OUT \ +- -d $PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK $D_PEER_PORT -j ACCEPT +- # +- # log IPsec host connection teardown +- if [ $VPN_LOGGING ] +- then +- if [ "$PLUTO_PEER_CLIENT" == "$PLUTO_PEER/32" ] +- then +- logger -t $TAG -p $FAC_PRIO -- \ +- "- `echo -e $PLUTO_PEER_ID` $PLUTO_PEER -- $PLUTO_ME" +- else +- logger -t $TAG -p $FAC_PRIO -- \ +- "- `echo -e $PLUTO_PEER_ID` $PLUTO_PEER_CLIENT == $PLUTO_PEER -- $PLUTO_ME" +- fi +- fi +- ;; +-up-client:iptables) +- # connection to client subnet, with (left/right)firewall=yes, coming up +- # This is used only by the default updown script, not by your custom +- # ones, so do not mess with it; see CAUTION comment up at top. +- if [ "$PLUTO_PEER_CLIENT" != "$PLUTO_MY_SOURCEIP/32" ] +- then +- iptables -I FORWARD 1 -o $PLUTO_INTERFACE -p $PLUTO_PEER_PROTOCOL \ +- -s $PLUTO_MY_CLIENT_NET/$PLUTO_MY_CLIENT_MASK $S_MY_PORT \ +- -d $PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK $D_PEER_PORT \ +- $IPSEC_POLICY_OUT -j ACCEPT +- iptables -I FORWARD 1 -i $PLUTO_INTERFACE -p $PLUTO_MY_PROTOCOL \ +- -s $PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK $S_PEER_PORT \ +- -d $PLUTO_MY_CLIENT_NET/$PLUTO_MY_CLIENT_MASK $D_MY_PORT \ +- $IPSEC_POLICY_IN -j ACCEPT ++up-client:*) ++ # connection to client subnet coming up ++ ++ ipsec _showstatus up ++ ++ if [ "$PLUTO_MY_CLIENT" != "$PLUTO_ME/32" -a \ ++ "$PLUTO_MY_CLIENT" != "$PLUTO_MY_SOURCEIP/32" ] ; then ++ upfirewall $FWD_RULE_IN $FWD_DEST_IN $FWD_RULE_OUT $FWD_DEST_OUT + fi +- # ++ + # a virtual IP requires an INPUT and OUTPUT rule on the host + # or sometimes host access via the internal IP is needed +- if [ -n "$PLUTO_MY_SOURCEIP" -o -n "$PLUTO_HOST_ACCESS" ] +- then +- iptables -I INPUT 1 -i $PLUTO_INTERFACE -p $PLUTO_MY_PROTOCOL \ +- -s $PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK $S_PEER_PORT \ +- -d $PLUTO_MY_CLIENT_NET/$PLUTO_MY_CLIENT_MASK $D_MY_PORT \ +- $IPSEC_POLICY_IN -j ACCEPT +- iptables -I OUTPUT 1 -o $PLUTO_INTERFACE -p $PLUTO_PEER_PROTOCOL \ +- -s $PLUTO_MY_CLIENT_NET/$PLUTO_MY_CLIENT_MASK $S_MY_PORT \ +- -d $PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK $D_PEER_PORT \ +- $IPSEC_POLICY_OUT -j ACCEPT +- fi +- # +- # log IPsec client connection setup +- if [ $VPN_LOGGING ] +- then +- if [ "$PLUTO_PEER_CLIENT" == "$PLUTO_PEER/32" ] +- then +- logger -t $TAG -p $FAC_PRIO \ +- "+ `echo -e $PLUTO_PEER_ID` $PLUTO_PEER -- $PLUTO_ME == $PLUTO_MY_CLIENT" +- else +- logger -t $TAG -p $FAC_PRIO \ +- "+ `echo -e $PLUTO_PEER_ID` $PLUTO_PEER_CLIENT == $PLUTO_PEER -- $PLUTO_ME == $PLUTO_MY_CLIENT" +- fi +- fi +- ;; +-down-client:iptables) +- # connection to client subnet, with (left/right)firewall=yes, going down +- # This is used only by the default updown script, not by your custom +- # ones, so do not mess with it; see CAUTION comment up at top. +- if [ "$PLUTO_PEER_CLIENT" != "$PLUTO_MY_SOURCEIP/32" ] +- then +- iptables -D FORWARD -o $PLUTO_INTERFACE -p $PLUTO_PEER_PROTOCOL \ +- -s $PLUTO_MY_CLIENT_NET/$PLUTO_MY_CLIENT_MASK $S_MY_PORT \ +- -d $PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK $D_PEER_PORT \ +- $IPSEC_POLICY_OUT -j ACCEPT +- iptables -D FORWARD -i $PLUTO_INTERFACE -p $PLUTO_MY_PROTOCOL \ +- -s $PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK $S_PEER_PORT \ +- -d $PLUTO_MY_CLIENT_NET/$PLUTO_MY_CLIENT_MASK $D_MY_PORT \ +- $IPSEC_POLICY_IN -j ACCEPT ++ if [ -n "$PLUTO_MY_SOURCEIP" -o -n "$PLUTO_HOST_ACCESS" ] ; then ++ upfirewall $IPT_RULE_IN $IPT_DEST_IN $IPT_RULE_OUT $OUT_DEST_OUT ++ fi ++ ++ dologentry "VPN-UP" ++ ++ ;; ++down-client:*) ++ # connection to client subnet going down ++ ++ ipsec _showstatus down ++ ++ if [ "$PLUTO_MY_CLIENT" != "$PLUTO_ME/32" -a \ ++ "$PLUTO_MY_CLIENT" != "$PLUTO_MY_SOURCEIP/32" ] ; then ++ downfirewall $FWD_RULE_IN $FWD_DEST_IN $FWD_RULE_OUT $FWD_DEST_OUT + fi +- # ++ + # a virtual IP requires an INPUT and OUTPUT rule on the host + # or sometimes host access via the internal IP is needed +- if [ -n "$PLUTO_MY_SOURCEIP" -o -n "$PLUTO_HOST_ACCESS" ] +- then +- iptables -D INPUT -i $PLUTO_INTERFACE -p $PLUTO_MY_PROTOCOL \ +- -s $PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK $S_PEER_PORT \ +- -d $PLUTO_MY_CLIENT_NET/$PLUTO_MY_CLIENT_MASK $D_MY_PORT \ +- $IPSEC_POLICY_IN -j ACCEPT +- iptables -D OUTPUT -o $PLUTO_INTERFACE -p $PLUTO_PEER_PROTOCOL \ +- -s $PLUTO_MY_CLIENT_NET/$PLUTO_MY_CLIENT_MASK $S_MY_PORT \ +- -d $PLUTO_PEER_CLIENT_NET/$PLUTO_PEER_CLIENT_MASK $D_PEER_PORT \ +- $IPSEC_POLICY_OUT -j ACCEPT +- fi +- # +- # log IPsec client connection teardown +- if [ $VPN_LOGGING ] +- then +- if [ "$PLUTO_PEER_CLIENT" == "$PLUTO_PEER/32" ] +- then +- logger -t $TAG -p $FAC_PRIO -- \ +- "- `echo -e $PLUTO_PEER_ID` $PLUTO_PEER -- $PLUTO_ME == $PLUTO_MY_CLIENT" +- else +- logger -t $TAG -p $FAC_PRIO -- \ +- "- `echo -e $PLUTO_PEER_ID` $PLUTO_PEER_CLIENT == $PLUTO_PEER -- $PLUTO_ME == $PLUTO_MY_CLIENT" +- fi ++ if [ -n "$PLUTO_MY_SOURCEIP" -o -n "$PLUTO_HOST_ACCESS" ] ; then ++ downfirewall $IPT_RULE_IN $IPT_DEST_IN $IPT_RULE_OUT $OUT_DEST_OUT + fi ++ ++ dologentry "VPN-DN" ++ + ;; +-# +-# IPv6 +-# + prepare-host-v6:*|prepare-client-v6:*) ++ + ;; + route-host-v6:*|route-client-v6:*) + # connection to me or my client subnet being routed ++ + #uproute_v6 ++ + ;; + unroute-host-v6:*|unroute-client-v6:*) + # connection to me or my client subnet being unrouted ++ + #downroute_v6 ++ + ;; + up-host-v6:*) + # connection to me coming up + # If you are doing a custom version, firewall commands go here. ++ + ;; + down-host-v6:*) + # connection to me going down + # If you are doing a custom version, firewall commands go here. ++ + ;; + up-client-v6:) + # connection to my client subnet coming up + # If you are doing a custom version, firewall commands go here. ++ + ;; + down-client-v6:) + # connection to my client subnet going down + # If you are doing a custom version, firewall commands go here. ++ + ;; +-*) echo "$0: unknown verb \`$PLUTO_VERB' or parameter \`$1'" >&2 ++*) ++ echo "$0: unknown verb \`$PLUTO_VERB' or parameter \`$1'" >&2 + exit 1 ++ + ;; + esac ++ diff --git a/net/strongswan/patches/300-openwrt.patch b/net/strongswan/patches/300-openwrt.patch new file mode 100644 index 0000000..e249a8d --- /dev/null +++ b/net/strongswan/patches/300-openwrt.patch @@ -0,0 +1,26 @@ +Index: strongswan-2.8.2/Makefile.inc +=================================================================== +--- strongswan-2.8.2.orig/Makefile.inc 2007-06-04 13:23:04.604033976 +0200 ++++ strongswan-2.8.2/Makefile.inc 2007-06-04 13:23:06.855691672 +0200 +@@ -123,7 +123,7 @@ + # With a non-null DESTDIR, INC_RCDEFAULT will be used unless one of the + # INC_RCDIRS directories has been pre-created under DESTDIR. + INC_RCDIRS=/etc/rc.d/init.d /etc/rc.d /etc/init.d /sbin/init.d +-INC_RCDEFAULT=/etc/rc.d/init.d ++INC_RCDEFAULT=/etc/init.d + + # RCDIR is where boot/shutdown scripts go; FINALRCDIR is where they think + # will finally be (so utils/Makefile can create a symlink in BINDIR to the +Index: strongswan-2.8.2/programs/showhostkey/showhostkey.in +=================================================================== +--- strongswan-2.8.2.orig/programs/showhostkey/showhostkey.in 2007-06-04 13:23:04.612032760 +0200 ++++ strongswan-2.8.2/programs/showhostkey/showhostkey.in 2007-06-04 13:23:06.855691672 +0200 +@@ -62,7 +62,7 @@ + exit 1 + fi + +-host="`hostname --fqdn`" ++host="`cat /proc/sys/kernel/hostname`" + + awk ' BEGIN { + inkey = 0 diff --git a/net/strongswan/patches/310-make-ipsec-alg.patch b/net/strongswan/patches/310-make-ipsec-alg.patch new file mode 100644 index 0000000..d5fad3d --- /dev/null +++ b/net/strongswan/patches/310-make-ipsec-alg.patch @@ -0,0 +1,19 @@ +Index: strongswan-2.8.2/linux/net/ipsec/alg/Makefile.alg_cryptoapi +=================================================================== +--- strongswan-2.8.2.orig/linux/net/ipsec/alg/Makefile.alg_cryptoapi 2007-06-04 13:23:04.583037168 +0200 ++++ strongswan-2.8.2/linux/net/ipsec/alg/Makefile.alg_cryptoapi 2007-06-04 13:23:07.053661576 +0200 +@@ -1,10 +1,10 @@ + MOD_CRYPTOAPI := ipsec_cryptoapi.o + + ifneq ($(wildcard $(TOPDIR)/include/linux/crypto.h),) +-ALG_MODULES += $(MOD_CRYPTOAPI) +-obj-$(CONFIG_IPSEC_ALG_CRYPTOAPI) += $(MOD_CRYPTOAPI) +-static_init-func-$(CONFIG_IPSEC_ALG_CRYPTOAPI)+= ipsec_cryptoapi_init +-alg_obj-$(CONFIG_IPSEC_ALG_CRYPTOAPI) += ipsec_alg_cryptoapi.o ++#ALG_MODULES += $(MOD_CRYPTOAPI) ++#obj-$(CONFIG_IPSEC_ALG_CRYPTOAPI) += $(MOD_CRYPTOAPI) ++#static_init-func-$(CONFIG_IPSEC_ALG_CRYPTOAPI)+= ipsec_cryptoapi_init ++#alg_obj-$(CONFIG_IPSEC_ALG_CRYPTOAPI) += ipsec_alg_cryptoapi.o + else + $(warning "Linux CryptoAPI (2.4.22+ or 2.6.x) not found, not building ipsec_cryptoapi.o") + endif diff --git a/net/strongswan/patches/320-no-modprobe.patch b/net/strongswan/patches/320-no-modprobe.patch new file mode 100644 index 0000000..d8c3648 --- /dev/null +++ b/net/strongswan/patches/320-no-modprobe.patch @@ -0,0 +1,108 @@ +Index: strongswan-2.8.2/programs/starter/klips.c +=================================================================== +--- strongswan-2.8.2.orig/programs/starter/klips.c 2007-06-04 13:23:04.544043096 +0200 ++++ strongswan-2.8.2/programs/starter/klips.c 2007-06-04 13:23:07.238633456 +0200 +@@ -44,7 +44,7 @@ + unsetenv("MODPATH"); + unsetenv("MODULECONF"); + system("depmod -a >/dev/null 2>&1"); +- system("modprobe -qv ipsec"); ++ system("insmod -qv ipsec"); + } + if (stat(PROC_IPSECVERSION, &stb) == 0) + { +@@ -62,11 +62,11 @@ + /* make sure that all available crypto algorithms are loaded */ + if (stat(PROC_MODULES, &stb) == 0) + { +- system("modprobe -qv ipsec_aes"); +- system("modprobe -qv ipsec_serpent"); +- system("modprobe -qv ipsec_twofish"); +- system("modprobe -qv ipsec_blowfish"); +- system("modprobe -qv ipsec_sha2"); ++ system("insmod -qv ipsec_aes"); ++ system("insmod -qv ipsec_serpent"); ++ system("insmod -qv ipsec_twofish"); ++ system("insmod -qv ipsec_blowfish"); ++ system("insmod -qv ipsec_sha2"); + } + + starter_klips_clear(); +Index: strongswan-2.8.2/programs/starter/netkey.c +=================================================================== +--- strongswan-2.8.2.orig/programs/starter/netkey.c 2007-06-04 13:23:04.551042032 +0200 ++++ strongswan-2.8.2/programs/starter/netkey.c 2007-06-04 13:23:07.238633456 +0200 +@@ -36,7 +36,7 @@ + /* af_key module makes the netkey proc interface visible */ + if (stat(PROC_MODULES, &stb) == 0) + { +- system("modprobe -qv af_key"); ++ system("insmod -qv af_key"); + } + + /* now test again */ +@@ -52,11 +52,11 @@ + /* make sure that all required IPsec modules are loaded */ + if (stat(PROC_MODULES, &stb) == 0) + { +- system("modprobe -qv ah4"); +- system("modprobe -qv esp4"); +- system("modprobe -qv ipcomp"); +- system("modprobe -qv xfrm4_tunnel"); +- system("modprobe -qv xfrm_user"); ++ system("insmod -qv ah4"); ++ system("insmod -qv esp4"); ++ system("insmod -qv ipcomp"); ++ system("insmod -qv xfrm4_tunnel"); ++ system("insmod -qv xfrm_user"); + } + + DBG(DBG_CONTROL, +Index: strongswan-2.8.2/programs/_startklips/_startklips.in +=================================================================== +--- strongswan-2.8.2.orig/programs/_startklips/_startklips.in 2007-06-04 13:23:04.560040664 +0200 ++++ strongswan-2.8.2/programs/_startklips/_startklips.in 2007-06-04 13:23:07.238633456 +0200 +@@ -249,7 +249,7 @@ + + if test ! -f $ipsecversion && test ! -f $netkey + then +- modprobe -v af_key ++ insmod -v af_key + fi + + if test -f $netkey +@@ -257,11 +257,11 @@ + klips=false + if test -f $modules + then +- modprobe -qv ah4 +- modprobe -qv esp4 +- modprobe -qv ipcomp +- modprobe -qv xfrm4_tunnel +- modprobe -qv xfrm_user ++ insmod -qv ah4 ++ insmod -qv esp4 ++ insmod -qv ipcomp ++ insmod -qv xfrm4_tunnel ++ insmod -qv xfrm_user + fi + fi + +@@ -272,7 +272,7 @@ + setmodule + unset MODPATH MODULECONF # no user overrides! + depmod -a >/dev/null 2>&1 +- modprobe -v ipsec ++ insmod -v ipsec + fi + if test ! -f $ipsecversion + then +@@ -288,7 +288,7 @@ + do + if test -f $moduleinstplace/alg/ipsec_$alg.o + then +- modprobe ipsec_$alg ++ insmod ipsec_$alg + fi + done + fi diff --git a/net/strongswan/patches/350-make-programs.patch b/net/strongswan/patches/350-make-programs.patch new file mode 100644 index 0000000..aba9577 --- /dev/null +++ b/net/strongswan/patches/350-make-programs.patch @@ -0,0 +1,21 @@ +Index: strongswan-2.8.2/programs/Makefile +=================================================================== +--- strongswan-2.8.2.orig/programs/Makefile 2007-06-04 13:23:06.414758704 +0200 ++++ strongswan-2.8.2/programs/Makefile 2007-06-04 13:23:07.444602144 +0200 +@@ -17,12 +17,10 @@ + FREESWANSRCDIR=.. + include ${FREESWANSRCDIR}/Makefile.inc + +-SUBDIRS=spi eroute spigrp tncfg klipsdebug pf_key proc pluto +-SUBDIRS+=_confread _copyright _include _keycensor _plutoload _plutorun +-SUBDIRS+=_realsetup _secretcensor _startklips _updown _updown_espmark +-SUBDIRS+=auto barf ipsec look manual ranbits secrets starter +-SUBDIRS+=rsasigkey send-pr setup showdefaults showhostkey calcgoo mailkey +-SUBDIRS+=ikeping examples openac scepclient _showstatus wakeup ++SUBDIRS=_copyright _updown _showstatus wakeup examples ++SUBDIRS+=barf calcgoo eroute ikeping klipsdebug look mailkey manual ++SUBDIRS+=openac pf_key pluto proc ranbits rsasigkey scepclient secrets ++SUBDIRS+=showdefaults showhostkey spi spigrp starter tncfg ipsec + + ifeq ($(USE_LWRES),true) + SUBDIRS+=lwdnsq diff --git a/net/strongswan/patches/400-pluto-fix_CIRCLEQ.patch b/net/strongswan/patches/400-pluto-fix_CIRCLEQ.patch new file mode 100644 index 0000000..17c926e --- /dev/null +++ b/net/strongswan/patches/400-pluto-fix_CIRCLEQ.patch @@ -0,0 +1,149 @@ +diff -Nurp strongswan-2.8.11.orig/linux/include/circ-queue.h strongswan-2.8.11.queue/linux/include/circ-queue.h +--- strongswan-2.8.11.orig/linux/include/circ-queue.h 1970-01-01 01:00:00.000000000 +0100 ++++ strongswan-2.8.11.queue/linux/include/circ-queue.h 2009-12-02 19:11:31.414549616 +0100 +@@ -0,0 +1,131 @@ ++/* ++ * Copyright (c) 1991, 1993 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. All advertising materials mentioning features or use of this software ++ * must display the following acknowledgement: ++ * This product includes software developed by the University of ++ * California, Berkeley and its contributors. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ++ * @(#)queue.h 8.5 (Berkeley) 8/20/94 ++ * $FreeBSD: ports/misc/44bsd-more/files/queue.h,v 1.1 2001/01/06 03:41:36 hoek Exp $ ++ */ ++ ++/* ++ * Circular queue definitions. ++ */ ++#define CIRCLEQ_HEAD(name, type) \ ++struct name { \ ++ struct type *cqh_first; /* first element */ \ ++ struct type *cqh_last; /* last element */ \ ++} ++ ++#define CIRCLEQ_ENTRY(type) \ ++struct { \ ++ struct type *cqe_next; /* next element */ \ ++ struct type *cqe_prev; /* previous element */ \ ++} ++ ++/* ++ * Circular queue functions. ++ */ ++#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) ++ ++#define CIRCLEQ_FIRST(head) ((head)->cqh_first) ++ ++#define CIRCLEQ_FOREACH(var, head, field) \ ++ for((var) = (head)->cqh_first; \ ++ (var) != (void *)(head); \ ++ (var) = (var)->field.cqe_next) ++ ++#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ ++ for((var) = (head)->cqh_last; \ ++ (var) != (void *)(head); \ ++ (var) = (var)->field.cqe_prev) ++ ++#define CIRCLEQ_INIT(head) do { \ ++ (head)->cqh_first = (void *)(head); \ ++ (head)->cqh_last = (void *)(head); \ ++} while (0) ++ ++#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ ++ (elm)->field.cqe_next = (listelm)->field.cqe_next; \ ++ (elm)->field.cqe_prev = (listelm); \ ++ if ((listelm)->field.cqe_next == (void *)(head)) \ ++ (head)->cqh_last = (elm); \ ++ else \ ++ (listelm)->field.cqe_next->field.cqe_prev = (elm); \ ++ (listelm)->field.cqe_next = (elm); \ ++} while (0) ++ ++#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ ++ (elm)->field.cqe_next = (listelm); \ ++ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ ++ if ((listelm)->field.cqe_prev == (void *)(head)) \ ++ (head)->cqh_first = (elm); \ ++ else \ ++ (listelm)->field.cqe_prev->field.cqe_next = (elm); \ ++ (listelm)->field.cqe_prev = (elm); \ ++} while (0) ++ ++#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ ++ (elm)->field.cqe_next = (head)->cqh_first; \ ++ (elm)->field.cqe_prev = (void *)(head); \ ++ if ((head)->cqh_last == (void *)(head)) \ ++ (head)->cqh_last = (elm); \ ++ else \ ++ (head)->cqh_first->field.cqe_prev = (elm); \ ++ (head)->cqh_first = (elm); \ ++} while (0) ++ ++#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ ++ (elm)->field.cqe_next = (void *)(head); \ ++ (elm)->field.cqe_prev = (head)->cqh_last; \ ++ if ((head)->cqh_first == (void *)(head)) \ ++ (head)->cqh_first = (elm); \ ++ else \ ++ (head)->cqh_last->field.cqe_next = (elm); \ ++ (head)->cqh_last = (elm); \ ++} while (0) ++ ++#define CIRCLEQ_LAST(head) ((head)->cqh_last) ++ ++#define CIRCLEQ_NEXT(elm,field) ((elm)->field.cqe_next) ++ ++#define CIRCLEQ_PREV(elm,field) ((elm)->field.cqe_prev) ++ ++#define CIRCLEQ_REMOVE(head, elm, field) do { \ ++ if ((elm)->field.cqe_next == (void *)(head)) \ ++ (head)->cqh_last = (elm)->field.cqe_prev; \ ++ else \ ++ (elm)->field.cqe_next->field.cqe_prev = \ ++ (elm)->field.cqe_prev; \ ++ if ((elm)->field.cqe_prev == (void *)(head)) \ ++ (head)->cqh_first = (elm)->field.cqe_next; \ ++ else \ ++ (elm)->field.cqe_prev->field.cqe_next = \ ++ (elm)->field.cqe_next; \ ++} while (0) +diff -Nurp strongswan-2.8.11.orig/programs/pluto/connections.h strongswan-2.8.11.queue/programs/pluto/connections.h +--- strongswan-2.8.11.orig/programs/pluto/connections.h 2007-06-18 20:24:51.000000000 +0200 ++++ strongswan-2.8.11.queue/programs/pluto/connections.h 2009-12-02 19:11:02.127064115 +0100 +@@ -18,6 +18,10 @@ + #define _CONNECTIONS_H + + #include ++/* This handles the 'syntax error before "CIRCLEQ_ENTRY"' */ ++#ifndef CIRCLEQ_HEAD ++#include ++#endif + + #include "id.h" + #include "certs.h" diff --git a/net/strongswan4/Config.in b/net/strongswan4/Config.in new file mode 100644 index 0000000..18820d2 --- /dev/null +++ b/net/strongswan4/Config.in @@ -0,0 +1,52 @@ +menu "Configuration" + depends on PACKAGE_strongswan4 + +# --enable-cisco-quirks +config STRONGSWAN4_ENABLE_CISCO_QUIRKS + bool + prompt "Enable support of Cisco VPN client" + default y + +# --enable-nat-transport +config STRONGSWAN4_ENABLE_NAT_TRANSPORT + bool + prompt "Enable NAT traversal with IPsec transport mode in" + default y + +# --enable-vendor-id +config STRONGSWAN4_ENABLE_VENDOR_ID + bool + prompt "Enable sending of the strongSwan vendor ID" + default y + +# --enable-xauth-vid +config STRONGSWAN4_ENABLE_XAUTH_VID + bool + prompt "Enable sending of the XAUTH vendor ID" + default y + +# --with-random-device +config STRONGSWAN4_DEVICE_RANDOM + string + prompt "Set the device to read real random data from" + default "/dev/random" + +# --with-urandom-device +config STRONGSWAN4_DEVICE_URANDOM + string + prompt "Set the device to read pseudo random data from" + default "/dev/urandom" + +# --with-routing-table +config STRONGSWAN4_ROUTING_TABLE + string + prompt "Set the IPsec routing table ID" + default "220" + +# --with-routing-table-prio +config STRONGSWAN4_ROUTING_TABLE_PRIO + string + prompt "Set the IPsec routing table priority" + default "220" + +endmenu diff --git a/net/strongswan4/Makefile b/net/strongswan4/Makefile new file mode 100644 index 0000000..999c237 --- /dev/null +++ b/net/strongswan4/Makefile @@ -0,0 +1,496 @@ +# +# Copyright (C) 2010-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=strongswan +PKG_VERSION:=4.5.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://download.strongswan.org/ +PKG_MD5SUM:=ac33b8f849a274127f84df0838cae953 + +PKG_MOD_AVAILABLE:= \ + aes \ + agent \ + attr \ + attr-sql \ + blowfish \ + constraints \ + coupling \ + curl \ + des \ + dhcp \ + dnskey \ + duplicheck \ + eap-md5 \ + eap-mschapv2 \ + eap-radius \ + farp \ + fips-prf \ + gcrypt \ + gmp \ + hmac \ + kernel-klips \ + kernel-netlink \ + kernel-pfkey \ + ldap \ + led \ + load-tester \ + md5 \ + medcli \ + medsrv \ + mysql \ + padlock \ + pem \ + pgp \ + pkcs1 \ + pubkey \ + random \ + resolve \ + revocation \ + sha1 \ + sha2 \ + smp \ + socket-default \ + socket-raw \ + sql \ + sqlite \ + stroke \ + uci \ + updown \ + whitelist \ + x509 \ + xauth \ + xcbc \ + +PKG_BUILD_DEPENDS:= \ + PACKAGE_strongswan4-libfast:clearsilver \ + PACKAGE_strongswan4-libfast:fcgi \ + +PKG_CONFIG_DEPENDS:= \ + CONFIG_STRONGSWAN4_ENABLE_CISCO_QUIRKS \ + CONFIG_STRONGSWAN4_ENABLE_NAT_TRANSPORT \ + CONFIG_STRONGSWAN4_ENABLE_VENDOR_ID \ + CONFIG_STRONGSWAN4_ENABLE_XAUTH_VID \ + CONFIG_STRONGSWAN4_DEVICE_RANDOM \ + CONFIG_STRONGSWAN4_DEVICE_URANDOM \ + CONFIG_STRONGSWAN4_ROUTING_TABLE \ + CONFIG_STRONGSWAN4_ROUTING_TABLE_PRIO \ + $(patsubst %,CONFIG_PACKAGE_strongswan4-mod-%,$(PKG_MOD_AVAILABLE)) \ + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + + +define Package/strongswan4/Default + SUBMENU:=VPN + SECTION:=net + CATEGORY:=Network + TITLE:=StrongSwan + URL:=http://www.strongswan.org/ +endef + +define Package/strongswan4/description/Default + StrongSwan is an OpenSource IPsec implementation for the Linux + operating system. +endef + + +define Package/strongswan4 +$(call Package/strongswan4/Default) + DEPENDS:= +libpthread +ip \ + +kmod-crypto-authenc \ + +kmod-ipsec +kmod-ipsec4 \ + +kmod-ipt-ipsec +iptables-mod-ipsec + MENU:=1 +endef + +define Package/strongswan4/config + source "$(SOURCE)/Config.in" +endef + +define Package/strongswan4/description +$(call Package/strongswan4/description/Default) + . + This package contains shared libraries and scripts. +endef + + +define Package/strongswan4-full +$(call Package/strongswan4/Default) + TITLE+= (full) + DEPENDS:= strongswan4 \ + +strongswan4-app-charon \ + +strongswan4-app-pluto \ + +strongswan4-libfast \ + +strongswan4-mod-aes \ + +strongswan4-mod-agent \ + +strongswan4-mod-attr \ + +strongswan4-mod-attr-sql \ + +strongswan4-mod-blowfish \ + +strongswan4-mod-constraints \ + +strongswan4-mod-coupling \ + +strongswan4-mod-curl \ + +strongswan4-mod-des \ + +strongswan4-mod-dhcp \ + +strongswan4-mod-dnskey \ + +strongswan4-mod-duplicheck \ + +strongswan4-mod-eap-md5 \ + +strongswan4-mod-eap-mschapv2 \ + +strongswan4-mod-eap-radius \ + +strongswan4-mod-farp \ + +strongswan4-mod-fips-prf \ + +strongswan4-mod-gcrypt \ + +strongswan4-mod-gmp \ + +strongswan4-mod-hmac \ + +strongswan4-mod-kernel-netlink \ + +strongswan4-mod-kernel-pfkey \ + +strongswan4-mod-ldap \ + +strongswan4-mod-led \ + +strongswan4-mod-load-tester \ + +strongswan4-mod-md5 \ + +strongswan4-mod-medcli \ + +strongswan4-mod-medsrv \ + +strongswan4-mod-mysql \ + +TARGET_x86:strongswan4-mod-padlock \ + +strongswan4-mod-pem \ + +strongswan4-mod-pgp \ + +strongswan4-mod-pkcs1 \ + +strongswan4-mod-pubkey \ + +strongswan4-mod-random \ + +strongswan4-mod-resolve \ + +strongswan4-mod-revocation \ + +strongswan4-mod-sha1 \ + +strongswan4-mod-sha2 \ + +strongswan4-mod-smp \ + +strongswan4-mod-socket-raw \ + +strongswan4-mod-sql \ + +strongswan4-mod-sqlite \ + +strongswan4-mod-stroke \ + +strongswan4-mod-uci \ + +strongswan4-mod-updown \ + +strongswan4-mod-whitelist \ + +strongswan4-mod-x509 \ + +strongswan4-mod-xauth \ + +strongswan4-mod-xcbc \ + +strongswan4-utils +endef + +define Package/strongswan4-full/description +$(call Package/strongswan4/description/Default) + . + This meta-package contains dependencies for all of the strongswan4 + plugins except kernel-klips and socket-default which are ommitted in + favor of the kernel-netlink and socket-raw plugins. +endef + + +define Package/strongswan4-default +$(call Package/strongswan4/Default) + TITLE+= (default) + DEPENDS:= strongswan4 \ + +strongswan4-app-charon \ + +strongswan4-app-pluto \ + +strongswan4-mod-aes \ + +strongswan4-mod-constraints \ + +strongswan4-mod-attr \ + +strongswan4-mod-des \ + +strongswan4-mod-dnskey \ + +strongswan4-mod-fips-prf \ + +strongswan4-mod-gmp \ + +strongswan4-mod-hmac \ + +strongswan4-mod-kernel-netlink \ + +strongswan4-mod-md5 \ + +strongswan4-mod-pem \ + +strongswan4-mod-pgp \ + +strongswan4-mod-pkcs1 \ + +strongswan4-mod-pubkey \ + +strongswan4-mod-random \ + +strongswan4-mod-revocation \ + +strongswan4-mod-resolve \ + +strongswan4-mod-sha1 \ + +strongswan4-mod-sha2 \ + +strongswan4-mod-socket-raw \ + +strongswan4-mod-stroke \ + +strongswan4-mod-updown \ + +strongswan4-mod-x509 \ + +strongswan4-mod-xauth \ + +strongswan4-mod-xcbc \ + +strongswan4-utils +endef + +define Package/strongswan4-default/description +$(call Package/strongswan4/description/Default) + . + This meta-package contains only dependencies to match upstream + defaults. +endef + + +define Package/strongswan4-minimal +$(call Package/strongswan4/Default) + TITLE+= (minimal) + DEPENDS:= strongswan4 \ + +strongswan4-app-charon \ + +strongswan4-mod-aes \ + +strongswan4-mod-gmp \ + +strongswan4-mod-hmac \ + +strongswan4-mod-kernel-netlink \ + +strongswan4-mod-pubkey \ + +strongswan4-mod-random \ + +strongswan4-mod-sha1 \ + +strongswan4-mod-socket-default \ + +strongswan4-mod-stroke \ + +strongswan4-mod-updown \ + +strongswan4-mod-x509 \ + +strongswan4-mod-xcbc +endef + +define Package/strongswan4-minimal/description +$(call Package/strongswan4/description/Default) + . + This meta-package contains only dependencies for a minimal IKEv2 setup. +endef + + +define Package/strongswan4-app-charon +$(call Package/strongswan4/Default) + TITLE+= IKEv2 keying daemon + DEPENDS:= strongswan4 +endef + +define Package/strongswan4-app-charon/description +$(call Package/strongswan4/description/Default) + . + This package contains charon, an IKEv2 keying daemon. +endef + + +define Package/strongswan4-app-pluto +$(call Package/strongswan4/Default) + TITLE+= IKEv1 keying daemon + DEPENDS:= strongswan4 +endef + +define Package/strongswan4-app-pluto/description +$(call Package/strongswan4/description/Default) + . + This package contains pluto, an IKEv1 keying daemon. +endef + + +define Package/strongswan4-libfast +$(call Package/strongswan4/Default) + TITLE+= libfast + DEPENDS:= strongswan4 +endef + +define Package/strongswan4-libfast/description +$(call Package/strongswan4/description/Default) + . + This package contains libfast, a lightweight framework to build native + web applications using ClearSilver and FastCGI. +endef + + +define Package/strongswan4-utils +$(call Package/strongswan4/Default) + TITLE+= utilities + DEPENDS:= strongswan4 +endef + +define Package/strongswan4-utils/description +$(call Package/strongswan4/description/Default) + . + This package contains the openac, pki & scepclient utilities. +endef + + +# 1. Name +# 2. Title +# 3. Depends +define BuildPlugin + define Package/strongswan4-mod-$(1) + $$(call Package/strongswan4/Default) + TITLE:= StrongSwan $(2) plugin + DEPENDS:= strongswan4 $(3) + endef + + define Package/strongswan4-mod-$(1)/install + $(INSTALL_DIR) $$(1)/usr/lib/ipsec/plugins + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-$(1).so \ + $$(1)/usr/lib/ipsec/plugins/ ; + $(call Plugin/$(1)/install,$$(1)) + endef + + $$(eval $$(call BuildPackage,strongswan4-mod-$(1))) +endef + + +CONFIGURE_ARGS+= \ + $(if $(CONFIG_STRONGSWAN4_ENABLE_CISCO_QUIRKS),--enable-cisco-quirks,--disable-cisco-quirks) \ + $(if $(CONFIG_STRONGSWAN4_ENABLE_NAT_TRANSPORT),--enable-nat-transport,--disable-nat-transport) \ + $(if $(CONFIG_STRONGSWAN4_ENABLE_VENDOR_ID),--enable-vendor-id,--disable-vendor-id) \ + $(if $(CONFIG_STRONGSWAN4_ENABLE_XAUTH_VID),--enable-xauth-vid,--disable-xauth-vid) \ + --disable-scripts \ + --disable-static \ + $(if $(CONFIG_PACKAGE_strongswan4-libfast),--enable-fast,--disable-fast) \ + $(if $(CONFIG_PACKAGE_strongswan4-utils),--enable-tools,--disable-tools) \ + --with-random-device="$(call qstrip,$(CONFIG_STRONGSWAN4_DEVICE_RANDOM))" \ + --with-urandom-device="$(call qstrip,$(CONFIG_STRONGSWAN4_DEVICE_URANDOM))" \ + --with-routing-table="$(call qstrip,$(CONFIG_STRONGSWAN4_ROUTING_TABLE))" \ + --with-routing-table-prio="$(call qstrip,$(CONFIG_STRONGSWAN4_ROUTING_TABLE_PRIO))" \ + $(foreach m,$(PKG_MOD_AVAILABLE), \ + $(if $(CONFIG_PACKAGE_strongswan4-mod-$(m)),--enable-$(m),--disable-$(m)) \ + ) \ + +ifneq ($(CONFIG_PACKAGE_strongswan4-libfast),) + EXTRA_CPPFLAGS+= -I$(STAGING_DIR)/usr/include/ClearSilver +endif + +EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib + + +define Package/strongswan4/conffiles +/etc/ipsec.conf +/etc/ipsec.secrets +/etc/strongswan.conf +endef + +define Package/strongswan4/install + $(INSTALL_DIR) $(1)/etc + $(CP) -R $(PKG_INSTALL_DIR)/etc/ipsec.d $(1)/etc/ + $(CP) $(PKG_INSTALL_DIR)/etc/{ipsec.conf,strongswan.conf} $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/{libstrongswan.so.*,libhydra.so.*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ipsec $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/ipsec + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/{_copyright,starter} $(1)/usr/lib/ipsec/ + $(INSTALL_CONF) ./files/ipsec.secrets $(1)/etc/ +endef + + +define Package/strongswan4-default/install + true +endef + + +define Package/strongswan4-full/install + true +endef + + +define Package/strongswan4-minimal/install + true +endef + + +define Package/strongswan4-app-charon/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcharon.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/ipsec + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/{charon,stroke} $(1)/usr/lib/ipsec/ +endef + + +define Package/strongswan4-app-pluto/install + $(INSTALL_DIR) $(1)/usr/lib/ipsec + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/{pluto,_pluto_adns,whack} $(1)/usr/lib/ipsec/ +endef + + +define Package/strongswan4-libfast/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfast.so.* $(1)/usr/lib/ +endef + + +define Package/strongswan4-utils/install + $(INSTALL_DIR) $(1)/usr/lib/ipsec + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/{openac,pki,scepclient} $(1)/usr/lib/ipsec/ +endef + + +define Plugin/attr-sql/install + $(INSTALL_DIR) $(1)/usr/lib/ipsec + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/pool $(1)/usr/lib/ipsec/ +endef + +define Plugin/updown/install + $(INSTALL_DIR) $(1)/usr/lib/ipsec + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/{_updown,_updown_espmark} $(1)/usr/lib/ipsec/ +endef + + +$(eval $(call BuildPackage,strongswan4)) +$(eval $(call BuildPackage,strongswan4-default)) +$(eval $(call BuildPackage,strongswan4-full)) +$(eval $(call BuildPackage,strongswan4-minimal)) +$(eval $(call BuildPackage,strongswan4-app-charon)) +$(eval $(call BuildPackage,strongswan4-app-pluto)) +$(eval $(call BuildPackage,strongswan4-libfast)) +$(eval $(call BuildPackage,strongswan4-utils)) + +$(eval $(call BuildPlugin,aes,AES crypto,)) +$(eval $(call BuildPlugin,agent,SSH agent signing,)) +$(eval $(call BuildPlugin,attr,File-based config attr,)) +$(eval $(call BuildPlugin,attr-sql,SQL-based config attrib,+strongswan4-mod-sql)) +$(eval $(call BuildPlugin,blowfish,Blowfish crypto,)) +$(eval $(call BuildPlugin,constraints,X.509 constraint checking,)) +$(eval $(call BuildPlugin,coupling,Peer certificate coupling,)) +$(eval $(call BuildPlugin,curl,cURL,+PACKAGE_strongswan4-mod-curl:libcurl)) +$(eval $(call BuildPlugin,des,DES crypto,)) +$(eval $(call BuildPlugin,dhcp,DHCP-based IP and DNS,)) +$(eval $(call BuildPlugin,dnskey,DNS RR key decoding,)) +$(eval $(call BuildPlugin,duplicheck,Duplicate checking,)) +$(eval $(call BuildPlugin,eap-md5,MD5 EAP (CHAP) auth,)) +$(eval $(call BuildPlugin,eap-mschapv2,MS-CHAPv2 EAP auth,)) +$(eval $(call BuildPlugin,eap-radius,RADIUS proxy auth,)) +$(eval $(call BuildPlugin,farp,Fake arp respsonses,)) +$(eval $(call BuildPlugin,fips-prf,FIPS PRF crypto,)) +$(eval $(call BuildPlugin,gcrypt,libgcrypt,+PACKAGE_strongswan4-mod-gcrypt:libgcrypt)) +$(eval $(call BuildPlugin,gmp,libgmp,+PACKAGE_strongswan4-mod-gmp:libgmp)) +$(eval $(call BuildPlugin,hmac,HMAC crypto,)) +$(eval $(call BuildPlugin,kernel-klips,KLIPS kernel interface,)) +$(eval $(call BuildPlugin,kernel-netlink,netlink kernel interface,)) +$(eval $(call BuildPlugin,kernel-pfkey,PK_KEY kernel interface,)) +$(eval $(call BuildPlugin,ldap,LDAP,+PACKAGE_strongswan4-mod-ldap:libopenldap)) +$(eval $(call BuildPlugin,led,LED blink on IKE activity,)) +$(eval $(call BuildPlugin,load-tester,load testing,)) +$(eval $(call BuildPlugin,md5,MD5 crypto,)) +$(eval $(call BuildPlugin,medcli,mediation client configuration database,)) +$(eval $(call BuildPlugin,medsrv,mediation server configuration database,)) +$(eval $(call BuildPlugin,mysql,MySQL database interface,+strongswan4-mod-sql +PACKAGE_strongswan4-mod-mysql:libmysqlclient)) +$(eval $(call BuildPlugin,padlock,VIA PadLock crypto,@TARGET_x86)) +$(eval $(call BuildPlugin,pem,PEM decoding,)) +$(eval $(call BuildPlugin,pgp,PGP key decoding,)) +$(eval $(call BuildPlugin,pkcs1,PKCS1 key decoding,)) +$(eval $(call BuildPlugin,pubkey,raw public key,)) +$(eval $(call BuildPlugin,random,RNG,)) +$(eval $(call BuildPlugin,resolve,DNS resolver,)) +$(eval $(call BuildPlugin,revocation,X.509 revocation checking,)) +$(eval $(call BuildPlugin,sha1,SHA1 crypto,)) +$(eval $(call BuildPlugin,sha2,SHA2 crypto,)) +$(eval $(call BuildPlugin,smp,SMP configuration and control interface,+PACKAGE_strongswan4-mod-smp:libxml2)) +$(eval $(call BuildPlugin,socket-default,default socket for IKEv2,)) +$(eval $(call BuildPlugin,socket-raw,RAW socket for IKEv1 and IKEv2,)) +$(eval $(call BuildPlugin,sql,SQL database interface,)) +$(eval $(call BuildPlugin,sqlite,SQLite database interface,+strongswan4-mod-sql +PACKAGE_strongswan4-mod-sqlite:libsqlite3)) +$(eval $(call BuildPlugin,stroke,Stroke,)) +$(eval $(call BuildPlugin,uci,UCI config interface,+PACKAGE_strongswan4-mod-uci:libuci)) +$(eval $(call BuildPlugin,updown,updown firewall,)) +$(eval $(call BuildPlugin,whitelist,Peer identity whitelisting,)) +$(eval $(call BuildPlugin,x509,x509 certificate,)) +$(eval $(call BuildPlugin,xauth,XAUTH authentication,)) +$(eval $(call BuildPlugin,xcbc,xcbc crypto,)) diff --git a/net/strongswan4/files/ipsec.secrets b/net/strongswan4/files/ipsec.secrets new file mode 100644 index 0000000..ddd4956 --- /dev/null +++ b/net/strongswan4/files/ipsec.secrets @@ -0,0 +1 @@ +# /etc/ipsec.secrets - strongSwan IPsec secrets file diff --git a/net/strongswan4/patches/201-no-modprobe.patch b/net/strongswan4/patches/201-no-modprobe.patch new file mode 100644 index 0000000..bba3bb6 --- /dev/null +++ b/net/strongswan4/patches/201-no-modprobe.patch @@ -0,0 +1,28 @@ +--- a/src/starter/netkey.c ++++ b/src/starter/netkey.c +@@ -34,7 +34,7 @@ starter_netkey_init(void) + /* af_key module makes the netkey proc interface visible */ + if (stat(PROC_MODULES, &stb) == 0) + { +- ignore_result(system("modprobe -qv af_key")); ++ ignore_result(system("insmod -qv af_key")); + } + + /* now test again */ +@@ -50,11 +50,11 @@ starter_netkey_init(void) + /* make sure that all required IPsec modules are loaded */ + if (stat(PROC_MODULES, &stb) == 0) + { +- ignore_result(system("modprobe -qv ah4")); +- ignore_result(system("modprobe -qv esp4")); +- ignore_result(system("modprobe -qv ipcomp")); +- ignore_result(system("modprobe -qv xfrm4_tunnel")); +- ignore_result(system("modprobe -qv xfrm_user")); ++ ignore_result(system("insmod -qv ah4")); ++ ignore_result(system("insmod -qv esp4")); ++ ignore_result(system("insmod -qv ipcomp")); ++ ignore_result(system("insmod -qv xfrm4_tunnel")); ++ ignore_result(system("insmod -qv xfrm_user")); + } + + DBG(DBG_CONTROL, diff --git a/net/strongswan4/patches/203-uci.patch b/net/strongswan4/patches/203-uci.patch new file mode 100644 index 0000000..04f2973 --- /dev/null +++ b/net/strongswan4/patches/203-uci.patch @@ -0,0 +1,20 @@ +--- a/src/libcharon/plugins/uci/uci_parser.c ++++ b/src/libcharon/plugins/uci/uci_parser.c +@@ -80,7 +80,7 @@ static bool section_enumerator_enumerate + if (uci_lookup(this->ctx, &element, this->package, + this->current->name, "name") == UCI_OK) + { /* use "name" attribute as config name if available ... */ +- *value = uci_to_option(element)->value; ++ *value = uci_to_option(element)->v.string; + } + else + { /* ... or the section name becomes config name */ +@@ -95,7 +95,7 @@ static bool section_enumerator_enumerate + if (value && uci_lookup(this->ctx, &element, this->package, + this->current->name, this->keywords[i]) == UCI_OK) + { +- *value = uci_to_option(element)->value; ++ *value = uci_to_option(element)->v.string; + } + } + va_end(args); diff --git a/net/strongswan4/patches/300-compile-fixes.patch b/net/strongswan4/patches/300-compile-fixes.patch new file mode 100644 index 0000000..49154fc --- /dev/null +++ b/net/strongswan4/patches/300-compile-fixes.patch @@ -0,0 +1,11 @@ +--- a/src/pluto/adns.c ++++ b/src/pluto/adns.c +@@ -179,7 +179,7 @@ write_pipe(int fd, const unsigned char * + res_query(dname, class, type, answer, anslen) + # define res_nclose(statp) res_close() + +-static struct __res_state *statp = &_res; ++#define statp ((struct __res_state *)(&_res)) + + #else /* !OLD_RESOLVER */ + diff --git a/net/stun/Makefile b/net/stun/Makefile new file mode 100644 index 0000000..b0ac419 --- /dev/null +++ b/net/stun/Makefile @@ -0,0 +1,82 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=stund +PKG_VERSION:=0.96 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_Aug13.tgz +PKG_SOURCE_URL:=@SF/stun +PKG_MD5SUM:=3273abb1a6f299f4e611b658304faefa + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/stun/Default + SECTION:=net + CATEGORY:=Network + DEPENDS:=+uclibcxx + URL:=http://sourceforge.net/projects/stun +endef + +define Package/stun/Default/description + The STUN protocol (Simple Traversal of UDP through NATs) is described in the + IETF RFC 3489, available at http://www.ietf.org/rfc/rfc3489.txt. It's used to + help clients behind NAT to tunnel incoming calls through. This server is the + counterpart to help the client identify the NAT and have it open the proper + ports for it. +endef + +define Package/stund +$(call Package/stun/Default) + TITLE:=STUN server +endef + +define Package/stund/description +$(call Package/stun/Default/description) +endef + +define Package/stun-client +$(call Package/stun/Default) + TITLE:=STUN test client +endef + +define Package/stun-client/description +$(call Package/stun/Default/description) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CXX="$(TARGET_CXX)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ $(TARGET_CPPFLAGS)" \ + LDFLAGS="$$$$LDFLAGS $(TARGET_LDFLAGS) -nodefaultlibs -luClibc++ $(LIBGCC_S)" \ + all +endef + + +define Package/stund/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/server $(1)/usr/sbin/stund + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/stund.init $(1)/etc/init.d/stund + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/stund.config $(1)/etc/config/stund +endef + +define Package/stun-client/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/client $(1)/usr/sbin/stun-client +endef + +$(eval $(call BuildPackage,stund)) +$(eval $(call BuildPackage,stun-client)) diff --git a/net/stun/files/stund.config b/net/stun/files/stund.config new file mode 100644 index 0000000..0a0bc07 --- /dev/null +++ b/net/stun/files/stund.config @@ -0,0 +1,5 @@ +config stund + option primaryip '' + option secondaryip '' + option primaryport '3478' + option secondaryport '3479' diff --git a/net/stun/files/stund.init b/net/stun/files/stund.init new file mode 100644 index 0000000..177ae58 --- /dev/null +++ b/net/stun/files/stund.init @@ -0,0 +1,28 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009-2011 OpenWrt.org + +START=70 + +start() { + local pri_ip sec_ip pri_port sec_port + parse_opts() { + local cfg="$1" + config_get pri_ip "$cfg" primaryip + config_get sec_ip "$cfg" secondaryip + config_get pri_port "$cfg" primaryport + config_get sec_port "$cfg" secondaryport + } + + config_load "stund" + config_foreach parse_opts + + start-stop-daemon -S -p /var/run/stund.pid -m -b \ + -x /usr/sbin/stund -- \ + ${pri_ip:+-h $pri_ip} ${sec_ip:+-a $sec_ip} \ + ${pri_port:+-p $pri_port} ${sec_port:+-o $sec_port} +} + +stop() { + service_kill stund /var/run/stund.pid + rm -f /var/run/stund.pid +} diff --git a/net/stun/patches/001-fix_non_i386.patch b/net/stun/patches/001-fix_non_i386.patch new file mode 100644 index 0000000..070b551 --- /dev/null +++ b/net/stun/patches/001-fix_non_i386.patch @@ -0,0 +1,27 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## fix_non_i386.dpatch by Kilian Krause +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Remove i386-only code analogous to twinkle +@DPATCH@ +diff -urNad stun-0.96~/stun.cxx stun-0.96/stun.cxx +--- stun-0.96~/stun.cxx 2005-08-14 00:39:03.000000000 +0000 ++++ stun-0.96/stun.cxx 2006-01-03 00:54:33.000000000 +0000 +@@ -669,16 +669,8 @@ + tick = hightick; + tick <<= 32; + tick |= lowtick; +-#elif defined(__GNUC__) && ( defined(__i686__) || defined(__i386__) ) +- asm("rdtsc" : "=A" (tick)); +-#elif defined (__SUNPRO_CC) || defined( __sparc__ ) +- tick = gethrtime(); +-#elif defined(__MACH__) +- int fd=open("/dev/random",O_RDONLY); +- read(fd,&tick,sizeof(tick)); +- closesocket(fd); + #else +-# error Need some way to seed the random number generator ++ tick = time(NULL); + #endif + int seed = int(tick); + #ifdef WIN32 diff --git a/net/stun/patches/002-linking_order.patch b/net/stun/patches/002-linking_order.patch new file mode 100644 index 0000000..c9a23f1 --- /dev/null +++ b/net/stun/patches/002-linking_order.patch @@ -0,0 +1,19 @@ +--- a/Makefile ++++ b/Makefile +@@ -37,13 +37,13 @@ + $(addprefix stund/, $(TARS)) + + server: server.o stun.o udp.o +- $(CXX) $(LDFLAGS) -o $@ $^ ++ $(CXX) -o $@ $^ $(LDFLAGS) + + tlsServer: tlsServer.o stun.o udp.o +- $(CXX) $(LDFLAGS) -o $@ $^ ++ $(CXX) -o $@ $^ $(LDFLAGS) + + client: client.o stun.o udp.o +- $(CXX) $(LDFLAGS) -o $@ $^ ++ $(CXX) -o $@ $^ $(LDFLAGS) + + %.o:%.cxx + $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ diff --git a/net/stunnel/Makefile b/net/stunnel/Makefile new file mode 100644 index 0000000..98dd5d0 --- /dev/null +++ b/net/stunnel/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=stunnel +PKG_VERSION:=4.33 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.stunnel.org/download/stunnel/src/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=559a864066d8cc4afd8a97682c90d41c + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/stunnel + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libopenssl +libwrap + TITLE:=SSL TCP Wrapper + URL:=http://www.stunnel.org/ +endef + +define Package/stunnel/description + Stunnel is a program that allows you to encrypt arbitrary TCP + connections inside SSL (Secure Sockets Layer) available on both Unix + and Windows. Stunnel can allow you to secure non-SSL aware daemons and + protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the + encryption, requiring no changes to the daemon's code. +endef + +define Package/stunnel/conffiles +/etc/stunnel/stunnel.conf +endef + +CONFIGURE_ARGS+= \ + --with-random=/dev/urandom \ + --with-threads=fork \ + --with-ssl=$(STAGING_DIR)/usr \ + +define Build/Compile + mkdir -p $(PKG_INSTALL_DIR)/etc/stunnel + echo '#dummy' > $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.pem + $(call Build/Compile/Default) +endef + +define Package/stunnel/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stunnel $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/stunnel + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/stunnel/libstunnel.so $(1)/usr/lib/stunnel/ + $(INSTALL_DIR) $(1)/etc/stunnel + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.conf-sample $(1)/etc/stunnel/stunnel.conf + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/stunnel.init $(1)/etc/init.d/stunnel +endef + +$(eval $(call BuildPackage,stunnel)) diff --git a/net/stunnel/files/stunnel.init b/net/stunnel/files/stunnel.init new file mode 100644 index 0000000..a3ea103 --- /dev/null +++ b/net/stunnel/files/stunnel.init @@ -0,0 +1,34 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2008 OpenWrt.org + +START=90 +RUN_D=/var +PID_F=$RUN_D/stunnel.pid + +start() { + if [ -s "/etc/stunnel/stunnel.pem" ]; then + chmod og-rwx /etc/stunnel/stunnel.pem + [ ! -f $PID_F ] && stunnel + else + [ -e /etc/stunnel/config ] && \ + . /etc/stunnel/config + + X509_CN=${X509_CN:-"router"} + X509_O=${X509_O:-"openwrt.org"} + X509_OU=${X509_OU:-"open-source firmware"} + + [ -x /sbin/keygen ] && { + (keygen "$X509_CN" "$X509_O" "$X509_OU" > /etc/stunnel/stunnel.pem; + chmod og-rwx /etc/stunnel/stunnel.pem; + stunnel) & + } + fi +} + +stop() { + [ -f $PID_F ] && { + kill $(cat $PID_F) + kill -9 $(cat $PID_F) + rm -f $PID_F + } +} diff --git a/net/stunnel/patches/001-remove-libtool.patch b/net/stunnel/patches/001-remove-libtool.patch new file mode 100644 index 0000000..5bd9a75 --- /dev/null +++ b/net/stunnel/patches/001-remove-libtool.patch @@ -0,0 +1,6661 @@ +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -19,6658 +19,6 @@ You have another version of autoconf. I + If you have problems, you may need to regenerate the build system entirely. + To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +- +-# serial 52 Debian 1.5.26-4+lenny1 AC_PROG_LIBTOOL +- +- +-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +-# ----------------------------------------------------------- +-# If this macro is not defined by Autoconf, define it here. +-m4_ifdef([AC_PROVIDE_IFELSE], +- [], +- [m4_define([AC_PROVIDE_IFELSE], +- [m4_ifdef([AC_PROVIDE_$1], +- [$2], [$3])])]) +- +- +-# AC_PROG_LIBTOOL +-# --------------- +-AC_DEFUN([AC_PROG_LIBTOOL], +-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. +- AC_PROVIDE_IFELSE([AC_PROG_CXX], +- [AC_LIBTOOL_CXX], +- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX +- ])]) +-dnl And a similar setup for Fortran 77 support +- AC_PROVIDE_IFELSE([AC_PROG_F77], +- [AC_LIBTOOL_F77], +- [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +-])]) +- +-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. +- AC_PROVIDE_IFELSE([AC_PROG_GCJ], +- [AC_LIBTOOL_GCJ], +- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], +- [AC_LIBTOOL_GCJ], +- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], +- [AC_LIBTOOL_GCJ], +- [ifdef([AC_PROG_GCJ], +- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) +- ifdef([A][M_PROG_GCJ], +- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) +- ifdef([LT_AC_PROG_GCJ], +- [define([LT_AC_PROG_GCJ], +- defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +-])])# AC_PROG_LIBTOOL +- +- +-# _AC_PROG_LIBTOOL +-# ---------------- +-AC_DEFUN([_AC_PROG_LIBTOOL], +-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl +- +-# This can be used to rebuild libtool when needed +-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" +- +-# Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' +-AC_SUBST(LIBTOOL)dnl +- +-# Prevent multiple expansion +-define([AC_PROG_LIBTOOL], []) +-])# _AC_PROG_LIBTOOL +- +- +-# AC_LIBTOOL_SETUP +-# ---------------- +-AC_DEFUN([AC_LIBTOOL_SETUP], +-[AC_PREREQ(2.50)dnl +-AC_REQUIRE([AC_ENABLE_SHARED])dnl +-AC_REQUIRE([AC_ENABLE_STATIC])dnl +-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +-AC_REQUIRE([AC_CANONICAL_HOST])dnl +-AC_REQUIRE([AC_CANONICAL_BUILD])dnl +-AC_REQUIRE([AC_PROG_CC])dnl +-AC_REQUIRE([AC_PROG_LD])dnl +-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +-AC_REQUIRE([AC_PROG_NM])dnl +- +-AC_REQUIRE([AC_PROG_LN_S])dnl +-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +-AC_REQUIRE([AC_OBJEXT])dnl +-AC_REQUIRE([AC_EXEEXT])dnl +-dnl +-AC_LIBTOOL_SYS_MAX_CMD_LEN +-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +-AC_LIBTOOL_OBJDIR +- +-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +-_LT_AC_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. +-Xsed='sed -e 1s/^X//' +-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] +- +-# Same as above, but do not quote variable references. +-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] +- +-# 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 avoid accidental globbing in evaled expressions +-no_glob_subst='s/\*/\\\*/g' +- +-# Constants: +-rm="rm -f" +- +-# Global variables: +-default_ofile=libtool +-can_build_shared=yes +- +-# All known linkers require a `.a' archive for static linking (except MSVC, +-# which needs '.lib'). +-libext=a +-ltmain="$ac_aux_dir/ltmain.sh" +-ofile="$default_ofile" +-with_gnu_ld="$lt_cv_prog_gnu_ld" +- +-AC_CHECK_TOOL(AR, ar, false) +-AC_CHECK_TOOL(RANLIB, ranlib, :) +-AC_CHECK_TOOL(STRIP, strip, :) +- +-old_CC="$CC" +-old_CFLAGS="$CFLAGS" +- +-# Set sane defaults for various variables +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru +-test -z "$AS" && AS=as +-test -z "$CC" && CC=cc +-test -z "$LTCC" && LTCC=$CC +-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +-test -z "$DLLTOOL" && DLLTOOL=dlltool +-test -z "$LD" && LD=ld +-test -z "$LN_S" && LN_S="ln -s" +-test -z "$MAGIC_CMD" && MAGIC_CMD=file +-test -z "$NM" && NM=nm +-test -z "$SED" && SED=sed +-test -z "$OBJDUMP" && OBJDUMP=objdump +-test -z "$RANLIB" && RANLIB=: +-test -z "$STRIP" && STRIP=: +-test -z "$ac_objext" && ac_objext=o +- +-# 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_CC_BASENAME([$compiler]) +- +-# Only perform the check for file, if the check method requires it +-case $deplibs_check_method in +-file_magic*) +- if test "$file_magic_cmd" = '$MAGIC_CMD'; then +- AC_PATH_MAGIC +- fi +- ;; +-esac +- +-_LT_REQUIRED_DARWIN_CHECKS +- +-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +-enable_win32_dll=yes, enable_win32_dll=no) +- +-AC_ARG_ENABLE([libtool-lock], +- [AC_HELP_STRING([--disable-libtool-lock], +- [avoid locking (might break parallel builds)])]) +-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +- +-AC_ARG_WITH([pic], +- [AC_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=default +- +-# Use C for the default configuration in the libtool script +-tagname= +-AC_LIBTOOL_LANG_C_CONFIG +-_LT_AC_TAGCONFIG +-])# AC_LIBTOOL_SETUP +- +- +-# _LT_AC_SYS_COMPILER +-# ------------------- +-AC_DEFUN([_LT_AC_SYS_COMPILER], +-[AC_REQUIRE([AC_PROG_CC])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_AC_SYS_COMPILER +- +- +-# _LT_CC_BASENAME(CC) +-# ------------------- +-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +-AC_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_COMPILER_BOILERPLATE +-# ------------------------ +-# Check for compiler boilerplate output or warnings with +-# the simple compiler test code. +-AC_DEFUN([_LT_COMPILER_BOILERPLATE], +-[AC_REQUIRE([LT_AC_PROG_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. +-AC_DEFUN([_LT_LINKER_BOILERPLATE], +-[AC_REQUIRE([LT_AC_PROG_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 +-# -------------------------- +-# Check for some things on darwin +-AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ +- case $host_os in +- rhapsody* | darwin*) +- AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) +- AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) +- +- 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. +- echo "int foo(void){return 1;}" > conftest.c +- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +- -dynamiclib ${wl}-single_module conftest.c +- if test -f libconftest.dylib; then +- lt_cv_apple_cc_single_mod=yes +- rm -rf libconftest.dylib* +- fi +- rm conftest.c +- 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.[[0123]]) +- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; +- darwin1.*) +- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; +- darwin*) +- # 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_AC_SYS_LIBPATH_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. +-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +-[AC_REQUIRE([LT_AC_PROG_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_AC_SYS_LIBPATH_AIX +- +- +-# _LT_AC_SHELL_INIT(ARG) +-# ---------------------- +-AC_DEFUN([_LT_AC_SHELL_INIT], +-[ifdef([AC_DIVERSION_NOTICE], +- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], +- [AC_DIVERT_PUSH(NOTICE)]) +-$1 +-AC_DIVERT_POP +-])# _LT_AC_SHELL_INIT +- +- +-# _LT_AC_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. +-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +-[_LT_AC_SHELL_INIT([ +-# Check that we are running under the correct shell. +-SHELL=${CONFIG_SHELL-/bin/sh} +- +-case X$ECHO in +-X*--fallback-echo) +- # Remove one level of quotation (which was required for Make). +- ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` +- ;; +-esac +- +-echo=${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 </dev/null 2>&1 && unset CDPATH +- +-if test -z "$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 && +- echo_test_string=`eval $cmd` && +- (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. +-ECHO=$echo +-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then +- ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +-fi +- +-AC_SUBST(ECHO) +-])])# _LT_AC_PROG_ECHO_BACKSLASH +- +- +-# _LT_AC_LOCK +-# ----------- +-AC_DEFUN([_LT_AC_LOCK], +-[AC_ARG_ENABLE([libtool-lock], +- [AC_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*|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*) +- 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_TRY_LINK([],[],[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* +- ;; +- +-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +-[*-*-cygwin* | *-*-mingw* | *-*-pw32*) +- AC_CHECK_TOOL(DLLTOOL, dlltool, false) +- AC_CHECK_TOOL(AS, as, false) +- AC_CHECK_TOOL(OBJDUMP, objdump, false) +- ;; +- ]) +-esac +- +-need_locks="$enable_libtool_lock" +- +-])# _LT_AC_LOCK +- +- +-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +-# ---------------------------------------------------------------- +-# Check whether the given compiler option works +-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +-[AC_REQUIRE([LT_AC_PROG_SED]) +-AC_CACHE_CHECK([$1], [$2], +- [$2=no +- ifelse([$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 +- ifelse([$5], , :, [$5]) +-else +- ifelse([$6], , :, [$6]) +-fi +-])# AC_LIBTOOL_COMPILER_OPTION +- +- +-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +-# [ACTION-SUCCESS], [ACTION-FAILURE]) +-# ------------------------------------------------------------ +-# Check whether the given compiler option works +-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +-[AC_REQUIRE([LT_AC_PROG_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 +- ifelse([$4], , :, [$4]) +-else +- ifelse([$5], , :, [$5]) +-fi +-])# AC_LIBTOOL_LINKER_OPTION +- +- +-# AC_LIBTOOL_SYS_MAX_CMD_LEN +-# -------------------------- +-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +-[# 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*) +- # 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 +- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} +- while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ +- = "XX$teststring") >/dev/null 2>&1 && +- new_result=`expr "X$teststring" : ".*" 2>&1` && +- lt_cv_sys_max_cmd_len=$new_result && +- test $i != 17 # 1/2 MB should be enough +- do +- i=`expr $i + 1` +- teststring=$teststring$teststring +- done +- 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 +-])# AC_LIBTOOL_SYS_MAX_CMD_LEN +- +- +-# _LT_AC_CHECK_DLFCN +-# ------------------ +-AC_DEFUN([_LT_AC_CHECK_DLFCN], +-[AC_CHECK_HEADERS(dlfcn.h)dnl +-])# _LT_AC_CHECK_DLFCN +- +- +-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +-# --------------------------------------------------------------------- +-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +-[AC_REQUIRE([_LT_AC_CHECK_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 < +-#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 +- +-#ifdef __cplusplus +-extern "C" void exit (int); +-#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 ()); +- +- exit (status); +-}] +-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_AC_TRY_DLOPEN_SELF +- +- +-# AC_LIBTOOL_DLOPEN_SELF +-# ---------------------- +-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +-[AC_REQUIRE([_LT_AC_CHECK_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*) +- 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_AC_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_AC_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 +-])# AC_LIBTOOL_DLOPEN_SELF +- +- +-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +-# --------------------------------- +-# Check to see if options -c and -o are simultaneously supported by compiler +-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +-[AC_REQUIRE([LT_AC_PROG_SED])dnl +-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], +- [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], +- [_LT_AC_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_AC_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 .. +- rmdir conftest +- $rm conftest* +-]) +-])# AC_LIBTOOL_PROG_CC_C_O +- +- +-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +-# ----------------------------------------- +-# Check to see if we can do hard links to lock some files if needed +-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +-[AC_REQUIRE([_LT_AC_LOCK])dnl +- +-hard_links="nottested" +-if test "$_LT_AC_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 +-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS +- +- +-# AC_LIBTOOL_OBJDIR +-# ----------------- +-AC_DEFUN([AC_LIBTOOL_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 +-])# AC_LIBTOOL_OBJDIR +- +- +-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +-# ---------------------------------------------- +-# Check hardcoding attributes. +-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +-[AC_MSG_CHECKING([how to hardcode library paths into programs]) +-_LT_AC_TAGVAR(hardcode_action, $1)= +-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ +- test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ +- test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then +- +- # We can hardcode non-existant directories. +- if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && +- test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then +- # Linking always hardcodes the temporary library directory. +- _LT_AC_TAGVAR(hardcode_action, $1)=relink +- else +- # We can link without hardcoding, and we can hardcode nonexisting dirs. +- _LT_AC_TAGVAR(hardcode_action, $1)=immediate +- fi +-else +- # We cannot hardcode anything, or else we can only hardcode existing +- # directories. +- _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +-fi +-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) +- +-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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 +-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH +- +- +-# AC_LIBTOOL_SYS_LIB_STRIP +-# ------------------------ +-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +-[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 +-])# AC_LIBTOOL_SYS_LIB_STRIP +- +- +-# AC_LIBTOOL_SYS_DYNAMIC_LINKER +-# ----------------------------- +-# PORTME Fill in your ld.so characteristics +-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +-[AC_REQUIRE([LT_AC_PROG_SED])dnl +-AC_MSG_CHECKING([dynamic linker characteristics]) +-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" +-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]) +-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*) +- 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' +- ;; +- +-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*) +- version_type=windows +- shrext_cmds=".dll" +- need_version=no +- need_lib_prefix=no +- +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32*) +- 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' +- 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*) +- # 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}${versuffix}$shared_ext ${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 +- version_type=freebsd-$objformat +- 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 +- ;; +- 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 +- # 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' +- ;; +- +-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 +- 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=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 +- ;; +- +-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 +- export_dynamic_flag_spec='${wl}-Blargedynsym' +- 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 +- 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' +- shlibpath_overrides_runpath=no +- else +- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' +- shlibpath_overrides_runpath=yes +- 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' +- ;; +- +-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 +- +-AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], +-[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) +-sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +-AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], +-[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) +-sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +- +-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 +-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER +- +- +-# _LT_AC_TAGCONFIG +-# ---------------- +-AC_DEFUN([_LT_AC_TAGCONFIG], +-[AC_REQUIRE([LT_AC_PROG_SED])dnl +-AC_ARG_WITH([tags], +- [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], +- [include additional configurations @<:@automatic@:>@])], +- [tagnames="$withval"]) +- +-if test -f "$ltmain" && test -n "$tagnames"; then +- if test ! -f "${ofile}"; then +- AC_MSG_WARN([output file `$ofile' does not exist]) +- fi +- +- if test -z "$LTCC"; then +- eval "`$SHELL ${ofile} --config | grep '^LTCC='`" +- if test -z "$LTCC"; then +- AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) +- else +- AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) +- fi +- fi +- if test -z "$LTCFLAGS"; then +- eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" +- fi +- +- # Extract list of available tagged configurations in $ofile. +- # Note that this assumes the entire list is on one line. +- available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` +- +- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," +- for tagname in $tagnames; do +- IFS="$lt_save_ifs" +- # Check whether tagname contains only valid characters +- case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in +- "") ;; +- *) AC_MSG_ERROR([invalid tag name: $tagname]) +- ;; +- esac +- +- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null +- then +- AC_MSG_ERROR([tag name \"$tagname\" already exists]) +- fi +- +- # Update the list of available tags. +- if test -n "$tagname"; then +- echo appending configuration tag \"$tagname\" to $ofile +- +- case $tagname in +- 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_LIBTOOL_LANG_CXX_CONFIG +- else +- tagname="" +- fi +- ;; +- +- F77) +- if test -n "$F77" && test "X$F77" != "Xno"; then +- AC_LIBTOOL_LANG_F77_CONFIG +- else +- tagname="" +- fi +- ;; +- +- GCJ) +- if test -n "$GCJ" && test "X$GCJ" != "Xno"; then +- AC_LIBTOOL_LANG_GCJ_CONFIG +- else +- tagname="" +- fi +- ;; +- +- RC) +- AC_LIBTOOL_LANG_RC_CONFIG +- ;; +- +- *) +- AC_MSG_ERROR([Unsupported tag name: $tagname]) +- ;; +- esac +- +- # Append the new tag name to the list of available tags. +- if test -n "$tagname" ; then +- available_tags="$available_tags $tagname" +- fi +- fi +- done +- IFS="$lt_save_ifs" +- +- # Now substitute the updated list of available tags. +- if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then +- mv "${ofile}T" "$ofile" +- chmod +x "$ofile" +- else +- rm -f "${ofile}T" +- AC_MSG_ERROR([unable to update list of available tagged configurations.]) +- fi +-fi +-])# _LT_AC_TAGCONFIG +- +- +-# AC_LIBTOOL_DLOPEN +-# ----------------- +-# enable checks for dlopen support +-AC_DEFUN([AC_LIBTOOL_DLOPEN], +- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +-])# AC_LIBTOOL_DLOPEN +- +- +-# AC_LIBTOOL_WIN32_DLL +-# -------------------- +-# declare package support for building win32 DLLs +-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +-])# AC_LIBTOOL_WIN32_DLL +- +- +-# AC_ENABLE_SHARED([DEFAULT]) +-# --------------------------- +-# implement the --enable-shared flag +-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +-AC_DEFUN([AC_ENABLE_SHARED], +-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +-AC_ARG_ENABLE([shared], +- [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], +- [build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT) +-])# AC_ENABLE_SHARED +- +- +-# AC_DISABLE_SHARED +-# ----------------- +-# set the default shared flag to --disable-shared +-AC_DEFUN([AC_DISABLE_SHARED], +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +-AC_ENABLE_SHARED(no) +-])# AC_DISABLE_SHARED +- +- +-# AC_ENABLE_STATIC([DEFAULT]) +-# --------------------------- +-# implement the --enable-static flag +-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +-AC_DEFUN([AC_ENABLE_STATIC], +-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +-AC_ARG_ENABLE([static], +- [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], +- [build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT) +-])# AC_ENABLE_STATIC +- +- +-# AC_DISABLE_STATIC +-# ----------------- +-# set the default static flag to --disable-static +-AC_DEFUN([AC_DISABLE_STATIC], +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +-AC_ENABLE_STATIC(no) +-])# AC_DISABLE_STATIC +- +- +-# AC_ENABLE_FAST_INSTALL([DEFAULT]) +-# --------------------------------- +-# implement the --enable-fast-install flag +-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +-AC_DEFUN([AC_ENABLE_FAST_INSTALL], +-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +-AC_ARG_ENABLE([fast-install], +- [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], +- [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT) +-])# AC_ENABLE_FAST_INSTALL +- +- +-# AC_DISABLE_FAST_INSTALL +-# ----------------------- +-# set the default to --disable-fast-install +-AC_DEFUN([AC_DISABLE_FAST_INSTALL], +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +-AC_ENABLE_FAST_INSTALL(no) +-])# AC_DISABLE_FAST_INSTALL +- +- +-# AC_LIBTOOL_PICMODE([MODE]) +-# -------------------------- +-# implement the --with-pic flag +-# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +-AC_DEFUN([AC_LIBTOOL_PICMODE], +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +-pic_mode=ifelse($#,1,$1,default) +-])# AC_LIBTOOL_PICMODE +- +- +-# AC_PROG_EGREP +-# ------------- +-# This is predefined starting with Autoconf 2.54, so this conditional +-# definition can be removed once we require Autoconf 2.54 or later. +-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], +- [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 +- then ac_cv_prog_egrep='grep -E' +- else ac_cv_prog_egrep='egrep' +- fi]) +- EGREP=$ac_cv_prog_egrep +- AC_SUBST([EGREP]) +-])]) +- +- +-# AC_PATH_TOOL_PREFIX +-# ------------------- +-# find a file program which can recognize shared library +-AC_DEFUN([AC_PATH_TOOL_PREFIX], +-[AC_REQUIRE([AC_PROG_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="ifelse([$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 <&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 +- +-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 +-])# AC_PATH_TOOL_PREFIX +- +- +-# AC_PATH_MAGIC +-# ------------- +-# find a file program which can recognize a shared library +-AC_DEFUN([AC_PATH_MAGIC], +-[AC_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 +- AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) +- else +- MAGIC_CMD=: +- fi +-fi +-])# AC_PATH_MAGIC +- +- +-# AC_PROG_LD +-# ---------- +-# find the pathname to the GNU or non-GNU linker +-AC_DEFUN([AC_PROG_LD], +-[AC_ARG_WITH([gnu-ld], +- [AC_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]) +-AC_REQUIRE([LT_AC_PROG_SED])dnl +-AC_REQUIRE([AC_PROG_CC])dnl +-AC_REQUIRE([AC_CANONICAL_HOST])dnl +-AC_REQUIRE([AC_CANONICAL_BUILD])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 +- ;; +- +-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* | netbsdelf*-gnu) +- 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=unknown +- ;; +- +-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 +- ;; +- +-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 +- ;; +- +-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) +- 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 +-])# AC_DEPLIBS_CHECK_METHOD +- +- +-# AC_PROG_NM +-# ---------- +-# find the pathname to a BSD-compatible name lister +-AC_DEFUN([AC_PROG_NM], +-[AC_CACHE_CHECK([for BSD-compatible 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 +- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +-fi]) +-NM="$lt_cv_path_NM" +-])# AC_PROG_NM +- +- +-# AC_CHECK_LIBM +-# ------------- +-# check for math library +-AC_DEFUN([AC_CHECK_LIBM], +-[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_CHECK_LIBM +- +- +-# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +-# ----------------------------------- +-# sets LIBLTDL to the link flags for the libltdl convenience library and +-# LTDLINCL to the include flags for the libltdl header and adds +-# --enable-ltdl-convenience to the configure arguments. Note that +-# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +-# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +-# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +-# (note the single quotes!). If your package is not flat and you're not +-# using automake, define top_builddir and top_srcdir appropriately in +-# the Makefiles. +-AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +- case $enable_ltdl_convenience in +- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; +- "") enable_ltdl_convenience=yes +- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; +- esac +- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la +- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) +- # For backwards non-gettext consistent compatibility... +- INCLTDL="$LTDLINCL" +-])# AC_LIBLTDL_CONVENIENCE +- +- +-# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +-# ----------------------------------- +-# sets LIBLTDL to the link flags for the libltdl installable library and +-# LTDLINCL to the include flags for the libltdl header and adds +-# --enable-ltdl-install to the configure arguments. Note that +-# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +-# and an installed libltdl is not found, it is assumed to be `libltdl'. +-# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +-# '${top_srcdir}/' (note the single quotes!). If your package is not +-# flat and you're not using automake, define top_builddir and top_srcdir +-# appropriately in the Makefiles. +-# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +-AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +- AC_CHECK_LIB(ltdl, lt_dlinit, +- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], +- [if test x"$enable_ltdl_install" = xno; then +- AC_MSG_WARN([libltdl not installed, but installation disabled]) +- else +- enable_ltdl_install=yes +- fi +- ]) +- if test x"$enable_ltdl_install" = x"yes"; then +- ac_configure_args="$ac_configure_args --enable-ltdl-install" +- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la +- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) +- else +- ac_configure_args="$ac_configure_args --enable-ltdl-install=no" +- LIBLTDL="-lltdl" +- LTDLINCL= +- fi +- # For backwards non-gettext consistent compatibility... +- INCLTDL="$LTDLINCL" +-])# AC_LIBLTDL_INSTALLABLE +- +- +-# AC_LIBTOOL_CXX +-# -------------- +-# enable support for C++ libraries +-AC_DEFUN([AC_LIBTOOL_CXX], +-[AC_REQUIRE([_LT_AC_LANG_CXX]) +-])# AC_LIBTOOL_CXX +- +- +-# _LT_AC_LANG_CXX +-# --------------- +-AC_DEFUN([_LT_AC_LANG_CXX], +-[AC_REQUIRE([AC_PROG_CXX]) +-AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +-])# _LT_AC_LANG_CXX +- +-# _LT_AC_PROG_CXXCPP +-# ------------------ +-AC_DEFUN([_LT_AC_PROG_CXXCPP], +-[ +-AC_REQUIRE([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 +-fi +-])# _LT_AC_PROG_CXXCPP +- +-# AC_LIBTOOL_F77 +-# -------------- +-# enable support for Fortran 77 libraries +-AC_DEFUN([AC_LIBTOOL_F77], +-[AC_REQUIRE([_LT_AC_LANG_F77]) +-])# AC_LIBTOOL_F77 +- +- +-# _LT_AC_LANG_F77 +-# --------------- +-AC_DEFUN([_LT_AC_LANG_F77], +-[AC_REQUIRE([AC_PROG_F77]) +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +-])# _LT_AC_LANG_F77 +- +- +-# AC_LIBTOOL_GCJ +-# -------------- +-# enable support for GCJ libraries +-AC_DEFUN([AC_LIBTOOL_GCJ], +-[AC_REQUIRE([_LT_AC_LANG_GCJ]) +-])# AC_LIBTOOL_GCJ +- +- +-# _LT_AC_LANG_GCJ +-# --------------- +-AC_DEFUN([_LT_AC_LANG_GCJ], +-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], +- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], +- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], +- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], +- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], +- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +-])# _LT_AC_LANG_GCJ +- +- +-# AC_LIBTOOL_RC +-# ------------- +-# enable support for Windows resource files +-AC_DEFUN([AC_LIBTOOL_RC], +-[AC_REQUIRE([LT_AC_PROG_RC]) +-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +-])# AC_LIBTOOL_RC +- +- +-# AC_LIBTOOL_LANG_C_CONFIG +-# ------------------------ +-# Ensure that the configuration vars for the C compiler are +-# suitably defined. Those variables are subsequently used by +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +-AC_DEFUN([_LT_AC_LANG_C_CONFIG], +-[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_AC_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_AC_SYS_COMPILER +- +-# save warnings/boilerplate of simple test code +-_LT_COMPILER_BOILERPLATE +-_LT_LINKER_BOILERPLATE +- +-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +-AC_LIBTOOL_PROG_COMPILER_PIC($1) +-AC_LIBTOOL_PROG_CC_C_O($1) +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +-AC_LIBTOOL_PROG_LD_SHLIBS($1) +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +-AC_LIBTOOL_SYS_LIB_STRIP +-AC_LIBTOOL_DLOPEN_SELF +- +-# 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]) +- +-AC_LIBTOOL_CONFIG($1) +- +-AC_LANG_POP +-CC="$lt_save_CC" +-])# AC_LIBTOOL_LANG_C_CONFIG +- +- +-# AC_LIBTOOL_LANG_CXX_CONFIG +-# -------------------------- +-# Ensure that the configuration vars for the C compiler are +-# suitably defined. Those variables are subsequently used by +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +-[AC_LANG_PUSH(C++) +-AC_REQUIRE([AC_PROG_CXX]) +-AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +- +-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +-_LT_AC_TAGVAR(allow_undefined_flag, $1)= +-_LT_AC_TAGVAR(always_export_symbols, $1)=no +-_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +-_LT_AC_TAGVAR(hardcode_direct, $1)=no +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +-_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +-_LT_AC_TAGVAR(hardcode_automatic, $1)=no +-_LT_AC_TAGVAR(module_cmds, $1)= +-_LT_AC_TAGVAR(module_expsym_cmds, $1)= +-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +-_LT_AC_TAGVAR(no_undefined_flag, $1)= +-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no +- +-# Dependencies to place before and after the object being linked: +-_LT_AC_TAGVAR(predep_objects, $1)= +-_LT_AC_TAGVAR(postdep_objects, $1)= +-_LT_AC_TAGVAR(predeps, $1)= +-_LT_AC_TAGVAR(postdeps, $1)= +-_LT_AC_TAGVAR(compiler_lib_search_path, $1)= +-_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= +- +-# Source file extension for C++ test sources. +-ac_ext=cpp +- +-# Object file extension for compiled C++ test sources. +-objext=o +-_LT_AC_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(int, char *[[]]) { return(0); }' +- +-# ltmain only uses $CC for tagged configurations so make sure $CC is set. +-_LT_AC_SYS_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_AC_TAGVAR(compiler, $1)=$CC +-_LT_CC_BASENAME([$compiler]) +- +-# We don't want -fno-exception wen compiling C++ code, so set the +-# no_builtin_flag separately +-if test "$GXX" = yes; then +- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +-else +- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +-fi +- +-if test "$GXX" = yes; then +- # Set up default GNU C++ configuration +- +- AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' +- _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' +- else +- _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=yes +-case $host_os in +- aix3*) +- # FIXME: insert proper C++ library support +- _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='' +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' +- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes +- +- 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +- _LT_AC_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 +- +- # It seems that -bexpall does not export symbols beginning with +- # underscore (_), so it is better to generate a list of symbols to export. +- _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' +- # Determine the default libpath from the value encoded in an empty executable. +- _LT_AC_SYS_LIBPATH_AIX +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" +- +- _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +- else +- if test "$host_cpu" = ia64; then +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' +- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" +- _LT_AC_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_AC_SYS_LIBPATH_AIX +- _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' +- # Exported symbols can be pulled into shared objects from archives +- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' +- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes +- # This is similar to how AIX traditionally builds its shared libraries. +- _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported +- # Joseph Beckenbach says some releases of gcc +- # support --undefined. This deserves some investigation. FIXME +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- else +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; +- +- chorus*) +- case $cc_basename in +- *) +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- esac +- ;; +- +- cygwin* | mingw* | pw32*) +- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, +- # as there is no search path for DLLs. +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported +- _LT_AC_TAGVAR(always_export_symbols, $1)=no +- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes +- +- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then +- _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; +- darwin* | rhapsody*) +- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +- _LT_AC_TAGVAR(hardcode_direct, $1)=no +- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' +- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes +- _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" +- if test "$GXX" = yes ; then +- output_verbose_link_cmd='echo' +- _LT_AC_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_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- _LT_AC_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_AC_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}" +- if test "$lt_cv_apple_cc_single_mod" != "yes"; then +- _LT_AC_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_AC_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 +- case $cc_basename in +- xlc*) +- output_verbose_link_cmd='echo' +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' +- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' +- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds +- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' +- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' +- ;; +- *) +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- esac +- fi +- ;; +- +- dgux*) +- case $cc_basename in +- ec++*) +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- ghcx*) +- # Green Hills C++ Compiler +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- *) +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- esac +- ;; +- freebsd[[12]]*) +- # C++ shared libraries reported to be fairly broken before switch to ELF +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- freebsd-elf*) +- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +- ;; +- freebsd* | dragonfly*) +- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF +- # conventions +- _LT_AC_TAGVAR(ld_shlibs, $1)=yes +- ;; +- gnu*) +- ;; +- hpux9*) +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- aCC*) +- _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' +- ;; +- *) +- if test "$GXX" = yes; then +- _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; +- esac +- ;; +- hpux10*|hpux11*) +- if test $with_gnu_ld = no; then +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +- +- case $host_cpu in +- hppa*64*|ia64*) ;; +- *) +- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' +- ;; +- esac +- fi +- case $host_cpu in +- hppa*64*|ia64*) +- _LT_AC_TAGVAR(hardcode_direct, $1)=no +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- ;; +- *) +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- aCC*) +- case $host_cpu in +- hppa*64*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' +- ;; +- ia64*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' +- ;; +- *) +- _LT_AC_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 $list' +- ;; +- *) +- if test "$GXX" = yes; then +- if test $with_gnu_ld = no; then +- case $host_cpu in +- hppa*64*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' +- ;; +- ia64*) +- _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; +- esac +- ;; +- interix[[3-9]]*) +- _LT_AC_TAGVAR(hardcode_direct, $1)=no +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' +- _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' +- else +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' +- fi +- fi +- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes +- ;; +- esac +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +- ;; +- 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_AC_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_AC_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 $list' +- +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' +- _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' +- ;; +- icpc*) +- # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' +- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' +- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' +- ;; +- pgCC* | pgcpp*) +- # Portland Group C++ compiler +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' +- _LT_AC_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' +- +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' +- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' +- _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' +- _LT_AC_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 $templist | $SED "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 $list' +- ;; +- *) +- case `$CC -V 2>&1 | sed 5q` in +- *Sun\ C*) +- # Sun C++ 5.9 +- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' +- _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' +- _LT_AC_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' +- +- # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' +- ;; +- esac +- ;; +- esac +- ;; +- lynxos*) +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- m88k*) +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- mvs*) +- case $cc_basename in +- cxx*) +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- *) +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- esac +- ;; +- netbsd* | netbsdelf*-gnu) +- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' +- wlarc= +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_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::"' +- ;; +- openbsd2*) +- # C++ shared libraries are fairly broken +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- openbsd*) +- if test -f /usr/libexec/ld.so; then +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' +- _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' +- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' +- fi +- output_verbose_link_cmd='echo' +- else +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; +- osf3*) +- 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +- +- # Archives containing C++ object files must be created using +- # "CC -Bstatic", where "CC" is the KAI C++ compiler. +- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' +- +- ;; +- RCC*) +- # Rational C++ 2.4.1 +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- cxx*) +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' +- +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' +- _LT_AC_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 $templist | $SED "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 $list' +- ;; +- *) +- if test "$GXX" = yes && test "$with_gnu_ld" = no; then +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' +- _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' +- +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' +- _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; +- esac +- ;; +- 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +- +- # Archives containing C++ object files must be created using +- # the KAI C++ compiler. +- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' +- ;; +- RCC*) +- # Rational C++ 2.4.1 +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- cxx*) +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' +- _LT_AC_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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ +- $rm $lib.exp' +- +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' +- _LT_AC_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 $templist | $SED "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 $list' +- ;; +- *) +- if test "$GXX" = yes && test "$with_gnu_ld" = no; then +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' +- _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' +- +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' +- _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; +- esac +- ;; +- psos*) +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- sunos4*) +- case $cc_basename in +- CC*) +- # Sun C++ 4.x +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- lcc*) +- # Lucid +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- *) +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- esac +- ;; +- solaris*) +- case $cc_basename in +- CC*) +- # Sun C++ 4.2, 5.x and Centerline C++ +- _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes +- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' +- _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' +- _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' +- ;; +- esac +- _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' +- ;; +- gcx*) +- # Green Hills C++ Compiler +- _LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' +- if $CC --version | grep -v '^2\.7' > /dev/null; then +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' +- _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' +- _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' +- case $host_os in +- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; +- *) +- _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' +- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- runpath_var='LD_RUN_PATH' +- +- case $cc_basename in +- CC*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' +- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' +- ;; +- *) +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' +- _LT_AC_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. +- # 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. +- # So that behaviour is only enabled if SCOABSPATH is set to a +- # non-empty value in the environment. Most likely only useful for +- # creating official distributions of packages. +- # This is a hack until libtool officially supports absolute path +- # names for shared libraries. +- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' +- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' +- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' +- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes +- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' +- runpath_var='LD_RUN_PATH' +- +- case $cc_basename in +- CC*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' +- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' +- ;; +- *) +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' +- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- *) +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- esac +- ;; +- vxworks*) +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- *) +- # FIXME: insert proper C++ library support +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +-esac +-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no +- +-_LT_AC_TAGVAR(GCC, $1)="$GXX" +-_LT_AC_TAGVAR(LD, $1)="$LD" +- +-AC_LIBTOOL_POSTDEP_PREDEP($1) +-AC_LIBTOOL_PROG_COMPILER_PIC($1) +-AC_LIBTOOL_PROG_CC_C_O($1) +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +-AC_LIBTOOL_PROG_LD_SHLIBS($1) +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +- +-AC_LIBTOOL_CONFIG($1) +- +-AC_LANG_POP +-CC=$lt_save_CC +-LDCXX=$LD +-LD=$lt_save_LD +-GCC=$lt_save_GCC +-with_gnu_ldcxx=$with_gnu_ld +-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 +-])# AC_LIBTOOL_LANG_CXX_CONFIG +- +-# AC_LIBTOOL_POSTDEP_PREDEP([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. +-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], +-[AC_REQUIRE([LT_AC_PROG_SED])dnl +-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... +-ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&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_AC_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_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' +- fi +- ;; +- esac +- ;; +-esac +-]) +-case " $_LT_AC_TAGVAR(postdeps, $1) " in +-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; +-esac +-])# AC_LIBTOOL_POSTDEP_PREDEP +- +-# AC_LIBTOOL_LANG_F77_CONFIG +-# -------------------------- +-# Ensure that the configuration vars for the C compiler are +-# suitably defined. Those variables are subsequently used by +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +-AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) +-AC_DEFUN([_LT_AC_LANG_F77_CONFIG], +-[AC_REQUIRE([AC_PROG_F77]) +-AC_LANG_PUSH(Fortran 77) +- +-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +-_LT_AC_TAGVAR(allow_undefined_flag, $1)= +-_LT_AC_TAGVAR(always_export_symbols, $1)=no +-_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +-_LT_AC_TAGVAR(hardcode_direct, $1)=no +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +-_LT_AC_TAGVAR(hardcode_automatic, $1)=no +-_LT_AC_TAGVAR(module_cmds, $1)= +-_LT_AC_TAGVAR(module_expsym_cmds, $1)= +-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +-_LT_AC_TAGVAR(no_undefined_flag, $1)= +-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +-_LT_AC_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_AC_TAGVAR(objext, $1)=$objext +- +-# 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_AC_SYS_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" +-CC=${F77-"f77"} +-compiler=$CC +-_LT_AC_TAGVAR(compiler, $1)=$CC +-_LT_CC_BASENAME([$compiler]) +- +-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_AC_TAGVAR(GCC, $1)="$G77" +-_LT_AC_TAGVAR(LD, $1)="$LD" +- +-AC_LIBTOOL_PROG_COMPILER_PIC($1) +-AC_LIBTOOL_PROG_CC_C_O($1) +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +-AC_LIBTOOL_PROG_LD_SHLIBS($1) +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +- +-AC_LIBTOOL_CONFIG($1) +- +-AC_LANG_POP +-CC="$lt_save_CC" +-])# AC_LIBTOOL_LANG_F77_CONFIG +- +- +-# AC_LIBTOOL_LANG_GCJ_CONFIG +-# -------------------------- +-# Ensure that the configuration vars for the C compiler are +-# suitably defined. Those variables are subsequently used by +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) +-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], +-[AC_LANG_SAVE +- +-# Source file extension for Java test sources. +-ac_ext=java +- +-# Object file extension for compiled Java test sources. +-objext=o +-_LT_AC_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_AC_SYS_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" +-CC=${GCJ-"gcj"} +-compiler=$CC +-_LT_AC_TAGVAR(compiler, $1)=$CC +-_LT_CC_BASENAME([$compiler]) +- +-# GCJ did not exist at the time GCC didn't implicitly link libc in. +-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +- +-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +- +-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +-AC_LIBTOOL_PROG_COMPILER_PIC($1) +-AC_LIBTOOL_PROG_CC_C_O($1) +-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +-AC_LIBTOOL_PROG_LD_SHLIBS($1) +-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +- +-AC_LIBTOOL_CONFIG($1) +- +-AC_LANG_RESTORE +-CC="$lt_save_CC" +-])# AC_LIBTOOL_LANG_GCJ_CONFIG +- +- +-# AC_LIBTOOL_LANG_RC_CONFIG +-# ------------------------- +-# Ensure that the configuration vars for the Windows resource compiler are +-# suitably defined. Those variables are subsequently used by +-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) +-AC_DEFUN([_LT_AC_LANG_RC_CONFIG], +-[AC_LANG_SAVE +- +-# Source file extension for RC test sources. +-ac_ext=rc +- +-# Object file extension for compiled RC test sources. +-objext=o +-_LT_AC_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_AC_SYS_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" +-CC=${RC-"windres"} +-compiler=$CC +-_LT_AC_TAGVAR(compiler, $1)=$CC +-_LT_CC_BASENAME([$compiler]) +-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes +- +-AC_LIBTOOL_CONFIG($1) +- +-AC_LANG_RESTORE +-CC="$lt_save_CC" +-])# AC_LIBTOOL_LANG_RC_CONFIG +- +- +-# AC_LIBTOOL_CONFIG([TAGNAME]) +-# ---------------------------- +-# If TAGNAME is not passed, then 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 +-# TAGNAME from the matching tagged config vars. +-AC_DEFUN([AC_LIBTOOL_CONFIG], +-[# The else clause should only fire when bootstrapping the +-# libtool distribution, otherwise you forgot to ship ltmain.sh +-# with your package, and you will get complaints that there are +-# no rules to generate ltmain.sh. +-if test -f "$ltmain"; then +- # 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 +- # Now quote all the things that may contain metacharacters while being +- # careful not to overquote the AC_SUBSTed values. We take copies of the +- # variables and quote the copies for generation of the libtool script. +- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ +- SED SHELL STRIP \ +- libname_spec library_names_spec soname_spec extract_expsyms_cmds \ +- old_striplib striplib file_magic_cmd finish_cmds finish_eval \ +- deplibs_check_method reload_flag reload_cmds need_locks \ +- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ +- lt_cv_sys_global_symbol_to_c_name_address \ +- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ +- old_postinstall_cmds old_postuninstall_cmds \ +- _LT_AC_TAGVAR(compiler, $1) \ +- _LT_AC_TAGVAR(CC, $1) \ +- _LT_AC_TAGVAR(LD, $1) \ +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ +- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ +- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ +- _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ +- _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ +- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ +- _LT_AC_TAGVAR(old_archive_cmds, $1) \ +- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ +- _LT_AC_TAGVAR(predep_objects, $1) \ +- _LT_AC_TAGVAR(postdep_objects, $1) \ +- _LT_AC_TAGVAR(predeps, $1) \ +- _LT_AC_TAGVAR(postdeps, $1) \ +- _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ +- _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ +- _LT_AC_TAGVAR(archive_cmds, $1) \ +- _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ +- _LT_AC_TAGVAR(postinstall_cmds, $1) \ +- _LT_AC_TAGVAR(postuninstall_cmds, $1) \ +- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ +- _LT_AC_TAGVAR(allow_undefined_flag, $1) \ +- _LT_AC_TAGVAR(no_undefined_flag, $1) \ +- _LT_AC_TAGVAR(export_symbols_cmds, $1) \ +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ +- _LT_AC_TAGVAR(hardcode_automatic, $1) \ +- _LT_AC_TAGVAR(module_cmds, $1) \ +- _LT_AC_TAGVAR(module_expsym_cmds, $1) \ +- _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ +- _LT_AC_TAGVAR(fix_srcfile_path, $1) \ +- _LT_AC_TAGVAR(exclude_expsyms, $1) \ +- _LT_AC_TAGVAR(include_expsyms, $1); do +- +- case $var in +- _LT_AC_TAGVAR(old_archive_cmds, $1) | \ +- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ +- _LT_AC_TAGVAR(archive_cmds, $1) | \ +- _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ +- _LT_AC_TAGVAR(module_cmds, $1) | \ +- _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ +- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ +- _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ +- extract_expsyms_cmds | reload_cmds | finish_cmds | \ +- postinstall_cmds | postuninstall_cmds | \ +- old_postinstall_cmds | old_postuninstall_cmds | \ +- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) +- # Double-quote double-evaled strings. +- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" +- ;; +- *) +- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" +- ;; +- esac +- done +- +- case $lt_echo in +- *'\[$]0 --fallback-echo"') +- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` +- ;; +- esac +- +-ifelse([$1], [], +- [cfgfile="${ofile}T" +- trap "$rm \"$cfgfile\"; exit 1" 1 2 15 +- $rm -f "$cfgfile" +- AC_MSG_NOTICE([creating $ofile])], +- [cfgfile="$ofile"]) +- +- cat <<__EOF__ >> "$cfgfile" +-ifelse([$1], [], +-[#! $SHELL +- +-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +-# NOTE: Changes made to this file will be lost: look at ltmain.sh. +-# +-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +-# Free Software Foundation, Inc. +-# +-# This file is part of GNU Libtool: +-# Originally by Gordon Matzigkeit , 1996 +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, but +-# WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-# General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +-# +-# As a special exception to the GNU General Public License, if you +-# distribute this file as part of a program that contains a +-# configuration script generated by Autoconf, you may include it under +-# the same distribution terms that you use for the rest of that program. +- +-# A sed program that does not truncate output. +-SED=$lt_SED +- +-# Sed that helps us avoid accidentally triggering echo(1) options like -n. +-Xsed="$SED -e 1s/^X//" +- +-# 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 +- +-# The names of the tagged configurations supported by this script. +-available_tags= +- +-# ### BEGIN LIBTOOL CONFIG], +-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) +- +-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +- +-# Shell to use when invoking shell scripts. +-SHELL=$lt_SHELL +- +-# Whether or not to build shared libraries. +-build_libtool_libs=$enable_shared +- +-# Whether or not to build static libraries. +-build_old_libs=$enable_static +- +-# Whether or not to add -lc for building shared libraries. +-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) +- +-# Whether or not to disallow shared libs when runtime libs are static +-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) +- +-# Whether or not to optimize for fast installation. +-fast_install=$enable_fast_install +- +-# The host system. +-host_alias=$host_alias +-host=$host +-host_os=$host_os +- +-# The build system. +-build_alias=$build_alias +-build=$build +-build_os=$build_os +- +-# An echo program that does not interpret backslashes. +-echo=$lt_echo +- +-# The archiver. +-AR=$lt_AR +-AR_FLAGS=$lt_AR_FLAGS +- +-# A C compiler. +-LTCC=$lt_LTCC +- +-# LTCC compiler flags. +-LTCFLAGS=$lt_LTCFLAGS +- +-# A language-specific compiler. +-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) +- +-# Is the compiler the GNU C compiler? +-with_gcc=$_LT_AC_TAGVAR(GCC, $1) +- +-# An ERE matcher. +-EGREP=$lt_EGREP +- +-# The linker used to build libraries. +-LD=$lt_[]_LT_AC_TAGVAR(LD, $1) +- +-# Whether we need hard or soft links. +-LN_S=$lt_LN_S +- +-# A BSD-compatible nm program. +-NM=$lt_NM +- +-# A symbol stripping program +-STRIP=$lt_STRIP +- +-# Used to examine libraries when file_magic_cmd begins "file" +-MAGIC_CMD=$MAGIC_CMD +- +-# Used on cygwin: DLL creation program. +-DLLTOOL="$DLLTOOL" +- +-# Used on cygwin: object dumper. +-OBJDUMP="$OBJDUMP" +- +-# Used on cygwin: assembler. +-AS="$AS" +- +-# The name of the directory that contains temporary libtool files. +-objdir=$objdir +- +-# How to create reloadable object files. +-reload_flag=$lt_reload_flag +-reload_cmds=$lt_reload_cmds +- +-# How to pass a linker flag through the compiler. +-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) +- +-# Object file suffix (normally "o"). +-objext="$ac_objext" +- +-# Old archive suffix (normally "a"). +-libext="$libext" +- +-# Shared library suffix (normally ".so"). +-shrext_cmds='$shrext_cmds' +- +-# Executable file suffix (normally ""). +-exeext="$exeext" +- +-# Additional compiler flags for building library objects. +-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +-pic_mode=$pic_mode +- +-# What is the maximum length of a command? +-max_cmd_len=$lt_cv_sys_max_cmd_len +- +-# Does compiler simultaneously support -c and -o options? +-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) +- +-# Must we lock files when doing compilation? +-need_locks=$lt_need_locks +- +-# Do we need the lib prefix for modules? +-need_lib_prefix=$need_lib_prefix +- +-# Do we need a version for libraries? +-need_version=$need_version +- +-# Whether dlopen is supported. +-dlopen_support=$enable_dlopen +- +-# Whether dlopen of programs is supported. +-dlopen_self=$enable_dlopen_self +- +-# Whether dlopen of statically linked programs is supported. +-dlopen_self_static=$enable_dlopen_self_static +- +-# Compiler flag to prevent dynamic linking. +-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) +- +-# Compiler flag to turn off builtin functions. +-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) +- +-# Compiler flag to allow reflexive dlopens. +-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) +- +-# Compiler flag to generate shared objects directly from archives. +-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) +- +-# Compiler flag to generate thread-safe objects. +-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) +- +-# Library versioning type. +-version_type=$version_type +- +-# Format of library name prefix. +-libname_spec=$lt_libname_spec +- +-# 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. +-library_names_spec=$lt_library_names_spec +- +-# The coded name of the library, if different from the real name. +-soname_spec=$lt_soname_spec +- +-# Commands used to build and install an old-style archive. +-RANLIB=$lt_RANLIB +-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +-old_postinstall_cmds=$lt_old_postinstall_cmds +-old_postuninstall_cmds=$lt_old_postuninstall_cmds +- +-# Create an old-style archive from a shared archive. +-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) +- +-# Create a temporary old-style archive to link instead of a shared archive. +-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) +- +-# Commands used to build and install a shared archive. +-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +-postinstall_cmds=$lt_postinstall_cmds +-postuninstall_cmds=$lt_postuninstall_cmds +- +-# Commands used to build a loadable module (assumed same as above if empty) +-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) +- +-# Commands to strip libraries. +-old_striplib=$lt_old_striplib +-striplib=$lt_striplib +- +-# Dependencies to place before the objects being linked to create a +-# shared library. +-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) +- +-# Dependencies to place after the objects being linked to create a +-# shared library. +-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) +- +-# Dependencies to place before the objects being linked to create a +-# shared library. +-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) +- +-# Dependencies to place after the objects being linked to create a +-# shared library. +-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) +- +-# The directories searched by this compiler when creating a shared +-# library +-compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) +- +-# The library search path used internally by the compiler when linking +-# a shared library. +-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) +- +-# Method to check whether dependent libraries are shared objects. +-deplibs_check_method=$lt_deplibs_check_method +- +-# Command to use when deplibs_check_method == file_magic. +-file_magic_cmd=$lt_file_magic_cmd +- +-# Flag that allows shared libraries with undefined symbols to be built. +-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) +- +-# Flag that forces no undefined symbols. +-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) +- +-# Commands used to finish a libtool library installation in a directory. +-finish_cmds=$lt_finish_cmds +- +-# Same as above, but a single script fragment to be evaled but not shown. +-finish_eval=$lt_finish_eval +- +-# Take the output of nm and produce a listing of raw symbols and C names. +-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe +- +-# Transform the output of nm in a proper C declaration +-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +- +-# Transform the output of nm in a C name address pair +-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address +- +-# This is the shared library runtime path variable. +-runpath_var=$runpath_var +- +-# This is the shared library path variable. +-shlibpath_var=$shlibpath_var +- +-# Is shlibpath searched before the hard-coded library search path? +-shlibpath_overrides_runpath=$shlibpath_overrides_runpath +- +-# How to hardcode a shared library path into an executable. +-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) +- +-# Whether we should hardcode library paths into libraries. +-hardcode_into_libs=$hardcode_into_libs +- +-# Flag to hardcode \$libdir into a binary during linking. +-# This must work even if \$libdir does not exist. +-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $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. +-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) +- +-# Whether we need a single -rpath flag with a separated argument. +-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) +- +-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +-# resulting binary. +-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) +- +-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +-# resulting binary. +-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) +- +-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +-# the resulting binary. +-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) +- +-# Set to yes if building a shared library automatically hardcodes DIR into the library +-# and all subsequent libraries and executables linked against it. +-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) +- +-# Variables whose values should be saved in libtool wrapper scripts and +-# restored at relink time. +-variables_saved_for_relink="$variables_saved_for_relink" +- +-# Whether libtool must link a program against all its dependency libraries. +-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) +- +-# Compile-time system search path for libraries +-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +- +-# Run-time system search path for libraries +-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec +- +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- +-# Set to yes if exported symbols are required. +-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) +- +-# The commands to list exported symbols. +-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) +- +-# The commands to extract the exported symbol list from a shared archive. +-extract_expsyms_cmds=$lt_extract_expsyms_cmds +- +-# Symbols that should not be listed in the preloaded symbols. +-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) +- +-# Symbols that must always be exported. +-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) +- +-ifelse([$1],[], +-[# ### END LIBTOOL CONFIG], +-[# ### END LIBTOOL TAG CONFIG: $tagname]) +- +-__EOF__ +- +-ifelse([$1],[], [ +- case $host_os in +- aix3*) +- cat <<\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 +-EOF +- ;; +- esac +- +- # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || \ +- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") +- chmod +x "$ofile" +-]) +-else +- # If there is no Makefile yet, we rely on a make rule to execute +- # `config.status --recheck' to rerun these tests and create the +- # libtool script then. +- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` +- if test -f "$ltmain_in"; then +- test -f Makefile && make "$ltmain" +- fi +-fi +-])# AC_LIBTOOL_CONFIG +- +- +-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +-# ------------------------------------------- +-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +- +-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +- +-if test "$GCC" = yes; then +- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +- +- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], +- lt_cv_prog_compiler_rtti_exceptions, +- [-fno-rtti -fno-exceptions], [], +- [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +-fi +-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI +- +- +-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +-# --------------------------------- +-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +-[AC_REQUIRE([AC_CANONICAL_HOST]) +-AC_REQUIRE([LT_AC_PROG_SED]) +-AC_REQUIRE([AC_PROG_NM]) +-AC_REQUIRE([AC_OBJEXT]) +-# 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]]*\)' +- +-# Transform an extracted symbol line into a proper C declaration +-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" +- +-# Define system-specific variables. +-case $host_os in +-aix*) +- symcode='[[BCDT]]' +- ;; +-cygwin* | mingw* | pw32*) +- symcode='[[ABCDGISTW]]' +- ;; +-hpux*) # Its linker distinguishes data from code symbols +- if test "$host_cpu" = ia64; then +- symcode='[[ABCDEGRST]]' +- fi +- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" +- ;; +-linux* | k*bsd*-gnu) +- if test "$host_cpu" = ia64; then +- symcode='[[ABCDGIRSTW]]' +- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" +- 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 +- +-# 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 +- +-# If we're using GNU nm, then use its standard symbol codes. +-case `$NM -V 2>&1` in +-*GNU* | *'with BFD'*) +- symcode='[[ABCDGIRSTW]]' ;; +-esac +- +-# Try without a prefix undercore, 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. +- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" +- +- # Check to see that the pipe works correctly. +- pipe_works=no +- +- rm -f conftest* +- cat > conftest.$ac_ext < $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 < conftest.$ac_ext +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-EOF +- # Now generate the symbol file. +- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' +- +- cat <> conftest.$ac_ext +-#if defined (__STDC__) && __STDC__ +-# define lt_ptr_t void * +-#else +-# define lt_ptr_t char * +-# define const +-#endif +- +-/* The mapping between symbol names and symbols. */ +-const struct { +- const char *name; +- lt_ptr_t address; +-} +-lt_preloaded_symbols[[]] = +-{ +-EOF +- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext +- cat <<\EOF >> conftest.$ac_ext +- {0, (lt_ptr_t) 0} +-}; +- +-#ifdef __cplusplus +-} +-#endif +-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_AC_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 +-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +- +- +-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +-# --------------------------------------- +-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= +- +-AC_MSG_CHECKING([for $compiler option to produce PIC]) +- ifelse([$1],[CXX],[ +- # C++ specific cases for pic, static, wl, etc. +- if test "$GXX" = yes; then +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- fi +- ;; +- amigaos*) +- # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' +- ;; +- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) +- # PIC is the default for these OSes. +- ;; +- mingw* | cygwin* | os2* | pw32*) +- # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' +- ;; +- *djgpp*) +- # DJGPP does not support shared libraries at all +- _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic +- fi +- ;; +- hpux*) +- # 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*) +- ;; +- *) +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' +- ;; +- esac +- ;; +- *) +- _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- else +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' +- fi +- ;; +- chorus*) +- case $cc_basename in +- cxch68*) +- # Green Hills C++ Compiler +- # _LT_AC_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 +- ;; +- darwin*) +- # PIC is the default on this platform +- # Common symbols not allowed in MH_DYLIB files +- case $cc_basename in +- xlc*) +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- ;; +- esac +- ;; +- dgux*) +- case $cc_basename in +- ec++*) +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' +- ;; +- ghcx*) +- # Green Hills C++ Compiler +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' +- ;; +- *) +- ;; +- esac +- ;; +- freebsd* | dragonfly*) +- # FreeBSD uses GNU C++ +- ;; +- hpux9* | hpux10* | hpux11*) +- case $cc_basename in +- CC*) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' +- if test "$host_cpu" != ia64; then +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' +- fi +- ;; +- aCC*) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' +- case $host_cpu in +- hppa*64*|ia64*) +- # +Z the default +- ;; +- *) +- _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' +- ;; +- icpc* | ecpc*) +- # Intel C++ +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' +- ;; +- pgCC* | pgcpp*) +- # Portland Group C++ compiler. +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' +- _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' +- ;; +- *) +- case `$CC -V 2>&1 | sed 5q` in +- *Sun\ C*) +- # Sun C++ 5.9 +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' +- ;; +- esac +- ;; +- esac +- ;; +- lynxos*) +- ;; +- m88k*) +- ;; +- mvs*) +- case $cc_basename in +- cxx*) +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' +- ;; +- *) +- ;; +- esac +- ;; +- netbsd* | netbsdelf*-gnu) +- ;; +- osf3* | osf4* | osf5*) +- case $cc_basename in +- KCC*) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' +- ;; +- RCC*) +- # Rational C++ 2.4.1 +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' +- ;; +- cxx*) +- # Digital/Compaq C++ +- _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= +- _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' +- ;; +- gcx*) +- # Green Hills C++ Compiler +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' +- ;; +- *) +- ;; +- esac +- ;; +- sunos4*) +- case $cc_basename in +- CC*) +- # Sun C++ 4.x +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- ;; +- lcc*) +- # Lucid +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' +- ;; +- *) +- ;; +- esac +- ;; +- tandem*) +- case $cc_basename in +- NCC*) +- # NonStop-UX NCC 3.20 +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' +- ;; +- *) +- ;; +- esac +- ;; +- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) +- case $cc_basename in +- CC*) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- ;; +- esac +- ;; +- vxworks*) +- ;; +- *) +- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no +- ;; +- esac +- fi +-], +-[ +- if test "$GCC" = yes; then +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- fi +- ;; +- +- amigaos*) +- # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' +- ;; +- +- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) +- # PIC is the default for these OSes. +- ;; +- +- mingw* | cygwin* | pw32* | os2*) +- # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' +- ;; +- +- 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_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no +- enable_shared=no +- ;; +- +- sysv4*MP*) +- if test -d /usr/nec; then +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic +- fi +- ;; +- +- hpux*) +- # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' +- ;; +- esac +- ;; +- +- *) +- _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- if test "$host_cpu" = ia64; then +- # AIX 5 now supports IA64 processor +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- else +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' +- fi +- ;; +- darwin*) +- # PIC is the default on this platform +- # Common symbols not allowed in MH_DYLIB files +- case $cc_basename in +- xlc*) +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- ;; +- esac +- ;; +- +- mingw* | cygwin* | pw32* | os2*) +- # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) +- ;; +- +- hpux9* | hpux10* | hpux11*) +- _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' +- ;; +- esac +- # Is there a better lt_prog_compiler_static that works with the bundled CC? +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' +- ;; +- +- irix5* | irix6* | nonstopux*) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- # PIC (with -KPIC) is the default. +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' +- ;; +- +- newsos6) +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- ;; +- +- linux* | k*bsd*-gnu) +- case $cc_basename in +- icc* | ecc*) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' +- _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- ;; +- ccc*) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- # All Alpha code is PIC. +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' +- ;; +- *) +- case `$CC -V 2>&1 | sed 5q` in +- *Sun\ C*) +- # Sun C 5.9 +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- ;; +- *Sun\ F*) +- # Sun Fortran 8.3 passes all unrecognized flags to the linker +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' +- ;; +- esac +- ;; +- esac +- ;; +- +- osf3* | osf4* | osf5*) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- # All OSF/1 code is PIC. +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' +- ;; +- +- rdos*) +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' +- ;; +- +- solaris*) +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- case $cc_basename in +- f77* | f90* | f95*) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; +- *) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; +- esac +- ;; +- +- sunos4*) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- ;; +- +- sysv4 | sysv4.2uw2* | sysv4.3*) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- ;; +- +- sysv4*MP*) +- if test -d /usr/nec ;then +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- fi +- ;; +- +- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- ;; +- +- unicos*) +- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' +- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no +- ;; +- +- uts4*) +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' +- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- ;; +- +- *) +- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no +- ;; +- esac +- fi +-]) +-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) +- +-# +-# Check to make sure the PIC flag actually works. +-# +-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then +- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], +- _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), +- [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], +- [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in +- "" | " "*) ;; +- *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; +- esac], +- [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +-fi +-case $host_os in +- # For platforms which do not support PIC, -DPIC is meaningless: +- *djgpp*) +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +- ;; +- *) +- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" +- ;; +-esac +- +-# +-# Check to make sure the static flag actually works. +-# +-wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], +- _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), +- $lt_tmp_static_flag, +- [], +- [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +-]) +- +- +-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +-# ------------------------------------ +-# See if the linker supports building shared libraries. +-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +-[AC_REQUIRE([LT_AC_PROG_SED])dnl +-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +-ifelse([$1],[CXX],[ +- _LT_AC_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_AC_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_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" +- ;; +- cygwin* | mingw*) +- _LT_AC_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' +- ;; +- linux* | k*bsd*-gnu) +- _LT_AC_TAGVAR(link_all_deplibs, $1)=no +- ;; +- *) +- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +- ;; +- esac +- _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +-],[ +- runpath_var= +- _LT_AC_TAGVAR(allow_undefined_flag, $1)= +- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no +- _LT_AC_TAGVAR(archive_cmds, $1)= +- _LT_AC_TAGVAR(archive_expsym_cmds, $1)= +- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= +- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= +- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +- _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +- _LT_AC_TAGVAR(hardcode_direct, $1)=no +- _LT_AC_TAGVAR(hardcode_minus_L, $1)=no +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +- _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +- _LT_AC_TAGVAR(hardcode_automatic, $1)=no +- _LT_AC_TAGVAR(module_cmds, $1)= +- _LT_AC_TAGVAR(module_expsym_cmds, $1)= +- _LT_AC_TAGVAR(always_export_symbols, $1)=no +- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +- # include_expsyms should be a list of space-separated symbols to be *always* +- # included in the symbol list +- _LT_AC_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_AC_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= +- # Just being paranoid about ensuring that cc_basename is set. +- _LT_CC_BASENAME([$compiler]) +- case $host_os in +- cygwin* | mingw* | pw32*) +- # 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' +- _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' +- else +- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +- fi +- supports_anon_versioning=no +- case `$LD -v 2>/dev/null` 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_AC_TAGVAR(ld_shlibs, $1)=no +- cat <&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. +- +-EOF +- fi +- ;; +- +- amigaos*) +- _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes +- +- # Samuel A. Falvo II reports +- # that the semantics of dynamic libraries on AmigaOS, at least up +- # to version 4, is to share data among multiple programs linked +- # with the same dynamic library. Since this doesn't match the +- # behavior of shared libraries on other platforms, we can't use +- # them. +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- +- beos*) +- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported +- # Joseph Beckenbach says some releases of gcc +- # support --undefined. This deserves some investigation. FIXME +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- else +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; +- +- cygwin* | mingw* | pw32*) +- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, +- # as there is no search path for DLLs. +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported +- _LT_AC_TAGVAR(always_export_symbols, $1)=no +- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes +- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' +- +- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then +- _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; +- +- interix[[3-9]]*) +- _LT_AC_TAGVAR(hardcode_direct, $1)=no +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' +- _LT_AC_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_AC_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_AC_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* | k*bsd*-gnu) +- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then +- tmp_addflag= +- case $cc_basename,$host_cpu in +- pgcc*) # Portland Group C compiler +- _LT_AC_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_AC_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' ;; +- esac +- case `$CC -V 2>&1 | sed 5q` in +- *Sun\ C*) # Sun C 5.9 +- _LT_AC_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' +- tmp_sharedflag='-G' ;; +- *Sun\ F*) # Sun Fortran 8.3 +- tmp_sharedflag='-G' ;; +- *) +- tmp_sharedflag='-shared' ;; +- esac +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- +- if test $supports_anon_versioning = yes; then +- _LT_AC_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 +- _LT_AC_TAGVAR(link_all_deplibs, $1)=no +- else +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; +- +- netbsd* | netbsdelf*-gnu) +- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' +- wlarc= +- else +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no +- cat <&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. +- +-EOF +- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_AC_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_AC_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_AC_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 +- ;; +- *) +- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' +- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' +- else +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; +- esac +- ;; +- +- sunos4*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' +- wlarc= +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- ;; +- +- *) +- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; +- esac +- +- if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then +- runpath_var= +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +- _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported +- _LT_AC_TAGVAR(always_export_symbols, $1)=yes +- _LT_AC_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_AC_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_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='' +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' +- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes +- +- 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +- _LT_AC_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 +- +- # It seems that -bexpall does not export symbols beginning with +- # underscore (_), so it is better to generate a list of symbols to export. +- _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' +- # Determine the default libpath from the value encoded in an empty executable. +- _LT_AC_SYS_LIBPATH_AIX +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" +- _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +- else +- if test "$host_cpu" = ia64; then +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' +- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" +- _LT_AC_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_AC_SYS_LIBPATH_AIX +- _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' +- # Exported symbols can be pulled into shared objects from archives +- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' +- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes +- # This is similar to how AIX traditionally builds its shared libraries. +- _LT_AC_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*) +- _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes +- # see comment about different semantics on the GNU ld section +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- +- bsdi[[45]]*) +- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic +- ;; +- +- cygwin* | mingw* | pw32*) +- # 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' +- _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' +- # FIXME: Should let the user specify the lib program. +- _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' +- _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' +- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes +- ;; +- +- darwin* | rhapsody*) +- case $host_os in +- rhapsody* | darwin1.[[012]]) +- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' +- ;; +- *) # Darwin 1.3 on +- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then +- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +- else +- case ${MACOSX_DEPLOYMENT_TARGET} in +- 10.[[012]]) +- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' +- ;; +- 10.*) +- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' +- ;; +- esac +- fi +- ;; +- esac +- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +- _LT_AC_TAGVAR(hardcode_direct, $1)=no +- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' +- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes +- if test "$GCC" = yes ; then +- output_verbose_link_cmd='echo' +- _LT_AC_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_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" +- _LT_AC_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_AC_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}" +- else +- case $cc_basename in +- xlc*) +- output_verbose_link_cmd='echo' +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' +- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' +- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds +- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' +- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' +- ;; +- *) +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- esac +- fi +- ;; +- +- dgux*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- ;; +- +- freebsd1*) +- _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- ;; +- +- # Unfortunately, older versions of FreeBSD 2 do not have this feature. +- freebsd2*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- ;; +- +- # FreeBSD 3 and greater uses gcc -shared to do shared libraries. +- freebsd* | dragonfly*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- ;; +- +- hpux9*) +- if test "$GCC" = yes; then +- _LT_AC_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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- +- # hardcode_minus_L: Not really in the search PATH, +- # but as the default location of the library. +- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes +- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' +- ;; +- +- hpux10*) +- if test "$GCC" = yes -a "$with_gnu_ld" = no; then +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +- else +- _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +- +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' +- ;; +- ia64*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' +- ;; +- *) +- _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' +- ;; +- ia64*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' +- ;; +- *) +- _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +- +- case $host_cpu in +- hppa*64*|ia64*) +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' +- _LT_AC_TAGVAR(hardcode_direct, $1)=no +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- ;; +- *) +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes +- ;; +- esac +- fi +- ;; +- +- irix5* | irix6* | nonstopux*) +- if test "$GCC" = yes; then +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' +- else +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' +- fi +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes +- ;; +- +- netbsd* | netbsdelf*-gnu) +- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out +- else +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF +- fi +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- ;; +- +- newsos6) +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- ;; +- +- openbsd*) +- if test -f /usr/libexec/ld.so; then +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' +- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' +- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' +- else +- case $host_os in +- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' +- ;; +- *) +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' +- ;; +- esac +- fi +- else +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; +- +- os2*) +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported +- _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' +- ;; +- +- osf3*) +- if test "$GCC" = yes; then +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' +- else +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' +- fi +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +- ;; +- +- osf4* | osf5*) # as osf3* with the addition of -msym flag +- if test "$GCC" = yes; then +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' +- else +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' +- _LT_AC_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~ +- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' +- +- # Both c and cxx compiler support -rpath directly +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' +- fi +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: +- ;; +- +- solaris*) +- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' +- if test "$GCC" = yes; then +- wlarc='${wl}' +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' +- _LT_AC_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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' +- else +- wlarc='' +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' +- _LT_AC_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' +- fi +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' +- _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' +- else +- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' +- fi +- ;; +- esac +- _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' +- else +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' +- fi +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes +- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- ;; +- +- sysv4) +- case $host_vendor in +- sni) +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' +- _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? +- ;; +- siemens) +- ## LD is ld it makes a PLAMLIB +- ## CC just makes a GrossModule. +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' +- _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' +- _LT_AC_TAGVAR(hardcode_direct, $1)=no +- ;; +- motorola) +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' +- _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie +- ;; +- esac +- runpath_var='LD_RUN_PATH' +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- ;; +- +- sysv4.3*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' +- ;; +- +- sysv4*MP*) +- if test -d /usr/nec; then +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- runpath_var=LD_RUN_PATH +- hardcode_runpath_var=yes +- _LT_AC_TAGVAR(ld_shlibs, $1)=yes +- fi +- ;; +- +- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) +- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' +- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- runpath_var='LD_RUN_PATH' +- +- if test "$GCC" = yes; then +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' +- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' +- else +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' +- _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' +- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' +- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' +- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' +- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes +- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' +- runpath_var='LD_RUN_PATH' +- +- if test "$GCC" = yes; then +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' +- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' +- else +- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' +- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' +- fi +- ;; +- +- uts4*) +- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' +- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no +- ;; +- +- *) +- _LT_AC_TAGVAR(ld_shlibs, $1)=no +- ;; +- esac +- fi +-]) +-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no +- +-# +-# Do we need to explicitly link libc? +-# +-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +-x|xyes) +- # Assume -lc should be added +- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes +- +- if test "$enable_shared" = yes && test "$GCC" = yes; then +- case $_LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1) +- pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +- compiler_flags=-v +- linker_flags=-v +- verstring= +- output_objdir=. +- libname=conftest +- lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) +- _LT_AC_TAGVAR(allow_undefined_flag, $1)= +- if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) +- then +- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +- else +- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes +- fi +- _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag +- else +- cat conftest.err 1>&5 +- fi +- $rm conftest* +- AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) +- ;; +- esac +- fi +- ;; +-esac +-])# AC_LIBTOOL_PROG_LD_SHLIBS +- +- +-# _LT_AC_FILE_LTDLL_C +-# ------------------- +-# Be careful that the start marker always follows a newline. +-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +-# /* ltdll.c starts here */ +-# #define WIN32_LEAN_AND_MEAN +-# #include +-# #undef WIN32_LEAN_AND_MEAN +-# #include +-# +-# #ifndef __CYGWIN__ +-# # ifdef __CYGWIN32__ +-# # define __CYGWIN__ __CYGWIN32__ +-# # endif +-# #endif +-# +-# #ifdef __cplusplus +-# extern "C" { +-# #endif +-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +-# #ifdef __cplusplus +-# } +-# #endif +-# +-# #ifdef __CYGWIN__ +-# #include +-# DECLARE_CYGWIN_DLL( DllMain ); +-# #endif +-# HINSTANCE __hDllInstance_base; +-# +-# BOOL APIENTRY +-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +-# { +-# __hDllInstance_base = hInst; +-# return TRUE; +-# } +-# /* ltdll.c ends here */ +-])# _LT_AC_FILE_LTDLL_C +- +- +-# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +-# --------------------------------- +-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) +- +- +-# old names +-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) +- +-# This is just to silence aclocal about the macro not being used +-ifelse([AC_DISABLE_FAST_INSTALL]) +- +-AC_DEFUN([LT_AC_PROG_GCJ], +-[AC_CHECK_TOOL(GCJ, gcj, no) +- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" +- AC_SUBST(GCJFLAGS) +-]) +- +-AC_DEFUN([LT_AC_PROG_RC], +-[AC_CHECK_TOOL(RC, windres, no) +-]) +- +- +-# Cheap backport of AS_EXECUTABLE_P and required macros +-# from Autoconf 2.59; we should not use $as_executable_p directly. +- +-# _AS_TEST_PREPARE +-# ---------------- +-m4_ifndef([_AS_TEST_PREPARE], +-[m4_defun([_AS_TEST_PREPARE], +-[if test -x / >/dev/null 2>&1; then +- as_executable_p='test -x' +-else +- as_executable_p='test -f' +-fi +-])])# _AS_TEST_PREPARE +- +-# AS_EXECUTABLE_P +-# --------------- +-# Check whether a file is executable. +-m4_ifndef([AS_EXECUTABLE_P], +-[m4_defun([AS_EXECUTABLE_P], +-[AS_REQUIRE([_AS_TEST_PREPARE])dnl +-$as_executable_p $1[]dnl +-])])# AS_EXECUTABLE_P +- +-# 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. # +-# LT_AC_PROG_SED +-# -------------- +-# Check for a fully-functional sed program, that truncates +-# as few characters as possible. Prefer GNU sed if found. +-AC_DEFUN([LT_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]) +-]) +- + # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation diff --git a/net/stunnel/patches/100-cross-compile.patch b/net/stunnel/patches/100-cross-compile.patch new file mode 100644 index 0000000..5ce3c35 --- /dev/null +++ b/net/stunnel/patches/100-cross-compile.patch @@ -0,0 +1,126 @@ +--- a/configure ++++ b/configure +@@ -21552,56 +21552,56 @@ _ACEOF + fi + rm -f conftest* + +- +-{ echo "$as_me:$LINENO: **************************************** PTY device files" >&5 +-echo "$as_me: **************************************** PTY device files" >&6;} +-{ echo "$as_me:$LINENO: checking for \"/dev/ptmx\"" >&5 +-echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6; } +-if test "${ac_cv_file___dev_ptmx_+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- test "$cross_compiling" = yes && +- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} +- { (exit 1); exit 1; }; } +-if test -r ""/dev/ptmx""; then +- ac_cv_file___dev_ptmx_=yes +-else +- ac_cv_file___dev_ptmx_=no +-fi +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptmx_" >&5 +-echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6; } +-if test $ac_cv_file___dev_ptmx_ = yes; then ++# ++#{ echo "$as_me:$LINENO: **************************************** PTY device files" >&5 ++#echo "$as_me: **************************************** PTY device files" >&6;} ++#{ echo "$as_me:$LINENO: checking for \"/dev/ptmx\"" >&5 ++#echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6; } ++#if test "${ac_cv_file___dev_ptmx_+set}" = set; then ++# echo $ECHO_N "(cached) $ECHO_C" >&6 ++#else ++# test "$cross_compiling" = yes && ++# { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 ++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} ++# { (exit 1); exit 1; }; } ++#if test -r ""/dev/ptmx""; then ++# ac_cv_file___dev_ptmx_=yes ++#else ++# ac_cv_file___dev_ptmx_=no ++#fi ++#fi ++#{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptmx_" >&5 ++#echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6; } ++#if test $ac_cv_file___dev_ptmx_ = yes; then + cat >>confdefs.h <<\_ACEOF +-#define HAVE_DEV_PTMX 1 ++#define HAVE_DEV_PTMX 0 + _ACEOF + +-fi ++#fi + +-{ echo "$as_me:$LINENO: checking for \"/dev/ptc\"" >&5 +-echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6; } +-if test "${ac_cv_file___dev_ptc_+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- test "$cross_compiling" = yes && +- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} +- { (exit 1); exit 1; }; } +-if test -r ""/dev/ptc""; then +- ac_cv_file___dev_ptc_=yes +-else +- ac_cv_file___dev_ptc_=no +-fi +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptc_" >&5 +-echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6; } +-if test $ac_cv_file___dev_ptc_ = yes; then ++#{ echo "$as_me:$LINENO: checking for \"/dev/ptc\"" >&5 ++#echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6; } ++#if test "${ac_cv_file___dev_ptc_+set}" = set; then ++# echo $ECHO_N "(cached) $ECHO_C" >&6 ++#else ++# test "$cross_compiling" = yes && ++# { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 ++#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} ++# { (exit 1); exit 1; }; } ++#if test -r ""/dev/ptc""; then ++# ac_cv_file___dev_ptc_=yes ++#else ++# ac_cv_file___dev_ptc_=no ++#fi ++#fi ++#{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptc_" >&5 ++#echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6; } ++#if test $ac_cv_file___dev_ptc_ = yes; then + cat >>confdefs.h <<\_ACEOF +-#define HAVE_DEV_PTS_AND_PTC 1 ++#define HAVE_DEV_PTS_AND_PTC 0 + _ACEOF + +-fi ++#fi + + + { echo "$as_me:$LINENO: **************************************** entropy" >&5 +@@ -24049,8 +24049,8 @@ _ACEOF + + + # Add SSL includes and libraries +-CFLAGS="$CFLAGS -I$ssldir/include" +-LIBS="$LIBS -L$ssldir/lib -lssl -lcrypto" ++CFLAGS="$CFLAGS" ++LIBS="$LIBS -lssl -lcrypto" + + # Check for obsolete RSAref library + { echo "$as_me:$LINENO: checking for obsolete RSAref library" >&5 +--- a/configure.ac ++++ b/configure.ac +@@ -44,10 +44,6 @@ AC_EGREP_HEADER(socklen_t, sys/socket.h, + AC_MSG_RESULT([no (defined as int)]) + AC_DEFINE(socklen_t, int)) + +-AC_MSG_NOTICE([**************************************** PTY device files]) +-AC_CHECK_FILE("/dev/ptmx", AC_DEFINE(HAVE_DEV_PTMX)) +-AC_CHECK_FILE("/dev/ptc", AC_DEFINE(HAVE_DEV_PTS_AND_PTC)) +- + AC_MSG_NOTICE([**************************************** entropy]) + + AC_ARG_WITH(egd-socket, diff --git a/net/stunnel/patches/101-no-comp.patch b/net/stunnel/patches/101-no-comp.patch new file mode 100644 index 0000000..9fbe22c --- /dev/null +++ b/net/stunnel/patches/101-no-comp.patch @@ -0,0 +1,28 @@ +--- a/src/ssl.c ++++ b/src/ssl.c +@@ -72,14 +72,17 @@ int ssl_configure(void) { /* configure g + s_log(LOG_NOTICE, "FIPS mode %s", + global_options.option.fips ? "enabled" : "disabled"); + #endif /* USE_FIPS */ ++#ifndef OPENSSL_NO_COMP + if(global_options.compression!=COMP_NONE && !init_compression()) + return 0; ++#endif + if(!init_prng()) + return 0; + s_log(LOG_DEBUG, "PRNG seeded successfully"); + return 1; /* SUCCESS */ + } + ++#ifndef OPENSSL_NO_COMP + static int init_compression(void) { + int id=0; + COMP_METHOD *cm=NULL; +@@ -111,6 +114,7 @@ static int init_compression(void) { + s_log(LOG_INFO, "Compression enabled using %s method", name); + return 1; + } ++#endif + + static int init_prng(void) { + int totbytes=0; diff --git a/net/stunnel/patches/102-no-ssl2.patch b/net/stunnel/patches/102-no-ssl2.patch new file mode 100644 index 0000000..e94184b --- /dev/null +++ b/net/stunnel/patches/102-no-ssl2.patch @@ -0,0 +1,13 @@ +--- a/src/options.c ++++ b/src/options.c +@@ -1234,8 +1234,10 @@ static char *parse_service_option(CMD cm + section->client_method=(SSL_METHOD *)SSLv23_client_method(); + section->server_method=(SSL_METHOD *)SSLv23_server_method(); + } else if(!strcasecmp(arg, "SSLv2")) { ++#ifndef OPENSSL_NO_SSL2 + section->client_method=(SSL_METHOD *)SSLv2_client_method(); + section->server_method=(SSL_METHOD *)SSLv2_server_method(); ++#endif + } else if(!strcasecmp(arg, "SSLv3")) { + section->client_method=(SSL_METHOD *)SSLv3_client_method(); + section->server_method=(SSL_METHOD *)SSLv3_server_method(); diff --git a/net/stunnel/patches/103-no-zlib-link.patch b/net/stunnel/patches/103-no-zlib-link.patch new file mode 100644 index 0000000..f627c53 --- /dev/null +++ b/net/stunnel/patches/103-no-zlib-link.patch @@ -0,0 +1,12 @@ +Avoid linking with zlib, which is a dependency of openssl, not ours. +--- a/configure ++++ b/configure +@@ -23017,7 +23017,7 @@ if test $ac_cv_lib_z_inflateEnd = yes; t + #define HAVE_LIBZ 1 + _ACEOF + +- LIBS="-lz $LIBS" ++# LIBS="-lz $LIBS" + + fi + diff --git a/net/stunnel/patches/104-fix-paths.patch b/net/stunnel/patches/104-fix-paths.patch new file mode 100644 index 0000000..aad310b --- /dev/null +++ b/net/stunnel/patches/104-fix-paths.patch @@ -0,0 +1,42 @@ +## Do several path fixups, removing unneeded @prefix@s +--- a/tools/stunnel.conf-sample.in ++++ b/tools/stunnel.conf-sample.in +@@ -4,15 +4,15 @@ + ; please read the manual and make sure you understand them + + ; certificate/key is needed in server mode and optional in client mode +-cert = @prefix@/etc/stunnel/mail.pem +-;key = @prefix@/etc/stunnel/mail.pem ++cert = @sysconfdir@/stunnel/stunnel.pem ++;key = @sysconfdir@/stunnel/stunnel.pem + + ; protocol version (all, SSLv2, SSLv3, TLSv1) + sslVersion = SSLv3 + + ; security enhancements for UNIX systems - comment them out on Win32 + ; for chroot a copy of some devices and files is needed within the jail +-chroot = @prefix@/var/lib/stunnel/ ++chroot = @localstatedir@ + setuid = nobody + setgid = @DEFAULT_GROUP@ + ; PID is created inside the chroot jail +@@ -33,16 +33,16 @@ socket = r:TCP_NODELAY=1 + ; CApath is located inside chroot jail + ;CApath = /certs + ; it's often easier to use CAfile +-;CAfile = @prefix@/etc/stunnel/certs.pem ++;CAfile = @sysconfdir@/stunnel/certs.pem + ; don't forget to c_rehash CRLpath + ; CRLpath is located inside chroot jail + ;CRLpath = /crls + ; alternatively CRLfile can be used +-;CRLfile = @prefix@/etc/stunnel/crls.pem ++;CRLfile = @sysconfdir@/stunnel/crls.pem + + ; debugging stuff (may useful for troubleshooting) + ;debug = 7 +-;output = stunnel.log ++;output = @localstatedir@/log/stunnel.log + + ; SSL client mode + ;client = yes diff --git a/net/stunnel/patches/105-stunnel-conf.patch b/net/stunnel/patches/105-stunnel-conf.patch new file mode 100644 index 0000000..c22e0b4 --- /dev/null +++ b/net/stunnel/patches/105-stunnel-conf.patch @@ -0,0 +1,54 @@ +--- a/tools/stunnel.conf-sample.in ++++ b/tools/stunnel.conf-sample.in +@@ -8,7 +8,7 @@ cert = @sysconfdir@/stunnel/stunnel.pem + ;key = @sysconfdir@/stunnel/stunnel.pem + + ; protocol version (all, SSLv2, SSLv3, TLSv1) +-sslVersion = SSLv3 ++sslVersion = all + + ; security enhancements for UNIX systems - comment them out on Win32 + ; for chroot a copy of some devices and files is needed within the jail +@@ -49,21 +49,26 @@ socket = r:TCP_NODELAY=1 + + ; service-level configuration + +-[pop3s] +-accept = 995 +-connect = 110 +- +-[imaps] +-accept = 993 +-connect = 143 +- +-[ssmtp] +-accept = 465 +-connect = 25 +- +-;[https] +-;accept = 443 +-;connect = 80 +-;TIMEOUTclose = 0 ++;[pop3s] ++;accept = 995 ++;connect = 110 ++ ++;[imaps] ++;accept = 993 ++;connect = 143 ++ ++;[ssmtp] ++;accept = 465 ++;connect = 25 ++ ++[https] ++accept = 443 ++connect = 80 ++TIMEOUTclose = 0 ++ ++[chilli] ++accept = 3443 ++connect = 3442 ++TIMEOUTclose = 0 + + ; vim:ft=dosini diff --git a/net/stunnel/patches/106-stunnel-xforwardedfor.patch b/net/stunnel/patches/106-stunnel-xforwardedfor.patch new file mode 100644 index 0000000..497ff6d --- /dev/null +++ b/net/stunnel/patches/106-stunnel-xforwardedfor.patch @@ -0,0 +1,248 @@ +--- a/doc/stunnel.8 ++++ b/doc/stunnel.8 +@@ -504,7 +504,10 @@ time to keep an idle connection + .IP "\fBtransparent\fR = yes | no (Unix only)" 4 + .IX Item "transparent = yes | no (Unix only)" + transparent proxy mode +-.Sp ++.IP "\fBxforwardedfor\fR = yes | no" 4 ++.IX Item "xforwardedfor = yes | no" ++append an 'X-Forwarded-For:' HTTP request header providing the ++client's IP address to the server. + Re-write address to appear as if wrapped daemon is connecting + from the \s-1SSL\s0 client machine instead of the machine running \fBstunnel\fR. + .Sp +--- a/doc/stunnel.fr.8 ++++ b/doc/stunnel.fr.8 +@@ -445,6 +445,10 @@ Cette option permet de relier une adress + Négocie avec \s-1SSL\s0 selon le protocole indiqué + .Sp + Actuellement gérés\ : cifs, nntp, pop3, smtp ++.IP "\fBxforwardedfor\fR = yes | no" 4 ++.IX Item "xforwardedfor = yes | no" ++Ajoute un en-tête 'X-Forwarded-For:' dans la requête HTTP fournissant ++au serveur l'adresse IP du client. + .IP "\fBpty\fR = yes | no (Unix seulement)" 4 + .IX Item "pty = yes | no (Unix seulement)" + Alloue un pseudo-terminal pour l'option «\ exec\ » +--- a/src/client.c ++++ b/src/client.c +@@ -86,6 +86,12 @@ CLI *alloc_client_session(SERVICE_OPTION + return NULL; + } + c->opt=opt; ++ /* some options need space to add some information */ ++ if (c->opt->option.xforwardedfor) ++ c->buffsize = BUFFSIZE - BUFF_RESERVED; ++ else ++ c->buffsize = BUFFSIZE; ++ c->crlf_seen=0; + c->local_rfd.fd=rfd; + c->local_wfd.fd=wfd; + return c; +@@ -376,6 +382,29 @@ static void init_ssl(CLI *c) { + } + } + ++/* Moves all data from the buffer between positions and ++ * to insert of length . and are updated to their ++ * new respective values, and the number of characters inserted is returned. ++ * If is too long, nothing is done and -1 is returned. ++ * Note that neither nor can be NULL. ++*/ ++static int buffer_insert_with_len(char *buffer, int *start, int *stop, int limit, char *string, int len) { ++ if (len > limit - *stop) ++ return -1; ++ if (*start > *stop) ++ return -1; ++ memmove(buffer + *start + len, buffer + *start, *stop - *start); ++ memcpy(buffer + *start, string, len); ++ *start += len; ++ *stop += len; ++ return len; ++} ++ ++static int buffer_insert(char *buffer, int *start, int *stop, int limit, char *string) { ++ return buffer_insert_with_len(buffer, start, stop, limit, string, strlen(string)); ++} ++ ++ + /****************************** some defines for transfer() */ + /* is socket/SSL open for read/write? */ + #define sock_rd (c->sock_rfd->rd) +@@ -410,13 +439,16 @@ static void transfer(CLI *c) { + check_SSL_pending=0; + + SSL_read_wants_read= +- ssl_rd && c->ssl_ptrssl_ptrssl_ptrbuffsize && !SSL_read_wants_write; ++ + SSL_write_wants_write= + ssl_wr && c->sock_ptr && !SSL_write_wants_read; + + /****************************** setup c->fds structure */ + s_poll_init(&c->fds); /* initialize the structure */ +- if(sock_rd && c->sock_ptrsock_ptrsock_ptrbuffsize) + s_poll_add(&c->fds, c->sock_rfd->fd, 1, 0); + if(SSL_read_wants_read || + SSL_write_wants_read || +@@ -515,7 +547,8 @@ static void transfer(CLI *c) { + break; + default: + memmove(c->ssl_buff, c->ssl_buff+num, c->ssl_ptr-num); +- if(c->ssl_ptr==BUFFSIZE) /* buffer was previously full */ ++ //if(c->ssl_ptr==BUFFSIZE) /* buffer was previously full */ ++ if(c->ssl_ptr>=c->buffsize) /* buffer was previously full */ + check_SSL_pending=1; /* check for data buffered by SSL */ + c->ssl_ptr-=num; + c->sock_bytes+=num; +@@ -577,7 +610,8 @@ static void transfer(CLI *c) { + /****************************** read from socket */ + if(sock_rd && sock_can_rd) { + num=readsocket(c->sock_rfd->fd, +- c->sock_buff+c->sock_ptr, BUFFSIZE-c->sock_ptr); ++ //c->sock_buff+c->sock_ptr, BUFFSIZE-c->sock_ptr); ++ c->sock_buff+c->sock_ptr, c->buffsize-c->sock_ptr); + switch(num) { + case -1: + parse_socket_error(c, "readsocket"); +@@ -597,10 +631,73 @@ static void transfer(CLI *c) { + (SSL_read_wants_write && ssl_can_wr) || + (check_SSL_pending && SSL_pending(c->ssl))) { + SSL_read_wants_write=0; +- num=SSL_read(c->ssl, c->ssl_buff+c->ssl_ptr, BUFFSIZE-c->ssl_ptr); ++ //num=SSL_read(c->ssl, c->ssl_buff+c->ssl_ptr, BUFFSIZE-c->ssl_ptr); ++ num=SSL_read(c->ssl, c->ssl_buff+c->ssl_ptr, c->buffsize-c->ssl_ptr); + switch(err=SSL_get_error(c->ssl, num)) { + case SSL_ERROR_NONE: ++ //c->ssl_ptr+=num; ++ if (c->buffsize != BUFFSIZE && c->opt->option.xforwardedfor) { /* some work left to do */ ++ int last = c->ssl_ptr; ++ c->ssl_ptr += num; ++ ++ /* Look for end of HTTP headers between last and ssl_ptr. ++ * To achieve this reliably, we have to count the number of ++ * successive [CR]LF and to memorize it in case it's spread ++ * over multiple segments. --WT. ++ */ ++ while (last < c->ssl_ptr) { ++ if (c->ssl_buff[last] == '\n') { ++ if (++c->crlf_seen == 2) ++ break; ++ } else if (last < c->ssl_ptr - 1 && ++ c->ssl_buff[last] == '\r' && ++ c->ssl_buff[last+1] == '\n') { ++ if (++c->crlf_seen == 2) ++ break; ++ last++; ++ } else if (c->ssl_buff[last] != '\r') ++ /* don't refuse '\r' because we may get a '\n' on next read */ ++ c->crlf_seen = 0; ++ last++; ++ } ++ if (c->crlf_seen >= 2) { ++ /* We have all the HTTP headers now. We don't need to ++ * reserve any space anymore. points to the ++ * first byte of unread data, and points to the ++ * exact location where we want to insert our headers, ++ * which is right before the empty line. ++ */ ++ c->buffsize = BUFFSIZE; ++ ++ if (c->opt->option.xforwardedfor) { ++ /* X-Forwarded-For: xxxx \r\n\0 */ ++ char xforw[17 + IPLEN + 3]; ++ ++ /* We will insert our X-Forwarded-For: header here. ++ * We need to write the IP address, but if we use ++ * sprintf, it will pad with the terminating 0. ++ * So we will pass via a temporary buffer allocated ++ * on the stack. ++ */ ++ memcpy(xforw, "X-Forwarded-For: ", 17); ++ if (getnameinfo(&c->peer_addr.addr[0].sa, ++ addr_len(c->peer_addr.addr[0]), ++ xforw + 17, IPLEN, NULL, 0, ++ NI_NUMERICHOST) == 0) { ++ strcat(xforw + 17, "\r\n"); ++ buffer_insert(c->ssl_buff, &last, &c->ssl_ptr, ++ c->buffsize, xforw); ++ } ++ /* last still points to the \r\n and ssl_ptr to the ++ * end of the buffer, so we may add as many headers ++ * as wee need to. ++ */ ++ } ++ } ++ } ++ else + c->ssl_ptr+=num; ++ + watchdog=0; /* reset watchdog */ + break; + case SSL_ERROR_WANT_WRITE: +--- a/src/common.h ++++ b/src/common.h +@@ -53,6 +53,9 @@ + /* I/O buffer size */ + #define BUFFSIZE 16384 + ++/* maximum space reserved for header insertion in BUFFSIZE */ ++#define BUFF_RESERVED 1024 ++ + /* length of strings (including the terminating '\0' character) */ + /* it can't be lower than 256 bytes or NTLM authentication will break */ + #define STRLEN 256 +--- a/src/options.c ++++ b/src/options.c +@@ -792,6 +792,28 @@ static char *parse_service_option(CMD cm + } + #endif + ++ /* xforwardedfor */ ++ switch(cmd) { ++ case CMD_INIT: ++ section->option.xforwardedfor=0; ++ break; ++ case CMD_EXEC: ++ if(strcasecmp(opt, "xforwardedfor")) ++ break; ++ if(!strcasecmp(arg, "yes")) ++ section->option.xforwardedfor=1; ++ else if(!strcasecmp(arg, "no")) ++ section->option.xforwardedfor=0; ++ else ++ return "argument should be either 'yes' or 'no'"; ++ return NULL; /* OK */ ++ case CMD_DEFAULT: ++ break; ++ case CMD_HELP: ++ s_log("%-15s = yes|no append an HTTP X-Forwarded-For header","xforwardedfor"); ++ break; ++ } ++ + /* exec */ + switch(cmd) { + case CMD_INIT: +--- a/src/prototypes.h ++++ b/src/prototypes.h +@@ -177,6 +177,7 @@ typedef struct service_options_struct { + unsigned int remote:1; + unsigned int retry:1; /* loop remote+program */ + unsigned int sessiond:1; ++ unsigned int xforwardedfor:1; + unsigned int program:1; + #ifndef USE_WIN32 + unsigned int pty:1; +@@ -351,6 +352,8 @@ typedef struct { + FD *ssl_rfd, *ssl_wfd; /* read and write SSL descriptors */ + int sock_bytes, ssl_bytes; /* bytes written to socket and ssl */ + s_poll_set fds; /* file descriptors */ ++ int buffsize; /* current buffer size, may be lower than BUFFSIZE */ ++ int crlf_seen; /* the number of successive CRLF seen */ + } CLI; + + extern int max_fds, max_clients; diff --git a/net/subversion/Makefile b/net/subversion/Makefile new file mode 100644 index 0000000..690f10d --- /dev/null +++ b/net/subversion/Makefile @@ -0,0 +1,128 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=subversion +PKG_VERSION:=1.6.17 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://subversion.tigris.org/downloads +PKG_MD5SUM:=81e5dc5beee4b3fc025ac70c0b6caa14 + +PKG_FIXUP:=libtool +PKG_MACRO_PATHS:=build/ac-macros + +include $(INCLUDE_DIR)/package.mk + +define Package/subversion/Default + SECTION:=net + CATEGORY:=Network + TITLE:=A compelling replacement for CVS + DEPENDS:=+zlib +libneon +libaprutil + URL:=http://subversion.apache.org/ + SUBMENU:=Version Control Systems +endef + +define Package/subversion/Default/description + Subversion is a free/open-source version control system. That is, + Subversion manages files and directories, and the changes made to them, + over time. This allows you to recover older versions of your data, or + examine the history of how your data changed. In this regard, many + people think of a version control system as a sort of time machine. +endef + +define Package/subversion-libs + $(call Package/subversion/Default) + TITLE:=subversion libs +endef + +define Package/subversion-libs/description + $(call Package/subversion/Default/description) + This package contains the subversion libraries. +endef + +define Package/subversion-client + $(call Package/subversion/Default) + DEPENDS+=subversion-libs + TITLE:=subversion client tools +endef + +define Package/subversion-client/description + $(call Package/subversion/Default/description) + This package contains the subversion client tools. +endef + +define Package/subversion-server + $(call Package/subversion/Default) + DEPENDS+=subversion-libs + TITLE:=subversion server +endef + +define Package/subversion-server/description + $(call Package/subversion/Default/description) + This package contains the subversion server. +endef + +define Package/subversion-server/conffiles +/etc/config/subversion +endef + +TARGET_CFLAGS += $(FPIC) +TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE + +CONFIGURE_ARGS += \ + --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \ + --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \ + --with-neon="$(STAGING_DIR)/usr" \ + --disable-mod-activation \ + --without-ruby-sitedir \ + --without-swig \ + --with-jikes=no \ + --without-junit \ + --without-berkeley-db \ + --with-ssl \ + --disable-neon-version-check \ + --with-apxs=no \ + --without-sasl \ + +CONFIGURE_VARS += \ + svn_lib_neon=yes \ + LDFLAGS="$(TARGET_LDFLAGS) -lcrypt -lm \ + -lz -lpthread -L$(TOOLCHAIN_DIR)/usr/lib \ + -L$(TOOLCHAIN_DIR)/lib" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all local-install +endef + +define Package/subversion-libs/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/ +endef + +define Package/subversion-client/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{svn,svnversion,svnsync} $(1)/usr/bin/ +endef + +define Package/subversion-server/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svn{look,admin,dumpfilter,serve} $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/subversion.config $(1)/etc/config/subversion + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/subversion.init $(1)/etc/init.d/subversion +endef + +$(eval $(call BuildPackage,subversion-libs)) +$(eval $(call BuildPackage,subversion-client)) +$(eval $(call BuildPackage,subversion-server)) diff --git a/net/subversion/files/subversion.config b/net/subversion/files/subversion.config new file mode 100644 index 0000000..3297c8d --- /dev/null +++ b/net/subversion/files/subversion.config @@ -0,0 +1,3 @@ +config subversion + option path '/var/local/svn' + option port '3690' diff --git a/net/subversion/files/subversion.init b/net/subversion/files/subversion.init new file mode 100644 index 0000000..6b24f58 --- /dev/null +++ b/net/subversion/files/subversion.init @@ -0,0 +1,35 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start_service () { + local section="$1" + config_get path "$section" path + config_get port "$section" port + + if [ ! -d "$path" ]; then + echo "The subversion repository (${path}) does not exist." + echo "Create a new repository and/or change the path in /etc/config/subversion" + echo + echo "Create a new subversion repository with:" + echo " mkdir -p /srv" + echo " svnadmin create --fs-type fsfs /srv/svn" + echo + echo "Changing the path using UCI (default path is: /var/local/svn):" + echo " uci set subversion.cfg1.path="/srv/svn"" + echo " uci commit" + echo " /etc/init.d/subversion restart" + exit 1 + fi + + svnserve -d --listen-port ${port} -r ${path} +} + +start() { + config_load "subversion" + config_foreach start_service subversion +} + +stop() { + killall -9 svnserve +} diff --git a/net/synce-dccm/Makefile b/net/synce-dccm/Makefile new file mode 100644 index 0000000..c3059f1 --- /dev/null +++ b/net/synce-dccm/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=synce-dccm +PKG_VERSION:=0.9.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/synce +PKG_MD5SUM:=8818b71133049fe9c739166225aebe0c + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/synce-dccm + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libsynce $(ICONV_DEPENDS) + TITLE:=dccm for mobiles + URL:=http://sourceforge.net/projects/synce/ +endef + +define Package/synce-dccm/description +Description TBD +endef + +CONFIGURE_VARS+= \ + CPPFLAGS="$$$$CPPFLAGS -I$(ICONV_PREFIX)/include" \ + CPPFLAGS="$$$$CPPFLAGS -I$(INTL_PREFIX)/include" \ + CPPFLAGS="$$$$CPPFLAGS -Wl,-rpath-link,$(STAGING_DIR)/usr/lib:$(ICONV_PREFIX)/lib:$(INTL_PREFIX)/lib" + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + LDFLAGS="$(TARGET_LDFLAGS) -L$(ICONV_PREFIX)/lib" \ + LIBS="-lsynce -liconv" \ + all install +endef + +define Package/synce-dccm/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dccm $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,synce-dccm)) +#LIBS="-Wl,-Bstatic,-lsynce,-Bdynamic,-liconv" \ diff --git a/net/tcpdump/Makefile b/net/tcpdump/Makefile new file mode 100644 index 0000000..ec6703b --- /dev/null +++ b/net/tcpdump/Makefile @@ -0,0 +1,79 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tcpdump +PKG_VERSION:=4.1.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.tcpdump.org/release/ \ + http://ftp.gwdg.de/pub/misc/tcpdump/ \ + http://www.at.tcpdump.org/ \ + http://www.br.tcpdump.org/ +PKG_MD5SUM:=d0dd58bbd6cd36795e05c6f1f74420b0 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/tcpdump/default + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap + TITLE:=Network monitoring and data acquisition tool + URL:=http://www.tcpdump.org/ +endef + +define Package/tcpdump + $(Package/tcpdump/default) + VARIANT:=full +endef + +define Package/tcpdump-mini + $(Package/tcpdump/default) + TITLE+= (minimal version) + VARIANT:=mini +endef + +CONFIGURE_ARGS += \ + --without-crypto \ + --enable-ipv6 + +CONFIGURE_VARS += \ + BUILD_CC="$(TARGET_CC)" \ + HOSTCC="$(HOSTCC)" \ + td_cv_buggygetaddrinfo="no" \ + ac_cv_linux_vers=$(LINUX_VERSION) \ + ac_cv_header_rpc_rpcent_h=no \ + ac_cv_lib_rpc_main=no \ + ac_cv_path_PCAP_CONFIG="" + +MAKE_FLAGS := + +ifeq ($(BUILD_VARIANT),mini) + TARGET_CFLAGS += -DTCPDUMP_MINI + CONFIGURE_ARGS += --disable-smb + MAKE_FLAGS += TCPDUMP_MINI=1 +endif + +MAKE_FLAGS += \ + CCOPT="$(TARGET_CFLAGS)" INCLS="-I. $(TARGET_CPPFLAGS)" + + +define Package/tcpdump/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tcpdump $(1)/usr/sbin/ +endef + +Package/tcpdump-mini/install = $(Package/tcpdump/install) + +$(eval $(call BuildPackage,tcpdump)) +$(eval $(call BuildPackage,tcpdump-mini)) diff --git a/net/tcpdump/patches/001-remove_pcap_debug.patch b/net/tcpdump/patches/001-remove_pcap_debug.patch new file mode 100644 index 0000000..b67c434 --- /dev/null +++ b/net/tcpdump/patches/001-remove_pcap_debug.patch @@ -0,0 +1,23 @@ +--- a/tcpdump.c ++++ b/tcpdump.c +@@ -901,20 +901,6 @@ main(int argc, char **argv) + error("invalid data link type %s", gndo->ndo_dltname); + break; + +-#if defined(HAVE_PCAP_DEBUG) || defined(HAVE_YYDEBUG) +- case 'Y': +- { +- /* Undocumented flag */ +-#ifdef HAVE_PCAP_DEBUG +- extern int pcap_debug; +- pcap_debug = 1; +-#else +- extern int yydebug; +- yydebug = 1; +-#endif +- } +- break; +-#endif + case 'z': + if (optarg) { + zflag = strdup(optarg); diff --git a/net/tcpdump/patches/002-remove_static_libpcap_check.patch b/net/tcpdump/patches/002-remove_static_libpcap_check.patch new file mode 100644 index 0000000..0bffaab --- /dev/null +++ b/net/tcpdump/patches/002-remove_static_libpcap_check.patch @@ -0,0 +1,72 @@ +--- a/configure ++++ b/configure +@@ -9440,28 +9440,6 @@ echo "${ECHO_T}Using $pfopen" >&6; } + LIBS="$LIBS $pfopen" + fi + fi +- { echo "$as_me:$LINENO: checking for local pcap library" >&5 +-echo $ECHO_N "checking for local pcap library... $ECHO_C" >&6; } +- libpcap=FAIL +- lastdir=FAIL +- places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \ +- egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'` +- for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do +- basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \ +- sed -e 's/-PRE-GIT$//' ` +- if test $lastdir = $basedir ; then +- continue; +- fi +- lastdir=$dir +- if test -r $dir/libpcap.a ; then +- libpcap=$dir/libpcap.a +- d=$dir +- fi +- done +- if test $libpcap = FAIL ; then +- { echo "$as_me:$LINENO: result: not found" >&5 +-echo "${ECHO_T}not found" >&6; } +- + # + # Look for pcap-config. + # +@@ -9580,40 +9558,6 @@ fi + echo "$as_me: error: see the INSTALL doc for more info" >&2;} + { (exit 1); exit 1; }; } + fi +- { echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5 +-echo $ECHO_N "checking for extraneous pcap header directories... $ECHO_C" >&6; } +- if test \( ! -r /usr/local/include/pcap.h \) -a \ +- \( ! -r /usr/include/pcap.h \); then +- if test -r /usr/local/include/pcap/pcap.h; then +- d="/usr/local/include/pcap" +- elif test -r /usr/include/pcap/pcap.h; then +- d="/usr/include/pcap" +- fi +- fi +- if test -z "$d" ; then +- { echo "$as_me:$LINENO: result: not found" >&5 +-echo "${ECHO_T}not found" >&6; } +- else +- V_INCLS="-I$d $V_INCLS" +- { echo "$as_me:$LINENO: result: found -- -I$d added" >&5 +-echo "${ECHO_T}found -- -I$d added" >&6; } +- fi +- fi +- else +- V_PCAPDEP=$libpcap +- places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \ +- egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'` +- if test -r $d/pcap.h; then +- V_INCLS="-I$d $V_INCLS" +- elif test -r $places/pcap.h; then +- V_INCLS="-I$places $V_INCLS" +- else +- { { echo "$as_me:$LINENO: error: cannot find pcap.h" >&5 +-echo "$as_me: error: cannot find pcap.h" >&2;} +- { (exit see INSTALL); exit see INSTALL; }; } +- fi +- { echo "$as_me:$LINENO: result: $libpcap" >&5 +-echo "${ECHO_T}$libpcap" >&6; } + # Extract the first word of "pcap-config", so it can be a program name with args. + set dummy pcap-config; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 diff --git a/net/tcpdump/patches/004-fix_3g_iface.patch b/net/tcpdump/patches/004-fix_3g_iface.patch new file mode 100644 index 0000000..cd10184 --- /dev/null +++ b/net/tcpdump/patches/004-fix_3g_iface.patch @@ -0,0 +1,28 @@ +--- a/tcpdump.c ++++ b/tcpdump.c +@@ -66,6 +66,7 @@ extern int SIZE_BUF; + #include + #include + #include ++#include + #ifndef WIN32 + #include + #include +@@ -566,6 +567,7 @@ main(int argc, char **argv) + #ifdef HAVE_PCAP_FINDALLDEVS + pcap_if_t *devpointer; + int devnum; ++ char *devp; + #endif + int status; + #ifdef WIN32 +@@ -708,7 +710,8 @@ main(int argc, char **argv) + * It can be useful on Windows, where more than + * one interface can have the same name. + */ +- if ((devnum = atoi(optarg)) != 0) { ++ for (devp = optarg; *devp && isdigit(*devp); devp++); ++ if ((!*devp || isspace(*devp)) && (devnum = atoi(optarg)) != 0) { + if (devnum < 0) + error("Invalid adapter index"); + diff --git a/net/tcpdump/patches/100-tcpdump_mini.patch b/net/tcpdump/patches/100-tcpdump_mini.patch new file mode 100644 index 0000000..6d4403e --- /dev/null +++ b/net/tcpdump/patches/100-tcpdump_mini.patch @@ -0,0 +1,770 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -68,34 +68,38 @@ RANLIB = @RANLIB@ + + CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \ + nlpid.c l2vpn.c machdep.c parsenfsfh.c \ +- print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \ +- print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \ +- print-beep.c print-bfd.c print-bgp.c print-bootp.c print-bt.c \ +- print-cdp.c print-cfm.c print-chdlc.c print-cip.c print-cnfp.c \ +- print-dccp.c print-decnet.c \ +- print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \ +- print-eap.c print-eigrp.c\ +- print-esp.c print-ether.c print-fddi.c print-fr.c \ +- print-gre.c print-hsrp.c print-icmp.c print-igmp.c \ +- print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c print-ipnet.c \ +- print-ipx.c print-isoclns.c print-juniper.c print-krb.c \ +- print-l2tp.c print-lane.c print-ldp.c print-lldp.c print-llc.c \ +- print-lmp.c print-lspping.c print-lwapp.c \ +- print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \ ++ print-802_11.c print-aodv.c print-arp.c print-ascii.c \ ++ print-bgp.c print-bootp.c print-cdp.c print-domain.c print-eap.c print-ether.c \ ++ print-gre.c print-icmp.c print-igmp.c print-ip.c \ ++ print-l2tp.c print-lldp.c print-llc.c \ + print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \ +- print-pgm.c print-pim.c print-ppp.c print-pppoe.c print-pptp.c \ +- print-radius.c print-raw.c print-rip.c print-rrcp.c print-rsvp.c \ +- print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \ +- print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \ +- print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \ +- print-timed.c print-token.c print-udld.c print-udp.c print-usb.c \ +- print-vjc.c print-vqp.c print-vrrp.c print-vtp.c print-forces.c \ +- print-wb.c print-zephyr.c signature.c setsignal.c tcpdump.c util.c ++ print-ppp.c print-pppoe.c print-pptp.c print-radius.c print-raw.c print-rsvp.c \ ++ print-sctp.c print-sip.c print-snmp.c print-stp.c print-sunrpc.c \ ++ print-syslog.c print-tcp.c print-telnet.c print-tftp.c print-udp.c \ ++ setsignal.c tcpdump.c util.c signature.c print-ipnet.c print-forces.c ++ ++ifndef TCPDUMP_MINI ++ ++CSRC += \ ++ print-ah.c print-ap1394.c print-arcnet.c print-atalk.c print-atm.c \ ++ print-beep.c print-bfd.c print-bt.c print-cfm.c print-chdlc.c \ ++ print-cip.c print-cnfp.c print-dccp.c print-decnet.c print-dtp.c \ ++ print-dvmrp.c print-eigrp.c print-enc.c print-esp.c print-fddi.c print-fr.c print-hsrp.c \ ++ print-igrp.c print-ipfc.c print-ipx.c print-ipcomp.c print-isoclns.c print-juniper.c print-lane.c \ ++ print-ldp.c print-lmp.c print-lspping.c print-lwapp.c print-egp.c print-krb.c \ ++ print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \ ++ print-pim.c print-pgm.c print-rip.c print-rrcp.c print-rx.c print-sflow.c print-slow.c print-sl.c \ ++ print-sll.c print-sunatm.c print-symantec.c print-timed.c print-token.c print-udld.c \ ++ print-vjc.c print-vqp.c print-wb.c print-zephyr.c print-vrrp.c print-vtp.c \ ++ print-usb.c ++ + + LIBNETDISSECT_SRC=print-isakmp.c + LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) + LIBNETDISSECT=libnetdissect.a + ++endif ++ + LOCALSRC = @LOCALSRC@ + GENSRC = version.c + LIBOBJS = @LIBOBJS@ +@@ -358,10 +362,12 @@ $(PROG): $(OBJ) @V_PCAPDEP@ + @rm -f $@ + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) + ++ifndef TCPDUMP_MINI + $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) + @rm -f $@ + $(AR) cr $@ $(LIBNETDISSECT_OBJ) + $(RANLIB) $@ ++endif + + datalinks.o: $(srcdir)/missing/datalinks.c + $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c +--- a/addrtoname.c ++++ b/addrtoname.c +@@ -519,10 +519,10 @@ linkaddr_string(const u_char *ep, const + + if (type == LINKADDR_ETHER && len == ETHER_ADDR_LEN) + return (etheraddr_string(ep)); +- ++#ifndef TCPDUMP_MINI + if (type == LINKADDR_FRELAY) + return (q922_string(ep)); +- ++#endif + tp = lookup_bytestring(ep, len); + if (tp->e_name) + return (tp->e_name); +@@ -1122,6 +1122,7 @@ init_addrtoname(u_int32_t localnet, u_in + init_ipxsaparray(); + } + ++#ifndef TCPDUMP_MINI + const char * + dnaddr_string(u_short dnaddr) + { +@@ -1141,6 +1142,7 @@ dnaddr_string(u_short dnaddr) + + return(tp->name); + } ++#endif + + /* Return a zero'ed hnamemem struct and cuts down on calloc() overhead */ + struct hnamemem * +--- a/print-llc.c ++++ b/print-llc.c +@@ -195,7 +195,7 @@ llc_print(const u_char *p, u_int length, + control = EXTRACT_LE_16BITS(p + 2); + is_u = 0; + } +- ++#ifndef TCPDUMP_MINI + if (ssap_field == LLCSAP_GLOBAL && dsap_field == LLCSAP_GLOBAL) { + /* + * This is an Ethernet_802.3 IPX frame; it has an +@@ -218,6 +218,7 @@ llc_print(const u_char *p, u_int length, + ipx_print(p, length); + return (1); + } ++#endif + + dsap = dsap_field & ~LLC_IG; + ssap = ssap_field & ~LLC_GSAP; +@@ -250,6 +251,7 @@ llc_print(const u_char *p, u_int length, + return (1); + } + ++#ifndef TCPDUMP_MINI + if (ssap == LLCSAP_IPX && dsap == LLCSAP_IPX && + control == LLC_UI) { + /* +@@ -265,6 +267,7 @@ llc_print(const u_char *p, u_int length, + ipx_print(p+3, length-3); + return (1); + } ++#endif + + #ifdef TCPDUMP_DO_SMB + if (ssap == LLCSAP_NETBEUI && dsap == LLCSAP_NETBEUI +@@ -296,11 +299,13 @@ llc_print(const u_char *p, u_int length, + return (1); + } + #endif ++#ifndef TCPDUMP_MINI + if (ssap == LLCSAP_ISONS && dsap == LLCSAP_ISONS + && control == LLC_UI) { + isoclns_print(p + 3, length - 3, caplen - 3); + return (1); + } ++#endif + + if (ssap == LLCSAP_SNAP && dsap == LLCSAP_SNAP + && control == LLC_UI) { +@@ -443,6 +448,7 @@ snap_print(const u_char *p, u_int length + case PID_CISCO_CDP: + cdp_print(p, length, caplen); + return (1); ++#ifndef TCPDUMP_MINI + case PID_CISCO_DTP: + dtp_print(p, length); + return (1); +@@ -452,6 +458,7 @@ snap_print(const u_char *p, u_int length + case PID_CISCO_VTP: + vtp_print(p, length); + return (1); ++#endif + case PID_CISCO_PVST: + stp_print(p, length); + return (1); +@@ -482,6 +489,7 @@ snap_print(const u_char *p, u_int length + ether_print(p, length, caplen, NULL, NULL); + return (1); + ++#ifndef TCPDUMP_MINI + case PID_RFC2684_802_5_FCS: + case PID_RFC2684_802_5_NOFCS: + /* +@@ -523,6 +531,7 @@ snap_print(const u_char *p, u_int length + */ + fddi_print(p, length, caplen); + return (1); ++#endif + + case PID_RFC2684_BPDU: + stp_print(p, length); +--- a/print-null.c ++++ b/print-null.c +@@ -128,7 +128,7 @@ null_if_print(const struct pcap_pkthdr * + ip6_print(p, length); + break; + #endif +- ++#ifndef TCPDUMP_MINI + case BSD_AFNUM_ISO: + isoclns_print(p, length, caplen); + break; +@@ -140,7 +140,7 @@ null_if_print(const struct pcap_pkthdr * + case BSD_AFNUM_IPX: + ipx_print(p, length); + break; +- ++#endif + default: + /* unknown AF_ value */ + if (!eflag) +--- a/tcpdump.c ++++ b/tcpdump.c +@@ -148,11 +148,14 @@ struct ndo_printer { + + + static struct printer printers[] = { ++#ifndef TCPDUMP_MINI + { arcnet_if_print, DLT_ARCNET }, + #ifdef DLT_ARCNET_LINUX + { arcnet_linux_if_print, DLT_ARCNET_LINUX }, + #endif ++#endif + { ether_if_print, DLT_EN10MB }, ++#ifndef TCPDUMP_MINI + { token_if_print, DLT_IEEE802 }, + #ifdef DLT_LANE8023 + { lane_if_print, DLT_LANE8023 }, +@@ -167,19 +170,23 @@ static struct printer printers[] = { + #ifdef DLT_SLIP_BSDOS + { sl_bsdos_if_print, DLT_SLIP_BSDOS }, + #endif ++#endif + { ppp_if_print, DLT_PPP }, + #ifdef DLT_PPP_WITHDIRECTION + { ppp_if_print, DLT_PPP_WITHDIRECTION }, + #endif ++#ifndef TCPDUMP_MINI + #ifdef DLT_PPP_BSDOS + { ppp_bsdos_if_print, DLT_PPP_BSDOS }, + #endif + { fddi_if_print, DLT_FDDI }, ++#endif + { null_if_print, DLT_NULL }, + #ifdef DLT_LOOP + { null_if_print, DLT_LOOP }, + #endif + { raw_if_print, DLT_RAW }, ++#ifndef TCPDUMP_MINI + { atm_if_print, DLT_ATM_RFC1483 }, + #ifdef DLT_C_HDLC + { chdlc_if_print, DLT_C_HDLC }, +@@ -190,15 +197,19 @@ static struct printer printers[] = { + #ifdef DLT_PPP_SERIAL + { ppp_hdlc_if_print, DLT_PPP_SERIAL }, + #endif ++#endif + #ifdef DLT_PPP_ETHER + { pppoe_if_print, DLT_PPP_ETHER }, + #endif ++#ifndef TCPDUMP_MINI + #ifdef DLT_LINUX_SLL + { sll_if_print, DLT_LINUX_SLL }, + #endif ++#endif + #ifdef DLT_IEEE802_11 + { ieee802_11_if_print, DLT_IEEE802_11}, + #endif ++#ifndef TCPDUMP_MINI + #ifdef DLT_LTALK + { ltalk_if_print, DLT_LTALK }, + #endif +@@ -217,12 +228,14 @@ static struct printer printers[] = { + #ifdef DLT_IP_OVER_FC + { ipfc_if_print, DLT_IP_OVER_FC }, + #endif ++#endif + #ifdef DLT_PRISM_HEADER + { prism_if_print, DLT_PRISM_HEADER }, + #endif + #ifdef DLT_IEEE802_11_RADIO + { ieee802_11_radio_if_print, DLT_IEEE802_11_RADIO }, + #endif ++#ifndef TCPDUMP_MINI + #ifdef DLT_ENC + { enc_if_print, DLT_ENC }, + #endif +@@ -232,9 +245,11 @@ static struct printer printers[] = { + #ifdef DLT_APPLE_IP_OVER_IEEE1394 + { ap1394_if_print, DLT_APPLE_IP_OVER_IEEE1394 }, + #endif ++#endif + #ifdef DLT_IEEE802_11_RADIO_AVS + { ieee802_11_radio_avs_if_print, DLT_IEEE802_11_RADIO_AVS }, + #endif ++#ifndef TCPDUMP_MINI + #ifdef DLT_JUNIPER_ATM1 + { juniper_atm1_print, DLT_JUNIPER_ATM1 }, + #endif +@@ -300,6 +315,7 @@ static struct printer printers[] = { + #ifdef DLT_IPV6 + { raw_if_print, DLT_IPV6 }, + #endif ++#endif + { NULL, 0 }, + }; + +--- a/print-ether.c ++++ b/print-ether.c +@@ -269,6 +269,7 @@ ethertype_print(u_short ether_type, cons + arp_print(gndo, p, length, caplen); + return (1); + ++#ifndef TCPDUMP_MINI + case ETHERTYPE_DN: + decnet_print(p, length, caplen); + return (1); +@@ -287,11 +288,13 @@ ethertype_print(u_short ether_type, cons + printf("(NOV-ETHII) "); + ipx_print(p, length); + return (1); ++#endif + ++#ifndef TCPDUMP_MINI + case ETHERTYPE_ISO: + isoclns_print(p+1, length-1, length-1); + return(1); +- ++#endif + case ETHERTYPE_PPPOED: + case ETHERTYPE_PPPOES: + case ETHERTYPE_PPPOED2: +@@ -303,10 +306,11 @@ ethertype_print(u_short ether_type, cons + eap_print(gndo, p, length); + return (1); + ++#ifndef TCPDUMP_MINI + case ETHERTYPE_RRCP: + rrcp_print(gndo, p - 14 , length + 14); + return (1); +- ++#endif + case ETHERTYPE_PPP: + if (length) { + printf(": "); +@@ -314,6 +318,7 @@ ethertype_print(u_short ether_type, cons + } + return (1); + ++#ifndef TCPDUMP_MINI + case ETHERTYPE_MPCP: + mpcp_print(p, length); + return (1); +@@ -326,7 +331,7 @@ ethertype_print(u_short ether_type, cons + case ETHERTYPE_CFM_OLD: + cfm_print(p, length); + return (1); +- ++#endif + case ETHERTYPE_LLDP: + lldp_print(p, length); + return (1); +@@ -334,11 +339,12 @@ ethertype_print(u_short ether_type, cons + case ETHERTYPE_LOOPBACK: + return (1); + ++#ifndef TCPDUMP_MINI + case ETHERTYPE_MPLS: + case ETHERTYPE_MPLS_MULTI: + mpls_print(p, length); + return (1); +- ++#endif + case ETHERTYPE_LAT: + case ETHERTYPE_SCA: + case ETHERTYPE_MOPRC: +--- a/print-gre.c ++++ b/print-gre.c +@@ -213,6 +213,7 @@ gre_print_0(const u_char *bp, u_int leng + ip6_print(bp, len); + break; + #endif ++#ifndef TCPDUMP_MINI + case ETHERTYPE_MPLS: + mpls_print(bp, len); + break; +@@ -228,6 +229,7 @@ gre_print_0(const u_char *bp, u_int leng + case ETHERTYPE_TEB: + ether_print(bp, len, len, NULL, NULL); + break; ++#endif + default: + printf("gre-proto-0x%x", prot); + } +--- a/print-igmp.c ++++ b/print-igmp.c +@@ -303,6 +303,7 @@ igmp_print(register const u_char *bp, re + TCHECK2(bp[4], 4); + (void)printf("igmp leave %s", ipaddr_string(&bp[4])); + break; ++#ifndef TCPDUMP_MINI + case 0x13: + (void)printf("igmp dvmrp"); + if (len < 8) +@@ -314,6 +315,7 @@ igmp_print(register const u_char *bp, re + (void)printf("igmp pimv1"); + pimv1_print(bp, len); + break; ++#endif + case 0x1e: + print_mresp(bp, len); + break; +--- a/print-ip.c ++++ b/print-ip.c +@@ -380,6 +380,7 @@ ip_print_demux(netdissect_options *ndo, + again: + switch (ipds->nh) { + ++#ifndef TCPDUMP_MINI + case IPPROTO_AH: + ipds->nh = *ipds->cp; + ipds->advance = ah_print(ipds->cp); +@@ -414,14 +415,16 @@ again: + ipds->nh = enh & 0xff; + goto again; + } +- ++#endif + case IPPROTO_SCTP: + sctp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len); + break; + ++#ifndef TCPDUMP_MINI + case IPPROTO_DCCP: + dccp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len); + break; ++#endif + + case IPPROTO_TCP: + /* pass on the MF bit plus the offset to detect fragments */ +@@ -441,6 +444,7 @@ again: + ipds->off & (IP_MF|IP_OFFMASK)); + break; + ++#ifndef TCPDUMP_MINI + case IPPROTO_PIGP: + /* + * XXX - the current IANA protocol number assignments +@@ -461,15 +465,16 @@ again: + case IPPROTO_EIGRP: + eigrp_print(ipds->cp, ipds->len); + break; +- ++#endif + case IPPROTO_ND: + ND_PRINT((ndo, " nd %d", ipds->len)); + break; + ++#ifndef TCPDUMP_MINI + case IPPROTO_EGP: + egp_print(ipds->cp, ipds->len); + break; +- ++#endif + case IPPROTO_OSPF: + ospf_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); + break; +@@ -503,10 +508,10 @@ again: + gre_print(ipds->cp, ipds->len); + break; + ++#ifndef TCPDUMP_MINI + case IPPROTO_MOBILE: + mobile_print(ipds->cp, ipds->len); + break; +- + case IPPROTO_PIM: + pim_print(ipds->cp, ipds->len, + in_cksum((const u_short*)ipds->cp, ipds->len, 0)); +@@ -519,7 +524,7 @@ again: + case IPPROTO_PGM: + pgm_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); + break; +- ++#endif + default: + if ((proto = getprotobynumber(ipds->nh)) != NULL) + ND_PRINT((ndo, " %s", proto->p_name)); +--- a/print-ppp.c ++++ b/print-ppp.c +@@ -1262,7 +1262,7 @@ trunc: + return 0; + } + +- ++#ifndef TCPDUMP_MINI + static void + ppp_hdlc(const u_char *p, int length) + { +@@ -1327,17 +1327,19 @@ cleanup: + free(b); + return; + } ++#endif + + + /* PPP */ + static void + handle_ppp(u_int proto, const u_char *p, int length) + { ++#ifndef TCPDUMP_MINI + if ((proto & 0xff00) == 0x7e00) {/* is this an escape code ? */ + ppp_hdlc(p-1, length); + return; + } +- ++#endif + switch (proto) { + case PPP_LCP: /* fall through */ + case PPP_IPCP: +@@ -1371,6 +1373,7 @@ handle_ppp(u_int proto, const u_char *p, + ip6_print(p, length); + break; + #endif ++#ifndef TCPDUMP_MINI + case ETHERTYPE_IPX: /*XXX*/ + case PPP_IPX: + ipx_print(p, length); +@@ -1382,6 +1385,7 @@ handle_ppp(u_int proto, const u_char *p, + case PPP_MPLS_MCAST: + mpls_print(p, length); + break; ++#endif + case PPP_COMP: + printf("compressed PPP data"); + break; +@@ -1520,6 +1524,7 @@ ppp_if_print(const struct pcap_pkthdr *h + return (0); + } + ++#ifndef TCPDUMP_MINI + /* + * PPP I/F printer to use if we know that RFC 1662-style PPP in HDLC-like + * framing, or Cisco PPP with HDLC framing as per section 4.3.1 of RFC 1547, +@@ -1747,7 +1752,7 @@ printx: + #endif /* __bsdi__ */ + return (hdrlength); + } +- ++#endif + + /* + * Local Variables: +--- a/print-tcp.c ++++ b/print-tcp.c +@@ -649,8 +649,10 @@ tcp_print(register const u_char *bp, reg + else if (sport == SMB_PORT || dport == SMB_PORT) + smb_tcp_print(bp, length); + #endif ++#ifndef TCPDUMP_MINI + else if (sport == BEEP_PORT || dport == BEEP_PORT) + beep_print(bp, length); ++#endif + else if (length > 2 && + (sport == NAMESERVER_PORT || dport == NAMESERVER_PORT || + sport == MULTICASTDNS_PORT || dport == MULTICASTDNS_PORT)) { +@@ -659,11 +661,12 @@ tcp_print(register const u_char *bp, reg + * XXX packet could be unaligned, it can go strange + */ + ns_print(bp + 2, length - 2, 0); ++#ifndef TCPDUMP_MINI + } else if (sport == MSDP_PORT || dport == MSDP_PORT) { + msdp_print(bp, length); +- } +- else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) { ++ } else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) { + ldp_print(bp, length); ++#endif + } + + return; +--- a/print-udp.c ++++ b/print-udp.c +@@ -478,11 +478,12 @@ udp_print(register const u_char *bp, u_i + vat_print((void *)(up + 1), up); + break; + ++#ifndef TCPDUMP_MINI + case PT_WB: + udpipaddr_print(ip, sport, dport); + wb_print((void *)(up + 1), length); + break; +- ++#endif + case PT_RPC: + rp = (struct sunrpc_msg *)(up + 1); + direction = (enum sunrpc_msg_type)EXTRACT_32BITS(&rp->rm_direction); +@@ -510,11 +511,12 @@ udp_print(register const u_char *bp, u_i + snmp_print((const u_char *)(up + 1), length); + break; + ++#ifndef TCPDUMP_MINI + case PT_CNFP: + udpipaddr_print(ip, sport, dport); + cnfp_print(cp, (const u_char *)ip); + break; +- ++#endif + case PT_TFTP: + udpipaddr_print(ip, sport, dport); + tftp_print(cp, length); +@@ -557,6 +559,7 @@ udp_print(register const u_char *bp, u_i + } + #endif + } ++#ifndef TCPDUMP_MINI + if (TTEST(((struct LAP *)cp)->type) && + ((struct LAP *)cp)->type == lapDDP && + (atalk_port(sport) || atalk_port(dport))) { +@@ -565,6 +568,7 @@ udp_print(register const u_char *bp, u_i + llap_print(cp, length); + return; + } ++#endif + } + udpipaddr_print(ip, sport, dport); + +@@ -600,14 +604,18 @@ udp_print(register const u_char *bp, u_i + ns_print((const u_char *)(up + 1), length, 0); + else if (ISPORT(MULTICASTDNS_PORT)) + ns_print((const u_char *)(up + 1), length, 1); ++#ifndef TCPDUMP_MINI + else if (ISPORT(TIMED_PORT)) + timed_print((const u_char *)(up + 1)); ++#endif + else if (ISPORT(TFTP_PORT)) + tftp_print((const u_char *)(up + 1), length); + else if (ISPORT(IPPORT_BOOTPC) || ISPORT(IPPORT_BOOTPS)) + bootp_print((const u_char *)(up + 1), length); ++#ifndef TCPDUMP_MINI + else if (ISPORT(RIP_PORT)) + rip_print((const u_char *)(up + 1), length); ++#endif + else if (ISPORT(AODV_PORT)) + aodv_print((const u_char *)(up + 1), length, + #ifdef INET6 +@@ -615,6 +623,7 @@ udp_print(register const u_char *bp, u_i + #else + 0); + #endif ++#ifndef TCPDUMP_MINI + else if (ISPORT(ISAKMP_PORT)) + isakmp_print(gndo, (const u_char *)(up + 1), length, bp2); + else if (ISPORT(ISAKMP_PORT_NATT)) +@@ -623,12 +632,15 @@ udp_print(register const u_char *bp, u_i + else if (ISPORT(ISAKMP_PORT_USER1) || ISPORT(ISAKMP_PORT_USER2)) + isakmp_print(gndo, (const u_char *)(up + 1), length, bp2); + #endif ++#endif + else if (ISPORT(SNMP_PORT) || ISPORT(SNMPTRAP_PORT)) + snmp_print((const u_char *)(up + 1), length); + else if (ISPORT(NTP_PORT)) + ntp_print((const u_char *)(up + 1), length); ++#ifndef TCPDUMP_MINI + else if (ISPORT(KERBEROS_PORT) || ISPORT(KERBEROS_SEC_PORT)) + krb_print((const void *)(up + 1)); ++#endif + else if (ISPORT(L2TP_PORT)) + l2tp_print((const u_char *)(up + 1), length); + #ifdef TCPDUMP_DO_SMB +@@ -639,6 +651,7 @@ udp_print(register const u_char *bp, u_i + #endif + else if (dport == 3456) + vat_print((const void *)(up + 1), up); ++#ifndef TCPDUMP_MINI + else if (ISPORT(ZEPHYR_SRV_PORT) || ISPORT(ZEPHYR_CLT_PORT)) + zephyr_print((const void *)(up + 1), length); + /* +@@ -649,6 +662,7 @@ udp_print(register const u_char *bp, u_i + (dport >= RX_PORT_LOW && dport <= RX_PORT_HIGH)) + rx_print((const void *)(up + 1), length, sport, dport, + (u_char *) ip); ++#endif + #ifdef INET6 + else if (ISPORT(RIPNG_PORT)) + ripng_print((const u_char *)(up + 1), length); +@@ -659,21 +673,25 @@ udp_print(register const u_char *bp, u_i + /* + * Kludge in test for whiteboard packets. + */ ++#ifndef TCPDUMP_MINI + else if (dport == 4567) + wb_print((const void *)(up + 1), length); + else if (ISPORT(CISCO_AUTORP_PORT)) + cisco_autorp_print((const void *)(up + 1), length); ++#endif + else if (ISPORT(RADIUS_PORT) || + ISPORT(RADIUS_NEW_PORT) || + ISPORT(RADIUS_ACCOUNTING_PORT) || + ISPORT(RADIUS_NEW_ACCOUNTING_PORT) ) + radius_print((const u_char *)(up+1), length); ++#ifndef TCPDUMP_MINI + else if (dport == HSRP_PORT) + hsrp_print((const u_char *)(up + 1), length); + else if (ISPORT(LWRES_PORT)) + lwres_print((const u_char *)(up + 1), length); + else if (ISPORT(LDP_PORT)) + ldp_print((const u_char *)(up + 1), length); ++#endif + else if (ISPORT(OLSR_PORT)) + olsr_print((const u_char *)(up + 1), length, + #if INET6 +@@ -681,6 +699,7 @@ udp_print(register const u_char *bp, u_i + #else + 0); + #endif ++#ifndef TCPDUMP_MINI + else if (ISPORT(MPLS_LSP_PING_PORT)) + lspping_print((const u_char *)(up + 1), length); + else if (dport == BFD_CONTROL_PORT || +@@ -698,6 +717,7 @@ udp_print(register const u_char *bp, u_i + lwapp_control_print((const u_char *)(up + 1), length, 0); + else if (ISPORT(LWAPP_DATA_PORT)) + lwapp_data_print((const u_char *)(up + 1), length); ++#endif + else if (ISPORT(SIP_PORT)) + sip_print((const u_char *)(up + 1), length); + else if (ISPORT(SYSLOG_PORT)) +--- a/print-ip6.c ++++ b/print-ip6.c +@@ -186,9 +186,11 @@ ip6_print(register const u_char *bp, reg + case IPPROTO_SCTP: + sctp_print(cp, (const u_char *)ip6, len); + return; ++#ifndef TCPDUMP_MINI + case IPPROTO_DCCP: + dccp_print(cp, (const u_char *)ip6, len); + return; ++#endif + case IPPROTO_TCP: + tcp_print(cp, len, (const u_char *)ip6, fragmented); + return; +@@ -198,6 +200,7 @@ ip6_print(register const u_char *bp, reg + case IPPROTO_ICMPV6: + icmp6_print(gndo, cp, len, (const u_char *)ip6, fragmented); + return; ++#ifndef TCPDUMP_MINI + case IPPROTO_AH: + advance = ah_print(cp); + nh = *cp; +@@ -222,7 +225,7 @@ ip6_print(register const u_char *bp, reg + pim_print(cp, len, nextproto6_cksum(ip6, (u_short *)cp, len, + IPPROTO_PIM)); + return; +- ++#endif + case IPPROTO_OSPF: + ospf6_print(cp, len); + return; +@@ -234,11 +237,11 @@ ip6_print(register const u_char *bp, reg + case IPPROTO_IPV4: + ip_print(gndo, cp, len); + return; +- ++#ifndef TCPDUMP_MINI + case IPPROTO_PGM: + pgm_print(cp, len, (const u_char *)ip6); + return; +- ++#endif + case IPPROTO_GRE: + gre_print(cp, len); + return; diff --git a/net/tcptraceroute/Makefile b/net/tcptraceroute/Makefile new file mode 100644 index 0000000..33119e9 --- /dev/null +++ b/net/tcptraceroute/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tcptraceroute +PKG_VERSION:=1.5beta7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://michael.toren.net/code/tcptraceroute +PKG_MD5SUM:=65d1001509f971ea986fcbc2dd009643 + +include $(INCLUDE_DIR)/package.mk + +define Package/tcptraceroute + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap +libnet1 + TITLE:=A traceroute implementation using TCP packets. + URL:=http://michael.toren.net/code/tcptraceroute/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + , \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/lib/libnet-1.1.x/include" \ + LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libnet-1.1.x/lib" \ + PATH="$(STAGING_DIR)/usr/lib/libnet-1.1.x/bin:$$$$PATH" \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) +endef + +define Package/tcptraceroute/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tcptraceroute $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,tcptraceroute)) diff --git a/net/tcptraceroute/patches/001-configure_cross_compile.patch b/net/tcptraceroute/patches/001-configure_cross_compile.patch new file mode 100644 index 0000000..5690a23 --- /dev/null +++ b/net/tcptraceroute/patches/001-configure_cross_compile.patch @@ -0,0 +1,62 @@ +--- tcptraceroute-1.5beta7.orig/configure 2006-03-29 02:49:55.000000000 +0100 ++++ tcptraceroute-1.5beta7/configure 2007-03-19 19:13:31.644193395 +0000 +@@ -5484,11 +5484,11 @@ + echo "$as_me:$LINENO: checking for Solaris" >&5 + echo $ECHO_N "checking for Solaris... $ECHO_C" >&6 + if test "$cross_compiling" = yes; then +- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling ++ { { echo "$as_me:$LINENO: warning: 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 ++echo "$as_me: warning: 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. */ +@@ -5551,11 +5551,11 @@ + echo "$as_me:$LINENO: checking for BSDI" >&5 + echo $ECHO_N "checking for BSDI... $ECHO_C" >&6 + if test "$cross_compiling" = yes; then +- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling ++ { { echo "$as_me:$LINENO: warning: 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 ++echo "$as_me: warning: 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. */ +@@ -5618,11 +5618,11 @@ + echo "$as_me:$LINENO: checking for NetBSD" >&5 + echo $ECHO_N "checking for NetBSD... $ECHO_C" >&6 + if test "$cross_compiling" = yes; then +- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling ++ { { echo "$as_me:$LINENO: warning: 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 ++echo "$as_me: warning: 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. */ +@@ -5685,11 +5685,11 @@ + echo "$as_me:$LINENO: checking for MacOS X" >&5 + echo $ECHO_N "checking for MacOS X... $ECHO_C" >&6 + if test "$cross_compiling" = yes; then +- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling ++ { { echo "$as_me:$LINENO: warning: 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 ++echo "$as_me: warning: 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. */ diff --git a/net/tctool/Makefile b/net/tctool/Makefile new file mode 100644 index 0000000..9fb1d29 --- /dev/null +++ b/net/tctool/Makefile @@ -0,0 +1,36 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=tctool +PKG_VERSION:=0.9.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip +PKG_SOURCE_URL:=http://download2.berlios.de/speedmodem50b +PKG_MD5SUM:=df38334206d4cad106e58bd71c6f1d9a + +PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/tctool + SECTION:=net + CATEGORY:=Network + TITLE:=TrendChip-Modem-Utility + URL:=http://speedmodem50b.berlios.de/ + DEPENDS:=+libstdcpp +endef + +define Package/tctool/description + tcTool provides access to the console-service of TrendChip-based ADSL-Modems. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/src $(TARGET_CONFIGURE_OPTS) tctool +endef + +define Package/tctool/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tctool $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,tctool)) diff --git a/net/tctool/patches/001_Makefile_fix.diff b/net/tctool/patches/001_Makefile_fix.diff new file mode 100644 index 0000000..ee7c4f5 --- /dev/null +++ b/net/tctool/patches/001_Makefile_fix.diff @@ -0,0 +1,30 @@ +diff -ur tctool.old/src/Makefile tctool/src/Makefile +--- tctool.old/src/Makefile 2007-01-03 02:32:24.000000000 +0100 ++++ tctool/src/Makefile 2007-09-18 19:15:03.068155702 +0200 +@@ -31,16 +31,16 @@ + EXAMPLE := example + EXOBJ := if.o interface.o etherStream.o etherStreambuf.o tcStream.o tcStreambuf.o tcRtsDump.o tcRtsDumpbuf.o + +-CXX := g++ +-CXXFLAGS := -march=i386 -O2 +-LDFLAGS := --strip-unneeded +-LIBS := +-LDSTATIC := -L. -static-libgcc +-STATICLIBS := stdc++ m +-COUNTRY := "C" +-LANG := "C" +-LANGUAGE := "C" +-LC_ALL := "C" ++#CXX := g++ ++#CXXFLAGS := -march=i386 -O2 ++#LDFLAGS := --strip-unneeded ++#LIBS := ++#LDSTATIC := -L. -static-libgcc ++#STATICLIBS := stdc++ m ++#COUNTRY := "C" ++#LANG := "C" ++#LANGUAGE := "C" ++#LC_ALL := "C" + + default: install + diff --git a/net/tctool/patches/005-fix-gcc_4_3-compile.patch b/net/tctool/patches/005-fix-gcc_4_3-compile.patch new file mode 100644 index 0000000..76008b9 --- /dev/null +++ b/net/tctool/patches/005-fix-gcc_4_3-compile.patch @@ -0,0 +1,12 @@ +diff --git a/src/tctool.cpp b/src/tctool.cpp +index bbab13f..9ce8e5c 100644 +--- a/src/tctool.cpp ++++ b/src/tctool.cpp +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + std::string options = "I:m:i:r:t:p:c:MUdsSCRh"; + std::string ethDev = "eth0"; diff --git a/net/tftp-hpa/Makefile b/net/tftp-hpa/Makefile new file mode 100644 index 0000000..5b44603 --- /dev/null +++ b/net/tftp-hpa/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tftp-hpa +PKG_VERSION:=0.48 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@KERNEL/software/network/tftp +PKG_MD5SUM:=73dd29dfa9062a174163f6a267e0b5f7 + +include $(INCLUDE_DIR)/package.mk + +define Package/tftp-hpa/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=File Transfer + DEPENDS:=+libreadline + URL:=http://www.kernel.org/pub/software/network/tftp +endef + +define Package/tftp-hpa + $(call Package/tftp-hpa/Default) + TITLE:=An enhanced version of the BSD TFTP client +endef + +define Package/tftpd-hpa + $(call Package/tftp-hpa/Default) + TITLE:=An enhanced version of the BSD TFTP server +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --without-tcpwrappers, \ + CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) +endef + +define Package/tftp-hpa/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tftp/tftp $(1)/usr/bin/tftp-hpa +endef + +define Package/tftpd-hpa/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tftpd/tftpd $(1)/usr/sbin/tftpd-hpa + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/tftpd-hpa.init $(1)/etc/init.d/tftpd-hpa +endef + +$(eval $(call BuildPackage,tftp-hpa)) +$(eval $(call BuildPackage,tftpd-hpa)) diff --git a/net/tftp-hpa/files/tftpd-hpa.init b/net/tftp-hpa/files/tftpd-hpa.init new file mode 100644 index 0000000..1b361d9 --- /dev/null +++ b/net/tftp-hpa/files/tftpd-hpa.init @@ -0,0 +1,14 @@ +#!/bin/sh /etc/rc.common + +START=50 + +RUN_D=/var/tftpd-hpa + +start() { + [ -d $RUN_D ] || mkdir -p $RUN_D + tftpd-hpa -l -s $RUN_D +} + +stop() { + killall tftpd-hpa +} diff --git a/net/tinc/Makefile b/net/tinc/Makefile new file mode 100644 index 0000000..9f9a2e4 --- /dev/null +++ b/net/tinc/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tinc +PKG_VERSION:=1.0.14 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.tinc-vpn.org/packages \ + http://ftp.yi.se/pub/tinc \ + http://www.mirrors.wiretapped.net/security/network-security/tinc +PKG_MD5SUM:=967dfafc4aa41a614c1d2739df8a8372 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/tinc + SECTION:=net + CATEGORY:=Network + DEPENDS:=+liblzo +libopenssl +kmod-tun + TITLE:=VPN tunneling daemon + URL:=http://www.tinc-vpn.org/ + SUBMENU:=VPN +endef + +define Package/tinc/description + tinc is a Virtual Private Network (VPN) daemon that uses tunnelling and + encryption to create a secure private network between hosts on the Internet. +endef + +TARGET_CFLAGS += -std=gnu99 + +CONFIGURE_ARGS += \ + --with-kernel="$(LINUX_DIR)" \ + --with-zlib="$(STAGING_DIR)/usr" \ + --with-lzo-include="$(STAGING_DIR)/usr/include/lzo" + +define Package/tinc/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tincd $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,tinc)) diff --git a/net/tinyproxy/Makefile b/net/tinyproxy/Makefile new file mode 100644 index 0000000..e6daa1e --- /dev/null +++ b/net/tinyproxy/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tinyproxy +PKG_VERSION:=1.8.2 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.banu.com/pub/tinyproxy/1.8/ +PKG_MD5SUM:=edc8502193cfed4974d6a770da173755 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/tinyproxy + SUBMENU:=Web Servers/Proxies + SECTION:=net + CATEGORY:=Network + TITLE:=Tinyproxy is a lightweight HTTP and HTTPS proxy + URL:=http://tinyproxy.sourceforge.net/ +endef + +define Package/tinyproxy/conffiles +/etc/config/tinyproxy +endef + +CONFIGURE_ARGS+= \ + --enable-filter \ + --enable-transparent \ + --disable-regexcheck \ + +define Package/tinyproxy/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tinyproxy $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/share/tinyproxy + $(CP) $(PKG_INSTALL_DIR)/usr/share/tinyproxy/*.html $(1)/usr/share/tinyproxy/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/tinyproxy.config $(1)/etc/config/tinyproxy + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/tinyproxy.init $(1)/etc/init.d/tinyproxy +endef + +$(eval $(call BuildPackage,tinyproxy)) diff --git a/net/tinyproxy/files/tinyproxy.config b/net/tinyproxy/files/tinyproxy.config new file mode 100644 index 0000000..ffccc40 --- /dev/null +++ b/net/tinyproxy/files/tinyproxy.config @@ -0,0 +1,251 @@ +config tinyproxy + +# +# Enable the proxy +# +option enable 0 + +# +# Name of the user the tinyproxy daemon should switch to after the port +# has been bound. +# +option User nobody +option Group nogroup + +# +# Port to listen on. +# +option Port 8888 + +# +# If you have multiple interfaces this allows you to bind to only one. If +# this is commented out, tinyproxy will bind to all interfaces present. +# +#option Listen 192.168.0.1 + +# +# The Bind directive allows you to bind the outgoing connections to a +# particular IP address. +# +#option Bind 192.168.0.1 + +# +# Timeout: The number of seconds of inactivity a connection is allowed to +# have before it closed by tinyproxy. +# +option Timeout 600 + +# +# ErrorFile: Defines the HTML file to send when a given HTTP error +# occurs. You will probably need to customize the location to your +# particular install. The usual locations to check are: +# /usr/local/share/tinyproxy +# /usr/share/tinyproxy +# /etc/tinyproxy +# +#option ErrorFile_404 "/usr/share/tinyproxy/404.html" +#option ErrorFile_400 "/usr/share/tinyproxy/400.html" +#option ErrorFile_503 "/usr/share/tinyproxy/503.html" +#option ErrorFile_403 "/usr/share/tinyproxy/403.html" +#option ErrorFile_408 "/usr/share/tinyproxy/408.html" + +# +# DefaultErrorFile: The HTML file that gets sent if there is no +# HTML file defined with an ErrorFile keyword for the HTTP error +# that has occured. +# +option DefaultErrorFile "/usr/share/tinyproxy/default.html" + +# +# StatFile: The HTML file that gets sent when a request is made +# for the stathost. If this file doesn't exist a basic page is +# hardcoded in tinyproxy. +# +option StatFile "/usr/share/tinyproxy/stats.html" + +# +# Where to log the information. Either LogFile or Syslog should be set, +# but not both. +# +option LogFile "/var/log/tinyproxy.log" +#option Syslog On + +# +# Set the logging level. Allowed settings are: +# Critical (least verbose) +# Error +# Warning +# Notice +# Connect (to log connections without Info's noise) +# Info (most verbose) +# The LogLevel logs from the set level and above. For example, if the LogLevel +# was set to Warning, than all log messages from Warning to Critical would be +# output, but Notice and below would be suppressed. +# +option LogLevel Info + +# +# Include the X-Tinyproxy header, which has the client's IP address when +# connecting to the sites listed. +# +# list XTinyproxy mydomain.com + +# +# This is the absolute highest number of threads which will be created. In +# other words, only MaxClients number of clients can be connected at the +# same time. +# +option MaxClients 100 + +# +# These settings set the upper and lower limit for the number of +# spare servers which should be available. If the number of spare servers +# falls below MinSpareServers then new ones will be created. If the number +# of servers exceeds MaxSpareServers then the extras will be killed off. +# +option MinSpareServers 5 +option MaxSpareServers 20 + +# +# Number of servers to start initially. +# +option StartServers 10 + +# +# MaxRequestsPerChild is the number of connections a thread will handle +# before it is killed. In practise this should be set to 0, which disables +# thread reaping. If you do notice problems with memory leakage, then set +# this to something like 10000 +# +option MaxRequestsPerChild 0 + +# +# The following is the authorization controls. If there are any access +# control keywords then the default action is to DENY. Otherwise, the +# default action is ALLOW. +# +# Also the order of the controls are important. The incoming connections +# are tested against the controls based on order. +# +list Allow 127.0.0.1 +#list Allow 192.168.0.0/16 +#list Allow 172.16.0.0/12 +#list Allow 10.0.0.0/8 + +# +# The "Via" header is required by the HTTP RFC, but using the real host name +# is a security concern. If the following directive is enabled, the string +# supplied will be used as the host name in the Via header; otherwise, the +# server's host name will be used. +# +option ViaProxyName "tinyproxy" + +# +# The location of the filter file. +# +#option Filter "/etc/tinyproxy/filter" + +# +# Filter based on URLs rather than domains. +# +#option FilterURLs On + +# +# Use POSIX Extended regular expressions rather than basic. +# +#option FilterExtended On + +# +# Use case sensitive regular expressions. +# +#option FilterCaseSensitive On + +# +# Change the default policy of the filtering system. If this directive is +# commented out, or is set to "No" then the default policy is to allow +# everything which is not specifically denied by the filter file. +# +# However, by setting this directive to "Yes" the default policy becomes to +# deny everything which is _not_ specifically allowed by the filter file. +# +#option FilterDefaultDeny Yes + +# +# If an Anonymous keyword is present, then anonymous proxying is enabled. +# The headers listed are allowed through, while all others are denied. If +# no Anonymous keyword is present, then all header are allowed through. +# You must include quotes around the headers. +# +#list Anonymous "Host" +#list Anonymous "Authorization" + +# +# This is a list of ports allowed by tinyproxy when the CONNECT method +# is used. To disable the CONNECT method altogether, set the value to 0. +# If no ConnectPort line is found, all ports are allowed (which is not +# very secure.) +# +# The following two ports are used by SSL. +# +list ConnectPort 443 +list ConnectPort 563 + +# +# Turns on upstream proxy support. +# +# The upstream rules allow you to selectively route upstream connections +# based on the host/domain of the site being accessed. +# +# For example: +# # connection to test domain goes through testproxy +# +#config upstream +# option type proxy +# option via testproxy:8008 +# option target ".test.domain.invalid" +# +#config upstream +# option type proxy +# option via testproxy:8008 +# option target ".our_testbed.example.com" +# +#config upstream +# option type proxy +# option via testproxy:8008 +# option target "192.168.128.0/255.255.254.0" +# +# # no upstream proxy for internal websites and unqualified hosts +# +#config upstream +# option type reject +# option target ".internal.example.com" +# +#config upstream +# option type reject +# option target "www.example.com" +# +#config upstream +# option type reject +# option target "10.0.0.0/8" +# +#config upstream +# option type reject +# option target "192.168.0.0/255.255.254.0" +# +#config upstream +# option type reject +# option target "." +# +# # default upstream is internet firewall +# +#config upstream +# option type proxy +# option via firewall.internal.example.com:80 +# +# The LAST matching rule wins the route decision. As you can see, you +# can use a host, or a domain: +# name matches host exactly +# .name matches any host in domain "name" +# . matches any host with no domain (in 'empty' domain) +# IP/bits matches network/mask +# IP/mask matches network/mask diff --git a/net/tinyproxy/files/tinyproxy.init b/net/tinyproxy/files/tinyproxy.init new file mode 100644 index 0000000..cff10c0 --- /dev/null +++ b/net/tinyproxy/files/tinyproxy.init @@ -0,0 +1,135 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=50 + +DAEMON=/usr/sbin/tinyproxy +CFGFILE=/var/etc/tinyproxy.conf + +start() { + config_load tinyproxy + config_foreach start_proxy tinyproxy +} + +stop() { + start-stop-daemon -q -x "$DAEMON" -K + rm -f $CFGFILE +} + +start_proxy() { + config_get_bool enable "$1" enable + [ "$enable" -eq "1" ] || return 0 + + mkdir -p /var/etc + echo '### AUTOGENERATED CONFIGURATION' > $CFGFILE + echo '### DO NOT EDIT' >> $CFGFILE + echo '### SEE /etc/config/tinyproxy INSTEAD' >> $CFGFILE + echo '' >> $CFGFILE + + proxy_atom "$1" User >> $CFGFILE + proxy_atom "$1" Group >> $CFGFILE + proxy_atom "$1" Port 8888 >> $CFGFILE + proxy_atom "$1" Listen >> $CFGFILE + proxy_atom "$1" Bind >> $CFGFILE + proxy_atom "$1" Timeout >> $CFGFILE + + proxy_string "$1" ErrorFile_400 "ErrorFile 400" >> $CFGFILE + proxy_string "$1" ErrorFile_403 "ErrorFile 403" >> $CFGFILE + proxy_string "$1" ErrorFile_404 "ErrorFile 404" >> $CFGFILE + proxy_string "$1" ErrorFile_408 "ErrorFile 408" >> $CFGFILE + proxy_string "$1" ErrorFile_503 "ErrorFile 503" >> $CFGFILE + + proxy_string "$1" DefaultErrorFile >> $CFGFILE + proxy_string "$1" StatHost StatHost 127.0.0.1 >> $CFGFILE + proxy_string "$1" StatFile >> $CFGFILE + proxy_string "$1" LogFile >> $CFGFILE + + proxy_flag "$1" SysLog >> $CFGFILE + + proxy_atom "$1" LogLevel >> $CFGFILE + + proxy_list "$1" XTinyproxy >> $CFGFILE + + proxy_atom "$1" MaxClients >> $CFGFILE + proxy_atom "$1" MinSpareServers >> $CFGFILE + proxy_atom "$1" MaxSpareServers >> $CFGFILE + proxy_atom "$1" StartServers >> $CFGFILE + proxy_atom "$1" MaxRequestsPerChild >> $CFGFILE + proxy_list "$1" Allow >> $CFGFILE + + proxy_string "$1" ViaProxyName >> $CFGFILE + proxy_string "$1" Filter >> $CFGFILE + + proxy_flag "$1" FilterURLs >> $CFGFILE + proxy_flag "$1" FilterExtended >> $CFGFILE + proxy_flag "$1" FilterCaseSensitive >> $CFGFILE + proxy_flag "$1" FilterDefaultDeny Yes No >> $CFGFILE + + proxy_list "$1" Anonymous '"' >> $CFGFILE + proxy_list "$1" ConnectPort >> $CFGFILE + + config_foreach write_upstream upstream + + start-stop-daemon -q -x "$DAEMON" -S -- -c "$CFGFILE" +} + +write_upstream() { + local type + local via + local target + + config_get "type" "$1" "type" + config_get via "$1" via + config_get target "$1" target + [ -n "$target" ] && target=' "'"$target"'"' + + [ "$type" == "proxy" -a -n "$via" ] && \ + echo "upstream $via$target" >> $CFGFILE + + [ "$type" == "reject" -a -n "$target" ] && \ + echo "no upstream$target" >> $CFGFILE +} + +proxy_atom() { + local SECTION=$1 + local OPTION=$2 + local DEFAULT=$3 + + config_get _value "$SECTION" "$OPTION" + [ -z "$_value" ] && _value="$DEFAULT" + [ -n "$_value" ] && echo "$OPTION $_value" +} + +proxy_string() { + local SECTION=$1 + local OPTION=$2 + local ALIAS=$3 + local DEFAULT=$4 + + config_get _value "$SECTION" "$OPTION" + [ -z "$_value" ] && _value="$DEFAULT" + [ -n "$_value" ] && echo "${ALIAS:-${OPTION}} "'"'"$_value"'"' +} + +proxy_flag() { + local SECTION=$1 + local OPTION=$2 + local TRUE="${3:-On}" + local FALSE="${4:-Off}" + + config_get_bool _value "$SECTION" "$OPTION" 0 + [ "$_value" -eq "1" ] && _value="$TRUE" || _value="$FALSE" + echo "$OPTION $_value" +} + +proxy_list() { + local SECTION=$1 + local OPTION=$2 + local ENCLOSE=$3 + + config_get _value "$SECTION" "$OPTION" + [ -n "$_value" ] && { + for entry in $_value; do + echo "$OPTION ${ENCLOSE}${entry}${ENCLOSE}" + done + } +} diff --git a/net/tinyproxy/patches/010-no-docs-and-tests.patch b/net/tinyproxy/patches/010-no-docs-and-tests.patch new file mode 100644 index 0000000..9845c35 --- /dev/null +++ b/net/tinyproxy/patches/010-no-docs-and-tests.patch @@ -0,0 +1,86 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,9 +2,7 @@ SUBDIRS = \ + src \ + data \ + etc \ +- docs \ + m4macros \ +- tests + + # tools want this on a single line + ACLOCAL_AMFLAGS = -I m4macros +--- a/Makefile.in ++++ b/Makefile.in +@@ -222,9 +222,7 @@ SUBDIRS = \ + src \ + data \ + etc \ +- docs \ + m4macros \ +- tests + + + # tools want this on a single line +--- a/configure ++++ b/configure +@@ -6816,59 +6816,8 @@ fi + + + +-# Check for asciidoc +-# Extract the first word of "a2x", so it can be a program name with args. +-set dummy a2x; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_A2X+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- case $A2X in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_A2X="$A2X" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_path_A2X="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +- test -z "$ac_cv_path_A2X" && ac_cv_path_A2X="no" +- ;; +-esac +-fi +-A2X=$ac_cv_path_A2X +-if test -n "$A2X"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A2X" >&5 +-$as_echo "$A2X" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +- if test "x$A2X" != "xno"; then +- HAVE_A2X_TRUE= +- HAVE_A2X_FALSE='#' +-else + HAVE_A2X_TRUE='#' + HAVE_A2X_FALSE= +-fi +- +-if test x"$A2X" = x"no"; then +- as_fn_error "Test for asciidoc failed. See the file 'INSTALL' for help." "$LINENO" 5 +-fi + + ac_config_files="$ac_config_files Makefile src/Makefile data/Makefile data/templates/Makefile etc/Makefile docs/Makefile docs/man5/Makefile docs/man5/tinyproxy.conf.txt docs/man8/Makefile docs/man8/tinyproxy.txt m4macros/Makefile tests/Makefile tests/scripts/Makefile" + diff --git a/net/tinyproxy/patches/020-config_and_pid-path.patch b/net/tinyproxy/patches/020-config_and_pid-path.patch new file mode 100644 index 0000000..3ab7482 --- /dev/null +++ b/net/tinyproxy/patches/020-config_and_pid-path.patch @@ -0,0 +1,13 @@ +--- a/src/main.c ++++ b/src/main.c +@@ -326,8 +326,8 @@ static void initialize_config_defaults ( + conf->errorpages = NULL; + conf->stathost = safestrdup (TINYPROXY_STATHOST); + conf->idletimeout = MAX_IDLE_TIME; +- conf->logf_name = safestrdup (LOCALSTATEDIR "/log/tinyproxy/tinyproxy.log"); +- conf->pidpath = safestrdup (LOCALSTATEDIR "/run/tinyproxy/tinyproxy.pid"); ++ conf->logf_name = safestrdup (LOCALSTATEDIR "/log/tinyproxy.log"); ++ conf->pidpath = safestrdup (LOCALSTATEDIR "/tinyproxy.pid"); + } + + /** diff --git a/net/tinyproxy/patches/030-allow_bind_in_transparent_mode.patch b/net/tinyproxy/patches/030-allow_bind_in_transparent_mode.patch new file mode 100644 index 0000000..7d6decd --- /dev/null +++ b/net/tinyproxy/patches/030-allow_bind_in_transparent_mode.patch @@ -0,0 +1,22 @@ +--- a/src/conf.c ++++ b/src/conf.c +@@ -857,7 +857,6 @@ static HANDLE_FUNC (handle_deny) + + static HANDLE_FUNC (handle_bind) + { +-#ifndef TRANSPARENT_PROXY + int r = set_string_arg (&conf->bind_address, line, &match[2]); + + if (r) +@@ -865,11 +864,6 @@ static HANDLE_FUNC (handle_bind) + log_message (LOG_INFO, + "Outgoing connections bound to IP %s", conf->bind_address); + return 0; +-#else +- fprintf (stderr, +- "\"Bind\" cannot be used with transparent support enabled.\n"); +- return 1; +-#endif + } + + static HANDLE_FUNC (handle_listen) diff --git a/net/tinyproxy/patches/040-fix_url_filter_in_transparent_mode.patch b/net/tinyproxy/patches/040-fix_url_filter_in_transparent_mode.patch new file mode 100644 index 0000000..ab3118b --- /dev/null +++ b/net/tinyproxy/patches/040-fix_url_filter_in_transparent_mode.patch @@ -0,0 +1,110 @@ +From e0cf6d4b0c84da6273c127a8c87076aac3b51588 Mon Sep 17 00:00:00 2001 +From: Daniel Egger +Date: Mon, 16 Aug 2010 22:36:20 +0200 +Subject: [PATCH 3/3] Pass a pointer to a char pointer to do_transparent_proxy so the reassembled URL + will actually end up back in the caller where it is needed for filtering + decisions. This fixes the problem that a tinyproxy configured with the + transparent proxy functionality and "FilterURLs Yes" would filter on everything + but the domain. + +Signed-off-by: daniel.egger@sphairon.com +--- + src/reqs.c | 2 +- + src/transparent-proxy.c | 20 ++++++++++---------- + src/transparent-proxy.h | 2 +- + 3 files changed, 12 insertions(+), 12 deletions(-) + +--- a/src/reqs.c ++++ b/src/reqs.c +@@ -418,7 +418,7 @@ BAD_REQUEST_ERROR: + } else { + #ifdef TRANSPARENT_PROXY + if (!do_transparent_proxy +- (connptr, hashofheaders, request, &config, url)) { ++ (connptr, hashofheaders, request, &config, &url)) { + goto fail; + } + #else +--- a/src/transparent-proxy.c ++++ b/src/transparent-proxy.c +@@ -55,11 +55,11 @@ static int build_url (char **url, const + int + do_transparent_proxy (struct conn_s *connptr, hashmap_t hashofheaders, + struct request_s *request, struct config_s *conf, +- char *url) ++ char **url) + { + socklen_t length; + char *data; +- size_t ulen = strlen (url); ++ size_t ulen = strlen (*url); + + length = hashmap_entry_by_key (hashofheaders, "host", (void **) &data); + if (length <= 0) { +@@ -73,7 +73,7 @@ do_transparent_proxy (struct conn_s *con + connptr->client_fd); + indicate_http_error (connptr, 400, "Bad Request", + "detail", "Unknown destination", +- "url", url, NULL); ++ "url", *url, NULL); + return 0; + } + +@@ -83,15 +83,15 @@ do_transparent_proxy (struct conn_s *con + request->port = ntohs (dest_addr.sin_port); + + request->path = (char *) safemalloc (ulen + 1); +- strlcpy (request->path, url, ulen + 1); ++ strlcpy (request->path, *url, ulen + 1); + + /* url overwritten by the call below is the url passed + * to this function, and is not the url variable in the + * caller. */ +- build_url (&url, request->host, request->port, request->path); ++ build_url (url, request->host, request->port, request->path); + log_message (LOG_INFO, + "process_request: trans IP %s %s for %d", +- request->method, url, connptr->client_fd); ++ request->method, *url, connptr->client_fd); + } else { + request->host = (char *) safemalloc (length + 1); + if (sscanf (data, "%[^:]:%hu", request->host, &request->port) != +@@ -101,15 +101,15 @@ do_transparent_proxy (struct conn_s *con + } + + request->path = (char *) safemalloc (ulen + 1); +- strlcpy (request->path, url, ulen + 1); ++ strlcpy (request->path, *url, ulen + 1); + + /* url overwritten by the call below is the url passed + * to this function, and is not the url variable in the + * caller. */ +- build_url (&url, request->host, request->port, request->path); ++ build_url (url, request->host, request->port, request->path); + log_message (LOG_INFO, + "process_request: trans Host %s %s for %d", +- request->method, url, connptr->client_fd); ++ request->method, *url, connptr->client_fd); + } + if (conf->ipAddr && strcmp (request->host, conf->ipAddr) == 0) { + log_message (LOG_ERR, +@@ -118,7 +118,7 @@ do_transparent_proxy (struct conn_s *con + indicate_http_error (connptr, 400, "Bad Request", + "detail", + "You tried to connect to the machine " +- "the proxy is running on", "url", url, ++ "the proxy is running on", "url", *url, + NULL); + return 0; + } +--- a/src/transparent-proxy.h ++++ b/src/transparent-proxy.h +@@ -32,7 +32,7 @@ + extern int do_transparent_proxy (struct conn_s *connptr, + hashmap_t hashofheaders, + struct request_s *request, +- struct config_s *config, char *url); ++ struct config_s *config, char **url); + + #endif + diff --git a/net/tinyproxy/patches/120-fix_INET6.patch b/net/tinyproxy/patches/120-fix_INET6.patch new file mode 100644 index 0000000..1c26835 --- /dev/null +++ b/net/tinyproxy/patches/120-fix_INET6.patch @@ -0,0 +1,38 @@ +--- a/src/sock.c ++++ b/src/sock.c +@@ -39,8 +39,7 @@ + * returned if the bind succeeded. Otherwise, -1 is returned + * to indicate an error. + */ +-static int +-bind_socket (int sockfd, const char *addr, int family) ++static int bind_socket (int sockfd, const char *addr) + { + struct addrinfo hints, *res, *ressave; + +@@ -48,7 +47,7 @@ bind_socket (int sockfd, const char *add + assert (addr != NULL && strlen (addr) != 0); + + memset (&hints, 0, sizeof (struct addrinfo)); +- hints.ai_family = family; ++ hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + + /* The local port it not important */ +@@ -106,14 +105,12 @@ int opensock (const char *host, int port + + /* Bind to the specified address */ + if (bind_to) { +- if (bind_socket (sockfd, bind_to, +- res->ai_family) < 0) { ++ if (bind_socket (sockfd, bind_to) < 0) { + close (sockfd); + continue; /* can't bind, so try again */ + } + } else if (config.bind_address) { +- if (bind_socket (sockfd, config.bind_address, +- res->ai_family) < 0) { ++ if (bind_socket (sockfd, config.bind_address) < 0) { + close (sockfd); + continue; /* can't bind, so try again */ + } diff --git a/net/tmsnc/Makefile b/net/tmsnc/Makefile new file mode 100644 index 0000000..b7b25fc --- /dev/null +++ b/net/tmsnc/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tmsnc +PKG_VERSION:=0.3.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/tmsnc +PKG_MD5SUM:=337dae91d4775e03b6681f61db56d2a7 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/tmsnc + SUBMENU:=Instant Messaging + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libncurses +libopenssl +libpthread + TITLE:=text-based MSN client + URL:=http://tmsnc.sourceforge.net +endef + +define Package/tmsnc/description + TMSNC is a textbased (console) MSN client written in C. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-rpath \ + --with-openssl="$(STAGING_DIR)/usr" \ + --with-ncurses="$(STAGING_DIR)/usr" \ + --without-libiconv-prefix \ + ) +endef + +define Package/tmsnc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tmsnc $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,tmsnc)) diff --git a/net/tor-alpha/Makefile b/net/tor-alpha/Makefile new file mode 100644 index 0000000..254205f --- /dev/null +++ b/net/tor-alpha/Makefile @@ -0,0 +1,127 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tor-alpha +PKG_VERSION:=0.2.2.24-alpha +PKG_RELEASE:=1 + +PKG_SOURCE:=tor-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://www.torproject.org/dist \ + https://archive.torproject.org/tor-package-archive +PKG_MD5SUM:=4c1e2c7d778f813d09227433fffe3990 + +PKG_BUILD_DIR:=$(BUILD_DIR)/tor-$(PKG_VERSION) +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/tor-alpha/Default + SECTION:=net + CATEGORY:=Network + URL:=https://www.torproject.org/ +endef + +define Package/tor-alpha/Default/description + Tor is a toolset for a wide range of organizations and people that want to + improve their safety and security on the Internet. Using Tor can help you + anonymize web browsing and publishing, instant messaging, IRC, SSH, and + more. Tor also provides a platform on which software developers can build + new applications with built-in anonymity, safety, and privacy features. +endef + +define Package/tor-alpha +$(call Package/tor-alpha/Default) + TITLE:=An anonymous Internet communication system + DEPENDS:=+libevent +libopenssl +libpthread +librt +miniupnpc +endef + +define Package/tor-alpha/description +$(call Package/tor-alpha/Default/description) + This package contains the tor daemon. +endef + +define Package/tor-alpha-geoip +$(call Package/tor-alpha/Default) + TITLE:=GeoIP db for tor + DEPENDS:=+tor-alpha +endef + +define Package/tor-alpha-geoip/description +$(call Package/tor-alpha/Default/description) + This package contains a GeoIP database mapping IP addresses to countries. +endef + +define Package/tor-alpha/conffiles +/etc/tor/torrc +endef + +define Package/tor-alpha/postinst +#!/bin/sh + +name=tor +id=52 + +# do not change below +# # check if we are on real system +if [ -z "$${IPKG_INSTROOT}" ]; then + # create copies of passwd and group, if we use squashfs + rootfs=`mount |awk '/root/ { print $$5 }'` + if [ "$$rootfs" = "squashfs" ]; then + if [ -h /etc/group ]; then + rm /etc/group + cp /rom/etc/group /etc/group + fi + if [ -h /etc/passwd ]; then + rm /etc/passwd + cp /rom/etc/passwd /etc/passwd + fi + fi +fi + +echo "" +if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then + echo "adding group $$name to /etc/group" + echo "$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc/group +fi + +if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then + echo "adding user $$name to /etc/passwd" + echo "$${name}:x:$${id}:$${id}:$${name}:/tmp/.$${name}:/bin/false" >> $${IPKG_INSTROOT}/etc/passwd +fi +endef + +CONFIGURE_ARGS += \ + --with-libevent-dir="$(STAGING_DIR)/usr" \ + --with-ssl-dir="$(STAGING_DIR)/usr" \ + --enable-upnp \ + --with-libminiupnpc-dir="$(STAGING_DIR)/usr" \ + +CONFIGURE_VARS += \ + CROSS_COMPILE="yes" \ + +# pass CFLAGS again to override -O2 set by configure +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS)" \ + +define Package/tor-alpha/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/tor.init $(1)/etc/init.d/tor + $(INSTALL_DIR) $(1)/etc/tor + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/tor/torrc.sample $(1)/etc/tor/torrc +endef + +define Package/tor-alpha-geoip/install + $(INSTALL_DIR) $(1)/usr/share/tor + $(CP) $(PKG_INSTALL_DIR)/usr/share/tor/geoip $(1)/usr/share/tor/ +endef + +$(eval $(call BuildPackage,tor-alpha)) +$(eval $(call BuildPackage,tor-alpha-geoip)) diff --git a/net/tor-alpha/files/tor.init b/net/tor-alpha/files/tor.init new file mode 100644 index 0000000..40d4ecf --- /dev/null +++ b/net/tor-alpha/files/tor.init @@ -0,0 +1,26 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=tor +DEFAULT=/etc/default/$BIN +LOG_D=/var/log/$BIN +LIB_D=/var/lib/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid +RUN_USER=$BIN +RUN_GROUP=$BIN + +start() { + [ -f $DEFAULT ] && . $DEFAULT + [ -d $LOG_D ] || ( mkdir -m 0755 -p $LOG_D && chown $RUN_USER:$RUN_GROUP $LOG_D ) + [ -d $LIB_D ] || ( mkdir -m 0700 -p $LIB_D && chown $RUN_USER:$RUN_GROUP $LIB_D ) + [ -d $RUN_D ] || mkdir -p $RUN_D + [ -f $PID_F ] || ( touch $PID_F && chown $RUN_USER:$RUN_GROUP $PID_F ) + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + diff --git a/net/tor-alpha/patches/001-torrc.patch b/net/tor-alpha/patches/001-torrc.patch new file mode 100644 index 0000000..a390a6e --- /dev/null +++ b/net/tor-alpha/patches/001-torrc.patch @@ -0,0 +1,22 @@ +--- a/src/config/torrc.sample.in ++++ b/src/config/torrc.sample.in +@@ -44,11 +44,11 @@ SocksListenAddress 127.0.0.1 # accept co + ## Uncomment this to start the process in the background... or use + ## --runasdaemon 1 on the command line. This is ignored on Windows; + ## see the FAQ entry if you want Tor to run as an NT service. +-#RunAsDaemon 1 ++RunAsDaemon 1 + + ## The directory for keeping all the keys/etc. By default, we store + ## things in $HOME/.tor on Unix, and in Application Data\tor on Windows. +-#DataDirectory @LOCALSTATEDIR@/lib/tor ++DataDirectory @LOCALSTATEDIR@/lib/tor + + ## The port on which Tor will listen for local connections from Tor + ## controller applications, as documented in control-spec.txt. +@@ -168,3 +168,5 @@ SocksListenAddress 127.0.0.1 # accept co + #BridgeRelay 1 + #ExitPolicy reject *:* + ++User tor ++PidFile @LOCALSTATEDIR@/run/tor.pid diff --git a/net/tor/Makefile b/net/tor/Makefile new file mode 100644 index 0000000..d505035 --- /dev/null +++ b/net/tor/Makefile @@ -0,0 +1,114 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tor +PKG_VERSION:=0.2.1.30 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://www.torproject.org/dist \ + https://archive.torproject.org/tor-package-archive +PKG_MD5SUM:=6c6d61e053af5969a245d025c4cfce9d + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/tor/Default + SECTION:=net + CATEGORY:=Network + URL:=https://www.torproject.org/ +endef + +define Package/tor/Default/description + Tor is a toolset for a wide range of organizations and people that want to + improve their safety and security on the Internet. Using Tor can help you + anonymize web browsing and publishing, instant messaging, IRC, SSH, and + more. Tor also provides a platform on which software developers can build + new applications with built-in anonymity, safety, and privacy features. +endef + +define Package/tor +$(call Package/tor/Default) + TITLE:=An anonymous Internet communication system + DEPENDS:=+libevent +libopenssl +libpthread +librt +endef + +define Package/tor-geoip +$(call Package/tor/Default) + TITLE:=GeoIP db for tor + DEPENDS:=+tor +endef + +define Package/tor/conffiles +/etc/tor/torrc +endef + +define Package/tor/postinst +#!/bin/sh + +name=tor +id=52 + +# do not change below +# # check if we are on real system +if [ -z "$${IPKG_INSTROOT}" ]; then + # create copies of passwd and group, if we use squashfs + rootfs=`mount |awk '/root/ { print $$5 }'` + if [ "$$rootfs" = "squashfs" ]; then + if [ -h /etc/group ]; then + rm /etc/group + cp /rom/etc/group /etc/group + fi + if [ -h /etc/passwd ]; then + rm /etc/passwd + cp /rom/etc/passwd /etc/passwd + fi + fi +fi + +echo "" +if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then + echo "adding group $$name to /etc/group" + echo "$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc/group +fi + +if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then + echo "adding user $$name to /etc/passwd" + echo "$${name}:x:$${id}:$${id}:$${name}:/tmp/.$${name}:/bin/false" >> $${IPKG_INSTROOT}/etc/passwd +fi +endef + +CONFIGURE_ARGS += \ + --with-libevent-dir="$(STAGING_DIR)/usr" \ + --with-ssl-dir="$(STAGING_DIR)/usr" \ + +CONFIGURE_VARS += \ + CROSS_COMPILE="yes" \ + +# pass CFLAGS again to override -O2 set by configure +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS)" \ + +define Package/tor/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/tor.init $(1)/etc/init.d/tor + $(INSTALL_DIR) $(1)/etc/tor + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/tor/torrc.sample $(1)/etc/tor/torrc +endef + +define Package/tor-geoip/install + $(INSTALL_DIR) $(1)/usr/share/tor + $(CP) $(PKG_INSTALL_DIR)/usr/share/tor/geoip $(1)/usr/share/tor/ +endef + +$(eval $(call BuildPackage,tor)) +$(eval $(call BuildPackage,tor-geoip)) diff --git a/net/tor/files/tor.init b/net/tor/files/tor.init new file mode 100644 index 0000000..40d4ecf --- /dev/null +++ b/net/tor/files/tor.init @@ -0,0 +1,26 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=tor +DEFAULT=/etc/default/$BIN +LOG_D=/var/log/$BIN +LIB_D=/var/lib/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid +RUN_USER=$BIN +RUN_GROUP=$BIN + +start() { + [ -f $DEFAULT ] && . $DEFAULT + [ -d $LOG_D ] || ( mkdir -m 0755 -p $LOG_D && chown $RUN_USER:$RUN_GROUP $LOG_D ) + [ -d $LIB_D ] || ( mkdir -m 0700 -p $LIB_D && chown $RUN_USER:$RUN_GROUP $LIB_D ) + [ -d $RUN_D ] || mkdir -p $RUN_D + [ -f $PID_F ] || ( touch $PID_F && chown $RUN_USER:$RUN_GROUP $PID_F ) + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + diff --git a/net/tor/patches/001-torrc.patch b/net/tor/patches/001-torrc.patch new file mode 100644 index 0000000..08258cf --- /dev/null +++ b/net/tor/patches/001-torrc.patch @@ -0,0 +1,22 @@ +--- a/src/config/torrc.sample.in ++++ b/src/config/torrc.sample.in +@@ -44,11 +44,11 @@ SocksListenAddress 127.0.0.1 # accept co + ## Uncomment this to start the process in the background... or use + ## --runasdaemon 1 on the command line. This is ignored on Windows; + ## see the FAQ entry if you want Tor to run as an NT service. +-#RunAsDaemon 1 ++RunAsDaemon 1 + + ## The directory for keeping all the keys/etc. By default, we store + ## things in $HOME/.tor on Unix, and in Application Data\tor on Windows. +-#DataDirectory @LOCALSTATEDIR@/lib/tor ++DataDirectory @LOCALSTATEDIR@/lib/tor + + ## The port on which Tor will listen for local connections from Tor + ## controller applications, as documented in control-spec.txt. +@@ -154,3 +154,5 @@ SocksListenAddress 127.0.0.1 # accept co + #BridgeRelay 1 + #ExitPolicy reject *:* + ++User tor ++PidFile @LOCALSTATEDIR@/run/tor.pid diff --git a/net/transmission/Makefile b/net/transmission/Makefile new file mode 100644 index 0000000..6c8258b --- /dev/null +++ b/net/transmission/Makefile @@ -0,0 +1,121 @@ +# +# Copyright (C) 2009-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=transmission +PKG_VERSION:=2.32 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://mirrors.m0k.org/transmission/files +PKG_MD5SUM:=cac5d0e07b92e563b34b61de5a6235c7 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/transmission/template + SUBMENU:=BitTorrent + SECTION:=net + CATEGORY:=Network + TITLE:=A free, lightweight BitTorrent client + URL:=http://www.transmissionbt.com + MAINTAINER:=Cezary Jackiewicz +endef + +define Package/transmission-daemon + $(call Package/transmission/template) + DEPENDS:=+libcurl +libopenssl +libpthread +libevent2 +librt + MENU:=1 +endef + +define Package/transmission-cli + $(call Package/transmission/template) + DEPENDS:=transmission-daemon +endef + +define Package/transmission-remote + $(call Package/transmission/template) +endef + +define Package/transmission-web + $(call Package/transmission/template) + DEPENDS:=transmission-daemon +endef + + +define Package/transmission-daemon/description + Transmission is a simple BitTorrent client. + It features a very simple, intuitive interface + on top on an efficient, cross-platform back-end. + This package contains the daemon itself. +endef + +define Package/transmission-cli/description + CLI utilities for transmission. +endef + +define Package/transmission-remote/description + CLI remote interface for transmission. +endef + +define Package/transmission-web/description + Webinterface resources for transmission. +endef + +define Package/transmission-daemon/conffiles +/etc/config/transmission +endef + +CONFIGURE_VARS += \ + LIBEVENT_LIBS="$(STAGING_DIR)/usr/lib/libevent-2.0.so.5" + +CONFIGURE_ARGS += \ + --enable-daemon \ + --enable-cli \ + --disable-gtk \ + --enable-largefile \ + --enable-lightweight + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" + +define Package/transmission-daemon/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) files/transmission.init $(1)/etc/init.d/transmission + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission +endef + +define Package/transmission-cli/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \ + $(PKG_INSTALL_DIR)/usr/bin/transmission-create \ + $(PKG_INSTALL_DIR)/usr/bin/transmission-edit \ + $(PKG_INSTALL_DIR)/usr/bin/transmission-show \ + $(1)/usr/bin/ +endef + +define Package/transmission-remote/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/ +endef + +define Package/transmission-web/install + $(INSTALL_DIR) $(1)/usr/share/transmission + $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/ +endef + +$(eval $(call BuildPackage,transmission-daemon)) +$(eval $(call BuildPackage,transmission-cli)) +$(eval $(call BuildPackage,transmission-remote)) +$(eval $(call BuildPackage,transmission-web)) diff --git a/net/transmission/files/transmission.config b/net/transmission/files/transmission.config new file mode 100644 index 0000000..8e3db7b --- /dev/null +++ b/net/transmission/files/transmission.config @@ -0,0 +1,65 @@ +config transmission + option enabled 0 + option config_dir '/tmp/transmission' + option run_daemon_as_user root + option alt_speed_down 50 + option alt_speed_enabled false + option alt_speed_time_begin 540 + option alt_speed_time_day 127 + option alt_speed_time_enabled false + option alt_speed_time_end 1020 + option alt_speed_up 50 + option bind_address_ipv4 '0.0.0.0' + option bind_address_ipv6 '::' + option blocklist_enabled false + option blocklist_url '' + option cache_size_mb 2 + option dht_enabled true + option download_dir '/tmp/transmission/done' + option encryption 1 + option idle_seeding_limit 30 + option idle_seeding_limit_enabled false + option incomplete_dir '/tmp/transmission/incomplete' + option incomplete_dir_enabled false + option lazy_bitfield_enabled true + option lpd_enabled false + option message_level 1 + option open_file_limit 32 + option peer_congestion_algorithm '' + option peer_limit_global 240 + option peer_limit_per_torrent 60 + option peer_port 51413 + option peer_port_random_high 65535 + option peer_port_random_low 49152 + option peer_port_random_on_start false + option peer_socket_tos 0 + option pex_enabled true + option port_forwarding_enabled true + option preallocation 1 + option prefetch_enabled 1 + option ratio_limit 2.0000 + option ratio_limit_enabled false + option rename_partial_files true + option rpc_authentication_required false + option rpc_bind_address '0.0.0.0' + option rpc_enabled true + option rpc_password '' + option rpc_port 9091 + option rpc_url '/transmission/' + option rpc_username '' + option rpc_whitelist '127.0.0.1,192.168.1.*' + option rpc_whitelist_enabled true + option script_torrent_done_enabled false + option script_torrent_done_filename '' + option speed_limit_down 100 + option speed_limit_down_enabled false + option speed_limit_up 20 + option speed_limit_up_enabled false + option start_added_torrents true + option trash_original_torrent_files false + option umask 18 + option upload_slots_per_torrent 14 + option utp_enabled true + option scrape_paused_torrents true + option watch_dir_enabled false + option watch_dir '' diff --git a/net/transmission/files/transmission.init b/net/transmission/files/transmission.init new file mode 100644 index 0000000..bb5e52a --- /dev/null +++ b/net/transmission/files/transmission.init @@ -0,0 +1,102 @@ +#!/bin/sh /etc/rc.common + +START=99 +BIN=/usr/bin/transmission-daemon +SSD=start-stop-daemon + +LIST_SEP=" +" +append_params() { + local p; local v; local s="$1"; shift + for p in $*; do + config_get v "$s" "$p" + IFS="$LIST_SEP" + for v in $v; do + [ -n "$v" ] && ( + echo "\""$p"\": "$v"," | sed -e 's|_|-|g' >> $config_dir/settings.json + ) + done + unset IFS + done +} + +append_params_quotes() { + local p; local v; local s="$1"; shift + for p in $*; do + config_get v "$s" "$p" + IFS="$LIST_SEP" + for v in $v; do + [ -n "$v" ] && ( + echo -n "\""$p | sed -e 's|/|\\/|g;s|_|-|g' >> $config_dir/settings.json; \ + echo "\": \""$v"\"," >> $config_dir/settings.json + ) + done + unset IFS + done +} + +start_service() { + local s="$1" + local enable=0 + local enabled=0 + local run_as_usr='root' + local open_file_limit=0 + local ulimit_files=`ulimit -n` + + # disabled? + config_get_bool enable "$s" enable 0 # compatibility with prev version + config_get_bool enabled "$s" enabled 0 + [ "$enabled" == 0 -a "$enable" == 0 ] && return 0 + config_get config_dir "$s" config_dir '/tmp/transmission' + mkdir -p "$config_dir" + config_get run_as_usr "$s" run_daemon_as_user 'root' + + echo "{" > $config_dir/settings.json + + append_params "$s" \ + alt_speed_down alt_speed_enabled alt_speed_time_begin alt_speed_time_day \ + alt_speed_time_enabled alt_speed_time_end alt_speed_up blocklist_enabled \ + cache_size_mb dht_enabled encryption idle_seeding_limit idle_seeding_limit_enabled \ + incomplete_dir_enabled lazy_bitfield_enabled lpd_enabled message_level \ + open_file_limit peer_limit_global peer_limit_per_torrent peer_port \ + peer_port_random_high peer_port_random_low peer_port_random_on_start \ + peer_socket_tos pex_enabled port_forwarding_enabled preallocation prefetch_enabled \ + ratio_limit ratio_limit_enabled rename_partial_files rpc_authentication_required \ + rpc_enabled rpc_port rpc_whitelist_enabled script_torrent_done_enabled \ + speed_limit_down speed_limit_down_enabled speed_limit_up \ + speed_limit_up_enabled start_added_torrents trash_original_torrent_files \ + umask upload_slots_per_torrent utp_enabled scrape_paused_torrents \ + watch_dir_enabled + + append_params_quotes "$s" \ + blocklist_url bind_address_ipv4 bind_address_ipv6 download_dir incomplete_dir \ + peer_congestion_algorithm rpc_bind_address rpc_password rpc_url \ + rpc_username rpc_whitelist script_torrent_done_filename watch_dir + + echo "\""invalid-key"\": false" >> $config_dir/settings.json + echo "}" >> $config_dir/settings.json + + chown -R $run_as_usr $config_dir + + config_get open_file_limit "$s" open_file_limit 32 + let open_limit_files="$open_file_limit + 8" + + if [ ${open_file_limit} -gt ${ulimit_files} ]; then + ulimit -n $open_limit_files + fi + + eval "$SSD -c $run_as_usr -q -b -x $BIN -S -- -g $config_dir" +} + +start() { + config_load transmission + config_foreach start_service transmission +} + +stop() { + service_kill $(basename $BIN) +} + +restart() { + stop; sleep 5; start +} diff --git a/net/transmission/patches/010-opt_scrape_paused.patch b/net/transmission/patches/010-opt_scrape_paused.patch new file mode 100644 index 0000000..266a305 --- /dev/null +++ b/net/transmission/patches/010-opt_scrape_paused.patch @@ -0,0 +1,131 @@ +Index: transmission-2.31/libtransmission/announcer.c +=================================================================== +--- transmission-2.31.orig/libtransmission/announcer.c 2011-05-23 13:34:54.000000000 +0200 ++++ transmission-2.31/libtransmission/announcer.c 2011-05-23 13:48:03.000000000 +0200 +@@ -1433,11 +1433,13 @@ + tor = NULL; + while(( tor = tr_torrentNext( announcer->session, tor ))) { + struct tr_torrent_tiers * tt = tor->tiers; ++ const bool paused = !tor->isRunning; ++ const bool scrapePaused = tr_sessionGetScrapePaused( announcer->session ); + for( i=0; tt && itier_count; ++i ) { + tr_tier * tier = &tt->tiers[i]; + if( tierNeedsToAnnounce( tier, now ) ) + tr_ptrArrayAppend( &announceMe, tier ); +- else if( tierNeedsToScrape( tier, now ) ) ++ else if( tierNeedsToScrape( tier, now ) && ( !paused || scrapePaused ) ) + tr_ptrArrayAppend( &scrapeMe, tier ); + } + } +@@ -1505,6 +1507,7 @@ + tr_tracker_stat * ret; + struct tr_torrent_tiers * tt; + const time_t now = tr_time( ); ++ bool scrapePaused; + + assert( tr_isTorrent( torrent ) ); + assert( tr_torrentIsLocked( torrent ) ); +@@ -1515,6 +1518,8 @@ + *setmeTrackerCount = tt->tracker_count; + ret = tr_new0( tr_tracker_stat, tt->tracker_count ); + ++ scrapePaused = tr_sessionGetScrapePaused( torrent->session ); ++ + /* populate the stats */ + for( i=0; itier_count; ++i ) + { +@@ -1559,7 +1564,7 @@ + + if( tier->isScraping ) + st->scrapeState = TR_TRACKER_ACTIVE; +- else if( !tier->scrapeAt ) ++ else if( !tier->scrapeAt || ( !torrent->isRunning && !scrapePaused ) ) + st->scrapeState = TR_TRACKER_INACTIVE; + else if( tier->scrapeAt > now ) + { +Index: transmission-2.31/libtransmission/session.c +=================================================================== +--- transmission-2.31.orig/libtransmission/session.c 2011-05-23 13:41:05.000000000 +0200 ++++ transmission-2.31/libtransmission/session.c 2011-05-23 13:50:23.000000000 +0200 +@@ -359,6 +359,7 @@ + tr_bencDictAddStr ( d, TR_PREFS_KEY_BIND_ADDRESS_IPV4, TR_DEFAULT_BIND_ADDRESS_IPV4 ); + tr_bencDictAddStr ( d, TR_PREFS_KEY_BIND_ADDRESS_IPV6, TR_DEFAULT_BIND_ADDRESS_IPV6 ); + tr_bencDictAddBool( d, TR_PREFS_KEY_START, true ); ++ tr_bencDictAddBool( d, TR_PREFS_KEY_SCRAPE_PAUSED_TORRENTS, true ); + tr_bencDictAddBool( d, TR_PREFS_KEY_TRASH_ORIGINAL, false ); + } + +@@ -424,6 +425,7 @@ + tr_bencDictAddStr ( d, TR_PREFS_KEY_BIND_ADDRESS_IPV4, tr_address_to_string( &s->public_ipv4->addr ) ); + tr_bencDictAddStr ( d, TR_PREFS_KEY_BIND_ADDRESS_IPV6, tr_address_to_string( &s->public_ipv6->addr ) ); + tr_bencDictAddBool( d, TR_PREFS_KEY_START, !tr_sessionGetPaused( s ) ); ++ tr_bencDictAddBool( d, TR_PREFS_KEY_SCRAPE_PAUSED_TORRENTS, tr_sessionGetScrapePaused( s ) ); + tr_bencDictAddBool( d, TR_PREFS_KEY_TRASH_ORIGINAL, tr_sessionGetDeleteSource( s ) ); + } + +@@ -776,6 +778,8 @@ + tr_blocklistSetURL( session, str ); + if( tr_bencDictFindBool( settings, TR_PREFS_KEY_START, &boolVal ) ) + tr_sessionSetPaused( session, !boolVal ); ++ if( tr_bencDictFindBool( settings, TR_PREFS_KEY_SCRAPE_PAUSED_TORRENTS, &boolVal ) ) ++ tr_sessionSetScrapePaused( session, boolVal ); + if( tr_bencDictFindBool( settings, TR_PREFS_KEY_TRASH_ORIGINAL, &boolVal) ) + tr_sessionSetDeleteSource( session, boolVal ); + +@@ -1636,6 +1640,22 @@ + } + + void ++tr_sessionSetScrapePaused( tr_session * session, bool enable ) ++{ ++ assert( tr_isSession( session ) ); ++ ++ session->scrapePausedTorrents = enable; ++} ++ ++bool ++tr_sessionGetScrapePaused( const tr_session * session ) ++{ ++ assert( tr_isSession( session ) ); ++ ++ return session->scrapePausedTorrents; ++} ++ ++void + tr_sessionSetDeleteSource( tr_session * session, bool deleteSource ) + { + assert( tr_isSession( session ) ); +Index: transmission-2.31/libtransmission/session.h +=================================================================== +--- transmission-2.31.orig/libtransmission/session.h 2011-05-23 13:45:30.000000000 +0200 ++++ transmission-2.31/libtransmission/session.h 2011-05-23 13:46:12.000000000 +0200 +@@ -106,6 +106,7 @@ + bool isIdleLimited; + bool isIncompleteDirEnabled; + bool pauseAddedTorrent; ++ bool scrapePausedTorrents; + bool deleteSourceTorrent; + + tr_benc removedTorrents; +Index: transmission-2.31/libtransmission/transmission.h +=================================================================== +--- transmission-2.31.orig/libtransmission/transmission.h 2011-05-23 13:48:11.000000000 +0200 ++++ transmission-2.31/libtransmission/transmission.h 2011-05-23 13:49:15.000000000 +0200 +@@ -213,6 +213,7 @@ + #define TR_PREFS_KEY_UMASK "umask" + #define TR_PREFS_KEY_UPLOAD_SLOTS_PER_TORRENT "upload-slots-per-torrent" + #define TR_PREFS_KEY_START "start-added-torrents" ++#define TR_PREFS_KEY_SCRAPE_PAUSED_TORRENTS "scrape-paused-torrents" + #define TR_PREFS_KEY_TRASH_ORIGINAL "trash-original-torrent-files" + + +@@ -731,6 +732,9 @@ + void tr_sessionSetPaused ( tr_session *, bool isPaused ); + bool tr_sessionGetPaused ( const tr_session * ); + ++void tr_sessionSetScrapePaused ( tr_session *, bool enable ); ++bool tr_sessionGetScrapePaused ( const tr_session * ); ++ + void tr_sessionSetDeleteSource ( tr_session *, bool deleteSource ); + bool tr_sessionGetDeleteSource ( const tr_session * ); + diff --git a/net/transocks/Makefile b/net/transocks/Makefile new file mode 100644 index 0000000..6e2cf14 --- /dev/null +++ b/net/transocks/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=transocks +PKG_VERSION:=1.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=:pserver:anonymous@transocks.cvs.sourceforge.net:/cvsroot/transocks +PKG_SOURCE_SUBDIR:=transocks +PKG_SOURCE_VERSION:=-DNOW +PKG_SOURCE_PROTO:=cvs + +include $(INCLUDE_DIR)/package.mk + +PKG_UNPACK:=gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xf - + +define Build/Compile + $(TARGET_CC) \ + -I$(STAGING_DIR)/usr/include \ + $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + $(LIBRPC) -lsocks -o \ + $(PKG_BUILD_DIR)/transocks \ + $(PKG_BUILD_DIR)/transocks.c +endef + +define Package/transocks + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=Transparent SOCKSifying proxy + DEPENDS:=+libsocks $(LIBRPC_DEPENDS) +endef + +define Package/transocks/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/transocks $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,transocks)) diff --git a/net/tsocks/Makefile b/net/tsocks/Makefile new file mode 100644 index 0000000..305fc36 --- /dev/null +++ b/net/tsocks/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tsocks +PKG_VERSION:=1.8 +PKG_RELEASE:=1 +PKG_MD5SUM:=51caefd77e5d440d0bbd6443db4fc0f8 + +PKG_SOURCE_URL:=@SF/tsocks +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)beta5.tar.gz + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/tsocks + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=Transparent SOCKS v4 proxying library + URL:=http://tsocks.sourceforge.net/ +endef + +define Package/tsocks/description +Transparent SOCKS v4 proxying library +endef + +define Build/Configure + $(call Build/Configure/Default,\ + --with-conf=/etc/tsocks.conf \ + ) +endef + +define Package/tsocks/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tsocks $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/lib/libtsocks.so{,*} $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,tsocks)) diff --git a/net/ttcp/Makefile b/net/ttcp/Makefile new file mode 100644 index 0000000..3badab6 --- /dev/null +++ b/net/ttcp/Makefile @@ -0,0 +1,38 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ttcp +PKG_VERSION:=3.8 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/ttcp + +include $(INCLUDE_DIR)/package.mk + +define Package/ttcp + SECTION:=net + CATEGORY:=Network + TITLE:=A TCP connection performance tester + URL:=https://dev.openwrt.org/browser/packages/net/ttcp/ +endef + +define Package/ttcp/description + A small utility to test TCP connection performance. +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/ttcp ttcp.c +endef + +define Package/ttcp/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ttcp $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,ttcp)) diff --git a/net/ttcp/ttcp.c b/net/ttcp/ttcp.c new file mode 100644 index 0000000..7233ace --- /dev/null +++ b/net/ttcp/ttcp.c @@ -0,0 +1,2374 @@ +/* + * T T C P . C + * + * Test TCP connection. Makes a connection on port 5010 + * and transfers fabricated buffers or data copied from stdin. + * + * Usable on 4.2, 4.3, and 4.1a systems by defining one of + * BSD42 BSD43 (BSD41a) + * Machines using System V with BSD sockets should define SYSV. + * + * Modified for operation under 4.2BSD, 18 Dec 84 + * T.C. Slattery, USNA + * Minor improvements, Mike Muuss and Terry Slattery, 16-Oct-85. + * Modified in 1989 at Silicon Graphics, Inc. + * catch SIGPIPE to be able to print stats when receiver has died + * for tcp, don't look for sentinel during reads to allow small transfers + * increased default buffer size to 8K, nbuf to 2K to transfer 16MB + * moved default port to 5001, beyond IPPORT_USERRESERVED + * make sinkmode default because it is more popular, + * -s now means don't sink/source + * count number of read/write system calls to see effects of + * blocking from full socket buffers + * for tcp, -D option turns off buffered writes (sets TCP_NODELAY sockopt) + * buffer alignment options, -A and -O + * print stats in a format that's a bit easier to use with grep & awk + * for SYSV, mimic BSD routines to use most of the existing timing code + * Modified by Steve Miller of the University of Maryland, College Park + * -b sets the socket buffer size (SO_SNDBUF/SO_RCVBUF) + * Modified Sept. 1989 at Silicon Graphics, Inc. + * restored -s sense at request of tcs@brl + * Modified Oct. 1991 at Silicon Graphics, Inc. + * use getopt(3) for option processing, add -f and -T options. + * SGI IRIX 3.3 and 4.0 releases don't need #define SYSV. + * + * Modified --> Nov 1996 at CERN (Daniel DAVIDS) + * printout of the Socket-Buffer-Sizes + * configured for HP-UX 9000 OS + * configured for Windows NT OS + * Modified Dec 1996 at CERN (Jacques ROCHEZ) + * severe cleanup + * addaptation to the gcc compiler (ANSI) + * configured for Lynx OS + * automatic format for the rate display (G/M/K/)bytes/sec + * added log (L) and more help (h) options. + * Modified May 1997 at CERN (Jacques ROCHEZ) + * removed the mes() function following err() function. + * changed the default port to 5010 + * Modified jul 1997 at CERN (Jacques ROCHEZ) + * adapted the timing calculation in microseconds + * addapted the code for Vsisual C++ under NT4.0 + * Modified aug 1997 at CERN (Jacques ROCHEZ) + * initialise to 0 the variables nbytes, numcalls + * moved the buffer pre-load outside the measured timed area + * Distribution Status - + * Public Domain. Distribution Unlimited. + * Modified jun 1998 at Epigram + * - print hash marks to indicate prograss on transmitting side + * - sleep between bursts of buffers + * - set number of buffers/burst + * Modified jul 1998 at Epigram + * - send random size buffers + * Modified jan 1999 at Epigram (WES) + * - added start and end patterns to UDP start and end packets + * - added handling of missed start, end, or data packets for UDP tests + */ +#ifndef lint +static char RCSid[] = "ttcp.c $- CERN Revision: 3.8 (dev level) -$"; +#endif + +static char VersDate[] = "Epigram 15-jul-98"; + +/* system dependent setting + * ------------------------ + * uname -a,gcc -v a.c are the tools used + * + * Platform/OS #define MACRO predefined + * ----------- ------- --------------------------------------------------- + * SunOS OS BSD43 __unix__ __sun__ __sparc__ + * SUN Solaris SYSV __unix__ __sun__ __sparc__ __svr4__ + * SGI-IRIX < 3.3 SYSV set as #define sgi + * HP-UX 9000 SYSV __unix__ __hpux__ __hp9k8__ + * OSF/1 V3.2 SYSV __unix__ __osf__ __alpha__ + * OSF/1 V4.0 SYSV __unix__ __osf__ __alpha__ _CFE + * LynxOS SYSV __unix__ __lynx__ __powerpc__ + * Windows NT SYSV __WINNT__ __i386__ __M_COFF__ + * AIX SYSV _AIX _AIX32 _POWER _IBMR2 _ARCH_PWR + + + * Micosoft Visual C++ compiler under WindowNT 4.0 + * Windows NT _WINDOWS WIN32 + + * Unix BSD 41a BSD41a + * 42 BSD42 + * 43 BSD43 + + * Machines using System V with BSD sockets should define SYSV. + * + * Compiler commands + * ----------------- + * LynxOS : gcc -c ttcp.c -o ttcp.o | gcc -o ttcp -O ttcp.o -lnetinet -lc_p -lc + */ + +/* -------------attempt to set an automatic UNIX OS family detection -------*/ + +#if defined(__hp9k8__) || defined(__osf__) || defined(__srv4__) +#define SYSV +#endif +#if defined(__lynx__) +#define SYSV +#endif +/* for solaris (__srv4__) the parameters SYSV is already set */ + +/* version A.09.01 'key words' differs from A.09.05 A */ +#if defined(__hpux) +#define __hpux__ +#endif + +#if defined(__sun__)&&!defined(__srv4__) +#define BSD43 /* changed by BSD42 if necessary */ +#endif + +#if defined(_WIN32) /* Window NT 4.0 compiled with VisualC++ 4 */ +#define __NTVIS__ +#define SYSV +#endif + +#if defined(__FreeBSD__) +#define BSD43 +#endif + +#if defined(__linux__) +#define BSD43 +#endif +/*--------------------------------------------------------------------------*/ + +#if !defined(UNDER_CE) +#include +#include +#include +#include +#endif + +#if defined(SYSV) + +#if defined(__osf__) +#include +#include +#include +#include +#include +#include /* struct timeval */ +#include /* definition of struct rusage */ + +#else /* else of __osf__ */ +#if defined(__NTVIS__) +#include +#include /* required for all Windows applications */ +#include +#include +#include +#if !defined(UNDER_CE) +#include +#include +#endif +#include +#include +struct rusage { struct timeval ru_utime, ru_stime; }; +#define RUSAGE_SELF 0 +#else /* else of __NTVIS__ */ +#if defined(__lynx__) +#include /* located in /usr/include/..... */ +#include +#include +#include +#include +#include +#include /* definition of struct rusage */ +#include +#define RUSAGE_SELF 0 +#include /* definition of TICKSPERSEC (HZ) */ +#include + +#else /* else of __Lynx__ */ +#if defined(__svr4__) +#include +#include +#include +#include +#include +#include +#include /* struct timeval */ +#include /* definition of struct rusage */ +#include +#define RUSAGE_SELF 0 +#include + +#else /* else of __svr4__ all SYSV cases except those mentionned before */ +#include +#include +#include +#include +#include +#include /* struct timeval */ +#include /* definition of struct rusage */ +#include +#define RUSAGE_SELF 0 +#include + +#endif /* __svr4__ */ +#endif /* __lynx__ */ +#endif /* __NTVIS__ */ +#endif /* __osf__ */ + +#else /* else of SYSV it is a BSD OS */ +#include +#include +#include +#include +#include +#include +#include +#if defined(__linux__) +#include /* struct timeval */ +#else +#include /* struct timeval */ +#endif +#include /* definition of struct rusage */ +#include /* for usleep() - henry */ +#define SOCKET_ERROR -1 + +#endif /* SYSV */ + +#if defined(__NTVIS__) + +#if defined(_DEBUG) /* usual debug symbol for VC++ */ +#define DEBUG 1 +#endif + +void usleep(unsigned int microseconds); + +#define bcopy(a,b,n) memcpy((b), (a), (n)) +#define bzero(a,n) memset((a), 0, (n)) + +#ifndef _GETOPT_ +#define _GETOPT_ +int getopt(int argc, char **argv, char *optstring); + +extern char *optarg; // returned arg to go with this option +extern int optind; // index to next argv element to process +extern int opterr; // should error messages be printed? +extern int optopt; // + +#define BADCH ('?') +#endif // _GETOPT + +/* get option letter from argument vector */ +int + opterr = 1, // should error messages be printed? + optind = 1, // index into parent argv vector + optopt; // character checked for validity +char *optarg; // argument associated with option + +#define EMSG "" +char *progname; // may also be defined elsewhere +#endif /*__NTVIS__*/ + +/* sockaddr_in == file server address structure + * + * Socket address, internet style. declared in : /netinet/in.h + * struct sockaddr_in {short sin_family; + * u_short sin_port; + * struct in_addr sin_addr; + * char sin_zero[8]; + * }; + * + * Structure used by kernel to store most addresses. declared in ./sys/socket.h + * struct sockaddr{u_short sa_family; address family + * char sa_data[14]; up to 14 bytes of direct address + * }; + * PS : sin stand for "socket internet number" + */ + +#ifndef __NTVIS__ +#define FAR +#endif + +#if defined(__CONST_SOCKADDR_ARG) +#define SOCKADDR_CAST (__CONST_SOCKADDR_ARG) +#elif defined(__lynx__) || defined(__sun__) || defined(_AIX) || defined(__FreeBSD__) || defined(__NTVIS__) +#define SOCKADDR_CAST (struct sockaddr FAR *) +#else +#define SOCKADDR_CAST +#endif + +#if defined(__sun__) +struct sockaddr_in sockaddr; /* done in ./X11/Xdmcp.h */ +#endif + +struct sockaddr_in sinme; /* is the socket struct. in the local host */ +struct sockaddr_in sinhim; /* is the socket struc. in the remote host */ + +#if defined(__lynx__) || defined(__svr4__) || defined(_AIX) +struct sockaddr frominet; +#else +struct sockaddr_in frominet; +#endif /* __lynx__ */ + +int domain, fromlen; + +#if !defined(__NTVIS__) +#define SOCKET int +#endif /* __NTVIS__ */ +SOCKET fd; /* fd of network socket */ + +#if !defined(__lynx__) +extern int errno; +#endif + +#include + +FILE *fplog = NULL; /* file pointer for the log file */ +char logfile[100]; /* file name for the log */ +static char logfile_head[] ="ttcp_log"; /* header name for the log */ +int buflen = 8 * 1024; /* length of buffer */ +char *buf; /* ptr to dynamic buffer */ +int nbuf = 2 * 1024; /* number of buffers to send in sinkmode */ + +#define START_PKT_LEN 4 +#define START_PATTERN_LEN 4 +#define END_PKT_LEN 8 +#define END_PATTERN_LEN 4 +#define MIN_UDP_LEN 5 + +char start_pattern[START_PATTERN_LEN] = {1, 2, 3, 4}; +char end_pattern[END_PATTERN_LEN] = {2, 2, 2, 2}; + +int bufoffset = 0; /* align buffer to this */ +int bufalign = 16*1024; /* modulo this */ + +int udp = 0; /* 0 = tcp, !0 = udp */ +int options = 0; /* socket options */ +int one = 1; /* for 4.3 BSD style setsockopt() */ +short port = 5010; /* TCP port number */ +char *host; /* ptr to name of host */ +int rndm = 0; /* 0="normal", !0=random data */ +int trans; /* 0=receive, !0=transmit mode */ +int timeout; /* read timeout in millisec */ +int debug = 0; /* 0=No-Debug, 1=Debug-Set-On */ +int sinkmode = 0; /* 0=normal I/O, !0=sink/source mode */ +int verbose = 0; /* 0=print basic info, 1=print cpu rate, + * proc resource usage. */ +int nodelay = 0; /* set TCP_NODELAY socket option */ +int pri = 0; /* link layer priority */ +int b_flag = 0; /* use mread() */ +int log_cnt = 0; /* append result to a log */ +int sockbufsize = 0; /* socket buffer size to use */ +char fmt = 'A'; /* output format: + * b = bits, B = bytes, + * k = kilobits, K = kilobytes, + * m = megabits, M = megabytes, + * g = gigabits, G = gigabytes, + * A = automatic Xbytes (default) */ +int touchdata = 0; /* access data after reading */ +int seq_info = 0; /* report out of order seq nums */ + +int hash = 0; /* print hash marks for each buffer */ +int udpsleep = 0; /* sleep in between udp buffers */ +int burstn = 1; /* number of buffers per burst */ +int bufmin = -1; /* minimum buffer size to use when + sending random-size buffers */ +unsigned int seed = 1; /* seed for random number generator + used for random buffer lengths */ +int no_start = 0; /* skip the start frames for UDP */ +int no_data = 0; /* skip all data frames for UDP */ +int no_end = 0; /* skip the end frames for UDP */ + +double nbytes; /* bytes on net */ +unsigned long numCalls; /* # of I/O system calls */ + +struct hostent *addr; +extern int optind; +extern char *optarg; + +#if defined(UNDER_CE) +static int errno; +static char *weekday[] ={"Sun", "Mon","Tues", "Wed", "Thurs", "Fri", "Sat"}; +static char *month[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "July", "Aug", "Sep", "Oct", "Nov", "Dec"}; +#define perror printf +#endif + +/*--------------------------------------------------------------------------*/ +static struct timeval time0; /* Time at which timing started */ +static struct timeval time1; +static struct rusage ru0; /* Resource utilization at the start */ +static struct rusage ru1; +static struct tm *tms; /* system time structure */ + + +/*-----------Prototype functions definitions -------------------------------*/ +/*--------------------------------------------------------------------------*/ + + /* ANSI input/output functions (stdio.h) */ + +#if defined(__lynx__) +int getopt(int, char**, char*); +int gettimeofday(struct timeval *tp, struct timezone *tzp); + +#else +#if defined(__svr4__) + +#else +#if defined(_AIX) + +#else +#if defined(__hpux__) +#else +#if defined(__NTVIS__) +#else +#if defined(BSD42) || defined(BSD43) +#else + +int printf( char*, ...); +int fprintf(FILE*,char*, ...); +void perror(char*); +int getopt(int, char**, char*); +int gettimeofday(struct timeval *tp, struct timezone *tzp); +#endif /* BSD42 || BSD43 */ +#endif /* __NTVIS__ */ +#endif /* __hpux__ */ +#endif /* _AIX */ +#endif /* __svr4__ */ +#endif /* __lynx__ */ + +int main(int argc, char* argv[]); +#if ( (!(defined(BSD42))) && (!(defined(BSD43))) && (!(defined(__NTVIS__))) ) +int read(int, char*, int); +int write(int, char*, int); +int close(int); +#endif /* !(BSD42) && !(BSD43) */ +int fclose(FILE *stream); + +#if !defined(BSD43) && !defined(__NTVIS__) +void bzero(char*,int); +void bcopy(char*, char*, int); +char strncpy(char *s1,char *s2,size_t n); +int atoi(char*); +int malloc(int); +#endif + + + /* ANSI socket functions prototype /sys/socket.h */ +#if defined(__lynx__) +int select(int, fd_set*, fd_set*, fd_set*, struct timeval*); + +#else +#if defined(__svr4__) && !defined(sparc) + +/* informations in : /usr/include/sys/socket.h */ +int socket(int, int, int); +int connect(int, struct sockaddr *, int); +int bind(int, struct sockaddr *, int); +int listen(int, int); +int accept(int, struct sockaddr *, int *); +int sendto(int, const char *, int, int, const struct sockaddr *, int); +int recvfrom(int, char *, int, int, struct sockaddr *, int *); +int getpeername(int, struct sockaddr *, int *); +int getsockopt(int, int, int, char *, int *); +int select(int, fd_set*, fd_set*, fd_set*, struct timeval*); + +#else +#if defined(_AIX) +int select(unsigned long, void *, void *, void *, struct timeval *); + +#else +#if defined(__hpux__) +int getrusage(int who,struct rusage *rusage); + +#else +#if defined(__NTVIS__) + +#else +#if defined(BSD42) || defined(BSD43) + +#else + +int socket(int, int, int); +int connect(int s,struct sockaddr_in *name, int namelen); +int bind(int s,struct sockaddr *name,int namelen); +int listen(int, int); +int accept(int, struct sockaddr_in *, int *); +int sendto(int, char *, int, int, struct sockaddr_in *, int); +int recvfrom(int, char *, int, int, struct sockaddr_in *, int *); +int getpeername(int, struct sockaddr *, int *); +int setsockopt(int, int, int, char *, int); + +int getsockopt(int, int, int, char*, int*); +int select(int, fd_set*, fd_set*, fd_set*, struct timeval*); + +#endif /* BSD42 || BSD43 */ +#endif /* __hpux__ */ +#endif /* _AIX */ +#endif /* __svr4__ */ +#endif /* __lynx__ */ +#endif /* __NTVIS__ */ + +/* ttcp prototype functions */ +void udp_rcv_test(void); +double calc_cpu_time(struct rusage *r0, struct rusage *r1); +double calc_real_time(struct timeval *t0, struct timeval *t1); +int getrusage(int who,struct rusage *rusage); +void sockets_err(char*); +void err(char *); +void mes(char *); +void pattern(char *, int); +int Nread(SOCKET, void *, int); +int Nwrite(int, void *, int); +void delay(int); +int mread(int, char *,unsigned); +char *outfmt(char format, double b); +void prep_timer(void); +void read_timer(void); +void result_summary(void); +void prusage(struct rusage*, struct rusage*, + struct timeval*, struct timeval*); +void tvadd(struct timeval *tsum, struct timeval *t0,struct timeval *t1); +void tvsub(struct timeval *tdiff, struct timeval *t1, struct timeval *t0); +void psecs(int); +void open_log(void); +void close_log(void); +void do_Usage(void); +void do_help(void); + +/*--------------------------------------------------------------------------*/ +#if !defined(__NTVIS__) +void +sigpipe() +{; +} +#endif +/*--------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------*/ +int +main(int argc, char **argv) +{ + unsigned long addr_tmp; + int c,k; + int sockbufsndsize,sockbufrcvsize; + int sockbuflen; + struct sockaddr_in peer; + int peerlen = sizeof(peer); + +#if defined(__NTVIS__) + extern char *optarg; + WSADATA WSAData; + WSAStartup(MAKEWORD(1,1), &WSAData); +#endif /* __NTVIS__ */ + + if (argc < 2) { do_Usage(); exit(1); } + + while (1) { + while ((c=getopt(argc, argv, "hidrstuvxHVBDTLb:f:l:n:p:A:O:S:N:P:R:I:w:")) != -1) { + switch (c) { + case 'w': + timeout = atoi(optarg); + break; + case 'I': + seed = atoi(optarg); + break; + case 'N': + burstn = atoi(optarg); + break; + case 'P': +#if defined(__linux__) + pri = atoi(optarg); + break; +#else + fprintf(stderr, "ttcp: -P option not supported on this OS\n"); + exit(1); +#endif + case 'R': + bufmin = atoi(optarg); + break; + case 'S': + udpsleep = atoi(optarg); + if (udpsleep < 0) udpsleep = 0; + /* convert msec arg to usec for usleep, minimum 10ms */ + udpsleep = udpsleep * 1000; + break; + case 'H': + hash = 1; + break; + case 'V': + fprintf(stdout,"%s %s\n" , RCSid , VersDate ); + exit(0); + case 'B': + b_flag = 1; + break; + case 'L': + log_cnt = 1; + break; + case 'h': + do_help(); + exit(1); + break; + case 't': + trans = 1; + break; + case 'r': + trans = 0; + break; + case 'x': + rndm = 1; + break; + case 'd': + options |= SO_DEBUG; + break; + case 'D': +#ifdef TCP_NODELAY + nodelay = 1; +#else + fprintf(stderr, + "ttcp: -D option ignored: TCP_NODELAY socket option not supported\n"); +#endif + break; + case 'n': + nbuf = atoi(optarg); + break; + case 'l': + buflen = atoi(optarg); + break; + case 's': + sinkmode = !sinkmode; + break; + case 'p': + port = atoi(optarg); + break; + case 'u': + udp = 1; + break; + case 'v': + verbose = 1; + break; + case 'A': + bufalign = atoi(optarg); + break; + case 'O': + bufoffset = atoi(optarg); + break; + case 'b': +#if defined(SO_SNDBUF) || defined(SO_RCVBUF) + sockbufsize = atoi(optarg); +#else + fprintf(stderr, +"ttcp: -b option ignored: SO_SNDBUF/SO_RCVBUF socket options not supported\n"); +#endif + break; + case 'f': + fmt = *optarg; + break; + case 'T': + touchdata = 1; + break; + case 'i': + seq_info = 1; + break; + + default: + {do_Usage(); exit(1);} + }/*switch */ + }/* while getopt() */ + + argc -= optind; + argv += optind; + optind = 0; + + /* check for '--' args */ + if (argc == 0) { + /* no more args */ + break; /* while (1) */ +#if defined(DEBUG) + } else if (!strcmp(argv[0], "--nostart")) { + no_start = 1; + argc--; argv++; + } else if (!strcmp(argv[0], "--nodata")) { + no_data = 1; + argc--; argv++; + } else if (!strcmp(argv[0], "--noend")) { + no_end = 1; + argc--; argv++; + } else if (!strcmp(argv[0], "--debug")) { + debug = 1; + argc--; argv++; +#endif /* DEBUG */ + } else if (!strncmp(argv[0], "--", 2)) { + fprintf(stderr, "ttcp: illegal option: %s\n", argv[0]); + do_Usage(); exit(1); + } else { + /* the arg was not a '--' arg */ + break; /* while (1) */ + } + } /* while (1) */ + + + /* ----------------------- main part ----------------------- */ + +#if defined(__NTVIS__) && !defined(UNDER_CE) + /* Set "stdin" to have binary mode: */ + if (_setmode(_fileno(stdin), _O_BINARY) == -1) + perror("%s: Error setting stdin to binary mode"); + /* Set "stdout" to have binary mode: */ + if (_setmode(_fileno(stdout), _O_BINARY) == -1) + perror("%s: Error setting stdout to binary mode"); +#endif /* __NTVIS__ */ + +if (log_cnt) open_log(); + +/* input error checking */ +if (burstn > nbuf) { + fprintf(stderr, "ttcp: buffers per burst must be less than or equal to " + "total number of buffers\n"); + exit(1); +} +if (bufmin < -1) { + fprintf(stderr, "ttcp: minimum buffer size specified with -R option must " + "be non-negative\n"); + exit(1); +} +if (buflen > 65535) { + fprintf(stderr, "ttcp: maximum buffer size specified with -l option must " + "be <= 65536\n"); + exit(1); +} +if (bufmin > buflen) { + fprintf(stderr, "ttcp: minimum buffer size specified with -R option must " + "be less than or equal to (maximum) buffer size specified with -l\n"); + exit(1); +} + +/* buffer allocation */ + + if (udp && buflen < MIN_UDP_LEN) + buflen = MIN_UDP_LEN; /* send more than the sentinel size */ + + if ( (buf = (char *)malloc(buflen+bufalign)) == (char *)NULL) + err("malloc"); + if (bufalign != 0) + buf +=(bufalign - ((int)buf % bufalign) + bufoffset) % bufalign; + + fprintf(stderr,"ttcp%s: buflen=%d, nbuf=%d, align=%d/%d, port=%d\n", + trans?"-t":"-r",buflen, nbuf, bufalign, bufoffset, port); + if (log_cnt)fprintf(fplog," %6d %6d %6d %6d %4d", + buflen, nbuf, bufalign, bufoffset, port); + + /* preload the buffer for the transmit condition */ + pattern( buf, buflen ); + + /* seed the random number generator */ + if ((bufmin != -1) || (rndm != 0)) { +#if defined(__NTVIS__) + srand(seed); +#else /* ! __NTVIS__ */ + srandom(seed); +#endif /* __NTVIS__ */ + } + + if(trans) + {/* xmitr */ + if (argc == 0) { + fprintf(stderr, "ttcp: missing destination host arg\n"); + do_Usage(); exit(1); + } + + bzero((char *)&sinhim, sizeof(sinhim)); + host = argv[0]; + if (atoi(host) > 0 ) + {/* Numeric */ + sinhim.sin_family = AF_INET; + sinhim.sin_addr.s_addr = inet_addr(host); + } + else + {if ((addr=gethostbyname(host)) == NULL) sockets_err("bad hostname"); + sinhim.sin_family = addr->h_addrtype; + bcopy(addr->h_addr,(char*)&addr_tmp, addr->h_length); + sinhim.sin_addr.s_addr = addr_tmp; + } + sinhim.sin_port = htons(port); + sinme.sin_port = 0; /* free choice */ + } + else + {/* rcvr */ + sinme.sin_port = htons(port); + } +#if defined(__NTVIS__) + sinme.sin_family = AF_INET; +#endif + + fd = socket(AF_INET, udp?SOCK_DGRAM:SOCK_STREAM, 0); + +#if defined(__NTVIS__) + if (fd == INVALID_SOCKET) sockets_err("socket"); +#else + if (fd < 0) sockets_err("socket"); +#endif + + if (verbose) { + char *label = trans?"ttcp-t":"ttcp-r"; +#if defined(UNDER_CE) + SYSTEMTIME SystemTime; + char time_str[30]; + + GetLocalTime(&SystemTime); + sprintf(time_str, "%s %s %d %02d:%02d:%02d %d\n", weekday[SystemTime.wDayOfWeek], month[SystemTime.wMonth - 1], + SystemTime.wDay, SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond, SystemTime.wYear); +#else + time_t now; + char *time_str; + + time(&now); + time_str = ctime(&now); +#endif + fprintf(stdout,"%s: start time %s", label, time_str); + fprintf(stdout,"%s: File-Descriptor 0x%x Opened\n", label, fd ); + } + +#if defined(__NTVIS__) + if (bind(fd, (struct sockaddr FAR *)&sinme, sizeof(sinme)) == SOCKET_ERROR) + sockets_err("bind"); +#else + if (bind(fd, SOCKADDR_CAST &sinme, sizeof(sinme)) < 0) + sockets_err("bind"); +#endif /* __NTVIS__ */ + + +#if defined(SO_SNDBUF) || defined(SO_RCVBUF) + if (sockbufsize) + { +#if defined(__lynx__) || defined(__sun__) || defined(__NTVIS__) + if (trans) + {if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char *)&sockbufsize, + sizeof sockbufsize) < 0) + sockets_err("setsockopt: sndbuf"); + } + else + {if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *)&sockbufsize, + sizeof sockbufsize) < 0) + sockets_err("setsockopt: rcvbuf"); + } + +#else + if (trans) + + {if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sockbufsize, + sizeof sockbufsize) < 0) + sockets_err("setsockopt: sndbuf"); + } + else + {if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &sockbufsize, + sizeof sockbufsize) < 0) + sockets_err("setsockopt: rcvbuf"); + } +#endif /* __lynx__ __sun__ __NTVIS__ */ + } + else + {/* + ** Added by Daniel Davids to Know Socket-Buffer-Sizes + */ + sockbuflen = sizeof sockbufsndsize; +#if defined(__lynx__) || defined(__sun__) || defined(__NTVIS__) + getsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char *)&sockbufsndsize, + &sockbuflen); + sockbuflen = sizeof sockbufrcvsize; + getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *)&sockbufrcvsize, + &sockbuflen); +#else + getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sockbufsndsize, &sockbuflen); + sockbuflen = sizeof sockbufrcvsize; + getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &sockbufrcvsize, &sockbuflen); +#endif /* __lynx__ __sun__ __NTVIS__ */ + sockbufsize = ( sockbufsndsize + sockbufrcvsize ) / 2; + + if ( sockbufsndsize != sockbufrcvsize ) + {fprintf(stderr, "sockbufsndsize=%d, ", sockbufsndsize ); + fprintf(stderr, "sockbufrcvsize=%d, ", sockbufrcvsize ); + } + } +#endif /* defined(SO_SNDBUF) || defined(SO_RCVBUF) */ + + if (sockbufsize) fprintf(stderr, "sockbufsize=%d, \n", sockbufsize); + + if (log_cnt) + {if (sockbufsize)fprintf(fplog," %6d",sockbufsize); + else fprintf(fplog," 0"); + } + +#if defined(__linux__) + if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY, (char *)&pri, sizeof pri) < 0) + sockets_err("setsockopt: priority"); +#endif + + + if (trans) fprintf(stderr, "# %s sender -> %s #\n", udp?"udp":"tcp", host); + else fprintf(stderr, "# %s receiver #\n", udp?"udp":"tcp"); + + if (!udp) + { +#if !defined(__NTVIS__) + signal(SIGPIPE, sigpipe); +#endif /* !__NTVIS__ */ + + if (trans) + {/* We are the client if transmitting */ + if (options) + { +#if defined(BSD42) + if( setsockopt(fd, SOL_SOCKET, options, 0, 0) < 0) +#else /* BSD43 */ + if( setsockopt(fd, SOL_SOCKET, options, (char *)&one, sizeof(one)) < 0) +#endif /* BDS42 */ + sockets_err("setsockopt"); + } +#ifdef TCP_NODELAY + if (nodelay) + {struct protoent *p; + p = getprotobyname("tcp"); +#if defined(__lynx__) || defined(__sun__) || defined(__NTVIS__) + if( p && setsockopt(fd, p->p_proto, TCP_NODELAY, + (char *) &one, sizeof(one)) < 0) +#else + if( p && setsockopt(fd, p->p_proto, TCP_NODELAY, + &one, sizeof(one)) < 0) +#endif /* __lynx__ __sun__ __NTVIS__ */ + sockets_err("setsockopt: nodelay"); + } +#endif /* TCP_NODELAY */ + if (connect(fd, SOCKADDR_CAST &sinhim, sizeof(sinhim) ) < 0) + sockets_err("connect"); + }/* if (trans) */ + else + {/* otherwise, we are the server and should listen for connections */ + +errno = 0; + +#if defined(sgi) || ( defined(__osf__) && !defined(_CFE) ) + if( listen(fd,1) <0 ) +#else + if( listen(fd,0) <0 ) /* allow a queue of 0 */ +#endif + sockets_err("listen"); + + if(options) { + int err; +#if defined(BSD42) + err = setsockopt(fd, SOL_SOCKET, options, 0, 0); +#elif defined(__lynx__) || defined(__sun__) || defined(__NTVIS__) + err = setsockopt(fd, SOL_SOCKET, options, (char *) &one, sizeof(one)); +#else + err = setsockopt(fd, SOL_SOCKET, options, &one, sizeof(one)); +#endif /* BSD42 */ + if (err < 0) + sockets_err("setsockopt"); + } + fromlen = sizeof(frominet); + domain = AF_INET; + if (timeout > 0) { + fd_set readfds, exceptfds; + struct timeval tv_timeout; + int n; + + tv_timeout.tv_sec = timeout/1000; + tv_timeout.tv_usec = (timeout%1000)*1000; + + FD_ZERO(&readfds); + FD_ZERO(&exceptfds); + FD_SET(fd, &readfds); + FD_SET(fd, &exceptfds); + + n = select( fd+1, &readfds, NULL, &exceptfds, &tv_timeout ); + if (n == 0 || n == SOCKET_ERROR) { + sockets_err("select listen"); + return 0; + } + } + if((fd=accept(fd, SOCKADDR_CAST &frominet, &fromlen) ) < 0) + sockets_err("accept"); + + if (getpeername(fd, SOCKADDR_CAST &peer, &peerlen) < 0) + sockets_err("getpeername"); + + fprintf(stderr,"ttcp-r: accept from %s\n",inet_ntoa(peer.sin_addr)); + + } /* otherwise we are ... */ + } + + prep_timer(); + errno = 0; + nbytes = 0.0; + numCalls = 0; + + { + register int cnt,multi; + char *pb; + int nb = 0; + unsigned long rbuflen = 0; + multi = nbuf; + + if (trans) { +#if !defined(BSD43) + if(udp) { + int err; + int nochecksum_opt = 0; + err = setsockopt(fd, IPPROTO_UDP, UDP_NOCHECKSUM, + (char *)&nochecksum_opt, sizeof(nochecksum_opt)); + if (err < 0) + sockets_err("setsockopt"); + } +#endif + + if(udp && !no_start) { + int start_count = 2; + char start_pkt[START_PKT_LEN]; + memset(start_pkt, 0, START_PKT_LEN); + memcpy(start_pkt, start_pattern, START_PATTERN_LEN); + + while (start_count-- > 0) { + (void)Nwrite( fd, start_pkt, START_PKT_LEN ); /* rcvr start */ + if (udpsleep) { + usleep(udpsleep); + /* clear errno (see man page for errno(3), definition of + EINTR. usleep() uses SIGCONT? ) */ + if (errno == EINTR) errno = 0; + } /* udpsleep */ + } + } + + /* initial seqence num for UDP */ + if (udp) buf[0] = 0; + k = burstn; + + if (sinkmode) { + while (multi-- > 0 && !no_data) { + + if (bufmin == -1) { + rbuflen = buflen; + } else { + /* set rbuflen to a random value evenly distributed in + [bufmin, buflen]. As long as buflen is < 2^16, we can + fit the calculation in 32 bits */ +#if defined(__NTVIS__) + rbuflen = (( (unsigned long)rand() * + ((unsigned long)(buflen-bufmin+1)) ) >> 15) + bufmin; +#else /* ! __NTVIS__ */ + rbuflen = (( ((unsigned long)random() >> 15) * + ((unsigned long)(buflen-bufmin+1)) ) >> 16) + bufmin; +#endif /* __NTVIS__ */ + } + + if (rndm) { + unsigned int i, j, l; + unsigned long data; + + if (udp) + l = 1; + else + l = 0; + + for (i = l; i < rbuflen; /* null */) { +#if defined(__NTVIS__) + data = (unsigned long)rand(); +#else /* ! __NTVIS__ */ + data = (unsigned long)random(); +#endif /* __NTVIS__ */ + /*fprintf(stderr, "%08x\n",data);*/ /* DEBUG */ + /* The NT rand() function returns only 16 useful bits! */ + for (j = 0; (j < 2/*4*/) && (i < rbuflen) ; j++) { + buf[i++] = (unsigned char)(data & 0xff); + data >>= 8; + } + } + } + + if ((cnt=Nwrite(fd,buf,rbuflen)) != (int)rbuflen) + sockets_err("error from the socket write"); + /* increment sequence num if UDP */ + if (udp) buf[0] = (char)(((unsigned char)(buf[0])+1) & 0xFF); + + if (debug) + fprintf(stdout,"ttcp-t: %5d | %d Bytes Written in %d write commands \n", + ++nb, cnt, nbuf ); + + nbytes += rbuflen; + + /* hashes */ + if (hash) { + fprintf(stderr,"#"); + } + + /* Check for the end of a burst */ + if (--k <= 0) { + k = burstn; + + /* sleep to avoid overrunning slower receivers - henry */ + if (udpsleep) { + usleep(udpsleep); + /* clear errno (see man page for errno(3), definition of + EINTR. usleep() uses SIGCONT? ) */ + if (errno == EINTR) errno = 0; + } /* udpsleep */ + } + } /* while */ + + } /* if (sinkmode) */ + else + { + + nbuf = 0; + + if (bufmin == -1) { + rbuflen = buflen; + } else { + /* set rbuflen to a random value evenly distributed in + [bufmin, buflen]. As long as buflen is < 2^16, we can + fit the calculation in 32 bits */ +#if defined(__NTVIS__) + rbuflen = (( (unsigned long)rand() * + ((unsigned long)(buflen-bufmin+1)) ) >> 15) + bufmin; +#else /* ! __NTVIS__ */ + rbuflen = (( ((unsigned long)random() >> 15) * + ((unsigned long)(buflen-bufmin+1)) ) >> 16) + bufmin; +#endif /* __NTVIS__ */ + } + + if (udp) + pb = &(buf[1]); + else + pb = &(buf[0]); + +#if !defined(__NTVIS__) /* else case specific to WINNT */ + while((cnt=read(0,pb,rbuflen)) > 0) +#else /* __NTVIS__ */ + while((cnt=(int)fread(pb,1,rbuflen,stdin)) > 0) +#endif /* __NTVIS__ */ + { + + if (udp) + multi = cnt+1; /* don't include seq. num. in count of data */ + else + multi = cnt; + if ((cnt=Nwrite(fd,buf,multi)) != (int)multi) + sockets_err("error from the socket write"); + /* increment seqence num if UDP */ + if (udp) buf[0] = (char)(((unsigned char)(buf[0])+1) & 0xFF); + nbuf++; + + if (debug) + fprintf(stdout,"ttcp-t: %5d | %d Bytes Written in %d write commands \n", + ++nb, cnt, nbuf ); + + nbytes += multi; + + /* hashes */ + if (hash) { + fprintf(stderr,"#"); + } + + /* Check for the end of a burst */ + if (--k <= 0) { + k = burstn; + + /* sleep to avoid overrunning slower receivers - henry */ + if (udpsleep) { + usleep(udpsleep); + /* clear errno (see man page for errno(3), definition of + EINTR. usleep() uses SIGCONT? ) */ + if (errno == EINTR) errno = 0; + } /* udpsleep */ + } + + if (bufmin == -1) { + rbuflen = buflen; + } else { + /* set rbuflen to a random value evenly distributed in + [bufmin, buflen]. As long as buflen is < 2^16, we can + fit the calculation in 32 bits */ +#if defined(__NTVIS__) + rbuflen = (( (unsigned long)rand() * + ((unsigned long)(buflen-bufmin+1)) ) >> 15) + bufmin; +#else /* ! __NTVIS__ */ + rbuflen = (( ((unsigned long)random() >> 15) * + ((unsigned long)(buflen-bufmin+1)) ) >> 16) + bufmin; +#endif /* __NTVIS__ */ + } + + } /* while */ + + } /* if (sinkmode) */ + + if (hash) { + fprintf(stderr,"\n"); + fflush(stderr); + } + +#if defined(UNDER_CE) + errno = WSAGetLastError(); +#endif + if (!errno) { + read_timer(); + if(udp && !no_end) { + int end_count = 4; + int data_count = nbuf; + char end_pkt[END_PKT_LEN]; + unsigned char* net_byte = &end_pkt[END_PATTERN_LEN]; + memset(end_pkt, 0, END_PKT_LEN); + memcpy(end_pkt, end_pattern, END_PATTERN_LEN); + net_byte[3] = data_count & 0xFF; data_count >>= 8; + net_byte[2] = data_count & 0xFF; data_count >>= 8; + net_byte[1] = data_count & 0xFF; data_count >>= 8; + net_byte[0] = data_count & 0xFF; + + while (end_count-- > 0) { + Nwrite( fd, end_pkt, END_PKT_LEN ); /* rcvr end */ + if (udpsleep && end_count>0) usleep(udpsleep); + } + } + result_summary(); + } + } /* trans */ + else + { + if (udp) { + udp_rcv_test(); + } + else + {/* not udp received transfer */ + while ((cnt=Nread(fd,buf,buflen)) > 0) + {if(debug)fprintf(stdout, + "ttcp%s: %5d | %d Bytes Read\n", + trans?"-t":"-r", ++nb, cnt ); + nbytes += cnt; + if (!sinkmode) { +#if !defined(__NTVIS__) /* else case specific to WINNT */ + if (write(1,buf,cnt) != cnt) err("write"); +#else /* __NTVIS__ */ + if ((int)fwrite(buf,1,cnt,stdout) != cnt) err("fwrite"); +#endif /* __NTVIS__ */ + } + } +#if defined(UNDER_CE) + errno = WSAGetLastError(); +#endif + if (!errno) { + read_timer(); + result_summary(); + } + } + } + } + + if(errno) err("IO"); + +#if defined(__NTVIS__) + closesocket ( fd ); +#else + close ( fd ); +#endif /* __NTVIS__ */ + + if (verbose) fprintf(stdout,"ttcp%s: File-Descriptor fd 0x%x Closed\n" , + trans?"-t":"-r", fd ); + + if (log_cnt) close_log(); + + fprintf(stderr,"ttcp done.\n"); + fflush(stdout); + + exit(0); +} +/*--------------------------------------------------------------------------*/ +void +udp_rcv_test(void) +{ + enum {START_WAIT, DATA_WAIT, DATA_RCV, END_TEST} rcv_state; + enum {START_PKT_TYPE, END_PKT_TYPE, DATA_PKT_TYPE} pkt_type; + int cnt; + int nbuffers = 0; + unsigned int start_pkt_cnt = 0; + unsigned int end_pkt_cnt = 0; + unsigned int data_pkt_cnt = 0; + unsigned int expected_pkt_cnt = 0; + unsigned char seq = 0; + unsigned char buf_seq; + + rcv_state = START_WAIT; + while (rcv_state != END_TEST && (cnt=Nread(fd,buf,buflen)) > 0) { + /* Determine the type of packet received */ + if (!memcmp(buf, start_pattern, START_PATTERN_LEN)) { + pkt_type = START_PKT_TYPE; + start_pkt_cnt++; + } else if (!memcmp(buf, end_pattern, END_PATTERN_LEN)) { + /* read the expected data packet count from the end packet */ + unsigned char* net_byte = buf; + net_byte += END_PATTERN_LEN; + expected_pkt_cnt = ((net_byte[0] << 24) + (net_byte[1] << 16) + + (net_byte[2] << 8) + net_byte[3]); + pkt_type = END_PKT_TYPE; + end_pkt_cnt++; + } else { + data_pkt_cnt++; + pkt_type = DATA_PKT_TYPE; + } + + if (rcv_state == START_WAIT) { + /* Wait until we see a vaild start packet */ + if (pkt_type == START_PKT_TYPE) { + prep_timer(); + rcv_state = DATA_WAIT; + } else if (pkt_type == DATA_PKT_TYPE) { + fprintf(stderr, "ERROR: Missed UDP start packet.\n"); + prep_timer(); + rcv_state = DATA_RCV; + } else if (pkt_type == END_PKT_TYPE) { + fprintf(stderr, "ERROR: Found UDP end packet before start packet or data.\n"); + rcv_state = END_TEST; + } + } else if (rcv_state == DATA_WAIT) { + /* Skip any extra start packets until we see data */ + if (pkt_type == START_PKT_TYPE) { + prep_timer(); + } else if (pkt_type == DATA_PKT_TYPE) { + rcv_state = DATA_RCV; + } else if (pkt_type == END_PKT_TYPE) { + fprintf(stderr, "ERROR: Found UDP end packet without receiving " + "any data packets.\n"); + rcv_state = END_TEST; + } + } else { /* DATA_RCV */ + /* Collect data packets until we see a vaild end packet */ + if (pkt_type == START_PKT_TYPE) { + /* We missed the end packets and now a new test is + * starting. Report the results of this test then start + * another. */ + read_timer(); + result_summary(); + fprintf(stderr, "ERROR: Found UDP start packet while receiving data.\n" + "ERROR: Expected more data packets or an end packet.\n"); + nbytes = 0.0; + nbuffers = 0; + numCalls = 0; + prep_timer(); + rcv_state = DATA_WAIT; + } else if (pkt_type == DATA_PKT_TYPE) { + /* loop in this state */ + } else if (pkt_type == END_PKT_TYPE) { + /* we used to print results here but now we do when the loop ends */ + rcv_state = END_TEST; + } + } + + /* tally data packets the same way from whatever state we are in */ + if (pkt_type == DATA_PKT_TYPE) { + if (debug) + fprintf(stderr, "ttcp-r: %5d | %d Bytes Read\n", ++nbuffers, cnt); + nbytes += cnt; + if (seq_info) { + /* check seqence num */ + buf_seq = (unsigned char)(buf[0]); + if (buf_seq != seq) { + fprintf(stderr, "ERROR: Out of sequence. " + "Buffer %u, seq %u, expected %u\n", + data_pkt_cnt, buf_seq, seq); + seq = buf_seq; + } + seq++; + } + if (!sinkmode) { +#if !defined(__NTVIS__) /* else case specific to WINNT */ + if (write(1,&(buf[1]),cnt-1) != cnt-1) err("write"); +#else /* __NTVIS__ */ + if ((int)fwrite(&(buf[1]),1,cnt-1,stdout) != cnt-1) err("fwrite"); +#endif /* __NTVIS__ */ + } + } + } /* end-while */ + + /* normal end of test */ + read_timer(); + result_summary(); + fprintf(stderr, "ttcp-r: packets %u data, %u start, %u end\n", + data_pkt_cnt, start_pkt_cnt, end_pkt_cnt); + if (expected_pkt_cnt != 0) { + int lost_cnt = expected_pkt_cnt - data_pkt_cnt; + + fprintf(stderr, "ttcp-r: %g%% (%u/%u) packet loss\n", + 100.0 * (double)lost_cnt/(double)expected_pkt_cnt, + lost_cnt, expected_pkt_cnt); + } +} + +/*--------------------------------------------------------------------------*/ +/* calc_cpu_time(): Time difference, in usecs, of the combined user and + * sys times of the given start and end usage info */ +double +calc_cpu_time( + struct rusage *r0, + struct rusage *r1 +) +{ + double time; + time_t ms; + struct timeval tdiff, tend, tstart; + + /* total user delta time + total system delta time */ + tvadd( &tend, &r1->ru_utime, &r1->ru_stime ); /* user + sys time @ end */ + tvadd( &tstart, &r0->ru_utime, &r0->ru_stime ); /* user + sys time @ start*/ + tvsub( &tdiff, &tend, &tstart ); + + /* useconds */ + time = ((double)tdiff.tv_sec)*1e6 + (double)tdiff.tv_usec; + + /* debug mseconds */ + ms = tdiff.tv_sec*(time_t)1000 + tdiff.tv_usec/(time_t)1000; + if (ms != (time_t)(time/1000.0)) { + fprintf(stderr, "ERROR: time calc mismatch of msec (%d) to usec (%f)\n", + (int)ms, time/1000.0); + } + + return time; +} + +/*--------------------------------------------------------------------------*/ +/* calc_real_time(): Time difference in usecs of the given times */ +double +calc_real_time( + struct timeval *t0, + struct timeval *t1 +) +{ + double time; + time_t ms; + struct timeval tdiff; + + tvsub(&tdiff, t1 ,t0); + + /* useconds */ + time = ((double)tdiff.tv_sec)*1e6 + (double)tdiff.tv_usec; + + /* debug mseconds */ + ms = tdiff.tv_sec*(time_t)1000 + tdiff.tv_usec/(time_t)1000; + if (ms != (time_t)(time/1000.0)) { + fprintf(stderr, "ERROR: time calc mismatch of msec (%d) to usec (%f)\n", + (int)ms, time/1000.0); + } + + return time; +} +/*--------------------------------------------------------------------------*/ +void +result_summary(void) +{ + char* label = trans ? "ttcp-t" : "ttcp-r"; + double cput = calc_cpu_time(&ru0, &ru1); + double realt = calc_real_time(&time0, &time1); + double t_min; + double bytes_per_sec; + + /* lower end boundary conditions */ + t_min = 10.0; /* 10 usec */ +#if defined(__NTVIS__) + t_min = 1000.0; /* 1 msec */ +#endif + if (cput <= t_min) { /* value in usec */ + cput = t_min; + fprintf(stderr,"%s: cpu time too short set at %.0f usec, NOT accurate result.\n", + label,t_min); + } + if (realt <= t_min) { /* value in usec */ + realt = t_min; + fprintf(stderr,"%s: real time too short, set at %.0f usec, NOT accurate result.\n", + label,t_min); + } + + bytes_per_sec = (nbytes/realt)*1e6; + + fprintf(stderr,"%s: %.0f bytes in %.06f real seconds = %s/sec +++\n", + label, nbytes, realt/1e6, outfmt(fmt, bytes_per_sec)); + + if (verbose) + fprintf(stderr,"%s: %.0f bytes in %.06f cpu seconds = %s/cpu sec\n", + label, nbytes,cput/1e6, outfmt(fmt, (nbytes/cput)*1e6)); + + fprintf(stderr,"%s: %ld I/O calls, %.3f msec(real)/call, %.3f msec(cpu)/call\n", + label, numCalls, + (numCalls>0)?(realt/(double)numCalls)/1000.0:0.0, + (numCalls>0)?(cput /(double)numCalls)/1000.0:0.0); + + fprintf(stderr,"%s: ", label); + prusage(&ru0, &ru1, &time0, &time1); + fprintf(stderr,"\n"); + + if (verbose) + printf("%s: buffer address %#x\n", label, (unsigned int)buf); + + if (fplog) { + struct timeval tdiff; + /* User time */ + tvsub(&tdiff, &ru1.ru_utime, &ru0.ru_utime); + fprintf(fplog," %ld.%06ld", (long)tdiff.tv_sec, (long)tdiff.tv_usec); + /* System time */ + tvsub(&tdiff, &ru1.ru_stime, &ru0.ru_stime); + fprintf(fplog," %ld.%06ld", (long)tdiff.tv_sec, (long)tdiff.tv_usec); + /* Percent of cput usage */ + fprintf(fplog," %.1f", 100.0 * (cput/realt)); + /* validity of real time mesurment */ + fprintf(fplog, (realt == t_min)?" 0":" 1"); + /* bytes, seconds, MBytes/sec, IO calls */ + fprintf(fplog," %10.0f %4.06f %4.3f %6ld", + nbytes, realt/1e6, bytes_per_sec/(1024.0*1024.0), numCalls); + } +} +/*--------------------------------------------------------------------------*/ +void +sockets_err(char* s) +{ +#if defined(__NTVIS__) + int err = WSAGetLastError(); + char* prefix = trans?"ttcp-t":"ttcp-r"; + fprintf(stderr,"%s: %s\n", prefix, s); + fprintf(stderr,"%s: errno=%d\n", prefix, err); + exit(1); +#else + err(s); +#endif /* __NTVIS__ */ +} + +/*--------------------------------------------------------------------------*/ +void +err(char *s) +{ + char* prefix = trans?"ttcp-t":"ttcp-r"; + fprintf(stderr,"%s: ", prefix); + perror(s); + fprintf(stderr,"%s: errno=%d\n", prefix, errno); + exit(1); +} +/*--------------------------------------------------------------------------*/ +void +mes(char *s) +{ + fprintf(stderr,"ttcp%s: %s\n", trans?"-t":"-r", s); +} +/*--------------------------------------------------------------------------*/ +void +pattern( char *cp, int cnt ) +{ + register char c; + register int cnt1; + cnt1 = cnt; + c = 0; + while( cnt1-- > 0 ) { + while( !isprint((c&0x7F)) ) c++; + *cp++ = (c++&0x7F); + } +} +/*--------------------------------------------------------------------------*/ +char * +outfmt(char format, double b) +{ + static char obuf[50]; + double giga = 1024.0 * 1024.0 * 1024.0; + double mega = 1024.0 * 1024.0; + double kilo = 1024.0; + + if (format == 'A') { + if (b >= giga) + format = 'G'; + else if (b >= mega) + format = 'M'; + else if (b >= kilo) + format = 'K'; + else + format = 'B'; + } + + switch (format) { + case 'G': + sprintf(obuf, "%.3f GB", b / giga); + break; + case 'M': + sprintf(obuf, "%.3f MB", b / mega); + break; + case 'K': + sprintf(obuf, "%.3f KB", b / kilo); + break; + case 'B': + sprintf(obuf, "%4f B", b); + break; + case 'g': + sprintf(obuf, "%.3f Gbit", b * 8.0 / giga); + break; + case 'm': + sprintf(obuf, "%.3f Mbit", b * 8.0 / mega); + break; + case 'k': + sprintf(obuf, "%.3f Kbit", b * 8.0 / kilo); + break; + case 'b': + sprintf(obuf, "%4f b", b * 8.0); + break; + default: + sprintf(obuf, "default.........."); + } + return obuf; +} +/*--------------------------------------------------------------------------*/ +#if defined(SYSV) + +/*ARGSUSED*/ + +#if defined(__osf__) +/* getrusage defined in the system lib */ +#else +#if defined(__lynx__) +/* getrusage defined in the system lib */ +#else +#if defined(__sun__) +/* getrusage defined in the system lib */ +#else + +int +getrusage(ignored, ru) + int ignored; + register struct rusage *ru; +{ + + +#if defined(__NTVIS__) + HANDLE phd; + FILETIME CreateTime, ExitTime, KernelTime, UserTime; + SYSTEMTIME SysTime; +#if defined(UNDER_CE) + phd = GetCurrentThread(); + if( GetThreadTimes(phd, &CreateTime, &ExitTime, &KernelTime, &UserTime) + != TRUE) +#else + phd = GetCurrentProcess(); + if( GetProcessTimes(phd, &CreateTime, &ExitTime, &KernelTime, &UserTime) + != TRUE) +#endif + {ru->ru_stime.tv_sec = 0; + ru->ru_stime.tv_usec = 0; + ru->ru_utime.tv_sec = 0; + ru->ru_utime.tv_usec = 0; + } + else + { + (void) FileTimeToSystemTime(&KernelTime, &SysTime); + /* + * fprintf(stdout, + * "System sec=%d, msec=%d\n", SysTime.wSecond, SysTime.wMilliseconds); + */ + ru->ru_stime.tv_sec = SysTime.wSecond; + ru->ru_stime.tv_usec = SysTime.wMilliseconds * 1000; + (void) FileTimeToSystemTime(&UserTime, &SysTime); + /* + * fprintf(stdout, + * " User sec=%d, msec=%d\n", SysTime.wSecond, SysTime.wMilliseconds); + */ + ru->ru_utime.tv_sec = SysTime.wSecond; + ru->ru_utime.tv_usec = SysTime.wMilliseconds * 1000; + } + +#else /* __NTVIS__ */ + + struct tms buftime; + times(&buftime); + /* Assumption: HZ <= 2147 (LONG_MAX/1000000) */ + /* info : in lynxOS HZ is called TICKSPERSEC () */ + + ru->ru_stime.tv_sec = buftime.tms_stime / HZ; + ru->ru_stime.tv_usec = ((buftime.tms_stime % HZ) * 1000000) / HZ; + ru->ru_utime.tv_sec = buftime.tms_utime / HZ; + ru->ru_utime.tv_usec = ((buftime.tms_utime % HZ) * 1000000) / HZ; +#endif /* __NTVIS__ */ +return(0); + +} /* static getrusage */ + +#endif /* __sun__ */ +#endif /* __lynx__ */ +#endif /* __osf__ */ +#endif /* SYSV */ +/*--------------------------------------------------------------------------*/ +#if defined(SYSV) +#if defined(__hpux__) || defined(_AIX) || defined(__sun__) +/* gettimeofday defined in the system lib */ +#else +# if defined (__osf__) ||defined (__lynx__) +/* gettimeofday defined in the system lib */ +#else +/*ARGSUSED*/ +static +gettimeofday(tp, zp) +struct timeval *tp; +struct timezone *zp; +{ +#if defined(__NTVIS__) +#if defined(UNDER_CE) + SYSTEMTIME SystemTime; + + GetLocalTime(&SystemTime); + tp->tv_sec = SystemTime.wSecond; + tp->tv_usec = SystemTime.wMilliseconds * 1000; +#else + struct _timeb timeptr; + + _ftime(&timeptr); + tp->tv_sec = timeptr.time; + tp->tv_usec = timeptr.millitm * 1000; +#endif +#else /* all cases */ + tp->tv_sec = time(0); + tp->tv_usec = 0; +#endif /* __NTVIS__ */ +return(1); +} /* static gettimeofday */ + +#endif /*__osf__ || __lynx__ */ +#endif /* __hpux__ || _AIX || __sun__ || __osf__*/ +#endif /* SYSV */ +/*--------------------------------------------------------------------------*/ +/* + * P R E P _ T I M E R + */ +void +prep_timer(void) +{ + gettimeofday(&time0, (struct timezone *)0); + getrusage(RUSAGE_SELF, &ru0); +} +/*--------------------------------------------------------------------------*/ +/* + * R E A D _ T I M E R + * + */ +void +read_timer(void) +{ + getrusage(RUSAGE_SELF, &ru1); + gettimeofday(&time1, (struct timezone *)0); +} +/*--------------------------------------------------------------------------*/ +/* Print the process usage calculated from timers values extracted + * before and after the transfer execution. + */ +void +prusage( + struct rusage *r0, struct rusage *r1, + struct timeval *t0, struct timeval *t1 +) +{ + struct timeval tdiff; + int t, ms; + register char *cp; + double cput = calc_cpu_time(r0, r1); + double realt = calc_real_time(t0, t1); + + /* t == total user delta time + total system delta time */ + if (debug) + { + printf("timers : end startup\n"); + printf("user (sec) : %9ld %9ld\n",r1->ru_utime.tv_sec, + r0->ru_utime.tv_sec); + printf("user (usec): %9ld %9ld\n",r1->ru_utime.tv_usec, + r0->ru_utime.tv_usec); + printf("sys (sec) : %9ld %9ld\n",r1->ru_stime.tv_sec, + r0->ru_stime.tv_sec); + printf("sys (usec): %9ld %9ld\n",r1->ru_stime.tv_usec, + r0->ru_stime.tv_usec); + printf("time (sec) : %9ld %9ld\n",t1->tv_sec,t0->tv_sec); + printf("time (usec): %9ld %9ld\n",t1->tv_usec,t0->tv_usec); + } + /* for the AIX debug, most counters are outside a good range + printf(" r0 r1\n"); + printf("ru_ixrss %20ld %20ld \n", r0->ru_ixrss ,r1->ru_ixrss ); + printf("ru_idrss %20ld %20ld \n", r0->ru_idrss ,r1->ru_idrss ); + printf("ru_isrss %20ld %20ld \n", r0->ru_isrss ,r1->ru_isrss ); + printf("ru_minflt %20ld %20ld \n", r0->ru_minflt ,r1->ru_minflt ); + printf("ru_majflt %20ld %20ld \n", r0->ru_majflt ,r1->ru_majflt ); + printf("ru_nswap %20ld %20ld \n", r0->ru_nswap ,r1->ru_nswap ); + printf("ru_inblock %20ld %20ld \n", r0->ru_inblock ,r1->ru_inblock ); + printf("ru_oublock %20ld %20ld \n", r0->ru_oublock ,r1->ru_oublock ); + printf("ru_msgsnd %20ld %20ld \n", r0->ru_msgsnd ,r1->ru_msgsnd ); + printf("ru_msgrcv %20ld %20ld \n", r0->ru_msgrcv ,r1->ru_msgrcv ); + printf("ru_nsignals %20ld %20ld \n", r0->ru_nsignals ,r1->ru_nsignals); + printf("ru_nvcsw %20ld %20ld \n", r0->ru_nvcsw ,r1->ru_nvcsw ); + printf("ru_nivcsw %20ld %20ld \n", r0->ru_nivcsw ,r1->ru_nivcsw ); + */ + + /* cpu time in mseconds */ + t = (int)(cput / 1000.0); + + /* ms == value of the internal clock at the end of the xfer */ + /* also called real time. */ + /* real time in mseconds */ + ms = (int)(realt / 1000.0); + + /* The display is based on variables provided by the function getrusage + Info located in : /usr/include/sys/resource.h + */ +#if defined(SYSV) + +#if defined(_AIX) + /* with AIX cernsp most counters are wrong + * cp = "%Uuser %Ssys %Ereal %P %Xi+%Dd %Mmaxrss %F+%Rpf %Ccsw\0"; + */ + cp = "%Uuser %Ssys %Ereal %P\0"; + +#else +#if defined(__osf__) + cp = "%Uuser %Ssys %Ereal %P %Xi+%Dd %Mmaxrss %F+%Rpf %Ccsw\0"; +#else +#if defined(sgi) /* IRIX 3.3 will show 0 for %M,%F,%R,%C */ + cp = "%Uuser %Ssys %Ereal %P %Mmaxrss %F+%Rpf %Ccsw\0"; +#else +#if defined(__Lynx__) + cp = "%Uuser %Ssys %Ereal %P\0"; +#else + cp = "%Uuser %Ssys %Ereal %P\0"; /* all SYSV except those mentionned */ +#endif /*__lynx__ */ +#endif /* sgi */ +#endif /*__osf__ */ +#endif /* _AIX */ + +#else /* BSD system */ + cp = "%Uuser %Ssys %Ereal %P %Xi+%Dd %Mmaxrss %F+%Rpf %Ccsw\0"; + +#endif /* SYSV */ + + for (; *cp; cp++) { + if (*cp != '%') { + putc(*cp, stderr); + /* *outp++ = *cp; */ + } else if (cp[1]) + switch(*++cp) { + case 'U': + tvsub(&tdiff, &r1->ru_utime, &r0->ru_utime); + fprintf(stderr,"%ld.%06ld", (long)tdiff.tv_sec, (long)tdiff.tv_usec); + break; + + case 'S': + tvsub(&tdiff, &r1->ru_stime, &r0->ru_stime); + fprintf(stderr,"%ld.%06ld", (long)tdiff.tv_sec, (long)tdiff.tv_usec); + break; + + case 'E': + psecs( ms / 1000); + break; + + case 'P': + fprintf(stderr,"%.1f%%", (cput*100.0 / (realt ? realt : 1.0)) ); + break; + +#if !defined(SYSV) || defined(__osf__) || defined(_AIX) + case 'W': + { + int i = r1->ru_nswap - r0->ru_nswap; + fprintf(stderr,"%d", i); + break; + } + + case 'X': + fprintf(stderr,"%ld", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t); + break; + + case 'D': + fprintf(stderr,"%ld", t == 0 ? 0 : + (r1->ru_idrss+r1->ru_isrss - (r0->ru_idrss+r0->ru_isrss))/t); + break; + + case 'K': + fprintf(stderr,"%ld", t == 0 ? 0 : + ((r1->ru_ixrss+r1->ru_isrss+r1->ru_idrss) - + (r0->ru_ixrss+r0->ru_idrss+r0->ru_isrss))/t); + break; + + case 'M': + fprintf(stderr,"%ld", r1->ru_maxrss/2); + break; + + case 'F': + fprintf(stderr,"%ld", r1->ru_majflt-r0->ru_majflt); + break; + + case 'R': + fprintf(stderr,"%ld", r1->ru_minflt-r0->ru_minflt); + break; + + case 'I': + fprintf(stderr,"%ld", r1->ru_inblock-r0->ru_inblock); + break; + + case 'O': + fprintf(stderr,"%ld", r1->ru_oublock-r0->ru_oublock); + break; + + case 'C': + fprintf(stderr,"%ld+%ld", + r1->ru_nvcsw-r0->ru_nvcsw, r1->ru_nivcsw-r0->ru_nivcsw); + break; +#endif /* !SYSV || __osf__ */ + default: + putc(*cp, stderr); + break; + } /* switch */ + } /* for */ +} +/*--------------------------------------------------------------------------*/ +/* add 2 times structure and move usec bigger than 1000000 to sec */ +void +tvadd(tsum, t0, t1) + struct timeval *tsum, *t0, *t1; +{ + tsum->tv_sec = t0->tv_sec + t1->tv_sec; + tsum->tv_usec = t0->tv_usec + t1->tv_usec; + if (tsum->tv_usec > 1000000) tsum->tv_sec++, tsum->tv_usec -= 1000000; +} +/*--------------------------------------------------------------------------*/ +/* substract 2 time structure (t1 > t0) */ +void +tvsub(tdiff, t1, t0) + struct timeval *tdiff, *t1, *t0; +{ + tdiff->tv_sec = t1->tv_sec - t0->tv_sec; + tdiff->tv_usec = t1->tv_usec - t0->tv_usec; + if (tdiff->tv_usec < 0) tdiff->tv_sec--, tdiff->tv_usec += 1000000; +} + +/*--------------------------------------------------------------------------*/ +void +psecs(int l) +{ + int i = (int)l/3600; + + if (i) { + /* hours:min:sec */ + fprintf(stderr,"%d:", i); + i = (int)l % 3600; + fprintf(stderr,"%.2d:%.2d", i/60, i%60); + } else { + /* min:sec */ + i = (int)l; + fprintf(stderr,"%d:%.2d", i/60, i%60); + } +} +/*--------------------------------------------------------------------------*/ +/* N R E A D */ + +int +Nread(SOCKET s, void* bufp, int count ) +{ +#if defined(__lynx__) || defined(__svr4__) || defined(_AIX) || defined(__NTVIS__) || defined(__FreeBSD__) + struct sockaddr from; +#else + struct sockaddr_in from; +#endif + int len = sizeof(from); + register int cnt; + + if (timeout > 0) { + fd_set readfds, exceptfds; + struct timeval tv_timeout; + int n; + + tv_timeout.tv_sec = timeout/1000; + tv_timeout.tv_usec = (timeout%1000)*1000; + + FD_ZERO(&readfds); + FD_ZERO(&exceptfds); + FD_SET(s, &readfds); + FD_SET(s, &exceptfds); + + n = select( s+1, &readfds, NULL, &exceptfds, &tv_timeout ); + if (n == SOCKET_ERROR) { + sockets_err("select read"); + } else if (n == 0) { + return (0); + } + + } + + if( udp ) + {cnt = recvfrom( s, bufp, count, 0, SOCKADDR_CAST &from, &len ); + numCalls++; + } + else + {if( b_flag ) cnt = mread( s, bufp, count ); /* fill bufp */ + else + { +#if defined(__NTVIS__) + cnt = recv( s, bufp, count, 0 ); +#else + cnt = read( s, bufp, count ); +#endif /* __NTVIS__ */ + numCalls++; + } + if (touchdata && cnt > 0) + {register int c = cnt, sum = 0; + register char *b = bufp; + while (c--) sum += *b++; + } + } + /* rchrch printf (" numcall %d read buffer %d bytes \n",numCalls,cnt); */ + return(cnt); +} +/*--------------------------------------------------------------------------*/ +/* N W R I T E */ + +int +Nwrite( int s, void* bufp, int count ) +{ + register int cnt; + if( udp ) + { + again: + cnt = sendto( s, bufp, count, 0, SOCKADDR_CAST &sinhim, + sizeof(sinhim) ); + + numCalls++; + +#if defined(__NTVIS__) + if( cnt<0 && WSAENOBUFS == WSAGetLastError()) +#else + if( cnt<0 && errno == ENOBUFS ) +#endif /* __NTVIS__ */ + + { delay(18000); errno = 0; goto again; } + } else /* if (udp) */ + { + +#if defined(__NTVIS__) + cnt = send( s, bufp, count, 0 ); + numCalls++; +#else + cnt = write( s, bufp, count ); + numCalls++; +#endif /* __NTVIS__ */ + } + return(cnt); +} +/*--------------------------------------------------------------------------*/ +void +delay(us) +int us; +{ + struct timeval tv; + + tv.tv_sec = 0; + tv.tv_usec = (time_t)us; + +#if defined(__hpux__) + select(1, 0, 0, 0, &tv); +#else + select(1, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tv); +#endif +} +/*--------------------------------------------------------------------------*/ +/* M R E A D + * + * This function performs the function of a read(II) but will + * call read(II) multiple times in order to get the requested + * number of characters. This can be necessary because + * network connections don't deliver data with the same + * grouping as it is written with. Written by Robert S. Miles, BRL. + */ +int +mread(int s, char* bufp, unsigned n) +{ + register unsigned count = 0; + register int nread; + + do + { +#if defined(__NTVIS__) + nread = recv(s, bufp, n-count, 0); +#else + nread = read(s, bufp, n-count); +#endif /* __NTVIS__ */ + numCalls++; + if(nread < 0) {perror("ttcp_mread"); return(-1); } + if(nread == 0) return((int)count); + count += (unsigned)nread; + bufp += nread; + }while(count < n); + return((int)count); +} + +/*--------------------------------------------------------------------------*/ +void +open_log() +{static long sysTicks; +#if defined(UNDER_CE) + SYSTEMTIME SystemTime; +#endif + sprintf(logfile,"%s_%s",logfile_head,trans?"t":"r"); + + fprintf(stderr,"open the log file >%s<\n",logfile); + if ((fplog = fopen(logfile,"r")) == NULL) + + {if ((fplog = fopen(logfile,"a+")) == NULL) + {fprintf(stderr,"Failure : creation of the file >%s< \n",logfile ); + exit(1); + } + else + {fprintf(fplog," creation date : "); + /* get date */ +#if defined(UNDER_CE) + GetLocalTime(&SystemTime); + sprintf(fplog,"%02d-%02d-%02d %02d:%02d\n", SystemTime.wDay, month[SystemTime.wMonth - 1], + SystemTime.wYear, SystemTime.wHour, SystemTime.wMinute); +#else + time(&sysTicks); + tms = localtime(&sysTicks); + fprintf(fplog,"%02d-%02d-%02d %02d:%02d\n", + tms->tm_mday, tms->tm_mon, tms->tm_year,tms->tm_hour, tms->tm_min); +#endif + + /* An other version will produce : Mon Aug 4 16:32:16 1997 + * long lDxcomsTicks; char *pDateTime; + * time(&lDxcomsTicks); + * pDateTime = ctime(&lDxcomsTicks); *(pDateTime+24) = '\0'; + * fprintf(fplog," ttcp called : %s", pDateTime); + */ + fprintf(fplog,"format\n"); + fprintf(fplog,",buflen, nbuf(byte), bufalign(byte), bufoffset(byte)"); + fprintf(fplog,", port, sockbufsize(byte), UserTime(sec), SysTime(sec)\n"); + fprintf(fplog,", CPUusage(%%), Validity, nbytes(byte), realt(sec)"); + fprintf(fplog,", rate(MB/sec), I/O call, hours*3600+min*60+sec\n\n"); + /* day-month-year, hour:minute\n\n"); */ + } + } /* file already exist */ + else + {fclose (fplog); + if ((fplog = fopen(logfile,"a+")) == NULL) + {fprintf(stderr,"Failure : access of the file >%s< \n",logfile ); + exit(1); + } + } +} +/*--------------------------------------------------------------------------*/ +void +close_log() +{ +#if defined(UNDER_CE) + SYSTEMTIME SystemTime; + + GetLocalTime(&SystemTime); + fprintf(fplog," %d\n", SystemTime.wHour * 3600 + SystemTime.wMinute * 60 + SystemTime.wSecond); +#else + static long sysTicks; + time(&sysTicks); + tms = localtime(&sysTicks); + fprintf(fplog," %d\n",((tms->tm_hour)*3600 + (tms->tm_min)*60 + tms->tm_sec)); +#endif + fclose(fplog); + fflush(fplog); +} +/*--------------------------------------------------------------------------*/ +/* routine emulating UNIX function under NT */ +#if defined(__NTVIS__) + +/*---------------------------------------------------------------------------*/ +static void +error(char *pch) +{ + if (!opterr) { + return; // without printing + } + fprintf(stderr, "%s: %s: %c\n", + (NULL != progname) ? progname : "getopt", pch, optopt); +} +/*---------------------------------------------------------------------------*/ +int +getopt(int argc, char **argv, char *ostr) +{ + static char *place = EMSG; /* option letter processing */ + register char *oli; /* option letter list index */ + + if (!*place) { + // update scanning pointer + if (optind >= argc || *(place = argv[optind]) != '-' || !*++place) { + place = EMSG; + return -1; + } + // place now points to the first char past the initial '-' + if (place[0] == '-') { + // found "--" + // Was the word just a '--'? + if (place[1] == '\0') + ++optind; // yes, so consume the word + // otherwise, the '--' was the start of a longer word, + // so do not consume it. + place = EMSG; + return -1; + } + } + + /* option letter okay? */ + if ((optopt = (int)*place++) == (int)':' + || !(oli = strchr(ostr, optopt))) { + if (!*place) { + ++optind; + } + error("illegal option"); + return BADCH; + } + if (*++oli != ':') { + /* don't need argument */ + optarg = NULL; + if (!*place) + ++optind; + } else { + /* need an argument */ + if (*place) { + optarg = place; /* no white space */ + } else if (argc <= ++optind) { + /* no arg */ + place = EMSG; + error("option requires an argument"); + return BADCH; + } else { + optarg = argv[optind]; /* white space */ + } + place = EMSG; + ++optind; + } + return optopt; // return option letter +} + +void +usleep(unsigned int microseconds) +{ + Sleep(microseconds/1000); +} +#endif /* __NTVIS__ */ +/*--------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------*/ +void +do_help() +{ +char More_help[] = +" Details about the reply: \n" +" Example: \n" +" ttcp-t: buflen=8192, nbuf=100, align=16384/0, port=5010\n" +" ttcp-t: File-Descriptor 0x4 Opened\n" +" # tcp sender -> #\n" +" ttcp-t: 819200 bytes in 1.152557 real seconds = 694.109 KB/sec +++\n" +" ttcp-t: 100 I/O calls, 11.526 msec(real)/call, 0.213 msec(cpu)/call\n" +" ttcp-t: 0.001914user 0.019388sys 0:01real 1% 9i+58d 190maxrss 1+2pf 177+180csw\n" +" ttcp-t: buffer address 0x28000\n" +" ttcp-t: File-Descriptor fd 0x4 Closed\n" +" ttcp done.\n\n" +"cpu seconds == (sec) elapse ru_utime + elapse ru_stime.\n" +" ru_utime == The total amount of time running in user mode.\n" +" ru_stime == The total amount of time spent in the system.\n" +" executing on behalf of the process.\n" +"real seconds == elapse time calculated by the system timer (date).\n" +"I/O calls == I/O call to the driver.\n" +"msec/call == average elapse time (Real seconds) between each I/O.\n" +"calls/sec == invert of msec/call.\n" +"user == (sec.msec) elaspe ru_utime.\n" +"sys == (sec.msec) elapse ru_stime.\n" +"real == (min:sec) CPU seconds.\n" +"%% == Real seconds / CPU seconds.\n" +"(ru_ixrss)i+(ru_idrss)d\n" +" ru_ixrss == An integral value indicating the amount of memory \n" +" used by the text segment that was also shared among\n" +" other processes. This value is expressed in units of\n" +" kilobytes * seconds-of-execution and is calculated \n" +" by adding the number of shared memory pages in use \n" +" each time the internal system clock ticks, and then\n" +" averaging over one-second intervals.\n" +" ru_idrss == An integral value of the amount of unshared memory \n" +" in the data segment of a process (expressed in \n" +" units of kilobytes * seconds-of-execution).\n"; + +char More_help1[] = +" (ru_maxrss/2)maxrss.\n" +" ru_maxrss == The maximum size, in kilobytes, of the used\n" +" resident set size. \n" +" (ru_majflt)+(ru_minflt)pf : Page fault\n" +" ru_majflt == The number of page faults serviced that required\n" +" I/O activity.\n" +" ru_minflt == The number of page faults serviced without any\n" +" I/O activity. In this case, I/O activity is \n" +" avoided by reclaiming a page frame from the list \n" +" of pages awaiting reallocation. \n" +"(ru_nvcsw)+(ru_nivcsw)csw : context switch\n" +" ru_nvcsw == The number of times a context switch resulted \n" +" because a process voluntarily gave up the \n" +" processor before its time slice was completed. \n" +" This usually occurs while the process waits \n" +" for availability of a resource.\n" +" ru_nivcsw == The number of times a context switch resulted \n" +" because a higher priority process ran or because\n" +" the current process exceeded its time slice.\n\n"; + +char More_help2[] = +"log file format :\n" +" buflen, nbuf(byte), bufalign(byte), bufoffset(byte)\n" +" port, sockbufsize(byte), UserTime(sec), SysTime(sec), CPUusage(%)\n" +" nbytes(byte), realt(sec), rate(MB/sec), I/O call,\n" +" hours*3600+min*60+sec\n\n"; + + fprintf(stderr,More_help); + fprintf(stderr,More_help1); + fprintf(stderr,More_help2); +} +/*---------------------------------------------------------------------------*/ +void +do_Usage() +{ +char Usage[] = +" Usage: ttcp -t [-options] host [ < in ] ttcp -r [-options > out]\n" +"Example: ttcp -t -s -v -n100 host ttcp -r -s -v -n100\n" +"Common options:\n" +" -V prints version number and date of last modification\n" +" -L create and append all results to a file named ttcp_log\n" +" -h more help\n" +" -l ## length of bufs read from or written to network (default 8192,\n" +" max 65535)\n" +" -u use UDP instead of TCP\n" +" -p ## port number to send to or listen at (default 5010)\n" +#if defined(__linux__) +" -P ## link-layer priority (default 0)\n" +#endif +" -s (ttcp -t) : source a pattern to network\n" +" (ttcp -r) : sink (discard) all data from network\n" +" -A ## align the start of buffers to this modulus (default 16384)\n" +" -O ## start buffers at this offset from the modulus (default 0)\n" +" -v verbose: print more statistics\n" +" -d set SO_DEBUG socket option\n" +" -b ## set socket buffer size (if supported)\n" +" -f X format for rate: b,B = bits, bytes k,K = kilo{bits,bytes};\n" +" m,M = mega{bits,bytes}; g,G = giga{bits,bytes}\n" +" -w ## set timeout value (in milliseconds) to exit if no receive data or tcp connect\n" +"Options specific to (ttcp -t) :\n" +" -n ## number of source bufs written to network (default 2048)\n" +" -x use random data in tcp/udp frames (-I provides seed)\n" +" -D don't buffer TCP writes (sets TCP_NODELAY socket option)\n" +" -H print hash marks to indicate progress, one per buffer\n" +" -I init/seed value for RNG when sending random size bufs (default 1)\n" +" -N ## number of source bufs per burst, i.e between sleeps (default 1)\n" +" -R ## send random size buffers with minimum size specified, max size\n" +" is value of -l option\n" +" -S ## millisecs between bursts (only used for udp, 10ms resolution)\n" +"Options specific to (ttcp -r) :\n" +" -B for -s, only output full blocks as specified by -l (for TAR)\n" +" -T \"touch\": access each byte as it's read\n" +" -i report information on out of order sequence numbers\n" +#if defined(DEBUG) +"Options for debug:\n" +" --nostart do not send UDP start packets\n" +" --noend do not send UDP end packets\n" +" --nodata do not send UDP data packets\n" +" --debug print extra debug outputs\n" +#endif /* DEBUG */ +; + + fprintf(stderr,Usage); +} + +/* Define automatic Emacs variables for consistent code formatting */ +/* Local Variables: */ +/* c-basic-offset:2 */ +/* indent-tabs-mode:nil */ +/* End: */ diff --git a/net/uanytun/Makefile b/net/uanytun/Makefile new file mode 100644 index 0000000..6121865 --- /dev/null +++ b/net/uanytun/Makefile @@ -0,0 +1,207 @@ +# +# Copyright (C) 2008 Christian Pointner, +# +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# This Makefile builds uAnytun Package for OpenWRT +# +# $Id: $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=uanytun +PKG_VERSION:=0.3.3 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.anytun.org/download/ +PKG_MD5SUM:=ca39dab02e91b0737e2b3f0839e74f6a + +include $(INCLUDE_DIR)/package.mk + + +define Package/uanytun/template + SECTION:=net + CATEGORY:=Network + TITLE:=micro anycast tunneling daemon + URL:=http://www.anytun.org/ + MAINTAINER:=Christian Pointner + SUBMENU:=VPN +endef + +define Package/uanytun/desc-template +uAnytun is a tiny implementation of SATP the secure anycast tunneling protocol. + SATP defines a protocol used for communication between any combination of + unicast and anycast tunnel endpoints. It has less protocol overhead than + IPSec in Tunnel mode and allows tunneling of every ETHER TYPE protocol (e.g. + ethernet, ip, arp ...). SATP directly includes cryptography and message + authentication based on the methodes used by SRTP. It is intended to deliver + a generic, scaleable and secure solution for tunneling and relaying of packets + of any protocol. + Unlike Anytun which is a full featured implementation uAnytun has no support + for multiple connections or synchronisation. It is a small single threaded + implementation intended to act as a client on small platforms. +endef + + +define Package/uanytun + $(call Package/uanytun/template) + DEPENDS:=+kmod-tun +libgcrypt +endef + +define Package/uanytun/conffiles +/etc/config/uanytun +endef + +define Package/uanytun/description + $(call Package/uanytun/desc-template) +endef + + +define Package/uanytun-sslcrypt + $(call Package/uanytun/template) + DEPENDS:=+kmod-tun +libopenssl +endef + +define Package/uanytun-sslcrypt/conffiles +/etc/config/uanytun-sslcrypt +endef + +define Package/uanytun-sslcrypt/description + $(call Package/uanytun/desc-template) +endef + + +define Package/uanytun-nocrypt + $(call Package/uanytun/template) + DEPENDS:=+kmod-tun +endef + +define Package/uanytun-nocrypt/conffiles +/etc/config/uanytun-nocrypt +endef + +define Package/uanytun-nocrypt/description + $(call Package/uanytun/desc-template) +endef + +define Package/uanytun/configure + (cd $(1)/$(2)/src; \ + touch include.mk; \ + ln -s linux/tun.c .; \ + echo '#ifndef UANYTUN_version_h_INCLUDED' > version.h; \ + echo '#define UANYTUN_version_h_INCLUDED' >> version.h; \ + echo '' >> version.h; \ + echo '#define VERSION_STRING_0 "uanytun version '`cat $(1)/version`'"' >> version.h; \ + echo '#define VERSION_STRING_1 "built on '`hostname`', '`date +"%d.%m.%Y %H:%M:%S %Z"`'"' >> version.h; \ + echo '' >> version.h; \ + echo '#endif' >> version.h \ + ) +endef + +ifneq ($(CONFIG_PACKAGE_uanytun-nocrypt),) + define Build/Configure/uanytun-nocrypt + rm -rf $(PKG_BUILD_DIR)/uanytun-nocrypt + mkdir -p $(PKG_BUILD_DIR)/uanytun-nocrypt + $(CP) -r $(PKG_BUILD_DIR)/src $(PKG_BUILD_DIR)/uanytun-nocrypt + $(call Package/uanytun/configure,$(PKG_BUILD_DIR),uanytun-nocrypt) + endef + + define Build/Compile/uanytun-nocrypt + $(MAKE) -C $(PKG_BUILD_DIR)/uanytun-nocrypt/src \ + $(TARGET_CONFIGURE_OPTS) \ + NO_CRYPT_OBJ=1 \ + TARGET=Linux \ + CFLAGS="$(TARGET_CFLAGS) -DNO_CRYPT" \ + LDFLAGS="$(TARGET_LDFLAGS) -ldl" + $(STRIP) $(PKG_BUILD_DIR)/uanytun-nocrypt/src/uanytun + endef +endif + +ifneq ($(CONFIG_PACKAGE_uanytun-sslcrypt),) + define Build/Configure/uanytun-sslcrypt + rm -rf $(PKG_BUILD_DIR)/uanytun-sslcrypt + mkdir -p $(PKG_BUILD_DIR)/uanytun-sslcrypt + $(CP) -r $(PKG_BUILD_DIR)/src $(PKG_BUILD_DIR)/uanytun-sslcrypt + $(call Package/uanytun/configure,$(PKG_BUILD_DIR),uanytun-sslcrypt) + endef + + define Build/Compile/uanytun-sslcrypt + $(MAKE) -C $(PKG_BUILD_DIR)/uanytun-sslcrypt/src \ + $(TARGET_CONFIGURE_OPTS) \ + TARGET=Linux \ + CFLAGS="$(TARGET_CFLAGS) -DUSE_SSL_CRYPTO -I$(STAGING_DIR)/usr/include" \ + LDFLAGS="$(TARGET_LDFLAGS) -ldl -lcrypto" + $(STRIP) $(PKG_BUILD_DIR)/uanytun-sslcrypt/src/uanytun + endef +endif + +ifneq ($(CONFIG_PACKAGE_uanytun),) + define Build/Configure/uanytun-default + rm -rf $(PKG_BUILD_DIR)/uanytun + mkdir -p $(PKG_BUILD_DIR)/uanytun + $(CP) -r $(PKG_BUILD_DIR)/src $(PKG_BUILD_DIR)/uanytun + $(call Package/uanytun/configure,$(PKG_BUILD_DIR),uanytun) + endef + + define Build/Compile/uanytun-default + $(MAKE) -C $(PKG_BUILD_DIR)/uanytun/src \ + $(TARGET_CONFIGURE_OPTS) \ + TARGET=Linux \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ + LDFLAGS="$(TARGET_LDFLAGS) -ldl -lgcrypt -lgpg-error" + $(STRIP) $(PKG_BUILD_DIR)/uanytun/src/uanytun + endef +endif + + +define Build/Configure + $(call Build/Configure/uanytun-nocrypt) + $(call Build/Configure/uanytun-sslcrypt) + $(call Build/Configure/uanytun-default) +endef + +define Build/Compile + $(call Build/Compile/uanytun-nocrypt) + $(call Build/Compile/uanytun-sslcrypt) + $(call Build/Compile/uanytun-default) +endef + +define Build/Clean + rm -rf $(PKG_BUILD_DIR)/uanytun-nocrypt + rm -rf $(PKG_BUILD_DIR)/uanytun-sslcrypt + rm -rf $(PKG_BUILD_DIR)/uanytun +endef + + + +define Package/uanytun/install-generic + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/$(3) $(1)/etc/config/$(2) + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(2)/src/uanytun $(1)/usr/sbin/$(2) + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/uanytun.init $(1)/etc/init.d/$(2) + @sed -e 's/BIN=uanytun/BIN=$(2)/' -i $(1)/etc/init.d/$(2) +endef + +define Package/uanytun/install + $(call Package/uanytun/install-generic,$(1),uanytun,uanytun.config) +endef + +define Package/uanytun-sslcrypt/install + $(call Package/uanytun/install-generic,$(1),uanytun-sslcrypt,uanytun.config) +endef + +define Package/uanytun-nocrypt/install + $(call Package/uanytun/install-generic,$(1),uanytun-nocrypt,uanytun-nocrypt.config) +endef + + + +$(eval $(call BuildPackage,uanytun)) +$(eval $(call BuildPackage,uanytun-sslcrypt)) +$(eval $(call BuildPackage,uanytun-nocrypt)) diff --git a/net/uanytun/files/uanytun-nocrypt.config b/net/uanytun/files/uanytun-nocrypt.config new file mode 100644 index 0000000..9792d1f --- /dev/null +++ b/net/uanytun/files/uanytun-nocrypt.config @@ -0,0 +1,88 @@ +config "client1" + option disabled 0 + option username 'nobody' + option groupname 'nogroup' +# option chroot "/var/run/uanytun" + +# option interface '' +# option port '4444' +# option sender_id '1' + +# option dev 'anytun0' + option type 'tun' + option ifconfig '192.168.123.1/24' +# option post-up-script '/etc/uanytun/client1-post-up.sh' + + option remote_host 'example.com' + option remote_port '4444' + + option window_size 0 + option mux 1 + + option log 'syslog:3,anytun-client1,daemon' + + +config "client2" + option disabled 1 + option username 'nobody' + option groupname 'nogroup' + + option type 'tun' + option ifconfig '192.168.123.2/24' + + option remote_host 'example.com' + option remote_port '4444' + + option window_size 0 + option mux 2 + + option log 'syslog:3,anytun-client2,daemon' + + +config "client3" + option disabled 1 + option username 'nobody' + option groupname 'nogroup' + + option type 'tun' + option ifconfig '192.168.123.3/24' + + option remote_host 'example.com' + option remote_port '4444' + + option window_size 0 + option mux 3 + + option log 'syslog:3,anytun-client3,daemon' + + +config "p2p-a" + option disabled 1 + option username 'nobody' + option groupname 'nogroup' + + option type 'tun' + option ifconfig '192.168.223.1/24' + + option remote_host 'p2p-b.example.com' + option remote_port '4444' + + option window_size 0 + + option log 'syslog:3,anytun-p2p-a,daemon' + + +config "p2p-b" + option disabled 1 + option username 'nobody' + option groupname 'nogroup' + + option type 'tun' + option ifconfig '192.168.223.2/24' + + option remote_host 'p2p-a.example.com' + option remote_port '4444' + + option window_size 0 + + option log 'syslog:3,anytun-p2p-b,daemon' diff --git a/net/uanytun/files/uanytun.config b/net/uanytun/files/uanytun.config new file mode 100644 index 0000000..c53db37 --- /dev/null +++ b/net/uanytun/files/uanytun.config @@ -0,0 +1,116 @@ +config "client1" + option disabled 0 +# option username 'nobody' +# option groupname 'nogroup' +# option chroot "/var/run/uanytun" + +# option interface '' +# option port '4444' +# option sender_id '1' + + option cipher 'aes-ctr' +# option cipher 'null' +# option cipher 'aes-ctr-128' +# option cipher 'aes-ctr-192' +# option cipher 'aes-ctr-256' + option auth_algo 'sha1' +# option auth_algo 'null' +# option auth_tag_length 10 + +# option dev 'anytun0' + option type 'tun' + option ifconfig '192.168.123.1/24' +# option post-up-script '/etc/uanytun/client1-post-up.sh' + + option remote_host 'example.com' + option remote_port '4444' + + option window_size 0 + option mux 1 + + option role 'client' +# option kd_prf 'null' +# option kd_prf 'aes-ctr' +# option kd_prf 'aes-ctr-128' +# option kd_prf 'aes-ctr-192' +# option kd_prf 'aes-ctr-256' +# option ld_kdr '0' +# option key '0123456789ABCDEF0123456789ABCDEF' +# option salt '0123456789ABCD0123456789ABCD' + option passphrase 'Creating_VPN_Tunnels_With_Anytun_Is_Easy' + + option log 'syslog:3,anytun-client1,daemon' + + +config "client2" + option disabled 1 + + option cipher 'aes-ctr' + option auth_algo 'sha1' + option type 'tun' + option ifconfig '192.168.123.2/24' + + option remote_host 'example.com' + option remote_port '4444' + + option window_size 0 + option mux 2 + option role 'client' + option passphrase 'Creating_VPN_Tunnels_With_Anytun_Is_Easy' + + option log 'syslog:3,anytun-client2,daemon' + + +config "client3" + option disabled 1 + + option cipher 'aes-ctr' + option auth_algo 'sha1' + option type 'tun' + option ifconfig '192.168.123.3/24' + + option remote_host 'example.com' + option remote_port '4444' + + option window_size 0 + option mux 3 + option role 'client' + option passphrase 'Creating_VPN_Tunnels_With_Anytun_Is_Easy' + + option log 'syslog:3,anytun-client3,daemon' + + +config "p2p-a" + option disabled 1 + + option cipher 'aes-ctr' + option auth_algo 'sha1' + option type 'tun' + option ifconfig '192.168.223.1/24' + + option remote_host 'p2p-b.example.com' + option remote_port '4444' + + option window_size 0 + option role 'alice' + option passphrase 'Creating_P2P_VPN_Tunnels_With_Anytun_Is_Easy' + + option log 'syslog:3,anytun-p2p-a,daemon' + + +config "p2p-b" + option disabled 1 + + option cipher 'aes-ctr' + option auth_algo 'sha1' + option type 'tun' + option ifconfig '192.168.223.2/24' + + option remote_host 'p2p-a.example.com' + option remote_port '4444' + + option window_size 0 + option role 'bob' + option passphrase 'Creating_P2P_VPN_Tunnels_With_Anytun_Is_Easy' + + option log 'syslog:3,anytun-p2p-b,daemon' diff --git a/net/uanytun/files/uanytun.init b/net/uanytun/files/uanytun.init new file mode 100644 index 0000000..59e1c23 --- /dev/null +++ b/net/uanytun/files/uanytun.init @@ -0,0 +1,104 @@ +#!/bin/sh /etc/rc.common +START=50 + +BIN=uanytun +DAEMON=/usr/sbin/$BIN +DESC=$BIN +RUN_D=/var/run + + +option_cb() { + local varname="$1" + local value="$2" + + if ! echo "$CONFIG_OPTIONS" | grep " $varname " > /dev/null; then + CONFIG_OPTIONS="$CONFIG_OPTIONS $varname " + fi +} + +foreach_config_forced() { + foreach_config $1 "forced" +} + +foreach_config() { + local cfg="$1" + local name + local option + local value + local args="" + local forced=0 + + if [ -n "$2" ] && [ "x$2" == "xforced" ]; then + forced=1 + fi + + config_get name "$cfg" TYPE + for option in $CONFIG_OPTIONS + do + config_get value "$cfg" "$option" + if [ "x$option" == "xdisabled" ]; then + if [ $forced -eq 0 ] && [ $value -eq 1 ]; then + echo -n " $name(disabled)" + return + fi + continue + fi + + option=`echo $option | tr '_' '-'` + if [ -n "$value" ]; then + args="$args --$option $value" + fi + done + echo -n " $name" + local status="OK" + $DAEMON --write-pid "$RUN_D/$BIN.$name.pid" $args || status="failed" + echo -n "($status)" +} + +stop_vpn() { + local name=$1 + local pidfile=$RUN_D/$BIN.$name.pid + echo -n " $name" + local status="OK" + if [ ! -f "$pidfile" ]; then + status="tunnel not active" + else + kill `cat $pidfile` > /dev/null 2>&1 || status="failed" + rm -f $pidfile + fi + echo -n "($status)" +} + +start() { + echo -n "Starting $DESC:" + config_load $BIN + if [ $# -gt 0 ]; then + while [ $# -gt 0 ]; do + config_foreach foreach_config_forced "$1" + shift + done + else + config_foreach foreach_config "" + fi + echo "." +} + +stop() { + echo -n "Stopping $DESC:" + local name + local pidfile + + if [ $# -gt 0 ]; then + while [ $# -gt 0 ]; do + stop_vpn $1 + shift + done + else + for pidfile in `ls $RUN_D/$BIN.*.pid 2> /dev/null`; do + name=${pidfile%%.pid} + name=${name##$RUN_D/$BIN.} + stop_vpn $name + done + fi + echo "." +} diff --git a/net/ucarp/Makefile b/net/ucarp/Makefile new file mode 100644 index 0000000..67afdfc --- /dev/null +++ b/net/ucarp/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ucarp +PKG_VERSION:=1.5.2 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://download.pureftpd.org/pub/ucarp +PKG_MD5SUM:=723636dbf79fc6abd329a71ec4ddf79d + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ucarp + SECTION:=net + CATEGORY:=Network + TITLE:=Lets several hosts share one IP + DEPENDS:=+ip +libpcap + URL:=http://www.ucarp.org/project/ucarp +endef + +define Package/ucarp/description + ucarp allows a couple of hosts to share common virtual IP addresses in order + to provide automatic failover. It is a portable userland implementation of the + secure and patent-free Common Address Redundancy Protocol +endef + +define Package/ucarp/conffiles +/etc/ucarp.conf +endef + +define Package/ucarp/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) ./files/ucarp.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/ucarp.init $(1)/etc/init.d/ucarp + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ucarp $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,ucarp)) diff --git a/net/ucarp/files/ucarp.conf b/net/ucarp/files/ucarp.conf new file mode 100644 index 0000000..86480f5 --- /dev/null +++ b/net/ucarp/files/ucarp.conf @@ -0,0 +1,22 @@ +# Run in background +BACKGROUND=1 + +# Interface to run CARP on +IF=br-lan + +# Virtual IP shared with the other system +VIP=10.0.0.117 + +# Size of the network mask for the virtual IP +VMASK=24 + +# Real, static IP of this host +MYIP=192.168.1.20 + +# Password shared with the other system +PASSWORD=love + +# IP addresses to arping after taking over the shared IP, +# you should list all known systems, those not listed can +# take up to a minute to notice the change. +PINGIP="10.0.0.1 10.0.0.20" diff --git a/net/ucarp/files/ucarp.init b/net/ucarp/files/ucarp.init new file mode 100644 index 0000000..c00baf4 --- /dev/null +++ b/net/ucarp/files/ucarp.init @@ -0,0 +1,43 @@ +#!/bin/sh /etc/rc.common + +START=50 +CONF=/etc/ucarp.conf +IP=$(which ip) +UCARP=$(which ucarp) +ARPING=$(which arping) + +start() { + . ${CONF} + + [ ${BACKGROUND} = 1 ] && daemon="--daemonize" + + cat > /var/run/ucarp-vip-up <> /var/run/ucarp-vip-up < /var/run/ucarp-vip-down <&5 +-$as_echo_n "checking whether snprintf is C99 conformant... " >&6; } +-if test "$cross_compiling" = yes; then +- { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&5 +-$as_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 +-#ifdef STDC_HEADERS +-# include +-# include +-#else +-# if HAVE_STDLIB_H +-# include +-# endif +-#endif +-#ifdef HAVE_UNISTD_H +-# include +-#endif +- +-int main(void) +-{ +- char buf[4]; +- +- (void) fprintf(fopen("conftestval", "w"), "%d\n", +- (int) snprintf(buf, sizeof buf, "12345678")); +- 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- CONF_SNPRINTF_TYPE=`cat conftestval` +- +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-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 +- +- +-{ $as_echo "$as_me:$LINENO: result: done" >&5 +-$as_echo "done" >&6; } +-if test "x$CONF_SNPRINTF_TYPE" = "x" ; then +- { $as_echo "$as_me:$LINENO: WARNING: your operating system doesn't implement snprintf" >&5 +-$as_echo "$as_me: WARNING: your operating system doesn't implement snprintf" >&2;} +-else +- + cat >>confdefs.h <<_ACEOF +-#define CONF_SNPRINTF_TYPE $CONF_SNPRINTF_TYPE +-_ACEOF +- +-fi +- +-{ $as_echo "$as_me:$LINENO: checking whether you already have a standard SHA1 implementation" >&5 +-$as_echo_n "checking whether you already have a standard SHA1 implementation... " >&6; } +-if test "$cross_compiling" = yes; then +- { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling +-See \`config.log' for more details." >&5 +-$as_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 +-#include +-#include +- +-int main(void) +-{ +- SHA1_CTX ctx; +- char b[41]; +- +- SHA1Init(&ctx); +- SHA1Update(&ctx, (const unsigned char *) "test", 4U); +- SHA1End(&ctx, b); +- b[40] = 0; +- +- return strcasecmp(b, "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3"); +-} +- +-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- +-{ $as_echo "$as_me:$LINENO: result: yes" >&5 +-$as_echo "yes" >&6; } +- +-cat >>confdefs.h <<\_ACEOF +-#define USE_SYSTEM_CRYPT_SHA1 /**/ ++#define CONF_SNPRINTF_TYPE 1 + _ACEOF + + +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-{ $as_echo "$as_me:$LINENO: result: no" >&5 +-$as_echo "no" >&6; } +- +-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 +- +- + + { $as_echo "$as_me:$LINENO: checking whether syslog names are available" >&5 + $as_echo_n "checking whether syslog names are available... " >&6; } diff --git a/net/ucspi-tcp/Makefile b/net/ucspi-tcp/Makefile new file mode 100644 index 0000000..b9ad9cf --- /dev/null +++ b/net/ucspi-tcp/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2007 OpenWrt.org +# Original port by FreeWRT project. +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# Alexander Tsvyashchenko Created OpenWRT package as per Trac ticket 2497 +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ucspi-tcp +PKG_VERSION:=0.88 +PKG_RELEASE:=1 + +PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz +PKG_SOURCE_URL:=http://cr.yp.to/ucspi-tcp/ +PKG_MD5SUM:=39b619147db54687c4a583a7a94c9163 + +include $(INCLUDE_DIR)/package.mk + +define Package/ucspi-tcp + SECTION:=net + CATEGORY:=Network + DEPENDS:= + TITLE:=UNIX Client-Server Program Interface for TCP + URL:=http://cr.yp.to/ucspi-tcp.html +endef + +define Package/PKG_NAME/description. + tcpserver and tcpclient are command-line tools for building + TCP client-server applications. +endef + +define Build/Compile + TARGET_CC="$(TARGET_CC)" \ + TARGET_CFLAGS="$(TARGET_CFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \ + TARGET_RANLIB="$(TARGET_CROSS)ranlib" \ + $(MAKE) -C $(PKG_BUILD_DIR) +endef + +define Package/ucspi-tcp/install + $(INSTALL_DIR) $(1)/usr/bin + (cd $(PKG_BUILD_DIR); \ + $(INSTALL_BIN) tcpserver tcprules tcprulescheck argv0 recordio \ + tcpclient who@ date@ finger@ http@ tcpcat mconnect mconnect-io \ + addcr delcr fixcrio rblsmtpd \ + $(1)/usr/bin) +endef + +$(eval $(call BuildPackage,ucspi-tcp)) + diff --git a/net/ucspi-tcp/patches/100-cross_compile.patch b/net/ucspi-tcp/patches/100-cross_compile.patch new file mode 100644 index 0000000..a688ea9 --- /dev/null +++ b/net/ucspi-tcp/patches/100-cross_compile.patch @@ -0,0 +1,196 @@ +--- a/Makefile ++++ b/Makefile +@@ -36,10 +36,6 @@ auto-str.o: \ + compile auto-str.c buffer.h readwrite.h exit.h + ./compile auto-str.c + +-auto_home.c: \ +-auto-str conf-home +- ./auto-str auto_home `head -1 conf-home` > auto_home.c +- + auto_home.o: \ + compile auto_home.c + ./compile auto_home.c +@@ -305,10 +301,6 @@ fmt_ulong.o: \ + compile fmt_ulong.c fmt.h + ./compile fmt_ulong.c + +-fork.h: \ +-choose compile load tryvfork.c fork.h1 fork.h2 +- ./choose cl tryvfork fork.h1 fork.h2 > fork.h +- + getln.o: \ + compile getln.c byte.h getln.h buffer.h stralloc.h gen_alloc.h + ./compile getln.c +@@ -317,24 +309,6 @@ getln2.o: \ + compile getln2.c byte.h getln.h buffer.h stralloc.h gen_alloc.h + ./compile getln2.c + +-hassgact.h: \ +-choose compile load trysgact.c hassgact.h1 hassgact.h2 +- ./choose cl trysgact hassgact.h1 hassgact.h2 > hassgact.h +- +-hassgprm.h: \ +-choose compile load trysgprm.c hassgprm.h1 hassgprm.h2 +- ./choose cl trysgprm hassgprm.h1 hassgprm.h2 > hassgprm.h +- +-hasshsgr.h: \ +-choose compile load tryshsgr.c hasshsgr.h1 hasshsgr.h2 chkshsgr \ +-warn-shsgr +- ./chkshsgr || ( cat warn-shsgr; exit 1 ) +- ./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h +- +-haswaitp.h: \ +-choose compile load trywaitp.c haswaitp.h1 haswaitp.h2 +- ./choose cl trywaitp haswaitp.h1 haswaitp.h2 > haswaitp.h +- + hier.o: \ + compile hier.c auto_home.h + ./compile hier.c +@@ -362,10 +336,6 @@ instcheck.o: \ + compile instcheck.c strerr.h error.h readwrite.h exit.h + ./compile instcheck.c + +-iopause.h: \ +-choose compile trypoll.c iopause.h1 iopause.h2 +- ./choose clr trypoll iopause.h1 iopause.h2 > iopause.h +- + iopause.o: \ + compile iopause.c taia.h tai.h uint64.h select.h iopause.h taia.h + ./compile iopause.c +@@ -404,7 +374,7 @@ warn-auto.sh systype + dgux-*) ;; \ + hp-ux-*) ;; \ + sco*) ;; \ +- *) echo 'ranlib "$$main"' ;; \ ++ *) echo '$(if $(TARGET_RANLIB),$(TARGET_RANLIB),ranlib) "$$main"' ;; \ + esac \ + ) > makelib + chmod 755 makelib +@@ -521,10 +491,6 @@ seek_set.o: \ + compile seek_set.c seek.h + ./compile seek_set.c + +-select.h: \ +-choose compile trysysel.c select.h1 select.h2 +- ./choose c trysysel select.h1 select.h2 > select.h +- + setup: \ + it install + ./install +@@ -791,10 +757,6 @@ uint32_unpack.o: \ + compile uint32_unpack.c uint32.h + ./compile uint32_unpack.c + +-uint64.h: \ +-choose compile load tryulong64.c uint64.h1 uint64.h2 +- ./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h +- + unix.a: \ + makelib alloc.o alloc_re.o buffer.o buffer_0.o buffer_1.o buffer_2.o \ + buffer_copy.o buffer_get.o buffer_put.o env.o error.o error_str.o \ +--- /dev/null ++++ b/auto_home.c +@@ -0,0 +1,3 @@ ++const char auto_home[] = "\ ++\057\165\163\162\ ++"; +--- a/conf-cc ++++ b/conf-cc +@@ -1,3 +1,3 @@ +-gcc -O2 ++$TARGET_CC $TARGET_CFLAGS -include errno.h + + This will be used to compile .c files. +--- a/conf-home ++++ b/conf-home +@@ -1,4 +1,4 @@ +-/usr/local ++/usr + + This is the ucspi-tcp home directory. Programs will be installed in + .../bin. +--- a/conf-ld ++++ b/conf-ld +@@ -1,3 +1,3 @@ +-gcc -s ++$TARGET_CC -s $TARGET_LDFLAGS + + This will be used to link .o files into an executable. +--- /dev/null ++++ b/fork.h +@@ -0,0 +1,9 @@ ++#ifndef FORK_H ++#define FORK_H ++ ++/* sysdep: +vfork */ ++ ++extern int fork(); ++extern int vfork(); ++ ++#endif +--- /dev/null ++++ b/hassgact.h +@@ -0,0 +1,2 @@ ++/* sysdep: +sigaction */ ++#define HASSIGACTION 1 +--- /dev/null ++++ b/hassgprm.h +@@ -0,0 +1,2 @@ ++/* sysdep: +sigprocmask */ ++#define HASSIGPROCMASK 1 +--- /dev/null ++++ b/hasshsgr.h +@@ -0,0 +1 @@ ++/* sysdep: -shortsetgroups */ +--- /dev/null ++++ b/haswaitp.h +@@ -0,0 +1,2 @@ ++/* sysdep: +waitpid */ ++#define HASWAITPID 1 +--- /dev/null ++++ b/iopause.h +@@ -0,0 +1,18 @@ ++#ifndef IOPAUSE_H ++#define IOPAUSE_H ++ ++/* sysdep: +poll */ ++#define IOPAUSE_POLL ++ ++#include ++#include ++ ++typedef struct pollfd iopause_fd; ++#define IOPAUSE_READ POLLIN ++#define IOPAUSE_WRITE POLLOUT ++ ++#include "taia.h" ++ ++extern void iopause(iopause_fd *,unsigned int,struct taia *,struct taia *); ++ ++#endif +--- /dev/null ++++ b/select.h +@@ -0,0 +1,11 @@ ++#ifndef SELECT_H ++#define SELECT_H ++ ++/* sysdep: +sysselect */ ++ ++#include ++#include ++#include ++extern int select(); ++ ++#endif +--- /dev/null ++++ b/uint64.h +@@ -0,0 +1,8 @@ ++#ifndef UINT64_H ++#define UINT64_H ++ ++/* sysdep: -ulong64 */ ++ ++typedef unsigned long long uint64; ++ ++#endif diff --git a/net/udp-broadcast-relay/Makefile b/net/udp-broadcast-relay/Makefile new file mode 100644 index 0000000..9fcdd6c --- /dev/null +++ b/net/udp-broadcast-relay/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=udp-broadcast-relay +PKG_VERSION:=0.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.joachim-breitner.de/udp-broadcast-relay/files/ +PKG_MD5SUM:=a32f983b7063d6ac670e6b22be9b9d24 + +include $(INCLUDE_DIR)/package.mk + +define Package/udp-broadcast-relay + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + TITLE:=listens for packets on a specified UDP broadcast port + URL:=http://www.joachim-breitner.de/udp-broadcast-relay/ +endef + +define Package/udp-broadcast-relay/description + This program listens for packets on a specified UDP broadcast port. + When a packet is received, it sends that packet to all specified interfaces but + the one it came from as though it originated from the original sender. + The primary purpose of this is to allow games on machines on separated + local networks (Ethernet, WLAN) that use udp broadcasts to find each other to do so. + It also works on ppp links, so you can log in from windows boxes (e.g. using pptp) + and play LAN-based games together. Currently, you have to care about upcoming or + downgoing interfaces yourself. +endef + +define Build/Compile + $(TARGET_CC) $(PKG_BUILD_DIR)/main.c -o $(PKG_BUILD_DIR)/$(PKG_NAME) +endef + +define Package/udp-broadcast-relay/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,udp-broadcast-relay)) diff --git a/net/udpcast/Makefile b/net/udpcast/Makefile new file mode 100644 index 0000000..7a8f6b6 --- /dev/null +++ b/net/udpcast/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=udpcast +PKG_RELEASE:=1 +PKG_VERSION:=20100130 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://udpcast.linux.lu/download/ +PKG_MD5SUM:=f9ad942dfe3ecbd2da5d91479957e5a9 + +include $(INCLUDE_DIR)/package.mk + +define Package/udpcast + SECTION:=net + CATEGORY:=Network + TITLE:=UDP Cast + URL:=http://udpcast.linux.lu/ +endef + +define Package/udpcast/description + UDPcast is a file transfer tool that can send data simultaneously to many destinations on a LAN. +endef + +define Package/udpcast/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/udp-receiver \ + $(1)/usr/sbin/ + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/udp-sender \ + $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,udpcast)) diff --git a/net/udpxy/Makefile b/net/udpxy/Makefile new file mode 100644 index 0000000..21b7801 --- /dev/null +++ b/net/udpxy/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=udpxy +PKG_REV:=1.0 +PKG_TAG:=Chipmunk-19 +PKG_VERSION:=$(PKG_REV)-$(PKG_TAG) +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME).$(PKG_REV)-$(PKG_TAG).tgz +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV) +PKG_SOURCE_URL:=@SF/udpxy +PKG_MD5SUM:=e1373a3bf30b2b3449a5b907aa4e29ce + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/udpxy + SECTION:=net + CATEGORY:=Network + TITLE:=convert UDP IPTV streams into http stream + URL:=http://sourceforge.net/projects/udpxy +endef + +define Package/udpxy/description + udproxy makes it possible to convert UDP IPTV streams into http + streams which can be viewed even over wlans. http streams do + not generate huge amounts of multicast traffic, so a sd stream + only takes about 300k. interesting for peoply who have IPTV at + home and do not want to rent multiple decoders from their + provider but just use their own streaming client for example + popcornhour/mediatomb/vlc/etc. +endef + +MAKE_FLAGS += \ + INSTALLROOT="$(PKG_INSTALL_DIR)/usr" + +define Package/udpxy/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udpxy $(1)/usr/bin/ + ln -sf udpxy $(1)/usr/bin/udpxrec +endef + +$(eval $(call BuildPackage,udpxy)) diff --git a/net/uhub/Makefile b/net/uhub/Makefile new file mode 100644 index 0000000..0046e1c --- /dev/null +++ b/net/uhub/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=uhub +PKG_VERSION:=0.2.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz +PKG_SOURCE_URL:=http://www.extatic.org/downloads/uhub/ +PKG_MD5SUM:=45d35d9757bc0a84297dec51520f725b + +include $(INCLUDE_DIR)/package.mk + +define Package/uhub + SUBMENU:=P2P + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libevent + TITLE:=High performance ADC hub + URL:=http://www.extatic.org/uhub/ +endef + +define Package/uhub/description + uhub is a high performance peer-to-peer hub for the ADC network. + Its low memory footprint allows it to handle several thousand users + on high-end servers, or a small private hub on embedded hardware. +endef + +define Package/uhub/install + $(INSTALL_DIR) $(1)/usr/local/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhub $(1)/usr/local/bin/ + $(INSTALL_DIR) $(1)/etc/uhub/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/uhub.conf $(1)/etc/uhub/ +endef + +$(eval $(call BuildPackage,uhub)) diff --git a/net/uhub/patches/100-user_struct.patch b/net/uhub/patches/100-user_struct.patch new file mode 100644 index 0000000..62fb992 --- /dev/null +++ b/net/uhub/patches/100-user_struct.patch @@ -0,0 +1,1664 @@ +--- a/src/auth.c ++++ b/src/auth.c +@@ -70,7 +70,7 @@ + { + char* data; + char* data_extra; +- struct user_access_info* info = 0; ++ struct uhub_user_access_info* info = 0; + + if (!strncmp(line, cmd, strlen(cmd))) + { +@@ -86,7 +86,7 @@ + return -1; + } + +- info = hub_malloc_zero(sizeof(struct user_access_info)); ++ info = hub_malloc_zero(sizeof(struct uhub_user_access_info)); + + if (!info) + { +@@ -340,7 +340,7 @@ + + static void acl_free_access_info(void* ptr) + { +- struct user_access_info* info = (struct user_access_info*) ptr; ++ struct uhub_user_access_info* info = (struct uhub_user_access_info*) ptr; + if (info) + { + hub_free(info->username); +@@ -404,16 +404,16 @@ + } + + +-struct user_access_info* acl_get_access_info(struct acl_handle* handle, const char* name) ++struct uhub_user_access_info* acl_get_access_info(struct acl_handle* handle, const char* name) + { +- struct user_access_info* info = (struct user_access_info*) list_get_first(handle->users); ++ struct uhub_user_access_info* info = (struct uhub_user_access_info*) list_get_first(handle->users); + while (info) + { + if (strcasecmp(info->username, name) == 0) + { + return info; + } +- info = (struct user_access_info*) list_get_next(handle->users); ++ info = (struct uhub_user_access_info*) list_get_next(handle->users); + } + return NULL; + } +@@ -492,7 +492,7 @@ + * seconds since the unix epoch (modulus 1 million) + * and the SID of the user (0-1 million). + */ +-const char* password_generate_challenge(struct user* user) ++const char* password_generate_challenge(struct uhub_user* user) + { + char buf[32]; + uint64_t tiger_res[3]; +@@ -511,10 +511,10 @@ + } + + +-int password_verify(struct user* user, const char* password) ++int password_verify(struct uhub_user* user, const char* password) + { + char buf[1024]; +- struct user_access_info* access; ++ struct uhub_user_access_info* access; + const char* challenge; + char raw_challenge[64]; + char password_calc[64]; +--- a/src/auth.h ++++ b/src/auth.h +@@ -21,7 +21,7 @@ + #define HAVE_UHUB_ACL_H + + struct hub_config; +-struct user; ++struct uhub_user; + struct ip_addr_encap; + + enum password_status +@@ -50,7 +50,7 @@ + + const char* get_user_credential_string(enum user_credentials cred); + +-struct user_access_info ++struct uhub_user_access_info + { + char* username; /* name of user, cid or IP range */ + char* password; /* password */ +@@ -77,7 +77,7 @@ + extern int acl_initialize(struct hub_config* config, struct acl_handle* handle); + extern int acl_shutdown(struct acl_handle* handle); + +-extern struct user_access_info* acl_get_access_info(struct acl_handle* handle, const char* name); ++extern struct uhub_user_access_info* acl_get_access_info(struct acl_handle* handle, const char* name); + extern int acl_is_cid_banned(struct acl_handle* handle, const char* cid); + extern int acl_is_ip_banned(struct acl_handle* handle, const char* ip_address); + extern int acl_is_ip_nat_override(struct acl_handle* handle, const char* ip_address); +@@ -87,7 +87,7 @@ + + extern int acl_check_ip_range(struct ip_addr_encap* addr, struct ip_ban_record* info); + +-extern const char* password_generate_challenge(struct user* user); +-extern int password_verify(struct user* user, const char* password); ++extern const char* password_generate_challenge(struct uhub_user* user); ++extern int password_verify(struct uhub_user* user, const char* password); + + #endif /* HAVE_UHUB_ACL_H */ +--- a/src/commands.c ++++ b/src/commands.c +@@ -19,7 +19,7 @@ + + #include "uhub.h" + +-typedef int (*command_handler)(struct user* user, const char* message); ++typedef int (*command_handler)(struct uhub_user* user, const char* message); + + struct commands_handler + { +@@ -32,7 +32,7 @@ + + static struct commands_handler command_handlers[]; + +-static void send_message(struct user* user, const char* message) ++static void send_message(struct uhub_user* user, const char* message) + { + char* buffer = adc_msg_escape(message); + struct adc_message* command = adc_msg_construct(ADC_CMD_IMSG, strlen(buffer) + 6); +@@ -42,7 +42,7 @@ + hub_free(buffer); + } + +-static int command_access_denied(struct user* user, const char* command) ++static int command_access_denied(struct uhub_user* user, const char* command) + { + char temp[64]; + snprintf(temp, 64, "*** Access denied: \"%s\"", command); +@@ -51,7 +51,7 @@ + } + + +-static int command_stats(struct user* user, const char* message) ++static int command_stats(struct uhub_user* user, const char* message) + { + char temp[128]; + snprintf(temp, 128, "*** Stats: %zu users, peak: %zu. Network (up/down): %d/%d KB/s, peak: %d/%d KB/s", +@@ -67,7 +67,7 @@ + } + + +-static int command_help(struct user* user, const char* message) ++static int command_help(struct uhub_user* user, const char* message) + { + #define MAX_HELP_MSG 1024 + size_t n; +@@ -89,7 +89,7 @@ + return 0; + } + +-static int command_uptime(struct user* user, const char* message) ++static int command_uptime(struct uhub_user* user, const char* message) + { + char tmp[128]; + size_t d; +@@ -124,20 +124,20 @@ + return 0; + } + +-static int command_kick(struct user* user, const char* message) ++static int command_kick(struct uhub_user* user, const char* message) + { + send_message(user, "*** Kick not implemented!"); + return 0; + } + +-static int command_reload(struct user* user, const char* message) ++static int command_reload(struct uhub_user* user, const char* message) + { + send_message(user, "*** Reloading configuration"); + user->hub->status = hub_status_restart; + return 0; + } + +-static int command_shutdown(struct user* user, const char* message) ++static int command_shutdown(struct uhub_user* user, const char* message) + { + send_message(user, "*** Hub shuting down..."); + user->hub->status = hub_status_shutdown; +@@ -145,13 +145,13 @@ + } + + +-static int command_version(struct user* user, const char* message) ++static int command_version(struct uhub_user* user, const char* message) + { + send_message(user, "*** Powered by " PRODUCT "/" VERSION); + return 0; + } + +-static int command_myip(struct user* user, const char* message) ++static int command_myip(struct uhub_user* user, const char* message) + { + char tmp[128]; + snprintf(tmp, 128, "*** Your IP: %s", ip_convert_to_string(&user->ipaddr)); +@@ -159,7 +159,7 @@ + return 0; + } + +-int command_dipatcher(struct user* user, const char* message) ++int command_dipatcher(struct uhub_user* user, const char* message) + { + size_t n = 0; + for (n = 0; command_handlers[n].prefix; n++) +--- a/src/commands.h ++++ b/src/commands.h +@@ -23,7 +23,7 @@ + #define CHAT_MSG_IGNORED 0 + #define CHAT_MSG_INVALID -1 + +-typedef int (*plugin_event_chat_message)(struct hub_info*, struct user*, struct adc_message*); ++typedef int (*plugin_event_chat_message)(struct hub_info*, struct uhub_user*, struct adc_message*); + + struct command_info + { +@@ -32,4 +32,4 @@ + plugin_event_chat_message function; + }; + +-int command_dipatcher(struct user* user, const char* message); ++int command_dipatcher(struct uhub_user* user, const char* message); +--- a/src/hub.c ++++ b/src/hub.c +@@ -19,7 +19,7 @@ + + #include "uhub.h" + +-int hub_handle_message(struct user* u, const char* line, size_t length) ++int hub_handle_message(struct uhub_user* u, const char* line, size_t length) + { + int ret = 0; + struct adc_message* cmd = 0; +@@ -96,7 +96,7 @@ + } + + +-int hub_handle_support(struct user* u, struct adc_message* cmd) ++int hub_handle_support(struct uhub_user* u, struct adc_message* cmd) + { + int ret = 0; + int index = 0; +@@ -161,7 +161,7 @@ + } + + +-int hub_handle_password(struct user* u, struct adc_message* cmd) ++int hub_handle_password(struct uhub_user* u, struct adc_message* cmd) + { + char* password = adc_msg_get_argument(cmd, 0); + int ret = 0; +@@ -184,7 +184,7 @@ + } + + +-int hub_handle_chat_message(struct user* u, struct adc_message* cmd) ++int hub_handle_chat_message(struct uhub_user* u, struct adc_message* cmd) + { + char* message = adc_msg_get_argument(cmd, 0); + int ret = 0; +@@ -206,14 +206,14 @@ + return ret; + } + +-int on_kick(struct user* u, struct adc_message* cmd) ++int on_kick(struct uhub_user* u, struct adc_message* cmd) + { + hub_log(log_error, "on_kick() not implemented"); + return -1; + } + + #ifdef ADC_UDP_OPERATION +-int hub_handle_autocheck(struct user* u, struct adc_message* cmd) ++int hub_handle_autocheck(struct uhub_user* u, struct adc_message* cmd) + { + char* port_str = adc_msg_get_argument(cmd, 0); + char* token = adc_msg_get_argument(cmd, 1); +@@ -245,13 +245,13 @@ + #endif + + +-void hub_send_autocheck(struct user* u, uint16_t port, const char* token) ++void hub_send_autocheck(struct uhub_user* u, uint16_t port, const char* token) + { + + } + + +-void hub_send_support(struct user* u) ++void hub_send_support(struct uhub_user* u) + { + if (user_is_connecting(u) || user_is_logged_in(u)) + { +@@ -260,7 +260,7 @@ + } + + +-void hub_send_sid(struct user* u) ++void hub_send_sid(struct uhub_user* u) + { + struct adc_message* command; + if (user_is_connecting(u)) +@@ -274,7 +274,7 @@ + } + + +-void hub_send_ping(struct user* user) ++void hub_send_ping(struct uhub_user* user) + { + /* This will just send a newline, despite appearing to do more below. */ + struct adc_message* ping = adc_msg_construct(0, 0); +@@ -287,7 +287,7 @@ + } + + +-void hub_send_hubinfo(struct user* u) ++void hub_send_hubinfo(struct uhub_user* u) + { + struct adc_message* info = adc_msg_copy(u->hub->command_info); + int value = 0; +@@ -356,7 +356,7 @@ + } + + +-void hub_send_handshake(struct user* u) ++void hub_send_handshake(struct uhub_user* u) + { + hub_send_support(u); + hub_send_sid(u); +@@ -369,7 +369,7 @@ + } + + +-void hub_send_motd(struct user* u) ++void hub_send_motd(struct uhub_user* u) + { + if (u->hub->command_motd) + { +@@ -378,7 +378,7 @@ + } + + +-void hub_send_password_challenge(struct user* u) ++void hub_send_password_challenge(struct uhub_user* u) + { + struct adc_message* igpa; + igpa = adc_msg_construct(ADC_CMD_IGPA, 38); +@@ -399,33 +399,33 @@ + { + case UHUB_EVENT_USER_JOIN: + { +- if (user_is_disconnecting((struct user*) message->ptr)) ++ if (user_is_disconnecting((struct uhub_user*) message->ptr)) + break; + + if (message->flags) + { +- hub_send_password_challenge((struct user*) message->ptr); ++ hub_send_password_challenge((struct uhub_user*) message->ptr); + } + else + { +- on_login_success((struct user*) message->ptr); ++ on_login_success((struct uhub_user*) message->ptr); + } + break; + } + + case UHUB_EVENT_USER_QUIT: + { +- user_manager_remove((struct user*) message->ptr); +- send_quit_message((struct user*) message->ptr); +- on_logout_user((struct user*) message->ptr); +- user_schedule_destroy((struct user*) message->ptr); ++ user_manager_remove((struct uhub_user*) message->ptr); ++ send_quit_message((struct uhub_user*) message->ptr); ++ on_logout_user((struct uhub_user*) message->ptr); ++ user_schedule_destroy((struct uhub_user*) message->ptr); + break; + } + + case UHUB_EVENT_USER_DESTROY: + { + hub_log(log_trace, "hub_event_dispatcher: UHUB_EVENT_USER_DESTROY (ptr=%p)", message->ptr); +- user_destroy((struct user*) message->ptr); ++ user_destroy((struct uhub_user*) message->ptr); + break; + } + +@@ -757,7 +757,7 @@ + */ + static inline int is_nick_in_use(struct hub_info* hub, const char* nick) + { +- struct user* lookup = get_user_by_nick(hub, nick); ++ struct uhub_user* lookup = get_user_by_nick(hub, nick); + if (lookup) + { + return 1; +@@ -771,7 +771,7 @@ + */ + static inline int is_cid_in_use(struct hub_info* hub, const char* cid) + { +- struct user* lookup = get_user_by_cid(hub, cid); ++ struct uhub_user* lookup = get_user_by_cid(hub, cid); + if (lookup) + { + return 1; +@@ -796,7 +796,7 @@ + * @param msg See enum status_message + * @param level See enum status_level + */ +-void hub_send_status(struct user* user, enum status_message msg, enum msg_status_level level) ++void hub_send_status(struct uhub_user* user, enum status_message msg, enum msg_status_level level) + { + struct hub_config* cfg = user->hub->config; + struct adc_message* cmd = adc_msg_construct(ADC_CMD_ISTA, 6); +--- a/src/hubevent.c ++++ b/src/hubevent.c +@@ -19,27 +19,27 @@ + + #include "uhub.h" + +-static void log_user_login(struct user* u) ++static void log_user_login(struct uhub_user* u) + { + const char* cred = get_user_credential_string(u->credentials); + const char* addr = ip_convert_to_string(&u->ipaddr); + hub_log(log_user, "LoginOK %s/%s %s \"%s\" (%s) \"%s\"", sid_to_string(u->id.sid), u->id.cid, addr, u->id.nick, cred, u->user_agent); + } + +-static void log_user_login_error(struct user* u, enum status_message msg) ++static void log_user_login_error(struct uhub_user* u, enum status_message msg) + { + const char* addr = ip_convert_to_string(&u->ipaddr); + const char* message = hub_get_status_message_log(u->hub, msg); + hub_log(log_user, "LoginError %s/%s %s \"%s\" (%s) \"%s\"", sid_to_string(u->id.sid), u->id.cid, addr, u->id.nick, message, u->user_agent); + } + +-static void log_user_logout(struct user* u, const char* message) ++static void log_user_logout(struct uhub_user* u, const char* message) + { + const char* addr = ip_convert_to_string(&u->ipaddr); + hub_log(log_user, "Logout %s/%s %s \"%s\" (%s)", sid_to_string(u->id.sid), u->id.cid, addr, u->id.nick, message); + } + +-static void log_user_nick_change(struct user* u, const char* nick) ++static void log_user_nick_change(struct uhub_user* u, const char* nick) + { + const char* addr = ip_convert_to_string(&u->ipaddr); + hub_log(log_user, "NickChange %s/%s %s \"%s\" -> \"%s\"", sid_to_string(u->id.sid), u->id.cid, addr, u->id.nick, nick); +@@ -47,7 +47,7 @@ + + + /* Send MOTD, do logging etc */ +-void on_login_success(struct user* u) ++void on_login_success(struct uhub_user* u) + { + struct timeval timeout = { TIMEOUT_IDLE, 0 }; + +@@ -75,14 +75,14 @@ + event_add(u->ev_read, &timeout); + } + +-void on_login_failure(struct user* u, enum status_message msg) ++void on_login_failure(struct uhub_user* u, enum status_message msg) + { + log_user_login_error(u, msg); + hub_send_status(u, msg, status_level_fatal); + user_disconnect(u, quit_logon_error); + } + +-void on_nick_change(struct user* u, const char* nick) ++void on_nick_change(struct uhub_user* u, const char* nick) + { + if (user_is_logged_in(u)) + { +@@ -90,7 +90,7 @@ + } + } + +-void on_logout_user(struct user* user) ++void on_logout_user(struct uhub_user* user) + { + const char* reason = ""; + +--- a/src/hubevent.h ++++ b/src/hubevent.h +@@ -23,22 +23,22 @@ + /** + * This event is triggered whenever a user successfully logs in to the hub. + */ +-extern void on_login_success(struct user* u); ++extern void on_login_success(struct uhub_user* u); + + /** + * This event is triggered whenever a user failed to log in to the hub. + */ +-extern void on_login_failure(struct user* u, enum status_message msg); ++extern void on_login_failure(struct uhub_user* u, enum status_message msg); + + /** + * This event is triggered whenever a previously logged in user leaves the hub. + */ +-extern void on_logout_user(struct user* u); ++extern void on_logout_user(struct uhub_user* u); + + /** + * This event is triggered whenever a user changes his/her nickname. + */ +-extern void on_nick_change(struct user* u, const char* nick); ++extern void on_nick_change(struct uhub_user* u, const char* nick); + + + #endif /* HAVE_UHUB_HUB_EVENT_H */ +--- a/src/hub.h ++++ b/src/hub.h +@@ -94,7 +94,7 @@ + struct event_queue* queue; + struct event_base* evbase; + struct hub_config* config; +- struct user_manager* users; ++ struct uhub_user_manager* users; + struct acl_handle* acl; + struct adc_message* command_info; /* The hub's INF command */ + struct adc_message* command_support; /* The hub's SUP command */ +@@ -116,103 +116,103 @@ + * + * @return 0 on success, -1 on error + */ +-extern int hub_handle_message(struct user* u, const char* message, size_t length); ++extern int hub_handle_message(struct uhub_user* u, const char* message, size_t length); + + /** + * Handle protocol support/subscription messages received clients. + * + * @return 0 on success, -1 on error + */ +-extern int hub_handle_support(struct user* u, struct adc_message* cmd); ++extern int hub_handle_support(struct uhub_user* u, struct adc_message* cmd); + + /** + * Handle password messages received from clients. + * + * @return 0 on success, -1 on error + */ +-extern int hub_handle_password(struct user* u, struct adc_message* cmd); ++extern int hub_handle_password(struct uhub_user* u, struct adc_message* cmd); + + /** + * Handle chat messages received from clients. + * @return 0 on success, -1 on error. + */ +-extern int hub_handle_chat_message(struct user* u, struct adc_message* cmd); ++extern int hub_handle_chat_message(struct uhub_user* u, struct adc_message* cmd); + + /** + * Used internally by hub_handle_info + * @return 1 if nickname is OK, or 0 if nickname is not accepted. + */ +-extern int hub_handle_info_check_nick(struct user* u, struct adc_message* cmd); ++extern int hub_handle_info_check_nick(struct uhub_user* u, struct adc_message* cmd); + + /** + * Used internally by hub_handle_info + * @return 1 if CID/PID is OK, or 0 if not valid. + */ +-extern int hub_handle_info_check_cid(struct user* u, struct adc_message* cmd); ++extern int hub_handle_info_check_cid(struct uhub_user* u, struct adc_message* cmd); + + /** + * Can only be used by administrators or operators. + * + * @return 0 on success, -1 on error + */ +-extern int hub_handle_kick(struct user* u, struct adc_message* cmd); ++extern int hub_handle_kick(struct uhub_user* u, struct adc_message* cmd); + + #ifdef ADC_UDP_OPERATION + /** + * Handle incoming autocheck message. + */ +-extern int hub_handle_autocheck(struct user* u, struct adc_message* cmd); ++extern int hub_handle_autocheck(struct uhub_user* u, struct adc_message* cmd); + #endif + + /** + * Send the support line for the hub to a particular user. + * Only used during the initial handshake. + */ +-extern void hub_send_support(struct user* u); ++extern void hub_send_support(struct uhub_user* u); + + /** + * Send a message assigning a SID for a user. + * This is only sent after hub_send_support() during initial handshake. + */ +-extern void hub_send_sid(struct user* u); ++extern void hub_send_sid(struct uhub_user* u); + + /** + * Send a 'ping' message to user. + */ +-extern void hub_send_ping(struct user* user); ++extern void hub_send_ping(struct uhub_user* user); + + /** + * Send a message containing hub information to a particular user. + * This is sent during user connection, but can safely be sent at any + * point later. + */ +-extern void hub_send_hubinfo(struct user* u); ++extern void hub_send_hubinfo(struct uhub_user* u); + + /** + * Send handshake. This basically calls + * hub_send_support() and hub_send_sid() + */ +-extern void hub_send_handshake(struct user* u); ++extern void hub_send_handshake(struct uhub_user* u); + + /** + * Send a welcome message containing the message of the day to + * one particular user. This can be sent in any point in time. + */ +-extern void hub_send_motd(struct user* u); ++extern void hub_send_motd(struct uhub_user* u); + + /** + * Send a password challenge to a user. + * This is only used if the user tries to access the hub using a + * password protected nick name. + */ +-extern void hub_send_password_challenge(struct user* u); ++extern void hub_send_password_challenge(struct uhub_user* u); + + /** + * Send an autocheck message to a user. + * This is basically a UDP message. The user's client can then determine + * if UDP communication works by either hole punching or configuring UPnP. + */ +-extern void hub_send_autocheck(struct user* u, uint16_t port, const char* token); ++extern void hub_send_autocheck(struct uhub_user* u, uint16_t port, const char* token); + + /** + * This starts the hub. +@@ -244,7 +244,7 @@ + /** + * Sends a status_message to a user. + */ +-extern void hub_send_status(struct user* user, enum status_message msg, enum msg_status_level level); ++extern void hub_send_status(struct uhub_user* user, enum status_message msg, enum msg_status_level level); + + /** + * Returns the number of logged in users on the hub. +--- a/src/inf.c ++++ b/src/inf.c +@@ -39,9 +39,9 @@ + adc_msg_remove_named_argument(cmd, ADC_INF_FLAG_REFERER); + } + +-static int user_is_protected(struct user* user); ++static int user_is_protected(struct uhub_user* user); + +-static int set_feature_cast_supports(struct user* u, struct adc_message* cmd) ++static int set_feature_cast_supports(struct uhub_user* u, struct adc_message* cmd) + { + char *it, *tmp; + +@@ -89,7 +89,7 @@ + /* + * FIXME: Only works for tiger hash. If a client doesnt support tiger we cannot let it in! + */ +-static int check_cid(struct user* user, struct adc_message* cmd) ++static int check_cid(struct uhub_user* user, struct adc_message* cmd) + { + size_t pos; + char* cid = adc_msg_get_named_argument(cmd, ADC_INF_FLAG_CLIENT_ID); +@@ -150,7 +150,7 @@ + } + + +-static int check_required_login_flags(struct user* user, struct adc_message* cmd) ++static int check_required_login_flags(struct uhub_user* user, struct adc_message* cmd) + { + int num = 0; + +@@ -186,7 +186,7 @@ + * remove any wrong address, and replace it with the correct one + * as seen by the hub. + */ +-int check_network(struct user* user, struct adc_message* cmd) ++int check_network(struct uhub_user* user, struct adc_message* cmd) + { + const char* address = ip_convert_to_string(&user->ipaddr); + +@@ -269,7 +269,7 @@ + } + + +-static int check_nick(struct user* user, struct adc_message* cmd) ++static int check_nick(struct uhub_user* user, struct adc_message* cmd) + { + char* nick; + char* tmp; +@@ -317,10 +317,10 @@ + } + + +-static int check_logged_in(struct user* user, struct adc_message* cmd) ++static int check_logged_in(struct uhub_user* user, struct adc_message* cmd) + { +- struct user* lookup1 = get_user_by_nick(user->hub, user->id.nick); +- struct user* lookup2 = get_user_by_cid(user->hub, user->id.cid); ++ struct uhub_user* lookup1 = get_user_by_nick(user->hub, user->id.nick); ++ struct uhub_user* lookup2 = get_user_by_cid(user->hub, user->id.cid); + + if (lookup1 == user) + { +@@ -358,7 +358,7 @@ + * But this is not something we want to do, and is deprecated in the ADC specification. + * One should rather look at capabilities/features. + */ +-static int check_user_agent(struct user* user, struct adc_message* cmd) ++static int check_user_agent(struct uhub_user* user, struct adc_message* cmd) + { + char* ua_encoded = 0; + char* ua = 0; +@@ -379,7 +379,7 @@ + } + + +-static int check_acl(struct user* user, struct adc_message* cmd) ++static int check_acl(struct uhub_user* user, struct adc_message* cmd) + { + if (acl_is_cid_banned(user->hub->acl, user->id.cid)) + { +@@ -399,7 +399,7 @@ + return 0; + } + +-static int check_limits(struct user* user, struct adc_message* cmd) ++static int check_limits(struct uhub_user* user, struct adc_message* cmd) + { + char* arg = adc_msg_get_named_argument(cmd, ADC_INF_FLAG_SHARED_SIZE); + if (arg) +@@ -525,10 +525,10 @@ + * If the hub is configured to allow only registered users and the user + * is not recognized this will return 1. + */ +-static int set_credentials(struct user* user, struct adc_message* cmd) ++static int set_credentials(struct uhub_user* user, struct adc_message* cmd) + { + int ret = 0; +- struct user_access_info* info = acl_get_access_info(user->hub->acl, user->id.nick); ++ struct uhub_user_access_info* info = acl_get_access_info(user->hub->acl, user->id.nick); + + if (info) + { +@@ -580,7 +580,7 @@ + /** + * Determines if a user is to be let into the hub even if the hub is "full". + */ +-static int user_is_protected(struct user* user) ++static int user_is_protected(struct uhub_user* user) + { + switch (user->credentials) + { +@@ -601,7 +601,7 @@ + * Only registered users will be let in if the hub is configured for registered + * users only. + */ +-static int user_is_registered(struct user* user) ++static int user_is_registered(struct uhub_user* user) + { + switch (user->credentials) + { +@@ -619,7 +619,7 @@ + } + + +-void update_user_info(struct user* u, struct adc_message* cmd) ++void update_user_info(struct uhub_user* u, struct adc_message* cmd) + { + char prefix[2]; + char* argument; +@@ -649,7 +649,7 @@ + } + + +-static int check_is_hub_full(struct user* user) ++static int check_is_hub_full(struct uhub_user* user) + { + /* + * If hub is full, don't let users in, but we still want to allow +@@ -663,7 +663,7 @@ + } + + +-static int check_registered_users_only(struct user* user) ++static int check_registered_users_only(struct uhub_user* user) + { + if (user->hub->config->registered_users_only && !user_is_registered(user)) + { +@@ -679,7 +679,7 @@ + return ret; \ + } while(0) + +-static int hub_handle_info_common(struct user* user, struct adc_message* cmd) ++static int hub_handle_info_common(struct uhub_user* user, struct adc_message* cmd) + { + /* Remove server restricted flags */ + remove_server_restricted_flags(cmd); +@@ -690,7 +690,7 @@ + return 0; + } + +-static int hub_handle_info_low_bandwidth(struct user* user, struct adc_message* cmd) ++static int hub_handle_info_low_bandwidth(struct uhub_user* user, struct adc_message* cmd) + { + if (user->hub->config->low_bandwidth_mode) + { +@@ -711,7 +711,7 @@ + return 0; + } + +-int hub_handle_info_login(struct user* user, struct adc_message* cmd) ++int hub_handle_info_login(struct uhub_user* user, struct adc_message* cmd) + { + int need_auth = 0; + +@@ -765,7 +765,7 @@ + * - CID/PID (valid, not taken, etc). + * - IP addresses (IPv4 and IPv6) + */ +-int hub_handle_info(struct user* user, const struct adc_message* cmd_unmodified) ++int hub_handle_info(struct uhub_user* user, const struct adc_message* cmd_unmodified) + { + struct adc_message* cmd = adc_msg_copy(cmd_unmodified); + if (!cmd) return -1; /* OOM */ +--- a/src/inf.h ++++ b/src/inf.h +@@ -47,7 +47,7 @@ + * + * @return 0 on success, -1 on error + */ +-extern int hub_handle_info(struct user* u, const struct adc_message* cmd); ++extern int hub_handle_info(struct uhub_user* u, const struct adc_message* cmd); + + + #endif /* HAVE_UHUB_INF_PARSER_H */ +--- a/src/message.c ++++ b/src/message.c +@@ -234,7 +234,7 @@ + } + + +-struct adc_message* adc_msg_parse_verify(struct user* u, const char* line, size_t length) ++struct adc_message* adc_msg_parse_verify(struct uhub_user* u, const char* line, size_t length) + { + struct adc_message* command = adc_msg_parse(line, length); + +--- a/src/message.h ++++ b/src/message.h +@@ -20,7 +20,7 @@ + #ifndef HAVE_UHUB_COMMAND_H + #define HAVE_UHUB_COMMAND_H + +-struct user; ++struct uhub_user; + + struct adc_message + { +@@ -70,7 +70,7 @@ + * The message is only considered valid if the user who sent it + * is the rightful origin of the message. + */ +-extern struct adc_message* adc_msg_parse_verify(struct user* u, const char* string, size_t length); ++extern struct adc_message* adc_msg_parse_verify(struct uhub_user* u, const char* string, size_t length); + + /** + * This will parse 'string' and return it as a adc_message struct, or +--- a/src/netevent.c ++++ b/src/netevent.c +@@ -23,7 +23,7 @@ + void net_on_read(int fd, short ev, void *arg) + { + static char buf[MAX_RECV_BUF]; +- struct user* user = (struct user*) arg; ++ struct uhub_user* user = (struct uhub_user*) arg; + char* pos; + size_t offset; + size_t buflen; +@@ -168,7 +168,7 @@ + + void net_on_write(int fd, short ev, void *arg) + { +- struct user* user = (struct user*) arg; ++ struct uhub_user* user = (struct uhub_user*) arg; + struct adc_message* msg; + int ret; + int length; +@@ -259,7 +259,7 @@ + void net_on_accept(int server_fd, short ev, void *arg) + { + struct hub_info* hub = (struct hub_info*) arg; +- struct user* user = 0; ++ struct uhub_user* user = 0; + struct ip_addr_encap ipaddr; + const char* addr; + struct timeval timeout = { TIMEOUT_CONNECTED, 0 }; +@@ -320,7 +320,7 @@ + { + static char buffer[1024] = {0,}; + // struct hub_info* hub = (struct hub_info*) arg; +- // struct user* user = 0; ++ // struct uhub_user* user = 0; + ssize_t size; + struct sockaddr_storage from; + socklen_t fromlen; +--- a/src/plugin.h ++++ b/src/plugin.h +@@ -19,12 +19,12 @@ + + typedef void (*plugin_event_startup)(struct hub*); + typedef void (*plugin_event_shutdown)(struct hub*); +-typedef void (*plugin_event_user_login)(struct hub*, struct user*); +-typedef void (*plugin_event_user_logout)(struct hub*, struct user*); ++typedef void (*plugin_event_user_login)(struct hub*, struct uhub_user*); ++typedef void (*plugin_event_user_logout)(struct hub*, struct uhub_user*); + typedef int (*plugin_event_connect)(struct hub*, struct ip_addr_encap); +-typedef void (*plugin_event_disconnect)(struct hub*, struct user*); +-typedef int (*plugin_event_message)(struct hub*, struct user*, struct adc_message*); +-typedef void (*plugin_event_support)(struct hub*, struct user*, int); ++typedef void (*plugin_event_disconnect)(struct hub*, struct uhub_user*); ++typedef int (*plugin_event_message)(struct hub*, struct uhub_user*, struct adc_message*); ++typedef void (*plugin_event_support)(struct hub*, struct uhub_user*, int); + + struct uhub_plugin + { +--- a/src/route.c ++++ b/src/route.c +@@ -20,9 +20,9 @@ + #include "uhub.h" + + +-int route_message(struct user* u, struct adc_message* msg) ++int route_message(struct uhub_user* u, struct adc_message* msg) + { +- struct user* target = NULL; ++ struct uhub_user* target = NULL; + + switch (msg->cache[0]) + { +@@ -59,7 +59,7 @@ + } + + +-static void queue_command(struct user* user, struct adc_message* msg__, int offset) ++static void queue_command(struct uhub_user* user, struct adc_message* msg__, int offset) + { + struct adc_message* msg = adc_msg_incref(msg__); + list_append(user->send_queue, msg); +@@ -97,7 +97,7 @@ + * -1 if send queue is overflowed + * 0 if soft send queue is overflowed (not implemented at the moment) + */ +-static int check_send_queue(struct user* user, struct adc_message* msg) ++static int check_send_queue(struct uhub_user* user, struct adc_message* msg) + { + if (user_flag_get(user, flag_user_list)) + return 1; +@@ -111,7 +111,7 @@ + return 1; + } + +-int route_to_user(struct user* user, struct adc_message* msg) ++int route_to_user(struct uhub_user* user, struct adc_message* msg) + { + int ret; + +@@ -174,11 +174,11 @@ + + int route_to_all(struct hub_info* hub, struct adc_message* command) /* iterate users */ + { +- struct user* user = (struct user*) list_get_first(hub->users->list); ++ struct uhub_user* user = (struct uhub_user*) list_get_first(hub->users->list); + while (user) + { + route_to_user(user, command); +- user = (struct user*) list_get_next(hub->users->list); ++ user = (struct uhub_user*) list_get_next(hub->users->list); + } + + return 0; +@@ -190,7 +190,7 @@ + int do_send; + char* tmp; + +- struct user* user = (struct user*) list_get_first(hub->users->list); ++ struct uhub_user* user = (struct uhub_user*) list_get_first(hub->users->list); + while (user) + { + if (user->feature_cast) +@@ -209,7 +209,7 @@ + } + + if (!do_send) { +- user = (struct user*) list_get_next(hub->users->list); ++ user = (struct uhub_user*) list_get_next(hub->users->list); + continue; + } + +@@ -229,13 +229,13 @@ + route_to_user(user, command); + } + } +- user = (struct user*) list_get_next(hub->users->list); ++ user = (struct uhub_user*) list_get_next(hub->users->list); + } + + return 0; + } + +-int route_info_message(struct user* u) ++int route_info_message(struct uhub_user* u) + { + if (!user_is_nat_override(u)) + { +@@ -245,12 +245,12 @@ + { + struct adc_message* cmd = adc_msg_copy(u->info); + const char* address = ip_convert_to_string(&u->ipaddr); +- struct user* user = 0; ++ struct uhub_user* user = 0; + + adc_msg_remove_named_argument(cmd, ADC_INF_FLAG_IPV4_ADDR); + adc_msg_add_named_argument(cmd, ADC_INF_FLAG_IPV4_ADDR, address); + +- user = (struct user*) list_get_first(u->hub->users->list); ++ user = (struct uhub_user*) list_get_first(u->hub->users->list); + while (user) + { + if (user_is_nat_override(user)) +@@ -258,7 +258,7 @@ + else + route_to_user(user, u->info); + +- user = (struct user*) list_get_next(u->hub->users->list); ++ user = (struct uhub_user*) list_get_next(u->hub->users->list); + } + adc_msg_free(cmd); + } +--- a/src/route.h ++++ b/src/route.h +@@ -23,12 +23,12 @@ + /** + * Route a message by sending it to it's final destination. + */ +-extern int route_message(struct user* u, struct adc_message* msg); ++extern int route_message(struct uhub_user* u, struct adc_message* msg); + + /** + * Transmit message directly to one user. + */ +-extern int route_to_user(struct user*, struct adc_message* command); ++extern int route_to_user(struct uhub_user*, struct adc_message* command); + + /** + * Broadcast message to all users. +@@ -45,7 +45,7 @@ + * This will ensure the correct IP is seen by other users + * in case nat override is in use. + */ +-extern int route_info_message(struct user* user); ++extern int route_info_message(struct uhub_user* user); + + + #endif /* HAVE_UHUB_ROUTE_H */ +--- a/src/sid.h ++++ b/src/sid.h +@@ -28,7 +28,7 @@ + + struct sid_map + { +- struct user* ptr; ++ struct uhub_user* ptr; + struct sid_map* next; + }; + +@@ -58,7 +58,7 @@ + + + extern void sid_initialize(struct sid_pool*); +-extern sid_t sid_alloc(struct sid_pool*, struct user*); ++extern sid_t sid_alloc(struct sid_pool*, struct uhub_user*); + extern void sid_free(struct sid_pool*, sid_t); + + +--- a/src/user.c ++++ b/src/user.c +@@ -19,13 +19,13 @@ + + #include "uhub.h" + +-struct user* user_create(struct hub_info* hub, int sd) ++struct uhub_user* user_create(struct hub_info* hub, int sd) + { +- struct user* user = NULL; ++ struct uhub_user* user = NULL; + + hub_log(log_trace, "user_create(), hub=%p, sd=%d", hub, sd); + +- user = (struct user*) hub_malloc_zero(sizeof(struct user)); ++ user = (struct uhub_user*) hub_malloc_zero(sizeof(struct uhub_user)); + + if (user == NULL) + return NULL; /* OOM */ +@@ -61,7 +61,7 @@ + adc_msg_free((struct adc_message*) ptr); + } + +-void user_destroy(struct user* user) ++void user_destroy(struct uhub_user* user) + { + hub_log(log_trace, "user_destroy(), user=%p", user); + +@@ -98,7 +98,7 @@ + hub_free(user); + } + +-void user_set_state(struct user* user, enum user_state state) ++void user_set_state(struct uhub_user* user, enum user_state state) + { + if ((user->state == state_cleanup && state != state_disconnected) || (user->state == state_disconnected)) + { +@@ -109,7 +109,7 @@ + user->state = state; + } + +-void user_set_info(struct user* user, struct adc_message* cmd) ++void user_set_info(struct uhub_user* user, struct adc_message* cmd) + { + adc_msg_free(user->info); + user->info = adc_msg_incref(cmd); +@@ -156,44 +156,44 @@ + } + } + +-void user_support_add(struct user* user, int fourcc) ++void user_support_add(struct uhub_user* user, int fourcc) + { + int feature_mask = convert_support_fourcc(fourcc); + user->flags |= feature_mask; + } + +-int user_flag_get(struct user* user, enum user_flags flag) ++int user_flag_get(struct uhub_user* user, enum user_flags flag) + { + return user->flags & flag; + } + +-void user_flag_set(struct user* user, enum user_flags flag) ++void user_flag_set(struct uhub_user* user, enum user_flags flag) + { + user->flags |= flag; + } + +-void user_flag_unset(struct user* user, enum user_flags flag) ++void user_flag_unset(struct uhub_user* user, enum user_flags flag) + { + user->flags &= ~flag; + } + +-void user_set_nat_override(struct user* user) ++void user_set_nat_override(struct uhub_user* user) + { + user_flag_set(user, flag_nat); + } + +-int user_is_nat_override(struct user* user) ++int user_is_nat_override(struct uhub_user* user) + { + return user_flag_get(user, flag_nat); + } + +-void user_support_remove(struct user* user, int fourcc) ++void user_support_remove(struct uhub_user* user, int fourcc) + { + int feature_mask = convert_support_fourcc(fourcc); + user->flags &= ~feature_mask; + } + +-void user_schedule_destroy(struct user* user) ++void user_schedule_destroy(struct uhub_user* user) + { + struct event_data post; + memset(&post, 0, sizeof(post)); +@@ -202,7 +202,7 @@ + event_queue_post(user->hub->queue, &post); + } + +-void user_disconnect(struct user* user, int reason) ++void user_disconnect(struct uhub_user* user, int reason) + { + struct event_data post; + int need_notify = 0; +@@ -242,7 +242,7 @@ + + } + +-int user_have_feature_cast_support(struct user* user, char feature[4]) ++int user_have_feature_cast_support(struct uhub_user* user, char feature[4]) + { + char* tmp = list_get_first(user->feature_cast); + while (tmp) +@@ -256,7 +256,7 @@ + return 0; + } + +-int user_set_feature_cast_support(struct user* u, char feature[4]) ++int user_set_feature_cast_support(struct uhub_user* u, char feature[4]) + { + if (!u->feature_cast) + { +@@ -272,7 +272,7 @@ + return 1; + } + +-void user_clear_feature_cast_support(struct user* u) ++void user_clear_feature_cast_support(struct uhub_user* u) + { + if (u->feature_cast) + { +@@ -282,21 +282,21 @@ + } + } + +-int user_is_logged_in(struct user* user) ++int user_is_logged_in(struct uhub_user* user) + { + if (user->state == state_normal) + return 1; + return 0; + } + +-int user_is_connecting(struct user* user) ++int user_is_connecting(struct uhub_user* user) + { + if (user->state == state_protocol || user->state == state_identify || user->state == state_verify) + return 1; + return 0; + } + +-int user_is_disconnecting(struct user* user) ++int user_is_disconnecting(struct uhub_user* user) + { + if (user->state == state_cleanup || user->state == state_disconnected) + return 1; +--- a/src/user.h ++++ b/src/user.h +@@ -73,7 +73,7 @@ + }; + + +-struct user_info ++struct uhub_user_info + { + sid_t sid; /** session ID */ + char cid[MAX_CID_LEN+1]; /** global client ID */ +@@ -85,7 +85,7 @@ + * as the number of bytes and files shared, and the number of hubs the + * user is connected to, etc. + */ +-struct user_counts ++struct uhub_user_counts + { + uint64_t shared_size; /** Shared size in bytes */ + size_t shared_files; /** The number of shared files */ +@@ -96,14 +96,14 @@ + size_t hub_count_total; /** The number of hubs connected to in total */ + }; + +-struct user ++struct uhub_user + { + int sd; /** socket descriptor */ + struct event* ev_read; /** libevent struct for read events */ + struct event* ev_write; /** libevent struct for write events */ + enum user_state state; /** see enum user_state */ + enum user_credentials credentials; /** see enum user_credentials */ +- struct user_info id; /** Contains nick name and CID */ ++ struct uhub_user_info id; /** Contains nick name and CID */ + int flags; /** see enum user_features */ + char user_agent[MAX_UA_LEN+1];/** User agent string */ + time_t tm_connected; /** time when user connected */ +@@ -120,7 +120,7 @@ + struct hub_info* hub; /** The hub instance this user belong to */ + int quit_reason; /** Quit reason (see user_quit_reason) */ + struct ip_addr_encap ipaddr; /** IP address of connected user */ +- struct user_counts limits; /** Data used for limitation */ ++ struct uhub_user_counts limits; /** Data used for limitation */ + #ifdef SSL_SUPPORT + SSL* ssl; /** SSL handle */ + #endif /* SSL_SUPPORT */ +@@ -137,19 +137,19 @@ + * @param sd socket descriptor associated with the user + * @return User object or NULL if not enough memory is available. + */ +-extern struct user* user_create(struct hub_info* hub, int sd); ++extern struct uhub_user* user_create(struct hub_info* hub, int sd); + + /** + * Delete a user. + * + * !WRONG! If the user is logged in a quit message is issued. + */ +-extern void user_destroy(struct user* user); ++extern void user_destroy(struct uhub_user* user); + + /** + * Will post a message that will delete the user later. + */ +-extern void user_schedule_destroy(struct user* user); ++extern void user_schedule_destroy(struct uhub_user* user); + + /** + * Disconnect a user. +@@ -165,36 +165,36 @@ + * @param user User to disconnect + * @param reason See enum user_quit_reason + */ +-extern void user_disconnect(struct user* user, int reason); ++extern void user_disconnect(struct uhub_user* user, int reason); + + /** + * This associates a INF message to the user. + * If the user already has a INF message associated, then this is + * released before setting the new one. + */ +-extern void user_set_info(struct user* user, struct adc_message* info); ++extern void user_set_info(struct uhub_user* user, struct adc_message* info); + + /** + * Specify a user's state. + * NOTE: DON'T, unless you know what you are doing. + */ +-extern void user_set_state(struct user* user, enum user_state); ++extern void user_set_state(struct uhub_user* user, enum user_state); + + /** + * Returns 1 if the user is in state state_normal, or 0 otherwise. + */ +-extern int user_is_logged_in(struct user* user); ++extern int user_is_logged_in(struct uhub_user* user); + + /** + * Returns 1 if the user is in state_protocol, state_identify or state_verify. + * Returns 0 otherwise. + */ +-extern int user_is_connecting(struct user* user); ++extern int user_is_connecting(struct uhub_user* user); + + /** + * Returns 1 only if the user is in state_cleanup or state_disconnected. + */ +-extern int user_is_disconnecting(struct user* user); ++extern int user_is_disconnecting(struct uhub_user* user); + + /** + * User supports the protocol extension as given in fourcc. +@@ -204,7 +204,7 @@ + * + * @see enum user_flags + */ +-extern void user_support_add(struct user* user, int fourcc); ++extern void user_support_add(struct uhub_user* user, int fourcc); + + /** + * User no longer supports the protocol extension as given in fourcc. +@@ -212,26 +212,26 @@ + * the hub. + * @see enum user_flags + */ +-extern void user_support_remove(struct user* user, int fourcc); ++extern void user_support_remove(struct uhub_user* user, int fourcc); + + /** + * Sets the nat override flag for a user, this allows users on the same + * subnet as a natted hub to spoof their IP in order to use active mode + * on a natted hub. + */ +-extern void user_set_nat_override(struct user* user); +-extern int user_is_nat_override(struct user* user); ++extern void user_set_nat_override(struct uhub_user* user); ++extern int user_is_nat_override(struct uhub_user* user); + + /** + * Set a flag. @see enum user_flags + */ +-extern void user_flag_set(struct user* user, enum user_flags flag); +-extern void user_flag_unset(struct user* user, enum user_flags flag); ++extern void user_flag_set(struct uhub_user* user, enum user_flags flag); ++extern void user_flag_unset(struct uhub_user* user, enum user_flags flag); + + /** + * Get a flag. @see enum user_flags + */ +-extern int user_flag_get(struct user* user, enum user_flags flag); ++extern int user_flag_get(struct uhub_user* user, enum user_flags flag); + + /** + * Check if a user supports 'feature' for feature casting (basis for 'Fxxx' messages) +@@ -241,7 +241,7 @@ + * @param feature a feature to lookup (example: 'TCP4' or 'UDP4') + * @return 1 if 'feature' supported, or 0 otherwise + */ +-extern int user_have_feature_cast_support(struct user* user, char feature[4]); ++extern int user_have_feature_cast_support(struct uhub_user* user, char feature[4]); + + /** + * Set feature cast support for feature. +@@ -249,12 +249,12 @@ + * @param feature a feature to lookup (example: 'TCP4' or 'UDP4') + * @return 1 if 'feature' supported, or 0 otherwise + */ +-extern int user_set_feature_cast_support(struct user* u, char feature[4]); ++extern int user_set_feature_cast_support(struct uhub_user* u, char feature[4]); + + /** + * Remove all feature cast support features. + */ +-extern void user_clear_feature_cast_support(struct user* u); ++extern void user_clear_feature_cast_support(struct uhub_user* u); + + + +--- a/src/usermanager.c ++++ b/src/usermanager.c +@@ -27,7 +27,7 @@ + { + if (ptr) + { +- struct user* u = (struct user*) ptr; ++ struct uhub_user* u = (struct uhub_user*) ptr; + + /* Mark the user as already being disconnected. + * This prevents the hub from trying to send +@@ -81,10 +81,10 @@ + + int user_manager_init(struct hub_info* hub) + { +- struct user_manager* users = NULL; ++ struct uhub_user_manager* users = NULL; + struct timeval timeout = { TIMEOUT_STATS, 0 }; + +- users = (struct user_manager*) hub_malloc_zero(sizeof(struct user_manager)); ++ users = (struct uhub_user_manager*) hub_malloc_zero(sizeof(struct uhub_user_manager)); + + users->list = list_create(); + users->free_sid = 1; +@@ -106,7 +106,7 @@ + + void user_manager_shutdown(struct hub_info* hub) + { +- struct user_manager* users = hub->users; ++ struct uhub_user_manager* users = hub->users; + event_del(&hub->ev_timer); + + list_clear(users->list, &clear_user_list_callback); +@@ -115,7 +115,7 @@ + } + + +-void user_manager_add(struct user* user) ++void user_manager_add(struct uhub_user* user) + { + list_append(user->hub->users->list, user); + user->hub->users->count++; +@@ -125,7 +125,7 @@ + user->hub->users->shared_files += user->limits.shared_files; + } + +-void user_manager_remove(struct user* user) ++void user_manager_remove(struct uhub_user* user) + { + list_remove(user->hub->users->list, user); + user->hub->users->count--; +@@ -135,50 +135,50 @@ + } + + +-struct user* get_user_by_sid(struct hub_info* hub, sid_t sid) ++struct uhub_user* get_user_by_sid(struct hub_info* hub, sid_t sid) + { +- struct user* user = (struct user*) list_get_first(hub->users->list); /* iterate users */ ++ struct uhub_user* user = (struct uhub_user*) list_get_first(hub->users->list); /* iterate users */ + while (user) + { + if (user->id.sid == sid) + return user; +- user = (struct user*) list_get_next(hub->users->list); ++ user = (struct uhub_user*) list_get_next(hub->users->list); + } + return NULL; + } + + +-struct user* get_user_by_cid(struct hub_info* hub, const char* cid) ++struct uhub_user* get_user_by_cid(struct hub_info* hub, const char* cid) + { +- struct user* user = (struct user*) list_get_first(hub->users->list); /* iterate users - only on incoming INF msg */ ++ struct uhub_user* user = (struct uhub_user*) list_get_first(hub->users->list); /* iterate users - only on incoming INF msg */ + while (user) + { + if (strcmp(user->id.cid, cid) == 0) + return user; +- user = (struct user*) list_get_next(hub->users->list); ++ user = (struct uhub_user*) list_get_next(hub->users->list); + } + return NULL; + } + + +-struct user* get_user_by_nick(struct hub_info* hub, const char* nick) ++struct uhub_user* get_user_by_nick(struct hub_info* hub, const char* nick) + { +- struct user* user = (struct user*) list_get_first(hub->users->list); /* iterate users - only on incoming INF msg */ ++ struct uhub_user* user = (struct uhub_user*) list_get_first(hub->users->list); /* iterate users - only on incoming INF msg */ + while (user) + { + if (strcmp(user->id.nick, nick) == 0) + return user; +- user = (struct user*) list_get_next(hub->users->list); ++ user = (struct uhub_user*) list_get_next(hub->users->list); + } + return NULL; + } + + +-int send_user_list(struct user* target) ++int send_user_list(struct uhub_user* target) + { + int ret = 1; + user_flag_set(target, flag_user_list); +- struct user* user = (struct user*) list_get_first(target->hub->users->list); /* iterate users - only on INF or PAS msg */ ++ struct uhub_user* user = (struct uhub_user*) list_get_first(target->hub->users->list); /* iterate users - only on INF or PAS msg */ + while (user) + { + if (user_is_logged_in(user)) +@@ -187,7 +187,7 @@ + if (!ret) + break; + } +- user = (struct user*) list_get_next(user->hub->users->list); ++ user = (struct uhub_user*) list_get_next(user->hub->users->list); + } + + if (!target->send_queue_size) +@@ -198,7 +198,7 @@ + } + + +-void send_quit_message(struct user* leaving) ++void send_quit_message(struct uhub_user* leaving) + { + struct adc_message* command = adc_msg_construct(ADC_CMD_IQUI, 6); + adc_msg_add_argument(command, (const char*) sid_to_string(leaving->id.sid)); +@@ -216,8 +216,8 @@ + sid_t user_manager_get_free_sid(struct hub_info* hub) + { + #if 0 +- struct user* user; +- user = (struct user*) list_get_first(hub->users->list); /* iterate normal users */ ++ struct uhub_user* user; ++ user = (struct uhub_user*) list_get_first(hub->users->list); /* iterate normal users */ + while (user) + { + if (user->sid == hub->users->free_sid) +@@ -226,7 +226,7 @@ + if (hub->users->free_sid >= SID_MAX) hub->users->free_sid = 1; + break; + } +- user = (struct user*) list_get_next(hub->users->list); ++ user = (struct uhub_user*) list_get_next(hub->users->list); + } + #endif + return hub->users->free_sid++; +--- a/src/usermanager.h ++++ b/src/usermanager.h +@@ -20,7 +20,7 @@ + #ifndef HAVE_UHUB_USER_MANAGER_H + #define HAVE_UHUB_USER_MANAGER_H + +-struct user_manager ++struct uhub_user_manager + { + size_t count; /**<< "Number of all fully connected and logged in users" */ + size_t count_peak; /**<< "Peak number of users" */ +@@ -51,14 +51,14 @@ + /** + * Add a new user to the user manager. + */ +-extern void user_manager_add(struct user* user); ++extern void user_manager_add(struct uhub_user* user); + + /** + * Remove a user from the user manager. + * This user is connected, and will be moved to the leaving queue, pending + * all messages in the message queue, and resource cleanup. + */ +-extern void user_manager_remove(struct user* user); ++extern void user_manager_remove(struct uhub_user* user); + + /** + * Returns a free sid for a new user. +@@ -70,19 +70,19 @@ + * NOTE: This will only search connected users. + * @return a user if found, or NULL if not found + */ +-extern struct user* get_user_by_sid(struct hub_info* hub, sid_t sid); ++extern struct uhub_user* get_user_by_sid(struct hub_info* hub, sid_t sid); + + /** + * Lookup a user based on the client ID (cid). + * @return a user if found, or NULL if not found + */ +-extern struct user* get_user_by_cid(struct hub_info* hub, const char* cid); ++extern struct uhub_user* get_user_by_cid(struct hub_info* hub, const char* cid); + + /** + * Lookup a user based on the nick name. + * @return a user if found, or NULL if not found + */ +-extern struct user* get_user_by_nick(struct hub_info* hub, const char* nick); ++extern struct uhub_user* get_user_by_nick(struct hub_info* hub, const char* nick); + + /** + * Send the user list of connected clients to 'user'. +@@ -90,13 +90,13 @@ + * + * @return 1 if sending the user list succeeded, 0 otherwise. + */ +-extern int send_user_list(struct user* user); ++extern int send_user_list(struct uhub_user* user); + + /** + * Send a quit message to all connected users when 'user' is + * leaving the hub (for whatever reason). + */ +-extern void send_quit_message(struct user* user); ++extern void send_quit_message(struct uhub_user* user); + + + #endif /* HAVE_UHUB_USER_MANAGER_H */ diff --git a/net/ulogd/Makefile b/net/ulogd/Makefile new file mode 100644 index 0000000..ddfdc1c --- /dev/null +++ b/net/ulogd/Makefile @@ -0,0 +1,146 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ulogd +PKG_VERSION:=1.24 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/ulogd/ \ + ftp://ftp.be.netfilter.org/pub/netfilter/ulogd/ \ + ftp://ftp.de.netfilter.org/pub/netfilter/ulogd/ \ + ftp://ftp.no.netfilter.org/pub/netfilter/ulogd/ +PKG_MD5SUM:=05b4ed2926b9a22aaeaf642917bbf8ff + +define Package/ulogd/Default + SECTION:=net + CATEGORY:=Network + URL:=http://www.netfilter.org/projects/ulogd/index.html +endef + +define Package/ulogd + $(call Package/ulogd/Default) + DEPENDS:=+iptables + TITLE:=Netfilter userspace logging daemon + MENU:=1 +endef + +define Package/ulogd/conffiles +/etc/default/ulogd +/etc/ulogd.conf +endef + +define Package/ulogd-mod-mysql + $(call Package/ulogd/Default) + DEPENDS:=ulogd +libmysqlclient + TITLE:=Output plugin for logging to a MySQL database +endef + +define Package/ulogd-mod-pcap + $(call Package/ulogd/Default) + DEPENDS:=ulogd +libpcap + TITLE:=Output plugin for logging in pcap format +endef + +define Package/ulogd-mod-pgsql + $(call Package/ulogd/Default) + DEPENDS:=ulogd +libpq + TITLE:=Output plugin for logging to a PostgreSQL database +endef + +define Package/ulogd-mod-sqlite + $(call Package/ulogd/Default) + DEPENDS:=ulogd +libsqlite3 + TITLE:=Output plugin for logging to an SQLite database +endef + +define Package/ulogd-mod-extra + $(call Package/ulogd/Default) + DEPENDS:=ulogd + TITLE:=Extra plugins +endef + +define Package/ulogd-mod-extra/description + This package contains the LOCAL, LOGEMU, OPRINT, PWSNIFF and SYSLOG plugins. +endef + +include $(INCLUDE_DIR)/package.mk + +ifneq ($(Package/ulogd-mod-mysql),) + ULOGD_MYSQL_OPTION:= --with-mysql="$(STAGING_DIR)/usr" +endif + +ifneq ($(Package/ulogd-mod-pcap),) + ULOGD_PCAP_HEADER:=yes +else + ULOGD_PCAP_HEADER:=no +endif + +ifneq ($(Package/ulogd-mod-pgsql),) + ULOGD_PGSQL_OPTION:= --with-pgsql="$(STAGING_DIR)/usr" +endif + +ifneq ($(Package/ulogd-mod-sqlite),) + ULOGD_SQLITE_OPTION:= --with-sqlite3="$(STAGING_DIR)/usr" +endif + +define Build/Configure + $(call Build/Configure/Default, \ + $(ULOGD_MYSQL_OPTION) \ + $(ULOGD_PGSQL_OPTION) \ + $(ULOGD_SQLITE_OPTION) \ + , \ + ac_cv_header_pcap_h=$(ULOGD_PCAP_HEADER) \ + ) + $(SED) 's/-lgcc_s//g' $(PKG_BUILD_DIR)/Rules.make +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + CFLAGS="$(TARGET_CFLAGS) \ + -Iinclude \ + -I$(PKG_BUILD_DIR)/include/ulogd \ + -I$(PKG_BUILD_DIR)/include \ + -I$(PKG_BUILD_DIR)/libipulog/include \ + -Wl,--export-dynamic \ + $(TARGET_CPPFLAGS)" \ + all install +endef + +define Package/ulogd/install + $(INSTALL_DIR) $(1)/etc + $(CP) $(PKG_INSTALL_DIR)/etc/ulogd.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ulogd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/ulogd + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_BASE.so $(1)/usr/lib/ulogd/ + $(INSTALL_DIR) $(1)/etc/default + $(INSTALL_DATA) ./files/ulogd.default $(1)/etc/default/ulogd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/ulogd.init $(1)/etc/init.d/ulogd +endef + +define BuildPlugin + define Package/$(1)/install + $(INSTALL_DIR) $$(1)/usr/lib/ulogd + for m in $(2); do \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_$$$$$$$${m}.so $$(1)/usr/lib/ulogd/ ; \ + done + endef + + $$(eval $$(call BuildPackage,$(1))) +endef + +$(eval $(call BuildPackage,ulogd)) +$(eval $(call BuildPlugin,ulogd-mod-mysql,MYSQL)) +$(eval $(call BuildPlugin,ulogd-mod-pcap,PCAP)) +$(eval $(call BuildPlugin,ulogd-mod-pgsql,PGSQL)) +$(eval $(call BuildPlugin,ulogd-mod-sqlite,SQLITE3)) +$(eval $(call BuildPlugin,ulogd-mod-extra,LOCAL LOGEMU OPRINT PWSNIFF SYSLOG)) diff --git a/net/ulogd/files/ulogd.default b/net/ulogd/files/ulogd.default new file mode 100644 index 0000000..86bf444 --- /dev/null +++ b/net/ulogd/files/ulogd.default @@ -0,0 +1 @@ +OPTIONS="-d" \ No newline at end of file diff --git a/net/ulogd/files/ulogd.init b/net/ulogd/files/ulogd.init new file mode 100644 index 0000000..aef82e7 --- /dev/null +++ b/net/ulogd/files/ulogd.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=ulogd +DEFAULT=/etc/default/$BIN +LOG_D=/var/log + +start() { + [ -f $DEFAULT ] && . $DEFAULT + $BIN $OPTIONS +} + +stop() { + killall $BIN +} diff --git a/net/ulogd/patches/001-pcap_flags.patch b/net/ulogd/patches/001-pcap_flags.patch new file mode 100644 index 0000000..c97d879 --- /dev/null +++ b/net/ulogd/patches/001-pcap_flags.patch @@ -0,0 +1,12 @@ +diff -urN ulogd-1.23/pcap/Makefile.in ulogd-1.23.new/pcap/Makefile.in +--- ulogd-1.23/pcap/Makefile.in 2004-03-23 23:36:04.000000000 +0100 ++++ ulogd-1.23.new/pcap/Makefile.in 2006-04-19 11:30:45.000000000 +0200 +@@ -14,7 +14,7 @@ + distrib: + + $(SHARED_LIBS): %.so: %_sh.o +- $(LD) -shared -o $@ $< -lc -lpcap ++ $(LD) -shared -o $@ $< @LDFLAGS@ -lc -lpcap + + %_sh.o: %.c + $(CC) $(SH_CFLAGS) -o $@ -c $< diff --git a/net/ulogd/patches/002-inc.patch b/net/ulogd/patches/002-inc.patch new file mode 100644 index 0000000..b472112 --- /dev/null +++ b/net/ulogd/patches/002-inc.patch @@ -0,0 +1,24 @@ +diff -ruN ulogd-1.23-old/Rules.make.in ulogd-1.23-new/Rules.make.in +--- ulogd-1.23-old/Rules.make.in 2005-02-19 22:32:40.000000000 +0100 ++++ ulogd-1.23-new/Rules.make.in 2005-05-27 07:45:18.000000000 +0200 +@@ -22,7 +22,7 @@ + CFLAGS+=-DULOGD_CONFIGFILE=\"$(ULOGD_CONFIGFILE)\" + # doesn't work for subdirs + #CFLAGS+=$(INCIPULOG) $(INCCONFFILE) +-CFLAGS+=-I/lib/modules/`uname -r`/build/include ++#CFLAGS+=-I/lib/modules/`uname -r`/build/include + #CFLAGS+=@DEFS@ + #CFLAGS+=-g -DDEBUG -DDEBUG_MYSQL -DDEBUG_PGSQL + +diff -ruN ulogd-1.23-old/libipulog/Makefile.in ulogd-1.23-new/libipulog/Makefile.in +--- ulogd-1.23-old/libipulog/Makefile.in 2004-03-23 23:36:06.000000000 +0100 ++++ ulogd-1.23-new/libipulog/Makefile.in 2005-05-27 07:44:21.000000000 +0200 +@@ -1,7 +1,7 @@ + # + + include @top_srcdir@/Rules.make +-CFLAGS+=-Iinclude -I/usr/src/linux/include ++CFLAGS+=-Iinclude + + libipulog.a: libipulog.o + $(LD) -i $< -o $@ diff --git a/net/ulogd/patches/003-fix-bad-rpath.patch b/net/ulogd/patches/003-fix-bad-rpath.patch new file mode 100644 index 0000000..0a2e646 --- /dev/null +++ b/net/ulogd/patches/003-fix-bad-rpath.patch @@ -0,0 +1,33 @@ +--- a/configure ++++ b/configure +@@ -1728,7 +1728,7 @@ else + EOF + + MYSQLINCLUDES=`$d/mysql_config --include` +- MYSQLLIBS=`$d/mysql_config --libs` ++ MYSQLLIBS=`$d/mysql_config --libs | sed 's/-rdynamic//'` + + DATABASE_DIR="${DATABASE_DIR} mysql" + +--- a/configure.in ++++ b/configure.in +@@ -60,7 +60,7 @@ then + else + AC_DEFINE(HAVE_MYSQL) + MYSQLINCLUDES=`$d/mysql_config --include` +- MYSQLLIBS=`$d/mysql_config --libs` ++ MYSQLLIBS=`$d/mysql_config --libs | $(SED) 's/-rdynamic//'` + + DATABASE_DIR="${DATABASE_DIR} mysql" + +--- a/Makefile.in ++++ b/Makefile.in +@@ -63,7 +63,7 @@ recurse: + @for d in $(SUBDIRS); do if ! make -C $$d; then exit 1; fi; done + + ulogd: ulogd.c $(LIBIPULOG) include/ulogd/ulogd.h conffile/conffile.o $(LIBIPULOG)/libipulog.a ulogd.conf +- $(CC) $(CFLAGS) -rdynamic $< conffile/conffile.o $(LIBIPULOG)/libipulog.a -o $@ $(LIBS) ++ $(CC) $(CFLAGS) $< conffile/conffile.o $(LIBIPULOG)/libipulog.a -o $@ $(LIBS) + + edit = sed -e 's,@libdir\@,$(ULOGD_LIB_PATH),g' + diff --git a/net/umurmur/Makefile b/net/umurmur/Makefile new file mode 100644 index 0000000..8c61ba2 --- /dev/null +++ b/net/umurmur/Makefile @@ -0,0 +1,95 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=umurmur +PKG_VERSION:=0.2.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://umurmur.googlecode.com/files/ +PKG_MD5SUM:=06dc224be5160e172574c9248682140b + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/umurmur/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Instant Messaging + TITLE:=uMurmur + DEPENDS:=+libconfig + URL:=http://code.google.com/p/umurmur + MAINTAINER:=Martin Johansson +endef + +define Package/umurmur/Default/description + Minimalistic Mumble server daemon. +endef + +define Package/umurmur-openssl + $(call Package/umurmur/Default) + TITLE+= (with OpenSSL support) + DEPENDS+= +libopenssl + VARIANT:=openssl +endef + +define Package/umurmur-openssl/description + $(call Package/umurmur/Default/description) + Uses OpenSSL library for SSL and crypto. +endef + +define Package/umurmur-polarssl + $(call Package/umurmur/Default) + TITLE+= (with PolarSSL support) + DEPENDS+= +libpolarssl + VARIANT:=polarssl +endef + +define Package/umurmur-polarssl/description + $(call Package/umurmur/Default/description) + Uses the PolarSSL library for SSL and crypto. +endef + +define Build/Compile + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + $(MAKE) -C $(PKG_BUILD_DIR)/src all +endef + +define Package/umurmur-openssl/conffiles +/etc/umurmur.conf +endef + +Package/umurmur-polarssl/conffiles = $(Package/umurmur-openssl/conffiles) + +define Package/umurmur-openssl/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/umurmurd $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwrt/files/umurmur.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/files/umurmur.init $(1)/etc/init.d/umurmur + $(INSTALL_DIR) $(1)/etc/umurmur +endef + +Package/umurmur-polarssl/install = $(Package/umurmur-openssl/install) + +ifeq ($(BUILD_VARIANT),openssl) + TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include + TARGET_LDFLAGS += -lcrypto -lssl +endif + +ifeq ($(BUILD_VARIANT),polarssl) + TARGET_CFLAGS += -DUSE_POLARSSL -I$(STAGING_DIR)/usr/include + TARGET_LDFLAGS += -lpolarssl +endif + +$(eval $(call BuildPackage,umurmur-openssl)) +$(eval $(call BuildPackage,umurmur-polarssl)) diff --git a/net/unbound/Makefile b/net/unbound/Makefile new file mode 100644 index 0000000..da95f22 --- /dev/null +++ b/net/unbound/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2010-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=unbound +PKG_VERSION:=1.4.5 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.unbound.net/downloads +PKG_MD5SUM:=f1f6c97b90b15ca503a80b888c311d6c + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_LIBTOOL_PATHS:= ./libtool ./ldns-src/libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/unbound + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + TITLE:=A validating, recursive, and caching DNS resolver + URL:=http://www.unbound.net/ + DEPENDS:=+libldns +libopenssl +endef + +CONFIGURE_ARGS += \ + --with-ldns="$(STAGING_DIR)/usr" \ + --with-ssl="$(STAGING_DIR)/usr" \ + --without-pthreads \ + +define Package/unbound/conffiles +/etc/unbound/unbound.conf +endef + +define Package/unbound/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* \ + $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) \ + $(PKG_INSTALL_DIR)/usr/sbin/unbound \ + $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \ + $(PKG_INSTALL_DIR)/usr/sbin/unbound-control \ + $(PKG_INSTALL_DIR)/usr/sbin/unbound-host \ + $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/unbound + $(INSTALL_CONF) ./files/unbound.conf $(1)/etc/unbound/ + $(INSTALL_CONF) ./files/root.autokey $(1)/etc/unbound/ + $(INSTALL_CONF) ./files/named.cache $(1)/etc/unbound/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/unbound.init $(1)/etc/init.d/unbound +endef + +$(eval $(call BuildPackage,unbound)) + diff --git a/net/unbound/files/named.cache b/net/unbound/files/named.cache new file mode 100644 index 0000000..d081faa --- /dev/null +++ b/net/unbound/files/named.cache @@ -0,0 +1,87 @@ +; This file holds the information on root name servers needed to +; initialize cache of Internet domain name servers +; (e.g. reference this file in the "cache . " +; configuration file of BIND domain name servers). +; +; This file is made available by InterNIC +; under anonymous FTP as +; file /domain/named.cache +; on server FTP.INTERNIC.NET +; -OR- RS.INTERNIC.NET +; +; last update: Jun 17, 2010 +; related version of root zone: 2010061700 +; +; formerly NS.INTERNIC.NET +; +. 3600000 IN NS A.ROOT-SERVERS.NET. +A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 +A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:BA3E::2:30 +; +; FORMERLY NS1.ISI.EDU +; +. 3600000 NS B.ROOT-SERVERS.NET. +B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201 +; +; FORMERLY C.PSI.NET +; +. 3600000 NS C.ROOT-SERVERS.NET. +C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12 +; +; FORMERLY TERP.UMD.EDU +; +. 3600000 NS D.ROOT-SERVERS.NET. +D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90 +; +; FORMERLY NS.NASA.GOV +; +. 3600000 NS E.ROOT-SERVERS.NET. +E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10 +; +; FORMERLY NS.ISC.ORG +; +. 3600000 NS F.ROOT-SERVERS.NET. +F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241 +F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2F::F +; +; FORMERLY NS.NIC.DDN.MIL +; +. 3600000 NS G.ROOT-SERVERS.NET. +G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4 +; +; FORMERLY AOS.ARL.ARMY.MIL +; +. 3600000 NS H.ROOT-SERVERS.NET. +H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53 +H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803F:235 +; +; FORMERLY NIC.NORDU.NET +; +. 3600000 NS I.ROOT-SERVERS.NET. +I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17 +I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7FE::53 +; +; OPERATED BY VERISIGN, INC. +; +. 3600000 NS J.ROOT-SERVERS.NET. +J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30 +J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:C27::2:30 +; +; OPERATED BY RIPE NCC +; +. 3600000 NS K.ROOT-SERVERS.NET. +K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129 +K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7FD::1 +; +; OPERATED BY ICANN +; +. 3600000 NS L.ROOT-SERVERS.NET. +L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42 +L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:3::42 +; +; OPERATED BY WIDE +; +. 3600000 NS M.ROOT-SERVERS.NET. +M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33 +M.ROOT-SERVERS.NET. 3600000 AAAA 2001:DC3::35 +; End of File diff --git a/net/unbound/files/root.autokey b/net/unbound/files/root.autokey new file mode 100644 index 0000000..2ad6641 --- /dev/null +++ b/net/unbound/files/root.autokey @@ -0,0 +1 @@ +. IN DS 19036 8 2 49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5 diff --git a/net/unbound/files/unbound.conf b/net/unbound/files/unbound.conf new file mode 100644 index 0000000..3ea940c --- /dev/null +++ b/net/unbound/files/unbound.conf @@ -0,0 +1,83 @@ +server: + verbosity: 1 + + interface: ::0 + interface: 0.0.0.0 + + # the amount of memory to use for the RRset cache. + # plain value in bytes or you can append k, m or G. default is "4Mb". + rrset-cache-size: 1m + + # the number of slabs to use for the RRset cache. + # the number of slabs must be a power of 2. + # more slabs reduce lock contention, but fragment memory usage. + rrset-cache-slabs: 2 + + # control which clients are allowed to make (recursive) queries + # to this server. Specify classless netblocks with /size and action. + # By default everything is refused, except for localhost. + # Choose deny (drop message), refuse (polite error reply), + # allow (recursive ok), allow_snoop (recursive and nonrecursive ok) + # access-control: 0.0.0.0/0 refuse + # access-control: 127.0.0.0/8 allow + # access-control: ::0/0 refuse + # access-control: ::1 allow + # access-control: ::ffff:127.0.0.1 allow + access-control: 0.0.0.0/0 allow + access-control: ::0/0 allow + + + # if given, user privileges are dropped (after binding port), + # and the given username is assumed. Default is user "unbound". + # If you give "" no privileges are dropped. + # username: "unbound" + username: "" + + # the working directory. The relative files in this config are + # relative to this directory. If you give "" the working directory + # is not changed. + directory: "/etc/unbound" + + # the log file, "" means log to stderr. + # Use of this option sets use-syslog to "no". + # logfile: "" + + # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to + # log to, with identity "unbound". If yes, it overrides the logfile. + use-syslog: yes + + # print UTC timestamp in ascii to logfile, default is epoch in seconds. + # log-time-ascii: no + + # the pid file. Can be an absolute path outside of chroot/work dir. + pidfile: "/var/run/unbound.pid" + + # file to read root hints from. + # get one from ftp://FTP.INTERNIC.NET/domain/named.cache + root-hints: "named.cache" + + + # Root zone trust anchor key + # Will be autoupdated by unbound in case of key change + auto-trust-anchor-file: "root.autokey" + + # If you want to also do DLV validation (RFC5074), + # download http://ftp.isc.org/www/dlv/dlv.isc.org.key + # and uncomment following line: + #dlv-anchor-file: "dlv.isc.org.key" + + # You can also do ITAR validation (https://itar.iana.org) + # To download and update anchors.mf file, use update-itar.sh + # from page http://www.unbound.net/documentation/howto_itar.html + #trust-anchor-file: "anchors.mf" + + + # If you want to forward requests to another recursive DNS server + # uncomment this. Please note that many DNS recursors do strip + # DNSSEC data, rendering unbound server unusable. + # forward-zone: + # name: "." + # forward-addr: 8.8.8.8 + # forward-addr: 8.8.4.4 + + diff --git a/net/unbound/files/unbound.init b/net/unbound/files/unbound.init new file mode 100755 index 0000000..4e700e4 --- /dev/null +++ b/net/unbound/files/unbound.init @@ -0,0 +1,14 @@ +#!/bin/sh /etc/rc.common +#Copyright (C) 2010 Ondrej Caletka +START=61 + +start () { + unbound +} + +stop () { + PIDFILE='/var/run/unbound.pid' + if [ -f $PIDFILE ] ; then + kill $(cat $PIDFILE) + fi +} diff --git a/net/unfs3/Makefile b/net/unfs3/Makefile new file mode 100644 index 0000000..a0ab326 --- /dev/null +++ b/net/unfs3/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=unfs3 +PKG_VERSION:=0.9.22 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=ddf679a5d4d80096a59f3affc64f16e5 + +PKG_BUILD_PARALLEL:=0 + +include $(INCLUDE_DIR)/package.mk + +define Package/unfs3 + SECTION:=net + CATEGORY:=Network + SUBMENU:=Filesystem + DEPENDS:=+portmap $(LIBRPC_DEPENDS) + TITLE:=User-space NFSv3 Server + URL:=http://unfs3.sourceforge.net/ +endef + +define Package/unfs3/description + UNFS3 is a user-space implementation of the NFSv3 server + specification. It provides a daemon for the MOUNT and NFS + protocols, which are used by NFS clients for accessing files + on the server. +endef + +TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include +TARGET_LDFLAGS += $(LIBRPC) + +define Package/unfs3/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/$(PKG_NAME).exports $(1)/etc/exports + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/unfsd $(1)/usr/sbin +endef + +$(eval $(call BuildPackage,unfs3)) diff --git a/net/unfs3/files/unfs3.exports b/net/unfs3/files/unfs3.exports new file mode 100644 index 0000000..a730f77 --- /dev/null +++ b/net/unfs3/files/unfs3.exports @@ -0,0 +1 @@ +/mnt (ro,all_squash,insecure) diff --git a/net/unfs3/files/unfs3.init b/net/unfs3/files/unfs3.init new file mode 100644 index 0000000..204c4fd --- /dev/null +++ b/net/unfs3/files/unfs3.init @@ -0,0 +1,17 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start() { + /usr/sbin/unfsd +} + +stop() { + killall unfsd +} + +restart() { + stop + sleep 1 + start +} diff --git a/net/unfs3/patches/100-no_lfl.patch b/net/unfs3/patches/100-no_lfl.patch new file mode 100644 index 0000000..c4a971f --- /dev/null +++ b/net/unfs3/patches/100-no_lfl.patch @@ -0,0 +1,43 @@ +--- a/Config/lex.yy.c ++++ b/Config/lex.yy.c +@@ -445,9 +445,15 @@ static void copy_text(const char *from, + + #ifndef YY_SKIP_YYWRAP + #ifdef __cplusplus +-extern "C" int yywrap YY_PROTO(( void )); +-#else +-extern int yywrap YY_PROTO(( void )); ++/* extern "C" int yywrap YY_PROTO(( void )); */ ++int yywrap (void ) { ++ return 1; ++} ++#else ++/* extern int yywrap YY_PROTO(( void )); */ ++int yywrap (void ) { ++ return 1; ++} + #endif + #endif + +--- a/Makefile.in ++++ b/Makefile.in +@@ -12,7 +12,7 @@ OBJS = attr.o daemon.o error.o fd_cache. + md5.o mount.o nfs.o password.o readdir.o user.o xdr.o winsupport.o + CONFOBJ = Config/lib.a + EXTRAOBJ = @EXTRAOBJ@ +-LDFLAGS = @LDFLAGS@ @LIBS@ @LEXLIB@ ++LDFLAGS = @LDFLAGS@ @LIBS@ + EXEEXT = @EXEEXT@ + + prefix = @prefix@ +--- a/configure ++++ b/configure +@@ -2604,7 +2604,7 @@ else + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' +- for ac_lib in '' -lfl -ll; do ++ for ac_lib in '' -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF + `cat $LEX_OUTPUT_ROOT.c` diff --git a/net/uob-nomad/Makefile b/net/uob-nomad/Makefile new file mode 100644 index 0000000..ad02597 --- /dev/null +++ b/net/uob-nomad/Makefile @@ -0,0 +1,55 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=uob-nomad +PKG_VERSION:=0.11 +PKG_RELEASE:=1 +PKG_MD5SUM:=9c7445cefaf8d6160017aef606f2e558 + +PKG_SOURCE_URL:=http://www.comnets.uni-bremen.de/~mab/openwrt/source/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz + +PKG_BUILD_PARALLEL:=0 + +include $(INCLUDE_DIR)/package.mk + +define Package/uob-nomad + SECTION:=net + CATEGORY:=Network + DEPENDS:=+kmod-iptunnel4 +libpthread + TITLE:=UoB Nomad + URL:=http://www.comnets.uni-bremen.de/~mab/openwrt/source/ +endef + +define Package/uob-nomad/description +This is an implementation of NOMADv4 (Filters for + Mobile IP, IETF Draft + draft-mobileip-nomad-filters-05.txt) for Linux, + based on the Sun Labs Mobile IP software. It is + released under the Sun Public License (SPL). + + This version (0.11) has been modified to provide + status information to the UoB-NOMAD-GUI (ver 0.1). +endef + +define Build/Compile +$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/Agent mipagent) +$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/Client/net-tools clean) +$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/Client/net-tools/lib clean) +$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/Client/net-tools all) +$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/Client mipmn) +endef + +define Package/uob-nomad/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/etc/ + $(CP) $(PKG_BUILD_DIR)/Agent/mipagent $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/Client/mipmn $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/conf/mip{agent,mn,mn-filters}.conf $(1)/etc/ +endef + +$(eval $(call BuildPackage,uob-nomad)) diff --git a/net/uob-nomad/patches/001-inet_sr.patch b/net/uob-nomad/patches/001-inet_sr.patch new file mode 100644 index 0000000..21c940b --- /dev/null +++ b/net/uob-nomad/patches/001-inet_sr.patch @@ -0,0 +1,11 @@ +diff -urN uob-nomad-0.11/Client/net-tools/lib/inet_sr.c uob-nomad-0.11.new/Client/net-tools/lib/inet_sr.c +--- uob-nomad-0.11/Client/net-tools/lib/inet_sr.c 2003-09-05 10:21:52.000000000 +0200 ++++ uob-nomad-0.11.new/Client/net-tools/lib/inet_sr.c 2006-10-09 20:36:50.000000000 +0200 +@@ -105,6 +105,7 @@ + case 2: + isnet = 0; break; + default: ++ break; + } + + /* Fill in the other fields. */ diff --git a/net/uob-nomad/patches/002-hostname.patch b/net/uob-nomad/patches/002-hostname.patch new file mode 100644 index 0000000..7882c15 --- /dev/null +++ b/net/uob-nomad/patches/002-hostname.patch @@ -0,0 +1,34 @@ +--- uob-nomad-0.11/Client/net-tools/hostname.c 2003-09-05 10:21:54.000000000 +0200 ++++ uob-nomad-0.11.new/Client/net-tools/hostname.c 2006-10-09 20:38:25.000000000 +0200 +@@ -77,6 +77,7 @@ + fprintf(stderr, _("%s: name too long\n"), program_name); + break; + default: ++ break; + } + exit(1); + } +@@ -97,6 +98,7 @@ + fprintf(stderr, _("%s: name too long\n"), program_name); + break; + default: ++ break; + } + exit(1); + }; +@@ -116,6 +118,7 @@ + fprintf(stderr, _("%s: name too long\n"), program_name); + break; + default: ++ break; + } + exit(1); + }; +@@ -173,6 +176,7 @@ + printf("%s\n", hp->h_name); + break; + default: ++ break; + } + } + diff --git a/net/uob-nomad/patches/003-conf.patch b/net/uob-nomad/patches/003-conf.patch new file mode 100644 index 0000000..7927a05 --- /dev/null +++ b/net/uob-nomad/patches/003-conf.patch @@ -0,0 +1,21 @@ +diff -ruN package/uobnomad.orig/patches/003-conf.patch package/uobnomad/patches/003-conf.patch +--- package/uobnomad.orig/patches/003-conf.patch 1970-01-01 01:00:00.000000000 +0100 ++++ package/uobnomad/patches/003-conf.patch 2006-05-08 16:54:36.000000000 +0200 +@@ -0,0 +1,17 @@ ++--- uob-nomad-0.11-orig/Client/mobile.h 2003-10-20 16:07:09.000000000 +0200 +++++ uob-nomad-0.11/Client/mobile.h 2006-05-08 16:53:31.000000000 +0200 ++@@ -83,10 +83,10 @@ ++ /* Destination port for registration requests */ ++ #define MIP_PORT 434 ++ ++-//#define CONF_FILE_NAME "/etc/mipmn.conf" ++-//#define FILTER_FILE_NAME "/etc/mipmn-filters.conf" ++-#define CONF_FILE_NAME "/home/adu/mipmn.conf" ++-#define FILTER_FILE_NAME "/home/adu/mipmn-filters.conf" +++#define CONF_FILE_NAME "/etc/mipmn.conf" +++#define FILTER_FILE_NAME "/etc/mipmn-filters.conf" +++//#define CONF_FILE_NAME "/home/adu/mipmn.conf" +++//#define FILTER_FILE_NAME "/home/adu/mipmn-filters.conf" ++ #define ROUTE_PATH "/sbin/route" ++ ++ /* Maximum number of mobility agents a MN keeps track of */ diff --git a/net/uob-nomad/patches/004-linux26_header_fix.patch b/net/uob-nomad/patches/004-linux26_header_fix.patch new file mode 100644 index 0000000..98a1791 --- /dev/null +++ b/net/uob-nomad/patches/004-linux26_header_fix.patch @@ -0,0 +1,14 @@ +diff -ur nomad.old/Client/net-tools/lib/x25_sr.c nomad.dev/Client/net-tools/lib/x25_sr.c +--- nomad.old/Client/net-tools/lib/x25_sr.c 2003-09-05 10:21:52.000000000 +0200 ++++ nomad.dev/Client/net-tools/lib/x25_sr.c 2006-12-09 00:19:50.036574096 +0100 +@@ -41,6 +41,10 @@ + + #include "net-features.h" + ++#ifdef X25_MASK_CALLING_AE ++typedef struct x25_address x25_address; ++#endif ++ + extern struct aftype x25_aftype; + + static int skfd = -1; diff --git a/net/updatedd/Makefile b/net/updatedd/Makefile new file mode 100644 index 0000000..e28070e --- /dev/null +++ b/net/updatedd/Makefile @@ -0,0 +1,155 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=updatedd +PKG_VERSION:=2.6 +PKG_RELEASE:=7 + +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/ +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=f03446105ed043cd5dbd1ab95484d27f + +PKG_FIXUP:=libtool + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/updatedd + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + MENU:=1 + TITLE:=A tool to update dynamic dns services + URL:=http://savannah.nongnu.org/projects/updatedd/ +endef + +define Package/updatedd/description +Updatedd is a small tool that will update one of many dynamic + dns services on boot. + Please look at the /etc/init.d/ddns script for more info. + +endef + +define Package/updatedd/conffiles +/etc/config/updatedd +endef + +define Package/updatedd-mod-changeip + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + DEPENDS:=updatedd + TITLE:=changeip.com +endef + +define Package/updatedd-mod-dyndns + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + DEPENDS:=updatedd + TITLE:=dyndns.org +endef + +define Package/updatedd-mod-eurodyndns + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + DEPENDS:=updatedd + TITLE:=eurodyndns.org +endef + +define Package/updatedd-mod-hn + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + DEPENDS:=updatedd + TITLE:=hn.org +endef + +define Package/updatedd-mod-noip + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + DEPENDS:=updatedd + TITLE:=no-ip.com +endef + +define Package/updatedd-mod-ods + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + DEPENDS:=updatedd + TITLE:=ods.org +endef + +define Package/updatedd-mod-ovh + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + DEPENDS:=updatedd + TITLE:=ovh.com +endef + +define Package/updatedd-mod-regfish + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + DEPENDS:=updatedd + TITLE:=regfish.com +endef + +define Package/updatedd-mod-tzo + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + DEPENDS:=updatedd + TITLE:=tzo.com +endef + +define Package/updatedd-mod-zoneedit + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + DEPENDS:=updatedd + TITLE:=zoneedit.com +endef + +define BuildPlugin + define Package/$(1)/install + $(INSTALL_DIR) $$(1)/usr/lib/updatedd + $(CP) $(PKG_INSTALL_DIR)/usr/lib/updatedd/$(2).so* $$(1)/usr/lib/updatedd/ + endef + + $$(eval $$(call BuildPackage,$(1))) +endef + +define Package/updatedd/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/updatedd.init $(1)/etc/init.d/updatedd + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/updatedd.config $(1)/etc/config/updatedd + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/updatedd $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/updatedd + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DATA) ./files/updatedd.hotplug $(1)/etc/hotplug.d/iface/30-updatedd +endef + +$(eval $(call BuildPackage,updatedd)) +$(eval $(call BuildPlugin,updatedd-mod-changeip,libchangeip)) +$(eval $(call BuildPlugin,updatedd-mod-dyndns,libdyndns)) +$(eval $(call BuildPlugin,updatedd-mod-eurodyndns,libeurodyndns)) +$(eval $(call BuildPlugin,updatedd-mod-hn,libhn)) +$(eval $(call BuildPlugin,updatedd-mod-noip,libnoip)) +$(eval $(call BuildPlugin,updatedd-mod-ods,libods)) +$(eval $(call BuildPlugin,updatedd-mod-ovh,libovh)) +$(eval $(call BuildPlugin,updatedd-mod-regfish,libregfish)) +$(eval $(call BuildPlugin,updatedd-mod-tzo,libtzo)) +$(eval $(call BuildPlugin,updatedd-mod-zoneedit,libzoneedit)) diff --git a/net/updatedd/files/updatedd.config b/net/updatedd/files/updatedd.config new file mode 100644 index 0000000..f2e9e91 --- /dev/null +++ b/net/updatedd/files/updatedd.config @@ -0,0 +1,6 @@ +config updatedd + option service '' + option username '' + option password '' + option host '' + option update '0' diff --git a/net/updatedd/files/updatedd.hotplug b/net/updatedd/files/updatedd.hotplug new file mode 100644 index 0000000..4ae12a0 --- /dev/null +++ b/net/updatedd/files/updatedd.hotplug @@ -0,0 +1,15 @@ +NAME=updatedd +CONFIG=/etc/config/$NAME +COMMAND=/usr/bin/$NAME + +[ "$ACTION" = "ifup" ] && { + [ -x $COMMAND ] && [ -r $CONFIG ] && { + include /lib/network + scan_interfaces + + config_get ifname wan ifname + [ -n "$ifname" ] && { + /etc/init.d/updatedd restart + } + } & +} diff --git a/net/updatedd/files/updatedd.init b/net/updatedd/files/updatedd.init new file mode 100644 index 0000000..d364659 --- /dev/null +++ b/net/updatedd/files/updatedd.init @@ -0,0 +1,37 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start_service () { + local section="$1" + config_get service "$section" service + config_get username "$section" username + config_get password "$section" password + config_get host "$section" host + config_get update "$section" update + + [ "$update" = 1 ] && { + if [ "$service" = "dyndns" ]; then + wget http://checkip.dyndns.org -O /tmp/updatedd_ip_check + current_ip=`cat /tmp/updatedd_ip_check |cut -d':' -f2|cut -d'<' -f1 |cut -d' ' -f2` + rm /tmp/updatedd_ip_check + old_ip=`nslookup "$host" |grep "$host" -A 1 |grep Address |cut -d' ' -f3` + if [ "$current_ip" = "$old_ip" ]; then + echo "Preventing abusive update" + abusive=1 + fi + fi + if [ "$abusive" != "1" ]; then + /usr/bin/updatedd -Y $service -- $username:$password $host + fi + } +} + +start() { + config_load "updatedd" + config_foreach start_service updatedd +} + +stop() { + killall updatedd +} diff --git a/net/updatedd/patches/001-service_libname.patch b/net/updatedd/patches/001-service_libname.patch new file mode 100644 index 0000000..0003a6e --- /dev/null +++ b/net/updatedd/patches/001-service_libname.patch @@ -0,0 +1,84 @@ +--- a/src/updatedd.c ++++ b/src/updatedd.c +@@ -36,7 +36,8 @@ + #include /* PATH_MAX */ + #include "updatedd.h" + +-#define PLUGIN_ENDING ".so" ++#define LIBPREFIX "lib" ++#define LIBSUFFIX ".so" + + void + print_usage(char *pname, FILE *fp) +@@ -92,23 +93,7 @@ + void + get_plugin_path(char *service, char *buffer, size_t len) + { +- FILE *pipe; +- char la_path[PATH_MAX]; +- char lib_name[256]; +- char command[1024]; +- +- (void)snprintf(la_path, PATH_MAX-1, LIBPATH "/lib%s.la", service); +- +- snprintf(command, 1023, ". %s; echo $dlname", la_path); +- if((pipe = popen(command, "r")) == NULL) +- err(PERR, "popen() failed"); +- fscanf(pipe, "%255s", lib_name); +- +- if(fclose(pipe) == EOF) +- err(PERR, "fclose() failed"); +- +- (void)memset(buffer, 0, len); +- snprintf(buffer, len-1, LIBPATH"/%s", lib_name); ++ snprintf(buffer, len-1, LIBPATH "/" LIBPREFIX "%s" LIBSUFFIX, service); + } + + void * +@@ -139,6 +124,7 @@ + + } + ++#define SERVICE_MAXLEN 20 + int + get_service(DIR *dir, char *buf, size_t size) + { +@@ -146,26 +132,19 @@ + struct dirent *dir_info; + + while( (dir_info = readdir(dir)) ) { ++ char *p = dir_info->d_name; + int n; +- char *ptr = strstr(dir_info->d_name, ".la"); +- +- if(strlen(dir_info->d_name) < 6) +- continue; +- +- if(ptr != NULL) { +- if(!dir_info->d_name[0] == 'l') +- continue; +- if(!dir_info->d_name[1] == 'i') +- continue; +- if(!dir_info->d_name[2] == 'b') +- continue; +- +- for(n = 0; dir_info->d_name+n+3 != ptr; n++) { +- buf[n] = dir_info->d_name[n+3]; +- } +- buf[n] = '\0'; +- return 1; +- } ++ if( strlen(p) <= strlen(LIBPREFIX LIBSUFFIX) ) ++ continue; ++ if( strstr(p, LIBPREFIX) != p ) ++ continue; ++ p += strlen(LIBPREFIX); ++ n = strlen(p) - strlen(LIBSUFFIX); ++ if( strstr(p + n, LIBSUFFIX) != p + n ) ++ continue; ++ p[n] = 0; ++ strncpy(buf, p, size); ++ return 1; + } + + return 0; diff --git a/net/updatedd/patches/002-ovh-dyndnshost.patch b/net/updatedd/patches/002-ovh-dyndnshost.patch new file mode 100644 index 0000000..0e617d9 --- /dev/null +++ b/net/updatedd/patches/002-ovh-dyndnshost.patch @@ -0,0 +1,12 @@ +diff -pruN updatedd-2.6-ori/src/plugins/libovh.h updatedd-2.6/src/plugins/libovh.h +--- updatedd-2.6-ori/src/plugins/libovh.h 2006-09-07 22:32:59.000000000 +0200 ++++ updatedd-2.6/src/plugins/libovh.h 2008-06-08 13:12:17.000000000 +0200 +@@ -21,7 +21,7 @@ + + #include + +-#define DYNDNSHOST "ovh.com" ++#define DYNDNSHOST "www.ovh.com" + #define PORT 80 + + #define BUFSIZE 512 diff --git a/net/updatedd/patches/003-zoneedit-url-fix.patch b/net/updatedd/patches/003-zoneedit-url-fix.patch new file mode 100644 index 0000000..9e40001 --- /dev/null +++ b/net/updatedd/patches/003-zoneedit-url-fix.patch @@ -0,0 +1,11 @@ +--- a/src/plugins/libzoneedit.h ++++ b/src/plugins/libzoneedit.h +@@ -21,7 +21,7 @@ + + #include + +-#define DYNDNSHOST "www.zoneedit.com" ++#define DYNDNSHOST "dynamic.zoneedit.com" + #define PORT 80 + + #define BUFSIZE 4096 diff --git a/net/updatedd/patches/004-fix_liberty_dep.patch b/net/updatedd/patches/004-fix_liberty_dep.patch new file mode 100644 index 0000000..9085a32 --- /dev/null +++ b/net/updatedd/patches/004-fix_liberty_dep.patch @@ -0,0 +1,122 @@ +diff -Nur updatedd-2.6/config.h.in updatedd-2.6.lx2/config.h.in +--- updatedd-2.6/config.h.in 2006-09-15 18:19:37.000000000 +0400 ++++ updatedd-2.6.lx2/config.h.in 2009-11-25 11:00:14.000000000 +0300 +@@ -36,9 +36,6 @@ + /* Define to 1 if you have the `dl' library (-ldl). */ + #undef HAVE_LIBDL + +-/* Define to 1 if you have the `iberty' library (-liberty). */ +-#undef HAVE_LIBIBERTY +- + /* Define to 1 if you have the `nsl' library (-lnsl). */ + #undef HAVE_LIBNSL + +diff -Nur updatedd-2.6/configure updatedd-2.6.lx2/configure +--- updatedd-2.6/configure 2006-09-15 18:19:10.000000000 +0400 ++++ updatedd-2.6.lx2/configure 2009-11-25 11:02:02.000000000 +0300 +@@ -20596,93 +20596,6 @@ + fi + + +-{ echo "$as_me:$LINENO: checking for vasprintf in -liberty" >&5 +-echo $ECHO_N "checking for vasprintf in -liberty... $ECHO_C" >&6; } +-if test "${ac_cv_lib_iberty_vasprintf+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-liberty $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char vasprintf (); +-int +-main () +-{ +-return vasprintf (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval "echo \"\$as_me:$LINENO: $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 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (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); }; } && +- { ac_try='test -s 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 +- ac_cv_lib_iberty_vasprintf=yes +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_iberty_vasprintf=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_iberty_vasprintf" >&5 +-echo "${ECHO_T}$ac_cv_lib_iberty_vasprintf" >&6; } +-if test $ac_cv_lib_iberty_vasprintf = yes; then +- cat >>confdefs.h <<_ACEOF +-#define HAVE_LIBIBERTY 1 +-_ACEOF +- +- LIBS="-liberty $LIBS" +- +-fi +- +- + # ------------------] GETOPT_LONG [ + + +diff -Nur updatedd-2.6/configure.ac updatedd-2.6.lx2/configure.ac +--- updatedd-2.6/configure.ac 2006-09-15 18:18:44.000000000 +0400 ++++ updatedd-2.6.lx2/configure.ac 2009-11-25 11:00:33.000000000 +0300 +@@ -74,8 +74,6 @@ + AC_CHECK_LIB([c], [dlopen]) + dnl Linux distributes dlopen() in libdl. + AC_CHECK_LIB([dl], [dlopen]) +-dnl Tru64 distributes vasprintf() in -liberty +-AC_CHECK_LIB([iberty], [vasprintf]) + + # ------------------] GETOPT_LONG [ + diff --git a/net/usbip/Makefile b/net/usbip/Makefile new file mode 100644 index 0000000..9251857 --- /dev/null +++ b/net/usbip/Makefile @@ -0,0 +1,149 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=usbip +PKG_VERSION:=0.1.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/usbip +PKG_MD5SUM:=d1094b6d4449787864f8be001639232c + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/usbip/Common + TITLE:=USB-over-IP + URL:=http://usbip.sourceforge.net/ + DEPENDS:=@!LINUX_2_4 @USB_SUPPORT +glib2 +sysfsutils + MAINTAINER:=Nuno Goncalves +endef + +define Package/usbip/Default +$(call Package/usbip/Common) + SECTION:=net + CATEGORY:=Network +endef + +define Package/usbip +$(call Package/usbip/Default) + TITLE+= (common) + DEPENDS+= +glib2 +sysfsutils +libwrap +kmod-usbip +endef + +define Package/usbip-client +$(call Package/usbip/Default) + TITLE+= (client) + DEPENDS+= usbip +kmod-usbip-client +endef + +define Package/usbip-server +$(call Package/usbip/Default) + TITLE+= (server) + DEPENDS+= usbip +kmod-usbip-server +endef + +define KernelPackage/usbip/Default +$(call Package/usbip/Common) + SUBMENU:=USB Support +endef + +define KernelPackage/usbip +$(call KernelPackage/usbip/Default) + TITLE+= (kernel support) + KCONFIG:= CONFIG_USB_IP_COMMON CONFIG_USB_IP_DEBUG_ENABLE=n + FILES:=$(LINUX_DIR)/drivers/staging/usbip/usbip_common_mod.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,98,usbip_common_mod) +endef + +define KernelPackage/usbip-client +$(call KernelPackage/usbip/Default) + SUBMENU:=USB Support + TITLE+= (kernel client driver) + DEPENDS+= kmod-usbip + KCONFIG:= CONFIG_USB_IP_VHCI_HCD + FILES:=$(LINUX_DIR)/drivers/staging/usbip/vhci-hcd.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,99,vhci-hcd) +endef + +define KernelPackage/usbip-server +$(call KernelPackage/usbip/Default) + SUBMENU:=USB Support + TITLE+= (kernel host driver) + DEPENDS+= kmod-usbip + KCONFIG:= CONFIG_USB_IP_HOST + FILES:=$(LINUX_DIR)/drivers/staging/usbip/usbip.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,99,usbip) +endef + +include $(INCLUDE_DIR)/kernel-defaults.mk + +CONFIGURE_PATH:=./src +MAKE_PATH:=./src +LIBTOOL_PATHS:=./src + +CFLAGS+="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" + +define Build/Prepare +$(call Build/Prepare/Default) + (cd $(PKG_BUILD_DIR)/src; autoreconf -v --install || exit 1 ) +endef + +define Build/Compile/kmod + $(MAKE) $(KERNEL_MAKEOPTS) \ + SUBDIRS="$(LINUX_DIR)/drivers/staging/usbip" \ + CONFIG_USB_IP_COMMON=m \ + CONFIG_USB_IP_VHCI_HCD=m \ + CONFIG_USB_IP_HOST=m \ + modules +endef + +define Build/Compile +$(call Build/Compile/Default) +$(call Build/Compile/kmod) +endef + +define Package/usbip/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libusbip.so.* \ + $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/share/hwdata + $(CP) \ + $(PKG_INSTALL_DIR)/usr/share/usbip/usb.ids \ + $(1)/usr/share/hwdata/ +endef + +define Package/usbip-client/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/usbip \ + $(1)/usr/bin/ +endef + +define Package/usbip-server/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/usbipd \ + $(1)/usr/bin/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/bind_driver \ + $(1)/usr/bin/usbip_bind_driver +endef + +$(eval $(call BuildPackage,usbip)) +$(eval $(call BuildPackage,usbip-client)) +$(eval $(call BuildPackage,usbip-server)) +$(eval $(call KernelPackage,usbip)) +$(eval $(call KernelPackage,usbip-client)) +$(eval $(call KernelPackage,usbip-server)) diff --git a/net/usbip/patches/000-upstream_svn_152.patch b/net/usbip/patches/000-upstream_svn_152.patch new file mode 100644 index 0000000..e7135a6 --- /dev/null +++ b/net/usbip/patches/000-upstream_svn_152.patch @@ -0,0 +1,229 @@ +--- a/drivers/head/stub_dev.c ++++ b/drivers/head/stub_dev.c +@@ -398,7 +398,11 @@ static int stub_probe(struct usb_interfa + { + struct usb_device *udev = interface_to_usbdev(interface); + struct stub_device *sdev = NULL; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) + char *udev_busid = interface->dev.parent->bus_id; ++#else ++ char *udev_busid = dev_name(interface->dev.parent); ++#endif + int err = 0; + + udbg("Enter\n"); +--- a/drivers/head/stub_main.c ++++ b/drivers/head/stub_main.c +@@ -252,18 +252,17 @@ static int __init usb_stub_init(void) + return -ENOMEM; + } + ++ info(DRIVER_DESC "" DRIVER_VERSION); ++ ++ memset(busid_table, 0, sizeof(busid_table)); ++ spin_lock_init(&busid_table_lock); ++ + ret = usb_register(&stub_driver); + if (ret) { + uerr("usb_register failed %d\n", ret); + return ret; + } + +- +- info(DRIVER_DESC "" DRIVER_VERSION); +- +- memset(busid_table, 0, sizeof(busid_table)); +- spin_lock_init(&busid_table_lock); +- + ret = driver_create_file(&stub_driver.drvwrap.driver, &driver_attr_match_busid); + + if (ret) { +--- a/drivers/head/stub_rx.c ++++ b/drivers/head/stub_rx.c +@@ -159,7 +159,11 @@ static int tweak_set_configuration_cmd(s + * A user may need to set a special configuration value before + * exporting the device. + */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) + uinfo("set_configuration (%d) to %s\n", config, urb->dev->dev.bus_id); ++#else ++ uinfo("set_configuration (%d) to %s\n", config, dev_name(&urb->dev->dev)); ++#endif + uinfo("but, skip!\n"); + + return 0; +@@ -177,7 +181,11 @@ static int tweak_reset_device_cmd(struct + value = le16_to_cpu(req->wValue); + index = le16_to_cpu(req->wIndex); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) + uinfo("reset_device (port %d) to %s\n", index, urb->dev->dev.bus_id); ++#else ++ uinfo("reset_device (port %d) to %s\n", index, dev_name(&urb->dev->dev)); ++#endif + + /* all interfaces should be owned by usbip driver, so just reset it. */ + ret = usb_lock_device_for_reset(urb->dev, NULL); +@@ -187,7 +195,11 @@ static int tweak_reset_device_cmd(struct + } + + /* try to reset the device */ +- ret = usb_reset_composite_device(urb->dev, NULL); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) ++ ret = usb_reset_composite_device(urb->dev, NULL); ++#else ++ ret = usb_reset_device(urb->dev); ++#endif + if (ret < 0) + uerr("device reset\n"); + +--- a/drivers/head/usbip_common.c ++++ b/drivers/head/usbip_common.c +@@ -55,10 +55,7 @@ static ssize_t show_flag(struct device * + static ssize_t store_flag(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) + { +- unsigned long flag; +- +- sscanf(buf, "%lx", &flag); +- usbip_debug_flag = flag; ++ sscanf(buf, "%lx", &usbip_debug_flag); + + return count; + } +@@ -390,7 +387,7 @@ int usbip_thread(void *param) + unlock_kernel(); + + /* srv.rb must wait for rx_thread starting */ +- complete(&ut->thread_done); ++ complete(&ut->thread_started); + + /* start of while loop */ + ut->loop_ops(ut); +@@ -403,15 +400,21 @@ int usbip_thread(void *param) + + void usbip_start_threads(struct usbip_device *ud) + { ++ + /* + * threads are invoked per one device (per one connection). + */ ++ INIT_COMPLETION(ud->tcp_rx.thread_started); ++ INIT_COMPLETION(ud->tcp_tx.thread_started); ++ INIT_COMPLETION(ud->tcp_rx.thread_done); ++ INIT_COMPLETION(ud->tcp_tx.thread_done); ++ + kernel_thread((int(*)(void *))usbip_thread, (void *)&ud->tcp_rx, 0); + kernel_thread((int(*)(void *))usbip_thread, (void *)&ud->tcp_tx, 0); + + /* confirm threads are starting */ +- wait_for_completion(&ud->tcp_rx.thread_done); +- wait_for_completion(&ud->tcp_tx.thread_done); ++ wait_for_completion(&ud->tcp_rx.thread_started); ++ wait_for_completion(&ud->tcp_tx.thread_started); + } + EXPORT_SYMBOL(usbip_start_threads); + +@@ -436,6 +439,7 @@ void usbip_task_init(struct usbip_task * + void (*loop_ops)(struct usbip_task *)) + { + ut->thread = NULL; ++ init_completion(&ut->thread_started); + init_completion(&ut->thread_done); + ut->name = name; + ut->loop_ops = loop_ops; +--- a/drivers/head/usbip_event.c ++++ b/drivers/head/usbip_event.c +@@ -38,7 +38,7 @@ void usbip_start_eh(struct usbip_device + + kernel_thread((int(*)(void *)) usbip_thread, (void *) eh, 0); + +- wait_for_completion(&eh->thread_done); ++ wait_for_completion(&eh->thread_started); + } + EXPORT_SYMBOL(usbip_start_eh); + +--- a/drivers/head/vhci_hcd.c ++++ b/drivers/head/vhci_hcd.c +@@ -58,7 +58,7 @@ static void vhci_stop(struct usb_hcd *hc + static int vhci_get_frame_number(struct usb_hcd *hcd); + + static const char driver_name[] = "vhci_hcd"; +-static const char driver_desc[] = "USB/IP Virtual Host Contoroller"; ++static const char driver_desc[] = "USB/IP Virtual Host Controller"; + + + +@@ -416,14 +416,6 @@ static int vhci_hub_control(struct usb_h + case USB_PORT_FEAT_SUSPEND: + dbg_vhci_rh(" SetPortFeature: USB_PORT_FEAT_SUSPEND\n"); + uerr(" not yet\n"); +-#if 0 +- dum->port_status[rhport] |= (1 << USB_PORT_FEAT_SUSPEND); +- if (dum->driver->suspend) { +- spin_unlock (&dum->lock); +- dum->driver->suspend (&dum->gadget); +- spin_lock (&dum->lock); +- } +-#endif + break; + case USB_PORT_FEAT_RESET: + dbg_vhci_rh(" SetPortFeature: USB_PORT_FEAT_RESET\n"); +@@ -432,12 +424,6 @@ static int vhci_hub_control(struct usb_h + dum->port_status[rhport] &= ~(USB_PORT_STAT_ENABLE + | USB_PORT_STAT_LOW_SPEED + | USB_PORT_STAT_HIGH_SPEED); +-#if 0 +- if (dum->driver) { +- dev_dbg (hardware, "disconnect\n"); +- stop_activity (dum, dum->driver); +- } +-#endif + + /* FIXME test that code path! */ + } +@@ -1060,7 +1046,7 @@ static int vhci_hcd_probe(struct platfor + struct usb_hcd *hcd; + int ret; + +- uinfo("proving...\n"); ++ uinfo("probing...\n"); + + dbg_vhci_hc("name %s id %d\n", pdev->name, pdev->id); + +@@ -1076,7 +1062,11 @@ static int vhci_hcd_probe(struct platfor + * Allocate and initialize hcd. + * Our private data is also allocated automatically. + */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) + hcd = usb_create_hcd(&vhci_hc_driver, &pdev->dev, pdev->dev.bus_id); ++#else ++ hcd = usb_create_hcd(&vhci_hc_driver, &pdev->dev, dev_name(&pdev->dev)); ++#endif + if (!hcd) { + uerr("create hcd failed\n"); + return -ENOMEM; +--- a/drivers/head/vhci_sysfs.c ++++ b/drivers/head/vhci_sysfs.c +@@ -123,7 +123,11 @@ static ssize_t show_status(struct device + out += sprintf(out, "%03u %08x ", + vdev->speed, vdev->devid); + out += sprintf(out, "%16p ", vdev->ud.tcp_socket); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) + out += sprintf(out, "%s", vdev->udev->dev.bus_id); ++#else ++ out += sprintf(out, "%s", dev_name(&vdev->udev->dev)); ++#endif + + } else + out += sprintf(out, "000 000 000 0000000000000000 0-0"); +--- a/drivers/head/usbip_common.h ++++ b/drivers/head/usbip_common.h +@@ -300,6 +300,7 @@ struct usbip_device; + + struct usbip_task { + struct task_struct *thread; ++ struct completion thread_started; + struct completion thread_done; + char *name; + void (*loop_ops)(struct usbip_task *); diff --git a/net/uucp/Makefile b/net/uucp/Makefile new file mode 100644 index 0000000..73a6cd7 --- /dev/null +++ b/net/uucp/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=uucp +PKG_VERSION:=1.07 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/u/uucp/ +PKG_MD5SUM:=64c54d43787339a7cced48390eb3e1d0 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/uucp + SECTION:=net + CATEGORY:=Network + SUBMENU:=File Transfer + TITLE:=copy files to or from another (usually *nix) system + URL:=http://packages.debian.org/etch/uucp +endef + +define Package/uucp/description + UUCP is used to transfer mail, news and random files between systems which are not + connected by more modern networks. The communication can be made via modems, direct + (hard-wired) serial connections or via an IP connection. +endef + +CONFIGURE_ARGS += \ + --enable-static \ + --enable-shared + +define Package/uucp/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/{cu,tstuu,uu{chk,cico,conv,cp,log,name,pick,sched,stat,to,x,xqt}} $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,uucp)) diff --git a/net/vblade/Makefile b/net/vblade/Makefile new file mode 100644 index 0000000..ca5f371 --- /dev/null +++ b/net/vblade/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vblade +PKG_VERSION:=20 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=@SF/aoetools/vblade +PKG_MD5SUM:=3c80e4a6bc7d66ae0c235b88cb44bd59 + +include $(INCLUDE_DIR)/package.mk + +define Package/vblade + SECTION:=net + CATEGORY:=Network + TITLE:=Vblade AoE Target + URL:=http://aoetools.sourceforge.net/ +endef + +define Package/$(PKG_NAME)/conffiles +/etc/config/vblade +endef + + +define Package/vblade/description + The vblade is the virtual EtherDrive (R) blade, a program that makes a + seekable file available over an ethernet local area network (LAN) via + the ATA over Ethernet (AoE) protocol. +endef + +CONFIGURE_ARGS += NPERSHELF=16 + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/vblade $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/vbladed $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/net/vblade/files/vblade.config b/net/vblade/files/vblade.config new file mode 100644 index 0000000..455988a --- /dev/null +++ b/net/vblade/files/vblade.config @@ -0,0 +1,14 @@ +#config vblade +# option shelf '1' +# option slot '1' +# option netif 'eth0' +# option device '/dev/sda' +# option options '-r' +# +#config vblade +# option shelf '1' +# option slot '2' +# option netif 'eth0' +# option device '/dev/sdb' +# option options '-r' +# diff --git a/net/vblade/files/vblade.init b/net/vblade/files/vblade.init new file mode 100644 index 0000000..afed46b --- /dev/null +++ b/net/vblade/files/vblade.init @@ -0,0 +1,24 @@ +#!/bin/sh /etc/rc.common +# Startup init script for vblade for Openwrt +START=95 +STOP=10 + +start_service() { + local section="$1" + config_get shelf "$section" shelf + config_get slot "$section" slot + config_get netif "$section" netif + config_get device "$section" device + config_get options "$section" options + vbladed $options $shelf $slot $netif $device +} + +start() { + config_load vblade + config_foreach start_service vblade +} + +stop() { + /usr/bin/pkill -f /usr/sbin/vblade +} + diff --git a/net/veth/Makefile b/net/veth/Makefile new file mode 100644 index 0000000..e2c89e2 --- /dev/null +++ b/net/veth/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=veth +PKG_VERSION:=1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://w3.epca.com.ve/projects/veth +PKG_MD5SUM:=11536388d9c76552a4b736638a458361 + +include $(INCLUDE_DIR)/package.mk + +define Package/veth + SECTION:=net + CATEGORY:=Network + DEPENDS:=+kmod-tun + TITLE:=Virtual Ethernet Device for Linux + URL:=http://w3.epca.com.ve/projects/veth/ +endef + +define Package/veth/description + VETH is a daemon that virtualizes a ethernet card in Linux. + The virtualization is done via Universal TUN/TAP Driver. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/veth \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef + +define Package/veth/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/veth/vethd $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,veth)) diff --git a/net/veth/patches/100-veth-makefile-cflags.patch b/net/veth/patches/100-veth-makefile-cflags.patch new file mode 100644 index 0000000..c9a1d74 --- /dev/null +++ b/net/veth/patches/100-veth-makefile-cflags.patch @@ -0,0 +1,14 @@ +Index: veth-1.0/veth/Makefile +=================================================================== +--- veth-1.0.orig/veth/Makefile 2008-10-29 16:11:33.000000000 +0100 ++++ veth-1.0/veth/Makefile 2008-10-31 18:01:33.000000000 +0100 +@@ -4,8 +4,7 @@ + rm -f vethd + + vethd: vethd.c +- $(CC) -O6 -Wall -pedantic -o vethd vethd.c +- strip vethd ++ $(CC) $(CFLAGS) -o vethd vethd.c + + install: all + install -s -m 750 ./vethd $(INSTALL_DIR) diff --git a/net/veth/patches/200-drop-multicast.patch b/net/veth/patches/200-drop-multicast.patch new file mode 100644 index 0000000..438b0d3 --- /dev/null +++ b/net/veth/patches/200-drop-multicast.patch @@ -0,0 +1,32 @@ +diff -pNur veth-1.0/veth/vethd.c veth-1.0/veth/vethd.c +--- veth-1.0/veth/vethd.c 2008-11-14 10:59:50.000000000 +0100 ++++ veth-1.0/veth/vethd.c 2008-11-24 11:24:45.000000000 +0100 +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + + #define max(a,b) ((a)>(b) ? (a):(b)) + +@@ -223,6 +224,7 @@ int main(int argc, char **argv) + + int vfd, nfd, leidos, opc, foreground = 0; + fd_set fds; ++ struct ether_header const* const ether_hdr = (struct ether_header const *)buffer; + + set_locale(); + show_copyright(); +@@ -356,7 +358,11 @@ int main(int argc, char **argv) + perror("Error reading from ethernet interface"); + return 2; + } +- write(vfd, buffer, leidos); ++ /* drop multicast and ppp session */ ++ if (!(ether_hdr->ether_dhost[0] == 0x01) ++ && (ether_hdr->ether_type != htons(ETH_P_PPP_SES))) { ++ write(vfd, buffer, leidos); ++ } + } + FD_ZERO(&fds); + FD_SET(nfd, &fds); diff --git a/net/vgp/Makefile b/net/vgp/Makefile new file mode 100644 index 0000000..46f3c85 --- /dev/null +++ b/net/vgp/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vgp +PKG_VERSION:=0.2.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://vgpd.freaknet.org/files/ +PKG_MD5SUM:=b8c25b5dfcb944f78bbc584be9c230c7 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/vgp + SECTION:=net + CATEGORY:=Network + TITLE:=A daemon working like Cisco(c) HSRP + URL:=http://vgpd.freaknet.org/ +endef + +define Package/vgp/description + VGP (Virtual Gateway Protocol)is a very simple protocol able to + work in a way similar to Cisco(c) HSRP. It implements the idea + of Virtual Gateway to provide fault tollerance (and load + balancing) on your net. Each client on your net has as its + default gateway set to the virtual gateway and not the real router. +endef + +# uses GNU configure + +define Package/vgp/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vgpd $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,vgp)) diff --git a/net/vnc-reflector/Makefile b/net/vnc-reflector/Makefile new file mode 100644 index 0000000..f6538c8 --- /dev/null +++ b/net/vnc-reflector/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vnc-reflector +PKG_VERSION:=1.2.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=vnc_reflector-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/vnc-reflector +PKG_MD5SUM:=c3f88bc62f228b335c25c07f9744ab0c + +PKG_BUILD_DIR:=$(BUILD_DIR)/vnc_reflector + +include $(INCLUDE_DIR)/package.mk + +define Package/vnc-reflector + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libjpeg +zlib + TITLE:=VNC proxy for multiple clients + URL:=http://sourceforge.net/projects/vnc-reflector +endef + +define Package/vnc-reflector/description + VNC Reflector is a specialized VNC server which acts as + a proxy sitting between real VNC server (a host) and a + number of VNC clients. It was designed to work efficiently + with large number of clients. +endef + +define Build/Compile + $(call Build/Compile/Default, \ + CC="$(TARGET_CC)" \ + OFLAGS="$(TARGET_CFLAGS)" \ + STAGING_DIR="$(STAGING_DIR)" \ + default \ + ) +endef + +define Package/vnc-reflector/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/vncreflector $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,vnc-reflector)) diff --git a/net/vnc-reflector/patches/001-honor_include_lib_path.patch b/net/vnc-reflector/patches/001-honor_include_lib_path.patch new file mode 100644 index 0000000..fb409ac --- /dev/null +++ b/net/vnc-reflector/patches/001-honor_include_lib_path.patch @@ -0,0 +1,25 @@ +--- vnc_reflector/Makefile.orig 2005-12-14 01:25:53.000000000 +0100 ++++ vnc_reflector/Makefile 2005-12-14 01:28:05.000000000 +0100 +@@ -14,10 +14,11 @@ + # + # Variables you might want to edit: CFLAGS, CONFFLAGS + +-IFLAGS = -I. ++IFLAGS = -I. -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include ++OFLAGS = -O2 + + # Production +-CFLAGS = -O2 $(IFLAGS) ++CFLAGS = $(OFLAGS) $(IFLAGS) + # Debug (strict) + #CFLAGS = -g -pedantic -Wall $(IFLAGS) + # Debug (profiling) +@@ -29,7 +30,7 @@ + CONFFLAGS = -DUSE_POLL + + # Link with zlib and JPEG libraries +-LDFLAGS = -L/usr/local/lib -lz -ljpeg ++LDFLAGS = -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lz -ljpeg + + PROG = vncreflector + diff --git a/net/vncrepeater/Makefile b/net/vncrepeater/Makefile new file mode 100644 index 0000000..057bfae --- /dev/null +++ b/net/vncrepeater/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vncrepeater +PKG_VERSION:=0.12 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.rit.edu/~reh5586/openwrt/packages/vncrepeater/src +PKG_MD5SUM:=5951740a8a103d7d9668558b3639c6c4 + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/vncrepeater + SECTION:=net + CATEGORY:=Network + DEPENDS:=+uclibcxx + TITLE:=UltraVNC repeater for Linux + URL:=http://www.uvnc.com/addons/repeater.html +endef + +define Package/vncrepeater/conffiles +/etc/vncrepeater.conf +endef + +define Package/vncrepeater/description + Viewer can be behind Nat router or directly connected to the internet + instead of forwarding serveral ports, you only need to forward 1 port. + If the PC that runs the Repeater has access to the local DNS server, + you can use your local DNS names instead of 10.10.10.12. + This could be handy when you have a dynamic DHCP server allocating + ip adresses for your PC. +endef + +define Build/Compile + $(call Build/Compile/Default, \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++ -fno-builtin -fno-rtti -nostdinc++" \ + LDFLAGS="$(TARGET_LDFLAGS) -nodefaultlibs -luClibc++ -lc $(LIBGCC_S)" \ + repeater \ + ) +endef + +define Package/vncrepeater/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc + $(CP) $(PKG_BUILD_DIR)/repeater $(1)/usr/sbin/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc + $(CP) $(PKG_BUILD_DIR)/uvncrepeater.ini $(1)/etc/vncrepeater.conf +endef + +$(eval $(call BuildPackage,vncrepeater)) diff --git a/net/vncrepeater/patches/001-uclibcxx_linking.patch b/net/vncrepeater/patches/001-uclibcxx_linking.patch new file mode 100644 index 0000000..a9d05bc --- /dev/null +++ b/net/vncrepeater/patches/001-uclibcxx_linking.patch @@ -0,0 +1,32 @@ +diff -urN vncrepeater-0.12/Makefile vncrepeater-0.12.new/Makefile +--- vncrepeater-0.12/Makefile 2006-03-31 07:40:14.000000000 +0200 ++++ vncrepeater-0.12.new/Makefile 2006-04-11 10:26:06.345879104 +0200 +@@ -1,21 +1,21 @@ +-CFLAGS=-Wall ++CFLAGS=-Wall + repeater: repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o +- g++ $(CFLAGS) -o repeater repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o ++ $(CC) $(CFLAGS) -o repeater repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o $(LDFLAGS) + + repeater.o: repeater.cpp +- g++ $(CFLAGS) -c repeater.cpp ++ $(CC) $(CFLAGS) -c repeater.cpp + + repeaterproc.o: repeaterproc.cpp +- g++ $(CFLAGS) -c repeaterproc.cpp ++ $(CC) $(CFLAGS) -c repeaterproc.cpp + + openbsd_stringfuncs.o: openbsd_stringfuncs.cpp +- g++ $(CFLAGS) -c openbsd_stringfuncs.cpp ++ $(CC) $(CFLAGS) -c openbsd_stringfuncs.cpp + + iniparser.o: iniparser.cpp +- g++ $(CFLAGS) -c iniparser.cpp ++ $(CC) $(CFLAGS) -c iniparser.cpp + + readini.o: readini.cpp +- g++ $(CFLAGS) -c readini.cpp ++ $(CC) $(CFLAGS) -c readini.cpp + + clean: + rm -f *.o repeater diff --git a/net/vnstat/Makefile b/net/vnstat/Makefile new file mode 100644 index 0000000..efabd17 --- /dev/null +++ b/net/vnstat/Makefile @@ -0,0 +1,108 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vnstat +PKG_VERSION:=1.11 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://humdi.net/vnstat +PKG_MD5SUM:=a5a113f9176cd61fb954f2ba297f5fdb + +PKG_INSTALL:=1 + +PKG_BUILD_DEPENDS:=libgd +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/vnstat/Default + SECTION:=net + CATEGORY:=Network + URL:=http://humdi.net/vnstat/ +endef + +define Package/vnstat +$(call Package/vnstat/Default) + TITLE:=Console-based network traffic monitor +endef + +define Package/vnstat/description + vnStat is a network traffic monitor for Linux that keeps a log of daily + network traffic for the selected interface(s). vnStat isn't a packet + sniffer. The traffic information is analyzed from the /proc -filesystem, + so vnStat can be used without root permissions. +endef + +define Package/vnstati +$(call Package/vnstat/Default) + DEPENDS+=vnstat +libgd + TITLE:=PNG image output support for vnStat +endef + +define Package/vnstati/description + The purpose of vnstati is to provide image output support for statistics + collected using vnstat(1). However, the image file format is limited to + png. All basic outputs of vnStat are supported excluding live traffic + features. The image can be outputted either to a file or to standard + output. +endef + +define Package/vnstat/conffiles +/etc/vnstat.conf +/etc/config/vnstat +endef + +define Build/Compile/vnstat + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" +endef + +define Build/Compile/vnstati + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ + LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib" \ + all +endef + +define Build/Compile +$(call Build/Compile/vnstat) +$(call Build/Compile/vnstati) +endef + +define Package/vnstat/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vnstat $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/vnstatd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vnstat.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/vnstat-uci.conf $(1)/etc/config/vnstat + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/vnstat.init $(1)/etc/init.d/vnstat + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/vnstat.defaults $(1)/etc/uci-defaults/vnstat +endef + +define Package/vnstati/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vnstati $(1)/usr/bin/ +endef + +define Package/vnstat/postinst +#!/bin/sh +[ -n "$${IPKG_INSTROOT}" ] || (. /etc/uci-defaults/vnstat) && rm -f /etc/uci-defaults/vnstat +exit 0 +endef + +$(eval $(call BuildPackage,vnstat)) +$(eval $(call BuildPackage,vnstati)) diff --git a/net/vnstat/files/vnstat-uci.conf b/net/vnstat/files/vnstat-uci.conf new file mode 100644 index 0000000..9da71ed --- /dev/null +++ b/net/vnstat/files/vnstat-uci.conf @@ -0,0 +1,5 @@ +config vnstat + list interface br-lan +# list interface eth0.1 +# option remote http://example.org/vnstat/ +# option symlink /www/vnstat diff --git a/net/vnstat/files/vnstat.defaults b/net/vnstat/files/vnstat.defaults new file mode 100644 index 0000000..a2d353f --- /dev/null +++ b/net/vnstat/files/vnstat.defaults @@ -0,0 +1,12 @@ +#!/bin/sh + +wan="$(uci -P/var/state get network.wan.ifname)" + +if [ -n "$wan" ]; then + uci -q batch <<-EOF >/dev/null + add_list vnstat.@vnstat[-1].interface=$wan + commit vnstat + EOF +fi + +exit 0 diff --git a/net/vnstat/files/vnstat.init b/net/vnstat/files/vnstat.init new file mode 100644 index 0000000..fab1f34 --- /dev/null +++ b/net/vnstat/files/vnstat.init @@ -0,0 +1,77 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008-2011 OpenWrt.org + +START=99 + +vnstat_option() { + sed -ne "s/^[[:space:]]*$1[[:space:]]*['\"]\([^'\"]*\)['\"].*/\1/p" \ + /etc/vnstat.conf +} + +start() { + local lib="$(vnstat_option DatabaseDir)" + local pid="$(vnstat_option PidFile)" + + [ -n "$lib" ] || { + echo "Error: No DatabaseDir set in vnstat.conf" >&2 + exit 1 + } + + [ -n "$pid" ] || { + echo "Error: No PidFile set in vnstat.conf" >&2 + exit 1 + } + + mkdir -p "$lib" + + init_ifaces() { + local cfg="$1" + local url lnk + + init_iface() { + local ifn="$1" + + [ -n "$url" ] && { + local try=0 + local max=3 + local hostname="$(cat /proc/sys/kernel/hostname)" + + while [ $((++try)) -le $max ]; do + if wget -q -O "$lib/$ifn" "$url/${hostname}_$ifn" 2>/dev/null && [ -e "$lib/$ifn" ]; then + logger -t "vnstat" "Downloaded backup for database $ifn" + break + else + logger -t "vnstat" "Download try $try/$max for database $ifn failed" + sleep 30 + fi + done + } + + /usr/bin/vnstat -u -i "$ifn" >/dev/null + + [ -n "$lnk" ] && { + mkdir -p "$lnk" + [ -L "$lnk/$ifn" ] || ln -s "$lib/$ifn" "$lnk/$ifn" + } + } + + config_get url "$cfg" remote + config_get lnk "$cfg" symlink + config_list_foreach "$cfg" interface init_iface + + return 1 + } + + config_load vnstat + config_foreach init_ifaces vnstat + + /usr/sbin/vnstatd -d +} + +stop() { + local pid="$(vnstat_option PidFile)" + [ -n "$pid" ] && { + service_kill vnstatd "$pid" + rm -f "$pid" + } +} diff --git a/net/vnstat/patches/001-conf.patch b/net/vnstat/patches/001-conf.patch new file mode 100644 index 0000000..d41ef00 --- /dev/null +++ b/net/vnstat/patches/001-conf.patch @@ -0,0 +1,19 @@ +--- a/cfg/vnstat.conf ++++ b/cfg/vnstat.conf +@@ -72,13 +72,13 @@ TrafficlessDays 1 + ## + + # how often (in seconds) interface data is updated +-UpdateInterval 30 ++UpdateInterval 60 + + # how often (in seconds) interface status changes are checked +-PollInterval 5 ++PollInterval 30 + + # how often (in minutes) data is saved to file +-SaveInterval 5 ++SaveInterval 30 + + # how often (in minutes) data is saved when all interface are offline + OfflineSaveInterval 30 diff --git a/net/vnstat/patches/002-no_install_strip.patch b/net/vnstat/patches/002-no_install_strip.patch new file mode 100644 index 0000000..2a0ca85 --- /dev/null +++ b/net/vnstat/patches/002-no_install_strip.patch @@ -0,0 +1,35 @@ +--- a/Makefile ++++ b/Makefile +@@ -54,11 +54,11 @@ install: + + # install everything else + install -d -m 755 $(BIN) $(SBIN) $(MAN)/man1 $(MAN)/man5 $(DESTDIR)/var/lib/vnstat +- install -s -m 755 src/vnstat $(BIN) +- install -s -m 755 src/vnstatd $(SBIN) ++ install -m 755 src/vnstat $(BIN) ++ install -m 755 src/vnstatd $(SBIN) + @if [ -f "src/vnstati" ]; \ +- then echo install -s -m 755 src/vnstati $(BIN); \ +- install -s -m 755 src/vnstati $(BIN); \ ++ then echo install -m 755 src/vnstati $(BIN); \ ++ install -m 755 src/vnstati $(BIN); \ + fi + + # update man pages, gzip it if previous version was done so +@@ -127,12 +127,12 @@ bsdinstall: + + # install binaries + install -d -m 755 $(DESTDIR)/var/db/vnstat +- install -s -m 755 src/vnstat $(BIN_BSD) +- install -s -m 755 src/vnstatd $(SBIN_BSD) ++ install -m 755 src/vnstat $(BIN_BSD) ++ install -m 755 src/vnstatd $(SBIN_BSD) + + @if [ -f "src/vnstati" ]; \ +- then echo install -s -m 755 src/vnstati $(BIN_BSD); \ +- install -s -m 755 src/vnstati $(BIN_BSD); \ ++ then echo install -m 755 src/vnstati $(BIN_BSD); \ ++ install -m 755 src/vnstati $(BIN_BSD); \ + fi + + # install default config if such doesn't exist diff --git a/net/vnstat/patches/003-no_install_uname.patch b/net/vnstat/patches/003-no_install_uname.patch new file mode 100644 index 0000000..2c7859b --- /dev/null +++ b/net/vnstat/patches/003-no_install_uname.patch @@ -0,0 +1,15 @@ +--- a/Makefile ++++ b/Makefile +@@ -22,12 +22,6 @@ clean: + install: + @echo "Installing vnStat..." + +-# check that system is really Linux +- @if [ `uname` != "Linux" ]; \ +- then echo "This isn't a Linux system. Maybe 'make bsdinstall' is what you need?"; \ +- false; \ +- fi +- + # check that there's something to install + @if [ ! -f "src/vnstat" ] || [ ! -f "src/vnstatd" ]; \ + then echo "Nothing to install, run make first."; \ diff --git a/net/vnstat/patches/004-install_bsd_fix.patch b/net/vnstat/patches/004-install_bsd_fix.patch new file mode 100644 index 0000000..6b2a792 --- /dev/null +++ b/net/vnstat/patches/004-install_bsd_fix.patch @@ -0,0 +1,21 @@ +--- a/Makefile ++++ b/Makefile +@@ -43,7 +43,8 @@ install: + # install default config if such doesn't exist + @if [ ! -f "$(DESTDIR)/etc/vnstat.conf" ]; \ + then echo "Installing config to $(DESTDIR)/etc/vnstat.conf"; \ +- install -D -m 644 cfg/vnstat.conf $(DESTDIR)/etc/vnstat.conf; \ ++ install -d -m 755 $(DESTDIR)/etc; \ ++ install -m 644 cfg/vnstat.conf $(DESTDIR)/etc/vnstat.conf; \ + fi + + # install everything else +@@ -63,7 +64,7 @@ install: + then echo install -m 644 man/vnstati.1 $(MAN)/man1; \ + install -m 644 man/vnstati.1 $(MAN)/man1; \ + fi +- ++ + @if [ -f $(MAN)/man1/vnstat.1.gz ]; \ + then gzip -f9 $(MAN)/man1/vnstat.1; \ + gzip -f9 $(MAN)/man1/vnstatd.1; \ diff --git a/net/vpnc/Makefile b/net/vpnc/Makefile new file mode 100644 index 0000000..0b9d07e --- /dev/null +++ b/net/vpnc/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vpnc +PKG_VERSION:=0.5.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.unix-ag.uni-kl.de/~massar/vpnc/ +PKG_MD5SUM:=4378f9551d5b077e1770bbe09995afb3 + +include $(INCLUDE_DIR)/package.mk + +define Package/vpnc + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libgpg-error +libgcrypt +kmod-tun +ip + TITLE:=VPN client for Cisco EasyVPN + URL:=http://www.unix-ag.uni-kl.de/~massar/vpnc/ + SUBMENU:=VPN +endef + +define Package/vpnc/description + A VPN client compatible with Cisco's EasyVPN equipment. + + Supports IPSec (ESP) with Mode Configuration and Xauth. Supports only + shared-secret IPSec authentication with Xauth, AES (256, 192, 128), + 3DES, 1DES, MD5, SHA1, DH1/2/5 and IP tunneling. +endef + +define Package/vpnc/conffiles +/etc/vpnc/default.conf +/etc/vpnc/vpnc-script +endef + +define Build/Compile + $(call Build/Compile/Default, \ + OFLAGS="$(TARGET_CFLAGS)" \ + OS="Linux" \ + STAGING_DIR="$(STAGING_DIR)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + PREFIX=/usr \ + all install \ + ) +endef + +define Package/vpnc/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/vpnc \ + $(PKG_INSTALL_DIR)/usr/sbin/vpnc-disconnect \ + $(1)/usr/sbin/ + install -d -m0700 $(1)/etc/vpnc + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vpnc/default.conf $(1)/etc/vpnc/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/vpnc/vpnc-script $(1)/etc/vpnc/ +endef + +$(eval $(call BuildPackage,vpnc)) diff --git a/net/vpnc/patches/001-cross.patch b/net/vpnc/patches/001-cross.patch new file mode 100644 index 0000000..fda17b1 --- /dev/null +++ b/net/vpnc/patches/001-cross.patch @@ -0,0 +1,29 @@ +--- a/Makefile ++++ b/Makefile +@@ -20,7 +20,7 @@ + # $Id: Makefile 312 2008-06-15 18:09:42Z Joerg Mayer $ + + DESTDIR= +-PREFIX=/usr/local ++PREFIX=/usr + ETCDIR=/etc/vpnc + BINDIR=$(PREFIX)/bin + SBINDIR=$(PREFIX)/sbin +@@ -51,14 +51,11 @@ RELEASE_VERSION := $(shell cat VERSION) + #OPENSSLLIBS = -lcrypto + + CC=gcc +-CFLAGS ?= -O3 -g +-CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings +-CFLAGS += $(shell libgcrypt-config --cflags) ++CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include $(OFLAGS) '-DVERSION="$(shell cat VERSION)"' + CPPFLAGS += -DVERSION=\"$(VERSION)\" $(OPENSSL_GPL_VIOLATION) +-LDFLAGS ?= -g +-LDFLAGS += $(shell libgcrypt-config --libs) $(OPENSSLLIBS) ++LDFLAGS = -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lgcrypt -lgpg-error + +-ifeq ($(shell uname -s), SunOS) ++ifeq ($(OS), SunOS) + LDFLAGS += -lnsl -lresolv -lsocket + endif + ifneq (,$(findstring Apple,$(shell $(CC) --version))) diff --git a/net/vpnc/patches/002-vpn_script.patch b/net/vpnc/patches/002-vpn_script.patch new file mode 100644 index 0000000..5a0ebce --- /dev/null +++ b/net/vpnc/patches/002-vpn_script.patch @@ -0,0 +1,41 @@ +--- a/vpnc-script.in ++++ b/vpnc-script.in +@@ -97,7 +97,7 @@ do_ifconfig() { + fi + + # Point to point interface require a netmask of 255.255.255.255 on some systems +- ifconfig "$TUNDEV" inet "$INTERNAL_IP4_ADDRESS" $ifconfig_syntax_ptp "$INTERNAL_IP4_ADDRESS" netmask 255.255.255.255 mtu ${MTU} up ++ ifconfig "$TUNDEV" "$INTERNAL_IP4_ADDRESS" $ifconfig_syntax_ptp "$INTERNAL_IP4_ADDRESS" netmask 255.255.255.255 mtu ${MTU} up + + if [ -n "$INTERNAL_IP4_NETMASK" ]; then + set_network_route $INTERNAL_IP4_NETADDR $INTERNAL_IP4_NETMASK $INTERNAL_IP4_NETMASKLEN +@@ -503,6 +503,18 @@ do_disconnect() { + destroy_tun_device + } + ++start_vpn_nat() { ++ iptables -A forwarding_rule -o $TUNDEV -j ACCEPT ++ iptables -A forwarding_rule -i $TUNDEV -j ACCEPT ++ iptables -t nat -A postrouting_rule -o $TUNDEV -j MASQUERADE ++} ++ ++stop_vpn_nat() { ++ iptables -t nat -D postrouting_rule -o $TUNDEV -j MASQUERADE ++ iptables -D forwarding_rule -i $TUNDEV -j ACCEPT ++ iptables -D forwarding_rule -o $TUNDEV -j ACCEPT ++} ++ + #### Main + + if [ -z "$reason" ]; then +@@ -516,8 +528,10 @@ case "$reason" in + ;; + connect) + do_connect ++ start_vpn_nat + ;; + disconnect) ++ stop_vpn_nat + do_disconnect + ;; + *) diff --git a/net/vpnc/patches/003-no_makeman.patch b/net/vpnc/patches/003-no_makeman.patch new file mode 100644 index 0000000..ef01643 --- /dev/null +++ b/net/vpnc/patches/003-no_makeman.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -69,7 +69,7 @@ vpnc : $(OBJS) vpnc.o + $(CC) -o $@ $^ $(LDFLAGS) + + vpnc.8 : vpnc.8.template makeman.pl vpnc +- ./makeman.pl ++ touch vpnc.8 + + vpnc-script : vpnc-script.in + sed -e 's,@''PREFIX''@,$(PREFIX),g' $< > $@ && chmod 755 $@ diff --git a/net/vpzone/Makefile b/net/vpzone/Makefile new file mode 100644 index 0000000..2b19876 --- /dev/null +++ b/net/vpzone/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vpzone +PKG_VERSION:=0.1.2 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/vpzone +PKG_MD5SUM:=9b8a142a217f69ece0163b2026dc8585 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/vpzone + CATEGORY:=Network + SECTION:=net + SUBMENU:=VPN + TITLE:=A flexible multipurpose layer 3 VPN daemon + URL:=http://vpzone.sourceforge.net/ + DEPENDS:=+libcares +libevent +libgnutls +kmod-ipv6 +kmod-tun +endef + +define Package/vpzone/conffiles +/etc/vpzone/vpzone.conf +endef + +define Package/vpzone/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/vpzone $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/vpzone + $(CP) $(PKG_INSTALL_DIR)/usr/lib/vpzone/*.so $(1)/usr/lib/vpzone/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/vpzone.init $(1)/etc/init.d/vpzone + $(INSTALL_DIR) $(1)/etc/vpzone + $(INSTALL_CONF) ./files/vpzone.conf $(1)/etc/vpzone/ +endef + +$(eval $(call BuildPackage,vpzone)) diff --git a/net/vpzone/files/vpzone.conf b/net/vpzone/files/vpzone.conf new file mode 100644 index 0000000..9a7940b --- /dev/null +++ b/net/vpzone/files/vpzone.conf @@ -0,0 +1,28 @@ +# vpzone.conf - vpzone configuration file + +log-file /var/log/vpzone.log +log-level 3 + +load tcp # mandatory +#load udp +#load gnutls +#load babeld +#load simple_vp +#load manage + +device vpz0 + +dev-ip fe80::8c7:3280:8ae3:6882/64 # mandatory link-local ip address +dev-ip 2001:218:420::45/64 # mandatory VPN ip address + +group nogroup +user nobody + +#server tcp:ssl:0.0.0.0 + +#manage secret + +#cafile /etc/vpzone/ca.crt +#crlfile /etc/vpzone/crl.pem +#dhfile /etc/vpzone/dh.pem +#certnkey-files /etc/vpzone/cert.crt /etc/vpzone/keyfile diff --git a/net/vpzone/files/vpzone.init b/net/vpzone/files/vpzone.init new file mode 100644 index 0000000..8007ff7 --- /dev/null +++ b/net/vpzone/files/vpzone.init @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common + +START=50 +DAEMON=vpzone +PID_F=/var/run/$DAEMON.pid + +start() { + start-stop-daemon -p $PID_F -x $DAEMON -S -b -m +} + +stop() { + start-stop-daemon -p $PID_F -x $DAEMON -K +} diff --git a/net/vpzone/patches/001-no_werror.patch b/net/vpzone/patches/001-no_werror.patch new file mode 100644 index 0000000..514bc79 --- /dev/null +++ b/net/vpzone/patches/001-no_werror.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -14776,7 +14776,7 @@ fi + + + +-VPZONE_CFLAGS="-std=gnu99 -Wall -Werror -Wextra -fdiagnostics-show-option ${DEV_CFLAGS}" ++VPZONE_CFLAGS="-std=gnu99 -Wall -Wextra -fdiagnostics-show-option ${DEV_CFLAGS}" + + VPZONE_LDFLAGS="-ldl -levent -lcares" + +--- a/configure.ac ++++ b/configure.ac +@@ -65,7 +65,7 @@ dnl # ####################### + dnl Compiler and Linker flags + dnl # ####################### + +-VPZONE_CFLAGS="-std=gnu99 -Wall -Werror -Wextra -fdiagnostics-show-option ${DEV_CFLAGS}" ++VPZONE_CFLAGS="-std=gnu99 -Wall -Wextra -fdiagnostics-show-option ${DEV_CFLAGS}" + AC_SUBST(VPZONE_CFLAGS) + VPZONE_LDFLAGS="-ldl -levent -lcares" + AC_SUBST(VPZONE_LDFLAGS) diff --git a/net/vpzone/patches/002-ipv6_inc_fix.patch b/net/vpzone/patches/002-ipv6_inc_fix.patch new file mode 100644 index 0000000..d062bcf --- /dev/null +++ b/net/vpzone/patches/002-ipv6_inc_fix.patch @@ -0,0 +1,11 @@ +--- a/src/include/iface.h ++++ b/src/include/iface.h +@@ -36,7 +36,7 @@ + /*A temporary and *dirty* fix against bad headers + on some system ( conflicting with )...*/ + #include +-#include ++/*#include */ + struct in6_ifreq + { + struct in6_addr ifr6_addr; diff --git a/net/vrrpd/Makefile b/net/vrrpd/Makefile new file mode 100644 index 0000000..daff298 --- /dev/null +++ b/net/vrrpd/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vrrpd +PKG_VERSION:=1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/vrrpd +PKG_MD5SUM:=6d5066ea1a6ced817376ca0f54765447 + +include $(INCLUDE_DIR)/package.mk + +define Package/vrrpd + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + TITLE:=Virtual Router Redundancy Protocol daemon + URL:=http://www.sourceforge.net/projects/vrrpd +endef + +define Package/vrrpd/description + VRRPd is an implementation of Virtual Router Redundancy + Protocol as specified in rfc2338. VRRPd is interoperable with + other RFC-based VRRP implementations, including Cisco and + Juniper, and is included as a standard feature on ImageStream + routers. +endef + +define Package/vrrpd/conffiles +/etc/default/vrrpd +endef + +define Build/Compile + $(call Build/Compile/Default, \ + DBG_OPT="" \ + MAIN_OPT="$(TARGET_CFLAGS)" \ + vrrpd \ + ) +endef + +define Package/vrrpd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/vrrpd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/default + $(INSTALL_DATA) ./files/vrrpd.default $(1)/etc/default/vrrpd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/vrrpd.init $(1)/etc/init.d/vrrpd +endef + +$(eval $(call BuildPackage,vrrpd)) diff --git a/net/vrrpd/files/vrrpd.default b/net/vrrpd/files/vrrpd.default new file mode 100644 index 0000000..0dfee0c --- /dev/null +++ b/net/vrrpd/files/vrrpd.default @@ -0,0 +1,4 @@ +ID=1 +IF=vlan1 +IP=10.0.0.1 +OPTIONS="-i $IF -v $ID $IP" diff --git a/net/vrrpd/files/vrrpd.init b/net/vrrpd/files/vrrpd.init new file mode 100644 index 0000000..33ee309 --- /dev/null +++ b/net/vrrpd/files/vrrpd.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=vrrpd +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN_${IF}_${ID}.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1 +} + diff --git a/net/vsftpd/Makefile b/net/vsftpd/Makefile new file mode 100644 index 0000000..a1e7147 --- /dev/null +++ b/net/vsftpd/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vsftpd +PKG_VERSION:=2.3.4 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://security.appspot.com/downloads/ +PKG_MD5SUM:=2ea5d19978710527bb7444d93b67767a + +include $(INCLUDE_DIR)/package.mk + +define Package/vsftpd + SUBMENU:=File Transfer + SECTION:=net + CATEGORY:=Network + TITLE:=A fast and secure FTP server + URL:=http://vsftpd.beasts.org/ + MAINTAINER:=Cezary Jackiewicz +endef + +define Package/vsftpd/conffiles +/etc/vsftpd.conf +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + vsftpd +endef + +define Package/vsftpd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) ./files/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME).conf + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,vsftpd)) diff --git a/net/vsftpd/files/vsftpd.conf b/net/vsftpd/files/vsftpd.conf new file mode 100644 index 0000000..f3ba34f --- /dev/null +++ b/net/vsftpd/files/vsftpd.conf @@ -0,0 +1,17 @@ +background=YES +listen=YES +anonymous_enable=NO +local_enable=YES +write_enable=YES +local_umask=022 +check_shell=NO +#dirmessage_enable=YES +#ftpd_banner=Welcome to blah FTP service. +session_support=NO +#syslog_enable=YES +#userlist_enable=YES +#userlist_deny=NO +#userlist_file=/etc/vsftpd.users +#xferlog_enable=YES +#xferlog_file=/var/log/vsftpd.log +#xferlog_std_format=YES diff --git a/net/vsftpd/files/vsftpd.init b/net/vsftpd/files/vsftpd.init new file mode 100644 index 0000000..303d6cf --- /dev/null +++ b/net/vsftpd/files/vsftpd.init @@ -0,0 +1,14 @@ +#!/bin/sh /etc/rc.common + +START=50 + +RUN_D=/var/run/vsftpd + +start() { + [ -d $RUN_D ] || mkdir -p $RUN_D + vsftpd +} + +stop() { + killall vsftpd +} diff --git a/net/vsftpd/patches/001-destdir.patch b/net/vsftpd/patches/001-destdir.patch new file mode 100644 index 0000000..33897b2 --- /dev/null +++ b/net/vsftpd/patches/001-destdir.patch @@ -0,0 +1,47 @@ +--- a/Makefile ++++ b/Makefile +@@ -17,6 +17,8 @@ OBJS = main.o utility.o prelogin.o ftpcm + ssl.o sslslave.o ptracesandbox.o ftppolicy.o sysutil.o sysdeputil.o + + ++DESTDIR = ++ + .c.o: + $(CC) -c $*.c $(CFLAGS) $(IFLAGS) + +@@ -24,21 +26,20 @@ vsftpd: $(OBJS) + $(CC) -o vsftpd $(OBJS) $(LINK) $(LIBS) $(LDFLAGS) + + install: +- if [ -x /usr/local/sbin ]; then \ +- $(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \ +- else \ +- $(INSTALL) -m 755 vsftpd /usr/sbin/vsftpd; fi +- if [ -x /usr/local/man ]; then \ +- $(INSTALL) -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \ +- $(INSTALL) -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \ +- elif [ -x /usr/share/man ]; then \ +- $(INSTALL) -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \ +- $(INSTALL) -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \ +- else \ +- $(INSTALL) -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \ +- $(INSTALL) -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi +- if [ -x /etc/xinetd.d ]; then \ +- $(INSTALL) -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi ++ mkdir -p $(DESTDIR)/usr/sbin ++ $(INSTALL) -m 755 vsftpd $(DESTDIR)/usr/sbin/ ++ mkdir -p $(DESTDIR)/usr/share/man/man8 ++ $(INSTALL) -m 644 vsftpd.8 $(DESTDIR)/usr/share/man/man8/ ++ mkdir -p $(DESTDIR)/usr/share/man/man5 ++ $(INSTALL) -m 644 vsftpd.conf.5 $(DESTDIR)/usr/share/man/man5/ ++ mkdir -p $(DESTDIR)/etc/xinetd.d ++ $(INSTALL) -m 644 xinetd.d/vsftpd $(DESTDIR)/etc/xinetd.d/ ++ ++uninstall: ++ rm -f $(DESTDIR)/usr/sbin/vsftpd ++ rm -f $(DESTDIR)/usr/share/man/man8/vsftpd.8 ++ rm -f $(DESTDIR)/usr/share/man/man5/vsftpd.conf.5 ++ rm -f $(DESTDIR)/etc/xinetd.d/vsftpd + + clean: + rm -f *.o *.swp vsftpd diff --git a/net/vsftpd/patches/002-find_libs.patch b/net/vsftpd/patches/002-find_libs.patch new file mode 100644 index 0000000..11a0308 --- /dev/null +++ b/net/vsftpd/patches/002-find_libs.patch @@ -0,0 +1,13 @@ +--- a/Makefile ++++ b/Makefile +@@ -5,8 +5,8 @@ IFLAGS = -idirafter dummyinc + #CFLAGS = -g + CFLAGS = -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion + +-LIBS = `./vsf_findlibs.sh` +-LINK = -Wl,-s ++LIBS = -lcrypt -lnsl ++LINK = + + OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ + tunables.o ftpdataio.o secbuf.o ls.o \ diff --git a/net/vsftpd/patches/003-chroot.patch b/net/vsftpd/patches/003-chroot.patch new file mode 100644 index 0000000..bf7318e --- /dev/null +++ b/net/vsftpd/patches/003-chroot.patch @@ -0,0 +1,11 @@ +--- a/tunables.c ++++ b/tunables.c +@@ -244,7 +244,7 @@ tunables_load_defaults() + /* -rw------- */ + tunable_chown_upload_mode = 0600; + +- install_str_setting("/usr/share/empty", &tunable_secure_chroot_dir); ++ install_str_setting("/var/run/vsftpd", &tunable_secure_chroot_dir); + install_str_setting("ftp", &tunable_ftp_username); + install_str_setting("root", &tunable_chown_username); + install_str_setting("/var/log/xferlog", &tunable_xferlog_file); diff --git a/net/vtun/Makefile b/net/vtun/Makefile new file mode 100644 index 0000000..730e6f4 --- /dev/null +++ b/net/vtun/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vtun +PKG_VERSION:=3.0.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/vtun +PKG_MD5SUM:=d3d8bc4d58886498a1c338670eab9315 + +include $(INCLUDE_DIR)/package.mk + +define Package/vtun + SECTION:=net + CATEGORY:=Network + DEPENDS:=+kmod-tun +liblzo +libopenssl + TITLE:=VPN tunneling daemon + URL:=http://vtun.sourceforge.net + SUBMENU:=VPN +endef + +define Package/vtun/conffiles +/etc/vtund.conf +endef + +CONFIGURE_ARGS += \ + --with-lzo-headers="$(STAGING_DIR)/usr/include/lzo" \ + --with-lzo-lib="$(STAGING_DIR)/usr/lib/" \ + --with-ssl-headers="$(STAGING_DIR)/usr/include/openssl" \ + +CONFIGURE_VARS += \ + LIBS="$(TARGET_LDFLAGS)" \ + BLOWFISH_HDR_DIR="$(STAGING_DIR)/usr/include/openssl" \ + LZO_HDR_DIR="$(STAGING_DIR)/usr/include/lzo" \ + SSL_HDR_DIR="$(STAGING_DIR)/usr/include/openssl" \ + +define Build/Compile + $(call Build/Compile/Default,vtund) +endef + +define Package/vtun/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/vtund.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/vtund $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,vtun)) diff --git a/net/vtun/patches/100-lzo2.patch b/net/vtun/patches/100-lzo2.patch new file mode 100644 index 0000000..fa9ba8b --- /dev/null +++ b/net/vtun/patches/100-lzo2.patch @@ -0,0 +1,37 @@ +--- a/configure ++++ b/configure +@@ -5459,7 +5459,7 @@ echo $ECHO_N "checking \"for lzo_asm.h\" + fi + echo "$as_me:$LINENO: result: ($dir) yes " >&5 + echo "${ECHO_T}($dir) yes " >&6 +- LZOCHK="lzo2 lzo" ++ LZOCHK="lzo2" + else + echo "$as_me:$LINENO: result: \"no\"" >&5 + echo "${ECHO_T}\"no\"" >&6 +@@ -5504,8 +5504,7 @@ echo "${ECHO_T}($dir) yes " >&6 + echo "$as_me:$LINENO: result: \"no\"" >&5 + echo "${ECHO_T}\"no\"" >&6 + { { echo "$as_me:$LINENO: error: LZO library not found. " >&5 +-echo "$as_me: error: LZO library not found. " >&2;} +- { (exit 1); exit 1; }; } ++echo "$as_me: error: LZO library not found. " >&2;} } + + fi + +@@ -5598,13 +5597,11 @@ fi + done + if test $havelzo = 0; then + { { echo "$as_me:$LINENO: error: LZO library not found. " >&5 +-echo "$as_me: error: LZO library not found. " >&2;} +- { (exit 1); exit 1; }; } ++echo "$as_me: error: LZO library not found. " >&2;} } + fi + else + { { echo "$as_me:$LINENO: error: LZO headers not found. " >&5 +-echo "$as_me: error: LZO headers not found. " >&2;} +- { (exit 1); exit 1; }; } ++echo "$as_me: error: LZO headers not found. " >&2;} } + fi + fi + diff --git a/net/wavemon/Makefile b/net/wavemon/Makefile new file mode 100644 index 0000000..192b4ac --- /dev/null +++ b/net/wavemon/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wavemon +PKG_VERSION:=0.7.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://eden-feed.erg.abdn.ac.uk/wavemon/stable-releases +PKG_MD5SUM:=0dec700364df7bfb2e066624d0acf7bb + +include $(INCLUDE_DIR)/package.mk + +define Package/wavemon + SECTION:=net + CATEGORY:=Network + TITLE:=N-curses based wireless network devices monitor + DEPENDS:= +libncurses + SUBMENU:=wireless + URL:=http://eden-feed.erg.abdn.ac.uk/wavemon/ +endef + +define Package/wavemon/description + wavemon is a ncurses-based monitoring application for wireless network + devices. It currently works under Linux with devices that are supported + by the wireless extensions by Jean Tourrilhes (included in Kernel 2.4 + and higher), e.g. the Lucent Orinoco cards. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -L${STAGING_DIR}/usr/lib -I${STAGING_DIR}/usr/include" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all +endef + +define Package/wavemon/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/wavemon $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,wavemon)) diff --git a/net/wavemon/patches/000-upstream-config_menu.patch b/net/wavemon/patches/000-upstream-config_menu.patch new file mode 100644 index 0000000..38b9d05 --- /dev/null +++ b/net/wavemon/patches/000-upstream-config_menu.patch @@ -0,0 +1,32 @@ +From: Gerrit Renker +Date: Sat, 12 Mar 2011 19:32:56 +0000 (+0100) +Subject: Configuration screen: memorize last active line +X-Git-Url: http://eden-feed.erg.abdn.ac.uk/cgi-bin/gitweb.cgi?p=wavemon.git;a=commitdiff_plain;h=094538edab8a590ffb14af2101725563d2453104 + +Configuration screen: memorize last active line + +This fixes a bug in the configuration menu - the last active line was not +reset properly when switching back from another window. Changed it in such +a way that it now memorizes the last active position, which is handy when +trying out different values for a given parameter. +--- + +diff --git a/conf_scr.c b/conf_scr.c +index b9aba23..a338771 100644 +--- a/conf_scr.c ++++ b/conf_scr.c +@@ -165,9 +165,11 @@ void scr_conf_init(void) + w_conf = newwin_title(0, WAV_HEIGHT, "Preferences", false); + w_confpad = newpad(num_items + 1, CONF_SCREEN_WIDTH); + +- while ((item = ll_get(conf_items, active_item)) && item->type == t_sep) +- active_item++; +- first_item = active_item; ++ if (first_item) /* already initialized */ ++ return; ++ while ((item = ll_get(conf_items, first_item)) && item->type == t_sep) ++ first_item++; ++ active_item = first_item; + } + + int scr_conf_loop(WINDOW *w_menu) diff --git a/net/wavemon/patches/000-upstream-negative.patch b/net/wavemon/patches/000-upstream-negative.patch new file mode 100644 index 0000000..3e3cedf --- /dev/null +++ b/net/wavemon/patches/000-upstream-negative.patch @@ -0,0 +1,40 @@ +From: Gerrit Renker +Date: Sat, 12 Mar 2011 19:00:32 +0000 (+0100) +Subject: Info screen: fix a bug in the random level code +X-Git-Url: http://eden-feed.erg.abdn.ac.uk/cgi-bin/gitweb.cgi?p=wavemon.git;a=commitdiff_plain;h=cc8235c4b4ab30898fd60f3ad71b7899cf1bdd66 + +Info screen: fix a bug in the random level code + +The link quality was not converted back correctly, causing negative +values, which then overran the maximum value. +--- + +diff --git a/iw_if.c b/iw_if.c +index ae5950a..2008c14 100644 +--- a/iw_if.c ++++ b/iw_if.c +@@ -369,7 +369,6 @@ static int rand_wave(float *rlvl, float *step, float *rlvl_next, float range) + static void iw_getstat_random(struct iw_stat *iw) + { + static float rnd_sig, snext, sstep = 1.0, rnd_noise, nnext, nstep = 1.0; +- uint8_t smin = dbm_to_u8(conf.sig_min), smax = dbm_to_u8(conf.sig_max); + + rand_wave(&rnd_sig, &sstep, &snext, conf.sig_max - conf.sig_min); + rand_wave(&rnd_noise, &nstep, &nnext, conf.noise_max - conf.noise_min); +@@ -377,11 +376,12 @@ static void iw_getstat_random(struct iw_stat *iw) + if (iw->range.max_qual.qual == 0) + iw->range.max_qual.qual = WAVE_RAND_QUAL_MAX; + +- iw->stat.qual.level = smin + rnd_sig; +- iw->stat.qual.noise = dbm_to_u8(conf.noise_min) + rnd_noise; +- iw->stat.qual.qual = map_range(iw->stat.qual.level, smin, smax, +- 0, iw->range.max_qual.qual); ++ iw->stat.qual.level = dbm_to_u8(conf.sig_min + rnd_sig); ++ iw->stat.qual.noise = dbm_to_u8(conf.noise_min + rnd_noise); + iw->stat.qual.updated = IW_QUAL_DBM; ++ iw->stat.qual.qual = map_range(conf.sig_min + rnd_sig, ++ conf.sig_min, conf.sig_max, ++ 0, iw->range.max_qual.qual); + } + + static void iw_getstat_real(struct iw_statistics *stat) diff --git a/net/wavemon/patches/000-upstream-terminate.patch b/net/wavemon/patches/000-upstream-terminate.patch new file mode 100644 index 0000000..d07ac04 --- /dev/null +++ b/net/wavemon/patches/000-upstream-terminate.patch @@ -0,0 +1,90 @@ +From: Gerrit Renker +Date: Sun, 27 Feb 2011 20:41:48 +0000 (+0100) +Subject: Better termination +X-Git-Url: http://eden-feed.erg.abdn.ac.uk/cgi-bin/gitweb.cgi?p=wavemon.git;a=commitdiff_plain;h=633c66a214c68af9a54d123307dc1e1209240472 + +Better termination + +This fixes two flaws in the attempt to terminate the other wavemon processes +on error: (i) it was not ensured that wavemon runs in its own process group; +(ii) sending the signal to self is ugly. +--- + +diff --git a/error.c b/error.c +index 592d3e4..5408c07 100644 +--- a/error.c ++++ b/error.c +@@ -59,6 +59,34 @@ void err_msg(const char *format, ...) + sleep(WARN_DISPLAY_DELAY); + } + ++/** ++ * terminate_all_processes - terminate wavemon and reset screen ++ * @fmt: printf-like format string ++ * @strerr: set to non-0 if termination is due to failed system call ++ * @ap: argument list for @fmt ++ */ ++static void terminate_all_processes(const char *fmt, int strerr, va_list ap) ++{ ++ int saved_errno = strerr ? errno : 0; ++ /* ++ * wavemon runs in its own process group. Block TERM in this process, ++ * but send to all others (parent or child), which by default do not ++ * block TERM. ++ */ ++ xsignal(SIGTERM, SIG_IGN); ++ endwin(); ++ kill(0, SIGTERM); ++ reset_shell_mode(); ++ if (saved_errno) { ++ errno = saved_errno; ++ vwarn(fmt, ap); ++ } else { ++ vwarnx(fmt, ap); ++ } ++ va_end(ap); ++ exit(EXIT_FAILURE); ++} ++ + /* + * Abort on fatal error unrelated to system call. + */ +@@ -66,13 +94,8 @@ void err_quit(const char *format, ...) + { + va_list argp; + +- endwin(); +- + va_start(argp, format); +- vwarnx(format, argp); +- va_end(argp); +- /* Exit via kill to terminate any child processes. */ +- kill(0, SIGTERM); ++ terminate_all_processes(format, false, argp); + } + + /* +@@ -82,10 +105,6 @@ void err_sys(const char *format, ...) + { + va_list argp; + +- endwin(); +- + va_start(argp, format); +- vwarn(format, argp); +- va_end(argp); +- kill(0, SIGTERM); ++ terminate_all_processes(format, true, argp); + } +diff --git a/wavemon.c b/wavemon.c +index 6c3196e..4e1f492 100644 +--- a/wavemon.c ++++ b/wavemon.c +@@ -139,6 +139,7 @@ int main(int argc, char *argv[]) + + if (!isatty(STDIN_FILENO)) + errx(1, "input is not from a terminal"); ++ setpgid(0, 0); + + /* honour numeric separators if the environment defines them */ + setlocale(LC_NUMERIC, ""); diff --git a/net/wavemon/patches/000-upstream-wrapper.patch b/net/wavemon/patches/000-upstream-wrapper.patch new file mode 100644 index 0000000..9f95864 --- /dev/null +++ b/net/wavemon/patches/000-upstream-wrapper.patch @@ -0,0 +1,397 @@ +From: Gerrit Renker +Date: Sun, 13 Mar 2011 17:39:40 +0000 (+0100) +Subject: Configuration: decouple configuration items +X-Git-Url: http://eden-feed.erg.abdn.ac.uk/cgi-bin/gitweb.cgi?p=wavemon.git;a=commitdiff_plain;h=74610068abe331927f72aa617689566a2b2a7771 + +Configuration: decouple configuration items + +This puts access to WiFi interface list and currently selected interface +into wrapper functions, to better separate the code blocks. +--- + +diff --git a/conf.c b/conf.c +index 4004c73..45fa42e 100644 +--- a/conf.c ++++ b/conf.c +@@ -22,6 +22,7 @@ + #include + + /* GLOBALS */ ++static char **if_list; /* array of WiFi interface names */ + int conf_items; /* index into array storing menu items */ + + static char *on_off_names[] = { [false] = "Off", [true] = "On", NULL }; +@@ -116,6 +117,39 @@ static void getargs(int argc, char *argv[]) + } + } + ++/** Populate interface list */ ++void conf_get_interface_list(void) ++{ ++ char *old_if = NULL; ++ int idx; ++ ++ if (if_list) { ++ for (idx = 0; if_list[idx]; idx++) ++ if (idx == conf.if_idx) ++ old_if = if_list[idx]; ++ else ++ free(if_list[idx]); ++ free(if_list); ++ } ++ if_list = iw_get_interface_list(); ++ if (if_list == NULL) ++ err_quit("no wireless interfaces found!"); ++ ++ conf.if_idx = 0; ++ if (old_if) { ++ idx = argv_find(if_list, old_if); ++ if (idx > 0) ++ conf.if_idx = idx; ++ free(old_if); ++ } ++} ++ ++/** Return currently selected interface name */ ++const char *conf_ifname(void) ++{ ++ return if_list ? if_list[conf.if_idx] : "(none)"; ++} ++ + /* Return full path of rcfile. Allocates string which must bee free()-d. */ + static char *get_confname(void) + { +@@ -520,7 +554,7 @@ static void init_conf_items(void) + + void getconf(int argc, char *argv[]) + { +- iw_get_interface_list(); ++ conf_get_interface_list(); + init_conf_items(); + read_cf(); + getargs(argc, argv); +diff --git a/conf_scr.c b/conf_scr.c +index a338771..674137c 100644 +--- a/conf_scr.c ++++ b/conf_scr.c +@@ -159,7 +159,7 @@ static int m_pref(WINDOW *w_conf, int list_offset, int active_item, int num_item + + void scr_conf_init(void) + { +- iw_get_interface_list(); /* may have changed in the meantime */ ++ conf_get_interface_list(); /* may have changed in the meantime */ + + num_items = ll_size(conf_items); + w_conf = newwin_title(0, WAV_HEIGHT, "Preferences", false); +diff --git a/info_scr.c b/info_scr.c +index 8171373..d17fdfa 100644 +--- a/info_scr.c ++++ b/info_scr.c +@@ -30,7 +30,7 @@ void sampling_init(void (*sampling_handler)(int)) + div_t d = div(conf.stat_iv, 1000); /* conf.stat_iv in msec */ + + xsignal(SIGALRM, SIG_IGN); +- iw_getinf_range(if_list[conf.if_idx], &cur.range); ++ iw_getinf_range(conf_ifname(), &cur.range); + i.it_interval.tv_sec = i.it_value.tv_sec = d.quot; + i.it_interval.tv_usec = i.it_value.tv_usec = d.rem * 1000; + xsignal(SIGALRM, sampling_handler); +@@ -139,7 +139,7 @@ static void display_stats(void) + struct if_stat nstat; + char tmp[0x100]; + +- if_getstat(if_list[conf.if_idx], &nstat); ++ if_getstat(conf_ifname(), &nstat); + + /* + * Interface RX stats +@@ -197,10 +197,10 @@ static void display_info(WINDOW *w_if, WINDOW *w_info) + char tmp[0x100]; + int i; + +- dyn_info_get(&info, if_list[conf.if_idx], &cur.range); ++ dyn_info_get(&info, conf_ifname(), &cur.range); + + wmove(w_if, 1, 1); +- waddstr_b(w_if, if_list[conf.if_idx]); ++ waddstr_b(w_if, conf_ifname()); + if (cur.range.enc_capa & IW_WPA_MASK) + sprintf(tmp, " (%s, %s)", info.name, format_wpa(&cur.range)); + else +@@ -416,11 +416,11 @@ static void display_netinfo(WINDOW *w_net) + struct if_info info; + char tmp[0x40]; + +- if_getinf(if_list[conf.if_idx], &info); ++ if_getinf(conf_ifname(), &info); + + wmove(w_net, 1, 1); + if (getmaxy(w_net) == WH_NET_MAX) { +- waddstr(w_net, if_list[conf.if_idx]); ++ waddstr(w_net, conf_ifname()); + + waddstr_b(w_net, " ("); + waddstr(w_net, info.flags & IFF_UP ? "UP" : "DOWN"); +diff --git a/iw_if.c b/iw_if.c +index 2008c14..708ff85 100644 +--- a/iw_if.c ++++ b/iw_if.c +@@ -24,9 +24,6 @@ + /* Fallback maximum quality level when using random samples. */ + #define WAVE_RAND_QUAL_MAX 100 + +-/* GLOBALS */ +-char **if_list = NULL; /* array of WiFi interface names */ +- + /* + * Obtain network device information + */ +@@ -65,7 +62,7 @@ int if_set_up(int skfd, const char *ifname) + } + + /* Interface information */ +-void if_getinf(char *ifname, struct if_info *info) ++void if_getinf(const char *ifname, struct if_info *info) + { + struct ifreq ifr; + int skfd = socket(AF_INET, SOCK_DGRAM, 0); +@@ -114,49 +111,27 @@ static FILE *open_proc_net(const char *filename) + } + + /** +- * iw_get_interface_list - Populate NULL-terminated array of WiFi interfaces. +- * Rebuild if already set, exit if no interfaces present. ++ * iw_get_interface_list - Return NULL-terminated array of WiFi interfaces. + */ +-void iw_get_interface_list(void) ++char **iw_get_interface_list(void) + { +- char *p, tmp[IFNAMSIZ], *old_if = NULL; +- int idx, nifs; ++ char **if_list = NULL, *p, tmp[BUFSIZ]; ++ int nifs = 1; /* if_list[nifs-1] = NULL */ + FILE *fp = open_proc_net("wireless"); + +- if (if_list) { +- for (idx = 0; if_list[idx]; idx++) +- if (idx == conf.if_idx) +- old_if = if_list[idx]; +- else +- free(if_list[idx]); +- free(if_list); +- } +- +- for (nifs = 0; fgets(tmp, sizeof(tmp), fp); ) +- nifs += strchr(tmp, ':') != NULL; +- if (!nifs) +- err_quit("no wireless interfaces found!"); +- rewind(fp); +- +- if_list = calloc(nifs + 1, sizeof(*if_list)); +- if (if_list == NULL) +- err_sys("unable to memorize %d interfaces", nifs); +- +- for (conf.if_idx = idx = 0; fgets(tmp, sizeof(tmp), fp); ) { ++ while (fgets(tmp, sizeof(tmp), fp)) + if ((p = strchr(tmp, ':'))) { ++ if_list = realloc(if_list, sizeof(char *) * (nifs + 1)); + for (*p = '\0', p = tmp; isspace(*p); ) + p++; +- if (old_if && strcmp(old_if, p) == 0) +- conf.if_idx = idx; +- if_list[idx++] = strdup(p); ++ if_list[nifs-1] = strdup(p); ++ if_list[nifs++] = NULL; + } +- } +- assert(idx == nifs); + fclose(fp); +- free(old_if); ++ return if_list; + } + +-void if_getstat(char *ifname, struct if_stat *stat) ++void if_getstat(const char *ifname, struct if_stat *stat) + { + char line[0x100]; + unsigned long d; +@@ -187,7 +162,8 @@ void if_getstat(char *ifname, struct if_stat *stat) + * @ifname: interface name + * @if: range information to use (number of encryption keys) + */ +-void dyn_info_get(struct iw_dyn_info *info, char *ifname, struct iw_range *ir) ++void dyn_info_get(struct iw_dyn_info *info, ++ const char *ifname, struct iw_range *ir) + { + struct iwreq iwr; + int i, skfd = socket(AF_INET, SOCK_DGRAM, 0); +@@ -321,7 +297,7 @@ void dyn_info_cleanup(struct iw_dyn_info *info) + /* + * get range information + */ +-void iw_getinf_range(char *ifname, struct iw_range *range) ++void iw_getinf_range(const char *ifname, struct iw_range *range) + { + struct iwreq iwr; + int skfd = socket(AF_INET, SOCK_DGRAM, 0); +@@ -395,7 +371,7 @@ static void iw_getstat_real(struct iw_statistics *stat) + wrq.u.data.pointer = (caddr_t) stat; + wrq.u.data.length = sizeof(*stat); + wrq.u.data.flags = 0; +- strncpy(wrq.ifr_name, if_list[conf.if_idx], IFNAMSIZ); ++ strncpy(wrq.ifr_name, conf_ifname(), IFNAMSIZ); + + if (ioctl(skfd, SIOCGIWSTATS, &wrq) < 0) { + /* +@@ -490,13 +466,13 @@ void dump_parameters(void) + struct if_stat nstat; + int i; + +- iw_getinf_range(if_list[conf.if_idx], &iw.range); +- dyn_info_get(&info, if_list[conf.if_idx], &iw.range); ++ iw_getinf_range(conf_ifname(), &iw.range); ++ dyn_info_get(&info, conf_ifname(), &iw.range); + iw_getstat(&iw); +- if_getstat(if_list[conf.if_idx], &nstat); ++ if_getstat(conf_ifname(), &nstat); + + printf("\n"); +- printf("Configured device: %s (%s)\n", if_list[conf.if_idx], info.name); ++ printf("Configured device: %s (%s)\n", conf_ifname(), info.name); + printf(" Security: %s\n", iw.range.enc_capa ? + format_enc_capab(iw.range.enc_capa, ", ") : "WEP"); + if (iw.range.num_encoding_sizes && +diff --git a/iw_if.h b/iw_if.h +index 80e6595..636a63a 100644 +--- a/iw_if.h ++++ b/iw_if.h +@@ -71,7 +71,7 @@ struct if_info { + }; + extern bool if_is_up(int skfd, const char *ifname); + extern int if_set_up(int skfd, const char *ifname); +-extern void if_getinf(char *ifname, struct if_info *info); ++extern void if_getinf(const char *ifname, struct if_info *info); + + /** + * struct iw_key - Encoding information +@@ -174,7 +174,8 @@ static inline uint8_t dyn_info_wep_keys(struct iw_dyn_info *info) + info->keys[i].size == 13; + return num_wep; + } +-extern void dyn_info_get(struct iw_dyn_info *, char *ifname, struct iw_range *); ++extern void dyn_info_get(struct iw_dyn_info *info, ++ const char *ifname, struct iw_range *ir); + extern void dyn_info_cleanup(struct iw_dyn_info *info); + + +@@ -188,7 +189,7 @@ struct if_stat { + tx_bytes; + }; + +-extern void if_getstat(char *ifname, struct if_stat *stat); ++extern void if_getstat(const char *ifname, struct if_stat *stat); + + /* + * Structs to communicate WiFi statistics +@@ -200,7 +201,7 @@ struct iw_levelstat { + }; + #define IW_LSTAT_INIT { 0, 0, IW_QUAL_LEVEL_INVALID | IW_QUAL_NOISE_INVALID } + +-extern void iw_getinf_range(char *ifname, struct iw_range *range); ++extern void iw_getinf_range(const char *ifname, struct iw_range *range); + extern void iw_sanitize(struct iw_range *range, + struct iw_quality *qual, + struct iw_levelstat *dbm); +@@ -250,7 +251,7 @@ struct scan_result { + + struct scan_result *next; + }; +-extern struct scan_result *get_scan_list(int skfd, char *ifname, int weversion); ++extern struct scan_result *get_scan_list(int skfd, const char *ifname, int ver); + extern void free_scan_result(struct scan_result *head); + + +diff --git a/iw_scan.c b/iw_scan.c +index d75ab6b..8423e6a 100644 +--- a/iw_scan.c ++++ b/iw_scan.c +@@ -553,7 +553,7 @@ static int cmp_scan_sig(struct scan_result *a, struct scan_result *b) + return a->qual.level - b->qual.level; + } + +-struct scan_result *get_scan_list(int skfd, char *ifname, int we_version) ++struct scan_result *get_scan_list(int skfd, const char *ifname, int we_version) + { + struct scan_result *head = NULL; + struct iwreq wrq; +diff --git a/scan_scr.c b/scan_scr.c +index 879c2f6..b9a4eee 100644 +--- a/scan_scr.c ++++ b/scan_scr.c +@@ -80,9 +80,9 @@ static void display_aplist(WINDOW *w_aplst) + if (skfd < 0) + err_sys("%s: can not open socket", __func__); + +- iw_getinf_range(if_list[conf.if_idx], &range); ++ iw_getinf_range(conf_ifname(), &range); + +- head = get_scan_list(skfd, if_list[conf.if_idx], range.we_version_compiled); ++ head = get_scan_list(skfd, conf_ifname(), range.we_version_compiled); + if (head) { + ; + } else if (errno == EPERM || !has_net_admin_capability()) { +@@ -93,13 +93,13 @@ static void display_aplist(WINDOW *w_aplst) + } else if (errno == EINTR || errno == EAGAIN || errno == EBUSY) { + /* Ignore temporary errors */ + goto done; +- } else if (!if_is_up(skfd, if_list[conf.if_idx])) { +- sprintf(s, "Interface '%s' is down ", if_list[conf.if_idx]); ++ } else if (!if_is_up(skfd, conf_ifname())) { ++ sprintf(s, "Interface '%s' is down ", conf_ifname()); + if (!has_net_admin_capability()) + strcat(s, "- can not scan"); +- else if (if_set_up(skfd, if_list[conf.if_idx]) < 0) ++ else if (if_set_up(skfd, conf_ifname()) < 0) + sprintf(s, "Can not bring up '%s' for scanning: %s", +- if_list[conf.if_idx], strerror(errno)); ++ conf_ifname(), strerror(errno)); + else + strcat(s, "- setting it up ..."); + } else if (errno == EFAULT) { +@@ -110,9 +110,9 @@ static void display_aplist(WINDOW *w_aplst) + */ + goto done; + } else if (errno) { +- sprintf(s, "No scan on %s: %s", if_list[conf.if_idx], strerror(errno)); ++ sprintf(s, "No scan on %s: %s", conf_ifname(), strerror(errno)); + } else { +- sprintf(s, "No scan results on %s", if_list[conf.if_idx]); ++ sprintf(s, "No scan results on %s", conf_ifname()); + } + + for (i = 1; i <= MAXYLEN; i++) +diff --git a/wavemon.h b/wavemon.h +index 22a783f..ad0b488 100644 +--- a/wavemon.h ++++ b/wavemon.h +@@ -103,7 +103,7 @@ static inline void threshold_action(enum threshold_action action) + * Global in-memory representation of current wavemon configuration state + */ + extern struct wavemon_conf { +- int if_idx; /* Index into if_list */ ++ int if_idx; /* Index into interface list */ + + int stat_iv, + info_iv; +@@ -256,8 +256,9 @@ static inline int cp_from_scale(float value, const char *cscale, bool reverse) + /* + * Wireless interfaces + */ +-extern char **if_list; +-extern void iw_get_interface_list(void); ++extern const char *conf_ifname(void); ++extern void conf_get_interface_list(void); ++extern char **iw_get_interface_list(void); + extern void dump_parameters(void); + + /* diff --git a/net/wccpd/Makefile b/net/wccpd/Makefile new file mode 100644 index 0000000..67b0153 --- /dev/null +++ b/net/wccpd/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wccpd +PKG_VERSION:=0.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/wccpd +PKG_MD5SUM:=5f15c274de61dfb88e0dbfc1ccbe6b67 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/wccpd + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=a Web Cache Coordination daemon + URL:=http://wccpd.sourceforge.net/ +endef + +define Package/wccpd/description + wccpd is a WCCP (Web Cache Coordination Protocol) server daemon + It allows a router (running Linux) to redirect web traffic to a + group of Squid servers using WCCP as the monitoring/controling + protocol. +endef + +define Package/wccpd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/wccpd $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,wccpd)) diff --git a/net/wdiag/Makefile b/net/wdiag/Makefile new file mode 100644 index 0000000..2d6e497 --- /dev/null +++ b/net/wdiag/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wdiag +PKG_VERSION:=0.10 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=@SF/wdiag +PKG_MD5SUM:=83a4e5610ec8fa0166c57b9a25f0b069 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/wdiag + SECTION:=net + CATEGORY:=Network + TITLE:=Westell DSL Modem Diagnostics for Linux + URL:=http://sourceforge.net/projects/wdiag/ +endef + +define Package/wdiag/description +A collection of utilities to get DSL stats from Westell DSL modems. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/src \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" +endef + +define Package/wdiag/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/src/w{start,stop,estell} $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,wdiag)) diff --git a/net/weechat/Makefile b/net/weechat/Makefile new file mode 100644 index 0000000..0b7ec29 --- /dev/null +++ b/net/weechat/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=weechat +PKG_VERSION:=0.3.5 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.weechat.org/files/src +PKG_MD5SUM:=0d2a089bfbfa550e0c65618a171fb3c4 + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/weechat/Default + SUBMENU:=Instant Messaging + SECTION:=net + CATEGORY:=Network + TITLE:=Lightweight IRC client + URL:=http://www.weechat.org/ +endef + +define Package/weechat/Default/description + Weechat is fast, light & extensible IRC client. +endef + + +define Package/weechat +$(call Package/weechat/Default) + DEPENDS:=+libgnutls +libncursesw $(ICONV_DEPENDS) +endef + +define Package/weechat/description +$(call Package/weechat/Default/description) +endef + +CMAKE_OPTIONS+= \ + -DENABLE_PYTHON=OFF \ + -DENABLE_PERL=OFF \ + -DENABLE_LUA=OFF + +TARGET_LDFLAGS += \ + -L$(ICONV_PREFIX)/lib -ldl \ + -Wl,-rpath-link,$(STAGING_DIR)/usr/lib + +define Package/weechat/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/weechat-curses $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/weechat/plugins + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/weechat/plugins/* \ + $(1)/usr/lib/weechat/plugins/ +endef + +$(eval $(call BuildPackage,weechat)) diff --git a/net/wget/Makefile b/net/wget/Makefile new file mode 100644 index 0000000..7711efc --- /dev/null +++ b/net/wget/Makefile @@ -0,0 +1,124 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wget +PKG_VERSION:=1.13.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNU/$(PKG_NAME) +PKG_MD5SUM:=12115c3750a4d92f9c6ac62bac372e85 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/wget/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=File Transfer + TITLE:=Non-interactive network downloader + URL:=http://www.gnu.org/software/wget/index.html +endef + +define Package/wget/Default/description + Wget is a network utility to retrieve files from the Web using http + and ftp, the two most widely used Internet protocols. It works + non-interactively, so it will work in the background, after having + logged off. The program supports recursive retrieval of web-authoring + pages as well as ftp sites -- you can use wget to make mirrors of + archives and home pages or to travel the Web like a WWW robot. +endef + +define Package/wget +$(call Package/wget/Default) + DEPENDS+= +libopenssl + TITLE+= (with SSL support) + VARIANT:=ssl +endef + +define Package/wget/description +$(call Package/wget/Default/description) + This package is built with SSL support. +endef + +define Package/wget-nossl +$(call Package/wget/Default) + TITLE+= (without SSL support) + VARIANT:=nossl +endef + +define Package/wget-nossl/description +$(call Package/wget/Default/description) + This package is built without SSL support. +endef + +CONFIGURE_ARGS+= \ + --disable-rpath \ + --disable-iri + +ifeq ($(BUILD_VARIANT),ssl) + CONFIGURE_ARGS+= \ + --with-ssl=openssl \ + --with-libssl-prefix="$(STAGING_DIR)/usr" +endif + +ifeq ($(BUILD_VARIANT),nossl) + CONFIGURE_ARGS+= \ + --without-ssl +endif + +define Package/wget/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-ssl +endef + +define Package/wget-nossl/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-nossl +endef + +define Package/wget/postinst +#!/bin/sh +if [ -e $${IPKG_INSTROOT}/usr/bin/wget ]; then + rm -rf $${IPKG_INSTROOT}/usr/bin/wget; +fi +ln -sf ./wget-ssl $${IPKG_INSTROOT}/usr/bin/wget +endef + +define Package/wget/postrm +#!/bin/sh +rm $${IPKG_INSTROOT}/usr/bin/wget +[ -x $${IPKG_INSTROOT}/usr/bin/wget-nossl ] && ln -s ./wget-nossl $${IPKG_INSTROOT}/usr/bin/wget || { + ln -s ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/wget + $${IPKG_INSTROOT}/usr/bin/wget 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/wget +} +exit 0 +endef + +define Package/wget-nossl/postinst +#!/bin/sh +if [ -e $${IPKG_INSTROOT}/usr/bin/wget ]; then + rm -rf $${IPKG_INSTROOT}/usr/bin/wget; +fi +ln -s ./wget-nossl $${IPKG_INSTROOT}/usr/bin/wget +endef + +define Package/wget-nossl/postrm +#!/bin/sh +rm $${IPKG_INSTROOT}/usr/bin/wget +[ -x $${IPKG_INSTROOT}/usr/bin/wget-ssl ] && ln -s ./wget-ssl $${IPKG_INSTROOT}/usr/bin/wget || { + ln -s ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/wget + $${IPKG_INSTROOT}/usr/bin/wget 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/wget +} +exit 0 +endef + +$(eval $(call BuildPackage,wget)) +$(eval $(call BuildPackage,wget-nossl)) diff --git a/net/wifidog/Makefile b/net/wifidog/Makefile new file mode 100644 index 0000000..db01719 --- /dev/null +++ b/net/wifidog/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2006,2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wifidog +PKG_VERSION:=20090925 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:= @SF/$(PKG_NAME) +PKG_MD5SUM:=e3ecacba67a91b6ea3c1072ba6c5a0b4 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/wifidog + SUBMENU:=Captive Portals + SECTION:=net + CATEGORY:=Network + DEPENDS:=+iptables-mod-extra +iptables-mod-ipopt +iptables-mod-nat +iptables-mod-nat-extra +libpthread + TITLE:=A wireless captive portal solution + URL:=http://www.wifidog.org +endef + +define Package/wifidog/description + The Wifidog project is a complete and embeddable captive + portal solution for wireless community groups or individuals + who wish to open a free Hotspot while still preventing abuse + of their Internet connection. +endef + +define Package/wifidog/conffiles +/etc/wifidog.conf +endef + +define Package/wifidog/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/init.d/wifidog $(1)/usr/bin/wifidog-init + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/wifidog.conf $(1)/etc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/wifidog +endef + +$(eval $(call BuildPackage,wifidog)) diff --git a/net/wifidog/files/wifidog.conf b/net/wifidog/files/wifidog.conf new file mode 100644 index 0000000..cdf939a --- /dev/null +++ b/net/wifidog/files/wifidog.conf @@ -0,0 +1,193 @@ +# WiFiDog Configuration file + +# Parameter: GatewayID +# Default: default +# Optional +# +# Set this to the node ID on the auth server +# this is used to give a customized login page to the clients and for +# monitoring/statistics purpose +# If none is supplied, the mac address of the GatewayInterface interface will be used, +# without the : separators + +GatewayID default + +# Parameter: ExternalInterface +# Default: NONE +# Optional +# +# Set this to the external interface (the one going out to the Inernet or your larger LAN). +# Typically vlan1 for OpenWrt, and eth0 or ppp0 otherwise, +# Normally autodetected + +# ExternalInterface eth0 + +# Parameter: GatewayInterface +# Default: NONE +# Mandatory +# +# Set this to the internal interface (typically your wifi interface). +# Typically br-lan for OpenWrt, and eth1, wlan0, ath0, etc. otherwise + +GatewayInterface br-lan + +# Parameter: GatewayAddress +# Default: Find it from GatewayInterface +# Optional +# +# Set this to the internal IP address of the gateway. Not normally required. + +# GatewayAddress 192.168.1.1 + +# Parameter: AuthServer +# Default: NONE +# Mandatory, repeatable +# +# This allows you to configure your auth server(s). Each one will be tried in order, untill one responds. +# Set this to the hostname or IP of your auth server(s), the path where +# WiFiDog-auth resides in and the port it listens on. +#AuthServer { +# Hostname (Mandatory; Default: NONE) +# SSLAvailable (Optional; Default: no; Possible values: yes, no) +# SSLPort (Optional; Default: 443) +# HTTPPort (Optional; Default: 80) +# Path (Optional; Default: /wifidog/ Note: The path must be both prefixed and suffixed by /. Use a single / for server root.) +# LoginScriptPathFragment (Optional; Default: login/? Note: This is the script the user will be sent to for login.) +# PortalScriptPathFragment (Optional; Default: portal/? Note: This is the script the user will be sent to after a successfull login.) +# MsgScriptPathFragment (Optional; Default: gw_message.php? Note: This is the script the user will be sent to upon error to read a readable message.) +# PingScriptPathFragment (Optional; Default: ping/? Note: This is the script the user will be sent to upon error to read a readable message.) +# AuthScriptPathFragment (Optional; Default: auth/? Note: This is the script the user will be sent to upon error to read a readable message.) +#} + +#AuthServer { +# Hostname auth.ilesansfil.org +# SSLAvailable yes +# Path / +#} + +#AuthServer { +# Hostname auth2.ilesansfil.org +# SSLAvailable yes +# Path / +#} + +# Parameter: Daemon +# Default: 1 +# Optional +# +# Set this to true if you want to run as a daemon +# Daemon 1 + +# Parameter: GatewayPort +# Default: 2060 +# Optional +# +# Listen on this port +# GatewayPort 2060 + +# Parameter: HTTPDName +# Default: WiFiDog +# Optional +# +# Define what name the HTTPD server will respond +# HTTPDName WiFiDog + +# Parameter: HTTPDMaxConn +# Default: 10 +# Optional +# +# How many sockets to listen to +# HTTPDMaxConn 10 + +# Parameter: CheckInterval +# Default: 60 +# Optional +# +# How many seconds should we wait between timeout checks. This is also +# how often the gateway will ping the auth server and how often it will +# update the traffic counters on the auth server. Setting this too low +# wastes bandwidth, setting this too high will cause the gateway to take +# a long time to switch to it's backup auth server(s). + +CheckInterval 60 + +# Parameter: ClientTimeout +# Default: 5 +# Optional +# +# Set this to the desired of number of CheckInterval of inactivity before a client is logged out +# The timeout will be INTERVAL * TIMEOUT +ClientTimeout 5 + +# Parameter: TrustedMACList +# Default: none +# Optional +# +# Comma separated list of MAC addresses who are allowed to pass +# through without authentication +#TrustedMACList 00:00:DE:AD:BE:AF,00:00:C0:1D:F0:0D + +# Parameter: FirewallRuleSet +# Default: none +# Mandatory +# +# Groups a number of FirewallRule statements together. + +# Parameter: FirewallRule +# Default: none +# +# Define one firewall rule in a rule set. + +# Rule Set: global +# +# Used for rules to be applied to all other rulesets except locked. +FirewallRuleSet global { + ## To block SMTP out, as it's a tech support nightmare, and a legal liability + #FirewallRule block tcp port 25 + + ## Use the following if you don't want clients to be able to access machines on + ## the private LAN that gives internet access to wifidog. Note that this is not + ## client isolation; The laptops will still be able to talk to one another, as + ## well as to any machine bridged to the wifi of the router. + # FirewallRule block to 192.168.0.0/16 + # FirewallRule block to 172.16.0.0/12 + # FirewallRule block to 10.0.0.0/8 + + ## This is an example ruleset for the Teliphone service. + #FirewallRule allow udp to 69.90.89.192/27 + #FirewallRule allow udp to 69.90.85.0/27 + #FirewallRule allow tcp port 80 to 69.90.89.205 +} + +# Rule Set: validating-users +# +# Used for new users validating their account +FirewallRuleSet validating-users { + FirewallRule allow to 0.0.0.0/0 +} + +# Rule Set: known-users +# +# Used for normal validated users. +FirewallRuleSet known-users { + FirewallRule allow to 0.0.0.0/0 +} + +# Rule Set: unknown-users +# +# Used for unvalidated users, this is the ruleset that gets redirected. +# +# XXX The redirect code adds the Default DROP clause. +FirewallRuleSet unknown-users { + FirewallRule allow udp port 53 + FirewallRule allow tcp port 53 + FirewallRule allow udp port 67 + FirewallRule allow tcp port 67 +} + +# Rule Set: locked-users +# +# Not currently used +FirewallRuleSet locked-users { + FirewallRule block to 0.0.0.0/0 +} diff --git a/net/wifidog/files/wifidog.init b/net/wifidog/files/wifidog.init new file mode 100644 index 0000000..9db075d --- /dev/null +++ b/net/wifidog/files/wifidog.init @@ -0,0 +1,17 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=65 +EXTRA_COMMANDS="status" +EXTRA_HELP=" status Print the status of the service" + +start() { + /usr/bin/wifidog-init start +} + +stop() { + /usr/bin/wifidog-init stop +} + +status() { + /usr/bin/wifidog-init status +} \ No newline at end of file diff --git a/net/wing/Makefile b/net/wing/Makefile new file mode 100644 index 0000000..6e6347c --- /dev/null +++ b/net/wing/Makefile @@ -0,0 +1,94 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wing +PKG_VERSION:=20110329 +PKG_RELEASE:=2 +PKG_REV:=4ef2a352b29c26ce76d8b3d7c6897d301362a101 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=git://github.com/rriggio/click.git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_PROTO:=git + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_BUILD_DEPENDS:=wing/host + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk + +define Package/wing + TITLE:=Wireless mesh networking toolkit + SECTION:=net + CATEGORY:=Network + MAINTAINER:=Roberto Riggio + DEPENDS:=+kmod-tun +libpcap +libstdcpp + URL:=http://www.wing-project.org/ +endef + +define Package/wing/Description + Wing is a wireless mesh routing software. The routing protocol + is derived from Roofnet. It supports multiple radio interfaces + and link quality routing using the ETX, ETT, or WCETT metric. +endef + +EXTRA_CFLAGS=-MD + +CONFIGURE_ARGS += \ + --enable-tools=host \ + --enable-userlevel \ + --enable-wifi \ + --enable-wing \ + --enable-diffserv \ + --disable-linuxmodule \ + --disable-dynamic-linking \ + +HOST_CONFIGURE_ARGS += \ + --enable-userlevel \ + --enable-wifi \ + --enable-diffserv \ + --enable-wing \ + --disable-linuxmodule \ + +define Host/Compile + $(call Host/Install/Default, tools elementmap.xml install) +endef + +define Build/Compile + (cd $(PKG_BUILD_DIR)/userlevel; \ + $(STAGING_DIR_HOST)/bin/click-mkmindriver -p $(PKG_NAME) -C $(STAGING_DIR_HOST) \ + -f $(PKG_BUILD_DIR)/conf/wing/sample.click \ + -A --all -E Discard -E Print -E PrintWifi -E Null \ + -E InfiniteSource -E RatedSource -E EtherEncap -E UDPIPEncap \ + -E WINGETTMetric -E WINGETXMetric -E WINGHopCountMetric \ + -E ProbeTXRate -E MadwifiRate -E AutoRateFallback -E Minstrel \ + -E FairBuffer -E DeAggregator -E DWRRSched -E WFQSched -E WRRSched; \ + ); + $(call Build/Install/Default, MINDRIVER=$(PKG_NAME) install) +endef + +define Package/wing/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/etc/wing + $(INSTALL_DIR) $(1)/usr/share/click + $(CP) ./files/* $(1)/ + $(CP) $(PKG_BUILD_DIR)/conf/wing/click_config $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/conf/wing/write_handler $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/conf/wing/read_handler $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME)click $(1)/usr/bin/click + $(CP) $(PKG_INSTALL_DIR)/usr/bin/click-align $(1)/usr/bin/click-align + $(CP) $(PKG_BUILD_DIR)/conf/wing/*click $(1)/etc/wing/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/click/elementmap.xml $(1)/usr/share/click/elementmap.xml +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,wing)) + diff --git a/net/wing/files/etc/uci-defaults/wing b/net/wing/files/etc/uci-defaults/wing new file mode 100644 index 0000000..2f5e0dd --- /dev/null +++ b/net/wing/files/etc/uci-defaults/wing @@ -0,0 +1,26 @@ +uci set network.mesh=interface +uci set network.mesh.proto=wing +uci set network.mesh.profile=bulk +uci set network.mesh.rc=minstrel +uci set network.mesh.ls=fcfs +uci set network.mesh.metric=wcett +uci set network.mesh.prefix=6 +uci set network.mesh.period=10000 +uci set network.mesh.tau=100000 +uci set network.mesh.debug=false + +cfg=$(uci add firewall zone) +uci set firewall.$cfg.name="mesh" +uci set firewall.$cfg.input="ACCEPT" +uci set firewall.$cfg.output="ACCEPT" +uci set firewall.$cfg.forward="REJECT" +uci set firewall.$cfg.masq="1" + +cfg=$(uci add firewall forwarding) +uci set firewall.$cfg.src="lan" +uci set firewall.$cfg.dest="mesh" + +cfg=$(uci add firewall forwarding) +uci set firewall.$cfg.src="mesh" +uci set firewall.$cfg.dest="wan" + diff --git a/net/wing/files/lib/network/wing.sh b/net/wing/files/lib/network/wing.sh new file mode 100644 index 0000000..553ebaa --- /dev/null +++ b/net/wing/files/lib/network/wing.sh @@ -0,0 +1,146 @@ + +scan_wing() { + config_set "$1" device "wing-$1" +} + +coldplug_interface_wing() { + setup_interface_wing "wing-$1" "$1" +} + +stop_interface_wing() { + local config="$1" + local iface="wing-$config" + env -i ACTION="ifdown" INTERFACE="$config" DEVICE="$iface" PROTO=wing /sbin/hotplug-call "iface" & + [ -f "/var/run/$iface.pid" ] && { + kill -9 $(cat /var/run/$iface.pid) + rm /var/run/$iface.pid + } +} + +setup_interface_wing() { + + local iface="$1" + local config="$2" + + local hwmodes="" + local freqs="" + local ifnames="" + local hwaddrs="" + + config_load wireless + config_foreach wing_list_interfaces wifi-iface + + # start click router + if [ "$hwmodes" = "" -o "$freqs" = "" -o "$ifnames" = "" -o "$hwaddrs" = "" ]; then + logger -t "$config" "No raw interfaces available. Exiting." + exit 1 + fi + + local profile rc ls metric prefix period tau debug + + config_get profile $config profile "bulk" + config_get rc $config rc "minstrel" + config_get ls $config ls "fcfs" + config_get metric $config metric "wcett" + config_get prefix $config prefix "6" + config_get period $config period "10000" + config_get tau $config tau "100000" + config_get_bool debug $config debug "false" + + local hwaddr=$(echo $hwaddrs | sed 's/ .*//'); + local ipaddr=$(printf "$prefix.%d.%d.%d" $(echo $hwaddr | awk -F: '{printf "0x%s 0x%s 0x%s",$4,$5,$6}')) + local netmask=255.0.0.0 + + if ! wing_template_available "profile" "$profile"; then + logger -t "$config" "Unable to configure router. Exiting." + exit 1 + fi + + if ! wing_template_available "rc" "$rc"; then + logger -t "$config" "Unable to configure rate control. Exiting." + exit 1 + fi + + if ! wing_template_available "ls" "$ls"; then + logger -t "$config" "Unable to configure link scheduler. Exiting." + exit 1 + fi + + if [ "$profile" = "" -o "$rc" = "" ]; then + logger -t "$config" "Unable to generate template. Exiting." + exit 1 + fi + + [ "$debug" == 0 ] && dbg="" || dbg="-d" + + /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \ + -m "$hwmodes" -c "$freqs" -n "$ifnames" -a "$hwaddrs" $dbg \ + | sed -e "s/__XR_IFNAME__/$iface/g" \ + | sed -e "s/__XR_IP__/$ipaddr/g" \ + | sed -e "s/__XR_NM__/$netmask/g" \ + | sed -e "s/__XR_PERIOD__/$period/g" \ + | sed -e "s/__XR_TAU__/$tau/g" > /tmp/$iface.click + + /usr/bin/click-align /tmp/$iface.click > /tmp/$iface-aligned.click 2>/var/log/$iface.log + [ ! -c /dev/net/tun ] && { + mkdir -p /dev/net/ + mknod /dev/net/tun c 10 200 + if [ ! -c /dev/net/tun ]; then + logger -t "$config" "Device not available (/dev/net/tun). Exiting." + exit 1 + fi + } + + # creating the tun interface below will trigger a net subsystem event + # prevent it from touching iface by disabling .auto here + uci_set_state network "$config" auto 0 + + (/usr/bin/click /tmp/$iface-aligned.click >> /var/log/$iface.log 2>&1 &) & + sleep 2 + ps | grep /usr/bin/click | grep -q -v grep || { + logger -t "$config" "Unable to start click. Exiting." + exit 1 + } + + ps | grep /usr/bin/click | grep -v grep | awk '{print $1}' > /var/run/$iface.pid + + ifconfig "$iface" "$ipaddr" netmask "$netmask" + uci_set_state network $config ipaddr "$ipaddr" + uci_set_state network $config netmask "$netmask" + + env -i ACTION="ifup" INTERFACE="$config" DEVICE="$iface" PROTO=wing /sbin/hotplug-call "iface" & + +} + +wing_template_available() { # prefix, template, default + local template="/etc/wing/$1.$2.click" + [ ! -f $template ] && { + return 1 + } + return 0 +} + +wing_list_interfaces() { + local channel freq hwmode hwaddr ifname mode + config_get mode $1 mode + config_get_bool up $1 up + [ "$up" = "1" -a "$mode" = "monitor" ] || return 0 + config_get ifname $1 ifname + config_get device $1 device + config_get hwmode $device hwmode "11bg" + config_get channel $device channel "0" + [ "$channel" = "0" -o "$channel" = "auto" ] && { + logger -t "$device" "Channel not specified. Ignoring." + return 0 + } + freq=$(iwlist $ifname freq | sed -n "s/^.*Channel 0*$channel : \([0-9.]*\).*/\1/p" | awk '{print $1*1000}') + hwaddr=$(/sbin/ifconfig $ifname 2>&1 | sed -n 's/^.*HWaddr \([0-9A-Za-z\-]*\).*/\1/p' | sed -e 's/\-/:/g' | cut -c1-17) + freqs=${freqs:+"$freqs "}$freq + hwmodes=${hwmodes:+"$hwmodes "}$hwmode + hwaddrs=${hwaddrs:+"$hwaddrs "}$hwaddr + ifnames=${ifnames:+"$ifnames "}$ifname + /sbin/ifconfig $ifname mtu 1900 + /sbin/ifconfig $ifname txqueuelen 5 + /sbin/ifconfig $ifname up +} + diff --git a/net/wing/patches/010-libc-compat.patch b/net/wing/patches/010-libc-compat.patch new file mode 100644 index 0000000..fa84ac8 --- /dev/null +++ b/net/wing/patches/010-libc-compat.patch @@ -0,0 +1,20 @@ +--- a/lib/radiotap.c ++++ b/lib/radiotap.c +@@ -16,6 +16,17 @@ + #include + #include + ++#if !defined(le32toh) || !defined(le16toh) ++# if BYTE_ORDER == LITTLE_ENDIAN ++# define le32toh(x) (x) ++# define le16toh(x) (x) ++# else ++# include ++# define le32toh(x) bswap_32(x) ++# define le16toh(x) bswap_16(x) ++# endif ++#endif ++ + /* function prototypes and related defs are in radiotap_iter.h */ + + static const struct radiotap_align_size rtap_namespace_sizes[] = { diff --git a/net/wing/patches/011-perl-compat.patch b/net/wing/patches/011-perl-compat.patch new file mode 100644 index 0000000..2c4a7d9 --- /dev/null +++ b/net/wing/patches/011-perl-compat.patch @@ -0,0 +1,23 @@ +--- a/doc/click-elem2man ++++ b/doc/click-elem2man +@@ -227,14 +227,15 @@ sub nroff_fixfP ($$) { + } + + sub nroff_manref ($$$$) { +- map { $_ = "\"$_\"" if (s/\"/\\(dq/g) } @_; ++ my @x = @_; ++ map { $_ = "\"$_\"" if (s/\"/\\(dq/g) } @x; + my($x); +- if ($_[0] eq "") { +- $x = "\n.M " . $_[1] . " " . $_[2]; ++ if ($x[0] eq "") { ++ $x = "\n.M " . $x[1] . " " . $x[2]; + } else { +- $x = "\n.RM " . $_[0] . " " . $_[1] . " " . $_[2]; ++ $x = "\n.RM " . $x[0] . " " . $x[1] . " " . $x[2]; + } +- $x .= " " . $_[3] if $_[3] ne ""; ++ $x .= " " . $x[3] if $x[3] ne ""; + $x . "\n"; + } + diff --git a/net/wiviz/Makefile b/net/wiviz/Makefile new file mode 100644 index 0000000..053517f --- /dev/null +++ b/net/wiviz/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wiviz +PKG_VERSION:=1.0 +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/wiviz + SECTION:=net + CATEGORY:=Network + SUMENU:=wireless + DEPENDS:=+libpcap + TITLE:=Wireless Network Visualization + URL:=http://devices.natetrue.com/wiviz/ +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + +EXTRA_CFLAGS += $(TARGET_CPPFLAGS) +EXTRA_LDFLAGS += $(TARGET_LDFLAGS) + +define Build/Compile + $(call Build/Compile/Default, \ + CCOPTS="$(TARGET_CFLAGS)" \ + INCLUDE="$(EXTRA_CFLAGS)" \ + LDFLAGS="$(EXTRA_LDFLAGS)" \ + ) +endef + +define Package/wiviz/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ + $(CP) ./files/* $(1) + find $(1) -name CVS | xargs rm -rf + find $(1) -name .svn | xargs rm -rf +endef + +$(eval $(call BuildPackage,wiviz)) diff --git a/net/wiviz/files/www/cgi-bin/wiviz/get.cgi b/net/wiviz/files/www/cgi-bin/wiviz/get.cgi new file mode 100755 index 0000000..161fc75 --- /dev/null +++ b/net/wiviz/files/www/cgi-bin/wiviz/get.cgi @@ -0,0 +1,15 @@ +#!/bin/sh + +WIVIZ_PATH=wiviz + +echo Content-type: text/html +echo +killall -USR1 wiviz >/dev/null 2>&1 +if [ 0 -ne $? ] + then #### Wi-Viz daemon not running, start it + $WIVIZ_PATH >/dev/null &1 & + killall -USR1 wiviz > /dev/null + fi +echo "" diff --git a/net/wiviz/files/www/cgi-bin/wiviz/set.cgi b/net/wiviz/files/www/cgi-bin/wiviz/set.cgi new file mode 100755 index 0000000..17b4787 --- /dev/null +++ b/net/wiviz/files/www/cgi-bin/wiviz/set.cgi @@ -0,0 +1,3 @@ +#!/bin/sh +httpd -d $QUERY_STRING > /tmp/wiviz-cfg +killall -USR2 wiviz diff --git a/net/wiviz/files/www/wiviz/adhoc-idle.gif b/net/wiviz/files/www/wiviz/adhoc-idle.gif new file mode 100755 index 0000000000000000000000000000000000000000..05e479f78bed9f924ccdc093afe0ee94158d44ed GIT binary patch literal 332 zcmV-S0ki%`Nk%w1VKM+R0K@hY%Z-IFWY}8JstsRTLJYHejSl z7!#;At4a?Y5U(|{Nfa2iHL8&h91?JWqz@XWSW2~25*!!2l?@Ob9U2wa6&f26&^k{K e6WA5p-EmaIP3h|E?CtLF@bU8V^!4^SApkpU)sKz< literal 0 HcmV?d00001 diff --git a/net/wiviz/files/www/wiviz/adhoc-idle.png b/net/wiviz/files/www/wiviz/adhoc-idle.png new file mode 100755 index 0000000000000000000000000000000000000000..b10b102ec9fc7e6ad2fadb6de7a27e4ca51064ac GIT binary patch literal 730 zcmV<00ww*4P)l&H6vzLsVoa1uW=R$^WlEH;u#}06DnR(!O z-Zzu^OA+Gx{sj?Du(6FC$3d-DOWR=>B97y2ZaO9_V=N>Hf+J?W%Wfyvb!0_>v$>UoBmdR$aRreDn*Pm&(F`DY`b2suk}AYJwXV8D2jIW$;=%9Kk~+6 zv?9#h)X$FNpjxe_eNsw{$KzZggb*O2TEE|S^TuK%gov8@St$jjRN8lce~-mtk;|V> z1WA(A^2TDcwX)3Ta}0;WH03@%KIXEQQsUs?pz!>q3DLxH{MNf-D^kk8X1ZN5O}{fk z`;<72)AXDqNp8QUhyBjPKFf4EO@(-#_dBn>>5AMM+5=c7iYSV3a&l7Gr;(6KrBaHJ zhldBauB*?;zZY_Kbrmu5z{H1A3PK2+pPz%7!=i<{!KdS)NGR=E+)pR<=Xf%T3IJ!RT6glLY(k@onJBgGMqtOV!>pKasyq74Y z&}y|%tyX8u+%ypZ?B}Z6)1`}23Sk&xKA*3Rb6r>0Wp~VMv=W-Ve0;dMx%te@*8rM$ z{qX^-Gu0!a!D?$7vlk(nAPA0#=u`H$BuQpvtboO0u~;k?i^Y!|NnnuV`Cu6Km(xolZBCiL771ZWH!i83~Ub$Of2xwk?KFO zr08Uh)%*)9O1#!at-rCR?DX5J{SP)&_~`kwH#SPy8gMhd{vqYicKZFRk5P#)TmDHG zF(zgUD%5w#mN&V4}hN;6Q85e*+th2Wc%0CWU^cb38UK WI@&E^oOS2K#>L0`6=nndYYhO(uccxD literal 0 HcmV?d00001 diff --git a/net/wiviz/files/www/wiviz/adhoc.png b/net/wiviz/files/www/wiviz/adhoc.png new file mode 100755 index 0000000000000000000000000000000000000000..57db25c28a95ebefeaebb9ffe5c44bd081caf14d GIT binary patch literal 714 zcmV;*0yX`KP)W7!zoT&%kg+*%f7VJ4Bq?RAmq zg&L1Uv=l&NhLT0w2T=)WXMMjX6{yu2km*DJxXIpZy^;6+anaeJ=k@4x+|Q=F{m z&cjHEE7keVjr|VK#2vugq^wTq7~U`&SBgn=&fr`aP67J>_=Fd`YDTahq1tZ0kE{9K@xQ(J~*}iWm_cwL^>1TUsu( zh3u%;1D`Ax62zw(ZdTj3>59}Z@6rc;7?*AiIuh(4m~g!pyHih?v{|19qRhLb^FPK4^ocp*@wpC;oE^{G24 zl?er#s&SBKc{@&WNq*?W$-s;QPsi)0>D$GB>Z#jF9BNV&RN?%e4-miA6{-wunyy5` wl?X|2r8?GqZ%T!_uRx2%VzF2(7K_D*UmNVr>*VI!-v9sr07*qoM6N<$f|Dp!RR910 literal 0 HcmV?d00001 diff --git a/net/wiviz/files/www/wiviz/ap-idle.gif b/net/wiviz/files/www/wiviz/ap-idle.gif new file mode 100755 index 0000000000000000000000000000000000000000..a9296961126dba336d6d7497a0046391ce7bc904 GIT binary patch literal 812 zcmZ?wbhEHbG-5Dfc*ejmefsoi)22;H#N7kwzYS3c6Imk_VrJg zIBD{fsne#WQeCvTU73%Ajg^g)S4do5OLu*%Iv+bT z0|O%qC!eUa(w==y+Jc;ij~rp;7Lrg<)79ChD|e9T$`NKRfnBP1_Gybge9Z9lx%^9m zed=QTm)>8yaZA^5uiMlE3W<%4na3uCUQl2<$}M%*ZSI2v#zRajtXX$YJ#B31lCV%J z^I~*rZsp(;(@9wHiiurNJ?6p<#Yw{4Lh@!YD-0GcXXTM`+A^u}u=@c&osbC}7ZaP? zc%&?91QL^2d8BPBDvB3AV&N22Jk+Pr*u>f+W!-S1;2M)#x2Q&^-yDaDO-H#U&C34V zc<2+*EoqdnM?xmqtyjjj;f=+s*Oz%^%yMk5U3~05VL~nE#*T@H+xz7m>Rwb#{3)#v^|v%C2Hg@fMW{&V+~KAOVB$Y2cs(m)5Y literal 0 HcmV?d00001 diff --git a/net/wiviz/files/www/wiviz/ap-idle.png b/net/wiviz/files/www/wiviz/ap-idle.png new file mode 100755 index 0000000000000000000000000000000000000000..a6e6fb3202556994679a960597c983ac8d135397 GIT binary patch literal 814 zcmV+}1JV46P)3`ER47LQ(Iu)V)D2;GiA5r8j7S z43hZQp`l_29*R&wgn}-Em!IL7YoF5)Ao|^*!CvZ%ZaE-kD5*f?-jIk5O7_`<+ zQc6K7)zq=pLP`mxR8z+RxumrQ5uN#X@!o#j8R6D|d#AN-K(y8yFfMl>>)7vDSX`@#3{cT)b4* z^+u|y3T0VtK^G2!#A7rtD~jT$kB?TO-;0Zj4@9)A>l#GVoZe3B zTkZOk5<(zN(?wAfAALQv5;Wf3-TfGiM*C3|y(`NSN~vZ#ts8fvptVMlBuLZrswj$2 zZFp$)K9XhGB@taoDN&Xsq?7=#5%CHku(!8&Pejw3o13p~_1*dnG0*e9wRQ|(OhhNo z%dNFjB3iU{p>leatFBX?=XSMPHP5G~r;H#N7kwzYS3c6Imk_VrJg zIBD{fsne#WQeCvTU73%Ajg^g)S4do5OLu*%Iv+bT z0|O%qC!eUa(w==y+Jc;ij~rp;7Lrg<)79ChD|e9T$`NKRfnBP1_Gybge9Z9lx%^9m zed=QTm)>8yaZA^5uiMlE3W<%4na3uCUQl2<$}M%*ZSI2v#zRajtXX$YJ#B31lCV%J z^I~*rZsp(;(@9wHiiurNJ?6p<#Yw{4Lh@!YD-0GcXXTM`+A^u}u=@c&osbC}7ZaP? zc%&?91QL^2d8BPBDvB3AV&N22Jk+Pr*u>f+W!-S1;2M)#x2Q&^-yDaDO-H#U&C34V zc<2+*EoqdnM?xmqtyjjj;f=+s*Oz%^%yMk5U3~05VL~nE#*T@H+xz7m>Rwb#{3)#v^|v%C2Hg@fMW{&V+~KAOVB$Y2cs(m)5Y literal 0 HcmV?d00001 diff --git a/net/wiviz/files/www/wiviz/ap-wep-idle.png b/net/wiviz/files/www/wiviz/ap-wep-idle.png new file mode 100755 index 0000000000000000000000000000000000000000..a6e6fb3202556994679a960597c983ac8d135397 GIT binary patch literal 814 zcmV+}1JV46P)3`ER47LQ(Iu)V)D2;GiA5r8j7S z43hZQp`l_29*R&wgn}-Em!IL7YoF5)Ao|^*!CvZ%ZaE-kD5*f?-jIk5O7_`<+ zQc6K7)zq=pLP`mxR8z+RxumrQ5uN#X@!o#j8R6D|d#AN-K(y8yFfMl>>)7vDSX`@#3{cT)b4* z^+u|y3T0VtK^G2!#A7rtD~jT$kB?TO-;0Zj4@9)A>l#GVoZe3B zTkZOk5<(zN(?wAfAALQv5;Wf3-TfGiM*C3|y(`NSN~vZ#ts8fvptVMlBuLZrswj$2 zZFp$)K9XhGB@taoDN&Xsq?7=#5%CHku(!8&Pejw3o13p~_1*dnG0*e9wRQ|(OhhNo z%dNFjB3iU{p>leatFBX?=XSMPHP5G~rLh1t?N)UMJavJmaWw_xnyinl#J9Rgm{TI z(IVbX2yMzjl4BPmBa%i+5wEk%lyD;iVWmxPH(URS{j|?N@Z3Gmea>Hq2n2>>G4--~?vHrn#;;-)ETdn@M6n{NyTidam3 z|6aDRApB$S!k8o`^V>TXi)DX*e{XMZcXxMZXJ>nRduwZJb92*VGHq;Z7>&lYwYAmN z)s>Z%<>h6A!LYQnw79tV`t|FDg$2D{KQ}iwJ3Bi)Jv}uwH90vsF)^Xj>Bh&$$HvA+ zM@L`1dNndKGCVx2)oO=^hBO+DTCG;8R7$0?zrSChQ1tcn_4fAm^z_K(^6u{LuC6Yb zOeU2|B@#(zXJ_Uzfyr%zj3TU%OMghF9+b8}NulRzM7 zY;0_3XsEBRudA!8t*x!8sp0ea)z#HiRaKRhm5(1kuBfQs@pz9OJ$m@?VR?Buhr=l= zD=R4}DK0K%v)L>bD?dM<$z(DZjJ&+O2M-?5>Ga&(+?<>o8jY5not>4Hm6@5Dk&%&} zo=&AwQ&Uq@Qc@@s3YknMkw`=$@#M*q2M7OF`G5a~0h|Q}0e}sBKEOVF0w4~64bq(; z5hx1~cK9T%q)Ej_AB(IHv;{8;9WghP(rj@<9Moz28qF+JmBT_JV1h|6%{g}~87GL# z9jyyEf+y(WAtTkth#m;MIo8cLG-*H-5_SN%X(%c^mneFuH0s#`+}|0Y9(|6mm&pmse0(7igJE`ArD= z^QnS}vfe=I`iVhxsp~xT;_6qCpS*nXJB|!^=TN?)U@aVd${Y;0MW?InZWKeXSD~(2 zJ{_v?W7!00&4+M~fjR)Szaob@Bt4Nfk*^_HSJR+-_tfYwOblo#UgoXD#ND+$>{jqA zVVQb^>5ax+!^VZ76K``3rS{Q_haGS69%y6~}+qj-0$CO`M332Fk>UGGRJW#uXA0gVeZ4Sc!Q9fc!P6yBN=%ej?N&t#TbL%+}T%zN;i^0B#YlnjO0Be zlF#^nD2trrz1PQb6Nqw(D7TQDLh>b&?yu)aavjMTqFhJiT%E1^>pN~b-$s8?ZlQ9< z=F$Y7mpDBE1UW+v2mtAk8h!KrACy4`blI(TZ27w%ZCc{4nI&G?|b}NdK*|lp|sK39TJ$v@Bd-rat)hd-r zg@uI$?%cV$1@(M~oE@ktB!24`epj{zL)DIYf-? z+_^J8IyxHg`~4`2LPtjj9UUFCx3{Ax3azcJ_FeHAnlk_EyDvKwrFG5<5So5$mcA3l88-`3V<6ST-)xpIZ8 zSFdvI+BK%9r@49aCLWImkH>=$0wDzZ_wNUYjg5^Bnv4=an1ac{2}zcDLcnajt&xx* z|00LLPt763xLN(CkPH~f?eqB}LqkLMFd>Yz%jfgt^LY*(I>gztXYu>}JbwIm!(@u0 zuw%y#JRXlhY@FLbj=$N9x(;JugJA!CsSrOoGqjVglObd}2w0KQbv@MI-;b{A_EW7^ zsaC7_d_Dm7?b}DST4iWxi23<>dz_Tgep*{w-J~U1J|pK?KWZZJ;^*w#d6SPnUbMy6YBk#1+Z)or$b}%7mt&G5s?E=ZdLah+Uf|#E z(9s~Ax~|WbN+p*FDJ9iv6@YK|R%mZ;L6@K?l5cf&Q!X37wZvP3n!t~9L9KGA*TL0< zJ4XaY*>D69?qtGR9l3r0c)i}-!omWYrco-DD3waAuCB7Wy4s8w`Mg9?6f{k<#gs}V zq?GQhyq?(W@1@D@7i|%1Yir!SdzY@( z#;g4K=aPYe0W?iR(=^KEGA~}dKnRg>3=8tEz2Z5CxPZ;0E+UO`B+J|QkreO}0=qoP z0s%(Ik|hpCp(v$H-@ku9GCVwNZZ6TVbkZ%=o>kpLpRV^+n$hhR4bsYx|W-CFbYnSzKI9 zr&6i&j%bAW9kXB-juw8!2LOBs7?E zwOTE4@7_J0J$vRN-blpK(h_rXa})}NL@Je9?=2)521u}n1V#Z_bj)oy}iA3b#>Xdx324~tgNuSyv*|Q za;{pf#wI2voXyh+f&k-$FbmX@__n$Z?Vak{~IEW25q% z#pvWNIe(_AYPXa!0z`xm^+z~T%9s!$Z8uczInQCN_&QNzyXBBXNRgnvPkAM*FDMTf zu|EK~?XT?BRaKP-4<581RaNCC=5_mxa-Ap_?Jp@!(EQ_rkxVhZOPY7g4*<@4r7pCu z4Nku*CjdXcB@JeI-vo_ot#zm8k%ak(2!fv1!}Kd4$t5HijH5PQe^NQoJR<8bI>tAP zSLVgbBLY^a&%biqe+!$Oe=`yJpTM?|t%hwOTMgSnwi>pDY&C2P*=pDpvemFHWUFCY f$X3JujgbEUE)R2=gkRs*00000NkvXXu0mjf(9*hj literal 0 HcmV?d00001 diff --git a/net/wiviz/files/www/wiviz/ap.gif b/net/wiviz/files/www/wiviz/ap.gif new file mode 100755 index 0000000000000000000000000000000000000000..7eb5b3a6bb5234b9822b2a01e0eddb3169cd1cf4 GIT binary patch literal 1468 zcmeH`c{AI20EfQ_rA0#Psw<&ut!itvW7%yrLC{ub!y0y4x~Z8MmKkx3?FuH5#4(bV zsyf2>MZ|r@vF?&Y4p+sI4pntm)RmZVuBqL=iT!IoZ{V4Ep85FP^LBN6>I|I0ApqbE z03`ss0LTFl0MG(J1puW0&;UpSARGV!I6XZ*IXO8#K0Z1+Iy^i)I5^nf-{0HYQ>j!+ zrE+(7cV}m3dwY9pYio0Jb7Nyep-`-^udl7Gt*)-FtgI|AFE1@EEiNuDEG&Hd_;G%I zer|5={rmT`v$HcZGwuYfDQDkH>3nZfPD|>N9J}A#%>$5NHBDCWM^%U;0>_k_ zUAaZR#`1M~Tqhmt4vorYeOqM}am)C=|uCFLA42Op&GVgEhWgaCZyWG!c{1#~Qe zPu06oPgXzwT{BWc|1MGmGsZ(~c0`a4O-|HMv0(;x7I9Qv=TSUWA8j$=WfYpD660Ma zO+$jL&)>>4eqdohgWuj75W+o?OE9CynYm(1^+&-gq)-u7YWd4;Hq6l5G}g<|5ACmM z@)S~OAvJ0a=Zah$(1DTZ2!Yrr&`V8J9uSyIHwlB5(yg|6A`}H@Y>z`mKjYDjp*R)R zG`w1sZsk`SjD#X8FL6;W{31-cX&3_|Hv7E|t3T%z8s5sZPN?U5o5xJ^GLXTR z;##JX`zHeBy78%&JDxZrL(&tX8hrZgDr-DGB#q!Yvj|rS9rWbvobHSHbJy=#4sBlV zgU@E)z@F?}_3!`U0V59R>-jl(YFYbT?>Tfx#tHQAjuHp8fA&)eK0PTx3|?+x#Y(hd TKk%fN^OAW(mpJt}H2CQswVNTv literal 0 HcmV?d00001 diff --git a/net/wiviz/files/www/wiviz/ap.png b/net/wiviz/files/www/wiviz/ap.png new file mode 100755 index 0000000000000000000000000000000000000000..ccfc86431c5669cdf583f9be708d23b37a5384c9 GIT binary patch literal 1825 zcmV++2j2LJP) z|DJo!J!fEuA>JS)*WcjWlSpQdLeUbEd(1QQ{gr)7XiOrRL9+S%$VlErBKd;%NV3TS z?;f3%hd`1=lH5bGh~z6Iliy8|WEII0NmkLg(IcDu?urM_w^v`1duS{M0<577S8IQhZ4PNF)1iaWPP_)0X{)7{8?iL=ZeZ43Sl!!~zM6$ZeObMwLGi z1LEYl1CUH67cXACn3|iLi%d*R;PrYDLLj9?*LB+MHqB;}Mx#NkR^#s7yR5CPmGk-h zFBGpVA&HSA0u&JZ)#Vkyl9gOC`o)O3;xTemkc5Ha9@!^Ufr>(6_SC6U>AAVNNH`oO z6bdmmHpbZ47^9=3ghC;L!61P^fIuL?*w`3XuU_TSrAyIdGI>kWG&{~R2x9z`5|HSz ztN_G$MX`^pZ?MOKGXEh46v)-F`(Ql>qjKYf2kk{V<<$-lQnD+DS{c?fj}T};lc&yF(HKO_aKBq zAx@k)fyd)94a;&LsPGSK;Z&Fl8wKZgUm{^DmTOmBnIUE=h}fR$cDu3Z>1n#%t}{BF zjx%&!$1n^!oeqX!xSo?zIwKeix{a2U_=1XcJ*)g*0U|&ZEF1e0v0wTZASv%52vr0z zOCcVQCptMf=`!5TPOVmpR;%S)x7%%WU3W;?#0OpmsSlrP$h+ zh~PdFxC(sk4kpaii6M6rfY(`BBFwr^T`6VZ(W6H+ z8V!epJ=8eqN5)PF8yg!{!!Qbf-Au)J->M$eno2rnh@FBDAYvYd1=N&iDlGDQE1M+E z4A<>;)6btjuReSB%n9;-B>ItQwOYJ-^@?`8onBd4u?On!AcU))5zC?;Z zgkM{yr@P@*V*11E!~3ZNOe4=E|4&9Z@T=Q;O^kQ04(6p%)^HddGX?f z%kX|AwzjrdTU(=At!DE1{BCa{De_}7oF#)D}#i+1c4)dwZMh?d?jZ(@8BaFRRVd zEP@DGVwg$gSB^~MI+6?@k>(_6ORg5P`*w({K!pXWNTTEw#b)JM#_Z&7tFLLAHYue{ z00|*PZwg0BnG!-2oQBFh=MBsi-!;_SZWSa6@?_}kQx1gv1?4fb&IbUu{J>sa(=>Vc z@?~denkEl1uUl`DRg&CtzN8Gm;ExYxFs1kz1>Uwk0I26mk86(%s$PxjK$s6HfK}cP zKyQiCtMn$4I3JKe@S~%#^jjduZ6rmoPWhfprDCv0c42mmZx#o}#r_@v+toJ@eC~(B zA?H7gNB$=;By!v^By!v^By!v^By!v^By!v^By!v^By!v^By!yFe?#OOx4X)2eI!jG P00000NkvXXu0mjf4Ax%f literal 0 HcmV?d00001 diff --git a/net/wiviz/files/www/wiviz/pip-idle.gif b/net/wiviz/files/www/wiviz/pip-idle.gif new file mode 100755 index 0000000000000000000000000000000000000000..fa923bdf162888c0df687cfd53cc96ef0b9ba2a4 GIT binary patch literal 190 zcmZ?wbhEHbnkfO%gf74OG}H2it_XGb8>PrGc*7H z|IdH~6o0ZXGB8Lp=zzpPb~3P9KTzvSIjQsF&=id%8O@y{jS5E|6*06-T+r+8XXvm* kY=ZZ@8MAz*ondt|>hdx&Vn3RB(Zy?a*Jn<>ZYKt70J>FCssI20 literal 0 HcmV?d00001 diff --git a/net/wiviz/files/www/wiviz/pip-idle.png b/net/wiviz/files/www/wiviz/pip-idle.png new file mode 100755 index 0000000000000000000000000000000000000000..3fe25fe333553b289a11a54d04a9a4c7f5b51e78 GIT binary patch literal 331 zcmV-R0kr;!P)aCk08sqFf1hxm`?9 zNCN$)^XEI~eCHhaC&bZ6lH|@9vl2qQPYK4DjSwRAeg7BWc9Po&AzmEEK}w0%n!2tT z8{7l0rwK`tya5}}^RR6jtu+8?nocK$K@fc1jDG04F0SjMl%gz4@;pD0hhab|6;35R zDy3+ehN`OA@AtDs`@W|v%ZJ$xUDuIi+1bmqZHsN&030Q4&oW0eO@owjdnz!-#Fxms z-43laj^o5I|HJ3ua0siaLP`mMQi`tYST2{VD2hI21pw>y`l%?2*s`qWG4!)oEMnjH dzpqKYia)m{a|fqo=sf@c002ovPDHLkV1lhjlN0~| literal 0 HcmV?d00001 diff --git a/net/wiviz/files/www/wiviz/pip.gif b/net/wiviz/files/www/wiviz/pip.gif new file mode 100755 index 0000000000000000000000000000000000000000..1c566e9aa2d2085ed1c5f71a544fe470c39e19ef GIT binary patch literal 190 zcmZ?wbhEHb-|G|I(2`K(# zVPs&CX3znNf$U^pwSJ)1mm-Gv$S`kff80i(xBdH?_b literal 0 HcmV?d00001 diff --git a/net/wiviz/files/www/wiviz/pip.png b/net/wiviz/files/www/wiviz/pip.png new file mode 100755 index 0000000000000000000000000000000000000000..5c05a737ae4ac87ecadf78df815281fc6663e270 GIT binary patch literal 323 zcmV-J0lfZ+P)(3`2IR2+|(_KcIi$E=$0ys;V_C zfm}mF#zoMUE*Sz|b@SfmocEl2;g6E);F_RqFhfDSCSWk3Aik2`8^CJgE)?YCkPbF2 zGBl4Qlnpk3(>lR5!37ZBbB2QjK!)assF~#}xxB3s{ByQ(ueNY-CiV36bar;Owzf7kHPzSGS5{V*mX;P373JsW=j7yMW@e_P zr6naL#mC1-Mn(n&1^M{+czSxexw+Zf+gn;%8XFrM85#Zm|DS;xK=CIFBLjm5gAT|r zke?XX{yR)5@X(R!Ke43fWRBJR3oA;z)<&(rv8L?w+p7H!HdOfN&EC0u^2;2PsdiI^ zqG!k@DoOFC=a$v0iOQ=rixnl8mP@HL_b65;)-^QsOi^o%>!|3SI#oqNJ$ho}oF&Z? zDp6_*0?U`Ko3|iRRX}y!HklQXYE|3TsY-2(P}#C~sf==zy2Rw8bLK}W3Z7jeuXu9t z<*DZ*6+~~|y0%MD@%}1N0r{+hA?osCH{}Hdn-s-GrQ{T6*92_-y;RlWgz%T;huHX} z3_=zNG&-^JUCrW+N@`+m3zty{QTTqGiJg^|iASS=;UE*AjGRTp%LPsDogQ8m6Fg2% zX69C8^7}9&!J*;*dN^PBjt4`jmNcj)0F@wmzJq(7tAo&HQD*| z^NY)~<0BhcIM3+1pGh;SvpxOk`9kmeKeC^;2z)jzbmEXJNSIOkq>`nHQ?9|ZzbM4O niK&t8(Dr*3ovbrXDRk9t;GfUD`-)M!z?2M&N1YMCLQ zH`#^W(yqLzvWZr&?aO%M0n-V&Xi}lcbs`~0(~PDI+Y^7uaa`4KLBEYg8qGQHb3R_3 z8Npa%jWyO-V~sV|SYwU#Gm|nZL*;ULPEnLa;E|#z8&b-ulgUg@PU8Fi$eehd$E{npa9wxa zvaCOQp4T6l@qHc62#TUCJC1`8V$^={JP*sVGEo#Qj@&rMK!9h>W^5$LoN9xFN zoCBMS`#-oN)e#UW<$GY+w(XIF9O(a*m5JjY%*@QVA3l6o6hh$p{z$gsY&OfCJ9n@w zi&m?J@B8zXW&PGP&3VhRels&ObHy}G-oAbN{-QokowX{J%3lhF!joJs$Li|pg#q&U zeB5tRN*u?*G)-n_XGx_}_`Xl4(}`dAgSG+eL{U^%6vZ7325use*x0X@uLCKU%X3$* zT-jJySm4Er7hjbXRaGgKN^xl(0Oa%ec=TztT7+SUs;a1}il%8yOiYkUrReo~gkgy1 zd2~9R7&Hh1fcie<#$YhmP!wh7;5K3C7%znQrx2o+PN&Z`Z>7^|3WWm2ViDi>ky7G$ zUJTIfcJY0mow=+0``$0<7Btj$AJq@goDLJckkpSoG-oepb8~Y{PEH>2(QGyef&kz5 zv2FVRZbM30KG7ownwgn#-@SYH0W)hc)I-X#bE8jS{u-b z$L8iH0JU0;?d|Ou&-4Cx=8aXQQu$Y{R?Bs}U8Iyp&Y7l3sZ=7D%dxe!6`wB@3S_g{ zz37L#_*I?Oz0Zq3F8x&-^B*2sXRj=SARr7wW@l$fCO==(>2!GY>J^^nQ7V<<-dkB& zK}xAio@#wxilQt@DW5%l{5Vc!Hk+kXDxvE-j^ptB`Evk-5a_y&=Xq?mex!A8n%2GR zgsIbAoB$xePX>68O{U)LqBgdEmHm&>uRun+^b+wIS5JqrY&QmOp( z@ZrOZs;VTDNmNyh4ePqj_3PJ}o}S)oP7S=@nfSMjq4rM8!13#*-t;K_$zf`03MnO; zrXhsDvaBQ7ab0%@SYBIOJG->@LB6#tYpGVNVcRy2q(M+KL#*O6T>iYUH8+7!%Uwf{{K|+W~2tm8uj<-==*GZ?-7={raCzDCS zFr?S(5d;DK{@#$Q>pF%pJX^4L-y)^NG)->bzKy170P#lB?RM*f!C-0FhGCG)2%_8CW@jZMNyW&G+%u+NV#0j0=YyYF&{-yMp2X+kOAh?=`@
    `t$z}fiFxF-1zv-!< UzT-5&xc~qF07*qoM6N<$f;oeKE&u=k literal 0 HcmV?d00001 diff --git a/net/wiviz/files/www/wiviz/station.gif b/net/wiviz/files/www/wiviz/station.gif new file mode 100755 index 0000000000000000000000000000000000000000..c8a075f4200ea05bbffbe1ebddfb65ab61c4227e GIT binary patch literal 929 zcmV;S177?`Nk%w1VKM+R0M!5h05kssGx7#ARlatt%f4>P|RGnpJS zj2|<9CNpL!Gg&M%OfNG(VsB|P|Cu)Rl{xE@KiG^$#f40=e^01`2^ASJ`d%mV0E&nPj58EIW01K4+Lxk~uFZF)=fgk3^!Gn<^|eJPZ#lo_!ugid3biF**+l0ssj(tArtk zB%?~2HnOw~1OV0m0k^rlhp$b)sKUh8g=XyM@G0Rud2pg=(jhYJ=lYT(epqpp;OI^xYkz+lIWwX~wKkTE013l=L- ztY9&t=Z?CplJJ=EqO3du4s^^o!2(BG6)k3Dpb%jK1q&B6%$Q-KgzFM4LO%w}u*8l7 z)&eBR{Gvn)9DYI1z%U_#@#7UZ#8C12HH#cNT0}0=FrXoOq4mhF{myi;#Sb^hB_8Dq=veAfdc@07HHQ`u87t8A^b@0cASiz=CV-(N=^_HB`vLU>j7RVFc&7AfSs8SO5VHIqcBe zfwY)dL|r<>;93hW5T-!}7F0mNdCY~j+G;U)w%LIRI>^rqH{`%W4mZruf`lo=_QDIy zHTPN!JKTVRYxYxx)DGyZcu&5W1RcJ$@CGdb|ri=&y84shjD(kF81OWg$ DNjHN2 literal 0 HcmV?d00001 diff --git a/net/wiviz/files/www/wiviz/station.png b/net/wiviz/files/www/wiviz/station.png new file mode 100755 index 0000000000000000000000000000000000000000..8daf8df35abb3d9d3fa957748a0846dafb6e93cf GIT binary patch literal 2476 zcmV;d2~+loP)?{99XTghf$3_ZV-oV zZ!7g+538UgeOLm6Qg_LdVT-Z{>t)w*kjJnf%?%B@t)?40k+7?~N@ovNR4bDI#ctAv zd|xczd+zW2KEL1jo%=f%p6j`u>)Ais$rECX-;e;UDrG;6Y^z@o!o?U0SpbHZ<{kV% z7C48(Cr`zXebpPBCBq#ixz4|sK(dVF{Ihneza%3_LR*f>aGpt)`6F*3xryZBQ}S*X zlDya6tz^5%PxKx424|UMncsF`-g?TOZlet6$uQC0vEFJ!UGJNvHyL4)Wj^UFv;NTA z$hBvuHhjJ#nO zC;J+hEo!XnocH@C;Dauruc#x9x%foS>VEkdoxrRV||A^fkMCMd$esvwu*kSSY)LRHfN|X zj)P8+93prXUDvnHN`{XSm}E$!knCJv@5>g*aS2#K>4Mx;eKWGt=-a%F&6%!eD~$7* zb(wfvLsivuB9S<|u&~gtDV)Jz3P*~54cN)6&5jxk=_YJ56GkFODTJzKRY|S zA^Ly7LGNp@i4Thmb8|UHM@Px$^V86$yKR!k#Wauy63_+#keK`%h!NfuNHUo`;c~gA zcN_i9RN?0g)vo~H^ZCL;hzY|mKI|Iw0e6|i#K4ar(FLopz(4TwGZMQ3ak*UCP$-m0 zr_;NN{#LTcU>NTrgdm^KPXQnH8MZ))a2sT!R(3m|3!v3%O-A1ndIl+&JOsesbv?%ga$JC&*GOmA5<*-b9UVYh(9&saPx$i^b5?B8OPoi(LTf2y7>g<2VEY zfp997>OBc6JlHD)z`&y)mSx@2H0_+<@An@#aDe-^#e|ehR5T9jtTN`+>#iK?oo zs*2C&V_;wakH^F6>MG4<6U(xw)oLA3$8li2FI$mPF0@*$1w~O-9zkx}#tR{?3n9{8 zub0^yrA@Py{pK3>s7B?~*UtB3bgoM9nuV_hs;c5R4$WqhW51#2dDK-DWy&y&ORvBFI>q7@e9lh@g+j#RX*5lvR4Q@#@?`*o5NMi)Wm(*= z+@o@8h{~y>G(G*N=mEgNb~{+F2RZcF8fxJ-FTeaUjYfmT#YKw6BH?hD@$vBvV6|HP z+Sjc>+F4mXbLNa+RaM+>H>#?33~QRk(W6Hh8X8(JP9Io54q_h-BuA)tcJm^U|)qYjyp<5o&2^X-mMZAj;)3`FtLL)2B~&>Y!XMQz#Uu zR;y-v)9H6q-aW|U3IqZK0s+F|@Dl;5s)}J4*tU%jqO)A9)hdNTfpWRrDde5_v!kVz zN~M-{UH5C6hTH8X7!0DS>bA>eGr(%K%H6wniN#_FA#l6h)M~X(J0qo>QWRx+yZ&m| zAjxDh1cY5KS3*kZR}>}9`UiuA*XzaS^RW>U=q!=Vl*{GFWHMca+-Ni|NhzluFXVj# z*-D#00;E+{Mbk8VK3@k`RaJCdCzo6QfM*y6j^k`u$WH}iD+wV6Tdh{Y<#L6klwn0t q60B!34Irg7rIhFP0`OelR{bBXvzd#1Uw6p>0000 + + +Wi-viz wireless network environment visualization + + + + +

    OpenWRT Wi-viz network visualization

    +
    +Status: Monitoring
    + +

    +Channel setting: +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + diff --git a/net/wiviz/files/www/wiviz/wiviz.js b/net/wiviz/files/www/wiviz/wiviz.js new file mode 100755 index 0000000..dc67d8f --- /dev/null +++ b/net/wiviz/files/www/wiviz/wiviz.js @@ -0,0 +1,291 @@ +/* +This file is part of Wi-viz (http://wiviz.natetrue.com). + +Wi-viz is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License v2 as published by +the Free Software Foundation. + +Wi-viz 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 Wi-viz; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +var mv = 353; +var stupid = eval('window.attachEvent') ? 1 : 0; +var hosts; +var idle_timeout = 20; +var erase_timeout = 35; +var skew_x = 0; skew_y = 0; +var listening = 1; +var wiviz_cgi_url = "/cgi-bin/wiviz/get.cgi"; + +//What? You mean the POSIX thread API hasn't been ported to Javascript? Bugger. +function scan_thread() { + var loc = document.getElementById('wivizGetFrame').contentWindow.location; + if (!listening) return; + if (loc.href != wiviz_cgi_url) { + loc.replace(wiviz_cgi_url); + } + else { + loc.reload(true); + } + setTimeout("scan_thread()", 5000); +} + +function toggleListen() { + statusel = document.getElementById('status'); + statusbutton = document.getElementById('togglelisten'); + listening = 1 - listening; + if (listening) { + statusel.innerHTML = "Monitoring"; + statusbutton.value = "Stop monitoring"; + document.getElementById('content').innerHTML = ''; + scan_thread(); + } + else { + statusel.innerHTML = "Stopped"; + statusbutton.value = "Start monitoring"; + } +} + +function channelSet() { + channelset = document.getElementById('channelsel').value; + if (channelset == 'hop') { + document.getElementById('hopoptions').style.display = 'inline'; + } + else { + document.getElementById('hopoptions').style.display = 'none'; + if (channelset != 'nochange') document.forms[0].submit(); + } +} + +function mousenter(e) { + if (stupid) e = event; + el = stupid ? e.srcElement : e.currentTarget; + el.parentNode.parentNode.className = 'hostdiv_hov'; + el.nextSibling.nextSibling.nextSibling.style.visibility = 'visible'; +} + +function mouseout(e) { + if (stupid) e = event; + el = stupid ? e.srcElement : e.currentTarget; + el.parentNode.parentNode.className = 'hostdiv'; + el.nextSibling.nextSibling.nextSibling.style.visibility = 'hidden'; +} + +function generate_mnemonic(hash) { + c = new Array('b','c','d','f','g','h','j','k','l','m','n','p','qu','r','s', + 't','v','w','y','z','th','ch','sh','cc','rr'); + v = new Array('a','e','i','o','u','ae','ai','ao','au','eo','ei','eu','iu','oa','oe'); + var i, a; + var p = hash & 1; + var n = ''; + for (i = 0; i < 4; i++) { + a = p ? c : v; + n += a[hash % a.length]; + hash += a.length << 3 + a.length / 2; + hash *= hash; + p = 1 - p; + } + return n; +} + +function mkhash(mac) { + var macarr = mac.split(/:/); + var hash = 0; + for (j = 0; j < 6; j++) { + hash += parseInt(macarr[j]) * j << j; + hash += 11; + } + if (hash < 0) hash = -hash; + return hash; +} + +function wiviz_callback(mhosts, cfgstring) { + var nh = ''; + hosts = mhosts; + for (i = 0; i < hosts.length; i++) { + hs = hosts[i]; + if (hs.length == 0) break; + hs.mac = hs[0]; + hs.rssi = hs[1]; + hs.desc = hs[2]; + hs.descarr = hs.desc.split(/-/) + hs.age = hs[3]; + hs.hash = mkhash(hs.mac); + hs.mnem = generate_mnemonic(hs.hash) + hs.name = hs.mnem; + el = document.getElementById(hs.mnem); + if (el) { + if (hs.age > erase_timeout) { + el.parentNode.removeChild(el); + continue; + } + el.innerHTML = genHTML(hs); + } + else { + if (hs.age > erase_timeout) continue; + hs.x = Math.sin(hs.hash / mv) * hs.rssi * 2 - 67; + hs.y = Math.cos(hs.hash / mv) * hs.rssi * 2; + nh += "
    "; + nh += genHTML(hs) + "
    "; + } + } + document.getElementById('content').innerHTML += nh; + + cfgarr = cfgstring.split(/-/); + if (cfgarr[1]) { + if (cfgarr[1] == 'hopping') cfgarr[1] = 'hop'; + document.getElementById('channelsel').value = cfgarr[1]; + if (cfgarr[1] == 'hop') channelSet(); + } + + //repip(); + setTimeout("declump(); repip();", 250); +} + +function repip() { + var nh = ""; + if (!hosts) return; + for (i = 0; i < hosts.length; i++) { + hs = hosts[i]; + if (hs.length == 0) break; + mac = hs[0]; + rssi = hs[1]; + desc = hs[2].split(/-/); + if (desc[0] == 'sta' && desc[1] == 'assoc') { + bss = desc[2]; + hs.apmnem = generate_mnemonic(mkhash(bss)); + ap = document.getElementById(hs.apmnem); + sta = document.getElementById(hs.mnem); + if (ap && sta) { + x = parseInt(sta.style.left); + y = parseInt(sta.style.top); + dx = parseInt(ap.style.left) - x; + dy = parseInt(ap.style.top) - y; + x += 67; + y += 10; + d = Math.sqrt(dx*dx+dy*dy); + for (j = 0; j < d; j += 15) { + nh += ""; + } + } + } + } + document.getElementById('pips').innerHTML = nh; +} + +function declump() { + var c = 0; + var top = 30000,left = 30000,right = -30000,bottom = -30000; + for (i = 0; i < hosts.length; i++) { + for (j = 0; j < hosts.length; j++) { + if (i == j) continue; + e1 = document.getElementById(hosts[i].mnem); + e2 = document.getElementById(hosts[j].mnem); + if (!e1 || !e2) continue; + x1 = parseInt(e1.style.left); + x2 = parseInt(e2.style.left); + y1 = parseInt(e1.style.top); + y2 = parseInt(e2.style.top); + if (x1 < left) left = x1; + if (y1 < top) top = y1; + if (x1 > right) right = x1; + if (y1 > bottom) bottom = y1; + ox = x2; + oy = y2; + dist = Math.sqrt(Math.pow((x1-x2), 2) + Math.pow((y1-y2), 2)); + if (dist == 0) { + x2 += Math.random() * 5; + y2 += Math.random() * 5; + dist = 10; + } + if (dist < 100) { + cx = (x1-x2) * 5 / (dist / 3); + cy = (y1-y2) * 5 / (dist / 3); + x2 -= cx; + y2 -= cy; + } + if (hosts[j].apmnem == hosts[i].mnem + || hosts[i].apmnem == hosts[j].mnem) { + cx = (x1-x2) * 5 / (dist / 3); + cy = (y1-y2) * 5 / (dist / 3); + if (dist > 150) { + x2 += cx; + y2 += cy; + } + } + if (Math.abs(ox-x2) > 2 || Math.abs(oy-y2) > 2) { + e2.style.left = parseInt(x2); + e2.style.top = parseInt(y2); + c++; + } + } + } + if (top < bottom && left < right) { + document.getElementById('debug').innerHTML = left + "," + right + "," + top + "," +bottom; + document.getElementById('content').style.left = + document.getElementById('pips').style.left = + -(right - left) / 2 - left - 67; + document.getElementById('content').style.top = + document.getElementById('pips').style.top = + -(bottom - top) / 2 - top - 25; + } + repip(); + if (c) setTimeout("declump()", 100); +} + +function genHTML(hs) { + var nh = ''; + nh += "

    " + hs.mac + "
    '" + hs.name; + nh += "'"; + if (hs.channel) { + nh += " ch" + hs.channel; + } + nh += "

    "; + if (a[0] == 'ap') nh += "Access point"; + if (a[0] == 'sta') nh += "Station"; + if (a[0] == 'adhoc') nh += "Logical ad-hoc entity"; + if (a[0] == 'ap' || a[0] == 'adhoc') { + nh += "
    "; + if (a[5] == '?enc') nh += "Encryption unknown"; + if (a[5] == 'enc') nh += "Encrypted"; + if (a[5] == 'unenc') nh += "Unencrypted"; + if (a[6] == 'wep') nh += "-WEP"; + if (a[6] == 'wpa') nh += "-WPA"; + } + nh += "
    RSSI: " + hs.rssi + " dBm
    " + + "Seen " + hs.age + " seconds ago
    "; + nh += "
    "; + return nh; +} diff --git a/net/wiviz/src/Makefile b/net/wiviz/src/Makefile new file mode 100644 index 0000000..6f23035 --- /dev/null +++ b/net/wiviz/src/Makefile @@ -0,0 +1,25 @@ +## Wi-viz makefile +# Supply your own C cross-compiler; I recommend the one from the OpenWRT buildroot +# Also requires a libpcap to link with, use libpcap.a for static, .so for shared +CC=~/buildroot/staging_dir_mipsel/bin/mipsel-linux-gcc +LDFLAGS=-L~/buildroot/staging_dir_mipsel/lib +LIBS=-lpcap + +CCOPTS=-O2 -Os -pipe -mips32 -mtune=mips32 +INCLUDE=-I~/buildroot/staging_dir_mipsel/include +SOURCES=wiviz.c wl_access.c channelhopper.c +OBJS=wiviz.o wl_access.o channelhopper.o +TARGET=wiviz + +wiviz: ${OBJS} + ${CC} ${CCOPTS} ${INCLUDE} -o ${TARGET} ${OBJS} ${LDFLAGS} ${LIBS} + +wiviz.o: wiviz.c + ${CC} ${CCOPTS} ${INCLUDE} -c ${SOURCES} +wl_access.o: wl_access.c + ${CC} ${CCOPTS} ${INCLUDE} -c ${SOURCES} +channelhopper.o: channelhopper.c + ${CC} ${CCOPTS} ${INCLUDE} -c ${SOURCES} + +remake: + touch wiviz.c wl_access.c channelhopper.c diff --git a/net/wiviz/src/channelhopper.c b/net/wiviz/src/channelhopper.c new file mode 100644 index 0000000..0a3e6fe --- /dev/null +++ b/net/wiviz/src/channelhopper.c @@ -0,0 +1,48 @@ +/* +This file is part of Wi-viz (http://wiviz.natetrue.com). + +Wi-viz is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License v2 as published by +the Free Software Foundation. + +Wi-viz 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 Wi-viz; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +#include +#include +#include +#include +#include "wl_access.h" +#include "channelhopper.h" +#include "structs.h" + +void ch_sig_handler(int i) { + + } + +void channelHopper(wiviz_cfg * cfg) { + int hopPos; + int nc; + + //Turn off signal handling from parent process + signal(SIGUSR1, &ch_sig_handler); + signal(SIGUSR2, &ch_sig_handler); + + //Start hoppin'! + hopPos = 0; + while (1) { + nc = cfg->channelHopSeq[hopPos]; + hopPos = (hopPos + 1) % cfg->channelHopSeqLen; + //Set the channel + fprintf(stderr, "It sets the channel to %i\n", nc); + wl_ioctl(WL_DEVICE, WLC_SET_CHANNEL, &nc, 4); + //Sleep + usleep(cfg->channelDwellTime * 1000); + } + } diff --git a/net/wiviz/src/channelhopper.h b/net/wiviz/src/channelhopper.h new file mode 100644 index 0000000..6ab63af --- /dev/null +++ b/net/wiviz/src/channelhopper.h @@ -0,0 +1,19 @@ +/* +This file is part of Wi-viz (http://wiviz.natetrue.com). + +Wi-viz is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License v2 as published by +the Free Software Foundation. + +Wi-viz 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 Wi-viz; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +// Channel hopper definition + +void channelHopper(); diff --git a/net/wiviz/src/structs.h b/net/wiviz/src/structs.h new file mode 100644 index 0000000..10f80f3 --- /dev/null +++ b/net/wiviz/src/structs.h @@ -0,0 +1,169 @@ +/* +This file is part of Wi-viz (http://wiviz.natetrue.com). + +Wi-viz is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License v2 as published by +the Free Software Foundation. + +Wi-viz 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 Wi-viz; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +//Structure definitions for wireless packets + +#define MAX_HOSTS 257 + +#ifdef DEFINE_TYPES +typedef unsigned short u_short; +typedef unsigned char u_char; +typedef unsigned int u_int; +#endif + +typedef enum { + mgt_assocRequest = 0, + mgt_assocResponse = 1, + mgt_reassocRequest = 2, + mgt_reassocResponse = 3, + mgt_probeRequest = 4, + mgt_probeResponse = 5, + mgt_beacon = 8, + mgt_disassoc = 10, + mgt_auth = 11, + mgt_deauth = 12 + } wifi_frametype; + +typedef struct ieee802_11_hdr { + u_char frame_control; + u_char flags; +#define IEEE80211_TO_DS 0x01 +#define IEEE80211_FROM_DS 0x02 +#define IEEE80211_MORE_FRAG 0x04 +#define IEEE80211_RETRY 0x08 +#define IEEE80211_PWR_MGT 0x10 +#define IEEE80211_MORE_DATA 0x20 +#define IEEE80211_WEP_FLAG 0x40 +#define IEEE80211_ORDER_FLAG 0x80 + u_short duration; + u_char addr1[6]; + u_char addr2[6]; + u_char addr3[6]; + u_short frag_and_seq; + } ieee802_11_hdr; + +typedef struct { + u_char timestamp[8]; + u_short bcn_interval; + u_short caps; +#define MGT_CAPS_AP 0x1 +#define MGT_CAPS_IBSS 0x2 +#define MGT_CAPS_WEP 0x10 + } ieee_802_11_mgt_frame; + +typedef struct { + u_char tag; + u_char length; + } ieee_802_11_tag; + +typedef enum { + tagSSID = 0, + tagRates = 1, + tagChannel = 3, + tagVendorSpecific = 0xDD + } i81tag; + +typedef struct prism_hdr { + u_int msg_code; + u_int msg_length; + char cap_device[16]; + //char dids[0]; + } prism_hdr; + +typedef struct prism_did { + u_short did; + u_short status1; + u_short status2; + u_short length; + //int value[0]; + } prism_did; + +typedef enum prism_did_num { + pdn_host_time = 0x1041, + pdn_mac_time = 0x2041, + pdn_rssi = 0x4041, + pdn_sq = 0x5041, + pdn_datarate = 0x8041, + pdn_framelen = 0xa041 + } prism_did_num; + + + +//Structure definitions for data collection + +typedef enum { + typeUnknown, + typeAP, + typeSta, + typeAdhocHub + } host_type; + +typedef enum { + ssUnknown, + ssUnassociated, + ssAssociated + } sta_state; + +typedef enum { + aetUnknown, + aetUnencrypted, + aetEncUnknown, + aetEncWEP, + aetEncWPA + } ap_enc_type; + +typedef struct { + u_char bssid[6]; + char * ssid[32]; + u_char ssidlen; + u_char channel; + u_short flags; + ap_enc_type encryption; + } ap_info; + +typedef struct { + sta_state state; + u_char connectedBSSID[6]; + } sta_info; + +typedef struct { + u_char occupied; + u_char mac[6]; + host_type type; + time_t lastSeen; + int RSSI; + ap_info * apInfo; + sta_info * staInfo; + } wiviz_host; + +//Primary config struct +typedef struct { + wiviz_host hosts[MAX_HOSTS]; + int numHosts; + int readFromWl; + time_t lastKeepAlive; + int channelHopping; + int channelDwellTime; + int channelHopSeq[14]; + int channelHopSeqLen; + int curChannel; + int channelHopperPID; + } wiviz_cfg; + + + + + diff --git a/net/wiviz/src/wiviz.c b/net/wiviz/src/wiviz.c new file mode 100644 index 0000000..d2ad9f2 --- /dev/null +++ b/net/wiviz/src/wiviz.c @@ -0,0 +1,572 @@ +/* +This file is part of Wi-viz (http://wiviz.natetrue.com). + +Wi-viz is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License v2 as published by +the Free Software Foundation. + +Wi-viz 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 Wi-viz; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +#include +#include +#include + +#define HOST_TIMEOUT 300 + +#include "wl_access.h" +#include "structs.h" +#include "channelhopper.h" + +#ifdef WIN32 +#define OFFLINE +#endif +#ifndef __cplusplus +#define __cdecl +#endif + +#define nonzeromac(x) memcmp(x, "\0\0\0\0\0\0", 6) + +void dealWithPacket(wiviz_cfg * cfg, struct pcap_pkthdr * header, const u_char * packet); +wiviz_host * gotHost(wiviz_cfg * cfg, u_char * mac, host_type type); +void fprint_mac(FILE * outf, u_char * mac, char * extra); +void print_mac(u_char * mac, char * extra); +void print_host(FILE * outf, wiviz_host * host); +void __cdecl signal_handler(int); +void readWL(wiviz_cfg * cfg); +void reloadConfig(); + +wiviz_cfg * global_cfg; + +//////////////////////////////////////////////////////////////////////////////// +int main(int argc, char * * argv) { + pcap_t *handle; + char *dev; + char errbuf[PCAP_ERRBUF_SIZE]; + int stop = 0; + int oldMonitor, newMonitor; + struct pcap_pkthdr header; + const u_char *packet; + wiviz_cfg cfg; + int i; + int defaultHopSeq[] = { 1, 3, 6, 8, 11 }; + + global_cfg = &cfg; + signal(SIGUSR1, &signal_handler); + signal(SIGUSR2, &signal_handler); + + fprintf(stderr, "Wi-Viz infogathering daemon by Nathan True\n"); + + memset(&cfg, 0, sizeof(wiviz_cfg)); + cfg.numHosts = 0; + cfg.lastKeepAlive = time(NULL); + cfg.channelHopping = 0; + cfg.channelDwellTime = 1000; + cfg.channelHopSeqLen = 5; + memcpy(cfg.channelHopSeq, defaultHopSeq, sizeof(defaultHopSeq)); + + wl_ioctl(WL_DEVICE, WLC_GET_MAGIC, &i, 4); + if (i != WLC_IOCTL_MAGIC) { + fprintf(stderr, "Wireless magic not correct, not querying wl for info\n"); + cfg.readFromWl = 0; + } + else { + cfg.readFromWl = 1; + wl_ioctl(WL_DEVICE, WLC_GET_MONITOR, &oldMonitor, 4); + newMonitor = 1; + wl_ioctl(WL_DEVICE, WLC_SET_MONITOR, &newMonitor, 4); + } + + reloadConfig(); + +#ifndef OFFLINE + dev = "prism0"; + handle = pcap_open_live(dev, BUFSIZ, 1, 0, errbuf); +#else + dev = "c:\\cifsroot\\wdump2.pcap"; + handle = pcap_open_offline(dev, errbuf); +#endif + + if (cfg.readFromWl) { + readWL(&cfg); + } + + if (!handle) { + fprintf(stderr, "Failure to open pcap!\nErr=%s\n", errbuf); + return -1; + } + while (!stop) { + packet = pcap_next(handle, &header); + if (!packet) break; + dealWithPacket(&cfg, &header, packet); + if (time(NULL) - cfg.lastKeepAlive > 30) stop = 1; + } + + signal_handler(SIGUSR1); + + if (cfg.channelHopperPID) kill(cfg.channelHopperPID, SIGKILL); + + for (i = 0; i < MAX_HOSTS; i++) { + print_host(stderr, cfg.hosts + i); + if (cfg.hosts[i].occupied) printf("\n"); + if (cfg.hosts[i].apInfo) free(cfg.hosts[i].apInfo); + if (cfg.hosts[i].staInfo) free(cfg.hosts[i].staInfo); + } + + wl_ioctl(WL_DEVICE, WLC_SET_MONITOR, &oldMonitor, 4); + + pcap_close(handle); + return 0; + } + +//////////////////////////////////////////////////////////////////////////////// +void writeJavascript() { + int i; + FILE * outf; + wiviz_host * h; + + outf = fopen("/tmp/wiviz-pipe", "w"); + if (!outf) { + fprintf(stderr, "Failure to open output file\n"); + return; + } + + global_cfg->lastKeepAlive = time(NULL); + + if(global_cfg->readFromWl) readWL(global_cfg); + + fprintf(outf, "top.hosts = new Array(\n"); + for (i = 0; i < MAX_HOSTS; i++) { + h = global_cfg->hosts + i; + if (h->occupied == 0) continue; + if (time(NULL) - h->lastSeen > HOST_TIMEOUT) { + h->occupied = 0; + } + fprintf(outf, " new Array("); + print_host(outf, h); + fprintf(outf, "),\n"); + } + fprintf(outf, "new Array());\n"); + fprintf(outf, "var cfg_string = 'channel-"); + if (global_cfg->channelHopping) { + fprintf(outf, "hopping"); + } + else { + fprintf(outf, "%i", global_cfg->curChannel); + } + fprintf(outf, "';\ntop.wiviz_callback(top.hosts, cfg_string);\n"); + fclose(outf); + } + +//////////////////////////////////////////////////////////////////////////////// +void reloadConfig() { + FILE * cnf; + wiviz_cfg * cfg = global_cfg; + char filebuffer[512]; + char * fbptr, * p, * v, * vv; + int fblen, val; + int hopCfgChanged = 0; + int newHopSeq[12]; + int newHopSeqLen = 0; + + fprintf(stderr, "Loading config file\n"); + + cnf = fopen("/tmp/wiviz-cfg", "r"); + if (!cnf) { + fprintf(stderr, "Wiviz: No config file (/tmp/wiviz-cfg) present, using defaults\n"); + return; + } + + fblen = fread(filebuffer, 1, 512, cnf); + fclose(cnf); + if (fblen >= 512) { + fprintf(stderr, "Error reading config file\n"); + return; + } + filebuffer[fblen] = 0; + fprintf(stderr, "Read %i bytes from config file\n", fblen); + + fbptr = filebuffer; + + while (fbptr < filebuffer + fblen && *fbptr != 0) { + p = fbptr; + //Find end of parameter + for (; *fbptr != '=' && *fbptr != 0; fbptr++); + *fbptr = 0; + v = ++fbptr; + //Find end of value + for (; *fbptr != '&' && *fbptr != 0; fbptr++); + *(fbptr++) = 0; + fprintf(stderr, "Config: %s=%s\n", p, v); + //Apply configuration + if (!strcmp(p, "channelsel")) { + //Channel selector + cfg->channelHopping = 0; + if (!strcmp(v, "hop")) { + //Set channel hopping + cfg->channelHopping = 1; + hopCfgChanged = 1; + } + else if (!strcmp(v, "nochange")) { + //Don't change anything, read channel from wireless card + readWL(cfg); + } + else { + val = atoi(v); + if (val < 1 || val > 14) { + fprintf(stderr, "Channel setting in config file invalid (%i)\n", cfg->curChannel); + } + else { + cfg->curChannel = val; + if (cfg->readFromWl) { + if (wl_ioctl(WL_DEVICE, WLC_SET_CHANNEL, &cfg->curChannel, 4) < 0) { + fprintf(stderr, "Channel set to %i failed\n", cfg->curChannel); + } + } + else { + fprintf(stderr, "Can't set channel, no Broadcom wireless device present\n"); + } + } + } + } + if (!strcmp(p, "hopdwell")) { + val = atoi(v); + if (val < 100) val = 100; + if (val > 30000) val = 30000; + if (cfg->channelDwellTime != val) hopCfgChanged = 1; + cfg->channelDwellTime = val; + } + if (!strcmp(p, "hopseq")) { + cfg->channelHopSeqLen = 0; + while (v < fbptr) { + for (vv = v; *vv != ',' && *vv != 0; vv++); + if (*vv == 0) { + cfg->channelHopSeq[cfg->channelHopSeqLen++] = atoi(v); + break; + } + *vv = 0; + cfg->channelHopSeq[cfg->channelHopSeqLen++] = atoi(v); + v = vv + 1; + } + } + /* + if (!strcmp(p, "")) { + } + */ + } + //Apply channel hopper settings + if (cfg->channelHopping == 0 && cfg->channelHopperPID) { + kill(cfg->channelHopperPID, SIGKILL); + cfg->channelHopperPID = 0; + } + if (cfg->channelHopping == 1 && hopCfgChanged) { + if (cfg->channelHopperPID) kill(cfg->channelHopperPID, SIGKILL); + if ((cfg->channelHopperPID = fork()) == 0) { + channelHopper(cfg); + } + } + } + +//////////////////////////////////////////////////////////////////////////////// +void __cdecl signal_handler(int signum) { + if (signum == SIGUSR1) writeJavascript(); + if (signum == SIGUSR2) reloadConfig(); + } + +//////////////////////////////////////////////////////////////////////////////// +void dealWithPacket(wiviz_cfg * cfg, struct pcap_pkthdr * header, const u_char * packet) { + ieee802_11_hdr * hWifi; + prism_hdr * hPrism; + wiviz_host * host; + wiviz_host * emergebss; + host_type type = typeUnknown; + int wfType; + int rssi = 0; + int to_ds, from_ds; + prism_did * i; + ieee_802_11_tag * e; + ieee_802_11_mgt_frame * m; + char * src = "\0\0\0\0\0\0"; + char * dst = "\0\0\0\0\0\0"; + char * bss = "\0\0\0\0\0\0"; + char * ssid = ""; + int channel = 0; + int adhocbeacon = 0; + u_char ssidlen = 0; + ap_enc_type encType = aetUnknown; + + if (!packet) return; + if (header->len < sizeof(prism_hdr) + sizeof(ieee802_11_hdr)) return; + hPrism = (prism_hdr *) packet; + hWifi = (ieee802_11_hdr *) (packet + (hPrism->msg_length)); + + //Parse the prism DIDs + i = (prism_did *)((char *)hPrism + sizeof(prism_hdr)); + while ((int)i < (int)hWifi) { + if (i->did == pdn_rssi) rssi = *(int *)(i+1); + i = (prism_did *) ((int)(i+1) + i->length); + } + + //Establish the frame type + wfType = ((hWifi->frame_control & 0xF0) >> 4) + ((hWifi->frame_control & 0xC) << 2); + switch (wfType) { + case mgt_assocRequest: + case mgt_reassocRequest: + case mgt_probeRequest: + type = typeSta; + src=hWifi->addr2; + dst=hWifi->addr1; + break; + case mgt_assocResponse: + case mgt_reassocResponse: + case mgt_probeResponse: + case mgt_beacon: + src=hWifi->addr2; + dst=hWifi->addr1; + bss=hWifi->addr3; + type = typeAP; + break; + } + to_ds = hWifi->flags & IEEE80211_TO_DS; + from_ds = hWifi->flags & IEEE80211_FROM_DS; + if ((wfType & 0xF0) == 0x20 && (wfType & 0xF) < 4) { + //Data frame + src=hWifi->addr2; + dst=hWifi->addr1; + if (!from_ds) type = typeSta; + else type = typeAP; + if (!to_ds && !from_ds) bss = hWifi->addr3; + if (to_ds && !from_ds) bss = hWifi->addr1; + if (!to_ds && from_ds) bss = hWifi->addr2; + } + if (type == typeUnknown) return; + + //Parse the 802.11 tags + if (wfType == mgt_probeResponse || wfType == mgt_beacon) { + m = (ieee_802_11_mgt_frame *) (hWifi + 1); + if (m->caps & MGT_CAPS_IBSS) { + type = typeSta; + adhocbeacon = 1; + } + if (m->caps & MGT_CAPS_WEP) encType = aetEncWEP; + else encType = aetUnencrypted; + e = (ieee_802_11_tag *) ((int) m + sizeof(ieee_802_11_mgt_frame)); + while ((u_int)e < (u_int)packet + header->len) { + if (e->tag == tagSSID) { + ssidlen = e->length; + ssid = (char *)(e + 1); + } + if (e->tag == tagChannel) { + channel = *(char *)(e + 1); + } + if (e->tag == tagVendorSpecific) { + if (e->length >= 4 && memcmp(e + 1, "\x00\x50\xf2\x01", 4) == 0) { + //WPA encryption + encType = aetEncWPA; + } + } + e = (ieee_802_11_tag *) ((int)(e + 1) + e->length); + } + } + + //Look up the host in the hash table + host = gotHost(cfg, src, type); + + //Add any info we received + if (host->RSSI) { + host->RSSI = host->RSSI * 9 / 10 + (-rssi * 10); + } + else { + host->RSSI = -rssi * 100; + } + if (type == typeSta) { + if (nonzeromac(bss)) { + memcpy(host->staInfo->connectedBSSID, bss, 6); + host->staInfo->state = ssAssociated; + emergebss = gotHost(cfg, bss, typeAP); + if (emergebss->RSSI == 0) emergebss->RSSI = 10000; + memcpy(emergebss->apInfo->bssid, bss, 6); + if (adhocbeacon) { + emergebss->type = typeAdhocHub; + if (ssidlen > 0 && ssidlen <= 32) { + memcpy(emergebss->apInfo->ssid, ssid, ssidlen); + emergebss->apInfo->ssidlen = ssidlen; + } + if (channel) emergebss->apInfo->channel = channel; + emergebss->apInfo->flags = hWifi->flags; + emergebss->RSSI = host->RSSI; + if (encType != aetUnknown) emergebss->apInfo->encryption = encType; + } + } + if (wfType == mgt_probeRequest && host->staInfo->state == ssUnknown) host->staInfo->state = ssUnassociated; + } + if (type == typeAP) { + if (nonzeromac(bss)) { + memcpy(host->apInfo->bssid, bss, 6); + } + if (ssidlen > 0 && ssidlen <= 32) { + memcpy(host->apInfo->ssid, ssid, ssidlen); + host->apInfo->ssidlen = ssidlen; + } + if (channel) host->apInfo->channel = channel; + host->apInfo->flags = hWifi->flags; + if (encType != aetUnknown) host->apInfo->encryption = encType; + } + } + +//////////////////////////////////////////////////////////////////////////////// +void print_mac(u_char * mac, char * extra) { + fprint_mac(stdout, mac, extra); + } + +//////////////////////////////////////////////////////////////////////////////// +void fprint_mac(FILE * outf, u_char * mac, char * extra) { + fprintf(outf, "%02X:%02X:%02X:%02X:%02X:%02X%s", + mac[0] & 0xFF, + mac[1] & 0xFF, + mac[2] & 0xFF, + mac[3] & 0xFF, + mac[4] & 0xFF, + mac[5] & 0xFF, + extra); + } + +//////////////////////////////////////////////////////////////////////////////// +#define MAX_PROBES MAX_HOSTS/2 +wiviz_host * gotHost(wiviz_cfg * cfg, u_char * mac, host_type type) { + int i = (mac[5] + (mac[4] << 8)) % MAX_HOSTS; + int c = 0; + wiviz_host * h = cfg->hosts + i; + while (h->occupied && memcmp(h->mac, mac, 6)) { + i++; h++; c++; + if (i >= MAX_HOSTS) { + i = 0; + h = cfg->hosts; + } + if (c > MAX_PROBES) break; + } + if (!h->occupied) { + fprintf(stderr, "New host, "); + fprint_mac(stderr, mac, ", type="); + fprintf(stderr, "%s\n", (type==typeAP) ? "AP" : ((type==typeSta) ? "Sta" : "Unk")); + } + h->occupied = 1; + h->lastSeen = time(NULL); + h->type = type; + memcpy(h->mac, mac, 6); + if (h->type == typeAP && !h->apInfo) { + h->apInfo = (ap_info *) malloc(sizeof(ap_info)); + memset(h->apInfo, 0, sizeof(ap_info)); + } + if (h->type == typeSta && !h->staInfo) { + h->staInfo = (sta_info *) malloc(sizeof(sta_info)); + memset(h->staInfo, 0, sizeof(sta_info)); + } + return h; + } + +//////////////////////////////////////////////////////////////////////////////// +void print_host(FILE * outf, wiviz_host * host) { + int i; + + if (!host->occupied) return; + fprintf(outf, "'"); + fprint_mac(outf, host->mac, "'"); + fprintf(outf, ", -%i, '", host->RSSI / 100); + switch (host->type) { + case typeAP: fprintf(outf, "ap"); break; + case typeSta: fprintf(outf, "sta"); break; + case typeAdhocHub: fprintf(outf, "adhoc"); break; + } + if (host->type == typeSta) { + switch(host->staInfo->state) { + case ssAssociated: + fprintf(outf, "-assoc-"); + fprint_mac(outf, host->staInfo->connectedBSSID, ""); + break; + case ssUnassociated: + fprintf(outf, "-unassoc"); + } + } + if (host->type == typeAP || host->type == typeAdhocHub) { + fprintf(outf, "-channel-%i-ssid-", host->apInfo->channel & 0xFF); + for (i = 0; i < host->apInfo->ssidlen; i++) { + fprintf(outf, "\\x%02X", *((char *)host->apInfo->ssid + i) & 0xFF); + } + switch (host->apInfo->encryption) { + case aetUnknown: fprintf(outf, "-?enc-?alg"); break; + case aetUnencrypted: fprintf(outf, "-unenc-na"); break; + case aetEncUnknown: fprintf(outf, "-enc-unknown"); break; + case aetEncWEP: fprintf(outf, "-enc-wep"); break; + case aetEncWPA: fprintf(outf, "-enc-wpa"); break; + } + } + fprintf(outf, "', %i", time(0) - host->lastSeen); + } + +//////////////////////////////////////////////////////////////////////////////// +#define MAX_STA_COUNT 64 +void readWL(wiviz_cfg * cfg) { + int ap, i; + wiviz_host * host, * sta; + uchar mac[6]; + wlc_ssid_t ssid; + channel_info_t channel; + maclist_t * macs; + sta_rssi_t starssi; + + get_mac(WL_DEVICE, mac); + printf("AP mac: "); + print_mac(mac, "\n"); + if (!nonzeromac(mac)) return; + wl_ioctl(WL_DEVICE, WLC_GET_AP, &ap, 4); + if (ap) { + host = gotHost(cfg, mac, typeAP); + wl_ioctl(WL_DEVICE, WLC_GET_BSSID, host->apInfo->bssid, 6); + wl_ioctl(WL_DEVICE, WLC_GET_SSID, &ssid, sizeof(wlc_ssid_t)); + memcpy(host->apInfo->ssid, ssid.SSID, 32); + host->apInfo->ssidlen = ssid.SSID_len; + host->RSSI = 0; + wl_ioctl(WL_DEVICE, WLC_GET_CHANNEL, &channel, sizeof(channel_info_t)); + host->apInfo->channel = channel.hw_channel; + macs = (maclist_t *) malloc(4 + MAX_STA_COUNT * sizeof(ether_addr_t)); + macs->count = MAX_STA_COUNT; + if (wl_ioctl(WL_DEVICE, WLC_GET_ASSOCLIST, macs, 4 + MAX_STA_COUNT * sizeof(ether_addr_t)) > -1) { + for (i = 0; i < macs->count; i++) { + sta = gotHost(cfg, (char *)&macs->ea[i], typeSta); + memcpy(starssi.mac, &macs->ea[i], 6); + starssi.RSSI = 3000; + starssi.zero_ex_forty_one = 0x41; + if (wl_ioctl(WL_DEVICE, WLC_GET_RSSI, &starssi, 12) < 0) printf("rssifail\n"); + sta->RSSI = -starssi.RSSI * 100; + sta->staInfo->state = ssAssociated; + memcpy(sta->staInfo->connectedBSSID, host->apInfo->bssid, 6); + } + } + } + else { + host = gotHost(cfg, mac, typeSta); + host->RSSI = 0; + if (wl_ioctl(WL_DEVICE, WLC_GET_BSSID, &host->staInfo->connectedBSSID, 6) < 0) { + host->staInfo->state = ssUnassociated; + } + else { + host->staInfo->state = ssAssociated; + } + } + if (wl_ioctl(WL_DEVICE, WLC_GET_CHANNEL, &channel, sizeof(channel_info_t)) >= 0) { + cfg->curChannel = channel.hw_channel; + fprintf(stderr, "Current channel is %i\n", cfg->curChannel); + } +} + + + + + diff --git a/net/wiviz/src/wl_access.c b/net/wiviz/src/wl_access.c new file mode 100644 index 0000000..a5172c3 --- /dev/null +++ b/net/wiviz/src/wl_access.c @@ -0,0 +1,73 @@ +/* +This file is part of Wi-viz (http://wiviz.natetrue.com). + +Wi-viz is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License v2 as published by +the Free Software Foundation. + +Wi-viz 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 Wi-viz; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +#include +#include +#include +#include +#include +#include + +#include "wl_access.h" + +int wl_ioctl(char *name, int cmd, void *buf, int len) +{ + struct ifreq ifr; + wl_ioctl_t ioc; + int ret = 0; + int s; + + /* open socket to kernel */ + if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + perror("socket"); + return errno; + } + + /* do it */ + ioc.cmd = cmd; + ioc.buf = buf; + ioc.len = len; + strncpy(ifr.ifr_name, name, IFNAMSIZ); + ifr.ifr_data = (caddr_t) &ioc; + ret = ioctl(s, SIOCDEVPRIVATE, &ifr); + + /* cleanup */ + close(s); + return ret; +} + +int get_mac(char *name, void *buf) +{ + struct ifreq ifr; + int ret = 0; + int s; + + /* open socket to kernel */ + if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + perror("socket"); + return errno; + } + + strncpy(ifr.ifr_name, name, IFNAMSIZ); + //ifr.ifr_data = (caddr_t) buf; + if ((ret = ioctl(s, SIOCGIFHWADDR, &ifr)) < 0) + perror(ifr.ifr_name); + + /* cleanup */ + close(s); + memcpy(buf, &ifr.ifr_hwaddr.sa_data, 6); + return ret; +} diff --git a/net/wiviz/src/wl_access.h b/net/wiviz/src/wl_access.h new file mode 100644 index 0000000..96f239d --- /dev/null +++ b/net/wiviz/src/wl_access.h @@ -0,0 +1,77 @@ +/* +This file is part of Wi-viz (http://wiviz.natetrue.com). + +Wi-viz is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License v2 as published by +the Free Software Foundation. + +Wi-viz 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 Wi-viz; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +//wl_access.h - functions for accessing broadcom crap + +#define WL_DEVICE "eth1" + +typedef unsigned int uint32; +typedef unsigned char uchar; +typedef int bool; + +typedef struct ether_addr { + uchar addr[6]; +} ether_addr_t; + +typedef struct wlc_ssid { + uint32 SSID_len; + uchar SSID[32]; +} wlc_ssid_t; +/* For ioctls that take a list of MAC addresses */ +typedef struct maclist { + uint count; /* number of MAC addresses */ + struct ether_addr ea[1]; /* variable length array of MAC addresses */ +} maclist_t; +/* Linux network driver ioctl encoding */ +typedef struct wl_ioctl { + uint cmd; /* common ioctl definition */ + void *buf; /* pointer to user buffer */ + uint len; /* length of user buffer */ + bool set; /* get or set request (optional) */ + uint used; /* bytes read or written (optional) */ + uint needed; /* bytes needed (optional) */ +} wl_ioctl_t; +/* channel encoding */ +typedef struct channel_info { + int hw_channel; + int target_channel; + int scan_channel; +} channel_info_t; +/* RSSI info for sta */ +typedef struct sta_rssi { + int RSSI; + char mac[6]; + u_short zero_ex_forty_one; + } sta_rssi_t; +/* check this magic number */ +#define WLC_IOCTL_MAGIC 0x14e46c77 + +#define WLC_GET_MAGIC 0 +#define WLC_GET_BSSID 23 +#define WLC_SET_BSSID 24 +#define WLC_GET_SSID 25 +#define WLC_SET_SSID 26 +#define WLC_GET_CHANNEL 29 +#define WLC_SET_CHANNEL 30 +#define WLC_GET_MONITOR 107 /* discovered by nbd */ +#define WLC_SET_MONITOR 108 /* discovered by nbd */ +#define WLC_GET_AP 117 +#define WLC_SET_AP 118 +#define WLC_GET_RSSI 127 +#define WLC_GET_ASSOCLIST 159 + + +int wl_ioctl(char *name, int cmd, void *buf, int len); diff --git a/net/wknock/Makefile b/net/wknock/Makefile new file mode 100644 index 0000000..96cd269 --- /dev/null +++ b/net/wknock/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wknock +PKG_VERSION:=1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME).tar.gz +PKG_SOURCE_URL:=http://blackhat.com/presentations/bh-europe-05/BH_EU_05-Oudot/ +PKG_MD5SUM:=6b7a1f3cbb0af88da02e5d30cefd8e7f + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/wknock + SECTION:=net + CATEGORY:=Network + DEPENDS:=kmod-brcm-wl +libpcap + TITLE:=A tool to hide your Access Point against opportunistic attackers. + URL:=http://www.rstack.org/oudot/wknock/ +endef + +define Package/wknock/description +tool to hide your Access Point against opportunistic attackers. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) -lpcap" \ + all +endef + +define Package/wknock/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wknock $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wknock-ng $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,wknock)) diff --git a/net/wol/Makefile b/net/wol/Makefile new file mode 100644 index 0000000..afbfa55 --- /dev/null +++ b/net/wol/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wol +PKG_VERSION:=0.7.1 +PKG_RELEASE:=2 + +PKG_SOURCE_URL:=@SF/ahh +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=c2fa9d7e771134ac8c89d56b8197d4ca + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/wol + SECTION:=net + CATEGORY:=Network + TITLE:=Wake On LAN client + URL:=http://ahh.sourceforge.net/wol/ +endef + +define Package/wol/description + wol implements Wake On LAN functionality in a small program. + It wakes up hardware that is Magic Packet compliant. +endef + +CONFIGURE_VARS += \ + ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_realloc_0_nonnull=yes \ + ac_cv_func_mmap_fixed_mapped=yes \ + jm_cv_func_working_malloc=yes \ + ac_cv_func_alloca_works=yes \ + +define Package/wol/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,wol)) diff --git a/net/wol/files/wol.config b/net/wol/files/wol.config new file mode 100644 index 0000000..f49c96f --- /dev/null +++ b/net/wol/files/wol.config @@ -0,0 +1,3 @@ +config wol-target + option mac '' + option enabled '0' diff --git a/net/wol/files/wol.init b/net/wol/files/wol.init new file mode 100644 index 0000000..18be829 --- /dev/null +++ b/net/wol/files/wol.init @@ -0,0 +1,30 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org + +START=60 + +append_string() { + local section="$1" + local option="$2" + local value="$3" + local _val + config_get _val "$section" "$option" + [ -n "$_val" ] && append args "$3$_val" +} + +start_service() { + local cfg="$1" + args="" + + append_string "$cfg" broadcast "--host=" + append_string "$cfg" port "--port=" + append_string "$cfg" password "--passwd=" + append_string "$cfg" mac "" + config_get_bool enabled "$cfg" "enabled" '1' + [ "$enabled" -gt 0 ] && /usr/bin/wol $args +} + +start() { + config_load wol + config_foreach start_service wol-target +} diff --git a/net/wput/Makefile b/net/wput/Makefile new file mode 100644 index 0000000..d25dd74 --- /dev/null +++ b/net/wput/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wput +PKG_VERSION:=0.6.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=@SF/wput +PKG_MD5SUM:=a14c4c13d91d04d6119bdc977e8a8bdf + +include $(INCLUDE_DIR)/package.mk + +define Package/wput + SUBMENU:=File Transfer + SECTION:=net + CATEGORY:=Network + TITLE:=A tiny wget-like ftp-client for uploading files + URL:=http://wput.sourceforge.net/ +endef + +define Package/wput/description + Wput is a tiny ftp-client, that uploads files or directories + to a remote ftp-server. Main features are: resuming, + time-stamping, wget-like interface, proxy-support and + speed-limit. +endef + +CONFIGURE_ARGS += \ + --disable-g-switch \ + --without-ssl \ + +define Package/wput/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wput $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,wput)) diff --git a/net/wput/patches/100-socketlib.diff b/net/wput/patches/100-socketlib.diff new file mode 100644 index 0000000..b5acafe --- /dev/null +++ b/net/wput/patches/100-socketlib.diff @@ -0,0 +1,22 @@ +--- a/src/socketlib.c ++++ b/src/socketlib.c +@@ -392,17 +392,15 @@ int socket_is_data_readable(int s, int t + wput_socket * socket_timeout_connect(wput_socket * sock, struct sockaddr *remote_addr, size_t size, int timeout) { + int c = 0; + printout(vDEBUG, "initiating timeout connect (%d)\n", timeout); +-#ifdef WIN32 + /* reset errno before connecting. otherwise connection might "fail" for: + * no such file or directory ;) */ + errno = 0; +-#endif +- socket_set_blocking(sock->fd, 0); ++ socket_set_blocking(sock->fd, 1); + c = connect(sock->fd,remote_addr,size); + /* here was a check also for errno != 36 (FILENAMETOOLONG) + * maybe this was EINPROGRESS on another system? */ + if(errno > 0 && errno != EINPROGRESS) { +- printout(vMORE, "[%s]", strerror(errno)); ++ printout(vMORE, "[%d:%s] ", errno, strerror(errno)); + return NULL; + } + /* DEBUG if(c == -1) perror("connect"); */ diff --git a/net/wput/patches/102-wput.diff b/net/wput/patches/102-wput.diff new file mode 100644 index 0000000..19629b5 --- /dev/null +++ b/net/wput/patches/102-wput.diff @@ -0,0 +1,48 @@ +--- a/src/wput.c ++++ b/src/wput.c +@@ -621,8 +621,8 @@ void commandlineoptions(int argc, char * + {"output-file", 1, 0, 'o'}, + {"port-mode", 0, 0, 'p'}, + {"proxy", 1, 0, 'Y'}, +- {"proxy-user", 1, 0, 0}, +- {"proxy-pass", 1, 0, 0}, //20 ++ {"proxy_user", 1, 0, 0}, ++ {"proxy_pass", 1, 0, 0}, //20 + {"quiet", 0, 0, 'q'}, + {"random-wait", 0, 0, 0}, + {"remove-source-files", 0, 0, 'R'}, +@@ -642,7 +642,9 @@ void commandlineoptions(int argc, char * + {"waitretry", 1, 0, 0}, + {"chmod", 1, 0, 'm'}, + {"disable-tls", 0, 0, 0}, +- {0, 0, 0, 0} //40 ++ {"proxy_host", 1, 0, 0}, //40 ++ {"proxy_port", 1, 0, 0}, ++ {0, 0, 0, 0} + }; + while (1) + { +@@ -699,6 +701,10 @@ void commandlineoptions(int argc, char * + opt.retry_interval = atoi(optarg); break; + case 39: //disable-tls + opt.tls = 2; break; ++ case 40: //proxy_host ++ set_option("proxy_host", optarg); break; ++ case 41: //proxy_port ++ set_option("proxy_port", optarg); break; + default: + fprintf(stderr, _("Option %s should not appear here :|\n"), long_options[option_index].name); + } +@@ -806,8 +812,10 @@ void commandlineoptions(int argc, char * + " -l, --limit-rate=RATE limit upload rate to RATE\n" + " -nd, --no-directories do not create any directories\n" + " -Y, --proxy=http/socks/off set proxy type or turn off\n" +-" --proxy-user=NAME set the proxy-username to NAME\n" +-" --proxy-pass=PASS set the proxy-password to PASS\n" ++" --proxy_user=NAME set the proxy-username to NAME\n" ++" --proxy_pass=PASS set the proxy-password to PASS\n" ++" --proxy_port=PORT set the proxy port to PORT\n" ++" --proxy_host=HOST set the proxy host to HOST\n" + "\n")); + fprintf(stderr, _( + "FTP-Options:\n" diff --git a/net/wrt-radauth/Makefile b/net/wrt-radauth/Makefile new file mode 100644 index 0000000..57b5781 --- /dev/null +++ b/net/wrt-radauth/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wrt-radauth +PKG_VERSION:=0.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.zerfleddert.de/wrt54g/ +PKG_MD5SUM:=1713b96a157f9e209cf7986f38ef57d9 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/wrt-radauth + SECTION:=net + CATEGORY:=Network + DEPENDS:=+kmod-brcm-wl +nvram + TITLE:=A Radius MAC authenticator for Broadcom based access points + URL:=http://www.zerfleddert.de/wrt54g/ +endef + +define Package/wrt-radauth/description + This software watches the stations associating to a broadcom based + AccessPoint (e.g. Linksys WRT54G) and sends an authentication request + to the radius-server specified in nvram. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) clean + $(call Build/Compile/Default, \ + CFLAGS="$(EXTRA_CFLAGS)" \ + LDFLAGS="$(EXTRA_LDFLAGS)" \ + ) +endef + +define Package/wrt-radauth/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/radius-client $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wrt-radauth $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,wrt-radauth)) diff --git a/net/wrt-radauth/patches/001-ldpath.patch b/net/wrt-radauth/patches/001-ldpath.patch new file mode 100644 index 0000000..c740c3f --- /dev/null +++ b/net/wrt-radauth/patches/001-ldpath.patch @@ -0,0 +1,12 @@ +diff -urN wrt-radauth/Makefile wrt-radauth.new/Makefile +--- wrt-radauth/Makefile 2007-01-07 20:05:21.000000000 +0100 ++++ wrt-radauth.new/Makefile 2008-04-01 22:50:09.000000000 +0200 +@@ -7,7 +7,7 @@ + all: wrt-radauth radius-client + + wrt-radauth: wrt-radauth.o md5.o wireless.o radius.o +- $(CC) $(LDFLAGS) -L$(WRT_BUILDROOT)/build_mipsel/root/usr/lib -lshared -lnvram $^ -o $@ ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L$(STAGING_DIR)/usr/lib -lnvram $(STAGING_DIR)/usr/lib/libshared.a + + + radius-client: radius-client.o md5.o radius.o diff --git a/net/wshaper/Makefile b/net/wshaper/Makefile new file mode 100644 index 0000000..f6c1e07 --- /dev/null +++ b/net/wshaper/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wshaper +PKG_VERSION:=0.2 + +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/wshaper + SECTION:=net + CATEGORY:=Network + DEPENDS:=+kmod-sched +tc + TITLE:=wshaper + URL:=http://lartc.org/wondershaper/ + PKGARCH:=all +endef + +define Package/wshaper/description + A script to do traffing shaping with the HTB algorithm. + Wshaper attempts to: + * Maintain low latency for interfactive traffic at all times + * Allow 'surfing' at reasonable speeds while up or downloading + * Make sure uploads don't harm downloads, and the other way around +endef + +define Build/Prepare +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/wshaper/install + $(INSTALL_DIR) $(1)/usr/sbin/ $(1)/etc/init.d $(1)/etc/config + $(INSTALL_BIN) ./files/wshaper.htb $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/wshaper.init $(1)/etc/init.d/wshaper + $(INSTALL_DATA) ./files/wshaper.config $(1)/etc/config/wshaper +endef + +$(eval $(call BuildPackage,wshaper)) diff --git a/net/wshaper/files/wshaper.config b/net/wshaper/files/wshaper.config new file mode 100644 index 0000000..ed857c5 --- /dev/null +++ b/net/wshaper/files/wshaper.config @@ -0,0 +1,4 @@ +config 'wshaper' 'settings' + option 'network' 'wan' + option 'downlink' '2000' + option 'uplink' '240' diff --git a/net/wshaper/files/wshaper.htb b/net/wshaper/files/wshaper.htb new file mode 100755 index 0000000..d8e35ad --- /dev/null +++ b/net/wshaper/files/wshaper.htb @@ -0,0 +1,161 @@ +#!/bin/sh +# Wonder Shaper +# please read the README before filling out these values +# +# Set the following values to somewhat less than your actual download +# and uplink speed. In kilobits. Also set the device that is to be shaped. + +# All config needs to be done in /etc/config/wshaper + +. /etc/functions.sh +config_load wshaper +for s in downlink uplink network nopriohostdst nopriohostsrc noprioportdst noprioportsrc; do + config_get $s settings $s +done + +device=$(uci_get_state network "$network" ifname "$network") +[ -z "$device" ] && logger -t wondershaper "Error: Could not find the device for network $network, aborting." && exit 1 +[ -z "$downlink" ] && logger -t wondershaper "Error: Downlink speed not set, aborting." && exit 1 +[ -z "$uplink" ] && logger -t wondershaper "Error: Uplink speed not set, aborting." && exit 1 + +MODULES='sch_ingress sch_sfq sch_htb cls_u32 act_police' +DOWNLINK="$downlink" +UPLINK="$uplink" +DEV="$device" + +# low priority OUTGOING traffic - you can leave this blank if you want +# low priority source netmasks +NOPRIOHOSTSRC="$nopriohostsrc" + +# low priority destination netmasks +NOPRIOHOSTDST="$nopriohostdst" + +# low priority source ports +NOPRIOPORTSRC="$noprioportsrc" + +# low priority destination ports +NOPRIOPORTDST="$noprioportdst" + +if [ "$1" = "status" ] +then + tc -s qdisc ls dev $DEV + tc -s class ls dev $DEV + exit +fi + + +# clean existing down- and uplink qdiscs, hide errors +tc qdisc del dev $DEV root 2> /dev/null > /dev/null +tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null + +if [ "$1" = "stop" ] +then + for i in $MODULES ; do + rmmod $i + done + exit +fi + +for i in $MODULES ; do + insmod $i +done + +###### uplink + +# install root HTB, point default traffic to 1:20: + +tc qdisc add dev $DEV root handle 1: htb default 20 + +# shape everything at $UPLINK speed - this prevents huge queues in your +# DSL modem which destroy latency: + +tc class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit burst 6k + +# high prio class 1:10: + +tc class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit \ + burst 6k prio 1 + +# bulk & default class 1:20 - gets slightly less traffic, +# and a lower priority: + +tc class add dev $DEV parent 1:1 classid 1:20 htb rate $((9*$UPLINK/10))kbit \ + burst 6k prio 2 + +tc class add dev $DEV parent 1:1 classid 1:30 htb rate $((8*$UPLINK/10))kbit \ + burst 6k prio 2 + +# all get Stochastic Fairness: +tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10 +tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10 +tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10 + +# TOS Minimum Delay (ssh, NOT scp) in 1:10: + +tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ + match ip tos 0x10 0xff flowid 1:10 + +# ICMP (ip protocol 1) in the interactive class 1:10 so we +# can do measurements & impress our friends: +tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ + match ip protocol 1 0xff flowid 1:10 + +# To speed up downloads while an upload is going on, put ACK packets in +# the interactive class: + +tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \ + match ip protocol 6 0xff \ + match u8 0x05 0x0f at 0 \ + match u16 0x0000 0xffc0 at 2 \ + match u8 0x10 0xff at 33 \ + flowid 1:10 + +# rest is 'non-interactive' ie 'bulk' and ends up in 1:20 + +# some traffic however suffers a worse fate +for a in $NOPRIOPORTDST +do + tc filter add dev $DEV parent 1: protocol ip prio 14 u32 \ + match ip dport $a 0xffff flowid 1:30 +done + +for a in $NOPRIOPORTSRC +do + tc filter add dev $DEV parent 1: protocol ip prio 15 u32 \ + match ip sport $a 0xffff flowid 1:30 +done + +for a in $NOPRIOHOSTSRC +do + tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \ + match ip src $a flowid 1:30 +done + +for a in $NOPRIOHOSTDST +do + tc filter add dev $DEV parent 1: protocol ip prio 17 u32 \ + match ip dst $a flowid 1:30 +done + +# rest is 'non-interactive' ie 'bulk' and ends up in 1:20 + +tc filter add dev $DEV parent 1: protocol ip prio 18 u32 \ + match ip dst 0.0.0.0/0 flowid 1:20 + + +########## downlink ############# +# slow downloads down to somewhat less than the real speed to prevent +# queuing at our ISP. Tune to see how high you can set it. +# ISPs tend to have *huge* queues to make sure big downloads are fast +# +# attach ingress policer: + +tc qdisc add dev $DEV handle ffff: ingress + +# filter *everything* to it (0.0.0.0/0), drop everything that's +# coming in too fast: + +tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \ + 0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1 + +logger -t wondershaper "Wondershaper was started on device $device." diff --git a/net/wshaper/files/wshaper.init b/net/wshaper/files/wshaper.init new file mode 100644 index 0000000..638cef2 --- /dev/null +++ b/net/wshaper/files/wshaper.init @@ -0,0 +1,10 @@ +#!/bin/sh /etc/rc.common + +START=45 +start() { + wshaper.htb +} + +stop() { + wshaper.htb stop +} diff --git a/net/xinetd/Makefile b/net/xinetd/Makefile new file mode 100644 index 0000000..9c33cdd --- /dev/null +++ b/net/xinetd/Makefile @@ -0,0 +1,68 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xinetd +PKG_VERSION:=2.3.14 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.xinetd.org/ +PKG_MD5SUM:=567382d7972613090215c6c54f9b82d9 + +include $(INCLUDE_DIR)/package.mk + +define Package/xinetd + SECTION:=net + CATEGORY:=Network + TITLE:=A powerful and secure super-server + URL:=http://www.xinetd.org/ +endef + +define Package/xinetd/description + xinetd has access control mechanisms, extensive logging capabilities, + the ability to make services available based on time, can place limits + on the number of servers that can be started, and has deployable + defence mechanisms to protect against port scanners, among other + things. +endef + +define Package/xinetd/conffiles +/etc/xinetd.conf +endef + +TARGET_CFLAGS += -DNO_RPC + +define Build/Configure + $(call Build/Configure/Default, \ + --without-libwrap \ + --with-loadavg \ + , \ + ac_cv_header_rpc_pmap_clnt_h=no \ + ac_cv_header_rpc_rpc_h=no \ + ac_cv_header_rpc_rpcent_h=no \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + build install +endef + +define Package/xinetd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xinetd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/xinetd.conf $(1)/etc/xinetd.conf + $(INSTALL_DIR) $(1)/etc/xinetd.d + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/xinetd.init $(1)/etc/init.d/xinetd +endef + +$(eval $(call BuildPackage,xinetd)) diff --git a/net/xinetd/files/xinetd.conf b/net/xinetd/files/xinetd.conf new file mode 100644 index 0000000..bd473ed --- /dev/null +++ b/net/xinetd/files/xinetd.conf @@ -0,0 +1,6 @@ +defaults +{ + +} + +includedir /etc/xinetd.d diff --git a/net/xinetd/files/xinetd.init b/net/xinetd/files/xinetd.init new file mode 100644 index 0000000..a1747f0 --- /dev/null +++ b/net/xinetd/files/xinetd.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +DEFAULT=/etc/default/xinetd +RUN_D=/var/run +PID_F=$RUN_D/xinetd.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + [ -d $RUN_D ] || mkdir -p $RUN_D + xinetd $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + diff --git a/net/xinetd/patches/001-ar.patch b/net/xinetd/patches/001-ar.patch new file mode 100644 index 0000000..b956648 --- /dev/null +++ b/net/xinetd/patches/001-ar.patch @@ -0,0 +1,66 @@ +--- a/libs/src/misc/Makefile.in ++++ b/libs/src/misc/Makefile.in +@@ -62,7 +62,7 @@ + + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/portable/Makefile.in ++++ b/libs/src/portable/Makefile.in +@@ -57,7 +57,7 @@ + + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/pset/Makefile.in ++++ b/libs/src/pset/Makefile.in +@@ -53,7 +53,7 @@ + mv $(LIBNAME) $(LIBDIR)/optimized + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/sio/Makefile.in ++++ b/libs/src/sio/Makefile.in +@@ -52,7 +52,7 @@ + $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/str/Makefile.in ++++ b/libs/src/str/Makefile.in +@@ -63,7 +63,7 @@ + $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)-O + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + LINT_IGNORE=possible pointer alignment|RCSid unused +--- a/libs/src/xlog/Makefile.in ++++ b/libs/src/xlog/Makefile.in +@@ -58,7 +58,7 @@ + $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) diff --git a/net/xinetd/patches/002-destdir.patch b/net/xinetd/patches/002-destdir.patch new file mode 100644 index 0000000..ebecaae --- /dev/null +++ b/net/xinetd/patches/002-destdir.patch @@ -0,0 +1,27 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -75,15 +75,15 @@ + + install: build + for i in $(DAEMONDIR) $(BINDIR) $(MANDIR)/man5 $(MANDIR)/man8 ; do \ +- test -d $$i || mkdir -p $$i ; done +- $(INSTALL_CMD) -m 755 xinetd/xinetd $(DAEMONDIR) +- $(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR) +- $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR) +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man8/xinetd.log.8 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8 ++ test -d $(DESTDIR)$$i || mkdir -p $(DESTDIR)$$i ; done ++ $(INSTALL_CMD) -m 755 xinetd/xinetd $(DESTDIR)$(DAEMONDIR) ++ $(INSTALL_CMD) -m 755 xinetd/itox $(DESTDIR)$(DAEMONDIR) ++ $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DESTDIR)$(DAEMONDIR) ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(DESTDIR)$(MANDIR)/man8/xinetd.log.8 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(DESTDIR)$(MANDIR)/man8/xinetd.8 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(DESTDIR)$(MANDIR)/man8/itox.8 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(DESTDIR)$(MANDIR)/man8/xconv.pl.8 + @echo "You must put your xinetd.conf in /etc/xinetd.conf" + @echo "There is a sample config file in xinetd/sample.conf and you can" + @echo "use xconv.pl to convert your old inetd.conf file to an xinetd format" diff --git a/net/xinetd/patches/003-rpc_fix.patch b/net/xinetd/patches/003-rpc_fix.patch new file mode 100644 index 0000000..d790a89 --- /dev/null +++ b/net/xinetd/patches/003-rpc_fix.patch @@ -0,0 +1,19 @@ +--- a/xinetd/confparse.c ++++ b/xinetd/confparse.c +@@ -716,7 +716,7 @@ static status_e check_entry( struct serv + } + } + +-/* #ifndef NO_RPC */ ++#ifndef NO_RPC + #if defined(HAVE_RPC_RPCENT_H) || defined(HAVE_NETDB_H) + if ( SC_IS_RPC( scp ) && !SC_IS_UNLISTED( scp ) ) + { +@@ -730,6 +730,7 @@ static status_e check_entry( struct serv + SC_RPCDATA( scp )->rd_program_number = rep->r_number ; + } + else ++#endif + #endif /* ! NO_RPC */ + { + if ( !SC_IS_UNLISTED( scp ) ) diff --git a/net/xl2tpd/Makefile b/net/xl2tpd/Makefile new file mode 100644 index 0000000..467efb9 --- /dev/null +++ b/net/xl2tpd/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xl2tpd +PKG_VERSION:=1.3.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.xelerance.com/xl2tpd/ +PKG_MD5SUM:=28264284552c442b24cf421755a2bb48 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/xl2tpd + SECTION:=net + CATEGORY:=Network + TITLE:=An L2TP (Layer 2 Tunneling Protocol) daemon + URL:=http://www.xelerance.com/software/xl2tpd/ + SUBMENU:=VPN +endef + +define Package/xl2tpd/description +l2tpd is the open source implementation of the L2TP tunneling protocol (RFC2661). +It does implement both LAC and LNS role in a L2TP networking architecture. The +main goal of this protocol is to tunnel PPP frame trough an IP network. +endef + +# XXX: CFLAGS are already set by Build/Compile/Default +MAKE_FLAGS+= \ + OFLAGS="" + +define Package/xl2tpd/conffiles +/etc/xl2tpd/xl2tpd.conf +/etc/xl2tpd/xl2tp-secrets +/etc/ppp/options.xl2tpd +endef + +define Package/xl2tpd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/sbin/xl2tpd $(1)/usr/sbin/ + + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/xl2tpd.init $(1)/etc/init.d/xl2tpd + + $(INSTALL_DIR) $(1)/etc/xl2tpd + $(INSTALL_DATA) ./files/xl2tpd.conf $(1)/etc/xl2tpd/ + $(INSTALL_CONF) ./files/xl2tp-secrets $(1)/etc/xl2tpd/ + + $(INSTALL_DIR) $(1)/etc/ppp + $(INSTALL_DATA) ./files/options.xl2tpd $(1)/etc/ppp/ +endef + +$(eval $(call BuildPackage,xl2tpd)) diff --git a/net/xl2tpd/README b/net/xl2tpd/README new file mode 100644 index 0000000..aadc26e --- /dev/null +++ b/net/xl2tpd/README @@ -0,0 +1,23 @@ +OpenWRT Package for xl2tpd + +xl2tpd is a development from the original l2tpd package originally written by +Mark Spencer, subsequently forked by Scott Balmos and David Stipp, inherited +by Jeff McAdams, modified substantially by Jacco de Leeuw and then forked +again by Xelerance (after it was abandoned by l2tpd.org). + +Rationale for inclusion in OpenWRT: + +l2tpd has some serious alignment problems on RISC platforms. It also runs +purely in userspace. + +Some of the features added in this fork include: + +1. IPSec SA reference tracking inconjunction with openswan's IPSec transport + mode, which adds support for multiple clients behind the same NAT router + and multiple clients on the same internal IP behind different NAT routers. + +2. Support for the pppol2tp kernel mode L2TP. + +3. Alignment and endian problems resolved. + +hcg diff --git a/net/xl2tpd/files/options.xl2tpd b/net/xl2tpd/files/options.xl2tpd new file mode 100644 index 0000000..f0fc4f4 --- /dev/null +++ b/net/xl2tpd/files/options.xl2tpd @@ -0,0 +1,13 @@ +# + +lock +noauth +debug +dump +logfd 2 +logfile /var/log/xl2tpd.log +noccp +novj +novjccomp +nopcomp +noaccomp diff --git a/net/xl2tpd/files/xl2tp-secrets b/net/xl2tpd/files/xl2tp-secrets new file mode 100644 index 0000000..0fb513f --- /dev/null +++ b/net/xl2tpd/files/xl2tp-secrets @@ -0,0 +1,5 @@ +# Secrets for authenticating l2tp tunnels +# us them secret +# * marko blah2 +# zeus marko blah +# * * interop diff --git a/net/xl2tpd/files/xl2tpd.conf b/net/xl2tpd/files/xl2tpd.conf new file mode 100644 index 0000000..e04d2fd --- /dev/null +++ b/net/xl2tpd/files/xl2tpd.conf @@ -0,0 +1,23 @@ +[global] +port = 1701 +auth file = /etc/xl2tpd/xl2tp-secrets +access control = no + +[lns default] +exclusive = yes +ip range = 192.168.254.202-192.168.254.210 +lac = 10.0.1.2 +hidden bit = no +local ip = 192.168.254.200 +length bit = yes +refuse authentication = yes +name = VersaLink +ppp debug = yes +pppoptfile = /etc/ppp/options.xl2tpd + +[lac left] +lns = 10.0.1.2 +refuse authentication = yes +name = VersaLink +ppp debug = yes +pppoptfile = /etc/ppp/options.xl2tpd diff --git a/net/xl2tpd/files/xl2tpd.conf.sample b/net/xl2tpd/files/xl2tpd.conf.sample new file mode 100644 index 0000000..477afa5 --- /dev/null +++ b/net/xl2tpd/files/xl2tpd.conf.sample @@ -0,0 +1,73 @@ +; +; Sample l2tpd configuration file +; +; This example file should give you some idea of how the options for l2tpd +; should work. The best place to look for a list of all options is in +; the source code itself, until I have the time to write better documetation :) +; Specifically, the file "file.c" contains a list of commands at the end. +; +; You most definitely don't have to spell out everything as it is done here +; +; [global] ; Global parameters: +; port = 1701 ; * Bind to port 1701 +; auth file = /etc/xl2tpd/xl2tp-secrets ; * Where our challenge secrets are +; access control = yes ; * Refuse connections without IP match +; rand source = dev ; Source for entropy for random +; ; numbers, options are: +; ; dev - reads of /dev/urandom +; ; sys - uses rand() +; ; egd - reads from egd socket +; ; egd is not yet implemented +; +; [lns default] ; Our fallthrough LNS definition +; exclusive = no ; * Only permit one tunnel per host +; ip range = 192.168.0.1-192.168.0.20 ; * Allocate from this IP range +; no ip range = 192.168.0.3-192.168.0.9 ; * Except these hosts +; ip range = 192.168.0.5 ; * But this one is okay +; ip range = lac1-lac2 ; * And anything from lac1 to lac2's IP +; lac = 192.168.1.4 - 192.168.1.8 ; * These can connect as LAC's +; no lac = untrusted.marko.net ; * This guy can't connect +; hidden bit = no ; * Use hidden AVP's? +; local ip = 192.168.1.2 ; * Our local IP to use +; length bit = yes ; * Use length bit in payload? +; require chap = yes ; * Require CHAP auth. by peer +; refuse pap = yes ; * Refuse PAP authentication +; refuse chap = no ; * Refuse CHAP authentication +; refuse authentication = no ; * Refuse authentication altogether +; require authentication = yes ; * Require peer to authenticate +; unix authentication = no ; * Use /etc/passwd for auth. +; name = myhostname ; * Report this as our hostname +; ppp debug = no ; * Turn on PPP debugging +; pppoptfile = /etc/ppp/options.xl2tpd.lns ; * ppp options file +; call rws = 10 ; * RWS for call (-1 is valid) +; tunnel rws = 4 ; * RWS for tunnel (must be > 0) +; flow bit = yes ; * Include sequence numbers +; challenge = yes ; * Challenge authenticate peer ; +; +; [lac marko] ; Example VPN LAC definition +; lns = lns.marko.net ; * Who is our LNS? +; lns = lns2.marko.net ; * A backup LNS (not yet used) +; redial = yes ; * Redial if disconnected? +; redial timeout = 15 ; * Wait n seconds between redials +; max redials = 5 ; * Give up after n consecutive failures +; hidden bit = yes ; * User hidden AVP's? +; local ip = 192.168.1.1 ; * Force peer to use this IP for us +; remote ip = 192.168.1.2 ; * Force peer to use this as their IP +; length bit = no ; * Use length bit in payload? +; require pap = no ; * Require PAP auth. by peer +; require chap = yes ; * Require CHAP auth. by peer +; refuse pap = yes ; * Refuse PAP authentication +; refuse chap = no ; * Refuse CHAP authentication +; refuse authentication = no ; * Refuse authentication altogether +; require authentication = yes ; * Require peer to authenticate +; name = marko ; * Report this as our hostname +; ppp debug = no ; * Turn on PPP debugging +; pppoptfile = /etc/ppp/options.xl2tpd.marko ; * ppp options file for this lac +; call rws = 10 ; * RWS for call (-1 is valid) +; tunnel rws = 4 ; * RWS for tunnel (must be > 0) +; flow bit = yes ; * Include sequence numbers +; challenge = yes ; * Challenge authenticate peer +; +; [lac cisco] ; Another quick LAC +; lns = cisco.marko.net ; * Required, but can take from default +; require authentication = yes diff --git a/net/xl2tpd/files/xl2tpd.init b/net/xl2tpd/files/xl2tpd.init new file mode 100644 index 0000000..22e8459 --- /dev/null +++ b/net/xl2tpd/files/xl2tpd.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2010 OpenWrt.org + +START=60 +BIN=xl2tpd +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + mkdir -p $RUN_D/$BIN + [ -f $DEFAULT ] && . $DEFAULT + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} diff --git a/net/xl2tpd/patches/100-makefile_opt_flags.patch b/net/xl2tpd/patches/100-makefile_opt_flags.patch new file mode 100644 index 0000000..400bdf1 --- /dev/null +++ b/net/xl2tpd/patches/100-makefile_opt_flags.patch @@ -0,0 +1,12 @@ +--- a/Makefile ++++ b/Makefile +@@ -90,7 +90,8 @@ OSFLAGS?= -DLINUX -I$(KERNELSRC)/include + + IPFLAGS?= -DIP_ALLOCATION + +-CFLAGS+= $(DFLAGS) -O2 -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS) ++OFLAGS=-O2 ++CFLAGS+= $(DFLAGS) $(OFLAGS) -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS) + HDRS=l2tp.h avp.h misc.h control.h call.h scheduler.h file.h aaa.h md5.h + OBJS=xl2tpd.o pty.o misc.o control.o avp.o call.o network.o avpsend.o scheduler.o file.o aaa.o md5.o + SRCS=${OBJS:.o=.c} ${HDRS} diff --git a/net/xl2tpd/patches/110-makefile_dont_build_pfc.patch b/net/xl2tpd/patches/110-makefile_dont_build_pfc.patch new file mode 100644 index 0000000..90b320f --- /dev/null +++ b/net/xl2tpd/patches/110-makefile_dont_build_pfc.patch @@ -0,0 +1,43 @@ +--- a/Makefile 2011-08-16 20:28:19.968069040 +0200 ++++ b/Makefile 2011-08-16 20:27:57.968069032 +0200 +@@ -106,10 +106,10 @@ + MANDIR?=$(DESTDIR)${PREFIX}/share/man + + +-all: $(EXEC) pfc $(CONTROL_EXEC) ++all: $(EXEC) $(CONTROL_EXEC) + + clean: +- rm -f $(OBJS) $(EXEC) pfc.o pfc $(CONTROL_EXEC) ++ rm -f $(OBJS) $(EXEC) $(CONTROL_EXEC) + + $(EXEC): $(OBJS) $(HDRS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS) +@@ -117,14 +117,10 @@ + $(CONTROL_EXEC): $(CONTROL_SRCS) + $(CC) $(CONTROL_SRCS) -o $@ + +-pfc: +- $(CC) $(CFLAGS) -c contrib/pfc.c +- $(CC) $(LDFLAGS) -o pfc pfc.o -lpcap $(LDLIBS) +- + romfs: + $(ROMFSINST) /bin/$(EXEC) + +-install: ${EXEC} pfc ${CONTROL_EXEC} ++install: ${EXEC} ${CONTROL_EXEC} + install -d -m 0755 ${SBINDIR} + install -m 0755 $(EXEC) ${SBINDIR}/$(EXEC) + install -d -m 0755 ${MANDIR}/man5 +@@ -132,11 +128,6 @@ + install -m 0644 doc/xl2tpd.8 ${MANDIR}/man8/ + install -m 0644 doc/xl2tpd.conf.5 doc/l2tp-secrets.5 \ + ${MANDIR}/man5/ +- # pfc +- install -d -m 0755 ${BINDIR} +- install -m 0755 pfc ${BINDIR}/pfc +- install -d -m 0755 ${MANDIR}/man1 +- install -m 0644 contrib/pfc.1 ${MANDIR}/man1/ + # control exec + install -d -m 0755 ${SBINDIR} + install -m 0755 $(CONTROL_EXEC) ${SBINDIR}/$(CONTROL_EXEC) diff --git a/net/xsupplicant/Makefile b/net/xsupplicant/Makefile new file mode 100644 index 0000000..e9efc2b --- /dev/null +++ b/net/xsupplicant/Makefile @@ -0,0 +1,70 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xsupplicant +PKG_VERSION:=1.2.8 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/open1x +PKG_MD5SUM:=75f89731b905eb8d36a52621661e1226 + +PKG_BUILD_DEPENDS:=PACKAGE_kmod-madwifi:madwifi +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=0 + +include $(INCLUDE_DIR)/package.mk + +define Package/xsupplicant + SECTION:=net + CATEGORY:=Network + SUBMENU:=wireless + DEPENDS:=+libopenssl +libiw + TITLE:=A fully compliant 802.1x authenticator + URL:=http://open1x.sourceforge.net/ +endef + +define Package/xsupplicant/description + This software allows a GNU/Linux or BSD workstation to authenticate with + a RADIUS server using 802.1x and various EAP protocols. +endef + +define Package/xsupplicant/conffiles +/etc/xsupplicant.conf +endef + +TARGET_CFLAGS += --std=gnu99 + +CONFIGURE_ARGS+= \ + --with-openssl="$(STAGING_DIR)/usr" \ + --with-madwifi-path="$(STAGING_DIR)/usr/include/madwifi" \ + +CONFIGURE_VARS+= \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/madwifi" \ + +define Build/Prepare + $(call Build/Prepare/Default) + (cd $(PKG_BUILD_DIR); touch \ + configure.in \ + aclocal.m4 \ + Makefile.in \ + configure \ + ); +endef + +define Package/xsupplicant/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/xsupplicant.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xsup_* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xsupplicant $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,xsupplicant)) diff --git a/net/xsupplicant/patches/001-no-lfl.patch b/net/xsupplicant/patches/001-no-lfl.patch new file mode 100644 index 0000000..7110814 --- /dev/null +++ b/net/xsupplicant/patches/001-no-lfl.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -3259,7 +3259,7 @@ if test "$LEX" = :; then + fi + if test -n "$LEX"; then + LFLAGS="$LFLAGS -i" +- MORELIBS="${MORELIBS} -lfl" ++ + fi + + ac_ext=c +--- a/configure.in ++++ b/configure.in +@@ -18,7 +18,7 @@ AC_PROG_YACC + AM_PROG_LEX + if test -n "$LEX"; then + LFLAGS="$LFLAGS -i" +- MORELIBS="${MORELIBS} -lfl" ++ + fi + + AC_HEADER_STDC diff --git a/net/xsupplicant/patches/002-disable-procfs-check.patch b/net/xsupplicant/patches/002-disable-procfs-check.patch new file mode 100644 index 0000000..2c7177a --- /dev/null +++ b/net/xsupplicant/patches/002-disable-procfs-check.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -5362,19 +5362,6 @@ _ACEOF + FRAMER="generic" + fi + +-if test $FRAMER = "linux"; then +- echo "$as_me:$LINENO: checking for procfs support" >&5 +-echo $ECHO_N "checking for procfs support... $ECHO_C" >&6 +- if test -r /proc/net/dev; then +- echo "$as_me:$LINENO: result: okay" >&5 +-echo "${ECHO_T}okay" >&6 +- else +- { { echo "$as_me:$LINENO: error: You must have ProcFS enabled in your kernel!" >&5 +-echo "$as_me: error: You must have ProcFS enabled in your kernel!" >&2;} +- { (exit 1); exit 1; }; }; +- fi +-fi +- + CFLAGS="$GGDBFLAGS $CFLAGS" + + touch Makefile.in diff --git a/net/xsupplicant/patches/003-compile_fix.patch b/net/xsupplicant/patches/003-compile_fix.patch new file mode 100644 index 0000000..30fe2c6 --- /dev/null +++ b/net/xsupplicant/patches/003-compile_fix.patch @@ -0,0 +1,11 @@ +--- a/lib/libxsupgui/Makefile.in ++++ b/lib/libxsupgui/Makefile.in +@@ -91,7 +91,7 @@ install_sh = @install_sh@ + with_openssl_libs = @with_openssl_libs@ + AUTOMAKE_OPTIONS = foreign no-dependencies + +-INCLUDES = ${top_srcdir}/src ++INCLUDES = -I${top_srcdir}/src + + include_HEADERS = xsupgui.h + lib_LIBRARIES = libxsupgui.a diff --git a/net/xsupplicant/patches/005-no_private_linux_header_includes.patch b/net/xsupplicant/patches/005-no_private_linux_header_includes.patch new file mode 100644 index 0000000..3caf928 --- /dev/null +++ b/net/xsupplicant/patches/005-no_private_linux_header_includes.patch @@ -0,0 +1,48 @@ +Index: xsupplicant-1.2.8/src/cardif/linux/cardif_atmel_driver.c +=================================================================== +--- xsupplicant-1.2.8.orig/src/cardif/linux/cardif_atmel_driver.c 2006-10-08 05:42:53.000000000 +0200 ++++ xsupplicant-1.2.8/src/cardif/linux/cardif_atmel_driver.c 2009-01-11 02:59:46.998587770 +0100 +@@ -103,7 +103,6 @@ + #include + #include + #include +-#include + #include + #include + #include +Index: xsupplicant-1.2.8/src/cardif/linux/cardif_linux.c +=================================================================== +--- xsupplicant-1.2.8.orig/src/cardif/linux/cardif_linux.c 2006-10-08 05:42:53.000000000 +0200 ++++ xsupplicant-1.2.8/src/cardif/linux/cardif_linux.c 2009-01-11 03:00:04.496300396 +0100 +@@ -174,7 +174,6 @@ + #include + #include + #include +-#include + #include + #include + #include +Index: xsupplicant-1.2.8/src/cardif/linux/cardif_linux_rtnetlink.c +=================================================================== +--- xsupplicant-1.2.8.orig/src/cardif/linux/cardif_linux_rtnetlink.c 2006-10-08 05:42:53.000000000 +0200 ++++ xsupplicant-1.2.8/src/cardif/linux/cardif_linux_rtnetlink.c 2009-01-11 03:00:14.997328194 +0100 +@@ -203,7 +203,6 @@ + + #include + #include +-#include + #include + #include + #include "netlink.h" +Index: xsupplicant-1.2.8/src/cardif/linux/cardif_linux_wext.c +=================================================================== +--- xsupplicant-1.2.8.orig/src/cardif/linux/cardif_linux_wext.c 2009-01-11 02:58:02.000000000 +0100 ++++ xsupplicant-1.2.8/src/cardif/linux/cardif_linux_wext.c 2009-01-11 03:00:26.230427636 +0100 +@@ -203,7 +203,6 @@ + #include + #include + #include +-#include + #include + #include + #include diff --git a/net/xsupplicant/patches/006-no_wireless_h.patch b/net/xsupplicant/patches/006-no_wireless_h.patch new file mode 100644 index 0000000..378e21f --- /dev/null +++ b/net/xsupplicant/patches/006-no_wireless_h.patch @@ -0,0 +1,61 @@ +--- a/src/cardif/linux/cardif_atmel_driver.c ++++ b/src/cardif/linux/cardif_atmel_driver.c +@@ -109,7 +109,6 @@ + #include + #include + #include +-#include + + #ifdef USE_EFENCE + #include +--- a/src/cardif/linux/cardif_linux.c ++++ b/src/cardif/linux/cardif_linux.c +@@ -180,7 +180,6 @@ + #include + #include + #include +-#include + + #include "xsupconfig.h" + #include "profile.h" +--- a/src/cardif/linux/cardif_linux_rtnetlink.c ++++ b/src/cardif/linux/cardif_linux_rtnetlink.c +@@ -207,10 +207,8 @@ + #include + #include "netlink.h" + #include "rtnetlink.h" +-#include + #include + #include +-#include + + #include "profile.h" + #include "xsupconfig.h" +--- a/src/cardif/linux/cardif_linux_wext.c ++++ b/src/cardif/linux/cardif_linux_wext.c +@@ -203,7 +203,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/configure ++++ b/configure +@@ -4759,7 +4759,6 @@ cat >>conftest.$ac_ext <<_ACEOF + #ifndef __user + #define __user + #endif +- #include + + #include <$ac_header> + _ACEOF +@@ -4823,7 +4822,6 @@ cat >>conftest.$ac_ext <<_ACEOF + #ifndef __user + #define __user + #endif +- #include + #include + int + main () diff --git a/net/xtables-addons/Makefile b/net/xtables-addons/Makefile new file mode 100644 index 0000000..b9deedd --- /dev/null +++ b/net/xtables-addons/Makefile @@ -0,0 +1,112 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=xtables-addons +PKG_VERSION:=1.31 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_MD5SUM:=97ac895a67df67c28def98763023d51b +PKG_SOURCE_URL:=@SF/xtables-addons +PKG_BUILD_DEPENDS:=iptables +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/xtables-addons + SECTION:=net + CATEGORY:=Network + SUBMENU:=Firewall + TITLE:=Extensions not distributed in the main Xtables + URL:=http://xtables-addons.sourceforge.net/ +endef + +# uses GNU configure + +CONFIGURE_ARGS+= \ + --with-kbuild="$(LINUX_DIR)" \ + --with-xtables="$(STAGING_DIR)/usr" \ + --with-xtlibdir="/usr/lib/iptables" \ + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + DEPMOD="/bin/true" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + all +endef + +define Build/Install + $(MAKE) -C $(PKG_BUILD_DIR) \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + DEPMOD="/bin/true" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + install +endef + +# 1: extension/module suffix used in package name +# 2: extension/module display name used in package title/description +# 3: list of extensions to package +# 4: list of modules to package +# 5: module load priority +# 6: module depends +define BuildTemplate + + ifneq ($(3),) + define Package/iptables-mod-$(1) + $$(call Package/xtables-addons) + CATEGORY:=Network + TITLE:=$(2) iptables extension + DEPENDS:= @!LINUX_2_4 iptables $(if $(4),+kmod-ipt-$(1)) + endef + + define Package/iptables-mod-$(1)/install + $(INSTALL_DIR) $$(1)/usr/lib/iptables + for m in $(3); do \ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so \ + $$(1)/usr/lib/iptables/ ; \ + done + endef + + $$(eval $$(call BuildPackage,iptables-mod-$(1))) + endif + + ifneq ($(4),) + define KernelPackage/ipt-$(1) + SUBMENU:=Netfilter Extensions + TITLE:=$(2) netfilter module + DEPENDS:= @!LINUX_2_4 kmod-ipt-core $(6) + FILES:=$(foreach mod,$(4),$(PKG_BUILD_DIR)/extensions/$(mod).$(LINUX_KMOD_SUFFIX)) + AUTOLOAD:=$(call AutoLoad,$(5),$(notdir $(4))) + endef + + $$(eval $$(call KernelPackage,ipt-$(1))) + endif + +endef + +#$(eval $(call BuildTemplate,SUFFIX,DESCRIPTION,EXTENSION,MODULE,PRIORITY,DEPENDS)) +$(eval $(call BuildTemplate,compat-xtables,API compatibilty layer,,compat_xtables,45,)) +$(eval $(call BuildTemplate,chaos,CHAOS,xt_CHAOS,xt_CHAOS,47,+kmod-ipt-compat-xtables +kmod-ipt-delude +kmod-ipt-tarpit)) +$(eval $(call BuildTemplate,condition,Condition,xt_condition,xt_condition,46,)) +$(eval $(call BuildTemplate,delude,DELUDE,xt_DELUDE,xt_DELUDE,46,+kmod-ipt-compat-xtables)) +$(eval $(call BuildTemplate,tarpit,TARPIT,xt_TARPIT,xt_TARPIT,46,+kmod-ipt-compat-xtables)) +#$(eval $(call BuildTemplate,tee,TEE,xt_TEE,xt_TEE,46,+kmod-ipt-compat-xtables)) +$(eval $(call BuildTemplate,ipp2p,IPP2P,xt_ipp2p,xt_ipp2p,46,)) +$(eval $(call BuildTemplate,rawpost,RAWPOST,,iptable_rawpost,46,+kmod-ipt-compat-xtables)) +$(eval $(call BuildTemplate,rawnat,RAWNAT,xt_RAWDNAT xt_RAWSNAT,xt_RAWNAT,46,+kmod-ipt-compat-xtables)) diff --git a/net/xtables-addons/patches/001-no_depmod.patch b/net/xtables-addons/patches/001-no_depmod.patch new file mode 100644 index 0000000..9a99389 --- /dev/null +++ b/net/xtables-addons/patches/001-no_depmod.patch @@ -0,0 +1,24 @@ +--- + Makefile.in | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/Makefile.in ++++ b/Makefile.in +@@ -754,8 +754,7 @@ install-dvi: install-dvi-recursive + install-dvi-am: + + install-exec-am: +- @$(NORMAL_INSTALL) +- $(MAKE) $(AM_MAKEFLAGS) install-exec-hook ++ + install-html: install-html-recursive + + install-html-am: +@@ -827,7 +826,6 @@ xtables-addons.8: FORCE + ${MAKE} -f Makefile.mans all; + + install-exec-hook: +- depmod -a || :; + + config.status: Makefile.iptrules.in + diff --git a/net/xtables-addons/patches/002-fix-kernel-version-detection.patch b/net/xtables-addons/patches/002-fix-kernel-version-detection.patch new file mode 100644 index 0000000..008f021 --- /dev/null +++ b/net/xtables-addons/patches/002-fix-kernel-version-detection.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -10811,7 +10811,7 @@ if grep -q "CentOS release 5\." /etc/red + fi; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel version that we will build against" >&5 + $as_echo_n "checking kernel version that we will build against... " >&6; } +-krel="$(make -sC ${kbuilddir} kernelrelease)"; ++krel="$(make -sC ${kbuilddir} kernelversion)"; + krel="${krel%%-*}"; + kmajor="${krel%%.*}"; + krel="${krel#*.}"; +--- a/configure.ac ++++ b/configure.ac +@@ -49,7 +49,7 @@ if grep -q "CentOS release 5\." /etc/red + echo "WARNING: This distribution's shipped kernel is not supported."; + fi; + AC_MSG_CHECKING([kernel version that we will build against]) +-krel="$(make -sC ${kbuilddir} kernelrelease)"; ++krel="$(make -sC ${kbuilddir} kernelversion)"; + krel="${krel%%-*}"; + kmajor="${krel%%.*}"; + krel="${krel#*.}"; diff --git a/net/xtables-addons/patches/003-redundant-bracket.patch b/net/xtables-addons/patches/003-redundant-bracket.patch new file mode 100644 index 0000000..d57f4ba --- /dev/null +++ b/net/xtables-addons/patches/003-redundant-bracket.patch @@ -0,0 +1,11 @@ +--- a/configure.ac 2010-11-05 19:42:22.000000000 +0100 ++++ b/configure.ac 2011-01-08 17:36:12.000000000 +0100 +@@ -28,7 +28,7 @@ + + AC_ARG_WITH([xtlibdir], + AS_HELP_STRING([--with-xtlibdir=PATH], +- [Path where to install Xtables extensions [[autodetect]]]]), ++ [Path where to install Xtables extensions [[autodetect]]]), + [xtlibdir="$withval"]) + AC_MSG_CHECKING([Xtables module directory]) + AC_MSG_RESULT([$xtlibdir]) diff --git a/net/yaddns/Makefile b/net/yaddns/Makefile new file mode 100644 index 0000000..8f55694 --- /dev/null +++ b/net/yaddns/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=yaddns +PKG_VERSION:=1.1-rc2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://download.gna.org/yaddns/ +PKG_MD5SUM:=919a25bd66abf926e049f3afea619e19 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/yaddns + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + TITLE:=Yet Another DDNS client + URL:=http://patatrac.info/yaddns +endef + +define Package/yaddns/description +Yaddns is a small ddns client with multiple ddns server supports (dyndns, ...) +and a high flexibility. Yaddns is particularly appropriate for embedded systems. +endef + +define Package/yaddns/conffiles +/etc/config/ddns +endef + +define Package/yaddns/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/yaddns $(1)/usr/bin/ + $(CP) ./files/* $(1)/ +endef + +$(eval $(call BuildPackage,yaddns)) diff --git a/net/yaddns/files/etc/config/ddns b/net/yaddns/files/etc/config/ddns new file mode 100644 index 0000000..5410ed4 --- /dev/null +++ b/net/yaddns/files/etc/config/ddns @@ -0,0 +1,67 @@ +################################################################# +# In order to enable dynamic dns you need at least one section, and in that +# seciton the "enabled" option must be set to one +# +# Each section represents an update to a different service +# +# You specify your domain name, your username and your password with the optins +# "domain", "username" and "password" respectively +# +# Next you need to specify the name of the service you are connecting to "eg. +# dyndns". The list of the available dns services is specified in the +# /usr/lib/ddns/services file. +# +# We also need to specify the source of the ip address to associate with your +# domain. The "ip_source" option can be "network", "interface" or "web", with +# "network" as the default. +# +# If "ip_source" is "network" you specify a network section in your +# /etc/network config file (e.g. "wan", which is the default) with the +# "ip_network" option. If you specify "wan", you will update with whatever the +# ip for your wan is. +# +# If "ip_source" is "interface" you specify a hardware interface (e.g. "eth1") +# and whatever the current ip of this interface is will be associated with the +# domain when an update is performed. +# +# If "ip_source" is "script" you specify a script to obtain ip address. The +# "ip_script" option should contain path to your script. +# +# The last possibility is that "ip_source" is "web", which means that in order +# to obtain our ip address we will connect to a website, and the first valid ip +# address listed on that page will be assumed to be ours. If you are behind +# another firewall this is the best option since none of the local networks or +# interfaces will have the external ip. The website to connect to is specified +# by the "ip_url" option. +# +# Finally we need to specify how often to check whether we need to check +# whether the ip address has changed (and if so update it), this is only valid +# for the "web" method. Use the "check_interval" to specify how often to check +# whether an update is necessary. Specify the units for this value with the +# "check_unit" option. Units can be "days", "hours", "minutes" or "seconds". +# The default check_interval is 600 seconds, or ten minutes. +# +# For yaddns all ip_* options are system-wide and are taken from the first +# enabled section. +# +######################################################### + +config service "myddns" + option enabled "0" + + option service_name "dyndns" + option domain "mypersonaldomain.dyndns.org" + option username "myusername" + option password "mypassword" + + option ip_source "network" + option ip_network "wan" + + #option ip_source "interface" + #option ip_interface "eth0.1" + + #option ip_source "web" + #option ip_url "http://checkip.dyndns.org" + #option check_interval "10" + #option check_unit "minutes" + diff --git a/net/yaddns/files/etc/hotplug.d/iface/25-ddns b/net/yaddns/files/etc/hotplug.d/iface/25-ddns new file mode 100644 index 0000000..e063088 --- /dev/null +++ b/net/yaddns/files/etc/hotplug.d/iface/25-ddns @@ -0,0 +1,117 @@ +#!/bin/sh + +YADDNS_CONF=/tmp/yaddns.conf +YADDNS_PID=/var/run/yaddns.pid + +prepare_yaddns_conf () +{ + . /etc/functions.sh + include /lib/network + + > $YADDNS_CONF + + SECTIONS="" + config_cb() + { + SECTIONS="$SECTIONS $2" + } + config_load "ddns" + + for section in $SECTIONS; do + config_get enabled $section enabled + if [ "$enabled" = "1" ]; then + if [ -z "$header_filled" ]; then + config_get ip_source $section ip_source + #if ip source is not defined, assume we want to get ip from wan + if [ "$ip_source" != "interface" ] && [ "$ip_source" != "web" ]; then + ip_source="network" + fi + if [ "$ip_source" = "interface" ]; then + config_get ip_interface $section ip_interface + fi + if [ "$ip_source" = "network" ]; then + if [ -z "$ip_network" ]; then + ip_network="wan" + fi + scan_interfaces + config_load /var/state/network + config_get ip_interface $ip_network ifname + fi + if [ "$ip_source" = "web" ]; then + config_get ip_url $section ip_url + config_get check_interval $section check_interval + config_get check_unit $section check_unit + if [ -z "$check_interval" ]; then + check_interval=600 + fi + if [ -z "$check_unit" ]; then + check_unit="seconds" + fi + if [ -z "$ip_url" ]; then + ip_url="http://checkip.dyndns.org/" + fi + case "$check_unit" in + "days" ) + check_interval_seconds=$(($check_interval*60*60*24)) + ;; + "hours" ) + check_interval_seconds=$(($check_interval*60*60)) + ;; + "minutes" ) + check_interval_seconds=$(($check_interval*60)) + ;; + "seconds" ) + check_interval_seconds=$check_interval + ;; + * ) + #default is hours + check_interval_seconds=$(($check_interval*60*60)) + ;; + esac + myip_host="`echo $ip_url | sed 's%.*//\([^:/]*\).*%\1%'`" + myip_port="`echo $ip_url | sed -n 's%.*//[^:]*:\([0-9]\+\).*%\1%; t m; b; :m p'`" + if [ -z "$myip_port" ]; then + myip_port=80 + fi + myip_path="`echo $ip_url | sed 's%.*//[^/]*\(.*\)%\1%'`" + if [ -z "$myip_path" ]; then + myip_path="/" + fi + echo mode = \"indirect\" >> $YADDNS_CONF + echo myip_host = \"$myip_host\" >> $YADDNS_CONF + echo myip_path = \"$myip_path\" >> $YADDNS_CONF + echo myip_port = \"$myip_port\" >> $YADDNS_CONF + echo myip_upint = \"$check_interval_seconds\" >> $YADDNS_CONF + else + echo mode = \"direct\" >> $YADDNS_CONF + echo wanifname = \"$ip_interface\" >> $YADDNS_CONF + fi + echo >> $YADDNS_CONF + header_filled=1 + fi + config_get service_name $section service_name + config_get domain $section domain + config_get username $section username + config_get password $section password + echo account \{ >> $YADDNS_CONF + echo -e '\tname = '\"$section\" >> $YADDNS_CONF + echo -e '\tservice = '\"$service_name\" >> $YADDNS_CONF + echo -e '\tusername = '\"$username\" >> $YADDNS_CONF + echo -e '\tpassword = '\"$password\" >> $YADDNS_CONF + echo -e '\thostname = '\"$domain\" >> $YADDNS_CONF + echo \} >> $YADDNS_CONF + fi + done +} + +if [ "$INTERFACE" = "wan" ] && [ "$ACTION" = "ifup" ] +then + prepare_yaddns_conf + pid=`pidof yaddns` + if [ -z "$pid" ]; then + yaddns -f $YADDNS_CONF -p $YADDNS_PID -D + else + kill -HUP $pid + fi +fi + diff --git a/net/yaddns/files/usr/lib/ddns/services b/net/yaddns/files/usr/lib/ddns/services new file mode 100644 index 0000000..0bed6e1 --- /dev/null +++ b/net/yaddns/files/usr/lib/ddns/services @@ -0,0 +1,5 @@ +"changeip" +"dyndns" +"dyndnsit" +"no-ip" +"ovh" diff --git a/net/yafc/Makefile b/net/yafc/Makefile new file mode 100644 index 0000000..7ea0e94 --- /dev/null +++ b/net/yafc/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=yafc +PKG_VERSION:=1.1.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=832d074183a36ee15b47553ed5962fce + +PKG_FIXUP:=libtool +PKG_REMOVE_FILES:=autogen.sh aclocal.m4 + +include $(INCLUDE_DIR)/package.mk + +define Package/yafc + SUBMENU:=File Transfer + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libncurses +libreadline + TITLE:=Yafc is yet another ftp client. + URL:=http://yafc.sourceforge.net/ +endef + +# uses GNU configure +CONFIGURE_VARS += \ + bash_cv_func_sigsetjmp=missing + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) +endef + +define Package/yafc/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/src/yafc $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,yafc)) diff --git a/net/yate/Makefile b/net/yate/Makefile new file mode 100644 index 0000000..e8558d9 --- /dev/null +++ b/net/yate/Makefile @@ -0,0 +1,276 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# Copyright (C) 2006-2011 SMBPhone +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +RELEASEVER:=3.2.0 + +PKG_NAME:=yate +PKG_VERSION:=$(RELEASEVER)-1 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://yate.null.ro/tarballs/yate3/ +PKG_MD5SUM:=8ef5f0c420cb41ad2b5828fdba28c4ee +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/$(PKG_NAME)/Default + SUBMENU:=Telephony + SECTION:=net + CATEGORY:=Network + URL:=http://yate.null.ro/ + MAINTAINER:=Daniel Dickinson +endef + +define Package/$(PKG_NAME) + $(call Package/yate/Default) + DEPENDS:=+libpthread +uclibcxx + TITLE:=Yet Another Telphony Engine + MENU:=1 +endef + +define Package/$(PKG_NAME)/conffiles +/etc/yate/yate.conf +endef + +define Package/$(PKG_NAME)/Default/description + Is a next-generation telephony engine focused on the VoIP and PSTN. It does + SIP, H.323, IAX, PSTN, and more. +endef + +define Package/$(PKG_NAME)-scripts-php + $(call Package/yate/Default) + DEPENDS += $(PKG_NAME) $(PKG_NAME)-mod-extmodule +php5 +php5-cli + TITLE:= PHP Scripts and script libraries for Yate +endef + +define Package/$(PKG_NAME)-scripts-perl + $(call Package/yate/Default) + DEPENDS += $(PKG_NAME) $(PKG_NAME)-mod-extmodule +microperl + TITLE:= Perl module for Yate +endef + +define Package/$(PKG_NAME)-scripts-python + $(call Package/yate/Default) + DEPENDS += $(PKG_NAME) $(PKG_NAME)-mod-extmodule +python-mini + TITLE:= Python module for Yate +endef + +define Package/$(PKG_NAME)-sounds + $(call Package/yate/Default) + DEPENDS += $(PKG_NAME) + TITLE := Sounds for Yate +endef + +define Package/$(PKG_NAME)-collection-basic + $(call Package/yate/Default) + DEPENDS += $(PKG_NAME) \ + +$(PKG_NAME)-sounds \ + +$(PKG_NAME)-mod-dumbchan \ + +$(PKG_NAME)-mod-regfile \ + +$(PKG_NAME)-mod-regexroute \ + +$(PKG_NAME)-mod-rmanager \ + +$(PKG_NAME)-mod-tonegen \ + +$(PKG_NAME)-mod-yrtpchan \ + +$(PKG_NAME)-mod-ysipchan + TITLE := Basic Yate Server +endef + +TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include $(if $(CONFIG_BIG_ENDIAN),-DBIGENDIAN,) + +CONFIGURE_ARGS+= \ + --without-libqt4 \ + --without-qtstatic \ + --without-pwlib \ + --without-coredumper \ + --without-doxygen \ + --without-kdoc \ + --with-spandsp="$(STAGING_DIR)/usr/include" \ + --with-libgsm="$(STAGING_DIR)/usr/include/gsm" \ + --with-mysql="$(STAGING_DIR)/usr" \ + --with-openssl="$(STAGING_DIR)/usr" \ + --with-libpq="$(STAGING_DIR)/usr" \ + --with-libspeex="$(STAGING_DIR)/usr/include/speex" \ + --with-zaptel="$(STAGING_DIR)/usr/include" \ + --with-zlib="$(STAGING_DIR)/usr" + +CONFIGURE_VARS+= \ + CFLAGS="$$$$CFLAGS -nostdinc++" \ + LDFLAGS="$$$$LDFLAGS -nodefaultlibs" \ + LIBS="-luClibc++ -lpthread -lresolv -ldl -lm -lc $(LIBGCC_S)" + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/lib + + for yatelib in "" sig mgcp jabber; do \ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyate$$$${yatelib}.so.$(RELEASEVER) $(1)/usr/lib ;\ + $(LN) ./libyate$$$${yatelib}.so.$(RELEASEVER) $(1)/usr/lib/libyate$$$${yatelib}.so ;\ + done + + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/yate $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/$(PKG_NAME) + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/yate/yate.conf $(1)/etc/$(PKG_NAME)/yate.conf +endef + +define Package/$(PKG_NAME)-scripts-php/install + $(INSTALL_DIR) $(1)/usr/share/yate/scripts + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/yate/scripts/leavemail.php $(1)/usr/share/yate/scripts/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/yate/scripts/queue_in.php $(1)/usr/share/yate/scripts/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/yate/scripts/queue_out.php $(1)/usr/share/yate/scripts/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/yate/scripts/route.php $(1)/usr/share/yate/scripts/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/yate/scripts/voicemail.php $(1)/usr/share/yate/scripts/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/yate/scripts/libvoicemail.php $(1)/usr/share/yate/scripts/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/yate/scripts/libyatechan.php $(1)/usr/share/yate/scripts/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/yate/scripts/libyateivr.php $(1)/usr/share/yate/scripts/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/yate/scripts/libyate.php $(1)/usr/share/yate/scripts/ +endef + +define Package/$(PKG_NAME)-scripts-perl/install + $(INSTALL_DIR) $(1)/usr/share/yate/scripts + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/yate/scripts/Yate.pm $(1)/usr/share/yate/scripts/ +endef + +define Package/$(PKG_NAME)-scripts-python/install + $(INSTALL_DIR) $(1)/usr/share/yate/scripts + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/yate/scripts/libyate.py $(1)/usr/share/yate/scripts/ +endef + +define Package/$(PKG_NAME)-sounds/install + $(INSTALL_DIR) $(1)/usr/share/yate/sounds + $(CP) $(PKG_INSTALL_DIR)/usr/share/yate/sounds/ $(1)/usr/share/yate/ +endef + +define Package/$(PKG_NAME)-collection-basic/install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(STAGING_DIR)/usr/include/ + $(INSTALL_DIR) $(STAGING_DIR)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(STAGING_DIR)/usr/lib/ +endef + +define BuildPlugin + define Package/$(PKG_NAME)-mod-$(1) + $(call Package/yate/Default) + DEPENDS:= $(PKG_NAME) $(4) + TITLE:=$(3) + endef + + $(if $(PKG_BUILD_DIR)/conf.d/$(1).conf.sample, + define Package/$(PKG_NAME)-mod-$(1)/conffiles + /etc/yate/$(1).conf + endef + ,) + + define Package/$(PKG_NAME)-mod-$(1)/description + $(3) module for $(PKG_NAME) + endef + + define Package/$(PKG_NAME)-mod-$(1)/install + $$(INSTALL_DIR) $$(1)/usr/lib/yate/$(2) + $$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/lib/yate/$(2)/$(1).yate $$(1)/usr/lib/yate/$(2)/$(1).yate + if [ -f $$(PKG_INSTALL_DIR)/etc/yate/$(1).conf ]; then \ + $$(INSTALL_DIR) $$(1)/etc/yate ;\ + $$(INSTALL_DATA) $$(PKG_INSTALL_DIR)/etc/yate/$(1).conf $$(1)/etc/yate/ ;\ + fi + $(if $(5),$(foreach extra_file,$(5),\ + $(INSTALL_DIR) $$(1)$(dir $(extra_file)) ; \ + $(CP) $(PKG_INSTALL_DIR)$(extra_file) $$(1)$(extra_file) ; \ + ),) + endef + + $$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(1))) +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,$(PKG_NAME)-collection-basic)) +$(eval $(call BuildPackage,$(PKG_NAME)-scripts-php)) +$(eval $(call BuildPackage,$(PKG_NAME)-scripts-perl)) +$(eval $(call BuildPackage,$(PKG_NAME)-scripts-python)) +$(eval $(call BuildPackage,$(PKG_NAME)-sounds)) +$(eval $(call BuildPlugin,accfile,server,SIP or H.323 client (from file),)) +$(eval $(call BuildPlugin,alsachan,client,ALSA Sound Channel,+alsa-lib)) +$(eval $(call BuildPlugin,amrnbcodec,,AMR-NB Codec,@BROKEN)) # Missing amr-nb library +$(eval $(call BuildPlugin,analog,server,Analog (e.g. POTS) Channel,)) +$(eval $(call BuildPlugin,analogdetect,server,Analog Data Detector,)) +$(eval $(call BuildPlugin,analyzer,,Test Call Generator and AQ Analyzer,)) +$(eval $(call BuildPlugin,callcounters,server,Count Active Call Legs,)) +$(eval $(call BuildPlugin,callfork,,Call Forker,)) +$(eval $(call BuildPlugin,callgen,,Call Generator,)) +$(eval $(call BuildPlugin,ccongestion,server,Accept Status from Installed Engine Monitors,)) +$(eval $(call BuildPlugin,cdrbuild,,Call Detail Record Builder,)) +$(eval $(call BuildPlugin,cdrfile,,Call Detail Record to File,)) +$(eval $(call BuildPlugin,ciscosm,server,SS7 Support,)) +$(eval $(call BuildPlugin,clustering,server,Clustering Server Support,)) +$(eval $(call BuildPlugin,conference,,Conference Room Mixer,)) +$(eval $(call BuildPlugin,cpuload,server,Monitor CPU load and Inform Yate,)) +$(eval $(call BuildPlugin,dbpbx,server,PBX IVR and Multi-routing from Database,)) +$(eval $(call BuildPlugin,dbwave,server,Wav Media for DB Storage,+$(PKG_NAME)-mod-wavefile)) +$(eval $(call BuildPlugin,dumbchan,,Dummy Channel,)) +$(eval $(call BuildPlugin,enumroute,,ENUM Routing,)) +$(eval $(call BuildPlugin,extmodule,,External Module Handler,)) +$(eval $(call BuildPlugin,faxchan,,Spandsp Fax Channel,+libspandsp)) +$(eval $(call BuildPlugin,filetransfer,,File Transfer Driver,)) +$(eval $(call BuildPlugin,gsmcodec,,GSM Codec,+libgsm)) +$(eval $(call BuildPlugin,h323chan,,Open H.323 Channel,+libopenh323 @BROKEN)) # libopenh323 doesn't create package or stagin_dir includes or libs +$(eval $(call BuildPlugin,heartbeat,server,Linux-HA compatible heartbeat,)) +$(eval $(call BuildPlugin,ilbccodec,,iLBC Codec,)) +$(eval $(call BuildPlugin,isupmangler,server,ISUP paramter mangling in a STP,)) +$(eval $(call BuildPlugin,jabberclient,client,Jabber Client,)) +$(eval $(call BuildPlugin,jabberserver,jabber,Jabber Server,)) +$(eval $(call BuildPlugin,jbfeatures,jabber,Jabber Server Features,)) +$(eval $(call BuildPlugin,lateroute,server,Last Chance Routing,)) +$(eval $(call BuildPlugin,lksctp,server,SCTP sockets using linux kernel,@BROKEN)) # Missing libraries/header files +$(eval $(call BuildPlugin,mgcpca,server,Media Gateway Control Protocol Agent,)) +$(eval $(call BuildPlugin,mgcpgw,server,Media Gateway Control Protocol Gateway,)) +$(eval $(call BuildPlugin,moh,,On Hold (music) Generator,)) +$(eval $(call BuildPlugin,monitoring,server,Monitoring/gathering Information,)) +$(eval $(call BuildPlugin,mrcpspeech,server,MRCP v2 Voice/Tone Detector and Synthesizer,)) +$(eval $(call BuildPlugin,msgsniff,,Sample Message Sniffer,)) +$(eval $(call BuildPlugin,mux,,Data Multiplexor,)) +$(eval $(call BuildPlugin,mysqldb,server,MySQL Backend DB,+libmysqlclient)) +$(eval $(call BuildPlugin,openssl,,Encrypted transport (OpenSSL),+libopenssl)) +$(eval $(call BuildPlugin,osschan,client,OSS Sound Channel,)) +$(eval $(call BuildPlugin,park,server,Call Parking,)) +$(eval $(call BuildPlugin,pbx,,PBX Message Handlers,)) +$(eval $(call BuildPlugin,pbxassist,server,Full featured PBX and IVR,)) +$(eval $(call BuildPlugin,pgsqldb,server,PostgrestSQL Backend DB,+libpq)) +$(eval $(call BuildPlugin,presence,server,Presence,)) +$(eval $(call BuildPlugin,regfile,server,Registration based on users in file,)) +$(eval $(call BuildPlugin,queues,server,Call Distribution and Queues from Database,)) +$(eval $(call BuildPlugin,queuesnotify,server,Notify when queued call status changes,)) +$(eval $(call BuildPlugin,regexroute,,Regular Expression Based Routing,)) +$(eval $(call BuildPlugin,rmanager,,Yate Remote Management,)) +$(eval $(call BuildPlugin,sip_cnam_lnp,sip,Query CNAM and LNP databases using SIP INVITE,)) +$(eval $(call BuildPlugin,sigtransport,server,SIGTRAN (SS7 over IP) connection provider,)) +$(eval $(call BuildPlugin,sipfeatures,server,SIP Features (SUBSCRIBE/NOTIFY),)) +$(eval $(call BuildPlugin,speexcodec,,Speex Codec,+libspeex)) +$(eval $(call BuildPlugin,subscription,server,Subcription handler and presence notifier,)) +$(eval $(call BuildPlugin,tdmcard,server,TDM Cards Signalling and Data Driver,@BROKEN)) # Missing TDM libraries +$(eval $(call BuildPlugin,tonedetect,,Detectors for Various Tones,)) +$(eval $(call BuildPlugin,tonegen,,Tones Generator,)) +$(eval $(call BuildPlugin,users,server,Users,)) +$(eval $(call BuildPlugin,wavefile,,Wav file Record and Playback,)) +$(eval $(call BuildPlugin,wpcard,server,Wanpipe PRI cards Signalling and Data Driver,@BROKEN)) # Mising wanpipe and PRI libraries +$(eval $(call BuildPlugin,yiaxchan,,IAX Channel,)) +$(eval $(call BuildPlugin,yjinglechan,,Jingle Channel,)) +$(eval $(call BuildPlugin,yrtpchan,,RTP Channel and Other Data Helper,)) +$(eval $(call BuildPlugin,yradius,server,RADIUS Client,)) +$(eval $(call BuildPlugin,ysigchan,server,SS7/ISDN Protocols - Yate Signalling Library,)) +$(eval $(call BuildPlugin,ysipchan,,SIP Channel,)) +$(eval $(call BuildPlugin,ysockschan,,SOCKS Channel,)) +$(eval $(call BuildPlugin,ysnmpagent,server,SNMP Protocol Agent,,/usr/share/yate/data/NULL-TEAM-MIB.txt /usr/share/yate/data/snmp_mib.conf /usr/share/yate/data/YATE-MIB.txt)) +$(eval $(call BuildPlugin,ystunchan,,STUN Support,)) +$(eval $(call BuildPlugin,zapcard,server,Zaptel Card Signalling and Data Driver,+zaptel14-libtonezone)) +$(eval $(call BuildPlugin,zlibcompress,,Zlib Compression,+zlib)) diff --git a/net/yate/patches/100-add_dn_skipname_missing_from_many_libresolv.patch b/net/yate/patches/100-add_dn_skipname_missing_from_many_libresolv.patch new file mode 100644 index 0000000..bc61df0 --- /dev/null +++ b/net/yate/patches/100-add_dn_skipname_missing_from_many_libresolv.patch @@ -0,0 +1,111 @@ +--- a/engine/Makefile.in ++++ b/engine/Makefile.in +@@ -31,8 +31,9 @@ CLSOBJS := TelEngine.o ObjList.o HashLis + ENGOBJS := Configuration.o Message.o Engine.o Plugin.o + TELOBJS := DataFormat.o Channel.o + CLIOBJS := Client.o ClientLogic.o ++MISCOBJS := dn_skipname.o + +-LIBOBJS := $(CLSOBJS) $(ENGOBJS) $(TELOBJS) $(CLIOBJS) ++LIBOBJS := $(CLSOBJS) $(ENGOBJS) $(TELOBJS) $(CLIOBJS) $(MISCOBJS) + CLEANS = $(LIBOBJS) core + CCOMPILE = $(CC) $(DEFS) $(DEBUG) $(INCLUDES) $(CFLAGS) + COMPILE = $(CXX) $(DEFS) $(DEBUG) $(INCLUDES) $(CPPFLAGS) +@@ -109,6 +110,9 @@ String.o: @srcdir@/String.cpp $(MKDEPS) + regex.o: @top_srcdir@/engine/regex/regex.c $(MKDEPS) + $(CCOMPILE) -DSTDC_HEADERS $(REGEX_INC) -c $< + ++dn_skipname.o: @srcdir@/dn_skipname.c $(MKDEPS) ++ $(CCOMPILE) -DSTDC_HEADERS -c $< ++ + %.o: @srcdir@/%.cpp $(MKDEPS) $(EINC) + $(COMPILE) -c $< + +--- /dev/null ++++ b/engine/dn_skipname.c +@@ -0,0 +1,85 @@ ++/* Taken from patch by Natanael Copa for uClibc in message ++ * http://lists.busybox.net/pipermail/uclibc/2009-September/042971.html ++ * Turned into yate patch by Daniel Dickinson , Mar 11, 2011 ++*/ ++#include ++#include ++ ++/* taken from OpenBSD source */ ++/* ++ * Copyright (c) 1985, 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. ++ * - ++ * Portions Copyright (c) 1993 by Digital Equipment Corporation. ++ * ++ * Permission to use, copy, modify, and distribute this software for any ++ * purpose with or without fee is hereby granted, provided that the above ++ * copyright notice and this permission notice appear in all copies, and that ++ * the name of Digital Equipment Corporation not be used in advertising or ++ * publicity pertaining to distribution of the document or software without ++ * specific, written prior permission. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL ++ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT ++ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL ++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR ++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS ++ * SOFTWARE. ++ */ ++ ++/* ++ * Skip over a compressed domain name. Return the size or -1. ++ */ ++int ++__dn_skipname(const u_char *comp_dn, const u_char *eom) ++{ ++ const u_char *cp; ++ int n; ++ ++ cp = comp_dn; ++ while (cp < eom && (n = *cp++)) { ++ /* ++ * check for indirection ++ */ ++ switch (n & INDIR_MASK) { ++ case 0: /* normal case, n == len */ ++ cp += n; ++ continue; ++ case INDIR_MASK: /* indirection */ ++ cp++; ++ break; ++ default: /* illegal type */ ++ return (-1); ++ } ++ break; ++ } ++ if (cp > eom) ++ return (-1); ++ return (cp - comp_dn); ++} diff --git a/net/znc/Makefile b/net/znc/Makefile new file mode 100644 index 0000000..e6488db --- /dev/null +++ b/net/znc/Makefile @@ -0,0 +1,282 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=znc +PKG_VERSION:=0.098 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://znc.in/releases +PKG_MD5SUM:=5667b4acb1f01309d6eded77abac700c + +PKG_BUILD_PARALLEL:=1 + + +define Package/znc/default + SUBMENU:=Instant Messaging + SECTION:=net + CATEGORY:=Network + TITLE:=ZNC + URL:=http://en.znc.in/ + MAINTAINER:=Jonas Gorski +endef + +define Package/znc + $(Package/znc/default) + DEPENDS:=+libopenssl +uclibcxx + MENU:=1 +endef + +define Package/znc/description + ZNC is an IRC bouncer with many advanced features like detaching, + multiple users, per channel playback buffer, SSL, IPv6, transparent DCC + bouncing, and c++ module support to name a few. +endef + +define Package/znc/conffiles +/etc/config/znc +endef + + +define Package/znc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/znc $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/znc.init $(1)/etc/init.d/znc + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/znc.conf $(1)/etc/config/znc + $(INSTALL_DIR) $(1)/usr/lib/znc/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/extra/droproot.so $(1)/usr/lib/znc/ +endef + + +ZNC_MODULES := +ZNC_MODULE_TARGETS := extra/droproot.so + +define module + define Package/znc-mod-$(strip $(1)) + $(Package/znc/default) + TITLE+= ($(strip $(1)) plugin) + DEPENDS:=znc + endef + + define Package/znc-mod-$(strip $(1))/description + $(strip $(2)) + endef + + define Package/znc-mod-$(strip $(1))/install + $(INSTALL_DIR) $$(1)/usr/lib/znc/ + $(INSTALL_BIN) $$(PKG_BUILD_DIR)/modules/$(strip $(3))$(subst -,_,$(strip $(1))).so $$(1)/usr/lib/znc/ + # include webadmin page templates if existing + if [ -d $$(PKG_BUILD_DIR)/modules/$(strip $(3))$(subst -,_,$(strip $(1))) ]; then \ + $(INSTALL_DIR) $$(1)/usr/share/znc/ ;\ + $(CP) -r $$(PKG_BUILD_DIR)/modules/$(strip $(3))$(subst -,_,$(strip $(1))) $$(1)/usr/share/znc/ ;\ + fi + endef + + ZNC_MODULES += znc-mod-$(strip $(1)) + $(if $(CONFIG_PACKAGE_znc-mod-$(strip $(1))),ZNC_MODULE_TARGETS += $(strip $(3))$(subst -,_,$(strip $(1))).so) +endef + +define webadmin + define Package/znc-mod-webadmin + $(Package/znc/default) + TITLE+= (webadmin plugin) + DEPENDS:=znc + endef + + define Package/znc-mod-webadmin/description + Allows you to add/remove/edit users and settings on the fly via a web browser. + endef + + define Package/znc-mod-webadmin/install + $(INSTALL_DIR) $$(1)/usr/lib/znc/ + $(INSTALL_BIN) $$(PKG_BUILD_DIR)/modules/webadmin.so $$(1)/usr/lib/znc/ + $(INSTALL_DIR) $$(1)/usr/share/znc/ + $(CP) -r $$(PKG_BUILD_DIR)/modules/webadmin $$(1)/usr/share/znc/ + $(INSTALL_DIR) $$(1)/usr/share/znc/webskins/ + $(CP) -r $$(PKG_BUILD_DIR)/webskins/_default_ $$(1)/usr/share/znc/webskins/ + endef + + ZNC_MODULES += znc-mod-webadmin + $(if $(CONFIG_PACKAGE_znc-mod-webadmin),ZNC_MODULE_TARGETS += webadmin.so) +endef + +define webskin + define Package/znc-webskin-$(strip $(1)) + $(Package/znc/default) + TITLE+= ($(strip $(1)) webskin) + DEPENDS:=znc-mod-webadmin + endef + + define Package/znc-webskin-$(strip $(1))/description + $(strip $(1)) webskin for webadmin + endef + + define Package/znc-webskin-$(strip $(1))/install + $(INSTALL_DIR) $$(1)/usr/share/znc/webskins/ + $(CP) -r $$(PKG_BUILD_DIR)/webskins/$(strip $(1)) $$(1)/usr/share/znc/webskins/ + endef + ZNC_MODULES += znc-webskin-$(strip $(1)) +endef + +, := , + +$(eval $(call module,admin,Allows you to add/remove/edit users and settings on \ + the fly via IRC messages.)) + +$(eval $(call module,adminlog,Log user connects and disconnects and failed \ + logins to file or syslog.)) + +$(eval $(call module,autoattach,Reattaches you to channels on activity.)) + +$(eval $(call module,autocycle,Cycles a channel when you are the only one in \ + there and you don't have op.)) + +$(eval $(call module,autoop,Auto op the good guys.)) + +$(eval $(call module,autoreply,Gives a automatic reply if someone messages you \ + if you are away.)) + +$(eval $(call module,away,Stores messages while away$(,) also auto away.)) + +$(eval $(call module,awaynick,Change your nick while you are away.)) + +$(eval $(call module,blockuser,Blocks certain users from using ZNC saying \ + their account was disabled.)) + +$(eval $(call module,buffextras,Add nick changes$(,) joins$(,) parts$(,) topic \ + changes etc. to your playback buffer.)) + +$(eval $(call module,certauth,This module allows users to log in via SSL \ + client keys.)) + +$(eval $(call module,chansaver,Keeping config up to date when user joins and \ + parts.)) + +$(eval $(call module,clientnotify,Notify about new incoming connections to \ + your user.)) + +$(eval $(call module,crypt,Encryption for channel/private messages.)) + +$(eval $(call module,disconkick,This module will kick your client from all \ + channels where you are$(,) in case if ZNC disconnects from server.)) + +$(eval $(call module,fail2ban,Block IPs for some time after a failed login.)) + +$(eval $(call module,keepnick,Tries to get you your primary nick.)) + +$(eval $(call module,kickrejoin,Implements auto-rejoin-on-kick.)) + +$(eval $(call module,lastseen,Logs when a user last logged in to ZNC.)) + +$(eval $(call module,nickserv,Auths you with NickServ.)) + +$(eval $(call module,notes,This modules stores and displays short notes using \ + a key/note pairs and shows them to you on connect.)) + +$(eval $(call module,partyline,Allows ZNC users to join internal channels and \ + query other ZNC users on the same ZNC.)) + +$(eval $(call module,perform,Performs commands on connect.)) + +$(eval $(call module,q,Auths you with Q (and a little more).)) + +$(eval $(call module,raw,View all of the raw traffic.)) + +$(eval $(call module,route-replies,Routes back answers to the right client \ + when connected with multiple clients.)) + +$(eval $(call module,savebuff,Saves your channel buffers into an encrypted \ + file so they can survive restarts and reboots.)) + +$(eval $(call module,schat,SSL (encrypted) DCC chats.)) + +$(eval $(call module,simple-away,This module will automatically set you away \ + on IRC while you are disconnected from the bouncer.)) + +$(eval $(call module,stickychan,Keeps you sticked to specific channels.)) + +$(eval $(call module,watch,Monitor activity for specific text patterns from \ + specific users and have the text sent to a special query window.)) + +$(eval $(call module,antiidle,Hides your idle time.,extra/)) + +$(eval $(call module,autovoice,Autovoices everyone who joins some channel., \ + extra/)) + +$(eval $(call module,block-motd,This module blocks the server's Message of the \ + Day.,extra/)) + +$(eval $(call module,clearbufferonmsg,This module keeps the buffer until the \ + next message from the client.,extra/)) + +$(eval $(call module,ctcpflood,This module tries to block ctcp floods.,extra/)) + +$(eval $(call module,fakeonline,This module fakes the online status of \ + ZNC-*users.,extra/)) + +$(eval $(call module,flooddetach,This module detaches you from channels which \ + are flooded.,extra/)) + +$(eval $(call module,listsockets,This module displays a list of all open \ + sockets in ZNC.,extra/)) + +$(eval $(call module,log,Log conversations to file.,extra/)) + +$(eval $(call module,motdfile,Reads a MOTD from a file and displays it to \ + users when they login.,extra/)) + +$(eval $(call module,notify-connect,Sends a notice to all admins when a user \ + logs in or out.,extra/)) + +$(eval $(call module,send-raw,Allows you to send raw traffic to IRC from \ + other users.,extra/)) + +$(eval $(call module,shell,Have your unix shell in a query window right inside \ + of your IRC client.,extra/)) + +$(eval $(call webadmin)) + +$(eval $(call webskin,dark-clouds)) +$(eval $(call webskin,forest)) +$(eval $(call webskin,ice)) + +PKG_CONFIG_DEPENDS := $(patsubst %,CONFIG_PACKAGE_%,$(ZNC_MODULES)) + +include $(INCLUDE_DIR)/package.mk + +CONFIGURE_VARS += \ + CXX="$(STAGING_DIR)/host/bin/g++-uc" \ + CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + LIBS="-luClibc++ -lm -lssl -lcrypto $(LIBGCC_S) -lc" + +CONFIGURE_ARGS += \ + --disable-c-ares \ + --enable-extra \ + --disable-perl + +MAKE_FLAGS += \ + CXX="$(STAGING_DIR)/host/bin/g++-uc" + +define Build/Configure + $(call Build/Configure/Default,) + $(call libtool_disable_rpath) +endef + +define Build/Compile + $(call Build/Compile/Default,znc) + $(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/modules \ + $(MAKE_FLAGS) $(ZNC_MODULE_TARGETS) +endef + +$(eval $(call BuildPackage,znc)) +$(foreach m,$(ZNC_MODULES),$(eval $(call BuildPackage,$(m)))) diff --git a/net/znc/files/znc.conf b/net/znc/files/znc.conf new file mode 100644 index 0000000..b281f44 --- /dev/null +++ b/net/znc/files/znc.conf @@ -0,0 +1,26 @@ +config znc + # where to listen for connections + list listener '192.168.1.1 1234' + # If using SSL sockets, use the following certifcate: + # option znc_ssl_cert '/etc/znc.cert' + + # load global modules (You need to install them first): + # list module 'fail2ban' + +config user 'sampleUser' + # Use either a plain text password or use the full sha256#... line. + # You can generate one with 'znc -s'. + option password 'changeme' + option nick 'sampleUser' + option altnick 'userSample' + option ident 'openwrt' + option realname 'John Doe' + + # This adds support for channels in znc configuration: + # list channel '#chan optional_password' + + # list of allowed servers: + list server 'chat.freenode.net 6667' + + # load user modules (' [params...]'): + # list module 'simple_away -timer 10 disconnected' diff --git a/net/znc/files/znc.init b/net/znc/files/znc.init new file mode 100644 index 0000000..be2f3f5 --- /dev/null +++ b/net/znc/files/znc.init @@ -0,0 +1,156 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2010 Openwrt.org + +START=60 + +ZNC_CONFIG_PATH=/tmp/etc/znc +PID_FILE=${ZNC_CONFIG_PATH}/znc.pid +ZNC_CONFIG=${ZNC_CONFIG_PATH}/configs/znc.conf + +EXTERNAL_CONFIG=0 + +RUNAS_USER= +RUNAS_GROUP= + +add_param() { + echo "$1 = $2" >> $ZNC_CONFIG +} + +add_chan() { + chan=${1% *} + pass=${1#* } + echo " " >> $ZNC_CONFIG + [ "$chan" != "$pass" ] && echo " Key = $pass" >> $ZNC_CONFIG + echo " " >> $ZNC_CONFIG +} + +znc_global() { + local znc="$1" + local anoniplimit + local maxbuffersize + local connectdelay + local serverthrottle + local znc_config_path + local znc_pem_file + + config_get znc_config_path "$znc" znc_config_path + + config_get RUNAS_USER "$znc" runas_user + config_get RUNAS_GROUP "$znc" runas_group + + if [ "${znc_config_path}" ] + then + ZNC_CONFIG_PATH=$znc_config_path + EXTERNAL_CONFIG=1 + else + mkdir -p $ZNC_CONFIG_PATH/configs/ + [ ! -f "$ZNC_CONFIG" ] || rm "$ZNC_CONFIG" + + config_get anoniplimit "$znc" anoniplimit + config_get maxbuffersize "$znc" maxbuffersize + config_get connectdelay "$znc" connectdelay + config_get serverthrottle "$znc" serverthrottle + config_get znc_pem_file "$znc" znc_ssl_cert + + [ -z $znc_pem_file -o -f $ZNC_CONFIG_PATH/znc.pem ] || ln -s "$znc_pem_file" $ZNC_CONFIG_PATH/znc.pem + + [ -z $anoniplimit ] || echo "AnonIPLimit = $anoniplimit" >> $ZNC_CONFIG + [ -z $maxbuffersize ] || echo "MaxBufferSize = $maxbuffersize" >> $ZNC_CONFIG + [ -z $connectdelay ] || echo "ConnectDelay = $connectdelay" >> $ZNC_CONFIG + [ -z $serverthrottle ] || echo "ServerThrottle = $anoniplimit" >> $ZNC_CONFIG + + echo "PidFile = $PID_FILE" >> $ZNC_CONFIG + + config_list_foreach "$znc" listener "add_param Listener" + config_list_foreach "$znc" module "add_param LoadModule" + + add_param LoadModule "droproot ${RUNAS_USER:-nobody} ${RUNAS_GROUP:-nogroup}" + fi +} + +add_user() { + local user="$1" + local password + local nick + local altnick + local ident + local realname + local buffer + local quitmsg + local chanmodes + local vhost + + config_get password "$user" password + config_get nick "$user" nick + config_get altnick "$user" altnick + config_get ident "$user" ident + config_get realname "$user" realname + config_get buffer "$user" buffer + config_get quitmsg "$user" quitmsg + config_get chanmodes "$user" chanmodes + config_get vhost "$user" vhost + + echo "" >> $ZNC_CONFIG + + case "$password" in + "md5#"* | "sha256#"* | "plain#"*) + echo " Pass = $password" >> $ZNC_CONFIG + ;; + *) + echo " Pass = plain#$password" >> $ZNC_CONFIG + ;; + esac + + echo " Nick = $nick" >> $ZNC_CONFIG + echo " AltNick = ${altnick:-$nick"_"}" >> $ZNC_CONFIG + echo " Ident = ${ident:-$nick}" >> $ZNC_CONFIG + echo " RealName = ${realname:-$nick}" >> $ZNC_CONFIG + [ -z "$vhost" ] || echo " VHost = $vhost" >> $ZNC_CONFIG + echo " Buffer = ${buffer:-50}" >> $ZNC_CONFIG + echo " KeepBuffer = false" >> $ZNC_CONFIG + echo " ChanModes = ${chanmodes:-"+stn"}" >> $ZNC_CONFIG + [ -z "$quitmsg" ] || echo " QuitMsg = $quitmsg" >> $ZNC_CONFIG + + config_list_foreach "$user" server "add_param \" Server\"" + config_list_foreach "$user" module "add_param \" LoadModule\"" + config_list_foreach "$user" channel "add_chan" + echo "" >> $ZNC_CONFIG +} + + +start() { + config_load znc + config_foreach znc_global znc + + if [ "$EXTERNAL_CONFIG" -eq 0 ] + then + config_foreach add_listener listener + config_foreach add_user user + + chown -R ${RUNAS_USER:-nobody}:${RUNAS_GROUP:-nogroup} /tmp/etc/znc + fi + + if [ "$EXTERNAL_CONFIG" -eq 1 -a "$RUNAS_USER" ] + then + local SU=$(which su) + if [ "$SU" ] + then + $SU -c "/usr/bin/znc -d$ZNC_CONFIG_PATH >/dev/null &" $RUNAS_USER + else + logger -s -t ZNC -p daemon.err "Could not run ZNC as user $RUNAS_USER: su not found." + exit 1 + fi + else + /usr/bin/znc -d$ZNC_CONFIG_PATH >/dev/null & + fi +} + +stop() { + if [ -f "$PID_FILE" ] + then + kill $(cat "$PID_FILE") + else + killall znc + fi +} + diff --git a/net/znc/patches/001-move_rootcheck_after_config.patch b/net/znc/patches/001-move_rootcheck_after_config.patch new file mode 100644 index 0000000..b64f247 --- /dev/null +++ b/net/znc/patches/001-move_rootcheck_after_config.patch @@ -0,0 +1,52 @@ +From 5f655f9a25a377c01cb15517859eb514628a43d4 Mon Sep 17 00:00:00 2001 +From: Jonas Gorski +Date: Wed, 6 Apr 2011 04:10:23 +0200 +Subject: [PATCH] Move the root check to after config parsing + +--- + main.cpp | 27 ++++++++++++++------------- + 1 files changed, 14 insertions(+), 13 deletions(-) + +--- a/main.cpp ++++ b/main.cpp +@@ -194,19 +194,6 @@ int main(int argc, char** argv) { + } + #endif + +- if (isRoot()) { +- CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid"); +- CUtils::PrintError("reasons for this and it can, in theory, cause great damage!"); +- if (!bAllowRoot) { +- delete pZNC; +- return 1; +- } +- CUtils::PrintError("You have been warned."); +- CUtils::PrintError("Hit CTRL+C now if you don't want to run ZNC as root."); +- CUtils::PrintError("ZNC will start in 30 seconds."); +- sleep(30); +- } +- + if (bMakeConf) { + if (!pZNC->WriteNewConfig(sConfig)) { + delete pZNC; +@@ -227,6 +214,20 @@ int main(int argc, char** argv) { + return 1; + } + ++ if (isRoot()) { ++ CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid"); ++ CUtils::PrintError("reasons for this and it can, in theory, cause great damage!"); ++ if (!bAllowRoot) { ++ delete pZNC; ++ return 1; ++ } ++ CUtils::PrintError("You have been warned."); ++ CUtils::PrintError("Hit CTRL+C now if you don't want to run ZNC as root."); ++ CUtils::PrintError("ZNC will start in 30 seconds."); ++ sleep(30); ++ } ++ ++ + if (bForeground) { + int iPid = getpid(); + CUtils::PrintMessage("Staying open for debugging [pid: " + CString(iPid) + "]"); diff --git a/net/znc/patches/002-Uclibcpp_build_fix.patch b/net/znc/patches/002-Uclibcpp_build_fix.patch new file mode 100644 index 0000000..505f03d --- /dev/null +++ b/net/znc/patches/002-Uclibcpp_build_fix.patch @@ -0,0 +1,34 @@ +From fa14938321eda39f16bee6068296e6abc9df7b85 Mon Sep 17 00:00:00 2001 +From: Jonas Gorski +Date: Wed, 6 Apr 2011 04:11:48 +0200 +Subject: [PATCH] Add a uClibc++ build workaround + +--- + modules/webadmin.cpp | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +--- a/modules/webadmin.cpp ++++ b/modules/webadmin.cpp +@@ -15,11 +15,13 @@ + #include "WebModules.h" + #include "ZNCString.h" + #include "Listener.h" ++#include + #include + #include + + using std::stringstream; + using std::make_pair; ++using std::string; + + /* Stuff to be able to write this: + // i will be name of local variable, see below +@@ -58,7 +60,7 @@ class CWebAdminMod : public CGlobalModul + public: + GLOBALMODCONSTRUCTOR(CWebAdminMod) { + VPair vParams; +- vParams.push_back(make_pair("user", "")); ++ vParams.push_back(make_pair((string)"user", (string)"")); + AddSubPage(new CWebSubPage("settings", "Global Settings", CWebSubPage::F_ADMIN)); + AddSubPage(new CWebSubPage("edituser", "Your Settings", vParams)); + AddSubPage(new CWebSubPage("traffic", "Traffic Info", CWebSubPage::F_ADMIN)); diff --git a/net/znc/patches/003-Reduce_rebuild_time.patch b/net/znc/patches/003-Reduce_rebuild_time.patch new file mode 100644 index 0000000..0f48c65 --- /dev/null +++ b/net/znc/patches/003-Reduce_rebuild_time.patch @@ -0,0 +1,32 @@ +From 94aff4c3389111fc85054eb06b40bea26a216d0c Mon Sep 17 00:00:00 2001 +From: Jonas Gorski +Date: Sat, 16 Apr 2011 05:51:04 +0200 +Subject: [PATCH] Don't rebuild everything when the Makefile's timestamp changed + +--- + Makefile.in | 2 +- + modules/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/Makefile.in ++++ b/Makefile.in +@@ -96,7 +96,7 @@ clean: + distclean: clean + rm -rf $(DISTCLEAN) + +-%.o: %.cpp Makefile ++%.o: %.cpp + @mkdir -p .depend + $(E) Building $@... + $(Q)$(CXX) $(CXXFLAGS) -c -o $@ $< -MMD -MF .depend/$@.dep +--- a/modules/Makefile.in ++++ b/modules/Makefile.in +@@ -114,7 +114,7 @@ install_metadirs: create_install_dir + clean: + rm -rf $(CLEAN) + +-%.so: %.cpp Makefile ++%.so: %.cpp + @mkdir -p .depend + @mkdir -p extra + $(E) Building $(if $(filter %extra/,$(dir $<)),extra )module $(notdir $(basename $@))... diff --git a/net/znc/patches/004-fix_memleak.patch b/net/znc/patches/004-fix_memleak.patch new file mode 100644 index 0000000..51394c0 --- /dev/null +++ b/net/znc/patches/004-fix_memleak.patch @@ -0,0 +1,14 @@ +--- a/Chan.cpp ++++ b/Chan.cpp +@@ -417,9 +417,10 @@ bool CChan::AddNick(const CString& sNick + // Get the nick + sTmp = sTmp.Token(0, false, "!"); + ++ CNick tmpNick(sTmp); + CNick* pNick = FindNick(sTmp); + if (!pNick) { +- pNick = new CNick(sTmp); ++ pNick = &tmpNick; + pNick->SetUser(m_pUser); + } + diff --git a/skels/Makefile.template b/skels/Makefile.template new file mode 100644 index 0000000..0de8f27 --- /dev/null +++ b/skels/Makefile.template @@ -0,0 +1,76 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# This Makefile is a skeleton +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:= +PKG_VERSION:= + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= +PKG_MD5SUM:= + +include $(INCLUDE_DIR)/package.mk + +define Package/package + SECTION:=net + CATEGORY:=Network + TITLE:=package + URL:= +endef + +define Package/package/description +endef + +CONFIGURE_ARGS += \ + --enable-static \ + --enable-shared + +# If you wish to link against uclibc++ consider using the +# following variables : +CONFIGURE_VARS += \ + CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \ + LDFLAGS="$$$$LDFLAGS" \ + LIBS="-nodefaultlibs -luClibc++ -lm -lnotimpl" \ + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS)" + +define Build/Compile + # pass CFLAGS again to override -O2 set by configure + $(MAKE) -C $(PKG_BUILD_DIR) \ + CFLAGS="$(TARGET_CFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + + +define Build/InstallDev + mkdir -p $(1)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ + mkdir -p $(1)/usr/package + $(CP) $(PKG_INSTALL_DIR)/usr/package/package.{a,so*} $(1)/usr/package/ +endef + +define Build/UninstallDev + rm -rf $(1)/usr/include/package \ + $(1)/usr/package/package.{a,so*} +endef + +define Package/package/install + $(INSTALL_DIR) $(1)/usr/package + $(CP) $(PKG_INSTALL_DIR)/usr/package/package.so.* $(1)/usr/package/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/package.init $(1)/etc/init.d/package + $(INSTALL_DIR) $(1)/etc/config/ + $(INSTALL_CONF) $(1)/etc/config/package +endef + +$(eval $(call BuildPackage,package)) diff --git a/skels/files/package.conf b/skels/files/package.conf new file mode 100644 index 0000000..db3bc4d --- /dev/null +++ b/skels/files/package.conf @@ -0,0 +1,4 @@ +# Sample configuration file +config package + option option1 'some default value' + option option2 '' diff --git a/skels/files/package.init b/skels/files/package.init new file mode 100755 index 0000000..32179f9 --- /dev/null +++ b/skels/files/package.init @@ -0,0 +1,43 @@ +#!/bin/sh /etc/rc.common +# Sample init script reading its +# configuration from /etc/config/package +START=46 +STOP=46 + +start_service() { + local section="$1" + + include /lib/network + scan_interfaces + config_load /var/state/network + + config_get LAN lan ifname + config_get option1 "$section" option1 + config_get option2 "$section" option2 + + # Do some action with the variables + echo "option1 = $option1" +} + +stop_service() { + local section="$1" + + include /lib/network + scan_interfaces + config_load /var/state/network + + config_get LAN lan ifname + config_get option1 "$section" option1 + config_get option2 "$section" option2 +} +start() { + # Do some optionnal testing + # before starting the program + config_load "package" + config_foreach start_service package +} + +stop () { + config_load "package" + config_foreach stop_service package +} diff --git a/sound/alsa/Makefile b/sound/alsa/Makefile new file mode 100644 index 0000000..23ca767 --- /dev/null +++ b/sound/alsa/Makefile @@ -0,0 +1,67 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=alsa-driver +PKG_VERSION:=1.0.14rc1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/ +PKG_MD5SUM:=4cff99be4b225e96663fbd61cabe3182 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/alsa + SUBMENU:=Other modules + DEPENDS:=@USB_SUPPORT @LINUX_2_4 + TITLE:=Advanced Linux Sound Architecture + FILES:=$(PKG_BUILD_DIR)/modules/*.$(LINUX_KMOD_SUFFIX) + AUTOLOAD=$(call AutoLoad,70,$(shell cat ./files/alsa.modules)) +endef + +ifeq ($(KERNEL),2.4) + ifeq ($(LINUX_KARCH),i386) + KERNEL_C_OPTS:= -Os -mpreferred-stack-boundary=2 -march=i486 -fno-unit-at-a-time + endif + ifeq ($(LINUX_KARCH),mips) + KERNEL_C_OPTS:= -Os -G 0 -mlong-calls -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap + endif +endif +ifeq ($(LINUX_KARCH),i386) + KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic -I$(LINUX_DIR)/include/asm-i386/mach-default +endif +ifeq ($(LINUX_KARCH),mips) + KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-mips/mach-generic +endif + +CONFIGURE_VARS:= \ + CFLAGS="$(KERNEL_C_INCS)" + +CONFIGURE_ARGS:= \ + --with-build="$(LINUX_DIR)" \ + --with-kernel="$(LINUX_DIR)" \ + --with-cross="$(KERNEL_CROSS)" \ + --with-redhat=no \ + --with-suse=no \ + --with-oss=yes \ + --with-isapnp=no \ + --with-sequencer=no \ + --with-cards=usb-audio + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + c_opts="$(KERNEL_C_OPTS)" \ + CP="$(CP)" \ + all +endef + +$(eval $(call KernelPackage,alsa)) diff --git a/sound/alsa/files/alsa.modules b/sound/alsa/files/alsa.modules new file mode 100644 index 0000000..6b16c8c --- /dev/null +++ b/sound/alsa/files/alsa.modules @@ -0,0 +1,10 @@ +snd-page-alloc +snd +snd-timer +snd-pcm +snd-rawmidi +snd-usb-lib +snd-hwdep +snd-usb-audio +snd-mixer-oss +snd-pcm-oss diff --git a/sound/alsa/patches/100-compile_fix.patch b/sound/alsa/patches/100-compile_fix.patch new file mode 100644 index 0000000..edc15fe --- /dev/null +++ b/sound/alsa/patches/100-compile_fix.patch @@ -0,0 +1,19 @@ +Index: alsa-driver-1.0.14rc1/include/adriver.h +=================================================================== +--- alsa-driver-1.0.14rc1.orig/include/adriver.h 2007-06-04 13:22:44.887031416 +0200 ++++ alsa-driver-1.0.14rc1/include/adriver.h 2007-06-04 13:22:44.956020928 +0200 +@@ -514,7 +514,7 @@ + #endif /* < 2.6.0 */ + + /* workarounds for USB API */ +-#if defined(SND_NEED_USB_WRAPPER) && (defined(CONFIG_USB) || defined(CONFIG_USB_MODULE)) ++#if 1 + + #include + +@@ -1360,4 +1360,5 @@ + #endif + #endif + ++#undef info /* used in several structs */ + #endif /* __SOUND_LOCAL_DRIVER_H */ diff --git a/sound/alsa/patches/110-cp_command.patch b/sound/alsa/patches/110-cp_command.patch new file mode 100644 index 0000000..f9719b5 --- /dev/null +++ b/sound/alsa/patches/110-cp_command.patch @@ -0,0 +1,13 @@ +Index: alsa-driver-1.0.14rc1/Makefile +=================================================================== +--- alsa-driver-1.0.14rc1.orig/Makefile 2007-06-04 13:22:44.865034760 +0200 ++++ alsa-driver-1.0.14rc1/Makefile 2007-06-04 13:22:45.149991440 +0200 +@@ -115,7 +115,7 @@ + if [ ! -d include/sound -a ! -L include/sound ]; then \ + ln -sf ../alsa-kernel/include include/sound ; \ + fi +- cp -puvf include/version.h include/sound/version.h ++ $(CP) include/version.h include/sound/version.h + + utils/mod-deps: utils/mod-deps.c + gcc utils/mod-deps.c -o utils/mod-deps diff --git a/sound/alsa/patches/120-sndfops.patch b/sound/alsa/patches/120-sndfops.patch new file mode 100644 index 0000000..bc43eb5 --- /dev/null +++ b/sound/alsa/patches/120-sndfops.patch @@ -0,0 +1,13 @@ +Index: alsa-driver-1.0.14rc1/alsa-kernel/core/sound.c +=================================================================== +--- alsa-driver-1.0.14rc1.orig/alsa-kernel/core/sound.c 2007-07-11 12:15:11.408530571 +0200 ++++ alsa-driver-1.0.14rc1/alsa-kernel/core/sound.c 2007-07-11 12:15:26.421386105 +0200 +@@ -171,7 +171,7 @@ + return err; + } + +-static struct file_operations snd_fops = ++struct file_operations snd_fops = + { + .owner = THIS_MODULE, + .open = snd_open diff --git a/sound/cmus/Makefile b/sound/cmus/Makefile new file mode 100644 index 0000000..d90940e --- /dev/null +++ b/sound/cmus/Makefile @@ -0,0 +1,96 @@ +# +# Copyright (C) 2011 Johannes Weißl +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cmus +PKG_VERSION:=2.4.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/cmus +PKG_MD5SUM:=0c5a9f4032e632e5f6b6a49f53df1e7e + +PKG_INSTALL:=1 +PKG_BUILD_DIR:=$(BUILD_DIR)/cmus-v$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/cmus + SECTION:=sound + CATEGORY:=Sound + DEPENDS:= \ + +libpthread +librt +libncurses $(ICONV_DEPENDS) \ + +AUDIO_SUPPORT:alsa-lib \ + +BUILD_PATENTED:libmad +libvorbisidec +libflac + TITLE:=C* Music Player + URL:=http://cmus.sourceforge.net/ +endef + +define Package/cmus/description + C* Music Player is a modular and very configurable ncurses-based + audio player. It has some interesting features like configurable + colorscheme, mp3 and ogg streaming, it can be controlled with an + UNIX socket, filters, album/artists sorting and a vi-like + configuration interface. +endef + +define Build/Configure + # this is *NOT* GNU configure + ( cd $(PKG_BUILD_DIR); \ + CROSS="$(TARGET_CROSS)" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I$(ICONV_PREFIX)/include" \ + LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -L$(ICONV_PREFIX)/lib" \ + PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ + PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \ + ./configure \ + prefix="/usr" \ + CONFIG_FLAC=a \ + CONFIG_MAD=$(if $(CONFIG_BUILD_PATENTED),a,n) \ + CONFIG_MODPLUG=n \ + CONFIG_MIKMOD=n \ + CONFIG_MPC=n \ + CONFIG_VORBIS=a \ + CONFIG_TREMOR=y \ + CONFIG_WAVPACK=n \ + CONFIG_MP4=n \ + CONFIG_AAC=n \ + CONFIG_FFMPEG=n \ + CONFIG_ROAR=n \ + CONFIG_PULSE=n \ + CONFIG_ALSA=$(if $(CONFIG_AUDIO_SUPPORT),a,n) \ + CONFIG_AO=n \ + CONFIG_ARTS=n \ + CONFIG_OSS=y \ + CONFIG_SUN=n \ + CONFIG_WAVEOUT=n \ + DEBUG=0 \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + V=$(V) \ + install +endef + +define Package/cmus/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/lib/cmus/ip + $(INSTALL_DIR) $(1)/usr/lib/cmus/op + $(INSTALL_DIR) $(1)/usr/share/cmus + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cmus $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmus/ip/*.so $(1)/usr/lib/cmus/ip/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmus/op/*.so $(1)/usr/lib/cmus/op/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/cmus/{rc,default.theme} $(1)/usr/share/cmus/ +endef + +$(eval $(call BuildPackage,cmus)) + diff --git a/sound/cmus/patches/010-do_not_use_ACS_VLINE.patch b/sound/cmus/patches/010-do_not_use_ACS_VLINE.patch new file mode 100644 index 0000000..aaeb34e --- /dev/null +++ b/sound/cmus/patches/010-do_not_use_ACS_VLINE.patch @@ -0,0 +1,11 @@ +--- a/ui_curses.c ++++ b/ui_curses.c +@@ -928,7 +928,7 @@ static void draw_separator(void) + (void) mvaddch(0, tree_win_w, ' '); + bkgdset(pairs[CURSED_SEPARATOR]); + for (row = 1; row < LINES - 3; row++) +- (void) mvaddch(row, tree_win_w, ACS_VLINE); ++ (void) mvaddch(row, tree_win_w, '|'); + } + + static void do_update_view(int full) diff --git a/sound/empcd/Makefile b/sound/empcd/Makefile new file mode 100644 index 0000000..8b0c15d --- /dev/null +++ b/sound/empcd/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=empcd +PKG_VERSION:=2008.02.16 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://unfix.org/projects/empcd +PKG_MD5SUM:=c3209f6bf8eb6e8ea9638601e1cd04a4 + +include $(INCLUDE_DIR)/package.mk + +define Package/empcd + SECTION:=sound + CATEGORY:=Sound + TITLE:=EMPCd can control the MPD + URL:=http://unfix.org/projects/empcd +endef + +define Package/empcd/description + This is EMPCd which can use /dev/input/event0 or other event devices + to control MPD (Music Player Daemon), directly using libmpdclient + and other programs, currently using system(2). +endef + +define Package/empcd/conffiles +/etc/empcd.conf +endef + +define Build/Compile + $(call Build/Compile/Default,\ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all \ + ) +endef + +define Package/empcd/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/empcd $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/empcd.conf $(1)/etc/ +endef + +$(eval $(call BuildPackage,empcd)) diff --git a/sound/flite/Makefile b/sound/flite/Makefile new file mode 100644 index 0000000..ceda6b9 --- /dev/null +++ b/sound/flite/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=flite +PKG_VERSION:=1.3-release +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.speech.cs.cmu.edu/flite/packed/flite-1.3/ +PKG_MD5SUM:=ae0aca1cb7b4801f4372f3a75a9e52b5 + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/flite + SECTION:=sound + CATEGORY:=Sound + DEPENDS:=@!GCC_VERSION_3_4_6 + TITLE:=Text-to-speech for embedded systems + URL:=http://www.speech.cs.cmu.edu/flite/index.html +endef + +define Package/flite/description +Festival Lite is a stripped down version of Festival, + the well-developed text-to-speech program written in C++. + This program is written in C to keep memory usage low. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-shared \ + --with-audio="oss" \ + --with-vox="cmu_us_kal16" \ + --prefix="$(PKG_INSTALL_DIR)/usr" \ + --exec-prefix="$(PKG_INSTALL_DIR)/usr" \ + --bindir="$(PKG_INSTALL_DIR)/usr/bin" \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/flite + $(CP) $(PKG_INSTALL_DIR)/usr/include/flite/{cst,flite}*.h $(1)/usr/include/flite/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libflite*.so.* $(1)/usr/lib/ +endef + +define Package/flite/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/flite $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libflite*.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,flite)) diff --git a/sound/flite/patches/100-shared_libs b/sound/flite/patches/100-shared_libs new file mode 100644 index 0000000..47254b0 --- /dev/null +++ b/sound/flite/patches/100-shared_libs @@ -0,0 +1,182 @@ +--- + Makefile | 2 - + config/common_make_rules | 34 ++++++++++++-------- + lib/Makefile | 78 +++++++++++++++++++++++++++++++++++++++++++++++ + main/Makefile | 4 +- + 4 files changed, 102 insertions(+), 16 deletions(-) + +--- flite-1.3-release.orig/config/common_make_rules ++++ flite-1.3-release/config/common_make_rules +@@ -59,27 +59,35 @@ BUILDDIR=$(TOP)/build/$(TARGET_PLATFORM) + endif + OBJDIR=$(BUILDDIR)/obj/$(DIRNAME) + BINDIR=$(BUILDDIR)/bin ++LIBDIR=$(BUILDDIR)/lib + ifeq ($(HOST_PLATFORM),$(TARGET_PLATFORM)) + BINDIR=$(TOP)/bin ++LIBDIR=$(TOP)/lib + endif + +-LIBDIR=$(BUILDDIR)/lib + BUILDDIRS=$(OBJDIR) $(BINDIR) $(LIBDIR) + +-FLITELIBS = $(BUILDDIR)/lib/libflite.a +-LDFLAGS += -L$(BUILDDIR)/lib -lflite -lm $(AUDIOLIBS) $(OTHERLIBS) ++ifdef SHFLAGS ++FLITELIBS = $(LIBDIR)/libflite.so ++LDFLAGS += -L$(LIBDIR) -lflite $(OTHERLIBS) ++else ++FLITELIBS = $(LIBDIR)/libflite.a ++LDFLAGS += -L$(LIBDIR) -lflite -lm $(AUDIOLIBS) $(OTHERLIBS) ++endif + + FULLOBJS = $(OBJS:%=$(OBJDIR)/%) + ifdef SHFLAGS + SOOBJS = $(OBJS:.o=.os) +-FULLSHOBJS = $(SOOBJS:%=$(OBJDIR)/%) ++FULLSOOBJS = $(SOOBJS:%=$(OBJDIR)/%) + ifdef LIBNAME + ALL += $(OBJDIR)/.build_so + endif +-endif ++else + ifdef LIBNAME + ALL += $(OBJDIR)/.build_lib + endif ++endif ++ + # Only do some directories when you are not cross compiling + ifeq ($(HOST_PLATFORM),$(TARGET_PLATFORM)) + OTHER_BUILD_DIRS = $(HOST_ONLY_DIRS) +@@ -117,15 +125,15 @@ $(OBJDIR)/.build_so: $(FULLSOOBJS) + @ touch $(OBJDIR)/.build_so + + # Used in the lib/ directory and in building new voices +-$(OBJDIR)/%.so: %.shared.a ++%.so: %.shared.a + @ echo making $@ +- @ rm -rf shared_os && mkdir shared_os +- @ rm -f $@ $(LIBDIR)/$@.${PROJECT_VERSION} $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} +- @ (cd shared_os && ar x ../$<) +- @ (cd shared_os && $(CC) -shared -Wl,-soname,$@.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os) +- @ ln -s $(LIBDIR)/$@.${PROJECT_VERSION} $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} +- @ ln -s $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} $(LIBDIR)/$@ +- @ rm -rf shared_os ++ @ rm -rf shared_os-$@ && mkdir shared_os-$@ ++ @ rm -f $@ $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION} ++ @ (cd shared_os-$@ && ar x ../$<) ++ @ (cd shared_os-$@ && $(CC) -shared -Wl,-soname,$@.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os -L../ $($(@:%.so=%_LDLIBS))) ++ @ ln -s $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION} ++ @ ln -s $@.${PROJECT_SHLIB_VERSION} $@ ++ @ rm -rf shared_os-$@ + + $(OBJDIR)/.make_build_dirs: + @ echo making in $(DIRNAME) ... +--- /dev/null ++++ flite-1.3-release/lib/Makefile +@@ -0,0 +1,78 @@ ++########################################################################### ++## ## ++## Language Technologies Institute ## ++## Carnegie Mellon University ## ++## Copyright (c) 1999 ## ++## All Rights Reserved. ## ++## ## ++## Permission is hereby granted, free of charge, to use and distribute ## ++## this software and its documentation without restriction, including ## ++## without limitation the rights to use, copy, modify, merge, publish, ## ++## distribute, sublicense, and/or sell copies of this work, and to ## ++## permit persons to whom this work is furnished to do so, subject to ## ++## the following conditions: ## ++## 1. The code must retain the above copyright notice, this list of ## ++## conditions and the following disclaimer. ## ++## 2. Any modifications must be clearly marked as such. ## ++## 3. Original authors' names are not deleted. ## ++## 4. The authors' names are not used to endorse or promote products ## ++## derived from this software without specific prior written ## ++## permission. ## ++## ## ++## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ## ++## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ## ++## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ## ++## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ## ++## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ## ++## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ## ++## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ## ++## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ## ++## THIS SOFTWARE. ## ++## ## ++########################################################################### ++## ## ++## FLITE libraries ## ++## ## ++########################################################################### ++TOP=.. ++DIRNAME=lib ++BUILD_DIRS = ++ALL_DIRS= ++FILES = Makefile ++LIBNAMES = flite flite_cmulex flite_usenglish \ ++ flite_cmu_us_kal flite_cmu_us_kal16 flite_cmu_time_awb ++ ++STATICLIBS= $(LIBNAMES:%=lib%.a) ++SHAREDARLIBS= $(LIBNAMES:%=lib%.shared.a) ++#SHAREDLIBS = $(LIBNAMES:%=lib%.so) ++SHAREDLIBS = $(SHAREDARLIBS:%.shared.a=%.so) ++VERSIONSHAREDLIBS = $(SHAREDLIBS:%=%.${PROJECT_VERSION}) \ ++ $(SHAREDLIBS:%=%.${PROJECT_SHLIB_VERSION}) ++ALL_LIBS = $(SHAREDLIBS) $(VERSIONSHAREDLIBS) ++ ++ALL = shared_libs ++ ++LOCAL_CLEAN=*.a *.so *.so.${PROJECT_VERSION} *.so.${PROJECT_SHLIB_VERSION} ++ ++include $(TOP)/config/common_make_rules ++ ++ifdef SHFLAGS ++shared_libs: $(SHAREDLIBS) ++libflite_LDLIBS = -lm $(AUDIOLIBS) ++libflite_cmulex_LDLIBS = -lflite ++libflite_cmulex.so: libflite.so ++libflite_usenglish_LDLIBS = -lflite ++libflite_usenglish.so: libflite.so ++libflite_cmu_us_kal_LDLIBS = -lflite_cmulex -lflite_usenglish ++libflite_cmu_us_kal.so: libflite_cmulex.so libflite_usenglish.so ++libflite_cmu_us_kal16_LDLIBS = -lflite_cmulex -lflite_usenglish ++libflite_cmu_us_kal16.so: libflite_cmulex.so libflite_usenglish.so ++libflite_cmu_time_awb_LDLIBS = -lflite -lflite_cmulex -lflite_usenglish ++libflite_cmu_time_awb.so: libflite.so libflite_cmulex.so libflite_usenglish.so ++else ++shared_libs: nothing ++endif ++ ++install: ++ @ tar cvf - $(ALL_LIBS) | ( cd $(INSTALLLIBDIR) && tar xf -) ++ +--- flite-1.3-release.orig/main/Makefile ++++ flite-1.3-release/main/Makefile +@@ -50,11 +50,11 @@ ALL = $(BINDIR)/flite$(EXEEXT) $(BINDIR) + + flite_LIBS = flite_$(FL_VOX) flite_$(FL_LANG) flite_$(FL_LEX) + flite_LIBS_flags = -L$(LIBDIR) $(flite_LIBS:%=-l%) +-flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.a) ++flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.so) + + flite_time_LIBS = flite_cmu_time_awb flite_$(FL_LANG) flite_$(FL_LEX) + flite_time_LIBS_flags = -L$(LIBDIR) $(flite_time_LIBS:%=-l%) +-flite_time_LIBS_deps = $(flite_time_LIBS:%=$(LIBDIR)/lib%.a) ++flite_time_LIBS_deps = $(flite_time_LIBS:%=$(LIBDIR)/lib%.so) + + include $(TOP)/config/common_make_rules + +--- flite-1.3-release.orig/Makefile ++++ flite-1.3-release/Makefile +@@ -41,7 +41,7 @@ + ########################################################################### + TOP=. + DIRNAME= +-BUILD_DIRS = include src lang doc ++BUILD_DIRS = include src lang lib + ALL_DIRS=config $(BUILD_DIRS) testsuite sapi palm tools main + CONFIG=configure configure.in config.sub config.guess \ + missing install-sh mkinstalldirs diff --git a/sound/ices/Makefile b/sound/ices/Makefile new file mode 100644 index 0000000..814921d --- /dev/null +++ b/sound/ices/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2009 Freifunk Leipzig +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ices +PKG_VERSION:=2.0.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.xiph.org/releases/ices/ +PKG_MD5SUM:=0d95ac34d59fed337028d5e7771076d8 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/ices + SECTION:=sound + CATEGORY:=Sound + TITLE:=ices client for Icecast media streaming servers + URL:=http://xiph.org/ + DEPENDS:=+libshout +libxml2 +zlib +libogg +libvorbis +endef + +define Package/ices/description + ices is a command line source client for Icecast media streaming servers. + It began as the successor of the old "shout" utility, and has since gained a + lot of useful features. +endef + +define Package/ices/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/bin/ +endef + +CONFIGURE_ARGS+= \ + --with-ogg="$(STAGING_DIR)/usr/include" \ + --with-vorbis="$(STAGING_DIR)/usr/include" \ + +define Build/Configure + $(call Build/Configure/Default, \ + LDFLAGS="$(TARGET_LDFLAGS) -lz -lm" \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ + LDFLAGS="$(TARGET_LDFLAGS) -lz -lm" +endef + +$(eval $(call BuildPackage,ices)) diff --git a/sound/lame/Makefile b/sound/lame/Makefile new file mode 100644 index 0000000..6aeccb9 --- /dev/null +++ b/sound/lame/Makefile @@ -0,0 +1,78 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# blogic@openwrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lame +PKG_VERSION:=398-2 +PKG_RELEASE:=3 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/lame +PKG_MD5SUM:=719dae0ee675d0c16e0e89952930ed35 +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +PKG_INSTALL=1 + +define Package/lame/Default + SECTION:=sound + CATEGORY:=Sound + URL:=http://sourceforge.net/projects/lame + DEPENDS:=@BUILD_PATENTED +endef + +define Package/lame +$(call Package/lame/Default) + TITLE:=lame + MENU:=1 +endef + +define Package/lame/description +lame mp3 encoder +endef + +define Package/lame-lib +$(call Package/lame/Default) + TITLE:=lame-lib +endef + +define Package/lame-lib/description +lame mp3 encoder libs +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-nasm \ + ) +endef + + +define Package/lame/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lame $(1)/usr/bin/ +endef + +define Package/lame-lib/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/lame + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/include/lame/*.h \ + $(1)/usr/include/lame/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.{la,so*} \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,lame-lib)) +$(eval $(call BuildPackage,lame)) diff --git a/sound/lame/patches/001-automake-compat.patch b/sound/lame/patches/001-automake-compat.patch new file mode 100644 index 0000000..a2ba61a --- /dev/null +++ b/sound/lame/patches/001-automake-compat.patch @@ -0,0 +1,33 @@ +--- a/configure.in ++++ b/configure.in +@@ -385,7 +385,7 @@ CONFIG_MATH_LIB="${USE_LIBM}" + + dnl configure use of features + +-AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no") ++HAVE_GTK="no" + + dnl ElectricFence malloc debugging + AC_MSG_CHECKING(use of ElectricFence malloc debugging) +--- a/frontend/Makefile.am ++++ b/frontend/Makefile.am +@@ -51,7 +51,7 @@ mp3rtp_SOURCES = mp3rtp.c rtp.c rtp.h $( + mp3x_SOURCES = mp3x.c gtkanal.c gpkplotting.c $(common_sources) + endif + +-CFLAGS = @CFLAGS@ @GTK_CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@ ++CFLAGS = @CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@ + LDFLAGS = @LDFLAGS@ @FRONTEND_LDFLAGS@ @SNDFILE_LIBS@ -static + + INCLUDES = -I$(top_srcdir)/libmp3lame -I$(top_srcdir)/include -I$(top_builddir) +--- a/frontend/Makefile.in ++++ b/frontend/Makefile.in +@@ -113,7 +113,7 @@ AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ +-CFLAGS = @CFLAGS@ @GTK_CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@ ++CFLAGS = @CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@ + CONFIG_DEFS = @CONFIG_DEFS@ + CONFIG_MATH_LIB = @CONFIG_MATH_LIB@ + CPP = @CPP@ diff --git a/sound/madplay/Makefile b/sound/madplay/Makefile new file mode 100644 index 0000000..454ee30 --- /dev/null +++ b/sound/madplay/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=madplay +PKG_VERSION:=0.15.2b +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/mad \ + ftp://ftp.mars.org/pub/mpeg/ +PKG_MD5SUM:=6814b47ceaa99880c754c5195aa1aac1 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/madplay + SECTION:=sound + CATEGORY:=Sound + DEPENDS:=+libid3tag +libmad + TITLE:=MPEG audio player in fixed point + URL:=http://sourceforge.net/projects/mad +endef + +define Package/madplay/description + MAD is an MPEG audio decoder. It currently only supports the MPEG 1 + standard, but fully implements all three audio layers (Layer I, Layer II, + and Layer III, the latter often colloquially known as MP3.). There is also + full support for ID3 tags. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-shared \ + --disable-static \ + --disable-debugging \ + --disable-profiling \ + --disable-experimental \ + --without-libiconv-prefix \ + --without-libintl-prefix \ + --without-alsa \ + --without-esd \ + , \ + LIBS="-lz" \ + ) +endef + +define Package/madplay/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/madplay $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,madplay)) diff --git a/sound/mpc/Makefile b/sound/mpc/Makefile new file mode 100644 index 0000000..4bf7308 --- /dev/null +++ b/sound/mpc/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mpc +PKG_VERSION:=0.20 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/musicpd +PKG_MD5SUM:=24c81ad6afe6099e8d7a6826ef4b7105 + +include $(INCLUDE_DIR)/package.mk + +define Package/mpc + SECTION:=sound + CATEGORY:=Sound + DEPENDS:=+libmpdclient + TITLE:=Music Player Daemon Console Client + URL:=http://www.musicpd.org/ +endef + +define Package/mpc/description + MPD is a music player supporting flac, mp3 and ogg files. + It is typically controlled over a network using one of it's many + clients including mpc(console), gmpc(gnome), phpmp(php) etc. + this is MPC +endef + +define Build/Configure +$(call Build/Configure/Default, \ + --disable-iconv \ +) +endef + +define Build/Compile +$(call Build/Compile/Default,\ + CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \ + prefix="/usr" \ + all \ +) +endef + +define Package/mpc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mpc $(1)/usr/bin/ + $(INSTALL_BIN) ./files/pls-handler.sh $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,mpc)) diff --git a/sound/mpc/files/pls-handler.sh b/sound/mpc/files/pls-handler.sh new file mode 100644 index 0000000..9394417 --- /dev/null +++ b/sound/mpc/files/pls-handler.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env sh +echo parameter: file.pls +mpc clear +grep '^File[0-9]*' $1 | sed -e 's/^File[0-9]*=//' | mpc add +mpc play \ No newline at end of file diff --git a/sound/mpd/Makefile b/sound/mpd/Makefile new file mode 100644 index 0000000..7873bb7 --- /dev/null +++ b/sound/mpd/Makefile @@ -0,0 +1,104 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mpd +PKG_VERSION:=0.16.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/musicpd +PKG_MD5SUM:=4d07459125ab0154c5b4fe364331498a + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/mpd + SECTION:=sound + CATEGORY:=Sound + TITLE:=Music Player Daemon + URL:=http://www.musicpd.org/ +# libvorbis and therewith libogg are needed for shout support + DEPENDS:= \ + +AUDIO_SUPPORT:alsa-lib \ + +libaudiofile \ + +BUILD_PATENTED:libfaad2 +BUILD_PATENTED:libmad \ + +glib2 +libcurl +libflac +libmms +libpthread +libshout \ + +libvorbis +libvorbisidec +libid3tag +endef + +define Package/mpd/description + MPD is a music player supporting flac, mp3 and ogg files. It is + typically controlled over a network using one of it's many clients + including mpc(console), gmpc(gnome), phpmp(php), etc... +endef + +define Package/mpd/conffiles +/etc/avahi/services/mpd.service +/etc/mpd.conf +endef + +# oggflac is not compatible with tremor +CONFIGURE_ARGS += \ + $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \ + $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \ + --enable-audiofile \ + --disable-mpc \ + $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \ + --disable-lsr \ + --disable-ao \ + --disable-mvp \ + --disable-lame-encoder \ + --disable-ffmpeg \ + --enable-flac \ + --enable-vorbis \ + --disable-oggflac \ + --disable-cue \ + --disable-jack \ + --disable-modplug \ + --disable-pulse \ + --disable-sidplay \ + --disable-sqlite \ + --enable-shout \ + --enable-id3 \ + --enable-lastfm \ + --enable-mms \ + --enable-curl \ + --disable-oss \ + --with-zeroconf=no \ + --disable-test \ + --with-tremor=yes \ + --with-faad="$(STAGING_DIR)/usr" \ + +CONFIGURE_VARS += \ + FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \ + FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \ + $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \ + $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \ + +TARGET_CFLAGS += -std=gnu99 +TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +# use gcc instead of g++ to avoid unnecessary linking against libstdc++ +TARGET_CXX:=$(TARGET_CC) + +define Package/mpd/install + $(INSTALL_DIR) $(1)/etc + $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd + $(INSTALL_DIR) $(1)/etc/avahi/services + $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/ +endef + +$(eval $(call BuildPackage,mpd)) diff --git a/sound/mpd/files/mpd.init b/sound/mpd/files/mpd.init new file mode 100644 index 0000000..68dd361 --- /dev/null +++ b/sound/mpd/files/mpd.init @@ -0,0 +1,26 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007-2010 OpenWrt.org +START=93 + +start() { + #create mpd directories + pld=`grep ^playlist_directory /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/~/\/root/g"` + if [ ! -d $pld ]; then + mkdir -p $pld + fi + # Set the initial volume to something manageable + amixer set PCM 40 + + #start mpd + if [ -x /bin/nice ]; then + # This has real-time constraints, so let's at least tell the OS + # that this should have higher priority to avoid skipping + # when doing other things in the background. + nice="nice -n -10" + fi + $nice /usr/bin/mpd +} + +stop() { + killall mpd +} diff --git a/sound/mpd/files/mpd.service b/sound/mpd/files/mpd.service new file mode 100644 index 0000000..086a2bb --- /dev/null +++ b/sound/mpd/files/mpd.service @@ -0,0 +1,9 @@ + + + + Music Player Daemon on %h + + _mpd._tcp + 6600 + + diff --git a/sound/mpd/patches/100-compile-fixes.patch b/sound/mpd/patches/100-compile-fixes.patch new file mode 100644 index 0000000..cd05159 --- /dev/null +++ b/sound/mpd/patches/100-compile-fixes.patch @@ -0,0 +1,27 @@ +Index: mpd-0.16.1/configure +=================================================================== +--- mpd-0.16.1.orig/configure 2011-01-10 02:58:36.000000000 +0100 ++++ mpd-0.16.1/configure 2011-03-10 13:01:31.000000000 +0100 +@@ -8718,6 +8718,7 @@ + # Check whether --with-faad was given. + if test "${with_faad+set}" = set; then : + withval=$with_faad; ++ faad_prefix=$with_faad; + else + faad_prefix="" + fi +Index: mpd-0.16.1/src/input/file_input_plugin.c +=================================================================== +--- mpd-0.16.1.orig/src/input/file_input_plugin.c 2011-01-10 02:58:08.000000000 +0100 ++++ mpd-0.16.1/src/input/file_input_plugin.c 2011-03-10 13:02:15.000000000 +0100 +@@ -79,10 +79,6 @@ + return false; + } + +-#ifdef POSIX_FADV_SEQUENTIAL +- posix_fadvise(fd, (off_t)0, st.st_size, POSIX_FADV_SEQUENTIAL); +-#endif +- + fis = g_new(struct file_input_stream, 1); + input_stream_init(&fis->base, &input_plugin_file, filename); + diff --git a/sound/mpdas/Makefile b/sound/mpdas/Makefile new file mode 100644 index 0000000..2550ceb --- /dev/null +++ b/sound/mpdas/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mpdas +PKG_VERSION:=0.3.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://50hz.ws/mpdas +PKG_MD5SUM:=d9f6e4d3b000d95835f39fb1aa3f4b28 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/mpdas + SECTION:=sound + CATEGORY:=Sound + TITLE:=A MPD client which submits your tracks to Last.Fm + DEPENDS:=+libcurl +libmpd +libstdcpp + URL:=http://50hz.ws/mpdas/ +endef + +define Package/mpdas/description + mpdas is an AudioScrobbler client for MPD written in C++. + It supports the latest AudioScrobbler protocol (1.21). + In case of a downtime or connectivity problems, mpdas will + cache the played songs to ~/.mpdascache. +endef + +define Package/mpdas/conffiles +/etc/mpdasrc +endef + +EXTRA_CPPFLAGS:=\ + -I$(ICONV_PREFIX)/include \ + -I$(INTL_PREFIX)/include \ + +EXTRA_LDFLAGS:=\ + -L$(ICONV_PREFIX)/lib \ + -L$(INTL_PREFIX)/lib \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +MAKE_FLAGS += \ + CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDPFLAGS) $(EXTRA_LDFLAGS)" + +define Package/mpdas/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/mpdasrc $(1)/etc/mpdasrc + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mpdas $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/mpdas.init $(1)/etc/init.d/mpdas +endef + +$(eval $(call BuildPackage,mpdas)) diff --git a/sound/mpdas/files/mpdas.init b/sound/mpdas/files/mpdas.init new file mode 100644 index 0000000..4b8eeb6 --- /dev/null +++ b/sound/mpdas/files/mpdas.init @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009 OpenWrt.org +START=94 + +start() { + HOME=/root /usr/bin/mpdas -c /etc/mpdasrc & +} + +stop() { + killall mpdas +} diff --git a/sound/mpdas/files/mpdasrc b/sound/mpdas/files/mpdasrc new file mode 100644 index 0000000..34af9a7 --- /dev/null +++ b/sound/mpdas/files/mpdasrc @@ -0,0 +1,5 @@ +username = username_here +# create md5 password: +# echo -n password | md5sum +password = md5_hash_here +debug = 0 diff --git a/sound/mpdas/patches/001-flags.patch b/sound/mpdas/patches/001-flags.patch new file mode 100644 index 0000000..f136683 --- /dev/null +++ b/sound/mpdas/patches/001-flags.patch @@ -0,0 +1,13 @@ +--- a/Makefile ++++ b/Makefile +@@ -7,8 +7,8 @@ PREFIX = /usr/local + MANPREFIX = ${PREFIX}/man/man1 + CONFIG = $(PREFIX)/etc + +-CXXFLAGS += `pkg-config --cflags libmpd libcurl` +-LIBS = `pkg-config --libs libmpd libcurl` ++CXXFLAGS += $(CPPFLAGS) `pkg-config --cflags libmpd libcurl` ++LIBS = $(LDFLAGS) `pkg-config --libs libmpd libcurl` + + CXXFLAGS += -DCONFDIR="\"$(CONFIG)\"" -DVERSION="\"$(VERSION)\"" + diff --git a/sound/mt-daapd/Makefile b/sound/mt-daapd/Makefile new file mode 100644 index 0000000..75e1664 --- /dev/null +++ b/sound/mt-daapd/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2005-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mt-daapd +PKG_VERSION:=0.2.4.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=67bef9fb14d487693b0dfb792c3f1b05 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/mt-daapd + SECTION:=sound + CATEGORY:=Sound + DEPENDS:=+libgdbm +libhowl +libid3tag +libpthread + TITLE:=A multi-threaded DAAP (Digital Audio Access Protocol) daemon + URL:=http://www.fireflymediaserver.org/ +endef + +define Package/mt-daapd/description + mt-daapd is a program which acts as an iTunes (DAAP) server for Linux. +endef + +define Package/mt-daapd/conffiles +/etc/mt-daapd.conf +/etc/mt-daapd.playlist +endef + +CONFIGURE_ARGS += \ + --enable-mdns \ + --enable-howl \ + --with-id3tag="$(STAGING_DIR)/usr" \ + --with-gdbm-includes="$(STAGING_DIR)/usr/include" \ + --with-gdbm-libs="$(STAGING_DIR)/usr/lib" \ + --with-howl-includes="$(STAGING_DIR)/usr/include/howl" \ + --with-howl-libs="$(STAGING_DIR)/usr/lib" \ + --without-static-libs \ + +define Package/mt-daapd/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) $(PKG_BUILD_DIR)/contrib/mt-daapd.conf $(1)/etc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/contrib/mt-daapd.playlist $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/share + $(CP) $(PKG_INSTALL_DIR)/usr/share/mt-daapd $(1)/usr/share/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mt-daapd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/mt-daapd.init $(1)/etc/init.d/mt-daapd +endef + +$(eval $(call BuildPackage,mt-daapd)) diff --git a/sound/mt-daapd/files/mt-daapd.init b/sound/mt-daapd/files/mt-daapd.init new file mode 100644 index 0000000..720c7d8 --- /dev/null +++ b/sound/mt-daapd/files/mt-daapd.init @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +BIN=mt-daapd +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid + +start() { + [ -f $DEFAULT ] && . $DEFAULT + [ -d $RUN_D ] || mkdir -p $RUN_D + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill -INT $(cat $PID_F) +} + diff --git a/sound/pulseaudio/Makefile b/sound/pulseaudio/Makefile new file mode 100644 index 0000000..bdbca76 --- /dev/null +++ b/sound/pulseaudio/Makefile @@ -0,0 +1,130 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pulseaudio +PKG_VERSION:=0.9.23 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://freedesktop.org/software/pulseaudio/releases/ +PKG_MD5SUM:=7391205a337d1e04a9ff38025f684034 + +PKG_BUILD_DEPENDS:=intltool/host + +PKG_FIXUP = libtool + +PKG_INSTALL = 1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +#TODO: split pulse into executable and library (or even better into several libraries since they're used as loadable modules, so not linked into) +define Package/pulseaudio + SECTION:=sound + CATEGORY:=Sound + DEPENDS:=+libspeexdsp +libgdbm +libsndfile +libsamplerate \ + +libltdl +libpthread +librt +alsa-lib \ + @!UCLIBC_VERSION_0_9_30_1 @!UCLIBC_VERSION_0_9_30_2 \ + @!UCLIBC_VERSION_0_9_30_3 \ + $(ICONV_DEPENDS) $(INTL_DEPENDS) + TITLE:=Network sound server + URL:=http://www.pulseaudio.org +endef + +define Package/pa-tools + SECTION:=sound + CATEGORY:=Sound + DEPENDS:=+libgdbm +libsndfile +pulseaudio #+libpulse + TITLE:=Tools for Pulseaudio + URL:=http://www.pulseaudio.org +endef + +CONFIGURE_ARGS += \ + --with-system-user=root \ + --with-system-group=root \ + --with-access-group=root \ + --enable-alsa \ + --disable-dbus \ + --disable-hal \ + --disable-gconf \ + --disable-tcpwrap \ + --disable-nls \ + --disable-solaris \ + --disable-glib2 \ + --disable-jack \ + --disable-asyncns \ + --disable-lirc \ + --disable-bluez \ + --without-caps + +CONFIGURE_VARS += \ + PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" + +#SUPP_LIBS:=-L$(INTL_PREFIX)/lib -L$(ICONV_PREFIX)/lib +TARGET_CFLAGS += -std=gnu99 + +define Build/InstallDev + $(INSTALL_DIR) \ + $(1)/usr/lib/pkgconfig \ + $(1)/usr/include/pulse \ + $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/pulse/* \ + $(1)/usr/include/pulse + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ + $(1)/usr/lib/pkgconfig + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ +endef + +define Package/pulseaudio/install + $(INSTALL_DIR) \ + $(1)/usr/bin \ + $(1)/usr/lib \ + $(1)/usr/lib/pulse-$(PKG_VERSION)/modules \ + $(1)/etc/pulse \ + $(1)/etc/init.d + + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \ + $(1)/usr/bin/pulseaudio + + $(INSTALL_BIN) \ + ./files/pulseaudio.init \ + $(1)/etc/init.d/pulseaudio + + $(INSTALL_CONF) \ + $(PKG_INSTALL_DIR)/etc/pulse/* \ + $(1)/etc/pulse + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.so* \ + $(1)/usr/lib/ + + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \ + $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \ + $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/ +endef + +define Package/pa-tools/install + $(INSTALL_DIR) \ + $(1)/usr/bin + + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/pa* \ + $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,pulseaudio)) +$(eval $(call BuildPackage,pa-tools)) diff --git a/sound/pulseaudio/files/pulseaudio.init b/sound/pulseaudio/files/pulseaudio.init new file mode 100644 index 0000000..b5bf94d --- /dev/null +++ b/sound/pulseaudio/files/pulseaudio.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2011 OpenWrt.org +START=65 + +start() { + mkdir -p /tmp/lib/pulse + /usr/bin/pulseaudio --daemonize --system --disallow-exit --disallow-module-loading --disable-shm --exit-idle-time=-1 +} + +stop() { + killall pulseaudio +} diff --git a/sound/pulseaudio/patches/001-no_default_64mb_alloc.patch b/sound/pulseaudio/patches/001-no_default_64mb_alloc.patch new file mode 100644 index 0000000..20a41b3 --- /dev/null +++ b/sound/pulseaudio/patches/001-no_default_64mb_alloc.patch @@ -0,0 +1,13 @@ +Index: pulseaudio-0.9.22/src/pulsecore/memblock.c +=================================================================== +--- pulseaudio-0.9.22.orig/src/pulsecore/memblock.c 2011-03-08 09:25:27.000000000 +0100 ++++ pulseaudio-0.9.22/src/pulsecore/memblock.c 2011-03-08 09:27:21.000000000 +0100 +@@ -54,7 +54,7 @@ + * stored in SHM and our OS does not commit the memory before we use + * it for the first time. */ + #define PA_MEMPOOL_SLOTS_MAX 1024 +-#define PA_MEMPOOL_SLOT_SIZE (64*1024) ++#define PA_MEMPOOL_SLOT_SIZE 64 + + #define PA_MEMEXPORT_SLOTS_MAX 128 + diff --git a/sound/scmpc/Makefile b/sound/scmpc/Makefile new file mode 100644 index 0000000..de36e41 --- /dev/null +++ b/sound/scmpc/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=scmpc +PKG_VERSION:=0.2.2 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://download.berlios.de/scmpc +PKG_MD5SUM:=f42482e4dbf398df92a36d5610b403e5 + +include $(INCLUDE_DIR)/package.mk + +define Package/scmpc + SECTION:=sound + CATEGORY:=Sound + TITLE:=A MPD client which submits your tracks to Last.Fm + DEPENDS:=+libcurl +libdaemon +argtable +confuse +libpthread + URL:=http://scmpc.berlios.de/ +endef + +define Package/scmpc/description + scmpc is a multithreaded, robust client for MPD to submit tracks to Audioscrobbler (Last.fm). +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --disable-rpath \ + --without-libiconv-prefix \ + --without-libintl-prefix \ + +MAKE_FLAGS += \ + $(TARGET_CONFIGURE_OPTS) \ + $(1) \ + +TARGET_LDFLAGS += \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/scmpc/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/src/scmpc $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/scmpc.init $(1)/etc/init.d/scmpc + $(INSTALL_DIR) $(1)/etc + $(CP) $(PKG_BUILD_DIR)/examples/scmpc.conf $(1)/etc +endef + +$(eval $(call BuildPackage,scmpc)) diff --git a/sound/scmpc/files/scmpc.init b/sound/scmpc/files/scmpc.init new file mode 100644 index 0000000..5b12d35 --- /dev/null +++ b/sound/scmpc/files/scmpc.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=94 + +start() { + mkdir -p /var/lib/scmpc + /usr/bin/scmpc +} + +stop() { + killall scmpc +} diff --git a/sound/scmpc/patches/100-Rules.patch b/sound/scmpc/patches/100-Rules.patch new file mode 100644 index 0000000..f9ad44d --- /dev/null +++ b/sound/scmpc/patches/100-Rules.patch @@ -0,0 +1,11 @@ +--- scmpc-0.2.2/src/Rules.mkorig 2007-10-31 23:32:48.000000000 +0100 ++++ scmpc-0.2.2/src/Rules.mk 2007-10-31 23:19:00.000000000 +0100 +@@ -16,7 +16,7 @@ + -include $(DEPENDS) + + DEFINES := -DHAVE_CONFIG_H -D_GNU_SOURCE +-INCLUDES := -I$(src_d) -I$(src_b) ++INCLUDES := -I$(src_d) -I$(src_b) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include + LDLIBS := $(LIBS) + + CLEAN += $(OBJS) $(PROGRAM) diff --git a/sound/shell-fm/Makefile b/sound/shell-fm/Makefile new file mode 100644 index 0000000..8fea1a1 --- /dev/null +++ b/sound/shell-fm/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=shell-fm +PKG_REV:=c274aa51b52185b289ac22f0cb95420a1c19868b +PKG_VERSION:=0.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=git://github.com/jkramer/shell-fm.git +PKG_SOURCE_VERSION:=$(PKG_REV) + +include $(INCLUDE_DIR)/package.mk + +define Package/shell-fm + SECTION:=sound + CATEGORY:=Sound + DEPENDS:=+libao +madplay +libpthread + TITLE:=Console Based Last.FM Radio Player + URL:=http://nex.scrapping.cc +endef + +define Package/shell-fm/description + Shell.FM is a console based player for the streams provided + by Last.FM for the Linux platform. It's lightweight and easy to use. +endef + +define Package/shell-fm/conffiles +/etc/shell-fm.rc +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -I./include/ $(TARGET_CPPFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + LDFLAGS="$(TARGET_LDFLAGS) -lmad -lao -lpthread" \ + all install +endef + +define Package/shell-fm/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/shell-fm $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) ./files/shell-fm.rc $(1)/etc/shell-fm.rc + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/shell-fm.init $(1)/etc/init.d/shell-fm +endef + +$(eval $(call BuildPackage,shell-fm)) diff --git a/sound/shell-fm/files/shell-fm.init b/sound/shell-fm/files/shell-fm.init new file mode 100644 index 0000000..0e68d34 --- /dev/null +++ b/sound/shell-fm/files/shell-fm.init @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=99 +start() { + [ -d /tmp/.shell-fm ] || mkdir /tmp/.shell-fm + [ -L /tmp/.shell-fm/shell-fm.rc ] || ln -s /etc/shell-fm.rc /tmp/.shell-fm/shell-fm.rc + HOME=/tmp shell-fm -d +} + +stop() { + echo "quit" | telnet localhost 54311 +} diff --git a/sound/shell-fm/files/shell-fm.rc b/sound/shell-fm/files/shell-fm.rc new file mode 100644 index 0000000..43ec7d2 --- /dev/null +++ b/sound/shell-fm/files/shell-fm.rc @@ -0,0 +1,9 @@ +username = username +password = password +#np-cmd = netmsg "%a - %t" +default-radio = lastfm://artist/Nightwish/similarartists +t-color = 1;32 # light green track titles +a-color = 0;32 # dark green track artist names +s-color = 1;37 # white station names +bind = 0.0.0.0 +extern = madplay -q - diff --git a/sound/sox/Makefile b/sound/sox/Makefile new file mode 100644 index 0000000..4178a2b --- /dev/null +++ b/sound/sox/Makefile @@ -0,0 +1,74 @@ +# +# Copyright (C) 2008 David Cooper +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sox +PKG_VERSION:=14.0.1 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/sox +PKG_MD5SUM:=6c95af60b20b9655531bf3162c0be937 + +PKG_FIXUP = libtool + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_LDFLAGS+= \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +# NOTE: libflac is out of date for 8.09's freeze and can't be compiled in + +define Package/sox + SECTION:=sound + CATEGORY:=Sound + DEPENDS:=+BUILD_PATENTED:lame-lib +BUILD_PATENTED:libmad +BUILD_PATENTED:libid3tag +libvorbis +libvorbisidec +libgsm + TITLE:=Sox is a general purpose sound converter/player/recorder + URL:=http://sox.sourceforge.net/ +endef + +define Package/sox/description + SoX is a command line utility that can convert various formats + of computer audio files in to other formats. It can also apply + various effects to these sound files during the conversion. + As an added bonus, SoX can play and record audio files on + several unix-style platforms. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-external-gsm \ + --disable-oss \ + --enable-alsa \ + --disable-libao \ + --without-libltdl \ + --with-ogg \ + --without-flac \ + --without-ffmpeg \ + --without-amr-wb \ + --without-amr-nb \ + --without-samplerate \ + --without-ladspa \ + --$(if $(CONFIG_BUILD_PATENTED),with-mad,without-mad) \ + --$(if $(CONFIG_BUILD_PATENTED),with-lame,without-lame) \ + --$(if $(CONFIG_BUILD_PATENTED),with-id3tag,without-id3tag) \ + ) +endef + +define Package/sox/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/bin/{play,rec,sox} $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/{libsfx.so*,libsox.so*} $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,sox)) + diff --git a/sound/sox/patches/001-cross_compile.patch b/sound/sox/patches/001-cross_compile.patch new file mode 100644 index 0000000..5f80451 --- /dev/null +++ b/sound/sox/patches/001-cross_compile.patch @@ -0,0 +1,30 @@ +diff -urN sox-14.0.1/src/Makefile.am sox-14.0.1.new/src/Makefile.am +--- sox-14.0.1/src/Makefile.am 2008-01-14 04:40:59.000000000 +0100 ++++ sox-14.0.1.new/src/Makefile.am 2008-07-14 14:14:37.000000000 +0200 +@@ -288,10 +288,9 @@ + + EXTRA_DIST = tests.sh testall.sh tests.bat testall.bat monkey.au monkey.wav sox_sample_test.c amr-wb-test CMakeLists.txt soxstdint.h.cmake soxconfig.h.cmake example1.c + +-all: sox$(EXEEXT) play rec sox_sample_test$(EXEEXT) example1$(EXEEXT) ++all: sox$(EXEEXT) play rec + + play rec: sox$(EXEEXT) +- ./sox --help > /dev/null + test -f .libs/lt-sox && ( $(RM) $@ && $(LN_S) .libs/lt-sox $@ ) || $(LN_S) sox$(EXEEXT) $@ + + install-exec-hook: +diff -urN sox-14.0.1/src/Makefile.in sox-14.0.1.new/src/Makefile.in +--- sox-14.0.1/src/Makefile.in 2008-01-28 23:47:49.000000000 +0100 ++++ sox-14.0.1.new/src/Makefile.in 2008-07-14 14:15:12.000000000 +0200 +@@ -2426,10 +2426,9 @@ + uninstall-libLTLIBRARIES uninstall-pkglibLTLIBRARIES + + +-all: sox$(EXEEXT) play rec sox_sample_test$(EXEEXT) example1$(EXEEXT) ++all: sox$(EXEEXT) play rec + + play rec: sox$(EXEEXT) +- ./sox --help > /dev/null + test -f .libs/lt-sox && ( $(RM) $@ && $(LN_S) .libs/lt-sox $@ ) || $(LN_S) sox$(EXEEXT) $@ + + install-exec-hook: diff --git a/sound/sox/patches/010-dev-sound-dsp.patch b/sound/sox/patches/010-dev-sound-dsp.patch new file mode 100644 index 0000000..ad70f26 --- /dev/null +++ b/sound/sox/patches/010-dev-sound-dsp.patch @@ -0,0 +1,26 @@ +diff -ruN sox-14.0.1.orig/src/sox.c sox-14.0.1/src/sox.c +--- sox-14.0.1.orig/src/sox.c 2008-01-28 17:47:19.000000000 -0500 ++++ sox-14.0.1/src/sox.c 2008-12-01 05:49:29.000000000 -0500 +@@ -62,6 +62,7 @@ + #define TIME_FRAC 1e3 + #endif + ++#include + + /* argv[0] options */ + +@@ -377,7 +378,13 @@ + if (sox_find_format("ossdsp", sox_false)) + { + f->filetype = "ossdsp"; ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) ++ f->filename = xstrdup("/dev/sound/dsp"); ++#else + f->filename = xstrdup("/dev/dsp"); ++#endif ++ + return; + } + #endif + diff --git a/sound/streamripper/Makefile b/sound/streamripper/Makefile new file mode 100644 index 0000000..1cd35f4 --- /dev/null +++ b/sound/streamripper/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=streamripper +PKG_VERSION:=1.62.0 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=1a8353af3c36d56f2d8ee8552f632071 + +PKG_INSTALL:=1 +PKG_FIXUP:=libtool +PKG_LIBTOOL_PATHS:=. tre-0.7.2 + +include $(INCLUDE_DIR)/package.mk + +define Package/streamripper + SECTION:=multimedia + CATEGORY:=Multimedia + DEPENDS:=+libmad +libfaad2 + TITLE:=streamripper + URL:=http://streamripper.sourceforge.net/ +endef + +define Package/streamripper/description + Streamripper is an Open Source application that lets you record streaming mp3 to your hard drive. +endef + + +EXTRA_CFLAGS += $(TARGET_CPPFLAGS) + +CONFIGURE_ARGS+= \ + --without-ogg \ + --with-included-argv \ + --without-included-libmad \ + --without-libiconv-prefix \ + --with-included-tre \ + --with-gnu-ld \ + +define Package/streamripper/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/streamripper $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/agrep $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtre.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,streamripper)) diff --git a/utils/alsa-utils/Makefile b/utils/alsa-utils/Makefile new file mode 100644 index 0000000..f6e2c7b --- /dev/null +++ b/utils/alsa-utils/Makefile @@ -0,0 +1,72 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=alsa-utils +PKG_VERSION:=1.0.24.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/utils/ \ + http://alsa.cybermirror.org/utils/ +PKG_MD5SUM:=8238cd57cb301d1c36bcf0ecb59ce6b2 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/alsa-utils + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+alsa-lib +libncurses +libpthread + TITLE:=ALSA (Advanced Linux Sound Architecture) utilities + URL:=http://www.alsa-project.org/ +endef + +define Package/alsa-utils-tests + $(call Package/alsa-utils/Default) + SECTION:=utils + CATEGORY:=Utilities + TITLE:=ALSA utilities test data (adds ~1.3M to image) +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-rpath \ + --disable-alsatest \ + --disable-xmlto \ + , \ + ac_cv_prog_ncurses5_config=no \ + ac_cv_prog_ncursesw5_config=no \ + ) +endef + +define Package/alsa-utils/install + $(INSTALL_DIR) $(1)/usr/{s,}bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amixer $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/alsamixer $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aplay $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arecord $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/alsactl $(1)/usr/sbin/ + + $(INSTALL_DIR) $(1)/usr/share/alsa/init + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/alsa/init/* \ + $(1)/usr/share/alsa/init/ +endef + +define Package/alsa-utils-tests/install + $(INSTALL_DIR) $(1)/usr/{s,}bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/speaker-test $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share/sounds/alsa + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/sounds/alsa/* \ + $(1)/usr/share/sounds/alsa/ +endef + +$(eval $(call BuildPackage,alsa-utils)) +$(eval $(call BuildPackage,alsa-utils-tests)) diff --git a/utils/alsa-utils/patches/100-uClibc-compat.patch b/utils/alsa-utils/patches/100-uClibc-compat.patch new file mode 100644 index 0000000..9766125 --- /dev/null +++ b/utils/alsa-utils/patches/100-uClibc-compat.patch @@ -0,0 +1,25 @@ +Index: alsa-utils-1.0.24.2/alsamixer/volume_mapping.c +=================================================================== +--- alsa-utils-1.0.24.2.orig/alsamixer/volume_mapping.c 2011-03-11 13:26:29.000000000 +0100 ++++ alsa-utils-1.0.24.2/alsamixer/volume_mapping.c 2011-03-11 13:27:58.000000000 +0100 +@@ -109,9 +109,9 @@ + if (use_linear_dB_scale(min, max)) + return (value - min) / (double)(max - min); + +- normalized = exp10((value - max) / 6000.0); ++ normalized = pow(10, (value - max) / 6000.0); + if (min != SND_CTL_TLV_DB_GAIN_MUTE) { +- min_norm = exp10((min - max) / 6000.0); ++ min_norm = pow(10, (min - max) / 6000.0); + normalized = (normalized - min_norm) / (1 - min_norm); + } + +@@ -144,7 +144,7 @@ + } + + if (min != SND_CTL_TLV_DB_GAIN_MUTE) { +- min_norm = exp10((min - max) / 6000.0); ++ min_norm = pow(10, (min - max) / 6000.0); + volume = volume * (1 - min_norm) + min_norm; + } + value = lrint_dir(6000.0 * log10(volume), dir) + max; diff --git a/utils/anyremote/Makefile b/utils/anyremote/Makefile new file mode 100644 index 0000000..2c617df --- /dev/null +++ b/utils/anyremote/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=anyremote +PKG_VERSION:=4.7.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/${PKG_NAME} +PKG_MD5SUM:=bd177156faa8a59a5d3e02cada243fc3 + +include $(INCLUDE_DIR)/package.mk + +define Package/anyremote + SECTION:=utils + CATEGORY:=Utilities + TITLE:=A bluetooth remote control app + DEPENDS:=+bluez-libs + URL:=http://anyremote.sourceforge.net/ +endef + +define Package/anyremote/description + Remote control your machine via bluetooth +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-xtest \ + ) +endef + +define Package/anyremote/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) ./files/anyremote.cfg $(1)/etc/anyremote.cfg + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/anyremote.init $(1)/etc/init.d/anyremote +endef + +$(eval $(call BuildPackage,anyremote)) diff --git a/utils/anyremote/files/anyremote.cfg b/utils/anyremote/files/anyremote.cfg new file mode 100644 index 0000000..cd94999 --- /dev/null +++ b/utils/anyremote/files/anyremote.cfg @@ -0,0 +1,66 @@ +% +% anyremote configuration file for sound management. (Server-mode) +% prerequisites: amixer utility +% + +% STATUS stable +% XTEST no +% SOUND mixer +% ENV no + +% Uncomment if needed +%AutoRepeat=false +%Baudrate=19200 +Device=bluetooth:19 +%Log=true +Screen=true + +GuiAppName=Sound volume test +GuiAppIcon=sound.png +GuiAppType=Example +GuiAppBinary=true + +% 1 - increase sound volume +% 2 - mute/unmute +% 3 - increase sound volume +% 5 - show list of available controls + +[Aliases] + +% Aliases for AverMedia IR remote +VOLUMEDOWN=1 +MIN_INTERESTING=2 +VOLUMEUP=3 +TEXT=* + +[End] + +[Keys] + +(Init) =Macro(SET_CARD);Macro(TEST_MIXER);Macro(INIT_CONTROL); +(Connect)=Set(parameter,debug,on);\ + Set(icons,SoundControl,1,minus,2,mute,3,plus,4,default,5,configure,6,default,7,default,8,default,9,default,0,default,*,question,#,default);\ + Macro(SET_VIEW); + +SET_CARD =Make(var,mixer_card,echo 'if [ -f $HOME/.anyRemote/amixer.card ]; then cat $HOME/.anyRemote/amixer.card; else true; fi;'|bash -f -s); +TEST_MIXER =Exec(echo 'TEST=`amixer $(mixer_card) sget Master,0`;U=`echo $TEST|grep "Usage: amixer" |wc -l`;KD=`which kdialog|grep kdialog|grep -v not|wc -l`;if [ "x$KD" == "x1" ]; then M="kdialog --msgbox"; else M="echo";fi;if [ "x$U" != "x0" ]; then $M "ERROR: You have to correct example according to Your system configuration !"; fi;'|bash -f -s); +INIT_CONTROL=Exec(echo 'if [ -f $HOME/.anyRemote/amixer.control ]; then true; else echo "Master@0" > $HOME/.anyRemote/amixer.control; fi;'|bash -f -s) +SET_VIEW =Set(menu,add,Controls);ExecAndSet(title,cat $HOME/.anyRemote/amixer.control|sed "s/@/,/"); + +Cancel=Exit + +Controls=ExecAndSet(list,replace,Mixer Controls,amixer scontrols|sed 's/Simple mixer control //;s/,/@/;s/$/,/');Set(menu,replace,Choose); +Choose($$)=Exec(echo $(Param) > $HOME/.anyRemote/amixer.control);Set(list,close);Macro(SET_VIEW); +Back=Set(text,close);Macro(SET_VIEW); +Back($$)=Set(list,close);Macro(SET_VIEW); + +1=Exec(amixer $(mixer_card) sset `cat $HOME/.anyRemote/amixer.control|sed "s/@/,/"` 5%- -q) +2=Exec(amixer $(mixer_card) sset `cat $HOME/.anyRemote/amixer.control|sed "s/@/,/"` toggle -q) +3=Exec(amixer $(mixer_card) sset `cat $HOME/.anyRemote/amixer.control|sed "s/@/,/"` 5%+ -q) + +5=Macro(Controls); + +* *=Set(text,replace,Help,1 - Vol-\n2 - Mute/Unmute\n3 - Vol+\n5 - Choose mixer control) + +[End] + diff --git a/utils/anyremote/files/anyremote.init b/utils/anyremote/files/anyremote.init new file mode 100644 index 0000000..e32b615 --- /dev/null +++ b/utils/anyremote/files/anyremote.init @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=95 + +start() { + /usr/sbin/anyremote -f /etc/anyremote.cfg > /dev/null & +} + +stop() { + killall anyremote +} + + diff --git a/utils/anyremote/patches/010-dont-add-host-includes.patch b/utils/anyremote/patches/010-dont-add-host-includes.patch new file mode 100644 index 0000000..d4e6477 --- /dev/null +++ b/utils/anyremote/patches/010-dont-add-host-includes.patch @@ -0,0 +1,13 @@ +diff --git a/configure b/configure +index 2a4e2a4..396d5a2 100755 +--- a/configure ++++ b/configure +@@ -3940,7 +3940,7 @@ _ACEOF + fi + + +-CFLAGS="$CFLAGS -I/usr/local/include -Wall -D_REENTRANT -O2 -g" ++CFLAGS="$CFLAGS -Wall -D_REENTRANT -O2 -g" + + # On IRIX 5.3, sys/types and inttypes.h are conflicting. + diff --git a/utils/ap51-flash/Makefile b/utils/ap51-flash/Makefile new file mode 100644 index 0000000..60ac9ab --- /dev/null +++ b/utils/ap51-flash/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2010-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=ap51-flash +PKG_REV:=232 +PKG_VERSION:=r$(PKG_REV) +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=svn +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=ap51-flash-$(PKG_VERSION) +PKG_SOURCE_URL:=http://dev.cloudtrax.com/downloads/svn/ap51-flash/trunk +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz + +include $(INCLUDE_DIR)/package.mk + +ifeq ($(CONFIG_BIG_ENDIAN),y) + STAMP_BUILT:=$(STAMP_BUILT)_big +endif + +define Package/ap51-flash + SECTION:=utils + CATEGORY:=Utilities + TITLE:=A tool for flashing (nearly) all ap51/ap61 based routers + URL:=http://dev.cloudtrax.com/wiki/ap51-flash-station +endef + +TARGET_EXTRA_CFLAGS:=-DFLASH_FROM_FILE -DNO_LIBPCAP +ifeq ($(CONFIG_BIG_ENDIAN),y) + TARGET_EXTRA_CFLAGS:=$(TARGET_EXTRA_CFLAGS) -DUIP_CONF_BYTE_ORDER=1234 +endif + +# pass optimization flags +MAKE_FLAGS += \ + OFLAGS="$(TARGET_CFLAGS)" \ + EXTRA_CFLAGS="$(TARGET_EXTRA_CFLAGS)" \ + REVISION="$(PKG_VERSION)" \ + +define Package/ap51-flash/install + $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin \ + $(1)/usr/lib/ap51-flash + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ap51-flash $(1)/usr/sbin/ + $(INSTALL_BIN) ./files/ap51-flash.init $(1)/etc/init.d/ap51-flash + $(INSTALL_BIN) ./files/ap51-flash.sh $(1)/usr/lib/ap51-flash/ap51-flash.sh + $(INSTALL_DATA) ./files/ap51-flash.conf $(1)/etc/config/ap51-flash +endef + +$(eval $(call BuildPackage,ap51-flash)) diff --git a/utils/ap51-flash/files/ap51-flash.conf b/utils/ap51-flash/files/ap51-flash.conf new file mode 100644 index 0000000..f66973f --- /dev/null +++ b/utils/ap51-flash/files/ap51-flash.conf @@ -0,0 +1,6 @@ +#config flash +# option ifname eth0.1 +# option rootfs /tmp/images/openwrt-atheros-root.squashfs +# option kernel /tmp/images/openwrt-atheros-vmlinux.lzma +# option ubnt /tmp/images/openwrt-atheros-ubnt5-squashfs.bin +## option loop '1' diff --git a/utils/ap51-flash/files/ap51-flash.init b/utils/ap51-flash/files/ap51-flash.init new file mode 100644 index 0000000..1633ac4 --- /dev/null +++ b/utils/ap51-flash/files/ap51-flash.init @@ -0,0 +1,50 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2010 OpenWrt.org + +START=20 + +NAME=ap51-flash + +start_daemon() { + local cfg="$1" + + config_get_bool loop "$cfg" loop + config_get ifname "$cfg" ifname + config_get rootfs "$cfg" rootfs + config_get kernel "$cfg" kernel + config_get ubnt "$cfg" ubnt + [ "$loop" != "1" ] && loop=0 + if [ -n "$ifname" -a -n "$rootfs" -a -n "$kernel" ] || \ + [ -n "$ifname" -a -n "$ubnt" ]; then + PID="`cat /var/run/$NAME.sh-$ifname.pid 2> /dev/null`" + [ -z "`ps | grep "^.[ ]*$PID "`" ] && \ + rm /var/run/$NAME.sh-$ifname.pid + [ -n "`ls /var/run/$NAME.sh-$ifname.pid 2> /dev/null`" ] && { + echo "Can't start more than one ap51-flash for interface $ifname!" + return 0 + } + start-stop-daemon -S -b -m -p /var/run/$NAME.sh-$ifname.pid -n $NAME.sh \ + -x /usr/lib/ap51-flash/$NAME.sh -- "$loop" "$ifname" "$rootfs" "$kernel" "$ubnt" + fi +} + +start() { + config_load ap51-flash + config_foreach start_daemon flash +} + +stop() { + # Terminating all ap51-flash processes + echo "WARNING: Going to teminate all ap51-flash processes! (hope you made sure that they're not flashing right now)" + echo "OR you can stop this with Ctrl+c within 10 seconds" + sleep 10 + local pidfile + for pidfile in `ls /var/run/${NAME}.sh-*.pid 2> /dev/null`; do + start-stop-daemon -K -s TERM -p "${pidfile}" -n "${NAME}.sh" >/dev/null + rm -f "${pidfile}" + done + for pidfile in `ls /var/run/${NAME}-*.pid 2> /dev/null`; do + start-stop-daemon -K -s TERM -p "${pidfile}" -n "${NAME}" >/dev/null + rm -f "${pidfile}" + done +} diff --git a/utils/ap51-flash/files/ap51-flash.sh b/utils/ap51-flash/files/ap51-flash.sh new file mode 100755 index 0000000..9ac33ee --- /dev/null +++ b/utils/ap51-flash/files/ap51-flash.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +NAME=ap51-flash +rootfs="" +kernel="" +ubnt="" + +[ $1 -eq "1" ] && loop="1" +ifname="$2" +[ -n "$3" ] && rootfs="--rootfs $3" +[ -n "$4" ] && kernel="--kernel $4" +[ -n "$5" ] && ubnt="--ubnt $5" + +while [ 1 ]; do + start-stop-daemon -S -m -p /var/run/$NAME-$ifname.pid -n $NAME \ + -x /usr/sbin/$NAME -- --flash-from-file $rootfs $kernel $ubnt $ifname + + rm /var/run/$NAME-$ifname.pid + [ "$loop" != "1" ] && break + sleep 15 +done diff --git a/utils/at/Makefile b/utils/at/Makefile new file mode 100644 index 0000000..d0a3676 --- /dev/null +++ b/utils/at/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=at +PKG_VERSION:=3.1.12 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz +PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/a/at +PKG_MD5SUM:=1e67991776148fb319fd77a2e599a765 + +include $(INCLUDE_DIR)/package.mk + +define Package/at + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libelf + TITLE:=Delayed job execution and batch processing + URL:=http://packages.debian.org/stable/at + MAINTAINER:=Luka Perkov +endef + +define Package/at/description + At and batch read shell commands from standard input storing them as a job to + be scheduled for execution in the future. +endef + +export SENDMAIL=/bin/true +EXTRA_CFLAGS:=-DNEED_YYWRAP -I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include/libelf \ + $(TARGET_LDFLAGS) + +CONFIGURE_ARGS+=--prefix=/usr \ + --with-daemon_username=nobody \ + --with-daemon_groupname=nogroup \ + --with-jobdir=/var/spool/cron/atjobs \ + --with-atspool=/var/spool/cron/atspool + +define Package/at/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/sbin $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/atd.init $(1)/etc/init.d/atd + $(INSTALL_BIN) $(PKG_BUILD_DIR)/at $(1)/usr/bin + ln -sf at $(1)/usr/bin/atq + ln -sf at $(1)/usr/bin/atrm + $(INSTALL_BIN) $(PKG_BUILD_DIR)/atd $(1)/usr/sbin +endef + +$(eval $(call BuildPackage,at)) diff --git a/utils/at/files/atd.init b/utils/at/files/atd.init new file mode 100755 index 0000000..e7b097e --- /dev/null +++ b/utils/at/files/atd.init @@ -0,0 +1,15 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2011 OpenWrt.org +START=50 + +start() { + [ -d /var/spool/cron/atjobs ] || mkdir -p /var/spool/cron/atjobs + [ -d /var/spool/cron/atspool ] || mkdir -p /var/spool/cron/atspool + [ -f /var/spool/cron/atspool ] || > /var/spool/cron/atjobs/.SEQ + chown -R nobody:nogroup /var/spool/cron/atjobs /var/spool/cron/atspool + atd +} + +stop() { + killall atd +} diff --git a/utils/at/patches/100-cross-compile.patch b/utils/at/patches/100-cross-compile.patch new file mode 100644 index 0000000..71921cb --- /dev/null +++ b/utils/at/patches/100-cross-compile.patch @@ -0,0 +1,11 @@ +--- at-3.1.12/configure 2009-11-23 16:11:52.000000000 +0100 ++++ at-3.1.12/configure 2011-03-30 13:50:03.725526083 +0200 +@@ -3417,7 +3417,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Trying to compile a trivial ANSI C program" >&5 + $as_echo_n "checking Trying to compile a trivial ANSI C program... " >&6; } + if test "$cross_compiling" = yes; then : +- as_fn_error "Could not compile and run even a trivial ANSI C program - check CC." "$LINENO" 5 ++ # as_fn_error "Could not compile and run even a trivial ANSI C program - check CC. Ignoring as we're cross compiling." "$LINENO" 5 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ diff --git a/utils/at/patches/110-getloadavg.patch b/utils/at/patches/110-getloadavg.patch new file mode 100644 index 0000000..a154f1a --- /dev/null +++ b/utils/at/patches/110-getloadavg.patch @@ -0,0 +1,14 @@ +--- at-3.1.12/getloadavg.c 2009-11-23 16:11:52.000000000 +0100 ++++ at-3.1.12/getloadavg.c 2011-03-30 13:59:32.261558198 +0200 +@@ -69,8 +69,9 @@ + #include + #endif + +-#include "lisp.h" +-#include "sysfile.h" /* for encapsulated open, close, read, write */ ++#include ++#include ++#include + + #ifndef HAVE_GETLOADAVG + diff --git a/utils/avrdude/Makefile b/utils/avrdude/Makefile new file mode 100644 index 0000000..4ae5400 --- /dev/null +++ b/utils/avrdude/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=avrdude +PKG_VERSION:=5.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/avrdude +PKG_MD5SUM:=d459dcf47fa7fc2a29a70d68ebff4886 + +include $(INCLUDE_DIR)/package.mk + +define Package/avrdude + SECTION:=utils + CATEGORY:=Utilities + TITLE:=AVR Downloader/UploaDEr + URL:=http://www.bsdhome.com/avrdude/ + DEPENDS:=+libncurses +libusb +endef + +define Package/avrdude/description + AVRDUDE is a full featured program for programming Atmel's AVR CPU's. +endef + +define Build/Prepare + $(call Build/Prepare/Default) + chmod -R u+w $(PKG_BUILD_DIR) +endef + +CONFIGURE_ARGS+= \ + --enable-shared \ + --disable-static \ + --disable-parport \ + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install-exec +endef + +define Package/avrdude/conffiles +/etc/avrdude.conf +endef + +define Package/avrdude/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/avrdude.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/avrdude $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,avrdude)) diff --git a/utils/avrusbboot/Makefile b/utils/avrusbboot/Makefile new file mode 100644 index 0000000..546949e --- /dev/null +++ b/utils/avrusbboot/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2008-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=avrusbboot +PKG_VERSION:=2006-06-25 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.fischl.de/avrusbboot/ +PKG_MD5SUM:=3e2f5e2c257918410a66c3463f583fdf + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/avrusbboot + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libusb +uclibcxx +libgcc + TITLE:=USB bootloader for Atmel AVR controllers + URL:=http://www.fischl.de/avrusbboot/ +endef + +define Package/avrusbboot/description + AVRUSBBoot is a bootloader for the Atmel AVR controllers. + It uses a firmware-only USB driver to transfer binary data + from the PC to the flash of the controller. Once the AVR + is flashed with the bootloader, no other ISP programmer is + needed; then the microcontroller can be reprogrammed over USB. +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/software \ + CXX="$(TARGET_CROSS)g++ $(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++ $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++" \ + LFLAGS="$(TARGET_LDFLAGS) -nodefaultlibs -luClibc++ -lc -lusb $(LIBGCC_S)" \ + all +endef + +define Package/avrusbboot/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/software/avrusbboot $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,avrusbboot)) diff --git a/utils/avrusbboot/patches/001-fix_makefile.patch b/utils/avrusbboot/patches/001-fix_makefile.patch new file mode 100644 index 0000000..4439b62 --- /dev/null +++ b/utils/avrusbboot/patches/001-fix_makefile.patch @@ -0,0 +1,18 @@ +diff -urN avrusbboot.2006-06-25/software/Makefile avrusbboot.2006-06-25.new/software/Makefile +--- avrusbboot.2006-06-25/software/Makefile 2006-06-25 11:09:03.000000000 +0200 ++++ avrusbboot.2006-06-25.new/software/Makefile 2008-05-20 12:54:22.000000000 +0200 +@@ -1,6 +1,5 @@ +-LIBUSB_CONFIG = libusb-config +-CFLAGS+=-g -Wall -pedantic `$(LIBUSB_CONFIG) --cflags` +-LFLAGS+=`$(LIBUSB_CONFIG) --libs` -lusb ++CFLAGS=-I$(STAGING_DIR)/usr/include ++LFLAGS=-L$(STAGING_DIR)/usr/lib -lusb + + all: + make avrusbboot +@@ -10,4 +9,4 @@ + rm avrusbboot + + avrusbboot: main.cpp cflashmem.o cpage.o cbootloader.o +- g++ $(CFLAGS) main.cpp cflashmem.o cpage.o cbootloader.o -o avrusbboot $(LFLAGS) ++ $(CXX) $(CFLAGS) main.cpp cflashmem.o cpage.o cbootloader.o -o avrusbboot $(LFLAGS) diff --git a/utils/avrusbboot/patches/002-fix_compilation.patch b/utils/avrusbboot/patches/002-fix_compilation.patch new file mode 100644 index 0000000..bd8bcd9 --- /dev/null +++ b/utils/avrusbboot/patches/002-fix_compilation.patch @@ -0,0 +1,9 @@ +diff -ruN avrusbboot.2006-06-25-orig/software/main.cpp avrusbboot.2006-06-25-work/software/main.cpp +--- avrusbboot.2006-06-25-orig/software/main.cpp 2006-06-25 09:33:13.000000000 +0200 ++++ avrusbboot.2006-06-25-work/software/main.cpp 2008-05-01 17:25:30.000000000 +0200 +@@ -39,4 +39,4 @@ + } + + return 0; +-}; ++} diff --git a/utils/bandwidthd/Makefile b/utils/bandwidthd/Makefile new file mode 100644 index 0000000..3121c68 --- /dev/null +++ b/utils/bandwidthd/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bandwidthd +PKG_VERSION:=2.0.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=@SF/bandwidthd +PKG_MD5SUM:=aa79aad7bd489fd2cae1f7dc086ca8b6 + +include $(INCLUDE_DIR)/package.mk + +define Package/bandwidthd + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Bandwidthd + URL:=http://bandwidthd.sourceforge.net/ + DEPENDS:=+libgd +libpcap +endef + +define Package/bandwidthd/daemon + This package contains bandwidthd a bandwith tracking utility. +endef + +CONFIGURE_ARGS += \ + ac_cv_file__sw_lib=no \ + ac_cv_file__sw_include=no \ + ac_cv_file__usr_pkg_lib=no \ + ac_cv_file__usr_pkg_include=no \ + ac_cv_file__usr_local_pgsql_lib=no \ + ac_cv_file__usr_local_pgsql_include=no \ + ac_cv_lib_pq_PQconnectdb=no \ + +EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) +EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib + +define Package/bandwidthd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bandwidthd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/bandwidthd.config $(1)/etc/config/bandwidthd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/bandwidthd.init $(1)/etc/init.d/bandwidthd + $(INSTALL_DIR) $(1)/www + $(INSTALL_DATA) $(PKG_BUILD_DIR)/htdocs/legend.gif $(1)/www/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/htdocs/logo.gif $(1)/www/ +endef + +$(eval $(call BuildPackage,bandwidthd)) diff --git a/utils/bandwidthd/files/bandwidthd.config b/utils/bandwidthd/files/bandwidthd.config new file mode 100644 index 0000000..4bb18cf --- /dev/null +++ b/utils/bandwidthd/files/bandwidthd.config @@ -0,0 +1,11 @@ +config bandwidthd + option dev br-lan + option subnets "192.168.0.0/16 10.0.0.0/8 172.16.0.0/12" + option skip_intervals 0 + option graph_cutoff 1024 + option promiscuous true + option output_cdf false + option recover_cdf false + option filter ip + option graph true + option meta_refresh 150 diff --git a/utils/bandwidthd/files/bandwidthd.init b/utils/bandwidthd/files/bandwidthd.init new file mode 100644 index 0000000..3b3819d --- /dev/null +++ b/utils/bandwidthd/files/bandwidthd.init @@ -0,0 +1,87 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=99 + +config_cb() { + local cfg_type="$1" + local cfg_name="$2" + + case "$cfg_type" in + bandwidthd) + append cfgs "$cfg_name" + ;; + esac +} + +export_bool() { + local option="$1" + local section="$2" + local _loctmp + config_get_bool _loctmp "$section" "$option" + if [ -n "$_loctmp" ]; then + conffile="${conffile}$option " + if [ 1 -eq "$_loctmp" ]; then + conffile="${conffile}true" + else + conffile="${conffile}false" + fi + conffile="${conffile}\n" + fi +} + +export_number() { + local option="$1" + local section="$2" + local _loctmp + config_get _loctmp "$section" "$option" + if [ -n "$_loctmp" ]; then + conffile="${conffile}$option ${_loctmp}\n" + fi +} + +export_string() { + local option="$1" + local section="$2" + local _loctmp + config_get _loctmp "$section" "$option" + if [ -n "$_loctmp" ]; then + conffile="${conffile}$option \"${_loctmp}\"\n" + fi +} + +start() { + local subnet conffile + + [ -d /tmp/bandwidthd ] || mkdir -p /tmp/bandwidthd && cp /www/legend.gif /www/logo.gif /tmp/bandwidthd/ + [ -e /htdocs ] || ln -s /tmp/bandwidthd /htdocs + [ -e /www/bandwidthd ] || ln -s /tmp/bandwidthd /www/bandwidthd + rm -f /tmp/bandwidthd.conf + touch /tmp/bandwidthd.conf + [ -e /etc/bandwidthd.conf ] || ln -s /tmp/bandwidthd.conf /etc/bandwidthd.conf + + + config_load bandwidthd + for cfg in $cfgs; do + config_get subnets $cfg subnets + for subnet in $subnets; do + conffile="${conffile}subnet ${subnet}\n" + done + export_string dev $cfg + export_number skip_intervals $cfg + export_number graph_cutoff $cfg + export_bool promiscuous $cfg + export_bool output_cdf $cfg + export_bool recover_cdf $cfg + export_string filter $cfg + export_bool graph $cfg + export_number meta_refresh $cfg + [ -n "$conffile" ] && echo -e "$conffile" >>/tmp/bandwidthd.conf + unset conffile + done + cd / + bandwidthd +} + +stop() { + killall bandwidthd +} diff --git a/utils/bandwidthd/files/logo.gif b/utils/bandwidthd/files/logo.gif new file mode 100644 index 0000000000000000000000000000000000000000..7b17cc6cbc70b45aa4b21bcf6bb3f6d6462760e7 GIT binary patch literal 7573 zcmYLq2{@GB7ymm8hS1AcvovGNl6?&^Gj`c!DU`8iDP&*A5<_+(`&hE?TT;qSB1@9B zLe@l5AvAw|fB*mUKhJaSIp;m+^EvOi_qos2($Q3q$J0Wyfdk;5kjVh-H?_1=c6i~d zk^esE1wJ8@$?VN~BO@b%3BI!!Ok82xhYugfzc-Dj@`MrKx}rO7v< zLZr#kuVQk`*p5g`M@B|^HJ1vJh0@EO9ew&l zCSL%_Aen5=L&9Uom@abHf{_uK+;nho5KWFYH#euHrS(g%S4@bhudiPtukF^?V>}D# zW(95%GkOPJXE%=^$OyG+O6z?ik&1EHu8C$du;xeXwn?Q?d+vtI8<&thIQWi=0HXJ=2MP(`MP z{waGW{xN43^_3X_&NRcD^}mDpw_N_i2s{!w^w++A=zn%5WaYCM0FVIHzvNjR;Y=ZC zF2ofHfZtF2OOF@noDOf=06|!d>W1euz&%e z{vYSRn!K|j?K2$hncqNW1kBmC{B6%T{{6>4UTX`r|7!mq59%N2j2{}-3(VD7po|u9=5aW|Lgs)@BbI|Idvf5jIVT_83;MEAu-x#n@=YH>rwE3 zbN9#9fqyaj2>u`N^1t=poxmW-00V+kyMfdlg+K~h4>c6^#)7=MdD@M|{SVosT^EKL zO9qosYVn*pO{K5X1x>50UpGB@lOV35(yIkn7FJ`*lwzsDg!jv#mW%XR~>Ki%qY@w5vtLMb@id8FY zd0HcfrTzoaJ$~Ryutn{y+zT{)bG%F5)AKYJC*DkE~-9G0L zYZ1))j8G6@j6g@9ljRgF2u4s77o!bY4`8fJPKVdAjIKkoln9%RqFAVYcQ*AQwNGJ4 zu^cWw0AyT^}iRq6*3P>+D0I1zzs+=)K36coc4I(idev*PM z?0#N0uWvk}HkLrg&TOWD>;Qe~6Gv;FFOJ##-U2ZgX4LnnSR9RylZ6AV4;55ar9URYM!MMHq%cK1yvR<= zwK7kWkY8SWlicQ7S?4`{r>3cCZmYT=tb3MK=QDp)db?l$11PI@CcL75S=O!j?ben< zZDuG9q`n3>|GtJ~B9dM1tzI>A@piz42kr4X)ne7?Rf$|T8a{vHVgoMHxbF-d|9JFo zf#~`Y)wD7&*$qvI;zH;VDX`k8u09O;W=u*P_vB{@?70Ai!7y0A&aR;+D1$FRlzJNV zrLn6wm`ZC7ee81QR)+>`uo%IqA8|i6JI5SK%V%^~uw`LPa{uTD2G2A_;THfW42G#8 zJ+ea#s})iJCK}T6JCWt3eM9QcTE2jgcYdQI^}@PLn7lTf1ePs8yJ-R{Z6*`V;rm@3 zA@s9D)Chs_?1CWi(cQA|?W{(BVfD|ew}m*IZ@IW^u4OPD?^u4wFv#f^7KlCK3TuB? zoOSolW<`13pRJ1Yw|~Ai48CmNbTkwjU!nA^Yya{{y!7}R!qVVqwOwQiuGwK#VDy8o z(gqBXfS^u)PFdVL{WarUfBJjDfA{p@bFBE^!!KF){vK_V*Z=*q{dD*5fqBC?mP!ah zI5<6AuP6UKIXHV!09q12rQHR+@ST9rBSBf&kcE~B5g<8%1b>Jt9M}6E$u>gLG5?LE z3zCS$B6_G~d%Cw1jHG##mn=JQC}x$?Xfb6SyZ|rjz(N8+#SKr}>MbABrz3zRc2i2U zM6i*xQFQx6!^pNY&NV(~#Bw3hUz>qV6HX_7G}n`{kwvBWg-XW7xO>|4X)b0Ddz`xr z(Lgb#)AhxJI?KI2&)zC&du8^!;pZtv~ab-otZD0FRLylY+aW_-ep=7ik`K!KYQ=j4 zzrhfO_i_@!xtO#qt!wB9DaJXB58BBXfc7y!d+O?!;5ObcdO;3q!ht9eUMWLvSdCql)DjRhLk67&{ERjCniA{ku7c;wy2vcwl&~ z4XrDf97HJuI`MR!fAivzL*00#h5_-}@JXa_p^~WkFDZ+fNq&n`ej6H_BI~(O8vl3C z>MRvC9(PEI8#&EZZ`!Rtf7BvY@e+V&dY8fTOm+=t<}1G|@;?LU8wiQPj3P`sT}{`% zZ}G`1_hAh*O5fx~F`zofMj!cG<+{DE7+4xvN@{JL&xzC;k=;x^>=QJQ+|nCSY%~+~ zLVj!@My=yV_1Om4UM_6&ZC}adyw7&tyaD$u#vfdbNE(!S%bBb?D7iFyIAqC*=&3ML zjkw;9wiswS;u7b!H;@psDof{7_kYQ#W-OyC}Gm(WWe?Iv2$~MH- zg0!C4*z}l{hQ!2eo3V!3RP(mF!c+Br^$0jk9{z!{=(iY`BEcfZhi!LU2BxNL5zvGS z{_Tss54Ph384nQ^R>eCIvtvwpknk;~MUNQU-~5Rt*RHS4q}GmH;O~?jz4&g(O#dJl zt>gas1B>U^a?c`17KlCJf&ucSn3HV%oy7FwS?MIhAc=eKPjM1o=N_fJH)I|>hddt% zfx=sA92O3AVp1q6Pa-5~JtOQ9%X|ExiVYE>4uoGyz+d{qO{3(FsluJxB)!wE7@u8J z(!*aiv%{ucC+0z+v%UuWmE?Ms0IbxTq>N}J7=%JAK)LI{kiRj7kYzqEfwKMVVVM(VxB#~nwYFq}3N}OxTmAi!B~An-$ByXo6cKRJWpz$*c8(2- z7{v|cHK8heRK?#P2^R0Zijt#7$HHJ37sTeN_jbnpm>*e&Ar^{-WgjDNNp)HbvGn=w zL`nE8X;GKDGokns4!8F%EaSH6q;{w~LlPj(`Uk69ET~20mkrQ4zq^v-2I~I z^4&C(!IeVNjIy0TPGgXQdtCw#nGP`-+By^R?rHT;7DxmX=eW3?JbR={I(}T2$=nwqt z3r*2^MGp#oMF048&0Zlo4-H$ji`H(p$-_x&EJL@7{d7(I-~&jNUJ6==m^6lICRg<>j|1I7Et=dR1~A3vJU~@=?7N$M+SiY zmP9~}PuB!Si$}p+m_$GGsbT`AoxLfrreP60x1-!A*ZlU41p>SLVQK6XsWLBF;}M^U z241}6079q%76N}KHN3$TKBV+x{b5YETf$JRuskvJ!1!KsBt4WM#Y?ERWTOAfM=ufj zUS7PZ{h_1x!|4sybjJWKUqQP25AFJs`YaPl@vwj*+54B+iI+^CsU=#cn!;Z*w| zYy^EhOb%KNC$JjReh8!4OR(uyKc-^35CFO%!l<5kbZ43fHNe@AkTw`lr}-jRAUhR4 zVQBpd{{|DK4tRT2TAl~wzXJT>NuX>@TUH18XK@`03FoeWcV{e?H!QRwgc|YIP^T!E z1oX~^5X&sHMg?Ftqi;GZbnDRfNW*WD=k|?k1FP3jI7?xZ3QK$?npMJYW|hxg$jH}m zlh5XcXc-Re;0ZZ2gBJAp7+BccsuU6T%vd&ti+2fmTk`p|GrpB%5UfByGy~13Blg$&paqKwCI3fuBoE^{zc{XIm*_&h9tkAWe$BU!H zbjg&ODjU9&%PWG}l;i{$;e5yOhAWDOyt!eia$*8SUS> zpMeKZD4xoXkPXF?5P*Wtb!B*?9PG}eN@p()63oNV;Z@X?01!@%LRm``&Brom#(;S% z3b9CKRr6xC0a=k0VCM)a=m|r1$uhLzQ%dYASL`aHN~%gqs(K5WO%+?4p|<12FalJv zA(b`LUTYc@7%w$YWO`-laJ4Ngqq|VN8ycDZrDWO?*Wf1R6B2+5m*5Ww0VD1%j1@K(jDRq&>ooNtt!>68Humy$*CE+ zS@UYEW^$|MeNOG5Yt3uj+BuqW1n2Jj8(H-aI->g zv*Pn+<@sin<7Ny;3r?v;-Ks@1xJ5g+MfZ7&-h7L}af=a0tBF!;f)kWpyVWunqwm#v zW4;y0V0pCBYWGH!6j5p)+_r<|s*P!Lzs7#*<>^7@cFvwVG|z0<&BG z+$=W{vFD-QU1=xz;?;9D*#-(|OL*UNmvWA~%6knr(4C_XFQ|P`eR<p zREN$n8lB`SScA(}{UVat#!vc#e2D^l@dgPD+@H19o%*&phEAjhFGBq3vy;z3t}>4> zVgX7H45cImr3driNm0t*?E9J2j8UAaI+fC7^vP?==uR%LSBcgc=One1Hp8)3hhG-5zNRbhaz8<@k8R?5hqd&J5ga8Jl96EGfB|G0 zUNK`Km06Y?wxePU@cC_~#RSN!%M6n*APerJ-PVIFEKj7C-ZpE$-rOcEYQFJz90udx zE?ZmDr@q-RhJ6+U`93E;4`HHDfr+N{93;oWbz%=VYg^aIco&Y zUj-acI0=VBnRNX;aD1H5v? zWWx3CuJk+TyQxK{iK{kz>?Ba_^YteQx!m~{-lJ*U8?0QlEco1PUs2Gs6K$wz&o2~6 z6)|nt%`eK;-_D*s5%?h>^@9yVTbU(aMLT$0 z=tXu9FPk4}a}_L(wqWr$xrAC4r^VTXSUn9!3fjhy6-%Zjs{mdYrR`_R%0=cz=NTUU zg+9?63GZjgrB=u$svbI6f2|qf`-dY>3U&aqmkrMN#z~YWW*wibKBBSn894>L(7LkA4`i^3`|Zn zY3d?Vai0+QPf8FjD$%K~(O|>G#F+>$l`FuxTcF6t*Sm|%Lz`Cjq`znwfLdbxeB4Y% zoNNfAEY9_8p`RXT1JIxjG#2Z_>4imCuD^U0z7t_PcFB?bJ_^*4{$h<5tmMkpu}?2c z3O@(=+WB_aQ6<7>lvq^5SDXu~ewbI^o2T`76Pm=z^CjtO;}l(``%|_zRSO>DS9k+3 z<~^e9Z}&nU1(@dHQ>JchYpbmF6nrt9z)cE>X^_DDoz0rZz? z&HFT;TK4G9d6?d!LJ(wK@v!4%Rx_zfTpQ-=D%%L^@9Fg0uW7$kzu0j_iG_PUr%2s= zoIe1K70=q)GtXfE%~lcbv536O&SsS3ni^a$#*QU?RGr9MOOj(D z@31BBZ@=6jXC#eLOnA78am%JatVobM4ci+(My$Jowss0{_x8JlB|>it$i{KOJ(K0h z{f%|J4k;G}1ld35^SnEhwI(b5a(`i8XyvdlQhKtv*#|a$;|;5MAMf&Q_+&%qfkssF zZz#i>tKpm?4sx_K7|^5efWK$Z2`j+D5VA*KJf&xF%#@nIZlpXssK4Y3x>RJ{};+}m7+C^2Lh>k#&nZ%cy5pcphW z(Fy!CkYp%}3@1jni zmZ&O@X_IpiVjB;IpX@c@TyU{<9Em-WMr&kwCS;@xpbVf+!-_FCS1hM)yJUybS5Wqut7IkvXVEH z*Yj0{U>7d{U8g}2mKttO4)Lz*rd4QPq9Ymh=w_rBJrWF%t|BQv|AAU#-10$*TR58W zXAh{8%Ayh!i1Ac6JHDZq!W6sI;Y@TriKV|uK#7u-&zor7`*XHa*ZXx{bYtqCOB)qC zT%VF>e{MNlOwr*Y0=R|eWK57xT85}mZ}QJ66t78Sz2<%1x-qE}y3(fQY^KaoB;+y! z8_sJdW@^B0)2CfpVm8HIDG&+hn`0ZKZALP3w9XJ=oW@g#s$ExIPc&E$x8|O!%OkO5` z%b2x%rDN3}j~KmSghee}iv(f#iuooLP{IZpM4 zVhyWd?CJpBo1KI}r`}UjMX!EV=NDds7e8fhzI1kY=2m<9(e!H_e~*&2hsD|j-tK3} zD{j^LpK_NQ&6*;qKg_;NwjW~Mee5)1zjLw=g#d)D^j!nNdH2|J@`JbQ#k^hTo$uxO zuNB4?1g<~WQJz>*nqFK{-)~!Z`Zbx{sgZm9_eFnZHfA|axJp9x=fIGBf!MaMyfWGG zEp;dIJ5kt@iy%=PUJ#z5^)h$jomdy}&2)w%2OKUg#h5!SJyn@s_-gjBPE%7_UHJ>X%aSI# z@Qk#~rx~jP7Fjx`a#C5OlP7{vI>Y$ilUdd3PM4CO={d^nr}o$I%XkRsy9&I^u5wtD zZjKvuYxB+`$&|@G-5m9LIhnJ(?R0tUwZ2bVdj2k7xzdV|;r&e0{NH(wl3vf=28JPX zKEYiu6pBWXEK?*Z4Hq19hf$2&RMGhdF6#V>#_{G;#jO1;Y&{{v&Vf3W}n literal 0 HcmV?d00001 diff --git a/utils/bandwidthd/patches/010-dont-add-host-paths.patch b/utils/bandwidthd/patches/010-dont-add-host-paths.patch new file mode 100644 index 0000000..59a5737 --- /dev/null +++ b/utils/bandwidthd/patches/010-dont-add-host-paths.patch @@ -0,0 +1,36 @@ +diff --git a/configure b/configure +index 4c2546e..e516137 100755 +--- a/configure ++++ b/configure +@@ -2439,11 +2439,6 @@ if test -n "$x_libraries" && test "x$x_libraries" != xNONE ; then + LDFLAGS="$LDFLAGS -L$x_libraries" + fi + +-# May be equired for BSD +-LDFLAGS="$LDFLAGS -L/usr/local/lib" +- +-CPPFLAGS="$CPPFLAGS -I/usr/local/include" +- + #Check for Darwin sw directory + echo "$as_me:2448: checking for /sw/lib" >&5 + echo $ECHO_N "checking for /sw/lib... $ECHO_C" >&6 +@@ -2505,9 +2500,6 @@ fi + fi + echo "$as_me:2506: result: $ac_cv_file__usr_pkg_lib" >&5 + echo "${ECHO_T}$ac_cv_file__usr_pkg_lib" >&6 +-if test $ac_cv_file__usr_pkg_lib = yes; then +- LDFLAGS="$LDFLAGS -L/usr/pkg/lib" +-fi + + echo "$as_me:2512: checking for /usr/pkg/include" >&5 + echo $ECHO_N "checking for /usr/pkg/include... $ECHO_C" >&6 +@@ -3092,9 +3084,6 @@ fi + fi + echo "$as_me:3093: result: $ac_cv_file__usr_local_pgsql_lib" >&5 + echo "${ECHO_T}$ac_cv_file__usr_local_pgsql_lib" >&6 +-if test $ac_cv_file__usr_local_pgsql_lib = yes; then +- LDFLAGS="$LDFLAGS -L/usr/local/pgsql/lib" +-fi + + echo "$as_me:3099: checking for /usr/local/pgsql/include" >&5 + echo $ECHO_N "checking for /usr/local/pgsql/include... $ECHO_C" >&6 diff --git a/utils/bandwidthd/patches/100-fix_config_file_location b/utils/bandwidthd/patches/100-fix_config_file_location new file mode 100644 index 0000000..ae44cd2 --- /dev/null +++ b/utils/bandwidthd/patches/100-fix_config_file_location @@ -0,0 +1,31 @@ +--- bandwidthd-2.0.1/bandwidthd.c.orig 2008-05-09 10:06:37.000000000 -0500 ++++ bandwidthd-2.0.1/bandwidthd.c 2008-05-09 10:32:54.000000000 -0500 +@@ -255,22 +255,22 @@ + + openlog("bandwidthd", LOG_CONS, LOG_DAEMON); + +- if (stat("./etc/bandwidthd.conf", &StatBuf)) ++ if (stat("/etc/bandwidthd.conf", &StatBuf)) + { + chdir(INSTALL_DIR); +- if (stat("./etc/bandwidthd.conf", &StatBuf)) ++ if (stat("/etc/bandwidthd.conf", &StatBuf)) + { +- printf("Cannot find ./etc/bandwidthd.conf or %s/etc/bandwidthd.conf\n", INSTALL_DIR); +- syslog(LOG_ERR, "Cannot find ./etc/bandwidthd.conf or %s/etc/bandwidthd.conf", INSTALL_DIR); ++ printf("Cannot find /etc/bandwidthd.conf or %s/etc/bandwidthd.conf\n", INSTALL_DIR); ++ syslog(LOG_ERR, "Cannot find /etc/bandwidthd.conf or %s/etc/bandwidthd.conf", INSTALL_DIR); + exit(1); + } + } + +- bdconfig_in = fopen("./etc/bandwidthd.conf", "rt"); ++ bdconfig_in = fopen("/etc/bandwidthd.conf", "rt"); + if (!bdconfig_in) + { + syslog(LOG_ERR, "Cannot open bandwidthd.conf"); +- printf("Cannot open ./etc/bandwidthd.conf\n"); ++ printf("Cannot open /etc/bandwidthd.conf\n"); + exit(1); + } + bdconfig_parse(); diff --git a/utils/bash-completion/Makefile b/utils/bash-completion/Makefile new file mode 100644 index 0000000..fc4ed53 --- /dev/null +++ b/utils/bash-completion/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bash-completion +PKG_VERSION:=20080705 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/b/bash-completion/ +PKG_MD5SUM:=8bc36281bb0567bc67a9083c4c5595a9 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/bash-completion + SECTION:=utils + CATEGORY:=Utilities + TITLE:=bash completion scripts + DEPENDS:=+libncurses +bash + URL:=http://www.caliban.org/bash/ + PKGARCH:=all +endef + +define Package/bash-completion/description + bash completion extends bashs standard completion behavior + to achieve complex command lines with just a few keystrokes. +endef + + +define Build/Configure +endef + + +define Build/Compile +endef + +define Package/bash-completion/install + $(INSTALL_DIR) $(1)/etc/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bash_completion $(1)/etc +endef + +$(eval $(call BuildPackage,bash-completion)) diff --git a/utils/bash/Makefile b/utils/bash/Makefile new file mode 100644 index 0000000..0c6f0d9 --- /dev/null +++ b/utils/bash/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bash +PKG_VERSION:=4.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@GNU/bash +PKG_MD5SUM:=3fb927c7c33022f1c327f14a81c0d4b0 + +include $(INCLUDE_DIR)/package.mk + +define Package/bash + SECTION:=utils + CATEGORY:=Utilities + TITLE:=The GNU Bourne Again SHell + DEPENDS:=+libncurses + URL:=http://www.gnu.org/software/bash/ +endef + +define Package/bash/description + Bash is an sh-compatible command language interpreter that executes + commands read from the standard input or from a file. Bash also + incorporates useful features from the Korn and C shells (ksh and csh). +endef + + +define Build/Configure + $(call Build/Configure/Default, \ + --without-bash-malloc \ + --bindir=/bin \ + ) +endef + + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/builtins LDFLAGS_FOR_BUILD= mkbuiltins + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + SHELL="/bin/bash" \ + all install +endef + +define Package/bash/postinst +#!/bin/sh +grep bash $${IPKG_INSTROOT}/etc/shells || \ + echo "/bin/bash" >> $${IPKG_INSTROOT}/etc/shells + echo "/bin/rbash" >> $${IPKG_INSTROOT}/etc/shells +endef + +define Package/bash/install + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/ + ln -sf bash $(1)/bin/rbash +endef + +$(eval $(call BuildPackage,bash)) + diff --git a/utils/bash/patches/001-compile-fix.patch b/utils/bash/patches/001-compile-fix.patch new file mode 100644 index 0000000..a0d0382 --- /dev/null +++ b/utils/bash/patches/001-compile-fix.patch @@ -0,0 +1,17 @@ +Index: bash-4.2/execute_cmd.c +=================================================================== +--- bash-4.2.orig/execute_cmd.c 2011-07-04 11:16:23.000000000 +0200 ++++ bash-4.2/execute_cmd.c 2011-07-04 11:17:33.000000000 +0200 +@@ -2202,7 +2202,11 @@ + /* If the `lastpipe' option is set with shopt, and job control is not + enabled, execute the last element of non-async pipelines in the + current shell environment. */ +- if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) ++ if (lastpipe_opt && ++#if defined(JOB_CONTROL) ++ job_control == 0 && ++#endif ++ asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) + { + lstdin = move_to_high_fd (0, 0, 255); + if (lstdin > 0) diff --git a/utils/bc/Makefile b/utils/bc/Makefile new file mode 100644 index 0000000..23e5b1c --- /dev/null +++ b/utils/bc/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bc +PKG_VERSION:=1.06.95 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz +PKG_SOURCE_URL:=ftp://ftp.debian.org/debian/pool/main/b/bc +PKG_MD5SUM:=24d0831812d8262b6cac8316b0bac483 + +include $(INCLUDE_DIR)/package.mk + +define Package/bc/Default + SECTION:=utils + CATEGORY:=Utilities + URL:=http://packages.debian.org/bc +endef + +define Package/bc + $(call Package/bc/Default) + TITLE:=Arbitrary precision calculator language + DEPENDS:=+libreadline +endef + +define Package/bc/description + bc is a language that supports arbitrary precision numbers with + interactive execution of statements. +endef + +define Package/dc + $(call Package/bc/Default) + TITLE:=Arbitrary precision reverse-polish calculator + DEPENDS:=bc +endef + +define Package/dc/description + dc is a reverse-polish desk calculator which supports unlimited + precision arithmetic. +endef + +CONFIGURE_ARGS += --with-readline + +define Package/bc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bc/bc $(1)/usr/bin/ +endef + +define Package/dc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dc/dc $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,bc)) +$(eval $(call BuildPackage,dc)) diff --git a/utils/bc/patches/001-disable-doc.patch b/utils/bc/patches/001-disable-doc.patch new file mode 100644 index 0000000..a6ecd6e --- /dev/null +++ b/utils/bc/patches/001-disable-doc.patch @@ -0,0 +1,21 @@ +--- bc-1.06.95/Makefile.in 2010-07-03 10:48:13.422725147 +0000 ++++ bc-1.06.95/Makefile.in 2010-07-03 10:50:09.714725197 +0000 +@@ -149,7 +149,7 @@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +-SUBDIRS = lib bc dc doc ++SUBDIRS = lib bc dc + MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in \ + stamp-h $(distdir).tar.gz h/number.h depcomp missing + +--- bc-1.06.95/Makefile.am 2010-07-03 10:48:32.522725037 +0000 ++++ bc-1.06.95/Makefile.am 2010-07-03 10:48:38.114725024 +0000 +@@ -1,6 +1,6 @@ + ## Process this file with automake to produce Makefile.in + +-SUBDIRS = lib bc dc doc ++SUBDIRS = lib bc dc + + MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in \ + stamp-h $(distdir).tar.gz h/number.h depcomp missing diff --git a/utils/bemused/Makefile b/utils/bemused/Makefile new file mode 100644 index 0000000..5982416 --- /dev/null +++ b/utils/bemused/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bemused-mpd +PKG_VERSION:=r062 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://download.origo.ethz.ch/bemused-lnx-mpdhack/526 +PKG_MD5SUM:=aed8b41aed530e9177e43d9bebad10b7 + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/bemusedlinuxserver + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+bluez-libs +glib1 +mpd +libstdcpp $(ICONV_DEPENDS) + TITLE:=Bemused linux server + URL:=http://bemused-lnx-mpdhack.origo.ethz.ch/ +endef + +define Package/bemusedlinuxserver/description + Bemused is a system which allows you to control your music collection + from your phone, using Bluetooth. + This is the MPD hack version. + Check http://jamse.sourceforge.net/ for a mobile phone client. +endef + +EXTRA_CPPFLAGS:= \ + -I$(STAGING_DIR)/usr/include/glib-1.2 \ + -I$(STAGING_DIR)/usr/lib/glib/include + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \ + LDLIBS="-lbluetooth -lglib -liconv" +endef + +define Package/bemusedlinuxserver/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bemusedlinuxserver $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) ./files/bemused.conf $(1)/etc/bemused.conf + $(INSTALL_CONF) ./files/bemused-bookmarks $(1)/etc/bemused-bookmarks + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/bemused.init $(1)/etc/init.d/bemused +endef + +$(eval $(call BuildPackage,bemusedlinuxserver)) diff --git a/utils/bemused/files/bemused-bookmarks b/utils/bemused/files/bemused-bookmarks new file mode 100644 index 0000000..5f132b5 --- /dev/null +++ b/utils/bemused/files/bemused-bookmarks @@ -0,0 +1,8 @@ +# Bemused stream file +# This is quite a simple format file +# Stream Title = URL +# +# IMPORTANT: stream name MUST contain the ".mp3" extension, else jamse will not display the file! + +UnitedBreaks.mp3 = http://74.52.13.138:8000 +nubreaks.mp3 = http://208.100.38.52:8419 diff --git a/utils/bemused/files/bemused.conf b/utils/bemused/files/bemused.conf new file mode 100644 index 0000000..95acd46 --- /dev/null +++ b/utils/bemused/files/bemused.conf @@ -0,0 +1,43 @@ +# bemused config file Version 1.73 (no changes since 1.71) +# lines with a # at the beinning are for comments and not readen by the bemusedserver +# You only need to set up options which have no default and which ware not optinal + +# this is a mpd-hack version by michu@neophob.com + +# Path to mpd (if mpd is in path only mpd) (default is mpd) +mpddir=/usr/local/bin/mpd + +# channel for what the serial port service is registered (with sdptool look in README) (default 10) +# example: +# root@OpenWrt:~# sdptool browse +# Inquiring ... +# <...> +# Service Name: COM 1 +# Service RecHandle: 0x10005 +# Service Class ID List: +# "Serial Port" (0x1101) +# Protocol Descriptor List: +# "L2CAP" (0x0100) +# "RFCOMM" (0x0003) +# Channel: 3 <<< +# Language Base Attr List: +# code_ISO639: 0x656e +# encoding: 0x6a +# base_offset: 0x100 +channel=3 + +# directorys where the mp3s are. If more than one seperate them by a m semicolon (must be set) +# point this directory to the mpd music directory! +mp3dir=/ + +# bookmarks file for URLs of net radio stations (optional) +bookmarkfile=/etc/bemused-bookmarks + +# speed setting for fast forward and rewind. time for every jump in milliseconds 10000 is default +#fastforbackspeed=10000 + +# set to 1 to use connection over TCP/IP (for bluetooth pan or maybe LAN oder internet) set to 0 for normal rfcomm bluetooth (default) +#tcp=1 + +# port to use if you set tcp to 1 for your incomming TCP/IP Connection. (default is 7654 and at the moment the only one useable by the client on the phone) +#tcpport=7654 diff --git a/utils/bemused/files/bemused.init b/utils/bemused/files/bemused.init new file mode 100644 index 0000000..2a034a4 --- /dev/null +++ b/utils/bemused/files/bemused.init @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=95 + +start() { + /usr/sbin/bemusedlinuxserver -d +} + +stop() { + killall bemusedlinuxserver +} + + \ No newline at end of file diff --git a/utils/bemused/patches/110-missing_includes.patch b/utils/bemused/patches/110-missing_includes.patch new file mode 100644 index 0000000..c049e36 --- /dev/null +++ b/utils/bemused/patches/110-missing_includes.patch @@ -0,0 +1,11 @@ +diff -urN bemused-mpd-r062/main.cpp bemused-mpd-r062.new/main.cpp +--- bemused-mpd-r062/main.cpp 2008-02-23 08:01:38.000000000 +0100 ++++ bemused-mpd-r062.new/main.cpp 2010-03-29 13:00:07.000000000 +0200 +@@ -16,6 +16,7 @@ + ***************************************************************************/ + + #include ++#include + #include + + #include "BemusedServerDlg.h" diff --git a/utils/bemused/patches/200-cxx-compile-fixes.patch b/utils/bemused/patches/200-cxx-compile-fixes.patch new file mode 100644 index 0000000..4a6ef0e --- /dev/null +++ b/utils/bemused/patches/200-cxx-compile-fixes.patch @@ -0,0 +1,71 @@ +Index: bemused-mpd-r062/Makefile +=================================================================== +--- bemused-mpd-r062.orig/Makefile 2008-03-31 09:43:54.000000000 +0200 ++++ bemused-mpd-r062/Makefile 2011-03-06 14:19:07.933096517 +0100 +@@ -1,8 +1,15 @@ +-SHELL = /bin/sh ++LDLIBS = -lbluetooth -lglib -liconv ++CPPFLAGS = -I/usr/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I./ ++CFLAGS = -Os ++CXXFLAGS = -Os + +-#optimized for openwrt use! mylibs should be -lbluetooth, liconv and -lglib +-MYLIBS = -lbluetooth -lglib -liconv +-INCL = -I/usr/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I./ ++%.o: %.c ++ $(CC) -c $(CFLAGS) $(CPPFLAGS) $^ -o $@ + +-bemusedlinuxserver: main.cpp BemusedServerDlg.cpp mpdctrl.c +- $(CXX) -Os -o bemusedlinuxserver $(INCL) $(LDFLAGS) $(MYLIBS) main.cpp BemusedServerDlg.cpp mpdctrl.c libmpdclient.c ++%.o: %.cpp ++ $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $^ -o $@ ++ ++bemusedlinuxserver: main.o BemusedServerDlg.o mpdctrl.o libmpdclient.o ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@ ++ ++all: bemusedlinuxserver +Index: bemused-mpd-r062/libmpdclient.h +=================================================================== +--- bemused-mpd-r062.orig/libmpdclient.h 2008-04-28 23:03:52.000000000 +0200 ++++ bemused-mpd-r062/libmpdclient.h 2011-03-06 14:15:34.821307043 +0100 +@@ -68,11 +68,10 @@ + #define MPD_ACK_ERROR_EXIST 56 + + #include +-#include + +-//#ifdef __cplusplus +-//extern "C" { +-//#endif ++#ifdef __cplusplus ++extern "C" { ++#endif + + typedef enum mpd_TagItems { + MPD_TAG_ITEM_ARTIST, +@@ -654,8 +653,8 @@ void mpd_sendPlaylistAddCommand(mpd_Conn + void mpd_sendPlaylistMoveCommand(mpd_Connection * connection, char *playlist, int from, int to); + + void mpd_sendPlaylistDeleteCommand(mpd_Connection * connection, char *playlist, int pos); +-//#ifdef __cplusplus +-//} +-//#endif ++#ifdef __cplusplus ++} ++#endif + + #endif +Index: bemused-mpd-r062/mpdctrl.c +=================================================================== +--- bemused-mpd-r062.orig/mpdctrl.c 2008-04-28 23:03:52.000000000 +0200 ++++ bemused-mpd-r062/mpdctrl.c 2011-03-06 14:15:34.821307043 +0100 +@@ -59,6 +59,9 @@ + + #define ERROR_DISPLAY 5 + ++#define false 0 ++#define true (!false) ++ + static int l_totalTimeSec; + static int l_elapsedTimeSec; + static int l_bitRate; diff --git a/utils/bluez-hcidump/Makefile b/utils/bluez-hcidump/Makefile new file mode 100644 index 0000000..0385553 --- /dev/null +++ b/utils/bluez-hcidump/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bluez-hcidump +PKG_VERSION:=1.42 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://bluez.sourceforge.net/download +PKG_MD5SUM:=5704737aaf72104eeaf77335218a1827 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/bluez-hcidump + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+bluez-libs + TITLE:=Bluetooth packet analyzer + URL:=http://www.bluez.org/ +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --with-bluez="$(STAGING_DIR)/usr/include" \ + ) +endef + +define Package/bluez-hcidump/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/hcidump $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,bluez-hcidump)) diff --git a/utils/bluez-utils/Makefile b/utils/bluez-utils/Makefile new file mode 100644 index 0000000..876d780 --- /dev/null +++ b/utils/bluez-utils/Makefile @@ -0,0 +1,77 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bluez-utils +PKG_VERSION:=3.36 +PKG_RELEASE:=7 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://bluez.sourceforge.net/download +PKG_MD5SUM:=4fc292b635ba7b442c7aaf5680199012 + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/bluez-utils + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+bluez-libs +libpthread +dbus $(INTL_DEPENDS) $(ICONV_DEPENDS) + TITLE:=Bluetooth utilities + URL:=http://www.bluez.org/ +endef + +define Package/bluez-utils/conffiles +/etc/bluetooth/hcid.conf +/etc/bluetooth/rfcomm.conf +/etc/config/bluetooth +endef + +CONFIGURE_ARGS += \ + --disable-glib \ + --enable-pand \ + --enable-rfcomm \ + --enable-dund \ + --enable-serial \ + --enable-network \ + --enable-usb \ + --enable-input \ + --disable-audio \ + --with-bluez="$(STAGING_DIR)/usr/include" \ + --with-usb=yes \ + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + LDFLAGS="$(TARGET_LDFLAGS) \ + -L$(ICONV_PREFIX)/lib \ + -L$(INTL_PREFIX)/lib" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +#copy bluetooth.conf nach /etc/dbus-1/system.d/ + +define Package/bluez-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/bluetooth + $(CP) $(PKG_INSTALL_DIR)/../hcid/hcid.conf $(1)/etc/bluetooth/ + $(CP) $(PKG_INSTALL_DIR)/../rfcomm/rfcomm.conf $(1)/etc/bluetooth/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/bluetooth.conf $(1)/etc/config/bluetooth + $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/ + $(INSTALL_DATA) ./files/bluetooth.dbus $(1)/etc/dbus-1/system.d/bluetooth.conf + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/bluez-utils.init $(1)/etc/init.d/bluez-utils +endef + +$(eval $(call BuildPackage,bluez-utils)) diff --git a/utils/bluez-utils/files/bluetooth.conf b/utils/bluez-utils/files/bluetooth.conf new file mode 100644 index 0000000..42f390c --- /dev/null +++ b/utils/bluez-utils/files/bluetooth.conf @@ -0,0 +1,32 @@ +config hcid +# option config /etc/bluetooth/hcid.conf + option enabled 1 + +config hciattach + option initspeed 115200 + option tty ttyS1 + option type csr + option speed 115200 + option flow noflow + option enabled 0 + +config rfcomm +# option config /etc/bluetooth/rfcomm.conf + option enabled 0 + +config dund + option listen true + option persist true + option msdun true + option interface dund + option unit 1 + option pppdopts "ktune proxyarp 192.168.1.1:192.168.1.2 ms-dns 192.168.1.1" + option enabled 0 + +config pand + option listen true + option autozap true + option role "NAP" + option master true + option persist true + option enabled 0 diff --git a/utils/bluez-utils/files/bluetooth.dbus b/utils/bluez-utils/files/bluetooth.dbus new file mode 100644 index 0000000..88545fa --- /dev/null +++ b/utils/bluez-utils/files/bluetooth.dbus @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/utils/bluez-utils/files/bluez-utils.init b/utils/bluez-utils/files/bluez-utils.init new file mode 100644 index 0000000..0b32628 --- /dev/null +++ b/utils/bluez-utils/files/bluez-utils.init @@ -0,0 +1,129 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org + +#start after dbus (60) +START=62 + +append_bool() { + local section="$1" + local option="$2" + local value="$3" + local _val + config_get_bool _val "$section" "$option" '0' + [ "$_val" -gt 0 ] && append args "$3" +} + +append_string() { + local section="$1" + local option="$2" + local value="$3" + local default="$4" + local _val + config_get _val "$section" "$option" "$default" + [ -n "$_val" ] && append args "$3 $_val" +} + +hcid_config() { + local cfg="$1" + args="" + append_bool "$cfg" nodaemon "-n" + append_string "$cfg" config "-f" + config_get_bool enabled "$cfg" "enabled" '1' + [ "$enabled" -gt 0 ] && /usr/sbin/hcid $args +} + +hciattach_config() { + local cfg="$1" + args="" + append_string "$cfg" initspeed "-s" "115200" + append_string "$cfg" tty " " "ttyS1" + append_string "$cfg" type " " "csr" + append_string "$cfg" speed " " "115200" + append_string "$cfg" flow " " "noflow" + config_get_bool enabled "$cfg" "enabled" '1' + [ "$enabled" -gt 0 ] && /usr/sbin/hciattach $args +} + +rfcomm_config() { + local cfg="$1" + args="" + append_string "$cfg" config "-f" + config_get_bool enabled "$cfg" "enabled" '1' + [ "$enabled" -gt 0 ] && /usr/bin/rfcomm $args bind all +} + +dund_config() { + local cfg="$1" + args="" + append_bool "$cfg" listen "--listen" + append_string "$cfg" connect "--connect" + append_string "$cfg" mrouter "--mrouter" + append_bool "$cfg" search "--search" + append_string "$cfg" channel "--channel" + append_string "$cfg" device "--device" + append_bool "$cfg" nosdp "--nosdp" + append_bool "$cfg" auth "--auth" + append_bool "$cfg" encrypt "--encrypt" + append_bool "$cfg" secure "--secure" + append_bool "$cfg" master "--master" + append_bool "$cfg" nodetach "--nodetach" + append_bool "$cfg" persist "--persist" + append_string "$cfg" pppd "--pppd" + append_bool "$cfg" msdun "--msdun" + append_bool "$cfg" activesync "--activesync" + append_bool "$cfg" cache "--cache" + + append_string "$cfg" pppdopts "" + config_get ifn "$cfg" interface + if [ -n "$ifn" ]; then + config_get unit "$cfg" unit + [ -z "$unit" ] || append args "unit $unit ipparam $ifn linkname $ifn" + fi + + config_get_bool enabled "$cfg" "enabled" '1' + [ "$enabled" -gt 0 ] && /usr/bin/dund $args +} + +pand_config() { + local cfg="$1" + args="" + append_bool "$cfg" listen "--listen" + append_string "$cfg" connect "--connect" + append_bool "$cfg" autozap "--autozap" + append_bool "$cfg" search "--search" + append_string "$cfg" role "--role" + append_string "$cfg" service "--service" + append_string "$cfg" ethernet "--ethernet" + append_string "$cfg" device "--device" + append_bool "$cfg" nosdp "-D" + append_bool "$cfg" auth "-A" + append_bool "$cfg" encrypt "-E" + append_bool "$cfg" secure "-S" + append_bool "$cfg" master "-M" + append_bool "$cfg" nodetach "-n" + append_bool "$cfg" persist "--persist" + append_bool "$cfg" cache "--cache" + append_string "$cfg" pidfile "--pidfile" + config_get_bool enabled "$cfg" "enabled" '1' + [ "$enabled" -gt 0 ] && /usr/bin/pand $args +} + +start() { + include /lib/network + scan_interfaces + config_load bluetooth + + config_foreach hcid_config hcid + config_foreach hciattach_config hciattach + config_foreach rfcomm_config rfcomm + config_foreach dund_config dund + config_foreach pand_config pand +} + +stop() { + killall dund + killall pand + /usr/bin/rfcomm release all + killall hciattach + killall hcid +} diff --git a/utils/bluez-utils/files/givepin b/utils/bluez-utils/files/givepin new file mode 100644 index 0000000..e52a338 --- /dev/null +++ b/utils/bluez-utils/files/givepin @@ -0,0 +1,14 @@ +#!/bin/sh + +# Write bluetooth PIN number here: +pin= + +if [ -z "$pin" ]; then + msg="Set bluetooth PIN in file $0" + logger -p user.err "$msg" + for i in /dev/pts/* ; do + [ -w $i ] && echo "$msg" > $i + done +else + echo "PIN:$pin" +fi diff --git a/utils/bluez-utils/patches/001-include_limits.patch b/utils/bluez-utils/patches/001-include_limits.patch new file mode 100644 index 0000000..2617306 --- /dev/null +++ b/utils/bluez-utils/patches/001-include_limits.patch @@ -0,0 +1,20 @@ +--- a/hidd/sdp.c ++++ b/hidd/sdp.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + #include + #include +--- a/tools/hciconfig.c ++++ b/tools/hciconfig.c +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #include + #include diff --git a/utils/bluez-utils/patches/002-hcid_pin_helper.patch b/utils/bluez-utils/patches/002-hcid_pin_helper.patch new file mode 100644 index 0000000..c236e4d --- /dev/null +++ b/utils/bluez-utils/patches/002-hcid_pin_helper.patch @@ -0,0 +1,20 @@ +--- a/hcid/hcid.conf ++++ b/hcid/hcid.conf +@@ -12,7 +12,7 @@ + # auto - Use local PIN for incoming connections + # user - Always ask user for a PIN + # +- security user; ++ security auto; + + # Pairing mode + # none - Pairing disabled +@@ -29,7 +29,7 @@ + # Local device name + # %d - device id + # %h - host name +- name "BlueZ (%d)"; ++ name "%h"; + + # Local device class + class 0x000100; diff --git a/utils/bluez-utils/patches/100-enokey.patch b/utils/bluez-utils/patches/100-enokey.patch new file mode 100644 index 0000000..6273e17 --- /dev/null +++ b/utils/bluez-utils/patches/100-enokey.patch @@ -0,0 +1,22 @@ +--- a/input/device.c ++++ b/input/device.c +@@ -25,6 +25,8 @@ + #include + #endif + ++#define ENOKEY 161 /* Required key not available */ ++ + #include + #include + #include +--- a/input/storage.c ++++ b/input/storage.c +@@ -25,6 +25,8 @@ + #include + #endif + ++#define ENOKEY 161 /* Required key not available */ ++ + #include + #include + #include diff --git a/utils/bluez-utils/patches/200-uart-speed.patch b/utils/bluez-utils/patches/200-uart-speed.patch new file mode 100644 index 0000000..cb7d0e8 --- /dev/null +++ b/utils/bluez-utils/patches/200-uart-speed.patch @@ -0,0 +1,40 @@ +--- a/tools/hciattach.c ++++ b/tools/hciattach.c +@@ -111,20 +111,37 @@ + return B230400; + case 460800: + return B460800; ++/* FIX: Not all platform support this high serial speed ++ claudyus84 @gamil.com ++*/ ++#ifdef B500000 + case 500000: + return B500000; ++#endif ++#ifdef B576000 + case 576000: + return B576000; ++#endif ++#ifdef B921600 + case 921600: + return B921600; ++#endif ++#ifdef B1000000 + case 1000000: + return B1000000; ++#endif ++#ifdef B1152000 + case 1152000: + return B1152000; ++#endif ++#ifdef B1500000 + case 1500000: + return B1500000; ++#endif ++#ifdef B2000000 + case 2000000: + return B2000000; ++#endif + #ifdef B2500000 + case 2500000: + return B2500000; diff --git a/utils/broadcom-sdhc/Makefile b/utils/broadcom-sdhc/Makefile new file mode 100644 index 0000000..a2632cb --- /dev/null +++ b/utils/broadcom-sdhc/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# +# High Capacity Media card driver. Handles high capacity and standard multimedia +# and secure digital cards +# +# This makefile is compatible for building under the kamikaze 8.09 branch +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=broadcom-sdhc +PKG_VERSION:=2.0.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.4mul8.ca/openwrt/source/broadcom-sdhc-2.0.2 +PKG_MD5SUM:=6238463bce27e64829eda1d88f1a7edd + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/broadcom-sdhc + SUBMENU:=Other modules + DEPENDS:=@TARGET_brcm_2_4 + TITLE:= MMHC/SDHC card driver - Linksys WRT54G/GS/GL + VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_VERSION)-$(PKG_RELEASE) + FILES:=\ + $(PKG_BUILD_DIR)/sdhc.$(LINUX_KMOD_SUFFIX)\ + $(PKG_BUILD_DIR)/sdhcd.$(LINUX_KMOD_SUFFIX) + URL:=http://www.4mul8.ca/openwrt +endef + +define KernelPackage/broadcom-sdhc/description + Driver for Linksys WRT54G/GS/GL MM/SD card modification. + Supports standard and high capacity cards. + May work for other broadcom based routers (Buffalo, etc). +endef + +define Build/Compile + $(MAKE) -C "$(LINUX_DIR)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH="$(LINUX_KARCH)" \ + SUBDIRS="$(PKG_BUILD_DIR)" \ + modules +endef + +define KernelPackage/broadcom-sdhc/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sdcard $(1)/etc/init.d/sdcard + $(INSTALL_DATA) $(PKG_BUILD_DIR)/sdcard.conf $(1)/etc/sdcard.conf + $(CP) $(PKG_BUILD_DIR)/sdhc.o $(1)/lib/modules/$(LINUX_VERSION)/ + $(CP) $(PKG_BUILD_DIR)/sdhcd.o $(1)/lib/modules/$(LINUX_VERSION)/ +endef + +$(eval $(call KernelPackage,broadcom-sdhc)) diff --git a/utils/btrfs-progs/Makefile b/utils/btrfs-progs/Makefile new file mode 100644 index 0000000..4e173d7 --- /dev/null +++ b/utils/btrfs-progs/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=btrfs-progs +PKG_VERSION:=0.19 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.kernel.org/pub/linux/kernel/people/mason/btrfs/ +PKG_MD5SUM:=69e29ecd922e3f9dcb74a3a8f80b4f68 + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/btrfs-progs + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Filesystem + DEPENDS:=@!LINUX_2_4 +libuuid +zlib + TITLE:=Btrfs filesystems utilities + URL:=http://btrfs.wiki.kernel.org/ +endef + +define Package/btrfs-progs/description + Btrfs is a new copy on write filesystem for Linux aimed at implementing + advanced features while focusing on fault tolerance, repair and easy + administration. Initially developed by Oracle, Btrfs is licensed under the + GPL and open for contribution from anyone. +endef + +progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck + +MAKE_FLAGS+=\ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + prefix=/usr \ + DESTDIR=$(PKG_INSTALL_DIR) + +define Package/btrfs-progs/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(addprefix $(PKG_INSTALL_DIR)/usr/bin/, $(progs)) $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/btrfs-scan.init $(1)/etc/init.d/btrfs-scan +endef + +$(eval $(call BuildPackage,btrfs-progs)) diff --git a/utils/btrfs-progs/files/btrfs-scan.init b/utils/btrfs-progs/files/btrfs-scan.init new file mode 100644 index 0000000..f1264ee --- /dev/null +++ b/utils/btrfs-progs/files/btrfs-scan.init @@ -0,0 +1,9 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009 OpenWrt.org + +START=19 + +start() { + grep -q btrfs /proc/modules && /usr/bin/btrfsctl -a +} + diff --git a/utils/btrfs-progs/patches/001-Makefile-gcc-fix b/utils/btrfs-progs/patches/001-Makefile-gcc-fix new file mode 100644 index 0000000..37da622 --- /dev/null +++ b/utils/btrfs-progs/patches/001-Makefile-gcc-fix @@ -0,0 +1,53 @@ +diff --git a/Makefile b/Makefile +index 8097b5a..63a734b 100644 +--- a/Makefile ++++ b/Makefile +@@ -36,37 +36,37 @@ version: + bash version.sh + + btrfsctl: $(objects) btrfsctl.o +- gcc $(CFLAGS) -o btrfsctl btrfsctl.o $(objects) $(LDFLAGS) $(LIBS) ++ $(CC) $(CFLAGS) -o btrfsctl btrfsctl.o $(objects) $(LDFLAGS) $(LIBS) + + btrfs-vol: $(objects) btrfs-vol.o +- gcc $(CFLAGS) -o btrfs-vol btrfs-vol.o $(objects) $(LDFLAGS) $(LIBS) ++ $(CC) $(CFLAGS) -o btrfs-vol btrfs-vol.o $(objects) $(LDFLAGS) $(LIBS) + + btrfs-show: $(objects) btrfs-show.o +- gcc $(CFLAGS) -o btrfs-show btrfs-show.o $(objects) $(LDFLAGS) $(LIBS) ++ $(CC) $(CFLAGS) -o btrfs-show btrfs-show.o $(objects) $(LDFLAGS) $(LIBS) + + btrfsck: $(objects) btrfsck.o +- gcc $(CFLAGS) -o btrfsck btrfsck.o $(objects) $(LDFLAGS) $(LIBS) ++ $(CC) $(CFLAGS) -o btrfsck btrfsck.o $(objects) $(LDFLAGS) $(LIBS) + + mkfs.btrfs: $(objects) mkfs.o +- gcc $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS) ++ $(CC) $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS) + + btrfs-debug-tree: $(objects) debug-tree.o +- gcc $(CFLAGS) -o btrfs-debug-tree $(objects) debug-tree.o $(LDFLAGS) $(LIBS) ++ $(CC) $(CFLAGS) -o btrfs-debug-tree $(objects) debug-tree.o $(LDFLAGS) $(LIBS) + + btrfstune: $(objects) btrfstune.o +- gcc $(CFLAGS) -o btrfstune $(objects) btrfstune.o $(LDFLAGS) $(LIBS) ++ $(CC) $(CFLAGS) -o btrfstune $(objects) btrfstune.o $(LDFLAGS) $(LIBS) + + btrfs-image: $(objects) btrfs-image.o +- gcc $(CFLAGS) -o btrfs-image $(objects) btrfs-image.o -lpthread -lz $(LDFLAGS) $(LIBS) ++ $(CC) $(CFLAGS) -o btrfs-image $(objects) btrfs-image.o -lpthread -lz $(LDFLAGS) $(LIBS) + + dir-test: $(objects) dir-test.o +- gcc $(CFLAGS) -o dir-test $(objects) dir-test.o $(LDFLAGS) $(LIBS) ++ $(CC) $(CFLAGS) -o dir-test $(objects) dir-test.o $(LDFLAGS) $(LIBS) + + quick-test: $(objects) quick-test.o +- gcc $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS) ++ $(CC) $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS) + + convert: $(objects) convert.o +- gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs $(LDFLAGS) $(LIBS) ++ $(CC) $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs $(LDFLAGS) $(LIBS) + + manpages: + cd man; make diff --git a/utils/bzip2/Makefile b/utils/bzip2/Makefile new file mode 100644 index 0000000..a9d58a5 --- /dev/null +++ b/utils/bzip2/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bzip2 +PKG_VERSION:=1.0.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.bzip.org/$(PKG_VERSION) +PKG_MD5SUM:=00b516f4704d4a7cb50a1d97e6e8e15b + +include $(INCLUDE_DIR)/package.mk + +define Package/bzip2 + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:= + TITLE:=bzip2 is a compression utility. + URL:=http://www.bzip.org/ +endef + +define Package/bzip2/description + bzip2 is a freely available, patent free, high-quality + data compressor. +endef + +TARGET_CFLAGS += $(FPIC) +CONFIGURE_ARGS += --prefix=/usr + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDLAGS)" \ + bzip2 \ + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/bzlib.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/libbz2.a $(1)/usr/lib/ +endef + +define Package/bzip2/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,bzip2)) diff --git a/utils/calvaria/Makefile b/utils/calvaria/Makefile new file mode 100644 index 0000000..f8574fa --- /dev/null +++ b/utils/calvaria/Makefile @@ -0,0 +1,40 @@ +# +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=calvaria +PKG_RELEASE:=1 + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/calvaria + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Maemo CAL partition access tool + MAINTAINER:=Michael Buesch +endef + +define Package/calvaria/description + Calvaria - Maemo CAL partition variable access tool + The CAL partition (/dev/mtdblock1) is used to store configuration + and calibration data. +endef + +define Build/Prepare + $(CP) ./files/src/* $(PKG_BUILD_DIR)/ +endef + +define Package/calvaria/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/calvaria $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cal2p54 $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,calvaria)) diff --git a/utils/calvaria/files/src/Makefile b/utils/calvaria/files/src/Makefile new file mode 100644 index 0000000..6d42bf1 --- /dev/null +++ b/utils/calvaria/files/src/Makefile @@ -0,0 +1,32 @@ +DESTDIR ?= +PREFIX ?= /usr +CFLAGS ?= -O2 -Wall +LDFLAGS ?= +LDLIBS ?= + +STRIP ?= strip +INSTALL ?= install + +CALVARIA_BIN := calvaria +CAL2P54_BIN := cal2p54 + +all: $(CALVARIA_BIN) $(CAL2P54_BIN) + +$(CALVARIA_BIN): calvaria.o + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@ + $(STRIP) $@ + +$(CAL2P54_BIN): cal2p54.o + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@ + $(STRIP) $@ + +%.o: %.c + $(CC) -c $(CFLAGS) $^ -o $@ + +install: $(CALVARIA_BIN) $(CAL2P54_BIN) + $(INSTALL) -d $(DESTDIR)/$(PREFIX)/bin + $(INSTALL) -m 0755 $(CALVARIA_BIN) $(DESTDIR)/$(PREFIX)/bin/ + $(INSTALL) -m 0755 $(CAL2P54_BIN) $(DESTDIR)/$(PREFIX)/bin/ + +clean: + rm -f $(CALVARIA_BIN) $(CAL2P54_BIN) *.o diff --git a/utils/calvaria/files/src/cal2p54.c b/utils/calvaria/files/src/cal2p54.c new file mode 100644 index 0000000..cac4436 --- /dev/null +++ b/utils/calvaria/files/src/cal2p54.c @@ -0,0 +1,940 @@ +/* + * cal2p54 - CAL to p54spi EEPROM converter + * + * Copyright (c) 2011 Michael Buesch + * + * Licensed under the GNU General Public License version 2. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Template data from Linux p54spi_eeprom.h: + * + * Copyright (C) 2003 Conexant Americas Inc. All Rights Reserved. + * Copyright (C) 2004, 2005, 2006 Nokia Corporation + * Copyright 2008 Johannes Berg + * Copyright 2008 Christian Lamparter + * + * based on: + * - cx3110x's pda.h from Nokia + * - cx3110-transfer.log by Johannes Berg + */ + +static const uint8_t template_eeprom_pda_wrap[] = { + /* struct eeprom_pda_wrap */ + 0x47, 0x4d, 0x55, 0xaa, /* magic */ + 0x00, 0x00, /* pad */ + 0x00, 0x00, /* eeprom_pda_data_wrap length */ + 0x00, 0x00, 0x00, 0x00, /* arm opcode */ +}; + +static const uint8_t template_mac_address[] = { + /* bogus MAC address */ + 0x04, 0x00, 0x01, 0x01, /* PDR_MAC_ADDRESS */ + 0x00, 0x02, 0xee, 0xc0, 0xff, 0xee, +}; + +static const uint8_t template_bootrec_exp_if[] = { + /* struct bootrec_exp_if */ + 0x06, 0x00, 0x01, 0x10, /* PDR_INTERFACE_LIST */ + 0x00, 0x00, /* role */ + 0x0f, 0x00, /* if_id */ + 0x85, 0x00, /* variant = Longbow RF, 2GHz */ + 0x01, 0x00, /* btm_compat */ + 0x1f, 0x00, /* top_compat */ + + 0x03, 0x00, 0x02, 0x10, /* PDR_HARDWARE_PLATFORM_COMPONENT_ID */ + 0x03, 0x20, 0x00, 0x43, +}; + +static const uint8_t template_pda_country_list[] = { + /* struct pda_country[6] */ + 0x0d, 0x00, 0x07, 0x10, /* PDR_COUNTRY_LIST */ + 0x10, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, + 0x31, 0x00, 0x00, 0x00, + 0x32, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, +}; + +static const uint8_t template_pda_country[] = { + /* struct pda_country */ + 0x03, 0x00, 0x08, 0x10, /* PDR_DEFAULT_COUNTRY */ + 0x30, 0x00, 0x00, 0x00, /* ETSI */ +}; + +static const uint8_t template_antenna_gain[] = { + 0x03, 0x00, 0x00, 0x11, /* PDR_ANTENNA_GAIN */ + 0x08, 0x08, 0x08, 0x08, +}; + +static const uint8_t template_rssi_linear_approx_custom2[] = { + 0x0a, 0x00, 0xff, 0xca, /* PDR_RSSI_LINEAR_APPROXIMATION_CUSTOMV2 */ + 0x01, 0x00, 0x0a, 0x00, + 0x00, 0x00, 0x0a, 0x00, + 0x85, 0x09, 0x0a, 0x01, 0x72, 0xfe, 0x1a, 0x00, 0x00, 0x00, +}; + +static const uint8_t template_pa_cal_curve[] = { + /* struct pda_custom_wrapper */ + 0x10, 0x06, 0x5d, 0xb0, /* PDR_PRISM_PA_CAL_CURVE_DATA_CUSTOM */ + 0x0d, 0x00, 0xee, 0x00, /* 13 entries, 238 bytes per entry */ + 0x00, 0x00, 0x16, 0x0c, /* no offset, 3094 total len */ + /* 2412 MHz */ + 0x6c, 0x09, + 0x10, 0x01, 0x9a, 0x84, + 0xaa, 0x8a, 0xaa, 0x8a, 0xaa, 0x8a, 0xaa, 0x8a, + 0x3c, 0xb6, 0x3c, 0xb6, 0x3c, 0xb6, 0x3c, 0xb6, + 0x3c, 0xb6, 0x3c, 0xb6, 0x3c, 0xb6, 0x3c, 0xb6, + 0xf0, 0x00, 0x94, 0x6c, + 0x99, 0x82, 0x99, 0x82, 0x99, 0x82, 0x99, 0x82, + 0x2b, 0xae, 0x2b, 0xae, 0x2b, 0xae, 0x2b, 0xae, + 0x2b, 0xae, 0x2b, 0xae, 0x2b, 0xae, 0x2b, 0xae, + 0xd0, 0x00, 0xaa, 0x5a, + 0x88, 0x7a, 0x88, 0x7a, 0x88, 0x7a, 0x88, 0x7a, + 0x1a, 0xa6, 0x1a, 0xa6, 0x1a, 0xa6, 0x1a, 0xa6, + 0x1a, 0xa6, 0x1a, 0xa6, 0x1a, 0xa6, 0x1a, 0xa6, + 0xa0, 0x00, 0xf3, 0x47, + 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, + 0x00, 0x9a, 0x00, 0x9a, 0x00, 0x9a, 0x00, 0x9a, + 0x00, 0x9a, 0x00, 0x9a, 0x00, 0x9a, 0x00, 0x9a, + 0x50, 0x00, 0x59, 0x36, + 0x43, 0x5a, 0x43, 0x5a, 0x43, 0x5a, 0x43, 0x5a, + 0xd5, 0x85, 0xd5, 0x85, 0xd5, 0x85, 0xd5, 0x85, + 0xd5, 0x85, 0xd5, 0x85, 0xd5, 0x85, 0xd5, 0x85, + 0x00, 0x00, 0xe4, 0x2d, + 0x18, 0x46, 0x18, 0x46, 0x18, 0x46, 0x18, 0x46, + 0xaa, 0x71, 0xaa, 0x71, 0xaa, 0x71, 0xaa, 0x71, + 0xaa, 0x71, 0xaa, 0x71, 0xaa, 0x71, 0xaa, 0x71, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x00, + + /* 2417 MHz */ + 0x71, 0x09, + 0x10, 0x01, 0xb9, 0x83, + 0x7d, 0x8a, 0x7d, 0x8a, 0x7d, 0x8a, 0x7d, 0x8a, + 0x0f, 0xb6, 0x0f, 0xb6, 0x0f, 0xb6, 0x0f, 0xb6, + 0x0f, 0xb6, 0x0f, 0xb6, 0x0f, 0xb6, 0x0f, 0xb6, + 0xf0, 0x00, 0x2e, 0x6c, + 0x68, 0x82, 0x68, 0x82, 0x68, 0x82, 0x68, 0x82, + 0xfa, 0xad, 0xfa, 0xad, 0xfa, 0xad, 0xfa, 0xad, + 0xfa, 0xad, 0xfa, 0xad, 0xfa, 0xad, 0xfa, 0xad, + 0xd0, 0x00, 0x8d, 0x5a, + 0x52, 0x7a, 0x52, 0x7a, 0x52, 0x7a, 0x52, 0x7a, + 0xe4, 0xa5, 0xe4, 0xa5, 0xe4, 0xa5, 0xe4, 0xa5, + 0xe4, 0xa5, 0xe4, 0xa5, 0xe4, 0xa5, 0xe4, 0xa5, + 0xa0, 0x00, 0x0a, 0x48, + 0x32, 0x6e, 0x32, 0x6e, 0x32, 0x6e, 0x32, 0x6e, + 0xc4, 0x99, 0xc4, 0x99, 0xc4, 0x99, 0xc4, 0x99, + 0xc4, 0x99, 0xc4, 0x99, 0xc4, 0x99, 0xc4, 0x99, + 0x50, 0x00, 0x7c, 0x36, + 0xfc, 0x59, 0xfc, 0x59, 0xfc, 0x59, 0xfc, 0x59, + 0x8e, 0x85, 0x8e, 0x85, 0x8e, 0x85, 0x8e, 0x85, + 0x8e, 0x85, 0x8e, 0x85, 0x8e, 0x85, 0x8e, 0x85, + 0x00, 0x00, 0xf5, 0x2d, + 0xc6, 0x45, 0xc6, 0x45, 0xc6, 0x45, 0xc6, 0x45, + 0x58, 0x71, 0x58, 0x71, 0x58, 0x71, 0x58, 0x71, + 0x58, 0x71, 0x58, 0x71, 0x58, 0x71, 0x58, 0x71, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x00, + + /* 2422 MHz */ + 0x76, 0x09, + 0x10, 0x01, 0xb9, 0x83, + 0x7d, 0x8a, 0x7d, 0x8a, 0x7d, 0x8a, 0x7d, 0x8a, + 0x0f, 0xb6, 0x0f, 0xb6, 0x0f, 0xb6, 0x0f, 0xb6, + 0x0f, 0xb6, 0x0f, 0xb6, 0x0f, 0xb6, 0x0f, 0xb6, + 0xf0, 0x00, 0x2e, 0x6c, + 0x68, 0x82, 0x68, 0x82, 0x68, 0x82, 0x68, 0x82, + 0xfa, 0xad, 0xfa, 0xad, 0xfa, 0xad, 0xfa, 0xad, + 0xfa, 0xad, 0xfa, 0xad, 0xfa, 0xad, 0xfa, 0xad, + 0xd0, 0x00, 0x8d, 0x5a, + 0x52, 0x7a, 0x52, 0x7a, 0x52, 0x7a, 0x52, 0x7a, + 0xe4, 0xa5, 0xe4, 0xa5, 0xe4, 0xa5, 0xe4, 0xa5, + 0xe4, 0xa5, 0xe4, 0xa5, 0xe4, 0xa5, 0xe4, 0xa5, + 0xa0, 0x00, 0x0a, 0x48, + 0x32, 0x6e, 0x32, 0x6e, 0x32, 0x6e, 0x32, 0x6e, + 0xc4, 0x99, 0xc4, 0x99, 0xc4, 0x99, 0xc4, 0x99, + 0xc4, 0x99, 0xc4, 0x99, 0xc4, 0x99, 0xc4, 0x99, + 0x50, 0x00, 0x7c, 0x36, + 0xfc, 0x59, 0xfc, 0x59, 0xfc, 0x59, 0xfc, 0x59, + 0x8e, 0x85, 0x8e, 0x85, 0x8e, 0x85, 0x8e, 0x85, + 0x8e, 0x85, 0x8e, 0x85, 0x8e, 0x85, 0x8e, 0x85, + 0x00, 0x00, 0xf5, 0x2d, + 0xc6, 0x45, 0xc6, 0x45, 0xc6, 0x45, 0xc6, 0x45, + 0x58, 0x71, 0x58, 0x71, 0x58, 0x71, 0x58, 0x71, + 0x58, 0x71, 0x58, 0x71, 0x58, 0x71, 0x58, 0x71, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x00, + + /* 2427 MHz */ + 0x7b, 0x09, + 0x10, 0x01, 0x48, 0x83, + 0x67, 0x8a, 0x67, 0x8a, 0x67, 0x8a, 0x67, 0x8a, + 0xf9, 0xb5, 0xf9, 0xb5, 0xf9, 0xb5, 0xf9, 0xb5, + 0xf9, 0xb5, 0xf9, 0xb5, 0xf9, 0xb5, 0xf9, 0xb5, + 0xf0, 0x00, 0xfb, 0x6b, + 0x50, 0x82, 0x50, 0x82, 0x50, 0x82, 0x50, 0x82, + 0xe2, 0xad, 0xe2, 0xad, 0xe2, 0xad, 0xe2, 0xad, + 0xe2, 0xad, 0xe2, 0xad, 0xe2, 0xad, 0xe2, 0xad, + 0xd0, 0x00, 0x7e, 0x5a, + 0x38, 0x7a, 0x38, 0x7a, 0x38, 0x7a, 0x38, 0x7a, + 0xca, 0xa5, 0xca, 0xa5, 0xca, 0xa5, 0xca, 0xa5, + 0xca, 0xa5, 0xca, 0xa5, 0xca, 0xa5, 0xca, 0xa5, + 0xa0, 0x00, 0x15, 0x48, + 0x14, 0x6e, 0x14, 0x6e, 0x14, 0x6e, 0x14, 0x6e, + 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, + 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, 0xa6, 0x99, + 0x50, 0x00, 0x8e, 0x36, + 0xd9, 0x59, 0xd9, 0x59, 0xd9, 0x59, 0xd9, 0x59, + 0x6b, 0x85, 0x6b, 0x85, 0x6b, 0x85, 0x6b, 0x85, + 0x6b, 0x85, 0x6b, 0x85, 0x6b, 0x85, 0x6b, 0x85, + 0x00, 0x00, 0xfe, 0x2d, + 0x9d, 0x45, 0x9d, 0x45, 0x9d, 0x45, 0x9d, 0x45, + 0x2f, 0x71, 0x2f, 0x71, 0x2f, 0x71, 0x2f, 0x71, + 0x2f, 0x71, 0x2f, 0x71, 0x2f, 0x71, 0x2f, 0x71, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x00, + + /* 2432 MHz */ + 0x80, 0x09, + 0x10, 0x01, 0xd7, 0x82, + 0x51, 0x8a, 0x51, 0x8a, 0x51, 0x8a, 0x51, 0x8a, + 0xe3, 0xb5, 0xe3, 0xb5, 0xe3, 0xb5, 0xe3, 0xb5, + 0xe3, 0xb5, 0xe3, 0xb5, 0xe3, 0xb5, 0xe3, 0xb5, + 0xf0, 0x00, 0xc8, 0x6b, + 0x37, 0x82, 0x37, 0x82, 0x37, 0x82, 0x37, 0x82, + 0xc9, 0xad, 0xc9, 0xad, 0xc9, 0xad, 0xc9, 0xad, + 0xc9, 0xad, 0xc9, 0xad, 0xc9, 0xad, 0xc9, 0xad, + 0xd0, 0x00, 0x6f, 0x5a, + 0x1d, 0x7a, 0x1d, 0x7a, 0x1d, 0x7a, 0x1d, 0x7a, + 0xaf, 0xa5, 0xaf, 0xa5, 0xaf, 0xa5, 0xaf, 0xa5, + 0xaf, 0xa5, 0xaf, 0xa5, 0xaf, 0xa5, 0xaf, 0xa5, + 0xa0, 0x00, 0x20, 0x48, + 0xf6, 0x6d, 0xf6, 0x6d, 0xf6, 0x6d, 0xf6, 0x6d, + 0x88, 0x99, 0x88, 0x99, 0x88, 0x99, 0x88, 0x99, + 0x88, 0x99, 0x88, 0x99, 0x88, 0x99, 0x88, 0x99, + 0x50, 0x00, 0x9f, 0x36, + 0xb5, 0x59, 0xb5, 0x59, 0xb5, 0x59, 0xb5, 0x59, + 0x47, 0x85, 0x47, 0x85, 0x47, 0x85, 0x47, 0x85, + 0x47, 0x85, 0x47, 0x85, 0x47, 0x85, 0x47, 0x85, + 0x00, 0x00, 0x06, 0x2e, + 0x74, 0x45, 0x74, 0x45, 0x74, 0x45, 0x74, 0x45, + 0x06, 0x71, 0x06, 0x71, 0x06, 0x71, 0x06, 0x71, + 0x06, 0x71, 0x06, 0x71, 0x06, 0x71, 0x06, 0x71, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x00, + + /* 2437 MHz */ + 0x85, 0x09, + 0x10, 0x01, 0x67, 0x82, + 0x3a, 0x8a, 0x3a, 0x8a, 0x3a, 0x8a, 0x3a, 0x8a, + 0xcc, 0xb5, 0xcc, 0xb5, 0xcc, 0xb5, 0xcc, 0xb5, + 0xcc, 0xb5, 0xcc, 0xb5, 0xcc, 0xb5, 0xcc, 0xb5, + 0xf0, 0x00, 0x95, 0x6b, + 0x1f, 0x82, 0x1f, 0x82, 0x1f, 0x82, 0x1f, 0x82, + 0xb1, 0xad, 0xb1, 0xad, 0xb1, 0xad, 0xb1, 0xad, + 0xb1, 0xad, 0xb1, 0xad, 0xb1, 0xad, 0xb1, 0xad, + 0xd0, 0x00, 0x61, 0x5a, + 0x02, 0x7a, 0x02, 0x7a, 0x02, 0x7a, 0x02, 0x7a, + 0x94, 0xa5, 0x94, 0xa5, 0x94, 0xa5, 0x94, 0xa5, + 0x94, 0xa5, 0x94, 0xa5, 0x94, 0xa5, 0x94, 0xa5, + 0xa0, 0x00, 0x2c, 0x48, + 0xd8, 0x6d, 0xd8, 0x6d, 0xd8, 0x6d, 0xd8, 0x6d, + 0x6a, 0x99, 0x6a, 0x99, 0x6a, 0x99, 0x6a, 0x99, + 0x6a, 0x99, 0x6a, 0x99, 0x6a, 0x99, 0x6a, 0x99, + 0x50, 0x00, 0xb1, 0x36, + 0x92, 0x59, 0x92, 0x59, 0x92, 0x59, 0x92, 0x59, + 0x24, 0x85, 0x24, 0x85, 0x24, 0x85, 0x24, 0x85, + 0x24, 0x85, 0x24, 0x85, 0x24, 0x85, 0x24, 0x85, + 0x00, 0x00, 0x0f, 0x2e, + 0x4b, 0x45, 0x4b, 0x45, 0x4b, 0x45, 0x4b, 0x45, + 0xdd, 0x70, 0xdd, 0x70, 0xdd, 0x70, 0xdd, 0x70, + 0xdd, 0x70, 0xdd, 0x70, 0xdd, 0x70, 0xdd, 0x70, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x00, + + /* 2442 MHz */ + 0x8a, 0x09, + 0x10, 0x01, 0xf6, 0x81, + 0x24, 0x8a, 0x24, 0x8a, 0x24, 0x8a, 0x24, 0x8a, + 0xb6, 0xb5, 0xb6, 0xb5, 0xb6, 0xb5, 0xb6, 0xb5, + 0xb6, 0xb5, 0xb6, 0xb5, 0xb6, 0xb5, 0xb6, 0xb5, + 0xf0, 0x00, 0x62, 0x6b, + 0x06, 0x82, 0x06, 0x82, 0x06, 0x82, 0x06, 0x82, + 0x98, 0xad, 0x98, 0xad, 0x98, 0xad, 0x98, 0xad, + 0x98, 0xad, 0x98, 0xad, 0x98, 0xad, 0x98, 0xad, + 0xd0, 0x00, 0x52, 0x5a, + 0xe7, 0x79, 0xe7, 0x79, 0xe7, 0x79, 0xe7, 0x79, + 0x79, 0xa5, 0x79, 0xa5, 0x79, 0xa5, 0x79, 0xa5, + 0x79, 0xa5, 0x79, 0xa5, 0x79, 0xa5, 0x79, 0xa5, + 0xa0, 0x00, 0x37, 0x48, + 0xba, 0x6d, 0xba, 0x6d, 0xba, 0x6d, 0xba, 0x6d, + 0x4c, 0x99, 0x4c, 0x99, 0x4c, 0x99, 0x4c, 0x99, + 0x4c, 0x99, 0x4c, 0x99, 0x4c, 0x99, 0x4c, 0x99, + 0x50, 0x00, 0xc2, 0x36, + 0x6e, 0x59, 0x6e, 0x59, 0x6e, 0x59, 0x6e, 0x59, + 0x00, 0x85, 0x00, 0x85, 0x00, 0x85, 0x00, 0x85, + 0x00, 0x85, 0x00, 0x85, 0x00, 0x85, 0x00, 0x85, + 0x00, 0x00, 0x17, 0x2e, + 0x22, 0x45, 0x22, 0x45, 0x22, 0x45, 0x22, 0x45, + 0xb4, 0x70, 0xb4, 0x70, 0xb4, 0x70, 0xb4, 0x70, + 0xb4, 0x70, 0xb4, 0x70, 0xb4, 0x70, 0xb4, 0x70, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x00, + + /* 2447 MHz */ + 0x8f, 0x09, + 0x10, 0x01, 0x75, 0x83, + 0x61, 0x8a, 0x61, 0x8a, 0x61, 0x8a, 0x61, 0x8a, + 0xf3, 0xb5, 0xf3, 0xb5, 0xf3, 0xb5, 0xf3, 0xb5, + 0xf3, 0xb5, 0xf3, 0xb5, 0xf3, 0xb5, 0xf3, 0xb5, + 0xf0, 0x00, 0x4b, 0x6c, + 0x3f, 0x82, 0x3f, 0x82, 0x3f, 0x82, 0x3f, 0x82, + 0xd1, 0xad, 0xd1, 0xad, 0xd1, 0xad, 0xd1, 0xad, + 0xd1, 0xad, 0xd1, 0xad, 0xd1, 0xad, 0xd1, 0xad, + 0xd0, 0x00, 0xda, 0x5a, + 0x1c, 0x7a, 0x1c, 0x7a, 0x1c, 0x7a, 0x1c, 0x7a, + 0xae, 0xa5, 0xae, 0xa5, 0xae, 0xa5, 0xae, 0xa5, + 0xae, 0xa5, 0xae, 0xa5, 0xae, 0xa5, 0xae, 0xa5, + 0xa0, 0x00, 0x6d, 0x48, + 0xe9, 0x6d, 0xe9, 0x6d, 0xe9, 0x6d, 0xe9, 0x6d, + 0x7b, 0x99, 0x7b, 0x99, 0x7b, 0x99, 0x7b, 0x99, + 0x7b, 0x99, 0x7b, 0x99, 0x7b, 0x99, 0x7b, 0x99, + 0x50, 0x00, 0xc6, 0x36, + 0x92, 0x59, 0x92, 0x59, 0x92, 0x59, 0x92, 0x59, + 0x24, 0x85, 0x24, 0x85, 0x24, 0x85, 0x24, 0x85, + 0x24, 0x85, 0x24, 0x85, 0x24, 0x85, 0x24, 0x85, + 0x00, 0x00, 0x15, 0x2e, + 0x3c, 0x45, 0x3c, 0x45, 0x3c, 0x45, 0x3c, 0x45, + 0xce, 0x70, 0xce, 0x70, 0xce, 0x70, 0xce, 0x70, + 0xce, 0x70, 0xce, 0x70, 0xce, 0x70, 0xce, 0x70, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x00, + + /* 2452 MHz */ + 0x94, 0x09, + 0x10, 0x01, 0xf4, 0x84, + 0x9e, 0x8a, 0x9e, 0x8a, 0x9e, 0x8a, 0x9e, 0x8a, + 0x30, 0xb6, 0x30, 0xb6, 0x30, 0xb6, 0x30, 0xb6, + 0x30, 0xb6, 0x30, 0xb6, 0x30, 0xb6, 0x30, 0xb6, + 0xf0, 0x00, 0x34, 0x6d, + 0x77, 0x82, 0x77, 0x82, 0x77, 0x82, 0x77, 0x82, + 0x09, 0xae, 0x09, 0xae, 0x09, 0xae, 0x09, 0xae, + 0x09, 0xae, 0x09, 0xae, 0x09, 0xae, 0x09, 0xae, + 0xd0, 0x00, 0x62, 0x5b, + 0x50, 0x7a, 0x50, 0x7a, 0x50, 0x7a, 0x50, 0x7a, + 0xe2, 0xa5, 0xe2, 0xa5, 0xe2, 0xa5, 0xe2, 0xa5, + 0xe2, 0xa5, 0xe2, 0xa5, 0xe2, 0xa5, 0xe2, 0xa5, + 0xa0, 0x00, 0xa2, 0x48, + 0x17, 0x6e, 0x17, 0x6e, 0x17, 0x6e, 0x17, 0x6e, + 0xa9, 0x99, 0xa9, 0x99, 0xa9, 0x99, 0xa9, 0x99, + 0xa9, 0x99, 0xa9, 0x99, 0xa9, 0x99, 0xa9, 0x99, + 0x50, 0x00, 0xc9, 0x36, + 0xb7, 0x59, 0xb7, 0x59, 0xb7, 0x59, 0xb7, 0x59, + 0x49, 0x85, 0x49, 0x85, 0x49, 0x85, 0x49, 0x85, + 0x49, 0x85, 0x49, 0x85, 0x49, 0x85, 0x49, 0x85, + 0x00, 0x00, 0x12, 0x2e, + 0x57, 0x45, 0x57, 0x45, 0x57, 0x45, 0x57, 0x45, + 0xe9, 0x70, 0xe9, 0x70, 0xe9, 0x70, 0xe9, 0x70, + 0xe9, 0x70, 0xe9, 0x70, 0xe9, 0x70, 0xe9, 0x70, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x00, + + /* 2452 MHz */ + 0x99, 0x09, + 0x10, 0x01, 0x74, 0x86, + 0xdb, 0x8a, 0xdb, 0x8a, 0xdb, 0x8a, 0xdb, 0x8a, + 0x6d, 0xb6, 0x6d, 0xb6, 0x6d, 0xb6, 0x6d, 0xb6, + 0x6d, 0xb6, 0x6d, 0xb6, 0x6d, 0xb6, 0x6d, 0xb6, + 0xf0, 0x00, 0x1e, 0x6e, + 0xb0, 0x82, 0xb0, 0x82, 0xb0, 0x82, 0xb0, 0x82, + 0x42, 0xae, 0x42, 0xae, 0x42, 0xae, 0x42, 0xae, + 0x42, 0xae, 0x42, 0xae, 0x42, 0xae, 0x42, 0xae, + 0xd0, 0x00, 0xeb, 0x5b, + 0x85, 0x7a, 0x85, 0x7a, 0x85, 0x7a, 0x85, 0x7a, + 0x17, 0xa6, 0x17, 0xa6, 0x17, 0xa6, 0x17, 0xa6, + 0x17, 0xa6, 0x17, 0xa6, 0x17, 0xa6, 0x17, 0xa6, + 0xa0, 0x00, 0xd8, 0x48, + 0x46, 0x6e, 0x46, 0x6e, 0x46, 0x6e, 0x46, 0x6e, + 0xd8, 0x99, 0xd8, 0x99, 0xd8, 0x99, 0xd8, 0x99, + 0xd8, 0x99, 0xd8, 0x99, 0xd8, 0x99, 0xd8, 0x99, + 0x50, 0x00, 0xcd, 0x36, + 0xdb, 0x59, 0xdb, 0x59, 0xdb, 0x59, 0xdb, 0x59, + 0x6d, 0x85, 0x6d, 0x85, 0x6d, 0x85, 0x6d, 0x85, + 0x6d, 0x85, 0x6d, 0x85, 0x6d, 0x85, 0x6d, 0x85, + 0x00, 0x00, 0x10, 0x2e, + 0x71, 0x45, 0x71, 0x45, 0x71, 0x45, 0x71, 0x45, + 0x03, 0x71, 0x03, 0x71, 0x03, 0x71, 0x03, 0x71, + 0x03, 0x71, 0x03, 0x71, 0x03, 0x71, 0x03, 0x71, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x00, + + /* 2557 MHz */ + 0x9e, 0x09, + 0x10, 0x01, 0xf3, 0x87, + 0x17, 0x8b, 0x17, 0x8b, 0x17, 0x8b, 0x17, 0x8b, + 0xa9, 0xb6, 0xa9, 0xb6, 0xa9, 0xb6, 0xa9, 0xb6, + 0xa9, 0xb6, 0xa9, 0xb6, 0xa9, 0xb6, 0xa9, 0xb6, + 0xf0, 0x00, 0x07, 0x6f, + 0xe9, 0x82, 0xe9, 0x82, 0xe9, 0x82, 0xe9, 0x82, + 0x7b, 0xae, 0x7b, 0xae, 0x7b, 0xae, 0x7b, 0xae, + 0x7b, 0xae, 0x7b, 0xae, 0x7b, 0xae, 0x7b, 0xae, + 0xd0, 0x00, 0x73, 0x5c, + 0xba, 0x7a, 0xba, 0x7a, 0xba, 0x7a, 0xba, 0x7a, + 0x4c, 0xa6, 0x4c, 0xa6, 0x4c, 0xa6, 0x4c, 0xa6, + 0x4c, 0xa6, 0x4c, 0xa6, 0x4c, 0xa6, 0x4c, 0xa6, + 0xa0, 0x00, 0x0d, 0x49, + 0x74, 0x6e, 0x74, 0x6e, 0x74, 0x6e, 0x74, 0x6e, + 0x06, 0x9a, 0x06, 0x9a, 0x06, 0x9a, 0x06, 0x9a, + 0x06, 0x9a, 0x06, 0x9a, 0x06, 0x9a, 0x06, 0x9a, + 0x50, 0x00, 0xd1, 0x36, + 0xff, 0x59, 0xff, 0x59, 0xff, 0x59, 0xff, 0x59, + 0x91, 0x85, 0x91, 0x85, 0x91, 0x85, 0x91, 0x85, + 0x91, 0x85, 0x91, 0x85, 0x91, 0x85, 0x91, 0x85, + 0x00, 0x00, 0x0e, 0x2e, + 0x8b, 0x45, 0x8b, 0x45, 0x8b, 0x45, 0x8b, 0x45, + 0x1d, 0x71, 0x1d, 0x71, 0x1d, 0x71, 0x1d, 0x71, + 0x1d, 0x71, 0x1d, 0x71, 0x1d, 0x71, 0x1d, 0x71, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x00, + + /* 2562 MHz */ + 0xa3, 0x09, + 0x10, 0x01, 0x72, 0x89, + 0x54, 0x8b, 0x54, 0x8b, 0x54, 0x8b, 0x54, 0x8b, + 0xe6, 0xb6, 0xe6, 0xb6, 0xe6, 0xb6, 0xe6, 0xb6, + 0xe6, 0xb6, 0xe6, 0xb6, 0xe6, 0xb6, 0xe6, 0xb6, + 0xf0, 0x00, 0xf0, 0x6f, + 0x21, 0x83, 0x21, 0x83, 0x21, 0x83, 0x21, 0x83, + 0xb3, 0xae, 0xb3, 0xae, 0xb3, 0xae, 0xb3, 0xae, + 0xb3, 0xae, 0xb3, 0xae, 0xb3, 0xae, 0xb3, 0xae, + 0xd0, 0x00, 0xfb, 0x5c, + 0xee, 0x7a, 0xee, 0x7a, 0xee, 0x7a, 0xee, 0x7a, + 0x80, 0xa6, 0x80, 0xa6, 0x80, 0xa6, 0x80, 0xa6, + 0x80, 0xa6, 0x80, 0xa6, 0x80, 0xa6, 0x80, 0xa6, + 0xa0, 0x00, 0x43, 0x49, + 0xa3, 0x6e, 0xa3, 0x6e, 0xa3, 0x6e, 0xa3, 0x6e, + 0x35, 0x9a, 0x35, 0x9a, 0x35, 0x9a, 0x35, 0x9a, + 0x35, 0x9a, 0x35, 0x9a, 0x35, 0x9a, 0x35, 0x9a, + 0x50, 0x00, 0xd4, 0x36, + 0x24, 0x5a, 0x24, 0x5a, 0x24, 0x5a, 0x24, 0x5a, + 0xb6, 0x85, 0xb6, 0x85, 0xb6, 0x85, 0xb6, 0x85, + 0xb6, 0x85, 0xb6, 0x85, 0xb6, 0x85, 0xb6, 0x85, + 0x00, 0x00, 0x0b, 0x2e, + 0xa6, 0x45, 0xa6, 0x45, 0xa6, 0x45, 0xa6, 0x45, + 0x38, 0x71, 0x38, 0x71, 0x38, 0x71, 0x38, 0x71, + 0x38, 0x71, 0x38, 0x71, 0x38, 0x71, 0x38, 0x71, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x00, + + /* 2572 MHz */ + 0xa8, 0x09, + 0x10, 0x01, 0xf1, 0x8a, + 0x91, 0x8b, 0x91, 0x8b, 0x91, 0x8b, 0x91, 0x8b, + 0x23, 0xb7, 0x23, 0xb7, 0x23, 0xb7, 0x23, 0xb7, + 0x23, 0xb7, 0x23, 0xb7, 0x23, 0xb7, 0x23, 0xb7, + 0xf0, 0x00, 0xd9, 0x70, + 0x5a, 0x83, 0x5a, 0x83, 0x5a, 0x83, 0x5a, 0x83, + 0xec, 0xae, 0xec, 0xae, 0xec, 0xae, 0xec, 0xae, + 0xec, 0xae, 0xec, 0xae, 0xec, 0xae, 0xec, 0xae, + 0xd0, 0x00, 0x83, 0x5d, + 0x23, 0x7b, 0x23, 0x7b, 0x23, 0x7b, 0x23, 0x7b, + 0xb5, 0xa6, 0xb5, 0xa6, 0xb5, 0xa6, 0xb5, 0xa6, + 0xb5, 0xa6, 0xb5, 0xa6, 0xb5, 0xa6, 0xb5, 0xa6, + 0xa0, 0x00, 0x78, 0x49, + 0xd1, 0x6e, 0xd1, 0x6e, 0xd1, 0x6e, 0xd1, 0x6e, + 0x63, 0x9a, 0x63, 0x9a, 0x63, 0x9a, 0x63, 0x9a, + 0x63, 0x9a, 0x63, 0x9a, 0x63, 0x9a, 0x63, 0x9a, + 0x50, 0x00, 0xd8, 0x36, + 0x48, 0x5a, 0x48, 0x5a, 0x48, 0x5a, 0x48, 0x5a, + 0xda, 0x85, 0xda, 0x85, 0xda, 0x85, 0xda, 0x85, + 0xda, 0x85, 0xda, 0x85, 0xda, 0x85, 0xda, 0x85, + 0x00, 0x00, 0x09, 0x2e, + 0xc0, 0x45, 0xc0, 0x45, 0xc0, 0x45, 0xc0, 0x45, + 0x52, 0x71, 0x52, 0x71, 0x52, 0x71, 0x52, 0x71, + 0x52, 0x71, 0x52, 0x71, 0x52, 0x71, 0x52, 0x71, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x00, +}; + +/* + * Not really sure if this is actually the power_limit database, + * it looks a bit "related" to PDR_PRISM_ZIF_TX_IQ_CALIBRATION + */ +static const uint8_t template_pa_cal_output_power_limits[] = { + /* struct pda_custom_wrapper */ + 0xae, 0x00, 0xef, 0xbe, /* PDR_PRISM_PA_CAL_OUTPUT_POWER_LIMITS_CUSTOM */ + 0x0d, 0x00, 0x1a, 0x00, /* 13 entries, 26 bytes per entry */ + 0x00, 0x00, 0x52, 0x01, /* no offset, 338 bytes total */ + + /* 2412 MHz */ + 0x6c, 0x09, + 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, + 0xe0, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0xe0, 0x00, + 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, + + /* 2417 MHz */ + 0x71, 0x09, + 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, + 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, + 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, + + /* 2422 MHz */ + 0x76, 0x09, + 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, + 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, + 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, + + /* 2427 MHz */ + 0x7b, 0x09, + 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, + 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, + 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, + + /* 2432 MHz */ + 0x80, 0x09, + 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, + 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, + 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, + + /* 2437 MHz */ + 0x85, 0x09, + 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, + 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, + 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, + + /* 2442 MHz */ + 0x8a, 0x09, + 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, + 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, + 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, + + /* 2447 MHz */ + 0x8f, 0x09, + 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, + 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, + 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, + + /* 2452 MHz */ + 0x94, 0x09, + 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, + 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, + 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, + + /* 2457 MHz */ + 0x99, 0x09, + 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, + 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, + 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, + + /* 2462 MHz */ + 0x9e, 0x09, + 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, + 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, + 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, + + /* 2467 MHz */ + 0xa3, 0x09, + 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, + 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, + 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, + + /* 2472 MHz */ + 0xa8, 0x09, + 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, + 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x00, + 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd0, 0x00, +}; + +static const uint8_t template_pda_iq_autocal[] = { + /* struct pda_iq_autocal_entry[13] */ + 0x42, 0x00, 0x06, 0x19, /* PDR_PRISM_ZIF_TX_IQ_CALIBRATION */ + /* 2412 MHz */ + 0x6c, 0x09, 0x26, 0x00, 0xf8, 0xff, 0xf7, 0xff, 0xff, 0x00, + /* 2417 MHz */ + 0x71, 0x09, 0x26, 0x00, 0xf8, 0xff, 0xf7, 0xff, 0xff, 0x00, + /* 2422 MHz */ + 0x76, 0x09, 0x26, 0x00, 0xf8, 0xff, 0xf7, 0xff, 0xff, 0x00, + /* 2427 MHz */ + 0x7b, 0x09, 0x26, 0x00, 0xf8, 0xff, 0xf7, 0xff, 0xff, 0x00, + /* 2432 MHz */ + 0x80, 0x09, 0x25, 0x00, 0xf7, 0xff, 0xf7, 0xff, 0xff, 0x00, + /* 2437 MHz */ + 0x85, 0x09, 0x25, 0x00, 0xf7, 0xff, 0xf7, 0xff, 0xff, 0x00, + /* 2442 MHz */ + 0x8a, 0x09, 0x25, 0x00, 0xf7, 0xff, 0xf7, 0xff, 0xff, 0x00, + /* 2447 MHz */ + 0x8f, 0x09, 0x25, 0x00, 0xf7, 0xff, 0xf7, 0xff, 0xff, 0x00, + /* 2452 MHz */ + 0x94, 0x09, 0x25, 0x00, 0xf7, 0xff, 0xf7, 0xff, 0xff, 0x00, + /* 2457 MHz */ + 0x99, 0x09, 0x25, 0x00, 0xf5, 0xff, 0xf9, 0xff, 0x00, 0x01, + /* 2462 MHz */ + 0x9e, 0x09, 0x25, 0x00, 0xf5, 0xff, 0xf9, 0xff, 0x00, 0x01, + /* 2467 MHz */ + 0xa3, 0x09, 0x25, 0x00, 0xf5, 0xff, 0xf9, 0xff, 0x00, 0x01, + /* 2472 MHz */ + 0xa8, 0x09, 0x25, 0x00, 0xf5, 0xff, 0xf9, 0xff, 0x00, 0x01, +}; + +static const uint8_t template_pdr_end[] = { + 0x02, 0x00, 0x00, 0x00, /* PDR_END */ +}; + +/* linux/lib/crc-ccitt.c + * + * This mysterious table is just the CRC of each possible byte. It can be + * computed using the standard bit-at-a-time methods. The polynomial can + * be seen in entry 128, 0x8408. This corresponds to x^0 + x^5 + x^12. + * Add the implicit x^16, and you have the standard CRC-CCITT. + */ +static uint16_t const crc_ccitt_table[256] = { + 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, + 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, + 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, + 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, + 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, + 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, + 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, + 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, + 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, + 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, + 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, + 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, + 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, + 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, + 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, + 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, + 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, + 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, + 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, + 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, + 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, + 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, + 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, + 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, + 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, + 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, + 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, + 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, + 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, + 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, + 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, + 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 +}; + +static inline uint16_t crc_ccitt_byte(uint16_t crc, const uint8_t c) +{ + return (crc >> 8) ^ crc_ccitt_table[(crc ^ c) & 0xff]; +} + +static uint16_t crc_ccitt(uint16_t crc, uint8_t const *buffer, size_t len) +{ + while (len--) + crc = crc_ccitt_byte(crc, *buffer++); + return crc; +} + +static int generate_pa_cal_curve(uint8_t *buffer, + const uint8_t *txgen_image, + size_t txgen_image_size) +{ + memcpy(buffer, template_pa_cal_curve, sizeof(template_pa_cal_curve)); + + //TODO + + return 0; +} + +static int generate_iq_autocal(uint8_t *buffer, + const uint8_t *iqalign_image, + size_t iqalign_image_size) +{ + unsigned int expected_size; + uint8_t *out; + const uint8_t *in; + unsigned int i; + + expected_size = 13 * 8 + 4; + if (iqalign_image_size != expected_size) { + fprintf(stderr, "ERROR: Unknown wlan-iq-align image size. " + "Got %u, but expected %u\n", + (unsigned int)iqalign_image_size, expected_size); + return -EINVAL; + } + + in = iqalign_image; + out = buffer; + + memcpy(out, template_pda_iq_autocal, sizeof(template_pda_iq_autocal)); + + in += 4; /* Skip zero padding */ + out += 4; /* Skip header */ + for (i = 0; i < 13; i++) { + out += 2; /* Skip little endian 16bit Mhz number */ + memcpy(out, in, 8); + out += 8; /* Next element */ + in += 8; /* Next element */ + } + + return 0; +} + +static int generate_eeprom(FILE *outstream, + const uint8_t *txgen_image, + size_t txgen_image_size, + const uint8_t *iqalign_image, + size_t iqalign_image_size) +{ + int err, res = 0; + uint16_t crc = ~0; + uint8_t crc_buf[2]; + uint8_t gen_pda_iq_autocal[sizeof(template_pda_iq_autocal)]; + uint8_t gen_pa_cal_curve[sizeof(template_pa_cal_curve)]; + + err = generate_iq_autocal(gen_pda_iq_autocal, + iqalign_image, iqalign_image_size); + if (err) + return err; + err = generate_pa_cal_curve(gen_pa_cal_curve, + txgen_image, txgen_image_size); + if (err) + return err; + +#define writebuf(buffer, do_crc) do { \ + if (do_crc) \ + crc = crc_ccitt(crc, buffer, sizeof(buffer)); \ + res = fwrite(buffer, sizeof(buffer), 1, outstream); \ + if (res != 1) { \ + fprintf(stderr, "Failed to write output data\n"); \ + return -EIO; \ + } \ + } while (0) + + writebuf(template_eeprom_pda_wrap, 0); + writebuf(template_mac_address, 1); + writebuf(template_bootrec_exp_if, 1); + writebuf(template_pda_country_list, 1); + writebuf(template_pda_country, 1); + writebuf(template_antenna_gain, 1); + writebuf(template_rssi_linear_approx_custom2, 1); + writebuf(gen_pa_cal_curve, 1); + writebuf(template_pa_cal_output_power_limits, 1); + writebuf(gen_pda_iq_autocal, 1); + writebuf(template_pdr_end, 1); + + crc = ~crc; + crc_buf[0] = crc & 0xFF; + crc_buf[1] = (crc >> 8) & 0xFF; + res = fwrite(crc_buf, sizeof(crc_buf), 1, outstream); + if (res != 1) { + fprintf(stderr, "Failed to write CRC\n"); + return -EIO; + } + + return 0; +} + +static void * map_file(const char *filepath, int readonly, + uint64_t *filelen) +{ + int fd; + off_t len; + void *data; + + fd = open(filepath, readonly ? O_RDONLY : O_RDWR); + if (fd < 0) { + fprintf(stderr, "Failed to open file %s: %s\n", + filepath, strerror(errno)); + return NULL; + } + len = lseek(fd, 0, SEEK_END); + if (len < 0 || lseek(fd, 0, SEEK_SET)) { + fprintf(stderr, "Failed to calculate file length of %s: %s\n", + filepath, strerror(errno)); + close(fd); + return NULL; + } + + data = mmap(NULL, len, + readonly ? PROT_READ : (PROT_READ | PROT_WRITE), + readonly ? MAP_PRIVATE : 0, + fd, 0); + close(fd); + if (data == MAP_FAILED) { + fprintf(stderr, "Failed to MMAP file %s: %s\n", + filepath, strerror(errno)); + return NULL; + } + madvise(data, len, MADV_SEQUENTIAL); + + *filelen = len; + + return data; +} + +static void unmap_file(void *mapping, uint64_t len) +{ + if (mapping) + munmap(mapping, len); +} + +static void usage(FILE *fd) +{ + fprintf(fd, "cal2p54 - CAL to p54spi EEPROM converter\n"); + fprintf(fd, "\n"); + fprintf(fd, "Usage: cal2p54 WLAN-TX-GEN2-IMAGE WLAN-IQ-ALIGN-IMAGE\n"); +} + +int main(int argc, char **argv) +{ + int err, ret = 0; + uint8_t *txgen_image = NULL; + uint64_t txgen_image_len = 0; + uint8_t *iqalign_image = NULL; + uint64_t iqalign_image_len = 0; + + const char *txgen_filepath; + const char *iqalign_filepath; + + if (argc != 3) { + usage(stderr); + return 1; + } + txgen_filepath = argv[1]; + iqalign_filepath = argv[2]; + + txgen_image = map_file(txgen_filepath, 1, &txgen_image_len); + iqalign_image = map_file(iqalign_filepath, 1, &iqalign_image_len); + if (!txgen_image || !iqalign_image) { + ret = 1; + goto out; + } + + err = generate_eeprom(stdout, txgen_image, txgen_image_len, + iqalign_image, iqalign_image_len); + if (err) { + ret = 1; + goto out; + } + +out: + unmap_file(txgen_image, txgen_image_len); + unmap_file(iqalign_image, iqalign_image_len); + + return ret; +} diff --git a/utils/calvaria/files/src/calvaria.c b/utils/calvaria/files/src/calvaria.c new file mode 100644 index 0000000..2438e34 --- /dev/null +++ b/utils/calvaria/files/src/calvaria.c @@ -0,0 +1,514 @@ +/* + * Calvaria - Maemo CAL partition variable access tool. + * + * Copyright (c) 2011 Michael Buesch + * + * Licensed under the GNU General Public License version 2. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define _packed __attribute__((__packed__)) + +typedef uint16_t le16_t; +typedef uint32_t le32_t; + +struct header { + char magic[4]; /* Magic sequence */ + uint8_t type; /* Type number */ + uint8_t index; /* Index number */ + le16_t flags; /* Flags */ + char name[16]; /* Human readable section name */ + le32_t length; /* Payload length */ + le32_t datasum; /* Data CRC32 checksum */ + le32_t hdrsum; /* Header CRC32 checksum */ +} _packed; + +#define HDR_MAGIC "ConF" + +#define INDEX_LAST (0xFF + 1) + + +static char toAscii(char c) +{ + if (c >= 32 && c <= 126) + return c; + return '.'; +} + +static void dump_bytes(FILE *outstream, const void *_buf, size_t size) +{ + const char *buf = _buf; + size_t i, ascii_cnt = 0; + char ascii[17] = { 0, }; + + for (i = 0; i < size; i++) { + if (i % 16 == 0) { + if (i != 0) { + fprintf(outstream, " |%s|\n", ascii); + ascii[0] = 0; + ascii_cnt = 0; + } + fprintf(outstream, "[%04X]: ", (unsigned int)i); + } + fprintf(outstream, " %02X", buf[i] & 0xFF); + ascii[ascii_cnt] = toAscii(buf[i]); + ascii[ascii_cnt + 1] = 0; + ascii_cnt++; + } + if (ascii[0]) { + if (size % 16) { + for (i = 0; i < 16 - (size % 16); i++) + fprintf(outstream, " "); + } + fprintf(outstream, " |%s|\n", ascii); + } +} + +static uint32_t crc32(uint32_t crc, const void *_data, size_t size) +{ + const uint8_t *data = _data; + uint8_t value; + unsigned int bit; + size_t i; + const uint32_t poly = 0xEDB88320; + + for (i = 0; i < size; i++) { + value = data[i]; + for (bit = 8; bit; bit--) { + if ((crc & 1) != (value & 1)) + crc = (crc >> 1) ^ poly; + else + crc >>= 1; + value >>= 1; + } + } + + return crc; +} + +static inline uint16_t le16_to_cpu(le16_t x) +{ + uint8_t *bytes = (uint8_t *)&x; + uint16_t ret; + + ret = bytes[0]; + ret |= (uint16_t)(bytes[1]) << 8; + + return ret; +} + +static inline uint32_t le32_to_cpu(le32_t x) +{ + uint8_t *bytes = (uint8_t *)&x; + uint32_t ret; + + ret = bytes[0]; + ret |= (uint32_t)(bytes[1]) << 8; + ret |= (uint32_t)(bytes[2]) << 16; + ret |= (uint32_t)(bytes[3]) << 24; + + return ret; +} + +static int is_header(void *data, size_t size) +{ + struct header *hdr = data; + + if (size < sizeof(struct header)) + return 0; + if (memcmp(hdr->magic, HDR_MAGIC, sizeof(hdr->magic)) != 0) + return 0; + return 1; +} + +void dump_bme_payload(FILE *outstream, const void *payload, size_t len) +{ + const uint8_t *pmm_area = payload; + unsigned int group, element, pmm_offset; + uint8_t active_group_mask; + static const uint8_t zero_element[16] = { 0, }; + + if (len != 0x600 || memcmp(payload, "BME-PMM-BLOCK01", 15) != 0) { + fprintf(outstream, "ERROR: The section payload is not " + "a BME PMM block\n"); + return; + } + + active_group_mask = pmm_area[16]; + + for (group = 0; group < 3; group++) { + for (element = 0; element < 32; element++) { + pmm_offset = group * 512 + element * 16; + if (memcmp(pmm_area + pmm_offset, zero_element, 16) == 0) + continue; + fprintf(outstream, "-- BME-PMM area -- group %u%s, element %u:\n", + group, + (active_group_mask & (1 << group)) ? "" : " (INACTIVE)", + element); + dump_bytes(outstream, pmm_area + pmm_offset, 16); + } + } +} + +typedef void (*payload_dumper_t)(FILE *, const void *payload, size_t len); + +static payload_dumper_t get_payload_dumper(const char *section_name, int raw) +{ + if (!raw) { + if (strcmp(section_name, "bme") == 0) + return dump_bme_payload; + } + + return dump_bytes; +} + +static int dump_section(const struct header *hdr, + const void *payload, size_t payload_len, + int dump_payload, + int dump_raw_payload, + FILE *outstream) +{ + char name[sizeof(hdr->name) + 1] = { 0, }; + int hdrsum_ok, datasum_ok; + payload_dumper_t dumper; + + memcpy(name, hdr->name, sizeof(hdr->name)); + hdrsum_ok = (crc32(0, hdr, sizeof(*hdr) - 4) == le32_to_cpu(hdr->hdrsum)); + datasum_ok = (crc32(0, payload, payload_len) == le32_to_cpu(hdr->datasum)); + + fprintf(outstream, "Section: %s\n", name); + fprintf(outstream, "Type: %u (0x%X)\n", hdr->type, hdr->type); + fprintf(outstream, "Index: %u (0x%X)\n", hdr->index, hdr->index); + fprintf(outstream, "Flags: 0x%04X\n", le16_to_cpu(hdr->flags)); + fprintf(outstream, "Length: %u (0x%X)\n", + le32_to_cpu(hdr->length), le32_to_cpu(hdr->length)); + fprintf(outstream, "Data CRC32: 0x%08X (%s)\n", le32_to_cpu(hdr->datasum), + datasum_ok ? "Ok" : "MISMATCH"); + fprintf(outstream, "Header CRC32: 0x%08X (%s)\n", le32_to_cpu(hdr->hdrsum), + hdrsum_ok ? "Ok" : "MISMATCH"); + if (dump_payload) { + dumper = get_payload_dumper(name, dump_raw_payload); + dumper(outstream, payload, payload_len); + } + fprintf(outstream, "\n"); + + return 0; +} + +static void * map_file(const char *filepath, int readonly, + uint64_t *filelen) +{ + int fd; + off_t len; + void *data; + + fd = open(filepath, readonly ? O_RDONLY : O_RDWR); + if (fd < 0) { + fprintf(stderr, "Failed to open file %s: %s\n", + filepath, strerror(errno)); + return NULL; + } + len = lseek(fd, 0, SEEK_END); + if (len < 0 || lseek(fd, 0, SEEK_SET)) { + fprintf(stderr, "Failed to calculate file length of %s: %s\n", + filepath, strerror(errno)); + close(fd); + return NULL; + } + + data = mmap(NULL, len, + readonly ? PROT_READ : (PROT_READ | PROT_WRITE), + readonly ? MAP_PRIVATE : 0, + fd, 0); + close(fd); + if (data == MAP_FAILED) { + fprintf(stderr, "Failed to MMAP file %s: %s\n", + filepath, strerror(errno)); + return NULL; + } + madvise(data, len, MADV_SEQUENTIAL); + + *filelen = len; + + return data; +} + +static void unmap_file(void *mapping, uint64_t len) +{ + if (mapping) + munmap(mapping, len); +} + +static int64_t find_section(void *start, uint64_t count, + int want_index, const char *want_name) +{ + int64_t offset = 0, found_offset = -1; + uint8_t *data = start; + struct header *hdr; + char sectname[sizeof(hdr->name) + 1] = { 0, }; + uint32_t payload_len; + int previous_index = -1; + + while (1) { + /* Find header start */ + if (count < sizeof(struct header)) + break; + if (!is_header(data + offset, count)) { + count--; + offset++; + continue; + } + hdr = (struct header *)(data + offset); + payload_len = le32_to_cpu(hdr->length); + if (count - sizeof(struct header) < payload_len) { + fprintf(stderr, "Premature EOF\n"); + return -1; + } + memcpy(sectname, hdr->name, sizeof(hdr->name)); + + if (want_index == INDEX_LAST) { + if ((int)hdr->index <= previous_index) + goto next; + } else { + if (want_index >= 0 && want_index != hdr->index) + goto next; + } + if (want_name && strcmp(sectname, want_name) != 0) + goto next; + + /* Found it */ + found_offset = offset; + if (want_index == INDEX_LAST) + previous_index = hdr->index; + else + break; + +next: + count -= sizeof(struct header) + payload_len; + offset += sizeof(struct header) + payload_len; + } + + return found_offset; +} + +static int dump_image(const char *filepath, + int want_section_index, const char *want_section_name, + int want_headers_only, + int dump_raw_payload, + FILE *outstream) +{ + int err, ret = 0; + uint64_t filelen; + uint64_t count, offset; + int64_t find_offset; + uint8_t *data, *section; + struct header *hdr; + uint32_t payload_len; + + data = map_file(filepath, 1, &filelen); + if (!data) + return -EIO; + + count = filelen; + offset = 0; + while (1) { + find_offset = find_section(data + offset, count, + want_section_index, want_section_name); + if (find_offset < 0) + break; + offset += find_offset; + count -= find_offset; + + section = data + offset; + hdr = (struct header *)section; + payload_len = le32_to_cpu(hdr->length); + + err = dump_section(hdr, section + sizeof(struct header), + payload_len, + !want_headers_only, + dump_raw_payload, + outstream); + if (err) { + ret = err; + goto out; + } + + count -= sizeof(struct header) + payload_len; + offset += sizeof(struct header) + payload_len; + } +out: + unmap_file(data, filelen); + + return ret; +} + +static int write_payload(const char *filepath, + int want_section_index, const char *want_section_name, + FILE *outstream) +{ + int64_t find_offset; + uint64_t filelen; + uint8_t *data; + struct header *hdr; + + data = map_file(filepath, 1, &filelen); + if (!data) + return -EIO; + + find_offset = find_section(data, filelen, + want_section_index, want_section_name); + if (find_offset < 0) { + fprintf(stderr, "Section %s, index %d not found\n", + want_section_name, want_section_index); + unmap_file(data, filelen); + return -ESRCH; + } + + hdr = (struct header *)(data + find_offset); + if (fwrite(data + find_offset + sizeof(struct header), + le32_to_cpu(hdr->length), 1, outstream) != 1) { + fprintf(stderr, "Could not write output data\n"); + unmap_file(data, filelen); + return -EIO; + } + + unmap_file(data, filelen); + + return 0; +} + +static void usage(FILE *fd) +{ + fprintf(fd, "Calvaria - Maemo CAL partition variable access tool\n"); + fprintf(fd, "\n"); + fprintf(fd, "Usage: calvaria [OPTIONS] FILE\n"); + fprintf(fd, "\n"); + fprintf(fd, "Actions:\n"); + fprintf(fd, " -d|--dump Dump the contents of the image\n"); + fprintf(fd, " -H|--headers Dump the headers of the image, only\n"); + fprintf(fd, " -p|--payload Write the binary payload to stdout.\n"); + fprintf(fd, " Requires -i and -n to be set, too\n"); + fprintf(fd, "\n"); + fprintf(fd, "Options:\n"); + fprintf(fd, " -i|--index NUMBER Use this section index number\n"); + fprintf(fd, " -n|--name STRING Use this section name\n"); + fprintf(fd, " -r|--raw Dump raw data (for -d|--dump only)\n"); + fprintf(fd, "\n"); + fprintf(fd, " -h|--help Print this help text\n"); +} + +enum action { + ACTION_NONE, + ACTION_DUMP, + ACTION_DUMPHDRS, + ACTION_GETPAYLOAD, +}; + +int main(int argc, char **argv) +{ + int err, c, idx = 0; + const char *filepath; + enum action action = ACTION_NONE; + int opt_index = -1; + const char *opt_name = NULL; + int opt_raw_payload = 0; + + static struct option long_options[] = { + { "dump", no_argument, 0, 'd', }, + { "headers", no_argument, 0, 'H', }, + { "payload", no_argument, 0, 'p', }, + { "index", required_argument, 0, 'i', }, + { "name", required_argument, 0, 'n', }, + { "raw", no_argument, 0, 'r', }, + { "help", no_argument, 0, 'h', }, + { }, + }; + + while (1) { + c = getopt_long(argc, argv, "dHphi:n:r", + long_options, &idx); + if (c == -1) + break; + switch (c) { + case 'h': + usage(stdout); + return 0; + case 'd': + action = ACTION_DUMP; + break; + case 'H': + action = ACTION_DUMPHDRS; + break; + case 'p': + action = ACTION_GETPAYLOAD; + break; + case 'i': + if (strcasecmp(optarg, "last") == 0) { + opt_index = INDEX_LAST; + } else { + if (sscanf(optarg, "%d", &opt_index) != 1 || opt_index < 0) { + fprintf(stderr, "-i|--index is not a positive integer\n"); + return 1; + } + } + break; + case 'n': + opt_name = optarg; + break; + case 'r': + opt_raw_payload = 1; + break; + default: + return 1; + } + } + argc -= optind; + argv += optind; + if (action == ACTION_NONE) { + fprintf(stderr, "No action specified.\n"); + return 1; + } + if (action == ACTION_GETPAYLOAD) { + if (opt_index < 0 || !opt_name) { + fprintf(stderr, "Required options -i|--index or -n|--name " + "not specified for action -p|--payload\n"); + return 1; + } + } + if (argc != 1) { + usage(stderr); + return 1; + } + filepath = argv[0]; + + switch (action) { + case ACTION_NONE: + break; + case ACTION_DUMP: + case ACTION_DUMPHDRS: + err = dump_image(filepath, opt_index, opt_name, + (action == ACTION_DUMPHDRS), + opt_raw_payload, + stdout); + if (err) + return 1; + break; + case ACTION_GETPAYLOAD: + err = write_payload(filepath, opt_index, opt_name, stdout); + if (err) + return 1; + break; + } + + return 0; +} diff --git a/utils/ccid/Makefile b/utils/ccid/Makefile new file mode 100644 index 0000000..f456f83 --- /dev/null +++ b/utils/ccid/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ccid +PKG_VERSION:=1.3.11 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://alioth.debian.org/frs/download.php/3080 +PKG_MD5SUM:=727dc7eb4d560f81fe70a766a96de970 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ccid + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libusb +libpcsclite + TITLE:=Generic USB CCID smart card reader driver + URL:=http://pcsclite.alioth.debian.org/ccid.html +endef + +define Package/ccid/description + Generic USB CCID (Chip/Smart Card Interface Devices) driver and ICCD (Integrated Circuit(s) Card Devices). +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Configure + $(call Build/Configure/Default, \ + --enable-usbdropdir=/usr/lib/pcsc/drivers \ + ) +endef + +define Package/ccid/install + $(INSTALL_DIR) $(1)/usr/lib/pcsc/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pcsc/drivers $(1)/usr/lib/pcsc/ +endef + +$(eval $(call BuildPackage,ccid)) diff --git a/utils/ccrypt/Makefile b/utils/ccrypt/Makefile new file mode 100644 index 0000000..a487341 --- /dev/null +++ b/utils/ccrypt/Makefile @@ -0,0 +1,37 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ccrypt +PKG_VERSION:=1.9 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/ccrypt +PKG_MD5SUM:=c3f78019d7a166dd66f1d4b1390c62c2 + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/ccrypt + SECTION:=utils + CATEGORY:=Utilities + TITLE:=ccrypt is a utility for encrypting and decrypting files and streams + URL:=http://ccrypt.sourceforge.net/ +endef + +define Package/ccrypt/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ccrypt $(1)/usr/bin/ + ln -s ccrypt $(1)/usr/bin/ccencrypt + ln -s ccrypt $(1)/usr/bin/ccdecrypt + ln -s ccrypt $(1)/usr/bin/ccat +endef + +$(eval $(call BuildPackage,ccrypt)) diff --git a/utils/ccrypt/patches/001-no-intl.patch b/utils/ccrypt/patches/001-no-intl.patch new file mode 100644 index 0000000..4f24c84 --- /dev/null +++ b/utils/ccrypt/patches/001-no-intl.patch @@ -0,0 +1,104 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -106,17 +106,6 @@ AC_MSG_RESULT($UINT32_TYPE) + AC_DEFINE_UNQUOTED(UINT32_TYPE,$UINT32_TYPE,unsigned 32 bit integer type) + + dnl ---------------------------------------------------------------------- +-dnl Internationalization +- +-GETTEXT_PACKAGE=ccrypt +-AC_SUBST(GETTEXT_PACKAGE) +-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext]) +- +-AM_GNU_GETTEXT +-AM_GNU_GETTEXT_VERSION([0.14.3]) +-IT_PROG_INTLTOOL([0.34.2], [no-xml]) +- +-dnl ---------------------------------------------------------------------- + dnl Libtool (needed by intl/) + + AC_PROG_LIBTOOL +@@ -135,9 +124,7 @@ AC_SUBST(TAR) + + dnl ---------------------------------------------------------------------- + AC_OUTPUT([doc/ccrypt.1 +- po/Makefile.in + m4/Makefile +- intl/Makefile + Makefile + src/Makefile + emacs/Makefile +--- a/Makefile.am ++++ b/Makefile.am +@@ -4,11 +4,10 @@ + + ## Process this file with automake to produce Makefile.in + +-SUBDIRS = m4 po intl src emacs doc check ++SUBDIRS = m4 src emacs doc check + +-EXTRA_DIST = m4/ChangeLog config.rpath README-WIN intltool-extract.in \ +- intltool-merge.in intltool-update.in +-DISTCLEANFILES = intltool-extract intltool-merge intltool-update ++EXTRA_DIST = m4/ChangeLog config.rpath README-WIN ++DISTCLEANFILES = + + + TAR = @TAR@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -37,7 +37,7 @@ build_triplet = @build@ + host_triplet = @host@ + DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ +- $(top_srcdir)/configure $(top_srcdir)/intl/Makefile.in \ ++ $(top_srcdir)/configure \ + ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS config.guess \ + config.rpath config.sub depcomp elisp-comp install-sh \ + ltmain.sh missing mkinstalldirs +@@ -64,7 +64,7 @@ am__CONFIG_DISTCLEAN_FILES = config.stat + configure.lineno configure.status.lineno + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_HEADER = config.h +-CONFIG_CLEAN_FILES = intl/Makefile ++CONFIG_CLEAN_FILES = + SOURCES = + DIST_SOURCES = + RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ +@@ -251,11 +251,10 @@ sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +-SUBDIRS = m4 po intl src emacs doc check +-EXTRA_DIST = m4/ChangeLog config.rpath README-WIN intltool-extract.in \ +- intltool-merge.in intltool-update.in ++SUBDIRS = m4 src emacs doc check ++EXTRA_DIST = m4/ChangeLog config.rpath README-WIN + +-DISTCLEANFILES = intltool-extract intltool-merge intltool-update ++DISTCLEANFILES = + ACLOCAL_AMFLAGS = -I m4 + all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -17,7 +17,7 @@ ccrypt_DEPENDENCIES = @EXTRA_OBJS@ + + localedir = $(datadir)/locale + INCLUDES = -I../intl -I$(top_srcdir)/intl -DLOCALEDIR=\"$(localedir)\" +-LIBS = @LIBINTL@ @LIBS@ ++LIBS = @LIBS@ + + maketables: maketables.c + +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -170,7 +170,7 @@ LDFLAGS = @LDFLAGS@ + LIBICONV = @LIBICONV@ + LIBINTL = @LIBINTL@ + LIBOBJS = @LIBOBJS@ +-LIBS = @LIBINTL@ @LIBS@ ++LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ + LN_S = @LN_S@ + LTLIBICONV = @LTLIBICONV@ diff --git a/utils/cdparanoia/Makefile b/utils/cdparanoia/Makefile new file mode 100644 index 0000000..a00c88f --- /dev/null +++ b/utils/cdparanoia/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cdparanoia-III +PKG_VERSION:=10.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tgz +PKG_SOURCE_URL:=http://downloads.xiph.org/releases/cdparanoia/ +PKG_SOURCE_TARGETDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_MD5SUM:=b304bbe8ab63373924a744eac9ebc652 + +PKG_BUILD_PARALLEL:=0 + +include $(INCLUDE_DIR)/package.mk + +define Package/cdparanoia + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Cdparanoia + URL:=http://www.xiph.org/paranoia/index.html +endef + +#define Build/Configure +# echo "Build/Configure" +# $(call Build/Configure/Default) +#endef + +#define Build/Compile +#endef + +define Build/InstallDev + echo "Build/InstallDev" +endef + +define Package/cdparanoia/install + echo "package/cdparanoia/install" + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/cdparanoia $(1)/usr/bin +# $(CP) $(PKG_BUILD_DIR)/paranoia/libcdda_paranoia.so.0.$(PKG_VERSION) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/paranoia/libcdda_paranoia.so.* $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/interface/libcdda_interface.so.* $(1)/usr/lib +endef + +$(eval $(call BuildPackage,cdparanoia)) diff --git a/utils/cdparanoia/patches/002-fixbecrash-private-keyword.patch b/utils/cdparanoia/patches/002-fixbecrash-private-keyword.patch new file mode 100644 index 0000000..9cf28fc --- /dev/null +++ b/utils/cdparanoia/patches/002-fixbecrash-private-keyword.patch @@ -0,0 +1,908 @@ +diff -ur cdparanoia-III-10.2/interface/cdda_interface.h cdparanoia/interface/cdda_interface.h +--- cdparanoia-III-10.2/interface/cdda_interface.h 2008-09-11 12:43:52.000000000 +0200 ++++ cdparanoia/interface/cdda_interface.h 2009-01-28 18:02:11.000000000 +0100 +@@ -84,7 +84,7 @@ + int is_atapi; + int is_mmc; + +- cdda_private_data_t *private; ++ cdda_private_data_t *private_data; + void *reserved; + unsigned char inqbytes[4]; + +diff -ur cdparanoia-III-10.2/interface/cooked_interface.c cdparanoia/interface/cooked_interface.c +--- cdparanoia-III-10.2/interface/cooked_interface.c 2008-08-26 11:55:22.000000000 +0200 ++++ cdparanoia/interface/cooked_interface.c 2009-01-28 18:02:11.000000000 +0100 +@@ -13,13 +13,13 @@ + static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){ + struct timespec tv1; + struct timespec tv2; +- int ret1=clock_gettime(d->private->clock,&tv1); ++ int ret1=clock_gettime(d->private_data->clock,&tv1); + int ret2=ioctl(fd, command,arg); +- int ret3=clock_gettime(d->private->clock,&tv2); ++ int ret3=clock_gettime(d->private_data->clock,&tv2); + if(ret1<0 || ret3<0){ +- d->private->last_milliseconds=-1; ++ d->private_data->last_milliseconds=-1; + }else{ +- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; ++ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; + } + return ret2; + } +diff -ur cdparanoia-III-10.2/interface/interface.c cdparanoia/interface/interface.c +--- cdparanoia-III-10.2/interface/interface.c 2008-09-11 12:43:52.000000000 +0200 ++++ cdparanoia/interface/interface.c 2009-01-28 18:02:11.000000000 +0100 +@@ -39,9 +39,9 @@ + if(d->drive_model)free(d->drive_model); + if(d->cdda_fd!=-1)close(d->cdda_fd); + if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd); +- if(d->private){ +- if(d->private->sg_hd)free(d->private->sg_hd); +- free(d->private); ++ if(d->private_data){ ++ if(d->private_data->sg_hd)free(d->private_data->sg_hd); ++ free(d->private_data); + } + + free(d); +@@ -90,11 +90,11 @@ + } + } + ++ if(d->bigendianp==-1)d->bigendianp=data_bigendianp(d); ++ + if((ret=d->enable_cdda(d,1))) + return(ret); + +- /* d->select_speed(d,d->maxspeed); most drives are full speed by default */ +- if(d->bigendianp==-1)d->bigendianp=data_bigendianp(d); + return(0); + } + +@@ -118,7 +118,7 @@ + if(d->bigendianp==-1) /* not determined yet */ + d->bigendianp=data_bigendianp(d); + +- if(d->bigendianp!=bigendianp()){ ++ if(buffer && d->bigendianp!=bigendianp()){ + int i; + u_int16_t *p=(u_int16_t *)buffer; + long els=sectors*CD_FRAMESIZE_RAW/2; +@@ -127,7 +127,7 @@ + } + } + } +- if(ms)*ms=d->private->last_milliseconds; ++ if(ms)*ms=d->private_data->last_milliseconds; + return(sectors); + } + +diff -ur cdparanoia-III-10.2/interface/scan_devices.c cdparanoia/interface/scan_devices.c +--- cdparanoia-III-10.2/interface/scan_devices.c 2008-08-26 11:55:22.000000000 +0200 ++++ cdparanoia/interface/scan_devices.c 2009-01-28 18:02:11.000000000 +0100 +@@ -264,11 +264,11 @@ + d->interface=COOKED_IOCTL; + d->bigendianp=-1; /* We don't know yet... */ + d->nsectors=-1; +- d->private=calloc(1,sizeof(*d->private)); ++ d->private_data=calloc(1,sizeof(*d->private_data)); + { + /* goddamnit */ + struct timespec tv; +- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); ++ d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); + } + idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description); + return(d); +@@ -674,15 +674,15 @@ + d->bigendianp=-1; /* We don't know yet... */ + d->nsectors=-1; + d->messagedest = messagedest; +- d->private=calloc(1,sizeof(*d->private)); ++ d->private_data=calloc(1,sizeof(*d->private_data)); + { + /* goddamnit */ + struct timespec tv; +- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); ++ d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); + } + if(use_sgio){ + d->interface=SGIO_SCSI; +- d->private->sg_buffer=(unsigned char *)(d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE)); ++ d->private_data->sg_buffer=(unsigned char *)(d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE)); + g_fd=d->cdda_fd=dup(d->ioctl_fd); + }else{ + version=verify_SG_version(d,messagedest,messages); +@@ -696,8 +696,8 @@ + } + + /* malloc our big buffer for scsi commands */ +- d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE); +- d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF; ++ d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE); ++ d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF; + } + + { +@@ -772,9 +772,9 @@ + if(i_fd!=-1)close(i_fd); + if(g_fd!=-1)close(g_fd); + if(d){ +- if(d->private){ +- if(d->private->sg_hd)free(d->private->sg_hd); +- free(d->private); ++ if(d->private_data){ ++ if(d->private_data->sg_hd)free(d->private_data->sg_hd); ++ free(d->private_data); + } + free(d); + } +@@ -821,7 +821,7 @@ + d->interface=TEST_INTERFACE; + d->bigendianp=-1; /* We don't know yet... */ + d->nsectors=-1; +- d->private=calloc(1,sizeof(*d->private)); ++ d->private_data=calloc(1,sizeof(*d->private_data)); + d->drive_model=copystring("File based test interface"); + idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",d->drive_model); + +diff -ur cdparanoia-III-10.2/interface/scsi_interface.c cdparanoia/interface/scsi_interface.c +--- cdparanoia-III-10.2/interface/scsi_interface.c 2008-09-11 22:33:30.000000000 +0200 ++++ cdparanoia/interface/scsi_interface.c 2009-01-28 18:02:11.000000000 +0100 +@@ -15,13 +15,13 @@ + static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){ + struct timespec tv1; + struct timespec tv2; +- int ret1=clock_gettime(d->private->clock,&tv1); ++ int ret1=clock_gettime(d->private_data->clock,&tv1); + int ret2=ioctl(fd, command,arg); +- int ret3=clock_gettime(d->private->clock,&tv2); ++ int ret3=clock_gettime(d->private_data->clock,&tv2); + if(ret1<0 || ret3<0){ +- d->private->last_milliseconds=-1; ++ d->private_data->last_milliseconds=-1; + }else{ +- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; ++ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; + } + return ret2; + } +@@ -96,7 +96,7 @@ + static void clear_garbage(cdrom_drive *d){ + fd_set fdset; + struct timeval tv; +- struct sg_header *sg_hd=d->private->sg_hd; ++ struct sg_header *sg_hd=d->private_data->sg_hd; + int flag=0; + + /* clear out any possibly preexisting garbage */ +@@ -185,7 +185,7 @@ + struct timespec tv2; + int tret1,tret2; + int status = 0; +- struct sg_header *sg_hd=d->private->sg_hd; ++ struct sg_header *sg_hd=d->private_data->sg_hd; + long writebytes=SG_OFF+cmd_len+in_size; + + /* generic scsi device services */ +@@ -195,7 +195,7 @@ + + memset(sg_hd,0,sizeof(sg_hd)); + memset(sense_buffer,0,SG_MAX_SENSE); +- memcpy(d->private->sg_buffer,cmd,cmd_len+in_size); ++ memcpy(d->private_data->sg_buffer,cmd,cmd_len+in_size); + sg_hd->twelve_byte = cmd_len == 12; + sg_hd->result = 0; + sg_hd->reply_len = SG_OFF + out_size; +@@ -209,7 +209,7 @@ + tell if the command failed. Scared yet? */ + + if(bytecheck && out_size>in_size){ +- memset(d->private->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); ++ memset(d->private_data->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); + /* the size does not remove cmd_len due to the way the kernel + driver copies buffers */ + writebytes+=(out_size-in_size); +@@ -243,7 +243,7 @@ + } + + sigprocmask (SIG_BLOCK, &(d->sigset), NULL ); +- tret1=clock_gettime(d->private->clock,&tv1); ++ tret1=clock_gettime(d->private_data->clock,&tv1); + errno=0; + status = write(d->cdda_fd, sg_hd, writebytes ); + +@@ -289,7 +289,7 @@ + } + } + +- tret2=clock_gettime(d->private->clock,&tv2); ++ tret2=clock_gettime(d->private_data->clock,&tv2); + errno=0; + status = read(d->cdda_fd, sg_hd, SG_OFF + out_size); + sigprocmask ( SIG_UNBLOCK, &(d->sigset), NULL ); +@@ -313,7 +313,7 @@ + if(bytecheck && in_size+cmd_lenprivate->sg_buffer[i]!=bytefill){ ++ if(d->private_data->sg_buffer[i]!=bytefill){ + flag=1; + break; + } +@@ -326,9 +326,9 @@ + + errno=0; + if(tret1<0 || tret2<0){ +- d->private->last_milliseconds=-1; ++ d->private_data->last_milliseconds=-1; + }else{ +- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000; ++ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000; + } + return(0); + } +@@ -347,7 +347,7 @@ + + memset(&hdr,0,sizeof(hdr)); + memset(sense,0,sizeof(sense)); +- memcpy(d->private->sg_buffer,cmd+cmd_len,in_size); ++ memcpy(d->private_data->sg_buffer,cmd+cmd_len,in_size); + + hdr.cmdp = cmd; + hdr.cmd_len = cmd_len; +@@ -355,7 +355,7 @@ + hdr.mx_sb_len = SG_MAX_SENSE; + hdr.timeout = 50000; + hdr.interface_id = 'S'; +- hdr.dxferp = d->private->sg_buffer; ++ hdr.dxferp = d->private_data->sg_buffer; + hdr.flags = SG_FLAG_DIRECT_IO; /* direct IO if we can get it */ + + /* scary buffer fill hack */ +@@ -400,7 +400,7 @@ + if(bytecheck && in_sizeprivate->sg_buffer[i]!=bytefill){ ++ if(d->private_data->sg_buffer[i]!=bytefill){ + flag=1; + break; + } +@@ -412,7 +412,7 @@ + } + + /* Can't rely on .duration because we can't be certain kernel has HZ set to something useful */ +- /* d->private->last_milliseconds = hdr.duration; */ ++ /* d->private_data->last_milliseconds = hdr.duration; */ + + errno = 0; + return 0; +@@ -445,9 +445,9 @@ + + handle_scsi_cmd(d, cmd, 6, 0, 56, 0,0, sense); + +- key = d->private->sg_buffer[2] & 0xf; +- ASC = d->private->sg_buffer[12]; +- ASCQ = d->private->sg_buffer[13]; ++ key = d->private_data->sg_buffer[2] & 0xf; ++ ASC = d->private_data->sg_buffer[12]; ++ ASCQ = d->private_data->sg_buffer[13]; + + if(key == 2 && ASC == 4 && ASCQ == 1) return 0; + return 1; +@@ -492,7 +492,7 @@ + if (handle_scsi_cmd (d, cmd, 10, 0, size+4,'\377',1,sense)) return(1); + + { +- unsigned char *b=d->private->sg_buffer; ++ unsigned char *b=d->private_data->sg_buffer; + if(b[0])return(1); /* Handles only up to 256 bytes */ + if(b[6])return(1); /* Handles only up to 256 bytes */ + +@@ -604,8 +604,8 @@ + static unsigned int get_orig_sectorsize(cdrom_drive *d){ + if(mode_sense(d,12,0x01))return(-1); + +- d->orgdens = d->private->sg_buffer[4]; +- return(d->orgsize = ((int)(d->private->sg_buffer[10])<<8)+d->private->sg_buffer[11]); ++ d->orgdens = d->private_data->sg_buffer[4]; ++ return(d->orgsize = ((int)(d->private_data->sg_buffer[10])<<8)+d->private_data->sg_buffer[11]); + } + + /* switch CDROM scsi drives to given sector size */ +@@ -664,8 +664,8 @@ + return(-4); + } + +- first=d->private->sg_buffer[2]; +- last=d->private->sg_buffer[3]; ++ first=d->private_data->sg_buffer[2]; ++ last=d->private_data->sg_buffer[3]; + tracks=last-first+1; + + if (last > MAXTRK || first > MAXTRK || last<0 || first<0) { +@@ -683,7 +683,7 @@ + return(-5); + } + { +- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4); ++ scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4); + + d->disc_toc[i-first].bFlags=toc->bFlags; + d->disc_toc[i-first].bTrack=i; +@@ -704,7 +704,7 @@ + return(-2); + } + { +- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4); ++ scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4); + + d->disc_toc[i-first].bFlags=toc->bFlags; + d->disc_toc[i-first].bTrack=0xAA; +@@ -738,7 +738,7 @@ + } + + /* copy to our structure and convert start sector */ +- tracks = d->private->sg_buffer[1]; ++ tracks = d->private_data->sg_buffer[1]; + if (tracks > MAXTRK) { + cderror(d,"003: CDROM reporting illegal number of tracks\n"); + return(-3); +@@ -754,33 +754,33 @@ + return(-5); + } + +- d->disc_toc[i].bFlags = d->private->sg_buffer[10]; ++ d->disc_toc[i].bFlags = d->private_data->sg_buffer[10]; + d->disc_toc[i].bTrack = i + 1; + + d->disc_toc[i].dwStartSector= d->adjust_ssize * +- (((signed char)(d->private->sg_buffer[2])<<24) | +- (d->private->sg_buffer[3]<<16)| +- (d->private->sg_buffer[4]<<8)| +- (d->private->sg_buffer[5])); ++ (((signed char)(d->private_data->sg_buffer[2])<<24) | ++ (d->private_data->sg_buffer[3]<<16)| ++ (d->private_data->sg_buffer[4]<<8)| ++ (d->private_data->sg_buffer[5])); + } + + d->disc_toc[i].bFlags = 0; + d->disc_toc[i].bTrack = i + 1; +- memcpy (&foo, d->private->sg_buffer+2, 4); +- memcpy (&bar, d->private->sg_buffer+6, 4); ++ memcpy (&foo, d->private_data->sg_buffer+2, 4); ++ memcpy (&bar, d->private_data->sg_buffer+6, 4); + d->disc_toc[i].dwStartSector = d->adjust_ssize * (be32_to_cpu(foo) + + be32_to_cpu(bar)); + + d->disc_toc[i].dwStartSector= d->adjust_ssize * +- ((((signed char)(d->private->sg_buffer[2])<<24) | +- (d->private->sg_buffer[3]<<16)| +- (d->private->sg_buffer[4]<<8)| +- (d->private->sg_buffer[5]))+ ++ ((((signed char)(d->private_data->sg_buffer[2])<<24) | ++ (d->private_data->sg_buffer[3]<<16)| ++ (d->private_data->sg_buffer[4]<<8)| ++ (d->private_data->sg_buffer[5]))+ + +- ((((signed char)(d->private->sg_buffer[6])<<24) | +- (d->private->sg_buffer[7]<<16)| +- (d->private->sg_buffer[8]<<8)| +- (d->private->sg_buffer[9])))); ++ ((((signed char)(d->private_data->sg_buffer[6])<<24) | ++ (d->private_data->sg_buffer[7]<<16)| ++ (d->private_data->sg_buffer[8]<<8)| ++ (d->private_data->sg_buffer[9])))); + + + d->cd_extra = FixupTOC(d,tracks+1); +@@ -817,7 +817,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -836,7 +836,7 @@ + cmd[9] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -854,7 +854,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -872,7 +872,7 @@ + cmd[9] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -890,7 +890,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -908,7 +908,7 @@ + cmd[9] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -922,7 +922,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -936,7 +936,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -950,7 +950,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -964,7 +964,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -978,7 +978,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -992,7 +992,7 @@ + cmd[8] = sectors; + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -1026,7 +1026,7 @@ + + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -1039,7 +1039,7 @@ + + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -1052,7 +1052,7 @@ + + if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) + return(ret); +- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); ++ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW); + return(0); + } + +@@ -1275,7 +1275,7 @@ + static int count_2352_bytes(cdrom_drive *d){ + long i; + for(i=2351;i>=0;i--) +- if(d->private->sg_buffer[i]!=(unsigned char)'\177') ++ if(d->private_data->sg_buffer[i]!=(unsigned char)'\177') + return(((i+3)>>2)<<2); + + return(0); +@@ -1284,7 +1284,7 @@ + static int verify_nonzero(cdrom_drive *d){ + long i,flag=0; + for(i=0;i<2352;i++) +- if(d->private->sg_buffer[i]!=0){ ++ if(d->private_data->sg_buffer[i]!=0){ + flag=1; + break; + } +@@ -1298,7 +1298,7 @@ + + static int verify_read_command(cdrom_drive *d){ + int i,j,k; +- int audioflag=0; ++ int audioflag=1; + + int (*enablecommand) (struct cdrom_drive *d, int speed); + long (*readcommand) (struct cdrom_drive *d, void *p, long begin, +@@ -1313,7 +1313,7 @@ + for data */ + + if(d->enable_cdda(d,1)==0){ +- ++ audioflag=0; + for(i=1;i<=d->tracks;i++){ + if(cdda_track_audiop(d,i)==1){ + long firstsector=cdda_track_firstsector(d,i); +@@ -1358,115 +1358,111 @@ + /* NEC test must come before sony; the nec drive expects d8 to be + 10 bytes, and a 12 byte verson (Sony) crashes the drive */ + +- for(j=0;j<15;j++){ +- int densitypossible=1; +- +- switch(j){ ++ for(i=0;i<5;i++){ ++ switch(i){ + case 0: +- d->read_audio=scsi_read_28; +- rs="28 0x,00"; ++ d->density=0; ++ d->enable_cdda=Dummy; ++ es="none "; + break; + case 1: +- d->read_audio=scsi_read_A8; +- rs="a8 0x,00"; ++ d->density=0; ++ d->enable_cdda=scsi_enable_cdda; ++ es="yes/0x00"; + break; +- + case 2: +- d->read_audio=scsi_read_mmcB; +- rs="be 02,10"; +- densitypossible=0; ++ d->density=0x04; ++ d->enable_cdda=scsi_enable_cdda; ++ es="yes/0x04"; + break; + case 3: +- d->read_audio=scsi_read_mmc2B; +- rs="be 02,f8"; +- densitypossible=0; ++ d->density=0x82; ++ d->enable_cdda=scsi_enable_cdda; ++ es="yes/0x82"; + break; + case 4: +- d->read_audio=scsi_read_mmc3B; +- rs="be 06,f8"; +- densitypossible=0; +- break; +- +- case 5: +- d->read_audio=scsi_read_mmc; +- rs="be 00,10"; +- densitypossible=0; +- break; +- case 6: +- d->read_audio=scsi_read_mmc2; +- rs="be 00,f8"; +- densitypossible=0; +- break; +- case 7: +- d->read_audio=scsi_read_mmc3; +- rs="be 04,f8"; +- densitypossible=0; +- break; +- +- case 8: +- d->read_audio=scsi_read_msf; +- rs="b9 00,10"; +- densitypossible=0; +- break; +- case 9: +- d->read_audio=scsi_read_msf2; +- rs="b9 00,f8"; +- densitypossible=0; +- break; +- case 10: +- d->read_audio=scsi_read_msf3; +- rs="b9 04,f8"; +- densitypossible=0; +- break; +- +- case 11: +- d->read_audio=scsi_read_D4_10; +- rs="d4(10)0x"; +- break; +- case 12: +- d->read_audio=scsi_read_D4_12; +- rs="d4(12)0x"; +- break; +- case 13: +- d->read_audio=scsi_read_D5; +- rs="d5 0x,00"; +- break; +- case 14: +- d->read_audio=scsi_read_D8; +- rs="d8 0x,00"; ++ d->density=0x81; ++ d->enable_cdda=scsi_enable_cdda; ++ es="yes/0x81"; + break; + } +- +- for(i=0;i<5;i++){ +- switch(i){ ++ ++ for(j=0;j<15;j++){ ++ ++ switch(j){ + case 0: +- d->density=0; +- d->enable_cdda=Dummy; +- es="none "; +- if(!densitypossible)i=5; /* short circuit MMC style commands */ ++ d->read_audio=scsi_read_28; ++ rs="28 0x,00"; + break; + case 1: +- d->density=0; +- d->enable_cdda=scsi_enable_cdda; +- es="yes/0x00"; ++ d->read_audio=scsi_read_A8; ++ rs="a8 0x,00"; + break; ++ ++ /* 2 through 10 do not allow/require density */ + case 2: +- d->density=0x04; +- d->enable_cdda=scsi_enable_cdda; +- es="yes/0x04"; +- break; ++ d->read_audio=scsi_read_mmcB; ++ rs="be 02,10"; ++ if(i==0)break; + case 3: +- d->density=0x82; +- d->enable_cdda=scsi_enable_cdda; +- es="yes/0x82"; +- break; ++ j=3; ++ d->read_audio=scsi_read_mmc2B; ++ rs="be 02,f8"; ++ if(i==0)break; + case 4: +- d->density=0x81; +- d->enable_cdda=scsi_enable_cdda; +- es="yes/0x81"; ++ j=4; ++ d->read_audio=scsi_read_mmc3B; ++ rs="be 06,f8"; ++ if(i==0)break; ++ case 5: ++ j=5; ++ d->read_audio=scsi_read_mmc; ++ rs="be 00,10"; ++ if(i==0)break; ++ case 6: ++ j=6; ++ d->read_audio=scsi_read_mmc2; ++ rs="be 00,f8"; ++ if(i==0)break; ++ case 7: ++ j=7; ++ d->read_audio=scsi_read_mmc3; ++ rs="be 04,f8"; ++ if(i==0)break; ++ case 8: ++ j=8; ++ d->read_audio=scsi_read_msf; ++ rs="b9 00,10"; ++ if(i==0)break; ++ case 9: ++ j=9; ++ d->read_audio=scsi_read_msf2; ++ rs="b9 00,f8"; ++ if(i==0)break; ++ case 10: ++ j=10; ++ d->read_audio=scsi_read_msf3; ++ rs="b9 04,f8"; ++ if(i==0)break; ++ ++ case 11: ++ d->read_audio=scsi_read_D4_10; ++ rs="d4(10)0x"; ++ break; ++ case 12: ++ d->read_audio=scsi_read_D4_12; ++ rs="d4(12)0x"; ++ break; ++ case 13: ++ d->read_audio=scsi_read_D5; ++ rs="d5 0x,00"; ++ break; ++ case 14: ++ d->read_audio=scsi_read_D8; ++ rs="d8 0x,00"; + break; + } +- ++ + cdmessage(d,"\ttest -> density: ["); + cdmessage(d,es); + cdmessage(d,"] command: ["); +@@ -1525,21 +1521,21 @@ + if(zeroflag){ + char buffer[256]; + sprintf(buffer,"\t\tDrive returned %d packet(s), but contents\n" +- "\t\twere entirely zero\n",zeroflag); ++ "\t\twere entirely zero\n",zeroflag); + cdmessage(d,buffer); + } + } + } + } +- ++ + /* D'oh. */ + d->density=density; + d->read_audio=readcommand; + d->enable_cdda=enablecommand; +- ++ + cdmessage(d,"\tUnable to find any suitable command set from probe;\n" + "\tdrive probably not CDDA capable.\n"); +- ++ + cderror(d,"006: Could not read any data from drive\n"); + + } +@@ -1625,7 +1621,7 @@ + d->is_mmc=0; + if(mode_sense(d,22,0x2A)==0){ + +- b=d->private->sg_buffer; ++ b=d->private_data->sg_buffer; + b+=b[3]+4; + + if((b[0]&0x3F)==0x2A){ +@@ -1673,7 +1669,7 @@ + cderror(d,"008: Unable to identify CDROM model\n"); + return(NULL); + } +- return (d->private->sg_buffer); ++ return (d->private_data->sg_buffer); + } + + int scsi_init_drive(cdrom_drive *d){ +@@ -1690,33 +1686,20 @@ + if(d->is_atapi)d->lun=0; /* it should already be; just to make sure */ + + if(d->is_mmc){ +- + d->read_audio = scsi_read_mmc2B; + d->bigendianp=0; +- + check_exceptions(d,mmc_list); +- + }else{ +- + if(d->is_atapi){ + /* Not MMC maybe still uses 0xbe */ +- + d->read_audio = scsi_read_mmc2B; + d->bigendianp=0; +- + check_exceptions(d,atapi_list); +- + }else{ +- + check_exceptions(d,scsi_list); +- + } + } + +- if(!d->is_atapi)set_sectorsize(d,2048); /* we really do want the +- sector size at 2048 to begin.*/ +- d->enable_cdda(d,0); +- + d->read_toc = (!memcmp(d->drive_model, "IMS", 3) && !d->is_atapi) ? scsi_read_toc2 : + scsi_read_toc; + d->set_speed = scsi_set_speed; +@@ -1742,8 +1725,8 @@ + check_cache(d); + + d->error_retry=1; +- d->private->sg_hd=realloc(d->private->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128); +- d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF; ++ d->private_data->sg_hd=realloc(d->private_data->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128); ++ d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF; + d->report_all=1; + return(0); + } +diff -ur cdparanoia-III-10.2/interface/test_interface.c cdparanoia/interface/test_interface.c +--- cdparanoia-III-10.2/interface/test_interface.c 2008-09-11 22:33:30.000000000 +0200 ++++ cdparanoia/interface/test_interface.c 2009-01-28 18:02:11.000000000 +0100 +@@ -66,9 +66,9 @@ + if(!fd)fd=fdopen(d->cdda_fd,"r"); + + if(beginprivate->last_milliseconds=20; ++ d->private_data->last_milliseconds=20; + else +- d->private->last_milliseconds=sectors; ++ d->private_data->last_milliseconds=sectors; + + #ifdef CDDA_TEST_UNDERRUN + sectors-=1; +diff -ur cdparanoia-III-10.2/main.c cdparanoia/main.c +--- cdparanoia-III-10.2/main.c 2008-09-11 23:11:02.000000000 +0200 ++++ cdparanoia/main.c 2009-01-28 18:02:11.000000000 +0100 +@@ -746,7 +746,7 @@ + break; + case 'p': + output_type=0; +- output_endian=-1; ++ output_endian=bigendianp(); + break; + case 'r': + output_type=0; +diff -ur cdparanoia-III-10.2/version.h cdparanoia/version.h +--- cdparanoia-III-10.2/version.h 2008-09-11 22:33:30.000000000 +0200 ++++ cdparanoia/version.h 2009-01-28 18:02:11.000000000 +0100 +@@ -1,11 +1,11 @@ + /****************************************************************** + * CopyPolicy: GNU Public License 2 applies + * +- * cdda_paranoia generation III release 10.2 ++ * cdda_paranoia generation III release 10.3 + * Copyright (C) 2008 Monty monty@xiph.org + * + ******************************************************************/ + + +-#define VERSIONNUM "10.2" +-#define VERSION "cdparanoia III release " VERSIONNUM " (September 11, 2008)\n" ++#define VERSIONNUM "10.3pre" ++#define VERSION "cdparanoia III release " VERSIONNUM " (September 16, 2008)\n" diff --git a/utils/cdparanoia/patches/010-fix_configure.patch b/utils/cdparanoia/patches/010-fix_configure.patch new file mode 100644 index 0000000..3fa76a0 --- /dev/null +++ b/utils/cdparanoia/patches/010-fix_configure.patch @@ -0,0 +1,40 @@ +Index: cdparanoia-10.2/Makefile.in +=================================================================== +--- cdparanoia-10.2.orig/Makefile.in 2008-11-06 15:17:28.000000000 +0100 ++++ cdparanoia-10.2/Makefile.in 2008-11-06 15:19:12.000000000 +0100 +@@ -8,12 +8,12 @@ + srcdir=@srcdir@ + + @SET_MAKE@ +-FLAGS=@TYPESIZES@ @CFLAGS@ +-OPT=@OPT@ $(FLAGS) +-DEBUG=@DEBUG@ $(FLAGS) ++#FLAGS=@TYPESIZES@ @CFLAGS@ ++#OPT=@OPT@ $(FLAGS) ++#DEBUG=@DEBUG@ $(FLAGS) + CC=@CC@ + LD=@CC@ +-LDFLAGS=@LDFLAGS@ $(FLAGS) ++LDFLAGS=@LDFLAGS@ + AR=@AR@ + RANLIB=@RANLIB@ + INSTALL=@INSTALL@ +@@ -43,7 +43,8 @@ + all: + cd interface && $(MAKE) all + cd paranoia && $(MAKE) all +- $(MAKE) cdparanoia CFLAGS="$(OPT)" ++ $(MAKE) cdparanoia ++#CFLAGS="$(OPT)" + + debug: + cd interface && $(MAKE) debug +@@ -87,7 +88,7 @@ + $(LIBDIR)/libcdda_paranoia.so + + cdparanoia: $(OFILES) $(LIBDEP) +- $(LD) $(CFLAGS) $(LDFLAGS) $(OFILES) \ ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OFILES) \ + -L$(PWD)/paranoia -L$(PWD)/interface \ + -o cdparanoia $(LIBS) + diff --git a/utils/cifsmount/Makefile b/utils/cifsmount/Makefile new file mode 100644 index 0000000..a8cb2da --- /dev/null +++ b/utils/cifsmount/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cifsmount +PKG_VERSION:=1.5 +PKG_RELEASE:=2 + +PKG_BUILD_DIR:=$(BUILD_DIR)/cifsmount + +include $(INCLUDE_DIR)/package.mk + +define Package/cifsmount + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Filesystem + TITLE:=CIFS mounting helper utility +endef + +define Package/cifsmount/description + An user space helper utility for mounting remote CIFS shares. +endef + +define Build/Prepare +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/mount.cifs mount.cifs.c +endef + +define Package/cifsmount/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount.cifs $(1)/sbin/ +endef + +$(eval $(call BuildPackage,cifsmount)) diff --git a/utils/cifsmount/mount.cifs.c b/utils/cifsmount/mount.cifs.c new file mode 100644 index 0000000..6a7d1e6 --- /dev/null +++ b/utils/cifsmount/mount.cifs.c @@ -0,0 +1,972 @@ +/* + Mount helper utility for Linux CIFS VFS (virtual filesystem) client + Copyright (C) 2003 Steve French (sfrench@us.ibm.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. */ + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define MOUNT_CIFS_VERSION_MAJOR "1" +#define MOUNT_CIFS_VERSION_MINOR "5" + +#ifndef MOUNT_CIFS_VENDOR_SUFFIX +#define MOUNT_CIFS_VENDOR_SUFFIX "" +#endif + +#ifndef MS_MOVE +#define MS_MOVE 8192 +#endif + +char * thisprogram; +int verboseflag = 0; +static int got_password = 0; +static int got_user = 0; +static int got_domain = 0; +static int got_ip = 0; +static int got_unc = 0; +static int got_uid = 0; +static int got_gid = 0; +static int free_share_name = 0; +static char * user_name = NULL; +char * mountpassword = NULL; + + +/* BB finish BB + + cifs_umount + open nofollow - avoid symlink exposure? + get owner of dir see if matches self or if root + call system(umount argv) etc. + +BB end finish BB */ + +static void mount_cifs_usage(void) +{ + printf("\nUsage: %s -o \n", thisprogram); + printf("\nMount the remote target, specified as a UNC name,"); + printf(" to a local directory.\n\nOptions:\n"); + printf("\tuser=\n\tpass=\n\tdom=\n"); + printf("\nLess commonly used options:"); + printf("\n\tcredentials=,guest,perm,noperm,setuids,nosetuids,\n\trw,ro,sep=,iocharset=,suid,nosuid,exec,noexec"); + printf("\n\nOptions not needed for servers supporting CIFS Unix extensions (e.g. most Samba versions):"); + printf("\n\tuid=,gid=,dir_mode=,file_mode="); + printf("\n\nRarely used options:"); + printf("\n\tport=,rsize=,wsize=,unc=,ip=,dev,nodev"); + printf("\n\nOptions are described in more detail in the manual page"); + printf("\n\tman 8 mount.cifs\n"); + printf("\nTo display the version number of the mount helper:"); + printf("\n\t%s -V\n",thisprogram); + + if(mountpassword) { + memset(mountpassword,0,64); + free(mountpassword); + } + exit(1); +} + +/* caller frees username if necessary */ +static char * getusername(void) { + char *username = NULL; + struct passwd *password = getpwuid(getuid()); + + if (password) { + username = password->pw_name; + } + return username; +} + +char * parse_cifs_url(char * unc_name) +{ + printf("\nMounting cifs URL not implemented yet. Attempt to mount %s\n",unc_name); + return NULL; +} + +static int open_cred_file(char * file_name) +{ + char * line_buf; + char * temp_val; + FILE * fs; + int i, length; + fs = fopen(file_name,"r"); + if(fs == NULL) + return errno; + line_buf = malloc(4096); + if(line_buf == NULL) + return -ENOMEM; + + while(fgets(line_buf,4096,fs)) { + /* parse line from credential file */ + + /* eat leading white space */ + for(i=0;i<4086;i++) { + if((line_buf[i] != ' ') && (line_buf[i] != '\t')) + break; + /* if whitespace - skip past it */ + } + if (strncasecmp("username",line_buf+i,8) == 0) { + temp_val = strchr(line_buf + i,'='); + if(temp_val) { + /* go past equals sign */ + temp_val++; + for(length = 0;length<4087;length++) { + if(temp_val[length] == '\n') + break; + } + if(length > 4086) { + printf("mount.cifs failed due to malformed username in credentials file"); + memset(line_buf,0,4096); + if(mountpassword) { + memset(mountpassword,0,64); + } + exit(1); + } else { + got_user = 1; + user_name = calloc(1 + length,1); + /* BB adding free of user_name string before exit, + not really necessary but would be cleaner */ + strncpy(user_name,temp_val, length); + } + } + } else if (strncasecmp("password",line_buf+i,8) == 0) { + temp_val = strchr(line_buf+i,'='); + if(temp_val) { + /* go past equals sign */ + temp_val++; + for(length = 0;length<65;length++) { + if(temp_val[length] == '\n') + break; + } + if(length > 64) { + printf("mount.cifs failed: password in credentials file too long\n"); + memset(line_buf,0, 4096); + if(mountpassword) { + memset(mountpassword,0,64); + } + exit(1); + } else { + if(mountpassword == NULL) { + mountpassword = calloc(65,1); + } else + memset(mountpassword,0,64); + if(mountpassword) { + /* BB add handling for commas in password here */ + strncpy(mountpassword,temp_val,length); + got_password = 1; + } + } + } + } + } + fclose(fs); + if(line_buf) { + memset(line_buf,0,4096); + free(line_buf); + } + return 0; +} + +static int get_password_from_file(int file_descript, char * filename) +{ + int rc = 0; + int i; + char c; + + if(mountpassword == NULL) + mountpassword = calloc(65,1); + else + memset(mountpassword, 0, 64); + + if(filename != NULL) { + file_descript = open(filename, O_RDONLY); + if(file_descript < 0) { + printf("mount.cifs failed. %s attempting to open password file %s\n", + strerror(errno),filename); + exit(1); + } + } + /* else file already open and fd provided */ + + for(i=0;i<64;i++) { + rc = read(file_descript,&c,1); + if(rc < 0) { + printf("mount.cifs failed. Error %s reading password file\n",strerror(errno)); + memset(mountpassword,0,64); + if(filename != NULL) + close(file_descript); + exit(1); + } else if(rc == 0) { + if(mountpassword[0] == 0) { + if(verboseflag) + printf("\nWarning: null password used since cifs password file empty"); + } + break; + } else /* read valid character */ { + if((c == 0) || (c == '\n')) { + break; + } else + mountpassword[i] = c; + } + } + if((i == 64) && (verboseflag)) { + printf("\nWarning: password longer than 64 characters specified in cifs password file"); + } + got_password = 1; + if(filename != NULL) { + close(file_descript); + } + + return rc; +} + +static int parse_options(char * options, int * filesys_flags) +{ + char * data; + char * percent_char = NULL; + char * value = NULL; + char * next_keyword = NULL; + int rc = 0; + + if (!options) + return 1; + else + data = options; + + if(verboseflag) + printf("\n parsing options: %s", options); + +/* while ((data = strsep(&options, ",")) != NULL) { */ + while(data != NULL) { + /* check if ends with trailing comma */ + if(*data == 0) + break; + + /* format is keyword=value,keyword2=value2,keyword3=value3 etc.) */ + /* data = next keyword */ + /* value = next value ie stuff after equal sign */ + + next_keyword = strchr(data,','); + + /* temporarily null terminate end of keyword=value pair */ + if(next_keyword) + *next_keyword = 0; + + /* if (!*data) + continue; */ + + /* temporarily null terminate keyword to make keyword and value distinct */ + if ((value = strchr(data, '=')) != NULL) { + *value = '\0'; + value++; + } + + if (strncmp(data, "user", 4) == 0) { + if (!value || !*value) { + if(data[4] == '\0') { + if(verboseflag) + printf("\nskipping empty user mount parameter\n"); + /* remove the parm since it would otherwise be confusing + to the kernel code which would think it was a real username */ + data[0] = ','; + data[1] = ','; + data[2] = ','; + data[3] = ','; + /* BB remove it from mount line so as not to confuse kernel code */ + } else { + printf("username specified with no parameter\n"); + return 1; /* needs_arg; */ + } + } else { + if (strnlen(value, 260) < 260) { + got_user=1; + percent_char = strchr(value,'%'); + if(percent_char) { + *percent_char = ','; + if(mountpassword == NULL) + mountpassword = calloc(65,1); + if(mountpassword) { + if(got_password) + printf("\nmount.cifs warning - password specified twice\n"); + got_password = 1; + percent_char++; + strncpy(mountpassword, percent_char,64); + /* remove password from username */ + while(*percent_char != 0) { + *percent_char = ','; + percent_char++; + } + } + } + } else { + printf("username too long\n"); + return 1; + } + } + } else if (strncmp(data, "pass", 4) == 0) { + if (!value || !*value) { + if(got_password) { + printf("\npassword specified twice, ignoring second\n"); + } else + got_password = 1; + } else if (strnlen(value, 17) < 17) { + if(got_password) + printf("\nmount.cifs warning - password specified twice\n"); + got_password = 1; + } else { + printf("password too long\n"); + return 1; + } + } else if (strncmp(data, "ip", 2) == 0) { + if (!value || !*value) { + printf("target ip address argument missing"); + } else if (strnlen(value, 35) < 35) { + if(verboseflag) + printf("ip address %s override specified\n",value); + got_ip = 1; + } else { + printf("ip address too long\n"); + return 1; + } + } else if ((strncmp(data, "unc", 3) == 0) + || (strncmp(data, "target", 6) == 0) + || (strncmp(data, "path", 4) == 0)) { + if (!value || !*value) { + printf("invalid path to network resource\n"); + return 1; /* needs_arg; */ + } else if(strnlen(value,5) < 5) { + printf("UNC name too short"); + } + + if (strnlen(value, 300) < 300) { + got_unc = 1; + if (strncmp(value, "//", 2) == 0) { + if(got_unc) + printf("unc name specified twice, ignoring second\n"); + else + got_unc = 1; + } else if (strncmp(value, "\\\\", 2) != 0) { + printf("UNC Path does not begin with // or \\\\ \n"); + return 1; + } else { + if(got_unc) + printf("unc name specified twice, ignoring second\n"); + else + got_unc = 1; + } + } else { + printf("CIFS: UNC name too long\n"); + return 1; + } + } else if ((strncmp(data, "domain", 3) == 0) + || (strncmp(data, "workgroup", 5) == 0)) { + if (!value || !*value) { + printf("CIFS: invalid domain name\n"); + return 1; /* needs_arg; */ + } + if (strnlen(value, 65) < 65) { + got_domain = 1; + } else { + printf("domain name too long\n"); + return 1; + } + } else if (strncmp(data, "cred", 4) == 0) { + if (value && *value) { + rc = open_cred_file(value); + if(rc) { + printf("error %d opening credential file %s\n",rc, value); + return 1; + } + } else { + printf("invalid credential file name specified\n"); + return 1; + } + } else if (strncmp(data, "uid", 3) == 0) { + if (value && *value) { + got_uid = 1; + } + } else if (strncmp(data, "gid", 3) == 0) { + if (value && *value) { + got_gid = 1; + } + /* fmask and dmask synonyms for people used to smbfs syntax */ + } else if (strcmp(data, "file_mode") == 0 || strcmp(data, "fmask")==0) { + if (!value || !*value) { + printf ("Option '%s' requires a numerical argument\n", data); + return 1; + } + + if (value[0] != '0') { + printf ("WARNING: '%s' not expressed in octal.\n", data); + } + + if (strcmp (data, "fmask") == 0) { + printf ("WARNING: CIFS mount option 'fmask' is deprecated. Use 'file_mode' instead.\n"); + data = "file_mode"; /* BB fix this */ + } + } else if (strcmp(data, "dir_mode") == 0 || strcmp(data, "dmask")==0) { + if (!value || !*value) { + printf ("Option '%s' requires a numerical argument\n", data); + return 1; + } + + if (value[0] != '0') { + printf ("WARNING: '%s' not expressed in octal.\n", data); + } + + if (strcmp (data, "dmask") == 0) { + printf ("WARNING: CIFS mount option 'dmask' is deprecated. Use 'dir_mode' instead.\n"); + data = "dir_mode"; + } + /* the following eight mount options should be + stripped out from what is passed into the kernel + since these eight options are best passed as the + mount flags rather than redundantly to the kernel + and could generate spurious warnings depending on the + level of the corresponding cifs vfs kernel code */ + } else if (strncmp(data, "nosuid", 6) == 0) { + *filesys_flags |= MS_NOSUID; + } else if (strncmp(data, "suid", 4) == 0) { + *filesys_flags &= ~MS_NOSUID; + } else if (strncmp(data, "nodev", 5) == 0) { + *filesys_flags |= MS_NODEV; + } else if (strncmp(data, "dev", 3) == 0) { + *filesys_flags &= ~MS_NODEV; + } else if (strncmp(data, "noexec", 6) == 0) { + *filesys_flags |= MS_NOEXEC; + } else if (strncmp(data, "exec", 4) == 0) { + *filesys_flags &= ~MS_NOEXEC; + } else if (strncmp(data, "guest", 5) == 0) { + got_password=1; + } else if (strncmp(data, "ro", 2) == 0) { + *filesys_flags |= MS_RDONLY; + } else if (strncmp(data, "rw", 2) == 0) { + *filesys_flags &= ~MS_RDONLY; + } /* else if (strnicmp(data, "port", 4) == 0) { + if (value && *value) { + vol->port = + simple_strtoul(value, &value, 0); + } + } else if (strnicmp(data, "rsize", 5) == 0) { + if (value && *value) { + vol->rsize = + simple_strtoul(value, &value, 0); + } + } else if (strnicmp(data, "wsize", 5) == 0) { + if (value && *value) { + vol->wsize = + simple_strtoul(value, &value, 0); + } + } else if (strnicmp(data, "version", 3) == 0) { + } else { + printf("CIFS: Unknown mount option %s\n",data); + } */ /* nothing to do on those four mount options above. + Just pass to kernel and ignore them here */ + + /* move to next option */ + data = next_keyword+1; + + /* put overwritten equals sign back */ + if(value) { + value--; + *value = '='; + } + + /* put previous overwritten comma back */ + if(next_keyword) + *next_keyword = ','; + else + data = NULL; + } + return 0; +} + +/* Note that caller frees the returned buffer if necessary */ +char * parse_server(char ** punc_name) +{ + char * unc_name = *punc_name; + int length = strnlen(unc_name,1024); + char * share; + char * ipaddress_string = NULL; + struct hostent * host_entry; + struct in_addr server_ipaddr; + int rc; + + if(length > 1023) { + printf("mount error: UNC name too long"); + return NULL; + } + if (strncasecmp("cifs://",unc_name,7) == 0) + return parse_cifs_url(unc_name+7); + if (strncasecmp("smb://",unc_name,6) == 0) { + return parse_cifs_url(unc_name+6); + } + + if(length < 3) { + /* BB add code to find DFS root here */ + printf("\nMounting the DFS root for domain not implemented yet"); + return NULL; + } else { + if(strncmp(unc_name,"//",2) && strncmp(unc_name,"\\\\",2)) { + /* check for nfs syntax ie server:share */ + share = strchr(unc_name,':'); + if(share) { + free_share_name = 1; + *punc_name = malloc(length+3); + *share = '/'; + strncpy((*punc_name)+2,unc_name,length); + unc_name = *punc_name; + unc_name[length+2] = 0; + goto continue_unc_parsing; + } else { + printf("mount error: improperly formatted UNC name."); + printf(" %s does not begin with \\\\ or //\n",unc_name); + return NULL; + } + } else { +continue_unc_parsing: + unc_name[0] = '/'; + unc_name[1] = '/'; + unc_name += 2; + if ((share = strchr(unc_name, '/')) || + (share = strchr(unc_name,'\\'))) { + *share = 0; /* temporarily terminate the string */ + share += 1; + if(got_ip == 0) { + host_entry = gethostbyname(unc_name); + } + *(share - 1) = '/'; /* put the slash back */ + if(got_ip) { + if(verboseflag) + printf("ip address specified explicitly\n"); + return NULL; + } + if(host_entry == NULL) { + printf("mount error: could not find target server. TCP name %s not found ", unc_name); + printf(" rc = %d\n",rc); + return NULL; + } else { + /* BB should we pass an alternate version of the share name as Unicode */ + /* BB what about ipv6? BB */ + /* BB add retries with alternate servers in list */ + + memcpy(&server_ipaddr.s_addr, host_entry->h_addr, 4); + + ipaddress_string = inet_ntoa(server_ipaddr); + if(ipaddress_string == NULL) { + printf("mount error: could not get valid ip address for target server\n"); + return NULL; + } + return ipaddress_string; + } + } else { + /* BB add code to find DFS root (send null path on get DFS Referral to specified server here */ + printf("Mounting the DFS root for a particular server not implemented yet\n"); + return NULL; + } + } + } +} + +static struct option longopts[] = { + { "all", 0, NULL, 'a' }, + { "help",0, NULL, 'h' }, + { "move",0, NULL, 'm' }, + { "bind",0, NULL, 'b' }, + { "read-only", 0, NULL, 'r' }, + { "ro", 0, NULL, 'r' }, + { "verbose", 0, NULL, 'v' }, + { "version", 0, NULL, 'V' }, + { "read-write", 0, NULL, 'w' }, + { "rw", 0, NULL, 'w' }, + { "options", 1, NULL, 'o' }, + { "type", 1, NULL, 't' }, + { "rsize",1, NULL, 'R' }, + { "wsize",1, NULL, 'W' }, + { "uid", 1, NULL, '1'}, + { "gid", 1, NULL, '2'}, + { "user",1,NULL,'u'}, + { "username",1,NULL,'u'}, + { "dom",1,NULL,'d'}, + { "domain",1,NULL,'d'}, + { "password",1,NULL,'p'}, + { "pass",1,NULL,'p'}, + { "credentials",1,NULL,'c'}, + { "port",1,NULL,'P'}, + /* { "uuid",1,NULL,'U'}, */ /* BB unimplemented */ + { NULL, 0, NULL, 0 } +}; + +int main(int argc, char ** argv) +{ + int c; + int flags = MS_MANDLOCK; /* no need to set legacy MS_MGC_VAL */ + char * orgoptions = NULL; + char * share_name = NULL; + char * domain_name = NULL; + char * ipaddr = NULL; + char * uuid = NULL; + char * mountpoint; + char * options; + char * resolved_path; + char * temp; + int rc; + int rsize = 0; + int wsize = 0; + int nomtab = 0; + int uid = 0; + int gid = 0; + int optlen = 0; + int orgoptlen = 0; + struct stat statbuf; + struct utsname sysinfo; + struct mntent mountent; + FILE * pmntfile; + + /* setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); */ + + if(argc && argv) { + thisprogram = argv[0]; + } + if(thisprogram == NULL) + thisprogram = "mount.cifs"; + + uname(&sysinfo); + /* BB add workstation name and domain and pass down */ + +/* #ifdef _GNU_SOURCE + printf(" node: %s machine: %s sysname %s domain %s\n", sysinfo.nodename,sysinfo.machine,sysinfo.sysname,sysinfo.domainname); +#endif */ + + share_name = argv[1]; + mountpoint = argv[2]; + + /* add sharename in opts string as unc= parm */ + + while ((c = getopt_long (argc, argv, "afFhilL:no:O:rsSU:vVwt:", + longopts, NULL)) != -1) { + switch (c) { +/* No code to do the following options yet */ +/* case 'l': + list_with_volumelabel = 1; + break; + case 'L': + volumelabel = optarg; + break; */ +/* case 'a': + ++mount_all; + break; */ + + case '?': + case 'h': /* help */ + mount_cifs_usage (); + exit(1); + case 'n': + ++nomtab; + break; + case 'b': + flags |= MS_BIND; + break; + case 'm': + flags |= MS_MOVE; + break; + case 'o': + orgoptions = strdup(optarg); + break; + case 'r': /* mount readonly */ + flags |= MS_RDONLY; + break; + case 'U': + uuid = optarg; + break; + case 'v': + ++verboseflag; + break; + case 'V': + printf ("mount.cifs version: %s.%s%s\n", + MOUNT_CIFS_VERSION_MAJOR, + MOUNT_CIFS_VERSION_MINOR, + MOUNT_CIFS_VENDOR_SUFFIX); + if(mountpassword) { + memset(mountpassword,0,64); + } + exit (0); + case 'w': + flags &= ~MS_RDONLY; + break; + case 'R': + rsize = atoi(optarg) ; + break; + case 'W': + wsize = atoi(optarg); + break; + case '1': + uid = atoi(optarg); + break; + case '2': + gid = atoi(optarg); + break; + case 'u': + got_user = 1; + user_name = optarg; + break; + case 'd': + domain_name = optarg; + break; + case 'p': + if(mountpassword == NULL) + mountpassword = calloc(65,1); + if(mountpassword) { + got_password = 1; + strncpy(mountpassword,optarg,64); + } + break; + case 'S': + get_password_from_file(0 /* stdin */,NULL); + break; + case 't': + break; + default: + printf("unknown mount option %c\n",c); + mount_cifs_usage(); + exit(1); + } + } + + if(argc < 3) + mount_cifs_usage(); + + if (getenv("PASSWD")) { + if(mountpassword == NULL) + mountpassword = calloc(65,1); + if(mountpassword) { + strncpy(mountpassword,getenv("PASSWD"),64); + got_password = 1; + } + } else if (getenv("PASSWD_FD")) { + get_password_from_file(atoi(getenv("PASSWD_FD")),NULL); + } else if (getenv("PASSWD_FILE")) { + get_password_from_file(0, getenv("PASSWD_FILE")); + } + + if (orgoptions && parse_options(orgoptions, &flags)) + return -1; + + ipaddr = parse_server(&share_name); + if((ipaddr == NULL) && (got_ip == 0)) { + printf("No ip address specified and hostname not found\n"); + return -1; + } + + + /* BB save off path and pop after mount returns? */ + resolved_path = malloc(PATH_MAX+1); + if(resolved_path) { + /* Note that if we can not canonicalize the name, we get + another chance to see if it is valid when we chdir to it */ + if (realpath(mountpoint, resolved_path)) { + mountpoint = resolved_path; + } + } + if(chdir(mountpoint)) { + printf("mount error: can not change directory into mount target %s\n",mountpoint); + return -1; + } + + if(stat (".", &statbuf)) { + printf("mount error: mount point %s does not exist\n",mountpoint); + return -1; + } + + if (S_ISDIR(statbuf.st_mode) == 0) { + printf("mount error: mount point %s is not a directory\n",mountpoint); + return -1; + } + + if((getuid() != 0) && (geteuid() == 0)) { + if((statbuf.st_uid == getuid()) && (S_IRWXU == (statbuf.st_mode & S_IRWXU))) { +#ifndef CIFS_ALLOW_USR_SUID + /* Do not allow user mounts to control suid flag + for mount unless explicitly built that way */ + flags |= MS_NOSUID | MS_NODEV; +#endif + } else { + printf("mount error: permission denied or not superuser and mount.cifs not installed SUID\n"); + return -1; + } + } + + if(got_user == 0) + user_name = getusername(); + + if(got_password == 0) { + mountpassword = getpass("Password: "); /* BB obsolete */ + got_password = 1; + } + /* FIXME launch daemon (handles dfs name resolution and credential change) + remember to clear parms and overwrite password field before launching */ + if(orgoptions) { + optlen = strlen(orgoptions); + orgoptlen = optlen; + } else + optlen = 0; + if(share_name) + optlen += strlen(share_name) + 4; + if(user_name) + optlen += strlen(user_name) + 6; + if(ipaddr) + optlen += strlen(ipaddr) + 4; + if(mountpassword) + optlen += strlen(mountpassword) + 6; + options = malloc(optlen + 10); + + if(options == NULL) { + printf("Could not allocate memory for mount options\n"); + return -1; + } + + + options[0] = 0; + strncat(options,"unc=",4); + strcat(options,share_name); + /* scan backwards and reverse direction of slash */ + temp = strrchr(options, '/'); + if(temp > options + 6) + *temp = '\\'; + if(ipaddr) { + strncat(options,",ip=",4); + strcat(options,ipaddr); + } + if(user_name) { + strncat(options,",user=",6); + strcat(options,user_name); + } + if(mountpassword) { + strncat(options,",pass=",6); + strcat(options,mountpassword); + } + strncat(options,",ver=",5); + strcat(options,MOUNT_CIFS_VERSION_MAJOR); + + if(orgoptions) { + strcat(options,","); + strcat(options,orgoptions); + } + if(verboseflag) + printf("\nmount.cifs kernel mount options %s \n",options); + if(mount(share_name, mountpoint, "cifs", flags, options)) { + /* remember to kill daemon on error */ + switch (errno) { + case 0: + printf("mount failed but no error number set\n"); + break; + case ENODEV: + printf("mount error: cifs filesystem not supported by the system\n"); + break; + default: + printf("mount error %d = %s\n",errno,strerror(errno)); + } + printf("Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)\n"); + if(mountpassword) { + memset(mountpassword,0,64); + } + return -1; + } else { + pmntfile = setmntent(MOUNTED, "a+"); + if(pmntfile) { + mountent.mnt_fsname = share_name; + mountent.mnt_dir = mountpoint; + mountent.mnt_type = "cifs"; + mountent.mnt_opts = malloc(220); + if(mountent.mnt_opts) { + char * mount_user = getusername(); + memset(mountent.mnt_opts,0,200); + if(flags & MS_RDONLY) + strcat(mountent.mnt_opts,"ro"); + else + strcat(mountent.mnt_opts,"rw"); + if(flags & MS_MANDLOCK) + strcat(mountent.mnt_opts,",mand"); + else + strcat(mountent.mnt_opts,",nomand"); + if(flags & MS_NOEXEC) + strcat(mountent.mnt_opts,",noexec"); + if(flags & MS_NOSUID) + strcat(mountent.mnt_opts,",nosuid"); + if(flags & MS_NODEV) + strcat(mountent.mnt_opts,",nodev"); + if(flags & MS_SYNCHRONOUS) + strcat(mountent.mnt_opts,",synch"); + if(mount_user) { + if(getuid() != 0) { + strcat(mountent.mnt_opts,",user="); + strcat(mountent.mnt_opts,mount_user); + } + free(mount_user); + } + } + mountent.mnt_freq = 0; + mountent.mnt_passno = 0; + rc = addmntent(pmntfile,&mountent); + endmntent(pmntfile); + if(mountent.mnt_opts) + free(mountent.mnt_opts); + } else { + printf("could not update mount table\n"); + } + } + if(mountpassword) { + memset(mountpassword,0,64); + free(mountpassword); + } + + if(options) { + memset(options,0,optlen); + free(options); + } + + if(orgoptions) { + memset(orgoptions,0,orgoptlen); + free(orgoptions); + } + if(resolved_path) { + free(resolved_path); + } + + if(free_share_name) { + free(share_name); + } + return 0; +} + diff --git a/utils/cksfv/Makefile b/utils/cksfv/Makefile new file mode 100644 index 0000000..ca40189 --- /dev/null +++ b/utils/cksfv/Makefile @@ -0,0 +1,36 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cksfv +PKG_VERSION:=1.3.14 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://zakalwe.fi/~shd/foss/cksfv/files +PKG_MD5SUM:=2e15289753ea0b90b6ea86993f93b383 + +include $(INCLUDE_DIR)/package.mk + +define Package/cksfv + SECTION:=utils + CATEGORY:=Utilities + TITLE:=cksfv CRC32 checksum verification tool + URL:=http://zakalwe.fi/~shd/foss/cksfv/ +endef + +define Package/cksfv/description + cksfv is a tool for verifying CRC32 checksums. +endef + +define Package/cksfv/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/cksfv $(1)/usr/sbin/cksfv +endef + +$(eval $(call BuildPackage,cksfv)) diff --git a/utils/cmdpad/Makefile b/utils/cmdpad/Makefile new file mode 100644 index 0000000..18bdb8b --- /dev/null +++ b/utils/cmdpad/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cmdpad +PKG_VERSION:=0.0.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=@SF/cmdpad +PKG_MD5SUM:=6633b2354b7f23f9cd8e2bfb6e735965 + +include $(INCLUDE_DIR)/package.mk + +define Package/cmdpad + SECTION:=utils + CATEGORY:=Utilities + TITLE:=execute commands when a key is pressed, released or hold down + URL:=http://cmdpad.sourceforge.net/index.php +endef + +CONFIGURE_ARGS += \ + --enable-static \ + --enable-shared + +define Package/cmdpad/description + cmdpad - execute commands when a key is pressed, released or hold down. + Should be started from /etc/rc or /etc/rc.local. To run it as deamon you + need to start it with '&'. All logs are printed to standard out and standard + error (to write the log to disk use cmdpad > /var/log/cmdpad). Cmdpad + searches for /etc/cmdpad.conf and load the key bindings. Then wait for + key event and check each command to see if it should be run. +endef + +MAKE_FLAGS += \ + $(TARGET_CONFIGURE_OPTS) \ + $(1) + +define Package/cmdpad/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/cmdpad $(1)/usr/sbin + $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/cmdpad.conf $(1)/etc + $(INSTALL_BIN) ./files/cmdpad.init $(1)/etc/init.d/cmdpad +endef + +$(eval $(call BuildPackage,cmdpad)) diff --git a/utils/cmdpad/files/cmdpad.init b/utils/cmdpad/files/cmdpad.init new file mode 100644 index 0000000..c6f3577 --- /dev/null +++ b/utils/cmdpad/files/cmdpad.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org +START=93 + +start() { + /usr/sbin/cmdpad --quiet > /dev/null & +} + +stop() { + killall cmdpad +} + \ No newline at end of file diff --git a/utils/cmdpad/patches/100-Makefile.patch b/utils/cmdpad/patches/100-Makefile.patch new file mode 100644 index 0000000..61a6c8f --- /dev/null +++ b/utils/cmdpad/patches/100-Makefile.patch @@ -0,0 +1,35 @@ +--- cmdpad-0.0.3/src/Makefile.orig 2008-01-05 23:29:44.000000000 +0100 ++++ cmdpad-0.0.3/src/Makefile 2008-01-05 23:30:23.000000000 +0100 +@@ -5,25 +5,25 @@ + TOP=.. + include $(TOP)/Makefile.common + +-INCLUDE= -I/usr/include +-LIBS= -L/usr/lib -lc +-CFLAGS= -g3 +-LDFLAGS= -Xlinker -Map -Xlinker $(PROG).map #,--stack,16Mb ++#INCLUDE= -I/usr/include ++#LIBS= -L/usr/lib -lc ++#CFLAGS= -g3 ++#LDFLAGS= -Xlinker -Map -Xlinker $(PROG).map #,--stack,16Mb + OBJ= main.o command.o parse.o + SCRIPTS= *.sh + + build: $(PROG) + + $(PROG): $(OBJ) +- gcc -o $(PROG) $(OBJ) $(LIBS) $(LDFLAGS) ++ $(GCC) -o $(PROG) $(OBJ) $(LIBS) $(LDFLAGS) + @echo "===============================================" + @echo "edit $(PROG).conf file to set default preferences" + + %.o : %.c +- gcc $(CFLAGS) -D__COPYLEFT__='$(COPYLEFT)' -c $< ++ $(GCC) $(CFLAGS) -D__COPYLEFT__='$(COPYLEFT)' -c $< + + %.o : %.c %.h +- gcc $(CFLAGS) -D__COPYLEFT__='$(COPYLEFT)' -c $< ++ $(GCC) $(CFLAGS) -D__COPYLEFT__='$(COPYLEFT)' -c $< + + distclean clean: + rm $(PROG) *~ *.o -vf diff --git a/utils/cmdpad/patches/120-kernel26-compat.patch b/utils/cmdpad/patches/120-kernel26-compat.patch new file mode 100644 index 0000000..eb7beeb --- /dev/null +++ b/utils/cmdpad/patches/120-kernel26-compat.patch @@ -0,0 +1,15 @@ +--- cmdpad-0.0.3/src/parse.orig 2008-01-05 23:55:32.000000000 +0100 ++++ cmdpad-0.0.3/src/parse.c 2008-01-05 23:56:07.000000000 +0100 +@@ -289,6 +289,12 @@ + pchEventDevice = strdup( pchValue) ; + return 1 ; + } ++ if( (pchValue != NULL) && ++ (strncmp( pchValue, "/dev/event", 6) == 0) ) ++ { ++ pchEventDevice = strdup( pchValue) ; ++ return 1 ; ++ } + printf( "Option 'device' expects a /dev/input/eventX argument\n"); + return -1 ; + } diff --git a/utils/cmdpad/patches/130-no_zombie.patch b/utils/cmdpad/patches/130-no_zombie.patch new file mode 100644 index 0000000..aa4fc6a --- /dev/null +++ b/utils/cmdpad/patches/130-no_zombie.patch @@ -0,0 +1,18 @@ +--- cmdpad-0.0.3/src/command.c.orig 2003-03-29 17:54:12.000000000 +0100 ++++ cmdpad-0.0.3/src/command.c 2008-01-12 05:41:22.000000000 +0100 +@@ -68,6 +68,7 @@ + + void exec( char * command) + { ++ int status; + if( fork() == 0) { + char ** tmp ; + int i ; +@@ -88,6 +89,7 @@ + perror( "ERROR: execv") ; + exit( 1) ; + } // end if( fork()) ++ wait(&status); + } + + int getNumberofEntry() diff --git a/utils/cmdpad/patches/140-compile_fix.patch b/utils/cmdpad/patches/140-compile_fix.patch new file mode 100644 index 0000000..c7a9bb3 --- /dev/null +++ b/utils/cmdpad/patches/140-compile_fix.patch @@ -0,0 +1,11 @@ +--- a/src/parse.c ++++ b/src/parse.c +@@ -125,7 +125,7 @@ int readCommandLine( int argc, char *arg + + d2printf( "command line command %s found\n", pchCommandTranslations[ iCmd+1]) ; + +- vsnprintf( achCommand, sizeof( achCommand), ++ snprintf( achCommand, sizeof( achCommand), + pchCommandTranslations[ iCmd+1], + &argv[ i+1]) ; + diff --git a/utils/collectd/Makefile b/utils/collectd/Makefile new file mode 100644 index 0000000..06710cc --- /dev/null +++ b/utils/collectd/Makefile @@ -0,0 +1,311 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=collectd +PKG_VERSION:=4.10.2 +PKG_RELEASE:=2.1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://collectd.org/files/ +PKG_MD5SUM:=85d9d8d0a1327782661e3c89800aa70e + +PKG_FIXUP:=autoreconf +PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4 + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +COLLECTD_PLUGINS_DISABLED:= \ + apple_sensors \ + battery \ + cpufreq \ + curl_json \ + entropy \ + genericjmx \ + gmond \ + hddtemp \ + ipmi \ + ipvs \ + java \ + libvirt \ + mbmon \ + memcachec \ + memcached \ + monitorus \ + multimeter \ + netapp \ + nfs \ + notify_desktop \ + notify_email \ + openvz \ + oracle \ + perl \ + pinba \ + python \ + routeros \ + rrdcached \ + serial \ + swap \ + tape \ + tokyotyrant \ + uuid \ + vserver \ + xmms \ + zfs_arc \ + +COLLECTD_PLUGINS_SELECTED:= \ + apache \ + apcups \ + ascent \ + bind \ + conntrack \ + contextswitch \ + cpu \ + csv \ + curl \ + dbi \ + df \ + disk \ + dns \ + email \ + exec \ + filecount \ + fscache \ + interface \ + iptables \ + irq \ + iwinfo \ + load \ + logfile \ + madwifi \ + memory \ + modbus \ + mysql \ + netlink \ + network \ + nginx \ + ntpd \ + nut \ + olsrd \ + onewire \ + openvpn \ + ping \ + postgresql \ + powerdns \ + processes \ + protocols \ + rrdtool \ + sensors \ + snmp \ + syslog \ + tail \ + table \ + ted \ + tcpconns \ + teamspeak2 \ + thermal \ + unixsock \ + uptime \ + users \ + vmem \ + wireless \ + write_http \ + +PKG_CONFIG_DEPENDS:= \ + $(patsubst %,CONFIG_PACKAGE_collectd-mod-%,$(subst _,-,$(COLLECTD_PLUGINS_SELECTED))) \ + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk + +define Package/collectd/Default + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Lightweight system statistics collection daemon + URL:=http://verplant.org/collectd/ +endef + +define Package/collectd +$(call Package/collectd/Default) + DEPENDS:= +libpthread +zlib +libltdl + MENU:=1 +endef + +define Package/collectd/description + collectd is a small daemon which collects system information periodically + and provides mechanismns to store the values in a variety of ways. +endef + +TARGET_CFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +ifneq ($(CONFIG_avr32),) + TARGET_CFLAGS += -fsigned-char +endif + +# common configure args +CONFIGURE_ARGS+= \ + --disable-debug \ + --enable-daemon \ + --enable-getifaddrs \ + --with-nan-emulation \ + +CONFIGURE_VARS+= \ + CFLAGS="$$$$CFLAGS $(FPIC)" \ + LDFLAGS="$$$$LDFLAGS -lm -lz" \ + KERNEL_DIR="$(LINUX_DIR)" \ + +CONFIGURE_PLUGIN= \ + $(foreach m, $(1), \ + $(if $(CONFIG_PACKAGE_collectd-mod-$(subst _,-,$(m))),--enable-$(m),--disable-$(m)) \ + ) + +CONFIGURE_ARGS+= \ + $(call CONFIGURE_PLUGIN,$(COLLECTD_PLUGINS_SELECTED)) \ + $(call CONFIGURE_PLUGIN,$(COLLECTD_PLUGINS_DISABLED)) \ + +# exception: mod-ascent needs libxml2 +ifneq ($(CONFIG_PACKAGE_collectd-mod-ascent),) + CONFIGURE_VARS+= \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/libxml2" +endif + +ifneq ($(CONFIG_BIG_ENDIAN),) + CONFIGURE_ARGS+= --with-fp-layout=endianflip +else + CONFIGURE_ARGS+= --with-fp-layout=nothing +endif + +ifneq ($(CONFIG_PACKAGE_collectd-mod-postgresql),) + CONFIGURE_ARGS+= --with-libpq="$(STAGING_DIR)/usr/" +endif + +ifneq ($(CONFIG_PACKAGE_collectd-mod-mysql),) + CONFIGURE_ARGS+= --with-libmysql="$(STAGING_DIR)/usr/" +endif + +# exception: mod-netlink needs libnetlink from iproute +ifneq ($(CONFIG_PACKAGE_collectd-mod-netlink),) + CONFIGURE_ARGS+= --with-libnetlink="$(STAGING_DIR)/usr" +endif + +# exception: mod-modbus needs libmodbus +ifneq ($(CONFIG_PACKAGE_collectd-mod-modbus),) + CONFIGURE_ARGS+= --with-libmodbus="$(STAGING_DIR)/usr" +endif + +# exception: mod-onewire needs libow-capi +ifneq ($(CONFIG_PACKAGE_collectd-mod-onewire),) + CONFIGURE_ARGS+= --with-libowcapi="$(STAGING_DIR)/usr" +endif + +# exception: mod-rrdtool needs rrdtool-1.0.x +ifneq ($(CONFIG_PACKAGE_collectd-mod-rrdtool),) + CONFIGURE_ARGS+= --with-librrd="$(STAGING_DIR)/usr/lib/rrdtool-1.0" +endif + +define Package/collectd/conffiles +/etc/collectd.conf +endef + +define Package/collectd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/share/collectd + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/collectd/types.db $(1)/usr/share/collectd/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) ./files/collectd.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/collectd.init $(1)/etc/init.d/collectd +endef + +# 1: plugin name +# 2: plugin title/description +# 3: files +# 4: extra dependency +define BuildPlugin + + PKG_CONFIG_DEPENDS+= CONFIG_PACKAGE_collectd-mod-$(1) + + define Package/collectd-mod-$(1) + $$(call Package/collectd/Default) + TITLE:=$(2) plugin + DEPENDS:= collectd $(4) + endef + + define Package/collectd-mod-$(1)/install + $(INSTALL_DIR) $$(1)/usr/lib/collectd + for m in $(3); do \ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/collectd/$$$$$$$${m}.so \ + $$(1)/usr/lib/collectd/ ; \ + done + endef + + $$(eval $$(call BuildPackage,collectd-mod-$(1))) + +endef + +$(eval $(call BuildPackage,collectd)) + +#$(eval $(call BuildPlugin,NAME,DESCRIPTION,FILES,DEPENDENCIES)) +$(eval $(call BuildPlugin,apache,apache status input,apache,+PACKAGE_collectd-mod-apache:libcurl)) +$(eval $(call BuildPlugin,apcups,apcups status input,apcups,)) +$(eval $(call BuildPlugin,ascent,ascent status input,ascent,+PACKAGE_collectd-mod-ascent:libcurl +PACKAGE_collectd-mod-ascent:libxml2)) +$(eval $(call BuildPlugin,bind,BIND server/zone input,bind,+PACKAGE_collectd-mod-bind:libcurl +PACKAGE_collectd-mod-bind:libxml2)) +$(eval $(call BuildPlugin,conntrack,connection tracking table size input,conntrack,)) +$(eval $(call BuildPlugin,contextswitch,context switch input,contextswitch,)) +$(eval $(call BuildPlugin,cpu,CPU input,cpu,)) +$(eval $(call BuildPlugin,csv,CSV output,csv,)) +$(eval $(call BuildPlugin,curl,cURL input,curl,+PACKAGE_collectd-mod-curl:libcurl)) +$(eval $(call BuildPlugin,dbi,relational database input,dbi,+PACKAGE_collectd-mod-dbi:libdbi)) +$(eval $(call BuildPlugin,df,disk space input,df,)) +$(eval $(call BuildPlugin,disk,disk usage/timing input,disk,)) +$(eval $(call BuildPlugin,dns,DNS traffic input,dns,+PACKAGE_collectd-mod-dns:libpcap)) +$(eval $(call BuildPlugin,email,email output,email,)) +$(eval $(call BuildPlugin,exec,process exec input,exec,)) +$(eval $(call BuildPlugin,filecount,file count input,filecount,)) +$(eval $(call BuildPlugin,fscache,file-system based caching framework input,fscache,)) +$(eval $(call BuildPlugin,interface,network interfaces input,interface,)) +$(eval $(call BuildPlugin,iptables,iptables status input,iptables,+PACKAGE_collectd-mod-iptables:iptables @(!LINUX_2_4||BROKEN))) +$(eval $(call BuildPlugin,irq,interrupt usage input,irq,)) +$(eval $(call BuildPlugin,iwinfo,libiwinfo wireless statistics,iwinfo,+PACKAGE_collectd-mod-iwinfo:libiwinfo)) +$(eval $(call BuildPlugin,load,system load input,load,)) +$(eval $(call BuildPlugin,logfile,log files output,logfile,)) +$(eval $(call BuildPlugin,madwifi,MadWifi status input,madwifi,)) +$(eval $(call BuildPlugin,mysql,MySQL status input,mysql,+PACKAGE_collectd-mod-mysql:libmysqlclient)) +$(eval $(call BuildPlugin,memory,physical memory usage input,memory,)) +$(eval $(call BuildPlugin,modbus,read variables through libmodbus,modbus,+PACKAGE_collectd-mod-modbus:libmodbus)) +$(eval $(call BuildPlugin,netlink,netlink input,netlink,+PACKAGE_collectd-mod-netlink:ip @(!LINUX_2_4||BROKEN))) +$(eval $(call BuildPlugin,network,network input/output,network)) +$(eval $(call BuildPlugin,nginx,nginx status input,nginx,+PACKAGE_collectd-mod-nginx:libcurl)) +$(eval $(call BuildPlugin,ntpd,NTP daemon status input,ntpd,)) +$(eval $(call BuildPlugin,nut,UPS monitoring input,nut,@BROKEN)) +$(eval $(call BuildPlugin,olsrd,OLSRd status input,olsrd,)) +$(eval $(call BuildPlugin,onewire,onewire sensor input,onewire,+PACKAGE_collectd-mod-onewire:libow-capi @BROKEN)) +$(eval $(call BuildPlugin,openvpn,OpenVPN traffic/compression input,openvpn,)) +$(eval $(call BuildPlugin,ping,ping status input,ping,+PACKAGE_collectd-mod-ping:liboping)) +$(eval $(call BuildPlugin,postgresql,PostgreSQL status input,postgresql,+PACKAGE_collectd-mod-postgresql:libpq)) +$(eval $(call BuildPlugin,powerdns,PowerDNS server status input,powerdns,)) +$(eval $(call BuildPlugin,processes,process status input,processes,)) +$(eval $(call BuildPlugin,protocols,network protocols input,protocols,)) +$(eval $(call BuildPlugin,rrdtool,RRDtool output,rrdtool,+PACKAGE_collectd-mod-rrdtool:librrd1)) +$(eval $(call BuildPlugin,sensors,lm_sensors input,sensors,+PACKAGE_collectd-mod-sensors:libsensors @BROKEN)) +$(eval $(call BuildPlugin,snmp,SNMP input,snmp,+PACKAGE_collectd-mod-snmp:libnetsnmp)) +$(eval $(call BuildPlugin,syslog,syslog output,syslog,)) +$(eval $(call BuildPlugin,tail,tail input,tail,)) +$(eval $(call BuildPlugin,table,table-like structured file input,table,)) +$(eval $(call BuildPlugin,teamspeak2,TeamSpeak2 input,teamspeak2,)) +$(eval $(call BuildPlugin,ted,The Energy Detective input,ted,@((!TARGET_avr32)||BROKEN))) # fails on avr32 because of warnings treated as errors +$(eval $(call BuildPlugin,tcpconns,TCP connection tracking input,tcpconns,)) +$(eval $(call BuildPlugin,thermal,system temperatures input,thermal,)) +$(eval $(call BuildPlugin,unixsock,unix socket output,unixsock,)) +$(eval $(call BuildPlugin,uptime,uptime status input,uptime,)) +$(eval $(call BuildPlugin,users,user logged in status input,users,)) +$(eval $(call BuildPlugin,vmem,virtual memory usage input,vmem,)) +$(eval $(call BuildPlugin,wireless,wireless status input,wireless,)) +$(eval $(call BuildPlugin,write-http,HTTP POST output,write_http,+PACKAGE_collectd-mod-write-http:libcurl)) diff --git a/utils/collectd/files/collectd.conf b/utils/collectd/files/collectd.conf new file mode 100644 index 0000000..2ef78fe --- /dev/null +++ b/utils/collectd/files/collectd.conf @@ -0,0 +1,90 @@ +# +# OpenWrt Config file for collectd(1). +# Please read collectd.conf(5) for a list of options. +# http://collectd.org/ +# + +#Hostname "localhost" +#FQDNLookup true +BaseDir "/var/lib/collectd" +PIDFile "/var/run/collectd.pid" +#PluginDir "/usr/lib/collectd" +#TypesDB "/usr/share/collectd/types.db" +Interval 30 +ReadThreads 2 + +#LoadPlugin syslog +#LoadPlugin logfile + +# +# LogLevel info +# + +# +# LogLevel info +# File STDOUT +# Timestamp true +# + +LoadPlugin cpu +LoadPlugin df +LoadPlugin disk +LoadPlugin interface +LoadPlugin load +LoadPlugin memory +LoadPlugin network +#LoadPlugin ping +#LoadPlugin processes +#LoadPlugin rrdtool +#LoadPlugin serial +LoadPlugin wireless + +# +# FSType tmpfs +# IgnoreSelected true +# ReportByDevice false +# ReportReserved false +# ReportInodes false +# + +# +# Disk "/^[hs]d[a-f][0-9]?$/" +# IgnoreSelected false +# + +# +# Interface "eth0" +# Interface "br-lan" +# IgnoreSelected false +# + + +# Server "ff18::efc0:4a42" "25826" + Server "239.192.74.66" "25826" +# Listen "ff18::efc0:4a42" "25826" +# Listen "239.192.74.66" "25826" +# TimeToLive "128" +# Forward false +# CacheFlush 1800 +# ReportStats false + + +# +# Host "host.foo.bar" +# Interval 1.0 +# Timeout 0.9 +# TTL 255 +# SourceAddress "1.2.3.4" +# Device "eth0" +# MaxMissed -1 +# + +# +# Process "name" +# + +# +# DataDir "/var/lib/collectd/rrd" +# CacheTimeout 120 +# CacheFlush 900 +# diff --git a/utils/collectd/files/collectd.init b/utils/collectd/files/collectd.init new file mode 100644 index 0000000..6204eab --- /dev/null +++ b/utils/collectd/files/collectd.init @@ -0,0 +1,28 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2010 OpenWrt.org + +START=80 +BINARY="/usr/sbin/collectd" +PIDFILE="/var/run/collectd.pid" +DATADIR="/var/lib/collectd" + +start() { + [ -x "$BINARY" ] || exit 1 + [ -d "$DATADIR" ] || mkdir -p "$DATADIR"; + + rm -f $PIDFILE + start-stop-daemon -S -q -b -x $BINARY -m -p $PIDFILE -- -f +} + +stop() { + [ -s "$PIDFILE" ] && { + local pid="$(cat $PIDFILE)" + + start-stop-daemon -K -q -n ${BINARY##*/} -p $PIDFILE + + for i in 1 2 3 4 5; do + kill -0 $pid 2>/dev/null || return + sleep 1 + done + } +} diff --git a/utils/collectd/patches/001-undefined-AM_PATH_LIBGCRYPT.patch b/utils/collectd/patches/001-undefined-AM_PATH_LIBGCRYPT.patch new file mode 100644 index 0000000..0e01744 --- /dev/null +++ b/utils/collectd/patches/001-undefined-AM_PATH_LIBGCRYPT.patch @@ -0,0 +1,4 @@ +--- /dev/null ++++ b/fake-am_path_libgcrypt.m4 +@@ -0,0 +1 @@ ++AC_DEFUN([AM_PATH_LIBGCRYPT],[:]) diff --git a/utils/collectd/patches/002-fix-ltdl-linking.patch b/utils/collectd/patches/002-fix-ltdl-linking.patch new file mode 100644 index 0000000..359ed91 --- /dev/null +++ b/utils/collectd/patches/002-fix-ltdl-linking.patch @@ -0,0 +1,22 @@ +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -85,7 +85,7 @@ endif + + if BUILD_WITH_OWN_LIBOCONFIG + collectd_LDADD += $(LIBLTDL) liboconfig/liboconfig.la +-collectd_DEPENDENCIES += $(LIBLTDL) liboconfig/liboconfig.la ++collectd_DEPENDENCIES += liboconfig/liboconfig.la + else + collectd_LDADD += -loconfig + endif +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -57,7 +57,7 @@ bin_PROGRAMS = collectd-nagios$(EXEEXT) + @BUILD_WITH_LIBSTATGRAB_TRUE@am__append_13 = $(BUILD_WITH_LIBSTATGRAB_CFLAGS) + @BUILD_WITH_LIBSTATGRAB_TRUE@am__append_14 = $(BUILD_WITH_LIBSTATGRAB_LDFLAGS) + @BUILD_WITH_OWN_LIBOCONFIG_TRUE@am__append_15 = $(LIBLTDL) liboconfig/liboconfig.la +-@BUILD_WITH_OWN_LIBOCONFIG_TRUE@am__append_16 = $(LIBLTDL) liboconfig/liboconfig.la ++@BUILD_WITH_OWN_LIBOCONFIG_TRUE@am__append_16 = liboconfig/liboconfig.la + @BUILD_WITH_OWN_LIBOCONFIG_FALSE@am__append_17 = -loconfig + @BUILD_WITH_LIBSOCKET_TRUE@am__append_18 = -lsocket + @BUILD_AIX_TRUE@am__append_19 = -lm diff --git a/utils/collectd/patches/003-remove-werror.patch b/utils/collectd/patches/003-remove-werror.patch new file mode 100644 index 0000000..89fce67 --- /dev/null +++ b/utils/collectd/patches/003-remove-werror.patch @@ -0,0 +1,22 @@ +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -7,7 +7,7 @@ SUBDIRS += liboconfig + endif + + if COMPILER_IS_GCC +-AM_CFLAGS = -Wall -Werror ++AM_CFLAGS = -Wall + endif + + AM_CPPFLAGS = -DPREFIX='"${prefix}"' +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -1836,7 +1836,7 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + SUBDIRS = libcollectdclient $(am__append_1) $(am__append_2) +-@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/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch b/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch new file mode 100644 index 0000000..fae96d0 --- /dev/null +++ b/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch @@ -0,0 +1,57 @@ +--- a/src/rrdtool.c ++++ b/src/rrdtool.c +@@ -80,6 +80,7 @@ static const char *config_keys[] = + "HeartBeat", + "RRARows", + "RRATimespan", ++ "RRASingle", + "XFF", + "WritesPerSecond", + "RandomTimeout" +@@ -101,6 +102,8 @@ static rrdcreate_config_t rrdcreate_conf + /* timespans = */ NULL, + /* timespans_num = */ 0, + ++ /* rrasingle = */ 0, ++ + /* consolidation_functions = */ NULL, + /* consolidation_functions_num = */ 0 + }; +@@ -1027,6 +1030,14 @@ static int rrd_config (const char *key, + + free (value_copy); + } ++ else if (strcasecmp ("RRASingle", key) == 0) ++ { ++ if (IS_TRUE (value)) ++ { ++ rrdcreate_config.rrasingle = 1; ++ NOTICE ("rrdtool plugin: RRASingle = true: creating only AVERAGE RRAs"); ++ } ++ } + else if (strcasecmp ("XFF", key) == 0) + { + double tmp = atof (value); +--- a/src/utils_rrdcreate.c ++++ b/src/utils_rrdcreate.c +@@ -122,6 +122,9 @@ static int rra_get (char ***ret, const v + rts_num = rra_timespans_num; + } + ++ if (cfg->rrasingle) ++ rra_types_num = 1; ++ + rra_max = rts_num * rra_types_num; + + if ((rra_def = (char **) malloc ((rra_max + 1) * sizeof (char *))) == NULL) +--- a/src/utils_rrdcreate.h ++++ b/src/utils_rrdcreate.h +@@ -36,6 +36,8 @@ struct rrdcreate_config_s + int *timespans; + size_t timespans_num; + ++ int rrasingle; ++ + char **consolidation_functions; + size_t consolidation_functions_num; + }; diff --git a/utils/collectd/patches/110-net-device-stats.patch b/utils/collectd/patches/110-net-device-stats.patch new file mode 100644 index 0000000..91e73aa --- /dev/null +++ b/utils/collectd/patches/110-net-device-stats.patch @@ -0,0 +1,46 @@ +--- + src/interface.c | 33 ++++++++++++++++++++++++++++++++- + 1 file changed, 32 insertions(+), 1 deletion(-) + +--- a/src/interface.c ++++ b/src/interface.c +@@ -203,7 +203,38 @@ static int interface_read (void) + # define IFA_RX_ERROR rx_errors + # define IFA_TX_ERROR tx_errors + #else +-# error "No suitable type for `struct ifaddrs->ifa_data' found." ++struct net_device_stats { ++ unsigned long rx_packets; ++ unsigned long tx_packets; ++ unsigned long rx_bytes; ++ unsigned long tx_bytes; ++ unsigned long rx_errors; ++ unsigned long tx_errors; ++ unsigned long rx_dropped; ++ unsigned long tx_dropped; ++ unsigned long multicast; ++ unsigned long collisions; ++ unsigned long rx_length_errors; ++ unsigned long rx_over_errors; ++ unsigned long rx_crc_errors; ++ unsigned long rx_frame_errors; ++ unsigned long rx_fifo_errors; ++ unsigned long rx_missed_errors; ++ unsigned long tx_aborted_errors; ++ unsigned long tx_carrier_errors; ++ unsigned long tx_fifo_errors; ++ unsigned long tx_heartbeat_errors; ++ unsigned long tx_window_errors; ++ unsigned long rx_compressed; ++ unsigned long tx_compressed; ++}; ++# define IFA_DATA net_device_stats ++# define IFA_RX_BYTES rx_bytes ++# define IFA_TX_BYTES tx_bytes ++# define IFA_RX_PACKT rx_packets ++# define IFA_TX_PACKT tx_packets ++# define IFA_RX_ERROR rx_errors ++# define IFA_TX_ERROR tx_errors + #endif + + struct IFA_DATA *if_data; diff --git a/utils/collectd/patches/120-fix_kernel_2.6.37.patch b/utils/collectd/patches/120-fix_kernel_2.6.37.patch new file mode 100644 index 0000000..cca445a --- /dev/null +++ b/utils/collectd/patches/120-fix_kernel_2.6.37.patch @@ -0,0 +1,78 @@ +--- a/src/owniptc/libiptc.c ++++ b/src/owniptc/libiptc.c +@@ -81,11 +81,11 @@ static const char *hooknames[] = { + }; + + /* Convenience structures */ +-struct ipt_error_target ++ struct ipt_error_target2 + { + STRUCT_ENTRY_TARGET t; + char error[TABLE_MAXNAMELEN]; +-}; ++}; + + struct chain_head; + struct rule_head; +@@ -1007,10 +1007,10 @@ static int parse_table(TC_HANDLE_T h) + /* Convenience structures */ + struct iptcb_chain_start{ + STRUCT_ENTRY e; +- struct ipt_error_target name; ++ struct ipt_error_target2 name; + }; + #define IPTCB_CHAIN_START_SIZE (sizeof(STRUCT_ENTRY) + \ +- ALIGN(sizeof(struct ipt_error_target))) ++ ALIGN(sizeof(struct ipt_error_target2))) + + struct iptcb_chain_foot { + STRUCT_ENTRY e; +@@ -1021,10 +1021,10 @@ struct iptcb_chain_foot { + + struct iptcb_chain_error { + STRUCT_ENTRY entry; +- struct ipt_error_target target; ++ struct ipt_error_target2 target; + }; + #define IPTCB_CHAIN_ERROR_SIZE (sizeof(STRUCT_ENTRY) + \ +- ALIGN(sizeof(struct ipt_error_target))) ++ ALIGN(sizeof(struct ipt_error_target2))) + + + +@@ -1069,7 +1069,7 @@ static int iptcc_compile_chain(TC_HANDLE + head->e.next_offset = IPTCB_CHAIN_START_SIZE; + strcpy(head->name.t.u.user.name, ERROR_TARGET); + head->name.t.u.target_size = +- ALIGN(sizeof(struct ipt_error_target)); ++ ALIGN(sizeof(struct ipt_error_target2)); + strcpy(head->name.error, c->name); + } else { + repl->hook_entry[c->hooknum-1] = c->head_offset; +@@ -1113,7 +1113,7 @@ static int iptcc_compile_chain_offsets(T + if (!iptcc_is_builtin(c)) { + /* Chain has header */ + *offset += sizeof(STRUCT_ENTRY) +- + ALIGN(sizeof(struct ipt_error_target)); ++ + ALIGN(sizeof(struct ipt_error_target2)); + (*num)++; + } + +@@ -1153,7 +1153,7 @@ static int iptcc_compile_table_prep(TC_H + /* Append one error rule at end of chain */ + num++; + offset += sizeof(STRUCT_ENTRY) +- + ALIGN(sizeof(struct ipt_error_target)); ++ + ALIGN(sizeof(struct ipt_error_target2)); + + /* ruleset size is now in offset */ + *size = offset; +@@ -1177,7 +1177,7 @@ static int iptcc_compile_table(TC_HANDLE + error->entry.target_offset = sizeof(STRUCT_ENTRY); + error->entry.next_offset = IPTCB_CHAIN_ERROR_SIZE; + error->target.t.u.user.target_size = +- ALIGN(sizeof(struct ipt_error_target)); ++ ALIGN(sizeof(struct ipt_error_target2)); + strcpy((char *)&error->target.t.u.user.name, ERROR_TARGET); + strcpy((char *)&error->target.error, "ERROR"); + diff --git a/utils/collectd/patches/200-fix-git-describe-error.patch b/utils/collectd/patches/200-fix-git-describe-error.patch new file mode 100644 index 0000000..b5f6e4c --- /dev/null +++ b/utils/collectd/patches/200-fix-git-describe-error.patch @@ -0,0 +1,11 @@ +--- a/version-gen.sh ++++ b/version-gen.sh +@@ -2,7 +2,7 @@ + + DEFAULT_VERSION="4.10.2.git" + +-VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`" ++#VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`" + + if test -z "$VERSION"; then + VERSION="$DEFAULT_VERSION" diff --git a/utils/collectd/patches/300-fix-modbus.patch b/utils/collectd/patches/300-fix-modbus.patch new file mode 100644 index 0000000..b935728 --- /dev/null +++ b/utils/collectd/patches/300-fix-modbus.patch @@ -0,0 +1,34 @@ +--- a/src/modbus.c ++++ b/src/modbus.c +@@ -281,10 +281,8 @@ static int mb_init_connection (mb_host_t + + modbus_set_debug (&host->connection, 1); + +-#if 0 + /* We'll do the error handling ourselves. */ + modbus_set_error_handling (&host->connection, NOP_ON_ERROR); +-#endif + + if ((host->port < 1) || (host->port > 65535)) + host->port = MODBUS_TCP_DEFAULT_PORT; +@@ -293,10 +291,8 @@ static int mb_init_connection (mb_host_t + host->node, host->port); + + modbus_init_tcp (&host->connection, +- /* host = */ host->node); +-#if 0 ++ /* host = */ host->node, + /* port = */ host->port); +-#endif + + status = modbus_connect (&host->connection); + if (status != 0) +@@ -325,7 +321,7 @@ static int mb_init_connection (mb_host_t + static int mb_read_data (mb_host_t *host, mb_slave_t *slave, /* {{{ */ + mb_data_t *data) + { +- int values[2]; ++ uint16_t values[2]; + int values_num; + const data_set_t *ds; + int status; diff --git a/utils/collectd/patches/900-add-iwinfo-plugin.patch b/utils/collectd/patches/900-add-iwinfo-plugin.patch new file mode 100644 index 0000000..f195c1b --- /dev/null +++ b/utils/collectd/patches/900-add-iwinfo-plugin.patch @@ -0,0 +1,274 @@ +--- a/configure.in ++++ b/configure.in +@@ -471,6 +471,9 @@ AC_CHECK_HEADERS(netinet/if_ether.h, [], + have_termios_h="no" + AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"]) + ++# For the iwinfo plugin ++AC_CHECK_LIB(iwinfo, iwinfo_backend, [with_iwinfo="yes"], [with_iwinfo="no (libiwinfo not found)"], []) ++ + # + # Checks for typedefs, structures, and compiler characteristics. + # +@@ -3985,6 +3988,7 @@ plugin_interface="no" + plugin_ipmi="no" + plugin_ipvs="no" + plugin_irq="no" ++plugin_iwinfo="no" + plugin_libvirt="no" + plugin_load="no" + plugin_memory="no" +@@ -4292,6 +4296,7 @@ AC_PLUGIN([ipmi], [$plugin_ipmi], + AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters]) + AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics]) + AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics]) ++AC_PLUGIN([iwinfo], [$with_iwinfo], [Common iwinfo wireless statistics]) + AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine]) + AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics]) + AC_PLUGIN([load], [$plugin_load], [System load]) +@@ -4570,6 +4575,7 @@ Configuration: + protobuf-c . . . . . $have_protoc_c + oracle . . . . . . . $with_oracle + python . . . . . . . $with_python ++ iwinfo . . . . . . . $with_iwinfo + + Features: + daemon mode . . . . . $enable_daemon +@@ -4609,6 +4615,7 @@ Configuration: + iptables . . . . . . $enable_iptables + ipvs . . . . . . . . $enable_ipvs + irq . . . . . . . . . $enable_irq ++ iwinfo . . . . . . . $enable_iwinfo + java . . . . . . . . $enable_java + libvirt . . . . . . . $enable_libvirt + load . . . . . . . . $enable_load +--- a/src/collectd.conf.in ++++ b/src/collectd.conf.in +@@ -82,6 +82,7 @@ FQDNLookup true + #@BUILD_PLUGIN_IPMI_TRUE@LoadPlugin ipmi + #@BUILD_PLUGIN_IPVS_TRUE@LoadPlugin ipvs + #@BUILD_PLUGIN_IRQ_TRUE@LoadPlugin irq ++#@BUILD_PLUGIN_IWINFO_TRUE@LoadPlugin iwinfo + #@BUILD_PLUGIN_JAVA_TRUE@LoadPlugin java + #@BUILD_PLUGIN_LIBVIRT_TRUE@LoadPlugin libvirt + @BUILD_PLUGIN_LOAD_TRUE@@BUILD_PLUGIN_LOAD_TRUE@LoadPlugin load +@@ -372,6 +373,12 @@ FQDNLookup true + # IgnoreSelected true + # + ++# ++# Interface "ath0" ++# Interface "ra0" ++# Interface "wlan0" ++# ++ + # + # JVMArg "-verbose:jni" + # JVMArg "-Djava.class.path=@prefix@/share/collectd/java/collectd-api.jar" +--- a/src/collectd.conf.pod ++++ b/src/collectd.conf.pod +@@ -1468,6 +1468,27 @@ and all other interrupts are collected. + + =back + ++=head2 Plugin C ++ ++=over 4 ++ ++=item B I ++ ++Select this interface. By default all detected wireless interfaces will be ++collected. For a more detailed description see B below. ++ ++=item B I|I ++ ++If no configuration if given, the B-plugin will collect data from all ++detected wireless interfaces. You can use the B-option to pick the ++interfaces you're interested in. Sometimes, however, it's easier/preferred to ++collect all interfaces I a few ones. This option enables you to do ++that: By setting B to I the effect of B is ++inverted: All selected interfaces are ignored and all other interfaces are ++collected. ++ ++=back ++ + =head2 Plugin C + + The I plugin makes it possible to write extensions for collectd in Java. +--- /dev/null ++++ b/src/iwinfo.c +@@ -0,0 +1,149 @@ ++/** ++ * collectd - src/iwinfo.c ++ * Copyright (C) 2011 Jo-Philipp Wich ++ * ++ * 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; only version 2 of the License is applicable. ++ * ++ * 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 ++ **/ ++ ++#include "collectd.h" ++#include "common.h" ++#include "plugin.h" ++#include "utils_ignorelist.h" ++ ++#include ++#include ++ ++#define PROCNETDEV "/proc/net/dev" ++ ++static const char *config_keys[] = { ++ "Interface", ++ "IgnoreSelected" ++}; ++static int config_keys_num = STATIC_ARRAY_SIZE (config_keys); ++ ++static ignorelist_t *ignorelist = NULL; ++ ++static int iwinfo_config(const char *key, const char *value) ++{ ++ if (ignorelist == NULL) ++ ignorelist = ignorelist_create(1); ++ ++ if (ignorelist == NULL) ++ return 1; ++ ++ if (strcasecmp(key, "Interface") == 0) ++ ignorelist_add(ignorelist, value); ++ else if (strcasecmp(key, "IgnoreSelected") == 0) ++ ignorelist_set_invert(ignorelist, IS_TRUE(value) ? 0 : 1); ++ else ++ return -1; ++ ++ return 0; ++} ++ ++static void iwinfo_submit(const char *ifname, const char *type, int value) ++{ ++ value_t values[1]; ++ value_list_t vl = VALUE_LIST_INIT; ++ ++ values[0].gauge = value; ++ ++ vl.values = values; ++ vl.values_len = 1; ++ ++ sstrncpy(vl.host, hostname_g, sizeof(vl.host)); ++ sstrncpy(vl.plugin, "iwinfo", sizeof(vl.plugin)); ++ sstrncpy(vl.plugin_instance, ifname, sizeof(vl.plugin_instance)); ++ sstrncpy(vl.type, type, sizeof(vl.type)); ++ /*sstrncpy(vl.type_instance, "", sizeof(vl.type_instance));*/ ++ ++ plugin_dispatch_values(&vl); ++} ++ ++static void iwinfo_process(const char *ifname) ++{ ++ int val; ++ char buf[IWINFO_BUFSIZE]; ++ const struct iwinfo_ops *iw = iwinfo_backend(ifname); ++ ++ /* does appear to be a wifi iface */ ++ if (iw) ++ { ++ if (iw->bitrate(ifname, &val)) ++ val = 0; ++ iwinfo_submit(ifname, "bitrate", val * 1000); ++ ++ if (iw->signal(ifname, &val)) ++ val = 0; ++ iwinfo_submit(ifname, "signal_power", val); ++ ++ if (iw->noise(ifname, &val)) ++ val = 0; ++ iwinfo_submit(ifname, "signal_noise", val); ++ ++ if (iw->quality(ifname, &val)) ++ val = 0; ++ iwinfo_submit(ifname, "signal_quality", val); ++ ++ if (iw->assoclist(ifname, buf, &val)) ++ val = 0; ++ iwinfo_submit(ifname, "stations", val); ++ } ++ ++ iwinfo_finish(); ++} ++ ++static int iwinfo_read(void) ++{ ++ char line[1024]; ++ char ifname[128]; ++ FILE *f; ++ ++ f = fopen(PROCNETDEV, "r"); ++ if (f == NULL) ++ { ++ char err[1024]; ++ WARNING("iwinfo: Unable to open " PROCNETDEV ": %s", ++ sstrerror(errno, err, sizeof(err))); ++ return -1; ++ } ++ ++ while (fgets(line, sizeof(line), f)) ++ { ++ if (!strchr(line, ':')) ++ continue; ++ ++ if (!sscanf(line, " %127[^:]", ifname)) ++ continue; ++ ++ if (ignorelist_match(ignorelist, ifname)) ++ continue; ++ ++ if (strstr(ifname, "mon.") || strstr(ifname, ".sta") || ++ strstr(ifname, "tmp.") || strstr(ifname, "wifi")) ++ continue; ++ ++ iwinfo_process(ifname); ++ } ++ ++ fclose(f); ++ ++ return 0; ++} ++ ++void module_register(void) ++{ ++ plugin_register_config("iwinfo", iwinfo_config, config_keys, config_keys_num); ++ plugin_register_read("iwinfo", iwinfo_read); ++} +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -452,6 +452,15 @@ collectd_LDADD += "-dlopen" irq.la + collectd_DEPENDENCIES += irq.la + endif + ++if BUILD_PLUGIN_IWINFO ++pkglib_LTLIBRARIES += iwinfo.la ++iwinfo_la_SOURCES = iwinfo.c ++iwinfo_la_LDFLAGS = -module -avoid-version ++iwinfo_la_LIBADD = -liwinfo ++collectd_LDADD += "-dlopen" iwinfo.la ++collectd_DEPENDENCIES += iwinfo.la ++endif ++ + if BUILD_PLUGIN_JAVA + pkglib_LTLIBRARIES += java.la + java_la_SOURCES = java.c +--- a/src/types.db ++++ b/src/types.db +@@ -171,3 +171,4 @@ voltage value:GAUGE:U:U + vs_memory value:GAUGE:0:9223372036854775807 + vs_processes value:GAUGE:0:65535 + vs_threads value:GAUGE:0:65535 ++stations value:GAUGE:0:256 diff --git a/utils/coreutils/Makefile b/utils/coreutils/Makefile new file mode 100644 index 0000000..f311093 --- /dev/null +++ b/utils/coreutils/Makefile @@ -0,0 +1,102 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=coreutils +PKG_VERSION:=8.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@GNU/coreutils +PKG_MD5SUM:=bad596d9654e299eedea0eaf93f178fa +PKG_BUILD_DEPENDS:=libpthread + +include $(INCLUDE_DIR)/package.mk + +COREUTILS_APPLETS:=\ + base64 basename cat chcon chgrp chmod chown chroot cksum comm cp \ + csplit cut date dd dir dircolors dirname du echo env expand expr \ + factor false fmt fold groups head hostid id install join kill link \ + ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup nproc \ + od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir \ + runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf \ + sleep sort split stat stdbuf stty su sum sync tac tail tee test timeout \ + touch tr true truncate tsort tty uname unexpand uniq unlink uptime users \ + vdir wc who whoami yes + +define Package/coreutils/Default + SECTION:=utils + CATEGORY:=Utilities + TITLE:=The GNU core utilities + URL:=http://www.gnu.org/software/coreutils/ +endef + +define Package/coreutils + $(call Package/coreutils/Default) + TITLE:=The GNU core utilities + MENU:=1 +endef + +define Package/coreutils/description + Full versions of standard GNU utilities. Normally, you would not + use this package, since the functionality in BusyBox is more than + sufficient and much smaller. +endef + +define GenPlugin + define Package/$(1) + $(call Package/coreutils/Default) + DEPENDS:=coreutils + TITLE:=Utility $(2) from the GNU core utilities + endef + + define Package/$(1)/description + Full version of standard GNU $(2) utility. Normally, you would not + use this package, since the functionality in BusyBox is more than + sufficient. + endef +endef + +$(foreach a,$(COREUTILS_APPLETS),$(eval $(call GenPlugin,coreutils-$(a),$(a)))) + +CONFIGURE_VARS += \ + gl_cv_func_mbrtowc_incomplete_state=yes \ + gl_cv_func_mbrtowc_retval=yes \ + gl_cv_func_wcrtomb_retval=yes + +ifneq ($(CONFIG_USE_UCLIBC),) + CONFIGURE_VARS += \ + ac_cv_type_pthread_spinlock_t=$(if $(filter 0.9.30% 0.9.2% 0.9.31%,$(call qstrip,$(CONFIG_UCLIBC_VERSION))),no,yes) +endif + +CONFIGURE_ARGS += \ + --enable-install-program=su + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + SHELL="/bin/bash" \ + all install install-root +endef + +define Package/coreutils/install + true +endef + +define BuildPlugin + define Package/$(1)/install + $(INSTALL_DIR) $$(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/ + endef + + $$(eval $$(call BuildPackage,$(1))) +endef + +$(eval $(call BuildPackage,coreutils)) + +$(foreach a,$(COREUTILS_APPLETS),$(eval $(call BuildPlugin,coreutils-$(a),$(a)))) diff --git a/utils/coreutils/patches/001-no_docs_man_tests.patch b/utils/coreutils/patches/001-no_docs_man_tests.patch new file mode 100644 index 0000000..8e14321 --- /dev/null +++ b/utils/coreutils/patches/001-no_docs_man_tests.patch @@ -0,0 +1,22 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -17,7 +17,7 @@ + + ALL_RECURSIVE_TARGETS = + +-SUBDIRS = lib src doc man po tests gnulib-tests ++SUBDIRS = lib src po + + changelog_etc = \ + ChangeLog-2005 \ +--- a/Makefile.in ++++ b/Makefile.in +@@ -1238,7 +1238,7 @@ top_srcdir = @top_srcdir@ + + # Some tests always need root privileges, others need them only sometimes. + ALL_RECURSIVE_TARGETS = install-root check-root distcheck-hook +-SUBDIRS = lib src doc man po tests gnulib-tests ++SUBDIRS = lib src po + changelog_etc = \ + ChangeLog-2005 \ + ChangeLog-2006 \ diff --git a/utils/coreutils/patches/002-fix_compile_with_uclibc.patch b/utils/coreutils/patches/002-fix_compile_with_uclibc.patch new file mode 100644 index 0000000..dffe04e --- /dev/null +++ b/utils/coreutils/patches/002-fix_compile_with_uclibc.patch @@ -0,0 +1,12 @@ +--- a/lib/pthread.in.h ++++ b/lib/pthread.in.h +@@ -225,6 +225,9 @@ + + /* Approximate spinlocks with mutexes. */ + ++#ifdef __UCLIBC__ ++#define pthread_spinlock_t original_pthread_spinlock_t ++#endif + typedef pthread_mutex_t pthread_spinlock_t; + + static inline int diff --git a/utils/cpusage/Makefile b/utils/cpusage/Makefile new file mode 100644 index 0000000..10b5ec5 --- /dev/null +++ b/utils/cpusage/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2005 Fabian Schneider, 2010 Florian Sesser, TU Muenchen +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cpusage +PKG_VERSION:=0.31 + +PKG_BUILD_DIR:=$(BUILD_DIR)/cpusage + +include $(INCLUDE_DIR)/package.mk + +define Package/cpusage + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Outputs CPU usage statistics once per second + URL:=http://www.net.t-labs.tu-berlin.de/~fabian/software_en.html\#cpusage +endef + +define Package/cpusage/description + CPUsage outputs CPU usage statistics once per second. + Optionally writes CSV output (see '-o' option). + Written by Fabian Schneider (TUM, TUB) in 2005. + Timestamp and CSV-compliance by Florian Sesser (TUM), 2010. +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) src/* $(PKG_BUILD_DIR)/ +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -D__Linux26__ -D_BSD_SOURCE=1 -c -I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include -o $(PKG_BUILD_DIR)/cpusage.o $(PKG_BUILD_DIR)/cpusage.c + $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/cpusage -L$(STAGING_DIR)/usr/lib $(PKG_BUILD_DIR)/cpusage.o +endef + +define Package/cpusage/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/cpusage $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,cpusage)) diff --git a/utils/cpusage/src/cpusage.c b/utils/cpusage/src/cpusage.c new file mode 100644 index 0000000..a027e4f --- /dev/null +++ b/utils/cpusage/src/cpusage.c @@ -0,0 +1,426 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __FreeBSD__ +#include +#else +#include +#include +#include +#endif + +#ifdef __FreeBSD__ +static void getsysctl(char *, void *, size_t); +#define CPUSTATES 5 +#define IDLEI 3 +char *cpustatenames[] = { + "user", "nice", "system", "idle", "interrupt", NULL +}; +#endif + +#ifdef __Linux24__ +#define CPUSTATES 4 +#define IDLEI 3 +char *cpustatenames[] = { + "user", "nice", "system", "idle", NULL +}; +#endif + +#ifdef __Linux26__ +#define CPUSTATES 7 +#define IDLEI 3 +/* long names: + * user - nice - system - idle - iowait - irq - soft irq */ +char *cpustatenames[] = { + "user", "nice", "system", "idle", "iowait", "irq", "softirq", NULL +}; +#endif + +#define LIMIT 95 + +static const char usage[] = + "\n usage: cpusage [ -hos ] [ -a | -l limit ] [ -c CPU ]\n"; + +char* appname; + +static float cpu_perc[CPUSTATES]; +static float cpu_max[CPUSTATES]; +static float cpu_min[CPUSTATES]; + +int cpunum; /* -1 all, 0-n CPU/Core 0-n */ + +int output; + +int breakloop; + +/* returns 1-n yielding the number of CPU's/Cores */ +int getNumCPU() +{ +#ifdef __FreeBSD__ + return 0; +#else + + char buffer[32768]; + int fd, len, i; + char * test; + + fd = open("/proc/stat", O_RDONLY); + if(fd<=0) + fprintf(stderr, "%s: cannot open /proc/stat \n", appname); + + len = read(fd, buffer, sizeof(buffer)-1); + close(fd); + buffer[len] = '\0'; + + i=0; + + test = strstr(buffer, "cpu"); + if (test != NULL ) { + test += sizeof("cpu"); + test = strstr(test, "cpu"); + } + + while ( test != NULL ) { + test += sizeof("cpu"); + /* fprintf(stderr, "%s: DEBUG: %s\n", appname, test); */ + i++; + test = strstr(test, "cpu"); + } + return i; +#endif +} + +#ifdef __FreeBSD__ +static void getsysctl (char *name, void *ptr, size_t len) { + size_t nlen = len; + long save; + + if (sysctlbyname(name, ptr, &nlen, NULL, 0) == -1) { + fprintf(stderr, "%s: sysctl(%s...) failed: %s\n", + appname, name, strerror(errno)); + exit(1); + } + if (nlen != len) { + fprintf(stderr, "%s: sysctl(%s...) expected %lu, got %lu\n", + appname, name, (unsigned long)len, (unsigned long)nlen); + exit(1); + } + + /* swapping idle and interrupt to look like linux */ + save = ((long*) ptr)[4]; + ((long*) ptr)[4] = ((long*) ptr)[3]; + ((long*) ptr)[3] = save; +} +#else +void getSysinfo(unsigned long *ptr, size_t size) +{ + char buffer[4096]; + char match[100]; + char * start; + int fd, len, j; + + for (j = 0; j cpu_max[i] ) + cpu_max[i] = cpu_perc[i]; + /* new min ? */ + if ( cpu_perc[i] < cpu_min[i] ) + cpu_min[i] = cpu_perc[i]; + } + + return total; +} + +void print_perc(float *perc, const char *head){ + int i; + time_t Zeitstempel; + struct tm *now; + + /* human readable */ + if ( (output == 0) && (head != "")) + printf("%s: ", head); + + /* machine readable */ + if ( (output == 1) && (head != "")) + printf("%s;", head); + + /* timestamp */ + time(&Zeitstempel); + now = localtime(&Zeitstempel); + if ( output == 0 ) + printf("timestamp: %04d-%02d-%02d %02d.%02d.%02d, ", now->tm_year+1900, now->tm_mon+1, now->tm_mday, now->tm_hour, now->tm_min, now->tm_sec); + else + printf("%04d-%02d-%02d;%02d:%02d:%02d;", now->tm_year+1900, now->tm_mon+1, now->tm_mday, now->tm_hour, now->tm_min, now->tm_sec); + + if ( output == 0 ) + printf("%s: %5.1f%%, ", cpustatenames[0], perc[0]); + else + printf("%.1f", perc[0]); + + /* print out calculated information in percentages */ + for ( i = 1; i < CPUSTATES; i++) { + if ( output == 0 ) + printf("%s: %5.1f%%, ", cpustatenames[i], perc[i]); + else + printf(";%.1f", perc[i]); + } + printf("\n"); +} + +/* to catch Strg+C when looping */ +void loop_term_handler (int signum) { + breakloop = 1; +} + +int main(int argc, char** argv) { + + appname = argv[0]; + + int i,c,limit; + int runonce; /* run just once and exit */ + int avg; /* is avg measurement allready running */ + int avg_run; /* did we allready had an avg measurement */ + static long cp_time1[CPUSTATES]; + static long cp_time2[CPUSTATES]; + static long cp_avg_start[CPUSTATES]; + static long cp_avg_stop[CPUSTATES]; + static long cp_diff[CPUSTATES]; + + struct sigaction sigold, signew; + + long *old = cp_time2; + long *new = cp_time1; + + long total; + limit = LIMIT; + output = 0; /* 0: human readable; 1: machine readable */ + runonce = 0; /* 0: run continuesly; 1: run once */ + + cpunum = -1; /* -1: all CPUs/Cores, 0-n: special CPU/Core */ + + /* reading commandline options */ + while (1) { + c = getopt(argc, argv, "saohl:c:"); + + if (c == -1){ + break; + } + + switch(c){ + /*run once and exit */ + case 's': + runonce = 1; + break; + /* use avg from begin to end -> same as "-l 100" */ + case 'a': + limit = 100; + break; + case 'o': + output = 1; /* machine readable */ + // header for CSV output + printf("date;time;user;nice;system;idle;iowait;irq;softirq\n"); + break; + /* print usage */ + case 'h': + fprintf(stderr, "%s: %s", appname, usage); + exit(0); + break; + /* set limit */ + case 'l': + if ( !(sscanf(optarg, "%d", &limit) == 1) ) { + fprintf(stderr, "%s: option for -l should be integer (is %s)\n", + appname, optarg); + exit(1); + } + break; + /* select CPU/Core */ + case 'c': + if ( !(sscanf(optarg, "%d", &cpunum) == 1) ) { + fprintf(stderr, "%s: option for -c should be integer (is %s)\n", + appname, optarg); + exit(1); + } + break; + + } + } + + if (cpunum != -1) { +#ifdef __FreeBSD__ + fprintf(stderr, "%s: No CPU/Core selection available for FreeBSD\n", + appname); + exit (1); +#else + int numcpu = getNumCPU(); + if ( cpunum < numcpu ) { + printf("-- Selected CPU %d\n", cpunum ); + } else { + if (numcpu == 1) { + fprintf(stderr, "%s: CPU %d not available (found %d CPU: [0])\n", + appname, cpunum, numcpu ); + } else { + fprintf(stderr, "%s: CPU %d not available (found %d CPU's: [0]-[%d])\n ", + appname, cpunum, numcpu, numcpu - 1 ); + } + exit(1); + } + +#endif + } + + breakloop = 0; + + for (i=0; i < CPUSTATES; i++){ + cpu_max[i] = 0; + cpu_min[i] = 100; + } + + /* get information */ +#ifdef __FreeBSD__ + getsysctl("kern.cp_time", new, sizeof(cp_time1)); +#else + getSysinfo((unsigned long*)new, CPUSTATES); +#endif + + /* catch Strg+C when capturing to call pcap_breakloop() */ + memset(&signew, 0, sizeof(signew)); + signew.sa_handler = loop_term_handler; + if (sigaction(SIGINT, &signew, &sigold) < 0 ){ + fprintf(stderr, "Could not set signal handler -> exiting"); + } + + avg = 0; + avg_run = 0; + + if ( runonce ) { + breakloop=1; + } + + while(1) { + usleep( 1000000 ); + + if ( new == cp_time1 ) { + new = cp_time2; + old = cp_time1; + } else{ + new = cp_time1; + old = cp_time2; + } + + /* get information again */ +#ifdef __FreeBSD__ + getsysctl("kern.cp_time", new, sizeof(cp_time1)); +#else + getSysinfo((unsigned long*)new, CPUSTATES); +#endif + + /* convert cp_time counts to percentages */ + total = perc(CPUSTATES, new, old, cp_diff); + + /* check for avg measurement start */ + if ( !avg_run && !avg && (cpu_perc[IDLEI] <= limit) ){ + avg = 1; + for ( i = 0; i < CPUSTATES; i++ ) + cp_avg_start[i] = new[i]; + } + + /* check for avg measurement stop */ + if ( !avg_run && avg && (cpu_perc[IDLEI] > limit) ){ + avg = 0; + for ( i = 0; i < CPUSTATES; i++ ) + cp_avg_stop[i] = new[i]; + avg_run = 1; + } + + print_perc(cpu_perc, ""); + + if (breakloop) { + if (avg) { + avg = 0; + for ( i = 0; i < CPUSTATES; i++ ) + cp_avg_stop[i] = new[i]; + } + break; + } + } + + /* Set default behaviour when loop is done */ + if (sigaction(SIGINT, &sigold, &signew) < 0 ){ + fprintf(stderr, "%s: Could not restore signal handler -> exiting", appname); + } + + if ( ! runonce && output == 0) { + // print avg only when not making a one-shot msg and + // when not writing CSV output + printf("---Summary----\n"); + + print_perc(cpu_min, "Min"); + + print_perc(cpu_max, "Max"); + + perc(CPUSTATES, cp_avg_start, cp_avg_stop, cp_diff); + + print_perc(cpu_perc, "Avg"); + } + + return 0; +} + + + diff --git a/utils/crypto-tools/Makefile b/utils/crypto-tools/Makefile new file mode 100644 index 0000000..1bfcde4 --- /dev/null +++ b/utils/crypto-tools/Makefile @@ -0,0 +1,37 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=crypto-tools +PKG_VERSION:=20100325 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/ocf-linux +PKG_MD5SUM:=51e0ef8918a8cf15f78f0631341d826c + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +PKG_BUILD_DEPENDS:=libopenssl ocf-crypto-headers + +include $(INCLUDE_DIR)/package.mk + +define Package/crypto-tools + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libopenssl + TITLE:=OCF-Linux's crypto-tools + URL:=http://ocf-linux.sourceforge.net/ +endef + +define Package/crypto-tools/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/cryptotest $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/cryptokeytest $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,crypto-tools)) diff --git a/utils/cryptsetup/Makefile b/utils/cryptsetup/Makefile new file mode 100644 index 0000000..cf7c002 --- /dev/null +++ b/utils/cryptsetup/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cryptsetup +PKG_VERSION:=1.3.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://cryptsetup.googlecode.com/files/ +PKG_MD5SUM:=1f5b5a9d538e8a3c191fb7dd85b9b013 + +include $(INCLUDE_DIR)/package.mk + +TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Package/cryptsetup/Default + URL:=http://code.google.com/p/cryptsetup/ +endef + +define Package/cryptsetup +$(call Package/cryptsetup/Default) + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Cryptsetup + DEPENDS:=@!LINUX_2_4 +libblkid +libuuid +libpopt +lvm2 +libgcrypt +endef + +define Package/cryptsetup/description + Cryptsetup-luks +endef + +define Build/Compile + $(call Build/Configure/Default) + $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install +endef + +define Package/cryptsetup/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/cryptsetup $(1)/usr/sbin + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcryptsetup.so.* $(1)/usr/lib +endef + +$(eval $(call BuildPackage,cryptsetup)) diff --git a/utils/cwiid/Makefile b/utils/cwiid/Makefile new file mode 100644 index 0000000..370d4f3 --- /dev/null +++ b/utils/cwiid/Makefile @@ -0,0 +1,108 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cwiid +PKG_VERSION:=0.6.00 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://abstrakraft.org/cwiid/downloads/ +PKG_SOURCE_VERSION:=2100f14c612471084434b364501e3818c7f4144e + +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/cwiid/Default + TITLE:=Linux Nintendo Wiimote interface + URL:=http://abstrakraft.org/cwiid/ + DEPENDS:= @!LINUX_2_4 +endef + +define Package/libcwiid +$(call Package/cwiid/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE+= (library) + DEPENDS+= +bluez-libs +endef + +define Package/wminput +$(call Package/cwiid/Default) + SECTION:=utils + CATEGORY:=Utilities + TITLE+= (utility) + DEPENDS+= +libcwiid +endef + +define Package/python-cwiid +$(call Package/cwiid/Default) + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Python bindings for the cwiid libs + DEPENDS:= +python-mini +libcwiid +endef + +CONFIGURE_ARGS += \ + --without-python \ + --disable-ldconfig \ + --enable-shared \ + --enable-static \ + +TARGET_CFLAGS += $(FPIC) +TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)/libcwiid/ + +define Build/Prepare + $(call Build/Prepare/Default) + ( cd $(PKG_BUILD_DIR) ; \ + autoconf ; \ + ) +endef + +define Build/Compile + $(MAKE) -C "$(PKG_BUILD_DIR)" \ + CC="$(TARGET_CC)" \ + OFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) -L../libcwiid/" \ + all + $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) + $(call Build/Compile/PyMod,./python/, \ + install --prefix="$(PKG_INSTALL_DIR)/usr", \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/libcwiid/*.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/libcwiid/*.so $(1)/usr/lib/ +endef + +define Package/libcwiid/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/libcwiid/libcwiid.so.1.0 $(1)/usr/lib/ +endef + +define Package/wminput/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/wminput/wminput $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/lswm/lswm $(1)/usr/bin/ +endef + +define PyPackage/python-cwiid/filespec ++|$(PYTHON_PKG_DIR)/cwiid.so +endef + +$(eval $(call BuildPackage,libcwiid)) +$(eval $(call BuildPackage,wminput)) +$(eval $(call PyPackage,python-cwiid)) +$(eval $(call BuildPackage,python-cwiid)) diff --git a/utils/cwiid/patches/100-dump_gtk_wmdemo.patch b/utils/cwiid/patches/100-dump_gtk_wmdemo.patch new file mode 100644 index 0000000..ebfdeeb --- /dev/null +++ b/utils/cwiid/patches/100-dump_gtk_wmdemo.patch @@ -0,0 +1,69 @@ +Index: cwiid-0.6.00/Makefile.in +=================================================================== +--- cwiid-0.6.00.orig/Makefile.in 2010-06-20 19:32:38.000000000 +0200 ++++ cwiid-0.6.00/Makefile.in 2010-06-20 19:32:46.000000000 +0200 +@@ -3,7 +3,7 @@ + include @top_builddir@/defs.mak + + LIB_DIRS = libcwiid +-BIN_DIRS = wmgui wminput lswm ++BIN_DIRS = wminput lswm + DOC_DIRS = man doc + ifdef PYTHON + BIND_DIRS = python +Index: cwiid-0.6.00/configure.ac +=================================================================== +--- cwiid-0.6.00.orig/configure.ac 2010-06-20 19:31:22.000000000 +0200 ++++ cwiid-0.6.00/configure.ac 2010-06-20 19:31:35.000000000 +0200 +@@ -124,11 +124,6 @@ + fi + AC_SUBST(LDCONFIG) + +-pkg_modules="gtk+-2.0 >= 2.0.0 gthread-2.0" +-PKG_CHECK_MODULES([GTK], [$pkg_modules]) +-AC_SUBST(GTK_CFLAGS) +-AC_SUBST(GTK_LIBS) +- + AC_OUTPUT( + [Makefile] + [defs.mak] +Index: cwiid-0.6.00/wminput/Makefile.in +=================================================================== +--- cwiid-0.6.00.orig/wminput/Makefile.in 2010-06-20 19:47:06.000000000 +0200 ++++ cwiid-0.6.00/wminput/Makefile.in 2010-06-20 19:47:13.000000000 +0200 +@@ -14,7 +14,7 @@ + -DWMINPUT_CONFIG_DIR=\"$(WMINPUT_CONFIG_DIR)\" \ + -DCWIID_PLUGINS_DIR=\"$(CWIID_PLUGINS_DIR)\" + +-LDLIBS += -lcwiid -ldl ++LDLIBS += -lcwiid -ldl -lbluetooth + LDFLAGS += -L@top_builddir@/libcwiid -rdynamic + INST_DIR = @bindir@ + +Index: cwiid-0.6.00/lswm/Makefile.in +=================================================================== +--- cwiid-0.6.00.orig/lswm/Makefile.in 2010-06-20 19:50:13.000000000 +0200 ++++ cwiid-0.6.00/lswm/Makefile.in 2010-06-20 19:50:22.000000000 +0200 +@@ -8,7 +8,7 @@ + + CFLAGS += -I@top_builddir@/libcwiid + LDFLAGS += -L@top_builddir@/libcwiid +-LDLIBS += -lcwiid ++LDLIBS += -lcwiid -lbluetooth + INST_DIR = @bindir@ + + include $(COMMON)/include/app.mak +Index: cwiid-0.6.00/Makefile.in +=================================================================== +--- cwiid-0.6.00.orig/Makefile.in 2010-06-20 19:53:45.000000000 +0200 ++++ cwiid-0.6.00/Makefile.in 2010-06-20 19:53:54.000000000 +0200 +@@ -9,7 +9,7 @@ + BIND_DIRS = python + endif + +-SUB_DIRS = $(LIB_DIRS) $(BIN_DIRS) $(DOC_DIRS) $(BIND_DIRS) wmdemo ++SUB_DIRS = $(LIB_DIRS) $(BIN_DIRS) $(DOC_DIRS) $(BIND_DIRS) + + all install clean distclean uninstall: TARGET += $(MAKECMDGOALS) + + diff --git a/utils/daemontools/Makefile b/utils/daemontools/Makefile new file mode 100644 index 0000000..e667ce4 --- /dev/null +++ b/utils/daemontools/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2007 OpenWrt.org +# Original port by FreeWRT project. +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# Alexander Tsvyashchenko Created OpenWRT package as per Trac ticket 2497 +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=daemontools +PKG_VERSION:=0.76 +PKG_RELEASE:=1 + +PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz +PKG_SOURCE_URL:=http://cr.yp.to/daemontools/ +PKG_MD5SUM:=1871af2453d6e464034968a0fbcb2bfc + +include $(INCLUDE_DIR)/package.mk + +PKG_UNPACK += && mv $(PKG_BUILD_DIR)/../admin/* $(PKG_BUILD_DIR)/.. && rmdir $(PKG_BUILD_DIR)/../admin + +define Package/daemontools + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:= + TITLE:=Tools for managing UNIX services + URL:=http://cr.yp.to/daemontools.html +endef + +define Package/daemontools/description + Daemontools is a collection of tools for managing UNIX services by DJ Bernstein. +endef + +define Build/Compile + cd $(PKG_BUILD_DIR) && \ + TARGET_CC="$(TARGET_CC)" \ + TARGET_CFLAGS="$(TARGET_CFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \ + $(PKG_BUILD_DIR)/package/compile +endef + +define Package/daemontools/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/command/* $(1)/usr/bin +endef + +$(eval $(call BuildPackage,daemontools)) + diff --git a/utils/daemontools/patches/crosscompile.patch b/utils/daemontools/patches/crosscompile.patch new file mode 100644 index 0000000..2abb466 --- /dev/null +++ b/utils/daemontools/patches/crosscompile.patch @@ -0,0 +1,205 @@ +diff -urN daemontools-0.76/src/Makefile daemontools-0.76.new/src/Makefile +--- daemontools-0.76/src/Makefile 2001-07-12 19:49:49.000000000 +0300 ++++ daemontools-0.76.new/src/Makefile 2007-09-30 16:27:25.000000000 +0300 +@@ -101,9 +101,6 @@ + uint64.h + ./compile deepsleep.c + +-direntry.h: choose compile direntry.h1 direntry.h2 trydrent.c +- ./choose c trydrent direntry.h1 direntry.h2 > direntry.h +- + env.o: compile env.c env.h str.h + ./compile env.c + +@@ -151,29 +148,6 @@ + fmt_ulong.o: compile fmt.h fmt_ulong.c + ./compile fmt_ulong.c + +-hasflock.h: choose compile hasflock.h1 hasflock.h2 load tryflock.c +- ./choose cl tryflock hasflock.h1 hasflock.h2 > hasflock.h +- +-hasmkffo.h: choose compile hasmkffo.h1 hasmkffo.h2 load trymkffo.c +- ./choose cl trymkffo hasmkffo.h1 hasmkffo.h2 > hasmkffo.h +- +-hassgact.h: choose compile hassgact.h1 hassgact.h2 load trysgact.c +- ./choose cl trysgact hassgact.h1 hassgact.h2 > hassgact.h +- +-hassgprm.h: choose compile hassgprm.h1 hassgprm.h2 load trysgprm.c +- ./choose cl trysgprm hassgprm.h1 hassgprm.h2 > hassgprm.h +- +-hasshsgr.h: chkshsgr choose compile hasshsgr.h1 hasshsgr.h2 load \ +-tryshsgr.c warn-shsgr +- ./chkshsgr || ( cat warn-shsgr; exit 1 ) +- ./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h +- +-haswaitp.h: choose compile haswaitp.h1 haswaitp.h2 load trywaitp.c +- ./choose cl trywaitp haswaitp.h1 haswaitp.h2 > haswaitp.h +- +-iopause.h: choose compile iopause.h1 iopause.h2 load trypoll.c +- ./choose clr trypoll iopause.h1 iopause.h2 > iopause.h +- + iopause.o: compile iopause.c iopause.h select.h tai.h taia.h uint64.h + ./compile iopause.c + +@@ -265,7 +239,6 @@ + rts: envdir envuidgid fghack matchtest multilog pgrphack \ + readproctitle rts.tests setlock setuidgid softlimit supervise svc \ + svok svscan svscanboot svstat tai64n tai64nlocal +- env - /bin/sh rts.tests 2>&1 | cat -v > rts + + scan_ulong.o: compile scan.h scan_ulong.c + ./compile scan_ulong.c +@@ -273,9 +246,6 @@ + seek_set.o: compile seek.h seek_set.c + ./compile seek_set.c + +-select.h: choose compile select.h1 select.h2 trysysel.c +- ./choose c trysysel select.h1 select.h2 > select.h +- + setlock: byte.a load setlock.o unix.a + ./load setlock unix.a byte.a + +@@ -478,9 +448,6 @@ + timestamp.o: compile tai.h taia.h timestamp.c timestamp.h uint64.h + ./compile timestamp.c + +-uint64.h: choose compile load tryulong64.c uint64.h1 uint64.h2 +- ./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h +- + unix.a: alloc.o alloc_re.o buffer.o buffer_0.o buffer_1.o buffer_2.o \ + buffer_get.o buffer_put.o buffer_read.o buffer_write.o coe.o env.o \ + error.o error_str.o fd_copy.o fd_move.o fifo.o lock_ex.o lock_exnb.o \ +diff -urN daemontools-0.76/src/conf-cc daemontools-0.76.new/src/conf-cc +--- daemontools-0.76/src/conf-cc 2007-09-30 13:58:40.000000000 +0300 ++++ daemontools-0.76.new/src/conf-cc 2007-09-30 15:15:32.000000000 +0300 +@@ -1,3 +1,3 @@ +-gcc -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings ++$TARGET_CC $TARGET_CFLAGS -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -include errno.h + + This will be used to compile .c files. +diff -urN daemontools-0.76/src/conf-ld daemontools-0.76.new/src/conf-ld +--- daemontools-0.76/src/conf-ld 2001-07-12 19:49:49.000000000 +0300 ++++ daemontools-0.76.new/src/conf-ld 2007-09-30 15:15:42.000000000 +0300 +@@ -1,3 +1,3 @@ +-gcc -s ++$TARGET_CC -s $TARGET_LDFLAGS + + This will be used to link .o files into an executable. +diff -urN daemontools-0.76/src/direntry.h daemontools-0.76.new/src/direntry.h +--- daemontools-0.76/src/direntry.h 1970-01-01 03:00:00.000000000 +0300 ++++ daemontools-0.76.new/src/direntry.h 2007-09-30 13:52:11.000000000 +0300 +@@ -0,0 +1,12 @@ ++/* Public domain. */ ++ ++#ifndef DIRENTRY_H ++#define DIRENTRY_H ++ ++/* sysdep: +dirent */ ++ ++#include ++#include ++#define direntry struct dirent ++ ++#endif +diff -urN daemontools-0.76/src/hasflock.h daemontools-0.76.new/src/hasflock.h +--- daemontools-0.76/src/hasflock.h 1970-01-01 03:00:00.000000000 +0300 ++++ daemontools-0.76.new/src/hasflock.h 2007-09-30 13:52:55.000000000 +0300 +@@ -0,0 +1,4 @@ ++/* Public domain. */ ++ ++/* sysdep: +flock */ ++#define HASFLOCK 1 +diff -urN daemontools-0.76/src/hasmkffo.h daemontools-0.76.new/src/hasmkffo.h +--- daemontools-0.76/src/hasmkffo.h 1970-01-01 03:00:00.000000000 +0300 ++++ daemontools-0.76.new/src/hasmkffo.h 2007-09-30 13:53:16.000000000 +0300 +@@ -0,0 +1,4 @@ ++/* Public domain. */ ++ ++/* sysdep: +mkfifo */ ++#define HASMKFIFO 1 +diff -urN daemontools-0.76/src/hassgact.h daemontools-0.76.new/src/hassgact.h +--- daemontools-0.76/src/hassgact.h 1970-01-01 03:00:00.000000000 +0300 ++++ daemontools-0.76.new/src/hassgact.h 2007-09-30 13:53:47.000000000 +0300 +@@ -0,0 +1,4 @@ ++/* Public domain. */ ++ ++/* sysdep: +sigaction */ ++#define HASSIGACTION 1 +diff -urN daemontools-0.76/src/hassgprm.h daemontools-0.76.new/src/hassgprm.h +--- daemontools-0.76/src/hassgprm.h 1970-01-01 03:00:00.000000000 +0300 ++++ daemontools-0.76.new/src/hassgprm.h 2007-09-30 13:54:13.000000000 +0300 +@@ -0,0 +1,4 @@ ++/* Public domain. */ ++ ++/* sysdep: +sigprocmask */ ++#define HASSIGPROCMASK 1 +diff -urN daemontools-0.76/src/hasshsgr.h daemontools-0.76.new/src/hasshsgr.h +--- daemontools-0.76/src/hasshsgr.h 1970-01-01 03:00:00.000000000 +0300 ++++ daemontools-0.76.new/src/hasshsgr.h 2007-09-30 13:54:41.000000000 +0300 +@@ -0,0 +1,3 @@ ++/* Public domain. */ ++ ++/* sysdep: -shortsetgroups */ +diff -urN daemontools-0.76/src/haswaitp.h daemontools-0.76.new/src/haswaitp.h +--- daemontools-0.76/src/haswaitp.h 1970-01-01 03:00:00.000000000 +0300 ++++ daemontools-0.76.new/src/haswaitp.h 2007-09-30 13:54:57.000000000 +0300 +@@ -0,0 +1,4 @@ ++/* Public domain. */ ++ ++/* sysdep: +waitpid */ ++#define HASWAITPID 1 +diff -urN daemontools-0.76/src/iopause.h daemontools-0.76.new/src/iopause.h +--- daemontools-0.76/src/iopause.h 1970-01-01 03:00:00.000000000 +0300 ++++ daemontools-0.76.new/src/iopause.h 2007-09-30 13:55:14.000000000 +0300 +@@ -0,0 +1,20 @@ ++/* Public domain. */ ++ ++#ifndef IOPAUSE_H ++#define IOPAUSE_H ++ ++/* sysdep: +poll */ ++#define IOPAUSE_POLL ++ ++#include ++#include ++ ++typedef struct pollfd iopause_fd; ++#define IOPAUSE_READ POLLIN ++#define IOPAUSE_WRITE POLLOUT ++ ++#include "taia.h" ++ ++extern void iopause(iopause_fd *,unsigned int,struct taia *,struct taia *); ++ ++#endif +diff -urN daemontools-0.76/src/select.h daemontools-0.76.new/src/select.h +--- daemontools-0.76/src/select.h 1970-01-01 03:00:00.000000000 +0300 ++++ daemontools-0.76.new/src/select.h 2007-09-30 13:55:32.000000000 +0300 +@@ -0,0 +1,13 @@ ++/* Public domain. */ ++ ++#ifndef SELECT_H ++#define SELECT_H ++ ++/* sysdep: +sysselect */ ++ ++#include ++#include ++#include ++extern int select(); ++ ++#endif +diff -urN daemontools-0.76/src/uint64.h daemontools-0.76.new/src/uint64.h +--- daemontools-0.76/src/uint64.h 1970-01-01 03:00:00.000000000 +0300 ++++ daemontools-0.76.new/src/uint64.h 2007-09-30 13:55:54.000000000 +0300 +@@ -0,0 +1,10 @@ ++/* Public domain. */ ++ ++#ifndef UINT64_H ++#define UINT64_H ++ ++/* sysdep: -ulong64 */ ++ ++typedef unsigned long long uint64; ++ ++#endif diff --git a/utils/daemontools/patches/svscanboot.patch b/utils/daemontools/patches/svscanboot.patch new file mode 100644 index 0000000..ae59ea7 --- /dev/null +++ b/utils/daemontools/patches/svscanboot.patch @@ -0,0 +1,16 @@ +--- daemontools-0.76/src/svscanboot.sh.orig 2007-01-27 11:49:38.000000000 +0100 ++++ daemontools-0.76/src/svscanboot.sh 2007-01-27 11:52:07.000000000 +0100 +@@ -1,11 +1,11 @@ + +-PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin ++PATH=/bin:/sbin:/usr/bin:/usr/sbin + + exec /dev/null + exec 2>/dev/null + +-/command/svc -dx /service/* /service/*/log ++/usr/bin/svc -dx /service/* /service/*/log + + env - PATH=$PATH svscan /service 2>&1 | \ + env - PATH=$PATH readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................ diff --git a/utils/dash/Makefile b/utils/dash/Makefile new file mode 100644 index 0000000..84353c1 --- /dev/null +++ b/utils/dash/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dash +PKG_VERSION:=0.5.6.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://gondor.apana.org.au/~herbert/dash/files +PKG_MD5SUM:=1c846f4f5a33c0050b2045a6f7037e56 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/dash + SECTION:=base + CATEGORY:=Base system + TITLE:=Debian Almquist shell + URL:=http://gondor.apana.org.au/~herbert/dash/ +endef + +define Package/dash/description + A small footprint, POSIX complied unix shell +endef + +MAKE_FLAGS += \ + AWK="awk" \ + +define Package/dash/install + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dash $(1)/bin/ +endef + +$(eval $(call BuildPackage,dash)) diff --git a/utils/dbus-x/Makefile b/utils/dbus-x/Makefile new file mode 100644 index 0000000..10c6df1 --- /dev/null +++ b/utils/dbus-x/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +# Make sure to also update the dbus package +PKG_NAME:=dbus-x +PKG_VERSION:=1.2.12 +PKG_RELEASE:=2 + +PKG_BUILD_DIR:=$(BUILD_DIR)/dbus-x/dbus-$(PKG_VERSION) +PKG_SOURCE:=dbus-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus/ +PKG_MD5SUM:=39bd582c3b06a261cac44d4cab6fd60b + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_LDFLAGS+= \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ + -Wl,-rpath=/usr/lib/ + +define Package/dbus/Default/description + D-Bus is a message bus system, a simple way for applications to talk to one + another. In addition to interprocess communication, D-Bus helps coordinate + process lifecycle; it makes it simple and reliable to code a "single instance" + application or daemon, and to launch applications and daemons on demand when + their services are needed. +endef + +define Package/dbus-launch-x + SECTION:=utils + CATEGORY:=Utilities + TITLE:=dbus launch utility with x support + DEPENDS:=+libexpat +dbus +libX11 + URL:=http://dbus.freedesktop.org/ +endef + +define Package/dbus-launch-x/Description +$(call Package/dbus/Default/description) + This package contains the dbus-launch utility with compiled in x support. +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --disable-abstract-sockets \ + --disable-ansi \ + --disable-asserts \ + --disable-console-owner-file \ + --disable-doxygen-docs \ + --disable-gcov \ + --disable-selinux \ + --disable-tests \ + --disable-verbose-mode \ + --disable-xml-docs \ + --with-xml="expat" \ + --with-dbus-user=root \ + --with-dbus-daemondir="/usr/sbin" \ + --with-system-socket="/var/run/dbus/system_bus_socket" \ + --with-system-pid-file="/var/run/dbus.pid" \ + --with-x \ + --libexecdir=/usr/lib/dbus-1 + +CONFIGURE_VARS+= \ + ac_cv_have_abstract_sockets="yes" \ + +define Package/dbus-launch-x/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/dbus-launch \ + $(1)/usr/bin/dbus-launch-x +endef + +$(eval $(call BuildPackage,dbus-launch-x)) diff --git a/utils/dbus/Makefile b/utils/dbus/Makefile new file mode 100644 index 0000000..eec787d --- /dev/null +++ b/utils/dbus/Makefile @@ -0,0 +1,186 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +# Make sure to also update the dbus-x package +PKG_NAME:=dbus +PKG_VERSION:=1.2.4.6permissive +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus/ +PKG_MD5SUM:=1a158fe326b078d1377a977121888496 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_LDFLAGS+= \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ + -Wl,-rpath=/usr/lib/ + +define Package/dbus/Default + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Simple interprocess messaging system + URL:=http://dbus.freedesktop.org/ +endef + +define Package/dbus/Default/description + D-Bus is a message bus system, a simple way for applications to talk to one + another. In addition to interprocess communication, D-Bus helps coordinate + process lifecycle; it makes it simple and reliable to code a "single instance" + application or daemon, and to launch applications and daemons on demand when + their services are needed. +endef + +define Package/libdbus +$(call Package/dbus/Default) + CATEGORY:=Libraries + TITLE+= (library) +endef + +define Package/libdbus/Description +$(call Package/dbus/Default/description) + This package contains the D-Bus shared library. +endef + +define Package/dbus +$(call Package/dbus/Default) + TITLE+= (daemon) + DEPENDS:= +libexpat +libdbus +endef + +define Package/dbus/Description +$(call Package/dbus/Default/description) + This package contains the D-Bus daemon. +endef + +define Package/dbus-utils +$(call Package/dbus/Default) + TITLE+= (utilities) + DEPENDS:= dbus +endef + +define Package/dbus-utils/Description +$(call Package/dbus/Default/description) + This package contains D-Bus utilities. +endef + + +define Build/Prepare + $(Build/Prepare/Default) + $(SED) 's/-Wl,--gc-sections/--gc-sections/' $(PKG_BUILD_DIR)/configure +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --disable-abstract-sockets \ + --disable-ansi \ + --disable-asserts \ + --disable-console-owner-file \ + --disable-doxygen-docs \ + --disable-gcov \ + --disable-selinux \ + --disable-tests \ + --disable-verbose-mode \ + --disable-xml-docs \ + --with-xml="expat" \ + --with-dbus-user=root \ + --with-dbus-daemondir="/usr/sbin" \ + --with-system-socket="/var/run/dbus/system_bus_socket" \ + --with-system-pid-file="/var/run/dbus.pid" \ + --without-x \ + --libexecdir=/usr/lib/dbus-1 + +CONFIGURE_VARS+= \ + ac_cv_have_abstract_sockets="yes" \ + ac_cv_lib_expat_XML_ParserCreate_MM="yes" \ + + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/dbus-1.0 \ + $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib/dbus-1.0/include/dbus/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0/include/dbus/*.h \ + $(1)/usr/lib/dbus-1.0/include/dbus/ + + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.{so*,la,a} \ + $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0 \ + $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/dbus-1.pc \ + $(1)/usr/lib/pkgconfig/ +endef + +define Package/dbus/conffiles +/etc/dbus-1/session.conf +/etc/dbus-1/system.conf +endef + +define Package/libdbus/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.so.* \ + $(1)/usr/lib/ +endef + +define Package/dbus/install + $(INSTALL_DIR) $(1)/etc + $(CP) \ + $(PKG_INSTALL_DIR)/etc/dbus-1 \ + $(1)/etc/ + + $(INSTALL_DIR) $(1)/usr/lib/dbus-1 + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/lib/dbus-1/dbus-daemon-launch-helper \ + $(1)/usr/lib/dbus-1/ + + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/sbin/dbus-daemon \ + $(1)/usr/sbin/ + + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/dbus-uuidgen \ + $(1)/usr/bin/ + + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/dbus-launch \ + $(1)/usr/bin/dbus-launch.real + $(INSTALL_BIN) \ + ./files/dbus-launch \ + $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) \ + ./files/dbus.init \ + $(1)/etc/init.d/dbus +endef + +define Package/dbus-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/dbus-{send,monitor,cleanup-sockets} \ + $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libdbus)) +$(eval $(call BuildPackage,dbus)) +$(eval $(call BuildPackage,dbus-utils)) diff --git a/utils/dbus/files/dbus-launch b/utils/dbus/files/dbus-launch new file mode 100644 index 0000000..7c3f922 --- /dev/null +++ b/utils/dbus/files/dbus-launch @@ -0,0 +1,12 @@ +#!/bin/sh +# +# Simple wrapper script which allows us to build dbus without general x support +# If an application needs x support in dbus-launch it has to depend on the +# dbus-launch-x package. The script is used to prefer dbus-launch with x over +# the dbus-lauch without x. + +if [ -f /usr/bin/dbus-launch-x ]; then + exec /usr/bin/dbus-launch-x $@ +else + exec /usr/bin/dbus-launch.real $@ +fi diff --git a/utils/dbus/files/dbus.init b/utils/dbus/files/dbus.init new file mode 100644 index 0000000..1c622fc --- /dev/null +++ b/utils/dbus/files/dbus.init @@ -0,0 +1,27 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007-2008 OpenWrt.org + +SSD=start-stop-daemon +PIDF=/var/run/dbus.pid +PROG=/usr/sbin/dbus-daemon +ARGS=--system + +START=60 +start() { + if [ -x /usr/bin/dbus-uuidgen ]; then + mkdir -p /var/lib/dbus/ + /usr/bin/dbus-uuidgen --ensure + fi + + mkdir -p /var/run/dbus + $SSD -S -p $PIDF -q -x $PROG -- $ARGS +} + +stop() { + $SSD -K -p $PIDF -q +} + +status() { + ps | grep -q "^ *$(cat $PIDF 2>/dev/null) *.*$PROG" +} + diff --git a/utils/dbus/patches/002-no_wno_pointer_sign.patch b/utils/dbus/patches/002-no_wno_pointer_sign.patch new file mode 100644 index 0000000..ba69855 --- /dev/null +++ b/utils/dbus/patches/002-no_wno_pointer_sign.patch @@ -0,0 +1,12 @@ +diff -urN dbus-1.2.4.6permissive/configure dbus-1.2.4.6permissive.new/configure +--- dbus-1.2.4.6permissive/configure 2009-05-06 19:35:38.000000000 +0200 ++++ dbus-1.2.4.6permissive.new/configure 2010-03-26 17:40:13.000000000 +0100 +@@ -20958,7 +20958,7 @@ + esac + case " $CFLAGS " in + *[\ \ ]-Wno-pointer-sign[\ \ ]*) ;; +- *) CFLAGS="$CFLAGS -Wno-pointer-sign" ;; ++ *) CFLAGS="$CFLAGS" ;; + esac + + # http://bugs.freedesktop.org/show_bug.cgi?id=19195 diff --git a/utils/dbus/patches/01-dbus-nopie-fix.patch b/utils/dbus/patches/01-dbus-nopie-fix.patch new file mode 100644 index 0000000..c6142a3 --- /dev/null +++ b/utils/dbus/patches/01-dbus-nopie-fix.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -20927,19 +20927,6 @@ if test "x$GCC" = "xyes"; then + ;; + esac + +- case " $CFLAGS " in +- *[\ \ ]-fPIE[\ \ ]*) ;; +- *) if cc_supports_flag -fPIE; then +- PIE_CFLAGS="-fPIE" +- if ld_supports_flag -z,relro; then +- PIE_LDFLAGS="-pie -Wl,-z,relro" +- else +- PIE_LDFLAGS="-pie" +- fi +- fi +- ;; +- esac +- + ### Disabled warnings, and compiler flag overrides + + # Let's just ignore unused for now diff --git a/utils/deco/Makefile b/utils/deco/Makefile new file mode 100644 index 0000000..70253ae --- /dev/null +++ b/utils/deco/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=deco +PKG_VERSION:=39 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tgz +PKG_SOURCE_URL:=@SF/deco +PKG_MD5SUM:=f77f60e8be0cae1f814cba1ef61bf4d0 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/deco + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libncurses + TITLE:=Text-based, full featured file manager + URL:=http://deco.sourceforge.net/ + SUBMENU:=filemanager +endef + +define Package/deco/description + A clone of Norton Commander for Unix. Text-based, full featured + file manager. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) +endef + +define Package/deco/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/deco $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/deco + $(INSTALL_DATA) $(PKG_BUILD_DIR)/menu $(1)/usr/lib/deco/menu + $(INSTALL_DATA) $(PKG_BUILD_DIR)/profile $(1)/usr/lib/deco/profile +endef + +$(eval $(call BuildPackage,deco)) diff --git a/utils/deco/patches/100-tty.c.patch b/utils/deco/patches/100-tty.c.patch new file mode 100644 index 0000000..f37e4e2 --- /dev/null +++ b/utils/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/utils/devio/Makefile b/utils/devio/Makefile new file mode 100644 index 0000000..9c0a974 --- /dev/null +++ b/utils/devio/Makefile @@ -0,0 +1,38 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=devio +PKG_VERSION:=1.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/devio +PKG_MD5SUM:=5d332c2bffc0791367bcf3368ba1a0d1 + +include $(INCLUDE_DIR)/package.mk + +define Package/devio + SUBMENU:=disc + SECTION:=utils + CATEGORY:=Utilities + TITLE:=correctly read (or write) a region of a block device + URL:=http://sourceforge.net/projects/devio/ +endef + +define Package/devio/description + A command line program to correctly read (or write) a region of a block device. + Primary use is for extracting formatted data from MTD partitions. +endef + +define Package/devio/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/devio $(1)/usr/sbin +endef + +$(eval $(call BuildPackage,devio)) diff --git a/utils/devmem2/Makefile b/utils/devmem2/Makefile new file mode 100644 index 0000000..baa1337 --- /dev/null +++ b/utils/devmem2/Makefile @@ -0,0 +1,37 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=devmem2 +PKG_RELEASE:=1 + +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/devmem2 + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Simple program to read/write from memory. +endef + +define Package/devmem2/description + Simple program to read/write from/to any location in memory. +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + +define Package/devmem2/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/devmem2 $(1)/usr/sbin/devmem2 +endef + +$(eval $(call BuildPackage,devmem2)) diff --git a/utils/devmem2/src/Makefile b/utils/devmem2/src/Makefile new file mode 100644 index 0000000..1db49ca --- /dev/null +++ b/utils/devmem2/src/Makefile @@ -0,0 +1,13 @@ +OBJ = devmem2.o + +all: compile + +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +compile: $(OBJ) + $(CC) -o devmem2 $(LDFLAGS) $(OBJ) + +clean: + rm -f *.o *.so devmem2 + diff --git a/utils/devmem2/src/devmem2.c b/utils/devmem2/src/devmem2.c new file mode 100644 index 0000000..0c1b5b3 --- /dev/null +++ b/utils/devmem2/src/devmem2.c @@ -0,0 +1,132 @@ +/* + * devmem2.c: Simple program to read/write from/to any location in memory. + * + * Copyright (C) 2000, Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) + * + * + * This software has been developed for the LART computing board + * (http://www.lart.tudelft.nl/). The development has been sponsored by + * the Mobile MultiMedia Communications (http://www.mmc.tudelft.nl/) + * and Ubiquitous Communications (http://www.ubicom.tudelft.nl/) + * projects. + * + * The author can be reached at: + * + * Jan-Derk Bakker + * Information and Communication Theory Group + * Faculty of Information Technology and Systems + * Delft University of Technology + * P.O. Box 5031 + * 2600 GA Delft + * The Netherlands + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define FATAL do { fprintf(stderr, "Error at line %d, file %s (%d) [%s]\n", \ + __LINE__, __FILE__, errno, strerror(errno)); exit(1); } while(0) + +#define MAP_SIZE 4096UL +#define MAP_MASK (MAP_SIZE - 1) + +int main(int argc, char **argv) { + int fd; + void *map_base, *virt_addr; + unsigned long read_result, writeval; + off_t target; + int access_type = 'w'; + + if(argc < 2) { + fprintf(stderr, "\nUsage:\t%s { address } [ type [ data ] ]\n" + "\taddress : memory address to act upon\n" + "\ttype : access operation type : [b]yte, [h]alfword, [w]ord\n" + "\tdata : data to be written\n\n", + argv[0]); + exit(1); + } + target = strtoul(argv[1], 0, 0); + + if(argc > 2) + access_type = tolower(argv[2][0]); + + + if((fd = open("/dev/mem", O_RDWR | O_SYNC)) == -1) FATAL; + printf("/dev/mem opened.\n"); + fflush(stdout); + + /* Map one page */ + map_base = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, target & ~MAP_MASK); + if(map_base == (void *) -1) FATAL; + printf("Memory mapped at address %p.\n", map_base); + fflush(stdout); + + virt_addr = map_base + (target & MAP_MASK); + switch(access_type) { + case 'b': + read_result = *((unsigned char *) virt_addr); + break; + case 'h': + read_result = *((unsigned short *) virt_addr); + break; + case 'w': + read_result = *((unsigned long *) virt_addr); + break; + default: + fprintf(stderr, "Illegal data type '%c'.\n", access_type); + exit(2); + } + printf("Value at address 0x%lX (%p): 0x%lX\n", target, virt_addr, read_result); + fflush(stdout); + + if(argc > 3) { + writeval = strtoul(argv[3], 0, 0); + switch(access_type) { + case 'b': + *((unsigned char *) virt_addr) = writeval; + read_result = *((unsigned char *) virt_addr); + break; + case 'h': + *((unsigned short *) virt_addr) = writeval; + read_result = *((unsigned short *) virt_addr); + break; + case 'w': + *((unsigned long *) virt_addr) = writeval; + read_result = *((unsigned long *) virt_addr); + break; + } + printf("Written 0x%lX; readback 0x%lX\n", writeval, read_result); + fflush(stdout); + } + + if(munmap(map_base, MAP_SIZE) == -1) FATAL; + close(fd); + return 0; +} + + diff --git a/utils/dfu-util/Makefile b/utils/dfu-util/Makefile new file mode 100644 index 0000000..4faa5e9 --- /dev/null +++ b/utils/dfu-util/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dfu-util +PKG_VERSION:=r3095 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://sources.nslu2-linux.org/sources +PKG_MD5SUM:=2346dddceeab0e7090109f04d9c3a6be + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/dfu-util + SECTION:=utils + CATEGORY:=Utilities + TITLE:=OpenMoko device flash utility + URL:=http://wiki.openmoko.org/wiki/Dfu-util + DEPENDS:=+libusb +endef + +define Package/dfu-util/description + Dfu-util is a program that implements the host side of the USB DFU + (Universal Serial Bus Device Firmware Upgrade) protocol. + This version is specifically used to flash the FIC Neo 1973 mobile phone. +endef + +# CONFIGURE_VARS += USB_CFLAGS="-I $(STAGING_DIR)/usr/include" \ +# USB_LIBS="-L $(STAGING_DIR)/usr/lib" + +define Build/Configure + (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ + ./autogen.sh \ + ); + $(call Build/Configure/Default) +endef + +define Package/dfu-util/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dfu-util $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,dfu-util)) diff --git a/utils/dialog/Makefile b/utils/dialog/Makefile new file mode 100644 index 0000000..a2cecbe --- /dev/null +++ b/utils/dialog/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dialog +PKG_VERSION:=1.1-20080819 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=ftp://invisible-island.net/dialog +PKG_MD5SUM:=3caebd641a9f337b980becb4444336c5 + +include $(INCLUDE_DIR)/package.mk + +define Package/dialog + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libncurses + TITLE:=Dialog + URL:=http://invisible-island.net/dialog/ +endef + +define Package/dialog/description + A script-interpreter which provides a set of curses widgets. +endef + +define Build/Configure + $(call Build/Configure/Default) +endef + +define Package/dialog/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dialog $(1)/usr/bin + $(STRIP) $(1)/usr/bin/dialog +endef + +$(eval $(call BuildPackage,dialog)) + diff --git a/utils/digitemp/Makefile b/utils/digitemp/Makefile new file mode 100644 index 0000000..cdbabaf --- /dev/null +++ b/utils/digitemp/Makefile @@ -0,0 +1,83 @@ +# +# Copyright (C) 2009-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + + +include $(TOPDIR)/rules.mk + +PKG_NAME:=digitemp +PKG_VERSION:=3.6.0 +PKG_RELEASE:=5 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.digitemp.com/software/linux +PKG_MD5SUM:=9be2e48db37920f21925ae6e88f83b84 + +include $(INCLUDE_DIR)/package.mk + +define Package/digitemp/Default + SECTION:=utils + CATEGORY:=Utilities + TITLE:=DigiTemp is a simple to use program for reading values from 1-wire devices. + URL:=http://www.digitemp.com +endef + +define Package/digitemp/Default/description + 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. +endef + +define Package/digitemp +$(call Package/digitemp/Default) + TITLE += (serial version) +endef + +define Package/digitemp/description +$(call Package/digitemp/Default/description) + This package is build without USB support. +endef + +define Package/digitemp-usb +$(call Package/digitemp/Default) + TITLE += (USB version) + DEPENDS += +libusb +endef + +define Package/digitemp-usb/description +$(call Package/digitemp/Default/description) + This package is build with USB support. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -DLINUX $(TARGET_CPPFLAGS) \ + -I./src -I./userial" \ + LIBS="$(TARGET_LDFLAGS)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + ds9097 ds9097u + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -DLINUX $(TARGET_CPPFLAGS) \ + -I./src -I./userial -DOWUSB" \ + LIBS="$(TARGET_LDFLAGS) -lusb -lm -DOWUSB" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + clean ds2490 +endef + +define Package/digitemp/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/digitemp_{DS9097,DS9097U} $(1)/usr/bin/ +endef + +define Package/digitemp-usb/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/digitemp_DS2490 $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,digitemp)) +$(eval $(call BuildPackage,digitemp-usb)) diff --git a/utils/dir300-flash/Makefile b/utils/dir300-flash/Makefile new file mode 100644 index 0000000..c271212 --- /dev/null +++ b/utils/dir300-flash/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dir300-flash +PKG_VERSION:=0.9.9 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://x-alina.freifunk-potsdam.de/downloads/dir300-flash +PKG_MD5SUM:=84ad98c36393d7d238a229da67e23903 + +include $(INCLUDE_DIR)/package.mk + +define Package/dir300-flash + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Flashes a custom firmware on the DIR-300 wireless router + URL:=http://x-alina.freifunk-potsdam.de/ + PKGARCH:=all +endef + +define Download/ap61.ram + URL:=http://www.dd-wrt.com/dd-wrtv2/downloads/v24/Atheros%20WiSoc/Airlink%20101%20AR430W + FILE:=ap61.ram + MD5SUM:=4aaec2bff1edffe8c49003ed9363ad8b +endef + +define Download/ap61.rom + URL:=http://www.dd-wrt.com/dd-wrtv2/downloads/v24/Atheros%20WiSoc/Airlink%20101%20AR430W + FILE:=ap61.rom + MD5SUM:=eb7817d202c297ae5dc6b6b897632601 +endef + +define Download/dir300redboot.zip + URL:=http://www.shadowandy.net/wp/wp-content/uploads + FILE:=dir300redboot.zip + MD5SUM:=5fdb24432aa200b508026215d821e126 +endef + +define Build/Compile + unzip -n '$(DL_DIR)/dir300redboot.zip' -d '$(PKG_BUILD_DIR)' +endef + +define Package/dir300-flash/install + $(INSTALL_DIR) -- '$(1)/usr/sbin' + $(INSTALL_BIN) -- '$(PKG_BUILD_DIR)/dir300-flash.sh' '$(1)/usr/sbin/dir300-flash' + $(INSTALL_DIR) -- '$(1)/usr/share/dir300-flash' + $(INSTALL_DATA) -- '$(DL_DIR)/ap61.ram' '$(1)/usr/share/dir300-flash' + $(INSTALL_DATA) -- '$(DL_DIR)/ap61.rom' '$(1)/usr/share/dir300-flash' + $(INSTALL_DATA) -- '$(PKG_BUILD_DIR)/dir300redboot.rom' '$(1)/usr/share/dir300-flash' +endef + +$(eval $(call BuildPackage,dir300-flash)) +$(eval $(call Download,ap61.ram)) +$(eval $(call Download,ap61.rom)) +$(eval $(call Download,dir300redboot.zip)) diff --git a/utils/disktype/Makefile b/utils/disktype/Makefile new file mode 100644 index 0000000..667efde --- /dev/null +++ b/utils/disktype/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=disktype +PKG_VERSION:=9 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME)/ +PKG_MD5SUM:=25a673f162b9c01cd565109202559489 + +include $(INCLUDE_DIR)/package.mk + +define Package/disktype + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Disk format detection + SUBMENU:=Filesystem + URL:=http://disktype.sourceforge.net +endef + +define Package/disktype/description + The purpose of disktype is to detect the content format of a disk or disk image. + It knows about common file systems, partition tables, and boot codes. + The program is written in C and is designed to compile on any modern Unix flavour. + It is self-contained and in general works without special libraries or headers. + Some system-dependant features can be used to gather additional information. +endef + +MAKE_FLAGS += CC="$(TARGET_CC) $(TARGET_CFLAGS)" + +define Package/disktype/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,disktype)) diff --git a/utils/dmidecode/Makefile b/utils/dmidecode/Makefile new file mode 100644 index 0000000..c1f4a9f --- /dev/null +++ b/utils/dmidecode/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dmidecode +PKG_VERSION:=2.11 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/dmidecode +PKG_MD5SUM:=535487cc041f2db746587cf40a2059f0 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/dmidecode + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@TARGET_x86 + TITLE:=Displays BIOS informations. + URL:=http://www.nongnu.org/dmidecode/ +endef + +define Package/dmidecode/description + Dmidecode reports information about your system's hardware + as described in your system BIOS according to the SMBIOS/DMI + standard. +endef + +MAKE_FLAGS += \ + prefix="/usr" + +define Package/dmidecode/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,dmidecode)) diff --git a/utils/dosfstools/Makefile b/utils/dosfstools/Makefile new file mode 100644 index 0000000..cf32d84 --- /dev/null +++ b/utils/dosfstools/Makefile @@ -0,0 +1,94 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dosfstools +PKG_VERSION:=3.0.11 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.daniel-baumann.ch/software/dosfstools +PKG_MD5SUM:=8d2211d5bd813164e20740e7c852aa06 + +include $(INCLUDE_DIR)/package.mk + +define Package/dosfstools/Default + SECTION:=utils + CATEGORY:=Utilities + URL:=http://www.daniel-baumann.ch/software/dosfstools/ + SUBMENU:=Filesystem +endef + +define Package/dosfsck + $(call Package/dosfstools/Default) + TITLE:=dosfsck +endef + +define Package/dosfslabel + $(call Package/dosfstools/Default) + TITLE:=dosfslabel +endef + +define Package/mkdosfs + $(call Package/dosfstools/Default) + TITLE:=mkdosfs +endef + +define Package/dosfsck/description + Utilities to create and check MS-DOS FAT filesystems. + (fsck.vfat and fsck.msdos for checking integrity of FAT volumes) +endef + +define Package/dosfslabel/description + Utilities to create and check MS-DOS FAT filesystems. + (dosfslabel for reading and writing labels of FAT volumes) +endef + +define Package/mkdosfs/description + Utilities to create and check MS-DOS FAT filesystems. + (mkfs.vfat and mkfs.msdos for creating FAT volumes) +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + OPTFLAGS="$(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64" \ + PREFIX="/usr" \ + SBINDIR="/usr/sbin" \ + all + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + OPTFLAGS="$(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64" \ + PREFIX="$(PKG_INSTALL_DIR)/usr" \ + SBINDIR="$(PKG_INSTALL_DIR)/usr/sbin" \ + install-bin +endef + +define Package/dosfsck/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dosfsck $(1)/usr/sbin/ + (cd $(1)/usr/sbin; ln -sf dosfsck fsck.msdos; ln -sf dosfsck fsck.vfat) +endef + +define Package/dosfslabel/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dosfslabel $(1)/usr/sbin/ +endef + +define Package/mkdosfs/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkdosfs $(1)/usr/sbin/ + (cd $(1)/usr/sbin; ln -sf mkdosfs mkfs.msdos; ln -sf mkdosfs mkfs.vfat) +endef + +$(eval $(call BuildPackage,dosfsck)) +$(eval $(call BuildPackage,dosfslabel)) +$(eval $(call BuildPackage,mkdosfs)) diff --git a/utils/dosfstools/patches/002-linux_26_headers.patch b/utils/dosfstools/patches/002-linux_26_headers.patch new file mode 100644 index 0000000..c4d506f --- /dev/null +++ b/utils/dosfstools/patches/002-linux_26_headers.patch @@ -0,0 +1,56 @@ +--- a/src/common.h ++++ b/src/common.h +@@ -19,7 +19,7 @@ + can be found in /usr/share/common-licenses/GPL-3 file. + */ + +-# include ++#include + + #ifndef _COMMON_H + #define _COMMON_H +--- a/src/dosfsck.h ++++ b/src/dosfsck.h +@@ -32,8 +32,8 @@ + #define _LINUX_STRING_H_ /* hack to avoid inclusion of */ + #define _LINUX_FS_H /* hack to avoid inclusion of */ + +-# include +-# include ++#include ++#include + + #include + +--- a/src/file.c ++++ b/src/file.c +@@ -34,7 +34,7 @@ + #define _LINUX_STRING_H_ /* hack to avoid inclusion of */ + #define _LINUX_FS_H /* hack to avoid inclusion of */ + +-# include ++#include + + #include + +--- a/src/io.c ++++ b/src/io.c +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + #include + + #include "dosfsck.h" +--- a/src/mkdosfs.c ++++ b/src/mkdosfs.c +@@ -63,7 +63,7 @@ + #include + #include + +-# include ++#include + + #if __BYTE_ORDER == __BIG_ENDIAN + diff --git a/utils/dt/Makefile b/utils/dt/Makefile new file mode 100644 index 0000000..168bbed --- /dev/null +++ b/utils/dt/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dt +PKG_VERSION:=15.14 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-source.tar.gz +PKG_SOURCE_URL:=http://home.comcast.net/~SCSIguy/SCSI_FAQ/RMiller_Tools/ftp/$(PKG_NAME)/ +PKG_MD5SUM:=5776233a2d301a50b314306538257a45 + +include $(INCLUDE_DIR)/package.mk + +PKG_UNPACK= \ + zcat $(DL_DIR)/$(PKG_SOURCE) | \ + $(TAR) -C $(PKG_BUILD_DIR) --strip-components 2 $(TAR_OPTIONS); + +define Package/dt + CATEGORY:=Utilities + SECTION:=utils + TITLE:=A generic data test program + URL:=http://www.scsifaq.org/RMiller_Tools/index.html + DEPENDS:=+libpthread +endef + +define Package/dt/description + dt is a generic data test program used to verify proper operation of peripherals, + file systems, device drivers, or any data stream supported by the operating system. + In its' simplest mode of operation, dt writes and then verifys its' default data pattern, + then displays performance statisics and other test parameters before exiting. + Since verification of data is performed, dt can be thought of as a generic diagnostic tool. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.linux \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -DFIFO -DMMAP -DTTY -D__linux__ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64" \ + dt +endef + +define Package/dt/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dt $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,dt)) diff --git a/utils/dtach/Makefile b/utils/dtach/Makefile new file mode 100644 index 0000000..e027420 --- /dev/null +++ b/utils/dtach/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dtach +PKG_VERSION:=0.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/dtach +PKG_MD5SUM:=ec5999f3b6bb67da19754fcb2e5221f3 + +include $(INCLUDE_DIR)/package.mk + +define Package/dtach + SECTION:=utils + CATEGORY:=Utilities + TITLE:=A program that emulates the dtach feature of screen + URL:=http://dtach.sourceforge.net/ +endef + +define Package/dtach/description + dtach is a tiny program that emulates the detach feature of screen, + allowing you to run a program in an environment that is protected from + the controlling terminal and attach to it later. dtach does not keep + track of the contents of the screen, and thus works best with programs + that know how to redraw themselves. +endef + +define Build/Configure + $(call Build/Configure/Default) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) +endef + +define Package/dtach/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dtach $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,dtach)) diff --git a/utils/empty/Makefile b/utils/empty/Makefile new file mode 100644 index 0000000..9c3b3c9 --- /dev/null +++ b/utils/empty/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=empty +PKG_VERSION:=0.6.18b +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=@SF/empty +PKG_MD5SUM:=2cf5e1b8ff58c41b63738bdc7c24fbc2 + +include $(INCLUDE_DIR)/package.mk + +define Package/empty + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Run applications under pseudo-terminal sessions + URL:=http://empty.sourceforge.net +endef + +define Package/empty/description + empty is an utility that provides an interface to execute and/or interact + with processes under pseudo-terminal sessions (PTYs). This tool is + definitely useful in programming of shell scripts designed to communicate + with interactive programs like telnet, ssh, ftp, etc. In some cases, empty + can be the simplest replacement for TCL/expect or other similar + programming tools. +endef + +define Package/empty/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,empty)) diff --git a/utils/event_test/Makefile b/utils/event_test/Makefile new file mode 100644 index 0000000..c10fe4b --- /dev/null +++ b/utils/event_test/Makefile @@ -0,0 +1,37 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=event_test +PKG_VERSION:=0.01 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/event_test + +include $(INCLUDE_DIR)/package.mk + +define Package/event_test + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Event device test program +endef + +define Package/event_test/description + This package contains an utility for testing event devices. +endef + +define Build/Prepare + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + +define Package/event_test/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/event_test $(1)/sbin/ +endef + +$(eval $(call BuildPackage,event_test)) diff --git a/utils/event_test/src/Makefile b/utils/event_test/src/Makefile new file mode 100644 index 0000000..74eedbf --- /dev/null +++ b/utils/event_test/src/Makefile @@ -0,0 +1,17 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under GNU General Public Licese v2. +# See /LICENSE for more information. +# + +all: event_test + +%.o: %.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $^ + +event_test: evtest.o + $(CC) -o $@ $^ + +clean: + rm -f *.o event_test diff --git a/utils/event_test/src/evtest.c b/utils/event_test/src/evtest.c new file mode 100644 index 0000000..b62209b --- /dev/null +++ b/utils/event_test/src/evtest.c @@ -0,0 +1,309 @@ +/* + * + * Copyright (c) 1999-2000 Vojtech Pavlik + * + * As modified by Rene van Paassen, May 19, 2005 + * Event device test program + */ + +/* + * 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 + * + * Should you need to contact me, the author, you can do so either by + * e-mail - mail your message to , or by paper mail: + * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic + */ + +#include +#include +#include +#include +#include +#include +#include + +char *events[EV_MAX + 1] = { "Reset", "Key", "Relative", "Absolute", "MSC", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +NULL, NULL, NULL, "LED", "Sound", NULL, "Repeat", "ForceFeedback", "Power", "ForceFeedbackStatus"}; + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 0) + +/* Keys updated with version 2.6.11, am assuming this is 2.6 style */ +char *keys[KEY_MAX + 1] = + { "Reserved", "Esc", /* 0, 1 */ + "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", /* 2 - 11 */ + "Minus", "Equal", "Backspace", "Tab", /* 12 - 15 */ + "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", /* 16 - 25 */ + "LeftBrace", "RightBrace", "Enter", "LeftControl", /* 26 - 29 */ + "A", "S", "D", "F", "G", "H", "J", "K", "L", /* 30 - 38 */ + "Semicolon", "Apostrophe", "Grave", "LeftShift", "BackSlash", /* 39 - 43 */ + "Z", "X", "C", "V", "B", "N", "M", /* 44 - 50 */ + "Comma", "Dot", "Slash", "RightShift", "KPAsterisk", + "LeftAlt", "Space", "CapsLock", /* 51 - 58 */ + "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", /* 59 - 68 */ + "NumLock", "ScrollLock", /* 69, 70 */ + "KP7", "KP8", "KP9", "KPMinus", /* 71 - 74 */ + "KP4", "KP5", "KP6", "KPPlus", /* 75 - 78 */ + "KP1", "KP2", "KP3", "KP0", "KPDot", /* 79 - 83 */ + NULL, + "ZENKAKUHANKAKU", /* 85 */ + "102nd", "F11", "F12", /* 86 - 88 */ + "R0", "KATAKANA", "HIRAGANA", "HENKAN", /* 89 - 92 */ + "KATAKANAHIRAGANA", "MUHENKAN", "KPJPCOMMA", /* 93 - 95 */ + "KPEnter", "RightCtrl", "KPSlash", "SysRq", /* 96 - 99 */ + "RightAlt", "LineFeed", /*100 - 101 */ + "Home", "Up", "PageUp", "Left", "Right", "End", "Down", + "PageDown", "Insert", "Delete", /* 102 - 111 */ + "Macro", "Mute", "VolumeDown", "VolumeUp", "Power", /* 112 - 116 */ + "KPEqual", "KPPlusMinus", "Pause", /* 117 - 119 */ + NULL, + "KPComma", /* 121 */ + "Hanguel", "Hanja", "Yen", /* 122 - 124 */ + "LeftMeta", "RightMeta", "Compose", /* 125 - 127 */ + "Stop", "Again", "Props", "Undo", "Front", "Copy", "Open", + "Paste", "Find", "Cut", "Help", "Menu", "Calc", "Setup", + "Sleep", "WakeUp", "File", "SendFile", "DeleteFile", "X-fer", + "Prog1", "Prog2", "WWW", "MSDOS", "Coffee", "Direction", + "CycleWindows", "Mail", "Bookmarks", "Computer", + "Back", "Forward", "CloseCD", "EjectCD", "EjectCloseCD", + "NextSong", "PlayPause", "PreviousSong", "StopCD", + "Record", "Rewind", "Phone", /* 128 - 169 */ + "ISOKey", "Config", "HomePage", "Refresh", "Exit", + "Move", "Edit", "ScrollUp", "ScrollDown", /* 170 - 178 */ + "KPLeftParenthesis", "KPRightParenthesis", /* 179 - 180 */ + NULL, NULL, + "F13", "F14", "F15", "F16", "F17", "F18", + "F19", "F20", "F21", "F22", "F23", "F24", /* 183 - 194 */ + NULL, NULL, NULL, NULL, NULL, + "PlayCD", "PauseCD", "Prog3", "Prog4", NULL, + "Suspend", "Close", /* 200 - 206 */ + "Play", "FastForward", "BassBoost", "Print", "HP", "Camera", + "Sound", "Question", "Email", "Chat", "Search", + "Connect", "Finance", "Sport", "Shop", "AltErase", + "Cancel", "BrightnessDown", "BrightnessUp", "Media", /* 207 - 226 */ + "SwitchVideoMode", + "KBDIllumToggle", "KBDIllumDown", "KBDIllumUp", /* 227 - 230 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "Unknown", /* 240 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "Btn0", "Btn1", "Btn2", "Btn3", "Btn4", + "Btn5", "Btn6", "Btn7", "Btn8", "Btn9", /* 256 - 265 */ + NULL, NULL, NULL, NULL, NULL, NULL, + "LeftBtn", "RightBtn", "MiddleBtn", "SideBtn", + "ExtraBtn", "ForwardBtn", "BackBtn", "TaskBtn", /* 0x110 - 0x117 */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "Trigger", "ThumbBtn", "ThumbBtn2", "TopBtn", + "TopBtn2", "PinkieBtn", "BaseBtn", "BaseBtn2", + "BaseBtn3", "BaseBtn4", "BaseBtn5", "BaseBtn6", + NULL, NULL, NULL, "BtnDead", /* 0x120 - 0x12f */ + "BtnA", "BtnB", "BtnC", "BtnX", + "BtnY", "BtnZ", "BtnTL", "BtnTR", + "BtnTL2", "BtnTR2", "BtnSelect", "BtnStart", + "BtnMode", "BtnThumbL", "BtnThumbR", /* 0x130 - 0x13e */ NULL, + "ToolPen", "ToolRubber", "ToolBrush", "ToolPencil", + "ToolAirbrush", "ToolFinger", "ToolMouse", "ToolLens", /* 0x140-0x147 */ + NULL, NULL, "Touch", "Stylus", + "Stylus2", "DoubleTap", "TripleTap", /* 0x14a - 0x14e */ NULL, + "GearUp", "GearDown", /* 0x150, 0x151 */ + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "Ok", "Select", "Goto", "Clear", "Power2", "Option", "Info", "Time", + "Vendor", "Archive", "Program", "Channel", + "Favorites", "Epg", "Pvr", "Mhp", + "Language", "Title", "Subtitle", "Angle", + "Zoom", "Mode", "Keyboard", "Screen", + "Pc", "Tv", "Tv2", "Vcr", "Vcr2", "Sat", "Sat2", "Cd", + "Tape", "Radio", "Tuner", "Player", "Text", "Dvd", "Aux", "Mp3", + "Audio", "Video", "Directory", "List", + "Memo", "Calendar", "Red", "Green", + "Yellow", "Blue", "Channelup", "Channeldown", + "First", "Last", "Ab", "Next", + "Restart", "Slow", "Shuffle", "Break", + "Previous", "Digits", "Teen", "Twen", /* 160 - 19f */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "DelEol", "DelEos", "InsLine", "DelLine", /* 1c0 - 1c3 */ + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "FN", "FN_ESC", + "FN_F1", "FN_F2", "FN_F3", "FN_F4", "FN_F5", + "FN_F6", "FN_F7", "FN_F8", "FN_F9", "FN_F10", + "FN_F11", "FN_F12", + "FN_1", "FN_2", "FN_D", "FN_E", "FN_F", "FN_S", "FN_B" /* 0x1d0 - 0x1e4 */ + }; + +#else + +/* Keys I used with 2.4 kernels. */ +char *keys[KEY_MAX + 1] = { "Reserved", "Esc", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "Minus", "Equal", "Backspace", +"Tab", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "LeftBrace", "RightBrace", "Enter", "LeftControl", "A", "S", "D", "F", "G", +"H", "J", "K", "L", "Semicolon", "Apostrophe", "Grave", "LeftShift", "BackSlash", "Z", "X", "C", "V", "B", "N", "M", "Comma", "Dot", +"Slash", "RightShift", "KPAsterisk", "LeftAlt", "Space", "CapsLock", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", +"NumLock", "ScrollLock", "KP7", "KP8", "KP9", "KPMinus", "KP4", "KP5", "KP6", "KPPlus", "KP1", "KP2", "KP3", "KP0", "KPDot", "103rd", +"F13", "102nd", "F11", "F12", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "KPEnter", "RightCtrl", "KPSlash", "SysRq", +"RightAlt", "LineFeed", "Home", "Up", "PageUp", "Left", "Right", "End", "Down", "PageDown", "Insert", "Delete", "Macro", "Mute", +"VolumeDown", "VolumeUp", "Power", "KPEqual", "KPPlusMinus", "Pause", "F21", "F22", "F23", "F24", "KPComma", "LeftMeta", "RightMeta", +"Compose", "Stop", "Again", "Props", "Undo", "Front", "Copy", "Open", "Paste", "Find", "Cut", "Help", "Menu", "Calc", "Setup", +"Sleep", "WakeUp", "File", "SendFile", "DeleteFile", "X-fer", "Prog1", "Prog2", "WWW", "MSDOS", "Coffee", "Direction", +"CycleWindows", "Mail", "Bookmarks", "Computer", "Back", "Forward", "CloseCD", "EjectCD", "EjectCloseCD", "NextSong", "PlayPause", +"PreviousSong", "StopCD", "Record", "Rewind", "Phone", "ISOKey", "Config", "HomePage", "Refresh", "Exit", "Move", "Edit", "ScrollUp", +"ScrollDown", "KPLeftParenthesis", "KPRightParenthesis", +"International1", "International2", "International3", "International4", "International5", +"International6", "International7", "International8", "International9", +"Language1", "Language2", "Language3", "Language4", "Language5", "Language6", "Language7", "Language8", "Language9", +NULL, +"PlayCD", "PauseCD", "Prog3", "Prog4", "Suspend", "Close", +NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +"Btn0", "Btn1", "Btn2", "Btn3", "Btn4", "Btn5", "Btn6", "Btn7", "Btn8", "Btn9", +NULL, NULL, NULL, NULL, NULL, NULL, +"LeftBtn", "RightBtn", "MiddleBtn", "SideBtn", "ExtraBtn", "ForwardBtn", "BackBtn", +NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +"Trigger", "ThumbBtn", "ThumbBtn2", "TopBtn", "TopBtn2", "PinkieBtn", +"BaseBtn", "BaseBtn2", "BaseBtn3", "BaseBtn4", "BaseBtn5", "BaseBtn6", +NULL, NULL, NULL, "BtnDead", +"BtnA", "BtnB", "BtnC", "BtnX", "BtnY", "BtnZ", "BtnTL", "BtnTR", "BtnTL2", "BtnTR2", "BtnSelect", "BtnStart", "BtnMode", +"BtnThumbL", "BtnThumbR", NULL, +"ToolPen", "ToolRubber", "ToolBrush", "ToolPencil", "ToolAirbrush", "ToolFinger", "ToolMouse", "ToolLens", NULL, NULL, +"Touch", "Stylus", "Stylus2" }; +#endif + +char *absval[5] = { "Value", "Min ", "Max ", "Fuzz ", "Flat " }; +char *relatives[REL_MAX + 1] = + { "X", "Y", "Z", NULL, + NULL, NULL, "HWheel", "Dial", + /* 0x08: */ "Wheel", "MISC" }; +char *absolutes[ABS_MAX + 1] = + { "X", "Y", "Z", "Rx", "Ry", "Rz", "Throttle", "Rudder", + "Wheel", "Gas", "Brake", NULL, NULL, NULL, NULL, NULL, + /* 0x10: */ "Hat0X", "Hat0Y", "Hat1X", "Hat1Y", + "Hat2X", "Hat2Y", "Hat3X", "Hat 3Y", + "Pressure", "Distance", "XTilt", "YTilt", + "ToolWidth", NULL, NULL, NULL, + /* 0x20: */ "Volume", NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + /* 0x28: */ "Misc" }; +char *leds[LED_MAX + 1] = { "NumLock", "CapsLock", "ScrollLock", "Compose", "Kana", "Sleep", "Suspend", "Mute" }; +char *repeats[REP_MAX + 1] = { "Delay", "Period" }; +char *sounds[SND_MAX + 1] = { "Bell", "Click" }; + +char **names[EV_MAX + 1] = { events, keys, relatives, absolutes, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +NULL, NULL, leds, sounds, NULL, repeats, NULL, NULL, NULL }; + +#define BITS_PER_LONG (sizeof(long) * 8) +#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) +#define OFF(x) ((x)%BITS_PER_LONG) +#define BIT(x) (1UL<> OFF(bit)) & 1) + +int main (int argc, char **argv) +{ + int fd, rd, i, j, k; + struct input_event ev[64]; + int version; + unsigned short id[4]; + unsigned long bit[EV_MAX][NBITS(KEY_MAX)]; + char name[256] = "Unknown"; + int abs[5]; + +#if 0 + for (i = 0; i < KEY_MAX; i++) { + printf("Key %d, name \"%s\"\n", i, keys[i] ? keys[i]: "?"); + } +#endif + + if (argc < 2) { + printf ("Usage: evtest /dev/inputX\n"); + printf ("Where X = input device number\n"); + exit (1); + } + + if ((fd = open(argv[argc - 1], O_RDONLY)) < 0) { + perror("evtest"); + exit(1); + } + + ioctl(fd, EVIOCGVERSION, &version); + printf("Input driver version is %d.%d.%d\n", + version >> 16, (version >> 8) & 0xff, version & 0xff); + + ioctl(fd, EVIOCGID, id); + printf("Input device ID: bus 0x%x vendor 0x%x product 0x%x version 0x%x\n", + id[ID_BUS], id[ID_VENDOR], id[ID_PRODUCT], id[ID_VERSION]); + + ioctl(fd, EVIOCGNAME(sizeof(name)), name); + printf("Input device name: \"%s\"\n", name); + + memset(bit, 0, sizeof(bit)); + ioctl(fd, EVIOCGBIT(0, EV_MAX), bit[0]); + printf("Supported events:\n"); + + for (i = 0; i < EV_MAX; i++) + { + if (test_bit(i, bit[0])) + { + printf(" Event type %d (%s)\n", i, events[i] ? events[i] : "?"); + ioctl(fd, EVIOCGBIT(i, KEY_MAX), bit[i]); + for (j = 0; j < KEY_MAX; j++) + { + if (test_bit(j, bit[i])) + { + printf(" Event code %d (%s)\n", j, names[i] ? (names[i][j] ? names[i][j] : "?") : "?"); + if (i == EV_ABS) + { + ioctl(fd, EVIOCGABS(j), abs); + for (k = 0; k < 5; k++) + { + if ((k < 3) || abs[k]) + { + printf(" %s %6d\n", absval[k], abs[k]); + } + } + } + } + } + } + } + + printf("Testing ... (interrupt to exit)\n"); + + while (1) + { + rd = read(fd, ev, sizeof(struct input_event) * 64); + + if (rd < (int) sizeof(struct input_event)) + { + printf("yyy\n"); + perror("\nevtest: error reading"); + exit (1); + } + + for (i = 0; i < rd / sizeof(struct input_event); i++) + { + printf("Event: time %ld.%06ld, type %d (%s), code %d (%s), value %d\n", + ev[i].time.tv_sec, + ev[i].time.tv_usec, + ev[i].type, + events[ev[i].type] ? events[ev[i].type] : "?", + ev[i].code, + names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?", + ev[i].value); + } + } +} diff --git a/utils/fancontroled/Makefile b/utils/fancontroled/Makefile new file mode 100644 index 0000000..43e3b2e --- /dev/null +++ b/utils/fancontroled/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=fancontroled +PKG_VERSION:=0.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar +PKG_SOURCE_URL:=http://code.lukaperkov.net/fancontroled/ +PKG_MD5SUM:=8c3a7efa99e58216ad4633d1e6ed1358 + +include $(INCLUDE_DIR)/package.mk + +define Package/fancontroled + SECTION:=utils + CATEGORY:=Utilities + TITLE:=fancontroled + DEPENDS:=+libsensors + URL:=http://fancontroled.lukaperkov.net/ +endef + +define Package/fancontroled/description + fancontroled is linux daemon written in C implementing a temperature dependent fan speed control. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + INC_PATH="-I$(STAGING_DIR)/usr/include/ -I$(STAGING_DIR)/usr/lib/" + + $(STRIP) $(PKG_BUILD_DIR)/$(PKG_NAME) + + mkdir -p $(PKG_INSTALL_DIR)/usr/sbin + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install +endef + +define Package/fancontroled/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/fancontroled.init $(1)/etc/init.d/fancontroled +endef + +$(eval $(call BuildPackage,fancontroled)) diff --git a/utils/fancontroled/files/fancontroled.init b/utils/fancontroled/files/fancontroled.init new file mode 100644 index 0000000..2ec5e87 --- /dev/null +++ b/utils/fancontroled/files/fancontroled.init @@ -0,0 +1,22 @@ +#!/bin/sh /etc/rc.common + +START=75 +STOP=75 + +TEMP_SENSOR_CHIP=lm75 +TEMP_READ_FIELD=temp1_input +MIN_TEMP=30 +MAX_TEMP=50 +FAN_SENSOR_CHIP=g760a +FAN_CONTROL_FIELD=pwm1 +PWM_FAN_MIN=1 +PWM_FAN_MAX=180 +PID_FILENAME=/var/run/fancontroled.pid + +start() { + /usr/sbin/fancontroled -t $TEMP_SENSOR_CHIP -r $TEMP_READ_FIELD -m $MIN_TEMP -M $MAX_TEMP -f $FAN_SENSOR_CHIP -c $FAN_CONTROL_FIELD -p $PWM_FAN_MIN -P $PWM_FAN_MAX -z $PID_FILENAME +} + +stop() { + kill $(cat $PID_FILENAME) +} diff --git a/utils/firmwarehotplug/Makefile b/utils/firmwarehotplug/Makefile new file mode 100644 index 0000000..103d79d --- /dev/null +++ b/utils/firmwarehotplug/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=firmwarehotplug +PKG_VERSION:=0.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/linux-hotplug +PKG_MD5SUM:=e5cf352b172f498e27b160167b981f24 + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +# workaround for fedora sdcc naming changes +ifneq ($(wildcard /usr/libexec/sdcc),) + export PATH:=$(PATH):/usr/libexec +endif + +define Package/firmwarehotplug + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@USB_SUPPORT +fxload + TITLE:=Hotplug firmware for EZ-USB microcontrollers + URL:=http://linux-hotplug.sourceforge.net/ +endef + +MAKE_PATH:=ezusb/midi/original + +MAKE_FLAGS+=\ + OPT="$(TARGET_CFLAGS)" + +define Package/firmwarehotplug/install + $(INSTALL_DIR) $(1)/etc/hotplug.d/usb + install -m755 $(PKG_BUILD_DIR)/ezusb/midi/original/Hotplug/ezusbmidi $(1)/etc/hotplug.d/usb + install -m644 $(PKG_BUILD_DIR)/ezusb/midi/original/Hotplug/ezusbmidi.usermap $(1)/etc/hotplug.d + $(INSTALL_DIR) $(1)/usr/share/usb/ezusbmidi + install -m644 $(PKG_BUILD_DIR)/ezusb/midi/original/ezusbmidi1x1.ihx $(1)/usr/share/usb/ezusbmidi + install -m644 $(PKG_BUILD_DIR)/ezusb/midi/original/ezusbmidi2x2.ihx $(1)/usr/share/usb/ezusbmidi +endef + +define Require/working-sdcc + sdcc -v 2>&1 | awk '($$$$1 == "SDCC") && ($$$$3 ~ "mcs51/gbz80/z80" && $$$$3 ~ "/ds390/pic16/pic14/TININative") { print "ok" }' | grep ok > /dev/null +endef + +$(eval $(call RequireCommand,sdcc, \ + $(PKG_NAME) requires the SDCC Cross Compiler (sdcc). \ +)) + +$(eval $(call Require,working-sdcc, \ + $(PKG_NAME) requires a SDCC Cross Compiler (sdcc) that supports the following targets : \ + mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08. You might consider \ + installing the non-free version. \ +)) + +$(eval $(call BuildPackage,firmwarehotplug)) + diff --git a/utils/firmwarehotplug/patches/001-no_documentation.patch b/utils/firmwarehotplug/patches/001-no_documentation.patch new file mode 100644 index 0000000..0079fdd --- /dev/null +++ b/utils/firmwarehotplug/patches/001-no_documentation.patch @@ -0,0 +1,12 @@ +diff -urN firmwarehotplug-0.1/ezusb/midi/original/Makefile firmwarehotplug-0.1.new/ezusb/midi/original/Makefile +--- firmwarehotplug-0.1/ezusb/midi/original/Makefile 2003-05-19 02:10:28.000000000 +0200 ++++ firmwarehotplug-0.1.new/ezusb/midi/original/Makefile 2007-01-01 23:07:42.000000000 +0100 +@@ -1,7 +1,7 @@ + VERSION = $(shell date +%Y_%m_%d) + RELEASE_NAME = ezusbmidi-$(VERSION) + +-all: ezusbmidi1x1.ihx ezusbmidi2x2.ihx ezusbmidi.html ezusbmidi.ps ++all: ezusbmidi1x1.ihx ezusbmidi2x2.ihx + + ezusbmidi1x1.ihx: ezusbmidi.c ezusb_reg.h bufsync.h + rm -rf sdcc; mkdir sdcc; cp $^ sdcc diff --git a/utils/firmwarehotplug/patches/100-compile-fixes.patch b/utils/firmwarehotplug/patches/100-compile-fixes.patch new file mode 100644 index 0000000..056a9c6 --- /dev/null +++ b/utils/firmwarehotplug/patches/100-compile-fixes.patch @@ -0,0 +1,36 @@ +Index: firmwarehotplug-0.1/ezusb/midi/original/Makefile +=================================================================== +--- firmwarehotplug-0.1.orig/ezusb/midi/original/Makefile 2010-10-29 19:21:43.867000023 +0200 ++++ firmwarehotplug-0.1/ezusb/midi/original/Makefile 2010-10-29 19:27:09.590002911 +0200 +@@ -1,15 +1,18 @@ + VERSION = $(shell date +%Y_%m_%d) + RELEASE_NAME = ezusbmidi-$(VERSION) + ++SDCC = sdcc ++PACKIHX = packihx ++ + all: ezusbmidi1x1.ihx ezusbmidi2x2.ihx + + ezusbmidi1x1.ihx: ezusbmidi.c ezusb_reg.h bufsync.h +- rm -rf sdcc; mkdir sdcc; cp $^ sdcc +- cd sdcc; sdcc -DCONFIG_MidiSport1x1 -I. $<; packihx ezusbmidi.ihx > ../$@ ++ rm -rf sdcc.1x1 && mkdir sdcc.1x1 && cp $^ sdcc.1x1/ ++ cd sdcc.1x1 && $(SDCC) -DCONFIG_MidiSport1x1 -I. $< && $(PACKIHX) ezusbmidi.ihx > ../$@ + + ezusbmidi2x2.ihx: ezusbmidi.c ezusb_reg.h bufsync.h +- rm -rf sdcc; mkdir sdcc; cp $^ sdcc +- cd sdcc; sdcc -DCONFIG_MidiSport2x2 -I. $<; packihx ezusbmidi.ihx > ../$@ ++ rm -rf sdcc.2x2 && mkdir sdcc.2x2 && cp $^ sdcc.2x2/ ++ cd sdcc.2x2 && $(SDCC) -DCONFIG_MidiSport2x2 -I. $< && $(PACKIHX) ezusbmidi.ihx > ../$@ + + ezusbmidi.ps: ezusbmidi.sgml descriptor.png + sgml2latex --output=ps $< +@@ -27,7 +30,7 @@ + fakeroot dpkg-buildpackage + + clean: +- rm -rf sdcc ++ rm -rf sdcc* + rm -f [1-9] *.pdf *.html *.ps *.ihx *.tar.gz *.tar.bz2 ezusbmidi.spec + rm -rf debian/ezusbmidi debian/files build-stamp configure-stamp + diff --git a/utils/flashrom/Makefile b/utils/flashrom/Makefile new file mode 100644 index 0000000..b1e7555 --- /dev/null +++ b/utils/flashrom/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2010-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=flashrom +PKG_VERSION:=0.9.3 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://download.flashrom.org/releases +PKG_MD5SUM:=eccdec2764223f5d2839bf577380eaa9 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/flashrom + SECTION:=utils + CATEGORY:=Utilities + TITLE:=FlashROM Utility + URL:=http://www.flashrom.org/ +# XXX: needs , only available on these arch right now + DEPENDS:=+zlib +pciutils +dmidecode @(arm||armeb||i386||i686||x86_64) +endef + +define Package/flashrom/description + flashrom is a utility for identifying, reading, writing, verifying + and erasing flash chips. It's often used to flash BIOS/EFI/coreboot + /firmware images. +endef + +MAKE_FLAGS += \ + PREFIX="/usr" + +define Package/flashrom/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/flashrom $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,flashrom)) diff --git a/utils/flashrom/patches/001-msr_dev_path.patch b/utils/flashrom/patches/001-msr_dev_path.patch new file mode 100644 index 0000000..d018c72 --- /dev/null +++ b/utils/flashrom/patches/001-msr_dev_path.patch @@ -0,0 +1,21 @@ +--- a/physmap.c ++++ b/physmap.c +@@ -352,7 +352,7 @@ int setup_cpu_msr(int cpu) + { + char msrfilename[64]; + memset(msrfilename, 0, sizeof(msrfilename)); +- snprintf(msrfilename, sizeof(msrfilename), "/dev/cpu/%d/msr", cpu); ++ snprintf(msrfilename, sizeof(msrfilename), "/dev/msr%d", cpu); + + if (fd_msr != -1) { + msg_pinfo("MSR was already initialized\n"); +@@ -362,7 +362,8 @@ int setup_cpu_msr(int cpu) + fd_msr = open(msrfilename, O_RDWR); + + if (fd_msr < 0) { +- perror("Error while opening /dev/cpu/0/msr"); ++ fprintf(stderr, "Error while opening %s: %s\n", msrfilename, ++ strerror(errno)); + msg_pinfo("Did you run 'modprobe msr'?\n"); + return -1; + } diff --git a/utils/fortune-mod/Makefile b/utils/fortune-mod/Makefile new file mode 100644 index 0000000..e3482c7 --- /dev/null +++ b/utils/fortune-mod/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=fortune-mod +PKG_VERSION:=1.2.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://freeware.sgi.com/source/fortune-mod +PKG_MD5SUM:=383b1de06b35450235732c7ae7b5f0e3 + +include $(INCLUDE_DIR)/package.mk + +define Package/fortune-mod + SECTION:=utils + CATEGORY:=Utilities + TITLE:=display fortune cookies on demand. + URL:=http://packages.debian.org/fortune-mod +endef + +define Package/fortune-mod/description +Fortune mod displays fortune cookies on demand +endef + +define Build/Compile + $(HOSTCC) -Wall -o $(PKG_BUILD_DIR)/util/strfile-host $(PKG_BUILD_DIR)/util/strfile.c -DVERSION=\"$(PKG_VERSION)\" + $(PKG_BUILD_DIR)/util/strfile-host $(PKG_BUILD_DIR)/datfiles/fortunes $(PKG_BUILD_DIR)/datfiles/fortunes.dat + $(MAKE) -C $(PKG_BUILD_DIR)/fortune +endef + +define Package/fortune-mod/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/fortune/fortune $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share/games/fortunes + $(INSTALL_BIN) $(PKG_BUILD_DIR)/datfiles/fortunes $(1)/usr/share/games/fortunes + $(INSTALL_BIN) $(PKG_BUILD_DIR)/datfiles/fortunes.dat $(1)/usr/share/games/fortunes +endef + +$(eval $(call BuildPackage,fortune-mod)) diff --git a/utils/fortune-mod/patches/01-strfile-64bit-fix b/utils/fortune-mod/patches/01-strfile-64bit-fix new file mode 100644 index 0000000..9bd3da9 --- /dev/null +++ b/utils/fortune-mod/patches/01-strfile-64bit-fix @@ -0,0 +1,156 @@ +--- fortune-mod-1.2.1/util/strfile.c.orig 2007-07-27 00:40:54.687140050 +0100 ++++ fortune-mod-1.2.1/util/strfile.c 2007-07-27 00:41:14.184165656 +0100 +@@ -144,7 +135,7 @@ + typedef struct + { + char first; +- off_t pos; ++ int32_t pos; + } + STR; + +@@ -159,7 +150,7 @@ + int Xflag = FALSE; /* set rotated bit */ + long Num_pts = 0; /* number of pointers/strings */ + +-off_t *Seekpts; ++int32_t *Seekpts; + + FILE *Sort_1, *Sort_2; /* pointers for sorting */ + +@@ -237,9 +228,9 @@ + * add_offset: + * Add an offset to the list, or write it out, as appropriate. + */ +-void add_offset(FILE * fp, off_t off) ++void add_offset(FILE * fp, int32_t off) + { +- off_t net; ++ int32_t net; + + if (!STORING_PTRS) + { +@@ -258,9 +249,9 @@ + * fix_last_offset: + * Used when we have two separators in a row. + */ +-void fix_last_offset(FILE * fp, off_t off) ++void fix_last_offset(FILE * fp, int32_t off) + { +- off_t net; ++ int32_t net; + + if (!STORING_PTRS) + { +@@ -333,7 +324,7 @@ + do_order(void) + { + register long i; +- register off_t *lp; ++ register int32_t *lp; + register STR *fp; + + Sort_1 = fopen(Infile, "r"); +@@ -384,8 +375,8 @@ + void randomize(void) + { + register int cnt, i; +- register off_t tmp; +- register off_t *sp; ++ register int32_t tmp; ++ register int32_t *sp; + extern time_t time(time_t *); + + srandom((int) (time((time_t *) NULL) + getpid())); +@@ -422,7 +413,7 @@ + { + register unsigned char *sp; + register FILE *inf, *outf; +- register off_t last_off, length, pos, *p; ++ register int32_t last_off, length, pos, *p; + register int first, cnt; + register char *nsp; + register STR *fp; +@@ -514,14 +505,19 @@ + if (!Sflag) + { + printf("\"%s\" created\n", Outfile); +- if (Num_pts == 2) +- puts("There was 1 string"); ++ if (Num_pts == 1) ++ puts("There was no string"); + else +- printf("There were %ld strings\n", Num_pts - 1); +- printf("Longest string: %lu byte%s\n", Tbl.str_longlen, +- Tbl.str_longlen == 1 ? "" : "s"); +- printf("Shortest string: %lu byte%s\n", Tbl.str_shortlen, +- Tbl.str_shortlen == 1 ? "" : "s"); ++ { ++ if (Num_pts == 2) ++ puts("There was 1 string"); ++ else ++ printf("There were %ld strings\n", Num_pts - 1); ++ printf("Longest string: %lu byte%s\n", Tbl.str_longlen, ++ Tbl.str_longlen == 1 ? "" : "s"); ++ printf("Shortest string: %lu byte%s\n", Tbl.str_shortlen, ++ Tbl.str_shortlen == 1 ? "" : "s"); ++ } + } + + fseek(outf, (off_t) 0, 0); +@@ -533,12 +529,19 @@ + Tbl.str_longlen = htonl(Tbl.str_longlen); + Tbl.str_shortlen = htonl(Tbl.str_shortlen); + Tbl.str_flags = htonl(Tbl.str_flags); +- fwrite((char *) &Tbl, sizeof Tbl, 1, outf); ++ fwrite(&Tbl.str_version, sizeof Tbl.str_version, 1, outf); ++ fwrite(&Tbl.str_numstr, sizeof Tbl.str_numstr, 1, outf); ++ fwrite(&Tbl.str_longlen, sizeof Tbl.str_longlen, 1, outf); ++ fwrite(&Tbl.str_shortlen, sizeof Tbl.str_shortlen, 1, outf); ++ fwrite(&Tbl.str_flags, sizeof Tbl.str_flags, 1, outf); ++ fwrite( Tbl.stuff, sizeof Tbl.stuff, 1, outf); + if (STORING_PTRS) + { + for (p = Seekpts, cnt = Num_pts; cnt--; ++p) ++ { + *p = htonl(*p); +- fwrite((char *) Seekpts, sizeof *Seekpts, (int) Num_pts, outf); ++ fwrite(p, sizeof *p, 1, outf); ++ } + } + fclose(outf); + exit(0); +--- fortune-mod-1.2.1/util/strfile.h 2000-01-29 11:14:34.000000000 +0000 ++++ fortune-mod-1.2.1/util/strfile.h 2007-07-27 00:25:46.825640014 +0100 +@@ -38,24 +38,19 @@ + * @(#)strfile.h 8.1 (Berkeley) 5/31/93 + */ + +-/* Modified Jan 2000, Chris Ausbrooks +- * + Changed VERSION to FILE_VERSION to avoid warnings caused by +- * automake/autoconf. +- */ +- + #define STR_ENDSTRING(line,tbl) \ + ((line)[0] == (tbl).str_delim && (line)[1] == '\n') + + typedef struct { /* information table */ +-#define FILE_VERSION 1 +- unsigned long str_version; /* version number */ +- unsigned long str_numstr; /* # of strings in the file */ +- unsigned long str_longlen; /* length of longest string */ +- unsigned long str_shortlen; /* length of shortest string */ ++#define FILE_VERSION 2 ++ u_int32_t str_version; /* version number */ ++ u_int32_t str_numstr; /* # of strings in the file */ ++ u_int32_t str_longlen; /* length of longest string */ ++ u_int32_t str_shortlen; /* length of shortest string */ + #define STR_RANDOM 0x1 /* randomized pointers */ + #define STR_ORDERED 0x2 /* ordered pointers */ + #define STR_ROTATED 0x4 /* rot-13'd text */ +- unsigned long str_flags; /* bit field for flags */ +- unsigned char stuff[4]; /* long aligned space */ ++ u_int32_t str_flags; /* bit field for flags */ ++ u_int8_t stuff[4]; /* long aligned space */ + #define str_delim stuff[0] /* delimiting character */ + } STRFILE; diff --git a/utils/fowsr/Makefile b/utils/fowsr/Makefile new file mode 100644 index 0000000..2de6499 --- /dev/null +++ b/utils/fowsr/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=fowsr +PKG_VERSION:=1.0 +PKG_RELEASE:=20100718 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.gz +PKG_SOURCE_URL:=http://fowsr.googlecode.com/files +PKG_MD5SUM:=34a53f0ba60a62636feef3e09d9e4312 + +include $(INCLUDE_DIR)/package.mk + +define Package/fowsr + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libusb + TITLE:=Fine Offset Wireless Weather Station Reader + URL:=http://fowsr.googlecode.com/ +endef + +define Package/fowsr/description + fowsr is a USB Data Collector application for WH1080 compatible + weather stations. + Output formats includes XML, Wunderground.com and pywws. +endef + +CONFIGURE_ARGS += \ + --with-linux-headers="$(LINUX_DIR)" \ + +define Package/fowsr/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/fowsr $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wunderground.sh $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/pywws.sh $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/xml.sh $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,fowsr)) diff --git a/utils/foxboard-utils/Makefile b/utils/foxboard-utils/Makefile new file mode 100644 index 0000000..fcdcef9 --- /dev/null +++ b/utils/foxboard-utils/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=foxboard-utils +PKG_VERSION:=1 +PKG_RELEASE:=1 + +PKG_SOURCE:=foxboard-utils.tar.bz2 +PKG_SOURCE_URL:=http://www.acmesystems.it/download/owrt +PKG_MD5SUM:= + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/foxboard-utils + SECTION:=utils + CATEGORY:=Base system + TITLE:=Foxboard base tools + URL:=http://www.acmesystems.it + DEPENDS:=@TARGET_etrax +endef + +define Package/foxboard-utils/description + This package contains a collection of tools for configuring the foxboard + gpio pins/leds. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) CFLAGS="$(TARGET_CFLAGS)" CC="$(TARGET_CC)" + $(MAKE) -C $(PKG_BUILD_DIR) PREFIX="$(PKG_INSTALL_DIR)" install +endef + +define Package/foxboard-utils/install + $(INSTALL_DIR) $(1)/ + $(CP) $(PKG_INSTALL_DIR)/* $(1) + $(INSTALL_DIR) $(1)/www/cgi-bin + cd $(1)/www/cgi-bin; ln -s ../../bin/editcgi.cgi . +endef + +$(eval $(call BuildPackage,foxboard-utils)) diff --git a/utils/fxload/Makefile b/utils/fxload/Makefile new file mode 100644 index 0000000..f961d52 --- /dev/null +++ b/utils/fxload/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=fxload +PKG_VERSION:=2008_10_13 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/linux-hotplug +PKG_MD5SUM:=4477a2457f064228bef4a93ba2f21692 + +include $(INCLUDE_DIR)/package.mk + +define Package/fxload + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@USB_SUPPORT +udev + TITLE:=Downloading firmware into EZ-USB microcontrollers + URL:=http://linux-hotplug.sourceforge.net/ +endef + +define Build/Compile + $(call Build/Compile/Default, \ + CFLAGS="$(TARGET_CFLAGS) -I$(LINUX_DIR)/include" \ + ) +endef + +define Package/fxload/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/sbin/ + $(INSTALL_DIR) $(1)/usr/share/usb + $(INSTALL_DATA) $(PKG_BUILD_DIR)/a3load.hex $(1)/usr/share/usb/ +endef + +$(eval $(call BuildPackage,fxload)) diff --git a/utils/fxload/patches/010-compile_fix.patch b/utils/fxload/patches/010-compile_fix.patch new file mode 100644 index 0000000..39ab9dc --- /dev/null +++ b/utils/fxload/patches/010-compile_fix.patch @@ -0,0 +1,18 @@ +--- a/ezusb.c ++++ b/ezusb.c +@@ -30,8 +30,14 @@ + # include + + # include +-# include ++typedef unsigned long kernel_ulong_t; ++ ++#ifndef BITS_PER_LONG ++#define BITS_PER_LONG 32 ++#endif ++ + # include ++# include + + # include "ezusb.h" + diff --git a/utils/gadgetfs-test/Makefile b/utils/gadgetfs-test/Makefile new file mode 100644 index 0000000..ae6b021 --- /dev/null +++ b/utils/gadgetfs-test/Makefile @@ -0,0 +1,112 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gadgetfs-test +PKG_VERSION:=2007-11-29 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME).tar.bz2 +PKG_SOURCE_URL:=http://avr32linux.org/twiki/pub/Main/GadgetFsTest +PKG_MD5SUM:=49476a74c29f1281c8a4c035aa57a5bd + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/gadgetfs-test + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Filesystem + TITLE:=Test program for gadgetfs + DEPENDS:=@DEVEL @!LINUX_2_4 +libpthread + URL:=http://linux-usb.org/gadget +endef + +define Package/gadgetfs-test/description + Test program for gadgetfs from linux-usb.org. +endef + +define Package/gadgetfs-test-bulk +$(call Package/gadgetfs-test) + TITLE+= (BULK transfer) +endef + +define Package/gadgetfs-test-bulk/description +$(call Package/gadgetfs-test/description) + This package is built with BULK transfer support. +endef + +define Package/gadgetfs-test-isoc +$(call Package/gadgetfs-test) + DEPENDS+= +libaio + TITLE+= (ISOCHRONOUS transfer) +endef + +define Package/gadgetfs-test-isoc/description +$(call Package/gadgetfs-test/description) + This package is built with ISOCHRONOUS transfer support using libaio. +endef + + +GADGETFS_CFLAGS:=$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS) +GADGETFS_LDFLAGS:=$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS) +GADGETFS_LIBS:=-lpthread + +define Build/Template + +$(STAMP_BUILT)-$(1): $(STAMP_PREPARED) + -$(MAKE) -C $(PKG_BUILD_DIR) clean + $(MAKE_VARS) \ + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CC="$(TARGET_CC)" \ + LDFLAGS="$(GADGETFS_LDFLAGS)" \ + $(2) \ + all + mv -f $(PKG_BUILD_DIR)/gadgetfs-test $(PKG_BUILD_DIR)/gadgetfs-test-$(1) + touch $$@ + +$(STAMP_BUILT): $(STAMP_BUILT)-$(1) + +define Package/gadgetfs-test-$(1)/install + $(INSTALL_DIR) $$(1)/usr/sbin + $(INSTALL_BIN) $$(PKG_BUILD_DIR)/gadgetfs-test-$(1) $$(1)/usr/sbin/ +endef + +endef + +define Build/Configure +endef + +define Build/Compile +endef + +ifneq ($(SDK)$(CONFIG_PACKAGE_gadgetfs-test-bulk),) + define Build/bulk + $(call Build/Template,bulk, \ + CFLAGS="$(GADGETFS_CFLAGS)" \ + LIBS="$(GADGETFS_LIBS)" \ + ) + endef +endif +$(eval $(Build/bulk)) + +ifneq ($(SDK)$(CONFIG_PACKAGE_gadgetfs-test-isoc),) + define Build/isoc + $(call Build/Template,isoc, \ + CFLAGS="$(GADGETFS_CFLAGS) -DAIO" \ + LIBS="$(GADGETFS_LIBS) -laio" \ + ) + endef +endif +$(eval $(Build/isoc)) + +$(eval $(call BuildPackage,gadgetfs-test-bulk)) +$(eval $(call BuildPackage,gadgetfs-test-isoc)) + diff --git a/utils/gadgetfs-test/patches/001-linux_usb_org_2007_11_29.patch b/utils/gadgetfs-test/patches/001-linux_usb_org_2007_11_29.patch new file mode 100644 index 0000000..fce5b68 --- /dev/null +++ b/utils/gadgetfs-test/patches/001-linux_usb_org_2007_11_29.patch @@ -0,0 +1,214 @@ +diff -Nur gadgetfs-test.orig/usb.c gadgetfs-test.2007-11-29/usb.c +--- gadgetfs-test.orig/usb.c 2007-06-21 16:36:32.000000000 +0200 ++++ gadgetfs-test.2007-11-29/usb.c 2007-09-25 09:01:48.000000000 +0200 +@@ -34,8 +34,8 @@ + #include + + #include +-#include +-#include ++#include ++#include + + #ifdef AIO + /* this aio code works with libaio-0.3.106 */ +@@ -402,6 +402,26 @@ + fs_status_desc.bEndpointAddress = USB_DIR_IN | 3; + EP_STATUS_NAME = "ep3in-int"; + ++ /* Atmel AT32AP700x processors, high/full speed */ ++ } else if (stat (DEVNAME = "atmel_usba_udc", &statb) == 0) { ++ HIGHSPEED = 1; ++ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0108); ++ ++ fs_source_desc.bEndpointAddress ++ = hs_source_desc.bEndpointAddress ++ = USB_DIR_IN | 1; ++ EP_IN_NAME = "ep1in-bulk"; ++ fs_sink_desc.bEndpointAddress ++ = hs_sink_desc.bEndpointAddress ++ = USB_DIR_OUT | 2; ++ EP_OUT_NAME = "ep2out-bulk"; ++ ++ source_sink_intf.bNumEndpoints = 3; ++ fs_status_desc.bEndpointAddress ++ = hs_status_desc.bEndpointAddress ++ = USB_DIR_IN | 3; ++ EP_STATUS_NAME = "ep3in-int"; ++ + } else { + DEVNAME = 0; + return -ENODEV; +@@ -597,18 +617,58 @@ + fs_status_desc.bEndpointAddress = USB_DIR_IN | 3; + EP_STATUS_NAME = "ep3-int"; + ++ /* Atmel AT32AP700x processors, high/full speed */ ++ } else if (stat (DEVNAME = "atmel_usba_udc", &statb) == 0){ ++ HIGHSPEED = 1; ++ ++ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0105); ++ ++ fs_source_desc.bEndpointAddress ++ = hs_source_desc.bEndpointAddress ++ = USB_DIR_IN | 5; ++ fs_source_desc.bmAttributes ++ = hs_source_desc.bmAttributes ++ = USB_ENDPOINT_XFER_ISOC; ++ fs_source_desc.wMaxPacketSize ++ = hs_source_desc.wMaxPacketSize ++ = __cpu_to_le16(min (bufsize, 1024)); ++ fs_source_desc.bInterval ++ = hs_source_desc.bInterval ++ = interval; ++ EP_IN_NAME = "ep5in-iso"; ++ ++ fs_sink_desc.bEndpointAddress ++ = hs_sink_desc.bEndpointAddress ++ = USB_DIR_OUT | 6; ++ fs_sink_desc.bmAttributes ++ = hs_sink_desc.bmAttributes ++ = USB_ENDPOINT_XFER_ISOC; ++ fs_sink_desc.wMaxPacketSize ++ = hs_sink_desc.wMaxPacketSize ++ = __cpu_to_le16(min (bufsize, 1024)); ++ fs_sink_desc.bInterval ++ = hs_sink_desc.bInterval ++ = interval; ++ EP_OUT_NAME = "ep6out-iso"; ++ ++ source_sink_intf.bNumEndpoints = 3; ++ fs_status_desc.bEndpointAddress ++ = hs_status_desc.bEndpointAddress ++ = USB_DIR_IN | 3; ++ EP_STATUS_NAME = "ep3in-int"; ++ + } else { + DEVNAME = 0; + return -ENODEV; + } + if (verbose) { + fprintf (stderr, "iso fs wMaxPacket %04x bInterval %02x\n", +- fs_sink_desc.wMaxPacketSize, ++ __le16_to_cpu(fs_sink_desc.wMaxPacketSize), + fs_sink_desc.bInterval); + if (HIGHSPEED) + fprintf (stderr, + "iso hs wMaxPacket %04x bInterval %02x\n", +- hs_sink_desc.wMaxPacketSize, ++ __le16_to_cpu(hs_sink_desc.wMaxPacketSize), + hs_sink_desc.bInterval); + } + return 0; +@@ -1285,13 +1345,17 @@ + { + int status, tmp; + __u8 buf [256]; ++ __u16 value, index, length; ++ ++ value = __le16_to_cpu(setup->wValue); ++ index = __le16_to_cpu(setup->wIndex); ++ length = __le16_to_cpu(setup->wLength); + + if (verbose) + fprintf (stderr, "SETUP %02x.%02x " + "v%04x i%04x %d\n", + setup->bRequestType, setup->bRequest, +- setup->wValue, setup->wIndex, +- setup->wLength); ++ value, index, length); + + /* + if ((setup->bRequestType & USB_TYPE_MASK) != USB_TYPE_STANDARD) +@@ -1302,21 +1366,21 @@ + case USB_REQ_GET_DESCRIPTOR: + if (setup->bRequestType != USB_DIR_IN) + goto stall; +- switch (setup->wValue >> 8) { ++ switch (value >> 8) { + case USB_DT_STRING: +- tmp = setup->wValue & 0x0ff; ++ tmp = value & 0x0ff; + if (verbose > 1) + fprintf (stderr, + "... get string %d lang %04x\n", +- tmp, setup->wIndex); +- if (tmp != 0 && setup->wIndex != strings.language) ++ tmp, index); ++ if (tmp != 0 && index != strings.language) + goto stall; + status = usb_gadget_get_string (&strings, tmp, buf); + if (status < 0) + goto stall; + tmp = status; +- if (setup->wLength < tmp) +- tmp = setup->wLength; ++ if (length < tmp) ++ tmp = length; + status = write (fd, buf, tmp); + if (status < 0) { + if (errno == EIDRM) +@@ -1336,7 +1400,7 @@ + if (setup->bRequestType != USB_DIR_OUT) + goto stall; + if (verbose) +- fprintf (stderr, "CONFIG #%d\n", setup->wValue); ++ fprintf (stderr, "CONFIG #%d\n", value); + + /* Kernel is normally waiting for us to finish reconfiguring + * the device. +@@ -1349,7 +1413,7 @@ + * the endpoints always active and don't rely on seeing any + * config change events, either this or SET_INTERFACE. + */ +- switch (setup->wValue) { ++ switch (value) { + case CONFIG_VALUE: + start_io (); + break; +@@ -1369,27 +1433,27 @@ + return; + case USB_REQ_GET_INTERFACE: + if (setup->bRequestType != (USB_DIR_IN|USB_RECIP_INTERFACE) +- || setup->wIndex != 0 +- || setup->wLength > 1) ++ || index != 0 ++ || length > 1) + goto stall; + + /* only one altsetting in this driver */ + buf [0] = 0; +- status = write (fd, buf, setup->wLength); ++ status = write (fd, buf, length); + if (status < 0) { + if (errno == EIDRM) + fprintf (stderr, "GET_INTERFACE timeout\n"); + else + perror ("write GET_INTERFACE data"); +- } else if (status != setup->wLength) { ++ } else if (status != length) { + fprintf (stderr, "short GET_INTERFACE write, %d\n", + status); + } + return; + case USB_REQ_SET_INTERFACE: + if (setup->bRequestType != USB_RECIP_INTERFACE +- || setup->wIndex != 0 +- || setup->wValue != 0) ++ || index != 0 ++ || value != 0) + goto stall; + + /* just reset toggle/halt for the interface's endpoints */ +diff -Nur gadgetfs-test.orig/usbstring.c gadgetfs-test.2007-11-29/usbstring.c +--- gadgetfs-test.orig/usbstring.c 2007-06-21 16:36:32.000000000 +0200 ++++ gadgetfs-test.2007-11-29/usbstring.c 2007-09-25 09:01:48.000000000 +0200 +@@ -11,7 +11,7 @@ + #include + + #include +-#include ++#include + + #include "usbstring.h" + diff --git a/utils/gnokii/Makefile b/utils/gnokii/Makefile new file mode 100644 index 0000000..ed26c5f --- /dev/null +++ b/utils/gnokii/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gnokii +PKG_VERSION:=0.6.21 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://gnokii.org/download/gnokii/0.6.x +PKG_MD5SUM:=bbf0aabe2436d8e927f3e2edb4efcac8 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=0 + +include $(INCLUDE_DIR)/package.mk + +define Package/gnokii + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libusb + TITLE:=Gnokii - Datasuite for the mobile phones + URL:=http://www.gnokii.org/ +endef + +define Package/gnokii/description + Gnokii is a suite of programs linked against a backend + library that allows communication with the phones. It + currently supports the most mobile phones, all AT + capable mobiles as well as Symbian phones. +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --without-libiconv-prefix \ + --without-libintl-prefix \ + --disable-rlpdebug \ + --disable-xdebug \ + --disable-debug \ + --enable-shared \ + --disable-static \ + --without-x \ + ) +endef + +define Package/gnokii/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnokii $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gnokiid $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mgnokiidev $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnokii.so.3.5.0 $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnokii.so.3 $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnokii.so $(1)/usr/lib +endef + +$(eval $(call BuildPackage,gnokii)) diff --git a/utils/gnupg/Makefile b/utils/gnupg/Makefile new file mode 100644 index 0000000..291a749 --- /dev/null +++ b/utils/gnupg/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gnupg +PKG_VERSION:=1.4.11 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/gnupg \ + ftp://ftp.gnupg.org/gcrypt/gnupg +PKG_MD5SUM:=411744e1ef8ce90b87938c4203f001f1 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/gnupg + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+zlib +libncurses +libreadline + TITLE:=GNU privacy guard - a free PGP replacement + URL:=http://www.gnupg.org/ +endef + +define Package/gnupg/description + GnuPG is GNU's tool for secure communication and data storage. + It can be used to encrypt data and to create digital signatures. + It includes an advanced key management facility and is compliant + with the proposed OpenPGP Internet standard as described in RFC2440. + . + GnuPG does not use any patented algorithms so it cannot be compatible + with PGP2 because it uses IDEA (which is patented worldwide). +endef + +CONFIGURE_ARGS += \ + --disable-rpath \ + --disable-asm \ + --disable-gnupg-iconv \ + --disable-card-support \ + --disable-agent-support \ + --disable-bzip2 \ + --disable-exec \ + --disable-ldap \ + --disable-hkp \ + --disable-finger \ + --disable-ftp \ + --disable-dns-srv \ + --enable-fake-curl \ + --disable-regex \ + +MAKE_FLAGS += \ + SUBDIRS="m4 intl zlib util mpi cipher tools g10 keyserver ${checks}" \ + +define Package/gnupg/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpg $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,gnupg)) diff --git a/utils/gnupg/patches/001-mips_gcc4.4.patch b/utils/gnupg/patches/001-mips_gcc4.4.patch new file mode 100644 index 0000000..bcc847c --- /dev/null +++ b/utils/gnupg/patches/001-mips_gcc4.4.patch @@ -0,0 +1,86 @@ +--- a/mpi/longlong.h ++++ b/mpi/longlong.h +@@ -710,12 +710,13 @@ extern USItype __udiv_qrnnd (); + ************** MIPS ***************** + ***************************************/ + #if defined (__mips__) && W_TYPE_SIZE == 32 +-#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR >= 4 ) +-#define umul_ppmm(w1, w0, u, v) \ ++#if (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) ++#define umul_ppmm(w1, w0, u, v) \ + do { \ +- UDItype __ll = (UDItype)(u) * (v); \ +- w1 = __ll >> 32; \ +- w0 = __ll; \ ++ UDItype _r; \ ++ _r = (UDItype) u * v; \ ++ (w1) = _r >> 32; \ ++ (w0) = (USItype) _r; \ + } while (0) + #elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 + #define umul_ppmm(w1, w0, u, v) \ +@@ -727,8 +728,8 @@ extern USItype __udiv_qrnnd (); + #else + #define umul_ppmm(w1, w0, u, v) \ + __asm__ ("multu %2,%3 \n" \ +- "mflo %0 \n" \ +- "mfhi %1" \ ++ "mflo %0 \n" \ ++ "mfhi %1" \ + : "=d" ((USItype)(w0)), \ + "=d" ((USItype)(w1)) \ + : "d" ((USItype)(u)), \ +@@ -742,25 +743,34 @@ extern USItype __udiv_qrnnd (); + ************** MIPS/64 ************** + ***************************************/ + #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64 +-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 +-#define umul_ppmm(w1, w0, u, v) \ +- __asm__ ("dmultu %2,%3" \ +- : "=l" ((UDItype)(w0)), \ +- "=h" ((UDItype)(w1)) \ +- : "d" ((UDItype)(u)), \ +- "d" ((UDItype)(v))) +-#else +-#define umul_ppmm(w1, w0, u, v) \ +- __asm__ ("dmultu %2,%3 \n" \ +- "mflo %0 \n" \ +- "mfhi %1" \ +- : "=d" ((UDItype)(w0)), \ +- "=d" ((UDItype)(w1)) \ +- : "d" ((UDItype)(u)), \ +- "d" ((UDItype)(v))) +-#endif +-#define UMUL_TIME 20 +-#define UDIV_TIME 140 ++# if (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) ++ typedef unsigned int UTItype __attribute__ ((mode (TI))); ++# define umul_ppmm(w1, w0, u, v) \ ++ do { \ ++ UTItype _r; \ ++ _r = (UTItype) u * v; \ ++ (w1) = _r >> 64; \ ++ (w0) = (UDItype) _r; \ ++ } while (0) ++# elif if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 ++# define umul_ppmm(w1, w0, u, v) \ ++ __asm__ ("dmultu %2,%3" \ ++ : "=l" ((UDItype)(w0)), \ ++ "=h" ((UDItype)(w1)) \ ++ : "d" ((UDItype)(u)), \ ++ "d" ((UDItype)(v))) ++# else ++# define umul_ppmm(w1, w0, u, v) \ ++ __asm__ ("dmultu %2,%3 \n" \ ++ "mflo %0 \n" \ ++ "mfhi %1" \ ++ : "=d" ((UDItype)(w0)), \ ++ "=d" ((UDItype)(w1)) \ ++ : "d" ((UDItype)(u)), \ ++ "d" ((UDItype)(v))) ++# endif ++# define UMUL_TIME 20 ++# define UDIV_TIME 140 + #endif /* __mips__ */ + + diff --git a/utils/gnuplot/Makefile b/utils/gnuplot/Makefile new file mode 100644 index 0000000..b60e943 --- /dev/null +++ b/utils/gnuplot/Makefile @@ -0,0 +1,50 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=gnuplot +PKG_VERSION:=4.4.0 +PKG_RELEASE:=2 + +PKG_INSTALL=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/gnuplot +PKG_MD5SUM:=e708665bd512153ad5c35252fe499059 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +TARGET_LDFLAGS+= \ + -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +CONFIGURE_VARS += \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \ + CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \ + LIBS="-nodefaultlibs -luClibc++ -lpthread $(LIBGCC_S)" + +define Package/gnuplot + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libncurses +uclibcxx +zlib +libpng +libfreetype +libgd $(INTL_DEPENDS) $(ICONV_DEPENDS) + TITLE:=A portable command-line driven graphing utility + URL:=http://sourceforge.net/projects/gnuplot/ +endef + +define Package/gnuplot/description + Gnuplot is a portable command-line driven graphing utility for linux, OS/2, + MS Windows, OSX, VMS, and many other platforms. +endef + +CONFIGURE_ARGS += \ + --without-x \ + --disable-mouse \ + --without-tutorial \ + --without-row-help \ + --without-lisp-files \ + --disable-wxwidgets + +define Package/gnuplot/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnuplot $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,gnuplot)) diff --git a/utils/gnuplot/patches/010-Makefile.in.patch b/utils/gnuplot/patches/010-Makefile.in.patch new file mode 100644 index 0000000..a2e76b3 --- /dev/null +++ b/utils/gnuplot/patches/010-Makefile.in.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in.orig 2010-03-13 22:20:04.000000000 +0100 ++++ b/Makefile.in 2010-06-03 15:08:35.000000000 +0200 +@@ -240,7 +240,7 @@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AUTOMAKE_OPTIONS = foreign 1.2h +-SUBDIRS = config m4 term src docs $(LISPDIR) man demo tutorial share ++SUBDIRS = config m4 term src $(LISPDIR) share + EXTRA_DIST = BUGS CodeStyle Copyright FAQ.pdf GNUmakefile INSTALL INSTALL.gnu \ + Makefile.maint PATCHLEVEL PGPKEYS PORTING README README.1ST \ + VERSION configure.vms pm3d diff --git a/utils/gpiotoggling/Makefile b/utils/gpiotoggling/Makefile new file mode 100644 index 0000000..84360b4 --- /dev/null +++ b/utils/gpiotoggling/Makefile @@ -0,0 +1,38 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=gpiotoggling +PKG_RELEASE:=1 +PKG_REV:=b57866441932eabc75b6c4252103121f606dc820 +PKG_VERSION:=$(PKG_REV) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=git://github.com/mirko/gpio-toggling---linux-kernel-module.git +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_PROTO:=git + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/gpiotoggling + SUBMENU:=Other modules + TITLE:=Toggle GPIOs in kernel space + FILES:=$(PKG_BUILD_DIR)/gpiotoggling.ko +endef + +define Build/Compile + $(MAKE) -C $(LINUX_DIR) \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + SUBDIRS="$(PKG_BUILD_DIR)" \ + modules +endef + +$(eval $(call KernelPackage,gpiotoggling)) diff --git a/utils/gzip/Makefile b/utils/gzip/Makefile new file mode 100644 index 0000000..dc41663 --- /dev/null +++ b/utils/gzip/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gzip +PKG_VERSION:=1.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@GNU/gzip +PKG_MD5SUM:=e381b8506210c794278f5527cba0e765 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/gzip + SECTION:=utils + CATEGORY:=Utilities + TITLE:=gzip (GNU zip) is a compression utility. + URL:=http://www.gzip.org/ +endef + +define Package/gzip/description + gzip (GNU zip) is a compression utility designed to be a \ + replacement for compress. +endef + +CONFIGURE_VARS += \ + gl_cv_func_getopt_gnu=yes \ + +define Package/gzip/install + $(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat} + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/ +endef + +define Package/gzip/postinst +#!/bin/sh +for app in gunzip gzip zcat; do + ln -sf $${IPKG_INSTROOT}/usr/bin/$$app $${IPKG_INSTROOT}/bin/$$app +done +endef + +define Package/gzip/postrm +#!/bin/sh +for app in gunzip gzip zcat; do + ln -sf busybox $${IPKG_INSTROOT}/bin/$$app + $${IPKG_INSTROOT}/bin/$$app 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/$$app +done +exit 0 +endef + +$(eval $(call BuildPackage,gzip)) + diff --git a/utils/haserl/Makefile b/utils/haserl/Makefile new file mode 100644 index 0000000..91980e9 --- /dev/null +++ b/utils/haserl/Makefile @@ -0,0 +1,32 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=haserl +PKG_VERSION:=0.9.27 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/haserl +PKG_MD5SUM:=1f692db8939858338a44e25d0190aa9e + +include $(INCLUDE_DIR)/package.mk + +define Package/haserl + SECTION:=utils + CATEGORY:=Utilities + TITLE:=A CGI wrapper to embed shell scripts in HTML documents + URL:=http://haserl.sourceforge.net/ +endef + +define Package/haserl/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/haserl $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,haserl)) diff --git a/utils/hd-idle/Makefile b/utils/hd-idle/Makefile new file mode 100644 index 0000000..a97445d --- /dev/null +++ b/utils/hd-idle/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=hd-idle +PKG_VERSION:=1.03 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=049d6e6fc703a7e0474bdd9c24e6de77 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/hd-idle + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Another idle-daemon for attached hard drives + SUBMENU:=disc + URL:=http://hd-idle.sourceforge.net/ +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME).c +endef + +define Package/hd-idle/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) +endef + +$(eval $(call BuildPackage,hd-idle)) diff --git a/utils/hd-idle/files/hd-idle.config b/utils/hd-idle/files/hd-idle.config new file mode 100644 index 0000000..4e22c3b --- /dev/null +++ b/utils/hd-idle/files/hd-idle.config @@ -0,0 +1,6 @@ +config 'hd-idle' + option 'disk' 'sda' + option 'enable_debug' '0' + option 'enabled' '0' + option 'idle_time_unit' 'minutes' + option 'idle_time_interval' '10' diff --git a/utils/hd-idle/files/hd-idle.init b/utils/hd-idle/files/hd-idle.init new file mode 100644 index 0000000..4b091be --- /dev/null +++ b/utils/hd-idle/files/hd-idle.init @@ -0,0 +1,87 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=50 + +SSD=start-stop-daemon +NAME=hd-idle +PROG=/usr/bin/$NAME + +append_bool() { + local section="$1" + local option="$2" + local value="$3" + local _val + config_get_bool _val "$section" "$option" '0' + [ "$_val" -gt 0 ] && append args "$3" +} + +append_string() { + local section="$1" + local option="$2" + local value="$3" + local _val + config_get _val "$section" "$option" + [ -n "$_val" ] && append args "$3 $_val" +} + +compute_seconds() { + local interval="$1" + local unit="$2" + + if [ -z "$interval" ] + then + interval=10 + fi + + if [ -z "$unit" ] + then + unit="minutes" + fi + + # compute interval in seconds + case "$unit" in + "days" ) + interval_seconds=$(($interval*60*60*24)) + ;; + "hours" ) + interval_seconds=$(($interval*60*60)) + ;; + "minutes" ) + interval_seconds=$(($interval*60)) + ;; + "seconds" ) + interval_seconds=$interval + ;; + * ) + # default is minutes + interval_seconds=$(($interval*60)) + ;; + esac + + echo $interval_seconds +} + +start_service() { + local section="$1" + args="" + config_get "interval" "$section" "idle_time_interval" + config_get "unit" "$section" "idle_time_unit" + append_string "$section" "disk" "-t" + append_bool "$section" "enable_debug" "-d" + config_get_bool "enabled" "$section" "enabled" '1' + [ "$enabled" -gt 0 ] && $SSD -S -q -x $PROG -- "-i $(compute_seconds $interval $unit) $args" +} + +stop_service() { + $SSD -K -q -x $PROG +} + +start() { + config_load "hd-idle" + config_foreach start_service "hd-idle" +} + +stop() { + config_load "hd-idle" + config_foreach stop_service "hd-idle" +} diff --git a/utils/hdparm/Makefile b/utils/hdparm/Makefile new file mode 100644 index 0000000..59f7a43 --- /dev/null +++ b/utils/hdparm/Makefile @@ -0,0 +1,38 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=hdparm +PKG_VERSION:=9.37 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=0bb94ddd1bedd5c02b1ca62f1caaf6de + +include $(INCLUDE_DIR)/package.mk + +define Package/hdparm + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=disc + TITLE:=Hard disk drive configuration utilitity + URL:=http://sourceforge.net/projects/hdparm/ + MAINTAINER:=Luka Perkov +endef + +define Package/hdparm/description + get/set SATA/IDE device parameters +endef + +define Package/hdparm/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/sbin +endef + +$(eval $(call BuildPackage,hdparm)) diff --git a/utils/heyu/Makefile b/utils/heyu/Makefile new file mode 100644 index 0000000..6694a26 --- /dev/null +++ b/utils/heyu/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=heyu +PKG_VERSION:=2.9.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://heyu.tanj.com/download/ +PKG_MD5SUM:=89d20d7f45109e7add5f0a141eac04eb + +include $(INCLUDE_DIR)/package.mk + +define Package/heyu + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+setserial + TITLE:=X10 home automation control using a CM11A + URL:=http://heyu.tanj.com/heyu2/ +endef + +define Package/heyu/description + HEYU is a text-based console program for remotely controlling lights + and appliances in the home or office. It is made available under a + free and open source license. + + Heyu uses the CM11A computer interface to send and receive X10 control + signals over the AC power lines to modules which can turn On, Off, or + Dim attached lamps or appliances. It can store a schedule of timed + events in the CM11A memory for execution when the computer is turned + off or disconnected. +endef + +define Package/heyu/conffiles +/etc/heyu/x10.conf +endef + +define Build/Compile + $(call Build/Compile/Default, \ + CFLAGS="$(TARGET_CFLAGS) \$$$$(DFLAGS)" \ + ) +endef + +define Package/heyu/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/heyu $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/etc/$(PKG_NAME) + $(INSTALL_DATA) ./files/x10.conf $(1)/etc/$(PKG_NAME)/x10.conf +endef + +$(eval $(call BuildPackage,heyu)) diff --git a/utils/heyu/files/x10.conf b/utils/heyu/files/x10.conf new file mode 100644 index 0000000..3cacaf5 --- /dev/null +++ b/utils/heyu/files/x10.conf @@ -0,0 +1,24 @@ +# this file should contain x10 appliance aliases, one per line, as: +# appliance-name housecode modulenumber +# for example: +# mydesklamp A 4 +# atticfan B 3 +# sumppump C 3 +# manythings J 1-4 +# +# IMPORTANT! disable the serial console if you need to use heyu +# on /dev/tts/0. Read http://forum.openwrt.org/viewtopic.php?id=1767 +# +# NOTE: using /dev/tts/1 requires the setserial package to +# set the port to use irq 3, otherwise performance will be +# unbearable as it is polled. +# +TTY /dev/tts/1 +# +# give your location - for computing sunrise and sunset times +# Boston, MA USA: +#LATITUDE N42:20 +#LONGITUDE W71:05 +# Menlo Park, CA USA: +LATITUDE N37:43 +LONGITUDE W122:20 diff --git a/utils/heyu/patches/001-avoid_configure.patch b/utils/heyu/patches/001-avoid_configure.patch new file mode 100644 index 0000000..ca895e4 --- /dev/null +++ b/utils/heyu/patches/001-avoid_configure.patch @@ -0,0 +1,261 @@ +--- /dev/null ++++ b/Makefile +@@ -0,0 +1,252 @@ ++# Makefile for HEYU, a program to control an X10 CM11A computer interface. ++# This makefile is generated by the Configure program. ++# ++BIN = /usr/bin ++MAN = /usr/man/man1 ++MAN5 = /usr/man/man5 ++GROUP = sys ++OWNER = root ++ ++# set DFLAGS equal to: ++# -DSYSV if using SYSTEM V ++# -DVOID if compiler doesn't understand 'void' ++ ++#This makefile is built for linux ++DFLAGS = -DSYSV -DPOSIX -DHAS_ITIMER -DLINUX -DHASSELECT -DHASTZ -DHASCM17A ++LIBS = -lm -lc ++# # The rest of the makefile should need no changes ++ ++## Makefile template for Heyu, a program to control an X10 CM11A computer ++## interface. From this point on the Makefile is copied from Makefile.in ++## by the Configure program ++ ++SRCS = date.c erase.c info.c message.c relay.c \ ++ monitor.c reset.c setclock.c stop.c \ ++ tty.c x10.c xread.c xwrite.c status.c cm11a.c \ ++ eeprom.c process.c sun.c cmd.c config.c x10state.c \ ++ poll.c modules.c cm17a.c xsync.c timing.c cm10a.c \ ++ tty_aux.c relay_aux.c x10aux.c rfxcom.c digimax.c oregon.c ++OBJS = date.o erase.o info.o message.o relay.o \ ++ monitor.o reset.o setclock.o stop.o \ ++ tty.o x10.o xread.o xwrite.o status.o cm11a.o \ ++ eeprom.o process.o sun.o cmd.o config.o x10state.o \ ++ poll.o modules.o cm17a.o xsync.o timing.o cm10a.o \ ++ tty_aux.o relay_aux.o x10aux.o rfxcom.o digimax.o oregon.o ++ ++OTHERSRC = README README2 Makefile x10config.sample protocol.txt eeprom.h \ ++ x10.sched.sample heyu.1 x10.h x10config.5 x10cm17a.5 \ ++ history.txt version.h heyufaq.txt x10sched.5 process.h sun.h \ ++ x10scripts.5 Configure Makefile.in install.sh INSTALL LICENSE \ ++ README.cm10a x10aux.5 x10state.h rfxcom.h digimax.h oregon.h x10rfxsensors.5\ ++ x10rfxmeters.5 x10digimax.5 x10oregon.5 ++ ++EVERYTHING = $(OTHERSRC) $(SRCS) ++ ++all: heyu ++ ++heyu: $(OBJS) version.h ++ $(CC) $(LDFLAGS) -o heyu $(OBJS) $(LIBS) ++ @echo `id` >usergroup.tmp ++ @echo ${HOME} >userhome.tmp ++ @echo "" ++ @echo "** Now become root and run 'make install' **" ++ @echo "" ++ ++$(OBJS): x10.h process.h sun.h Makefile ++ ++eeprom.o: eeprom.h ++info.o: version.h ++x10state.o: x10state.c x10state.h rfxcom.h digimax.h oregon.h ++rfxcom.o: rfxcom.c x10state.h rfxcom.h ++digimax.o: digimax.c x10state.h digimax.h ++oregon.o: oregon.c x10state.h oregon.h ++modules.o: modules.c oregon.h ++poll.o: poll.c oregon.h ++ ++install: $(BIN)/heyu $(MAN)/heyu.1 $(MAN5)/x10config.5 $(MAN5)/x10sched.5 \ ++ $(MAN5)/x10scripts.5 $(MAN5)/x10cm17a.5 $(MAN5)/x10aux.5 \ ++ $(MAN5)/x10rfxsensors.5 $(MAN5)/x10rfxmeters.5 $(MAN5)/x10digimax.5 \ ++ $(MAN5)/x10oregon.5 ++ ++maninstall: $(MAN)/heyu.1 $(MAN5)/x10config.5 $(MAN5)/x10sched.5 \ ++ $(MAN5)/x10scripts.5 $(MAN5)/x10cm17a.5 $(MAN5)/x10aux.5 \ ++ $(MAN5)/x10rfxsensors.5 $(MAN5)/x10rfxmeters.5 \ ++ $(MAN5)/x10digimax.5 $(MAN5)/x10oregon.5 ++ ++uninstall: ++ rm -f $(BIN)/heyu ++ rm -f $(MAN)/heyu.1 ++ rm -f $(MAN5)/x10config.5 ++ rm -f $(MAN5)/x10sched.5 ++ rm -f $(MAN5)/x10scripts.5 ++ rm -f $(MAN5)/x10cm17a.5 ++ rm -f $(MAN5)/x10aux.5 ++ rm -f $(MAN5)/x10rfxsensors.5 ++ rm -f $(MAN5)/x10rfxmeters.5 ++ rm -f $(MAN5)/x10digimax.5 ++ rm -f $(MAN5)/x10oregon.5 ++ ++$(BIN)/heyu: heyu ++ mkdir -p -m 755 $(BIN) ++ cp heyu $(BIN) ++ chgrp $(GROUP) $(BIN)/heyu ++ chmod 755 $(BIN)/heyu ++ chown $(OWNER) $(BIN)/heyu ++ ./install.sh ++ ++$(MAN)/heyu.1: heyu.1 ++ mkdir -p -m 755 $(MAN) ++ cp heyu.1 $(MAN) ++ chmod 644 $(MAN)/heyu.1 ++ ++$(MAN5)/x10config.5: x10config.5 ++ mkdir -p -m 755 $(MAN5) ++ cp x10config.5 $(MAN5) ++ chmod 644 $(MAN5)/x10config.5 ++ ++$(MAN5)/x10sched.5: x10sched.5 ++ mkdir -p -m 755 $(MAN5) ++ cp x10sched.5 $(MAN5) ++ chmod 644 $(MAN5)/x10sched.5 ++ ++$(MAN5)/x10scripts.5: x10scripts.5 ++ mkdir -p -m 755 $(MAN5) ++ cp x10scripts.5 $(MAN5) ++ chmod 644 $(MAN5)/x10scripts.5 ++ ++$(MAN5)/x10cm17a.5: x10cm17a.5 ++ mkdir -p -m 755 $(MAN5) ++ cp x10cm17a.5 $(MAN5) ++ chmod 644 $(MAN5)/x10cm17a.5 ++ ++$(MAN5)/x10aux.5: x10aux.5 ++ mkdir -p -m 755 $(MAN5) ++ cp x10aux.5 $(MAN5) ++ chmod 644 $(MAN5)/x10aux.5 ++ ++$(MAN5)/x10rfxsensors.5: x10rfxsensors.5 ++ mkdir -p -m 755 $(MAN5) ++ cp x10rfxsensors.5 $(MAN5) ++ chmod 644 $(MAN5)/x10rfxsensors.5 ++ ++$(MAN5)/x10rfxmeters.5: x10rfxmeters.5 ++ mkdir -p -m 755 $(MAN5) ++ cp x10rfxmeters.5 $(MAN5) ++ chmod 644 $(MAN5)/x10rfxmeters.5 ++ ++$(MAN5)/x10digimax.5: x10digimax.5 ++ mkdir -p -m 755 $(MAN5) ++ cp x10digimax.5 $(MAN5) ++ chmod 644 $(MAN5)/x10digimax.5 ++ ++$(MAN5)/x10oregon.5: x10oregon.5 ++ mkdir -p -m 755 $(MAN5) ++ cp x10oregon.5 $(MAN5) ++ chmod 644 $(MAN5)/x10oregon.5 ++ ++lint: ++ lint $(DFLAGS) $(SRCS) ++ ++shar: x10_heyu.shar.1 x10_heyu.shar.2 ++ ++x10.o: x10.c version.h ++process.o: process.c version.h ++xread.o: xread.c local.h ++ ++ci: $(SRCS) index.html Makefile ++ @ for FL in $+ ; do \ ++ if test -w $$FL ; then \ ++ ci -l $$FL ;\ ++ fi ;\ ++ done ++ ++x10_heyu.shar.1: ++ shar $(OTHERSRC) >x10_heyu.shar.1 ++ ++x10_heyu.shar.2: ++ shar $(SRCS) > x10_heyu.shar.2 ++ ++bigshar: ++ shar $(EVERYTHING) > x10_heyu.shar ++ ++tar: x10_heyu.tgz ++ ++x10_heyu.tgz: $(EVERYTHING) ++ rm -fr heyu.dir ++ mkdir heyu.dir ++ cp -p $(EVERYTHING) heyu.dir ++ cp Makefile.dist heyu.dir/Makefile ++ tar -czvf x10_heyu.tgz heyu.dir ++ ++heyudistro: $(EVERYTHING) ++ rm -rf distro.dir ++ mkdir distro.dir ++ cp -p $(EVERYTHING) distro.dir ++ cp -p release_notes.txt distro.dir ++ cp -p INSTALL distro.dir/README.INSTALL ++ rm distro.dir/Makefile ++ ++man2html: ++ man2html heyu.1 >./html/heyu.1.html ++ man2html x10config.5 >./html/x10config.5.html ++ man2html x10scripts.5 > ./html/x10scripts.5.html ++ man2html x10sched.5 > ./html/x10sched.5.html ++ man2html x10aux.5 > ./html/x10aux.5.html ++ man2html x10cm17a.5 > ./html/x10cm17a.5.html ++ man2html x10rfxsensors.5 > ./html/x10rfxsensors.5.html ++ man2html x10rfxmeters.5 > ./html/x10rfxmeters.5.html ++ man2html x10digimax.5 > ./html/x10digimax.5.html ++ man2html x10oregon.5 > ./html/x10oregon.5.html ++ ++beta: x10_beta.tgz ++ ++x10_beta.tgz: $(EVERYTHING) ++ rm -fr heyu.beta ++ mkdir heyu.beta ++ cp -p $(EVERYTHING) heyu.beta ++ cp Makefile.dist heyu.dir/Makefile ++ tar -czvf x10_beta.tgz heyu.beta ++ ++zip: x10_heyu.zip ++ ++x10_heyu.zip: $(EVERYTHING) ++ rm -f x10_heyu.zip ++ zip -kl x10_heyu.zip $(EVERYTHING) ++ ++touch: ++ touch $(OTHERSRC) ++ touch $(SRCS) ++ ++clean: ++ rm -f *.o ++ ++clobber: clean ++ rm -f heyu ++ ++upload: heyu index.html x10_heyu.tgz x10_heyu.zip ++ /bin/sh -c ./upload.sh ++ ++rcsdiffrw: ++ @-for x in `$(MAKE) rw` ;\ ++ do \ ++ echo ;\ ++ echo $$x ;\ ++ echo ========= ;\ ++ rcsdiff $$x ;\ ++ done 2>&1 ;\ ++ echo ;\ ++ echo all done ++ ++list: ++ @ls $(EVERYTHING) | more ++ ++rw: ++ @ls -l $(EVERYTHING) | \ ++ egrep '^[^l].w' | \ ++ sed 's;.* ;;' # strip to last space ++ ++populate: $(EVERYTHING) ++ ++$(EVERYTHING): ++## co -r$(revision) $@ ++ +--- /dev/null ++++ b/local.h +@@ -0,0 +1,3 @@ ++#define USESIGINT 1' ++#define SPOOLDIR "/tmp" ++#define LOCKDIR "/tmp" diff --git a/utils/hplip/Makefile b/utils/hplip/Makefile new file mode 100644 index 0000000..15e6aa7 --- /dev/null +++ b/utils/hplip/Makefile @@ -0,0 +1,73 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=hplip +PKG_VERSION:=3.9.12 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/hplip +PKG_MD5SUM:=2b0906b4a57b437988829557ca62adfd + +PKG_BUILD_DEPENDS := python +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/hplip + SECTION:=utils + CATEGORY:=Utilities + TITLE:=HP Linux Imaging and Printing + URL:=http://sourceforge.net/projects/hplip/ + DEPENDS+=+libjpeg +sane-libs +cups +libusb +endef + +define Package/hplip/description + HPLIP is an HP developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux. +endef + +CONFIGURE_ARGS += \ + --disable-gui-build \ + --disable-network-build \ + --disable-fax-build \ + --disable-pp-build \ + --disable-doc-build \ + --disable-foomatic-xml-install \ + --disable-dbus-build + +define Build/Configure + $(call Build/Configure/Default,\ + $(CONFIGURE_ARGS),\ + ac_cv_lib_cups_cupsDoFileRequest=yes \ + LIBS="-lz -ljpeg -lusb -lcups -lpng -ltiff" \ + ) +endef + +define Package/hplip/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/.libs/libhpip.so* $(1)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/.libs/libhpmud.so* $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/lib/cups/backend + $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/hp $(1)/usr/lib/cups/backend + + $(INSTALL_DIR) $(1)/usr/lib/sane + $(CP) $(PKG_BUILD_DIR)/.libs/libsane-hpaio.so* $(1)/usr/lib/sane + + $(INSTALL_DIR) $(1)/etc/hp + $(CP) $(PKG_BUILD_DIR)/hplip.conf $(1)/etc/hp/hplip.conf + + $(INSTALL_DIR) $(1)/usr/share/hplip/data/models/ + $(CP) $(PKG_BUILD_DIR)/data/models/models.dat $(1)/usr/share/hplip/data/models/ + + $(INSTALL_DIR) $(1)/etc/hotplug.d/usb/ + $(INSTALL_BIN) ./files/20-hplip $(1)/etc/hotplug.d/usb/ +endef + +$(eval $(call BuildPackage,hplip)) diff --git a/utils/hplip/files/20-hplip b/utils/hplip/files/20-hplip new file mode 100644 index 0000000..6066cc5 --- /dev/null +++ b/utils/hplip/files/20-hplip @@ -0,0 +1,20 @@ +#!/bin/sh + +# Copyright (C) 2009 OpenWrt.org + + +case "$ACTION" in + add) + # You have to figure out your PRODUCT id. Uncomment the line below, + # attach and detach your HP USB printer to find your id in /tmp/hplip.test. + # It will look like "Found 3f0/1717/100 on /proc/bus/usb/002/009" + # Replace 3f0/1717/100 below with your id. + # + # echo "Found $PRODUCT on $DEVICE" > /tmp/hplip.test + + [ "$PRODUCT" = "3f0/1717/100" ] && chown nobody $DEVICE && chmod 666 $DEVICE + ;; + remove) + # device is gone + ;; +esac diff --git a/utils/huaweiaktbbo/Makefile b/utils/huaweiaktbbo/Makefile new file mode 100644 index 0000000..bb9b3c3 --- /dev/null +++ b/utils/huaweiaktbbo/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2008-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=huaweiaktbbo +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/huaweiaktbbo + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libusb + TITLE:=Huawei E156/E169/E220 activation tool +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR) +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \ + -lusb \ + -o $(PKG_BUILD_DIR)/huaweiAktBbo \ + $(PKG_BUILD_DIR)/huaweiAktBbo.c +endef + +define Package/huaweiaktbbo/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/huaweiAktBbo $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,huaweiaktbbo)) diff --git a/utils/huaweiaktbbo/src/huaweiAktBbo.c b/utils/huaweiaktbbo/src/huaweiAktBbo.c new file mode 100644 index 0000000..09c9050 --- /dev/null +++ b/utils/huaweiaktbbo/src/huaweiAktBbo.c @@ -0,0 +1,95 @@ +/* HUAWEI 3G modems activator + Copyright (C) 2006 bobovsky bobovsky@kanoistika.sk GPL + Copyright (C) 2009 Nuno Goncalves nunojpg@gmail.com GPL + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License2. +*/ + +#include +#include +#include +#include +#include +#include +#include + +struct usb_dev_handle *devh; + +void release_usb_device(int dummy) { + int ret; + ret = usb_release_interface(devh, 0); + + if (!ret) + printf("failed to release interface: %d\n", ret); + + usb_close(devh); + + if (!ret) + printf("failed to close interface: %d\n", ret); + + exit(1); +} + +void list_devices() { + struct usb_bus *bus; + for (bus = usb_get_busses(); bus; bus = bus->next) { + struct usb_device *dev; + + for (dev = bus->devices; dev; dev = dev->next) + printf("0x%04x 0x%04x\n", dev->descriptor.idVendor, dev->descriptor.idProduct); + } +} + +struct usb_device *find_device() { + struct usb_bus *bus; + + for (bus = usb_get_busses(); bus; bus = bus->next) { + struct usb_device *dev; + + for (dev = bus->devices; dev; dev = dev->next) { + if (dev->descriptor.idVendor == 0x12d1 && dev->descriptor.idProduct == 0x1001 || //Huawei E169, Huawei E169G + dev->descriptor.idVendor == 0x12d1 && dev->descriptor.idProduct == 0x1003) //Huawei E220, Huawei E156G + return dev; + } + } + return NULL; +} + +int main(int argc, char **argv) { + int ret, vendor, product; + struct usb_device *dev; + char buf[65535], *endptr; + + usb_init(); + usb_find_busses(); + usb_find_devices(); + + printf("Searching modem..."); + dev = find_device(); + + if(dev == NULL){ + printf("No supported modem found\n"); + return 1; + } + + printf("found supported modem!\n"); + + assert(dev); + devh = usb_open(dev); + assert(devh); + + signal(SIGTERM, release_usb_device); + + ret = usb_get_descriptor(devh, 0x0000001, 0x0000000, buf, 0x0000012); + usleep(1*1000); + ret = usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000009); + usleep(1*1000); + ret = usb_get_descriptor(devh, 0x0000002, 0x0000000, buf, 0x0000020); + usleep(1*1000); + ret = usb_control_msg(devh, USB_TYPE_STANDARD + USB_RECIP_DEVICE, USB_REQ_SET_FEATURE, 00000001, 0, buf, 0, 1000); + + ret = usb_close(devh); + assert(ret == 0); + + printf("Modem poked!\n"); + return 0; +} diff --git a/utils/i2c-tools/Makefile b/utils/i2c-tools/Makefile new file mode 100644 index 0000000..d2119a5 --- /dev/null +++ b/utils/i2c-tools/Makefile @@ -0,0 +1,90 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=i2c-tools +PKG_VERSION:=3.0.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://dl.lm-sensors.org/i2c-tools/releases +PKG_MD5SUM:=511376eed04455cdb277ef19c5f73bb4 + +PKG_BUILD_DEPENDS:=PACKAGE_python-smbus:python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/i2c-tools + SECTION:=utils + CATEGORY:=Utilities + TITLE:=I2C tools for Linux + DEPENDS:=@!LINUX_2_4 + URL:=http://www.lm-sensors.org/wiki/I2CTools +endef + +define Package/python-smbus + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE:=Python bindings for the SMBUS + URL:=http://www.lm-sensors.org/wiki/I2CTools + DEPENDS:= +PACKAGE_python-smbus:python-mini +i2c-tools +endef + +define Package/i2c-tools/description + This package contains an heterogeneous set of I2C tools for Linux. These tools + were originally part of the lm-sensors package. + Includes: + - i2cdetect + - i2cdump + - i2cget + - i2cset +endef + +define Package/python-smbus/description + This package contains an heterogeneous set of I2C tools for Linux. + + This package contain the python bindings for Linux SMBus access through i2c-dev. +endef + +TARGET_CPPFLAGS += -I$(LINUX_DIR)/include + +ifdef CONFIG_PACKAGE_python-smbus + define Build/Compile/python-smbus + $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) + $(call Build/Compile/PyMod,./py-smbus/, \ + install --prefix="$(PKG_INSTALL_DIR)/usr", \ + ) + endef +endif + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + LINUX="$(LINUX_DIR)" \ + CC="$(TARGET_CC)" \ + STAGING_DIR="$(STAGING_DIR)" + $(Build/Compile/python-smbus) +endef + +define Package/i2c-tools/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cdetect $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cdump $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cset $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cget $(1)/usr/sbin/ +endef + +define PyPackage/python-smbus/filespec ++|$(PYTHON_PKG_DIR)/smbus.so +endef + +$(eval $(call BuildPackage,i2c-tools)) +$(eval $(call PyPackage,python-smbus)) +$(eval $(call BuildPackage,python-smbus)) diff --git a/utils/i2c-tools/patches/100-linux_include.patch b/utils/i2c-tools/patches/100-linux_include.patch new file mode 100644 index 0000000..addfc5b --- /dev/null +++ b/utils/i2c-tools/patches/100-linux_include.patch @@ -0,0 +1,10 @@ +--- a/py-smbus/smbusmodule.c ++++ b/py-smbus/smbusmodule.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + + /* diff --git a/utils/ink/Makefile b/utils/ink/Makefile new file mode 100644 index 0000000..cc617b7 --- /dev/null +++ b/utils/ink/Makefile @@ -0,0 +1,33 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ink +PKG_VERSION:=0.5.1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/ink +PKG_MD5SUM:=df09c4a1a404dd37ffff80ce2491ab6d + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ink + SECTION:=utils + CATEGORY:=Utilities + TITLE:=A utility for reading ink levels + URL:=http://ink.sourceforge.net/ + DEPENDS:=+libinklevel +endef + +define Package/ink/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ink $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,ink)) diff --git a/utils/input-utils/Makefile b/utils/input-utils/Makefile new file mode 100644 index 0000000..dca3330 --- /dev/null +++ b/utils/input-utils/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2007,2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=input-utils +PKG_VERSION:=20081014-101501 +PKG_RELEASE:=2 + +PKG_BUILD_DIR:=$(BUILD_DIR)/input/ +PKG_SOURCE:=input-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://dl.bytesex.org/cvs-snapshots/ +PKG_MD5SUM:=a6854dc5218301b67324b483d26f1bee + +include $(INCLUDE_DIR)/package.mk + +define Package/input-utils + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Utilities for the input layer of the Linux kernel +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C "$(PKG_BUILD_DIR)" \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + STRIP="true" \ + build +endef + +define Package/input-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/input-events $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/input-kbd $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lsinput $(1)/usr/bin/ + +endef + +$(eval $(call BuildPackage,input-utils)) diff --git a/utils/input-utils/patches/001-EVIOCGKEYCODE2.patch b/utils/input-utils/patches/001-EVIOCGKEYCODE2.patch new file mode 100644 index 0000000..d282f6b --- /dev/null +++ b/utils/input-utils/patches/001-EVIOCGKEYCODE2.patch @@ -0,0 +1,220 @@ +From 52f533a6c32f8e1e376c5a335cc067da16d59b61 Mon Sep 17 00:00:00 2001 +From: Dmitry Torokhov +Date: Wed, 26 Jan 2011 15:49:39 +0100 +Subject: [PATCH] input-kbd - switch to using EVIOCGKEYCODE2 when available + +[mchehab@redhat.com: Ported it to the -git version] + +Signed-off-by: Dmitry Torokhov +Signed-off-by: Mauro Carvalho Chehab +--- + input-kbd.c | 110 +++++++++++++++++++++++++++++++++++++++-------------------- + input.c | 4 +- + 2 files changed, 75 insertions(+), 39 deletions(-) + +diff --git a/input-kbd.c b/input-kbd.c +index c432d0d..aaf23b9 100644 +--- a/input-kbd.c ++++ b/input-kbd.c +@@ -9,9 +9,22 @@ + + #include "input.h" + ++struct input_keymap_entry_v2 { ++#define KEYMAP_BY_INDEX (1 << 0) ++ uint8_t flags; ++ uint8_t len; ++ uint16_t index; ++ uint32_t keycode; ++ uint8_t scancode[32]; ++}; ++ ++#ifndef EVIOCGKEYCODE_V2 ++#define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry_v2) ++#endif ++ + struct kbd_entry { +- int scancode; +- int keycode; ++ unsigned int scancode; ++ unsigned int keycode; + }; + + struct kbd_map { +@@ -23,7 +36,7 @@ struct kbd_map { + + /* ------------------------------------------------------------------ */ + +-static struct kbd_map* kbd_map_read(int fd) ++static struct kbd_map* kbd_map_read(int fd, unsigned int version) + { + struct kbd_entry entry; + struct kbd_map *map; +@@ -32,17 +45,35 @@ static struct kbd_map* kbd_map_read(int fd) + map = malloc(sizeof(*map)); + memset(map,0,sizeof(*map)); + for (map->size = 0; map->size < 65536; map->size++) { +- entry.scancode = map->size; +- entry.keycode = KEY_RESERVED; +- rc = ioctl(fd, EVIOCGKEYCODE, &entry); +- if (rc < 0) { +- map->size--; +- break; ++ if (version < 0x10001) { ++ entry.scancode = map->size; ++ entry.keycode = KEY_RESERVED; ++ rc = ioctl(fd, EVIOCGKEYCODE, &entry); ++ if (rc < 0) { ++ map->size--; ++ break; ++ } ++ } else { ++ struct input_keymap_entry_v2 ke = { ++ .index = map->size, ++ .flags = KEYMAP_BY_INDEX, ++ .len = sizeof(uint32_t), ++ .keycode = KEY_RESERVED, ++ }; ++ ++ rc = ioctl(fd, EVIOCGKEYCODE_V2, &ke); ++ if (rc < 0) ++ break; ++ memcpy(&entry.scancode, ke.scancode, ++ sizeof(entry.scancode)); ++ entry.keycode = ke.keycode; + } ++ + if (map->size >= map->alloc) { + map->alloc += 64; + map->map = realloc(map->map, map->alloc * sizeof(entry)); + } ++ + map->map[map->size] = entry; + + if (KEY_RESERVED != entry.keycode) +@@ -156,37 +187,25 @@ static void kbd_print_bits(int fd) + } + } + +-static void show_kbd(int nr) ++static void show_kbd(int fd, unsigned int protocol_version) + { + struct kbd_map *map; +- int fd; + +- fd = device_open(nr,1); +- if (-1 == fd) +- return; + device_info(fd); + +- map = kbd_map_read(fd); +- if (NULL != map) { +- kbd_map_print(stdout,map,0); +- } else { ++ map = kbd_map_read(fd, protocol_version); ++ if (map) ++ kbd_map_print(stdout, map, 0); ++ else + kbd_print_bits(fd); +- } +- +- close(fd); + } + +-static int set_kbd(int nr, char *mapfile) ++static int set_kbd(int fd, unsigned int protocol_version, char *mapfile) + { + struct kbd_map *map; + FILE *fp; +- int fd; + +- fd = device_open(nr,1); +- if (-1 == fd) +- return -1; +- +- map = kbd_map_read(fd); ++ map = kbd_map_read(fd, protocol_version); + if (NULL == map) { + fprintf(stderr,"device has no map\n"); + close(fd); +@@ -203,14 +222,12 @@ static int set_kbd(int nr, char *mapfile) + return -1; + } + } +- ++ + if (0 != kbd_map_parse(fp,map) || + 0 != kbd_map_write(fd,map)) { +- close(fd); + return -1; + } + +- close(fd); + return 0; + } + +@@ -224,8 +241,10 @@ static int usage(char *prog, int error) + + int main(int argc, char *argv[]) + { +- int c,devnr; ++ int c, devnr, fd; + char *mapfile = NULL; ++ unsigned int protocol_version; ++ int rc = EXIT_FAILURE; + + for (;;) { + if (-1 == (c = getopt(argc, argv, "hf:"))) +@@ -245,12 +264,29 @@ int main(int argc, char *argv[]) + usage(argv[0],1); + + devnr = atoi(argv[optind]); +- if (mapfile) { +- set_kbd(devnr,mapfile); +- } else { +- show_kbd(devnr); ++ ++ fd = device_open(devnr, 1); ++ if (fd < 0) ++ goto out; ++ ++ if (ioctl(fd, EVIOCGVERSION, &protocol_version) < 0) { ++ fprintf(stderr, ++ "Unable to query evdev protocol version: %s\n", ++ strerror(errno)); ++ goto out_close; + } +- return 0; ++ ++ if (mapfile) ++ set_kbd(fd, protocol_version, mapfile); ++ else ++ show_kbd(fd, protocol_version); ++ ++ rc = EXIT_SUCCESS; ++ ++out_close: ++ close(fd); ++out: ++ return rc; + } + + /* --------------------------------------------------------------------- +diff --git a/input.c b/input.c +index d57a31e..a9bd5e8 100644 +--- a/input.c ++++ b/input.c +@@ -101,8 +101,8 @@ int device_open(int nr, int verbose) + close(fd); + return -1; + } +- if (EV_VERSION != version) { +- fprintf(stderr, "protocol version mismatch (expected %d, got %d)\n", ++ if (EV_VERSION > version) { ++ fprintf(stderr, "protocol version mismatch (expected >= %d, got %d)\n", + EV_VERSION, version); + close(fd); + return -1; +-- +1.7.2.3 + diff --git a/utils/input-utils/patches/002-version-check.patch b/utils/input-utils/patches/002-version-check.patch new file mode 100644 index 0000000..03358eb --- /dev/null +++ b/utils/input-utils/patches/002-version-check.patch @@ -0,0 +1,34 @@ +From d99f056745e53cd2518ca169af474f8c45c1436d Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann +Date: Wed, 26 Jan 2011 21:01:05 +0100 +Subject: [PATCH] remove version check + +--- + input.c | 11 ----------- + 1 files changed, 0 insertions(+), 11 deletions(-) + +diff --git a/input.c b/input.c +index a9bd5e8..9a6a810 100644 +--- a/input.c ++++ b/input.c +@@ -96,17 +96,6 @@ int device_open(int nr, int verbose) + if (verbose) + fprintf(stderr,"%s\n",filename); + +- if (-1 == ioctl(fd,EVIOCGVERSION,&version)) { +- perror("ioctl EVIOCGVERSION"); +- close(fd); +- return -1; +- } +- if (EV_VERSION > version) { +- fprintf(stderr, "protocol version mismatch (expected >= %d, got %d)\n", +- EV_VERSION, version); +- close(fd); +- return -1; +- } + return fd; + } + +-- +1.7.2.3 + diff --git a/utils/io/Makefile b/utils/io/Makefile new file mode 100644 index 0000000..ddf9440 --- /dev/null +++ b/utils/io/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=io +PKG_RELEASE:=1 + +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/io + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Raw memory i/o utility + URL:=http://www.sleepie.demon.co.uk/linuxvme/io.c +endef + +define Package/io/description + This tool can be used to access physical memory addresses from userspace. + It can be useful to access hardware for which no device driver exists! +endef + +define Build/Prepare + $(INSTALL_DIR) $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -Os $(PKG_BUILD_DIR)/io.c -o $(PKG_BUILD_DIR)/$(PKG_NAME) +endef + +define Package/io/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/io $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,io)) diff --git a/utils/io/src/io.c b/utils/io/src/io.c new file mode 100644 index 0000000..caa23e0 --- /dev/null +++ b/utils/io/src/io.c @@ -0,0 +1,425 @@ +/* + * Simple app. to do memory accesses via /dev/mem. + * + * + * Copyright (c) Richard Hirst + * Copyright (c) Thomas Langer + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define MEM_READ 0 +#define MEM_WRITE 1 +#define MEM_AND 2 +#define MEM_OR 3 + +static void +usage (char *argv0) +{ + fprintf(stderr, +"Raw memory i/o utility - $Revision: 2.0 $\n\n" +"%s -v -1|2|4 -r|w|a|o [-l ] [-f ] []\n\n" +" -v Verbose, asks for confirmation\n" +" -1|2|4 Sets memory access size in bytes (default byte)\n" +" -l Length in bytes of area to access (defaults to\n" +" one access, or whole file length)\n" +" -r|w|a|o Read from or Write to memory (default read)\n" +" optional write with modify (and/or)\n" +" -f File to write on memory read, or\n" +" to read on memory write\n" +" The memory address to access\n" +" The value to write (implies -w)\n\n" +"Examples:\n" +" %s 0x1000 Reads one byte from 0x1000\n" +" %s 0x1000 0x12 Writes 0x12 to location 0x1000\n" +" %s -2 -l 8 0x1000 Reads 8 words from 0x1000\n" +" %s -r -f dmp -l 100 200 Reads 100 bytes from addr 200 to file\n" +" %s -w -f img 0x10000 Writes the whole of file to memory\n" +"\n" +"Note access size (-1|2|4) does not apply to file based accesses.\n\n", + argv0, argv0, argv0, argv0, argv0, argv0); + exit(1); +} + + +static void +memread_memory(unsigned long phys_addr, void *addr, int len, int iosize) +{ + int i; + + while (len) { + printf("%08lx: ", phys_addr); + i = 0; + while (i < 16 && len) { + switch(iosize) { + case 1: + printf(" %02x", *(unsigned char *)addr); + break; + case 2: + printf(" %04x", *(unsigned short *)addr); + break; + case 4: + printf(" %08lx", *(unsigned long *)addr); + break; + } + i += iosize; + addr += iosize; + len -= iosize; + } + phys_addr += 16; + printf("\n"); + } +} + + +static void +write_memory(unsigned long phys_addr, void *addr, int len, int iosize, unsigned long value) +{ + switch(iosize) { + case 1: + while (len) { + *(unsigned char *)addr = value; + len -= iosize; + addr += iosize; + } + break; + case 2: + while (len) { + *(unsigned short *)addr = value; + len -= iosize; + addr += iosize; + } + break; + case 4: + while (len) { + *(unsigned long *)addr = value; + len -= iosize; + addr += iosize; + } + break; + } +} + + +static void +and_write_memory(unsigned long phys_addr, void *addr, int len, int iosize, unsigned long value) +{ + switch(iosize) { + case 1: + while (len) { + *(unsigned char *)addr &= value; + len -= iosize; + addr += iosize; + } + break; + case 2: + while (len) { + *(unsigned short *)addr &= value; + len -= iosize; + addr += iosize; + } + break; + case 4: + while (len) { + *(unsigned long *)addr &= value; + len -= iosize; + addr += iosize; + } + break; + } +} + + +static void +or_write_memory(unsigned long phys_addr, void *addr, int len, int iosize, unsigned long value) +{ + switch(iosize) { + case 1: + while (len) { + *(unsigned char *)addr |= value; + len -= iosize; + addr += iosize; + } + break; + case 2: + while (len) { + *(unsigned short *)addr |= value; + len -= iosize; + addr += iosize; + } + break; + case 4: + while (len) { + *(unsigned long *)addr |= value; + len -= iosize; + addr += iosize; + } + break; + } +} + + +int +main (int argc, char **argv) +{ + int mfd, ffd = 0, req_len = 0, opt; + void *real_io; + unsigned long real_len, real_addr, req_addr, req_value = 0, offset; + char *endptr; + int memfunc = MEM_READ; + int iosize = 1; + char *filename = NULL; + int verbose = 0; + + opterr = 0; + if (argc == 1) + usage(argv[0]); + + while ((opt = getopt(argc, argv, "hv124rwaol:f:")) > 0) { + switch (opt) { + case 'h': + usage(argv[0]); + case 'v': + verbose = 1; + break; + case '1': + case '2': + case '4': + iosize = opt - '0'; + break; + case 'r': + memfunc = MEM_READ; + break; + case 'a': + memfunc = MEM_AND; + break; + case 'o': + memfunc = MEM_OR; + break; + case 'w': + memfunc = MEM_WRITE; + break; + case 'l': + req_len = strtoul(optarg, &endptr, 0); + if (*endptr) { + fprintf(stderr, "Bad value '%s'\n", optarg); + exit(1); + } + break; + case 'f': + filename = strdup(optarg); + break; + default: + fprintf(stderr, "Unknown option: %c\n", opt); + usage(argv[0]); + } + } + + if (optind == argc) { + fprintf(stderr, "No address given\n"); + exit(1); + } + req_addr = strtoul(argv[optind], &endptr, 0); + if (*endptr) { + fprintf(stderr, "Bad value '%s'\n", argv[optind]); + exit(1); + } + optind++; + if (!filename && (memfunc == MEM_READ) && optind < argc) { + memfunc = MEM_WRITE; + } + if (filename && optind > argc) { + fprintf(stderr, "Filename AND value given\n"); + exit(1); + } + if (!filename && (memfunc != MEM_READ) && optind == argc) { + fprintf(stderr, "No value given for WRITE\n"); + exit(1); + } + if (!filename && (memfunc != MEM_READ)) { + req_value = strtoul(argv[optind], &endptr, 0); + if (*endptr) { + fprintf(stderr, "Bad value '%s'\n", argv[optind]); + exit(1); + } + if ((iosize == 1 && (req_value & 0xffffff00)) || + (iosize == 2 && (req_value & 0xffff0000))) { + fprintf(stderr, " too large\n"); + exit(1); + } + optind++; + } + if (filename && (memfunc == MEM_READ) && !req_len) { + fprintf(stderr, "No size given for file memread\n"); + exit(1); + } + if (optind < argc) { + fprintf(stderr, "Too many arguments '%s'...\n", argv[optind]); + exit(1); + } + if (filename && (memfunc == MEM_READ)) { + ffd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); + if (ffd < 0) { + fprintf(stderr, "Failed to open destination file '%s': %s\n", filename, strerror(errno)); + exit(1); + } + } + if (filename && (memfunc != MEM_READ)) { + ffd = open(filename, O_RDONLY); + if (ffd < 0) { + fprintf(stderr, "Failed to open source file '%s': %s\n", filename, strerror(errno)); + exit(1); + } + } + + if (filename && !req_len) { + req_len = lseek(ffd, 0, SEEK_END); + if (req_len < 0) { + fprintf(stderr, "Failed to seek on '%s': %s\n", + filename, strerror(errno)); + exit(1); + } + if (lseek(ffd, 0, SEEK_SET)) { + fprintf(stderr, "Failed to seek on '%s': %s\n", + filename, strerror(errno)); + exit(1); + } + } + if (!req_len) + req_len = iosize; + + if ((iosize == 2 && (req_addr & 1)) || + (iosize == 4 && (req_addr & 3))) { + fprintf(stderr, "Badly aligned for access size\n"); + exit(1); + } + if ((iosize == 2 && (req_len & 1)) || + (iosize == 4 && (req_len & 3))) { + fprintf(stderr, "Badly aligned for access size\n"); + exit(1); + } + + if (!verbose) + /* Nothing */; + else if (filename && (memfunc == MEM_READ)) + printf("Request to read 0x%x bytes from address 0x%08lx\n" + "\tto file %s, using %d byte accesses\n", + req_len, req_addr, filename, iosize); + else if (filename) + printf("Request to write 0x%x bytes to address 0x%08lx\n" + "\tfrom file %s, using %d byte accesses\n", + req_len, req_addr, filename, iosize); + else if (memfunc == MEM_READ) + printf("Request to read 0x%x bytes from address 0x%08lx\n" + "\tusing %d byte accesses\n", + req_len, req_addr, iosize); + else + printf("Request to write 0x%x bytes to address 0x%08lx\n" + "\tusing %d byte accesses of value 0x%0*lx\n", + req_len, req_addr, iosize, iosize*2, req_value); + + real_addr = req_addr & ~4095; + if (real_addr == 0xfffff000) { + fprintf(stderr, "Sorry, cannot map the top 4K page\n"); + exit(1); + } + offset = req_addr - real_addr; + real_len = req_len + offset; + real_len = (real_len + 4095) & ~ 4095; + if (real_addr + real_len < real_addr) { + fprintf(stderr, "Aligned addr+len exceeds top of address space\n"); + exit(1); + } + if (verbose) + printf("Attempting to map 0x%lx bytes at address 0x%08lx\n", + real_len, real_addr); + + mfd = open("/dev/mem", (memfunc == MEM_READ) ? O_RDONLY : O_RDWR); + if (mfd == -1) { + perror("open /dev/mem"); + exit(1); + } + if (verbose) + printf("open(/dev/mem) ok\n"); + real_io = mmap(NULL, real_len, + (memfunc == MEM_READ) ? PROT_READ:PROT_READ|PROT_WRITE, + MAP_SHARED, mfd, real_addr); + if (real_io == (void *)(-1)) { + fprintf(stderr, "mmap() failed: %s\n", strerror(errno)); + exit(1); + } + if (verbose) + printf("mmap() ok\n"); + + if (verbose) { + int c; + + printf("OK? "); + fflush(stdout); + c = getchar(); + if (c != 'y' && c != 'Y') { + printf("Aborted\n"); + exit(1); + } + } + + if (filename && (memfunc == MEM_READ)) { + int n = write(ffd, real_io + offset, req_len); + + if (n < 0) { + fprintf(stderr, "File write failed: %s\n", strerror(errno)); + exit(1); + } + else if (n != req_len) { + fprintf(stderr, "Only wrote %d of %d bytes to file\n", + n, req_len); + exit(1); + } + } + else if (filename) { + int n = read(ffd, real_io + offset, req_len); + + if (n < 0) { + fprintf(stderr, "File read failed: %s\n", strerror(errno)); + exit(1); + } + else if (n != req_len) { + fprintf(stderr, "Only read %d of %d bytes from file\n", + n, req_len); + exit(1); + } + } + else { + switch (memfunc) + { + case MEM_READ: + memread_memory(req_addr, real_io + offset, req_len, iosize); + break; + case MEM_WRITE: + write_memory(req_addr, real_io + offset, req_len, iosize, req_value); + break; + case MEM_AND: + and_write_memory(req_addr, real_io + offset, req_len, iosize, req_value); + break; + case MEM_OR: + or_write_memory(req_addr, real_io + offset, req_len, iosize, req_value); + break; + } + } + + if (filename) + close(ffd); + close (mfd); + + return 0; +} + diff --git a/utils/ipmitool/Makefile b/utils/ipmitool/Makefile new file mode 100644 index 0000000..e701f79 --- /dev/null +++ b/utils/ipmitool/Makefile @@ -0,0 +1,49 @@ +# Copyright (C) 2008-2010, OpenWrt.org +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ipmitool +PKG_VERSION:=1.8.11 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/ipmitool +PKG_MD5SUM:=1d0da20add7388d64c549f95538b6858 + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/ipmitool + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libopenssl + TITLE:=IPMI remote computer management utility + URL:=http://ipmitool.sourceforge.net/ +endef + +define Package/ipmitool/description + IPMItool is a utility for managing and configuring devices + that support the Intelligent Platform Management Interface + (IPMI) version 1.5 and version 2.0 specifications. +endef + +CONFIGURE_ARGS += \ + --enable-static=no \ + --enable-internal-md5 \ + --enable-intf-lan=yes \ + --enable-intf-lanplus=no \ + --enable-intf-free=no \ + --enable-intf-open=no \ + --enable-intf-imb=no \ + --enable-intf-lipmi=no \ + --enable-intf-bmc=no + +define Package/ipmitool/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ipmitool $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,ipmitool)) + diff --git a/utils/ipmitool/patches/100-cubic_root.patch b/utils/ipmitool/patches/100-cubic_root.patch new file mode 100644 index 0000000..11ebffa --- /dev/null +++ b/utils/ipmitool/patches/100-cubic_root.patch @@ -0,0 +1,149 @@ +--- a/lib/ipmi_sdr.c ++++ b/lib/ipmi_sdr.c +@@ -4399,3 +4399,146 @@ ipmi_sdr_main(struct ipmi_intf *intf, in + + return rc; + } ++ ++/* cbrt.c ++ * ++ * Cube root ++ * ++ * ++ * ++ * SYNOPSIS: ++ * ++ * double x, y, cbrt(); ++ * ++ * y = cbrt( x ); ++ * ++ * ++ * ++ * DESCRIPTION: ++ * ++ * Returns the cube root of the argument, which may be negative. ++ * ++ * Range reduction involves determining the power of 2 of ++ * the argument. A polynomial of degree 2 applied to the ++ * mantissa, and multiplication by the cube root of 1, 2, or 4 ++ * approximates the root to within about 0.1%. Then Newton's ++ * iteration is used three times to converge to an accurate ++ * result. ++ * ++ * ++ * ++ * ACCURACY: ++ * ++ * Relative error: ++ * arithmetic domain # trials peak rms ++ * DEC -10,10 200000 1.8e-17 6.2e-18 ++ * IEEE 0,1e308 30000 1.5e-16 5.0e-17 ++ * ++ */ ++/* cbrt.c */ ++ ++/* ++Cephes Math Library Release 2.8: June, 2000 ++Copyright 1984, 1991, 2000 by Stephen L. Moshier ++*/ ++ ++ ++static double CBRT2 = 1.2599210498948731647672; ++static double CBRT4 = 1.5874010519681994747517; ++static double CBRT2I = 0.79370052598409973737585; ++static double CBRT4I = 0.62996052494743658238361; ++ ++#ifdef ANSIPROT ++extern double frexp ( double, int * ); ++extern double ldexp ( double, int ); ++extern int isnan ( double ); ++extern int isfinite ( double ); ++#else ++/* ++double frexp(), ldexp(); ++int isnan(double), isfinite(double); ++*/ ++#endif ++ ++double cbrt(double x) ++{ ++/* double x; */ ++int e, rem, sign; ++double z; ++ ++#ifdef NANS ++if( isnan(x) ) ++ return x; ++#endif ++#ifdef INFINITIES ++if( !isfinite(x) ) ++ return x; ++#endif ++if( x == 0 ) ++ return( x ); ++if( x > 0 ) ++ sign = 1; ++else ++ { ++ sign = -1; ++ x = -x; ++ } ++ ++z = x; ++/* extract power of 2, leaving ++ * mantissa between 0.5 and 1 ++ */ ++x = frexp( x, &e ); ++ ++/* Approximate cube root of number between .5 and 1, ++ * peak relative error = 9.2e-6 ++ */ ++x = (((-1.3466110473359520655053e-1 * x ++ + 5.4664601366395524503440e-1) * x ++ - 9.5438224771509446525043e-1) * x ++ + 1.1399983354717293273738e0 ) * x ++ + 4.0238979564544752126924e-1; ++ ++/* exponent divided by 3 */ ++if( e >= 0 ) ++ { ++ rem = e; ++ e /= 3; ++ rem -= 3*e; ++ if( rem == 1 ) ++ x *= CBRT2; ++ else if( rem == 2 ) ++ x *= CBRT4; ++ } ++ ++ ++/* argument less than 1 */ ++ ++else ++ { ++ e = -e; ++ rem = e; ++ e /= 3; ++ rem -= 3*e; ++ if( rem == 1 ) ++ x *= CBRT2I; ++ else if( rem == 2 ) ++ x *= CBRT4I; ++ e = -e; ++ } ++ ++/* multiply by power of 2 */ ++x = ldexp( x, e ); ++ ++/* Newton iteration */ ++x -= ( x - (z/(x*x)) )*0.33333333333333333333; ++#ifdef DEC ++x -= ( x - (z/(x*x)) )/3.0; ++#else ++x -= ( x - (z/(x*x)) )*0.33333333333333333333; ++#endif ++ ++if( sign < 0 ) ++ x = -x; ++return(x); ++} diff --git a/utils/ipmitool/patches/101-cross_compile.patch b/utils/ipmitool/patches/101-cross_compile.patch new file mode 100644 index 0000000..319fe63 --- /dev/null +++ b/utils/ipmitool/patches/101-cross_compile.patch @@ -0,0 +1,44 @@ +--- a/configure ++++ b/configure +@@ -24315,8 +24315,7 @@ 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; }; } ++See \`config.log' for more details." >&2;} } + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +--- a/configure.in ++++ b/configure.in +@@ -489,29 +489,6 @@ AC_ARG_ENABLE([file-security], + fi], []) + + +-AC_TRY_RUN([ +- #include +- +- struct packstruct { +- unsigned char t0 :5; +- unsigned char t1 :5; +- unsigned char t2 :5; +- unsigned char t3 :5; +- unsigned char t4 :4; +- } __attribute__ ((packed)); +- +- int +- main(int argc, char ** argv) +- { +- if(sizeof(struct packstruct) != 3) +- return(1); +- else +- return(0); +- } +- ],[],[AC_DEFINE(HAVE_PRAGMA_PACK,[1],[Define to 1 if you need to use #pragma pack instead of __attribute__ ((packed))])] +-) +- +- + dnl Generate files for build + AC_CONFIG_FILES([Makefile + doc/Makefile diff --git a/utils/joe/Makefile b/utils/joe/Makefile new file mode 100644 index 0000000..875a7fd --- /dev/null +++ b/utils/joe/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +# changes by David Kuehling : +# +# - include support for all emulation modes jmacs jpico etc. +# - see patches/002-builtinrc.patch + +include $(TOPDIR)/rules.mk + +PKG_NAME:=joe +PKG_VERSION:=3.7 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/joe-editor +PKG_MD5SUM:=66de1b073e869ba12abbfcde3885c577 + +PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/joe + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libncurses + TITLE:=JOE - Joes own editor + URL:=http://sourceforge.net/projects/joe-editor/ + SUBMENU:=Editors +endef + +define Package/joe/description +Joe is world-famous Wordstar like text editor, that also features +Emacs and Pico emulation +endef + +define Package/joe/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/joe $(1)/usr/bin/ + for i in jmacs jstar rjoe jpico; do \ + ln -sf joe $(1)/usr/bin/$$$$i; \ + done +endef + +$(eval $(call BuildPackage,joe)) diff --git a/utils/joe/patches/001-mathaway.patch b/utils/joe/patches/001-mathaway.patch new file mode 100644 index 0000000..99fc930 --- /dev/null +++ b/utils/joe/patches/001-mathaway.patch @@ -0,0 +1,58 @@ +--- a/umath.c ++++ b/umath.c +@@ -378,7 +378,6 @@ double m_cos(double n) { return cos(n); + double m_tan(double n) { return tan(n); } + double m_exp(double n) { return exp(n); } + double m_sqrt(double n) { return sqrt(n); } +-double m_cbrt(double n) { return cbrt(n); } + double m_log(double n) { return log(n); } + double m_log10(double n) { return log10(n); } + double m_asin(double n) { return asin(n); } +@@ -387,19 +386,10 @@ double m_atan(double n) { return atan(n) + double m_sinh(double n) { return sinh(n); } + double m_cosh(double n) { return cosh(n); } + double m_tanh(double n) { return tanh(n); } +-double m_asinh(double n) { return asinh(n); } +-double m_acosh(double n) { return acosh(n); } +-double m_atanh(double n) { return atanh(n); } + double m_int(double n) { return (int)(n); } + double m_floor(double n) { return floor(n); } + double m_ceil(double n) { return ceil(n); } + double m_fabs(double n) { return fabs(n); } +-double m_erf(double n) { return erf(n); } +-double m_erfc(double n) { return erfc(n); } +-double m_j0(double n) { return j0(n); } +-double m_j1(double n) { return j1(n); } +-double m_y0(double n) { return y0(n); } +-double m_y1(double n) { return y1(n); } + + double calc(BW *bw, unsigned char *s) + { +@@ -414,7 +404,6 @@ double calc(BW *bw, unsigned char *s) + v = get(USTR "tan"); v->func = m_tan; + v = get(USTR "exp"); v->func = m_exp; + v = get(USTR "sqrt"); v->func = m_sqrt; +- v = get(USTR "cbrt"); v->func = m_cbrt; + v = get(USTR "ln"); v->func = m_log; + v = get(USTR "log"); v->func = m_log10; + v = get(USTR "asin"); v->func = m_asin; +@@ -425,19 +414,10 @@ double calc(BW *bw, unsigned char *s) + v = get(USTR "sinh"); v->func = m_sinh; + v = get(USTR "cosh"); v->func = m_cosh; + v = get(USTR "tanh"); v->func = m_tanh; +- v = get(USTR "asinh"); v->func = m_asinh; +- v = get(USTR "acosh"); v->func = m_acosh; +- v = get(USTR "atanh"); v->func = m_atanh; + v = get(USTR "int"); v->func = m_int; + v = get(USTR "floor"); v->func = m_floor; + v = get(USTR "ceil"); v->func = m_ceil; + v = get(USTR "abs"); v->func = m_fabs; +- v = get(USTR "erf"); v->func = m_erf; +- v = get(USTR "erfc"); v->func = m_erfc; +- v = get(USTR "j0"); v->func = m_j0; +- v = get(USTR "j1"); v->func = m_j1; +- v = get(USTR "y0"); v->func = m_y0; +- v = get(USTR "y1"); v->func = m_y1; + } + + v = get(USTR "top"); diff --git a/utils/kmemtrace-user/Makefile b/utils/kmemtrace-user/Makefile new file mode 100644 index 0000000..37e8ee4 --- /dev/null +++ b/utils/kmemtrace-user/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=kmemtrace-user +PKG_VERSION:=20100102 +PKG_RELEASE:=1 +PKG_REV:=92878e602489d6a6ffd6e50b94f425c3149c86bd + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=git://repo.or.cz/kmemtrace-user.git +PKG_SOURCE_SUBDIR:=kmemtrace-user-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_PROTO:=git + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/kmemtrace-user + SECTION:=utils + CATEGORY:=Utilities + TITLE:=trace slab allocator functions + URL:=http://repo.or.cz/w/kmemtrace-user.git + KCONFIG:= \ + CONFIG_KMEMTRACE=y +endef + +define Package/kmemtrace-user/description + kmemtrace provides tracing for slab allocator functions, such as + kmalloc, kfree, kmem_cache_alloc, kmem_cache_free etc.. Collected + data is then fed to the userspace application in order to analyse + allocation hotspots, internal fragmentation and so on, making it + possible to see how well an allocator performs, as well as debug + and profile kernel code. +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); ./autogen.sh; ./configure ); + $(call Build/Configure/Default) +endef + + +define Package/kmemtrace-user/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kmemtrace-check $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kmemtrace-report $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kmemtrace-show $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kmemtraced $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,kmemtrace-user)) diff --git a/utils/lcd4linux/Config.in b/utils/lcd4linux/Config.in new file mode 100644 index 0000000..03d1393 --- /dev/null +++ b/utils/lcd4linux/Config.in @@ -0,0 +1,548 @@ +config LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + bool + +config LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + bool + +config LCD4LINUX_NEEDS_libdbus + bool + select PACKAGE_libdbus + +#config LCD4LINUX_NEEDS_libftdi +# bool +# select PACKAGE_libftdi + +config LCD4LINUX_NEEDS_libgd + bool + select PACKAGE_libgd + default y if !LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_NEEDS_libiconv + bool + select PACKAGE_libiconv + +config LCD4LINUX_NEEDS_libmysqlclient + bool + select PACKAGE_libmysqlclient + +config LCD4LINUX_NEEDS_libncurses + bool + select PACKAGE_libncurses + +config LCD4LINUX_NEEDS_libnmeap + bool + select PACKAGE_libnmeap + +config LCD4LINUX_NEEDS_libsqlite3 + bool + select PACKAGE_libsqlite3 + +config LCD4LINUX_NEEDS_libusb + bool + select PACKAGE_libusb + +config LCD4LINUX_NEEDS_libvncserver + bool + select PACKAGE_libvncserver + +#config LCD4LINUX_NEEDS_libX11 +# bool +# select PACKAGE_libX11 + +config LCD4LINUX_NEEDS_ppp + bool + select PACKAGE_ppp + +config LCD4LINUX_NEEDS_python + bool + select PACKAGE_python + +config LCD4LINUX_NEEDS_serdisplib + bool + select PACKAGE_serdisplib + +config LCD4LINUX_NEEDS_st2205tool + bool + select PACKAGE_st2205tool + + +comment "LCD4Linux Drivers ---" + +comment "WARNING: no drivers selected, the 'Sample' driver will be used !!!" + depends !LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_DRV_BeckmannEgle + bool + prompt "BeckmannEgle" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_DRV_BWCT + bool + prompt "BWCT" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libusb + +config LCD4LINUX_DRV_CrystalFontz + bool + prompt "CrystalFontz" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_DRV_Curses + bool + prompt "Curses" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libncurses + +config LCD4LINUX_DRV_Cwlinux + bool + prompt "Cwlinux" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_DRV_D4D + bool + prompt "D4D" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_DRV_EA232graphic + bool + prompt "EA232graphic" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + +config LCD4LINUX_DRV_G15 + bool + prompt "G15" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + select LCD4LINUX_NEEDS_libusb + +config LCD4LINUX_DRV_GLCD2USB + bool + prompt "GLCD2USB" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libusb + +config LCD4LINUX_DRV_HD44780 + bool + prompt "HD44780" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + depends BROKEN + +config LCD4LINUX_DRV_HD44780-I2C + bool + prompt "HD44780-I2C" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + depends BROKEN + +config LCD4LINUX_DRV_IRLCD + bool + prompt "IRLCD" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libusb + +config LCD4LINUX_DRV_LCD2USB + bool + prompt "LCD2USB" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libusb + +config LCD4LINUX_DRV_LCDLinux + bool + prompt "LCDLinux" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + depends BROKEN + +config LCD4LINUX_DRV_LCDTerm + bool + prompt "LCDTerm" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_DRV_LEDMatrix + bool + prompt "LEDMatrix" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + +config LCD4LINUX_DRV_LPH7508 + bool + prompt "LPH7508" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + +config LCD4LINUX_DRV_LUIse + bool + prompt "LUIse" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + #select LCD4LINUX_NEEDS_libluise + depends BROKEN + +config LCD4LINUX_DRV_LW_ABP + bool + prompt "LW_ABP" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_DRV_M50530 + bool + prompt "M50530" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_DRV_MatrixOrbital + bool + prompt "MatrixOrbital" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_DRV_MatrixOrbitalGX + bool + prompt "MatrixOrbitalGX" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + select LCD4LINUX_NEEDS_libusb + +config LCD4LINUX_DRV_MilfordInstruments + bool + prompt "MilfordInstruments" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_DRV_Noritake + bool + prompt "Noritake" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + +config LCD4LINUX_DRV_NULL + bool + prompt "NULL" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + default y + +config LCD4LINUX_DRV_Pertelian + bool + prompt "Pertelian" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_DRV_PHAnderson + bool + prompt "PHAnderson" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_DRV_PICGraphic + bool + prompt "PICGraphic" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + +config LCD4LINUX_DRV_picoLCD + bool + prompt "picoLCD" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libusb + +config LCD4LINUX_DRV_picoLCDGraphic + bool + prompt "picoLCDGraphic" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + select LCD4LINUX_NEEDS_libusb + +config LCD4LINUX_DRV_PNG + bool + prompt "PNG" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + +config LCD4LINUX_DRV_PPM + bool + prompt "PPM" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + +config LCD4LINUX_DRV_RouterBoard + bool + prompt "RouterBoard" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + depends on TARGET_rb532 + +config LCD4LINUX_DRV_serdisplib + bool + prompt "serdisplib" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + select LCD4LINUX_NEEDS_serdisplib + +config LCD4LINUX_DRV_ShuttleVFD + bool + prompt "ShuttleVFD" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libusb + +config LCD4LINUX_DRV_SimpleLCD + bool + prompt "SimpleLCD" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +config LCD4LINUX_DRV_st2205 + bool + prompt "st2205" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + select LCD4LINUX_NEEDS_st2205tool + +config LCD4LINUX_DRV_T6963 + bool + prompt "T6963" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libgd + +config LCD4LINUX_DRV_Trefon + bool + prompt "Trefon" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libusb + +#config LCD4LINUX_DRV_ULA200 +# bool +# prompt "ULA200" +# select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER +# select LCD4LINUX_NEEDS_libftdi +# select LCD4LINUX_NEEDS_libusb + +config LCD4LINUX_DRV_USBHUB + bool + prompt "USBHUB" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libusb + +config LCD4LINUX_DRV_USBLCD + bool + prompt "USBLCD" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libusb + +config LCD4LINUX_DRV_VNC + bool + prompt "VNC" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + select LCD4LINUX_NEEDS_libvncserver + +config LCD4LINUX_DRV_WincorNixdorf + bool + prompt "WincorNixdorf" + select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER + +#config LCD4LINUX_DRV_X11 +# bool +# prompt "X11" +# select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER +# select LCD4LINUX_NEEDS_libgd +# select LCD4LINUX_NEEDS_libX11 + + +comment "LCD4Linux Plugins ---" + +comment "WARNING: no plugins selected, the 'sample' plugin will be used !!!" + depends !LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_apm + bool + prompt "apm" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_asterisk + bool + prompt "asterisk" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_button_exec + bool + prompt "button_exec" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_cpuinfo + bool + prompt "cpuinfo" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + default y + +config LCD4LINUX_PLUGIN_dbus + bool + prompt "dbus" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + select LCD4LINUX_NEEDS_libdbus + +config LCD4LINUX_PLUGIN_diskstats + bool + prompt "diskstats" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_dvb + bool + prompt "dvb" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_event + bool + prompt "event" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_exec + bool + prompt "exec" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_fifo + bool + prompt "fifo" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_file + bool + prompt "file" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_gps + bool + prompt "gps" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + select LCD4LINUX_NEEDS_libnmeap + +config LCD4LINUX_PLUGIN_hddtemp + bool + prompt "hddtemp" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_huawei + bool + prompt "huawei" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_i2c_sensors + bool + prompt "i2c_sensors" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_iconv + bool + prompt "iconv" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + select LCD4LINUX_NEEDS_libiconv + +config LCD4LINUX_PLUGIN_imon + bool + prompt "imon" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_isdn + bool + prompt "isdn" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_kvv + bool + prompt "kvv" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_loadavg + bool + prompt "loadavg" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + default y + +config LCD4LINUX_PLUGIN_meminfo + bool + prompt "meminfo" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + default y + +config LCD4LINUX_PLUGIN_mpd + bool + prompt "mpd" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_mpris_dbus + bool + prompt "mpris_dbus" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + select LCD4LINUX_NEEDS_libdbus + +config LCD4LINUX_PLUGIN_mysql + bool + prompt "mysql" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + select LCD4LINUX_NEEDS_libmysqlclient + +config LCD4LINUX_PLUGIN_netdev + bool + prompt "netdev" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_netinfo + bool + prompt "netinfo" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_pop3 + bool + prompt "pop3" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_ppp + bool + prompt "ppp" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + select LCD4LINUX_NEEDS_ppp + +config LCD4LINUX_PLUGIN_proc_stat + bool + prompt "proc_stat" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + default y + +#config LCD4LINUX_PLUGIN_python +# bool +# prompt "python" +# select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN +# select LCD4LINUX_NEEDS_python + +config LCD4LINUX_PLUGIN_qnaplog + bool + prompt "qnaplog" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + select LCD4LINUX_NEEDS_libsqlite3 + +config LCD4LINUX_PLUGIN_seti + bool + prompt "seti" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_statfs + bool + prompt "statfs" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_uname + bool + prompt "uname" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_uptime + bool + prompt "uptime" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + default y + +config LCD4LINUX_PLUGIN_w1retap + bool + prompt "w1retap" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + +config LCD4LINUX_PLUGIN_wireless + bool + prompt "wireless" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN + depends BROKEN + +config LCD4LINUX_PLUGIN_xmms + bool + prompt "xmms" + select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN diff --git a/utils/lcd4linux/Makefile b/utils/lcd4linux/Makefile new file mode 100644 index 0000000..f330fee --- /dev/null +++ b/utils/lcd4linux/Makefile @@ -0,0 +1,231 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lcd4linux +PKG_REV:=1144 +PKG_VERSION:=r$(PKG_REV) +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://ssl.bulix.org/svn/lcd4linux/trunk/ +PKG_SOURCE_SUBDIR:=lcd4linux-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_PROTO:=svn + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +PKG_BUILD_DEPENDS:= \ + libdbus \ + libgd \ + libmysqlclient \ + libncurses \ + libnmeap \ + libsqlite3 \ + libvncserver \ + ppp \ + serdisplib \ + st2205tool \ +# libftdi \ +# libmpdclient \ +# libX11 \ +# python \ + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/lcd4linux + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:= \ + +LCD4LINUX_NEEDS_libdbus:libdbus \ + +LCD4LINUX_NEEDS_libgd:libgd \ + $(if $(ICONV_FULL),+LCD4LINUX_NEEDS_libiconv:libiconv-full) \ + +LCD4LINUX_NEEDS_libmysqlclient:libmysqlclient \ + +LCD4LINUX_NEEDS_libncurses:libncurses \ + +LCD4LINUX_NEEDS_libnmeap:libnmeap \ + +LCD4LINUX_NEEDS_libsqlite3:libsqlite3 \ + +LCD4LINUX_NEEDS_libusb:libusb \ + +LCD4LINUX_NEEDS_libvncserver:libvncserver \ + +LCD4LINUX_NEEDS_serdisplib:serdisplib \ + +LCD4LINUX_NEEDS_st2205tool:st2205tool \ +# +LCD4LINUX_NEEDS_libftdi:libftdi \ +# +LCD4LINUX_NEEDS_libmpdclient:libmpdclient \ +# +LCD4LINUX_NEEDS_libX11:libX11 \ +# +LCD4LINUX_NEEDS_python:python + TITLE:=LCD display utility + URL:=http://lcd4linux.bulix.org/ + MENU:=1 + MAINTAINER:=Jonathan McCrohan +endef + +define Package/lcd4linux/config + menu "Configuration" + depends on PACKAGE_lcd4linux + source "$(SOURCE)/Config.in" + endmenu +endef + +define Package/lcd4linux/description + LCD4Linux is a small program that grabs information from the kernel and + some subsystems and displays it on an external liquid crystal display. +endef + +define Package/lcd4linux/conffiles +/etc/lcd4linux.conf +endef + +LCD4LINUX_DRIVERS:= \ + BeckmannEgle \ + BWCT \ + CrystalFontz \ + Curses \ + Cwlinux \ + D4D \ + EA232graphic \ + G15 \ + GLCD2USB \ + IRLCD \ + HD44780 \ + HD44780-I2C \ + LCD2USB \ + LCDLinux \ + LCDTerm \ + LEDMatrix \ + LPH7508 \ + LUIse \ + LW_ABP \ + M50530 \ + MatrixOrbital \ + MatrixOrbitalGX \ + MilfordInstruments \ + Noritake \ + NULL \ + Pertelian \ + PHAnderson \ + PICGraphic \ + picoLCD \ + picoLCDGraphic \ + PNG \ + PPM \ + RouterBoard \ + serdisplib \ + ShuttleVFD \ + SimpleLCD \ + st2205 \ + T6963 \ + Trefon \ + ULA200 \ + USBHUB \ + USBLCD \ + VNC \ + WincorNixdorf \ + X11 \ + +LCD4LINUX_PLUGINS:= \ + apm \ + asterisk \ + button_exec \ + cpuinfo \ + dbus \ + diskstats \ + dvb \ + event \ + exec \ + fifo \ + file \ + gps \ + hddtemp \ + huawei \ + i2c_sensors \ + iconv \ + imon \ + isdn \ + kvv \ + loadavg \ + netdev \ + netinfo \ + meminfo \ + mpd \ + mpris_dbus \ + mysql \ + netdev \ + pop3 \ + ppp \ + proc_stat \ + python \ + qnaplog \ + seti \ + statfs \ + uname \ + uptime \ + w1retap \ + wireless \ + xmms \ + +LCD4LINUX_CONFIGURE_DRIVERS:= \ + $(foreach c, $(LCD4LINUX_DRIVERS), \ + $(if $(CONFIG_LCD4LINUX_DRV_$(c)),$(c),) \ + ) + +LCD4LINUX_CONFIGURE_PLUGINS:= \ + $(foreach c, $(LCD4LINUX_PLUGINS), \ + $(if $(CONFIG_LCD4LINUX_PLUGIN_$(c)),$(c),) \ + ) + +ifeq ($(CONFIG_LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER),) + LCD4LINUX_CONFIGURE_DRIVERS:=Sample +endif + +ifeq ($(CONFIG_LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN),) + LCD4LINUX_CONFIGURE_PLUGINS:=sample +endif + +CONFIGURE_ARGS+= \ + --disable-rpath \ + --with-drivers="$(strip $(LCD4LINUX_CONFIGURE_DRIVERS))" \ + --with-plugins="$(strip $(LCD4LINUX_CONFIGURE_PLUGINS))" \ + +EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib + +ifneq ($(CONFIG_LCD4LINUX_NEEDS_libiconv),) + CONFIGURE_ARGS+= \ + --with-libiconv-prefix="$(ICONV_PREFIX)" +else + CONFIGURE_ARGS+= \ + --without-libiconv-prefix +endif + +ifneq ($(CONFIG_LCD4LINUX_NEEDS_libmysqlclient),) + EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql +endif + +ifneq ($(CONFIG_LCD4LINUX_NEEDS_python),) + CONFIGURE_ARGS+= --with-python +else + CONFIGURE_ARGS+= --without-python +endif + +ifneq ($(CONFIG_LCD4LINUX_NEEDS_libX11),) + CONFIGURE_ARGS+= --with-x +else + CONFIGURE_ARGS+= --without-x +endif + + +define Package/lcd4linux/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/lcd4linux $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) ./files/lcd4linux.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/lcd4linux.init $(1)/etc/init.d/lcd4linux +endef + +$(eval $(call BuildPackage,lcd4linux)) diff --git a/utils/lcd4linux/files/lcd4linux.conf b/utils/lcd4linux/files/lcd4linux.conf new file mode 100644 index 0000000..a8a70f3 --- /dev/null +++ b/utils/lcd4linux/files/lcd4linux.conf @@ -0,0 +1,1224 @@ +# $Id: lcd4linux.conf.sample 759 2007-02-04 05:55:58Z michael $ +# $URL: https://ssl.bulix.org/svn/lcd4linux/trunk/lcd4linux.conf.sample $ + + +Variables { + tick 500 + tack 100 + minute 60000 +} + +Display G15 { + Driver 'G-15' + Font '6x8' + Contrast 10 + Inverted 0 + UInput '/dev/input/uinput' + SingleKeyPress 1 +} + + +Display SerDispLib { + Driver 'serdisplib' + Port 'PAR:/dev/parports/0' + #Port '/dev/tts/0' + Model 'OPTREX323' + Options '' +} + + +Display Trefon { + Driver 'TREFON' + Size '16x2' + Backlight 1 + Icons 1 +} + + +Display LCD-Linux { + Driver 'LCD-Linux' + Size '20x2' + UseBusy 0 +} + +Display LCD2USB { + Driver 'LCD2USB' + Size '20x2' + Backlight 1 + Icons 1 +} + + +Display LCD2041 { + Driver 'MatrixOrbital' + Model 'LCD2041' + Port '/dev/tts/0' + Speed 19200 + Contrast 160 +} + +Display LK202 { + Driver 'MatrixOrbital' + Model 'LK202-24-USB' + Port '/dev/tts/USB0' + Speed 19200 + Contrast 256/2 +} + +Display LK204 { + Driver 'MatrixOrbital' + Model 'LK204-24-USB' + Port '/dev/usb/tts/0' +# Port '/dev/tts/0' + Speed 19200 + Contrast 256/2 +} + + +Display MI240 { + Driver 'MilfordInstruments' + Model 'MI240' + Port '/dev/tts/0' + Speed 19200 +} + + +Display CW12232 { + Driver 'Cwlinux' + Model 'CW12232' + Port '/dev/usb/tts/0' + Speed 19200 + Brightness 2 + Icons 1 +} + + +Display CF631 { + Driver 'Crystalfontz' + Model '631' + Port '/dev/tts/USB0' + Speed 115200 + Contrast 95 + Backlight 50 + Icons 1 +} + +Display CF632 { + Driver 'Crystalfontz' + Model '632' + Port '/dev/tts/0' + Speed 19200 + Icons 1 +} + +Display CF633 { + Icons 1 + Driver 'Crystalfontz' + Model '633' + Port '/dev/tts/0' + Speed 19200 + Contrast 16 + Backlight 50 +} + +Display CF635 { + Icons 1 + Driver 'Crystalfontz' + Model '635' + Port '/dev/ttyUSB0' + Speed 115200 + Contrast 100 + Backlight 128 +} + +Display Curses { + Driver 'Curses' + Size '20x6' +} + +# generic HD44780 display (LCD4Linux wiring) +Display HD44780-generic { + Driver 'HD44780' + Model 'generic' + Port '/dev/parports/0' + Size '8x2' + asc255bug 0 + GPOs 8 + Wire { + RW 'GND' + RS 'AUTOFD' + ENABLE 'STROBE' + ENABLE2 'GND' + GPO 'INIT' + POWER 'GND' + } +} + +# generic HD44780 display (WinAmp wiring) +Display HD44780-winamp { + Driver 'HD44780' + Model 'generic' + UseBusy 1 + Port '/dev/parports/0' + Size '20x4' + asc255bug 1 + Wire { + RW 'AUTOFD' + RS 'INIT' + ENABLE 'STROBE' + ENABLE2 'GND' + GPO 'GND' + POWER 'GND' + } + Timing { + # fuzz timings by value (100 = no change) + fuzz 100 + # low-level communication [ns] + CY 1000 # Enable cycle time + PW 450 # Enable pulse width + AS 140 # Address setup time + AH 20 # Address hold time + # HD44780 execution timings [us] + INIT1 4100 # first init sequence: 4.1 msec + INIT2 100 # second init sequence: 100 usec + EXEC 80 # normal execution time + WRCG 120 # CG RAM Write + CLEAR 2250 # Clear Display + HOME 2250 # Return Cursor Home + ONOFF 2250 # Display On/Off Control + # GPO timing [ns] + GPO_ST 20 # 74HCT573 set-up time + GPO_PW 230 # 74HCT573 enable pulse width + # Power supply timing [ms] + POWER 500 # power-on delay + } +} + +# HD44780 display 4-Bit mode +Display HD44780-4bit { + Driver 'HD44780' + Model 'generic' + Port '/dev/parports/0' + Size '16x1' + Bits 4 + UseBusy 0 + asc255bug 0 + Wire { + RW 'GND' + RS 'DB4' + ENABLE 'DB6' + GPO 'GND' + } +} + +# Dual-HD44780 display from Pollin +Display WDC2704M { + Driver 'HD44780' + Model 'generic' + Controllers 2 + UseBusy 1 + Port '/dev/parports/0' + Size '27x4' + Wire { + RW 'AUTOFD' + RS 'INIT' + ENABLE 'STROBE' + ENABLE2 'SLCTIN' + GPO 'GND' + POWER 'GND' + } +} + +# HD44780 display from www.kernelconcepts.de +Display HD44780-kernelconcepts { + Driver 'HD44780' + Model 'HD66712' + UseBusy 1 + Port '/dev/parports/0' + Size '20x4' + Wire { + RW 'AUTOFD' + RS 'INIT' + ENABLE 'STROBE' + ENABLE2 'GND' + GPO 'GND' + POWER 'GND' + } +} + +Display picoLCD { + Driver 'picoLCD' + Size '20x2' + Contrast 0 + Backlight 1 + Icons 1 +} + +Display SC1602D { + Driver 'HD44780' + Port '/dev/parports/0' + Bits '8' + Size '16x2' + asc255bug 0 + Icons 1 + Wire { + RW 'GND' + RS 'AUTOFD' + ENABLE 'STROBE' + GPO 'INIT' + POWER 'GND' + } +} + + +Display LCM-162 { + Driver 'HD44780' + Model 'LCM-162' +# Bus 'parport' + Port '/dev/parports/0' + Size '16x2' + UseBusy 1 + asc255bug 0 + Icons 1 +} + + +Display HD44780-I2C { + Driver 'HD44780' + Model 'generic' + Bus 'i2c' + Port '/dev/i2c-0' + Device '70' + Bits '4' + Size '20x4' + asc255bug 0 + Icons 1 + Wire { + RW 'DB5' + RS 'DB4' + ENABLE 'DB6' + GPO 'GND' + } +} + + +Display LCDTerm { + Driver 'LCDTerm + Port '/dev/tts/0' + Speed 19200 + Size '20x4' + Icons 1 +} + +Display SimpleLCD { + Driver 'SimpleLCD' + Port '/dev/tts/0' + Speed 1200 + Options 0 + Size '20x2' +} + +Display BA63 { + Driver 'WincorNixdorf' + Model 'BA63' + Port '/dev/tts/0' +# Port '/dev/tts/USB0' + Speed 9600 + BarChar 219 + SelfTest 0 +} + +Display M50530-24x8 { + Driver 'M50530' + Port '/dev/parports/0' +# Port '0x378' + Size '24x8' + Font '5x7' + Duty 2 + Wire.RW 'INIT' + Wire.EX 'STROBE' + Wire.IOC1 'SLCTIN' + Wire.IOC2 'AUTOFD' + Wire.GPO 'GND' + UseBusy 1 + Timing.fuzz 100 +} + + +Display CT20x4 { + Driver 'Beckmann+Egle' + Model 'CT20x4' + Port '/dev/tts/0' +# Size '16x2' +# Contrast 7 +# Backlight 1 + Icons 1 +} + + +Display USBLCD { + Driver 'USBLCD' +# Port '/dev/lcd0' + Port 'libusb' + Size '20x4' + asc255bug 1 + Icons 1 +} + + +Display BWCT { + Driver 'BWCT' + Size '20x4' + Contrast 220 + asc255bug 1 + Icons 1 +} + + +Display T6963-240x64 { + Driver 'T6963' + Port '/dev/parports/0' + Size '240x64' + DualScan 0 + Cell 6 + Wire.CE 'STROBE' + Wire.CD 'SLCTIN' + Wire.RD 'AUTOFD' + Wire.WR 'INIT' + Timing.fuzz 120 + Font '6x8' +} + +Display T6963-240x128 { + Driver 'T6963' + Port '/dev/parports/0' + Size '240x128' + DualScan 0 + Cell 6 + Wire.CE 'STROBE' + Wire.CD 'SLCTIN' + Wire.RD 'AUTOFD' + Wire.WR 'INIT' + Timing.fuzz 120 + Font '6x8' +} + +Display T6963-240x128D { + Driver 'T6963' + Port '/dev/parports/0' + Size '240x128' + DualScan 1 + Cell 6 + Wire.CE 'STROBE' + Wire.CD 'SLCTIN' + Wire.RD 'AUTOFD' + Wire.WR 'INIT' + Timing.fuzz 120 + Font '6x8' +} + + +Display LPH7508 { + Driver 'LPH7508' + Port '/dev/parports/0' + Font '6x8' + Contrast 15 + Inverted 0 +} + +Display LPH7508-serdisplib { + Driver 'serdisplib' + Port 'PAR:/dev/parports/0' + Model 'LPH7508' +} + +Display ctinclud { + Driver 'serdisplib' + Port 'USB:7c0/1501' + Model 'CTINCLUD' + Options '' + Inverted 0 +} + +Display XWindow { + Driver 'X11' + Size '120x32' + Font '5x8' + Pixel '4+1' + Gap '-1x-1' + Border 20 +# Foreground '#000000' +# Background '#80d000' +# Halfground '#70c000' + Foreground '000000cc' + Background '00000022' + Basecolor '80d000' +} + +Display Image { + Driver 'Image' +# Format 'PPM' + Format 'PNG' + Size '120x32' + Font '6x8' + Pixel '4+1' + Gap '-1x-1' + Border 20 +# Foreground '#000000' +# Background '#80d000' +# Halfground '#70c000' + Foreground '000000cc' + Background '00000022' + Basecolor '80d000' +} + +#Plugin KVV { +# StationID '12_701' +# Refresh 30 +# Proxy 'igate' +# Port 8080; +#} + +Plugin Seti { + Directory '/root/setiathome-3.08.i686-pc-linux-gnu' +} + + +Plugin MySQL { + server 'gsmlandia.com' # if none, localhost assumed + port 3306 # if none, MySQL default assumed + user 'lcd4linux' # if none, lcd4linux unix owner assumed + password 'lcd4linux' # if none, empty password assumed + database 'lcd4linux' # MUST be specified +} + +Plugin Pop3 { + server1 'localhost' + port1 110 + user1 'michael' + password1 'secret' +} + + +Widget OS { + class 'Text' + expression '*** '.uname('sysname').' '.uname('release').' ***' + width 20 + align 'M' + style 'bold' + speed 50 + update tick +} + +Widget CPU { + class 'Text' + expression uname('machine') + prefix 'CPU ' + width 9 + align 'L' + style test::onoff(7)>0?'bold':'norm' + update tick +} + + +Widget CPUinfo { + class 'Text' + expression cpuinfo('model name') + prefix '' + width 20 + align 'M' + speed 100 + update tick +} + + +Widget RAM { + class 'Text' + expression meminfo('MemTotal')/1024 + postfix ' MB RAM' + width 11 + precision 0 + align 'R' + update tick +} + +Widget Busy { + class 'Text' + expression proc_stat::cpu('busy', 500) + prefix 'Busy' + postfix '%' + width 9 + precision 1 + align 'R' + update tick +} + +Widget BusyBar { + class 'Bar' + expression proc_stat::cpu('busy', 500) + expression2 proc_stat::cpu('system', 500) + length 10 + direction 'E' + update tack +} + +Widget Load { + class 'Text' + expression loadavg(1) + prefix 'Load' + postfix loadavg(1)>1.0?'!':' ' + width 10 + precision 1 + align 'R' + update tick +} + +Widget LoadBar { + class 'Bar' + expression loadavg(1) + max 2.0 + length 10 + direction 'E' + update tack +} + + +Widget Disk { + class 'Text' + # disk.[rw]blk return blocks, we assume a blocksize of 512 + # to get the number in kB/s we would do blk*512/1024, which is blk/2 + # expression (proc_stat::disk('.*', 'rblk', 500)+proc_stat::disk('.*', 'wblk', 500))/2 + # with kernel 2.6, disk_io disappeared from /proc/stat but moved to /proc/diskstat + # therefore you have to use another function called 'diskstats': + expression diskstats('hd.', 'read_sectors', 500) + diskstats('hd.', 'write_sectors', 500) + prefix 'disk' + postfix ' ' + width 10 + precision 0 + align 'R' + update tick +} + +Widget DiskBar { + class 'Bar' + #expression proc_stat::disk('.*', 'rblk', 500) + #expression2 proc_stat::disk('.*', 'wblk', 500) + # for kernel 2.6: + expression diskstats('hd.', 'read_sectors', 500) + expression2 diskstats('hd.', 'write_sectors', 500) + length 14 + direction 'E' + update tack +} + +Widget Eth0 { + class 'Text' + expression (netdev('eth0', 'Rx_bytes', 500)+netdev('eth0', 'Tx_bytes', 500))/1024 + prefix 'eth0' + postfix ' ' + width 10 + precision 0 + align 'R' + update tick +} + +Widget Eth0Bar { + class 'Bar' + expression netdev('eth0', 'Rx_bytes', 500) + expression2 netdev('eth0', 'Tx_bytes', 500) + length 14 + direction 'E' + update tack +} + +Widget PPP { + class 'Text' + expression (ppp('Rx:0', 500)+ppp('Tx:0', 500)) + prefix 'PPP' + width 9 + precision 0 + align 'R' + update tick +} + +Widget Temp { + class 'Text' + expression i2c_sensors('temp_input3')*1.0324-67 + prefix 'Temp' + width 9 + precision 1 + align 'R' + update tick +} + +Widget TempBar { + class 'Bar' + expression i2c_sensors('temp_input3')*1.0324-67 + min 40 + max 80 + length 10 + direction 'E' + update tack +} + +Widget MySQLtest1 { + class 'Text' + expression MySQL::query('SELECT id FROM table1') + width 20 + align 'R' + prefix 'MySQL test:' + update minute +} + +Widget MySQLtest2 { + class 'Text' + expression MySQL::status() + width 20 + align 'M' + prefix 'Status: ' + update minute +} + +Widget Uptime { + class 'Text' + expression uptime('%d days %H:%M:%S') + width 20 + align 'R' + prefix 'Up ' + update 1000 +} + + +# debugging widgets + +Widget BarTest { + class 'Bar' + # test::bar(barno,maxval,startval,delta) - move a test value between 0 and max. + # delta= step to change value by each time it's read. + # barno - ten different test bar values can be set up, with barno=0..9 + # if delta=0, just returns the value of bar n instead of changing it. + expression test::bar(0,30,25,1) + expression2 test::bar(1,30,0,1) + length 8 + # max 50 + direction 'E' + update 10 +} + +Widget BarTestVal { + class 'Text' + expression test::bar(0,100,50,0) + prefix 'Test ' + width 9 + update 200 +} + +Widget LightningTest { + class 'icon' + speed 500 + visible test::onoff(0) + bitmap { + row1 '...***' + row2 '..***.' + row3 '.***..' + row4 '.****.' + row5 '..**..' + row6 '.**...' + row7 '**....' + row8 '*.....' + } +} + + +# Icons + +Widget Heartbeat { + class 'Icon' + speed 800 + Bitmap { + Row1 '.....|.....' + Row2 '.*.*.|.*.*.' + Row3 '*****|*.*.*' + Row4 '*****|*...*' + Row5 '.***.|.*.*.' + Row6 '.***.|.*.*.' + Row7 '..*..|..*..' + Row8 '.....|.....' + } +} + +Widget EKG { + class 'Icon' + speed 50 + Bitmap { + Row1 '.....|.....|.....|.....|.....|.....|.....|.....' + Row2 '.....|....*|...*.|..*..|.*...|*....|.....|.....' + Row3 '.....|....*|...*.|..*..|.*...|*....|.....|.....' + Row4 '.....|....*|...**|..**.|.**..|**...|*....|.....' + Row5 '.....|....*|...**|..**.|.**..|**...|*....|.....' + Row6 '.....|....*|...*.|..*.*|.*.*.|*.*..|.*...|*....' + Row7 '*****|*****|****.|***..|**..*|*..**|..***|.****' + Row8 '.....|.....|.....|.....|.....|.....|.....|.....' + } +} +Widget Karo { + class 'Icon' + speed 200 + Bitmap { + Row1 '.....|.....|.....|.....|..*..|.....|.....|.....' + Row2 '.....|.....|.....|..*..|.*.*.|..*..|.....|.....' + Row3 '.....|.....|..*..|.*.*.|*...*|.*.*.|..*..|.....' + Row4 '.....|..*..|.*.*.|*...*|.....|*...*|.*.*.|..*..' + Row5 '.....|.....|..*..|.*.*.|*...*|.*.*.|..*..|.....' + Row6 '.....|.....|.....|..*..|.*.*.|..*..|.....|.....' + Row7 '.....|.....|.....|.....|..*..|.....|.....|.....' + Row8 '.....|.....|.....|.....|.....|.....|.....|.....' + } +} +Widget Heart { + class 'Icon' + speed 250 + Bitmap { + Row1 '.....|.....|.....|.....|.....|.....' + Row2 '.*.*.|.....|.*.*.|.....|.....|.....' + Row3 '*****|.*.*.|*****|.*.*.|.*.*.|.*.*.' + Row4 '*****|.***.|*****|.***.|.***.|.***.' + Row5 '.***.|.***.|.***.|.***.|.***.|.***.' + Row6 '.***.|..*..|.***.|..*..|..*..|..*..' + Row7 '..*..|.....|..*..|.....|.....|.....' + Row8 '.....|.....|.....|.....|.....|.....' + } +} +Widget Blob { + class 'Icon' + speed 250 + Bitmap { + Row1 '.....|.....|.....' + Row2 '.....|.....|.***.' + Row3 '.....|.***.|*...*' + Row4 '..*..|.*.*.|*...*' + Row5 '.....|.***.|*...*' + Row6 '.....|.....|.***.' + Row7 '.....|.....|.....' + Row8 '.....|.....|.....' + } +} +Widget Wave { + class 'Icon' + speed 100 + Bitmap { + Row1 '..**.|.**..|**...|*....|.....|.....|.....|.....|....*|...**' + Row2 '.*..*|*..*.|..*..|.*...|*....|.....|.....|....*|...*.|..*..' + Row3 '*....|....*|...*.|..*..|.*...|*....|....*|...*.|..*..|.*...' + Row4 '*....|....*|...*.|..*..|.*...|*....|....*|...*.|..*..|.*...' + Row5 '*....|....*|...*.|..*..|.*...|*....|....*|...*.|..*..|.*...' + Row6 '.....|.....|....*|...*.|..*..|.*..*|*..*.|..*..|.*...|*....' + Row7 '.....|.....|.....|....*|...**|..**.|.**..|**...|*....|.....' + Row8 '.....|.....|.....|.....|.....|.....|.....|.....|.....|.....' + } +} +Widget Squirrel { + class 'Icon' + speed 100 + Bitmap { + Row1 '.....|.....|.....|.....|.....|.....' + Row2 '.....|.....|.....|.....|.....|.....' + Row3 '.....|.....|.....|.....|.....|.....' + Row4 '**...|.**..|..**.|...**|....*|.....' + Row5 '*****|*****|*****|*****|*****|*****' + Row6 '...**|..**.|.**..|**...|*....|.....' + Row7 '.....|.....|.....|.....|.....|.....' + Row8 '.....|.....|.....|.....|.....|.....' + } +} + +Widget Lightning { + class 'icon' + speed 100 + visible cpu('busy', 500)-50 + bitmap { + row1 '...***' + row2 '..***.' + row3 '.***..' + row4 '.****.' + row5 '..**..' + row6 '.**...' + row7 '**....' + row8 '*.....' + } +} + +Widget Rain { + class 'icon' + speed 200 + bitmap { + row1 '...*.|.....|.....|.*...|....*|..*..|.....|*....' + row2 '*....|...*.|.....|.....|.*...|....*|..*..|.....' + row3 '.....|*....|...*.|.....|.....|.*...|....*|..*..' + row4 '..*..|.....|*....|...*.|.....|.....|.*...|....*' + row5 '....*|..*..|.....|*....|...*.|.....|.....|.*...' + row6 '.*...|....*|..*..|.....|*....|...*.|.....|.....' + row7 '.....|.*...|....*|..*..|.....|*....|...*.|.....' + row8 '.....|.....|.*...|....*|..*..|.....|*....|...*.' + } +} + +Widget Timer { + class 'Icon' + speed 50 + Bitmap { + Row1 '.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|' + Row2 '.***.|.*+*.|.*++.|.*++.|.*++.|.*++.|.*++.|.*++.|.*++.|.*++.|.*++.|.*++.|.+++.|.+*+.|.+**.|.+**.|.+**.|.+**.|.+**.|.+**.|.+**.|.+**.|.+**.|.+**.|' + Row3 '*****|**+**|**++*|**+++|**++.|**++.|**+++|**+++|**+++|**+++|**+++|+++++|+++++|++*++|++**+|++***|++**.|++**.|++***|++***|++***|++***|++***|*****|' + Row4 '*****|**+**|**+**|**+**|**+++|**+++|**+++|**+++|**+++|**+++|+++++|+++++|+++++|++*++|++*++|++*++|++***|++***|++***|++***|++***|++***|*****|*****|' + Row5 '*****|*****|*****|*****|*****|***++|***++|**+++|*++++|+++++|+++++|+++++|+++++|+++++|+++++|+++++|+++++|+++**|+++**|++***|+****|*****|*****|*****|' + Row6 '.***.|.***.|.***.|.***.|.***.|.***.|.**+.|.*++.|.+++.|.+++.|.+++.|.+++.|.+++.|.+++.|.+++.|.+++.|.+++.|.+++.|.++*.|.+**.|.***.|.***.|.***.|.***.|' + Row7 '.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|' + Row8 '.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|' + + + } +} + +Widget Test { + class 'Text' + expression '1234567890123456789012345678901234567890' + width 40 + foreground 'ff0000ff' +} + +Widget Test1 { + class 'Text' + expression 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' + width 40 + align 'M' + speed 100 +} + +Widget Test2 { + class 'Text' + expression '1234567890abcdefghijklmnopqrstuvwxyz' + width 40 + align 'M' + speed 150 +} + +Widget GPO_Val1 { + class 'Text' + expression LCD::GPO(1) + prefix 'GPO#1' + width 10 + precision 0 + align 'R' + update tick +} + +Widget GPI_Val1 { + class 'Text' + expression LCD::GPI(1) + prefix 'GPI#1' + width 10 + precision 0 + align 'R' + update tick +} + +Widget GPO_Val4 { + class 'Text' + expression LCD::GPO(4) + prefix 'GPO#4' + width 10 + precision 0 + align 'R' + update tick +} + +Widget GPO_Test1 { + class 'GPO' + expression 255*test::onoff(1) + update 300 +} + +Widget GPO_Test255 { + class 'GPO' + expression test::bar(0,255, 0, 1) + update 100 +} + +Widget ImageTest { + class 'Image' + file 'tux.png' + update 1000 + visible 1 + inverted 0 +} + +Widget KVV { + class 'Text' + expression kvv::line(0).' '.kvv::station(0) + width 11 + + align 'L' + update tick + Foreground 'ffff00' + style 'bold' +} + +Widget KVV_TIME { + class 'Text' + expression kvv::time_str(0) + width 2 + + align 'R' + update tick + foreground kvv::time(0) < 2 ? 'FF0000' : ( kvv::time(0) < 5 ? 'FFFF00' : '00FF00' ) + style 'bold' +} + +Layout Default { + Row1 { + Col1 'OS' + } + Row2 { + Col1 'CPU' + Col10 'RAM' + } + Row3 { + Col1 'Busy' + Col10 'Rain' + Col11 'BusyBar' + } + Row4 { + Col1 'Load' + Col11 'LoadBar' + } + Row5 { + Col1 'Disk' + Col11 'DiskBar' + } + Row6 { + Col1 'Eth0' + Col11 'Eth0Bar' + } +} + +Layout TestLayer { + Row1 { + Col1 'OS' + } + Row2 { + Col1 'CPU' + Col10 'RAM' + } + Row3 { + Col1 'Busy' + Col10 'Rain' + Col11 'BusyBar' + } + Row4 { + Col1 'Load' + Col11 'LoadBar' + } + Row5 { + Col1 'Disk' + Col11 'DiskBar' + } + Row6 { + Col1 'Eth0' + Col11 'Eth0Bar' + } + Layer 2 { + X1.Y1 'ImageTest' + } +} + +Layout TestImage { + Layer 2 { + X1.Y1 'ImageTest' + } +} + +Layout L24x8 { + Row1 { + Col1 'Load' + Col11 'BusyBar' + } + Row2 { + } +} + +Layout L8x2 { + Row1 { + Col1 'Busy' + } + Row2 { + Col1 'BarTest' + } +} + +Layout L16x1 { + Row1 { + Col1 'Busy' + Col11 'BusyBar' + } +} + +Layout L16x2 { + Row1 { + Col1 'Busy' + Col11 'BusyBar' + } + Row2 { + Col1 'Disk' + #Col11 'DiskBar' + Col11 'BarTest' + } +} + +Layout L20x2 { + Row1 { + Col1 'CPUinfo' + } + Row2 { + Col1 'Busy' + Col11 'BusyBar' + } +} + +Layout L40x2 { + Row1 { + Col1 'OS' + Col21 'Busy' + Col31 'BusyBar' + } + Row2 { + Col1 'CPU' + Col10 'RAM' + Col21 'Load' + Col31 'LoadBar' + } +} + +Layout Test { + Row01.Col1 'Test1' + Row02.Col1 'Test1' + Row03.Col1 'Test1' + Row04.Col1 'Test1' + Row05.Col1 'Test1' + Row06.Col1 'Test1' + Row07.Col1 'Test1' + Row08.Col1 'Test1' + Row09.Col1 'Test1' + Row10.Col1 'Test1' + Row11.Col1 'Test1' + Row12.Col1 'Test1' + Row13.Col1 'Test1' + Row14.Col1 'Test1' + Row15.Col1 'Test1' + Row16.Col1 'Test1' + Row17.Col1 'Test1' + Row18.Col1 'Test1' + Row19.Col1 'Test1' + Row20.Col1 'Test1' + Row21.Col1 'Test1' + Row22.Col1 'Test1' + Row23.Col1 'Test1' + Row24.Col1 'Test1' +} + +Layout Test2 { + Row01.Col1 'Test1' + #Row02.Col1 'Rain' + Row02.Col1 'Test2' + Row03.Col1 'Test1' + Row04.Col1 'Test2' + Row05.Col1 'Test1' + Row06.Col1 'Test2' + Row07.Col1 'Test1' + Row08.Col1 'Test2' +} + +Layout TestGPO { + Row1.Col1 'GPO_Val1' + Row1.Col10 'GPI_Val1' + Row2.Col1 'GPO_Val4' + GPO1 'GPO_Test255' + GPO4 'GPO_Test1' +} + +Layout TestIcons { + Row1.Col1 'Timer' + Row1.Col2 'Rain' + Row1.Col3 'Squirrel' + Row1.Col4 'Wave' + Row1.Col5 'Blob' + Row1.Col6 'Heart' + Row1.Col7 'Karo' + Row1.Col8 'EKG' +} + +Layout testMySQL { + Row1 { + Col1 'MySQLtest1' + } + Row2 { + Col1 'MySQLtest2' + } +} + +Layout Debug { + #Row09.Col1 'Test' + Row09.Col1 'Heartbeat' +} + + + +#Display 'SerDispLib' +#Display 'LCD-Linux' +#Display 'LCD2041' +#Display 'LK202' +#Display 'LK204' +#Display 'MI240' +#Display 'CW12232' +#Display 'HD44780-generic' +#Display 'HD44780-WinAmp' +#Display 'HD44780-4bit' +#Display 'WDC2704M' +#Display 'SC1602D' +#Display 'LCM-162' +#Display 'CF631' +#Display 'CF632' +#Display 'CF633' +#Display 'Curses' +#Display 'M50530-24x8' +#Display 'LCDTerm' +#Display 'SimpleLCD' +#Display 'BA63' +#Display 'CT20x4' +#Display 'T6963-240x64' +#Display 'T6963-240x128' +#Display 'T6963-240x128D' +#Display 'XWindow' +#Display 'USBLCD' +#Display 'BWCT' +#Display 'Image' +#Display 'Trefon' +#Display 'LCD2USB' +#Display 'LPH7508-serdisplib' +#Display 'LPH7508' +#Display 'ctinclud' +Display 'picoLCD' + +#Layout 'Default' +#Layout 'TestLayer' +#Layout 'TestImage' +#Layout 'L8x2' +#Layout 'L16x1' +#Layout 'L16x2' +Layout 'L20x2' +#Layout 'L40x2' +#Layout 'Test' +#Layout 'Test2' +#Layout 'TestGPO' +#Layout 'Debug' +#Layout 'TestIcons' diff --git a/utils/lcd4linux/files/lcd4linux.init b/utils/lcd4linux/files/lcd4linux.init new file mode 100644 index 0000000..93ad465 --- /dev/null +++ b/utils/lcd4linux/files/lcd4linux.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007 OpenWrt.org +START=98 + +NAME=lcd4linux +BIN_F=/usr/bin/$NAME +PID_F=/var/run/lcd4linux.pid +SSD=start-stop-daemon +OPTIONS="-q -p $PID_F -f /etc/lcd4linux.conf" + +start() { + $SSD -S -q -p $PID_F -b -x $BIN_F -- $OPTIONS +} + +stop() { + $SSD -K -q -p $PID_F +} + diff --git a/utils/lcd4linux/patches/100-drv_RouterBoard.patch b/utils/lcd4linux/patches/100-drv_RouterBoard.patch new file mode 100644 index 0000000..9780f5a --- /dev/null +++ b/utils/lcd4linux/patches/100-drv_RouterBoard.patch @@ -0,0 +1,11 @@ +--- a/drv_RouterBoard.c ++++ b/drv_RouterBoard.c +@@ -106,7 +106,7 @@ + #include + #include + #include +-#include ++#include + + #include "debug.h" + #include "cfg.h" diff --git a/utils/lcd4linux/patches/120-remove_parport_outb.patch b/utils/lcd4linux/patches/120-remove_parport_outb.patch new file mode 100644 index 0000000..68d4bd4 --- /dev/null +++ b/utils/lcd4linux/patches/120-remove_parport_outb.patch @@ -0,0 +1,31 @@ +--- a/drv_generic_parport.c ++++ b/drv_generic_parport.c +@@ -39,16 +39,6 @@ + #include + #include + +-#ifdef HAVE_SYS_IO_H +-#include +-#define WITH_OUTB +-#else +-#ifdef HAVE_ASM_IO_H +-#include +-#define WITH_OUTB +-#endif +-#endif +- + #if defined (HAVE_LINUX_PARPORT_H) && defined (HAVE_LINUX_PPDEV_H) + #define WITH_PPDEV + #include +@@ -68,6 +58,11 @@ + /* these signals are inverted by hardware on the parallel port */ + #define PARPORT_CONTROL_INVERTED (PARPORT_CONTROL_STROBE | PARPORT_CONTROL_SELECT | PARPORT_CONTROL_AUTOFD) + ++#ifndef WITH_OUTB ++#define inb(foo) 0 ++#define outb(foo,bar) 0 ++#endif ++ + #if !defined(WITH_OUTB) && !defined(WITH_PPDEV) + #error neither outb() nor ppdev() possible + #error cannot compile parallel port driver diff --git a/utils/lcd4linux/patches/140-no_repnop_T6963.patch b/utils/lcd4linux/patches/140-no_repnop_T6963.patch new file mode 100644 index 0000000..31ac8a5 --- /dev/null +++ b/utils/lcd4linux/patches/140-no_repnop_T6963.patch @@ -0,0 +1,22 @@ +--- a/drv_T6963.c ++++ b/drv_T6963.c +@@ -114,7 +114,9 @@ static void drv_T6_status1(void) + /* wait for STA0=1 and STA1=1 */ + n = 0; + do { ++#if 0 + rep_nop(); ++#endif + if (++n > 1000) { + debug("hang in status1"); + bug = 1; +@@ -150,7 +152,9 @@ static void drv_T6_status2(void) + /* wait for STA3=1 */ + n = 0; + do { ++#if 0 + rep_nop(); ++#endif + if (++n > 1000) { + debug("hang in status2"); + bug = 1; diff --git a/utils/lcd4linux/patches/150-addlibmpdclient.patch b/utils/lcd4linux/patches/150-addlibmpdclient.patch new file mode 100644 index 0000000..0e51f67 --- /dev/null +++ b/utils/lcd4linux/patches/150-addlibmpdclient.patch @@ -0,0 +1,2624 @@ +--- /dev/null ++++ b/libmpdclient.c +@@ -0,0 +1,1957 @@ ++/* libmpdclient ++ (c)2003-2006 by Warren Dukes (warren.dukes@gmail.com) ++ This project's homepage is: http://www.musicpd.org ++ ++ Redistribution and use in source and binary forms, with or without ++ modification, are permitted provided that the following conditions ++ are met: ++ ++ - Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ ++ - 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. ++ ++ - Neither the name of the Music Player Daemon 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 COPYRIGHT HOLDERS AND CONTRIBUTORS ++ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR ++ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ++ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ++ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ++ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++*/ ++ ++#include "libmpdclient.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#ifdef WIN32 ++# include ++# include ++#else ++# include ++# include ++# include ++# include ++#endif ++ ++/* (bits+1)/3 (plus the sign character) */ ++#define INTLEN ((sizeof(int) * CHAR_BIT + 1) / 3 + 1) ++#define LONGLONGLEN ((sizeof(long long) * CHAR_BIT + 1) / 3 + 1) ++ ++#define COMMAND_LIST 1 ++#define COMMAND_LIST_OK 2 ++ ++#ifndef MPD_NO_GAI ++# ifdef AI_ADDRCONFIG ++# define MPD_HAVE_GAI ++# endif ++#endif ++ ++#ifndef MSG_DONTWAIT ++# define MSG_DONTWAIT 0 ++#endif ++ ++#ifdef WIN32 ++# define SELECT_ERRNO_IGNORE (errno == WSAEINTR || errno == WSAEINPROGRESS) ++# define SENDRECV_ERRNO_IGNORE SELECT_ERRNO_IGNORE ++#else ++# define SELECT_ERRNO_IGNORE (errno == EINTR) ++# define SENDRECV_ERRNO_IGNORE (errno == EINTR || errno == EAGAIN) ++# define winsock_dll_error(c) 0 ++# define closesocket(s) close(s) ++# define WSACleanup() do { /* nothing */ } while (0) ++#endif ++ ++#ifdef WIN32 ++static int winsock_dll_error(mpd_Connection * connection) ++{ ++ WSADATA wsaData; ++ if ((WSAStartup(MAKEWORD(2, 2), &wsaData)) != 0 || LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2) { ++ strcpy(connection->errorStr, "Could not find usable WinSock DLL."); ++ connection->error = MPD_ERROR_SYSTEM; ++ return 1; ++ } ++ return 0; ++} ++ ++static int do_connect_fail(mpd_Connection * connection, const struct sockaddr *serv_addr, int addrlen) ++{ ++ int iMode = 1; /* 0 = blocking, else non-blocking */ ++ ioctlsocket(connection->sock, FIONBIO, (u_long FAR *) & iMode); ++ return (connect(connection->sock, serv_addr, addrlen) == SOCKET_ERROR && WSAGetLastError() != WSAEWOULDBLOCK); ++} ++#else /* !WIN32 (sane operating systems) */ ++static int do_connect_fail(mpd_Connection * connection, const struct sockaddr *serv_addr, int addrlen) ++{ ++ int flags = fcntl(connection->sock, F_GETFL, 0); ++ fcntl(connection->sock, F_SETFL, flags | O_NONBLOCK); ++ return (connect(connection->sock, serv_addr, addrlen) < 0 && errno != EINPROGRESS); ++} ++#endif /* !WIN32 */ ++ ++#ifdef MPD_HAVE_GAI ++static int mpd_connect(mpd_Connection * connection, const char *host, int port, float timeout) ++{ ++ int error; ++ char service[INTLEN + 1]; ++ struct addrinfo hints; ++ struct addrinfo *res = NULL; ++ struct addrinfo *addrinfo = NULL; ++ ++ /** ++ * Setup hints ++ */ ++ hints.ai_flags = AI_ADDRCONFIG; ++ hints.ai_family = PF_UNSPEC; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_protocol = IPPROTO_TCP; ++ hints.ai_addrlen = 0; ++ hints.ai_addr = NULL; ++ hints.ai_canonname = NULL; ++ hints.ai_next = NULL; ++ ++ snprintf(service, sizeof(service), "%i", port); ++ ++ error = getaddrinfo(host, service, &hints, &addrinfo); ++ ++ if (error) { ++ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, "host \"%s\" not found: %s", host, gai_strerror(error)); ++ connection->error = MPD_ERROR_UNKHOST; ++ return -1; ++ } ++ ++ for (res = addrinfo; res; res = res->ai_next) { ++ /* create socket */ ++ connection->sock = socket(res->ai_family, SOCK_STREAM, res->ai_protocol); ++ if (connection->sock < 0) { ++ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, "problems creating socket: %s", strerror(errno)); ++ connection->error = MPD_ERROR_SYSTEM; ++ freeaddrinfo(addrinfo); ++ return -1; ++ } ++ ++ mpd_setConnectionTimeout(connection, timeout); ++ ++ /* connect stuff */ ++ if (do_connect_fail(connection, res->ai_addr, res->ai_addrlen)) { ++ /* try the next address family */ ++ closesocket(connection->sock); ++ connection->sock = -1; ++ continue; ++ } ++ } ++ ++ freeaddrinfo(addrinfo); ++ ++ if (connection->sock < 0) { ++ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, ++ "problems connecting to \"%s\" on port %i: %s", host, port, strerror(errno)); ++ connection->error = MPD_ERROR_CONNPORT; ++ ++ return -1; ++ } ++ ++ return 0; ++} ++#else /* !MPD_HAVE_GAI */ ++static int mpd_connect(mpd_Connection * connection, const char *host, int port, float timeout) ++{ ++ struct hostent *he; ++ struct sockaddr *dest; ++ int destlen; ++ struct sockaddr_in sin; ++ ++ if (!(he = gethostbyname(host))) { ++ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, "host \"%s\" not found", host); ++ connection->error = MPD_ERROR_UNKHOST; ++ return -1; ++ } ++ ++ memset(&sin, 0, sizeof(struct sockaddr_in)); ++ /*dest.sin_family = he->h_addrtype; */ ++ sin.sin_family = AF_INET; ++ sin.sin_port = htons(port); ++ ++ switch (he->h_addrtype) { ++ case AF_INET: ++ memcpy((char *) &sin.sin_addr.s_addr, (char *) he->h_addr, he->h_length); ++ dest = (struct sockaddr *) &sin; ++ destlen = sizeof(struct sockaddr_in); ++ break; ++ default: ++ strcpy(connection->errorStr, "address type is not IPv4"); ++ connection->error = MPD_ERROR_SYSTEM; ++ return -1; ++ break; ++ } ++ ++ if ((connection->sock = socket(dest->sa_family, SOCK_STREAM, 0)) < 0) { ++ strcpy(connection->errorStr, "problems creating socket"); ++ connection->error = MPD_ERROR_SYSTEM; ++ return -1; ++ } ++ ++ mpd_setConnectionTimeout(connection, timeout); ++ ++ /* connect stuff */ ++ if (do_connect_fail(connection, dest, destlen)) { ++ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, ++ "problems connecting to \"%s\" on port" " %i", host, port); ++ connection->error = MPD_ERROR_CONNPORT; ++ return -1; ++ } ++ ++ return 0; ++} ++#endif /* !MPD_HAVE_GAI */ ++ ++char *mpdTagItemKeys[MPD_TAG_NUM_OF_ITEM_TYPES] = { ++ "Artist", ++ "Album", ++ "Title", ++ "Track", ++ "Name", ++ "Genre", ++ "Date", ++ "Composer", ++ "Performer", ++ "Comment", ++ "Disc", ++ "Filename", ++ "Any" ++}; ++ ++static char *mpd_sanitizeArg(const char *arg) ++{ ++ size_t i; ++ char *ret; ++ register const char *c; ++ register char *rc; ++ ++ /* instead of counting in that loop above, just ++ * use a bit more memory and half running time ++ */ ++ ret = malloc(strlen(arg) * 2 + 1); ++ ++ c = arg; ++ rc = ret; ++ for (i = strlen(arg) + 1; i != 0; --i) { ++ if (*c == '"' || *c == '\\') ++ *rc++ = '\\'; ++ *(rc++) = *(c++); ++ } ++ ++ return ret; ++} ++ ++static mpd_ReturnElement *mpd_newReturnElement(const char *name, const char *value) ++{ ++ mpd_ReturnElement *ret = malloc(sizeof(mpd_ReturnElement)); ++ ++ ret->name = strdup(name); ++ ret->value = strdup(value); ++ ++ return ret; ++} ++ ++static void mpd_freeReturnElement(mpd_ReturnElement * re) ++{ ++ free(re->name); ++ free(re->value); ++ free(re); ++} ++ ++void mpd_setConnectionTimeout(mpd_Connection * connection, float timeout) ++{ ++ connection->timeout.tv_sec = (int) timeout; ++ connection->timeout.tv_usec = (int) (timeout * 1e6 - connection->timeout.tv_sec * 1000000 + 0.5); ++} ++ ++static int mpd_parseWelcome(mpd_Connection * connection, const char *host, int port, char *rt, char *output) ++{ ++ char *tmp; ++ char *test; ++ int i; ++ ++ if (strncmp(output, MPD_WELCOME_MESSAGE, strlen(MPD_WELCOME_MESSAGE))) { ++ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, ++ "mpd not running on port %i on host \"%s\"", port, host); ++ connection->error = MPD_ERROR_NOTMPD; ++ return 1; ++ } ++ ++ tmp = &output[strlen(MPD_WELCOME_MESSAGE)]; ++ ++ for (i = 0; i < 3; i++) { ++ if (tmp) ++ connection->version[i] = strtol(tmp, &test, 10); ++ ++ if (!tmp || (test[0] != '.' && test[0] != '\0')) { ++ snprintf(connection->errorStr, ++ MPD_ERRORSTR_MAX_LENGTH, ++ "error parsing version number at " "\"%s\"", &output[strlen(MPD_WELCOME_MESSAGE)]); ++ connection->error = MPD_ERROR_NOTMPD; ++ return 1; ++ } ++ tmp = ++test; ++ } ++ ++ return 0; ++} ++ ++mpd_Connection *mpd_newConnection(const char *host, int port, float timeout) ++{ ++ int err; ++ char *rt; ++ char *output = NULL; ++ mpd_Connection *connection = malloc(sizeof(mpd_Connection)); ++ struct timeval tv; ++ fd_set fds; ++ strcpy(connection->buffer, ""); ++ connection->buflen = 0; ++ connection->bufstart = 0; ++ strcpy(connection->errorStr, ""); ++ connection->error = 0; ++ connection->doneProcessing = 0; ++ connection->commandList = 0; ++ connection->listOks = 0; ++ connection->doneListOk = 0; ++ connection->returnElement = NULL; ++ connection->request = NULL; ++ ++ if (winsock_dll_error(connection)) ++ return connection; ++ ++ if (mpd_connect(connection, host, port, timeout) < 0) ++ return connection; ++ ++ while (!(rt = strstr(connection->buffer, "\n"))) { ++ tv.tv_sec = connection->timeout.tv_sec; ++ tv.tv_usec = connection->timeout.tv_usec; ++ FD_ZERO(&fds); ++ FD_SET(connection->sock, &fds); ++ if ((err = select(connection->sock + 1, &fds, NULL, NULL, &tv)) == 1) { ++ int readed; ++ readed = recv(connection->sock, ++ &(connection->buffer[connection->buflen]), MPD_BUFFER_MAX_LENGTH - connection->buflen, 0); ++ if (readed <= 0) { ++ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, ++ "problems getting a response from" " \"%s\" on port %i : %s", host, port, strerror(errno)); ++ connection->error = MPD_ERROR_NORESPONSE; ++ return connection; ++ } ++ connection->buflen += readed; ++ connection->buffer[connection->buflen] = '\0'; ++ } else if (err < 0) { ++ if (SELECT_ERRNO_IGNORE) ++ continue; ++ snprintf(connection->errorStr, ++ MPD_ERRORSTR_MAX_LENGTH, "problems connecting to \"%s\" on port" " %i", host, port); ++ connection->error = MPD_ERROR_CONNPORT; ++ return connection; ++ } else { ++ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, ++ "timeout in attempting to get a response from" " \"%s\" on port %i", host, port); ++ connection->error = MPD_ERROR_NORESPONSE; ++ return connection; ++ } ++ } ++ ++ *rt = '\0'; ++ output = strdup(connection->buffer); ++ strcpy(connection->buffer, rt + 1); ++ connection->buflen = strlen(connection->buffer); ++ ++ if (mpd_parseWelcome(connection, host, port, rt, output) == 0) ++ connection->doneProcessing = 1; ++ ++ free(output); ++ ++ return connection; ++} ++ ++void mpd_clearError(mpd_Connection * connection) ++{ ++ connection->error = 0; ++ connection->errorStr[0] = '\0'; ++} ++ ++void mpd_closeConnection(mpd_Connection * connection) ++{ ++ closesocket(connection->sock); ++ if (connection->returnElement) ++ free(connection->returnElement); ++ if (connection->request) ++ free(connection->request); ++ free(connection); ++ WSACleanup(); ++} ++ ++static void mpd_executeCommand(mpd_Connection * connection, char *command) ++{ ++ int ret; ++ struct timeval tv; ++ fd_set fds; ++ char *commandPtr = command; ++ int commandLen = strlen(command); ++ ++ if (!connection->doneProcessing && !connection->commandList) { ++ strcpy(connection->errorStr, "not done processing current command"); ++ connection->error = 1; ++ return; ++ } ++ ++ mpd_clearError(connection); ++ ++ FD_ZERO(&fds); ++ FD_SET(connection->sock, &fds); ++ tv.tv_sec = connection->timeout.tv_sec; ++ tv.tv_usec = connection->timeout.tv_usec; ++ ++ while ((ret = select(connection->sock + 1, NULL, &fds, NULL, &tv) == 1) || (ret == -1 && SELECT_ERRNO_IGNORE)) { ++ ret = send(connection->sock, commandPtr, commandLen, MSG_DONTWAIT); ++ if (ret <= 0) { ++ if (SENDRECV_ERRNO_IGNORE) ++ continue; ++ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, "problems giving command \"%s\"", command); ++ connection->error = MPD_ERROR_SENDING; ++ return; ++ } else { ++ commandPtr += ret; ++ commandLen -= ret; ++ } ++ ++ if (commandLen <= 0) ++ break; ++ } ++ ++ if (commandLen > 0) { ++ perror(""); ++ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, "timeout sending command \"%s\"", command); ++ connection->error = MPD_ERROR_TIMEOUT; ++ return; ++ } ++ ++ if (!connection->commandList) ++ connection->doneProcessing = 0; ++ else if (connection->commandList == COMMAND_LIST_OK) { ++ connection->listOks++; ++ } ++} ++ ++static void mpd_getNextReturnElement(mpd_Connection * connection) ++{ ++ char *output = NULL; ++ char *rt = NULL; ++ char *name = NULL; ++ char *value = NULL; ++ fd_set fds; ++ struct timeval tv; ++ char *tok = NULL; ++ int readed; ++ char *bufferCheck = NULL; ++ int err; ++ int pos; ++ ++ if (connection->returnElement) ++ mpd_freeReturnElement(connection->returnElement); ++ connection->returnElement = NULL; ++ ++ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { ++ strcpy(connection->errorStr, "already done processing current command"); ++ connection->error = 1; ++ return; ++ } ++ ++ bufferCheck = connection->buffer + connection->bufstart; ++ while (connection->bufstart >= connection->buflen || !(rt = strchr(bufferCheck, '\n'))) { ++ if (connection->buflen >= MPD_BUFFER_MAX_LENGTH) { ++ memmove(connection->buffer, ++ connection->buffer + connection->bufstart, connection->buflen - connection->bufstart + 1); ++ connection->buflen -= connection->bufstart; ++ connection->bufstart = 0; ++ } ++ if (connection->buflen >= MPD_BUFFER_MAX_LENGTH) { ++ strcpy(connection->errorStr, "buffer overrun"); ++ connection->error = MPD_ERROR_BUFFEROVERRUN; ++ connection->doneProcessing = 1; ++ connection->doneListOk = 0; ++ return; ++ } ++ bufferCheck = connection->buffer + connection->buflen; ++ tv.tv_sec = connection->timeout.tv_sec; ++ tv.tv_usec = connection->timeout.tv_usec; ++ FD_ZERO(&fds); ++ FD_SET(connection->sock, &fds); ++ if ((err = select(connection->sock + 1, &fds, NULL, NULL, &tv) == 1)) { ++ readed = recv(connection->sock, ++ connection->buffer + connection->buflen, ++ MPD_BUFFER_MAX_LENGTH - connection->buflen, MSG_DONTWAIT); ++ if (readed < 0 && SENDRECV_ERRNO_IGNORE) { ++ continue; ++ } ++ if (readed <= 0) { ++ strcpy(connection->errorStr, "connection" " closed"); ++ connection->error = MPD_ERROR_CONNCLOSED; ++ connection->doneProcessing = 1; ++ connection->doneListOk = 0; ++ return; ++ } ++ connection->buflen += readed; ++ connection->buffer[connection->buflen] = '\0'; ++ } else if (err < 0 && SELECT_ERRNO_IGNORE) ++ continue; ++ else { ++ strcpy(connection->errorStr, "connection timeout"); ++ connection->error = MPD_ERROR_TIMEOUT; ++ connection->doneProcessing = 1; ++ connection->doneListOk = 0; ++ return; ++ } ++ } ++ ++ *rt = '\0'; ++ output = connection->buffer + connection->bufstart; ++ connection->bufstart = rt - connection->buffer + 1; ++ ++ if (strcmp(output, "OK") == 0) { ++ if (connection->listOks > 0) { ++ strcpy(connection->errorStr, "expected more list_OK's"); ++ connection->error = 1; ++ } ++ connection->listOks = 0; ++ connection->doneProcessing = 1; ++ connection->doneListOk = 0; ++ return; ++ } ++ ++ if (strcmp(output, "list_OK") == 0) { ++ if (!connection->listOks) { ++ strcpy(connection->errorStr, "got an unexpected list_OK"); ++ connection->error = 1; ++ } else { ++ connection->doneListOk = 1; ++ connection->listOks--; ++ } ++ return; ++ } ++ ++ if (strncmp(output, "ACK", strlen("ACK")) == 0) { ++ char *test; ++ char *needle; ++ int val; ++ ++ strcpy(connection->errorStr, output); ++ connection->error = MPD_ERROR_ACK; ++ connection->errorCode = MPD_ACK_ERROR_UNK; ++ connection->errorAt = MPD_ERROR_AT_UNK; ++ connection->doneProcessing = 1; ++ connection->doneListOk = 0; ++ ++ needle = strchr(output, '['); ++ if (!needle) ++ return; ++ val = strtol(needle + 1, &test, 10); ++ if (*test != '@') ++ return; ++ connection->errorCode = val; ++ val = strtol(test + 1, &test, 10); ++ if (*test != ']') ++ return; ++ connection->errorAt = val; ++ return; ++ } ++ ++ tok = strchr(output, ':'); ++ if (!tok) ++ return; ++ pos = tok - output; ++ value = ++tok; ++ name = output; ++ name[pos] = '\0'; ++ ++ if (value[0] == ' ') { ++ connection->returnElement = mpd_newReturnElement(name, &(value[1])); ++ } else { ++ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, "error parsing: %s:%s", name, value); ++ connection->error = 1; ++ } ++} ++ ++void mpd_finishCommand(mpd_Connection * connection) ++{ ++ while (!connection->doneProcessing) { ++ if (connection->doneListOk) ++ connection->doneListOk = 0; ++ mpd_getNextReturnElement(connection); ++ } ++} ++ ++static void mpd_finishListOkCommand(mpd_Connection * connection) ++{ ++ while (!connection->doneProcessing && connection->listOks && !connection->doneListOk) { ++ mpd_getNextReturnElement(connection); ++ } ++} ++ ++int mpd_nextListOkCommand(mpd_Connection * connection) ++{ ++ mpd_finishListOkCommand(connection); ++ if (!connection->doneProcessing) ++ connection->doneListOk = 0; ++ if (connection->listOks == 0 || connection->doneProcessing) ++ return -1; ++ return 0; ++} ++ ++void mpd_sendStatusCommand(mpd_Connection * connection) ++{ ++ mpd_executeCommand(connection, "status\n"); ++} ++ ++mpd_Status *mpd_getStatus(mpd_Connection * connection) ++{ ++ mpd_Status *status; ++ ++ /*mpd_executeCommand(connection,"status\n"); ++ ++ if(connection->error) return NULL; */ ++ ++ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { ++ return NULL; ++ } ++ ++ if (!connection->returnElement) ++ mpd_getNextReturnElement(connection); ++ ++ status = malloc(sizeof(mpd_Status)); ++ status->volume = -1; ++ status->repeat = 0; ++ status->random = 0; ++ status->playlist = -1; ++ status->playlistLength = -1; ++ status->state = -1; ++ status->song = 0; ++ status->songid = 0; ++ status->elapsedTime = 0; ++ status->totalTime = 0; ++ status->bitRate = 0; ++ status->sampleRate = 0; ++ status->bits = 0; ++ status->channels = 0; ++ status->crossfade = -1; ++ status->error = NULL; ++ status->updatingDb = 0; ++ ++ if (connection->error) { ++ free(status); ++ return NULL; ++ } ++ while (connection->returnElement) { ++ mpd_ReturnElement *re = connection->returnElement; ++ if (strcmp(re->name, "volume") == 0) { ++ status->volume = atoi(re->value); ++ } else if (strcmp(re->name, "repeat") == 0) { ++ status->repeat = atoi(re->value); ++ } else if (strcmp(re->name, "random") == 0) { ++ status->random = atoi(re->value); ++ } else if (strcmp(re->name, "playlist") == 0) { ++ status->playlist = strtol(re->value, NULL, 10); ++ } else if (strcmp(re->name, "playlistlength") == 0) { ++ status->playlistLength = atoi(re->value); ++ } else if (strcmp(re->name, "bitrate") == 0) { ++ status->bitRate = atoi(re->value); ++ } else if (strcmp(re->name, "state") == 0) { ++ if (strcmp(re->value, "play") == 0) { ++ status->state = MPD_STATUS_STATE_PLAY; ++ } else if (strcmp(re->value, "stop") == 0) { ++ status->state = MPD_STATUS_STATE_STOP; ++ } else if (strcmp(re->value, "pause") == 0) { ++ status->state = MPD_STATUS_STATE_PAUSE; ++ } else { ++ status->state = MPD_STATUS_STATE_UNKNOWN; ++ } ++ } else if (strcmp(re->name, "song") == 0) { ++ status->song = atoi(re->value); ++ } else if (strcmp(re->name, "songid") == 0) { ++ status->songid = atoi(re->value); ++ } else if (strcmp(re->name, "time") == 0) { ++ char *tok = strchr(re->value, ':'); ++ /* the second strchr below is a safety check */ ++ if (tok && (strchr(tok, 0) > (tok + 1))) { ++ /* atoi stops at the first non-[0-9] char: */ ++ status->elapsedTime = atoi(re->value); ++ status->totalTime = atoi(tok + 1); ++ } ++ } else if (strcmp(re->name, "error") == 0) { ++ status->error = strdup(re->value); ++ } else if (strcmp(re->name, "xfade") == 0) { ++ status->crossfade = atoi(re->value); ++ } else if (strcmp(re->name, "updating_db") == 0) { ++ status->updatingDb = atoi(re->value); ++ } else if (strcmp(re->name, "audio") == 0) { ++ char *tok = strchr(re->value, ':'); ++ if (tok && (strchr(tok, 0) > (tok + 1))) { ++ status->sampleRate = atoi(re->value); ++ status->bits = atoi(++tok); ++ tok = strchr(tok, ':'); ++ if (tok && (strchr(tok, 0) > (tok + 1))) ++ status->channels = atoi(tok + 1); ++ } ++ } ++ ++ mpd_getNextReturnElement(connection); ++ if (connection->error) { ++ free(status); ++ return NULL; ++ } ++ } ++ ++ if (connection->error) { ++ free(status); ++ return NULL; ++ } else if (status->state < 0) { ++ strcpy(connection->errorStr, "state not found"); ++ connection->error = 1; ++ free(status); ++ return NULL; ++ } ++ ++ return status; ++} ++ ++void mpd_freeStatus(mpd_Status * status) ++{ ++ if (status->error) ++ free(status->error); ++ free(status); ++} ++ ++void mpd_sendStatsCommand(mpd_Connection * connection) ++{ ++ mpd_executeCommand(connection, "stats\n"); ++} ++ ++mpd_Stats *mpd_getStats(mpd_Connection * connection) ++{ ++ mpd_Stats *stats; ++ ++ /*mpd_executeCommand(connection,"stats\n"); ++ ++ if(connection->error) return NULL; */ ++ ++ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { ++ return NULL; ++ } ++ ++ if (!connection->returnElement) ++ mpd_getNextReturnElement(connection); ++ ++ stats = malloc(sizeof(mpd_Stats)); ++ stats->numberOfArtists = 0; ++ stats->numberOfAlbums = 0; ++ stats->numberOfSongs = 0; ++ stats->uptime = 0; ++ stats->dbUpdateTime = 0; ++ stats->playTime = 0; ++ stats->dbPlayTime = 0; ++ ++ if (connection->error) { ++ free(stats); ++ return NULL; ++ } ++ while (connection->returnElement) { ++ mpd_ReturnElement *re = connection->returnElement; ++ if (strcmp(re->name, "artists") == 0) { ++ stats->numberOfArtists = atoi(re->value); ++ } else if (strcmp(re->name, "albums") == 0) { ++ stats->numberOfAlbums = atoi(re->value); ++ } else if (strcmp(re->name, "songs") == 0) { ++ stats->numberOfSongs = atoi(re->value); ++ } else if (strcmp(re->name, "uptime") == 0) { ++ stats->uptime = strtol(re->value, NULL, 10); ++ } else if (strcmp(re->name, "db_update") == 0) { ++ stats->dbUpdateTime = strtol(re->value, NULL, 10); ++ } else if (strcmp(re->name, "playtime") == 0) { ++ stats->playTime = strtol(re->value, NULL, 10); ++ } else if (strcmp(re->name, "db_playtime") == 0) { ++ stats->dbPlayTime = strtol(re->value, NULL, 10); ++ } ++ ++ mpd_getNextReturnElement(connection); ++ if (connection->error) { ++ free(stats); ++ return NULL; ++ } ++ } ++ ++ if (connection->error) { ++ free(stats); ++ return NULL; ++ } ++ ++ return stats; ++} ++ ++void mpd_freeStats(mpd_Stats * stats) ++{ ++ free(stats); ++} ++ ++mpd_SearchStats *mpd_getSearchStats(mpd_Connection * connection) ++{ ++ mpd_SearchStats *stats; ++ mpd_ReturnElement *re; ++ ++ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { ++ return NULL; ++ } ++ ++ if (!connection->returnElement) ++ mpd_getNextReturnElement(connection); ++ ++ if (connection->error) ++ return NULL; ++ ++ stats = malloc(sizeof(mpd_SearchStats)); ++ stats->numberOfSongs = 0; ++ stats->playTime = 0; ++ ++ while (connection->returnElement) { ++ re = connection->returnElement; ++ ++ if (strcmp(re->name, "songs") == 0) { ++ stats->numberOfSongs = atoi(re->value); ++ } else if (strcmp(re->name, "playtime") == 0) { ++ stats->playTime = strtol(re->value, NULL, 10); ++ } ++ ++ mpd_getNextReturnElement(connection); ++ if (connection->error) { ++ free(stats); ++ return NULL; ++ } ++ } ++ ++ if (connection->error) { ++ free(stats); ++ return NULL; ++ } ++ ++ return stats; ++} ++ ++void mpd_freeSearchStats(mpd_SearchStats * stats) ++{ ++ free(stats); ++} ++ ++static void mpd_initSong(mpd_Song * song) ++{ ++ song->file = NULL; ++ song->artist = NULL; ++ song->album = NULL; ++ song->track = NULL; ++ song->title = NULL; ++ song->name = NULL; ++ song->date = NULL; ++ /* added by Qball */ ++ song->genre = NULL; ++ song->composer = NULL; ++ song->performer = NULL; ++ song->disc = NULL; ++ song->comment = NULL; ++ ++ song->time = MPD_SONG_NO_TIME; ++ song->pos = MPD_SONG_NO_NUM; ++ song->id = MPD_SONG_NO_ID; ++} ++ ++static void mpd_finishSong(mpd_Song * song) ++{ ++ if (song->file) ++ free(song->file); ++ if (song->artist) ++ free(song->artist); ++ if (song->album) ++ free(song->album); ++ if (song->title) ++ free(song->title); ++ if (song->track) ++ free(song->track); ++ if (song->name) ++ free(song->name); ++ if (song->date) ++ free(song->date); ++ if (song->genre) ++ free(song->genre); ++ if (song->composer) ++ free(song->composer); ++ if (song->disc) ++ free(song->disc); ++ if (song->comment) ++ free(song->comment); ++} ++ ++mpd_Song *mpd_newSong(void) ++{ ++ mpd_Song *ret = malloc(sizeof(mpd_Song)); ++ ++ mpd_initSong(ret); ++ ++ return ret; ++} ++ ++void mpd_freeSong(mpd_Song * song) ++{ ++ mpd_finishSong(song); ++ free(song); ++} ++ ++mpd_Song *mpd_songDup(mpd_Song * song) ++{ ++ mpd_Song *ret = mpd_newSong(); ++ ++ if (song->file) ++ ret->file = strdup(song->file); ++ if (song->artist) ++ ret->artist = strdup(song->artist); ++ if (song->album) ++ ret->album = strdup(song->album); ++ if (song->title) ++ ret->title = strdup(song->title); ++ if (song->track) ++ ret->track = strdup(song->track); ++ if (song->name) ++ ret->name = strdup(song->name); ++ if (song->date) ++ ret->date = strdup(song->date); ++ if (song->genre) ++ ret->genre = strdup(song->genre); ++ if (song->composer) ++ ret->composer = strdup(song->composer); ++ if (song->disc) ++ ret->disc = strdup(song->disc); ++ if (song->comment) ++ ret->comment = strdup(song->comment); ++ ret->time = song->time; ++ ret->pos = song->pos; ++ ret->id = song->id; ++ ++ return ret; ++} ++ ++static void mpd_initDirectory(mpd_Directory * directory) ++{ ++ directory->path = NULL; ++} ++ ++static void mpd_finishDirectory(mpd_Directory * directory) ++{ ++ if (directory->path) ++ free(directory->path); ++} ++ ++mpd_Directory *mpd_newDirectory(void) ++{ ++ mpd_Directory *directory = malloc(sizeof(mpd_Directory));; ++ ++ mpd_initDirectory(directory); ++ ++ return directory; ++} ++ ++void mpd_freeDirectory(mpd_Directory * directory) ++{ ++ mpd_finishDirectory(directory); ++ ++ free(directory); ++} ++ ++mpd_Directory *mpd_directoryDup(mpd_Directory * directory) ++{ ++ mpd_Directory *ret = mpd_newDirectory(); ++ ++ if (directory->path) ++ ret->path = strdup(directory->path); ++ ++ return ret; ++} ++ ++static void mpd_initPlaylistFile(mpd_PlaylistFile * playlist) ++{ ++ playlist->path = NULL; ++} ++ ++static void mpd_finishPlaylistFile(mpd_PlaylistFile * playlist) ++{ ++ if (playlist->path) ++ free(playlist->path); ++} ++ ++mpd_PlaylistFile *mpd_newPlaylistFile(void) ++{ ++ mpd_PlaylistFile *playlist = malloc(sizeof(mpd_PlaylistFile)); ++ ++ mpd_initPlaylistFile(playlist); ++ ++ return playlist; ++} ++ ++void mpd_freePlaylistFile(mpd_PlaylistFile * playlist) ++{ ++ mpd_finishPlaylistFile(playlist); ++ free(playlist); ++} ++ ++mpd_PlaylistFile *mpd_playlistFileDup(mpd_PlaylistFile * playlist) ++{ ++ mpd_PlaylistFile *ret = mpd_newPlaylistFile(); ++ ++ if (playlist->path) ++ ret->path = strdup(playlist->path); ++ ++ return ret; ++} ++ ++static void mpd_initInfoEntity(mpd_InfoEntity * entity) ++{ ++ entity->info.directory = NULL; ++} ++ ++static void mpd_finishInfoEntity(mpd_InfoEntity * entity) ++{ ++ if (entity->info.directory) { ++ if (entity->type == MPD_INFO_ENTITY_TYPE_DIRECTORY) { ++ mpd_freeDirectory(entity->info.directory); ++ } else if (entity->type == MPD_INFO_ENTITY_TYPE_SONG) { ++ mpd_freeSong(entity->info.song); ++ } else if (entity->type == MPD_INFO_ENTITY_TYPE_PLAYLISTFILE) { ++ mpd_freePlaylistFile(entity->info.playlistFile); ++ } ++ } ++} ++ ++mpd_InfoEntity *mpd_newInfoEntity(void) ++{ ++ mpd_InfoEntity *entity = malloc(sizeof(mpd_InfoEntity)); ++ ++ mpd_initInfoEntity(entity); ++ ++ return entity; ++} ++ ++void mpd_freeInfoEntity(mpd_InfoEntity * entity) ++{ ++ mpd_finishInfoEntity(entity); ++ free(entity); ++} ++ ++static void mpd_sendInfoCommand(mpd_Connection * connection, char *command) ++{ ++ mpd_executeCommand(connection, command); ++} ++ ++mpd_InfoEntity *mpd_getNextInfoEntity(mpd_Connection * connection) ++{ ++ mpd_InfoEntity *entity = NULL; ++ ++ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { ++ return NULL; ++ } ++ ++ if (!connection->returnElement) ++ mpd_getNextReturnElement(connection); ++ ++ if (connection->returnElement) { ++ if (strcmp(connection->returnElement->name, "file") == 0) { ++ entity = mpd_newInfoEntity(); ++ entity->type = MPD_INFO_ENTITY_TYPE_SONG; ++ entity->info.song = mpd_newSong(); ++ entity->info.song->file = strdup(connection->returnElement->value); ++ } else if (strcmp(connection->returnElement->name, "directory") == 0) { ++ entity = mpd_newInfoEntity(); ++ entity->type = MPD_INFO_ENTITY_TYPE_DIRECTORY; ++ entity->info.directory = mpd_newDirectory(); ++ entity->info.directory->path = strdup(connection->returnElement->value); ++ } else if (strcmp(connection->returnElement->name, "playlist") == 0) { ++ entity = mpd_newInfoEntity(); ++ entity->type = MPD_INFO_ENTITY_TYPE_PLAYLISTFILE; ++ entity->info.playlistFile = mpd_newPlaylistFile(); ++ entity->info.playlistFile->path = strdup(connection->returnElement->value); ++ } else if (strcmp(connection->returnElement->name, "cpos") == 0) { ++ entity = mpd_newInfoEntity(); ++ entity->type = MPD_INFO_ENTITY_TYPE_SONG; ++ entity->info.song = mpd_newSong(); ++ entity->info.song->pos = atoi(connection->returnElement->value); ++ } else { ++ connection->error = 1; ++ strcpy(connection->errorStr, "problem parsing song info"); ++ return NULL; ++ } ++ } else ++ return NULL; ++ ++ mpd_getNextReturnElement(connection); ++ while (connection->returnElement) { ++ mpd_ReturnElement *re = connection->returnElement; ++ ++ if (strcmp(re->name, "file") == 0) ++ return entity; ++ else if (strcmp(re->name, "directory") == 0) ++ return entity; ++ else if (strcmp(re->name, "playlist") == 0) ++ return entity; ++ else if (strcmp(re->name, "cpos") == 0) ++ return entity; ++ ++ if (entity->type == MPD_INFO_ENTITY_TYPE_SONG && strlen(re->value)) { ++ if (!entity->info.song->artist && strcmp(re->name, "Artist") == 0) { ++ entity->info.song->artist = strdup(re->value); ++ } else if (!entity->info.song->album && strcmp(re->name, "Album") == 0) { ++ entity->info.song->album = strdup(re->value); ++ } else if (!entity->info.song->title && strcmp(re->name, "Title") == 0) { ++ entity->info.song->title = strdup(re->value); ++ } else if (!entity->info.song->track && strcmp(re->name, "Track") == 0) { ++ entity->info.song->track = strdup(re->value); ++ } else if (!entity->info.song->name && strcmp(re->name, "Name") == 0) { ++ entity->info.song->name = strdup(re->value); ++ } else if (entity->info.song->time == MPD_SONG_NO_TIME && strcmp(re->name, "Time") == 0) { ++ entity->info.song->time = atoi(re->value); ++ } else if (entity->info.song->pos == MPD_SONG_NO_NUM && strcmp(re->name, "Pos") == 0) { ++ entity->info.song->pos = atoi(re->value); ++ } else if (entity->info.song->id == MPD_SONG_NO_ID && strcmp(re->name, "Id") == 0) { ++ entity->info.song->id = atoi(re->value); ++ } else if (!entity->info.song->date && strcmp(re->name, "Date") == 0) { ++ entity->info.song->date = strdup(re->value); ++ } else if (!entity->info.song->genre && strcmp(re->name, "Genre") == 0) { ++ entity->info.song->genre = strdup(re->value); ++ } else if (!entity->info.song->composer && strcmp(re->name, "Composer") == 0) { ++ entity->info.song->composer = strdup(re->value); ++ } else if (!entity->info.song->performer && strcmp(re->name, "Performer") == 0) { ++ entity->info.song->performer = strdup(re->value); ++ } else if (!entity->info.song->disc && strcmp(re->name, "Disc") == 0) { ++ entity->info.song->disc = strdup(re->value); ++ } else if (!entity->info.song->comment && strcmp(re->name, "Comment") == 0) { ++ entity->info.song->comment = strdup(re->value); ++ } ++ } else if (entity->type == MPD_INFO_ENTITY_TYPE_DIRECTORY) { ++ } else if (entity->type == MPD_INFO_ENTITY_TYPE_PLAYLISTFILE) { ++ } ++ ++ mpd_getNextReturnElement(connection); ++ } ++ ++ return entity; ++} ++ ++static char *mpd_getNextReturnElementNamed(mpd_Connection * connection, const char *name) ++{ ++ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { ++ return NULL; ++ } ++ ++ mpd_getNextReturnElement(connection); ++ while (connection->returnElement) { ++ mpd_ReturnElement *re = connection->returnElement; ++ ++ if (strcmp(re->name, name) == 0) ++ return strdup(re->value); ++ mpd_getNextReturnElement(connection); ++ } ++ ++ return NULL; ++} ++ ++char *mpd_getNextTag(mpd_Connection * connection, int type) ++{ ++ if (type < 0 || type >= MPD_TAG_NUM_OF_ITEM_TYPES || type == MPD_TAG_ITEM_ANY) ++ return NULL; ++ if (type == MPD_TAG_ITEM_FILENAME) ++ return mpd_getNextReturnElementNamed(connection, "file"); ++ return mpd_getNextReturnElementNamed(connection, mpdTagItemKeys[type]); ++} ++ ++char *mpd_getNextArtist(mpd_Connection * connection) ++{ ++ return mpd_getNextReturnElementNamed(connection, "Artist"); ++} ++ ++char *mpd_getNextAlbum(mpd_Connection * connection) ++{ ++ return mpd_getNextReturnElementNamed(connection, "Album"); ++} ++ ++void mpd_sendPlaylistInfoCommand(mpd_Connection * connection, int songPos) ++{ ++ int len = strlen("playlistinfo") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "playlistinfo \"%i\"\n", songPos); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendPlaylistIdCommand(mpd_Connection * connection, int id) ++{ ++ int len = strlen("playlistid") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "playlistid \"%i\"\n", id); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendPlChangesCommand(mpd_Connection * connection, long long playlist) ++{ ++ int len = strlen("plchanges") + 2 + LONGLONGLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "plchanges \"%lld\"\n", playlist); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendPlChangesPosIdCommand(mpd_Connection * connection, long long playlist) ++{ ++ int len = strlen("plchangesposid") + 2 + LONGLONGLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "plchangesposid \"%lld\"\n", playlist); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendListallCommand(mpd_Connection * connection, const char *dir) ++{ ++ char *sDir = mpd_sanitizeArg(dir); ++ int len = strlen("listall") + 2 + strlen(sDir) + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "listall \"%s\"\n", sDir); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++ free(sDir); ++} ++ ++void mpd_sendListallInfoCommand(mpd_Connection * connection, const char *dir) ++{ ++ char *sDir = mpd_sanitizeArg(dir); ++ int len = strlen("listallinfo") + 2 + strlen(sDir) + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "listallinfo \"%s\"\n", sDir); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++ free(sDir); ++} ++ ++void mpd_sendLsInfoCommand(mpd_Connection * connection, const char *dir) ++{ ++ char *sDir = mpd_sanitizeArg(dir); ++ int len = strlen("lsinfo") + 2 + strlen(sDir) + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "lsinfo \"%s\"\n", sDir); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++ free(sDir); ++} ++ ++void mpd_sendCurrentSongCommand(mpd_Connection * connection) ++{ ++ mpd_executeCommand(connection, "currentsong\n"); ++} ++ ++void mpd_sendSearchCommand(mpd_Connection * connection, int table, const char *str) ++{ ++ mpd_startSearch(connection, 0); ++ mpd_addConstraintSearch(connection, table, str); ++ mpd_commitSearch(connection); ++} ++ ++void mpd_sendFindCommand(mpd_Connection * connection, int table, const char *str) ++{ ++ mpd_startSearch(connection, 1); ++ mpd_addConstraintSearch(connection, table, str); ++ mpd_commitSearch(connection); ++} ++ ++void mpd_sendListCommand(mpd_Connection * connection, int table, const char *arg1) ++{ ++ char st[10]; ++ int len; ++ char *string; ++ if (table == MPD_TABLE_ARTIST) ++ strcpy(st, "artist"); ++ else if (table == MPD_TABLE_ALBUM) ++ strcpy(st, "album"); ++ else { ++ connection->error = 1; ++ strcpy(connection->errorStr, "unknown table for list"); ++ return; ++ } ++ if (arg1) { ++ char *sanitArg1 = mpd_sanitizeArg(arg1); ++ len = strlen("list") + 1 + strlen(sanitArg1) + 2 + strlen(st) + 3; ++ string = malloc(len); ++ snprintf(string, len, "list %s \"%s\"\n", st, sanitArg1); ++ free(sanitArg1); ++ } else { ++ len = strlen("list") + 1 + strlen(st) + 2; ++ string = malloc(len); ++ snprintf(string, len, "list %s\n", st); ++ } ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendAddCommand(mpd_Connection * connection, const char *file) ++{ ++ char *sFile = mpd_sanitizeArg(file); ++ int len = strlen("add") + 2 + strlen(sFile) + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "add \"%s\"\n", sFile); ++ mpd_executeCommand(connection, string); ++ free(string); ++ free(sFile); ++} ++ ++int mpd_sendAddIdCommand(mpd_Connection * connection, const char *file) ++{ ++ int retval = -1; ++ char *sFile = mpd_sanitizeArg(file); ++ int len = strlen("addid") + 2 + strlen(sFile) + 3; ++ char *string = malloc(len); ++ ++ snprintf(string, len, "addid \"%s\"\n", sFile); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++ free(sFile); ++ ++ string = mpd_getNextReturnElementNamed(connection, "Id"); ++ if (string) { ++ retval = atoi(string); ++ free(string); ++ } ++ ++ return retval; ++} ++ ++void mpd_sendDeleteCommand(mpd_Connection * connection, int songPos) ++{ ++ int len = strlen("delete") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "delete \"%i\"\n", songPos); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendDeleteIdCommand(mpd_Connection * connection, int id) ++{ ++ int len = strlen("deleteid") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "deleteid \"%i\"\n", id); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendSaveCommand(mpd_Connection * connection, const char *name) ++{ ++ char *sName = mpd_sanitizeArg(name); ++ int len = strlen("save") + 2 + strlen(sName) + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "save \"%s\"\n", sName); ++ mpd_executeCommand(connection, string); ++ free(string); ++ free(sName); ++} ++ ++void mpd_sendLoadCommand(mpd_Connection * connection, const char *name) ++{ ++ char *sName = mpd_sanitizeArg(name); ++ int len = strlen("load") + 2 + strlen(sName) + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "load \"%s\"\n", sName); ++ mpd_executeCommand(connection, string); ++ free(string); ++ free(sName); ++} ++ ++void mpd_sendRmCommand(mpd_Connection * connection, const char *name) ++{ ++ char *sName = mpd_sanitizeArg(name); ++ int len = strlen("rm") + 2 + strlen(sName) + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "rm \"%s\"\n", sName); ++ mpd_executeCommand(connection, string); ++ free(string); ++ free(sName); ++} ++ ++void mpd_sendRenameCommand(mpd_Connection * connection, const char *from, const char *to) ++{ ++ char *sFrom = mpd_sanitizeArg(from); ++ char *sTo = mpd_sanitizeArg(to); ++ int len = strlen("rename") + 2 + strlen(sFrom) + 3 + strlen(sTo) + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "rename \"%s\" \"%s\"\n", sFrom, sTo); ++ mpd_executeCommand(connection, string); ++ free(string); ++ free(sFrom); ++ free(sTo); ++} ++ ++void mpd_sendShuffleCommand(mpd_Connection * connection) ++{ ++ mpd_executeCommand(connection, "shuffle\n"); ++} ++ ++void mpd_sendClearCommand(mpd_Connection * connection) ++{ ++ mpd_executeCommand(connection, "clear\n"); ++} ++ ++void mpd_sendPlayCommand(mpd_Connection * connection, int songPos) ++{ ++ int len = strlen("play") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "play \"%i\"\n", songPos); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendPlayIdCommand(mpd_Connection * connection, int id) ++{ ++ int len = strlen("playid") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "playid \"%i\"\n", id); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendStopCommand(mpd_Connection * connection) ++{ ++ mpd_executeCommand(connection, "stop\n"); ++} ++ ++void mpd_sendPauseCommand(mpd_Connection * connection, int pauseMode) ++{ ++ int len = strlen("pause") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "pause \"%i\"\n", pauseMode); ++ mpd_executeCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendNextCommand(mpd_Connection * connection) ++{ ++ mpd_executeCommand(connection, "next\n"); ++} ++ ++void mpd_sendMoveCommand(mpd_Connection * connection, int from, int to) ++{ ++ int len = strlen("move") + 2 + INTLEN + 3 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "move \"%i\" \"%i\"\n", from, to); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendMoveIdCommand(mpd_Connection * connection, int id, int to) ++{ ++ int len = strlen("moveid") + 2 + INTLEN + 3 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "moveid \"%i\" \"%i\"\n", id, to); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendSwapCommand(mpd_Connection * connection, int song1, int song2) ++{ ++ int len = strlen("swap") + 2 + INTLEN + 3 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "swap \"%i\" \"%i\"\n", song1, song2); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendSwapIdCommand(mpd_Connection * connection, int id1, int id2) ++{ ++ int len = strlen("swapid") + 2 + INTLEN + 3 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "swapid \"%i\" \"%i\"\n", id1, id2); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendSeekCommand(mpd_Connection * connection, int song, int time) ++{ ++ int len = strlen("seek") + 2 + INTLEN + 3 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "seek \"%i\" \"%i\"\n", song, time); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendSeekIdCommand(mpd_Connection * connection, int id, int time) ++{ ++ int len = strlen("seekid") + 2 + INTLEN + 3 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "seekid \"%i\" \"%i\"\n", id, time); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendUpdateCommand(mpd_Connection * connection, char *path) ++{ ++ char *sPath = mpd_sanitizeArg(path); ++ int len = strlen("update") + 2 + strlen(sPath) + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "update \"%s\"\n", sPath); ++ mpd_sendInfoCommand(connection, string); ++ free(string); ++ free(sPath); ++} ++ ++int mpd_getUpdateId(mpd_Connection * connection) ++{ ++ char *jobid; ++ int ret = 0; ++ ++ jobid = mpd_getNextReturnElementNamed(connection, "updating_db"); ++ if (jobid) { ++ ret = atoi(jobid); ++ free(jobid); ++ } ++ ++ return ret; ++} ++ ++void mpd_sendPrevCommand(mpd_Connection * connection) ++{ ++ mpd_executeCommand(connection, "previous\n"); ++} ++ ++void mpd_sendRepeatCommand(mpd_Connection * connection, int repeatMode) ++{ ++ int len = strlen("repeat") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "repeat \"%i\"\n", repeatMode); ++ mpd_executeCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendRandomCommand(mpd_Connection * connection, int randomMode) ++{ ++ int len = strlen("random") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "random \"%i\"\n", randomMode); ++ mpd_executeCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendSetvolCommand(mpd_Connection * connection, int volumeChange) ++{ ++ int len = strlen("setvol") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "setvol \"%i\"\n", volumeChange); ++ mpd_executeCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendVolumeCommand(mpd_Connection * connection, int volumeChange) ++{ ++ int len = strlen("volume") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "volume \"%i\"\n", volumeChange); ++ mpd_executeCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendCrossfadeCommand(mpd_Connection * connection, int seconds) ++{ ++ int len = strlen("crossfade") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "crossfade \"%i\"\n", seconds); ++ mpd_executeCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendPasswordCommand(mpd_Connection * connection, const char *pass) ++{ ++ char *sPass = mpd_sanitizeArg(pass); ++ int len = strlen("password") + 2 + strlen(sPass) + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "password \"%s\"\n", sPass); ++ mpd_executeCommand(connection, string); ++ free(string); ++ free(sPass); ++} ++ ++void mpd_sendCommandListBegin(mpd_Connection * connection) ++{ ++ if (connection->commandList) { ++ strcpy(connection->errorStr, "already in command list mode"); ++ connection->error = 1; ++ return; ++ } ++ connection->commandList = COMMAND_LIST; ++ mpd_executeCommand(connection, "command_list_begin\n"); ++} ++ ++void mpd_sendCommandListOkBegin(mpd_Connection * connection) ++{ ++ if (connection->commandList) { ++ strcpy(connection->errorStr, "already in command list mode"); ++ connection->error = 1; ++ return; ++ } ++ connection->commandList = COMMAND_LIST_OK; ++ mpd_executeCommand(connection, "command_list_ok_begin\n"); ++ connection->listOks = 0; ++} ++ ++void mpd_sendCommandListEnd(mpd_Connection * connection) ++{ ++ if (!connection->commandList) { ++ strcpy(connection->errorStr, "not in command list mode"); ++ connection->error = 1; ++ return; ++ } ++ connection->commandList = 0; ++ mpd_executeCommand(connection, "command_list_end\n"); ++} ++ ++void mpd_sendOutputsCommand(mpd_Connection * connection) ++{ ++ mpd_executeCommand(connection, "outputs\n"); ++} ++ ++mpd_OutputEntity *mpd_getNextOutput(mpd_Connection * connection) ++{ ++ mpd_OutputEntity *output = NULL; ++ ++ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { ++ return NULL; ++ } ++ ++ if (connection->error) ++ return NULL; ++ ++ output = malloc(sizeof(mpd_OutputEntity)); ++ output->id = -10; ++ output->name = NULL; ++ output->enabled = 0; ++ ++ if (!connection->returnElement) ++ mpd_getNextReturnElement(connection); ++ ++ while (connection->returnElement) { ++ mpd_ReturnElement *re = connection->returnElement; ++ if (strcmp(re->name, "outputid") == 0) { ++ if (output != NULL && output->id >= 0) ++ return output; ++ output->id = atoi(re->value); ++ } else if (strcmp(re->name, "outputname") == 0) { ++ output->name = strdup(re->value); ++ } else if (strcmp(re->name, "outputenabled") == 0) { ++ output->enabled = atoi(re->value); ++ } ++ ++ mpd_getNextReturnElement(connection); ++ if (connection->error) { ++ free(output); ++ return NULL; ++ } ++ ++ } ++ ++ return output; ++} ++ ++void mpd_sendEnableOutputCommand(mpd_Connection * connection, int outputId) ++{ ++ int len = strlen("enableoutput") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "enableoutput \"%i\"\n", outputId); ++ mpd_executeCommand(connection, string); ++ free(string); ++} ++ ++void mpd_sendDisableOutputCommand(mpd_Connection * connection, int outputId) ++{ ++ int len = strlen("disableoutput") + 2 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "disableoutput \"%i\"\n", outputId); ++ mpd_executeCommand(connection, string); ++ free(string); ++} ++ ++void mpd_freeOutputElement(mpd_OutputEntity * output) ++{ ++ free(output->name); ++ free(output); ++} ++ ++/** ++ * mpd_sendNotCommandsCommand ++ * odd naming, but it gets the not allowed commands ++ */ ++ ++void mpd_sendNotCommandsCommand(mpd_Connection * connection) ++{ ++ mpd_executeCommand(connection, "notcommands\n"); ++} ++ ++/** ++ * mpd_sendCommandsCommand ++ * odd naming, but it gets the allowed commands ++ */ ++void mpd_sendCommandsCommand(mpd_Connection * connection) ++{ ++ mpd_executeCommand(connection, "commands\n"); ++} ++ ++/** ++ * Get the next returned command ++ */ ++char *mpd_getNextCommand(mpd_Connection * connection) ++{ ++ return mpd_getNextReturnElementNamed(connection, "command"); ++} ++ ++void mpd_sendUrlHandlersCommand(mpd_Connection * connection) ++{ ++ mpd_executeCommand(connection, "urlhandlers\n"); ++} ++ ++char *mpd_getNextHandler(mpd_Connection * connection) ++{ ++ return mpd_getNextReturnElementNamed(connection, "handler"); ++} ++ ++void mpd_sendTagTypesCommand(mpd_Connection * connection) ++{ ++ mpd_executeCommand(connection, "tagtypes\n"); ++} ++ ++char *mpd_getNextTagType(mpd_Connection * connection) ++{ ++ return mpd_getNextReturnElementNamed(connection, "tagtype"); ++} ++ ++void mpd_startSearch(mpd_Connection * connection, int exact) ++{ ++ if (connection->request) { ++ strcpy(connection->errorStr, "search already in progress"); ++ connection->error = 1; ++ return; ++ } ++ ++ if (exact) ++ connection->request = strdup("find"); ++ else ++ connection->request = strdup("search"); ++} ++ ++void mpd_startStatsSearch(mpd_Connection * connection) ++{ ++ if (connection->request) { ++ strcpy(connection->errorStr, "search already in progress"); ++ connection->error = 1; ++ return; ++ } ++ ++ connection->request = strdup("count"); ++} ++ ++void mpd_startPlaylistSearch(mpd_Connection * connection, int exact) ++{ ++ if (connection->request) { ++ strcpy(connection->errorStr, "search already in progress"); ++ connection->error = 1; ++ return; ++ } ++ ++ if (exact) ++ connection->request = strdup("playlistfind"); ++ else ++ connection->request = strdup("playlistsearch"); ++} ++ ++void mpd_startFieldSearch(mpd_Connection * connection, int type) ++{ ++ char *strtype; ++ int len; ++ ++ if (connection->request) { ++ strcpy(connection->errorStr, "search already in progress"); ++ connection->error = 1; ++ return; ++ } ++ ++ if (type < 0 || type >= MPD_TAG_NUM_OF_ITEM_TYPES) { ++ strcpy(connection->errorStr, "invalid type specified"); ++ connection->error = 1; ++ return; ++ } ++ ++ strtype = mpdTagItemKeys[type]; ++ ++ len = 5 + strlen(strtype) + 1; ++ connection->request = malloc(len); ++ ++ snprintf(connection->request, len, "list %c%s", tolower(strtype[0]), strtype + 1); ++} ++ ++void mpd_addConstraintSearch(mpd_Connection * connection, int type, const char *name) ++{ ++ char *strtype; ++ char *arg; ++ int len; ++ char *string; ++ ++ if (!connection->request) { ++ strcpy(connection->errorStr, "no search in progress"); ++ connection->error = 1; ++ return; ++ } ++ ++ if (type < 0 || type >= MPD_TAG_NUM_OF_ITEM_TYPES) { ++ strcpy(connection->errorStr, "invalid type specified"); ++ connection->error = 1; ++ return; ++ } ++ ++ if (name == NULL) { ++ strcpy(connection->errorStr, "no name specified"); ++ connection->error = 1; ++ return; ++ } ++ ++ string = strdup(connection->request); ++ strtype = mpdTagItemKeys[type]; ++ arg = mpd_sanitizeArg(name); ++ ++ len = strlen(string) + 1 + strlen(strtype) + 2 + strlen(arg) + 2; ++ connection->request = realloc(connection->request, len); ++ snprintf(connection->request, len, "%s %c%s \"%s\"", string, tolower(strtype[0]), strtype + 1, arg); ++ ++ free(string); ++ free(arg); ++} ++ ++void mpd_commitSearch(mpd_Connection * connection) ++{ ++ int len; ++ ++ if (!connection->request) { ++ strcpy(connection->errorStr, "no search in progress"); ++ connection->error = 1; ++ return; ++ } ++ ++ len = strlen(connection->request) + 2; ++ connection->request = realloc(connection->request, len); ++ connection->request[len - 2] = '\n'; ++ connection->request[len - 1] = '\0'; ++ mpd_sendInfoCommand(connection, connection->request); ++ ++ free(connection->request); ++ connection->request = NULL; ++} ++ ++/** ++ * @param connection a MpdConnection ++ * @param path the path to the playlist. ++ * ++ * List the content, with full metadata, of a stored playlist. ++ * ++ */ ++void mpd_sendListPlaylistInfoCommand(mpd_Connection * connection, char *path) ++{ ++ char *arg = mpd_sanitizeArg(path); ++ int len = strlen("listplaylistinfo") + 2 + strlen(arg) + 3; ++ char *query = malloc(len); ++ snprintf(query, len, "listplaylistinfo \"%s\"\n", arg); ++ mpd_sendInfoCommand(connection, query); ++ free(arg); ++ free(query); ++} ++ ++/** ++ * @param connection a MpdConnection ++ * @param path the path to the playlist. ++ * ++ * List the content of a stored playlist. ++ * ++ */ ++void mpd_sendListPlaylistCommand(mpd_Connection * connection, char *path) ++{ ++ char *arg = mpd_sanitizeArg(path); ++ int len = strlen("listplaylist") + 2 + strlen(arg) + 3; ++ char *query = malloc(len); ++ snprintf(query, len, "listplaylist \"%s\"\n", arg); ++ mpd_sendInfoCommand(connection, query); ++ free(arg); ++ free(query); ++} ++ ++void mpd_sendPlaylistClearCommand(mpd_Connection * connection, char *path) ++{ ++ char *sPath = mpd_sanitizeArg(path); ++ int len = strlen("playlistclear") + 2 + strlen(sPath) + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "playlistclear \"%s\"\n", sPath); ++ mpd_executeCommand(connection, string); ++ free(sPath); ++ free(string); ++} ++ ++void mpd_sendPlaylistAddCommand(mpd_Connection * connection, char *playlist, char *path) ++{ ++ char *sPlaylist = mpd_sanitizeArg(playlist); ++ char *sPath = mpd_sanitizeArg(path); ++ int len = strlen("playlistadd") + 2 + strlen(sPlaylist) + 3 + strlen(sPath) + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "playlistadd \"%s\" \"%s\"\n", sPlaylist, sPath); ++ mpd_executeCommand(connection, string); ++ free(sPlaylist); ++ free(sPath); ++ free(string); ++} ++ ++void mpd_sendPlaylistMoveCommand(mpd_Connection * connection, char *playlist, int from, int to) ++{ ++ char *sPlaylist = mpd_sanitizeArg(playlist); ++ int len = strlen("playlistmove") + 2 + strlen(sPlaylist) + 3 + INTLEN + 3 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "playlistmove \"%s\" \"%i\" \"%i\"\n", sPlaylist, from, to); ++ mpd_executeCommand(connection, string); ++ free(sPlaylist); ++ free(string); ++} ++ ++void mpd_sendPlaylistDeleteCommand(mpd_Connection * connection, char *playlist, int pos) ++{ ++ char *sPlaylist = mpd_sanitizeArg(playlist); ++ int len = strlen("playlistdelete") + 2 + strlen(sPlaylist) + 3 + INTLEN + 3; ++ char *string = malloc(len); ++ snprintf(string, len, "playlistdelete \"%s\" \"%i\"\n", sPlaylist, pos); ++ mpd_executeCommand(connection, string); ++ free(sPlaylist); ++ free(string); ++} +--- /dev/null ++++ b/libmpdclient.h +@@ -0,0 +1,661 @@ ++/* libmpdclient ++ (c)2003-2006 by Warren Dukes (warren.dukes@gmail.com) ++ This project's homepage is: http://www.musicpd.org ++ ++ Redistribution and use in source and binary forms, with or without ++ modification, are permitted provided that the following conditions ++ are met: ++ ++ - Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ ++ - 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. ++ ++ - Neither the name of the Music Player Daemon 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 COPYRIGHT HOLDERS AND CONTRIBUTORS ++ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR ++ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ++ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ++ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ++ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++*/ ++ ++#ifndef LIBMPDCLIENT_H ++#define LIBMPDCLIENT_H ++ ++#ifdef WIN32 ++# define __W32API_USE_DLLIMPORT__ 1 ++#endif ++ ++#include ++#include ++#define MPD_BUFFER_MAX_LENGTH 50000 ++#define MPD_ERRORSTR_MAX_LENGTH 1000 ++#define MPD_WELCOME_MESSAGE "OK MPD " ++ ++#define MPD_ERROR_TIMEOUT 10 /* timeout trying to talk to mpd */ ++#define MPD_ERROR_SYSTEM 11 /* system error */ ++#define MPD_ERROR_UNKHOST 12 /* unknown host */ ++#define MPD_ERROR_CONNPORT 13 /* problems connecting to port on host */ ++#define MPD_ERROR_NOTMPD 14 /* mpd not running on port at host */ ++#define MPD_ERROR_NORESPONSE 15 /* no response on attempting to connect */ ++#define MPD_ERROR_SENDING 16 /* error sending command */ ++#define MPD_ERROR_CONNCLOSED 17 /* connection closed by mpd */ ++#define MPD_ERROR_ACK 18 /* ACK returned! */ ++#define MPD_ERROR_BUFFEROVERRUN 19 /* Buffer was overrun! */ ++ ++#define MPD_ACK_ERROR_UNK -1 ++#define MPD_ERROR_AT_UNK -1 ++ ++#define MPD_ACK_ERROR_NOT_LIST 1 ++#define MPD_ACK_ERROR_ARG 2 ++#define MPD_ACK_ERROR_PASSWORD 3 ++#define MPD_ACK_ERROR_PERMISSION 4 ++#define MPD_ACK_ERROR_UNKNOWN_CMD 5 ++ ++#define MPD_ACK_ERROR_NO_EXIST 50 ++#define MPD_ACK_ERROR_PLAYLIST_MAX 51 ++#define MPD_ACK_ERROR_SYSTEM 52 ++#define MPD_ACK_ERROR_PLAYLIST_LOAD 53 ++#define MPD_ACK_ERROR_UPDATE_ALREADY 54 ++#define MPD_ACK_ERROR_PLAYER_SYNC 55 ++#define MPD_ACK_ERROR_EXIST 56 ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++ typedef enum mpd_TagItems { ++ MPD_TAG_ITEM_ARTIST, ++ MPD_TAG_ITEM_ALBUM, ++ MPD_TAG_ITEM_TITLE, ++ MPD_TAG_ITEM_TRACK, ++ MPD_TAG_ITEM_NAME, ++ MPD_TAG_ITEM_GENRE, ++ MPD_TAG_ITEM_DATE, ++ MPD_TAG_ITEM_COMPOSER, ++ MPD_TAG_ITEM_PERFORMER, ++ MPD_TAG_ITEM_COMMENT, ++ MPD_TAG_ITEM_DISC, ++ MPD_TAG_ITEM_FILENAME, ++ MPD_TAG_ITEM_ANY, ++ MPD_TAG_NUM_OF_ITEM_TYPES ++ } mpd_TagItems; ++ ++ extern char *mpdTagItemKeys[MPD_TAG_NUM_OF_ITEM_TYPES]; ++ ++/* internal stuff don't touch this struct */ ++ typedef struct _mpd_ReturnElement { ++ char *name; ++ char *value; ++ } mpd_ReturnElement; ++ ++/* mpd_Connection ++ * holds info about connection to mpd ++ * use error, and errorStr to detect errors ++ */ ++ typedef struct _mpd_Connection { ++ /* use this to check the version of mpd */ ++ int version[3]; ++ /* IMPORTANT, you want to get the error messages from here */ ++ char errorStr[MPD_ERRORSTR_MAX_LENGTH + 1]; ++ int errorCode; ++ int errorAt; ++ /* this will be set to MPD_ERROR_* if there is an error, 0 if not */ ++ int error; ++ /* DON'T TOUCH any of the rest of this stuff */ ++ int sock; ++ char buffer[MPD_BUFFER_MAX_LENGTH + 1]; ++ int buflen; ++ int bufstart; ++ int doneProcessing; ++ int listOks; ++ int doneListOk; ++ int commandList; ++ mpd_ReturnElement *returnElement; ++ struct timeval timeout; ++ char *request; ++ } mpd_Connection; ++ ++/* mpd_newConnection ++ * use this to open a new connection ++ * you should use mpd_closeConnection, when your done with the connection, ++ * even if an error has occurred ++ * _timeout_ is the connection timeout period in seconds ++ */ ++ mpd_Connection *mpd_newConnection(const char *host, int port, float timeout); ++ ++ void mpd_setConnectionTimeout(mpd_Connection * connection, float timeout); ++ ++/* mpd_closeConnection ++ * use this to close a connection and free'ing subsequent memory ++ */ ++ void mpd_closeConnection(mpd_Connection * connection); ++ ++/* mpd_clearError ++ * clears error ++ */ ++ void mpd_clearError(mpd_Connection * connection); ++ ++/* STATUS STUFF */ ++ ++/* use these with status.state to determine what state the player is in */ ++#define MPD_STATUS_STATE_UNKNOWN 0 ++#define MPD_STATUS_STATE_STOP 1 ++#define MPD_STATUS_STATE_PLAY 2 ++#define MPD_STATUS_STATE_PAUSE 3 ++ ++/* us this with status.volume to determine if mpd has volume support */ ++#define MPD_STATUS_NO_VOLUME -1 ++ ++/* mpd_Status ++ * holds info return from status command ++ */ ++ typedef struct mpd_Status { ++ /* 0-100, or MPD_STATUS_NO_VOLUME when there is no volume support */ ++ int volume; ++ /* 1 if repeat is on, 0 otherwise */ ++ int repeat; ++ /* 1 if random is on, 0 otherwise */ ++ int random; ++ /* playlist length */ ++ int playlistLength; ++ /* playlist, use this to determine when the playlist has changed */ ++ long long playlist; ++ /* use with MPD_STATUS_STATE_* to determine state of player */ ++ int state; ++ /* crossfade setting in seconds */ ++ int crossfade; ++ /* if a song is currently selected (always the case when state is ++ * PLAY or PAUSE), this is the position of the currently ++ * playing song in the playlist, beginning with 0 ++ */ ++ int song; ++ /* Song ID of the currently selected song */ ++ int songid; ++ /* time in seconds that have elapsed in the currently playing/paused ++ * song ++ */ ++ int elapsedTime; ++ /* length in seconds of the currently playing/paused song */ ++ int totalTime; ++ /* current bit rate in kbs */ ++ int bitRate; ++ /* audio sample rate */ ++ unsigned int sampleRate; ++ /* audio bits */ ++ int bits; ++ /* audio channels */ ++ int channels; ++ /* 1 if mpd is updating, 0 otherwise */ ++ int updatingDb; ++ /* error */ ++ char *error; ++ } mpd_Status; ++ ++ void mpd_sendStatusCommand(mpd_Connection * connection); ++ ++/* mpd_getStatus ++ * returns status info, be sure to free it with mpd_freeStatus() ++ * call this after mpd_sendStatusCommand() ++ */ ++ mpd_Status *mpd_getStatus(mpd_Connection * connection); ++ ++/* mpd_freeStatus ++ * free's status info malloc'd and returned by mpd_getStatus ++ */ ++ void mpd_freeStatus(mpd_Status * status); ++ ++ typedef struct _mpd_Stats { ++ int numberOfArtists; ++ int numberOfAlbums; ++ int numberOfSongs; ++ unsigned long uptime; ++ unsigned long dbUpdateTime; ++ unsigned long playTime; ++ unsigned long dbPlayTime; ++ } mpd_Stats; ++ ++ typedef struct _mpd_SearchStats { ++ int numberOfSongs; ++ unsigned long playTime; ++ } mpd_SearchStats; ++ ++ void mpd_sendStatsCommand(mpd_Connection * connection); ++ ++ mpd_Stats *mpd_getStats(mpd_Connection * connection); ++ ++ void mpd_freeStats(mpd_Stats * stats); ++ ++ mpd_SearchStats *mpd_getSearchStats(mpd_Connection * connection); ++ ++ void mpd_freeSearchStats(mpd_SearchStats * stats); ++ ++/* SONG STUFF */ ++ ++#define MPD_SONG_NO_TIME -1 ++#define MPD_SONG_NO_NUM -1 ++#define MPD_SONG_NO_ID -1 ++ ++/* mpd_Song ++ * for storing song info returned by mpd ++ */ ++ typedef struct _mpd_Song { ++ /* filename of song */ ++ char *file; ++ /* artist, maybe NULL if there is no tag */ ++ char *artist; ++ /* title, maybe NULL if there is no tag */ ++ char *title; ++ /* album, maybe NULL if there is no tag */ ++ char *album; ++ /* track, maybe NULL if there is no tag */ ++ char *track; ++ /* name, maybe NULL if there is no tag; it's the name of the current ++ * song, f.e. the icyName of the stream */ ++ char *name; ++ /* date */ ++ char *date; ++ ++ /* added by qball */ ++ /* Genre */ ++ char *genre; ++ /* Composer */ ++ char *composer; ++ /* Performer */ ++ char *performer; ++ /* Disc */ ++ char *disc; ++ /* Comment */ ++ char *comment; ++ ++ /* length of song in seconds, check that it is not MPD_SONG_NO_TIME */ ++ int time; ++ /* if plchanges/playlistinfo/playlistid used, is the position of the ++ * song in the playlist */ ++ int pos; ++ /* song id for a song in the playlist */ ++ int id; ++ } mpd_Song; ++ ++/* mpd_newSong ++ * use to allocate memory for a new mpd_Song ++ * file, artist, etc all initialized to NULL ++ * if your going to assign values to file, artist, etc ++ * be sure to malloc or strdup the memory ++ * use mpd_freeSong to free the memory for the mpd_Song, it will also ++ * free memory for file, artist, etc, so don't do it yourself ++ */ ++ mpd_Song *mpd_newSong(void); ++ ++/* mpd_freeSong ++ * use to free memory allocated by mpd_newSong ++ * also it will free memory pointed to by file, artist, etc, so be careful ++ */ ++ void mpd_freeSong(mpd_Song * song); ++ ++/* mpd_songDup ++ * works like strDup, but for a mpd_Song ++ */ ++ mpd_Song *mpd_songDup(mpd_Song * song); ++ ++/* DIRECTORY STUFF */ ++ ++/* mpd_Directory ++ * used to store info fro directory (right now that just the path) ++ */ ++ typedef struct _mpd_Directory { ++ char *path; ++ } mpd_Directory; ++ ++/* mpd_newDirectory ++ * allocates memory for a new directory ++ * use mpd_freeDirectory to free this memory ++ */ ++ mpd_Directory *mpd_newDirectory(void); ++ ++/* mpd_freeDirectory ++ * used to free memory allocated with mpd_newDirectory, and it frees ++ * path of mpd_Directory, so be careful ++ */ ++ void mpd_freeDirectory(mpd_Directory * directory); ++ ++/* mpd_directoryDup ++ * works like strdup, but for mpd_Directory ++ */ ++ mpd_Directory *mpd_directoryDup(mpd_Directory * directory); ++ ++/* PLAYLISTFILE STUFF */ ++ ++/* mpd_PlaylistFile ++ * stores info about playlist file returned by lsinfo ++ */ ++ typedef struct _mpd_PlaylistFile { ++ char *path; ++ } mpd_PlaylistFile; ++ ++/* mpd_newPlaylistFile ++ * allocates memory for new mpd_PlaylistFile, path is set to NULL ++ * free this memory with mpd_freePlaylistFile ++ */ ++ mpd_PlaylistFile *mpd_newPlaylistFile(void); ++ ++/* mpd_freePlaylist ++ * free memory allocated for freePlaylistFile, will also free ++ * path, so be careful ++ */ ++ void mpd_freePlaylistFile(mpd_PlaylistFile * playlist); ++ ++/* mpd_playlistFileDup ++ * works like strdup, but for mpd_PlaylistFile ++ */ ++ mpd_PlaylistFile *mpd_playlistFileDup(mpd_PlaylistFile * playlist); ++ ++/* INFO ENTITY STUFF */ ++ ++/* the type of entity returned from one of the commands that generates info ++ * use in conjunction with mpd_InfoEntity.type ++ */ ++#define MPD_INFO_ENTITY_TYPE_DIRECTORY 0 ++#define MPD_INFO_ENTITY_TYPE_SONG 1 ++#define MPD_INFO_ENTITY_TYPE_PLAYLISTFILE 2 ++ ++/* mpd_InfoEntity ++ * stores info on stuff returned info commands ++ */ ++ typedef struct mpd_InfoEntity { ++ /* the type of entity, use with MPD_INFO_ENTITY_TYPE_* to determine ++ * what this entity is (song, directory, etc...) ++ */ ++ int type; ++ /* the actual data you want, mpd_Song, mpd_Directory, etc */ ++ union { ++ mpd_Directory *directory; ++ mpd_Song *song; ++ mpd_PlaylistFile *playlistFile; ++ } info; ++ } mpd_InfoEntity; ++ ++ mpd_InfoEntity *mpd_newInfoEntity(void); ++ ++ void mpd_freeInfoEntity(mpd_InfoEntity * entity); ++ ++/* INFO COMMANDS AND STUFF */ ++ ++/* use this function to loop over after calling Info/Listall functions */ ++ mpd_InfoEntity *mpd_getNextInfoEntity(mpd_Connection * connection); ++ ++/* fetches the currently seeletect song (the song referenced by status->song ++ * and status->songid*/ ++ void mpd_sendCurrentSongCommand(mpd_Connection * connection); ++ ++/* songNum of -1, means to display the whole list */ ++ void mpd_sendPlaylistInfoCommand(mpd_Connection * connection, int songNum); ++ ++/* songId of -1, means to display the whole list */ ++ void mpd_sendPlaylistIdCommand(mpd_Connection * connection, int songId); ++ ++/* use this to get the changes in the playlist since version _playlist_ */ ++ void mpd_sendPlChangesCommand(mpd_Connection * connection, long long playlist); ++ ++/** ++ * @param connection: A valid and connected mpd_Connection. ++ * @param playlist: The playlist version you want the diff with. ++ * A more bandwidth efficient version of the mpd_sendPlChangesCommand. ++ * It only returns the pos+id of the changes song. ++ */ ++ void mpd_sendPlChangesPosIdCommand(mpd_Connection * connection, long long playlist); ++ ++/* recursivel fetches all songs/dir/playlists in "dir* (no metadata is ++ * returned) */ ++ void mpd_sendListallCommand(mpd_Connection * connection, const char *dir); ++ ++/* same as sendListallCommand, but also metadata is returned */ ++ void mpd_sendListallInfoCommand(mpd_Connection * connection, const char *dir); ++ ++/* non-recursive version of ListallInfo */ ++ void mpd_sendLsInfoCommand(mpd_Connection * connection, const char *dir); ++ ++#define MPD_TABLE_ARTIST MPD_TAG_ITEM_ARTIST ++#define MPD_TABLE_ALBUM MPD_TAG_ITEM_ALBUM ++#define MPD_TABLE_TITLE MPD_TAG_ITEM_TITLE ++#define MPD_TABLE_FILENAME MPD_TAG_ITEM_FILENAME ++ ++ void mpd_sendSearchCommand(mpd_Connection * connection, int table, const char *str); ++ ++ void mpd_sendFindCommand(mpd_Connection * connection, int table, const char *str); ++ ++/* LIST TAG COMMANDS */ ++ ++/* use this function fetch next artist entry, be sure to free the returned ++ * string. NULL means there are no more. Best used with sendListArtists ++ */ ++ char *mpd_getNextArtist(mpd_Connection * connection); ++ ++ char *mpd_getNextAlbum(mpd_Connection * connection); ++ ++ char *mpd_getNextTag(mpd_Connection * connection, int type); ++ ++/* list artist or albums by artist, arg1 should be set to the artist if ++ * listing albums by a artist, otherwise NULL for listing all artists or albums ++ */ ++ void mpd_sendListCommand(mpd_Connection * connection, int table, const char *arg1); ++ ++/* SIMPLE COMMANDS */ ++ ++ void mpd_sendAddCommand(mpd_Connection * connection, const char *file); ++ ++ int mpd_sendAddIdCommand(mpd_Connection * connection, const char *file); ++ ++ void mpd_sendDeleteCommand(mpd_Connection * connection, int songNum); ++ ++ void mpd_sendDeleteIdCommand(mpd_Connection * connection, int songNum); ++ ++ void mpd_sendSaveCommand(mpd_Connection * connection, const char *name); ++ ++ void mpd_sendLoadCommand(mpd_Connection * connection, const char *name); ++ ++ void mpd_sendRmCommand(mpd_Connection * connection, const char *name); ++ ++ void mpd_sendRenameCommand(mpd_Connection * connection, const char *from, const char *to); ++ ++ void mpd_sendShuffleCommand(mpd_Connection * connection); ++ ++ void mpd_sendClearCommand(mpd_Connection * connection); ++ ++/* use this to start playing at the beginning, useful when in random mode */ ++#define MPD_PLAY_AT_BEGINNING -1 ++ ++ void mpd_sendPlayCommand(mpd_Connection * connection, int songNum); ++ ++ void mpd_sendPlayIdCommand(mpd_Connection * connection, int songNum); ++ ++ void mpd_sendStopCommand(mpd_Connection * connection); ++ ++ void mpd_sendPauseCommand(mpd_Connection * connection, int pauseMode); ++ ++ void mpd_sendNextCommand(mpd_Connection * connection); ++ ++ void mpd_sendPrevCommand(mpd_Connection * connection); ++ ++ void mpd_sendMoveCommand(mpd_Connection * connection, int from, int to); ++ ++ void mpd_sendMoveIdCommand(mpd_Connection * connection, int from, int to); ++ ++ void mpd_sendSwapCommand(mpd_Connection * connection, int song1, int song2); ++ ++ void mpd_sendSwapIdCommand(mpd_Connection * connection, int song1, int song2); ++ ++ void mpd_sendSeekCommand(mpd_Connection * connection, int song, int time); ++ ++ void mpd_sendSeekIdCommand(mpd_Connection * connection, int song, int time); ++ ++ void mpd_sendRepeatCommand(mpd_Connection * connection, int repeatMode); ++ ++ void mpd_sendRandomCommand(mpd_Connection * connection, int randomMode); ++ ++ void mpd_sendSetvolCommand(mpd_Connection * connection, int volumeChange); ++ ++/* WARNING: don't use volume command, its depreacted */ ++ void mpd_sendVolumeCommand(mpd_Connection * connection, int volumeChange); ++ ++ void mpd_sendCrossfadeCommand(mpd_Connection * connection, int seconds); ++ ++ void mpd_sendUpdateCommand(mpd_Connection * connection, char *path); ++ ++/* returns the update job id, call this after a update command*/ ++ int mpd_getUpdateId(mpd_Connection * connection); ++ ++ void mpd_sendPasswordCommand(mpd_Connection * connection, const char *pass); ++ ++/* after executing a command, when your done with it to get its status ++ * (you want to check connection->error for an error) ++ */ ++ void mpd_finishCommand(mpd_Connection * connection); ++ ++/* command list stuff, use this to do things like add files very quickly */ ++ void mpd_sendCommandListBegin(mpd_Connection * connection); ++ ++ void mpd_sendCommandListOkBegin(mpd_Connection * connection); ++ ++ void mpd_sendCommandListEnd(mpd_Connection * connection); ++ ++/* advance to the next listOk ++ * returns 0 if advanced to the next list_OK, ++ * returns -1 if it advanced to an OK or ACK */ ++ int mpd_nextListOkCommand(mpd_Connection * connection); ++ ++ typedef struct _mpd_OutputEntity { ++ int id; ++ char *name; ++ int enabled; ++ } mpd_OutputEntity; ++ ++ void mpd_sendOutputsCommand(mpd_Connection * connection); ++ ++ mpd_OutputEntity *mpd_getNextOutput(mpd_Connection * connection); ++ ++ void mpd_sendEnableOutputCommand(mpd_Connection * connection, int outputId); ++ ++ void mpd_sendDisableOutputCommand(mpd_Connection * connection, int outputId); ++ ++ void mpd_freeOutputElement(mpd_OutputEntity * output); ++ ++/** ++ * @param connection a #mpd_Connection ++ * ++ * Queries mpd for the allowed commands ++ */ ++ void mpd_sendCommandsCommand(mpd_Connection * connection); ++ ++/** ++ * @param connection a #mpd_Connection ++ * ++ * Queries mpd for the not allowed commands ++ */ ++ void mpd_sendNotCommandsCommand(mpd_Connection * connection); ++ ++/** ++ * @param connection a #mpd_Connection ++ * ++ * returns the next supported command. ++ * ++ * @returns a string, needs to be free'ed ++ */ ++ char *mpd_getNextCommand(mpd_Connection * connection); ++ ++ void mpd_sendUrlHandlersCommand(mpd_Connection * connection); ++ ++ char *mpd_getNextHandler(mpd_Connection * connection); ++ ++ void mpd_sendTagTypesCommand(mpd_Connection * connection); ++ ++ char *mpd_getNextTagType(mpd_Connection * connection); ++ ++/** ++ * @param connection a MpdConnection ++ * @param path the path to the playlist. ++ * ++ * List the content, with full metadata, of a stored playlist. ++ * ++ */ ++ void mpd_sendListPlaylistInfoCommand(mpd_Connection * connection, char *path); ++ ++/** ++ * @param connection a MpdConnection ++ * @param path the path to the playlist. ++ * ++ * List the content of a stored playlist. ++ * ++ */ ++ void mpd_sendListPlaylistCommand(mpd_Connection * connection, char *path); ++ ++/** ++ * @param connection a #mpd_Connection ++ * @param exact if to match exact ++ * ++ * starts a search, use mpd_addConstraintSearch to add ++ * a constraint to the search, and mpd_commitSearch to do the actual search ++ */ ++ void mpd_startSearch(mpd_Connection * connection, int exact); ++ ++/** ++ * @param connection a #mpd_Connection ++ * @param type ++ * @param name ++ */ ++ void mpd_addConstraintSearch(mpd_Connection * connection, int type, const char *name); ++ ++/** ++ * @param connection a #mpd_Connection ++ */ ++ void mpd_commitSearch(mpd_Connection * connection); ++ ++/** ++ * @param connection a #mpd_Connection ++ * @param type The type to search for ++ * ++ * starts a search for fields... f.e. get a list of artists would be: ++ * @code ++ * mpd_startFieldSearch(connection, MPD_TAG_ITEM_ARTIST); ++ * mpd_commitSearch(connection); ++ * @endcode ++ * ++ * or get a list of artist in genre "jazz" would be: ++ * @code ++ * mpd_startFieldSearch(connection, MPD_TAG_ITEM_ARTIST); ++ * mpd_addConstraintSearch(connection, MPD_TAG_ITEM_GENRE, "jazz") ++ * mpd_commitSearch(connection); ++ * @endcode ++ * ++ * mpd_startSearch will return a list of songs (and you need mpd_getNextInfoEntity) ++ * this one will return a list of only one field (the one specified with type) and you need ++ * mpd_getNextTag to get the results ++ */ ++ void mpd_startFieldSearch(mpd_Connection * connection, int type); ++ ++ void mpd_startPlaylistSearch(mpd_Connection * connection, int exact); ++ ++ void mpd_startStatsSearch(mpd_Connection * connection); ++ ++ void mpd_sendPlaylistClearCommand(mpd_Connection * connection, char *path); ++ ++ void mpd_sendPlaylistAddCommand(mpd_Connection * connection, char *playlist, char *path); ++ ++ void mpd_sendPlaylistMoveCommand(mpd_Connection * connection, char *playlist, int from, int to); ++ ++ void mpd_sendPlaylistDeleteCommand(mpd_Connection * connection, char *playlist, int pos); ++#ifdef __cplusplus ++} ++#endif ++#endif diff --git a/utils/lcd4linux/patches/160-uinput_defs.patch b/utils/lcd4linux/patches/160-uinput_defs.patch new file mode 100644 index 0000000..44b24b3 --- /dev/null +++ b/utils/lcd4linux/patches/160-uinput_defs.patch @@ -0,0 +1,24 @@ +--- a/drv_G15.c ++++ b/drv_G15.c +@@ -42,6 +42,7 @@ + + #include + #include ++#include + #include + #include + +@@ -269,8 +270,13 @@ void drv_G15_initKeyHandling(char *devic + } + memset(&device, 0, sizeof(device)); + strncpy(device.name, "G15 Keys", UINPUT_MAX_NAME_SIZE); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + device.id.bustype = BUS_USB; + device.id.version = 4; ++#else ++ device.idbus = BUS_USB; ++ device.idversion = 4; ++#endif + + ioctl(uinput_fd, UI_SET_EVBIT, EV_KEY); + diff --git a/utils/lcd4linux/patches/170-log2f.patch b/utils/lcd4linux/patches/170-log2f.patch new file mode 100644 index 0000000..8f6d861 --- /dev/null +++ b/utils/lcd4linux/patches/170-log2f.patch @@ -0,0 +1,11 @@ +--- a/plugin_netinfo.c ++++ b/plugin_netinfo.c +@@ -264,7 +264,7 @@ static void my_netmask_short(RESULT * re + sin = get_netmask(arg1); + if (NULL != sin) { + logval = (long double) (get_netmask(arg1)->sin_addr.s_addr); +- netlen = (int) rint(log2l(logval) / log2l(2.0)); ++ netlen = (int) rint(log2f(logval) / log2f(2.0)); + qprintf(value, sizeof(value), "/%d", netlen); + } else { + qprintf(value, sizeof(value), "/?"); diff --git a/utils/lcdproc/Makefile b/utils/lcdproc/Makefile new file mode 100644 index 0000000..d627ee2 --- /dev/null +++ b/utils/lcdproc/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=lcdproc +PKG_VERSION:=0.5.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/lcdproc +PKG_MD5SUM:=860f192d061d87dda6512b11b79daac2 + +include $(INCLUDE_DIR)/package.mk + + +define Package/lcdproc + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libusb +libncurses + TITLE:=LCD Display daemon and client + URL:=http://sourceforge.net/projects/lcdproc/ +endef + +define Package/lcdproc/description + LCDProc is a daemon and client for displaying system information on various displays. +endef + +define Package/lcdproc/conffiles +/etc/LCDd.conf +/etc/lcdproc.conf +/etc/lcdexec.conf +/etc/lcdvc.conf +endef + +define Build/Configure + $(call Build/Configure/Default,--enable-drivers=all) +endef + +define Package/lcdproc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_DIR) $(1)/usr/lib/lcdproc + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/LCDd $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdproc/lcdproc $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdexec/lcdexec $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/clients/lcdvc/lcdvc $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/server/drivers/*.so $(1)/usr/lib/lcdproc/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/LCDd.conf $(1)/etc/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdproc/lcdproc.conf $(1)/etc/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdexec/lcdexec.conf $(1)/etc/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/clients/lcdvc/lcdvc.conf $(1)/etc/ + $(INSTALL_BIN) ./files/* $(1)/etc/init.d +endef + +$(eval $(call BuildPackage,lcdproc)) diff --git a/utils/lcdproc/files/LCDd b/utils/lcdproc/files/LCDd new file mode 100755 index 0000000..5bec7bc --- /dev/null +++ b/utils/lcdproc/files/LCDd @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common + +START=50 + +start() { + LCDd -c /etc/LCDd.conf +} + +stop() { + killall LCDd +} diff --git a/utils/lcdproc/files/lcdexec b/utils/lcdproc/files/lcdexec new file mode 100755 index 0000000..0d5a3f3 --- /dev/null +++ b/utils/lcdproc/files/lcdexec @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common. + +START=50 + +start() { + lcdexec -c /etc/lcdexec.conf +} + +stop() { + killall lcdexec +} diff --git a/utils/lcdproc/files/lcdproc b/utils/lcdproc/files/lcdproc new file mode 100755 index 0000000..eb86134 --- /dev/null +++ b/utils/lcdproc/files/lcdproc @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common. + +START=50 + +start() { + lcdproc -c /etc/lcdproc.conf +} + +stop() { + killall lcdproc +} diff --git a/utils/lcdproc/files/lcdvc b/utils/lcdproc/files/lcdvc new file mode 100755 index 0000000..026fd04 --- /dev/null +++ b/utils/lcdproc/files/lcdvc @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common. + +START=50 + +start() { + lcdvc -c /etc/lcdvc.conf +} + +stop() { + killall lcdvc +} diff --git a/utils/less/Makefile b/utils/less/Makefile new file mode 100644 index 0000000..79abf54 --- /dev/null +++ b/utils/less/Makefile @@ -0,0 +1,37 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=less +PKG_VERSION:=436 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.greenwoodsoftware.com/less +PKG_MD5SUM:=817bf051953ad2dea825a1cdf460caa4 + +include $(INCLUDE_DIR)/package.mk + +define Package/less + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Pager program similar to more + DEPENDS:= +libncurses + URL:=http://www.greenwoodsoftware.com/less/ +endef + +define Package/less/description + Full version of GNU less utility +endef + +define Package/less/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/less $(1)/usr/bin/less +endef + +$(eval $(call BuildPackage,less)) diff --git a/utils/lilo/Makefile b/utils/lilo/Makefile new file mode 100644 index 0000000..35f6da5 --- /dev/null +++ b/utils/lilo/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lilo +PKG_VERSION:=22.8 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.gz +PKG_SOURCE_URL:=ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/ +PKG_MD5SUM:=72765f2aafd20e23ecf07ebd22baeec7 + +include $(INCLUDE_DIR)/package.mk + +define Package/lilo + SECTION:=base + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_x86 + TITLE:=lilo + URL:=ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/ +endef + +define Package/lilo/conffiles +/etc/lilo.conf +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(HOSTCC) -m32" \ + alles +endef + +define Package/lilo/install + $(INSTALL_DIR) $(1)/sbin + $(CP) $(PKG_BUILD_DIR)/lilo.static $(1)/sbin/lilo + $(INSTALL_DIR) $(1)/etc + $(CP) ./files/lilo.conf $(1)/etc/ + $(CP) ./files/boot.msg $(1)/etc/ +endef + +$(foreach command, as86 ld86, \ + $(eval $(call RequireCommand,$(command), \ + $(PKG_NAME) requires $(command). \ + )) \ +) + +$(eval $(call BuildPackage,lilo)) + diff --git a/utils/lilo/files/README b/utils/lilo/files/README new file mode 100644 index 0000000..1315e8b --- /dev/null +++ b/utils/lilo/files/README @@ -0,0 +1,35 @@ +Using this package to create a bootable usb stick for openwrt. + +The status of this package is currently 'it works for me', and it will +require more effort before it's generic across the board. Currently +only tested to be working on x86-2.6 using an initramfs image. +My development environment for this is a via epia with a +serial console (no monitors or keyboards attached). + +To create the images that are bootable, configure your buildroot to include +the lilo package in the image, as well as e2fsprogs. Have it create an +ext2 file system as the target file system. Let it build the works. + +When the build is finished, you will need to run the script 'mkbootable' +located in the lilo package directory, it requires root privileges to +loop mount the fs for installing lilo. When it's done, you have an +8 meg ext2fs root file system ready to run. + +To use the image, dd it directly onto a usb stick. It should go onto +/dev/sda not /dev/sda1, it's assuming the stick is not partitioned. +When you boot the stick, you will get a lilo menu on the serial terminal. +The three options allow you to boot with the stick itself as the root file +system, or, to boot into a ramdisk, and not mount the stick at all. The +stick will likely show up at /dev/disc + +Boot the unit, and select the ramdisk. Once up in the ramdisk, you can +use the e2fstools to expand the image to fill the stick and add a journal +to use it as ext3. + +e2fsck -f /dev/disc +tune2fs -j /dev/disc +resize2fs /dev/disc + +Reboot the box, and, have fun with openwrt on your x86 using the usb +stick to boot and run from. + diff --git a/utils/lilo/files/bdlilo.conf b/utils/lilo/files/bdlilo.conf new file mode 100644 index 0000000..cbb26d6 --- /dev/null +++ b/utils/lilo/files/bdlilo.conf @@ -0,0 +1,30 @@ +serial=0,115200n8 +boot =/dev/loop1 +disk =/dev/loop1 + bios =0x80 + sectors =63 + heads =255 + cylinders =999 +lba32 +compact +install =mount/boot/boot.b +map =mount/boot/map + +prompt +delay =1 +timeout =100 +message =mount/etc/boot.msg + + +image =mount/vmlinuz + label =openwrt + append =" rootfs=/dev/discs/disc0/disc console=ttyS0,115200n81 " + +image =mount/vmlinuz + label =ramdisk + append =" console=ttyS0,115200n81" + +image =mount/vmlinuz + label =failsafe + append =" FAILSAFE=MenuRequest console=ttyS0,115200n81" + diff --git a/utils/lilo/files/boot.msg b/utils/lilo/files/boot.msg new file mode 100644 index 0000000..a7c5119 --- /dev/null +++ b/utils/lilo/files/boot.msg @@ -0,0 +1,7 @@ + +Boot Options:- + +openwrt - OpenWrt with usb stick root +ramdisk - OpenWrt with ramdisk root +failsafe - OpenWrt failsafe + diff --git a/utils/lilo/files/lilo.conf b/utils/lilo/files/lilo.conf new file mode 100644 index 0000000..d4a769e --- /dev/null +++ b/utils/lilo/files/lilo.conf @@ -0,0 +1,26 @@ +serial=0,115200n8 +disk=/dev/discs/disc0/disc +bios=0x80 +lba32 +compact +install =/boot/boot.b +map =/boot/map +backup =/dev/null +prompt +delay =1 +timeout =100 +message =/etc/boot.msg + +image =/vmlinuz + label =openwrt + append =" rootfs=/dev/discs/disc0/disc console=ttyS0,115200n81 " + +image =/vmlinuz + label =ramdisk + append =" console=ttyS0,115200n81" + +image =/vmlinuz + label =failsafe + append =" FAILSAFE=MenuRequest console=ttyS0,115200n81" + + diff --git a/utils/lilo/files/mkbootable b/utils/lilo/files/mkbootable new file mode 100755 index 0000000..30ea2f1 --- /dev/null +++ b/utils/lilo/files/mkbootable @@ -0,0 +1,15 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +LOOPDEV="/dev/loop1" + +mkdir mount +cp bin/openwrt-x86-ext2.img bin/boot.img +sudo losetup $LOOPDEV bin/boot.img +sudo mount $LOOPDEV mount +sudo cp build_i386/linux/arch/i386/boot/bzImage mount/vmlinuz +sudo mkdir mount/boot +sudo build_i386/lilo-22.8/lilo -C package/lilo/bdlilo.conf +sudo umount mount +echo releasing $LOOPDEV +sudo losetup -d $LOOPDEV +rm -r -f mount diff --git a/utils/lirc/Makefile b/utils/lirc/Makefile new file mode 100644 index 0000000..5b71d15 --- /dev/null +++ b/utils/lirc/Makefile @@ -0,0 +1,143 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +# we use the $LINUX_DIR variable, which is defined in kernel.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=lirc +PKG_VERSION:=0.8.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/${PKG_NAME} +PKG_MD5SUM:=fb1dcddbc8ca3d03c7f3a2d40cf28b71 + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lirc/Default + SECTION:=utils + CATEGORY:=Utilities + URL:=http://lirc.org/ +endef + +define Package/lirc + $(call Package/lirc/Default) + TITLE:=LIRC - Linux Infrared Remote Control + DEPENDS:=@!LINUX_2_4 + MENU:=1 +endef + +define Package/lirc/description + LIRC is a package that allows you to decode and send + infra-red signals of many (but not all) commonly used + remote controls. + + This package contains only lircd and lircd.conf! + +tested drivers +-------------- +ok: +userspace,accent,act200l,act220l,adaptec,alsa_usb,animax,asusdh, +atilibusb,atiusb,audio_alsa,breakoutbox,bte,bw6130,cmdir,creative, +creative_infracd,devinput,digimatrix,dsp,dvico,ea65,exaudiohauppauge, +hauppauge_dvb,hercules_smarttv_stereo,i2cuser,igorplugusb,imon, +imon_24g,imon_knob,imon_pad,imon_rsc,irdeo,irdeo_remote,it87,knc_one, +leadtek_pvr2000,livedrive_midi,livedrive_seq,logitech,macmini,mceusb, +mceusb2,mediafocusI,mouseremote,mouseremote_ps2,mp3anywhere, +packard_bell,parallel,pcmak,pcmak_usb,pctv,pixelview_bt878,provideo, +realmagic,remotemaster,sasem,sb0540,serial,silitek,sir,streamzap,tekram, +tekram_bt829,tira,ttusbir,tuxbox,tvbox,udp,uirt2,uirt2_raw,usb_uirt_raw, +usbx,serial + +nok: +avermedia,avermedia_vdomate,avermedia98,bestbuy,bestbuy2,chronos,comX, +cph06x,flyvideo,gvbctv5pci,irreal,kworld,leadtek_0007,leadtek_0010,lptX, +nslu2,pixelview_pak,pixelview_pro,sa1100, + +unknown: +audio (no portaudio), caraca (no caraca package), iguanaIR (missing headers), +irman (no libirman) + +endef + + +define Package/lircdaemonadd + $(call Package/lirc/Default) + DEPENDS:=lirc + TITLE:=Daemon Additional Files +endef + +define Package/lircdaemonadd/description + Contains those additional daemon-tools: + -irrecord + -lircmd +endef + +define Package/lirctools + $(call Package/lirc/Default) + DEPENDS:=lirc + TITLE:=LIRC tools +endef + +define Package/lirctools/description + This package contains those lirc-tools: + -ircat: prints config strings to standard output, can be used to provide remote control input to scripts + -irexec: execute programs according to the pressed remote control buttons + -irpty: pseudo tty driver. Connects to lircd via socket to receive infra-red codes and converts them to key strokes + -irsend: application for sending IR-codes via lirc + -irw: watch the codes as lircd recognize them + -lircrcd: daemon that manages current mode for all applications + -mode2: shows the pulse/space length of a remote button +endef + +CONFIGURE_ARGS += \ + --disable-nls \ + --disable-static \ + --with-kerneldir="$(LINUX_DIR)" \ + --with-driver="mceusb" \ + --without-x \ + --with-pic \ + --with-gnu-ld \ + --enable-sandboxed + +define Package/lirc/conffiles +/etc/lircd.conf +endef + +MAKE_FLAGS += \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + ARCH="$(LINUX_KARCH)" + +define Package/lirc/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemons/lircd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/lircd.conf $(1)/etc/ +endef +#todo: +# $(CP) $(PKG_BUILD_DIR)/drivers/lirc_dev/lirc_dev.ko +# $(CP) $(PKG_BUILD_DIR)/drivers/lirc_mceusb2/lirc_mceusb2.ko +#depends on the selected module + +define Package/lircdaemonadd/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemons/{irrecord,lircmd} $(1)/usr/sbin/ +endef + +define Package/lirctools/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/irsend $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/irw $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/mode2 $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,lirc)) +$(eval $(call BuildPackage,lircdaemonadd)) +$(eval $(call BuildPackage,lirctools)) diff --git a/utils/lm-sensors/Makefile b/utils/lm-sensors/Makefile new file mode 100644 index 0000000..35d39fe --- /dev/null +++ b/utils/lm-sensors/Makefile @@ -0,0 +1,112 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lm-sensors +PKG_VERSION:=3.3.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=lm_sensors-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://dl.lm-sensors.org/lm-sensors/releases +PKG_MD5SUM:=5eb18d7531ead4f54f28a1133a606535 + +PKG_BUILD_DIR:=$(BUILD_DIR)/lm_sensors-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lm-sensors/Default + DEPENDS:=+sysfsutils + URL:=http://www.lm-sensors.org/ + MAINTAINER:=Luka Perkov +endef + +define Package/lm-sensors + $(call Package/lm-sensors/Default) + SECTION:=utils + CATEGORY:=Utilities + TITLE:=lm-sensors + DEPENDS+=+libsensors +endef + +define Package/lm-sensors-detect + $(call Package/lm-sensors/Default) + SECTION:=utils + CATEGORY:=Utilities + TITLE:=lm-sensors-detect + DEPENDS+=+lm-sensors +perl +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-xsloader +endef + +define Package/libsensors + $(call Package/lm-sensors/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE:=libsensors +endef + +define Package/lm-sensors/description + Utility to read hardware sensor data +endef + +define Package/lm-sensors-detect/description + Script to autodetect sensor hardware +endef + +define Package/libsensors/description + lm-sensors libraries +endef + +define Package/lm-sensors/conffiles +/etc/sensors.conf +endef + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + KERNELVERSION="$(LINUX_VERSION)" \ + LINUX="$(LINUX_DIR)" \ + CC="$(TARGET_CC)" \ + STAGING_DIR="$(STAGING_DIR)" \ + PREFIX="/usr" \ + MACHINE="$(ARCH)" \ + user +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/sensors + $(CP) \ + $(PKG_BUILD_DIR)/lib/sensors.h \ + $(1)/usr/include/sensors + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(PKG_BUILD_DIR)/lib/libsensors.{a,so*} \ + $(1)/usr/lib +endef + +define Package/lm-sensors/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/sensors/sensors $(1)/usr/sbin +ifeq ($(ARCH),i386) + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) ./files/sensors.conf $(1)/etc/sensors.conf +endif +endef + +define Package/lm-sensors-detect/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/detect/sensors-detect $(1)/usr/sbin +endef + +define Package/libsensors/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib +endef + +$(eval $(call BuildPackage,lm-sensors)) +$(eval $(call BuildPackage,lm-sensors-detect)) +$(eval $(call BuildPackage,libsensors)) diff --git a/utils/lm-sensors/files/sensors.conf b/utils/lm-sensors/files/sensors.conf new file mode 100644 index 0000000..505b9d9 --- /dev/null +++ b/utils/lm-sensors/files/sensors.conf @@ -0,0 +1,117 @@ +chip "pc87366-*" + +# Soekris net4801 configuration + +# Written by Henrik Brix Andersen +# Latest version can be found at http://www.brixandersen.dk/ + +# The configuration is partly based on the PC87366 datasheet and +# partly borrowed from the env4801 utility by Poul-Henning +# Kamp + +# Datasheet: http://www.winbond.com/PDF/APCsheet/PC87366.pdf +# env4801: http://phk.freebsd.dk/soekris/env4801/ + + +# Voltage inputs + ignore vid + + # Unknown + # label in0 "avi0" + ignore in0 + + + # Core Voltage, +2.0V + label in1 "VCORE" + set in1_min 1.9 + set in1_max 2.1 + + + # VCC, +5.0V + label in2 "VCC" + compute in2 @*2, @/2 + + + # Power Supply Input, +6.0V - +28.0V + label in3 "VPWR" + compute in3 @*20.1, @/20.1 + set in3_min 6.0 + set in3_max 28.0 + + + # +12V + label in4 "+12V" + compute in4 @*4.83, @/4.83 + set in4_min 11 + set in4_max 13 + + + # -12V + label in5 "-12V" + # If in10 on your net4801 doesn't have the 3.3V reference, use this + # compute line instead: + # compute in5 (@-3.3)*19.2+3.3, (@-3.3)/19.2+3.3 + compute in5 (@-in10)*19.2+in10, (@-in10)/19.2+in10 + set in5_min -13 + set in5_max -11 + + + # GND, 0V + label in6 "GND" + set in6_min 0 + set in6_max 0 + + + # Standby Voltage, +3.3V + # Internally divided by 2 + label in7 "Vsb" + compute in7 @*2, @/2 + set in7_min 3.0 + set in7_max 3.6 + + + # Supply Voltage, +3.3V + # Internally divided by 2 + label in8 "Vdd" + compute in8 @*2, @/2 + set in8_min 3.0 + set in8_max 3.6 + + + # Battery Backup Supply Voltage, +3.0V + label in9 "Vbat" + set in9_min 2.4 + set in9_max 3.6 + + + # Analog Supply Voltage, +3.3V + # Internally divided by 2 + label in10 "AVdd" + compute in10 @*2, @/2 + set in10_min 3.0 + set in10_max 3.6 + + +# Temperature inputs + ignore temp1 + ignore temp2 + + # PC87366 Internal Temperature + # PC87366 Recommended Operating Conditions: 0 - 70C + # SC1100 Recommended Operating Conditions: 0 - 85C + label temp3 "Temp" + label temp3_crit "Critical" + set temp3_min 0 + set temp3_max 70 + set temp3_crit 85 + + + ignore temp4 + ignore temp5 + ignore temp6 + + +# Fan inputs + ignore fan1 + ignore fan2 + ignore fan3 diff --git a/utils/logrotate/Makefile b/utils/logrotate/Makefile new file mode 100644 index 0000000..8585c95 --- /dev/null +++ b/utils/logrotate/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=logrotate +PKG_VERSION:=3.7.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz +PKG_SOURCE_URL:= \ + http://ftp.de.debian.org/debian/pool/main/l/logrotate \ + http://ftp.debian.org/debian/pool/main/l/logrotate \ + http://ftp.fr.debian.org/debian/pool/main/l/logrotate \ + http://ftp.us.debian.org/debian/pool/main/l/logrotate +PKG_MD5SUM:=b3589bea6d8d5afc8a84134fddaae973 + +include $(INCLUDE_DIR)/package.mk + +define Package/logrotate + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libpopt + TITLE:=rotates, compresses, and mails system logs + URL:=http://packages.debian.org/unstable/admin/logrotate +endef + +define Package/logrotate/description + logrotate is designed to ease administration of systems that generate + large numbers of log files. It allows auto-matic rotation, compression, + removal and mailing of log files. Each log file may be handled daily, + weekly, monthly or when it grows too large. +endef + +define Package/logrotate/conffiles +/etc/logrotate.conf +endef + +EXTRA_CFLAGS += $(TARGET_CPPFLAGS) +EXTRA_LDFLAGS += $(TARGET_LDFLAGS) + +define Build/Compile + $(call Build/Compile/Default, \ + RPM_OPT_FLAGS:="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + LDFLAGS="$(EXTRA_LDFLAGS)" \ + logrotate \ + ) +endef + +define Package/logrotate/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/logrotate.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/logrotate.d +endef + +$(eval $(call BuildPackage,logrotate)) diff --git a/utils/logrotate/files/logrotate.conf b/utils/logrotate/files/logrotate.conf new file mode 100644 index 0000000..9a91db9 --- /dev/null +++ b/utils/logrotate/files/logrotate.conf @@ -0,0 +1,30 @@ +# rotate log files weekly +weekly +#daily + +# keep 4 weeks worth of backlogs +rotate 4 + +# create new (empty) log files after rotating old ones +create + +notifempty +nomail +#olddir /var/log/backup/ +missingok +#dateext + +# uncomment this if you want your log files compressed +#compress + +# packages can drop log rotation information into this directory +include /etc/logrotate.d + +# no packages own lastlog or wtmp -- we'll rotate them here +#/var/log/wtmp { +# monthly +# create 0664 root utmp +# rotate 1 +#} + +# system-specific logs may be also be configured here. diff --git a/utils/logrotate/patches/002-datehack.patch b/utils/logrotate/patches/002-datehack.patch new file mode 100644 index 0000000..ffb6c8d --- /dev/null +++ b/utils/logrotate/patches/002-datehack.patch @@ -0,0 +1,11 @@ +--- a/logrotate.c ++++ b/logrotate.c +@@ -1505,7 +1505,7 @@ static int readState(char *stateFilename + } + + /* Hack to hide earlier bug */ +- if ((year != 1900) && (year < 1996 || year > 2100)) { ++ if ((year != 1900) && (year < 1970 || year > 2100)) { + message(MESS_ERROR, + "bad year %d for file %s in state file %s\n", year, + argv[0], stateFilename); diff --git a/utils/logrotate/patches/003-ignore_hidden.patch b/utils/logrotate/patches/003-ignore_hidden.patch new file mode 100644 index 0000000..7ca5392 --- /dev/null +++ b/utils/logrotate/patches/003-ignore_hidden.patch @@ -0,0 +1,14 @@ +--- a/config.c ++++ b/config.c +@@ -160,8 +160,9 @@ static int checkFile(const char *fname) + int i; + char pattern[PATH_MAX]; + +- /* Check if fname is '.' or '..'; if so, return false */ +- if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2]))) ++ /* Don't include 'hidden' files either; this breaks Gentoo ++ portage config file management http://bugs.gentoo.org/87683 */ ++ if (fname[0] == '.') + return 0; + + /* Check if fname is ending in a taboo-extension; if so, return false */ diff --git a/utils/logrotate/patches/006-weekly.patch b/utils/logrotate/patches/006-weekly.patch new file mode 100644 index 0000000..a861604 --- /dev/null +++ b/utils/logrotate/patches/006-weekly.patch @@ -0,0 +1,18 @@ +--- a/logrotate.c ++++ b/logrotate.c +@@ -567,9 +567,14 @@ int findNeedRotating(struct logInfo *log + /* rotate if: + 1) the current weekday is before the weekday of the + last rotation ++ 1) the day of the week is the same as the day of the week of ++ the previous rotation but not the same day of the year ++ this will rotate it on the same day every week, but not ++ twice a day. + 2) more then a week has passed since the last + rotation */ +- state->doRotate = ((now.tm_wday < state->lastRotated.tm_wday) ++ state->doRotate = ((now.tm_wday == state->lastRotated.tm_wday ++ && now.tm_yday != state->lastRotated.tm_yday) + || + ((mktime(&now) - + mktime(&state->lastRotated)) > diff --git a/utils/loop-aes/Makefile b/utils/loop-aes/Makefile new file mode 100644 index 0000000..709619c --- /dev/null +++ b/utils/loop-aes/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=loop-aes +PKG_VERSION:=3.6c +PKG_RELEASE:=1 + +PKG_SOURCE:=loop-AES-v$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=a030eb9af42e167d11434e2475187f00 + +PKG_BUILD_DIR:=$(BUILD_DIR)/loop-AES-v$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/loop-aes + SUBMENU:=Cryptographic API modules + DEPENDS:=@!PACKAGE_kmod-loop + TITLE:=loopback module with built-in AES + FILES:=$(PKG_BUILD_DIR)/loop.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,30,loop) + URL:=http://loop-aes.sourceforge.net +endef + +define KernelPackage/loop-aes/description + This package provides loadable Linux kernel module (loop.o or loop.ko on 2.6 + kernels) that has AES cipher built-in. The AES cipher can be used to encrypt + local file systems and disk partitions. +endef + +define Build/Compile + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + CC="$(TARGET_CC)" \ + CPP="$(TARGET_CC)" \ + LD="$(TARGET_CROSS)ld" \ + LINUX_SOURCE="$(LINUX_DIR)" \ + KR="$(LINUX_DIR)" \ + MODINST="n" \ + all +endef + +$(eval $(call KernelPackage,loop-aes)) diff --git a/utils/loop-aes/patches/001-no_sync.patch b/utils/loop-aes/patches/001-no_sync.patch new file mode 100644 index 0000000..e01b9b2 --- /dev/null +++ b/utils/loop-aes/patches/001-no_sync.patch @@ -0,0 +1,13 @@ +--- a/Makefile ++++ b/Makefile +@@ -208,10 +208,8 @@ endif + ifeq ($(EXTRA_CIPHERS),y) + ln -s tmp-d-kbuild/loop_twofish.ko tmp-d-kbuild/loop_serpent.ko tmp-d-kbuild/loop_blowfish.ko . + endif +- sync + else + cd $(LS) && make SUBDIRS=$(TD) modules +- sync + endif + + # 2.6 kernels older than 2.6.17 do not run depmod in "modules_install" stage, diff --git a/utils/lrzsz/Makefile b/utils/lrzsz/Makefile new file mode 100644 index 0000000..6e93bad --- /dev/null +++ b/utils/lrzsz/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=lrzsz +PKG_VERSION:=0.12.20 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.ohse.de/uwe/releases/ +PKG_MD5SUM:=b5ce6a74abc9b9eb2af94dffdfd372a4 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/lrzsz + SECTION:=utils + CATEGORY:=Utilities + TITLE:=X,Y and Z-modem protocols + URL:=http://www.ohse.de/uwe/software/lrzsz.html +endef + +define Package/lrzsz/description + Transfer files in your login sessions. + Very leightweight and straight forward. + You just need a terminal client that can do + either X, Y or Z-modem file transfers. +endef + +# uses GNU configure + +define Package/lrzsz/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lrz $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsz $(1)/usr/bin/ + (cd $(1)/usr/bin; \ + ln -fs lrz lrx; \ + ln -fs lrz lrb; \ + ln -fs lsz lsx; \ + ln -fs lsz lsb; \ + ); +endef + +$(eval $(call BuildPackage,lrzsz)) diff --git a/utils/lrzsz/patches/100-install_delete_fix.patch b/utils/lrzsz/patches/100-install_delete_fix.patch new file mode 100644 index 0000000..edd0e89 --- /dev/null +++ b/utils/lrzsz/patches/100-install_delete_fix.patch @@ -0,0 +1,20 @@ +diff -ur lrzsz.old/src/Makefile.in lrzsz.dev/src/Makefile.in +--- lrzsz.old/src/Makefile.in 1998-12-30 17:31:46.000000000 +0100 ++++ lrzsz.dev/src/Makefile.in 2006-08-20 19:10:09.000000000 +0200 +@@ -372,13 +372,13 @@ + rm -f $(DESTDIR)/$(bindir)/`echo lsb | sed -e '$(transform)'` + ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \ + $(DESTDIR)/$(bindir)/`echo lsb |sed -e '$(transform)'` +- rm -f $(bindir)/`echo lsx | sed -e '$(transform)'` ++ rm -f $(DESTDIR)/$(bindir)/`echo lsx | sed -e '$(transform)'` + ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \ + $(DESTDIR)/$(bindir)/`echo lsx |sed -e '$(transform)'` +- rm -f $(bindir)/`echo lrb | sed -e '$(transform)'` ++ rm -f $(DESTDIR)/$(bindir)/`echo lrb | sed -e '$(transform)'` + ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \ + $(DESTDIR)/$(bindir)/`echo lrb |sed -e '$(transform)'` +- rm -f $(bindir)/`echo lrx | sed -e '$(transform)'` ++ rm -f $(DESTDIR)/$(bindir)/`echo lrx | sed -e '$(transform)'` + ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \ + $(DESTDIR)/$(bindir)/`echo lrx |sed -e '$(transform)'` + # rm -f $(bindir)/`echo lrzszbug | sed -e '$(transform)'` diff --git a/utils/lsof/Makefile b/utils/lsof/Makefile new file mode 100644 index 0000000..aad4730 --- /dev/null +++ b/utils/lsof/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=lsof +PKG_VERSION:=4.81 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).dfsg.1.orig.tar.gz +PKG_SOURCE_URL:=http://ftp2.de.debian.org/debian/pool/main/l/lsof +PKG_MD5SUM:=138b628cb1b6a3b16b32b792f77abcce + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).dfsg.1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include +TARGET_LDFLAGS += $(LIBRPC) + +define Package/lsof + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=$(LIBRPC_DEPENDS) + TITLE:=LiSt Open Files - a diagnostic tool + URL:=http://people.freebsd.org/~abe/ +endef + +define Build/Configure + cd $(PKG_BUILD_DIR); \ + LINUX_CLIB="-DGLIBCV=2" \ + LSOF_CC="$(TARGET_CC)" \ + LSOF_VSTR="$(LINUX_VERSION)" \ + ./Configure -n linux +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + AR="$(TARGET_CROSS)ar cr" \ + RANLIB="$(TARGET_CROSS)ranlib" \ + DEBUG="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef + +define Package/lsof/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lsof $(1)/usr/bin +endef + +$(eval $(call BuildPackage,lsof)) diff --git a/utils/lsof/patches/001-lsof_makefile.patch b/utils/lsof/patches/001-lsof_makefile.patch new file mode 100644 index 0000000..acd636a --- /dev/null +++ b/utils/lsof/patches/001-lsof_makefile.patch @@ -0,0 +1,14 @@ +diff -ru lsof_4.77.orig/lsof_4.77_src/lib/Makefile.skel lsof_4.77/lsof_4.77_src/lib/Makefile.skel +--- lsof_4.77.orig/lib/Makefile.skel 2001-02-13 03:12:22.000000000 +0100 ++++ lsof_4.77/lib/Makefile.skel 2006-11-29 13:51:44.000000000 +0100 +@@ -21,8 +21,8 @@ + all: ${LIB} + + ${LIB}: ${OBJ} +- ${AR} +- ${RANLIB} ++ ${AR} ${LIB} ${OBJ} ++ ${RANLIB} ${LIB} + + clean: FRC + rm -f ${LIB} ${OBJ} errs Makefile.bak a.out core diff --git a/utils/lsof/patches/002-lsof_noportmap.patch b/utils/lsof/patches/002-lsof_noportmap.patch new file mode 100644 index 0000000..5f0c17e --- /dev/null +++ b/utils/lsof/patches/002-lsof_noportmap.patch @@ -0,0 +1,18 @@ +--- lsof_4.77/print.orig.c 2006-08-23 13:37:43.000000000 -0600 ++++ lsof_4.77/print.c 2006-08-23 13:38:29.000000000 -0600 +@@ -148,6 +148,7 @@ + static void + fill_portmap() + { ++#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_RPC__) + char buf[128], *cp, *nm; + CLIENT *c; + int h, port, pr; +@@ -266,6 +267,7 @@ + Pth[pr][h] = pt; + } + clnt_destroy(c); ++#endif + } + + diff --git a/utils/lsof/patches/003-lsof_uclibc.patch b/utils/lsof/patches/003-lsof_uclibc.patch new file mode 100644 index 0000000..e53e37b --- /dev/null +++ b/utils/lsof/patches/003-lsof_uclibc.patch @@ -0,0 +1,12 @@ +diff -ru lsof_4.77.orig/lsof_4.77_src/dialects/linux/dlsof.h lsof_4.77/lsof_4.77_src/dialects/linux/dlsof.h +--- lsof_4.77.orig/dialects/linux/dlsof.h 2006-03-28 00:57:14.000000000 +0200 ++++ lsof_4.77/dialects/linux/dlsof.h 2006-11-29 14:03:07.000000000 +0100 +@@ -49,7 +49,7 @@ + #include + #include + +-# if defined(GLIBCV) ++# if defined(GLIBCV) || defined __UCLIBC__ + #include + # else /* !defined(GLIBCV) */ + #include diff --git a/utils/lsof/patches/004-lsof_selinux.patch b/utils/lsof/patches/004-lsof_selinux.patch new file mode 100644 index 0000000..8188b38 --- /dev/null +++ b/utils/lsof/patches/004-lsof_selinux.patch @@ -0,0 +1,12 @@ +diff -Naur lsof-4.81.dfsg.1.orig/Configure lsof-4.81.dfsg.1/Configure +--- lsof-4.81.dfsg.1.orig/Configure 2009-04-20 03:03:28.863704499 -0400 ++++ lsof-4.81.dfsg.1/Configure 2009-04-20 03:05:58.467696265 -0400 +@@ -2646,7 +2646,7 @@ + LSOF_TMP1=1 + fi # } + fi # } +- if test $LSOF_TMP1 -eq 1 # { ++ if 0 -eq 1 # { + then + LSOF_CFGF="$LSOF_CFGF -DHASSELINUX" + LSOF_CFGL="$LSOF_CFGL -lselinux" diff --git a/utils/lsof/patches/005-lsof_ccv.patch b/utils/lsof/patches/005-lsof_ccv.patch new file mode 100644 index 0000000..11d8820 --- /dev/null +++ b/utils/lsof/patches/005-lsof_ccv.patch @@ -0,0 +1,12 @@ +--- a/Configure ++++ b/Configure +@@ -2547,6 +2547,9 @@ + if test "X$LSOF_CC" = "X" # { + then + LSOF_CC=cc ++ fi # } ++ if test "X$LSOF_CCV" = "X" # { ++ then + LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'` + fi # } + LSOF_DIALECT_DIR="" diff --git a/utils/lvm2/Makefile b/utils/lvm2/Makefile new file mode 100644 index 0000000..468cb9f --- /dev/null +++ b/utils/lvm2/Makefile @@ -0,0 +1,89 @@ +# +# Copyright (C) 2009, 2010 Stefan Monnier +# Copyright (C) 2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v3+. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=LVM2 +PKG_VERSION:=2.02.86 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz +PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2 +PKG_MD5SUM:=3b42dec4d15ad106302a35149082a20e +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/libdevmapper + SECTION:=libs + CATEGORY:=Libraries + TITLE:=The Linux Kernel Device Mapper userspace library + URL:=http://sourceware.org/dm/ + DEPENDS:=+kmod-dm + MAINTAINER:=Luka Perkov +endef + +define Package/libdevmapper/description + The device-mapper is a component of the 2.6 linux kernel that supports logical + volume management. It is required by LVM2 and EVMS. +endef + +define Package/lvm2 + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=disc + TITLE:=The Linux Logical Volume Manager + URL:=http://sourceware.org/lvm2/ + DEPENDS:=+libdevmapper +libreadline +libncurses + MAINTAINER:=Luka Perkov +endef + +define Package/lvm2/description + LVM2 refers to a new userspace toolset that provide logical volume management + facilities on linux. It is reasonably backwards-compatible with the original + LVM toolset. +endef + +CONFIGURE_ARGS += --disable-o_direct + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libdevmapper.h $(1)/usr/include + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so* $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_BUILD_DIR)/libdm/libdevmapper.pc $(1)/usr/lib/pkgconfig +endef + +define Package/libdevmapper/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib +endef + +define Package/lvm2/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/lvm $(1)/sbin + $(INSTALL_DIR) $(1)/etc/lvm + $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/example.conf $(1)/etc/lvm/lvm.conf + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/lvm2.init $(1)/etc/init.d/lvm2 +endef + +define Package/lvm2/conffiles +/etc/lvm/lvm.conf +endef + +$(eval $(call BuildPackage,libdevmapper)) +$(eval $(call BuildPackage,lvm2)) diff --git a/utils/lvm2/files/lvm2.init b/utils/lvm2/files/lvm2.init new file mode 100644 index 0000000..3b542d0 --- /dev/null +++ b/utils/lvm2/files/lvm2.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009 Stefan Monnier +START=15 + +start () { + /sbin/lvm vgscan --ignorelockingfailure --mknodes || : + /sbin/lvm vgchange -aly --ignorelockingfailure || return 2 +} + +stop () { + /sbin/lvm vgchange -aln --ignorelockingfailure || return 2 +} diff --git a/utils/lvm2/patches/100-cross_compile.patch b/utils/lvm2/patches/100-cross_compile.patch new file mode 100644 index 0000000..cd75666 --- /dev/null +++ b/utils/lvm2/patches/100-cross_compile.patch @@ -0,0 +1,11 @@ +--- LVM2.2.02.84/make.tmpl.in 2011-04-11 16:00:37.430840340 +0200 ++++ LVM2.2.02.84/make.tmpl.in 2011-04-11 16:00:54.399401160 +0200 +@@ -17,7 +17,7 @@ + + @SET_MAKE@ + +-CC ?= @CC@ ++CC = @CC@ + RANLIB = @RANLIB@ + INSTALL = @INSTALL@ + MKDIR_P = @MKDIR_P@ diff --git a/utils/macchanger/Makefile b/utils/macchanger/Makefile new file mode 100644 index 0000000..acd3bc9 --- /dev/null +++ b/utils/macchanger/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=macchanger +PKG_VERSION:=1.5.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@GNU/macchanger +PKG_MD5SUM:=79b7cdaeca3d8ebafa764c4b0dd03ab7 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/macchanger + SECTION:=utils + CATEGORY:=Utilities + TITLE:=utility for viewing/manipulating the MAC address + URL:=http://www.alobbs.com/macchanger +endef + +define Package/macchanger/description + This is a GNU/Linux utility for viewing/manipulating the MAC address + of network interfaces. +endef + +define Package/macchanger/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/macchanger $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share + $(CP) $(PKG_INSTALL_DIR)/usr/share/macchanger $(1)/usr/share/ +endef + +$(eval $(call BuildPackage,macchanger)) diff --git a/utils/maemo-kexec/Config.in b/utils/maemo-kexec/Config.in new file mode 100644 index 0000000..74c8c86 --- /dev/null +++ b/utils/maemo-kexec/Config.in @@ -0,0 +1,20 @@ +config MAEMO_KEXEC_DOWNLOAD_KERNEL + bool "Download latest Maemo kernel" + default y + depends on PACKAGE_maemo-kexec + +config MAEMO_KEXEC_KERNEL_PATH + string + prompt "Path to the Maemo kernel image" + default "PLEASE_CONFIGURE_MAEMO_ZIMAGE" + depends on PACKAGE_maemo-kexec && !MAEMO_KEXEC_DOWNLOAD_KERNEL + help + Defines the path to the Maemo kernel zImage. + + The image can be extracted from the Fiasco firmware image. + Use the proprietary flasher to extract the image. The + opensource tool "0xFFFF" is not able to extract the zImage correctly. + + The zImage defined here will be included in the OpenWrt rootfs + for kexec-ing of the Maemo operating system. The Maemo rootfs + has to be installed on the n810's "rootfs" MTD partition (MTD4). diff --git a/utils/maemo-kexec/Makefile b/utils/maemo-kexec/Makefile new file mode 100644 index 0000000..3f31c97 --- /dev/null +++ b/utils/maemo-kexec/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=maemo-kexec +PKG_VERSION:=1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=maemo-rx44-2008.43-7.kernel +PKG_SOURCE_URL:=http://bu3sch.de/misc/ +PKG_MD5SUM:=3cbf571c0618bfe20a69babab6b33bea +UNPACK_CMD=$(CP) $(DL_DIR)/$(PKG_SOURCE) $(PKG_BUILD_DIR)/ + +PKG_CONFIG_DEPENDS:= \ + CONFIG_MAEMO_KEXEC_DOWNLOAD_KERNEL \ + CONFIG_MAEMO_KEXEC_KERNEL_PATH + +include $(INCLUDE_DIR)/package.mk + +define Package/maemo-kexec + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@TARGET_omap24xx +kexec-tools + TITLE:=Kexec Maemo from OpenWRT +endef + +define Package/maemo-kexec/description + Kexec Maemo from OpenWRT. + The Maemo rootfs must be in the rootfs MTD partition. +endef + +define Package/maemo-kexec/config + source "$(SOURCE)/Config.in" +endef + +define Build/Configure +endef + +define Build/Compile +endef + +MAEMO_KRNL_SRC:=$(if $(CONFIG_MAEMO_KEXEC_DOWNLOAD_KERNEL),\ + $(PKG_BUILD_DIR)/$(PKG_SOURCE),\ + $(CONFIG_MAEMO_KEXEC_KERNEL_PATH)) + +define Package/maemo-kexec/install + $(INSTALL_DIR) $(1)/boot $(1)/sbin + $(INSTALL_BIN) ./files/sbin/bootmaemo $(1)/sbin/ + $(INSTALL_DATA) $(MAEMO_KRNL_SRC) $(1)/boot/maemo.zImage +endef + +$(eval $(call BuildPackage,maemo-kexec)) diff --git a/utils/maemo-kexec/files/sbin/bootmaemo b/utils/maemo-kexec/files/sbin/bootmaemo new file mode 100755 index 0000000..14f85b1 --- /dev/null +++ b/utils/maemo-kexec/files/sbin/bootmaemo @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +sync + +killall -q watchdog || true +echo 1 >/dev/watchdog + +/usr/sbin/kexec --load /boot/maemo.zImage --append "root=1f03 rootfstype=jffs2 ro console=tty0 console=ttyMTD5" +/usr/sbin/kexec --exec diff --git a/utils/mc/Makefile b/utils/mc/Makefile new file mode 100644 index 0000000..81cf9fe --- /dev/null +++ b/utils/mc/Makefile @@ -0,0 +1,74 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mc +PKG_VERSION:=4.7.5.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.midnight-commander.org/downloads/ +PKG_MD5SUM:=9fdfe7c0fcff362436eb35fcd1adf0fd + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/mc + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+glib2 +libncurses +libiconv + TITLE:=midnight commander - a powerful file manager + URL:=http://www.midnight-commander.org/ + SUBMENU:=filemanager + MAINTAINER:=Luka Perkov +endef + +define Package/mc/description + GNU Midnight Commander is a visual file manager, licensed under GNU General + Public License and therefore qualifies as Free Software. It's a feature rich + full-screen text mode application that allows you to copy, move and delete + files and whole directory trees, search for files and run commands in the + subshell. +endef + +CONFIGURE_ARGS += \ + --enable-utf8 \ + --disable-vfs \ + --with-screen=ncurses \ + --without-edit \ + --without-gpm-mouse \ + --without-subshell \ + --without-x + +AM_HOST=$(firstword $(wildcard $(STAGING_DIR_HOST)/share/automake-*)) + +define Build/Prepare + $(Build/Prepare/Default) + for script in config.guess config.sub depcomp install-sh missing; do \ + rm -f $(PKG_BUILD_DIR)/config/$$$$script; \ + ln -s $(AM_HOST)/$$$$script $(PKG_BUILD_DIR)/config/$$$$script; \ + done +endef + +define Package/mc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/mc + $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc + $(INSTALL_DIR) $(1)/etc/mc/skins + $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/skins/default.ini $(1)/etc/mc/skins +endef + +define Package/mc/conffiles +/etc/mc/mc.menu +/etc/mc/skins/default.ini +endef + +$(eval $(call BuildPackage,mc)) diff --git a/utils/mdadm/Makefile b/utils/mdadm/Makefile new file mode 100644 index 0000000..1488f7a --- /dev/null +++ b/utils/mdadm/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mdadm +PKG_VERSION:=3.2 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=4ac70ccead74f947bf5aa4d189a977a0 + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/mdadm + SECTION:=utils + CATEGORY:=Utilities + TITLE:=A tool for managing Soft RAID under Linux + URL:=http://www.kernel.org/pub/linux/utils/raid/mdadm/ + DEPENDS:=@!LINUX_2_4 + MAINTAINER:=Luka Perkov +endef + +define Package/mdadm/description + A tool for managing Linux Software RAID arrays. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -DUCLIBC -DHAVE_STDINT_H" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + mdadm mdassemble +endef + +define Package/mdadm/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mdadm $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mdassemble $(1)/sbin +endef + +$(eval $(call BuildPackage,mdadm)) diff --git a/utils/mdadm/patches/100-cross_compile.patch b/utils/mdadm/patches/100-cross_compile.patch new file mode 100644 index 0000000..5861263 --- /dev/null +++ b/utils/mdadm/patches/100-cross_compile.patch @@ -0,0 +1,19 @@ +--- a/Makefile ++++ b/Makefile +@@ -76,7 +76,6 @@ FAILED_SLOTS_DIR = /dev/.mdadm/failed-sl + DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\" + DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\" + DIRFLAGS += -DFAILED_SLOTS_DIR=\"$(FAILED_SLOTS_DIR)\" +-CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(DIRFLAGS) + + # The glibc TLS ABI requires applications that call clone(2) to set up + # TLS data structures, use pthreads until mdmon implements this support +@@ -184,7 +183,7 @@ test_stripe : restripe.c mdadm.h + + mdassemble : $(ASSEMBLE_SRCS) $(INCL) + rm -f $(OBJS) +- $(DIET_GCC) $(ASSEMBLE_FLAGS) -o mdassemble $(ASSEMBLE_SRCS) $(STATICSRC) ++ $(CC) $(ASSEMBLE_FLAGS) -o mdassemble $(ASSEMBLE_SRCS) $(STATICSRC) + + mdassemble.static : $(ASSEMBLE_SRCS) $(INCL) + rm -f $(OBJS) diff --git a/utils/mdadm/patches/200-uclibc_0.9.30_compat.patch b/utils/mdadm/patches/200-uclibc_0.9.30_compat.patch new file mode 100644 index 0000000..a6fb5bd --- /dev/null +++ b/utils/mdadm/patches/200-uclibc_0.9.30_compat.patch @@ -0,0 +1,40 @@ +--- a/mdadm.h ++++ b/mdadm.h +@@ -33,6 +33,37 @@ extern __off64_t lseek64 __P ((int __fd, + # endif + #endif + ++#ifdef UCLIBC ++# include ++# if __UCLIBC_MINOR__ <= 9 && __UCLIBC_SUBLEVEL__ <= 30 ++ ++#include ++void *memalign(size_t blocksize, size_t bytes); ++static inline int posix_memalign(void **memptr, size_t alignment, size_t size) ++{ ++ if (alignment % sizeof(void *) != 0) ++ return EINVAL; ++ ++ *memptr = memalign(alignment, size); ++ return (*memptr != NULL ? 0 : ENOMEM); ++} ++ ++#include ++char *strdup(const char *s); ++char *realpath(const char *path, char *resolved_path); ++static inline char *canonicalize_file_name(const char *path) ++{ ++ char resolved[PATH_MAX] = { 0 }; ++ ++ if (!realpath(path, resolved)) ++ return NULL; ++ ++ return strdup(resolved); ++} ++ ++# endif /* __UCLIBC_MINOR__ <= 9 && __UCLIBC_SUBLEVEL__ <= 30 */ ++#endif /* UCLIBC */ ++ + #include + #include + #include diff --git a/utils/memtester/Makefile b/utils/memtester/Makefile new file mode 100644 index 0000000..132ada2 --- /dev/null +++ b/utils/memtester/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=memtester +PKG_VERSION:=4.1.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://pyropus.ca/software/memtester/old-versions/ +PKG_MD5SUM:=e562451620cf5343016950462bc0dc38 + +include $(INCLUDE_DIR)/package.mk + +define Package/memtester + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Userspace utility for testing the memory subsystem for faults + URL:=http://pyropus.ca/software/memtester/ +endef + +define Package/memtester/description + A userspace utility for testing the memory subsystem for faults. +endef + +define Build/Configure + $(SED) 's,cc -O2,$(TARGET_CC) $(TARGET_CFLAGS),' $(PKG_BUILD_DIR)/conf-cc + $(SED) "s,cc,$(TARGET_CC)," $(PKG_BUILD_DIR)/conf-ld +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) all +endef + +define Package/memtester/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/memtester $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,memtester)) diff --git a/utils/memtester/patches/100-quiet.diff b/utils/memtester/patches/100-quiet.diff new file mode 100644 index 0000000..ebfba69 --- /dev/null +++ b/utils/memtester/patches/100-quiet.diff @@ -0,0 +1,331 @@ +--- a/memtester.c ++++ b/memtester.c +@@ -123,7 +123,7 @@ int main(int argc, char **argv) { + pagesizemask = (ptrdiff_t) ~(pagesize - 1); + printf("pagesizemask is 0x%tx\n", pagesizemask); + +- while ((opt = getopt(argc, argv, "p:")) != -1) { ++ while ((opt = getopt(argc, argv, "qp:")) != -1) { + switch (opt) { + case 'p': + errno = 0; +@@ -150,6 +150,9 @@ int main(int argc, char **argv) { + /* okay, got address */ + use_phys = 1; + break; ++ case 'q': ++ quiet = 1; ++ break; + default: /* '?' */ + usage(argv[0]); /* doesn't return */ + } +--- a/tests.c ++++ b/tests.c +@@ -17,12 +17,23 @@ + #include + #include + #include ++#include + + #include "types.h" + #include "sizes.h" + #include "memtester.h" + ++int quiet = 0; + char progress[] = "-\\|/"; ++ ++void inline dprintf(const char *format, ...) { ++ if(!quiet) { ++ va_list ap; ++ va_start(ap, format); ++ vprintf(format, ap); ++ } ++} ++ + #define PROGRESSLEN 4 + #define PROGRESSOFTEN 2500 + #define ONE 0x00000001L +@@ -65,16 +76,16 @@ int test_stuck_address(ulv *bufa, size_t + printf(" "); + fflush(stdout); + for (j = 0; j < 16; j++) { +- printf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); + p1 = (ulv *) bufa; +- printf("setting %3u", j); ++ dprintf("setting %3u", j); + fflush(stdout); + for (i = 0; i < count; i++) { + *p1 = ((j + i) % 2) == 0 ? (ul) p1 : ~((ul) p1); + *p1++; + } +- printf("\b\b\b\b\b\b\b\b\b\b\b"); +- printf("testing %3u", j); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("testing %3u", j); + fflush(stdout); + p1 = (ulv *) bufa; + for (i = 0; i < count; i++, p1++) { +@@ -97,7 +108,7 @@ int test_stuck_address(ulv *bufa, size_t + } + } + } +- printf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); + fflush(stdout); + return 0; + } +@@ -112,13 +123,13 @@ int test_random_value(ulv *bufa, ulv *bu + fflush(stdout); + for (i = 0; i < count; i++) { + *p1++ = *p2++ = rand_ul(); +- if (!(i % PROGRESSOFTEN)) { ++ if (!quiet && !(i % PROGRESSOFTEN)) { + putchar('\b'); + putchar(progress[++j % PROGRESSLEN]); + fflush(stdout); + } + } +- printf("\b \b"); ++ dprintf("\b \b"); + fflush(stdout); + return compare_regions(bufa, bufb, count); + } +@@ -226,23 +237,23 @@ int test_solidbits_comparison(ulv *bufa, + printf(" "); + fflush(stdout); + for (j = 0; j < 64; j++) { +- printf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); + q = (j % 2) == 0 ? UL_ONEBITS : 0; +- printf("setting %3u", j); ++ dprintf("setting %3u", j); + fflush(stdout); + p1 = (ulv *) bufa; + p2 = (ulv *) bufb; + for (i = 0; i < count; i++) { + *p1++ = *p2++ = (i % 2) == 0 ? q : ~q; + } +- printf("\b\b\b\b\b\b\b\b\b\b\b"); +- printf("testing %3u", j); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("testing %3u", j); + fflush(stdout); + if (compare_regions(bufa, bufb, count)) { + return -1; + } + } +- printf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); + fflush(stdout); + return 0; + } +@@ -257,23 +268,23 @@ int test_checkerboard_comparison(ulv *bu + printf(" "); + fflush(stdout); + for (j = 0; j < 64; j++) { +- printf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); + q = (j % 2) == 0 ? CHECKERBOARD1 : CHECKERBOARD2; +- printf("setting %3u", j); ++ dprintf("setting %3u", j); + fflush(stdout); + p1 = (ulv *) bufa; + p2 = (ulv *) bufb; + for (i = 0; i < count; i++) { + *p1++ = *p2++ = (i % 2) == 0 ? q : ~q; + } +- printf("\b\b\b\b\b\b\b\b\b\b\b"); +- printf("testing %3u", j); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("testing %3u", j); + fflush(stdout); + if (compare_regions(bufa, bufb, count)) { + return -1; + } + } +- printf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); + fflush(stdout); + return 0; + } +@@ -284,25 +295,25 @@ int test_blockseq_comparison(ulv *bufa, + unsigned int j; + size_t i; + +- printf(" "); ++ dprintf(" "); + fflush(stdout); + for (j = 0; j < 256; j++) { +- printf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); + p1 = (ulv *) bufa; + p2 = (ulv *) bufb; +- printf("setting %3u", j); ++ dprintf("setting %3u", j); + fflush(stdout); + for (i = 0; i < count; i++) { + *p1++ = *p2++ = (ul) UL_BYTE(j); + } +- printf("\b\b\b\b\b\b\b\b\b\b\b"); +- printf("testing %3u", j); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("testing %3u", j); + fflush(stdout); + if (compare_regions(bufa, bufb, count)) { + return -1; + } + } +- printf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); + fflush(stdout); + return 0; + } +@@ -316,10 +327,10 @@ int test_walkbits0_comparison(ulv *bufa, + printf(" "); + fflush(stdout); + for (j = 0; j < UL_LEN * 2; j++) { +- printf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); + p1 = (ulv *) bufa; + p2 = (ulv *) bufb; +- printf("setting %3u", j); ++ dprintf("setting %3u", j); + fflush(stdout); + for (i = 0; i < count; i++) { + if (j < UL_LEN) { /* Walk it up. */ +@@ -328,14 +339,14 @@ int test_walkbits0_comparison(ulv *bufa, + *p1++ = *p2++ = ONE << (UL_LEN * 2 - j - 1); + } + } +- printf("\b\b\b\b\b\b\b\b\b\b\b"); +- printf("testing %3u", j); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("testing %3u", j); + fflush(stdout); + if (compare_regions(bufa, bufb, count)) { + return -1; + } + } +- printf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); + fflush(stdout); + return 0; + } +@@ -346,13 +357,13 @@ int test_walkbits1_comparison(ulv *bufa, + unsigned int j; + size_t i; + +- printf(" "); ++ dprintf(" "); + fflush(stdout); + for (j = 0; j < UL_LEN * 2; j++) { +- printf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); + p1 = (ulv *) bufa; + p2 = (ulv *) bufb; +- printf("setting %3u", j); ++ dprintf("setting %3u", j); + fflush(stdout); + for (i = 0; i < count; i++) { + if (j < UL_LEN) { /* Walk it up. */ +@@ -361,14 +372,14 @@ int test_walkbits1_comparison(ulv *bufa, + *p1++ = *p2++ = UL_ONEBITS ^ (ONE << (UL_LEN * 2 - j - 1)); + } + } +- printf("\b\b\b\b\b\b\b\b\b\b\b"); +- printf("testing %3u", j); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("testing %3u", j); + fflush(stdout); + if (compare_regions(bufa, bufb, count)) { + return -1; + } + } +- printf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); + fflush(stdout); + return 0; + } +@@ -379,13 +390,13 @@ int test_bitspread_comparison(ulv *bufa, + unsigned int j; + size_t i; + +- printf(" "); ++ dprintf(" "); + fflush(stdout); + for (j = 0; j < UL_LEN * 2; j++) { +- printf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); + p1 = (ulv *) bufa; + p2 = (ulv *) bufb; +- printf("setting %3u", j); ++ dprintf("setting %3u", j); + fflush(stdout); + for (i = 0; i < count; i++) { + if (j < UL_LEN) { /* Walk it up. */ +@@ -400,14 +411,14 @@ int test_bitspread_comparison(ulv *bufa, + | (ONE << (UL_LEN * 2 + 1 - j))); + } + } +- printf("\b\b\b\b\b\b\b\b\b\b\b"); +- printf("testing %3u", j); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("testing %3u", j); + fflush(stdout); + if (compare_regions(bufa, bufb, count)) { + return -1; + } + } +- printf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); + fflush(stdout); + return 0; + } +@@ -419,29 +430,29 @@ int test_bitflip_comparison(ulv *bufa, u + ul q; + size_t i; + +- printf(" "); ++ dprintf(" "); + fflush(stdout); + for (k = 0; k < UL_LEN; k++) { + q = ONE << k; + for (j = 0; j < 8; j++) { +- printf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); + q = ~q; +- printf("setting %3u", k * 8 + j); ++ dprintf("setting %3u", k * 8 + j); + fflush(stdout); + p1 = (ulv *) bufa; + p2 = (ulv *) bufb; + for (i = 0; i < count; i++) { + *p1++ = *p2++ = (i % 2) == 0 ? q : ~q; + } +- printf("\b\b\b\b\b\b\b\b\b\b\b"); +- printf("testing %3u", k * 8 + j); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("testing %3u", k * 8 + j); + fflush(stdout); + if (compare_regions(bufa, bufb, count)) { + return -1; + } + } + } +- printf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); ++ dprintf("\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b"); + fflush(stdout); + return 0; + } +--- a/tests.h ++++ b/tests.h +@@ -14,6 +14,8 @@ + * + */ + ++extern int quiet; ++ + /* Function declaration. */ + + int test_stuck_address(unsigned long volatile *bufa, size_t count); diff --git a/utils/mg/Makefile b/utils/mg/Makefile new file mode 100644 index 0000000..de5265c --- /dev/null +++ b/utils/mg/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mg +PKG_VERSION:=20110120 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://homepage.boetes.org/software/mg +PKG_MD5SUM:=f2fa8016a491aa2a9d4c5698c593f31b + +include $(INCLUDE_DIR)/package.mk + +define Package/mg + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libncurses + TITLE:=microscopic GNU Emacs-style editor + URL:=http://homepage.boetes.org/software/mg/ + SUBMENU:=Editors +endef + +define Package/mg/description + This program is intended to be a small, fast, and portable + editor for people who can't (or don't want to) run real + Emacs for one reason or another. It is compatible with GNU + because there shouldn't be any reason to learn more than + one Emacs flavor. +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure \ + ); +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + LDFLAGS="$(TARGET_LDFLAGS) -lncurses" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + CC="$(TARGET_CC)" +endef + +define Package/mg/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,mg)) diff --git a/utils/mgetty/Makefile b/utils/mgetty/Makefile new file mode 100644 index 0000000..8e2aec4 --- /dev/null +++ b/utils/mgetty/Makefile @@ -0,0 +1,131 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mgetty +PKG_VERSION:=1.1.36 +PKG_XVERSION:=Jun15 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION)-$(PKG_XVERSION).tar.gz +PKG_SOURCE_URL:=ftp://alpha.greenie.net/pub/mgetty/source/1.1 +PKG_MD5SUM:=0320e98c6b86bcca48fc5f355b94ead4 + +include $(INCLUDE_DIR)/package.mk + +define Package/mgetty + SECTION:=utils + CATEGORY:=Utilities + TITLE:=A data/fax solution for your analog modem + URL:=http://mgetty.greenie.net/ +endef + +define Package/mgetty/description +A data/fax solution for your analog modem. +endef + +define Build/Configure + cp $(PKG_BUILD_DIR)/policy.h-dist $(PKG_BUILD_DIR)/policy.h + echo "#define AUTO_PPP" >> $(PKG_BUILD_DIR)/policy.h + echo "#undef FAX_NOTIFY_PROGRAM" >> $(PKG_BUILD_DIR)/policy.h + echo "#define FAX_NOTIFY_PROGRAM \"/usr/lib/mgetty+sendfax/new_fax\"" >> $(PKG_BUILD_DIR)/policy.h + echo "#undef DATA_FLOW" >> $(PKG_BUILD_DIR)/policy.h + echo "#define DATA_FLOW FLOW_HARD" >> $(PKG_BUILD_DIR)/policy.h + echo "#undef DEVICE_GROUP" >> $(PKG_BUILD_DIR)/policy.h + echo "#undef DEVICE_OWNER" >> $(PKG_BUILD_DIR)/policy.h + echo "#define DEVICE_OWNER \"root\"" >> $(PKG_BUILD_DIR)/policy.h + echo "#undef FAXREC_FLOW" >> $(PKG_BUILD_DIR)/policy.h + echo "#define FAXREC_FLOW FLOW_SOFT" >> $(PKG_BUILD_DIR)/policy.h + echo "#undef FAXSEND_FLOW" >> $(PKG_BUILD_DIR)/policy.h + echo "#define FAXSEND_FLOW FLOW_SOFT" >> $(PKG_BUILD_DIR)/policy.h +endef + +#FIXME: don't manually install, use upstream Makefile instead +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR)/usr/bin + mkdir -p $(PKG_INSTALL_DIR)/usr/sbin + mkdir -p $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax + mkdir -p $(PKG_INSTALL_DIR)/etc/mgetty+sendfax + $(MAKE) -C $(PKG_BUILD_DIR) \ + mksed + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + prefix="$(PKG_INSTALL_DIR)/usr" \ + CONFDIR=/etc/mgetty+sendfax \ + bin-all + $(CP) $(PKG_BUILD_DIR)/mgetty $(PKG_INSTALL_DIR)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/sendfax $(PKG_INSTALL_DIR)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/fax/faxrunqd $(PKG_INSTALL_DIR)/usr/sbin + chmod 755 $(PKG_INSTALL_DIR)/usr/sbin/* + $(CP) $(PKG_BUILD_DIR)/fax/faxq-helper $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax + chmod u+s $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax/faxq-helper + $(CP) $(PKG_BUILD_DIR)/fax/cour25n.pbm $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax + $(CP) $(PKG_BUILD_DIR)/fax/cour25.pbm $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax + $(CP) $(PKG_BUILD_DIR)/fax/faxq $(PKG_INSTALL_DIR)/usr/bin + $(CP) $(PKG_BUILD_DIR)/fax/faxrm $(PKG_INSTALL_DIR)/usr/bin + $(CP) $(PKG_BUILD_DIR)/fax/faxrunq $(PKG_INSTALL_DIR)/usr/bin + $(CP) $(PKG_BUILD_DIR)/fax/faxspool $(PKG_INSTALL_DIR)/usr/bin + $(CP) $(PKG_BUILD_DIR)/g3/g32pbm $(PKG_INSTALL_DIR)/usr/bin + (cd $(PKG_INSTALL_DIR)/usr/bin;\ + ln -snf g32pbm g3topbm;\ + ); + $(CP) $(PKG_BUILD_DIR)/g3/g3cat $(PKG_INSTALL_DIR)/usr/bin + $(CP) $(PKG_BUILD_DIR)/g3/pbm2g3 $(PKG_INSTALL_DIR)/usr/bin + $(CP) $(PKG_BUILD_DIR)/g3/sff2g3 $(PKG_INSTALL_DIR)/usr/bin + chmod 755 $(PKG_INSTALL_DIR)/usr/bin/* +# Installation into /etc + $(CP) $(PKG_BUILD_DIR)/dialin.config $(PKG_INSTALL_DIR)/etc/mgetty+sendfax + $(CP) $(PKG_BUILD_DIR)/fax/faxheader $(PKG_INSTALL_DIR)/etc/mgetty+sendfax + $(CP) $(PKG_BUILD_DIR)/faxrunq.config $(PKG_INSTALL_DIR)/etc/mgetty+sendfax + $(CP) $(PKG_BUILD_DIR)/fax/faxspool.rules $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/faxspool.rules.sample + $(PKG_BUILD_DIR)/sedscript < $(PKG_BUILD_DIR)/login.cfg.in > $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/login.config + $(PKG_BUILD_DIR)/sedscript < $(PKG_BUILD_DIR)/mgetty.cfg.in > $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/mgetty.config + $(PKG_BUILD_DIR)/sedscript < $(PKG_BUILD_DIR)/sendfax.cfg.in > $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/sendfax.config +endef + +define Package/mgetty/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/faxq \ + $(PKG_INSTALL_DIR)/usr/bin/faxrm \ + $(PKG_INSTALL_DIR)/usr/bin/faxrunq \ + $(PKG_INSTALL_DIR)/usr/bin/faxspool \ + $(PKG_INSTALL_DIR)/usr/bin/g32pbm \ + $(PKG_INSTALL_DIR)/usr/bin/g3cat \ + $(PKG_INSTALL_DIR)/usr/bin/pbm2g3 \ + $(PKG_INSTALL_DIR)/usr/bin/sff2g3 \ + $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/sbin/mgetty \ + $(PKG_INSTALL_DIR)/usr/sbin/sendfax \ + $(PKG_INSTALL_DIR)/usr/sbin/faxrunqd \ + $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib/mgetty+sendfax + install -m4755 \ + $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax/faxq-helper \ + $(1)/usr/lib/mgetty+sendfax/ + install -m644 \ + $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax/cour25n.pbm \ + $(PKG_INSTALL_DIR)/usr/lib/mgetty+sendfax/cour25.pbm \ + $(1)/usr/lib/mgetty+sendfax/ + $(INSTALL_DIR) $(1)/etc/mgetty+sendfax + install -m600 \ + $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/dialin.config \ + $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/faxheader \ + $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/faxrunq.config \ + $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/faxspool.rules.sample \ + $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/login.config \ + $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/mgetty.config \ + $(PKG_INSTALL_DIR)/etc/mgetty+sendfax/sendfax.config \ + $(1)/etc/mgetty+sendfax/ +endef + +$(eval $(call BuildPackage,mgetty)) diff --git a/utils/mgetty/patches/001-mgetty.patch b/utils/mgetty/patches/001-mgetty.patch new file mode 100644 index 0000000..427fe9c --- /dev/null +++ b/utils/mgetty/patches/001-mgetty.patch @@ -0,0 +1,88 @@ +--- a/Makefile ++++ b/Makefile +@@ -164,7 +164,9 @@ + # + # if your systems doesn't have one, use the shell script that I provide + # in "inst.sh" (taken from X11R5). Needed on IRIX5.2 +-INSTALL=install -c -o bin -g bin ++STRIP=$(STAGING_DIR)sstrip ++INSTALL=install -c -o root -g root ++#INSTALL=install -c -o bin -g bin + #INSTALL=install -c -o root -g wheel # NeXT/BSD + #INSTALL=/usr/ucb/install -c -o bin -g bin # AIX, Solaris 2.x + #INSTALL=installbsd -c -o bin -g bin # OSF/1, AIX 4.1, 4.2 +@@ -216,7 +218,7 @@ + # (it's possible to run faxrunq(d) as root, but the FAX_OUT_USER + # MUST NOT BE root or any other privileged account). + # +-FAX_OUT_USER=fax ++FAX_OUT_USER=root + # + # + # Where section 1 manual pages should be placed +@@ -421,7 +423,12 @@ + ./mksed >sedscript + chmod +x sedscript + +-mksed: mksed.c policy.h Makefile ++REALGCC:=/usr/bin/gcc ++mksed: mksed.c policy.h Makefile ++ ( echo $(REALGCC); $(MAKE) "CC=$(REALGCC)" "CFLAGS=$(CFLAGS)" mksed-wrong;\ ++ ); ++ ++mksed-wrong: mksed.c policy.h Makefile + $(CC) $(CFLAGS) -DBINDIR=\"$(BINDIR)\" -DSBINDIR=\"$(SBINDIR)\" \ + -DLIBDIR=\"$(LIBDIR)\" \ + -DCONFDIR=\"$(CONFDIR)\" \ +@@ -586,8 +593,10 @@ + -test -d $(SBINDIR) || ( ./mkidirs $(SBINDIR) ; chmod 755 $(SBINDIR) ) + -mv -f $(SBINDIR)/mgetty $(SBINDIR)/mgetty.old + -mv -f $(SBINDIR)/sendfax $(SBINDIR)/sendfax.old +- $(INSTALL) -s -m 700 mgetty $(SBINDIR) +- $(INSTALL) -s -m 755 sendfax $(SBINDIR) ++ $(INSTALL) -m 700 mgetty $(SBINDIR) ++ $(STRIP) $(SBINDIR)/mgetty ++ $(INSTALL) -m 755 sendfax $(SBINDIR) ++ $(STRIP) $(SBINDIR)/sendfax + # + # data files + directories + # +@@ -649,7 +658,8 @@ + if [ ! -z "$(INSTALL_MECHO)" ] ; then \ + cd compat ; \ + $(CC) $(CFLAGS) -o mg.echo mg.echo.c && \ +- $(INSTALL) -s -m 755 mg.echo $(BINDIR) ; \ ++ $(INSTALL) -m 755 mg.echo $(BINDIR) && \ ++ $(STRIP) $(BINDIR)/mg.echo ; \ + fi + + # +--- a/g3/Makefile ++++ b/g3/Makefile +@@ -37,7 +37,8 @@ + # install programs + # + for f in $(G3_PROGRAMS) ; do \ +- $(INSTALL) -s -m 755 $$f $(BINDIR) ; \ ++ $(INSTALL) -m 755 $$f $(BINDIR) ; \ ++ $(STRIP) $(BINDIR)/$$f ; \ + done + # + # make symlink for "g3topbm" (so third-party fax viewers won't fail) +--- a/logfile.c ++++ b/logfile.c +@@ -327,12 +327,11 @@ + } + else /* ERROR or FATAL */ + { +- fprintf(log_fp, "\n%02d/%02d %02d:%02d:%02d %s %s: %s", ++ fprintf(log_fp, "\n%02d/%02d %02d:%02d:%02d %s %s: #%d", + tm->tm_mon+1, tm->tm_mday, + tm->tm_hour, tm->tm_min, tm->tm_sec, + log_infix, ws, +- ( errnr <= sys_nerr ) ? sys_errlist[errnr]: +- "" ); ++ errnr ); + #ifdef SYSLOG + syslog( level == L_FATAL? LOG_ALERT: LOG_ERR, "%s: %m", ws ); + #endif diff --git a/utils/microcom/Makefile b/utils/microcom/Makefile new file mode 100644 index 0000000..6315cfa --- /dev/null +++ b/utils/microcom/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=microcom +PKG_VERSION:=1.02 +PKG_RELEASE:=1 + +PKG_SOURCE:=m102.tar.gz +PKG_SOURCE_URL:=http://microcom.port5.com/ +PKG_MD5SUM:=c7817035dc41cb02e7cfb565cf9b7401 + +include $(INCLUDE_DIR)/package.mk + +PKG_UNPACK:=zcat $(DL_DIR)/$(PKG_SOURCE) | $(TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS) + +define Package/microcom + SECTION:=utils + CATEGORY:=Utilities + TITLE:=A serial terminal emulation program + URL:=http://microcomlinux.homestead.com/ + SUBMENU:=Terminal +endef + +define Package/microcom/description + microcom is a minicom-like serial terminal emulator with scripting + support. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + microcom +endef + +define Package/microcom/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/microcom $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,microcom)) diff --git a/utils/microcom/patches/001-cross_compile.patch b/utils/microcom/patches/001-cross_compile.patch new file mode 100644 index 0000000..f6e44a8 --- /dev/null +++ b/utils/microcom/patches/001-cross_compile.patch @@ -0,0 +1,29 @@ +diff -ruN microcom-1.02-old/Makefile microcom-1.02-new/Makefile +--- microcom-1.02-old/Makefile 2006-10-29 21:55:45.000000000 +0100 ++++ microcom-1.02-new/Makefile 2006-10-29 22:00:09.000000000 +0100 +@@ -19,19 +19,19 @@ + #** Rev. 0.91 - Jan. 2000 - minor fixes, compiled under Mandrake 6.0 + #****************************************************************************/ + microcom: microcom.o mux.o script.o help.o autodet.o +- gcc -o microcom microcom.o mux.o script.o help.o autodet.o ++ $(CC) -o microcom microcom.o mux.o script.o help.o autodet.o + + autodet.o: autodet.c microcom.h +- gcc -O -c autodet.c ++ $(CC) $(CFLAGS) -c autodet.c + + script.o: script.c script.h microcom.h +- gcc -O -c script.c ++ $(CC) $(CFLAGS) -c script.c + + mux.o: mux.c microcom.h +- gcc -O -c mux.c ++ $(CC) $(CFLAGS) -c mux.c + + microcom.o: microcom.c microcom.h +- gcc -O -c microcom.c ++ $(CC) $(CFLAGS) -c microcom.c + + help.o: help.c microcom.h +- gcc -O -c help.c ++ $(CC) $(CFLAGS) -c help.c diff --git a/utils/minicom/Makefile b/utils/minicom/Makefile new file mode 100644 index 0000000..f42b26e --- /dev/null +++ b/utils/minicom/Makefile @@ -0,0 +1,37 @@ +# +# Copyright (C) 2006-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=minicom +PKG_VERSION:=2.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://alioth.debian.org/download.php/2332/ +PKG_MD5SUM:=0ebe7a91898384ca906787cc4e2c3f25 + +PKG_FIXUP = libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/minicom + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libncurses + TITLE:=Terminal emulation program + URL:=http://alioth.debian.org/projects/minicom/ + SUBMENU:=Terminal +endef + +define Package/minicom/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ascii-xfr $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,minicom)) diff --git a/utils/minicom/patches/010-resolve-getline-conflict.patch b/utils/minicom/patches/010-resolve-getline-conflict.patch new file mode 100644 index 0000000..041353d --- /dev/null +++ b/utils/minicom/patches/010-resolve-getline-conflict.patch @@ -0,0 +1,111 @@ +--- a/src/minicom.c ++++ b/src/minicom.c +@@ -167,7 +167,7 @@ static void shjump(int sig) + #endif /*SIGTSTP*/ + + /* Get a line from either window or scroll back buffer. */ +-static ELM *getline(WIN *w, int no) ++static ELM *mc_getline(WIN *w, int no) + { + int i; + static ELM outofrange[MAXCOLS] = {{0,0,0}}; +@@ -205,7 +205,7 @@ static void drawhist(WIN *w, int y, int + + w->direct = 0; + for (f = 0; f < w->ys; f++) +- mc_wdrawelm(w, f, getline(w, y++)); ++ mc_wdrawelm(w, f, mc_getline(w, y++)); + if (r) + mc_wredraw(w, 1); + w->direct = 1; +@@ -227,7 +227,7 @@ void drawhist_look(WIN *w, int y, int r, + tmp_line[0]='\0'; + w->direct = 0; + for (f = 0; f < w->ys; f++) { +- tmp_e = getline(w, y++); ++ tmp_e = mc_getline(w, y++); + + /* First we "accumulate" the line into a variable */ + mc_wdrawelm_var(w, tmp_e, tmp_line); +@@ -324,7 +324,7 @@ int find_next(WIN *w, WIN *w_hist, + + for (next_line = hit_line; next_line <= all_lines; next_line++) { + /* we do 'something' here... :-) */ +- tmp_e = getline(w_hist, next_line); ++ tmp_e = mc_getline(w_hist, next_line); + + /* + * First we "accumulate" the line into a variable. +@@ -379,9 +379,9 @@ wchar_t *StrStr(wchar_t *str1, wchar_t * + static void drawcite(WIN *w, int y, int citey, int start, int end) + { + if (y+citey >= start && y+citey <= end) +- mc_wdrawelm_inverse(w, y, getline(w, y+citey)); ++ mc_wdrawelm_inverse(w, y, mc_getline(w, y+citey)); + else +- mc_wdrawelm(w, y, getline(w, y+citey)); ++ mc_wdrawelm(w, y, mc_getline(w, y+citey)); + } + + static void drawcite_whole(WIN *w, int y, int start, int end) +@@ -400,7 +400,7 @@ static void do_cite(WIN *w, int start, i + for (y=start; y<=end; y++) { + vt_send('>'); + vt_send(' '); +- tmp_e = getline(w, y); ++ tmp_e = mc_getline(w, y); + mc_wdrawelm_var(w, tmp_e, tmp_line); + tmp_line[w->xs] = 0; + for (x = w->xs-1; x >= 0; x--) { +@@ -600,7 +600,7 @@ static void scrollback(void) + if (citemode) { + inverse = (y+cite_y >= cite_ystart && y+cite_y <= cite_yend); + } else { +- tmp_e = getline(b_us, y); ++ tmp_e = mc_getline(b_us, y); + if (wcslen(look_for) > 1) { + /* quick scan for pattern match */ + mc_wdrawelm_var(b_us, tmp_e, tmp_line); +@@ -611,9 +611,9 @@ static void scrollback(void) + } + + if (inverse) +- mc_wdrawelm_inverse(b_us, 0, getline(b_us, y)); ++ mc_wdrawelm_inverse(b_us, 0, mc_getline(b_us, y)); + else +- mc_wdrawelm(b_us, 0, getline(b_us, y)); ++ mc_wdrawelm(b_us, 0, mc_getline(b_us, y)); + if (citemode) + mc_wlocate(b_us, 0, cite_y); + mc_wflush(); +@@ -648,7 +648,7 @@ static void scrollback(void) + if (citemode) { + inverse = (y+cite_y >= cite_ystart && y+cite_y <= cite_yend); + } else { +- tmp_e = getline(b_us, y + b_us->ys - 1); ++ tmp_e = mc_getline(b_us, y + b_us->ys - 1); + if (wcslen(look_for) > 1) { + /* quick scan for pattern match */ + mc_wdrawelm_var(b_us, tmp_e, tmp_line); +@@ -660,10 +660,10 @@ static void scrollback(void) + + if (inverse) + mc_wdrawelm_inverse(b_us, b_us->ys - 1, +- getline(b_us, y + b_us->ys - 1)); ++ mc_getline(b_us, y + b_us->ys - 1)); + else + mc_wdrawelm(b_us, b_us->ys - 1, +- getline(b_us, y + b_us->ys - 1)); ++ mc_getline(b_us, y + b_us->ys - 1)); + if (citemode) + mc_wlocate(b_us, 0, cite_y); + mc_wflush(); +@@ -753,7 +753,7 @@ static void scrollback(void) + mc_wlocate(b_st, 0, 0); + mc_wprintf(b_st, hline); + mc_wredraw(b_st, 1); +- mc_wdrawelm_inverse(b_us, cite_y, getline(b_us, cite_ystart)); ++ mc_wdrawelm_inverse(b_us, cite_y, mc_getline(b_us, cite_ystart)); + mc_wlocate(b_us, 0, cite_y); + break; + case K_ESC: diff --git a/utils/mksh/Makefile b/utils/mksh/Makefile new file mode 100644 index 0000000..1b1294c --- /dev/null +++ b/utils/mksh/Makefile @@ -0,0 +1,79 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# Copyright (c) 2009 Thorsten Glaser +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mksh +PKG_VERSION:=39 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-R$(PKG_VERSION).cpio.gz +PKG_SOURCE_URL:=http://www.mirbsd.org/MirOS/dist/mir/mksh +PKG_MD5SUM:=b2eeb4fe4ccac2704e1440e53cd2672c + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/mksh + SECTION:=shells + CATEGORY:=Base system + TITLE:=MirBSD Korn Shell + DEPENDS:=$(DEP) + URL:=http://mirbsd.de/mksh +endef + +define Package/mksh/description +mksh is the MirBSD enhanced version of the Public Domain Korn +shell (pdksh), a Bourne-compatible shell which is largely si- +milar to the original AT&T Korn shell; mksh is the only pdksh +derivate currently being actively developed. It includes bug +fixes and feature improvements, in order to produce a modern, +robust shell good for interactive and especially script use. +mksh has UTF-8 support (e.g. in the emacs editing mode); R38c +corresponds to OpenBSD 4.5-current ksh (without GNU bash-like +$PS1 and fancy character classes). The code has throughoutly +been cleaned up and simplified, bugs fixed, standards compli- +ance added, and several enhancements (for extended compatibi- +lity to other modern shells - as well as a couple of its own) +have been placed. +endef + +define Build/Compile + # -DMKSH_SMALL=1 ⇒ reduce functionality quite a lot + # -DMKSH_ASSUME_UTF8=0 ⇒ never automatically enable + # UTF-8 mode, neither use setlocale/nl_langinfo + # nor look at $LC_* and $LANG (not recommended) + # HAVE_CAN_FSTACKPROTECTORALL=0 ⇒ nuke libssp dependency + # HAVE_REALPATH=x ⇒ add the realpath builtin, which was + # disabled by MKSH_SMALL, back if realpath() exists + cd $(PKG_BUILD_DIR); \ + CC="$(TARGET_CC)" \ + TARGET_OS="$(shell uname -s)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="-DMKSH_SMALL=1 -DMKSH_ASSUME_UTF8=0" \ + HAVE_CAN_FSTACKPROTECTORALL=0 \ + HAVE_REALPATH=x \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + $(BASH) Build.sh -Q -r +endef + +define Package/mksh/postinst +#!/bin/sh +grep mksh $${IPKG_INSTROOT}/etc/shells || \ + echo "/bin/mksh" >> $${IPKG_INSTROOT}/etc/shells +endef + +define Package/mksh/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) $(PKG_BUILD_DIR)/dot.mkshrc $(1)/etc/mkshrc + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mksh $(1)/bin/ +endef + +$(eval $(call BuildPackage,mksh)) diff --git a/utils/mksh/patches/100-dot_mkshrc b/utils/mksh/patches/100-dot_mkshrc new file mode 100644 index 0000000..a47b29d --- /dev/null +++ b/utils/mksh/patches/100-dot_mkshrc @@ -0,0 +1,37 @@ +$Id$ + + • Part of the FreeWRT patches: + – no hostname(1) + – ls has no -o + • OpenWrt fix: + – since this is not ~/.mkshrc make sure subshells find it + +--- a/dot.mkshrc ++++ b/dot.mkshrc +@@ -20,7 +20,7 @@ + #- + # ~/.mkshrc: mksh initialisation file for interactive shells + +-: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(ulimit -c 0;hostname -s 2>&-)} ++: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(&-) + : ${HOSTNAME:=nil}; if (( USER_ID )); then PS1='$'; else PS1='#'; fi + function precmd { +@@ -38,7 +38,7 @@ unalias ls + alias l='ls -F' + alias la='l -a' + alias ll='l -l' +-alias lo='l -alo' ++alias lo='l -al' + alias which='whence -p' + whence -p rot13 >&- || alias rot13='tr \ + abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \ +@@ -304,4 +304,8 @@ function Lstripcom { + done; } + } + ++# we need this in OpenWrt for subshells that are not login shells ++: ${ENV=/etc/mkshrc} ++[[ -z $ENV ]] || export ENV ++ + : place customsations above this line diff --git a/utils/mtd-utils/Makefile b/utils/mtd-utils/Makefile new file mode 100644 index 0000000..b8c26d5 --- /dev/null +++ b/utils/mtd-utils/Makefile @@ -0,0 +1,129 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mtd-utils +PKG_REV:=a2d010f8fca904fffa3c6e5a5d148cc96a37a08a +PKG_VERSION:=20090227 +PKG_RELEASE:=1.1 +PKG_INSTALL:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) + +include $(INCLUDE_DIR)/package.mk + +FILES:= \ + doc_loadbios \ + docfdisk \ + flash_erase \ + flash_eraseall \ + flash_info \ + flash_lock \ + flash_otp_dump \ + flash_otp_info \ + flash_unlock \ + flashcp \ + ftl_check \ + ftl_format \ + jffs2dump \ + mkfs.jffs2 \ + mtd_debug \ + nanddump \ + nandtest \ + nandwrite \ + nftl_format \ + nftldump \ + recv_image \ + rfddump \ + rfdformat \ + serve_image \ + sumtool + +ifneq ($(CONFIG_LINUX_2_4),y) +FILES += \ + bin2nand \ + mkbootenv \ + mkfs.ubifs \ + mkpfi \ + nand2bin \ + pddcustomize \ + pfi2bin \ + pfiflash \ + ubiattach \ + ubicrc32 \ + ubicrc32.pl \ + ubidetach \ + ubiformat \ + ubigen \ + ubimirror \ + ubimkvol \ + ubinfo \ + ubinize \ + ubirename \ + ubirmvol \ + ubiupdatevol \ + unubi +endif + +define PartGen +define Package/mtd-utils-$(subst _,-,$(1)) + TITLE:=MTD $(1) + URL:=http://www.linux-mtd.infradead.org/ + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=mtd-utils +zlib +liblzo +libuuid +endef +endef + +define Package/mtd-utils + TITLE:=Utilities for flash info/debug + SECTION:=utils + CATEGORY:=Utilities + MENU:=1 +endef + +define Package/mtd-utils/description + Utilities for manipulating memory technology devices. +endef + +define Package/mtd-utils/install + true +endef + +$(foreach file,$(FILES),$(eval $(call PartGen,$(file)))) + +MAKE_FLAGS += \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + BUILDDIR="$(PKG_BUILD_DIR)" \ + LDLIBS+="$(LIBGCC_S)" \ + WITHOUT_XATTR=1 + +ifeq ($(CONFIG_LINUX_2_4),y) +MAKE_FLAGS += \ + SUBDIRS="" +endif + +define PartInstall +define Package/mtd-utils-$(subst _,-,$(1))/install + $(INSTALL_DIR) \ + $$(1)/usr/sbin + + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/sbin/$(1) \ + $$(1)/usr/sbin/ +endef +endef + +$(foreach file,$(FILES),$(eval $(call PartInstall,$(file)))) + +$(eval $(call BuildPackage,mtd-utils)) +$(foreach file,$(FILES),$(eval $(call BuildPackage,mtd-utils-$(subst _,-,$(file))))) diff --git a/utils/nano/Makefile b/utils/nano/Makefile new file mode 100644 index 0000000..cff2bc7 --- /dev/null +++ b/utils/nano/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nano +PKG_VERSION:=2.2.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.nano-editor.org/dist/v2.2 +PKG_MD5SUM:=03233ae480689a008eb98feb1b599807 + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/nano + SUBMENU:=Editors + SECTION:=utils + CATEGORY:=Utilities + TITLE:=An enhanced clone of the Pico text editor + URL:=http://www.nano-editor.org/ + MAINTAINER:=Bernhard Loos + DEPENDS:=+libncurses +endef + +define Package/nano/description + GNU nano (Nano's ANOther editor, or Not ANOther editor) is an enhanced clone + of the Pico text editor. +endef + +CONFIGURE_ARGS += \ + --enable-tiny \ + --disable-glibtest \ + --disable-utf8 \ + --without-slang \ + +CONFIGURE_VARS += \ + ac_cv_header_regex_h=no \ + +define Package/nano/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,nano)) diff --git a/utils/ntfs-3g/Makefile b/utils/ntfs-3g/Makefile new file mode 100644 index 0000000..c6dcfbe --- /dev/null +++ b/utils/ntfs-3g/Makefile @@ -0,0 +1,235 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ntfs-3g +PKG_RELEASE:=1 + +# 2011.4.12 integrates ntfsprogs and changed srcfile name +PKG_VERSION:=2011.4.12 +# disable next line and do _not_ select ntfsprogs_ntfs-3g to build an older version +PKG_SOURCE:=$(PKG_NAME)_ntfsprogs-$(PKG_VERSION).tgz + +## 2010.3.6 needs a recent uclibc 0.9.30.2 or greater +## this has been fixed in 2010.5.16, keeping this in case this happens again +#PKG_UCLIBC_VERSION:=$(call qstrip,$(CONFIG_UCLIBC_VERSION)) +#ifneq (,$(or $(findstring !0.9.29,!$(PKG_UCLIBC_VERSION)),$(findstring !0.9.30.1!,!$(PKG_UCLIBC_VERSION)!) )) +# PKG_VERSION:=2010.1.16 +#endif + +PATCH_DIR:=./patches-$(PKG_VERSION) + +PKG_SOURCE?=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://www.tuxera.com/opensource/ + +PKG_MD5SUM_2010.1.16:=e104c914e8d7d29ee83e63d46afbba25 +PKG_MD5SUM_2010.3.6:=12ce21aa044c6068a4df6e8cbd3c5cfa +PKG_MD5SUM_2010.5.16:=aeff7659a4943c9223d79116f051a863 +PKG_MD5SUM_2010.5.22:=caa08c73220a7106c76f697b7a7915ec +PKG_MD5SUM_2010.8.8:=6c109746c2708f679725a2ea441c61c6 +PKG_MD5SUM_2010.10.2:=91405690f25822142cdcb43d03e62d3f +PKG_MD5SUM_2011.1.15:=15a5cf5752012269fa168c24191f00e2 +PKG_MD5SUM_2011.4.12:=9c4ce318373b15332239a77a9d2a39fe +PKG_MD5SUM:=$(PKG_MD5SUM_$(PKG_VERSION)) + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +# release contains fuseext/int hint +PKG_RELEASE:=$(PKG_RELEASE)$(if $(CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE),-fuseext,-fuseint) + +# define build dir, respect fuseext/int +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE) + +include $(INCLUDE_DIR)/package.mk + +define Package/ntfs-3g/common + SECTION:=utils + CATEGORY:=Utilities + URL:=http://www.tuxera.com + SUBMENU:=Filesystem + TITLE:=Stable Read/Write NTFS Driver + MAINTAINER:=Bud +endef + +define Package/ntfs-3g + $(call Package/ntfs-3g/common) + DEPENDS+= +kmod-fuse +PACKAGE_NTFS-3G_USE_LIBFUSE:libfuse +libpthread +endef + +define Package/ntfs-3g/description + Ntfs-3g is a NTFS driver, which can create, remove, rename, + move files, directories, hard links, and streams. It can read + and write files, including streams and sparse files. It can + handle special files like symbolic links, devices, and FIFOs. + Moreover it can also read transparently compressed files. + + Contains: + - ntfs-3g + - ntfs-3g.probe + - mount.ntfs-3g (symlink to ntfs-3g) + +endef + +define Package/ntfs-3g/config +config PACKAGE_NTFS-3G_USE_LIBFUSE + bool "use external FUSE library, selects package libfuse" + depends on PACKAGE_ntfs-3g + ---help--- + Ntfs-3g by default uses a minimalized lite version of FUSE. + If libfuse is part of your filesystem anyway (because of sshfs, owfs + etc.) it makes sense to activate this option and save some kilobytes + of space. + +endef + +define Package/ntfs-3g-low + $(call Package/ntfs-3g/common) + TITLE:=lowntfs-3g (alternative using the fuse low-level interface) + DEPENDS+= +ntfs-3g +endef + +define Package/ntfs-3g-low/description + Contains: + - lowntfs-3g + - mount.lowntfs-3g (symlink to lowntfs-3g) + + A driver variant using the fuse low-level interface missing some of the + enhanced functionality for streams or the like. You might want to check: + http://www.tuxera.com/community/ntfs-3g-manual/ + +endef + +define Package/ntfs-3g-utils + $(call Package/ntfs-3g/common) + TITLE:=ntfs-3g utilities (ntfs-3g.secaudit, ntfs-3g.usermap) + DEPENDS+= +ntfs-3g +endef + +define Package/ntfs-3g-utils/description + Additional ntfs-3g utilities. Not included by default for size + considerations. All binaries except ntfs-3g, ntfs-3g.probe. + + Currently: + - ntfs-3g.secaudit + - ntfs-3g.usermap + +endef + +# TODO: write a proper description +# new in 2001.4.12 +define Package/ntfsprogs_ntfs-3g + $(call Package/ntfs-3g/common) + TITLE:=ntfsprogs (ntfs-3g) + DEPENDS+= +ntfs-3g +libgcrypt +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static + +# configure/make according selection +ifdef CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE + CONFIGURE_ARGS += --with-fuse=external + TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include/fuse $(TARGET_CPPFLAGS) +else + CONFIGURE_ARGS += --with-fuse=internal + TARGET_CPPFLAGS:=-I../include/fuse-lite $(TARGET_CPPFLAGS) +endif + +# enable disable ntfsprogs +ifneq ($(CONFIG_PACKAGE_ntfsprogs_ntfs-3g)$(SDK)$(DEVELOPER),) + CONFIGURE_ARGS += --enable-ntfsprogs +else + CONFIGURE_ARGS += --disable-ntfsprogs +endif + +# redefine prepare to extract to our build dir +# apply patches +define Build/Prepare + rm -rf $(PKG_BUILD_DIR)/ + mkdir -p $(PKG_BUILD_DIR)/ + $(TAR) -xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip 1 + $(Build/Patch) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/ntfs-3g $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.{la,a,so*} $(1)/usr/lib/ +endef + +define Package/ntfs-3g/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g{,.probe} $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/sbin + $(CP) $(PKG_INSTALL_DIR)/sbin/mount.ntfs-3g $(1)/sbin/ +endef + +define Package/ntfs-3g/postinst +#!/bin/sh +FILE="$${IPKG_INSTROOT}/etc/filesystems" +ID="ntfs-3g" + +if ! [ -f '/etc/filesystems' ]; then + echo "Create '$$FILE'." + touch "$$FILE" +fi + +if ! grep -q -e '^ntfs-3g$$' "$$FILE"; then + echo "Add '$$ID' to known filesystems." + echo "$$ID" >> "$$FILE" +fi + +endef + +define Package/ntfs-3g-low/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lowntfs-3g $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/sbin + $(CP) $(PKG_INSTALL_DIR)/sbin/mount.lowntfs-3g $(1)/sbin/ +endef + +define Package/ntfs-3g-low/postinst +#!/bin/sh +FILE="$${IPKG_INSTROOT}/etc/filesystems" +ID="lowntfs-3g" + +if ! [ -f '/etc/filesystems' ]; then + echo "Create '$$FILE'." + touch "$$FILE" +fi + +if ! grep -q -e '^ntfs-3g$$' "$$FILE"; then + echo "Add '$$ID' to known filesystems." + echo "$$ID" >> "$$FILE" +fi + +endef + +define Package/ntfs-3g-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(FIND) $(PKG_INSTALL_DIR)/usr/bin/ -type f ! -name ntfs-3g.probe ! -name ntfs-3g -exec $(INSTALL_BIN) {} $(1)/usr/bin/ \; +endef + +define Package/ntfsprogs_ntfs-3g/install + $(INSTALL_DIR) $(1)/sbin + $(CP) $(PKG_INSTALL_DIR)/sbin/mkfs.ntfs $(1)/sbin/ + $(INSTALL_DIR) $(1)/usr/bin + $(FIND) $(PKG_INSTALL_DIR)/usr/bin/ -type f ! -regex '.*[^/]*ntfs-3g[^/]*' -exec $(INSTALL_BIN) {} $(1)/usr/bin/ \; + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,ntfs-3g)) +$(eval $(call BuildPackage,ntfs-3g-low)) +$(eval $(call BuildPackage,ntfs-3g-utils)) +$(eval $(call BuildPackage,ntfsprogs_ntfs-3g)) diff --git a/utils/ntfs-3g/patches-2011.4.12/001-options.patch b/utils/ntfs-3g/patches-2011.4.12/001-options.patch new file mode 100644 index 0000000..e0d7ac8 --- /dev/null +++ b/utils/ntfs-3g/patches-2011.4.12/001-options.patch @@ -0,0 +1,20 @@ +--- a/src/ntfs-3g_common.c.ref 2011-04-23 08:25:28.000000000 +0200 ++++ b/src/ntfs-3g_common.c 2011-04-23 08:32:16.000000000 +0200 +@@ -58,8 +58,6 @@ + + static const char nf_ns_alt_xattr_efsinfo[] = "user.ntfs.efsinfo"; + +-#ifdef HAVE_SETXATTR +- + static const char def_opts[] = "allow_other,nonempty,"; + + /* +@@ -573,6 +571,8 @@ + return 0; + } + ++#ifdef HAVE_SETXATTR ++ + int ntfs_fuse_listxattr_common(ntfs_inode *ni, ntfs_attr_search_ctx *actx, + char *list, size_t size, BOOL prefixing) + { diff --git a/utils/ntfsprogs/Makefile b/utils/ntfsprogs/Makefile new file mode 100644 index 0000000..3b056fc --- /dev/null +++ b/utils/ntfsprogs/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2010 Gianluigi Tiesi +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ntfsprogs +PKG_VERSION:=2.0.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/linux-ntfs +PKG_MD5SUM:=2c402b647bb7aeb1d3f8ce1cc354fd68 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ntfsprogs + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Filesystem + TITLE:=Linux-NTFS + URL:=http://www.linux-ntfs.org/ + DEPENDS:=+libgcrypt + MAINTAINER:=Gianluigi Tiesi +endef + +define Package/ntfsprogs/description + Tools for managing NTFS volumes from Linux +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --enable-static \ + --disable-crypto \ + --disable-gnome-vfs \ + --disable-ntfsmount + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/ntfs $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs.{la,a,so*} $(1)/usr/lib/ +endef + +define Package/ntfsprogs/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ntfsfix $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,ntfsprogs)) diff --git a/utils/ntfsprogs/patches/001-autoconf_fixes.patch b/utils/ntfsprogs/patches/001-autoconf_fixes.patch new file mode 100644 index 0000000..0055159 --- /dev/null +++ b/utils/ntfsprogs/patches/001-autoconf_fixes.patch @@ -0,0 +1,52 @@ +--- a/libntfs/Makefile.am ++++ b/libntfs/Makefile.am +@@ -38,8 +38,8 @@ libntfs_la_CFLAGS = $(LIBNTFS_CFLAGS) \ + -DLTVERSION_LIBNTFS=\"$(LTVERSION_LIBNTFS)\" + + if ENABLE_CRYPTO +-libntfs_la_LDFLAGS += `libgnutls-config --libs` `pkg-config --libs libconfig` +-libntfs_la_CFLAGS += `libgnutls-config --cflags` `pkg-config --cflags libconfig` ++libntfs_la_LDFLAGS += $(GNUTLS_LIBS) $(libconfig_LIBS) ++libntfs_la_CFLAGS += $(GNUTLS_CFLAGS) $(libconfig_CFLAGS) + endif + + libntfs_la_SOURCES = \ +--- a/libntfs/Makefile.in ++++ b/libntfs/Makefile.in +@@ -61,8 +61,8 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ +-@ENABLE_CRYPTO_TRUE@am__append_1 = `libgnutls-config --libs` `pkg-config --libs libconfig` +-@ENABLE_CRYPTO_TRUE@am__append_2 = `libgnutls-config --cflags` `pkg-config --cflags libconfig` ++@ENABLE_CRYPTO_TRUE@am__append_1 = $(GNUTLS_LIBS) $(libconfig_LIBS) ++@ENABLE_CRYPTO_TRUE@am__append_2 = $(GNUTLS_CFLAGS) $(libconfig_CFLAGS) + subdir = libntfs + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/libntfs-gnomevfs.8.in $(srcdir)/libntfs.8.in \ +--- a/ntfsprogs/Makefile.am ++++ b/ntfsprogs/Makefile.am +@@ -125,8 +125,8 @@ ntfsdump_logfile_LDFLAGS= $(AM_LFLAGS) + if ENABLE_CRYPTO + ntfsdecrypt_SOURCES = ntfsdecrypt.c utils.c utils.h + ntfsdecrypt_LDADD = $(AM_LIBS) +-ntfsdecrypt_LDFLAGS = $(AM_LFLAGS) `libgnutls-config --libs` +-ntfsdecrypt_CFLAGS = `libgnutls-config --cflags` ++ntfsdecrypt_LDFLAGS = $(AM_LFLAGS) $(GNUTLS_LIBS) ++ntfsdecrypt_CFLAGS = $(GNUTLS_CFLAGS) + endif + + # Extra targets +--- a/ntfsprogs/Makefile.in ++++ b/ntfsprogs/Makefile.in +@@ -449,8 +449,8 @@ ntfsdump_logfile_LDADD = $(AM_LIBS) + ntfsdump_logfile_LDFLAGS = $(AM_LFLAGS) + @ENABLE_CRYPTO_TRUE@ntfsdecrypt_SOURCES = ntfsdecrypt.c utils.c utils.h + @ENABLE_CRYPTO_TRUE@ntfsdecrypt_LDADD = $(AM_LIBS) +-@ENABLE_CRYPTO_TRUE@ntfsdecrypt_LDFLAGS = $(AM_LFLAGS) `libgnutls-config --libs` +-@ENABLE_CRYPTO_TRUE@ntfsdecrypt_CFLAGS = `libgnutls-config --cflags` ++@ENABLE_CRYPTO_TRUE@ntfsdecrypt_LDFLAGS = $(AM_LFLAGS) $(GNUTLS_LIBS) ++@ENABLE_CRYPTO_TRUE@ntfsdecrypt_CFLAGS = $(GNUTLS_CFLAGS) + all: all-am + + .SUFFIXES: diff --git a/utils/nvramtool/Makefile b/utils/nvramtool/Makefile new file mode 100644 index 0000000..2818b1e --- /dev/null +++ b/utils/nvramtool/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nvramtool +PKG_REV:=4887 +PKG_VERSION:=$(PKG_REV) +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=svn +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=svn://coreboot.org/coreboot/trunk/util/nvramtool +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz + +include $(INCLUDE_DIR)/package.mk + +define Package/nvramtool + SECTION:=utils + CATEGORY:=Utilities + URL:=http://www.coreboot.org/Nvramtool + TITLE:=Coreboot nvramtool + DEPENDS:=@TARGET_x86 +@PACKAGE_pciutils +zlib +endef + +define Package/nvramtool/description +nvramtool (previously known as lxbios and cmos_util) is a utility for +reading/writing coreboot parameters and displaying information from the coreboot +table in CMOS/NVRAM. +The program is intended only for x86-based Linux systems that use coreboot, but +can also be used for non-coreboot systems (e.g. for dumping all NVRAM bytes). +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ + LIBS="-lpci -lz" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + nvramtool +endef + +define Package/nvramtool/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/nvramtool $(1)/sbin/nvramtool +endef + +$(eval $(call BuildPackage,nvramtool)) diff --git a/utils/open2300/Makefile b/utils/open2300/Makefile new file mode 100644 index 0000000..a874069 --- /dev/null +++ b/utils/open2300/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2010 segal.di.ubi.pt +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=open2300 +PKG_RELEASE:=1.11 +PKG_VERSION:=1.11 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.ccccoimbra.com/open2300/ +PKG_MD5SUM:=804576790840c3bc4a288f3e0f83ce4d + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + + +include $(INCLUDE_DIR)/package.mk + + +define Package/open2300 + SECTION:=utils + CATEGORY:=Utilities + TITLE:=WS23XX weather station utilities + URL:=http://www.lavrsen.dk/twiki/bin/view/Open2300/WebHome + MAINTAINER:=Nuno Goncalves +endef + +define Package/open2300/description + This is an utility suite used to communicate with and collect data from a WS23XX wheather station. +endef + +define Package/open2300/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open2300 $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dump2300 $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/log2300 $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/fetch2300 $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wu2300 $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/cw2300 $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/history2300 $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/histlog2300 $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin2300 $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/xml2300 $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/light2300 $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/interval2300 $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/minmax2300 $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open2300-dist.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib2300.so.1.11 $(1)/usr/lib/ + ln -sf /usr/lib/lib2300.so.1.11 $(1)/usr/lib/lib2300.so +endef + +$(eval $(call BuildPackage,open2300)) diff --git a/utils/open2300/patches/x1.patch b/utils/open2300/patches/x1.patch new file mode 100644 index 0000000..86654f6 --- /dev/null +++ b/utils/open2300/patches/x1.patch @@ -0,0 +1,68 @@ +--- a/open2300.conf ++++ b/open2300.conf +@@ -0,0 +1,65 @@ ++# open2300.conf ++# ++# Configuration files for open2300 weather station tools ++# ++# Default locations in which the programs will search for this file: ++# Programs search in this sequence: ++# 1. Path to config file including filename given as parameter (not supported by all tools) ++# 2. ./open2300.conf (current working directory) ++# 3. /jffs/etc/open2300.conf (typical DD-WRT location) ++# 4. /etc/open2300.conf (typical Linux location) ++# ++# All names are case sensitive!!! ++ ++ ++# Set to your serial port and time zone ++# For Windows use COM1, COM2, COM2 etc ++# For Linux use /dev/ttyS0, /dev/ttyS1 etc ++ ++SERIAL_DEVICE /dev/tts/1 # /dev/ttyS0, /dev/ttyS1, COM1, COM2 etc ++TIMEZONE 1 # Hours Relative to UTC. East is positive, west is negative ++ ++ ++# Units of measure (set them to your preference) ++# The units of measure are ignored by wu2300 and cw2300 because both requires specific units ++ ++WIND_SPEED m/s # select MPH (miles/hour), m/s, or km/h ++TEMPERATURE C # Select C or F ++RAIN mm # Select mm or IN ++PRESSURE hPa # Select hPa, mb or INHG ++ ++ ++#### Citizens Weather variables (used only by cw2300) ++# Format for latitude is ++# [2 digit degrees][2 digit minutes].[2 decimals minutes - NOT seconds][N for north or S for south] ++# Format for longitude is ++# [3 digit degrees][2 digit minutes].[2 decimals minutes - NOT seconds][E for east or W for west] ++# Use leading zeros to get the format ####.##N (lat) and #####.##E (long) ++ ++CITIZEN_WEATHER_ID CW0000 # CW0000 should be replaced by HAM call or actual CW number ++CITIZEN_WEATHER_LATITUDE 5540.12N # DDMM.mmN or S - example 55 deg, 40.23 minutes north ++CITIZEN_WEATHER_LONGITUDE 01224.60E # DDDMM.mmE or W - example 12 deg, 24.60 minutes east ++ ++APRS_SERVER rotate.aprs.net 14580 # These are the APRS servers and ports for ++APRS_SERVER first.aprs.net 14580 # Citizens Weather reporting. ++APRS_SERVER second.aprs.net 14580 # They they are tried in the entered order ++APRS_SERVER third.aprs.net 14580 # you may enter up to 5 alternate servers ++ ++ ++#### WEATHER UNDERGROUND variables (used only by wu2300) ++ ++WEATHER_UNDERGROUND_ID WUID # ID received from Weather Underground ++WEATHER_UNDERGROUND_PASSWORD WUPASSWORD # Password for Weather Underground ++ ++ ++### MYSQL Settings (only used by mysql2300) ++ ++#MYSQL_HOST localhost # Localhost or IP address/host name ++#MYSQL_USERNAME open2300 # Name of the MySQL user that has access to the database ++#MYSQL_PASSWORD mysql2300 # Password for the MySQL user ++#MYSQL_DATABASE open2300 # Named of your database ++#MYSQL_PORT 0 # TCP/IP Port number. Zero means default ++ ++#PGSQL_CONNECT hostaddr='127.0.0.1'dbname='open2300'user='postgres'password='sql' # Connection string ++#PGSQL_TABLE weather # Table name ++#PGSQL_STATION open2300 # Unique station id diff --git a/utils/open2300/patches/x2.patch b/utils/open2300/patches/x2.patch new file mode 100644 index 0000000..7e43e6f --- /dev/null +++ b/utils/open2300/patches/x2.patch @@ -0,0 +1,168 @@ +--- a/Makefile ++++ b/Makefile +@@ -15,91 +15,91 @@ + prefix = /usr/local + exec_prefix = ${prefix} + bindir = ${exec_prefix}/bin ++libdir = ${prefix}/lib + + ######################################### + + CC = gcc +-OBJ = open2300.o rw2300.o linux2300.o win2300.o +-LOGOBJ = log2300.o rw2300.o linux2300.o win2300.o +-FETCHOBJ = fetch2300.o rw2300.o linux2300.o win2300.o +-WUOBJ = wu2300.o rw2300.o linux2300.o win2300.o +-CWOBJ = cw2300.o rw2300.o linux2300.o win2300.o +-DUMPOBJ = dump2300.o rw2300.o linux2300.o win2300.o +-HISTOBJ = history2300.o rw2300.o linux2300.o win2300.o +-HISTLOGOBJ = histlog2300.o rw2300.o linux2300.o win2300.o +-DUMPBINOBJ = bin2300.o rw2300.o linux2300.o win2300.o +-XMLOBJ = xml2300.o rw2300.o linux2300.o win2300.o +-PGSQLOBJ = pgsql2300.o rw2300.o linux2300.o win2300.o +-LIGHTOBJ = light2300.o rw2300.o linux2300.o win2300.o +-INTERVALOBJ = interval2300.o rw2300.o linux2300.o win2300.o +-MINMAXOBJ = minmax2300.o rw2300.o linux2300.o win2300.o +-MYSQLHISTLOGOBJ = mysqlhistlog2300.o rw2300.o linux2300.o win2300.o ++LIB = lib2300 ++LIB_C = rw2300.c linux2300.c ++LIBOBJ = rw2300.o linux2300.o + + VERSION = 1.11 + + CFLAGS = -Wall -O3 -DVERSION=\"$(VERSION)\" +-CC_LDFLAGS = -lm +-CC_WINFLAG = +-# For Windows - comment the two line above and un-comment the two lines below. +-#CC_LDFLAGS = -lm -lwsock32 +-#CC_WINFLAG = -mwindows ++CC_LDFLAGS = -L. -lm -l2300 ++LFLAGS = -shared -Wl,-soname + INSTALL = install ++MAKE_EXEC = $(CC) $(CFLAGS) $@.c -o $@ $(CC_LDFLAGS) + + ####### Build rules + +-all: open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 mysql2300 mysqlhistlog2300 ++all: open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 ++#mysql2300 mysqlhistlog2300 + +-open2300 : $(OBJ) +- $(CC) $(CFLAGS) -o $@ $(OBJ) $(CC_LDFLAGS) +- +-dump2300 : $(DUMPOBJ) +- $(CC) $(CFLAGS) -o $@ $(DUMPOBJ) $(CC_LDFLAGS) ++lib2300 : ++ $(CC) -c -fPIC $(CFLAGS) $(LIB_C) ++ $(CC) $(LFLAGS),$@.so -o $@.so.$(VERSION) $(LIBOBJ) ++ ln -sf $@.so.$(VERSION) $@.so ++ ++open2300 : $(LIB) ++ $(MAKE_EXEC) + +-log2300 : $(LOGOBJ) +- $(CC) $(CFLAGS) -o $@ $(LOGOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) ++dump2300 : $(LIB) ++ $(MAKE_EXEC) + +-fetch2300 : $(FETCHOBJ) +- $(CC) $(CFLAGS) -o $@ $(FETCHOBJ) $(CC_LDFLAGS) ++log2300 : $(LIB) ++ $(MAKE_EXEC) + +-wu2300 : $(WUOBJ) +- $(CC) $(CFLAGS) -o $@ $(WUOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) ++fetch2300 : $(LIB) ++ $(MAKE_EXEC) ++ ++srv2300 : $(LIB) ++ $(MAKE_EXEC) ++ ++wu2300 : $(LIB) ++ $(MAKE_EXEC) + +-cw2300 : $(CWOBJ) +- $(CC) $(CFLAGS) -o $@ $(CWOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) ++cw2300 : $(LIB) ++ $(MAKE_EXEC) + +-history2300 : $(HISTOBJ) +- $(CC) $(CFLAGS) -o $@ $(HISTOBJ) $(CC_LDFLAGS) ++history2300 : $(LIB) ++ $(MAKE_EXEC) + +-histlog2300 : $(HISTLOGOBJ) +- $(CC) $(CFLAGS) -o $@ $(HISTLOGOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) ++histlog2300 : $(LIB) ++ $(MAKE_EXEC) + +-bin2300 : $(DUMPBINOBJ) +- $(CC) $(CFLAGS) -o $@ $(DUMPBINOBJ) $(CC_LDFLAGS) ++bin2300 : $(LIB) ++ $(MAKE_EXEC) + +-xml2300 : $(XMLOBJ) +- $(CC) $(CFLAGS) -o $@ $(XMLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) ++xml2300 : $(LIB) ++ $(MAKE_EXEC) + +-mysql2300: +- $(CC) $(CFLAGS) -o mysql2300 mysql2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient ++mysql2300: $(LIB) ++ $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/mysql -L/usr/lib/mysql $(CC_LDFLAGS) -lmysqlclient + +-pgsql2300: $(PGSQLOBJ) +- $(CC) $(CFLAGS) -o $@ $(PGSQLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/pgsql -L/usr/lib/pgsql -lpq ++pgsql2300: $(LIB) ++ $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/pgsql -L/usr/lib/pgsql $(CC_LDFLAGS) -lpq + +-light2300: $(LIGHTOBJ) +- $(CC) $(CFLAGS) -o $@ $(LIGHTOBJ) $(CC_LDFLAGS) ++light2300: $(LIB) ++ $(MAKE_EXEC) + +-interval2300: $(INTERVALOBJ) +- $(CC) $(CFLAGS) -o $@ $(INTERVALOBJ) $(CC_LDFLAGS) ++interval2300: $(LIB) ++ $(MAKE_EXEC) + +-minmax2300: $(MINMAXOBJ) +- $(CC) $(CFLAGS) -o $@ $(MINMAXOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) ++minmax2300: $(LIB) ++ $(MAKE_EXEC) + +-mysqlhistlog2300 : +- $(CC) $(CFLAGS) -o mysqlhistlog2300 mysqlhistlog2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient ++mysqlhistlog2300 : $(LIB) ++ $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/mysql -L/usr/lib/mysql $(CC_LDFLAGS) -lmysqlclient + + + install: + mkdir -p $(bindir) ++ mkdir -p $(libdir) ++ $(INSTALL) $(LIB).so.$(VERSION) $(libdir) ++ ln -sf $(libdir)/$(LIB).so.$(VERSION) $(libdir)/$(LIB).so ++ $(INSTALL) srv2300 $(bindir) + $(INSTALL) open2300 $(bindir) + $(INSTALL) dump2300 $(bindir) + $(INSTALL) log2300 $(bindir) +@@ -111,14 +111,11 @@ + $(INSTALL) light2300 $(bindir) + $(INSTALL) interval2300 $(bindir) + $(INSTALL) minmax2300 $(bindir) +- $(INSTALL) mysql2300 $(bindir) +- $(INSTALL) mysqlhistlog2300 $(bindir) ++# $(INSTALL) mysql2300 $(bindir) ++# $(INSTALL) mysqlhistlog2300 $(bindir) + + uninstall: +- rm -f $(bindir)/open2300 $(bindir)/dump2300 $(bindir)/log2300 $(bindir)/fetch2300 $(bindir)/wu2300 $(bindir)/cw2300 $(bindir)/xml2300 $(bindir)/light2300 $(bindir)/interval2300 $(bindir)/minmax2300 $(bindir)/mysql2300 $(bindir)/mysqlhistlog2300 ++ rm -f $(libdir)/$(LIB).* $(bindir)/open2300 $(bindir)/dump2300 $(bindir)/log2300 $(bindir)/fetch2300 $(bindir)/srv2300 $(bindir)/wu2300 $(bindir)/cw2300 $(bindir)/xml2300 $(bindir)/light2300 $(bindir)/interval2300 $(bindir)/minmax2300 $(bindir)/histlog2300 $(bindir)/mysql2300 $(bindir)/mysqlhistlog2300 + + clean: +- rm -f *~ *.o open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 mysql2300 pgsql2300 light2300 interval2300 minmax2300 mysql2300 mysqlhistlog2300 +- +-cleanexe: +- rm -f *~ *.o open2300.exe dump2300.exe log2300.exe fetch2300.exe wu2300.exe cw2300.exe history2300.exe histlog2300.exe bin2300.exe xml2300.exe mysql2300.exe pgsql2300.exe light2300.exe interval2300.exe minmax2300.exe +\ No newline at end of file ++ rm -f *~ *.o *.so* open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 mysql2300 pgsql2300 light2300 interval2300 minmax2300 mysql2300 mysqlhistlog2300 diff --git a/utils/owfs/Makefile b/utils/owfs/Makefile new file mode 100644 index 0000000..eb2b524 --- /dev/null +++ b/utils/owfs/Makefile @@ -0,0 +1,253 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=owfs +PKG_VERSION:=2.8p4 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=beccd8765184b2abea0a3f28dc466ea3 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +# +# templates +# + +define Package/$(PKG_NAME)/Default + TITLE:=OWFS (1-Wire File System) + URL:=http://owfs.sourceforge.net/ + SECTION:=net + CATEGORY:=Network + SUBMENU:=Filesystem +endef + +define Package/$(PKG_NAME)/Default/description + OWFS is a suite of programs that designed to make the 1-wire bus and its + devices easily accessible. The underlying priciple is to create a virtual + filesystem, with the unique ID being the directory, and the individual + properties of the device are represented as simple files that can be read + and written. + + Details of the individual slave or master design are hidden behind a + consistent interface. The goal is to provide an easy set of tools for a + software designer to create monitoring or control applications. There are + some performance enhancements in the implementation, including data caching, + parallel access to bus masters, and aggregation of device communication. + Still the fundemental goal has been ease of use, flexibility and correctness + rather than speed. +endef + +define Package/owfs/Server + $(call Package/owfs/Default) + DEPENDS:=+libow +libpthread +endef + +define Package/owfs/Library + $(call Package/owfs/Default) + SECTION:=libs + CATEGORY:=Libraries +endef + +define Package/owfs/Utility + $(call Package/owfs/Default) + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libow +endef + +# +# shared libraries +# + +define Package/libow + $(call Package/owfs/Library) + DEPENDS:=+libusb +libpthread + TITLE:=OWFS - common shared library +endef + +define Package/libow/description + $(call Package/$(PKG_NAME)/Default/description) + + This package contains the OWFS library. +endef + +define Package/libow-capi + $(call Package/owfs/Library) + DEPENDS:=+libow + TITLE:=OWFS - C-API library +endef + +define Package/libow-capi/description + $(call Package/$(PKG_NAME)/Default/description) + + This package contains the OWFS C-API library. +endef + +# +# utilities +# + +define Package/owshell + $(call Package/owfs/Utility) + TITLE:=OWFS - shell utilities +endef + +define Package/owshell/description + $(call Package/$(PKG_NAME)/Default/description) + + This package contains the OWFS shell utilities. +endef + +define Package/owfs + $(call Package/owfs/Utility) + # libfuse depends on kmod-fuse, no need to declare dependency + DEPENDS+= +libfuse +fuse-utils + TITLE:=OWFS - fuse file system +endef + +define Package/owfs/description + $(call Package/$(PKG_NAME)/Default/description) + + This package contains the OWFS fuse filesystem. +endef + +# +# network daemons +# + +define Package/owhttpd + $(call Package/owfs/Server) + TITLE:=OWFS - http server +endef + +define Package/owhttpd/description + $(call Package/$(PKG_NAME)/Default/description) + + This package contains the OWFS http server. +endef + +define Package/owftpd + $(call Package/owfs/Server) + TITLE:=OWFS - ftp server +endef + +define Package/owftpd/description + $(call Package/$(PKG_NAME)/Default/description) + + This package contains the OWFS ftp server. +endef + +define Package/owserver + $(call Package/owfs/Server) + TITLE:=OWFS - network server +endef + +define Package/owserver/description + $(call Package/$(PKG_NAME)/Default/description) + + This package contains the OWFS network server. +endef + +CONFIGURE_ARGS += \ + --enable-owftpd \ + --enable-owserver \ + --enable-owhttpd \ + --enable-owfs \ + --with-fuseinclude="$(STAGING_DIR)/usr/include" \ + --with-fuselib="$(STAGING_DIR)/usr/lib" \ + --enable-shared \ + --disable-rpath \ + --enable-zero \ + --disable-parport \ + --disable-ownfsd \ + --disable-ownet \ + --disable-owpython \ + --disable-libow-perl \ + --disable-owphp \ + --disable-owtcl \ + --disable-owside \ + --disable-swig \ + +CONFIGURE_VARS += \ + LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -Wl,-rpath-link=$(TOOLCHAIN_DIR)/usr/lib" \ + lt_cv_sys_lib_dlsearch_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \ + lt_cv_sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \ + shrext_cmds=".so" \ + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + HOST_CPU="$(PKGARCH)" \ + all install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/ow{capi,fs_config}.h $(STAGING_DIR)/usr/include/ + $(INSTALL_DIR) $(STAGING_DIR)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libow{,capi}*.so* $(STAGING_DIR)/usr/lib/ +endef + +define Package/owfs/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owfs $(1)/usr/bin/ +endef + +define Package/owshell/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owget $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owread $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owwrite $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owdir $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owpresent $(1)/usr/bin/ +endef + + +define Package/owserver/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owserver $(1)/usr/bin/ +endef + +define Package/owhttpd/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owhttpd $(1)/usr/bin/ +endef + +define Package/owftpd/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owftpd $(1)/usr/bin/ +endef + + +define Package/libow/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libow-*.so.* $(1)/usr/lib/ +endef + +define Package/libow-capi/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libowcapi-*.so.* $(1)/usr/lib/ +endef + + +$(eval $(call BuildPackage,owfs)) +$(eval $(call BuildPackage,owshell)) + +$(eval $(call BuildPackage,owserver)) +$(eval $(call BuildPackage,owhttpd)) +$(eval $(call BuildPackage,owftpd)) + +$(eval $(call BuildPackage,libow)) +$(eval $(call BuildPackage,libow-capi)) diff --git a/utils/pciutils/Makefile b/utils/pciutils/Makefile new file mode 100644 index 0000000..31f7a02 --- /dev/null +++ b/utils/pciutils/Makefile @@ -0,0 +1,67 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pciutils +PKG_VERSION:=3.1.7 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils +PKG_MD5SUM:=35222edb86b50a6641352c66fe829b2e + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/pciutils + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Linux PCI Utilities + URL:=http://mj.ucw.cz/pciutils.shtml + DEPENDS:=+zlib +endef + +define Package/pciutils/description + This package contains various utilities for inspecting and setting of + devices connected to the PCI bus. +endef + +define Package/pciutils/postinst +#!/bin/sh +[ -z "$${IPKG_INSTROOT}" ] || \ +(cd $${PKG_ROOT}/usr/share; $${PKG_ROOT}/usr/sbin/update-pciids; rm pci.ids.gz.old) +exit 0 +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ + PREFIX="/usr" \ + HOST="$(GNU_TARGET_NAME)" \ + ZLIB="yes" \ + +ifneq ($(CONFIG_USE_EGLIBC)$(CONFIG_USE_GLIBC),) +TARGET_LDFLAGS += -lresolv +endif + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib/libpci.a $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/include/pci + $(CP) $(foreach i,pci.h config.h header.h types.h, \ + $(PKG_BUILD_DIR)/lib/$(i)) $(1)/usr/include/pci +endef + +define Package/pciutils/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{lspci,setpci,update-pciids} $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/share + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids.gz $(1)/usr/share/ +endef + +$(eval $(call BuildPackage,pciutils)) diff --git a/utils/pciutils/patches/100-remove-no-timestamping.patch b/utils/pciutils/patches/100-remove-no-timestamping.patch new file mode 100644 index 0000000..93bc85f --- /dev/null +++ b/utils/pciutils/patches/100-remove-no-timestamping.patch @@ -0,0 +1,11 @@ +--- a/update-pciids.sh ++++ b/update-pciids.sh +@@ -33,7 +33,7 @@ if which curl >/dev/null 2>&1 ; then + DL="curl -o $DEST.new $SRC" + ${quiet} && DL="$DL -s -S" + elif which wget >/dev/null 2>&1 ; then +- DL="wget --no-timestamping -O $DEST.new $SRC" ++ DL="wget -O $DEST.new $SRC" + ${quiet} && DL="$DL -q" + elif which lynx >/dev/null 2>&1 ; then + DL="eval lynx -source $SRC >$DEST.new" diff --git a/utils/pciutils/patches/101-no-strip.patch b/utils/pciutils/patches/101-no-strip.patch new file mode 100644 index 0000000..032118c --- /dev/null +++ b/utils/pciutils/patches/101-no-strip.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -101,7 +101,7 @@ distclean: clean + install: all + # -c is ignored on Linux, but required on FreeBSD + $(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8 $(DESTDIR)$(MANDIR)/man7 +- $(INSTALL) -c -m 755 $(STRIP) lspci setpci $(DESTDIR)$(SBINDIR) ++ $(INSTALL) -c -m 755 lspci setpci $(DESTDIR)$(SBINDIR) + $(INSTALL) -c -m 755 update-pciids $(DESTDIR)$(SBINDIR) + $(INSTALL) -c -m 644 $(PCI_IDS) $(DESTDIR)$(IDSDIR) + $(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(DESTDIR)$(MANDIR)/man8 diff --git a/utils/pciutils/patches/102-compressed-ids.patch b/utils/pciutils/patches/102-compressed-ids.patch new file mode 100644 index 0000000..b252603 --- /dev/null +++ b/utils/pciutils/patches/102-compressed-ids.patch @@ -0,0 +1,31 @@ +--- a/update-pciids.sh ++++ b/update-pciids.sh +@@ -6,9 +6,8 @@ set -e + SRC="http://pciids.sourceforge.net/v2.2/pci.ids" + DEST=pci.ids + PCI_COMPRESSED_IDS= +-GREP=grep + +-# if pci.ids is read-only (because the filesystem is read-only), ++# if pci.ids.gz is read-only (because the filesystem is read-only), + # then just skip this whole process. + if ! touch ${DEST} >/dev/null 2>&1 ; then + ${quiet} || echo "${DEST} is read-only, exiting." 1>&2 +@@ -18,7 +17,7 @@ fi + if [ -n "$PCI_COMPRESSED_IDS" ] ; then + DECOMP="cat" + SRC="$SRC.gz" +- GREP=zgrep ++ DEST="$DEST.gz" + elif which bzip2 >/dev/null 2>&1 ; then + DECOMP="bzip2 -d" + SRC="$SRC.bz2" +@@ -53,7 +52,7 @@ if ! $DECOMP <$DEST.new >$DEST.neww ; th + exit 1 + fi + +-if ! $GREP >/dev/null "^C " $DEST.neww ; then ++if ! zcat $DEST.neww | grep >/dev/null "^C " ; then + echo >&2 "update-pciids: missing class info, probably truncated file" + exit 1 + fi diff --git a/utils/pciutils/patches/103-relative-path-ids.patch b/utils/pciutils/patches/103-relative-path-ids.patch new file mode 100644 index 0000000..6ccea29 --- /dev/null +++ b/utils/pciutils/patches/103-relative-path-ids.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -78,7 +78,7 @@ setpci.o: setpci.c pciutils.h $(PCIINC) + common.o: common.c pciutils.h $(PCIINC) + + update-pciids: update-pciids.sh +- sed <$< >$@ "s@^DEST=.*@DEST=$(IDSDIR)/$(PCI_IDS)@;s@^PCI_COMPRESSED_IDS=.*@PCI_COMPRESSED_IDS=$(PCI_COMPRESSED_IDS)@" ++ sed <$< >$@ "s@^PCI_COMPRESSED_IDS=.*@PCI_COMPRESSED_IDS=$(PCI_COMPRESSED_IDS)@" + chmod +x $@ + + # The example of use of libpci diff --git a/utils/pciutils/patches/104-resolv.patch b/utils/pciutils/patches/104-resolv.patch new file mode 100644 index 0000000..dbd46aa --- /dev/null +++ b/utils/pciutils/patches/104-resolv.patch @@ -0,0 +1,11 @@ +--- a/lib/configure ++++ b/lib/configure +@@ -57,7 +57,7 @@ echo >>$c "#define PCI_OS_`echo $sys | t + echo >$m 'WITH_LIBS=' + + echo_n "Looking for access methods..." +-LIBRESOLV=-lresolv ++LIBRESOLV= + + case $sys in + linux*) diff --git a/utils/pcmciautils/Makefile b/utils/pcmciautils/Makefile new file mode 100644 index 0000000..d2e2720 --- /dev/null +++ b/utils/pcmciautils/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pcmciautils +PKG_VERSION:=018 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/pcmcia +PKG_MD5SUM:=5d85669b3440baa4532363da6caaf1b4 + +include $(INCLUDE_DIR)/package.mk + +define Package/pcmciautils + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libsysfs @!LINUX_2_4 @PCMCIA_SUPPORT + TITLE:=PCMCIA Utilities + URL:=http://www.kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html +endef + +define Build/Compile + $(call Build/Compile/Default, \ + LD="$(TARGET_CC)" UDEV=false \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \ + -DPCMCIAUTILS_VERSION=\\\"$(PKG_VERSION)\\\"" \ + prefix=/usr all \ + ) +endef + +define Package/pcmciautils/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/pccardctl $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/pcmcia-check-broken-cis $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/pcmcia-socket-startup $(1)/usr/sbin/ + rm -f $(1)/usr/sbin/lspcmcia + ln -s pccardctl $(1)/usr/sbin/lspcmcia + $(INSTALL_DIR) $(1)/etc/pcmcia/ + $(CP) $(PKG_BUILD_DIR)/config/config.opts $(1)/etc/pcmcia/ + $(CP) files/* $(1)/ +endef +$(eval $(call BuildPackage,pcmciautils)) diff --git a/utils/pcmciautils/files/etc/hotplug.d/pcmcia/pcmcia.agent b/utils/pcmciautils/files/etc/hotplug.d/pcmcia/pcmcia.agent new file mode 100644 index 0000000..537c50a --- /dev/null +++ b/utils/pcmciautils/files/etc/hotplug.d/pcmcia/pcmcia.agent @@ -0,0 +1,28 @@ +#!/bin/sh +# Copyright (C) 2008 OpenWrt.org + +case "$ACTION" in + add) + SYSFS=/sys/bus/pcmcia/devices/ + DEVPATH=$SOCKET_NO.$((0x$DEVICE_NO)) + + # check whether the CIS is completely broken + if [ ! -h $SYSFS$DEVPATH/driver ]; then + CISFILE=$(/usr/sbin/pcmcia-check-broken-cis $SOCKET_NO) + echo PCMCIA: $CISFILE; + if [ ! -z $CISFILE ]; then + if [ -f /lib/firmware/$CISFILE ]; then + cat /lib/firmware/$CISFILE > $SYSFS/class/pcmcia_socket/pcmcia_socket$(SOCKET_NO)/cis + fi; + fi; + fi; + + # allow a match solely based on the "function ID" field + if [ ! -h $SYSFS$DEVPATH/driver ]; then + if [ -w $SYSFS$DEVPATH/allow_func_id_match ]; then + echo PCMCIA: allowing func_id based match for PCMCIA device $SOCKET_NO.$DEVICE_NO + echo -n "42" > $SYSFS$DEVPATH/allow_func_id_match; + fi; + fi; + ;; +esac diff --git a/utils/pcmciautils/files/etc/hotplug.d/pcmcia_socket/pcmcia_socket.agent b/utils/pcmciautils/files/etc/hotplug.d/pcmcia_socket/pcmcia_socket.agent new file mode 100644 index 0000000..79b3524 --- /dev/null +++ b/utils/pcmciautils/files/etc/hotplug.d/pcmcia_socket/pcmcia_socket.agent @@ -0,0 +1,18 @@ +#!/bin/sh +# Copyright (C) 2008 OpenWrt.org + +case "$ACTION" in + add) + echo PCMCIA: socket number: $SOCKET_NO + + sleep 1; + /usr/sbin/pcmcia-socket-startup $SOCKET_NO + DONE_FILE=/sys/class/pcmcia_socket/pcmcia_socket$SOCKET_NO/available_resources_setup_done + if [ -f $DONE_FILE ]; then + if [ -w $DONE_FILE ]; then + echo -n "42" > $DONE_FILE + fi; + fi; + ;; + +esac diff --git a/utils/pcmciautils/files/etc/init.d/pcmcia b/utils/pcmciautils/files/etc/init.d/pcmcia new file mode 100755 index 0000000..16f2276 --- /dev/null +++ b/utils/pcmciautils/files/etc/init.d/pcmcia @@ -0,0 +1,25 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org + +START=42 +start() { + if [ -d /sys/bus/pcmcia/devices/ ]; then + # 2.6 kernels + cd /sys/bus/pcmcia/devices/ + for PCMCIA_DEVICE in *; do + if [ $PCMCIA_DEVICE == \* ]; then + continue; + fi; + MODALIAS=$(cat $PCMCIA_DEVICE/modalias) + echo PCMCIA: $MODALIAS $PCMCIA_DEVICE + if [ -z $MODALIAS ]; then + continue; + fi; + ACTION=add + SOCKET_NO=$(echo $PCMCIA_DEVICE | cut -d. -f1) + DEVICE_NO=$(echo $MODALIAS | sed 's/.*pfn\(..\).*/\1/') + export MODALIAS ACTION SOCKET_NO DEVICE_NO + /sbin/hotplug-call pcmcia + done; + fi; +} diff --git a/utils/pcmciautils/files/etc/init.d/pcmcia_socket b/utils/pcmciautils/files/etc/init.d/pcmcia_socket new file mode 100755 index 0000000..fdd0b8c --- /dev/null +++ b/utils/pcmciautils/files/etc/init.d/pcmcia_socket @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org + +START=41 +start() { + if [ -d /sys/class/pcmcia_socket/ ]; then + # 2.6 kernels + cd /sys/class/pcmcia_socket/ + for PCMCIA_SOCKET in *; do + if [ $PCMCIA_SOCKET == \* ]; then + continue; + fi; + SOCKET_NO=$(echo $PCMCIA_SOCKET | cut -b14-) + ACTION=add + export SOCKET_NO ACTION + /sbin/hotplug-call pcmcia_socket + done; + fi; +} diff --git a/utils/pcsc-lite/Makefile b/utils/pcsc-lite/Makefile new file mode 100644 index 0000000..f8c434c --- /dev/null +++ b/utils/pcsc-lite/Makefile @@ -0,0 +1,102 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=pcsc-lite +PKG_VERSION:=1.5.5 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://alioth.debian.org/frs/download.php/3082 +PKG_MD5SUM:=6707e967fc8bb398a5d1b1089d4dff63 + +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/pcsc-lite/Default + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Middleware to access a smart card using SCard API (PC/SC). + URL:=http://pcsclite.alioth.debian.org/ +endef + +define Package/pcsc-lite/Default/description + The purpose of PC/SC Lite is to provide a Windows(R) SCard + interface in a very small form factor for communicating to + smart cards and smart cards readers. +endef + +define Package/libpcsclite + $(call Package/pcsc-lite/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE+= (library) + DEPENDS:=+libusb +libpthread +endef + +define Package/libpcsclite/description + $(call Package/pcsc-lite/Default/description) + . + This package contains the PC/SC shared library. +endef + +define Package/pcscd + $(call Package/pcsc-lite/Default) + SECTION:=utils + CATEGORY:=Utilities + TITLE+= (daemon) + DEPENDS:=+libpcsclite +endef + +define Package/pcscd/description + $(call Package/pcsc-lite/Default/description) + . + This package contains the PC/SC daemon. +endef + +TARGET_CFLAGS += $(FPIC) +TARGET_LDFLAGS += -lpthread + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-libhal \ + --enable-libusb \ + --enable-usbdropdir=/usr/lib/pcsc/drivers \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/PCSC + $(CP) $(PKG_INSTALL_DIR)/usr/include/PCSC/* $(1)/usr/include/PCSC/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcsclite.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libpcsclite/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.so.* $(1)/usr/lib/ +endef + +define Package/pcscd/conffiles +/etc/reader.conf.d/reader.conf +endef + +define Package/pcscd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pcscd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/pcscd.init $(1)/etc/init.d/pcscd + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/update-reader.conf $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/reader.conf.d + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/reader.conf.d/reader.conf $(1)/etc/reader.conf.d/ +endef + +$(eval $(call BuildPackage,libpcsclite)) +$(eval $(call BuildPackage,pcscd)) diff --git a/utils/pcsc-lite/files/pcscd.init b/utils/pcsc-lite/files/pcscd.init new file mode 100644 index 0000000..cd9ea27 --- /dev/null +++ b/utils/pcsc-lite/files/pcscd.init @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start() { + pcscd +} + +stop() { + killall pcscd +} diff --git a/utils/picocom/Makefile b/utils/picocom/Makefile new file mode 100644 index 0000000..0cd0c50 --- /dev/null +++ b/utils/picocom/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=picocom +PKG_VERSION:=1.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://picocom.googlecode.com/files +PKG_MD5SUM:=426c3d30b82cbc80b0dafdccd6020c6c + +include $(INCLUDE_DIR)/package.mk + +define Package/picocom + SECTION:=utils + CATEGORY:=Utilities + TITLE:=A minimal dumb-terminal emulation program + URL:=http://code.google.com/p/picocom/ + SUBMENU:=Terminal +endef + +define Package/picocom/description + As its name suggests, picocom is a minimal dumb-terminal emulation + program. It is, in principle, very much like minicom, only it's pico + instead of mini! It was designed to serve as a simple, manual, modem + configuration, testing, and debugging tool. It has also served (quite + well) as a low-tech "terminal-window" to allow operator intervention + in PPP connection scripts. It could also prove useful in many other + similar tasks. +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + picocom +endef + +define Package/picocom/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/picocom $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,picocom)) diff --git a/utils/pipacs/Makefile b/utils/pipacs/Makefile new file mode 100644 index 0000000..5d1b08f --- /dev/null +++ b/utils/pipacs/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pipacs +PKG_RELEASE:=2 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/pipacs + SECTION:=utils + CATEGORY:=Utilities + TITLE:=UNIX socket accounting/wiewer program +endef + +define Build/Prepare + $(CP) ./src/* $(PKG_BUILD_DIR) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + all +endef + +define Package/pipacs/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/pipacs $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,pipacs)) diff --git a/utils/pipacs/src/Makefile b/utils/pipacs/src/Makefile new file mode 100644 index 0000000..3a48e88 --- /dev/null +++ b/utils/pipacs/src/Makefile @@ -0,0 +1,14 @@ + +EXTRA_CFLAGS := -c -I. +PIPACS_OBJS := pipacs.o parser.o + +all: pipacs + +%.o: %.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ $^ + +pipacs: $(PIPACS_OBJS) + $(CC) -o $@ $^ + +clean: + rm -f *.o *.so pipacs diff --git a/utils/pipacs/src/parser.c b/utils/pipacs/src/parser.c new file mode 100644 index 0000000..330d7cd --- /dev/null +++ b/utils/pipacs/src/parser.c @@ -0,0 +1,907 @@ +#include +#include +#include +#include +//#include +#include "parser.h" + +#define printit + +extern BOOL bFilter; +extern int iline; +extern char * author; +extern char myipname[]; +extern int justheader; +extern int gre,sortbysize,fromip,toip; +int nomac=1; +int mostird=0; +char mypbuff[2048]; +// accounting variables +#define MAXHASH 0xffff +#define MAXTCPPORT 4096 +unsigned long *iph=NULL; //[MAXHASH]; + +typedef struct { + unsigned short from; + unsigned short to; + unsigned long byte; + unsigned short pkt; + unsigned short sport; + unsigned short dport; +} ta; + +ta *acc = NULL; +unsigned long tcppb[MAXTCPPORT]; +unsigned long tcppp[MAXTCPPORT]; +unsigned long typp[255]; +unsigned long typb[255]; +unsigned long udpb,tcpb,udpp,tcpp; +time_t elapsed=0; +int iCycle=10; +int iScreen=1; +int iFile=0; +long lNum=0; +char filename[128]; +char intlist[128]; +int iRun=1; +int iDetail=0; +FILE *f=NULL; +int iProto=0; +int iSum=0; +char execname[255]; +char pbuf[8196]; +char str[255]; +extern char pattern[]; +#ifndef LINUX +int iLnxplus=0; // Windows buffer without the MAC frame ! +#else +int iLnxplus=14; // Linux plus IP header len =14 !!! +#endif +// +// A list of protocol types in the IP protocol header +// +char *szProto[255] = {"IP", // 0 + "ICMP", // 1 + "IGMP", // 2 + "GGP", // 3 + "IP", // 4 + "ST", // 5 + "TCP", // 6 + "UCL", // 7 + "EGP", // 8 + "IGP", // 9 + "BBN-RCC-MON", // 10 + "NVP-II", // 11 + "PUP", // 12 + "ARGUS", // 13 + "EMCON", // 14 + "XNET", // 15 + "CHAOS", // 16 + "UDP", // 17 + "MUX", // 18 + "DCN-MEAS", // 19 + "HMP", // 20 + "PRM", // 21 + "XNS-IDP", // 22 + "TRUNK-1", // 23 + "TRUNK-2", // 24 + "LEAF-1", // 25 + "LEAF-2", // 26 + "RDP", // 27 + "IRTP", // 28 + "ISO-TP4", // 29 + "NETBLT", // 30 + "MFE-NSP", // 31 + "MERIT-INP", // 32 + "SEP", // 33 + "3PC", // 34 + "IDPR", // 35 + "XTP", // 36 + "DDP", // 37 + "IDPR-CMTP", // 38 + "TP++", // 39 + "IL", // 40 + "SIP", // 41 + "SDRP", // 42 + "SIP-SR", // 43 + "SIP-FRAG", // 44 + "IDRP", // 45 + "RSVP", // 46 + "GRE", // 47 + "MHRP", // 48 + "BNA", // 49 + "IPSEC-ESP", // 50 + "IPSEC-AH", // 51 + "I-NLSP", // 52 + "SWIPE", // 53 + "NHRP", // 54 + "?55?", // 55 + "?56?", // 56 + "SKIO", // 57 + "V6ICMP", // 58 + "V6NoNXT", // 59 + "V6OPT", // 60 + "int.host", // 61 + "CFTP", // 62 + "loc.net", // 63 + "SAT-EXPAK", // 64 + "KRYPTOLAN", // 65 + "RVD", // 66 + "IPPC", // 67 + "dist.fs", // 68 + "SAT-MON", // 69 + "VISA", // 70 + "IPCV", // 71 + "CPNX", // 72 + "CPHB", // 73 + "WSN", // 74 + "PVP", // 75 + "BR-SAT-MON", // 76 + "SUN-ND", // 77 + "WB-MON", // 78 + "WB-EXPAK", // 79 + "ISO-IP", // 80 + "VMTP", // 81 + "SECURE-VMTP",// 82 + "VINES", // 83 + "TTP", // 84 + "NSFNET-IGP", // 85 + "DGP", // 86 + "TCF", // 87 + "IGRP", // 88 + "OSPF", // 89 + "Sprite-RPC", // 90 + "LARP", // 91 + "MTP", // 92 + "AX.25", // 93 + "IPIP", // 94 + "MICP", // 95 + "SCC-SP", // 96 + "ETHERIP", // 97 + "ENCAP", // 98 + "priv.enc", // 99 + "GMTP" // 99 + }; +// +// The types of IGMP messages +// +char *szIgmpType[] = {"", + "Host Membership Query", + "HOst Membership Report", + "", + "", + "", + "Version 2 Membership Report", + "Leave Group", + "", + "" + }; + +// +// Function: PrintRawBytes +// +// Description: +// This function simply prints out a series of bytes +// as hexadecimal digits. +// +void PrintRawBytes(BYTE *ptr, DWORD len) +{ + int i,j; +// if (! iFile) { +*(ptr+len)=0; +if ((*pattern==0) || strstr(ptr,pattern) ) { + fprintf(iFile?f:stdout,"%s",pbuf); + fprintf(iFile?f:stdout," " ); + while (len > 0) { + for(i=0; i < 16; i++) { + fprintf(iFile?f:stdout,"%x%x ", HI_WORD(*ptr), LO_WORD(*ptr)); + len--; + ptr++; + if (len == 0) {j=i++; while(++j < 16) fprintf(iFile?f:stdout," "); break; } + } + fprintf(iFile?f:stdout," "); + for(j=0; j < i; j++) fprintf(iFile?f:stdout,"%c",isprint(*(ptr-i+j))?*(ptr-i+j):'.'); + if (len) fprintf(iFile?f:stdout,"\n "); + } +// } else { +// fwrite(ptr,sizeof(BYTE),len,f); +// } +} +} + +static char *ICMPTypeTable[]={ + "Echo Reply", "ICMP 1", "ICMP 2", "Dest Unreachable","SrcQuench", "Redirect", "6", "7","Echo Request","9","10", + "Time Exceed", "ParamPrblm", "Timestamp", "Timestamp reply","InfoRqst", "InfoRply" +}; +static char *Dstunreach[]={ +"net unreach.","host unreach.","protocol unreach.","port unreach.", +"frag needed","source route?","","" +}; +int DecodeICMPHeader(WSABUF *wsabuf, DWORD iphdrlen) { + BYTE *hdr = (BYTE *)((BYTE *)wsabuf->buf + iphdrlen + iLnxplus ); + unsigned short type,code,chksum, + id, + seq; + unsigned long resptime,r1,r2; + BYTE *hhh; + SOCKADDR_IN addr; + type=*hdr++; code=*hdr++; + sprintf(str," Type:%-12s Code:%3d,",ICMPTypeTable[type],code); + + strcat(pbuf,str); + memcpy(&chksum, hdr, 2); + hdr += 2; hhh=hdr; + memcpy(&id, hdr, 2); + hdr += 2; + memcpy(&seq, hdr, 2); + hdr+=2; +// memcpy(&resptime, hdr, 4); +// hdr+=4; + switch (type) { + case 3: + memcpy(&addr.sin_addr.s_addr, hdr+16, 4); + if (code==4 ) sprintf(str,"frag needed-Max MTU:%u at %-15s\n",ntohs(seq), inet_ntoa(addr.sin_addr)); + else sprintf(str,"%s at %-15s\n",Dstunreach[code&7],inet_ntoa(addr.sin_addr)); + hdr+=iphdrlen; + break; + case 11: + memcpy(&addr.sin_addr.s_addr, hdr+16, 4); + sprintf(str,"%s at %-15s\n",code?"frag reass. exceed":"ttl exceed",inet_ntoa(addr.sin_addr)); + hdr+=iphdrlen; + break; + case 12: + memcpy(&addr.sin_addr.s_addr, hdr+16, 4); + sprintf(str," err:%d at %-15s\n",id,inet_ntoa(addr.sin_addr)); + hdr+=iphdrlen; + break; + case 4: + memcpy(&addr.sin_addr.s_addr, hdr+16, 4); + sprintf(str," wait for %-15s\n",ntohs(id),inet_ntoa(addr.sin_addr)); + hdr+=iphdrlen; + break; + case 5: + memcpy(&addr.sin_addr.s_addr, hhh, 4); + sprintf(str," from gw: %-15s\n",inet_ntoa(addr.sin_addr)); + hdr+=iphdrlen; + break; + case 0: + case 8: + sprintf(str," Id:%3u Seq:%3u\n",ntohs(id),ntohs(seq)); + break; + case 13: + case 14: + memcpy(&resptime, hdr, 4); + hdr+=4; + memcpy(&r1, hdr, 4); + hdr+=4; + memcpy(&r2, hdr, 4); + hdr+=4; + sprintf(str," Id:%3u Seq:%3d Rec/Tr %ld/%ld ms\n",ntohs(id),ntohs(seq),ntohl(r1)-ntohl(resptime),ntohl(r2)-ntohl(resptime)); + break; + case 15: + case 16: + sprintf(str," Id:%3u Seq:%3d\n",ntohs(id),ntohs(seq)); + break; + } + strcat(pbuf,str); + return hdr-(BYTE *)(wsabuf->buf + iphdrlen + iLnxplus); +} + +// +// Function: DecodeIGMPHeader +// +// Description: +// This function takes a pointer to a buffer containing +// an IGMP packet and prints it out in a readable form. +// + +int DecodeIGMPHeader(WSABUF *wsabuf, DWORD iphdrlen) { + BYTE *hdr = (BYTE *)((BYTE *)wsabuf->buf + iphdrlen + iLnxplus); + unsigned short chksum, + version, + type, + maxresptime; + SOCKADDR_IN addr; + version = HI_WORD(*hdr); + type = LO_WORD(*hdr); + + hdr++; + maxresptime = *hdr; + hdr++; + + memcpy(&chksum, hdr, 2); + chksum = ntohs(chksum); + hdr += 2; + + memcpy(&(addr.sin_addr.s_addr), hdr, 4); + sprintf(str," IGMP HEADER:\n"); + strcat(pbuf,str); + if ((type == 1) || (type == 2)) version = 1; + else version = 2; + sprintf(str," IGMP Version = %d\n IGMP Type = %s\n",version, szIgmpType[type]); + strcat(pbuf,str); + if (version == 2) { + sprintf(str," Max Resp Time = %d\n", maxresptime); + strcat(pbuf,str); + } + sprintf(str," IGMP Grp Addr = %s\n", inet_ntoa(addr.sin_addr)); + strcat(pbuf,str); + + return 8; +} + +// +// Function: DecodeUDPHeader +// +// Description: +// This function takes a buffer which points to a UDP +// header and prints it out in a readable form. +// +int DecodeUDPHeader(WSABUF *wsabuf, DWORD iphdrlen) { + BYTE *hdr = (BYTE *)((BYTE *)wsabuf->buf + iphdrlen + iLnxplus); + unsigned short shortval, + udp_src_port, + udp_dest_port, + udp_len, + udp_chksum; + memcpy(&shortval, hdr, 2); + udp_src_port = ntohs(shortval); + hdr += 2; + + memcpy(&shortval, hdr, 2); + udp_dest_port = ntohs(shortval); + hdr += 2; + + memcpy(&shortval, hdr, 2); + udp_len = ntohs(shortval); + hdr += 2; + + memcpy(&shortval, hdr, 2); + udp_chksum = ntohs(shortval); + hdr += 2; + + sprintf(str," UDP: SPort: %-05d | DPort: %-05d",udp_src_port, udp_dest_port); + strcat(pbuf,str); + sprintf(str," | Len: %-05d | CSum: 0x%08x\n",udp_len, udp_chksum); + strcat(pbuf,str); + return hdr-(BYTE *)(wsabuf->buf + iphdrlen + iLnxplus); +} + +// +// Function: DecodeTCPHeader +// +// Description: +// This function takes a buffer pointing to a TCP header +// and prints it out in a readable form. +// +int DecodeTCPHeader(WSABUF *wsabuf, DWORD iphdrlen) { + BYTE *hdr = (BYTE *)((BYTE *)wsabuf->buf + iphdrlen + iLnxplus); + unsigned short shortval; + unsigned long longval; + + memcpy(&shortval, hdr, 2); + shortval = ntohs(shortval); + sprintf(str," TCP: SPort: %u", shortval); + strcat(pbuf,str); + hdr += 2; + + memcpy(&shortval, hdr, 2); + shortval = ntohs(shortval); + sprintf(str," DPort: %u", shortval); + strcat(pbuf,str); + hdr += 2; + + memcpy(&longval, hdr, 4); + longval = ntohl(longval); + sprintf(str," Seq: %lX", longval); + strcat(pbuf,str); + hdr += 4; + + memcpy(&longval, hdr, 4); + longval = ntohl(longval); + sprintf(str," ACK: %lX", longval); + strcat(pbuf,str); + hdr += 4; +// printf(" Header Len : %d (bytes %d)\n", HI_WORD(*hdr), (HI_WORD(*hdr) * 4)); + + memcpy(&shortval, hdr, 2); + shortval = ntohs(shortval) & 0x3F; + sprintf(str," Flags: "); + strcat(pbuf,str); + if (shortval & 0x20) strcat(pbuf,"URG "); + if (shortval & 0x10) strcat(pbuf,"ACK "); + if (shortval & 0x08) strcat(pbuf,"PSH "); + if (shortval & 0x04) strcat(pbuf,"RST "); + if (shortval & 0x02) strcat(pbuf,"SYN "); + if (shortval & 0x01) strcat(pbuf,"FIN "); + strcat(pbuf,"\n"); + hdr += 2; + + memcpy(&shortval, hdr, 2); + shortval = ntohs(shortval); +// printf(" Window size: %d\n", shortval); + hdr += 2; + + memcpy(&shortval, hdr, 2); + shortval = ntohs(shortval); +// printf(" TCP Chksum : %d\n", shortval); + hdr += 2; + + memcpy(&shortval, hdr, 2); + shortval = ntohs(shortval); + hdr += 2; +// printf(" Urgent ptr : %d\n", shortval); + + return hdr-(BYTE *)(wsabuf->buf + iphdrlen + iLnxplus); +} + +int DecodeGREHeader(WSABUF *wsabuf, DWORD iphdrlen,DWORD bytesret, + unsigned int srcip, unsigned short srcport, unsigned long srcnet,unsigned int destip, unsigned short destport, unsigned long destnet, + unsigned short xport,unsigned int xip, unsigned long xnet) + { + BYTE *hdr = (BYTE *)((BYTE *)wsabuf->buf + iphdrlen + iLnxplus); + unsigned short shortval; + unsigned long longval; + int ipe; + BYTE *orihdr; + char *sstr; + SOCKADDR_IN srcaddr; + + orihdr=hdr; + memcpy(&shortval, hdr, 2); + shortval = ntohs(shortval); + sprintf(str," GRE Flag: %u Prot:", shortval); + strcat(mypbuff,str); + hdr += 2; + + memcpy(&shortval, hdr, 2); + shortval = ntohs(shortval); + ipe=0; + sstr=str; +// sprintf(str," Prot: %u", shortval); + switch ( shortval ) { + case 4: sstr="SNA"; + break; + case 0xfe: sstr="OSI"; + break; + case 0x200: sstr="PUP"; + break; + case 0x600: sstr="XNS"; + break; + case 0x800: sstr="IP"; + ipe=1; + break; + case 0x804: sstr="Chaos"; + break; + case 0x806: sstr="ARP"; + break; + case 0x6558: sstr="Tr.bridge"; + break; + default: sprintf(str,"%u", shortval); + break; + } + hdr += 2; + strcat(mypbuff,sstr); + if (ipe && gre) { + int plusment,jj,protoment; + plusment=iLnxplus; + protoment=iProto; + if (iProto==47) iProto=0; + iLnxplus+=4; + nomac=0; + iLnxplus=plusment+24; + DecodeIPHeader(wsabuf,srcip,srcport,srcnet,destip,destport,destnet,bytesret,xport,xip,xnet); + nomac=1; + iLnxplus=plusment; + iProto=protoment; + } +return -1; +// return hdr-(BYTE *)(wsabuf->buf + iphdrlen + iLnxplus); +} + + +int ClearIPAcc() { + unsigned long i; + ta *tai; + for(i=0;ifrom=tai->to=0; tai++; } + for (i=0;ibyte > d2->byte) return -1; + if (d1->byte < d2->byte) return 1; + return 0; +} +int countsort(const void *s1, const void *s2) { // sorting tale in packet count order + ta *d1; + ta *d2; + d1= (ta *)s1; d2=(ta *)s2; + if (d1->pkt > d2->pkt) return -1; + if (d1->pkt < d2->pkt) return 1; + return 0; +} +int CloseIPAcc( long ti) { + unsigned long i; + ta *tai; + SOCKADDR_IN srcaddr; + SOCKADDR_IN dstaddr; + float ff; + char str[16]; + unsigned long j,k,l; + int lin=0; + int linn; + + time(&elapsed); + if (iFile) f=fopen(filename,"w+"); + k=0; + if (sortbysize) qsort(acc,MAXHASH,sizeof(ta),bytesort); + else qsort(acc,MAXHASH,sizeof(ta),countsort); + ff=0.0; + for (i=0;i<255;i++) ff+=typb[i]; + for (i=0; ifrom!=0) && (tai->to!=0)) ++k; + } + if (iScreen) { +#ifndef LINUX + system("cls"); +#else + system("clear"); +// printf("\033[1~"); +#endif + printf("%-16s Speed: %5.2f Kbit/s , %ld IP pairs / %ld secs. %s@%s.hu",myipname,ff/ti/1024*8,k,ti,author,author); + printf("\nProt:"); j=0; ++lin; + while (1) { + l=k=0; + for (i=0;i<100;i++) if ( typb[i]>k) { k=typb[i]; l=i; } + if (k==0) break; + if ((j>0) && ((j%3)==0)) { printf("\n "); ++lin; } + if (k>1024*1024) printf(" %-8.8s:%5.1fk/%-6.1f M",szProto[l],(float)typp[l]/1024,(float)k/(1024*1024)); + else if (k>1024) printf(" %-8.8s:%5ld/%-6.1f k",szProto[l],typp[l],(float)k/1024); + else printf(" %-8.8s:%5ld/%-8ld",szProto[l],typp[l],k); + typb[l]=0; + ++j; + } + printf("\nPort:"); j=0; ++lin; + k=0; linn=lin; + while (1) { + l=k=0; + for (i=0;ik) { k=tcppb[i]; l=i; } + if (k==0) break; + if (j && (j%4)==0) { + if (lin >= linn+1) break; + printf("\n "); + ++lin; + } + if (k>1024*1024) printf(" %04d:%4.1fk/%-5.1f M",l,(float)tcppp[l]/1024,(float)k/(1024*1024)); + else if (k>1024) printf(" %04d:%4ld/%-5.1f k",l,tcppp[l],(float)k/1024); + else printf(" %04d:%4ld/%-7ld",l,tcppp[l],k); + tcppb[l]=0; + ++j; + } + } else if (f) { + fprintf(f,"%-16s Speed: %5.2f Kbit/s , %ld IP pairs / %ld secs. %s@%s.hu",myipname,ff/ti/1024*8,k,ti,author,author); + fprintf(f,"\nProt:"); j=0; + while (1) { + l=k=0; + for (i=0;i<100;i++) if ( typb[i]>k) { k=typb[i]; l=i; } + if (k==0) break; + if (k>1024*1024) fprintf(f," %-8.8s:%5.1fk/%-6.1f M",szProto[l],(float)typp[l]/1024,(float)k/(1024*1024)); + else if (k>1024) fprintf(f," %-8.8s:%5ld/%-6.1f k",szProto[l],typp[l],(float)k/1024); + else fprintf(f," %-8.8s:%5ld/%-8ld",szProto[l],typp[l],k); + typb[l]=0; + ++j; + } + printf("\nPort:"); j=0; + k=0; linn=lin; + while (1) { + l=k=0; + for (i=0;ik) { k=tcppb[i]; l=i; } + if (k==0) break; + if (k>1024*1024) fprintf(f," %04d:%4.1fk/%-5.1f M",l,(float)tcppp[l]/1024,(float)k/(1024*1024)); + else if (k>1024) fprintf(f," %04d:%4ld/%-5.1f k",l,tcppp[l],(float)k/1024); + else fprintf(f," %04d:%4ld/%-7ld",l,tcppp[l],k); + tcppb[l]=0; + ++j; + } + } + + for (i=0; ifrom!=0) && (tai->to!=0)) { ++k; + if (!iSum) { + dstaddr.sin_addr.s_addr = htonl(*(iph+tai->from)); + srcaddr.sin_addr.s_addr = htonl(*(iph+(tai->to))); + strcpy(str,inet_ntoa(dstaddr.sin_addr)); + if (iScreen && (++linpkt,tai->byte,((float)tai->byte)/ti/1024*8); + if (f) fprintf(f,"%-15s\t%-15s\t%d\t%ld\n",str,inet_ntoa(srcaddr.sin_addr),tai->pkt,tai->byte); + } + } + } + if (iScreen) printf("\n"); +#ifdef LINUX + if (iScreen) fflush(stdout); +#endif + ClearIPAcc(); + if (f) { + char cmdline[255]; + fclose(f); +// if (*execname) _spawnle(_P_NOWAIT,execname,execname,filename); +// if (*execname) _execl(execname,execname); + if (*execname) { +#ifndef LINUX + sprintf(cmdline,"%s %s",execname,filename); +#else + sprintf(cmdline,"%s %s",execname,filename); +#endif + system(cmdline); +// iRun=0; + } + } + f=NULL; + return 0; +} + +unsigned short FindIPHash( unsigned long ip ) { + unsigned short hashval; + unsigned long *ipt; + + hashval = (unsigned short)(((ip&0xFFFF0000)>>16) ^ (ip&0x0000FFFF)); + ipt=iph + hashval; + while (*ipt != 0 && (*ipt!=ip)) { ipt++; hashval++; } + if (*ipt==0) *ipt=ip; + return hashval; +} + +unsigned short SetIPAcc( unsigned long src, unsigned long dst, unsigned long byte, unsigned short typ, unsigned short sport, unsigned short dport) { + unsigned short from,to,hash; + ta *tai; + hash=0; + if (src) { + + if (fromip) from=FindIPHash(src); else from=-1; + if (toip) to=FindIPHash(dst); else to=-1; + hash=from^to; + tai=acc + hash; + while ( ((tai->from!=from) && (tai->to!=to)) && ((tai->from!=0) && (tai->to!=0)) ) {tai++; hash++; } + if ((tai->from==0)&&(tai->to==0)) { + tai->byte=byte; tai->from=from; tai->to=to; tai->pkt=1; + } else { tai->byte+=byte; tai->pkt++; } + + typp[typ]++; + typb[typ]+=byte; + if ((sport>0) && (sport0) && (dportbuf, + *nexthdr = NULL, + *ohdr; + unsigned short shortval; + SOCKADDR_IN srcaddr, + destaddr; + + unsigned short ip_version, + ip_hdr_len, + ip_tos, + ip_total_len, + ip_id, + ip_flags, + ip_ttl, + ip_frag_offset, + ip_proto, + ip_hdr_chksum, + ip_src_port, + ip_dest_port; + unsigned int ip_src, + ip_dest; + BOOL bPrint = FALSE; + char ip_prtype=0; + int j; + time_t tt; + struct tm *tmm; + + ohdr=hdr; + if (iLnxplus) ip_prtype=*(hdr+iLnxplus-1); + if (ip_prtype) return 0; + hdr += iLnxplus; + ip_version = HI_WORD(*hdr); + ip_hdr_len = LO_WORD(*hdr) * 4; + nexthdr = (BYTE *)((BYTE *)hdr + ip_hdr_len); + hdr++; + + ip_tos = *hdr; + hdr++; + + memcpy(&shortval, hdr, 2); + ip_total_len = ntohs(shortval); + hdr += 2; + + memcpy(&shortval, hdr, 2); + ip_id = ntohs(shortval); + hdr += 2; + + ip_flags = ((*hdr) >> 5); + + memcpy(&shortval, hdr, 2); + ip_frag_offset = ((ntohs(shortval)) & 0x1FFF); + hdr += 2; + + ip_ttl = *hdr; + hdr++; + + ip_proto = *hdr; + hdr++; + + memcpy(&shortval, hdr, 2); + ip_hdr_chksum = ntohs(shortval); + hdr += 2; + + memcpy(&srcaddr.sin_addr.s_addr, hdr, 4); + ip_src = ntohl(srcaddr.sin_addr.s_addr); + hdr += 4; + + memcpy(&destaddr.sin_addr.s_addr, hdr, 4); + ip_dest = ntohl(destaddr.sin_addr.s_addr); + hdr += 4; + // + // If packet is UDP, TCP, or IGMP read ahead and + // get the port values. + // + ip_src_port=ip_dest_port=0; + if (((ip_proto == 2) || + (ip_proto == 6) || + (ip_proto == 17)) ) //&& bFilter) + { + memcpy(&ip_src_port, nexthdr, 2); + ip_src_port = ntohs(ip_src_port); + memcpy(&ip_dest_port, nexthdr+2, 2); + ip_dest_port = ntohs(ip_dest_port); + + }; + bPrint = 0; +// xaok= (xip!=0) && (((xip&xnet)==(ip_src&xnet))||((xip&xnet)==(ip_dest&xnet))); +// saok= ((srcip==0)||((srcip&srcnet)==(ip_src&srcnet))); +// daok = ((destip==0)||((destip&destnet)==(ip_dest&destnet))); +// xpok=(xport!=0) && ((xport==ip_src_port)||(xport==ip_dest_port)); +// spok=((srcport==0)||(srcport == ip_src_port)); +// dpok=((destport==0)||(destport == ip_dest_port)); +//printf("\nf:%d xa:%d sa:%d da:%d xp:%d sp:%d dp:%d",bFilter,xaok,saok,daok,xpok,spok,dpok); +// if (!bFilter || ( (xaok||(saok&&daok)) && (xpok||(spok&&dpok)))) { +if ((!bFilter) || ((ip_proto==47)&&gre) || + ( + ((iProto==0)||(ip_proto==iProto)) && + ( + ((xip!=0) && (((xip&xnet)==(ip_src&xnet))||((xip&xnet)==(ip_dest&xnet))) + ) || ( + ((srcip==0) || ((srcip&srcnet)==(ip_src&srcnet))) && ((destip==0)||((destip&destnet)==(ip_dest&destnet))) + ) + ) + && + ( + ((xport!=0) && ((xport==ip_src_port)||(xport==ip_dest_port)) + ) || ( + ((srcport==0)||(srcport == ip_src_port))&&((destport==0)||(destport == ip_dest_port)) + ) + ) + ) + ) { + if (! iDetail) { + if ((ip_proto==47)&&gre) { + *mypbuff=0; + DecodeGREHeader(wsabuf, ip_hdr_len, bytesret, + srcip,srcport,srcnet,destip,destport,destnet,xport,xip,xnet); +// SetIPAcc(0,0,0,0,0,0); + return ip_hdr_len; + } + SetIPAcc(ip_src,ip_dest,ip_total_len,ip_proto,ip_src_port,ip_dest_port); + } + else bPrint=TRUE; +// printf("%d %ld %ld %ld %ld",ip_proto,xip,xip&xnet,ip_src&xnet,ip_dest&xnet); + } else { + if (! iDetail) SetIPAcc(0,0,0,0,0,0); +// else bPrint=TRUE; + } + time(&tt); + if ((!iSum && ( tt-elapsed > iCycle)) || !iRun || mostird) { + mostird=0; + if (! iDetail) CloseIPAcc(tt-elapsed-1); + else { + time(&elapsed); + if (f) fclose(f); + if (iFile) f=fopen(filename,"a"); + } + } + if (lNum) { if (--lNum <= 0) iRun=0; } + + // + *pbuf=0; + if (bPrint) { + tmm=localtime(&tt); +if (! nomac ) { + strcpy(pbuf,mypbuff); +} else { + sprintf(str,"\n%4.4d.%2.2d.%2.2d %2.2d:%2.2d:%2.2d ", + tmm->tm_year+1900,tmm->tm_mon+1,tmm->tm_mday,tmm->tm_hour,tmm->tm_min,tmm->tm_sec); + strcat(pbuf,str); +#ifdef LINUX + sprintf(str,"%x:%x:%x:%x:%x:%x > %x:%x:%x:%x:%x:%x",*ohdr,*(ohdr+1),*(ohdr+2),*(ohdr+3),*(ohdr+4),*(ohdr+5), + *(ohdr+6),*(ohdr+7),*(ohdr+8),*(ohdr+9),*(ohdr+10),*(ohdr+11)); + strcat(pbuf,str); +#endif +} + sprintf(str," %d bytes\n%-15s>", ip_total_len, inet_ntoa(srcaddr.sin_addr)); + strcat(pbuf,str); + sprintf(str,"%-15s", inet_ntoa(destaddr.sin_addr)); + strcat(pbuf,str); + sprintf(str," TTL:%-3d Proto:%-6s F:%d/%d TOS:%X%X\n", + ip_ttl, szProto[ip_proto],ip_flags,ip_frag_offset,HI_WORD(ip_tos), LO_WORD(ip_tos)); + strcat(pbuf,str); + if (iFile) strcat(pbuf,"."); + strcpy(mypbuff,pbuf); + + } + else return ip_hdr_len; + + if (justheader) { if (*pbuf) fprintf(iFile?f:stdout,"%s",pbuf); return ip_hdr_len; } + if (iDetail) { + switch (ip_proto) { + case 1: // ICMP + j=DecodeICMPHeader(wsabuf, ip_hdr_len); + break; + case 2: // IGMP + j=DecodeIGMPHeader(wsabuf, ip_hdr_len); + break; + case 6: // TCP + j=DecodeTCPHeader(wsabuf, ip_hdr_len); + break; + case 17: // UDP + j=DecodeUDPHeader(wsabuf, ip_hdr_len); + break; + case 47: // UDP + j=DecodeGREHeader(wsabuf, ip_hdr_len, bytesret, + srcip,srcport,srcnet,destip,destport,destnet,xport,xip,xnet); + break; + default: + j=0; hdr=(BYTE *)wsabuf->buf; + sprintf(str," No decoder installed for protocol\n"); + strcat(pbuf,str); + break; + } + if (j>=0) PrintRawBytes(hdr+j,bytesret-j-ip_hdr_len-12); //(hdr-(BYTE *)(wsabuf->buf + iLnxplus))); + } + else if (*pbuf) fprintf(iFile?f:stdout,"%s",pbuf); + + return ip_hdr_len; +} diff --git a/utils/pipacs/src/parser.h b/utils/pipacs/src/parser.h new file mode 100644 index 0000000..aedaeaf --- /dev/null +++ b/utils/pipacs/src/parser.h @@ -0,0 +1,60 @@ +#define LINUX 1 +#ifdef LINUX +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define BYTE unsigned char +#define DWORD unsigned long +#define BOOL char +#define TRUE 1 +#define FALSE 0 +#define WSADATA int +#define SOCKET int +#define SOCKADDR struct sockaddr +#define SOCKADDR_IN struct sockaddr_in +typedef struct _WSABUF { + unsigned long len; + unsigned char *buf; +} WSABUF; +#define SIO_RCVALL 0 +#define SIO_RCVALL_IGMPMCAST 0 +#define SIO_RCVALL_MCAST 0 +#define ETH_P_ALL 0x0003 +#else // WINDOWS + +#include +#include + +#endif + +#ifndef _RCVALL_H_ +#define _RCVALL_H_ + + +#define MAX_IP_SIZE 65535 +#define MIN_IP_HDR_SIZE 20 + +#define HI_WORD(byte) (((byte) >> 4) & 0x0F) +#define LO_WORD(byte) ((byte) & 0x0F) + +extern char *szProto[]; + + + +void PrintRawBytes (BYTE *ptr, DWORD len); +int DecodeIGMPHeader(WSABUF *wsabuf, DWORD iphdrlen); +int DecodeUDPHeader (WSABUF *wsabuf, DWORD iphdrlen); +int DecodeTCPHeader (WSABUF *wsabuf, DWORD iphdrlenz); +int DecodeIPHeader (WSABUF *wasbuf, unsigned int srcaddr, unsigned short srcport, unsigned long srcnet, + unsigned int destaddr, unsigned short destport, unsigned long destnet, DWORD bytesret, + unsigned short xport, unsigned int xip, unsigned long xnet); + +#endif diff --git a/utils/pipacs/src/pipacs.c b/utils/pipacs/src/pipacs.c new file mode 100644 index 0000000..4087cd3 --- /dev/null +++ b/utils/pipacs/src/pipacs.c @@ -0,0 +1,589 @@ +// http://www.phj.hu/freesoft.asp +#include +#include +#include "parser.h" + +#ifndef LINUX +#include +#include +#else +#include +struct promisc_device +{ + char name[16]; /* name (e.g. eth0) */ + + int reset; /* do we have to reset it on exit ? */ + struct ifreq oldifr; /* old settings */ + + struct promisc_device *next; +}; + +#endif + +DWORD dwIoControlCode=SIO_RCVALL; +DWORD dwProtocol=IPPROTO_IP, dwInterface=0; + +#define MAXVER 2 +#define MINVER 6 +SOCKET s; + +// +// Filters (Globals) +// +unsigned int uiSourceAddr=0, uiDestAddr=0, uiXAddr=0; +unsigned short usSourcePort = 0, usDestPort = 0, usXPort = 0; +unsigned short usSourceNet = 32, usDestNet = 32, usXNet = 32; +unsigned long ulDestNet=0xffffffff, ulSourceNet=0xffffffff, ulXNet=0xffffffff; +BOOL bFilter=FALSE; +int iline=25; +char myipname[64]; +char pattern[1024]; +int justheader=0; +int gre=0; +int sortbysize,fromip,toip; +int skipvlan=0; + +extern char filename[128]; + +extern char intlist[128]; + +#ifndef LINUX +void PrintInterfaceList( void ); +int GetInterface(SOCKET , SOCKADDR_IN *, int ); +#endif +extern int InitIPAcc( void ); +extern int CloseIPAcc( void ); +extern int iCycle; +extern int iScreen; +extern int iFile; +extern int iDetail; +extern int iRun; +extern long lNum; +extern FILE *f; +extern int iProto; +extern int iSum; +extern char execname[]; +extern int mostird; +extern int iLnxplus; + +int set_raw_mode(void) +{ + int fd = STDIN_FILENO; + struct termios t; + + if (tcgetattr(fd, &t) < 0) { perror("tcgetattr"); return -1; } + t.c_lflag &= ~ICANON; + if (tcsetattr(fd, TCSANOW, &t) < 0) { perror("tcsetattr"); return -1; } + setbuf(stdin, NULL); + return 0; +}// +// Function: usage +// +// Description: +// Prints usage information. +// +char *author = "phj"; + +void usage(char *progname) +{ + printf(" usage: %s options\n where options:\n", progname); + printf(" [-c:sec] Dump cycle in sec (10)\n"); + printf(" [-f:file[-e:program]] Results into a file [and exec program](-)\n"); + printf(" [-n:db] Execute just db cycle (0)\n"); + printf(" [-l:lineno] Print lineno lines of hosts(25)\n"); + printf(" [-k] Sort result by packet count (size)\n"); + printf(" [-1] Ignore source IP (don't ignore)\n"); + printf(" [-2] Ignore destination IP (don't ignore)\n"); + printf(" [-h] Print just the header(use -a!)\n"); + printf(" [-a] Print packet info&data (-)\n"); + printf(" [-p] Print just summary info (-)\n"); + printf(" Otherwise print sum&ip pairs\n"); +//#ifndef LINUX + printf(" [-t:[tcp|udp|icmp|....|number]] Filter on IP protocoll (ALL)\n"); +//#endif + printf(" [-g] Make GRE encapsulation trasparent (-)\n"); + printf(" [-v] Skip VLAN headers (-)\n"); + printf(" [-sa:IP[/Net]] Filter on source address (-)/net\n"); + printf(" [-sp:Port] Filter on source port (-)\n"); + printf(" [-da:IP[/Net]] Filter on dest address/net (-)\n"); + printf(" [-dp:Port] Filter on dest port(-)\n"); + printf(" [-xa:IP[/Net]] Filter on src|dest address/net (-)\n"); + printf(" [-xp:Port] Filter on src|dest port (-)\n"); + printf(" [-pa:pattern] String match (0), last param!!!\n"); +#ifndef LINUX + printf(" [-i:int] Capture on this interface (0)\n"); + printf(" Available interfaces:\n"); + PrintInterfaceList(); +#else + printf(" [-i:int[,int]] Capture on this interface (eth0)\n"); +#endif + printf(" Filtering rules: t && (sa|da|xa) && (sp|dp|xp)"); + printf("\nVer. %d.%d (c):2000-2006, P l¢czi-Horv th J nos\n",MAXVER,MINVER); +#ifndef LINUX + WSACleanup(); + ExitProcess(-1); +#else + exit(5); +#endif +} + +// +// Function: ValidateArgs +// +// Description: +// This function parses the command line arguments and +// sets global variables to indicate how the app should act. +// +void ValidateArgs(int argc, char **argv) +{ + int i,j; + char *ptr; + + sortbysize=1; fromip=1; toip=1; + + if (argc <2) { usage(argv[0]); return; } + if (*(author+2) != 'j') { usage(argv[0]); return; } + for(i=1; i < argc ;i++) { + if ((argv[i][0] == '-') || (argv[i][0] == '/')) { + switch (tolower(argv[i][1])) { + case 't': // traffic type + ptr = &argv[i][2]; + while (*++ptr) *ptr = toupper(*ptr); + ptr = &argv[i][3]; + for ( j=0;j<134;j++) { + if (!strcmp(ptr, szProto[j])) { +// dwIoControlCode = SIO_RCVALL; +#ifdef LINUX + dwProtocol = j; +#endif + iProto=j; + break; + } + } + if ((j>133) && atoi(&argv[i][3])) { +// dwIoControlCode = SIO_RCVALL; +#ifdef LINUX + dwProtocol = atoi(&argv[i][3]); +#endif + iProto=atoi(&argv[i][3]); + } else if (j>133) usage(argv[0]); + break; + case 'i': // interface number +#ifndef LINUX + dwInterface = atoi(&argv[i][3]); +#else + strcpy(intlist,&argv[i][3]); + ptr=strchr(intlist,' '); + if (ptr) *ptr=0; +#endif + break; + case 'g': // gre + gre=1; + break; + case 'c': // cycle time + iCycle = atoi(&argv[i][3]); + break; + case 'a': // cycle time + iDetail = 1; + break; + case 'h': // cycle time + iDetail = justheader = 1; + break; + case 'n': // just n cycle + lNum = atol(&argv[i][3]); + break; + case 'l': // lineno lines + iline = atoi(&argv[i][3]); + break; + case 'p': // just summary + if ((tolower(argv[i][2]) == 'a')) { + strcpy(pattern,&argv[i][4]); printf("\n Pattern: \'%s",&argv[i][4]); + while (++iiAddressCount ;i++) { + printf(" %-2d ........ [%s]\n", i, + inet_ntoa(((SOCKADDR_IN *)slist->Address[i].lpSockaddr)->sin_addr)); + } + closesocket(s); + return; +} + +// +// Function: GetInterface +// +// Description: +// This function retrieves a zero based index and returns +// the IP interface corresponding to that. +// +int GetInterface(SOCKET s, SOCKADDR_IN *ifx, int num) +{ + SOCKET_ADDRESS_LIST *slist=NULL; + char buf[2048]; + DWORD dwBytesRet; + int ret; + + ret = WSAIoctl(s, SIO_ADDRESS_LIST_QUERY, NULL, 0, buf, 2048,&dwBytesRet, NULL, NULL); + if (ret == SOCKET_ERROR) { + printf("WSAIoctl(SIO_ADDRESS_LIST_QUERY) failed: %d\n",WSAGetLastError()); + return -1; + } + slist = (SOCKET_ADDRESS_LIST *)buf; + if (num >= slist->iAddressCount) return -1; + ifx->sin_addr.s_addr = ((SOCKADDR_IN *)slist->Address[num].lpSockaddr)->sin_addr.s_addr; + if (*author != 'p') return -1; + return 0; +} +#endif +#ifdef LINUX +struct promisc_device *prom; + +void init_capture( void ) +/* + * 1) Open our capture socket + * 2) Set all the promisc devices to promiscous mode + */ +{ + struct ifreq ifr; + struct promisc_device *p,*pp; + struct protoent *pr; + char *p1,*p2; + + if ((s = socket (AF_INET, SOCK_PACKET, htons (ETH_P_ALL))) < 0) + { + printf(" can't get socket: \n"); + exit(1); + } + strcpy(myipname,intlist); + p1=intlist; p=NULL; + while (p1) { + pp=p; + p = malloc(sizeof(struct promisc_device)); + if (pp) pp->next=p; else prom=p; + if ( (p2=strchr(p1,','))) *p2++=0; + strcpy(&p->name,p1); p->next=NULL; + printf(" %s",p->name); fflush(stdout); + p1=p2; +// while(p!=NULL) { + strcpy (p -> oldifr.ifr_name, p -> name); + + if (ioctl (s, SIOCGIFFLAGS, &(p -> oldifr)) < 0) { + printf(" can't get flags: \n"); + exit(2); + } + p -> reset = 1; + ifr = p -> oldifr; + if (ifr.ifr_flags & IFF_PROMISC) printf(" already promisc! \n"); + ifr.ifr_flags |= IFF_PROMISC; + if (ioctl (s, SIOCSIFFLAGS, &ifr) < 0) { + printf(" can't set flags: \n"); + exit(3); + } +// p = p -> next; + } +} + +void exit_capture(void) +{ + struct promisc_device *p; + + /* do we have to check (capture_sd >= 0) ? */ + + p = prom; + + while(p != NULL) { + if (ioctl (s, SIOCSIFFLAGS, &(p -> oldifr)) < 0) { + printf("can't reset flags: \n"); + } + + p = p -> next; + } + + close (s); +} +#endif +// +// Function: main +// +int main(int argc, char **argv) { + WSADATA wsd; + SOCKADDR_IN if0; + int ret,count; + unsigned int optval; + DWORD dwBytesRet, + dwFlags, + nproc; + char rcvbuf[MAX_IP_SIZE]; + WSABUF wbuf; + unsigned long i; +#ifndef LINUX + // Load Winsock + // + if (WSAStartup(MAKEWORD(2,2), &wsd) != 0) { + printf(" WSAStartup() failed: %d\n", GetLastError()); + return -1; + } +#else + SOCKADDR ssaddr; + struct promisc_device *p; + fd_set ready; + struct timeval tv; +#endif + char Key; + int status; + FILE *input; +// Parse the command line +// + strcpy(intlist,"eth0"); + for(i=100;i<255;i++) szProto[i]="?!?"; + szProto[103]="PIM"; + szProto[108]="IPCOMP"; + szProto[112]="VRRP"; + szProto[115]="L2TP"; + szProto[124]="ISIS"; + szProto[132]="SCTP"; + szProto[133]="FC"; + *execname=0; + ValidateArgs(argc, argv); + if (bFilter) { + i=uiSourceAddr; + if ( i || usSourcePort) + printf(" Source: %03d.%03d.%03d.%03d/%d:%d\n",(i&0xff000000)>>24,(i&0x00ff0000)>>16,(i&0x0000ff00)>>8,i&0xff,uiSourceAddr?usSourceNet:0, usSourcePort); + i=uiDestAddr; + if ( i || usDestPort) + printf(" Dest. : %03d.%03d.%03d.%03d/%d:%d\n",(i&0xff000000)>>24,(i&0x00ff0000)>>16,(i&0x0000ff00)>>8,i&0xff,uiDestAddr?usDestNet:0, usDestPort); + i=uiXAddr; + if ( i || usXPort) + printf(" IP. : %03d.%03d.%03d.%03d/%d:%d\n",(i&0xff000000)>>24,(i&0x00ff0000)>>16,(i&0x0000ff00)>>8,i&0xff,uiXAddr?usXNet:0, usXPort); + } + if (iFile) printf(" To file : %s\n",filename); + if (iProto) printf(" Protocol: %s (%d)\n",szProto[iProto],iProto); + // Create a raw socket for receiving IP datagrams + // +#ifndef LINUX + s = WSASocket(AF_INET, SOCK_RAW, dwProtocol, NULL, 0, WSA_FLAG_OVERLAPPED); + if (s == INVALID_SOCKET) + { + printf("WSASocket() failed: %d\n", WSAGetLastError()); + return -1; + } + // Get an interface to read IP packets on + // + memset(&if0,0,sizeof(if0)); + if0.sin_family = AF_INET; + if0.sin_port = htons(0); + if (GetInterface(s, &if0, dwInterface) != 0) + { + printf("Unable to obtain an interface\n"); + return -1; + } + sprintf(myipname,"%-16s",inet_ntoa(if0.sin_addr)); +#else + printf("starting capture ...."); fflush(stdout); + init_capture(); + printf(" capture started ....\n"); fflush(stdout); +#endif + printf(" Binding to IF: %s\n", myipname); +#ifndef LINUX +// +// This socket MUST be bound before calling the ioctl +// + + if (bind(s, (SOCKADDR *)&if0, sizeof(if0)) == SOCKET_ERROR) { + printf("bind() failed: %d\n", WSAGetLastError()); + return -1; + } +// +// Set the SIO_RCVALLxxx ioctl +// + optval = 1; + if (WSAIoctl(s, dwIoControlCode, &optval, sizeof(optval), + NULL, 0, &dwBytesRet, NULL, NULL) == SOCKET_ERROR) { + printf("WSAIotcl() set raw socket failed; %d\n", WSAGetLastError()); +// return -1; + optval = 2; + if (WSAIoctl(s, dwIoControlCode, &optval, sizeof(optval), + NULL, 0, &dwBytesRet, NULL, NULL) == SOCKET_ERROR) { + printf("WSAIotcl() set raw socket only failed; %d\n", WSAGetLastError()); + return -1; + } + } + system("cls"); +#else + tv.tv_sec=0; tv.tv_usec=0; + set_raw_mode(); + FD_ZERO(&ready); + FD_SET(STDIN_FILENO,&ready); +#endif + input = fopen("/dev/tty", "r"); //open the terminal keyboard + if (uiSourceAddr==0) ulSourceNet=0; + else for ( i=0; i<32-usSourceNet; i++) ulSourceNet <<= 1; + if (uiDestAddr==0) ulDestNet=0; + else for ( i=0; i<32-usDestNet; i++) ulDestNet <<= 1; + if (uiXAddr==0) ulXNet=0; + else for ( i=0; i<32-usXNet; i++) ulXNet <<= 1; + if (uiXAddr) uiSourceAddr=uiDestAddr=uiXAddr; + if (usXPort) usSourcePort=usDestPort=usXPort; + if (ulXNet) ulSourceNet=ulDestNet=ulXNet; + InitIPAcc(); +// Start receiving IP datagrams until interrupted +// + count = 0; + if (iFile && iDetail) f=fopen(filename,"w+"); + if (iProto) bFilter=1; + if (*(author+1) != 'h') iRun=0; + while (iRun) { + rcvbuf[MAX_IP_SIZE]=0; + wbuf.len = MAX_IP_SIZE; + wbuf.buf = rcvbuf; +#ifndef LINUX + dwFlags = 0; + ret = WSARecv(s, &wbuf, 1, &dwBytesRet, &dwFlags, NULL, NULL); + if (ret == SOCKET_ERROR) { + printf("WSARecv() failed: %d\n", WSAGetLastError()); + return -1; + } + if (kbhit()) { +#else + dwFlags = sizeof(ssaddr); + + ret = recvfrom (s, wbuf.buf, MAX_IP_SIZE, 0, &ssaddr, (int *) &dwFlags); + if (ret == -1) continue; + dwBytesRet=wbuf.len=ret; + p=prom; + while(p!=NULL) { + if (!strcmp(p -> name, ssaddr.sa_data)) break; + p=p->next; + } + if (!p) { +// printf("\n%s: ignored",ssaddr.sa_data); fflush(stdout); + continue; + } + FD_ZERO(&ready); + FD_SET(STDIN_FILENO,&ready); + if (select(STDIN_FILENO+1,&ready,NULL,NULL,&tv)>0) { +// if (FD_ISSET(STDIN_FILENO,&ready)) { +#endif + switch (getchar()) { /* branch to appropiate key handler */ + case 0x1b: /* Esc */ + iRun=0; + break; + default: + mostird=1; + break; + } //end of switch key + } + +// Deccode the IP header +// + if (!(nproc = DecodeIPHeader(&wbuf, uiSourceAddr, usSourcePort, ulSourceNet, + uiDestAddr, usDestPort, ulDestNet, dwBytesRet,usXPort,uiXAddr,ulXNet))) + { +// printf("Error decoding IP header!\n"); +// break; + } + } + // Cleanup + // + if (iRun && !iDetail) CloseIPAcc(); + if (f) fclose(f); +#ifndef LINUX + closesocket(s); + WSACleanup(); +#else + exit_capture(); +#endif + return 0; +} diff --git a/utils/powertop/Makefile b/utils/powertop/Makefile new file mode 100644 index 0000000..d58114d --- /dev/null +++ b/utils/powertop/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=powertop +PKG_VERSION:=1.11 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.lesswatts.org/projects/powertop/download/ +PKG_MD5SUM:=3498f5983c683c3a57dce7379a722082 + +PKG_INSTALL:=1 +PKG_FIXUP:=libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/powertop + SECTION:=utils + CATEGORY:=Utilities + TITLE:=PowerTOP + DEFAULT:=n + DEPENDS:=+libncurses +libgcc + KCONFIG:=CONFIG_DEBUG_KERNEL=y CONFIG_TIMER_STATS=y + URL:=http://www.lesswatts.org +endef + +define Package/powertop/description +PowerTOP is a Linux tool that helps you find those programs that are misbehaving +while your computer is idle. +endef + +define Package/powertop/install + $(CP) $(PKG_INSTALL_DIR)/* $(1) +endef + +$(eval $(call BuildPackage,powertop)) + diff --git a/utils/powertop/patches/100-no-wide-ncurses.patch b/utils/powertop/patches/100-no-wide-ncurses.patch new file mode 100644 index 0000000..61c93a3 --- /dev/null +++ b/utils/powertop/patches/100-no-wide-ncurses.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -20,7 +20,7 @@ OBJS = powertop.o config.o process.o mis + + + powertop: $(OBJS) Makefile powertop.h +- $(CC) ${CFLAGS} $(OBJS) -lncursesw -o powertop ++ $(CC) ${LDFLAGS} $(OBJS) -lncurses -o powertop + @(cd po/ && $(MAKE)) + + powertop.1.gz: powertop.1 diff --git a/utils/powertop/patches/200-no-gettext.patch b/utils/powertop/patches/200-no-gettext.patch new file mode 100644 index 0000000..623f240 --- /dev/null +++ b/utils/powertop/patches/200-no-gettext.patch @@ -0,0 +1,48 @@ +--- a/powertop.c ++++ b/powertop.c +@@ -30,7 +30,9 @@ + #include + #include + #include ++#ifdef ENABLE_GETTEXT + #include ++#endif + #include + #include + #include +@@ -783,9 +785,11 @@ int main(int argc, char **argv) + uint64_t cur_usage[8], cur_duration[8]; + double wakeups_per_second = 0; + ++#ifdef ENABLE_GETTEXT + setlocale (LC_ALL, ""); + bindtextdomain ("powertop", "/usr/share/locale"); + textdomain ("powertop"); ++#endif + + while (1) { + static struct option opts[] = { +--- a/powertop.h ++++ b/powertop.h +@@ -26,7 +26,9 @@ + #ifndef __INCLUDE_GUARD_POWERTOP_H_ + #define __INCLUDE_GUARD_POWERTOP_H_ + ++#ifdef ENABLE_GETTEXT + #include ++#endif + + struct line { + char *string; +@@ -86,7 +88,11 @@ extern suggestion_func *suggestion_activ + _x < _y ? _x : _y; }) + + ++#ifdef ENABLE_GETTEXT + #define _(STRING) gettext(STRING) ++#else ++#define _(STRING) STRING ++#endif + + + #define PT_COLOR_DEFAULT 1 diff --git a/utils/pps-tools/Makefile b/utils/pps-tools/Makefile new file mode 100644 index 0000000..d152363 --- /dev/null +++ b/utils/pps-tools/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=pps-tools +PKG_VERSION:=2.6.23 +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/pps-tools + SUBMENU:=Time Synchronization + SECTION:=net + CATEGORY:=Network + DEPENDS:=@LINUX_2_6_23 + TITLE:=PPS (Pulse Per Second) Userland tools + URL:=http://wiki.enneenne.com/index.php/LinuxPPS_support +endef + + +define Package/pps-tools/description + Userland tools for GPS and DCF-77 Clock syncronization. PPS support in Kernel must be enabled. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/timepps.h $(1)/usr/include/ +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -DHAVE_ISC_READER=1 -I$(LINUX_DIR)/include -I ." \ + BINDIR="/usr/sbin" MANDIR="/usr/man" +endef + +define Package/pps-tools/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ppstest $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ppsctl $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,pps-tools)) diff --git a/utils/pps-tools/patches/001-source.patch b/utils/pps-tools/patches/001-source.patch new file mode 100644 index 0000000..6707478 --- /dev/null +++ b/utils/pps-tools/patches/001-source.patch @@ -0,0 +1,480 @@ +diff --git a/Makefile b/Makefile +new file mode 100644 +index 0000000..a2660a2 +--- /dev/null ++++ b/Makefile +@@ -0,0 +1,27 @@ ++TARGETS = ppstest ppsctl ++ ++CFLAGS += -Wall -O2 -D_GNU_SOURCE ++CFLAGS += -I . ++CFLAGS += -ggdb ++ ++# -- Actions section ---------------------------------------------------------- ++ ++.PHONY : all depend dep ++ ++all : .depend $(TARGETS) ++ ++.depend depend dep : ++ $(CC) $(CFLAGS) -M $(TARGETS:=.c) > .depend ++ ++ifeq (.depend,$(wildcard .depend)) ++include .depend ++endif ++ ++ ++# -- Clean section ------------------------------------------------------------ ++ ++.PHONY : clean ++ ++clean : ++ rm -f *.o *~ core .depend ++ rm -f ${TARGETS} +diff --git a/ppsctl.c b/ppsctl.c +new file mode 100644 +index 0000000..83fd08a +--- /dev/null ++++ b/ppsctl.c +@@ -0,0 +1,62 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++void usage(char *name) ++{ ++ fprintf(stderr, "usage: %s [enable|disable]\n", name); ++ ++ exit(EXIT_FAILURE); ++} ++ ++int main(int argc, char *argv[]) ++{ ++ int fd; ++ int ret; ++ struct serial_struct ss; ++ ++ if (argc < 2) ++ usage(argv[0]); ++ ++ fd = open(argv[1], O_RDWR); ++ if (fd < 0) { ++ perror("open"); ++ exit(EXIT_FAILURE); ++ } ++ ++ ret = ioctl(fd, TIOCGSERIAL, &ss); ++ if (ret < 0) { ++ perror("ioctl(TIOCGSERIAL)"); ++ exit(EXIT_FAILURE); ++ } ++ ++ if (argc < 3) { /* just read PPS status */ ++ printf("PPS is %sabled\n", ++ ss.flags & ASYNC_HARDPPS_CD ? "en" : "dis"); ++ exit(EXIT_SUCCESS); ++ } ++ ++ if (argv[2][0] == 'e' || argv[2][0] == '1') ++ ss.flags |= ASYNC_HARDPPS_CD; ++ else if (argv[2][0] == 'd' || argv[2][0] == '0') ++ ss.flags &= ~ASYNC_HARDPPS_CD; ++ else { ++ fprintf(stderr, "invalid state argument \"%s\"\n", argv[2]); ++ exit(EXIT_FAILURE); ++ } ++ ++ ret = ioctl(fd, TIOCSSERIAL, &ss); ++ if (ret < 0) { ++ perror("ioctl(TIOCSSERIAL)"); ++ exit(EXIT_FAILURE); ++ } ++ ++ return 0; ++} +diff --git a/ppsfind b/ppsfind +new file mode 100755 +index 0000000..93c0e17 +--- /dev/null ++++ b/ppsfind +@@ -0,0 +1,17 @@ ++#!/bin/sh ++ ++SYS="/sys/class/pps/" ++ ++if [ $# -lt 1 ] ; then ++ echo "usage: ppsfind " >&2 ++ exit 1 ++fi ++ ++for d in $(ls $SYS) ; do ++ if grep $1 $SYS/$d/name >& /dev/null || \ ++ grep $1 $SYS/$d/path >& /dev/null ; then ++ echo "$d: name=$(cat $SYS/$d/name) path=$(cat $SYS/$d/path)" ++ fi ++done ++ ++exit 0 +diff --git a/ppstest.c b/ppstest.c +new file mode 100644 +index 0000000..d125ffa +--- /dev/null ++++ b/ppstest.c +@@ -0,0 +1,151 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++int find_source(char *path, pps_handle_t *handle, int *avail_mode) ++{ ++ pps_params_t params; ++ int ret; ++ ++ printf("trying PPS source \"%s\"\n", path); ++ ++ /* Try to find the source by using the supplied "path" name */ ++ ret = open(path, O_RDWR); ++ if (ret < 0) { ++ fprintf(stderr, "unable to open device \"%s\" (%m)\n", path); ++ return ret; ++ } ++ ++ /* Open the PPS source (and check the file descriptor) */ ++ ret = time_pps_create(ret, handle); ++ if (ret < 0) { ++ fprintf(stderr, "cannot create a PPS source from device " ++ "\"%s\" (%m)\n", path); ++ return -1; ++ } ++ printf("found PPS source \"%s\"\n", path); ++ ++ /* Find out what features are supported */ ++ ret = time_pps_getcap(*handle, avail_mode); ++ if (ret < 0) { ++ fprintf(stderr, "cannot get capabilities (%m)\n"); ++ return -1; ++ } ++ if ((*avail_mode & PPS_CAPTUREASSERT) == 0) { ++ fprintf(stderr, "cannot CAPTUREASSERT\n"); ++ return -1; ++ } ++ if ((*avail_mode & PPS_OFFSETASSERT) == 0) { ++ fprintf(stderr, "cannot OFFSETASSERT\n"); ++ return -1; ++ } ++ ++ /* Capture assert timestamps, and compensate for a 675 nsec ++ * propagation delay */ ++ ret = time_pps_getparams(*handle, ¶ms); ++ if (ret < 0) { ++ fprintf(stderr, "cannot get parameters (%m)\n"); ++ return -1; ++ } ++ params.assert_offset.tv_sec = 0; ++ params.assert_offset.tv_nsec = 675; ++ params.mode |= PPS_CAPTUREASSERT | PPS_OFFSETASSERT; ++ ret = time_pps_setparams(*handle, ¶ms); ++ if (ret < 0) { ++ fprintf(stderr, "cannot set parameters (%m)\n"); ++ return -1; ++ } ++ ++ return 0; ++} ++ ++int fetch_source(int i, pps_handle_t *handle, int *avail_mode) ++{ ++ struct timespec timeout; ++ pps_info_t infobuf; ++ int ret; ++ ++ /* create a zero-valued timeout */ ++ timeout.tv_sec = 3; ++ timeout.tv_nsec = 0; ++ ++retry: ++ if (*avail_mode & PPS_CANWAIT) /* waits for the next event */ ++ ret = time_pps_fetch(*handle, PPS_TSFMT_TSPEC, &infobuf, ++ &timeout); ++ else { ++ sleep(1); ++ ret = time_pps_fetch(*handle, PPS_TSFMT_TSPEC, &infobuf, ++ &timeout); ++ } ++ if (ret < 0) { ++ if (ret == -EINTR) { ++ fprintf(stderr, "time_pps_fetch() got a signal!\n"); ++ goto retry; ++ } ++ ++ fprintf(stderr, "time_pps_fetch() error %d (%m)\n", ret); ++ return -1; ++ } ++ ++ printf("source %d - " ++ "assert %ld.%09ld, sequence: %ld - " ++ "clear %ld.%09ld, sequence: %ld\n", ++ i, ++ infobuf.assert_timestamp.tv_sec, ++ infobuf.assert_timestamp.tv_nsec, ++ infobuf.assert_sequence, ++ infobuf.clear_timestamp.tv_sec, ++ infobuf.clear_timestamp.tv_nsec, infobuf.clear_sequence); ++ ++ return 0; ++} ++ ++void usage(char *name) ++{ ++ fprintf(stderr, "usage: %s [ ...]\n", name); ++ exit(EXIT_FAILURE); ++} ++ ++int main(int argc, char *argv[]) ++{ ++ int num; ++ pps_handle_t handle[4]; ++ int avail_mode[4]; ++ int i = 0; ++ int ret; ++ ++ /* Check the command line */ ++ if (argc < 2) ++ usage(argv[0]); ++ ++ for (i = 1; i < argc && i <= 4; i++) { ++ ret = find_source(argv[i], &handle[i - 1], &avail_mode[i - 1]); ++ if (ret < 0) ++ exit(EXIT_FAILURE); ++ } ++ ++ num = i - 1; ++ printf("ok, found %d source(s), now start fetching data...\n", num); ++ ++ /* loop, printing the most recent timestamp every second or so */ ++ while (1) { ++ for (i = 0; i < num; i++) { ++ ret = fetch_source(i, &handle[i], &avail_mode[i]); ++ if (ret < 0 && errno != ETIMEDOUT) ++ exit(EXIT_FAILURE); ++ } ++ } ++ ++ for (; i >= 0; i--) ++ time_pps_destroy(handle[i]); ++ ++ return 0; ++} +diff --git a/timepps.h b/timepps.h +new file mode 100644 +index 0000000..28ebf4c +--- /dev/null ++++ b/timepps.h +@@ -0,0 +1,193 @@ ++/* ++ * timepps.h -- PPS API main header ++ * ++ * Copyright (C) 2005-2007 Rodolfo Giometti ++ * ++ * 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. ++ */ ++ ++#ifndef _SYS_TIMEPPS_H_ ++#define _SYS_TIMEPPS_H_ ++ ++#include ++#include ++#include ++#include ++ ++/* ++ * New data structures ++ */ ++ ++struct ntp_fp { ++ unsigned int integral; ++ unsigned int fractional; ++}; ++ ++union pps_timeu { ++ struct timespec tspec; ++ struct ntp_fp ntpfp; ++ unsigned long longpad[3]; ++}; ++ ++struct pps_info { ++ unsigned long assert_sequence; /* seq. num. of assert event */ ++ unsigned long clear_sequence; /* seq. num. of clear event */ ++ union pps_timeu assert_tu; /* time of assert event */ ++ union pps_timeu clear_tu; /* time of clear event */ ++ int current_mode; /* current mode bits */ ++}; ++ ++struct pps_params { ++ int api_version; /* API version # */ ++ int mode; /* mode bits */ ++ union pps_timeu assert_off_tu; /* offset compensation for assert */ ++ union pps_timeu clear_off_tu; /* offset compensation for clear */ ++}; ++ ++typedef int pps_handle_t; /* represents a PPS source */ ++typedef unsigned long pps_seq_t; /* sequence number */ ++typedef struct ntp_fp ntp_fp_t; /* NTP-compatible time stamp */ ++typedef union pps_timeu pps_timeu_t; /* generic data type for time stamps */ ++typedef struct pps_info pps_info_t; ++typedef struct pps_params pps_params_t; ++ ++#define assert_timestamp assert_tu.tspec ++#define clear_timestamp clear_tu.tspec ++ ++#define assert_timestamp_ntpfp assert_tu.ntpfp ++#define clear_timestamp_ntpfp clear_tu.ntpfp ++ ++#define assert_offset assert_off_tu.tspec ++#define clear_offset clear_off_tu.tspec ++ ++#define assert_offset_ntpfp assert_off_tu.ntpfp ++#define clear_offset_ntpfp clear_off_tu.ntpfp ++ ++/* ++ * The PPS API ++ */ ++ ++static __inline int time_pps_create(int source, pps_handle_t *handle) ++{ ++ int ret; ++ ++ if (!handle) { ++ errno = EINVAL; ++ return -1; ++ } ++ ++ /* First we check if current device is a PPS valid PPS one... ++ */ ++ ret = ioctl(source, PPS_CHECK); ++ if (ret) { ++ errno = EOPNOTSUPP; ++ return -1; ++ } ++ ++ /* ... then since in LinuxPPS there are no differences between a ++ * "PPS source" and a "PPS handle", we simply return the same value. ++ */ ++ *handle = source; ++ ++ return 0; ++} ++ ++static __inline int time_pps_destroy(pps_handle_t handle) ++{ ++ return close(handle); ++} ++ ++static __inline int time_pps_getparams(pps_handle_t handle, ++ pps_params_t *ppsparams) ++{ ++ int ret; ++ struct pps_kparams __ppsparams; ++ ++ ret = ioctl(handle, PPS_GETPARAMS, &__ppsparams); ++ ++ ppsparams->api_version = __ppsparams.api_version; ++ ppsparams->mode = __ppsparams.mode; ++ ppsparams->assert_off_tu.tspec.tv_sec = __ppsparams.assert_off_tu.sec; ++ ppsparams->assert_off_tu.tspec.tv_nsec = __ppsparams.assert_off_tu.nsec; ++ ppsparams->clear_off_tu.tspec.tv_sec = __ppsparams.clear_off_tu.sec; ++ ppsparams->clear_off_tu.tspec.tv_nsec = __ppsparams.clear_off_tu.nsec; ++ ++ return ret; ++} ++ ++static __inline int time_pps_setparams(pps_handle_t handle, ++ const pps_params_t *ppsparams) ++{ ++ struct pps_kparams __ppsparams; ++ ++ __ppsparams.api_version = ppsparams->api_version; ++ __ppsparams.mode = ppsparams->mode; ++ __ppsparams.assert_off_tu.sec = ppsparams->assert_off_tu.tspec.tv_sec; ++ __ppsparams.assert_off_tu.nsec = ppsparams->assert_off_tu.tspec.tv_nsec; ++ __ppsparams.clear_off_tu.sec = ppsparams->clear_off_tu.tspec.tv_sec; ++ __ppsparams.clear_off_tu.nsec = ppsparams->clear_off_tu.tspec.tv_nsec; ++ ++ return ioctl(handle, PPS_SETPARAMS, &__ppsparams); ++} ++ ++/* Get capabilities for handle */ ++static __inline int time_pps_getcap(pps_handle_t handle, int *mode) ++{ ++ return ioctl(handle, PPS_GETCAP, mode); ++} ++ ++static __inline int time_pps_fetch(pps_handle_t handle, const int tsformat, ++ pps_info_t *ppsinfobuf, ++ const struct timespec *timeout) ++{ ++ struct pps_fdata __fdata; ++ int ret; ++ ++ /* Sanity checks */ ++ if (tsformat != PPS_TSFMT_TSPEC) { ++ errno = EINVAL; ++ return -1; ++ } ++ ++ if (timeout) { ++ __fdata.timeout.sec = timeout->tv_sec; ++ __fdata.timeout.nsec = timeout->tv_nsec; ++ __fdata.timeout.flags = ~PPS_TIME_INVALID; ++ } else ++ __fdata.timeout.flags = PPS_TIME_INVALID; ++ ++ ret = ioctl(handle, PPS_FETCH, &__fdata); ++ ++ ppsinfobuf->assert_sequence = __fdata.info.assert_sequence; ++ ppsinfobuf->clear_sequence = __fdata.info.clear_sequence; ++ ppsinfobuf->assert_tu.tspec.tv_sec = __fdata.info.assert_tu.sec; ++ ppsinfobuf->assert_tu.tspec.tv_nsec = __fdata.info.assert_tu.nsec; ++ ppsinfobuf->clear_tu.tspec.tv_sec = __fdata.info.clear_tu.sec; ++ ppsinfobuf->clear_tu.tspec.tv_nsec = __fdata.info.clear_tu.nsec; ++ ppsinfobuf->current_mode = __fdata.info.current_mode; ++ ++ return ret; ++} ++ ++static __inline int time_pps_kcbind(pps_handle_t handle, ++ const int kernel_consumer, ++ const int edge, const int tsformat) ++{ ++ /* LinuxPPS doesn't implement kernel consumer feature */ ++ errno = EOPNOTSUPP; ++ return -1; ++} ++ ++#endif /* _SYS_TIMEPPS_H_ */ diff --git a/utils/procps/Makefile b/utils/procps/Makefile new file mode 100644 index 0000000..8e16706 --- /dev/null +++ b/utils/procps/Makefile @@ -0,0 +1,61 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=procps +PKG_VERSION:=3.2.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://procps.sourceforge.net +PKG_MD5SUM:=9532714b6846013ca9898984ba4cd7e0 + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/procps + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libncurses + TITLE:=proc utilities + URL:=http://procps.sourceforge.net/ +endef + +define Package/procps/description + procps is the package that has a bunch of small useful utilities that give + information about processes using the /proc filesystem. The package + includes the programs ps, top, vmstat, w, kill, free, slabtop, and skill. +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + +define Package/procps/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/free $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ps/ps $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/pgrep $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/pkill $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/pmap $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/pwdx $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/skill $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/slabtop $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/snice $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tload $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/top $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/vmstat $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/w $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/watch $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/proc/libproc-$(PKG_VERSION).so $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,procps)) diff --git a/utils/procps/patches/010-make_fix.patch b/utils/procps/patches/010-make_fix.patch new file mode 100644 index 0000000..74b1d3c --- /dev/null +++ b/utils/procps/patches/010-make_fix.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -174,7 +174,7 @@ INSTALL := $(BINFILES) $(MANFILES) + # want this rule first, use := on ALL, and ALL not filled in yet + all: do_all + +--include */module.mk ++-include proc/module.mk ps/module.mk + + do_all: $(ALL) + diff --git a/utils/procps/patches/020_hz_fix.patch b/utils/procps/patches/020_hz_fix.patch new file mode 100644 index 0000000..1954453 --- /dev/null +++ b/utils/procps/patches/020_hz_fix.patch @@ -0,0 +1,41 @@ +--- a/proc/sysinfo.c ++++ b/proc/sysinfo.c +@@ -209,7 +209,12 @@ static int check_for_privs(void){ + return !!rc; + } + ++#if __GNUC__ < 4 || __GNUC_MINOR__ < 3 + static void init_libproc(void) __attribute__((constructor)); ++#else ++static void init_libproc(void) __attribute__((constructor(200))); ++#endif ++ + static void init_libproc(void){ + have_privs = check_for_privs(); + // ought to count CPUs in /proc/stat instead of relying +--- a/proc/version.c ++++ b/proc/version.c +@@ -33,7 +33,12 @@ void display_version(void) { + + int linux_version_code; + ++#if __GNUC__ < 4 || __GNUC_MINOR__ < 3 + static void init_Linux_version(void) __attribute__((constructor)); ++#else ++static void init_Linux_version(void) __attribute__((constructor(100))); ++#endif ++ + static void init_Linux_version(void) { + static struct utsname uts; + int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */ +--- a/proc/module.mk ++++ b/proc/module.mk +@@ -76,7 +76,7 @@ proc/$(ANAME): $(LIBOBJ) + + #proc/$(SONAME): proc/library.map + proc/$(SONAME): $(LIBOBJ) +- $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -shared -Wl,-soname,$(SONAME) -Wl,--version-script=proc/library.map -o $@ $^ -lc ++ $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -shared -Wl,-soname,$(SONAME) -Wl,--version-script=proc/library.map -o $@ $(sort $^) -lc + + + # AUTOMATIC DEPENDENCY GENERATION -- GCC AND GNUMAKE DEPENDENT diff --git a/utils/psmisc/Makefile b/utils/psmisc/Makefile new file mode 100644 index 0000000..93e349d --- /dev/null +++ b/utils/psmisc/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=psmisc +PKG_VERSION:=22.13 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/psmisc +PKG_MD5SUM:=e2c339e6b65b730042084023784a729e + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/psmisc + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libncurses + TITLE:=proc utilities + URL:=http://psmisc.sourceforge.net/ +endef + +define Package/psmisc/description + psmisc is a set of additional small useful utilities that use + the proc filesystem: fuser, killall, pstree, and prtstat +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + +define Package/psmisc/preinst +#!/bin/sh +if [ -e $${IPKG_INSTROOT}/usr/bin/killall ]; then + rm $${IPKG_INSTROOT}/usr/bin/killall; +fi +endef + +define Package/psmisc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/bin/{fuser,killall,prtstat,pstree} \ + $(1)/usr/bin/ +endef + +define Package/psmisc/postrm +#!/bin/sh +ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/killall +$${IPKG_INSTROOT}/usr/bin/killall 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/killall +exit 0 +endef + +$(eval $(call BuildPackage,psmisc)) diff --git a/utils/psplash/Makefile b/utils/psplash/Makefile new file mode 100644 index 0000000..2825603 --- /dev/null +++ b/utils/psplash/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=psplash +PKG_VERSION:=0.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://projects.o-hand.com/sources/psplash/ +PKG_MD5SUM:=7649b7e0fac573eca2048a2a267e242b + +PKG_INSTALL:=1 + +IMAGE_FILE:=generic +ifeq ($(CONFIG_TARGET_s3c24xx),y) + IMAGE_FILE:=480x640 +endif + +include $(INCLUDE_DIR)/package.mk + +define Package/psplash + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@!LINUX_2_4 + TITLE:=A boot splash screen + URL:=http://projects.o-hand.com/psplash +endef + +define Package/psplash/description +PSplash is a userspace graphical boot splash screen. +endef + +define Build/Configure + $(CP) \ + ./files/image_$(IMAGE_FILE).h \ + $(PKG_BUILD_DIR)/psplash-owrt-img.h + $(call Build/Configure/Default) +endef + +define Package/psplash/install + $(INSTALL_DIR) $(1)/bin $(1)/etc/init.d + $(CP) \ + $(PKG_INSTALL_DIR)/usr/bin/psplash* \ + $(1)/bin/ + $(INSTALL_BIN) \ + ./files/init \ + $(1)/etc/init.d/psplash +endef + +$(eval $(call BuildPackage,psplash)) diff --git a/utils/psplash/files/image_480x640.h b/utils/psplash/files/image_480x640.h new file mode 100644 index 0000000..c26996b --- /dev/null +++ b/utils/psplash/files/image_480x640.h @@ -0,0 +1,9452 @@ +/* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ + +#define OWRT_IMG_ROWSTRIDE (1920) +#define OWRT_IMG_WIDTH (480) +#define OWRT_IMG_HEIGHT (640) +#define OWRT_IMG_BYTES_PER_PIXEL (4) /* 3:RGB, 4:RGBA */ +#define OWRT_IMG_RLE_PIXEL_DATA ((uint8*) \ + "\206FT\203\377\2ES\202\377FT\203\377\210GU\204\377\202FU\204\377\5GU\204" \ + "\377HT\203\377HU\204\377FS\203\377+:p\377\211\31*e\377\202\30)d\377\2" \ + "\"2k\377CQ\201\377\204IV\205\377\202HU\204\377\1IV\205\377\214JW\206" \ + "\377\1IV\206\377\204JW\206\377\264KX\206\377\202JW\206\377\202IV\206" \ + "\377\214JW\206\377\202IV\205\377\1HU\204\377\203IV\205\377\3IW\206\377" \ + "3Bv\377\31*e\377\202\30)d\377\207\31*e\377\3\30)d\377\31+f\377=K|\377" \ + "\202HU\204\377\3HT\203\377GU\204\377FU\204\377\210GU\204\377\2FT\203" \ + "\377ES\202\377\210FT\203\377\2ES\203\377DR\203\377\207ES\203\377\1DR" \ + "\202\377\202CQ\201\377\205DR\202\377\3CP\201\377#3l\377\30)d\377\212" \ + "\31*e\377\10\30)d\377\34,g\377AO\200\377BP\201\377AO\200\377BP\201\377" \ + "BP\200\377BP\177\377\206BP\200\377\1AO\200\377\202@N\200\377\206AO\200" \ + "\377\1@N\177\377\202\77M~\377\206@N\177\377\202\77M~\377\3""0@t\377\27" \ + "(c\377\30)d\377\214\31*e\377\3\30)d\377,;q\377>L}\377\205=K}\377\210" \ + "L}\377;I{\377\36.h\377\30)d\377\214\31*e\377\3\30" \ + ")d\377\37/i\377s\377\26'c\377\213\31*e\377\7\34-g" \ + "\377;I|\377BP\201\377AO\200\377BP\201\377BP\200\377BP\177\377\206BP\200" \ + "\377\202AO\200\377\1@N\200\377\206AO\200\377\207@N\177\377\5\77M~\377" \ + "@N\177\377\77M~\377>L}\377*:p\377\202\30)d\377\214\31*e\377\4\33,f\377" \ + "2Av\377=K}\377s\377\30)d\377\224" \ + "\31*e\377\5\30)d\377!2k\3771Av\3772Av\3771@u\377\2062Av\377\1""0At\377" \ + "\2071Au\377\4/\77u\377,L}\377HU\204\377GT\203\377HU\204\377FU\204\377\210GU\204" \ + "\377\2FT\203\377ES\202\377\206FT\203\377\4ES\203\377FT\203\377ES\203" \ + "\377DR\203\377\205ES\203\377\4DR\202\377ES\203\377DR\202\377CQ\201\377" \ + "\204DR\202\377\5CQ\201\377DR\202\377CQ\201\377\37/h\377\30)d\377\212" \ + "\31*e\377\3\30)d\377+:q\377BP\200\377\203BP\201\377\2BP\200\377BP\177" \ + "\377\204BP\200\377\4AO\200\377BP\200\377AO\200\377@N\200\377\205AO\200" \ + "\377\2@N\177\377AO\200\377\210@N\177\377\5>L}\377\77M~\3775Cw\377\33" \ + ",f\377\30)d\377\214\31*e\377\2\30)d\377)8o\377\204=K}\377\3s\377\36/h\377\30" \ + ")d\377\230\31*e\377\5\30)d\377\36/h\377.=s\377-t\377" \ + "2Av\3771@u\377\2062Av\377\2""1Au\3770At\377\2051Au\377\5""0@u\3771Au" \ + "\377/\77u\377\"2k\377\30)d\377\230\31*e\377\5\30)d\377\35-g\377,;r\377" \ + ".=s\377,;q\377\205-s\377\30)d\377\214\31*e\377\202\30)d\377\2""4Bw\377" \ + "L~\377\203BP\201\377\2BP\200\377BP\177\377\205BP\200\377\3AO\200\377" \ + "BP\200\377@N\200\377\207AO\200\377\2@N\177\377\77M~\377\205@N\177\377" \ + "\203\77M~\377\3>K}\377\32+e\377\30)d\377\214\31*e\377\3\27(d\377(8o\377" \ + "L}\377@N\177\377(7n\377\27)d\377\214" \ + "\31*e\377\4\30)d\377\32+f\377=K}\377M\177\377BP\201\377AO" \ + "\200\377\202BP\200\377\1BP\177\377\206BP\200\377\1AO\200\377\202@N\200" \ + "\377\206AO\200\377\2@N\177\377\77M~\377\206@N\177\377\202\77M~\377\3" \ + "9Hz\377\27(c\377\30)d\377\214\31*e\377\2\27(c\3772Av\377\205=K}\377\1" \ + "s\377\27(c\377\220\31*e\377" \ + "\2\27(c\377,;q\377\2058Fz\377\2""7Fy\3778Fz\377\2077Fy\377\2076Ex\377" \ + "\3""0@t\377\31*e\377\30)d\377\223\31*e\377\5\30)d\377#4l\3774Cw\3772" \ + "Av\3771@u\377\2052Av\377\2021Au\377\1""0At\377\2051Au\377\2020@u\377" \ + "\2%6m\377\30)d\377\230\31*e\377\5\30)d\377\34,g\377,;q\377-t\377\203" \ + "BP\201\377\2BP\200\377BP\177\377\207BP\200\377\2AO\200\377@N\200\377" \ + "\204AO\200\377\4@N\177\377AO\200\377@N\177\377\77M~\377\206@N\177\377" \ + "\202\77M~\377\3""9Hz\377\33,f\377\30)d\377\214\31*e\377\3\30)d\377/=" \ + "s\377>L}\377\204=K}\377\210M~\377BP\201\377BP\200\377BP\201\377BP\200" \ + "\377BP\177\377\206BP\200\377\210AO\200\377\207@N\177\377\5\77M~\377@" \ + "N\177\377\77M~\377=K|\377$5m\377\202\30)d\377\213\31*e\377\3\30)d\377" \ + "\"3k\377>L~\377\205=K}\377\210L}" \ + "\377\77M~\377.>s\377\31*e\377\30)d\377\214\31*e\377\2\35.g\3779Gz\377" \ + "\205=K}\377\1;K}\377\207L}\377\77M~\377\40""1j\377" \ + "\215\31*e\377\2\30)d\377)9p\377\204=K}\377\3s\377\202" \ + "HU\204\377\1GU\204\377\202FU\204\377\206GU\204\377\1FT\203\377\202ES" \ + "\202\377\204FT\203\377\2ES\203\377FT\203\377\207ES\203\377\2DR\202\377" \ + "ES\203\377\205DR\202\377\5CQ\201\377ES\202\3775Ex\377\31*e\377\31)d\377" \ + "\211\31*e\377\7\27(c\377-=s\377CQ\201\377AO\200\377BP\200\377BP\201\377" \ + "BP\177\377\207BP\200\377\1@N\200\377\207AO\200\377\2@N\177\377\77M~\377" \ + "\206@N\177\377\3\77M~\377@N\177\377+;q\377\215\31*e\377\3\30)d\377\"" \ + "2k\377:H{\377\205=K}\377\2L}\377GT" \ + "\203\377HU\204\377GU\204\377FU\204\377\205GU\204\377\4FT\203\377GU\204" \ + "\377FT\203\377ES\202\377\205FT\203\377\3ES\203\377FT\203\377DR\203\377" \ + "\207ES\203\377\2DR\202\377CQ\201\377\205DR\202\377\3ES\202\377\36/i\377" \ + "\30)d\377\211\31*e\377\2\30)d\377\33-g\377\204BP\201\377\2BP\200\377" \ + "BP\177\377\206BP\200\377\2AO\200\377@N\200\377\205AO\200\377\202@N\177" \ + "\377\1\77M~\377\205@N\177\377\203\77M~\377\2""8Gz\377\30)d\377\214\31" \ + "*e\377\3\30)d\377\33+f\3777Fy\377\204=K}\377\202L}\377@N\177\377\35.g\377\30)d\377\213\31*e\377\4\30)d\377\27" \ + "(c\3771@t\377s\377-" \ + "L}\377\77M~\377\34-f\377\30)d\377" \ + "\213\31*e\377\3\30)d\377\26(c\3777Fz\377\205=K}\377\2s\377\210-t\377\27" \ + ")d\377\30)d\377\205\31*e\377\3\27)d\377!2j\377FS\203\377\203IV\205\377" \ + "\2HU\204\377IV\205\377\207JW\206\377\4IV\206\377JW\206\377KX\206\377" \ + "JW\206\377\206KX\206\377\4JW\205\377KX\206\377LY\207\377KX\206\377\207" \ + "LY\207\377\1LX\207\377\202LY\207\377\2LZ\207\377LY\207\377\211LZ\207" \ + "\377\1KZ\206\377\203LZ\207\377\202MZ\210\377\1LZ\207\377\236MZ\210\377" \ + "\1LZ\207\377\203MZ\210\377\202LZ\207\377\202KZ\206\377\210LZ\207\377" \ + "\1LY\207\377\202LZ\207\377\2LY\207\377LX\207\377\207LY\207\377\4KX\206" \ + "\377LY\207\377KX\206\377JW\205\377\207KX\206\377\4JW\206\377KX\206\377" \ + "JW\206\377IV\206\377\205JW\206\377\11IV\205\377JW\206\377IV\205\377H" \ + "U\204\377IV\205\377HU\204\377KX\206\3777Dy\377\26'c\377\207\31*e\377" \ + "\6\34,g\377>K}\377HU\204\377HT\203\377GU\204\377FU\204\377\205GU\204" \ + "\377\202FT\203\377\1ES\202\377\206FT\203\377\202ES\203\377\1DR\203\377" \ + "\206ES\203\377\2DR\202\377CQ\201\377\204DR\202\377\4CQ\201\377AO\200" \ + "\377%5m\377\30)d\377\211\31*e\377\3\30)d\377&6n\377@N\200\377\202BP\201" \ + "\377\202BP\200\377\1BP\177\377\205BP\200\377\202AO\200\377\1@N\200\377" \ + "\205AO\200\377\202@N\177\377\1\77M~\377\205@N\177\377\203\77M~\377\2" \ + "(7o\377\27(d\377\214\31*e\377\3\27(d\377,L}\377\204=K}\377\2<" \ + "K}\377;K}\377\206s\377\2068Fz\377\2""7Fy\3776Fx\377\2067Fy\377\2""6Ex\3775Dw\377\203" \ + "6Ex\377\4""5Dw\3777Fx\377\37""0i\377\30)d\377\223\31*e\377\5\30)d\377" \ + "\40""1i\3771@u\3773Bw\3771@u\377\2062Av\377\1""0At\377\2071Au\377\2/" \ + "\77u\377*:q\377\202\30)d\377\227\31*e\377\2\30)d\377\31*e\377\202.=s" \ + "\377\207-L~\377K}\377\202HU\204\377\2GU\204" \ + "\377FU\204\377\206GU\204\377\1FT\203\377\202ES\202\377\204FT\203\377" \ + "\4ES\203\377FT\203\377ES\203\377DR\203\377\206ES\203\377\2DR\202\377" \ + "CQ\201\377\205DR\202\377\3;I|\377\35.g\377\30)d\377\210\31*e\377\4\30" \ + ")d\377\26(c\3776Dy\377AO\200\377\202BP\201\377\210BP\200\377\210AO\200" \ + "\377\210@N\177\377\5\77M~\377>L}\3779Gz\377\33+f\377\30)d\377\213\31" \ + "*e\377\2\30)d\377\31*e\377\206=K}\377\2t\3772Av\3771@u\377\2062Av\377\2""1" \ + "Au\3770At\377\2061Au\377\4/\77u\377-=s\377\34-g\377\30)d\377\231\31*" \ + "e\377\2(8o\377.=s\377\206-s\377\36/i\377\30)d\377" \ + "\231\31*e\377\2%5m\377.=s\377\210-L}\377(8o\377\30)d" \ + "\377\214\31*e\377\3\30)d\377+:q\377>L}\377\204=K}\377\210K}\377\33,f\377\30)" \ + "d\377\205\31*e\377\202\30)d\377\3FS\203\377IV\205\377HU\204\377\202I" \ + "V\205\377\207JW\206\377\2IV\206\377JW\206\377\210KX\206\377\4JW\205\377" \ + "KX\206\377LY\207\377KX\206\377\206LY\207\377\2LX\207\377LY\207\377\215" \ + "LZ\207\377\214MZ\210\377\202LY\207\377\204MZ\210\377\204N[\211\377\1" \ + "MZ\210\377\206N[\211\377\1MZ\210\377\205N[\211\377\203MZ\210\377\203" \ + "LY\207\377\212MZ\210\377\1LZ\207\377\202MZ\210\377\2LZ\207\377KZ\206" \ + "\377\207LZ\207\377\4LY\207\377LZ\207\377LY\207\377LX\207\377\206LY\207" \ + "\377\1KX\206\377\202LY\207\377\1JW\205\377\206KX\206\377\4JW\206\377" \ + "KX\206\377JW\206\377IV\206\377\207JW\206\377\2IV\205\377HU\204\377\202" \ + "IV\205\377\2JW\206\377-L}\377\77M~\377/>t\377\31*e\377\30)d" \ + "\377\213\31*e\377\4\30)d\377\"2k\377\77M~\377s\377" \ + "\27(c\377\217\31*e\377\4\30)d\377\32+f\3773Av\3777Fz\377\2058Fz\377\2" \ + "7Fy\3776Fx\377\2067Fy\377\2""6Ex\3775Dw\377\2046Ex\377\3""5Dw\377\36" \ + "/h\377\30)d\377\223\31*e\377\5\27)d\377&5m\3773Bw\3772Av\3771@u\377\205" \ + "2Av\377\2""1Au\3770At\377\2061Au\377\2020@u\377\2#3k\377\30)d\377\231" \ + "\31*e\377\4\40""0j\377/=s\377-L}\377@N\177" \ + "\377\"2j\377\215\31*e\377\4\32+e\3770\77t\377=K}\377L}\377@N\177\377*:p\377\215\31*e\377\4\30)d\377+;q\377=K}\377=J|\377" \ + "\202=K}\377\3L}\377\26'c\377\30)d\377\205\31*e\377" \ + "\2\30)d\377*9p\377\202IV\205\377\202HU\204\377\1IV\205\377\206JW\206" \ + "\377\202IV\206\377\1JW\206\377\206KX\206\377\2JW\205\377KX\206\377\210" \ + "LY\207\377\2LX\207\377LY\207\377\207LZ\207\377\202KZ\206\377\202LZ\207" \ + "\377\207MZ\210\377\203LY\207\377\3MZ\210\377N[\211\377MZ\210\377\215" \ + "N[\211\377\215MZ\211\377\214N[\211\377\1MZ\210\377\202N[\211\377\1MZ" \ + "\210\377\202LY\207\377\207MZ\210\377\4LZ\207\377MZ\210\377LZ\207\377" \ + "KZ\206\377\210LZ\207\377\2LY\207\377LX\207\377\207LY\207\377\2KX\206" \ + "\377JW\205\377\207KX\206\377\2JW\206\377IV\206\377\207JW\206\377\7IV" \ + "\205\377HU\204\377IV\205\377HU\204\377DQ\201\377\34-g\377\30)d\377\205" \ + "\31*e\377\6\30)d\377%4l\377DQ\201\377HU\204\377GU\204\377FU\204\377\206" \ + "GU\204\377\1FT\203\377\202ES\202\377\205FT\203\377\1ES\203\377\202DR" \ + "\203\377\205ES\203\377\1DR\202\377\202CQ\201\377\205DR\202\377\3""1@" \ + "u\377\27(c\377\30)e\377\210\31*e\377\3\30)d\377\"2k\377DR\202\377\202" \ + "BP\201\377\2BP\200\377BP\177\377\206BP\200\377\2AO\200\377@N\200\377" \ + "\206AO\200\377\2@N\177\377\77M~\377\205@N\177\377\203\77M~\377\1""3A" \ + "v\377\215\31*e\377\3\30)d\377&6n\377L~\377\202BP\201\377\202BP\200\377\1BP\177\377\205BP\200\377\202AO\200" \ + "\377\1@N\200\377\205AO\200\377\2@N\177\377\77M~\377\206@N\177\377\202" \ + "\77M~\377\2;I{\377\30)d\377\214\31*e\377\3\30)d\377\"2j\377:H{\377\205" \ + "=K}\377\1;K}\377\206s\377GT\203\377HU\204\377GU\204\377" \ + "FU\204\377\206GU\204\377\2FT\203\377ES\202\377\206FT\203\377\2ES\203" \ + "\377DR\203\377\206ES\203\377\2DR\202\377CQ\201\377\204DR\202\377\4CQ" \ + "\201\377\77N\177\377\40""0i\377\30)d\377\211\31*e\377\2\33,f\3776Dy\377" \ + "\203BP\201\377\2BP\200\377BP\177\377\206BP\200\377\2AO\200\377@N\200" \ + "\377\205AO\200\377\202@N\177\377\1\77M~\377\205@N\177\377\5\77M~\377" \ + ">L}\377@N\177\377\33,f\377\30)d\377\213\31*e\377\3\30)d\377\35.h\377" \ + "8Fy\377\205=K}\377\2t\377CP\201\377AO\200" \ + "\377BP\201\377BP\200\377BP\177\377\206BP\200\377\2AO\200\377@N\200\377" \ + "\206AO\200\377\2@N\177\377\77M~\377\206@N\177\377\4\77M~\377@N\177\377" \ + "$4l\377\30)d\377\213\31*e\377\3\30)d\377\31)e\3776Ex\377\204=K}\377\202" \ + "t\377JW\205\377HU\204" \ + "\377IV\205\377HU\204\377JW\206\377IV\205\377\205JW\206\377\2IV\206\377" \ + "JW\206\377\210KX\206\377\2LY\207\377KX\206\377\205LY\207\377\4LX\207" \ + "\377LY\207\377LZ\207\377LY\207\377\205LZ\207\377\4KZ\206\377LZ\207\377" \ + "MZ\210\377LZ\207\377\207MZ\210\377\4LY\207\377MZ\210\377N[\211\377MZ" \ + "\210\377\210N[\211\377\1MZ\211\377\202N[\211\377\2O\\\211\377N[\211\377" \ + "\203O\\\211\377\12JV\201\377ALq\3779Cc\37708S\377$*\77\377\32\37.\377" \ + "\23\26!\377\15\17\26\377\10\12\17\377\5\6\12\377\202\4\5\10\377\12\6" \ + "\7\13\377\11\13\20\377\16\20\30\377\24\27#\377\34!1\377&,B\37719U\377" \ + ":Ce\377ALr\377JV\202\377\202O\\\211\377\202N[\211\377\202MZ\211\377\207" \ + "N[\211\377\203MZ\210\377\1LY\207\377\206MZ\210\377\4LZ\207\377MZ\210" \ + "\377LZ\207\377KZ\206\377\206LZ\207\377\202LY\207\377\1LX\207\377\207" \ + "LY\207\377\2KX\206\377JW\205\377\206KX\206\377\202JW\206\377\1IV\206" \ + "\377\204JW\206\377\4IV\205\377JW\206\377IV\205\377HU\204\377\202IV\205" \ + "\377\3CQ\201\377\32+e\377\30)d\377\205\31*e\377\4\27(d\377'7o\377JW\205" \ + "\377HT\203\377\210GU\204\377\210FT\203\377\210ES\203\377\2DR\202\377" \ + "CQ\201\377\205DR\202\377\3""7Fy\377\33,f\377\30)d\377\210\31*e\377\10" \ + "\30)d\377\"3k\377>L~\377BP\201\377BP\200\377BP\201\377BP\200\377BP\177" \ + "\377\205BP\200\377\202AO\200\377\1@N\200\377\205AO\200\377\2@N\177\377" \ + "\77M~\377\206@N\177\377\202\77M~\377\2""5Dx\377\27(c\377\214\31*e\377" \ + "\3\27(c\377,;q\377l\377" \ + "6Ex\3776Ew\3776Ex\377&6n\377\30)d\377\204\31*e\377\1\24\"S\377\216\24" \ + "\"R\377\10\23!Q\377\25#S\377*6a\377(5`\377'4_\377(5`\377(4_\377+8g\377" \ + "\2032Av\377\2""1Au\3770At\377\2051Au\377\2020@u\377\2&6n\377\30)d\377" \ + "\230\31*e\377\2\30)d\377!2j\377\202-\377JV\200\377N[\211\377MZ\211" \ + "\377\207N[\211\377\1MZ\210\377\202N[\211\377\1LY\207\377\207MZ\210\377" \ + "\202LZ\207\377\1KZ\206\377\210LZ\207\377\2LY\207\377LX\207\377\204LY" \ + "\207\377\4KX\206\377LY\207\377KX\206\377JW\205\377\207KX\206\377\206" \ + "JW\206\377\2IV\205\377JW\206\377\202IV\205\377\4HU\204\377JW\205\377" \ + ":I{\377\26'c\377\206\31*e\377\5\30)d\3777Fy\377IV\204\377HU\204\377F" \ + "U\204\377\207GU\204\377\210FT\203\377\206ES\203\377\2DR\202\377ES\203" \ + "\377\207DR\202\377\2!2j\377\30)d\377\210\31*e\377\3\30)d\377\27(d\377" \ + "8G{\377\203BP\201\377\2BP\200\377BP\177\377\206BP\200\377\2AO\200\377" \ + "@N\200\377\204AO\200\377\4@N\177\377AO\200\377@N\177\377\77M~\377\205" \ + "@N\177\377\5\77M~\377>L}\377\77M~\377\33-g\377\30)d\377\213\31*e\377" \ + "\3\30)d\377\40""0i\377m\377\2026Ex\377\2+;q\377\32*e\377\203\31*e\377" \ + "\2\24\"S\377\0\0\2\377\224\0\0\0\377\2\0\1\1\377\33#@\377\2032Av\377" \ + "\2""1Au\3770At\377\2041Au\377\5""0@u\3771Au\3770@u\377*:q\377\30)d\377" \ + "\230\31*e\377\5\30)d\377\37/i\377,s\377\27(c\377\214\31*e\377\2\26(c\3774Cx\377\205=K}\377\5s\377\205=K}\377\5L}\3778Gy\377\202\30)d\377\213\31*e\377\3\27(d\377)9p\377>L}\377" \ + "\204=K}\377\2\377\0\0\1\377\0\0\0\377DDD\377\355\355\355" \ + "\377\217\377\377\377\377\3\376\376\376\377\377\377\377\377\"\"\"\377" \ + "\202\0\0\0\377\1,9c\377\2026Ex\377\1\35.g\377\202\31*e\377\5\24\"S\377" \ + "\3\5\15\377\0\0\0\377\25\25\25\377\327\327\327\377\216\377\377\377\377" \ + "\2\363\363\363\377QQQ\377\202\0\0\0\377\1\40*M\377\2052Av\377\2071Au" \ + "\377\4""0@u\3771Au\377\35-g\377\30)d\377\227\31*e\377\202\30)d\377\6" \ + "+:q\377.=s\377-L~\377\204=K}\377\204" \ + "L}\377(8o\377\30)d\377\214\31*e\377" \ + "\2\30)d\3779Gz\377\205=K}\377\204q\377\2062Av\377\2101Au\377\3""0@u\377(8o\377\27(d\377" \ + "\227\31*e\377\2\30)c\377\12\22,\377\202\0\0\0\377\1\225\225\225\377\216" \ + "\377\377\377\377\1\367\367\367\377\202\0\0\0\377\2\3\6\17\377\27'_\377" \ + "\225\31*e\377\2\30)d\377\36/i\377\203(8o\377\207'7o\377\2\36/h\377\30" \ + ")d\377\233\31*e\377\6\27(d\377%5m\377JW\206\377HU\204\377IV\205\377H" \ + "U\204\377\207JW\206\377\1IV\206\377\206KX\206\377\2JW\205\377KX\206\377" \ + "\206LY\207\377\2LX\207\377LY\207\377\206LZ\207\377\2KZ\206\377LZ\207" \ + "\377\207MZ\210\377\1LY\207\377\207N[\211\377\5MZ\211\377N[\211\377O\\" \ + "\211\377MZ\206\377\4\5\10\377\202\0\0\0\377\3\212\212\212\377\377\377" \ + "\377\377\376\376\376\377\254\377\377\377\377\3\376\376\376\377\377\377" \ + "\377\377\222\222\222\377\202\0\0\0\377\2\3\3\5\377IV\203\377\207N[\211" \ + "\377\210MZ\210\377\210LZ\207\377\210LY\207\377\207KX\206\377\2JW\206" \ + "\377IV\206\377\206JW\206\377\5IV\205\377HU\204\377IV\205\377JW\205\377" \ + ";I|\377\206\31*e\377\7\30)d\377\26(c\377FS\203\377HU\203\377HU\204\377" \ + "GU\204\377FU\204\377\205GU\204\377\2FT\203\377ES\202\377\206FT\203\377" \ + "\2ES\203\377DR\203\377\206ES\203\377\2DR\202\377CQ\201\377\205DR\202" \ + "\377\2&6n\377\27(d\377\211\31*e\377\2\30)d\377;J|\377\203BP\201\377\2" \ + "BP\200\377BP\177\377\206BP\200\377\1@N\200\377\207AO\200\377\1\77M~\377" \ + "\206@N\177\377\202\77M~\377\1-\377" \ + "\202\31*e\377\1\24#T\377\202\0\0\0\377\1\16\16\16\377\225\377\377\377" \ + "\377\10\337\337\337\377'''\377\0\0\0\377\3\4\7\377&0U\377-;r\377\30)" \ + "d\377\23\40M\377\202\0\0\0\377\3CCC\377\377\377\377\377\376\376\376\377" \ + "\215\377\377\377\377\1\264\264\264\377\202\0\0\0\377\2\17\24$\3770>r" \ + "\377\2062Av\377\2101Au\377\3""0@u\377):p\377\27(d\377\227\31*e\377\2" \ + "\30)c\377\12\22,\377\202\0\0\0\377\1\225\225\225\377\216\377\377\377" \ + "\377\1\367\367\367\377\202\0\0\0\377\2\3\6\17\377\27'_\377\225\31*e\377" \ + "\2\30)d\377\36.h\377\203(8o\377\2'7o\377&6o\377\203'7o\377\4'6n\377'" \ + "7o\377\36/h\377\30)d\377\233\31*e\377\3\27(c\377.=s\377JW\205\377\202" \ + "IV\205\377\1HU\204\377\206JW\206\377\1IV\206\377\202JW\206\377\205KX" \ + "\206\377\2JW\205\377KX\206\377\206LY\207\377\2LX\207\377LY\207\377\206" \ + "LZ\207\377\2KZ\206\377LZ\207\377\206MZ\210\377\1LY\207\377\202MZ\210" \ + "\377\205N[\211\377\2MZ\211\377N[\211\377\202O\\\211\377\1$*\77\377\202" \ + "\0\0\0\377\4""222\377\360\360\360\377\377\377\377\377\376\376\376\377" \ + "\221\377\377\377\377\1\376\376\376\377\210\377\377\377\377\1\376\376" \ + "\376\377\221\377\377\377\377\4\376\376\376\377\377\377\377\377\365\365" \ + "\365\377666\377\202\0\0\0\377\1!';\377\207N[\211\377\210MZ\210\377\210" \ + "LZ\207\377\210LY\207\377\11KX\206\377>Io\37719W\377(/I\377$+A\377%,C" \ + "\377*1L\3774=]\377AMv\377\206JW\206\377\204IV\205\377\1CP\201\377\207" \ + "\31*e\377\2\26'c\377\77M}\377\202HU\204\377\2GU\204\377FU\204\377\205" \ + "GU\204\377\1FT\203\377\202ES\202\377\204FT\203\377\14=Ir\3771;^\377)" \ + "2P\377%,F\377\")A\377!(@\377\")A\377%,F\377)2O\377.8Y\3775@g\377@Mz\377" \ + "\204DR\202\377\2,t\377\31*e\377\30" \ + ")d\377\31*e\377\26%Y\377\21\35G\377\16\30;\377\14\25""3\377\14\24""1" \ + "\377\14\25""4\377\16\31<\377\22\37K\377\27'_\377\31*e\377\30)d\377/>" \ + "t\377>L}\377\204=K}\377\205s\377\30)d\377\16\27""8\377\202\0\0\0\377\1\200\200\200\377" \ + "\217\377\377\377\377\1ooo\377\202\0\0\0\377\2\32\">\3770\77t\377\206" \ + "2Av\377\2101Au\377\3""0@u\377+;q\377\27(d\377\207\31*e\377\7\24\"S\377" \ + "\17\31=\377\14\25""3\377\14\24""1\377\16\27""9\377\22\36J\377\27(`\377" \ + "\211\31*e\377\2\30)c\377\12\22,\377\202\0\0\0\377\1\225\225\225\377\216" \ + "\377\377\377\377\1\367\367\367\377\202\0\0\0\377\2\3\6\17\377\27(`\377" \ + "\225\31*e\377\2\30)d\377\35.h\377\204(8o\377\1&6o\377\205'7o\377\2\37" \ + "/i\377\30)e\377\233\31*e\377\2\26'c\3778Fy\377\202IV\205\377\2HU\204" \ + "\377IV\205\377\206JW\206\377\2IV\206\377JW\206\377\206KX\206\377\2JW" \ + "\205\377KX\206\377\206LY\207\377\2LX\207\377LY\207\377\205LZ\207\377" \ + "\1KZ\206\377\202LZ\207\377\205MZ\210\377\1LY\207\377\202MZ\210\377\206" \ + "N[\211\377\5MZ\211\377O\\\211\377N[\211\377IU\177\377\4\5\10\377\202" \ + "\0\0\0\377\1\247\247\247\377\223\377\377\377\377\14\370\370\370\377\341" \ + "\341\341\377\251\251\251\377ggg\377\77\77\77\377...\377222\377III\377" \ + "uuu\377\275\275\275\377\345\345\345\377\374\374\374\377\223\377\377\377" \ + "\377\1\260\260\260\377\202\0\0\0\377\2\2\3\4\377HT\177\377\203N[\211" \ + "\377\5MY\207\3772:X\377%+A\377$+A\377$*@\377\206$+A\377\2$+@\377#+@\377" \ + "\206$+@\377\3$*@\377#)\77\377/7S\377\202JW\204\377\3BMv\377/7T\377\24" \ + "\27$\377\211\0\0\0\377\4\3\4\6\377\32\36/\3775>`\377CNy\377\202IV\205" \ + "\377\1JW\206\377\203IV\205\377\3JW\206\377\32+f\377\30)d\377\205\31*" \ + "e\377\6\26'c\3776Ex\377IU\204\377HU\204\377GU\204\377FU\204\377\204G" \ + "U\204\377\7FT\203\377GU\204\377BP}\377L|\377,8h\377\20\33A\377\7\14" \ + "\36\377\0\1\3\377\211\0\0\0\377\4\3\5\15\377\13\22.\377#0\\\377:Hv\377" \ + "\204=K}\377\205s\377IV\205\377HU\204\377GU\204\377F" \ + "U\204\377\204GU\204\377\4@Mw\377,5R\377\27\34,\377\4\5\11\377\224\0\0" \ + "\0\377\4\4\5\10\377\7\15!\377\17\31>\377\26%Y\377\207\31*e\377\3\30)" \ + "d\377-=s\377CQ\202\377\202BP\201\377\2BP\200\377\37%;\377\223\0\0\0\377" \ + "\5\13\15\26\377\377\223\0\0\0\377\3\15\20\33\377" \ + "\37%=\377\10\11\17\377\205\0\0\0\377\11...\377YYY\377vvv\377\207\207" \ + "\207\377\214\214\214\377\207\207\207\377uuu\377SSS\377\37\37\37\377\204" \ + "\0\0\0\377\4\2\3\5\377\23\30(\3779Fu\377=K}\377\206Hk\377\7\10\14\377\0\0\0\377\15\15\15" \ + "\377\335\335\335\377\377\377\377\377\376\376\376\377\215\377\377\377" \ + "\377\3\376\376\376\377\377\377\377\377\264\264\264\377\204\0\0\0\377" \ + "\10\24\27#\3775=Z\377GRy\377MY\203\377KX\201\377BMq\377.5N\377\13\15" \ + "\24\377\203\0\0\0\377\4\6\6\6\377\330\330\330\377\377\377\377\377\376" \ + "\376\376\377\215\377\377\377\377\7\376\376\376\377\377\377\377\377\327" \ + "\327\327\377\22\22\22\377\0\0\0\377\7\10\14\377\377\202\0\0\0\377\2DDD\377\241\241\241\377\213\232\232" \ + "\232\377\2\234\234\234\377\207\207\207\377\202\0\0\0\377\202\0\0\1\377" \ + "\203\0\0\0\377\12...\377\240\240\240\377\360\360\360\377\370\370\370" \ + "\377\372\372\372\377\373\373\373\377\374\374\374\377\375\375\375\377" \ + "\374\374\374\377\373\373\373\377\202\371\371\371\377\3\332\332\332\377" \ + "ppp\377\1\1\1\377\203\0\0\0\377\3\11\14\24\3775Am\377=K}\377\205>>\377\204\0\0\0\377\7aaa\377\346\346\346\377\371\371\371\377" \ + "\373\373\373\377\374\374\374\377\375\375\375\377\373\373\373\377\202" \ + "\371\371\371\377\2\306\306\306\377SSS\377\205\0\0\0\377\2\77\77\77\377" \ + "\227\227\227\377\203\232\232\232\377\2\230\230\230\377\324\324\324\377" \ + "\216\377\377\377\377\2\374\374\374\377\225\225\225\377\206\232\232\232" \ + "\377\2\235\235\235\377OOO\377\202\0\0\0\377\1\16\31<\377\215\31*e\377" \ + "\2\30)d\377\33+g\377\204(8o\377\1&6o\377\205'7o\377\1\40""1j\377\233" \ + "\31*e\377\3\30)d\377\"3k\377FS\203\377\202IV\205\377\2HU\204\377IV\205" \ + "\377\205JW\206\377\2IV\206\377JW\206\377\206KX\206\377\2JW\205\377KX" \ + "\206\377\206LY\207\377\2LX\207\377LY\207\377\205LZ\207\377\1KZ\206\377" \ + "\202LZ\207\377\205MZ\210\377\4LY\207\377MZ\210\377N[\211\377MZ\210\377" \ + "\204N[\211\377\5MZ\211\377N[\211\377O\\\211\377N[\211\37708S\377\202" \ + "\0\0\0\377\3""888\377\377\377\377\377\376\376\376\377\215\377\377\377" \ + "\377\4\376\376\376\377\377\377\377\377\327\327\327\377\13\13\13\377\202" \ + "\0\0\0\377\2\10\12\17\377=Gh\377\202R_\213\377\1Q^\212\377\202R_\213" \ + "\377\203Q^\212\377\2""2:V\377\4\5\10\377\202\0\0\0\377\4\24\24\24\377" \ + "\355\355\355\377\377\377\377\377\376\376\376\377\217\377\377\377\377" \ + "\1""444\377\202\0\0\0\377\1.6R\377\202N[\211\377\5LX\205\377\30\34+\377" \ + "\0\0\0\377\4\4\4\377\241\241\241\377\215\377\377\377\377\1\320\320\320" \ + "\377\204\0\0\0\377\2%%%\377\265\265\265\377\203\377\377\377\377\1\376" \ + "\376\376\377\206\377\377\377\377\1\376\376\376\377\203\377\377\377\377" \ + "\2\241\241\241\377\32\32\32\377\203\0\0\0\377\5\30\35,\377FS\201\377" \ + "JW\205\3778Fy\377\27(c\377\205\31*e\377\7\30)d\377\33+f\377JW\205\377" \ + "GT\203\377HU\204\377DQ~\377&-F\377\203\0\0\0\377\4\2\2\2\377\32\32\32" \ + "\377vvv\377\351\351\351\377\203\377\377\377\377\1\376\376\376\377\213" \ + "\377\377\377\377\1\376\376\376\377\204\377\377\377\377\4\346\346\346" \ + "\377qqq\377\35\35\35\377\2\2\2\377\203\0\0\0\377\2\16\27""9\377\30)c" \ + "\377\202\31*e\377\3\30)d\377#3k\377DR\202\377\202BP\201\377\2BP\200\377" \ + "\40'>\377\202\0\0\0\377\1rrr\377\215\377\377\377\377\1\345\345\345\377" \ + "\204\0\0\0\377\3\1\1\1\377'''\377\257\257\257\377\203\377\377\377\377" \ + "\1\376\376\376\377\207\377\377\377\377\1\376\376\376\377\202\377\377" \ + "\377\377\3\355\355\355\377UUU\377\5\5\5\377\202\0\0\0\377\2\14\17\32" \ + "\3776Bo\377\205>>\377\203\0\0\0\377\1kkk\377\206\377\377\377\377\1\376\376\376" \ + "\377\214\377\377\377\377\1\376\376\376\377\211\377\377\377\377\1\205" \ + "\205\205\377\202\0\0\0\377\1\16\31<\377\215\31*e\377\2\30)d\377\32+f" \ + "\377\204(8o\377\1&6o\377\205'7o\377\1\40""1j\377\233\31*e\377\3\27)d" \ + "\377'7n\377GT\203\377\202IV\205\377\2HU\204\377IV\205\377\205JW\206\377" \ + "\2IV\206\377JW\206\377\206KX\206\377\2JW\205\377KX\206\377\205LY\207" \ + "\377\1LX\207\377\202LY\207\377\205LZ\207\377\4KZ\206\377LZ\207\377MZ" \ + "\210\377LZ\207\377\204MZ\210\377\2LY\207\377MZ\210\377\206N[\211\377" \ + "\5MZ\211\377N[\211\377O\\\211\377LY\205\377\34!1\377\202\0\0\0\377\3" \ + "\231\231\231\377\377\377\377\377\376\376\376\377\216\377\377\377\377" \ + "\2\371\371\371\377SSS\377\202\0\0\0\377\3\13\15\24\377DOt\377Q^\212\377" \ + "\207R_\213\377\4Q^\212\377P]\211\377=Gi\377\10\11\16\377\202\0\0\0\377" \ + "\1aaa\377\217\377\377\377\377\3\376\376\376\377\377\377\377\377\214\214" \ + "\214\377\202\0\0\0\377\10\35\"4\377KX\204\377N[\211\377LX\205\377\30" \ + "\34+\377\0\0\0\377\4\4\4\377\235\235\235\377\215\377\377\377\377\1\314" \ + "\314\314\377\202\0\0\0\377\3\2\2\2\377fff\377\367\367\367\377\202\377" \ + "\377\377\377\1\376\376\376\377\212\377\377\377\377\202\376\376\376\377" \ + "\3\377\377\377\377\350\350\350\377XXX\377\203\0\0\0\377\4\36#6\377GT" \ + "\202\377=L}\377\26'c\377\205\31*e\377\202\30)d\377\4HV\204\377HU\204" \ + "\377AMw\377\31\36.\377\203\0\0\0\377\3!!!\377\177\177\177\377\354\354" \ + "\354\377\202\377\377\377\377\1\376\376\376\377\225\377\377\377\377\3" \ + "\353\353\353\377\177\177\177\377!!!\377\203\0\0\0\377\12\11\17&\377\27" \ + "'^\377\31*e\377\30)d\377\40""1j\377DR\202\377AO\200\377BP\201\377BP\200" \ + "\377\40'>\377\202\0\0\0\377\1ppp\377\215\377\377\377\377\1\340\340\340" \ + "\377\203\0\0\0\377\3\7\7\7\377nnn\377\363\363\363\377\202\377\377\377" \ + "\377\1\376\376\376\377\213\377\377\377\377\1\376\376\376\377\202\377" \ + "\377\377\377\2\223\223\223\377\12\12\12\377\202\0\0\0\377\2\23\30(\377" \ + ";J|\377\204\377\202\0\0\0\377\1ppp\377\215\377\377\377\377\1\340" \ + "\340\340\377\202\0\0\0\377\2\20\20\20\377\246\246\246\377\202\377\377" \ + "\377\377\1\376\376\376\377\216\377\377\377\377\1\376\376\376\377\202" \ + "\377\377\377\377\1\261\261\261\377\203\0\0\0\377\1\40)D\377\204\377\202\0\0\0\377" \ + "\1ppp\377\215\377\377\377\377\4\340\340\340\377\0\0\0\377\15\15\15\377" \ + "\262\262\262\377\202\377\377\377\377\1\376\376\376\377\220\377\377\377" \ + "\377\1\376\376\376\377\202\377\377\377\377\1\232\232\232\377\202\0\0" \ + "\0\377\2\1\1\2\3777Dr\377\203\377\202\0\0\0\377" \ + "\1ppp\377\215\377\377\377\377\5\337\337\337\377\6\6\6\377\237\237\237" \ + "\377\377\377\377\377\376\376\376\377\224\377\377\377\377\3\376\376\376" \ + "\377\357\357\357\377CCC\377\202\0\0\0\377\1\31\37""4\377\203\377\202\0\0\0\377\1ppp\377\215\377\377" \ + "\377\377\4\336\336\336\377\215\215\215\377\377\377\377\377\376\376\376" \ + "\377\227\377\377\377\377\5\242\242\242\377\6\6\6\377\0\0\0\377\7\11\17" \ + "\3778Ft\377\203\377N[\211\377LX\205\377\30\34+\377\0\0\0\377\4\4\4\377\235\235" \ + "\235\377\214\377\377\377\377\1\376\376\376\377\202\377\377\377\377\1" \ + "\376\376\376\377\230\377\377\377\377\5yyy\377\1\1\1\377\0\0\0\377\4\7" \ + "\22\377\25%[\377\204\31*e\377\2\27'^\377\1\3\7\377\202\0\0\0\377\1oo" \ + "o\377\202\377\377\377\377\1\376\376\376\377\222\377\377\377\377\202\376" \ + "\376\376\377\214\377\377\377\377\4\376\376\376\377\377\377\377\377\361" \ + "\361\361\377FFF\377\202\0\0\0\377\2\6\12\30\377\377\202\0\0\0\377\1ppp\377\215\377\377\377\377\2\367\367\367" \ + "\377\377\377\377\377\202\376\376\376\377\227\377\377\377\377\5\352\352" \ + "\352\377%%%\377\0\0\0\377\3\3\6\377(2T\377\203\377\204R_\213\377\3Q_\212\377R_\213\377" \ + "S_\214\377\207R_\213\377\3Q^\212\377R_\213\377\35\"2\377\202\0\0\0\377" \ + "\1\261\261\261\377\220\377\377\377\377\1\304\304\304\377\202\0\0\0\377" \ + "\7\32\36.\377MZ\211\377LX\205\377\30\34+\377\0\0\0\377\4\4\4\377\235" \ + "\235\235\377\246\377\377\377\377\7\376\376\376\377\377\377\377\377\346" \ + "\346\346\377\30\30\30\377\0\0\0\377\0\0\1\377\17\31\77\377\204\31*e\377" \ + "\1\11\17%\377\202\0\0\0\377\4""999\377\350\350\350\377\377\377\377\377" \ + "\376\376\376\377\213\377\377\377\377\202\376\376\376\377\202\377\377" \ + "\377\377\4\351\351\351\377\305\305\305\377\307\307\307\377\352\352\352" \ + "\377\221\377\377\377\377\5\304\304\304\377\23\23\23\377\0\0\0\377\0\0" \ + "\2\377&0N\377\203BP\201\377\1\40'>\377\202\0\0\0\377\1ppp\377\214\377" \ + "\377\377\377\1\376\376\376\377\202\377\377\377\377\1\376\376\376\377" \ + "\231\377\377\377\377\1WWW\377\202\0\0\0\377\1\34#;\377\203\377\202\0\0\0\377\1p" \ + "pp\377\251\377\377\377\377\5\234\234\234\377\1\1\1\377\0\0\0\377\23\30" \ + "(\3779Gw\377\203\377\202\0\0\0\377\1ppp\377\222\377\377\377\377\1\376\376\376\377" \ + "\205\377\377\377\377\1\376\376\376\377\220\377\377\377\377\5\323\323" \ + "\323\377\1\1\1\377\0\0\0\377\14\17\31\3776Cp\377\203\377\202\0\0\0\377\1ppp\377\220\377\377\377\377\1\376\376\376\377" \ + "\202\377\377\377\377\5\346\346\346\377\266\266\266\377\255\255\255\377" \ + "\302\302\302\377\366\366\366\377\202\377\377\377\377\1\376\376\376\377" \ + "\216\377\377\377\377\5\376\376\376\377\1\1\1\377\0\0\0\377\6\10\16\377" \ + "3@j\377\203Kw\377'/J\377\202\0\0\0\377\4\1\1\1\377\237\237\237\377\377\377" \ + "\377\377\376\376\376\377\212\377\377\377\377\3\376\376\376\377\377\377" \ + "\377\377\334\334\334\377\202\0\0\0\377\1\5\7\13\377\202BP\201\377\1\40" \ + "'>\377\202\0\0\0\377\1ppp\377\217\377\377\377\377\12\376\376\376\377" \ + "\377\377\377\377\370\370\370\377]]]\377\24\24\24\377\16\16\16\377\14" \ + "\14\14\377\20\20\20\377$$$\377\243\243\243\377\221\377\377\377\377\4" \ + "\17\17\17\377\0\0\0\377\2\3\5\3771>g\377\203h\377\0\0\1" \ + "\377\0\0\0\377+++\377\340\340\340\377\216\377\377\377\377\3}}}\377\0" \ + "\0\0\377\330\330\330\377\214\377\377\377\377\2\355\355\355\377===\377" \ + "\202\0\0\0\377\2###\377\371\371\371\377\212\377\377\377\377\7\376\376" \ + "\376\377\377\377\377\377\245\245\245\377\2\2\2\377hhh\377\377\377\377" \ + "\377\376\376\376\377\215\377\377\377\377\202\0\0\0\377\6\0\1\3\377\27" \ + "'`\377\31*e\377)9p\3773Bw\377*6d\377\202\0\0\0\377\2EEE\377\370\370\370" \ + "\377\221\377\377\377\377\17\367\367\367\377kkk\377\27\27\27\377\12\12" \ + "\12\377\6\6\6\377\12\12\12\377\25\25\25\377222\377{{{\377\40\40\40\377" \ + "\0\0\0\377\0\1\3\377\20\33A\377\31*e\377\17\32@\377\202\0\0\0\377\1\6" \ + "\6\6\377\204\17\17\17\377\2\12\12\12\377\233\233\233\377\216\377\377" \ + "\377\377\2\367\367\367\377\4\4\4\377\207\17\17\17\377\1\7\7\7\377\202" \ + "\0\0\0\377\1\16\31<\377\215\31*e\377\2\30)d\377\31*e\377\204(8o\377\1" \ + "&6o\377\205'7o\377\1!2k\377\233\31*e\377\6\27(c\3773Bv\377HU\204\377" \ + "IV\205\377HU\204\377IV\205\377\206JW\206\377\2IV\206\377JW\206\377\205" \ + "KX\206\377\2JW\205\377KX\206\377\206LY\207\377\2LX\207\377LY\207\377" \ + "\206LZ\207\377\2KZ\206\377LZ\207\377\207MZ\210\377\210N[\211\377\202" \ + "O\\\211\377\202\0\0\0\377\2\33\33\33\377\357\357\357\377\220\377\377" \ + "\377\377\1BBB\377\202\0\0\0\377\1DOt\377\205R_\213\377\202Q_\212\377" \ + "\206R_\213\377\4Q^\212\377R_\213\377Q^\212\3775>[\377\202\0\0\0\377\1" \ + "qqq\377\217\377\377\377\377\2\376\376\376\377\362\362\362\377\202\0\0" \ + "\0\377\7\12\14\22\377N[\211\377LX\205\377\30\34+\377\0\0\0\377\4\4\4" \ + "\377\235\235\235\377\220\377\377\377\377\2\242\242\242\377\7\7\7\377" \ + "\202\0\0\0\377\4\1\1\2\377\2\2\3\377\1\2\3\377\0\0\1\377\202\0\0\0\377" \ + "\1kkk\377\217\377\377\377\377\1\367\367\367\377\202\0\0\0\377\3\1\2\5" \ + "\377\31*e\377\16\30""9\377\202\0\0\0\377\3}}}\377\377\377\377\377\376" \ + "\376\376\377\215\377\377\377\377\1\6\6\6\377\202\0\0\0\377\2(1M\377C" \ + "Q\201\377\204CQ\200\377\2CP\177\377\32\37""2\377\202\0\0\0\377\1:::\377" \ + "\215\377\377\377\377\202\376\376\376\377\1&&&\377\202\0\0\0\377\3""8" \ + "Dn\377BP\200\377\40'>\377\202\0\0\0\377\1ppp\377\220\377\377\377\377" \ + "\2\352\352\352\377...\377\207\0\0\0\377\1\254\254\254\377\202\376\376" \ + "\376\377\216\377\377\377\377\1%%%\377\202\0\0\0\377\1""0\377\202\0\0\0\377\1ppp\377\216\377\377\377\377\3" \ + "\376\376\376\377\371\371\371\377ddd\377\202\0\0\0\377\4\1\1\2\377\13" \ + "\15\26\377\6\11\25\377\3\5\16\377\202\0\0\0\377\2\26\26\26\377\370\370" \ + "\370\377\217\377\377\377\377\1""222\377\202\0\0\0\377\1/;c\377\203t\377HU\204\377IV\205\377HU\204\377" \ + "IV\205\377\206JW\206\377\2IV\206\377JW\206\377\205KX\206\377\202JW\205" \ + "\377\1KX\206\377\205LY\207\377\2LX\207\377LY\207\377\206LZ\207\377\2" \ + "KZ\206\377LZ\207\377\207MZ\210\377\2N[\211\377MZ\210\377\206N[\211\377" \ + "\202O\\\211\377\4\5\6\11\377\0\0\0\377\16\16\16\377\355\355\355\377\220" \ + "\377\377\377\377\1UUU\377\202\0\0\0\377\1>Gi\377\216R_\213\377\3Q^\212" \ + "\377P]\211\377,3K\377\202\0\0\0\377\1\210\210\210\377\220\377\377\377" \ + "\377\1\350\350\350\377\202\0\0\0\377\7\20\23\35\377N[\211\377LX\205\377" \ + "\30\34+\377\0\0\0\377\4\4\4\377\235\235\235\377\216\377\377\377\377\2" \ + "\376\376\376\377\254\254\254\377\202\0\0\0\377\2\5\6\12\377BMu\377\202" \ + "LY\207\377\3KX\206\377HU\202\377\25\31'\377\202\0\0\0\377\1TTT\377\216" \ + "\377\377\377\377\2\374\374\374\377ooo\377\202\0\0\0\377\6\20\34C\377" \ + "\3\5\14\377\0\0\0\377\15\15\15\377\377\377\377\377\376\376\376\377\213" \ + "\377\377\377\377\3\376\376\376\377\377\377\377\377hhh\377\215\0\0\0\377" \ + "\2\13\13\13\377\254\254\254\377\215\377\377\377\377\2\376\376\376\377" \ + "\256\256\256\377\202\0\0\0\377\3\23\30&\377BP\200\377\40'>\377\202\0" \ + "\0\0\377\1ppp\377\216\377\377\377\377\3\376\376\376\377\327\327\327\377" \ + "\14\14\14\377\202\0\0\0\377\5#*F\3777Ds\377\35-e\377\24#V\377\4\7\21" \ + "\377\202\0\0\0\377\1\273\273\273\377\217\377\377\377\377\1""555\377\202" \ + "\0\0\0\377\1/;b\377\203[\377\213R_\213\377\6Q^\212\377R_\213\377" \ + "Q^\212\377P]\211\377Q^\212\377#)=\377\202\0\0\0\377\1\236\236\236\377" \ + "\220\377\377\377\377\1\324\324\324\377\202\0\0\0\377\7\25\31&\377N[\211" \ + "\377LX\205\377\30\34+\377\0\0\0\377\4\4\4\377\235\235\235\377\216\377" \ + "\377\377\377\2\373\373\373\377ggg\377\202\0\0\0\377\1$*A\377\204LY\207" \ + "\377\6JW\205\3772:Y\377\3\4\6\377\0\0\0\377+++\377\346\346\346\377\215" \ + "\377\377\377\377\2\376\376\376\377\231\231\231\377\202\0\0\0\377\1\13" \ + "\23.\377\202\0\0\0\377\3EEE\377\377\377\377\377\376\376\376\377\215\377" \ + "\377\377\377\1+++\377\216\0\0\0\377\1\213\213\213\377\216\377\377\377" \ + "\377\1\316\316\316\377\202\0\0\0\377\3\5\6\13\377BP\200\377\40'>\377" \ + "\202\0\0\0\377\1ppp\377\217\377\377\377\377\1\235\235\235\377\202\0\0" \ + "\0\377\6\15\20\33\377\77M~\377;J{\377\36/h\377\30)d\377\15\26""7\377" \ + "\202\0\0\0\377\1www\377\217\377\377\377\377\1""555\377\202\0\0\0\377" \ + "\1/;b\377\203h\377\202\0\0\0\377\3""444\377\374\374" \ + "\374\377\376\376\376\377\214\377\377\377\377\2\371\371\371\377\373\373" \ + "\373\377\213\377\377\377\377\3\376\376\376\377\377\377\377\377\12\12" \ + "\12\377\204\0\0\0\377\2///\377\341\341\341\377\214\377\377\377\377\3" \ + "\363\363\363\377\377\377\377\377\376\376\376\377\215\377\377\377\377" \ + "\11\15\15\15\377\0\0\0\377\1\2\5\377\23!P\377\30)d\377\31*e\377*9p\377" \ + "3Bw\377*6d\377\202\0\0\0\377\2EEE\377\370\370\370\377\217\377\377\377" \ + "\377\1\263\263\263\377\202\0\0\0\377\2\4\6\20\377\27'_\377\205\31*e\377" \ + "\3\26&\\\377\20\34D\377\17\32@\377\210\31*e\377\2\30)c\377\12\22,\377" \ + "\202\0\0\0\377\1\225\225\225\377\216\377\377\377\377\1\367\367\367\377" \ + "\202\0\0\0\377\2\3\6\17\377\27(`\377\225\31*e\377\2\30)d\377\31+f\377" \ + "\204(8o\377\1&6o\377\205'7o\377\1!1j\377\233\31*e\377\3\27(d\377(8o\377" \ + "GT\203\377\202IV\205\377\2HU\204\377IV\205\377\205JW\206\377\2IV\206" \ + "\377JW\206\377\206KX\206\377\2JW\205\377KX\206\377\205LY\207\377\1LX" \ + "\207\377\202LY\207\377\205LZ\207\377\2KZ\206\377LZ\207\377\206MZ\210" \ + "\377\2LY\207\377MZ\210\377\206N[\211\377\4MZ\211\377N[\211\377O\\\211" \ + "\377\21\24\37\377\202\0\0\0\377\1\346\346\346\377\220\377\377\377\377" \ + "\1\213\213\213\377\202\0\0\0\377\1)0G\377\202R_\213\377\1Q^\212\377\206" \ + "R_\213\377\1Q^\212\377\202R_\213\377\2Q^\212\377P]\211\377\202Q^\212" \ + "\377\1\30\34)\377\202\0\0\0\377\1\275\275\275\377\220\377\377\377\377" \ + "\1\272\272\272\377\202\0\0\0\377\7\34!2\377N[\211\377LX\205\377\30\34" \ + "+\377\0\0\0\377\4\4\4\377\235\235\235\377\216\377\377\377\377\2\370\370" \ + "\370\377000\377\202\0\0\0\377\1@Kq\377\204LY\207\377\6JW\205\377CNw\377" \ + "\7\10\15\377\0\0\0\377\30\30\30\377\307\307\307\377\216\377\377\377\377" \ + "\1\270\270\270\377\202\0\0\0\377\1\4\7\21\377\202\0\0\0\377\1ppp\377" \ + "\217\377\377\377\377\1\335\335\335\377\215\327\327\327\377\2\326\326" \ + "\326\377\353\353\353\377\216\377\377\377\377\6\332\332\332\377\33\33" \ + "\33\377\0\0\0\377\0\0\1\377BP\200\377\40'\77\377\202\0\0\0\377\1ppp\377" \ + "\217\377\377\377\377\1```\377\202\0\0\0\377\6$,I\377\77M~\377:Hz\377" \ + "\36.h\377\30)d\377\22\36H\377\202\0\0\0\377\1TTT\377\217\377\377\377" \ + "\377\1""555\377\202\0\0\0\377\1/;b\377\203K{\377\77M~\3778Fy\377\35-g\377\30)d\377\24" \ + "!P\377\202\0\0\0\377\1DDD\377\217\377\377\377\377\1""555\377\202\0\0" \ + "\0\377\1/;b\377\203>>\377\202\0\0\0\377\7>In\377N[\211\377LX\205\377\30" \ + "\34+\377\0\0\0\377\4\4\4\377\235\235\235\377\216\377\377\377\377\1\364" \ + "\364\364\377\202\0\0\0\377\1\13\15\24\377\203LY\207\377\10KX\206\377" \ + "LY\207\377JW\205\377KX\206\377\21\24\37\377\0\0\0\377\3\3\3\377\244\244" \ + "\244\377\216\377\377\377\377\2\315\315\315\377\15\15\15\377\204\0\0\0" \ + "\377\1\252\252\252\377\255\377\377\377\377\2\360\360\360\377KKK\377\202" \ + "\0\0\0\377\2""1;_\377\")A\377\202\0\0\0\377\1ppp\377\217\377\377\377" \ + "\377\1\16\16\16\377\202\0\0\0\377\6@N\177\377\77M~\3776Ex\377\34-g\377" \ + "\30)d\377\24!P\377\202\0\0\0\377\1DDD\377\217\377\377\377\377\1""555" \ + "\377\202\0\0\0\377\1/;b\377\203\377\31*e\377\30" \ + ")d\377\33+f\377,;r\3773Bw\377*6d\377\202\0\0\0\377\2EEE\377\370\370\370" \ + "\377\216\377\377\377\377\5\270\270\270\377\7\7\7\377\0\0\0\377\5\11\25" \ + "\377\26%[\377\221\31*e\377\2\30)c\377\12\22,\377\202\0\0\0\377\1\225" \ + "\225\225\377\216\377\377\377\377\1\367\367\367\377\202\0\0\0\377\2\3" \ + "\6\17\377\27'_\377\225\31*e\377\2\30)d\377\33,g\377\204(8o\377\1&6o\377" \ + "\205'7o\377\1\40""1j\377\233\31*e\377\3\30)d\377\26(c\377DQ\201\377\202" \ + "IV\205\377\2HU\204\377IV\205\377\206JW\206\377\2IV\206\377JW\206\377" \ + "\206KX\206\377\2JW\205\377KX\206\377\205LY\207\377\2LX\207\377LY\207" \ + "\377\206LZ\207\377\2KZ\206\377LZ\207\377\206MZ\210\377\2LY\207\377MZ" \ + "\210\377\206N[\211\377\3MZ\211\377N[\211\377DOv\377\202\0\0\0\377\3," \ + ",,\377\377\377\377\377\376\376\376\377\216\377\377\377\377\2\371\371" \ + "\371\377hhh\377\202\0\0\0\377\1!&8\377\216Q^\212\377\1\27\33(\377\202" \ + "\0\0\0\377\2\177\177\177\377\374\374\374\377\220\377\377\377\377\12\5" \ + "\5\5\377\0\0\0\377\1\1\2\377FQ{\377N[\211\377LX\205\377\30\34+\377\0" \ + "\0\0\377\4\4\4\377\235\235\235\377\216\377\377\377\377\1\364\364\364" \ + "\377\202\0\0\0\377\1\12\14\23\377\204LY\207\377\7KX\206\377JW\205\377" \ + "KX\206\377\17\22\34\377\0\0\0\377\4\4\4\377\246\246\246\377\216\377\377" \ + "\377\377\2\316\316\316\377\16\16\16\377\204\0\0\0\377\1\251\251\251\377" \ + "\255\377\377\377\377\2\363\363\363\377SSS\377\202\0\0\0\377\2.8Z\377" \ + "\")A\377\202\0\0\0\377\1ppp\377\217\377\377\377\377\11\11\11\11\377\0" \ + "\0\0\377\1\2\3\377@N\177\377\77M~\3774Cw\377\33,f\377\30)d\377\24!P\377" \ + "\202\0\0\0\377\1DDD\377\217\377\377\377\377\1""555\377\202\0\0\0\377" \ + "\1/;b\377\203L}\377\77M~\377/=s\377\31)e\377\30)d\377\24!P\377\202\0\0" \ + "\0\377\1DDD\377\217\377\377\377\377\1""555\377\202\0\0\0\377\1/;b\377" \ + "\203l\377\2028Fz\377\2""2@o\377\11\14\26\377\202\0" \ + "\0\0\377\1\320\320\320\377\227\377\377\377\377\2\371\371\371\377kkk\377" \ + "\202\0\0\0\377\1\15\25""4\377\202\31*e\377\5\30)d\377\34-g\377.>t\377" \ + "3Bw\377*6d\377\202\0\0\0\377\2EEE\377\370\370\370\377\216\377\377\377" \ + "\377\1ccc\377\202\0\0\0\377\1\13\23/\377\222\31*e\377\2\30)c\377\12\22" \ + ",\377\202\0\0\0\377\1\225\225\225\377\216\377\377\377\377\1\367\367\367" \ + "\377\202\0\0\0\377\2\3\6\17\377\27'_\377\225\31*e\377\2\30)d\377\35." \ + "h\377\202(8o\377\3'7o\377(8o\377&6o\377\203'7o\377\4&6o\377'7o\377\36" \ + "/h\377\30)d\377\233\31*e\377\6\30)d\377\37""0i\377KW\206\377HU\204\377" \ + "IV\205\377HU\204\377\207JW\206\377\1IV\206\377\207KX\206\377\1JW\205" \ + "\377\206LY\207\377\2LX\207\377LY\207\377\207LZ\207\377\1KZ\206\377\207" \ + "MZ\210\377\3LY\207\377N[\211\377MZ\210\377\205N[\211\377\6MZ\211\377" \ + "9Ce\377\3\4\6\377\0\0\0\377\21\21\21\377\354\354\354\377\216\377\377" \ + "\377\377\1\376\376\376\377\202\377\377\377\377\1hhh\377\203\0\0\0\377" \ + "\3\6\7\12\377-4M\377KW\200\377\204Q^\212\377\3JV\177\377-4M\377\6\7\13" \ + "\377\203\0\0\0\377\1fff\377\202\377\377\377\377\1\376\376\376\377\216" \ + "\377\377\377\377\5\336\336\336\377\24\24\24\377\0\0\0\377\6\7\12\377" \ + ";Dg\377\202N[\211\377\5LX\205\377\30\34+\377\0\0\0\377\4\4\4\377\235" \ + "\235\235\377\216\377\377\377\377\2\375\375\375\377\212\212\212\377\202" \ + "\0\0\0\377\1\20\23\35\377\202LY\207\377\203KX\206\377\5*1K\377\1\1\2" \ + "\377\0\0\0\377666\377\367\367\367\377\215\377\377\377\377\2\376\376\376" \ + "\377\257\257\257\377\202\0\0\0\377\4\11\20(\377\1\3\7\377\0\0\0\377;" \ + ";;\377\217\377\377\377\377\1""666\377\236\3\3\3\377\1\1\1\1\377\202\0" \ + "\0\0\377\2-6W\377\")B\377\202\0\0\0\377\1ppp\377\217\377\377\377\377" \ + "\3\10\10\10\377\0\0\0\377\2\2\3\377\202\77M~\377\1,;q\377\202\30)d\377" \ + "\1\24!P\377\202\0\0\0\377\1DDD\377\217\377\377\377\377\1""555\377\202" \ + "\0\0\0\377\1/;b\377\203h\377\7\11\17\377\0\0\0\377\27\27\27\377" \ + "\316\316\316\377\226\377\377\377\377\2\365\365\365\377ZZZ\377\202\0\0" \ + "\0\377\1\35$\77\377\2038Fz\377\2""7Fy\377\40*H\377\202\0\0\0\377\1""3" \ + "33\377\227\377\377\377\377\2\344\344\344\377\17\17\17\377\202\0\0\0\377" \ + "\203\31*e\377\5\30)d\377\35.h\3771@u\3772Av\377*6d\377\202\0\0\0\377" \ + "\2EEE\377\370\370\370\377\216\377\377\377\377\4UUU\377\0\0\0\377\0\0" \ + "\1\377\15\26""5\377\222\31*e\377\2\30)c\377\12\22,\377\202\0\0\0\377" \ + "\1\222\222\222\377\216\377\377\377\377\1\367\367\367\377\202\0\0\0\377" \ + "\2\3\6\17\377\27(`\377\202\31*e\377\6\30)b\377\26&\\\377\24!P\377\12" \ + "\20(\377\17\32\77\377\30)d\377\215\31*e\377\2\30)d\377\37""0i\377\203" \ + "(8o\377\207'7o\377\2\36.h\377\30)d\377\234\31*e\377\6\27(c\377=K|\377" \ + "JV\205\377IV\205\377HU\204\377IV\205\377\206JW\206\377\3IV\206\377KX" \ + "\206\377JW\206\377\205KX\206\377\3JW\205\377LY\207\377KX\206\377\205" \ + "LY\207\377\3LX\207\377LZ\207\377LY\207\377\205LZ\207\377\2KZ\206\377" \ + "LZ\207\377\210MZ\210\377\2N[\211\377MZ\210\377\205N[\211\377\6MZ\211" \ + "\377\"(=\377\0\0\1\377\0\0\0\377@@@\377\363\363\363\377\217\377\377\377" \ + "\377\202\376\376\376\377\3\377\377\377\377\236\236\236\377111\377\212" \ + "\0\0\0\377\3...\377\227\227\227\377\377\377\377\377\202\376\376\376\377" \ + "\217\377\377\377\377\5\362\362\362\377CCC\377\0\0\0\377\0\0\1\377$*\77" \ + "\377\203N[\211\377\5LX\205\377\30\34+\377\0\0\0\377\4\4\4\377\235\235" \ + "\235\377\217\377\377\377\377\2\372\372\372\377mmm\377\203\0\0\0\377\4" \ + "\23\26\"\377\"(=\377!';\377\14\16\26\377\202\0\0\0\377\2\23\23\23\377" \ + "\343\343\343\377\216\377\377\377\377\2\373\373\373\377```\377\202\0\0" \ + "\0\377\2\22\37L\377\12\21)\377\202\0\0\0\377\1\313\313\313\377\216\377" \ + "\377\377\377\1\266\266\266\377\203\0\0\0\377\2\22\26$\377\26\33*\377" \ + "\205\26\32*\377\2\25\32)\377\3\4\7\377\223\0\0\0\377\4\2\3\5\377\6\7" \ + "\14\377)1O\377\36$:\377\202\0\0\0\377\1ppp\377\217\377\377\377\377\11" \ + "\10\10\10\377\0\0\0\377\2\2\3\377\77M~\377>K}\377'7n\377\30)d\377\31" \ + "*e\377\24!P\377\202\0\0\0\377\1DDD\377\217\377\377\377\377\1""555\377" \ + "\202\0\0\0\377\1/;b\377\202c\377" \ + "\27\33,\377\1\1\2\377\202\0\0\0\377\11(((\377\311\311\311\377\271\271" \ + "\271\377\233\233\233\377~~~\377bbb\377EEE\377(((\377\13\13\13\377\213" \ + "\0\0\0\377\2\35#8\377\"*C\377\202\0\0\0\377\1ppp\377\217\377\377\377" \ + "\377\11\10\10\10\377\0\0\0\377\2\2\3\377\77M~\377;J{\377!1j\377\30)d" \ + "\377\31*e\377\24!P\377\202\0\0\0\377\1DDD\377\217\377\377\377\377\1""5" \ + "55\377\202\0\0\0\377\1/;b\377\202\377\202\0\0\0\377\1ppp\377\217\377\377" \ + "\377\377\11\10\10\10\377\0\0\0\377\1\2\3\377\77M~\3779Gz\377\32+e\377" \ + "\30)d\377\31*e\377\24!P\377\202\0\0\0\377\1DDD\377\217\377\377\377\377" \ + "\1""555\377\202\0\0\0\377\1/;b\377\202s\377JW\206\377IV\205\377HU\204\377IV\205\377" \ + "\206JW\206\377\2IV\206\377JW\206\377\206KX\206\377\2JW\205\377KX\206" \ + "\377\207LY\207\377\2LX\207\377LY\207\377\206LZ\207\377\4KZ\206\377LZ" \ + "\207\377MZ\210\377LZ\207\377\206MZ\210\377\3LY\207\377N[\211\377MZ\210" \ + "\377\205N[\211\377\2JW\203\377\23\26!\377\202\0\0\0\377\4///\377\356" \ + "\356\356\377\377\377\377\377\376\376\376\377\250\377\377\377\377\4\376" \ + "\376\376\377\377\377\377\377\365\365\365\377;;;\377\202\0\0\0\377\4\20" \ + "\23\35\377IU\200\377N[\211\377MZ\210\377\202N[\211\377\6MZ\210\377KW" \ + "\204\377\30\34+\377\0\0\0\377\4\4\4\377\235\235\235\377\247\377\377\377" \ + "\377\3\376\376\376\377\377\377\377\377\273\273\273\377\202\0\0\0\377" \ + "\13\4\6\20\377\26&\\\377\31*e\377\30)d\377&2`\377\5\6\12\377\0\0\0\377" \ + "\4\4\4\377\234\234\234\377\377\377\377\377\376\376\376\377\213\377\377" \ + "\377\377\16\376\376\376\377\377\377\377\377\376\376\376\377\311\311\311" \ + "\377\204\204\204\377III\377---\377,,,\377DDD\377yyy\377\272\272\272\377" \ + "\367\367\367\377\377\377\377\377\376\376\376\377\213\377\377\377\377" \ + "\1\376\376\376\377\202\377\377\377\377\1===\377\202\0\0\0\377\1\22\26" \ + "#\377\202BP\200\377\1\40'>\377\202\0\0\0\377\1ppp\377\217\377\377\377" \ + "\377\11\10\10\10\377\0\0\0\377\1\2\3\377\77M~\3777Fy\377\27(c\377\30" \ + ")d\377\31*e\377\24!P\377\202\0\0\0\377\1DDD\377\217\377\377\377\377\1" \ + "555\377\202\0\0\0\377\1/;b\377\202\377\202\0" \ + "\0\0\377\1ppp\377\217\377\377\377\377\6\10\10\10\377\0\0\0\377\1\2\3" \ + "\377\77M~\3772Au\377\26(c\377\202\31*e\377\1\24!P\377\202\0\0\0\377\1" \ + "DDD\377\217\377\377\377\377\1""555\377\202\0\0\0\377\5/;b\377;J|\377" \ + "\377\202\0\0\0\377\1ppp\377\217\377\377\377\377\6\10\10\10\377" \ + "\0\0\0\377\1\2\3\377\77M~\377,;q\377\27(c\377\202\31*e\377\1\24!P\377" \ + "\202\0\0\0\377\1DDD\377\217\377\377\377\377\1""555\377\202\0\0\0\377" \ + "\2/;b\377\377\202\0\0\0\377\1ppp\377" \ + "\217\377\377\377\377\6\10\10\10\377\0\0\0\377\1\2\3\377\77M~\377&6n\377" \ + "\27(d\377\202\31*e\377\1\24!P\377\202\0\0\0\377\1DDD\377\217\377\377" \ + "\377\377\1""555\377\202\0\0\0\377\4/;b\377l\377\2038Fz\377" \ + "\3""7Fy\3778Fz\3776Fx\377\2037Fy\377\1\5\7\14\377\202\0\0\0\377\1\341" \ + "\341\341\377\222\377\377\377\377\5\335\335\335\377\6\6\6\377\0\0\0\377" \ + "\3\6\17\377\25#V\377\205\31*e\377\4,\377\202\0\0\0\377\1ppp\377\217" \ + "\377\377\377\377\6\10\10\10\377\0\0\0\377\1\2\3\377\77M~\377\40""0i\377" \ + "\30)d\377\202\31*e\377\1\24!P\377\202\0\0\0\377\1DDD\377\217\377\377" \ + "\377\377\1""555\377\202\0\0\0\377\4/;b\377t\3773Bw\3772A" \ + "v\377*7e\377\202\0\0\0\377\2EEE\377\370\370\370\377\216\377\377\377\377" \ + "\4SSS\377\0\0\0\377\0\0\1\377\15\26""7\377\222\31*e\377\7\30)d\377\36" \ + ".h\377\30\40\77\377\0\1\2\377\0\0\0\377666\377\352\352\352\377\225\377" \ + "\377\377\377\1\244\244\244\377\202\0\0\0\377\1\14\24""0\377\214\31*e" \ + "\377\3\30)d\377\32+f\377&6n\377\203(8o\377\206'7o\377\3#4l\377\31*e\377" \ + "\30)d\377\236\31*e\377\7\30)d\377\34-g\377ES\202\377HV\205\377IV\205" \ + "\377HU\204\377IV\205\377\207JW\206\377\1IV\206\377\207KX\206\377\3JW" \ + "\205\377LY\207\377KX\206\377\207LY\207\377\2LZ\207\377LY\207\377\205" \ + "LZ\207\377\1KZ\206\377\202LZ\207\377\207MZ\210\377\4LY\207\377MZ\210" \ + "\377N[\211\377MZ\210\377\205N[\211\377\2JW\203\377\40%8\377\203\0\0\0" \ + "\377\2$$$\377\275\275\275\377\202\377\377\377\377\1\376\376\376\377\234" \ + "\377\377\377\377\1\376\376\376\377\202\377\377\377\377\2\275\275\275" \ + "\377$$$\377\203\0\0\0\377\7\36#5\377JV\202\377N[\211\377MZ\210\377N[" \ + "\211\377MZ\210\377LY\207\377\204MZ\210\377\5KW\204\377\30\34+\377\0\0" \ + "\0\377\4\4\4\377\235\235\235\377\216\377\377\377\377\2\372\372\372\377" \ + "\260\260\260\377\223\377\377\377\377\1\376\376\376\377\202\377\377\377" \ + "\377\1JJJ\377\203\0\0\0\377\1\22\37K\377\203\31*e\377\2\30)d\377\77M" \ + "~\377\202HU\204\377\3GU\204\377CQ~\377\27\34+\377\202\0\0\0\377\5\3\3" \ + "\3\377ttt\377\376\376\376\377\377\377\377\377\376\376\376\377\232\377" \ + "\377\377\377\1\376\376\376\377\202\377\377\377\377\2\261\261\261\377" \ + "\22\22\22\377\203\0\0\0\377\1""6Ai\377\202BP\201\377\4BP\200\377BP\177" \ + "\377BP\200\377\40'>\377\202\0\0\0\377\1ppp\377\217\377\377\377\377\6" \ + "\10\10\10\377\0\0\0\377\1\2\3\377\77M}\377\30*e\377\30)d\377\202\31*" \ + "e\377\1\24!P\377\202\0\0\0\377\1DDD\377\217\377\377\377\377\1""555\377" \ + "\202\0\0\0\377\4/;b\377>>\377\203\0\0\0\377\1\16\27""8\377\203\31*e\377\4" \ + "\30)d\377\37/h\377IV\205\377HU\204\377\203GU\204\377\2CP}\377\16\21\33" \ + "\377\203\0\0\0\377\3JJJ\377\357\357\357\377\376\376\376\377\202\377\377" \ + "\377\377\1\376\376\376\377\224\377\377\377\377\1\376\376\376\377\203" \ + "\377\377\377\377\3\366\366\366\377\206\206\206\377\4\4\4\377\202\0\0" \ + "\0\377\2\1\1\3\377-8^\377\203BP\201\377\4BP\200\377BP\177\377BP\200\377" \ + "\40'>\377\202\0\0\0\377\1ppp\377\217\377\377\377\377\5\10\10\10\377\0" \ + "\0\0\377\1\2\3\377:Hz\377\26'c\377\203\31*e\377\1\24!P\377\202\0\0\0" \ + "\377\1DDD\377\217\377\377\377\377\1""555\377\202\0\0\0\377\4/;b\377<" \ + "K}\377;J|\377:I{\377\205;J|\377\2:I{\377*5Y\377\202\0\0\0\377\3\77\77" \ + "\77\377\377\377\377\377\376\376\376\377\217\377\377\377\377\5\323\323" \ + "\323\377\37\37\37\377\0\0\0\377\4\5\11\377+6_\377\2058Fz\377\1""6Fx\377" \ + "\2047Fy\377\2""0>k\377\4\5\11\377\202\0\0\0\377\1\365\365\365\377\221" \ + "\377\377\377\377\4@@@\377\0\0\0\377\0\0\2\377\16\30:\377\204\31*e\377" \ + "\6\30)d\377\32*e\3774Cx\3772Av\3771@u\377*7e\377\202\0\0\0\377\2EEE\377" \ + "\370\370\370\377\216\377\377\377\377\4SSS\377\0\0\0\377\0\0\1\377\15" \ + "\26""7\377\222\31*e\377\4\30)d\377!1j\377->>\377" \ + "\203\0\0\0\377\12\2\4\13\377\32%L\377\77M\177\377BP\201\377BP\200\377" \ + "BP\201\377BP\200\377BP\177\377BP\200\377\40'>\377\202\0\0\0\377\1ppp" \ + "\377\217\377\377\377\377\5\10\10\10\377\0\0\0\377\1\2\3\3772@u\377\27" \ + "(c\377\203\31*e\377\1\24!P\377\202\0\0\0\377\1EEE\377\217\377\377\377" \ + "\377\1""555\377\202\0\0\0\377\4/;b\377i\377\1\2\3\377\0\0\0\377\4\4\4\377\221\377\377\377\377\5" \ + "\247\247\247\377\6\6\6\377\0\0\0\377\10\12\22\3777Ex\377\2058Fz\377\1" \ + "6Fx\377\2047Fy\377\2""4Br\377\20\24#\377\202\0\0\0\377\1\244\244\244" \ + "\377\220\377\377\377\377\5\342\342\342\377***\377\0\0\0\377\1\2\6\377" \ + "\22\37L\377\204\31*e\377\6\30)d\377\34-g\3774Cx\3772Av\3771@u\377*7e" \ + "\377\202\0\0\0\377\2EEE\377\371\371\371\377\216\377\377\377\377\4SSS" \ + "\377\0\0\0\377\0\0\1\377\15\26""7\377\222\31*e\377\2\30)d\377\"2k\377" \ + "\202->>\377\204\0\0\0\377\3\6\13\33\377\23\40P\377+;q\377" \ + "\203BP\201\377\2BP\200\377BP\177\377\202BP\200\377\1\40'>\377\202\0\0" \ + "\0\377\1rrr\377\217\377\377\377\377\5\10\10\10\377\0\0\0\377\2\2\3\377" \ + "(8o\377\27)d\377\203\31*e\377\1\24!P\377\202\0\0\0\377\1EEE\377\217\377" \ + "\377\377\377\1""666\377\202\0\0\0\377\3/;b\377;J|\377:I{\377\206;J|\377" \ + "\3:I{\3774Ao\377\13\16\30\377\202\0\0\0\377\1\317\317\317\377\220\377" \ + "\377\377\377\1vvv\377\202\0\0\0\377\1\24\31,\377\2068Fz\377\1""6Fx\377" \ + "\2057Fy\377\1\34#>\377\202\0\0\0\377\1RRR\377\220\377\377\377\377\5\303" \ + "\303\303\377\24\24\24\377\0\0\0\377\2\4\11\377\27'_\377\204\31*e\377" \ + "\6\30)d\377\37""0i\3774Cx\3772Av\3771@u\377*7e\377\202\0\0\0\377\2FF" \ + "F\377\374\374\374\377\216\377\377\377\377\4TTT\377\0\0\0\377\0\0\1\377" \ + "\15\26""7\377\221\31*e\377\7\30)e\377\30)d\377$4l\377.=s\377-b\377\11\13\21\377\204\0\0\0\377" \ + "\7\17\17\17\377\37\37\37\377@@@\377www\377\246\246\246\377\314\314\314" \ + "\377\352\352\352\377\207\377\377\377\377\10\372\372\372\377\343\343\343" \ + "\377\305\305\305\377\241\241\241\377ttt\377===\377\40\40\40\377\21\21" \ + "\21\377\204\0\0\0\377\12\0\0\2\377\16\30:\377\27'^\377\32+e\3772Av\377" \ + "BP\201\377AO\200\377BP\201\377BP\200\377BP\177\377\202BP\200\377\1\40" \ + "'>\377\202\0\0\0\377\2\20\20\20\377&&&\377\216%%%\377\5\1\1\1\377\0\0" \ + "\0\377\2\2\3\377\37""0i\377\30)d\377\203\31*e\377\1\24!P\377\202\0\0" \ + "\0\377\2\12\12\12\377'''\377\215%%%\377\2'''\377\7\7\7\377\202\0\0\0" \ + "\377\3/;b\377;J|\377:I{\377\206;J|\377\3:I{\3777Ev\377\25\32-\377\202" \ + "\0\0\0\377\2\32\32\32\377&&&\377\216%%%\377\2$$$\377\16\16\16\377\202" \ + "\0\0\0\377\1&/S\377\2048Fz\377\3""7Fy\3778Fz\3776Fx\377\2057Fy\377\5" \ + "&0T\377\2\3\5\377\0\0\0\377\7\7\7\377'''\377\217%%%\377\4\32\32\32\377" \ + "\1\1\1\377\0\0\0\377\5\10\24\377\205\31*e\377\6\30)d\377#3l\3774Cw\377" \ + "2Av\3771@u\377*7e\377\202\0\0\0\377\2\12\12\12\377$$$\377\215%%%\377" \ + "\5'''\377\14\14\14\377\0\0\0\377\0\0\1\377\15\26""7\377\221\31*e\377" \ + "\202\30)d\377\6%5m\377.=s\377->>\377\206\206\206\377\274\274\274\377" \ + "\343\343\343\377\206\377\377\377\377\11\371\371\371\377\340\340\340\377" \ + "\301\301\301\377\234\234\234\377rrr\377AAA\377$$$\377\27\27\27\377\2" \ + "\2\2\377\202\0\0\0\377\214\31*e\377\3\30)d\377\37/i\377'7n\377\202(8" \ + "o\377\2'7o\377&6o\377\204'7o\377\3&6n\377\37""0i\377\30)d\377\232\31" \ + "*e\377\2\37""0i\377\30)d\377\205\31*e\377\3\30)d\377\34-g\377ER\202\377" \ + "\202IV\205\377\4HU\204\377IV\205\377JW\206\377IV\205\377\204JW\206\377" \ + "\1IV\206\377\202JW\206\377\206KX\206\377\1JW\205\377\202KX\206\377\207" \ + "LY\207\377\3LX\207\377LZ\207\377LY\207\377\206LZ\207\377\1KZ\206\377" \ + "\202LZ\207\377\210MZ\210\377\202LY\207\377\3MZ\210\377N[\211\377MZ\210" \ + "\377\207N[\211\377\4;Eh\377\22\26!\377\0\1\1\377\0\0\1\377\212\0\0\0" \ + "\377\5\13\13\13\377\24\24\24\377\27\27\27\377\23\23\23\377\11\11\11\377" \ + "\211\0\0\0\377\202\0\0\1\377\2\17\22\33\3778Bc\377\204N[\211\377\203" \ + "MZ\210\377\202LY\207\377\206MZ\210\377\7LZ\207\377MZ\210\377JW\203\377" \ + "\27\34*\377\0\0\0\377\4\4\4\377\235\235\235\377\216\377\377\377\377\2" \ + "\366\366\366\377\13\13\13\377\202\0\0\0\377\1\0\0\1\377\207\0\0\0\377" \ + "\2\11\11\11\377\5\5\5\377\207\0\0\0\377\4\1\1\2\377\22\27*\377\27'_\377" \ + "\30)d\377\204\31*e\377\7\30)d\377\27(c\3777Fx\377GT\203\377HU\204\377" \ + "GU\204\377FU\204\377\206GU\204\377\4FT\203\377ES\202\377&.H\377\4\5\10" \ + "\377\213\0\0\0\377\4\6\6\6\377\13\13\13\377\11\11\11\377\3\3\3\377\213" \ + "\0\0\0\377\3\0\0\1\377\11\17%\377\26&[\377\202\31*e\377\2\34-g\377:H" \ + "{\377\203BP\201\377\2BP\200\377BP\177\377\202BP\200\377\1\40'>\377\224" \ + "\0\0\0\377\3\1\2\3\377\31*e\377\30)d\377\203\31*e\377\1\24!P\377\225" \ + "\0\0\0\377\3/;b\377;J|\377:I{\377\206;J|\377\3:I{\3779Hz\377\36&A\377" \ + "\226\0\0\0\377\1""7Ex\377\2058Fz\377\2""7Fy\3776Fx\377\2057Fy\377\2/" \ + "\377" \ + "\32\37/\377\23\27\"\377\16\20\30\377\11\13\20\377\5\6\12\377\3\3\5\377" \ + "\2\2\3\377\1\1\2\377\2\2\3\377\3\4\6\377\6\7\13\377\12\14\22\377\20\22" \ + "\34\377\26\32(\377\36$6\377(/G\3773;Z\377\77Jp\377\205N[\211\377\1MZ" \ + "\210\377\202N[\211\377\2MZ\210\377LY\207\377\212MZ\210\377\7LZ\207\377" \ + "KZ\206\377JW\203\377\30\34*\377\0\0\0\377\4\4\4\377\235\235\235\377\216" \ + "\377\377\377\377\30\366\366\366\377\13\13\13\377\0\0\0\377\3\4\6\377" \ + "KX\206\377GT\200\3774=_\377&-D\377\31\35.\377\20\23\35\377\11\12\20\377" \ + "\5\6\11\377\3\4\6\377\4\4\7\377\6\10\14\377\14\16\26\377\25\30&\377\37" \ + "%9\377-5R\377L}\377\27(c\377\30)d\377\205\31*e\377" \ + "\6\30)d\377*:p\377GT\203\377HU\204\377GU\204\377FU\204\377\205GU\204" \ + "\377\202FT\203\377\1ES\202\377\205FT\203\377\26" \ + "t\3773Bv\3771@u\3772Av\3770>q\377\"-Q\377\203#.S\377\2\".S\377\".R\377" \ + "\206\".S\377\3\"-S\377\37*P\377\23\37H\377\205\21\35G\377\2\21\35H\377" \ + "\25$W\377\221\31*e\377\5\30)d\377\33,f\377)9p\377.=s\377,;q\377\205-" \ + "Ip\377>Iq\377\77K" \ + "s\377BMw\377DP|\377GT\202\377IV\205\377HU\204\377JW\205\377&6m\377\27" \ + "(d\377\206\31*e\377\6\32+f\3778Gz\377IU\204\377HT\203\377GU\204\377F" \ + "U\204\377\206GU\204\377\2FT\203\377ES\202\377\205FT\203\377\202ES\203" \ + "\377\21DR\203\377DR\201\377AN|\377\77Kw\377=It\377Kw\377\32*a\377\27(c\377\211" \ + "\31*e\377\4\30)d\3773Bw\377CQ\201\377BP\201\377\202BP\200\377\1BP\177" \ + "\377\205BP\200\377\202AO\200\377\1@N\200\377\206AO\200\377\2@N\177\377" \ + "\77M~\377\206@N\177\377\3>L}\377@N\177\377&5m\377\216\31*e\377\3-=s\377" \ + "=K}\377s\377\27(d\377\30)d\377\222\31*e\377\2\30)d\377\30(d\377\2022Av\377" \ + "\1""1@u\377\2062Av\377\2""1Au\3770At\377\2051Au\377\2020@u\377\2*;q\377" \ + "\32+f\377\230\31*e\377\5\30)d\377\34,g\377+:q\377.=s\377,;q\377\205-" \ + "L}\377" \ + "\37""0i\377\30)d\377\214\31*e\377\2\33,f\3773Bv\377\205=K}\377\2t\377CQ\201\377\202BP\201\377\2BP\200\377BP\177" \ + "\377\206BP\200\377\2AO\200\377@N\200\377\206AO\200\377\2@N\177\377\77" \ + "M~\377\206@N\177\377\5>L}\377\77M~\3772Av\377\32+f\377\30)d\377\213\31" \ + "*e\377\2\30)d\377\37""0i\377\204=K}\377\2s\377-L~\377L}\377\204=K}\377\2t\377\37""0j\377\30)d\377\231\31*e\377\2$4l\377.=s\377\210-" \ + "Js\377vvv\377\33\33" \ + "\33\377\202\23\23\23\377\25\21\21\21\377***\377\224\225\226\377NZ\205" \ + "\377GU\204\377HV\204\377\217\217\217\377+++\377\21\21\21\377\23\23\23" \ + "\377\24\24\24\377LLL\377z\200\222\377FT\203\377\211\212\217\377<<<\377" \ + "\17\17\17\377\23\23\23\377\24\24\24\377XXY\377iq\216\377\204ES\203\377" \ + "\207DR\202\377\3@N\177\377\40""0i\377\30)d\377\211\31*e\377\17\27(c\377" \ + ".>s\377AO\200\377BP\201\377BP\200\377BP\201\377BP\200\377Wa\205\377i" \ + "ii\377\24\24\24\377\23\23\23\377\22\22\22\377222\377ux\203\377CQ\200" \ + "\377\205AO\200\377\2@N\177\377AO\200\377\207@N\177\377\202\77M~\377\3" \ + ":I{\377\36/i\377\30)d\377\214\31*e\377\2\30)d\3779Gz\377\205=K}\377\2" \ + "t\3772Av\3771@u\377\2042Av\377\3n" \ + "t\207\377PPP\377\16\16\16\377\202\23\23\23\377\2===\377ov\214\377\203" \ + "1Au\377\4""0@u\377-=s\377\35.h\377\30)d\377\231\31*e\377\2'6o\377.=s" \ + "\377\210-L~\377BP\201\377BP\200\377BP\201" \ + "\377BP\200\377BP\177\377Wb\206\377ccc\377\1\1\1\377\202\0\0\0\377\3#" \ + "##\377sw\201\377BP\200\377\204AO\200\377\4@N\177\377AO\200\377@N\177" \ + "\377\77M~\377\204@N\177\377\2\77M~\377@N\177\377\202\77M~\377\2.=r\377" \ + "\27(c\377\214\31*e\377\3\27)d\377'7o\377>L}\377\204=K}\377\202L~\377IV\205\377HU\204\377IV\205\377HU\204\377" \ + "IV\205\377\207JW\206\377\1IV\206\377\202JW\206\377\210KX\206\377\4JW" \ + "\205\377KX\206\377LY\207\377KX\206\377\207LY\207\377\4LX\207\377LY\207" \ + "\377LZ\207\377LY\207\377\212LZ\207\377\1KZ\206\377\202LZ\207\377\203" \ + "MZ\210\377\1LZ\207\377\240MZ\210\377\202LZ\207\377\202KZ\206\377\211" \ + "LZ\207\377\11LY\207\377LZ\207\377LY\207\377LX\207\377JU\203\377\30\34" \ + "*\377\0\0\0\377\4\4\4\377\235\235\235\377\216\377\377\377\377\4\366\366" \ + "\366\377\13\13\13\377\0\0\0\377\3\4\6\377\206JW\206\377\202IV\205\377" \ + "\1HU\204\377\202IV\205\377\4JW\206\377@Lv\377sss\377\12\12\12\377\202" \ + "\0\0\0\377\6\14\14\14\377sss\3771>n\377\37/g\377\203\203\203\377\36\36" \ + "\36\377\205\0\0\0\377\5///\377\212\215\227\377GU\204\377{\200\220\377" \ + "]]]\377\203\0\0\0\377\6\7\7\7\377\220\222\227\377S_\205\377FT\203\377" \ + "qw\213\377uz\212\377\203sx\212\377\2uz\213\377Yc\207\377\203ES\203\377" \ + "\2DR\202\377CQ\201\377\204DR\202\377\4IV\202\377ES\200\377\40""0h\377" \ + "\30)d\377\206\31*e\377\5\40""0g\377#2h\377\"2h\377\37/f\377+;q\377\203" \ + "BP\201\377\202BP\200\377\4BP\177\377Wb\206\377ccc\377\1\1\1\377\202\0" \ + "\0\0\377\3###\377sw\201\377BP\200\377\205AO\200\377\202@N\177\377\3E" \ + "R\177\377FS\200\377GS\200\377\203@N\177\377\203\77M~\377\2\"2k\377\30" \ + ")d\377\205\31*e\377\1\"1h\377\203\"2h\377\203\31*e\377\2\26(c\3772Bv" \ + "\377\205=K}\377\6s\377.=s\377\202-r\377+>>\377\203\0\0\0\377\7$$$\377\216\216\216\377>Jr\377\31*e\377W`}\377" \ + "\206\206\206\377\21\21\21\377\203\0\0\0\377\4JJJ\377xxx\377yyy\377OO" \ + "O\377\203\0\0\0\377\6\20\20\20\377\213\213\213\377X`}\377\30)d\377ot" \ + "\206\377sss\377\205\0\0\0\377\1\20\20\20\377\202\0\0\0\377\1\16\16\16" \ + "\377\203\0\0\0\377\6""111\377pw\215\3771Au\377;Ix\377\215\215\216\377" \ + "DDD\377\203\0\0\0\377\4\2\2\2\377000\377\77\77\77\377\27\27\27\377\203" \ + "\0\0\0\377\7\20\20\20\377rrr\377]e\200\377\31*e\377)8l\377mmm\377\14" \ + "\14\14\377\202\0\0\0\377\2&&&\377###\377\207\0\0\0\377\2\"\"\"\377\6" \ + "\6\6\377\207\0\0\0\377\2\203\203\203\377+K{\377\206\207\214\377***\377" \ + "\203\0\0\0\377\6WWW\377\216\216\220\377Wa\202\377bj\205\377\223\223\225" \ + "\377###\377\203\0\0\0\377\5```\377z~\212\377\34-f\377\201\204\221\377" \ + "111\377\203\0\0\0\377\6DDE\377\221\221\221\377PYz\377LVx\377\220\221" \ + "\223\377CCD\377\203\0\0\0\377\5;;;\377\200\203\217\377%4i\377\211\213" \ + "\223\377+++\377\203\0\0\0\377\5\5\5\5\377qqq\377\217\217\217\377\211" \ + "\211\211\377&&&\377\204\0\0\0\377\5""111\377pw\215\3771Au\377ho\206\377" \ + "www\377\203\0\0\0\377\6\7\7\7\377bbb\377\216\216\217\377\202\204\212" \ + "\377\206\206\206\377,,-\377\203\0\0\0\377\6""222\377\210\211\213\377" \ + "\32+e\377)8l\377mmm\377\14\14\14\377\203\0\0\0\377\5\7\7\7\377jjj\377" \ + "\212\212\212\377[[[\377\7\7\7\377\204\0\0\0\377\4\27\27\27\377zzz\377" \ + "\206\206\206\377/00\377\204\0\0\0\377\1fff\377\203,s\377\27(c\377Ya\200\377BBB\377" \ + "\204\0\0\0\377\3ppp\377ou\212\377PZ}\377\204S\\~\377\6Q[{\377.M}\377]f\205\377\223\224\231\377555\377\202\0\0\0\377\4\2\2\2\377" \ + "|||\377O[\201\377;J|\377\205:I{\377\5""5Dw\377\26'c\377\31*e\377Ya\200" \ + "\377BBB\377\204\0\0\0\377\2lll\377JTx\377\207\31*e\377\4\27(d\377bi\205" \ + "\377HHH\377\1\1\1\377\202\0\0\0\377\3>>>\377|\177\212\3778Fz\377\203" \ + "7Fy\377\3\77M{\377\203\203\203\377\34\34\34\377\202\0\0\0\377\17\7\7" \ + "\7\377mmm\377uz\212\3777Fx\377=Kz\377z~\214\377\215\215\215\377\214\214" \ + "\214\377}\200\210\377rv\204\377in\202\377T]{\377&5j\377\206\210\221\377" \ + "\30\30\30\377\203\0\0\0\377\16kkk\377\201\203\214\377\37/g\377\32+e\377" \ + "lr\205\377\216\216\216\377\214\214\214\377\177\201\210\377vy\205\377" \ + "fl\200\377QZz\377,:n\377\214\216\225\377(((\377\203\0\0\0\377\5\"\"\"" \ + "\377\222\222\222\377~\201\213\377\216\216\220\377nno\377\204\0\0\0\377" \ + "\5""111\377pw\215\3770@u\377z~\213\377```\377\203\0\0\0\377\6\25\25\25" \ + "\377\211\211\211\377fl\202\377ISw\377\216\216\221\377RRR\377\203\0\0" \ + "\0\377\6###\377\206\206\206\377\40""0g\377)8k\377mmm\377\14\14\14\377" \ + "\202\0\0\0\377\7\23\23\23\377wxy\377\36.g\377\31*e\377NY|\377KKK\377" \ + "\1\1\1\377\202\0\0\0\377\2///\377y|\207\377\202-t\377KW\206\377IV\205" \ + "\377HU\204\377IV\205\377HU\204\377IV\205\377JW\206\377IV\205\377\207" \ + "JW\206\377\1IV\206\377\202JW\206\377\2KX\206\377JW\206\377\210KX\206" \ + "\377\202JW\205\377\202KX\206\377\202LY\207\377\1KX\206\377\220LY\207" \ + "\377\207LX\207\377\205LY\207\377\207LX\207\377\220LY\207\377\2KX\206" \ + "\377LY\207\377\202KX\206\377\202JW\205\377\211KX\206\377\4JW\206\377" \ + "KX\206\377JW\206\377IV\206\377\207JW\206\377\1IV\205\377\202JW\206\377" \ + "\2IV\205\377HU\204\377\203IV\205\377\3CP\201\377\"2k\377\30)d\377\207" \ + "\31*e\377\5\30)d\377!1j\377DQ\201\377\214\216\224\377@@@\377\205\0\0" \ + "\0\377\2SSS\377y}\215\377\202GU\204\377\3NZ\204\377\224\225\231\377\34" \ + "\34\34\377\204\0\0\0\377\3\2\2\2\377bbb\377go\213\377\204ES\203\377\2" \ + "\210\212\217\377333\377\203\0\0\0\377\5OPP\377iq\216\377DR\202\377bj" \ + "\210\377ttt\377\203\0\0\0\377\3\33\33\33\377vz\207\377$3i\377\204\31" \ + "*e\377\2sx\207\377ooo\377\203\0\0\0\377\17\20\20\20\377sss\377\202\203" \ + "\210\377\201\202\210\377yyy\377666\377\37\37\37\377111\377\77\77\77\377" \ + "uuu\377\210\212\221\377CQ\200\377Wb\206\377ccc\377\1\1\1\377\202\0\0" \ + "\0\377\6###\377sw\201\377CQ\200\377FS\201\377\212\213\222\377<<<\377" \ + "\203\0\0\0\377\26""444\377~~~\377\201\203\211\377\204\204\207\377lll" \ + "\377\40\40\40\377$$$\377555\377HHH\377\215\215\215\377lq\204\377[c\177" \ + "\377fff\377\36\36\36\377\20\20\20\377\0\0\0\377\21\21\21\377www\377\177" \ + "\202\214\377dk\204\377\205\206\214\377JJJ\377\203\0\0\0\377\15uuu\377" \ + "jq\210\377\201\203\214\377NNN\377\26\26\26\377\12\12\12\377\0\0\0\377" \ + "///\377\206\206\206\377x}\216\377w|\216\377\206\207\210\377\"\"\"\377" \ + "\202\0\0\0\377\4\33\33\33\377\205\205\205\377DQ}\377;J|\377\204:I{\377" \ + "\6;J{\377(8p\377\27(d\377\31*e\377Ya\200\377BBB\377\204\0\0\0\377\2l" \ + "ll\377JTx\377\206\31*e\377\5\30)d\377\27(c\377fm\210\377HHH\377\1\1\1" \ + "\377\202\0\0\0\377\2>>>\377|\177\212\377\2047Fy\377\3;Iz\377~\202\220" \ + "\377OOO\377\203\0\0\0\377\16(((\377yyy\377\202\204\210\377\200\202\207" \ + "\377uuu\377###\377$$$\377222\377@@@\377\206\206\206\377\207\210\216\377" \ + "\31*e\377ms\207\377eee\377\203\0\0\0\377\16\21\21\21\377www\377\203\204" \ + "\207\377~\200\206\377~~~\377--.\377\40\40\40\377...\377;;;\377{{{\377" \ + "\203\205\216\377+:o\377z~\215\377mmm\377\204\0\0\0\377\6\"\"\"\377WW" \ + "W\377CCC\377\0\0\0\377$$$\377\4\4\4\377\202\0\0\0\377\6""111\377pw\215" \ + "\3770@u\377MY}\377\210\210\210\377\40\40\40\377\203\0\0\0\377\5)**\377" \ + "mmm\377ttt\377UUU\377\7\7\7\377\202\0\0\0\377\7\2\2\2\377\\\\\\\377o" \ + "u\207\377\31*e\377)8l\377mmm\377\14\14\14\377\202\0\0\0\377\7\23\23\23" \ + "\377wxy\377\36.g\377\31*e\377NY|\377KKK\377\1\1\1\377\202\0\0\0\377\2" \ + "///\377y|\207\377\202-m\377>Js\377\205\205\205\377" \ + "\34\34\34\377\203\0\0\0\377\5\30\30\30\377CCC\377LLL\377777\377\3\3\3" \ + "\377\202\0\0\0\377\6;;;\377\216\216\216\377KV\200\377mt\213\377mmm\377" \ + "\6\6\6\377\203\0\0\0\377\4)))\377HHH\377III\377$$$\377\202\0\0\0\377" \ + "\6\1\1\1\377]]]\377\201\204\215\377;J|\377:I{\3779Hz\377\202:I{\377\7" \ + "9Hz\377>>\377|\177\212\3777Fy\3776Fx\377\2037Fy\377" \ + "\3T^\201\377\214\215\216\377888\377\203\0\0\0\377\4\22\22\22\377222\377" \ + "///\377\12\12\12\377\203\0\0\0\377\7""999\377\215\215\215\377>Js\377" \ + "\31*e\3776Cp\377\222\223\225\377HHH\377\203\0\0\0\377\4\7\7\7\377111" \ + "\377222\377\20\20\20\377\203\0\0\0\377\7())\377\212\212\212\377PYy\377" \ + ".=s\377HS}\377\223\223\223\377000\377\206\0\0\0\377\3---\377ttt\377\2" \ + "\2\2\377\202\0\0\0\377\7""000\377pw\215\3770@t\3771Av\377ns\206\377v" \ + "vv\377\27\27\27\377\204\0\0\0\377\1\2\2\2\377\204\0\0\0\377\7III\377" \ + "\212\213\217\3774Ao\377\31*e\377)8l\377mmm\377\14\14\14\377\202\0\0\0" \ + "\377\7\23\23\23\377wxy\377\36.g\377\31*e\377NY|\377KKK\377\1\1\1\377" \ + "\202\0\0\0\377\2///\377y|\207\377\202->>\377\204\0\0\0\377\2kkk\377JTx\377\206\31*e\377\4\30)d\377" \ + "!1j\377iq\213\377CCC\377\203\0\0\0\377\4""888\377|\177\212\3777Fy\377" \ + "6Fx\377\2047Fy\377\4fm\207\377\214\214\214\377UUU\377\20\20\20\377\206" \ + "\0\0\0\377\4\30\30\30\377[[[\377\215\215\215\377LVx\377\203\31*e\377" \ + "\4DOu\377\221\221\221\377___\377\27\27\27\377\206\0\0\0\377\12\20\20" \ + "\20\377RRR\377\212\212\212\377]e~\377\30)e\3773Bw\3772Av\377io\206\377" \ + "\204\204\204\377222\377\204\0\0\0\377\3""9::\377\211\211\211\377uuu\377" \ + "\203\0\0\0\377\11+++\377ov\215\3770@u\377.\77t\377'6k\377sx\210\377\177" \ + "\177\177\377AAA\377\7\7\7\377\205\0\0\0\377\4#$$\377hhh\377\216\216\217" \ + "\377GRw\377\202\31*e\377\3)8l\377kkk\377\3\3\3\377\202\0\0\0\377\6\12" \ + "\12\12\377vwx\377\36.g\377\31*e\377NX|\377GGG\377\203\0\0\0\377\2)))" \ + "\377y|\207\377\202-L}\377" \ + "\202s\377GT\203\377HU\204\377\202" \ + "GU\204\377\1FU\204\377\207GU\204\377\2FT\203\377ES\202\377\206FT\203" \ + "\377\4ES\203\377FT\203\377ES\203\377DR\203\377\206ES\203\377\202DR\202" \ + "\377\1CQ\201\377\205DR\202\377\4CQ\201\3770\77t\377\31*e\377\30)d\377" \ + "\211\31*e\377\4\30)d\377!2k\377AO\200\377AP\200\377\202BP\201\377\2B" \ + "P\200\377BP\177\377\205BP\200\377\3AO\200\377BP\200\377@N\200\377\207" \ + "AO\200\377\2@N\177\377\77M~\377\206@N\177\377\202\77M~\377\3""7Fy\377" \ + "\31*e\377\31*d\377\213\31*e\377\4\31*d\377\27(c\377/>t\377L}\377\36.h" \ + "\377\30)d\377\207\31*e\377\3\30)d\377\32*e\377/=s\377\204IV\205\377\2" \ + "HU\204\377IV\205\377\202JW\206\377\1IV\205\377\210JW\206\377\1IV\206" \ + "\377\202JW\206\377\216KX\206\377\202JW\205\377\204KX\206\377\203LY\207" \ + "\377\1KX\206\377\226LY\207\377\1KX\206\377\203LY\207\377\204KX\206\377" \ + "\203JW\205\377\213KX\206\377\2JW\206\377KX\206\377\203JW\206\377\1IV" \ + "\206\377\212JW\206\377\2IV\205\377HU\204\377\202IV\205\377\4HU\204\377" \ + "IV\205\377DR\202\377!1j\377\202\30)d\377\207\31*e\377\2\30)d\377(8o\377" \ + "\202HU\204\377\3HT\203\377GU\204\377FU\204\377\206GU\204\377\4FT\203" \ + "\377GU\204\377FT\203\377ES\202\377\207FT\203\377\2ES\203\377DR\203\377" \ + "\206ES\203\377\202DR\202\377\1CQ\201\377\205DR\202\377\4CQ\201\377\77" \ + "N\177\377\36.h\377\30)d\377\211\31*e\377\3\30)d\377\27(d\3775Dy\377\202" \ + "AO\200\377\2BP\200\377BP\201\377\210BP\200\377\2AO\200\377@N\200\377" \ + "\205AO\200\377\3@N\177\377AO\200\377\77M~\377\207@N\177\377\3>L}\377" \ + "AN\177\377&7n\377\215\31*e\377\4\30)d\377\33,f\3777Ey\377=J}\377\203" \ + "=K}\377\202t\377GT\203\377IV\205\377HU\204\377\202IV\205\377\2HU\204\377" \ + "IV\205\377\213JW\206\377\202IV\206\377\202JW\206\377\202KX\206\377\1" \ + "JW\206\377\215KX\206\377\203JW\205\377\206KX\206\377\216LY\207\377\206" \ + "KX\206\377\203JW\205\377\216KX\206\377\2JW\206\377KX\206\377\202JW\206" \ + "\377\202IV\206\377\211JW\206\377\3IV\205\377JW\206\377IV\205\377\202" \ + "HU\204\377\2IV\205\377HU\204\377\202IV\205\377\3BP\200\377\35-h\377\30" \ + ")d\377\207\31*e\377\202\30)d\377\5%5m\377IV\205\377HU\204\377HT\203\377" \ + "FU\204\377\207GU\204\377\4FT\203\377GU\204\377FT\203\377ES\202\377\205" \ + "FT\203\377\1ES\203\377\202FT\203\377\207ES\203\377\3DR\202\377ES\203" \ + "\377CQ\201\377\205DR\202\377\4DQ\201\377DR\202\377-=r\377\26(c\377\212" \ + "\31*e\377\10\30)d\377#3l\377>M~\377BP\201\377BP\200\377BP\201\377BP\200" \ + "\377BP\177\377\207BP\200\377\206AO\200\377\3@N\177\377AO\200\377\77M" \ + "~\377\207@N\177\377\202\77M~\377\3:I{\377\36.h\377\30)d\377\214\31*e" \ + "\377\3\30)d\377$4l\377;I{\377\205=K}\377\1;K}\377\207L}\377\77" \ + "M~\3770\77t\377\31*e\377\30)d\377\215\31*e\377\3.=s\377=K}\377s\377-L~\377JW\206\377\203IV\205\377\1HU\204\377\202IV\205\377\2J" \ + "W\206\377IV\205\377\211JW\206\377\202IV\206\377\202JW\206\377\202KX\206" \ + "\377\1JW\206\377\222KX\206\377\220JW\205\377\225KX\206\377\202JW\206" \ + "\377\202IV\206\377\213JW\206\377\202IV\205\377\1HU\204\377\202IV\205" \ + "\377\1HU\204\377\202IV\205\377\3""2Av\377\33+f\377\30)d\377\210\31*e" \ + "\377\7\30)d\377'7n\377DR\202\377HU\204\377HT\203\377GU\204\377FU\204" \ + "\377\210GU\204\377\2FT\203\377ES\202\377\210FT\203\377\2ES\203\377DR" \ + "\203\377\207ES\203\377\2DR\202\377CQ\201\377\207DR\202\377\2\40""1j\377" \ + "\30)d\377\212\31*e\377\10\30)d\377!1j\377AO\200\377BP\201\377AO\200\377" \ + "BP\201\377BP\200\377BP\177\377\206BP\200\377\202AO\200\377\1@N\200\377" \ + "\204AO\200\377\4@N\177\377AO\200\377@N\177\377\77M~\377\206@N\177\377" \ + "\202\77M~\377\4=K|\377%4l\377\30)d\377\31*d\377\214\31*e\377\4\35-g\377" \ + "8Fy\377=K}\377L~\377\205=K}\377\1;K}\377\207L}\377\77M~\377)9p\377\27(c\377\214\31*e\377\202\30)" \ + "d\377\1""3Bv\377\205=K}\377\210L~\377=K|\377\202" \ + "=K}\377\4s\377\33+f\377\224\31*e\377\3\30)d\377\35.h\3771@v\377\2102Av\377" \ + "\2101Au\377\4""0@t\377/\77t\377\35-g\377\30)d\377\230\31*e\377\5\30)" \ + "d\377\35-g\377/>t\377-t\377GT\203\377HU\204\377HT\203\377\202GU\204\377\1FU\204\377\206" \ + "GU\204\377\4FT\203\377GU\204\377FT\203\377ES\202\377\206FT\203\377\4" \ + "ES\203\377FT\203\377ES\203\377DR\203\377\206ES\203\377\3DR\202\377ES" \ + "\203\377CQ\201\377\205DR\202\377\5CQ\201\377DR\202\3777Fy\377\31*d\377" \ + "\30)d\377\212\31*e\377\7\27(c\377.>s\377BP\201\377AO\200\377BP\200\377" \ + "BP\201\377BP\177\377\206BP\200\377\3AO\200\377BP\200\377@N\200\377\207" \ + "AO\200\377\2@N\177\377\77M~\377\206@N\177\377\202\77M~\377\3@N\177\377" \ + "):p\377\27(d\377\215\31*e\377\4\26(c\377/>t\377=K}\377t\377\202\30" \ + ")d\377\230\31*e\377\5\30)d\377#2k\377.=s\377-L}\377@N~\377*:q\377\215" \ + "\31*e\377\4\30)d\377\27(d\377*;q\377r\377\202\30)d\377\223\31*e\377\5\30)d\377\34-g\377" \ + "4Cw\3772Av\3771@u\377\2062Av\377\2""1Au\3770At\377\2041Au\377\2""0@u" \ + "\3771Au\377\2020@u\377\2\32+f\377\30)d\377\230\31*e\377\5\30)d\377\35" \ + ".h\377.=s\377-L}\377\77M~\377.>s\377\31*e\377\30)d\377" \ + "\214\31*e\377\3\30)d\377%5m\377;J|\377\205=K}\377\2K}\377" \ + "\"2k\377\31*e\377\202\30)d\377\211\31*e\377\5\30)d\377\31*e\3779Gy\377" \ + "GT\203\377HU\204\377\202HT\203\377\2GU\204\377FU\204\377\207GU\204\377" \ + "\4FT\203\377GU\204\377FT\203\377ES\202\377\210FT\203\377\1ES\203\377" \ + "\202DR\203\377\206ES\203\377\4DR\202\377ES\203\377DR\202\377CQ\201\377" \ + "\205DR\202\377\3CQ\201\377AO\200\377%5m\377\202\30)d\377\212\31*e\377" \ + "\3\26'c\377/>t\377CP\201\377\203BP\201\377\2BP\200\377BP\177\377\206" \ + "BP\200\377\1AO\200\377\202@N\200\377\206AO\200\377\1@N\177\377\202\77" \ + "M~\377\206@N\177\377\6\77M~\377>L}\377;J|\377!1j\377\30)d\377\31*d\377" \ + "\214\31*e\377\2\32+f\3770\77u\377\204=K}\377\3L}\377\36.h\377" \ + "\30)d\377\215\31*e\377\4\30)d\377.=s\377>L}\377s\377\33,f\377\231\31*e\377\5\30)d\377\36.h\377,;r\377-r\377\30)d\377\224\31*e\377\5\30)d\377\33,g\377/\77t\3772Av\377" \ + "1@u\377\2062Av\377\2""1Au\3770At\377\2051Au\377\5""0@u\3771At\3770@u" \ + "\377$4m\377\30)d\377\230\31*e\377\6\30)d\377\31*e\377&5m\377.=s\377-" \ + "L}\377@N~\377)9p\377\216\31*e\377\4\30)d\377\34.g\377=K}\377<" \ + "J|\377\204=K}\377\2t\377\37""0i\377\30)d\377\230\31*e\377\5\30)d\377\32+f\377" \ + ")8p\377.=s\377,;q\377\205-L}\377\77M~\3778Gy\377\34-g\377\30)d\377\214\31*e\377\4\30)d\377" \ + "\27(d\377/>t\377L~\377-L~\3773Bw\377)9p\377\"2k\377\34,f\377\202\27" \ + "(d\377\1\30)d\377\215\31*e\377\10\30)d\377\26'b\377\40""0j\3776Dx\377" \ + "DQ\201\377IV\204\377HU\204\377HT\204\377\202GU\204\377\1FU\204\377\210" \ + "GU\204\377\1FT\203\377\202GU\204\377\2FT\203\377ES\202\377\207FT\203" \ + "\377\2ES\203\377FT\203\377\202ES\203\377\1DR\203\377\210ES\203\377\202" \ + "DR\202\377\1CQ\201\377\205DR\202\377\5CQ\201\377FT\203\3773Bv\377\31" \ + "*e\377\30)d\377\213\31*e\377\4\27(c\377*9p\377BP\201\377AO\200\377\202" \ + "BP\201\377\2BP\200\377BP\177\377\206BP\200\377\203AO\200\377\1@N\200" \ + "\377\206AO\200\377\202@N\177\377\1\77M~\377\206@N\177\377\202\77M~\377" \ + "\2>L}\377)9p\377\202\30)d\377\214\31*e\377\3\30)d\377\37""0i\3779Hz\377" \ + "\204=K}\377\202t\3776Ex\377=K}\377BP\200\377\202ER\202\377\1FS\202\377" \ + "\211FS\203\377\11ES\202\377ER\202\377DR\202\377@N\177\377:H{\3774Bw\377" \ + "+;r\377#3k\377\32+f\377\202\27(c\377\203\30)d\377\220\31*e\377\202\30" \ + ")d\377\4\31*e\377\34-g\3770\77t\377GT\203\377\204HU\204\377\2GU\204\377" \ + "FU\204\377\211GU\204\377\1FT\203\377\202GU\204\377\2FT\203\377ES\202" \ + "\377\210FT\203\377\4ES\203\377FT\203\377ES\203\377DR\203\377\207ES\203" \ + "\377\4DR\202\377ES\203\377DR\202\377CQ\201\377\206DR\202\377\5CQ\201" \ + "\377DR\202\377;J|\377\35.h\377\30)d\377\213\31*e\377\5\30)d\377\33,f" \ + "\3776Ey\377BP\201\377AO\200\377\202BP\201\377\2BP\200\377BP\177\377\205" \ + "BP\200\377\4AO\200\377BP\200\377AO\200\377@N\200\377\207AO\200\377\2" \ + "@N\177\377\77M~\377\207@N\177\377\5\77M~\377>L}\377\77L~\377&5m\377\27" \ + "(d\377\215\31*e\377\3\30)d\377\36.h\3779Gz\377\205=K}\377\2M~\377!2j\377\30)d\377\214\31*e\377\5\30)d\377/>t\377CQ\202\377AO\200" \ + "\377BP\201\377\202BP\200\377\1BP\177\377\205BP\200\377\4AO\200\377BP" \ + "\200\377AO\200\377@N\200\377\206AO\200\377\3@N\177\377AO\200\377\77M" \ + "~\377\206@N\177\377\203\77M~\377\4@N~\3774Cw\377\27(c\377\31)e\377\215" \ + "\31*e\377\4\30)d\377,:q\377>L~\377s\377\202\30)d\377\225\31*e\377\2,L}\377@N\177\377)8o\377\31)d\377\216\31*e\377\4\26" \ + "'c\3772Av\377=K}\377L}\377\77M~\3776Ex\377" \ + "\34-g\377\30)d\377\214\31*e\377\5\31*d\377\30)d\377\"2k\377=K}\377L}\377=K}\377&6m\377\30)d\377\31)e\377\214\31*e\377\4\30)d\377\31*e" \ + "\3774Cw\377L}\377\33+g\377\30)d\377\216" \ + "\31*e\377\2\33,f\3775Cw\377\204=K}\377\4t\3772Av\3771@u\377\2062Av\377\2""1Au\3770At\377\2061Au\377\2020@u\377" \ + "\2*:q\377\32+f\377\231\31*e\377\4\30)d\377\32+f\377+:q\377-K}\377GT\203\377JW\205\377IV\204\377\202" \ + "HU\204\377\1GT\203\377\202HU\204\377\204GU\204\377\203FU\204\377\217" \ + "GU\204\377\202FT\203\377\202ES\202\377\211FT\203\377\1ES\203\377\202" \ + "FT\203\377\2ES\203\377DR\203\377\210ES\203\377\1DR\202\377\202ES\203" \ + "\377\1CQ\201\377\207DR\202\377\5CQ\201\377DR\202\377@N\177\377\"3k\377" \ + "\30)d\377\214\31*e\377\202\30)d\377\7,;r\377BP\201\377AO\200\377BP\200" \ + "\377BP\201\377BP\200\377BP\177\377\210BP\200\377\2AO\200\377@N\200\377" \ + "\210AO\200\377\1\77M~\377\206@N\177\377\7\77M~\377@N\177\377\77M~\377" \ + ">L}\377@N~\377%5m\377\30)d\377\216\31*e\377\4\30)d\377&7n\377>M~\377" \ + "=J|\377\202=K}\377\3L}\377AO\177\377" \ + "ER\202\377IU\204\377KW\206\377JW\205\377JV\205\377IV\204\377\202HU\204" \ + "\377\1GT\203\377\203HU\204\377\204GU\204\377\203FU\204\377\216GU\204" \ + "\377\2FT\203\377GU\204\377\203FT\203\377\1ES\202\377\212FT\203\377\2" \ + "ES\203\377FT\203\377\202ES\203\377\1DR\203\377\212ES\203\377\202DR\202" \ + "\377\1CQ\201\377\206DR\202\377\6CQ\201\377DR\202\377>L~\377$4l\377\27" \ + ")d\377\30)d\377\214\31*e\377\10\30)d\377'7n\377@N\177\377BP\201\377B" \ + "P\200\377BP\201\377BP\200\377BP\177\377\207BP\200\377\202AO\200\377\1" \ + "@N\200\377\206AO\200\377\4@N\177\377AO\200\377@N\177\377\77M~\377\207" \ + "@N\177\377\5\77M~\377>L}\377@N~\3771@u\377\30)d\377\216\31*e\377\5\30" \ + ")d\377\34,g\377:I{\377=K}\377t\377" \ + "\37""0i\377\30)d\377\230\31*e\377\202\30)d\377\4$4m\377.=s\377-L}\377\77M~\3779Hz\377\36.h\377\30*e\377\215\31*e\377\5\30*e\377" \ + "\27'c\3772@u\377>L}\377L}\377\1(7o\377\202\30)d\377\215\31*e\377" \ + "\3\27(d\377$5m\377L}\377\77M~\3774Bv\377\27" \ + ")d\377\30)d\377\215\31*e\377\3\30)d\377\33,f\3776Ey\377\204=K}\377\4" \ + "s\377\210-" \ + "L~\377BP\201\377AO\200\377" \ + "BP\200\377BP\201\377BP\200\377BP\177\377\210BP\200\377\2AO\200\377@N" \ + "\200\377\206AO\200\377\4@N\177\377AO\200\377@N\177\377\77M~\377\206@" \ + "N\177\377\204\77M~\377\3;I{\377\34,g\377\30)d\377\216\31*e\377\3\31*" \ + "d\377*9p\377L~\377\40""1j\377\31)e\377\30)d\377\215\31*e\377\3" \ + "\30)d\377\37""0i\377@N\200\377\202BP\201\377\3AO\200\377BP\201\377BP" \ + "\200\377\202BP\177\377\206BP\200\377\4AO\200\377BP\200\377AO\200\377" \ + "@N\200\377\207AO\200\377\1@N\177\377\202\77M~\377\207@N\177\377\6\77" \ + "M~\377>L}\377@N~\377)9p\377\31*e\377\30*e\377\216\31*e\377\4\30)d\377" \ + "2Av\377=K}\377=K|\377\204=K}\377\2L}\377@N~\377$5m\377\27(d\377\216\31*e\377\5\30)d\377\31+e\377" \ + "3Bv\377=K}\377s\377\32+f\377\225\31" \ + "*e\377\5\30)d\377\35-g\3770\77u\3773Bw\3771@u\377\2062Av\377\2""1Au\377" \ + "0At\377\2061Au\377\2020@u\377\2-=s\377\33,f\377\232\31*e\377\5\30)d\377" \ + "\"3k\377.=s\377-L}\377AN\177\377*9p\377\202\30)d\377\216\31*e\377\3\30)d\377(" \ + "8o\377L}\377\77M~\377" \ + "2Au\377\30)d\377\217\31*e\377\5\30)d\377\36/h\3779Hz\377=K}\377L~\377\212" \ + "DR\202\377\202CQ\201\377\1DR\202\377\202ES\203\377\1DR\202\377\214ES" \ + "\203\377\202DR\203\377\203ES\203\377\203FT\203\377\1ES\203\377\300FT" \ + "\203\377\203ES\203\377\202DR\203\377\214ES\203\377\1DR\202\377\202ES" \ + "\203\377\202DR\202\377\1CQ\201\377\210DR\202\377\6CQ\201\377DR\202\377" \ + "CQ\202\3776Ex\377\37""0i\377\27(d\377\217\31*e\377\3\30)d\377\33,f\377" \ + "2Av\377\202BP\201\377\2BP\200\377BP\201\377\202BP\200\377\1BP\177\377" \ + "\210BP\200\377\202AO\200\377\1@N\200\377\210AO\200\377\2@N\177\377\77" \ + "M~\377\206@N\177\377\10\77M~\377@N\177\377\77M~\377>L}\377\77M~\3777" \ + "Fy\377\34-g\377\30)d\377\216\31*e\377\5\30)d\377\31*e\3773Bv\377>L}\377" \ + "L}\377" \ + "L}\377L}\377\2@N~\377$4l\377\202\30)d\377\216\31*e\377\5\27(d\377$5l\377<" \ + "J|\377=K}\377M~\377$5m\377\202\30)d\377\217\31*e\377\4\30)" \ + "d\377\31*e\377(8n\377@N\200\377\202BP\201\377\4BP\200\377BP\201\377B" \ + "P\200\377BP\177\377\207BP\200\377\1AO\200\377\202BP\200\377\1@N\200\377" \ + "\212AO\200\377\2@N\177\377\77M~\377\206@N\177\377\7\77M~\377@N\177\377" \ + "\77M~\377\77M}\377\77M~\377*:p\377\27(c\377\217\31*e\377\3\30)d\377\35" \ + ".g\3778Gy\377\206=K}\377\2s\377" \ + "\210-L~\377.>s\377\31+e\377\27(c\377\30)d\377\217\31*e\377\3\27)d\377" \ + "\33,f\377.=s\377\202BP\201\377\1AO\200\377\202BP\201\377\2BP\200\377" \ + "BP\177\377\211BP\200\377\202AO\200\377\1@N\200\377\207AO\200\377\203" \ + "@N\177\377\1\77M~\377\206@N\177\377\7\77M~\377@N\177\377\77M~\377>L}" \ + "\377\77M~\377.>s\377\27(d\377\221\31*e\377\1""0\77t\377\205=K}\377\202" \ + "L}\377" \ + "\77M~\3773Av\377\32+f\377\30)d\377\217\31*e\377\2\30)d\377(7o\377\202" \ + "=K}\377\1L~\377\202BP\201\377\4AO\200\377BP\200\377BP\201\377" \ + "BP\200\377\202BP\177\377\207BP\200\377\4AO\200\377BP\200\377AO\200\377" \ + "@N\200\377\207AO\200\377\4@N\177\377AO\200\377@N\177\377\77M~\377\210" \ + "@N\177\377\5\77M~\377>L}\377\77M~\3778Fy\377\33,f\377\202\30)d\377\216" \ + "\31*e\377\2\30)d\377\40""0i\377\202=K}\377\1t\3772Av\3771@u\377\2062Av\377\1""1Au" \ + "\377\2020At\377\2061Au\377\4""0@t\3771Au\377\"3k\377\30)d\377\232\31" \ + "*e\377\5\30)d\377&5m\377.=s\377-L}\377\77M~\377;J{\377\34,g\377\30)d\377\217\31*e\377\3\30)d\377" \ + "\33,g\377;H{\377\204=K}\377\4s\377\33,f\377\232\31*e\377\6\30" \ + ")d\377\31*e\377-s\377L}\377\77M~\377:H{\377\36/h\377\30)d\377\217\31*e\377\5\30" \ + ")d\377\32+f\3773Bw\377=K}\377L}\377\77M~\377" \ + ";I{\377!1j\377\30)d\377\221\31*e\377\1,;r\377\205=K}\377\203t\377\40""0j\377\30)d\377\231\31" \ + "*e\377\202\30)d\377\4)9p\377.=r\377-L}\377\2=K|\377#3k\377\202\30)d\377\217\31*e\377\2\30)d\377%5m\377\202" \ + "=K}\377\1s\377\32+f\377\202" \ + "\30)d\377\222\31*e\377\202\30)d\377\6\32+e\377,L}\377\77M~\377>L}\377" \ + "&6m\377\27(c\377\217\31*e\377\3\30)e\377\30)d\377\36/i\377\202=K}\377" \ + "\1t\377:I{\377BP\200\377ES\202" \ + "\377DR\202\377CQ\201\377\217DR\202\377\204CQ\201\377\204DR\202\377\232" \ + "ES\203\377\1DR\202\377\207ES\203\377\205DR\202\377\204CQ\201\377\216" \ + "DR\202\377\1CQ\201\377\202DR\202\377\6ES\202\377\77M~\3776Ex\377(8o\377" \ + "\31*e\377\26'c\377\202\30)d\377\222\31*e\377\202\30)d\377\3$4l\3778F" \ + "z\377CQ\202\377\202BP\201\377\2BP\200\377BP\201\377\202BP\200\377\1B" \ + "P\177\377\210BP\200\377\2AO\200\377BP\200\377\202AO\200\377\1@N\200\377" \ + "\207AO\200\377\3@N\177\377AO\200\377@N\177\377\202\77M~\377\206@N\177" \ + "\377\10\77M~\377@N\177\377\77M~\377>L}\377\77M~\377=K|\377&6m\377\26" \ + "'c\377\220\31*e\377\5\27)d\377\36/h\3779H{\377=K}\377t\377\32" \ + "*e\377\30)d\377\231\31*e\377\5\30)d\377\33+f\377)9o\377.=s\377,;q\377" \ + "\207-L~\377GT\204\377ES\202" \ + "\377DR\202\377CQ\201\377\220DR\202\377\204CQ\201\377\207DR\202\377\224" \ + "ES\203\377\210DR\202\377\205CQ\201\377\217DR\202\377\12CQ\201\377DR\202" \ + "\377FT\203\377DR\202\3777Gy\377*9p\377\40""1j\377\31*e\377\27(d\377\30" \ + ")d\377\223\31*e\377\10\30)d\377\26(c\377\37""0i\3773Bw\377@N\177\377" \ + "CQ\201\377BP\201\377AO\200\377\202BP\201\377\1BP\200\377\202BP\177\377" \ + "\210BP\200\377\2AO\200\377BP\200\377\202AO\200\377\1@N\200\377\207AO" \ + "\200\377\4@N\177\377AO\200\377@N\177\377\77M~\377\207@N\177\377\10\77" \ + "M~\377@N\177\377\77M~\377>L}\377\77M~\377=K|\377%5m\377\30)d\377\220" \ + "\31*e\377\5\30)d\377\34-g\3775Dx\377=K}\377M~\377\202BP\201\377\2AO\200\377BP\201\377\204BP\200\377" \ + "\1BP\177\377\210BP\200\377\3AO\200\377BP\200\377AO\200\377\202@N\200" \ + "\377\207AO\200\377\4@N\177\377AO\200\377@N\177\377\77M~\377\211@N\177" \ + "\377\1\77M~\377\202>L}\377\2=L}\377&6m\377\202\30)d\377\220\31*e\377" \ + "\2\32+e\3770@t\377\205=K}\377\202M~\3771@t\377\40""0i\377\26'c\377\202\30)d\377" \ + "\225\31*e\377\202\30)d\377\10\31*e\377\"2k\377;J|\377CQ\202\377BP\201" \ + "\377AO\200\377BP\200\377BP\201\377\202BP\200\377\1BP\177\377\211BP\200" \ + "\377\2AO\200\377BP\200\377\202AO\200\377\1@N\200\377\210AO\200\377\4" \ + "@N\177\377AO\200\377@N\177\377\77M~\377\207@N\177\377\10\77M~\377@N\177" \ + "\377\77M~\377>L}\377\77M~\377=L}\377&7n\377\27(c\377\220\31*e\377\5\30" \ + ")d\377\31*e\377+:q\377\77L~\377L~\377" \ + "*:q\377\35.h\377\27)d\377\30)d\377\226\31*e\377\12\30)d\377\27(d\377" \ + "\26'c\377\33,f\377'7n\3772Au\3779H{\377\77M~\377DR\202\377ES\202\377" \ + "\203DR\202\377\1CQ\201\377\266DR\202\377\12ES\202\377ES\203\377BP\200" \ + "\377L}\377\77M~\377L~\3775Dw\377+;q\377$4l\377\36/i\377\30*d\377\27(d\377\202\30)d\377" \ + "\227\31*e\377\11\30)d\377\26'c\377\"2k\3774Cw\377\77M\177\377CP\201\377" \ + "BP\201\377AO\201\377BP\200\377\202BP\201\377\202BP\200\377\1BP\177\377" \ + "\213BP\200\377\2AO\200\377@N\200\377\210AO\200\377\2@N\177\377AO\200" \ + "\377\202@N\177\377\1\77M~\377\207@N\177\377\10\77M~\377@N\177\377\77" \ + "M~\377>L}\377\77M~\377;I{\377#3k\377\30)d\377\220\31*e\377\6\30)d\377" \ + "\27(d\377(9o\377M~\377):p\377\203\30)d\377\227\31*e\377\1\30)e\377\203\30" \ + ")d\377\11\31*e\377\32+f\377\34,g\377!2k\377-;r\3777Fy\377AO\200\377E" \ + "S\203\377ES\202\377\203DR\202\377\1CQ\201\377\243DR\202\377\1CQ\201\377" \ + "\202DR\202\377\1ER\202\377\202ES\203\377\7=L~\3772Bv\377'7o\377\35.g" \ + "\377\33,f\377\32+e\377\31*e\377\204\30)d\377\227\31*e\377\5\30)d\377" \ + "\27(d\377\35.h\3775Dx\377\77N\177\377\202BP\201\377\202AO\200\377\202" \ + "BP\201\377\202BP\200\377\202BP\177\377\211BP\200\377\204AO\200\377\1" \ + "@N\200\377\211AO\200\377\1@N\177\377\202\77M~\377\211@N\177\377\5\77" \ + "M~\377>L}\377\77M~\377t\377\37""0i\377\30)d\377\232\31*e\377\5\30)d\377!1j\377" \ + ".=s\377-s\3777Fy\377\77M~" \ + "\377\202AO\200\377\3BP\200\377BQ\201\377CQ\201\377\232DR\202\377\202" \ + "CQ\201\377\13BP\201\377BP\200\377AO\200\377@O\177\377L}\377\77M~\377t\3773Bv\3776Ex\3778Fy\3779H{\377;I|\377L}\377\77M~" \ + "\377\77N\177\377@N\177\377\203AO\200\377\1BO\200\377\202AO\200\377\23" \ + "@O\200\377@N\177\377\77M\177\377>M~\377=K}\377L}" \ + "\377\77M~\3776Ex\377\35-g\377\30)d\377\221\31*e\377\5\27(d\377!1j\377" \ + ":H{\377=K}\377L}\377\77M~\3772Au\377\34" \ + "-g\377\30)d\377\221\31*e\377\5\27(c\377!1j\3779Gz\377=K}\377L}\377\3\77M~\3770\77t\377\31*e\377\202" \ + "\30)d\377\220\31*e\377\5\30)d\377\40""0i\3778Fz\377=K}\377L}\377\77M~\377>L~\377,;p\377\26'c\377\222\31*e\377" \ + "\5\30)d\377\36.h\3777Fy\377=K}\377s\377" \ + "\210-L}\377\77" \ + "M~\377;I|\377&5m\377\27(d\377\222\31*e\377\5\27(d\377\36/i\3777Ey\377" \ + ">L}\377s\377\27(d\377\30)d\377\225" \ + "\31*e\377\5\30)d\377\31*e\377*9p\3773Bw\3771@u\377\2062Av\377\3""1Au" \ + "\3772Av\3770At\377\2061Au\377\2030@u\377\2\37/i\377\30)d\377\232\31*" \ + "e\377\4\30*d\377\31*e\377*:q\377.=s\377\210-L~\377CQ\201\377" \ + "\202BP\201\377\3AO\200\377BP\201\377BP\200\377\202BP\201\377\203BP\200" \ + "\377\1BP\177\377\213BP\200\377\2AO\200\377BP\200\377\202AO\200\377\1" \ + "@N\200\377\211AO\200\377\1@N\177\377\202AO\200\377\1@N\177\377\202\77" \ + "M~\377\210@N\177\377\203\77M~\377\4>L}\377@M~\3778Gy\377\40""1j\377\202" \ + "\30)d\377\221\31*e\377\5\27(c\377\40""1j\3777Fy\377=K}\377t\377\2078Fz\377\2107Fy\377\3""6Ex\3777Fy\3775Dw\377" \ + "\2066Ex\377\3""5Dw\377\34-g\377\30)d\377\227\31*e\377\1\37/i\377\202" \ + "2Av\377\1""1@u\377\2052Av\377\4""1Au\3772Av\3771Au\3770At\377\2051Au" \ + "\377\5""0@u\3771At\3770@u\377*9p\377\32+e\377\233\31*e\377\3\30)d\377" \ + "\40""0i\377/=s\377\207-L}\377@N\177\3774Bv\377\32+f\377\202\30)d\377\221\31*e\377\5\30" \ + ")d\377\40""0j\3778Gz\377=K}\377L}\377\77M~\377>L}\377" \ + ",;r\377\30)d\377\222\31*e\377\202\30)d\377\4\37""0i\3779Gz\377=K}\377" \ + "s\377\33,f\377\227\31*e\377\5\30)d\377\40""0j\377" \ + "4Cx\3772Av\3771@u\377\2072Av\377\2101Au\377\5""0@u\377/\77u\377+;q\377" \ + "\32*e\377\30)d\377\232\31*e\377\5\30)d\377\37""0j\377.=s\377-L}\377\77M~\377:H{\377&6m\377\202" \ + "\30)d\377\221\31*e\377\6\30)d\377\27)d\377\"2k\377:H{\377=K}\377L~\377\202CQ\201\377\202BP\201\377\1AO\200\377\202BP\201\377\1BP\200" \ + "\377\202BP\201\377\203BP\200\377\203BP\177\377\214BP\200\377\2AO\200" \ + "\377BP\200\377\202AO\200\377\202@N\200\377\212AO\200\377\2@N\177\377" \ + "AO\200\377\202@N\177\377\1\77M~\377\211@N\177\377\2\77M~\377@N\177\377" \ + "\202\77M~\377\4\77M}\377AN\177\3773Bv\377\37/i\377\202\30)d\377\221\31" \ + "*e\377\6\30)d\377\27(d\377&6m\377:H{\377=K}\377L~\3778Fz\377" \ + "->s\377%4m\377\33,g\377\27(c\377\27(d\377\27)d\377\203\30)d\377\243\31" \ + "*e\377\203\30)d\377\12\27(d\377\27(c\377\30)e\377\37""0i\377)9p\3773" \ + "Av\377L}\377\202\77M~\377\2+:q\377\32+f\377\202\30)d\377\222" \ + "\31*e\377\5\30)d\377'6n\377;I{\377=K}\377" \ + "K}\377=K}\377t\377+;q\377" \ + "(8o\377&6n\377%5m\377$4l\377#3k\377\"2k\377!1j\377\40""1j\377\40""0j" \ + "\377\204\37""0i\377\20\40""0i\377\40""0j\377\40""1j\377!1j\377\"2k\377" \ + "#3l\377$4m\377%5n\377'7o\377*9q\377-L}\377\77M~\377>L}\3772Av\377\35.g\377\27" \ + "(c\377\31*d\377\222\31*e\377\6\30)d\377\32+e\377+;r\377>L~\377=K}\377" \ + "s\377\31*e\377\30)d\377\223\31*e\377\5\30)d\377\32+f\377" \ + "2@u\3778Fz\3777Ey\377\2058Fz\377\2027Fy\377\1""6Fx\377\2057Fy\377\2""6" \ + "Ex\3777Fy\377\2066Ex\377\4""5Ew\3776Ex\377+:p\377\30)d\377\230\31*e\377" \ + "\4\36/i\3771Av\3772Av\3771@u\377\2072Av\377\2""1Au\3770At\377\2051Au" \ + "\377\6""0@u\3771At\3770@u\377/\77t\377\35.g\377\30)d\377\234\31*e\377" \ + "\2$4l\377/=s\377\207-M~\377=L~\377=K}\377\202L~\377\77M\177\377@N\177\377AO\200\377BP" \ + "\201\377\202CQ\202\377\202CQ\201\377\214BP\201\377\1BP\200\377\204BP" \ + "\201\377\203BP\200\377\204BP\177\377\217BP\200\377\2AO\200\377BP\200" \ + "\377\203AO\200\377\202@N\200\377\213AO\200\377\2@N\177\377AO\200\377" \ + "\202@N\177\377\202\77M~\377\213@N\177\377\202\77M~\377\6>L}\377@M~\377" \ + ";I{\377&6n\377\31*e\377\30)d\377\223\31*e\377\6\30)d\377\34,g\3771@u" \ + "\377=K}\377=K|\377L}\377" \ + "\3@N~\3775Cw\377\35.g\377\202\30)d\377\223\31*e\377\3\30)d\377\34,g\377" \ + "5Dx\377\202=K}\377\1s\377\36/h\377" \ + "\30)d\377\233\31*e\377\5\30)d\377&5m\377.=s\377-L}\377\77M}\377>M~\377=K|\377(8n\377" \ + "\27(c\377\30)d\377\223\31*e\377\202\30)d\377\4\37.i\3779I{\377=K}\377" \ + "L}\377\77M~\377\214@N\177\377\202\77M" \ + "~\377\202@N\177\377\202AO\200\377\1@N\177\377\214AO\200\377\203@N\200" \ + "\377\203AO\200\377\202BP\200\377\1AO\200\377\225BP\200\377\205BP\177" \ + "\377\212BP\200\377\216BP\201\377\212BP\200\377\206BP\177\377\225BP\200" \ + "\377\1AO\200\377\202BP\200\377\203AO\200\377\202@N\200\377\215AO\200" \ + "\377\2@N\177\377AO\200\377\203@N\177\377\1\77M~\377\212@N\177\377\2\77" \ + "M~\377@N\177\377\202\77M~\377\6>L}\377\77M~\377>L}\3772Au\377\35.h\377" \ + "\27(d\377\224\31*e\377\6\30)d\377\31*e\377&5m\377t\377\33,f\377\30)d\377\232" \ + "\31*e\377\202\30)d\377\4&6n\377.=s\377-t\3779Fz\3777Ey\377\2068Fz\377\2""7Fy\377" \ + "6Fx\377\2077Fy\377\2""6Ex\3775Dw\377\2076Ex\377\2\40""1i\377\30)d\377" \ + "\227\31*e\377\2\30)d\377\40""1j\377\2022Av\377\1""1@u\377\2072Av\377" \ + "\2""1Au\3770At\377\2051Au\377\6""0@u\3771Au\3770@t\3771Au\377#4l\377" \ + "\27(d\377\233\31*e\377\3\30)d\377\35-g\377,;r\377\202-L}\377\77M~\377>L~\377*;p\377" \ + "\33,f\377\202\30)d\377\224\31*e\377\3\30)d\377\31+e\3774Cw\377\210=K" \ + "}\377\1L~\377\77" \ + "M~\377>L}\377\77M~\377\202@N\177\377\1\77M~\377\213@N\177\377\202\77" \ + "M~\377\202@N\177\377\222AO\200\377\202@N\200\377\204AO\200\377\203BP" \ + "\200\377\1AO\200\377\300BP\200\377\1AO\200\377\203BP\200\377\204AO\200" \ + "\377\203@N\200\377\216AO\200\377\1@N\177\377\202AO\200\377\202@N\177" \ + "\377\202\77M~\377\213@N\177\377\1\77M~\377\202@N\177\377\202\77M~\377" \ + "\5>L}\377\77M~\377>L}\3777Ey\377\37/i\377\202\30)d\377\224\31*e\377\202" \ + "\30)d\377\4\37""0j\377:I{\377=K}\377s\377\33,f\377\230\31*e\377\3\30)d\377#2k\3774Cw\377" \ + "\2072Av\377\3""1Au\3772Av\3770At\377\2061Au\377\2""0@u\3771At\377\202" \ + "0@u\377\2\36/i\377\30)d\377\233\31*e\377\5\30)d\377\34-g\377+;q\377." \ + "=s\377,;q\377\207-L}\377\202\77M~\377\4""7" \ + "Fy\377'7n\377\27(d\377\30)d\377\225\31*e\377\6\30)d\377\31*e\377(8o\377" \ + ";I|\377=K}\377s\377-L}\377\202\77M~\377\2@N\177\377\77M~\377\213@N\177\377\203\77M~\377" \ + "\202@N\177\377\223AO\200\377\204@N\200\377\204AO\200\377\204BP\200\377" \ + "\1AO\200\377\260BP\200\377\1AO\200\377\205BP\200\377\204AO\200\377\203" \ + "@N\200\377\220AO\200\377\1@N\177\377\202AO\200\377\202@N\177\377\203" \ + "\77M~\377\213@N\177\377\1\77M~\377\202@N\177\377\202\77M~\377\5\77M}" \ + "\377@N\177\377;I{\377(8o\377\33,g\377\202\30)d\377\225\31*e\377\6\27" \ + "(d\377\33-f\3771@u\377s\377\36/i\377\30)d\377\233\31*e\377\2\30" \ + ")d\377\33,f\377\212-L}\377\202\77M~\377\3+;q\377\33" \ + ",f\377\31*e\377\202\30)d\377\224\31*e\377\4\30)d\377\27(c\377\"2j\377" \ + "9G{\377\202=K}\377\1L}\377" \ + "\77M~\377>L}\377\203\77M~\377\2@N\177\377\77M~\377\215@N\177\377\1\77" \ + "M~\377\203@N\177\377\203AO\200\377\1@N\177\377\225AO\200\377\204@N\200" \ + "\377\207AO\200\377\234BP\200\377\207AO\200\377\205@N\200\377\230AO\200" \ + "\377\203@N\177\377\202\77M~\377\214@N\177\377\1\77M~\377\202@N\177\377" \ + "\202\77M~\377\1>L}\377\202\77M~\377\5=K|\3772Au\377\34,g\377\30)d\377" \ + "\31)d\377\225\31*e\377\7\31)e\377\30)d\377\32+f\377)9p\377L}\377\202\77M~\377\202@N\177\377\1\77M~\377" \ + "\214@N\177\377\203\77M~\377\203@N\177\377\203AO\200\377\1@N\177\377\226" \ + "AO\200\377\207@N\200\377\234AO\200\377\207@N\200\377\227AO\200\377\1" \ + "@N\177\377\202AO\200\377\203@N\177\377\203\77M~\377\215@N\177\377\2\77" \ + "M~\377@N\177\377\202\77M~\377\7>L}\377\77M~\377@N~\377;I{\3772@u\377" \ + "!2j\377\26(c\377\202\30)d\377\225\31*e\377\7\30)d\377\27)d\377\37/i\377" \ + "1@u\377>L}\377=K}\377L}\377\202" \ + "\77M~\377\202@N\177\377\1\77M~\377\215@N\177\377\202\77M~\377\204@N\177" \ + "\377\236AO\200\377\235@N\200\377\232AO\200\377\1@N\177\377\203AO\200" \ + "\377\203@N\177\377\203\77M~\377\214@N\177\377\1\77M~\377\203@N\177\377" \ + "\202\77M~\377\5\77M}\377@N~\377>L}\377.=s\377!1j\377\202\30)d\377\1\31" \ + ")d\377\226\31*e\377\7\30)d\377\30*d\377)9o\3779Gz\377>L}\377=J}\377<" \ + "J|\377\203=K}\377\2M~\377.=s\377\34-f\377\31*e\377\202\30)d\377\227\31*e\377" \ + "\6\30)d\377\34,f\3773Bv\377L}\377\202\77M~\377\203" \ + "@N\177\377\1\77M~\377\217@N\177\377\203\77M~\377\204@N\177\377\203AO" \ + "\200\377\1@N\177\377\276AO\200\377\1@N\177\377\204AO\200\377\204@N\177" \ + "\377\203\77M~\377\217@N\177\377\1\77M~\377\202@N\177\377\202\77M~\377" \ + "\1>L}\377\202\77M~\377\4>L}\377;J{\377/>s\377\33,f\377\202\30)d\377\227" \ + "\31*e\377\202\30)d\377\5\31*e\377$3l\377;J|\377=K}\377" \ + "L}\377\203\77M~\377\202@N\177\377\1\77M~\377\220@N\177\377\203\77M~\377" \ + "\204@N\177\377\204AO\200\377\1@N\177\377\266AO\200\377\1@N\177\377\204" \ + "AO\200\377\205@N\177\377\203\77M~\377\220@N\177\377\1\77M~\377\202@N" \ + "\177\377\204\77M~\377\6@M~\377>L}\3776Ex\377+:p\377\34,g\377\26'c\377" \ + "\202\30)d\377\227\31*e\377\202\30)d\377\5\37""0i\3771@t\377>L~\377=K" \ + "}\377L}\377\77M~\377AN\177\377=L}\3770\77t\377$3" \ + "l\377\33,f\377\27(d\377\30)d\377\231\31*e\377\4\27)d\377\31*e\377+:q" \ + "\3779Gz\377\206=K}\377\1L~\377\77M~\377" \ + "@N~\377;I|\377*9p\377\33,g\377\32*e\377\203\30)d\377\230\31*e\377\5\30" \ + ")d\377\27(d\377!2k\3777Gy\377L}\377\77M~\377>L}\377" \ + "\203\77M~\377\203@N\177\377\1\77M~\377\226@N\177\377\206\77M~\377\210" \ + "@N\177\377\224AO\200\377\211@N\177\377\206\77M~\377\231@N\177\377\203" \ + "\77M~\377\1>L}\377\202\77M~\377\4>L}\377=K|\3775Dx\377$4l\377\203\30" \ + ")d\377\232\31*e\377\4\30)d\377\31*e\377\34,g\377.t\377\32*f\377\30)d\377\230\31*e\377\3\30)d\377\"2k\3773Cw\377" \ + "\2112Av\377\2""1Au\3770At\377\2071Au\377\5""0@t\3770@u\377/\77t\377\32" \ + "+f\377\30)d\377\233\31*e\377\202\30)d\377\4%5m\377.=s\377-L~\377@N~\377\77M~\377>L}\377\203\77M~\377\203" \ + "@N\177\377\1\77M~\377\231@N\177\377\210\77M~\377\224@N\177\377\211\77" \ + "M~\377\231@N\177\377\1\77M~\377\202@N\177\377\203\77M~\377\1>L}\377\202" \ + "\77M~\377\10@N~\377;J{\3775Cw\377,;q\377\36/h\377\26'c\377\27)d\377\30" \ + ")d\377\232\31*e\377\10\30)d\377\27(d\377\33,g\377'7n\3778Fz\377>L~\377" \ + "=K}\377s\377\32,f\377\30)d\377\226\31*" \ + "e\377\5\30)d\377\35.h\3773Bw\3778Fz\3777Ey\377\2058Fz\377\2037Fy\377" \ + "\1""6Fx\377\2077Fy\377\2""6Ex\3775Dw\377\2056Ex\377\5""5Dw\3776Ex\377" \ + "2Au\377\34-g\377\30)d\377\230\31*e\377\4\30)d\377\34-g\3772Av\3773Bw" \ + "\377\2072Av\377\3""1Au\3772Av\3770At\377\2061Au\377\2""0@u\3771Au\377" \ + "\2020@u\377\2!2k\377\30)d\377\234\31*e\377\5\30)d\377\35.h\377,;r\377" \ + ".=s\377,;q\377\207-L}\377\77M~\377@N\177\377\77M~\3774Cw\377(8o\377" \ + "\40""1j\377\32+f\377\27(d\377\202\30)d\377\233\31*e\377\4\30)d\377\27" \ + "(d\377%5m\3774Cw\377\202=K}\377\1t\3773Bw\3772Av\3771@u\377\2052Av" \ + "\377\4""1Au\3772Av\3771Au\3770At\377\2071Au\377\3""0@t\3770@u\377)9p" \ + "\377\235\31*e\377\6\30)d\377\31*e\377&6n\377.=s\377-s\377" \ + "=J|\377@N\177\377\206\77M~\377\203@N\177\377\1\77M~\377\313@N\177\377" \ + "\1\77M~\377\203@N\177\377\203\77M~\377\1>M~\377\203\77M~\377\5""6Ex\377" \ + "(8o\377\34,g\377\32+e\377\31*e\377\202\30)d\377\1\31*d\377\233\31*e\377" \ + "\5\30)d\377\27(c\377\36/i\3774Cw\377s\377\36.h\377\30)d\377\234\31*e\377\5\30)e" \ + "\377\35.h\377-=r\377.=s\377,;q\377\206-L}\377\203\77M~\377\1>L}\377\204\77M~" \ + "\377\204@N\177\377\1\77M~\377\301@N\177\377\204\77M~\377\202>L}\377\202" \ + "\77M~\377\7>L}\377=K}\377s\377>K}\377" \ + "=K}\377L~\3773Bw" \ + "\377$4l\377\32+e\377\27)d\377\30)d\377\236\31*e\377\202\30)d\377\13\26" \ + "(c\377\27)d\377\40""1j\377*:p\3772Au\3778Fy\377L}\377\202\77M~\377\13@N~\377\77M}\377:H{\3775Dw\377" \ + "/>t\377%6m\377\34-f\377\26'c\377\27(d\377\30)d\377\30)e\377\235\31*e" \ + "\377\202\30)d\377\5\27)d\377\36/h\377*:p\377:H{\377>L~\377\206=K}\377" \ + "\1t\3773Bw\3771@u\377\2062" \ + "Av\377\4""1Au\3772Av\3771Au\3770At\377\2051Au\377\7""0@u\3771Au\3770" \ + "@t\3770@u\377+t\377\207-t\377" \ + "7Fy\377\77M~\377AO\177\377@N~\377\77M~\377>L}\377\205\77M~\377\260@N" \ + "\177\377\1\77M~\377\205@N\177\377\205\77M~\377\1>L}\377\202\77M~\377" \ + "\11@N\177\377AN\177\377L}\377=K}\377L}\377\202" \ + "\77M~\377\11@N~\377@N\177\377=K|\3773Bu\377)9o\377\37""0i\377\33,f\377" \ + "\32+f\377\31*e\377\204\30)d\377\240\31*e\377\11\30)d\377\27)d\377\32" \ + "*e\377-L~\3774Dw\377!2j\377" \ + "\32*e\377\31*d\377\202\30)d\377\243\31*e\377\203\30)d\377\12\27(d\377" \ + "\30)e\377\40""0i\377)9o\3771@u\3779Hz\377L}\377" \ + "\205\77M~\377\1\77M}\377\202>L}\377\240\77M~\377\203>L}\377\205\77M~" \ + "\377\202>L}\377\7=K}\377L~\3774Bw\377&6m\377\35-g\377\27(d\377\202\30)d\377\245\31*e\377\202" \ + "\30)d\377\17\27(d\377\27(c\377\26'c\377\32,f\377\40""1j\377&6m\377+:" \ + "q\3770\77t\3773Bv\3776Dx\3778Gy\377:I{\377=K|\377\77M~\377@N\177\377" \ + "\202@N~\377\210\77M~\377\1\77L}\377\213>L}\377\210\77M~\377\22@M~\377" \ + "@N~\377@N\177\377@N~\377>L}\377L~\377=K}\377s\377\35.h\377\30)d\377\234\31*e\377\6\30" \ + ")d\377\32+e\377(8o\377.=s\377-K}\377\77M~\377@N\177\377\213AO\177\377\24@N~\377" \ + ">L}\377=K|\377;I{\3779Gz\3777Ey\3774Cw\3771Au\377/>s\377,;q\377(8o\377" \ + "&5m\377#3l\377!1j\377\37""0i\377\35-g\377\32+e\377\30)d\377\27(c\377" \ + "\27(d\377\203\30)d\377\250\31*e\377\12\30)d\377\27(d\377\30)d\377$5m" \ + "\3771@u\377:H{\377>L}\377=K}\377L~\3774Cw\377\"2k\377\32+f\377\31*e\377\202\30)d\377\1\31*d\377\271" \ + "\31*e\377\212\30)d\377\272\31*e\377\203\30)d\377\4\32+e\377\34-g\377" \ + "+:p\377;I|\377\202=K}\377\1L~\3777Ey\377*9p\377!1j\377\32+e\377\27(d\377\30)d\377" \ + "\372\31*e\377\203\30)d\377\7\35.h\377$4l\3770\77t\377L~\377=" \ + "K}\377=K|\377\206=K}\377\2L}\377:H{\3773Bv\377)9p\377\35.h\377\26'c\377\202\30)d\377\365\31*e" \ + "\377\7\30)d\377\27(c\377\30)d\377#3l\377/>s\3777Ey\377=K|\377\202=K}" \ + "\377\1L}\377:I|\377" \ + "-=s\377\37""0i\377\32+f\377\31*e\377\203\30)d\377\346\31*e\377\203\30" \ + ")d\377\6\31*d\377\32+e\377\34-g\377%6n\3775Cw\377>L~\377\202=K}\377\1" \ + "L}\377>L~\3777Ey\377,;r\377#3l\377" \ + "\36/h\377\31*d\377\27(d\377\202\30)d\377\340\31*e\377\1\31*d\377\202" \ + "\30)d\377\11\27(d\377\33,f\377\40""1j\377'7n\3772@u\377L}\377L}\377" \ + "\202=K}\377\1s\377\31*e\377\202\30)d\377\231\31*e\377\4" \ + "\30)d\377\37/i\3770\77u\3773Bw\377\2021@u\377\2052Av\377\4""1Au\3772" \ + "Av\3771Au\3770At\377\2101Au\377\5""0@t\3770@u\377)9p\377\32+e\377\30" \ + ")d\377\235\31*e\377\2\30)d\377\36.h\377\202-L}\377" \ + "=K}\3772Av\377'8o\377\35.h\377\33+f\377\32+e\377\31*e\377\204\30)d\377" \ + "\306\31*e\377\205\30)d\377\7\31*e\377\32+f\377\33,f\377\"2k\377-L}\377\202=K}\377\2r\377\31*e\377\30)d\377\232\31*e\377\5\30)d\377\34,g\377" \ + ".=s\3773Bw\3771@u\377\2102Av\377\2""1Au\3770At\377\2061Au\377\7""0@u" \ + "\3771Au\3770@t\3770@u\377-=s\377\35.h\377\30)d\377\235\31*e\377\6\30" \ + ")d\377\32*e\377*9p\377.=s\377-L~\377\10""9Gz\3770@u\377" \ + ")8p\377#3l\377\37""0i\377\34,g\377\30)d\377\27(d\377\204\30)d\377\275" \ + "\31*e\377\203\30)d\377\202\27(d\377\11\32+e\377\36.h\377!2j\377&6n\377" \ + ",L}\377\214=K}\377\1s\377\2108Fz\377\4""7Fy\3778Fz\3777Fy\3776Fx\377\2077Fy\377" \ + "\4""6Ex\3777Fy\3776Ex\3775Dw\377\2066Ex\377\5""5Dw\3776Ex\377-=r\377" \ + "\32+f\377\30)d\377\232\31*e\377\4\30)d\377\32+e\377+;r\3774Cw\377\210" \ + "2Av\377\4""1Au\3772Av\3771Au\3770At\377\2051Au\377\7""0@u\3771Au\377" \ + "0@u\3770@t\377/\77u\377!2j\377\30)d\377\235\31*e\377\6\30)d\377\31*e" \ + "\377$4l\377-L}\377s\3773Bv\3777Ey\377:I{\377\202>L}" \ + "\377\202=K}\377\1L}\377>L~\377L}\377\1>K}\377\203" \ + "=K}\377\1t\377\33,f\377" \ + "\202\30)d\377\232\31*e\377\4\30)e\377\30)d\377\33+f\377+;r\377\2108F" \ + "z\377\3""7Fy\3778Fz\3777Fy\377\2026Fx\377\2077Fy\377\4""6Ex\3777Fy\377" \ + "6Ex\3775Dw\377\2106Ex\377\2+;q\377\30)d\377\233\31*e\377\3\30)d\377\31" \ + "*e\377$5m\377\2022Av\377\1""1@u\377\2062Av\377\4""1Au\3772Av\3771Au\377" \ + "0At\377\2061Au\377\2""0@u\3771Au\377\2020@u\377\2+;r\377\32+f\377\236" \ + "\31*e\377\202\30)d\377\4$4m\377.=s\377-K}\377" \ + "\202>L~\377\17\77M~\377>L~\377;I{\3777Fy\3775Cw\3771@v\377.>t\377,L~\377>L}\377\227=K}\377\203" \ + "s\377\36/h\377\30" \ + ")d\377\235\31*e\377\4\31*d\377\30)d\377\37""0i\377.=s\377\202-K}\377\203>L}\377\5>L~\377=K}\377L~\377\203>L}\377\1>K}\377\205=K}\377\1t\3773Bw\3771@u\377\210" \ + "2Av\377\2021Au\377\1""0At\377\2061Au\377\2""0@u\3771Au\377\2020@u\377" \ + "\2+;q\377\32+f\377\237\31*e\377\4\30)d\377\33,f\377,t\377\2028Fz\377\1""7Ey\377\2068Fz\377\2047Fy\377\1""6Fx\377\2077F" \ + "y\377\2""6Ex\3777Fy\377\2026Ex\377\1""5Dw\377\2056Ex\377\4""5Dw\3776" \ + "Ex\3773Bv\377\40""0i\377\202\30)d\377\233\31*e\377\4\30)d\377\33,f\377" \ + ".>s\3773Bw\377\2112Av\377\2021Au\377\1""0At\377\2061Au\377\7""0@u\377" \ + "1Au\3770@u\377/\77u\377-=s\377\34-g\377\30)d\377\236\31*e\377\6\30)d" \ + "\377\31*e\377)9p\377.=s\377-t\3778Fz\3777Ey\377\2108Fz\377\2027Fy\377" \ + "\1""6Fx\377\2107Fy\377\1""6Ex\377\2027Fy\377\1""5Dw\377\2066Ex\377\1" \ + "5Dw\377\2026Ex\377\3.>s\377\32+f\377\30)d\377\233\31*e\377\202\30)d\377" \ + "\5\33+f\377.=t\3773Bw\3772Av\3771@u\377\2062Av\377\1""1Au\377\2022Av" \ + "\377\1""0At\377\2101Au\377\5""0@t\377/\77u\3770@u\377!1j\377\30)d\377" \ + "\236\31*e\377\202\30)d\377\1\40""0j\377\202-t\3777Ey\3778Fz\3777Ey\3777Fz\377\2058Fz\377\1""7Fy\377\2028Fz\377\2" \ + "7Fy\3776Fx\377\2107Fy\377\2""6Ex\3777Fy\377\2026Ex\377\1""5Dw\377\205" \ + "6Ex\377\6""5Dw\3776Ex\3777Ex\377&6n\377\31*e\377\30)d\377\234\31*e\377" \ + "\6\30)d\377\32*f\377,;r\3773Bw\3772Av\3771@u\377\2102Av\377\2021Au\377" \ + "\1""0At\377\2061Au\377\2""0@u\3771Au\377\2020@u\377\1&7n\377\240\31*" \ + "e\377\6\31*d\377\30*e\377(8o\377.=s\377-s\377\36.h\377\32+e\377\203\30)d\377\237\31*e\377\4\30)d\377\30*" \ + "d\377'7n\3776Dx\377\2028Fz\377\1""7Ey\377\2068Fz\377\2""7Fy\3778Fz\377" \ + "\2027Fy\377\1""6Fx\377\2107Fy\377\3""6Ex\3777Fy\3776Ex\377\2025Dw\377" \ + "\2076Ex\377\4""4Dw\377\"2k\377\31*e\377\30)d\377\234\31*e\377\6\30)d" \ + "\377\31*d\377.=s\3773Bw\3772Av\3771@u\377\2072Av\377\2""1Au\3772Av\377" \ + "\2020At\377\2061Au\377\7""0@u\3771Au\3770@t\3770@u\377*:q\377\31*e\377" \ + "\30)d\377\237\31*e\377\5\27(d\377$5m\377.=s\377-s\377\35.h\377\27(d\377\235" \ + "\31*e\377\6\30)d\377\33,f\377+;r\3773Bw\3772Av\3771@u\377\2062Av\377" \ + "\2""1Au\3772Av\377\2111Au\377\7""0@u\3771Au\3770@t\3770@u\377,t\3773Bw\3772Av\3771@u\377\207" \ + "2Av\377\2""1Au\3772Av\377\2020At\377\2061Au\377\7""0@u\3771Au\3770@u" \ + "\377/\77u\377.>t\377\36/i\377\30)d\377\240\31*e\377\5\30)d\377%4m\377" \ + ".=s\377-s\377\210-s\377%5m\377\37""0i\377\32+e\377\27(d\377\202\30)d" \ + "\377\245\31*e\377\202\30)d\377\2%4m\3771\77u\377\2028Fz\377\1""7Ey\377" \ + "\2078Fz\377\1""7Fy\377\2028Fz\377\1""7Fy\377\2026Fx\377\2127Fy\377\202" \ + "6Ex\377\1""5Dw\377\2066Ex\377\6""5Dw\3776Ex\3776Ew\377&6m\377\31*e\377" \ + "\30)d\377\236\31*e\377\6\27)d\377\35.h\377/>t\3773Bw\3772Av\3771@u\377" \ + "\2102Av\377\2021Au\377\1""0At\377\2071Au\377\6""0@u\3771At\3770@u\377" \ + "/\77t\377\"2k\377\30)d\377\240\31*e\377\6\30)d\377\34-g\377+:q\377.=" \ + "s\377-s\377\"" \ + "2k\377\33,f\377\32+e\377\204\30)d\377\245\31*e\377\5\30)d\377\27(c\377" \ + "\37""0i\3772@u\3777Ey\377\2028Fz\377\1""7Ey\377\2118Fz\377\2027Fy\377" \ + "\1""6Fx\377\2117Fy\377\3""6Ex\3777Fy\3776Ex\377\2025Dw\377\2066Ex\377" \ + "\4""5Dw\3776Ex\3774Cw\377\40""0i\377\203\30)d\377\235\31*e\377\4\30)" \ + "d\377\37/i\3771@v\3773Bv\377\2021@u\377\2072Av\377\2""1Au\3772Av\377" \ + "\2020At\377\2071Au\377\7""0@u\3771Au\3770@u\377/\77t\377#3l\377\31*e" \ + "\377\30)d\377\237\31*e\377\3\30)d\377\32+e\377(7n\377\202.=s\377\1,;" \ + "q\377\206-s\377\32*f\377\30)d\377\236\31*e\377\202\30)d\377\4\40""0j\377" \ + "1@v\3772Av\3771@u\377\2072Av\377\1""1Au\377\2022Av\377\1""0At\377\207" \ + "1Au\377\6""0@u\3771Au\3771At\3770@u\377/\77t\377&6n\377\202\30)d\377" \ + "\237\31*e\377\6\30)d\377\31*e\377$3l\377/>s\377-s\377'8n\377\37""0i\377\30" \ + ")d\377\27(c\377\202\30)d\377\250\31*e\377\203\30)d\377\4\37/i\377*9p" \ + "\3777Ey\3779Fz\377\2138Fz\377\2027Fy\377\1""6Fx\377\2127Fy\377\2046E" \ + "x\377\1""5Dw\377\2066Ex\377\6""5Dw\3776Ex\3774Cw\377'7n\377\30)e\377" \ + "\30)d\377\236\31*e\377\202\30)d\377\4\"2k\3771@v\3773Bw\3771@u\377\207" \ + "2Av\377\2""1Au\3772Av\377\2131Au\377\1""0@t\377\2020@u\377\1%6n\377\202" \ + "\30)d\377\240\31*e\377\3\30)d\377!1j\377/>s\377\212-s\3776Ex\377s\377'7n\377\37""0i\377" \ + "\30)d\377\27(d\377\203\30)d\377\256\31*e\377\202\30)d\377\6\31*e\377" \ + "\35-g\377+:q\3779Fz\3778Fz\3777Ey\377\2108Fz\377\2""7Fy\3778Fz\377\203" \ + "7Fy\377\1""6Fx\377\2117Fy\377\1""6Ex\377\2027Fy\377\1""6Ex\377\2025D" \ + "w\377\2066Ex\377\1""5Dw\377\2026Ex\377\2""3Bv\377#3k\377\202\30)d\377" \ + "\237\31*e\377\6\30)d\377\32+f\377)9p\3773Bw\3772Av\3771@u\377\2072Av" \ + "\377\1""1Au\377\2022Av\377\1""0At\377\2071Au\377\6""0@u\3771Au\3771A" \ + "t\3770@u\377/\77t\377'7o\377\202\30)d\377\240\31*e\377\6\30)d\377\33" \ + ",f\377)9p\377.=s\377-s\377-<" \ + "r\377,;q\377\207-t\3776Dx\3779Fz\3778Fz\3777Ey\377\210" \ + "8Fz\377\2""7Fy\3778Fz\377\2027Fy\377\2026Fx\377\2127Fy\377\2""6Ex\377" \ + "7Fy\377\2026Ex\377\1""5Dw\377\2076Ex\377\6""5Dw\3776Ex\3772Au\377#3l" \ + "\377\31*e\377\30)d\377\237\31*e\377\5\30)e\377\27(d\377\37/i\377.=s\377" \ + "3Bw\377\2022Av\377\1""1@u\377\2102Av\377\2021Au\377\1""0At\377\2071A" \ + "u\377\2""0@u\3771At\377\2020@u\377\3%5m\377\31*e\377\30)d\377\240\31" \ + "*e\377\202\30)d\377\2&6m\377.=s\377\211-t\377" \ + "3Bw\3772Av\377\2021@u\377\2072Av\377\4""1Au\3772Av\3771Au\3770At\377" \ + "\2071Au\377\10""0@u\3771Au\3770@u\377/\77u\377/\77t\377#3l\377\31*e\377" \ + "\30)d\377\241\31*e\377\6\30)d\377\33,f\377-s\377!1j\377\27(c\377\242\31*e\377\6\30)d\377\32+e\377(7o\377" \ + ".=s\377-t\377\2038Fz\377\1""7Ey\377\2138Fz\377\1""7Fy\377\202" \ + "8Fz\377\2037Fy\377\2026Fx\377\2167Fy\377\2026Ex\377\2025Dw\377\2076E" \ + "x\377\1""5Dw\377\2026Ex\377\3""5Dw\3771Au\377!2j\377\202\30)d\377\243" \ + "\31*e\377\4\30)d\377\31*e\377%6m\3773Bw\377\2022Av\377\1""1@u\377\210" \ + "2Av\377\4""1Au\3772Av\3771Au\3770At\377\2071Au\377\3""0@u\3771Au\377" \ + "1At\377\2020@u\377\3-=r\377\33+f\377\30)d\377\242\31*e\377\6\30)d\377" \ + "\31*d\377&6m\377.=s\377-t\3777Ey\3779G{\377\2028Fz\377\1""7Ey\377\2138" \ + "Fz\377\1""7Fy\377\2028Fz\377\2027Fy\377\2036Fx\377\2147Fy\377\2""6Ex" \ + "\3777Fy\377\2036Ex\377\1""5Dw\377\2106Ex\377\1""5Dx\377\2026Ex\377\3" \ + "1@u\377'6n\377\32*e\377\202\30)d\377\242\31*e\377\6\31*d\377\30)d\377" \ + "\34-g\377*:p\3773Bw\3772Av\377\2021@u\377\2072Av\377\1""1Au\377\2022" \ + "Av\377\2""1Au\3770At\377\2071Au\377\2""0@u\3771Au\377\2030@u\377\3*:" \ + "p\377\32+f\377\30)d\377\242\31*e\377\6\30)d\377\31*e\377$4l\377-=r\377" \ + ".=s\377,;q\377\207-t\377*:q\377#3l\377\33,f\377\26'c\377\27(d\377" \ + "\202\30)d\377\353\31*e\377\202\30)d\377\10\27(c\377\31)d\377\37/i\377" \ + "'6n\377.=s\3772Av\3776Ey\3779Gz\377\2178Fz\377\1""7Fy\377\2028Fz\377" \ + "\2037Fy\377\2026Fx\377\2147Fy\377\1""6Ex\377\2027Fy\377\2026Ex\377\202" \ + "5Dw\377\2106Ex\377\5""5Dw\3777Fx\3773Cv\377&6m\377\34-g\377\202\30)d" \ + "\377\243\31*e\377\7\30)d\377\27(d\377!2j\377/>t\3773Bw\3772Av\3771@u" \ + "\377\2102Av\377\2""1Au\3772Av\377\2021Au\377\1""0At\377\2071Au\377\10" \ + "0@u\3771Au\3770@u\377/\77u\3770@u\377&7n\377\32+e\377\30)d\377\243\31" \ + "*e\377\6\30)d\377#3k\377-t\377+:q\377&6m\377!1j\377\33,f\377\27(d\377\27(c\377\27(d\377\203" \ + "\30)d\377\303\31*e\377\202\30)d\377\14\27(d\377\27(c\377\26(c\377\30" \ + ")e\377\36.h\377#3k\377(8o\377-=s\3771\77u\3773Bw\3776Ey\3779Gz\377\203" \ + "8Fz\377\1""7Ey\377\2178Fz\377\1""7Fy\377\2038Fz\377\2037Fy\377\2026F" \ + "x\377\2167Fy\377\1""6Ex\377\2027Fy\377\2026Ex\377\2025Dw\377\2116Ex\377" \ + "\6""5Dw\3776Ex\3775Dw\377*:p\377\40""0i\377\31*e\377\202\30)d\377\245" \ + "\31*e\377\6\30)d\377\34,g\377*:p\3773Bv\3773Bw\3772Av\377\2021@u\377" \ + "\2112Av\377\2021Au\377\1""0At\377\2111Au\377\6""0@u\3770@t\3770@u\377" \ + ",s\377)8p\377#3k" \ + "\377\34-g\377\202\27(d\377\204\30)d\377\1\30)e\377\267\31*e\377\204\30" \ + ")d\377\11\27)d\377\27(c\377\32+e\377\40""0i\377&5m\377,;r\3772@v\377" \ + "5Dx\3776Dx\377\2027Ey\377\2048Fz\377\1""7Ey\377\2218Fz\377\1""7Fy\377" \ + "\2028Fz\377\2037Fy\377\2036Fx\377\2167Fy\377\1""6Ex\377\2027Fy\377\203" \ + "6Ex\377\1""5Dw\377\2116Ex\377\6""5Dw\3776Ex\3777Fx\377,;q\377\35-g\377" \ + "\31*e\377\202\30)d\377\245\31*e\377\5\31*d\377\30)d\377\40""0j\3770@" \ + "u\3773Bw\377\2022Av\377\1""1@u\377\2102Av\377\3""1Au\3772Av\3771Au\377" \ + "\2020At\377\2101Au\377\2020@u\377\4/\77t\3770@u\377*:p\377\32*e\377\202" \ + "\30)d\377\243\31*e\377\2\30)d\377\40""0j\377\202.=s\377\2-t\377,;r\377)8p\377&6n\377$4l\377\"2k\377" \ + "!1j\377\37""0i\377\36/i\377\35.h\377\34-g\377\33,f\377\33+f\377\32+e" \ + "\377\31*e\377\30)d\377\27)d\377\221\27(d\377\23\30)d\377\31)d\377\31" \ + "*e\377\32+e\377\33,f\377\34,g\377\35-h\377\36.h\377\37/i\377\40""0j\377" \ + "!1k\377#3k\377%5m\377'7o\377*9p\377-t\3773Bw\3772Av\377\2021@u\377\2102Av\377" \ + "\2""1Au\3772Av\377\2021Au\377\1""0At\377\2111Au\377\5""0@u\3770@t\377" \ + "0@u\377.>t\377\"3k\377\202\30)d\377\243\31*e\377\202\30)d\377\5!1j\377" \ + "-t\377.>t\377.=s\377-s\3770>t\3771\77u\3771@u\3772Av\3774Bw\3775Cw\3776Dx\377" \ + "7Ey\3778Fz\3779Gz\3779Fz\377\2058Fz\377\2""8Fy\3777Ez\377\2278Fz\377" \ + "\1""7Fy\377\2038Fz\377\2047Fy\377\2026Fx\377\2207Fy\377\1""6Ex\377\203" \ + "7Fy\377\2036Ex\377\1""5Dw\377\2126Ex\377\6""5Dw\3776Ex\3777Fx\3771@u" \ + "\377%5m\377\35.h\377\203\30)d\377\247\31*e\377\7\27)d\377\33+f\377)9" \ + "p\3772Av\3773Bw\3772Av\3771@u\377\2112Av\377\2""1Au\3772Av\377\2021A" \ + "u\377\1""0At\377\2101Au\377\2020@u\377\4""0@t\3770@u\377,s\377\40""0i\377\202" \ + "\30)d\377\251\31*e\377\5\30)d\377\31*e\377\33,f\377)9p\3773Bw\377\202" \ + "2Av\377\1""1@u\377\2112Av\377\3""1Au\3772Av\3771Au\377\2020At\377\211" \ + "1Au\377\7""0@u\3770@t\3770@u\377/\77t\377&6n\377\31*e\377\30)d\377\244" \ + "\31*e\377\202\30)d\377\2\"2k\377.=s\377\202-t\377#3k\377\202\30)d\377\244\31*e\377\202\30)" \ + "d\377\3\31*e\377'6m\377.=s\377\202-s\377&5m\377\37""0i\377\32+f\377\27)d\377\202\30)d\377\254\31*e\377" \ + "\7\30)d\377\27(c\377\33-g\377)8o\3770\77u\3774Bw\3772Av\377\2021@u\377" \ + "\2112Av\377\2""1Au\3772Av\377\2021Au\377\2020At\377\2121Au\377\1""0@" \ + "t\377\2020@u\377\3%6m\377\32+f\377\30)d\377\246\31*e\377\6\30)d\377\32" \ + "+e\377(7o\377.=s\377-s\3774Cv\3775Dw\377\2036E" \ + "x\377\1""5Dw\377\2176Ex\377\2035Dw\377\2046Ex\377\2057Fy\377\1""6Ex\377" \ + "\3207Fy\377\1""6Ex\377\2057Fy\377\2046Ex\377\2045Dw\377\2166Ex\377\1" \ + "5Dw\377\2036Ex\377\5""5Dw\3774Cw\3772Bv\377)9p\377\35.g\377\203\30)d" \ + "\377\257\31*e\377\202\30)d\377\5\31*e\377\36.i\377.=s\3774Cw\3773Bw\377" \ + "\2021@u\377\2112Av\377\2""1Au\3772Av\377\2031Au\377\1""0At\377\2101A" \ + "u\377\11""0@u\3771Au\3770@u\3770@t\377/\77u\377/\77t\377*:q\377\31+f" \ + "\377\30)d\377\246\31*e\377\202\30)d\377\5\34-g\377+;r\377.=s\377-s\377#4l\377\202\30)d\377\246\31*e" \ + "\377\7\31*d\377\30)d\377\37/i\377+:q\377.=s\377-t\377%6m\377\34-g\377\32" \ + "+e\377\31*e\377\203\30)d\377\1\30)e\377\262\31*e\377\5\30)d\377\33+f" \ + "\377*9p\3771@v\3773Bw\377\2022Av\377\2021@u\377\2122Av\377\2041Au\377" \ + "\1""0At\377\2111Au\377\2""0@u\3771Au\377\2030@u\377\2#3k\377\31*e\377" \ + "\202\30)d\377\246\31*e\377\202\30)d\377\5$4l\377-s\3774Cv\3774Cw\3775Dw\377\2046Ex" \ + "\377\1""5Dw\377\2256Ex\377\2065Dw\377\2136Ex\377\2357Fy\377\2126Ex\377" \ + "\2075Dw\377\2246Ex\377\2""5Ex\3776Dw\377\2036Ex\377\2025Dw\377\6""4C" \ + "v\3772Au\377+;q\377!1k\377\31*e\377\27(d\377\202\30)d\377\264\31*e\377" \ + "\202\30)d\377\6\31*e\377\32+f\377$5m\3772Av\3773Bw\3772Av\377\2021@u" \ + "\377\2142Av\377\2021Au\377\1""0At\377\2111Au\377\10""0@u\3771Au\3770" \ + "@u\3770@t\3770@u\377/\77t\377,s\377*:p\377$4l\377\35.g\377\27(d\377\27(c\377\202\30" \ + ")d\377\266\31*e\377\202\30)d\377\4\34-g\377$4m\3770\77u\3774Cw\377\202" \ + "2Av\377\1""1@u\377\2122Av\377\2""1Au\3772Av\377\2031Au\377\1""0At\377" \ + "\2111Au\377\2""0@u\3771Au\377\2030@u\377\5.>s\377&6n\377\31*e\377\30" \ + ")d\377\31*d\377\247\31*e\377\5\30)d\377\33+f\377&6n\377/=s\377-t\3773Bw\377\2022Av\377\2021@u\377\2122Av\377\2""1" \ + "Au\3772Av\377\2021Au\377\2020At\377\2131Au\377\5""0@u\377/\77t\3770@" \ + "u\377*:q\377\36/i\377\202\30)d\377\250\31*e\377\4\27)d\377\35-h\377)" \ + "9p\377.=s\377\214-s\377" \ + "0@t\3772Bu\3774Cw\3776Ex\3777Fx\377\2076Ex\377\1""5Dw\377\2536Ex\377" \ + "\1""5Dx\377\2066Ex\377\14""7Ex\3777Fx\3775Dw\3773Bv\3771Au\377/\77t\377" \ + ".=r\377+;q\377(8n\377$3k\377\37""0i\377\33,f\377\202\27(c\377\1\27(d" \ + "\377\203\30)d\377\276\31*e\377\202\30)d\377\5\30)e\377\36/h\377&6n\377" \ + "1@v\3774Cw\377\2022Av\377\1""1@u\377\2152Av\377\2021Au\377\2020At\377" \ + "\2121Au\377\2020@u\377\1""0@t\377\2020@u\377\2-=r\377#3l\377\202\30)" \ + "d\377\251\31*e\377\7\30)d\377\32+e\377#4l\377.>s\377.s\377,;q\377)9p\377&6n\377#3k\377!1j\377\37""0i\377\35" \ + ".h\377\33,f\377\31*e\377\30)d\377\27(d\377\204\30)d\377\301\31*e\377" \ + "\203\30)d\377\4!1j\377*:q\3770@u\3773Bw\377\2022Av\377\2021@u\377\213" \ + "2Av\377\2""1Au\3772Av\377\2021Au\377\2020At\377\2111Au\377\1""0@u\377" \ + "\2021Au\377\1""0@t\377\2020@u\377\2&6n\377\34-g\377\202\30)d\377\250" \ + "\31*e\377\202\30)d\377\3\34,f\377(7o\377.=s\377\202-s\3770@t\3772Bu\3774Cw\3776Ex\377\2067Fx\377\2027Ex\377" \ + "\2076Ex\377\2027Ex\377\2067Fx\377\14""6Dw\3774Cv\3771Au\3770\77s\377" \ + "-=r\377+;p\377)8o\377&6n\377#4k\377\40""1j\377\35.h\377\33,f\377\202" \ + "\32+f\377\1\32+e\377\203\31*e\377\207\30)d\377\305\31*e\377\202\30)d" \ + "\377\4!1j\377/>t\3772Av\3773Bw\377\2022Av\377\2021@u\377\2132Av\377\1" \ + "1Au\377\2022Av\377\2021Au\377\1""0At\377\2141Au\377\6""0@u\3770@t\377" \ + "0@u\377,u\3774Cw\3773Bw\3772Av\377\2021@u\377" \ + "\2132Av\377\1""1Au\377\2022Av\377\2021Au\377\2020At\377\2111Au\377\1" \ + "0@u\377\2021Au\377\1""0@u\377\202/\77u\377\2.>t\377%5m\377\203\30)d\377" \ + "\250\31*e\377\10\31*d\377\30)d\377\31*e\377\37""0i\377.s\377.=r\377-t\377\40""0j\377\31*e\377\203\30)d\377\252\31*e\377\3" \ + "\30)d\377\36.i\377,;q\377\202.=s\377\2-t\377'7n\377\31*e\377\30)d\377\254" \ + "\31*e\377\3\30)d\377\31*e\377#3k\377\202.=s\377\2-t\3774Cw\3773Bw\377\2022Av\377\2021@u\377" \ + "\2142Av\377\1""1Au\377\2022Av\377\2021Au\377\2020At\377\2121Au\377\1" \ + "0@u\377\2021Au\377\2030@u\377\5.>t\377(8o\377\35.h\377\27(d\377\30)d" \ + "\377\253\31*e\377\202\30)d\377\2\34,f\377'6n\377\202.=s\377\2-t\3771@v\3772Av\3773Bw\377\2032Av\377\2021@u\377\2172Av\377\2021Au" \ + "\377\2030At\377\2121Au\377\1""0@u\377\2021Au\377\1""0@t\377\2020@u\377" \ + "\3,s\377&6n\377\40""0i\377\34" \ + "-g\377\203\30)d\377\377\31*e\377\233\31*e\377\203\30)d\377\7\31*e\377" \ + "\36.h\377\"2k\377):p\3771@u\3774Cx\3773Bw\377\2022Av\377\2021@u\377\216" \ + "2Av\377\2""1Au\3772Av\377\2031Au\377\2020At\377\2131Au\377\1""0@u\377" \ + "\2021Au\377\2040@u\377\3+;q\377#3l\377\31*e\377\202\30)d\377\255\31*" \ + "e\377\6\30)d\377\31*e\377\37""0i\377,;q\377.=s\377-t\377*9p\377#3l\377\34-g\377\27(c\377\27" \ + ")d\377\202\30)d\377\377\31*e\377\224\31*e\377\202\30)d\377\6\27(c\377" \ + "\30*e\377\37/i\377&6n\377,;r\3770\77u\377\2023Bw\377\2022Av\377\2031" \ + "@u\377\2212Av\377\2021Au\377\2030At\377\2131Au\377\4""0@u\3771Au\377" \ + "0@u\3770@t\377\2020@u\377\3,s\377!1j\377\32*e\377\30*e\377\30)d\377\257\31*e\377\3" \ + "\30)d\377\35.h\377+:q\377\202.=s\377\202-t\377%6n\377\35.h\377\32+e\377" \ + "\202\31*e\377\203\30)d\377\377\31*e\377\203\31*e\377\204\30)d\377\6\31" \ + "*e\377\32+e\377\33,f\377\40""1j\377*9p\3773Av\377\2023Bw\377\2022Av\377" \ + "\2031@u\377\2172Av\377\2""1Au\3772Av\377\2031Au\377\2020At\377\2151A" \ + "u\377\4""0@u\3771Au\3770@u\3770@t\377\2020@u\377\3/\77t\377-=s\377\"" \ + "3l\377\202\30)d\377\1\30*e\377\256\31*e\377\202\30)d\377\6\31*e\377#" \ + "3k\377.=t\377.=s\377-t\3773Bw\3774Bw\3773Bw\377" \ + "\2032Av\377\2031@u\377\2172Av\377\1""1Au\377\2022Av\377\2031Au\377\202" \ + "0At\377\2151Au\377\1""0@u\377\2021Au\377\2""0@u\3770@t\377\2020@u\377" \ + "\3(9o\377\40""1i\377\32+f\377\202\30)d\377\260\31*e\377\5\30)d\377\31" \ + "*d\377#3l\377,;q\377.=s\377\202-t\377(8o\377\33,f\377\202\30)d\377\261\31*e\377\202\30)d\377\5" \ + "\31*e\377\"2k\377-t\377*9q\377%5m\377!2j\377" \ + "\37/i\377\34-g\377\32+e\377\206\30)d\377\323\31*e\377\204\30)d\377\14" \ + "\27)d\377\30)d\377\33,f\377\35.h\377\37""0i\377#3l\377'7o\377,;r\377" \ + "1\77v\3775Cx\3774Cw\3773Bw\377\2042Av\377\2031@u\377\2222Av\377\1""1" \ + "Au\377\2032Av\377\2031Au\377\2020At\377\2161Au\377\4""0@u\3771Au\377" \ + "0@u\3770@t\377\2020@u\377\5/\77t\377+;q\377%5m\377\34-g\377\27(d\377" \ + "\202\30)d\377\261\31*e\377\202\30)d\377\3\35.h\377(7n\377/>s\377\202" \ + "-t\377,t\3773Bv\3774Cw\377\2043Bw\377\2042Av\377\2051@u\377" \ + "\2252Av\377\1""1Au\377\2032Av\377\2031Au\377\2030At\377\2171Au\377\1" \ + "0@u\377\2021Au\377\3""0@u\3770@t\3770@u\377\202/\77u\377\4/\77t\377-" \ + "=r\377#3l\377\31*e\377\202\30)d\377\264\31*e\377\10\30)d\377\31*d\377" \ + "\32+f\377%5l\377/>s\377.=s\377-t\377,t\377.=s\377\202-s\377/>t\3770\77t\3770@u\377\2022Av\377" \ + "\3""4Bw\3774Cw\3774Bw\377\2043Bw\377\1""3Bv\377\2062Av\377\2061@u\377" \ + "\2352Av\377\2041Au\377\2030At\377\2201Au\377\1""0@u\377\2021Au\377\10" \ + "0@u\3770@t\3770@u\3771Au\377/\77t\377'8o\377!1j\377\34,g\377\203\30)" \ + "d\377\265\31*e\377\6\30)d\377\30(c\377\36/h\377(7o\377-s\377(9o\377\35.h\377\203\30)d\377\267\31*e\377\202\30)d\377\4\31*" \ + "e\377\36/i\377,:q\377.=s\377\202-t\377/\77t\377\2060@u\377\202" \ + "1Au\377\1""0@u\377\2271Au\377\2050At\377\2061Au\377\2062Av\377\1""1A" \ + "u\377\2762Av\377\1""1Au\377\2072Av\377\2051Au\377\2050At\377\2271Au\377" \ + "\1""0@u\377\2031Au\377\5""0@u\3770@t\3770@u\377/\77u\3770@u\377\202/" \ + "\77t\377\3-=s\377'7o\377\36/i\377\203\30)d\377\1\30)e\377\273\31*e\377" \ + "\202\30)d\377\4\31*e\377\37/i\377,;q\377.=s\377\202-t\377\2040@u\377\1""0@t\377\235" \ + "1Au\377\2050At\377\2071Au\377\2072Av\377\1""1Au\377\2602Av\377\1""1A" \ + "u\377\2072Av\377\2071Au\377\2050At\377\2311Au\377\1""0@u\377\2031Au\377" \ + "\2060@u\377\6-=r\377*:p\377%6m\377\36/i\377\30)d\377\27(d\377\202\30" \ + ")d\377\274\31*e\377\202\30)d\377\3\31*e\377\36.h\377'7n\377\202.=s\377" \ + "\202-s\3771Au\377\2020@u\377" \ + "\2""0@t\3770@u\377\2041Au\377\1""0@u\377\2321Au\377\2070At\377\2071A" \ + "u\377\2142Av\377\1""1Au\377\2312Av\377\1""1Au\377\2132Av\377\2101Au\377" \ + "\2060At\377\2331Au\377\1""0@u\377\2031Au\377\2""0@u\3770@t\377\2020@" \ + "u\377\2021Au\377\5+;q\377%5m\377\40""0j\377\34-g\377\31*e\377\203\30" \ + ")d\377\276\31*e\377\202\30)d\377\4\35.h\377'7n\377-s\377.>t\377/\77t\377/\77u\377\2060@u\377\2041Au\377\1""0@u\377\251" \ + "1Au\377\2340At\377\2541Au\377\2020@u\377\1""0@t\377\2020@u\377\2/\77" \ + "u\3770@u\377\202/\77t\377\4.>t\377+;r\377%5n\377\36.i\377\204\30)d\377" \ + "\301\31*e\377\202\30)d\377\3\31*e\377\32+e\377$4l\377\202.=s\377\3-=" \ + "s\377-s\377+;r\377)9p\377%5m\377" \ + "\40""0i\377\33+f\377\27(d\377\27)d\377\202\30)d\377\302\31*e\377\1\31" \ + "*d\377\202\30)d\377\3\34,g\377\"3k\377,;r\377\202.=s\377\202-s\377)9p\377$5m\377\40""1j\377" \ + "\36.h\377\33,f\377\30)e\377\204\30)d\377\304\31*e\377\202\30)d\377\3" \ + "\33,f\377%4l\377*:p\377\202.=s\377\202-s\377\2100@u\377\3271Au\377\1""0@u\377\2051" \ + "Au\377\2020@u\377\1""0@t\377\2040@u\377\6""1Au\377,s\377.>t\377\203/\77t\377\2020@u\377\1/\77" \ + "u\377\2020@u\377\1""0@t\377\2030@u\377\3011Au\377\1""0@u\377\2061Au\377" \ + "\2030@u\377\3""0@t\3770@u\3771Au\377\2040@u\377\202/\77t\377\7.>t\377" \ + ".>s\377-=r\377(8o\377#3k\377\35.g\377\31*e\377\204\30)d\377\312\31*e" \ + "\377\202\30)d\377\5\31*e\377\32+f\377\"2k\377-s\377/\77t\377\2040@u\377\1""1Au\377\2050@u\377\2111" \ + "Au\377\1""0@u\377\2501Au\377\1""0@u\377\2111Au\377\2030@u\377\1""0@t" \ + "\377\2070@u\377\13.>t\377-=s\377+;q\377):p\377(8o\377$4m\377!2j\377\36" \ + ".h\377\32+e\377\27(c\377\27(d\377\203\30)d\377\314\31*e\377\203\30)d" \ + "\377\3\35-g\377#3k\377,;r\377\202.=s\377\202-t\377\2021Av\377\3""1Au\3770@u\3771Au\377\2100@u\377\2241Au" \ + "\377\2020@u\377\2241Au\377\2040@u\377\1""0@t\377\2030@u\377\2""1@u\377" \ + "0@u\377\2021Au\377\14""1Av\3770@u\377-=s\377+;q\377(8p\377%6n\377\"3" \ + "k\377\40""1j\377\36/i\377\35-g\377\33,f\377\31*e\377\206\30)d\377\317" \ + "\31*e\377\202\30)d\377\3\35.h\377&6m\377+;q\377\202.=s\377\202-s\377\206.>t\377\204.\77t\377\1/\77" \ + "t\377\203.\77t\377\207.>t\377\204.>s\377\14,=r\377+;q\377)9p\377(8o\377" \ + "&7n\377$5l\377\"3k\377\40""1j\377\36/h\377\33,f\377\31*e\377\27)d\377" \ + "\210\30)d\377\331\31*e\377\202\30)d\377\4\31)d\377\31*e\377\36.h\377" \ + ")8p\377\202.=s\377\202-s\377.=s\377\202-s\377.=s\377\203-s\377\202." \ + "=s\377\203-s\377\203.=s\377\203-t\377-s\377\202.=s\377\204-s\377,;q\377'7o\377" \ + "$4l\377\40""0i\377\34,g\377\32+f\377\32+e\377\203\31*e\377\1\30)e\377" \ + "\207\30)d\377\300\31*e\377\210\30)d\377\203\31*e\377\10\32*e\377\32+" \ + "e\377\33,f\377\36.h\377\"1k\377%5m\377)9p\377-s\377\14-=s\377+:q\377)8o\377&5n\377#3l\377!" \ + "1j\377\37""0i\377\36.h\377\35-g\377\33,f\377\32+f\377\31*e\377\212\30" \ + ")d\377\256\31*e\377\212\30)d\377\14\30*e\377\31+e\377\33,f\377\34,g\377" \ + "\35.h\377\37/i\377\40""0i\377\"2k\377$4m\377'6n\377*9p\377,;r\377\202" \ + "/>s\377\1/=s\377\203.=s\377\205-\377\10\15\37\377\202\7\15!\377\2\12\20)\377\23\40O\377" \ + "\314\31*e\377\202\30)d\377\4\31*e\377\33,f\377\34-g\377\35.g\377\202" \ + "\36.h\377\1\35-g\377\206\36.h\377\3\34-g\377\33+f\377\31*e\377\202\30" \ + ")d\377\1\30)e\377\377\31*e\377\377\31*e\377\257\31*e\377\3\21\34E\377" \ + "\7\13\32\377\6\13\33\377\243\7\13\33\377\1\6\13\33\377\244\31*e\377\2" \ + "\27'_\377\12\23.\377\205\7\13\33\377\1\20\33C\377\310\31*e\377\203\30" \ + ")d\377\4\32,f\377\34-g\377\35-g\377\35.h\377\202\36.h\377\1\35-g\377" \ + "\203\36.h\377\4\35-g\377\36.h\377\36-g\377\34,f\377\203\31*e\377\202" \ + "\30)d\377\377\31*e\377\377\31*e\377\261\31*e\377\3\21\34E\377\7\13\32" \ + "\377\6\13\33\377\243\7\13\33\377\1\6\13\33\377\244\31*e\377\2\26%Z\377" \ + "\10\15#\377\205\7\13\33\377\1\15\26""6\377\304\31*e\377\202\30)d\377" \ + "\1\31*d\377\202\31*e\377\1\33,f\377\203\36.h\377\1\35-g\377\203\36.h" \ + "\377\1\35-g\377\202\36.h\377\202\35-g\377\2\33,f\377\31*e\377\202\30" \ + ")d\377\377\31*e\377\377\31*e\377\265\31*e\377\3\21\34E\377\7\13\32\377" \ + "\7\12\33\377\244\7\13\33\377\244\31*e\377\1\25#U\377\206\7\13\33\377" \ + "\1\16\27""8\377\302\31*e\377\202\30)d\377\4\31*e\377\32*e\377\33,f\377" \ + "\34-g\377\212\36.h\377\3\35-g\377\34,g\377\32+e\377\203\30)d\377\377" \ + "\31*e\377\377\31*e\377\267\31*e\377\3\20\33C\377\7\13\33\377\6\12\32" \ + "\377\243\7\13\33\377\1\7\12\33\377\244\31*e\377\3\26%Y\377\10\15!\377" \ + "\6\12\32\377\204\7\13\33\377\1\14\24""0\377\277\31*e\377\203\30)d\377" \ + "\4\32+e\377\33,f\377\34-g\377\35-g\377\202\36.h\377\2\36-g\377\35.h\377" \ + "\203\36.h\377\1\35-g\377\202\36.h\377\2\34,g\377\33+f\377\202\31*e\377" \ + "\202\30)d\377\377\31*e\377\377\31*e\377\271\31*e\377\2\17\32\77\377\6" \ + "\12\32\377\244\7\13\33\377\1\7\12\33\377\244\31*e\377\3\27'_\377\12\22" \ + "-\377\7\12\32\377\204\7\13\33\377\1\12\22.\377\275\31*e\377\202\30)d" \ + "\377\2\31*e\377\33,f\377\203\35-g\377\202\36.h\377\1\36-g\377\207\36" \ + ".h\377\3\34,f\377\32+e\377\31*e\377\203\30)d\377\377\31*e\377\377\31" \ + "*e\377\273\31*e\377\2\20\32@\377\6\12\33\377\244\7\13\33\377\1\6\13\33" \ + "\377\227\31*e\377\1\30)b\377\214\27'^\377\2\27'_\377\15\27""8\377\204" \ + "\7\13\33\377\2\6\12\32\377\13\22-\377\270\31*e\377\203\30)d\377\202\31" \ + "*e\377\2\32*e\377\34-g\377\203\36.h\377\1\35-g\377\203\36.h\377\1\35" \ + "-g\377\202\36.h\377\203\35-g\377\4\32+f\377\30)e\377\30)d\377\30)e\377" \ + "\377\31*e\377\377\31*e\377\277\31*e\377\2\20\32@\377\6\12\33\377\244" \ + "\7\13\33\377\1\6\13\33\377\227\31*e\377\2\23\40O\377\12\20)\377\212\13" \ + "\22+\377\4\13\21+\377\13\22,\377\10\16\"\377\6\12\32\377\204\7\13\33" \ + "\377\1\12\17'\377\266\31*e\377\202\30)d\377\202\31*e\377\3\32+f\377\33" \ + ",f\377\35.g\377\202\36.h\377\1\35-g\377\203\36.h\377\1\35-g\377\203\36" \ + ".h\377\4\35-g\377\34-g\377\33,f\377\32*e\377\203\30)d\377\377\31*e\377" \ + "\377\31*e\377\301\31*e\377\2\17\32@\377\6\12\33\377\244\7\13\33\377\1" \ + "\7\12\33\377\227\31*e\377\2\21\35G\377\7\13\32\377\213\7\12\33\377\206" \ + "\7\13\33\377\2\6\12\32\377\11\17$\377\263\31*e\377\203\30)d\377\4\32" \ + "+e\377\33,f\377\34-g\377\35-g\377\203\36.h\377\1\35-g\377\204\36.h\377" \ + "\7\35-g\377\36.h\377\36-g\377\35-f\377\33,f\377\32*e\377\31*e\377\202" \ + "\30)d\377\377\31*e\377\377\31*e\377\304\31*e\377\2\17\32\77\377\6\13" \ + "\33\377\244\7\13\33\377\1\7\12\33\377\227\31*e\377\2\22\37L\377\7\13" \ + "\32\377\221\7\13\33\377\2\7\13\32\377\11\17%\377\260\31*e\377\203\30" \ + ")d\377\2\31*d\377\33,f\377\203\35-g\377\207\36.h\377\1\35-g\377\203\36" \ + ".h\377\1\33+f\377\202\31*e\377\1\31*d\377\202\30)d\377\1\30*e\377\377" \ + "\31*e\377\377\31*e\377\305\31*e\377\2\20\32@\377\6\12\33\377\244\7\13" \ + "\33\377\1\6\13\33\377\227\31*e\377\1\24\"R\377\224\7\13\33\377\253\31" \ + "*e\377\203\30)d\377\203\31*e\377\3\33+f\377\35.h\377\36.h\377\202\36" \ + ".g\377\1\35-h\377\207\36.h\377\202\35-g\377\2\34,g\377\32+f\377\203\30" \ + ")d\377\377\31*e\377\377\31*e\377\312\31*e\377\2\20\32@\377\6\12\33\377" \ + "\244\7\13\33\377\1\6\13\33\377\227\31*e\377\1\24!Q\377\223\7\13\33\377" \ + "\1\7\13\34\377\250\31*e\377\203\30)d\377\6\31*d\377\31*e\377\32+f\377" \ + "\33,f\377\35-g\377\35.h\377\202\36.h\377\1\35-g\377\203\36.h\377\2\35" \ + "-h\377\36.g\377\203\36.h\377\4\35-g\377\34,g\377\32+f\377\31*e\377\203" \ + "\30)d\377\377\31*e\377\377\31*e\377\314\31*e\377\2\17\32@\377\6\12\33" \ + "\377\244\7\13\33\377\1\7\12\33\377\227\31*e\377\2\26%Y\377\7\13\32\377" \ + "\222\7\13\33\377\1\6\13\34\377\245\31*e\377\1\30)e\377\202\30)d\377\5" \ + "\30)e\377\32+f\377\33,f\377\34-g\377\35-g\377\203\36.h\377\2\36-g\377" \ + "\35.h\377\203\36.h\377\1\35-g\377\202\36.h\377\5\36-h\377\35-g\377\33" \ + ",f\377\32+e\377\31*e\377\203\30)d\377\377\31*e\377\377\31*e\377\317\31" \ + "*e\377\2\17\32\77\377\6\13\33\377\244\7\13\33\377\1\7\12\33\377\227\31" \ + "*e\377\1\26%[\377\223\7\13\33\377\1\6\13\34\377\243\31*e\377\202\30)" \ + "d\377\3\31*d\377\32+f\377\34,g\377\202\35-g\377\1\35.h\377\202\36.h\377" \ + "\2\36.g\377\35-h\377\207\36.h\377\2\35-g\377\33,e\377\203\31*e\377\203" \ + "\30)d\377\377\31*e\377\377\31*e\377\321\31*e\377\2\20\32@\377\6\12\33" \ + "\377\244\7\13\33\377\2\7\13\32\377\30(a\377\226\31*e\377\1\26&\\\377" \ + "\223\7\13\33\377\1\7\13\34\377\234\31*e\377\204\30)d\377\203\31*e\377" \ + "\2\33,f\377\34-g\377\202\36.h\377\2\36.g\377\35-h\377\204\36.h\377\1" \ + "\35-g\377\203\36.h\377\203\35-g\377\2\33,f\377\31*e\377\202\30)d\377" \ + "\1\30)e\377\377\31*e\377\377\31*e\377\243\31*e\377\6\30)b\377\27'^\377" \ + "\26%Y\377\25$W\377\24\"S\377\23\40O\377\202\22\36J\377\6\23!P\377\24" \ + "#T\377\25$W\377\26%Y\377\27'^\377\30)d\377\245\31*e\377\2\20\32@\377" \ + "\6\12\33\377\245\7\13\33\377\1\30(b\377\226\31*e\377\1\30(b\377\224\7" \ + "\13\33\377\231\31*e\377\203\30)d\377\2\30)e\377\31*e\377\202\32+f\377" \ + "\3\34,g\377\35.h\377\36/h\377\202\36.h\377\2\36-g\377\35-g\377\207\36" \ + ".h\377\202\35-g\377\3\34,g\377\33,f\377\32*e\377\203\30)d\377\1\30*e" \ + "\377\377\31*e\377\377\31*e\377\236\31*e\377\32\23\40M\377\22\36J\377" \ + "\20\33B\377\16\30;\377\15\25""3\377\13\22.\377\13\21,\377\11\21*\377" \ + "\12\20'\377\10\17%\377\10\16#\377\10\15!\377\7\13\37\377\7\12\33\377" \ + "\7\13\33\377\7\14\37\377\7\15!\377\11\16#\377\11\17$\377\11\17(\377\12" \ + "\21*\377\12\22,\377\13\22.\377\15\25""4\377\16\30<\377\25#V\377\240\31" \ + "*e\377\2\20\32\77\377\6\12\33\377\244\7\13\33\377\2\6\13\33\377\30(b" \ + "\377\226\31*e\377\1\30)d\377\224\7\13\33\377\1\30(b\377\225\31*e\377" \ + "\203\30)d\377\6\31*e\377\32+f\377\33,g\377\34,g\377\35-g\377\35.h\377" \ + "\203\36.h\377\1\36-g\377\204\36.h\377\1\35-g\377\204\36.h\377\5\34-g" \ + "\377\33+f\377\32+e\377\31*e\377\30*e\377\202\30)d\377\215\31*e\377\2" \ + "\27'^\377\22\36J\377\205\22\37L\377\1\23\37L\377\377\31*e\377\377\31" \ + "*e\377\215\31*e\377\2\6\12\35\377\7\13\34\377\202\7\12\33\377\3\6\12" \ + "\32\377\6\12\33\377\7\13\32\377\202\6\13\32\377\16\7\13\33\377\6\13\33" \ + "\377\6\13\32\377\7\13\33\377\7\12\33\377\6\12\32\377\7\13\33\377\6\12" \ + "\32\377\7\12\32\377\7\13\33\377\6\13\33\377\7\13\33\377\7\12\33\377\6" \ + "\13\32\377\202\7\13\33\377\2\11\21*\377\30)c\377\237\31*e\377\2\17\32" \ + "\77\377\6\13\33\377\244\7\13\33\377\2\6\12\32\377\30(b\377\226\31*e\377" \ + "\1\30)d\377\224\7\13\33\377\1\30(b\377\221\31*e\377\204\30)d\377\2\32" \ + "+e\377\33,f\377\202\35-h\377\2\35-g\377\35.h\377\203\36.h\377\1\35.h" \ + "\377\205\36.h\377\1\35-g\377\202\36.h\377\3\35-g\377\34,g\377\32+f\377" \ + "\202\31*e\377\1\31*d\377\203\30)d\377\217\31*e\377\2\24\"S\377\7\12\33" \ + "\377\205\7\13\34\377\1\7\14\36\377\377\31*e\377\320\31*e\377\2\20\33" \ + "B\377\7\13\32\377\216\7\13\35\377\2\7\14\35\377\6\13\35\377\207\7\13" \ + "\35\377\6\7\13\34\377\10\17&\377\16\27""8\377\20\33D\377\25#U\377\30" \ + ")d\377\235\31*e\377\1\6\12\33\377\231\7\13\33\377\1\21\34E\377\237\31" \ + "*e\377\2\20\32@\377\6\12\33\377\245\7\13\33\377\1\30(a\377\226\31*e\377" \ + "\1\30)d\377\223\7\13\33\377\2\6\12\32\377\26&\\\377\212\31*e\377\204" \ + "\30)d\377\203\31*e\377\4\32+f\377\33,f\377\34-g\377\36/h\377\202\36." \ + "h\377\2\36-g\377\35.g\377\211\36.h\377\203\35-g\377\3\33,f\377\32*e\377" \ + "\31)d\377\202\30)d\377\225\31*e\377\1\24\"R\377\206\7\13\33\377\1\7\13" \ + "\35\377\377\31*e\377\317\31*e\377\2\23\40M\377\7\13\32\377\217\7\13\33" \ + "\377\3\6\13\33\377\7\13\33\377\6\13\32\377\206\7\13\33\377\13\6\13\33" \ + "\377\7\13\33\377\6\12\32\377\7\13\33\377\6\12\33\377\7\13\33\377\7\14" \ + "!\377\14\24""2\377\17\31>\377\23!Q\377\26%[\377\230\31*e\377\1\6\12\33" \ + "\377\231\7\13\33\377\1\17\31>\377\237\31*e\377\2\20\32@\377\6\12\33\377" \ + "\245\7\13\33\377\1\26&\\\377\226\31*e\377\2\30)d\377\7\12\33\377\223" \ + "\7\13\33\377\2\23\40N\377\25$X\377\205\25$W\377\204\24#V\377\202\25$" \ + "W\377\4\26%W\377\26%X\377\27%X\377\30&X\377\203\31'Y\377\3\36.h\377\36" \ + "-g\377\35-g\377\204\36.h\377\1\35-g\377\204\36.h\377\5\35-g\377\34-g" \ + "\377\34,f\377\33+f\377\31*e\377\203\30)d\377\1\30*e\377\227\31*e\377" \ + "\1\24\"R\377\206\7\13\33\377\1\7\13\35\377\377\31*e\377\317\31*e\377" \ + "\1\21\34D\377\235\7\13\33\377\1\6\12\33\377\203\7\13\33\377\3\6\13\33" \ + "\377\7\13\33\377\6\13\32\377\203\30)d\377\225\31*e\377\1\6\12\33\377" \ + "\231\7\13\33\377\1\17\31>\377\237\31*e\377\2\20\32\77\377\6\12\33\377" \ + "\244\7\13\33\377\2\6\12\32\377\26%Z\377\226\31*e\377\3\30)d\377\7\13" \ + "\33\377\6\13\33\377\222\7\13\33\377\3\10\16\"\377\10\16#\377\11\15#\377" \ + "\204\11\15\"\377\1\11\15#\377\213\11\16#\377\1\12\17%\377\204\36.h\377" \ + "\1\35-g\377\203\36.h\377\6\36.g\377\35-g\377\33,f\377\32+e\377\32*e\377" \ + "\31*e\377\204\30)d\377\232\31*e\377\1\24\"R\377\206\7\13\33\377\1\6\12" \ + "\34\377\377\31*e\377\317\31*e\377\2\21\34E\377\6\12\33\377\242\7\13\33" \ + "\377\4\7\12\33\377\33,g\377\32+f\377\31*e\377\205\30)d\377\220\31*e\377" \ + "\1\6\12\33\377\231\7\13\33\377\1\17\31>\377\237\31*e\377\2\17\32\77\377" \ + "\6\13\33\377\244\7\13\33\377\2\6\12\33\377\26%Z\377\226\31*e\377\3\30" \ + ")d\377\6\13\35\377\6\13\32\377\221\7\13\33\377\2\7\12\33\377\6\13\33" \ + "\377\222\7\13\33\377\3\7\13\34\377\36.h\377\35-g\377\203\36.h\377\3\35" \ + "-g\377\33,g\377\32+e\377\203\31*e\377\204\30)d\377\235\31*e\377\1\24" \ + "\"R\377\206\7\13\33\377\3\6\12\34\377\21\34D\377\25$W\377\210\31*e\377" \ + "\4\17\32\77\377\16\27""9\377\17\31>\377\20\33C\377\212\20\33B\377\205" \ + "\22\37K\377\2\23\40N\377\24\"T\377\203\25#U\377\2\24\"T\377\25$X\377" \ + "\205\27'^\377\1\30)c\377\377\31*e\377\245\31*e\377\2\21\34E\377\6\13" \ + "\33\377\243\7\13\33\377\203\36.h\377\202\35.h\377\2\33,f\377\32+f\377" \ + "\205\31*e\377\205\30)d\377\207\31*e\377\1\6\12\33\377\231\7\13\33\377" \ + "\1\17\32>\377\237\31*e\377\1\16\30;\377\245\7\13\33\377\2\7\13\32\377" \ + "\26%Z\377\226\31*e\377\2\30)d\377\6\14\35\377\246\7\13\33\377\1\7\13" \ + "\34\377\202\35-g\377\3\33,f\377\32+e\377\31*e\377\203\30)d\377\244\31" \ + "*e\377\1\24\"R\377\206\7\13\33\377\3\6\12\33\377\7\14\36\377\24\"R\377" \ + "\206\31*e\377\2\30(a\377\15\25""5\377\202\7\13\33\377\1\6\13\32\377\212" \ + "\7\13\33\377\3\6\12\33\377\7\13\33\377\6\13\33\377\202\7\13\33\377\3" \ + "\7\12\32\377\7\12\33\377\6\13\32\377\212\7\13\33\377\2\11\17$\377\27" \ + "'^\377\377\31*e\377\244\31*e\377\2\21\34E\377\6\12\33\377\243\7\13\33" \ + "\377\202\36.h\377\2\35-g\377\36-g\377\204\36.h\377\6\35.h\377\34-g\377" \ + "\34,f\377\33,g\377\32+e\377\32+f\377\203\31*e\377\206\30)d\377\2\31*" \ + "e\377\6\12\33\377\231\7\13\33\377\1\17\32>\377\203\31*e\377\203\30)d" \ + "\377\1\30(b\377\203\27(`\377\1\27'^\377\203\26&\\\377\1\26%Y\377\203" \ + "\25$W\377\1\25$X\377\203\25$W\377\3\25#U\377\24\"R\377\30(a\377\203\31" \ + "*e\377\1\26%Z\377\202\25$W\377\2\14\26""5\377\6\12\32\377\245\7\13\33" \ + "\377\1\25#U\377\226\31*e\377\2\30)d\377\7\15!\377\246\7\13\33\377\2\7" \ + "\13\34\377\31*e\377\204\30)d\377\247\31*e\377\1\24\"R\377\207\7\13\33" \ + "\377\2\11\17&\377\27'_\377\205\31*e\377\3\30(b\377\14\26""5\377\6\13" \ + "\32\377\236\7\13\33\377\3\7\13\32\377\11\20&\377\27'^\377\377\31*e\377" \ + "\244\31*e\377\2\21\34E\377\6\12\33\377\243\7\13\33\377\206\36.h\377\2" \ + "\36-g\377\35-g\377\205\36.h\377\11\35.h\377\35-g\377\30%V\377\24\40K" \ + "\377\23\37I\377\25\"Q\377\30'^\377\31+f\377\31*e\377\202\30)d\377\1\6" \ + "\12\33\377\231\7\13\33\377\1\17\31>\377\202\31*e\377\2\17\31\77\377\13" \ + "\21,\377\202\12\22-\377\14\13\22,\377\12\21)\377\12\20*\377\12\20)\377" \ + "\11\20(\377\12\20'\377\12\20&\377\11\17'\377\11\17%\377\10\16#\377\11" \ + "\17$\377\10\17#\377\203\11\17$\377\4\10\16$\377\10\15#\377\7\13\35\377" \ + "\25$W\377\203\31*e\377\4\14\23""1\377\11\17$\377\11\17#\377\7\13\37\377" \ + "\246\7\13\33\377\1\24\"R\377\224\31*e\377\202\30)d\377\2\27(c\377\11" \ + "\16%\377\246\7\13\33\377\1\7\13\34\377\202\30)d\377\252\31*e\377\1\24" \ + "\"R\377\207\7\13\33\377\1\13\24""2\377\205\31*e\377\4\30(a\377\13\22" \ + "-\377\7\13\33\377\6\13\32\377\236\7\13\33\377\3\7\13\32\377\11\17#\377" \ + "\27&]\377\377\31*e\377\244\31*e\377\2\21\34E\377\6\12\33\377\243\7\13" \ + "\33\377\203\36.h\377\1\36-g\377\207\36.h\377\5\26!M\377\17\30:\377\11" \ + "\20%\377\10\14\36\377\7\13\35\377\202\7\12\33\377\7\7\13\35\377\6\13" \ + "\35\377\7\14\37\377\12\17&\377\17\30""8\377\23\37H\377\7\12\33\377\231" \ + "\7\13\33\377\1\17\31>\377\202\31*e\377\2\13\22-\377\6\12\32\377\202\7" \ + "\13\33\377\6\6\12\32\377\6\12\33\377\7\13\33\377\6\13\33\377\7\12\32" \ + "\377\6\13\33\377\202\7\13\33\377\5\6\13\32\377\6\12\33\377\7\13\33\377" \ + "\6\12\33\377\6\13\33\377\202\7\13\33\377\4\7\12\33\377\7\13\33\377\6" \ + "\12\32\377\25#U\377\203\31*e\377\3\12\20)\377\7\12\33\377\7\13\32\377" \ + "\246\7\13\33\377\2\6\13\33\377\24!R\377\216\31*e\377\206\30)d\377\203" \ + "\31*e\377\1\10\16$\377\246\7\13\33\377\1\7\13\34\377\254\31*e\377\1\24" \ + "!R\377\206\7\13\33\377\2\6\13\32\377\21\35G\377\204\31*e\377\5\27&]\377" \ + "\12\20(\377\6\13\33\377\6\12\32\377\6\13\32\377\236\7\13\33\377\3\6\13" \ + "\33\377\7\15!\377\27&]\377\377\31*e\377\244\31*e\377\2\21\34E\377\6\13" \ + "\33\377\243\7\13\33\377\3\31*e\377\33,f\377\34-g\377\204\35-g\377\204" \ + "\36.h\377\1\12\21*\377\210\7\13\33\377\1\7\13\32\377\203\7\13\33\377" \ + "\1\6\13\32\377\231\7\13\33\377\5\16\31>\377\30)d\377\31*e\377\13\23." \ + "\377\6\12\32\377\224\7\13\33\377\1\25#U\377\203\31*e\377\1\11\20)\377" \ + "\251\7\13\33\377\1\23!P\377\206\30)d\377\210\31*e\377\12\32+f\377\33" \ + "+f\377\34,g\377\34-h\377\35.h\377\36.h\377\36/i\377\36.h\377\35-g\377" \ + "\14\22,\377\246\7\13\33\377\1\7\13\34\377\254\31*e\377\2\26%[\377\11" \ + "\17&\377\205\7\13\33\377\2\6\13\34\377\26&\\\377\203\31*e\377\4\27(`" \ + "\377\13\23.\377\7\13\33\377\6\13\33\377\241\7\13\33\377\2\7\15\40\377" \ + "\26&]\377\377\31*e\377\244\31*e\377\2\21\34E\377\6\12\33\377\243\7\13" \ + "\33\377\204\30)d\377\4\31*e\377\32+e\377\33+f\377\34,f\377\202\34-g\377" \ + "\2\35-g\377\13\22,\377\246\7\13\33\377\5\17\32>\377\31*e\377\30)d\377" \ + "\13\22.\377\6\12\32\377\224\7\13\33\377\1\25#U\377\203\31*e\377\1\11" \ + "\20)\377\251\7\13\33\377\1\22\36K\377\202\31*e\377\204\32+f\377\6\33" \ + ",g\377\33,f\377\34,g\377\34-g\377\35-h\377\35.h\377\206\36.h\377\2\36" \ + "-h\377\35-g\377\202\36-g\377\2\35-g\377\13\22-\377\246\7\13\33\377\1" \ + "\7\13\34\377\255\31*e\377\2\17\31>\377\6\12\32\377\203\7\13\33\377\2" \ + "\6\12\32\377\10\15\40\377\204\31*e\377\3\26%Y\377\10\16\"\377\6\12\32" \ + "\377\241\7\13\33\377\3\6\13\32\377\6\13\34\377\26&[\377\377\31*e\377" \ + "\244\31*e\377\2\21\34E\377\6\12\33\377\243\7\13\33\377\204\31*e\377\204" \ + "\30)d\377\203\31*e\377\1\12\22+\377\246\7\13\33\377\5\20\33\77\377\34" \ + "-h\377\34-g\377\13\20)\377\7\12\33\377\224\7\13\33\377\1\24\"T\377\203" \ + "\30)d\377\2\11\20)\377\7\12\33\377\250\7\13\33\377\1\25\40K\377\202\35" \ + "-g\377\2\35-h\377\35.h\377\206\36.h\377\4\36.g\377\36-h\377\36.h\377" \ + "\35-g\377\202\36-g\377\206\36.h\377\3\35-g\377\15\24/\377\6\12\33\377" \ + "\245\7\13\33\377\1\7\13\34\377\255\31*e\377\2\23!P\377\10\14\37\377\203" \ + "\7\13\33\377\2\6\13\33\377\7\14\37\377\204\31*e\377\2\25#V\377\7\14\36" \ + "\377\242\7\13\33\377\3\7\12\32\377\6\13\33\377\26&\\\377\377\31*e\377" \ + "\244\31*e\377\2\21\34E\377\6\12\33\377\243\7\13\33\377\210\31*e\377\203" \ + "\30)d\377\1\12\21+\377\246\7\13\33\377\1\21\33\77\377\202\36.h\377\2" \ + "\11\17%\377\6\13\32\377\223\7\13\33\377\3\7\12\32\377\27%W\377\34,g\377" \ + "\202\33,g\377\2\13\21*\377\7\12\33\377\247\7\13\33\377\2\6\13\33\377" \ + "\25!L\377\202\36.h\377\4\36.g\377\36-h\377\36.h\377\35-g\377\202\36-" \ + "g\377\212\36.h\377\2\35.h\377\36-g\377\202\36.h\377\3\35-g\377\17\27" \ + "5\377\6\12\32\377\245\7\13\33\377\1\7\13\34\377\255\31*e\377\2\27'_\377" \ + "\11\16#\377\204\7\13\33\377\1\7\13\35\377\204\31*e\377\3\24\"S\377\6" \ + "\13\32\377\6\12\32\377\241\7\13\33\377\3\7\12\32\377\7\13\33\377\26%" \ + "Z\377\377\31*e\377\244\31*e\377\2\21\34E\377\6\13\33\377\243\7\13\33" \ + "\377\213\31*e\377\1\12\22+\377\246\7\13\33\377\1\21\34@\377\202\36.h" \ + "\377\2\12\17&\377\6\13\32\377\224\7\13\33\377\1\31%W\377\202\36.h\377" \ + "\2\35,e\377\12\21(\377\251\7\13\33\377\1\25!L\377\204\36.h\377\2\35." \ + "h\377\36-h\377\207\36.h\377\1\35-h\377\206\35-g\377\5\34,g\377\33,f\377" \ + "\32*e\377\15\26""5\377\7\13\32\377\245\7\13\33\377\1\7\13\34\377\256" \ + "\31*e\377\1\12\20(\377\204\7\13\33\377\2\7\12\33\377\30(a\377\203\31" \ + "*e\377\1\24!Q\377\245\7\13\33\377\1\26%Z\377\377\31*e\377\244\31*e\377" \ + "\2\21\34E\377\6\12\33\377\243\7\13\33\377\213\31*e\377\1\12\22+\377\246" \ + "\7\13\33\377\5\21\34@\377\36.h\377\36-h\377\12\17&\377\6\12\33\377\223" \ + "\7\13\33\377\5\7\12\33\377\31'Y\377\36.h\377\30%V\377\13\23,\377\252" \ + "\7\13\33\377\1\25!L\377\205\36.h\377\2\35.h\377\35-h\377\203\35-g\377" \ + "\202\34,g\377\1\34,f\377\202\33+f\377\2\32+f\377\32+e\377\202\31*e\377" \ + "\203\30)d\377\3\27(c\377\15\25""4\377\7\13\32\377\245\7\13\33\377\1\7" \ + "\13\34\377\256\31*e\377\1\16\27""9\377\204\7\13\33\377\2\6\13\34\377" \ + "\26%Y\377\203\31*e\377\2\21\36I\377\7\12\33\377\243\7\13\33\377\2\7\12" \ + "\32\377\26%Z\377\377\31*e\377\244\31*e\377\2\21\34E\377\6\12\33\377\243" \ + "\7\13\33\377\213\31*e\377\1\12\22+\377\246\7\13\33\377\5\21\33\77\377" \ + "\35-h\377\35.h\377\10\16!\377\7\12\33\377\223\7\13\33\377\5\7\13\32\377" \ + "\22\34A\377\20\31""9\377\11\16\"\377\7\12\33\377\252\7\13\33\377\1\24" \ + "\40K\377\202\34,f\377\2\33,f\377\33+f\377\202\32+f\377\1\32*e\377\205" \ + "\31*e\377\207\30)d\377\203\31*e\377\3\30)d\377\15\25""5\377\7\13\32\377" \ + "\245\7\13\33\377\1\7\13\34\377\256\31*e\377\2\21\35F\377\6\12\33\377" \ + "\203\7\13\33\377\2\6\13\34\377\24\"R\377\202\31*e\377\2\30)d\377\17\32" \ + "@\377\244\7\13\33\377\2\7\12\33\377\26%Z\377\377\31*e\377\244\31*e\377" \ + "\2\21\34E\377\6\12\33\377\243\7\13\33\377\213\31*e\377\1\12\21+\377\246" \ + "\7\13\33\377\1\17\31>\377\202\31*e\377\2\6\13\34\377\7\12\33\377\223" \ + "\7\13\33\377\5\6\12\32\377\6\13\34\377\6\13\33\377\7\13\33\377\6\13\33" \ + "\377\251\7\13\33\377\2\7\12\32\377\20\33B\377\204\31*e\377\210\30)d\377" \ + "\212\31*e\377\2\30)d\377\14\25""4\377\246\7\13\33\377\1\7\13\34\377\256" \ + "\31*e\377\1\24\"R\377\204\7\13\33\377\2\7\13\34\377\22\37L\377\202\31" \ + "*e\377\3\30)d\377\16\27""8\377\6\13\32\377\243\7\13\33\377\2\6\12\32" \ + "\377\26%Z\377\377\31*e\377\244\31*e\377\2\21\34E\377\6\13\33\377\243" \ + "\7\13\33\377\213\31*e\377\1\13\22,\377\246\7\13\33\377\1\17\32>\377\202" \ + "\31*e\377\1\7\14\35\377\303\7\13\33\377\1\20\33B\377\227\31*e\377\1\17" \ + "\31=\377\246\7\13\33\377\1\7\13\34\377\256\31*e\377\3\27'`\377\7\13\32" \ + "\377\6\13\32\377\202\7\13\33\377\2\7\13\34\377\22\37K\377\202\31*e\377" \ + "\2\30)d\377\14\25""3\377\245\7\13\33\377\1\25#T\377\377\31*e\377\244" \ + "\31*e\377\2\21\34E\377\6\12\33\377\243\7\13\33\377\205\31*e\377\7\30" \ + ")c\377\27'^\377\26%Z\377\25$W\377\24\"R\377\23!P\377\11\16%\377\246\7" \ + "\13\33\377\1\17\32>\377\202\31*e\377\1\7\13\35\377\303\7\13\33\377\1" \ + "\20\32@\377\227\31*e\377\1\17\31<\377\246\7\13\33\377\1\7\13\34\377\234" \ + "\31*e\377\1\25$X\377\221\26%Y\377\1\27'^\377\205\7\13\33\377\1\20\33" \ + "A\377\202\31*e\377\2\30)d\377\15\25""4\377\244\7\13\33\377\3\7\12\32" \ + "\377\22\36I\377\26%[\377\377\31*e\377\243\31*e\377\2\21\34E\377\6\12" \ + "\33\377\243\7\13\33\377\14\24!P\377\22\36I\377\20\32@\377\15\26""7\377" \ + "\15\25""4\377\13\23""0\377\12\21*\377\12\20'\377\11\16$\377\7\13\37\377" \ + "\7\13\33\377\6\12\33\377\246\7\13\33\377\1\17\31>\377\202\31*e\377\1" \ + "\6\12\33\377\302\7\13\33\377\2\7\13\32\377\16\30:\377\227\31*e\377\2" \ + "\20\32@\377\6\12\32\377\245\7\13\33\377\1\7\13\34\377\233\31*e\377\2" \ + "\30)c\377\10\15!\377\221\11\17&\377\2\11\20'\377\6\12\33\377\204\7\13" \ + "\33\377\1\16\30""9\377\202\31*e\377\3\30)d\377\13\23/\377\6\12\33\377" \ + "\244\7\13\33\377\4\11\16#\377\11\17'\377\16\30:\377\27'`\377\377\31*" \ + "e\377\241\31*e\377\2\21\34E\377\6\12\33\377\243\7\13\33\377\11\7\13\36" \ + "\377\7\13\35\377\7\13\34\377\7\13\32\377\6\13\33\377\6\13\32\377\7\12" \ + "\33\377\7\13\33\377\7\12\32\377\202\7\13\33\377\1\7\12\33\377\246\7\13" \ + "\33\377\1\17\31>\377\202\31*e\377\2\6\13\32\377\7\12\33\377\301\7\13" \ + "\33\377\2\6\12\32\377\16\30:\377\227\31*e\377\1\21\34D\377\246\7\13\33" \ + "\377\1\7\13\34\377\233\31*e\377\2\30)c\377\7\13\33\377\221\6\13\33\377" \ + "\202\7\13\33\377\1\6\13\33\377\202\7\13\33\377\2\7\13\32\377\14\24""3" \ + "\377\202\31*e\377\2\30)c\377\13\21,\377\244\7\13\33\377\1\6\12\33\377" \ + "\202\7\13\33\377\3\7\13\32\377\11\17&\377\26%Y\377\377\31*e\377\240\31" \ + "*e\377\2\21\34E\377\6\13\33\377\325\7\13\33\377\1\17\32>\377\202\31*" \ + "e\377\304\7\13\33\377\1\13\24""2\377\227\31*e\377\1\20\34D\377\246\7" \ + "\13\33\377\1\7\13\34\377\233\31*e\377\1\30)c\377\227\7\13\33\377\2\6" \ + "\13\32\377\12\22,\377\202\31*e\377\2\30)c\377\10\17%\377\252\7\13\33" \ + "\377\4\24!Q\377\30)c\377\30)b\377\30(b\377\377\31*e\377\234\31*e\377" \ + "\2\21\34E\377\6\12\33\377\325\7\13\33\377\1\17\32>\377\202\31*e\377\304" \ + "\7\13\33\377\1\14\24""2\377\227\31*e\377\2\22\37J\377\6\13\32\377\245" \ + "\7\13\33\377\4\7\13\34\377\26%[\377\26&\\\377\30(b\377\230\31*e\377\1" \ + "\26&[\377\230\7\13\33\377\1\13\22,\377\202\31*e\377\2\30)c\377\11\17" \ + "$\377\253\7\13\33\377\3\13\22/\377\14\24""1\377\13\23.\377\377\31*e\377" \ + "\234\31*e\377\2\21\34E\377\6\12\33\377\325\7\13\33\377\1\17\31>\377\202" \ + "\31*e\377\1\7\13\32\377\302\7\13\33\377\2\7\13\32\377\13\22-\377\227" \ + "\31*e\377\2\23\37L\377\7\12\32\377\245\7\13\33\377\7\6\13\32\377\10\15" \ + "#\377\12\20(\377\13\22.\377\15\26""7\377\21\34E\377\26%Z\377\223\31*" \ + "e\377\3\30)b\377\20\33B\377\12\20)\377\230\7\13\33\377\6\12\21)\377\30" \ + "(b\377\31*e\377\30)c\377\10\14\37\377\7\13\32\377\250\7\13\33\377\3\6" \ + "\12\33\377\7\13\33\377\6\12\32\377\202\7\13\33\377\377\31*e\377\234\31" \ + "*e\377\2\21\34E\377\6\12\33\377\325\7\13\33\377\1\17\31>\377\202\31*" \ + "e\377\303\7\13\33\377\2\6\12\33\377\12\21*\377\227\31*e\377\1\23\40O" \ + "\377\247\7\13\33\377\1\7\13\32\377\203\7\13\33\377\4\7\13\35\377\10\13" \ + "\37\377\13\22,\377\26%Z\377\206\31*e\377\205\27(`\377\3\27'`\377\27'" \ + "_\377\25$X\377\202\25$W\377\2\22\36J\377\10\16$\377\231\7\13\33\377\7" \ + "\6\13\32\377\11\20&\377\27&]\377\31*e\377\30)c\377\7\13\35\377\6\12\32" \ + "\377\255\7\13\33\377\377\31*e\377\234\31*e\377\2\21\34E\377\6\13\33\377" \ + "\325\7\13\33\377\1\17\32>\377\202\31*e\377\304\7\13\33\377\1\12\20*\377" \ + "\227\31*e\377\1\24#T\377\255\7\13\33\377\3\6\13\33\377\7\13\33\377\21" \ + "\35F\377\204\31*e\377\1\16\30<\377\205\6\13\32\377\206\7\13\33\377\1" \ + "\7\12\33\377\231\7\13\33\377\6\6\13\33\377\10\16$\377\26%Y\377\31*e\377" \ + "\30)c\377\7\12\34\377\256\7\13\33\377\1\31*e\377\204\30)b\377\202\30" \ + ")c\377\1\30)d\377\377\31*e\377\224\31*e\377\2\21\34E\377\6\12\33\377" \ + "\325\7\13\33\377\3\17\32>\377\31*e\377\30)c\377\304\7\13\33\377\1\12" \ + "\20*\377\227\31*e\377\1\24\"T\377\257\7\13\33\377\2\10\16\"\377\26%Y" \ + "\377\202\31*e\377\2\30(a\377\14\24""0\377\246\7\13\33\377\5\11\15#\377" \ + "\25$V\377\31*e\377\30)c\377\6\13\32\377\256\7\13\33\377\205\14\24""1" \ + "\377\7\14\25""3\377\16\27""8\377\20\33A\377\22\37K\377\23!Q\377\25$W" \ + "\377\27&\\\377\377\31*e\377\220\31*e\377\2\21\34E\377\6\13\33\377\325" \ + "\7\13\33\377\3\17\31>\377\31*e\377\27&]\377\303\7\13\33\377\2\7\12\33" \ + "\377\11\21)\377\227\31*e\377\1\24\"T\377\256\7\13\33\377\3\7\13\32\377" \ + "\10\13\37\377\23\40N\377\202\31*e\377\3\26%Z\377\10\16#\377\6\12\32\377" \ + "\244\7\13\33\377\6\7\12\33\377\10\15!\377\24\"S\377\31*e\377\30)c\377" \ + "\6\12\32\377\266\7\13\33\377\5\6\12\32\377\7\13\32\377\10\16\"\377\12" \ + "\20'\377\27'^\377\366\31*e\377\1\23\40O\377\227\31*e\377\1\22\37L\377" \ + "\326\7\13\33\377\3\17\31>\377\31*e\377\26&\\\377\303\7\13\33\377\2\7" \ + "\12\32\377\12\20(\377\227\31*e\377\1\24\"T\377\202\7\12\32\377\254\7" \ + "\13\33\377\3\7\13\32\377\6\12\32\377\21\33D\377\202\31*e\377\1\24\"S" \ + "\377\202\6\12\32\377\245\7\13\33\377\5\7\14\36\377\23\40N\377\31*e\377" \ + "\30)c\377\6\12\33\377\271\7\13\33\377\2\6\12\33\377\12\22-\377\365\31" \ + "*e\377\2\27'^\377\10\15\37\377\227\31*e\377\2\23\40N\377\7\13\32\377" \ + "\325\7\13\33\377\4\17\32>\377\31*e\377\26&\\\377\6\12\33\377\303\7\13" \ + "\33\377\2\12\20(\377\30)d\377\226\31*e\377\1\25#V\377\260\7\13\33\377" \ + "\5\15\27""7\377\30)b\377\30)d\377\17\32\77\377\6\12\32\377\245\7\13\33" \ + "\377\6\7\12\33\377\7\13\34\377\22\36I\377\31*e\377\30)c\377\6\12\32\377" \ + "\273\7\13\33\377\1\22\36H\377\212\31*e\377\25\30)d\377\30)c\377\30(b" \ + "\377\30(a\377\27'`\377\25\"T\377\22\36J\377\17\32>\377\17\31=\377\15" \ + "\26""5\377\12\22-\377\10\16\"\377\12\20'\377\13\23/\377\16\30:\377\17" \ + "\31=\377\21\34D\377\23\40M\377\25#V\377\27(`\377\30(a\377\202\30(b\377" \ + "\1\30)b\377\202\30)c\377\317\31*e\377\3\30)b\377\14\24""2\377\6\12\33" \ + "\377\227\31*e\377\1\23\40N\377\326\7\13\33\377\3\17\32>\377\31*e\377" \ + "\26%Y\377\303\7\13\33\377\3\6\13\33\377\11\17&\377\27(`\377\226\31*e" \ + "\377\3\25$V\377\7\13\33\377\6\12\33\377\255\7\13\33\377\5\7\13\32\377" \ + "\12\21*\377\27'_\377\30)d\377\12\21+\377\247\7\13\33\377\5\6\12\33\377" \ + "\21\35F\377\31*e\377\30)c\377\6\12\32\377\272\7\13\33\377\3\7\12\32\377" \ + "\12\20(\377\30(a\377\210\31*e\377\10\27'`\377\20\32@\377\13\23""0\377" \ + "\11\16#\377\7\13\33\377\6\13\33\377\7\13\33\377\6\13\32\377\203\7\13" \ + "\33\377\3\6\13\33\377\7\13\33\377\7\12\33\377\206\7\13\33\377\7\6\13" \ + "\32\377\7\13\33\377\7\13\35\377\11\17$\377\12\21+\377\14\24""2\377\20" \ + "\33A\377\317\31*e\377\1\23\40N\377\202\7\13\33\377\227\31*e\377\1\23" \ + "\40N\377\326\7\13\33\377\3\17\31>\377\31*e\377\24\"S\377\304\7\13\33" \ + "\377\2\11\17%\377\27'_\377\226\31*e\377\3\25$X\377\7\14\35\377\6\12\32" \ + "\377\256\7\13\33\377\4\7\14\35\377\26%Z\377\30)d\377\7\13\32\377\250" \ + "\7\13\33\377\4\20\34D\377\31*e\377\30)c\377\6\12\32\377\272\7\13\33\377" \ + "\3\6\13\32\377\10\16#\377\25$X\377\210\31*e\377\4\20\34C\377\7\12\33" \ + "\377\7\13\33\377\7\13\32\377\220\7\13\33\377\1\6\13\33\377\202\7\12\33" \ + "\377\203\7\13\33\377\1\13\23/\377\316\31*e\377\4\30)d\377\21\35F\377" \ + "\6\12\32\377\7\13\33\377\227\31*e\377\2\23\40N\377\7\13\32\377\325\7" \ + "\13\33\377\4\17\31>\377\31*e\377\24\"S\377\6\12\33\377\302\7\13\33\377" \ + "\3\6\12\32\377\11\17%\377\26&\\\377\226\31*e\377\3\26%Y\377\10\15\40" \ + "\377\6\13\32\377\255\7\13\33\377\5\6\13\33\377\6\12\32\377\25$X\377\27" \ + "'^\377\6\12\33\377\250\7\13\33\377\4\17\32\77\377\31*e\377\30)c\377\6" \ + "\12\33\377\272\7\13\33\377\3\6\12\32\377\10\16\"\377\25#U\377\210\31" \ + "*e\377\2\17\31>\377\7\12\33\377\230\7\13\33\377\1\13\23""0\377\316\31" \ + "*e\377\4\30)d\377\21\34F\377\7\12\32\377\7\13\33\377\227\31*e\377\2\23" \ + "\40N\377\6\12\32\377\325\7\13\33\377\3\17\32>\377\31*e\377\24\"S\377" \ + "\304\7\13\33\377\2\10\16#\377\26%Z\377\226\31*e\377\2\26%Z\377\10\16" \ + "#\377\256\7\13\33\377\2\6\13\33\377\7\12\32\377\202\26%Z\377\251\7\13" \ + "\33\377\1\16\27""8\377\202\30)c\377\1\6\12\32\377\272\7\13\33\377\3\6" \ + "\12\32\377\10\14\36\377\23!P\377\210\31*e\377\2\17\31>\377\7\13\32\377" \ + "\230\7\13\33\377\1\13\23""0\377\225\31*e\377\205\30)c\377\204\30)d\377" \ + "\260\31*e\377\4\30)d\377\21\35F\377\7\13\33\377\6\12\32\377\227\31*e" \ + "\377\1\23\40N\377\326\7\13\33\377\3\17\32>\377\31*e\377\23\40O\377\304" \ + "\7\13\33\377\2\10\16\"\377\25$X\377\226\31*e\377\2\26&[\377\11\17$\377" \ + "\257\7\13\33\377\3\7\14\36\377\26%[\377\26%Z\377\250\7\13\33\377\5\6" \ + "\12\32\377\14\23/\377\30(a\377\30)c\377\6\12\32\377\272\7\13\33\377\3" \ + "\6\13\33\377\7\13\33\377\22\36J\377\210\31*e\377\2\17\31>\377\7\13\32" \ + "\377\230\7\13\33\377\1\13\23""0\377\225\31*e\377\13\14\24""2\377\13\22" \ + ",\377\15\25""3\377\14\24""3\377\14\25""3\377\16\30""9\377\17\30<\377" \ + "\17\33A\377\21\35E\377\22\36J\377\26&]\377\256\31*e\377\4\30)d\377\21" \ + "\34E\377\6\12\33\377\6\13\32\377\227\31*e\377\1\23\40N\377\326\7\13\33" \ + "\377\3\17\31>\377\31*e\377\22\36I\377\304\7\13\33\377\3\7\12\33\377\14" \ + "\23""0\377\25#U\377\225\31*e\377\3\26&\\\377\12\20'\377\7\12\32\377\256" \ + "\7\13\33\377\3\11\16$\377\27&]\377\26%Z\377\252\7\13\33\377\3\21\34E" \ + "\377\30)d\377\7\12\33\377\274\7\13\33\377\1\21\35F\377\210\31*e\377\1" \ + "\17\32>\377\231\7\13\33\377\1\13\23""0\377\225\31*e\377\5\10\15\"\377" \ + "\7\13\33\377\6\13\33\377\6\12\33\377\6\13\32\377\205\7\13\33\377\1\22" \ + "\37L\377\256\31*e\377\5\30)d\377\20\32@\377\6\12\32\377\7\13\33\377\27" \ + "'^\377\226\31*e\377\2\23\40N\377\7\13\32\377\325\7\13\33\377\4\17\31" \ + ">\377\31*e\377\21\36I\377\6\13\33\377\302\7\13\33\377\1\6\13\32\377\202" \ + "\7\13\33\377\3\7\14\37\377\16\27""8\377\30)b\377\223\31*e\377\3\27&]" \ + "\377\11\20)\377\6\13\32\377\256\7\13\33\377\4\13\22+\377\27'_\377\26" \ + "%Z\377\6\13\32\377\247\7\13\33\377\203\6\13\32\377\2\27&]\377\7\12\33" \ + "\377\273\7\13\33\377\2\6\12\32\377\20\33A\377\210\31*e\377\1\16\30;\377" \ + "\231\7\13\33\377\1\13\23""0\377\225\31*e\377\1\11\16#\377\210\7\13\33" \ + "\377\2\6\13\35\377\23\37M\377\256\31*e\377\5\30)d\377\17\31>\377\6\12" \ + "\32\377\7\13\33\377\27'_\377\226\31*e\377\2\23\40N\377\6\12\32\377\325" \ + "\7\13\33\377\3\17\32>\377\31*e\377\22\36I\377\306\7\13\33\377\5\7\13" \ + "\32\377\7\13\33\377\10\15!\377\23\40N\377\30)d\377\221\31*e\377\2\27" \ + "']\377\12\21*\377\257\7\13\33\377\3\12\21+\377\27'`\377\26%Z\377\247" \ + "\7\13\33\377\1\6\12\33\377\202\7\13\33\377\2\15\26""4\377\30)d\377\275" \ + "\7\13\33\377\2\16\30:\377\30)c\377\207\31*e\377\1\15\26""5\377\231\7" \ + "\13\33\377\1\14\23""0\377\205\31*e\377\204\30)d\377\214\31*e\377\1\11" \ + "\16#\377\210\7\13\33\377\2\7\13\34\377\23\37M\377\203\31*e\377\245\30" \ + ")d\377\206\31*e\377\2\30)c\377\15\27""7\377\202\7\13\33\377\1\25%X\377" \ + "\226\31*e\377\1\23\40N\377\326\7\13\33\377\3\17\32>\377\31*e\377\21\34" \ + "D\377\311\7\13\33\377\2\6\13\32\377\25#V\377\221\31*e\377\2\27']\377" \ + "\12\20*\377\257\7\13\33\377\3\13\24""0\377\30(a\377\26%Z\377\247\7\13" \ + "\33\377\6\6\13\33\377\7\13\33\377\11\17%\377\27'_\377\30)c\377\6\12\32" \ + "\377\274\7\13\33\377\2\14\24""2\377\30(a\377\207\31*e\377\2\15\26""5" \ + "\377\7\12\33\377\227\7\13\33\377\16\7\13\32\377\12\22.\377\27(`\377\26" \ + "%Y\377\25#V\377\24\"R\377\23\37L\377\20\32A\377\15\26""5\377\14\23""0" \ + "\377\14\25""3\377\23\40N\377\26&\\\377\30)d\377\211\31*e\377\1\11\16" \ + "$\377\210\7\13\33\377\7\7\13\35\377\23\40N\377\31*e\377\27&\\\377\23" \ + "!Q\377\16\27""8\377\14\24""3\377\243\15\25""3\377\1\23\40N\377\205\31" \ + "*e\377\5\30)b\377\14\25""3\377\7\13\33\377\7\12\33\377\25#U\377\226\31" \ + "*e\377\1\23\40N\377\326\7\13\33\377\4\17\31>\377\31*e\377\20\32\77\377" \ + "\7\12\33\377\307\7\13\33\377\3\6\12\32\377\7\12\32\377\26$X\377\221\31" \ + "*e\377\3\30(a\377\12\22,\377\7\12\32\377\256\7\13\33\377\3\15\26""7\377" \ + "\30)c\377\26%Z\377\247\7\13\33\377\6\7\13\32\377\7\14\37\377\23\40M\377" \ + "\31*e\377\30)c\377\6\12\32\377\274\7\13\33\377\2\13\22-\377\27'`\377" \ + "\207\31*e\377\2\15\26""5\377\7\12\33\377\230\7\13\33\377\5\10\14\37\377" \ + "\12\20*\377\11\16$\377\7\13\35\377\6\12\32\377\206\7\13\33\377\3\11\17" \ + "&\377\15\26""8\377\26$X\377\210\31*e\377\1\11\16#\377\210\7\13\33\377" \ + "\5\7\13\35\377\24\"S\377\31*e\377\13\22.\377\6\12\32\377\202\7\12\32" \ + "\377\242\7\13\33\377\3\6\13\32\377\7\14\37\377\25$X\377\204\31*e\377" \ + "\5\30)b\377\14\24""1\377\6\12\33\377\7\13\33\377\24!Q\377\226\31*e\377" \ + "\2\23\40M\377\7\13\32\377\325\7\13\33\377\4\17\31>\377\31*e\377\20\32" \ + "\77\377\7\12\33\377\311\7\13\33\377\1\17\31\77\377\211\22\36H\377\2\21" \ + "\35G\377\25$X\377\202\31*e\377\1\21\35F\377\202\22\36H\377\4\21\35H\377" \ + "\22\36I\377\14\24""1\377\6\12\33\377\256\7\13\33\377\4\16\30<\377\31" \ + "*e\377\26%Z\377\6\13\32\377\247\7\13\33\377\1\13\22,\377\202\31*e\377" \ + "\2\30)c\377\6\12\33\377\273\7\13\33\377\3\7\12\33\377\12\20&\377\27'" \ + "_\377\207\31*e\377\2\15\26""5\377\6\12\32\377\233\7\13\33\377\3\7\12" \ + "\33\377\7\13\33\377\6\13\33\377\205\7\13\33\377\3\6\12\33\377\6\13\33" \ + "\377\21\35G\377\206\31*e\377\2\30)d\377\16\27:\377\211\7\13\33\377\4" \ + "\7\14\34\377\26%Z\377\31*e\377\10\15#\377\245\7\13\33\377\202\6\12\32" \ + "\377\1\11\17&\377\204\31*e\377\5\30(b\377\12\21+\377\7\13\33\377\7\12" \ + "\32\377\22\37M\377\226\31*e\377\2\24#T\377\6\12\32\377\325\7\13\33\377" \ + "\3\17\32>\377\31*e\377\20\32\77\377\325\7\13\33\377\3\15\25""4\377\30" \ + ")b\377\26%[\377\204\7\13\33\377\2\10\16\"\377\12\22,\377\256\7\13\33" \ + "\377\4\7\12\33\377\20\33C\377\31*e\377\26%Z\377\247\7\13\33\377\2\6\13" \ + "\32\377\13\22-\377\202\31*e\377\2\30)c\377\6\12\32\377\273\7\13\33\377" \ + "\3\6\13\32\377\10\14\37\377\27&]\377\207\31*e\377\2\15\26""5\377\7\12" \ + "\33\377\245\7\13\33\377\1\21\35G\377\205\31*e\377\2\30)c\377\16\26""8" \ + "\377\202\6\12\32\377\210\7\13\33\377\4\7\14\36\377\30(b\377\31*e\377" \ + "\10\15#\377\246\7\13\33\377\3\6\13\33\377\7\13\33\377\14\24""0\377\203" \ + "\31*e\377\5\30(a\377\10\16\"\377\7\13\32\377\7\13\33\377\21\34E\377\226" \ + "\31*e\377\2\25$W\377\7\13\32\377\325\7\13\33\377\3\17\32>\377\31*e\377" \ + "\20\32\77\377\325\7\13\33\377\3\10\16#\377\26&\\\377\26%[\377\203\7\13" \ + "\33\377\3\7\12\32\377\7\14\34\377\7\15\40\377\257\7\13\33\377\3\20\32" \ + "@\377\31*e\377\26%Z\377\247\7\13\33\377\2\6\13\32\377\13\22-\377\202" \ + "\31*e\377\2\30)c\377\6\12\32\377\273\7\13\33\377\3\7\12\33\377\7\13\33" \ + "\377\26%[\377\207\31*e\377\1\14\24""1\377\246\7\13\33\377\1\21\35G\377" \ + "\204\31*e\377\4\27'`\377\14\24""2\377\7\13\33\377\7\13\32\377\210\7\13" \ + "\33\377\2\7\12\33\377\7\14\35\377\202\31*e\377\1\10\15#\377\251\7\13" \ + "\33\377\1\20\34D\377\202\31*e\377\5\30(`\377\6\13\32\377\7\13\33\377" \ + "\6\13\33\377\20\34C\377\226\31*e\377\2\25$W\377\7\13\32\377\325\7\13" \ + "\33\377\3\17\32>\377\31*e\377\20\32\77\377\324\7\13\33\377\4\7\13\32" \ + "\377\7\13\33\377\26%Y\377\24!P\377\264\7\13\33\377\4\7\13\32\377\11\17" \ + "$\377\26%[\377\26%Z\377\247\7\13\33\377\2\6\13\33\377\13\23.\377\203" \ + "\31*e\377\1\6\12\32\377\275\7\13\33\377\1\26$Y\377\207\31*e\377\2\13" \ + "\22-\377\6\13\33\377\245\7\13\33\377\1\21\35G\377\203\31*e\377\3\26%" \ + "[\377\13\22-\377\7\12\32\377\212\7\13\33\377\2\6\13\33\377\10\15!\377" \ + "\202\31*e\377\1\10\15#\377\250\7\13\33\377\5\7\12\33\377\10\15\37\377" \ + "\24\"S\377\31*e\377\26&\\\377\203\7\13\33\377\1\20\34D\377\226\31*e\377" \ + "\2\25$W\377\7\13\32\377\325\7\13\33\377\4\17\31>\377\31*e\377\20\32\77" \ + "\377\7\12\33\377\323\7\13\33\377\4\7\13\32\377\6\12\32\377\25$W\377\16" \ + "\27""9\377\265\7\13\33\377\4\7\13\32\377\12\21*\377\26%[\377\6\13\32" \ + "\377\247\7\13\33\377\5\11\17&\377\22\37K\377\22\35I\377\21\35G\377\6" \ + "\13\33\377\275\7\13\33\377\1\23\40O\377\207\31*e\377\2\12\22,\377\6\13" \ + "\33\377\244\7\13\33\377\2\7\12\32\377\21\35G\377\202\31*e\377\2\26%Z" \ + "\377\11\20'\377\214\7\13\33\377\2\6\13\32\377\13\22-\377\202\31*e\377" \ + "\1\10\15#\377\250\7\13\33\377\5\6\12\33\377\6\12\32\377\11\17&\377\30" \ + ")b\377\23\40M\377\203\7\13\33\377\1\17\31>\377\226\31*e\377\2\25$W\377" \ + "\7\13\32\377\325\7\13\33\377\3\17\32>\377\31*e\377\17\32\77\377\325\7" \ + "\13\33\377\4\6\12\33\377\22\36J\377\7\13\33\377\7\12\32\377\266\7\13" \ + "\33\377\2\13\21-\377\6\12\32\377\351\7\13\33\377\1\20\33C\377\207\31" \ + "*e\377\2\13\22-\377\6\13\33\377\245\7\13\33\377\4\21\35G\377\31*e\377" \ + "\27'^\377\10\14\37\377\216\7\13\33\377\1\16\27""9\377\202\31*e\377\1" \ + "\10\15#\377\252\7\13\33\377\7\6\12\32\377\15\26""6\377\20\32A\377\7\13" \ + "\32\377\7\13\33\377\6\13\32\377\15\27""8\377\226\31*e\377\2\25$W\377" \ + "\7\13\32\377\325\7\13\33\377\3\17\32>\377\31*e\377\15\26""7\377\325\7" \ + "\13\33\377\3\6\13\33\377\10\15\40\377\6\13\33\377\377\7\13\33\377\243" \ + "\7\13\33\377\1\15\27""8\377\207\31*e\377\1\13\22-\377\246\7\13\33\377" \ + "\3\21\35G\377\31*e\377\21\34E\377\217\7\13\33\377\1\21\34D\377\202\31" \ + "*e\377\1\10\15#\377\253\7\13\33\377\6\7\12\32\377\11\16#\377\7\12\33" \ + "\377\7\13\33\377\7\13\32\377\13\23""0\377\226\31*e\377\2\25$W\377\7\13" \ + "\32\377\325\7\13\33\377\3\17\32>\377\31*e\377\15\26""7\377\325\7\13\33" \ + "\377\202\7\13\32\377\377\7\13\33\377\243\7\13\33\377\2\7\13\32\377\15" \ + "\26""5\377\207\31*e\377\2\12\21*\377\6\13\33\377\245\7\13\33\377\3\21" \ + "\35G\377\31*e\377\14\23.\377\217\7\13\33\377\1\22\37K\377\202\31*e\377" \ + "\1\10\15#\377\253\7\13\33\377\2\7\13\32\377\6\13\33\377\203\7\13\33\377" \ + "\1\12\21+\377\226\31*e\377\2\25$W\377\7\13\32\377\325\7\13\33\377\3\17" \ + "\31>\377\31*e\377\15\26""7\377\377\7\13\33\377\373\7\13\33\377\1\12\20" \ + "(\377\207\31*e\377\2\11\17%\377\6\13\33\377\244\7\13\33\377\3\7\12\32" \ + "\377\22\36I\377\31*e\377\202\6\13\32\377\215\7\13\33\377\2\7\12\33\377" \ + "\25$X\377\202\31*e\377\1\10\15#\377\257\7\13\33\377\2\6\12\32\377\10" \ + "\15!\377\226\31*e\377\2\25$W\377\7\13\32\377\325\7\13\33\377\3\17\32" \ + ">\377\31*e\377\14\25""3\377\377\7\13\33\377\373\7\13\33\377\1\7\12\34" \ + "\377\207\31*e\377\1\11\17%\377\246\7\13\33\377\2\14\24""1\377\15\27""8" \ + "\377\220\7\13\33\377\203\31*e\377\1\10\15#\377\260\7\13\33\377\1\10\15" \ + "\37\377\226\31*e\377\2\25$W\377\7\13\32\377\325\7\13\33\377\3\17\32>" \ + "\377\31*e\377\13\22-\377\377\7\13\33\377\373\7\13\33\377\5\6\12\32\377" \ + "\26&\\\377\27'^\377\30(`\377\30)b\377\203\31*e\377\1\11\17%\377\246\7" \ + "\13\33\377\3\6\13\33\377\7\13\33\377\7\12\33\377\217\7\13\33\377\4\30" \ + "(`\377\27'^\377\30)c\377\10\15\"\377\260\7\13\33\377\1\10\15\37\377\226" \ + "\31*e\377\2\25$W\377\7\13\32\377\325\7\13\33\377\3\17\32>\377\31*e\377" \ + "\13\22-\377\377\7\13\33\377\374\7\13\33\377\5\7\15\40\377\13\22,\377" \ + "\13\24""1\377\15\25""6\377\23\40M\377\202\31*e\377\1\11\17%\377\267\7" \ + "\13\33\377\5\7\13\34\377\13\22,\377\13\21*\377\12\22,\377\7\13\35\377" \ + "\260\7\13\33\377\2\7\14\37\377\30(a\377\225\31*e\377\2\25$W\377\7\13" \ + "\32\377\325\7\13\33\377\3\17\31>\377\31*e\377\13\23.\377\377\7\13\33" \ + "\377\373\7\13\33\377\3\6\13\33\377\7\13\33\377\6\12\32\377\202\7\13\33" \ + "\377\1\15\27""8\377\202\31*e\377\1\11\17%\377\270\7\13\33\377\3\6\12" \ + "\32\377\7\13\33\377\6\13\32\377\261\7\13\33\377\2\7\13\36\377\27&]\377" \ + "\225\31*e\377\2\25$V\377\7\13\32\377\325\7\13\33\377\4\17\31>\377\31" \ + "*e\377\11\17$\377\7\12\33\377\377\7\13\33\377\377\7\13\33\377\1\16\27" \ + "7\377\202\31*e\377\1\11\17%\377\354\7\13\33\377\2\6\13\34\377\25#U\377" \ + "\225\31*e\377\1\26&[\377\326\7\13\33\377\3\17\32>\377\31*e\377\11\17" \ + "$\377\377\7\13\33\377\377\7\13\33\377\2\7\13\33\377\14\23/\377\202\31" \ + "*e\377\1\11\17%\377\354\7\13\33\377\20\7\13\34\377\14\24""0\377\15\26" \ + "7\377\15\26""6\377\15\26""5\377\21\34D\377\31*e\377\30)c\377\27'^\377" \ + "\24\"S\377\15\26""7\377\11\17%\377\17\30;\377\24\"R\377\27&]\377\30(" \ + "b\377\207\31*e\377\1\30(a\377\326\7\13\33\377\4\17\32>\377\31*e\377\11" \ + "\17$\377\6\13\33\377\377\7\13\33\377\377\7\13\33\377\1\14\23/\377\202" \ + "\31*e\377\1\11\17%\377\354\7\13\33\377\1\7\13\32\377\203\7\13\33\377" \ + "\6\6\13\33\377\10\16#\377\21\35F\377\16\30""9\377\12\20)\377\7\13\32" \ + "\377\202\7\13\33\377\7\6\12\33\377\6\13\33\377\11\17$\377\15\25""4\377" \ + "\21\34D\377\24\"R\377\25#V\377\203\25#U\377\2\25#V\377\24!Q\377\326\7" \ + "\13\33\377\4\17\31>\377\31*e\377\10\14\36\377\6\13\33\377\377\7\13\33" \ + "\377\376\7\13\33\377\2\6\13\33\377\12\20(\377\202\31*e\377\1\11\17%\377" \ + "\360\7\13\33\377\7\7\13\32\377\7\12\33\377\6\13\33\377\7\13\33\377\6" \ + "\12\32\377\6\13\32\377\6\12\32\377\203\7\13\33\377\5\6\13\33\377\7\13" \ + "\32\377\7\13\33\377\7\14!\377\10\16!\377\204\10\16\"\377\2\10\16!\377" \ + "\7\13\32\377\325\7\13\33\377\2\17\31>\377\31*e\377\202\6\13\33\377\377" \ + "\7\13\33\377\376\7\13\33\377\2\7\12\32\377\11\17&\377\202\31*e\377\1" \ + "\11\17%\377\360\7\13\33\377\2\7\13\32\377\6\13\32\377\211\7\13\33\377" \ + "\202\7\12\33\377\2\7\13\33\377\7\13\32\377\333\7\13\33\377\2\17\32>\377" \ + "\31*e\377\377\7\13\33\377\377\7\13\33\377\202\7\13\33\377\1\10\16\"\377" \ + "\202\31*e\377\1\11\17$\377\377\7\13\33\377\333\7\13\33\377\2\17\32>\377" \ + "\31*e\377\377\7\13\33\377\377\7\13\33\377\6\7\13\33\377\7\13\32\377\7" \ + "\13\35\377\31*e\377\30)d\377\10\15#\377\377\7\13\33\377\333\7\13\33\377" \ + "\2\17\31>\377\31*e\377\377\7\13\33\377\377\7\13\33\377\202\7\13\33\377" \ + "\4\7\14\35\377\31*e\377\30)d\377\11\16#\377\377\7\13\33\377\333\7\13" \ + "\33\377\2\17\31>\377\31*e\377\377\7\13\33\377\377\7\13\33\377\202\7\13" \ + "\33\377\4\7\14\35\377\31*e\377\30)d\377\11\16#\377\377\7\13\33\377\333" \ + "\7\13\33\377\3\12\20)\377\16\30:\377\7\13\32\377\377\7\13\33\377\377" \ + "\7\13\33\377\5\7\13\33\377\7\14\35\377\31*e\377\30)d\377\11\16#\377\377" \ + "\7\13\33\377\332\7\13\33\377\1\7\13\32\377\377\7\13\33\377\377\7\13\33" \ + "\377\204\7\13\33\377\1\7\14\34\377\202\31*e\377\1\11\16#\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\337\7\13\33\377\4\6\12\33\377" \ + "\22\37K\377\22\36I\377\10\15\40\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\340\7\13\33\377\202\7\13\34\377\1\7\13\32\377\377\7\13\33" \ + "\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13" \ + "\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377" \ + "\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377\7\13\33\377\377" \ + "\7\13\33\377\377\7\13\33\377\344\7\13\33\377") + + diff --git a/utils/psplash/files/image_generic.h b/utils/psplash/files/image_generic.h new file mode 100644 index 0000000..8db52fc --- /dev/null +++ b/utils/psplash/files/image_generic.h @@ -0,0 +1,5475 @@ +/* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ + +#define OWRT_IMG_ROWSTRIDE (1280) +#define OWRT_IMG_WIDTH (320) +#define OWRT_IMG_HEIGHT (320) +#define OWRT_IMG_BYTES_PER_PIXEL (4) /* 3:RGB, 4:RGBA */ +#define OWRT_IMG_RLE_PIXEL_DATA ((uint8*) \ + "\2ES\203\377DS\203\377\202FS\203\377\2FR\203\377FS\203\377\203FT\203\377" \ + "\10ET\202\377FT\203\377GS\204\377FT\203\377GT\204\377FT\203\377+;q\377" \ + "\30)d\377\205\31*e\377\3\30)d\377\36/h\377M}\377\77M~\377\35.h\377\30)d\377\207\31*e\377\12\30)d\377\32+f\377" \ + ">M~\377=J}\377L}\377BP\200\377\202AO\200\377\1@N" \ + "\200\377\204AO\200\377\3@O\177\377\77N~\377@M\177\377\203@N\177\377\11" \ + "\77M\177\377@N\177\377>L\177\377\77M\177\377\77M~\377\77M}\377\77M~\377" \ + "+;q\377\30)d\377\210\31*e\377\10\27(d\3771Au\377=K}\377t\377\30)d\377\204\31*e\377\3" \ + "\30)d\377\27(d\3770\77t\377\203HV\205\377\5GV\205\377HV\205\377IV\205" \ + "\377HV\205\377IU\205\377\202IV\205\377\202IW\205\377\1HW\204\377\202" \ + "IW\205\377\2JW\206\377IW\205\377\203JW\206\377\202JV\206\377\202JW\206" \ + "\377\203JX\206\377\2JW\206\377JX\206\377\204IX\206\377\213JX\206\377" \ + "\204IX\206\377\205JX\206\377\202JW\206\377\202JV\206\377\205JW\206\377" \ + "\202IW\205\377\202HW\204\377\202IW\205\377\13IV\205\377IU\205\377HV\205" \ + "\377IV\205\377HV\205\377GV\205\377GU\204\377HV\205\377AP\200\377\"2j" \ + "\377\27(c\377\204\31*e\377\6\30)d\377\33,f\377>M~\377GU\204\377FT\203" \ + "\377FS\203\377\205FT\203\377\14FS\203\377FR\203\377ES\203\377FS\203\377" \ + "ES\203\377DS\203\377ES\203\377ER\202\377ES\201\377ER\202\377DQ\202\377" \ + "CR\202\377\204DR\202\377\5DQ\201\377CP\200\377BP\200\377\37""0i\377\30" \ + ")d\377\206\31*e\377\4\27(d\3772@u\377BP\200\377AO\177\377\202AO\200\377" \ + "\1@N\200\377\202AO\200\377\3@O\177\377AO\200\377\77O~\377\206@N\177\377" \ + "\7\77M\177\377>L\177\377\77M\177\377\77M~\377>L}\3776Ex\377\32+e\377" \ + "\210\31*e\377\3\30)d\377!2j\377=K}\377\202" \ + "L\177\377\202\77M\177\377\3\77M~\377\77L~\377\34-g\377\211\31*e\377\6" \ + "\33,g\3778Gz\377=K}\377M}\377\202BP\200\377\2AO\200\377@N\200\377\204AO\200\377" \ + "\202@N\177\377\1@M\177\377\204@N\177\377\202\77M\177\377\6\77M~\377\77" \ + "M\177\377\77M~\377=K}\377\27(c\377\30)d\377\207\31*e\377\2\30)d\377#" \ + "3k\377\202=K}\377\1;K}\377\202L\177\377\202\77M\177\377\4>L~\377@N~\377%5m\377\30)d" \ + "\377\207\31*e\377\3\30)d\377\27(d\377;J|\377\202=K}\377\1;K}\377\202" \ + "s\377\33,f\377\221\31*e\377\1\27(c\377\202-=r\377\2-;q\377-" \ + "L\177\377\77M\177" \ + "\377\203\77M~\377\2""4Cw\377\30)d\377\210\31*e\377\10\27(d\377*9p\377" \ + ">L}\377=K}\377;K}\377L\177\377\77M\177\377\77M~\377>M~\377" \ + ";I{\377\35-g\377\210\31*e\377\6\30)d\377\34-f\377>L~\377=K}\377L\177" \ + "\377\202\77M\177\377\202\77M~\377\2$4l\377\30)d\377\210\31*e\377\6\32" \ + "+e\3778Fz\377=K}\377L\177\377\77M\177\377\202\77M~\377\2""4Cv\377\27(d\377" \ + "\211\31*e\377\7""1@t\377=K}\377L\177\377\77M~\377\77M\177\377\77M" \ + "}\377@N\177\377\31*e\377\30)d\377\207\31*e\377\22\30)d\377)9p\377M~\377" \ + "\30)d\377\204\31*e\377\7\30)d\377/\77t\377GU\204\377FU\203\377FS\203" \ + "\377FT\203\377ET\202\377\203FT\203\377\3FS\203\377ES\203\377FS\203\377" \ + "\203ES\203\377\5ES\202\377ES\201\377EQ\202\377DR\202\377CR\202\377\202" \ + "DR\202\377\6DQ\201\377DR\202\377DP\200\377CQ\201\377\30)e\377\30)d\377" \ + "\205\31*e\377\3\30)d\377#3k\377AO\177\377\202BP\200\377\2AO\200\377@" \ + "N\200\377\204AO\200\377\3@O\177\377@N\177\377@M\177\377\204@N\177\377" \ + "\203\77M\177\377\4>L}\377@N\177\377%4l\377\30)d\377\207\31*e\377\4\30" \ + ")d\377\"1k\377M~\377\202BP\200\377\2AO\200\377@N\200\377\204AO\200\377\3@O\177\377" \ + "@N\177\377@M\177\377\204@N\177\377\2>L\177\377\77M\177\377\203\77M~\377" \ + "\2""1@u\377\27(c\377\207\31*e\377\11\30)d\377\31+e\377L\177" \ + "\377\77M\177\377\77M~\377\77M}\377;I{\377\210\31*e\377\3\30)e\377\27" \ + "(c\3774Cw\377\202=K}\377\1;K}\377\202L\177\377\77M\177\377\202\77M~\377\2=K|\377\37/i\377\210\31*e\377" \ + "\10\30)d\377&6n\377>L~\377=J|\377;K}\377L\177\377\77M\177\377\77M~\377>L}\377%5" \ + "m\377\210\31*e\377\6\30)d\377\32+e\377>L}\377=K}\377L\177\377" \ + "\77M\177\377\202\77M~\377\2-L~\377\27(c\377\204\31*e\377\2\32+f\377@N\177\377\202HV\205\377" \ + "\3GV\205\377IV\205\377HV\205\377\202IV\205\377\4IW\205\377HW\204\377" \ + "JW\206\377IW\205\377\202JW\206\377\3JV\206\377JX\206\377JW\206\377\203" \ + "JX\206\377\10KX\205\377KX\206\377KW\207\377KX\206\377JY\207\377KX\207" \ + "\377LY\207\377KY\207\377\204LY\207\377\5LX\207\377LY\207\377KY\206\377" \ + "KZ\206\377LY\207\377\202MZ\210\377\1LZ\207\377\230MZ\210\377\7LZ\207" \ + "\377MZ\210\377LZ\207\377KZ\206\377KY\206\377LY\207\377LX\207\377\205" \ + "LY\207\377\202KY\207\377\14JX\207\377KX\206\377KX\207\377KX\206\377K" \ + "X\205\377KX\206\377JX\206\377IX\206\377JW\206\377JX\206\377JW\206\377" \ + "JV\206\377\203JW\206\377\3IW\205\377HW\204\377IW\205\377\203IV\205\377" \ + "\5HV\205\377GU\204\377HV\205\377/>t\377\30)d\377\203\31*e\377\24\30)" \ + "d\377!1j\377IV\205\377GU\204\377GT\204\377FS\203\377ET\202\377FT\203" \ + "\377FS\203\377FT\203\377FR\203\377ES\203\377FS\203\377DS\203\377ES\203" \ + "\377ES\202\377ES\201\377EQ\202\377DR\202\377CR\202\377\204DR\202\377" \ + "\4DQ\201\377ER\202\377\37""0i\377\30)d\377\206\31*e\377\2!1j\377@N~\377" \ + "\202BP\200\377\2AO\200\377@N\200\377\203AO\200\377\3@O\177\377\77O~\377" \ + "@M\177\377\204@N\177\377\7\77M\177\377>L\177\377\77M~\377\77M\177\377" \ + "\77M~\3777Fy\377\30)d\377\210\31*e\377\6\30)d\377-=r\377=K}\377s\377\34," \ + "g\377\220\31*e\377\4\30)d\377\34,g\377,L}\377AO\177\377\202AO\200" \ + "\377\1@N\200\377\204AO\200\377\3@O\177\377@N\177\377@M\177\377\204@N" \ + "\177\377\203\77M\177\377\4\77M}\377@M~\377\31*e\377\30)d\377\207\31*" \ + "e\377\4\30)d\377%5m\377=J}\377=K}\377\202L}\377@N\177\377" \ + "%4m\377\30)d\377\210\31*e\377\7!1j\377;I|\377=K}\377L\177\377\77M\177\377\77M~\377\77M}\377=K}\377\27" \ + "(c\377\30)d\377\207\31*e\377\7\32+e\3779Hz\377=J|\377M}\377\30)d\377\203\31*e\377" \ + "\7\30)d\377\37/i\377JX\206\377FT\203\377GT\204\377FS\203\377ET\202\377" \ + "\202FT\203\377\203FS\203\377\10ES\203\377DS\203\377ES\203\377ES\202\377" \ + "ER\201\377ER\202\377DR\202\377CR\202\377\203DR\202\377\202DQ\201\377" \ + "\2""7Ex\377\30*d\377\206\31*e\377\2\27(c\377L\177\377\77M\177\377\77M~\377" \ + "\202>L}\377\2\33,f\377\30)d\377\207\31*e\377\2\27(d\3777Fy\377\202=K" \ + "}\377\2;K}\377;J|\377\204>M\201\377\203=M\201\377\203=L\201\377\203<" \ + "L\200\377\4=M\201\377\30*h\377\32+i\377\30)d\377\204\31*e\377\2\30)d" \ + "\377\31*f\377\203\32+i\377\3!2n\3779H}\377:I~\377\2049I~\377\1""9H~\377" \ + "\2038H~\377\7""6Fy\3775Dw\3776Dx\3775Cx\3775Dx\377\32+e\377\30)d\377" \ + "\214\32+i\377\5\31+i\377#4p\3776F|\3773Cy\3771@u\377\2022Av\377\3""2" \ + "Au\3771@u\3770\77u\377\2041@u\377\2'7n\377\30)d\377\220\31*e\377\10\30" \ + ")d\377#3l\377-=s\377-=q\377-;r\377-s\377HV\205\377GV\205\377HV\205\377\203IV\205\377\203IW\205\377\205" \ + "JW\206\377\2JX\206\377IX\206\377\202JX\206\377\3KX\205\377KW\207\377" \ + "KX\206\377\202KY\207\377\205LY\207\377\5LX\207\377KY\206\377LZ\207\377" \ + "MZ\210\377LZ\207\377\204MZ\210\377\4LY\210\377MZ\210\377N[\210\377MZ" \ + "\207\377\202N[\210\377\4IU\200\377EPw\377.6R\377\22\26!\377\213\0\0\0" \ + "\377\5\30\33*\3772;Y\377FR{\377IV\201\377N[\211\377\202N[\210\377\5N" \ + "[\207\377MZ\210\377N[\210\377MZ\210\377LY\210\377\204MZ\210\377\6LZ\207" \ + "\377MZ\210\377LY\207\377KZ\206\377LY\207\377LX\207\377\203LY\207\377" \ + "\13KY\207\377LY\207\377JY\207\377KX\206\377KW\207\377KX\206\377KX\205" \ + "\377JX\206\377IX\206\377JW\206\377JX\206\377\204JW\206\377\5IW\205\377" \ + "HW\204\377IW\205\377IV\205\377IU\205\377\202HV\205\377\3GV\204\377DR" \ + "\202\377\40""0i\377\204\31*e\377\6\26(c\377\77M~\377GU\204\377GT\204" \ + "\377GS\204\377ET\202\377\203FT\203\377\203FS\203\377\1DS\203\377\202" \ + "ES\203\377\4ES\201\377ER\202\377DR\202\377CR\202\377\204DR\202\377\3" \ + "DQ\201\377=K|\377\33,f\377\206\31*e\377\6\30)d\377/\77t\377BP\200\377" \ + "AO\200\377BP\200\377@N\200\377\204AO\200\377\3@O\177\377\77N~\377@M\177" \ + "\377\204@N\177\377\1>L\177\377\202\77M\177\377\4\77M~\377>L}\377\40""0" \ + "i\377\30)d\377\207\31*e\377\2\27(d\3771\77u\377\202=K}\377\4;K}\377>" \ + "N\202\377\31\37""4\377\20\25#\377\205\21\26$\377\206\21\25$\377\5\22" \ + "\26%\377\10\15\36\377\10\16\"\377\31*e\377\30)d\377\204\31*e\377\2\21" \ + "\34E\377\6\14\35\377\202\7\14\36\377\1\10\16\36\377\202\20\24#\377\207" \ + "\17\24#\377\11\16\23\40\377(3Z\3776Ey\3776Dx\3776Cx\3775Dx\377\36.h\377" \ + "\31+g\377\6\13\32\377\213\7\14\36\377\5\6\14\36\377\11\16\36\377\16\23" \ + "!\377\34%C\3773By\377\2022Av\377\4""2Au\3771@t\3771@u\3770\77u\377\203" \ + "1@u\377\2+;q\377\30)d\377\220\31*e\377\17\30)d\377\40""1j\377-=s\377" \ + "-=q\377-;r\377-L\177\377\77M\177\377" \ + "\77M~\377>L}\377%5m\377\30)d\377\207\31*e\377\7\30)d\377)9p\377>L}\377" \ + "=K}\377;K}\377>M\201\377\32\40""7\377\217\0\0\0\377\1\30(a\377\205\31" \ + "*e\377\1\7\14\36\377\216\0\0\0\377\7\20\25%\3777G|\3776Dx\3776Cx\377" \ + "5Dx\377\"2l\377\25$V\377\217\0\0\0\377\10\40*K\3772Bx\3772Av\3772Au\377" \ + "2Av\3772At\3771@u\3770\77u\377\2031@u\377\2-L\177\377" \ + "\77M\177\377\77M~\377>L}\377*:p\377\30)d\377\207\31*e\377\12\30)d\377" \ + "\"2k\377>L~\377=K}\377;K}\377s\377\30)d\377\220\31*e\377\10\30)d\377" \ + "\34-g\377.>s\377,=q\377-;r\377,;q\377+9n\377\22\32""1\377\202\0\0\0\377" \ + "\5\1\1\1\377***\377\20\20\20\377\0\0\1\377\23\37L\377\220\31*e\377\2" \ + "\30)d\377!1j\377\203(8o\377\5'7o\377&6o\377'7o\377\36/h\377\30)d\377" \ + "\207\31*e\377\7\26'c\3778Gz\377IV\205\377HV\204\377HV\205\377IV\205\377" \ + "IU\205\377\202IV\205\377\11HW\204\377JW\206\377IW\205\377JW\206\377J" \ + "V\206\377JW\206\377JX\206\377IX\206\377JX\206\377\203KX\206\377\4KW\207" \ + "\377JY\207\377KX\207\377KY\207\377\205LY\207\377\4KZ\206\377LZ\207\377" \ + "MZ\210\377LZ\207\377\203MZ\210\377\1LY\210\377\202MZ\207\377\3P^\214" \ + "\3772;X\377\1\2\3\377\202\0\0\0\377\3III\377\255\255\255\377\372\372" \ + "\372\377\203\377\377\377\377\1\376\376\376\377\207\377\377\377\377\1" \ + "\376\376\376\377\203\377\377\377\377\3\367\367\367\377\245\245\245\377" \ + "DDD\377\202\0\0\0\377\3\3\3\5\3772;Y\377Q_\217\377\202N[\210\377\4MZ" \ + "\210\377N[\210\377MZ\210\377LY\210\377\203MZ\210\377\5LZ\207\377MZ\210" \ + "\377KZ\206\377LY\207\377LX\207\377\204LY\207\377\202KY\207\377\6KX\207" \ + "\377KW\206\377KX\205\377JX\206\377KX\206\377IX\206\377\202JW\206\377" \ + "\1JV\206\377\202JW\206\377\6IW\205\377HW\204\377IW\205\377IV\205\377" \ + "IU\205\377IV\205\377\202HV\205\377\3JX\206\377\35.h\377\30)d\377\203" \ + "\31*e\377\6\33,f\377\77N\177\377FU\203\377GT\204\377FT\203\377ET\202" \ + "\377\203FT\203\377\10FR\203\377FS\203\377ES\203\377DS\203\377ES\203\377" \ + "ES\202\377ES\201\377EQ\202\377\206DR\202\377\3DQ\201\3774Cw\377\27(c" \ + "\377\206\31*e\377\2\35-g\377=K}\377\202BP\200\377\2AO\200\377@N\200\377" \ + "\203AO\200\377\3@O\177\377\77O~\377@M\177\377\204@N\177\377\3\77M\177" \ + "\377>L\177\377\77M\177\377\202\77M~\377\1/>s\377\210\31*e\377\7\30)d" \ + "\377\32+e\377\77M~\377s\377.\77v\377(5f\377\25\35""7\377\2\3" \ + "\7\377\202\0\0\0\377\6HHH\377\264\264\264\377\377\377\377\377\"\"\"\377" \ + "\0\0\1\377\23\37L\377\220\31*e\377\3\30)d\377\40""0i\377'7n\377\202(" \ + "8o\377\5'7o\377&6o\377'7o\377&6n\377\30)d\377\206\31*e\377\3\30)d\377" \ + "\31*e\377GU\203\377\203HV\205\377\6IV\205\377IU\205\377IV\205\377IW\205" \ + "\377HW\204\377IW\205\377\202JW\206\377\1JV\206\377\202JW\206\377\1IX" \ + "\206\377\202JX\206\377\4KX\205\377KW\207\377KX\207\377KY\207\377\205" \ + "LY\207\377\5LX\207\377KZ\206\377LZ\207\377MZ\210\377LZ\207\377\203MZ" \ + "\210\377\5LY\210\377MZ\210\377N[\210\377Q^\216\377\37%6\377\202\0\0\0" \ + "\377\3""333\377\333\333\333\377\372\372\372\377\202\377\377\377\377\1" \ + "\376\376\376\377\215\377\377\377\377\1\376\376\376\377\202\377\377\377" \ + "\377\3\371\371\371\377\326\326\326\377***\377\202\0\0\0\377\4\34!3\377" \ + "N\\\213\377MZ\207\377N[\210\377\202MZ\210\377\1LY\210\377\205MZ\210\377" \ + "\3LY\207\377KZ\206\377LX\207\377\203LY\207\377\11KY\207\377LY\207\377" \ + "KX\207\377KX\206\377KW\207\377KX\205\377KX\206\377JX\206\377IX\206\377" \ + "\202JX\206\377\204JW\206\377\203IW\205\377\203IV\205\377\4GU\204\377" \ + "IW\206\3771@u\377\27(c\377\203\31*e\377\2\27(d\377:H{\377\202GU\204\377" \ + "\3FS\203\377FT\203\377ET\202\377\202FT\203\377\10FS\203\377FR\203\377" \ + "FS\203\377ES\203\377DS\203\377ES\203\377ES\202\377EQ\202\377\206DR\202" \ + "\377\3DQ\201\377\77L~\377\26'c\377\206\31*e\377\3\32+f\377;I{\377BP\200" \ + "\377\202AO\200\377\1@N\200\377\203AO\200\377\3@O\177\377\77O~\377@M\177" \ + "\377\204@N\177\377\2\77M\177\377>L\177\377\202\77M\177\377\2\77M}\377" \ + "3Bv\377\210\31*e\377\12\30)d\377\27(c\377;J|\377=K}\377L\177\377\202\77M\177" \ + "\377\3\77M}\3777Fy\377\32+e\377\210\31*e\377\11\27(d\3775Dx\377=K}\377" \ + "s\377=K}\377L}\377@N\177\377\"2j\377\30)d\377\207\31*e\377\13\30)d\377#3l\377=K" \ + "}\377L~\377\77M\177\377\77M~\377@N~\377)9p\377\30" \ + ")d\377\31*e\377\31)d\377\30)d\377\205\31*e\377\1!1j\377\202=K}\377\202" \ + "\377\35\"6\377\33!4\377\40&=\377%,F\377)2P\377/9Z\3774\77c\377\77" \ + "Ly\377HW\212\377ES\204\377=K|\377\31)d\377\205\31*e\377\5\30)d\377\26" \ + "'c\377BO\200\377@M|\377M\201\377\27\35" \ + "1\377\0\0\0\377vvv\377\212\377\377\377\377\11\246\246\246\377\0\0\0\377" \ + "\5\11\26\377\30(b\377\24\"S\377\1\2\5\377\23\23\23\377\335\335\335\377" \ + "\376\376\376\377\214\377\377\377\377\11\376\376\376\377\342\342\342\377" \ + "\16\16\16\377\1\2\3\377-8d\3776Dy\377\11\14\25\377\0\0\0\377\277\277" \ + "\277\377\210\377\377\377\377\7\376\376\376\377\377\377\377\377III\377" \ + "\0\0\0\377\16\27""9\377!1i\377-s\377IW\206\377HV\204\377HV\205\377IV\205\377IU\205\377IV\205\377I" \ + "W\205\377HW\204\377\203JW\206\377\4JV\206\377JW\206\377JX\206\377IX\206" \ + "\377\202KX\206\377\4KX\205\377KW\207\377KX\207\377KY\207\377\204LY\207" \ + "\377\3LX\207\377LY\207\377LZ\207\377\204MZ\210\377\10LY\210\377MZ\210" \ + "\377N\\\211\377\12\14\22\377\0\0\0\377\217\217\217\377\377\377\377\377" \ + "\376\376\376\377\211\377\377\377\377\5\376\376\376\377\377\377\377\377" \ + "\325\325\325\377555\377\3\3\3\377\203\2\2\2\377\5\6\6\6\377UUU\377\357" \ + "\357\357\377\377\377\377\377\376\376\376\377\211\377\377\377\377\202" \ + "\376\376\376\377\10nnn\377\0\0\0\377\25\30$\377MZ\207\377N[\207\377Q" \ + "_\216\377\25\30%\377\0\0\0\377\213\0\1\1\377\5\0\0\0\377\27\35+\377D" \ + "Q{\377\34!3\377\1\1\2\377\207\0\0\0\377\6\1\1\1\377\24\31%\377>Ip\377" \ + "JW\206\377HU\204\377IV\205\377\202HV\205\377\1GU\204\377\204\31*e\377" \ + "\13\30)e\377\35-g\377FT\203\377GU\204\377FT\203\377GT\204\377GU\204\377" \ + "2<_\377\23\30%\377\2\2\4\377\0\0\1\377\211\0\0\0\377\202\0\0\1\377\5" \ + "\12\15\25\377(/L\377\77M\177\377\34-g\377\30)d\377\205\31*e\377\5\26" \ + "'c\377;I|\377/8[\377\0\0\0\377\0\1\1\377\213\0\0\1\377\5\2\2\4\377BQ" \ + "\205\3778Dr\377\32\40""5\377\2\2\4\377\210\0\0\0\377\5\1\1\4\377\16\30" \ + ";\377\40""1l\377M\200\377M\177" \ + "\377ANz\377\12\14\23\377\202\0\0\0\377\6\6\6\6\377\222\222\222\377\337" \ + "\337\337\377\356\356\356\377\371\371\371\377\375\375\375\377\204\377" \ + "\377\377\377\7\375\375\375\377\371\371\371\377\366\366\366\377\361\361" \ + "\361\377\336\336\336\377www\377\6\6\6\377\202\0\0\0\377\4\2\3\11\377" \ + "\23\40O\377\31*e\377\30)d\377\202\31*e\377\6\27(c\3774Cx\377/8Z\377\0" \ + "\0\0\377666\377\344\344\344\377\207\351\351\351\377\2\352\352\352\377" \ + "\333\333\333\377\204\0\0\0\377\4TTT\377\316\316\316\377\361\361\361\377" \ + "\373\373\373\377\204\377\377\377\377\16\372\372\372\377\357\357\357\377" \ + "\267\267\267\377\16\16\16\377\0\0\0\377\0\0\1\377'1Q\377>M\200\377\377\30)c\377\202\31*e" \ + "\377\6\27(c\3772Bv\377/9Z\377\0\0\0\377;;;\377\370\370\370\377\210\377" \ + "\377\377\377\1\357\357\357\377\202\0\0\0\377\2\27\27\27\377\245\245\245" \ + "\377\202\377\377\377\377\1\376\376\376\377\206\377\377\377\377\1\376" \ + "\376\376\377\202\377\377\377\377\4GGG\377\0\0\0\377\1\1\1\3771=e\377" \ + "\203\377Tb\223\377\24\27" \ + "#\377\0\0\0\377\253\253\253\377\213\377\377\377\377\202\376\376\376\377" \ + "\217\377\377\377\377\6\301\301\301\377\0\0\0\377\5\6\12\377FT\201\377" \ + "\25'c\377\26%[\377\202\0\0\0\377\1\320\320\320\377\210\377\377\377\377" \ + "\13\376\376\376\377\377\377\377\377\345\345\345\377___\377)))\377\0\0" \ + "\0\377\25\25\25\377DDD\377\274\274\274\377\377\377\377\377\376\376\376" \ + "\377\207\377\377\377\377\12\376\376\376\377\324\324\324\377\12\12\12" \ + "\377\0\0\2\377\23!Q\377$4l\37709[\377\0\0\0\377;;;\377\370\370\370\377" \ + "\233\377\377\377\377\11\365\365\365\377777\377\0\0\0\377'1R\377\377\10\16#\377\0\0\0\377\227\227\227\377\224\377\377" \ + "\377\377\3***\377\0\0\0\377\23!O\377\213\31*e\377\3\30)d\377'7n\377(" \ + "8n\377\202(8o\377\203'7o\377\2\32+e\377\30)d\377\203\31*e\377\2\30)d" \ + "\377*:q\377\202HV\205\377\1GV\205\377\203IV\205\377\202IW\205\377\203" \ + "JW\206\377\1JV\206\377\203JX\206\377\6KX\206\377KX\205\377KX\206\377" \ + "KW\207\377JY\207\377KY\207\377\203LY\207\377\3LX\207\377KZ\206\377LZ" \ + "\207\377\204MZ\210\377\6LY\210\377N[\210\377R_\217\377\16\22\32\377\0" \ + "\0\0\377\267\267\267\377\213\377\377\377\377\4ttt\377\0\0\0\377$*\77" \ + "\377Ta\217\377\202Q^\212\377\13Q^\213\377P^\213\377Q^\213\377R]\213\377" \ + "R^\213\377Q^\213\377Q^\212\377Sa\217\377\40$6\377\0\0\0\377\212\212\212" \ + "\377\213\377\377\377\377\7\210\210\210\377\0\0\0\377\34\40""0\377Tb\224" \ + "\377\24\27#\377\0\0\0\377\253\253\253\377\215\377\377\377\377\6\276\276" \ + "\276\377ppp\377sss\377\312\312\312\377\377\377\377\377\376\376\376\377" \ + "\212\377\377\377\377\7\26\26\26\377\0\0\0\3775Ac\377\31+i\377\12\21)" \ + "\377\0\0\0\377]]]\377\212\377\377\377\377\2\321\321\321\377\15\15\15" \ + "\377\206\0\0\0\377\3\262\262\262\377\377\377\377\377\376\376\376\377" \ + "\206\377\377\377\377\12\376\376\376\377\377\377\377\377111\377\0\0\0" \ + "\377\12\21)\377\"3m\37709[\377\0\0\0\377;;;\377\370\370\370\377\220\377" \ + "\377\377\377\202\376\376\376\377\212\377\377\377\377\10YYY\377\0\0\0" \ + "\377\35%=\377\377'/J\377\202&.I\377\4%,F\377\5\6\12\377\0\0\0\377" \ + "\227\227\227\377\212\377\377\377\377\202\0\0\0\377\5\35*W\3770:\\\377" \ + "\0\0\0\377;;;\377\370\370\370\377\212\377\377\377\377\2\302\302\302\377" \ + "\10\10\10\377\204\0\0\0\377\3\36\36\36\377\353\353\353\377\376\376\376" \ + "\377\211\377\377\377\377\11{{{\377\0\0\0\377\27\34""0\377;I{\377;J|\377" \ + "\77M\202\377\5\7\14\377\0\0\0\377\313\313\313\377\211\377\377\377\377" \ + "\4\335\335\335\377CCC\377\377\377\377\377\376\376\376\377\207\377\377" \ + "\377\377\1sss\377\202\0\0\0\377\1{{{\377\211\377\377\377\377\2\23\23" \ + "\23\377\374\374\374\377\211\377\377\377\377\11\245\245\245\377\0\0\0" \ + "\377\5\11\26\377\31+g\377\30)d\377\31*e\377\12\21*\377\0\0\0\377xxx\377" \ + "\213\377\377\377\377\2\352\352\352\377\36\36\36\377\207\0\0\0\377\3\23" \ + "\40N\377\31*g\377\7\14\34\377\205\0\0\0\377\1\273\273\273\377\211\377" \ + "\377\377\377\2\365\365\365\377\40\40\40\377\207\0\0\0\377\2\22\40M\377" \ + "\31*f\377\212\31*e\377\3\30)d\377'7n\377(8n\377\202(8o\377\203'7o\377" \ + "\2\35.f\377\30)d\377\203\31*e\377\2\30)d\377&5m\377\202HV\205\377\1G" \ + "V\205\377\203IV\205\377\3IW\205\377HW\204\377IW\205\377\202JW\206\377" \ + "\1JV\206\377\203JX\206\377\6KX\206\377KX\205\377KX\206\377KW\207\377" \ + "JY\207\377KY\207\377\203LY\207\377\3LX\207\377KZ\206\377LY\207\377\204" \ + "MZ\210\377\6LY\210\377N[\210\377R`\217\377\16\20\30\377\0\0\0\377\274" \ + "\274\274\377\213\377\377\377\377\5zzz\377\0\0\0\377!':\377Ta\217\377" \ + "P]\212\377\203Q^\212\377\203P^\213\377\202Q^\213\377\4Tb\220\377\23\27" \ + "!\377\0\0\0\377\260\260\260\377\213\377\377\377\377\7iii\377\0\0\0\377" \ + "&-D\377Sa\223\377\24\27#\377\0\0\0\377\253\253\253\377\212\377\377\377" \ + "\377\1\341\341\341\377\202\0\0\0\377\10ANw\377M[\214\377LZ\211\3773<" \ + "\\\377\1\1\2\377\32\32\32\377\345\345\345\377\376\376\376\377\207\377" \ + "\377\377\377\7\376\376\376\377\364\364\364\377\26\27\27\377\0\0\0\377" \ + "\20\33C\377\0\0\0\377\77\77\77\377\212\377\377\377\377\1}}}\377\211\0" \ + "\0\0\377\2fff\377\376\376\376\377\211\377\377\377\377\7]]]\377\0\0\0" \ + "\377\25\35""9\3771;^\377\0\0\0\377;;;\377\370\370\370\377\212\377\377" \ + "\377\377\10DDD\377\0\0\0\377\21\25#\377;Hx\377=Jz\377\10\12\20\377\0" \ + "\0\0\377\243\243\243\377\212\377\377\377\377\13\207\207\207\377\0\0\0" \ + "\377\25\32+\377;Iz\377L\200\377\26\33/\377\0\0\0\377zzz\377\377" \ + "\377\377\377\376\376\376\377\207\377\377\377\377\2\371\371\371\377\256" \ + "\256\256\377\211\377\377\377\377\1\35\35\35\377\202\0\0\0\377\3""444" \ + "\377\377\377\377\377\376\376\376\377\207\377\377\377\377\3\231\231\231" \ + "\377\377\377\377\377\376\376\376\377\210\377\377\377\377\4\\\\\\\377" \ + "\0\0\0\377\13\23.\377\31*f\377\202\31*e\377\3\12\21*\377\0\0\0\377xx" \ + "x\377\213\377\377\377\377\14|||\377\0\0\0\377\3\5\15\377\30(a\377\31" \ + "+f\377\20\34D\377\6\13\34\377\1\2\6\377\4\6\20\377\32,j\377\31*e\377" \ + "\30)d\377\202\30)b\377\4\32+h\377\5\7\24\377\0\0\0\377\273\273\273\377" \ + "\211\377\377\377\377\4\365\365\365\377!!!\377\0\0\1\377\22\37J\377\205" \ + "\30)b\377\2\30*d\377\31)e\377\212\31*e\377\2\27)d\377'7n\377\203(8o\377" \ + "\202'7o\377\2(7o\377\30)d\377\204\31*e\377\5\30)d\377#3l\377IW\205\377" \ + "HV\205\377GV\205\377\203IV\205\377\3IW\205\377HW\204\377IW\205\377\202" \ + "JW\206\377\1JV\206\377\203JX\206\377\6KX\206\377KX\205\377KX\206\377" \ + "KW\207\377JY\207\377KY\207\377\203LY\207\377\2LX\207\377KY\206\377\202" \ + "LZ\207\377\203MZ\210\377\6LY\210\377N[\210\377Q_\216\377\23\27#\377\0" \ + "\0\0\377\253\253\253\377\213\377\377\377\377\21\240\240\240\377\0\0\0" \ + "\377\25\32&\377Tb\221\377Q^\212\377Q^\211\377Q^\212\377Q^\213\377Q^\212" \ + "\377Q^\213\377Q^\212\377Q^\213\377Q^\212\377Ub\221\377\11\13\20\377\0" \ + "\0\0\377\324\324\324\377\213\377\377\377\377\7NNN\377\0\0\0\37708T\377" \ + "Sa\222\377\24\27#\377\0\0\0\377\253\253\253\377\212\377\377\377\377\13" \ + "nnn\377\0\0\0\377\35\"4\377LZ\212\377JW\206\377JW\205\377IV\203\377\6" \ + "\7\13\377\0\0\0\377\306\306\306\377\376\376\376\377\210\377\377\377\377" \ + "\6\370\370\370\377:::\377\0\0\0\377\7\15\37\377\0\0\0\377ttt\377\212" \ + "\377\377\377\377\2\213\213\213\377^^^\377\210aaa\377\2\214\214\214\377" \ + "\374\374\374\377\211\377\377\377\377\7\206\206\206\377\0\0\0\377\22\30" \ + "-\3771;_\377\0\0\0\377;;;\377\370\370\370\377\211\377\377\377\377\11" \ + "\337\337\337\377\25\25\25\377\2\3\4\3772>f\377\77M\177\377AP\202\377" \ + "\36%>\377\0\0\0\377ooo\377\212\377\377\377\377\13\210\210\210\377\0\0" \ + "\0\377\24\32+\377;Iz\377L~\377\77M~\377@N\200\377'" \ + "2U\377\0\0\0\377DDD\377\212\377\377\377\377\4\210\210\210\377\0\0\0\377" \ + "\24\32+\377;Iz\377\202l\377\0\0\0\377\3\3\3\377\362\362\362\377" \ + "\221\377\377\377\377\4\245\245\245\377\0\0\0\377\3\7\21\377\31*g\377" \ + "\203\31*e\377\3\12\21*\377\0\0\0\377xxx\377\212\377\377\377\377\5\254" \ + "\254\254\377\0\0\0\377\5\11\26\377\32,j\377\30)d\377\212\31*e\377\4\32" \ + ",j\377\4\10\24\377\0\0\0\377\273\273\273\377\211\377\377\377\377\4\365" \ + "\365\365\377!!!\377\0\0\1\377\23\37L\377\220\31*e\377\3\30)d\377\31*" \ + "d\377'7n\377\203(8o\377\202'7o\377\2(7o\377\30)d\377\205\31*e\377\5\25" \ + "&b\377DR\202\377HV\205\377GV\205\377HV\205\377\202IV\205\377\3IW\205" \ + "\377HW\204\377IW\205\377\204JW\206\377\10JX\206\377IX\206\377JX\206\377" \ + "KX\206\377KX\205\377KX\206\377KX\207\377JY\207\377\205LY\207\377\2KY" \ + "\206\377LZ\207\377\205MZ\210\377\2MZ\207\377O\\\211\377\202\0\0\0\377" \ + "\1\353\353\353\377\212\377\377\377\377\7\375\375\375\377fff\377\0\0\0" \ + "\377\20\22\34\377O\\\211\377P]\212\377O\\\211\377\203P]\212\377\6P]\211" \ + "\377P]\212\377LX\203\377\7\10\14\377\0\0\0\377\227\227\227\377\213\377" \ + "\377\377\377\10\317\317\317\377\0\0\0\377\4\4\6\377R`\221\377R_\217\377" \ + "\24\27#\377\0\0\0\377\253\253\253\377\212\377\377\377\377\12""888\377" \ + "\0\0\0\377/8V\377KX\207\377KX\206\377KX\205\377N[\214\377\20\22\35\377" \ + "\0\0\0\377\250\250\250\377\211\377\377\377\377\2\373\373\373\377SSS\377" \ + "\203\0\0\0\377\1\213\213\213\377\211\377\377\377\377\1\376\376\376\377" \ + "\225\377\377\377\377\7\323\323\323\377\7\7\7\377\5\7\13\377+4T\377\0" \ + "\0\0\377;;;\377\370\370\370\377\211\377\377\377\377\11\265\265\265\377" \ + "\0\0\0\377\11\12\21\377AP\205\377\77M~\377@N\200\377$/S\377\0\0\0\377" \ + "DDD\377\212\377\377\377\377\4\210\210\210\377\0\0\0\377\24\32+\377;I" \ + "z\377\202M" \ + "\202\377\2\2\4\377\0\0\0\377\330\330\330\377\217\377\377\377\377\1\374" \ + "\374\374\377\202\0\0\0\377\10""3Aq\3778Fy\3777Fy\377/L}\377AO\201" \ + "\377\30$K\377\0\0\0\377DDD\377\212\377\377\377\377\4\210\210\210\377" \ + "\0\0\0\377\24\31+\377;Iz\377\202>>\377\0\0\0\377\17\30""7\377:H}\3778Fx" \ + "\3776Ex\3779H}\377\31!9\377\0\0\0\377[[[\377\377\377\377\377\376\376" \ + "\376\377\215\377\377\377\377\3\36\36\36\377\0\0\0\377\22\36H\377\205" \ + "\31*e\377\3\15\24,\377\0\0\0\377xxx\377\212\377\377\377\377\4<<<\377" \ + "\0\0\0\377\21\35F\377\31*g\377\213\31*e\377\4\31+i\377\12\21)\377\0\0" \ + "\0\377\203\203\203\377\212\377\377\377\377\1\265\265\265\377\202\0\0" \ + "\0\377\6\13\13\13\377AAA\377XXX\377\0\0\0\377\4\7\22\377\32,j\377\212" \ + "\31*e\377\3\30)d\377\33,f\377'7n\377\202(8o\377\5'7o\377&6o\377'7o\377" \ + "(7o\377\30)d\377\207\31*e\377\3""9Hz\377HV\205\377GV\205\377\202HV\205" \ + "\377\22IU\205\377IW\205\377IV\205\377IW\205\377JW\206\377IW\205\377J" \ + "W\206\377JV\206\377JX\206\377JW\206\377JX\206\377KX\206\377JX\206\377" \ + "KX\206\377KW\207\377JY\207\377KX\207\377KY\207\377\203LY\207\377\3LX" \ + "\207\377KZ\206\377LZ\207\377\205MZ\210\377\10MZ\207\377P]\213\377\33" \ + "!0\377\0\0\0\377\17\17\17\377\344\344\344\377\377\377\377\377\376\376" \ + "\376\377\236\377\377\377\377\12\16\16\16\377\0\0\0\377\40%9\377Q^\216" \ + "\377MZ\207\377N[\210\377Q^\216\377\24\27#\377\0\0\0\377\253\253\253\377" \ + "\214\377\377\377\377\1\376\376\376\377\220\377\377\377\377\7\25\25\25" \ + "\377\0\0\0\377\21\35H\377\31+h\377\23\37M\377\0\0\0\377\2\2\2\377\211" \ + "\377\377\377\377\5\376\376\376\377\377\377\377\377\237\237\237\377\0" \ + "\0\0\377\1\1\1\377\202\0\0\0\377\5\1\1\1\377\40\40\40\377\367\367\367" \ + "\377\377\377\377\377\376\376\376\377\202\377\377\377\377\1\376\376\376" \ + "\377\205\377\377\377\377\1\332\332\332\377\202\0\0\0\377\5.7Y\377/9\\" \ + "\377\0\0\0\377;;;\377\370\370\370\377\211\377\377\377\377\11\266\266" \ + "\266\377\0\0\0\377\10\12\20\377AP\205\377\77M}\377AO\201\377\24\37H\377" \ + "\0\0\0\377DDD\377\212\377\377\377\377\4\210\210\210\377\0\0\0\377\24" \ + "\31+\377;Iz\377\202^" \ + "\377\202\0\0\0\377\3___\377\377\377\377\377\376\376\376\377\231\377\377" \ + "\377\377\3\376\376\376\377\377\377\377\377\177\177\177\377\202\0\0\0" \ + "\377\11""8Bc\377N[\210\377MZ\207\377N[\210\377LY\210\377P^\216\377\24" \ + "\27#\377\0\0\0\377\253\253\253\377\232\377\377\377\377\5\376\376\376" \ + "\377\367\367\367\377888\377\0\0\0\377\14\24""1\377\202\30)d\377\7\31" \ + "*e\377\21\35G\377\0\0\0\377\4\4\4\377\261\261\261\377\377\377\377\377" \ + "\376\376\376\377\207\377\377\377\377\1\376\376\376\377\216\377\377\377" \ + "\377\13\376\376\376\377\377\377\377\377___\377\0\0\0\377\2\4\14\3776" \ + "Cr\377BP\200\377.8Z\377\0\0\0\377;;;\377\370\370\370\377\211\377\377" \ + "\377\377\11\266\266\266\377\0\0\0\377\10\12\20\377AP\205\377\77M}\377" \ + "9G{\377\22\37G\377\0\0\0\377DDD\377\212\377\377\377\377\4\210\210\210" \ + "\377\0\0\0\377\24\31+\377;Iz\377\202L}\377+;s\377\21\35F\377\0\0\0\377DDD\377\212\377\377\377\377\4" \ + "\210\210\210\377\0\0\0\377\24\31+\377;Iz\377\202L}\377&6o\377\21\35F\377\0\0\0\377HHH\377\212" \ + "\377\377\377\377\4\220\220\220\377\0\0\0\377\24\31+\377;Iz\377\202L}\377!2l\377\21\35F\377\0\0\0\377" \ + "\14\14\14\377...\377\211---\377\15\27\27\27\377\0\0\0\377\24\31+\377" \ + ";Iz\377;J|\377>>\377\245\245\245\377\314\314\314\377\346\346\346\377\360\360\360" \ + "\377\361\361\361\377\355\355\355\377\332\332\332\377\302\302\302\377" \ + "\214\214\214\377OOO\377\22\22\22\377\202\0\0\0\377\2\6\12\30\377\31+" \ + "g\377\212\31*e\377\1\"3k\377\203(8o\377\4'7o\377&6o\377'7n\377\36.h\377" \ + "\205\31*e\377\1\30)d\377\204\31*e\377\4#3l\377FT\204\377GU\204\377GV" \ + "\205\377\202IV\205\377\4IU\205\377IW\205\377IV\205\377IW\205\377\205" \ + "JW\206\377\2JX\206\377IX\206\377\202JX\206\377\5KX\205\377KW\206\377" \ + "KX\207\377JY\207\377KX\207\377\205LY\207\377\4LX\207\377LY\207\377KZ" \ + "\206\377LZ\207\377\205MZ\210\377\10LY\210\377MZ\210\377MZ\207\377P]\213" \ + "\377KX\203\3774=\\\377\34!2\377\12\13\21\377\207\0\0\0\377\1\4\4\4\377" \ + "\207\0\0\0\377\6\10\12\20\377\35\"3\3774=\\\377MY\206\377O]\213\377M" \ + "Z\207\377\202N[\210\377\2MZ\210\377LY\210\377\204MZ\210\377\5LZ\207\377" \ + "P^\217\377\24\27#\377\0\0\0\377\253\253\253\377\212\377\377\377\377\4" \ + "***\377\0\0\0\377\21\24\37\377\1\1\2\377\211\0\0\0\377\6\4\5\10\377!" \ + "'<\377@Lv\377IX\210\377\77M~\377\30)e\377\203\31*e\377\14\30)d\377\35" \ + ".h\377IW\205\377GU\204\377FT\203\377GS\204\377ET\202\377HW\207\377;G" \ + "p\377'/J\377\25\31(\377\3\3\6\377\216\0\0\0\377\11\2\3\11\377\11\17$" \ + "\377\21\35G\377\31*e\377\31*f\377\30)d\377\31*e\377\27(c\377;I|\377\202" \ + "BP\200\377\1-6X\377\216\0\0\0\377\5\6\6\13\377BP\204\377>L}\377\34-i" \ + "\377\20\35E\377\216\0\0\0\377\11\22\27&\377;Iz\377h\377;I{\377Kz\377\16'7n\377BQ\201\377IW\205\377^i\220\377cm\224\377bm\223\377" \ + "`k\221\377Q^\212\377S`\214\377al\222\377bl\223\377al\223\377Ye\220\377" \ + "GV\210\377\202HW\211\377\13IX\212\377GU\207\377BP\177\377GV\210\377H" \ + "W\212\377GV\211\377GU\210\377FT\206\377GT\205\377\"3l\377\30)d\377\205" \ + "\31*e\377\4\30)d\377'7n\377N[\207\377^i\220\377\202^i\221\377\2Yd\217" \ + "\377@N\201\377\203BP\202\377\1@P\200\377\205AO\201\377\10@N\201\377\77" \ + "N\201\377@N\201\377\77N\200\377\77M~\3775Dw\377\27(c\377\31*e\377\207" \ + "\31*f\377\2\35.i\377;J}\377\202=L~\377\4L|\377\3>L{\377.=s\377\30)e\377\203\31*f\377" \ + "\5\30)e\377%4m\3778Fy\3777Fy\3776Fy\377\2027Fy\377\5""6Ey\3777Dy\377" \ + "6Dx\3776Ez\3776Fz\377\2026Fy\377\4""6Dy\3776Ez\3772Aw\377\27(e\377\207" \ + "\31*f\377\206\31*e\377\12\27(d\377+:q\3771Bv\377FT\204\377R^\212\377" \ + "S_\212\377R^\212\377DQ\201\3772Av\3771@v\377\2031Av\377\2""2Aw\377\"" \ + "2l\377\202\31*f\377\2\31*e\377\30)d\377\215\31*e\377\15\27(d\377(8o\377" \ + "-=r\377-=q\377,;q\377-A\377))+\377'()\377\207\215\237\377Ly\377##%\377\203\0\0\0\377\4kq\203" \ + "\377JX\206\377Ze\216\377/04\377\202\0\0\0\377\13OPS\377Yf\223\377v\200" \ + "\242\377&%\"\377\5\4\4\377\16\16\15\377jp\207\377CQ\201\377ES\202\377" \ + "ES\201\377EQ\202\377\203DR\202\377\10CQ\201\377DR\202\377CQ\201\377D" \ + "Q\201\3775Dw\377\26(c\377\31*e\377\30)d\377\205\31*e\377\3=L}\377_i\215" \ + "\377\32\32\34\377\202\0\0\0\377\2\210\215\236\377s\3778Fy\3777Fy\377" \ + "6Fy\377\2027Fy\377\4""7Dy\3776Ey\3775Dx\3776Ey\377\2036Ex\377\4""6Cx" \ + "\3776Dx\377'7n\377\27)d\377\203\31*e\377\1\30)d\377\210\31*e\377\13\30" \ + ")d\377\30*d\3772Au\377.>t\377y\200\233\377\11\10\7\377\0\0\0\377\10\10" \ + "\11\377]f\203\3771@t\3770\77u\377\2031@u\377\2/\77t\377\35.h\377\214" \ + "\31*e\377\202\30)d\377\202\31*e\377\4\30)d\377\31*e\377,L~\377\202\77M\177\377\11\77M~\3778Fy\377\23%a" \ + "\377\22$a\377\22$b\377\21#a\377\22$a\377\24&b\377\30)d\377\202\31*e\377" \ + "\10\30)d\377,;q\3779G{\3777Fz\3776F{\3776Fz\3777Fz\3778Gz\377\202L~\377\202\77M~\377\10>L}\377\\f\206\377kq\206\377x{\207" \ + "\377w{\210\377mr\206\377Va\204\377#3k\377\203\30)d\377\22HU\204\377o" \ + "v\221\377x}\216\377\177\203\214\377\177\202\216\377w|\216\377iq\222\377" \ + "@N\177\377M~\377HV\205\377GV\205\377" \ + "HV\205\377IV\205\377IU\205\377IV\205\377\203IW\205\377\2JW\206\377IW" \ + "\205\377\203JW\206\377\202JX\206\377\3IX\206\377KX\206\377JX\206\377" \ + "\202KX\206\377\6KW\206\377KX\206\377JY\207\377KY\207\377LY\207\377KY" \ + "\207\377\204LY\207\377\202LX\207\377\7LY\207\377KY\206\377KZ\206\377" \ + "LY\207\377LZ\207\377MZ\210\377LZ\207\377\223MZ\210\377\1LZ\207\377\202" \ + "MZ\210\377\202LZ\207\377\1KZ\206\377\202LY\207\377\1LX\207\377\203LY" \ + "\207\377\4O]\215\377\24\27#\377\0\0\0\377\253\253\253\377\212\377\377" \ + "\377\377\7***\377\0\0\0\3773<^\377IW\205\377JW\206\377IW\205\377HW\204" \ + "\377\202IV\205\377\4IU\205\377HU\204\377\\i\225\377Y[_\377\202\0\0\0" \ + "\377\"68>\377O\\\212\377FFH\377\0\0\0\377\4\4\4\377666\377\0\0\0\377" \ + "\27\27\26\377ox\225\377kp\203\377\6\6\5\377\0\0\0\377))'\377ny\235\377" \ + "@N\177\377v\200\242\377'&#\377\6\6\5\377\20\17\15\377jp\207\377CQ\201" \ + "\377qx\221\377\11\11\10\377\5\4\3\377.-+\377\203\206\222\377\15\15\14" \ + "\377\0\0\0\377fhp\377IV\205\377^i\217\377OQZ\377\31\31\30\377\2\1\0\377" \ + "\202\0\0\0\377\7\10\7\6\377(((\377ch{\377DR\203\377@N\177\377_i\215\377" \ + "\34\34\35\377\202\0\0\0\377\6\210\215\236\377A\377q" \ + "t~\377\6\5\3\377\0\0\0\377cen\377>M~\377cn\221\377QSZ\377\25\24\22\377" \ + "\203\0\0\0\377\11\11\10\7\377*+,\377ot\207\377;I|\3772Av\377\26'c\377" \ + "Q\\\201\377FHN\377\23\23\21\377\203\0\0\0\377\10\14\13\12\377123\377" \ + "ho\211\377\35/j\377\30)d\377%5m\377[_n\377\31\30\30\377\202\0\0\0\377" \ + "\13\24\24\23\377dej\377\15\15\15\377\0\0\0\377\12\12\12\377]f\203\377" \ + "0\77t\3773Cx\377ox\224\377ABF\377\20\17\16\377\202\0\0\0\377\22\6\6\4" \ + "\377\30\30\26\377PR[\377O[\205\377\31*e\377$4m\377UYf\377\4\4\2\377\2" \ + "\2\0\377]^b\377Z]i\377\20\20\16\377\0\0\0\377\2\2\1\377!!\40\377jr\211" \ + "\377TW`\377\22\22\20\377\202\0\0\0\377\4\35\34\34\377ot\213\3771@u\377" \ + "+\377\202\0\0\0\377\3UW]\3779H~\377}\203\226\377\202" \ + "\0\0\0\377\5\34\34\36\377^i\217\377!3o\377an\231\377.-.\377\202\0\0\0" \ + "\377\3MQ^\377\36/j\377ru\177\377\202\0\0\0\377\4\37\37\37\377pw\217\377" \ + "lu\225\377CEJ\377\202\0\0\0\377\4\12\12\12\377]f\203\3771@u\377]an\377" \ + "\202\0\0\0\377\12\"\"!\377s{\230\377DR\201\377ms\210\377\13\12\11\377" \ + "\0\0\0\377\21\20\17\377bi\207\377\36/j\377RWd\377\203\0\0\0\377\3Z_n" \ + "\377^h\214\377FGM\377\203\0\0\0\377\3cfq\377ir\220\377ACF\377\202\0\0" \ + "\0\377\3\"#%\377HU\201\377+;q\377\203,M\177\377chv\377\202\0\0\0" \ + "\377\5###\377kmu\377ehr\377gjs\377WWZ\377\202\0\0\0\377\3))*\377R_\214" \ + "\377gkv\377\202\0\0\0\377\5--.\377cfp\377`co\377beq\377TUW\377\202\0" \ + "\0\0\377\3""68=\3776Fy\377_`h\377\202\0\0\0\377\4LMQ\377:J{\3770@v\377" \ + "\202\206\230\377\202\0\0\0\377\4\12\12\12\377\\e\203\3773Bv\377QRW\377" \ + "\202\0\0\0\377\5abf\3773Cy\377\24%b\377AN}\377,,.\377\202\0\0\0\377\3" \ + "uy\210\377\34-j\377RWd\377\202\0\0\0\377\12\17\17\17\377Wb\210\377\25" \ + "'c\377\\`q\377\4\3\3\377\0\0\0\377!\40\36\377\\h\220\377\40""1l\377\207" \ + "\213\230\377\202\0\0\0\377\3\36\36\40\377LX\202\377+;q\377\203,F\377))-\377\31\31\30" \ + "\377\7\7\6\377\202\0\0\0\377\11\37\37\36\377u|\227\377\34-g\377CQ\202" \ + "\377qx\216\377@AH\377((+\377\26\26\26\377\5\5\4\377\202\0\0\0\377\13" \ + "--,\377oy\227\3776Fy\377;J|\377;H|\377;I|\377:I{\3779Iz\3779Hz\377ag" \ + "~\377\6\6\6\377\202\0\0\0\377\2kp\201\377\34-j\377\203\26(e\377\13\26" \ + "(d\377\24%b\377Wa\201\377\20\17\16\377\0\0\0\377\21\20\16\377t{\227\377" \ + "3Bv\3777Fy\377BQ\202\377TWb\377\202\0\0\0\377\2\13\13\13\377\36\36\40" \ + "\377\202\36\37\40\377\6\36\37!\377%&(\377$%'\377:;>\377`l\224\377TV_" \ + "\377\202\0\0\0\377\2\15\15\15\377\35\36\37\377\202\36\36\37\377\1\36" \ + "\36\40\377\202%%'\377\3IKO\377>L~\377XZ`\377\202\0\0\0\377\12SU\\\377" \ + "4Cw\377.>t\377~\205\233\377\5\4\3\377\0\0\0\377\12\12\12\377\\d\202\377" \ + "t\377x}\222\377\3\3\1\377\0\0\0\377\34\34\34\377_i\212\3774Br\377" \ + "3Br\377Vb\214\377^i\221\377_i\220\377Wb\213\377JW\205\377^h\215\377\34" \ + "\34\35\377\202\0\0\0\377\3\210\215\236\377CQ\204\377y}\207\377\202\0" \ + "\0\0\377\20##%\377py\227\377Vb\211\377Xc\213\377s|\240\377gr\227\377" \ + "Ze\216\377S_\210\377HU\203\377'7p\377;J\177\377Xe\221\377^i\220\377L" \ + "W\177\377fl\201\377457\377\202\0\0\0\377\11VXa\377@N\202\377LY\211\377" \ + "]j\226\377t\177\244\377w\201\241\377cm\215\377pu\204\377//1\377\202\0" \ + "\0\0\377\12~\201\215\377;J}\377:I{\377;H|\377;I|\377:I{\3779Iz\3779H" \ + "z\377ag~\377\6\6\6\377\202\0\0\0\377\2ko\200\377\36/i\377\204\30)d\377" \ + "\12\24&b\377Wa\201\377\20\17\16\377\0\0\0\377\30\27\25\377nw\227\377" \ + "3Bv\3777Fy\377L}\377\26(c\377\30)d\377\203\31*e" \ + "\377\3\30)d\377\35.h\377GT\204\377\204HV\205\377\10IU\205\377IV\205\377" \ + "IW\205\377IV\205\377HW\204\377IW\205\377JW\206\377IW\205\377\202JW\206" \ + "\377\5JV\206\377JW\206\377JX\206\377JW\206\377IX\206\377\202JX\206\377" \ + "\202KX\206\377\5KX\205\377KX\206\377KW\206\377KW\207\377KX\206\377\202" \ + "JY\207\377\2KX\207\377KY\207\377\202LY\207\377\1KY\207\377\223LY\207" \ + "\377\1KY\207\377\202LY\207\377\10KY\207\377KX\207\377KY\207\377JY\207" \ + "\377KX\207\377KW\206\377KW\207\377KX\206\377\202KX\205\377\202KX\206" \ + "\377\1JX\206\377\202IX\206\377\3JX\206\377JW\206\377JV\206\377\203JW" \ + "\206\377\203IW\205\377\4IV\205\377IW\205\377IV\205\377IU\205\377\202" \ + "HV\205\377\10GV\205\377IV\205\3776Dx\377\27(d\377\30*e\377\31*e\377S" \ + "]\202\377\4\4\4\377\202\0\0\0\377\6\13\13\13\377ks\215\377ES\203\377" \ + "ER\203\377\\h\222\377DDF\377\203\0\0\0\377\13ps\177\377MZ\212\377ES\203" \ + "\377BP\201\377u\200\242\377\36\36\33\377\0\0\0\377\5\4\4\377hn\205\377" \ + "CQ\201\377px\221\377\203\0\0\0\377\7\206\215\243\377BO\200\377=K}\377" \ + "\31*e\377\32+e\377]f\204\377...\377\202\0\0\0\377\2\31\30\30\377\27\27" \ + "\27\377\202\0\0\0\377\5@AB\377nv\225\377@N\177\377_h\215\377\30\31\32" \ + "\377\202\0\0\0\377\5\210\215\236\377;J}\377FT\203\377qx\215\377\31\31" \ + "\31\377\202\0\0\0\377\2\36\36\37\377\21\21\20\377\202\0\0\0\377\31UV" \ + "X\377fp\225\377#2l\377ip\207\377\21\20\16\377\0\0\0\377\1\1\1\377\"#" \ + "%\377'(+\377\5\5\5\377\0\0\0\377EEF\377\\g\214\377:I}\377w{\207\377\7" \ + "\6\3\377\0\0\0\377\2\2\2\377'')\377%&(\377\3\3\3\377\0\0\0\377PQS\377" \ + "\\h\217\3778Gz\377\203;I|\377\5""9Iz\377:I{\3779Hz\377`f}\377\2\2\1\377" \ + "\202\0\0\0\377\2jo\177\377\36/j\377\204\31*e\377\14\24&b\377Wa\200\377" \ + "\14\13\12\377\0\0\0\377\27\26\24\377lv\227\3773Bv\3776Fy\3776Ex\377;" \ + "I|\377mu\220\377(((\377\202\0\0\0\377\2\35\35\36\377\24\24\24\377\202" \ + "\0\0\0\377\6HHH\377]h\217\377\25&b\377\37""0j\377bh\202\377\31\31\30" \ + "\377\202\0\0\0\377\2\35\36\36\377\22\21\21\377\202\0\0\0\377\5SSW\377" \ + "HT\201\377\30)d\3770\77r\377RTY\377\204\0\0\0\377\11VY_\377122\377\0" \ + "\0\0\377\6\6\6\377\\e\203\3770\77t\377\77M\177\377uy\205\377\20\20\15" \ + "\377\202\0\0\0\377\1\2\2\1\377\202\0\0\0\377\5///\377ck\205\377\32+f" \ + "\377$4m\377QVc\377\202\0\0\0\377\4&&'\377FS\201\377\25&c\377Y^p\377\202" \ + "\0\0\0\377\4""667\377DR\204\377%6n\377\212\216\235\377\202\0\0\0\377" \ + "\6\32\33\34\377LX\202\377+;q\377,\377" \ + "\207\214\237\377BP\201\377ES\203\377BP\201\377r}\240\377RQQ\377AAC\377" \ + "FFG\377qw\217\377BQ\201\377px\222\377BCE\377ABD\377\77\77A\377\200\207" \ + "\236\377CP\201\377&7n\377\202\30)d\377\77\27(d\377mu\224\377fis\377B" \ + "CF\377$%&\377#$%\37778:\377wy\204\377nz\235\377>L}\377@N\177\377_i\216" \ + "\377QQU\377ABD\377@@A\377\206\213\235\377;K|\377@N\177\377ES\203\377" \ + "\203\212\237\377egp\377\77@B\377\40\40!\377&'(\377<>@\377|\200\215\377" \ + "\\g\221\3779Gz\377\36.h\377\35.h\377s{\225\377QSX\377-./\377\37\40!\377" \ + "((*\377DDH\377dgs\377LY\204\377\30)d\377=K}\377DR\202\377\206\213\236" \ + "\377LMQ\377-./\377\37\37\40\377--/\377HIM\377qu\177\377bm\224\377:I{" \ + "\377;J|\377;I|\377:I{\377;I|\3779Iz\377:I{\3779Hz\377jq\211\377CDF\377" \ + "@@C\377<<>\377qu\206\377\35.i\377\204\31*e\377\7\24&b\377[e\206\377H" \ + "HI\377\77@C\377NNN\377lv\227\3773Bv\377\2037Fy\377D8Fz\377w\177\232\377" \ + "gjs\377BCE\377\"\"#\377%&'\37799;\377tw\204\377]i\221\377%5m\377\30)" \ + "d\377\31*e\377\36/i\377u|\225\377^ak\377==@\377\40\40!\377&'(\377;<>" \ + "\377sw\210\377;I|\377\25&b\377\31*e\377\27(d\377KX\206\377iks\377../" \ + "\377113\377ehq\377y\204\247\377Z[\\\377@@B\377FGI\377`i\210\3770\77t" \ + "\377/\77t\377:I|\377z\201\233\377PRW\377./0\377!\"#\3779:<\377fhr\377" \ + "[f\216\377\27(d\377\30)d\377\"3l\377bfu\377=>@\377>\77A\377STW\377BO" \ + "}\377\25'c\377fl\177\377BCE\377\77@B\377]^`\377GU\205\377%6n\377\207" \ + "\214\234\377;<=\377@AC\377QRU\377KX\202\377+;q\377,M~\377@N\177\377\77M~\377>M\177\377M[\212\377Zf\222\377cn\223\377`k" \ + "\223\377[g\222\377CQ\203\377=K|\3775Dx\377\30)e\377\30)d\377\25&c\377" \ + "1@w\377\77M}\377FR\200\377BP~\3775Dz\377%6o\377\26'c\377'7o\377>L}\377" \ + "L~\3770\77t\3771@u\377" \ + "0\77t\3770\77u\3775E{\377\77M~\377ER\177\3779H|\377'7q\377\25&b\377\30" \ + ")d\377\31*e\377\32+f\377/\77u\377\2026F{\377\4""4Dz\377!2j\377\30)d\377" \ + "/>u\377\2026F{\377\14""4Dz\377/>s\377+;q\377CR\201\377IV\207\377HU\207" \ + "\377HU\206\3773Cw\377+;q\377,s\377HV\204\377\202FT\203" \ + "\377\4FS\203\377FT\203\377ET\202\377FT\203\377\203ES\202\377\202ER\202" \ + "\377\11ES\203\377DS\203\377ES\202\377DR\203\377DS\201\377DR\201\377D" \ + "Q\201\377CQ\201\377DR\202\377\203CQ\201\377\4CR\202\377DQ\201\377%4m" \ + "\377\30)d\377\203\31*e\377\204\30)d\377\2""1Au\377BP\200\377\202AO\177" \ + "\377\2AO\200\377@N\200\377\203@N\177\377\5AN\200\377\77N~\377@N\177\377" \ + "@M\177\377@N\177\377\202\77M~\377\1@N~\377\204>L~\377\4\77M~\377'6n\377" \ + "\30)d\377\31*e\377\207\30)d\377\2\26'c\377:Iz\377\202=K}\377\203;J|\377" \ + "\204;I{\377\5:J|\377;J|\377;I|\377;H|\377;I|\377\204:I{\377\1'7n\377" \ + "\205\30)d\377\205\31*e\377\202\30)d\377\20%5l\3779Gz\3778Ex\3776Fy\377" \ + "7Fy\3777Ey\3777Fy\3777Dy\3776Dx\3775Dx\3775Dy\3775Dx\3775Ew\3775Dw\377" \ + "5Dx\3774Cw\377\202\30)d\377\202\31*e\377\210\30)d\377\202\31*e\377\4" \ + "\30)d\377\35.h\3773Bv\3771Bu\377\2031@u\377\4""1@v\3771@u\3771@t\377" \ + "0\77t\377\2031@u\377\2/>s\377\33,f\377\205\30)d\377\202\31*e\377\206" \ + "\30)d\377\1\31*e\377\203\30)d\377\4\27(d\377,L}\377AO\177\377AO\200\377BP\200\377@N\200" \ + "\377\204AO\200\377\4@O\177\377\77N~\377@N\177\377@M\177\377\203@N\177" \ + "\377\2\77M\177\377>L\177\377\202\77M\177\377\2\77M}\377>L}\377\202\30" \ + ")d\377\207\31*e\377\11\30)d\377!2j\377>K}\377=J|\377s\377CP\200\377AO\177\377BP\200\377AO\200\377@N\200\377\204A" \ + "O\200\377\3@N\177\377\77O~\377@M\177\377\203@N\177\377\202\77M\177\377" \ + "\6>L\177\377\77M~\377\77M\177\377>L~\3777Ex\377\32+e\377\210\31*e\377" \ + "\2\30)d\377\40""1j\377\202=K}\377\3" \ + "L}\377AO\177\377BP\200\377\202AO\200\377\1@N\200\377\202AO\200\377\3" \ + "@O\177\377AO\200\377\77O~\377\206@N\177\377\1>L\177\377\202\77M\177\377" \ + "\202\77M~\377\2-=s\377\30)d\377\210\31*e\377\3\27(d\3770>t\377=K}\377" \ + "\202L\177\377\77M\177\377" \ + "\77M~\377>L~\377@M~\377\37/i\377\30)d\377\207\31*e\377\2\30)d\377\31" \ + "*e\377\202=K}\377\5L~\377\77M~\3775Dx\377\26(c\377\210" \ + "\31*e\377\11\30)d\377(9o\377>K}\377=K}\377s\3778Fy\3777Fy\3776Fy\377\2027Fy\377\2""7Ey\3776" \ + "Dy\377\2026Ey\377\10""6Ex\3776Ew\3776Ex\3776Dx\3775Dx\3775Cw\377\30(" \ + "d\377\30)d\377\214\31*e\377\5\30)d\377\27(d\3772Au\3772Bv\3772@v\377" \ + "\2032Av\377\3""2Au\3771@u\3770\77u\377\2021@u\377\4""0\77t\3772Au\377" \ + "\36/h\377\30)d\377\220\31*e\377\5\30)d\377\37/i\377-=r\377-L\177\377\77M\177\377\202\77M~\377\1""2Au\377\212\31*e\377\17" \ + "\37/i\377:I{\377=J|\377L\177\377\202\77M\177\377\4>L~\377>L}\377#3k\377\30)d" \ + "\377\210\31*e\377\2\30)d\377(8n\377\202=K}\377\3L\177\377\77M\177\377\202\77M~\377\3""9Gz\377" \ + "\27)d\377\30)d\377\207\31*e\377\4\31)d\377\27(d\377:I{\377=K}\377\203" \ + "s\3771Bv\377\2042Av\377" \ + "\3""2Au\3772At\3770\77u\377\2041@u\377\1(8o\377\221\31*e\377\6\30)d\377" \ + "\32+f\377.=s\377-=r\377-L~\377=J|\377t\377\32+e\377\216\31*e\377\3\35-g\377" \ + "1@u\3771Av\377\2042Av\377\3""2Au\3771@t\3770\77u\377\2031@u\377\3""0" \ + "\77t\377#3k\377\30)d\377\220\31*e\377\5\30)d\377\40""0j\377-=s\377-=" \ + "q\377-;r\377\202-t\377\26'b\377\30)d\377\205\31*e\377\10" \ + "\30)d\377\27(d\377\37""0i\377/\77t\377GU\204\377IW\206\377HV\205\377" \ + "GV\205\377\203HV\205\377\3IV\205\377HV\205\377IV\205\377\202IU\205\377" \ + "\204IV\205\377\205IW\205\377\1IV\205\377\215IW\205\377\204IV\205\377" \ + "\202IU\205\377\2IV\205\377HV\205\377\202IV\205\377\202HV\205\377\10G" \ + "U\204\377HV\205\377JX\206\377>L~\377'7n\377\32+f\377\27)d\377\30)e\377" \ + "\205\31*e\377\6\30)d\377\34-g\377L\177\377\77M~\377\77" \ + "M\177\377\77M~\3775Cw\377\27)d\377\210\31*e\377\3\30)d\377\32+f\377:" \ + "H{\377\202=K}\377\4;K}\377L\177\377\202\77M\177\377\4>L~\377>L}\377#3l\377" \ + "\30)d\377\210\31*e\377\4\30)d\377'7n\377s\3778Fy\3777Fy\3776Fy\377\2027Fy\377\14""7Ey\3777Dy\3776Ey\3776Ex" \ + "\3776Ey\3776Ew\3776Dx\3775Dx\3776Cw\3775Dx\377\37/i\377\30)d\377\215" \ + "\31*e\377\11\30)d\377(8o\3772Bv\3772Av\3772@v\3772Av\3772Au\3772Av\377" \ + "2At\377\2051@u\377\3/>t\377\27)d\377\30)d\377\221\31*e\377\2*:q\377," \ + "=q\377\202-L\177\377\203\77M~\377\2""9Gz\377\32" \ + "*e\377\211\31*e\377\2\30)d\3776Ex\377\202=K}\377\4L~\377%5m\377\202\31*e\377\202" \ + "\30)d\377\206\31*e\377\4\30)d\377\27(d\377-=r\377FT\204\377\202GU\204" \ + "\377\2FU\203\377GT\204\377\202FS\203\377\202ET\202\377\202FT\203\377" \ + "\10FS\203\377FT\203\377FS\203\377FR\203\377ES\203\377FS\203\377ES\203" \ + "\377DS\203\377\202ES\203\377\4ES\202\377ES\201\377DR\202\377EQ\202\377" \ + "\202CR\202\377\204DR\202\377\5DQ\201\377DP\200\377DR\202\377\36/h\377" \ + "\30)d\377\207\31*e\377\7\31*d\3776Ey\377BP\200\377AO\177\377BP\200\377" \ + "AO\200\377@N\200\377\204AO\200\377\4@O\177\377\77N~\377\77O~\377@M\177" \ + "\377\203@N\177\377\3\77M\177\377@N\177\377>L\177\377\202\77M\177\377" \ + "\4>L}\377@N~\377'7n\377\30)d\377\210\31*e\377\11\30)d\377#3l\377>L~\377" \ + "=K}\377M~\377HV\205\377" \ + "FT\203\377FU\203\377GT\204\377FT\203\377FS\203\377FT\203\377ET\202\377" \ + "\203FT\203\377\203FS\203\377\14FR\203\377ES\203\377FS\203\377ES\203\377" \ + "DS\203\377ES\202\377ES\203\377ES\202\377ES\201\377ER\202\377DQ\202\377" \ + "CR\202\377\204DR\202\377\6DQ\201\377DR\202\377DQ\201\377BO\200\377$4" \ + "l\377\27(d\377\207\31*e\377\10\27)d\377)8o\377BP\200\377AO\177\377AO" \ + "\200\377BP\200\377AO\200\377@N\200\377\202AO\200\377\5@O\177\377AO\200" \ + "\377@O\177\377\77N~\377@M\177\377\204@N\177\377\204\77M\177\377\202\77" \ + "M~\377\2""6Ex\377\26'c\377\210\31*e\377\202\30)d\377\1""9H{\377\202=" \ + "K}\377\2s\377\30)d\377\221\31*e\377\7\30)d\377" \ + "\"2k\377-=r\377-L~\3774Cw\377&6n\377\35-g\377\33+f\377" \ + "\30*d\377\203\30)d\377\207\31*e\377\10\30)d\377\26'c\377$5l\377\77N\177" \ + "\377FS\203\377GU\204\377FT\203\377GU\204\377\202GT\204\377\3GS\204\377" \ + "FT\203\377ET\202\377\205FT\203\377\6FS\203\377FR\203\377ES\203\377FS" \ + "\203\377ES\203\377DS\203\377\202ES\203\377\4ER\202\377ER\201\377DR\202" \ + "\377EQ\202\377\202CR\202\377\205DR\202\377\4CQ\201\377DQ\201\377(8o\377" \ + "\30)d\377\207\31*e\377\2\30)d\377\37/i\377\204BP\200\377\2AO\200\377" \ + "@N\200\377\204AO\200\377\4@O\177\377\77O~\377@N\177\377@M\177\377\203" \ + "@N\177\377\202\77M\177\377\7>L\177\377\77M~\377\77M\177\377>L~\377=K" \ + "}\377\36/h\377\30)d\377\210\31*e\377\6\30)d\377&6n\377=K}\377s\3772Bv\3775Dw\3778Fy\377;J{\377=K}\377=L}\377L~\377B" \ + "P\177\377\202BP\200\377\2AO\200\377@N\200\377\203AO\200\377\203@O\177" \ + "\377\2@N\177\377@M\177\377\203@N\177\377\3\77M\177\377@N\177\377>L\177" \ + "\377\202\77M\177\377\4>L~\377\77M~\377/\77s\377\30)d\377\212\31*e\377" \ + "\7""5Cw\377s\377-=r\377-s\377\77M~\377FT\203\377GU\204\377FT\203\377GU\204\377GT\204\377" \ + "FT\203\377GS\204\377FS\203\377FT\203\377ET\202\377\205FT\203\377\2FS" \ + "\203\377FR\203\377\202FS\203\377\1ES\203\377\202DS\203\377\2ES\203\377" \ + "ES\202\377\202ER\201\377\1DQ\202\377\210DR\202\377\4CQ\201\377DQ\201" \ + "\377.=s\377\30)d\377\210\31*e\377\4\27(d\3772Bv\377BP\200\377AO\177\377" \ + "\210AO\200\377\3@N\177\377\77O~\377@M\177\377\205@N\177\377\10\77M\177" \ + "\377>L\177\377\77M~\377\77M\177\377\77M~\377=K|\377\31*e\377\30)d\377" \ + "\210\31*e\377\2\30)d\377\40""0i\377\202=K}\377\203L\177\377\77" \ + "M~\377\77M\177\377\77M}\377@N~\377\"2k\377\30)d\377\210\31*e\377\3\30" \ + ")d\377\27(d\3775Dx\377\202=K}\377\3s\377#3k\377\30)d\377\26'c\377\27)d\377\30)d\377\233" \ + "\31*e\377\10\30)d\377\27(c\377\26'c\377\33,g\377(8o\3774Cw\377\77N\177" \ + "\377HV\204\377\202GU\204\377\10FU\203\377GU\204\377GT\204\377FT\203\377" \ + "GS\204\377FS\203\377FT\203\377ET\202\377\203FT\203\377\2FS\203\377FT" \ + "\203\377\202FS\203\377\2FR\203\377FS\203\377\202ES\203\377\202DS\203" \ + "\377\6ES\202\377ES\203\377ER\202\377ES\201\377DR\202\377EQ\202\377\210" \ + "DR\202\377\3CQ\201\377DQ\201\3774Cw\377\202\30)d\377\207\31*e\377\2\30" \ + ")d\377$4l\377\202AO\177\377\202BP\200\377\2AO\200\377@N\200\377\204A" \ + "O\200\377\1@O\177\377\202@N\177\377\1@M\177\377\203@N\177\377\5\77M\177" \ + "\377@N\177\377\77M\177\377>L\177\377\77M\177\377\202\77M~\377\1""3Bv" \ + "\377\212\31*e\377\6\30)d\377(7o\377>L}\377=J|\377t\377\77M\177\377HV\204\377\202GU\204\377\10FT\203\377G" \ + "U\204\377GT\204\377FT\203\377GT\204\377GS\204\377FT\203\377GT\204\377" \ + "\202ET\202\377\203FT\203\377\1FS\203\377\202FT\203\377\2FS\203\377FR" \ + "\203\377\202FS\203\377\202ES\203\377\2DS\203\377ES\202\377\202ES\203" \ + "\377\202ES\201\377\202EQ\202\377\2DR\202\377CR\202\377\204DR\202\377" \ + "\2DQ\201\377DR\202\377\202DQ\201\377\2""8Fy\377\32*e\377\207\31*e\377" \ + "\202\30)d\377\7\35.g\377@N\177\377BP\200\377AO\200\377BP\200\377AO\200" \ + "\377@N\200\377\203AO\200\377\5@O\177\377AO\200\377@O\177\377\77O~\377" \ + "@M\177\377\205@N\177\377\202\77M\177\377\6\77M~\377>M~\377\77M}\377>" \ + "L}\377\40""0i\377\30)d\377\210\31*e\377\11\30)d\377\34-g\3778Gz\377<" \ + "J|\377=K}\377;K}\377L~\3777Fy\377" \ + "2Au\377,;r\377'6n\377!2j\377\34-g\377\31*e\377\27(d\377\203\26'c\377" \ + "\2\26(c\377\27(c\377\203\26'c\377\16\27'c\377\30)d\377\32+e\377\36/h" \ + "\377#4l\377)9o\377.=s\3774Cw\377:I{\377BP\201\377JW\206\377HV\205\377" \ + "GU\204\377FT\203\377\202GU\204\377\5GT\204\377FT\203\377GT\204\377GS" \ + "\204\377FS\203\377\202FT\203\377\1ET\202\377\206FT\203\377\202FS\203" \ + "\377\2FR\203\377ES\203\377\202FS\203\377\5ES\203\377DS\203\377ES\202" \ + "\377ES\203\377ER\202\377\202ES\202\377\4DR\202\377ER\202\377DR\202\377" \ + "CR\202\377\204DR\202\377\5DQ\201\377DR\202\377CQ\201\377DQ\201\3771A" \ + "v\377\202\30)d\377\207\31*e\377\10\30)d\377\37/i\377\77M~\377BP\200\377" \ + "AO\177\377BP\200\377AO\200\377@N\200\377\203AO\200\377\4@O\177\377AO" \ + "\200\377@O\177\377\77O~\377\205@N\177\377\203\77M\177\377\6\77M~\377" \ + "\77M\177\377>L~\377@N\177\377-t\3778Ex\3777Fy\3776Fy\377\2027Fy\377\202" \ + "7Ey\377\12""6Ey\3775Ey\3776Ey\3776Ex\3776Ew\3776Dx\3775Dx\3776Dx\377" \ + "(7o\377\30)d\377\215\31*e\377\202\30)d\377\3""1@u\3771Bv\3772@v\377\203" \ + "2Av\377\4""2Au\3771@t\3771@u\3770\77u\377\2031@u\377\2,t\377\31*e\377\30)d\377\210\31*e\377\7\33,f\377<" \ + "J|\377BP\200\377AO\177\377BP\200\377AO\200\377@N\200\377\205AO\200\377" \ + "\4@O\177\377\77N~\377@N\177\377@M\177\377\205@N\177\377\202>L\177\377" \ + "\1\77M\177\377\202\77M~\377\3""8Gz\377\31*e\377\30)d\377\210\31*e\377" \ + "\10\30)d\377\37/i\377>L}\377=K}\377L\177\377\202" \ + "\77M~\377\4>L~\377>L}\377#3k\377\30)d\377\212\31*e\377\1""7Fy\377\202" \ + "=K}\377\5L\177\377\202\77M\177\377\4>L" \ + "~\377@N~\377-=r\377\30)d\377\211\31*e\377\2\30)d\377'7n\377\202s\377\30)d\377" \ + "\213\31*e\377\6\30)d\377\33,g\3778Fz\3778Fx\3777Fy\3776Fy\377\2027Fy" \ + "\377\14""7Ey\3776Dy\3776Ey\3776Ex\3776Ey\3776Ew\3776Dx\3776Ex\3776Cx" \ + "\3776Dx\377%6m\377\30)d\377\216\31*e\377\12\32+f\377/>t\3771Bu\3772A" \ + "v\3772@v\3772Av\3772Au\3771@u\3772At\3770\77u\377\2031@u\377\2""0\77" \ + "t\377-L\177\377\202\77M\177\377\202\77M~\377\2""5Dx\377\26'c\377\211" \ + "\31*e\377\4\30)d\377\32+e\377:I{\377=K}\377\202L\177\377\202\77M~\377\4>L}\377;J|\377\34-g\377" \ + "\30)d\377\210\31*e\377\12\30)e\377\27(c\3772Au\377=K}\377L~\377\202DQ\201\377\3CQ\201\377DR\202\377DQ\201\377\205" \ + "DR\202\377\1CR\202\377\202DR\202\377\6EQ\202\377ER\202\377ER\201\377" \ + "ES\201\377ER\202\377ES\202\377\202ES\203\377\1ES\202\377\202DS\203\377" \ + "\2FS\203\377ES\203\377\202FS\203\377\1ES\203\377\202FR\203\377\204FS" \ + "\203\377\242FT\203\377\203FS\203\377\202FR\203\377\3FS\203\377ES\203" \ + "\377FS\203\377\203ES\203\377\12DS\203\377ES\203\377ES\202\377ES\203\377" \ + "ES\202\377ER\202\377ES\201\377ER\201\377DR\202\377EQ\202\377\202DR\202" \ + "\377\1CR\202\377\205DR\202\377\10DQ\201\377DR\202\377CR\202\377DQ\201" \ + "\377CQ\201\3771@t\377\26'c\377\30)d\377\210\31*e\377\4\30)d\377\32+e" \ + "\3776Ex\377BP\200\377\202AO\200\377\1BP\200\377\207AO\200\377\2AN\200" \ + "\377\77O~\377\205@N\177\377\2\77M\177\377@N\177\377\202\77M\177\377\6" \ + "\77M~\377\77M\177\377\77M}\377\77M~\377$5l\377\30)d\377\211\31*e\377" \ + "\2\30)d\377#3l\377\202L\177\377\77M~\377\77M\177\377\77M" \ + "~\377@M~\377+;q\377\27(c\377\212\31*e\377\2\30)d\3775Ex\377\202=K}\377" \ + "\203L\177\377\202\77M\177\377\5\77M~\377>L}\377" \ + "5Cw\377\31*e\377\30)d\377\211\31*e\377\3\27(d\377,K}\377\202<" \ + "K}\377\4;K}\377L~\377\77M~\377=K|\377" \ + "\35.h\377\30)d\377\211\31*e\377\7\30)d\377$4l\377>L~\377t\377\26(c\377\216\31*e\377\3\30)" \ + "d\377\40""0i\3772Bv\377\2052Av\377\3""2Au\3771@t\3770\77u\377\2041@u" \ + "\377\1(7o\377\222\31*e\377\7\30)d\377\40""0i\377-=s\377-L\177\377\77M~\377\77M\177\377\77M~\377@N~\377\40""1j\377\30)d\377\212" \ + "\31*e\377\2\33,f\3779H{\377\202=K}\377\2L\177\377\77M\177\377\77M" \ + "~\377\77M\177\377>L~\377\77M~\377*:p\377\30)d\377\211\31*e\377\202\30" \ + ")d\377\1""4Bw\377\202=K}\377\5t\377\32*e\377\216\31*e\377" \ + "\5\30)d\377\34,g\3774Cw\3771Bu\3772@v\377\2032Av\377\2""2Au\3771@t\377" \ + "\2051@u\377\1.=s\377\202\30)d\377\220\31*e\377\6\30)d\377\33,f\377.>" \ + "s\377,=q\377-;r\377-L\177" \ + "\377\77M~\377\77M\177\377>L~\377AO\177\377,s\377=K}\377L}\377\40""1j\377\30)d\377\212\31*e\377\202\30)d\377\10!1j\377@" \ + "N\200\377BP\200\377AO\177\377AO\200\377BP\200\377AO\200\377@N\200\377" \ + "\206AO\200\377\4@O\177\377\77O~\377@O\177\377@M\177\377\206@N\177\377" \ + "\10>L\177\377\77M\177\377\77M~\377\77M\177\377>L~\377\77M~\377/\77t\377" \ + "\27(d\377\212\31*e\377\2\30)d\377\"3k\377\202L~\377@M~\3774Cw\377\213" \ + "\31*e\377\3\30)d\377\33,f\377:H{\377\202=K}\377\5L\177\377\77M\177\377\77M~\377\77M\177\377" \ + ">L~\377\77M~\3777Fy\377\27(d\377\30)d\377\211\31*e\377\202\30)d\377\1" \ + "7Fy\377\202=K}\377\2s\377" \ + "\217\31*e\377\202\30)d\377\10""0@u\3772Bv\3772Av\3772@v\3772Av\3772A" \ + "u\3771@u\3772At\377\2041@u\377\2020\77t\377\2\37""0i\377\30)d\377\221" \ + "\31*e\377\7\30)d\377$4l\377-=r\377-L~\377\77M~\3778Gz\377" \ + "\32+f\377\30)d\377\212\31*e\377\7\30)d\377+:q\377=K}\377L\177\377\7\77M\177\377\77" \ + "M~\377>L\177\377\77M~\377=L}\377\33,f\377\30)d\377\212\31*e\377\3\30" \ + ")d\377!1j\377=L}\377\202=K}\377\202L~\377\77M}\377;J|\377\35-h\377\30)d\377\212\31*e\377\12" \ + "\30)d\377!1j\377=K}\377=J|\377=K}\377L\177\377\77M~\377\77M\177\377>L~\377\77M" \ + "~\377=L~\377\37""0i\377\30)d\377\212\31*e\377\7\30)d\377\34-g\377:H{" \ + "\377=K}\377=J|\377L}\377" \ + "AO\177\377\207DQ\201\377\240DR\202\377\2DQ\201\377CQ\201\377\203DQ\201" \ + "\377\10CP\200\377@M~\377=K}\3772Av\377\40""1i\377\27(c\377\30)d\377\31" \ + "*d\377\215\31*e\377\202\30)d\377\7\34,g\3772@u\377CQ\201\377AO\177\377" \ + "BP\200\377AO\200\377BP\200\377\202AO\200\377\1@N\200\377\207AO\200\377" \ + "\4@N\177\377\77O~\377@N\177\377@M\177\377\206@N\177\377\12\77M\177\377" \ + ">L\177\377\77M\177\377\77M~\377\77M\177\377>L~\377\77M~\377:I{\377\34" \ + ",g\377\30)d\377\212\31*e\377\3\30)d\377\33,f\377:I{\377\202=K}\377\5" \ + "s\377\33,f\377\222\31*e\377\10\30)d\377#3l\377-=r" \ + "\377-M}\377FS\202\377ER\201\377DQ\201\377DQ\200\377CQ\201\377\203" \ + "DQ\201\377\227DR\202\377\203DQ\201\377\1CQ\201\377\202DQ\201\377\10F" \ + "R\202\377DR\201\3779G{\377-L\177\377\77M~\377\77" \ + "M\177\377>L~\377\77M~\3778Gz\377\34-g\377\30)d\377\213\31*e\377\17\32" \ + "+f\3777Ey\377=K}\377L~\377" \ + "#3k\377\32*e\377\202\30)d\377\220\31*e\377\202\30)d\377\7\27(d\377\34" \ + "-g\377+;q\3778Fy\377\77M\177\377BO\177\377BO\200\377\202CP\200\377\204" \ + "DQ\201\377\2DQ\200\377DP\200\377\203DQ\201\377\1CQ\201\377\202DQ\201" \ + "\377\1CQ\201\377\204DQ\201\377\2DP\200\377DQ\200\377\204DQ\201\377\2" \ + "CP\200\377BP\200\377\202BO\177\377\5=K}\3774Bv\377&6m\377\30)d\377\27" \ + ")d\377\202\30)d\377\220\31*e\377\4\30)d\377\31*e\377\32+f\3770\77t\377" \ + "\202BP\200\377\2AO\177\377AO\200\377\202BP\200\377\210AO\200\377\202" \ + "@O\177\377\3@N\177\377\77O~\377@O\177\377\202@M\177\377\204@N\177\377" \ + "\202\77M\177\377\10@N\177\377>L\177\377\77M\177\377\77M~\377\77M\177" \ + "\377>L~\377\77M~\3777Fy\377\202\30)d\377\212\31*e\377\202\30)d\377\1" \ + "4Cw\377\203=K}\377\5;K}\377L}\377@M~\377AO\177\377CP\201\377ER\202\377\205" \ + "FS\202\377\17DQ\202\377BP\200\377AN\177\377\77L~\377=K}\377;I{\3777F" \ + "y\3772Au\377,;r\377'8o\377\"3k\377\36/h\377\31*e\377\26'c\377\27(c\377" \ + "\202\30)d\377\221\31*e\377\6\30)d\377\26'c\377\40""1j\3771@u\377@N\177" \ + "\377CQ\200\377\202BP\200\377\2AO\200\377BP\200\377\202AO\200\377\202" \ + "@N\200\377\204AO\200\377\1@O\177\377\202AO\200\377\2@N\177\377\77O~\377" \ + "\207@N\177\377\14\77M\177\377@N\177\377\77M\177\377>L\177\377\77M\177" \ + "\377\77M~\377\77M\177\377>L~\377@N\177\3772Av\377\32+e\377\30)d\377\214" \ + "\31*e\377\11""2Av\377>L}\377L\177\377\77M\177\377\77" \ + "M~\377\77M\177\377>M~\377@M~\377.>s\377\27)d\377\30)d\377\213\31*e\377" \ + "\5\30)d\377.=s\377=K}\377K}\377.>s\377" \ + "#3k\377\32*e\377\27(d\377\30)d\377\235\31*e\377\205\30)d\377\234\31*" \ + "e\377\13\31*d\377\30)d\377\27(d\377\36.h\377'7n\3775Dw\377CP\201\377" \ + "BP\200\377AO\177\377BP\200\377AO\200\377\202BP\200\377\212AO\200\377" \ + "\202@O\177\377\2\77O~\377@N\177\377\202@M\177\377\204@N\177\377\2\77" \ + "M\177\377@N\177\377\202\77M\177\377\10>L\177\377\77M~\377\77M\177\377" \ + ">L~\377\77M~\377@M~\377,L~\377s\377\30" \ + ")d\377\215\31*e\377\4\30)d\377(7o\3777Ey\3777Fx\377\2047Fy\377\2027E" \ + "y\377\13""6Ey\3775Ey\3776Ey\3776Ex\3776Ew\3776Ex\3775Dx\3776Cw\3775D" \ + "x\377$4l\377\30)d\377\216\31*e\377\202\30)d\377\12/\77t\3772Bv\3772A" \ + "v\3772@v\3772Av\3772Au\3772Av\3772At\3771@u\3770\77u\377\2041@u\377\1" \ + ")9p\377\224\31*e\377\3&6n\377-=r\377-L\177\377\202\77M\177\377\202\77M~\377\2@N~\377&6m\377\202\30)d\377" \ + "\213\31*e\377\12\30)d\377+:p\377L~\377" \ + "CQ\201\377BP\200\377BP\177\377\204BP\200\377\202AO\200\377\1@N\200\377" \ + "\206AO\200\377\1@O\177\377\202AO\200\377\5@N\177\377@O\177\377\77N~\377" \ + "@N\177\377@M\177\377\207@N\177\377\202\77M\177\377\1>L\177\377\202\77" \ + "M\177\377\203\77M~\377\3:Hz\377\"2k\377\30)d\377\213\31*e\377\5\30)d" \ + "\377\31*e\377*9p\377>L~\377=K}\377\203L}\3778Gz" \ + "\377-L\177\377\77M\177" \ + "\377\202\77M~\377\4>L}\377@M~\3771@u\377\34-g\377\202\30)d\377\213\31" \ + "*e\377\13\30*e\3770@u\377=K}\377L\177\377\202\77M\177\377\6\77M~\377>L~\377" \ + "\77M~\377>L}\377,K}\377\202=K}\377\4;K}\377s\3776Ex\377=K}\377" \ + "\202CQ\200\377\204BP\200\377\1AO\200\377\203BP\200\377\202AO\200\377" \ + "\202@N\200\377\212AO\200\377\4@N\177\377@O\177\377\77O~\377@N\177\377" \ + "\202@M\177\377\207@N\177\377\202\77M\177\377\2>L\177\377\77M~\377\202" \ + "\77M\177\377\6>L~\377\77M~\377:H{\377\"2k\377\27(c\377\30)d\377\213\31" \ + "*e\377\14\30)d\377\33,f\3775Cw\377>L}\377s\377\31)e" \ + "\377\30)d\377\214\31*e\377\6\30)d\377\34-g\3776Ey\3778Fy\3777Fy\3776" \ + "Fy\377\2027Fy\377\16""7Ey\3776Ey\3777Dy\3776Ey\3775Ey\3776Ey\3776Ex\377" \ + "6Ew\3776Ex\3776Dx\3775Cx\3776Dx\377\36/h\377\30)d\377\216\31*e\377\202" \ + "\30)d\377\4,;r\3772Bv\3771Bu\3772@v\377\2032Av\377\2""2Au\3771@t\377" \ + "\2041@u\377\4""0\77t\3771@u\377\35-h\377\30)d\377\222\31*e\377\3\32+" \ + "e\377*:q\377,L\177\377\2@N\177\377\77M\177\377\207@N\177\377\202@M\177\377\7@N\177" \ + "\377\77N~\377\77O~\377AN\200\377@O\177\377AO\200\377@O\177\377\210AO" \ + "\200\377\202@N\200\377\3AO\200\377BP\200\377AO\200\377\203BP\200\377" \ + "\1AO\200\377\207BP\200\377\5>K}\3775Dw\377+;p\377#2k\377\32+f\377\225" \ + "\31*e\377\5\35.g\377&6m\377/>t\3778Gz\377@O\177\377\204BP\200\377\1A" \ + "O\177\377\202BP\200\377\1AO\200\377\203BP\200\377\3AO\200\377BP\200\377" \ + "AO\200\377\202@N\200\377\210AO\200\377\2@O\177\377AO\200\377\203@O\177" \ + "\377\1\77O~\377\202@N\177\377\1@M\177\377\210@N\177\377\202\77M\177\377" \ + "\2>L\177\377\77M~\377\202\77M\177\377\6>L~\377\77M}\377\77M~\3775Dx\377" \ + "\31*e\377\30)d\377\213\31*e\377\202\30)d\377\2\32+e\3779Gz\377\203=K" \ + "}\377\4;K}\377L\177\377\77M\177\377\202@N\177\377\1\77M\177\377\206@N\177\377" \ + "\1@M\177\377\202@N\177\377\1\77O~\377\202@O\177\377\202AO\200\377\1@" \ + "O\177\377\210AO\200\377\202@N\200\377\204AO\200\377\212BP\200\377\33" \ + "CQ\201\377DQ\201\377DR\201\377\77M~\377=K|\377:I{\3779Hz\3777Fy\3775" \ + "Dx\3774Cv\3772Au\3770\77t\377.>s\377-=r\377/\77s\3771@t\3772Bv\3774C" \ + "w\3776Ex\3778Gy\3779H{\377;J|\377=K}\377AO\177\377DR\201\377CQ\201\377" \ + "CQ\200\377\212BP\200\377\204AO\200\377\202@N\200\377\213AO\200\377\5" \ + "@O\177\377@N\177\377\77O~\377\77N~\377@N\177\377\202@M\177\377\206@N" \ + "\177\377\3\77M\177\377@N\177\377\77M\177\377\202>L\177\377\202\77M\177" \ + "\377\7\77M~\377>L~\377\77M~\377>M~\377*:p\377\27(d\377\30)d\377\214\31" \ + "*e\377\5\30)d\377\37/i\3779Hz\377=K}\377L\177\377\202\77M\177\377\2@N\177\377\77" \ + "M\177\377\206@N\177\377\202@M\177\377\5@N\177\377\77N~\377\77O~\377@" \ + "N\177\377@O\177\377\213AO\200\377\203@N\200\377\204AO\200\377\203BP\200" \ + "\377\1AO\200\377\241BP\200\377\1AO\200\377\203BP\200\377\204AO\200\377" \ + "\203@N\200\377\213AO\200\377\2@O\177\377@N\177\377\202\77O~\377\202@" \ + "N\177\377\1@M\177\377\211@N\177\377\1\77M\177\377\202>L\177\377\7\77" \ + "M~\377\77M\177\377\77M~\377>L}\377\77M~\3778Gz\377\35.h\377\202\30)d" \ + "\377\214\31*e\377\6\30)d\377\37/h\377L\177\377\203\77M\177\377\207@N\177\377" \ + "\202@M\177\377\202@N\177\377\1\77O~\377\203@O\177\377\215AO\200\377\203" \ + "@N\200\377\205AO\200\377\207BP\200\377\1AO\200\377\223BP\200\377\204" \ + "AO\200\377\204@N\200\377\213AO\200\377\1@O\177\377\202AO\200\377\202" \ + "@O\177\377\202\77O~\377\1@N\177\377\203@M\177\377\206@N\177\377\2\77" \ + "M\177\377@N\177\377\202\77M\177\377\11>L\177\377\77M\177\377\77M~\377" \ + "\77M\177\377\77M~\377>L}\377\77M~\377;I{\377+;q\377\202\30)d\377\214" \ + "\31*e\377\3\30*d\377\30)d\377$4l\377\202=K}\377\1=J|\377\202s\377\33,f\377\224\31*e\377\4+:p\377,=r\377-L}\377\77M~\377\204\77M\177" \ + "\377\2>L\177\377\77M\177\377\211@N\177\377\203@M\177\377\3@N\177\377" \ + "\77N~\377\77O~\377\203@O\177\377\202AO\200\377\1@O\177\377\213AO\200" \ + "\377\205@N\200\377\207AO\200\377\216BP\200\377\206AO\200\377\205@N\200" \ + "\377\214AO\200\377\1@O\177\377\202AO\200\377\4@O\177\377@N\177\377@O" \ + "\177\377\77N~\377\202@N\177\377\202@M\177\377\206@N\177\377\1\77M\177" \ + "\377\202@N\177\377\202\77M\177\377\1>L\177\377\203\77M\177\377\202\77" \ + "M~\377\3AO\177\3770\77u\377\34-g\377\202\30)d\377\214\31*e\377\6\30)" \ + "d\377\27(d\377/\77t\377L~\377\77M~\377\77M\177\377\77M~\377\77M\177\377>L\177\377\202" \ + "\77M\177\377\202@N\177\377\1\77M\177\377\207@N\177\377\202@M\177\377" \ + "\202@N\177\377\5\77N~\377\77O~\377@O\177\377@N\177\377@O\177\377\226" \ + "AO\200\377\216@N\200\377\222AO\200\377\1@O\177\377\202AO\200\377\202" \ + "@O\177\377\1@N\177\377\202\77O~\377\1\77N~\377\202@N\177\377\1@M\177" \ + "\377\212@N\177\377\202\77M\177\377\1>L\177\377\203\77M\177\377\10\77" \ + "M~\377>L~\377\77M}\377\77M~\3779Hz\377!2k\377\27(c\377\30)d\377\214\31" \ + "*e\377\15\30*d\377\30)d\377\35.h\3776Ex\377=K}\377s\3778Fz" \ + "\3778Ex\3776Fy\377\2027Fy\377\17""7Ey\3777Fy\3777Ey\3776Dy\3775Ey\377" \ + "6Ex\3776Ey\3776Ex\3776Dx\3776Ex\3775Dx\3776Cx\3775Dx\377\37""0j\377\30" \ + ")d\377\217\31*e\377\14\30)d\377\35.g\3772Bu\3771Av\3772Av\3772@v\377" \ + "2Av\3772Au\3772Av\3772Au\3771@u\3770\77u\377\2041@u\377\2-L\177\377\202\77M\177\377\212@N\177\377" \ + "\202@M\177\377\202@N\177\377\4\77N~\377\77O~\377@O\177\377@N\177\377" \ + "\202@O\177\377\202AO\200\377\1@O\177\377\255AO\200\377\1@O\177\377\203" \ + "AO\200\377\3@O\177\377@N\177\377@O\177\377\202\77O~\377\202@N\177\377" \ + "\203@M\177\377\207@N\177\377\2\77M\177\377@N\177\377\202\77M\177\377" \ + "\202>L\177\377\12\77M\177\377\77M~\377\77M\177\377\77M~\377>L~\377\77" \ + "M~\377=K}\377(7n\377\32+f\377\30)d\377\216\31*e\377\10\27(d\377&7n\377" \ + ":H{\377=K}\377L}\377\77M~\377>L}\377\202\77M~\377\2\77M\177\377\77M~\377\202\77M\177" \ + "\377\1>L\177\377\202\77M\177\377\2@N\177\377\77M\177\377\211@N\177\377" \ + "\202@M\177\377\203@N\177\377\2\77N~\377\77O~\377\204@O\177\377\244AO" \ + "\200\377\1@O\177\377\204AO\200\377\202@O\177\377\2@N\177\377@O\177\377" \ + "\202\77O~\377\1\77N~\377\202@N\177\377\202@M\177\377\211@N\177\377\2" \ + "\77M\177\377@N\177\377\203\77M\177\377\3>L\177\377\77M\177\377\77M~\377" \ + "\202\77M\177\377\1>L~\377\202\77M~\377\4>L}\3776Ex\377\33,f\377\30)d" \ + "\377\215\31*e\377\202\30)d\377\11\31*e\377,M}\377\77M" \ + "~\377\202\77M\177\377\3\77M~\377\77M\177\377>L\177\377\202\77M\177\377" \ + "\214@N\177\377\203@M\177\377\202@N\177\377\1\77N~\377\203\77O~\377\1" \ + "@N\177\377\203@O\177\377\241AO\200\377\203@O\177\377\1@N\177\377\203" \ + "\77O~\377\1\77N~\377\202@N\177\377\203@M\177\377\214@N\177\377\1\77M" \ + "\177\377\203>L\177\377\1\77M~\377\202\77M\177\377\10\77M~\377>L~\377" \ + "\77M~\377@M~\3771Au\377#3k\377\27(d\377\30)d\377\216\31*e\377\4\30)d" \ + "\377\37/h\3774Cw\377>L~\377\202=K}\377\2L}\377\202\77M~\377\3\77M\177\377\77M~\377\77M\177\377\202>L\177\377" \ + "\3\77M\177\377>L\177\377\77M\177\377\214@N\177\377\203@M\177\377\202" \ + "@N\177\377\1@M\177\377\203\77O~\377\2@O\177\377@N\177\377\202@O\177\377" \ + "\2\77O~\377@O\177\377\212AO\200\377\3@O\177\377AO\200\377@O\177\377\212" \ + "AO\200\377\2@O\177\377\77O~\377\202@O\177\377\2@N\177\377@O\177\377\203" \ + "\77O~\377\1@M\177\377\203@N\177\377\203@M\177\377\211@N\177\377\5\77" \ + "M\177\377@N\177\377\77M\177\377>L\177\377\77M\177\377\202>L\177\377\5" \ + "\77M\177\377\77M~\377\77M\177\377\77M~\377>L~\377\202\77M~\377\3""5C" \ + "w\377\34-g\377\31*e\377\202\30)d\377\216\31*e\377\11\30)d\377\"3k\377" \ + "L\177\377\202\77" \ + "M\177\377\202@N\177\377\1\77M\177\377\214@N\177\377\204@M\177\377\204" \ + "@N\177\377\1\77N~\377\211\77O~\377\204@O\177\377\212\77O~\377\1\77N~" \ + "\377\205@N\177\377\203@M\177\377\214@N\177\377\1\77M\177\377\202@N\177" \ + "\377\203\77M\177\377\1>L\177\377\202\77M\177\377\2\77M~\377\77M\177\377" \ + "\202\77M~\377\7\77M}\377@N~\377=K|\3771@u\377\40""1j\377\26(c\377\30" \ + ")d\377\217\31*e\377\6\30)d\377\33+f\377-M~\377=K}\377=J|\377\202" \ + "s\377,=r\377-<" \ + "r\377-;r\377-L~\377\202\77M~\377\2\77M\177\377\77M~\377\202" \ + "\77M\177\377\1>L\177\377\203\77M\177\377\203@N\177\377\1\77M\177\377" \ + "\215@N\177\377\205@M\177\377\211@N\177\377\205\77N~\377\211@N\177\377" \ + "\206@M\177\377\215@N\177\377\1\77M\177\377\202@N\177\377\203\77M\177" \ + "\377\202>L\177\377\2\77M\177\377\77M~\377\202\77M\177\377\2\77M~\377" \ + ">L~\377\202\77M~\377\4.=s\377\34,g\377\31*e\377\30)d\377\220\31*e\377" \ + "\6\27(d\377%4m\377:Hz\377=K}\377=J|\377=K}\377\202L}\377\202" \ + "\77M~\377\202\77M\177\377\2\77M~\377\77M\177\377\203>L\177\377\203\77" \ + "M\177\377\271@N\177\377\203\77M\177\377\203>L\177\377\204\77M\177\377" \ + "\3\77M~\377>L~\377\77M}\377\202\77M~\377\4;I{\3771@u\377\34-g\377\27" \ + "(c\377\220\31*e\377\202\30)d\377\5\35.h\3770\77t\377>L}\377L\177\377\204\77M\177\377\263@N\177\377" \ + "\204\77M\177\377\202>L\177\377\205\77M\177\377\202\77M~\377\6\77M}\377" \ + "@N~\377@N\177\3773Bv\377#3l\377\34-g\377\202\30)d\377\220\31*e\377\4" \ + "\30)d\377\27(d\377,s\377" \ + "\32+e\377\30)d\377\222\31*e\377\4\30)d\377\32+f\377,L}\377\77M~\377\77M}\377>L}\377\202\77M~\377\206\77M\177\377\203" \ + ">L\177\377\204\77M\177\377\204@N\177\377\1\77M\177\377\235@N\177\377" \ + "\1\77M\177\377\204@N\177\377\204\77M\177\377\203>L\177\377\206\77M\177" \ + "\377\203\77M~\377\10\77M}\377\77M~\377=K}\377;I{\377,L~\377@N\177" \ + "\377\77M~\377>L}\377\202\77M~\377\203\77M\177\377\1\77M~\377\203\77M" \ + "\177\377\203>L\177\377\205\77M\177\377\206@N\177\377\1\77M\177\377\221" \ + "@N\177\377\1\77M\177\377\206@N\177\377\205\77M\177\377\203>L\177\377" \ + "\203\77M\177\377\1\77M~\377\202\77M\177\377\202\77M~\377\12>L~\377>L" \ + "}\377\77M~\377@N\177\377:Hz\377,;r\377!1j\377\31*e\377\27(d\377\30)d" \ + "\377\222\31*e\377\3\27(d\377\36.h\3771Au\377\202=K}\377\2t\3771Bv\377\2052Av\377\4""2Au\3771@t\3771@u\377" \ + "0\77u\377\2021@u\377\5""0\77t\3771@u\377,L}\377\1>L~\377\203\77M}\377\1\77M\177\377\202\77M~\377\210\77M" \ + "\177\377\207>L\177\377\1@N\177\377\222\77M\177\377\206>L\177\377\211" \ + "\77M\177\377\202\77M~\377\1>M\177\377\203\77M}\377\202>L}\377\3>L~\377" \ + "4Cw\377!1j\377\202\30)d\377\223\31*e\377\7\30)d\377\31*e\377\30)d\377" \ + "'7o\377s\377\32*e\377\220\31*e\377\6\30" \ + ")d\377\27(d\377*:q\3773Bv\3771Bu\3772@v\377\2022Av\377\5""2Au\3771@u" \ + "\3772At\3771@u\3770\77u\377\2051@u\377\2\32+f\377\30)d\377\223\31*e\377" \ + "\5\32*e\377)9p\377,L}\377\203\77M~\377\214\77M\177\377\223>L\177\377\206\77M\177" \ + "\377\1\77M~\377\204\77M\177\377\204\77M~\377\14>L}\377\77M~\377@N~\377" \ + "\77N~\3779Hz\3772Au\377*:p\377\"2k\377\31*e\377\27(c\377\30)d\377\30" \ + "*d\377\222\31*e\377\6\30)d\377\27(d\377\32+f\377'7n\3776Ex\377\77L~\377" \ + "\202=K}\377\202L}\377\205\77M~\377\205\77" \ + "M\177\377\1\77M~\377\233\77M\177\377\204\77M~\377\2>M~\377\77L}\377\202" \ + "\77M~\377\6@N~\3776Ex\377(8o\377\34-g\377\32+e\377\31*e\377\204\30)d" \ + "\377\223\31*e\377\202\30)d\377\6)8p\377;I{\377L~" \ + "\3772@u\377!2j\377\31*e\377\202\30)d\377\226\31*e\377\14\30)d\377\27" \ + "(c\377\26'c\377\35.h\377(8o\3771@u\3775Dw\3778Fy\377;I{\377>L}\377@N" \ + "~\377@M~\377\202\77M~\377\3\77M}\377>L}\377\77M}\377\227\77M~\377\2>" \ + "L~\377\77M}\377\203\77M~\377\12@N~\377\77M~\377=J|\3779Hz\3776Ex\377" \ + "3Cw\377.=s\377#3l\377\31*e\377\26'c\377\202\30)d\377\226\31*e\377\6\30" \ + ")d\377\27(d\377\34-g\377'7o\377:H{\377>L~\377\203=K}\377\203M~\377AO\177\377@N\177\377\202@N~\377\1@M~\377\205\77M~" \ + "\377\205\77M}\377\2>M}\377\77M}\377\205\77M~\377\203@N~\377\12@N\177" \ + "\377AN\177\377;J{\3774Cw\377,s\377:H{\377" \ + "\202=K}\377\2s\3778Fz\3778Fy\377" \ + "\2067Fy\377\2""6Ey\3776Dy\377\2026Ey\377\11""6Ex\3776Ey\3776Ex\3776E" \ + "w\3776Ex\3775Dx\3775Cw\3776Ex\377\40""1j\377\202\30)d\377\220\31*e\377" \ + "\14\30)e\377+;q\3773Bv\3771Bu\3772Av\3772@v\3772Av\3772Au\3772Av\377" \ + "1@u\3772At\3770\77u\377\2051@u\377\2!1k\377\30)d\377\224\31*e\377\6\35" \ + ".h\377,L}\3776Ex\377!1j\377\32+f\377\203\30)d\377" \ + "\233\31*e\377\202\30)d\377\40\27(d\377\27(c\377\26'c\377\32,f\377\"2" \ + "k\377%5m\377'8n\377*9p\377,t\3771@u\3773Cv\3776Ey\3778Fy\377" \ + "9Gz\3779Hz\377:Hz\3779Gz\3778Gy\3777Fy\3775Dx\3772Bu\3771\77t\377.=s" \ + "\377+;q\377)8o\377&7n\377$4l\377\37""0i\377\30)d\377\26'c\377\27(c\377" \ + "\203\30)d\377\233\31*e\377\203\30)d\377\2\34-g\377*:q\377\202=K}\377" \ + "\1L~\3775Dw\377#3l\377\32+e\377\31*e\377\202\30)d\377\320" \ + "\31*e\377\1\30*d\377\202\30)d\377\4\31*e\377\34,g\377*:p\377s\377\222\31" \ + "*e\377\5\30)d\377\32+f\3772Au\3778Fy\3778Fx\377\2047Fy\377\5""7Ey\377" \ + "6Fy\3777Ey\3776Dy\3775Ey\377\2036Ey\377\10""6Ew\3776Dx\3776Ex\3775Dx" \ + "\3776Cw\3776Dx\377)8p\377\27)d\377\221\31*e\377\6\30)d\377\33,g\3771" \ + "Au\3772Au\3771Bv\3772@v\377\2032Av\377\4""2Au\3772At\3772Au\3770\77u" \ + "\377\2051@u\377\2\36.h\377\30)d\377\223\31*e\377\6\30)d\377\34-g\377" \ + "-=s\377,L~\3779Hz\377/>s\377$5l\377\31*e\377\27(c\377\30)d\377\315\31" \ + "*e\377\12\30)d\377\27(c\377\36.h\377)9p\3774Bv\377=K}\377>L}\377=K}\377" \ + "=J|\377=K}\377\202K}\377>M~\3774Cw\377(8o\377\"2k\377\34-g\377\202" \ + "\27(d\377\2\30)d\377\30)e\377\275\31*e\377\202\30)d\377\7\27(c\377\31" \ + "*e\377\37/i\377$4l\377-L~\377\204=K}\377\202t\377\33,f\377\30)e\377" \ + "\30)d\377\221\31*e\377\7\27(d\377)9p\3777Fy\3778Fy\3777Ex\3777Fy\377" \ + "6Fy\377\2027Fy\377\2027Ey\377\17""6Dy\3776Ey\3775Ey\3776Ey\3776Ex\377" \ + "6Ey\3776Ex\3776Ew\3776Ex\3776Dx\3776Cw\3776Dx\3770\77t\377\31*d\377\30" \ + ")d\377\221\31*e\377\6\30)d\377\37/i\3773Av\3771Au\3772Av\3772@v\377\202" \ + "2Av\377\5""2Au\3772Av\3772At\3771@u\3770\77u\377\2031@u\377\2020\77t" \ + "\377\2!1j\377\30)d\377\225\31*e\377\6'7n\377-=s\377,=q\377-K}\377\77L~\377;I{\3770\77t\377$5m\377\37/i\377" \ + "\33,f\377\205\30)d\377\252\31*e\377\205\30)d\377\7\31*e\377\35-g\377" \ + "\40""1j\377)9p\3775Cx\377>L}\377>L~\377\204=K}\377\203t\3779Gz\3778Ex\3777Fy\3776Fy\377\2047Fy\377\20""7Ey\3777Dy\3776Ey" \ + "\3775Ey\3776Ex\3776Ey\3776Ex\3776Ew\3776Dx\3776Ex\3775Dx\3776Cw\3775" \ + "Dx\377.=s\377\30)d\377\30)e\377\221\31*e\377\6\30)d\377\35.g\3773Bv\377" \ + "2Bu\3772Av\3772@v\377\2022Av\377\5""2Au\3772Av\3772Au\3771@u\3770\77" \ + "u\377\2031@u\377\4""0\77t\3771@u\377(8o\377\30)d\377\224\31*e\377\16" \ + "\30)d\377\36.h\377-=r\377-=q\377-K}\377>L}\377>L~\377" \ + "9Fz\3771@u\377)9p\377!2j\377\34-g\377\33,f\377\32+f\377\31*e\377\30)" \ + "e\377\231\30)d\377\13\31*e\377\32+e\377\33,f\377\34,g\377\36/h\377%5" \ + "m\377-L~\377>L}\377\202=K}\377\1L}\377>L~\377" \ + "=K}\377:H{\3777Ey\3773Bv\3770\77t\377.>s\377,t\3771@u\3775Cw\3778Fy\377;J|\377\202>L}\377\203" \ + "=K}\377\1t\3777Ez\3778Fx\3778Ex\377\2026Fy\377\2047Fy\377\2027Ey\377\3""6Dy\377" \ + "6Ey\3775Ey\377\2036Ex\377\1""6Ew\377\2026Dx\377\4""5Cx\3776Cx\3776Ex" \ + "\377\"3k\377\202\30)d\377\222\31*e\377\6\30*e\377&6n\3772Au\3771Bv\377" \ + "1Au\3772@v\377\2022Av\377\4""2Au\3772Av\3771@t\3772At\377\2020\77u\377" \ + "\2021@u\377\5""0\77t\3771@u\377-=r\377\30)e\377\30)d\377\225\31*e\377" \ + "\7#3l\377-s\377$4l\377" \ + "\30)d\377\27(d\377\30)d\377\230\31*e\377\7\30)d\377\31*e\377$4l\3774" \ + "Cw\3779Gz\3778Ex\3777Fy\377\2026Fy\377\2057Fy\377\5""7Ey\3777Dy\3776" \ + "Dy\3776Ey\3775Ey\377\2026Ey\377\1""6Ex\377\2026Ew\377\1""6Ex\377\202" \ + "6Dx\377\5""6Cw\3776Dx\377,s\377" \ + "6Dy\377\2028Fy\377\2027Fy\377\1""6Fy\377\2057Fy\377\2027Ey\377\2""7D" \ + "y\3776Ey\377\2025Ey\377\2026Ey\377\3""6Ex\3776Ew\3776Dx\377\2026Ex\377" \ + "\6""5Dx\3776Cw\3776Ex\377+:q\377\33,f\377\30)d\377\226\31*e\377\3*9p" \ + "\3773Bv\3772Bu\377\2022Av\377\1""2@v\377\2032Av\377\4""2Au\3772At\377" \ + "1@u\3770\77u\377\2051@u\377\3,;q\377\32+e\377\30)d\377\225\31*e\377\12" \ + "\30)d\377\32+f\377+;q\377-=r\377,=r\377-t\377\36/h\377\27(d\377\30)d\377\224\31*e\377\7\30)d\377\34-g\377." \ + ">s\3772Bv\3771Bu\3772Av\3772@v\377\2042Av\377\4""1@u\3771@t\3771@u\377" \ + "0\77u\377\2051@u\377\3.=s\377\34,g\377\30)d\377\225\31*e\377\202\30)" \ + "d\377\3&6m\377-=s\377,s\3778Fz\3778Fy\3777Fx\3778Fy\377\2026Fy" \ + "\377\2037Fy\377\1""7Ey\377\2027Fy\377\7""6Ey\3777Dy\3777Ey\3776Ey\377" \ + "5Ey\3776Ex\3776Ey\377\2026Ex\377\1""6Ew\377\2026Ex\377\2026Dx\377\1""6" \ + "Cw\377\2025Dx\377\1*:p\377\202\30)d\377\224\31*e\377\202\30)d\377\2\34" \ + "-g\3772@u\377\2022Bv\377\2032Av\377\1""2Au\377\2022Av\377\3""2Au\377" \ + "2At\3770\77u\377\2041@u\377\4""0\77t\3771@u\377.>s\377\33,f\377\227\31" \ + "*e\377\6\30)e\377$4l\377-=s\377,s\377,t\377\37/i\377\27)d\377\226\31*e\377\6\30)d\377\32+e\377(8n\3773" \ + "Cv\3771Au\3771Av\377\2022@v\377\2032Av\377\4""2Au\3772At\3771@u\3770" \ + "\77u\377\2041@u\377\5""1@t\3771@u\377-t\377\37/i\377\27(d\377\202\30)d\377" \ + "\351\31*e\377\203\30)d\377\3&6n\3773Av\3776Dx\377\2028Fy\377\1""8Ex\377" \ + "\2027Fy\377\2026Fy\377\2037Fy\377\1""7Ey\377\2027Fy\377\4""6Ey\3777D" \ + "y\3776Dy\3776Ey\377\2025Ey\377\2""6Ex\3776Ey\377\2026Ex\377\6""6Ew\377" \ + "6Dx\3776Ex\3776Dx\3775Dx\3776Cw\377\2025Dx\377\3#4l\377\31*e\377\30)" \ + "d\377\226\31*e\377\7\30)d\377\32+f\377.>s\3772Bv\3771Bu\3772Av\3772@" \ + "v\377\2032Av\377\2022Au\377\4""1@u\3772Au\3771@u\3770\77u\377\2031@u" \ + "\377\5""0\77t\3771@u\377*:q\377\32+e\377\30)d\377\226\31*e\377\7\30)" \ + "d\377\31*e\377+;q\377-=r\377-=q\377-t\377" \ + "\40""1i\377\31*e\377\30)d\377\226\31*e\377\202\30)d\377\6&6n\3772Au\377" \ + "2Bv\3771Av\3772Av\3772@v\377\2022Av\377\4""2Au\3772Av\3771@u\3772Au\377" \ + "\2061@u\377\5""0\77t\3771@u\377(8o\377\31*e\377\30)d\377\227\31*e\377" \ + "\6\30)d\377'8o\377-=s\377,=q\377-s\377(7o\377" \ + "\"2k\377\35.h\377\31*e\377\27(d\377\202\30)d\377\276\31*e\377\203\30" \ + ")d\377\6\27)c\377\33,f\377\37""0i\377$4l\377+:q\3773Au\377\2029Gz\377" \ + "\3""8Fy\3778Ex\3777Fx\377\2027Fy\377\2026Fy\377\2057Fy\377\1""7Ey\377" \ + "\2027Fy\377\4""7Ey\3776Ey\3777Ey\3776Dy\377\2026Ey\377\4""5Ey\3776Ey" \ + "\3776Ex\3776Ey\377\2026Ex\377\2026Ew\377\1""6Dx\377\2026Ex\377\11""6" \ + "Dx\3775Dx\3776Cx\3776Dx\3775Dx\377-s\377\37/i\377\27)d\377\231\31*e\377" \ + "\5$5m\377-=s\377,s\377\34,f\377\30)d\377\230\31*e\377\7\30)d\377#3l\377-=s\377,s\377,t\3772@v\3774Bw\3776Dx\377\205" \ + "8Fy\377\2""8Fx\3777Fx\377\2037Fy\377\2026Fy\377\2127Fy\377\2""7Ey\377" \ + "6Ey\377\2027Dy\377\2026Ey\377\2035Ey\377\1""6Ex\377\2026Ey\377\2026E" \ + "x\377\2026Ew\377\1""6Dx\377\2026Ex\377\2026Dx\377\6""6Cw\3775Dx\3776" \ + "Ey\377-s\3773Bv\3772Bv\377\2022Av\377\1""2@v\377\2022Av\377\4""2" \ + "Au\3772Av\3772Au\3771@t\377\2021@u\377\1""0\77u\377\2041@u\377\5""1\77" \ + "t\3772Av\377&6n\377\31*e\377\30)d\377\230\31*e\377\13\30)d\377\"3k\377" \ + "-=r\377," \ + "s\377+;q\377(8o\377%4m\377!2k\377\36/h\377\34-g\377\205\33,f\377\204" \ + "\32+f\377\1\32+e\377\203\32+f\377\1\33+f\377\204\33,f\377\11\34,g\377" \ + "\35-g\377\37""0i\377#3l\377'6n\377)9p\377-s\377" \ + ",s\3773Bv\3771Bu\3771Av\3772Av\377" \ + "2@v\377\2042Av\377\2022Au\377\2""2At\3771@u\377\2020\77u\377\2061@u\377" \ + "\3%5m\377\31*e\377\30)d\377\231\31*e\377\13\30*d\377%6m\377-=s\377,<" \ + "r\377-=q\377-s\377" \ + "4Cw\377\2035Dx\377\2026Cx\377\2""5Dx\3776Dx\377\2026Ex\377\2""6Dx\377" \ + "6Ex\377\2036Ew\377\2036Ex\377\2036Ey\377\2""6Ex\3776Ey\377\2045Ey\377" \ + "\2036Ey\377\1""6Dy\377\2037Dy\377\2""7Ey\3776Ey\377\2047Ey\377\2467F" \ + "y\377\2037Ey\377\2""6Ey\3777Ey\377\2047Dy\377\1""6Dy\377\2036Ey\377\204" \ + "5Ey\377\2""6Ey\3776Ex\377\2036Ey\377\2026Ex\377\2036Ew\377\2046Ex\377" \ + "\2036Dx\377\2026Cx\377\2026Dx\377\4""1Av\377,t\377$4l\377\30)d\377\27" \ + "(d\377\30)d\377\237\31*e\377\10\30)d\377\31*e\377\34-g\377,;r\3773Bv" \ + "\3771Au\3771Av\3772Av\377\2022@v\377\2022Av\377\7""2Au\3772Av\3771@u" \ + "\3772Au\3772At\3771@u\3770\77u\377\2041@u\377\6""0\77t\3771@t\3771@u" \ + "\377.=r\377\36.h\377\30)d\377\232\31*e\377\14\30)d\377\33+f\377*:p\377" \ + "-=s\377,=r\377-s\3773Bw\3774Cw\3774Dx\3776Dx\3775Dx\3775Cw\377\2026Cx\377\2""6Dx\377" \ + "5Dx\377\2026Dx\377\2046Ex\377\1""6Dx\377\2026Ex\377\2046Ew\377\2066E" \ + "x\377\2106Ey\377\1""6Ex\377\2336Ey\377\2066Ex\377\2046Ew\377\2026Ex\377" \ + "\1""6Dx\377\2036Ex\377\2026Dx\377\4""5Dx\3776Dx\3776Cx\3776Cw\377\202" \ + "5Dx\377\1""6Dx\377\2024Cw\377\4""2Bv\377)9p\377\36.i\377\27(d\377\202" \ + "\30)d\377\241\31*e\377\7\30)d\377\31*e\377\32+e\377$5l\3773Bv\3772Bv" \ + "\3771Bu\377\2062Av\377\2022Au\377\5""1@v\3772At\3771@t\3771@u\3770\77" \ + "u\377\2071@u\377\3""0\77t\377!2k\377\30)d\377\232\31*e\377\13\31*d\377" \ + "\30)d\377\36/h\377-=r\377,s\3772Av\3775Dx\3776Ex\377\2026Dx\377" \ + "\2""5Dx\3775Cw\377\2046Cx\377\1""5Dx\377\2056Dx\377\2416Ex\377\2056D" \ + "x\377\2""5Dx\3776Dx\377\2036Cx\377\2""6Cw\3775Dx\377\2026Dx\377\7""6" \ + "Ex\3774Cw\3770@u\377-=s\377)9p\377#3k\377\34-g\377\202\27(d\377\202\30" \ + ")d\377\245\31*e\377\202\30)d\377\7\32+f\377#3l\377/\77t\3773Bv\3771B" \ + "u\3771Av\3772Av\377\2022@v\377\2032Av\377\6""2Au\3772Av\3772Au\3772A" \ + "t\3771@t\3771@u\377\2020\77u\377\2071@u\377\3)9o\377\33,f\377\30)d\377" \ + "\233\31*e\377\6\30)d\377\31*e\377%5m\377-=s\377,t\377\36/h\377\31" \ + "*e\377\30)d\377\233\31*e\377\7\30)e\377\32+f\377*:p\377-=r\377-=q\377" \ + "-t\3770@u\3772Av\3773Bw\3775Dw\3775Dx\377\2066Dx\377\203" \ + "5Dx\377\2025Cx\377\2136Cx\377\2""5Cw\3775Cx\377\2035Dx\377\2066Dx\377" \ + "\15""5Dx\3774Cw\3772Bv\3771@u\3770\77t\377.>t\377,;q\377'7n\377#3l\377" \ + "\36/h\377\31)d\377\27(c\377\27(d\377\202\30)d\377\252\31*e\377\1\31*" \ + "d\377\202\30)d\377\10\34-g\377%5m\3771Au\3773Bv\3771Bu\3771Av\3772Av" \ + "\3772@v\377\2042Av\377\2""2Au\3772Av\377\2022Au\377\1""2At\377\2021@" \ + "u\377\1""0\77u\377\2051@u\377\6""0\77t\3771@u\3770\77t\377)8o\377\31" \ + "*e\377\30)d\377\233\31*e\377\202\30)d\377\6\35.g\377+;q\377-=s\377-=" \ + "q\377-s\377,;q\377)8o\377&6n\377#4l\377!1j\377" \ + "\37/i\377\36.h\377\34-g\377\33,f\377\32*e\377\206\30)d\377\255\31*e\377" \ + "\5\30)d\377\27(d\377\36/h\377+;q\3771@u\377\2022Bv\377\2""1Bv\3772Av" \ + "\377\2022@v\377\2032Av\377\1""2Au\377\2022Av\377\4""1@u\3772Au\3771@" \ + "t\3771@u\377\2020\77u\377\2061@u\377\3""2@u\377-=s\377\36/h\377\202\30" \ + ")d\377\234\31*e\377\5\30)d\377\"2k\377,s\377$4l\377\27(d\377\30)d\377\234\31*e\377\4\30)d\377\31*e\377%" \ + "5l\377-=s\377\202-=q\377\2-t\377%5m\377\35.g\377\33+f\377\31*e\377\203\30" \ + ")d\377\341\31*e\377\203\30)d\377\10\31*e\377\33,f\377\40""0i\377(9o\377" \ + "2Av\3773Bv\3772Bv\3771Bu\377\2022Av\377\2022@v\377\2052Av\377\1""2Au" \ + "\377\2022Av\377\4""2Au\3771@u\3772At\3771@t\377\2021@u\377\1""0\77u\377" \ + "\2061@u\377\1""0\77t\377\2021@u\377\4/>t\377(8o\377\32+e\377\30)d\377" \ + "\237\31*e\377\7\30)e\377\30)d\377\34,f\377*:q\377-=s\377-s\377\2032Au\377\2032Bv\377\4""1Bu\3771Av\3772@v\3772" \ + "Av\377\2032@v\377\2102Av\377\1""2Au\377\2032At\377\1""1@t\377\2021@u" \ + "\377\2020\77u\377\2111@u\377\2.=s\377\37/i\377\202\31*e\377\1\30)d\377" \ + "\241\31*e\377\7\30)d\377\32+f\377)9o\377,t\377)9p\377$4l\377" \ + "\40""0j\377\33,f\377\27(c\377\27(d\377\204\30)d\377\246\31*e\377\204" \ + "\30)d\377\13\27)d\377\27(d\377\31*d\377\35.h\377\"2k\377&6n\377,t\377+:q\377!1j\377\27)d\377\202\30)d\377\242\31" \ + "*e\377\202\30)d\377\5\32+f\377\"2k\377-=s\377-=r\377,=q\377\202-s\377" \ + ".>s\377-=r\377,s\377/>s\3770\77t\3771@t" \ + "\3771@u\3771Au\377\2062Bv\377\2031Bv\377\1""1Av\377\2042Av\377\2042@" \ + "v\377\2072Av\377\1""2Au\377\2032Av\377\2022Au\377\1""1@u\377\2022At\377" \ + "\1""1@t\377\2021@u\377\2020\77u\377\2111@u\377\6""0\77t\3771@u\3772@" \ + "u\377.=s\377#3k\377\34,g\377\203\30)d\377\243\31*e\377\202\30)d\377\6" \ + "\37""0i\377*:q\377-=s\377-=r\377-=q\377-t\377" \ + "+:q\377\40""0i\377\202\30)d\377\245\31*e\377\202\30)d\377\6\33,f\377" \ + "&6n\377.>s\377-=r\377-s\377-=r\377-=q\377-t\377%5m\377" \ + "\34-g\377\202\31*e\377\202\30)d\377\251\31*e\377\7\30)d\377\32+f\377" \ + "(7o\377,s\377\2041@u\377\1""0\77t\377\216" \ + "1@u\377\2050\77u\377\2051@u\377\1""1@t\377\2072At\377\2312Au\377\2""1" \ + "@u\3772Au\377\2072At\377\1""1@t\377\2061@u\377\2040\77u\377\2161@u\377" \ + "\1""0\77t\377\2041@u\377\5-=s\377*:p\377$4l\377\34-g\377\27(c\377\202" \ + "\30)d\377\252\31*e\377\202\30)d\377\13\33,f\377\"3l\377,t\377.=s\377+:q\377$4m\377\35" \ + ".g\377\27)d\377\203\30)d\377\255\31*e\377\202\30)d\377\7\32+f\377!1k" \ + "\377-=r\377-=s\377,s\377*9p\377" \ + "%5m\377\37""0i\377\35-g\377\32+e\377\204\30)d\377\256\31*e\377\202\30" \ + ")d\377\10\31*d\377$4l\377*:q\377-=s\377-=r\377-=q\377-s\377+;q\377%5m\377\36/h\377" \ + "\31*e\377\204\30)d\377\262\31*e\377\11\30)d\377\31)e\377\31*e\377!1j" \ + "\377-s\377,;q\377)9p\377'6n\377$4l\377\"2k\377\36/h\377\33,g" \ + "\377\30)d\377\27(d\377\203\30)d\377\264\31*e\377\13\30)d\377\27)d\377" \ + "\33,f\377#3k\377*:q\377-=s\377,=r\377-=q\377-t\377\2151@u\377\2""1@t\3770" \ + "\77u\377\2051@u\377\1""1\77t\377\2151@u\377\7""1\77t\377.=s\377+;q\377" \ + "(8o\377$5l\377\40""1i\377\34-g\377\205\31*e\377\1\30*d\377\204\30)d\377" \ + "\266\31*e\377\20\30)e\377\30)d\377\32+f\377&6m\377-=s\377,s\377\202-=r\377\2-=q\377-s\377-=s\377,s\377-=s\377-=r" \ + "\377,=q\377-=q\377\203-r\377+;q\377'7o\377#4l\377\40""1" \ + "j\377\36.h\377\34-g\377\33+f\377\31*e\377\206\30)d\377\261\31*e\377\206" \ + "\30)d\377\12\32*e\377\33,f\377\35-g\377\37/i\377\"2k\377%5m\377)9p\377" \ + ",s\377-=s\377\202-=r\377\1,=r\377\202-=q\377\204-s\377\15,s\377\203" \ + "-=s\377\2-=r\377,=r\377\204-=q\377\204-width, fb->height, 0xec, 0xec, 0xe1); ++ /* Clear the background with #192a65 */ ++ psplash_fb_draw_rect (fb, 0, 0, fb->width, fb->height, 0x19, 0x2a, 0x65); + + /* Draw the OH logo */ + psplash_fb_draw_image (fb, +- (fb->width - HAND_IMG_WIDTH)/2, +- (fb->height - HAND_IMG_HEIGHT)/2, +- HAND_IMG_WIDTH, +- HAND_IMG_HEIGHT, +- HAND_IMG_BYTES_PER_PIXEL, +- HAND_IMG_RLE_PIXEL_DATA); ++ 0, ++ 0, ++ OWRT_IMG_WIDTH, ++ OWRT_IMG_HEIGHT, ++ OWRT_IMG_BYTES_PER_PIXEL, ++ OWRT_IMG_RLE_PIXEL_DATA); + + /* Draw progress bar border */ + psplash_fb_draw_image (fb, diff --git a/utils/psplash/patches/001-hide-msgfield-and-progressbar.patch b/utils/psplash/patches/001-hide-msgfield-and-progressbar.patch new file mode 100644 index 0000000..e62213e --- /dev/null +++ b/utils/psplash/patches/001-hide-msgfield-and-progressbar.patch @@ -0,0 +1,25 @@ +diff -ruN psplash.x/psplash.c psplash/psplash.c +--- psplash.x/psplash.c 2009-05-12 10:11:25.000000000 +0200 ++++ psplash/psplash.c 2009-05-12 10:24:09.000000000 +0200 +@@ -276,17 +276,17 @@ + OWRT_IMG_RLE_PIXEL_DATA); + + /* Draw progress bar border */ +- psplash_fb_draw_image (fb, ++ /* psplash_fb_draw_image (fb, + (fb->width - BAR_IMG_WIDTH)/2, + fb->height - (fb->height/6), + BAR_IMG_WIDTH, + BAR_IMG_HEIGHT, + BAR_IMG_BYTES_PER_PIXEL, +- BAR_IMG_RLE_PIXEL_DATA); ++ BAR_IMG_RLE_PIXEL_DATA); */ + +- psplash_draw_progress (fb, 0); ++ // psplash_draw_progress (fb, 0); + +- psplash_draw_msg (fb, MSG); ++ // psplash_draw_msg (fb, MSG); + + psplash_main (fb, pipe_fd, 0); + diff --git a/utils/pv/Makefile b/utils/pv/Makefile new file mode 100644 index 0000000..eecda86 --- /dev/null +++ b/utils/pv/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2008 David Cooper +# Copyright (C) 2008-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pv +PKG_VERSION:=1.2.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://pipeviewer.googlecode.com/files +PKG_MD5SUM:=67aedf6dbcd068d5feeaa76156153f4f + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/pv + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Shell pipeline element to meter data passing through + URL:=http://www.ivarch.com/programs/pv.shtml +endef + +define Package/pv/description + Pipe Viewer is a terminal-based tool for monitoring the progress of data + through a pipeline. It can be inserted into any normal pipeline between + two processes to give a visual indication of how quickly data is passing + through, how long it has taken, how near to completion it is, and an + estimate of how long it will be until completion. +endef + +define Package/pv/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pv $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,pv)) + diff --git a/utils/pwcrypt/Makefile b/utils/pwcrypt/Makefile new file mode 100644 index 0000000..75e33fc --- /dev/null +++ b/utils/pwcrypt/Makefile @@ -0,0 +1,36 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pwcrypt +PKG_VERSION:=1.2.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://xjack.org/pwcrypt/downloads +PKG_MD5SUM:=381a60c8debe5b21c935b19684de + +include $(INCLUDE_DIR)/package.mk + +define Package/pwcrypt + SECTION:=utils + CATEGORY:=Utilities + TITLE:=A utility to create crypted passwords from plaintext + URL:=http://xjack.org/pwcrypt +endef + +define Package/pwcrypt/description + A wrapper for the unix crypt() function. Supports crypt and MD5 hashing +endef + +define Package/pwcrypt/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pwcrypt $(1)/sbin/ +endef + +$(eval $(call BuildPackage,pwcrypt)) diff --git a/utils/pwgen/Makefile b/utils/pwgen/Makefile new file mode 100644 index 0000000..84e40c6 --- /dev/null +++ b/utils/pwgen/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pwgen +PKG_VERSION:=2.06 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=935aebcbe610fbc9de8125e7b7d71297 + +include $(INCLUDE_DIR)/package.mk + +define Package/pwgen + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Automatic Password generator + URL:=http://sourceforge.net/projects/pwgen/ +endef + +define Package/pwgen/description + pwgen generates random, meaningless but pronounceable passwords. + These passwords contain either only lowercase letters, or upper + and lower case mixed, or digits thrown in. + Uppercase letters and digits are placed in a way that eases + remembering their position when memorizing only the word. + + E.g. to generate a WPA preshared-key do: + pwgen -c -n -s 63 1 +endef + +# uses GNU configure + +define Package/pwgen/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/pwgen $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,pwgen)) diff --git a/utils/rcs/Makefile b/utils/rcs/Makefile new file mode 100644 index 0000000..dcab7d5 --- /dev/null +++ b/utils/rcs/Makefile @@ -0,0 +1,40 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rcs +PKG_VERSION:=5.7 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@GNU/$(PKG_NAME) +PKG_MD5SUM:=4c8e896f2d2446fa593c6f1601a4fb75 + +include $(INCLUDE_DIR)/package.mk + +define Package/$(PKG_NAME) + SECTION:=utils + CATEGORY:=Utilities + TITLE:=The GNU Revision Control System + URL:=http://www.gnu.org/software/$(PKG_NAME)/ +endef + +define Package/$(PKG_NAME)/desctiption + The Revision Control System (RCS) manages multiple revisions of files. RCS + automates the storing, retrieval, logging, identification, and merging of + revisions. RCS is useful for text that is revised frequently, for example + programs, documentation, graphics, papers, and form letters. +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/{ci,co,ident,merge,rcs,rcsclean,rcsdiff,rcsmerge,rlog} $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rcsfreeze.sh $(1)/usr/bin/rcsfreeze +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/utils/rcs/patches/000-debian.patch b/utils/rcs/patches/000-debian.patch new file mode 100644 index 0000000..96df338 --- /dev/null +++ b/utils/rcs/patches/000-debian.patch @@ -0,0 +1,4879 @@ +--- rcs-5.7.orig/debian/rules ++++ rcs-5.7/debian/rules +@@ -0,0 +1,91 @@ ++#!/usr/bin/make -f ++# Derived from: Sample debian.rules file - for GNU Hello (1.3). ++# Copyright 1994,1995 by Ian Jackson. ++# I hereby give you perpetual unlimited permission to copy, ++# modify and relicense this file, provided that you do not remove ++# my name from the file itself. (I assert my moral right of ++# paternity under the Copyright, Designs and Patents Act 1988.) ++# This file may have to be extensively modified ++ ++# There used to be `source' and `diff' targets in this file, and many ++# packages also had `changes' and `dist' targets. These functions ++# have been taken over by dpkg-source, dpkg-genchanges and ++# dpkg-buildpackage in a package-independent way, and so these targets ++# are obsolete. ++ ++package=rcs ++ ++CFLAGS = -g ++ ++ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) ++CFLAGS += -O0 ++else ++CFLAGS += -O2 ++endif ++ ++# The next section may have to be extensively modified ++ ++build: ++ $(checkdir) ++ ./configure --prefix=/usr --with-diffutils ++ $(MAKE) CFLAGS="$(CFLAGS)" ++ groff -t -p -Tps -ms rcs.ms >rcs.ps ++ touch build ++ ++clean: ++ $(checkdir) ++ -rm -f build ++ [ ! -f Makefile ] || $(MAKE) -i distclean ++ -rm -f *.ps man/index.db man/rcsfile.5 ++ -rm -rf debian/tmp debian/*~ debian/files autom4te.cache \ ++ debian/substvars ++ ++binary-indep: checkroot build ++ $(checkdir) ++# There are no architecture-independent files to be uploaded ++# generated by this package. If there were any they would be ++# made here. ++ ++binary-arch: checkroot build ++ -rm -rf debian/tmp ++ install -d debian/tmp/DEBIAN ++ install -d debian/tmp/usr/share/doc/$(package) ++ $(MAKE) prefix=`pwd`/debian/tmp/usr install ++ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) ++ for f in debian/tmp/usr/bin/*; do \ ++ strip -s -R.comment $$f; \ ++ done ++endif ++ cp debian/copyright debian/tmp/usr/share/doc/$(package)/ ++ cp debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian ++ cp ChangeLog debian/tmp/usr/share/doc/$(package)/changelog ++ gzip -9f debian/tmp/usr/share/doc/$(package)/changelog* ++ cp *.ps debian/tmp/usr/share/doc/$(package)/ ++ gzip -9f debian/tmp/usr/share/doc/$(package)/*.ps ++ mv debian/tmp/usr/man debian/tmp/usr/share/man ++ gzip -9f debian/tmp/usr/share/man/man*/* ++ (cd debian/tmp; find . -type f ! -regex '.*/DEBIAN/.*' \ ++ -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums) ++ dpkg-shlibdeps src/rcs ++ dpkg-gencontrol -isp ++ chown -R root.root debian/tmp ++ chmod -R u+w debian/tmp ++ chmod -R g-ws debian/tmp ++ dpkg --build debian/tmp .. ++ ++define checkdir ++ test -f man/rcs.1 ++endef ++ ++# Below here is fairly generic really ++ ++binary: binary-indep binary-arch ++ ++source diff: ++ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false ++ ++checkroot: ++ $(checkdir) ++ test root = "`whoami`" ++ ++.PHONY: binary binary-arch binary-indep clean checkroot +--- rcs-5.7.orig/debian/control ++++ rcs-5.7/debian/control +@@ -0,0 +1,16 @@ ++Source: rcs ++Section: devel ++Priority: optional ++Maintainer: Romain Francoise ++Standards-Version: 3.7.2 ++Build-Depends: groff, autoconf ++ ++Package: rcs ++Architecture: any ++Depends: ${shlibs:Depends} ++Description: The GNU Revision Control System ++ The Revision Control System (RCS) manages multiple ++ revisions of files. RCS automates the storing, retrieval, ++ logging, identification, and merging of revisions. RCS is ++ useful for text that is revised frequently, for example ++ programs, documentation, graphics, papers, and form letters. +--- rcs-5.7.orig/debian/copyright ++++ rcs-5.7/debian/copyright +@@ -0,0 +1,28 @@ ++This is Debian GNU/Linux's prepackaged version of the FSF's Revision ++Control System (RCS) utilities. These utilities allow you to keep ++multiple revisions of one or more files in a very compact manner. RCS ++is similar to, and in most respects better than, the non-free Source ++Code Control System (SCCS). ++ ++This package was assembled by Sven Rudolph ++from the GNU sources available from prep.ai.mit.edu (and its numerous ++mirrors) as /pub/gnu/rcs-5.7.tar.gz. It is currently maintained by ++Romain Francoise . ++ ++The upstream URL is: http://www.gnu.org/software/rcs/ ++ ++Copyright (C) 1991,1992,1993 Free Software Foundation, Inc. ++ ++RCS 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. ++ ++RCS 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. ++ ++On Debian GNU/Linux systems, the complete text of the GNU General ++Public License can be found in `/usr/share/common-licenses/GPL'. ++ +--- rcs-5.7.orig/debian/changelog ++++ rcs-5.7/debian/changelog +@@ -0,0 +1,216 @@ ++rcs (5.7-20) unstable; urgency=low ++ ++ * debian/control: Add support for DEB_BUILD_OPTIONS (closes: #437885). ++ ++ -- Romain Francoise Tue, 14 Aug 2007 21:24:54 +0200 ++ ++rcs (5.7-19) unstable; urgency=low ++ ++ * debian/control: Bump Standards-Version to 3.7.2, no changes needed. ++ * debian/copyright: Mention the current upstream URL (closes: #436739). ++ * debian/rules: ++ + Don't ignore errors from 'make distclean'. ++ + Generate DEBIAN/md5sums. ++ * Apply patch from Brendan O'Dea adding support for ++ diff's '-U' option to rcsdiff (closes: #428445). ++ ++ -- Romain Francoise Sun, 12 Aug 2007 18:40:04 +0200 ++ ++rcs (5.7-18) unstable; urgency=low ++ ++ * Apply patch from Mark D. Baushke adding support for the ++ new 'commitid' phrase used by newer version of CVS and CVSNT. Note ++ that this patch does not include support for *generating* the ids at ++ check in time; it only makes RCS recognize them (closes: #352527). ++ ++ -- Romain Francoise Tue, 14 Feb 2006 22:41:33 +0100 ++ ++rcs (5.7-17) unstable; urgency=low ++ ++ * Apply patch from Aaron S. Hawley making the diff strategy of rcsdiff a ++ bit more subtle: previously rcsdiff considered any long option as a ++ case where diff(1) can produce output when the revisions are ++ identical, when in fact it is only the case if either the ++ --side-by-side or --ifdef options are used (closes: #334004). ++ ++ * Patch man/co.1 to not use 'asteriskmath', thanks to LI Daobing ++ (closes: #345507). ++ ++ * debian/control: Bump Standards-Version to 3.6.2.2, no changes needed. ++ * debian/changelog: Change formatting of entries from 1995 and 1996 to ++ avoid lintian warnings. ++ * debian/rules: `install' no longer strips .comment sections from ++ binaries (since version 5.93-1), so revert previous fix and strip these ++ sections manually. ++ ++ -- Romain Francoise Sun, 5 Feb 2006 16:34:21 +0100 ++ ++rcs (5.7-16) unstable; urgency=low ++ ++ * Tenth anniversary release: RCS 5.7 was released on June 16th, 1995. ++ ++ * rcs.c: Check delta pointer in scanlogtext() before dereferencing it to ++ prevent a segmentation fault in some rare cases (discovered while ++ investigating #69193). ++ ++ * Ship docs in PostScript format (instead of DVI). Drop the ``Functions ++ of RCS'' paper since it's quite obsolete nowadays. ++ ++ * debian/rules: Delete substvars file in clean target. ++ * debian/changelog: Facelift previous entry. ++ ++ -- Romain Francoise Thu, 16 Jun 2005 08:14:01 +0200 ++ ++rcs (5.7-15) unstable; urgency=low ++ ++ * Adopting this package with Mark's blessing. ++ * debian/control: ++ + Bump Standard-Version to 3.6.1.0. ++ + Update maintainer contact info. ++ * debian/copyright: Ditto. ++ * debian/rules: ++ + Adjust CFLAGS to include -g and remove useless -I directive. ++ + Remove LDFLAGS. ++ ++ * Patch upstream Makefile.in to use install -s (which has the nice ++ effect of also deleting .comment sections from the binaries). ++ ++ * Patch man/rlog.1 to document option -q which does nothing, it's ++ provided for consistency with other commands (closes: #69257). ++ ++ * Remove a few unneeded files from the Debian diff (.orig files, Emacs ++ lock files). ++ ++ -- Romain Francoise Wed, 11 May 2005 17:51:01 +0200 ++ ++rcs (5.7-14) unstable; urgency=high ++ ++ * Fixes tmp file race (patch from OpenBSD) (Closes: #291542) ++ ++ -- Mark Baker Fri, 21 Jan 2005 18:16:20 +0000 ++ ++rcs (5.7-13.3) unstable; urgency=high ++ ++ * NMU ++ * Add build-dep on autoconf. Closes: #246566. ++ * Fix up quoting in src/Makefile.in to make $SHELL not complain, as \" ++ is not interpolated inside single-quoted strings. ++ * Make ident accept numbers as well as letters in identifiers. ++ Closes: #157891 ++ * Remove emacs variables from the changelog as they are no longer ++ needed. ++ * Add -isp to the dpkg-gencontrol call in debian/rules to get Section ++ and Priority included. Closes: #190383. ++ ++ -- Tollef Fog Heen Thu, 29 Jul 2004 19:09:32 +0200 ++ ++rcs (5.7-13.2) unstable; urgency=low ++ ++ * NMU ++ * can build now as root. Closes: #249106 ++ * priority dumped down to optional. Closes: #64438 ++ * fixed spelling error in debian/copyright, and location of the GPL. ++ ++ -- Andreas Barth Wed, 26 May 2004 22:21:05 +0200 ++ ++rcs (5.7-13.1) unstable; urgency=low ++ ++ * NMU. ++ * Rebuild so that the .dsc file will have Build-Depends. ++ Closes: #187853, #176344. ++ * Remove /usr/doc symlink. ++ ++ -- Daniel Schepler Mon, 28 Jul 2003 16:28:32 -0700 ++ ++rcs (5.7-13) unstable; urgency=low ++ ++ * debian/rules: install docs and manpages in /usr/share, as in FHS ++ * debian/control: standards version 3.1.0 ++ * debian/rules: format docs into dvi instead of leaving groff source. I ++ chose dvi as it is easier to view on screen than PS (Closes: 42277) ++ ++ -- Mark Baker Sun, 28 Nov 1999 18:31:21 +0000 ++ ++rcs (5.7-12) unstable; urgency=low ++ ++ * man/Makefile: use sed filter to fix .lf requests on output of pic, ++ so zsoelim doesn't complain about them (#26150) ++ * debian/rules: clean target deletes rcsfile.5 so it is always rebuilt ++ using fix above ++ ++ -- Mark Baker Mon, 5 Jul 1999 23:24:17 +0100 ++ ++rcs (5.7-11) unstable; urgency=low ++ ++ * Fixed temp file security hole in rcsfreeze script (#27845) ++ ++ -- Mark Baker Wed, 14 Oct 1998 22:43:47 +0100 ++ ++rcs (5.7-10) unstable; urgency=low ++ ++ * Included rcsfreeze script (#26743) ++ ++ -- Mark Baker Wed, 16 Sep 1998 20:57:00 +0000 ++ ++rcs (5.7-9) unstable; urgency=low ++ ++ * Fixed permissions ++ ++ -- Mark Baker Mon, 16 Feb 1998 00:07:52 +0000 ++ ++rcs (5.7-8) unstable; urgency=low ++ ++ * Updated standards-version to 2.4.0.0 (no changes) ++ ++ -- Mark Baker Tue, 10 Feb 1998 10:54:36 +0000 ++ ++rcs (5.7-7) unstable; urgency=low ++ ++ * Corrected maintainer field in debian/control ++ * Flushed configure cache and recompiled, to fix bug #11305/#11308) ++ ++ -- Mark Baker Thu, 17 Jul 1997 10:54:36 +0100 ++ ++rcs (5.7-6) unstable; urgency=low ++ ++ * Renamed changelog.upstream to changelog, as per policy (fixes #9657) ++ ++ -- Mark Baker Sat, 12 Jul 1997 16:55:37 +0100 ++ ++rcs (5.7-5) unstable; urgency=low ++ ++ * New maintainer ++ * Compiled with libc6 ++ * Use canonical path for sendmail (configure.in changed) ++ ++ -- Mark Baker Fri, 11 Jul 1997 21:24:48 +0100 ++ ++rcs (5.7-4) unstable; urgency=low ++ ++ * Updated to Standards-Version 2.1.2.2. ++ ++ -- Sven Rudolph Sun, 26 Jan 1997 22:34:57 +0100 ++ ++rcs (5.7-3) unstable; urgency=low ++ ++ * debian.rules: added multi-architecture support ++ ++ * debian.control: added Priority: and Section: ++ ++ * debian.control: corrected extended description (Bug#3619) ++ ++ -- Sven Rudolph Wed, 24 Jul 1996 23:48:20 +0100 ++ ++rcs (5.7-2) unstable; urgency=low ++ ++ * rebuilt for elf ++ ++ -- Sven Rudolph Thu, 23 Nov 1995 23:27:13 +0100 ++ ++rcs (5.7-1) unstable; urgency=low ++ ++ * created new Debian GNU/Linux package maintenance system files ++ * updated from rcs5.6.0.1 to rcs-5.7 ++ * received this package from Robert Sanders ++ ++ -- Sven Rudolph Tue, 5 Sep 1995 04:38:07 +0100 +--- rcs-5.7.orig/man/co.1 ++++ rcs-5.7/man/co.1 +@@ -597,7 +597,7 @@ + .RB \*(lq "//\ " \*(rq. + This is useful for languages with comments that go to the end of the line. + The convention for other languages is to use a +-.RB \*(lq " \(** " \(rq ++.RB \*(lq " * " \(rq + prefix inside a multiline comment. + For example, the initial log comment of a C program + conventionally is of the following form: +@@ -606,19 +606,19 @@ + .nf + .ft 3 + .ne 3 +-/\(** ++/* + .in +\w'/'u +-\(** $\&Log$ +-\(**/ ++* $\&Log$ ++*/ + .in + .ft + .fi + .RE + .LP + For backwards compatibility with older versions of \*r, if the log prefix is +-.B /\(** ++.B /* + or +-.B (\(** ++.B (* + surrounded by optional white space, inserted log lines contain a space + instead of + .B / +--- rcs-5.7.orig/man/rlog.1 ++++ rcs-5.7/man/rlog.1 +@@ -187,6 +187,10 @@ + .I logins + is omitted, the user's login is assumed. + .TP ++.B \-q ++This option has no effect; ++it is provided for consistency with other commands. ++.TP + .B \-T + This option has no effect; + it is present for compatibility with other \*r commands. +--- rcs-5.7.orig/man/rcsfile.5in ++++ rcs-5.7/man/rcsfile.5in +@@ -68,6 +68,7 @@ + \f3state\fP {\f2id\fP}\f3;\fP + \f3branches\fP {\f2num\fP}*\f3;\fP + \f3next\fP {\f2num\fP}\f3;\fP ++ { \f3commitid\fP \f2id\fP\f3;\fP } + { \f2newphrase\fP }* + .LP + \f2desc\fP ::= \f3desc\fP \f2string\fP +@@ -127,6 +128,18 @@ + Dates use the Gregorian calendar; times use UTC. + .PP + The ++.I commitid ++is followed by an ++.I id ++token. This token is intended to be unique across ++multiple files and is used to help group files as ++being a part of the same logical commit. ++This token must uniquely identify the commit ++operation that was applied to a set of RCS files. ++In particular, it must be unique among all the ++commitids in this file. ++.PP ++The + .I newphrase + productions in the grammar are reserved for future extensions + to the format of \*r files. +--- rcs-5.7.orig/man/Makefile.in ++++ rcs-5.7/man/Makefile.in +@@ -44,14 +44,16 @@ + all default :: rcsfile.5 + + rcsfile.5 : rcsfile.5in +- $(PIC) $(PICFLAGS) $(srcdir)/$@in >$@ ++ $(PIC) $(PICFLAGS) $(srcdir)/$@in \ ++ | sed "s%\.lf \([0-9]*\)%\.lf \1 foo%" >$@ + + check dvi info TAGS :: + + installdirs :: ../mkinstalldirs + -$(srcdir)/../mkinstalldirs $(man1dir) $(man5dir) + +-man1pages = ci co ident merge rcs rcsclean rcsdiff rcsintro rcsmerge rlog ++man1pages = ci co ident merge rcs rcsclean rcsdiff rcsintro rcsmerge rlog \ ++ rcsfreeze + + install :: installdirs + -for m in $(man1pages); do \ +--- rcs-5.7.orig/configure ++++ rcs-5.7/configure +@@ -1,28 +1,288 @@ + #! /bin/sh +- + # Guess values for system-dependent variables and create Makefiles. +-# Generated automatically using autoconf version 2.4 +-# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. ++# Generated by GNU Autoconf 2.59. + # ++# Copyright (C) 2003 Free Software Foundation, Inc. + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. ++## --------------------- ## ++## M4sh Initialization. ## ++## --------------------- ## ++ ++# Be Bourne compatible ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++ emulate sh ++ NULLCMD=: ++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # is contrary to our usage. Disable this feature. ++ alias -g '${1+"$@"}'='"$@"' ++elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then ++ set -o posix ++fi ++DUALCASE=1; export DUALCASE # for MKS sh ++ ++# Support unset when possible. ++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then ++ as_unset=unset ++else ++ as_unset=false ++fi ++ ++ ++# Work around bugs in pre-3.0 UWIN ksh. ++$as_unset ENV MAIL MAILPATH ++PS1='$ ' ++PS2='> ' ++PS4='+ ' ++ ++# NLS nuisances. ++for as_var in \ ++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ++ LC_TELEPHONE LC_TIME ++do ++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then ++ eval $as_var=C; export $as_var ++ else ++ $as_unset $as_var ++ fi ++done ++ ++# Required to use basename. ++if expr a : '\(a\)' >/dev/null 2>&1; then ++ as_expr=expr ++else ++ as_expr=false ++fi ++ ++if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ++ as_basename=basename ++else ++ as_basename=false ++fi ++ ++ ++# Name of the executable. ++as_me=`$as_basename "$0" || ++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ ++ X"$0" : 'X\(//\)$' \| \ ++ X"$0" : 'X\(/\)$' \| \ ++ . : '\(.\)' 2>/dev/null || ++echo X/"$0" | ++ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } ++ /^X\/\(\/\/\)$/{ s//\1/; q; } ++ /^X\/\(\/\).*/{ s//\1/; q; } ++ s/.*/./; q'` ++ ++ ++# PATH needs CR, and LINENO needs CR and PATH. ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits ++ ++# The user is always right. ++if test "${PATH_SEPARATOR+set}" != set; then ++ echo "#! /bin/sh" >conf$$.sh ++ echo "exit 0" >>conf$$.sh ++ chmod +x conf$$.sh ++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then ++ PATH_SEPARATOR=';' ++ else ++ PATH_SEPARATOR=: ++ fi ++ rm -f conf$$.sh ++fi ++ ++ ++ as_lineno_1=$LINENO ++ as_lineno_2=$LINENO ++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ++ test "x$as_lineno_1" != "x$as_lineno_2" && ++ test "x$as_lineno_3" = "x$as_lineno_2" || { ++ # Find who we are. Look in the path if we contain no path at all ++ # relative or not. ++ case $0 in ++ *[\\/]* ) as_myself=$0 ;; ++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++done ++ ++ ;; ++ esac ++ # We did not find ourselves, most probably we were run as `sh COMMAND' ++ # in which case we are not to be found in the path. ++ if test "x$as_myself" = x; then ++ as_myself=$0 ++ fi ++ if test ! -f "$as_myself"; then ++ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 ++ { (exit 1); exit 1; }; } ++ fi ++ case $CONFIG_SHELL in ++ '') ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for as_base in sh bash ksh sh5; do ++ case $as_dir in ++ /*) ++ if ("$as_dir/$as_base" -c ' ++ as_lineno_1=$LINENO ++ as_lineno_2=$LINENO ++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ++ test "x$as_lineno_1" != "x$as_lineno_2" && ++ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then ++ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } ++ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } ++ CONFIG_SHELL=$as_dir/$as_base ++ export CONFIG_SHELL ++ exec "$CONFIG_SHELL" "$0" ${1+"$@"} ++ fi;; ++ esac ++ done ++done ++;; ++ esac ++ ++ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO ++ # uniformly replaced by the line number. The first 'sed' inserts a ++ # line-number line before each line; the second 'sed' does the real ++ # work. The second script uses 'N' to pair each line-number line ++ # with the numbered line, and appends trailing '-' during ++ # substitution so that $LINENO is not a special case at line end. ++ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the ++ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) ++ sed '=' <$as_myself | ++ sed ' ++ N ++ s,$,-, ++ : loop ++ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ++ t loop ++ s,-$,, ++ s,^['$as_cr_digits']*\n,, ++ ' >$as_me.lineno && ++ chmod +x $as_me.lineno || ++ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 ++ { (exit 1); exit 1; }; } ++ ++ # Don't try to exec as it changes $[0], causing all sort of problems ++ # (the dirname of $[0] is not the place where we might find the ++ # original and so on. Autoconf is especially sensible to this). ++ . ./$as_me.lineno ++ # Exit status is that of the last command. ++ exit ++} ++ ++ ++case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in ++ *c*,-n*) ECHO_N= ECHO_C=' ++' ECHO_T=' ' ;; ++ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; ++ *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ++esac ++ ++if expr a : '\(a\)' >/dev/null 2>&1; then ++ as_expr=expr ++else ++ as_expr=false ++fi ++ ++rm -f conf$$ conf$$.exe conf$$.file ++echo >conf$$.file ++if ln -s conf$$.file conf$$ 2>/dev/null; then ++ # We could just check for DJGPP; but this test a) works b) is more generic ++ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). ++ if test -f conf$$.exe; then ++ # Don't use ln at all; we don't have any links ++ as_ln_s='cp -p' ++ else ++ as_ln_s='ln -s' ++ fi ++elif ln conf$$.file conf$$ 2>/dev/null; then ++ as_ln_s=ln ++else ++ as_ln_s='cp -p' ++fi ++rm -f conf$$ conf$$.exe conf$$.file ++ ++if mkdir -p . 2>/dev/null; then ++ as_mkdir_p=: ++else ++ test -d ./-p && rmdir ./-p ++ as_mkdir_p=false ++fi ++ ++as_executable_p="test -f" ++ ++# Sed expression to map a string onto a valid CPP name. ++as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" ++ ++# Sed expression to map a string onto a valid variable name. ++as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" ++ ++ ++# IFS ++# We need space, tab and new line, in precisely that order. ++as_nl=' ++' ++IFS=" $as_nl" ++ ++# CDPATH. ++$as_unset CDPATH + +-# Defaults: +-ac_help= ++ ++# Name of the host. ++# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, ++# so uname gets run too. ++ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` ++ ++exec 6>&1 ++ ++# ++# Initializations. ++# + ac_default_prefix=/usr/local +-# Any additions from configure.in: +-ac_help="$ac_help +- --with-diffutils assume GNU diffutils is similarly installed" ++ac_config_libobj_dir=. ++cross_compiling=no ++subdirs= ++MFLAGS= ++MAKEFLAGS= ++SHELL=${CONFIG_SHELL-/bin/sh} ++ ++# Maximum number of lines to put in a shell here document. ++# This variable seems obsolete. It should probably be removed, and ++# only ac_max_sed_lines should be used. ++: ${ac_max_here_lines=38} ++ ++# Identity of this package. ++PACKAGE_NAME= ++PACKAGE_TARNAME= ++PACKAGE_VERSION= ++PACKAGE_STRING= ++PACKAGE_BUGREPORT= ++ ++ac_unique_file="src/rcsbase.h" ++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DIFF DIFF_SUCCESS DIFF_FAILURE DIFF_TROUBLE DIFFFLAGS DIFF_L DIFF3 DIFF3_BIN ED SENDMAIL PIC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE LIBOBJS LTLIBOBJS' ++ac_subst_files='' + + # Initialize some variables set by options. ++ac_init_help= ++ac_init_version=false + # The variables have the same names as the options, with + # dashes changed to underlines. +-build=NONE +-cache_file=./config.cache ++cache_file=/dev/null + exec_prefix=NONE +-host=NONE + no_create= +-nonopt=NONE + no_recursion= + prefix=NONE + program_prefix=NONE +@@ -31,18 +291,31 @@ + silent= + site= + srcdir= +-target=NONE + verbose= + x_includes=NONE + x_libraries=NONE + +-# Initialize some other variables. +-subdirs= ++# Installation directory options. ++# These are left unexpanded so users can "make install exec_prefix=/foo" ++# and all the variables that are supposed to be based on exec_prefix ++# by default will actually change. ++# Use braces instead of parens because sh, perl, etc. also accept them. ++bindir='${exec_prefix}/bin' ++sbindir='${exec_prefix}/sbin' ++libexecdir='${exec_prefix}/libexec' ++datadir='${prefix}/share' ++sysconfdir='${prefix}/etc' ++sharedstatedir='${prefix}/com' ++localstatedir='${prefix}/var' ++libdir='${exec_prefix}/lib' ++includedir='${prefix}/include' ++oldincludedir='/usr/include' ++infodir='${prefix}/info' ++mandir='${prefix}/man' + + ac_prev= + for ac_option + do +- + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" +@@ -50,48 +323,59 @@ + continue + fi + +- case "$ac_option" in +- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; +- *) ac_optarg= ;; +- esac ++ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + +- case "$ac_option" in ++ case $ac_option in + +- -build | --build | --buil | --bui | --bu | --b) +- ac_prev=build ;; +- -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) +- build="$ac_optarg" ;; ++ -bindir | --bindir | --bindi | --bind | --bin | --bi) ++ ac_prev=bindir ;; ++ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) ++ bindir=$ac_optarg ;; ++ ++ -build | --build | --buil | --bui | --bu) ++ ac_prev=build_alias ;; ++ -build=* | --build=* | --buil=* | --bui=* | --bu=*) ++ build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) +- cache_file="$ac_optarg" ;; ++ cache_file=$ac_optarg ;; ++ ++ --config-cache | -C) ++ cache_file=config.cache ;; ++ ++ -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ++ ac_prev=datadir ;; ++ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ ++ | --da=*) ++ datadir=$ac_optarg ;; + + -disable-* | --disable-*) +- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` ++ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. +- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then +- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } +- fi +- ac_feature=`echo $ac_feature| sed 's/-/_/g'` +- eval "enable_${ac_feature}=no" ;; ++ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ++ { (exit 1); exit 1; }; } ++ ac_feature=`echo $ac_feature | sed 's/-/_/g'` ++ eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) +- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` ++ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then +- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } +- fi +- ac_feature=`echo $ac_feature| sed 's/-/_/g'` +- case "$ac_option" in +- *=*) ;; ++ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ++ { (exit 1); exit 1; }; } ++ ac_feature=`echo $ac_feature | sed 's/-/_/g'` ++ case $ac_option in ++ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac +- eval "enable_${ac_feature}='$ac_optarg'" ;; ++ eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ +@@ -100,83 +384,101 @@ + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) +- exec_prefix="$ac_optarg" ;; ++ exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + +- -help | --help | --hel | --he) +- # Omit some internal or obsolete options to make the list less imposing. +- # This message is too long to be a string in the A/UX 3.1 sh. +- cat << EOF +-Usage: configure [options] [host] +-Options: [defaults in brackets after descriptions] +-Configuration: +- --cache-file=FILE cache test results in FILE +- --help print this message +- --no-create do not create output files +- --quiet, --silent do not print \`checking...' messages +- --version print the version of autoconf that created configure +-Directory and file names: +- --prefix=PREFIX install architecture-independent files in PREFIX +- [$ac_default_prefix] +- --exec-prefix=PREFIX install architecture-dependent files in PREFIX +- [same as prefix] +- --srcdir=DIR find the sources in DIR [configure dir or ..] +- --program-prefix=PREFIX prepend PREFIX to installed program names +- --program-suffix=SUFFIX append SUFFIX to installed program names +- --program-transform-name=PROGRAM run sed PROGRAM on installed program names +-Host type: +- --build=BUILD configure for building on BUILD [BUILD=HOST] +- --host=HOST configure for HOST [guessed] +- --target=TARGET configure for TARGET [TARGET=HOST] +-Features and packages: +- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) +- --enable-FEATURE[=ARG] include FEATURE [ARG=yes] +- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) +- --x-includes=DIR X include files are in DIR +- --x-libraries=DIR X library files are in DIR +---enable and --with options recognized:$ac_help +-EOF +- exit 0 ;; ++ -help | --help | --hel | --he | -h) ++ ac_init_help=long ;; ++ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ++ ac_init_help=recursive ;; ++ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ++ ac_init_help=short ;; + + -host | --host | --hos | --ho) +- ac_prev=host ;; ++ ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) +- host="$ac_optarg" ;; ++ host_alias=$ac_optarg ;; ++ ++ -includedir | --includedir | --includedi | --included | --include \ ++ | --includ | --inclu | --incl | --inc) ++ ac_prev=includedir ;; ++ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ ++ | --includ=* | --inclu=* | --incl=* | --inc=*) ++ includedir=$ac_optarg ;; ++ ++ -infodir | --infodir | --infodi | --infod | --info | --inf) ++ ac_prev=infodir ;; ++ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) ++ infodir=$ac_optarg ;; ++ ++ -libdir | --libdir | --libdi | --libd) ++ ac_prev=libdir ;; ++ -libdir=* | --libdir=* | --libdi=* | --libd=*) ++ libdir=$ac_optarg ;; ++ ++ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ ++ | --libexe | --libex | --libe) ++ ac_prev=libexecdir ;; ++ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ ++ | --libexe=* | --libex=* | --libe=*) ++ libexecdir=$ac_optarg ;; ++ ++ -localstatedir | --localstatedir | --localstatedi | --localstated \ ++ | --localstate | --localstat | --localsta | --localst \ ++ | --locals | --local | --loca | --loc | --lo) ++ ac_prev=localstatedir ;; ++ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ ++ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ ++ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ++ localstatedir=$ac_optarg ;; ++ ++ -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ++ ac_prev=mandir ;; ++ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) ++ mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ +- | --no-cr | --no-c) ++ | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + ++ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ ++ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ ++ | --oldin | --oldi | --old | --ol | --o) ++ ac_prev=oldincludedir ;; ++ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ ++ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ ++ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) ++ oldincludedir=$ac_optarg ;; ++ + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) +- prefix="$ac_optarg" ;; ++ prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) +- program_prefix="$ac_optarg" ;; ++ program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) +- program_suffix="$ac_optarg" ;; ++ program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ +@@ -193,55 +495,78 @@ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) +- program_transform_name="$ac_optarg" ;; ++ program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + ++ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ++ ac_prev=sbindir ;; ++ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ ++ | --sbi=* | --sb=*) ++ sbindir=$ac_optarg ;; ++ ++ -sharedstatedir | --sharedstatedir | --sharedstatedi \ ++ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ ++ | --sharedst | --shareds | --shared | --share | --shar \ ++ | --sha | --sh) ++ ac_prev=sharedstatedir ;; ++ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ ++ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ ++ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ ++ | --sha=* | --sh=*) ++ sharedstatedir=$ac_optarg ;; ++ + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) +- site="$ac_optarg" ;; ++ site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) +- srcdir="$ac_optarg" ;; ++ srcdir=$ac_optarg ;; ++ ++ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ ++ | --syscon | --sysco | --sysc | --sys | --sy) ++ ac_prev=sysconfdir ;; ++ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ ++ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) ++ sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) +- ac_prev=target ;; ++ ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) +- target="$ac_optarg" ;; ++ target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + +- -version | --version | --versio | --versi | --vers) +- echo "configure generated by autoconf version 2.4" +- exit 0 ;; ++ -version | --version | --versio | --versi | --vers | -V) ++ ac_init_version=: ;; + + -with-* | --with-*) +- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` ++ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then +- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } +- fi ++ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ { echo "$as_me: error: invalid package name: $ac_package" >&2 ++ { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` +- case "$ac_option" in +- *=*) ;; ++ case $ac_option in ++ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac +- eval "with_${ac_package}='$ac_optarg'" ;; ++ eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) +- ac_package=`echo $ac_option|sed -e 's/-*without-//'` ++ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. +- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then +- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } +- fi +- ac_package=`echo $ac_package| sed 's/-/_/g'` +- eval "with_${ac_package}=no" ;; ++ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ { echo "$as_me: error: invalid package name: $ac_package" >&2 ++ { (exit 1); exit 1; }; } ++ ac_package=`echo $ac_package | sed 's/-/_/g'` ++ eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. +@@ -252,96 +577,110 @@ + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) +- x_includes="$ac_optarg" ;; ++ x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) +- x_libraries="$ac_optarg" ;; ++ x_libraries=$ac_optarg ;; + +- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ++ -*) { echo "$as_me: error: unrecognized option: $ac_option ++Try \`$0 --help' for more information." >&2 ++ { (exit 1); exit 1; }; } + ;; + +- *) +- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then +- echo "configure: warning: $ac_option: invalid host type" 1>&2 +- fi +- if test "x$nonopt" != xNONE; then +- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } +- fi +- nonopt="$ac_option" ++ *=*) ++ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` ++ # Reject names that are not valid shell variable names. ++ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && ++ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 ++ { (exit 1); exit 1; }; } ++ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ++ eval "$ac_envvar='$ac_optarg'" ++ export $ac_envvar ;; ++ ++ *) ++ # FIXME: should be removed in autoconf 3.0. ++ echo "$as_me: WARNING: you should use --build, --host, --target" >&2 ++ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && ++ echo "$as_me: WARNING: invalid host type: $ac_option" >&2 ++ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac + done + + if test -n "$ac_prev"; then +- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +-fi +- +-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 +- +-# File descriptor usage: +-# 0 standard input +-# 1 file creation +-# 2 errors and warnings +-# 3 some systems may open it to /dev/tty +-# 4 used on the Kubota Titan +-# 6 checking for... messages and results +-# 5 compiler messages saved in config.log +-if test "$silent" = yes; then +- exec 6>/dev/null +-else +- exec 6>&1 ++ ac_option=--`echo $ac_prev | sed 's/_/-/g'` ++ { echo "$as_me: error: missing argument to $ac_option" >&2 ++ { (exit 1); exit 1; }; } + fi +-exec 5>./config.log + +-echo "\ +-This file contains any messages produced by compilers while +-running configure, to aid debugging if configure makes a mistake. +-" 1>&5 ++# Be sure to have absolute paths. ++for ac_var in exec_prefix prefix ++do ++ eval ac_val=$`echo $ac_var` ++ case $ac_val in ++ [\\/$]* | ?:[\\/]* | NONE | '' ) ;; ++ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 ++ { (exit 1); exit 1; }; };; ++ esac ++done + +-# Strip out --no-create and --no-recursion so they do not pile up. +-# Also quote any args containing shell metacharacters. +-ac_configure_args= +-for ac_arg ++# Be sure to have absolute paths. ++for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ ++ localstatedir libdir includedir oldincludedir infodir mandir + do +- case "$ac_arg" in +- -no-create | --no-create | --no-creat | --no-crea | --no-cre \ +- | --no-cr | --no-c) ;; +- -no-recursion | --no-recursion | --no-recursio | --no-recursi \ +- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; +- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) +- ac_configure_args="$ac_configure_args '$ac_arg'" ;; +- *) ac_configure_args="$ac_configure_args $ac_arg" ;; ++ eval ac_val=$`echo $ac_var` ++ case $ac_val in ++ [\\/$]* | ?:[\\/]* ) ;; ++ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 ++ { (exit 1); exit 1; }; };; + esac + done + +-# NLS nuisances. +-# Only set LANG and LC_ALL to C if already set. +-# These must not be set unconditionally because not all systems understand +-# e.g. LANG=C (notably SCO). +-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +-if test "${LANG+set}" = set; then LANG=C; export LANG; fi ++# There might be people who depend on the old broken behavior: `$host' ++# used to hold the argument of --host etc. ++# FIXME: To remove some day. ++build=$build_alias ++host=$host_alias ++target=$target_alias ++ ++# FIXME: To remove some day. ++if test "x$host_alias" != x; then ++ if test "x$build_alias" = x; then ++ cross_compiling=maybe ++ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. ++ If a cross compiler is detected then cross compile mode will be used." >&2 ++ elif test "x$build_alias" != "x$host_alias"; then ++ cross_compiling=yes ++ fi ++fi + +-# confdefs.h avoids OS command line length limits that DEFS can exceed. +-rm -rf conftest* confdefs.h +-# AIX cpp loses on an empty file, so make sure it contains at least a newline. +-echo > confdefs.h ++ac_tool_prefix= ++test -n "$host_alias" && ac_tool_prefix=$host_alias- ++ ++test "$silent" = yes && exec 6>/dev/null + +-# A filename unique to this package, relative to the directory that +-# configure is in, which we can look for to find out if srcdir is correct. +-ac_unique_file=src/rcsbase.h + + # Find the source files, if location was not specified. + if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. +- ac_prog=$0 +- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` +- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. ++ ac_confdir=`(dirname "$0") 2>/dev/null || ++$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$0" : 'X\(//\)[^/]' \| \ ++ X"$0" : 'X\(//\)$' \| \ ++ X"$0" : 'X\(/\)' \| \ ++ . : '\(.\)' 2>/dev/null || ++echo X"$0" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ++ /^X\(\/\/\)[^/].*/{ s//\1/; q; } ++ /^X\(\/\/\)$/{ s//\1/; q; } ++ /^X\(\/\).*/{ s//\1/; q; } ++ s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. +@@ -351,13 +690,454 @@ + fi + if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then +- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } ++ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 ++ { (exit 1); exit 1; }; } + else +- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } ++ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 ++ { (exit 1); exit 1; }; } + fi + fi +-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` ++(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || ++ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 ++ { (exit 1); exit 1; }; } ++srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ++ac_env_build_alias_set=${build_alias+set} ++ac_env_build_alias_value=$build_alias ++ac_cv_env_build_alias_set=${build_alias+set} ++ac_cv_env_build_alias_value=$build_alias ++ac_env_host_alias_set=${host_alias+set} ++ac_env_host_alias_value=$host_alias ++ac_cv_env_host_alias_set=${host_alias+set} ++ac_cv_env_host_alias_value=$host_alias ++ac_env_target_alias_set=${target_alias+set} ++ac_env_target_alias_value=$target_alias ++ac_cv_env_target_alias_set=${target_alias+set} ++ac_cv_env_target_alias_value=$target_alias ++ac_env_CC_set=${CC+set} ++ac_env_CC_value=$CC ++ac_cv_env_CC_set=${CC+set} ++ac_cv_env_CC_value=$CC ++ac_env_CFLAGS_set=${CFLAGS+set} ++ac_env_CFLAGS_value=$CFLAGS ++ac_cv_env_CFLAGS_set=${CFLAGS+set} ++ac_cv_env_CFLAGS_value=$CFLAGS ++ac_env_LDFLAGS_set=${LDFLAGS+set} ++ac_env_LDFLAGS_value=$LDFLAGS ++ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ++ac_cv_env_LDFLAGS_value=$LDFLAGS ++ac_env_CPPFLAGS_set=${CPPFLAGS+set} ++ac_env_CPPFLAGS_value=$CPPFLAGS ++ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ++ac_cv_env_CPPFLAGS_value=$CPPFLAGS ++ ++# ++# Report the --help message. ++# ++if test "$ac_init_help" = "long"; then ++ # Omit some internal or obsolete options to make the list less imposing. ++ # This message is too long to be a string in the A/UX 3.1 sh. ++ cat <<_ACEOF ++\`configure' configures this package to adapt to many kinds of systems. ++ ++Usage: $0 [OPTION]... [VAR=VALUE]... ++ ++To assign environment variables (e.g., CC, CFLAGS...), specify them as ++VAR=VALUE. See below for descriptions of some of the useful variables. ++ ++Defaults for the options are specified in brackets. ++ ++Configuration: ++ -h, --help display this help and exit ++ --help=short display options specific to this package ++ --help=recursive display the short help of all the included packages ++ -V, --version display version information and exit ++ -q, --quiet, --silent do not print \`checking...' messages ++ --cache-file=FILE cache test results in FILE [disabled] ++ -C, --config-cache alias for \`--cache-file=config.cache' ++ -n, --no-create do not create output files ++ --srcdir=DIR find the sources in DIR [configure dir or \`..'] ++ ++_ACEOF ++ ++ cat <<_ACEOF ++Installation directories: ++ --prefix=PREFIX install architecture-independent files in PREFIX ++ [$ac_default_prefix] ++ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX ++ [PREFIX] ++ ++By default, \`make install' will install all the files in ++\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify ++an installation prefix other than \`$ac_default_prefix' using \`--prefix', ++for instance \`--prefix=\$HOME'. ++ ++For better control, use the options below. ++ ++Fine tuning of the installation directories: ++ --bindir=DIR user executables [EPREFIX/bin] ++ --sbindir=DIR system admin executables [EPREFIX/sbin] ++ --libexecdir=DIR program executables [EPREFIX/libexec] ++ --datadir=DIR read-only architecture-independent data [PREFIX/share] ++ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] ++ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] ++ --localstatedir=DIR modifiable single-machine data [PREFIX/var] ++ --libdir=DIR object code libraries [EPREFIX/lib] ++ --includedir=DIR C header files [PREFIX/include] ++ --oldincludedir=DIR C header files for non-gcc [/usr/include] ++ --infodir=DIR info documentation [PREFIX/info] ++ --mandir=DIR man documentation [PREFIX/man] ++_ACEOF ++ ++ cat <<\_ACEOF ++_ACEOF ++fi ++ ++if test -n "$ac_init_help"; then ++ ++ cat <<\_ACEOF ++ ++Optional Packages: ++ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] ++ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ++ --with-diffutils assume GNU diffutils is similarly installed ++ ++Some influential environment variables: ++ CC C compiler command ++ CFLAGS C compiler flags ++ LDFLAGS linker flags, e.g. -L if you have libraries in a ++ nonstandard directory ++ CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have ++ headers in a nonstandard directory ++ ++Use these variables to override the choices made by `configure' or to help ++it to find libraries and programs with nonstandard names/locations. ++ ++_ACEOF ++fi ++ ++if test "$ac_init_help" = "recursive"; then ++ # If there are subdirs, report their specific --help. ++ ac_popdir=`pwd` ++ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue ++ test -d $ac_dir || continue ++ ac_builddir=. ++ ++if test "$ac_dir" != .; then ++ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ++ # A "../" for each directory in $ac_dir_suffix. ++ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` ++else ++ ac_dir_suffix= ac_top_builddir= ++fi ++ ++case $srcdir in ++ .) # No --srcdir option. We are building in place. ++ ac_srcdir=. ++ if test -z "$ac_top_builddir"; then ++ ac_top_srcdir=. ++ else ++ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` ++ fi ;; ++ [\\/]* | ?:[\\/]* ) # Absolute path. ++ ac_srcdir=$srcdir$ac_dir_suffix; ++ ac_top_srcdir=$srcdir ;; ++ *) # Relative path. ++ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ++ ac_top_srcdir=$ac_top_builddir$srcdir ;; ++esac ++ ++# Do not use `cd foo && pwd` to compute absolute paths, because ++# the directories may not exist. ++case `pwd` in ++.) ac_abs_builddir="$ac_dir";; ++*) ++ case "$ac_dir" in ++ .) ac_abs_builddir=`pwd`;; ++ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; ++ *) ac_abs_builddir=`pwd`/"$ac_dir";; ++ esac;; ++esac ++case $ac_abs_builddir in ++.) ac_abs_top_builddir=${ac_top_builddir}.;; ++*) ++ case ${ac_top_builddir}. in ++ .) ac_abs_top_builddir=$ac_abs_builddir;; ++ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; ++ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; ++ esac;; ++esac ++case $ac_abs_builddir in ++.) ac_abs_srcdir=$ac_srcdir;; ++*) ++ case $ac_srcdir in ++ .) ac_abs_srcdir=$ac_abs_builddir;; ++ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; ++ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; ++ esac;; ++esac ++case $ac_abs_builddir in ++.) ac_abs_top_srcdir=$ac_top_srcdir;; ++*) ++ case $ac_top_srcdir in ++ .) ac_abs_top_srcdir=$ac_abs_builddir;; ++ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; ++ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; ++ esac;; ++esac ++ ++ cd $ac_dir ++ # Check for guested configure; otherwise get Cygnus style configure. ++ if test -f $ac_srcdir/configure.gnu; then ++ echo ++ $SHELL $ac_srcdir/configure.gnu --help=recursive ++ elif test -f $ac_srcdir/configure; then ++ echo ++ $SHELL $ac_srcdir/configure --help=recursive ++ elif test -f $ac_srcdir/configure.ac || ++ test -f $ac_srcdir/configure.in; then ++ echo ++ $ac_configure --help ++ else ++ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 ++ fi ++ cd "$ac_popdir" ++ done ++fi ++ ++test -n "$ac_init_help" && exit 0 ++if $ac_init_version; then ++ cat <<\_ACEOF ++ ++Copyright (C) 2003 Free Software Foundation, Inc. ++This configure script is free software; the Free Software Foundation ++gives unlimited permission to copy, distribute and modify it. ++_ACEOF ++ exit 0 ++fi ++exec 5>config.log ++cat >&5 <<_ACEOF ++This file contains any messages produced by compilers while ++running configure, to aid debugging if configure makes a mistake. ++ ++It was created by $as_me, which was ++generated by GNU Autoconf 2.59. Invocation command line was ++ ++ $ $0 $@ ++ ++_ACEOF ++{ ++cat <<_ASUNAME ++## --------- ## ++## Platform. ## ++## --------- ## ++ ++hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` ++uname -m = `(uname -m) 2>/dev/null || echo unknown` ++uname -r = `(uname -r) 2>/dev/null || echo unknown` ++uname -s = `(uname -s) 2>/dev/null || echo unknown` ++uname -v = `(uname -v) 2>/dev/null || echo unknown` ++ ++/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` ++/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` ++ ++/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` ++/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` ++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` ++hostinfo = `(hostinfo) 2>/dev/null || echo unknown` ++/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` ++/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` ++/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` ++ ++_ASUNAME ++ ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ echo "PATH: $as_dir" ++done ++ ++} >&5 ++ ++cat >&5 <<_ACEOF ++ ++ ++## ----------- ## ++## Core tests. ## ++## ----------- ## ++ ++_ACEOF ++ ++ ++# Keep a trace of the command line. ++# Strip out --no-create and --no-recursion so they do not pile up. ++# Strip out --silent because we don't want to record it for future runs. ++# Also quote any args containing shell meta-characters. ++# Make two passes to allow for proper duplicate-argument suppression. ++ac_configure_args= ++ac_configure_args0= ++ac_configure_args1= ++ac_sep= ++ac_must_keep_next=false ++for ac_pass in 1 2 ++do ++ for ac_arg ++ do ++ case $ac_arg in ++ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; ++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ++ | -silent | --silent | --silen | --sile | --sil) ++ continue ;; ++ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ++ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ esac ++ case $ac_pass in ++ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; ++ 2) ++ ac_configure_args1="$ac_configure_args1 '$ac_arg'" ++ if test $ac_must_keep_next = true; then ++ ac_must_keep_next=false # Got value, back to normal. ++ else ++ case $ac_arg in ++ *=* | --config-cache | -C | -disable-* | --disable-* \ ++ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ ++ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ ++ | -with-* | --with-* | -without-* | --without-* | --x) ++ case "$ac_configure_args0 " in ++ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; ++ esac ++ ;; ++ -* ) ac_must_keep_next=true ;; ++ esac ++ fi ++ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" ++ # Get rid of the leading space. ++ ac_sep=" " ++ ;; ++ esac ++ done ++done ++$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } ++$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } ++ ++# When interrupted or exit'd, cleanup temporary files, and complete ++# config.log. We remove comments because anyway the quotes in there ++# would cause problems or look ugly. ++# WARNING: Be sure not to use single quotes in there, as some shells, ++# such as our DU 5.0 friend, will then `close' the trap. ++trap 'exit_status=$? ++ # Save into config.log some information that might help in debugging. ++ { ++ echo ++ ++ cat <<\_ASBOX ++## ---------------- ## ++## Cache variables. ## ++## ---------------- ## ++_ASBOX ++ echo ++ # The following way of writing the cache mishandles newlines in values, ++{ ++ (set) 2>&1 | ++ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in ++ *ac_space=\ *) ++ sed -n \ ++ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; ++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ++ ;; ++ *) ++ sed -n \ ++ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ++ ;; ++ esac; ++} ++ echo ++ ++ cat <<\_ASBOX ++## ----------------- ## ++## Output variables. ## ++## ----------------- ## ++_ASBOX ++ echo ++ for ac_var in $ac_subst_vars ++ do ++ eval ac_val=$`echo $ac_var` ++ echo "$ac_var='"'"'$ac_val'"'"'" ++ done | sort ++ echo ++ ++ if test -n "$ac_subst_files"; then ++ cat <<\_ASBOX ++## ------------- ## ++## Output files. ## ++## ------------- ## ++_ASBOX ++ echo ++ for ac_var in $ac_subst_files ++ do ++ eval ac_val=$`echo $ac_var` ++ echo "$ac_var='"'"'$ac_val'"'"'" ++ done | sort ++ echo ++ fi ++ ++ if test -s confdefs.h; then ++ cat <<\_ASBOX ++## ----------- ## ++## confdefs.h. ## ++## ----------- ## ++_ASBOX ++ echo ++ sed "/^$/d" confdefs.h | sort ++ echo ++ fi ++ test "$ac_signal" != 0 && ++ echo "$as_me: caught signal $ac_signal" ++ echo "$as_me: exit $exit_status" ++ } >&5 ++ rm -f core *.core && ++ rm -rf conftest* confdefs* conf$$* $ac_clean_files && ++ exit $exit_status ++ ' 0 ++for ac_signal in 1 2 13 15; do ++ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal ++done ++ac_signal=0 ++ ++# confdefs.h avoids OS command line length limits that DEFS can exceed. ++rm -rf conftest* confdefs.h ++# AIX cpp loses on an empty file, so make sure it contains at least a newline. ++echo >confdefs.h ++ ++# Predefined preprocessor variables. ++ ++cat >>confdefs.h <<_ACEOF ++#define PACKAGE_NAME "$PACKAGE_NAME" ++_ACEOF ++ ++ ++cat >>confdefs.h <<_ACEOF ++#define PACKAGE_TARNAME "$PACKAGE_TARNAME" ++_ACEOF ++ ++ ++cat >>confdefs.h <<_ACEOF ++#define PACKAGE_VERSION "$PACKAGE_VERSION" ++_ACEOF + ++ ++cat >>confdefs.h <<_ACEOF ++#define PACKAGE_STRING "$PACKAGE_STRING" ++_ACEOF ++ ++ ++cat >>confdefs.h <<_ACEOF ++#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" ++_ACEOF ++ ++ ++# Let the site file select an alternate cache file if it wants to. + # Prefer explicitly selected file to automatically selected ones. + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then +@@ -368,36 +1148,103 @@ + fi + for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then +- echo "loading site script $ac_site_file" ++ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 ++echo "$as_me: loading site script $ac_site_file" >&6;} ++ sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi + done + + if test -r "$cache_file"; then +- echo "loading cache $cache_file" +- . $cache_file ++ # Some versions of bash will fail to source /dev/null (special ++ # files actually), so we avoid doing that. ++ if test -f "$cache_file"; then ++ { echo "$as_me:$LINENO: loading cache $cache_file" >&5 ++echo "$as_me: loading cache $cache_file" >&6;} ++ case $cache_file in ++ [\\/]* | ?:[\\/]* ) . $cache_file;; ++ *) . ./$cache_file;; ++ esac ++ fi + else +- echo "creating cache $cache_file" +- > $cache_file ++ { echo "$as_me:$LINENO: creating cache $cache_file" >&5 ++echo "$as_me: creating cache $cache_file" >&6;} ++ >$cache_file ++fi ++ ++# Check that the precious variables saved in the cache have kept the same ++# value. ++ac_cache_corrupted=false ++for ac_var in `(set) 2>&1 | ++ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do ++ eval ac_old_set=\$ac_cv_env_${ac_var}_set ++ eval ac_new_set=\$ac_env_${ac_var}_set ++ eval ac_old_val="\$ac_cv_env_${ac_var}_value" ++ eval ac_new_val="\$ac_env_${ac_var}_value" ++ case $ac_old_set,$ac_new_set in ++ set,) ++ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 ++echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ++ ac_cache_corrupted=: ;; ++ ,set) ++ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 ++echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ++ ac_cache_corrupted=: ;; ++ ,);; ++ *) ++ if test "x$ac_old_val" != "x$ac_new_val"; then ++ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 ++echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ++ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 ++echo "$as_me: former value: $ac_old_val" >&2;} ++ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 ++echo "$as_me: current value: $ac_new_val" >&2;} ++ ac_cache_corrupted=: ++ fi;; ++ esac ++ # Pass precious variables to config.status. ++ if test "$ac_new_set" = set; then ++ case $ac_new_val in ++ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ++ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; ++ *) ac_arg=$ac_var=$ac_new_val ;; ++ esac ++ case " $ac_configure_args " in ++ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. ++ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; ++ esac ++ fi ++done ++if $ac_cache_corrupted; then ++ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 ++echo "$as_me: error: changes in the environment can compromise the build" >&2;} ++ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 ++echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} ++ { (exit 1); exit 1; }; } + fi + + ac_ext=c +-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. + ac_cpp='$CPP $CPPFLAGS' +-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' +-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + +-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then +- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. +- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then +- ac_n= ac_c=' +-' ac_t=' ' +- else +- ac_n=-n ac_c= ac_t= +- fi +-else +- ac_n= ac_c='\c' ac_t= +-fi + + + +@@ -411,15 +1258,15 @@ + 1 + EOF + ++ + # Check whether --with-diffutils or --without-diffutils was given. +-withval="$with_diffutils" +-if test -n "$withval"; then ++if test "${with_diffutils+set}" = set; then ++ withval="$with_diffutils" + with_diffutils=$withval + else + with_diffutils=no + +-fi +- ++fi; + + case $with_diffutils in + yes) +@@ -437,11 +1284,12 @@ + # On some systems, the RCS-compatible diff program is called `rdiff'; + # use it if it works and `diff' doesn't. + +-echo $ac_n "checking diff basename""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'rcs_cv_prog_diff'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking diff basename" >&5 ++echo $ECHO_N "checking diff basename... $ECHO_C" >&6 ++if test "${rcs_cv_prog_diff+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ++ + rcs_cv_prog_diff=$DIFF + case $rcs_cv_prog_diff in + '') +@@ -463,49 +1311,62 @@ + + DIFF=$rcs_cv_prog_diff + case $DIFF in +-'') { echo "configure: error: cannot find RCS-compatible diff" 1>&2; exit 1; };; ++'') { { echo "$as_me:$LINENO: error: cannot find RCS-compatible diff" >&5 ++echo "$as_me: error: cannot find RCS-compatible diff" >&2;} ++ { (exit 1); exit 1; }; };; + esac +-echo "$ac_t""$DIFF" 1>&6 ++echo "$as_me:$LINENO: result: $DIFF" >&5 ++echo "${ECHO_T}$DIFF" >&6 + # Extract the first word of "$DIFF", so it can be a program name with args. + set dummy $DIFF; ac_word=$2 +-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'ac_cv_path_DIFF'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_DIFF+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- case "$DIFF" in +- /*) ++ case $DIFF in ++ [\\/]* | ?:[\\/]*) + ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path. + ;; + *) +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_path_DIFF="$ac_dir/$ac_word" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ + test -z "$ac_cv_path_DIFF" && ac_cv_path_DIFF="$DIFF" + ;; + esac + fi +-DIFF="$ac_cv_path_DIFF" ++DIFF=$ac_cv_path_DIFF ++ + if test -n "$DIFF"; then +- echo "$ac_t""$DIFF" 1>&6 ++ echo "$as_me:$LINENO: result: $DIFF" >&5 ++echo "${ECHO_T}$DIFF" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + + + # Set DIFF_SUCCESS, DIFF_FAILURE, DIFF_TROUBLE to diff's exit status + # when it finds no differences, some differences, or trouble. + +-echo $ac_n "checking diff success status""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'rcs_cv_status_diff_success'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking diff success status" >&5 ++echo $ECHO_N "checking diff success status... $ECHO_C" >&6 ++if test "${rcs_cv_status_diff_success+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ++ + rcs_cv_status_diff_success=$DIFF_SUCCESS + case $rcs_cv_status_diff_success in + '') +@@ -519,14 +1380,16 @@ + fi + + DIFF_SUCCESS=$rcs_cv_status_diff_success +-echo "$ac_t""$DIFF_SUCCESS" 1>&6 ++echo "$as_me:$LINENO: result: $DIFF_SUCCESS" >&5 ++echo "${ECHO_T}$DIFF_SUCCESS" >&6 + # + +-echo $ac_n "checking diff failure status""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'rcs_cv_status_diff_failure'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking diff failure status" >&5 ++echo $ECHO_N "checking diff failure status... $ECHO_C" >&6 ++if test "${rcs_cv_status_diff_failure+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ++ + rcs_cv_status_diff_failure=$DIFF_FAILURE + case $rcs_cv_status_diff_failure in + '') +@@ -538,14 +1401,16 @@ + fi + + DIFF_FAILURE=$rcs_cv_status_diff_failure +-echo "$ac_t""$DIFF_FAILURE" 1>&6 ++echo "$as_me:$LINENO: result: $DIFF_FAILURE" >&5 ++echo "${ECHO_T}$DIFF_FAILURE" >&6 + # + +-echo $ac_n "checking diff trouble status""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'rcs_cv_status_diff_trouble'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking diff trouble status" >&5 ++echo $ECHO_N "checking diff trouble status... $ECHO_C" >&6 ++if test "${rcs_cv_status_diff_trouble+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ++ + rcs_cv_status_diff_trouble=$DIFF_TROUBLE + case $rcs_cv_status_diff_trouble in + '') +@@ -557,16 +1422,18 @@ + fi + + DIFF_TROUBLE=$rcs_cv_status_diff_trouble +-echo "$ac_t""$DIFF_TROUBLE" 1>&6 ++echo "$as_me:$LINENO: result: $DIFF_TROUBLE" >&5 ++echo "${ECHO_T}$DIFF_TROUBLE" >&6 + + # Set DIFFFLAGS to the options of the `diff' program to be run. + # Use -an if possible, -n otherwise. + +-echo $ac_n "checking diff options for RCS""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'rcs_cv_options_diff'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking diff options for RCS" >&5 ++echo $ECHO_N "checking diff options for RCS... $ECHO_C" >&6 ++if test "${rcs_cv_options_diff+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ++ + rcs_cv_options_diff=$DIFFFLAGS + case $rcs_cv_options_diff in + '') +@@ -585,15 +1452,17 @@ + fi + + DIFFFLAGS=$rcs_cv_options_diff +-echo "$ac_t""$DIFFFLAGS" 1>&6 ++echo "$as_me:$LINENO: result: $DIFFFLAGS" >&5 ++echo "${ECHO_T}$DIFFFLAGS" >&6 + + # Set DIFF_L to 1 if diff understands the L option, 0 otherwise. + +-echo $ac_n "checking diff -L""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'rcs_cv_options_diff_l'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking diff -L" >&5 ++echo $ECHO_N "checking diff -L... $ECHO_C" >&6 ++if test "${rcs_cv_options_diff_l+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ++ + rcs_cv_options_diff_l=$DIFF_L + case $rcs_cv_options_diff_l in + '') +@@ -621,19 +1490,22 @@ + + DIFF_L=$rcs_cv_options_diff_l + case $DIFF_L in +-1) echo "$ac_t""yes" 1>&6;; +-*) echo "$ac_t""no" 1>&6;; ++1) echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6;; ++*) echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6;; + esac + + # Set DIFF3 to the name of the diff3 program. + # In some systems (e.g. BSD/OS 2.0), diffutils diff3 lives in /usr/libexec. + diff3PATH=$PATH:/usr/libexec + +-echo $ac_n "checking diff3 -m""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'rcs_cv_prog_diff3_bin'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking diff3 -m" >&5 ++echo $ECHO_N "checking diff3 -m... $ECHO_C" >&6 ++if test "${rcs_cv_prog_diff3_bin+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ++ + rcs_cv_prog_diff3_bin=$DIFF3 + case $rcs_cv_prog_diff3_bin in + '') +@@ -657,49 +1529,61 @@ + + case $rcs_cv_prog_diff3_bin in + ?*) +- echo "$ac_t""yes" 1>&6 ++ echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6 + ac_save_path=$PATH + PATH=$diff3PATH + # Extract the first word of "$rcs_cv_prog_diff3_bin", so it can be a program name with args. + set dummy $rcs_cv_prog_diff3_bin; ac_word=$2 +-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'ac_cv_path_DIFF3'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_DIFF3+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- case "$DIFF3" in +- /*) ++ case $DIFF3 in ++ [\\/]* | ?:[\\/]*) + ac_cv_path_DIFF3="$DIFF3" # Let the user override the test with a path. + ;; + *) +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_path_DIFF3="$ac_dir/$ac_word" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_path_DIFF3="$as_dir/$ac_word$ac_exec_ext" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ + test -z "$ac_cv_path_DIFF3" && ac_cv_path_DIFF3="$rcs_cv_prog_diff3_bin" + ;; + esac + fi +-DIFF3="$ac_cv_path_DIFF3" ++DIFF3=$ac_cv_path_DIFF3 ++ + if test -n "$DIFF3"; then +- echo "$ac_t""$DIFF3" 1>&6 ++ echo "$as_me:$LINENO: result: $DIFF3" >&5 ++echo "${ECHO_T}$DIFF3" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + + PATH=$ac_save_path + ;; + '') +- echo "$ac_t""no" 1>&6 +- echo $ac_n "checking diff3 library program""... $ac_c" 1>&6 +- if eval "test \"`echo '$''{'rcs_cv_path_diff3_lib'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++ echo "$as_me:$LINENO: checking diff3 library program" >&5 ++echo $ECHO_N "checking diff3 library program... $ECHO_C" >&6 ++ if test "${rcs_cv_path_diff3_lib+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ++ + $DIFF conftest0 conftest1 >conftest01 + $DIFF /dev/null conftest1 >conftestn1 + for i in /usr/*lib*/*diff3*; do +@@ -714,13 +1598,16 @@ + break + fi + done +- ++ + fi + + DIFF3=$rcs_cv_path_diff3_lib + case $DIFF3 in +- '') { echo "configure: error: cannot find a working diff3 library program" 1>&2; exit 1; };; +- ?*) echo "$ac_t""$DIFF3" 1>&6;; ++ '') { { echo "$as_me:$LINENO: error: cannot find a working diff3 library program" >&5 ++echo "$as_me: error: cannot find a working diff3 library program" >&2;} ++ { (exit 1); exit 1; }; };; ++ ?*) echo "$as_me:$LINENO: result: $DIFF3" >&5 ++echo "${ECHO_T}$DIFF3" >&6;; + esac + ;; + esac +@@ -740,71 +1627,89 @@ + + # Extract the first word of "ed", so it can be a program name with args. + set dummy ed; ac_word=$2 +-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'ac_cv_path_ED'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_ED+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- case "$ED" in +- /*) ++ case $ED in ++ [\\/]* | ?:[\\/]*) + ac_cv_path_ED="$ED" # Let the user override the test with a path. + ;; + *) +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_path_ED="$ac_dir/$ac_word" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_path_ED="$as_dir/$ac_word$ac_exec_ext" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ + test -z "$ac_cv_path_ED" && ac_cv_path_ED="ed" + ;; + esac + fi +-ED="$ac_cv_path_ED" ++ED=$ac_cv_path_ED ++ + if test -n "$ED"; then +- echo "$ac_t""$ED" 1>&6 ++ echo "$as_me:$LINENO: result: $ED" >&5 ++echo "${ECHO_T}$ED" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + + + ac_save_path=$PATH +-PATH=/usr/lib:/usr/bin:/bin:/usr/sbin:/sbin:$PATH ++PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/lib:$PATH + for ac_prog in sendmail mail mailx + do +-# Extract the first word of "$ac_prog", so it can be a program name with args. ++ # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_path_SENDMAIL+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- case "$SENDMAIL" in +- /*) ++ case $SENDMAIL in ++ [\\/]* | ?:[\\/]*) + ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. + ;; + *) +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_path_SENDMAIL="$ac_dir/$ac_word" +- break +- fi +- done +- IFS="$ac_save_ifs" ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_path_SENDMAIL="$as_dir/$ac_word$ac_exec_ext" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ + ;; + esac + fi +-SENDMAIL="$ac_cv_path_SENDMAIL" ++SENDMAIL=$ac_cv_path_SENDMAIL ++ + if test -n "$SENDMAIL"; then +- echo "$ac_t""$SENDMAIL" 1>&6 ++ echo "$as_me:$LINENO: result: $SENDMAIL" >&5 ++echo "${ECHO_T}$SENDMAIL" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + +-test -n "$SENDMAIL" && break ++ test -n "$SENDMAIL" && break + done + + PATH=$ac_save_path +@@ -817,110 +1722,969 @@ + # Similarly, if using traditional pic, use its -D option. + for ac_prog in "pic -n" "gpic -n" "pic -D" "pic" + do +-# Extract the first word of "$ac_prog", so it can be a program name with args. ++ # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'ac_cv_prog_PIC'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_PIC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$PIC"; then + ac_cv_prog_PIC="$PIC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_prog_PIC="$ac_prog" +- break +- fi +- done +- IFS="$ac_save_ifs" ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_PIC="$ac_prog" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ + fi + fi +-PIC="$ac_cv_prog_PIC" ++PIC=$ac_cv_prog_PIC + if test -n "$PIC"; then +- echo "$ac_t""$PIC" 1>&6 ++ echo "$as_me:$LINENO: result: $PIC" >&5 ++echo "${ECHO_T}$PIC" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + +-test -n "$PIC" && break ++ test -n "$PIC" && break + done + test -n "$PIC" || PIC="pic" + + +-# Extract the first word of "gcc", so it can be a program name with args. ++ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. ++set dummy ${ac_tool_prefix}gcc; ac_word=$2 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_CC="${ac_tool_prefix}gcc" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ ++fi ++fi ++CC=$ac_cv_prog_CC ++if test -n "$CC"; then ++ echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6 ++else ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++fi ++if test -z "$ac_cv_prog_CC"; then ++ ac_ct_CC=$CC ++ # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 +-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$ac_ct_CC"; then ++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_CC="gcc" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ ++fi ++fi ++ac_ct_CC=$ac_cv_prog_ac_ct_CC ++if test -n "$ac_ct_CC"; then ++ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++echo "${ECHO_T}$ac_ct_CC" >&6 ++else ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++ CC=$ac_ct_CC ++else ++ CC="$ac_cv_prog_CC" ++fi ++ ++if test -z "$CC"; then ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. ++set dummy ${ac_tool_prefix}cc; ac_word=$2 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do +- test -z "$ac_dir" && ac_dir=. +- if test -f $ac_dir/$ac_word; then +- ac_cv_prog_CC="gcc" +- break +- fi +- done +- IFS="$ac_save_ifs" +- test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_CC="${ac_tool_prefix}cc" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ + fi + fi +-CC="$ac_cv_prog_CC" ++CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$ac_t""$CC" 1>&6 ++ echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6 + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 + fi + ++fi ++if test -z "$ac_cv_prog_CC"; then ++ ac_ct_CC=$CC ++ # Extract the first word of "cc", so it can be a program name with args. ++set dummy cc; ac_word=$2 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$ac_ct_CC"; then ++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_CC="cc" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done + +-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++fi ++fi ++ac_ct_CC=$ac_cv_prog_ac_ct_CC ++if test -n "$ac_ct_CC"; then ++ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++echo "${ECHO_T}$ac_ct_CC" >&6 + else +- cat > conftest.c <&5 | egrep yes >/dev/null 2>&1; then +- ac_cv_prog_gcc=yes ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++ CC=$ac_ct_CC + else +- ac_cv_prog_gcc=no ++ CC="$ac_cv_prog_CC" + fi ++ + fi +-echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +-if test $ac_cv_prog_gcc = yes; then +- GCC=yes +- if test "${CFLAGS+set}" != set; then +- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +-if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++if test -z "$CC"; then ++ # Extract the first word of "cc", so it can be a program name with args. ++set dummy cc; ac_word=$2 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- echo 'void f(){}' > conftest.c +-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then +- ac_cv_prog_gcc_g=yes ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ ac_prog_rejected=no ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ++ ac_prog_rejected=yes ++ continue ++ fi ++ ac_cv_prog_CC="cc" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ ++if test $ac_prog_rejected = yes; then ++ # We found a bogon in the path, so make sure we never use it. ++ set dummy $ac_cv_prog_CC ++ shift ++ if test $# != 0; then ++ # We chose a different compiler from the bogus one. ++ # However, it has the same basename, so the bogon will be chosen ++ # first if we set CC to just the basename; use the full file name. ++ shift ++ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" ++ fi ++fi ++fi ++fi ++CC=$ac_cv_prog_CC ++if test -n "$CC"; then ++ echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6 + else +- ac_cv_prog_gcc_g=no ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++fi ++if test -z "$CC"; then ++ if test -n "$ac_tool_prefix"; then ++ for ac_prog in cl ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_CC="$ac_tool_prefix$ac_prog" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ ++fi ++fi ++CC=$ac_cv_prog_CC ++if test -n "$CC"; then ++ echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6 ++else ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++ test -n "$CC" && break ++ done ++fi ++if test -z "$CC"; then ++ ac_ct_CC=$CC ++ for ac_prog in cl ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$ac_ct_CC"; then ++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_CC="$ac_prog" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ ++fi ++fi ++ac_ct_CC=$ac_cv_prog_ac_ct_CC ++if test -n "$ac_ct_CC"; then ++ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++echo "${ECHO_T}$ac_ct_CC" >&6 ++else ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++ test -n "$ac_ct_CC" && break ++done ++ ++ CC=$ac_ct_CC + fi +-rm -f conftest* + + fi +- echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 +- if test $ac_cv_prog_gcc_g = yes; then +- CFLAGS="-g -O" ++ ++ ++test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH ++See \`config.log' for more details." >&5 ++echo "$as_me: error: no acceptable C compiler found in \$PATH ++See \`config.log' for more details." >&2;} ++ { (exit 1); exit 1; }; } ++ ++# Provide some information about the compiler. ++echo "$as_me:$LINENO:" \ ++ "checking for C compiler version" >&5 ++ac_compiler=`set X $ac_compile; echo $2` ++{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 ++ (eval $ac_compiler --version &5) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } ++{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 ++ (eval $ac_compiler -v &5) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } ++{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 ++ (eval $ac_compiler -V &5) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } ++ ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++ac_clean_files_save=$ac_clean_files ++ac_clean_files="$ac_clean_files a.out a.exe b.out" ++# Try to create an executable without -o first, disregard a.out. ++# It will help us diagnose broken compilers, and finding out an intuition ++# of exeext. ++echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 ++echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ++ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` ++if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 ++ (eval $ac_link_default) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; then ++ # Find the output, starting from the most likely. This scheme is ++# not robust to junk in `.', hence go to wildcards (a.*) only as a last ++# resort. ++ ++# Be careful to initialize this variable, since it used to be cached. ++# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ++ac_cv_exeext= ++# b.out is created by i960 compilers. ++for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out ++do ++ test -f "$ac_file" || continue ++ case $ac_file in ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ++ ;; ++ conftest.$ac_ext ) ++ # This is the source file. ++ ;; ++ [ab].out ) ++ # We found the default executable, but exeext='' is most ++ # certainly right. ++ break;; ++ *.* ) ++ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ++ # FIXME: I believe we export ac_cv_exeext for Libtool, ++ # but it would be cool to find out if it's true. Does anybody ++ # maintain Libtool? --akim. ++ export ac_cv_exeext ++ break;; ++ * ) ++ break;; ++ esac ++done ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++{ { echo "$as_me:$LINENO: error: C compiler cannot create executables ++See \`config.log' for more details." >&5 ++echo "$as_me: error: C compiler cannot create executables ++See \`config.log' for more details." >&2;} ++ { (exit 77); exit 77; }; } ++fi ++ ++ac_exeext=$ac_cv_exeext ++echo "$as_me:$LINENO: result: $ac_file" >&5 ++echo "${ECHO_T}$ac_file" >&6 ++ ++# Check the compiler produces executables we can run. If not, either ++# the compiler is broken, or we cross compile. ++echo "$as_me:$LINENO: checking whether the C compiler works" >&5 ++echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 ++# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 ++# If not cross compiling, check that we can run a simple program. ++if test "$cross_compiling" != yes; then ++ if { ac_try='./$ac_file' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ cross_compiling=no ++ else ++ if test "$cross_compiling" = maybe; then ++ cross_compiling=yes + else +- CFLAGS="-O" ++ { { echo "$as_me:$LINENO: error: cannot run C compiled programs. ++If you meant to cross compile, use \`--host'. ++See \`config.log' for more details." >&5 ++echo "$as_me: error: cannot run C compiled programs. ++If you meant to cross compile, use \`--host'. ++See \`config.log' for more details." >&2;} ++ { (exit 1); exit 1; }; } + fi + fi ++fi ++echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6 ++ ++rm -f a.out a.exe conftest$ac_cv_exeext b.out ++ac_clean_files=$ac_clean_files_save ++# Check the compiler produces executables we can run. If not, either ++# the compiler is broken, or we cross compile. ++echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 ++echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 ++echo "$as_me:$LINENO: result: $cross_compiling" >&5 ++echo "${ECHO_T}$cross_compiling" >&6 ++ ++echo "$as_me:$LINENO: checking for suffix of executables" >&5 ++echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; then ++ # If both `conftest.exe' and `conftest' are `present' (well, observable) ++# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will ++# work properly (i.e., refer to `conftest.exe'), while it won't with ++# `rm'. ++for ac_file in conftest.exe conftest conftest.*; do ++ test -f "$ac_file" || continue ++ case $ac_file in ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; ++ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ++ export ac_cv_exeext ++ break;; ++ * ) break;; ++ esac ++done ++else ++ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link ++See \`config.log' for more details." >&5 ++echo "$as_me: error: cannot compute suffix of executables: cannot compile and link ++See \`config.log' for more details." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++ ++rm -f conftest$ac_cv_exeext ++echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 ++echo "${ECHO_T}$ac_cv_exeext" >&6 ++ ++rm -f conftest.$ac_ext ++EXEEXT=$ac_cv_exeext ++ac_exeext=$EXEEXT ++echo "$as_me:$LINENO: checking for suffix of object files" >&5 ++echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 ++if test "${ac_cv_objext+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.o conftest.obj ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; then ++ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do ++ case $ac_file in ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; ++ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` ++ break;; ++ esac ++done ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile ++See \`config.log' for more details." >&5 ++echo "$as_me: error: cannot compute suffix of object files: cannot compile ++See \`config.log' for more details." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++ ++rm -f conftest.$ac_cv_objext conftest.$ac_ext ++fi ++echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 ++echo "${ECHO_T}$ac_cv_objext" >&6 ++OBJEXT=$ac_cv_objext ++ac_objext=$OBJEXT ++echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 ++echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 ++if test "${ac_cv_c_compiler_gnu+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++#ifndef __GNUC__ ++ choke me ++#endif ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_compiler_gnu=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_compiler_gnu=no ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ac_cv_c_compiler_gnu=$ac_compiler_gnu ++ ++fi ++echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 ++echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 ++GCC=`test $ac_compiler_gnu = yes && echo yes` ++ac_test_CFLAGS=${CFLAGS+set} ++ac_save_CFLAGS=$CFLAGS ++CFLAGS="-g" ++echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 ++echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 ++if test "${ac_cv_prog_cc_g+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_prog_cc_g=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_cv_prog_cc_g=no ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 ++echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS=$ac_save_CFLAGS ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then ++ CFLAGS="-g -O2" ++ else ++ CFLAGS="-g" ++ fi ++else ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi ++fi ++echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 ++echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 ++if test "${ac_cv_prog_cc_stdc+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_cv_prog_cc_stdc=no ++ac_save_CC=$CC ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include ++#include ++#include ++#include ++/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ ++struct buf { int x; }; ++FILE * (*rcsopen) (struct buf *, struct stat *, int); ++static char *e (p, i) ++ char **p; ++ int i; ++{ ++ return p[i]; ++} ++static char *f (char * (*g) (char **, int), char **p, ...) ++{ ++ char *s; ++ va_list v; ++ va_start (v,p); ++ s = g (p, va_arg (v,int)); ++ va_end (v); ++ return s; ++} ++ ++/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has ++ function prototypes and stuff, but not '\xHH' hex character constants. ++ These don't provoke an error unfortunately, instead are silently treated ++ as 'x'. The following induces an error, until -std1 is added to get ++ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an ++ array size at least. It's necessary to write '\x00'==0 to get something ++ that's true only with -std1. */ ++int osf4_cc_array ['\x00' == 0 ? 1 : -1]; ++ ++int test (int i, double x); ++struct s1 {int (*f) (int a);}; ++struct s2 {int (*f) (double a);}; ++int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); ++int argc; ++char **argv; ++int ++main () ++{ ++return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ++ ; ++ return 0; ++} ++_ACEOF ++# Don't try gcc -ansi; that turns off useful extensions and ++# breaks some systems' header files. ++# AIX -qlanglvl=ansi ++# Ultrix and OSF/1 -std1 ++# HP-UX 10.20 and later -Ae ++# HP-UX older versions -Aa -D_HPUX_SOURCE ++# SVR4 -Xc -D__EXTENSIONS__ ++for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" ++do ++ CC="$ac_save_CC $ac_arg" ++ rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_prog_cc_stdc=$ac_arg ++break ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++fi ++rm -f conftest.err conftest.$ac_objext ++done ++rm -f conftest.$ac_ext conftest.$ac_objext ++CC=$ac_save_CC ++ ++fi ++ ++case "x$ac_cv_prog_cc_stdc" in ++ x|xno) ++ echo "$as_me:$LINENO: result: none needed" >&5 ++echo "${ECHO_T}none needed" >&6 ;; ++ *) ++ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 ++echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 ++ CC="$CC $ac_cv_prog_cc_stdc" ;; ++esac ++ ++# Some people use a C++ compiler to compile C. Since we use `exit', ++# in C++ we need to declare it. In case someone uses the same compiler ++# for both compiling C and C++ we need to have the C++ compiler decide ++# the declaration of exit, since it's the most demanding environment. ++cat >conftest.$ac_ext <<_ACEOF ++#ifndef __cplusplus ++ choke me ++#endif ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ for ac_declaration in \ ++ '' \ ++ 'extern "C" void std::exit (int) throw (); using std::exit;' \ ++ 'extern "C" void std::exit (int); using std::exit;' \ ++ 'extern "C" void exit (int) throw ();' \ ++ 'extern "C" void exit (int);' \ ++ 'void exit (int);' ++do ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_declaration ++#include ++int ++main () ++{ ++exit (42); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ : + else +- GCC= +- test "${CFLAGS+set}" = set || CFLAGS="-g" ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++continue + fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_declaration ++int ++main () ++{ ++exit (42); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ break ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++done ++rm -f conftest* ++if test -n "$ac_declaration"; then ++ echo '#ifdef __cplusplus' >>confdefs.h ++ echo $ac_declaration >>confdefs.h ++ echo '#endif' >>confdefs.h ++fi ++ ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_aux_dir= + for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do +@@ -932,14 +2696,20 @@ + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break ++ elif test -f $ac_dir/shtool; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/shtool install -c" ++ break + fi + done + if test -z "$ac_aux_dir"; then +- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +-fi +-ac_config_guess=$ac_aux_dir/config.guess +-ac_config_sub=$ac_aux_dir/config.sub +-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. ++ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 ++echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++ac_config_guess="$SHELL $ac_aux_dir/config.guess" ++ac_config_sub="$SHELL $ac_aux_dir/config.sub" ++ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + + # Find a good install program. We prefer a C program (faster), + # so one script is as good as another. But avoid the broken or +@@ -948,274 +2718,1036 @@ + # SunOS /usr/etc/install + # IRIX /sbin/install + # AIX /bin/install ++# AmigaOS /C/install, which installs bootblocks on floppy discs ++# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag + # AFS /usr/afsws/bin/install, which mishandles nonexistent args + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" ++# OS/2's system install, which has a completely different semantic + # ./install, which can be erroneously created by make from ./install.sh. +-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 ++echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 + if test -z "$INSTALL"; then +-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++if test "${ac_cv_path_install+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" +- for ac_dir in $PATH; do +- # Account for people who put trailing slashes in PATH elements. +- case "$ac_dir/" in +- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; +- *) +- # OSF1 and SCO ODT 3.0 have their own names for install. +- for ac_prog in ginstall installbsd scoinst install; do +- if test -f $ac_dir/$ac_prog; then ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ # Account for people who put trailing slashes in PATH elements. ++case $as_dir/ in ++ ./ | .// | /cC/* | \ ++ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ++ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ ++ /usr/ucb/* ) ;; ++ *) ++ # OSF1 and SCO ODT 3.0 have their own names for install. ++ # Don't use installbsd from OSF since it installs stuff as root ++ # by default. ++ for ac_prog in ginstall scoinst install; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && +- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then ++ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. +- # OSF/1 installbsd also uses dspmsg, but is usable. ++ : ++ elif test $ac_prog = install && ++ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then ++ # program-specific install script used by HP pwplus--don't use. + : + else +- ac_cv_path_install="$ac_dir/$ac_prog -c" +- break 2 ++ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" ++ break 3 + fi + fi + done +- ;; +- esac +- done +- IFS="$ac_save_ifs" +- # As a last resort, use the slow shell script. +- test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh" ++ done ++ ;; ++esac ++done ++ ++ + fi +- INSTALL="$ac_cv_path_install" ++ if test "${ac_cv_path_install+set}" = set; then ++ INSTALL=$ac_cv_path_install ++ else ++ # As a last resort, use the slow shell script. We don't cache a ++ # path for INSTALL within a source directory, because that will ++ # break other packages using the cache if that directory is ++ # removed, or if the path is relative. ++ INSTALL=$ac_install_sh ++ fi + fi +-echo "$ac_t""$INSTALL" 1>&6 ++echo "$as_me:$LINENO: result: $INSTALL" >&5 ++echo "${ECHO_T}$INSTALL" >&6 + + # Use test -z because SunOS4 sh mishandles braces in ${var-val}. + # It thinks the first close brace ends the variable substitution. + test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' ++ + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +-set dummy ${MAKE-make}; ac_make=$2 +-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 ++echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 ++set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` ++if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat > conftestmake <<\EOF ++ cat >conftest.make <<\_ACEOF + all: +- @echo 'ac_maketemp="${MAKE}"' +-EOF ++ @echo 'ac_maketemp="$(MAKE)"' ++_ACEOF + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. +-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` ++eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` + if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes + else + eval ac_cv_prog_make_${ac_make}_set=no + fi +-rm -f conftestmake ++rm -f conftest.make + fi + if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then +- echo "$ac_t""yes" 1>&6 ++ echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6 + SET_MAKE= + else +- echo "$ac_t""no" 1>&6 ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" + fi + + +-trap '' 1 2 15 +-cat > confcache <<\EOF ++ ac_config_files="$ac_config_files Makefile man/Makefile src/Makefile" ++cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure + # tests run on this system so they can be shared between configure +-# scripts and configure runs. It is not useful on other systems. +-# If it contains results you don't want to keep, you may remove or edit it. ++# scripts and configure runs, see configure's option --config-cache. ++# It is not useful on other systems. If it contains results you don't ++# want to keep, you may remove or edit it. + # +-# By default, configure uses ./config.cache as the cache file, +-# creating it if it does not exist already. You can give configure +-# the --cache-file=FILE option to use a different cache file; that is +-# what configure does when it calls configure scripts in +-# subdirectories, so they share the cache. +-# Giving --cache-file=/dev/null disables caching, for debugging configure. +-# config.status only pays attention to the cache file if you give it the +-# --recheck option to rerun configure. ++# config.status only pays attention to the cache file if you give it ++# the --recheck option to rerun configure. + # +-EOF ++# `ac_cv_env_foo' variables (set or unset) will be overridden when ++# loading this file, other *unset* `ac_cv_foo' will be assigned the ++# following values. ++ ++_ACEOF ++ ++# The following way of writing the cache mishandles newlines in values, ++# but we know of no workaround that is simple, portable, and efficient. ++# So, don't put newlines in cache variables' values. + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. +-(set) 2>&1 | +- sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ +- >> confcache +-if cmp -s $cache_file confcache; then +- : +-else ++{ ++ (set) 2>&1 | ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in ++ *ac_space=\ *) ++ # `set' does not quote correctly, so add quotes (double-quote ++ # substitution turns \\\\ into \\, and sed turns \\ into \). ++ sed -n \ ++ "s/'/'\\\\''/g; ++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ++ ;; ++ *) ++ # `set' quotes correctly as required by POSIX, so do not add quotes. ++ sed -n \ ++ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ++ ;; ++ esac; ++} | ++ sed ' ++ t clear ++ : clear ++ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ ++ t end ++ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ ++ : end' >>confcache ++if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then +- echo "updating cache $cache_file" +- cat confcache > $cache_file ++ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" ++ cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi + fi + rm -f confcache + +-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 +- + test "x$prefix" = xNONE && prefix=$ac_default_prefix + # Let make expand exec_prefix. + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +-# Any assignment to VPATH causes Sun make to only execute +-# the first set of double-colon rules, so remove it if not needed. +-# If there is a colon in the path, we need to keep it. ++# VPATH may cause trouble with some makes, so we remove $(srcdir), ++# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and ++# trailing colons and then remove the whole line if VPATH becomes empty ++# (actually we leave an empty line to preserve line numbers). + if test "x$srcdir" = x.; then +- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' ++ ac_vpsub='/^[ ]*VPATH[ ]*=/{ ++s/:*\$(srcdir):*/:/; ++s/:*\${srcdir}:*/:/; ++s/:*@srcdir@:*/:/; ++s/^\([^=]*=[ ]*\):*/\1/; ++s/:*$//; ++s/^[^=]*=[ ]*$//; ++}' + fi + +-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 +- + # Transform confdefs.h into DEFS. + # Protect against shell expansion while executing Makefile rules. + # Protect against Makefile macro expansion. +-cat > conftest.defs <<\EOF +-s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g +-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +-s%\[%\\&%g +-s%\]%\\&%g +-s%\$%$$%g +-EOF +-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +-rm -f conftest.defs ++# ++# If the first sed substitution is executed (which looks for macros that ++# take arguments), then we branch to the quote section. Otherwise, ++# look for a macro that doesn't take arguments. ++cat >confdef2opt.sed <<\_ACEOF ++t clear ++: clear ++s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g ++t quote ++s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g ++t quote ++d ++: quote ++s,[ `~#$^&*(){}\\|;'"<>?],\\&,g ++s,\[,\\&,g ++s,\],\\&,g ++s,\$,$$,g ++p ++_ACEOF ++# We use echo to avoid assuming a particular line-breaking character. ++# The extra dot is to prevent the shell from consuming trailing ++# line-breaks from the sub-command output. A line-break within ++# single-quotes doesn't work because, if this script is created in a ++# platform that uses two characters for line-breaks (e.g., DOS), tr ++# would break. ++ac_LF_and_DOT=`echo; echo .` ++DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` ++rm -f confdef2opt.sed ++ ++ ++ac_libobjs= ++ac_ltlibobjs= ++for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue ++ # 1. Remove the extension, and $U if already installed. ++ ac_i=`echo "$ac_i" | ++ sed 's/\$U\././;s/\.o$//;s/\.obj$//'` ++ # 2. Add them. ++ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ++ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' ++done ++LIBOBJS=$ac_libobjs + ++LTLIBOBJS=$ac_ltlibobjs + +-# Without the "./", some shells look in PATH for config.status. +-: ${CONFIG_STATUS=./config.status} + +-echo creating $CONFIG_STATUS +-rm -f $CONFIG_STATUS +-cat > $CONFIG_STATUS <&5 ++echo "$as_me: creating $CONFIG_STATUS" >&6;} ++cat >$CONFIG_STATUS <<_ACEOF ++#! $SHELL ++# Generated by $as_me. + # Run this file to recreate the current configuration. +-# This directory was configured as follows, +-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +-# +-# $0 $ac_configure_args +-# + # Compiler output produced by configure, useful for debugging +-# configure, is in ./config.log if it exists. ++# configure, is in config.log if it exists. + +-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +-for ac_option ++debug=false ++ac_cs_recheck=false ++ac_cs_silent=false ++SHELL=\${CONFIG_SHELL-$SHELL} ++_ACEOF ++ ++cat >>$CONFIG_STATUS <<\_ACEOF ++## --------------------- ## ++## M4sh Initialization. ## ++## --------------------- ## ++ ++# Be Bourne compatible ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++ emulate sh ++ NULLCMD=: ++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # is contrary to our usage. Disable this feature. ++ alias -g '${1+"$@"}'='"$@"' ++elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then ++ set -o posix ++fi ++DUALCASE=1; export DUALCASE # for MKS sh ++ ++# Support unset when possible. ++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then ++ as_unset=unset ++else ++ as_unset=false ++fi ++ ++ ++# Work around bugs in pre-3.0 UWIN ksh. ++$as_unset ENV MAIL MAILPATH ++PS1='$ ' ++PS2='> ' ++PS4='+ ' ++ ++# NLS nuisances. ++for as_var in \ ++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ++ LC_TELEPHONE LC_TIME ++do ++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then ++ eval $as_var=C; export $as_var ++ else ++ $as_unset $as_var ++ fi ++done ++ ++# Required to use basename. ++if expr a : '\(a\)' >/dev/null 2>&1; then ++ as_expr=expr ++else ++ as_expr=false ++fi ++ ++if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ++ as_basename=basename ++else ++ as_basename=false ++fi ++ ++ ++# Name of the executable. ++as_me=`$as_basename "$0" || ++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ ++ X"$0" : 'X\(//\)$' \| \ ++ X"$0" : 'X\(/\)$' \| \ ++ . : '\(.\)' 2>/dev/null || ++echo X/"$0" | ++ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } ++ /^X\/\(\/\/\)$/{ s//\1/; q; } ++ /^X\/\(\/\).*/{ s//\1/; q; } ++ s/.*/./; q'` ++ ++ ++# PATH needs CR, and LINENO needs CR and PATH. ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits ++ ++# The user is always right. ++if test "${PATH_SEPARATOR+set}" != set; then ++ echo "#! /bin/sh" >conf$$.sh ++ echo "exit 0" >>conf$$.sh ++ chmod +x conf$$.sh ++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then ++ PATH_SEPARATOR=';' ++ else ++ PATH_SEPARATOR=: ++ fi ++ rm -f conf$$.sh ++fi ++ ++ ++ as_lineno_1=$LINENO ++ as_lineno_2=$LINENO ++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ++ test "x$as_lineno_1" != "x$as_lineno_2" && ++ test "x$as_lineno_3" = "x$as_lineno_2" || { ++ # Find who we are. Look in the path if we contain no path at all ++ # relative or not. ++ case $0 in ++ *[\\/]* ) as_myself=$0 ;; ++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++done ++ ++ ;; ++ esac ++ # We did not find ourselves, most probably we were run as `sh COMMAND' ++ # in which case we are not to be found in the path. ++ if test "x$as_myself" = x; then ++ as_myself=$0 ++ fi ++ if test ! -f "$as_myself"; then ++ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 ++echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} ++ { (exit 1); exit 1; }; } ++ fi ++ case $CONFIG_SHELL in ++ '') ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for as_base in sh bash ksh sh5; do ++ case $as_dir in ++ /*) ++ if ("$as_dir/$as_base" -c ' ++ as_lineno_1=$LINENO ++ as_lineno_2=$LINENO ++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` ++ test "x$as_lineno_1" != "x$as_lineno_2" && ++ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then ++ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } ++ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } ++ CONFIG_SHELL=$as_dir/$as_base ++ export CONFIG_SHELL ++ exec "$CONFIG_SHELL" "$0" ${1+"$@"} ++ fi;; ++ esac ++ done ++done ++;; ++ esac ++ ++ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO ++ # uniformly replaced by the line number. The first 'sed' inserts a ++ # line-number line before each line; the second 'sed' does the real ++ # work. The second script uses 'N' to pair each line-number line ++ # with the numbered line, and appends trailing '-' during ++ # substitution so that $LINENO is not a special case at line end. ++ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the ++ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) ++ sed '=' <$as_myself | ++ sed ' ++ N ++ s,$,-, ++ : loop ++ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ++ t loop ++ s,-$,, ++ s,^['$as_cr_digits']*\n,, ++ ' >$as_me.lineno && ++ chmod +x $as_me.lineno || ++ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 ++echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} ++ { (exit 1); exit 1; }; } ++ ++ # Don't try to exec as it changes $[0], causing all sort of problems ++ # (the dirname of $[0] is not the place where we might find the ++ # original and so on. Autoconf is especially sensible to this). ++ . ./$as_me.lineno ++ # Exit status is that of the last command. ++ exit ++} ++ ++ ++case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in ++ *c*,-n*) ECHO_N= ECHO_C=' ++' ECHO_T=' ' ;; ++ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; ++ *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ++esac ++ ++if expr a : '\(a\)' >/dev/null 2>&1; then ++ as_expr=expr ++else ++ as_expr=false ++fi ++ ++rm -f conf$$ conf$$.exe conf$$.file ++echo >conf$$.file ++if ln -s conf$$.file conf$$ 2>/dev/null; then ++ # We could just check for DJGPP; but this test a) works b) is more generic ++ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). ++ if test -f conf$$.exe; then ++ # Don't use ln at all; we don't have any links ++ as_ln_s='cp -p' ++ else ++ as_ln_s='ln -s' ++ fi ++elif ln conf$$.file conf$$ 2>/dev/null; then ++ as_ln_s=ln ++else ++ as_ln_s='cp -p' ++fi ++rm -f conf$$ conf$$.exe conf$$.file ++ ++if mkdir -p . 2>/dev/null; then ++ as_mkdir_p=: ++else ++ test -d ./-p && rmdir ./-p ++ as_mkdir_p=false ++fi ++ ++as_executable_p="test -f" ++ ++# Sed expression to map a string onto a valid CPP name. ++as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" ++ ++# Sed expression to map a string onto a valid variable name. ++as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" ++ ++ ++# IFS ++# We need space, tab and new line, in precisely that order. ++as_nl=' ++' ++IFS=" $as_nl" ++ ++# CDPATH. ++$as_unset CDPATH ++ ++exec 6>&1 ++ ++# Open the log real soon, to keep \$[0] and so on meaningful, and to ++# report actual input values of CONFIG_FILES etc. instead of their ++# values after options handling. Logging --version etc. is OK. ++exec 5>>config.log ++{ ++ echo ++ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ++## Running $as_me. ## ++_ASBOX ++} >&5 ++cat >&5 <<_CSEOF ++ ++This file was extended by $as_me, which was ++generated by GNU Autoconf 2.59. Invocation command line was ++ ++ CONFIG_FILES = $CONFIG_FILES ++ CONFIG_HEADERS = $CONFIG_HEADERS ++ CONFIG_LINKS = $CONFIG_LINKS ++ CONFIG_COMMANDS = $CONFIG_COMMANDS ++ $ $0 $@ ++ ++_CSEOF ++echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 ++echo >&5 ++_ACEOF ++ ++# Files that config.status was made for. ++if test -n "$ac_config_files"; then ++ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS ++fi ++ ++if test -n "$ac_config_headers"; then ++ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS ++fi ++ ++if test -n "$ac_config_links"; then ++ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS ++fi ++ ++if test -n "$ac_config_commands"; then ++ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS ++fi ++ ++cat >>$CONFIG_STATUS <<\_ACEOF ++ ++ac_cs_usage="\ ++\`$as_me' instantiates files from templates according to the ++current configuration. ++ ++Usage: $0 [OPTIONS] [FILE]... ++ ++ -h, --help print this help, then exit ++ -V, --version print version number, then exit ++ -q, --quiet do not print progress messages ++ -d, --debug don't remove temporary files ++ --recheck update $as_me by reconfiguring in the same conditions ++ --file=FILE[:TEMPLATE] ++ instantiate the configuration file FILE ++ ++Configuration files: ++$config_files ++ ++Report bugs to ." ++_ACEOF ++ ++cat >>$CONFIG_STATUS <<_ACEOF ++ac_cs_version="\\ ++config.status ++configured by $0, generated by GNU Autoconf 2.59, ++ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" ++ ++Copyright (C) 2003 Free Software Foundation, Inc. ++This config.status script is free software; the Free Software Foundation ++gives unlimited permission to copy, distribute and modify it." ++srcdir=$srcdir ++INSTALL="$INSTALL" ++_ACEOF ++ ++cat >>$CONFIG_STATUS <<\_ACEOF ++# If no file are specified by the user, then we need to provide default ++# value. By we need to know if files were specified by the user. ++ac_need_defaults=: ++while test $# != 0 + do +- case "\$ac_option" in ++ case $1 in ++ --*=*) ++ ac_option=`expr "x$1" : 'x\([^=]*\)='` ++ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ++ ac_shift=: ++ ;; ++ -*) ++ ac_option=$1 ++ ac_optarg=$2 ++ ac_shift=shift ++ ;; ++ *) # This is not an option, so the user has probably given explicit ++ # arguments. ++ ac_option=$1 ++ ac_need_defaults=false;; ++ esac ++ ++ case $ac_option in ++ # Handling of the options. ++_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) +- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" +- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; +- -version | --version | --versio | --versi | --vers | --ver | --ve | --v) +- echo "$CONFIG_STATUS generated by autoconf version 2.4" +- exit 0 ;; +- -help | --help | --hel | --he | --h) +- echo "\$ac_cs_usage"; exit 0 ;; +- *) echo "\$ac_cs_usage"; exit 1 ;; ++ ac_cs_recheck=: ;; ++ --version | --vers* | -V ) ++ echo "$ac_cs_version"; exit 0 ;; ++ --he | --h) ++ # Conflict between --help and --header ++ { { echo "$as_me:$LINENO: error: ambiguous option: $1 ++Try \`$0 --help' for more information." >&5 ++echo "$as_me: error: ambiguous option: $1 ++Try \`$0 --help' for more information." >&2;} ++ { (exit 1); exit 1; }; };; ++ --help | --hel | -h ) ++ echo "$ac_cs_usage"; exit 0 ;; ++ --debug | --d* | -d ) ++ debug=: ;; ++ --file | --fil | --fi | --f ) ++ $ac_shift ++ CONFIG_FILES="$CONFIG_FILES $ac_optarg" ++ ac_need_defaults=false;; ++ --header | --heade | --head | --hea ) ++ $ac_shift ++ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ++ ac_need_defaults=false;; ++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ++ | -silent | --silent | --silen | --sile | --sil | --si | --s) ++ ac_cs_silent=: ;; ++ ++ # This is an error. ++ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 ++Try \`$0 --help' for more information." >&5 ++echo "$as_me: error: unrecognized option: $1 ++Try \`$0 --help' for more information." >&2;} ++ { (exit 1); exit 1; }; } ;; ++ ++ *) ac_config_targets="$ac_config_targets $1" ;; ++ + esac ++ shift + done + +-ac_given_srcdir=$srcdir +-ac_given_INSTALL="$INSTALL" +- +-trap 'rm -fr `echo "Makefile man/Makefile src/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +- +-# Protect against being on the right side of a sed subst in config.status. +-sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; +- s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF +-$ac_vpsub +-$extrasub +-s%@CFLAGS@%$CFLAGS%g +-s%@CPPFLAGS@%$CPPFLAGS%g +-s%@CXXFLAGS@%$CXXFLAGS%g +-s%@DEFS@%$DEFS%g +-s%@LDFLAGS@%$LDFLAGS%g +-s%@LIBS@%$LIBS%g +-s%@exec_prefix@%$exec_prefix%g +-s%@prefix@%$prefix%g +-s%@program_transform_name@%$program_transform_name%g +-s%@DIFF@%$DIFF%g +-s%@DIFF_SUCCESS@%$DIFF_SUCCESS%g +-s%@DIFF_FAILURE@%$DIFF_FAILURE%g +-s%@DIFF_TROUBLE@%$DIFF_TROUBLE%g +-s%@DIFFFLAGS@%$DIFFFLAGS%g +-s%@DIFF_L@%$DIFF_L%g +-s%@DIFF3@%$DIFF3%g +-s%@DIFF3_BIN@%$DIFF3_BIN%g +-s%@ED@%$ED%g +-s%@SENDMAIL@%$SENDMAIL%g +-s%@PIC@%$PIC%g +-s%@CC@%$CC%g +-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +-s%@INSTALL_DATA@%$INSTALL_DATA%g +-s%@SET_MAKE@%$SET_MAKE%g ++ac_configure_extra_args= ++ ++if $ac_cs_silent; then ++ exec 6>/dev/null ++ ac_configure_extra_args="$ac_configure_extra_args --silent" ++fi ++ ++_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF ++if \$ac_cs_recheck; then ++ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 ++ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ++fi ++ ++_ACEOF ++ ++ ++ ++ ++ ++cat >>$CONFIG_STATUS <<\_ACEOF ++for ac_config_target in $ac_config_targets ++do ++ case "$ac_config_target" in ++ # Handling of arguments. ++ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; ++ "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; ++ "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; ++ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 ++echo "$as_me: error: invalid argument: $ac_config_target" >&2;} ++ { (exit 1); exit 1; }; };; ++ esac ++done ++ ++# If the user did not use the arguments to specify the items to instantiate, ++# then the envvar interface is used. Set only those that are not. ++# We use the long form for the default assignment because of an extremely ++# bizarre bug on SunOS 4.1.3. ++if $ac_need_defaults; then ++ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files ++fi ++ ++# Have a temporary directory for convenience. Make it in the build tree ++# simply because there is no reason to put it here, and in addition, ++# creating and moving files from /tmp can sometimes cause problems. ++# Create a temporary directory, and hook for its removal unless debugging. ++$debug || ++{ ++ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 ++ trap '{ (exit 1); exit 1; }' 1 2 13 15 ++} ++ ++# Create a (secure) tmp directory for tmp files. ++ ++{ ++ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && ++ test -n "$tmp" && test -d "$tmp" ++} || ++{ ++ tmp=./confstat$$-$RANDOM ++ (umask 077 && mkdir $tmp) ++} || ++{ ++ echo "$me: cannot create a temporary directory in ." >&2 ++ { (exit 1); exit 1; } ++} + ++_ACEOF ++ ++cat >>$CONFIG_STATUS <<_ACEOF ++ ++# ++# CONFIG_FILES section. ++# ++ ++# No need to generate the scripts if there are no CONFIG_FILES. ++# This happens for instance when ./config.status config.h ++if test -n "\$CONFIG_FILES"; then ++ # Protect against being on the right side of a sed subst in config.status. ++ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; ++ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF ++s,@SHELL@,$SHELL,;t t ++s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t ++s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t ++s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t ++s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t ++s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t ++s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t ++s,@exec_prefix@,$exec_prefix,;t t ++s,@prefix@,$prefix,;t t ++s,@program_transform_name@,$program_transform_name,;t t ++s,@bindir@,$bindir,;t t ++s,@sbindir@,$sbindir,;t t ++s,@libexecdir@,$libexecdir,;t t ++s,@datadir@,$datadir,;t t ++s,@sysconfdir@,$sysconfdir,;t t ++s,@sharedstatedir@,$sharedstatedir,;t t ++s,@localstatedir@,$localstatedir,;t t ++s,@libdir@,$libdir,;t t ++s,@includedir@,$includedir,;t t ++s,@oldincludedir@,$oldincludedir,;t t ++s,@infodir@,$infodir,;t t ++s,@mandir@,$mandir,;t t ++s,@build_alias@,$build_alias,;t t ++s,@host_alias@,$host_alias,;t t ++s,@target_alias@,$target_alias,;t t ++s,@DEFS@,$DEFS,;t t ++s,@ECHO_C@,$ECHO_C,;t t ++s,@ECHO_N@,$ECHO_N,;t t ++s,@ECHO_T@,$ECHO_T,;t t ++s,@LIBS@,$LIBS,;t t ++s,@DIFF@,$DIFF,;t t ++s,@DIFF_SUCCESS@,$DIFF_SUCCESS,;t t ++s,@DIFF_FAILURE@,$DIFF_FAILURE,;t t ++s,@DIFF_TROUBLE@,$DIFF_TROUBLE,;t t ++s,@DIFFFLAGS@,$DIFFFLAGS,;t t ++s,@DIFF_L@,$DIFF_L,;t t ++s,@DIFF3@,$DIFF3,;t t ++s,@DIFF3_BIN@,$DIFF3_BIN,;t t ++s,@ED@,$ED,;t t ++s,@SENDMAIL@,$SENDMAIL,;t t ++s,@PIC@,$PIC,;t t ++s,@CC@,$CC,;t t ++s,@CFLAGS@,$CFLAGS,;t t ++s,@LDFLAGS@,$LDFLAGS,;t t ++s,@CPPFLAGS@,$CPPFLAGS,;t t ++s,@ac_ct_CC@,$ac_ct_CC,;t t ++s,@EXEEXT@,$EXEEXT,;t t ++s,@OBJEXT@,$OBJEXT,;t t ++s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t ++s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t ++s,@INSTALL_DATA@,$INSTALL_DATA,;t t ++s,@SET_MAKE@,$SET_MAKE,;t t ++s,@LIBOBJS@,$LIBOBJS,;t t ++s,@LTLIBOBJS@,$LTLIBOBJS,;t t + CEOF +-EOF +-cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then +- # Support "outfile[:infile]", defaulting infile="outfile.in". +- case "$ac_file" in +- *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` +- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; +- *) ac_file_in="${ac_file}.in" ;; +- esac +- +- # Adjust relative srcdir, etc. for subdirectories. +- +- # Remove last slash and all that follows it. Not all systems have dirname. +- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` +- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then +- # The file is in a subdirectory. +- test ! -d "$ac_dir" && mkdir "$ac_dir" +- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" +- # A "../" for each directory in $ac_dir_suffix. +- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` +- else +- ac_dir_suffix= ac_dots= ++_ACEOF ++ ++ cat >>$CONFIG_STATUS <<\_ACEOF ++ # Split the substitutions into bite-sized pieces for seds with ++ # small command number limits, like on Digital OSF/1 and HP-UX. ++ ac_max_sed_lines=48 ++ ac_sed_frag=1 # Number of current file. ++ ac_beg=1 # First line for current file. ++ ac_end=$ac_max_sed_lines # Line after last line for current file. ++ ac_more_lines=: ++ ac_sed_cmds= ++ while $ac_more_lines; do ++ if test $ac_beg -gt 1; then ++ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag ++ else ++ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag ++ fi ++ if test ! -s $tmp/subs.frag; then ++ ac_more_lines=false ++ else ++ # The purpose of the label and of the branching condition is to ++ # speed up the sed processing (if there are no `@' at all, there ++ # is no need to browse any of the substitutions). ++ # These are the two extra sed commands mentioned above. ++ (echo ':t ++ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed ++ if test -z "$ac_sed_cmds"; then ++ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" ++ else ++ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" ++ fi ++ ac_sed_frag=`expr $ac_sed_frag + 1` ++ ac_beg=$ac_end ++ ac_end=`expr $ac_end + $ac_max_sed_lines` ++ fi ++ done ++ if test -z "$ac_sed_cmds"; then ++ ac_sed_cmds=cat + fi ++fi # test -n "$CONFIG_FILES" ++ ++_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF ++for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue ++ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ++ case $ac_file in ++ - | *:- | *:-:* ) # input from stdin ++ cat >$tmp/stdin ++ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ++ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ++ * ) ac_file_in=$ac_file.in ;; ++ esac + +- case "$ac_given_srcdir" in +- .) srcdir=. +- if test -z "$ac_dots"; then top_srcdir=. +- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; +- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; ++ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ++ ac_dir=`(dirname "$ac_file") 2>/dev/null || ++$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$ac_file" : 'X\(//\)[^/]' \| \ ++ X"$ac_file" : 'X\(//\)$' \| \ ++ X"$ac_file" : 'X\(/\)' \| \ ++ . : '\(.\)' 2>/dev/null || ++echo X"$ac_file" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ++ /^X\(\/\/\)[^/].*/{ s//\1/; q; } ++ /^X\(\/\/\)$/{ s//\1/; q; } ++ /^X\(\/\).*/{ s//\1/; q; } ++ s/.*/./; q'` ++ { if $as_mkdir_p; then ++ mkdir -p "$ac_dir" ++ else ++ as_dir="$ac_dir" ++ as_dirs= ++ while test ! -d "$as_dir"; do ++ as_dirs="$as_dir $as_dirs" ++ as_dir=`(dirname "$as_dir") 2>/dev/null || ++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$as_dir" : 'X\(//\)[^/]' \| \ ++ X"$as_dir" : 'X\(//\)$' \| \ ++ X"$as_dir" : 'X\(/\)' \| \ ++ . : '\(.\)' 2>/dev/null || ++echo X"$as_dir" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ++ /^X\(\/\/\)[^/].*/{ s//\1/; q; } ++ /^X\(\/\/\)$/{ s//\1/; q; } ++ /^X\(\/\).*/{ s//\1/; q; } ++ s/.*/./; q'` ++ done ++ test ! -n "$as_dirs" || mkdir $as_dirs ++ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 ++echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} ++ { (exit 1); exit 1; }; }; } ++ ++ ac_builddir=. ++ ++if test "$ac_dir" != .; then ++ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` ++ # A "../" for each directory in $ac_dir_suffix. ++ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` ++else ++ ac_dir_suffix= ac_top_builddir= ++fi ++ ++case $srcdir in ++ .) # No --srcdir option. We are building in place. ++ ac_srcdir=. ++ if test -z "$ac_top_builddir"; then ++ ac_top_srcdir=. ++ else ++ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` ++ fi ;; ++ [\\/]* | ?:[\\/]* ) # Absolute path. ++ ac_srcdir=$srcdir$ac_dir_suffix; ++ ac_top_srcdir=$srcdir ;; + *) # Relative path. +- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" +- top_srcdir="$ac_dots$ac_given_srcdir" ;; ++ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ++ ac_top_srcdir=$ac_top_builddir$srcdir ;; ++esac ++ ++# Do not use `cd foo && pwd` to compute absolute paths, because ++# the directories may not exist. ++case `pwd` in ++.) ac_abs_builddir="$ac_dir";; ++*) ++ case "$ac_dir" in ++ .) ac_abs_builddir=`pwd`;; ++ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; ++ *) ac_abs_builddir=`pwd`/"$ac_dir";; ++ esac;; ++esac ++case $ac_abs_builddir in ++.) ac_abs_top_builddir=${ac_top_builddir}.;; ++*) ++ case ${ac_top_builddir}. in ++ .) ac_abs_top_builddir=$ac_abs_builddir;; ++ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; ++ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; ++ esac;; ++esac ++case $ac_abs_builddir in ++.) ac_abs_srcdir=$ac_srcdir;; ++*) ++ case $ac_srcdir in ++ .) ac_abs_srcdir=$ac_abs_builddir;; ++ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; ++ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; ++ esac;; ++esac ++case $ac_abs_builddir in ++.) ac_abs_top_srcdir=$ac_top_srcdir;; ++*) ++ case $ac_top_srcdir in ++ .) ac_abs_top_srcdir=$ac_abs_builddir;; ++ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; ++ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; ++ esac;; ++esac ++ ++ ++ case $INSTALL in ++ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; ++ *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + +- case "$ac_given_INSTALL" in +- [/$]*) INSTALL="$ac_given_INSTALL" ;; +- *) INSTALL="$ac_dots$ac_given_INSTALL" ;; +- esac +- echo creating "$ac_file" +- rm -f "$ac_file" +- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." +- case "$ac_file" in +- *Makefile*) ac_comsub="1i\\ +-# $configure_input" ;; +- *) ac_comsub= ;; +- esac +- sed -e "$ac_comsub +-s%@configure_input@%$configure_input%g +-s%@srcdir@%$srcdir%g +-s%@top_srcdir@%$top_srcdir%g +-s%@INSTALL@%$INSTALL%g +-" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file +-fi; done +-rm -f conftest.subs ++ # Let's still pretend it is `configure' which instantiates (i.e., don't ++ # use $as_me), people would be surprised to read: ++ # /* config.h. Generated by config.status. */ ++ if test x"$ac_file" = x-; then ++ configure_input= ++ else ++ configure_input="$ac_file. " ++ fi ++ configure_input=$configure_input"Generated from `echo $ac_file_in | ++ sed 's,.*/,,'` by configure." + ++ # First look for the input files in the build tree, otherwise in the ++ # src tree. ++ ac_file_inputs=`IFS=: ++ for f in $ac_file_in; do ++ case $f in ++ -) echo $tmp/stdin ;; ++ [\\/$]*) ++ # Absolute (can't be DOS-style, as IFS=:) ++ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ++echo "$as_me: error: cannot find input file: $f" >&2;} ++ { (exit 1); exit 1; }; } ++ echo "$f";; ++ *) # Relative ++ if test -f "$f"; then ++ # Build tree ++ echo "$f" ++ elif test -f "$srcdir/$f"; then ++ # Source tree ++ echo "$srcdir/$f" ++ else ++ # /dev/null tree ++ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 ++echo "$as_me: error: cannot find input file: $f" >&2;} ++ { (exit 1); exit 1; }; } ++ fi;; ++ esac ++ done` || { (exit 1); exit 1; } + ++ if test x"$ac_file" != x-; then ++ { echo "$as_me:$LINENO: creating $ac_file" >&5 ++echo "$as_me: creating $ac_file" >&6;} ++ rm -f "$ac_file" ++ fi ++_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF ++ sed "$ac_vpsub ++$extrasub ++_ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF ++:t ++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b ++s,@configure_input@,$configure_input,;t t ++s,@srcdir@,$ac_srcdir,;t t ++s,@abs_srcdir@,$ac_abs_srcdir,;t t ++s,@top_srcdir@,$ac_top_srcdir,;t t ++s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t ++s,@builddir@,$ac_builddir,;t t ++s,@abs_builddir@,$ac_abs_builddir,;t t ++s,@top_builddir@,$ac_top_builddir,;t t ++s,@abs_top_builddir@,$ac_abs_top_builddir,;t t ++s,@INSTALL@,$ac_INSTALL,;t t ++" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out ++ rm -f $tmp/stdin ++ if test x"$ac_file" != x-; then ++ mv $tmp/out $ac_file ++ else ++ cat $tmp/out ++ rm -f $tmp/out ++ fi + +-exit 0 +-EOF ++done ++_ACEOF ++ ++cat >>$CONFIG_STATUS <<\_ACEOF ++ ++{ (exit 0); exit 0; } ++_ACEOF + chmod +x $CONFIG_STATUS +-rm -fr confdefs* $ac_clean_files +-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 ++ac_clean_files=$ac_clean_files_save ++ ++ ++# configure is writing to config.log, and then calls config.status. ++# config.status does its own redirection, appending to config.log. ++# Unfortunately, on DOS this fails, as config.log is still kept open ++# by configure, so config.status won't be able to write to it; its ++# output is simply discarded. So we exec the FD to /dev/null, ++# effectively closing config.log, so it can be properly (re)opened and ++# appended to by config.status. When coming back to configure, we ++# need to make the FD available again. ++if test "$no_create" != yes; then ++ ac_cs_success=: ++ ac_config_status_args= ++ test "$silent" = yes && ++ ac_config_status_args="$ac_config_status_args --quiet" ++ exec 5>/dev/null ++ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false ++ exec 5>>config.log ++ # Use ||, not &&, to avoid exiting from the if with $? = 1, which ++ # would make configure fail if this is the last instruction. ++ $ac_cs_success || { (exit 1); exit 1; } ++fi + +--- rcs-5.7.orig/configure.in ++++ rcs-5.7/configure.in +@@ -243,7 +243,7 @@ + AC_PATH_PROG(ED, ed, ed) + + ac_save_path=$PATH +-PATH=/usr/lib:/usr/bin:/bin:/usr/sbin:/sbin:$PATH ++PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/lib:$PATH + AC_PATH_PROGS(SENDMAIL, sendmail mail mailx) + PATH=$ac_save_path + case $SENDMAIL in +--- rcs-5.7.orig/src/rcs.c ++++ rcs-5.7/src/rcs.c +@@ -916,10 +916,11 @@ + getkeystring(Klog); + if (nextdelta == cuttail) { + cb = savestring(&curlogbuf); +- if (!delta->log.string) ++ if (delta && !delta->log.string) + delta->log = cleanlogmsg(curlogbuf.string, cb.size); + nextlex(); +- delta->igtext = getphrases(Ktext); ++ if (delta) ++ delta->igtext = getphrases(Ktext); + } else { + if (nextdelta->log.string && nextdelta->selector) { + foutptr = 0; +--- rcs-5.7.orig/src/rcsfreeze.sh ++++ rcs-5.7/src/rcsfreeze.sh +@@ -59,8 +59,7 @@ + + # Stamp the logfile. Because we order the logfile the most recent + # first we will have to save everything right now in a temporary file. +-TMPLOG=/tmp/rcsfrz$$ +-trap 'rm -f $TMPLOG; exit 1' 1 2 13 15 ++TMPLOG=$(tempfile) + # Now ask for a log message, continously add to the log file + ( + echo "Version: $SYMREVNAME($SYMREV), Date: $DATE +--- rcs-5.7.orig/src/rcsbase.h ++++ rcs-5.7/src/rcsbase.h +@@ -358,6 +358,7 @@ + char const * lockedby; /* who locks the revision */ + char const * state; /* state of revision (Exp by default) */ + char const * name; /* name (if any) by which retrieved */ ++ char const * commitid; /* text string to associate commits */ + struct cbuf log; /* log message requested at checkin */ + struct branchhead * branches; /* list of first revisions on branches*/ + struct cbuf ig; /* ignored phrases in admin part */ +@@ -662,6 +663,7 @@ + extern char const *const expand_names[]; + extern char const + Kaccess[], Kauthor[], Kbranch[], Kcomment[], ++ Kcommitid[], + Kdate[], Kdesc[], Kexpand[], Khead[], Klocks[], Klog[], + Knext[], Kstate[], Kstrict[], Ksymbols[], Ktext[]; + void unexpected_EOF P((void)) exiting; +--- rcs-5.7.orig/src/rcssyn.c ++++ rcs-5.7/src/rcssyn.c +@@ -171,6 +171,7 @@ + Kauthor[] = "author", + Kbranch[] = "branch", + Kcomment[] = "comment", ++ Kcommitid[] = "commitid", + Kdate[] = "date", + Kdesc[] = "desc", + Kexpand[] = "expand", +@@ -433,6 +434,14 @@ + Delta->lockedby = 0; + Delta->log.string = 0; + Delta->selector = true; ++ ++ if (getkeyopt(Kcommitid)) { ++ Delta->commitid = NextString; ++ nextlex(); ++ getsemi(Kcommitid); ++ } else ++ Delta->commitid = NULL; ++ + Delta->ig = getphrases(Kdesc); + TotalDeltas++; + return (true); +--- rcs-5.7.orig/src/rcsdiff.c ++++ rcs-5.7/src/rcsdiff.c +@@ -212,9 +212,13 @@ + } + goto option_handled; + case '-': case 'D': +- no_diff_means_no_output = false; ++ if (c == 'D' ++ || strcmp(*argv, "--side-by-side") == 0 ++ || strcmp(*argv, "--ifdef") == 0) { ++ no_diff_means_no_output = false; ++ } + /* fall into */ +- case 'C': case 'F': case 'I': case 'L': case 'W': ++ case 'C': case 'F': case 'I': case 'L': case 'U': case 'W': + #if DIFF_L + if (c == 'L' && ++file_labels == 2) + faterror("too many -L options"); +--- rcs-5.7.orig/src/ident.c ++++ rcs-5.7/src/ident.c +@@ -234,7 +234,7 @@ + if (c == EOF && feof(fp) | ferror(fp)) + return c; + switch (ctab[c]) { +- case LETTER: case Letter: ++ case LETTER: case Letter: case DIGIT: + *tp++ = c; + if (tp < line+sizeof(line)-4) + break; +--- rcs-5.7.orig/src/conf.sh ++++ rcs-5.7/src/conf.sh +@@ -73,17 +73,6 @@ + ech='echo -n' dots='... ' + esac + +-$ech >&3 "$0: testing permissions $dots" +-rm -f a.d && +-date >a.d && +-chmod 0 a.d && +-{ test -w a.d || cp /dev/null a.d 2>/dev/null; } && { +- echo >&3 "$n$0: This command should not be run with superuser permissions." +- exit 1 +-} +-echo >&3 OK +-rm -f a.d || exit +- + $ech >&3 "$0: testing compiler for plausibility $dots" + echo 'main() { return 0; }' >a.c + rm -f a.exe a.out || exit +--- rcs-5.7.orig/src/rcsgen.c ++++ rcs-5.7/src/rcsgen.c +@@ -547,6 +547,9 @@ + + aprintf(fout, ";\n%s\t%s;\n", Knext, node->next?node->next->num:""); + awrite(node->ig.string, node->ig.size, fout); ++ ++ if (node->commitid) ++ aprintf(fout, "%s\t%s;\n", Kcommitid, node->commitid); + } + + +--- rcs-5.7.orig/src/rcsfnms.c ++++ rcs-5.7/src/rcsfnms.c +@@ -285,6 +285,9 @@ + { + char *p; + char const *t = tpnames[n]; ++# if has_mktemp ++ int fd; ++# endif + + if (t) + return t; +@@ -296,10 +299,12 @@ + size_t tplen = dir_useful_len(tp); + p = testalloc(tplen + 10); + VOID sprintf(p, "%.*s%cT%cXXXXXX", (int)tplen, tp, SLASH, '0'+n); +- if (!mktemp(p) || !*p) ++ fd = mkstemp(p); ++ if (fd < 0 || !*p) + faterror("can't make temporary pathname `%.*s%cT%cXXXXXX'", + (int)tplen, tp, SLASH, '0'+n + ); ++ close(fd); + # else + static char tpnamebuf[TEMPNAMES][L_tmpnam]; + p = tpnamebuf[n]; +--- rcs-5.7.orig/src/rcsedit.c ++++ rcs-5.7/src/rcsedit.c +@@ -1503,6 +1503,9 @@ + register size_t dl; + register struct buf *bn; + register char const *name = isworkfile ? workname : RCSname; ++# if has_mktemp ++ int fd; ++# endif + + dl = basefilename(name) - name; + bn = &dirtpname[newRCSdirtp_index + isworkfile]; +@@ -1521,10 +1524,12 @@ + catchints(); + # if has_mktemp + VOID strcpy(tp, "XXXXXX"); +- if (!mktemp(np) || !*np) ++ fd = mkstemp(np); ++ if (fd < 0 || !*np) + faterror("can't make temporary pathname `%.*s_%cXXXXXX'", + (int)dl, name, '0'+isworkfile + ); ++ close(fd); + # else + /* + * Posix 1003.1-1990 has no reliable way +--- rcs-5.7.orig/src/Makefile.in ++++ rcs-5.7/src/Makefile.in +@@ -116,16 +116,18 @@ + for p in $(PROGRAMS); do \ + $(INSTALL_PROGRAM) $$p $(bindir)/$$p; \ + done ++ $(INSTALL_PROGRAM) rcsfreeze.sh $(bindir)/rcsfreeze + + uninstall :: + for p in $(PROGRAMS); do \ + $(REMOVE) $(bindir)/$$p; \ + done ++ $(REMOVE) $(bindir)/rcsfreeze + + # Install RCS and (if applicable) GNU diff before running these tests. + # To test RCS before installing it, see the file INSTALL.RCS. + RCSTEST = \ +- ALL_CFLAGS='$(ALL_CFLAGS)' CC='$(CC)' DIFF='$(DIFF)' \ ++ ALL_CFLAGS="$(ALL_CFLAGS)" CC='$(CC)' DIFF='$(DIFF)' \ + LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \ + PATH=$(bindir):$$PATH \ + sh $(srcdir)/rcstest +@@ -153,7 +155,7 @@ + #(Unix + conf.h : conf.sh Makefile + $(REMOVE) a.* +- ALL_CFLAGS='$(ALL_CFLAGS)' \ ++ ALL_CFLAGS="$(ALL_CFLAGS)" \ + CC='$(CC)' \ + COMPAT2='$(COMPAT2)' \ + DIFF3='$(DIFF3)' DIFF3_BIN='$(DIFF3_BIN)' \ +--- rcs-5.7.orig/src/rlog.c ++++ rcs-5.7/src/rlog.c +@@ -591,6 +591,10 @@ + aprintf(out, insDelFormat, + editscript->insertlns, editscript->deletelns); + ++ if ( node->commitid ) ++ aprintf(out, "%s commitid: %s", (editscript) ? ";" : "", ++ node->commitid); ++ + newbranch = node->branches; + if ( newbranch ) { + bufautobegin(&branchnum); diff --git a/utils/rcs/patches/100-cross_compile.patch b/utils/rcs/patches/100-cross_compile.patch new file mode 100644 index 0000000..665ca0f --- /dev/null +++ b/utils/rcs/patches/100-cross_compile.patch @@ -0,0 +1,413 @@ +--- /dev/null ++++ b/src/conf.h +@@ -0,0 +1,399 @@ ++/* RCS compile-time configuration */ ++ ++ /* $Id: conf.sh,v 5.25 1995/06/16 06:19:24 eggert Exp $ */ ++ ++/* ++ * This file is generated automatically. ++ * If you edit it by hand your changes may be lost. ++ * Instead, please try to fix conf.sh, ++ * and send your fixes to rcs-bugs@cs.purdue.edu. ++ */ ++ ++#define exitmain(n) return n /* how to exit from main() */ ++/* #define _POSIX_C_SOURCE 2147483647L */ /* if strict C + Posix 1003.1b-1993 or later */ ++/* #define _POSIX_SOURCE */ /* if strict C + Posix 1003.1-1990 */ ++ ++#include ++#include ++#include ++ ++/* Comment out #include lines below that do not work. */ ++#include ++#include ++#include ++#include ++#include ++/* #include */ ++/* #include */ ++#include ++/* #include */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++/* #include */ ++ ++/* Define boolean symbols to be 0 (false, the default), or 1 (true). */ ++#define has_sys_param_h 1 /* Does #include work? */ ++/* extern int errno; */ /* Uncomment if doesn't declare errno. */ ++#define has_readlink 1 /* Does readlink() work? */ ++#define readlink_isreg_errno EINVAL /* errno after readlink on regular file */ ++ ++#if has_readlink && !defined(MAXSYMLINKS) ++# if has_sys_param_h ++# include ++# endif ++# ifndef MAXSYMLINKS ++# define MAXSYMLINKS 20 /* BSD; not standard yet */ ++# endif ++#endif ++ ++/* Comment out the typedefs below if the types are already declared. */ ++/* Fix any uncommented typedefs that are wrong. */ ++/* typedef int mode_t; */ ++/* typedef long off_t; */ ++/* typedef int pid_t; */ ++/* typedef int sig_atomic_t; */ ++/* typedef unsigned size_t; */ ++/* typedef int ssize_t; */ ++/* typedef long time_t; */ ++/* typedef int uid_t; */ ++ ++/* Comment out the keyword definitions below if the keywords work. */ ++/* #define const */ ++/* #define volatile */ ++ ++/* Define boolean symbols to be 0 (false, the default), or 1 (true). */ ++#define has_prototypes 1 /* Do function prototypes work? */ ++#define has_stdarg 1 /* Does work? */ ++/* #define has_varargs ? */ /* Does work? */ ++#define va_start_args 2 /* How many args does va_start() take? */ ++ ++#if O_BINARY ++ /* Text and binary i/o behave differently. */ ++ /* This is incompatible with Posix and Unix. */ ++# define FOPEN_RB "rb" ++# define FOPEN_R_WORK (Expand==BINARY_EXPAND ? "r" : "rb") ++# define FOPEN_WB "wb" ++# define FOPEN_W_WORK (Expand==BINARY_EXPAND ? "w" : "wb") ++# define FOPEN_WPLUS_WORK (Expand==BINARY_EXPAND ? "w+" : "w+b") ++# define OPEN_O_BINARY O_BINARY ++#else ++ /* ++ * Text and binary i/o behave the same. ++ * Omit "b", since some nonstandard hosts reject it. ++ */ ++# define FOPEN_RB "r" ++# define FOPEN_R_WORK "r" ++# define FOPEN_WB "w" ++# define FOPEN_W_WORK "w" ++# define FOPEN_WPLUS_WORK "w+" ++# define OPEN_O_BINARY 0 ++#endif ++ ++/* This may need changing on non-Unix systems (notably DOS). */ ++#define OPEN_CREAT_READONLY (S_IRUSR|S_IRGRP|S_IROTH) /* lock file mode */ ++#define OPEN_O_LOCK 0 /* extra open flags for creating lock file */ ++#define OPEN_O_WRONLY O_WRONLY /* main open flag for creating a lock file */ ++ ++/* Define or comment out the following symbols as needed. */ ++#if has_prototypes ++# define P(params) params ++#else ++# define P(params) () ++#endif ++#if has_stdarg ++# include ++#else ++# if has_varargs ++# include ++# else ++ typedef char *va_list; ++# define va_dcl int va_alist; ++# define va_start(ap) ((ap) = (va_list)&va_alist) ++# define va_arg(ap,t) (((t*) ((ap)+=sizeof(t))) [-1]) ++# define va_end(ap) ++# endif ++#endif ++#if va_start_args == 2 ++# define vararg_start va_start ++#else ++# define vararg_start(ap,p) va_start(ap) ++#endif ++#define bad_chmod_close 0 /* Can chmod() close file descriptors? */ ++#define bad_creat0 0 /* Do writes fail after creat(f,0)? */ ++#define bad_fopen_wplus 0 /* Does fopen(f,"w+") fail to truncate f? */ ++#define getlogin_is_secure 0 /* Is getlogin() secure? Usually it's not. */ ++#define has_attribute_noreturn 1 /* Does __attribute__((noreturn)) work? */ ++#if has_attribute_noreturn ++# define exiting __attribute__((noreturn)) ++#else ++# define exiting ++#endif ++#define has_dirent 1 /* Do opendir(), readdir(), closedir() work? */ ++#define void_closedir 0 /* Does closedir() yield void? */ ++#define has_fchmod 1 /* Does fchmod() work? */ ++#define has_fflush_input 1 /* Does fflush() work on input files? */ ++#define has_fputs 1 /* Does fputs() work? */ ++#define has_ftruncate 1 /* Does ftruncate() work? */ ++#define has_getuid 1 /* Does getuid() work? */ ++#define has_getpwuid 1 /* Does getpwuid() work? */ ++#define has_memcmp 1 /* Does memcmp() work? */ ++#define has_memcpy 1 /* Does memcpy() work? */ ++#define has_memmove 1 /* Does memmove() work? */ ++#define has_map_fd 0 /* Does map_fd() work? */ ++#define has_mmap 1 /* Does mmap() work on regular files? */ ++#define has_madvise 1 /* Does madvise() work? */ ++#define mmap_signal SIGBUS /* signal received if you reference nonexistent part of mmapped file */ ++#define has_rename 1 /* Does rename() work? */ ++#define bad_a_rename 0 /* Does rename(A,B) fail if A is unwritable? */ ++#define bad_b_rename 0 /* Does rename(A,B) fail if B is unwritable? */ ++#define bad_NFS_rename 0 /* Can rename(A,B) falsely report success? */ ++/* typedef int void; */ /* Some ancient compilers need this. */ ++#define VOID (void) /* 'VOID e;' discards the value of an expression 'e'. */ ++#define has_seteuid 1 /* Does seteuid() work? See ../INSTALL.RCS. */ ++#define has_setreuid 0 /* Does setreuid() work? See ../INSTALL.RCS. */ ++#define has_setuid 1 /* Does setuid() exist? */ ++#define has_sigaction 1 /* Does struct sigaction work? */ ++#define has_sa_sigaction 1 /* Does struct sigaction have sa_sigaction? */ ++#define has_signal 1 /* Does signal() work? */ ++#define signal_type void /* type returned by signal handlers */ ++#define sig_zaps_handler 0 /* Must a signal handler reinvoke signal()? */ ++/* #define has_sigblock ? */ /* Does sigblock() work? */ ++/* #define sigmask(s) (1 << ((s)-1)) */ /* Yield mask for signal number. */ ++typedef size_t fread_type; /* type returned by fread() and fwrite() */ ++typedef size_t freadarg_type; /* type of their size arguments */ ++typedef void *malloc_type; /* type returned by malloc() */ ++#define has_getcwd 1 /* Does getcwd() work? */ ++/* #define has_getwd ? */ /* Does getwd() work? */ ++#define needs_getabsname 0 /* Must we define getabsname? */ ++#define has_mktemp 1 /* Does mktemp() work? */ ++#define has_NFS 1 /* Might NFS be used? */ ++#define has_psiginfo 0 /* Does psiginfo() work? */ ++#define has_psignal 1 /* Does psignal() work? */ ++/* #define has_si_errno ? */ /* Does siginfo_t have si_errno? */ ++/* #define has_sys_siglist ? */ /* Does sys_siglist[] work? */ ++/* #define strchr index */ /* Use old-fashioned name for strchr()? */ ++/* #define strrchr rindex */ /* Use old-fashioned name for strrchr()? */ ++#define bad_unlink 0 /* Does unlink() fail on unwritable files? */ ++#define has_vfork 1 /* Does vfork() work? */ ++#define has_fork 1 /* Does fork() work? */ ++#define has_spawn 0 /* Does spawn*() work? */ ++#define has_waitpid 1 /* Does waitpid() work? */ ++#define bad_wait_if_SIGCHLD_ignored 1 /* Does ignoring SIGCHLD break wait()? */ ++#define RCS_SHELL "/bin/sh" /* shell to run RCS subprograms */ ++#define has_printf_dot 1 /* Does "%.2d" print leading 0? */ ++#define has_vfprintf 1 /* Does vfprintf() work? */ ++#define has_attribute_format_printf 1 /* Does __attribute__((format(printf,N,N+1))) work? */ ++#if has_attribute_format_printf ++# define printf_string(m, n) __attribute__((format(printf, m, n))) ++#else ++# define printf_string(m, n) ++#endif ++#if has_attribute_format_printf && has_attribute_noreturn ++ /* Work around a bug in GCC 2.5.x. */ ++# define printf_string_exiting(m, n) __attribute__((format(printf, m, n), noreturn)) ++#else ++# define printf_string_exiting(m, n) printf_string(m, n) exiting ++#endif ++/* #define has__doprintf ? */ /* Does _doprintf() work? */ ++/* #define has__doprnt ? */ /* Does _doprnt() work? */ ++/* #undef EXIT_FAILURE */ /* Uncomment this if EXIT_FAILURE is broken. */ ++#define large_memory 1 /* Can main memory hold entire RCS files? */ ++#ifndef LONG_MAX ++#define LONG_MAX 2147483647L /* long maximum */ ++#endif ++/* Do struct stat s and t describe the same file? Answer d if unknown. */ ++#define same_file(s,t,d) ((s).st_ino==(t).st_ino && (s).st_dev==(t).st_dev) ++#define has_utimbuf 1 /* Does struct utimbuf work? */ ++#define CO "/usr/bin/co" /* name of 'co' program */ ++#define COMPAT2 0 /* Are version 2 files supported? */ ++#define DIFF "/usr/bin/diff" /* name of 'diff' program */ ++#define DIFF3 "/usr/bin/diff3" /* name of 'diff3' program */ ++#define DIFF3_BIN 1 /* Is diff3 user-visible (not the /usr/lib auxiliary)? */ ++#define DIFFFLAGS "-an" /* Make diff output suitable for RCS. */ ++#define DIFF_L 1 /* Does diff -L work? */ ++#define DIFF_SUCCESS 0 /* DIFF status if no differences are found */ ++#define DIFF_FAILURE 1 /* DIFF status if differences are found */ ++#define DIFF_TROUBLE 2 /* DIFF status if trouble */ ++#define ED "/bin/ed" /* name of 'ed' program (used only if !DIFF3_BIN) */ ++#define MERGE "/usr/bin/merge" /* name of 'merge' program */ ++#define TMPDIR "/tmp" /* default directory for temporary files */ ++#define SLASH '/' /* principal filename separator */ ++#define SLASHes '/' /* `case SLASHes:' labels all filename separators */ ++#define isSLASH(c) ((c) == SLASH) /* Is arg a filename separator? */ ++#define ROOTPATH(p) isSLASH((p)[0]) /* Is p an absolute pathname? */ ++#define X_DEFAULT ",v/" /* default value for -x option */ ++#define SLASHSLASH_is_SLASH 1 /* Are // and / the same directory? */ ++#define ALL_ABSOLUTE 1 /* Do all subprograms satisfy ROOTPATH? */ ++#define DIFF_ABSOLUTE 1 /* Is ROOTPATH(DIFF) true? */ ++#define SENDMAIL "/usr/sbin/sendmail" /* how to send mail */ ++#define TZ_must_be_set 0 /* Must TZ be set for gmtime() to work? */ ++ ++ ++ ++/* Adjust the following declarations as needed. */ ++ ++ ++/* The rest is for the benefit of non-standard, traditional hosts. */ ++/* Don't bother to declare functions that in traditional hosts do not appear, */ ++/* or are declared in .h files, or return int or void. */ ++ ++ ++/* traditional BSD */ ++ ++#if has_sys_siglist && !defined(sys_siglist) ++ extern char const * const sys_siglist[]; ++#endif ++ ++ ++/* Posix (ISO/IEC 9945-1: 1990 / IEEE Std 1003.1-1990) */ ++ ++/* */ ++#ifdef O_CREAT ++# define open_can_creat 1 ++#else ++# define open_can_creat 0 ++# define O_RDONLY 0 ++# define O_WRONLY 1 ++# define O_RDWR 2 ++# define O_CREAT 01000 ++# define O_TRUNC 02000 ++#endif ++#ifndef O_EXCL ++#define O_EXCL 0 ++#endif ++ ++/* */ ++#ifndef S_IRUSR ++# ifdef S_IREAD ++# define S_IRUSR S_IREAD ++# else ++# define S_IRUSR 0400 ++# endif ++# ifdef S_IWRITE ++# define S_IWUSR S_IWRITE ++# else ++# define S_IWUSR (S_IRUSR/2) ++# endif ++#endif ++#ifndef S_IRGRP ++# if has_getuid ++# define S_IRGRP (S_IRUSR / 0010) ++# define S_IWGRP (S_IWUSR / 0010) ++# define S_IROTH (S_IRUSR / 0100) ++# define S_IWOTH (S_IWUSR / 0100) ++# else ++ /* single user OS -- not Posix or Unix */ ++# define S_IRGRP 0 ++# define S_IWGRP 0 ++# define S_IROTH 0 ++# define S_IWOTH 0 ++# endif ++#endif ++#ifndef S_ISREG ++#define S_ISREG(n) (((n) & S_IFMT) == S_IFREG) ++#endif ++ ++/* */ ++#ifndef WEXITSTATUS ++#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) ++#undef WIFEXITED /* Avoid 4.3BSD incompatibility with Posix. */ ++#endif ++#ifndef WIFEXITED ++#define WIFEXITED(stat_val) (((stat_val) & 0377) == 0) ++#endif ++#ifndef WTERMSIG ++#define WTERMSIG(stat_val) ((stat_val) & 0177) ++#undef WIFSIGNALED /* Avoid 4.3BSD incompatibility with Posix. */ ++#endif ++#ifndef WIFSIGNALED ++#define WIFSIGNALED(stat_val) ((unsigned)(stat_val) - 1 < 0377) ++#endif ++ ++/* */ ++char *getlogin P((void)); ++#ifndef STDIN_FILENO ++# define STDIN_FILENO 0 ++# define STDOUT_FILENO 1 ++# define STDERR_FILENO 2 ++#endif ++#if has_fork && !has_vfork ++# undef vfork ++# define vfork fork ++#endif ++#if has_getcwd || !has_getwd ++ char *getcwd P((char*,size_t)); ++#else ++ char *getwd P((char*)); ++#endif ++#if has_setuid && !has_seteuid ++# undef seteuid ++# define seteuid setuid ++#endif ++#if has_spawn ++# if ALL_ABSOLUTE ++# define spawn_RCS spawnv ++# else ++# define spawn_RCS spawnvp ++# endif ++#else ++# if ALL_ABSOLUTE ++# define exec_RCS execv ++# else ++# define exec_RCS execvp ++# endif ++#endif ++ ++/* utime.h */ ++#if !has_utimbuf ++ struct utimbuf { time_t actime, modtime; }; ++#endif ++ ++ ++/* Standard C library */ ++ ++/* */ ++#ifndef L_tmpnam ++#define L_tmpnam 32 /* power of 2 > sizeof("/usr/tmp/xxxxxxxxxxxxxxx") */ ++#endif ++#ifndef SEEK_SET ++#define SEEK_SET 0 ++#endif ++#ifndef SEEK_CUR ++#define SEEK_CUR 1 ++#endif ++#if has_mktemp ++ char *mktemp P((char*)); /* traditional */ ++#else ++ char *tmpnam P((char*)); ++#endif ++ ++/* */ ++char *getenv P((char const*)); ++void _exit P((int)) exiting; ++void exit P((int)) exiting; ++malloc_type malloc P((size_t)); ++malloc_type realloc P((malloc_type,size_t)); ++#ifndef EXIT_FAILURE ++#define EXIT_FAILURE 1 ++#endif ++#ifndef EXIT_SUCCESS ++#define EXIT_SUCCESS 0 ++#endif ++ ++/* */ ++char *strcpy P((char*,char const*)); ++char *strchr P((char const*,int)); ++char *strrchr P((char const*,int)); ++void *memcpy P((void*,void const*,size_t)); ++#if has_memmove ++ void *memmove P((void*,void const*,size_t)); ++#endif ++ ++/* */ ++time_t time P((time_t*)); +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -153,7 +153,7 @@ + $(REMOVE) TAGS + + #(Unix +-conf.h : conf.sh Makefile ++conf.h : + $(REMOVE) a.* + ALL_CFLAGS="$(ALL_CFLAGS)" \ + CC='$(CC)' \ diff --git a/utils/rdiff-backup/Makefile b/utils/rdiff-backup/Makefile new file mode 100644 index 0000000..33ec189 --- /dev/null +++ b/utils/rdiff-backup/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rdiff-backup +PKG_VERSION:=1.2.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://savannah.nongnu.org/download/rdiff-backup/ +PKG_MD5SUM:=1a94dc537fcf74d6a3a80bd27808e77b + +PKG_BUILD_DEPENDS:=python + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/rdiff-backup + SUBMENU:=backup + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Incremental backup utility + URL:=http://www.nongnu.org/rdiff-backup + DEPENDS:=+python +librsync +libpopt +openssl-util +endef + +define Package/rdiff-backup/description + rdiff-backup backs up one directory to another, possibly over a + network. The target directory ends up a copy of the source directory, + but extra reverse diffs are stored in a special subdirectory of that + target directory, so you can still recover files lost some time ago. + The idea is to combine the best features of a mirror and an incremental + backup. +endef + +define PyPackage/rdiff-backup/filespec ++|/usr/bin/rdiff-backup ++|$(PYTHON_PKG_DIR)/rdiff_backup +endef + +define Build/Compile + $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) + $(call Build/Compile/PyMod,., \ + build --librsync-dir="$(STAGING_DIR)/usr" , \ + ) + $(call Build/Compile/PyMod,., \ + install --prefix="$(PKG_INSTALL_DIR)/usr", \ + ) +endef + +$(eval $(call PyPackage,rdiff-backup)) +$(eval $(call BuildPackage,rdiff-backup)) diff --git a/utils/rdiff-backup/patches/001-python_path.patch b/utils/rdiff-backup/patches/001-python_path.patch new file mode 100644 index 0000000..5142645 --- /dev/null +++ b/utils/rdiff-backup/patches/001-python_path.patch @@ -0,0 +1,8 @@ +--- a/rdiff-backup ++++ b/rdiff-backup +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + # rdiff-backup -- Mirror files while keeping incremental changes + # Version 1.0.5 released November 11, 2006 + # Copyright (C) 2001-2005 Ben Escoto diff --git a/utils/reiserfsprogs/Makefile b/utils/reiserfsprogs/Makefile new file mode 100644 index 0000000..3c583e9 --- /dev/null +++ b/utils/reiserfsprogs/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=reiserfsprogs +PKG_VERSION:=3.6.21 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@KERNEL/linux/utils/fs/reiserfs/ +PKG_MD5SUM:=bc00c7c4e047902575dc4e1c64ab3ba4 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/reiserfsprogs + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Filesystem + TITLE:=ReiserFS filesystems utilities + URL:=http://www.namesys.com/ +endef + +define Package/reiserfsprogs/description + This package contains utilities to create, check, + resize, and debug ReiserFS filesystems. +endef + +define Package/reiserfsprogs/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(foreach bin,debugreiserfs mkreiserfs reiserfsck reiserfstune resize_reiserfs,$(PKG_INSTALL_DIR)/usr/sbin/$(bin)) $(1)/usr/sbin/ + ln -sf mkreiserfs $(1)/usr/sbin/mkfs.reiserfs + ln -sf reiserfsck $(1)/usr/sbin/fsck.reiserfs +endef + +$(eval $(call BuildPackage,reiserfsprogs)) diff --git a/utils/restorefactory/Makefile b/utils/restorefactory/Makefile new file mode 100644 index 0000000..577592b --- /dev/null +++ b/utils/restorefactory/Makefile @@ -0,0 +1,38 @@ +# +# Copyright (C) 2010 segal.di.ubi.pt +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=restorefactory +PKG_VERSION:=1 +PKG_RELEASE:=6 + +include $(INCLUDE_DIR)/package.mk + +define Package/restorefactory + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Mimic original functionality of the reset button + MAINTAINER:=Nuno Goncalves +endef + +define Package/restorefactory/description +RestoreFactory handles the reset button event and issues a "firstboot" command. +Button and wait time can be configured with a UCI file. +endef + +define Build/Compile +endef + +define Package/restorefactory/install + $(INSTALL_DIR) $(1)/etc/hotplug.d/button + $(INSTALL_BIN) ./files/hotplug_restorefactory $(1)/etc/hotplug.d/button/50-restorefactory + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/uci_defaults_restorefactory $(1)/etc/uci-defaults/50-restorefactory +endef + +$(eval $(call BuildPackage,restorefactory)) diff --git a/utils/restorefactory/files/hotplug_restorefactory b/utils/restorefactory/files/hotplug_restorefactory new file mode 100755 index 0000000..5273499 --- /dev/null +++ b/utils/restorefactory/files/hotplug_restorefactory @@ -0,0 +1,31 @@ +#!/bin/sh + +system_config() { + config_get button "$1" button "reset" + config_get action "$1" action "pressed" + config_get timeout "$1" timeout "5" +} + +config_load system +config_foreach system_config restorefactory + +[ "$BUTTON" = "$button" ] && { + + [ -f /tmp/run/restorefactory.pid ] && read PID < /tmp/run/restorefactory.pid && kill $PID && rm /tmp/run/restorefactory.pid && logger -p user.info -t "restorefactory" "restore to factory defaults aborted" + + [ "$ACTION" = "$action" ] && { + + if [ "$timeout" -gt 0 ] + then + sleep "$timeout" && firstboot && reboot & + echo $! > /tmp/run/restorefactory.pid + logger -p user.info -t "restorefactory" "restoring to factory defaults in $timeout seconds" + elif [ "$timeout" -eq 0 ] + then + firstboot && reboot & + else + logger -p user.info -t "restorefactory" "invalid timeout value ($timeout)" + fi + } +} + diff --git a/utils/restorefactory/files/uci_defaults_restorefactory b/utils/restorefactory/files/uci_defaults_restorefactory new file mode 100755 index 0000000..558bbd6 --- /dev/null +++ b/utils/restorefactory/files/uci_defaults_restorefactory @@ -0,0 +1,10 @@ +#!/bin/sh + +[ -n "$(uci -q show system.@restorefactory[0])" ] || { + uci add system restorefactory + uci set system.@restorefactory[0].button=reset + uci set system.@restorefactory[0].action=pressed + uci set system.@restorefactory[0].timeout=5 + uci commit +} + diff --git a/utils/retutahvo/Makefile b/utils/retutahvo/Makefile new file mode 100644 index 0000000..5d7b0f1 --- /dev/null +++ b/utils/retutahvo/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=retutahvo +PKG_RELEASE:=1 + +PKG_SOURCE_SUBDIR:=$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/retutahvo + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Retu/Tahvo userspace tool + DEPENDS:=@TARGET_omap24xx + MAINTAINER:=Michael Buesch +endef + +define Package/retutahvo/description + Nokia n810 Retu/Tahvo userspace tool. + Warning: Do not use this, if you don't know what you're doing. + This tool can physically damage the n810. +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./files/src/* $(PKG_BUILD_DIR)/ +endef + +define Package/retutahvo/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/retutahvo $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,retutahvo)) diff --git a/utils/retutahvo/files/src/Makefile b/utils/retutahvo/files/src/Makefile new file mode 100644 index 0000000..a4d7ea1 --- /dev/null +++ b/utils/retutahvo/files/src/Makefile @@ -0,0 +1,4 @@ +CC ?= gcc +CFLAGS ?= -O2 + +all: retutahvo diff --git a/utils/retutahvo/files/src/retutahvo.c b/utils/retutahvo/files/src/retutahvo.c new file mode 100644 index 0000000..3f59d59 --- /dev/null +++ b/utils/retutahvo/files/src/retutahvo.c @@ -0,0 +1,270 @@ +/* + * Copyright (C) 2010 Michael Buesch + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include + +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; + +#include "user_retu_tahvo.h" + + +static const char * chip2str(int chip) +{ + switch (chip) { + case CHIP_RETU: + return "Retu"; + case CHIP_TAHVO: + return "Tahvo"; + } + return "UNKNOWN"; +} + +static int str2uint(const char *str, unsigned int *value) +{ + char *tail; + + *value = strtoul(str, &tail, 0); + if (*tail != '\0') + return -1; + + return 0; +} + +static int open_dev(int chip) +{ + const char *path; + int fd; + + switch (chip) { + case CHIP_RETU: + path = "/dev/retu"; + break; + case CHIP_TAHVO: + path = "/dev/tahvo"; + break; + default: + return -1; + } + + fd = open(path, O_RDWR); + if (fd < 0) { + fprintf(stderr, "Failed to open %d: %s\n", + path, strerror(errno)); + } + + return fd; +} + +#define MASKREG(mask, reg) ((mask) | (((reg) & 0x3F) << 16)) + +static unsigned int encrapify_value(unsigned int value, unsigned int mask) +{ + if (!mask) + return 0; + while (!(mask & 1)) { + value >>= 1; + mask >>= 1; + } + + return value; +} + +static unsigned int decrapify_value(unsigned int value, unsigned int mask) +{ + if (!mask) + return 0; + while (!(mask & 1)) { + value <<= 1; + mask >>= 1; + } + + return value; +} + +static int do_read(int chip, int fd, unsigned int mask, unsigned int reg, unsigned int *value) +{ + unsigned int command; + int res; + + switch (chip) { + case CHIP_RETU: + command = RETU_IOCH_READ; + break; + case CHIP_TAHVO: + command = TAHVO_IOCH_READ; + break; + default: + return -1; + } + res = ioctl(fd, command, MASKREG(mask, reg)); + if (res < 0) + return -1; + *value = decrapify_value(res, mask); + + return 0; +} + +static int task_read(int chip, unsigned int reg, unsigned int *value) +{ + int fd, err; + + fd = open_dev(chip); + if (fd < 0) + return -1; + err = do_read(chip, fd, 0xFFFF, reg, value); + close(fd); + + return err; +} + +static int do_write(int chip, int fd, unsigned int mask, unsigned int reg, unsigned int value) +{ + struct retu_tahvo_write_parms p; + unsigned int command; + int err; + + switch (chip) { + case CHIP_RETU: + command = RETU_IOCX_WRITE; + break; + case CHIP_TAHVO: + command = TAHVO_IOCX_WRITE; + break; + default: + return -1; + } + + memset(&p, 0, sizeof(p)); + p.field = MASKREG(mask, reg); + p.value = encrapify_value(value, mask); + + err = ioctl(fd, command, &p); + if (err) { + fprintf(stderr, "Write ioctl failed\n"); + return -1; + } + if (p.result != 0) { + fprintf(stderr, "Failed to write\n"); + return -1; + } + + return 0; +} + +static int task_maskset(int chip, unsigned int reg, unsigned int mask, unsigned int set) +{ + int fd, err; + unsigned int value; + + mask &= 0xFFFF; + set &= 0xFFFF; + + fd = open_dev(chip); + if (fd < 0) + return -1; + err = do_write(chip, fd, mask, reg, set); + close(fd); + + return err; +} + +static int task_write(int chip, unsigned int reg, unsigned int value) +{ + return task_maskset(chip, reg, 0xFFFF, value); +} + +static void usage(FILE *fd, int argc, char **argv) +{ + fprintf(fd, "Usage: %s CHIP TASK REG [VALUE...]\n", argv[0]); + fprintf(fd, " CHIP is one of RETU or TAHVO\n"); + fprintf(fd, " TASK is one of READ, WRITE or MASKSET\n"); + fprintf(fd, " VALUE are values, depending on TASK\n"); +} + +int main(int argc, char **argv) +{ + const char *chip_str, *task, *reg_str; + int chip; + unsigned int reg, mask, set, value; + int err; + + if (argc != 4 && argc != 5 && argc != 6) + goto err_usage; + chip_str = argv[1]; + task = argv[2]; + reg_str = argv[3]; + + if (strcasecmp(chip_str, "retu") == 0) + chip = CHIP_RETU; + else if (strcasecmp(chip_str, "tahvo") == 0) + chip = CHIP_TAHVO; + else + goto err_usage; + + err = str2uint(reg_str, ®); + if (err) + goto err_usage; + + if (strcasecmp(task, "read") == 0) { + if (argc != 4) + goto err_usage; + err = task_read(chip, reg, &value); + if (err) { + fprintf(stderr, "Failed to read %s register 0x%02X\n", + chip2str(chip), reg); + return 1; + } + printf("0x%04X\n", value); + } else if (strcasecmp(task, "write") == 0) { + if (argc != 5) + goto err_usage; + err = str2uint(argv[4], &value); + if (err) + goto err_usage; + err = task_write(chip, reg, value); + if (err) { + fprintf(stderr, "Failed to write %s register 0x%02X\n", + chip2str(chip), reg); + return 1; + } + } else if (strcasecmp(task, "maskset") == 0) { + if (argc != 6) + goto err_usage; + err = str2uint(argv[4], &mask); + err |= str2uint(argv[5], &set); + if (err) + goto err_usage; + err = task_maskset(chip, reg, mask, set); + if (err) { + fprintf(stderr, "Failed to maskset %s register 0x%02X\n", + chip2str(chip), reg); + return 1; + } + } else + goto err_usage; + + return 0; + +err_usage: + usage(stderr, argc, argv); + return 1; +} diff --git a/utils/retutahvo/files/src/user_retu_tahvo.h b/utils/retutahvo/files/src/user_retu_tahvo.h new file mode 100644 index 0000000..a5c2190 --- /dev/null +++ b/utils/retutahvo/files/src/user_retu_tahvo.h @@ -0,0 +1,75 @@ +/** + * drivers/cbus/user_retu_tahvo.h + * + * Copyright (C) 2004, 2005 Nokia Corporation + * + * Written by Mikko Ylinen + * + * Definitions and types used by both retu-user and tahvo-user. + * + * This file is subject to the terms and conditions of the GNU General + * Public License. See the file "COPYING" in the main directory of this + * archive for more details. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _USER_RETU_TAHVO_H +#define _USER_RETU_TAHVO_H + +/* Chip IDs */ +#define CHIP_RETU 1 +#define CHIP_TAHVO 2 + +/* Register access type bits */ +#define READ_ONLY 1 +#define WRITE_ONLY 2 +#define READ_WRITE 3 +#define TOGGLE 4 + +#define MASK(field) ((u16)(field & 0xFFFF)) +#define REG(field) ((u16)((field >> 16) & 0x3F)) + +/*** IOCTL definitions. These should be kept in sync with user space **********/ + +#define URT_IOC_MAGIC '`' + +/* + * IOCTL function naming conventions: + * ================================== + * 0 -- No argument and return value + * S -- Set through a pointer + * T -- Tell directly with the argument value + * G -- Reply by setting through a pointer + * Q -- response is on the return value + * X -- S and G atomically + * H -- T and Q atomically + */ + +/* General */ +#define URT_IOCT_IRQ_SUBSCR _IO(URT_IOC_MAGIC, 0) + +/* RETU */ +#define RETU_IOCH_READ _IO(URT_IOC_MAGIC, 1) +#define RETU_IOCX_WRITE _IO(URT_IOC_MAGIC, 2) +#define RETU_IOCH_ADC_READ _IO(URT_IOC_MAGIC, 3) + +/* TAHVO */ +#define TAHVO_IOCH_READ _IO(URT_IOC_MAGIC, 4) +#define TAHVO_IOCX_WRITE _IO(URT_IOC_MAGIC, 5) + +/* This structure is used for writing RETU/TAHVO registers */ +struct retu_tahvo_write_parms { + u32 field; + u16 value; + u8 result; +}; + +#endif diff --git a/utils/rrdcollect/Makefile b/utils/rrdcollect/Makefile new file mode 100644 index 0000000..b1867b7 --- /dev/null +++ b/utils/rrdcollect/Makefile @@ -0,0 +1,96 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rrdcollect +PKG_VERSION:=0.2.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/rrdcollect +PKG_MD5SUM:=fd7ac95195e3e5cbab0677629505d9be + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/rrdcollect/Default + SECTION:=utils + CATEGORY:=Utilities + URL:=http://rrdcollect.sourceforge.net/ +endef + +define Package/rrdcollect/Default/description + RRDcollect is a daemon which polls ceratin files in /proc/ + directory, gathering data and storing it inside RRDtool's + database files. Being written in C should be both fast + and resources-friendly. Supports both scanf(3)-style + pattern matches and perl compatible regular expressions. +endef + +define Package/rrdcollect +$(call Package/rrdcollect/Default) + DEPENDS:=+librrd1 + TITLE:=Round-Robin Database (RRD) collecting daemon + MENU:=1 +endef + +define Package/rrdcollect/description +$(call Package/rrdcollect/Default/description) + This package contains the RRD collecting daemon. +endef + +define Package/rrdcollect-example +$(call Package/rrdcollect/Default) + DEPENDS:=rrdcollect + TITLE:=Example setup for RRD collecting daemon above +endef + +define Package/rrdcollect-example/description +$(call Package/rrdcollect/Default/description) + This package contains examples for the RRD collecting daemon. +endef + +define Package/rrdcollect-example/conffiles +/etc/rrd.conf +/etc/rrdcollect.conf +endef + +CONFIGURE_ARGS+= \ + --enable-shared \ + --disable-static \ + --disable-rpath \ + --enable-exec \ + --without-rrdtool \ + --with-librrd="$(STAGING_DIR)/usr/lib/rrdtool-1.0" \ + --without-libpcre \ + --without-libpcap \ + +CONFIGURE_VARS+= \ + CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \ + +define Package/rrdcollect/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rrdcollect $(1)/usr/sbin/ +endef + +define Package/rrdcollect-example/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/rrd.conf $(1)/etc/ + $(INSTALL_DATA) ./files/rrdcollect.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/rrdcollect.init $(1)/etc/init.d/rrdcollect + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) ./files/rrd.sh $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/www/cgi-bin + ln -sf /var/lib/rrdcollect/rrd.cgi $(1)/www/cgi-bin/rrd.cgi + ln -sf /var/lib/rrdcollect/img $(1)/www/img +endef + +$(eval $(call BuildPackage,rrdcollect)) +$(eval $(call BuildPackage,rrdcollect-example)) diff --git a/utils/rrdcollect/files/rrd.conf b/utils/rrdcollect/files/rrd.conf new file mode 100644 index 0000000..4ee13ce --- /dev/null +++ b/utils/rrdcollect/files/rrd.conf @@ -0,0 +1,381 @@ +# +# Author: Christian Rost (chr@baltic-online.de) +# Purpose: Shell-Interface to rrdtool +# +# Configuration-File for rrd.sh +# +DATADIR=/var/lib/rrdcollect +# Location of *.rrd-data-files +RRDDIR=$DATADIR/rrd +# Location of *.png-files +IMGDIR=$DATADIR/img +# Hostname used in title of png-images +HOSTNAME="WRT54GS" +# Location of rrdtool +RRDTOOL=/usr/bin/rrdtool +# Location of rrdcgi +RRDCGI=/usr/bin/rrdcgi +# Location of generated cgi-script +RRDCGISCRIPT=$DATADIR/rrd.cgi +# Image-Path relative to webserver-root +RRDCGIIMGPATH="/img" +# Location of netcat (used for fetching data from rrdcollect-daemon) +NETCAT=/usr/bin/nc + +# Alternative settings for use on external machines +#RRDDIR=/home/webm/htdocs/stats/rrd/rrd +#IMGDIR=/home/webm/htdocs/stats/rrd/web +#RRDTOOL=/opt/rrd/bin/rrdtool +#RRDCGI=/opt/rrd/bin/rrdcgi +#RRDCGISCRIPT=/home/webm/cgi-bin/rrd.cgi +#RRDCGIIMGPATH="/stats/rrd/web" +#NETCAT=/opt/bin/nc + + +#################################################################################### +# Configuration of statistic sources: +# +# Column 1: Time-periods +# I'm interrested in last-24hour-, last-week- and last-month-plots. +# Column 2: Define precision/resolution of above three intervalls +# These values have an impact on the size of your rrd-files, +# and on the sharpness of your plots +# RES=1 means maximum precision (every pixel in the plot is individual) +# RES=4 -> 4 pixel represents one interval + +# Optimized values for storing rather small rrd-files on the openwrt-box +HOURS=24;H_RES=2;DAYS=7;D_RES=4;WEEKS=4;W_RES=4; +# Measure-Step (Same value should be in the rrdcollect.conf) Optimal: STEP=$HOURS / $PIXWIDTH * 3600 * $H_RES +STEP=360; MAXSTEP=`expr $STEP \* 2` + +# Values for storing rrd-files externally outside the router allowing better resolution +#HOURS=24;H_RES=1;DAYS=32;D_RES=2;WEEKS=50;W_RES=2; +#STEP=180; MAXSTEP=`expr $STEP \* 2` +# Even better resolution +#HOURS=8;H_RES=1;DAYS=32;D_RES=2;WEEKS=50;W_RES=2; +#STEP=60; MAXSTEP=`expr $STEP \* 2` + +# Format and size of the plots PIXWIDTH will be used in +# calculating rrd-data-file dimensions during init of rrd-files +# If you change the size you must change NCGIPIXWIDTH too +PIXWIDTH=480 +PIXHEIGHT=120 +PIXFORMAT=PNG + +# Image-Size of the thumbnail for rrdcgi +SCGIPIXWIDTH=400 +# Normal Image-Size for rrdcgi (480px plotsize in rrd) +NCGIPIXWIDTH=571 + +# Predefined colors +RED0=#ff0000; RED1=#ff5555; +GRN0=#009828; GRN1=#81ffa2; +ORG0=#ff9900; ORG1=#ffc571; +BLU0=#0030ff; BLU1=#8ba1ff; +CYA0=#ff00FF; CYA1=#ffbcfe; +YEL0=#ffff00; YEL1=#e0df76; +BLK0=#000000; BLK1=#7d7d7d; +WHI0=#FFFFFF; WHI1=#c1c1c1; + +# Date-String used when creating images with rrd.sh +DATE=`/bin/date "+%d.%m.%Y %H:%M:%S"` + +# Max-Values bytes/second and packets/second for WAN/Wifi/LAN Interfaces +MAXWANB=130000 +MAXWANP=500 +MAXWIFB=600000 +MAXWIFP=800 +MAXLANB=1200000 +MAXLANP=1000 + +# RRD-Types: +# GAUGE=save the value itself, no calculations at all +# COUNTER=continuously increasing value. difference between last 2 values must be positive ! (Traffic-Counter) +# DERIVE=like counter but can store negative values (rate of change in free disk-space) +# +# General syntax: PREFIX_POSTFIX=[-]|Legend|RRD-Type|Maximum|Color|RRD-Plot-Type|Printf-Precision|Optional rrdgraph def-arguments + +################ +# Sys-Statistics +################ +SYS_L01=" l1|System Load (1 min)|GAUGE|U|$YEL0|AREA|%6.2lf" +SYS_L05=" l2|System Load (5 min)|GAUGE|U|$ORG0|STACK|%6.2lf" +SYS_L15=" l3|System Load (15 min)|GAUGE|U|$RED0|STACK|%6.2lf" + +SYS_CPN=" cn|CPU nice |COUNTER|U|$YEL0|AREA|%6.2lf%%" +SYS_CPU=" cu|CPU user |COUNTER|U|$ORG0|STACK|%6.2lf%%" +SYS_CPS=" cs|CPU system |COUNTER|U|$RED0|STACK|%6.2lf%%" +SYS_CPI=" ci|CPU idle |COUNTER|U|$GRN0|STACK|%6.2lf%%" + +SYS_MEU=" mu|Memory used |GAUGE|U|$BLU0|AREA" +SYS_MEF=" mf|Memory free |GAUGE|U|$GRN0|STACK" +#SYS_MES=" ms|Memory shared |GAUGE|U|$BLK0|LINE1" +SYS_MEB=" mb|Memory buffer |GAUGE|U|$YEL0|LINE1" +SYS_MEC=" mc|Memory cached |GAUGE|U|$RED0|LINE1" + +SYS_FUS=" us|Flash Disk Used |GAUGE|U|$BLU0|AREA|%6.2lf%s|CDEF:usC=us,1024,* CDEF:MAXusC=us,1024,*" +SYS_FAV=" av|Flash Disk Available|GAUGE|U|$GRN0|STACK|%6.2lf%s|CDEF:avC=av,1024,* CDEF:MAXavC=av,1024,*" + +SYS_IRA="ira|Interrupts total |COUNTER|U|$RED0|AREA" +SYS_IRE="ire|Interrupts eth0 |COUNTER|U|$ORG0|AREA" +SYS_IRW="irw|Interrupts wifi |COUNTER|U|$YEL0|STACK" + +SYS_PRT=" pt|Processes total |GAUGE|U|$BLU0|AREA|%6.0lf" +SYS_CTX=" ct|Context switches |COUNTER|U|$RED0|LINE2|%6.0lf" +SYS_PRR=" pr|Processes active |GAUGE|U|$ORG0|AREA|%6.0lf" +SYS_ARP="arp|Arp Entries |GAUGE|U|$YEL0|LINE2|%6.0lf" +SYS_PFK=" fk|Forks |COUNTER|U|$GRN0|LINE2|%6.0lf" +SYS_CON="con|NAT-Connections |GAUGE|U|$CYA0|LINE2|%6.0lf" + +# Plot-Titles +MISC_STATS="Misc ($HOSTNAME)" +DSK_STATS="Flash Disk Usage ($HOSTNAME)" +USG_STATS="System Load ($HOSTNAME)" +MEM_STATS="Memory Usage ($HOSTNAME)" +CPU_STATS="CPU Usage ($HOSTNAME)" +IRQ_STATS="Interrupts ($HOSTNAME)" + +# Plot-Definitions (sort-order is relevant) +SYS_CPU_STATS="CPN CPU CPS CPI" +#SYS_MEM_STATS="MEU MEF MES MEB MEC" +SYS_MEM_STATS="MEU MEF MEB MEC" +SYS_USG_STATS="L01 L05 L15" +SYS_DSK_STATS="FUS FAV" +SYS_MISC_STATS="PRT PRR ARP PFK CTX CON" +SYS_IRQ_STATS="IRA IRE IRW" + +# Data-Definition needed by init() +SYS_ALL="$SYS_CPU_STATS $SYS_MEM_STATS $SYS_USG_STATS $SYS_DSK_STATS $SYS_MISC_STATS $SYS_IRQ_STATS" + +################################################################################################# +# Wifi Traffic & Wan Traffic & Tunnel Traffic Statistics ; # LAN: vlan0 , WAN: vlan1 , eth1: WIFI +################################################################################################# +IF_WLOBY="Wibo |Outgoing Traffic Wifi |COUNTER|$MAXWIFB|$GRN1|AREA" +IF_WLIBY="-Wibi|Incoming Traffic Wifi |COUNTER|$MAXWIFB|$RED0|AREA" +IF_WLOPK="Wipo |Outgoing Packets Wifi |COUNTER|$MAXWIFP|$GRN1|AREA|%6.0lf" +IF_WLIPK="-Wipi|Incoming Packets Wifi |COUNTER|$MAXWIFP|$RED0|AREA|%6.0lf" + +IF_WAIBY="-Wabi|Incoming Traffic Wan |COUNTER|$MAXWANB|$BLU0|AREA" +IF_WAOBY="Wabo |Outgoing Traffic Wan |COUNTER|$MAXWANB|$ORG1|AREA" +IF_WAIPK="-Wapi|Incoming Packets Wan |COUNTER|$MAXWANP|$BLU0|AREA|%6.0lf" +IF_WAOPK="Wapo |Outgoing Packets Wan |COUNTER|$MAXWANP|$ORG1|AREA|%6.0lf" + +IF_LAIBY="-Labi|Incoming Traffic Lan |COUNTER|$MAXLANB|$BLU0|AREA" +IF_LAOBY="Labo |Outgoing Traffic Lan |COUNTER|$MAXLANB|$ORG1|AREA" +IF_LAIPK="-Lapi|Incoming Packets Lan |COUNTER|$MAXLANP|$BLU0|AREA|%6.0lf" +IF_LAOPK="Lapo |Outgoing Packets Lan |COUNTER|$MAXLANP|$ORG1|AREA|%6.0lf" + +#IF_TUIBY="-tbi|Incoming Traffic VPN-Tunnel|COUNTER|$MAXWANB|$CYA0|AREA" +#IF_TUOBY="tbo |Outgoing Traffic VPN-Tunnel|COUNTER|$MAXWANB|$YEL1|AREA" +#IF_TUIPK="-tpi|Incoming Packets VPN-Tunnel|COUNTER|$MAXWANP|$CYA0|AREA|%6.0lf" +#IF_TUOPK="tpo |Outgoing Packets VPN-Tunnel|COUNTER|$MAXWANP|$YEL1|AREA|%6.0lf" + +# Plot-Titles +WIFI_TRAFFIC="Wifi Interface Traffic Statistics ($HOSTNAME)" +WIFI_PACKETS="Wifi Interface Packets Statistics ($HOSTNAME)" +WAN_TRAFFIC="Wan Interface Traffic Statistics ($HOSTNAME)" +WAN_PACKETS="Wan Interface Packets Statistics ($HOSTNAME)" +LAN_TRAFFIC="Lan Interface Traffic Statistics ($HOSTNAME)" +LAN_PACKETS="Lan Interface Packets Statistics ($HOSTNAME)" + +#TUN_TRAFFIC="VPN-Tunnel Interface Traffic Statistics ($HOSTNAME)" +#TUN_PACKETS="VPN-Tunnel Interface Packets Statistics ($HOSTNAME)" + +# Plot-Definitions (sort-order is relevant) +IF_WIFI_TRAFFIC="WLOBY WLIBY" +IF_WIFI_PACKETS="WLOPK WLIPK" +IF_WAN_TRAFFIC="WAIBY WAOBY" +IF_WAN_PACKETS="WAIPK WAOPK" +IF_LAN_TRAFFIC="LAIBY LAOBY" +IF_LAN_PACKETS="LAIPK LAOPK" +#IF_TUN_TRAFFIC="TUIBY TUOBY" +#IF_TUN_PACKETS="TUIPK TUOPK" + +# Data-Definition needed by init() +#IF_ALL="$IF_WIFI_TRAFFIC $IF_WIFI_PACKETS $IF_WAN_TRAFFIC $IF_WAN_PACKETS $IF_TUN_TRAFFIC $IF_TUN_PACKETS" +IF_ALL="$IF_LAN_TRAFFIC $IF_LAN_PACKETS $IF_WAN_TRAFFIC $IF_WAN_PACKETS $IF_WIFI_TRAFFIC $IF_WIFI_PACKETS" + +############################################## +# Port Traffic Statistics for Port 1 - Port 4 +############################################## +#PT_OPK1="po1 |Port 1 Outgoing Packets |COUNTER|U|$ORG1|AREA|%6.0lf" +#PT_IPK1="-pi1|Port 1 Incoming Packets |COUNTER|U|$GRN0|AREA|%6.0lf" +#PT_COL1="cl1 |Port 1 Collisions |COUNTER|U|$BLU0|AREA|%6.0lf" +#PT_ERR1="er1 |Port 1 Errors |COUNTER|U|$CYA0|AREA|%6.0lf" +#PT_OBY1="bo1 |Port 1 Outgoing Traffic |COUNTER|U|$ORG1|AREA" +#PT_IBY1="-bi1|Port 1 Incoming Traffic |COUNTER|U|$GRN0|AREA" +#PT_OPK2="po2 |Port 2 Outgoing Packets |COUNTER|U|$RED1|AREA|%6.0lf" +#PT_IPK2="-pi2|Port 2 Incoming Packets |COUNTER|U|$BLK0|AREA|%6.0lf" +#PT_COL2="cl2 |Port 2 Collisions |COUNTER|U|$GRN0|AREA|%6.0lf" +#PT_ERR2="er2 |Port 2 Errors |COUNTER|U|$ORG0|AREA|%6.0lf" +#PT_OBY2="bo2 |Port 2 Outgoing Traffic |COUNTER|U|$RED1|AREA" +#PT_IBY2="-bi2|Port 2 Incoming Traffic |COUNTER|U|$BLK0|AREA" +#PT_OPK3="po3 |Port 3 Outgoing Packets |COUNTER|U|$BLU1|AREA|%6.0lf" +#PT_IPK3="-pi3|Port 3 Incoming Packets |COUNTER|U|$CYA0|AREA|%6.0lf" +#PT_COL3="cl3 |Port 3 Collisions |COUNTER|U|$GRN0|AREA|%6.0lf" +#PT_ERR3="er3 |Port 3 Errors |COUNTER|U|$ORG0|AREA|%6.0lf" +#PT_OBY3="bo3 |Port 3 Outgoing Traffic |COUNTER|U|$BLU1|AREA" +#PT_IBY3="-bi3|Port 3 Incoming Traffic |COUNTER|U|$CYA0|AREA" +#PT_OPK4="po4 |Port 4 Outgoing Packets |COUNTER|U|$YEL1|AREA|%6.0lf" +#PT_IPK4="-pi4|Port 4 Incoming Packets |COUNTER|U|$CYA0|AREA|%6.0lf" +#PT_COL4="cl4 |Port 4 Collisions |COUNTER|U|$BLK0|AREA|%6.0lf" +#PT_ERR4="er4 |Port 4 Errors |COUNTER|U|$RED0|AREA|%6.0lf" +#PT_OBY4="bo4 |Port 4 Outgoing Traffic |COUNTER|U|$YEL1|AREA" +#PT_IBY4="-bi4|Port 4 Incoming Traffic |COUNTER|U|$CYA0|AREA" + +# Plot-Titles +#TRAFFIC_1="Traffic Statistics Port 1 ($HOSTNAME)" +#TRAFFIC_2="Traffic Statistics Port 2 ($HOSTNAME)" +#TRAFFIC_3="Traffic Statistics Port 3 ($HOSTNAME)" +#TRAFFIC_4="Traffic Statistics Port 4 ($HOSTNAME)" +#PACKETS_1="Packet Statistics Port 1 ($HOSTNAME)" +#PACKETS_2="Packet Statistics Port 2 ($HOSTNAME)" +#PACKETS_3="Packet Statistics Port 3 ($HOSTNAME)" +#PACKETS_4="Packet Statistics Port 4 ($HOSTNAME)" + +# Plot-Definitions (sort-order is relevant) +#PT_TRAFFIC_1="OBY1 IBY1" +#PT_TRAFFIC_2="OBY2 IBY2" +#PT_TRAFFIC_3="OBY3 IBY3" +#PT_TRAFFIC_4="OBY4 IBY4" +#PT_PACKETS_1="OPK1 IPK1 COL1 ERR1" +#PT_PACKETS_2="OPK2 IPK2 COL2 ERR2" +#PT_PACKETS_3="OPK3 IPK3 COL3 ERR3" +#PT_PACKETS_4="OPK4 IPK4 COL4 ERR4" +#PT_PACKETS_1="OPK1 IPK1" +#PT_PACKETS_2="OPK2 IPK2" +#PT_PACKETS_3="OPK3 IPK3" +#PT_PACKETS_4="OPK4 IPK4" + +# Data Definition needed by init() +#PT_ALL="$PT_TRAFFIC_1 $PT_TRAFFIC_2 $PT_TRAFFIC_3 $PT_TRAFFIC_4 $PT_PACKETS_1 $PT_PACKETS_2 $PT_PACKETS_3 $PT_PACKETS_4" + +################################# +# Traffic Priorisation Statistics +################################# +#TC_APRIB="bwa|Ack Priority Queue Bandwidth |COUNTER|$MAXWANB|$YEL0|AREA" +#TC_DPRIB="bwd|Default Priority Queue Bandwidth |COUNTER|$MAXWANB|$ORG0|STACK" +#TC_HPRIB="bwh|High Priority Queue Bandwidth |COUNTER|$MAXWANB|$RED0|STACK" +#TC_LPRIB="bwl|Low Priority Queue Bandwidth |COUNTER|$MAXWANB|$GRN0|STACK" +#TC_APRID="dra|Ack Priority Queue Packet Dropped |COUNTER|100|$YEL0|AREA" +#TC_DPRID="drd|Default Priority Queue Packet Dropped|COUNTER|100|$ORG0|STACK" +#TC_HPRID="drh|High Priority Queue Packet Dropped |COUNTER|100|$RED0|STACK" +#TC_LPRID="drl|Low Priority Queue Packet Dropped |COUNTER|100|$GRN0|STACK" + +# Plot-Titles +#TRAFFIC="Traffic Priorisation Stats" +#PACKETS="Packet Priorisation Stats" + +# Plot-Definitions (sort-order is relevant) +#TC_TRAFFIC="APRIB DPRIB HPRIB LPRIB" +#TC_PACKETS="APRID DPRID HPRID LPRID" + +# Data Definition needed by init() +#TC_ALL="$TC_TRAFFIC $TC_PACKETS" + +################################# +# Firewall Packet Drop Statistics +################################# +#PC_WIN="win|Windows Traffic |COUNTER|U|$YEL0|AREA" +#PC_INV="inv|Invalid State Traffic |COUNTER|U|$ORG0|STACK" +#PC_TCP="tcp|TCP Packets |COUNTER|U|$RED0|STACK" +#PC_OTH="oth|Other Packets |COUNTER|U|$BLU0|STACK" + +# Plot-Titles +#DROPPED="Firewall Packet Drop Statistics" + +# Plot-Definitions (sort-order is relevant) +#PC_DROPPED="WIN INV TCP OTH" + +# Data Definition needed by init() +#PC_ALL="$PC_DROPPED" + +########################## +# Traffic Accounting Stats +########################## +#ACI="Incoming for "; ACO="Outgoing for " +#IP14="notebook"; COL14=$ORG0; COL_14=$ORG1 +#IP15="saugi "; COL15=$RED0; COL_15=$RED1 +#IP20="aplink "; COL20=$GRN0; COL_20=$GRN1 +#IP50="sunny "; COL50=$BLU0; COL_50=$BLU1 + +#TYPE=AREA +#for i in 15 50 20 14 +#do +# # Packet-Statistics +# eval AC_TIP$i='-TIP$i\|$ACI'"\$IP$i\|COUNTER\|$MAXWANP\|\$COL$i\|$TYPE" +# eval AC_TOP$i='TOP$i\|$ACO'"\$IP$i\|COUNTER\|$MAXWANP\|\$COL_$i\|$TYPE" +# eval AC_UIP$i='-UIP$i\|$ACI'"\$IP$i\|COUNTER\|$MAXWANP\|\$COL$i\|$TYPE" +# eval AC_UOP$i='UOP$i\|$ACO'"\$IP$i\|COUNTER\|$MAXWANP\|\$COL_$i\|$TYPE" +# eval AC_IIP$i='-IIP$i\|$ACI'"\$IP$i\|COUNTER\|$MAXWANP\|\$COL$i\|$TYPE" +# eval AC_IOP$i='IOP$i\|$ACO'"\$IP$i\|COUNTER\|$MAXWANP\|\$COL_$i\|$TYPE" +# # Traffic Statistics +# eval AC_TIB$i='-TIB$i\|$ACI'"\$IP$i\|COUNTER\|$MAXWANB\|\$COL$i\|$TYPE" +# eval AC_TOB$i='TOB$i\|$ACO'"\$IP$i\|COUNTER\|$MAXWANB\|\$COL_$i\|$TYPE" +# eval AC_UIB$i='-UIB$i\|$ACI'"\$IP$i\|COUNTER\|$MAXWANB\|\$COL$i\|$TYPE" +# eval AC_UOB$i='UOB$i\|$ACO'"\$IP$i\|COUNTER\|$MAXWANB\|\$COL_$i\|$TYPE" +# eval AC_IIB$i='-IIB$i\|$ACI'"\$IP$i\|COUNTER\|$MAXWANB\|\$COL$i\|$TYPE" +# eval AC_IOB$i='IOB$i\|$ACO'"\$IP$i\|COUNTER\|$MAXWANB\|\$COL_$i\|$TYPE" +# # Plot-Definitions (sort-order is relevant) +# AC_TB_O="$AC_TB_O TOB$i"; AC_TB_I="$AC_TB_I TIB$i" +# AC_TP_O="$AC_TP_O TOP$i"; AC_TP_I="$AC_TP_I TIP$i" +# AC_UB_O="$AC_UB_O UOB$i"; AC_UB_I="$AC_UB_I UIB$i" +# AC_UP_O="$AC_UP_O UOP$i"; AC_UP_I="$AC_UP_I UIP$i" +# AC_IB_O="$AC_IB_O IOB$i"; AC_IB_I="$AC_IB_I IIB$i" +# AC_IP_O="$AC_IP_O IOP$i"; AC_IP_I="$AC_IP_I IIP$i" +# TYPE=STACK +#done +#AC_TB="$AC_TB_O $AC_TB_I"; AC_TP="$AC_TP_O $AC_TP_I" +#AC_UB="$AC_UB_O $AC_UB_I"; AC_UP="$AC_UP_O $AC_UP_I" +#AC_IB="$AC_IB_O $AC_IB_I"; AC_IP="$AC_IP_O $AC_IP_I"; + +# Plot-Titles +#TB="TCP Traffic Accounting Stats ($HOSTNAME)"; TP="TCP Packet Accounting Stats ($HOSTNAME)" +#UB="UDP Traffic Accounting Stats ($HOSTNAME)"; UP="UDP Packet Accounting Stats ($HOSTNAME)" +#IB="ICMP Traffic Accounting Stats ($HOSTNAME)";IP="ICMP Packet Accounting Stats ($HOSTNAME)" + +# Data Definition needed by init() +#AC_ALL="$AC_TB $AC_TP $AC_UB $AC_UP $AC_IB $AC_IP" + + +# System Statistics +GRAPH_1="SYS|USG_STATS|$USG_STATS|Load" +GRAPH_2="SYS|CPU_STATS|$CPU_STATS|CPU-Time_in_%|1000|--upper-limit 100 --rigid --logarithmic --lower-limit 0.1" +GRAPH_3="SYS|MEM_STATS|$MEM_STATS|Bytes|1024" +GRAPH_4="SYS|DSK_STATS|$DSK_STATS|Bytes|1024" +GRAPH_5="SYS|MISC_STATS|$MISC_STATS|_|1000|--logarithmic" +GRAPH_6="SYS|IRQ_STATS|$IRQ_STATS|IRQ_per_second|1000" +# Interface Traffic Statistics +GRAPH_7="IF|LAN_TRAFFIC|$LAN_TRAFFIC|Bytes_per_second" +GRAPH_8="IF|LAN_PACKETS|$LAN_PACKETS|Packets_per_second" +GRAPH_9="IF|WAN_TRAFFIC|$WAN_TRAFFIC|Bytes_per_second" +GRAPH_10="IF|WAN_PACKETS|$WAN_PACKETS|Packets_per_second" +GRAPH_11="IF|WIFI_TRAFFIC|$WIFI_TRAFFIC|Bytes_per_second" +GRAPH_12="IF|WIFI_PACKETS|$WIFI_PACKETS|Packets_per_second" +#GRAPH_11="IF|TUN_TRAFFIC|$TUN_TRAFFIC|Bytes_per_second" +#GRAPH_12="IF|TUN_PACKETS|$TUN_PACKETS|Packets_per_second" +# Port Traffic Statistics +#GRAPH_13="PT|TRAFFIC_1|$TRAFFIC_1|Bytes_per_second" +#GRAPH_14="PT|PACKETS_1|$PACKETS_1|Packets_per_second" +#GRAPH_15="PT|TRAFFIC_2|$TRAFFIC_2|Bytes_per_second" +#GRAPH_16="PT|PACKETS_2|$PACKETS_2|Packets_per_second" +#GRAPH_17="PT|TRAFFIC_3|$TRAFFIC_3|Bytes_per_second" +#GRAPH_18="PT|PACKETS_3|$PACKETS_3|Packets_per_second" +#GRAPH_19="PT|TRAFFIC_4|$TRAFFIC_4|Bytes_per_second" +#GRAPH_20="PT|PACKETS_4|$PACKETS_4|Packets_per_second" +# Traffic Priorisation Statistics +# GRAPH_21="TC|TRAFFIC|$TRAFFIC|Bytes_per_second|1000|--logarithmic" +# GRAPH_22="TC|PACKETS|$PACKETS|Packets_per_second" +# Accounting Statistics +#GRAPH_23="AC|TB|$TB|Bytes_per_second" +#GRAPH_24="AC|TP|$TP|Packets_per_second" +#GRAPH_25="AC|UB|$UB|Bytes_per_second" +#GRAPH_26="AC|UP|$UP|Packets_per_second" +#GRAPH_27="AC|IB|$IB|Bytes_per_second" +#GRAPH_28="AC|IP|$IP|Packets_per_second" +# Firewall Drop Statistics +#GRAPH_29="PC|DROPPED|$DROPPED|Packets_per_second" + +#ALL_PRAEFIXES="SYS IF PT TC AC PC" +ALL_PRAEFIXES="SYS IF" +GRAPH_MAX=12 diff --git a/utils/rrdcollect/files/rrd.sh b/utils/rrdcollect/files/rrd.sh new file mode 100644 index 0000000..3faa4fb --- /dev/null +++ b/utils/rrdcollect/files/rrd.sh @@ -0,0 +1,288 @@ +#!/bin/sh +# +# Author: Christian Rost (chr@baltic-online.de) +# Purpose: Shell-Interface to rrdtool +# +RRDCNF=/etc/rrd.conf +. $RRDCNF + +###################################### +# init() function to create .rrd-file +# $1=VAR-PRAEFIX $2=VAR-POSTFIX +###################################### +init() +{ + # Calculate optimal step by assuming highest precision on the last-xhour plot + OPTSTEP=`expr $HOURS \* 3600 \/ $PIXWIDTH \* $H_RES` + [ $OPTSTEP != $STEP ] && echo "WARNING: Your optimal step is: $OPTSTEP. But you are using: $STEP" + + ARH_AVG=`expr $HOURS \* 3600 \/ $PIXWIDTH \* $H_RES \/ $STEP`; ARH_CNT=`expr $HOURS \* 3600 \/ $ARH_AVG \/ $STEP` + ARD_AVG=`expr $DAYS \* 86400 \/ $PIXWIDTH \* $D_RES \/ $STEP`; ARD_CNT=`expr $DAYS \* 86400 \/ $ARD_AVG \/ $STEP` + ARW_AVG=`expr $WEEKS \* 604800 \/ $PIXWIDTH \* $W_RES \/ $STEP`; ARW_CNT=`expr $WEEKS \* 604800 \/ $ARW_AVG \/ $STEP` + + PRAEFIX=$1; POSTFIX=$2 + DSOURCE="" + + echo "Init storage for $HOURS hours on averages: $ARH_AVG x $STEP seconds ($ARH_CNT total values)" + echo "Init storage for $DAYS days on averages: $ARD_AVG x $STEP seconds ($ARD_CNT total values)" + echo "Init storage for $WEEKS weeks on averages: $ARW_AVG x $STEP seconds ($ARW_CNT total values)" + + eval SOURCE=\$${PRAEFIX}_${POSTFIX} + for i in $SOURCE + do + eval var=\$${PRAEFIX}_${i} + ifs="$IFS"; IFS="|"; set -- $var + if [ "`echo ${1} | cut -b1`" = "-" ] + then + VAR="`echo ${1} | cut -b2-`" + else + VAR=`echo $1 | sed "s/ //g"` + fi + DSOURCE="$DSOURCE DS:${VAR}:${3}:$MAXSTEP:0:${4}" + IFS="$ifs" + done + $DEBUG $RRDTOOL create $RRDDIR/$PRAEFIX.rrd \ + --step ${STEP} \ + $DSOURCE \ + RRA:AVERAGE:0.5:$ARH_AVG:$ARH_CNT \ + RRA:AVERAGE:0.5:$ARD_AVG:$ARD_CNT \ + RRA:AVERAGE:0.5:$ARW_AVG:$ARW_CNT \ + RRA:MAX:0.5:$ARH_AVG:$ARH_CNT \ + RRA:MAX:0.5:$ARD_AVG:$ARD_CNT \ + RRA:MAX:0.5:$ARW_AVG:$ARW_CNT + return $? +} + +################################################################################################################# +# graph() function to create png-graphics +# $1=IMG-DIR $2=VAR-PRAEFIX, $3=VAR-POSTFIX, $4=Headline, $5=end, $6=start, $7=base, +# $8=DEFS/ENTRIES $9=other rrdgraph options (Vertlabel,...) +################################################################################################################# +# COMMENT:"$DATE\c" +do_rrdgraph() +{ + $DEBUG $NICE $RRDTOOL graph "$1/$2_$3.png" \ + --title "$4" \ + --imgformat $PIXFORMAT \ + --width $PIXWIDTH \ + --height $PIXHEIGHT \ + --end "$5" \ + --start "$6" \ + --base "$7" \ + $8 $9 +} + +################################################################################################################# +# graph() function to create png-graphics +# $1=IMG-DIR $2=VAR-PRAEFIX, $3=VAR-POSTFIX, $4=Headline, $5=end, $6=start, $7=base, +# $8=DEFS/ENTRIES $9=other rrdgraph options (Vertlabel,...) +################################################################################################################# +# COMMENT:"\c" +do_rrdcgi() +{ + cat << EOF > $1/$2_$3.def + +$2_$3.png \ +--title "$4" \ +--imgformat $PIXFORMAT \ +--width $PIXWIDTH \ +--height $PIXHEIGHT \ +--end "$5" \ +--start \ +--base $7 \ +--imginfo "" \ +--lazy \ +$8 $9 > +EOF + + cat << EOF >> $RRDCGISCRIPT +$NEWLINE $4
    + + +EOF +} + + + +gen_cgi_header() +{ + cat << EOF > $RRDCGISCRIPT +#!$RRDCGI +RRDCGI Router Statistics + + +

    RRDCGI Router Statistics ()

    +
    + ${HOURS} hours ago + ${DAYS} days ago + ${WEEKS} weeks ago + +
    +

    + +EOF +} + +gen_cgi_footer() +{ + cat << EOF >> $RRDCGISCRIPT +
    +

    + + +EOF + chmod +x $RRDCGISCRIPT +} + +################################################################################################################# +# $1=mode $2=VAR-PRAEFIX, $3=VAR-POSTFIX, $4=Headline, $5=Vertlabel, $6=start, $7=end, $8=base, $9=other rrdgraph options +################################################################################################################# +do_graph() +{ + MODE=$1; PRAEFIX=$2; POSTFIX=$3; HEADLINE=$4; VERTLABEL=$5; START=$6; END=$7; BASE=$8; SRC=${RRDDIR}/${PRAEFIX}.rrd + if [ ! -r "$SRC" ] + then + echo "$SRC not found. Aborting all operations now..." + exit 1 + fi + + # For Graphing Memory BASE should be set to 1024, default is 1000 + [ -n "$8" ] && BASE=$8 || BASE=1000 + [ -n "$9" ] && OPTS=$9 || OPTS="--lower-limit 0" + DEFS=""; ENTRIES="" + eval SOURCE=\$${PRAEFIX}_${POSTFIX} + for i in $SOURCE + do + eval var=\$${PRAEFIX}_${i} + ifs="$IFS"; IFS="|"; set -- $var + if [ "`echo ${1} | cut -b1`" = "-" ] + then + VAR="`echo ${1} | cut -b2-`" + NEG=1 + else + VAR=`echo $1 | sed "s/ //g"` + NEG=0 + fi + + if [ "$NEG" = 1 ] + then + [ -n "${8}" ] && DEFS="$DEFS DEF:${VAR}=$SRC:${VAR}:AVERAGE DEF:MAX${VAR}=$SRC:${VAR}:MAX ${8} CDEF:N${VAR}C=${VAR}C,-1,* " \ + || DEFS="$DEFS DEF:${VAR}=$SRC:${VAR}:AVERAGE DEF:MAX${VAR}=$SRC:${VAR}:MAX CDEF:N${VAR}=${VAR},-1,*" + else + [ -n "${8}" ] && DEFS="$DEFS DEF:${VAR}=$SRC:${VAR}:AVERAGE DEF:MAX${VAR}=$SRC:${VAR}:MAX ${8}" \ + || DEFS="$DEFS DEF:${VAR}=$SRC:${VAR}:AVERAGE DEF:MAX${VAR}=$SRC:${VAR}:MAX" + fi + # Now this is a bit ugly, but i don't know how to escape the blanks in a proper way. + # If you know any better way to keep the blanks in the legend of the graphics please inform me. + #L=`echo ${2} | tr -s "[= =]" '\014'` + #L=`echo ${2} | tr -s "[= =]" '_'` + L=`echo ${2} | sed "s/ /_/g"` + if [ -n "${7}" ] + then + if [ -n "${8}" ] + then + [ "$NEG" = 1 ] && ENTRIES="$ENTRIES ${6}:N${VAR}C${5}:${L}: GPRINT:${VAR}C:AVERAGE:Average\:${7} GPRINT:MAX${VAR}C:MAX:Max\:${7} GPRINT:${VAR}C:LAST:Last\:${7}\\j" \ + || ENTRIES="$ENTRIES ${6}:${VAR}C${5}:${L}: GPRINT:${VAR}C:AVERAGE:Average\:${7} GPRINT:MAX${VAR}C:MAX:Max\:${7} GPRINT:${VAR}C:LAST:Last\:${7}\\j" + else + [ "$NEG" = 1 ] && ENTRIES="$ENTRIES ${6}:N${VAR}${5}:${L}: GPRINT:${VAR}:AVERAGE:Average\:${7} GPRINT:MAX${VAR}:MAX:Max\:${7} GPRINT:${VAR}:LAST:Last\:${7}\\j" \ + || ENTRIES="$ENTRIES ${6}:${VAR}${5}:${L}: GPRINT:${VAR}:AVERAGE:Average\:${7} GPRINT:MAX${VAR}:MAX:Max\:${7} GPRINT:${VAR}:LAST:Last\:${7}\\j" + fi + else + [ "$NEG" = 1 ] && ENTRIES="$ENTRIES ${6}:N${VAR}${5}:${L}: GPRINT:${VAR}:AVERAGE:Average\:%6.2lf%s GPRINT:MAX${VAR}:MAX:Max\:%6.0lf%s GPRINT:${VAR}:LAST:Last\:%6.2lf%s\\j" \ + || ENTRIES="$ENTRIES ${6}:${VAR}${5}:${L}: GPRINT:${VAR}:AVERAGE:Average\:%6.2lf%s GPRINT:MAX${VAR}:MAX:Max\:%6.0lf%s GPRINT:${VAR}:LAST:Last\:%6.2lf%s\\j" + fi + IFS="$ifs" + done + + #[ "$POSTFIX" = "CPU_STATS" ] && (echo $OPTS; echo $DEFS ; echo $ENTRIES; echo $OPTS) + + $MODE "$IMGDIR" "$PRAEFIX" "$POSTFIX" "$HEADLINE" "$END" "$START" "$BASE" "$DEFS $ENTRIES" "--vertical-label $VERTLABEL $OPTS" +} + +# Check if all rrd-files are present +# and create them if not +init_loop() +{ + for j in $ALL_PRAEFIXES + do + if [ ! -f $RRDDIR/$j.rrd ] + then + echo "Creating $RRDDIR/$j.rrd ..." + init $j ALL + [ ! -f $RRDDIR/$j.rrd ] && EXIT=1 + fi + done + [ "$EXIT" = 1 ] && return 1 || return 0 +} + + +graph_loop() +{ + mode=$1; start=$2; end=$3; c=1 + while [ $c -le $GRAPH_MAX ] + do + eval var=\$GRAPH_${c} + # $1=VAR-PRAEFIX $2=VAR-POSTFIX $3=Headline $4=Vertlabel $5=base $6=other rrdgraph options + ifs="$IFS"; IFS="|"; set -- $var + IFS="$ifs" + [ "$1" != "$OLD" -o "`expr \( $c - 1 \) % 2`" = 0 ] && NEWLINE="" || NEWLINE="" + do_graph $mode $1 $2 "$3" "$4" $start $end $5 "$6" + c=`expr $c + 1`; OLD=$1 + done +} + + +case "$1" in + init) + if init_loop + then + exit 0 + else + echo "Initialisation of rrd-database-files failed" + exit 1 + fi + ;; + cgi) + echo "Updating $RRDCGISCRIPT and $IMGDIR/*.def" + gen_cgi_header + # The start-time will be not used + graph_loop do_rrdcgi end now + gen_cgi_footer + ;; + images) + # Create the graphs + [ -n "$2" ] && STH=$2 || STH=24h + echo "Updating Graphs ($STH ago -> now) for $RRDDIR/*.rrd" + graph_loop do_rrdgraph "end-${STH}" now + ;; + fetch) + # Fetch data from rrdcollect daemon + if [ ! -n "$3" ] + then + echo "Usage: $0 fetch " + exit 1 + else + echo "Fetching ascii-logs from rrdcollect daemon" + (cd $RRDDIR && $NETCAT $2 $3 | sed -n "s:^\(update .*\):$RRDTOOL \1:p" | sh -x ) 2>&1 | wc -l #>/dev/null + exit 0 + fi + ;; + *) echo "Usage: $0 " + echo " init: Initialize rrd-datafiles if neeeded" + echo " cgi: Creates cgi-script for use with rrdcgi" + echo " fetch: Fetching data from rrdcollect via netcat" + echo " images: Generates images" + exit 1 + ;; +esac +exit 0 diff --git a/utils/rrdcollect/files/rrdcollect.conf b/utils/rrdcollect/files/rrdcollect.conf new file mode 100644 index 0000000..e34c9bf --- /dev/null +++ b/utils/rrdcollect/files/rrdcollect.conf @@ -0,0 +1,33 @@ +step = 360 +directory = /var/lib/rrdcollect/rrd + +file:///proc/stat +"cpu0 %d %d %d %d" SYS.rrd:cu,cn,cs,ci +"ctxt %u" SYS.rrd:ct +"processes %u" SYS.rrd:fk +"intr %u" SYS.rrd:ira + +file:///proc/meminfo +#"Mem: %*d %d %d %d %d %d" SYS.rrd:mu,mf,ms,mb,mc +"Mem: %*d %d %d %*d %d %d" SYS.rrd:mu,mf,mb,mc + +file:///proc/loadavg +"%f %f %f %d/%d %*d" SYS.rrd:l1,l2,l3,pr,pt + +exec:///bin/df +"/dev/mtdblock/4 %*d %d %d" SYS.rrd:us,av + +# LAN: vlan0, WAN: vlan1, WIFI: eth1 +file:///proc/net/dev +" vlan0:%d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Labi,Lapi,Labo,Lapo +" vlan1:%d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Wabi,Wapi,Wabo,Wapo +" eth1:%d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Wibi,Wipi,Wibo,Wipo +#" tun0:%d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:tbi,tpi,tbo,tpo + +file:///proc/slabinfo +"ip_conntrack %d %*d %*d %*d %*d %*d" SYS.rrd:con +"arp_cache %d %*d %*d %*d %*d %*d" SYS.rrd:arp + +file:///proc/interrupts +" 4: %d MIPS eth1" SYS.rrd:irw +" 5: %d MIPS eth0" SYS.rrd:ire diff --git a/utils/rrdcollect/files/rrdcollect.init b/utils/rrdcollect/files/rrdcollect.init new file mode 100644 index 0000000..42943bd --- /dev/null +++ b/utils/rrdcollect/files/rrdcollect.init @@ -0,0 +1,28 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=98 +BIN=rrdcollect +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid +LIB_D=/var/lib/rrdcollect +CGI_S=$LIB_D/rrd.cgi +IMG_D=$LIB_D/img +RRD_D=$LIB_D/rrd + +start() { + RRD_F=$(find $RRD_D -name "*.rrd" 2>/dev/null) + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $RUN_D + mkdir -p $IMG_D + mkdir -p $RRD_D + [ -n "$RRD_F" ] || /usr/bin/rrd.sh init + [ -x $CGI_S ] || /usr/bin/rrd.sh cgi + $BIN $OPTIONS +} + +stop() { + [ -f $PID_F ] && kill $(cat $PID_F) +} + diff --git a/utils/rrdtool/Makefile b/utils/rrdtool/Makefile new file mode 100644 index 0000000..381fa04 --- /dev/null +++ b/utils/rrdtool/Makefile @@ -0,0 +1,141 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=rrdtool +PKG_VERSION:=1.2.30 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://oss.oetiker.ch/rrdtool/pub/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MD5SUM:=19b24f7184a8dbf7b48c1bbb565ad9fb + +PKG_BUILD_DEPENDS:=python + +PKG_CONFIG_DEPENDS:= \ + CONFIG_PACKAGE_python-rrd \ + CONFIG_PACKAGE_rrdcgi \ + +PKG_FIXUP:=libtool + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) + +define Package/rrdtool/Default + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Round Robin Database (RRD) + URL:=http://oss.oetiker.ch/rrdtool/ +endef + +define Package/librrd +$(call Package/rrdtool/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE+= management library (v1.2.x) + DEPENDS+= +libart +libfreetype +libpng +zlib +endef + +define Package/rrdcgi +$(call Package/rrdtool/Default) + TITLE+= CGI graphing tool (v1.2.x) + DEPENDS+= +librrd +cgilib +endef + +define Package/rrdtool +$(call Package/rrdtool/Default) + TITLE+= management tools (v1.2.x) + DEPENDS+= +librrd +endef + +define Package/python-rrd +$(call Package/rrdtool/Default) + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages + TITLE+= python bindings (v1.2.x) + DEPENDS+= +python-mini +librrd +endef + +CONFIGURE_ARGS += \ + --enable-shared=yes \ + --enable-static=yes \ + --disable-rpath \ + --with-gnu-ld \ + --disable-mmap \ + --disable-perl \ + --disable-tcl \ + --disable-ruby \ + --without-x \ + --with-rrd-default-font="/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf" \ + +CONFIGURE_VARS += \ + rd_cv_ieee_works=yes \ + rd_cv_null_realloc=nope \ + ac_cv_func_mmap_fixed_mapped=yes \ + +ifneq ($(SDK)$(CONFIG_PACKAGE_rrdcgi),) + CONFIGURE_ARGS += --enable-rrdcgi +else + CONFIGURE_ARGS += --disable-rrdcgi +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_python-rrd),) + CONFIGURE_ARGS += \ + --enable-python + CONFIGURE_VARS += \ + PYTHON="$(PYTHON)" +else + CONFIGURE_ARGS += --disable-python +endif + +define Build/Compile + $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) + $(call Build/Compile/Default) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib/rrdtool-1.2/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(1)/usr/lib/rrdtool-1.2/include/ + $(INSTALL_DIR) $(1)/usr/lib/rrdtool-1.2/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd{,_th}.{a,so*} $(1)/usr/lib/rrdtool-1.2/lib/ +endef + +define Package/librrd/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd_th.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/share/rrdtool/fonts + $(CP) $(PKG_BUILD_DIR)/src/DejaVuSansMono-Roman.ttf \ + $(1)/usr/share/rrdtool/fonts/ +endef + +define Package/rrdcgi/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(1)/usr/bin/ +endef + +define Package/rrdtool/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rrdtool $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rrdupdate $(1)/usr/bin/ +endef + +define PyPackage/python-rrd/install + $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) + $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* $(1)$(PYTHON_PKG_DIR)/ +endef + +$(eval $(call BuildPackage,librrd)) +$(eval $(call BuildPackage,rrdcgi)) +$(eval $(call BuildPackage,rrdtool)) + +$(eval $(call PyPackage,python-rrd)) +$(eval $(call BuildPackage,python-rrd)) diff --git a/utils/rrdtool/patches/010-dont-add-host-include-paths.patch b/utils/rrdtool/patches/010-dont-add-host-include-paths.patch new file mode 100644 index 0000000..507a0e9 --- /dev/null +++ b/utils/rrdtool/patches/010-dont-add-host-include-paths.patch @@ -0,0 +1,34 @@ +--- a/configure ++++ b/configure +@@ -26319,9 +26319,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + ex_check_save_LIBS=${LIBS} + ex_check_save_CPPFLAGS=${CPPFLAGS} + ex_check_save_LDFLAGS=${LDFLAGS} +- if test "x/usr/include/libart-2.0" != "x"; then +- CPPFLAGS="$CPPFLAGS -I/usr/include/libart-2.0" +- fi + { echo "$as_me:$LINENO: checking for art_vpath_add_point in -lart_lgpl_2" >&5 + echo $ECHO_N "checking for art_vpath_add_point in -lart_lgpl_2... $ECHO_C" >&6; } + if test "${ac_cv_lib_art_lgpl_2_art_vpath_add_point+set}" = set; then +@@ -27915,9 +27912,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + ex_check_save_LIBS=${LIBS} + ex_check_save_CPPFLAGS=${CPPFLAGS} + ex_check_save_LDFLAGS=${LDFLAGS} +- if test "x/usr/include/freetype2" != "x"; then +- CPPFLAGS="$CPPFLAGS -I/usr/include/freetype2" +- fi + { echo "$as_me:$LINENO: checking for FT_Init_FreeType in -lfreetype" >&5 + echo $ECHO_N "checking for FT_Init_FreeType in -lfreetype... $ECHO_C" >&6; } + if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -20,9 +20,6 @@ AC_DEFUN([EX_CHECK_ALL], + ex_check_save_LIBS=${LIBS} + ex_check_save_CPPFLAGS=${CPPFLAGS} + ex_check_save_LDFLAGS=${LDFLAGS} +- if test "x$7" != "x"; then +- CPPFLAGS="$CPPFLAGS -I$7" +- fi + dnl try compiling naked first + AC_CHECK_LIB($1,$2, [ + AC_CHECK_HEADER($3,[LIBS="-l$1 ${LIBS}";EX_CHECK_STATE=YES],[])],[]) diff --git a/utils/sane-backends/Makefile b/utils/sane-backends/Makefile new file mode 100644 index 0000000..96fc586 --- /dev/null +++ b/utils/sane-backends/Makefile @@ -0,0 +1,120 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sane-backends +PKG_VERSION:=1.0.20 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.sane-project.org/pub/sane/$(PKG_NAME)-$(PKG_VERSION)/ +PKG_MD5SUM:=a0cfdfdebca2feb4f2ba5d3418b15a42 + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/sane-backends/Default + TITLE:=Scanner Access Now Easy + URL:=http://www.sane-project.org/ +endef + +define Package/sane-backends/Default/description + SANE (Scanner Access Now Easy) is a universal scanner interface. +endef + +define Package/sane-backends +$(call Package/sane-backends/Default) + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+sane-libs +libtiff + TITLE+= (backends) +endef + +define Package/sane-backends/description +$(call Package/sane-backends/Default/description) + This package contains the SANE daemon. +endef + +define Package/sane-libs + $(call Package/sane-backends/Default) + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libjpeg +libpthread +libusb + TITLE+= (libraries) +endef + +define Package/sane-libs/description +$(call Package/sane-backends/Default/description) + This package contains the SANE shared libraries. +endef + +define Package/sane-frontends + $(call Package/sane-backends/Default) + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+sane-backends + TITLE+= (frontends) +endef + +define Package/sane-frontends/description +$(call Package/sane-backends/Default/description) + This package contains the SANE frontends. +endef + +TARGET_LDFLAGS += \ + -Wl,-rpath-link $(STAGING_DIR)/usr/lib \ + -Wl,-rpath-link $(PKG_BUILD_DIR)/backend/.libs + +CONFIGURE_ARGS+= \ + --enable-shared \ + --enable-static \ + --disable-translations \ + --disable-latex \ + --without-gphoto2 \ + --disable-debug \ + +define Build/Configure + mkdir -p $(PKG_BUILD_DIR)/backend/.libs + $(Build/Configure/Default) +endef + +define Package/sane-backends/conffiles +/etc/sane.d/saned.conf +endef + +define Package/sane-backends/install + $(INSTALL_DIR) $(1)/etc/sane.d + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sane.d/*.conf $(1)/etc/sane.d/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ +endef + +define Package/sane-libs/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsane.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/sane + $(CP) $(PKG_INSTALL_DIR)/usr/lib/sane/libsane-*.so.* $(1)/usr/lib/sane/ +endef + +define Package/sane-frontends/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/sane $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsane.{a,so*} $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,sane-backends)) +$(eval $(call BuildPackage,sane-libs)) +$(eval $(call BuildPackage,sane-frontends)) diff --git a/utils/sane-backends/patches/001-remove-unneeded.patch b/utils/sane-backends/patches/001-remove-unneeded.patch new file mode 100644 index 0000000..ec45a4e --- /dev/null +++ b/utils/sane-backends/patches/001-remove-unneeded.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -244,7 +244,7 @@ target_alias = @target_alias@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = include lib sanei backend frontend tools doc po ++SUBDIRS = include lib sanei backend frontend + DIST_SUBDIRS = include lib sanei backend frontend tools doc po japi testsuite + dist_doc_DATA = AUTHORS ChangeLog COPYING LICENSE NEWS PROBLEMS PROJECTS \ + README README.aix README.beos README.darwin README.djpeg README.freebsd \ diff --git a/utils/sane-backends/patches/010-dont-add-host-include-path.patch b/utils/sane-backends/patches/010-dont-add-host-include-path.patch new file mode 100644 index 0000000..327348d --- /dev/null +++ b/utils/sane-backends/patches/010-dont-add-host-include-path.patch @@ -0,0 +1,14 @@ +diff --git a/configure b/configure +index cc79209..5f22d58 100755 +--- a/configure ++++ b/configure +@@ -5019,9 +5019,6 @@ else + fi + + +-INCLUDES="${INCLUDES} -I/usr/local/include" +- +- + if test "${ac_cv_c_compiler_gnu}" = "yes"; then + NORMAL_CFLAGS="\ + -W \ diff --git a/utils/sane-backends/patches/020-non-i386-qcam.patch b/utils/sane-backends/patches/020-non-i386-qcam.patch new file mode 100644 index 0000000..2dbb7d8 --- /dev/null +++ b/utils/sane-backends/patches/020-non-i386-qcam.patch @@ -0,0 +1,20 @@ +--- ./backend/qcam.c.orig 2009-12-01 06:11:04.000000000 +0000 ++++ ./backend/qcam.c 2009-12-01 15:12:40.000000000 +0000 +@@ -105,6 +105,17 @@ + + #include "qcam.h" + ++#if !defined( __i386__) && !defined(__arm__) ++static inline unsigned char inb(unsigned int port) ++{ ++ return 0; ++} ++ ++static inline void outb(unsigned char value, unsigned int port) ++{ ++} ++#endif ++ + /* status bits */ + #define NeedRamTable (1 << 1) + #define BlackBalanceInProgress (1 << 6) diff --git a/utils/schedtools/Makefile b/utils/schedtools/Makefile new file mode 100644 index 0000000..2dad559 --- /dev/null +++ b/utils/schedtools/Makefile @@ -0,0 +1,38 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=schedtool +PKG_VERSION:=1.3.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://freequaos.host.sk/schedtool/ +PKG_MD5SUM:=0d968f05d3ad7675f1f33ef1f6d0a3fb + +include $(INCLUDE_DIR)/package.mk + +define Package/schedtool + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Scheduler control utility + URL:=http://freequaos.host.sk/schedtool/ +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -c $(PKG_BUILD_DIR)/schedtool.c -o $(PKG_BUILD_DIR)/schedtool.o + $(TARGET_CC) $(TARGET_CFLAGS) -c $(PKG_BUILD_DIR)/error.c -o $(PKG_BUILD_DIR)/error.o + $(TARGET_CC) $(PKG_BUILD_DIR)/schedtool.o $(PKG_BUILD_DIR)/error.o -o $(PKG_BUILD_DIR)/schedtool +endef + +define Package/schedtool/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/schedtool $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,schedtool)) diff --git a/utils/scponly/Makefile b/utils/scponly/Makefile new file mode 100644 index 0000000..52a14a2 --- /dev/null +++ b/utils/scponly/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2007-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=scponly +PKG_VERSION:=4.8 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=139ac9abd7f3b8dbc5c5520745318f8a + +include $(INCLUDE_DIR)/package.mk + +define Package/scponly + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Alternative 'shell' (of sorts) for sysadmins + URL:=http://sourceforge.net/projects/scponly +endef + +define Package/scponly/description + "scponly" is an alternative 'shell' (of sorts) for system + administrators who would like to provide access to remote + users to both read and write local files without providing + any remote execution priviledges. Functionally, it is best + described as a wrapper to the mostly trusted suite of ssh + applications. +endef + +CONFIGURE_ARGS += \ + ac_cv_path_scponly_PROG_SFTP_SERVER="/usr/libexec/sftp-server" \ + \ + --enable-winscp-compat \ + --enable-scp-compat \ + --disable-rsync-compat \ + --with-sftp-server="/usr/libexec/sftp-server" \ + +define Package/scponly/postinst +#!/bin/sh +echo "/usr/bin/scponly" >> $${IPKG_INSTROOT}/etc/shells +endef + +define Package/scponly/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,scponly)) diff --git a/utils/scponly/patches/001-elif_else_replacement.patch b/utils/scponly/patches/001-elif_else_replacement.patch new file mode 100644 index 0000000..e817e3e --- /dev/null +++ b/utils/scponly/patches/001-elif_else_replacement.patch @@ -0,0 +1,12 @@ +diff -urN scponly-4.8/helper.c scponly-4.8.new/helper.c +--- scponly-4.8/helper.c 2008-01-15 07:26:13.000000000 +0100 ++++ scponly-4.8.new/helper.c 2010-03-29 09:48:33.000000000 +0200 +@@ -230,7 +230,7 @@ + return 1; + } + } +-#elif ++#else + /* + * make sure that processing doesn't continue if we can't validate a rsync check + * and if the getopt flag is set. diff --git a/utils/screen/Makefile b/utils/screen/Makefile new file mode 100644 index 0000000..97a53b6 --- /dev/null +++ b/utils/screen/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=screen +PKG_VERSION:=4.0.3 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.uni-erlangen.de/pub/utilities/screen \ + @GNU/screen +PKG_MD5SUM:=8506fd205028a96c741e4037de6e3c42 + +include $(INCLUDE_DIR)/package.mk + +define Package/screen + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libncurses + TITLE:=Full-screen terminal window manager + URL:=http://www.gnu.org/software/screen/ +endef + +define Package/screen/description + Screen is a full-screen window manager that multiplexes a physical + terminal between several processes, typically interactive shells. +endef + +define Build/Configure + $(call Build/Configure/Default,\ + --with-sys-screenrc=/etc/screenrc,\ + LIBS="-lcrypt" \ + ) +endef + +define Package/screen/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/screen $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/etc/screenrc $(1)/etc/screenrc +endef + +$(eval $(call BuildPackage,screen)) diff --git a/utils/screen/files/etc/screenrc b/utils/screen/files/etc/screenrc new file mode 100644 index 0000000..3337674 --- /dev/null +++ b/utils/screen/files/etc/screenrc @@ -0,0 +1 @@ +startup_message off diff --git a/utils/screen/patches/100-cross_compile_fix.patch b/utils/screen/patches/100-cross_compile_fix.patch new file mode 100644 index 0000000..80833a6 --- /dev/null +++ b/utils/screen/patches/100-cross_compile_fix.patch @@ -0,0 +1,530 @@ +Binary files screen-4.0.2.old/.configure.swp and screen-4.0.2.dev/.configure.swp differ +diff -urN screen-4.0.2.old/configure screen-4.0.2.dev/configure +--- screen-4.0.2.old/configure 2003-12-05 14:46:53.000000000 +0100 ++++ screen-4.0.2.dev/configure 2005-05-05 12:13:03.000000000 +0200 +@@ -124,7 +124,7 @@ + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 +- { (exit 1); exit 1; }; } ++ } + fi + case $CONFIG_SHELL in + '') +@@ -174,7 +174,7 @@ + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 +- { (exit 1); exit 1; }; } ++ } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the +@@ -397,7 +397,7 @@ + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 +- { (exit 1); exit 1; }; } ++ } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + +@@ -406,7 +406,7 @@ + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 +- { (exit 1); exit 1; }; } ++ } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; +@@ -588,7 +588,7 @@ + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 +- { (exit 1); exit 1; }; } ++ } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; +@@ -601,7 +601,7 @@ + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 +- { (exit 1); exit 1; }; } ++ } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + +@@ -625,7 +625,7 @@ + + -*) { echo "$as_me: error: unrecognized option: $ac_option + Try \`$0 --help' for more information." >&2 +- { (exit 1); exit 1; }; } ++ } + ;; + + *=*) +@@ -633,7 +633,7 @@ + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 +- { (exit 1); exit 1; }; } ++ } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; +@@ -652,7 +652,7 @@ + if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 +- { (exit 1); exit 1; }; } ++ } + fi + + # Be sure to have absolute paths. +@@ -662,7 +662,7 @@ + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 +- { (exit 1); exit 1; }; };; ++ };; + esac + done + +@@ -674,7 +674,7 @@ + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 +- { (exit 1); exit 1; }; };; ++ };; + esac + done + +@@ -728,15 +728,15 @@ + if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +- { (exit 1); exit 1; }; } ++ } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +- { (exit 1); exit 1; }; } ++ } + fi + fi + (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +- { (exit 1); exit 1; }; } ++ } + srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` + ac_env_build_alias_set=${build_alias+set} + ac_env_build_alias_value=$build_alias +@@ -1243,7 +1243,7 @@ + echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} +- { (exit 1); exit 1; }; } ++ } + fi + + ac_ext=c +@@ -1734,7 +1734,7 @@ + See \`config.log' for more details." >&5 + echo "$as_me: error: no acceptable C compiler found in \$PATH + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ } + + # Provide some information about the compiler. + echo "$as_me:$LINENO:" \ +@@ -1856,7 +1856,7 @@ + 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 +@@ -1898,7 +1898,7 @@ + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot compute suffix of executables: cannot compile and link + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ } + fi + + rm -f conftest$ac_cv_exeext +@@ -1950,7 +1950,7 @@ + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot compute suffix of object files: cannot compile + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ } + fi + + rm -f conftest.$ac_cv_objext conftest.$ac_ext +@@ -2514,7 +2514,7 @@ + See \`config.log' for more details." >&5 + echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check + See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; } ++ } + fi + + ac_ext=c +@@ -2704,7 +2704,7 @@ + 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 + #line $LINENO "configure" +@@ -2753,7 +2753,7 @@ + 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 + #line $LINENO "configure" +@@ -2790,7 +2790,7 @@ + + { { echo "$as_me:$LINENO: error: Can't run the compiler - sorry" >&5 + echo "$as_me: error: Can't run the compiler - sorry" >&2;} +- { (exit 1); exit 1; }; } ++ } + fi + rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi +@@ -2800,7 +2800,7 @@ + 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 + #line $LINENO "configure" +@@ -2830,7 +2830,7 @@ + (exit $ac_status); }; }; then + { { echo "$as_me:$LINENO: error: Your compiler does not set the exit status - sorry" >&5 + echo "$as_me: error: Your compiler does not set the exit status - sorry" >&2;} +- { (exit 1); exit 1; }; } ++ } + else + echo "$as_me: program exited with status $ac_status" >&5 + echo "$as_me: failed program was:" >&5 +@@ -2900,7 +2900,7 @@ + if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} +- { (exit 1); exit 1; }; } ++ } + fi + ac_config_guess="$SHELL $ac_aux_dir/config.guess" + ac_config_sub="$SHELL $ac_aux_dir/config.sub" +@@ -4149,7 +4149,7 @@ + + { { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5 + echo "$as_me: error: !!! no select - no screen" >&2;} +- { (exit 1); exit 1; }; } ++ } + fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +@@ -4163,7 +4163,7 @@ + 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 + #line $LINENO "configure" +@@ -4272,7 +4272,7 @@ + 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 + #line $LINENO "configure" +@@ -4365,7 +4365,7 @@ + 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 + #line $LINENO "configure" +@@ -4460,7 +4460,7 @@ + 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 + #line $LINENO "configure" +@@ -4562,7 +4562,7 @@ + else + { { echo "$as_me:$LINENO: error: you have neither usable sockets nor usable pipes -> no screen" >&5 + echo "$as_me: error: you have neither usable sockets nor usable pipes -> no screen" >&2;} +- { (exit 1); exit 1; }; } ++ } + fi + + +@@ -4573,7 +4573,7 @@ + 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 + #line $LINENO "configure" +@@ -4898,7 +4898,7 @@ + + { { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5 + echo "$as_me: error: !!! no tgetent - no screen" >&2;} +- { (exit 1); exit 1; }; } ++ } + fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + fi +@@ -4915,7 +4915,7 @@ + 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 + #line $LINENO "configure" +@@ -5359,7 +5356,7 @@ + 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 + #line $LINENO "configure" +@@ -6206,7 +6203,7 @@ + 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 + #line $LINENO "configure" +@@ -6482,7 +6479,7 @@ + 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 + #line $LINENO "configure" +@@ -7004,7 +7001,7 @@ + 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 + #line $LINENO "configure" +@@ -7056,7 +7053,7 @@ + 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 + #line $LINENO "configure" +@@ -7110,7 +7107,7 @@ + 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 + #line $LINENO "configure" +@@ -7951,7 +7948,7 @@ + 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 + #line $LINENO "configure" +@@ -7982,7 +7979,7 @@ + ( exit $ac_status ) + { { echo "$as_me:$LINENO: error: Can't run the compiler - internal error. Sorry." >&5 + echo "$as_me: error: Can't run the compiler - internal error. Sorry." >&2;} +- { (exit 1); exit 1; }; } ++ } + fi + rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi +@@ -8251,7 +8248,7 @@ + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 + echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} +- { (exit 1); exit 1; }; } ++ } + fi + case $CONFIG_SHELL in + '') +@@ -8302,7 +8299,7 @@ + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 + echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} +- { (exit 1); exit 1; }; } ++ } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the +@@ -8494,7 +8491,7 @@ + Try \`$0 --help' for more information." >&5 + echo "$as_me: error: ambiguous option: $1 + Try \`$0 --help' for more information." >&2;} +- { (exit 1); exit 1; }; };; ++ };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) +@@ -8516,7 +8513,7 @@ + Try \`$0 --help' for more information." >&5 + echo "$as_me: error: unrecognized option: $1 + Try \`$0 --help' for more information." >&2;} +- { (exit 1); exit 1; }; } ;; ++ } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + +@@ -8555,7 +8552,7 @@ + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 + echo "$as_me: error: invalid argument: $ac_config_target" >&2;} +- { (exit 1); exit 1; }; };; ++ };; + esac + done + +@@ -8750,7 +8747,7 @@ + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 + echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} +- { (exit 1); exit 1; }; }; } ++ }; } + + ac_builddir=. + +@@ -8816,7 +8813,7 @@ + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } ++ } + echo $f;; + *) # Relative + if test -f "$f"; then +@@ -8829,7 +8826,7 @@ + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } ++ } + fi;; + esac + done` || { (exit 1); exit 1; } +@@ -8907,7 +8904,7 @@ + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } ++ } + echo $f;; + *) # Relative + if test -f "$f"; then +@@ -8920,7 +8917,7 @@ + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } ++ } + fi;; + esac + done` || { (exit 1); exit 1; } +@@ -9073,7 +9070,7 @@ + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 + echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} +- { (exit 1); exit 1; }; }; } ++ }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file +diff -urN screen-4.0.2.old/pty.c screen-4.0.2.dev/pty.c +--- screen-4.0.2.old/pty.c 2003-09-08 16:26:18.000000000 +0200 ++++ screen-4.0.2.dev/pty.c 2005-05-05 12:32:20.000000000 +0200 +@@ -34,9 +34,9 @@ + #endif + + /* for solaris 2.1, Unixware (SVR4.2) and possibly others */ +-#ifdef HAVE_SVR4_PTYS +-# include +-#endif ++//#ifdef HAVE_SVR4_PTYS ++//# include ++//#endif + + #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL) + # include +--- screen-4.0.2/configure.old 2005-05-24 18:49:30.000000000 +0200 ++++ screen-4.0.2/configure 2005-05-24 18:49:54.000000000 +0200 +@@ -6598,8 +6598,6 @@ + LIBS="$oldlibs" + fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +-test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" +-test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" + oldlibs="$LIBS" + LIBS="$LIBS -lsun" + { echo "$as_me:$LINENO: checking IRIX sun library..." >&5 +diff -ur screen.old/sched.h screen.dev/sched.h +--- screen.old/sched.h 2002-01-08 16:42:43.000000000 +0100 ++++ screen.dev/sched.h 2007-03-02 17:03:48.475830776 +0100 +@@ -22,6 +22,11 @@ + * $Id: 100-cross_compile_fix.patch 6458 2007-03-02 16:12:30Z nbd $ FAU + */ + ++#ifndef __SCHED_H ++#define __SCHED_H ++ ++#include ++ + struct event + { + struct event *next; +@@ -41,3 +46,5 @@ + #define EV_READ 1 + #define EV_WRITE 2 + #define EV_ALWAYS 3 ++ ++#endif diff --git a/utils/sdparm/Makefile b/utils/sdparm/Makefile new file mode 100644 index 0000000..95c3857 --- /dev/null +++ b/utils/sdparm/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2007-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sdparm +PKG_VERSION:=1.04 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://sg.danny.cz/sg/p +PKG_MD5SUM:=f4b8c7bfc1cd27d30fbdc066a65a44ea + +PKG_FIXUP = libtool + +include $(INCLUDE_DIR)/package.mk + +define Package/sdparm + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Read or modify SCSI or USB disk parameters + DEPENDS:=+kmod-scsi-generic + SUBMENU:=disc + URL:=http://sg.danny.cz/sg/sdparm.html +endef + +define Package/sdparm/description + The sdparm utility outputs and in some cases modifies SCSI device + parameters. +endef + +define Package/sdparm/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,sdparm)) diff --git a/utils/sed/Makefile b/utils/sed/Makefile new file mode 100644 index 0000000..5a60bb0 --- /dev/null +++ b/utils/sed/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sed +PKG_VERSION:=4.2.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNU/$(PKG_NAME) +PKG_MD5SUM:=7d310fbd76e01a01115075c1fd3f455a + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/sed + SECTION:=utils + CATEGORY:=Utilities + TITLE:=GNU streams editor + URL:=http://ftp.gnu.org/gnu/sed/ +endef + +define Package/sed/description + Sed (streams editor) takes text input and performs some operation + (or set of operations) on it and outputs the modified text. +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ + PREFIX="/usr" \ + HOST="$(GNU_TARGET_NAME)" \ + +define Package/sed/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sed $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,sed)) diff --git a/utils/setpwc/Makefile b/utils/setpwc/Makefile new file mode 100644 index 0000000..f19e45e --- /dev/null +++ b/utils/setpwc/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=setpwc +PKG_VERSION:=1.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://www.vanheusden.com/setpwc/ +PKG_MD5SUM:=1bc721cdfcbac24027e2afc93685d29f + +include $(INCLUDE_DIR)/package.mk + +define Package/setpwc + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Philips (and compatibles) WebCams (PWC) control utility + URL:=http://www.vanheusden.com/setpwc/ +endef + +define Package/setpwc/description + With setpwc you can set and list various settings of Philips (and + compatibles) WebCams with the 'PWC chipset'. +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -DVERSION=\"$(PKG_VERSION)\" -o $(PKG_BUILD_DIR)/setpwc $(PKG_BUILD_DIR)/setpwc.c +endef + +define Package/setpwc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/setpwc $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,setpwc)) diff --git a/utils/setserial/Makefile b/utils/setserial/Makefile new file mode 100644 index 0000000..c529f1f --- /dev/null +++ b/utils/setserial/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006-2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=setserial +PKG_VERSION:=2.17 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/setserial +PKG_MD5SUM:=c4867d72c41564318e0107745eb7a0f2 + +include $(INCLUDE_DIR)/package.mk + +define Package/setserial + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Serial port configuration utility + URL:=http://setserial.sourceforge.net/ + SUBMENU:=Terminal +endef + +define Package/setserial/description + setserial is a program designed to set and/or report the + configuration information associated with a serial port. This + information includes what I/O port and IRQ a particular + serial port is using, and whether or not the break key should + be interpreted as the Secure Attention Key, and so on. +endef + +# uses GNU configure + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + setserial +endef + +define Package/setserial/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/setserial $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/serial.init $(1)/etc/init.d/setserial +endef + +$(eval $(call BuildPackage,setserial)) diff --git a/utils/setserial/files/serial.init b/utils/setserial/files/serial.init new file mode 100644 index 0000000..f9cd0e8 --- /dev/null +++ b/utils/setserial/files/serial.init @@ -0,0 +1,7 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=15 +boot() { + /usr/sbin/setserial /dev/tts/1 irq 3 +} diff --git a/utils/setserial/patches/100-compile-fixes.patch b/utils/setserial/patches/100-compile-fixes.patch new file mode 100644 index 0000000..4adc7cb --- /dev/null +++ b/utils/setserial/patches/100-compile-fixes.patch @@ -0,0 +1,70 @@ +Index: setserial-2.17/setserial.c +=================================================================== +--- setserial-2.17.orig/setserial.c 2010-10-24 11:21:21.000000000 +0200 ++++ setserial-2.17/setserial.c 2010-10-24 11:26:55.000000000 +0200 +@@ -15,14 +15,19 @@ + #include + #include + #include ++#include ++ ++#include + + #ifdef HAVE_ASM_IOCTLS_H + #include + #endif + #ifdef HAVE_LINUX_HAYESESP_H + #include ++#ifdef TIOCGHAYESESP ++#define HAVE_HAYESESP ++#endif + #endif +-#include + + #include "version.h" + +@@ -118,7 +123,7 @@ + CMD_CONFIG, "autoconfigure",0, 0, 0, 0, + CMD_GETMULTI, "get_multiport",0, 0, 0, 0, + CMD_SETMULTI, "set_multiport",0, 0, 0, 0, +-#ifdef TIOCGHAYESESP ++#ifdef HAVE_HAYESESP + CMD_RX_TRIG, "rx_trigger", 0, 0, 0, FLAG_NEED_ARG, + CMD_TX_TRIG, "tx_trigger", 0, 0, 0, FLAG_NEED_ARG, + CMD_FLOW_OFF, "flow_off", 0, 0, 0, FLAG_NEED_ARG, +@@ -356,7 +361,7 @@ + } + #endif + +-#ifdef TIOCGHAYESESP ++#ifdef HAVE_HAYESESP + void print_hayesesp(int fd) + { + struct hayes_esp_config esp; +@@ -453,7 +458,7 @@ + print_flags(&serinfo, "\tFlags: ", ""); + printf("\n\n"); + +-#ifdef TIOCGHAYESESP ++#ifdef HAVE_HAYESESP + print_hayesesp(fd); + #endif + } else if (verbosity==0) { +@@ -593,7 +598,7 @@ + } + set_multiport(device, fd, &arg); + break; +-#ifdef TIOCGHAYESESP ++#ifdef HAVE_HAYESESP + case CMD_RX_TRIG: + case CMD_TX_TRIG: + case CMD_FLOW_OFF: +@@ -692,7 +697,7 @@ + fprintf(stderr, "\t get_multiport\tDisplay the multiport configuration\n"); + fprintf(stderr, "\t set_multiport\tSet the multiport configuration\n"); + fprintf(stderr, "\n"); +-#ifdef TIOCGHAYESESP ++#ifdef HAVE_HAYESESP + fprintf(stderr, "\t* rx_trigger\tSet RX trigger level (ESP-only)\n"); + fprintf(stderr, "\t* tx_trigger\tSet TX trigger level (ESP-only)\n"); + fprintf(stderr, "\t* flow_off\tSet hardware flow off level (ESP-only)\n"); diff --git a/utils/sg3-utils/Makefile b/utils/sg3-utils/Makefile new file mode 100644 index 0000000..2f640ce --- /dev/null +++ b/utils/sg3-utils/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sg3-utils +PKG_VERSION:=1.24 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz +PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/s/$(PKG_NAME) +PKG_MD5SUM:=9e1b8811b013d8f97d8ea2e0942cebad + +include $(INCLUDE_DIR)/package.mk + +define Package/sg3-utils + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+kmod-usb-storage + TITLE:=sg3 scsi utilities + URL:=http://sg.danny.cz/sg/sg3_utils.html +endef + +define Package/sg3-utils/description + The package includes a number of utilities to allow a user + to use the sg interface to find out low-level information + about any SCSI device. +endef + +define Build/Configure +endef + + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) -f no_lib/Makefile.linux_static \ + DESTDIR=$(STAGING_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -DSG3_UTILS_LINUX" \ + sg_start +endef + + +define Package/sg3-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sg_start $(1)/usr/bin +endef + + +$(eval $(call BuildPackage,sg3-utils)) diff --git a/utils/shadow/Makefile b/utils/shadow/Makefile new file mode 100644 index 0000000..2986312 --- /dev/null +++ b/utils/shadow/Makefile @@ -0,0 +1,73 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=shadow +PKG_VERSION:=4.0.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://ftp.pld-linux.org/software/shadow +PKG_MD5SUM:=4fa404ebb4e29828232b3c9a2abddefd + +PKG_FIXUP:=libtool + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +UTILS := \ + groupadd groupdel groupmod useradd userdel usermod + +define Package/shadow + SECTION:=utils + CATEGORY:=Utilities + TITLE:=The PLD Linux shadow utilities + URL:=http://ftp.pld-linux.org/software/shadow/ + DEPENDS:=$(foreach u,$(UTILS),+shadow-$(u)) +endef + +define Package/shadow/description + Full versions of standard shadow utilities. Normally, you would not + use this package, since the functionality in BusyBox is more than + sufficient and much smaller. +endef + +define Package/shadow/install + true +endef + + +define program + define Package/shadow-$(1) + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Utility $(1) from the PLD Linux shadow utilities + URL:=http://ftp.pld-linux.org/software/shadow/ + endef + + define Package/shadow-$(1)/description + Full version of standard $(1) utility. Normally, you would not use this + package, since the functionality in BusyBox is more than sufficient. + endef + + define Package/shadow-$(1)/install + [ -x "$(PKG_INSTALL_DIR)/usr/sbin/$(1)" ] && { \ + $(INSTALL_DIR) $$(1)/usr/sbin; \ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/$(1) $$(1)/usr/sbin/; \ + } || { \ + $(INSTALL_DIR) $$(1)/usr/bin; \ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/; \ + } + endef + + $$(eval $$(call BuildPackage,shadow-$(1))) +endef + +$(eval $(call BuildPackage,shadow)) +$(foreach u,$(UTILS),$(eval $(call program,$(u)))) diff --git a/utils/shadow/patches/001-cross-compile.patch b/utils/shadow/patches/001-cross-compile.patch new file mode 100644 index 0000000..8613976 --- /dev/null +++ b/utils/shadow/patches/001-cross-compile.patch @@ -0,0 +1,131 @@ +--- a/configure.in ++++ b/configure.in +@@ -135,67 +135,26 @@ ac_cv_libc_shadowgrp=yes,ac_cv_libc_shad + if test "$ac_cv_libc_shadowgrp" = "yes"; then + AC_DEFINE(HAVE_SHADOWGRP) + fi +-fi + +-AC_MSG_CHECKING(location of shared mail directory) +-for maildir in /var/spool/mail /var/mail /usr/spool/mail /usr/mail NONE; do +- if test "$maildir" = "NONE"; then +- AC_MSG_RESULT(None) +- elif test -d $maildir; then +- AC_DEFINE_UNQUOTED(MAIL_SPOOL_DIR, "$maildir") +- AC_MSG_RESULT($maildir) +- break +- fi +-done +- +-AC_MSG_CHECKING(location of user mail file) +-for mailfile in Mailbox mailbox Mail mail .mail NONE; do +- if test "$mailfile" = "NONE"; then +- AC_MSG_RESULT(None) +- elif test -f $HOME/$mailfile; then +- AC_DEFINE_UNQUOTED(MAIL_SPOOL_FILE, "$mailfile") +- AC_MSG_RESULT($mailfile) +- break +- fi +-done +- +-AC_MSG_CHECKING(location of utmp) +-for utmpdir in /var/run /var/adm /usr/adm /etc NONE; do +- if test "$utmpdir" = "NONE"; then +- AC_MSG_WARN(utmp file not found) +- elif test -f $utmpdir/utmp; then +- AC_DEFINE_UNQUOTED(_UTMP_FILE, "$utmpdir/utmp") +- AC_MSG_RESULT($utmpdir) +- break +- fi +-done +- +-AC_MSG_CHECKING(location of faillog/lastlog/wtmp) +-for logdir in /var/log /var/adm /usr/adm /etc; do +- if test -d $logdir; then +- AC_DEFINE_UNQUOTED(_WTMP_FILE, "$logdir/wtmp") +- AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$logdir/lastlog") +- AC_DEFINE_UNQUOTED(FAILLOG_FILE, "$logdir/faillog") +- AC_MSG_RESULT($logdir) +- break +- fi +-done +- +-AC_MSG_CHECKING(location of the passwd program) +-if test -f /usr/bin/passwd; then +- passwd_dir=/usr/bin +-else +- passwd_dir=/bin ++AC_CACHE_CHECK(for shadow password support, ++ac_cv_shadow_support, AC_TRY_COMPILE([#include ], ++[ struct spwd *spw = getspnam("root"); ], ++ac_cv_shadow_support=yes, ac_cv_shadow_support=no)) ++ ++if test "$ac_cv_shadow_support" = "yes"; then ++ AC_DEFINE(SHADOWPWD) ++fi + fi +-AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$passwd_dir/passwd") +-AC_MSG_RESULT($passwd_dir) + + dnl XXX - quick hack, should disappear before anyone notices :). +-AC_DEFINE(SHADOWPWD) + AC_DEFINE(USG) + AC_DEFINE(USE_SYSLOG) + AC_DEFINE(RLOGIN) + AC_DEFINE(RUSEROK, 0) ++AC_DEFINE_UNQUOTED(_WTMP_FILE, "/var/log/wtmp") ++AC_DEFINE_UNQUOTED(LASTLOG_FILE, "/var/log/lastlog") ++AC_DEFINE_UNQUOTED(FAILLOG_FILE, "/var/log/faillog") ++AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "/usr/bin/passwd") + + dnl Use our own version of getpass(), which handles long passwords + dnl (unlike many systems which have a limit of 8 characters), and can +@@ -282,25 +241,8 @@ else + AC_MSG_RESULT(yes) + fi + +-ALL_LINGUAS="cs de el fr ja ko pl sv uk" +-AM_GNU_GETTEXT +- + AC_OUTPUT([ + Makefile +- intl/Makefile +- po/Makefile.in +- doc/Makefile +- man/Makefile +- man/cs/Makefile +- man/de/Makefile +- man/fr/Makefile +- man/hu/Makefile +- man/id/Makefile +- man/it/Makefile +- man/ja/Makefile +- man/ko/Makefile +- man/pl/Makefile +- man/pt_BR/Makefile + libmisc/Makefile + lib/Makefile + src/Makefile +--- a/Makefile.in ++++ b/Makefile.in +@@ -111,8 +111,8 @@ EXTRA_DIST = NEWS README TODO shadow.spe + + AUTOMAKE_OPTIONS = 1.5 dist-bzip2 foreign + +-SUBDIRS = intl po man libmisc lib src \ +- contrib debian doc etc ++SUBDIRS = libmisc lib src \ ++ contrib debian etc + + subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +--- a/Makefile.am ++++ b/Makefile.am +@@ -4,5 +4,5 @@ EXTRA_DIST = NEWS README TODO shadow.spe + + AUTOMAKE_OPTIONS = 1.5 dist-bzip2 foreign + +-SUBDIRS = intl po man libmisc lib src \ +- contrib debian doc etc ++SUBDIRS = libmisc lib src \ ++ contrib debian etc diff --git a/utils/shadow/patches/002-fix-malloc-prototype.patch b/utils/shadow/patches/002-fix-malloc-prototype.patch new file mode 100644 index 0000000..637e86d --- /dev/null +++ b/utils/shadow/patches/002-fix-malloc-prototype.patch @@ -0,0 +1,11 @@ +--- a/libmisc/xmalloc.c ++++ b/libmisc/xmalloc.c +@@ -16,7 +16,7 @@ RCSID("$Id: xmalloc.c,v 1.3 1998/12/28 2 + + #include "defines.h" + +-extern char *malloc(); ++extern void *malloc(size_t size); + + char * + xmalloc(size_t size) diff --git a/utils/shadow/patches/003-disable-nis-lookup.patch b/utils/shadow/patches/003-disable-nis-lookup.patch new file mode 100644 index 0000000..1383e0e --- /dev/null +++ b/utils/shadow/patches/003-disable-nis-lookup.patch @@ -0,0 +1,41 @@ +--- a/libmisc/login_access.c ++++ b/libmisc/login_access.c +@@ -53,7 +53,6 @@ RCSID("$Id: login_access.c,v 1.6 1998/01 + #include /* for inet_ntoa() */ + + extern struct group *getgrnam(); +-extern int innetgr(); + #if 0 /* should be defined by */ + extern int errno; + #endif +@@ -193,29 +192,7 @@ myhostname(void) + static int + netgroup_match(const char *group, const char *machine, const char *user) + { +-#if 0 /* original code */ +-#ifdef NIS +- static char *mydomain = 0; +- +- if (mydomain == 0) +- yp_get_default_domain(&mydomain); +- return (innetgr(group, machine, user, mydomain)); +-#else +- syslog(LOG_ERR, "NIS netgroup support not configured"); +- return (NO); +-#endif +-#else /* works better with glibc? */ +- static char *mydomain = 0; +- +- if (mydomain == 0) { +- static char domain[MAXHOSTNAMELEN+1]; +- +- getdomainname(domain, MAXHOSTNAMELEN); +- mydomain = domain; +- } +- +- return innetgr(group, machine, user, mydomain); +-#endif ++ return (NO); + } + + /* user_match - match a username against one token */ diff --git a/utils/shadow/patches/004-disable-ruser-lookup.patch b/utils/shadow/patches/004-disable-ruser-lookup.patch new file mode 100644 index 0000000..a59034c --- /dev/null +++ b/utils/shadow/patches/004-disable-ruser-lookup.patch @@ -0,0 +1,21 @@ +--- a/configure ++++ b/configure +@@ -9192,7 +9192,7 @@ cat >>confdefs.h <<\EOF + EOF + + cat >>confdefs.h <<\EOF +-#define RUSEROK 0 ++/* #define RUSEROK 1 */ + EOF + + cat >>confdefs.h <<\EOF +--- a/configure.in ++++ b/configure.in +@@ -150,7 +150,6 @@ dnl XXX - quick hack, should disappear b + AC_DEFINE(USG) + AC_DEFINE(USE_SYSLOG) + AC_DEFINE(RLOGIN) +-AC_DEFINE(RUSEROK, 0) + AC_DEFINE_UNQUOTED(_WTMP_FILE, "/var/log/wtmp") + AC_DEFINE_UNQUOTED(LASTLOG_FILE, "/var/log/lastlog") + AC_DEFINE_UNQUOTED(FAILLOG_FILE, "/var/log/faillog") diff --git a/utils/sierra-pcmcia/Makefile b/utils/sierra-pcmcia/Makefile new file mode 100644 index 0000000..e6c1e16 --- /dev/null +++ b/utils/sierra-pcmcia/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=sierra-pcmcia +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=http://www.sierrawireless.com/resources/faq/PC_Card/AirCard850_860/ +PKG_SOURCE:=Aircard_Linux.tar +PKG_MD5SUM:=9562b626d958ea02d737feb6a85f0920 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/pcmcia-serial-sierra + SUBMENU:=Other modules + TITLE:=Sierra AirCard PCMCIA support + DEPENDS:=kmod-pcmcia-serial @!LINUX_2_4 + URL:=http://www.sierrawireless.com/faq/ShowFAQ.aspx?ID=118 +endef + +define KernelPackage/pcmcia-serial-sierra/description + Support files for the Sierra AirCard 555, 7xx, and 8x0 +endef + +define Build/Compile +endef + +define Package/kmod-pcmcia-serial-sierra/install + $(INSTALL_DIR) $(1)/lib/firmware + $(INSTALL_DATA) $(PKG_BUILD_DIR)/../Aircard_Linux/*.cis $(1)/lib/firmware/ +endef + +$(eval $(call KernelPackage,pcmcia-serial-sierra)) diff --git a/utils/sispmctl/Makefile b/utils/sispmctl/Makefile new file mode 100644 index 0000000..a6d53af --- /dev/null +++ b/utils/sispmctl/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sispmctl +PKG_VERSION:=2.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=2457f76cd129f880634f3381be0aeb76 + +include $(INCLUDE_DIR)/package.mk + +define Package/sispmctl + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Silver Shield PM Control for Linux + URL:=http://sispmctl.sourceforge.net/ + DEPENDS:=+libusb +endef + +define Package/sispmctl/description + The sispmctl tool can control Gembird SIS-PM Silver Shield + programmable power outlet strips (also known under the name + Revolt Intelli-Plug) from the command line. + . + It can be used to switch on or off any of the programmable + power sockets of the SIS-PM via USB. It can also show the + current status of each power socket, and it can handle + multiple SIS-PM devices, too. +endef + +CONFIGURE_ARGS += \ + --enable-webless \ + --disable-dependency-tracking \ + +define Package/sispmctl/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,sispmctl)) diff --git a/utils/smartmontools/Makefile b/utils/smartmontools/Makefile new file mode 100644 index 0000000..9220aea --- /dev/null +++ b/utils/smartmontools/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=smartmontools +PKG_VERSION:=5.40 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/smartmontools +PKG_MD5SUM:=0f0be0239914ad87830a4fff594bda5b + +include $(INCLUDE_DIR)/package.mk + +define Package/smartmontools + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+uclibcxx + TITLE:=S.M.A.R.T Monitoring Tool + URL:=http://smartmontools.sourceforge.net/ +endef + +define Package/smartmontools/description + smartmontools contains utility programs (smartctl, smartd) to + control/monitor storage systems using the Self-Monitoring, Analysis + and Reporting Technology System (S.M.A.R.T.) built into most modern + ATA and SCSI disks. It is derived from smartsuite. +endef + +# uses GNU configure + +CONFIGURE_VARS += \ + CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \ + LDFLAGS="$$$$LDFLAGS" \ + LIBS="-nodefaultlibs -luClibc++ -lm $(LIBGCC_S) -lc" \ + +define Build/Configure + (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ + ./autogen.sh \ + ); + $(call Build/Configure/Default) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + LD="$(TARGET_CXX)" +endef + +define Package/smartmontools/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/smartd.conf $(1)/etc + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd +endef + +$(eval $(call BuildPackage,smartmontools)) diff --git a/utils/smartmontools/files/smartd.conf b/utils/smartmontools/files/smartd.conf new file mode 100644 index 0000000..0740fcf --- /dev/null +++ b/utils/smartmontools/files/smartd.conf @@ -0,0 +1 @@ +/dev/hdb -H diff --git a/utils/smartmontools/files/smartd.init b/utils/smartmontools/files/smartd.init new file mode 100644 index 0000000..0e8d571 --- /dev/null +++ b/utils/smartmontools/files/smartd.init @@ -0,0 +1,28 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=95 +start() { + [ -f /etc/smartd.conf ] || { + echo "/etc/smartd.conf does not exist !"; + exit 0; + }; + [ -d /var/run ] || mkdir -p /var/run + [ -x /usr/sbin/smartd ] && /usr/sbin/smartd -q never -p /var/run/smartd.pid +} + +stop() { + killall smartd +} + +restart() { + stop + sleep 1 + start +} + +reload() { + kill -HUP `cat /var/run/smartd.pid` &>/dev/null +} + + diff --git a/utils/ssldump/Makefile b/utils/ssldump/Makefile new file mode 100644 index 0000000..4700e11 --- /dev/null +++ b/utils/ssldump/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ssldump +PKG_VERSION:=0.9b3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.rtfm.com/ssldump/ +PKG_MD5SUM:=ac8c28fe87508d6bfb06344ec496b1dd + +include $(INCLUDE_DIR)/package.mk + +define Package/ssldump + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libopenssl +libpcap + TITLE:=a SSLv3/TLS network protocol analyzer + URL:=http://www.rtfm.com/ssldump/ +endef + +define Package/ssldump/description + ssldump is an SSLv3/TLS network protocol analyzer. It identifies TCP connections on the chosen network interface + and attempts to interpret them as SSLv3/TLS traffic. When it identifies SSLv3/TLS traffic, it decodes the records + and displays them in a textual form to stdout. If provided with the appropriate keying material, it will also decrypt + the connections and display the application data traffic. +endef + +CONFIGURE_ARGS += \ + --enable-static \ + --enable-shared \ + --with-openssl-inc="$(STAGING_DIR)/usr/include" \ + --with-openssl-lib="$(STAGING_DIR)/usr/lib" \ + --with-pcap-inc="$(STAGING_DIR)/usr/include" \ + --with-pcap-lib="$(STAGING_DIR)/usr/lib" \ + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all +endef + + +define Package/ssldump/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ssldump $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,ssldump)) diff --git a/utils/ssldump/patches/001-missing_headers.patch b/utils/ssldump/patches/001-missing_headers.patch new file mode 100644 index 0000000..70ac11c --- /dev/null +++ b/utils/ssldump/patches/001-missing_headers.patch @@ -0,0 +1,23 @@ +diff -urN ssldump-0.9b3/base/pcap-snoop.c ssldump-0.9b3.new/base/pcap-snoop.c +--- ssldump-0.9b3/base/pcap-snoop.c 2002-09-09 23:02:58.000000000 +0200 ++++ ssldump-0.9b3.new/base/pcap-snoop.c 2008-12-14 18:43:48.000000000 +0100 +@@ -49,7 +49,7 @@ + + #include + #include +-#include ++#include + #ifndef _WIN32 + #include + #endif +diff -urN ssldump-0.9b3/ssl/ssldecode.c ssldump-0.9b3.new/ssl/ssldecode.c +--- ssldump-0.9b3/ssl/ssldecode.c 2002-08-17 03:33:17.000000000 +0200 ++++ ssldump-0.9b3.new/ssl/ssldecode.c 2008-12-14 18:44:11.000000000 +0100 +@@ -52,6 +52,7 @@ + #include + #include + #include ++#include + #endif + #include "ssldecode.h" + #include "ssl_rec.h" diff --git a/utils/strace/Makefile b/utils/strace/Makefile new file mode 100644 index 0000000..35f714f --- /dev/null +++ b/utils/strace/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=strace + +ifeq ($(CONFIG_LINUX_2_6_25),y) + PKG_VERSION:=4.5.16 + PKG_RELEASE:=3 + PKG_MD5SUM:=77f66d09aa82981bb6d65fa19a2c1ba9 + PATCH_DIR:=patches-4.5.16 +else + PKG_VERSION:=4.5.20 + PKG_RELEASE:=1 + PKG_MD5SUM:=64dfe10d9db0c1e34030891695ffca4b +endif + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/$(PKG_NAME) + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/strace + SECTION:=utils + CATEGORY:=Utilities + TITLE:=System call tracer + URL:=http://strace.sourceforge.net/ +endef + +define Package/strace/description +A useful diagnostic, instructional, and debugging tool. Allows you to track what +system calls a program makes while it is running. +endef + +# needed when compiling against Linux 2.4 +CONFIGURE_VARS += \ + ac_cv_header_linux_netlink_h=yes + +ifneq ($(CONFIG_EXTERNAL_TOOLCHAIN),) + TARGET_CPPFLAGS += -I$(LINUX_DIR)/include +endif + +MAKE_FLAGS := \ + CCOPT="$(TARGET_CFLAGS)" + +define Package/strace/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/strace $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,strace)) diff --git a/utils/strace/patches-4.5.16/001-arm_eabi_syscalls.patch b/utils/strace/patches-4.5.16/001-arm_eabi_syscalls.patch new file mode 100644 index 0000000..52234c5 --- /dev/null +++ b/utils/strace/patches-4.5.16/001-arm_eabi_syscalls.patch @@ -0,0 +1,64 @@ +Index: strace-4.5.16/linux/syscallent.h +=================================================================== +--- strace-4.5.16.orig/linux/syscallent.h 2007-08-02 03:37:55.000000000 +0200 ++++ strace-4.5.16/linux/syscallent.h 2008-05-11 15:35:45.000000000 +0200 +@@ -130,7 +130,10 @@ + { 2, TF, sys_statfs, "statfs" }, /* 99 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ + { 3, 0, sys_ioperm, "ioperm" }, /* 101 */ +- { 2, TD, sys_socketcall, "socketcall", SYS_socketcall }, /* 102 */ ++ { 2, TD, sys_socketcall, "socketcall", ++#ifdef __NR_socketcall ++ SYS_socketcall }, /* 102 */ ++#endif + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ +@@ -145,7 +148,10 @@ + { 4, TP, sys_wait4, "wait4", SYS_wait4 }, /* 114 */ + { 1, 0, sys_swapoff, "swapoff" }, /* 115 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ +- { 6, 0, sys_ipc, "ipc", SYS_ipc }, /* 117 */ ++ { 6, 0, sys_ipc, "ipc", ++#ifdef __NR_ipc ++ SYS_ipc }, /* 117 */ ++#endif + { 1, TD, sys_fsync, "fsync" }, /* 118 */ + { 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */ + { 5, TP, sys_clone, "clone", SYS_clone }, /* 120 */ +@@ -282,7 +288,11 @@ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */ + { 5, 0, sys_fadvise64, "fadvise64" }, /* 250 */ + { 5, 0, printargs, "SYS_251" }, /* 251 */ +- { 1, TP, sys_exit, "exit_group", __NR_exit_group }, /* 252 */ ++ { 1, TP, sys_exit, "exit_group" ++#ifdef __NR_exit_group ++ , __NR_exit_group ++#endif ++ }, /* 252 */ + { 4, 0, printargs, "lookup_dcookie"}, /* 253 */ + { 1, 0, sys_epoll_create, "epoll_create" }, /* 254 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 255 */ +Index: strace-4.5.16/syscall.c +=================================================================== +--- strace-4.5.16.orig/syscall.c 2006-12-21 23:13:33.000000000 +0100 ++++ strace-4.5.16/syscall.c 2008-05-11 15:35:45.000000000 +0200 +@@ -2383,14 +2383,18 @@ + switch (known_scno(tcp)) { + #ifdef LINUX + #if !defined (ALPHA) && !defined(SPARC) && !defined(SPARC64) && !defined(MIPS) && !defined(HPPA) ++#ifdef __NR_socketcall + case SYS_socketcall: + decode_subcall(tcp, SYS_socket_subcall, + SYS_socket_nsubcalls, deref_style); + break; ++#endif ++#ifdef __NR_ipc + case SYS_ipc: + decode_subcall(tcp, SYS_ipc_subcall, + SYS_ipc_nsubcalls, shift_style); + break; ++#endif + #endif /* !ALPHA && !MIPS && !SPARC && !SPARC64 && !HPPA */ + #if defined (SPARC) || defined (SPARC64) + case SYS_socketcall: diff --git a/utils/strace/patches-4.5.16/002-arm_bad_syscall.patch b/utils/strace/patches-4.5.16/002-arm_bad_syscall.patch new file mode 100644 index 0000000..4eb8a73 --- /dev/null +++ b/utils/strace/patches-4.5.16/002-arm_bad_syscall.patch @@ -0,0 +1,20 @@ +Index: strace-4.5.16/syscall.c +=================================================================== +--- strace-4.5.16.orig/syscall.c 2008-05-11 15:35:45.000000000 +0200 ++++ strace-4.5.16/syscall.c 2008-05-11 15:36:09.000000000 +0200 +@@ -1045,6 +1045,15 @@ + /* + * Note: we only deal with only 32-bit CPUs here. + */ ++ ++ if (!(tcp->flags & TCB_INSYSCALL) && ++ (tcp->flags & TCB_WAITEXECVE)) { ++ /* caught a fake syscall from the execve's exit */ ++ tcp->flags &= ~TCB_WAITEXECVE; ++ return 0; ++ } ++ ++ + if (regs.ARM_cpsr & 0x20) { + /* + * Get the Thumb-mode system call number diff --git a/utils/strace/patches-4.5.16/003-avr32_support.patch b/utils/strace/patches-4.5.16/003-avr32_support.patch new file mode 100644 index 0000000..79d9add --- /dev/null +++ b/utils/strace/patches-4.5.16/003-avr32_support.patch @@ -0,0 +1,2080 @@ +--- strace-4.5.16/configure 2008-05-11 15:51:53.000000000 +0200 ++++ strace-4.5.16/configure 2008-05-11 15:54:52.000000000 +0200 +@@ -2531,6 +2531,14 @@ + _ACEOF + + ;; ++avr32*) ++ arch=avr32 ++ ++cat >>confdefs.h <<\_ACEOF ++#define AVR32 1 ++_ACEOF ++ ++ ;; + *) + { echo "$as_me:$LINENO: result: NO!" >&5 + echo "${ECHO_T}NO!" >&6; } +Index: strace-4.5.16/config.h.in +=================================================================== +--- strace-4.5.16.orig/config.h.in 2007-08-03 12:24:53.000000000 +0200 ++++ strace-4.5.16/config.h.in 2008-05-11 15:36:30.000000000 +0200 +@@ -6,6 +6,9 @@ + /* Define for the ARM architecture. */ + #undef ARM + ++/* Define for the AVR32 architecture. */ ++#undef AVR32 ++ + /* Define for the FreeBSD operating system. */ + #undef FREEBSD + +Index: strace-4.5.16/config.sub +=================================================================== +--- strace-4.5.16.orig/config.sub 2005-02-02 05:18:19.000000000 +0100 ++++ strace-4.5.16/config.sub 2008-05-11 15:38:53.000000000 +0200 +@@ -230,7 +230,7 @@ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ ++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ +@@ -297,7 +297,7 @@ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ +- | avr-* \ ++ | avr-* | avr32-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ +Index: strace-4.5.16/configure.ac +=================================================================== +--- strace-4.5.16.orig/configure.ac 2007-08-03 12:06:42.000000000 +0200 ++++ strace-4.5.16/configure.ac 2008-05-11 15:36:30.000000000 +0200 +@@ -103,6 +103,10 @@ + arch=x86_64 + AC_DEFINE([X86_64], 1, [Define for the AMD x86-64 architecture.]) + ;; ++avr32*) ++ arch=avr32 ++ AC_DEFINE([AVR32], 1, [Define for the AVR32 architecture.]) ++ ;; + *) + AC_MSG_RESULT([NO!]) + AC_MSG_ERROR([architecture $host_cpu is not supported by strace]) +Index: strace-4.5.16/defs.h +=================================================================== +--- strace-4.5.16.orig/defs.h 2007-07-24 03:57:11.000000000 +0200 ++++ strace-4.5.16/defs.h 2008-05-11 15:36:30.000000000 +0200 +@@ -94,6 +94,9 @@ + # if defined(X86_64) + # define LINUX_X86_64 + # endif ++# if defined(AVR32) ++# define LINUX_AVR32 ++# endif + #endif + + #if defined(SVR4) || defined(FREEBSD) +@@ -120,7 +123,7 @@ + #include + #endif /* FREEBSD */ + #else /* !USE_PROCFS */ +-#if (defined(LINUXSPARC) || defined (LINUX_X86_64)) && defined(__GLIBC__) ++#if (defined(LINUXSPARC) || defined (LINUX_X86_64) || defined (LINUX_AVR32)) && defined(__GLIBC__) + #include + #else + /* Work around awkward prototype in ptrace.h. */ +@@ -327,7 +330,7 @@ + #define TCB_FOLLOWFORK 00400 /* Process should have forks followed */ + #define TCB_REPRINT 01000 /* We should reprint this syscall on exit */ + #ifdef LINUX +-# if defined(ALPHA) || defined(SPARC) || defined(SPARC64) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) || defined(ARM) ++# if defined(ALPHA) || defined(SPARC) || defined(SPARC64) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) || defined(ARM) || defined(AVR32) + # define TCB_WAITEXECVE 02000 /* ignore SIGTRAP after exceve */ + # endif + # define TCB_CLONE_DETACHED 04000 /* CLONE_DETACHED set in creating syscall */ +Index: strace-4.5.16/linux/avr32/ioctlent.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ strace-4.5.16/linux/avr32/ioctlent.h 2008-05-11 15:36:30.000000000 +0200 +@@ -0,0 +1,1268 @@ ++{"linux/fs.h", "FIBMAP", 0x1}, ++{"linux/fs.h", "FIGETBSZ", 0x2}, ++{"linux/fd.h", "FDCLRPRM", 0x241}, ++{"linux/fd.h", "FDMSGON", 0x245}, ++{"linux/fd.h", "FDMSGOFF", 0x246}, ++{"linux/fd.h", "FDFMTBEG", 0x247}, ++{"linux/fd.h", "FDFMTEND", 0x249}, ++{"linux/fd.h", "FDSETEMSGTRESH", 0x24a}, ++{"linux/fd.h", "FDFLUSH", 0x24b}, ++{"linux/fd.h", "FDRESET", 0x254}, ++{"linux/fd.h", "FDWERRORCLR", 0x256}, ++{"linux/fd.h", "FDRAWCMD", 0x258}, ++{"linux/fd.h", "FDTWADDLE", 0x259}, ++{"linux/fd.h", "FDEJECT", 0x25a}, ++{"linux/wireless.h", "IW_POWER_ALL_R", 0x300}, ++{"linux/in6.h", "IPV6_PRIORITY_RESERVED1", 0x300}, ++{"linux/apm_bios.h", "APM_DEVICE_PARALLEL", 0x300}, ++{"linux/hdreg.h", "HDIO_GETGEO", 0x301}, ++{"linux/ps2esdi.h", "HDIO_GETGEO", 0x301}, ++{"linux/hdreg.h", "HDIO_GET_UNMASKINTR", 0x302}, ++{"linux/hdreg.h", "HDIO_GET_MULTCOUNT", 0x304}, ++{"linux/hdreg.h", "HDIO_GET_QDMA", 0x305}, ++{"linux/hdreg.h", "HDIO_SET_XFER", 0x306}, ++{"linux/hdreg.h", "HDIO_OBSOLETE_IDENTITY", 0x307}, ++{"linux/hdreg.h", "HDIO_GET_KEEPSETTINGS", 0x308}, ++{"linux/hdreg.h", "HDIO_GET_32BIT", 0x309}, ++{"linux/hdreg.h", "HDIO_GET_NOWERR", 0x30a}, ++{"linux/hdreg.h", "HDIO_GET_DMA", 0x30b}, ++{"linux/hdreg.h", "HDIO_GET_NICE", 0x30c}, ++{"linux/hdreg.h", "HDIO_GET_IDENTITY", 0x30d}, ++{"linux/hdreg.h", "HDIO_GET_WCACHE", 0x30e}, ++{"linux/hdreg.h", "HDIO_GET_ACOUSTIC", 0x30f}, ++{"linux/hdreg.h", "HDIO_GET_ADDRESS", 0x310}, ++{"linux/hdreg.h", "HDIO_GET_BUSSTATE", 0x31a}, ++{"linux/hdreg.h", "HDIO_TRISTATE_HWIF", 0x31b}, ++{"linux/hdreg.h", "HDIO_DRIVE_RESET", 0x31c}, ++{"linux/hdreg.h", "HDIO_DRIVE_TASKFILE", 0x31d}, ++{"linux/hdreg.h", "HDIO_DRIVE_TASK", 0x31e}, ++{"linux/hdreg.h", "HDIO_DRIVE_CMD", 0x31f}, ++{"linux/hdreg.h", "HDIO_SET_MULTCOUNT", 0x321}, ++{"linux/hdreg.h", "HDIO_SET_UNMASKINTR", 0x322}, ++{"linux/hdreg.h", "HDIO_SET_KEEPSETTINGS", 0x323}, ++{"linux/hdreg.h", "HDIO_SET_32BIT", 0x324}, ++{"linux/hdreg.h", "HDIO_SET_NOWERR", 0x325}, ++{"linux/hdreg.h", "HDIO_SET_DMA", 0x326}, ++{"linux/hdreg.h", "HDIO_SET_PIO_MODE", 0x327}, ++{"linux/hdreg.h", "HDIO_SCAN_HWIF", 0x328}, ++{"linux/hdreg.h", "HDIO_SET_NICE", 0x329}, ++{"linux/hdreg.h", "HDIO_UNREGISTER_HWIF", 0x32a}, ++{"linux/hdreg.h", "HDIO_SET_WCACHE", 0x32b}, ++{"linux/hdreg.h", "HDIO_SET_ACOUSTIC", 0x32c}, ++{"linux/hdreg.h", "HDIO_SET_BUSSTATE", 0x32d}, ++{"linux/hdreg.h", "HDIO_SET_QDMA", 0x32e}, ++{"linux/hdreg.h", "HDIO_SET_ADDRESS", 0x32f}, ++{"linux/zorro_ids.h", "ZORRO_MANUF_CARDCO_1", 0x3ec}, ++{"linux/zorro_ids.h", "ZORRO_MANUF_A_SQUARED", 0x3ed}, ++{"linux/zorro_ids.h", "ZORRO_MANUF_COMSPEC_COMMUNICATIONS", 0x3ee}, ++{"linux/zorro_ids.h", "ZORRO_MANUF_ANAKIN_RESEARCH", 0x3f1}, ++{"linux/zorro_ids.h", "ZORRO_MANUF_MICROBOTICS", 0x3f2}, ++{"linux/zorro_ids.h", "ZORRO_MANUF_ACCESS_ASSOCIATES_ALEGRA", 0x3f4}, ++{"linux/zorro_ids.h", "ZORRO_MANUF_EXPANSION_TECHNOLOGIES", 0x3f6}, ++{"linux/zorro_ids.h", "ZORRO_MANUF_ASDG", 0x3ff}, ++{"linux/apm_bios.h", "APM_DEVICE_PCMCIA", 0x600}, ++{"linux/ixjuser.h", "MIXER_PORT_CD_L", 0x600}, ++{"linux/in6.h", "IPV6_PRIORITY_INTERACTIVE", 0x600}, ++{"linux/lp.h", "LPCHAR", 0x601}, ++{"linux/lp.h", "LPTIME", 0x602}, ++{"linux/lp.h", "LPABORT", 0x604}, ++{"linux/lp.h", "LPSETIRQ", 0x605}, ++{"linux/lp.h", "LPGETIRQ", 0x606}, ++{"linux/lp.h", "LPWAIT", 0x608}, ++{"linux/lp.h", "LPCAREFUL", 0x609}, ++{"linux/lp.h", "LPABORTOPEN", 0x60a}, ++{"linux/lp.h", "LPGETSTATUS", 0x60b}, ++{"linux/lp.h", "LPRESET", 0x60c}, ++{"linux/lp.h", "LPGETSTATS", 0x60d}, ++{"linux/lp.h", "LPGETFLAGS", 0x60e}, ++{"linux/lp.h", "LPSETTIMEOUT", 0x60f}, ++{"linux/som.h", "SOM_LIB_RELOC", 0x619}, ++{"linux/zorro_ids.h", "ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_1", 0x6e1}, ++{"linux/fs.h", "BLKROSET", 0x125d}, ++{"linux/fs.h", "BLKROGET", 0x125e}, ++{"linux/fs.h", "BLKRRPART", 0x125f}, ++{"linux/fs.h", "BLKGETSIZE", 0x1260}, ++{"linux/fs.h", "BLKFLSBUF", 0x1261}, ++{"linux/fs.h", "BLKRASET", 0x1262}, ++{"linux/fs.h", "BLKRAGET", 0x1263}, ++{"linux/fs.h", "BLKFRASET", 0x1264}, ++{"linux/fs.h", "BLKFRAGET", 0x1265}, ++{"linux/fs.h", "BLKSECTSET", 0x1266}, ++{"linux/fs.h", "BLKSECTGET", 0x1267}, ++{"linux/fs.h", "BLKSSZGET", 0x1268}, ++{"linux/blkpg.h", "BLKPG", 0x1269}, ++{"linux/fs.h", "BLKTRACESTART", 0x1274}, ++{"linux/fs.h", "BLKTRACESTOP", 0x1275}, ++{"linux/fs.h", "BLKTRACETEARDOWN", 0x1276}, ++{"linux/zorro_ids.h", "ZORRO_MANUF_APOLLO_2", 0x2200}, ++{"scsi/sg.h", "SG_SET_TIMEOUT", 0x2201}, ++{"scsi/sg.h", "SG_GET_TIMEOUT", 0x2202}, ++{"scsi/sg.h", "SG_EMULATED_HOST", 0x2203}, ++{"scsi/sg.h", "SG_SET_TRANSFORM", 0x2204}, ++{"scsi/sg.h", "SG_GET_TRANSFORM", 0x2205}, ++{"linux/zorro_ids.h", "ZORRO_MANUF_APOLLO_3", 0x2222}, ++{"scsi/sg.h", "SG_GET_COMMAND_Q", 0x2270}, ++{"scsi/sg.h", "SG_SET_COMMAND_Q", 0x2271}, ++{"scsi/sg.h", "SG_GET_RESERVED_SIZE", 0x2272}, ++{"scsi/sg.h", "SG_SET_RESERVED_SIZE", 0x2275}, ++{"scsi/sg.h", "SG_GET_SCSI_ID", 0x2276}, ++{"scsi/sg.h", "SG_SET_FORCE_LOW_DMA", 0x2279}, ++{"scsi/sg.h", "SG_GET_LOW_DMA", 0x227a}, ++{"scsi/sg.h", "SG_SET_FORCE_PACK_ID", 0x227b}, ++{"scsi/sg.h", "SG_GET_PACK_ID", 0x227c}, ++{"scsi/sg.h", "SG_GET_NUM_WAITING", 0x227d}, ++{"scsi/sg.h", "SG_SET_DEBUG", 0x227e}, ++{"scsi/sg.h", "SG_GET_SG_TABLESIZE", 0x227f}, ++{"scsi/sg.h", "SG_GET_VERSION_NUM", 0x2282}, ++{"scsi/sg.h", "SG_NEXT_CMD_LEN", 0x2283}, ++{"scsi/sg.h", "SG_SCSI_RESET", 0x2284}, ++{"scsi/sg.h", "SG_IO", 0x2285}, ++{"scsi/sg.h", "SG_GET_REQUEST_TABLE", 0x2286}, ++{"scsi/sg.h", "SG_SET_KEEP_ORPHAN", 0x2287}, ++{"scsi/sg.h", "SG_GET_KEEP_ORPHAN", 0x2288}, ++{"linux/apm_bios.h", "APM_IOC_STANDBY", 0x4101}, ++{"linux/agpgart.h", "AGPIOC_ACQUIRE", 0x4101}, ++{"linux/apm_bios.h", "APM_IOC_SUSPEND", 0x4102}, ++{"linux/agpgart.h", "AGPIOC_RELEASE", 0x4102}, ++{"linux/pmu.h", "PMU_IOC_SLEEP", 0x4200}, ++{"linux/cciss_ioctl.h", "CCISS_REVALIDVOLS", 0x420a}, ++{"linux/cciss_ioctl.h", "CCISS_DEREGDISK", 0x420c}, ++{"linux/cciss_ioctl.h", "CCISS_REGNEWD", 0x420e}, ++{"linux/cciss_ioctl.h", "CCISS_RESCANDISK", 0x4210}, ++{"linux/fb.h", "FBIOGET_VSCREENINFO", 0x4600}, ++{"linux/fb.h", "FBIOPUT_VSCREENINFO", 0x4601}, ++{"linux/ps2esdi.h", "CMD_READ", 0x4601}, ++{"linux/fb.h", "FBIOGET_FSCREENINFO", 0x4602}, ++{"linux/ps2esdi.h", "CMD_WRITE", 0x4602}, ++{"linux/fb.h", "FBIOGETCMAP", 0x4604}, ++{"linux/fb.h", "FBIOPUTCMAP", 0x4605}, ++{"linux/fb.h", "FBIOPAN_DISPLAY", 0x4606}, ++{"linux/fb.h", "FBIOGET_CON2FBMAP", 0x460f}, ++{"linux/fb.h", "FBIOPUT_CON2FBMAP", 0x4610}, ++{"linux/fb.h", "FBIOBLANK", 0x4611}, ++{"linux/fb.h", "FBIO_ALLOC", 0x4613}, ++{"linux/fb.h", "FBIO_FREE", 0x4614}, ++{"linux/fb.h", "FBIOGET_GLYPH", 0x4615}, ++{"linux/fb.h", "FBIOGET_HWCINFO", 0x4616}, ++{"linux/fb.h", "FBIOPUT_MODEINFO", 0x4617}, ++{"linux/fb.h", "FBIOGET_DISPINFO", 0x4618}, ++{"linux/arcfb.h", "FBIO_WAITEVENT", 0x4688}, ++{"linux/hiddev.h", "HIDIOCAPPLICATION", 0x4802}, ++{"linux/hiddev.h", "HIDIOCINITREPORT", 0x4805}, ++{"linux/isdn.h", "IIOCNETAIF", 0x4901}, ++{"linux/isdn.h", "IIOCNETDIF", 0x4902}, ++{"linux/isdn.h", "IIOCNETSCF", 0x4903}, ++{"linux/isdn.h", "IIOCNETGCF", 0x4904}, ++{"linux/isdn.h", "IIOCNETANM", 0x4905}, ++{"linux/isdn.h", "IIOCNETDNM", 0x4906}, ++{"linux/isdn.h", "IIOCNETGNM", 0x4907}, ++{"linux/isdn.h", "IIOCGETSET", 0x4908}, ++{"linux/isdn.h", "IIOCSETSET", 0x4909}, ++{"linux/isdn.h", "IIOCSETVER", 0x490a}, ++{"linux/isdn.h", "IIOCNETHUP", 0x490b}, ++{"linux/isdn.h", "IIOCSETGST", 0x490c}, ++{"linux/isdn.h", "IIOCSETBRJ", 0x490d}, ++{"linux/isdn.h", "IIOCSIGPRF", 0x490e}, ++{"linux/isdn.h", "IIOCGETPRF", 0x490f}, ++{"linux/isdn.h", "IIOCSETPRF", 0x4910}, ++{"linux/isdn.h", "IIOCGETMAP", 0x4911}, ++{"linux/isdn.h", "IIOCSETMAP", 0x4912}, ++{"linux/isdn.h", "IIOCNETASL", 0x4913}, ++{"linux/isdn.h", "IIOCNETDIL", 0x4914}, ++{"linux/isdn.h", "IIOCGETCPS", 0x4915}, ++{"linux/isdn.h", "IIOCGETDVR", 0x4916}, ++{"linux/isdn.h", "IIOCNETLCR", 0x4917}, ++{"linux/isdn.h", "IIOCNETDWRSET", 0x4918}, ++{"linux/isdn.h", "IIOCNETALN", 0x4920}, ++{"linux/isdn.h", "IIOCNETDLN", 0x4921}, ++{"linux/isdn.h", "IIOCNETGPN", 0x4922}, ++{"linux/isdn.h", "IIOCDBGVAR", 0x497f}, ++{"linux/isdn.h", "IIOCDRVCTL", 0x4980}, ++{"linux/kd.h", "KIOCSOUND", 0x4b2f}, ++{"linux/kd.h", "KDMKTONE", 0x4b30}, ++{"linux/kd.h", "KDGETLED", 0x4b31}, ++{"linux/kd.h", "KDSETLED", 0x4b32}, ++{"linux/kd.h", "KDGKBTYPE", 0x4b33}, ++{"linux/kd.h", "KDADDIO", 0x4b34}, ++{"linux/kd.h", "KDDELIO", 0x4b35}, ++{"linux/kd.h", "KDENABIO", 0x4b36}, ++{"linux/kd.h", "KDDISABIO", 0x4b37}, ++{"linux/kd.h", "KDSETMODE", 0x4b3a}, ++{"linux/kd.h", "KDGETMODE", 0x4b3b}, ++{"linux/kd.h", "KDMAPDISP", 0x4b3c}, ++{"linux/kd.h", "KDUNMAPDISP", 0x4b3d}, ++{"linux/kd.h", "GIO_SCRNMAP", 0x4b40}, ++{"linux/kd.h", "PIO_SCRNMAP", 0x4b41}, ++{"linux/kd.h", "KDGKBMODE", 0x4b44}, ++{"linux/kd.h", "KDSKBMODE", 0x4b45}, ++{"linux/kd.h", "KDGKBENT", 0x4b46}, ++{"linux/kd.h", "KDSKBENT", 0x4b47}, ++{"linux/kd.h", "KDGKBSENT", 0x4b48}, ++{"linux/kd.h", "KDSKBSENT", 0x4b49}, ++{"linux/kd.h", "KDGKBDIACR", 0x4b4a}, ++{"linux/kd.h", "KDSKBDIACR", 0x4b4b}, ++{"linux/kd.h", "KDGETKEYCODE", 0x4b4c}, ++{"linux/kd.h", "KDSETKEYCODE", 0x4b4d}, ++{"linux/kd.h", "KDSIGACCEPT", 0x4b4e}, ++{"linux/kd.h", "KDKBDREP", 0x4b52}, ++{"linux/kd.h", "GIO_FONT", 0x4b60}, ++{"linux/kd.h", "PIO_FONT", 0x4b61}, ++{"linux/kd.h", "KDGKBMETA", 0x4b62}, ++{"linux/kd.h", "KDSKBMETA", 0x4b63}, ++{"linux/kd.h", "KDGKBLED", 0x4b64}, ++{"linux/kd.h", "KDSKBLED", 0x4b65}, ++{"linux/kd.h", "GIO_UNIMAP", 0x4b66}, ++{"linux/kd.h", "PIO_UNIMAP", 0x4b67}, ++{"linux/kd.h", "PIO_UNIMAPCLR", 0x4b68}, ++{"linux/kd.h", "GIO_UNISCRNMAP", 0x4b69}, ++{"linux/kd.h", "PIO_UNISCRNMAP", 0x4b6a}, ++{"linux/kd.h", "GIO_FONTX", 0x4b6b}, ++{"linux/kd.h", "PIO_FONTX", 0x4b6c}, ++{"linux/kd.h", "PIO_FONTRESET", 0x4b6d}, ++{"linux/kd.h", "GIO_CMAP", 0x4b70}, ++{"linux/kd.h", "PIO_CMAP", 0x4b71}, ++{"linux/kd.h", "KDFONTOP", 0x4b72}, ++{"linux/loop.h", "LOOP_SET_FD", 0x4c00}, ++{"linux/loop.h", "LOOP_CLR_FD", 0x4c01}, ++{"linux/loop.h", "LOOP_SET_STATUS", 0x4c02}, ++{"linux/loop.h", "LOOP_GET_STATUS", 0x4c03}, ++{"linux/loop.h", "LOOP_SET_STATUS64", 0x4c04}, ++{"linux/loop.h", "LOOP_GET_STATUS64", 0x4c05}, ++{"linux/loop.h", "LOOP_CHANGE_FD", 0x4c06}, ++{"mtd/mtd-abi.h", "MTDFILEMODE", 0x4d13}, ++{"linux/random.h", "RNDZAPENTCNT", 0x5204}, ++{"linux/random.h", "RNDCLEARPOOL", 0x5206}, ++{"linux/cdrom.h", "CDROMPAUSE", 0x5301}, ++{"linux/n_r3964.h", "R3964_ENABLE_SIGNALS", 0x5301}, ++{"linux/n_r3964.h", "R3964_SETPRIORITY", 0x5302}, ++{"linux/cdrom.h", "CDROMRESUME", 0x5302}, ++{"linux/n_r3964.h", "R3964_USE_BCC", 0x5303}, ++{"linux/cdrom.h", "CDROMPLAYMSF", 0x5303}, ++{"linux/n_r3964.h", "R3964_READ_TELEGRAM", 0x5304}, ++{"linux/cdrom.h", "CDROMPLAYTRKIND", 0x5304}, ++{"linux/cdrom.h", "CDROMREADTOCHDR", 0x5305}, ++{"linux/cdrom.h", "CDROMREADTOCENTRY", 0x5306}, ++{"linux/cdrom.h", "CDROMSTOP", 0x5307}, ++{"linux/cdrom.h", "CDROMSTART", 0x5308}, ++{"linux/cdrom.h", "CDROMEJECT", 0x5309}, ++{"linux/cdrom.h", "CDROMVOLCTRL", 0x530a}, ++{"linux/cdrom.h", "CDROMSUBCHNL", 0x530b}, ++{"linux/cdrom.h", "CDROMREADMODE2", 0x530c}, ++{"linux/cdrom.h", "CDROMREADMODE1", 0x530d}, ++{"linux/cdrom.h", "CDROMREADAUDIO", 0x530e}, ++{"linux/cdrom.h", "CDROMEJECT_SW", 0x530f}, ++{"linux/cdrom.h", "CDROMMULTISESSION", 0x5310}, ++{"linux/cdrom.h", "CDROM_GET_MCN", 0x5311}, ++{"linux/cdrom.h", "CDROMRESET", 0x5312}, ++{"linux/cdrom.h", "CDROMVOLREAD", 0x5313}, ++{"linux/cdrom.h", "CDROMREADRAW", 0x5314}, ++{"linux/cdrom.h", "CDROMREADCOOKED", 0x5315}, ++{"linux/cdrom.h", "CDROMSEEK", 0x5316}, ++{"linux/cdrom.h", "CDROMPLAYBLK", 0x5317}, ++{"linux/cdrom.h", "CDROMREADALL", 0x5318}, ++{"linux/cdrom.h", "CDROMCLOSETRAY", 0x5319}, ++{"linux/cdrom.h", "CDROMGETSPINDOWN", 0x531d}, ++{"linux/cdrom.h", "CDROMSETSPINDOWN", 0x531e}, ++{"linux/cdrom.h", "CDROM_SET_OPTIONS", 0x5320}, ++{"linux/cdrom.h", "CDROM_CLEAR_OPTIONS", 0x5321}, ++{"linux/cdrom.h", "CDROM_SELECT_SPEED", 0x5322}, ++{"linux/cdrom.h", "CDROM_SELECT_DISC", 0x5323}, ++{"linux/cdrom.h", "CDROM_MEDIA_CHANGED", 0x5325}, ++{"linux/cdrom.h", "CDROM_DRIVE_STATUS", 0x5326}, ++{"linux/cdrom.h", "CDROM_DISC_STATUS", 0x5327}, ++{"linux/cdrom.h", "CDROM_CHANGER_NSLOTS", 0x5328}, ++{"linux/cdrom.h", "CDROM_LOCKDOOR", 0x5329}, ++{"linux/cdrom.h", "CDROM_DEBUG", 0x5330}, ++{"linux/cdrom.h", "CDROM_GET_CAPABILITY", 0x5331}, ++{"scsi/scsi_ioctl.h", "SCSI_IOCTL_DOORLOCK", 0x5380}, ++{"scsi/scsi_ioctl.h", "SCSI_IOCTL_DOORUNLOCK", 0x5381}, ++{"linux/cdrom.h", "CDROMAUDIOBUFSIZ", 0x5382}, ++{"scsi/scsi.h", "SCSI_IOCTL_GET_IDLUN", 0x5382}, ++{"scsi/scsi.h", "SCSI_IOCTL_TAGGED_ENABLE", 0x5383}, ++{"scsi/scsi.h", "SCSI_IOCTL_TAGGED_DISABLE", 0x5384}, ++{"scsi/scsi.h", "SCSI_IOCTL_PROBE_HOST", 0x5385}, ++{"scsi/scsi.h", "SCSI_IOCTL_GET_BUS_NUMBER", 0x5386}, ++{"linux/cdrom.h", "DVD_READ_STRUCT", 0x5390}, ++{"linux/cdrom.h", "DVD_WRITE_STRUCT", 0x5391}, ++{"linux/cdrom.h", "DVD_AUTH", 0x5392}, ++{"linux/cdrom.h", "CDROM_SEND_PACKET", 0x5393}, ++{"linux/cdrom.h", "CDROM_NEXT_WRITABLE", 0x5394}, ++{"linux/cdrom.h", "CDROM_LAST_WRITTEN", 0x5395}, ++{"asm/ioctls.h", "TCGETS", 0x5401}, ++{"asm/ioctls.h", "TCSETS", 0x5402}, ++{"asm/ioctls.h", "TCSETSW", 0x5403}, ++{"asm/ioctls.h", "TCSETSF", 0x5404}, ++{"asm/ioctls.h", "TCGETA", 0x5405}, ++{"asm/ioctls.h", "TCSETA", 0x5406}, ++{"asm/ioctls.h", "TCSETAW", 0x5407}, ++{"asm/ioctls.h", "TCSETAF", 0x5408}, ++{"asm/ioctls.h", "TCSBRK", 0x5409}, ++{"asm/ioctls.h", "TCXONC", 0x540a}, ++{"asm/ioctls.h", "TCFLSH", 0x540b}, ++{"asm/ioctls.h", "TIOCEXCL", 0x540c}, ++{"asm/ioctls.h", "TIOCNXCL", 0x540d}, ++{"asm/ioctls.h", "TIOCSCTTY", 0x540e}, ++{"asm/ioctls.h", "TIOCGPGRP", 0x540f}, ++{"asm/ioctls.h", "TIOCSPGRP", 0x5410}, ++{"asm/ioctls.h", "TIOCOUTQ", 0x5411}, ++{"asm/ioctls.h", "TIOCSTI", 0x5412}, ++{"asm/ioctls.h", "TIOCGWINSZ", 0x5413}, ++{"asm/ioctls.h", "TIOCSWINSZ", 0x5414}, ++{"asm/ioctls.h", "TIOCMGET", 0x5415}, ++{"asm/ioctls.h", "TIOCMBIS", 0x5416}, ++{"asm/ioctls.h", "TIOCMBIC", 0x5417}, ++{"asm/ioctls.h", "TIOCMSET", 0x5418}, ++{"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419}, ++{"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a}, ++{"asm/ioctls.h", "FIONREAD", 0x541b}, ++{"asm/ioctls.h", "TIOCLINUX", 0x541c}, ++{"asm/ioctls.h", "TIOCCONS", 0x541d}, ++{"asm/ioctls.h", "TIOCGSERIAL", 0x541e}, ++{"asm/ioctls.h", "TIOCSSERIAL", 0x541f}, ++{"asm/ioctls.h", "TIOCPKT", 0x5420}, ++{"asm/ioctls.h", "FIONBIO", 0x5421}, ++{"asm/ioctls.h", "TIOCNOTTY", 0x5422}, ++{"asm/ioctls.h", "TIOCSETD", 0x5423}, ++{"asm/ioctls.h", "TIOCGETD", 0x5424}, ++{"asm/ioctls.h", "TCSBRKP", 0x5425}, ++{"asm/ioctls.h", "TIOCSBRK", 0x5427}, ++{"asm/ioctls.h", "TIOCCBRK", 0x5428}, ++{"asm/ioctls.h", "TIOCGSID", 0x5429}, ++{"asm/ioctls.h", "FIONCLEX", 0x5450}, ++{"asm/ioctls.h", "FIOCLEX", 0x5451}, ++{"asm/ioctls.h", "FIOASYNC", 0x5452}, ++{"asm/ioctls.h", "TIOCSERCONFIG", 0x5453}, ++{"asm/ioctls.h", "TIOCSERGWILD", 0x5454}, ++{"asm/ioctls.h", "TIOCSERSWILD", 0x5455}, ++{"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456}, ++{"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457}, ++{"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458}, ++{"asm/ioctls.h", "TIOCSERGETLSR", 0x5459}, ++{"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a}, ++{"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b}, ++{"asm/ioctls.h", "TIOCMIWAIT", 0x545c}, ++{"asm/ioctls.h", "TIOCGICOUNT", 0x545d}, ++{"asm/ioctls.h", "TIOCGHAYESESP", 0x545e}, ++{"asm/ioctls.h", "TIOCSHAYESESP", 0x545f}, ++{"asm/ioctls.h", "FIOQSIZE", 0x5460}, ++{"linux/uinput.h", "UI_DEV_CREATE", 0x5501}, ++{"linux/uinput.h", "UI_DEV_DESTROY", 0x5502}, ++{"linux/vt.h", "VT_OPENQRY", 0x5600}, ++{"linux/vt.h", "VT_GETMODE", 0x5601}, ++{"linux/videodev2.h", "VIDIOC_RESERVED", 0x5601}, ++{"linux/vt.h", "VT_SETMODE", 0x5602}, ++{"linux/vt.h", "VT_GETSTATE", 0x5603}, ++{"linux/vt.h", "VT_SENDSIG", 0x5604}, ++{"linux/vt.h", "VT_RELDISP", 0x5605}, ++{"linux/vt.h", "VT_ACTIVATE", 0x5606}, ++{"linux/vt.h", "VT_WAITACTIVE", 0x5607}, ++{"linux/vt.h", "VT_DISALLOCATE", 0x5608}, ++{"linux/vt.h", "VT_RESIZE", 0x5609}, ++{"linux/vt.h", "VT_RESIZEX", 0x560a}, ++{"linux/vt.h", "VT_LOCKSWITCH", 0x560b}, ++{"linux/vt.h", "VT_UNLOCKSWITCH", 0x560c}, ++{"linux/vt.h", "VT_GETHIFONTMASK", 0x560d}, ++{"linux/videodev2.h", "VIDIOC_LOG_STATUS", 0x5646}, ++{"linux/sonet.h", "SONET_SETFRAMING", 0x6115}, ++{"linux/atm_nicstar.h", "NS_ADJBUFLEV", 0x6163}, ++{"linux/atm_tcp.h", "SIOCSIFATMTCP", 0x6180}, ++{"linux/atm_tcp.h", "ATMTCP_CREATE", 0x618e}, ++{"linux/atm_tcp.h", "ATMTCP_REMOVE", 0x618f}, ++{"linux/atmlec.h", "ATMLEC_CTRL", 0x61d0}, ++{"linux/atmlec.h", "ATMLEC_DATA", 0x61d1}, ++{"linux/atmlec.h", "ATMLEC_MCAST", 0x61d2}, ++{"linux/atmmpc.h", "ATMMPC_CTRL", 0x61d8}, ++{"linux/atmmpc.h", "ATMMPC_DATA", 0x61d9}, ++{"linux/atmclip.h", "SIOCMKCLIP", 0x61e0}, ++{"linux/atmarp.h", "ATMARPD_CTRL", 0x61e1}, ++{"linux/atmarp.h", "ATMARP_MKIP", 0x61e2}, ++{"linux/atmarp.h", "ATMARP_SETENTRY", 0x61e3}, ++{"linux/atmarp.h", "ATMARP_ENCAP", 0x61e5}, ++{"linux/atmsvc.h", "ATMSIGD_CTRL", 0x61f0}, ++{"linux/cm4000_cs.h", "CM_IOCSRDR", 0x6303}, ++{"linux/cm4000_cs.h", "CM_IOCARDOFF", 0x6304}, ++{"linux/chio.h", "CHIOINITELEM", 0x6311}, ++{"linux/comstats.h", "COM_GETPORTSTATS", 0x631e}, ++{"linux/comstats.h", "COM_CLRPORTSTATS", 0x631f}, ++{"linux/comstats.h", "COM_GETBRDSTATS", 0x6320}, ++{"linux/comstats.h", "COM_READPORT", 0x6328}, ++{"linux/comstats.h", "COM_READBOARD", 0x6329}, ++{"linux/comstats.h", "COM_READPANEL", 0x632a}, ++{"linux/video_decoder.h", "DECODER_DUMP", 0x64c0}, ++{"linux/hpet.h", "HPET_IE_ON", 0x6801}, ++{"linux/hpet.h", "HPET_IE_OFF", 0x6802}, ++{"linux/hpet.h", "HPET_EPI", 0x6804}, ++{"linux/hpet.h", "HPET_DPI", 0x6805}, ++{"linux/mmtimer.h", "MMTIMER_GETOFFSET", 0x6d00}, ++{"linux/synclink.h", "MGSL_IOCSTXIDLE", 0x6d02}, ++{"linux/synclink.h", "MGSL_IOCGTXIDLE", 0x6d03}, ++{"linux/synclink.h", "MGSL_IOCTXENABLE", 0x6d04}, ++{"linux/mmtimer.h", "MMTIMER_GETBITS", 0x6d04}, ++{"linux/synclink.h", "MGSL_IOCRXENABLE", 0x6d05}, ++{"linux/mmtimer.h", "MMTIMER_MMAPAVAIL", 0x6d06}, ++{"linux/synclink.h", "MGSL_IOCTXABORT", 0x6d06}, ++{"linux/synclink.h", "MGSL_IOCGSTATS", 0x6d07}, ++{"linux/synclink.h", "MGSL_IOCLOOPTXDONE", 0x6d09}, ++{"linux/synclink.h", "MGSL_IOCSIF", 0x6d0a}, ++{"linux/synclink.h", "MGSL_IOCGIF", 0x6d0b}, ++{"linux/synclink.h", "MGSL_IOCCLRMODCOUNT", 0x6d0f}, ++{"linux/ncp_fs.h", "NCP_IOC_CONN_LOGGED_IN", 0x6e03}, ++{"linux/rtc.h", "RTC_AIE_ON", 0x7001}, ++{"linux/rtc.h", "RTC_AIE_OFF", 0x7002}, ++{"linux/rtc.h", "RTC_UIE_ON", 0x7003}, ++{"linux/rtc.h", "RTC_UIE_OFF", 0x7004}, ++{"linux/rtc.h", "RTC_PIE_ON", 0x7005}, ++{"linux/rtc.h", "RTC_PIE_OFF", 0x7006}, ++{"linux/rtc.h", "RTC_WIE_ON", 0x700f}, ++{"linux/rtc.h", "RTC_WIE_OFF", 0x7010}, ++{"linux/nvram.h", "NVRAM_INIT", 0x7040}, ++{"linux/nvram.h", "NVRAM_SETCKS", 0x7041}, ++{"linux/ppdev.h", "PPCLAIM", 0x708b}, ++{"linux/ppdev.h", "PPRELEASE", 0x708c}, ++{"linux/ppdev.h", "PPYIELD", 0x708d}, ++{"linux/ppdev.h", "PPEXCL", 0x708f}, ++{"linux/telephony.h", "PHONE_CAPABILITIES", 0x7180}, ++{"linux/telephony.h", "PHONE_RING", 0x7183}, ++{"linux/telephony.h", "PHONE_HOOKSTATE", 0x7184}, ++{"linux/telephony.h", "OLD_PHONE_RING_START", 0x7187}, ++{"linux/telephony.h", "PHONE_RING_STOP", 0x7188}, ++{"linux/telephony.h", "PHONE_REC_START", 0x718a}, ++{"linux/telephony.h", "PHONE_REC_STOP", 0x718b}, ++{"linux/telephony.h", "PHONE_REC_LEVEL", 0x718f}, ++{"linux/telephony.h", "PHONE_PLAY_START", 0x7191}, ++{"linux/telephony.h", "PHONE_PLAY_STOP", 0x7192}, ++{"linux/telephony.h", "PHONE_PLAY_LEVEL", 0x7195}, ++{"linux/telephony.h", "PHONE_GET_TONE_ON_TIME", 0x719e}, ++{"linux/telephony.h", "PHONE_GET_TONE_OFF_TIME", 0x719f}, ++{"linux/telephony.h", "PHONE_GET_TONE_STATE", 0x71a0}, ++{"linux/telephony.h", "PHONE_BUSY", 0x71a1}, ++{"linux/telephony.h", "PHONE_RINGBACK", 0x71a2}, ++{"linux/telephony.h", "PHONE_DIALTONE", 0x71a3}, ++{"linux/telephony.h", "PHONE_CPT_STOP", 0x71a4}, ++{"linux/telephony.h", "PHONE_PSTN_GET_STATE", 0x71a5}, ++{"linux/telephony.h", "PHONE_PSTN_LINETEST", 0x71a8}, ++{"linux/ixjuser.h", "IXJCTL_DSP_RESET", 0x71c0}, ++{"linux/ixjuser.h", "IXJCTL_DSP_IDLE", 0x71c5}, ++{"linux/ixjuser.h", "IXJCTL_TESTRAM", 0x71c6}, ++{"linux/ixjuser.h", "IXJCTL_AEC_STOP", 0x71cc}, ++{"linux/ixjuser.h", "IXJCTL_AEC_GET_LEVEL", 0x71cd}, ++{"linux/ixjuser.h", "IXJCTL_PSTN_LINETEST", 0x71d3}, ++{"linux/ixjuser.h", "IXJCTL_PLAY_CID", 0x71d7}, ++{"linux/ixjuser.h", "IXJCTL_DRYBUFFER_CLEAR", 0x71e7}, ++{"linux/cdk.h", "STL_BINTR", 0x7314}, ++{"linux/cdk.h", "STL_BSTART", 0x7315}, ++{"linux/cdk.h", "STL_BSTOP", 0x7316}, ++{"linux/cdk.h", "STL_BRESET", 0x7317}, ++{"linux/cdk.h", "STL_GETPFLAG", 0x7350}, ++{"linux/cdk.h", "STL_SETPFLAG", 0x7351}, ++{"linux/if_ppp.h", "PPPIOCDISCONN", 0x7439}, ++{"linux/if_ppp.h", "PPPIOCXFERUNIT", 0x744e}, ++{"linux/meye.h", "MEYEIOC_STILLCAPT", 0x76c4}, ++{"linux/videotext.h", "VTXIOCPUTPAGE", 0x8108}, ++{"linux/videotext.h", "VTXIOCSETDISP", 0x8109}, ++{"linux/videotext.h", "VTXIOCPUTSTAT", 0x810a}, ++{"linux/videotext.h", "VTXIOCCLRCACHE", 0x810b}, ++{"asm/sockios.h", "FIOSETOWN", 0x8901}, ++{"asm/sockios.h", "SIOCSPGRP", 0x8902}, ++{"asm/sockios.h", "FIOGETOWN", 0x8903}, ++{"asm/sockios.h", "SIOCGPGRP", 0x8904}, ++{"asm/sockios.h", "SIOCATMARK", 0x8905}, ++{"asm/sockios.h", "SIOCGSTAMP", 0x8906}, ++{"linux/sockios.h", "SIOCADDRT", 0x890b}, ++{"linux/sockios.h", "SIOCDELRT", 0x890c}, ++{"linux/sockios.h", "SIOCRTMSG", 0x890d}, ++{"linux/sockios.h", "SIOCGIFNAME", 0x8910}, ++{"linux/sockios.h", "SIOCSIFLINK", 0x8911}, ++{"linux/sockios.h", "SIOCGIFCONF", 0x8912}, ++{"linux/sockios.h", "SIOCGIFFLAGS", 0x8913}, ++{"linux/sockios.h", "SIOCSIFFLAGS", 0x8914}, ++{"linux/sockios.h", "SIOCGIFADDR", 0x8915}, ++{"linux/sockios.h", "SIOCSIFADDR", 0x8916}, ++{"linux/sockios.h", "SIOCGIFDSTADDR", 0x8917}, ++{"linux/sockios.h", "SIOCSIFDSTADDR", 0x8918}, ++{"linux/sockios.h", "SIOCGIFBRDADDR", 0x8919}, ++{"linux/sockios.h", "SIOCSIFBRDADDR", 0x891a}, ++{"linux/sockios.h", "SIOCGIFNETMASK", 0x891b}, ++{"linux/sockios.h", "SIOCSIFNETMASK", 0x891c}, ++{"linux/sockios.h", "SIOCGIFMETRIC", 0x891d}, ++{"linux/sockios.h", "SIOCSIFMETRIC", 0x891e}, ++{"linux/sockios.h", "SIOCGIFMEM", 0x891f}, ++{"linux/sockios.h", "SIOCSIFMEM", 0x8920}, ++{"linux/sockios.h", "SIOCGIFMTU", 0x8921}, ++{"linux/sockios.h", "SIOCSIFMTU", 0x8922}, ++{"linux/sockios.h", "SIOCSIFNAME", 0x8923}, ++{"linux/sockios.h", "SIOCSIFHWADDR", 0x8924}, ++{"linux/sockios.h", "SIOCGIFENCAP", 0x8925}, ++{"linux/sockios.h", "SIOCSIFENCAP", 0x8926}, ++{"linux/sockios.h", "SIOCGIFHWADDR", 0x8927}, ++{"linux/sockios.h", "SIOCGIFSLAVE", 0x8929}, ++{"linux/sockios.h", "SIOCSIFSLAVE", 0x8930}, ++{"linux/sockios.h", "SIOCADDMULTI", 0x8931}, ++{"linux/sockios.h", "SIOCDELMULTI", 0x8932}, ++{"linux/sockios.h", "SIOCGIFINDEX", 0x8933}, ++{"linux/sockios.h", "SIOCSIFPFLAGS", 0x8934}, ++{"linux/sockios.h", "SIOCGIFPFLAGS", 0x8935}, ++{"linux/sockios.h", "SIOCDIFADDR", 0x8936}, ++{"linux/sockios.h", "SIOCSIFHWBROADCAST", 0x8937}, ++{"linux/sockios.h", "SIOCGIFCOUNT", 0x8938}, ++{"linux/sockios.h", "SIOCGIFBR", 0x8940}, ++{"linux/sockios.h", "SIOCSIFBR", 0x8941}, ++{"linux/sockios.h", "SIOCGIFTXQLEN", 0x8942}, ++{"linux/sockios.h", "SIOCSIFTXQLEN", 0x8943}, ++{"linux/sockios.h", "SIOCGIFDIVERT", 0x8944}, ++{"linux/sockios.h", "SIOCSIFDIVERT", 0x8945}, ++{"linux/sockios.h", "SIOCETHTOOL", 0x8946}, ++{"linux/sockios.h", "SIOCGMIIPHY", 0x8947}, ++{"linux/sockios.h", "SIOCGMIIREG", 0x8948}, ++{"linux/sockios.h", "SIOCSMIIREG", 0x8949}, ++{"linux/sockios.h", "SIOCWANDEV", 0x894a}, ++{"linux/sockios.h", "SIOCDARP", 0x8953}, ++{"linux/sockios.h", "SIOCGARP", 0x8954}, ++{"linux/sockios.h", "SIOCSARP", 0x8955}, ++{"linux/sockios.h", "SIOCDRARP", 0x8960}, ++{"linux/sockios.h", "SIOCGRARP", 0x8961}, ++{"linux/sockios.h", "SIOCSRARP", 0x8962}, ++{"linux/sockios.h", "SIOCGIFMAP", 0x8970}, ++{"linux/sockios.h", "SIOCSIFMAP", 0x8971}, ++{"linux/sockios.h", "SIOCADDDLCI", 0x8980}, ++{"linux/sockios.h", "SIOCDELDLCI", 0x8981}, ++{"linux/sockios.h", "SIOCGIFVLAN", 0x8982}, ++{"linux/sockios.h", "SIOCSIFVLAN", 0x8983}, ++{"linux/sockios.h", "SIOCBONDENSLAVE", 0x8990}, ++{"linux/sockios.h", "SIOCBONDRELEASE", 0x8991}, ++{"linux/sockios.h", "SIOCBONDSETHWADDR", 0x8992}, ++{"linux/sockios.h", "SIOCBONDSLAVEINFOQUERY", 0x8993}, ++{"linux/sockios.h", "SIOCBONDINFOQUERY", 0x8994}, ++{"linux/sockios.h", "SIOCBONDCHANGEACTIVE", 0x8995}, ++{"linux/sockios.h", "SIOCBRADDBR", 0x89a0}, ++{"linux/sockios.h", "SIOCBRDELBR", 0x89a1}, ++{"linux/sockios.h", "SIOCBRADDIF", 0x89a2}, ++{"linux/sockios.h", "SIOCBRDELIF", 0x89a3}, ++{"linux/sockios.h", "SIOCPROTOPRIVATE", 0x89e0}, ++{"linux/sockios.h", "SIOCDEVPRIVATE", 0x89f0}, ++{"linux/auto_fs.h", "AUTOFS_IOC_READY", 0x9360}, ++{"linux/auto_fs.h", "AUTOFS_IOC_FAIL", 0x9361}, ++{"linux/auto_fs.h", "AUTOFS_IOC_CATATONIC", 0x9362}, ++{"linux/nbd.h", "NBD_SET_SOCK", 0xab00}, ++{"linux/nbd.h", "NBD_SET_BLKSIZE", 0xab01}, ++{"linux/nbd.h", "NBD_SET_SIZE", 0xab02}, ++{"linux/nbd.h", "NBD_DO_IT", 0xab03}, ++{"linux/nbd.h", "NBD_CLEAR_SOCK", 0xab04}, ++{"linux/nbd.h", "NBD_CLEAR_QUE", 0xab05}, ++{"linux/nbd.h", "NBD_PRINT_DEBUG", 0xab06}, ++{"linux/nbd.h", "NBD_SET_SIZE_BLOCKS", 0xab07}, ++{"linux/nbd.h", "NBD_DISCONNECT", 0xab08}, ++{"linux/raw.h", "RAW_SETBIND", 0xac00}, ++{"linux/raw.h", "RAW_GETBIND", 0xac01}, ++{"linux/if_pppox.h", "PPPOEIOCDFWD", 0xb101}, ++{"linux/cyclades.h", "CYGETMON", 0x435901}, ++{"linux/cyclades.h", "CYGETTHRESH", 0x435902}, ++{"linux/cyclades.h", "CYSETTHRESH", 0x435903}, ++{"linux/cyclades.h", "CYGETDEFTHRESH", 0x435904}, ++{"linux/cyclades.h", "CYSETDEFTHRESH", 0x435905}, ++{"linux/cyclades.h", "CYGETTIMEOUT", 0x435906}, ++{"linux/cyclades.h", "CYSETTIMEOUT", 0x435907}, ++{"linux/cyclades.h", "CYGETDEFTIMEOUT", 0x435908}, ++{"linux/cyclades.h", "CYSETDEFTIMEOUT", 0x435909}, ++{"linux/cyclades.h", "CYSETRFLOW", 0x43590a}, ++{"linux/cyclades.h", "CYGETRFLOW", 0x43590b}, ++{"linux/cyclades.h", "CYSETRTSDTR_INV", 0x43590c}, ++{"linux/cyclades.h", "CYGETRTSDTR_INV", 0x43590d}, ++{"linux/cyclades.h", "CYZSETPOLLCYCLE", 0x43590e}, ++{"linux/cyclades.h", "CYZGETPOLLCYCLE", 0x43590f}, ++{"linux/cyclades.h", "CYGETCD1400VER", 0x435910}, ++{"linux/cyclades.h", "CYGETCARDINFO", 0x435911}, ++{"linux/cyclades.h", "CYSETWAIT", 0x435912}, ++{"linux/cyclades.h", "CYGETWAIT", 0x435913}, ++{"linux/videodev2.h", "VIDIOC_S_PRIORITY", 0x40015644}, ++{"linux/ppdev.h", "PPWCONTROL", 0x40017084}, ++{"linux/ppdev.h", "PPWDATA", 0x40017086}, ++{"linux/ppdev.h", "PPWCTLONIRQ", 0x40017092}, ++{"linux/telephony.h", "PHONE_MAXRINGS", 0x40017185}, ++{"linux/telephony.h", "PHONE_PLAY_TONE", 0x4001719b}, ++{"linux/sonypi.h", "SONYPI_IOCSBRT", 0x40017600}, ++{"linux/sonypi.h", "SONYPI_IOCSBLUE", 0x40017609}, ++{"linux/sonypi.h", "SONYPI_IOCSFAN", 0x4001760b}, ++{"linux/atmdev.h", "ATM_SETBACKEND", 0x400261f2}, ++{"linux/atmdev.h", "ATM_NEWBACKENDIF", 0x400261f3}, ++{"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID", 0x40026e02}, ++{"linux/ppdev.h", "PPFCONTROL", 0x4002708e}, ++{"linux/telephony.h", "PHONE_RING_CADENCE", 0x40027186}, ++{"linux/fs.h", "BLKBSZSET", 0x40041271}, ++{"linux/radeonfb.h", "FBIO_RADEON_SET_MIRROR", 0x40044004}, ++{"linux/agpgart.h", "AGPIOC_SETUP", 0x40044103}, ++{"linux/agpgart.h", "AGPIOC_RESERVE", 0x40044104}, ++{"linux/agpgart.h", "AGPIOC_PROTECT", 0x40044105}, ++{"linux/agpgart.h", "AGPIOC_DEALLOCATE", 0x40044107}, ++{"linux/agpgart.h", "AGPIOC_BIND", 0x40044108}, ++{"linux/agpgart.h", "AGPIOC_UNBIND", 0x40044109}, ++{"linux/pmu.h", "PMU_IOC_SET_BACKLIGHT", 0x40044202}, ++{"linux/cciss_ioctl.h", "CCISS_REGNEWDISK", 0x4004420d}, ++{"linux/input.h", "EVIOCRMFF", 0x40044581}, ++{"linux/input.h", "EVIOCGRAB", 0x40044590}, ++{"linux/matroxfb.h", "FBIO_WAITFORVSYNC", 0x40044620}, ++{"linux/hiddev.h", "HIDIOCSFLAG", 0x4004480f}, ++{"mtd/mtd-abi.h", "OTPGETREGIONCOUNT", 0x40044d0e}, ++{"linux/ticable.h", "IOCTL_TIUSB_TIMEOUT", 0x40044e20}, ++{"linux/ticable.h", "IOCTL_TIUSB_RESET_DEVICE", 0x40044e21}, ++{"linux/ticable.h", "IOCTL_TIUSB_RESET_PIPES", 0x40044e22}, ++{"linux/random.h", "RNDADDTOENTCNT", 0x40045201}, ++{"asm/ioctls.h", "TIOCSPTLCK", 0x40045431}, ++{"linux/if_tun.h", "TUNSETNOCSUM", 0x400454c8}, ++{"linux/if_tun.h", "TUNSETDEBUG", 0x400454c9}, ++{"linux/if_tun.h", "TUNSETIFF", 0x400454ca}, ++{"linux/if_tun.h", "TUNSETPERSIST", 0x400454cb}, ++{"linux/if_tun.h", "TUNSETOWNER", 0x400454cc}, ++{"linux/if_tun.h", "TUNSETLINK", 0x400454cd}, ++{"linux/uinput.h", "UI_SET_EVBIT", 0x40045564}, ++{"linux/uinput.h", "UI_SET_KEYBIT", 0x40045565}, ++{"linux/uinput.h", "UI_SET_RELBIT", 0x40045566}, ++{"linux/uinput.h", "UI_SET_ABSBIT", 0x40045567}, ++{"linux/uinput.h", "UI_SET_MSCBIT", 0x40045568}, ++{"linux/uinput.h", "UI_SET_LEDBIT", 0x40045569}, ++{"linux/uinput.h", "UI_SET_SNDBIT", 0x4004556a}, ++{"linux/uinput.h", "UI_SET_FFBIT", 0x4004556b}, ++{"linux/uinput.h", "UI_SET_PHYS", 0x4004556c}, ++{"linux/uinput.h", "UI_SET_SWBIT", 0x4004556d}, ++{"linux/videodev2.h", "VIDIOC_OVERLAY", 0x4004560e}, ++{"linux/videodev2.h", "VIDIOC_STREAMON", 0x40045612}, ++{"linux/videodev2.h", "VIDIOC_STREAMOFF", 0x40045613}, ++{"linux/atmdev.h", "ATM_SETSC", 0x400461f1}, ++{"linux/atmdev.h", "ATM_DROPPARTY", 0x400461f5}, ++{"linux/cm4000_cs.h", "CM_IOCSPTS", 0x40046302}, ++{"linux/chio.h", "CHIOSPICKER", 0x40046305}, ++{"linux/cm4000_cs.h", "CM_IOSDBGLVL", 0x400463fa}, ++{"linux/video_decoder.h", "DECODER_SET_NORM", 0x40046403}, ++{"linux/video_decoder.h", "DECODER_SET_INPUT", 0x40046404}, ++{"linux/video_decoder.h", "DECODER_SET_OUTPUT", 0x40046405}, ++{"linux/video_decoder.h", "DECODER_ENABLE_OUTPUT", 0x40046406}, ++{"linux/video_decoder.h", "DECODER_SET_GPIO", 0x40046408}, ++{"linux/video_decoder.h", "DECODER_SET_VBI_BYPASS", 0x4004640a}, ++{"linux/video_encoder.h", "ENCODER_SET_NORM", 0x40046502}, ++{"linux/video_encoder.h", "ENCODER_SET_INPUT", 0x40046503}, ++{"linux/video_encoder.h", "ENCODER_SET_OUTPUT", 0x40046504}, ++{"linux/video_encoder.h", "ENCODER_ENABLE_OUTPUT", 0x40046505}, ++{"linux/ext3_fs.h", "EXT3_IOC_SETFLAGS", 0x40046602}, ++{"linux/ext2_fs.h", "EXT2_IOC_SETFLAGS", 0x40046602}, ++{"linux/iflags.h", "IFLAGS_SET_IOC", 0x40046602}, ++{"linux/ext3_fs.h", "EXT3_IOC_SETVERSION", 0x40046604}, ++{"linux/ext3_fs.h", "EXT3_IOC_SETRSVSZ", 0x40046606}, ++{"linux/ext3_fs.h", "EXT3_IOC_GROUP_EXTEND", 0x40046607}, ++{"linux/hpet.h", "HPET_IRQFREQ", 0x40046806}, ++{"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID2", 0x40046e02}, ++{"linux/ncp_fs.h", "NCP_IOC_SET_SIGN_WANTED", 0x40046e06}, ++{"linux/ncp_fs.h", "NCP_IOC_GETDENTRYTTL", 0x40046e0c}, ++{"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_CONNECTION", 0x40046ef8}, ++{"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_MODE", 0x40046efa}, ++{"linux/rtc.h", "RTC_IRQP_SET", 0x4004700c}, ++{"linux/rtc.h", "RTC_EPOCH_SET", 0x4004700e}, ++{"linux/ppdev.h", "PPSETMODE", 0x40047080}, ++{"linux/ppdev.h", "PPDATADIR", 0x40047090}, ++{"linux/ppdev.h", "PPNEGOT", 0x40047091}, ++{"linux/ppdev.h", "PPSETPHASE", 0x40047094}, ++{"linux/ppdev.h", "PPSETFLAGS", 0x4004709b}, ++{"linux/ticable.h", "IOCTL_TISER_DELAY", 0x400470a0}, ++{"linux/ticable.h", "IOCTL_TISER_TIMEOUT", 0x400470a1}, ++{"linux/ticable.h", "IOCTL_TIPAR_DELAY", 0x400470a8}, ++{"linux/ticable.h", "IOCTL_TIPAR_TIMEOUT", 0x400470a9}, ++{"linux/serio.h", "SPIOCSTYPE", 0x40047101}, ++{"linux/telephony.h", "PHONE_CAPABILITIES_CHECK", 0x40047182}, ++{"linux/telephony.h", "PHONE_RING_START", 0x40047187}, ++{"linux/telephony.h", "PHONE_REC_CODEC", 0x40047189}, ++{"linux/telephony.h", "PHONE_REC_DEPTH", 0x4004718c}, ++{"linux/telephony.h", "PHONE_FRAME", 0x4004718d}, ++{"linux/telephony.h", "PHONE_REC_VOLUME", 0x4004718e}, ++{"linux/telephony.h", "PHONE_PLAY_CODEC", 0x40047190}, ++{"linux/telephony.h", "PHONE_PLAY_DEPTH", 0x40047193}, ++{"linux/telephony.h", "PHONE_PLAY_VOLUME", 0x40047194}, ++{"linux/telephony.h", "PHONE_DTMF_OOB", 0x40047199}, ++{"linux/telephony.h", "PHONE_SET_TONE_ON_TIME", 0x4004719c}, ++{"linux/telephony.h", "PHONE_SET_TONE_OFF_TIME", 0x4004719d}, ++{"linux/telephony.h", "PHONE_PSTN_SET_STATE", 0x400471a4}, ++{"linux/telephony.h", "PHONE_WINK_DURATION", 0x400471a6}, ++{"linux/telephony.h", "PHONE_VAD", 0x400471a9}, ++{"linux/telephony.h", "PHONE_WINK", 0x400471aa}, ++{"linux/ixjuser.h", "IXJCTL_SET_FILTER", 0x400471c7}, ++{"linux/ixjuser.h", "IXJCTL_GET_FILTER_HIST", 0x400471c8}, ++{"linux/ixjuser.h", "IXJCTL_INIT_TONE", 0x400471c9}, ++{"linux/ixjuser.h", "IXJCTL_TONE_CADENCE", 0x400471ca}, ++{"linux/ixjuser.h", "IXJCTL_AEC_START", 0x400471cb}, ++{"linux/ixjuser.h", "IXJCTL_SET_LED", 0x400471ce}, ++{"linux/ixjuser.h", "IXJCTL_MIXER", 0x400471cf}, ++{"linux/ixjuser.h", "IXJCTL_DAA_COEFF_SET", 0x400471d0}, ++{"linux/ixjuser.h", "IXJCTL_PORT", 0x400471d1}, ++{"linux/ixjuser.h", "IXJCTL_DAA_AGAIN", 0x400471d2}, ++{"linux/ixjuser.h", "IXJCTL_POTS_PSTN", 0x400471d5}, ++{"linux/ixjuser.h", "IXJCTL_FILTER_CADENCE", 0x400471d6}, ++{"linux/ixjuser.h", "IXJCTL_CIDCW", 0x400471d9}, ++{"linux/telephony.h", "PHONE_REC_VOLUME_LINEAR", 0x400471db}, ++{"linux/telephony.h", "PHONE_PLAY_VOLUME_LINEAR", 0x400471dc}, ++{"linux/ixjuser.h", "IXJCTL_SET_FILTER_RAW", 0x400471dd}, ++{"linux/ixjuser.h", "IXJCTL_HZ", 0x400471e0}, ++{"linux/ixjuser.h", "IXJCTL_RATE", 0x400471e1}, ++{"linux/ixjuser.h", "IXJCTL_DTMF_PRESCALE", 0x400471e8}, ++{"linux/ixjuser.h", "IXJCTL_SIGCTL", 0x400471e9}, ++{"linux/ixjuser.h", "IXJCTL_SC_RXG", 0x400471ea}, ++{"linux/ixjuser.h", "IXJCTL_SC_TXG", 0x400471eb}, ++{"linux/ixjuser.h", "IXJCTL_INTERCOM_START", 0x400471fd}, ++{"linux/ixjuser.h", "IXJCTL_INTERCOM_STOP", 0x400471fe}, ++{"linux/msdos_fs.h", "FAT_IOCTL_SET_ATTRIBUTES", 0x40047211}, ++{"linux/if_ppp.h", "PPPIOCATTCHAN", 0x40047438}, ++{"linux/if_ppp.h", "PPPIOCCONNECT", 0x4004743a}, ++{"linux/if_ppp.h", "PPPIOCSMRRU", 0x4004743b}, ++{"linux/if_ppp.h", "PPPIOCDETACH", 0x4004743c}, ++{"linux/if_ppp.h", "PPPIOCATTACH", 0x4004743d}, ++{"linux/if_ppp.h", "PPPIOCSDEBUG", 0x40047440}, ++{"linux/if_ppp.h", "PPPIOCSMAXCID", 0x40047451}, ++{"linux/if_ppp.h", "PPPIOCSMRU", 0x40047452}, ++{"linux/if_ppp.h", "PPPIOCSRASYNCMAP", 0x40047454}, ++{"linux/if_ppp.h", "PPPIOCSASYNCMAP", 0x40047457}, ++{"linux/if_ppp.h", "PPPIOCSFLAGS", 0x40047459}, ++{"linux/isdn_ppp.h", "PPPIOCBUNDLE", 0x40047481}, ++{"linux/isdn_ppp.h", "PPPIOCSMPFLAGS", 0x40047483}, ++{"linux/isdn_ppp.h", "PPPIOCSMPMTU", 0x40047484}, ++{"linux/isdn_ppp.h", "PPPIOCSMPMRU", 0x40047485}, ++{"linux/isdn_ppp.h", "PPPIOCSCOMPRESSOR", 0x40047487}, ++{"linux/ext2_fs.h", "EXT2_IOC_SETVERSION", 0x40047602}, ++{"linux/ext3_fs.h", "EXT3_IOC_SETVERSION_OLD", 0x40047602}, ++{"linux/videodev.h", "VIDIOCCAPTURE", 0x40047608}, ++{"linux/videodev.h", "VIDIOCSFREQ", 0x4004760f}, ++{"linux/videodev.h", "VIDIOCSYNC", 0x40047612}, ++{"linux/videodev.h", "VIDIOCSWRITEMODE", 0x40047619}, ++{"linux/meye.h", "MEYEIOC_QBUF_CAPT", 0x400476c2}, ++{"linux/videotext.h", "VTXIOCSETVIRT", 0x4004810c}, ++{"linux/dn.h", "OSIOCSNETADDR", 0x400489e0}, ++{"linux/dn.h", "SIOCSNETADDR", 0x400489e0}, ++{"linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", 0x40049366}, ++{"linux/if_pppox.h", "PPPOEIOCSFWD", 0x4004b100}, ++{"linux/gigaset_dev.h", "GIGASET_BRKCHARS", 0x40064702}, ++{"linux/meye.h", "MEYEIOC_S_PARAMS", 0x400676c1}, ++{"linux/cciss_ioctl.h", "CCISS_SETINTINFO", 0x40084203}, ++{"linux/input.h", "EVIOCSREP", 0x40084503}, ++{"linux/input.h", "EVIOCSKEYCODE", 0x40084504}, ++{"mtd/mtd-abi.h", "MEMERASE", 0x40084d02}, ++{"mtd/mtd-abi.h", "MEMLOCK", 0x40084d05}, ++{"mtd/mtd-abi.h", "MEMUNLOCK", 0x40084d06}, ++{"mtd/mtd-abi.h", "MEMGETBADBLOCK", 0x40084d0b}, ++{"mtd/mtd-abi.h", "MEMSETBADBLOCK", 0x40084d0c}, ++{"linux/random.h", "RNDADDENTROPY", 0x40085203}, ++{"linux/videodev2.h", "VIDIOC_S_STD", 0x40085618}, ++{"linux/videodev2.h", "VIDIOC_S_CTRL_OLD", 0x4008561c}, ++{"linux/atmdev.h", "ATM_GETNAMES", 0x40086183}, ++{"linux/atmdev.h", "ATM_ADDPARTY", 0x400861f4}, ++{"linux/chio.h", "CHIOGSTATUS", 0x40086308}, ++{"linux/video_decoder.h", "DECODER_INIT", 0x40086409}, ++{"linux/mtio.h", "MTIOCTOP", 0x40086d01}, ++{"linux/ppdev.h", "PPSETTIME", 0x40087096}, ++{"linux/if_ppp.h", "PPPIOCSACTIVE", 0x40087446}, ++{"linux/if_ppp.h", "PPPIOCSPASS", 0x40087447}, ++{"linux/if_ppp.h", "PPPIOCSNPMODE", 0x4008744b}, ++{"linux/fd.h", "FDFMTTRK", 0x400c0248}, ++{"linux/capi.h", "CAPI_REGISTER", 0x400c4301}, ++{"linux/hiddev.h", "HIDIOCGREPORT", 0x400c4807}, ++{"linux/hiddev.h", "HIDIOCSREPORT", 0x400c4808}, ++{"mtd/mtd-abi.h", "OTPGETREGIONINFO", 0x400c4d0f}, ++{"linux/uinput.h", "UI_END_FF_ERASE", 0x400c55cb}, ++{"linux/ite_gpio.h", "ITE_GPIO_OUT", 0x400c5a01}, ++{"linux/ite_gpio.h", "ITE_GPIO_INT_CTRL", 0x400c5a02}, ++{"linux/ite_gpio.h", "ITE_GPIO_IN_STATUS", 0x400c5a03}, ++{"linux/ite_gpio.h", "ITE_GPIO_OUT_STATUS", 0x400c5a04}, ++{"linux/ite_gpio.h", "ITE_GPIO_GEN_CTRL", 0x400c5a05}, ++{"linux/ite_gpio.h", "ITE_GPIO_INT_WAIT", 0x400c5a06}, ++{"linux/atm_idt77105.h", "IDT77105_GETSTAT", 0x400c6132}, ++{"linux/atm_idt77105.h", "IDT77105_GETSTATZ", 0x400c6133}, ++{"linux/atmdev.h", "ATM_GETSTAT", 0x400c6150}, ++{"linux/atmdev.h", "ATM_GETSTATZ", 0x400c6151}, ++{"linux/atmdev.h", "ATM_GETLOOP", 0x400c6152}, ++{"linux/atmdev.h", "ATM_SETLOOP", 0x400c6153}, ++{"linux/atmdev.h", "ATM_QUERYLOOP", 0x400c6154}, ++{"linux/atm_eni.h", "ENI_MEMDUMP", 0x400c6160}, ++{"linux/atm_he.h", "HE_GET_REG", 0x400c6160}, ++{"linux/atm_zatm.h", "ZATM_GETPOOL", 0x400c6161}, ++{"linux/atm_zatm.h", "ZATM_GETPOOLZ", 0x400c6162}, ++{"linux/atm_nicstar.h", "NS_SETBUFLEV", 0x400c6162}, ++{"linux/atm_zatm.h", "ZATM_SETPOOL", 0x400c6163}, ++{"linux/atm_eni.h", "ENI_SETMULT", 0x400c6167}, ++{"linux/atmdev.h", "ATM_GETLINKRATE", 0x400c6181}, ++{"linux/atmdev.h", "ATM_GETTYPE", 0x400c6184}, ++{"linux/atmdev.h", "ATM_GETESI", 0x400c6185}, ++{"linux/atmdev.h", "ATM_GETADDR", 0x400c6186}, ++{"linux/atmdev.h", "ATM_RSTADDR", 0x400c6187}, ++{"linux/atmdev.h", "ATM_ADDADDR", 0x400c6188}, ++{"linux/atmdev.h", "ATM_DELADDR", 0x400c6189}, ++{"linux/atmdev.h", "ATM_GETCIRANGE", 0x400c618a}, ++{"linux/atmdev.h", "ATM_SETCIRANGE", 0x400c618b}, ++{"linux/atmdev.h", "ATM_SETESI", 0x400c618c}, ++{"linux/atmdev.h", "ATM_SETESIF", 0x400c618d}, ++{"linux/atmdev.h", "ATM_ADDLECSADDR", 0x400c618e}, ++{"linux/atmdev.h", "ATM_DELLECSADDR", 0x400c618f}, ++{"linux/atmdev.h", "ATM_GETLECSADDR", 0x400c6190}, ++{"linux/chio.h", "CHIOPOSITION", 0x400c6303}, ++{"linux/i2o-dev.h", "I2OEVTREG", 0x400c690a}, ++{"linux/ncp_fs.h", "NCP_IOC_GETROOT", 0x400c6e08}, ++{"linux/if_ppp.h", "PPPIOCSCOMPRESS", 0x400c744d}, ++{"linux/videodev.h", "VIDIOCSPLAYMODE", 0x400c7618}, ++{"linux/video_decoder.h", "DECODER_SET_PICTURE", 0x400e6407}, ++{"linux/videodev.h", "VIDIOCSPICT", 0x400e7607}, ++{"linux/cciss_ioctl.h", "CCISS_SETNODENAME", 0x40104205}, ++{"linux/synclink.h", "MGSL_IOCSGPIO", 0x40106d10}, ++{"linux/videodev.h", "VIDIOCMCAPTURE", 0x40107613}, ++{"linux/fd.h", "FDSETMAXERRS", 0x4014024c}, ++{"linux/videodev2.h", "VIDIOC_S_CROP", 0x4014563c}, ++{"linux/chio.h", "CHIOMOVE", 0x40146301}, ++{"linux/videodev.h", "VIDIOCSFBUF", 0x4014760c}, ++{"linux/videodev.h", "VIDIOCSCAPTURE", 0x40147617}, ++{"linux/hiddev.h", "HIDIOCSUSAGE", 0x4018480c}, ++{"linux/hiddev.h", "HIDIOCGCOLLECTIONINDEX", 0x40184810}, ++{"linux/ext3_fs.h", "EXT3_IOC_GROUP_ADD", 0x40186608}, ++{"linux/videodev.h", "VIDIOCSMICROCODE", 0x4018761b}, ++{"linux/fd.h", "FDSETPRM", 0x401c0242}, ++{"linux/fd.h", "FDDEFPRM", 0x401c0243}, ++{"linux/atmbr2684.h", "BR2684_SETFILT", 0x401c6190}, ++{"linux/chio.h", "CHIOEXCHANGE", 0x401c6302}, ++{"linux/rtc.h", "RTC_PLL_SET", 0x401c7012}, ++{"linux/synclink.h", "MGSL_IOCSPARAMS", 0x40206d00}, ++{"linux/if_ppp.h", "PPPIOCSXASYNCMAP", 0x4020744f}, ++{"linux/videodev.h", "VIDIOCSWIN", 0x4020760a}, ++{"linux/videodev.h", "VIDIOCSVBIFMT", 0x4020761d}, ++{"linux/videotext.h", "VTXIOCCLRPAGE", 0x40208102}, ++{"linux/videotext.h", "VTXIOCCLRFOUND", 0x40208103}, ++{"linux/videotext.h", "VTXIOCPAGEREQ", 0x40208104}, ++{"linux/videotext.h", "VTXIOCGETSTAT", 0x40208105}, ++{"linux/videotext.h", "VTXIOCGETPAGE", 0x40208106}, ++{"linux/videotext.h", "VTXIOCSTOPDAU", 0x40208107}, ++{"linux/joystick.h", "JSIOCSCORR", 0x40246a21}, ++{"linux/rtc.h", "RTC_ALM_SET", 0x40247007}, ++{"linux/rtc.h", "RTC_SET_TIME", 0x4024700a}, ++{"linux/rtc.h", "RTC_WKALM_SET", 0x4028700f}, ++{"linux/smb_fs.h", "SMB_IOC_NEWCONN", 0x40287502}, ++{"linux/videodev.h", "VIDIOCSAUDIO", 0x40287611}, ++{"linux/videodev2.h", "VIDIOC_S_FBUF", 0x402c560b}, ++{"linux/videodev2.h", "VIDIOC_S_FREQUENCY", 0x402c5639}, ++{"linux/chio.h", "CHIOSVOLTAG", 0x40306312}, ++{"linux/videodev.h", "VIDIOCSCHAN", 0x40307603}, ++{"linux/uinput.h", "UI_END_FF_UPLOAD", 0x403455c9}, ++{"linux/videodev2.h", "VIDIOC_S_AUDIO", 0x40345622}, ++{"linux/videodev2.h", "VIDIOC_S_AUDOUT", 0x40345632}, ++{"linux/videodev.h", "VIDIOCSTUNER", 0x40347605}, ++{"linux/joystick.h", "JSIOCSAXMAP", 0x40406a31}, ++{"linux/videodev2.h", "VIDIOC_S_MODULATOR", 0x40445637}, ++{"linux/videodev2.h", "VIDIOC_S_TUNER", 0x4054561e}, ++{"linux/fd.h", "FDSETDRVPRM", 0x40580290}, ++{"linux/chio.h", "CHIOGELEM", 0x406c6310}, ++{"linux/videodev2.h", "VIDIOC_S_JPEGCOMP", 0x408c563e}, ++{"mtd/mtd-abi.h", "MEMSETOOBSEL", 0x40c84d09}, ++{"linux/videodev2.h", "VIDIOC_S_PARM_OLD", 0x40cc5616}, ++{"linux/joystick.h", "JSIOCSBTNMAP", 0x42006a33}, ++{"linux/hiddev.h", "HIDIOCSUSAGES", 0x501c4814}, ++{"linux/videodev2.h", "VIDIOC_G_PRIORITY", 0x80015643}, ++{"linux/joystick.h", "JSIOCGAXES", 0x80016a11}, ++{"linux/joystick.h", "JSIOCGBUTTONS", 0x80016a12}, ++{"linux/ppdev.h", "PPRSTATUS", 0x80017081}, ++{"linux/ppdev.h", "PPRCONTROL", 0x80017083}, ++{"linux/ppdev.h", "PPRDATA", 0x80017085}, ++{"linux/sonypi.h", "SONYPI_IOCGBRT", 0x80017600}, ++{"linux/sonypi.h", "SONYPI_IOCGBATFLAGS", 0x80017607}, ++{"linux/sonypi.h", "SONYPI_IOCGBLUE", 0x80017608}, ++{"linux/sonypi.h", "SONYPI_IOCGFAN", 0x8001760a}, ++{"linux/sonypi.h", "SONYPI_IOCGTEMP", 0x8001760c}, ++{"linux/capi.h", "CAPI_GET_ERRCODE", 0x80024321}, ++{"linux/capi.h", "CAPI_INSTALLED", 0x80024322}, ++{"linux/ipmi.h", "IPMICTL_REGISTER_FOR_CMD", 0x8002690e}, ++{"linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD", 0x8002690f}, ++{"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID", 0x80027501}, ++{"linux/sonypi.h", "SONYPI_IOCGBAT1CAP", 0x80027602}, ++{"linux/sonypi.h", "SONYPI_IOCGBAT1REM", 0x80027603}, ++{"linux/sonypi.h", "SONYPI_IOCGBAT2CAP", 0x80027604}, ++{"linux/sonypi.h", "SONYPI_IOCGBAT2REM", 0x80027605}, ++{"linux/fs.h", "BLKBSZGET", 0x80041270}, ++{"linux/fs.h", "BLKGETSIZE64", 0x80041272}, ++{"linux/radeonfb.h", "FBIO_RADEON_GET_MIRROR", 0x80044003}, ++{"linux/agpgart.h", "AGPIOC_INFO", 0x80044100}, ++{"linux/pmu.h", "PMU_IOC_GET_BACKLIGHT", 0x80044201}, ++{"linux/pmu.h", "PMU_IOC_GET_MODEL", 0x80044203}, ++{"linux/pmu.h", "PMU_IOC_HAS_ADB", 0x80044204}, ++{"linux/pmu.h", "PMU_IOC_CAN_SLEEP", 0x80044205}, ++{"linux/pmu.h", "PMU_IOC_GRAB_BACKLIGHT", 0x80044206}, ++{"linux/cciss_ioctl.h", "CCISS_GETHEARTBEAT", 0x80044206}, ++{"linux/cciss_ioctl.h", "CCISS_GETBUSTYPES", 0x80044207}, ++{"linux/cciss_ioctl.h", "CCISS_GETFIRMVER", 0x80044208}, ++{"linux/cciss_ioctl.h", "CCISS_GETDRIVVER", 0x80044209}, ++{"linux/capi.h", "CAPI_GET_FLAGS", 0x80044323}, ++{"linux/capi.h", "CAPI_SET_FLAGS", 0x80044324}, ++{"linux/capi.h", "CAPI_CLR_FLAGS", 0x80044325}, ++{"linux/capi.h", "CAPI_NCCI_OPENCOUNT", 0x80044326}, ++{"linux/capi.h", "CAPI_NCCI_GETUNIT", 0x80044327}, ++{"linux/input.h", "EVIOCGVERSION", 0x80044501}, ++{"linux/input.h", "EVIOCGEFFECTS", 0x80044584}, ++{"linux/arcfb.h", "FBIO_GETCONTROL2", 0x80044689}, ++{"linux/hiddev.h", "HIDIOCGVERSION", 0x80044801}, ++{"linux/hiddev.h", "HIDIOCGFLAG", 0x8004480e}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_VOLUME", 0x80044d00}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_BASS", 0x80044d01}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_TREBLE", 0x80044d02}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_SYNTH", 0x80044d03}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_PCM", 0x80044d04}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_SPEAKER", 0x80044d05}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_LINE", 0x80044d06}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_MIC", 0x80044d07}, ++{"mtd/mtd-abi.h", "MEMGETREGIONCOUNT", 0x80044d07}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_CD", 0x80044d08}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_IMIX", 0x80044d09}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_ALTPCM", 0x80044d0a}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_RECLEV", 0x80044d0b}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_IGAIN", 0x80044d0c}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_OGAIN", 0x80044d0d}, ++{"mtd/mtd-abi.h", "OTPSELECT", 0x80044d0d}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_LINE1", 0x80044d0e}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_LINE2", 0x80044d0f}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_LINE3", 0x80044d10}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_LOUD", 0x80044d1f}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_ENHANCE", 0x80044d1f}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_MUTE", 0x80044d1f}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_STEREODEVS", 0x80044dfb}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_CAPS", 0x80044dfc}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_RECMASK", 0x80044dfd}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_DEVMASK", 0x80044dfe}, ++{"linux/soundcard.h", "SOUND_MIXER_READ_RECSRC", 0x80044dff}, ++{"linux/ticable.h", "IOCTL_TIUSB_GET_MAXPS", 0x80044e23}, ++{"linux/ticable.h", "IOCTL_TIUSB_GET_DEVID", 0x80044e24}, ++{"linux/random.h", "RNDGETENTCNT", 0x80045200}, ++{"asm/ioctls.h", "TIOCGPTN", 0x80045430}, ++{"linux/videodev2.h", "VIDIOC_G_INPUT", 0x80045626}, ++{"linux/videodev2.h", "VIDIOC_G_OUTPUT", 0x8004562e}, ++{"linux/watchdog.h", "WDIOC_GETSTATUS", 0x80045701}, ++{"linux/watchdog.h", "WDIOC_GETBOOTSTATUS", 0x80045702}, ++{"linux/watchdog.h", "WDIOC_GETTEMP", 0x80045703}, ++{"linux/watchdog.h", "WDIOC_SETOPTIONS", 0x80045704}, ++{"linux/watchdog.h", "WDIOC_KEEPALIVE", 0x80045705}, ++{"linux/watchdog.h", "WDIOC_GETTIMEOUT", 0x80045707}, ++{"linux/watchdog.h", "WDIOC_GETPRETIMEOUT", 0x80045709}, ++{"linux/watchdog.h", "WDIOC_GETTIMELEFT", 0x8004570a}, ++{"linux/sonet.h", "SONET_GETDIAG", 0x80046114}, ++{"linux/sonet.h", "SONET_GETFRAMING", 0x80046116}, ++{"linux/cm4000_cs.h", "CM_IOCGSTATUS", 0x80046300}, ++{"linux/chio.h", "CHIOGPICKER", 0x80046304}, ++{"linux/video_decoder.h", "DECODER_GET_STATUS", 0x80046402}, ++{"linux/iflags.h", "IFLAGS_GET_IOC", 0x80046601}, ++{"linux/ext3_fs.h", "EXT3_IOC_GETFLAGS", 0x80046601}, ++{"linux/ext2_fs.h", "EXT2_IOC_GETFLAGS", 0x80046601}, ++{"linux/ext3_fs.h", "EXT3_IOC_GETVERSION", 0x80046603}, ++{"linux/ext3_fs.h", "EXT3_IOC_GETRSVSZ", 0x80046605}, ++{"linux/ext3_fs.h", "EXT3_IOC_WAIT_FOR_READONLY", 0x80046663}, ++{"linux/i2o-dev.h", "I2OVALIDATE", 0x80046908}, ++{"linux/ipmi.h", "IPMICTL_SET_GETS_EVENTS_CMD", 0x80046910}, ++{"linux/ipmi.h", "IPMICTL_SET_MY_ADDRESS_CMD", 0x80046911}, ++{"linux/ipmi.h", "IPMICTL_GET_MY_ADDRESS_CMD", 0x80046912}, ++{"linux/ipmi.h", "IPMICTL_SET_MY_LUN_CMD", 0x80046913}, ++{"linux/ipmi.h", "IPMICTL_GET_MY_LUN_CMD", 0x80046914}, ++{"linux/ipmi.h", "IPMICTL_SET_MY_CHANNEL_ADDRESS_CMD", 0x80046918}, ++{"linux/ipmi.h", "IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD", 0x80046919}, ++{"linux/ipmi.h", "IPMICTL_SET_MY_CHANNEL_LUN_CMD", 0x8004691a}, ++{"linux/ipmi.h", "IPMICTL_GET_MY_CHANNEL_LUN_CMD", 0x8004691b}, ++{"linux/i8k.h", "I8K_BIOS_VERSION", 0x80046980}, ++{"linux/i8k.h", "I8K_MACHINE_ID", 0x80046981}, ++{"linux/i8k.h", "I8K_POWER_STATUS", 0x80046982}, ++{"linux/i8k.h", "I8K_FN_STATUS", 0x80046983}, ++{"linux/i8k.h", "I8K_GET_TEMP", 0x80046984}, ++{"linux/joystick.h", "JSIOCGVERSION", 0x80046a01}, ++{"linux/udf_fs_i.h", "UDF_GETEASIZE", 0x80046c40}, ++{"linux/udf_fs_i.h", "UDF_GETEABLOCK", 0x80046c41}, ++{"linux/udf_fs_i.h", "UDF_GETVOLIDENT", 0x80046c42}, ++{"linux/mmtimer.h", "MMTIMER_GETRES", 0x80046d01}, ++{"linux/mmtimer.h", "MMTIMER_GETFREQ", 0x80046d02}, ++{"linux/mtio.h", "MTIOCPOS", 0x80046d03}, ++{"linux/mmtimer.h", "MMTIMER_GETCOUNTER", 0x80046d09}, ++{"linux/zftape.h", "MTIOC_ZFTAPE_GETBLKSZ", 0x80046d68}, ++{"linux/ncp_fs.h", "NCP_IOC_SIGN_WANTED", 0x80046e06}, ++{"linux/ncp_fs.h", "NCP_IOC_SETDENTRYTTL", 0x80046e0c}, ++{"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_CONNECTION", 0x80046ef8}, ++{"linux/matroxfb.h", "MATROXFB_GET_AVAILABLE_OUTPUTS", 0x80046ef9}, ++{"linux/matroxfb.h", "MATROXFB_GET_ALL_OUTPUTS", 0x80046efb}, ++{"linux/rtc.h", "RTC_IRQP_READ", 0x8004700b}, ++{"linux/rtc.h", "RTC_EPOCH_READ", 0x8004700d}, ++{"linux/ppdev.h", "PPCLRIRQ", 0x80047093}, ++{"linux/ppdev.h", "PPGETMODES", 0x80047097}, ++{"linux/ppdev.h", "PPGETMODE", 0x80047098}, ++{"linux/ppdev.h", "PPGETPHASE", 0x80047099}, ++{"linux/ppdev.h", "PPGETFLAGS", 0x8004709a}, ++{"linux/telephony.h", "PHONE_CAPABILITIES_LIST", 0x80047181}, ++{"linux/telephony.h", "PHONE_DTMF_READY", 0x80047196}, ++{"linux/telephony.h", "PHONE_GET_DTMF", 0x80047197}, ++{"linux/telephony.h", "PHONE_GET_DTMF_ASCII", 0x80047198}, ++{"linux/telephony.h", "PHONE_EXCEPTION", 0x8004719a}, ++{"linux/ixjuser.h", "IXJCTL_CARDTYPE", 0x800471c1}, ++{"linux/ixjuser.h", "IXJCTL_SERIAL", 0x800471c2}, ++{"linux/ixjuser.h", "IXJCTL_DSP_TYPE", 0x800471c3}, ++{"linux/ixjuser.h", "IXJCTL_DSP_VERSION", 0x800471c4}, ++{"linux/ixjuser.h", "IXJCTL_CID", 0x800471d4}, ++{"linux/ixjuser.h", "IXJCTL_VMWI", 0x800471d8}, ++{"linux/ixjuser.h", "IXJCTL_VERSION", 0x800471da}, ++{"linux/ixjuser.h", "IXJCTL_FRAMES_READ", 0x800471e2}, ++{"linux/ixjuser.h", "IXJCTL_FRAMES_WRITTEN", 0x800471e3}, ++{"linux/ixjuser.h", "IXJCTL_READ_WAIT", 0x800471e4}, ++{"linux/ixjuser.h", "IXJCTL_WRITE_WAIT", 0x800471e5}, ++{"linux/ixjuser.h", "IXJCTL_DRYBUFFER_READ", 0x800471e6}, ++{"linux/msdos_fs.h", "FAT_IOCTL_GET_ATTRIBUTES", 0x80047210}, ++{"linux/if_ppp.h", "PPPIOCGCHAN", 0x80047437}, ++{"linux/if_ppp.h", "PPPIOCGDEBUG", 0x80047441}, ++{"linux/if_ppp.h", "PPPIOCGMRU", 0x80047453}, ++{"linux/if_ppp.h", "PPPIOCGRASYNCMAP", 0x80047455}, ++{"linux/if_ppp.h", "PPPIOCGUNIT", 0x80047456}, ++{"linux/if_ppp.h", "PPPIOCGASYNCMAP", 0x80047458}, ++{"linux/if_ppp.h", "PPPIOCGFLAGS", 0x8004745a}, ++{"linux/isdn_ppp.h", "PPPIOCGMPFLAGS", 0x80047482}, ++{"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID32", 0x80047503}, ++{"linux/ext2_fs.h", "EXT2_IOC_GETVERSION", 0x80047601}, ++{"linux/ext3_fs.h", "EXT3_IOC_GETVERSION_OLD", 0x80047601}, ++{"linux/videodev.h", "VIDIOCGFREQ", 0x8004760e}, ++{"linux/meye.h", "MEYEIOC_STILLJCAPT", 0x800476c5}, ++{"linux/dn.h", "SIOCGNETADDR", 0x800489e1}, ++{"linux/dn.h", "OSIOCGNETADDR", 0x800489e1}, ++{"linux/auto_fs.h", "AUTOFS_IOC_PROTOVER", 0x80049363}, ++{"linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", 0x80049367}, ++{"linux/auto_fs4.h", "AUTOFS_IOC_ASKREGHOST", 0x80049368}, ++{"linux/auto_fs4.h", "AUTOFS_IOC_TOGGLEREGHOST", 0x80049369}, ++{"linux/auto_fs4.h", "AUTOFS_IOC_ASKUMOUNT", 0x80049370}, ++{"linux/sonet.h", "SONET_GETFRSENSE", 0x80066117}, ++{"linux/meye.h", "MEYEIOC_G_PARAMS", 0x800676c0}, ++{"linux/cciss_ioctl.h", "CCISS_GETPCIINFO", 0x80084201}, ++{"linux/cciss_ioctl.h", "CCISS_GETINTINFO", 0x80084202}, ++{"linux/input.h", "EVIOCGID", 0x80084502}, ++{"linux/input.h", "EVIOCGREP", 0x80084503}, ++{"linux/input.h", "EVIOCGKEYCODE", 0x80084504}, ++{"linux/random.h", "RNDGETPOOL", 0x80085202}, ++{"linux/videodev2.h", "VIDIOC_G_STD", 0x80085617}, ++{"linux/videodev2.h", "VIDIOC_QUERYSTD", 0x8008563f}, ++{"linux/i2o-dev.h", "I2OPASSTHRU", 0x8008690c}, ++{"linux/i2o-dev.h", "I2OPASSTHRU32", 0x8008690c}, ++{"linux/ipmi.h", "IPMICTL_SET_TIMING_PARMS_CMD", 0x80086916}, ++{"linux/ipmi.h", "IPMICTL_GET_TIMING_PARMS_CMD", 0x80086917}, ++{"linux/mtio.h", "MTIOCGETSIZE", 0x80086d09}, ++{"linux/ncp_fs.h", "NCP_IOC_SETPRIVATEDATA", 0x80086e0a}, ++{"linux/ppdev.h", "PPGETTIME", 0x80087095}, ++{"linux/if_ppp.h", "PPPIOCGIDLE", 0x8008743f}, ++{"linux/cciss_ioctl.h", "CCISS_GETLUNINFO", 0x800c4211}, ++{"mtd/mtd-abi.h", "OTPLOCK", 0x800c4d10}, ++{"linux/video_decoder.h", "DECODER_GET_CAPABILITIES", 0x800c6401}, ++{"linux/video_encoder.h", "ENCODER_GET_CAPABILITIES", 0x800c6501}, ++{"linux/hpet.h", "HPET_INFO", 0x800c6803}, ++{"linux/ncp_fs.h", "NCP_IOC_NCPREQUEST", 0x800c6e01}, ++{"linux/ncp_fs.h", "NCP_IOC_SETROOT", 0x800c6e08}, ++{"linux/ncp_fs.h", "NCP_IOC_SETOBJECTNAME", 0x800c6e09}, ++{"linux/videodev.h", "VIDIOCKEY", 0x800c760d}, ++{"linux/videodev.h", "VIDIOCGPICT", 0x800e7606}, ++{"linux/fd.h", "FDGETDRVTYP", 0x8010020f}, ++{"linux/cciss_ioctl.h", "CCISS_GETNODENAME", 0x80104204}, ++{"mtd/mtd-abi.h", "ECCGETSTATS", 0x80104d12}, ++{"linux/synclink.h", "MGSL_IOCGGPIO", 0x80106d11}, ++{"linux/isdn_ppp.h", "PPPIOCGIFNAME", 0x80107488}, ++{"linux/videotext.h", "VTXIOCGETINFO", 0x80108101}, ++{"linux/fd.h", "FDGETMAXERRS", 0x8014020e}, ++{"linux/chio.h", "CHIOGPARAMS", 0x80146306}, ++{"linux/ipmi.h", "IPMICTL_SEND_COMMAND", 0x8014690d}, ++{"linux/mtio.h", "MTIOCVOLINFO", 0x80146d08}, ++{"linux/ncp_fs.h", "NCP_IOC_LOCKUNLOCK", 0x80146e07}, ++{"linux/videodev.h", "VIDIOCGFBUF", 0x8014760b}, ++{"linux/videodev.h", "VIDIOCGUNIT", 0x80147615}, ++{"linux/videodev.h", "VIDIOCGCAPTURE", 0x80147616}, ++{"linux/fd.h", "FDWERRORGET", 0x80180217}, ++{"linux/ncp_fs.h", "NCP_IOC_SIGN_INIT", 0x80186e05}, ++{"linux/fd.h", "FDGETPRM", 0x801c0204}, ++{"linux/hiddev.h", "HIDIOCGDEVINFO", 0x801c4803}, ++{"linux/ipmi.h", "IPMICTL_SEND_COMMAND_SETTIME", 0x801c6915}, ++{"linux/mtio.h", "MTIOCGET", 0x801c6d02}, ++{"linux/rtc.h", "RTC_PLL_GET", 0x801c7011}, ++{"linux/fd.h", "FDGETFDCSTAT", 0x80200215}, ++{"linux/fb.h", "FBIOGET_VBLANK", 0x80204612}, ++{"mtd/mtd-abi.h", "MEMGETINFO", 0x80204d01}, ++{"linux/i2o-dev.h", "I2OGETIOPS", 0x80206900}, ++{"linux/synclink.h", "MGSL_IOCGPARAMS", 0x80206d01}, ++{"linux/if_ppp.h", "PPPIOCGXASYNCMAP", 0x80207450}, ++{"linux/isdn_ppp.h", "PPPIOCGCOMPRESSORS", 0x80207486}, ++{"linux/videodev.h", "VIDIOCGWIN", 0x80207609}, ++{"linux/videodev.h", "VIDIOCGVBIFMT", 0x8020761c}, ++{"linux/sonet.h", "SONET_GETSTAT", 0x80246110}, ++{"linux/sonet.h", "SONET_GETSTATZ", 0x80246111}, ++{"linux/joystick.h", "JSIOCGCORR", 0x80246a22}, ++{"linux/rtc.h", "RTC_ALM_READ", 0x80247008}, ++{"linux/rtc.h", "RTC_RD_TIME", 0x80247009}, ++{"linux/watchdog.h", "WDIOC_GETSUPPORT", 0x80285700}, ++{"linux/rtc.h", "RTC_WKALM_RD", 0x80287010}, ++{"linux/videodev.h", "VIDIOCGAUDIO", 0x80287610}, ++{"linux/ncp_fs.h", "NCP_IOC_SETCHARSETS", 0x802a6e0b}, ++{"linux/videodev2.h", "VIDIOC_G_FBUF", 0x802c560a}, ++{"linux/videodev2.h", "VIDIOC_CROPCAP_OLD", 0x802c563a}, ++{"linux/fd.h", "FDGETDRVSTAT", 0x80340212}, ++{"linux/fd.h", "FDPOLLDRVSTAT", 0x80340213}, ++{"linux/videodev2.h", "VIDIOC_G_AUDIO", 0x80345621}, ++{"linux/videodev2.h", "VIDIOC_G_AUDOUT", 0x80345631}, ++{"linux/videodev.h", "VIDIOCGCAP", 0x803c7601}, ++{"linux/joystick.h", "JSIOCGAXMAP", 0x80406a32}, ++{"linux/fd.h", "FDGETDRVPRM", 0x80580211}, ++{"linux/videodev2.h", "VIDIOC_QUERYCAP", 0x80685600}, ++{"linux/i2o-dev.h", "I2OEVTGET", 0x8068690b}, ++{"linux/chio.h", "CHIOGVPARAMS", 0x80706313}, ++{"linux/videodev2.h", "VIDIOC_G_SLICED_VBI_CAP", 0x80745645}, ++{"linux/videodev.h", "VIDIOCGMBUF", 0x80887614}, ++{"linux/videodev2.h", "VIDIOC_G_JPEGCOMP", 0x808c563d}, ++{"mtd/mtd-abi.h", "MEMGETOOBSEL", 0x80c84d0a}, ++{"linux/hiddev.h", "HIDIOCGSTRING", 0x81044804}, ++{"linux/auto_fs.h", "AUTOFS_IOC_EXPIRE", 0x810c9365}, ++{"linux/videodev.h", "VIDIOCGPLAYINFO", 0x8118761a}, ++{"mtd/mtd-abi.h", "ECCGETLAYOUT", 0x81484d11}, ++{"linux/joystick.h", "JSIOCGBTNMAP", 0x82006a34}, ++{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", 0x82187201}, ++{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", 0x82187202}, ++{"linux/agpgart.h", "AGPIOC_ALLOCATE", 0xc0044106}, ++{"linux/capi.h", "CAPI_GET_MANUFACTURER", 0xc0044306}, ++{"linux/capi.h", "CAPI_GET_SERIAL", 0xc0044308}, ++{"linux/gigaset_dev.h", "GIGASET_REDIR", 0xc0044700}, ++{"linux/gigaset_dev.h", "GIGASET_CONFIG", 0xc0044701}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_VOLUME", 0xc0044d00}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_BASS", 0xc0044d01}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_TREBLE", 0xc0044d02}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_SYNTH", 0xc0044d03}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_PCM", 0xc0044d04}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_SPEAKER", 0xc0044d05}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE", 0xc0044d06}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_MIC", 0xc0044d07}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_CD", 0xc0044d08}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_IMIX", 0xc0044d09}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_ALTPCM", 0xc0044d0a}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECLEV", 0xc0044d0b}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_IGAIN", 0xc0044d0c}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_OGAIN", 0xc0044d0d}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE1", 0xc0044d0e}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE2", 0xc0044d0f}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE3", 0xc0044d10}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_ENHANCE", 0xc0044d1f}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LOUD", 0xc0044d1f}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_MUTE", 0xc0044d1f}, ++{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECSRC", 0xc0044dff}, ++{"linux/videodev2.h", "VIDIOC_OVERLAY_OLD", 0xc004560e}, ++{"linux/videodev2.h", "VIDIOC_S_INPUT", 0xc0045627}, ++{"linux/videodev2.h", "VIDIOC_S_OUTPUT", 0xc004562f}, ++{"linux/watchdog.h", "WDIOC_SETTIMEOUT", 0xc0045706}, ++{"linux/watchdog.h", "WDIOC_SETPRETIMEOUT", 0xc0045708}, ++{"linux/sonet.h", "SONET_SETDIAG", 0xc0046112}, ++{"linux/sonet.h", "SONET_CLRDIAG", 0xc0046113}, ++{"linux/cm4000_cs.h", "CM_IOCGATR", 0xc0046301}, ++{"linux/coda.h", "CIOC_KERNEL_VERSION", 0xc004630a}, ++{"linux/i8k.h", "I8K_GET_SPEED", 0xc0046985}, ++{"linux/i8k.h", "I8K_GET_FAN", 0xc0046986}, ++{"linux/i8k.h", "I8K_SET_FAN", 0xc0046987}, ++{"linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", 0xc0046c43}, ++{"linux/synclink.h", "MGSL_IOCWAITEVENT", 0xc0046d08}, ++{"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_MODE", 0xc0046efa}, ++{"linux/telephony.h", "PHONE_QUERY_CODEC", 0xc00471a7}, ++{"linux/if_ppp.h", "PPPIOCNEWUNIT", 0xc004743e}, ++{"linux/toshiba.h", "TOSH_SMM", 0xc0047490}, ++{"linux/meye.h", "MEYEIOC_SYNC", 0xc00476c3}, ++{"linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT", 0xc0049364}, ++{"linux/capi.h", "CAPI_MANUFACTURER_CMD", 0xc0084320}, ++{"linux/videodev2.h", "VIDIOC_G_CTRL", 0xc008561b}, ++{"linux/videodev2.h", "VIDIOC_S_CTRL", 0xc008561c}, ++{"linux/ncp_fs.h", "NCP_IOC_GETPRIVATEDATA", 0xc0086e0a}, ++{"linux/if_ppp.h", "PPPIOCGNPMODE", 0xc008744c}, ++{"linux/hiddev.h", "HIDIOCGREPORTINFO", 0xc00c4809}, ++{"mtd/mtd-abi.h", "MEMWRITEOOB", 0xc00c4d03}, ++{"mtd/mtd-abi.h", "MEMREADOOB", 0xc00c4d04}, ++{"linux/uinput.h", "UI_BEGIN_FF_ERASE", 0xc00c55ca}, ++{"linux/ite_gpio.h", "ITE_GPIO_IN", 0xc00c5a00}, ++{"linux/atm_nicstar.h", "NS_GETPSTAT", 0xc00c6161}, ++{"linux/i2o-dev.h", "I2OHRTGET", 0xc00c6901}, ++{"linux/i2o-dev.h", "I2OLCTGET", 0xc00c6902}, ++{"linux/mtio.h", "MTIOCFTFORMAT", 0xc00c6d0a}, ++{"linux/ncp_fs.h", "NCP_IOC_GETOBJECTNAME", 0xc00c6e09}, ++{"linux/capi.h", "CAPI_GET_VERSION", 0xc0104307}, ++{"linux/gigaset_dev.h", "GIGASET_VERSION", 0xc0104703}, ++{"linux/hiddev.h", "HIDIOCGCOLLECTIONINFO", 0xc0104811}, ++{"mtd/mtd-abi.h", "MEMGETREGIONINFO", 0xc0104d08}, ++{"linux/videodev2.h", "VIDIOC_REQBUFS", 0xc0105608}, ++{"linux/mtio.h", "MTIOCRDFTSEG", 0xc0106d06}, ++{"linux/mtio.h", "MTIOCWRFTSEG", 0xc0106d07}, ++{"linux/synclink.h", "MGSL_IOCWAITGPIO", 0xc0106d12}, ++{"linux/videodev2.h", "VIDIOC_G_CROP", 0xc014563b}, ++{"linux/hiddev.h", "HIDIOCGUSAGE", 0xc018480b}, ++{"linux/hiddev.h", "HIDIOCGUCODE", 0xc018480d}, ++{"linux/videodev2.h", "VIDIOC_G_EXT_CTRLS", 0xc0185647}, ++{"linux/videodev2.h", "VIDIOC_S_EXT_CTRLS", 0xc0185648}, ++{"linux/videodev2.h", "VIDIOC_TRY_EXT_CTRLS", 0xc0185649}, ++{"linux/pktcdvd.h", "PACKET_CTRL_CMD", 0xc0185801}, ++{"linux/i2o-dev.h", "I2OPARMSET", 0xc0186903}, ++{"linux/i2o-dev.h", "I2OPARMGET", 0xc0186904}, ++{"linux/ipmi.h", "IPMICTL_RECEIVE_MSG_TRUNC", 0xc018690b}, ++{"linux/ipmi.h", "IPMICTL_RECEIVE_MSG", 0xc018690c}, ++{"linux/i2o-dev.h", "I2OSWDL", 0xc01c6905}, ++{"linux/i2o-dev.h", "I2OSWUL", 0xc01c6906}, ++{"linux/i2o-dev.h", "I2OSWDEL", 0xc01c6907}, ++{"linux/i2o-dev.h", "I2OHTML", 0xc01c6909}, ++{"linux/mtio.h", "MTIOCFTCMD", 0xc0206d0b}, ++{"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO_V2", 0xc0246e04}, ++{"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO", 0xc0286e04}, ++{"linux/ncp_fs.h", "NCP_IOC_GETCHARSETS", 0xc02a6e0b}, ++{"linux/videodev2.h", "VIDIOC_QUERYMENU", 0xc02c5625}, ++{"linux/videodev2.h", "VIDIOC_G_FREQUENCY", 0xc02c5638}, ++{"linux/videodev2.h", "VIDIOC_CROPCAP", 0xc02c563a}, ++{"linux/videodev.h", "VIDIOCGCHAN", 0xc0307602}, ++{"linux/uinput.h", "UI_BEGIN_FF_UPLOAD", 0xc03455c8}, ++{"linux/videodev2.h", "VIDIOC_G_AUDIO_OLD", 0xc0345621}, ++{"linux/videodev2.h", "VIDIOC_G_AUDOUT_OLD", 0xc0345631}, ++{"linux/videodev2.h", "VIDIOC_ENUMAUDIO", 0xc0345641}, ++{"linux/videodev2.h", "VIDIOC_ENUMAUDOUT", 0xc0345642}, ++{"linux/videodev.h", "VIDIOCGTUNER", 0xc0347604}, ++{"linux/hiddev.h", "HIDIOCGFIELDINFO", 0xc038480a}, ++{"linux/capi.h", "CAPI_GET_PROFILE", 0xc0404309}, ++{"linux/videodev2.h", "VIDIOC_ENUM_FMT", 0xc0405602}, ++{"linux/videodev2.h", "VIDIOC_ENUMSTD", 0xc0405619}, ++{"linux/videodev2.h", "VIDIOC_QUERYBUF", 0xc0445609}, ++{"linux/videodev2.h", "VIDIOC_QBUF", 0xc044560f}, ++{"linux/videodev2.h", "VIDIOC_DQBUF", 0xc0445611}, ++{"linux/videodev2.h", "VIDIOC_QUERYCTRL", 0xc0445624}, ++{"linux/videodev2.h", "VIDIOC_G_MODULATOR", 0xc0445636}, ++{"linux/fb.h", "FBIO_CURSOR", 0xc0484608}, ++{"linux/videodev2.h", "VIDIOC_ENUMOUTPUT", 0xc0485630}, ++{"linux/videodev2.h", "VIDIOC_ENUMINPUT", 0xc04c561a}, ++{"linux/cciss_ioctl.h", "CCISS_PASSTHRU", 0xc054420b}, ++{"linux/videodev2.h", "VIDIOC_G_TUNER", 0xc054561d}, ++{"linux/cciss_ioctl.h", "CCISS_BIG_PASSTHRU", 0xc0584212}, ++{"linux/isdn_ppp.h", "PPPIOCGCALLINFO", 0xc0887480}, ++{"linux/videodev2.h", "VIDIOC_G_FMT", 0xc0cc5604}, ++{"linux/videodev2.h", "VIDIOC_S_FMT", 0xc0cc5605}, ++{"linux/videodev2.h", "VIDIOC_G_PARM", 0xc0cc5615}, ++{"linux/videodev2.h", "VIDIOC_S_PARM", 0xc0cc5616}, ++{"linux/videodev2.h", "VIDIOC_TRY_FMT", 0xc0cc5640}, ++{"linux/dm-ioctl.h", "DM_VERSION", 0xc134fd00}, ++{"linux/dm-ioctl.h", "DM_VERSION_32", 0xc134fd00}, ++{"linux/dm-ioctl.h", "DM_REMOVE_ALL_32", 0xc134fd01}, ++{"linux/dm-ioctl.h", "DM_REMOVE_ALL", 0xc134fd01}, ++{"linux/dm-ioctl.h", "DM_LIST_DEVICES_32", 0xc134fd02}, ++{"linux/dm-ioctl.h", "DM_LIST_DEVICES", 0xc134fd02}, ++{"linux/dm-ioctl.h", "DM_DEV_CREATE_32", 0xc134fd03}, ++{"linux/dm-ioctl.h", "DM_DEV_CREATE", 0xc134fd03}, ++{"linux/dm-ioctl.h", "DM_DEV_REMOVE", 0xc134fd04}, ++{"linux/dm-ioctl.h", "DM_DEV_REMOVE_32", 0xc134fd04}, ++{"linux/dm-ioctl.h", "DM_DEV_RENAME_32", 0xc134fd05}, ++{"linux/dm-ioctl.h", "DM_DEV_RENAME", 0xc134fd05}, ++{"linux/dm-ioctl.h", "DM_DEV_SUSPEND_32", 0xc134fd06}, ++{"linux/dm-ioctl.h", "DM_DEV_SUSPEND", 0xc134fd06}, ++{"linux/dm-ioctl.h", "DM_DEV_STATUS", 0xc134fd07}, ++{"linux/dm-ioctl.h", "DM_DEV_STATUS_32", 0xc134fd07}, ++{"linux/dm-ioctl.h", "DM_DEV_WAIT", 0xc134fd08}, ++{"linux/dm-ioctl.h", "DM_DEV_WAIT_32", 0xc134fd08}, ++{"linux/dm-ioctl.h", "DM_TABLE_LOAD", 0xc134fd09}, ++{"linux/dm-ioctl.h", "DM_TABLE_LOAD_32", 0xc134fd09}, ++{"linux/dm-ioctl.h", "DM_TABLE_CLEAR_32", 0xc134fd0a}, ++{"linux/dm-ioctl.h", "DM_TABLE_CLEAR", 0xc134fd0a}, ++{"linux/dm-ioctl.h", "DM_TABLE_DEPS_32", 0xc134fd0b}, ++{"linux/dm-ioctl.h", "DM_TABLE_DEPS", 0xc134fd0b}, ++{"linux/dm-ioctl.h", "DM_TABLE_STATUS", 0xc134fd0c}, ++{"linux/dm-ioctl.h", "DM_TABLE_STATUS_32", 0xc134fd0c}, ++{"linux/dm-ioctl.h", "DM_LIST_VERSIONS", 0xc134fd0d}, ++{"linux/dm-ioctl.h", "DM_LIST_VERSIONS_32", 0xc134fd0d}, ++{"linux/dm-ioctl.h", "DM_TARGET_MSG", 0xc134fd0e}, ++{"linux/dm-ioctl.h", "DM_TARGET_MSG_32", 0xc134fd0e}, ++{"linux/dm-ioctl.h", "DM_DEV_SET_GEOMETRY_32", 0xc134fd0f}, ++{"linux/dm-ioctl.h", "DM_DEV_SET_GEOMETRY", 0xc134fd0f}, ++{"linux/hiddev.h", "HIDIOCGUSAGES", 0xd01c4813}, +Index: strace-4.5.16/linux/avr32/ioctlent.sh +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ strace-4.5.16/linux/avr32/ioctlent.sh 2008-05-11 15:36:30.000000000 +0200 +@@ -0,0 +1,124 @@ ++#!/bin/sh ++# Copyright (c) 1993, 1994, 1995 Rick Sladkey ++# All rights reserved. ++# ++# Copyright (c) 1995, 1996 Michael Elizabeth Chastain ++# All rights reserved. ++# ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions ++# are met: ++# 1. Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# 2. Redistributions in binary form must reproduce the above copyright ++# notice, this list of conditions and the following disclaimer in the ++# documentation and/or other materials provided with the distribution. ++# 3. The name of the author may not be used to endorse or promote products ++# derived from this software without specific prior written permission. ++# ++# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++# Files to find. ++file_find='asm/*.h linux/*.h scsi/*.h mtd/*.h' ++ ++# Files to stop. ++file_stop='asm/byteorder.h linux/config.h linux/elf-em.h linux/pci_ids.h linux/xd.h linux/reiserfs_fs.h linux/usbdevice_fs.h' ++ ++# Defs to find. ++# Work on the kernel source to convert all to df_iowr. ++# Don't know how to find low-numbered ioctls in linux/mc146818rtc.h. ++df_name='^[ ]*#[ ]*define[ ]+[A-Z_][A-Z0-9_]*[ ]+' ++df_iowr='_IO|_IOR|_IOW|_IOWR' ++df_NNNN='0[Xx](03|06|22|46|4B|4C|53|54|56|89|90)[0-9A-Fa-f][0-9A-Fa-f]' ++df_4359='0[Xx]4359[0-9A-Fa-f][0-9A-Fa-f]' # linux/cyclades.h ++df_470N='470[0-9]' # linux/fs.h (only in 1.2.13) ++df_smix='MIXER_READ|MIXER_WRITE' # linux/soundcard.h ++df_12NN='12[3-4][0-9]' # linux/umsdos_fs.h (only in 1.2.13) ++df_tail='([() ]|$)' ++def_find="$df_name($df_iowr|$df_NNNN|$df_4359|$df_470N|$df_smix|$df_12NN)$df_tail" ++ ++# Defs to stop. ++ds_tail='_MAGIC|_PATCH' ++ds_fdmp='FD(DEF|GET|SET)MEDIAPRM' # linux/fd.h aliases (only in 1.2.13) ++ds_mtio='MTIOC(GET|SET)CONFIG' # linux/mtio.h needs config (only in 1.2.13) ++ds_soundcard='_SIO(RW?|W)?' ++def_stop="$ds_tail|$ds_fdmp|$ds_mtio|$ds_soundcard" ++ ++# Validate arg count. ++if [ $# -ne 1 ] ++then ++ echo "usage: $0 include-directory" >&2 ++ exit 1 ++fi ++ ++# Grep through the files. ++( ++ # Construct list: find files minus stop files. ++ cd $1 || exit ++ file_list=`(ls $file_find $file_stop $file_stop 2>/dev/null) | sort | uniq -u` ++ ++ # Grep matching #define lines. ++ # Transform to C structure form. ++ # Filter out stop list. ++ egrep "$def_find" $file_list | ++ sed -n -e 's/^\(.*\):#[ ]*define[ ]*\([A-Z_][A-Z0-9_]*\).*$/ { "\1", "\2", \2 },/p' | ++ egrep -v "$def_stop" ++) > ioctlent.tmp ++ ++# Generate the output file. ++echo '/* This file is automatically generated by ioctlent.sh */' ++echo ++echo '#include ' ++echo '#include ' ++echo '#include ' ++echo ++echo '/* Needed for */' ++echo '#define BAYCOM_DEBUG' ++echo ++echo '/* Needed for */' ++echo '#define CONFIG_COMPAT' ++echo ++echo '/* Needed for */' ++echo '#define CONFIG_JBD_DEBUG' ++echo ++echo '/* Needed for */' ++echo '#define LP_STATS' ++echo ++echo '/* Needed for */' ++echo '#define __OLD_VIDIOC_' ++echo ++echo '/* Needed for */' ++echo '#define ZFT_OBSOLETE' ++echo ++echo '/* Needed for */' ++echo '#include ' ++echo ++echo '/* Needed for */' ++echo '#include ' ++#echo '#include ' ++echo ++echo '/* Needed for */' ++echo '#include ' ++echo '#include ' ++echo ++echo '/* Needed for */' ++echo '#include ' ++echo ++awk '{ print "#include <" substr($2, 2, length($2) - 3) ">" }' ioctlent.tmp | sort -u ++echo ++echo 'struct ioctlent ioctlent [] =' ++echo '{' ++cat ioctlent.tmp ++echo '};' ++ ++# Clean up. ++rm -f ioctlent.tmp +Index: strace-4.5.16/linux/avr32/syscallent.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ strace-4.5.16/linux/avr32/syscallent.h 2008-05-11 15:36:30.000000000 +0200 +@@ -0,0 +1,307 @@ ++/* ++ * Copyright (c) 2004-2006 Atmel Corporation ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. The name of the author may not be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * $Id$ ++ */ ++ ++ { 0, 0, sys_setup, "setup" }, /* 0 */ ++ { 1, TP, sys_exit, "_exit" }, /* 1 */ ++ { 0, TP, sys_fork, "fork" }, /* 2 */ ++ { 3, 0, sys_read, "read" }, /* 3 */ ++ { 3, 0, sys_write, "write" }, /* 4 */ ++ { 3, TF, sys_open, "open" }, /* 5 */ ++ { 1, 0, sys_close, "close" }, /* 6 */ ++ { 1, 0, sys_umask, "umask" }, /* 7 */ ++ { 2, TF, sys_creat, "creat" }, /* 8 */ ++ { 2, TF, sys_link, "link" }, /* 9 */ ++ { 1, TF, sys_unlink, "unlink" }, /* 10 */ ++ { 3, TF|TP, sys_execve, "execve" }, /* 11 */ ++ { 1, TF, sys_chdir, "chdir" }, /* 12 */ ++ { 1, 0, sys_time, "time" }, /* 13 */ ++ { 3, TF, sys_mknod, "mknod" }, /* 14 */ ++ { 2, TF, sys_chmod, "chmod" }, /* 15 */ ++ { 3, TF, sys_chown, "chown" }, /* 16 */ ++ { 3, TF, sys_chown, "lchown" }, /* 17 */ ++ { 3, 0, sys_lseek, "lseek" }, /* 18 */ ++ { 5, 0, sys_llseek, "_llseek" }, /* 19 */ ++ { 0, 0, sys_getpid, "getpid" }, /* 20 */ ++ { 5, TF, sys_mount, "mount" }, /* 21 */ ++ { 2, TF, sys_umount, "umount" }, /* 22 */ ++ { 1, 0, sys_setuid, "setuid" }, /* 23 */ ++ { 0, 0, sys_getuid, "getuid" }, /* 24 */ ++ { 1, 0, sys_stime, "stime" }, /* 25 */ ++ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ ++ { 1, 0, sys_alarm, "alarm" }, /* 27 */ ++ { 0, TS, sys_pause, "pause" }, /* 28 */ ++ { 2, TF, sys_utime, "utime" }, /* 29 */ ++ { 2, TF, sys_stat, "stat" }, /* 30 */ ++ { 2, 0, sys_fstat, "fstat" }, /* 31 */ ++ { 2, TF, sys_lstat, "lstat" }, /* 32 */ ++ { 2, TF, sys_access, "access" }, /* 33 */ ++ { 1, TF, sys_chroot, "chroot" }, /* 34 */ ++ { 0, 0, sys_sync, "sync" }, /* 35 */ ++ { 1, 0, sys_fsync, "fsync" }, /* 36 */ ++ { 2, TS, sys_kill, "kill" }, /* 37 */ ++ { 2, TF, sys_rename, "rename" }, /* 38 */ ++ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */ ++ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */ ++ { 1, 0, sys_dup, "dup" }, /* 41 */ ++ { 1, 0, sys_pipe, "pipe" }, /* 42 */ ++ { 1, 0, sys_times, "times" }, /* 43 */ ++ { 5, TP, sys_clone, "clone" }, /* 44 */ ++ { 1, 0, sys_brk, "brk" }, /* 45 */ ++ { 1, 0, sys_setgid, "setgid" }, /* 46 */ ++ { 0, 0, sys_getgid, "getgid" }, /* 47 */ ++ { 2, TF, sys_getcwd, "getcwd" }, /* 48 */ ++ { 0, 0, sys_geteuid, "geteuid" }, /* 49 */ ++ { 0, 0, sys_getegid, "getegid" }, /* 50 */ ++ { 1, TF, sys_acct, "acct" }, /* 51 */ ++ { 1, 0, sys_setfsuid, "setfsuid" }, /* 52 */ ++ { 1, 0, sys_setfsgid, "setfsgid" }, /* 53 */ ++ { 3, 0, sys_ioctl, "ioctl" }, /* 54 */ ++ { 3, 0, sys_fcntl, "fcntl" }, /* 55 */ ++ { 2, 0, sys_setpgid, "setpgid" }, /* 56 */ ++ { 4, 0, sys_mremap, "mremap" }, /* 57 */ ++ { 3, 0, sys_setresuid, "setresuid" }, /* 58 */ ++ { 3, 0, sys_getresuid, "getresuid" }, /* 59 */ ++ { 2, 0, sys_setreuid, "setreuid" }, /* 60 */ ++ { 2, 0, sys_setregid, "setregid" }, /* 61 */ ++ { 2, 0, sys_ustat, "ustat" }, /* 62 */ ++ { 2, 0, sys_dup2, "dup2" }, /* 63 */ ++ { 0, 0, sys_getppid, "getppid" }, /* 64 */ ++ { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */ ++ { 0, 0, sys_setsid, "setsid" }, /* 66 */ ++ { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 67 */ ++ { 1, TS, printargs, "rt_sigreturn" }, /* 68 */ ++ { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 69 */ ++ { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 70 */ ++ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 71 */ ++ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 72 */ ++ { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 73 */ ++ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */ ++ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */ ++ { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */ ++ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */ ++ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */ ++ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */ ++ { 2, 0, sys_getgroups, "getgroups" }, /* 80 */ ++ { 2, 0, sys_setgroups, "setgroups" }, /* 81 */ ++ { 5, 0, sys_select, "select" }, /* 82 */ ++ { 2, TF, sys_symlink, "symlink" }, /* 83 */ ++ { 1, 0, sys_fchdir, "fchdir" }, /* 84 */ ++ { 3, TF, sys_readlink, "readlink" }, /* 85 */ ++ { 5, TF, sys_pread, "pread" }, /* 86 */ ++ { 5, TF, sys_pwrite, "pwrite" }, /* 87 */ ++ { 1, TF, sys_swapon, "swapon" }, /* 88 */ ++ { 3, 0, sys_reboot, "reboot" }, /* 89 */ ++ { 6, 0, sys_mmap, "mmap" }, /* 90 */ ++ { 2, 0, sys_munmap, "munmap" }, /* 91 */ ++ { 2, TF, sys_truncate, "truncate" }, /* 92 */ ++ { 2, 0, sys_ftruncate, "ftruncate" }, /* 93 */ ++ { 2, 0, sys_fchmod, "fchmod" }, /* 94 */ ++ { 3, 0, sys_fchown, "fchown" }, /* 95 */ ++ { 2, 0, sys_getpriority, "getpriority" }, /* 96 */ ++ { 3, 0, sys_setpriority, "setpriority" }, /* 97 */ ++ { 4, TP, sys_wait4, "wait4" }, /* 98 */ ++ { 2, TF, sys_statfs, "statfs" }, /* 99 */ ++ { 2, 0, sys_fstatfs, "fstatfs" }, /* 100 */ ++ { 0, 0, sys_vhangup, "vhangup" }, /* 101 */ ++ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 102 */ ++ { 3, 0, sys_syslog, "syslog" }, /* 103 */ ++ { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ ++ { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ ++ { 1, 0, sys_swapoff, "swapoff" }, /* 106 */ ++ { 1, 0, sys_sysinfo, "sysinfo" }, /* 107 */ ++ { 6, 0, sys_ipc, "ipc" }, /* 108 */ ++ { 4, TF, sys_sendfile, "sendfile" }, /* 109 */ ++ { 2, 0, sys_setdomainname, "setdomainname" }, /* 110 */ ++ { 1, 0, sys_uname, "uname" }, /* 111 */ ++ { 1, 0, sys_adjtimex, "adjtimex" }, /* 112 */ ++ { 3, 0, sys_mprotect, "mprotect" }, /* 113 */ ++ { 0, TP, sys_vfork, "vfork" }, /* 114 */ ++ { 2, 0, sys_init_module, "init_module" }, /* 115 */ ++ { 1, 0, sys_delete_module, "delete_module" }, /* 116 */ ++ { 4, 0, sys_quotactl, "quotactl" }, /* 117 */ ++ { 1, 0, sys_getpgid, "getpgid" }, /* 118 */ ++ { 0, 0, sys_bdflush, "bdflush" }, /* 119 */ ++ { 3, 0, sys_sysfs, "sysfs" }, /* 120 */ ++ { 1, 0, sys_personality, "personality" }, /* 121 */ ++ { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 122 */ ++ { 3, 0, sys_getdents, "getdents" }, /* 123 */ ++ { 2, 0, sys_flock, "flock" }, /* 124 */ ++ { 3, 0, sys_msync, "msync" }, /* 125 */ ++ { 3, 0, sys_readv, "readv" }, /* 126 */ ++ { 3, 0, sys_writev, "writev" }, /* 127 */ ++ { 1, 0, sys_getsid, "getsid" }, /* 128 */ ++ { 1, 0, sys_fdatasync, "fdatasync" }, /* 129 */ ++ { 1, 0, sys_sysctl, "_sysctl" }, /* 130 */ ++ { 2, 0, sys_mlock, "mlock" }, /* 131 */ ++ { 2, 0, sys_munlock, "munlock" }, /* 132 */ ++ { 2, 0, sys_mlockall, "mlockall" }, /* 133 */ ++ { 0, 0, sys_munlockall, "munlockall" }, /* 134 */ ++ { 0, 0, sys_sched_setparam, "sched_setparam"}, /* 135 */ ++ { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 136 */ ++ { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 137 */ ++ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 138 */ ++ { 0, 0, sys_sched_yield, "sched_yield"}, /* 139 */ ++ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 140 */ ++ { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 141 */ ++ { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 142 */ ++ { 2, 0, sys_nanosleep, "nanosleep" }, /* 143 */ ++ { 3, 0, sys_poll, "poll" }, /* 144 */ ++ { 3, 0, printargs, "nfsservctl" }, /* 145 */ ++ { 3, 0, sys_setresgid, "setresgid" }, /* 146 */ ++ { 3, 0, sys_getresgid, "getresgid" }, /* 147 */ ++ { 5, 0, sys_prctl, "prctl" }, /* 148 */ ++ { 3, TN, sys_socket, "socket" }, /* 149 */ ++ { 3, TN, sys_bind, "bind" }, /* 150 */ ++ { 3, TN, sys_connect, "connect" }, /* 151 */ ++ { 2, TN, sys_listen, "listen" }, /* 152 */ ++ { 3, TN, sys_accept, "accept" }, /* 153 */ ++ { 3, TN, sys_getsockname, "getsockname" }, /* 154 */ ++ { 3, TN, sys_getpeername, "getpeername" }, /* 155 */ ++ { 4, TN, sys_socketpair, "socketpair" }, /* 156 */ ++ { 4, TN, sys_send, "send" }, /* 157 */ ++ { 4, TN, sys_recv, "recv" }, /* 158 */ ++ { 6, TN, sys_sendto, "sendto" }, /* 159 */ ++ { 6, TN, sys_recvfrom, "recvfrom" }, /* 160 */ ++ { 2, TN, sys_shutdown, "shutdown" }, /* 161 */ ++ { 5, TN, sys_setsockopt, "setsockopt" }, /* 162 */ ++ { 5, TN, sys_getsockopt, "getsockopt" }, /* 163 */ ++ { 3, TN, sys_sendmsg, "sendmsg" }, /* 164 */ ++ { 3, TN, sys_recvmsg, "recvmsg" }, /* 165 */ ++ { 3, TF, sys_truncate64, "truncate64" }, /* 166 */ ++ { 3, TF, sys_ftruncate64, "ftruncate64" }, /* 167 */ ++ { 2, TF, sys_stat64, "stat64" }, /* 168 */ ++ { 2, TF, sys_lstat64, "lstat64" }, /* 169 */ ++ { 2, TF, sys_fstat64, "fstat64" }, /* 170 */ ++ { 2, TF, sys_pivotroot, "pivot_root" }, /* 171 */ ++ { 3, 0, printargs, "mincore" }, /* 172 */ ++ { 3, 0, sys_madvise, "madvise" }, /* 173 */ ++ { 4, 0, sys_getdents64, "getdents64" }, /* 174 */ ++ { 3, 0, sys_fcntl, "fcntl64" }, /* 175 */ ++ { 0, 0, printargs, "gettid" }, /* 176 */ ++ { 4, 0, sys_readahead, "readahead" }, /* 177 */ ++ { 5, TF, sys_setxattr, "setxattr" }, /* 178 */ ++ { 5, TF, sys_setxattr, "lsetxattr" }, /* 179 */ ++ { 5, 0, sys_fsetxattr, "fsetxattr" }, /* 180 */ ++ { 4, TF, sys_getxattr, "getxattr" }, /* 181 */ ++ { 4, TF, sys_getxattr, "lgetxattr" }, /* 182 */ ++ { 4, 0, sys_fgetxattr, "fgetxattr" }, /* 183 */ ++ { 3, TF, sys_listxattr, "listxattr" }, /* 184 */ ++ { 3, TF, sys_listxattr, "llistxattr" }, /* 185 */ ++ { 3, 0, sys_flistxattr, "flistxattr" }, /* 186 */ ++ { 2, TF, sys_removexattr, "removexattr" }, /* 187 */ ++ { 2, TF, sys_removexattr, "lremovexattr" }, /* 188 */ ++ { 2, 0, sys_fremovexattr, "fremovexattr" }, /* 189 */ ++ { 2, TS, sys_kill, "tkill" }, /* 190 */ ++ { 4, TF, sys_sendfile64, "sendfile64" }, /* 191 */ ++ { 5, 0, sys_futex, "futex" }, /* 192 */ ++ { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 193 */ ++ { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 194 */ ++ { 2, 0, sys_capget, "capget" }, /* 195 */ ++ { 2, 0, sys_capset, "capset" }, /* 196 */ ++ { 2, 0, sys_io_setup, "io_setup" }, /* 197 */ ++ { 1, 0, sys_io_destroy, "io_destroy" }, /* 198 */ ++ { 5, 0, sys_io_getevents, "io_getevents" }, /* 199 */ ++ { 3, 0, sys_io_submit, "io_submit" }, /* 200 */ ++ { 3, 0, sys_io_cancel, "io_cancel" }, /* 201 */ ++ { 6, 0, sys_fadvise64, "fadvise64" }, /* 202 */ ++ { 1, TP, sys_exit, "exit_group" }, /* 203 */ ++ { 4, 0, printargs, "lookup_dcookie"}, /* 204 */ ++ { 1, 0, sys_epoll_create, "epoll_create" }, /* 205 */ ++ { 4, 0, sys_epoll_ctl, "epoll_ctl" }, /* 206 */ ++ { 4, 0, sys_epoll_wait, "epoll_wait" }, /* 207 */ ++ { 5, 0, sys_remap_file_pages, "remap_file_pages"}, /* 208 */ ++ { 1, 0, printargs, "set_tid_address"}, /* 209 */ ++ { 3, 0, sys_timer_create, "timer_create" }, /* 210 */ ++ { 4, 0, sys_timer_settime, "timer_settime" }, /* 211 */ ++ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 212 */ ++ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 213 */ ++ { 1, 0, sys_timer_delete, "timer_delete" }, /* 214 */ ++ { 2, 0, sys_clock_settime, "clock_settime" }, /* 215 */ ++ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 216 */ ++ { 2, 0, sys_clock_getres, "clock_getres" }, /* 217 */ ++ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 218 */ ++ { 3, TF, sys_statfs64, "statfs64" }, /* 219 */ ++ { 3, 0, sys_fstatfs64, "fstatfs64" }, /* 220 */ ++ { 3, TS, sys_tgkill, "tgkill" }, /* 221 */ ++ { 5, 0, printargs, "SYS_222" }, /* 222 */ ++ { 2, TF, sys_utimes, "utimes" }, /* 223 */ ++ { 6, 0, sys_fadvise64_64, "fadvise64_64" }, /* 224 */ ++ { 3, 0, printargs, "cacheflush" }, /* 225 */ ++ { 0, 0, printargs, "vserver" }, /* 226 */ ++ { 4, 0, sys_mq_open, "mq_open" }, /* 227 */ ++ { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 228 */ ++ { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 229 */ ++ { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 230 */ ++ { 2, 0, sys_mq_notify, "mq_notify" }, /* 231 */ ++ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 232 */ ++ { 4, 0, printargs, "kexec_load" }, /* 233 */ ++ { 1, 0, sys_waitid, "waitid" }, /* 234 */ ++ { 5, 0, printargs, "add_key" }, /* 235 */ ++ { 4, 0, printargs, "request_key" }, /* 236 */ ++ { 5, 0, printargs, "keyctl" }, /* 237 */ ++ { 3, 0, printargs, "ioprio_set" }, /* 238 */ ++ { 2, 0, printargs, "ioprio_get" }, /* 239 */ ++ { 1, 0, printargs, "inotify_init" }, /* 240 */ ++ { 3, 0, sys_inotify_add_watch, "inotify_add_watch" }, /* 241 */ ++ { 2, 0, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 242 */ ++ { 4, 0, sys_openat, "openat" }, /* 243 */ ++ { 3, 0, sys_mkdirat, "mkdirat" }, /* 244 */ ++ { 4, 0, sys_mknodat, "mknodat" }, /* 245 */ ++ { 5, 0, sys_fchownat, "fchownat" }, /* 246 */ ++ { 3, 0, sys_futimesat, "futimesat" }, /* 247 */ ++ { 4, 0, printargs, "fstatat64" }, /* 248 */ ++ { 3, 0, sys_unlinkat, "unlinkat" }, /* 249 */ ++ { 4, 0, sys_renameat, "renameat" }, /* 250 */ ++ { 5, 0, sys_linkat, "linkat" }, /* 251 */ ++ { 3, 0, sys_symlinkat, "symlinkat" }, /* 252 */ ++ { 4, 0, sys_readlinkat, "readlinkat" }, /* 253 */ ++ { 3, 0, sys_fchmodat, "fchmodat" }, /* 254 */ ++ { 3, 0, sys_faccessat, "faccessat" }, /* 255 */ ++ { 6, 0, sys_pselect6, "pselect6" }, /* 256 */ ++ { 5, 0, sys_ppoll, "ppoll" }, /* 257 */ ++ { 1, 0, sys_unshare, "unshare" }, /* 258 */ ++ { 2, 0, printargs, "set_robust_list" }, /* 259 */ ++ { 3, 0, printargs, "get_robust_list" }, /* 260 */ ++ { 6, 0, printargs, "splice" }, /* 261 */ ++ { 4, 0, printargs, "sync_file_range" }, /* 262 */ ++ { 4, 0, printargs, "tee" }, /* 263 */ ++ { 4, 0, printargs, "vmsplice" }, /* 264 */ ++ { 6, 0, printargs, "sys_epoll_pwait" }, /* 265 */ ++ { 2, TI, sys_msgget, "msgget" }, /* 266 */ ++ { 4, TI, sys_msgsnd, "msgsnd" }, /* 267 */ ++ { 5, TI, sys_msgrcv, "msgrcv" }, /* 268 */ ++ { 3, TI, sys_msgctl, "msgctl" }, /* 269 */ ++ { 3, TI, sys_semget, "semget" }, /* 270 */ ++ { 3, TI, sys_semop, "semop" }, /* 271 */ ++ { 4, TI, sys_semctl, "semctl" }, /* 272 */ ++ { 4, TI, sys_semtimedop, "semtimedop" }, /* 273 */ ++ { 3, TI, sys_shmat, "shmat" }, /* 274 */ ++ { 3, TI, sys_shmget, "shmget" }, /* 275 */ ++ { 1, TI, sys_shmdt, "shmdt" }, /* 276 */ ++ { 3, TI, sys_shmctl, "shmctl" }, /* 277 */ +Index: strace-4.5.16/Makefile.am +=================================================================== +--- strace-4.5.16.orig/Makefile.am 2007-07-03 04:07:28.000000000 +0200 ++++ strace-4.5.16/Makefile.am 2008-05-11 15:36:30.000000000 +0200 +@@ -29,6 +29,7 @@ + linux/alpha/errnoent.h linux/alpha/ioctlent.h \ + linux/alpha/signalent.h linux/alpha/syscallent.h \ + linux/arm/syscallent.h \ ++ linux/avr32/syscallent.h \ + linux/hppa/errnoent.h linux/hppa/ioctlent.h \ + linux/hppa/signalent.h linux/hppa/syscallent.h \ + linux/ia64/syscallent.h linux/ia64/errnoent.h \ +Index: strace-4.5.16/Makefile.in +=================================================================== +--- strace-4.5.16.orig/Makefile.in 2007-08-03 12:24:40.000000000 +0200 ++++ strace-4.5.16/Makefile.in 2008-05-11 15:36:30.000000000 +0200 +@@ -217,6 +217,7 @@ + linux/alpha/errnoent.h linux/alpha/ioctlent.h \ + linux/alpha/signalent.h linux/alpha/syscallent.h \ + linux/arm/syscallent.h \ ++ linux/avr32/syscallent.h \ + linux/hppa/errnoent.h linux/hppa/ioctlent.h \ + linux/hppa/signalent.h linux/hppa/syscallent.h \ + linux/ia64/syscallent.h linux/ia64/errnoent.h \ +Index: strace-4.5.16/process.c +=================================================================== +--- strace-4.5.16.orig/process.c 2007-08-02 04:13:05.000000000 +0200 ++++ strace-4.5.16/process.c 2008-05-11 15:36:30.000000000 +0200 +@@ -714,6 +714,10 @@ + return -1; + + return 0; ++#elif defined(AVR32) ++ if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_R8), new) < 0) ++ return -1; ++ return 0; + #else + #warning Do not know how to handle change_syscall for this architecture + #endif /* architecture */ +@@ -794,6 +798,28 @@ + if (errno) + return -1; + } ++#elif defined(AVR32) ++ { ++ errno = 0; ++ if (argnum == 0) ++ ptrace(PTRACE_POKEUSER, tcp->pid, ++ (char *)(REG_R12_ORIG), ++ tcp->u_arg[argnum]); ++ else if (argnum < 4) ++ /* r11 .. r9 */ ++ ptrace(PTRACE_POKEUSER, tcp->pid, ++ (char *)(REG_R12 - 4 * argnum), ++ tcp->u_arg[argnum]); ++ else if (argnum < 6) ++ /* r6 .. r5 */ ++ ptrace(PTRACE_POKEUSER, tcp->pid, ++ (char *)(REG_R10 - 4 * argnum), ++ tcp->u_arg[argnum]); ++ else ++ return -E2BIG; ++ if (errno) ++ return -1; ++ } + #else + # warning Sorry, setargs not implemented for this architecture. + #endif +@@ -2888,8 +2914,27 @@ + { uoff(regs.ARM_pc), "pc" }, + { uoff(regs.ARM_cpsr), "cpsr" }, + #endif +- +-#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) ++#ifdef AVR32 ++ { uoff(regs.sr), "sr" }, ++ { uoff(regs.pc), "pc" }, ++ { uoff(regs.lr), "lr" }, ++ { uoff(regs.sp), "sp" }, ++ { uoff(regs.r12), "r12" }, ++ { uoff(regs.r11), "r11" }, ++ { uoff(regs.r10), "r10" }, ++ { uoff(regs.r9), "r9" }, ++ { uoff(regs.r8), "r8" }, ++ { uoff(regs.r7), "r7" }, ++ { uoff(regs.r6), "r6" }, ++ { uoff(regs.r5), "r5" }, ++ { uoff(regs.r4), "r4" }, ++ { uoff(regs.r3), "r3" }, ++ { uoff(regs.r2), "r2" }, ++ { uoff(regs.r1), "r1" }, ++ { uoff(regs.r0), "r0" }, ++ { uoff(regs.r12_orig), "orig_r12" }, ++#endif ++#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) && !defined(AVR32) + { uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" }, + #endif + #if defined(I386) || defined(X86_64) +@@ -2905,20 +2950,20 @@ + #if !defined(SPARC64) + { uoff(start_code), "offsetof(struct user, start_code)" }, + #endif +-#ifdef SH64 ++#if defined(SH64) || defined(AVR32) + { uoff(start_data), "offsetof(struct user, start_data)" }, + #endif + #if !defined(SPARC64) + { uoff(start_stack), "offsetof(struct user, start_stack)" }, + #endif + { uoff(signal), "offsetof(struct user, signal)" }, +-#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SH64) && !defined(SPARC64) ++#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SH64) && !defined(SPARC64) && !defined(AVR32) + { uoff(reserved), "offsetof(struct user, reserved)" }, + #endif + #if !defined(SPARC64) + { uoff(u_ar0), "offsetof(struct user, u_ar0)" }, + #endif +-#if !defined(ARM) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) ++#if !defined(ARM) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) && !defined(AVR32) + { uoff(u_fpstate), "offsetof(struct user, u_fpstate)" }, + #endif + { uoff(magic), "offsetof(struct user, magic)" }, +Index: strace-4.5.16/syscall.c +=================================================================== +--- strace-4.5.16.orig/syscall.c 2008-05-11 15:36:09.000000000 +0200 ++++ strace-4.5.16/syscall.c 2008-05-11 15:36:30.000000000 +0200 +@@ -809,6 +809,8 @@ + static long r9; + #elif defined(X86_64) + static long rax; ++#elif defined(AVR32) ++ static struct pt_regs regs; + #endif + #endif /* LINUX */ + #ifdef FREEBSD +@@ -1273,7 +1275,26 @@ + return 0; + } + } +-#endif /* SH64 */ ++#elif defined(AVR32) ++ /* ++ * Read complete register set in one go. ++ */ ++ if (ptrace(PTRACE_GETREGS, pid, NULL, ®s) < 0) ++ return -1; ++ ++ /* ++ * We only need to grab the syscall number on syscall entry. ++ */ ++ if (!(tcp->flags & TCB_INSYSCALL)) { ++ scno = regs.r8; ++ ++ /* Check if we return from execve. */ ++ if (tcp->flags & TCB_WAITEXECVE) { ++ tcp->flags &= ~TCB_WAITEXECVE; ++ return 0; ++ } ++ } ++#endif /* AVR32 */ + #endif /* LINUX */ + #ifdef SUNOS4 + if (upeek(pid, uoff(u_arg[7]), &scno) < 0) +@@ -1632,6 +1653,17 @@ + tcp->u_rval = r9; + u_error = 0; + } ++#else ++#ifdef AVR32 ++ if (regs.r12 && (unsigned) -regs.r12 < nerrnos) { ++ tcp->u_rval = -1; ++ u_error = -regs.r12; ++ } ++ else { ++ tcp->u_rval = regs.r12; ++ u_error = 0; ++ } ++#endif /* AVR32 */ + #endif /* SH64 */ + #endif /* SH */ + #endif /* HPPA */ +@@ -1857,6 +1889,12 @@ + r9 = error ? -error : rval; + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)REG_GENERAL(9), r9) < 0) + return -1; ++#else ++#ifdef AVR32 ++ regs.r12 = error ? -error : rval; ++ if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)REG_R12, regs.r12) < 0) ++ return -1; ++#endif /* AVR32 */ + #endif /* SH64 */ + #endif /* SH */ + #endif /* HPPA */ +@@ -2129,6 +2167,14 @@ + return -1; + } + } ++#elif defined(AVR32) ++ tcp->u_nargs = sysent[tcp->scno].nargs; ++ tcp->u_arg[0] = regs.r12; ++ tcp->u_arg[1] = regs.r11; ++ tcp->u_arg[2] = regs.r10; ++ tcp->u_arg[3] = regs.r9; ++ tcp->u_arg[4] = regs.r5; ++ tcp->u_arg[5] = regs.r3; + #else /* Other architecture (like i386) (32bits specific) */ + { + int i; +@@ -2391,7 +2437,7 @@ + + switch (known_scno(tcp)) { + #ifdef LINUX +-#if !defined (ALPHA) && !defined(SPARC) && !defined(SPARC64) && !defined(MIPS) && !defined(HPPA) ++#if !defined (ALPHA) && !defined(SPARC) && !defined(SPARC64) && !defined(MIPS) && !defined(HPPA) && !defined(AVR32) + #ifdef __NR_socketcall + case SYS_socketcall: + decode_subcall(tcp, SYS_socket_subcall, +@@ -2404,7 +2450,7 @@ + SYS_ipc_nsubcalls, shift_style); + break; + #endif +-#endif /* !ALPHA && !MIPS && !SPARC && !SPARC64 && !HPPA */ ++#endif /* !ALPHA && !MIPS && !SPARC && !SPARC64 && !HPPA && !AVR32 */ + #if defined (SPARC) || defined (SPARC64) + case SYS_socketcall: + sparc_socket_decode (tcp); +Index: strace-4.5.16/util.c +=================================================================== +--- strace-4.5.16.orig/util.c 2007-08-02 04:22:06.000000000 +0200 ++++ strace-4.5.16/util.c 2008-05-11 15:36:30.000000000 +0200 +@@ -1076,6 +1076,9 @@ + #elif defined(SH64) + if (upeek(tcp->pid, REG_PC ,&pc) < 0) + return -1; ++#elif defined(AVR32) ++ if (upeek(tcp->pid, REG_PC, &pc) < 0) ++ return -1; + #endif + return pc; + #endif /* LINUX */ +@@ -1224,6 +1227,14 @@ + return; + } + tprintf("[%08lx] ", pc); ++#elif defined(AVR32) ++ long pc; ++ ++ if (upeek(tcp->pid, REG_PC, &pc) < 0) { ++ tprintf("[????????] "); ++ return; ++ } ++ tprintf("[%08lx] ", pc); + #endif /* !architecture */ + #endif /* LINUX */ + +@@ -1405,6 +1416,9 @@ + # define arg0_offset (REG_OFFSET+16) + # define arg1_offset (REG_OFFSET+24) + # define restore_arg0(tcp, state, val) 0 ++# elif defined (AVR32) ++# define arg0_offset (REG_R12) ++# define arg1_offset (REG_R11) + # else + # define arg0_offset 0 + # define arg1_offset 4 diff --git a/utils/strace/patches-4.5.16/004-mips64_support.patch b/utils/strace/patches-4.5.16/004-mips64_support.patch new file mode 100644 index 0000000..f582054 --- /dev/null +++ b/utils/strace/patches-4.5.16/004-mips64_support.patch @@ -0,0 +1,3342 @@ +2007-08-26 Daniel Jacobowitz + + * defs.h: Include . + (MAX_QUALS): Update for MIPS. + (LINUX_MIPSO32, LINUX_MIPSN32, LINUX_MIPSN64, LINUX_MIPS64): Define. + (struct tcb): Add ext_arg for MIPS N32. + (TCB_WAITEXECVE): Define for MIPS. + (ALIGN64): Use LINUX_MIPSO32. + * file.c (sys_lseek): Use ext_arg for MIPS N32. + (sys_readahead, sys_fadvise64_64): Likewise. + * io.c (sys_pread64, sys_pwrite64): Likewise. + * mem.c (print_mmap): Take OFFSET argument. + (sys_old_mmap): Update call to print_mmap. + (sys_mmap): Use ext_arg for MIPS N32. + * process.c (struct_user_offsets): Add MIPS registers. + * signal.c (sys_sigreturn): Handle MIPS N32 and MIPS N64. Correct + MIPS O32 call to sprintsigmask. + * syscall.c (internal_syscall): Handle MIPS N32. Check for + TCB_WAITEXECVE on MIPS. + (force_result): Add a comment about MIPS N32. + (syscall_enter): Handle MIPS N32 and MIPS N64. + * linux/syscall.h (sys_pread64, sys_pwrite64): Declare. + * linux/mips/syscallent.h: Include "dummy.h". Handle alternate + MIPS ABIs. + +Index: defs.h +=================================================================== +RCS file: /cvsroot/strace/strace/defs.h,v +retrieving revision 1.75 +diff -u -p -r1.75 defs.h +--- strace/defs.h 24 Jul 2007 01:57:11 -0000 1.75 ++++ strace/defs.h 26 Aug 2007 19:13:45 -0000 +@@ -33,6 +33,10 @@ + #include "config.h" + #endif + ++#ifdef MIPS ++#include ++#endif ++ + #ifdef linux + #include + #endif +@@ -47,7 +51,7 @@ + /* configuration section */ + #ifndef MAX_QUALS + #if defined(LINUX) && defined(MIPS) +-#define MAX_QUALS 5000 /* maximum number of syscalls, signals, etc. */ ++#define MAX_QUALS 7000 /* maximum number of syscalls, signals, etc. */ + #else + #define MAX_QUALS 2048 /* maximum number of syscalls, signals, etc. */ + #endif +@@ -97,6 +101,17 @@ + # if defined(AVR32) + # define LINUX_AVR32 + # endif ++# if defined(MIPS) && _MIPS_SIM == _MIPS_SIM_ABI32 ++# define LINUX_MIPSO32 ++# endif ++# if defined(MIPS) && _MIPS_SIM == _MIPS_SIM_NABI32 ++# define LINUX_MIPSN32 ++# define LINUX_MIPS64 ++# endif ++# if defined(MIPS) && _MIPS_SIM == _MIPS_SIM_ABI64 ++# define LINUX_MIPSN64 ++# define LINUX_MIPS64 ++# endif + #endif + + #if defined(SVR4) || defined(FREEBSD) +@@ -277,6 +292,9 @@ struct tcb { + long scno; /* System call number */ + int u_nargs; /* System call arguments */ + long u_arg[MAX_ARGS]; /* System call arguments */ ++#if defined (LINUX_MIPSN32) ++ long long ext_arg[MAX_ARGS]; /* System call arguments */ ++#endif + int u_error; /* Error code */ + long u_rval; /* (first) return value */ + #ifdef HAVE_LONG_LONG +@@ -330,7 +348,7 @@ struct tcb { + #define TCB_FOLLOWFORK 00400 /* Process should have forks followed */ + #define TCB_REPRINT 01000 /* We should reprint this syscall on exit */ + #ifdef LINUX +-# if defined(ALPHA) || defined(SPARC) || defined(SPARC64) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) || defined(ARM) || defined(AVR32) ++# if defined(ALPHA) || defined(SPARC) || defined(SPARC64) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) || defined(ARM) || defined(MIPS) + # define TCB_WAITEXECVE 02000 /* ignore SIGTRAP after exceve */ + # endif + # define TCB_CLONE_DETACHED 04000 /* CLONE_DETACHED set in creating syscall */ +@@ -594,7 +612,7 @@ extern const int nsignals2; + + #if defined(FREEBSD) || (defined(LINUX) \ + && defined(POWERPC) && !defined(__powerpc64__)) \ +- || (defined (LINUX) && defined (MIPS) && !defined(__mips64)) ++ || defined (LINUX_MIPSO32) + /* ARRGH! off_t args are aligned on 64 bit boundaries! */ + #define ALIGN64(tcp,arg) \ + do { \ +Index: file.c +=================================================================== +RCS file: /cvsroot/strace/strace/file.c,v +retrieving revision 1.87 +diff -u -p -r1.87 file.c +--- strace/file.c 7 Aug 2007 01:22:49 -0000 1.87 ++++ strace/file.c 26 Aug 2007 19:13:46 -0000 +@@ -494,6 +494,27 @@ static const struct xlat whence[] = { + }; + + #ifndef HAVE_LONG_LONG_OFF_T ++#if defined (LINUX_MIPSN32) ++int ++sys_lseek(tcp) ++struct tcb *tcp; ++{ ++ long long offset; ++ int _whence; ++ ++ if (entering(tcp)) { ++ tprintf("%ld, ", tcp->u_arg[0]); ++ offset = tcp->ext_arg[1]; ++ _whence = tcp->u_arg[2]; ++ if (_whence == SEEK_SET) ++ tprintf("%llu, ", offset); ++ else ++ tprintf("%lld, ", offset); ++ printxval(whence, _whence, "SEEK_???"); ++ } ++ return RVAL_UDECIMAL; ++} ++#else /* !LINUX_MIPSN32 */ + int + sys_lseek(tcp) + struct tcb *tcp; +@@ -513,6 +534,7 @@ struct tcb *tcp; + } + return RVAL_UDECIMAL; + } ++#endif /* LINUX_MIPSN32 */ + #endif + + #ifdef LINUX +@@ -552,7 +574,9 @@ struct tcb *tcp; + { + if (entering(tcp)) { + tprintf("%ld, %lld, %ld", tcp->u_arg[0], +-# if defined IA64 || defined X86_64 || defined ALPHA ++# if defined LINUX_MIPSN32 ++ tcp->ext_arg[1], tcp->u_arg[2] ++# elif defined IA64 || defined X86_64 || defined ALPHA || defined LINUX_MIPSN64 + (long long int) tcp->u_arg[1], tcp->u_arg[2] + # else + LONG_LONG(tcp->u_arg[1], tcp->u_arg[2]), tcp->u_arg[3] +@@ -2822,7 +2846,10 @@ struct tcb *tcp; + if (entering(tcp)) { + tprintf("%ld, %lld, %lld, ", + tcp->u_arg[0], +-# if defined IA64 || defined X86_64 || defined ALPHA ++#if defined LINUX_MIPSN32 ++ tcp->ext_arg[1], tcp->ext_arg[2]); ++ printxval(advise, tcp->u_arg[3], "POSIX_FADV_???"); ++#elif defined IA64 || defined X86_64 || defined ALPHA || defined LINUX_MIPSN64 + (long long int) tcp->u_arg[1], (long long int) tcp->u_arg[2]); + printxval(advise, tcp->u_arg[3], "POSIX_FADV_???"); + #else +Index: io.c +=================================================================== +RCS file: /cvsroot/strace/strace/io.c,v +retrieving revision 1.21 +diff -u -p -r1.21 io.c +--- strace/io.c 13 Dec 2006 17:08:08 -0000 1.21 ++++ strace/io.c 26 Aug 2007 19:13:46 -0000 +@@ -360,8 +360,12 @@ struct tcb *tcp; + tprintf("%#lx", tcp->u_arg[1]); + else + printstr(tcp, tcp->u_arg[1], tcp->u_rval); ++#ifdef MIPS_LINUXN32 ++ tprintf(", %lu, %#llx", tcp->u_arg[2], tcp->ext_arg[3]); ++#else + tprintf(", %lu, %#llx", tcp->u_arg[2], + LONG_LONG(tcp->u_arg[3], tcp->u_arg[4])); ++#endif + } + return 0; + } +@@ -374,8 +378,12 @@ struct tcb *tcp; + ALIGN64 (tcp, 3); + tprintf("%ld, ", tcp->u_arg[0]); + printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); ++#ifdef MIPS_LINUXN32 ++ tprintf(", %lu, %#llx", tcp->u_arg[2], tcp->ext_arg[3]); ++#else + tprintf(", %lu, %#llx", tcp->u_arg[2], + LONG_LONG(tcp->u_arg[3], tcp->u_arg[4])); ++#endif + } + return 0; + } +Index: mem.c +=================================================================== +RCS file: /cvsroot/strace/strace/mem.c,v +retrieving revision 1.40 +diff -u -p -r1.40 mem.c +--- strace/mem.c 24 Jul 2007 01:52:58 -0000 1.40 ++++ strace/mem.c 26 Aug 2007 19:13:46 -0000 +@@ -191,9 +191,10 @@ static const struct xlat mmap_flags[] = + #if !HAVE_LONG_LONG_OFF_T + static + int +-print_mmap(tcp,u_arg) ++print_mmap(tcp,u_arg, offset) + struct tcb *tcp; + long *u_arg; ++long long offset; + { + if (entering(tcp)) { + /* addr */ +@@ -216,7 +217,7 @@ long *u_arg; + /* fd (is always int, not long) */ + tprintf(", %d, ", (int)u_arg[4]); + /* offset */ +- tprintf("%#lx", u_arg[5]); ++ tprintf("%#llx", offset); + } + return RVAL_HEX; + } +@@ -265,7 +266,7 @@ struct tcb *tcp; + if (umoven(tcp, tcp->u_arg[0], sizeof u_arg, (char *) u_arg) == -1) + return 0; + #endif // defined(IA64) +- return print_mmap(tcp, u_arg); ++ return print_mmap(tcp, u_arg, u_arg[5]); + + } + #endif +@@ -274,6 +275,8 @@ int + sys_mmap(tcp) + struct tcb *tcp; + { ++ long long offset = tcp->u_arg[5]; ++ + #if defined(LINUX) && defined(SH64) + /* + * Old mmap differs from new mmap in specifying the +@@ -281,9 +284,12 @@ struct tcb *tcp; + * pretend it's in byte units so the user only ever + * sees bytes in the printout. + */ +- tcp->u_arg[5] <<= PAGE_SHIFT; ++ offset <<= PAGE_SHIFT; ++#endif ++#if defined(LINUX_MIPSN32) ++ offset = tcp->ext_arg[5]; + #endif +- return print_mmap(tcp, tcp->u_arg); ++ return print_mmap(tcp, tcp->u_arg, offset); + } + #endif /* !HAVE_LONG_LONG_OFF_T */ + +Index: process.c +=================================================================== +RCS file: /cvsroot/strace/strace/process.c,v +retrieving revision 1.107 +diff -u -p -r1.107 process.c +--- strace/process.c 2 Aug 2007 02:13:05 -0000 1.107 ++++ strace/process.c 26 Aug 2007 19:13:47 -0000 +@@ -2934,6 +2934,79 @@ const struct xlat struct_user_offsets[] + { uoff(regs.r0), "r0" }, + { uoff(regs.r12_orig), "orig_r12" }, + #endif ++#ifdef MIPS ++ { 0, "r0" }, ++ { 1, "r1" }, ++ { 2, "r2" }, ++ { 3, "r3" }, ++ { 4, "r4" }, ++ { 5, "r5" }, ++ { 6, "r6" }, ++ { 7, "r7" }, ++ { 8, "r8" }, ++ { 9, "r9" }, ++ { 10, "r10" }, ++ { 11, "r11" }, ++ { 12, "r12" }, ++ { 13, "r13" }, ++ { 14, "r14" }, ++ { 15, "r15" }, ++ { 16, "r16" }, ++ { 17, "r17" }, ++ { 18, "r18" }, ++ { 19, "r19" }, ++ { 20, "r20" }, ++ { 21, "r21" }, ++ { 22, "r22" }, ++ { 23, "r23" }, ++ { 24, "r24" }, ++ { 25, "r25" }, ++ { 26, "r26" }, ++ { 27, "r27" }, ++ { 28, "r28" }, ++ { 29, "r29" }, ++ { 30, "r30" }, ++ { 31, "r31" }, ++ { 32, "f0" }, ++ { 33, "f1" }, ++ { 34, "f2" }, ++ { 35, "f3" }, ++ { 36, "f4" }, ++ { 37, "f5" }, ++ { 38, "f6" }, ++ { 39, "f7" }, ++ { 40, "f8" }, ++ { 41, "f9" }, ++ { 42, "f10" }, ++ { 43, "f11" }, ++ { 44, "f12" }, ++ { 45, "f13" }, ++ { 46, "f14" }, ++ { 47, "f15" }, ++ { 48, "f16" }, ++ { 49, "f17" }, ++ { 50, "f18" }, ++ { 51, "f19" }, ++ { 52, "f20" }, ++ { 53, "f21" }, ++ { 54, "f22" }, ++ { 55, "f23" }, ++ { 56, "f24" }, ++ { 57, "f25" }, ++ { 58, "f26" }, ++ { 59, "f27" }, ++ { 60, "f28" }, ++ { 61, "f29" }, ++ { 62, "f30" }, ++ { 63, "f31" }, ++ { 64, "pc" }, ++ { 65, "cause" }, ++ { 66, "badvaddr" }, ++ { 67, "mmhi" }, ++ { 68, "mmlo" }, ++ { 69, "fpcsr" }, ++ { 70, "fpeir" }, ++#endif + #if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) && !defined(AVR32) + { uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" }, + #endif +Index: signal.c +=================================================================== +RCS file: /cvsroot/strace/strace/signal.c,v +retrieving revision 1.61 +diff -u -p -r1.61 signal.c +--- strace/signal.c 2 Aug 2007 01:15:59 -0000 1.61 ++++ strace/signal.c 26 Aug 2007 19:13:47 -0000 +@@ -1424,6 +1424,32 @@ struct tcb *tcp; + } + return 0; + #else ++#if defined (LINUX_MIPSN32) || defined (LINUX_MIPSN64) ++ /* This decodes rt_sigreturn. The 64-bit ABIs do not have ++ sigreturn. */ ++ long sp; ++ struct ucontext uc; ++ ++ if(entering(tcp)) { ++ tcp->u_arg[0] = 0; ++ if (upeek(tcp->pid, REG_SP, &sp) < 0) ++ return 0; ++ /* There are six words followed by a 128-byte siginfo. */ ++ sp = sp + 6 * 4 + 128; ++ if (umove(tcp, sp, &uc) < 0) ++ return 0; ++ tcp->u_arg[0] = 1; ++ tcp->u_arg[1] = *(long *) &uc.uc_sigmask; ++ } else { ++ tcp->u_rval = tcp->u_error = 0; ++ if(tcp->u_arg[0] == 0) ++ return 0; ++ tcp->auxstr = sprintsigmask("mask now ", ++ (sigset_t *) &tcp->u_arg[1], 0); ++ return RVAL_NONE | RVAL_STR; ++ } ++ return 0; ++#else + #ifdef MIPS + long sp; + struct sigcontext sc; +@@ -1444,7 +1470,8 @@ struct tcb *tcp; + tcp->u_rval = tcp->u_error = 0; + if(tcp->u_arg[0] == 0) + return 0; +- tcp->auxstr = sprintsigmask("mask now ", tcp->u_arg[1], 0); ++ tcp->auxstr = sprintsigmask("mask now ", ++ (sigset_t *) &tcp->u_arg[1], 0); + return RVAL_NONE | RVAL_STR; + } + return 0; +@@ -1453,6 +1480,7 @@ struct tcb *tcp; + #warning (no problem, just a reminder :-) + return 0; + #endif /* MIPS */ ++#endif /* LINUX_MIPSN32 || LINUX_MIPSN64 */ + #endif /* SPARC || SPARC64 */ + #endif /* ALPHA */ + #endif /* !M68K */ +Index: syscall.c +=================================================================== +RCS file: /cvsroot/strace/strace/syscall.c,v +retrieving revision 1.89 +diff -u -p -r1.89 syscall.c +--- strace/syscall.c 22 Aug 2007 21:43:30 -0000 1.89 ++++ strace/syscall.c 26 Aug 2007 19:13:48 -0000 +@@ -798,6 +798,9 @@ internal_syscall(struct tcb *tcp) + #elif defined (SPARC) || defined (SPARC64) + static struct regs regs; + static unsigned long trap; ++#elif defined(LINUX_MIPSN32) ++ static long long a3; ++ static long long r2; + #elif defined(MIPS) + static long a3; + static long r2; +@@ -1102,14 +1105,44 @@ struct tcb *tcp; + #elif defined (M68K) + if (upeek(pid, 4*PT_ORIG_D0, &scno) < 0) + return -1; ++#elif defined (LINUX_MIPSN32) ++ unsigned long long regs[38]; ++ ++ if (ptrace (PTRACE_GETREGS, pid, NULL, (long) ®s) < 0) ++ return -1; ++ a3 = regs[REG_A3]; ++ r2 = regs[REG_V0]; ++ ++ if(!(tcp->flags & TCB_INSYSCALL)) { ++ scno = r2; ++ ++ /* Check if we return from execve. */ ++ if (scno == 0 && tcp->flags & TCB_WAITEXECVE) { ++ tcp->flags &= ~TCB_WAITEXECVE; ++ return 0; ++ } ++ ++ if (scno < 0 || scno > nsyscalls) { ++ if(a3 == 0 || a3 == -1) { ++ if(debug) ++ fprintf (stderr, "stray syscall exit: v0 = %ld\n", scno); ++ return 0; ++ } ++ } ++ } + #elif defined (MIPS) + if (upeek(pid, REG_A3, &a3) < 0) + return -1; +- + if(!(tcp->flags & TCB_INSYSCALL)) { + if (upeek(pid, REG_V0, &scno) < 0) + return -1; + ++ /* Check if we return from execve. */ ++ if (scno == 0 && tcp->flags & TCB_WAITEXECVE) { ++ tcp->flags &= ~TCB_WAITEXECVE; ++ return 0; ++ } ++ + if (scno < 0 || scno > nsyscalls) { + if(a3 == 0 || a3 == -1) { + if(debug) +@@ -1768,6 +1801,7 @@ force_result(tcp, error, rval) + r2 = rval; + a3 = 0; + } ++ /* PTRACE_POKEUSER is OK even for n32 since rval is only a long. */ + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_A3), a3) < 0 || + ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_V0), r2) < 0) + return -1; +@@ -1993,6 +2027,27 @@ struct tcb *tcp; + tcp->u_nargs = 5; + } + } ++#elif defined (LINUX_MIPSN32) || defined (LINUX_MIPSN64) ++ /* N32 and N64 both use up to six registers. */ ++ { ++ unsigned long long regs[38]; ++ int i, nargs; ++ ++ if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1) ++ nargs = tcp->u_nargs = sysent[tcp->scno].nargs; ++ else ++ nargs = tcp->u_nargs = MAX_ARGS; ++ ++ if (ptrace (PTRACE_GETREGS, pid, NULL, (long) ®s) < 0) ++ return -1; ++ ++ for(i = 0; i < nargs; i++) { ++ tcp->u_arg[i] = regs[REG_A0 + i]; ++# if defined (LINUX_MIPSN32) ++ tcp->ext_arg[i] = regs[REG_A0 + i]; ++# endif ++ } ++ } + #elif defined (MIPS) + { + long sp; +Index: linux/syscall.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/syscall.h,v +retrieving revision 1.55 +diff -u -p -r1.55 syscall.h +--- strace/linux/syscall.h 2 Aug 2007 01:37:55 -0000 1.55 ++++ strace/linux/syscall.h 26 Aug 2007 19:13:48 -0000 +@@ -317,3 +317,5 @@ int sys_capget(), sys_capset(); + #ifdef M68K + int sys_cacheflush(); + #endif ++ ++int sys_pread64(), sys_pwrite64(); +Index: linux/mips/syscallent.h +=================================================================== +RCS file: /cvsroot/strace/strace/linux/mips/syscallent.h,v +retrieving revision 1.28 +diff -u -p -r1.28 syscallent.h +--- strace/linux/mips/syscallent.h 2 Aug 2007 01:44:14 -0000 1.28 ++++ strace/linux/mips/syscallent.h 26 Aug 2007 19:13:51 -0000 +@@ -1,3 +1,5 @@ ++#include "dummy.h" ++ + { 0, 0, printargs, "svr4_syscall" }, /* 000 */ + { 0, 0, printargs, "svr4_exit" }, /* 001 */ + { 0, 0, printargs, "svr4_fork" }, /* 002 */ +@@ -3998,6 +4000,8 @@ + { 0, 0, printargs, "SYS_3997" }, /* 3997 */ + { 0, 0, printargs, "SYS_3998" }, /* 3998 */ + { 0, 0, printargs, "SYS_3999" }, /* 3999 */ /* end of POSIX */ ++#if !defined (LINUX_MIPSN32) && !defined (LINUX_MIPSN64) ++ /* For an O32 strace, decode the o32 syscalls. */ + { 8, 0, printargs, "syscall" }, /* 4000 */ /* start of Linux o32 */ + { 1, TP, sys_exit, "exit" }, /* 4001 */ + { 0, TP, sys_fork, "fork" }, /* 4002 */ +@@ -4161,8 +4165,8 @@ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 4160 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 4161 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 4162 */ +- { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max" }, /* 4163 */ +- { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min" }, /* 4164 */ ++ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 4163 */ ++ { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 4164 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 4165 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 4166 */ + { 4, 0, sys_mremap, "mremap" }, /* 4167 */ +@@ -4318,6 +4322,328 @@ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 4317 */ + { 4, TD, sys_timerfd, "timerfd" }, /* 4318 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 4319 */ ++#else ++ { 0, 0, printargs, "o32_syscall" }, /* 4000 */ ++ { 0, 0, printargs, "o32_exit" }, /* 4001 */ ++ { 0, 0, printargs, "o32_fork" }, /* 4002 */ ++ { 0, 0, printargs, "o32_read" }, /* 4003 */ ++ { 0, 0, printargs, "o32_write" }, /* 4004 */ ++ { 0, 0, printargs, "o32_open" }, /* 4005 */ ++ { 0, 0, printargs, "o32_close" }, /* 4006 */ ++ { 0, 0, printargs, "o32_waitpid" }, /* 4007 */ ++ { 0, 0, printargs, "o32_creat" }, /* 4008 */ ++ { 0, 0, printargs, "o32_link" }, /* 4009 */ ++ { 0, 0, printargs, "o32_unlink" }, /* 4010 */ ++ { 0, 0, printargs, "o32_execve" }, /* 4011 */ ++ { 0, 0, printargs, "o32_chdir" }, /* 4012 */ ++ { 0, 0, printargs, "o32_time" }, /* 4013 */ ++ { 0, 0, printargs, "o32_mknod" }, /* 4014 */ ++ { 0, 0, printargs, "o32_chmod" }, /* 4015 */ ++ { 0, 0, printargs, "o32_lchown" }, /* 4016 */ ++ { 0, 0, printargs, "o32_break" }, /* 4017 */ ++ { 0, 0, printargs, "o32_oldstat" }, /* 4018 */ ++ { 0, 0, printargs, "o32_lseek" }, /* 4019 */ ++ { 0, 0, printargs, "o32_getpid" }, /* 4020 */ ++ { 0, 0, printargs, "o32_mount" }, /* 4021 */ ++ { 0, 0, printargs, "o32_oldumount" }, /* 4022 */ ++ { 0, 0, printargs, "o32_setuid" }, /* 4023 */ ++ { 0, 0, printargs, "o32_getuid" }, /* 4024 */ ++ { 0, 0, printargs, "o32_stime" }, /* 4025 */ ++ { 0, 0, printargs, "o32_ptrace" }, /* 4026 */ ++ { 0, 0, printargs, "o32_alarm" }, /* 4027 */ ++ { 0, 0, printargs, "o32_oldfstat" }, /* 4028 */ ++ { 0, 0, printargs, "o32_pause" }, /* 4029 */ ++ { 0, 0, printargs, "o32_utime" }, /* 4030 */ ++ { 0, 0, printargs, "o32_stty" }, /* 4031 */ ++ { 0, 0, printargs, "o32_gtty" }, /* 4032 */ ++ { 0, 0, printargs, "o32_access" }, /* 4033 */ ++ { 0, 0, printargs, "o32_nice" }, /* 4034 */ ++ { 0, 0, printargs, "o32_ftime" }, /* 4035 */ ++ { 0, 0, printargs, "o32_sync" }, /* 4036 */ ++ { 0, 0, printargs, "o32_kill" }, /* 4037 */ ++ { 0, 0, printargs, "o32_rename" }, /* 4038 */ ++ { 0, 0, printargs, "o32_mkdir" }, /* 4039 */ ++ { 0, 0, printargs, "o32_rmdir" }, /* 4040 */ ++ { 0, 0, printargs, "o32_dup" }, /* 4041 */ ++ { 0, 0, printargs, "o32_pipe" }, /* 4042 */ ++ { 0, 0, printargs, "o32_times" }, /* 4043 */ ++ { 0, 0, printargs, "o32_prof" }, /* 4044 */ ++ { 0, 0, printargs, "o32_brk" }, /* 4045 */ ++ { 0, 0, printargs, "o32_setgid" }, /* 4046 */ ++ { 0, 0, printargs, "o32_getgid" }, /* 4047 */ ++ { 0, 0, printargs, "o32_signal" }, /* 4048 */ ++ { 0, 0, printargs, "o32_geteuid" }, /* 4049 */ ++ { 0, 0, printargs, "o32_getegid" }, /* 4050 */ ++ { 0, 0, printargs, "o32_acct" }, /* 4051 */ ++ { 0, 0, printargs, "o32_umount" }, /* 4052 */ ++ { 0, 0, printargs, "o32_lock" }, /* 4053 */ ++ { 0, 0, printargs, "o32_ioctl" }, /* 4054 */ ++ { 0, 0, printargs, "o32_fcntl" }, /* 4055 */ ++ { 0, 0, printargs, "o32_mpx" }, /* 4056 */ ++ { 0, 0, printargs, "o32_setpgid" }, /* 4057 */ ++ { 0, 0, printargs, "o32_ulimit" }, /* 4058 */ ++ { 0, 0, printargs, "o32_oldolduname" }, /* 4059 */ ++ { 0, 0, printargs, "o32_umask" }, /* 4060 */ ++ { 0, 0, printargs, "o32_chroot" }, /* 4061 */ ++ { 0, 0, printargs, "o32_ustat" }, /* 4062 */ ++ { 0, 0, printargs, "o32_dup2" }, /* 4063 */ ++ { 0, 0, printargs, "o32_getppid" }, /* 4064 */ ++ { 0, 0, printargs, "o32_getpgrp" }, /* 4065 */ ++ { 0, 0, printargs, "o32_setsid" }, /* 4066 */ ++ { 0, 0, printargs, "o32_sigaction" }, /* 4067 */ ++ { 0, 0, printargs, "o32_siggetmask" }, /* 4068 */ ++ { 0, 0, printargs, "o32_sigsetmask" }, /* 4069 */ ++ { 0, 0, printargs, "o32_setreuid" }, /* 4070 */ ++ { 0, 0, printargs, "o32_setregid" }, /* 4071 */ ++ { 0, 0, printargs, "o32_sigsuspend" }, /* 4072 */ ++ { 0, 0, printargs, "o32_sigpending" }, /* 4073 */ ++ { 0, 0, printargs, "o32_sethostname" }, /* 4074 */ ++ { 0, 0, printargs, "o32_setrlimit" }, /* 4075 */ ++ { 0, 0, printargs, "o32_getrlimit" }, /* 4076 */ ++ { 0, 0, printargs, "o32_getrusage" }, /* 4077 */ ++ { 0, 0, printargs, "o32_gettimeofday" }, /* 4078 */ ++ { 0, 0, printargs, "o32_settimeofday" }, /* 4079 */ ++ { 0, 0, printargs, "o32_getgroups" }, /* 4080 */ ++ { 0, 0, printargs, "o32_setgroups" }, /* 4081 */ ++ { 0, 0, printargs, "o32_reserved82" }, /* 4082 */ ++ { 0, 0, printargs, "o32_symlink" }, /* 4083 */ ++ { 0, 0, printargs, "o32_oldlstat" }, /* 4084 */ ++ { 0, 0, printargs, "o32_readlink" }, /* 4085 */ ++ { 0, 0, printargs, "o32_uselib" }, /* 4086 */ ++ { 0, 0, printargs, "o32_swapon" }, /* 4087 */ ++ { 0, 0, printargs, "o32_reboot" }, /* 4088 */ ++ { 0, 0, printargs, "o32_readdir" }, /* 4089 */ ++ { 0, 0, printargs, "o32_old_mmap" }, /* 4090 */ ++ { 0, 0, printargs, "o32_munmap" }, /* 4091 */ ++ { 0, 0, printargs, "o32_truncate" }, /* 4092 */ ++ { 0, 0, printargs, "o32_ftruncate" }, /* 4093 */ ++ { 0, 0, printargs, "o32_fchmod" }, /* 4094 */ ++ { 0, 0, printargs, "o32_fchown" }, /* 4095 */ ++ { 0, 0, printargs, "o32_getpriority" }, /* 4096 */ ++ { 0, 0, printargs, "o32_setpriority" }, /* 4097 */ ++ { 0, 0, printargs, "o32_profil" }, /* 4098 */ ++ { 0, 0, printargs, "o32_statfs" }, /* 4099 */ ++ { 0, 0, printargs, "o32_fstatfs" }, /* 4100 */ ++ { 0, 0, printargs, "o32_ioperm" }, /* 4101 */ ++ { 0, 0, printargs, "o32_socketcall" }, /* 4102 */ ++ { 0, 0, printargs, "o32_syslog" }, /* 4103 */ ++ { 0, 0, printargs, "o32_setitimer" }, /* 4104 */ ++ { 0, 0, printargs, "o32_getitimer" }, /* 4105 */ ++ { 0, 0, printargs, "o32_stat" }, /* 4106 */ ++ { 0, 0, printargs, "o32_lstat" }, /* 4107 */ ++ { 0, 0, printargs, "o32_fstat" }, /* 4108 */ ++ { 0, 0, printargs, "o32_olduname" }, /* 4109 */ ++ { 0, 0, printargs, "o32_iopl" }, /* 4110 */ ++ { 0, 0, printargs, "o32_vhangup" }, /* 4111 */ ++ { 0, 0, printargs, "o32_idle" }, /* 4112 */ ++ { 0, 0, printargs, "o32_vm86" }, /* 4113 */ ++ { 0, 0, printargs, "o32_wait4" }, /* 4114 */ ++ { 0, 0, printargs, "o32_swapoff" }, /* 4115 */ ++ { 0, 0, printargs, "o32_sysinfo" }, /* 4116 */ ++ { 0, 0, printargs, "o32_ipc" }, /* 4117 */ ++ { 0, 0, printargs, "o32_fsync" }, /* 4118 */ ++ { 0, 0, printargs, "o32_sigreturn" }, /* 4119 */ ++ { 0, 0, printargs, "o32_clone" }, /* 4120 */ ++ { 0, 0, printargs, "o32_setdomainname" }, /* 4121 */ ++ { 0, 0, printargs, "o32_uname" }, /* 4122 */ ++ { 0, 0, printargs, "o32_modify_ldt" }, /* 4123 */ ++ { 0, 0, printargs, "o32_adjtimex" }, /* 4124 */ ++ { 0, 0, printargs, "o32_mprotect" }, /* 4125 */ ++ { 0, 0, printargs, "o32_sigprocmask" }, /* 4126 */ ++ { 0, 0, printargs, "o32_create_module" }, /* 4127 */ ++ { 0, 0, printargs, "o32_init_module" }, /* 4128 */ ++ { 0, 0, printargs, "o32_delete_module" }, /* 4129 */ ++ { 0, 0, printargs, "o32_get_kernel_syms"}, /* 4130 */ ++ { 0, 0, printargs, "o32_quotactl" }, /* 4131 */ ++ { 0, 0, printargs, "o32_getpgid" }, /* 4132 */ ++ { 0, 0, printargs, "o32_fchdir" }, /* 4133 */ ++ { 0, 0, printargs, "o32_bdflush" }, /* 4134 */ ++ { 0, 0, printargs, "o32_sysfs" }, /* 4135 */ ++ { 0, 0, printargs, "o32_personality" }, /* 4136 */ ++ { 0, 0, printargs, "o32_afs_syscall" }, /* 4137 */ ++ { 0, 0, printargs, "o32_setfsuid" }, /* 4138 */ ++ { 0, 0, printargs, "o32_setfsgid" }, /* 4139 */ ++ { 0, 0, printargs, "o32__llseek" }, /* 4140 */ ++ { 0, 0, printargs, "o32_getdents" }, /* 4141 */ ++ { 0, 0, printargs, "o32__newselect" }, /* 4142 */ ++ { 0, 0, printargs, "o32_flock" }, /* 4143 */ ++ { 0, 0, printargs, "o32_msync" }, /* 4144 */ ++ { 0, 0, printargs, "o32_readv" }, /* 4145 */ ++ { 0, 0, printargs, "o32_writev" }, /* 4146 */ ++ { 0, 0, printargs, "o32_cacheflush" }, /* 4147 */ ++ { 0, 0, printargs, "o32_cachectl" }, /* 4148 */ ++ { 0, 0, printargs, "o32_sysmips" }, /* 4149 */ ++ { 0, 0, printargs, "o32_setup" }, /* 4150 */ ++ { 0, 0, printargs, "o32_getsid" }, /* 4151 */ ++ { 0, 0, printargs, "o32_fdatasync" }, /* 4152 */ ++ { 0, 0, printargs, "o32__sysctl" }, /* 4153 */ ++ { 0, 0, printargs, "o32_mlock" }, /* 4154 */ ++ { 0, 0, printargs, "o32_munlock" }, /* 4155 */ ++ { 0, 0, printargs, "o32_mlockall" }, /* 4156 */ ++ { 0, 0, printargs, "o32_munlockall" }, /* 4157 */ ++ { 0, 0, printargs, "o32_sched_setparam"}, /* 4158 */ ++ { 0, 0, printargs, "o32_sched_getparam"}, /* 4159 */ ++ { 0, 0, printargs, "o32_sched_setscheduler"}, /* 4160 */ ++ { 0, 0, printargs, "o32_sched_getscheduler"}, /* 4161 */ ++ { 0, 0, printargs, "o32_sched_yield" }, /* 4162 */ ++ { 0, 0, printargs, "o32_sched_get_priority_max"}, /* 4163 */ ++ { 0, 0, printargs, "o32_sched_get_priority_min"},/* 4164 */ ++ { 0, 0, printargs, "o32_sched_rr_get_interval"}, /* 4165 */ ++ { 0, 0, printargs, "o32_nanosleep" }, /* 4166 */ ++ { 0, 0, printargs, "o32_mremap" }, /* 4167 */ ++ { 0, 0, printargs, "o32_accept" }, /* 4168 */ ++ { 0, 0, printargs, "o32_bind" }, /* 4169 */ ++ { 0, 0, printargs, "o32_connect" }, /* 4170 */ ++ { 0, 0, printargs, "o32_getpeername" }, /* 4171 */ ++ { 0, 0, printargs, "o32_getsockname" }, /* 4172 */ ++ { 0, 0, printargs, "o32_getsockopt" }, /* 4173 */ ++ { 0, 0, printargs, "o32_listen" }, /* 4174 */ ++ { 0, 0, printargs, "o32_recv" }, /* 4175 */ ++ { 0, 0, printargs, "o32_recvfrom" }, /* 4176 */ ++ { 0, 0, printargs, "o32_recvmsg" }, /* 4177 */ ++ { 0, 0, printargs, "o32_send" }, /* 4178 */ ++ { 0, 0, printargs, "o32_sendmsg" }, /* 4179 */ ++ { 0, 0, printargs, "o32_sendto" }, /* 4180 */ ++ { 0, 0, printargs, "o32_setsockopt" }, /* 4181 */ ++ { 0, 0, printargs, "o32_shutdown" }, /* 4182 */ ++ { 0, 0, printargs, "o32_socket" }, /* 4183 */ ++ { 0, 0, printargs, "o32_socketpair" }, /* 4184 */ ++ { 0, 0, printargs, "o32_setresuid" }, /* 4185 */ ++ { 0, 0, printargs, "o32_getresuid" }, /* 4186 */ ++ { 0, 0, printargs, "o32_query_module" }, /* 4187 */ ++ { 0, 0, printargs, "o32_poll" }, /* 4188 */ ++ { 0, 0, printargs, "o32_nfsservctl" }, /* 4189 */ ++ { 0, 0, printargs, "o32_setresgid" }, /* 4190 */ ++ { 0, 0, printargs, "o32_getresgid" }, /* 4191 */ ++ { 0, 0, printargs, "o32_prctl" }, /* 4192 */ ++ { 0, 0, printargs, "o32_rt_sigreturn" }, /* 4193 */ ++ { 0, 0, printargs, "o32_rt_sigaction" }, /* 4194 */ ++ { 0, 0, printargs, "o32_rt_sigprocmask"}, /* 4195 */ ++ { 0, 0, printargs, "o32_rt_sigpending" }, /* 4196 */ ++ { 0, 0, printargs, "o32_rt_sigtimedwait"},/* 4197 */ ++ { 0, 0, printargs, "o32_rt_sigqueueinfo"},/* 4198 */ ++ { 0, 0, printargs, "o32_rt_siguspend" }, /* 4199 */ ++ { 0, 0, printargs, "o32_pread" }, /* 4200 */ ++ { 0, 0, printargs, "o32_pwrite" }, /* 4201 */ ++ { 0, 0, printargs, "o32_chown" }, /* 4202 */ ++ { 0, 0, printargs, "o32_getcwd" }, /* 4203 */ ++ { 0, 0, printargs, "o32_capget" }, /* 4204 */ ++ { 0, 0, printargs, "o32_capset" }, /* 4205 */ ++ { 0, 0, printargs, "o32_sigaltstatck" }, /* 4206 */ ++ { 0, 0, printargs, "o32_sendfile" }, /* 4207 */ ++ { 0, 0, printargs, "SYS_4208" }, /* 4208 */ ++ { 0, 0, printargs, "SYS_4209" }, /* 4209 */ ++ { 0, 0, printargs, "o32_mmap" }, /* 4210 */ ++ { 0, 0, printargs, "o32_truncate64" }, /* 4211 */ ++ { 0, 0, printargs, "o32_ftruncate64" }, /* 4212 */ ++ { 0, 0, printargs, "o32_stat64" }, /* 4213 */ ++ { 0, 0, printargs, "o32_lstat64" }, /* 4214 */ ++ { 0, 0, printargs, "o32_fstat64" }, /* 4215 */ ++ { 0, 0, printargs, "o32_pivot_root" }, /* 4216 */ ++ { 0, 0, printargs, "o32_mincore" }, /* 4217 */ ++ { 0, 0, printargs, "o32_madvise" }, /* 4218 */ ++ { 0, 0, printargs, "o32_getdents64" }, /* 4219 */ ++ { 0, 0, printargs, "o32_fcntl64" }, /* 4220 */ ++ { 0, 0, printargs, "SYS_4221" }, /* 4221 */ ++ { 0, 0, printargs, "o32_gettid" }, /* 4222 */ ++ { 5, TD, printargs, "o32_readahead" }, /* 4223 */ ++ { 5, TF, printargs, "o32_setxattr" }, /* 4224 */ ++ { 5, TF, printargs, "o32_lsetxattr" }, /* 4225 */ ++ { 5, TD, printargs, "o32_fsetxattr" }, /* 4226 */ ++ { 4, TF, printargs, "o32_getxattr" }, /* 4227 */ ++ { 4, TF, printargs, "o32_lgetxattr" }, /* 4228 */ ++ { 4, 0, printargs, "o32_fgetxattr" }, /* 4229 */ ++ { 3, TF, printargs, "o32_listxattr" }, /* 4230 */ ++ { 3, TF, printargs, "o32_llistxattr" }, /* 4231 */ ++ { 3, 0, printargs, "o32_flistxattr" }, /* 4232 */ ++ { 2, TF, printargs, "o32_removexattr" }, /* 4233 */ ++ { 2, TF, printargs, "o32_lremovexattr" }, /* 4234 */ ++ { 2, TD, printargs, "o32_fremovexattr" }, /* 4235 */ ++ { 2, TS, printargs, "o32_tkill" }, /* 4236 */ ++ { 5, TD, printargs, "o32_sendfile64" }, /* 4237 */ ++ { 6, 0, printargs, "o32_futex" }, /* 4238 */ ++ { 3, 0, printargs, "o32_sched_setaffinity"}, /* 4239 */ ++ { 3, 0, printargs, "o32_sched_getaffinity"}, /* 4240 */ ++ { 2, 0, printargs, "o32_io_setup" }, /* 4241 */ ++ { 1, 0, printargs, "o32_io_destroy" }, /* 4242 */ ++ { 5, 0, printargs, "o32_io_getevents" }, /* 4243 */ ++ { 3, 0, printargs, "o32_io_submit" }, /* 4244 */ ++ { 3, 0, printargs, "o32_io_cancel" }, /* 4245 */ ++ { 1, TP, printargs, "o32_exit_group" }, /* 4246 */ ++ { 3, 0, printargs, "o32_lookup_dcookie"}, /* 4247 */ ++ { 1, 0, printargs, "o32_epoll_create" }, /* 4248 */ ++ { 4, TD, printargs, "o32_epoll_ctl" }, /* 4249 */ ++ { 3, TD, printargs, "o32_epoll_wait" }, /* 4250 */ ++ { 5, 0, printargs, "o32_remap_file_pages"}, /* 4251 */ ++ { 1, 0, printargs, "o32_set_tid_address"}, /* 4252 */ ++ { 0, 0, printargs, "o32_restart_syscall"}, /* 4253 */ ++ { 7, 0, printargs, "o32_fadvise64_64" }, /* 4254 */ ++ { 3, TF, printargs, "o32_statfs64" }, /* 4255 */ ++ { 2, TD, printargs, "o32_fstatfs64" }, /* 4256 */ ++ { 3, 0, printargs, "o32_timer_create" }, /* 4257 */ ++ { 4, 0, printargs, "o32_timer_settime" }, /* 4258 */ ++ { 2, 0, printargs, "o32_timer_gettime" }, /* 4259 */ ++ { 1, 0, printargs, "o32_timer_getoverrun"}, /* 4260 */ ++ { 1, 0, printargs, "o32_timer_delete" }, /* 4261 */ ++ { 2, 0, printargs, "o32_clock_settime" }, /* 4262 */ ++ { 2, 0, printargs, "o32_clock_gettime" }, /* 4263 */ ++ { 2, 0, printargs, "o32_clock_getres" }, /* 4264 */ ++ { 4, 0, printargs, "o32_clock_nanosleep"}, /* 4265 */ ++ { 3, TS, printargs, "o32_tgkill" }, /* 4266 */ ++ { 2, TF, printargs, "o32_utimes" }, /* 4267 */ ++ { 4, 0, printargs, "o32_mbind" }, /* 4268 */ ++ { 0, 0, printargs, "o32_SYS_4269" }, /* 4269 */ ++ { 0, 0, printargs, "o32_SYS_4270" }, /* 4270 */ ++ { 4, 0, printargs, "o32_mq_open" }, /* 4271 */ ++ { 1, 0, printargs, "o32_mq_unlink" }, /* 4272 */ ++ { 5, 0, printargs, "o32_mq_timedsend" }, /* 4273 */ ++ { 5, 0, printargs, "o32_mq_timedreceive"}, /* 4274 */ ++ { 2, 0, printargs, "o32_mq_notify" }, /* 4275 */ ++ { 3, 0, printargs, "o32_mq_getsetattr" }, /* 4276 */ ++ { 0, 0, printargs, "o32_SYS_4277" }, /* 4277 */ ++ { 5, TP, printargs, "o32_waitid" }, /* 4278 */ ++ { 0, 0, printargs, "o32_SYS_4279" }, /* 4279 */ ++ { 5, 0, printargs, "o32_add_key" }, /* 4280 */ ++ { 4, 0, printargs, "o32_request_key" }, /* 4281 */ ++ { 5, 0, printargs, "o32_keyctl" }, /* 4282 */ ++ { 1, 0, printargs, "o32_set_thread_area" }, /* 4283 */ ++ { 0, TD, printargs, "o32_inotify_init" }, /* 4284 */ ++ { 3, TD, printargs, "o32_inotify_add_watch" }, /* 4285 */ ++ { 2, TD, printargs, "o32_inotify_rm_watch" }, /* 4286 */ ++ { 4, 0, printargs, "o32_migrate_pages" }, /* 4287 */ ++ { 4, TD|TF, printargs, "o32_openat" }, /* 4288 */ ++ { 3, TD|TF, printargs, "o32_mkdirat" }, /* 4289 */ ++ { 4, TD|TF, printargs, "o32_mknodat" }, /* 4290 */ ++ { 5, TD|TF, printargs, "o32_fchownat" }, /* 4291 */ ++ { 3, TD|TF, printargs, "o32_futimesat" }, /* 4292 */ ++ { 4, TD|TD, printargs, "o32_newfstatat" }, /* 4293 */ ++ { 3, TD|TF, printargs, "o32_unlinkat" }, /* 4294 */ ++ { 4, TD|TF, printargs, "o32_renameat" }, /* 4295 */ ++ { 5, TD|TF, printargs, "o32_linkat" }, /* 4296 */ ++ { 3, TD|TF, printargs, "o32_symlinkat" }, /* 4297 */ ++ { 4, TD|TF, printargs, "o32_readlinkat" }, /* 4298 */ ++ { 3, TD|TF, printargs, "o32_fchmodat" }, /* 4299 */ ++ { 3, TD|TF, printargs, "o32_faccessat" }, /* 4300 */ ++ { 6, TD, printargs, "o32_pselect6" }, /* 4301 */ ++ { 5, TD, printargs, "o32_ppoll" }, /* 4302 */ ++ { 1, TP, printargs, "o32_unshare" }, /* 4303 */ ++ { 6, TD, printargs, "o32_splice" }, /* 4304 */ ++ { 4, TD, printargs, "o32_sync_file_range" }, /* 4305 */ ++ { 0, 0, printargs, "o32_SYS_4306" }, /* 4306 */ ++ { 0, 0, printargs, "o32_SYS_4307" }, /* 4307 */ ++ { 6, 0, printargs, "o32_move_pages" }, /* 4308 */ ++ { 0, 0, printargs, "o32_SYS_4309" }, /* 4309 */ ++ { 0, 0, printargs, "o32_SYS_4310" }, /* 4310 */ ++ { 0, 0, printargs, "o32_SYS_4311" }, /* 4311 */ ++ { 3, 0, printargs, "o32_getcpu" }, /* 4312 */ ++ { 5, TD, printargs, "o32_epoll_pwait" }, /* 4313 */ ++ { 0, 0, printargs, "o32_SYS_4314" }, /* 4314 */ ++ { 0, 0, printargs, "o32_SYS_4315" }, /* 4315 */ ++ { 0, 0, printargs, "o32_SYS_4316" }, /* 4316 */ ++ { 3, TD|TS, printargs, "o32_signalfd" }, /* 4317 */ ++ { 4, TD, printargs, "o32_timerfd" }, /* 4318 */ ++ { 1, TD, printargs, "o32_eventfd" }, /* 4319 */ ++#endif + { 0, 0, printargs, "SYS_4320" }, /* 4320 */ + { 0, 0, printargs, "SYS_4321" }, /* 4321 */ + { 0, 0, printargs, "SYS_4322" }, /* 4322 */ +@@ -4998,3 +5324,2464 @@ + { 0, 0, printargs, "SYS_4997" }, /* 4997 */ + { 0, 0, printargs, "SYS_4998" }, /* 4998 */ + { 0, 0, printargs, "SYS_4999" }, /* 4999 */ /* end of Linux o32 */ ++#if defined (LINUX_MIPSN64) ++ /* For an N64 strace decode the N64 64-bit syscalls. */ ++ { 3, TF, sys_read, "read" }, /* 5000 */ /* start of Linux N64 */ ++ { 3, TF, sys_write, "write" }, /* 5001 */ ++ { 3, TF, sys_open, "open" }, /* 5002 */ ++ { 1, 0, sys_close, "close" }, /* 5003 */ ++ { 2, TF, sys_stat, "stat" }, /* 5004 */ ++ { 2, 0, sys_fstat, "fstat" }, /* 5005 */ ++ { 2, TF, sys_lstat, "lstat" }, /* 5006 */ ++ { 3, 0, sys_poll, "poll" }, /* 5007 */ ++ { 3, 0, sys_lseek, "lseek" }, /* 5008 */ ++ { 6, 0, sys_mmap, "mmap" }, /* 5009 */ ++ { 3, 0, sys_mprotect, "mprotect" }, /* 5010 */ ++ { 2, 0, sys_munmap, "munmap" }, /* 5011 */ ++ { 1, 0, sys_brk, "brk" }, /* 5012 */ ++ { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 5013 */ ++ { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 5014 */ ++ { 3, 0, sys_ioctl, "ioctl" }, /* 5015 */ ++ { 6, TF, sys_pread64, "pread" }, /* 5016 */ ++ { 6, TF, sys_pwrite64, "pwrite" }, /* 5017 */ ++ { 3, 0, sys_readv, "readv" }, /* 5018 */ ++ { 3, 0, sys_writev, "writev" }, /* 5019 */ ++ { 2, TF, sys_access, "access" }, /* 5020 */ ++ { 1, 0, sys_pipe, "pipe" }, /* 5021 */ ++ { 5, 0, sys_select, "_newselect" }, /* 5022 */ ++ { 0, 0, sys_sched_yield, "sched_yield" }, /* 5023 */ ++ { 4, 0, sys_mremap, "mremap" }, /* 5024 */ ++ { 3, 0, sys_msync, "msync" }, /* 5025 */ ++ { 3, 0, printargs, "mincore" }, /* 5026 */ ++ { 3, 0, sys_madvise, "madvise" }, /* 5027 */ ++ { 3, TI, sys_shmget, "shmget" }, /* 5028 */ ++ { 3, TI, sys_shmat, "shmgat" }, /* 5029 */ ++ { 3, TI, sys_shmctl, "shmctl" }, /* 5030 */ ++ { 1, 0, sys_dup, "dup" }, /* 5031 */ ++ { 2, 0, sys_dup2, "dup2" }, /* 5032 */ ++ { 0, TS, sys_pause, "pause" }, /* 5033 */ ++ { 2, 0, sys_nanosleep, "nanosleep" }, /* 5034 */ ++ { 2, 0, sys_getitimer, "getitimer" }, /* 5035 */ ++ { 3, 0, sys_setitimer, "setitimer" }, /* 5036 */ ++ { 1, 0, sys_alarm, "alarm" }, /* 5037 */ ++ { 0, 0, sys_getpid, "getpid" }, /* 5038 */ ++ { 4, TF, sys_sendfile, "sendfile" }, /* 5039 */ ++ { 2, 0, sys_socketcall, "socketcall" }, /* 5040 */ ++ { 3, TN, sys_connect, "connect" }, /* 5041 */ ++ { 3, TN, sys_accept, "accept" }, /* 5042 */ ++ { 6, TN, sys_sendto, "sendto" }, /* 5043 */ ++ { 6, TN, sys_recvfrom, "recvfrom" }, /* 5044 */ ++ { 3, TN, sys_sendmsg, "sendmsg" }, /* 5045 */ ++ { 3, TN, sys_recvmsg, "recvmsg" }, /* 5046 */ ++ { 2, TN, sys_shutdown, "shutdown" }, /* 5047 */ ++ { 3, TN, sys_bind, "bind" }, /* 5048 */ ++ { 2, TN, sys_listen, "listen" }, /* 5049 */ ++ { 3, TN, sys_getsockname, "getsockname" }, /* 5050 */ ++ { 3, TN, sys_getpeername, "getpeername" }, /* 5051 */ ++ { 4, TN, sys_socketpair, "socketpair" }, /* 5052 */ ++ { 5, TN, sys_setsockopt, "setsockopt" }, /* 5053 */ ++ { 5, TN, sys_getsockopt, "getsockopt" }, /* 5054 */ ++ { 2, TP, sys_clone, "clone" }, /* 5055 */ ++ { 0, TP, sys_fork, "fork" }, /* 5056 */ ++ { 3, TF|TP, sys_execve, "execve" }, /* 5057 */ ++ { 1, TP, sys_exit, "exit" }, /* 5058 */ ++ { 4, TP, sys_wait4, "wait4" }, /* 5059 */ ++ { 2, TS, sys_kill, "kill" }, /* 5060 */ ++ { 1, 0, sys_uname, "uname" }, /* 5061 */ ++ { 3, TI, sys_semget, "semget" }, /* 5062 */ ++ { 3, TI, printargs, "semop" }, /* 5063 */ ++ { 4, TI, sys_semctl, "semctl" }, /* 5064 */ ++ { 1, TI, sys_shmdt, "shmdt" }, /* 5065 */ ++ { 2, TI, sys_msgget, "msgget" }, /* 5066 */ ++ { 4, TI, sys_msgsnd, "msgsnd" }, /* 5067 */ ++ { 5, TI, sys_msgrcv, "msgrcv" }, /* 5068 */ ++ { 3, TI, sys_msgctl, "msgctl" }, /* 5069 */ ++ { 3, 0, sys_fcntl, "fcntl" }, /* 5070 */ ++ { 2, 0, sys_flock, "flock" }, /* 5071 */ ++ { 1, 0, sys_fsync, "fsync" }, /* 5072 */ ++ { 1, 0, sys_fdatasync, "fdatasync" }, /* 5073 */ ++ { 2, TF, sys_truncate, "truncate" }, /* 5074 */ ++ { 2, 0, sys_ftruncate, "ftruncate" }, /* 5075 */ ++ { 3, 0, sys_getdents, "getdents" }, /* 5076 */ ++ { 2, TF, sys_getcwd, "getcwd" }, /* 5077 */ ++ { 1, TF, sys_chdir, "chdir" }, /* 5078 */ ++ { 1, TF, sys_fchdir, "fchdir" }, /* 5079 */ ++ { 2, TF, sys_rename, "rename" }, /* 5080 */ ++ { 2, TF, sys_mkdir, "mkdir" }, /* 5081 */ ++ { 1, TF, sys_rmdir, "rmdir" }, /* 5082 */ ++ { 2, TF, sys_creat, "creat" }, /* 5083 */ ++ { 2, TF, sys_link, "link" }, /* 5084 */ ++ { 1, TF, sys_unlink, "unlink" }, /* 5085 */ ++ { 2, TF, sys_symlink, "symlink" }, /* 5086 */ ++ { 3, TF, sys_readlink, "readlink" }, /* 5087 */ ++ { 2, TF, sys_chmod, "chmod" }, /* 5088 */ ++ { 2, 0, sys_fchmod, "fchmod" }, /* 5089 */ ++ { 3, TF, sys_chown, "chown" }, /* 5090 */ ++ { 3, 0, sys_fchown, "fchown" }, /* 5091 */ ++ { 3, TF, sys_chown, "lchown" }, /* 5092 */ ++ { 1, 0, sys_umask, "umask" }, /* 5093 */ ++ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 5094 */ ++ { 2, 0, sys_getrlimit, "getrlimit" }, /* 5095 */ ++ { 2, 0, sys_getrusage, "getrusage" }, /* 5096 */ ++ { 1, 0, sys_sysinfo, "sysinfo" }, /* 5097 */ ++ { 1, 0, sys_times, "times" }, /* 5098 */ ++ { 4, 0, sys_ptrace, "ptrace" }, /* 5099 */ ++ { 0, 0, sys_getuid, "getuid" }, /* 5100 */ ++ { 3, 0, sys_syslog, "syslog" }, /* 5101 */ ++ { 0, 0, sys_getgid, "getgid" }, /* 5102 */ ++ { 1, 0, sys_setuid, "setuid" }, /* 5103 */ ++ { 1, 0, sys_setgid, "setgid" }, /* 5104 */ ++ { 0, 0, sys_geteuid, "geteuid" }, /* 5105 */ ++ { 0, 0, sys_getegid, "getegid" }, /* 5106 */ ++ { 2, 0, sys_setpgid, "setpgid" }, /* 5107 */ ++ { 0, 0, sys_getppid, "getppid" }, /* 5108 */ ++ { 0, 0, sys_getpgrp, "getpgrp" }, /* 5109 */ ++ { 0, 0, sys_setsid, "setsid" }, /* 5110 */ ++ { 2, 0, sys_setreuid, "setreuid" }, /* 5111 */ ++ { 2, 0, sys_setregid, "setregid" }, /* 5112 */ ++ { 2, 0, sys_getgroups, "getgroups" }, /* 5113 */ ++ { 2, 0, sys_setgroups, "setgroups" }, /* 5114 */ ++ { 3, 0, sys_setresuid, "setresuid" }, /* 5115 */ ++ { 3, 0, sys_getresuid, "getresuid" }, /* 5116 */ ++ { 3, 0, sys_setresgid, "setresgid" }, /* 5117 */ ++ { 3, 0, sys_getresgid, "getresgid" }, /* 5118 */ ++ { 0, 0, sys_getpgid, "getpgid" }, /* 5119 */ ++ { 1, 0, sys_setfsuid, "setfsuid" }, /* 5120 */ ++ { 1, 0, sys_setfsgid, "setfsgid" }, /* 5121 */ ++ { 1, 0, sys_getsid, "getsid" }, /* 5122 */ ++ { 2, 0, sys_capget, "capget" }, /* 5123 */ ++ { 2, 0, sys_capset, "capset" }, /* 5124 */ ++ { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 5125 */ ++ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"},/* 5126 */ ++ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"},/* 5127 */ ++ { 2, TS, sys_rt_sigsuspend, "rt_siguspend" }, /* 5128 */ ++ { 2, TS, sys_sigaltstack, "sigaltstatck" }, /* 5129 */ ++ { 2, TF, sys_utime, "utime" }, /* 5130 */ ++ { 3, TF, sys_mknod, "mknod" }, /* 5131 */ ++ { 1, 0, sys_personality, "personality" }, /* 5132 */ ++ { 2, 0, sys_ustat, "ustat" }, /* 5133 */ ++ { 3, 0, sys_statfs, "statfs" }, /* 5134 */ ++ { 3, 0, sys_fstatfs, "fstatfs" }, /* 5135 */ ++ { 5, 0, sys_sysfs, "sysfs" }, /* 5136 */ ++ { 2, 0, sys_getpriority, "getpriority" }, /* 5137 */ ++ { 3, 0, sys_setpriority, "setpriority" }, /* 5138 */ ++ { 2, 0, sys_sched_setparam, "sched_setparam"}, /* 5139 */ ++ { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 5140 */ ++ { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 5141 */ ++ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 5142 */ ++ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 5143 */ ++ { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 5144 */ ++ { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 5145 */ ++ { 2, 0, sys_mlock, "mlock" }, /* 5146 */ ++ { 2, 0, sys_munlock, "munlock" }, /* 5147 */ ++ { 1, 0, sys_mlockall, "mlockall" }, /* 5148 */ ++ { 0, 0, sys_munlockall, "munlockall" }, /* 5149 */ ++ { 0, 0, sys_vhangup, "vhangup" }, /* 5150 */ ++ { 2, 0, sys_pivotroot, "pivot_root" }, /* 5151 */ ++ { 1, 0, sys_sysctl, "_sysctl" }, /* 5152 */ ++ { 5, 0, printargs, "prctl" }, /* 5153 */ ++ { 1, 0, sys_adjtimex, "adjtimex" }, /* 5154 */ ++ { 2, 0, sys_setrlimit, "setrlimit" }, /* 5155 */ ++ { 1, TF, sys_chroot, "chroot" }, /* 5156 */ ++ { 0, 0, sys_sync, "sync" }, /* 5157 */ ++ { 1, TF, sys_acct, "acct" }, /* 5158 */ ++ { 2, 0, sys_settimeofday, "settimeofday" }, /* 5159 */ ++ { 5, TF, sys_mount, "mount" }, /* 5160 */ ++ { 2, TF, sys_umount2, "umount" }, /* 5161 */ ++ { 1, TF, sys_swapon, "swapon" }, /* 5162 */ ++ { 1, 0, sys_swapoff, "swapoff" }, /* 5163 */ ++ { 3, 0, sys_reboot, "reboot" }, /* 5164 */ ++ { 2, 0, sys_sethostname, "sethostname" }, /* 5165 */ ++ { 2, 0, sys_setdomainname, "setdomainname" }, /* 5166 */ ++ { 2, 0, sys_create_module, "create_module" }, /* 5167 */ ++ { 4, 0, sys_init_module, "init_module" }, /* 5168 */ ++ { 1, 0, sys_delete_module, "delete_module" }, /* 5169 */ ++ { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 5170 */ ++ { 5, 0, sys_query_module, "query_module" }, /* 5171 */ ++ { 4, 0, sys_quotactl, "quotactl" }, /* 5172 */ ++ { 3, 0, printargs, "nfsservctl" }, /* 5173 */ ++ { 5, TN, printargs, "getpmsg" }, /* 5174 */ ++ { 5, TN, printargs, "putpmsg" }, /* 5175 */ ++ { 0, 0, sys_afs_syscall, "afs_syscall" }, /* 5176 */ ++ { 0, 0, printargs, "reserved177" }, /* 5177 */ ++ { 0, 0, printargs, "gettid" }, /* 5178 */ ++ { 3, 0, sys_readahead, "readahead" }, /* 5179 */ ++ { 5, 0, sys_setxattr, "setxattr" }, /* 5180 */ ++ { 5, 0, sys_setxattr, "lsetxattr" }, /* 5181 */ ++ { 5, 0, sys_fsetxattr, "fsetxattr" }, /* 5182 */ ++ { 4, 0, sys_getxattr, "getxattr" }, /* 5183 */ ++ { 4, 0, sys_getxattr, "lgetxattr" }, /* 5184 */ ++ { 4, 0, sys_fgetxattr, "fgetxattr" }, /* 5185 */ ++ { 3, 0, sys_listxattr, "listxattr" }, /* 5186 */ ++ { 3, 0, sys_listxattr, "llistxattr" }, /* 5187 */ ++ { 3, 0, sys_flistxattr, "flistxattr" }, /* 5188 */ ++ { 2, 0, sys_removexattr, "removexattr" }, /* 5189 */ ++ { 2, 0, sys_removexattr, "lremovexattr" }, /* 5190 */ ++ { 2, 0, sys_fremovexattr, "fremovexattr" }, /* 5191 */ ++ { 2, 0, sys_kill, "tkill" }, /* 5192 */ ++ { 1, 0, sys_time, "time" }, /* 5193 */ ++ { 5, 0, printargs, "futex" }, /* 5194 */ ++ { 3, 0, printargs, "sched_setaffinity"}, /* 5195 */ ++ { 3, 0, printargs, "sched_getaffinity"}, /* 5196 */ ++ { 3, 0, printargs, "cacheflush" }, /* 5197 */ ++ { 3, 0, printargs, "cachectl" }, /* 5198 */ ++ { 4, 0, sys_sysmips, "sysmips" }, /* 5199 */ ++ { 0, 0, printargs, "SYS_5200" }, /* 5200 */ ++ { 0, 0, printargs, "SYS_5201" }, /* 5201 */ ++ { 0, 0, printargs, "SYS_5202" }, /* 5202 */ ++ { 0, 0, printargs, "SYS_5203" }, /* 5203 */ ++ { 0, 0, printargs, "SYS_5204" }, /* 5204 */ ++ { 1, TP, sys_exit, "exit_group" }, /* 5205 */ ++ { 0, 0, printargs, "SYS_5206" }, /* 5206 */ ++ { 0, 0, printargs, "SYS_5207" }, /* 5207 */ ++ { 0, 0, printargs, "SYS_5208" }, /* 5208 */ ++ { 0, 0, printargs, "SYS_5209" }, /* 5209 */ ++ { 0, 0, printargs, "SYS_5210" }, /* 5210 */ ++ { 1, TS, printargs, "rt_sigreturn" }, /* 5211 */ ++ { 5, 0, printargs, "timer_create" }, /* 5212 */ ++ { 5, 0, printargs, "timer_settime" }, /* 5213 */ ++ { 5, 0, printargs, "timer_gettime" }, /* 5214 */ ++ { 5, 0, printargs, "timer_getoverrun"}, /* 5215 */ ++ { 5, 0, printargs, "timer_delete" }, /* 5216 */ ++ { 5, 0, printargs, "clock_settime" }, /* 5217 */ ++ { 5, 0, printargs, "clock_gettime" }, /* 5218 */ ++ { 5, 0, printargs, "clock_getres" }, /* 5219 */ ++ { 5, 0, printargs, "clock_nanosleep"}, /* 5220 */ ++#else ++ { 0, 0, printargs, "n64_read" }, /* 5000 */ ++ { 0, 0, printargs, "n64_write" }, /* 5001 */ ++ { 0, 0, printargs, "n64_open" }, /* 5002 */ ++ { 0, 0, printargs, "n64_close" }, /* 5003 */ ++ { 0, 0, printargs, "n64_stat" }, /* 5004 */ ++ { 0, 0, printargs, "n64_fstat" }, /* 5005 */ ++ { 0, 0, printargs, "n64_lstat" }, /* 5006 */ ++ { 0, 0, printargs, "n64_poll" }, /* 5007 */ ++ { 0, 0, printargs, "n64_lseek" }, /* 5008 */ ++ { 0, 0, printargs, "n64_mmap" }, /* 5009 */ ++ { 0, 0, printargs, "n64_mprotect" }, /* 5010 */ ++ { 0, 0, printargs, "n64_munmap" }, /* 5011 */ ++ { 0, 0, printargs, "n64_brk" }, /* 5012 */ ++ { 0, 0, printargs, "n64_rt_sigaction" }, /* 5013 */ ++ { 0, 0, printargs, "n64_rt_sigprocmask" }, /* 5014 */ ++ { 0, 0, printargs, "n64_ioctl" }, /* 5015 */ ++ { 0, 0, printargs, "n64_pread" }, /* 5016 */ ++ { 0, 0, printargs, "n64_pwrite" }, /* 5017 */ ++ { 0, 0, printargs, "n64_readv" }, /* 5018 */ ++ { 0, 0, printargs, "n64_writev" }, /* 5019 */ ++ { 0, 0, printargs, "n64_access" }, /* 5020 */ ++ { 0, 0, printargs, "n64_pipe" }, /* 5021 */ ++ { 0, 0, printargs, "n64__newselect" }, /* 5022 */ ++ { 0, 0, printargs, "n64_sched_yield" }, /* 5023 */ ++ { 0, 0, printargs, "n64_mremap" }, /* 5024 */ ++ { 0, 0, printargs, "n64_msync" }, /* 5025 */ ++ { 0, 0, printargs, "n64_mincore" }, /* 5026 */ ++ { 0, 0, printargs, "n64_madvise" }, /* 5027 */ ++ { 0, 0, printargs, "n64_shmget" }, /* 5028 */ ++ { 0, 0, printargs, "n64_shmgat" }, /* 5029 */ ++ { 0, 0, printargs, "n64_shmctl" }, /* 5030 */ ++ { 0, 0, printargs, "n64_dup" }, /* 5031 */ ++ { 0, 0, printargs, "n64_dup2" }, /* 5032 */ ++ { 0, 0, printargs, "n64_pause" }, /* 5033 */ ++ { 0, 0, printargs, "n64_nanosleep" }, /* 5034 */ ++ { 0, 0, printargs, "n64_getitimer" }, /* 5035 */ ++ { 0, 0, printargs, "n64_setitimer" }, /* 5036 */ ++ { 0, 0, printargs, "n64_alarm" }, /* 5037 */ ++ { 0, 0, printargs, "n64_getpid" }, /* 5038 */ ++ { 0, 0, printargs, "n64_sendfile" }, /* 5039 */ ++ { 0, 0, printargs, "n64_socketcall" }, /* 5040 */ ++ { 0, 0, printargs, "n64_connect" }, /* 5041 */ ++ { 0, 0, printargs, "n64_accept" }, /* 5042 */ ++ { 0, 0, printargs, "n64_sendto" }, /* 5043 */ ++ { 0, 0, printargs, "n64_recvfrom" }, /* 5044 */ ++ { 0, 0, printargs, "n64_sendmsg" }, /* 5045 */ ++ { 0, 0, printargs, "n64_recvmsg" }, /* 5046 */ ++ { 0, 0, printargs, "n64_shutdown" }, /* 5047 */ ++ { 0, 0, printargs, "n64_bind" }, /* 5048 */ ++ { 0, 0, printargs, "n64_listen" }, /* 5049 */ ++ { 0, 0, printargs, "n64_getsockname" }, /* 5050 */ ++ { 0, 0, printargs, "n64_getpeername" }, /* 5051 */ ++ { 0, 0, printargs, "n64_socketpair" }, /* 5052 */ ++ { 0, 0, printargs, "n64_setsockopt" }, /* 5053 */ ++ { 0, 0, printargs, "n64_getsockopt" }, /* 5054 */ ++ { 0, 0, printargs, "n64_clone" }, /* 5055 */ ++ { 0, 0, printargs, "n64_fork" }, /* 5056 */ ++ { 0, 0, printargs, "n64_execve" }, /* 5057 */ ++ { 0, 0, printargs, "n64_exit" }, /* 5058 */ ++ { 0, 0, printargs, "n64_wait4" }, /* 5059 */ ++ { 0, 0, printargs, "n64_kill" }, /* 5060 */ ++ { 0, 0, printargs, "n64_uname" }, /* 5061 */ ++ { 0, 0, printargs, "n64_semget" }, /* 5062 */ ++ { 0, 0, printargs, "n64_semop" }, /* 5063 */ ++ { 0, 0, printargs, "n64_semctl" }, /* 5064 */ ++ { 0, 0, printargs, "n64_shmdt" }, /* 5065 */ ++ { 0, 0, printargs, "n64_msgget" }, /* 5066 */ ++ { 0, 0, printargs, "n64_msgsnd" }, /* 5067 */ ++ { 0, 0, printargs, "n64_msgrcv" }, /* 5068 */ ++ { 0, 0, printargs, "n64_msgctl" }, /* 5069 */ ++ { 0, 0, printargs, "n64_fcntl" }, /* 5070 */ ++ { 0, 0, printargs, "n64_flock" }, /* 5071 */ ++ { 0, 0, printargs, "n64_fsync" }, /* 5072 */ ++ { 0, 0, printargs, "n64_fdatasync" }, /* 5073 */ ++ { 0, 0, printargs, "n64_truncate" }, /* 5074 */ ++ { 0, 0, printargs, "n64_ftruncate" }, /* 5075 */ ++ { 0, 0, printargs, "n64_getdents" }, /* 5076 */ ++ { 0, 0, printargs, "n64_getcwd" }, /* 5077 */ ++ { 0, 0, printargs, "n64_chdir" }, /* 5078 */ ++ { 0, 0, printargs, "n64_fchdir" }, /* 5079 */ ++ { 0, 0, printargs, "n64_rename" }, /* 5080 */ ++ { 0, 0, printargs, "n64_mkdir" }, /* 5081 */ ++ { 0, 0, printargs, "n64_rmdir" }, /* 5082 */ ++ { 0, 0, printargs, "n64_creat" }, /* 5083 */ ++ { 0, 0, printargs, "n64_link" }, /* 5084 */ ++ { 0, 0, printargs, "n64_unlink" }, /* 5085 */ ++ { 0, 0, printargs, "n64_symlink" }, /* 5086 */ ++ { 0, 0, printargs, "n64_readlink" }, /* 5087 */ ++ { 0, 0, printargs, "n64_chmod" }, /* 5088 */ ++ { 0, 0, printargs, "n64_fchmod" }, /* 5089 */ ++ { 0, 0, printargs, "n64_chown" }, /* 5090 */ ++ { 0, 0, printargs, "n64_fchown" }, /* 5091 */ ++ { 0, 0, printargs, "n64_lchown" }, /* 5092 */ ++ { 0, 0, printargs, "n64_umask" }, /* 5093 */ ++ { 0, 0, printargs, "n64_gettimeofday" }, /* 5094 */ ++ { 0, 0, printargs, "n64_getrlimit" }, /* 5095 */ ++ { 0, 0, printargs, "n64_getrusage" }, /* 5096 */ ++ { 0, 0, printargs, "n64_sysinfo" }, /* 5097 */ ++ { 0, 0, printargs, "n64_times" }, /* 5098 */ ++ { 0, 0, printargs, "n64_ptrace" }, /* 5099 */ ++ { 0, 0, printargs, "n64_getuid" }, /* 5100 */ ++ { 0, 0, printargs, "n64_syslog" }, /* 5101 */ ++ { 0, 0, printargs, "n64_getgid" }, /* 5102 */ ++ { 0, 0, printargs, "n64_setuid" }, /* 5103 */ ++ { 0, 0, printargs, "n64_setgid" }, /* 5104 */ ++ { 0, 0, printargs, "n64_geteuid" }, /* 5105 */ ++ { 0, 0, printargs, "n64_getegid" }, /* 5106 */ ++ { 0, 0, printargs, "n64_setpgid" }, /* 5107 */ ++ { 0, 0, printargs, "n64_getppid" }, /* 5108 */ ++ { 0, 0, printargs, "n64_getpgrp" }, /* 5109 */ ++ { 0, 0, printargs, "n64_setsid" }, /* 5110 */ ++ { 0, 0, printargs, "n64_setreuid" }, /* 5111 */ ++ { 0, 0, printargs, "n64_setregid" }, /* 5112 */ ++ { 0, 0, printargs, "n64_getgroups" }, /* 5113 */ ++ { 0, 0, printargs, "n64_setgroups" }, /* 5114 */ ++ { 0, 0, printargs, "n64_setresuid" }, /* 5115 */ ++ { 0, 0, printargs, "n64_getresuid" }, /* 5116 */ ++ { 0, 0, printargs, "n64_setresgid" }, /* 5117 */ ++ { 0, 0, printargs, "n64_getresgid" }, /* 5118 */ ++ { 0, 0, printargs, "n64_getpgid" }, /* 5119 */ ++ { 0, 0, printargs, "n64_setfsuid" }, /* 5120 */ ++ { 0, 0, printargs, "n64_setfsgid" }, /* 5121 */ ++ { 0, 0, printargs, "n64_getsid" }, /* 5122 */ ++ { 0, 0, printargs, "n64_capget" }, /* 5123 */ ++ { 0, 0, printargs, "n64_capset" }, /* 5124 */ ++ { 0, 0, printargs, "n64_rt_sigpending" }, /* 5125 */ ++ { 0, 0, printargs, "n64_rt_sigtimedwait" }, /* 5126 */ ++ { 0, 0, printargs, "n64_rt_sigqueueinfo" }, /* 5127 */ ++ { 0, 0, printargs, "n64_rt_siguspend" }, /* 5128 */ ++ { 0, 0, printargs, "n64_sigaltstatck" }, /* 5129 */ ++ { 0, 0, printargs, "n64_utime" }, /* 5130 */ ++ { 0, 0, printargs, "n64_mknod" }, /* 5131 */ ++ { 0, 0, printargs, "n64_personality" }, /* 5132 */ ++ { 0, 0, printargs, "n64_ustat" }, /* 5133 */ ++ { 0, 0, printargs, "n64_statfs" }, /* 5134 */ ++ { 0, 0, printargs, "n64_fstatfs" }, /* 5135 */ ++ { 0, 0, printargs, "n64_sysfs" }, /* 5136 */ ++ { 0, 0, printargs, "n64_getpriority" }, /* 5137 */ ++ { 0, 0, printargs, "n64_setpriority" }, /* 5138 */ ++ { 0, 0, printargs, "n64_sched_setparam" }, /* 5139 */ ++ { 0, 0, printargs, "n64_sched_getparam" }, /* 5140 */ ++ { 0, 0, printargs, "n64_sched_setscheduler"}, /* 5141 */ ++ { 0, 0, printargs, "n64_sched_getscheduler"}, /* 5142 */ ++ { 0, 0, printargs, "n64_sched_get_priority_max"}, /* 5143 */ ++ { 0, 0, printargs, "n64_sched_get_priority_min"}, /* 5144 */ ++ { 0, 0, printargs, "n64_sched_rr_get_interval"}, /* 5145 */ ++ { 0, 0, printargs, "n64_mlock" }, /* 5146 */ ++ { 0, 0, printargs, "n64_munlock" }, /* 5147 */ ++ { 0, 0, printargs, "n64_mlockall" }, /* 5148 */ ++ { 0, 0, printargs, "n64_munlockall" }, /* 5149 */ ++ { 0, 0, printargs, "n64_vhangup" }, /* 5150 */ ++ { 0, 0, printargs, "n64_pivot_root" }, /* 5151 */ ++ { 0, 0, printargs, "n64__sysctl" }, /* 5152 */ ++ { 0, 0, printargs, "n64_prctl" }, /* 5153 */ ++ { 0, 0, printargs, "n64_adjtimex" }, /* 5154 */ ++ { 0, 0, printargs, "n64_setrlimit" }, /* 5155 */ ++ { 0, 0, printargs, "n64_chroot" }, /* 5156 */ ++ { 0, 0, printargs, "n64_sync" }, /* 5157 */ ++ { 0, 0, printargs, "n64_acct" }, /* 5158 */ ++ { 0, 0, printargs, "n64_settimeofday" }, /* 5159 */ ++ { 0, 0, printargs, "n64_mount" }, /* 5160 */ ++ { 0, 0, printargs, "n64_umount" }, /* 5161 */ ++ { 0, 0, printargs, "n64_swapon" }, /* 5162 */ ++ { 0, 0, printargs, "n64_swapoff" }, /* 5163 */ ++ { 0, 0, printargs, "n64_reboot" }, /* 5164 */ ++ { 0, 0, printargs, "n64_sethostname" }, /* 5165 */ ++ { 0, 0, printargs, "n64_setdomainname" }, /* 5166 */ ++ { 0, 0, printargs, "n64_create_module" }, /* 5167 */ ++ { 0, 0, printargs, "n64_init_module" }, /* 5168 */ ++ { 0, 0, printargs, "n64_delete_module" }, /* 5169 */ ++ { 0, 0, printargs, "n64_get_kernel_syms" }, /* 5170 */ ++ { 0, 0, printargs, "n64_query_module" }, /* 5171 */ ++ { 0, 0, printargs, "n64_quotactl" }, /* 5172 */ ++ { 0, 0, printargs, "n64_nfsservctl" }, /* 5173 */ ++ { 0, 0, printargs, "n64_getpmsg" }, /* 5174 */ ++ { 0, 0, printargs, "n64_putpmsg" }, /* 5175 */ ++ { 0, 0, printargs, "n64_afs_syscall" }, /* 5176 */ ++ { 0, 0, printargs, "n64_reserved177" }, /* 5177 */ ++ { 0, 0, printargs, "n64_gettid" }, /* 5178 */ ++ { 0, 0, printargs, "n64_readahead" }, /* 5179 */ ++ { 0, 0, printargs, "n64_setxattr" }, /* 5180 */ ++ { 0, 0, printargs, "n64_lsetxattr" }, /* 5181 */ ++ { 0, 0, printargs, "n64_fsetxattr" }, /* 5182 */ ++ { 0, 0, printargs, "n64_getxattr" }, /* 5183 */ ++ { 0, 0, printargs, "n64_lgetxattr" }, /* 5184 */ ++ { 0, 0, printargs, "n64_fgetxattr" }, /* 5185 */ ++ { 0, 0, printargs, "n64_listxattr" }, /* 5186 */ ++ { 0, 0, printargs, "n64_llistxattr" }, /* 5187 */ ++ { 0, 0, printargs, "n64_flistxattr" }, /* 5188 */ ++ { 0, 0, printargs, "n64_removexattr" }, /* 5189 */ ++ { 0, 0, printargs, "n64_lremovexattr" }, /* 5190 */ ++ { 0, 0, printargs, "n64_fremovexattr" }, /* 5191 */ ++ { 0, 0, printargs, "n64_tkill" }, /* 5192 */ ++ { 0, 0, printargs, "n64_time" }, /* 5193 */ ++ { 0, 0, printargs, "n64_futex" }, /* 5194 */ ++ { 0, 0, printargs, "n64_sched_setaffinity" }, /* 5195 */ ++ { 0, 0, printargs, "n64_sched_getaffinity" }, /* 5196 */ ++ { 0, 0, printargs, "n64_cacheflush" }, /* 5197 */ ++ { 0, 0, printargs, "n64_cachectl" }, /* 5198 */ ++ { 0, 0, printargs, "n64_sysmips" }, /* 5199 */ ++ { 0, 0, printargs, "SYS_5200" }, /* 5200 */ ++ { 0, 0, printargs, "SYS_5201" }, /* 5201 */ ++ { 0, 0, printargs, "SYS_5202" }, /* 5202 */ ++ { 0, 0, printargs, "SYS_5203" }, /* 5203 */ ++ { 0, 0, printargs, "SYS_5204" }, /* 5204 */ ++ { 1, TP, printargs, "n64_exit_group" }, /* 5205 */ ++ { 0, 0, printargs, "SYS_5206" }, /* 5206 */ ++ { 0, 0, printargs, "SYS_5207" }, /* 5207 */ ++ { 0, 0, printargs, "SYS_5208" }, /* 5208 */ ++ { 0, 0, printargs, "SYS_5209" }, /* 5209 */ ++ { 0, 0, printargs, "SYS_5210" }, /* 5210 */ ++ { 0, 0, printargs, "n64_rt_sigreturn" }, /* 5211 */ ++ { 5, 0, printargs, "n64_timer_create" }, /* 5212 */ ++ { 5, 0, printargs, "n64_timer_settime" }, /* 5213 */ ++ { 5, 0, printargs, "n64_timer_gettime" }, /* 5214 */ ++ { 5, 0, printargs, "n64_timer_getoverrun"}, /* 5215 */ ++ { 5, 0, printargs, "n64_timer_delete" }, /* 5216 */ ++ { 5, 0, printargs, "n64_clock_settime" }, /* 5217 */ ++ { 5, 0, printargs, "n64_clock_gettime" }, /* 5218 */ ++ { 5, 0, printargs, "n64_clock_getres" }, /* 5219 */ ++ { 5, 0, printargs, "n64_clock_nanosleep"}, /* 5220 */ ++#endif ++ { 0, 0, printargs, "SYS_5221" }, /* 5221 */ ++ { 0, 0, printargs, "SYS_5222" }, /* 5222 */ ++ { 0, 0, printargs, "SYS_5223" }, /* 5223 */ ++ { 0, 0, printargs, "SYS_5224" }, /* 5224 */ ++ { 0, 0, printargs, "SYS_5225" }, /* 5225 */ ++ { 0, 0, printargs, "SYS_5226" }, /* 5226 */ ++ { 0, 0, printargs, "SYS_5227" }, /* 5227 */ ++ { 0, 0, printargs, "SYS_5228" }, /* 5228 */ ++ { 0, 0, printargs, "SYS_5229" }, /* 5229 */ ++ { 0, 0, printargs, "SYS_5230" }, /* 5230 */ ++ { 0, 0, printargs, "SYS_5231" }, /* 5231 */ ++ { 0, 0, printargs, "SYS_5232" }, /* 5232 */ ++ { 0, 0, printargs, "SYS_5233" }, /* 5233 */ ++ { 0, 0, printargs, "SYS_5234" }, /* 5234 */ ++ { 0, 0, printargs, "SYS_5235" }, /* 5235 */ ++ { 0, 0, printargs, "SYS_5236" }, /* 5236 */ ++ { 0, 0, printargs, "SYS_5237" }, /* 5237 */ ++ { 0, 0, printargs, "SYS_5238" }, /* 5238 */ ++ { 0, 0, printargs, "SYS_5239" }, /* 5239 */ ++ { 0, 0, printargs, "SYS_5240" }, /* 5240 */ ++ { 0, 0, printargs, "SYS_5241" }, /* 5241 */ ++ { 0, 0, printargs, "SYS_5242" }, /* 5242 */ ++ { 0, 0, printargs, "SYS_5243" }, /* 5243 */ ++ { 0, 0, printargs, "SYS_5244" }, /* 5244 */ ++ { 0, 0, printargs, "SYS_5245" }, /* 5245 */ ++ { 0, 0, printargs, "SYS_5246" }, /* 5246 */ ++ { 0, 0, printargs, "SYS_5247" }, /* 5247 */ ++ { 0, 0, printargs, "SYS_5248" }, /* 5248 */ ++ { 0, 0, printargs, "SYS_5249" }, /* 5249 */ ++ { 0, 0, printargs, "SYS_5250" }, /* 5250 */ ++ { 0, 0, printargs, "SYS_5251" }, /* 5251 */ ++ { 0, 0, printargs, "SYS_5252" }, /* 5252 */ ++ { 0, 0, printargs, "SYS_5253" }, /* 5253 */ ++ { 0, 0, printargs, "SYS_5254" }, /* 5254 */ ++ { 0, 0, printargs, "SYS_5255" }, /* 5255 */ ++ { 0, 0, printargs, "SYS_5256" }, /* 5256 */ ++ { 0, 0, printargs, "SYS_5257" }, /* 5257 */ ++ { 0, 0, printargs, "SYS_5258" }, /* 5258 */ ++ { 0, 0, printargs, "SYS_5259" }, /* 5259 */ ++ { 0, 0, printargs, "SYS_5260" }, /* 5260 */ ++ { 0, 0, printargs, "SYS_5261" }, /* 5261 */ ++ { 0, 0, printargs, "SYS_5262" }, /* 5262 */ ++ { 0, 0, printargs, "SYS_5263" }, /* 5263 */ ++ { 0, 0, printargs, "SYS_5264" }, /* 5264 */ ++ { 0, 0, printargs, "SYS_5265" }, /* 5265 */ ++ { 0, 0, printargs, "SYS_5266" }, /* 5266 */ ++ { 0, 0, printargs, "SYS_5267" }, /* 5267 */ ++ { 0, 0, printargs, "SYS_5268" }, /* 5268 */ ++ { 0, 0, printargs, "SYS_5269" }, /* 5269 */ ++ { 0, 0, printargs, "SYS_5270" }, /* 5270 */ ++ { 0, 0, printargs, "SYS_5271" }, /* 5271 */ ++ { 0, 0, printargs, "SYS_5272" }, /* 5272 */ ++ { 0, 0, printargs, "SYS_5273" }, /* 5273 */ ++ { 0, 0, printargs, "SYS_5274" }, /* 5274 */ ++ { 0, 0, printargs, "SYS_5275" }, /* 5275 */ ++ { 0, 0, printargs, "SYS_5276" }, /* 5276 */ ++ { 0, 0, printargs, "SYS_5277" }, /* 5277 */ ++ { 0, 0, printargs, "SYS_5278" }, /* 5278 */ ++ { 0, 0, printargs, "SYS_5279" }, /* 5279 */ ++ { 0, 0, printargs, "SYS_5280" }, /* 5280 */ ++ { 0, 0, printargs, "SYS_5281" }, /* 5281 */ ++ { 0, 0, printargs, "SYS_5282" }, /* 5282 */ ++ { 0, 0, printargs, "SYS_5283" }, /* 5283 */ ++ { 0, 0, printargs, "SYS_5284" }, /* 5284 */ ++ { 0, 0, printargs, "SYS_5285" }, /* 5285 */ ++ { 0, 0, printargs, "SYS_5286" }, /* 5286 */ ++ { 0, 0, printargs, "SYS_5287" }, /* 5287 */ ++ { 0, 0, printargs, "SYS_5288" }, /* 5288 */ ++ { 0, 0, printargs, "SYS_5289" }, /* 5289 */ ++ { 0, 0, printargs, "SYS_5290" }, /* 5290 */ ++ { 0, 0, printargs, "SYS_5291" }, /* 5291 */ ++ { 0, 0, printargs, "SYS_5292" }, /* 5292 */ ++ { 0, 0, printargs, "SYS_5293" }, /* 5293 */ ++ { 0, 0, printargs, "SYS_5294" }, /* 5294 */ ++ { 0, 0, printargs, "SYS_5295" }, /* 5295 */ ++ { 0, 0, printargs, "SYS_5296" }, /* 5296 */ ++ { 0, 0, printargs, "SYS_5297" }, /* 5297 */ ++ { 0, 0, printargs, "SYS_5298" }, /* 5298 */ ++ { 0, 0, printargs, "SYS_5299" }, /* 5299 */ ++ { 0, 0, printargs, "SYS_5300" }, /* 5300 */ ++ { 0, 0, printargs, "SYS_5301" }, /* 5301 */ ++ { 0, 0, printargs, "SYS_5302" }, /* 5302 */ ++ { 0, 0, printargs, "SYS_5303" }, /* 5303 */ ++ { 0, 0, printargs, "SYS_5304" }, /* 5304 */ ++ { 0, 0, printargs, "SYS_5305" }, /* 5305 */ ++ { 0, 0, printargs, "SYS_5306" }, /* 5306 */ ++ { 0, 0, printargs, "SYS_5307" }, /* 5307 */ ++ { 0, 0, printargs, "SYS_5308" }, /* 5308 */ ++ { 0, 0, printargs, "SYS_5309" }, /* 5309 */ ++ { 0, 0, printargs, "SYS_5310" }, /* 5310 */ ++ { 0, 0, printargs, "SYS_5311" }, /* 5311 */ ++ { 0, 0, printargs, "SYS_5312" }, /* 5312 */ ++ { 0, 0, printargs, "SYS_5313" }, /* 5313 */ ++ { 0, 0, printargs, "SYS_5314" }, /* 5314 */ ++ { 0, 0, printargs, "SYS_5315" }, /* 5315 */ ++ { 0, 0, printargs, "SYS_5316" }, /* 5316 */ ++ { 0, 0, printargs, "SYS_5317" }, /* 5317 */ ++ { 0, 0, printargs, "SYS_5318" }, /* 5318 */ ++ { 0, 0, printargs, "SYS_5319" }, /* 5319 */ ++ { 0, 0, printargs, "SYS_5320" }, /* 5320 */ ++ { 0, 0, printargs, "SYS_5321" }, /* 5321 */ ++ { 0, 0, printargs, "SYS_5322" }, /* 5322 */ ++ { 0, 0, printargs, "SYS_5323" }, /* 5323 */ ++ { 0, 0, printargs, "SYS_5324" }, /* 5324 */ ++ { 0, 0, printargs, "SYS_5325" }, /* 5325 */ ++ { 0, 0, printargs, "SYS_5326" }, /* 5326 */ ++ { 0, 0, printargs, "SYS_5327" }, /* 5327 */ ++ { 0, 0, printargs, "SYS_5328" }, /* 5328 */ ++ { 0, 0, printargs, "SYS_5329" }, /* 5329 */ ++ { 0, 0, printargs, "SYS_5330" }, /* 5330 */ ++ { 0, 0, printargs, "SYS_5331" }, /* 5331 */ ++ { 0, 0, printargs, "SYS_5332" }, /* 5332 */ ++ { 0, 0, printargs, "SYS_5333" }, /* 5333 */ ++ { 0, 0, printargs, "SYS_5334" }, /* 5334 */ ++ { 0, 0, printargs, "SYS_5335" }, /* 5335 */ ++ { 0, 0, printargs, "SYS_5336" }, /* 5336 */ ++ { 0, 0, printargs, "SYS_5337" }, /* 5337 */ ++ { 0, 0, printargs, "SYS_5338" }, /* 5338 */ ++ { 0, 0, printargs, "SYS_5339" }, /* 5339 */ ++ { 0, 0, printargs, "SYS_5340" }, /* 5340 */ ++ { 0, 0, printargs, "SYS_5341" }, /* 5341 */ ++ { 0, 0, printargs, "SYS_5342" }, /* 5342 */ ++ { 0, 0, printargs, "SYS_5343" }, /* 5343 */ ++ { 0, 0, printargs, "SYS_5344" }, /* 5344 */ ++ { 0, 0, printargs, "SYS_5345" }, /* 5345 */ ++ { 0, 0, printargs, "SYS_5346" }, /* 5346 */ ++ { 0, 0, printargs, "SYS_5347" }, /* 5347 */ ++ { 0, 0, printargs, "SYS_5348" }, /* 5348 */ ++ { 0, 0, printargs, "SYS_5349" }, /* 5349 */ ++ { 0, 0, printargs, "SYS_5350" }, /* 5350 */ ++ { 0, 0, printargs, "SYS_5351" }, /* 5351 */ ++ { 0, 0, printargs, "SYS_5352" }, /* 5352 */ ++ { 0, 0, printargs, "SYS_5353" }, /* 5353 */ ++ { 0, 0, printargs, "SYS_5354" }, /* 5354 */ ++ { 0, 0, printargs, "SYS_5355" }, /* 5355 */ ++ { 0, 0, printargs, "SYS_5356" }, /* 5356 */ ++ { 0, 0, printargs, "SYS_5357" }, /* 5357 */ ++ { 0, 0, printargs, "SYS_5358" }, /* 5358 */ ++ { 0, 0, printargs, "SYS_5359" }, /* 5359 */ ++ { 0, 0, printargs, "SYS_5360" }, /* 5360 */ ++ { 0, 0, printargs, "SYS_5361" }, /* 5361 */ ++ { 0, 0, printargs, "SYS_5362" }, /* 5362 */ ++ { 0, 0, printargs, "SYS_5363" }, /* 5363 */ ++ { 0, 0, printargs, "SYS_5364" }, /* 5364 */ ++ { 0, 0, printargs, "SYS_5365" }, /* 5365 */ ++ { 0, 0, printargs, "SYS_5366" }, /* 5366 */ ++ { 0, 0, printargs, "SYS_5367" }, /* 5367 */ ++ { 0, 0, printargs, "SYS_5368" }, /* 5368 */ ++ { 0, 0, printargs, "SYS_5369" }, /* 5369 */ ++ { 0, 0, printargs, "SYS_5370" }, /* 5370 */ ++ { 0, 0, printargs, "SYS_5371" }, /* 5371 */ ++ { 0, 0, printargs, "SYS_5372" }, /* 5372 */ ++ { 0, 0, printargs, "SYS_5373" }, /* 5373 */ ++ { 0, 0, printargs, "SYS_5374" }, /* 5374 */ ++ { 0, 0, printargs, "SYS_5375" }, /* 5375 */ ++ { 0, 0, printargs, "SYS_5376" }, /* 5376 */ ++ { 0, 0, printargs, "SYS_5377" }, /* 5377 */ ++ { 0, 0, printargs, "SYS_5378" }, /* 5378 */ ++ { 0, 0, printargs, "SYS_5379" }, /* 5379 */ ++ { 0, 0, printargs, "SYS_5380" }, /* 5380 */ ++ { 0, 0, printargs, "SYS_5381" }, /* 5381 */ ++ { 0, 0, printargs, "SYS_5382" }, /* 5382 */ ++ { 0, 0, printargs, "SYS_5383" }, /* 5383 */ ++ { 0, 0, printargs, "SYS_5384" }, /* 5384 */ ++ { 0, 0, printargs, "SYS_5385" }, /* 5385 */ ++ { 0, 0, printargs, "SYS_5386" }, /* 5386 */ ++ { 0, 0, printargs, "SYS_5387" }, /* 5387 */ ++ { 0, 0, printargs, "SYS_5388" }, /* 5388 */ ++ { 0, 0, printargs, "SYS_5389" }, /* 5389 */ ++ { 0, 0, printargs, "SYS_5390" }, /* 5390 */ ++ { 0, 0, printargs, "SYS_5391" }, /* 5391 */ ++ { 0, 0, printargs, "SYS_5392" }, /* 5392 */ ++ { 0, 0, printargs, "SYS_5393" }, /* 5393 */ ++ { 0, 0, printargs, "SYS_5394" }, /* 5394 */ ++ { 0, 0, printargs, "SYS_5395" }, /* 5395 */ ++ { 0, 0, printargs, "SYS_5396" }, /* 5396 */ ++ { 0, 0, printargs, "SYS_5397" }, /* 5397 */ ++ { 0, 0, printargs, "SYS_5398" }, /* 5398 */ ++ { 0, 0, printargs, "SYS_5399" }, /* 5399 */ ++ { 0, 0, printargs, "SYS_5400" }, /* 5400 */ ++ { 0, 0, printargs, "SYS_5401" }, /* 5401 */ ++ { 0, 0, printargs, "SYS_5402" }, /* 5402 */ ++ { 0, 0, printargs, "SYS_5403" }, /* 5403 */ ++ { 0, 0, printargs, "SYS_5404" }, /* 5404 */ ++ { 0, 0, printargs, "SYS_5405" }, /* 5405 */ ++ { 0, 0, printargs, "SYS_5406" }, /* 5406 */ ++ { 0, 0, printargs, "SYS_5407" }, /* 5407 */ ++ { 0, 0, printargs, "SYS_5408" }, /* 5408 */ ++ { 0, 0, printargs, "SYS_5409" }, /* 5409 */ ++ { 0, 0, printargs, "SYS_5410" }, /* 5410 */ ++ { 0, 0, printargs, "SYS_5411" }, /* 5411 */ ++ { 0, 0, printargs, "SYS_5412" }, /* 5412 */ ++ { 0, 0, printargs, "SYS_5413" }, /* 5413 */ ++ { 0, 0, printargs, "SYS_5414" }, /* 5414 */ ++ { 0, 0, printargs, "SYS_5415" }, /* 5415 */ ++ { 0, 0, printargs, "SYS_5416" }, /* 5416 */ ++ { 0, 0, printargs, "SYS_5417" }, /* 5417 */ ++ { 0, 0, printargs, "SYS_5418" }, /* 5418 */ ++ { 0, 0, printargs, "SYS_5419" }, /* 5419 */ ++ { 0, 0, printargs, "SYS_5420" }, /* 5420 */ ++ { 0, 0, printargs, "SYS_5421" }, /* 5421 */ ++ { 0, 0, printargs, "SYS_5422" }, /* 5422 */ ++ { 0, 0, printargs, "SYS_5423" }, /* 5423 */ ++ { 0, 0, printargs, "SYS_5424" }, /* 5424 */ ++ { 0, 0, printargs, "SYS_5425" }, /* 5425 */ ++ { 0, 0, printargs, "SYS_5426" }, /* 5426 */ ++ { 0, 0, printargs, "SYS_5427" }, /* 5427 */ ++ { 0, 0, printargs, "SYS_5428" }, /* 5428 */ ++ { 0, 0, printargs, "SYS_5429" }, /* 5429 */ ++ { 0, 0, printargs, "SYS_5430" }, /* 5430 */ ++ { 0, 0, printargs, "SYS_5431" }, /* 5431 */ ++ { 0, 0, printargs, "SYS_5432" }, /* 5432 */ ++ { 0, 0, printargs, "SYS_5433" }, /* 5433 */ ++ { 0, 0, printargs, "SYS_5434" }, /* 5434 */ ++ { 0, 0, printargs, "SYS_5435" }, /* 5435 */ ++ { 0, 0, printargs, "SYS_5436" }, /* 5436 */ ++ { 0, 0, printargs, "SYS_5437" }, /* 5437 */ ++ { 0, 0, printargs, "SYS_5438" }, /* 5438 */ ++ { 0, 0, printargs, "SYS_5439" }, /* 5439 */ ++ { 0, 0, printargs, "SYS_5440" }, /* 5440 */ ++ { 0, 0, printargs, "SYS_5441" }, /* 5441 */ ++ { 0, 0, printargs, "SYS_5442" }, /* 5442 */ ++ { 0, 0, printargs, "SYS_5443" }, /* 5443 */ ++ { 0, 0, printargs, "SYS_5444" }, /* 5444 */ ++ { 0, 0, printargs, "SYS_5445" }, /* 5445 */ ++ { 0, 0, printargs, "SYS_5446" }, /* 5446 */ ++ { 0, 0, printargs, "SYS_5447" }, /* 5447 */ ++ { 0, 0, printargs, "SYS_5448" }, /* 5448 */ ++ { 0, 0, printargs, "SYS_5449" }, /* 5449 */ ++ { 0, 0, printargs, "SYS_5450" }, /* 5450 */ ++ { 0, 0, printargs, "SYS_5451" }, /* 5451 */ ++ { 0, 0, printargs, "SYS_5452" }, /* 5452 */ ++ { 0, 0, printargs, "SYS_5453" }, /* 5453 */ ++ { 0, 0, printargs, "SYS_5454" }, /* 5454 */ ++ { 0, 0, printargs, "SYS_5455" }, /* 5455 */ ++ { 0, 0, printargs, "SYS_5456" }, /* 5456 */ ++ { 0, 0, printargs, "SYS_5457" }, /* 5457 */ ++ { 0, 0, printargs, "SYS_5458" }, /* 5458 */ ++ { 0, 0, printargs, "SYS_5459" }, /* 5459 */ ++ { 0, 0, printargs, "SYS_5460" }, /* 5460 */ ++ { 0, 0, printargs, "SYS_5461" }, /* 5461 */ ++ { 0, 0, printargs, "SYS_5462" }, /* 5462 */ ++ { 0, 0, printargs, "SYS_5463" }, /* 5463 */ ++ { 0, 0, printargs, "SYS_5464" }, /* 5464 */ ++ { 0, 0, printargs, "SYS_5465" }, /* 5465 */ ++ { 0, 0, printargs, "SYS_5466" }, /* 5466 */ ++ { 0, 0, printargs, "SYS_5467" }, /* 5467 */ ++ { 0, 0, printargs, "SYS_5468" }, /* 5468 */ ++ { 0, 0, printargs, "SYS_5469" }, /* 5469 */ ++ { 0, 0, printargs, "SYS_5470" }, /* 5470 */ ++ { 0, 0, printargs, "SYS_5471" }, /* 5471 */ ++ { 0, 0, printargs, "SYS_5472" }, /* 5472 */ ++ { 0, 0, printargs, "SYS_5473" }, /* 5473 */ ++ { 0, 0, printargs, "SYS_5474" }, /* 5474 */ ++ { 0, 0, printargs, "SYS_5475" }, /* 5475 */ ++ { 0, 0, printargs, "SYS_5476" }, /* 5476 */ ++ { 0, 0, printargs, "SYS_5477" }, /* 5477 */ ++ { 0, 0, printargs, "SYS_5478" }, /* 5478 */ ++ { 0, 0, printargs, "SYS_5479" }, /* 5479 */ ++ { 0, 0, printargs, "SYS_5480" }, /* 5480 */ ++ { 0, 0, printargs, "SYS_5481" }, /* 5481 */ ++ { 0, 0, printargs, "SYS_5482" }, /* 5482 */ ++ { 0, 0, printargs, "SYS_5483" }, /* 5483 */ ++ { 0, 0, printargs, "SYS_5484" }, /* 5484 */ ++ { 0, 0, printargs, "SYS_5485" }, /* 5485 */ ++ { 0, 0, printargs, "SYS_5486" }, /* 5486 */ ++ { 0, 0, printargs, "SYS_5487" }, /* 5487 */ ++ { 0, 0, printargs, "SYS_5488" }, /* 5488 */ ++ { 0, 0, printargs, "SYS_5489" }, /* 5489 */ ++ { 0, 0, printargs, "SYS_5490" }, /* 5490 */ ++ { 0, 0, printargs, "SYS_5491" }, /* 5491 */ ++ { 0, 0, printargs, "SYS_5492" }, /* 5492 */ ++ { 0, 0, printargs, "SYS_5493" }, /* 5493 */ ++ { 0, 0, printargs, "SYS_5494" }, /* 5494 */ ++ { 0, 0, printargs, "SYS_5495" }, /* 5495 */ ++ { 0, 0, printargs, "SYS_5496" }, /* 5496 */ ++ { 0, 0, printargs, "SYS_5497" }, /* 5497 */ ++ { 0, 0, printargs, "SYS_5498" }, /* 5498 */ ++ { 0, 0, printargs, "SYS_5499" }, /* 5499 */ ++ { 0, 0, printargs, "SYS_5500" }, /* 5500 */ ++ { 0, 0, printargs, "SYS_5501" }, /* 5501 */ ++ { 0, 0, printargs, "SYS_5502" }, /* 5502 */ ++ { 0, 0, printargs, "SYS_5503" }, /* 5503 */ ++ { 0, 0, printargs, "SYS_5504" }, /* 5504 */ ++ { 0, 0, printargs, "SYS_5505" }, /* 5505 */ ++ { 0, 0, printargs, "SYS_5506" }, /* 5506 */ ++ { 0, 0, printargs, "SYS_5507" }, /* 5507 */ ++ { 0, 0, printargs, "SYS_5508" }, /* 5508 */ ++ { 0, 0, printargs, "SYS_5509" }, /* 5509 */ ++ { 0, 0, printargs, "SYS_5510" }, /* 5510 */ ++ { 0, 0, printargs, "SYS_5511" }, /* 5511 */ ++ { 0, 0, printargs, "SYS_5512" }, /* 5512 */ ++ { 0, 0, printargs, "SYS_5513" }, /* 5513 */ ++ { 0, 0, printargs, "SYS_5514" }, /* 5514 */ ++ { 0, 0, printargs, "SYS_5515" }, /* 5515 */ ++ { 0, 0, printargs, "SYS_5516" }, /* 5516 */ ++ { 0, 0, printargs, "SYS_5517" }, /* 5517 */ ++ { 0, 0, printargs, "SYS_5518" }, /* 5518 */ ++ { 0, 0, printargs, "SYS_5519" }, /* 5519 */ ++ { 0, 0, printargs, "SYS_5520" }, /* 5520 */ ++ { 0, 0, printargs, "SYS_5521" }, /* 5521 */ ++ { 0, 0, printargs, "SYS_5522" }, /* 5522 */ ++ { 0, 0, printargs, "SYS_5523" }, /* 5523 */ ++ { 0, 0, printargs, "SYS_5524" }, /* 5524 */ ++ { 0, 0, printargs, "SYS_5525" }, /* 5525 */ ++ { 0, 0, printargs, "SYS_5526" }, /* 5526 */ ++ { 0, 0, printargs, "SYS_5527" }, /* 5527 */ ++ { 0, 0, printargs, "SYS_5528" }, /* 5528 */ ++ { 0, 0, printargs, "SYS_5529" }, /* 5529 */ ++ { 0, 0, printargs, "SYS_5530" }, /* 5530 */ ++ { 0, 0, printargs, "SYS_5531" }, /* 5531 */ ++ { 0, 0, printargs, "SYS_5532" }, /* 5532 */ ++ { 0, 0, printargs, "SYS_5533" }, /* 5533 */ ++ { 0, 0, printargs, "SYS_5534" }, /* 5534 */ ++ { 0, 0, printargs, "SYS_5535" }, /* 5535 */ ++ { 0, 0, printargs, "SYS_5536" }, /* 5536 */ ++ { 0, 0, printargs, "SYS_5537" }, /* 5537 */ ++ { 0, 0, printargs, "SYS_5538" }, /* 5538 */ ++ { 0, 0, printargs, "SYS_5539" }, /* 5539 */ ++ { 0, 0, printargs, "SYS_5540" }, /* 5540 */ ++ { 0, 0, printargs, "SYS_5541" }, /* 5541 */ ++ { 0, 0, printargs, "SYS_5542" }, /* 5542 */ ++ { 0, 0, printargs, "SYS_5543" }, /* 5543 */ ++ { 0, 0, printargs, "SYS_5544" }, /* 5544 */ ++ { 0, 0, printargs, "SYS_5545" }, /* 5545 */ ++ { 0, 0, printargs, "SYS_5546" }, /* 5546 */ ++ { 0, 0, printargs, "SYS_5547" }, /* 5547 */ ++ { 0, 0, printargs, "SYS_5548" }, /* 5548 */ ++ { 0, 0, printargs, "SYS_5549" }, /* 5549 */ ++ { 0, 0, printargs, "SYS_5550" }, /* 5550 */ ++ { 0, 0, printargs, "SYS_5551" }, /* 5551 */ ++ { 0, 0, printargs, "SYS_5552" }, /* 5552 */ ++ { 0, 0, printargs, "SYS_5553" }, /* 5553 */ ++ { 0, 0, printargs, "SYS_5554" }, /* 5554 */ ++ { 0, 0, printargs, "SYS_5555" }, /* 5555 */ ++ { 0, 0, printargs, "SYS_5556" }, /* 5556 */ ++ { 0, 0, printargs, "SYS_5557" }, /* 5557 */ ++ { 0, 0, printargs, "SYS_5558" }, /* 5558 */ ++ { 0, 0, printargs, "SYS_5559" }, /* 5559 */ ++ { 0, 0, printargs, "SYS_5560" }, /* 5560 */ ++ { 0, 0, printargs, "SYS_5561" }, /* 5561 */ ++ { 0, 0, printargs, "SYS_5562" }, /* 5562 */ ++ { 0, 0, printargs, "SYS_5563" }, /* 5563 */ ++ { 0, 0, printargs, "SYS_5564" }, /* 5564 */ ++ { 0, 0, printargs, "SYS_5565" }, /* 5565 */ ++ { 0, 0, printargs, "SYS_5566" }, /* 5566 */ ++ { 0, 0, printargs, "SYS_5567" }, /* 5567 */ ++ { 0, 0, printargs, "SYS_5568" }, /* 5568 */ ++ { 0, 0, printargs, "SYS_5569" }, /* 5569 */ ++ { 0, 0, printargs, "SYS_5570" }, /* 5570 */ ++ { 0, 0, printargs, "SYS_5571" }, /* 5571 */ ++ { 0, 0, printargs, "SYS_5572" }, /* 5572 */ ++ { 0, 0, printargs, "SYS_5573" }, /* 5573 */ ++ { 0, 0, printargs, "SYS_5574" }, /* 5574 */ ++ { 0, 0, printargs, "SYS_5575" }, /* 5575 */ ++ { 0, 0, printargs, "SYS_5576" }, /* 5576 */ ++ { 0, 0, printargs, "SYS_5577" }, /* 5577 */ ++ { 0, 0, printargs, "SYS_5578" }, /* 5578 */ ++ { 0, 0, printargs, "SYS_5579" }, /* 5579 */ ++ { 0, 0, printargs, "SYS_5580" }, /* 5580 */ ++ { 0, 0, printargs, "SYS_5581" }, /* 5581 */ ++ { 0, 0, printargs, "SYS_5582" }, /* 5582 */ ++ { 0, 0, printargs, "SYS_5583" }, /* 5583 */ ++ { 0, 0, printargs, "SYS_5584" }, /* 5584 */ ++ { 0, 0, printargs, "SYS_5585" }, /* 5585 */ ++ { 0, 0, printargs, "SYS_5586" }, /* 5586 */ ++ { 0, 0, printargs, "SYS_5587" }, /* 5587 */ ++ { 0, 0, printargs, "SYS_5588" }, /* 5588 */ ++ { 0, 0, printargs, "SYS_5589" }, /* 5589 */ ++ { 0, 0, printargs, "SYS_5590" }, /* 5590 */ ++ { 0, 0, printargs, "SYS_5591" }, /* 5591 */ ++ { 0, 0, printargs, "SYS_5592" }, /* 5592 */ ++ { 0, 0, printargs, "SYS_5593" }, /* 5593 */ ++ { 0, 0, printargs, "SYS_5594" }, /* 5594 */ ++ { 0, 0, printargs, "SYS_5595" }, /* 5595 */ ++ { 0, 0, printargs, "SYS_5596" }, /* 5596 */ ++ { 0, 0, printargs, "SYS_5597" }, /* 5597 */ ++ { 0, 0, printargs, "SYS_5598" }, /* 5598 */ ++ { 0, 0, printargs, "SYS_5599" }, /* 5599 */ ++ { 0, 0, printargs, "SYS_5600" }, /* 5600 */ ++ { 0, 0, printargs, "SYS_5601" }, /* 5601 */ ++ { 0, 0, printargs, "SYS_5602" }, /* 5602 */ ++ { 0, 0, printargs, "SYS_5603" }, /* 5603 */ ++ { 0, 0, printargs, "SYS_5604" }, /* 5604 */ ++ { 0, 0, printargs, "SYS_5605" }, /* 5605 */ ++ { 0, 0, printargs, "SYS_5606" }, /* 5606 */ ++ { 0, 0, printargs, "SYS_5607" }, /* 5607 */ ++ { 0, 0, printargs, "SYS_5608" }, /* 5608 */ ++ { 0, 0, printargs, "SYS_5609" }, /* 5609 */ ++ { 0, 0, printargs, "SYS_5610" }, /* 5610 */ ++ { 0, 0, printargs, "SYS_5611" }, /* 5611 */ ++ { 0, 0, printargs, "SYS_5612" }, /* 5612 */ ++ { 0, 0, printargs, "SYS_5613" }, /* 5613 */ ++ { 0, 0, printargs, "SYS_5614" }, /* 5614 */ ++ { 0, 0, printargs, "SYS_5615" }, /* 5615 */ ++ { 0, 0, printargs, "SYS_5616" }, /* 5616 */ ++ { 0, 0, printargs, "SYS_5617" }, /* 5617 */ ++ { 0, 0, printargs, "SYS_5618" }, /* 5618 */ ++ { 0, 0, printargs, "SYS_5619" }, /* 5619 */ ++ { 0, 0, printargs, "SYS_5620" }, /* 5620 */ ++ { 0, 0, printargs, "SYS_5621" }, /* 5621 */ ++ { 0, 0, printargs, "SYS_5622" }, /* 5622 */ ++ { 0, 0, printargs, "SYS_5623" }, /* 5623 */ ++ { 0, 0, printargs, "SYS_5624" }, /* 5624 */ ++ { 0, 0, printargs, "SYS_5625" }, /* 5625 */ ++ { 0, 0, printargs, "SYS_5626" }, /* 5626 */ ++ { 0, 0, printargs, "SYS_5627" }, /* 5627 */ ++ { 0, 0, printargs, "SYS_5628" }, /* 5628 */ ++ { 0, 0, printargs, "SYS_5629" }, /* 5629 */ ++ { 0, 0, printargs, "SYS_5630" }, /* 5630 */ ++ { 0, 0, printargs, "SYS_5631" }, /* 5631 */ ++ { 0, 0, printargs, "SYS_5632" }, /* 5632 */ ++ { 0, 0, printargs, "SYS_5633" }, /* 5633 */ ++ { 0, 0, printargs, "SYS_5634" }, /* 5634 */ ++ { 0, 0, printargs, "SYS_5635" }, /* 5635 */ ++ { 0, 0, printargs, "SYS_5636" }, /* 5636 */ ++ { 0, 0, printargs, "SYS_5637" }, /* 5637 */ ++ { 0, 0, printargs, "SYS_5638" }, /* 5638 */ ++ { 0, 0, printargs, "SYS_5639" }, /* 5639 */ ++ { 0, 0, printargs, "SYS_5640" }, /* 5640 */ ++ { 0, 0, printargs, "SYS_5641" }, /* 5641 */ ++ { 0, 0, printargs, "SYS_5642" }, /* 5642 */ ++ { 0, 0, printargs, "SYS_5643" }, /* 5643 */ ++ { 0, 0, printargs, "SYS_5644" }, /* 5644 */ ++ { 0, 0, printargs, "SYS_5645" }, /* 5645 */ ++ { 0, 0, printargs, "SYS_5646" }, /* 5646 */ ++ { 0, 0, printargs, "SYS_5647" }, /* 5647 */ ++ { 0, 0, printargs, "SYS_5648" }, /* 5648 */ ++ { 0, 0, printargs, "SYS_5649" }, /* 5649 */ ++ { 0, 0, printargs, "SYS_5650" }, /* 5650 */ ++ { 0, 0, printargs, "SYS_5651" }, /* 5651 */ ++ { 0, 0, printargs, "SYS_5652" }, /* 5652 */ ++ { 0, 0, printargs, "SYS_5653" }, /* 5653 */ ++ { 0, 0, printargs, "SYS_5654" }, /* 5654 */ ++ { 0, 0, printargs, "SYS_5655" }, /* 5655 */ ++ { 0, 0, printargs, "SYS_5656" }, /* 5656 */ ++ { 0, 0, printargs, "SYS_5657" }, /* 5657 */ ++ { 0, 0, printargs, "SYS_5658" }, /* 5658 */ ++ { 0, 0, printargs, "SYS_5659" }, /* 5659 */ ++ { 0, 0, printargs, "SYS_5660" }, /* 5660 */ ++ { 0, 0, printargs, "SYS_5661" }, /* 5661 */ ++ { 0, 0, printargs, "SYS_5662" }, /* 5662 */ ++ { 0, 0, printargs, "SYS_5663" }, /* 5663 */ ++ { 0, 0, printargs, "SYS_5664" }, /* 5664 */ ++ { 0, 0, printargs, "SYS_5665" }, /* 5665 */ ++ { 0, 0, printargs, "SYS_5666" }, /* 5666 */ ++ { 0, 0, printargs, "SYS_5667" }, /* 5667 */ ++ { 0, 0, printargs, "SYS_5668" }, /* 5668 */ ++ { 0, 0, printargs, "SYS_5669" }, /* 5669 */ ++ { 0, 0, printargs, "SYS_5670" }, /* 5670 */ ++ { 0, 0, printargs, "SYS_5671" }, /* 5671 */ ++ { 0, 0, printargs, "SYS_5672" }, /* 5672 */ ++ { 0, 0, printargs, "SYS_5673" }, /* 5673 */ ++ { 0, 0, printargs, "SYS_5674" }, /* 5674 */ ++ { 0, 0, printargs, "SYS_5675" }, /* 5675 */ ++ { 0, 0, printargs, "SYS_5676" }, /* 5676 */ ++ { 0, 0, printargs, "SYS_5677" }, /* 5677 */ ++ { 0, 0, printargs, "SYS_5678" }, /* 5678 */ ++ { 0, 0, printargs, "SYS_5679" }, /* 5679 */ ++ { 0, 0, printargs, "SYS_5680" }, /* 5680 */ ++ { 0, 0, printargs, "SYS_5681" }, /* 5681 */ ++ { 0, 0, printargs, "SYS_5682" }, /* 5682 */ ++ { 0, 0, printargs, "SYS_5683" }, /* 5683 */ ++ { 0, 0, printargs, "SYS_5684" }, /* 5684 */ ++ { 0, 0, printargs, "SYS_5685" }, /* 5685 */ ++ { 0, 0, printargs, "SYS_5686" }, /* 5686 */ ++ { 0, 0, printargs, "SYS_5687" }, /* 5687 */ ++ { 0, 0, printargs, "SYS_5688" }, /* 5688 */ ++ { 0, 0, printargs, "SYS_5689" }, /* 5689 */ ++ { 0, 0, printargs, "SYS_5690" }, /* 5690 */ ++ { 0, 0, printargs, "SYS_5691" }, /* 5691 */ ++ { 0, 0, printargs, "SYS_5692" }, /* 5692 */ ++ { 0, 0, printargs, "SYS_5693" }, /* 5693 */ ++ { 0, 0, printargs, "SYS_5694" }, /* 5694 */ ++ { 0, 0, printargs, "SYS_5695" }, /* 5695 */ ++ { 0, 0, printargs, "SYS_5696" }, /* 5696 */ ++ { 0, 0, printargs, "SYS_5697" }, /* 5697 */ ++ { 0, 0, printargs, "SYS_5698" }, /* 5698 */ ++ { 0, 0, printargs, "SYS_5699" }, /* 5699 */ ++ { 0, 0, printargs, "SYS_5700" }, /* 5700 */ ++ { 0, 0, printargs, "SYS_5701" }, /* 5701 */ ++ { 0, 0, printargs, "SYS_5702" }, /* 5702 */ ++ { 0, 0, printargs, "SYS_5703" }, /* 5703 */ ++ { 0, 0, printargs, "SYS_5704" }, /* 5704 */ ++ { 0, 0, printargs, "SYS_5705" }, /* 5705 */ ++ { 0, 0, printargs, "SYS_5706" }, /* 5706 */ ++ { 0, 0, printargs, "SYS_5707" }, /* 5707 */ ++ { 0, 0, printargs, "SYS_5708" }, /* 5708 */ ++ { 0, 0, printargs, "SYS_5709" }, /* 5709 */ ++ { 0, 0, printargs, "SYS_5710" }, /* 5710 */ ++ { 0, 0, printargs, "SYS_5711" }, /* 5711 */ ++ { 0, 0, printargs, "SYS_5712" }, /* 5712 */ ++ { 0, 0, printargs, "SYS_5713" }, /* 5713 */ ++ { 0, 0, printargs, "SYS_5714" }, /* 5714 */ ++ { 0, 0, printargs, "SYS_5715" }, /* 5715 */ ++ { 0, 0, printargs, "SYS_5716" }, /* 5716 */ ++ { 0, 0, printargs, "SYS_5717" }, /* 5717 */ ++ { 0, 0, printargs, "SYS_5718" }, /* 5718 */ ++ { 0, 0, printargs, "SYS_5719" }, /* 5719 */ ++ { 0, 0, printargs, "SYS_5720" }, /* 5720 */ ++ { 0, 0, printargs, "SYS_5721" }, /* 5721 */ ++ { 0, 0, printargs, "SYS_5722" }, /* 5722 */ ++ { 0, 0, printargs, "SYS_5723" }, /* 5723 */ ++ { 0, 0, printargs, "SYS_5724" }, /* 5724 */ ++ { 0, 0, printargs, "SYS_5725" }, /* 5725 */ ++ { 0, 0, printargs, "SYS_5726" }, /* 5726 */ ++ { 0, 0, printargs, "SYS_5727" }, /* 5727 */ ++ { 0, 0, printargs, "SYS_5728" }, /* 5728 */ ++ { 0, 0, printargs, "SYS_5729" }, /* 5729 */ ++ { 0, 0, printargs, "SYS_5730" }, /* 5730 */ ++ { 0, 0, printargs, "SYS_5731" }, /* 5731 */ ++ { 0, 0, printargs, "SYS_5732" }, /* 5732 */ ++ { 0, 0, printargs, "SYS_5733" }, /* 5733 */ ++ { 0, 0, printargs, "SYS_5734" }, /* 5734 */ ++ { 0, 0, printargs, "SYS_5735" }, /* 5735 */ ++ { 0, 0, printargs, "SYS_5736" }, /* 5736 */ ++ { 0, 0, printargs, "SYS_5737" }, /* 5737 */ ++ { 0, 0, printargs, "SYS_5738" }, /* 5738 */ ++ { 0, 0, printargs, "SYS_5739" }, /* 5739 */ ++ { 0, 0, printargs, "SYS_5740" }, /* 5740 */ ++ { 0, 0, printargs, "SYS_5741" }, /* 5741 */ ++ { 0, 0, printargs, "SYS_5742" }, /* 5742 */ ++ { 0, 0, printargs, "SYS_5743" }, /* 5743 */ ++ { 0, 0, printargs, "SYS_5744" }, /* 5744 */ ++ { 0, 0, printargs, "SYS_5745" }, /* 5745 */ ++ { 0, 0, printargs, "SYS_5746" }, /* 5746 */ ++ { 0, 0, printargs, "SYS_5747" }, /* 5747 */ ++ { 0, 0, printargs, "SYS_5748" }, /* 5748 */ ++ { 0, 0, printargs, "SYS_5749" }, /* 5749 */ ++ { 0, 0, printargs, "SYS_5750" }, /* 5750 */ ++ { 0, 0, printargs, "SYS_5751" }, /* 5751 */ ++ { 0, 0, printargs, "SYS_5752" }, /* 5752 */ ++ { 0, 0, printargs, "SYS_5753" }, /* 5753 */ ++ { 0, 0, printargs, "SYS_5754" }, /* 5754 */ ++ { 0, 0, printargs, "SYS_5755" }, /* 5755 */ ++ { 0, 0, printargs, "SYS_5756" }, /* 5756 */ ++ { 0, 0, printargs, "SYS_5757" }, /* 5757 */ ++ { 0, 0, printargs, "SYS_5758" }, /* 5758 */ ++ { 0, 0, printargs, "SYS_5759" }, /* 5759 */ ++ { 0, 0, printargs, "SYS_5760" }, /* 5760 */ ++ { 0, 0, printargs, "SYS_5761" }, /* 5761 */ ++ { 0, 0, printargs, "SYS_5762" }, /* 5762 */ ++ { 0, 0, printargs, "SYS_5763" }, /* 5763 */ ++ { 0, 0, printargs, "SYS_5764" }, /* 5764 */ ++ { 0, 0, printargs, "SYS_5765" }, /* 5765 */ ++ { 0, 0, printargs, "SYS_5766" }, /* 5766 */ ++ { 0, 0, printargs, "SYS_5767" }, /* 5767 */ ++ { 0, 0, printargs, "SYS_5768" }, /* 5768 */ ++ { 0, 0, printargs, "SYS_5769" }, /* 5769 */ ++ { 0, 0, printargs, "SYS_5770" }, /* 5770 */ ++ { 0, 0, printargs, "SYS_5771" }, /* 5771 */ ++ { 0, 0, printargs, "SYS_5772" }, /* 5772 */ ++ { 0, 0, printargs, "SYS_5773" }, /* 5773 */ ++ { 0, 0, printargs, "SYS_5774" }, /* 5774 */ ++ { 0, 0, printargs, "SYS_5775" }, /* 5775 */ ++ { 0, 0, printargs, "SYS_5776" }, /* 5776 */ ++ { 0, 0, printargs, "SYS_5777" }, /* 5777 */ ++ { 0, 0, printargs, "SYS_5778" }, /* 5778 */ ++ { 0, 0, printargs, "SYS_5779" }, /* 5779 */ ++ { 0, 0, printargs, "SYS_5780" }, /* 5780 */ ++ { 0, 0, printargs, "SYS_5781" }, /* 5781 */ ++ { 0, 0, printargs, "SYS_5782" }, /* 5782 */ ++ { 0, 0, printargs, "SYS_5783" }, /* 5783 */ ++ { 0, 0, printargs, "SYS_5784" }, /* 5784 */ ++ { 0, 0, printargs, "SYS_5785" }, /* 5785 */ ++ { 0, 0, printargs, "SYS_5786" }, /* 5786 */ ++ { 0, 0, printargs, "SYS_5787" }, /* 5787 */ ++ { 0, 0, printargs, "SYS_5788" }, /* 5788 */ ++ { 0, 0, printargs, "SYS_5789" }, /* 5789 */ ++ { 0, 0, printargs, "SYS_5790" }, /* 5790 */ ++ { 0, 0, printargs, "SYS_5791" }, /* 5791 */ ++ { 0, 0, printargs, "SYS_5792" }, /* 5792 */ ++ { 0, 0, printargs, "SYS_5793" }, /* 5793 */ ++ { 0, 0, printargs, "SYS_5794" }, /* 5794 */ ++ { 0, 0, printargs, "SYS_5795" }, /* 5795 */ ++ { 0, 0, printargs, "SYS_5796" }, /* 5796 */ ++ { 0, 0, printargs, "SYS_5797" }, /* 5797 */ ++ { 0, 0, printargs, "SYS_5798" }, /* 5798 */ ++ { 0, 0, printargs, "SYS_5799" }, /* 5799 */ ++ { 0, 0, printargs, "SYS_5800" }, /* 5800 */ ++ { 0, 0, printargs, "SYS_5801" }, /* 5801 */ ++ { 0, 0, printargs, "SYS_5802" }, /* 5802 */ ++ { 0, 0, printargs, "SYS_5803" }, /* 5803 */ ++ { 0, 0, printargs, "SYS_5804" }, /* 5804 */ ++ { 0, 0, printargs, "SYS_5805" }, /* 5805 */ ++ { 0, 0, printargs, "SYS_5806" }, /* 5806 */ ++ { 0, 0, printargs, "SYS_5807" }, /* 5807 */ ++ { 0, 0, printargs, "SYS_5808" }, /* 5808 */ ++ { 0, 0, printargs, "SYS_5809" }, /* 5809 */ ++ { 0, 0, printargs, "SYS_5810" }, /* 5810 */ ++ { 0, 0, printargs, "SYS_5811" }, /* 5811 */ ++ { 0, 0, printargs, "SYS_5812" }, /* 5812 */ ++ { 0, 0, printargs, "SYS_5813" }, /* 5813 */ ++ { 0, 0, printargs, "SYS_5814" }, /* 5814 */ ++ { 0, 0, printargs, "SYS_5815" }, /* 5815 */ ++ { 0, 0, printargs, "SYS_5816" }, /* 5816 */ ++ { 0, 0, printargs, "SYS_5817" }, /* 5817 */ ++ { 0, 0, printargs, "SYS_5818" }, /* 5818 */ ++ { 0, 0, printargs, "SYS_5819" }, /* 5819 */ ++ { 0, 0, printargs, "SYS_5820" }, /* 5820 */ ++ { 0, 0, printargs, "SYS_5821" }, /* 5821 */ ++ { 0, 0, printargs, "SYS_5822" }, /* 5822 */ ++ { 0, 0, printargs, "SYS_5823" }, /* 5823 */ ++ { 0, 0, printargs, "SYS_5824" }, /* 5824 */ ++ { 0, 0, printargs, "SYS_5825" }, /* 5825 */ ++ { 0, 0, printargs, "SYS_5826" }, /* 5826 */ ++ { 0, 0, printargs, "SYS_5827" }, /* 5827 */ ++ { 0, 0, printargs, "SYS_5828" }, /* 5828 */ ++ { 0, 0, printargs, "SYS_5829" }, /* 5829 */ ++ { 0, 0, printargs, "SYS_5830" }, /* 5830 */ ++ { 0, 0, printargs, "SYS_5831" }, /* 5831 */ ++ { 0, 0, printargs, "SYS_5832" }, /* 5832 */ ++ { 0, 0, printargs, "SYS_5833" }, /* 5833 */ ++ { 0, 0, printargs, "SYS_5834" }, /* 5834 */ ++ { 0, 0, printargs, "SYS_5835" }, /* 5835 */ ++ { 0, 0, printargs, "SYS_5836" }, /* 5836 */ ++ { 0, 0, printargs, "SYS_5837" }, /* 5837 */ ++ { 0, 0, printargs, "SYS_5838" }, /* 5838 */ ++ { 0, 0, printargs, "SYS_5839" }, /* 5839 */ ++ { 0, 0, printargs, "SYS_5840" }, /* 5840 */ ++ { 0, 0, printargs, "SYS_5841" }, /* 5841 */ ++ { 0, 0, printargs, "SYS_5842" }, /* 5842 */ ++ { 0, 0, printargs, "SYS_5843" }, /* 5843 */ ++ { 0, 0, printargs, "SYS_5844" }, /* 5844 */ ++ { 0, 0, printargs, "SYS_5845" }, /* 5845 */ ++ { 0, 0, printargs, "SYS_5846" }, /* 5846 */ ++ { 0, 0, printargs, "SYS_5847" }, /* 5847 */ ++ { 0, 0, printargs, "SYS_5848" }, /* 5848 */ ++ { 0, 0, printargs, "SYS_5849" }, /* 5849 */ ++ { 0, 0, printargs, "SYS_5850" }, /* 5850 */ ++ { 0, 0, printargs, "SYS_5851" }, /* 5851 */ ++ { 0, 0, printargs, "SYS_5852" }, /* 5852 */ ++ { 0, 0, printargs, "SYS_5853" }, /* 5853 */ ++ { 0, 0, printargs, "SYS_5854" }, /* 5854 */ ++ { 0, 0, printargs, "SYS_5855" }, /* 5855 */ ++ { 0, 0, printargs, "SYS_5856" }, /* 5856 */ ++ { 0, 0, printargs, "SYS_5857" }, /* 5857 */ ++ { 0, 0, printargs, "SYS_5858" }, /* 5858 */ ++ { 0, 0, printargs, "SYS_5859" }, /* 5859 */ ++ { 0, 0, printargs, "SYS_5860" }, /* 5860 */ ++ { 0, 0, printargs, "SYS_5861" }, /* 5861 */ ++ { 0, 0, printargs, "SYS_5862" }, /* 5862 */ ++ { 0, 0, printargs, "SYS_5863" }, /* 5863 */ ++ { 0, 0, printargs, "SYS_5864" }, /* 5864 */ ++ { 0, 0, printargs, "SYS_5865" }, /* 5865 */ ++ { 0, 0, printargs, "SYS_5866" }, /* 5866 */ ++ { 0, 0, printargs, "SYS_5867" }, /* 5867 */ ++ { 0, 0, printargs, "SYS_5868" }, /* 5868 */ ++ { 0, 0, printargs, "SYS_5869" }, /* 5869 */ ++ { 0, 0, printargs, "SYS_5870" }, /* 5870 */ ++ { 0, 0, printargs, "SYS_5871" }, /* 5871 */ ++ { 0, 0, printargs, "SYS_5872" }, /* 5872 */ ++ { 0, 0, printargs, "SYS_5873" }, /* 5873 */ ++ { 0, 0, printargs, "SYS_5874" }, /* 5874 */ ++ { 0, 0, printargs, "SYS_5875" }, /* 5875 */ ++ { 0, 0, printargs, "SYS_5876" }, /* 5876 */ ++ { 0, 0, printargs, "SYS_5877" }, /* 5877 */ ++ { 0, 0, printargs, "SYS_5878" }, /* 5878 */ ++ { 0, 0, printargs, "SYS_5879" }, /* 5879 */ ++ { 0, 0, printargs, "SYS_5880" }, /* 5880 */ ++ { 0, 0, printargs, "SYS_5881" }, /* 5881 */ ++ { 0, 0, printargs, "SYS_5882" }, /* 5882 */ ++ { 0, 0, printargs, "SYS_5883" }, /* 5883 */ ++ { 0, 0, printargs, "SYS_5884" }, /* 5884 */ ++ { 0, 0, printargs, "SYS_5885" }, /* 5885 */ ++ { 0, 0, printargs, "SYS_5886" }, /* 5886 */ ++ { 0, 0, printargs, "SYS_5887" }, /* 5887 */ ++ { 0, 0, printargs, "SYS_5888" }, /* 5888 */ ++ { 0, 0, printargs, "SYS_5889" }, /* 5889 */ ++ { 0, 0, printargs, "SYS_5890" }, /* 5890 */ ++ { 0, 0, printargs, "SYS_5891" }, /* 5891 */ ++ { 0, 0, printargs, "SYS_5892" }, /* 5892 */ ++ { 0, 0, printargs, "SYS_5893" }, /* 5893 */ ++ { 0, 0, printargs, "SYS_5894" }, /* 5894 */ ++ { 0, 0, printargs, "SYS_5895" }, /* 5895 */ ++ { 0, 0, printargs, "SYS_5896" }, /* 5896 */ ++ { 0, 0, printargs, "SYS_5897" }, /* 5897 */ ++ { 0, 0, printargs, "SYS_5898" }, /* 5898 */ ++ { 0, 0, printargs, "SYS_5899" }, /* 5899 */ ++ { 0, 0, printargs, "SYS_5900" }, /* 5900 */ ++ { 0, 0, printargs, "SYS_5901" }, /* 5901 */ ++ { 0, 0, printargs, "SYS_5902" }, /* 5902 */ ++ { 0, 0, printargs, "SYS_5903" }, /* 5903 */ ++ { 0, 0, printargs, "SYS_5904" }, /* 5904 */ ++ { 0, 0, printargs, "SYS_5905" }, /* 5905 */ ++ { 0, 0, printargs, "SYS_5906" }, /* 5906 */ ++ { 0, 0, printargs, "SYS_5907" }, /* 5907 */ ++ { 0, 0, printargs, "SYS_5908" }, /* 5908 */ ++ { 0, 0, printargs, "SYS_5909" }, /* 5909 */ ++ { 0, 0, printargs, "SYS_5910" }, /* 5910 */ ++ { 0, 0, printargs, "SYS_5911" }, /* 5911 */ ++ { 0, 0, printargs, "SYS_5912" }, /* 5912 */ ++ { 0, 0, printargs, "SYS_5913" }, /* 5913 */ ++ { 0, 0, printargs, "SYS_5914" }, /* 5914 */ ++ { 0, 0, printargs, "SYS_5915" }, /* 5915 */ ++ { 0, 0, printargs, "SYS_5916" }, /* 5916 */ ++ { 0, 0, printargs, "SYS_5917" }, /* 5917 */ ++ { 0, 0, printargs, "SYS_5918" }, /* 5918 */ ++ { 0, 0, printargs, "SYS_5919" }, /* 5919 */ ++ { 0, 0, printargs, "SYS_5920" }, /* 5920 */ ++ { 0, 0, printargs, "SYS_5921" }, /* 5921 */ ++ { 0, 0, printargs, "SYS_5922" }, /* 5922 */ ++ { 0, 0, printargs, "SYS_5923" }, /* 5923 */ ++ { 0, 0, printargs, "SYS_5924" }, /* 5924 */ ++ { 0, 0, printargs, "SYS_5925" }, /* 5925 */ ++ { 0, 0, printargs, "SYS_5926" }, /* 5926 */ ++ { 0, 0, printargs, "SYS_5927" }, /* 5927 */ ++ { 0, 0, printargs, "SYS_5928" }, /* 5928 */ ++ { 0, 0, printargs, "SYS_5929" }, /* 5929 */ ++ { 0, 0, printargs, "SYS_5930" }, /* 5930 */ ++ { 0, 0, printargs, "SYS_5931" }, /* 5931 */ ++ { 0, 0, printargs, "SYS_5932" }, /* 5932 */ ++ { 0, 0, printargs, "SYS_5933" }, /* 5933 */ ++ { 0, 0, printargs, "SYS_5934" }, /* 5934 */ ++ { 0, 0, printargs, "SYS_5935" }, /* 5935 */ ++ { 0, 0, printargs, "SYS_5936" }, /* 5936 */ ++ { 0, 0, printargs, "SYS_5937" }, /* 5937 */ ++ { 0, 0, printargs, "SYS_5938" }, /* 5938 */ ++ { 0, 0, printargs, "SYS_5939" }, /* 5939 */ ++ { 0, 0, printargs, "SYS_5940" }, /* 5940 */ ++ { 0, 0, printargs, "SYS_5941" }, /* 5941 */ ++ { 0, 0, printargs, "SYS_5942" }, /* 5942 */ ++ { 0, 0, printargs, "SYS_5943" }, /* 5943 */ ++ { 0, 0, printargs, "SYS_5944" }, /* 5944 */ ++ { 0, 0, printargs, "SYS_5945" }, /* 5945 */ ++ { 0, 0, printargs, "SYS_5946" }, /* 5946 */ ++ { 0, 0, printargs, "SYS_5947" }, /* 5947 */ ++ { 0, 0, printargs, "SYS_5948" }, /* 5948 */ ++ { 0, 0, printargs, "SYS_5949" }, /* 5949 */ ++ { 0, 0, printargs, "SYS_5950" }, /* 5950 */ ++ { 0, 0, printargs, "SYS_5951" }, /* 5951 */ ++ { 0, 0, printargs, "SYS_5952" }, /* 5952 */ ++ { 0, 0, printargs, "SYS_5953" }, /* 5953 */ ++ { 0, 0, printargs, "SYS_5954" }, /* 5954 */ ++ { 0, 0, printargs, "SYS_5955" }, /* 5955 */ ++ { 0, 0, printargs, "SYS_5956" }, /* 5956 */ ++ { 0, 0, printargs, "SYS_5957" }, /* 5957 */ ++ { 0, 0, printargs, "SYS_5958" }, /* 5958 */ ++ { 0, 0, printargs, "SYS_5959" }, /* 5959 */ ++ { 0, 0, printargs, "SYS_5960" }, /* 5960 */ ++ { 0, 0, printargs, "SYS_5961" }, /* 5961 */ ++ { 0, 0, printargs, "SYS_5962" }, /* 5962 */ ++ { 0, 0, printargs, "SYS_5963" }, /* 5963 */ ++ { 0, 0, printargs, "SYS_5964" }, /* 5964 */ ++ { 0, 0, printargs, "SYS_5965" }, /* 5965 */ ++ { 0, 0, printargs, "SYS_5966" }, /* 5966 */ ++ { 0, 0, printargs, "SYS_5967" }, /* 5967 */ ++ { 0, 0, printargs, "SYS_5968" }, /* 5968 */ ++ { 0, 0, printargs, "SYS_5969" }, /* 5969 */ ++ { 0, 0, printargs, "SYS_5970" }, /* 5970 */ ++ { 0, 0, printargs, "SYS_5971" }, /* 5971 */ ++ { 0, 0, printargs, "SYS_5972" }, /* 5972 */ ++ { 0, 0, printargs, "SYS_5973" }, /* 5973 */ ++ { 0, 0, printargs, "SYS_5974" }, /* 5974 */ ++ { 0, 0, printargs, "SYS_5975" }, /* 5975 */ ++ { 0, 0, printargs, "SYS_5976" }, /* 5976 */ ++ { 0, 0, printargs, "SYS_5977" }, /* 5977 */ ++ { 0, 0, printargs, "SYS_5978" }, /* 5978 */ ++ { 0, 0, printargs, "SYS_5979" }, /* 5979 */ ++ { 0, 0, printargs, "SYS_5980" }, /* 5980 */ ++ { 0, 0, printargs, "SYS_5981" }, /* 5981 */ ++ { 0, 0, printargs, "SYS_5982" }, /* 5982 */ ++ { 0, 0, printargs, "SYS_5983" }, /* 5983 */ ++ { 0, 0, printargs, "SYS_5984" }, /* 5984 */ ++ { 0, 0, printargs, "SYS_5985" }, /* 5985 */ ++ { 0, 0, printargs, "SYS_5986" }, /* 5986 */ ++ { 0, 0, printargs, "SYS_5987" }, /* 5987 */ ++ { 0, 0, printargs, "SYS_5988" }, /* 5988 */ ++ { 0, 0, printargs, "SYS_5989" }, /* 5989 */ ++ { 0, 0, printargs, "SYS_5990" }, /* 5990 */ ++ { 0, 0, printargs, "SYS_5991" }, /* 5991 */ ++ { 0, 0, printargs, "SYS_5992" }, /* 5992 */ ++ { 0, 0, printargs, "SYS_5993" }, /* 5993 */ ++ { 0, 0, printargs, "SYS_5994" }, /* 5994 */ ++ { 0, 0, printargs, "SYS_5995" }, /* 5995 */ ++ { 0, 0, printargs, "SYS_5996" }, /* 5996 */ ++ { 0, 0, printargs, "SYS_5997" }, /* 5997 */ ++ { 0, 0, printargs, "SYS_5998" }, /* 5998 */ ++ { 0, 0, printargs, "SYS_5999" }, /* 5999 */ /* end of Linux N64 */ ++ ++#if defined (LINUX_MIPSN32) ++ /* For an N32 strace decode the N32 64-bit syscalls. */ ++ { 3, TF, sys_read, "read" }, /* 6000 */ /* start of Linux N32 */ ++ { 3, TF, sys_write, "write" }, /* 6001 */ ++ { 3, TF, sys_open, "open" }, /* 6002 */ ++ { 1, 0, sys_close, "close" }, /* 6003 */ ++ { 2, TF, sys_stat64, "stat" }, /* 6004 */ ++ { 2, 0, sys_fstat64, "fstat" }, /* 6005 */ ++ { 2, TF, sys_lstat64, "lstat" }, /* 6006 */ ++ { 3, 0, sys_poll, "poll" }, /* 6007 */ ++ { 3, 0, sys_lseek, "lseek" }, /* 6008 */ ++ { 6, 0, sys_mmap, "mmap" }, /* 6009 */ ++ { 3, 0, sys_mprotect, "mprotect" }, /* 6010 */ ++ { 2, 0, sys_munmap, "munmap" }, /* 6011 */ ++ { 1, 0, sys_brk, "brk" }, /* 6012 */ ++ { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 6013 */ ++ { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 6014 */ ++ { 3, 0, sys_ioctl, "ioctl" }, /* 6015 */ ++ { 6, TF, sys_pread64, "pread" }, /* 6016 */ ++ { 6, TF, sys_pwrite64, "pwrite" }, /* 6017 */ ++ { 3, 0, sys_readv, "readv" }, /* 6018 */ ++ { 3, 0, sys_writev, "writev" }, /* 6019 */ ++ { 2, TF, sys_access, "access" }, /* 6020 */ ++ { 1, 0, sys_pipe, "pipe" }, /* 6021 */ ++ { 5, 0, sys_select, "_newselect" }, /* 6022 */ ++ { 0, 0, sys_sched_yield, "sched_yield" }, /* 6023 */ ++ { 4, 0, sys_mremap, "mremap" }, /* 6024 */ ++ { 3, 0, sys_msync, "msync" }, /* 6025 */ ++ { 3, 0, printargs, "mincore" }, /* 6026 */ ++ { 3, 0, sys_madvise, "madvise" }, /* 6027 */ ++ { 3, TI, sys_shmget, "shmget" }, /* 6028 */ ++ { 3, TI, sys_shmat, "shmgat" }, /* 6029 */ ++ { 3, TI, sys_shmctl, "shmctl" }, /* 6030 */ ++ { 1, 0, sys_dup, "dup" }, /* 6031 */ ++ { 2, 0, sys_dup2, "dup2" }, /* 6032 */ ++ { 0, TS, sys_pause, "pause" }, /* 6033 */ ++ { 2, 0, sys_nanosleep, "nanosleep" }, /* 6034 */ ++ { 2, 0, sys_getitimer, "getitimer" }, /* 6035 */ ++ { 3, 0, sys_setitimer, "setitimer" }, /* 6036 */ ++ { 1, 0, sys_alarm, "alarm" }, /* 6037 */ ++ { 0, 0, sys_getpid, "getpid" }, /* 6038 */ ++ { 4, TF, sys_sendfile, "sendfile" }, /* 6039 */ ++ { 2, 0, sys_socketcall, "socketcall" }, /* 6040 */ ++ { 3, TN, sys_connect, "connect" }, /* 6041 */ ++ { 3, TN, sys_accept, "accept" }, /* 6042 */ ++ { 6, TN, sys_sendto, "sendto" }, /* 6043 */ ++ { 6, TN, sys_recvfrom, "recvfrom" }, /* 6044 */ ++ { 3, TN, sys_sendmsg, "sendmsg" }, /* 6045 */ ++ { 3, TN, sys_recvmsg, "recvmsg" }, /* 6046 */ ++ { 2, TN, sys_shutdown, "shutdown" }, /* 6047 */ ++ { 3, TN, sys_bind, "bind" }, /* 6048 */ ++ { 2, TN, sys_listen, "listen" }, /* 6049 */ ++ { 3, TN, sys_getsockname, "getsockname" }, /* 6050 */ ++ { 3, TN, sys_getpeername, "getpeername" }, /* 6051 */ ++ { 4, TN, sys_socketpair, "socketpair" }, /* 6052 */ ++ { 5, TN, sys_setsockopt, "setsockopt" }, /* 6053 */ ++ { 5, TN, sys_getsockopt, "getsockopt" }, /* 6054 */ ++ { 2, TP, sys_clone, "clone" }, /* 6055 */ ++ { 0, TP, sys_fork, "fork" }, /* 6056 */ ++ { 3, TF|TP, sys_execve, "execve" }, /* 6057 */ ++ { 1, TP, sys_exit, "exit" }, /* 6058 */ ++ { 4, TP, sys_wait4, "wait4" }, /* 6059 */ ++ { 2, TS, sys_kill, "kill" }, /* 6060 */ ++ { 1, 0, sys_uname, "uname" }, /* 6061 */ ++ { 3, TI, sys_semget, "semget" }, /* 6062 */ ++ { 3, TI, printargs, "semop" }, /* 6063 */ ++ { 4, TI, sys_semctl, "semctl" }, /* 6064 */ ++ { 1, TI, sys_shmdt, "shmdt" }, /* 6065 */ ++ { 2, TI, sys_msgget, "msgget" }, /* 6066 */ ++ { 4, TI, sys_msgsnd, "msgsnd" }, /* 6067 */ ++ { 5, TI, sys_msgrcv, "msgrcv" }, /* 6068 */ ++ { 3, TI, sys_msgctl, "msgctl" }, /* 6069 */ ++ { 3, 0, sys_fcntl, "fcntl" }, /* 6070 */ ++ { 2, 0, sys_flock, "flock" }, /* 6071 */ ++ { 1, 0, sys_fsync, "fsync" }, /* 6072 */ ++ { 1, 0, sys_fdatasync, "fdatasync" }, /* 6073 */ ++ { 2, TF, sys_truncate, "truncate" }, /* 6074 */ ++ { 2, 0, sys_ftruncate, "ftruncate" }, /* 6075 */ ++ { 3, 0, sys_getdents, "getdents" }, /* 6076 */ ++ { 2, TF, sys_getcwd, "getcwd" }, /* 6077 */ ++ { 1, TF, sys_chdir, "chdir" }, /* 6078 */ ++ { 1, TF, sys_fchdir, "fchdir" }, /* 6079 */ ++ { 2, TF, sys_rename, "rename" }, /* 6080 */ ++ { 2, TF, sys_mkdir, "mkdir" }, /* 6081 */ ++ { 1, TF, sys_rmdir, "rmdir" }, /* 6082 */ ++ { 2, TF, sys_creat, "creat" }, /* 6083 */ ++ { 2, TF, sys_link, "link" }, /* 6084 */ ++ { 1, TF, sys_unlink, "unlink" }, /* 6085 */ ++ { 2, TF, sys_symlink, "symlink" }, /* 6086 */ ++ { 3, TF, sys_readlink, "readlink" }, /* 6087 */ ++ { 2, TF, sys_chmod, "chmod" }, /* 6088 */ ++ { 2, 0, sys_fchmod, "fchmod" }, /* 6089 */ ++ { 3, TF, sys_chown, "chown" }, /* 6090 */ ++ { 3, 0, sys_fchown, "fchown" }, /* 6091 */ ++ { 3, TF, sys_chown, "lchown" }, /* 6092 */ ++ { 1, 0, sys_umask, "umask" }, /* 6093 */ ++ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 6094 */ ++ { 2, 0, sys_getrlimit, "getrlimit" }, /* 6095 */ ++ { 2, 0, sys_getrusage, "getrusage" }, /* 6096 */ ++ { 1, 0, sys_sysinfo, "sysinfo" }, /* 6097 */ ++ { 1, 0, sys_times, "times" }, /* 6098 */ ++ { 4, 0, sys_ptrace, "ptrace" }, /* 6099 */ ++ { 0, 0, sys_getuid, "getuid" }, /* 6100 */ ++ { 3, 0, sys_syslog, "syslog" }, /* 6101 */ ++ { 0, 0, sys_getgid, "getgid" }, /* 6102 */ ++ { 1, 0, sys_setuid, "setuid" }, /* 6103 */ ++ { 1, 0, sys_setgid, "setgid" }, /* 6104 */ ++ { 0, 0, sys_geteuid, "geteuid" }, /* 6105 */ ++ { 0, 0, sys_getegid, "getegid" }, /* 6106 */ ++ { 2, 0, sys_setpgid, "setpgid" }, /* 6107 */ ++ { 0, 0, sys_getppid, "getppid" }, /* 6108 */ ++ { 0, 0, sys_getpgrp, "getpgrp" }, /* 6109 */ ++ { 0, 0, sys_setsid, "setsid" }, /* 6110 */ ++ { 2, 0, sys_setreuid, "setreuid" }, /* 6111 */ ++ { 2, 0, sys_setregid, "setregid" }, /* 6112 */ ++ { 2, 0, sys_getgroups, "getgroups" }, /* 6113 */ ++ { 2, 0, sys_setgroups, "setgroups" }, /* 6114 */ ++ { 3, 0, sys_setresuid, "setresuid" }, /* 6115 */ ++ { 3, 0, sys_getresuid, "getresuid" }, /* 6116 */ ++ { 3, 0, sys_setresgid, "setresgid" }, /* 6117 */ ++ { 3, 0, sys_getresgid, "getresgid" }, /* 6118 */ ++ { 0, 0, sys_getpgid, "getpgid" }, /* 6119 */ ++ { 1, 0, sys_setfsuid, "setfsuid" }, /* 6120 */ ++ { 1, 0, sys_setfsgid, "setfsgid" }, /* 6121 */ ++ { 1, 0, sys_getsid, "getsid" }, /* 6122 */ ++ { 2, 0, sys_capget, "capget" }, /* 6123 */ ++ { 2, 0, sys_capset, "capset" }, /* 6124 */ ++ { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 6125 */ ++ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"},/* 6126 */ ++ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"},/* 6127 */ ++ { 2, TS, sys_rt_sigsuspend, "rt_siguspend" }, /* 6128 */ ++ { 2, TS, sys_sigaltstack, "sigaltstatck" }, /* 6129 */ ++ { 2, TF, sys_utime, "utime" }, /* 6130 */ ++ { 3, TF, sys_mknod, "mknod" }, /* 6131 */ ++ { 1, 0, sys_personality, "personality" }, /* 6132 */ ++ { 2, 0, sys_ustat, "ustat" }, /* 6133 */ ++ { 3, 0, sys_statfs, "statfs" }, /* 6134 */ ++ { 3, 0, sys_fstatfs, "fstatfs" }, /* 6135 */ ++ { 5, 0, sys_sysfs, "sysfs" }, /* 6136 */ ++ { 2, 0, sys_getpriority, "getpriority" }, /* 6137 */ ++ { 3, 0, sys_setpriority, "setpriority" }, /* 6138 */ ++ { 2, 0, sys_sched_setparam, "sched_setparam"}, /* 6139 */ ++ { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 6140 */ ++ { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 6141 */ ++ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 6142 */ ++ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 6143 */ ++ { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 6144 */ ++ { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 6145 */ ++ { 2, 0, sys_mlock, "mlock" }, /* 6146 */ ++ { 2, 0, sys_munlock, "munlock" }, /* 6147 */ ++ { 1, 0, sys_mlockall, "mlockall" }, /* 6148 */ ++ { 0, 0, sys_munlockall, "munlockall" }, /* 6149 */ ++ { 0, 0, sys_vhangup, "vhangup" }, /* 6150 */ ++ { 2, 0, sys_pivotroot, "pivot_root" }, /* 6151 */ ++ { 1, 0, sys_sysctl, "_sysctl" }, /* 6152 */ ++ { 5, 0, printargs, "prctl" }, /* 6153 */ ++ { 1, 0, sys_adjtimex, "adjtimex" }, /* 6154 */ ++ { 2, 0, sys_setrlimit, "setrlimit" }, /* 6155 */ ++ { 1, TF, sys_chroot, "chroot" }, /* 6156 */ ++ { 0, 0, sys_sync, "sync" }, /* 6157 */ ++ { 1, TF, sys_acct, "acct" }, /* 6158 */ ++ { 2, 0, sys_settimeofday, "settimeofday" }, /* 6159 */ ++ { 5, TF, sys_mount, "mount" }, /* 6160 */ ++ { 2, TF, sys_umount2, "umount" }, /* 6161 */ ++ { 1, TF, sys_swapon, "swapon" }, /* 6162 */ ++ { 1, 0, sys_swapoff, "swapoff" }, /* 6163 */ ++ { 3, 0, sys_reboot, "reboot" }, /* 6164 */ ++ { 2, 0, sys_sethostname, "sethostname" }, /* 6165 */ ++ { 2, 0, sys_setdomainname, "setdomainname" }, /* 6166 */ ++ { 2, 0, sys_create_module, "create_module" }, /* 6167 */ ++ { 4, 0, sys_init_module, "init_module" }, /* 6168 */ ++ { 1, 0, sys_delete_module, "delete_module" }, /* 6169 */ ++ { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 6170 */ ++ { 5, 0, sys_query_module, "query_module" }, /* 6171 */ ++ { 4, 0, sys_quotactl, "quotactl" }, /* 6172 */ ++ { 3, 0, printargs, "nfsservctl" }, /* 6173 */ ++ { 5, TN, printargs, "getpmsg" }, /* 6174 */ ++ { 5, TN, printargs, "putpmsg" }, /* 6175 */ ++ { 0, 0, sys_afs_syscall, "afs_syscall" }, /* 6176 */ ++ { 0, 0, printargs, "reserved177" }, /* 6177 */ ++ { 0, 0, printargs, "gettid" }, /* 6178 */ ++ { 3, 0, sys_readahead, "readahead" }, /* 6179 */ ++ { 5, 0, sys_setxattr, "setxattr" }, /* 6180 */ ++ { 5, 0, sys_setxattr, "lsetxattr" }, /* 6181 */ ++ { 5, 0, sys_fsetxattr, "fsetxattr" }, /* 6182 */ ++ { 4, 0, sys_getxattr, "getxattr" }, /* 6183 */ ++ { 4, 0, sys_getxattr, "lgetxattr" }, /* 6184 */ ++ { 4, 0, sys_fgetxattr, "fgetxattr" }, /* 6185 */ ++ { 3, 0, sys_listxattr, "listxattr" }, /* 6186 */ ++ { 3, 0, sys_listxattr, "llistxattr" }, /* 6187 */ ++ { 3, 0, sys_flistxattr, "flistxattr" }, /* 6188 */ ++ { 2, 0, sys_removexattr, "removexattr" }, /* 6189 */ ++ { 2, 0, sys_removexattr, "lremovexattr" }, /* 6190 */ ++ { 2, 0, sys_fremovexattr, "fremovexattr" }, /* 6191 */ ++ { 2, 0, sys_kill, "tkill" }, /* 6192 */ ++ { 1, 0, sys_time, "time" }, /* 6193 */ ++ { 5, 0, printargs, "futex" }, /* 6194 */ ++ { 3, 0, printargs, "sched_setaffinity"}, /* 6195 */ ++ { 3, 0, printargs, "sched_getaffinity"}, /* 6196 */ ++ { 3, 0, printargs, "cacheflush" }, /* 6197 */ ++ { 3, 0, printargs, "cachectl" }, /* 6198 */ ++ { 4, 0, sys_sysmips, "sysmips" }, /* 6199 */ ++ { 0, 0, printargs, "io_setup" }, /* 6200 */ ++ { 0, 0, printargs, "io_destroy" }, /* 6201 */ ++ { 0, 0, printargs, "io_getevents" }, /* 6202 */ ++ { 0, 0, printargs, "io_submit" }, /* 6203 */ ++ { 0, 0, printargs, "io_cancel" }, /* 6204 */ ++ { 1, TP, sys_exit, "exit_group"}, /* 6205 */ ++ { 3, 0, printargs, "lookup_dcookie" }, /* 6206 */ ++ { 1, 0, sys_epoll_create, "epoll_create" }, /* 6207 */ ++ { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 6208 */ ++ { 3, TD, sys_epoll_wait, "epoll_wait" }, /* 6209 */ ++ { 5, 0, sys_remap_file_pages, "remap_file_pages" }, /* 6210 */ ++ { 1, TS, printargs, "rt_sigreturn" }, /* 6211 */ ++ { 3, 0, sys_fcntl, "fcntl64" }, /* 6212 */ ++ { 0, 0, printargs, "set_tid_address" }, /* 6213 */ ++ { 0, 0, printargs, "restart_syscall" }, /* 6214 */ ++ { 0, 0, printargs, "semtimedop" }, /* 6215 */ ++ { 0, 0, printargs, "fadvise64" }, /* 6216 */ ++ { 0, 0, printargs, "statfs64" }, /* 6217 */ ++ { 0, 0, printargs, "fstatfs64" }, /* 6218 */ ++ { 4, 0, printargs, "sendfile64" }, /* 6219 */ ++ { 3, 0, printargs, "timer_create" }, /* 6220 */ ++ { 4, 0, printargs, "timer_settime" }, /* 6221 */ ++ { 2, 0, printargs, "timer_gettime" }, /* 6222 */ ++ { 1, 0, printargs, "timer_getoverrun" }, /* 6223 */ ++ { 1, 0, printargs, "timer_delete" }, /* 6224 */ ++ { 2, 0, printargs, "clock_settime" }, /* 6225 */ ++ { 2, 0, printargs, "clock_gettime" }, /* 6226 */ ++ { 2, 0, printargs, "clock_getres" }, /* 6227 */ ++ { 4, 0, printargs, "clock_nanosleep" }, /* 6228 */ ++ { 3, 0, printargs, "tgkill" }, /* 6229 */ ++ { 2, 0, printargs, "utimes" }, /* 6230 */ ++#else ++ { 0, 0, printargs, "n32_read" }, /* 6000 */ ++ { 0, 0, printargs, "n32_write" }, /* 6001 */ ++ { 0, 0, printargs, "n32_open" }, /* 6002 */ ++ { 0, 0, printargs, "n32_close" }, /* 6003 */ ++ { 0, 0, printargs, "n32_stat" }, /* 6004 */ ++ { 0, 0, printargs, "n32_fstat" }, /* 6005 */ ++ { 0, 0, printargs, "n32_lstat" }, /* 6006 */ ++ { 0, 0, printargs, "n32_poll" }, /* 6007 */ ++ { 0, 0, printargs, "n32_lseek" }, /* 6008 */ ++ { 0, 0, printargs, "n32_mmap" }, /* 6009 */ ++ { 0, 0, printargs, "n32_mprotect" }, /* 6010 */ ++ { 0, 0, printargs, "n32_munmap" }, /* 6011 */ ++ { 0, 0, printargs, "n32_brk" }, /* 6012 */ ++ { 0, 0, printargs, "n32_rt_sigaction" }, /* 6013 */ ++ { 0, 0, printargs, "n32_rt_sigprocmask" }, /* 6014 */ ++ { 0, 0, printargs, "n32_ioctl" }, /* 6015 */ ++ { 0, 0, printargs, "n32_pread" }, /* 6016 */ ++ { 0, 0, printargs, "n32_pwrite" }, /* 6017 */ ++ { 0, 0, printargs, "n32_readv" }, /* 6018 */ ++ { 0, 0, printargs, "n32_writev" }, /* 6019 */ ++ { 0, 0, printargs, "n32_access" }, /* 6020 */ ++ { 0, 0, printargs, "n32_pipe" }, /* 6021 */ ++ { 0, 0, printargs, "n32__newselect" }, /* 6022 */ ++ { 0, 0, printargs, "n32_sched_yield" }, /* 6023 */ ++ { 0, 0, printargs, "n32_mremap" }, /* 6024 */ ++ { 0, 0, printargs, "n32_msync" }, /* 6025 */ ++ { 0, 0, printargs, "n32_mincore" }, /* 6026 */ ++ { 0, 0, printargs, "n32_madvise" }, /* 6027 */ ++ { 0, 0, printargs, "n32_shmget" }, /* 6028 */ ++ { 0, 0, printargs, "n32_shmgat" }, /* 6029 */ ++ { 0, 0, printargs, "n32_shmctl" }, /* 6030 */ ++ { 0, 0, printargs, "n32_dup" }, /* 6031 */ ++ { 0, 0, printargs, "n32_dup2" }, /* 6032 */ ++ { 0, 0, printargs, "n32_pause" }, /* 6033 */ ++ { 0, 0, printargs, "n32_nanosleep" }, /* 6034 */ ++ { 0, 0, printargs, "n32_getitimer" }, /* 6035 */ ++ { 0, 0, printargs, "n32_setitimer" }, /* 6036 */ ++ { 0, 0, printargs, "n32_alarm" }, /* 6037 */ ++ { 0, 0, printargs, "n32_getpid" }, /* 6038 */ ++ { 0, 0, printargs, "n32_sendfile" }, /* 6039 */ ++ { 0, 0, printargs, "n32_socketcall" }, /* 6040 */ ++ { 0, 0, printargs, "n32_connect" }, /* 6041 */ ++ { 0, 0, printargs, "n32_accept" }, /* 6042 */ ++ { 0, 0, printargs, "n32_sendto" }, /* 6043 */ ++ { 0, 0, printargs, "n32_recvfrom" }, /* 6044 */ ++ { 0, 0, printargs, "n32_sendmsg" }, /* 6045 */ ++ { 0, 0, printargs, "n32_recvmsg" }, /* 6046 */ ++ { 0, 0, printargs, "n32_shutdown" }, /* 6047 */ ++ { 0, 0, printargs, "n32_bind" }, /* 6048 */ ++ { 0, 0, printargs, "n32_listen" }, /* 6049 */ ++ { 0, 0, printargs, "n32_getsockname" }, /* 6050 */ ++ { 0, 0, printargs, "n32_getpeername" }, /* 6051 */ ++ { 0, 0, printargs, "n32_socketpair" }, /* 6052 */ ++ { 0, 0, printargs, "n32_setsockopt" }, /* 6053 */ ++ { 0, 0, printargs, "n32_getsockopt" }, /* 6054 */ ++ { 0, 0, printargs, "n32_clone" }, /* 6055 */ ++ { 0, 0, printargs, "n32_fork" }, /* 6056 */ ++ { 0, 0, printargs, "n32_execve" }, /* 6057 */ ++ { 0, 0, printargs, "n32_exit" }, /* 6058 */ ++ { 0, 0, printargs, "n32_wait4" }, /* 6059 */ ++ { 0, 0, printargs, "n32_kill" }, /* 6060 */ ++ { 0, 0, printargs, "n32_uname" }, /* 6061 */ ++ { 0, 0, printargs, "n32_semget" }, /* 6062 */ ++ { 0, 0, printargs, "n32_semop" }, /* 6063 */ ++ { 0, 0, printargs, "n32_semctl" }, /* 6064 */ ++ { 0, 0, printargs, "n32_shmdt" }, /* 6065 */ ++ { 0, 0, printargs, "n32_msgget" }, /* 6066 */ ++ { 0, 0, printargs, "n32_msgsnd" }, /* 6067 */ ++ { 0, 0, printargs, "n32_msgrcv" }, /* 6068 */ ++ { 0, 0, printargs, "n32_msgctl" }, /* 6069 */ ++ { 0, 0, printargs, "n32_fcntl" }, /* 6070 */ ++ { 0, 0, printargs, "n32_flock" }, /* 6071 */ ++ { 0, 0, printargs, "n32_fsync" }, /* 6072 */ ++ { 0, 0, printargs, "n32_fdatasync" }, /* 6073 */ ++ { 0, 0, printargs, "n32_truncate" }, /* 6074 */ ++ { 0, 0, printargs, "n32_ftruncate" }, /* 6075 */ ++ { 0, 0, printargs, "n32_getdents" }, /* 6076 */ ++ { 0, 0, printargs, "n32_getcwd" }, /* 6077 */ ++ { 0, 0, printargs, "n32_chdir" }, /* 6078 */ ++ { 0, 0, printargs, "n32_fchdir" }, /* 6079 */ ++ { 0, 0, printargs, "n32_rename" }, /* 6080 */ ++ { 0, 0, printargs, "n32_mkdir" }, /* 6081 */ ++ { 0, 0, printargs, "n32_rmdir" }, /* 6082 */ ++ { 0, 0, printargs, "n32_creat" }, /* 6083 */ ++ { 0, 0, printargs, "n32_link" }, /* 6084 */ ++ { 0, 0, printargs, "n32_unlink" }, /* 6085 */ ++ { 0, 0, printargs, "n32_symlink" }, /* 6086 */ ++ { 0, 0, printargs, "n32_readlink" }, /* 6087 */ ++ { 0, 0, printargs, "n32_chmod" }, /* 6088 */ ++ { 0, 0, printargs, "n32_fchmod" }, /* 6089 */ ++ { 0, 0, printargs, "n32_chown" }, /* 6090 */ ++ { 0, 0, printargs, "n32_fchown" }, /* 6091 */ ++ { 0, 0, printargs, "n32_lchown" }, /* 6092 */ ++ { 0, 0, printargs, "n32_umask" }, /* 6093 */ ++ { 0, 0, printargs, "n32_gettimeofday" }, /* 6094 */ ++ { 0, 0, printargs, "n32_getrlimit" }, /* 6095 */ ++ { 0, 0, printargs, "n32_getrusage" }, /* 6096 */ ++ { 0, 0, printargs, "n32_sysinfo" }, /* 6097 */ ++ { 0, 0, printargs, "n32_times" }, /* 6098 */ ++ { 0, 0, printargs, "n32_ptrace" }, /* 6099 */ ++ { 0, 0, printargs, "n32_getuid" }, /* 6100 */ ++ { 0, 0, printargs, "n32_syslog" }, /* 6101 */ ++ { 0, 0, printargs, "n32_getgid" }, /* 6102 */ ++ { 0, 0, printargs, "n32_setuid" }, /* 6103 */ ++ { 0, 0, printargs, "n32_setgid" }, /* 6104 */ ++ { 0, 0, printargs, "n32_geteuid" }, /* 6105 */ ++ { 0, 0, printargs, "n32_getegid" }, /* 6106 */ ++ { 0, 0, printargs, "n32_setpgid" }, /* 6107 */ ++ { 0, 0, printargs, "n32_getppid" }, /* 6108 */ ++ { 0, 0, printargs, "n32_getpgrp" }, /* 6109 */ ++ { 0, 0, printargs, "n32_setsid" }, /* 6110 */ ++ { 0, 0, printargs, "n32_setreuid" }, /* 6111 */ ++ { 0, 0, printargs, "n32_setregid" }, /* 6112 */ ++ { 0, 0, printargs, "n32_getgroups" }, /* 6113 */ ++ { 0, 0, printargs, "n32_setgroups" }, /* 6114 */ ++ { 0, 0, printargs, "n32_setresuid" }, /* 6115 */ ++ { 0, 0, printargs, "n32_getresuid" }, /* 6116 */ ++ { 0, 0, printargs, "n32_setresgid" }, /* 6117 */ ++ { 0, 0, printargs, "n32_getresgid" }, /* 6118 */ ++ { 0, 0, printargs, "n32_getpgid" }, /* 6119 */ ++ { 0, 0, printargs, "n32_setfsuid" }, /* 6120 */ ++ { 0, 0, printargs, "n32_setfsgid" }, /* 6121 */ ++ { 0, 0, printargs, "n32_getsid" }, /* 6122 */ ++ { 0, 0, printargs, "n32_capget" }, /* 6123 */ ++ { 0, 0, printargs, "n32_capset" }, /* 6124 */ ++ { 0, 0, printargs, "n32_rt_sigpending" }, /* 6125 */ ++ { 0, 0, printargs, "n32_rt_sigtimedwait" }, /* 6126 */ ++ { 0, 0, printargs, "n32_rt_sigqueueinfo" }, /* 6127 */ ++ { 0, 0, printargs, "n32_rt_siguspend" }, /* 6128 */ ++ { 0, 0, printargs, "n32_sigaltstatck" }, /* 6129 */ ++ { 0, 0, printargs, "n32_utime" }, /* 6130 */ ++ { 0, 0, printargs, "n32_mknod" }, /* 6131 */ ++ { 0, 0, printargs, "n32_personality" }, /* 6132 */ ++ { 0, 0, printargs, "n32_ustat" }, /* 6133 */ ++ { 0, 0, printargs, "n32_statfs" }, /* 6134 */ ++ { 0, 0, printargs, "n32_fstatfs" }, /* 6135 */ ++ { 0, 0, printargs, "n32_sysfs" }, /* 6136 */ ++ { 0, 0, printargs, "n32_getpriority" }, /* 6137 */ ++ { 0, 0, printargs, "n32_setpriority" }, /* 6138 */ ++ { 0, 0, printargs, "n32_sched_setparam" }, /* 6139 */ ++ { 0, 0, printargs, "n32_sched_getparam" }, /* 6140 */ ++ { 0, 0, printargs, "n32_sched_setscheduler"}, /* 6141 */ ++ { 0, 0, printargs, "n32_sched_getscheduler"}, /* 6142 */ ++ { 0, 0, printargs, "n32_sched_get_priority_max"}, /* 6143 */ ++ { 0, 0, printargs, "n32_sched_get_priority_min"}, /* 6144 */ ++ { 0, 0, printargs, "n32_sched_rr_get_interval"}, /* 6145 */ ++ { 0, 0, printargs, "n32_mlock" }, /* 6146 */ ++ { 0, 0, printargs, "n32_munlock" }, /* 6147 */ ++ { 0, 0, printargs, "n32_mlockall" }, /* 6148 */ ++ { 0, 0, printargs, "n32_munlockall" }, /* 6149 */ ++ { 0, 0, printargs, "n32_vhangup" }, /* 6150 */ ++ { 0, 0, printargs, "n32_pivot_root" }, /* 6151 */ ++ { 0, 0, printargs, "n32__sysctl" }, /* 6152 */ ++ { 0, 0, printargs, "n32_prctl" }, /* 6153 */ ++ { 0, 0, printargs, "n32_adjtimex" }, /* 6154 */ ++ { 0, 0, printargs, "n32_setrlimit" }, /* 6155 */ ++ { 0, 0, printargs, "n32_chroot" }, /* 6156 */ ++ { 0, 0, printargs, "n32_sync" }, /* 6157 */ ++ { 0, 0, printargs, "n32_acct" }, /* 6158 */ ++ { 0, 0, printargs, "n32_settimeofday" }, /* 6159 */ ++ { 0, 0, printargs, "n32_mount" }, /* 6160 */ ++ { 0, 0, printargs, "n32_umount" }, /* 6161 */ ++ { 0, 0, printargs, "n32_swapon" }, /* 6162 */ ++ { 0, 0, printargs, "n32_swapoff" }, /* 6163 */ ++ { 0, 0, printargs, "n32_reboot" }, /* 6164 */ ++ { 0, 0, printargs, "n32_sethostname" }, /* 6165 */ ++ { 0, 0, printargs, "n32_setdomainname" }, /* 6166 */ ++ { 0, 0, printargs, "n32_create_module" }, /* 6167 */ ++ { 0, 0, printargs, "n32_init_module" }, /* 6168 */ ++ { 0, 0, printargs, "n32_delete_module" }, /* 6169 */ ++ { 0, 0, printargs, "n32_get_kernel_syms" }, /* 6170 */ ++ { 0, 0, printargs, "n32_query_module" }, /* 6171 */ ++ { 0, 0, printargs, "n32_quotactl" }, /* 6172 */ ++ { 0, 0, printargs, "n32_nfsservctl" }, /* 6173 */ ++ { 0, 0, printargs, "n32_getpmsg" }, /* 6174 */ ++ { 0, 0, printargs, "n32_putpmsg" }, /* 6175 */ ++ { 0, 0, printargs, "n32_afs_syscall" }, /* 6176 */ ++ { 0, 0, printargs, "n32_reserved177" }, /* 6177 */ ++ { 0, 0, printargs, "n32_gettid" }, /* 6178 */ ++ { 0, 0, printargs, "n32_readahead" }, /* 6179 */ ++ { 0, 0, printargs, "n32_setxattr" }, /* 6180 */ ++ { 0, 0, printargs, "n32_lsetxattr" }, /* 6181 */ ++ { 0, 0, printargs, "n32_fsetxattr" }, /* 6182 */ ++ { 0, 0, printargs, "n32_getxattr" }, /* 6183 */ ++ { 0, 0, printargs, "n32_lgetxattr" }, /* 6184 */ ++ { 0, 0, printargs, "n32_fgetxattr" }, /* 6185 */ ++ { 0, 0, printargs, "n32_listxattr" }, /* 6186 */ ++ { 0, 0, printargs, "n32_llistxattr" }, /* 6187 */ ++ { 0, 0, printargs, "n32_flistxattr" }, /* 6188 */ ++ { 0, 0, printargs, "n32_removexattr" }, /* 6189 */ ++ { 0, 0, printargs, "n32_lremovexattr" }, /* 6190 */ ++ { 0, 0, printargs, "n32_fremovexattr" }, /* 6191 */ ++ { 0, 0, printargs, "n32_tkill" }, /* 6192 */ ++ { 0, 0, printargs, "n32_time" }, /* 6193 */ ++ { 0, 0, printargs, "n32_futex" }, /* 6194 */ ++ { 0, 0, printargs, "n32_sched_setaffinity" }, /* 6195 */ ++ { 0, 0, printargs, "n32_sched_getaffinity" }, /* 6196 */ ++ { 0, 0, printargs, "n32_cacheflush" }, /* 6197 */ ++ { 0, 0, printargs, "n32_cachectl" }, /* 6198 */ ++ { 0, 0, printargs, "n32_sysmips" }, /* 6199 */ ++ { 0, 0, printargs, "n32_io_setup" }, /* 6200 */ ++ { 0, 0, printargs, "n32_io_destroy" }, /* 6201 */ ++ { 0, 0, printargs, "n32_io_getevents" }, /* 6202 */ ++ { 0, 0, printargs, "n32_io_submit" }, /* 6203 */ ++ { 0, 0, printargs, "n32_io_cancel" }, /* 6204 */ ++ { 1, TP, printargs, "n32_exit_group" }, /* 6205 */ ++ { 0, 0, printargs, "n32_lookup_dcookie" }, /* 6206 */ ++ { 0, 0, printargs, "n32_epoll_create" }, /* 6207 */ ++ { 0, 0, printargs, "n32_epoll_ctl" }, /* 6208 */ ++ { 0, 0, printargs, "n32_epoll_wait" }, /* 6209 */ ++ { 0, 0, printargs, "n32_remap_file_pages" }, /* 6210 */ ++ { 0, 0, printargs, "n32_rt_sigreturn" }, /* 6211 */ ++ { 0, 0, printargs, "n32_fcntl64" }, /* 6212 */ ++ { 0, 0, printargs, "n32_set_tid_address" }, /* 6213 */ ++ { 0, 0, printargs, "n32_restart_syscall" }, /* 6214 */ ++ { 0, 0, printargs, "n32_semtimedop" }, /* 6215 */ ++ { 0, 0, printargs, "n32_fadvise64" }, /* 6216 */ ++ { 0, 0, printargs, "n32_statfs64" }, /* 6217 */ ++ { 0, 0, printargs, "n32_fstatfs64" }, /* 6218 */ ++ { 0, 0, printargs, "n32_sendfile64" }, /* 6219 */ ++ { 3, 0, printargs, "n32_timer_create" }, /* 6220 */ ++ { 4, 0, printargs, "n32_timer_settime" }, /* 6221 */ ++ { 2, 0, printargs, "n32_timer_gettime" }, /* 6222 */ ++ { 1, 0, printargs, "n32_timer_getoverrun" }, /* 6223 */ ++ { 1, 0, printargs, "n32_timer_delete" }, /* 6224 */ ++ { 2, 0, printargs, "n32_clock_settime" }, /* 6225 */ ++ { 2, 0, printargs, "n32_clock_gettime" }, /* 6226 */ ++ { 2, 0, printargs, "n32_clock_getres" }, /* 6227 */ ++ { 4, 0, printargs, "n32_clock_nanosleep" }, /* 6228 */ ++ { 3, 0, printargs, "n32_tgkill" }, /* 6229 */ ++ { 2, 0, printargs, "n32_utimes" }, /* 6230 */ ++#endif ++ { 0, 0, printargs, "SYS_6231" }, /* 6231 */ ++ { 0, 0, printargs, "SYS_6232" }, /* 6232 */ ++ { 0, 0, printargs, "SYS_6233" }, /* 6233 */ ++ { 0, 0, printargs, "SYS_6234" }, /* 6234 */ ++ { 0, 0, printargs, "SYS_6235" }, /* 6235 */ ++ { 0, 0, printargs, "SYS_6236" }, /* 6236 */ ++ { 0, 0, printargs, "SYS_6237" }, /* 6237 */ ++ { 0, 0, printargs, "SYS_6238" }, /* 6238 */ ++ { 0, 0, printargs, "SYS_6239" }, /* 6239 */ ++ { 0, 0, printargs, "SYS_6240" }, /* 6240 */ ++ { 0, 0, printargs, "SYS_6241" }, /* 6241 */ ++ { 0, 0, printargs, "SYS_6242" }, /* 6242 */ ++ { 0, 0, printargs, "SYS_6243" }, /* 6243 */ ++ { 0, 0, printargs, "SYS_6244" }, /* 6244 */ ++ { 0, 0, printargs, "SYS_6245" }, /* 6245 */ ++ { 0, 0, printargs, "SYS_6246" }, /* 6246 */ ++ { 0, 0, printargs, "SYS_6247" }, /* 6247 */ ++ { 0, 0, printargs, "SYS_6248" }, /* 6248 */ ++ { 0, 0, printargs, "SYS_6249" }, /* 6249 */ ++ { 0, 0, printargs, "SYS_6250" }, /* 6250 */ ++ { 0, 0, printargs, "SYS_6251" }, /* 6251 */ ++ { 0, 0, printargs, "SYS_6252" }, /* 6252 */ ++ { 0, 0, printargs, "SYS_6253" }, /* 6253 */ ++ { 0, 0, printargs, "SYS_6254" }, /* 6254 */ ++ { 0, 0, printargs, "SYS_6255" }, /* 6255 */ ++ { 0, 0, printargs, "SYS_6256" }, /* 6256 */ ++ { 0, 0, printargs, "SYS_6257" }, /* 6257 */ ++ { 0, 0, printargs, "SYS_6258" }, /* 6258 */ ++ { 0, 0, printargs, "SYS_6259" }, /* 6259 */ ++ { 0, 0, printargs, "SYS_6260" }, /* 6260 */ ++ { 0, 0, printargs, "SYS_6261" }, /* 6261 */ ++ { 0, 0, printargs, "SYS_6262" }, /* 6262 */ ++ { 0, 0, printargs, "SYS_6263" }, /* 6263 */ ++ { 0, 0, printargs, "SYS_6264" }, /* 6264 */ ++ { 0, 0, printargs, "SYS_6265" }, /* 6265 */ ++ { 0, 0, printargs, "SYS_6266" }, /* 6266 */ ++ { 0, 0, printargs, "SYS_6267" }, /* 6267 */ ++ { 0, 0, printargs, "SYS_6268" }, /* 6268 */ ++ { 0, 0, printargs, "SYS_6269" }, /* 6269 */ ++ { 0, 0, printargs, "SYS_6270" }, /* 6270 */ ++ { 0, 0, printargs, "SYS_6271" }, /* 6271 */ ++ { 0, 0, printargs, "SYS_6272" }, /* 6272 */ ++ { 0, 0, printargs, "SYS_6273" }, /* 6273 */ ++ { 0, 0, printargs, "SYS_6274" }, /* 6274 */ ++ { 0, 0, printargs, "SYS_6275" }, /* 6275 */ ++ { 0, 0, printargs, "SYS_6276" }, /* 6276 */ ++ { 0, 0, printargs, "SYS_6277" }, /* 6277 */ ++ { 0, 0, printargs, "SYS_6278" }, /* 6278 */ ++ { 0, 0, printargs, "SYS_6279" }, /* 6279 */ ++ { 0, 0, printargs, "SYS_6280" }, /* 6280 */ ++ { 0, 0, printargs, "SYS_6281" }, /* 6281 */ ++ { 0, 0, printargs, "SYS_6282" }, /* 6282 */ ++ { 0, 0, printargs, "SYS_6283" }, /* 6283 */ ++ { 0, 0, printargs, "SYS_6284" }, /* 6284 */ ++ { 0, 0, printargs, "SYS_6285" }, /* 6285 */ ++ { 0, 0, printargs, "SYS_6286" }, /* 6286 */ ++ { 0, 0, printargs, "SYS_6287" }, /* 6287 */ ++ { 0, 0, printargs, "SYS_6288" }, /* 6288 */ ++ { 0, 0, printargs, "SYS_6289" }, /* 6289 */ ++ { 0, 0, printargs, "SYS_6290" }, /* 6290 */ ++ { 0, 0, printargs, "SYS_6291" }, /* 6291 */ ++ { 0, 0, printargs, "SYS_6292" }, /* 6292 */ ++ { 0, 0, printargs, "SYS_6293" }, /* 6293 */ ++ { 0, 0, printargs, "SYS_6294" }, /* 6294 */ ++ { 0, 0, printargs, "SYS_6295" }, /* 6295 */ ++ { 0, 0, printargs, "SYS_6296" }, /* 6296 */ ++ { 0, 0, printargs, "SYS_6297" }, /* 6297 */ ++ { 0, 0, printargs, "SYS_6298" }, /* 6298 */ ++ { 0, 0, printargs, "SYS_6299" }, /* 6299 */ ++ { 0, 0, printargs, "SYS_6300" }, /* 6300 */ ++ { 0, 0, printargs, "SYS_6301" }, /* 6301 */ ++ { 0, 0, printargs, "SYS_6302" }, /* 6302 */ ++ { 0, 0, printargs, "SYS_6303" }, /* 6303 */ ++ { 0, 0, printargs, "SYS_6304" }, /* 6304 */ ++ { 0, 0, printargs, "SYS_6305" }, /* 6305 */ ++ { 0, 0, printargs, "SYS_6306" }, /* 6306 */ ++ { 0, 0, printargs, "SYS_6307" }, /* 6307 */ ++ { 0, 0, printargs, "SYS_6308" }, /* 6308 */ ++ { 0, 0, printargs, "SYS_6309" }, /* 6309 */ ++ { 0, 0, printargs, "SYS_6310" }, /* 6310 */ ++ { 0, 0, printargs, "SYS_6311" }, /* 6311 */ ++ { 0, 0, printargs, "SYS_6312" }, /* 6312 */ ++ { 0, 0, printargs, "SYS_6313" }, /* 6313 */ ++ { 0, 0, printargs, "SYS_6314" }, /* 6314 */ ++ { 0, 0, printargs, "SYS_6315" }, /* 6315 */ ++ { 0, 0, printargs, "SYS_6316" }, /* 6316 */ ++ { 0, 0, printargs, "SYS_6317" }, /* 6317 */ ++ { 0, 0, printargs, "SYS_6318" }, /* 6318 */ ++ { 0, 0, printargs, "SYS_6319" }, /* 6319 */ ++ { 0, 0, printargs, "SYS_6320" }, /* 6320 */ ++ { 0, 0, printargs, "SYS_6321" }, /* 6321 */ ++ { 0, 0, printargs, "SYS_6322" }, /* 6322 */ ++ { 0, 0, printargs, "SYS_6323" }, /* 6323 */ ++ { 0, 0, printargs, "SYS_6324" }, /* 6324 */ ++ { 0, 0, printargs, "SYS_6325" }, /* 6325 */ ++ { 0, 0, printargs, "SYS_6326" }, /* 6326 */ ++ { 0, 0, printargs, "SYS_6327" }, /* 6327 */ ++ { 0, 0, printargs, "SYS_6328" }, /* 6328 */ ++ { 0, 0, printargs, "SYS_6329" }, /* 6329 */ ++ { 0, 0, printargs, "SYS_6330" }, /* 6330 */ ++ { 0, 0, printargs, "SYS_6331" }, /* 6331 */ ++ { 0, 0, printargs, "SYS_6332" }, /* 6332 */ ++ { 0, 0, printargs, "SYS_6333" }, /* 6333 */ ++ { 0, 0, printargs, "SYS_6334" }, /* 6334 */ ++ { 0, 0, printargs, "SYS_6335" }, /* 6335 */ ++ { 0, 0, printargs, "SYS_6336" }, /* 6336 */ ++ { 0, 0, printargs, "SYS_6337" }, /* 6337 */ ++ { 0, 0, printargs, "SYS_6338" }, /* 6338 */ ++ { 0, 0, printargs, "SYS_6339" }, /* 6339 */ ++ { 0, 0, printargs, "SYS_6340" }, /* 6340 */ ++ { 0, 0, printargs, "SYS_6341" }, /* 6341 */ ++ { 0, 0, printargs, "SYS_6342" }, /* 6342 */ ++ { 0, 0, printargs, "SYS_6343" }, /* 6343 */ ++ { 0, 0, printargs, "SYS_6344" }, /* 6344 */ ++ { 0, 0, printargs, "SYS_6345" }, /* 6345 */ ++ { 0, 0, printargs, "SYS_6346" }, /* 6346 */ ++ { 0, 0, printargs, "SYS_6347" }, /* 6347 */ ++ { 0, 0, printargs, "SYS_6348" }, /* 6348 */ ++ { 0, 0, printargs, "SYS_6349" }, /* 6349 */ ++ { 0, 0, printargs, "SYS_6350" }, /* 6350 */ ++ { 0, 0, printargs, "SYS_6351" }, /* 6351 */ ++ { 0, 0, printargs, "SYS_6352" }, /* 6352 */ ++ { 0, 0, printargs, "SYS_6353" }, /* 6353 */ ++ { 0, 0, printargs, "SYS_6354" }, /* 6354 */ ++ { 0, 0, printargs, "SYS_6355" }, /* 6355 */ ++ { 0, 0, printargs, "SYS_6356" }, /* 6356 */ ++ { 0, 0, printargs, "SYS_6357" }, /* 6357 */ ++ { 0, 0, printargs, "SYS_6358" }, /* 6358 */ ++ { 0, 0, printargs, "SYS_6359" }, /* 6359 */ ++ { 0, 0, printargs, "SYS_6360" }, /* 6360 */ ++ { 0, 0, printargs, "SYS_6361" }, /* 6361 */ ++ { 0, 0, printargs, "SYS_6362" }, /* 6362 */ ++ { 0, 0, printargs, "SYS_6363" }, /* 6363 */ ++ { 0, 0, printargs, "SYS_6364" }, /* 6364 */ ++ { 0, 0, printargs, "SYS_6365" }, /* 6365 */ ++ { 0, 0, printargs, "SYS_6366" }, /* 6366 */ ++ { 0, 0, printargs, "SYS_6367" }, /* 6367 */ ++ { 0, 0, printargs, "SYS_6368" }, /* 6368 */ ++ { 0, 0, printargs, "SYS_6369" }, /* 6369 */ ++ { 0, 0, printargs, "SYS_6370" }, /* 6370 */ ++ { 0, 0, printargs, "SYS_6371" }, /* 6371 */ ++ { 0, 0, printargs, "SYS_6372" }, /* 6372 */ ++ { 0, 0, printargs, "SYS_6373" }, /* 6373 */ ++ { 0, 0, printargs, "SYS_6374" }, /* 6374 */ ++ { 0, 0, printargs, "SYS_6375" }, /* 6375 */ ++ { 0, 0, printargs, "SYS_6376" }, /* 6376 */ ++ { 0, 0, printargs, "SYS_6377" }, /* 6377 */ ++ { 0, 0, printargs, "SYS_6378" }, /* 6378 */ ++ { 0, 0, printargs, "SYS_6379" }, /* 6379 */ ++ { 0, 0, printargs, "SYS_6380" }, /* 6380 */ ++ { 0, 0, printargs, "SYS_6381" }, /* 6381 */ ++ { 0, 0, printargs, "SYS_6382" }, /* 6382 */ ++ { 0, 0, printargs, "SYS_6383" }, /* 6383 */ ++ { 0, 0, printargs, "SYS_6384" }, /* 6384 */ ++ { 0, 0, printargs, "SYS_6385" }, /* 6385 */ ++ { 0, 0, printargs, "SYS_6386" }, /* 6386 */ ++ { 0, 0, printargs, "SYS_6387" }, /* 6387 */ ++ { 0, 0, printargs, "SYS_6388" }, /* 6388 */ ++ { 0, 0, printargs, "SYS_6389" }, /* 6389 */ ++ { 0, 0, printargs, "SYS_6390" }, /* 6390 */ ++ { 0, 0, printargs, "SYS_6391" }, /* 6391 */ ++ { 0, 0, printargs, "SYS_6392" }, /* 6392 */ ++ { 0, 0, printargs, "SYS_6393" }, /* 6393 */ ++ { 0, 0, printargs, "SYS_6394" }, /* 6394 */ ++ { 0, 0, printargs, "SYS_6395" }, /* 6395 */ ++ { 0, 0, printargs, "SYS_6396" }, /* 6396 */ ++ { 0, 0, printargs, "SYS_6397" }, /* 6397 */ ++ { 0, 0, printargs, "SYS_6398" }, /* 6398 */ ++ { 0, 0, printargs, "SYS_6399" }, /* 6399 */ ++ { 0, 0, printargs, "SYS_6400" }, /* 6400 */ ++ { 0, 0, printargs, "SYS_6401" }, /* 6401 */ ++ { 0, 0, printargs, "SYS_6402" }, /* 6402 */ ++ { 0, 0, printargs, "SYS_6403" }, /* 6403 */ ++ { 0, 0, printargs, "SYS_6404" }, /* 6404 */ ++ { 0, 0, printargs, "SYS_6405" }, /* 6405 */ ++ { 0, 0, printargs, "SYS_6406" }, /* 6406 */ ++ { 0, 0, printargs, "SYS_6407" }, /* 6407 */ ++ { 0, 0, printargs, "SYS_6408" }, /* 6408 */ ++ { 0, 0, printargs, "SYS_6409" }, /* 6409 */ ++ { 0, 0, printargs, "SYS_6410" }, /* 6410 */ ++ { 0, 0, printargs, "SYS_6411" }, /* 6411 */ ++ { 0, 0, printargs, "SYS_6412" }, /* 6412 */ ++ { 0, 0, printargs, "SYS_6413" }, /* 6413 */ ++ { 0, 0, printargs, "SYS_6414" }, /* 6414 */ ++ { 0, 0, printargs, "SYS_6415" }, /* 6415 */ ++ { 0, 0, printargs, "SYS_6416" }, /* 6416 */ ++ { 0, 0, printargs, "SYS_6417" }, /* 6417 */ ++ { 0, 0, printargs, "SYS_6418" }, /* 6418 */ ++ { 0, 0, printargs, "SYS_6419" }, /* 6419 */ ++ { 0, 0, printargs, "SYS_6420" }, /* 6420 */ ++ { 0, 0, printargs, "SYS_6421" }, /* 6421 */ ++ { 0, 0, printargs, "SYS_6422" }, /* 6422 */ ++ { 0, 0, printargs, "SYS_6423" }, /* 6423 */ ++ { 0, 0, printargs, "SYS_6424" }, /* 6424 */ ++ { 0, 0, printargs, "SYS_6425" }, /* 6425 */ ++ { 0, 0, printargs, "SYS_6426" }, /* 6426 */ ++ { 0, 0, printargs, "SYS_6427" }, /* 6427 */ ++ { 0, 0, printargs, "SYS_6428" }, /* 6428 */ ++ { 0, 0, printargs, "SYS_6429" }, /* 6429 */ ++ { 0, 0, printargs, "SYS_6430" }, /* 6430 */ ++ { 0, 0, printargs, "SYS_6431" }, /* 6431 */ ++ { 0, 0, printargs, "SYS_6432" }, /* 6432 */ ++ { 0, 0, printargs, "SYS_6433" }, /* 6433 */ ++ { 0, 0, printargs, "SYS_6434" }, /* 6434 */ ++ { 0, 0, printargs, "SYS_6435" }, /* 6435 */ ++ { 0, 0, printargs, "SYS_6436" }, /* 6436 */ ++ { 0, 0, printargs, "SYS_6437" }, /* 6437 */ ++ { 0, 0, printargs, "SYS_6438" }, /* 6438 */ ++ { 0, 0, printargs, "SYS_6439" }, /* 6439 */ ++ { 0, 0, printargs, "SYS_6440" }, /* 6440 */ ++ { 0, 0, printargs, "SYS_6441" }, /* 6441 */ ++ { 0, 0, printargs, "SYS_6442" }, /* 6442 */ ++ { 0, 0, printargs, "SYS_6443" }, /* 6443 */ ++ { 0, 0, printargs, "SYS_6444" }, /* 6444 */ ++ { 0, 0, printargs, "SYS_6445" }, /* 6445 */ ++ { 0, 0, printargs, "SYS_6446" }, /* 6446 */ ++ { 0, 0, printargs, "SYS_6447" }, /* 6447 */ ++ { 0, 0, printargs, "SYS_6448" }, /* 6448 */ ++ { 0, 0, printargs, "SYS_6449" }, /* 6449 */ ++ { 0, 0, printargs, "SYS_6450" }, /* 6450 */ ++ { 0, 0, printargs, "SYS_6451" }, /* 6451 */ ++ { 0, 0, printargs, "SYS_6452" }, /* 6452 */ ++ { 0, 0, printargs, "SYS_6453" }, /* 6453 */ ++ { 0, 0, printargs, "SYS_6454" }, /* 6454 */ ++ { 0, 0, printargs, "SYS_6455" }, /* 6455 */ ++ { 0, 0, printargs, "SYS_6456" }, /* 6456 */ ++ { 0, 0, printargs, "SYS_6457" }, /* 6457 */ ++ { 0, 0, printargs, "SYS_6458" }, /* 6458 */ ++ { 0, 0, printargs, "SYS_6459" }, /* 6459 */ ++ { 0, 0, printargs, "SYS_6460" }, /* 6460 */ ++ { 0, 0, printargs, "SYS_6461" }, /* 6461 */ ++ { 0, 0, printargs, "SYS_6462" }, /* 6462 */ ++ { 0, 0, printargs, "SYS_6463" }, /* 6463 */ ++ { 0, 0, printargs, "SYS_6464" }, /* 6464 */ ++ { 0, 0, printargs, "SYS_6465" }, /* 6465 */ ++ { 0, 0, printargs, "SYS_6466" }, /* 6466 */ ++ { 0, 0, printargs, "SYS_6467" }, /* 6467 */ ++ { 0, 0, printargs, "SYS_6468" }, /* 6468 */ ++ { 0, 0, printargs, "SYS_6469" }, /* 6469 */ ++ { 0, 0, printargs, "SYS_6470" }, /* 6470 */ ++ { 0, 0, printargs, "SYS_6471" }, /* 6471 */ ++ { 0, 0, printargs, "SYS_6472" }, /* 6472 */ ++ { 0, 0, printargs, "SYS_6473" }, /* 6473 */ ++ { 0, 0, printargs, "SYS_6474" }, /* 6474 */ ++ { 0, 0, printargs, "SYS_6475" }, /* 6475 */ ++ { 0, 0, printargs, "SYS_6476" }, /* 6476 */ ++ { 0, 0, printargs, "SYS_6477" }, /* 6477 */ ++ { 0, 0, printargs, "SYS_6478" }, /* 6478 */ ++ { 0, 0, printargs, "SYS_6479" }, /* 6479 */ ++ { 0, 0, printargs, "SYS_6480" }, /* 6480 */ ++ { 0, 0, printargs, "SYS_6481" }, /* 6481 */ ++ { 0, 0, printargs, "SYS_6482" }, /* 6482 */ ++ { 0, 0, printargs, "SYS_6483" }, /* 6483 */ ++ { 0, 0, printargs, "SYS_6484" }, /* 6484 */ ++ { 0, 0, printargs, "SYS_6485" }, /* 6485 */ ++ { 0, 0, printargs, "SYS_6486" }, /* 6486 */ ++ { 0, 0, printargs, "SYS_6487" }, /* 6487 */ ++ { 0, 0, printargs, "SYS_6488" }, /* 6488 */ ++ { 0, 0, printargs, "SYS_6489" }, /* 6489 */ ++ { 0, 0, printargs, "SYS_6490" }, /* 6490 */ ++ { 0, 0, printargs, "SYS_6491" }, /* 6491 */ ++ { 0, 0, printargs, "SYS_6492" }, /* 6492 */ ++ { 0, 0, printargs, "SYS_6493" }, /* 6493 */ ++ { 0, 0, printargs, "SYS_6494" }, /* 6494 */ ++ { 0, 0, printargs, "SYS_6495" }, /* 6495 */ ++ { 0, 0, printargs, "SYS_6496" }, /* 6496 */ ++ { 0, 0, printargs, "SYS_6497" }, /* 6497 */ ++ { 0, 0, printargs, "SYS_6498" }, /* 6498 */ ++ { 0, 0, printargs, "SYS_6499" }, /* 6499 */ ++ { 0, 0, printargs, "SYS_6500" }, /* 6500 */ ++ { 0, 0, printargs, "SYS_6501" }, /* 6501 */ ++ { 0, 0, printargs, "SYS_6502" }, /* 6502 */ ++ { 0, 0, printargs, "SYS_6503" }, /* 6503 */ ++ { 0, 0, printargs, "SYS_6504" }, /* 6504 */ ++ { 0, 0, printargs, "SYS_6505" }, /* 6505 */ ++ { 0, 0, printargs, "SYS_6506" }, /* 6506 */ ++ { 0, 0, printargs, "SYS_6507" }, /* 6507 */ ++ { 0, 0, printargs, "SYS_6508" }, /* 6508 */ ++ { 0, 0, printargs, "SYS_6509" }, /* 6509 */ ++ { 0, 0, printargs, "SYS_6510" }, /* 6510 */ ++ { 0, 0, printargs, "SYS_6511" }, /* 6511 */ ++ { 0, 0, printargs, "SYS_6512" }, /* 6512 */ ++ { 0, 0, printargs, "SYS_6513" }, /* 6513 */ ++ { 0, 0, printargs, "SYS_6514" }, /* 6514 */ ++ { 0, 0, printargs, "SYS_6515" }, /* 6515 */ ++ { 0, 0, printargs, "SYS_6516" }, /* 6516 */ ++ { 0, 0, printargs, "SYS_6517" }, /* 6517 */ ++ { 0, 0, printargs, "SYS_6518" }, /* 6518 */ ++ { 0, 0, printargs, "SYS_6519" }, /* 6519 */ ++ { 0, 0, printargs, "SYS_6520" }, /* 6520 */ ++ { 0, 0, printargs, "SYS_6521" }, /* 6521 */ ++ { 0, 0, printargs, "SYS_6522" }, /* 6522 */ ++ { 0, 0, printargs, "SYS_6523" }, /* 6523 */ ++ { 0, 0, printargs, "SYS_6524" }, /* 6524 */ ++ { 0, 0, printargs, "SYS_6525" }, /* 6525 */ ++ { 0, 0, printargs, "SYS_6526" }, /* 6526 */ ++ { 0, 0, printargs, "SYS_6527" }, /* 6527 */ ++ { 0, 0, printargs, "SYS_6528" }, /* 6528 */ ++ { 0, 0, printargs, "SYS_6529" }, /* 6529 */ ++ { 0, 0, printargs, "SYS_6530" }, /* 6530 */ ++ { 0, 0, printargs, "SYS_6531" }, /* 6531 */ ++ { 0, 0, printargs, "SYS_6532" }, /* 6532 */ ++ { 0, 0, printargs, "SYS_6533" }, /* 6533 */ ++ { 0, 0, printargs, "SYS_6534" }, /* 6534 */ ++ { 0, 0, printargs, "SYS_6535" }, /* 6535 */ ++ { 0, 0, printargs, "SYS_6536" }, /* 6536 */ ++ { 0, 0, printargs, "SYS_6537" }, /* 6537 */ ++ { 0, 0, printargs, "SYS_6538" }, /* 6538 */ ++ { 0, 0, printargs, "SYS_6539" }, /* 6539 */ ++ { 0, 0, printargs, "SYS_6540" }, /* 6540 */ ++ { 0, 0, printargs, "SYS_6541" }, /* 6541 */ ++ { 0, 0, printargs, "SYS_6542" }, /* 6542 */ ++ { 0, 0, printargs, "SYS_6543" }, /* 6543 */ ++ { 0, 0, printargs, "SYS_6544" }, /* 6544 */ ++ { 0, 0, printargs, "SYS_6545" }, /* 6545 */ ++ { 0, 0, printargs, "SYS_6546" }, /* 6546 */ ++ { 0, 0, printargs, "SYS_6547" }, /* 6547 */ ++ { 0, 0, printargs, "SYS_6548" }, /* 6548 */ ++ { 0, 0, printargs, "SYS_6549" }, /* 6549 */ ++ { 0, 0, printargs, "SYS_6550" }, /* 6550 */ ++ { 0, 0, printargs, "SYS_6551" }, /* 6551 */ ++ { 0, 0, printargs, "SYS_6552" }, /* 6552 */ ++ { 0, 0, printargs, "SYS_6553" }, /* 6553 */ ++ { 0, 0, printargs, "SYS_6554" }, /* 6554 */ ++ { 0, 0, printargs, "SYS_6555" }, /* 6555 */ ++ { 0, 0, printargs, "SYS_6556" }, /* 6556 */ ++ { 0, 0, printargs, "SYS_6557" }, /* 6557 */ ++ { 0, 0, printargs, "SYS_6558" }, /* 6558 */ ++ { 0, 0, printargs, "SYS_6559" }, /* 6559 */ ++ { 0, 0, printargs, "SYS_6560" }, /* 6560 */ ++ { 0, 0, printargs, "SYS_6561" }, /* 6561 */ ++ { 0, 0, printargs, "SYS_6562" }, /* 6562 */ ++ { 0, 0, printargs, "SYS_6563" }, /* 6563 */ ++ { 0, 0, printargs, "SYS_6564" }, /* 6564 */ ++ { 0, 0, printargs, "SYS_6565" }, /* 6565 */ ++ { 0, 0, printargs, "SYS_6566" }, /* 6566 */ ++ { 0, 0, printargs, "SYS_6567" }, /* 6567 */ ++ { 0, 0, printargs, "SYS_6568" }, /* 6568 */ ++ { 0, 0, printargs, "SYS_6569" }, /* 6569 */ ++ { 0, 0, printargs, "SYS_6570" }, /* 6570 */ ++ { 0, 0, printargs, "SYS_6571" }, /* 6571 */ ++ { 0, 0, printargs, "SYS_6572" }, /* 6572 */ ++ { 0, 0, printargs, "SYS_6573" }, /* 6573 */ ++ { 0, 0, printargs, "SYS_6574" }, /* 6574 */ ++ { 0, 0, printargs, "SYS_6575" }, /* 6575 */ ++ { 0, 0, printargs, "SYS_6576" }, /* 6576 */ ++ { 0, 0, printargs, "SYS_6577" }, /* 6577 */ ++ { 0, 0, printargs, "SYS_6578" }, /* 6578 */ ++ { 0, 0, printargs, "SYS_6579" }, /* 6579 */ ++ { 0, 0, printargs, "SYS_6580" }, /* 6580 */ ++ { 0, 0, printargs, "SYS_6581" }, /* 6581 */ ++ { 0, 0, printargs, "SYS_6582" }, /* 6582 */ ++ { 0, 0, printargs, "SYS_6583" }, /* 6583 */ ++ { 0, 0, printargs, "SYS_6584" }, /* 6584 */ ++ { 0, 0, printargs, "SYS_6585" }, /* 6585 */ ++ { 0, 0, printargs, "SYS_6586" }, /* 6586 */ ++ { 0, 0, printargs, "SYS_6587" }, /* 6587 */ ++ { 0, 0, printargs, "SYS_6588" }, /* 6588 */ ++ { 0, 0, printargs, "SYS_6589" }, /* 6589 */ ++ { 0, 0, printargs, "SYS_6590" }, /* 6590 */ ++ { 0, 0, printargs, "SYS_6591" }, /* 6591 */ ++ { 0, 0, printargs, "SYS_6592" }, /* 6592 */ ++ { 0, 0, printargs, "SYS_6593" }, /* 6593 */ ++ { 0, 0, printargs, "SYS_6594" }, /* 6594 */ ++ { 0, 0, printargs, "SYS_6595" }, /* 6595 */ ++ { 0, 0, printargs, "SYS_6596" }, /* 6596 */ ++ { 0, 0, printargs, "SYS_6597" }, /* 6597 */ ++ { 0, 0, printargs, "SYS_6598" }, /* 6598 */ ++ { 0, 0, printargs, "SYS_6599" }, /* 6599 */ ++ { 0, 0, printargs, "SYS_6600" }, /* 6600 */ ++ { 0, 0, printargs, "SYS_6601" }, /* 6601 */ ++ { 0, 0, printargs, "SYS_6602" }, /* 6602 */ ++ { 0, 0, printargs, "SYS_6603" }, /* 6603 */ ++ { 0, 0, printargs, "SYS_6604" }, /* 6604 */ ++ { 0, 0, printargs, "SYS_6605" }, /* 6605 */ ++ { 0, 0, printargs, "SYS_6606" }, /* 6606 */ ++ { 0, 0, printargs, "SYS_6607" }, /* 6607 */ ++ { 0, 0, printargs, "SYS_6608" }, /* 6608 */ ++ { 0, 0, printargs, "SYS_6609" }, /* 6609 */ ++ { 0, 0, printargs, "SYS_6610" }, /* 6610 */ ++ { 0, 0, printargs, "SYS_6611" }, /* 6611 */ ++ { 0, 0, printargs, "SYS_6612" }, /* 6612 */ ++ { 0, 0, printargs, "SYS_6613" }, /* 6613 */ ++ { 0, 0, printargs, "SYS_6614" }, /* 6614 */ ++ { 0, 0, printargs, "SYS_6615" }, /* 6615 */ ++ { 0, 0, printargs, "SYS_6616" }, /* 6616 */ ++ { 0, 0, printargs, "SYS_6617" }, /* 6617 */ ++ { 0, 0, printargs, "SYS_6618" }, /* 6618 */ ++ { 0, 0, printargs, "SYS_6619" }, /* 6619 */ ++ { 0, 0, printargs, "SYS_6620" }, /* 6620 */ ++ { 0, 0, printargs, "SYS_6621" }, /* 6621 */ ++ { 0, 0, printargs, "SYS_6622" }, /* 6622 */ ++ { 0, 0, printargs, "SYS_6623" }, /* 6623 */ ++ { 0, 0, printargs, "SYS_6624" }, /* 6624 */ ++ { 0, 0, printargs, "SYS_6625" }, /* 6625 */ ++ { 0, 0, printargs, "SYS_6626" }, /* 6626 */ ++ { 0, 0, printargs, "SYS_6627" }, /* 6627 */ ++ { 0, 0, printargs, "SYS_6628" }, /* 6628 */ ++ { 0, 0, printargs, "SYS_6629" }, /* 6629 */ ++ { 0, 0, printargs, "SYS_6630" }, /* 6630 */ ++ { 0, 0, printargs, "SYS_6631" }, /* 6631 */ ++ { 0, 0, printargs, "SYS_6632" }, /* 6632 */ ++ { 0, 0, printargs, "SYS_6633" }, /* 6633 */ ++ { 0, 0, printargs, "SYS_6634" }, /* 6634 */ ++ { 0, 0, printargs, "SYS_6635" }, /* 6635 */ ++ { 0, 0, printargs, "SYS_6636" }, /* 6636 */ ++ { 0, 0, printargs, "SYS_6637" }, /* 6637 */ ++ { 0, 0, printargs, "SYS_6638" }, /* 6638 */ ++ { 0, 0, printargs, "SYS_6639" }, /* 6639 */ ++ { 0, 0, printargs, "SYS_6640" }, /* 6640 */ ++ { 0, 0, printargs, "SYS_6641" }, /* 6641 */ ++ { 0, 0, printargs, "SYS_6642" }, /* 6642 */ ++ { 0, 0, printargs, "SYS_6643" }, /* 6643 */ ++ { 0, 0, printargs, "SYS_6644" }, /* 6644 */ ++ { 0, 0, printargs, "SYS_6645" }, /* 6645 */ ++ { 0, 0, printargs, "SYS_6646" }, /* 6646 */ ++ { 0, 0, printargs, "SYS_6647" }, /* 6647 */ ++ { 0, 0, printargs, "SYS_6648" }, /* 6648 */ ++ { 0, 0, printargs, "SYS_6649" }, /* 6649 */ ++ { 0, 0, printargs, "SYS_6650" }, /* 6650 */ ++ { 0, 0, printargs, "SYS_6651" }, /* 6651 */ ++ { 0, 0, printargs, "SYS_6652" }, /* 6652 */ ++ { 0, 0, printargs, "SYS_6653" }, /* 6653 */ ++ { 0, 0, printargs, "SYS_6654" }, /* 6654 */ ++ { 0, 0, printargs, "SYS_6655" }, /* 6655 */ ++ { 0, 0, printargs, "SYS_6656" }, /* 6656 */ ++ { 0, 0, printargs, "SYS_6657" }, /* 6657 */ ++ { 0, 0, printargs, "SYS_6658" }, /* 6658 */ ++ { 0, 0, printargs, "SYS_6659" }, /* 6659 */ ++ { 0, 0, printargs, "SYS_6660" }, /* 6660 */ ++ { 0, 0, printargs, "SYS_6661" }, /* 6661 */ ++ { 0, 0, printargs, "SYS_6662" }, /* 6662 */ ++ { 0, 0, printargs, "SYS_6663" }, /* 6663 */ ++ { 0, 0, printargs, "SYS_6664" }, /* 6664 */ ++ { 0, 0, printargs, "SYS_6665" }, /* 6665 */ ++ { 0, 0, printargs, "SYS_6666" }, /* 6666 */ ++ { 0, 0, printargs, "SYS_6667" }, /* 6667 */ ++ { 0, 0, printargs, "SYS_6668" }, /* 6668 */ ++ { 0, 0, printargs, "SYS_6669" }, /* 6669 */ ++ { 0, 0, printargs, "SYS_6670" }, /* 6670 */ ++ { 0, 0, printargs, "SYS_6671" }, /* 6671 */ ++ { 0, 0, printargs, "SYS_6672" }, /* 6672 */ ++ { 0, 0, printargs, "SYS_6673" }, /* 6673 */ ++ { 0, 0, printargs, "SYS_6674" }, /* 6674 */ ++ { 0, 0, printargs, "SYS_6675" }, /* 6675 */ ++ { 0, 0, printargs, "SYS_6676" }, /* 6676 */ ++ { 0, 0, printargs, "SYS_6677" }, /* 6677 */ ++ { 0, 0, printargs, "SYS_6678" }, /* 6678 */ ++ { 0, 0, printargs, "SYS_6679" }, /* 6679 */ ++ { 0, 0, printargs, "SYS_6680" }, /* 6680 */ ++ { 0, 0, printargs, "SYS_6681" }, /* 6681 */ ++ { 0, 0, printargs, "SYS_6682" }, /* 6682 */ ++ { 0, 0, printargs, "SYS_6683" }, /* 6683 */ ++ { 0, 0, printargs, "SYS_6684" }, /* 6684 */ ++ { 0, 0, printargs, "SYS_6685" }, /* 6685 */ ++ { 0, 0, printargs, "SYS_6686" }, /* 6686 */ ++ { 0, 0, printargs, "SYS_6687" }, /* 6687 */ ++ { 0, 0, printargs, "SYS_6688" }, /* 6688 */ ++ { 0, 0, printargs, "SYS_6689" }, /* 6689 */ ++ { 0, 0, printargs, "SYS_6690" }, /* 6690 */ ++ { 0, 0, printargs, "SYS_6691" }, /* 6691 */ ++ { 0, 0, printargs, "SYS_6692" }, /* 6692 */ ++ { 0, 0, printargs, "SYS_6693" }, /* 6693 */ ++ { 0, 0, printargs, "SYS_6694" }, /* 6694 */ ++ { 0, 0, printargs, "SYS_6695" }, /* 6695 */ ++ { 0, 0, printargs, "SYS_6696" }, /* 6696 */ ++ { 0, 0, printargs, "SYS_6697" }, /* 6697 */ ++ { 0, 0, printargs, "SYS_6698" }, /* 6698 */ ++ { 0, 0, printargs, "SYS_6699" }, /* 6699 */ ++ { 0, 0, printargs, "SYS_6700" }, /* 6700 */ ++ { 0, 0, printargs, "SYS_6701" }, /* 6701 */ ++ { 0, 0, printargs, "SYS_6702" }, /* 6702 */ ++ { 0, 0, printargs, "SYS_6703" }, /* 6703 */ ++ { 0, 0, printargs, "SYS_6704" }, /* 6704 */ ++ { 0, 0, printargs, "SYS_6705" }, /* 6705 */ ++ { 0, 0, printargs, "SYS_6706" }, /* 6706 */ ++ { 0, 0, printargs, "SYS_6707" }, /* 6707 */ ++ { 0, 0, printargs, "SYS_6708" }, /* 6708 */ ++ { 0, 0, printargs, "SYS_6709" }, /* 6709 */ ++ { 0, 0, printargs, "SYS_6710" }, /* 6710 */ ++ { 0, 0, printargs, "SYS_6711" }, /* 6711 */ ++ { 0, 0, printargs, "SYS_6712" }, /* 6712 */ ++ { 0, 0, printargs, "SYS_6713" }, /* 6713 */ ++ { 0, 0, printargs, "SYS_6714" }, /* 6714 */ ++ { 0, 0, printargs, "SYS_6715" }, /* 6715 */ ++ { 0, 0, printargs, "SYS_6716" }, /* 6716 */ ++ { 0, 0, printargs, "SYS_6717" }, /* 6717 */ ++ { 0, 0, printargs, "SYS_6718" }, /* 6718 */ ++ { 0, 0, printargs, "SYS_6719" }, /* 6719 */ ++ { 0, 0, printargs, "SYS_6720" }, /* 6720 */ ++ { 0, 0, printargs, "SYS_6721" }, /* 6721 */ ++ { 0, 0, printargs, "SYS_6722" }, /* 6722 */ ++ { 0, 0, printargs, "SYS_6723" }, /* 6723 */ ++ { 0, 0, printargs, "SYS_6724" }, /* 6724 */ ++ { 0, 0, printargs, "SYS_6725" }, /* 6725 */ ++ { 0, 0, printargs, "SYS_6726" }, /* 6726 */ ++ { 0, 0, printargs, "SYS_6727" }, /* 6727 */ ++ { 0, 0, printargs, "SYS_6728" }, /* 6728 */ ++ { 0, 0, printargs, "SYS_6729" }, /* 6729 */ ++ { 0, 0, printargs, "SYS_6730" }, /* 6730 */ ++ { 0, 0, printargs, "SYS_6731" }, /* 6731 */ ++ { 0, 0, printargs, "SYS_6732" }, /* 6732 */ ++ { 0, 0, printargs, "SYS_6733" }, /* 6733 */ ++ { 0, 0, printargs, "SYS_6734" }, /* 6734 */ ++ { 0, 0, printargs, "SYS_6735" }, /* 6735 */ ++ { 0, 0, printargs, "SYS_6736" }, /* 6736 */ ++ { 0, 0, printargs, "SYS_6737" }, /* 6737 */ ++ { 0, 0, printargs, "SYS_6738" }, /* 6738 */ ++ { 0, 0, printargs, "SYS_6739" }, /* 6739 */ ++ { 0, 0, printargs, "SYS_6740" }, /* 6740 */ ++ { 0, 0, printargs, "SYS_6741" }, /* 6741 */ ++ { 0, 0, printargs, "SYS_6742" }, /* 6742 */ ++ { 0, 0, printargs, "SYS_6743" }, /* 6743 */ ++ { 0, 0, printargs, "SYS_6744" }, /* 6744 */ ++ { 0, 0, printargs, "SYS_6745" }, /* 6745 */ ++ { 0, 0, printargs, "SYS_6746" }, /* 6746 */ ++ { 0, 0, printargs, "SYS_6747" }, /* 6747 */ ++ { 0, 0, printargs, "SYS_6748" }, /* 6748 */ ++ { 0, 0, printargs, "SYS_6749" }, /* 6749 */ ++ { 0, 0, printargs, "SYS_6750" }, /* 6750 */ ++ { 0, 0, printargs, "SYS_6751" }, /* 6751 */ ++ { 0, 0, printargs, "SYS_6752" }, /* 6752 */ ++ { 0, 0, printargs, "SYS_6753" }, /* 6753 */ ++ { 0, 0, printargs, "SYS_6754" }, /* 6754 */ ++ { 0, 0, printargs, "SYS_6755" }, /* 6755 */ ++ { 0, 0, printargs, "SYS_6756" }, /* 6756 */ ++ { 0, 0, printargs, "SYS_6757" }, /* 6757 */ ++ { 0, 0, printargs, "SYS_6758" }, /* 6758 */ ++ { 0, 0, printargs, "SYS_6759" }, /* 6759 */ ++ { 0, 0, printargs, "SYS_6760" }, /* 6760 */ ++ { 0, 0, printargs, "SYS_6761" }, /* 6761 */ ++ { 0, 0, printargs, "SYS_6762" }, /* 6762 */ ++ { 0, 0, printargs, "SYS_6763" }, /* 6763 */ ++ { 0, 0, printargs, "SYS_6764" }, /* 6764 */ ++ { 0, 0, printargs, "SYS_6765" }, /* 6765 */ ++ { 0, 0, printargs, "SYS_6766" }, /* 6766 */ ++ { 0, 0, printargs, "SYS_6767" }, /* 6767 */ ++ { 0, 0, printargs, "SYS_6768" }, /* 6768 */ ++ { 0, 0, printargs, "SYS_6769" }, /* 6769 */ ++ { 0, 0, printargs, "SYS_6770" }, /* 6770 */ ++ { 0, 0, printargs, "SYS_6771" }, /* 6771 */ ++ { 0, 0, printargs, "SYS_6772" }, /* 6772 */ ++ { 0, 0, printargs, "SYS_6773" }, /* 6773 */ ++ { 0, 0, printargs, "SYS_6774" }, /* 6774 */ ++ { 0, 0, printargs, "SYS_6775" }, /* 6775 */ ++ { 0, 0, printargs, "SYS_6776" }, /* 6776 */ ++ { 0, 0, printargs, "SYS_6777" }, /* 6777 */ ++ { 0, 0, printargs, "SYS_6778" }, /* 6778 */ ++ { 0, 0, printargs, "SYS_6779" }, /* 6779 */ ++ { 0, 0, printargs, "SYS_6780" }, /* 6780 */ ++ { 0, 0, printargs, "SYS_6781" }, /* 6781 */ ++ { 0, 0, printargs, "SYS_6782" }, /* 6782 */ ++ { 0, 0, printargs, "SYS_6783" }, /* 6783 */ ++ { 0, 0, printargs, "SYS_6784" }, /* 6784 */ ++ { 0, 0, printargs, "SYS_6785" }, /* 6785 */ ++ { 0, 0, printargs, "SYS_6786" }, /* 6786 */ ++ { 0, 0, printargs, "SYS_6787" }, /* 6787 */ ++ { 0, 0, printargs, "SYS_6788" }, /* 6788 */ ++ { 0, 0, printargs, "SYS_6789" }, /* 6789 */ ++ { 0, 0, printargs, "SYS_6790" }, /* 6790 */ ++ { 0, 0, printargs, "SYS_6791" }, /* 6791 */ ++ { 0, 0, printargs, "SYS_6792" }, /* 6792 */ ++ { 0, 0, printargs, "SYS_6793" }, /* 6793 */ ++ { 0, 0, printargs, "SYS_6794" }, /* 6794 */ ++ { 0, 0, printargs, "SYS_6795" }, /* 6795 */ ++ { 0, 0, printargs, "SYS_6796" }, /* 6796 */ ++ { 0, 0, printargs, "SYS_6797" }, /* 6797 */ ++ { 0, 0, printargs, "SYS_6798" }, /* 6798 */ ++ { 0, 0, printargs, "SYS_6799" }, /* 6799 */ ++ { 0, 0, printargs, "SYS_6800" }, /* 6800 */ ++ { 0, 0, printargs, "SYS_6801" }, /* 6801 */ ++ { 0, 0, printargs, "SYS_6802" }, /* 6802 */ ++ { 0, 0, printargs, "SYS_6803" }, /* 6803 */ ++ { 0, 0, printargs, "SYS_6804" }, /* 6804 */ ++ { 0, 0, printargs, "SYS_6805" }, /* 6805 */ ++ { 0, 0, printargs, "SYS_6806" }, /* 6806 */ ++ { 0, 0, printargs, "SYS_6807" }, /* 6807 */ ++ { 0, 0, printargs, "SYS_6808" }, /* 6808 */ ++ { 0, 0, printargs, "SYS_6809" }, /* 6809 */ ++ { 0, 0, printargs, "SYS_6810" }, /* 6810 */ ++ { 0, 0, printargs, "SYS_6811" }, /* 6811 */ ++ { 0, 0, printargs, "SYS_6812" }, /* 6812 */ ++ { 0, 0, printargs, "SYS_6813" }, /* 6813 */ ++ { 0, 0, printargs, "SYS_6814" }, /* 6814 */ ++ { 0, 0, printargs, "SYS_6815" }, /* 6815 */ ++ { 0, 0, printargs, "SYS_6816" }, /* 6816 */ ++ { 0, 0, printargs, "SYS_6817" }, /* 6817 */ ++ { 0, 0, printargs, "SYS_6818" }, /* 6818 */ ++ { 0, 0, printargs, "SYS_6819" }, /* 6819 */ ++ { 0, 0, printargs, "SYS_6820" }, /* 6820 */ ++ { 0, 0, printargs, "SYS_6821" }, /* 6821 */ ++ { 0, 0, printargs, "SYS_6822" }, /* 6822 */ ++ { 0, 0, printargs, "SYS_6823" }, /* 6823 */ ++ { 0, 0, printargs, "SYS_6824" }, /* 6824 */ ++ { 0, 0, printargs, "SYS_6825" }, /* 6825 */ ++ { 0, 0, printargs, "SYS_6826" }, /* 6826 */ ++ { 0, 0, printargs, "SYS_6827" }, /* 6827 */ ++ { 0, 0, printargs, "SYS_6828" }, /* 6828 */ ++ { 0, 0, printargs, "SYS_6829" }, /* 6829 */ ++ { 0, 0, printargs, "SYS_6830" }, /* 6830 */ ++ { 0, 0, printargs, "SYS_6831" }, /* 6831 */ ++ { 0, 0, printargs, "SYS_6832" }, /* 6832 */ ++ { 0, 0, printargs, "SYS_6833" }, /* 6833 */ ++ { 0, 0, printargs, "SYS_6834" }, /* 6834 */ ++ { 0, 0, printargs, "SYS_6835" }, /* 6835 */ ++ { 0, 0, printargs, "SYS_6836" }, /* 6836 */ ++ { 0, 0, printargs, "SYS_6837" }, /* 6837 */ ++ { 0, 0, printargs, "SYS_6838" }, /* 6838 */ ++ { 0, 0, printargs, "SYS_6839" }, /* 6839 */ ++ { 0, 0, printargs, "SYS_6840" }, /* 6840 */ ++ { 0, 0, printargs, "SYS_6841" }, /* 6841 */ ++ { 0, 0, printargs, "SYS_6842" }, /* 6842 */ ++ { 0, 0, printargs, "SYS_6843" }, /* 6843 */ ++ { 0, 0, printargs, "SYS_6844" }, /* 6844 */ ++ { 0, 0, printargs, "SYS_6845" }, /* 6845 */ ++ { 0, 0, printargs, "SYS_6846" }, /* 6846 */ ++ { 0, 0, printargs, "SYS_6847" }, /* 6847 */ ++ { 0, 0, printargs, "SYS_6848" }, /* 6848 */ ++ { 0, 0, printargs, "SYS_6849" }, /* 6849 */ ++ { 0, 0, printargs, "SYS_6850" }, /* 6850 */ ++ { 0, 0, printargs, "SYS_6851" }, /* 6851 */ ++ { 0, 0, printargs, "SYS_6852" }, /* 6852 */ ++ { 0, 0, printargs, "SYS_6853" }, /* 6853 */ ++ { 0, 0, printargs, "SYS_6854" }, /* 6854 */ ++ { 0, 0, printargs, "SYS_6855" }, /* 6855 */ ++ { 0, 0, printargs, "SYS_6856" }, /* 6856 */ ++ { 0, 0, printargs, "SYS_6857" }, /* 6857 */ ++ { 0, 0, printargs, "SYS_6858" }, /* 6858 */ ++ { 0, 0, printargs, "SYS_6859" }, /* 6859 */ ++ { 0, 0, printargs, "SYS_6860" }, /* 6860 */ ++ { 0, 0, printargs, "SYS_6861" }, /* 6861 */ ++ { 0, 0, printargs, "SYS_6862" }, /* 6862 */ ++ { 0, 0, printargs, "SYS_6863" }, /* 6863 */ ++ { 0, 0, printargs, "SYS_6864" }, /* 6864 */ ++ { 0, 0, printargs, "SYS_6865" }, /* 6865 */ ++ { 0, 0, printargs, "SYS_6866" }, /* 6866 */ ++ { 0, 0, printargs, "SYS_6867" }, /* 6867 */ ++ { 0, 0, printargs, "SYS_6868" }, /* 6868 */ ++ { 0, 0, printargs, "SYS_6869" }, /* 6869 */ ++ { 0, 0, printargs, "SYS_6870" }, /* 6870 */ ++ { 0, 0, printargs, "SYS_6871" }, /* 6871 */ ++ { 0, 0, printargs, "SYS_6872" }, /* 6872 */ ++ { 0, 0, printargs, "SYS_6873" }, /* 6873 */ ++ { 0, 0, printargs, "SYS_6874" }, /* 6874 */ ++ { 0, 0, printargs, "SYS_6875" }, /* 6875 */ ++ { 0, 0, printargs, "SYS_6876" }, /* 6876 */ ++ { 0, 0, printargs, "SYS_6877" }, /* 6877 */ ++ { 0, 0, printargs, "SYS_6878" }, /* 6878 */ ++ { 0, 0, printargs, "SYS_6879" }, /* 6879 */ ++ { 0, 0, printargs, "SYS_6880" }, /* 6880 */ ++ { 0, 0, printargs, "SYS_6881" }, /* 6881 */ ++ { 0, 0, printargs, "SYS_6882" }, /* 6882 */ ++ { 0, 0, printargs, "SYS_6883" }, /* 6883 */ ++ { 0, 0, printargs, "SYS_6884" }, /* 6884 */ ++ { 0, 0, printargs, "SYS_6885" }, /* 6885 */ ++ { 0, 0, printargs, "SYS_6886" }, /* 6886 */ ++ { 0, 0, printargs, "SYS_6887" }, /* 6887 */ ++ { 0, 0, printargs, "SYS_6888" }, /* 6888 */ ++ { 0, 0, printargs, "SYS_6889" }, /* 6889 */ ++ { 0, 0, printargs, "SYS_6890" }, /* 6890 */ ++ { 0, 0, printargs, "SYS_6891" }, /* 6891 */ ++ { 0, 0, printargs, "SYS_6892" }, /* 6892 */ ++ { 0, 0, printargs, "SYS_6893" }, /* 6893 */ ++ { 0, 0, printargs, "SYS_6894" }, /* 6894 */ ++ { 0, 0, printargs, "SYS_6895" }, /* 6895 */ ++ { 0, 0, printargs, "SYS_6896" }, /* 6896 */ ++ { 0, 0, printargs, "SYS_6897" }, /* 6897 */ ++ { 0, 0, printargs, "SYS_6898" }, /* 6898 */ ++ { 0, 0, printargs, "SYS_6899" }, /* 6899 */ ++ { 0, 0, printargs, "SYS_6900" }, /* 6900 */ ++ { 0, 0, printargs, "SYS_6901" }, /* 6901 */ ++ { 0, 0, printargs, "SYS_6902" }, /* 6902 */ ++ { 0, 0, printargs, "SYS_6903" }, /* 6903 */ ++ { 0, 0, printargs, "SYS_6904" }, /* 6904 */ ++ { 0, 0, printargs, "SYS_6905" }, /* 6905 */ ++ { 0, 0, printargs, "SYS_6906" }, /* 6906 */ ++ { 0, 0, printargs, "SYS_6907" }, /* 6907 */ ++ { 0, 0, printargs, "SYS_6908" }, /* 6908 */ ++ { 0, 0, printargs, "SYS_6909" }, /* 6909 */ ++ { 0, 0, printargs, "SYS_6910" }, /* 6910 */ ++ { 0, 0, printargs, "SYS_6911" }, /* 6911 */ ++ { 0, 0, printargs, "SYS_6912" }, /* 6912 */ ++ { 0, 0, printargs, "SYS_6913" }, /* 6913 */ ++ { 0, 0, printargs, "SYS_6914" }, /* 6914 */ ++ { 0, 0, printargs, "SYS_6915" }, /* 6915 */ ++ { 0, 0, printargs, "SYS_6916" }, /* 6916 */ ++ { 0, 0, printargs, "SYS_6917" }, /* 6917 */ ++ { 0, 0, printargs, "SYS_6918" }, /* 6918 */ ++ { 0, 0, printargs, "SYS_6919" }, /* 6919 */ ++ { 0, 0, printargs, "SYS_6920" }, /* 6920 */ ++ { 0, 0, printargs, "SYS_6921" }, /* 6921 */ ++ { 0, 0, printargs, "SYS_6922" }, /* 6922 */ ++ { 0, 0, printargs, "SYS_6923" }, /* 6923 */ ++ { 0, 0, printargs, "SYS_6924" }, /* 6924 */ ++ { 0, 0, printargs, "SYS_6925" }, /* 6925 */ ++ { 0, 0, printargs, "SYS_6926" }, /* 6926 */ ++ { 0, 0, printargs, "SYS_6927" }, /* 6927 */ ++ { 0, 0, printargs, "SYS_6928" }, /* 6928 */ ++ { 0, 0, printargs, "SYS_6929" }, /* 6929 */ ++ { 0, 0, printargs, "SYS_6930" }, /* 6930 */ ++ { 0, 0, printargs, "SYS_6931" }, /* 6931 */ ++ { 0, 0, printargs, "SYS_6932" }, /* 6932 */ ++ { 0, 0, printargs, "SYS_6933" }, /* 6933 */ ++ { 0, 0, printargs, "SYS_6934" }, /* 6934 */ ++ { 0, 0, printargs, "SYS_6935" }, /* 6935 */ ++ { 0, 0, printargs, "SYS_6936" }, /* 6936 */ ++ { 0, 0, printargs, "SYS_6937" }, /* 6937 */ ++ { 0, 0, printargs, "SYS_6938" }, /* 6938 */ ++ { 0, 0, printargs, "SYS_6939" }, /* 6939 */ ++ { 0, 0, printargs, "SYS_6940" }, /* 6940 */ ++ { 0, 0, printargs, "SYS_6941" }, /* 6941 */ ++ { 0, 0, printargs, "SYS_6942" }, /* 6942 */ ++ { 0, 0, printargs, "SYS_6943" }, /* 6943 */ ++ { 0, 0, printargs, "SYS_6944" }, /* 6944 */ ++ { 0, 0, printargs, "SYS_6945" }, /* 6945 */ ++ { 0, 0, printargs, "SYS_6946" }, /* 6946 */ ++ { 0, 0, printargs, "SYS_6947" }, /* 6947 */ ++ { 0, 0, printargs, "SYS_6948" }, /* 6948 */ ++ { 0, 0, printargs, "SYS_6949" }, /* 6949 */ ++ { 0, 0, printargs, "SYS_6950" }, /* 6950 */ ++ { 0, 0, printargs, "SYS_6951" }, /* 6951 */ ++ { 0, 0, printargs, "SYS_6952" }, /* 6952 */ ++ { 0, 0, printargs, "SYS_6953" }, /* 6953 */ ++ { 0, 0, printargs, "SYS_6954" }, /* 6954 */ ++ { 0, 0, printargs, "SYS_6955" }, /* 6955 */ ++ { 0, 0, printargs, "SYS_6956" }, /* 6956 */ ++ { 0, 0, printargs, "SYS_6957" }, /* 6957 */ ++ { 0, 0, printargs, "SYS_6958" }, /* 6958 */ ++ { 0, 0, printargs, "SYS_6959" }, /* 6959 */ ++ { 0, 0, printargs, "SYS_6960" }, /* 6960 */ ++ { 0, 0, printargs, "SYS_6961" }, /* 6961 */ ++ { 0, 0, printargs, "SYS_6962" }, /* 6962 */ ++ { 0, 0, printargs, "SYS_6963" }, /* 6963 */ ++ { 0, 0, printargs, "SYS_6964" }, /* 6964 */ ++ { 0, 0, printargs, "SYS_6965" }, /* 6965 */ ++ { 0, 0, printargs, "SYS_6966" }, /* 6966 */ ++ { 0, 0, printargs, "SYS_6967" }, /* 6967 */ ++ { 0, 0, printargs, "SYS_6968" }, /* 6968 */ ++ { 0, 0, printargs, "SYS_6969" }, /* 6969 */ ++ { 0, 0, printargs, "SYS_6970" }, /* 6970 */ ++ { 0, 0, printargs, "SYS_6971" }, /* 6971 */ ++ { 0, 0, printargs, "SYS_6972" }, /* 6972 */ ++ { 0, 0, printargs, "SYS_6973" }, /* 6973 */ ++ { 0, 0, printargs, "SYS_6974" }, /* 6974 */ ++ { 0, 0, printargs, "SYS_6975" }, /* 6975 */ ++ { 0, 0, printargs, "SYS_6976" }, /* 6976 */ ++ { 0, 0, printargs, "SYS_6977" }, /* 6977 */ ++ { 0, 0, printargs, "SYS_6978" }, /* 6978 */ ++ { 0, 0, printargs, "SYS_6979" }, /* 6979 */ ++ { 0, 0, printargs, "SYS_6980" }, /* 6980 */ ++ { 0, 0, printargs, "SYS_6981" }, /* 6981 */ ++ { 0, 0, printargs, "SYS_6982" }, /* 6982 */ ++ { 0, 0, printargs, "SYS_6983" }, /* 6983 */ ++ { 0, 0, printargs, "SYS_6984" }, /* 6984 */ ++ { 0, 0, printargs, "SYS_6985" }, /* 6985 */ ++ { 0, 0, printargs, "SYS_6986" }, /* 6986 */ ++ { 0, 0, printargs, "SYS_6987" }, /* 6987 */ ++ { 0, 0, printargs, "SYS_6988" }, /* 6988 */ ++ { 0, 0, printargs, "SYS_6989" }, /* 6989 */ ++ { 0, 0, printargs, "SYS_6990" }, /* 6990 */ ++ { 0, 0, printargs, "SYS_6991" }, /* 6991 */ ++ { 0, 0, printargs, "SYS_6992" }, /* 6992 */ ++ { 0, 0, printargs, "SYS_6993" }, /* 6993 */ ++ { 0, 0, printargs, "SYS_6994" }, /* 6994 */ ++ { 0, 0, printargs, "SYS_6995" }, /* 6995 */ ++ { 0, 0, printargs, "SYS_6996" }, /* 6996 */ ++ { 0, 0, printargs, "SYS_6997" }, /* 6997 */ ++ { 0, 0, printargs, "SYS_6998" }, /* 6998 */ ++ { 0, 0, printargs, "SYS_6999" }, /* 6999 */ /* end of Linux N32 */ diff --git a/utils/strace/patches-4.5.16/004-no_cacheflush.patch b/utils/strace/patches-4.5.16/004-no_cacheflush.patch new file mode 100644 index 0000000..0a13143 --- /dev/null +++ b/utils/strace/patches-4.5.16/004-no_cacheflush.patch @@ -0,0 +1,13 @@ +--- a/system.c ++++ b/system.c +@@ -70,10 +70,6 @@ + #include + #endif + +-#ifdef SYS_cacheflush +-#include +-#endif +- + #ifdef HAVE_LINUX_USTNAME_H + #include + #endif diff --git a/utils/strace/patches-4.5.16/010-cris_support.patch b/utils/strace/patches-4.5.16/010-cris_support.patch new file mode 100644 index 0000000..07aa964 --- /dev/null +++ b/utils/strace/patches-4.5.16/010-cris_support.patch @@ -0,0 +1,345 @@ +diff -Naur strace-4.5.16.ori/config.h.in strace-4.5.16/config.h.in +--- strace-4.5.16.ori/config.h.in 2008-08-04 20:11:11.000000000 +0200 ++++ strace-4.5.16/config.h.in 2008-08-04 20:48:28.000000000 +0200 +@@ -403,6 +403,12 @@ + /* Define for the AMD x86-64 architecture. */ + #undef X86_64 + ++/* Define for the CRISv10 architecture. */ ++#undef CRISV10 ++ ++/* Define for the CRISv32 architecture. */ ++#undef CRISV32 ++ + /* Enable GNU extensions on systems that have them. */ + #ifndef _GNU_SOURCE + # undef _GNU_SOURCE +diff -Naur strace-4.5.16.ori/configure strace-4.5.16/configure +--- strace-4.5.16.ori/configure 2008-08-04 20:11:11.000000000 +0200 ++++ strace-4.5.16/configure 2008-08-04 21:15:39.000000000 +0200 +@@ -2539,6 +2539,22 @@ + _ACEOF + + ;; ++cris|crisv10) ++ arch=crisv10 ++ ++cat >>confdefs.h <<\_ACEOF ++#define CRISV10 1 ++_ACEOF ++ ++ ;; ++crisv32) ++ arch=crisv32 ++ ++cat >>confdefs.h <<\_ACEOF ++#define CRISV32 1 ++_ACEOF ++ ++ ;; + *) + { echo "$as_me:$LINENO: result: NO!" >&5 + echo "${ECHO_T}NO!" >&6; } +diff -Naur strace-4.5.16.ori/configure.ac strace-4.5.16/configure.ac +--- strace-4.5.16.ori/configure.ac 2008-08-04 20:11:11.000000000 +0200 ++++ strace-4.5.16/configure.ac 2008-08-04 20:50:58.000000000 +0200 +@@ -111,6 +111,14 @@ + AC_MSG_RESULT([NO!]) + AC_MSG_ERROR([architecture $host_cpu is not supported by strace]) + ;; ++cris|crisv10) ++ arch=crisv10 ++ AC_DEFINE([CRISV10], 1, [Define for the CRISv10 architecture.]) ++ ;; ++crisv32) ++ arch=crisv32 ++ AC_DEFINE([CRISV32], 1, [Define for the CRISv32 architecture.]) ++ ;; + esac + AC_MSG_RESULT($arch) + +diff -Naur strace-4.5.16.ori/process.c strace-4.5.16/process.c +--- strace-4.5.16.ori/process.c 2008-08-04 20:11:11.000000000 +0200 ++++ strace-4.5.16/process.c 2008-08-04 21:18:30.000000000 +0200 +@@ -548,7 +548,7 @@ + # define ARG_PTID (known_scno(tcp) == SYS_clone2 ? 3 : 2) + # define ARG_CTID (known_scno(tcp) == SYS_clone2 ? 4 : 3) + # define ARG_TLS (known_scno(tcp) == SYS_clone2 ? 5 : 4) +-# elif defined S390 || defined S390X ++# elif defined S390 || defined S390X || defined CRISV10 || defined CRISV32 + # define ARG_STACK 0 + # define ARG_FLAGS 1 + # define ARG_PTID 2 +@@ -704,6 +704,10 @@ + 0x100000 | new) < 0) + return -1; + return 0; ++#elif defined(CRISV10) || defined(CRISV32) ++ if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*PT_R9), new) < 0) ++ return -1; ++ return 0; + #elif defined(ARM) + /* Some kernels support this, some (pre-2.6.16 or so) don't. */ + # ifndef PTRACE_SET_SYSCALL +@@ -2934,6 +2938,77 @@ + { uoff(regs.r0), "r0" }, + { uoff(regs.r12_orig), "orig_r12" }, + #endif ++#ifdef CRISV10 ++ { 4*PT_FRAMETYPE, "4*PT_FRAMETYPE" }, ++ { 4*PT_ORIG_R10, "4*PT_ORIG_R10" }, ++ { 4*PT_R13, "4*PT_R13" }, ++ { 4*PT_R12, "4*PT_R12" }, ++ { 4*PT_R11, "4*PT_R11" }, ++ { 4*PT_R10, "4*PT_R10" }, ++ { 4*PT_R9, "4*PT_R9" }, ++ { 4*PT_R8, "4*PT_R8" }, ++ { 4*PT_R7, "4*PT_R7" }, ++ { 4*PT_R6, "4*PT_R6" }, ++ { 4*PT_R5, "4*PT_R5" }, ++ { 4*PT_R4, "4*PT_R4" }, ++ { 4*PT_R3, "4*PT_R3" }, ++ { 4*PT_R2, "4*PT_R2" }, ++ { 4*PT_R1, "4*PT_R1" }, ++ { 4*PT_R0, "4*PT_R0" }, ++ { 4*PT_MOF, "4*PT_MOF" }, ++ { 4*PT_DCCR, "4*PT_DCCR" }, ++ { 4*PT_SRP, "4*PT_SRP" }, ++ { 4*PT_IRP, "4*PT_IRP" }, ++ { 4*PT_CSRINSTR, "4*PT_CSRINSTR" }, ++ { 4*PT_CSRADDR, "4*PT_CSRADDR" }, ++ { 4*PT_CSRDATA, "4*PT_CSRDATA" }, ++ { 4*PT_USP, "4*PT_USP" }, ++#endif ++#ifdef CRISV32 ++ { 4*PT_ORIG_R10, "4*PT_ORIG_R10" }, ++ { 4*PT_R0, "4*PT_R0" }, ++ { 4*PT_R1, "4*PT_R1" }, ++ { 4*PT_R2, "4*PT_R2" }, ++ { 4*PT_R3, "4*PT_R3" }, ++ { 4*PT_R4, "4*PT_R4" }, ++ { 4*PT_R5, "4*PT_R5" }, ++ { 4*PT_R6, "4*PT_R6" }, ++ { 4*PT_R7, "4*PT_R7" }, ++ { 4*PT_R8, "4*PT_R8" }, ++ { 4*PT_R9, "4*PT_R9" }, ++ { 4*PT_R10, "4*PT_R10" }, ++ { 4*PT_R11, "4*PT_R11" }, ++ { 4*PT_R12, "4*PT_R12" }, ++ { 4*PT_R13, "4*PT_R13" }, ++ { 4*PT_ACR, "4*PT_ACR" }, ++ { 4*PT_SRS, "4*PT_SRS" }, ++ { 4*PT_MOF, "4*PT_MOF" }, ++ { 4*PT_SPC, "4*PT_SPC" }, ++ { 4*PT_CCS, "4*PT_CCS" }, ++ { 4*PT_SRP, "4*PT_SRP" }, ++ { 4*PT_ERP, "4*PT_ERP" }, ++ { 4*PT_EXS, "4*PT_EXS" }, ++ { 4*PT_EDA, "4*PT_EDA" }, ++ { 4*PT_USP, "4*PT_USP" }, ++ { 4*PT_PPC, "4*PT_PPC" }, ++ { 4*PT_BP_CTRL, "4*PT_BP_CTRL" }, ++ { 4*PT_BP+4, "4*PT_BP+4" }, ++ { 4*PT_BP+8, "4*PT_BP+8" }, ++ { 4*PT_BP+12, "4*PT_BP+12" }, ++ { 4*PT_BP+16, "4*PT_BP+16" }, ++ { 4*PT_BP+20, "4*PT_BP+20" }, ++ { 4*PT_BP+24, "4*PT_BP+24" }, ++ { 4*PT_BP+28, "4*PT_BP+28" }, ++ { 4*PT_BP+32, "4*PT_BP+32" }, ++ { 4*PT_BP+36, "4*PT_BP+36" }, ++ { 4*PT_BP+40, "4*PT_BP+40" }, ++ { 4*PT_BP+44, "4*PT_BP+44" }, ++ { 4*PT_BP+48, "4*PT_BP+48" }, ++ { 4*PT_BP+52, "4*PT_BP+52" }, ++ { 4*PT_BP+56, "4*PT_BP+56" }, ++#endif ++ ++#if !defined(CRISV10) && !defined(CRISV32) + #if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) && !defined(AVR32) + { uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" }, + #endif +@@ -2971,6 +3046,7 @@ + #if defined(I386) || defined(X86_64) + { uoff(u_debugreg), "offsetof(struct user, u_debugreg)" }, + #endif /* I386 */ ++#endif /* !CRISV10/!CRISV32 */ + #endif /* !IA64 */ + #endif /* !ALPHA */ + #endif /* !POWERPC/!SPARC */ +diff -Naur strace-4.5.16.ori/signal.c strace-4.5.16/signal.c +--- strace-4.5.16.ori/signal.c 2007-08-02 03:15:59.000000000 +0200 ++++ strace-4.5.16/signal.c 2008-08-04 20:57:04.000000000 +0200 +@@ -1449,9 +1449,38 @@ + } + return 0; + #else ++#if defined(CRISV10) || defined(CRISV32) ++ struct sigcontext sc; ++ ++ if (entering(tcp)) { ++ long regs[PT_MAX+1]; ++ ++ tcp->u_arg[0] = 0; ++ ++ if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long)regs) < 0) { ++ perror("sigreturn: PTRACE_GETREGS"); ++ return 0; ++ } ++ if (umove(tcp, regs[PT_USP], &sc) < 0) ++ return 0; ++ tcp->u_arg[0] = 1; ++ tcp->u_arg[1] = sc.oldmask; ++ } else { ++ sigset_t sigm; ++ ++ long_to_sigset(tcp->u_arg[1], &sigm); ++ tcp->u_rval = tcp->u_error = 0; ++ if (tcp->u_arg[0] == 0) ++ return 0; ++ tcp->auxstr = sprintsigmask("mask now ", &sigm, 0); ++ return RVAL_NONE | RVAL_STR; ++ } ++ return 0; ++#else + #warning No sys_sigreturn() for this architecture + #warning (no problem, just a reminder :-) + return 0; ++#endif /* !CRISV10/!CRISV32 */ + #endif /* MIPS */ + #endif /* SPARC || SPARC64 */ + #endif /* ALPHA */ +diff -Naur strace-4.5.16.ori/syscall.c strace-4.5.16/syscall.c +--- strace-4.5.16.ori/syscall.c 2008-08-04 20:11:11.000000000 +0200 ++++ strace-4.5.16/syscall.c 2008-08-04 21:02:28.000000000 +0200 +@@ -809,6 +809,8 @@ + static long r9; + #elif defined(X86_64) + static long rax; ++#elif defined(CRISV10) || defined(CRISV32) ++ static long r10; + #elif defined(AVR32) + static struct pt_regs regs; + #endif +@@ -1294,7 +1296,10 @@ + return 0; + } + } +-#endif /* AVR32 */ ++#elif defined(CRISV10) || defined(CRISV32) ++ if (upeek(pid, 4*PT_R9, &scno) < 0) ++ return -1; ++#endif /* CRISV10/CRISV32 */ + #endif /* LINUX */ + #ifdef SUNOS4 + if (upeek(pid, uoff(u_arg[7]), &scno) < 0) +@@ -1489,6 +1494,14 @@ + fprintf(stderr, "stray syscall exit: r8 = %ld\n", r8); + return 0; + } ++#elif defined(CRISV10) || defined(CRISV32) ++ if (upeek(pid, 4*PT_R10, &r10) < 0) ++ return -1; ++ if (r10 != -ENOSYS && !(tcp->flags & TCB_INSYSCALL)) { ++ if (debug) ++ fprintf(stderr, "stray syscall exit: r10 = %ld\n", r10); ++ return 0; ++ } + #endif + #endif /* LINUX */ + return 1; +@@ -1663,6 +1676,17 @@ + tcp->u_rval = regs.r12; + u_error = 0; + } ++#else ++#if defined(CRISV10) || defined(CRISV32) ++ if (r10 && (unsigned) -r10 < nerrnos) { ++ tcp->u_rval = -1; ++ u_error = -r10; ++ } ++ else { ++ tcp->u_rval = r10; ++ u_error = 0; ++ } ++#endif /* CRISV10/CRISV32 */ + #endif /* AVR32 */ + #endif /* SH64 */ + #endif /* SH */ +@@ -2175,6 +2199,23 @@ + tcp->u_arg[3] = regs.r9; + tcp->u_arg[4] = regs.r5; + tcp->u_arg[5] = regs.r3; ++#elif defined(CRISV10) || defined(CRISV32) ++ { ++ int i; ++ static const int crisregs[] = { ++ 4*PT_ORIG_R10, 4*PT_R11, 4*PT_R12, ++ 4*PT_R13, 4*PT_MOF, 4*PT_SRP ++ }; ++ ++ if (tcp->scno >= 0 && tcp->scno < nsyscalls) ++ tcp->u_nargs = sysent[tcp->scno].nargs; ++ else ++ tcp->u_nargs = 0; ++ for (i = 0; i < tcp->u_nargs; i++) { ++ if (upeek(pid, crisregs[i], &tcp->u_arg[i]) < 0) ++ return -1; ++ } ++ } + #else /* Other architecture (like i386) (32bits specific) */ + { + int i; +diff -Naur strace-4.5.16.ori/util.c strace-4.5.16/util.c +--- strace-4.5.16.ori/util.c 2008-08-04 20:11:11.000000000 +0200 ++++ strace-4.5.16/util.c 2008-08-04 21:05:37.000000000 +0200 +@@ -1079,6 +1079,12 @@ + #elif defined(AVR32) + if (upeek(tcp->pid, REG_PC, &pc) < 0) + return -1; ++#elif defined(CRISV10) ++ if (upeek(tcp->pid, 4*PT_IRP, &pc) < 0) ++ return -1; ++#elif defined(CRISV32) ++ if (upeek(tcp->pid, 4*PT_ERP, &pc) < 0) ++ return -1; + #endif + return pc; + #endif /* LINUX */ +@@ -1235,6 +1241,22 @@ + return; + } + tprintf("[%08lx] ", pc); ++#elif defined(CRISV10) ++ long pc; ++ ++ if (upeek(tcp->pid, 4*PT_IRP, &pc) < 0) { ++ PRINTBADPC; ++ return; ++ } ++ tprintf("[%08lx] ", (unsigned long)pc); ++#elif defined(CRISV32) ++ long pc; ++ ++ if (upeek(tcp->pid, 4*PT_ERP, &pc) < 0) { ++ PRINTBADPC; ++ return; ++ } ++ tprintf("[%08lx] ", (unsigned long)pc); + #endif /* !architecture */ + #endif /* LINUX */ + +@@ -1419,6 +1441,13 @@ + # elif defined (AVR32) + # define arg0_offset (REG_R12) + # define arg1_offset (REG_R11) ++# elif defined CRISV10 || defined CRISV32 ++# define arg0_offset (4*PT_R11) ++# define arg1_offset (4*PT_ORIG_R10) ++# define restore_arg0(tcp, state, val) 0 ++# define restore_arg1(tcp, state, val) 0 ++# define arg0_index 1 ++# define arg1_index 0 + # else + # define arg0_offset 0 + # define arg1_offset 4 diff --git a/utils/stress/Makefile b/utils/stress/Makefile new file mode 100644 index 0000000..735b0a1 --- /dev/null +++ b/utils/stress/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=stress +PKG_VERSION:=1.0.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://weather.ou.edu/~apw/projects/stress +PKG_MD5SUM:=a607afa695a511765b40993a64c6e2f4 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/stress + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@!LINUX_2_4 + TITLE:=stress is a simple stress utility + URL:=http://weather.ou.edu/~apw/projects/stress/ +endef + +define Package/stress/description +stress is a simple tool that imposes certain types of compute \ stress on +UNIX-like operating systems. +endef + +CONFIGURE_ARGS += \ + --prefix="/usr" + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS)" + +define Package/stress/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stress $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,stress)) diff --git a/utils/sysstat/Makefile b/utils/sysstat/Makefile new file mode 100644 index 0000000..4be0bb1 --- /dev/null +++ b/utils/sysstat/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sysstat +PKG_VERSION:=9.0.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://pagesperso-orange.fr/sebastien.godard +PKG_MD5SUM:=e069daf192d259de905d7f8cdd85dc4e + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/sysstat + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Sysstat performance monitoring tools + URL:=http://pagesperso-orange.fr/sebastien.godard/index.html +endef + +define Package/sysstat/description + The sysstat utilities are a collection of performance monitoring tools for + Linux. These include sar, sadf, mpstat, iostat, pidstat and sa tools. +endef + +define Package/sysstat/conffiles +/etc/sysstat/sysstat.ioconf +/etc/sysstat/config +endef + +CONFIGURE_VARS+= \ + sa_lib_dir="/usr/lib/sysstat" \ + sa_dir="/var/log/sysstat" \ + conf_dir="/etc/sysstat" \ + +CONFIGURE_ARGS+= \ + --disable-documentation \ + +define Package/sysstat/install + $(INSTALL_DIR) $(1)/usr/lib/sysstat + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/sysstat/{sadc,sa1,sa2} $(1)/usr/lib/sysstat/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sar,sadf,iostat,mpstat,pidstat} $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/sysstat + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sysstat/sysstat.ioconf $(1)/etc/sysstat/ + $(INSTALL_CONF) ./files/config $(1)/etc/sysstat/config + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/sysstat.init $(1)/etc/init.d/sysstat +endef + +$(eval $(call BuildPackage,sysstat)) diff --git a/utils/sysstat/files/config b/utils/sysstat/files/config new file mode 100644 index 0000000..2d2721a --- /dev/null +++ b/utils/sysstat/files/config @@ -0,0 +1,4 @@ +# How long to keep log files (days), maximum is a month +# Used by sa2(8) script +HISTORY=3 + diff --git a/utils/sysstat/files/sysstat.init b/utils/sysstat/files/sysstat.init new file mode 100755 index 0000000..02039d5 --- /dev/null +++ b/utils/sysstat/files/sysstat.init @@ -0,0 +1,12 @@ +#!/bin/sh /etc/rc.common + +# The init file runs the sadc command in order to write +# the "LINUX RESTART" mark to the daily data file + +START=99 + +start() { + mkdir -p /var/log/sysstat + /usr/lib/sysstat/sadc -S DISK -F -L - +} + diff --git a/utils/tar/Makefile b/utils/tar/Makefile new file mode 100644 index 0000000..cae11d9 --- /dev/null +++ b/utils/tar/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tar +PKG_VERSION:=1.23 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNU/$(PKG_NAME) +PKG_MD5SUM:=41e2ca4b924ec7860e51b43ad06cdb7e + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/tar + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+bzip2 + TITLE:=GNU tar + URL:=http://www.gnu.org/software/tar/ +endef + +define Package/tar/description + Tar is a program for packaging a set of files as a + single archive in tar format. +endef + +define Package/tar/postinst +#!/bin/sh +if [ -e $${IPKG_INSTROOT}/bin/tar ]; then + rm -r $${IPKG_INSTROOT}/bin/tar; +fi +ln -sf $${IPKG_INSTROOT}/usr/bin/tar $${IPKG_INSTROOT}/bin/tar +endef + +define Package/tar/postrm +#!/bin/sh +rm $${IPKG_INSTROOT}/bin/tar +ln -s busybox $${IPKG_INSTROOT}/bin/tar +$${IPKG_INSTROOT}/bin/tar 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/tar +exit 0 +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDLAGS)" + +define Package/tar/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,tar)) diff --git a/utils/tcpser/Makefile b/utils/tcpser/Makefile new file mode 100644 index 0000000..8806c11 --- /dev/null +++ b/utils/tcpser/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2009 Marek Drapal +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tcpser +PKG_VERSION:=1.0rc12 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.jbrain.com/pub/linux/serial/ +PKG_MD5SUM:=e712ae9fe6893bc825026b6dee6da9c0 + + +include $(INCLUDE_DIR)/package.mk + +define Package/tcpser + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Hayes compatible modem emulator + URL:=http://www.jbrain.com/pub/linux/serial/ + DEPENDS:=libpthread +endef + +define Package/tcpser/description + TCPSER turns a PC serial port into an emulated Hayes compatible modem + that uses TCP/IP for incoming and outgoing connections. It can be used + to allow older applications and systems designed for modem use + to operate on the Internet. TCPSER supports all standard Hayes commands, + and understands extended and vendor proprietary commands (though it does + not implement many of them). TCPSER can be used for both inbound and + outbound connections. +endef + +define Build/Prepare + $(call Build/Prepare/Default) + $(CP) $(PKG_BUILD_DIR)/../$(PKG_NAME)/* $(PKG_BUILD_DIR)/ +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -I$(LINUX_DIR)/include" +endef + +define Package/tcpser/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tcpser $(1)/usr/bin/ +endef + + +$(eval $(call BuildPackage,tcpser)) diff --git a/utils/tcsh/Makefile b/utils/tcsh/Makefile new file mode 100644 index 0000000..b1b431f --- /dev/null +++ b/utils/tcsh/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2011 Nuno Goncalves +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tcsh +PKG_VERSION:=6.17.00 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=ftp://ftp.astron.com/pub/tcsh/ +PKG_MD5SUM:=c47de903e3d52f6824c8dd0c91eeb477 + +include $(INCLUDE_DIR)/package.mk + +define Package/tcsh + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Enhanced Berkeley UNIX C shell + DEPENDS:=+libncurses + URL:=http://www.tcsh.org/ + MAINTAINER:=Nuno Goncalves +endef + +define Package/tcsh/description + Tcsh is an enhanced, but completely compatible + version of the Berkeley UNIX C shell (csh). It + is a command language interpreter usable both + as an interactive login shell and a shell + script command processor. It includes a + command-line editor, programmable word + completion, spelling correction, a history + mechanism, job control and a C-like syntax. +endef + +define Package/tcsh/postinst +#!/bin/sh +grep tcsh $${IPKG_INSTROOT}/etc/shells || \ + echo "/bin/tcsh" >> $${IPKG_INSTROOT}/etc/shells + echo "/bin/csh" >> $${IPKG_INSTROOT}/etc/shells +endef + +define Package/tcsh/install + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tcsh $(1)/bin/ + ln -sf tcsh $(1)/bin/csh +endef + +$(eval $(call BuildPackage,tcsh)) diff --git a/utils/tcsh/patches/001-gethost b/utils/tcsh/patches/001-gethost new file mode 100644 index 0000000..62342e2 --- /dev/null +++ b/utils/tcsh/patches/001-gethost @@ -0,0 +1,11 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -365,7 +365,7 @@ + + gethost: gethost.c sh.err.h tc.const.h sh.h + rm -f gethost +- ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} $(srcdir)/gethost.c ${LIBES} ${EXTRALIBS} ++ gcc -o gethost -g -O2 -I. -I. -D_PATH_TCSHELL='"/usr/local/bin/tcsh"' $(srcdir)/gethost.c ${LIBES} ${EXTRALIBS} + + tc.defs.c: gethost host.defs + @rm -f $@.tmp diff --git a/utils/tcsh/patches/002-NLS b/utils/tcsh/patches/002-NLS new file mode 100644 index 0000000..9c52afd --- /dev/null +++ b/utils/tcsh/patches/002-NLS @@ -0,0 +1,9 @@ +--- a/config/linux ++++ b/config/linux +@@ -106,6 +106,4 @@ + #endif + #define ECHO_STYLE BOTH_ECHO + +-#define NLS_CATALOGS +- + #endif /* _h_config */ diff --git a/utils/testusb/Makefile b/utils/testusb/Makefile new file mode 100644 index 0000000..0276a3d --- /dev/null +++ b/utils/testusb/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=testusb +PKG_RELEASE:=1 + +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) +PKG_BUILD_DEPENDS := libpthread + +include $(INCLUDE_DIR)/package.mk + +define Package/testusb + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@!LINUX_2_4 @DEVEL +libpthread + TITLE:=USB testing utility + URL:=http://www.linux-usb.org/usbtest/testusb.c +endef + +define Package/testusb/description + This tool can be used to perform various tests with use of the usbtest driver. +endef + +define Build/Prepare + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -Os -lpthread $(PKG_BUILD_DIR)/testusb.c -o $(PKG_BUILD_DIR)/$(PKG_NAME) +endef + +define Package/testusb/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/testusb $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,testusb)) diff --git a/utils/testusb/src/testusb.c b/utils/testusb/src/testusb.c new file mode 100644 index 0000000..28e25ca --- /dev/null +++ b/utils/testusb/src/testusb.c @@ -0,0 +1,427 @@ +/* $(CROSS_COMPILE)cc -Wall -g -lpthread -o testusb testusb.c */ + +/* + * Copyright (c) 2002 by David Brownell + * + * 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 +#include + +#include +#include +#include + +#include +#include + +/*-------------------------------------------------------------------------*/ + +#define TEST_CASES 30 + +// FIXME make these public somewhere; usbdevfs.h? + +struct usbtest_param { + // inputs + unsigned test_num; /* 0..(TEST_CASES-1) */ + unsigned iterations; + unsigned length; + unsigned vary; + unsigned sglen; + + // outputs + struct timeval duration; +}; +#define USBTEST_REQUEST _IOWR('U', 100, struct usbtest_param) + +/*-------------------------------------------------------------------------*/ + +/* #include */ + +struct usb_device_descriptor { + __u8 bLength; + __u8 bDescriptorType; + __u16 bcdUSB; + __u8 bDeviceClass; + __u8 bDeviceSubClass; + __u8 bDeviceProtocol; + __u8 bMaxPacketSize0; + __u16 idVendor; + __u16 idProduct; + __u16 bcdDevice; + __u8 iManufacturer; + __u8 iProduct; + __u8 iSerialNumber; + __u8 bNumConfigurations; +} __attribute__ ((packed)); + +enum usb_device_speed { + USB_SPEED_UNKNOWN = 0, /* enumerating */ + USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */ + USB_SPEED_HIGH /* usb 2.0 */ +}; + +/*-------------------------------------------------------------------------*/ + +static char *speed (enum usb_device_speed s) +{ + switch (s) { + case USB_SPEED_UNKNOWN: return "unknown"; + case USB_SPEED_LOW: return "low"; + case USB_SPEED_FULL: return "full"; + case USB_SPEED_HIGH: return "high"; + default: return "??"; + } +} + +struct testdev { + struct testdev *next; + char *name; + pthread_t thread; + enum usb_device_speed speed; + unsigned ifnum : 8; + unsigned forever : 1; + int test; + + struct usbtest_param param; +}; +static struct testdev *testdevs; + +static int is_testdev (struct usb_device_descriptor *dev) +{ + /* FX2 with (tweaked) bulksrc firmware */ + if (dev->idVendor == 0x0547 && dev->idProduct == 0x1002) + return 1; + + /*----------------------------------------------------*/ + + /* devices that start up using the EZ-USB default device and + * which we can use after loading simple firmware. hotplug + * can fxload it, and then run this test driver. + * + * we return false positives in two cases: + * - the device has a "real" driver (maybe usb-serial) that + * renumerates. the device should vanish quickly. + * - the device doesn't have the test firmware installed. + */ + + /* generic EZ-USB FX controller */ + if (dev->idVendor == 0x0547 && dev->idProduct == 0x2235) + return 1; + + /* generic EZ-USB FX2 controller */ + if (dev->idVendor == 0x04b4 && dev->idProduct == 0x8613) + return 1; + + /* CY3671 development board with EZ-USB FX */ + if (dev->idVendor == 0x0547 && dev->idProduct == 0x0080) + return 1; + + /* Keyspan 19Qi uses an21xx (original EZ-USB) */ + if (dev->idVendor == 0x06cd && dev->idProduct == 0x010b) + return 1; + + /*----------------------------------------------------*/ + + /* "gadget zero", Linux-USB test software */ + if (dev->idVendor == 0x0525 && dev->idProduct == 0xa4a0) + return 1; + + /* user mode subset of that */ + if (dev->idVendor == 0x0525 && dev->idProduct == 0xa4a4) + return 1; + + /* iso version of usermode code */ + if (dev->idVendor == 0x0525 && dev->idProduct == 0xa4a3) + return 1; + + /* some GPL'd test firmware uses these IDs */ + + if (dev->idVendor == 0xfff0 && dev->idProduct == 0xfff0) + return 1; + + /*----------------------------------------------------*/ + + /* iBOT2 high speed webcam */ + if (dev->idVendor == 0x0b62 && dev->idProduct == 0x0059) + return 1; + + return 0; +} + +static int find_testdev (const char *name, const struct stat *sb, int flag) +{ + int fd; + struct usb_device_descriptor dev; + + if (flag != FTW_F) + return 0; + /* ignore /proc/bus/usb/{devices,drivers} */ + if (strrchr (name, '/')[1] == 'd') + return 0; + + if ((fd = open (name, O_RDONLY)) < 0) { + perror ("can't open dev file r/o"); + return 0; + } + if (read (fd, &dev, sizeof dev) != sizeof dev) + fputs ("short devfile read!\n", stderr); + else if (is_testdev (&dev)) { + struct testdev *entry; + + if ((entry = calloc (1, sizeof *entry)) == 0) { + fputs ("no mem!\n", stderr); + goto done; + } + entry->name = strdup (name); + if (!entry->name) { + free (entry); + goto done; + } + + // FIXME better to look at each interface and ask if it's + // bound to 'usbtest', rather than assume interface 0 + entry->ifnum = 0; + + // FIXME ask usbfs what speed; update USBDEVFS_CONNECTINFO + // so it tells about high speed etc + + fprintf (stderr, "%s speed\t%s\n", + speed (entry->speed), entry->name); + + entry->next = testdevs; + testdevs = entry; + } + +done: + close (fd); + return 0; +} + +static int +usbdev_ioctl (int fd, int ifno, unsigned request, void *param) +{ + struct usbdevfs_ioctl wrapper; + + wrapper.ifno = ifno; + wrapper.ioctl_code = request; + wrapper.data = param; + + return ioctl (fd, USBDEVFS_IOCTL, &wrapper); +} + +static void *handle_testdev (void *arg) +{ + struct testdev *dev = arg; + int fd, i; + int status; + + if ((fd = open (dev->name, O_RDWR)) < 0) { + perror ("can't open dev file r/w"); + return 0; + } + +restart: + for (i = 0; i < TEST_CASES; i++) { + if (dev->test != -1 && dev->test != i) + continue; + dev->param.test_num = i; + + status = usbdev_ioctl (fd, dev->ifnum, + USBTEST_REQUEST, &dev->param); + if (status < 0 && errno == EOPNOTSUPP) + continue; + + /* FIXME need a "syslog it" option for background testing */ + + /* NOTE: each thread emits complete lines; no fragments! */ + if (status < 0) { + char buf [80]; + int err = errno; + + if (strerror_r (errno, buf, sizeof buf)) { + snprintf (buf, sizeof buf, "error %d", err); + errno = err; + } + printf ("%s test %d --> %d (%s)\n", + dev->name, i, errno, buf); + } else + printf ("%s test %d, %4d.%.06d secs\n", dev->name, i, + (int) dev->param.duration.tv_sec, + (int) dev->param.duration.tv_usec); + + fflush (stdout); + } + if (dev->forever) + goto restart; + + close (fd); + return arg; +} + +int main (int argc, char **argv) +{ + int c; + struct testdev *entry; + char *device; + int all = 0, forever = 0, not = 0; + int test = -1 /* all */; + struct usbtest_param param; + + /* pick defaults that works with all speeds, without short packets. + * + * Best per-frame data rates: + * high speed, bulk 512 * 13 * 8 = 53248 + * interrupt 1024 * 3 * 8 = 24576 + * full speed, bulk/intr 64 * 19 = 1216 + * interrupt 64 * 1 = 64 + * low speed, interrupt 8 * 1 = 8 + */ + param.iterations = 1000; + param.length = 512; + param.vary = 512; + param.sglen = 32; + + /* for easy use when hotplugging */ + device = getenv ("DEVICE"); + + while ((c = getopt (argc, argv, "D:ac:g:hns:t:v:")) != EOF) + switch (c) { + case 'D': /* device, if only one */ + device = optarg; + continue; + case 'a': /* use all devices */ + device = 0; + all = 1; + continue; + case 'c': /* count iterations */ + param.iterations = atoi (optarg); + if (param.iterations < 0) + goto usage; + continue; + case 'g': /* scatter/gather entries */ + param.sglen = atoi (optarg); + if (param.sglen < 0) + goto usage; + continue; + case 'l': /* loop forever */ + forever = 1; + continue; + case 'n': /* no test running! */ + not = 1; + continue; + case 's': /* size of packet */ + param.length = atoi (optarg); + if (param.length < 0) + goto usage; + continue; + case 't': /* run just one test */ + test = atoi (optarg); + if (test < 0) + goto usage; + continue; + case 'v': /* vary packet size by ... */ + param.vary = atoi (optarg); + if (param.vary < 0) + goto usage; + continue; + case '?': + case 'h': + default: +usage: + fprintf (stderr, "usage: %s [-an] [-D dev]\n" + "\t[-c iterations] [-t testnum]\n" + "\t[-s packetsize] [-g sglen] [-v vary]\n", + argv [0]); + return 1; + } + if (optind != argc) + goto usage; + if (!all && !device) { + fprintf (stderr, "must specify '-a' or '-D dev', " + "or DEVICE=/proc/bus/usb/BBB/DDD in env\n"); + goto usage; + } + + if ((c = open ("/proc/bus/usb/devices", O_RDONLY)) < 0) { + fputs ("usbfs files are missing\n", stderr); + return -1; + } + + /* collect and list the test devices */ + if (ftw ("/proc/bus/usb", find_testdev, 3) != 0) { + fputs ("ftw failed; is usbfs missing?\n", stderr); + return -1; + } + + /* quit, run single test, or create test threads */ + if (!testdevs && !device) { + fputs ("no test devices recognized\n", stderr); + return -1; + } + if (not) + return 0; + if (testdevs && testdevs->next == 0 && !device) + device = testdevs->name; + for (entry = testdevs; entry; entry = entry->next) { + int status; + + entry->param = param; + entry->forever = forever; + entry->test = test; + + if (device) { + if (strcmp (entry->name, device)) + continue; + return handle_testdev (entry) != entry; + } + status = pthread_create (&entry->thread, 0, handle_testdev, entry); + if (status) { + perror ("pthread_create"); + continue; + } + } + if (device) { + struct testdev dev; + + /* kernel can recognize test devices we don't */ + fprintf (stderr, "%s: %s may see only control tests\n", + argv [0], device); + + memset (&dev, 0, sizeof dev); + dev.name = device; + dev.param = param; + dev.forever = forever; + dev.test = test; + return handle_testdev (&dev) != &dev; + } + + /* wait for tests to complete */ + for (entry = testdevs; entry; entry = entry->next) { + void *retval; + + if (pthread_join (entry->thread, &retval)) + perror ("pthread_join"); + /* testing errors discarded! */ + } + + return 0; +} diff --git a/utils/tmux/Makefile b/utils/tmux/Makefile new file mode 100644 index 0000000..eaa45bb --- /dev/null +++ b/utils/tmux/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2009-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tmux +PKG_VERSION:=1.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/tmux +PKG_MD5SUM:=0bfc7dd9a5bab192406167589c716a21 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/tmux + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Terminal multiplexer + DEPENDS:=+libncurses +libevent +libpthread + URL:=http://tmux.sourceforge.net/ +endef + +define Package/tmux/description + tmux is a modern, BSD-licensed alternative to GNU screen. +endef + +MAKE_FLAGS += \ + PREFIX="/usr" \ + TMUX_PLATFORM="Linux" \ + +define Package/tmux/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tmux $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,tmux)) diff --git a/utils/triggerhappy/Makefile b/utils/triggerhappy/Makefile new file mode 100644 index 0000000..aa3ea19 --- /dev/null +++ b/utils/triggerhappy/Makefile @@ -0,0 +1,52 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=triggerhappy +PKG_VERSION:=0.3.4 +PKG_REV:=cb3ed9ba849ff5926fa47fd1ae042fa0083edaf5 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=git://github.com/wertarbyte/triggerhappy +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) + +include $(INCLUDE_DIR)/package.mk + +define Package/triggerhappy + SECTION:=utils + CATEGORY:=Utilities + TITLE:=handle input events and run configured programs + URL:=http://github.com/wertarbyte/triggerhappy +endef + +define Package/triggerhappy/description + triggerhappy - handle input events and run configured programs + The daemon thd can handle hotplugged input devices and is configured through + simple configuration files in /etc/triggerhappy/triggers.d/. +endef + +MAKE_FLAGS += \ + $(TARGET_CONFIGURE_OPTS) \ + $(1) + +define Package/triggerhappy/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_DIR) $(1)/etc/triggerhappy + $(INSTALL_DIR) $(1)/etc/triggerhappy/triggers.d/ + $(INSTALL_DIR) $(1)/etc/hotplug.d/input/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/thd $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/th-cmd $(1)/usr/sbin + $(INSTALL_BIN) ./files/triggerhappy.init $(1)/etc/init.d/triggerhappy + $(INSTALL_BIN) ./files/triggerhappy.hotplug $(1)/etc/hotplug.d/input/10-triggerhappy + $(INSTALL_BIN) ./files/triggerhappy-example.conf $(1)/etc/triggerhappy/triggers.d/example.conf +endef + +$(eval $(call BuildPackage,triggerhappy)) diff --git a/utils/triggerhappy/files/triggerhappy-example.conf b/utils/triggerhappy/files/triggerhappy-example.conf new file mode 100644 index 0000000..3a8017a --- /dev/null +++ b/utils/triggerhappy/files/triggerhappy-example.conf @@ -0,0 +1,14 @@ +# This is an example configuration for the triggerhappy daemon (thd) +# please note that every file to be processed must end in ".conf" +# +# To view a list of supported event codes, use "thd --listevents" or +# "thd --dump /dev/input/event*" +# +# Format: +# +# +# values for key events are 1 (pressed), 0 (released) or 2 (held) +# +## control an mpd instance +# KEY_NEXTSONG 1 /usr/bin/mpc next +# KEY_PREVSONG 1 /usr/bin/mpc prev diff --git a/utils/triggerhappy/files/triggerhappy.hotplug b/utils/triggerhappy/files/triggerhappy.hotplug new file mode 100644 index 0000000..78ad349 --- /dev/null +++ b/utils/triggerhappy/files/triggerhappy.hotplug @@ -0,0 +1,15 @@ +#!/bin/sh +THD_SOCKET=/tmp/triggerhappy.socket +[ -S "$THD_SOCKET" ] || exit + +case "$ACTION" in + add) + DEVICE="/dev/$DEVNAME" + [ -c "$DEVICE" ] || exit + # offer device to triggerhappy daemon + /usr/sbin/th-cmd --socket "$THD_SOCKET" --add "$DEVICE" + ;; + remove) + # nothing to do + ;; +esac diff --git a/utils/triggerhappy/files/triggerhappy.init b/utils/triggerhappy/files/triggerhappy.init new file mode 100644 index 0000000..e846d29 --- /dev/null +++ b/utils/triggerhappy/files/triggerhappy.init @@ -0,0 +1,10 @@ +#!/bin/sh /etc/rc.common +START=93 + +start() { + /usr/sbin/thd --socket /tmp/triggerhappy.socket --triggers /etc/triggerhappy/triggers.d/ --daemon /dev/input/event* +} + +stop() { + /usr/sbin/th-cmd --socket /tmp/triggerhappy.socket --quit +} diff --git a/utils/triggerhappy/patches/100-fix-LINUX_INPUT_H.patch b/utils/triggerhappy/patches/100-fix-LINUX_INPUT_H.patch new file mode 100644 index 0000000..13ecd8c --- /dev/null +++ b/utils/triggerhappy/patches/100-fix-LINUX_INPUT_H.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -10,7 +10,7 @@ THCMD_COMPS := th-cmd cmdsocket + + MAKEDEPEND = $(CC) -M -MG $(CPPFLAGS) -o $*.d $< + +-LINUX_INPUT_H := $(shell echo '\#include ' | $(CC) $(CPPFLAGS) -M -E - | awk 'NR==1 {print $$2}') ++LINUX_INPUT_H := $(shell for i in `echo | $(CC) $(CPPFLAGS) -M -E -include 'linux/input.h' -`; do test -f "$$i" && echo "$$i" && break; done) + + all: thd th-cmd man + diff --git a/utils/ucmb-tools/Makefile b/utils/ucmb-tools/Makefile new file mode 100644 index 0000000..0204d8f --- /dev/null +++ b/utils/ucmb-tools/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ucmb-tools +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + + +define Package/ucmb-tools + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Microcontroller Message Bus tools + DEPENDS:=+kmod-ucmb + MAINTAINER:=Michael Buesch +endef + +define Package/ucmb-tools/description + Debugging tool for UCMB +endef + +define Build/Prepare + $(CP) ./tools/* $(PKG_BUILD_DIR)/ +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -I$(LINUX_DIR)/include" +endef + +define Package/ucmb-tools/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ucmb $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,ucmb-tools)) diff --git a/utils/ucmb-tools/tools/Makefile b/utils/ucmb-tools/tools/Makefile new file mode 100644 index 0000000..406c310 --- /dev/null +++ b/utils/ucmb-tools/tools/Makefile @@ -0,0 +1,17 @@ +INSTDIR = $(prefix)/usr/bin + +all: ucmb + +ucmb: ucmb.o + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@ + $(STRIP) $@ + +%.o: %.c + $(CC) -c $(CFLAGS) $^ -o $@ + +install: ucmb + $(INSTALL) -d $(INSTDIR) + $(INSTALL) -m 0755 -o 0 -g 0 ucmb $(INSTDIR) + +clean: + rm -f ucmb *.o diff --git a/utils/ucmb-tools/tools/ucmb.c b/utils/ucmb-tools/tools/ucmb.c new file mode 100644 index 0000000..20cd1bf --- /dev/null +++ b/utils/ucmb-tools/tools/ucmb.c @@ -0,0 +1,120 @@ +/* + * Microcontroller Message Bus + * Userspace commandline utility + * + * Copyright (c) 2009 Michael Buesch + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + + +#define UCMB_DEV "/dev/ucmb" + +#define __UCMB_IOCTL ('U'|'C'|'M'|'B') +#define UCMB_IOCTL_RESETUC _IO(__UCMB_IOCTL, 0) +#define UCMB_IOCTL_GMSGDELAY _IOR(__UCMB_IOCTL, 1, unsigned int) +#define UCMB_IOCTL_SMSGDELAY _IOW(__UCMB_IOCTL, 2, unsigned int) + + +static void usage(int argc, char **argv) +{ + fprintf(stderr, "Usage: %s read|write|reset [" UCMB_DEV "]\n", argv[0]); +} + +int main(int argc, char **argv) +{ + const char *command, *devpath = UCMB_DEV; + int res, errcode = 0; + int ucmb_fd; + char *buf; + size_t count, buflen; + ssize_t nrbytes; + + if (argc != 2 && argc != 3) { + usage(argc, argv); + return 1; + } + if (argc == 3) + devpath = argv[2]; + command = argv[1]; + + ucmb_fd = open(devpath, O_RDWR); + if (ucmb_fd == -1) { + fprintf(stderr, "Failed to open %s\n", UCMB_DEV); + errcode = 1; + goto out; + } + + buflen = 4096; + buf = malloc(buflen); + if (!buf) { + fprintf(stderr, "Out of memory\n"); + errcode = 1; + goto out_close; + } + + if (strcasecmp(command, "read") == 0) { + nrbytes = read(ucmb_fd, buf, buflen); + if (nrbytes < 0) { + fprintf(stderr, "Failed to read UCMB: %s (%d)\n", + strerror(errno), errno); + errcode = 1; + goto out_free; + } + if (fwrite(buf, nrbytes, 1, stdout) != 1) { + fprintf(stderr, "Failed to write stdout\n"); + errcode = 1; + goto out_free; + } + } else if (strcasecmp(command, "write") == 0) { + count = fread(buf, 1, buflen, stdin); + if (!count) { + fprintf(stderr, "Failed to read stdin\n"); + errcode = 1; + goto out_free; + } + nrbytes = write(ucmb_fd, buf, count); + if (nrbytes != count) { + fprintf(stderr, "Failed to write UCMB: %s (%d)\n", + strerror(errno), errno); + errcode = 1; + goto out_free; + } + } else if (strcasecmp(command, "reset") == 0) { + res = ioctl(ucmb_fd, UCMB_IOCTL_RESETUC); + if (res) { + fprintf(stderr, "RESET ioctl failed: %s (%d)\n", + strerror(res < 0 ? -res : res), res); + errcode = 1; + goto out_free; + } + } else { + usage(argc, argv); + errcode = 1; + goto out_free; + } + +out_free: + free(buf); +out_close: + close(ucmb_fd); +out: + return errcode; +} diff --git a/utils/ucmb/Makefile b/utils/ucmb/Makefile new file mode 100644 index 0000000..09fc28e --- /dev/null +++ b/utils/ucmb/Makefile @@ -0,0 +1,65 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=ucmb +PKG_RELEASE:=2 + +include $(INCLUDE_DIR)/package.mk + + +define KernelPackage/ucmb + SUBMENU:=Other modules + DEPENDS:=@!LINUX_2_4 \ + @!LINUX_2_6_21 @!LINUX_2_6_22 @!LINUX_2_6_23 @!LINUX_2_6_24 \ + @!LINUX_2_6_25 @!LINUX_2_6_26 @!LINUX_2_6_27 \ + +kmod-spi-gpio +kmod-crc16 + KCONFIG:=CONFIG_SPI=y \ + CONFIG_SPI_MASTER=y + TITLE:=Microcontroller Message Bus + FILES:=$(PKG_BUILD_DIR)/ucmb.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,93,ucmb) + MAINTAINER:=Michael Buesch +endef + +define KernelPackage/ucmb/description + The Microcontroller Message Bus is a tiny SPI-GPIO based communication + channel used to talk to microcontrollers over GPIO pins. + The lowlevel protocol is CRC16 protected, so one can be pretty sure + that the data transmitted and received through the /dev/ucmb node is not corrupted. + So no further checks should be needed at upper protocol layers. + The device node considers every read/write to be one packet. The maximum packet + size is either PAGE_SIZE (at least 4kb) or the microcontroller specific packet size + limit, which is likely to be a lot smaller than PAGE_SIZE. + To register an ucmb device, simply create a struct ucmb_platform_data + and register it via ucmb_device_register() from another kernel module. + Example implementations for the microcontroller-side code can be found in + the utils/ucmb/microcontroller_examples subdirectory of the OpenWRT packages feed. +endef + +define Build/Prepare + $(CP) ./driver/* $(PKG_BUILD_DIR)/ +endef + +define Build/Compile + $(MAKE) -C "$(LINUX_DIR)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH="$(LINUX_KARCH)" \ + SUBDIRS="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(BUILDFLAGS)" \ + modules +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) \ + $(PKG_BUILD_DIR)/ucmb.h \ + $(1)/usr/include +endef + +$(eval $(call KernelPackage,ucmb)) diff --git a/utils/ucmb/driver/Makefile b/utils/ucmb/driver/Makefile new file mode 100644 index 0000000..a232a4a --- /dev/null +++ b/utils/ucmb/driver/Makefile @@ -0,0 +1 @@ +obj-m := ucmb.o diff --git a/utils/ucmb/driver/ucmb.c b/utils/ucmb/driver/ucmb.c new file mode 100644 index 0000000..bf4cd9b --- /dev/null +++ b/utils/ucmb/driver/ucmb.c @@ -0,0 +1,656 @@ +/* + * Microcontroller Message Bus + * Linux kernel driver + * + * Copyright (c) 2009-2010 Michael Buesch + * + * 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. + */ + +#include "ucmb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +#define PFX "ucmb: " + +#undef DEBUG + + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Microcontroller Message Bus"); +MODULE_AUTHOR("Michael Buesch"); + + +struct ucmb { + struct mutex mutex; + + bool is_open; + + unsigned int chunk_size; + unsigned int msg_delay_usec; + unsigned int gpio_reset; + bool reset_activelow; + + /* Misc character device driver */ + struct miscdevice mdev; + struct file_operations mdev_fops; + + /* SPI driver */ + struct spi_device *sdev; + + /* SPI-GPIO driver */ + struct spi_gpio_platform_data spi_gpio_pdata; + struct platform_device spi_gpio_pdev; +}; + +#define UCMB_MAX_MSG_DELAY (10 * 1000 * 1000) /* 10 seconds */ + + +struct ucmb_message_hdr { + __le16 magic; /* UCMB_MAGIC */ + __le16 len; /* Payload length (excluding header and footer) */ +} __attribute__((packed)); + +struct ucmb_message_footer { + __le16 crc; /* CRC of the header + payload. */ +} __attribute__((packed)); + +struct ucmb_status { + __le16 magic; /* UCMB_MAGIC */ + __le16 code; /* enum ucmb_status_code */ +} __attribute__((packed)); + +#define UCMB_MAGIC 0x1337 + +enum ucmb_status_code { + UCMB_STAT_OK = 0, + UCMB_STAT_EPROTO, /* Protocol format error */ + UCMB_STAT_ENOMEM, /* Out of memory */ + UCMB_STAT_E2BIG, /* Message too big */ + UCMB_STAT_ECRC, /* CRC error */ +}; + + +static int ucmb_spi_busnum_count = 1337; +static int ucmb_pdev_id_count; + + +static int __devinit ucmb_spi_probe(struct spi_device *sdev) +{ + return 0; +} + +static int __devexit ucmb_spi_remove(struct spi_device *sdev) +{ + return 0; +} + +static struct spi_driver ucmb_spi_driver = { + .driver = { + .name = "ucmb", + .bus = &spi_bus_type, + .owner = THIS_MODULE, + }, + .probe = ucmb_spi_probe, + .remove = __devexit_p(ucmb_spi_remove), +}; + +static void ucmb_toggle_reset_line(struct ucmb *ucmb, bool active) +{ + if (ucmb->reset_activelow) + active = !active; + gpio_set_value(ucmb->gpio_reset, active); +} + +static int ucmb_reset_microcontroller(struct ucmb *ucmb) +{ + if (ucmb->gpio_reset == UCMB_NO_RESET) + return -ENODEV; + + ucmb_toggle_reset_line(ucmb, 1); + msleep(50); + ucmb_toggle_reset_line(ucmb, 0); + msleep(50); + + return 0; +} + +static int ucmb_status_code_to_errno(enum ucmb_status_code code) +{ + switch (code) { + case UCMB_STAT_OK: + return 0; + case UCMB_STAT_EPROTO: + return -EPROTO; + case UCMB_STAT_ENOMEM: + return -ENOMEM; + case UCMB_STAT_E2BIG: + return -E2BIG; + case UCMB_STAT_ECRC: + return -EBADMSG; + } + return -EBUSY; +} + +static inline struct ucmb * filp_to_ucmb(struct file *filp) +{ + return container_of(filp->f_op, struct ucmb, mdev_fops); +} + +static int ucmb_open(struct inode *inode, struct file *filp) +{ + struct ucmb *ucmb = filp_to_ucmb(filp); + int err = 0; + + mutex_lock(&ucmb->mutex); + + if (ucmb->is_open) { + err = -EBUSY; + goto out_unlock; + } + ucmb->is_open = 1; + ucmb->msg_delay_usec = 0; + +out_unlock: + mutex_unlock(&ucmb->mutex); + + return err; +} + +static int ucmb_release(struct inode *inode, struct file *filp) +{ + struct ucmb *ucmb = filp_to_ucmb(filp); + + mutex_lock(&ucmb->mutex); + WARN_ON(!ucmb->is_open); + ucmb->is_open = 0; + mutex_unlock(&ucmb->mutex); + + return 0; +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) +static long ucmb_ioctl(struct file *filp, + unsigned int cmd, unsigned long arg) +#else +static int ucmb_ioctl(struct inode *inode, struct file *filp, + unsigned int cmd, unsigned long arg) +#endif +{ + struct ucmb *ucmb = filp_to_ucmb(filp); + int ret = 0; + + mutex_lock(&ucmb->mutex); + switch (cmd) { + case UCMB_IOCTL_RESETUC: + ret = ucmb_reset_microcontroller(ucmb); + break; + case UCMB_IOCTL_GMSGDELAY: + if (put_user(ucmb->msg_delay_usec, (unsigned int __user *)arg)) { + ret = -EFAULT; + break; + } + break; + case UCMB_IOCTL_SMSGDELAY: { + unsigned int msg_delay_usec; + + if (get_user(msg_delay_usec, (unsigned int __user *)arg)) { + ret = -EFAULT; + break; + } + if (msg_delay_usec > UCMB_MAX_MSG_DELAY) { + ret = -E2BIG; + break; + } + ucmb->msg_delay_usec = msg_delay_usec; + break; + } + default: + ret = -EINVAL; + } + mutex_unlock(&ucmb->mutex); + + return ret; +} + +static int ucmb_spi_write(struct ucmb *ucmb, const void *_buf, size_t size) +{ + const u8 *buf = _buf; + size_t i, chunk_size, current_size; + int err = 0; + + chunk_size = ucmb->chunk_size ? : size; + for (i = 0; i < size; i += chunk_size) { + current_size = chunk_size; + if (i + current_size > size) + current_size = size - i; + err = spi_write(ucmb->sdev, buf + i, current_size); + if (err) + goto out; + if (ucmb->chunk_size && need_resched()) + msleep(1); + } +out: + return err; +} + +static int ucmb_spi_read(struct ucmb *ucmb, void *_buf, size_t size) +{ + u8 *buf = _buf; + size_t i, chunk_size, current_size; + int err = 0; + + chunk_size = ucmb->chunk_size ? : size; + for (i = 0; i < size; i += chunk_size) { + current_size = chunk_size; + if (i + current_size > size) + current_size = size - i; + err = spi_read(ucmb->sdev, buf + i, current_size); + if (err) + goto out; + if (ucmb->chunk_size && need_resched()) + msleep(1); + } +out: + return err; +} + +static ssize_t ucmb_read(struct file *filp, char __user *user_buf, + size_t size, loff_t *offp) +{ + struct ucmb *ucmb = filp_to_ucmb(filp); + u8 *buf; + int res, err; + struct ucmb_message_hdr hdr; + struct ucmb_message_footer footer; + struct ucmb_status status = { .magic = cpu_to_le16(UCMB_MAGIC), }; + u16 crc = 0xFFFF; + + mutex_lock(&ucmb->mutex); + + size = min_t(size_t, size, PAGE_SIZE); + + err = -ENOMEM; + buf = (char *)__get_free_page(GFP_KERNEL); + if (!buf) + goto out; + + err = ucmb_spi_read(ucmb, &hdr, sizeof(hdr)); + if (err) + goto out_free; +#ifdef DEBUG + printk(KERN_DEBUG PFX "Received message header 0x%04X 0x%04X\n", + le16_to_cpu(hdr.magic), le16_to_cpu(hdr.len)); +#endif + err = -EPROTO; + if (hdr.magic != cpu_to_le16(UCMB_MAGIC)) + goto out_free; + err = -ENOBUFS; + if (size < le16_to_cpu(hdr.len)) + goto out_free; + size = le16_to_cpu(hdr.len); + err = ucmb_spi_read(ucmb, buf, size); + if (err) + goto out_free; + err = ucmb_spi_read(ucmb, &footer, sizeof(footer)); + if (err) + goto out_free; + + crc = crc16(crc, (u8 *)&hdr, sizeof(hdr)); + crc = crc16(crc, buf, size); + crc ^= 0xFFFF; + if (crc != le16_to_cpu(footer.crc)) { + err = -EPROTO; + status.code = UCMB_STAT_ECRC; + goto out_send_status; + } + + if (copy_to_user(user_buf, buf, size)) { + err = -EFAULT; + status.code = UCMB_STAT_ENOMEM; + goto out_send_status; + } + + status.code = UCMB_STAT_OK; + err = 0; + +out_send_status: + res = ucmb_spi_write(ucmb, &status, sizeof(status)); + if (res && !err) + err = res; +out_free: + free_page((unsigned long)buf); +out: + mutex_unlock(&ucmb->mutex); + + return err ? err : size; +} + +static ssize_t ucmb_write(struct file *filp, const char __user *user_buf, + size_t size, loff_t *offp) +{ + struct ucmb *ucmb = filp_to_ucmb(filp); + u8 *buf; + int err; + struct ucmb_message_hdr hdr = { .magic = cpu_to_le16(UCMB_MAGIC), }; + struct ucmb_message_footer footer = { .crc = 0xFFFF, }; + struct ucmb_status status; + + mutex_lock(&ucmb->mutex); + + err = -ENOMEM; + buf = (char *)__get_free_page(GFP_KERNEL); + if (!buf) + goto out; + + size = min_t(size_t, PAGE_SIZE, size); + err = -EFAULT; + if (copy_from_user(buf, user_buf, size)) + goto out_free; + hdr.len = cpu_to_le16(size); + + footer.crc = crc16(footer.crc, (u8 *)&hdr, sizeof(hdr)); + footer.crc = crc16(footer.crc, buf, size); + footer.crc ^= 0xFFFF; + + err = ucmb_spi_write(ucmb, &hdr, sizeof(hdr)); + if (err) + goto out_free; + err = ucmb_spi_write(ucmb, buf, size); + if (err) + goto out_free; + err = ucmb_spi_write(ucmb, &footer, sizeof(footer)); + if (err) + goto out_free; + + if (ucmb->msg_delay_usec) { + /* The microcontroller deserves some time to process the message. */ + if (ucmb->msg_delay_usec >= 1000000) { + ssleep(ucmb->msg_delay_usec / 1000000); + msleep(DIV_ROUND_UP(ucmb->msg_delay_usec % 1000000, 1000)); + } else if (ucmb->msg_delay_usec >= 1000) { + msleep(DIV_ROUND_UP(ucmb->msg_delay_usec, 1000)); + } else + udelay(ucmb->msg_delay_usec); + } + + /* Get the status code. */ + err = ucmb_spi_read(ucmb, &status, sizeof(status)); + if (err) + goto out_free; +#ifdef DEBUG + printk(KERN_DEBUG PFX "Sent message. Status report: 0x%04X 0x%04X\n", + le16_to_cpu(status.magic), le16_to_cpu(status.code)); +#endif + err = -EPROTO; + if (status.magic != cpu_to_le16(UCMB_MAGIC)) + goto out_free; + err = ucmb_status_code_to_errno(le16_to_cpu(status.code)); + if (err) + goto out_free; + +out_free: + free_page((unsigned long)buf); +out: + mutex_unlock(&ucmb->mutex); + + return err ? err : size; +} + +static int __devinit ucmb_probe(struct platform_device *pdev) +{ + struct ucmb_platform_data *pdata; + struct ucmb *ucmb; + int err; + const int bus_num = ucmb_spi_busnum_count++; + struct spi_bitbang *bb; + + pdata = pdev->dev.platform_data; + if (!pdata) + return -ENXIO; + + ucmb = kzalloc(sizeof(struct ucmb), GFP_KERNEL); + if (!ucmb) + return -ENOMEM; + mutex_init(&ucmb->mutex); + ucmb->gpio_reset = pdata->gpio_reset; + ucmb->reset_activelow = pdata->reset_activelow; + ucmb->chunk_size = pdata->chunk_size; + +#ifdef CONFIG_PREEMPT + /* A preemptible kernel does not need to sleep between + * chunks, because it can sleep at desire (if IRQs are enabled). + * So transmit/receive it all in one go. */ + ucmb->chunk_size = 0; +#endif + + /* Create the SPI GPIO bus master. */ + +#ifdef CONFIG_SPI_GPIO_MODULE + err = request_module("spi_gpio"); + if (err) + printk(KERN_WARNING PFX "Failed to request spi_gpio module\n"); +#endif /* CONFIG_SPI_GPIO_MODULE */ + + ucmb->spi_gpio_pdata.sck = pdata->gpio_sck; + ucmb->spi_gpio_pdata.mosi = pdata->gpio_mosi; + ucmb->spi_gpio_pdata.miso = pdata->gpio_miso; + ucmb->spi_gpio_pdata.num_chipselect = 1; + + ucmb->spi_gpio_pdev.name = "spi_gpio"; + ucmb->spi_gpio_pdev.id = bus_num; + ucmb->spi_gpio_pdev.dev.platform_data = &ucmb->spi_gpio_pdata; + + err = platform_device_register(&ucmb->spi_gpio_pdev); + if (err) { + printk(KERN_ERR PFX "Failed to register SPI-GPIO platform device\n"); + goto err_free_ucmb; + } + bb = platform_get_drvdata(&ucmb->spi_gpio_pdev); + if (!bb || !bb->master) { + printk(KERN_ERR PFX "No bitbanged master device found.\n"); + goto err_unreg_spi_gpio_pdev; + } + + /* Create the SPI device. */ + + ucmb->sdev = spi_alloc_device(bb->master); + if (!ucmb->sdev) { + printk(KERN_ERR PFX "Failed to allocate SPI device\n"); + goto err_unreg_spi_gpio_pdev; + } + ucmb->sdev->max_speed_hz = pdata->max_speed_hz; + ucmb->sdev->chip_select = 0; + ucmb->sdev->mode = pdata->mode; + strlcpy(ucmb->sdev->modalias, "ucmb", /* We are the SPI driver. */ + sizeof(ucmb->sdev->modalias)); + ucmb->sdev->controller_data = (void *)pdata->gpio_cs; + err = spi_add_device(ucmb->sdev); + if (err) { + printk(KERN_ERR PFX "Failed to add SPI device\n"); + goto err_free_spi_device; + } + + /* Initialize the RESET line. */ + + if (pdata->gpio_reset != UCMB_NO_RESET) { + err = gpio_request(pdata->gpio_reset, pdata->name); + if (err) { + printk(KERN_ERR PFX + "Failed to request RESET GPIO line\n"); + goto err_unreg_spi_device; + } + err = gpio_direction_output(pdata->gpio_reset, + pdata->reset_activelow); + if (err) { + printk(KERN_ERR PFX + "Failed to set RESET GPIO direction\n"); + goto err_free_reset_gpio; + } + ucmb_reset_microcontroller(ucmb); + } + + /* Create the Misc char device. */ + + ucmb->mdev.minor = MISC_DYNAMIC_MINOR; + ucmb->mdev.name = pdata->name; + ucmb->mdev.parent = &pdev->dev; + ucmb->mdev_fops.open = ucmb_open; + ucmb->mdev_fops.release = ucmb_release; + ucmb->mdev_fops.read = ucmb_read; + ucmb->mdev_fops.write = ucmb_write; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) + ucmb->mdev_fops.unlocked_ioctl = ucmb_ioctl; +#else + ucmb->mdev_fops.ioctl = ucmb_ioctl; +#endif + ucmb->mdev.fops = &ucmb->mdev_fops; + + err = misc_register(&ucmb->mdev); + if (err) { + printk(KERN_ERR PFX "Failed to register miscdev %s\n", + ucmb->mdev.name); + goto err_free_reset_gpio; + } + + platform_set_drvdata(pdev, ucmb); + + printk(KERN_INFO PFX "Registered message bus \"%s\"\n", pdata->name); + + return 0; + +err_free_reset_gpio: + if (pdata->gpio_reset != UCMB_NO_RESET) + gpio_free(pdata->gpio_reset); +err_unreg_spi_device: + spi_unregister_device(ucmb->sdev); +err_free_spi_device: + spi_dev_put(ucmb->sdev); +err_unreg_spi_gpio_pdev: + platform_device_unregister(&ucmb->spi_gpio_pdev); +err_free_ucmb: + kfree(ucmb); + + return err; +} + +static int __devexit ucmb_remove(struct platform_device *pdev) +{ + struct ucmb *ucmb = platform_get_drvdata(pdev); + int err; + + err = misc_deregister(&ucmb->mdev); + if (err) { + printk(KERN_ERR PFX "Failed to unregister miscdev %s\n", + ucmb->mdev.name); + } + if (ucmb->gpio_reset != UCMB_NO_RESET) + gpio_free(ucmb->gpio_reset); + spi_unregister_device(ucmb->sdev); + spi_dev_put(ucmb->sdev); + platform_device_unregister(&ucmb->spi_gpio_pdev); + + kfree(ucmb); + platform_set_drvdata(pdev, NULL); + + return 0; +} + +static struct platform_driver ucmb_driver = { + .driver = { + .name = "ucmb", + .owner = THIS_MODULE, + }, + .probe = ucmb_probe, + .remove = __devexit_p(ucmb_remove), +}; + +int ucmb_device_register(struct ucmb_platform_data *pdata) +{ + struct platform_device *pdev; + int err; + + pdev = platform_device_alloc("ucmb", ucmb_pdev_id_count++); + if (!pdev) { + printk(KERN_ERR PFX "Failed to allocate platform device.\n"); + return -ENOMEM; + } + err = platform_device_add_data(pdev, pdata, sizeof(*pdata)); + if (err) { + printk(KERN_ERR PFX "Failed to add platform data.\n"); + platform_device_put(pdev); + return err; + } + err = platform_device_add(pdev); + if (err) { + printk(KERN_ERR PFX "Failed to register platform device.\n"); + platform_device_put(pdev); + return err; + } + pdata->pdev = pdev; + + return 0; +} +EXPORT_SYMBOL(ucmb_device_register); + +void ucmb_device_unregister(struct ucmb_platform_data *pdata) +{ + if (!pdata->pdev) + return; + platform_device_unregister(pdata->pdev); + platform_device_put(pdata->pdev); + pdata->pdev = NULL; +} +EXPORT_SYMBOL(ucmb_device_unregister); + +static int ucmb_modinit(void) +{ + int err; + + printk(KERN_INFO "Microcontroller message bus driver\n"); + + err = spi_register_driver(&ucmb_spi_driver); + if (err) { + printk(KERN_ERR PFX "Failed to register SPI driver\n"); + return err; + } + err = platform_driver_register(&ucmb_driver); + if (err) { + printk(KERN_ERR PFX "Failed to register platform driver\n"); + spi_unregister_driver(&ucmb_spi_driver); + return err; + } + + return 0; +} +subsys_initcall(ucmb_modinit); + +static void ucmb_modexit(void) +{ + platform_driver_unregister(&ucmb_driver); + spi_unregister_driver(&ucmb_spi_driver); +} +module_exit(ucmb_modexit); diff --git a/utils/ucmb/driver/ucmb.h b/utils/ucmb/driver/ucmb.h new file mode 100644 index 0000000..c0d35d2 --- /dev/null +++ b/utils/ucmb/driver/ucmb.h @@ -0,0 +1,77 @@ +#ifndef LINUX_UCMB_H_ +#define LINUX_UCMB_H_ + +#include +#include + + +/* IOCTLs */ +#define __UCMB_IOCTL ('U'|'C'|'M'|'B') + +/** UCMB_IOCTL_RESETUC - Reset the microcontroller. */ +#define UCMB_IOCTL_RESETUC _IO(__UCMB_IOCTL, 0) +/** UCMB_IOCTL_GMSGDELAY - Get the delay to wait before fetching the status. */ +#define UCMB_IOCTL_GMSGDELAY _IOR(__UCMB_IOCTL, 1, unsigned int) +/** UCMB_IOCTL_SMSGDELAY - Set the delay to wait before fetching the status. */ +#define UCMB_IOCTL_SMSGDELAY _IOW(__UCMB_IOCTL, 2, unsigned int) + + +#ifdef __KERNEL__ + +#include +#include +#include + +/** + * struct ucmb_platform_data - UCMB device descriptor + * + * @name: The name of the device. This will also be the name of + * the misc char device. + * + * @gpio_cs: The chipselect GPIO pin. Can be SPI_GPIO_NO_CHIPSELECT, + * if chipselect is not used. + * @gpio_sck: The clock GPIO pin. + * @gpio_miso: The master-in slave-out GPIO pin. + * @gpio_mosi: The master-out slave-in GPIO pin. + * + * @gpio_reset: The GPIO pin to the microcontroller reset line. + * Can be UCMB_NO_RESET, if reset GPIO is not used. + * @reset_activelow: If true, @gpio_reset is considered to be active + * on logical 0 (inverted). + * + * @mode: The SPI bus mode. SPI_MODE_* + * @max_speed_hz: The bus speed, in Hz. If zero the speed is not limited. + * @chunk_size: The maximum chunk size to transmit/receive in one go + * without sleeping. The kernel will be allowed to sleep + * after each chunk. + * If set to 0, the whole data will be transmitted/received + * in one big rush without sleeping. Note that this might hurt + * system responsiveness, if the kernel is not preemptible. + * If CONFIG_PREEMPT is enabled, chunk_size will be forced to 0. + */ +struct ucmb_platform_data { + const char *name; + + unsigned long gpio_cs; + unsigned int gpio_sck; + unsigned int gpio_miso; + unsigned int gpio_mosi; + + unsigned int gpio_reset; + bool reset_activelow; + + u8 mode; + u32 max_speed_hz; + unsigned int chunk_size; + + struct platform_device *pdev; /* internal */ +}; + +#define UCMB_NO_RESET ((unsigned int)-1) + +int ucmb_device_register(struct ucmb_platform_data *pdata); +void ucmb_device_unregister(struct ucmb_platform_data *pdata); + + +#endif /* __KERNEL__ */ +#endif /* LINUX_UCMB_H_ */ diff --git a/utils/ucmb/microcontroller_examples/atmel_avr8/ucmb.c b/utils/ucmb/microcontroller_examples/atmel_avr8/ucmb.c new file mode 100644 index 0000000..fb2bc94 --- /dev/null +++ b/utils/ucmb/microcontroller_examples/atmel_avr8/ucmb.c @@ -0,0 +1,233 @@ +/* + * Microcontroller message bus + * uc-side slave implementation for Atmel AVR8 + * + * The gcc compiler always treats multi-byte variables as litte-endian. + * So no explicit endianness conversions are done on the message header, + * footer and status data structures. + * + * Copyright (C) 2009 Michael Buesch + * + * 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. + */ + +#include "ucmb.h" + +#include +#include +#include +#include + + +struct ucmb_message_hdr { + uint16_t magic; /* UCMB_MAGIC */ + uint16_t len; /* Payload length (excluding header and footer) */ +} __attribute__((packed)); + +struct ucmb_message_footer { + uint16_t crc; /* CRC of the header + payload. */ +} __attribute__((packed)); + +struct ucmb_status { + uint16_t magic; /* UCMB_MAGIC */ + uint16_t code; /* enum ucmb_status_code */ +} __attribute__((packed)); + +#define UCMB_MAGIC 0x1337 + +enum ucmb_status_code { + UCMB_STAT_OK = 0, + UCMB_STAT_EPROTO, /* Protocol format error */ + UCMB_STAT_ENOMEM, /* Out of memory */ + UCMB_STAT_E2BIG, /* Message too big */ + UCMB_STAT_ECRC, /* CRC error */ +}; + + +static uint8_t ucmb_buf[sizeof(struct ucmb_message_hdr) + + UCMB_MAX_MSG_LEN + + sizeof(struct ucmb_message_footer)]; +static uint16_t ucmb_buf_ptr; +static struct ucmb_status status_buf; +static uint16_t ucmb_send_message_len; + +/* Statemachine */ +static uint8_t ucmb_state; +enum { + UCMB_ST_LISTEN, /* Listen for incoming messages. */ + UCMB_ST_SENDSTATUS, /* Send the status report. */ + UCMB_ST_SENDMESSAGE, /* Send the message. */ + UCMB_ST_RETRSTATUS, /* Retrieve the status report. */ +}; + +#define TRAILING 1 + + +static void ucmb_send_next_byte(void) +{ + switch (ucmb_state) { + case UCMB_ST_SENDSTATUS: { + const uint8_t *st = (const uint8_t *)&status_buf; + + if (ucmb_buf_ptr < sizeof(struct ucmb_status)) + SPDR = st[ucmb_buf_ptr]; + ucmb_buf_ptr++; + if (ucmb_buf_ptr == sizeof(struct ucmb_status) + TRAILING) { + ucmb_buf_ptr = 0; + if (ucmb_send_message_len) { + ucmb_state = UCMB_ST_SENDMESSAGE; + goto st_sendmessage; + } else + ucmb_state = UCMB_ST_LISTEN; + } + break; + } + case UCMB_ST_SENDMESSAGE: { + st_sendmessage:; + uint16_t full_length = sizeof(struct ucmb_message_hdr) + + ucmb_send_message_len + + sizeof(struct ucmb_message_footer); + if (ucmb_buf_ptr < full_length) + SPDR = ucmb_buf[ucmb_buf_ptr]; + ucmb_buf_ptr++; + if (ucmb_buf_ptr == full_length + TRAILING) { + ucmb_send_message_len = 0; + ucmb_buf_ptr = 0; + ucmb_state = UCMB_ST_RETRSTATUS; + } + break; + } } +} + +static uint16_t crc16_block_update(uint16_t crc, const void *_data, uint16_t size) +{ + const uint8_t *data = _data; + + while (size) { + crc = _crc16_update(crc, *data); + data++; + size--; + } + + return crc; +} + +static uint16_t ucmb_calc_msg_buffer_crc(void) +{ + const struct ucmb_message_hdr *hdr; + uint16_t crc = 0xFFFF; + + hdr = (const struct ucmb_message_hdr *)ucmb_buf; + crc = crc16_block_update(crc, ucmb_buf, + sizeof(struct ucmb_message_hdr) + hdr->len); + crc ^= 0xFFFF; + + return crc; +} + +/* SPI data transfer interrupt. */ +ISR(SPI_STC_vect) +{ + uint8_t data; + + data = SPDR; + SPDR = 0; + + switch (ucmb_state) { + case UCMB_ST_LISTEN: { + struct ucmb_message_hdr *hdr; + struct ucmb_message_footer *footer; + + if (ucmb_buf_ptr < sizeof(ucmb_buf)) + ucmb_buf[ucmb_buf_ptr] = data; + ucmb_buf_ptr++; + if (ucmb_buf_ptr < sizeof(struct ucmb_message_hdr)) + return; /* Header RX not complete. */ + hdr = (struct ucmb_message_hdr *)ucmb_buf; + if (ucmb_buf_ptr == sizeof(struct ucmb_message_hdr)) { + if (hdr->magic != UCMB_MAGIC) { + /* Invalid magic! Reset. */ + ucmb_buf_ptr = 0; + return; + } + if (hdr->len > 0x8000) { + /* Completely bogus length! Reset. */ + ucmb_buf_ptr = 0; + return; + } + return; + } + + if (ucmb_buf_ptr == sizeof(struct ucmb_message_hdr) + + sizeof(struct ucmb_message_footer) + + hdr->len) { + status_buf.magic = UCMB_MAGIC; + status_buf.code = UCMB_STAT_OK; + if (ucmb_buf_ptr > sizeof(ucmb_buf)) { + /* Message is way too big and was truncated. */ + status_buf.code = UCMB_STAT_E2BIG; + } else { + footer = (struct ucmb_message_footer *)( + ucmb_buf + sizeof(struct ucmb_message_hdr) + + hdr->len); + if (ucmb_calc_msg_buffer_crc() != footer->crc) + status_buf.code = UCMB_STAT_ECRC; + } + ucmb_state = UCMB_ST_SENDSTATUS; + ucmb_buf_ptr = 0; + ucmb_send_next_byte(); + + if (status_buf.code != UCMB_STAT_OK) + return; /* Corrupt message. Don't pass it to user code. */ + + ucmb_send_message_len = ucmb_rx_message( + ucmb_buf + sizeof(struct ucmb_message_hdr), + hdr->len); + if (ucmb_send_message_len) { + footer = (struct ucmb_message_footer *)( + ucmb_buf + sizeof(struct ucmb_message_hdr) + + ucmb_send_message_len); + + hdr->magic = UCMB_MAGIC; + hdr->len = ucmb_send_message_len; + footer->crc = ucmb_calc_msg_buffer_crc(); + } + } + break; + } + case UCMB_ST_SENDSTATUS: + case UCMB_ST_SENDMESSAGE: + ucmb_send_next_byte(); + break; + case UCMB_ST_RETRSTATUS: { + uint8_t *st = (uint8_t *)&status_buf; + + st[ucmb_buf_ptr++] = data; + if (ucmb_buf_ptr == sizeof(struct ucmb_status)) { + /* We could possibly handle the status report here... */ + ucmb_buf_ptr = 0; + ucmb_state = UCMB_ST_LISTEN; + } + break; + } } +} + +void ucmb_init(void) +{ + ucmb_state = UCMB_ST_LISTEN; + + /* SPI slave mode 0 with IRQ enabled. */ + DDRB |= (1 << 4/*MISO*/); + DDRB &= ~((1 << 5/*SCK*/) | (1 << 3/*MOSI*/) | (1 << 2/*SS*/)); + SPCR = (1 << SPE) | (1 << SPIE) /*| (1 << CPOL) | (1 << CPHA)*/; + (void)SPSR; /* clear state */ + (void)SPDR; /* clear state */ +} diff --git a/utils/ucmb/microcontroller_examples/atmel_avr8/ucmb.h b/utils/ucmb/microcontroller_examples/atmel_avr8/ucmb.h new file mode 100644 index 0000000..9ecb92f --- /dev/null +++ b/utils/ucmb/microcontroller_examples/atmel_avr8/ucmb.h @@ -0,0 +1,24 @@ +#ifndef UCMB_AVR8_H_ +#define UCMB_AVR8_H_ + +#include + + +/* Max length of the message payload. */ +#define UCMB_MAX_MSG_LEN 0x200 + +/* ucmb_rx_message - Message receive callback. + * Define this elsewhere. It's called on successful retrieval + * of a new message. + * If a reply message has to be transferred after this one, put the + * message payload into the "payload" buffer and return the number + * of bytes to transmit. If no reply message is needed, return 0. + * Note that the "payload" buffer always has a size of UCMB_MAX_MSG_LEN. + */ +extern uint16_t ucmb_rx_message(uint8_t *payload, + uint16_t payload_length); + +/* Initialize the UCMB subsystem. */ +void ucmb_init(void); + +#endif /* UCMB_AVR8_H_ */ diff --git a/utils/ucmb/microcontroller_examples/atmel_avr8_optimized/ucmb.c b/utils/ucmb/microcontroller_examples/atmel_avr8_optimized/ucmb.c new file mode 100644 index 0000000..b605baa --- /dev/null +++ b/utils/ucmb/microcontroller_examples/atmel_avr8_optimized/ucmb.c @@ -0,0 +1,530 @@ +/* + * Microcontroller message bus + * uc-side slave implementation for Atmel AVR8 + * + * The gcc compiler always treats multi-byte variables as litte-endian. + * So no explicit endianness conversions are done on the message header, + * footer and status data structures. + * + * This hotpath-assembly implementation is about twice as fast + * as the C implementation. + * + * Copyright (C) 2009 Michael Buesch + * + * 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. + */ + +#include "ucmb.h" + +#include +#include +#include +#include +#include + + +#ifndef __GNUC__ +# error "Need the GNU C compiler" +#endif + +#undef __naked +#define __naked __attribute__((__naked__)) +#undef __used +#define __used __attribute__((__used__)) +#undef __noret +#define __noret __attribute__((__noreturn__)) +#undef offsetof +#define offsetof(type, member) ((size_t)&((type *)0)->member) +#undef unlikely +#define unlikely(x) __builtin_expect(!!(x), 0) +#undef mb +#define mb() __asm__ __volatile__("" : : : "memory") /* memory barrier */ +#ifndef ucmb_errorlog +# define ucmb_errorlog(message) do { /* nothing */ } while (0) +#endif + + +struct ucmb_message_hdr { + uint16_t magic; /* UCMB_MAGIC */ + uint16_t len; /* Payload length (excluding header and footer) */ +} __attribute__((packed)); + +struct ucmb_message_footer { + uint16_t crc; /* CRC of the header + payload. */ +} __attribute__((packed)); + +struct ucmb_status { + uint16_t magic; /* UCMB_MAGIC */ + uint16_t code; /* enum ucmb_status_code */ +} __attribute__((packed)); + +#define UCMB_MAGIC 0x1337 + +enum ucmb_status_code { + UCMB_STAT_OK = 0, + UCMB_STAT_EPROTO, /* Protocol format error */ + UCMB_STAT_ENOMEM, /* Out of memory */ + UCMB_STAT_E2BIG, /* Message too big */ + UCMB_STAT_ECRC, /* CRC error */ +}; + + +static uint8_t ucmb_buf[sizeof(struct ucmb_message_hdr) + + UCMB_MAX_MSG_LEN + + sizeof(struct ucmb_message_footer)] __used; +static uint16_t ucmb_buf_ptr __used; +static struct ucmb_status status_buf __used; +static uint16_t ucmb_send_message_len __used; +static uint8_t ucmb_received_message; + +/* The current IRQ handler */ +static void (*ucmb_interrupt_handler)(void) __used; + + +/* Polynomial: x^16 + x^15 + x^2 + 1 */ +static const prog_uint16_t crc16_table[256] = { + 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, + 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, + 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, + 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, + 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, + 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, + 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, + 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, + 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, + 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, + 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, + 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, + 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, + 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, + 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, + 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, + 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, + 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, + 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, + 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, + 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, + 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, + 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, + 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, + 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, + 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, + 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, + 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, + 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, + 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, + 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, + 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 +}; + +static inline uint16_t crc16_block_update(uint16_t crc, const void *_data, uint16_t size) +{ + const uint8_t *data = _data; + uint8_t offset; + + while (size--) { + wdt_reset(); + offset = crc ^ *data; + crc = (crc >> 8) ^ pgm_read_word(&crc16_table[offset]); + data++; + } + + return crc; +} + +static inline uint16_t ucmb_calc_msg_buffer_crc(void) +{ + const struct ucmb_message_hdr *hdr; + uint16_t crc = 0xFFFF; + + hdr = (const struct ucmb_message_hdr *)ucmb_buf; + crc = crc16_block_update(crc, ucmb_buf, + sizeof(struct ucmb_message_hdr) + hdr->len); + crc ^= 0xFFFF; + + return crc; +} + +/* The generic interrupt handler. + * This just branches to the state specific handler. + */ +ISR(SPI_STC_vect) __naked; +ISR(SPI_STC_vect) +{ + __asm__ __volatile__( +" ; UCMB generic interrupt handler \n" +" push __tmp_reg__ \n" +" in __tmp_reg__, __SREG__ \n" +" push r30 \n" +" push r31 \n" +" lds r30, ucmb_interrupt_handler + 0 \n" +" lds r31, ucmb_interrupt_handler + 1 \n" +" ijmp ; Jump to the real handler \n" + ); +} +#define UCMB_IRQ_EPILOGUE \ +" ; UCMB interrupt epilogue (start) \n"\ +" pop r31 \n"\ +" pop r30 \n"\ +" out __SREG__, __tmp_reg__ \n"\ +" pop __tmp_reg__ \n"\ +" reti \n"\ +" ; UCMB interrupt epilogue (end) \n" + +static void __naked __used ucmb_handler_LISTEN(void) +{ + __asm__ __volatile__( +" push r16 \n" +" push r17 \n" +" push r18 \n" +" lds r16, ucmb_buf_ptr + 0 \n" +" lds r17, ucmb_buf_ptr + 1 \n" +" ldi r18, hi8(%[sizeof_buf]) \n" +" cpi r16, lo8(%[sizeof_buf]) \n" +" cpc r17, r18 \n" +" in r18, %[_SPDR] \n" +" brsh 1f ; overflow \n" +" ; Store SPDR in the buffer \n" +" movw r30, r16 \n" +" subi r30, lo8(-(ucmb_buf)) \n" +" sbci r31, hi8(-(ucmb_buf)) \n" +" st Z, r18 \n" +"1: \n" +" ; Increment the buffer pointer \n" +" subi r16, lo8(-1) \n" +" sbci r17, hi8(-1) \n" +" sts ucmb_buf_ptr + 0, r16 \n" +" sts ucmb_buf_ptr + 1, r17 \n" +" cpi r17, 0 \n" +" brne 1f \n" +" cpi r16, %[sizeof_msg_hdr] \n" +" breq hdr_sanity_check ; buf_ptr == hdrlen \n" +" brlo st_listen_out ; buf_ptr < hdrlen \n" +"1: \n" +" ; Get payload length from header \n" +" lds r30, (ucmb_buf + %[offsetof_hdr_len] + 0) \n" +" lds r31, (ucmb_buf + %[offsetof_hdr_len] + 1) \n" +" ; Add header and footer length to get full length \n" +" subi r30, lo8(-(%[sizeof_msg_hdr] + %[sizeof_msg_footer])) \n" +" sbci r31, hi8(-(%[sizeof_msg_hdr] + %[sizeof_msg_footer])) \n" +" ; Check if we have the full packet \n" +" cp r30, r16 \n" +" cpc r31, r17 \n" +" breq st_listen_have_full_packet \n" +"st_listen_out: \n" +" pop r18 \n" +" pop r17 \n" +" pop r16 \n" +UCMB_IRQ_EPILOGUE /* reti */ +" \n" +"hdr_sanity_check: \n" +" lds r30, (ucmb_buf + %[offsetof_hdr_magic] + 0) \n" +" lds r31, (ucmb_buf + %[offsetof_hdr_magic] + 1) \n" +" ldi r18, hi8(%[_UCMB_MAGIC]) \n" +" cpi r30, lo8(%[_UCMB_MAGIC]) \n" +" cpc r31, r18 \n" +" brne invalid_hdr_magic \n" +" lds r30, (ucmb_buf + %[offsetof_hdr_len] + 0) \n" +" lds r31, (ucmb_buf + %[offsetof_hdr_len] + 1) \n" +" ldi r18, hi8(0x8001) \n" +" cpi r30, lo8(0x8001) \n" +" cpc r31, r18 \n" +" brsh bogus_payload_len \n" +" rjmp st_listen_out \n" +" \n" +"invalid_hdr_magic: \n" +" ; Invalid magic number in the packet header. Reset. \n" +"bogus_payload_len: \n" +" ; Bogus payload length in packet header. Reset. \n" +" clr r18 \n" +" sts ucmb_buf_ptr + 0, r18 \n" +" sts ucmb_buf_ptr + 1, r18 \n" +" rjmp st_listen_out \n" +" \n" +"st_listen_have_full_packet: \n" +" ; We have the full packet. Any SPI transfer is stopped \n" +" ; while we are processing the packet, so this \n" +" ; is a slowpath. \n" +" ; Disable SPI and pass control to ucmb_work to \n" +" ; handle the message. \n" +" cbi %[_SPCR], %[_SPIE] \n" +" ldi r18, 1 \n" +" sts ucmb_received_message, r18 \n" +" rjmp st_listen_out \n" + : /* none */ + : [sizeof_buf] "i" (sizeof(ucmb_buf)) + , [sizeof_msg_hdr] "M" (sizeof(struct ucmb_message_hdr)) + , [sizeof_msg_footer] "M" (sizeof(struct ucmb_message_footer)) + , [offsetof_hdr_magic] "M" (offsetof(struct ucmb_message_hdr, magic)) + , [offsetof_hdr_len] "M" (offsetof(struct ucmb_message_hdr, len)) + , [_SPDR] "M" (_SFR_IO_ADDR(SPDR)) + , [_SPCR] "M" (_SFR_IO_ADDR(SPCR)) + , [_SPIE] "i" (SPIE) + , [_UCMB_MAGIC] "i" (UCMB_MAGIC) + : "memory" + ); +} + +static void __naked __used ucmb_handler_SENDSTATUS(void) +{ + __asm__ __volatile__( +" push r16 \n" +/*" push r17 \n" */ +" push r18 \n" +" lds r16, ucmb_buf_ptr + 0 \n" +" cpi r16, %[sizeof_ucmb_status] \n" +" brsh 1f ; This is the trailing byte \n" +" ; Write the next byte from status_buf to SPDR \n" +" mov r30, r16 \n" +" clr r31 \n" +" subi r30, lo8(-(status_buf)) \n" +" sbci r31, hi8(-(status_buf)) \n" +" ld r18, Z \n" +" out %[_SPDR], r18 \n" +"1: \n" +" subi r16, lo8(-1) \n" +" sts ucmb_buf_ptr + 0, r16 \n" +" cpi r16, (%[sizeof_ucmb_status] + 1) \n" +" brne st_sendstatus_out \n" +" ; Finished. Sent all status_buf bytes + trailing byte. \n" +" clr r18 \n" +" sts ucmb_buf_ptr + 0, r18 \n" +" ; Switch back to listening state... \n" +" ldi r18, lo8(gs(ucmb_handler_LISTEN)) \n" +" sts ucmb_interrupt_handler + 0, r18 \n" +" ldi r18, hi8(gs(ucmb_handler_LISTEN)) \n" +" sts ucmb_interrupt_handler + 1, r18 \n" +" ; ...if we have no pending transmission \n" +" lds r30, ucmb_send_message_len + 0 \n" +" lds r31, ucmb_send_message_len + 1 \n" +" clr r18 \n" +" cpi r30, 0 \n" +" cpc r31, r18 \n" +" breq st_sendstatus_out \n" +" ; Switch status to SENDMESSAGE and send the first byte. \n" +" ldi r18, lo8(gs(ucmb_handler_SENDMESSAGE)) \n" +" sts ucmb_interrupt_handler + 0, r18 \n" +" ldi r18, hi8(gs(ucmb_handler_SENDMESSAGE)) \n" +" sts ucmb_interrupt_handler + 1, r18 \n" +" ; Send the first byte \n" +" lds r18, ucmb_buf + 0 \n" +" out %[_SPDR], r18 \n" +" ldi r18, 1 \n" +" sts ucmb_buf_ptr + 0, r18 \n" +"st_sendstatus_out: \n" +" pop r18 \n" +/*" pop r17 \n"*/ +" pop r16 \n" +UCMB_IRQ_EPILOGUE /* reti */ + : /* none */ + : [sizeof_ucmb_status] "M" (sizeof(struct ucmb_status)) + , [_SPDR] "M" (_SFR_IO_ADDR(SPDR)) + : "memory" + ); +} + +static void __naked __used ucmb_handler_SENDMESSAGE(void) +{ + __asm__ __volatile__( +" push r16 \n" +" push r17 \n" +" push r18 \n" +" lds r16, ucmb_buf_ptr + 0 \n" +" lds r17, ucmb_buf_ptr + 1 \n" +" lds r30, ucmb_send_message_len + 0 \n" +" lds r31, ucmb_send_message_len + 1 \n" +" cp r16, r30 \n" +" cpc r17, r31 \n" +" brsh 1f ; This is the trailing byte \n" +" movw r30, r16 \n" +" subi r30, lo8(-(ucmb_buf)) \n" +" sbci r31, hi8(-(ucmb_buf)) \n" +" ld r18, Z \n" +" out %[_SPDR], r18 \n" +"1: \n" +" subi r16, lo8(-1) \n" +" sbci r17, hi8(-1) \n" +" sts ucmb_buf_ptr + 0, r16 \n" +" sts ucmb_buf_ptr + 1, r17 \n" +" lds r30, ucmb_send_message_len + 0 \n" +" lds r31, ucmb_send_message_len + 1 \n" +" subi r30, lo8(-1) \n" +" sbci r31, hi8(-1) \n" +" cp r16, r30 \n" +" cpc r17, r31 \n" +" brne st_sendmessage_out \n" +" ; Message + trailing byte processed. Retrieve status. \n" +" clr r18 \n" +" sts ucmb_buf_ptr + 0, r18 \n" +" sts ucmb_buf_ptr + 1, r18 \n" +" ldi r18, lo8(gs(ucmb_handler_RETRSTATUS)) \n" +" sts ucmb_interrupt_handler + 0, r18 \n" +" ldi r18, hi8(gs(ucmb_handler_RETRSTATUS)) \n" +" sts ucmb_interrupt_handler + 1, r18 \n" +"st_sendmessage_out: \n" +" pop r18 \n" +" pop r17 \n" +" pop r16 \n" +UCMB_IRQ_EPILOGUE /* reti */ + : /* none */ + : [_SPDR] "M" (_SFR_IO_ADDR(SPDR)) + : "memory" + ); +} + +static void __naked __used ucmb_handler_RETRSTATUS(void) +{ + __asm__ __volatile__( +" push r16 \n" +/*" push r17 \n"*/ +" push r18 \n" +" in r18, %[_SPDR] \n" +" lds r16, ucmb_buf_ptr + 0 \n" +" mov r30, r16 \n" +" clr r31 \n" +" subi r30, lo8(-(status_buf)) \n" +" sbci r31, hi8(-(status_buf)) \n" +" st Z, r18 \n" +" subi r16, -1 \n" +" sts ucmb_buf_ptr + 0, r16 \n" +" cpi r16, %[sizeof_ucmb_status] \n" +" brne st_retrstatus_out \n" +" ; Completely received the status \n" +" clr r16 \n" +" sts ucmb_buf_ptr + 0, r16 \n" +" ; Switch back to listening state... \n" +" ldi r18, lo8(gs(ucmb_handler_LISTEN)) \n" +" sts ucmb_interrupt_handler + 0, r18 \n" +" ldi r18, hi8(gs(ucmb_handler_LISTEN)) \n" +" sts ucmb_interrupt_handler + 1, r18 \n" +" ; Check status-report magic value \n" +" lds r30, (status_buf + %[offsetof_status_magic] + 0) \n" +" lds r31, (status_buf + %[offsetof_status_magic] + 1) \n" +" ldi r18, hi8(%[_UCMB_MAGIC]) \n" +" cpi r30, lo8(%[_UCMB_MAGIC]) \n" +" cpc r31, r18 \n" +" brne invalid_status_magic \n" +" ; Check status-report error code \n" +" lds r30, (status_buf + %[offsetof_status_code] + 0) \n" +" lds r31, (status_buf + %[offsetof_status_code] + 1) \n" +" ldi r18, hi8(%[_UCMB_STAT_OK]) \n" +" cpi r30, lo8(%[_UCMB_STAT_OK]) \n" +" cpc r31, r18 \n" +" brne faulty_status_code \n" +"st_retrstatus_out: \n" +" pop r18 \n" +/*" pop r17 \n"*/ +" pop r16 \n" +UCMB_IRQ_EPILOGUE /* reti */ +" \n" +"invalid_status_magic: \n" +"faulty_status_code: \n" +" ; Branch to the C error handler \n" +" ; The handler does not return, so we don't need to \n" +" ; push/pop the registers. \n" +" clr __zero_reg__ \n" +" rjmp ucmb_received_faulty_status \n" + : /* none */ + : [sizeof_ucmb_status] "M" (sizeof(struct ucmb_status)) + , [offsetof_status_magic] "M" (offsetof(struct ucmb_status, magic)) + , [offsetof_status_code] "M" (offsetof(struct ucmb_status, code)) + , [_SPDR] "M" (_SFR_IO_ADDR(SPDR)) + , [_UCMB_MAGIC] "i" (UCMB_MAGIC) + , [_UCMB_STAT_OK] "i" (UCMB_STAT_OK) + : "memory" + ); +} + +/* We received a status report with an error condition. + * This is called from assembly code. The function does not return. */ +static void __used __noret ucmb_received_faulty_status(void) +{ + /* The master sent us a status report with an error code. + * Something's wrong with us. Print a status message and + * get caught by the watchdog, yummy. + */ + + cli(); + wdt_disable(); + wdt_enable(WDTO_15MS); + ucmb_errorlog("UCMB: Received faulty status report. Triggering reset."); + while (1) { + /* "It's Coming Right For Us!" */ + } +} + +void ucmb_work(void) +{ + struct ucmb_message_hdr *hdr; + struct ucmb_message_footer *footer; + uint16_t payload_len; + + if (!ucmb_received_message) + return; + + hdr = (struct ucmb_message_hdr *)ucmb_buf; + payload_len = hdr->len; + + status_buf.magic = UCMB_MAGIC; + status_buf.code = UCMB_STAT_OK; + if (unlikely(ucmb_buf_ptr > sizeof(ucmb_buf))) { + /* Message is way too big and was truncated. */ + status_buf.code = UCMB_STAT_E2BIG; + } else { + footer = (struct ucmb_message_footer *)( + ucmb_buf + sizeof(struct ucmb_message_hdr) + + payload_len); + if (ucmb_calc_msg_buffer_crc() != footer->crc) + status_buf.code = UCMB_STAT_ECRC; + } + ucmb_interrupt_handler = ucmb_handler_SENDSTATUS; + ucmb_buf_ptr = 0; + /* Send the first byte */ + SPDR = ((uint8_t *)&status_buf)[ucmb_buf_ptr]; + ucmb_buf_ptr++; + + if (unlikely(status_buf.code != UCMB_STAT_OK)) + goto out; /* Corrupt message. Don't pass it to user code. */ + + ucmb_send_message_len = ucmb_rx_message( + ucmb_buf + sizeof(struct ucmb_message_hdr), + payload_len); + if (ucmb_send_message_len) { + footer = (struct ucmb_message_footer *)( + ucmb_buf + sizeof(struct ucmb_message_hdr) + + ucmb_send_message_len); + + hdr->magic = UCMB_MAGIC; + hdr->len = ucmb_send_message_len; + footer->crc = ucmb_calc_msg_buffer_crc(); + + ucmb_send_message_len += sizeof(struct ucmb_message_hdr) + + sizeof(struct ucmb_message_footer); + } + +out: + ucmb_received_message = 0; + mb(); + /* Re-enable SPI */ + SPCR |= (1 << SPIE); +} + +void ucmb_init(void) +{ + ucmb_interrupt_handler = ucmb_handler_LISTEN; + + /* SPI slave mode 0 with IRQ enabled. */ + DDRB |= (1 << 6/*MISO*/); + DDRB &= ~((1 << 7/*SCK*/) | (1 << 5/*MOSI*/) | (1 << 4/*SS*/)); + SPCR = (1 << SPE) | (1 << SPIE) /*| (1 << CPOL) | (1 << CPHA)*/; + (void)SPSR; /* clear state */ + (void)SPDR; /* clear state */ +} diff --git a/utils/ucmb/microcontroller_examples/atmel_avr8_optimized/ucmb.h b/utils/ucmb/microcontroller_examples/atmel_avr8_optimized/ucmb.h new file mode 100644 index 0000000..06853d5 --- /dev/null +++ b/utils/ucmb/microcontroller_examples/atmel_avr8_optimized/ucmb.h @@ -0,0 +1,36 @@ +#ifndef UCMB_AVR8_H_ +#define UCMB_AVR8_H_ + +#include + + +/* Max length of the message payload. */ +#define UCMB_MAX_MSG_LEN (128 * 64 / 8 + 16) + +/* Error logs: If you want UCMB error log messages, define + * ucmb_errorlog(message_string_literal) + * somewhere. If you don't define it, UCMB will be compiled + * without error messages. */ + +/* ucmb_rx_message - Message receive callback. + * Define this elsewhere. It's called on successful retrieval + * of a new message. + * If a reply message has to be transferred after this one, put the + * message payload into the "payload" buffer and return the number + * of bytes to transmit. If no reply message is needed, return 0. + * Note that the "payload" buffer always has a size of UCMB_MAX_MSG_LEN. + * This function is called with interrupts enabled. + */ +extern uint16_t ucmb_rx_message(uint8_t *payload, + uint16_t payload_length); + +/* ucmb_work - Frequently call this from the mainloop. + * Must not be called from interrupt context. + * Must not be called with interrupts disabled. + */ +void ucmb_work(void); + +/* Initialize the UCMB subsystem. */ +void ucmb_init(void); + +#endif /* UCMB_AVR8_H_ */ diff --git a/utils/unrar/Makefile b/utils/unrar/Makefile new file mode 100644 index 0000000..f9224a0 --- /dev/null +++ b/utils/unrar/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=unrar +PKG_VERSION:=4.0.7 +PKG_RELEASE:=1 + +PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.rarlab.com/rar +PKG_MD5SUM:=41b0a9bca945b4ae2608421afd8f606e + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/unrar +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/unrar + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=compression + TITLE:=unrar application + URL:=http://www.rarlab.com/ + DEPENDS:=+uclibcxx +endef + +define Package/unrar/description + unrar is an application that can decompress files and archives created using + the RAR compression scheme +endef + +define Build/Configure + $(call Build/Configure/Default, ) + ln -s $(PKG_BUILD_DIR)/makefile.unix $(PKG_BUILD_DIR)/Makefile +endef + +MAKE_FLAGS += \ + CXX="$(STAGING_DIR)/host/bin/g++-uc" + +define Package/unrar/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/unrar $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,unrar)) diff --git a/utils/unzip/Makefile b/utils/unzip/Makefile new file mode 100644 index 0000000..f012816 --- /dev/null +++ b/utils/unzip/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=unzip +PKG_VERSION:=5.52 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)552.zip +PKG_SOURCE_URL:=@SF/infozip +PKG_MD5SUM:=3d55b4e7375c3d0b81feca52dc0e4d48 + +include $(INCLUDE_DIR)/package.mk + +PKG_UNPACK=unzip -d $(PKG_BUILD_DIR)/ $(DL_DIR)/$(PKG_SOURCE) + +define Package/unzip + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:= + TITLE:=De-archiver for .zip files + URL:=http://infozip.sourceforge.net/UnZip.html + SUBMENU:=compression +endef + +define Package/unzip/description + InfoZIP's unzip program. With the exception of multi-volume archives + (ie, .ZIP files that are split across several disks using PKZIP's /& option), + this can handle any file produced either by PKZIP, or the corresponding + InfoZIP zip program. +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) -f unix/Makefile generic \ + $(TARGET_CONFIGURE_OPTS) \ + prefix="$(PKG_INSTALL_DIR)/usr" \ + CFLAGS="$(TARGET_CFLAGS)" \ + CF="$(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX" \ + LD="$(TARGET_CC) $(TARGET_LDFLAGS)" \ + install +endef + +define Package/unzip/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,unzip)) diff --git a/utils/upx/Makefile b/utils/upx/Makefile new file mode 100644 index 0000000..42dd23a --- /dev/null +++ b/utils/upx/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=upx +PKG_VERSION:=3.07 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.bz2 +PKG_SOURCE_URL:=http://upx.sourceforge.net/download \ + http://upx.sourceforge.net/download/00-OLD-VERSIONS +PKG_MD5SUM:=8186ab103288242f7e8ecad1acd4af03 + +include $(INCLUDE_DIR)/package.mk + +define Package/upx + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libucl +libstdcpp +zlib + TITLE:=The Ultimate Packer for eXecutables + URL:=http://upx.sourceforge.net/ +endef + +define Package/upx/description +UPX is a free, portable, extendable, high-performance executable packer for +several different executable formats. It achieves an excellent compression ratio +and offers very fast decompression. Your executables suffer no memory overhead +or other drawbacks for most of the formats supported, because of in-place +decompression. +endef + +MAKE_PATH := src +MAKE_VARS += \ + exeext="" + +TAR_CMD:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components 1 $(TAR_OPTIONS) + +TARGET_CPPFLAGS += \ + -DUCL_NO_ASM \ + +define Package/upx/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/upx $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,upx)) diff --git a/utils/upx/patches/100-disable_doc.patch b/utils/upx/patches/100-disable_doc.patch new file mode 100644 index 0000000..d960c00 --- /dev/null +++ b/utils/upx/patches/100-disable_doc.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -35,7 +35,7 @@ ifeq ($(BUILD_STUB),1) + $(MAKE) -C src/stub $@ + endif + $(MAKE) -C src $@ +- $(MAKE) -C doc $@ ++# $(MAKE) -C doc $@ + + + .PHONY: default all mostlyclean clean distclean maintainer-clean diff --git a/utils/usb-modeswitch-data/Makefile b/utils/usb-modeswitch-data/Makefile new file mode 100644 index 0000000..ed579c0 --- /dev/null +++ b/utils/usb-modeswitch-data/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=usb-modeswitch-data +PKG_VERSION:=20110705 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.draisberghof.de/usb_modeswitch/ +PKG_MD5SUM:=5046e7be8d10d2fe699f9af21a0c3769 + +include $(INCLUDE_DIR)/package.mk + +define Package/usb-modeswitch-data + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=usb-modeswitch + TITLE:=USB ModeSwitch - Dongle configuration database + URL:=http://packages.debian.org/de/sid/usb-modeswitch-data +endef + +define Package/usb-modeswitch-data/description + Configuration database for usb-modeswitch. + Contains definitions for many USB devices required to + autoswitch "flip flop" gear. +endef + +define Build/Compile +endef + +define Package/usb-modeswitch-data/install + $(INSTALL_DIR) $(1)/etc/usb_modeswitch.d/ + $(CP) $(PKG_BUILD_DIR)/usb_modeswitch.d/* $(1)/etc/usb_modeswitch.d/ +endef + +$(eval $(call BuildPackage,usb-modeswitch-data)) diff --git a/utils/usb-modeswitch/Makefile b/utils/usb-modeswitch/Makefile new file mode 100644 index 0000000..411f0a5 --- /dev/null +++ b/utils/usb-modeswitch/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2008-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=usb-modeswitch +PKG_VERSION:=1.1.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.draisberghof.de/usb_modeswitch +PKG_MD5SUM:=1aaaa45e0465843e4973d7778bfbafbb + +include $(INCLUDE_DIR)/package.mk + +define Package/usb-modeswitch + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libusb + TITLE:=USB ModeSwitch + URL:=http://www.draisberghof.de/usb_modeswitch/ +endef + +define Package/usb-modeswitch/description + A mode switching tool for controlling + "flip flop" (multiple device) USB gear. +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \ + -lusb \ + -o $(PKG_BUILD_DIR)/usb_modeswitch-OpenWrt \ + $(PKG_BUILD_DIR)/usb_modeswitch.c +endef + +define Package/usb-modeswitch/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/usb_modeswitch-OpenWrt $(1)/usr/bin/usb_modeswitch + $(INSTALL_DIR) $(1)/etc/hotplug.d/usb + $(INSTALL_DATA) ./files/modeswitch.hotplug $(1)/etc/hotplug.d/usb/20-modeswitch +endef + +$(eval $(call BuildPackage,usb-modeswitch)) diff --git a/utils/usb-modeswitch/files/modeswitch.hotplug b/utils/usb-modeswitch/files/modeswitch.hotplug new file mode 100644 index 0000000..1aecb1f --- /dev/null +++ b/utils/usb-modeswitch/files/modeswitch.hotplug @@ -0,0 +1,126 @@ +#!/bin/sh + +local uVid uPid uMa uPr uSe +local sVe sMo sRe + +local modeswitch="/usr/bin/usb_modeswitch" + + +log() { + logger -t "usb-modeswitch" "$@" +} + +sanitize() { + sed -e 's/[[:space:]]\+$//; s/[[:space:]]\+/_/g' "$@" +} + +find_scsi_attrs() { + [ -n "$DEVPATH" ] && [ -d /sys/$DEVPATH/host* ] && { + log "$DEVICENAME is a SCSI device, waiting for it to settle..." + local timeout=20 + while [ $((--timeout)) -ge 0 ]; do + [ -d /sys/$DEVPATH/host*/target* ] && { + local scsi_dir + for scsi_dir in /sys/$DEVPATH/host*/target*/*; do + [ -d "$scsi_dir" ] || break + case "$scsi_dir" in + */host*/target*/*:*:*:*) + sVe=$(sanitize "$scsi_dir/vendor") + sMo=$(sanitize "$scsi_dir/model") + sRe=$(sanitize "$scsi_dir/rev") + + log "$DEVICENAME: Vendor=${sVe:-?} Model=${sMo:-?} Revision=${sRe:-?}" + return 0 + ;; + esac + done + } || { + sleep 1 + } + done + log "$DEVICENAME: Failed to get SCSI attributes!" + } + + return 1 +} + +find_usb_attrs() { + local usb_dir="/sys/$DEVPATH" + [ -f "$usb_dir/idVendor" ] || usb_dir="${usb_dir%/*}" + + uVid=$(cat "$usb_dir/idVendor") + uPid=$(cat "$usb_dir/idProduct") + uMa=$(sanitize "$usb_dir/manufacturer") + uPr=$(sanitize "$usb_dir/product") + uSe=$(sanitize "$usb_dir/serial") + + log "$DEVICENAME: Manufacturer=${uMa:-?} Product=${uPr:-?} Serial=${uSe:-?}" +} + +match_config_tag() { + local conf="$1" + local tag="$2" + + case "${conf##*/}" in + *:*$tag=*) + local cmp; eval "cmp=\$$tag" + local pat="${conf#*:$tag=}"; pat="${pat%%:*}" + case "$cmp" in + *$pat*) return 0 ;; + *) return 1 ;; + esac + ;; + esac + + return 0 +} + +match_config() { + local conf="$1" + local tag + + for tag in uMa uPr uSe sVe sMo sRe; do + match_config_tag "$conf" "$tag" || return 1 + done + + return 0 +} + + + +if [ "$ACTION" = add ]; then + [ -d "/etc/usb_modeswitch.d" ] && [ -x "$modeswitch" ] && { + case "$DEVICENAME" in + *-*:*.*) : ;; + *) exit 0 ;; + esac + + find_usb_attrs + + local candidates=0 + local conf configs + for conf in /etc/usb_modeswitch.d/$uVid:$uPid*; do + [ -f "$conf" ] || break + configs="${configs:+$configs }$conf" + $((candidates++)) + done + + # Found more than one candidate, read SCSI attributes and find the best match + [ $candidates -gt 1 ] && { + find_scsi_attrs + for conf in $configs; do + match_config "$conf" && { + configs="$conf" + candidates=1 + break + } + done + } + + # If a candidate is remaining, start usb-modeswitch + [ -n "$configs" ] && { + log "$DEVICENAME: Selecting ${configs%% *} for mode switching" + $modeswitch -c "${configs%% *}" + } + } +fi diff --git a/utils/usbutils/Makefile b/utils/usbutils/Makefile new file mode 100644 index 0000000..d6a443e --- /dev/null +++ b/utils/usbutils/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2007-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=usbutils +PKG_VERSION:=003 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils +PKG_MD5SUM:=218208b8382ead0f7e49ef7ec0cf77f2 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/usbutils + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libusb-1.0 +zlib +librt +libpthread + TITLE:=USB devices listing utilities + URL:=http://www.linux-usb.org/ +endef + +define Package/usbutils/postinst +#!/bin/sh +[ -z "$${IPKG_INSTROOT}" ] || \ +(cd $${IPKG_INSTROOT}/usr/share; $${PKG_ROOT}/usr/sbin/update-usbids.sh ; rm usb.ids.gz.old) +exit 0 +endef + +define Package/usbutils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsusb $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/update-usbids.sh $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/share + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids.gz $(1)/usr/share/ +endef + +$(eval $(call BuildPackage,usbutils)) diff --git a/utils/usbutils/patches/100-ids-relative-path.patch b/utils/usbutils/patches/100-ids-relative-path.patch new file mode 100644 index 0000000..6117c36 --- /dev/null +++ b/utils/usbutils/patches/100-ids-relative-path.patch @@ -0,0 +1,11 @@ +--- a/update-usbids.sh.in ++++ b/update-usbids.sh.in +@@ -6,7 +6,7 @@ + + set -e + SRC="http://www.linux-usb.org/usb.ids" +-DEST=@usbids@ ++DEST=usb.ids + + # if usb.ids is read-only (because the filesystem is read-only), + # then just skip this whole process. diff --git a/utils/usbutils/patches/110-gzip-update-usbids.patch b/utils/usbutils/patches/110-gzip-update-usbids.patch new file mode 100644 index 0000000..0e25e5c --- /dev/null +++ b/utils/usbutils/patches/110-gzip-update-usbids.patch @@ -0,0 +1,36 @@ +--- a/update-usbids.sh.in ++++ b/update-usbids.sh.in +@@ -6,9 +6,9 @@ + + set -e + SRC="http://www.linux-usb.org/usb.ids" +-DEST=usb.ids ++DEST=usb.ids.gz + +-# if usb.ids is read-only (because the filesystem is read-only), ++# if usb.ids.gz is read-only (because the filesystem is read-only), + # then just skip this whole process. + if ! touch ${DEST} >&2 >/dev/null ; then + ${quiet} || echo "${DEST} is read-only, exiting." +@@ -16,10 +16,10 @@ if ! touch ${DEST} >&2 >/dev/null ; then + fi + + if which wget >/dev/null 2>&1 ; then +- DL="wget -O $DEST.new $SRC" ++ DL="eval wget -O- $SRC | gzip >$DEST.new" + ${quiet} && DL="$DL -q" + elif which lynx >/dev/null 2>&1 ; then +- DL="eval lynx -source $SRC >$DEST.new" ++ DL="eval lynx -source $SRC | gzip >$DEST.new" + else + echo >&2 "update-usbids: cannot find wget nor lynx" + exit 1 +@@ -31,7 +31,7 @@ if ! $DL ; then + exit 1 + fi + +-if ! grep >/dev/null "^C " $DEST.new ; then ++if ! zcat $DEST.new | grep >/dev/null "^C " ; then + echo >&2 "update-usbids: missing class info, probably truncated file" + exit 1 + fi diff --git a/utils/valgrind/Makefile b/utils/valgrind/Makefile new file mode 100644 index 0000000..3e8cdcb --- /dev/null +++ b/utils/valgrind/Makefile @@ -0,0 +1,73 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=valgrind +PKG_VERSION:=3.3.1 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://valgrind.org/downloads/ +PKG_MD5SUM:=0539e2fa4aadb2cd4ca4bba65b1fe8b5 + +include $(INCLUDE_DIR)/package.mk + +define Package/valgrind + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@TARGET_x86||@TARGET_rdc||@TARGET_ps3||@TARGET_magicbox||@TARGET_amcc||@TARGET_uml + TITLE:=debugging and profiling Linux programs + URL:=http://www.valgrind.org +endef + +define Package/valgrind/description + Valgrind is an award-winning suite of tools for debugging and + profiling Linux programs. With the tools that come with Valgrind, + you can automatically detect many memory management and threading + bugs, avoiding hours of frustrating bug-hunting, making your + programs more stable. You can also perform detailed profiling, + to speed up and reduce memory use of your programs. +endef + +CONFIGURE_ARGS += \ + --disable-tls \ + --enable-only32bit \ + --without-x \ + --without-uiout \ + --disable-valgrindmi \ + --disable-tui \ + --disable-valgrindtk \ + --without-included-gettext + +DEFAULT_SUPP += "uclibc.supp" + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -c -o $(PKG_BUILD_DIR)/abort.o ./src/abort.c + $(TARGET_CROSS)ar rcu $(PKG_BUILD_DIR)/abort.a $(PKG_BUILD_DIR)/abort.o + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + AM_CFLAGS_X86_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \ + AM_CFLAGS_AMD64_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \ + AM_CFLAGS_PPC32_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \ + AM_CFLAGS_PPC64_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \ + TOOL_LDADD_COMMON="$(LIBGCC_A) $(PKG_BUILD_DIR)/abort.a" \ + all install +endef + +define Package/valgrind/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + $(INSTALL_BIN) ./files/valgrind.sh $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/valgrind + $(CP) ./files/uclibc.supp $(1)/usr/lib/valgrind/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/valgrind/*-linux $(1)/usr/lib/valgrind/ +endef + +$(eval $(call BuildPackage,valgrind)) diff --git a/utils/valgrind/files/uclibc.supp b/utils/valgrind/files/uclibc.supp new file mode 100644 index 0000000..e153266 --- /dev/null +++ b/utils/valgrind/files/uclibc.supp @@ -0,0 +1,212 @@ +{ + + Memcheck:Addr1 + fun:_dl_strdup + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_malloc + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Cond + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_add_elf_hash_table + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_add_elf_hash_table + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_add_elf_hash_table + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_check_if_named_library_is_loaded + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_check_if_named_library_is_loaded + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_check_hashed_files + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_check_hashed_files + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_load_elf_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_load_elf_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_load_elf_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_load_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_find_hash + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_find_hash + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_fixup + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_fixup + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_linux_resolve + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_linux_resolver + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_parse_lazy_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + obj:/lib/ld-uClibc* + fun:_dl_parse_lazy_relocation_information +} +{ + + Memcheck:Addr4 + fun:_dl_parse_lazy_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + obj:/lib/ld-uClibc* + fun:_dl_parse_lazy_relocation_information +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + fun:_dl_parse_lazy_relocation_information +} +{ + + Memcheck:Addr2 + obj:/lib/ld-uClibc* + fun:_dl_parse_relocation_information +} +{ + + Memcheck:Addr2 + fun:_dl_parse_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_parse_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + fun:_dl_parse_relocation_information +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + obj:/lib/ld-uClibc* + fun:_dl_parse_relocation_information +} +{ + + Memcheck:Addr2 + obj:/lib/ld-uClibc-0.9.28.so + fun:* +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc-0.9.28.so + fun:* +} diff --git a/utils/valgrind/files/valgrind.sh b/utils/valgrind/files/valgrind.sh new file mode 100644 index 0000000..4b8eb2e --- /dev/null +++ b/utils/valgrind/files/valgrind.sh @@ -0,0 +1,10 @@ +#!/bin/sh -e +# +# Valgrind wrapper + +# Use special suppression file for uClibc +export VALGRIND_OPTS="$VALGRIND_OPTS --suppressions=/usr/lib/valgrind/uclibc.supp" + +# Use 'exec' to avoid having another shell process hanging around. +exec $0.bin "$@" + diff --git a/utils/valgrind/patches/001-uclibc_syscall.patch b/utils/valgrind/patches/001-uclibc_syscall.patch new file mode 100644 index 0000000..8fe9fee --- /dev/null +++ b/utils/valgrind/patches/001-uclibc_syscall.patch @@ -0,0 +1,205 @@ +--- a/coregrind/m_syswrap/syswrap-amd64-linux.c ++++ b/coregrind/m_syswrap/syswrap-amd64-linux.c +@@ -1165,7 +1165,7 @@ + GENXY(__NR_times, sys_times), // 100 + PLAXY(__NR_ptrace, sys_ptrace), // 101 + GENX_(__NR_getuid, sys_getuid), // 102 +- // (__NR_syslog, sys_syslog), // 103 ++ LINXY(__NR_syslog, sys_syslog), // 103 + GENX_(__NR_getgid, sys_getgid), // 104 + + GENX_(__NR_setuid, sys_setuid), // 105 +--- a/include/vki/vki-linux.h ++++ b/include/vki/vki-linux.h +@@ -1582,7 +1582,9 @@ + + #define VKI_BLKROSET _VKI_IO(0x12,93) /* set device read-only (0 = read-write) */ + #define VKI_BLKROGET _VKI_IO(0x12,94) /* get read-only status (0 = read_write) */ ++#define VKI_BLKRRPART _VKI_IO(0x12,95) /* re-read partition table */ + #define VKI_BLKGETSIZE _VKI_IO(0x12,96) /* return device size /512 (long *arg) */ ++#define VKI_BLKFLSBUF _VKI_IO(0x12,97) /* flush buffer cache */ + #define VKI_BLKRASET _VKI_IO(0x12,98) /* set read ahead for block device */ + #define VKI_BLKRAGET _VKI_IO(0x12,99) /* get current read ahead setting */ + #define VKI_BLKFRASET _VKI_IO(0x12,100)/* set filesystem (mm/filemap.c) read-ahead */ +@@ -1657,6 +1659,54 @@ + //#define SG_GET_COMMAND_Q 0x2270 /* Yields 0 (queuing off) or 1 (on) */ + #define VKI_SG_SET_COMMAND_Q 0x2271 /* Change queuing state with 0 or 1 */ + ++ ++typedef struct vki_scsi_idlun ++{ ++ int mux4; ++ int host_unique_id; ++ ++} vki_scsi_idlun_t; ++#define VKI_SCSI_IOCTL_GET_IDLUN 0x5382 /* Gets a struct vki_scsi_idlun */ ++#define VKI_SCSI_IOCTL_PROBE_HOST 0x5385 /* Gets an arrary describing the SCSI host */ ++#define VKI_SCSI_IOCTL_GET_BUS_NUMBER 0x5386 /* Get the bus number for a device */ ++ ++//---------------------------------------------------------------------- ++// From linux-2.6.8.1/include/linux/fd.h ++//---------------------------------------------------------------------- ++#define VKI_FDRESET 0x254 /* Takes an int by value */ ++#define VKI_FDGETDRVTYP 0x20f /* Returns char floppy_drive_name[16] */ ++typedef struct vki_floppy_drive_struct { ++ unsigned long flags; ++ unsigned long spinup_date; ++ unsigned long select_date; ++ unsigned long first_read_date; ++ short probed_format; ++ short track; ++ short maxblock; ++ short maxtrack; ++ int generation; ++ int keep_data; ++ int fd_ref; ++ int fd_device; ++ unsigned long last_checked; ++ char *dmabuf; ++ int bufblocks; ++} vki_floppy_drive_struct_t; ++#define VKI_FDPOLLDRVSTAT 0x213 /* returns a struct floppy_drive_struct */ ++typedef struct vki_floppy_struct { ++ unsigned int size; ++ unsigned int sect; ++ unsigned int head; ++ unsigned int track; ++ unsigned int stretch; ++ unsigned char gap; ++ unsigned char rate; ++ unsigned char spec1; ++ unsigned char fmt_gap; ++ const char * name; ++} vki_floppy_struct_t; ++#define VKI_FDGETPRM 0x204 /* returns a struct floppy_struct */ ++ + //---------------------------------------------------------------------- + // From linux-2.6.8.1/include/linux/cdrom.h + //---------------------------------------------------------------------- +@@ -1666,6 +1716,7 @@ + (struct cdrom_tochdr) */ + #define VKI_CDROMREADTOCENTRY 0x5306 /* Read TOC entry + (struct cdrom_tocentry) */ ++#define VKI_CDROMEJECT 0x5309 /* Eject cdrom media */ + #define VKI_CDROMSUBCHNL 0x530b /* Read subchannel data + (struct cdrom_subchnl) */ + #define VKI_CDROMREADMODE2 0x530c /* Read CDROM mode 2 data (2336 Bytes) +--- a/coregrind/m_syswrap/syswrap-generic.c ++++ b/coregrind/m_syswrap/syswrap-generic.c +@@ -3288,6 +3288,33 @@ + case VKI_SG_GET_SG_TABLESIZE: /* 0x227f */ + PRE_MEM_WRITE( "ioctl(SG_GET_SG_TABLESIZE)", ARG3, sizeof(int) ); + break; ++ case VKI_SCSI_IOCTL_GET_IDLUN: ++ PRE_MEM_WRITE( "ioctl(SCSI_IOCTL_GET_IDLUN)", ARG3, sizeof(vki_scsi_idlun_t) ); ++ break; ++ case VKI_SCSI_IOCTL_PROBE_HOST: ++ { ++ int arraylen; ++ char *array = (char*)ARG3; ++ PRE_MEM_READ("ioctl(SCSI_IOCTL_PROBE_HOST)", ARG3, sizeof(char)*4 ); ++ arraylen = array[0] + (array[1]<<8) + (array[2]<<16) + (array[3]<<24); ++ PRE_MEM_WRITE( "ioctl(SCSI_IOCTL_PROBE_HOST)", ARG3, sizeof(char)*arraylen ); ++ } ++ break; ++ case VKI_SCSI_IOCTL_GET_BUS_NUMBER: ++ PRE_MEM_WRITE( "ioctl(SCSI_IOCTL_GET_BUS_NUMBER)", ARG3, sizeof(int) ); ++ break; ++ ++ case VKI_FDRESET: ++ break; ++ case VKI_FDGETDRVTYP: ++ PRE_MEM_WRITE( "ioctl(FDGETDRVTYP)", ARG3, sizeof(char)*16 ); ++ break; ++ case VKI_FDPOLLDRVSTAT: ++ PRE_MEM_WRITE( "ioctl(FDPOLLDRVSTAT)", ARG3, sizeof(vki_floppy_drive_struct_t) ); ++ break; ++ case VKI_FDGETPRM: ++ PRE_MEM_WRITE( "ioctl(FDGETPRM)", ARG3, sizeof(vki_floppy_struct_t) ); ++ break; + + case VKI_IIOCGETCPS: + PRE_MEM_WRITE( "ioctl(IIOCGETCPS)", ARG3, +@@ -3611,6 +3638,8 @@ + case VKI_BLKROGET: + PRE_MEM_WRITE( "ioctl(BLKROGET)", ARG3, sizeof(int)); + break; ++ case VKI_BLKRRPART: ++ break; + case VKI_BLKGETSIZE: + PRE_MEM_WRITE( "ioctl(BLKGETSIZE)", ARG3, sizeof(unsigned long)); + break; +@@ -3619,6 +3648,8 @@ + case VKI_BLKRAGET: + PRE_MEM_WRITE( "ioctl(BLKRAGET)", ARG3, sizeof(long)); + break; ++ case VKI_BLKFLSBUF: ++ break; + case VKI_BLKFRASET: + break; + case VKI_BLKFRAGET: +@@ -3685,6 +3716,8 @@ + PRE_MEM_WRITE( "ioctl(CDROMREADTOCENTRY)", ARG3, + sizeof(struct vki_cdrom_tocentry)); + break; ++ case VKI_CDROMEJECT: ++ break; + case VKI_CDROMMULTISESSION: /* 0x5310 */ + PRE_MEM_WRITE( "ioctl(CDROMMULTISESSION)", ARG3, + sizeof(struct vki_cdrom_multisession)); +@@ -4274,6 +4307,28 @@ + case VKI_SG_GET_SG_TABLESIZE: + POST_MEM_WRITE(ARG3, sizeof(int)); + break; ++ case VKI_SCSI_IOCTL_GET_IDLUN: ++ POST_MEM_WRITE(ARG3, sizeof(vki_scsi_idlun_t)); ++ break; ++ case VKI_SCSI_IOCTL_PROBE_HOST: ++ if (RES > 0 && ARG3 ) ++ POST_MEM_WRITE(ARG3, sizeof(char)*RES); ++ break; ++ case VKI_SCSI_IOCTL_GET_BUS_NUMBER: ++ POST_MEM_WRITE(ARG3, sizeof(int)); ++ break; ++ ++ case VKI_FDRESET: ++ break; ++ case VKI_FDGETDRVTYP: ++ POST_MEM_WRITE( ARG3, sizeof(char)*16 ); ++ break; ++ case VKI_FDPOLLDRVSTAT: ++ POST_MEM_WRITE( ARG3, sizeof(vki_floppy_drive_struct_t) ); ++ break; ++ case VKI_FDGETPRM: ++ POST_MEM_WRITE( ARG3, sizeof(vki_floppy_struct_t) ); ++ break; + + case VKI_IIOCGETCPS: + POST_MEM_WRITE( ARG3, VKI_ISDN_MAX_CHANNELS * 2 * sizeof(unsigned long) ); +@@ -4492,6 +4547,8 @@ + case VKI_BLKROGET: + POST_MEM_WRITE(ARG3, sizeof(int)); + break; ++ case VKI_BLKRRPART: ++ break; + case VKI_BLKGETSIZE: + POST_MEM_WRITE(ARG3, sizeof(unsigned long)); + break; +@@ -4500,6 +4557,8 @@ + case VKI_BLKRAGET: + POST_MEM_WRITE(ARG3, sizeof(long)); + break; ++ case VKI_BLKFLSBUF: ++ break; + case VKI_BLKFRASET: + break; + case VKI_BLKFRAGET: +@@ -4541,6 +4600,8 @@ + case VKI_CDROMREADTOCENTRY: + POST_MEM_WRITE(ARG3, sizeof(struct vki_cdrom_tocentry)); + break; ++ case VKI_CDROMEJECT: ++ break; + case VKI_CDROMMULTISESSION: + POST_MEM_WRITE(ARG3, sizeof(struct vki_cdrom_multisession)); + break; diff --git a/utils/valgrind/patches/002-fix_load_address_substitution.patch b/utils/valgrind/patches/002-fix_load_address_substitution.patch new file mode 100644 index 0000000..41031f6 --- /dev/null +++ b/utils/valgrind/patches/002-fix_load_address_substitution.patch @@ -0,0 +1,76 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -204,26 +204,30 @@ valt_load_address_x86_linux.lds: Makefil + $(CC) @FLAG_M32@ -Wl,--verbose -nostdlib 2>&1 | sed \ + -e '1,/^=====\+$$/d' \ + -e '/^=====\+$$/d' \ +- -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ ++ -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' \ ++ -e '/SEGMENT_START("text-segment", 0x[0-9A-Fa-f]\+)/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ + || rm -f $@ + + valt_load_address_amd64_linux.lds: Makefile + $(CC) -m64 -Wl,--verbose -nostdlib 2>&1 | sed \ + -e '1,/^=====\+$$/d' \ + -e '/^=====\+$$/d' \ +- -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ ++ -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' \ ++ -e '/SEGMENT_START("text-segment", 0x[0-9A-Fa-f]\+)/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ + || rm -f $@ + + valt_load_address_ppc32_linux.lds: Makefile + $(CC) @FLAG_M32@ -Wl,--verbose -nostdlib 2>&1 | sed \ + -e '1,/^=====\+$$/d' \ + -e '/^=====\+$$/d' \ +- -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ ++ -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' \ ++ -e '/SEGMENT_START("text-segment", 0x[0-9A-Fa-f]\+)/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ + || rm -f $@ + + valt_load_address_ppc64_linux.lds: Makefile + $(CC) -m64 -Wl,--verbose -nostdlib 2>&1 | sed \ + -e '1,/^=====\+$$/d' \ + -e '/^=====\+$$/d' \ +- -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ ++ -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' \ ++ -e '/SEGMENT_START("text-segment", 0x[0-9A-Fa-f]\+)/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ + || rm -f $@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -914,28 +914,32 @@ valt_load_address_x86_linux.lds: Makefil + $(CC) @FLAG_M32@ -Wl,--verbose -nostdlib 2>&1 | sed \ + -e '1,/^=====\+$$/d' \ + -e '/^=====\+$$/d' \ +- -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ ++ -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' \ ++ -e '/SEGMENT_START("text-segment", 0x[0-9A-Fa-f]\+)/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ + || rm -f $@ + + valt_load_address_amd64_linux.lds: Makefile + $(CC) -m64 -Wl,--verbose -nostdlib 2>&1 | sed \ + -e '1,/^=====\+$$/d' \ + -e '/^=====\+$$/d' \ +- -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ ++ -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' \ ++ -e '/SEGMENT_START("text-segment", 0x[0-9A-Fa-f]\+)/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ + || rm -f $@ + + valt_load_address_ppc32_linux.lds: Makefile + $(CC) @FLAG_M32@ -Wl,--verbose -nostdlib 2>&1 | sed \ + -e '1,/^=====\+$$/d' \ + -e '/^=====\+$$/d' \ +- -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ ++ -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' \ ++ -e '/SEGMENT_START("text-segment", 0x[0-9A-Fa-f]\+)/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ + || rm -f $@ + + valt_load_address_ppc64_linux.lds: Makefile + $(CC) -m64 -Wl,--verbose -nostdlib 2>&1 | sed \ + -e '1,/^=====\+$$/d' \ + -e '/^=====\+$$/d' \ +- -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ ++ -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' \ ++ -e '/SEGMENT_START("text-segment", 0x[0-9A-Fa-f]\+)/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ + || rm -f $@ + # 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/utils/valgrind/patches/100-a_out_header.patch b/utils/valgrind/patches/100-a_out_header.patch new file mode 100644 index 0000000..5a78926 --- /dev/null +++ b/utils/valgrind/patches/100-a_out_header.patch @@ -0,0 +1,10 @@ +--- a/coregrind/m_debuginfo/readstabs.c ++++ b/coregrind/m_debuginfo/readstabs.c +@@ -44,6 +44,7 @@ + #include "priv_readstabs.h" /* self */ + + /* --- !!! --- EXTERNAL HEADERS start --- !!! --- */ ++#define CONFIG_ARCH_SUPPORTS_AOUT /* XXX */ + #include /* stabs defns */ + /* --- !!! --- EXTERNAL HEADERS end --- !!! --- */ + diff --git a/utils/valgrind/src/abort.c b/utils/valgrind/src/abort.c new file mode 100644 index 0000000..0b4ad98 --- /dev/null +++ b/utils/valgrind/src/abort.c @@ -0,0 +1,3 @@ +void abort(void) +{ +} diff --git a/utils/vim/Makefile b/utils/vim/Makefile new file mode 100644 index 0000000..230b5d4 --- /dev/null +++ b/utils/vim/Makefile @@ -0,0 +1,174 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=vim +PKG_VERSION:=7.3 +PKG_RELEASE:=1 +VIMVER:=73 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.vim.org/pub/vim/unix/ +PKG_MD5SUM:=5b9510a17074e2b37d8bb38ae09edbf2 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(VIMVER) +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/vim/Default + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libncurses + TITLE:=Vi IMproved - enhanced vi editor + URL:=http://www.vim.org/ + SUBMENU:=Editors +endef + +define Package/vim + $(call Package/vim/Default) + TITLE+= (Tiny) +endef + +define Package/vim-full + $(call Package/vim/Default) + TITLE+= (Normal) +endef + +define Package/vim-runtime + $(call Package/vim/Default) + TITLE+= (runtime files) +endef + +define Package/vim-help + $(call Package/vim/Default) + TITLE+= (help files) +endef + +define Package/vim-full/conffiles +/usr/share/vim/vimrc +endef + +define Package/vim/conffiles +/usr/share/vim/vimrc +endef + +define Package/vim/description + Vim is an almost compatible version of the UNIX editor Vi. + (Tiny build) +endef + +define Package/vim-full/description + Vim is an almost compatible version of the UNIX editor Vi. + (Normal build) +endef + +define Package/vim-runtime/description + Vim is an almost compatible version of the UNIX editor Vi. + (Runtime files) +endef + +define Package/vim-help/description + Vim is an almost compatible version of the UNIX editor Vi. + (Help files) +endef + + +CONFIGURE_ARGS += \ + --disable-gui \ + --disable-gtktest \ + --disable-xim \ + --without-x \ + --disable-netbeans \ + --disable-cscope \ + --disable-gpm \ + --with-tlib=ncurses + +CONFIGURE_VARS += \ + vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_tgetent=zero \ + vim_cv_terminfo=yes \ + vim_cv_toupper_broken=no \ + vim_cv_tty_group=root \ + vim_cv_tty_mode=0620 + +ifneq ($(CONFIG_PACKAGE_vim),) +define Build/Compile/vim + $(call Build/Configure/Default, \ + --with-features=tiny \ + --disable-multibyte \ + ) + $(MAKE) -C $(PKG_BUILD_DIR) clean + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all + $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_tiny +endef +endif + +ifneq ($(CONFIG_PACKAGE_vim-full),) +define Build/Compile/vim-full + $(call Build/Configure/Default, \ + --with-features=normal \ + --enable-multibyte \ + ) + $(MAKE) -C $(PKG_BUILD_DIR) clean + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all + $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_normal +endef +endif + +define Build/Compile/vim-runtime + $(MAKE) -C $(PKG_BUILD_DIR)/src DESTDIR="$(PKG_INSTALL_DIR)" installrtbase + (cd $(PKG_INSTALL_DIR) && tar -cf $(PKG_BUILD_DIR)/docs.tar ./usr/share/vim/vim$(VIMVER)/doc) + rm -rf $(PKG_INSTALL_DIR)/usr/share/vim/vim$(VIMVER)/doc + rm -rf $(PKG_INSTALL_DIR)/usr/man +endef + +define Build/Configure +endef + +define Build/Compile +$(call Build/Compile/vim) +$(call Build/Compile/vim-full) +$(call Build/Compile/vim-runtime) +endef + +define Package/vim/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_tiny $(1)/usr/bin/vim + $(INSTALL_DIR) $(1)/usr/share/vim + $(INSTALL_CONF) ./files/vimrc $(1)/usr/share/vim/ +endef + + +define Package/vim-full/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_normal $(1)/usr/bin/vim + $(INSTALL_DIR) $(1)/usr/share/vim + $(INSTALL_CONF) ./files/vimrc.full $(1)/usr/share/vim/vimrc +endef + +define Package/vim-runtime/install + $(CP) $(PKG_INSTALL_DIR)/* $(1) + rm -rf $(1)/usr/share/vim/vim$(VIMVER)/doc +endef + +define Package/vim-help/install + tar -C $(1) -xf $(PKG_BUILD_DIR)/docs.tar +endef + +$(eval $(call BuildPackage,vim)) +$(eval $(call BuildPackage,vim-full)) +$(eval $(call BuildPackage,vim-runtime)) +$(eval $(call BuildPackage,vim-help)) + diff --git a/utils/vim/files/vimrc b/utils/vim/files/vimrc new file mode 100644 index 0000000..792d680 --- /dev/null +++ b/utils/vim/files/vimrc @@ -0,0 +1,13 @@ +set showcmd " Show (partial) command in status line. +set showmatch " Show matching brackets. +set ignorecase " Do case insensitive matching +set incsearch " Incremental search +set autowrite " Automatically save before commands like :next and :make +set nocompatible " Use Vim defaults instead of 100% vi compatibility +set backspace=indent,eol,start " more powerful backspacing +set autoindent " always set autoindenting on +set linebreak " Don't wrap words by default +set textwidth=0 " Don't wrap lines by default +set ruler " show the cursor position all the time + + diff --git a/utils/vim/files/vimrc.full b/utils/vim/files/vimrc.full new file mode 100644 index 0000000..65322f8 --- /dev/null +++ b/utils/vim/files/vimrc.full @@ -0,0 +1,24 @@ +set showcmd " Show (partial) command in status line. +set showmatch " Show matching brackets. +set ignorecase " Do case insensitive matching +set incsearch " Incremental search +set autowrite " Automatically save before commands like :next and :make +set nocompatible " Use Vim defaults instead of 100% vi compatibility +set backspace=indent,eol,start " more powerful backspacing +set autoindent " always set autoindenting on +set linebreak " Don't wrap words by default +set textwidth=0 " Don't wrap lines by default +set ruler " show the cursor position all the time +if filereadable(expand("$VIMRUNTIME/syntax/synload.vim")) + syntax on +endif +if has("syntax") && &term =~ "xterm" + set t_Co=8 + if has("terminfo") + set t_Sf=[3%p1%dm + set t_Sb=[4%p1%dm + else + set t_Sf=[3%dm + set t_Sb=[4%dm + endif +endif diff --git a/utils/vim/patches/001-cross_compile.patch b/utils/vim/patches/001-cross_compile.patch new file mode 100644 index 0000000..37ce89f --- /dev/null +++ b/utils/vim/patches/001-cross_compile.patch @@ -0,0 +1,35 @@ +--- vim73.org/src/auto/configure 2010-11-29 10:47:27.396117333 +0000 ++++ vim73/src/auto/configure 2010-11-29 10:48:52.301117332 +0000 +@@ -11641,34 +11641,8 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5 + $as_echo_n "checking uint32_t is 32 bits... " >&6; } +-if test "$cross_compiling" = yes; then : +- as_fn_error "could not compile program using uint32_t." "$LINENO" 5 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-#ifdef HAVE_STDINT_H +-# include +-#endif +-#ifdef HAVE_INTTYPES_H +-# include +-#endif +-main() { +- uint32_t nr1 = (uint32_t)-1; +- uint32_t nr2 = (uint32_t)0xffffffffUL; +- if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) exit(1); +- exit(0); +-} +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming ok" >&5 + $as_echo "ok" >&6; } +-else +- as_fn_error "WRONG! uint32_t not defined correctly." "$LINENO" 5 +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi diff --git a/utils/watchcat/Makefile b/utils/watchcat/Makefile new file mode 100644 index 0000000..f03c6e7 --- /dev/null +++ b/utils/watchcat/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2010 segal.di.ubi.pt +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=watchcat +PKG_VERSION:=1 +PKG_RELEASE:=5 + +include $(INCLUDE_DIR)/package.mk + +define Package/watchcat + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Enable the configuration of programed reboots + MAINTAINER:=Nuno Goncalves +endef + +define Package/watchcat/description +Allows to configure a periodically reboot, or after loosing internet connectivity. Configured trough UCI /etc/config/system. +endef + +define Package/watchcat/conffiles +/etc/config/system +endef + +define Build/Compile +endef + +define Package/watchcat/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/initd_watchcat $(1)/etc/init.d/watchcat + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) ./files/watchcat.sh $(1)/usr/bin/watchcat.sh + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/uci_defaults_watchcat $(1)/etc/uci-defaults/50-watchcat +endef + +$(eval $(call BuildPackage,watchcat)) diff --git a/utils/watchcat/files/initd_watchcat b/utils/watchcat/files/initd_watchcat new file mode 100644 index 0000000..36e353f --- /dev/null +++ b/utils/watchcat/files/initd_watchcat @@ -0,0 +1,108 @@ +#!/bin/sh /etc/rc.common + +START=97 + +PIDFILE="/tmp/run/watchcat" + +append_string() { + local varname="$1"; local add="$2"; local separator="${3:- }"; local actual + eval "actual=\$$varname" + + new="${actual:+$actual$separator}$add" + eval "$varname=\$new" +} + +timetoseconds() { + local time=$1 + unset seconds + + { [ "$time" -ge 1 ] 2> /dev/null && seconds="$time"; } || \ + { [ "${time%s}" -ge 1 ] 2> /dev/null && seconds="${time%s}"; } || \ + { [ "${time%m}" -ge 1 ] 2> /dev/null && seconds=$((${time%m}*60)); } || \ + { [ "${time%h}" -ge 1 ] 2> /dev/null && seconds=$((${time%h}*3600)); } || \ + { [ "${time%d}" -ge 1 ] 2> /dev/null && seconds=$((${time%d}*86400)); } +} + +load_watchcat() { + config_get period $1 period + config_get mode $1 mode "allways" + config_get pinghosts $1 pinghosts "8.8.8.8" + config_get pingperiod $1 pingperiod + config_get forcedelay $1 forcedelay "0" + + error="" + + timetoseconds "$period" + period="$seconds" + [ "$period" -ge 1 ] \ + || append_string "error" 'period is not a valid time value (ex: "30"; "4m"; "6h"; "2d")' "; " + [ "$mode" = "allways" -o "$mode" = "ping" ] \ + || append_string "error" "mode must be 'allways' or 'ping'" "; " + [ -n "$pinghosts" -o "$mode" = "allways" ] \ + || append_string "error" "pinghosts must be set when in 'ping' mode" "; " + [ "$mode" = "ping" ] && { + if [ -n "$pingperiod" ] + then + timetoseconds "$pingperiod" + pingperiod="$seconds" + if [ "$pingperiod" -ge 0 ] + then + [ "$pingperiod" -le "$period" ] \ + || append_string "error" "pingperiod must be less than period" "; " + else + append_string "error" 'pingperiod is not a valid time value (ex: "30"; "4m"; "6h"; "2d")' "; " + fi + else + pingperiod="$((period/20))" + fi + } + [ "$pingperiod" -lt "$period" -o "$mode" = "allways" ] \ + || append_string "error" "pingperiod is not recognized" "; " + [ "$forcedelay" -ge 0 ] \ + || append_string "error" "forcedelay must be a integer greater or equal than 0, where 0 means disabled" "; " + + [ -n "$error" ] && { logger -p user.err -t "watchcat" "reboot program $1 not started - $error"; return; } + + if [ "$mode" = "allways" ] + then + /usr/bin/watchcat.sh "allways" "$period" "$forcedelay" & + logger -p user.info -t "wathchat" "started task (mode=$mode;period=$period;forcedelay=$forcedelay)" + else + /usr/bin/watchcat.sh "period" "$period" "$forcedelay" "$pinghosts" "$pingperiod" & + logger -p user.info -t "wathchat" "started task (mode=$mode;period=$period;pinghosts=$pinghosts;pingperiod=$pingperiod;forcedelay=$forcedelay)" + fi + + echo $! >> "${PIDFILE}.pids" +} + +stop() { + if [ -f "${PIDFILE}.pids" ] + then + logger -p user.info -t "watchcat" "stopping all tasks" + + while read pid + do + kill "$pid" + done < "${PIDFILE}.pids" + + rm "${PIDFILE}.pids" + + logger -p user.info -t "watchcat" "all tasks stopped" + else + logger -p user.info -t "watchcat" "no tasks running" + fi +} + +start() { + [ -f "${PIDFILE}.pids" ] && stop + + config_load system + if [ -n "$(uci show system.@watchcat[0])" ] # at least one watchcat section exists + then + logger -p user.info -t "watchcat" "starting all tasks" + config_foreach load_watchcat watchcat + logger -p user.info -t "watchcat" "all tasks started" + else + logger -p user.info -t "watchcat" "no tasks defined" + fi +} diff --git a/utils/watchcat/files/uci_defaults_watchcat b/utils/watchcat/files/uci_defaults_watchcat new file mode 100644 index 0000000..1c457d7 --- /dev/null +++ b/utils/watchcat/files/uci_defaults_watchcat @@ -0,0 +1,10 @@ +#!/bin/sh + +[ -n "$(uci -q show system.@watchcat[0])" ] || { + uci add system watchcat + uci set system.@watchcat[0].period=6h + uci set system.@watchcat[0].mode=ping + uci set system.@watchcat[0].pinghosts=8.8.8.8 + uci set system.@watchcat[0].forcedelay=30 + uci commit +} diff --git a/utils/watchcat/files/watchcat.sh b/utils/watchcat/files/watchcat.sh new file mode 100644 index 0000000..ee9b6bd --- /dev/null +++ b/utils/watchcat/files/watchcat.sh @@ -0,0 +1,69 @@ +#!/bin/sh + +mode="$1" + +shutdown_now() { + local forcedelay="$1" + + reboot & + + [ "$forcedelay" -ge 1 ] && { + sleep "$forcedelay" + + echo b > /proc/sysrq-trigger # Will immediately reboot the system without syncing or unmounting your disks. + } +} + +watchcat_allways() { + local period="$1"; local forcedelay="$2" + + sleep "$period" && shutdown_now "$forcedelay" +} + +watchcat_ping() { + local period="$1"; local forcedelay="$2"; local pinghosts="$3"; local pingperiod="$4" + + time_now="$(cat /proc/uptime)" + time_now="${time_now%%.*}" + time_lastcheck="$time_now" + time_lastcheck_withinternet="$time_now" + + while true + do + # account for the time ping took to return. With a ping time of 5s, ping might take more than that, so it is important to avoid even more delay. + time_now="$(cat /proc/uptime)" + time_now="${time_now%%.*}" + time_diff="$((time_now-time_lastcheck))" + + [ "$time_diff" -lt "$pingperiod" ] && { + sleep_time="$((pingperiod-time_diff))" + sleep "$sleep_time" + } + + time_now="$(cat /proc/uptime)" + time_now="${time_now%%.*}" + time_lastcheck="$time_now" + + for host in "$pinghosts" + do + if ping -c 1 "$host" &> /dev/null + then + time_lastcheck_withinternet="$time_now" + else + time_diff="$((time_now-time_lastcheck_withinternet))" + logger -p daemon.info -t "watchcat[$$]" "no internet connectivity for $time_diff seconds. Reseting when reaching $period" + fi + done + + time_diff="$((time_now-time_lastcheck_withinternet))" + [ "$time_diff" -ge "$period" ] && shutdown_now "$forcedelay" + + done +} + + if [ "$mode" = "allways" ] + then + watchcat_allways "$2" "$3" + else + watchcat_ping "$2" "$3" "$4" "$5" + fi diff --git a/utils/wattsup/Makefile b/utils/wattsup/Makefile new file mode 100644 index 0000000..ced69d8 --- /dev/null +++ b/utils/wattsup/Makefile @@ -0,0 +1,31 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wattsup +PKG_RELEASE:=1 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/wattsup + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Wattsup polling utility +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + +define Package/wattsup/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wattsup $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,wattsup)) diff --git a/utils/wattsup/src/Makefile b/utils/wattsup/src/Makefile new file mode 100644 index 0000000..b9a687a --- /dev/null +++ b/utils/wattsup/src/Makefile @@ -0,0 +1,8 @@ +wattsup: wattsup.o + $(CC) $(LDFLAGS) wattsup.o -o wattsup + +wattsup.o: wattsup.c + $(CC) $(CFLAGS) -c wattsup.c + +clean: + rm *.o wattsup diff --git a/utils/wattsup/src/wattsup.c b/utils/wattsup/src/wattsup.c new file mode 100644 index 0000000..8b26ad6 --- /dev/null +++ b/utils/wattsup/src/wattsup.c @@ -0,0 +1,1877 @@ +/* + * wattsup - Program for controlling the Watts Up? Pro Device + * + * + * Copyright (c) 2005 Patrick Mochel + * + * This program is released under the GPLv2 + * + * + * Compiled with: + * + * gcc -O2 -Wall -o wattsup wattsup.c + * + */ + +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +static const char * wu_version = "0.02"; + + +#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) + +static const char * prog_name = "wattsup"; + +static const char * sysfs_path_start = "/sys/class/tty"; + +static char * wu_device = "ttyUSB0"; +static int wu_fd = 0; +static int wu_count = 0; +static int wu_debug = 0; +static char *wu_delim = ", "; +static int wu_final = 0; +static int wu_interval = 1; +static int wu_label = 0; +static int wu_newline = 0; +static int wu_suppress = 0; + +static int wu_localtime = 0; +static int wu_gmtime = 0; + +static int wu_info_all = 0; +static int wu_no_data = 0; +static int wu_set_only = 0; + +#define wu_strlen 256 +#define wu_num_fields 18 +#define wu_param_len 16 + +struct wu_packet { + unsigned int cmd; + unsigned int sub_cmd; + unsigned int count; + char buf[wu_strlen]; + int len; + char * field[wu_num_fields]; + char * label[wu_num_fields]; +}; + + +struct wu_data { + unsigned int watts; + unsigned int volts; + unsigned int amps; + unsigned int watt_hours; + + unsigned int cost; + unsigned int mo_kWh; + unsigned int mo_cost; + unsigned int max_watts; + + unsigned int max_volts; + unsigned int max_amps; + unsigned int min_watts; + unsigned int min_volts; + + unsigned int min_amps; + unsigned int power_factor; + unsigned int duty_cycle; + unsigned int power_cycle; +}; + +struct wu_options { + char * longopt; + int shortopt; + int param; + int flag; + char * value; + + char * descr; + char * option; + char * format; + + int (*show)(int dev_fd); + int (*store)(int dev_fd); +}; + +enum { + wu_option_help = 0, + wu_option_version, + + wu_option_debug, + + wu_option_count, + wu_option_final, + + wu_option_delim, + wu_option_newline, + wu_option_localtime, + wu_option_gmtime, + wu_option_label, + + wu_option_suppress, + + wu_option_cal, + wu_option_header, + + wu_option_interval, + wu_option_mode, + wu_option_user, + + wu_option_info_all, + wu_option_no_data, + wu_option_set_only, +}; + + +static char * wu_option_value(unsigned int index); + + +enum { + wu_field_watts = 0, + wu_field_volts, + wu_field_amps, + + wu_field_watt_hours, + wu_field_cost, + wu_field_mo_kwh, + wu_field_mo_cost, + + wu_field_max_watts, + wu_field_max_volts, + wu_field_max_amps, + + wu_field_min_watts, + wu_field_min_volts, + wu_field_min_amps, + + wu_field_power_factor, + wu_field_duty_cycle, + wu_field_power_cycle, +}; + +struct wu_field { + unsigned int enable; + char * name; + char * descr; +}; + +static struct wu_field wu_fields[wu_num_fields] = { + [wu_field_watts] = { + .name = "watts", + .descr = "Watt Consumption", + }, + + [wu_field_min_watts] = { + .name = "min-watts", + .descr = "Minimum Watts Consumed", + }, + + [wu_field_max_watts] = { + .name = "max-watts", + .descr = "Maxium Watts Consumed", + }, + + [wu_field_volts] = { + .name = "volts", + .descr = "Volts Consumption", + }, + + [wu_field_min_volts] = { + .name = "max-volts", + .descr = "Minimum Volts Consumed", + }, + + [wu_field_max_volts] = { + .name = "min-volts", + .descr = "Maximum Volts Consumed", + }, + + [wu_field_amps] = { + .name = "amps", + .descr = "Amp Consumption", + }, + + [wu_field_min_amps] = { + .name = "min-amps", + .descr = "Minimum Amps Consumed", + }, + + [wu_field_max_amps] = { + .name = "max-amps", + .descr = "Maximum Amps Consumed", + }, + + [wu_field_watt_hours] = { + .name = "kwh", + .descr = "Average KWH", + }, + + [wu_field_mo_kwh] = { + .name = "mo-kwh", + .descr = "Average monthly KWH", + }, + + [wu_field_cost] = { + .name = "cost", + .descr = "Cost per watt", + }, + + [wu_field_mo_cost] = { + .name = "mo-cost", + .descr = "Monthly Cost", + }, + + [wu_field_power_factor] = { + .name = "power-factor", + .descr = "Ratio of Watts vs. Volt Amps", + }, + + [wu_field_duty_cycle] = { + .name = "duty-cycle", + .descr = "Percent of the Time On vs. Time Off", + }, + + [wu_field_power_cycle] = { + .name = "power-cycle", + .descr = "Indication of power cycle", + }, + +}; + + + +static void msg_start(const char * fmt, ...) +{ + va_list(ap); + va_start(ap, fmt); + vprintf(fmt, ap); + va_end(ap); +} + +static void msg_end(void) +{ + printf("\n"); +} + +static void msg(const char * fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vprintf(fmt, ap); + va_end(ap); +} + +static void dbg(const char * fmt, ...) +{ + va_list ap; + + if (wu_debug) { + va_start(ap, fmt); + msg_start("%s: [debug] ", prog_name); + vprintf(fmt, ap); + msg_end(); + va_end(ap); + } +} + +static void err(const char * fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + fprintf(stderr, "%s: [error] ", prog_name); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); +} + +static void perr(const char * fmt, ...) +{ + char buf[1024]; + int n; + va_list ap; + + va_start(ap, fmt); + n = sprintf(buf, "%s: [error] ", prog_name); + vsnprintf(buf + n, sizeof(buf) - n, fmt, ap); + perror(buf); + va_end(ap); +} + +static int ret_err(int err) +{ + errno = err; + return -1; +} + + +static void print_packet(struct wu_packet * p, char * str) +{ + int i; + + if (!wu_suppress) + msg_start("Watts Up? %s\n", str); + for (i = 0; i< p->count; i++) { + if (i) + msg("%s", wu_newline ? "\n" : wu_delim); + if (wu_label) + msg("[%s] ", p->label[i]); + msg(p->field[i]); + } + msg_end(); +} + + +static void print_time(void) +{ + time_t t; + struct tm * tm; + + if (wu_localtime || wu_gmtime) { + time(&t); + + if (wu_localtime) + tm = localtime(&t); + else + tm = gmtime(&t); + + msg("[%02d:%02d:%02d] ", + tm->tm_hour, tm->tm_min, tm->tm_sec); + } +} + +static void print_packet_filter(struct wu_packet * p, + int (*filter_ok)(struct wu_packet * p, int i, char * str)) +{ + char buf[256]; + int printed; + int i; + + print_time(); + for (i = 0, printed = 0; i< p->count; i++) { + if (!filter_ok(p, i, buf)) + continue; + + if (printed++) + msg("%s", wu_newline ? "\n" : wu_delim); + if (wu_label) + msg("[%s] ", p->label[i]); + msg(buf); + } + msg_end(); +} + + +/* + * Device should be something like "ttyS0" + */ + +static int open_device(char * device_name, int * dev_fd) +{ + struct stat s; + int ret; + int cur_fd; + + cur_fd = open(".", O_RDONLY); + if (cur_fd< 0) { + perr("Could not open current directory."); + return cur_fd; + } + + ret = chdir(sysfs_path_start); + if (ret) { + perr(sysfs_path_start); + return ret; + } + + /* + * First, check if /sys/class/tty// exists. + */ + + dbg("Checking sysfs path: %s/%s", sysfs_path_start, device_name); + + ret = stat(device_name,&s); + if (ret< 0) { + perr(device_name); + goto Done; + } + + if (!S_ISDIR(s.st_mode)) { + errno = -ENOTDIR; + err("%s is not a TTY device.", device_name); + goto Done; + } + + dbg("%s is a registered TTY device", device_name); + + fchdir(cur_fd); + + + /* + * Check if device node exists and is writable + */ + chdir("/dev"); + + ret = stat(device_name,&s); + if (ret< 0) { + perr("/dev/%s (device node)", device_name); + goto Done; + } + + if (!S_ISCHR(s.st_mode)) { + errno = -ENOTTY; + ret = -1; + err("%s is not a TTY character device.", device_name); + goto Done; + } + + dbg("%s has a device node", device_name); + + ret = access(device_name, R_OK | W_OK); + if (ret) { + perr("%s: Not writable?", device_name); + goto Done; + } + + ret = open(device_name, O_RDWR | O_NONBLOCK); + if (ret< 0) { + perr("Could not open %s"); + goto Done; + } + *dev_fd = ret; + ret = 0; +Done: + fchdir(cur_fd); + close(cur_fd); + return ret; +} + + +static int setup_serial_device(int dev_fd) +{ + struct termios t; + int ret; + + ret = tcgetattr(dev_fd,&t); + if (ret) + return ret; + + cfmakeraw(&t); + cfsetispeed(&t, B115200); + cfsetospeed(&t, B115200); + tcflush(dev_fd, TCIFLUSH); + + t.c_iflag |= IGNPAR; + t.c_cflag&= ~CSTOPB; + ret = tcsetattr(dev_fd, TCSANOW,&t); + + if (ret) { + perr("setting terminal attributes"); + return ret; + } + + return 0; +} + + +static int wu_write(int fd, struct wu_packet * p) +{ + int ret; + int n; + int i; + char * s = p->buf; + + memset(p->buf, 0, sizeof(p->buf)); + n = sprintf(p->buf, "#%c,%c,%d", p->cmd, p->sub_cmd, p->count); + p->len = n; + s = p->buf + n; + + for (i = 0; i< p->count; i++) { + if ((p->len + strlen(p->field[i]) + 4)>= sizeof(p->buf)) { + err("Overflowed command string"); + return ret_err(EOVERFLOW); + } + n = sprintf(s, ",%s", p->field[i]); + s += n; + p->len += n; + } + p->buf[p->len++] = ';'; + + dbg("Writing '%s' (strlen = %d) (len = %d) to device", + p->buf, strlen(p->buf), p->len); + ret = write(fd, p->buf, p->len); + if (ret != p->len) + perr("Writing to device"); + + return ret>= 0 ? 0 : ret; +} + + +static void dump_packet(struct wu_packet * p) +{ + int i; + + dbg("Packet - Command '%c' %d parameters", p->cmd, p->count); + + for (i = 0; i< p->count; i++) + dbg("[%2d] [%20s] = \"%s\"", i, p->label[i], p->field[i]); +} + + +static int parse_packet(struct wu_packet * p) +{ + char * s, *next; + int i; + + p->buf[p->len] = '\0'; + + dbg("Parsing Packet, Raw buffer is (%d bytes) [%s]", + p->len, p->buf); + + s = p->buf; + + /* + * First character should be '#' + */ + if (s) { + s = strchr(s, '#'); + if (s) + s++; + else { + dbg("Invalid packet"); + return ret_err(EFAULT); + } + } else { + dbg("Invalid packet"); + return ret_err(EFAULT); + } + + /* + * Command character is first + */ + next = strchr(s, ','); + if (next) { + p->cmd = *s; + s = ++next; + } else { + dbg("Invalid Command field [%s]", s); + return ret_err(EFAULT); + } + + /* + * Next character is the subcommand, and should be '-' + * Though, it doesn't matter, because we just + * discard it anyway. + */ + next = strchr(s, ','); + if (next) { + p->sub_cmd = *s; + s = ++next; + } else { + dbg("Invalid 2nd field"); + return ret_err(EFAULT); + } + + /* + * Next is the number of parameters, + * which should always be> 0. + */ + next = strchr(s, ','); + if (next) { + *next++ = '\0'; + p->count = atoi(s); + s = next; + } else { + dbg("Couldn't determine number of parameters"); + return ret_err(EFAULT); + } + + dbg("Have %d parameter%s (cmd = '%c')", + p->count, p->count> 1 ? "s" : "", p->cmd); + + /* + * Now, we loop over the rest of the string, + * storing a pointer to each in p->field[]. + * + * The last character was originally a ';', but may have been + * overwritten with a '\0', so we make sure to catch + * that when converting the last parameter. + */ + for (i = 0; i< p->count; i++) { + next = strpbrk(s, ",;"); + if (next) { + *next++ = '\0'; + } else { + if (i< (p->count - 1)) { + dbg("Malformed parameter string [%s]", s); + return ret_err(EFAULT); + } + } + + /* + * Skip leading white space in fields + */ + while (isspace(*s)) + s++; + p->field[i] = s; + s = next; + } + dump_packet(p); + return 0; +} + + +static int wu_read(int fd, struct wu_packet * p) +{ + fd_set read_fd; + struct timeval tv; + int ret; + + FD_ZERO(&read_fd); + FD_SET(fd,&read_fd); + + tv.tv_sec = 2; + tv.tv_usec = 0; + + ret = select(fd + 1,&read_fd, NULL, NULL,&tv); + if (ret< 0) { + perr("select on terminal device"); + return ret; + } else if (ret> 0) { + + ret = read(fd, p->buf, wu_strlen); + if (ret< 0) { + perr("Reading from device"); + return ret; + } + p->len = ret; + } else { + dbg("Device timed out while reading"); + return ret_err(ETIME); + } + return parse_packet(p); +} + + +static int wu_show_header(int fd) +{ + struct wu_packet p = { + .cmd = 'H', + .sub_cmd = 'R', + .count = 0, + .label = { + [0] = "watts header", + [1] = "volts header", + [2] = "amps header", + [3] = "kWh header", + [4] = "cost header", + [5] = "mo. kWh header", + [6] = "mo. cost header", + [7] = "max watts header", + [8] = "max volts header", + [9] = "max amps header", + [10] = "min watts header", + [11] = "min volts header", + [12] = "min amps header", + [13] = "power factor header", + [14] = "duty cycle header", + [15] = "power cycle header", + } + }; + int ret; + + ret = wu_write(fd,&p); + if (ret) { + perr("Requesting header strings"); + return ret; + } + sleep(1); + + ret = wu_read(fd,&p); + if (ret) { + perr("Reading header strings"); + return ret; + } + + print_packet(&p, "Header Record"); + + return 0; +} + + +static int wu_show_cal(int fd) +{ + struct wu_packet p = { + .cmd = 'F', + .sub_cmd = 'R', + .count = 0, + .label = { + [0] = "flags", + [1] = "sample count", + [2] = "volts gain", + [3] = "volts bias", + [4] = "amps gain", + [5] = "amps bias", + [6] = "amps offset", + [7] = "low amps gain", + [8] = "low amps bias", + [9] = "low amps offset", + [10] = "watts gain", + [11] = "watts offset", + [12] = "low watts gain", + [13] = "low watts offset", + }, + }; + int ret; + + ret = wu_write(fd,&p); + if (ret) { + perr("Requesting calibration parameters"); + return ret; + } + sleep(1); + + ret = wu_read(fd,&p); + if (ret) { + perr("Reading header strings"); + return ret; + } + print_packet(&p, "Calibration Settings"); + + return 0; +} + +static int wu_start_log(void) +{ + struct wu_packet p = { + .cmd = 'L', + .sub_cmd = 'W', + .count = 3, + .field = { + [0] = "E", + [1] = "1", + [2] = "1", + }, + }; + int ret; + + /* + * Start up logging + */ + ret = wu_write(wu_fd,&p); + if (!ret) + sleep(1); + else { + perr("Starting External Logging"); + return ret; + } + return ret; +} + +static int wu_stop_log(void) +{ + struct wu_packet p = { + .cmd = 'L', + .sub_cmd = 'R', + .count = 0, + .label = { + [0] = "time stamp", + [1] = "interval", + }, + }; + int ret; + + /* + * Stop logging and read time stamp. + */ + ret = wu_write(wu_fd,&p); + if (ret) { + perr("Stopping External Logging"); + return ret; + } + sleep(1); + + ret = wu_read(wu_fd,&p); + if (ret) { + perr("Reading final time stamp"); + return ret; + } + if (wu_final) + print_packet(&p, "Final Time Stamp and Interval"); + return ret; +} + +static int filter_data(struct wu_packet * p, int i, char * buf) +{ + if (i< wu_num_fields) { + if (wu_fields[i].enable) { + double val = strtod(p->field[i], NULL); + snprintf(buf, 256, "%.1f", val / 10.0); + return 1; + } + } + return 0; +} + +static int wu_clear(int fd) +{ + struct wu_packet p = { + .cmd = 'R', + .sub_cmd = 'W', + .count = 0, + }; + int ret; + + /* + * Clear the memory + */ + ret = wu_write(fd,&p); + if (ret) + perr("Clearing memory"); + else + sleep(2); + + /* + * Dummy read + */ + wu_read(fd,&p); + return ret; + +} + +static int wu_read_data(int fd) +{ + struct wu_packet p = { + .label = { + [0] = "watts", + [1] = "volts", + [2] = "amps", + [3] = "watt hours", + [4] = "cost", + [5] = "mo. kWh", + [6] = "mo. cost", + [7] = "max watts", + [8] = "max volts", + [9] = "max amps", + [10] = "min watts", + [11] = "min volts", + [12] = "min amps", + [13] = "power factor", + [14] = "duty cycle", + [15] = "power cycle", + }, + }; + int num_read = 0; + int retry = 0; + int ret; + int i; + + static const int wu_max_retry = 2; + + i = 0; + while (1) { + + ret = wu_read(fd,&p); + if (ret) { + if (++retry< wu_max_retry) { + dbg("Bad record back, retrying\n"); + sleep(wu_interval); + continue; + } else if (retry == wu_max_retry) { + dbg("Still couldn't get a good record, resetting\n"); + wu_stop_log(); + wu_clear(fd); + wu_start_log(); + num_read = 0; + sleep(wu_interval); + continue; + } + perr("Blech. Giving up on read"); + break; + } else if (retry) + retry = 0; + + dbg("[%d] ", num_read); + num_read++; + print_packet_filter(&p, filter_data); + + if (wu_count&& (++i == wu_count)) + break; + + sleep(wu_interval); + } + return 0; + +} + + +static int wu_show_interval(int fd) +{ + struct wu_packet p = { + .cmd = 'S', + .sub_cmd = 'R', + .count = 0, + .label = { + [0] = "reserved", + [1] = "interval", + }, + }; + int ret; + + ret = wu_write(fd,&p); + if (ret) { + perr("Requesting interval"); + return ret; + } + sleep(1); + + ret = wu_read(fd,&p); + if (ret) { + perr("Reading interval"); + return ret; + } + print_packet(&p, "Interval Settings"); + + return 0; +} + +static int wu_write_interval(int fd, unsigned int seconds, + unsigned int interval) +{ + char str_seconds[wu_param_len]; + char str_interval[wu_param_len]; + struct wu_packet p = { + .cmd = 'S', + .sub_cmd = 'W', + .count = 2, + .field = { + [0] = str_seconds, + [1] = str_interval, + }, + }; + int ret; + + snprintf(str_seconds, wu_param_len, "%ud", seconds); + snprintf(str_interval, wu_param_len, "%ud", interval); + + ret = wu_write(fd,&p); + if (ret) { + perr("Setting Sampling Interval"); + return ret; + } + sleep(1); + return 0; +} + +static int wu_store_interval(int fd) +{ + char * s = wu_option_value(wu_option_interval); + char * end; + + wu_interval = strtol(s,&end, 0); + if (*end) { + err("Invalid interval: %s", s); + return ret_err(EINVAL); + } + return wu_write_interval(fd, 1, wu_interval); +} + +static int wu_show_mode(int fd) +{ + struct wu_packet p = { + .cmd = 'M', + .sub_cmd = 'R', + .count = 0, + .label = { + [0] = "display mode", + }, + }; + int ret; + + ret = wu_write(fd,&p); + if (ret) { + perr("Requesting device display mode"); + return ret; + } + + ret = wu_read(fd,&p); + if (ret) { + perr("Reaing device display mode"); + return ret; + } + dump_packet(&p); + return ret; +} + +static int wu_write_mode(int fd, int mode) +{ + char str_mode[wu_param_len]; + struct wu_packet p = { + .cmd = 'M', + .sub_cmd = 'W', + .count = 1, + .field = { + [0] = str_mode, + }, + }; + int ret; + + snprintf(str_mode, wu_param_len, "%ud", mode); + ret = wu_write(fd,&p); + if (ret) + perr("Setting device display mode"); + else + sleep(1); + return ret; +} + +static int wu_store_mode(int fd) +{ + char * s = wu_option_value(wu_option_mode); + char * end; + unsigned int mode; + + mode = strtol(s,&end, 0); + if (*end) { + err("Invalid mode: %s", s); + return ret_err(EINVAL); + } + return wu_write_mode(fd, mode); +} + + + +static int wu_show_user(int fd) +{ + struct wu_packet p = { + .cmd = 'U', + .sub_cmd = 'R', + .count = 0, + .label = { + [0] = "cost per kWh", + [1] = "2nd tier cost", + [2] = "2nd tier threshold", + [3] = "duty cycle threshold", + }, + }; + int ret; + + ret = wu_write(fd,&p); + if (ret) { + perr("Requesting user parameters"); + return ret; + } + sleep(1); + + ret = wu_read(fd,&p); + if (ret) { + perr("Reading user parameters"); + return ret; + } + print_packet(&p, "User Settings"); + return 0; +} + + +static int wu_write_user(int fd, unsigned int kwh_cost, + unsigned int second_tier_cost, + unsigned int second_tier_threshold, + unsigned int duty_cycle_threshold) +{ + char str_kwh_cost[wu_param_len]; + char str_2nd_tier_cost[wu_param_len]; + char str_2nd_tier_threshold[wu_param_len]; + char str_duty_cycle_threshold[wu_param_len]; + + struct wu_packet p = { + .cmd = 'U', + .sub_cmd = 'R', + .count = 0, + .label = { + [0] = str_kwh_cost, + [1] = str_2nd_tier_cost, + [2] = str_2nd_tier_threshold, + [3] = str_duty_cycle_threshold, + }, + }; + int ret; + + snprintf(str_kwh_cost, wu_param_len, "%ud", kwh_cost); + snprintf(str_2nd_tier_cost, wu_param_len, "%ud", + second_tier_cost); + snprintf(str_2nd_tier_threshold, wu_param_len, "%ud", + second_tier_threshold); + snprintf(str_duty_cycle_threshold, wu_param_len, "%ud", + duty_cycle_threshold); + + ret = wu_write(fd,&p); + if (ret) + perr("Writing user parameters"); + else + sleep(1); + return ret; +} + +static int wu_store_user(int fd) +{ + unsigned int kwh_cost; + unsigned int second_tier_cost; + unsigned int second_tier_threshold; + unsigned int duty_cycle_threshold; + char * buf = wu_option_value(wu_option_user); + char * s = buf; + char * next; + + if (!buf) { + err("No user parameters?"); + return ret_err(EINVAL); + } + + kwh_cost = strtoul(s,&next, 0); + if (next == s) { + err("Incomplete user parameters"); + return ret_err(EINVAL); + } + + s = next; + while (s&& !isdigit(*s)) + s++; + if (!s) { + err("Incomplete user parameters"); + return ret_err(EINVAL); + } + + + second_tier_cost = strtoul(s,&next, 0); + if (next == s) { + err("Incomplete user parameters"); + return ret_err(EINVAL); + } + + s = next; + while (s&& !isdigit(*s)) + s++; + if (!s) { + err("Incomplete user parameters"); + return ret_err(EINVAL); + } + + + second_tier_threshold = strtoul(s,&next, 0); + if (next == s) { + err("Incomplete user parameters"); + return ret_err(EINVAL); + } + + s = next; + while (s&& !isdigit(*s)) + s++; + if (!s) { + err("Incomplete user parameters"); + return ret_err(EINVAL); + } + + + duty_cycle_threshold = strtoul(s,&next, 0); + if (next == s) { + err("Incomplete user parameters"); + return ret_err(EINVAL); + } + + s = next; + while (s&& !isdigit(*s)) + s++; + if (!s) { + err("Incomplete user parameters"); + return ret_err(EINVAL); + } + + return wu_write_user(fd, kwh_cost, second_tier_cost, + second_tier_threshold, duty_cycle_threshold); +} + + +static void enable_field(char * name) +{ + int i; + + for (i = 0; i< wu_num_fields; i++) { + if (!strcasecmp(wu_fields[i].name, name)) { + wu_fields[i].enable = 1; + break; + } + } +} + +static void enable_all_fields(void) +{ + int i; + + for (i = 0; i< wu_num_fields; i++) + wu_fields[i].enable = 1; +} + + + +static int wu_show_help(int); +static int wu_show_version(int); + + + +static int wu_store_count(int unused) +{ + char * s = wu_option_value(wu_option_count); + char * end; + + if (s) { + wu_count = strtol(s,&end, 0); + if (*end) { + err("Bad count field"); + return ret_err(EINVAL); + } + } + return 0; +} + +static int wu_store_debug(int unused) +{ + wu_debug = 1; + return 0; +} + +static int wu_store_delim(int unused) +{ + char * s = wu_option_value(wu_option_delim); + + if (s) + wu_delim = s; + return 0; +} + +static int wu_store_final(int unused) +{ + wu_final = 1; + return 0; +} + +static int wu_store_label(int unused) +{ + wu_label = 1; + return 0; +} + +static int wu_store_newline(int unused) +{ + wu_newline = 1; + return 0; +} + +static int wu_store_suppress(int unused) +{ + wu_suppress = 1; + return 0; +} + +static int wu_store_localtime(int unused) +{ + wu_localtime = 1; + return 0; +} + +static int wu_store_gmtime(int unused) +{ + wu_gmtime = 1; + return 0; +} + +static int wu_store_info_all(int unused) +{ + wu_info_all = 1; + return 0; +} + +static int wu_store_no_data(int unused) +{ + wu_no_data = 1; + return 0; +} + +static int wu_store_set_only(int unused) +{ + wu_set_only = 1; + return 0; +} + + +/** + * wu_options - command line options and their associated flags + * + */ +static struct wu_options wu_options[] = { + + /* + * Help! + */ + [wu_option_help] = { + .longopt = "help", + .shortopt = 'h', + .param = 0, + .descr = "Display help text and exit", + .show = wu_show_help, + }, + + [wu_option_version] = { + .longopt = "version", + .shortopt = 'V', + .param = 0, + .descr = "Display version information and exit", + .show = wu_show_version, + }, + + /* + * Modifies the output for all other options + */ + [wu_option_debug] = { + .longopt = "debug", + .shortopt = 'd', + .param = 0, + .descr = "Print out debugging messages", + .store = wu_store_debug, + }, + + /* + * For data reading.. + */ + [wu_option_count] = { + .longopt = "count", + .shortopt = 'c', + .param = 1, + .descr = "Specify number of data samples", + .option = "", + .store = wu_store_count, + }, + + [wu_option_final] = { + .longopt = "final", + .shortopt = 'z', + .param = 0, + .descr = "Print final interval information", + .store = wu_store_final, + }, + + /* + * Modifies output for each option (most relevant for data) + */ + [wu_option_delim] = { + .longopt = "delim", + .shortopt = 'f', + .param = 1, + .descr = "Set field delimiter (default \", \")", + .option = "", + .store = wu_store_delim, + }, + + [wu_option_newline] = { + .longopt = "newline", + .shortopt = 'n', + .param = 0, + .descr = "Use '\\n' as delimter instead", + .store = wu_store_newline, + }, + + [wu_option_localtime] = { + .longopt = "localtime", + .shortopt = 't', + .param = 0, + .descr = "Print localtime with each data reading", + .store = wu_store_localtime, + }, + + [wu_option_gmtime] = { + .longopt = "gmtime", + .shortopt = 'g', + .param = 0, + .descr = "Print GMT time with each data reading", + .store = wu_store_gmtime, + }, + + [wu_option_label] = { + .longopt = "label", + .shortopt = 'l', + .param = 0, + .descr = "Show labels of each field", + .store = wu_store_label, + }, + + /* + * Relevant for each of the fields below + */ + [wu_option_suppress] = { + .longopt = "suppress", + .shortopt = 's', + .param = 0, + .descr = "Suppress printing of the field description", + .store = wu_store_suppress, + }, + + /* + * These options print values from the device and exit. + */ + [wu_option_cal] = { + .longopt = "calibrate", + .shortopt = 'b', + .param = 0, + .descr = "Print calibration parameters", + .show = wu_show_cal, + }, + + [wu_option_header] = { + .longopt = "header", + .shortopt = 'r', + .param = 0, + .descr = "Print data field names (as read from device)", + .show = wu_show_header, + }, + + /* + * These options have an optional parameter. + * W/o that parameter, they print values from the device. + * W/ that parameter, they set that option and read data. + * + * Except when the 'set-only' parameter is used, then the + * parameters are set, then re-read and printed. + */ + [wu_option_interval] = { + .longopt = "interval", + .shortopt = 'i', + .param = 2, + .descr = "Get/Set sampling interval", + .option = "", + .show = wu_show_interval, + .store = wu_store_interval, + }, + + [wu_option_mode] = { + .longopt = "mode", + .shortopt = 'm', + .param = 2, + .descr = "Get/Set display mode", + .option = "", + .show = wu_show_mode, + .store = wu_store_mode, + }, + + [wu_option_user] = { + .longopt = "user", + .shortopt = 'u', + .param = 2, + .descr = "Get/Set user parameters", + .option = "", + .format = ",<2nd tier cost>," + "<2nd tier threshold>," + "", + .show = wu_show_user, + .store = wu_store_user, + }, + + [wu_option_info_all] = { + .longopt = "show-all", + .shortopt = 'a', + .param = 0, + .descr = "Show all device parameters", + .store = wu_store_info_all, + }, + + [wu_option_no_data] = { + .longopt = "no-data", + .shortopt = 'N', + .param = 0, + .descr = "Don't read any data (just read device info)", + .store = wu_store_no_data, + }, + + [wu_option_set_only] = { + .longopt = "set-only", + .shortopt = 'S', + .param = 0, + .descr = "Set parameters only (don't read them back)", + .store = wu_store_set_only, + }, +}; + +#define wu_num_options ARRAY_SIZE(wu_options) + +static int wu_show_version(int unused) +{ + printf("%s Version %s\n", prog_name, wu_version); + return 0; +} + +static int wu_show_help(int unused) +{ + int i; + int n; + + wu_show_version(unused); + printf(" A program for interfacing with the Watts Up? Power Meter\n"); + printf("\n"); + + printf("Usage: %s [ ... ] [ ... ]\n", + prog_name); + printf("\n"); + + printf(" is the serial port the device is connected at.\n"); + printf("\n"); + + printf(" are any of the following:\n"); + for (i = 0; i< wu_num_options; i++) { + n = printf(" -%c", wu_options[i].shortopt); + + if (wu_options[i].param == 0) + n = printf(" "); + else if (wu_options[i].param == 1) + n = printf(" %s", wu_options[i].option); + else if (wu_options[i].param == 2) + n = printf(" [%s]", wu_options[i].option); + + n += printf("%*c| ", n - 12, ' '); + n += printf("--%s", wu_options[i].longopt); + + if (wu_options[i].param == 0) + n += printf(" "); + else if (wu_options[i].param == 1) + n += printf("=%s", wu_options[i].option); + else if (wu_options[i].param == 2) + n += printf("[=%s]", wu_options[i].option); + + printf("%*c%s\n", + 40 - n, ' ', wu_options[i].descr); + } + printf("\n"); + printf(" specifies which of these to print out (default: ALL)\n"); + for (i = 0; i< wu_num_fields; i++) { + printf("%12s -- %s\n", wu_fields[i].name, wu_fields[i].descr); + } + printf("\n"); + + return 0; +} + + +static char * wu_option_value(unsigned int index) +{ + return (index< wu_num_options) ? wu_options[index].value : NULL; +} + + +static int wu_check_option_show(int index) +{ + /* + * Return 1 if we need to print something out for + * a particular option. + */ + if (index< wu_num_options) { + if (wu_options[index].flag) { + return 1; + } + } + return 0; +} + +static int wu_check_option_store(int index) +{ + /* + * Return a 1 if this option is set. + */ + + if (index< wu_num_options) { + if (wu_options[index].flag) { + return 1; + } + } + return 0; +} + + +static int wu_show(int index, int dev_fd) +{ + if (wu_options[index].show) + return wu_options[index].show(dev_fd); + return 0; +} + +/* + * Check if the option is set, and call its method if so. + * Return whether or not we did anything.. + */ + +static int wu_check_show(int index, int dev_fd) +{ + if (wu_check_option_show(index)) { + wu_show(index, dev_fd); + return 1; + } + return 0; +} + + +/* + * Check if the option is set and if so, call it + * Return the value from the ->store() method. + */ + +static int wu_check_store(int index, int dev_fd) +{ + if (wu_check_option_store(index)) { + if (wu_options[index].store) + return wu_options[index].store(dev_fd); + } + return 0; +} + + +static void make_longopt(struct option * l) +{ + int i; + + for (i = 0; i< wu_num_options; i++) { + l[i].name = wu_options[i].longopt; + l[i].has_arg = wu_options[i].param; + l[i].flag =&wu_options[i].flag; + l[i].val = 0; + } +} + +static void make_shortopt(char * str) +{ + int i; + char * s = str; + + for (i = 0; i< wu_num_options; i++) { + *s++ = wu_options[i].shortopt; + if (wu_options[i].param) + *s++ = wu_options[i].param == 1 ? ':' : ';'; + } +} + +static void enable_short_option(int c, char * arg) +{ + int i; + + /* + * Friggin' getopt_long() will return the + * character if we get a short option (e.g. '-h'), + * instead of returning 0 like it does when it + * gets a long option (e.g. "--help"). Ugh. + */ + for (i = 0; i< wu_num_options; i++) { + if (wu_options[i].shortopt == c) { + wu_options[i].flag = 1; + if (arg) + wu_options[i].value = strdup(arg); + break; + } + } +} + +static int parse_args(int argc, char ** argv) +{ + struct option longopts[wu_num_options + 1] = { }; + char shortopts[wu_num_options * 2] = ""; + + make_longopt(longopts); + make_shortopt(shortopts); + + + while (1) { + int c; + int index; + + c = getopt_long(argc, argv, shortopts, + longopts,&index); + if (c == -1) + break; + + switch (c) { + case 0: + wu_options[index].flag = 1; + if (optarg) + wu_options[index].value = strdup(optarg); + + printf("long option: val = %c, optarg = %s\n", + wu_options[index].shortopt, optarg); + break; + case '?': + err("Bad parameter"); + return ret_err(EINVAL); + break; + default: + enable_short_option(c, optarg); + break; + } + } + + /* + * Check for help request now and bail after + * printing it, if it's set. + */ + if (wu_check_show(wu_option_help, 0)) + exit(0); + + if (wu_check_show(wu_option_version, 0)) + exit(0); + + /* + * Fields to print out + */ + if (optind< argc) { + int i; + + wu_device = argv[optind++]; + + if (optind< argc) { + for (i = optind; i< argc; i++) + enable_field(argv[i]); + } else + enable_all_fields(); + + } else { + wu_show(wu_option_help, 0); + return ret_err(EINVAL); + } + return 0; +} + + +int main(int argc, char ** argv) +{ + int ret; + int fd = 0; + + ret = parse_args(argc, argv); + if (ret) + return 0; + + /* + * Try to enable debugging early + */ + if ((ret = wu_check_store(wu_option_debug, 0))) + goto Close; + + ret = open_device(wu_device,&fd); + if (ret) + return ret; + + dbg("%s: Open for business", wu_device); + + ret = setup_serial_device(fd); + if (ret) + goto Close; + + wu_clear(fd); + + wu_fd = fd; + + /* + * Set delimeter before we print out any fields. + */ + if ((ret = wu_check_store(wu_option_delim, fd))) + goto Close; + + /* + * Ditto for 'label' and 'newline' flags. + */ + if ((ret = wu_check_store(wu_option_label, fd))) + goto Close; + + if ((ret = wu_check_store(wu_option_newline, fd))) + goto Close; + + if ((ret = wu_check_store(wu_option_suppress, fd))) + goto Close; + + if ((ret = wu_check_store(wu_option_localtime, fd))) + goto Close; + + if ((ret = wu_check_store(wu_option_gmtime, fd))) + goto Close; + + if ((ret = wu_check_store(wu_option_set_only, fd))) + goto Close; + + if ((ret = wu_check_store(wu_option_no_data, fd))) + goto Close; + + if ((ret = wu_check_store(wu_option_info_all, fd))) + goto Close; + + + /* + * Options to set device parameters. + */ + if ((ret = wu_check_store(wu_option_interval, fd))) + goto Close; + + if ((ret = wu_check_store(wu_option_mode, fd))) + goto Close; + + if ((ret = wu_check_store(wu_option_user, fd))) + goto Close; + + /* + * Check for options to print device info + */ + if (wu_info_all) { + wu_show(wu_option_cal, fd); + wu_show(wu_option_header, fd); + wu_show(wu_option_interval, fd); + wu_show(wu_option_mode, fd); + wu_show(wu_option_user, fd); + } else { + wu_check_show(wu_option_cal, fd); + wu_check_show(wu_option_header, fd); + + if (!wu_set_only) { + wu_check_show(wu_option_interval, fd); + wu_check_show(wu_option_mode, fd); + wu_check_show(wu_option_user, fd); + } + } + + if (!wu_no_data) { + + if ((ret = wu_check_store(wu_option_count, fd))) + goto Close; + + if ((ret = wu_check_store(wu_option_final, fd))) + goto Close; + + if ((ret = wu_start_log())) + goto Close; + + wu_read_data(fd); + + wu_stop_log(); + } +Close: + close(fd); + return ret; +} + + diff --git a/utils/wifitoggle/Makefile b/utils/wifitoggle/Makefile new file mode 100644 index 0000000..cfca4b7 --- /dev/null +++ b/utils/wifitoggle/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2010 segal.di.ubi.pt +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wifitoggle +PKG_VERSION:=1 +PKG_RELEASE:=2 + +include $(INCLUDE_DIR)/package.mk + +define Package/wifitoggle + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Script to toogle WiFi with a button and UCI config + MAINTAINER:=Nuno Goncalves +endef + +define Package/wifitoggle/description +Very versatile script to toogle WiFi with a button. Allows to set +timeouts, persist changes after boot, and set leds acording to the state. +endef + +define Package/wifitoggle/conffiles +/etc/config/wifitoggle +endef + +define Build/Compile +endef + +define Package/wifitoggle/install + $(INSTALL_DIR) $(1)/etc/hotplug.d/button + $(INSTALL_BIN) ./files/hotplug_wifitoggle $(1)/etc/hotplug.d/button/50-wifitoggle + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/uci_wifitoggle $(1)/etc/config/wifitoggle +endef + +$(eval $(call BuildPackage,wifitoggle)) diff --git a/utils/wifitoggle/files/hotplug_wifitoggle b/utils/wifitoggle/files/hotplug_wifitoggle new file mode 100755 index 0000000..fdeeb74 --- /dev/null +++ b/utils/wifitoggle/files/hotplug_wifitoggle @@ -0,0 +1,170 @@ +# /bin/sh + +setled() { + if [ -e /sys/class/leds/${led_sysfs}/brightness ] + then + [ $led_default -eq 1 ] && echo 1 >/sys/class/leds/${led_sysfs}/brightness + [ $led_default -eq 1 ] || echo 0 >/sys/class/leds/${led_sysfs}/brightness + + echo $led_trigger > /sys/class/leds/${led_sysfs}/trigger + + [ "$led_trigger" == "netdev" -a -n "$led_dev" ] && { + echo $led_dev > /sys/class/leds/${led_sysfs}/device_name + echo $led_mode > /sys/class/leds/${led_sysfs}/mode + } + + [ "$led_trigger" == "timer" ] && { + [ -n "$led_delayon" ] && echo $led_delayon > /sys/class/leds/${led_sysfs}/delay_on + [ -n "$led_delayoff" ] && echo $led_delayoff > /sys/class/leds/${led_sysfs}/delay_off + } + else + logger -p user.err -t "wifitoggle" "led: ${led_sysfs} not found" + fi +} + +load_wireless() { + disabled="$(uci get wireless.${1}.disabled)" +} + +save_wireless() { + [ "$device" = "all" -o "$device" = "${1}" ] && { + uci set "wireless.${1}.disabled=$disabled" + } +} + +setwifi() { + setled + + config_load wireless + config_foreach save_wireless wifi-device + wifi +} + + +save_system() { + config_get sysfs $1 sysfs + [ "$sysfs" = "$led_sysfs" ] && { + uci set "system.${1}.trigger=$led_trigger" + uci set "system.${1}.dev=$led_dev" + uci set "system.${1}.mode=$led_mode" + uci set "system.${1}.default=$led_default" + uci set "system.${1}.delayon=$led_delayon" + uci set "system.${1}.delayoff=$led_delayoff" + + ledset=1 + } +} + +commit_changes() { + ledset="" + + config_load system + config_foreach save_system led + + [ "$ledset" -eq 1 ] || { + section=$(uci add system led) + uci set "system.${section}.sysfs=$led_sysfs" + uci set "system.${section}.trigger=$led_trigger" + uci set "system.${section}.dev=$led_dev" + uci set "system.${section}.mode=$led_mode" + uci set "system.${section}.default=$led_default" + uci set "system.${section}.delayon=$led_delayon" + uci set "system.${section}.delayoff=$led_delayoff" + } + + uci commit +} + +enable() { + + led_trigger="$led_enable_trigger" + led_trigger="$led_enable_trigger" + led_dev="$led_enable_dev" + led_mode="$led_enable_mode" + led_default="$led_enable_default" + led_delayon="$led_enable_delayon" + led_delayoff="$led_enable_delayoff" + disabled=0 + + setwifi + + [ "$timer" -le 0 -a "$persistent" -eq 1 ] && commit_changes + + logger -p user.info -t "wifitoggle" "device($device) enabled" + + [ "$timer" -gt 0 ] && { + sleep "$timer" && disable && rm /tmp/run/wirelesstoggle_${1}.pid & + echo $! > /tmp/run/wirelesstoggle_${1}.pid + logger -p user.info -t "wifitoggle" "auto-disable timer started($timer seconds)" + } +} + +disable() { + + led_trigger="$led_disable_trigger" + led_trigger="$led_disable_trigger" + led_dev="$led_disable_dev" + led_mode="$led_disable_mode" + led_default="$led_disable_default" + led_delayon="$led_disable_delayon" + led_delayoff="$led_disable_delayoff" + disabled=1 + + setwifi + + [ "$timer" -le 0 -a "$persistent" -eq 1 ] && commit_changes + + logger -p user.info -t "wifitoggle" "device($device) disabled" +} + + +load_wifitoggle() { + config_get device $1 device "all" + config_get button $1 button "wps" + config_get action $1 action "pressed" + config_get_bool persistent $1 persistent "0" + config_get timer $1 timer "0" + + config_get led_sysfs $1 led_sysfs + + config_get led_enable_trigger $1 led_enable_trigger "none" + config_get led_enable_dev $1 led_enable_dev + config_get led_enable_mode $1 led_enable_mode "link" + config_get_bool led_enable_default $1 led_enable_default "1" + config_get led_enable_delayon $1 led_enable_delayon + config_get led_enable_delayoff $1 led_enable_delayoff + + config_get led_disable_trigger $1 led_disable_trigger "none" + config_get led_disable_dev $1 led_disable_dev + config_get led_disable_mode $1 led_disable_mode "link" + config_get_bool led_disable_default $1 led_disable_default "0" + config_get led_disable_delayon $1 led_disable_delayon + config_get led_disable_delayoff $1 led_disable_delayoff + + [ "$ACTION" = "$action" -a "$BUTTON" = "$button" ] && { + + [ -f /tmp/run/wirelesstoggle_${1}.pid ] && read PID < /tmp/run/wirelesstoggle_${1}.pid && kill $PID && rm /tmp/run/wirelesstoggle_${1}.pid + + if [ "$device" = "all" ] + then + config_load wireless + config_foreach load_wireless wifi-device + else + disabled="$(uci get wireless."$device".disabled)" + fi + + + if [ "$disabled" = "1" ] + then + enable $1 + elif [ "$disabled" = "0" ] + then + disable + else + logger -p user.err -t "wifitoggle" "device($device) not recognized" + fi + } +} + +config_load wifitoggle +config_foreach load_wifitoggle wifitoggle diff --git a/utils/wifitoggle/files/uci_wifitoggle b/utils/wifitoggle/files/uci_wifitoggle new file mode 100755 index 0000000..f3bec29 --- /dev/null +++ b/utils/wifitoggle/files/uci_wifitoggle @@ -0,0 +1,11 @@ +config wifitoggle + option button 'wps' + + option persistent '0' + option timer '600' + + option led_sysfs 'wrt160nl:amber:wps' + option led_enable_trigger 'timer' + option led_enable_delayon '500' + option led_enable_delayoff '500' + option led_disable_default '0' diff --git a/utils/wx200d/Makefile b/utils/wx200d/Makefile new file mode 100644 index 0000000..c33d071 --- /dev/null +++ b/utils/wx200d/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wx200d +PKG_VERSION:=1.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/wx200d +PKG_MD5SUM:=0f90c099dddcdd46ac568d707822ec4c + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/wx200d + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libpq + TITLE:=weather station data collector + URL:=http://wx200d.sourceforge.net/ +endef + +define Package/wx200d/description + wx200d is a weather station data collector and server daemon + for the WX200, WM918, WMR918 and WMR968 weather station + hardware. +endef + +# uses GNU configure + +define Package/wx200d/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/wx200 \ + $(PKG_INSTALL_DIR)/usr/bin/wxstdout \ + $(PKG_INSTALL_DIR)/usr/bin/wxfilter \ + $(PKG_INSTALL_DIR)/usr/bin/wxdebug \ + $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/wx200d \ + $(PKG_INSTALL_DIR)/usr/sbin/wxread \ + $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,wx200d)) diff --git a/utils/zile/Makefile b/utils/zile/Makefile new file mode 100644 index 0000000..6c6c93f --- /dev/null +++ b/utils/zile/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=zile +PKG_VERSION:=2.3.24 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@GNU/zile +PKG_MD5SUM:=fe77d801ba69e0fb9b4914a04b9ff506 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/zile + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libncurses + TITLE:=very small emacs-like editor + URL:=http://www.gnu.org/software/zile/ + SUBMENU:=Editors +endef + +define Package/zile/description + Zile is a small Emacs clone. Zile is a customizable, self-documenting + real-time display editor. Zile was written to be as similar as possible + to Emacs; every Emacs user should feel at home with Zile. +endef + +CONFIGURE_VARS += \ + gl_cv_func_getopt_gnu=yes + +define Package/zile/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,zile)) diff --git a/utils/zip/Makefile b/utils/zip/Makefile new file mode 100644 index 0000000..d0b5df7 --- /dev/null +++ b/utils/zip/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2007-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=zip +PKG_VERSION:=2.32 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)232.zip +PKG_SOURCE_URL:=@SF/infozip +PKG_MD5SUM:=da947ed356e5fdb30ff4bc3dc7698f33 + +include $(INCLUDE_DIR)/package.mk + +PKG_UNPACK=unzip -d $(PKG_BUILD_DIR)/ $(DL_DIR)/$(PKG_SOURCE) + +define Package/zip + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:= + TITLE:=Archiver for .zip files + URL:=http://infozip.sourceforge.net/Zip.html + SUBMENU:=compression +endef + +define Package/zip/description + This is InfoZIP's zip program. It produces files that are fully + compatible with the popular PKZIP program; however, the command line + options are not identical. In other words, the end result is the same, + but the methods differ. +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) -f unix/Makefile generic \ + $(TARGET_CONFIGURE_OPTS) \ + prefix="$(PKG_INSTALL_DIR)/usr" \ + CFLAGS="$(TARGET_CFLAGS)" \ + CF="$(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX" \ + LD="$(TARGET_CC) $(TARGET_LDFLAGS)" \ + install +endef + +define Package/zip/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,zip)) -- 2.11.0